@neon-rs/cli 0.0.57 → 0.0.58
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 +10 -159
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -10101,121 +10101,10 @@ function wrappy (fn, cb) {
|
|
|
10101
10101
|
|
|
10102
10102
|
/***/ }),
|
|
10103
10103
|
|
|
10104
|
-
/***/
|
|
10105
|
-
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
|
|
10106
|
-
|
|
10107
|
-
|
|
10108
|
-
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
10109
|
-
exports.bin = exports.custom = exports.scope = exports.currentTarget = void 0;
|
|
10110
|
-
const node_module_1 = __nccwpck_require__(2033);
|
|
10111
|
-
function currentTarget() {
|
|
10112
|
-
let os = null;
|
|
10113
|
-
switch (process.platform) {
|
|
10114
|
-
case 'android':
|
|
10115
|
-
switch (process.arch) {
|
|
10116
|
-
case 'arm':
|
|
10117
|
-
return 'android-arm-eabi';
|
|
10118
|
-
case 'arm64':
|
|
10119
|
-
return 'android-arm64';
|
|
10120
|
-
}
|
|
10121
|
-
os = 'Android';
|
|
10122
|
-
break;
|
|
10123
|
-
case 'win32':
|
|
10124
|
-
switch (process.arch) {
|
|
10125
|
-
case 'x64':
|
|
10126
|
-
return 'win32-x64-msvc';
|
|
10127
|
-
case 'arm64':
|
|
10128
|
-
return 'win32-arm64-msvc';
|
|
10129
|
-
case 'ia32':
|
|
10130
|
-
return 'win32-ia32-msvc';
|
|
10131
|
-
}
|
|
10132
|
-
os = 'Windows';
|
|
10133
|
-
break;
|
|
10134
|
-
case 'darwin':
|
|
10135
|
-
switch (process.arch) {
|
|
10136
|
-
case 'x64':
|
|
10137
|
-
return 'darwin-x64';
|
|
10138
|
-
case 'arm64':
|
|
10139
|
-
return 'darwin-arm64';
|
|
10140
|
-
}
|
|
10141
|
-
os = 'macOS';
|
|
10142
|
-
break;
|
|
10143
|
-
case 'linux':
|
|
10144
|
-
switch (process.arch) {
|
|
10145
|
-
case 'x64':
|
|
10146
|
-
case 'arm64':
|
|
10147
|
-
return isGlibc()
|
|
10148
|
-
? `linux-${process.arch}-gnu`
|
|
10149
|
-
: `linux-${process.arch}-musl`;
|
|
10150
|
-
case 'arm':
|
|
10151
|
-
return 'linux-arm-gnueabihf';
|
|
10152
|
-
}
|
|
10153
|
-
os = 'Linux';
|
|
10154
|
-
break;
|
|
10155
|
-
case 'freebsd':
|
|
10156
|
-
if (process.arch === 'x64') {
|
|
10157
|
-
return 'freebsd-x64';
|
|
10158
|
-
}
|
|
10159
|
-
os = 'FreeBSD';
|
|
10160
|
-
break;
|
|
10161
|
-
}
|
|
10162
|
-
if (os) {
|
|
10163
|
-
throw new Error(`Neon: unsupported ${os} architecture: ${process.arch}`);
|
|
10164
|
-
}
|
|
10165
|
-
throw new Error(`Neon: unsupported system: ${process.platform}`);
|
|
10166
|
-
}
|
|
10167
|
-
exports.currentTarget = currentTarget;
|
|
10168
|
-
function isGlibc() {
|
|
10169
|
-
// Cast to unknown to work around a bug in the type definition:
|
|
10170
|
-
// https://github.com/DefinitelyTyped/DefinitelyTyped/issues/40140
|
|
10171
|
-
const report = process.report?.getReport();
|
|
10172
|
-
if ((typeof report !== 'object') || !report || (!('header' in report))) {
|
|
10173
|
-
return false;
|
|
10174
|
-
}
|
|
10175
|
-
const header = report.header;
|
|
10176
|
-
return (typeof header === 'object') &&
|
|
10177
|
-
!!header &&
|
|
10178
|
-
('glibcVersionRuntime' in header);
|
|
10179
|
-
}
|
|
10180
|
-
// export function debug(...components: string[]) {
|
|
10181
|
-
// if (components.length === 0 || !components[components.length - 1].endsWith(".node")) {
|
|
10182
|
-
// components.push("index.node");
|
|
10183
|
-
// }
|
|
10184
|
-
// const pathSpec = path.join(...components);
|
|
10185
|
-
// return fs.existsSync(pathSpec) ? require(pathSpec) : null;
|
|
10186
|
-
// }
|
|
10187
|
-
const requireAbsolute = (0, node_module_1.createRequire)(process.cwd());
|
|
10188
|
-
function scope(scope) {
|
|
10189
|
-
return requireAbsolute(scope + "/" + currentTarget());
|
|
10190
|
-
}
|
|
10191
|
-
exports.scope = scope;
|
|
10192
|
-
function custom(toRequireSpec) {
|
|
10193
|
-
return requireAbsolute(toRequireSpec(currentTarget()));
|
|
10194
|
-
}
|
|
10195
|
-
exports.custom = custom;
|
|
10196
|
-
function* interleave(a1, a2) {
|
|
10197
|
-
const length = Math.max(a1.length, a2.length);
|
|
10198
|
-
for (let i = 0; i < length; i++) {
|
|
10199
|
-
if (i < a1.length) {
|
|
10200
|
-
yield a1[i];
|
|
10201
|
-
}
|
|
10202
|
-
if (i < a2.length) {
|
|
10203
|
-
yield a2[i];
|
|
10204
|
-
}
|
|
10205
|
-
}
|
|
10206
|
-
}
|
|
10207
|
-
function bin(scope, ...rest) {
|
|
10208
|
-
return [...interleave(scope, rest)].join("") + "/" + currentTarget();
|
|
10209
|
-
}
|
|
10210
|
-
exports.bin = bin;
|
|
10211
|
-
|
|
10212
|
-
|
|
10213
|
-
/***/ }),
|
|
10214
|
-
|
|
10215
|
-
/***/ 3659:
|
|
10104
|
+
/***/ 6604:
|
|
10216
10105
|
/***/ ((module) => {
|
|
10217
10106
|
|
|
10218
|
-
module.exports = eval("require")("
|
|
10107
|
+
module.exports = eval("require")("./load.cjs");
|
|
10219
10108
|
|
|
10220
10109
|
|
|
10221
10110
|
/***/ }),
|
|
@@ -10262,13 +10151,6 @@ module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("fs");
|
|
|
10262
10151
|
|
|
10263
10152
|
/***/ }),
|
|
10264
10153
|
|
|
10265
|
-
/***/ 2033:
|
|
10266
|
-
/***/ ((module) => {
|
|
10267
|
-
|
|
10268
|
-
module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:module");
|
|
10269
|
-
|
|
10270
|
-
/***/ }),
|
|
10271
|
-
|
|
10272
10154
|
/***/ 2037:
|
|
10273
10155
|
/***/ ((module) => {
|
|
10274
10156
|
|
|
@@ -10307,43 +10189,12 @@ module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("util");
|
|
|
10307
10189
|
/***/ 430:
|
|
10308
10190
|
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
10309
10191
|
|
|
10310
|
-
const { currentTarget } = __nccwpck_require__(1401);
|
|
10311
|
-
|
|
10312
|
-
/*
|
|
10313
|
-
const TABLE = {
|
|
10314
|
-
'darwin-x64': () => require('@cargo-messages/darwin-x64'),
|
|
10315
|
-
'win32-x64-msvc': () => require('@cargo-messages/win32-x64-msvc'),
|
|
10316
|
-
'aarch64-pc-windows-msvc': () => require('@cargo-messages/win32-arm64-msvc'),
|
|
10317
|
-
'darwin-x64': () => require('@cargo-messages/darwin-x64'),
|
|
10318
|
-
'darwin-arm64': () => require('@cargo-messages/darwin-arm64'),
|
|
10319
|
-
'linux-x64-gnu': () => require('@cargo-messages/linux-x64-gnu'),
|
|
10320
|
-
'linux-arm-gnueabihf': () => require('@cargo-messages/linux-arm-gnueabihf'),
|
|
10321
|
-
'android-arm-eabi': () => require('@cargo-messages/android-arm-eabi')
|
|
10322
|
-
};
|
|
10323
|
-
*/
|
|
10324
|
-
|
|
10325
|
-
let saved = null;
|
|
10326
|
-
|
|
10327
|
-
function addon() {
|
|
10328
|
-
if (saved) {
|
|
10329
|
-
return saved;
|
|
10330
|
-
}
|
|
10331
|
-
const target = currentTarget();
|
|
10332
|
-
switch (target) {
|
|
10333
|
-
case 'darwin-x64': saved = __nccwpck_require__(3659); break;
|
|
10334
|
-
default: throw new Error(`no binary @cargo-messages module found for ${target}`);
|
|
10335
|
-
}
|
|
10336
|
-
return addon();
|
|
10337
|
-
}
|
|
10338
|
-
|
|
10339
|
-
/*
|
|
10340
10192
|
const {
|
|
10341
|
-
findArtifact,
|
|
10342
|
-
findFileByCrateType,
|
|
10343
10193
|
fromFile,
|
|
10344
|
-
fromStdin
|
|
10345
|
-
|
|
10346
|
-
|
|
10194
|
+
fromStdin,
|
|
10195
|
+
findArtifact,
|
|
10196
|
+
findFileByCrateType
|
|
10197
|
+
} = __nccwpck_require__(6604);
|
|
10347
10198
|
|
|
10348
10199
|
const PRIVATE = {};
|
|
10349
10200
|
|
|
@@ -10360,7 +10211,7 @@ class CargoArtifact {
|
|
|
10360
10211
|
}
|
|
10361
10212
|
|
|
10362
10213
|
findFileByCrateType(crateType) {
|
|
10363
|
-
return
|
|
10214
|
+
return findFileByCrateType(this._kernel, crateType);
|
|
10364
10215
|
}
|
|
10365
10216
|
}
|
|
10366
10217
|
|
|
@@ -10370,12 +10221,12 @@ class CargoMessages {
|
|
|
10370
10221
|
this._mount = options.mount || null;
|
|
10371
10222
|
this._manifestPath = options.manifestPath || null;
|
|
10372
10223
|
this._kernel = options.file
|
|
10373
|
-
?
|
|
10374
|
-
:
|
|
10224
|
+
? fromFile(options.file, this._mount, this._manifestPath)
|
|
10225
|
+
: fromStdin(this._mount, this._manifestPath);
|
|
10375
10226
|
}
|
|
10376
10227
|
|
|
10377
10228
|
findArtifact(crateName) {
|
|
10378
|
-
const found =
|
|
10229
|
+
const found = findArtifact(this._kernel, crateName);
|
|
10379
10230
|
return found
|
|
10380
10231
|
? new CargoArtifact(PRIVATE, found)
|
|
10381
10232
|
: null;
|