@ariestools/toolchain 10.0.5 → 10.0.7
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/README.md +12 -0
- package/dist/actions/index.d.ts +1 -0
- package/dist/actions/index.d.ts.map +1 -1
- package/dist/actions/node-lint.d.ts +3 -1
- package/dist/actions/node-lint.d.ts.map +1 -1
- package/dist/actions/npm-org/fetchOrgPackages.d.ts +17 -0
- package/dist/actions/npm-org/fetchOrgPackages.d.ts.map +1 -0
- package/dist/actions/npm-org/index.d.ts +7 -0
- package/dist/actions/npm-org/index.d.ts.map +1 -0
- package/dist/actions/npm-org/lint.d.ts +3 -0
- package/dist/actions/npm-org/lint.d.ts.map +1 -0
- package/dist/actions/npm-org/org.d.ts +4 -0
- package/dist/actions/npm-org/org.d.ts.map +1 -0
- package/dist/actions/npm-org/rules.d.ts +4 -0
- package/dist/actions/npm-org/rules.d.ts.map +1 -0
- package/dist/actions/npm-org/scanStatus.d.ts +11 -0
- package/dist/actions/npm-org/scanStatus.d.ts.map +1 -0
- package/dist/actions/npm-org/snapshots.d.ts +12 -0
- package/dist/actions/npm-org/snapshots.d.ts.map +1 -0
- package/dist/actions/npm-org/types.d.ts +59 -0
- package/dist/actions/npm-org/types.d.ts.map +1 -0
- package/dist/actions/package/compile/XyConfig.d.ts +38 -0
- package/dist/actions/package/compile/XyConfig.d.ts.map +1 -1
- package/dist/actions/package-lint-engines.d.ts +5 -1
- package/dist/actions/package-lint-engines.d.ts.map +1 -1
- package/dist/actions/package-lint.d.ts +3 -0
- package/dist/actions/package-lint.d.ts.map +1 -1
- package/dist/actions/ruleCatalog.d.ts +1 -0
- package/dist/actions/ruleCatalog.d.ts.map +1 -1
- package/dist/bin/package/build.mjs +8 -2
- package/dist/bin/package/build.mjs.map +1 -1
- package/dist/bin/package/clean.mjs +8 -2
- package/dist/bin/package/clean.mjs.map +1 -1
- package/dist/bin/package/compile.mjs +2 -2
- package/dist/bin/package/compile.mjs.map +1 -1
- package/dist/bin/package/publint.mjs +8 -2
- package/dist/bin/package/publint.mjs.map +1 -1
- package/dist/bin/package/recompile.mjs +8 -2
- package/dist/bin/package/recompile.mjs.map +1 -1
- package/dist/bin/package/sync-layout.mjs +2 -2
- package/dist/bin/package/sync-layout.mjs.map +1 -1
- package/dist/bin/skills.mjs +404 -217
- package/dist/bin/skills.mjs.map +1 -1
- package/dist/bin/xy.mjs +874 -214
- package/dist/bin/xy.mjs.map +1 -1
- package/dist/bin/xyex.mjs +874 -214
- package/dist/bin/xyex.mjs.map +1 -1
- package/dist/lib/latestVersions.d.ts +6 -2
- package/dist/lib/latestVersions.d.ts.map +1 -1
- package/dist/lib/ruleCommandRegistry.d.ts +6 -0
- package/dist/lib/ruleCommandRegistry.d.ts.map +1 -1
- package/dist/lib/secure/downloadDiskCache.d.ts +15 -0
- package/dist/lib/secure/downloadDiskCache.d.ts.map +1 -0
- package/dist/lib/secure/downloadGate.d.ts +18 -0
- package/dist/lib/secure/downloadGate.d.ts.map +1 -0
- package/dist/lib/secure/fetchPackageSecurityMetadata.d.ts +31 -3
- package/dist/lib/secure/fetchPackageSecurityMetadata.d.ts.map +1 -1
- package/dist/lib/secure/index.d.ts +2 -0
- package/dist/lib/secure/index.d.ts.map +1 -1
- package/dist/lib/secure/interfaces.d.ts +2 -0
- package/dist/lib/secure/interfaces.d.ts.map +1 -1
- package/dist/lib/toolchainVersion.d.ts.map +1 -1
- package/dist/lib/updo/applyUpdates.d.ts.map +1 -1
- package/dist/lib/updo/isRegistryDependencySpec.d.ts +8 -0
- package/dist/lib/updo/isRegistryDependencySpec.d.ts.map +1 -0
- package/dist/lib/updo/runUpdo.d.ts.map +1 -1
- package/dist/xy/common/index.d.ts.map +1 -1
- package/dist/xy/common/npm-org/index.d.ts +5 -0
- package/dist/xy/common/npm-org/index.d.ts.map +1 -0
- package/dist/xy/common/npm-org/lintCommand.d.ts +3 -0
- package/dist/xy/common/npm-org/lintCommand.d.ts.map +1 -0
- package/dist/xy/stability.d.ts +2 -0
- package/dist/xy/stability.d.ts.map +1 -1
- package/package.json +15 -15
package/dist/bin/xyex.mjs
CHANGED
|
@@ -617,9 +617,9 @@ function formatDeclaredRange(dep, range) {
|
|
|
617
617
|
}
|
|
618
618
|
//#endregion
|
|
619
619
|
//#region src/lib/bundledCliPath.ts
|
|
620
|
-
const require$
|
|
620
|
+
const require$7 = createRequire(import.meta.url);
|
|
621
621
|
function toolchainPackageRoot() {
|
|
622
|
-
return PATH.dirname(require$
|
|
622
|
+
return PATH.dirname(require$7.resolve("@ariestools/toolchain/package.json"));
|
|
623
623
|
}
|
|
624
624
|
function bundledCliPath(name) {
|
|
625
625
|
return PATH.resolve(toolchainPackageRoot(), "dist/bin", name);
|
|
@@ -6861,12 +6861,9 @@ var require_semver = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
6861
6861
|
}));
|
|
6862
6862
|
//#endregion
|
|
6863
6863
|
//#region src/lib/toolchainVersion.ts
|
|
6864
|
-
|
|
6864
|
+
createRequire(import.meta.url);
|
|
6865
6865
|
function bundledToolchainVersion() {
|
|
6866
|
-
|
|
6867
|
-
const pkg = JSON.parse(readFileSync(pkgPath, "utf8"));
|
|
6868
|
-
if (pkg.version == null || pkg.version.length === 0) throw new Error("Could not read @ariestools/toolchain version");
|
|
6869
|
-
return pkg.version;
|
|
6866
|
+
return "10.0.7";
|
|
6870
6867
|
}
|
|
6871
6868
|
function bundledToolchainRange() {
|
|
6872
6869
|
return `^${bundledToolchainVersion()}`;
|
|
@@ -7098,9 +7095,13 @@ const gitignoreTemplate = () => readFileSync(PATH.resolve(templatesDir, "templat
|
|
|
7098
7095
|
//#endregion
|
|
7099
7096
|
//#region src/lib/latestVersions.ts
|
|
7100
7097
|
const latestVersions = {
|
|
7101
|
-
node: "24.
|
|
7098
|
+
node: "24.21.0",
|
|
7099
|
+
nodeCurrent: "26.8.2",
|
|
7100
|
+
nodeLts: "24.21.0",
|
|
7102
7101
|
nodeLtsCodename: "Krypton",
|
|
7103
|
-
npm: "11.
|
|
7102
|
+
npm: "11.19.0",
|
|
7103
|
+
npmCurrent: "11.19.1",
|
|
7104
|
+
npmLts: "11.19.0",
|
|
7104
7105
|
pnpm: "10.33.0",
|
|
7105
7106
|
yarn: "4.13.0"
|
|
7106
7107
|
};
|
|
@@ -11808,7 +11809,7 @@ var require_dist$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
11808
11809
|
exports.cosmiconfigSync = cosmiconfigSync;
|
|
11809
11810
|
}));
|
|
11810
11811
|
//#endregion
|
|
11811
|
-
//#region ../../node_modules/.pnpm/cosmiconfig-typescript-loader@6.3.0_@types+node@26.
|
|
11812
|
+
//#region ../../node_modules/.pnpm/cosmiconfig-typescript-loader@6.3.0_@types+node@26.6.0_cosmiconfig@10.0.1_typescript@6.0.3/node_modules/cosmiconfig-typescript-loader/dist/esm/typescript-compile-error.mjs
|
|
11812
11813
|
var TypeScriptCompileError = class _TypeScriptCompileError extends Error {
|
|
11813
11814
|
constructor(message) {
|
|
11814
11815
|
super(message);
|
|
@@ -11824,7 +11825,7 @@ ${error.message}`;
|
|
|
11824
11825
|
}
|
|
11825
11826
|
};
|
|
11826
11827
|
//#endregion
|
|
11827
|
-
//#region ../../node_modules/.pnpm/cosmiconfig-typescript-loader@6.3.0_@types+node@26.
|
|
11828
|
+
//#region ../../node_modules/.pnpm/cosmiconfig-typescript-loader@6.3.0_@types+node@26.6.0_cosmiconfig@10.0.1_typescript@6.0.3/node_modules/cosmiconfig-typescript-loader/dist/esm/loader.mjs
|
|
11828
11829
|
function TypeScriptLoader(options) {
|
|
11829
11830
|
const loader = createJiti("", {
|
|
11830
11831
|
interopDefault: true,
|
|
@@ -11914,6 +11915,12 @@ const RULE_COMMANDS = {
|
|
|
11914
11915
|
includeInRoot: true,
|
|
11915
11916
|
title: "Node Lint Rules"
|
|
11916
11917
|
},
|
|
11918
|
+
npmOrgLint: {
|
|
11919
|
+
command: "npm-org lint",
|
|
11920
|
+
configKey: "npmOrgLint",
|
|
11921
|
+
includeInRoot: true,
|
|
11922
|
+
title: "Npm Org Lint Rules"
|
|
11923
|
+
},
|
|
11917
11924
|
packman: {
|
|
11918
11925
|
command: "packman lint",
|
|
11919
11926
|
configKey: "packman",
|
|
@@ -13670,11 +13677,11 @@ function isMatch(input, pattern, options = {}) {
|
|
|
13670
13677
|
}
|
|
13671
13678
|
//#endregion
|
|
13672
13679
|
//#region src/lib/npmLatestVersion.ts
|
|
13673
|
-
const REGISTRY_BASE$
|
|
13680
|
+
const REGISTRY_BASE$4 = "https://registry.npmjs.org";
|
|
13674
13681
|
const cache$3 = /* @__PURE__ */ new Map();
|
|
13675
13682
|
async function fetchUncached$1(packageName) {
|
|
13676
13683
|
try {
|
|
13677
|
-
const url = `${REGISTRY_BASE$
|
|
13684
|
+
const url = `${REGISTRY_BASE$4}/${encodeURIComponent(packageName)}/latest`;
|
|
13678
13685
|
const res = await fetch(url, { headers: { Accept: "application/vnd.npm.install-v1+json" } });
|
|
13679
13686
|
if (!res.ok) return void 0;
|
|
13680
13687
|
return (await res.json()).version;
|
|
@@ -13708,7 +13715,7 @@ const parsedPackageJSON = (path) => {
|
|
|
13708
13715
|
return JSON.parse(packageJSON);
|
|
13709
13716
|
};
|
|
13710
13717
|
//#endregion
|
|
13711
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.
|
|
13718
|
+
//#region ../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/nodes/identity.js
|
|
13712
13719
|
var require_identity = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
13713
13720
|
const ALIAS = Symbol.for("yaml.alias");
|
|
13714
13721
|
const DOC = Symbol.for("yaml.document");
|
|
@@ -13758,7 +13765,7 @@ var require_identity = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
13758
13765
|
exports.isSeq = isSeq;
|
|
13759
13766
|
}));
|
|
13760
13767
|
//#endregion
|
|
13761
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.
|
|
13768
|
+
//#region ../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/visit.js
|
|
13762
13769
|
var require_visit = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
13763
13770
|
var identity = require_identity();
|
|
13764
13771
|
const BREAK = Symbol("break visit");
|
|
@@ -13949,7 +13956,7 @@ var require_visit = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
13949
13956
|
exports.visitAsync = visitAsync;
|
|
13950
13957
|
}));
|
|
13951
13958
|
//#endregion
|
|
13952
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.
|
|
13959
|
+
//#region ../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/doc/directives.js
|
|
13953
13960
|
var require_directives = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
13954
13961
|
var identity = require_identity();
|
|
13955
13962
|
var visit = require_visit();
|
|
@@ -14113,7 +14120,7 @@ var require_directives = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
14113
14120
|
exports.Directives = Directives;
|
|
14114
14121
|
}));
|
|
14115
14122
|
//#endregion
|
|
14116
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.
|
|
14123
|
+
//#region ../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/doc/anchors.js
|
|
14117
14124
|
var require_anchors = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
14118
14125
|
var identity = require_identity();
|
|
14119
14126
|
var visit = require_visit();
|
|
@@ -14180,7 +14187,7 @@ var require_anchors = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
14180
14187
|
exports.findNewAnchor = findNewAnchor;
|
|
14181
14188
|
}));
|
|
14182
14189
|
//#endregion
|
|
14183
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.
|
|
14190
|
+
//#region ../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/doc/applyReviver.js
|
|
14184
14191
|
var require_applyReviver = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
14185
14192
|
/**
|
|
14186
14193
|
* Applies the JSON.parse reviver algorithm as defined in the ECMA-262 spec,
|
|
@@ -14222,7 +14229,7 @@ var require_applyReviver = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
14222
14229
|
exports.applyReviver = applyReviver;
|
|
14223
14230
|
}));
|
|
14224
14231
|
//#endregion
|
|
14225
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.
|
|
14232
|
+
//#region ../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/nodes/toJS.js
|
|
14226
14233
|
var require_toJS = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
14227
14234
|
var identity = require_identity();
|
|
14228
14235
|
/**
|
|
@@ -14259,7 +14266,7 @@ var require_toJS = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
14259
14266
|
exports.toJS = toJS;
|
|
14260
14267
|
}));
|
|
14261
14268
|
//#endregion
|
|
14262
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.
|
|
14269
|
+
//#region ../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/nodes/Node.js
|
|
14263
14270
|
var require_Node = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
14264
14271
|
var applyReviver = require_applyReviver();
|
|
14265
14272
|
var identity = require_identity();
|
|
@@ -14293,7 +14300,7 @@ var require_Node = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
14293
14300
|
exports.NodeBase = NodeBase;
|
|
14294
14301
|
}));
|
|
14295
14302
|
//#endregion
|
|
14296
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.
|
|
14303
|
+
//#region ../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/nodes/Alias.js
|
|
14297
14304
|
var require_Alias = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
14298
14305
|
var anchors = require_anchors();
|
|
14299
14306
|
var visit = require_visit();
|
|
@@ -14328,29 +14335,31 @@ var require_Alias = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
14328
14335
|
if (node === this) break;
|
|
14329
14336
|
if (node.anchor === this.source) found = node;
|
|
14330
14337
|
}
|
|
14338
|
+
if (found && ctx) {
|
|
14339
|
+
const { anchors, doc, maxAliasCount } = ctx;
|
|
14340
|
+
let data = anchors.get(found);
|
|
14341
|
+
if (!data) {
|
|
14342
|
+
toJS.toJS(found, null, ctx);
|
|
14343
|
+
data = anchors.get(found);
|
|
14344
|
+
}
|
|
14345
|
+
/* istanbul ignore if */
|
|
14346
|
+
if (data?.res === void 0) throw new ReferenceError("This should not happen: Alias anchor was not resolved?");
|
|
14347
|
+
if (maxAliasCount >= 0) {
|
|
14348
|
+
data.count += 1;
|
|
14349
|
+
if (data.aliasCount === 0) data.aliasCount = getAliasCount(doc, found, anchors);
|
|
14350
|
+
if (data.count * data.aliasCount > maxAliasCount) throw new ReferenceError("Excessive alias count indicates a resource exhaustion attack");
|
|
14351
|
+
}
|
|
14352
|
+
}
|
|
14331
14353
|
return found;
|
|
14332
14354
|
}
|
|
14333
14355
|
toJSON(_arg, ctx) {
|
|
14334
14356
|
if (!ctx) return { source: this.source };
|
|
14335
|
-
const
|
|
14336
|
-
const source = this.resolve(doc, ctx);
|
|
14357
|
+
const source = this.resolve(ctx.doc, ctx);
|
|
14337
14358
|
if (!source) {
|
|
14338
14359
|
const msg = `Unresolved alias (the anchor must be set before the alias): ${this.source}`;
|
|
14339
14360
|
throw new ReferenceError(msg);
|
|
14340
14361
|
}
|
|
14341
|
-
|
|
14342
|
-
if (!data) {
|
|
14343
|
-
toJS.toJS(source, null, ctx);
|
|
14344
|
-
data = anchors.get(source);
|
|
14345
|
-
}
|
|
14346
|
-
/* istanbul ignore if */
|
|
14347
|
-
if (data?.res === void 0) throw new ReferenceError("This should not happen: Alias anchor was not resolved?");
|
|
14348
|
-
if (maxAliasCount >= 0) {
|
|
14349
|
-
data.count += 1;
|
|
14350
|
-
if (data.aliasCount === 0) data.aliasCount = getAliasCount(doc, source, anchors);
|
|
14351
|
-
if (data.count * data.aliasCount > maxAliasCount) throw new ReferenceError("Excessive alias count indicates a resource exhaustion attack");
|
|
14352
|
-
}
|
|
14353
|
-
return data.res;
|
|
14362
|
+
return ctx.anchors.get(source).res;
|
|
14354
14363
|
}
|
|
14355
14364
|
toString(ctx, _onComment, _onChompKeep) {
|
|
14356
14365
|
const src = `*${this.source}`;
|
|
@@ -14387,7 +14396,7 @@ var require_Alias = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
14387
14396
|
exports.Alias = Alias;
|
|
14388
14397
|
}));
|
|
14389
14398
|
//#endregion
|
|
14390
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.
|
|
14399
|
+
//#region ../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/nodes/Scalar.js
|
|
14391
14400
|
var require_Scalar = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
14392
14401
|
var identity = require_identity();
|
|
14393
14402
|
var Node = require_Node();
|
|
@@ -14414,7 +14423,7 @@ var require_Scalar = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
14414
14423
|
exports.isScalarValue = isScalarValue;
|
|
14415
14424
|
}));
|
|
14416
14425
|
//#endregion
|
|
14417
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.
|
|
14426
|
+
//#region ../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/doc/createNode.js
|
|
14418
14427
|
var require_createNode = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
14419
14428
|
var Alias = require_Alias();
|
|
14420
14429
|
var identity = require_identity();
|
|
@@ -14477,7 +14486,7 @@ var require_createNode = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
14477
14486
|
exports.createNode = createNode;
|
|
14478
14487
|
}));
|
|
14479
14488
|
//#endregion
|
|
14480
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.
|
|
14489
|
+
//#region ../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/nodes/Collection.js
|
|
14481
14490
|
var require_Collection = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
14482
14491
|
var createNode = require_createNode();
|
|
14483
14492
|
var identity = require_identity();
|
|
@@ -14598,7 +14607,7 @@ var require_Collection = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
14598
14607
|
exports.isEmptyPath = isEmptyPath;
|
|
14599
14608
|
}));
|
|
14600
14609
|
//#endregion
|
|
14601
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.
|
|
14610
|
+
//#region ../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/stringify/stringifyComment.js
|
|
14602
14611
|
var require_stringifyComment = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
14603
14612
|
/**
|
|
14604
14613
|
* Stringifies a comment.
|
|
@@ -14618,7 +14627,7 @@ var require_stringifyComment = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
14618
14627
|
exports.stringifyComment = stringifyComment;
|
|
14619
14628
|
}));
|
|
14620
14629
|
//#endregion
|
|
14621
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.
|
|
14630
|
+
//#region ../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/stringify/foldFlowLines.js
|
|
14622
14631
|
var require_foldFlowLines = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
14623
14632
|
const FOLD_FLOW = "flow";
|
|
14624
14633
|
const FOLD_BLOCK = "block";
|
|
@@ -14738,7 +14747,7 @@ var require_foldFlowLines = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
14738
14747
|
exports.foldFlowLines = foldFlowLines;
|
|
14739
14748
|
}));
|
|
14740
14749
|
//#endregion
|
|
14741
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.
|
|
14750
|
+
//#region ../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/stringify/stringifyString.js
|
|
14742
14751
|
var require_stringifyString = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
14743
14752
|
var Scalar = require_Scalar();
|
|
14744
14753
|
var foldFlowLines = require_foldFlowLines();
|
|
@@ -14962,7 +14971,7 @@ var require_stringifyString = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
14962
14971
|
exports.stringifyString = stringifyString;
|
|
14963
14972
|
}));
|
|
14964
14973
|
//#endregion
|
|
14965
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.
|
|
14974
|
+
//#region ../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/stringify/stringify.js
|
|
14966
14975
|
var require_stringify = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
14967
14976
|
var anchors = require_anchors();
|
|
14968
14977
|
var identity = require_identity();
|
|
@@ -15070,7 +15079,7 @@ var require_stringify = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
15070
15079
|
exports.stringify = stringify;
|
|
15071
15080
|
}));
|
|
15072
15081
|
//#endregion
|
|
15073
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.
|
|
15082
|
+
//#region ../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/stringify/stringifyPair.js
|
|
15074
15083
|
var require_stringifyPair = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
15075
15084
|
var identity = require_identity();
|
|
15076
15085
|
var Scalar = require_Scalar();
|
|
@@ -15167,7 +15176,7 @@ var require_stringifyPair = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
15167
15176
|
exports.stringifyPair = stringifyPair;
|
|
15168
15177
|
}));
|
|
15169
15178
|
//#endregion
|
|
15170
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.
|
|
15179
|
+
//#region ../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/log.js
|
|
15171
15180
|
var require_log = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
15172
15181
|
var node_process$2 = __require("process");
|
|
15173
15182
|
function debug(logLevel, ...messages) {
|
|
@@ -15183,7 +15192,7 @@ var require_log = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
15183
15192
|
exports.warn = warn;
|
|
15184
15193
|
}));
|
|
15185
15194
|
//#endregion
|
|
15186
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.
|
|
15195
|
+
//#region ../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/yaml-1.1/merge.js
|
|
15187
15196
|
var require_merge = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
15188
15197
|
var identity = require_identity();
|
|
15189
15198
|
var Scalar = require_Scalar();
|
|
@@ -15226,7 +15235,7 @@ var require_merge = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
15226
15235
|
exports.merge = merge;
|
|
15227
15236
|
}));
|
|
15228
15237
|
//#endregion
|
|
15229
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.
|
|
15238
|
+
//#region ../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/nodes/addPairToJSMap.js
|
|
15230
15239
|
var require_addPairToJSMap = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
15231
15240
|
var log = require_log();
|
|
15232
15241
|
var merge = require_merge();
|
|
@@ -15277,7 +15286,7 @@ var require_addPairToJSMap = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
15277
15286
|
exports.addPairToJSMap = addPairToJSMap;
|
|
15278
15287
|
}));
|
|
15279
15288
|
//#endregion
|
|
15280
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.
|
|
15289
|
+
//#region ../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/nodes/Pair.js
|
|
15281
15290
|
var require_Pair = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
15282
15291
|
var createNode = require_createNode();
|
|
15283
15292
|
var stringifyPair = require_stringifyPair();
|
|
@@ -15310,7 +15319,7 @@ var require_Pair = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
15310
15319
|
exports.createPair = createPair;
|
|
15311
15320
|
}));
|
|
15312
15321
|
//#endregion
|
|
15313
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.
|
|
15322
|
+
//#region ../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/stringify/stringifyCollection.js
|
|
15314
15323
|
var require_stringifyCollection = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
15315
15324
|
var identity = require_identity();
|
|
15316
15325
|
var stringify = require_stringify();
|
|
@@ -15428,7 +15437,7 @@ var require_stringifyCollection = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
15428
15437
|
exports.stringifyCollection = stringifyCollection;
|
|
15429
15438
|
}));
|
|
15430
15439
|
//#endregion
|
|
15431
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.
|
|
15440
|
+
//#region ../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/nodes/YAMLMap.js
|
|
15432
15441
|
var require_YAMLMap = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
15433
15442
|
var stringifyCollection = require_stringifyCollection();
|
|
15434
15443
|
var addPairToJSMap = require_addPairToJSMap();
|
|
@@ -15537,7 +15546,7 @@ var require_YAMLMap = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
15537
15546
|
exports.findPair = findPair;
|
|
15538
15547
|
}));
|
|
15539
15548
|
//#endregion
|
|
15540
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.
|
|
15549
|
+
//#region ../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/common/map.js
|
|
15541
15550
|
var require_map = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
15542
15551
|
var identity = require_identity();
|
|
15543
15552
|
var YAMLMap = require_YAMLMap();
|
|
@@ -15554,7 +15563,7 @@ var require_map = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
15554
15563
|
};
|
|
15555
15564
|
}));
|
|
15556
15565
|
//#endregion
|
|
15557
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.
|
|
15566
|
+
//#region ../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/nodes/YAMLSeq.js
|
|
15558
15567
|
var require_YAMLSeq = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
15559
15568
|
var createNode = require_createNode();
|
|
15560
15569
|
var stringifyCollection = require_stringifyCollection();
|
|
@@ -15660,7 +15669,7 @@ var require_YAMLSeq = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
15660
15669
|
exports.YAMLSeq = YAMLSeq;
|
|
15661
15670
|
}));
|
|
15662
15671
|
//#endregion
|
|
15663
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.
|
|
15672
|
+
//#region ../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/common/seq.js
|
|
15664
15673
|
var require_seq = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
15665
15674
|
var identity = require_identity();
|
|
15666
15675
|
var YAMLSeq = require_YAMLSeq();
|
|
@@ -15677,7 +15686,7 @@ var require_seq = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
15677
15686
|
};
|
|
15678
15687
|
}));
|
|
15679
15688
|
//#endregion
|
|
15680
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.
|
|
15689
|
+
//#region ../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/common/string.js
|
|
15681
15690
|
var require_string = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
15682
15691
|
var stringifyString = require_stringifyString();
|
|
15683
15692
|
exports.string = {
|
|
@@ -15692,7 +15701,7 @@ var require_string = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
15692
15701
|
};
|
|
15693
15702
|
}));
|
|
15694
15703
|
//#endregion
|
|
15695
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.
|
|
15704
|
+
//#region ../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/common/null.js
|
|
15696
15705
|
var require_null = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
15697
15706
|
var Scalar = require_Scalar();
|
|
15698
15707
|
const nullTag = {
|
|
@@ -15707,7 +15716,7 @@ var require_null = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
15707
15716
|
exports.nullTag = nullTag;
|
|
15708
15717
|
}));
|
|
15709
15718
|
//#endregion
|
|
15710
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.
|
|
15719
|
+
//#region ../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/core/bool.js
|
|
15711
15720
|
var require_bool$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
15712
15721
|
var Scalar = require_Scalar();
|
|
15713
15722
|
const boolTag = {
|
|
@@ -15726,7 +15735,7 @@ var require_bool$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
15726
15735
|
exports.boolTag = boolTag;
|
|
15727
15736
|
}));
|
|
15728
15737
|
//#endregion
|
|
15729
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.
|
|
15738
|
+
//#region ../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/stringify/stringifyNumber.js
|
|
15730
15739
|
var require_stringifyNumber = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
15731
15740
|
function stringifyNumber({ format, minFractionDigits, tag, value }) {
|
|
15732
15741
|
if (typeof value === "bigint") return String(value);
|
|
@@ -15747,7 +15756,7 @@ var require_stringifyNumber = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
15747
15756
|
exports.stringifyNumber = stringifyNumber;
|
|
15748
15757
|
}));
|
|
15749
15758
|
//#endregion
|
|
15750
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.
|
|
15759
|
+
//#region ../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/core/float.js
|
|
15751
15760
|
var require_float$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
15752
15761
|
var Scalar = require_Scalar();
|
|
15753
15762
|
var stringifyNumber = require_stringifyNumber();
|
|
@@ -15788,7 +15797,7 @@ var require_float$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
15788
15797
|
exports.floatNaN = floatNaN;
|
|
15789
15798
|
}));
|
|
15790
15799
|
//#endregion
|
|
15791
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.
|
|
15800
|
+
//#region ../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/core/int.js
|
|
15792
15801
|
var require_int$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
15793
15802
|
var stringifyNumber = require_stringifyNumber();
|
|
15794
15803
|
const intIdentify = (value) => typeof value === "bigint" || Number.isInteger(value);
|
|
@@ -15829,7 +15838,7 @@ var require_int$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
15829
15838
|
exports.intOct = intOct;
|
|
15830
15839
|
}));
|
|
15831
15840
|
//#endregion
|
|
15832
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.
|
|
15841
|
+
//#region ../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/core/schema.js
|
|
15833
15842
|
var require_schema$2 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
15834
15843
|
var map = require_map();
|
|
15835
15844
|
var _null = require_null();
|
|
@@ -15853,7 +15862,7 @@ var require_schema$2 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
15853
15862
|
];
|
|
15854
15863
|
}));
|
|
15855
15864
|
//#endregion
|
|
15856
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.
|
|
15865
|
+
//#region ../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/json/schema.js
|
|
15857
15866
|
var require_schema$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
15858
15867
|
var Scalar = require_Scalar();
|
|
15859
15868
|
var map = require_map();
|
|
@@ -15915,7 +15924,7 @@ var require_schema$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
15915
15924
|
});
|
|
15916
15925
|
}));
|
|
15917
15926
|
//#endregion
|
|
15918
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.
|
|
15927
|
+
//#region ../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/yaml-1.1/binary.js
|
|
15919
15928
|
var require_binary = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
15920
15929
|
var node_buffer = __require("buffer");
|
|
15921
15930
|
var Scalar = require_Scalar();
|
|
@@ -15971,7 +15980,7 @@ var require_binary = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
15971
15980
|
};
|
|
15972
15981
|
}));
|
|
15973
15982
|
//#endregion
|
|
15974
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.
|
|
15983
|
+
//#region ../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/yaml-1.1/pairs.js
|
|
15975
15984
|
var require_pairs = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
15976
15985
|
var identity = require_identity();
|
|
15977
15986
|
var Pair = require_Pair();
|
|
@@ -16032,7 +16041,7 @@ var require_pairs = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
16032
16041
|
exports.resolvePairs = resolvePairs;
|
|
16033
16042
|
}));
|
|
16034
16043
|
//#endregion
|
|
16035
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.
|
|
16044
|
+
//#region ../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/yaml-1.1/omap.js
|
|
16036
16045
|
var require_omap = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
16037
16046
|
var identity = require_identity();
|
|
16038
16047
|
var toJS = require_toJS();
|
|
@@ -16097,7 +16106,7 @@ var require_omap = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
16097
16106
|
exports.omap = omap;
|
|
16098
16107
|
}));
|
|
16099
16108
|
//#endregion
|
|
16100
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.
|
|
16109
|
+
//#region ../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/yaml-1.1/bool.js
|
|
16101
16110
|
var require_bool = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
16102
16111
|
var Scalar = require_Scalar();
|
|
16103
16112
|
function boolStringify({ value, source }, ctx) {
|
|
@@ -16124,7 +16133,7 @@ var require_bool = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
16124
16133
|
exports.trueTag = trueTag;
|
|
16125
16134
|
}));
|
|
16126
16135
|
//#endregion
|
|
16127
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.
|
|
16136
|
+
//#region ../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/yaml-1.1/float.js
|
|
16128
16137
|
var require_float = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
16129
16138
|
var Scalar = require_Scalar();
|
|
16130
16139
|
var stringifyNumber = require_stringifyNumber();
|
|
@@ -16168,7 +16177,7 @@ var require_float = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
16168
16177
|
exports.floatNaN = floatNaN;
|
|
16169
16178
|
}));
|
|
16170
16179
|
//#endregion
|
|
16171
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.
|
|
16180
|
+
//#region ../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/yaml-1.1/int.js
|
|
16172
16181
|
var require_int = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
16173
16182
|
var stringifyNumber = require_stringifyNumber();
|
|
16174
16183
|
const intIdentify = (value) => typeof value === "bigint" || Number.isInteger(value);
|
|
@@ -16241,7 +16250,7 @@ var require_int = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
16241
16250
|
exports.intOct = intOct;
|
|
16242
16251
|
}));
|
|
16243
16252
|
//#endregion
|
|
16244
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.
|
|
16253
|
+
//#region ../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/yaml-1.1/set.js
|
|
16245
16254
|
var require_set = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
16246
16255
|
var identity = require_identity();
|
|
16247
16256
|
var Pair = require_Pair();
|
|
@@ -16310,7 +16319,7 @@ var require_set = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
16310
16319
|
exports.set = set;
|
|
16311
16320
|
}));
|
|
16312
16321
|
//#endregion
|
|
16313
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.
|
|
16322
|
+
//#region ../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/yaml-1.1/timestamp.js
|
|
16314
16323
|
var require_timestamp = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
16315
16324
|
var stringifyNumber = require_stringifyNumber();
|
|
16316
16325
|
/** Internal types handle bigint as number, because TS can't figure it out. */
|
|
@@ -16393,7 +16402,7 @@ var require_timestamp = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
16393
16402
|
exports.timestamp = timestamp;
|
|
16394
16403
|
}));
|
|
16395
16404
|
//#endregion
|
|
16396
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.
|
|
16405
|
+
//#region ../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/yaml-1.1/schema.js
|
|
16397
16406
|
var require_schema = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
16398
16407
|
var map = require_map();
|
|
16399
16408
|
var _null = require_null();
|
|
@@ -16433,7 +16442,7 @@ var require_schema = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
16433
16442
|
];
|
|
16434
16443
|
}));
|
|
16435
16444
|
//#endregion
|
|
16436
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.
|
|
16445
|
+
//#region ../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/tags.js
|
|
16437
16446
|
var require_tags = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
16438
16447
|
var map = require_map();
|
|
16439
16448
|
var _null = require_null();
|
|
@@ -16519,7 +16528,7 @@ var require_tags = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
16519
16528
|
exports.getTags = getTags;
|
|
16520
16529
|
}));
|
|
16521
16530
|
//#endregion
|
|
16522
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.
|
|
16531
|
+
//#region ../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/Schema.js
|
|
16523
16532
|
var require_Schema = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
16524
16533
|
var identity = require_identity();
|
|
16525
16534
|
var map = require_map();
|
|
@@ -16547,7 +16556,7 @@ var require_Schema = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
16547
16556
|
};
|
|
16548
16557
|
}));
|
|
16549
16558
|
//#endregion
|
|
16550
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.
|
|
16559
|
+
//#region ../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/stringify/stringifyDocument.js
|
|
16551
16560
|
var require_stringifyDocument = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
16552
16561
|
var identity = require_identity();
|
|
16553
16562
|
var stringify = require_stringify();
|
|
@@ -16609,7 +16618,7 @@ var require_stringifyDocument = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
16609
16618
|
exports.stringifyDocument = stringifyDocument;
|
|
16610
16619
|
}));
|
|
16611
16620
|
//#endregion
|
|
16612
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.
|
|
16621
|
+
//#region ../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/doc/Document.js
|
|
16613
16622
|
var require_Document = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
16614
16623
|
var Alias = require_Alias();
|
|
16615
16624
|
var Collection = require_Collection();
|
|
@@ -16890,7 +16899,7 @@ var require_Document = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
16890
16899
|
exports.Document = Document;
|
|
16891
16900
|
}));
|
|
16892
16901
|
//#endregion
|
|
16893
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.
|
|
16902
|
+
//#region ../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/errors.js
|
|
16894
16903
|
var require_errors = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
16895
16904
|
var YAMLError = class extends Error {
|
|
16896
16905
|
constructor(name, pos, code, message) {
|
|
@@ -16943,7 +16952,7 @@ var require_errors = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
16943
16952
|
exports.prettifyError = prettifyError;
|
|
16944
16953
|
}));
|
|
16945
16954
|
//#endregion
|
|
16946
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.
|
|
16955
|
+
//#region ../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/compose/resolve-props.js
|
|
16947
16956
|
var require_resolve_props = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
16948
16957
|
function resolveProps(tokens, { flow, indicator, next, offset, onError, parentIndent, startOnNewline }) {
|
|
16949
16958
|
let spaceBefore = false;
|
|
@@ -17050,7 +17059,7 @@ var require_resolve_props = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
17050
17059
|
exports.resolveProps = resolveProps;
|
|
17051
17060
|
}));
|
|
17052
17061
|
//#endregion
|
|
17053
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.
|
|
17062
|
+
//#region ../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/compose/util-contains-newline.js
|
|
17054
17063
|
var require_util_contains_newline = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
17055
17064
|
function containsNewline(key) {
|
|
17056
17065
|
if (!key) return null;
|
|
@@ -17079,7 +17088,7 @@ var require_util_contains_newline = /* @__PURE__ */ __commonJSMin(((exports) =>
|
|
|
17079
17088
|
exports.containsNewline = containsNewline;
|
|
17080
17089
|
}));
|
|
17081
17090
|
//#endregion
|
|
17082
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.
|
|
17091
|
+
//#region ../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/compose/util-flow-indent-check.js
|
|
17083
17092
|
var require_util_flow_indent_check = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
17084
17093
|
var utilContainsNewline = require_util_contains_newline();
|
|
17085
17094
|
function flowIndentCheck(indent, fc, onError) {
|
|
@@ -17091,7 +17100,7 @@ var require_util_flow_indent_check = /* @__PURE__ */ __commonJSMin(((exports) =>
|
|
|
17091
17100
|
exports.flowIndentCheck = flowIndentCheck;
|
|
17092
17101
|
}));
|
|
17093
17102
|
//#endregion
|
|
17094
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.
|
|
17103
|
+
//#region ../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/compose/util-map-includes.js
|
|
17095
17104
|
var require_util_map_includes = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
17096
17105
|
var identity = require_identity();
|
|
17097
17106
|
function mapIncludes(ctx, items, search) {
|
|
@@ -17103,7 +17112,7 @@ var require_util_map_includes = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
17103
17112
|
exports.mapIncludes = mapIncludes;
|
|
17104
17113
|
}));
|
|
17105
17114
|
//#endregion
|
|
17106
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.
|
|
17115
|
+
//#region ../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/compose/resolve-block-map.js
|
|
17107
17116
|
var require_resolve_block_map = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
17108
17117
|
var Pair = require_Pair();
|
|
17109
17118
|
var YAMLMap = require_YAMLMap();
|
|
@@ -17191,7 +17200,7 @@ var require_resolve_block_map = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
17191
17200
|
exports.resolveBlockMap = resolveBlockMap;
|
|
17192
17201
|
}));
|
|
17193
17202
|
//#endregion
|
|
17194
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.
|
|
17203
|
+
//#region ../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/compose/resolve-block-seq.js
|
|
17195
17204
|
var require_resolve_block_seq = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
17196
17205
|
var YAMLSeq = require_YAMLSeq();
|
|
17197
17206
|
var resolveProps = require_resolve_props();
|
|
@@ -17236,7 +17245,7 @@ var require_resolve_block_seq = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
17236
17245
|
exports.resolveBlockSeq = resolveBlockSeq;
|
|
17237
17246
|
}));
|
|
17238
17247
|
//#endregion
|
|
17239
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.
|
|
17248
|
+
//#region ../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/compose/resolve-end.js
|
|
17240
17249
|
var require_resolve_end = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
17241
17250
|
function resolveEnd(end, offset, reqSpace, onError) {
|
|
17242
17251
|
let comment = "";
|
|
@@ -17274,7 +17283,7 @@ var require_resolve_end = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
17274
17283
|
exports.resolveEnd = resolveEnd;
|
|
17275
17284
|
}));
|
|
17276
17285
|
//#endregion
|
|
17277
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.
|
|
17286
|
+
//#region ../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/compose/resolve-flow-collection.js
|
|
17278
17287
|
var require_resolve_flow_collection = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
17279
17288
|
var identity = require_identity();
|
|
17280
17289
|
var Pair = require_Pair();
|
|
@@ -17437,7 +17446,7 @@ var require_resolve_flow_collection = /* @__PURE__ */ __commonJSMin(((exports) =
|
|
|
17437
17446
|
exports.resolveFlowCollection = resolveFlowCollection;
|
|
17438
17447
|
}));
|
|
17439
17448
|
//#endregion
|
|
17440
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.
|
|
17449
|
+
//#region ../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/compose/compose-collection.js
|
|
17441
17450
|
var require_compose_collection = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
17442
17451
|
var identity = require_identity();
|
|
17443
17452
|
var Scalar = require_Scalar();
|
|
@@ -17489,7 +17498,7 @@ var require_compose_collection = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
17489
17498
|
exports.composeCollection = composeCollection;
|
|
17490
17499
|
}));
|
|
17491
17500
|
//#endregion
|
|
17492
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.
|
|
17501
|
+
//#region ../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/compose/resolve-block-scalar.js
|
|
17493
17502
|
var require_resolve_block_scalar = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
17494
17503
|
var Scalar = require_Scalar();
|
|
17495
17504
|
function resolveBlockScalar(ctx, scalar, onError) {
|
|
@@ -17666,7 +17675,7 @@ var require_resolve_block_scalar = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
17666
17675
|
exports.resolveBlockScalar = resolveBlockScalar;
|
|
17667
17676
|
}));
|
|
17668
17677
|
//#endregion
|
|
17669
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.
|
|
17678
|
+
//#region ../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/compose/resolve-flow-scalar.js
|
|
17670
17679
|
var require_resolve_flow_scalar = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
17671
17680
|
var Scalar = require_Scalar();
|
|
17672
17681
|
var resolveEnd = require_resolve_end();
|
|
@@ -17736,40 +17745,41 @@ var require_resolve_flow_scalar = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
17736
17745
|
case "`": badChar = `reserved character ${source[0]}`;
|
|
17737
17746
|
}
|
|
17738
17747
|
if (badChar) onError(0, "BAD_SCALAR_START", `Plain value cannot start with ${badChar}`);
|
|
17739
|
-
return
|
|
17748
|
+
return unfoldLines(source);
|
|
17740
17749
|
}
|
|
17741
17750
|
function singleQuotedValue(source, onError) {
|
|
17742
17751
|
if (source[source.length - 1] !== "'" || source.length === 1) onError(source.length, "MISSING_CHAR", "Missing closing 'quote");
|
|
17743
|
-
return
|
|
17752
|
+
return unfoldLines(source.slice(1, -1)).replace(/''/g, "'");
|
|
17744
17753
|
}
|
|
17745
|
-
function
|
|
17754
|
+
function unfoldLines(source) {
|
|
17755
|
+
const line = /(.*?)\r?\n/sy;
|
|
17756
|
+
let match = line.exec(source);
|
|
17757
|
+
if (!match) return source;
|
|
17746
17758
|
/**
|
|
17747
|
-
* The negative
|
|
17759
|
+
* The negative lookbehinds in these RegExps are to
|
|
17748
17760
|
* prevent causing a polynomial search time in certain cases.
|
|
17749
17761
|
*
|
|
17750
|
-
* The try-catch is for Safari
|
|
17762
|
+
* The try-catch is for Safari < 16.4 and other old browsers:
|
|
17751
17763
|
* https://caniuse.com/js-regexp-lookbehind
|
|
17752
17764
|
*/
|
|
17753
|
-
let
|
|
17765
|
+
let trimEnd, trimBoth;
|
|
17754
17766
|
try {
|
|
17755
|
-
|
|
17756
|
-
|
|
17767
|
+
trimEnd = new RegExp("(?<![ ])[ ]+$");
|
|
17768
|
+
trimBoth = new RegExp("^[ ]+|(?<![ ])[ ]+$", "g");
|
|
17757
17769
|
} catch {
|
|
17758
|
-
|
|
17759
|
-
|
|
17770
|
+
trimEnd = /[ \t]+$/;
|
|
17771
|
+
trimBoth = /^[ \t]+|[ \t]+$/g;
|
|
17760
17772
|
}
|
|
17761
|
-
let
|
|
17762
|
-
if (!match) return source;
|
|
17763
|
-
let res = match[1];
|
|
17773
|
+
let res = match[1].replace(trimEnd, "");
|
|
17764
17774
|
let sep = " ";
|
|
17765
|
-
let pos =
|
|
17766
|
-
line.lastIndex = pos;
|
|
17775
|
+
let pos = line.lastIndex;
|
|
17767
17776
|
while (match = line.exec(source)) {
|
|
17768
|
-
|
|
17777
|
+
const lm = match[1].replace(trimBoth, "");
|
|
17778
|
+
if (lm === "") {
|
|
17769
17779
|
if (sep === "\n") res += sep;
|
|
17770
17780
|
else sep = "\n";
|
|
17771
17781
|
} else {
|
|
17772
|
-
res += sep +
|
|
17782
|
+
res += sep + lm;
|
|
17773
17783
|
sep = " ";
|
|
17774
17784
|
}
|
|
17775
17785
|
pos = line.lastIndex;
|
|
@@ -17870,7 +17880,7 @@ var require_resolve_flow_scalar = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
17870
17880
|
exports.resolveFlowScalar = resolveFlowScalar;
|
|
17871
17881
|
}));
|
|
17872
17882
|
//#endregion
|
|
17873
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.
|
|
17883
|
+
//#region ../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/compose/compose-scalar.js
|
|
17874
17884
|
var require_compose_scalar = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
17875
17885
|
var identity = require_identity();
|
|
17876
17886
|
var Scalar = require_Scalar();
|
|
@@ -17931,7 +17941,7 @@ var require_compose_scalar = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
17931
17941
|
exports.composeScalar = composeScalar;
|
|
17932
17942
|
}));
|
|
17933
17943
|
//#endregion
|
|
17934
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.
|
|
17944
|
+
//#region ../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/compose/util-empty-scalar-position.js
|
|
17935
17945
|
var require_util_empty_scalar_position = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
17936
17946
|
function emptyScalarPosition(offset, before, pos) {
|
|
17937
17947
|
if (before) {
|
|
@@ -17958,7 +17968,7 @@ var require_util_empty_scalar_position = /* @__PURE__ */ __commonJSMin(((exports
|
|
|
17958
17968
|
exports.emptyScalarPosition = emptyScalarPosition;
|
|
17959
17969
|
}));
|
|
17960
17970
|
//#endregion
|
|
17961
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.
|
|
17971
|
+
//#region ../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/compose/compose-node.js
|
|
17962
17972
|
var require_compose_node = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
17963
17973
|
var Alias = require_Alias();
|
|
17964
17974
|
var identity = require_identity();
|
|
@@ -18049,7 +18059,7 @@ var require_compose_node = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
18049
18059
|
exports.composeNode = composeNode;
|
|
18050
18060
|
}));
|
|
18051
18061
|
//#endregion
|
|
18052
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.
|
|
18062
|
+
//#region ../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/compose/compose-doc.js
|
|
18053
18063
|
var require_compose_doc = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
18054
18064
|
var Document = require_Document();
|
|
18055
18065
|
var composeNode = require_compose_node();
|
|
@@ -18091,7 +18101,7 @@ var require_compose_doc = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
18091
18101
|
exports.composeDoc = composeDoc;
|
|
18092
18102
|
}));
|
|
18093
18103
|
//#endregion
|
|
18094
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.
|
|
18104
|
+
//#region ../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/compose/composer.js
|
|
18095
18105
|
var require_composer = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
18096
18106
|
var node_process$1 = __require("process");
|
|
18097
18107
|
var directives = require_directives();
|
|
@@ -18289,7 +18299,7 @@ var require_composer = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
18289
18299
|
exports.Composer = Composer;
|
|
18290
18300
|
}));
|
|
18291
18301
|
//#endregion
|
|
18292
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.
|
|
18302
|
+
//#region ../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/parse/cst-scalar.js
|
|
18293
18303
|
var require_cst_scalar = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
18294
18304
|
var resolveBlockScalar = require_resolve_block_scalar();
|
|
18295
18305
|
var resolveFlowScalar = require_resolve_flow_scalar();
|
|
@@ -18556,7 +18566,7 @@ var require_cst_scalar = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
18556
18566
|
exports.setScalarValue = setScalarValue;
|
|
18557
18567
|
}));
|
|
18558
18568
|
//#endregion
|
|
18559
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.
|
|
18569
|
+
//#region ../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/parse/cst-stringify.js
|
|
18560
18570
|
var require_cst_stringify = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
18561
18571
|
/**
|
|
18562
18572
|
* Stringify a CST document, token, or collection item
|
|
@@ -18607,7 +18617,7 @@ var require_cst_stringify = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
18607
18617
|
exports.stringify = stringify;
|
|
18608
18618
|
}));
|
|
18609
18619
|
//#endregion
|
|
18610
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.
|
|
18620
|
+
//#region ../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/parse/cst-visit.js
|
|
18611
18621
|
var require_cst_visit = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
18612
18622
|
const BREAK = Symbol("break visit");
|
|
18613
18623
|
const SKIP = Symbol("skip children");
|
|
@@ -18698,7 +18708,7 @@ var require_cst_visit = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
18698
18708
|
exports.visit = visit;
|
|
18699
18709
|
}));
|
|
18700
18710
|
//#endregion
|
|
18701
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.
|
|
18711
|
+
//#region ../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/parse/cst.js
|
|
18702
18712
|
var require_cst = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
18703
18713
|
var cstScalar = require_cst_scalar();
|
|
18704
18714
|
var cstStringify = require_cst_stringify();
|
|
@@ -18777,7 +18787,7 @@ var require_cst = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
18777
18787
|
exports.tokenType = tokenType;
|
|
18778
18788
|
}));
|
|
18779
18789
|
//#endregion
|
|
18780
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.
|
|
18790
|
+
//#region ../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/parse/lexer.js
|
|
18781
18791
|
var require_lexer = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
18782
18792
|
var cst = require_cst();
|
|
18783
18793
|
function isEmpty(ch) {
|
|
@@ -19310,7 +19320,7 @@ var require_lexer = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
19310
19320
|
exports.Lexer = Lexer;
|
|
19311
19321
|
}));
|
|
19312
19322
|
//#endregion
|
|
19313
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.
|
|
19323
|
+
//#region ../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/parse/line-counter.js
|
|
19314
19324
|
var require_line_counter = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
19315
19325
|
/**
|
|
19316
19326
|
* Tracks newlines during parsing in order to provide an efficient API for
|
|
@@ -19357,7 +19367,7 @@ var require_line_counter = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
19357
19367
|
exports.LineCounter = LineCounter;
|
|
19358
19368
|
}));
|
|
19359
19369
|
//#endregion
|
|
19360
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.
|
|
19370
|
+
//#region ../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/parse/parser.js
|
|
19361
19371
|
var require_parser = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
19362
19372
|
var node_process = __require("process");
|
|
19363
19373
|
var cst = require_cst();
|
|
@@ -20223,7 +20233,7 @@ var require_parser = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
20223
20233
|
exports.Parser = Parser;
|
|
20224
20234
|
}));
|
|
20225
20235
|
//#endregion
|
|
20226
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.
|
|
20236
|
+
//#region ../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/public-api.js
|
|
20227
20237
|
var require_public_api = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
20228
20238
|
var composer = require_composer();
|
|
20229
20239
|
var Document = require_Document();
|
|
@@ -20700,10 +20710,10 @@ const runStepsAsync = async (name, steps, shouldExitOnFail = true, messages) =>
|
|
|
20700
20710
|
};
|
|
20701
20711
|
//#endregion
|
|
20702
20712
|
//#region src/lib/secure/classify.ts
|
|
20703
|
-
const DAY_MS = 864e5;
|
|
20713
|
+
const DAY_MS$1 = 864e5;
|
|
20704
20714
|
function classifySecureAge(publishedAt, now = /* @__PURE__ */ new Date()) {
|
|
20705
20715
|
if (!publishedAt || Number.isNaN(publishedAt.getTime())) return { level: "gray" };
|
|
20706
|
-
const ageDays = Math.max(0, (now.getTime() - publishedAt.getTime()) / DAY_MS);
|
|
20716
|
+
const ageDays = Math.max(0, (now.getTime() - publishedAt.getTime()) / DAY_MS$1);
|
|
20707
20717
|
if (ageDays < 3) return {
|
|
20708
20718
|
ageDays,
|
|
20709
20719
|
level: "red"
|
|
@@ -21086,13 +21096,171 @@ function enableDependabotAlerts(cwd, runner = defaultGithubRunner) {
|
|
|
21086
21096
|
], { cwd }).status === 0;
|
|
21087
21097
|
}
|
|
21088
21098
|
//#endregion
|
|
21099
|
+
//#region src/lib/secure/downloadDiskCache.ts
|
|
21100
|
+
const CACHE_VERSION = 1;
|
|
21101
|
+
const CACHE_TTL_MS = 432e5;
|
|
21102
|
+
const cacheState = { now: Date.now };
|
|
21103
|
+
function defaultSecureDownloadsDiskCachePath(rootDir = INIT_CWD()) {
|
|
21104
|
+
return PATH.resolve(rootDir, ".xy/cache/npm-downloads", "weekly.json");
|
|
21105
|
+
}
|
|
21106
|
+
function resolveSecureDownloadsDiskCachePath() {
|
|
21107
|
+
if (cacheState.pathOverride === false) return void 0;
|
|
21108
|
+
if (typeof cacheState.pathOverride === "string") return cacheState.pathOverride;
|
|
21109
|
+
const fromEnv = process.env.XY_NPM_DOWNLOADS_CACHE;
|
|
21110
|
+
if (fromEnv === "0" || fromEnv === "off") return void 0;
|
|
21111
|
+
if (fromEnv !== void 0 && fromEnv.length > 0) return fromEnv;
|
|
21112
|
+
if (process.env.VITEST === "true") return void 0;
|
|
21113
|
+
return defaultSecureDownloadsDiskCachePath();
|
|
21114
|
+
}
|
|
21115
|
+
function emptyCacheFile() {
|
|
21116
|
+
return {
|
|
21117
|
+
packages: {},
|
|
21118
|
+
version: CACHE_VERSION
|
|
21119
|
+
};
|
|
21120
|
+
}
|
|
21121
|
+
function isCacheFile(value) {
|
|
21122
|
+
if (typeof value !== "object" || value === null || Array.isArray(value)) return false;
|
|
21123
|
+
const record = value;
|
|
21124
|
+
return record.version === CACHE_VERSION && typeof record.packages === "object" && record.packages !== null && !Array.isArray(record.packages);
|
|
21125
|
+
}
|
|
21126
|
+
function readCacheFile(filePath) {
|
|
21127
|
+
try {
|
|
21128
|
+
const parsed = JSON.parse(fs.readFileSync(filePath, "utf8"));
|
|
21129
|
+
if (isCacheFile(parsed)) return parsed;
|
|
21130
|
+
} catch {}
|
|
21131
|
+
return emptyCacheFile();
|
|
21132
|
+
}
|
|
21133
|
+
function loadCacheFile() {
|
|
21134
|
+
const filePath = resolveSecureDownloadsDiskCachePath();
|
|
21135
|
+
if (filePath === void 0) return void 0;
|
|
21136
|
+
cacheState.file ??= readCacheFile(filePath);
|
|
21137
|
+
return cacheState.file;
|
|
21138
|
+
}
|
|
21139
|
+
function persistCacheFile(file) {
|
|
21140
|
+
const filePath = resolveSecureDownloadsDiskCachePath();
|
|
21141
|
+
if (filePath === void 0) return;
|
|
21142
|
+
try {
|
|
21143
|
+
fs.mkdirSync(PATH.dirname(filePath), { recursive: true });
|
|
21144
|
+
const tempPath = `${filePath}.${String(process.pid)}.tmp`;
|
|
21145
|
+
fs.writeFileSync(tempPath, `${JSON.stringify(file)}\n`);
|
|
21146
|
+
fs.renameSync(tempPath, filePath);
|
|
21147
|
+
} catch {}
|
|
21148
|
+
}
|
|
21149
|
+
function readSecureWeeklyDownloadsCache(packageName) {
|
|
21150
|
+
const file = loadCacheFile();
|
|
21151
|
+
if (file === void 0) return void 0;
|
|
21152
|
+
const entry = file.packages[packageName];
|
|
21153
|
+
if (entry === void 0) return void 0;
|
|
21154
|
+
if (!Number.isFinite(entry.downloads) || !Number.isFinite(entry.fetchedAt)) return void 0;
|
|
21155
|
+
if (cacheState.now() - entry.fetchedAt > CACHE_TTL_MS) return void 0;
|
|
21156
|
+
return entry.downloads;
|
|
21157
|
+
}
|
|
21158
|
+
function writeSecureWeeklyDownloadsCache(packageName, downloads) {
|
|
21159
|
+
const file = loadCacheFile();
|
|
21160
|
+
if (file === void 0) return;
|
|
21161
|
+
file.packages[packageName] = {
|
|
21162
|
+
downloads,
|
|
21163
|
+
fetchedAt: cacheState.now()
|
|
21164
|
+
};
|
|
21165
|
+
persistCacheFile(file);
|
|
21166
|
+
}
|
|
21167
|
+
const DOWNLOAD_RETRY_MAX_MS = 3e4;
|
|
21168
|
+
const DOWNLOAD_RETRY_STATUSES = /* @__PURE__ */ new Set([
|
|
21169
|
+
429,
|
|
21170
|
+
502,
|
|
21171
|
+
503,
|
|
21172
|
+
504
|
|
21173
|
+
]);
|
|
21174
|
+
function downloadRetryWaitMs(attempt, retryAfter) {
|
|
21175
|
+
if (retryAfter != null && retryAfter.length > 0) {
|
|
21176
|
+
const seconds = Number(retryAfter);
|
|
21177
|
+
if (Number.isFinite(seconds) && seconds >= 0) return Math.min(seconds * 1e3, DOWNLOAD_RETRY_MAX_MS);
|
|
21178
|
+
const dateMs = Date.parse(retryAfter);
|
|
21179
|
+
if (!Number.isNaN(dateMs)) return Math.min(Math.max(0, dateMs - Date.now()), DOWNLOAD_RETRY_MAX_MS);
|
|
21180
|
+
}
|
|
21181
|
+
return Math.min(500 * 2 ** attempt, DOWNLOAD_RETRY_MAX_MS);
|
|
21182
|
+
}
|
|
21183
|
+
function createDownloadRequestGate(options) {
|
|
21184
|
+
const minIntervalMs = options.minIntervalMs ?? 200;
|
|
21185
|
+
const now = options.now ?? Date.now;
|
|
21186
|
+
let lastStart = 0;
|
|
21187
|
+
let pausedUntil = 0;
|
|
21188
|
+
let tail = Promise.resolve();
|
|
21189
|
+
function noteRateLimit(waitMs) {
|
|
21190
|
+
pausedUntil = Math.max(pausedUntil, now() + Math.max(0, waitMs));
|
|
21191
|
+
}
|
|
21192
|
+
function reset() {
|
|
21193
|
+
lastStart = 0;
|
|
21194
|
+
pausedUntil = 0;
|
|
21195
|
+
tail = Promise.resolve();
|
|
21196
|
+
}
|
|
21197
|
+
async function schedule(task) {
|
|
21198
|
+
const previous = tail;
|
|
21199
|
+
const next = Promise.withResolvers();
|
|
21200
|
+
tail = next.promise;
|
|
21201
|
+
await previous;
|
|
21202
|
+
try {
|
|
21203
|
+
const wait = Math.max(0, lastStart + minIntervalMs - now(), pausedUntil - now());
|
|
21204
|
+
if (wait > 0) await options.sleep(wait);
|
|
21205
|
+
lastStart = now();
|
|
21206
|
+
return await task();
|
|
21207
|
+
} finally {
|
|
21208
|
+
next.resolve();
|
|
21209
|
+
}
|
|
21210
|
+
}
|
|
21211
|
+
return {
|
|
21212
|
+
noteRateLimit,
|
|
21213
|
+
reset,
|
|
21214
|
+
schedule
|
|
21215
|
+
};
|
|
21216
|
+
}
|
|
21217
|
+
//#endregion
|
|
21089
21218
|
//#region src/lib/secure/fetchPackageSecurityMetadata.ts
|
|
21090
|
-
const REGISTRY_BASE$
|
|
21219
|
+
const REGISTRY_BASE$3 = "https://registry.npmjs.org";
|
|
21091
21220
|
const DOWNLOADS_BASE = "https://api.npmjs.org/downloads/point/last-week";
|
|
21092
21221
|
const BULK_DOWNLOADS_CHUNK_SIZE = 100;
|
|
21093
|
-
const SCOPED_DOWNLOADS_CONCURRENCY =
|
|
21222
|
+
const SCOPED_DOWNLOADS_CONCURRENCY = 1;
|
|
21223
|
+
const SCOPED_DOWNLOADS_SWEEP_MS = 3e3;
|
|
21094
21224
|
const manifestCache = /* @__PURE__ */ new Map();
|
|
21095
21225
|
const downloadsCache = /* @__PURE__ */ new Map();
|
|
21226
|
+
const gateState = {};
|
|
21227
|
+
function isDeprecatedField(value) {
|
|
21228
|
+
return value === true || typeof value === "string" && value.length > 0;
|
|
21229
|
+
}
|
|
21230
|
+
function latestVersion(distTags, versions) {
|
|
21231
|
+
const latest = distTags.latest;
|
|
21232
|
+
if (latest === void 0 || latest.length === 0) return void 0;
|
|
21233
|
+
return versions[latest];
|
|
21234
|
+
}
|
|
21235
|
+
function isLatestVersionDeprecated(distTags, versions) {
|
|
21236
|
+
return isDeprecatedField(latestVersion(distTags, versions)?.deprecated);
|
|
21237
|
+
}
|
|
21238
|
+
function isLatestVersionPublic(distTags, versions) {
|
|
21239
|
+
return latestVersion(distTags, versions)?.publishConfig?.access === "public";
|
|
21240
|
+
}
|
|
21241
|
+
function defaultSleep(ms) {
|
|
21242
|
+
return new Promise((resolve) => {
|
|
21243
|
+
setTimeout(resolve, ms);
|
|
21244
|
+
});
|
|
21245
|
+
}
|
|
21246
|
+
function getSharedDownloadGate() {
|
|
21247
|
+
gateState.current ??= createDownloadRequestGate({
|
|
21248
|
+
minIntervalMs: 200,
|
|
21249
|
+
sleep: defaultSleep
|
|
21250
|
+
});
|
|
21251
|
+
return gateState.current;
|
|
21252
|
+
}
|
|
21253
|
+
function resolveDownloadGate(options) {
|
|
21254
|
+
if (options.gate !== void 0) return options.gate;
|
|
21255
|
+
if (options.sleep !== void 0) return createDownloadRequestGate({
|
|
21256
|
+
minIntervalMs: 0,
|
|
21257
|
+
sleep: options.sleep
|
|
21258
|
+
});
|
|
21259
|
+
return getSharedDownloadGate();
|
|
21260
|
+
}
|
|
21261
|
+
function readRetryAfter(res) {
|
|
21262
|
+
return res.headers?.get?.("retry-after") ?? null;
|
|
21263
|
+
}
|
|
21096
21264
|
function packageUrlSegment(packageName) {
|
|
21097
21265
|
return encodeURIComponent(packageName);
|
|
21098
21266
|
}
|
|
@@ -21106,13 +21274,17 @@ function chunks(items, size) {
|
|
|
21106
21274
|
}
|
|
21107
21275
|
async function fetchManifestUncached(packageName) {
|
|
21108
21276
|
try {
|
|
21109
|
-
const res = await fetch(`${REGISTRY_BASE$
|
|
21277
|
+
const res = await fetch(`${REGISTRY_BASE$3}/${packageUrlSegment(packageName)}`, { headers: { Accept: "application/json" } });
|
|
21110
21278
|
if (!res.ok) return void 0;
|
|
21111
21279
|
const data = await res.json();
|
|
21280
|
+
const distTags = data["dist-tags"] ?? {};
|
|
21281
|
+
const versions = data.versions ?? {};
|
|
21112
21282
|
return {
|
|
21113
|
-
distTags
|
|
21283
|
+
...isLatestVersionDeprecated(distTags, versions) && { deprecated: true },
|
|
21284
|
+
distTags,
|
|
21285
|
+
...isLatestVersionPublic(distTags, versions) && { public: true },
|
|
21114
21286
|
time: data.time ?? {},
|
|
21115
|
-
versions: Object.keys(
|
|
21287
|
+
versions: Object.keys(versions)
|
|
21116
21288
|
};
|
|
21117
21289
|
} catch {
|
|
21118
21290
|
return;
|
|
@@ -21125,32 +21297,53 @@ function fetchSecureRegistryManifest(packageName) {
|
|
|
21125
21297
|
manifestCache.set(packageName, pending);
|
|
21126
21298
|
return pending;
|
|
21127
21299
|
}
|
|
21128
|
-
async function fetchDownloadsUncached(packageName) {
|
|
21129
|
-
|
|
21130
|
-
|
|
21131
|
-
|
|
21132
|
-
const
|
|
21133
|
-
|
|
21300
|
+
async function fetchDownloadsUncached(packageName, options = {}) {
|
|
21301
|
+
const gate = resolveDownloadGate(options);
|
|
21302
|
+
const url = `${DOWNLOADS_BASE}/${packageUrlSegment(packageName)}`;
|
|
21303
|
+
for (let attempt = 0; attempt < 6; attempt++) try {
|
|
21304
|
+
const res = await gate.schedule(() => fetch(url));
|
|
21305
|
+
if (res.ok) {
|
|
21306
|
+
const data = await res.json();
|
|
21307
|
+
return typeof data.downloads === "number" ? data.downloads : void 0;
|
|
21308
|
+
}
|
|
21309
|
+
if (res.status === 404) return 0;
|
|
21310
|
+
if (DOWNLOAD_RETRY_STATUSES.has(res.status) && attempt < 5) {
|
|
21311
|
+
gate.noteRateLimit(downloadRetryWaitMs(attempt, readRetryAfter(res)));
|
|
21312
|
+
continue;
|
|
21313
|
+
}
|
|
21314
|
+
return;
|
|
21134
21315
|
} catch {
|
|
21135
21316
|
return;
|
|
21136
21317
|
}
|
|
21137
21318
|
}
|
|
21138
|
-
function fetchSecureWeeklyDownloads(packageName) {
|
|
21319
|
+
function fetchSecureWeeklyDownloads(packageName, options = {}) {
|
|
21139
21320
|
const cached = downloadsCache.get(packageName);
|
|
21140
21321
|
if (cached) return cached;
|
|
21141
|
-
const
|
|
21322
|
+
const fromDisk = readSecureWeeklyDownloadsCache(packageName);
|
|
21323
|
+
if (fromDisk !== void 0) return Promise.resolve(fromDisk);
|
|
21324
|
+
const pending = (async () => {
|
|
21325
|
+
const value = await fetchDownloadsUncached(packageName, options);
|
|
21326
|
+
if (value === void 0) {
|
|
21327
|
+
downloadsCache.delete(packageName);
|
|
21328
|
+
return;
|
|
21329
|
+
}
|
|
21330
|
+
writeSecureWeeklyDownloadsCache(packageName, value);
|
|
21331
|
+
return value;
|
|
21332
|
+
})();
|
|
21142
21333
|
downloadsCache.set(packageName, pending);
|
|
21143
21334
|
return pending;
|
|
21144
21335
|
}
|
|
21145
|
-
async function fetchBulkWeeklyDownloads(packageNames) {
|
|
21336
|
+
async function fetchBulkWeeklyDownloads(packageNames, options = {}) {
|
|
21146
21337
|
const results = /* @__PURE__ */ new Map();
|
|
21147
21338
|
if (packageNames.length === 0) return results;
|
|
21339
|
+
const gate = resolveDownloadGate(options);
|
|
21148
21340
|
try {
|
|
21149
21341
|
const packageSegment = packageNames.map(packageUrlSegment).join(",");
|
|
21150
|
-
const res = await fetch(`${DOWNLOADS_BASE}/${packageSegment}`);
|
|
21342
|
+
const res = await gate.schedule(() => fetch(`${DOWNLOADS_BASE}/${packageSegment}`));
|
|
21151
21343
|
if (!res.ok) {
|
|
21344
|
+
if (DOWNLOAD_RETRY_STATUSES.has(res.status)) gate.noteRateLimit(downloadRetryWaitMs(0, readRetryAfter(res)));
|
|
21152
21345
|
await runWithConcurrency(packageNames, SCOPED_DOWNLOADS_CONCURRENCY, async (name) => {
|
|
21153
|
-
results.set(name, await fetchSecureWeeklyDownloads(name));
|
|
21346
|
+
results.set(name, await fetchSecureWeeklyDownloads(name, options));
|
|
21154
21347
|
});
|
|
21155
21348
|
return results;
|
|
21156
21349
|
}
|
|
@@ -21161,33 +21354,90 @@ async function fetchBulkWeeklyDownloads(packageNames) {
|
|
|
21161
21354
|
}
|
|
21162
21355
|
} catch {
|
|
21163
21356
|
await runWithConcurrency(packageNames, SCOPED_DOWNLOADS_CONCURRENCY, async (name) => {
|
|
21164
|
-
results.set(name, await fetchSecureWeeklyDownloads(name));
|
|
21357
|
+
results.set(name, await fetchSecureWeeklyDownloads(name, options));
|
|
21165
21358
|
});
|
|
21166
21359
|
}
|
|
21167
21360
|
return results;
|
|
21168
21361
|
}
|
|
21169
|
-
async function fetchAllSecureWeeklyDownloads(packageNames, concurrency = SCOPED_DOWNLOADS_CONCURRENCY) {
|
|
21362
|
+
async function fetchAllSecureWeeklyDownloads(packageNames, concurrency = SCOPED_DOWNLOADS_CONCURRENCY, options = {}) {
|
|
21170
21363
|
const uniqueNames = [...new Set(packageNames)].toSorted((a, b) => a.localeCompare(b));
|
|
21171
21364
|
const unscopedNames = uniqueNames.filter((name) => !isScopedPackageName(name));
|
|
21172
21365
|
const scopedNames = uniqueNames.filter(isScopedPackageName);
|
|
21173
21366
|
const results = /* @__PURE__ */ new Map();
|
|
21367
|
+
const sleep = options.sleep ?? defaultSleep;
|
|
21368
|
+
let gate = options.gate;
|
|
21369
|
+
if (gate === void 0) gate = options.sleep === void 0 ? getSharedDownloadGate() : createDownloadRequestGate({
|
|
21370
|
+
minIntervalMs: 0,
|
|
21371
|
+
sleep
|
|
21372
|
+
});
|
|
21373
|
+
const fetchOptions = {
|
|
21374
|
+
...options,
|
|
21375
|
+
gate,
|
|
21376
|
+
sleep
|
|
21377
|
+
};
|
|
21378
|
+
const total = uniqueNames.length;
|
|
21379
|
+
const onProgress = options.onProgress;
|
|
21380
|
+
let completed = 0;
|
|
21381
|
+
let cached = 0;
|
|
21382
|
+
function reportDownloads(name) {
|
|
21383
|
+
onProgress?.({
|
|
21384
|
+
cached,
|
|
21385
|
+
completed,
|
|
21386
|
+
phase: "downloads",
|
|
21387
|
+
total,
|
|
21388
|
+
...name !== void 0 && { name }
|
|
21389
|
+
});
|
|
21390
|
+
}
|
|
21174
21391
|
await runWithConcurrency(chunks(unscopedNames, BULK_DOWNLOADS_CHUNK_SIZE), 1, async (chunk) => {
|
|
21175
|
-
const chunkResults = await fetchBulkWeeklyDownloads(chunk);
|
|
21176
|
-
for (const [name, downloads] of chunkResults)
|
|
21392
|
+
const chunkResults = await fetchBulkWeeklyDownloads(chunk, fetchOptions);
|
|
21393
|
+
for (const [name, downloads] of chunkResults) {
|
|
21394
|
+
results.set(name, downloads);
|
|
21395
|
+
completed += 1;
|
|
21396
|
+
reportDownloads(name);
|
|
21397
|
+
}
|
|
21177
21398
|
});
|
|
21178
|
-
|
|
21179
|
-
|
|
21399
|
+
const scopedConcurrency = Math.max(1, Math.min(concurrency, SCOPED_DOWNLOADS_CONCURRENCY));
|
|
21400
|
+
let remaining = scopedNames.filter((name) => {
|
|
21401
|
+
const fromDisk = readSecureWeeklyDownloadsCache(name);
|
|
21402
|
+
if (fromDisk === void 0) return true;
|
|
21403
|
+
results.set(name, fromDisk);
|
|
21404
|
+
cached += 1;
|
|
21405
|
+
completed += 1;
|
|
21406
|
+
reportDownloads(name);
|
|
21407
|
+
return false;
|
|
21180
21408
|
});
|
|
21409
|
+
for (let pass = 0; pass < 2 && remaining.length > 0; pass++) {
|
|
21410
|
+
if (pass > 0) await sleep(options.sweepDelayMs ?? SCOPED_DOWNLOADS_SWEEP_MS);
|
|
21411
|
+
const stillMissing = [];
|
|
21412
|
+
await runWithConcurrency(remaining, scopedConcurrency, async (name) => {
|
|
21413
|
+
const downloads = await fetchSecureWeeklyDownloads(name, fetchOptions);
|
|
21414
|
+
if (downloads === void 0) stillMissing.push(name);
|
|
21415
|
+
else results.set(name, downloads);
|
|
21416
|
+
if (pass === 0) completed += 1;
|
|
21417
|
+
reportDownloads(name);
|
|
21418
|
+
});
|
|
21419
|
+
remaining = stillMissing;
|
|
21420
|
+
}
|
|
21421
|
+
for (const name of remaining) results.set(name, void 0);
|
|
21181
21422
|
return results;
|
|
21182
21423
|
}
|
|
21183
|
-
async function fetchAllSecurePackageMetadata(packageNames, concurrency = 16) {
|
|
21424
|
+
async function fetchAllSecurePackageMetadata(packageNames, concurrency = 16, options = {}) {
|
|
21184
21425
|
const uniqueNames = [...new Set(packageNames)].toSorted((a, b) => a.localeCompare(b));
|
|
21185
21426
|
const manifests = /* @__PURE__ */ new Map();
|
|
21186
21427
|
const results = /* @__PURE__ */ new Map();
|
|
21428
|
+
const total = uniqueNames.length;
|
|
21429
|
+
let manifestCompleted = 0;
|
|
21187
21430
|
await runWithConcurrency(uniqueNames, concurrency, async (name) => {
|
|
21188
21431
|
manifests.set(name, await fetchSecureRegistryManifest(name));
|
|
21432
|
+
manifestCompleted += 1;
|
|
21433
|
+
options.onProgress?.({
|
|
21434
|
+
completed: manifestCompleted,
|
|
21435
|
+
name,
|
|
21436
|
+
phase: "manifests",
|
|
21437
|
+
total
|
|
21438
|
+
});
|
|
21189
21439
|
});
|
|
21190
|
-
const downloads = await fetchAllSecureWeeklyDownloads(uniqueNames, concurrency);
|
|
21440
|
+
const downloads = await fetchAllSecureWeeklyDownloads(options.skipDeprecatedDownloads === true ? uniqueNames.filter((name) => manifests.get(name)?.deprecated !== true) : uniqueNames, concurrency, { onProgress: options.onProgress });
|
|
21191
21441
|
for (const name of uniqueNames) results.set(name, {
|
|
21192
21442
|
downloads: downloads.get(name),
|
|
21193
21443
|
manifest: manifests.get(name)
|
|
@@ -21456,6 +21706,20 @@ function tryRunLocalScript(commandName, options = {}) {
|
|
|
21456
21706
|
}).status ?? 1;
|
|
21457
21707
|
}
|
|
21458
21708
|
//#endregion
|
|
21709
|
+
//#region src/lib/updo/isRegistryDependencySpec.ts
|
|
21710
|
+
/**
|
|
21711
|
+
* Registry ranges and tags have no protocol or path. Preserve local, Git,
|
|
21712
|
+
* tarball, catalog, and other indirect references instead of looking up their
|
|
21713
|
+
* declaration names on the registry or replacing them with version ranges.
|
|
21714
|
+
* Supported npm aliases still refer to registry versions.
|
|
21715
|
+
*/
|
|
21716
|
+
function isRegistryDependencySpec(spec) {
|
|
21717
|
+
const normalized = spec.trim();
|
|
21718
|
+
const versionSpec = parseAliasSpec(normalized)?.range ?? normalized;
|
|
21719
|
+
if (versionSpec === "." || versionSpec === ".." || /\.(?:tgz|tar\.gz)$/i.test(versionSpec)) return false;
|
|
21720
|
+
return !/^[a-z][a-z\d+.-]*:/i.test(versionSpec) && !/[/\\]/.test(versionSpec);
|
|
21721
|
+
}
|
|
21722
|
+
//#endregion
|
|
21459
21723
|
//#region src/lib/updo/applyUpdates.ts
|
|
21460
21724
|
function isSimpleRange(range) {
|
|
21461
21725
|
const trimmed = range.trim();
|
|
@@ -21466,6 +21730,7 @@ function shouldApplyToBag(bag, updateMap) {
|
|
|
21466
21730
|
if (!bag) return false;
|
|
21467
21731
|
let isChanged = false;
|
|
21468
21732
|
for (const name of Object.keys(bag)) {
|
|
21733
|
+
if (!isRegistryDependencySpec(bag[name])) continue;
|
|
21469
21734
|
const update = updateMap.get(name);
|
|
21470
21735
|
if (!update) continue;
|
|
21471
21736
|
if (bag[name] !== update.targetRange) {
|
|
@@ -21480,6 +21745,7 @@ function shouldApplyToPeerBag(pkg, updateMap) {
|
|
|
21480
21745
|
if (peer === void 0) return false;
|
|
21481
21746
|
let isChanged = false;
|
|
21482
21747
|
for (const name of Object.keys(peer)) {
|
|
21748
|
+
if (!isRegistryDependencySpec(peer[name])) continue;
|
|
21483
21749
|
const update = updateMap.get(name);
|
|
21484
21750
|
if (!update) continue;
|
|
21485
21751
|
if (pkg.dependencies?.[name] !== void 0) continue;
|
|
@@ -21555,7 +21821,7 @@ function collectWorkspaceDeps(cwd, workspaces, workspaceNames) {
|
|
|
21555
21821
|
}
|
|
21556
21822
|
//#endregion
|
|
21557
21823
|
//#region src/lib/updo/fetchRegistryInfo.ts
|
|
21558
|
-
const REGISTRY_BASE$
|
|
21824
|
+
const REGISTRY_BASE$2 = "https://registry.npmjs.org";
|
|
21559
21825
|
const VIEW_FIELDS = [
|
|
21560
21826
|
"versions",
|
|
21561
21827
|
"dist-tags",
|
|
@@ -21606,7 +21872,7 @@ function resolveRegistry(packageName, config) {
|
|
|
21606
21872
|
const scoped = config.scopeRegistries.get(scope);
|
|
21607
21873
|
if (scoped != null && scoped.length > 0) return scoped;
|
|
21608
21874
|
}
|
|
21609
|
-
return REGISTRY_BASE$
|
|
21875
|
+
return REGISTRY_BASE$2;
|
|
21610
21876
|
}
|
|
21611
21877
|
function combineOutput(stdout, stderr) {
|
|
21612
21878
|
return [stdout, stderr].filter(Boolean).join("\n").trim();
|
|
@@ -21880,13 +22146,13 @@ async function fetchAllRegistryInfo(packageNames, options = {}) {
|
|
|
21880
22146
|
return await fetchAllRegistryInfoDirect(packageNames, options);
|
|
21881
22147
|
}
|
|
21882
22148
|
//#endregion
|
|
21883
|
-
//#region ../../node_modules/.pnpm/@inquirer+core@12.0.
|
|
22149
|
+
//#region ../../node_modules/.pnpm/@inquirer+core@12.0.3_@types+node@26.6.0/node_modules/@inquirer/core/dist/lib/key.js
|
|
21884
22150
|
const isUpKey = (key, keybindings = []) => key.name === "up" || keybindings.includes("vim") && key.name === "k" || keybindings.includes("emacs") && key.ctrl && key.name === "p";
|
|
21885
22151
|
const isDownKey = (key, keybindings = []) => key.name === "down" || keybindings.includes("vim") && key.name === "j" || keybindings.includes("emacs") && key.ctrl && key.name === "n";
|
|
21886
22152
|
const isSpaceKey = (key) => key.name === "space";
|
|
21887
22153
|
const isEnterKey = (key) => key.name === "enter" || key.name === "return";
|
|
21888
22154
|
//#endregion
|
|
21889
|
-
//#region ../../node_modules/.pnpm/@inquirer+core@12.0.
|
|
22155
|
+
//#region ../../node_modules/.pnpm/@inquirer+core@12.0.3_@types+node@26.6.0/node_modules/@inquirer/core/dist/lib/errors.js
|
|
21890
22156
|
var AbortPromptError = class extends Error {
|
|
21891
22157
|
name = "AbortPromptError";
|
|
21892
22158
|
message = "Prompt was aborted";
|
|
@@ -21909,7 +22175,7 @@ var ValidationError = class extends Error {
|
|
|
21909
22175
|
name = "ValidationError";
|
|
21910
22176
|
};
|
|
21911
22177
|
//#endregion
|
|
21912
|
-
//#region ../../node_modules/.pnpm/@inquirer+core@12.0.
|
|
22178
|
+
//#region ../../node_modules/.pnpm/@inquirer+core@12.0.3_@types+node@26.6.0/node_modules/@inquirer/core/dist/lib/hook-engine.js
|
|
21913
22179
|
const hookStorage = new AsyncLocalStorage();
|
|
21914
22180
|
function createStore(rl) {
|
|
21915
22181
|
return {
|
|
@@ -22005,7 +22271,7 @@ const effectScheduler = {
|
|
|
22005
22271
|
}
|
|
22006
22272
|
};
|
|
22007
22273
|
//#endregion
|
|
22008
|
-
//#region ../../node_modules/.pnpm/@inquirer+core@12.0.
|
|
22274
|
+
//#region ../../node_modules/.pnpm/@inquirer+core@12.0.3_@types+node@26.6.0/node_modules/@inquirer/core/dist/lib/use-state.js
|
|
22009
22275
|
function isFactory(value) {
|
|
22010
22276
|
return typeof value === "function";
|
|
22011
22277
|
}
|
|
@@ -22029,7 +22295,7 @@ function useState(defaultValue) {
|
|
|
22029
22295
|
});
|
|
22030
22296
|
}
|
|
22031
22297
|
//#endregion
|
|
22032
|
-
//#region ../../node_modules/.pnpm/@inquirer+core@12.0.
|
|
22298
|
+
//#region ../../node_modules/.pnpm/@inquirer+core@12.0.3_@types+node@26.6.0/node_modules/@inquirer/core/dist/lib/use-effect.js
|
|
22033
22299
|
function useEffect(cb, depArray) {
|
|
22034
22300
|
withPointer((pointer) => {
|
|
22035
22301
|
const oldDeps = pointer.get();
|
|
@@ -22038,12 +22304,12 @@ function useEffect(cb, depArray) {
|
|
|
22038
22304
|
});
|
|
22039
22305
|
}
|
|
22040
22306
|
//#endregion
|
|
22041
|
-
//#region ../../node_modules/.pnpm/@inquirer+core@12.0.
|
|
22307
|
+
//#region ../../node_modules/.pnpm/@inquirer+core@12.0.3_@types+node@26.6.0/node_modules/@inquirer/core/dist/lib/use-ref.js
|
|
22042
22308
|
function useRef(val) {
|
|
22043
22309
|
return useState({ current: val })[0];
|
|
22044
22310
|
}
|
|
22045
22311
|
//#endregion
|
|
22046
|
-
//#region ../../node_modules/.pnpm/@inquirer+core@12.0.
|
|
22312
|
+
//#region ../../node_modules/.pnpm/@inquirer+core@12.0.3_@types+node@26.6.0/node_modules/@inquirer/core/dist/lib/use-keypress.js
|
|
22047
22313
|
function useKeypress(userHandler) {
|
|
22048
22314
|
const signal = useRef(userHandler);
|
|
22049
22315
|
signal.current = userHandler;
|
|
@@ -22371,7 +22637,7 @@ function wrapAnsi$1(string, columns, options) {
|
|
|
22371
22637
|
return String(string).normalize().split(CRLF_OR_LF).map((line) => exec$2(line, columns, options)).join("\n");
|
|
22372
22638
|
}
|
|
22373
22639
|
//#endregion
|
|
22374
|
-
//#region ../../node_modules/.pnpm/@inquirer+core@12.0.
|
|
22640
|
+
//#region ../../node_modules/.pnpm/@inquirer+core@12.0.3_@types+node@26.6.0/node_modules/@inquirer/core/dist/lib/utils.js
|
|
22375
22641
|
var import_cli_width = /* @__PURE__ */ __toESM(require_cli_width(), 1);
|
|
22376
22642
|
/**
|
|
22377
22643
|
* Force line returns at specific width. This function is ANSI code friendly and it'll
|
|
@@ -22711,7 +22977,7 @@ const eraseLine = "\x1B[2K";
|
|
|
22711
22977
|
/** Erase the specified number of lines above the cursor */
|
|
22712
22978
|
const eraseLines = (lines) => lines > 0 ? (eraseLine + cursorUp(1)).repeat(lines - 1) + "\x1B[2K\x1B[G" : "";
|
|
22713
22979
|
//#endregion
|
|
22714
|
-
//#region ../../node_modules/.pnpm/@inquirer+core@12.0.
|
|
22980
|
+
//#region ../../node_modules/.pnpm/@inquirer+core@12.0.3_@types+node@26.6.0/node_modules/@inquirer/core/dist/lib/screen-manager.js
|
|
22715
22981
|
const height = (content) => content.split("\n").length;
|
|
22716
22982
|
const lastLine = (content) => content.split("\n").pop() ?? "";
|
|
22717
22983
|
var ScreenManager = class {
|
|
@@ -22768,7 +23034,7 @@ var ScreenManager = class {
|
|
|
22768
23034
|
}
|
|
22769
23035
|
};
|
|
22770
23036
|
//#endregion
|
|
22771
|
-
//#region ../../node_modules/.pnpm/@inquirer+core@12.0.
|
|
23037
|
+
//#region ../../node_modules/.pnpm/@inquirer+core@12.0.3_@types+node@26.6.0/node_modules/@inquirer/core/dist/lib/promise-polyfill.js
|
|
22772
23038
|
var PromisePolyfill = class extends Promise {
|
|
22773
23039
|
static withResolver() {
|
|
22774
23040
|
let resolve;
|
|
@@ -22784,9 +23050,21 @@ var PromisePolyfill = class extends Promise {
|
|
|
22784
23050
|
}
|
|
22785
23051
|
};
|
|
22786
23052
|
//#endregion
|
|
22787
|
-
//#region ../../node_modules/.pnpm/@inquirer+core@12.0.
|
|
23053
|
+
//#region ../../node_modules/.pnpm/@inquirer+core@12.0.3_@types+node@26.6.0/node_modules/@inquirer/core/dist/lib/create-prompt.js
|
|
22788
23054
|
var import_lib = /* @__PURE__ */ __toESM(require_lib(), 1);
|
|
22789
23055
|
const nativeSetImmediate = globalThis.setImmediate;
|
|
23056
|
+
/**
|
|
23057
|
+
* Register an event listener and return its disposer, so registrations collapse
|
|
23058
|
+
* into a single statement: `cleanups.add(listenTo(rl, 'close', handler))`.
|
|
23059
|
+
*/
|
|
23060
|
+
function listenTo(target, event, listener) {
|
|
23061
|
+
if ("on" in target) {
|
|
23062
|
+
target.on(event, listener);
|
|
23063
|
+
return () => target.removeListener(event, listener);
|
|
23064
|
+
}
|
|
23065
|
+
target.addEventListener(event, listener);
|
|
23066
|
+
return () => target.removeEventListener(event, listener);
|
|
23067
|
+
}
|
|
22790
23068
|
function getCallSites() {
|
|
22791
23069
|
const savedPrepareStackTrace = Error.prepareStackTrace;
|
|
22792
23070
|
let result = [];
|
|
@@ -22818,36 +23096,44 @@ function createPrompt(view) {
|
|
|
22818
23096
|
output.mute();
|
|
22819
23097
|
const screen = new ScreenManager(rl);
|
|
22820
23098
|
const { promise, resolve, reject } = PromisePolyfill.withResolver();
|
|
22821
|
-
const cancel = () => reject(new CancelPromptError());
|
|
22822
|
-
if (signal) {
|
|
22823
|
-
const abort = () => reject(new AbortPromptError({ cause: signal.reason }));
|
|
22824
|
-
if (signal.aborted) {
|
|
22825
|
-
abort();
|
|
22826
|
-
return Object.assign(promise, { cancel });
|
|
22827
|
-
}
|
|
22828
|
-
signal.addEventListener("abort", abort);
|
|
22829
|
-
cleanups.add(() => signal.removeEventListener("abort", abort));
|
|
22830
|
-
}
|
|
22831
|
-
cleanups.add(onExit((code, signal) => {
|
|
22832
|
-
reject(new ExitPromptError(`User force closed the prompt with ${code} ${signal}`));
|
|
22833
|
-
}));
|
|
22834
|
-
const sigint = () => reject(new ExitPromptError(`User force closed the prompt with SIGINT`));
|
|
22835
|
-
rl.on("SIGINT", sigint);
|
|
22836
|
-
cleanups.add(() => rl.removeListener("SIGINT", sigint));
|
|
22837
23099
|
return withHooks(rl, (cycle) => {
|
|
22838
|
-
const
|
|
22839
|
-
|
|
22840
|
-
|
|
23100
|
+
const clearEffects = AsyncResource.bind(() => effectScheduler.clearAll());
|
|
23101
|
+
const settlePrompt = (settle) => {
|
|
23102
|
+
try {
|
|
23103
|
+
clearEffects();
|
|
23104
|
+
settle();
|
|
23105
|
+
} catch (error) {
|
|
23106
|
+
reject(error);
|
|
23107
|
+
}
|
|
23108
|
+
};
|
|
23109
|
+
const resolvePrompt = (value) => settlePrompt(() => resolve(value));
|
|
23110
|
+
const rejectPrompt = (error) => settlePrompt(() => reject(error));
|
|
23111
|
+
const promptPromise = Object.assign(promise.finally(() => {
|
|
23112
|
+
cleanups.forEach((cleanup) => cleanup());
|
|
23113
|
+
screen.done({ clearContent: Boolean(context.clearPromptOnDone) });
|
|
23114
|
+
output.end();
|
|
23115
|
+
}).then(() => promise), { cancel: () => rejectPrompt(new CancelPromptError()) });
|
|
23116
|
+
if (signal) {
|
|
23117
|
+
const abort = () => rejectPrompt(new AbortPromptError({ cause: signal.reason }));
|
|
23118
|
+
if (signal.aborted) {
|
|
23119
|
+
abort();
|
|
23120
|
+
return promptPromise;
|
|
23121
|
+
}
|
|
23122
|
+
cleanups.add(listenTo(signal, "abort", abort));
|
|
23123
|
+
}
|
|
23124
|
+
cleanups.add(onExit((code, signal) => {
|
|
23125
|
+
rejectPrompt(new ExitPromptError(`User force closed the prompt with ${code} ${signal}`));
|
|
23126
|
+
}));
|
|
23127
|
+
cleanups.add(listenTo(rl, "SIGINT", () => rejectPrompt(new ExitPromptError(`User force closed the prompt with SIGINT`))));
|
|
23128
|
+
cleanups.add(listenTo(rl, "close", clearEffects));
|
|
22841
23129
|
const startCycle = () => {
|
|
22842
|
-
|
|
22843
|
-
rl.input.on("keypress", checkCursorPos);
|
|
22844
|
-
cleanups.add(() => rl.input.removeListener("keypress", checkCursorPos));
|
|
23130
|
+
cleanups.add(listenTo(rl.input, "keypress", () => screen.checkCursorPos()));
|
|
22845
23131
|
let pendingDone = null;
|
|
22846
23132
|
cycle(() => {
|
|
22847
23133
|
let effectsSettled = false;
|
|
22848
23134
|
try {
|
|
22849
23135
|
const nextView = view(config, (value) => {
|
|
22850
|
-
if (effectsSettled)
|
|
23136
|
+
if (effectsSettled) resolvePrompt(value);
|
|
22851
23137
|
else pendingDone = { value };
|
|
22852
23138
|
});
|
|
22853
23139
|
if (nextView === void 0) {
|
|
@@ -22859,29 +23145,19 @@ function createPrompt(view) {
|
|
|
22859
23145
|
screen.render(content, bottomContent);
|
|
22860
23146
|
effectScheduler.run();
|
|
22861
23147
|
} catch (error) {
|
|
22862
|
-
|
|
23148
|
+
rejectPrompt(error);
|
|
22863
23149
|
}
|
|
22864
23150
|
effectsSettled = true;
|
|
22865
23151
|
if (pendingDone !== null) {
|
|
22866
23152
|
const { value } = pendingDone;
|
|
22867
23153
|
pendingDone = null;
|
|
22868
|
-
|
|
23154
|
+
resolvePrompt(value);
|
|
22869
23155
|
}
|
|
22870
23156
|
});
|
|
22871
23157
|
};
|
|
22872
23158
|
if ("readableFlowing" in input) nativeSetImmediate(startCycle);
|
|
22873
23159
|
else startCycle();
|
|
22874
|
-
return
|
|
22875
|
-
effectScheduler.clearAll();
|
|
22876
|
-
return answer;
|
|
22877
|
-
}, (error) => {
|
|
22878
|
-
effectScheduler.clearAll();
|
|
22879
|
-
throw error;
|
|
22880
|
-
}).finally(() => {
|
|
22881
|
-
cleanups.forEach((cleanup) => cleanup());
|
|
22882
|
-
screen.done({ clearContent: Boolean(context.clearPromptOnDone) });
|
|
22883
|
-
output.end();
|
|
22884
|
-
}).then(() => promise), { cancel });
|
|
23160
|
+
return promptPromise;
|
|
22885
23161
|
});
|
|
22886
23162
|
};
|
|
22887
23163
|
return prompt;
|
|
@@ -23435,7 +23711,7 @@ async function runUpdo(pm, options = {}) {
|
|
|
23435
23711
|
const workspaceNames = new Set(workspaces.map((ws) => ws.name));
|
|
23436
23712
|
const uniqueDependencyNames = /* @__PURE__ */ new Set();
|
|
23437
23713
|
console.log(chalk.gray("Scanning workspace dependencies..."));
|
|
23438
|
-
const declaredDeps = collectWorkspaceDeps(cwd, workspaces, workspaceNames);
|
|
23714
|
+
const declaredDeps = collectWorkspaceDeps(cwd, workspaces, workspaceNames).filter((dep) => isRegistryDependencySpec(dep.range));
|
|
23439
23715
|
for (const dep of declaredDeps) uniqueDependencyNames.add(dep.registryName);
|
|
23440
23716
|
console.log(chalk.gray(` Found ${uniqueDependencyNames.size} unique dependencies across ${workspaces.length} workspaces`));
|
|
23441
23717
|
const minReleaseAge = resolveMinReleaseAgeFilter(pm.name, cwd);
|
|
@@ -30714,13 +30990,13 @@ const misplacedPeerDependenciesRule = {
|
|
|
30714
30990
|
* Results are cached per-process so repeated lookups within a single
|
|
30715
30991
|
* deplint run hit the registry at most once per package.
|
|
30716
30992
|
*/
|
|
30717
|
-
const REGISTRY_BASE = "https://registry.npmjs.org";
|
|
30993
|
+
const REGISTRY_BASE$1 = "https://registry.npmjs.org";
|
|
30718
30994
|
const cache = /* @__PURE__ */ new Map();
|
|
30719
30995
|
const availabilityCache = /* @__PURE__ */ new Map();
|
|
30720
30996
|
const availabilityLookupState = {};
|
|
30721
30997
|
async function fetchUncached(packageName) {
|
|
30722
30998
|
try {
|
|
30723
|
-
const url = `${REGISTRY_BASE}/${encodeURIComponent(packageName)}`;
|
|
30999
|
+
const url = `${REGISTRY_BASE$1}/${encodeURIComponent(packageName)}`;
|
|
30724
31000
|
const res = await fetch(url, { headers: { Accept: "application/vnd.npm.install-v1+json" } });
|
|
30725
31001
|
if (!res.ok) return void 0;
|
|
30726
31002
|
const data = await res.json();
|
|
@@ -30754,7 +31030,7 @@ async function fetchPackageManifests(packageNames, concurrency = 16) {
|
|
|
30754
31030
|
}
|
|
30755
31031
|
async function fetchNpmjsPublicAvailabilityUncached(packageName) {
|
|
30756
31032
|
try {
|
|
30757
|
-
const url = `${REGISTRY_BASE}/${encodeURIComponent(packageName)}`;
|
|
31033
|
+
const url = `${REGISTRY_BASE$1}/${encodeURIComponent(packageName)}`;
|
|
30758
31034
|
const res = await fetch(url, {
|
|
30759
31035
|
headers: { Accept: "application/vnd.npm.install-v1+json" },
|
|
30760
31036
|
signal: AbortSignal.timeout(1e4)
|
|
@@ -44258,12 +44534,14 @@ function isNodePackage(pkg) {
|
|
|
44258
44534
|
if (pkg.bin !== void 0) return true;
|
|
44259
44535
|
return hasNodeExport(pkg.exports);
|
|
44260
44536
|
}
|
|
44261
|
-
function checkVoltaNodeVersion(cwd, shouldFix) {
|
|
44537
|
+
function checkVoltaNodeVersion(cwd, shouldFix, nodeTrack = "current") {
|
|
44262
44538
|
const rootPath = PATH.resolve(cwd, "package.json");
|
|
44263
44539
|
const rootPkg = readPackageJson$2(rootPath);
|
|
44264
44540
|
if (!rootPkg?.volta) return [];
|
|
44265
44541
|
const pinned = rootPkg.volta.node;
|
|
44266
|
-
const
|
|
44542
|
+
const isLts = nodeTrack === "lts";
|
|
44543
|
+
const latest = isLts ? latestVersions.nodeLts : latestVersions.nodeCurrent;
|
|
44544
|
+
const trackLabel = isLts ? "LTS" : "Current";
|
|
44267
44545
|
if (!(pinned === void 0 || import_semver.default.valid(pinned) === null || import_semver.default.lt(pinned, latest))) return [];
|
|
44268
44546
|
if (shouldFix) {
|
|
44269
44547
|
rootPkg.volta.node = latest;
|
|
@@ -44273,7 +44551,7 @@ function checkVoltaNodeVersion(cwd, shouldFix) {
|
|
|
44273
44551
|
}
|
|
44274
44552
|
return [{
|
|
44275
44553
|
file: "package.json",
|
|
44276
|
-
message: pinned === void 0 ? `Root volta config has no node pin — expected latest
|
|
44554
|
+
message: pinned === void 0 ? `Root volta config has no node pin — expected latest ${trackLabel} node version ${latest}` : `Root volta.node "${pinned}" is older than the latest ${trackLabel} node version ${latest}`,
|
|
44277
44555
|
rule: "volta-node-latest"
|
|
44278
44556
|
}];
|
|
44279
44557
|
}
|
|
@@ -44326,9 +44604,9 @@ function withRuleId(diagnostics, rule) {
|
|
|
44326
44604
|
}
|
|
44327
44605
|
const NODE_LINT_RULES = [
|
|
44328
44606
|
{
|
|
44329
|
-
check: ({ cwd }, { fix }) => ({ diagnostics: withRuleId(checkVoltaNodeVersion(cwd, fix), "node.volta-node-latest") }),
|
|
44607
|
+
check: ({ cwd, nodeTrack }, { fix }) => ({ diagnostics: withRuleId(checkVoltaNodeVersion(cwd, fix, nodeTrack), "node.volta-node-latest") }),
|
|
44330
44608
|
defaultLevel: "warn",
|
|
44331
|
-
description: "Root volta.node tracks the latest
|
|
44609
|
+
description: "Root volta.node tracks the latest Node version",
|
|
44332
44610
|
fixable: true,
|
|
44333
44611
|
id: "node.volta-node-latest"
|
|
44334
44612
|
},
|
|
@@ -44368,13 +44646,15 @@ async function nodeLint(options = {}) {
|
|
|
44368
44646
|
console.log(chalk.green("Node Lint"));
|
|
44369
44647
|
const workspaces = getPackageManager().listWorkspaces();
|
|
44370
44648
|
const locations = workspaces.length > 0 ? workspaces.map((ws) => ws.location) : ["."];
|
|
44649
|
+
const config = await loadWorkspaceCommandConfig(cwd, "nodeLint");
|
|
44371
44650
|
const result = await runRuleChecks({
|
|
44372
44651
|
commandName: "node lint",
|
|
44373
44652
|
configKey: "nodeLint",
|
|
44374
|
-
config
|
|
44653
|
+
config,
|
|
44375
44654
|
context: {
|
|
44376
44655
|
cwd,
|
|
44377
44656
|
locations,
|
|
44657
|
+
nodeTrack: config.nodeTrack ?? "current",
|
|
44378
44658
|
verbose: isVerbose
|
|
44379
44659
|
},
|
|
44380
44660
|
fix: isFix,
|
|
@@ -44385,6 +44665,302 @@ async function nodeLint(options = {}) {
|
|
|
44385
44665
|
return result;
|
|
44386
44666
|
}
|
|
44387
44667
|
//#endregion
|
|
44668
|
+
//#region src/actions/npm-org/org.ts
|
|
44669
|
+
const NPM_ORG_PATTERN = /^[a-z\d](?:[a-z\d._-]*[a-z\d])?$/u;
|
|
44670
|
+
function normalizeNpmOrg(input) {
|
|
44671
|
+
const trimmed = input.trim();
|
|
44672
|
+
const org = (trimmed.startsWith("@") ? trimmed.slice(1) : trimmed).toLowerCase();
|
|
44673
|
+
if (org.length === 0 || org.length > 64 || !NPM_ORG_PATTERN.test(org)) throw new Error(`Invalid npm organization: ${input}`);
|
|
44674
|
+
return org;
|
|
44675
|
+
}
|
|
44676
|
+
function npmOrgScope(org) {
|
|
44677
|
+
return `@${normalizeNpmOrg(org)}`;
|
|
44678
|
+
}
|
|
44679
|
+
function isPackageInNpmOrg(packageName, org) {
|
|
44680
|
+
return packageName.startsWith(`${npmOrgScope(org)}/`);
|
|
44681
|
+
}
|
|
44682
|
+
//#endregion
|
|
44683
|
+
//#region src/actions/npm-org/fetchOrgPackages.ts
|
|
44684
|
+
const REGISTRY_BASE = "https://registry.npmjs.org";
|
|
44685
|
+
function orgPackagesUrl(org) {
|
|
44686
|
+
return `${REGISTRY_BASE}/-/org/${encodeURIComponent(org)}/package`;
|
|
44687
|
+
}
|
|
44688
|
+
function collectScopedNames(catalog, org) {
|
|
44689
|
+
if (typeof catalog !== "object" || catalog === null || Array.isArray(catalog)) throw new Error(`Failed to list npm packages for @${org}: unexpected registry response`);
|
|
44690
|
+
return Object.keys(catalog).filter((name) => isPackageInNpmOrg(name, org)).toSorted((left, right) => left.localeCompare(right));
|
|
44691
|
+
}
|
|
44692
|
+
async function fetchNpmOrgPackageNames(orgInput, options = {}) {
|
|
44693
|
+
const org = normalizeNpmOrg(orgInput);
|
|
44694
|
+
const res = await (options.fetchImpl ?? fetch)(orgPackagesUrl(org), { headers: { Accept: "application/json" } });
|
|
44695
|
+
if (res.status === 404) throw new Error(`npm organization @${org} was not found`);
|
|
44696
|
+
if (!res.ok) throw new Error(`Failed to list npm packages for @${org}: HTTP ${String(res.status)}`);
|
|
44697
|
+
const names = collectScopedNames(await res.json(), org);
|
|
44698
|
+
return {
|
|
44699
|
+
names,
|
|
44700
|
+
total: names.length,
|
|
44701
|
+
truncated: false
|
|
44702
|
+
};
|
|
44703
|
+
}
|
|
44704
|
+
//#endregion
|
|
44705
|
+
//#region src/actions/npm-org/snapshots.ts
|
|
44706
|
+
const DAY_MS = 864e5;
|
|
44707
|
+
const MANIFEST_TIME_META_KEYS = /* @__PURE__ */ new Set(["created", "modified"]);
|
|
44708
|
+
function parsePublishDate(value) {
|
|
44709
|
+
if (value == null || value.length === 0) return void 0;
|
|
44710
|
+
const date = new Date(value);
|
|
44711
|
+
return Number.isNaN(date.getTime()) ? void 0 : date;
|
|
44712
|
+
}
|
|
44713
|
+
function latestPublishInfo(manifest) {
|
|
44714
|
+
if (manifest === void 0) return {};
|
|
44715
|
+
const latest = manifest.distTags.latest;
|
|
44716
|
+
if (latest !== void 0 && latest.length > 0) {
|
|
44717
|
+
const publishedAt = parsePublishDate(manifest.time[latest]);
|
|
44718
|
+
if (publishedAt !== void 0) return {
|
|
44719
|
+
publishedAt,
|
|
44720
|
+
version: latest
|
|
44721
|
+
};
|
|
44722
|
+
}
|
|
44723
|
+
let bestVersion;
|
|
44724
|
+
let bestTime;
|
|
44725
|
+
for (const version of manifest.versions) {
|
|
44726
|
+
if (MANIFEST_TIME_META_KEYS.has(version)) continue;
|
|
44727
|
+
const publishedAt = parsePublishDate(manifest.time[version]);
|
|
44728
|
+
if (publishedAt === void 0) continue;
|
|
44729
|
+
if (bestTime === void 0 || publishedAt > bestTime) {
|
|
44730
|
+
bestTime = publishedAt;
|
|
44731
|
+
bestVersion = version;
|
|
44732
|
+
}
|
|
44733
|
+
}
|
|
44734
|
+
return {
|
|
44735
|
+
publishedAt: bestTime,
|
|
44736
|
+
version: bestVersion
|
|
44737
|
+
};
|
|
44738
|
+
}
|
|
44739
|
+
function ageInDays(publishedAt, now) {
|
|
44740
|
+
if (publishedAt === void 0) return void 0;
|
|
44741
|
+
return Math.max(0, (now.getTime() - publishedAt.getTime()) / DAY_MS);
|
|
44742
|
+
}
|
|
44743
|
+
function npmOrgPackageNotes(pkg) {
|
|
44744
|
+
const notes = [];
|
|
44745
|
+
if (pkg.public === true) notes.push("public");
|
|
44746
|
+
if (pkg.deprecated === true) notes.push("deprecated");
|
|
44747
|
+
return notes.length === 0 ? "" : ` (${notes.join(", ")})`;
|
|
44748
|
+
}
|
|
44749
|
+
function buildNpmOrgPackageSnapshots(names, metadata, now) {
|
|
44750
|
+
return names.map((name) => {
|
|
44751
|
+
const packageMetadata = metadata.get(name);
|
|
44752
|
+
const published = latestPublishInfo(packageMetadata?.manifest);
|
|
44753
|
+
return {
|
|
44754
|
+
ageDays: ageInDays(published.publishedAt, now),
|
|
44755
|
+
downloads: packageMetadata?.downloads,
|
|
44756
|
+
lastPublishedAt: published.publishedAt,
|
|
44757
|
+
latestVersion: published.version,
|
|
44758
|
+
name,
|
|
44759
|
+
...packageMetadata?.manifest?.deprecated === true && { deprecated: true },
|
|
44760
|
+
...packageMetadata?.manifest?.public === true && { public: true }
|
|
44761
|
+
};
|
|
44762
|
+
});
|
|
44763
|
+
}
|
|
44764
|
+
function toNpmOrgLintPackageRows(packages) {
|
|
44765
|
+
return packages.map((pkg) => ({
|
|
44766
|
+
name: pkg.name,
|
|
44767
|
+
...pkg.ageDays !== void 0 && { ageDays: pkg.ageDays },
|
|
44768
|
+
...pkg.deprecated === true && { deprecated: true },
|
|
44769
|
+
...pkg.downloads !== void 0 && { downloads: pkg.downloads },
|
|
44770
|
+
...pkg.lastPublishedAt !== void 0 && { lastPublishedAt: pkg.lastPublishedAt.toISOString() },
|
|
44771
|
+
...pkg.latestVersion !== void 0 && { latestVersion: pkg.latestVersion },
|
|
44772
|
+
...pkg.public === true && { public: true }
|
|
44773
|
+
}));
|
|
44774
|
+
}
|
|
44775
|
+
//#endregion
|
|
44776
|
+
//#region src/actions/npm-org/rules.ts
|
|
44777
|
+
function usageMessage(pkg, minWeeklyDownloads) {
|
|
44778
|
+
const downloads = formatSecureDownloads(pkg.downloads);
|
|
44779
|
+
return `${pkg.name}${npmOrgPackageNotes(pkg)} — ${downloads} weekly downloads (threshold ${String(minWeeklyDownloads)})`;
|
|
44780
|
+
}
|
|
44781
|
+
function developmentMessage(pkg, maxAgeDays) {
|
|
44782
|
+
const version = pkg.latestVersion === void 0 ? "" : `@${pkg.latestVersion}`;
|
|
44783
|
+
const published = pkg.lastPublishedAt === void 0 ? "unknown date" : pkg.lastPublishedAt.toISOString().slice(0, 10);
|
|
44784
|
+
const age = pkg.ageDays === void 0 ? "unknown age" : `${String(Math.floor(pkg.ageDays))} days`;
|
|
44785
|
+
return `${pkg.name}${version}${npmOrgPackageNotes(pkg)} — last published ${published} (${age}, threshold ${String(maxAgeDays)} days)`;
|
|
44786
|
+
}
|
|
44787
|
+
const NPM_ORG_LINT_RULES = [{
|
|
44788
|
+
check: ({ minWeeklyDownloads, packages }) => {
|
|
44789
|
+
return { diagnostics: packages.filter((pkg) => pkg.downloads !== void 0 && pkg.downloads <= minWeeklyDownloads).map((pkg) => ({
|
|
44790
|
+
message: usageMessage(pkg, minWeeklyDownloads),
|
|
44791
|
+
rule: "npm-org.stale-usage"
|
|
44792
|
+
})) };
|
|
44793
|
+
},
|
|
44794
|
+
defaultLevel: "warn",
|
|
44795
|
+
description: "Weekly downloads are at or below the configured minimum (default 10)",
|
|
44796
|
+
id: "npm-org.stale-usage"
|
|
44797
|
+
}, {
|
|
44798
|
+
check: ({ maxAgeDays, packages }) => {
|
|
44799
|
+
return { diagnostics: packages.filter((pkg) => pkg.ageDays !== void 0 && pkg.ageDays >= maxAgeDays).map((pkg) => ({
|
|
44800
|
+
message: developmentMessage(pkg, maxAgeDays),
|
|
44801
|
+
rule: "npm-org.stale-development"
|
|
44802
|
+
})) };
|
|
44803
|
+
},
|
|
44804
|
+
defaultLevel: "warn",
|
|
44805
|
+
description: "Latest version is older than the configured age (default 365 days)",
|
|
44806
|
+
id: "npm-org.stale-development"
|
|
44807
|
+
}];
|
|
44808
|
+
//#endregion
|
|
44809
|
+
//#region src/actions/npm-org/scanStatus.ts
|
|
44810
|
+
function phaseLabel(phase) {
|
|
44811
|
+
return phase === "manifests" ? "registry manifests" : "weekly downloads";
|
|
44812
|
+
}
|
|
44813
|
+
function formatScanLine(event) {
|
|
44814
|
+
const cached = event.cached === void 0 || event.cached === 0 ? "" : ` (${String(event.cached)} cached)`;
|
|
44815
|
+
const current = event.name === void 0 ? "" : ` ${event.name}`;
|
|
44816
|
+
return ` Scanning ${phaseLabel(event.phase)} ${String(event.completed)}/${String(event.total)}${cached}${current}`;
|
|
44817
|
+
}
|
|
44818
|
+
function createNpmOrgScanStatus(options = {}) {
|
|
44819
|
+
const write = options.write ?? ((chunk) => {
|
|
44820
|
+
process.stderr.write(chunk);
|
|
44821
|
+
});
|
|
44822
|
+
const isTty = options.isTty ?? process.stderr.isTTY === true;
|
|
44823
|
+
let lastLen = 0;
|
|
44824
|
+
let lastPhase;
|
|
44825
|
+
return {
|
|
44826
|
+
finish() {
|
|
44827
|
+
if (lastLen === 0 || isJsonMode()) return;
|
|
44828
|
+
write("\n");
|
|
44829
|
+
lastLen = 0;
|
|
44830
|
+
},
|
|
44831
|
+
progress(event) {
|
|
44832
|
+
if (isJsonMode()) return;
|
|
44833
|
+
const line = formatScanLine(event);
|
|
44834
|
+
if (isTty) {
|
|
44835
|
+
write(`\r${chalk.gray(line.padEnd(lastLen))}`);
|
|
44836
|
+
lastLen = line.length;
|
|
44837
|
+
return;
|
|
44838
|
+
}
|
|
44839
|
+
if (event.phase !== lastPhase || event.completed === event.total || event.completed % 10 === 0) {
|
|
44840
|
+
lastPhase = event.phase;
|
|
44841
|
+
write(`${chalk.gray(line)}\n`);
|
|
44842
|
+
}
|
|
44843
|
+
}
|
|
44844
|
+
};
|
|
44845
|
+
}
|
|
44846
|
+
//#endregion
|
|
44847
|
+
//#region src/actions/npm-org/lint.ts
|
|
44848
|
+
function isNonNegativeInteger(value) {
|
|
44849
|
+
return typeof value === "number" && Number.isSafeInteger(value) && value >= 0;
|
|
44850
|
+
}
|
|
44851
|
+
function resolveThreshold(cli, config, fallback, name, minimum = 0) {
|
|
44852
|
+
const value = cli ?? config ?? fallback;
|
|
44853
|
+
if (!isNonNegativeInteger(value) || value < minimum) throw new TypeError(`${name} must be an integer >= ${String(minimum)}`);
|
|
44854
|
+
return value;
|
|
44855
|
+
}
|
|
44856
|
+
function formatAgeDays(ageDays) {
|
|
44857
|
+
if (ageDays === void 0) return "-";
|
|
44858
|
+
if (ageDays < 1) return "<1d";
|
|
44859
|
+
if (ageDays < 365) return `${String(Math.floor(ageDays))}d`;
|
|
44860
|
+
return `${(ageDays / 365).toFixed(1)}y`;
|
|
44861
|
+
}
|
|
44862
|
+
function scanLog(message) {
|
|
44863
|
+
if (isJsonMode()) return;
|
|
44864
|
+
console.log(chalk.gray(message));
|
|
44865
|
+
}
|
|
44866
|
+
async function listOrgPackages(org, listPackages) {
|
|
44867
|
+
scanLog(`npm-org lint @${org} — listing packages`);
|
|
44868
|
+
const listed = listPackages === void 0 ? await fetchNpmOrgPackageNames(org) : {
|
|
44869
|
+
names: await listPackages(org),
|
|
44870
|
+
truncated: false
|
|
44871
|
+
};
|
|
44872
|
+
if (listed.names.length === 0) throw new Error(`No packages found for @${org}`);
|
|
44873
|
+
scanLog(`npm-org lint @${org} — listed ${String(listed.names.length)} packages`);
|
|
44874
|
+
if (listed.truncated) console.warn(chalk.yellow(`npm org catalog returned ${String(listed.names.length)} packages for @${org} — results may be incomplete`));
|
|
44875
|
+
return listed.names;
|
|
44876
|
+
}
|
|
44877
|
+
function resolveIncludeDeprecated(cli, config) {
|
|
44878
|
+
return cli ?? config === true;
|
|
44879
|
+
}
|
|
44880
|
+
function selectLintPackages(snapshots, includeDeprecated, org) {
|
|
44881
|
+
const excludedDeprecated = snapshots.filter((pkg) => pkg.deprecated === true).map((pkg) => pkg.name);
|
|
44882
|
+
if (includeDeprecated) return {
|
|
44883
|
+
excludedDeprecated: [],
|
|
44884
|
+
packages: [...snapshots]
|
|
44885
|
+
};
|
|
44886
|
+
if (snapshots.length > 0 && excludedDeprecated.length === snapshots.length) throw new Error(`All ${String(snapshots.length)} packages in @${org} are deprecated. Re-run with --include-deprecated to lint them.`);
|
|
44887
|
+
return {
|
|
44888
|
+
excludedDeprecated,
|
|
44889
|
+
packages: snapshots.filter((pkg) => pkg.deprecated !== true)
|
|
44890
|
+
};
|
|
44891
|
+
}
|
|
44892
|
+
function logDeprecatedFilter(org, includeDeprecated, excludedDeprecated, packages) {
|
|
44893
|
+
if (includeDeprecated) {
|
|
44894
|
+
const included = packages.filter((pkg) => pkg.deprecated === true).length;
|
|
44895
|
+
if (included > 0) scanLog(`npm-org lint @${org} — including ${String(included)} deprecated packages`);
|
|
44896
|
+
return;
|
|
44897
|
+
}
|
|
44898
|
+
if (excludedDeprecated.length === 0) return;
|
|
44899
|
+
scanLog(`npm-org lint @${org} — ${String(excludedDeprecated.length)} deprecated excluded; use --include-deprecated`);
|
|
44900
|
+
}
|
|
44901
|
+
async function fetchOrgPackageSnapshots(options, org, packageNames, includeDeprecated) {
|
|
44902
|
+
const scanStatus = createNpmOrgScanStatus();
|
|
44903
|
+
const fetchMetadata = options.fetchMetadata ?? ((names, jobs) => fetchAllSecurePackageMetadata(names, jobs, {
|
|
44904
|
+
onProgress: scanStatus.progress,
|
|
44905
|
+
skipDeprecatedDownloads: !includeDeprecated
|
|
44906
|
+
}));
|
|
44907
|
+
try {
|
|
44908
|
+
return selectLintPackages(buildNpmOrgPackageSnapshots(packageNames, await fetchMetadata(packageNames, options.jobs ?? 16), options.now ?? /* @__PURE__ */ new Date()), includeDeprecated, org);
|
|
44909
|
+
} finally {
|
|
44910
|
+
scanStatus.finish();
|
|
44911
|
+
}
|
|
44912
|
+
}
|
|
44913
|
+
async function npmOrgLint(options) {
|
|
44914
|
+
const org = normalizeNpmOrg(options.org);
|
|
44915
|
+
const config = await loadWorkspaceCommandConfig(options.cwd ?? INIT_CWD(), RULE_COMMANDS.npmOrgLint.configKey);
|
|
44916
|
+
const minWeeklyDownloads = resolveThreshold(options.minWeeklyDownloads, config.minWeeklyDownloads, 10, "minWeeklyDownloads");
|
|
44917
|
+
const maxAgeDays = resolveThreshold(options.maxAgeDays, config.maxAgeDays, 365, "maxAgeDays", 1);
|
|
44918
|
+
const includeDeprecated = resolveIncludeDeprecated(options.includeDeprecated, config.includeDeprecated);
|
|
44919
|
+
const { excludedDeprecated, packages } = await fetchOrgPackageSnapshots(options, org, await listOrgPackages(org, options.listPackages), includeDeprecated);
|
|
44920
|
+
const skippedDownloads = packages.filter((pkg) => pkg.downloads === void 0).map((pkg) => pkg.name);
|
|
44921
|
+
const withDownloads = packages.length - skippedDownloads.length;
|
|
44922
|
+
console.log(chalk.gray(`npm-org lint @${org} (${String(packages.length)} packages, ${String(withDownloads)} with weekly downloads, min ${String(minWeeklyDownloads)} downloads/week, max age ${String(maxAgeDays)} days)`));
|
|
44923
|
+
logDeprecatedFilter(org, includeDeprecated, excludedDeprecated, packages);
|
|
44924
|
+
if (skippedDownloads.length > 0) {
|
|
44925
|
+
const skippedPackages = packages.filter((pkg) => pkg.downloads === void 0);
|
|
44926
|
+
console.warn(chalk.yellow(` ⚠ no weekly download counts for ${String(skippedDownloads.length)} packages (npm downloads API rate limit or error) — stale-usage skipped those; re-run after a short wait (successful counts are cached for 12h)`));
|
|
44927
|
+
for (const pkg of skippedPackages) console.warn(chalk.gray(` ${pkg.name}${npmOrgPackageNotes(pkg)}`));
|
|
44928
|
+
}
|
|
44929
|
+
if (options.verbose === true) for (const pkg of packages) console.log(chalk.gray(` ${pkg.name}${npmOrgPackageNotes(pkg)} ${formatSecureDownloads(pkg.downloads)}/wk ${formatAgeDays(pkg.ageDays)}`));
|
|
44930
|
+
const context = {
|
|
44931
|
+
maxAgeDays,
|
|
44932
|
+
minWeeklyDownloads,
|
|
44933
|
+
org,
|
|
44934
|
+
packages
|
|
44935
|
+
};
|
|
44936
|
+
const result = await runRuleChecks({
|
|
44937
|
+
commandName: RULE_COMMANDS.npmOrgLint.command,
|
|
44938
|
+
config,
|
|
44939
|
+
configKey: RULE_COMMANDS.npmOrgLint.configKey,
|
|
44940
|
+
context,
|
|
44941
|
+
reporter: defaultRuleReporter(),
|
|
44942
|
+
rules: NPM_ORG_LINT_RULES,
|
|
44943
|
+
...options.strict !== void 0 && { strict: options.strict }
|
|
44944
|
+
});
|
|
44945
|
+
const report = {
|
|
44946
|
+
...result.envelope.data,
|
|
44947
|
+
excludedDeprecated,
|
|
44948
|
+
includeDeprecated,
|
|
44949
|
+
maxAgeDays,
|
|
44950
|
+
minWeeklyDownloads,
|
|
44951
|
+
org,
|
|
44952
|
+
packages: toNpmOrgLintPackageRows(packages),
|
|
44953
|
+
skippedDownloads
|
|
44954
|
+
};
|
|
44955
|
+
return {
|
|
44956
|
+
envelope: {
|
|
44957
|
+
...result.envelope,
|
|
44958
|
+
data: report
|
|
44959
|
+
},
|
|
44960
|
+
exitCode: result.exitCode
|
|
44961
|
+
};
|
|
44962
|
+
}
|
|
44963
|
+
//#endregion
|
|
44388
44964
|
//#region src/actions/npmignore-gen.ts
|
|
44389
44965
|
const filename = ".npmignore";
|
|
44390
44966
|
const npmignoreGen = (pkg) => generateIgnoreFiles(filename, pkg);
|
|
@@ -44658,14 +45234,29 @@ function fixEnginesOnlyInNonTerminal(cwd, _pkg, workspaces) {
|
|
|
44658
45234
|
} catch {}
|
|
44659
45235
|
}
|
|
44660
45236
|
}
|
|
44661
|
-
function
|
|
44662
|
-
|
|
44663
|
-
|
|
44664
|
-
|
|
44665
|
-
|
|
44666
|
-
|
|
44667
|
-
|
|
45237
|
+
function resolveTrackVersions(nodeTrack = "current") {
|
|
45238
|
+
if (nodeTrack === "lts") return {
|
|
45239
|
+
label: "LTS",
|
|
45240
|
+
versions: {
|
|
45241
|
+
node: latestVersions.nodeLts,
|
|
45242
|
+
npm: latestVersions.npmLts,
|
|
45243
|
+
pnpm: latestVersions.pnpm,
|
|
45244
|
+
yarn: latestVersions.yarn
|
|
45245
|
+
}
|
|
44668
45246
|
};
|
|
45247
|
+
return {
|
|
45248
|
+
label: "Current",
|
|
45249
|
+
versions: {
|
|
45250
|
+
node: latestVersions.nodeCurrent,
|
|
45251
|
+
npm: latestVersions.npmCurrent,
|
|
45252
|
+
pnpm: latestVersions.pnpm,
|
|
45253
|
+
yarn: latestVersions.yarn
|
|
45254
|
+
}
|
|
45255
|
+
};
|
|
45256
|
+
}
|
|
45257
|
+
function checkVersionsIncludeLts(cwd, workspaces, options = {}) {
|
|
45258
|
+
const result = emptyResult$3();
|
|
45259
|
+
const { label: trackLabel, versions: toolVersions } = resolveTrackVersions(options.nodeTrack);
|
|
44669
45260
|
for (const { location, name } of workspaces) {
|
|
44670
45261
|
const pkgPath = location === "." ? PATH.resolve(cwd, "package.json") : PATH.resolve(cwd, location, "package.json");
|
|
44671
45262
|
try {
|
|
@@ -44674,12 +45265,12 @@ function checkVersionsIncludeLts(cwd, workspaces) {
|
|
|
44674
45265
|
const engines = pkg.engines;
|
|
44675
45266
|
if (engines) for (const [tool, range] of Object.entries(engines)) {
|
|
44676
45267
|
const latest = toolVersions[tool];
|
|
44677
|
-
if (latest && !import_semver.default.satisfies(latest, range)) result.errors.push(`${label} engines.${tool} "${range}" does not include latest ${tool === "node" ?
|
|
45268
|
+
if (latest && !import_semver.default.satisfies(latest, range)) result.errors.push(`${label} engines.${tool} "${range}" does not include latest ${tool === "node" ? `${trackLabel} ` : ""}version ${latest}`);
|
|
44678
45269
|
}
|
|
44679
45270
|
const volta = pkg.volta;
|
|
44680
45271
|
if (volta) for (const [tool, pinnedVersion] of Object.entries(volta)) {
|
|
44681
45272
|
const latest = toolVersions[tool];
|
|
44682
|
-
if (latest && import_semver.default.lt(pinnedVersion, latest)) result.warnings.push(`${label} volta.${tool} "${pinnedVersion}" is older than latest ${tool === "node" ?
|
|
45273
|
+
if (latest && import_semver.default.lt(pinnedVersion, latest)) result.warnings.push(`${label} volta.${tool} "${pinnedVersion}" is older than latest ${tool === "node" ? `${trackLabel} ` : ""}version ${latest}`);
|
|
44683
45274
|
}
|
|
44684
45275
|
} catch {}
|
|
44685
45276
|
}
|
|
@@ -45210,8 +45801,8 @@ const REPO_LINT_RULES = [
|
|
|
45210
45801
|
id: "repo.engines-non-terminal"
|
|
45211
45802
|
}),
|
|
45212
45803
|
repoLintRule({
|
|
45213
|
-
check: ({ cwd, workspaces }) => checkVersionsIncludeLts(cwd, workspaces),
|
|
45214
|
-
description: "Engine and volta versions include latest
|
|
45804
|
+
check: ({ cwd, nodeTrack, workspaces }) => checkVersionsIncludeLts(cwd, workspaces, { nodeTrack }),
|
|
45805
|
+
description: "Engine and volta versions include latest Node version",
|
|
45215
45806
|
id: "repo.engines-lts"
|
|
45216
45807
|
}),
|
|
45217
45808
|
repoLintRule({
|
|
@@ -45312,6 +45903,7 @@ async function packageLintMonorepo(shouldFix = false, options = {}) {
|
|
|
45312
45903
|
config,
|
|
45313
45904
|
context: {
|
|
45314
45905
|
cwd,
|
|
45906
|
+
nodeTrack: config.nodeTrack ?? "current",
|
|
45315
45907
|
pkg,
|
|
45316
45908
|
pm,
|
|
45317
45909
|
workspaces,
|
|
@@ -56570,6 +57162,9 @@ async function getRepoLintRuleCatalog() {
|
|
|
56570
57162
|
async function getNodeLintRuleCatalog() {
|
|
56571
57163
|
return runtimeRuleCatalog(RULE_COMMANDS.nodeLint.command, RULE_COMMANDS.nodeLint.configKey, NODE_LINT_RULES, await loadCommandConfig("nodeLint"));
|
|
56572
57164
|
}
|
|
57165
|
+
async function getNpmOrgLintRuleCatalog() {
|
|
57166
|
+
return runtimeRuleCatalog(RULE_COMMANDS.npmOrgLint.command, RULE_COMMANDS.npmOrgLint.configKey, NPM_ORG_LINT_RULES, await loadCommandConfig("npmOrgLint"));
|
|
57167
|
+
}
|
|
56573
57168
|
async function getLintlintRuleCatalog() {
|
|
56574
57169
|
return runtimeRuleCatalog(RULE_COMMANDS.lintLint.command, RULE_COMMANDS.lintLint.configKey, LINTLINT_RULES, await loadCommandConfig("lintLint"));
|
|
56575
57170
|
}
|
|
@@ -56700,6 +57295,7 @@ const RULE_CATALOG_LOADERS = {
|
|
|
56700
57295
|
lint: () => getEslintRuleCatalog(),
|
|
56701
57296
|
lintLint: () => getLintlintRuleCatalog(),
|
|
56702
57297
|
nodeLint: () => getNodeLintRuleCatalog(),
|
|
57298
|
+
npmOrgLint: () => getNpmOrgLintRuleCatalog(),
|
|
56703
57299
|
packman: () => getPackmanRuleCatalog(),
|
|
56704
57300
|
planLint: () => getPlanLintRuleCatalog(),
|
|
56705
57301
|
publint: () => getPublintRuleCatalog(),
|
|
@@ -58081,6 +58677,63 @@ const licenseCommand = {
|
|
|
58081
58677
|
}
|
|
58082
58678
|
};
|
|
58083
58679
|
//#endregion
|
|
58680
|
+
//#region src/xy/common/npm-org/lintCommand.ts
|
|
58681
|
+
const lintCommand$5 = {
|
|
58682
|
+
builder: (yargs) => {
|
|
58683
|
+
return yargs.positional("org", {
|
|
58684
|
+
describe: "npm organization or scope (ariestools or @ariestools)",
|
|
58685
|
+
type: "string"
|
|
58686
|
+
}).option("min-downloads", {
|
|
58687
|
+
describe: "Weekly download count at or below this is stale usage (default 10)",
|
|
58688
|
+
type: "number"
|
|
58689
|
+
}).option("max-age-days", {
|
|
58690
|
+
describe: "Days since the latest version before a package is stale (default 365)",
|
|
58691
|
+
type: "number"
|
|
58692
|
+
}).option("include-deprecated", {
|
|
58693
|
+
describe: "Also lint packages whose latest version is deprecated",
|
|
58694
|
+
type: "boolean"
|
|
58695
|
+
}).option("rules", {
|
|
58696
|
+
default: false,
|
|
58697
|
+
describe: "List supported npm-org lint rules and their effective levels",
|
|
58698
|
+
type: "boolean"
|
|
58699
|
+
}).option("strict", {
|
|
58700
|
+
default: false,
|
|
58701
|
+
describe: "Fail on warnings",
|
|
58702
|
+
type: "boolean"
|
|
58703
|
+
});
|
|
58704
|
+
},
|
|
58705
|
+
command: "lint [org]",
|
|
58706
|
+
describe: "Lint published packages in an npm organization for stale usage and development",
|
|
58707
|
+
handler: async (argv) => {
|
|
58708
|
+
if (argv.rules === true) {
|
|
58709
|
+
await withEnvelope("npm-org lint rules", async () => ruleCatalogResult(await getNpmOrgLintRuleCatalog(), RULE_COMMANDS.npmOrgLint.title));
|
|
58710
|
+
return;
|
|
58711
|
+
}
|
|
58712
|
+
const org = argv.org;
|
|
58713
|
+
if (typeof org !== "string" || org.length === 0) throw new Error("Please specify an npm organization (for example ariestools or @ariestools)");
|
|
58714
|
+
await withEnvelope("npm-org lint", () => npmOrgLint({
|
|
58715
|
+
cwd: INIT_CWD(),
|
|
58716
|
+
org,
|
|
58717
|
+
...argv.includeDeprecated === true && { includeDeprecated: true },
|
|
58718
|
+
...typeof argv.jobs === "number" && { jobs: argv.jobs },
|
|
58719
|
+
...typeof argv.maxAgeDays === "number" && { maxAgeDays: argv.maxAgeDays },
|
|
58720
|
+
...typeof argv.minDownloads === "number" && { minWeeklyDownloads: argv.minDownloads },
|
|
58721
|
+
...argv.strict === true && { strict: true },
|
|
58722
|
+
...argv.verbose === true && { verbose: true }
|
|
58723
|
+
}));
|
|
58724
|
+
}
|
|
58725
|
+
};
|
|
58726
|
+
//#endregion
|
|
58727
|
+
//#region src/xy/common/npm-org/index.ts
|
|
58728
|
+
const createNpmOrgCommand = (channel) => ({
|
|
58729
|
+
builder: (yargs) => {
|
|
58730
|
+
return yargs.command(withExperimentalChannel(lintCommand$5, channel, "npm-org lint")).demandCommand(1, "Please specify an npm-org subcommand").strictCommands();
|
|
58731
|
+
},
|
|
58732
|
+
command: "npm-org",
|
|
58733
|
+
describe: "Npm-org - Lint published packages in an npmjs organization",
|
|
58734
|
+
handler: () => {}
|
|
58735
|
+
});
|
|
58736
|
+
//#endregion
|
|
58084
58737
|
//#region src/xy/common/npmignoreGenCommand.ts
|
|
58085
58738
|
const npmignoreGenCommand = {
|
|
58086
58739
|
command: "npmignore-gen",
|
|
@@ -59090,7 +59743,7 @@ const commonExperimentalCommands = [
|
|
|
59090
59743
|
];
|
|
59091
59744
|
/** Experimental common commands — prefer `xyex`; warn when invoked via `xy`. */
|
|
59092
59745
|
const xyCommonExperimentalCommands = (args, channel) => {
|
|
59093
|
-
return registerExperimentalCommands(args, channel, commonExperimentalCommands).command(withExperimentalChannel(createPlanCommand(channel), channel));
|
|
59746
|
+
return registerExperimentalCommands(args, channel, commonExperimentalCommands).command(withExperimentalChannel(createNpmOrgCommand(channel), channel)).command(withExperimentalChannel(createPlanCommand(channel), channel));
|
|
59094
59747
|
};
|
|
59095
59748
|
//#endregion
|
|
59096
59749
|
//#region src/xy/deploy/deployCommand.ts
|
|
@@ -60004,6 +60657,8 @@ const COMMAND_STABILITY = {
|
|
|
60004
60657
|
"git": "stable",
|
|
60005
60658
|
"gitignore": "stable",
|
|
60006
60659
|
"npmignore-gen": "stable",
|
|
60660
|
+
"npm-org": "experimental",
|
|
60661
|
+
"npm-org lint": "experimental",
|
|
60007
60662
|
"orphan": "experimental",
|
|
60008
60663
|
"packman": "stable",
|
|
60009
60664
|
"packman lint": "stable",
|
|
@@ -60073,6 +60728,11 @@ const EXPERIMENTAL_CONFIG_SURFACES = [
|
|
|
60073
60728
|
description: "Plan folder-layout lint rule levels.",
|
|
60074
60729
|
id: "plan-lint.rules",
|
|
60075
60730
|
path: "commands.planLint.rules"
|
|
60731
|
+
},
|
|
60732
|
+
{
|
|
60733
|
+
description: "npm organization lint rule levels and stale-usage / stale-development thresholds.",
|
|
60734
|
+
id: "npm-org-lint",
|
|
60735
|
+
path: "commands.npmOrgLint"
|
|
60076
60736
|
}
|
|
60077
60737
|
];
|
|
60078
60738
|
const STABILITY_PROMOTION_RUBRIC = [
|
|
@@ -65574,7 +66234,7 @@ const xyBase = async (options = {}) => {
|
|
|
65574
66234
|
].includes(a))) return;
|
|
65575
66235
|
console.error(chalk.yellow(`Command not found [${chalk.magenta(cmd)}]`));
|
|
65576
66236
|
console.log(chalk.gray(`Try '${cliLabel} --help' for list of commands`));
|
|
65577
|
-
}).version().help().argv;
|
|
66237
|
+
}).version(bundledToolchainVersion()).help().argv;
|
|
65578
66238
|
};
|
|
65579
66239
|
function registerLifecyclePlugins(args, channel) {
|
|
65580
66240
|
let result = xyInstallCommands(xyDeployCommands(args));
|