@neon-rs/cli 0.0.156 → 0.0.157
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.js +18 -1
- package/package.json +8 -8
package/index.js
CHANGED
|
@@ -12022,6 +12022,23 @@ function lookup(target) {
|
|
|
12022
12022
|
}
|
|
12023
12023
|
return { node, ...node_namespaceObject[node] };
|
|
12024
12024
|
}
|
|
12025
|
+
function extractPackageNameV1(targets, target) {
|
|
12026
|
+
return targets[target];
|
|
12027
|
+
}
|
|
12028
|
+
function extractPackageNameV2(manifest, target) {
|
|
12029
|
+
for (const key in manifest.neon.targets) {
|
|
12030
|
+
if (key === target) {
|
|
12031
|
+
return `${manifest.neon.org}/${manifest.neon.targets[key]}`;
|
|
12032
|
+
}
|
|
12033
|
+
}
|
|
12034
|
+
return undefined;
|
|
12035
|
+
}
|
|
12036
|
+
function extractPackageName(manifest, target) {
|
|
12037
|
+
if (manifest.neon.org) {
|
|
12038
|
+
return extractPackageNameV2(manifest, target);
|
|
12039
|
+
}
|
|
12040
|
+
return extractPackageNameV1(manifest.neon.targets, target);
|
|
12041
|
+
}
|
|
12025
12042
|
class PackBuild {
|
|
12026
12043
|
static summary() { return 'Create an npm tarball from a prebuild.'; }
|
|
12027
12044
|
static syntax() { return 'neon pack-build [-f <addon>] [-t <target>] [-d <dir>]'; }
|
|
@@ -12076,7 +12093,7 @@ class PackBuild {
|
|
|
12076
12093
|
if (!isRustTarget(target)) {
|
|
12077
12094
|
throw new Error(`Rust target ${target} not supported.`);
|
|
12078
12095
|
}
|
|
12079
|
-
const name =
|
|
12096
|
+
const name = extractPackageName(manifest, target);
|
|
12080
12097
|
if (!name) {
|
|
12081
12098
|
throw new Error(`Rust target ${target} not found in package.json.`);
|
|
12082
12099
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@neon-rs/cli",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.157",
|
|
4
4
|
"description": "Command-line build tool for Neon modules.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": "./index.js",
|
|
@@ -27,12 +27,12 @@
|
|
|
27
27
|
},
|
|
28
28
|
"homepage": "https://github.com/dherman/neon-rs#readme",
|
|
29
29
|
"optionalDependencies": {
|
|
30
|
-
"@cargo-messages/android-arm-eabi": "0.0.
|
|
31
|
-
"@cargo-messages/darwin-arm64": "0.0.
|
|
32
|
-
"@cargo-messages/darwin-x64": "0.0.
|
|
33
|
-
"@cargo-messages/linux-arm-gnueabihf": "0.0.
|
|
34
|
-
"@cargo-messages/linux-x64-gnu": "0.0.
|
|
35
|
-
"@cargo-messages/win32-arm64-msvc": "0.0.
|
|
36
|
-
"@cargo-messages/win32-x64-msvc": "0.0.
|
|
30
|
+
"@cargo-messages/android-arm-eabi": "0.0.157",
|
|
31
|
+
"@cargo-messages/darwin-arm64": "0.0.157",
|
|
32
|
+
"@cargo-messages/darwin-x64": "0.0.157",
|
|
33
|
+
"@cargo-messages/linux-arm-gnueabihf": "0.0.157",
|
|
34
|
+
"@cargo-messages/linux-x64-gnu": "0.0.157",
|
|
35
|
+
"@cargo-messages/win32-arm64-msvc": "0.0.157",
|
|
36
|
+
"@cargo-messages/win32-x64-msvc": "0.0.157"
|
|
37
37
|
}
|
|
38
38
|
}
|