@ariestools/toolchain 10.0.6 → 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 +292 -164
- package/dist/bin/skills.mjs.map +1 -1
- package/dist/bin/xy.mjs +807 -170
- package/dist/bin/xy.mjs.map +1 -1
- package/dist/bin/xyex.mjs +807 -170
- 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/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 +12 -12
package/dist/bin/xy.mjs
CHANGED
|
@@ -6863,7 +6863,7 @@ var require_semver = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
6863
6863
|
//#region src/lib/toolchainVersion.ts
|
|
6864
6864
|
createRequire(import.meta.url);
|
|
6865
6865
|
function bundledToolchainVersion() {
|
|
6866
|
-
return "10.0.
|
|
6866
|
+
return "10.0.7";
|
|
6867
6867
|
}
|
|
6868
6868
|
function bundledToolchainRange() {
|
|
6869
6869
|
return `^${bundledToolchainVersion()}`;
|
|
@@ -7095,9 +7095,13 @@ const gitignoreTemplate = () => readFileSync(PATH.resolve(templatesDir, "templat
|
|
|
7095
7095
|
//#endregion
|
|
7096
7096
|
//#region src/lib/latestVersions.ts
|
|
7097
7097
|
const latestVersions = {
|
|
7098
|
-
node: "24.
|
|
7098
|
+
node: "24.21.0",
|
|
7099
|
+
nodeCurrent: "26.8.2",
|
|
7100
|
+
nodeLts: "24.21.0",
|
|
7099
7101
|
nodeLtsCodename: "Krypton",
|
|
7100
|
-
npm: "11.
|
|
7102
|
+
npm: "11.19.0",
|
|
7103
|
+
npmCurrent: "11.19.1",
|
|
7104
|
+
npmLts: "11.19.0",
|
|
7101
7105
|
pnpm: "10.33.0",
|
|
7102
7106
|
yarn: "4.13.0"
|
|
7103
7107
|
};
|
|
@@ -11805,7 +11809,7 @@ var require_dist$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
11805
11809
|
exports.cosmiconfigSync = cosmiconfigSync;
|
|
11806
11810
|
}));
|
|
11807
11811
|
//#endregion
|
|
11808
|
-
//#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
|
|
11809
11813
|
var TypeScriptCompileError = class _TypeScriptCompileError extends Error {
|
|
11810
11814
|
constructor(message) {
|
|
11811
11815
|
super(message);
|
|
@@ -11821,7 +11825,7 @@ ${error.message}`;
|
|
|
11821
11825
|
}
|
|
11822
11826
|
};
|
|
11823
11827
|
//#endregion
|
|
11824
|
-
//#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
|
|
11825
11829
|
function TypeScriptLoader(options) {
|
|
11826
11830
|
const loader = createJiti("", {
|
|
11827
11831
|
interopDefault: true,
|
|
@@ -11911,6 +11915,12 @@ const RULE_COMMANDS = {
|
|
|
11911
11915
|
includeInRoot: true,
|
|
11912
11916
|
title: "Node Lint Rules"
|
|
11913
11917
|
},
|
|
11918
|
+
npmOrgLint: {
|
|
11919
|
+
command: "npm-org lint",
|
|
11920
|
+
configKey: "npmOrgLint",
|
|
11921
|
+
includeInRoot: true,
|
|
11922
|
+
title: "Npm Org Lint Rules"
|
|
11923
|
+
},
|
|
11914
11924
|
packman: {
|
|
11915
11925
|
command: "packman lint",
|
|
11916
11926
|
configKey: "packman",
|
|
@@ -13667,11 +13677,11 @@ function isMatch(input, pattern, options = {}) {
|
|
|
13667
13677
|
}
|
|
13668
13678
|
//#endregion
|
|
13669
13679
|
//#region src/lib/npmLatestVersion.ts
|
|
13670
|
-
const REGISTRY_BASE$
|
|
13680
|
+
const REGISTRY_BASE$4 = "https://registry.npmjs.org";
|
|
13671
13681
|
const cache$3 = /* @__PURE__ */ new Map();
|
|
13672
13682
|
async function fetchUncached$1(packageName) {
|
|
13673
13683
|
try {
|
|
13674
|
-
const url = `${REGISTRY_BASE$
|
|
13684
|
+
const url = `${REGISTRY_BASE$4}/${encodeURIComponent(packageName)}/latest`;
|
|
13675
13685
|
const res = await fetch(url, { headers: { Accept: "application/vnd.npm.install-v1+json" } });
|
|
13676
13686
|
if (!res.ok) return void 0;
|
|
13677
13687
|
return (await res.json()).version;
|
|
@@ -13705,7 +13715,7 @@ const parsedPackageJSON = (path) => {
|
|
|
13705
13715
|
return JSON.parse(packageJSON);
|
|
13706
13716
|
};
|
|
13707
13717
|
//#endregion
|
|
13708
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.
|
|
13718
|
+
//#region ../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/nodes/identity.js
|
|
13709
13719
|
var require_identity = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
13710
13720
|
const ALIAS = Symbol.for("yaml.alias");
|
|
13711
13721
|
const DOC = Symbol.for("yaml.document");
|
|
@@ -13755,7 +13765,7 @@ var require_identity = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
13755
13765
|
exports.isSeq = isSeq;
|
|
13756
13766
|
}));
|
|
13757
13767
|
//#endregion
|
|
13758
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.
|
|
13768
|
+
//#region ../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/visit.js
|
|
13759
13769
|
var require_visit = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
13760
13770
|
var identity = require_identity();
|
|
13761
13771
|
const BREAK = Symbol("break visit");
|
|
@@ -13946,7 +13956,7 @@ var require_visit = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
13946
13956
|
exports.visitAsync = visitAsync;
|
|
13947
13957
|
}));
|
|
13948
13958
|
//#endregion
|
|
13949
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.
|
|
13959
|
+
//#region ../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/doc/directives.js
|
|
13950
13960
|
var require_directives = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
13951
13961
|
var identity = require_identity();
|
|
13952
13962
|
var visit = require_visit();
|
|
@@ -14110,7 +14120,7 @@ var require_directives = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
14110
14120
|
exports.Directives = Directives;
|
|
14111
14121
|
}));
|
|
14112
14122
|
//#endregion
|
|
14113
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.
|
|
14123
|
+
//#region ../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/doc/anchors.js
|
|
14114
14124
|
var require_anchors = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
14115
14125
|
var identity = require_identity();
|
|
14116
14126
|
var visit = require_visit();
|
|
@@ -14177,7 +14187,7 @@ var require_anchors = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
14177
14187
|
exports.findNewAnchor = findNewAnchor;
|
|
14178
14188
|
}));
|
|
14179
14189
|
//#endregion
|
|
14180
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.
|
|
14190
|
+
//#region ../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/doc/applyReviver.js
|
|
14181
14191
|
var require_applyReviver = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
14182
14192
|
/**
|
|
14183
14193
|
* Applies the JSON.parse reviver algorithm as defined in the ECMA-262 spec,
|
|
@@ -14219,7 +14229,7 @@ var require_applyReviver = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
14219
14229
|
exports.applyReviver = applyReviver;
|
|
14220
14230
|
}));
|
|
14221
14231
|
//#endregion
|
|
14222
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.
|
|
14232
|
+
//#region ../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/nodes/toJS.js
|
|
14223
14233
|
var require_toJS = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
14224
14234
|
var identity = require_identity();
|
|
14225
14235
|
/**
|
|
@@ -14256,7 +14266,7 @@ var require_toJS = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
14256
14266
|
exports.toJS = toJS;
|
|
14257
14267
|
}));
|
|
14258
14268
|
//#endregion
|
|
14259
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.
|
|
14269
|
+
//#region ../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/nodes/Node.js
|
|
14260
14270
|
var require_Node = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
14261
14271
|
var applyReviver = require_applyReviver();
|
|
14262
14272
|
var identity = require_identity();
|
|
@@ -14290,7 +14300,7 @@ var require_Node = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
14290
14300
|
exports.NodeBase = NodeBase;
|
|
14291
14301
|
}));
|
|
14292
14302
|
//#endregion
|
|
14293
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.
|
|
14303
|
+
//#region ../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/nodes/Alias.js
|
|
14294
14304
|
var require_Alias = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
14295
14305
|
var anchors = require_anchors();
|
|
14296
14306
|
var visit = require_visit();
|
|
@@ -14325,29 +14335,31 @@ var require_Alias = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
14325
14335
|
if (node === this) break;
|
|
14326
14336
|
if (node.anchor === this.source) found = node;
|
|
14327
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
|
+
}
|
|
14328
14353
|
return found;
|
|
14329
14354
|
}
|
|
14330
14355
|
toJSON(_arg, ctx) {
|
|
14331
14356
|
if (!ctx) return { source: this.source };
|
|
14332
|
-
const
|
|
14333
|
-
const source = this.resolve(doc, ctx);
|
|
14357
|
+
const source = this.resolve(ctx.doc, ctx);
|
|
14334
14358
|
if (!source) {
|
|
14335
14359
|
const msg = `Unresolved alias (the anchor must be set before the alias): ${this.source}`;
|
|
14336
14360
|
throw new ReferenceError(msg);
|
|
14337
14361
|
}
|
|
14338
|
-
|
|
14339
|
-
if (!data) {
|
|
14340
|
-
toJS.toJS(source, null, ctx);
|
|
14341
|
-
data = anchors.get(source);
|
|
14342
|
-
}
|
|
14343
|
-
/* istanbul ignore if */
|
|
14344
|
-
if (data?.res === void 0) throw new ReferenceError("This should not happen: Alias anchor was not resolved?");
|
|
14345
|
-
if (maxAliasCount >= 0) {
|
|
14346
|
-
data.count += 1;
|
|
14347
|
-
if (data.aliasCount === 0) data.aliasCount = getAliasCount(doc, source, anchors);
|
|
14348
|
-
if (data.count * data.aliasCount > maxAliasCount) throw new ReferenceError("Excessive alias count indicates a resource exhaustion attack");
|
|
14349
|
-
}
|
|
14350
|
-
return data.res;
|
|
14362
|
+
return ctx.anchors.get(source).res;
|
|
14351
14363
|
}
|
|
14352
14364
|
toString(ctx, _onComment, _onChompKeep) {
|
|
14353
14365
|
const src = `*${this.source}`;
|
|
@@ -14384,7 +14396,7 @@ var require_Alias = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
14384
14396
|
exports.Alias = Alias;
|
|
14385
14397
|
}));
|
|
14386
14398
|
//#endregion
|
|
14387
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.
|
|
14399
|
+
//#region ../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/nodes/Scalar.js
|
|
14388
14400
|
var require_Scalar = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
14389
14401
|
var identity = require_identity();
|
|
14390
14402
|
var Node = require_Node();
|
|
@@ -14411,7 +14423,7 @@ var require_Scalar = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
14411
14423
|
exports.isScalarValue = isScalarValue;
|
|
14412
14424
|
}));
|
|
14413
14425
|
//#endregion
|
|
14414
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.
|
|
14426
|
+
//#region ../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/doc/createNode.js
|
|
14415
14427
|
var require_createNode = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
14416
14428
|
var Alias = require_Alias();
|
|
14417
14429
|
var identity = require_identity();
|
|
@@ -14474,7 +14486,7 @@ var require_createNode = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
14474
14486
|
exports.createNode = createNode;
|
|
14475
14487
|
}));
|
|
14476
14488
|
//#endregion
|
|
14477
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.
|
|
14489
|
+
//#region ../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/nodes/Collection.js
|
|
14478
14490
|
var require_Collection = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
14479
14491
|
var createNode = require_createNode();
|
|
14480
14492
|
var identity = require_identity();
|
|
@@ -14595,7 +14607,7 @@ var require_Collection = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
14595
14607
|
exports.isEmptyPath = isEmptyPath;
|
|
14596
14608
|
}));
|
|
14597
14609
|
//#endregion
|
|
14598
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.
|
|
14610
|
+
//#region ../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/stringify/stringifyComment.js
|
|
14599
14611
|
var require_stringifyComment = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
14600
14612
|
/**
|
|
14601
14613
|
* Stringifies a comment.
|
|
@@ -14615,7 +14627,7 @@ var require_stringifyComment = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
14615
14627
|
exports.stringifyComment = stringifyComment;
|
|
14616
14628
|
}));
|
|
14617
14629
|
//#endregion
|
|
14618
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.
|
|
14630
|
+
//#region ../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/stringify/foldFlowLines.js
|
|
14619
14631
|
var require_foldFlowLines = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
14620
14632
|
const FOLD_FLOW = "flow";
|
|
14621
14633
|
const FOLD_BLOCK = "block";
|
|
@@ -14735,7 +14747,7 @@ var require_foldFlowLines = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
14735
14747
|
exports.foldFlowLines = foldFlowLines;
|
|
14736
14748
|
}));
|
|
14737
14749
|
//#endregion
|
|
14738
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.
|
|
14750
|
+
//#region ../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/stringify/stringifyString.js
|
|
14739
14751
|
var require_stringifyString = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
14740
14752
|
var Scalar = require_Scalar();
|
|
14741
14753
|
var foldFlowLines = require_foldFlowLines();
|
|
@@ -14959,7 +14971,7 @@ var require_stringifyString = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
14959
14971
|
exports.stringifyString = stringifyString;
|
|
14960
14972
|
}));
|
|
14961
14973
|
//#endregion
|
|
14962
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.
|
|
14974
|
+
//#region ../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/stringify/stringify.js
|
|
14963
14975
|
var require_stringify = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
14964
14976
|
var anchors = require_anchors();
|
|
14965
14977
|
var identity = require_identity();
|
|
@@ -15067,7 +15079,7 @@ var require_stringify = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
15067
15079
|
exports.stringify = stringify;
|
|
15068
15080
|
}));
|
|
15069
15081
|
//#endregion
|
|
15070
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.
|
|
15082
|
+
//#region ../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/stringify/stringifyPair.js
|
|
15071
15083
|
var require_stringifyPair = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
15072
15084
|
var identity = require_identity();
|
|
15073
15085
|
var Scalar = require_Scalar();
|
|
@@ -15164,7 +15176,7 @@ var require_stringifyPair = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
15164
15176
|
exports.stringifyPair = stringifyPair;
|
|
15165
15177
|
}));
|
|
15166
15178
|
//#endregion
|
|
15167
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.
|
|
15179
|
+
//#region ../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/log.js
|
|
15168
15180
|
var require_log = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
15169
15181
|
var node_process$2 = __require("process");
|
|
15170
15182
|
function debug(logLevel, ...messages) {
|
|
@@ -15180,7 +15192,7 @@ var require_log = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
15180
15192
|
exports.warn = warn;
|
|
15181
15193
|
}));
|
|
15182
15194
|
//#endregion
|
|
15183
|
-
//#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
|
|
15184
15196
|
var require_merge = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
15185
15197
|
var identity = require_identity();
|
|
15186
15198
|
var Scalar = require_Scalar();
|
|
@@ -15223,7 +15235,7 @@ var require_merge = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
15223
15235
|
exports.merge = merge;
|
|
15224
15236
|
}));
|
|
15225
15237
|
//#endregion
|
|
15226
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.
|
|
15238
|
+
//#region ../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/nodes/addPairToJSMap.js
|
|
15227
15239
|
var require_addPairToJSMap = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
15228
15240
|
var log = require_log();
|
|
15229
15241
|
var merge = require_merge();
|
|
@@ -15274,7 +15286,7 @@ var require_addPairToJSMap = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
15274
15286
|
exports.addPairToJSMap = addPairToJSMap;
|
|
15275
15287
|
}));
|
|
15276
15288
|
//#endregion
|
|
15277
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.
|
|
15289
|
+
//#region ../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/nodes/Pair.js
|
|
15278
15290
|
var require_Pair = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
15279
15291
|
var createNode = require_createNode();
|
|
15280
15292
|
var stringifyPair = require_stringifyPair();
|
|
@@ -15307,7 +15319,7 @@ var require_Pair = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
15307
15319
|
exports.createPair = createPair;
|
|
15308
15320
|
}));
|
|
15309
15321
|
//#endregion
|
|
15310
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.
|
|
15322
|
+
//#region ../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/stringify/stringifyCollection.js
|
|
15311
15323
|
var require_stringifyCollection = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
15312
15324
|
var identity = require_identity();
|
|
15313
15325
|
var stringify = require_stringify();
|
|
@@ -15425,7 +15437,7 @@ var require_stringifyCollection = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
15425
15437
|
exports.stringifyCollection = stringifyCollection;
|
|
15426
15438
|
}));
|
|
15427
15439
|
//#endregion
|
|
15428
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.
|
|
15440
|
+
//#region ../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/nodes/YAMLMap.js
|
|
15429
15441
|
var require_YAMLMap = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
15430
15442
|
var stringifyCollection = require_stringifyCollection();
|
|
15431
15443
|
var addPairToJSMap = require_addPairToJSMap();
|
|
@@ -15534,7 +15546,7 @@ var require_YAMLMap = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
15534
15546
|
exports.findPair = findPair;
|
|
15535
15547
|
}));
|
|
15536
15548
|
//#endregion
|
|
15537
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.
|
|
15549
|
+
//#region ../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/common/map.js
|
|
15538
15550
|
var require_map = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
15539
15551
|
var identity = require_identity();
|
|
15540
15552
|
var YAMLMap = require_YAMLMap();
|
|
@@ -15551,7 +15563,7 @@ var require_map = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
15551
15563
|
};
|
|
15552
15564
|
}));
|
|
15553
15565
|
//#endregion
|
|
15554
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.
|
|
15566
|
+
//#region ../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/nodes/YAMLSeq.js
|
|
15555
15567
|
var require_YAMLSeq = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
15556
15568
|
var createNode = require_createNode();
|
|
15557
15569
|
var stringifyCollection = require_stringifyCollection();
|
|
@@ -15657,7 +15669,7 @@ var require_YAMLSeq = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
15657
15669
|
exports.YAMLSeq = YAMLSeq;
|
|
15658
15670
|
}));
|
|
15659
15671
|
//#endregion
|
|
15660
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.
|
|
15672
|
+
//#region ../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/common/seq.js
|
|
15661
15673
|
var require_seq = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
15662
15674
|
var identity = require_identity();
|
|
15663
15675
|
var YAMLSeq = require_YAMLSeq();
|
|
@@ -15674,7 +15686,7 @@ var require_seq = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
15674
15686
|
};
|
|
15675
15687
|
}));
|
|
15676
15688
|
//#endregion
|
|
15677
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.
|
|
15689
|
+
//#region ../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/common/string.js
|
|
15678
15690
|
var require_string = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
15679
15691
|
var stringifyString = require_stringifyString();
|
|
15680
15692
|
exports.string = {
|
|
@@ -15689,7 +15701,7 @@ var require_string = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
15689
15701
|
};
|
|
15690
15702
|
}));
|
|
15691
15703
|
//#endregion
|
|
15692
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.
|
|
15704
|
+
//#region ../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/common/null.js
|
|
15693
15705
|
var require_null = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
15694
15706
|
var Scalar = require_Scalar();
|
|
15695
15707
|
const nullTag = {
|
|
@@ -15704,7 +15716,7 @@ var require_null = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
15704
15716
|
exports.nullTag = nullTag;
|
|
15705
15717
|
}));
|
|
15706
15718
|
//#endregion
|
|
15707
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.
|
|
15719
|
+
//#region ../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/core/bool.js
|
|
15708
15720
|
var require_bool$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
15709
15721
|
var Scalar = require_Scalar();
|
|
15710
15722
|
const boolTag = {
|
|
@@ -15723,7 +15735,7 @@ var require_bool$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
15723
15735
|
exports.boolTag = boolTag;
|
|
15724
15736
|
}));
|
|
15725
15737
|
//#endregion
|
|
15726
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.
|
|
15738
|
+
//#region ../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/stringify/stringifyNumber.js
|
|
15727
15739
|
var require_stringifyNumber = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
15728
15740
|
function stringifyNumber({ format, minFractionDigits, tag, value }) {
|
|
15729
15741
|
if (typeof value === "bigint") return String(value);
|
|
@@ -15744,7 +15756,7 @@ var require_stringifyNumber = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
15744
15756
|
exports.stringifyNumber = stringifyNumber;
|
|
15745
15757
|
}));
|
|
15746
15758
|
//#endregion
|
|
15747
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.
|
|
15759
|
+
//#region ../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/core/float.js
|
|
15748
15760
|
var require_float$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
15749
15761
|
var Scalar = require_Scalar();
|
|
15750
15762
|
var stringifyNumber = require_stringifyNumber();
|
|
@@ -15785,7 +15797,7 @@ var require_float$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
15785
15797
|
exports.floatNaN = floatNaN;
|
|
15786
15798
|
}));
|
|
15787
15799
|
//#endregion
|
|
15788
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.
|
|
15800
|
+
//#region ../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/core/int.js
|
|
15789
15801
|
var require_int$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
15790
15802
|
var stringifyNumber = require_stringifyNumber();
|
|
15791
15803
|
const intIdentify = (value) => typeof value === "bigint" || Number.isInteger(value);
|
|
@@ -15826,7 +15838,7 @@ var require_int$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
15826
15838
|
exports.intOct = intOct;
|
|
15827
15839
|
}));
|
|
15828
15840
|
//#endregion
|
|
15829
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.
|
|
15841
|
+
//#region ../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/core/schema.js
|
|
15830
15842
|
var require_schema$2 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
15831
15843
|
var map = require_map();
|
|
15832
15844
|
var _null = require_null();
|
|
@@ -15850,7 +15862,7 @@ var require_schema$2 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
15850
15862
|
];
|
|
15851
15863
|
}));
|
|
15852
15864
|
//#endregion
|
|
15853
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.
|
|
15865
|
+
//#region ../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/json/schema.js
|
|
15854
15866
|
var require_schema$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
15855
15867
|
var Scalar = require_Scalar();
|
|
15856
15868
|
var map = require_map();
|
|
@@ -15912,7 +15924,7 @@ var require_schema$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
15912
15924
|
});
|
|
15913
15925
|
}));
|
|
15914
15926
|
//#endregion
|
|
15915
|
-
//#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
|
|
15916
15928
|
var require_binary = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
15917
15929
|
var node_buffer = __require("buffer");
|
|
15918
15930
|
var Scalar = require_Scalar();
|
|
@@ -15968,7 +15980,7 @@ var require_binary = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
15968
15980
|
};
|
|
15969
15981
|
}));
|
|
15970
15982
|
//#endregion
|
|
15971
|
-
//#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
|
|
15972
15984
|
var require_pairs = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
15973
15985
|
var identity = require_identity();
|
|
15974
15986
|
var Pair = require_Pair();
|
|
@@ -16029,7 +16041,7 @@ var require_pairs = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
16029
16041
|
exports.resolvePairs = resolvePairs;
|
|
16030
16042
|
}));
|
|
16031
16043
|
//#endregion
|
|
16032
|
-
//#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
|
|
16033
16045
|
var require_omap = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
16034
16046
|
var identity = require_identity();
|
|
16035
16047
|
var toJS = require_toJS();
|
|
@@ -16094,7 +16106,7 @@ var require_omap = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
16094
16106
|
exports.omap = omap;
|
|
16095
16107
|
}));
|
|
16096
16108
|
//#endregion
|
|
16097
|
-
//#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
|
|
16098
16110
|
var require_bool = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
16099
16111
|
var Scalar = require_Scalar();
|
|
16100
16112
|
function boolStringify({ value, source }, ctx) {
|
|
@@ -16121,7 +16133,7 @@ var require_bool = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
16121
16133
|
exports.trueTag = trueTag;
|
|
16122
16134
|
}));
|
|
16123
16135
|
//#endregion
|
|
16124
|
-
//#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
|
|
16125
16137
|
var require_float = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
16126
16138
|
var Scalar = require_Scalar();
|
|
16127
16139
|
var stringifyNumber = require_stringifyNumber();
|
|
@@ -16165,7 +16177,7 @@ var require_float = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
16165
16177
|
exports.floatNaN = floatNaN;
|
|
16166
16178
|
}));
|
|
16167
16179
|
//#endregion
|
|
16168
|
-
//#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
|
|
16169
16181
|
var require_int = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
16170
16182
|
var stringifyNumber = require_stringifyNumber();
|
|
16171
16183
|
const intIdentify = (value) => typeof value === "bigint" || Number.isInteger(value);
|
|
@@ -16238,7 +16250,7 @@ var require_int = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
16238
16250
|
exports.intOct = intOct;
|
|
16239
16251
|
}));
|
|
16240
16252
|
//#endregion
|
|
16241
|
-
//#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
|
|
16242
16254
|
var require_set = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
16243
16255
|
var identity = require_identity();
|
|
16244
16256
|
var Pair = require_Pair();
|
|
@@ -16307,7 +16319,7 @@ var require_set = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
16307
16319
|
exports.set = set;
|
|
16308
16320
|
}));
|
|
16309
16321
|
//#endregion
|
|
16310
|
-
//#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
|
|
16311
16323
|
var require_timestamp = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
16312
16324
|
var stringifyNumber = require_stringifyNumber();
|
|
16313
16325
|
/** Internal types handle bigint as number, because TS can't figure it out. */
|
|
@@ -16390,7 +16402,7 @@ var require_timestamp = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
16390
16402
|
exports.timestamp = timestamp;
|
|
16391
16403
|
}));
|
|
16392
16404
|
//#endregion
|
|
16393
|
-
//#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
|
|
16394
16406
|
var require_schema = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
16395
16407
|
var map = require_map();
|
|
16396
16408
|
var _null = require_null();
|
|
@@ -16430,7 +16442,7 @@ var require_schema = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
16430
16442
|
];
|
|
16431
16443
|
}));
|
|
16432
16444
|
//#endregion
|
|
16433
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.
|
|
16445
|
+
//#region ../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/tags.js
|
|
16434
16446
|
var require_tags = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
16435
16447
|
var map = require_map();
|
|
16436
16448
|
var _null = require_null();
|
|
@@ -16516,7 +16528,7 @@ var require_tags = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
16516
16528
|
exports.getTags = getTags;
|
|
16517
16529
|
}));
|
|
16518
16530
|
//#endregion
|
|
16519
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.
|
|
16531
|
+
//#region ../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/Schema.js
|
|
16520
16532
|
var require_Schema = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
16521
16533
|
var identity = require_identity();
|
|
16522
16534
|
var map = require_map();
|
|
@@ -16544,7 +16556,7 @@ var require_Schema = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
16544
16556
|
};
|
|
16545
16557
|
}));
|
|
16546
16558
|
//#endregion
|
|
16547
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.
|
|
16559
|
+
//#region ../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/stringify/stringifyDocument.js
|
|
16548
16560
|
var require_stringifyDocument = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
16549
16561
|
var identity = require_identity();
|
|
16550
16562
|
var stringify = require_stringify();
|
|
@@ -16606,7 +16618,7 @@ var require_stringifyDocument = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
16606
16618
|
exports.stringifyDocument = stringifyDocument;
|
|
16607
16619
|
}));
|
|
16608
16620
|
//#endregion
|
|
16609
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.
|
|
16621
|
+
//#region ../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/doc/Document.js
|
|
16610
16622
|
var require_Document = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
16611
16623
|
var Alias = require_Alias();
|
|
16612
16624
|
var Collection = require_Collection();
|
|
@@ -16887,7 +16899,7 @@ var require_Document = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
16887
16899
|
exports.Document = Document;
|
|
16888
16900
|
}));
|
|
16889
16901
|
//#endregion
|
|
16890
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.
|
|
16902
|
+
//#region ../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/errors.js
|
|
16891
16903
|
var require_errors = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
16892
16904
|
var YAMLError = class extends Error {
|
|
16893
16905
|
constructor(name, pos, code, message) {
|
|
@@ -16940,7 +16952,7 @@ var require_errors = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
16940
16952
|
exports.prettifyError = prettifyError;
|
|
16941
16953
|
}));
|
|
16942
16954
|
//#endregion
|
|
16943
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.
|
|
16955
|
+
//#region ../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/compose/resolve-props.js
|
|
16944
16956
|
var require_resolve_props = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
16945
16957
|
function resolveProps(tokens, { flow, indicator, next, offset, onError, parentIndent, startOnNewline }) {
|
|
16946
16958
|
let spaceBefore = false;
|
|
@@ -17047,7 +17059,7 @@ var require_resolve_props = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
17047
17059
|
exports.resolveProps = resolveProps;
|
|
17048
17060
|
}));
|
|
17049
17061
|
//#endregion
|
|
17050
|
-
//#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
|
|
17051
17063
|
var require_util_contains_newline = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
17052
17064
|
function containsNewline(key) {
|
|
17053
17065
|
if (!key) return null;
|
|
@@ -17076,7 +17088,7 @@ var require_util_contains_newline = /* @__PURE__ */ __commonJSMin(((exports) =>
|
|
|
17076
17088
|
exports.containsNewline = containsNewline;
|
|
17077
17089
|
}));
|
|
17078
17090
|
//#endregion
|
|
17079
|
-
//#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
|
|
17080
17092
|
var require_util_flow_indent_check = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
17081
17093
|
var utilContainsNewline = require_util_contains_newline();
|
|
17082
17094
|
function flowIndentCheck(indent, fc, onError) {
|
|
@@ -17088,7 +17100,7 @@ var require_util_flow_indent_check = /* @__PURE__ */ __commonJSMin(((exports) =>
|
|
|
17088
17100
|
exports.flowIndentCheck = flowIndentCheck;
|
|
17089
17101
|
}));
|
|
17090
17102
|
//#endregion
|
|
17091
|
-
//#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
|
|
17092
17104
|
var require_util_map_includes = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
17093
17105
|
var identity = require_identity();
|
|
17094
17106
|
function mapIncludes(ctx, items, search) {
|
|
@@ -17100,7 +17112,7 @@ var require_util_map_includes = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
17100
17112
|
exports.mapIncludes = mapIncludes;
|
|
17101
17113
|
}));
|
|
17102
17114
|
//#endregion
|
|
17103
|
-
//#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
|
|
17104
17116
|
var require_resolve_block_map = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
17105
17117
|
var Pair = require_Pair();
|
|
17106
17118
|
var YAMLMap = require_YAMLMap();
|
|
@@ -17188,7 +17200,7 @@ var require_resolve_block_map = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
17188
17200
|
exports.resolveBlockMap = resolveBlockMap;
|
|
17189
17201
|
}));
|
|
17190
17202
|
//#endregion
|
|
17191
|
-
//#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
|
|
17192
17204
|
var require_resolve_block_seq = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
17193
17205
|
var YAMLSeq = require_YAMLSeq();
|
|
17194
17206
|
var resolveProps = require_resolve_props();
|
|
@@ -17233,7 +17245,7 @@ var require_resolve_block_seq = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
17233
17245
|
exports.resolveBlockSeq = resolveBlockSeq;
|
|
17234
17246
|
}));
|
|
17235
17247
|
//#endregion
|
|
17236
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.
|
|
17248
|
+
//#region ../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/compose/resolve-end.js
|
|
17237
17249
|
var require_resolve_end = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
17238
17250
|
function resolveEnd(end, offset, reqSpace, onError) {
|
|
17239
17251
|
let comment = "";
|
|
@@ -17271,7 +17283,7 @@ var require_resolve_end = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
17271
17283
|
exports.resolveEnd = resolveEnd;
|
|
17272
17284
|
}));
|
|
17273
17285
|
//#endregion
|
|
17274
|
-
//#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
|
|
17275
17287
|
var require_resolve_flow_collection = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
17276
17288
|
var identity = require_identity();
|
|
17277
17289
|
var Pair = require_Pair();
|
|
@@ -17434,7 +17446,7 @@ var require_resolve_flow_collection = /* @__PURE__ */ __commonJSMin(((exports) =
|
|
|
17434
17446
|
exports.resolveFlowCollection = resolveFlowCollection;
|
|
17435
17447
|
}));
|
|
17436
17448
|
//#endregion
|
|
17437
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.
|
|
17449
|
+
//#region ../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/compose/compose-collection.js
|
|
17438
17450
|
var require_compose_collection = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
17439
17451
|
var identity = require_identity();
|
|
17440
17452
|
var Scalar = require_Scalar();
|
|
@@ -17486,7 +17498,7 @@ var require_compose_collection = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
17486
17498
|
exports.composeCollection = composeCollection;
|
|
17487
17499
|
}));
|
|
17488
17500
|
//#endregion
|
|
17489
|
-
//#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
|
|
17490
17502
|
var require_resolve_block_scalar = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
17491
17503
|
var Scalar = require_Scalar();
|
|
17492
17504
|
function resolveBlockScalar(ctx, scalar, onError) {
|
|
@@ -17663,7 +17675,7 @@ var require_resolve_block_scalar = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
17663
17675
|
exports.resolveBlockScalar = resolveBlockScalar;
|
|
17664
17676
|
}));
|
|
17665
17677
|
//#endregion
|
|
17666
|
-
//#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
|
|
17667
17679
|
var require_resolve_flow_scalar = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
17668
17680
|
var Scalar = require_Scalar();
|
|
17669
17681
|
var resolveEnd = require_resolve_end();
|
|
@@ -17733,40 +17745,41 @@ var require_resolve_flow_scalar = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
17733
17745
|
case "`": badChar = `reserved character ${source[0]}`;
|
|
17734
17746
|
}
|
|
17735
17747
|
if (badChar) onError(0, "BAD_SCALAR_START", `Plain value cannot start with ${badChar}`);
|
|
17736
|
-
return
|
|
17748
|
+
return unfoldLines(source);
|
|
17737
17749
|
}
|
|
17738
17750
|
function singleQuotedValue(source, onError) {
|
|
17739
17751
|
if (source[source.length - 1] !== "'" || source.length === 1) onError(source.length, "MISSING_CHAR", "Missing closing 'quote");
|
|
17740
|
-
return
|
|
17752
|
+
return unfoldLines(source.slice(1, -1)).replace(/''/g, "'");
|
|
17741
17753
|
}
|
|
17742
|
-
function
|
|
17754
|
+
function unfoldLines(source) {
|
|
17755
|
+
const line = /(.*?)\r?\n/sy;
|
|
17756
|
+
let match = line.exec(source);
|
|
17757
|
+
if (!match) return source;
|
|
17743
17758
|
/**
|
|
17744
|
-
* The negative
|
|
17759
|
+
* The negative lookbehinds in these RegExps are to
|
|
17745
17760
|
* prevent causing a polynomial search time in certain cases.
|
|
17746
17761
|
*
|
|
17747
|
-
* The try-catch is for Safari
|
|
17762
|
+
* The try-catch is for Safari < 16.4 and other old browsers:
|
|
17748
17763
|
* https://caniuse.com/js-regexp-lookbehind
|
|
17749
17764
|
*/
|
|
17750
|
-
let
|
|
17765
|
+
let trimEnd, trimBoth;
|
|
17751
17766
|
try {
|
|
17752
|
-
|
|
17753
|
-
|
|
17767
|
+
trimEnd = new RegExp("(?<![ ])[ ]+$");
|
|
17768
|
+
trimBoth = new RegExp("^[ ]+|(?<![ ])[ ]+$", "g");
|
|
17754
17769
|
} catch {
|
|
17755
|
-
|
|
17756
|
-
|
|
17770
|
+
trimEnd = /[ \t]+$/;
|
|
17771
|
+
trimBoth = /^[ \t]+|[ \t]+$/g;
|
|
17757
17772
|
}
|
|
17758
|
-
let
|
|
17759
|
-
if (!match) return source;
|
|
17760
|
-
let res = match[1];
|
|
17773
|
+
let res = match[1].replace(trimEnd, "");
|
|
17761
17774
|
let sep = " ";
|
|
17762
|
-
let pos =
|
|
17763
|
-
line.lastIndex = pos;
|
|
17775
|
+
let pos = line.lastIndex;
|
|
17764
17776
|
while (match = line.exec(source)) {
|
|
17765
|
-
|
|
17777
|
+
const lm = match[1].replace(trimBoth, "");
|
|
17778
|
+
if (lm === "") {
|
|
17766
17779
|
if (sep === "\n") res += sep;
|
|
17767
17780
|
else sep = "\n";
|
|
17768
17781
|
} else {
|
|
17769
|
-
res += sep +
|
|
17782
|
+
res += sep + lm;
|
|
17770
17783
|
sep = " ";
|
|
17771
17784
|
}
|
|
17772
17785
|
pos = line.lastIndex;
|
|
@@ -17867,7 +17880,7 @@ var require_resolve_flow_scalar = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
17867
17880
|
exports.resolveFlowScalar = resolveFlowScalar;
|
|
17868
17881
|
}));
|
|
17869
17882
|
//#endregion
|
|
17870
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.
|
|
17883
|
+
//#region ../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/compose/compose-scalar.js
|
|
17871
17884
|
var require_compose_scalar = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
17872
17885
|
var identity = require_identity();
|
|
17873
17886
|
var Scalar = require_Scalar();
|
|
@@ -17928,7 +17941,7 @@ var require_compose_scalar = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
17928
17941
|
exports.composeScalar = composeScalar;
|
|
17929
17942
|
}));
|
|
17930
17943
|
//#endregion
|
|
17931
|
-
//#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
|
|
17932
17945
|
var require_util_empty_scalar_position = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
17933
17946
|
function emptyScalarPosition(offset, before, pos) {
|
|
17934
17947
|
if (before) {
|
|
@@ -17955,7 +17968,7 @@ var require_util_empty_scalar_position = /* @__PURE__ */ __commonJSMin(((exports
|
|
|
17955
17968
|
exports.emptyScalarPosition = emptyScalarPosition;
|
|
17956
17969
|
}));
|
|
17957
17970
|
//#endregion
|
|
17958
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.
|
|
17971
|
+
//#region ../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/compose/compose-node.js
|
|
17959
17972
|
var require_compose_node = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
17960
17973
|
var Alias = require_Alias();
|
|
17961
17974
|
var identity = require_identity();
|
|
@@ -18046,7 +18059,7 @@ var require_compose_node = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
18046
18059
|
exports.composeNode = composeNode;
|
|
18047
18060
|
}));
|
|
18048
18061
|
//#endregion
|
|
18049
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.
|
|
18062
|
+
//#region ../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/compose/compose-doc.js
|
|
18050
18063
|
var require_compose_doc = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
18051
18064
|
var Document = require_Document();
|
|
18052
18065
|
var composeNode = require_compose_node();
|
|
@@ -18088,7 +18101,7 @@ var require_compose_doc = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
18088
18101
|
exports.composeDoc = composeDoc;
|
|
18089
18102
|
}));
|
|
18090
18103
|
//#endregion
|
|
18091
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.
|
|
18104
|
+
//#region ../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/compose/composer.js
|
|
18092
18105
|
var require_composer = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
18093
18106
|
var node_process$1 = __require("process");
|
|
18094
18107
|
var directives = require_directives();
|
|
@@ -18286,7 +18299,7 @@ var require_composer = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
18286
18299
|
exports.Composer = Composer;
|
|
18287
18300
|
}));
|
|
18288
18301
|
//#endregion
|
|
18289
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.
|
|
18302
|
+
//#region ../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/parse/cst-scalar.js
|
|
18290
18303
|
var require_cst_scalar = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
18291
18304
|
var resolveBlockScalar = require_resolve_block_scalar();
|
|
18292
18305
|
var resolveFlowScalar = require_resolve_flow_scalar();
|
|
@@ -18553,7 +18566,7 @@ var require_cst_scalar = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
18553
18566
|
exports.setScalarValue = setScalarValue;
|
|
18554
18567
|
}));
|
|
18555
18568
|
//#endregion
|
|
18556
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.
|
|
18569
|
+
//#region ../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/parse/cst-stringify.js
|
|
18557
18570
|
var require_cst_stringify = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
18558
18571
|
/**
|
|
18559
18572
|
* Stringify a CST document, token, or collection item
|
|
@@ -18604,7 +18617,7 @@ var require_cst_stringify = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
18604
18617
|
exports.stringify = stringify;
|
|
18605
18618
|
}));
|
|
18606
18619
|
//#endregion
|
|
18607
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.
|
|
18620
|
+
//#region ../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/parse/cst-visit.js
|
|
18608
18621
|
var require_cst_visit = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
18609
18622
|
const BREAK = Symbol("break visit");
|
|
18610
18623
|
const SKIP = Symbol("skip children");
|
|
@@ -18695,7 +18708,7 @@ var require_cst_visit = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
18695
18708
|
exports.visit = visit;
|
|
18696
18709
|
}));
|
|
18697
18710
|
//#endregion
|
|
18698
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.
|
|
18711
|
+
//#region ../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/parse/cst.js
|
|
18699
18712
|
var require_cst = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
18700
18713
|
var cstScalar = require_cst_scalar();
|
|
18701
18714
|
var cstStringify = require_cst_stringify();
|
|
@@ -18774,7 +18787,7 @@ var require_cst = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
18774
18787
|
exports.tokenType = tokenType;
|
|
18775
18788
|
}));
|
|
18776
18789
|
//#endregion
|
|
18777
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.
|
|
18790
|
+
//#region ../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/parse/lexer.js
|
|
18778
18791
|
var require_lexer = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
18779
18792
|
var cst = require_cst();
|
|
18780
18793
|
function isEmpty(ch) {
|
|
@@ -19307,7 +19320,7 @@ var require_lexer = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
19307
19320
|
exports.Lexer = Lexer;
|
|
19308
19321
|
}));
|
|
19309
19322
|
//#endregion
|
|
19310
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.
|
|
19323
|
+
//#region ../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/parse/line-counter.js
|
|
19311
19324
|
var require_line_counter = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
19312
19325
|
/**
|
|
19313
19326
|
* Tracks newlines during parsing in order to provide an efficient API for
|
|
@@ -19354,7 +19367,7 @@ var require_line_counter = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
19354
19367
|
exports.LineCounter = LineCounter;
|
|
19355
19368
|
}));
|
|
19356
19369
|
//#endregion
|
|
19357
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.
|
|
19370
|
+
//#region ../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/parse/parser.js
|
|
19358
19371
|
var require_parser = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
19359
19372
|
var node_process = __require("process");
|
|
19360
19373
|
var cst = require_cst();
|
|
@@ -20220,7 +20233,7 @@ var require_parser = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
20220
20233
|
exports.Parser = Parser;
|
|
20221
20234
|
}));
|
|
20222
20235
|
//#endregion
|
|
20223
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.
|
|
20236
|
+
//#region ../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/public-api.js
|
|
20224
20237
|
var require_public_api = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
20225
20238
|
var composer = require_composer();
|
|
20226
20239
|
var Document = require_Document();
|
|
@@ -20697,10 +20710,10 @@ const runStepsAsync = async (name, steps, shouldExitOnFail = true, messages) =>
|
|
|
20697
20710
|
};
|
|
20698
20711
|
//#endregion
|
|
20699
20712
|
//#region src/lib/secure/classify.ts
|
|
20700
|
-
const DAY_MS = 864e5;
|
|
20713
|
+
const DAY_MS$1 = 864e5;
|
|
20701
20714
|
function classifySecureAge(publishedAt, now = /* @__PURE__ */ new Date()) {
|
|
20702
20715
|
if (!publishedAt || Number.isNaN(publishedAt.getTime())) return { level: "gray" };
|
|
20703
|
-
const ageDays = Math.max(0, (now.getTime() - publishedAt.getTime()) / DAY_MS);
|
|
20716
|
+
const ageDays = Math.max(0, (now.getTime() - publishedAt.getTime()) / DAY_MS$1);
|
|
20704
20717
|
if (ageDays < 3) return {
|
|
20705
20718
|
ageDays,
|
|
20706
20719
|
level: "red"
|
|
@@ -21083,13 +21096,171 @@ function enableDependabotAlerts(cwd, runner = defaultGithubRunner) {
|
|
|
21083
21096
|
], { cwd }).status === 0;
|
|
21084
21097
|
}
|
|
21085
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
|
|
21086
21218
|
//#region src/lib/secure/fetchPackageSecurityMetadata.ts
|
|
21087
|
-
const REGISTRY_BASE$
|
|
21219
|
+
const REGISTRY_BASE$3 = "https://registry.npmjs.org";
|
|
21088
21220
|
const DOWNLOADS_BASE = "https://api.npmjs.org/downloads/point/last-week";
|
|
21089
21221
|
const BULK_DOWNLOADS_CHUNK_SIZE = 100;
|
|
21090
|
-
const SCOPED_DOWNLOADS_CONCURRENCY =
|
|
21222
|
+
const SCOPED_DOWNLOADS_CONCURRENCY = 1;
|
|
21223
|
+
const SCOPED_DOWNLOADS_SWEEP_MS = 3e3;
|
|
21091
21224
|
const manifestCache = /* @__PURE__ */ new Map();
|
|
21092
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
|
+
}
|
|
21093
21264
|
function packageUrlSegment(packageName) {
|
|
21094
21265
|
return encodeURIComponent(packageName);
|
|
21095
21266
|
}
|
|
@@ -21103,13 +21274,17 @@ function chunks(items, size) {
|
|
|
21103
21274
|
}
|
|
21104
21275
|
async function fetchManifestUncached(packageName) {
|
|
21105
21276
|
try {
|
|
21106
|
-
const res = await fetch(`${REGISTRY_BASE$
|
|
21277
|
+
const res = await fetch(`${REGISTRY_BASE$3}/${packageUrlSegment(packageName)}`, { headers: { Accept: "application/json" } });
|
|
21107
21278
|
if (!res.ok) return void 0;
|
|
21108
21279
|
const data = await res.json();
|
|
21280
|
+
const distTags = data["dist-tags"] ?? {};
|
|
21281
|
+
const versions = data.versions ?? {};
|
|
21109
21282
|
return {
|
|
21110
|
-
distTags
|
|
21283
|
+
...isLatestVersionDeprecated(distTags, versions) && { deprecated: true },
|
|
21284
|
+
distTags,
|
|
21285
|
+
...isLatestVersionPublic(distTags, versions) && { public: true },
|
|
21111
21286
|
time: data.time ?? {},
|
|
21112
|
-
versions: Object.keys(
|
|
21287
|
+
versions: Object.keys(versions)
|
|
21113
21288
|
};
|
|
21114
21289
|
} catch {
|
|
21115
21290
|
return;
|
|
@@ -21122,32 +21297,53 @@ function fetchSecureRegistryManifest(packageName) {
|
|
|
21122
21297
|
manifestCache.set(packageName, pending);
|
|
21123
21298
|
return pending;
|
|
21124
21299
|
}
|
|
21125
|
-
async function fetchDownloadsUncached(packageName) {
|
|
21126
|
-
|
|
21127
|
-
|
|
21128
|
-
|
|
21129
|
-
const
|
|
21130
|
-
|
|
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;
|
|
21131
21315
|
} catch {
|
|
21132
21316
|
return;
|
|
21133
21317
|
}
|
|
21134
21318
|
}
|
|
21135
|
-
function fetchSecureWeeklyDownloads(packageName) {
|
|
21319
|
+
function fetchSecureWeeklyDownloads(packageName, options = {}) {
|
|
21136
21320
|
const cached = downloadsCache.get(packageName);
|
|
21137
21321
|
if (cached) return cached;
|
|
21138
|
-
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
|
+
})();
|
|
21139
21333
|
downloadsCache.set(packageName, pending);
|
|
21140
21334
|
return pending;
|
|
21141
21335
|
}
|
|
21142
|
-
async function fetchBulkWeeklyDownloads(packageNames) {
|
|
21336
|
+
async function fetchBulkWeeklyDownloads(packageNames, options = {}) {
|
|
21143
21337
|
const results = /* @__PURE__ */ new Map();
|
|
21144
21338
|
if (packageNames.length === 0) return results;
|
|
21339
|
+
const gate = resolveDownloadGate(options);
|
|
21145
21340
|
try {
|
|
21146
21341
|
const packageSegment = packageNames.map(packageUrlSegment).join(",");
|
|
21147
|
-
const res = await fetch(`${DOWNLOADS_BASE}/${packageSegment}`);
|
|
21342
|
+
const res = await gate.schedule(() => fetch(`${DOWNLOADS_BASE}/${packageSegment}`));
|
|
21148
21343
|
if (!res.ok) {
|
|
21344
|
+
if (DOWNLOAD_RETRY_STATUSES.has(res.status)) gate.noteRateLimit(downloadRetryWaitMs(0, readRetryAfter(res)));
|
|
21149
21345
|
await runWithConcurrency(packageNames, SCOPED_DOWNLOADS_CONCURRENCY, async (name) => {
|
|
21150
|
-
results.set(name, await fetchSecureWeeklyDownloads(name));
|
|
21346
|
+
results.set(name, await fetchSecureWeeklyDownloads(name, options));
|
|
21151
21347
|
});
|
|
21152
21348
|
return results;
|
|
21153
21349
|
}
|
|
@@ -21158,33 +21354,90 @@ async function fetchBulkWeeklyDownloads(packageNames) {
|
|
|
21158
21354
|
}
|
|
21159
21355
|
} catch {
|
|
21160
21356
|
await runWithConcurrency(packageNames, SCOPED_DOWNLOADS_CONCURRENCY, async (name) => {
|
|
21161
|
-
results.set(name, await fetchSecureWeeklyDownloads(name));
|
|
21357
|
+
results.set(name, await fetchSecureWeeklyDownloads(name, options));
|
|
21162
21358
|
});
|
|
21163
21359
|
}
|
|
21164
21360
|
return results;
|
|
21165
21361
|
}
|
|
21166
|
-
async function fetchAllSecureWeeklyDownloads(packageNames, concurrency = SCOPED_DOWNLOADS_CONCURRENCY) {
|
|
21362
|
+
async function fetchAllSecureWeeklyDownloads(packageNames, concurrency = SCOPED_DOWNLOADS_CONCURRENCY, options = {}) {
|
|
21167
21363
|
const uniqueNames = [...new Set(packageNames)].toSorted((a, b) => a.localeCompare(b));
|
|
21168
21364
|
const unscopedNames = uniqueNames.filter((name) => !isScopedPackageName(name));
|
|
21169
21365
|
const scopedNames = uniqueNames.filter(isScopedPackageName);
|
|
21170
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
|
+
}
|
|
21171
21391
|
await runWithConcurrency(chunks(unscopedNames, BULK_DOWNLOADS_CHUNK_SIZE), 1, async (chunk) => {
|
|
21172
|
-
const chunkResults = await fetchBulkWeeklyDownloads(chunk);
|
|
21173
|
-
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
|
+
}
|
|
21174
21398
|
});
|
|
21175
|
-
|
|
21176
|
-
|
|
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;
|
|
21177
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);
|
|
21178
21422
|
return results;
|
|
21179
21423
|
}
|
|
21180
|
-
async function fetchAllSecurePackageMetadata(packageNames, concurrency = 16) {
|
|
21424
|
+
async function fetchAllSecurePackageMetadata(packageNames, concurrency = 16, options = {}) {
|
|
21181
21425
|
const uniqueNames = [...new Set(packageNames)].toSorted((a, b) => a.localeCompare(b));
|
|
21182
21426
|
const manifests = /* @__PURE__ */ new Map();
|
|
21183
21427
|
const results = /* @__PURE__ */ new Map();
|
|
21428
|
+
const total = uniqueNames.length;
|
|
21429
|
+
let manifestCompleted = 0;
|
|
21184
21430
|
await runWithConcurrency(uniqueNames, concurrency, async (name) => {
|
|
21185
21431
|
manifests.set(name, await fetchSecureRegistryManifest(name));
|
|
21432
|
+
manifestCompleted += 1;
|
|
21433
|
+
options.onProgress?.({
|
|
21434
|
+
completed: manifestCompleted,
|
|
21435
|
+
name,
|
|
21436
|
+
phase: "manifests",
|
|
21437
|
+
total
|
|
21438
|
+
});
|
|
21186
21439
|
});
|
|
21187
|
-
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 });
|
|
21188
21441
|
for (const name of uniqueNames) results.set(name, {
|
|
21189
21442
|
downloads: downloads.get(name),
|
|
21190
21443
|
manifest: manifests.get(name)
|
|
@@ -21568,7 +21821,7 @@ function collectWorkspaceDeps(cwd, workspaces, workspaceNames) {
|
|
|
21568
21821
|
}
|
|
21569
21822
|
//#endregion
|
|
21570
21823
|
//#region src/lib/updo/fetchRegistryInfo.ts
|
|
21571
|
-
const REGISTRY_BASE$
|
|
21824
|
+
const REGISTRY_BASE$2 = "https://registry.npmjs.org";
|
|
21572
21825
|
const VIEW_FIELDS = [
|
|
21573
21826
|
"versions",
|
|
21574
21827
|
"dist-tags",
|
|
@@ -21619,7 +21872,7 @@ function resolveRegistry(packageName, config) {
|
|
|
21619
21872
|
const scoped = config.scopeRegistries.get(scope);
|
|
21620
21873
|
if (scoped != null && scoped.length > 0) return scoped;
|
|
21621
21874
|
}
|
|
21622
|
-
return REGISTRY_BASE$
|
|
21875
|
+
return REGISTRY_BASE$2;
|
|
21623
21876
|
}
|
|
21624
21877
|
function combineOutput(stdout, stderr) {
|
|
21625
21878
|
return [stdout, stderr].filter(Boolean).join("\n").trim();
|
|
@@ -21893,13 +22146,13 @@ async function fetchAllRegistryInfo(packageNames, options = {}) {
|
|
|
21893
22146
|
return await fetchAllRegistryInfoDirect(packageNames, options);
|
|
21894
22147
|
}
|
|
21895
22148
|
//#endregion
|
|
21896
|
-
//#region ../../node_modules/.pnpm/@inquirer+core@12.0.3_@types+node@26.
|
|
22149
|
+
//#region ../../node_modules/.pnpm/@inquirer+core@12.0.3_@types+node@26.6.0/node_modules/@inquirer/core/dist/lib/key.js
|
|
21897
22150
|
const isUpKey = (key, keybindings = []) => key.name === "up" || keybindings.includes("vim") && key.name === "k" || keybindings.includes("emacs") && key.ctrl && key.name === "p";
|
|
21898
22151
|
const isDownKey = (key, keybindings = []) => key.name === "down" || keybindings.includes("vim") && key.name === "j" || keybindings.includes("emacs") && key.ctrl && key.name === "n";
|
|
21899
22152
|
const isSpaceKey = (key) => key.name === "space";
|
|
21900
22153
|
const isEnterKey = (key) => key.name === "enter" || key.name === "return";
|
|
21901
22154
|
//#endregion
|
|
21902
|
-
//#region ../../node_modules/.pnpm/@inquirer+core@12.0.3_@types+node@26.
|
|
22155
|
+
//#region ../../node_modules/.pnpm/@inquirer+core@12.0.3_@types+node@26.6.0/node_modules/@inquirer/core/dist/lib/errors.js
|
|
21903
22156
|
var AbortPromptError = class extends Error {
|
|
21904
22157
|
name = "AbortPromptError";
|
|
21905
22158
|
message = "Prompt was aborted";
|
|
@@ -21922,7 +22175,7 @@ var ValidationError = class extends Error {
|
|
|
21922
22175
|
name = "ValidationError";
|
|
21923
22176
|
};
|
|
21924
22177
|
//#endregion
|
|
21925
|
-
//#region ../../node_modules/.pnpm/@inquirer+core@12.0.3_@types+node@26.
|
|
22178
|
+
//#region ../../node_modules/.pnpm/@inquirer+core@12.0.3_@types+node@26.6.0/node_modules/@inquirer/core/dist/lib/hook-engine.js
|
|
21926
22179
|
const hookStorage = new AsyncLocalStorage();
|
|
21927
22180
|
function createStore(rl) {
|
|
21928
22181
|
return {
|
|
@@ -22018,7 +22271,7 @@ const effectScheduler = {
|
|
|
22018
22271
|
}
|
|
22019
22272
|
};
|
|
22020
22273
|
//#endregion
|
|
22021
|
-
//#region ../../node_modules/.pnpm/@inquirer+core@12.0.3_@types+node@26.
|
|
22274
|
+
//#region ../../node_modules/.pnpm/@inquirer+core@12.0.3_@types+node@26.6.0/node_modules/@inquirer/core/dist/lib/use-state.js
|
|
22022
22275
|
function isFactory(value) {
|
|
22023
22276
|
return typeof value === "function";
|
|
22024
22277
|
}
|
|
@@ -22042,7 +22295,7 @@ function useState(defaultValue) {
|
|
|
22042
22295
|
});
|
|
22043
22296
|
}
|
|
22044
22297
|
//#endregion
|
|
22045
|
-
//#region ../../node_modules/.pnpm/@inquirer+core@12.0.3_@types+node@26.
|
|
22298
|
+
//#region ../../node_modules/.pnpm/@inquirer+core@12.0.3_@types+node@26.6.0/node_modules/@inquirer/core/dist/lib/use-effect.js
|
|
22046
22299
|
function useEffect(cb, depArray) {
|
|
22047
22300
|
withPointer((pointer) => {
|
|
22048
22301
|
const oldDeps = pointer.get();
|
|
@@ -22051,12 +22304,12 @@ function useEffect(cb, depArray) {
|
|
|
22051
22304
|
});
|
|
22052
22305
|
}
|
|
22053
22306
|
//#endregion
|
|
22054
|
-
//#region ../../node_modules/.pnpm/@inquirer+core@12.0.3_@types+node@26.
|
|
22307
|
+
//#region ../../node_modules/.pnpm/@inquirer+core@12.0.3_@types+node@26.6.0/node_modules/@inquirer/core/dist/lib/use-ref.js
|
|
22055
22308
|
function useRef(val) {
|
|
22056
22309
|
return useState({ current: val })[0];
|
|
22057
22310
|
}
|
|
22058
22311
|
//#endregion
|
|
22059
|
-
//#region ../../node_modules/.pnpm/@inquirer+core@12.0.3_@types+node@26.
|
|
22312
|
+
//#region ../../node_modules/.pnpm/@inquirer+core@12.0.3_@types+node@26.6.0/node_modules/@inquirer/core/dist/lib/use-keypress.js
|
|
22060
22313
|
function useKeypress(userHandler) {
|
|
22061
22314
|
const signal = useRef(userHandler);
|
|
22062
22315
|
signal.current = userHandler;
|
|
@@ -22384,7 +22637,7 @@ function wrapAnsi$1(string, columns, options) {
|
|
|
22384
22637
|
return String(string).normalize().split(CRLF_OR_LF).map((line) => exec$2(line, columns, options)).join("\n");
|
|
22385
22638
|
}
|
|
22386
22639
|
//#endregion
|
|
22387
|
-
//#region ../../node_modules/.pnpm/@inquirer+core@12.0.3_@types+node@26.
|
|
22640
|
+
//#region ../../node_modules/.pnpm/@inquirer+core@12.0.3_@types+node@26.6.0/node_modules/@inquirer/core/dist/lib/utils.js
|
|
22388
22641
|
var import_cli_width = /* @__PURE__ */ __toESM(require_cli_width(), 1);
|
|
22389
22642
|
/**
|
|
22390
22643
|
* Force line returns at specific width. This function is ANSI code friendly and it'll
|
|
@@ -22724,7 +22977,7 @@ const eraseLine = "\x1B[2K";
|
|
|
22724
22977
|
/** Erase the specified number of lines above the cursor */
|
|
22725
22978
|
const eraseLines = (lines) => lines > 0 ? (eraseLine + cursorUp(1)).repeat(lines - 1) + "\x1B[2K\x1B[G" : "";
|
|
22726
22979
|
//#endregion
|
|
22727
|
-
//#region ../../node_modules/.pnpm/@inquirer+core@12.0.3_@types+node@26.
|
|
22980
|
+
//#region ../../node_modules/.pnpm/@inquirer+core@12.0.3_@types+node@26.6.0/node_modules/@inquirer/core/dist/lib/screen-manager.js
|
|
22728
22981
|
const height = (content) => content.split("\n").length;
|
|
22729
22982
|
const lastLine = (content) => content.split("\n").pop() ?? "";
|
|
22730
22983
|
var ScreenManager = class {
|
|
@@ -22781,7 +23034,7 @@ var ScreenManager = class {
|
|
|
22781
23034
|
}
|
|
22782
23035
|
};
|
|
22783
23036
|
//#endregion
|
|
22784
|
-
//#region ../../node_modules/.pnpm/@inquirer+core@12.0.3_@types+node@26.
|
|
23037
|
+
//#region ../../node_modules/.pnpm/@inquirer+core@12.0.3_@types+node@26.6.0/node_modules/@inquirer/core/dist/lib/promise-polyfill.js
|
|
22785
23038
|
var PromisePolyfill = class extends Promise {
|
|
22786
23039
|
static withResolver() {
|
|
22787
23040
|
let resolve;
|
|
@@ -22797,7 +23050,7 @@ var PromisePolyfill = class extends Promise {
|
|
|
22797
23050
|
}
|
|
22798
23051
|
};
|
|
22799
23052
|
//#endregion
|
|
22800
|
-
//#region ../../node_modules/.pnpm/@inquirer+core@12.0.3_@types+node@26.
|
|
23053
|
+
//#region ../../node_modules/.pnpm/@inquirer+core@12.0.3_@types+node@26.6.0/node_modules/@inquirer/core/dist/lib/create-prompt.js
|
|
22801
23054
|
var import_lib = /* @__PURE__ */ __toESM(require_lib(), 1);
|
|
22802
23055
|
const nativeSetImmediate = globalThis.setImmediate;
|
|
22803
23056
|
/**
|
|
@@ -30737,13 +30990,13 @@ const misplacedPeerDependenciesRule = {
|
|
|
30737
30990
|
* Results are cached per-process so repeated lookups within a single
|
|
30738
30991
|
* deplint run hit the registry at most once per package.
|
|
30739
30992
|
*/
|
|
30740
|
-
const REGISTRY_BASE = "https://registry.npmjs.org";
|
|
30993
|
+
const REGISTRY_BASE$1 = "https://registry.npmjs.org";
|
|
30741
30994
|
const cache = /* @__PURE__ */ new Map();
|
|
30742
30995
|
const availabilityCache = /* @__PURE__ */ new Map();
|
|
30743
30996
|
const availabilityLookupState = {};
|
|
30744
30997
|
async function fetchUncached(packageName) {
|
|
30745
30998
|
try {
|
|
30746
|
-
const url = `${REGISTRY_BASE}/${encodeURIComponent(packageName)}`;
|
|
30999
|
+
const url = `${REGISTRY_BASE$1}/${encodeURIComponent(packageName)}`;
|
|
30747
31000
|
const res = await fetch(url, { headers: { Accept: "application/vnd.npm.install-v1+json" } });
|
|
30748
31001
|
if (!res.ok) return void 0;
|
|
30749
31002
|
const data = await res.json();
|
|
@@ -30777,7 +31030,7 @@ async function fetchPackageManifests(packageNames, concurrency = 16) {
|
|
|
30777
31030
|
}
|
|
30778
31031
|
async function fetchNpmjsPublicAvailabilityUncached(packageName) {
|
|
30779
31032
|
try {
|
|
30780
|
-
const url = `${REGISTRY_BASE}/${encodeURIComponent(packageName)}`;
|
|
31033
|
+
const url = `${REGISTRY_BASE$1}/${encodeURIComponent(packageName)}`;
|
|
30781
31034
|
const res = await fetch(url, {
|
|
30782
31035
|
headers: { Accept: "application/vnd.npm.install-v1+json" },
|
|
30783
31036
|
signal: AbortSignal.timeout(1e4)
|
|
@@ -44281,12 +44534,14 @@ function isNodePackage(pkg) {
|
|
|
44281
44534
|
if (pkg.bin !== void 0) return true;
|
|
44282
44535
|
return hasNodeExport(pkg.exports);
|
|
44283
44536
|
}
|
|
44284
|
-
function checkVoltaNodeVersion(cwd, shouldFix) {
|
|
44537
|
+
function checkVoltaNodeVersion(cwd, shouldFix, nodeTrack = "current") {
|
|
44285
44538
|
const rootPath = PATH.resolve(cwd, "package.json");
|
|
44286
44539
|
const rootPkg = readPackageJson$2(rootPath);
|
|
44287
44540
|
if (!rootPkg?.volta) return [];
|
|
44288
44541
|
const pinned = rootPkg.volta.node;
|
|
44289
|
-
const
|
|
44542
|
+
const isLts = nodeTrack === "lts";
|
|
44543
|
+
const latest = isLts ? latestVersions.nodeLts : latestVersions.nodeCurrent;
|
|
44544
|
+
const trackLabel = isLts ? "LTS" : "Current";
|
|
44290
44545
|
if (!(pinned === void 0 || import_semver.default.valid(pinned) === null || import_semver.default.lt(pinned, latest))) return [];
|
|
44291
44546
|
if (shouldFix) {
|
|
44292
44547
|
rootPkg.volta.node = latest;
|
|
@@ -44296,7 +44551,7 @@ function checkVoltaNodeVersion(cwd, shouldFix) {
|
|
|
44296
44551
|
}
|
|
44297
44552
|
return [{
|
|
44298
44553
|
file: "package.json",
|
|
44299
|
-
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}`,
|
|
44300
44555
|
rule: "volta-node-latest"
|
|
44301
44556
|
}];
|
|
44302
44557
|
}
|
|
@@ -44349,9 +44604,9 @@ function withRuleId(diagnostics, rule) {
|
|
|
44349
44604
|
}
|
|
44350
44605
|
const NODE_LINT_RULES = [
|
|
44351
44606
|
{
|
|
44352
|
-
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") }),
|
|
44353
44608
|
defaultLevel: "warn",
|
|
44354
|
-
description: "Root volta.node tracks the latest
|
|
44609
|
+
description: "Root volta.node tracks the latest Node version",
|
|
44355
44610
|
fixable: true,
|
|
44356
44611
|
id: "node.volta-node-latest"
|
|
44357
44612
|
},
|
|
@@ -44391,13 +44646,15 @@ async function nodeLint(options = {}) {
|
|
|
44391
44646
|
console.log(chalk.green("Node Lint"));
|
|
44392
44647
|
const workspaces = getPackageManager().listWorkspaces();
|
|
44393
44648
|
const locations = workspaces.length > 0 ? workspaces.map((ws) => ws.location) : ["."];
|
|
44649
|
+
const config = await loadWorkspaceCommandConfig(cwd, "nodeLint");
|
|
44394
44650
|
const result = await runRuleChecks({
|
|
44395
44651
|
commandName: "node lint",
|
|
44396
44652
|
configKey: "nodeLint",
|
|
44397
|
-
config
|
|
44653
|
+
config,
|
|
44398
44654
|
context: {
|
|
44399
44655
|
cwd,
|
|
44400
44656
|
locations,
|
|
44657
|
+
nodeTrack: config.nodeTrack ?? "current",
|
|
44401
44658
|
verbose: isVerbose
|
|
44402
44659
|
},
|
|
44403
44660
|
fix: isFix,
|
|
@@ -44408,6 +44665,302 @@ async function nodeLint(options = {}) {
|
|
|
44408
44665
|
return result;
|
|
44409
44666
|
}
|
|
44410
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
|
|
44411
44964
|
//#region src/actions/npmignore-gen.ts
|
|
44412
44965
|
const filename = ".npmignore";
|
|
44413
44966
|
const npmignoreGen = (pkg) => generateIgnoreFiles(filename, pkg);
|
|
@@ -44681,14 +45234,29 @@ function fixEnginesOnlyInNonTerminal(cwd, _pkg, workspaces) {
|
|
|
44681
45234
|
} catch {}
|
|
44682
45235
|
}
|
|
44683
45236
|
}
|
|
44684
|
-
function
|
|
44685
|
-
|
|
44686
|
-
|
|
44687
|
-
|
|
44688
|
-
|
|
44689
|
-
|
|
44690
|
-
|
|
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
|
+
}
|
|
44691
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);
|
|
44692
45260
|
for (const { location, name } of workspaces) {
|
|
44693
45261
|
const pkgPath = location === "." ? PATH.resolve(cwd, "package.json") : PATH.resolve(cwd, location, "package.json");
|
|
44694
45262
|
try {
|
|
@@ -44697,12 +45265,12 @@ function checkVersionsIncludeLts(cwd, workspaces) {
|
|
|
44697
45265
|
const engines = pkg.engines;
|
|
44698
45266
|
if (engines) for (const [tool, range] of Object.entries(engines)) {
|
|
44699
45267
|
const latest = toolVersions[tool];
|
|
44700
|
-
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}`);
|
|
44701
45269
|
}
|
|
44702
45270
|
const volta = pkg.volta;
|
|
44703
45271
|
if (volta) for (const [tool, pinnedVersion] of Object.entries(volta)) {
|
|
44704
45272
|
const latest = toolVersions[tool];
|
|
44705
|
-
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}`);
|
|
44706
45274
|
}
|
|
44707
45275
|
} catch {}
|
|
44708
45276
|
}
|
|
@@ -45233,8 +45801,8 @@ const REPO_LINT_RULES = [
|
|
|
45233
45801
|
id: "repo.engines-non-terminal"
|
|
45234
45802
|
}),
|
|
45235
45803
|
repoLintRule({
|
|
45236
|
-
check: ({ cwd, workspaces }) => checkVersionsIncludeLts(cwd, workspaces),
|
|
45237
|
-
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",
|
|
45238
45806
|
id: "repo.engines-lts"
|
|
45239
45807
|
}),
|
|
45240
45808
|
repoLintRule({
|
|
@@ -45335,6 +45903,7 @@ async function packageLintMonorepo(shouldFix = false, options = {}) {
|
|
|
45335
45903
|
config,
|
|
45336
45904
|
context: {
|
|
45337
45905
|
cwd,
|
|
45906
|
+
nodeTrack: config.nodeTrack ?? "current",
|
|
45338
45907
|
pkg,
|
|
45339
45908
|
pm,
|
|
45340
45909
|
workspaces,
|
|
@@ -56593,6 +57162,9 @@ async function getRepoLintRuleCatalog() {
|
|
|
56593
57162
|
async function getNodeLintRuleCatalog() {
|
|
56594
57163
|
return runtimeRuleCatalog(RULE_COMMANDS.nodeLint.command, RULE_COMMANDS.nodeLint.configKey, NODE_LINT_RULES, await loadCommandConfig("nodeLint"));
|
|
56595
57164
|
}
|
|
57165
|
+
async function getNpmOrgLintRuleCatalog() {
|
|
57166
|
+
return runtimeRuleCatalog(RULE_COMMANDS.npmOrgLint.command, RULE_COMMANDS.npmOrgLint.configKey, NPM_ORG_LINT_RULES, await loadCommandConfig("npmOrgLint"));
|
|
57167
|
+
}
|
|
56596
57168
|
async function getLintlintRuleCatalog() {
|
|
56597
57169
|
return runtimeRuleCatalog(RULE_COMMANDS.lintLint.command, RULE_COMMANDS.lintLint.configKey, LINTLINT_RULES, await loadCommandConfig("lintLint"));
|
|
56598
57170
|
}
|
|
@@ -56723,6 +57295,7 @@ const RULE_CATALOG_LOADERS = {
|
|
|
56723
57295
|
lint: () => getEslintRuleCatalog(),
|
|
56724
57296
|
lintLint: () => getLintlintRuleCatalog(),
|
|
56725
57297
|
nodeLint: () => getNodeLintRuleCatalog(),
|
|
57298
|
+
npmOrgLint: () => getNpmOrgLintRuleCatalog(),
|
|
56726
57299
|
packman: () => getPackmanRuleCatalog(),
|
|
56727
57300
|
planLint: () => getPlanLintRuleCatalog(),
|
|
56728
57301
|
publint: () => getPublintRuleCatalog(),
|
|
@@ -58104,6 +58677,63 @@ const licenseCommand = {
|
|
|
58104
58677
|
}
|
|
58105
58678
|
};
|
|
58106
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
|
|
58107
58737
|
//#region src/xy/common/npmignoreGenCommand.ts
|
|
58108
58738
|
const npmignoreGenCommand = {
|
|
58109
58739
|
command: "npmignore-gen",
|
|
@@ -59113,7 +59743,7 @@ const commonExperimentalCommands = [
|
|
|
59113
59743
|
];
|
|
59114
59744
|
/** Experimental common commands — prefer `xyex`; warn when invoked via `xy`. */
|
|
59115
59745
|
const xyCommonExperimentalCommands = (args, channel) => {
|
|
59116
|
-
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));
|
|
59117
59747
|
};
|
|
59118
59748
|
//#endregion
|
|
59119
59749
|
//#region src/xy/deploy/deployCommand.ts
|
|
@@ -60027,6 +60657,8 @@ const COMMAND_STABILITY = {
|
|
|
60027
60657
|
"git": "stable",
|
|
60028
60658
|
"gitignore": "stable",
|
|
60029
60659
|
"npmignore-gen": "stable",
|
|
60660
|
+
"npm-org": "experimental",
|
|
60661
|
+
"npm-org lint": "experimental",
|
|
60030
60662
|
"orphan": "experimental",
|
|
60031
60663
|
"packman": "stable",
|
|
60032
60664
|
"packman lint": "stable",
|
|
@@ -60096,6 +60728,11 @@ const EXPERIMENTAL_CONFIG_SURFACES = [
|
|
|
60096
60728
|
description: "Plan folder-layout lint rule levels.",
|
|
60097
60729
|
id: "plan-lint.rules",
|
|
60098
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"
|
|
60099
60736
|
}
|
|
60100
60737
|
];
|
|
60101
60738
|
const STABILITY_PROMOTION_RUBRIC = [
|