pxnpm 6.0.11 → 6.0.13
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/dist/pxnpm.cjs +56 -56
- package/package.json +68 -67
package/dist/pxnpm.cjs
CHANGED
|
@@ -6089,7 +6089,7 @@ var require_lib6 = __commonJS({
|
|
|
6089
6089
|
var PnpmError = class extends Error {
|
|
6090
6090
|
constructor(code, message2, opts) {
|
|
6091
6091
|
super(message2);
|
|
6092
|
-
this.code = code.startsWith("
|
|
6092
|
+
this.code = code.startsWith("ERR_PXNPM_") ? code : `ERR_PXNPM_${code}`;
|
|
6093
6093
|
this.hint = opts?.hint;
|
|
6094
6094
|
this.attempts = opts?.attempts;
|
|
6095
6095
|
}
|
|
@@ -10431,7 +10431,7 @@ var require_requirePnpmfile = __commonJS({
|
|
|
10431
10431
|
exports2.BadReadPackageHookError = BadReadPackageHookError;
|
|
10432
10432
|
var PnpmFileFailError = class extends error_1.PnpmError {
|
|
10433
10433
|
constructor(pxnpmfile, originalError) {
|
|
10434
|
-
super("
|
|
10434
|
+
super("PXNPMFILE_FAIL", `Error during pxnpmfile execution. pxnpmfile: "${pxnpmfile}". Error: "${originalError.message}".`);
|
|
10435
10435
|
this.pxnpmfile = pxnpmfile;
|
|
10436
10436
|
this.originalError = originalError;
|
|
10437
10437
|
}
|
|
@@ -16472,7 +16472,7 @@ var require_readFile = __commonJS({
|
|
|
16472
16472
|
};
|
|
16473
16473
|
} catch (err) {
|
|
16474
16474
|
err.message = `${err.message} in ${filePath}`;
|
|
16475
|
-
err["code"] = "
|
|
16475
|
+
err["code"] = "ERR_PXNPM_JSON5_PARSE";
|
|
16476
16476
|
throw err;
|
|
16477
16477
|
}
|
|
16478
16478
|
}
|
|
@@ -16484,7 +16484,7 @@ var require_readFile = __commonJS({
|
|
|
16484
16484
|
text
|
|
16485
16485
|
};
|
|
16486
16486
|
} catch (err) {
|
|
16487
|
-
err["code"] = "
|
|
16487
|
+
err["code"] = "ERR_PXNPM_JSON_PARSE";
|
|
16488
16488
|
throw err;
|
|
16489
16489
|
}
|
|
16490
16490
|
}
|
|
@@ -16522,7 +16522,7 @@ var require_lib17 = __commonJS({
|
|
|
16522
16522
|
try {
|
|
16523
16523
|
return await readProjectManifestOnly(projectDir);
|
|
16524
16524
|
} catch (err) {
|
|
16525
|
-
if (err.code === "
|
|
16525
|
+
if (err.code === "ERR_PXNPM_NO_IMPORTER_MANIFEST_FOUND") {
|
|
16526
16526
|
return null;
|
|
16527
16527
|
}
|
|
16528
16528
|
throw err;
|
|
@@ -16660,7 +16660,7 @@ var require_lib17 = __commonJS({
|
|
|
16660
16660
|
throw err;
|
|
16661
16661
|
err.message = `${err.message}
|
|
16662
16662
|
in ${filePath}`;
|
|
16663
|
-
err.code = "
|
|
16663
|
+
err.code = "ERR_PXNPM_YAML_PARSE";
|
|
16664
16664
|
throw err;
|
|
16665
16665
|
}
|
|
16666
16666
|
}
|
|
@@ -19228,7 +19228,7 @@ var require_checkGlobalBinDir = __commonJS({
|
|
|
19228
19228
|
throw new error_1.PnpmError("GLOBAL_BIN_DIR_NOT_IN_PATH", `The configured global bin directory "${globalBinDir}" is not in PATH`);
|
|
19229
19229
|
}
|
|
19230
19230
|
if (shouldAllowWrite && !canWriteToDirAndExists(globalBinDir)) {
|
|
19231
|
-
throw new error_1.PnpmError("
|
|
19231
|
+
throw new error_1.PnpmError("PXNPM_DIR_NOT_WRITABLE", `The CLI has no write access to the pxnpm home directory at ${globalBinDir}`);
|
|
19232
19232
|
}
|
|
19233
19233
|
}
|
|
19234
19234
|
async function globalBinDirIsInPath(globalBinDir, env) {
|
|
@@ -19332,8 +19332,8 @@ var require_dirs = __commonJS({
|
|
|
19332
19332
|
return path_1.default.join(os_1.default.homedir(), ".pxnpm-state");
|
|
19333
19333
|
}
|
|
19334
19334
|
function getDataDir(opts) {
|
|
19335
|
-
if (opts.env.
|
|
19336
|
-
return opts.env.
|
|
19335
|
+
if (opts.env.PXNPM_HOME) {
|
|
19336
|
+
return opts.env.PXNPM_HOME;
|
|
19337
19337
|
}
|
|
19338
19338
|
if (opts.env.XDG_DATA_HOME) {
|
|
19339
19339
|
return path_1.default.join(opts.env.XDG_DATA_HOME, "pxnpm");
|
|
@@ -21062,7 +21062,7 @@ var require_lib23 = __commonJS({
|
|
|
21062
21062
|
globalDirRoot = path_1.default.join(pxnpmConfig.pxnpmHomeDir, "global");
|
|
21063
21063
|
}
|
|
21064
21064
|
pxnpmConfig.dir = path_1.default.join(globalDirRoot, constants_1.LAYOUT_VERSION.toString());
|
|
21065
|
-
pxnpmConfig.bin = npmConfig.get("global-bin-dir") ?? env.
|
|
21065
|
+
pxnpmConfig.bin = npmConfig.get("global-bin-dir") ?? env.PXNPM_HOME;
|
|
21066
21066
|
if (pxnpmConfig.bin) {
|
|
21067
21067
|
fs_1.default.mkdirSync(pxnpmConfig.bin, { recursive: true });
|
|
21068
21068
|
await (0, checkGlobalBinDir_1.checkGlobalBinDir)(pxnpmConfig.bin, { env, shouldAllowWrite: opts.globalDirShouldAllowWrite });
|
|
@@ -39243,43 +39243,43 @@ ${errorInfo.body}`;
|
|
|
39243
39243
|
if ("err" in logObj && logObj.err) {
|
|
39244
39244
|
const err = logObj.err;
|
|
39245
39245
|
switch (err.code) {
|
|
39246
|
-
case "
|
|
39246
|
+
case "ERR_PXNPM_UNEXPECTED_STORE":
|
|
39247
39247
|
return reportUnexpectedStore(err, logObj);
|
|
39248
|
-
case "
|
|
39248
|
+
case "ERR_PXNPM_UNEXPECTED_VIRTUAL_STORE":
|
|
39249
39249
|
return reportUnexpectedVirtualStoreDir(err, logObj);
|
|
39250
|
-
case "
|
|
39250
|
+
case "ERR_PXNPM_STORE_BREAKING_CHANGE":
|
|
39251
39251
|
return reportStoreBreakingChange(logObj);
|
|
39252
|
-
case "
|
|
39252
|
+
case "ERR_PXNPM_MODULES_BREAKING_CHANGE":
|
|
39253
39253
|
return reportModulesBreakingChange(logObj);
|
|
39254
|
-
case "
|
|
39254
|
+
case "ERR_PXNPM_MODIFIED_DEPENDENCY":
|
|
39255
39255
|
return reportModifiedDependency(logObj);
|
|
39256
|
-
case "
|
|
39256
|
+
case "ERR_PXNPM_LOCKFILE_BREAKING_CHANGE":
|
|
39257
39257
|
return reportLockfileBreakingChange(err, logObj);
|
|
39258
|
-
case "
|
|
39258
|
+
case "ERR_PXNPM_RECURSIVE_RUN_NO_SCRIPT":
|
|
39259
39259
|
return { title: err.message };
|
|
39260
|
-
case "
|
|
39260
|
+
case "ERR_PXNPM_MISSING_TIME":
|
|
39261
39261
|
return { title: err.message, body: 'If you cannot fix this registry issue, then set "resolution-mode" to "highest".' };
|
|
39262
|
-
case "
|
|
39262
|
+
case "ERR_PXNPM_NO_MATCHING_VERSION":
|
|
39263
39263
|
return formatNoMatchingVersion(err, logObj);
|
|
39264
|
-
case "
|
|
39264
|
+
case "ERR_PXNPM_RECURSIVE_FAIL":
|
|
39265
39265
|
return formatRecursiveCommandSummary(logObj);
|
|
39266
|
-
case "
|
|
39266
|
+
case "ERR_PXNPM_BAD_TARBALL_SIZE":
|
|
39267
39267
|
return reportBadTarballSize(err, logObj);
|
|
39268
39268
|
case "ELIFECYCLE":
|
|
39269
39269
|
return reportLifecycleError(logObj);
|
|
39270
|
-
case "
|
|
39270
|
+
case "ERR_PXNPM_UNSUPPORTED_ENGINE":
|
|
39271
39271
|
return reportEngineError(logObj);
|
|
39272
|
-
case "
|
|
39272
|
+
case "ERR_PXNPM_PEER_DEP_ISSUES":
|
|
39273
39273
|
return reportPeerDependencyIssuesError(err, logObj, peerDependencyRules);
|
|
39274
|
-
case "
|
|
39274
|
+
case "ERR_PXNPM_DEDUPE_CHECK_ISSUES":
|
|
39275
39275
|
return reportDedupeCheckIssuesError(err, logObj);
|
|
39276
|
-
case "
|
|
39276
|
+
case "ERR_PXNPM_SPEC_NOT_SUPPORTED_BY_ANY_RESOLVER":
|
|
39277
39277
|
return reportSpecNotSupportedByAnyResolverError(err, logObj);
|
|
39278
|
-
case "
|
|
39279
|
-
case "
|
|
39278
|
+
case "ERR_PXNPM_FETCH_401":
|
|
39279
|
+
case "ERR_PXNPM_FETCH_403":
|
|
39280
39280
|
return reportAuthError(err, logObj, config);
|
|
39281
39281
|
default: {
|
|
39282
|
-
if (!err.code?.startsWith?.("
|
|
39282
|
+
if (!err.code?.startsWith?.("ERR_PXNPM_")) {
|
|
39283
39283
|
return formatGenericError(err.message ?? logObj.message, err.stack);
|
|
39284
39284
|
}
|
|
39285
39285
|
return {
|
|
@@ -41490,7 +41490,7 @@ ${updateMessage}`, {
|
|
|
41490
41490
|
if ((0, cli_meta_1.isExecutedByCorepack)(opts.env)) {
|
|
41491
41491
|
return `corepack install -g pxnpm@${opts.latestVersion}`;
|
|
41492
41492
|
}
|
|
41493
|
-
if (opts.env.
|
|
41493
|
+
if (opts.env.PXNPM_HOME) {
|
|
41494
41494
|
return "pxnpm self-update";
|
|
41495
41495
|
}
|
|
41496
41496
|
const pkgName = opts.currentPkgIsExecutable ? "@pxnpm/exe" : "pxnpm";
|
|
@@ -42631,7 +42631,7 @@ var require_lib33 = __commonJS({
|
|
|
42631
42631
|
version: pkg.version
|
|
42632
42632
|
},
|
|
42633
42633
|
prefix: options.lockfileDir,
|
|
42634
|
-
reason: warn.code === "
|
|
42634
|
+
reason: warn.code === "ERR_PXNPM_UNSUPPORTED_ENGINE" ? "unsupported_engine" : "unsupported_platform"
|
|
42635
42635
|
});
|
|
42636
42636
|
return false;
|
|
42637
42637
|
}
|
|
@@ -55127,7 +55127,7 @@ var require_pickPackageFromMeta = __commonJS({
|
|
|
55127
55127
|
}
|
|
55128
55128
|
return manifest;
|
|
55129
55129
|
} catch (err) {
|
|
55130
|
-
if (util_1.default.types.isNativeError(err) && "code" in err && typeof err.code === "string" && err.code.startsWith("
|
|
55130
|
+
if (util_1.default.types.isNativeError(err) && "code" in err && typeof err.code === "string" && err.code.startsWith("ERR_PXNPM_")) {
|
|
55131
55131
|
throw err;
|
|
55132
55132
|
}
|
|
55133
55133
|
throw new error_1.PnpmError("MALFORMED_METADATA", `Received malformed metadata for "${spec.name}"`, { hint: "This might mean that the package was unpublished from the registry" });
|
|
@@ -69509,7 +69509,7 @@ var require_lib54 = __commonJS({
|
|
|
69509
69509
|
var PnpmError = class extends Error {
|
|
69510
69510
|
constructor(code, message2, opts) {
|
|
69511
69511
|
super(message2);
|
|
69512
|
-
this.code = code.startsWith("
|
|
69512
|
+
this.code = code.startsWith("ERR_PXNPM_") ? code : `ERR_PXNPM_${code}`;
|
|
69513
69513
|
this.hint = opts?.hint;
|
|
69514
69514
|
this.attempts = opts?.attempts;
|
|
69515
69515
|
}
|
|
@@ -79290,7 +79290,7 @@ var require_lib61 = __commonJS({
|
|
|
79290
79290
|
await global.finishWorkers?.();
|
|
79291
79291
|
}
|
|
79292
79292
|
function createTarballWorkerPool() {
|
|
79293
|
-
const maxWorkers = Math.max(2, (os_1.default.availableParallelism?.() ?? os_1.default.cpus().length) - Math.abs(process.env.
|
|
79293
|
+
const maxWorkers = Math.max(2, (os_1.default.availableParallelism?.() ?? os_1.default.cpus().length) - Math.abs(process.env.PXNPM_WORKERS ? parseInt(process.env.PXNPM_WORKERS) : 0)) - 1;
|
|
79294
79294
|
const workerPool2 = new WorkerPool_1.WorkerPool({
|
|
79295
79295
|
id: "pxnpm",
|
|
79296
79296
|
maxWorkers,
|
|
@@ -79720,7 +79720,7 @@ var require_remoteTarballFetcher = __commonJS({
|
|
|
79720
79720
|
try {
|
|
79721
79721
|
resolve(await fetch(attempt));
|
|
79722
79722
|
} catch (error) {
|
|
79723
|
-
if (error.response?.status === 401 || error.response?.status === 403 || error.response?.status === 404 || error.code === "
|
|
79723
|
+
if (error.response?.status === 401 || error.response?.status === 403 || error.response?.status === 404 || error.code === "ERR_PXNPM_PREPARE_PKG_FAILURE") {
|
|
79724
79724
|
reject(error);
|
|
79725
79725
|
return;
|
|
79726
79726
|
}
|
|
@@ -102504,7 +102504,7 @@ var require_runLifecycleHook = __commonJS({
|
|
|
102504
102504
|
async function runLifecycleHook(stage, manifest, opts) {
|
|
102505
102505
|
const optional = opts.optional === true;
|
|
102506
102506
|
if (opts.scriptShell != null && isWindowsBatchFile(opts.scriptShell)) {
|
|
102507
|
-
throw new error_1.PnpmError("
|
|
102507
|
+
throw new error_1.PnpmError("ERR_PXNPM_INVALID_SCRIPT_SHELL_WINDOWS", "Cannot spawn .bat or .cmd as a script shell.", {
|
|
102508
102508
|
hint: `The .npmrc script-shell option was configured to a .bat or .cmd file. These cannot be used as a script shell reliably.
|
|
102509
102509
|
|
|
102510
102510
|
Please unset the script-shell option, or configure it to a .exe instead.
|
|
@@ -102558,7 +102558,7 @@ Please unset the script-shell option, or configure it to a .exe instead.
|
|
|
102558
102558
|
extraEnv: {
|
|
102559
102559
|
...opts.extraEnv,
|
|
102560
102560
|
INIT_CWD: opts.initCwd ?? process.cwd(),
|
|
102561
|
-
|
|
102561
|
+
PXNPM_SCRIPT_SRC_DIR: opts.pkgRoot
|
|
102562
102562
|
},
|
|
102563
102563
|
log: {
|
|
102564
102564
|
clearProgress: noop,
|
|
@@ -104700,7 +104700,7 @@ var require_lib79 = __commonJS({
|
|
|
104700
104700
|
} catch (err) {
|
|
104701
104701
|
(0, assert_1.default)(util_1.default.types.isNativeError(err));
|
|
104702
104702
|
Object.assign(err, {
|
|
104703
|
-
code: "
|
|
104703
|
+
code: "ERR_PXNPM_PREPARE_PACKAGE"
|
|
104704
104704
|
});
|
|
104705
104705
|
throw err;
|
|
104706
104706
|
}
|
|
@@ -111056,7 +111056,7 @@ var require_lib82 = __commonJS({
|
|
|
111056
111056
|
function getStorePath({ pkgRoot, storePath, pxnpmHomeDir }) {
|
|
111057
111057
|
if (!storePath) {
|
|
111058
111058
|
if (!pxnpmHomeDir) {
|
|
111059
|
-
throw new error_1.PnpmError("
|
|
111059
|
+
throw new error_1.PnpmError("NO_PXNPM_HOME_DIR", "The pxnpm home directory is unknown. Cannot calculate the store directory location.");
|
|
111060
111060
|
}
|
|
111061
111061
|
return storePathRelativeToHome(pkgRoot, "store", pxnpmHomeDir);
|
|
111062
111062
|
}
|
|
@@ -114006,7 +114006,7 @@ var require_lib86 = __commonJS({
|
|
|
114006
114006
|
case "ENOTDIR": {
|
|
114007
114007
|
throw new error_1.PnpmError("NOT_PACKAGE_DIRECTORY", `Could not install from "${spec.fetchSpec}" as it is not a directory.`);
|
|
114008
114008
|
}
|
|
114009
|
-
case "
|
|
114009
|
+
case "ERR_PXNPM_NO_IMPORTER_MANIFEST_FOUND":
|
|
114010
114010
|
case "ENOENT": {
|
|
114011
114011
|
localDependencyManifest = {
|
|
114012
114012
|
name: path_1.default.basename(spec.fetchSpec),
|
|
@@ -145707,7 +145707,7 @@ var require_lib148 = __commonJS({
|
|
|
145707
145707
|
try {
|
|
145708
145708
|
return await (0, read_project_manifest_1.readProjectManifestOnly)(packageDir);
|
|
145709
145709
|
} catch (err) {
|
|
145710
|
-
if (err["code"] !== "
|
|
145710
|
+
if (err["code"] !== "ERR_PXNPM_NO_IMPORTER_MANIFEST_FOUND")
|
|
145711
145711
|
throw err;
|
|
145712
145712
|
return { name: alias, version: "0.0.0" };
|
|
145713
145713
|
}
|
|
@@ -184572,8 +184572,8 @@ var require_install = __commonJS({
|
|
|
184572
184572
|
}
|
|
184573
184573
|
};
|
|
184574
184574
|
var BROKEN_LOCKFILE_INTEGRITY_ERRORS = /* @__PURE__ */ new Set([
|
|
184575
|
-
"
|
|
184576
|
-
"
|
|
184575
|
+
"ERR_PXNPM_UNEXPECTED_PKG_CONTENT_IN_STORE",
|
|
184576
|
+
"ERR_PXNPM_TARBALL_INTEGRITY"
|
|
184577
184577
|
]);
|
|
184578
184578
|
var DEV_PREINSTALL = "pxnpm:devPreinstall";
|
|
184579
184579
|
async function install(manifest, opts) {
|
|
@@ -184829,7 +184829,7 @@ Note that in CI environments, this setting is enabled by default.`
|
|
|
184829
184829
|
stats
|
|
184830
184830
|
};
|
|
184831
184831
|
} catch (error) {
|
|
184832
|
-
if (frozenLockfile || error.code !== "
|
|
184832
|
+
if (frozenLockfile || error.code !== "ERR_PXNPM_LOCKFILE_MISSING_DEPENDENCY" && !BROKEN_LOCKFILE_INTEGRITY_ERRORS.has(error.code) || !ctx.existsNonEmptyWantedLockfile && !ctx.existsCurrentLockfile)
|
|
184833
184833
|
throw error;
|
|
184834
184834
|
if (BROKEN_LOCKFILE_INTEGRITY_ERRORS.has(error.code)) {
|
|
184835
184835
|
needsFullResolution = true;
|
|
@@ -186801,7 +186801,7 @@ var require_add = __commonJS({
|
|
|
186801
186801
|
}
|
|
186802
186802
|
if (opts.global && !opts.bin) {
|
|
186803
186803
|
throw new error_1.PnpmError("NO_GLOBAL_BIN_DIR", "Unable to find the global bin directory", {
|
|
186804
|
-
hint: 'Run "pxnpm setup" to create it automatically, or set the global-bin-dir setting, or the
|
|
186804
|
+
hint: 'Run "pxnpm setup" to create it automatically, or set the global-bin-dir setting, or the PXNPM_HOME env variable. The global bin directory should be in the PATH.'
|
|
186805
186805
|
});
|
|
186806
186806
|
}
|
|
186807
186807
|
const include = {
|
|
@@ -187523,7 +187523,7 @@ This might cause issues in your project. To resolve this, you may use the "file:
|
|
|
187523
187523
|
});
|
|
187524
187524
|
if (opts.cliOptions?.global && !opts.bin) {
|
|
187525
187525
|
throw new error_1.PnpmError("NO_GLOBAL_BIN_DIR", "Unable to find the global bin directory", {
|
|
187526
|
-
hint: 'Run "pxnpm setup" to create it automatically, or set the global-bin-dir setting, or the
|
|
187526
|
+
hint: 'Run "pxnpm setup" to create it automatically, or set the global-bin-dir setting, or the PXNPM_HOME env variable. The global bin directory should be in the PATH.'
|
|
187527
187527
|
});
|
|
187528
187528
|
}
|
|
187529
187529
|
const linkCwdDir = opts.cliOptions?.dir && opts.cliOptions?.global ? path_1.default.resolve(opts.cliOptions.dir) : cwd;
|
|
@@ -208378,7 +208378,7 @@ var require_selfUpdate = __commonJS({
|
|
|
208378
208378
|
registry: (0, pick_registry_for_package_1.pickRegistryForPackage)(opts.registries, pkgName, pref)
|
|
208379
208379
|
});
|
|
208380
208380
|
if (!resolution?.manifest) {
|
|
208381
|
-
throw new error_1.PnpmError("
|
|
208381
|
+
throw new error_1.PnpmError("CANNOT_RESOLVE_PXNPM", `Cannot find "${pref}" version of pxnpm`);
|
|
208382
208382
|
}
|
|
208383
208383
|
if (resolution.manifest.version === cli_meta_1.packageManager.version) {
|
|
208384
208384
|
return `The currently active ${cli_meta_1.packageManager.name} v${cli_meta_1.packageManager.version} is already "${pref}" and doesn't need an update`;
|
|
@@ -213701,7 +213701,7 @@ var require_runRecursive = __commonJS({
|
|
|
213701
213701
|
}).flat();
|
|
213702
213702
|
await Promise.all(selectedScripts.map(async ({ prefix, scriptName: scriptName2 }) => limitRun(async () => {
|
|
213703
213703
|
const pkg = opts.selectedProjectsGraph[prefix];
|
|
213704
|
-
if (!pkg.package.manifest.scripts?.[scriptName2] || process.env.npm_lifecycle_event === scriptName2 && process.env.
|
|
213704
|
+
if (!pkg.package.manifest.scripts?.[scriptName2] || process.env.npm_lifecycle_event === scriptName2 && process.env.PXNPM_SCRIPT_SRC_DIR === prefix) {
|
|
213705
213705
|
return;
|
|
213706
213706
|
}
|
|
213707
213707
|
result2[prefix].status = "running";
|
|
@@ -213758,7 +213758,7 @@ var require_runRecursive = __commonJS({
|
|
|
213758
213758
|
return;
|
|
213759
213759
|
}
|
|
213760
213760
|
Object.assign(err, {
|
|
213761
|
-
code: "
|
|
213761
|
+
code: "ERR_PXNPM_RECURSIVE_RUN_FIRST_FAIL",
|
|
213762
213762
|
prefix
|
|
213763
213763
|
});
|
|
213764
213764
|
opts.reportSummary && await (0, exec_1.writeRecursiveSummary)({
|
|
@@ -214933,7 +214933,7 @@ var require_exec = __commonJS({
|
|
|
214933
214933
|
const env = (0, makeEnv_1.makeEnv)({
|
|
214934
214934
|
extraEnv: {
|
|
214935
214935
|
...extraEnv,
|
|
214936
|
-
|
|
214936
|
+
PXNPM_PACKAGE_NAME: opts.selectedProjectsGraph[prefix]?.package.manifest.name,
|
|
214937
214937
|
...opts.nodeOptions ? { NODE_OPTIONS: opts.nodeOptions } : {}
|
|
214938
214938
|
},
|
|
214939
214939
|
prependPaths,
|
|
@@ -215006,8 +215006,8 @@ var require_exec = __commonJS({
|
|
|
215006
215006
|
if (!opts.bail) {
|
|
215007
215007
|
return;
|
|
215008
215008
|
}
|
|
215009
|
-
if (!err["code"]?.startsWith("
|
|
215010
|
-
err["code"] = "
|
|
215009
|
+
if (!err["code"]?.startsWith("ERR_PXNPM_")) {
|
|
215010
|
+
err["code"] = "ERR_PXNPM_RECURSIVE_EXEC_FIRST_FAIL";
|
|
215011
215011
|
}
|
|
215012
215012
|
err["prefix"] = prefix;
|
|
215013
215013
|
opts.reportSummary && await writeRecursiveSummary({
|
|
@@ -219980,7 +219980,7 @@ var require_setup = __commonJS({
|
|
|
219980
219980
|
title: "Options",
|
|
219981
219981
|
list: [
|
|
219982
219982
|
{
|
|
219983
|
-
description: "Override the
|
|
219983
|
+
description: "Override the PXNPM_HOME env variable in case it already exists",
|
|
219984
219984
|
name: "--force",
|
|
219985
219985
|
shortAlias: "-f"
|
|
219986
219986
|
}
|
|
@@ -220035,17 +220035,17 @@ var require_setup = __commonJS({
|
|
|
220035
220035
|
try {
|
|
220036
220036
|
const report = await (0, os_env_path_extender_1.addDirToEnvPath)(opts.pxnpmHomeDir, {
|
|
220037
220037
|
configSectionName: "pxnpm",
|
|
220038
|
-
proxyVarName: "
|
|
220038
|
+
proxyVarName: "PXNPM_HOME",
|
|
220039
220039
|
overwrite: opts.force,
|
|
220040
220040
|
position: "start"
|
|
220041
220041
|
});
|
|
220042
220042
|
return renderSetupOutput(report);
|
|
220043
220043
|
} catch (err) {
|
|
220044
220044
|
switch (err.code) {
|
|
220045
|
-
case "
|
|
220045
|
+
case "ERR_PXNPM_BAD_ENV_FOUND":
|
|
220046
220046
|
err.hint = "If you want to override the existing env variable, use the --force option";
|
|
220047
220047
|
break;
|
|
220048
|
-
case "
|
|
220048
|
+
case "ERR_PXNPM_BAD_SHELL_SECTION":
|
|
220049
220049
|
err.hint = "If you want to override the existing configuration section, use the --force option";
|
|
220050
220050
|
break;
|
|
220051
220051
|
}
|
|
@@ -222513,7 +222513,7 @@ var require_silentReporter = __commonJS({
|
|
|
222513
222513
|
streamParser.on("data", (obj) => {
|
|
222514
222514
|
if (obj.level !== "error")
|
|
222515
222515
|
return;
|
|
222516
|
-
if (obj.err?.code?.startsWith("
|
|
222516
|
+
if (obj.err?.code?.startsWith("ERR_PXNPM_"))
|
|
222517
222517
|
return;
|
|
222518
222518
|
console.log(obj["err"]?.message ?? obj["message"]);
|
|
222519
222519
|
if (obj["err"]?.stack) {
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pxnpm",
|
|
3
3
|
"description": "Fast, disk space efficient package manager",
|
|
4
|
-
"version": "6.0.
|
|
4
|
+
"version": "6.0.13",
|
|
5
5
|
"bin": {
|
|
6
6
|
"pxnpm": "bin/pxnpm.cjs",
|
|
7
7
|
"pxnpx": "bin/pxnpx.cjs"
|
|
8
8
|
},
|
|
9
|
-
"main": "bin/
|
|
10
|
-
"unpkg": "dist/
|
|
9
|
+
"main": "bin/pxnpm.cjs",
|
|
10
|
+
"unpkg": "dist/pxnpm.cjs",
|
|
11
11
|
"files": [
|
|
12
12
|
"dist",
|
|
13
13
|
"bin"
|
|
@@ -19,68 +19,68 @@
|
|
|
19
19
|
"node-gyp": "^10.2.0"
|
|
20
20
|
},
|
|
21
21
|
"__devDependencies": {
|
|
22
|
-
"@
|
|
23
|
-
"@
|
|
24
|
-
"@
|
|
25
|
-
"@
|
|
26
|
-
"@
|
|
27
|
-
"@
|
|
28
|
-
"@
|
|
29
|
-
"@
|
|
30
|
-
"@
|
|
31
|
-
"@
|
|
32
|
-
"@
|
|
33
|
-
"@
|
|
34
|
-
"@
|
|
35
|
-
"@
|
|
36
|
-
"@
|
|
37
|
-
"@
|
|
38
|
-
"@
|
|
39
|
-
"@
|
|
40
|
-
"@
|
|
41
|
-
"@
|
|
42
|
-
"@
|
|
43
|
-
"@
|
|
44
|
-
"@
|
|
45
|
-
"@
|
|
46
|
-
"@
|
|
47
|
-
"@
|
|
48
|
-
"@
|
|
49
|
-
"@
|
|
50
|
-
"@
|
|
51
|
-
"@
|
|
52
|
-
"@
|
|
53
|
-
"@
|
|
54
|
-
"@
|
|
55
|
-
"@
|
|
56
|
-
"@
|
|
57
|
-
"@
|
|
58
|
-
"@
|
|
59
|
-
"@
|
|
60
|
-
"@
|
|
61
|
-
"@
|
|
62
|
-
"@
|
|
63
|
-
"@
|
|
64
|
-
"@
|
|
65
|
-
"@
|
|
66
|
-
"@
|
|
67
|
-
"@
|
|
68
|
-
"@
|
|
69
|
-
"@
|
|
70
|
-
"@
|
|
71
|
-
"@
|
|
72
|
-
"@
|
|
73
|
-
"@
|
|
74
|
-
"@
|
|
75
|
-
"@
|
|
76
|
-
"@
|
|
77
|
-
"@
|
|
78
|
-
"@
|
|
79
|
-
"@
|
|
80
|
-
"@
|
|
22
|
+
"@pxnpm/assert-project": "workspace:*",
|
|
23
|
+
"@pxnpm/byline": "catalog:",
|
|
24
|
+
"@pxnpm/cache.commands": "workspace:*",
|
|
25
|
+
"@pxnpm/cli-meta": "workspace:*",
|
|
26
|
+
"@pxnpm/cli-utils": "workspace:*",
|
|
27
|
+
"@pxnpm/client": "workspace:*",
|
|
28
|
+
"@pxnpm/command": "workspace:*",
|
|
29
|
+
"@pxnpm/common-cli-options-help": "workspace:*",
|
|
30
|
+
"@pxnpm/config": "workspace:*",
|
|
31
|
+
"@pxnpm/constants": "workspace:*",
|
|
32
|
+
"@pxnpm/core-loggers": "workspace:*",
|
|
33
|
+
"@pxnpm/crypto.base32-hash": "workspace:*",
|
|
34
|
+
"@pxnpm/default-reporter": "workspace:*",
|
|
35
|
+
"@pxnpm/dependency-path": "workspace:*",
|
|
36
|
+
"@pxnpm/env.path": "workspace:*",
|
|
37
|
+
"@pxnpm/error": "workspace:*",
|
|
38
|
+
"@pxnpm/filter-workspace-packages": "workspace:*",
|
|
39
|
+
"@pxnpm/find-workspace-dir": "workspace:*",
|
|
40
|
+
"@pxnpm/lockfile.types": "workspace:*",
|
|
41
|
+
"@pxnpm/logger": "workspace:*",
|
|
42
|
+
"@pxnpm/modules-yaml": "workspace:*",
|
|
43
|
+
"@pxnpm/nopt": "catalog:",
|
|
44
|
+
"@pxnpm/parse-cli-args": "workspace:*",
|
|
45
|
+
"@pxnpm/pick-registry-for-package": "workspace:*",
|
|
46
|
+
"@pxnpm/plugin-commands-audit": "workspace:*",
|
|
47
|
+
"@pxnpm/plugin-commands-completion": "workspace:*",
|
|
48
|
+
"@pxnpm/plugin-commands-config": "workspace:*",
|
|
49
|
+
"@pxnpm/plugin-commands-deploy": "workspace:*",
|
|
50
|
+
"@pxnpm/plugin-commands-doctor": "workspace:*",
|
|
51
|
+
"@pxnpm/plugin-commands-env": "workspace:*",
|
|
52
|
+
"@pxnpm/plugin-commands-init": "workspace:*",
|
|
53
|
+
"@pxnpm/plugin-commands-installation": "workspace:*",
|
|
54
|
+
"@pxnpm/plugin-commands-licenses": "workspace:*",
|
|
55
|
+
"@pxnpm/plugin-commands-listing": "workspace:*",
|
|
56
|
+
"@pxnpm/plugin-commands-outdated": "workspace:*",
|
|
57
|
+
"@pxnpm/plugin-commands-patching": "workspace:*",
|
|
58
|
+
"@pxnpm/plugin-commands-publishing": "workspace:*",
|
|
59
|
+
"@pxnpm/plugin-commands-rebuild": "workspace:*",
|
|
60
|
+
"@pxnpm/plugin-commands-script-runners": "workspace:*",
|
|
61
|
+
"@pxnpm/plugin-commands-server": "workspace:*",
|
|
62
|
+
"@pxnpm/plugin-commands-setup": "workspace:*",
|
|
63
|
+
"@pxnpm/plugin-commands-store": "workspace:*",
|
|
64
|
+
"@pxnpm/plugin-commands-store-inspecting": "workspace:*",
|
|
65
|
+
"@pxnpm/prepare": "workspace:*",
|
|
66
|
+
"@pxnpm/read-package-json": "workspace:*",
|
|
67
|
+
"@pxnpm/read-project-manifest": "workspace:*",
|
|
68
|
+
"@pxnpm/registry-mock": "catalog:",
|
|
69
|
+
"@pxnpm/run-npm": "workspace:*",
|
|
70
|
+
"@pxnpm/store.cafs": "workspace:*",
|
|
71
|
+
"@pxnpm/tabtab": "catalog:",
|
|
72
|
+
"@pxnpm/test-fixtures": "workspace:*",
|
|
73
|
+
"@pxnpm/test-ipc-server": "workspace:*",
|
|
74
|
+
"@pxnpm/tools.path": "workspace:*",
|
|
75
|
+
"@pxnpm/tools.plugin-commands-self-updater": "workspace:*",
|
|
76
|
+
"@pxnpm/types": "workspace:*",
|
|
77
|
+
"@pxnpm/worker": "workspace:*",
|
|
78
|
+
"@pxnpm/workspace.find-packages": "workspace:*",
|
|
79
|
+
"@pxnpm/workspace.pkgs-graph": "workspace:*",
|
|
80
|
+
"@pxnpm/write-project-manifest": "workspace:*",
|
|
81
81
|
"@types/cross-spawn": "catalog:",
|
|
82
82
|
"@types/is-windows": "catalog:",
|
|
83
|
-
"@types/
|
|
83
|
+
"@types/pxnpm__byline": "catalog:",
|
|
84
84
|
"@types/ramda": "catalog:",
|
|
85
85
|
"@types/semver": "catalog:",
|
|
86
86
|
"@types/which": "catalog:",
|
|
@@ -131,10 +131,11 @@
|
|
|
131
131
|
"bundle": "ts-node bundle.ts",
|
|
132
132
|
"start": "tsc --watch",
|
|
133
133
|
"lint": "eslint \"src/**/*.ts\" \"test/**/*.ts\"",
|
|
134
|
-
"pretest:e2e": "rimraf node_modules/.bin/
|
|
135
|
-
"_test": "cross-env
|
|
136
|
-
"test": "
|
|
134
|
+
"pretest:e2e": "rimraf node_modules/.bin/pxnpm",
|
|
135
|
+
"_test": "cross-env PXNPM_REGISTRY_MOCK_PORT=7777 jest",
|
|
136
|
+
"test": "pxnpm run compile && pxnpm run _test",
|
|
137
137
|
"_compile": "tsc --build",
|
|
138
|
-
"compile": "tsc --build &&
|
|
138
|
+
"compile": "tsc --build && pxnpm run lint --fix && rimraf dist bin/nodes && pxnpm run bundle && shx cp -r node-gyp-bin dist/node-gyp-bin && shx cp -r node_modules/@pxnpm/tabtab/lib/templates dist/templates && shx cp -r node_modules/ps-list/vendor dist/vendor && shx cp pxnpmrc dist/pxnpmrc",
|
|
139
|
+
"postinstall": "pxnpm setup"
|
|
139
140
|
}
|
|
140
141
|
}
|