@neon-rs/cli 0.0.183 → 0.0.184
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 +17 -1
- package/package.json +8 -8
package/index.js
CHANGED
|
@@ -44495,6 +44495,15 @@ const OPTIONS = [
|
|
|
44495
44495
|
function createInputStream(file) {
|
|
44496
44496
|
return file ? (0,external_node_fs_namespaceObject.createReadStream)(file) : process.stdin;
|
|
44497
44497
|
}
|
|
44498
|
+
function basename(crateName) {
|
|
44499
|
+
return crateName.replace(/^@[^/]*\//, '');
|
|
44500
|
+
}
|
|
44501
|
+
function ensureDefined(str, msg) {
|
|
44502
|
+
if (str === undefined) {
|
|
44503
|
+
throw new Error(`${msg} is not defined`);
|
|
44504
|
+
}
|
|
44505
|
+
return str;
|
|
44506
|
+
}
|
|
44498
44507
|
class Dist {
|
|
44499
44508
|
static summary() { return 'Generate a binary .node file from a cargo output log.'; }
|
|
44500
44509
|
static syntax() { return 'neon dist [-n <name>] [-f <dylib>|[-l <log>] [-m <path>]] [-o <dist>]'; }
|
|
@@ -44541,9 +44550,11 @@ class Dist {
|
|
|
44541
44550
|
this._file = options.file ?? null;
|
|
44542
44551
|
this._mount = options.mount;
|
|
44543
44552
|
this._manifestPath = options['manifest-path'];
|
|
44544
|
-
this._crateName = options.name ||
|
|
44553
|
+
this._crateName = options.name ||
|
|
44554
|
+
basename(ensureDefined(process.env['npm_package_name'], '$npm_package_name'));
|
|
44545
44555
|
this._out = options.out;
|
|
44546
44556
|
this._verbose = !!options.verbose;
|
|
44557
|
+
this.log(`crate name = "${this._crateName}"`);
|
|
44547
44558
|
}
|
|
44548
44559
|
async findArtifact() {
|
|
44549
44560
|
const reader = new lib.CargoReader(createInputStream(this._log), {
|
|
@@ -44580,6 +44591,11 @@ class Dist {
|
|
|
44580
44591
|
// }
|
|
44581
44592
|
// return file;
|
|
44582
44593
|
}
|
|
44594
|
+
log(msg) {
|
|
44595
|
+
if (this._verbose) {
|
|
44596
|
+
console.error("[neon dist] " + msg);
|
|
44597
|
+
}
|
|
44598
|
+
}
|
|
44583
44599
|
async run() {
|
|
44584
44600
|
const file = this._file || (await this.findArtifact());
|
|
44585
44601
|
// FIXME: needs all the logic of cargo-cp-artifact (timestamp check, M1 workaround, async, errors)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@neon-rs/cli",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.184",
|
|
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.184",
|
|
31
|
+
"@cargo-messages/darwin-arm64": "0.0.184",
|
|
32
|
+
"@cargo-messages/darwin-x64": "0.0.184",
|
|
33
|
+
"@cargo-messages/linux-arm-gnueabihf": "0.0.184",
|
|
34
|
+
"@cargo-messages/linux-x64-gnu": "0.0.184",
|
|
35
|
+
"@cargo-messages/win32-arm64-msvc": "0.0.184",
|
|
36
|
+
"@cargo-messages/win32-x64-msvc": "0.0.184"
|
|
37
37
|
}
|
|
38
38
|
}
|