@neon-rs/cli 0.0.65 → 0.0.67
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 +273 -7
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -2,6 +2,13 @@
|
|
|
2
2
|
import { createRequire as __WEBPACK_EXTERNAL_createRequire } from "module";
|
|
3
3
|
/******/ var __webpack_modules__ = ({
|
|
4
4
|
|
|
5
|
+
/***/ 1300:
|
|
6
|
+
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
7
|
+
|
|
8
|
+
module.exports = require(__nccwpck_require__.ab + "index.node")
|
|
9
|
+
|
|
10
|
+
/***/ }),
|
|
11
|
+
|
|
5
12
|
/***/ 3741:
|
|
6
13
|
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
7
14
|
|
|
@@ -10099,6 +10106,165 @@ function wrappy (fn, cb) {
|
|
|
10099
10106
|
}
|
|
10100
10107
|
|
|
10101
10108
|
|
|
10109
|
+
/***/ }),
|
|
10110
|
+
|
|
10111
|
+
/***/ 1401:
|
|
10112
|
+
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
|
|
10113
|
+
|
|
10114
|
+
|
|
10115
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
10116
|
+
exports.bin = exports.custom = exports.scope = exports.currentTarget = void 0;
|
|
10117
|
+
const node_module_1 = __nccwpck_require__(2033);
|
|
10118
|
+
function currentTarget() {
|
|
10119
|
+
let os = null;
|
|
10120
|
+
switch (process.platform) {
|
|
10121
|
+
case 'android':
|
|
10122
|
+
switch (process.arch) {
|
|
10123
|
+
case 'arm':
|
|
10124
|
+
return 'android-arm-eabi';
|
|
10125
|
+
case 'arm64':
|
|
10126
|
+
return 'android-arm64';
|
|
10127
|
+
}
|
|
10128
|
+
os = 'Android';
|
|
10129
|
+
break;
|
|
10130
|
+
case 'win32':
|
|
10131
|
+
switch (process.arch) {
|
|
10132
|
+
case 'x64':
|
|
10133
|
+
return 'win32-x64-msvc';
|
|
10134
|
+
case 'arm64':
|
|
10135
|
+
return 'win32-arm64-msvc';
|
|
10136
|
+
case 'ia32':
|
|
10137
|
+
return 'win32-ia32-msvc';
|
|
10138
|
+
}
|
|
10139
|
+
os = 'Windows';
|
|
10140
|
+
break;
|
|
10141
|
+
case 'darwin':
|
|
10142
|
+
switch (process.arch) {
|
|
10143
|
+
case 'x64':
|
|
10144
|
+
return 'darwin-x64';
|
|
10145
|
+
case 'arm64':
|
|
10146
|
+
return 'darwin-arm64';
|
|
10147
|
+
}
|
|
10148
|
+
os = 'macOS';
|
|
10149
|
+
break;
|
|
10150
|
+
case 'linux':
|
|
10151
|
+
switch (process.arch) {
|
|
10152
|
+
case 'x64':
|
|
10153
|
+
case 'arm64':
|
|
10154
|
+
return isGlibc()
|
|
10155
|
+
? `linux-${process.arch}-gnu`
|
|
10156
|
+
: `linux-${process.arch}-musl`;
|
|
10157
|
+
case 'arm':
|
|
10158
|
+
return 'linux-arm-gnueabihf';
|
|
10159
|
+
}
|
|
10160
|
+
os = 'Linux';
|
|
10161
|
+
break;
|
|
10162
|
+
case 'freebsd':
|
|
10163
|
+
if (process.arch === 'x64') {
|
|
10164
|
+
return 'freebsd-x64';
|
|
10165
|
+
}
|
|
10166
|
+
os = 'FreeBSD';
|
|
10167
|
+
break;
|
|
10168
|
+
}
|
|
10169
|
+
if (os) {
|
|
10170
|
+
throw new Error(`Neon: unsupported ${os} architecture: ${process.arch}`);
|
|
10171
|
+
}
|
|
10172
|
+
throw new Error(`Neon: unsupported system: ${process.platform}`);
|
|
10173
|
+
}
|
|
10174
|
+
exports.currentTarget = currentTarget;
|
|
10175
|
+
function isGlibc() {
|
|
10176
|
+
// Cast to unknown to work around a bug in the type definition:
|
|
10177
|
+
// https://github.com/DefinitelyTyped/DefinitelyTyped/issues/40140
|
|
10178
|
+
const report = process.report?.getReport();
|
|
10179
|
+
if ((typeof report !== 'object') || !report || (!('header' in report))) {
|
|
10180
|
+
return false;
|
|
10181
|
+
}
|
|
10182
|
+
const header = report.header;
|
|
10183
|
+
return (typeof header === 'object') &&
|
|
10184
|
+
!!header &&
|
|
10185
|
+
('glibcVersionRuntime' in header);
|
|
10186
|
+
}
|
|
10187
|
+
// export function debug(...components: string[]) {
|
|
10188
|
+
// if (components.length === 0 || !components[components.length - 1].endsWith(".node")) {
|
|
10189
|
+
// components.push("index.node");
|
|
10190
|
+
// }
|
|
10191
|
+
// const pathSpec = path.join(...components);
|
|
10192
|
+
// return fs.existsSync(pathSpec) ? require(pathSpec) : null;
|
|
10193
|
+
// }
|
|
10194
|
+
const requireAbsolute = (0, node_module_1.createRequire)(process.cwd());
|
|
10195
|
+
function scope(scope) {
|
|
10196
|
+
return requireAbsolute(scope + "/" + currentTarget());
|
|
10197
|
+
}
|
|
10198
|
+
exports.scope = scope;
|
|
10199
|
+
function custom(toRequireSpec) {
|
|
10200
|
+
return requireAbsolute(toRequireSpec(currentTarget()));
|
|
10201
|
+
}
|
|
10202
|
+
exports.custom = custom;
|
|
10203
|
+
function* interleave(a1, a2) {
|
|
10204
|
+
const length = Math.max(a1.length, a2.length);
|
|
10205
|
+
for (let i = 0; i < length; i++) {
|
|
10206
|
+
if (i < a1.length) {
|
|
10207
|
+
yield a1[i];
|
|
10208
|
+
}
|
|
10209
|
+
if (i < a2.length) {
|
|
10210
|
+
yield a2[i];
|
|
10211
|
+
}
|
|
10212
|
+
}
|
|
10213
|
+
}
|
|
10214
|
+
function bin(scope, ...rest) {
|
|
10215
|
+
return [...interleave(scope, rest)].join("") + "/" + currentTarget();
|
|
10216
|
+
}
|
|
10217
|
+
exports.bin = bin;
|
|
10218
|
+
|
|
10219
|
+
|
|
10220
|
+
/***/ }),
|
|
10221
|
+
|
|
10222
|
+
/***/ 9441:
|
|
10223
|
+
/***/ ((module) => {
|
|
10224
|
+
|
|
10225
|
+
module.exports = eval("require")("@cargo-messages/android-arm-eabi");
|
|
10226
|
+
|
|
10227
|
+
|
|
10228
|
+
/***/ }),
|
|
10229
|
+
|
|
10230
|
+
/***/ 1722:
|
|
10231
|
+
/***/ ((module) => {
|
|
10232
|
+
|
|
10233
|
+
module.exports = eval("require")("@cargo-messages/darwin-arm64");
|
|
10234
|
+
|
|
10235
|
+
|
|
10236
|
+
/***/ }),
|
|
10237
|
+
|
|
10238
|
+
/***/ 3659:
|
|
10239
|
+
/***/ ((module) => {
|
|
10240
|
+
|
|
10241
|
+
module.exports = eval("require")("@cargo-messages/darwin-x64");
|
|
10242
|
+
|
|
10243
|
+
|
|
10244
|
+
/***/ }),
|
|
10245
|
+
|
|
10246
|
+
/***/ 4766:
|
|
10247
|
+
/***/ ((module) => {
|
|
10248
|
+
|
|
10249
|
+
module.exports = eval("require")("@cargo-messages/linux-arm-gnueabihf");
|
|
10250
|
+
|
|
10251
|
+
|
|
10252
|
+
/***/ }),
|
|
10253
|
+
|
|
10254
|
+
/***/ 4054:
|
|
10255
|
+
/***/ ((module) => {
|
|
10256
|
+
|
|
10257
|
+
module.exports = eval("require")("@cargo-messages/win32-arm64-msvc");
|
|
10258
|
+
|
|
10259
|
+
|
|
10260
|
+
/***/ }),
|
|
10261
|
+
|
|
10262
|
+
/***/ 4857:
|
|
10263
|
+
/***/ ((module) => {
|
|
10264
|
+
|
|
10265
|
+
module.exports = eval("require")("@cargo-messages/win32-x64-msvc");
|
|
10266
|
+
|
|
10267
|
+
|
|
10102
10268
|
/***/ }),
|
|
10103
10269
|
|
|
10104
10270
|
/***/ 9491:
|
|
@@ -10143,6 +10309,13 @@ module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("fs");
|
|
|
10143
10309
|
|
|
10144
10310
|
/***/ }),
|
|
10145
10311
|
|
|
10312
|
+
/***/ 2033:
|
|
10313
|
+
/***/ ((module) => {
|
|
10314
|
+
|
|
10315
|
+
module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:module");
|
|
10316
|
+
|
|
10317
|
+
/***/ }),
|
|
10318
|
+
|
|
10146
10319
|
/***/ 2037:
|
|
10147
10320
|
/***/ ((module) => {
|
|
10148
10321
|
|
|
@@ -10176,6 +10349,103 @@ module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("tty");
|
|
|
10176
10349
|
|
|
10177
10350
|
module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("util");
|
|
10178
10351
|
|
|
10352
|
+
/***/ }),
|
|
10353
|
+
|
|
10354
|
+
/***/ 4071:
|
|
10355
|
+
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
10356
|
+
|
|
10357
|
+
const addon = __nccwpck_require__(5268);
|
|
10358
|
+
|
|
10359
|
+
const PRIVATE = {};
|
|
10360
|
+
|
|
10361
|
+
function enforcePrivate(nonce, className) {
|
|
10362
|
+
if (nonce !== PRIVATE) {
|
|
10363
|
+
throw new Error(`${className} constructor is private`);
|
|
10364
|
+
}
|
|
10365
|
+
}
|
|
10366
|
+
|
|
10367
|
+
class CargoArtifact {
|
|
10368
|
+
constructor(nonce, kernel) {
|
|
10369
|
+
enforcePrivate(nonce, 'CargoArtifact');
|
|
10370
|
+
this._kernel = kernel;
|
|
10371
|
+
}
|
|
10372
|
+
|
|
10373
|
+
findFileByCrateType(crateType) {
|
|
10374
|
+
return addon.findFileByCrateType(this._kernel, crateType);
|
|
10375
|
+
}
|
|
10376
|
+
}
|
|
10377
|
+
|
|
10378
|
+
class CargoMessages {
|
|
10379
|
+
constructor(options) {
|
|
10380
|
+
options = options || {};
|
|
10381
|
+
this._mount = options.mount || null;
|
|
10382
|
+
this._manifestPath = options.manifestPath || null;
|
|
10383
|
+
this._kernel = options.file
|
|
10384
|
+
? addon.fromFile(options.file, this._mount, this._manifestPath)
|
|
10385
|
+
: addon.fromStdin(this._mount, this._manifestPath);
|
|
10386
|
+
}
|
|
10387
|
+
|
|
10388
|
+
findArtifact(crateName) {
|
|
10389
|
+
const found = addon.findArtifact(this._kernel, crateName);
|
|
10390
|
+
return found
|
|
10391
|
+
? new CargoArtifact(PRIVATE, found)
|
|
10392
|
+
: null;
|
|
10393
|
+
}
|
|
10394
|
+
}
|
|
10395
|
+
|
|
10396
|
+
module.exports = {
|
|
10397
|
+
CargoMessages
|
|
10398
|
+
};
|
|
10399
|
+
|
|
10400
|
+
|
|
10401
|
+
/***/ }),
|
|
10402
|
+
|
|
10403
|
+
/***/ 5268:
|
|
10404
|
+
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
10405
|
+
|
|
10406
|
+
const { currentTarget } = __nccwpck_require__(1401);
|
|
10407
|
+
|
|
10408
|
+
function lazy(loaders, exports) {
|
|
10409
|
+
let loaded = null;
|
|
10410
|
+
|
|
10411
|
+
function load() {
|
|
10412
|
+
if (loaded) {
|
|
10413
|
+
return loaded;
|
|
10414
|
+
}
|
|
10415
|
+
const target = currentTarget();
|
|
10416
|
+
if (!loaders.hasOwnProperty(target)) {
|
|
10417
|
+
throw new Error(`no precompiled module found for ${target}`);
|
|
10418
|
+
}
|
|
10419
|
+
loaded = loaders[target]();
|
|
10420
|
+
return loaded;
|
|
10421
|
+
}
|
|
10422
|
+
|
|
10423
|
+
let module = {};
|
|
10424
|
+
|
|
10425
|
+
for (const key of exports) {
|
|
10426
|
+
Object.defineProperty(module, key, { get() { return load()[key]; } });
|
|
10427
|
+
}
|
|
10428
|
+
|
|
10429
|
+
return module;
|
|
10430
|
+
}
|
|
10431
|
+
|
|
10432
|
+
module.exports = lazy({
|
|
10433
|
+
'darwin-x64': () => __nccwpck_require__(3659),
|
|
10434
|
+
'win32-x64-msvc': () => __nccwpck_require__(4857),
|
|
10435
|
+
'aarch64-pc-windows-msvc': () => __nccwpck_require__(4054),
|
|
10436
|
+
'darwin-x64': () => __nccwpck_require__(3659),
|
|
10437
|
+
'darwin-arm64': () => __nccwpck_require__(1722),
|
|
10438
|
+
'linux-x64-gnu': () => __nccwpck_require__(1300),
|
|
10439
|
+
'linux-arm-gnueabihf': () => __nccwpck_require__(4766),
|
|
10440
|
+
'android-arm-eabi': () => __nccwpck_require__(9441)
|
|
10441
|
+
}, [
|
|
10442
|
+
'fromFile',
|
|
10443
|
+
'fromStdin',
|
|
10444
|
+
'findArtifact',
|
|
10445
|
+
'findFileByCrateType'
|
|
10446
|
+
]);
|
|
10447
|
+
|
|
10448
|
+
|
|
10179
10449
|
/***/ })
|
|
10180
10450
|
|
|
10181
10451
|
/******/ });
|
|
@@ -13232,15 +13502,11 @@ const promises_namespaceObject = __WEBPACK_EXTERNAL_createRequire(import.meta.ur
|
|
|
13232
13502
|
// EXTERNAL MODULE: ../../node_modules/command-line-args/dist/index.js
|
|
13233
13503
|
var dist = __nccwpck_require__(4516);
|
|
13234
13504
|
var dist_default = /*#__PURE__*/__nccwpck_require__.n(dist);
|
|
13235
|
-
|
|
13236
|
-
|
|
13505
|
+
// EXTERNAL MODULE: ./node_modules/cargo-messages/lib/index.cjs
|
|
13506
|
+
var lib = __nccwpck_require__(4071);
|
|
13237
13507
|
;// CONCATENATED MODULE: ./node_modules/cargo-messages/lib/index.mjs
|
|
13238
13508
|
|
|
13239
13509
|
|
|
13240
|
-
const lib_require = (0,external_node_module_namespaceObject.createRequire)(import.meta.url);
|
|
13241
|
-
|
|
13242
|
-
const { CargoMessages } = lib_require('./index.cjs');
|
|
13243
|
-
|
|
13244
13510
|
|
|
13245
13511
|
|
|
13246
13512
|
;// CONCATENATED MODULE: ./src/commands/dist.ts
|
|
@@ -13305,7 +13571,7 @@ class Dist {
|
|
|
13305
13571
|
this._out = options.out;
|
|
13306
13572
|
}
|
|
13307
13573
|
findArtifact() {
|
|
13308
|
-
const messages = new CargoMessages({
|
|
13574
|
+
const messages = new lib.CargoMessages({
|
|
13309
13575
|
mount: this._mount || undefined,
|
|
13310
13576
|
manifestPath: this._manifestPath || undefined,
|
|
13311
13577
|
file: this._log || undefined
|