@neon-rs/cli 0.0.155 → 0.0.156
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 +15 -3
- package/package.json +8 -8
package/index.js
CHANGED
|
@@ -12192,6 +12192,18 @@ const install_builds_OPTIONS = [
|
|
|
12192
12192
|
{ name: 'bundle', alias: 'b', type: String, defaultValue: null },
|
|
12193
12193
|
{ name: 'verbose', alias: 'v', type: Boolean, defaultValue: false }
|
|
12194
12194
|
];
|
|
12195
|
+
function lookupBinaryPackagesV1(targets) {
|
|
12196
|
+
return Object.values(targets);
|
|
12197
|
+
}
|
|
12198
|
+
function lookupBinaryPackagesV2(org, targets) {
|
|
12199
|
+
return Object.keys(targets).map(key => `${org}/${key}`);
|
|
12200
|
+
}
|
|
12201
|
+
function lookupBinaryPackages(manifest) {
|
|
12202
|
+
if (manifest.neon.org) {
|
|
12203
|
+
return lookupBinaryPackagesV2(manifest.neon.org, manifest.neon.targets);
|
|
12204
|
+
}
|
|
12205
|
+
return lookupBinaryPackagesV1(manifest.neon.targets);
|
|
12206
|
+
}
|
|
12195
12207
|
class InstallBuilds {
|
|
12196
12208
|
static summary() { return 'Install dependencies on prebuilds in package.json.'; }
|
|
12197
12209
|
static syntax() { return 'neon install-builds [-b <file>]'; }
|
|
@@ -12226,8 +12238,8 @@ class InstallBuilds {
|
|
|
12226
12238
|
const version = manifest.version;
|
|
12227
12239
|
this.log(`package.json before: ${JSON.stringify(manifest)}`);
|
|
12228
12240
|
this.log(`determined version: ${version}`);
|
|
12229
|
-
const
|
|
12230
|
-
const specs =
|
|
12241
|
+
const packages = lookupBinaryPackages(manifest);
|
|
12242
|
+
const specs = packages.map(name => `${name}@${version}`);
|
|
12231
12243
|
this.log(`npm install --save-exact -O ${specs.join(' ')}`);
|
|
12232
12244
|
const result = await execa('npm', ['install', '--save-exact', '-O', ...specs], { shell: true });
|
|
12233
12245
|
if (result.exitCode !== 0) {
|
|
@@ -12249,7 +12261,7 @@ class InstallBuilds {
|
|
|
12249
12261
|
|
|
12250
12262
|
if (0) {
|
|
12251
12263
|
`;
|
|
12252
|
-
const requires =
|
|
12264
|
+
const requires = packages.map(name => ` require('${name}');`).join('\n');
|
|
12253
12265
|
this.log(`generating bundler compatibility module at ${this._bundle}`);
|
|
12254
12266
|
await promises_namespaceObject.writeFile(this._bundle, PREAMBLE + requires + '\n}\n');
|
|
12255
12267
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@neon-rs/cli",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.156",
|
|
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.156",
|
|
31
|
+
"@cargo-messages/darwin-arm64": "0.0.156",
|
|
32
|
+
"@cargo-messages/darwin-x64": "0.0.156",
|
|
33
|
+
"@cargo-messages/linux-arm-gnueabihf": "0.0.156",
|
|
34
|
+
"@cargo-messages/linux-x64-gnu": "0.0.156",
|
|
35
|
+
"@cargo-messages/win32-arm64-msvc": "0.0.156",
|
|
36
|
+
"@cargo-messages/win32-x64-msvc": "0.0.156"
|
|
37
37
|
}
|
|
38
38
|
}
|