@neon-rs/cli 0.0.123 → 0.0.125
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 +9 -4
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -10308,13 +10308,18 @@ class Dist {
|
|
|
10308
10308
|
manifestPath: this._manifestPath || undefined,
|
|
10309
10309
|
file: this._log || undefined
|
|
10310
10310
|
});
|
|
10311
|
-
|
|
10311
|
+
const artifact = messages.findArtifact(this._crateName);
|
|
10312
|
+
if (!artifact) {
|
|
10313
|
+
throw new Error(`No artifacts were generated for crate ${this._crateName}`);
|
|
10314
|
+
}
|
|
10315
|
+
const file = artifact.findFileByCrateType('cdylib');
|
|
10316
|
+
if (!file) {
|
|
10317
|
+
throw new Error(`No cdylib artifact found for crate ${this._crateName}`);
|
|
10318
|
+
}
|
|
10319
|
+
return file;
|
|
10312
10320
|
}
|
|
10313
10321
|
async run() {
|
|
10314
10322
|
const file = this._file || this.findArtifact();
|
|
10315
|
-
if (!file) {
|
|
10316
|
-
throw new Error(`No library found for crate ${this._crateName}`);
|
|
10317
|
-
}
|
|
10318
10323
|
// FIXME: needs all the logic of cargo-cp-artifact (timestamp check, M1 workaround, async, errors)
|
|
10319
10324
|
await (0,promises_namespaceObject.copyFile)(file, this._out);
|
|
10320
10325
|
}
|