@4pm/cli 1.4.0 → 1.4.1
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/index.js +9 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -28794,6 +28794,7 @@ var WORKER_TOOL_CATALOG = [
|
|
|
28794
28794
|
var WORKER_TOOL_PREREQUISITE_IDS = WORKER_TOOL_CATALOG.filter(
|
|
28795
28795
|
(t) => t.installPackage === null
|
|
28796
28796
|
).map((t) => t.id);
|
|
28797
|
+
var WORKER_TOOL_BUNDLED_GLOBALS = ["npm", "corepack"];
|
|
28797
28798
|
|
|
28798
28799
|
// vendor/@4pm/constants/ws.ts
|
|
28799
28800
|
var WsChannel = {
|
|
@@ -36413,9 +36414,11 @@ async function listExtras() {
|
|
|
36413
36414
|
} catch {
|
|
36414
36415
|
return [];
|
|
36415
36416
|
}
|
|
36416
|
-
const catalogPkgs = new Set(
|
|
36417
|
-
|
|
36418
|
-
|
|
36417
|
+
const catalogPkgs = new Set(WORKER_TOOL_BUNDLED_GLOBALS);
|
|
36418
|
+
for (const t of WORKER_TOOL_CATALOG) {
|
|
36419
|
+
catalogPkgs.add(t.id);
|
|
36420
|
+
if (t.installPackage) catalogPkgs.add(t.installPackage);
|
|
36421
|
+
}
|
|
36419
36422
|
return Object.entries(deps).filter(([name]) => !catalogPkgs.has(name)).map(([name, info]) => ({
|
|
36420
36423
|
id: name,
|
|
36421
36424
|
label: name,
|
|
@@ -36453,6 +36456,9 @@ function resolvePackage(name, op) {
|
|
|
36453
36456
|
if (WORKER_TOOL_PREREQUISITE_IDS.includes(name)) {
|
|
36454
36457
|
return { error: `"${name}" is a prerequisite and cannot be ${op}ed from here.` };
|
|
36455
36458
|
}
|
|
36459
|
+
if (WORKER_TOOL_BUNDLED_GLOBALS.includes(name)) {
|
|
36460
|
+
return { error: `"${name}" ships with Node and cannot be ${op}ed from here.` };
|
|
36461
|
+
}
|
|
36456
36462
|
if (!NPM_NAME.test(name)) return { error: `Invalid package name: "${name}".` };
|
|
36457
36463
|
return { pkg: name };
|
|
36458
36464
|
}
|