Skip to content

Commit 213e04c

Browse files
authored
Merge pull request #170 from ducflair/dev
Dev
2 parents 77f1438 + df5a59a commit 213e04c

19 files changed

Lines changed: 404 additions & 47 deletions

File tree

.vscode/settings.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
"editor.detectIndentation": false,
77
"rust-analyzer.linkedProjects": [
88
"packages/ducrs/Cargo.toml",
9-
"packages/ducpdf/src/duc2pdf/Cargo.toml"
9+
"packages/ducpdf/src/duc2pdf/Cargo.toml",
10+
"packages/ducsvg/src/pdf2svg/Cargo.toml"
1011
],
1112
"rust-analyzer.files.exclude": [
1213
"packages/ducrs/src/duc_generated.rs"

Cargo.lock

Lines changed: 192 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
resolver = "2"
33
members = [
44
"packages/ducrs",
5-
"packages/ducpdf/src/duc2pdf"
5+
"packages/ducpdf/src/duc2pdf",
6+
"packages/ducsvg/src/pdf2svg",
67
]
78

89
[workspace.dependencies]
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
version https://git-lfs.github.com/spec/v1
2-
oid sha256:80b00ebb3c3207b311dada6a018565f139f8679798fbe13a09ace0574436d1ba
3-
size 3216
2+
oid sha256:3fccfd91dd6f9cbf679ae270831ccaf9a3a157958016143ad4196596dd80bab6
3+
size 469896

bun.lock

Lines changed: 0 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
"scripts": {
5252
"build": "turbo build",
5353
"build:packages": "turbo build --filter=ducjs --filter=ducpy --filter=ducrs --filter=ducsvg --filter=ducpdf",
54-
"sst:wrap": "bash -c 'CMD=\"$1\"; shift; [ -n \"$1\" ] && [ \"$1\" != \"_\" ] && export SST_STAGE=\"$1\"; eval \"$CMD\"' _",
54+
"sst:shell": "bash -c 'CMD=\"$1\"; shift; [ -n \"$1\" ] && [ \"$1\" != \"_\" ] && export SST_STAGE=\"$1\"; eval \"$CMD\"' _",
5555
"flatc:gen": "bun run flatc:gen:duc",
5656
"flatc:gen:duc": "cd schema && bash flatc-duc-generate.sh",
5757
"clean": "bun del-cli \"**/dist\" \".turbo\" \"**/node_modules\" \"**/package-lock.json\" \"**/tsconfig.tsbuildinfo\" \"**/tsconfig.node.tsbuildinfo\" \"**/vite.config.js\"",
@@ -68,11 +68,11 @@
6868
"ducpdf:build": "turbo build --filter=ducpdf",
6969
"ducpdf:test": "turbo run test --filter=ducpdf",
7070
"semantic-release": "turbo run semantic-release",
71-
"sst:deploy": "bun sst:wrap 'bun run sst:clean && sst unlock && sst refresh && sst deploy'",
71+
"sst:deploy": "bun sst:shell 'bun run sst:clean && sst unlock && sst refresh && sst deploy'",
7272
"sst:clean": "bun del-cli \".sst\" \"**/sst-env.d.ts\" \"**/sst.pyi\"",
7373
"sst:dev": "bun run sst dev",
74-
"knip:deps": "bun sst:wrap 'bun run sst unlock && sst shell -- bunx knip --dependencies'",
75-
"knip": "bun sst:wrap 'bun run sst unlock && sst shell -- bunx knip'"
74+
"knip:deps": "bun sst:shell 'bun run sst unlock && sst shell -- bunx knip --dependencies'",
75+
"knip": "bun sst:shell 'bun run sst unlock && sst shell -- bunx knip'"
7676
},
7777
"workspaces": [
7878
"apps/*",

packages/ducpdf/src/duc2pdf/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ async function initWasm(): Promise<any> {
1414
try {
1515
// Dynamically import the WASM JS bindings
1616
const wasmBindings: any = await import('../wasm');
17-
17+
1818
// The wasm-pack generated module exports a default init function
1919
// that handles loading the WASM file using import.meta.url
2020
// This is the same pattern used by duc_renderer_bin

packages/ducpdf/src/duc2pdf/src/lib.rs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,11 @@ pub fn convert_duc_to_pdf_rs(duc_data: &[u8]) -> Vec<u8> {
278278
Ok(pdf_bytes) => pdf_bytes,
279279
Err(e) => {
280280
// Log error with context
281-
error_handling::log_error_details(&e, duc_data.len(), "Standard conversion (default options)");
281+
error_handling::log_error_details(
282+
&e,
283+
duc_data.len(),
284+
"Standard conversion (default options)",
285+
);
282286

283287
// Create structured error info and convert to WASM bytes
284288
let error_info = error_handling::create_error_info(&e, duc_data.len(), None);
@@ -390,7 +394,8 @@ pub fn convert_duc_to_pdf_crop_wasm(
390394
background_color: normalized_background,
391395
..Default::default()
392396
};
393-
let error_info = error_handling::create_error_info(&e, duc_data.len(), Some(&crop_options));
397+
let error_info =
398+
error_handling::create_error_info(&e, duc_data.len(), Some(&crop_options));
394399
error_handling::error_to_wasm_bytes(&error_info)
395400
}
396401
}

0 commit comments

Comments
 (0)