@c9up/vellum 0.1.3 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.win32-x64-msvc.node +0 -0
- package/package.json +9 -6
- package/scripts/copy-napi.mjs +11 -3
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@c9up/vellum",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4",
|
|
4
4
|
"description": "PDF toolkit — convert PDF pages to images, author and inspect documents",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -31,13 +31,16 @@
|
|
|
31
31
|
"import": "./dist/services/main.js"
|
|
32
32
|
}
|
|
33
33
|
},
|
|
34
|
+
"engines": {
|
|
35
|
+
"node": ">=22.0.0"
|
|
36
|
+
},
|
|
34
37
|
"devDependencies": {
|
|
35
|
-
"@biomejs/biome": "^2.
|
|
38
|
+
"@biomejs/biome": "^2.5.12",
|
|
36
39
|
"@c9up/ream": "^0.2.0",
|
|
37
|
-
"@types/node": "^22.
|
|
38
|
-
"@vitest/coverage-v8": "
|
|
39
|
-
"typescript": "^6.0.
|
|
40
|
-
"vitest": "
|
|
40
|
+
"@types/node": "^22.20.1",
|
|
41
|
+
"@vitest/coverage-v8": "4.1.11",
|
|
42
|
+
"typescript": "^6.0.3",
|
|
43
|
+
"vitest": "4.1.11"
|
|
41
44
|
},
|
|
42
45
|
"publishConfig": {
|
|
43
46
|
"access": "public"
|
package/scripts/copy-napi.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { copyFileSync, existsSync } from 'node:fs'
|
|
2
|
-
import { dirname, join } from 'node:path'
|
|
2
|
+
import { dirname, join, resolve } from 'node:path'
|
|
3
3
|
import { arch, env, platform } from 'node:process'
|
|
4
4
|
import { fileURLToPath } from 'node:url'
|
|
5
5
|
|
|
@@ -20,16 +20,24 @@ const hostSuffixMap = {
|
|
|
20
20
|
'darwin-x64': 'darwin-x64', 'darwin-arm64': 'darwin-arm64', 'win32-x64': 'win32-x64-msvc',
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
+
// Cargo writes its artifacts under CARGO_TARGET_DIR when that is set — a
|
|
24
|
+
// shared cache, a CI mount — so they are not under this package's `target/` at
|
|
25
|
+
// all. A relative value is resolved against the directory cargo ran in, which
|
|
26
|
+
// is this package root.
|
|
27
|
+
const targetDir = env.CARGO_TARGET_DIR
|
|
28
|
+
? resolve(root, env.CARGO_TARGET_DIR)
|
|
29
|
+
: join(root, 'target')
|
|
30
|
+
|
|
23
31
|
const triple = env.CARGO_BUILD_TARGET ?? ''
|
|
24
32
|
let suffix, os, releaseDir
|
|
25
33
|
if (triple) {
|
|
26
34
|
const entry = tripleMap[triple]
|
|
27
35
|
if (!entry) throw new Error(`${TAG} unsupported CARGO_BUILD_TARGET: ${triple}`)
|
|
28
36
|
suffix = entry.suffix; os = entry.os
|
|
29
|
-
releaseDir = join(
|
|
37
|
+
releaseDir = join(targetDir, triple, 'release')
|
|
30
38
|
} else {
|
|
31
39
|
suffix = hostSuffixMap[`${platform}-${arch}`]; os = platform
|
|
32
|
-
releaseDir = join(
|
|
40
|
+
releaseDir = join(targetDir, 'release')
|
|
33
41
|
if (!suffix) throw new Error(`${TAG} unsupported platform/arch: ${platform}-${arch}`)
|
|
34
42
|
}
|
|
35
43
|
|