universal-plugin 0.14.0 → 0.14.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/plugin.json +1 -1
- package/.codex-plugin/plugin.json +1 -1
- package/.cursor-plugin/plugin.json +1 -1
- package/dist/cli.mjs +904 -927
- package/package.json +2 -2
- package/plugin.json +1 -1
- package/skills/adopt-upx/scripts/rewrite-upx.mjs +1 -1
- package/skills/build-plugin/SKILL.md +1 -1
- package/skills/build-plugin/scripts/build.mjs +1 -1
- package/skills/doctor-universal-plugin/SKILL.md +3 -3
- package/skills/doctor-universal-plugin/scripts/doctor.mjs +1 -1
- package/skills/init-universal-plugin/references/create.md +1 -1
- package/skills/init-universal-plugin/scripts/init.mjs +1 -1
- package/skills/marketplace/SKILL.md +1 -1
- package/skills/marketplace/scripts/add.mjs +1 -1
- package/skills/marketplace/scripts/install-docs.mjs +1 -1
- package/skills/marketplace/scripts/marketplace.mjs +1 -1
- package/skills/marketplace/scripts/validate.mjs +1 -1
- package/skills/publish-plugin/README.md +9 -1
- package/skills/publish-plugin/SKILL.md +40 -9
- package/skills/publish-plugin/evals/evals.json +9 -3
- package/skills/version/SKILL.md +1 -1
- package/skills/version/scripts/version.mjs +1 -1
package/dist/cli.mjs
CHANGED
|
@@ -19,7 +19,7 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
19
19
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
20
20
|
var __getProtoOf = Object.getPrototypeOf;
|
|
21
21
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
22
|
-
var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports);
|
|
22
|
+
var __commonJSMin$1 = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports);
|
|
23
23
|
var __copyProps = (to, from, except, desc) => {
|
|
24
24
|
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
25
25
|
key = keys[i];
|
|
@@ -34,7 +34,6 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
34
34
|
value: mod,
|
|
35
35
|
enumerable: true
|
|
36
36
|
}) : target, mod));
|
|
37
|
-
var __require = /* #__PURE__ */ (() => createRequire(import.meta.url))();
|
|
38
37
|
//#endregion
|
|
39
38
|
//#region ../../node_modules/.pnpm/commander@15.0.0/node_modules/commander/lib/error.js
|
|
40
39
|
/**
|
|
@@ -3160,7 +3159,7 @@ function cleanCommand() {
|
|
|
3160
3159
|
}
|
|
3161
3160
|
//#endregion
|
|
3162
3161
|
//#region ../../node_modules/.pnpm/semver@7.8.1/node_modules/semver/internal/constants.js
|
|
3163
|
-
var require_constants = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
3162
|
+
var require_constants = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
|
|
3164
3163
|
module.exports = {
|
|
3165
3164
|
MAX_LENGTH: 256,
|
|
3166
3165
|
MAX_SAFE_COMPONENT_LENGTH: 16,
|
|
@@ -3183,12 +3182,12 @@ var require_constants = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
3183
3182
|
}));
|
|
3184
3183
|
//#endregion
|
|
3185
3184
|
//#region ../../node_modules/.pnpm/semver@7.8.1/node_modules/semver/internal/debug.js
|
|
3186
|
-
var require_debug = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
3185
|
+
var require_debug = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
|
|
3187
3186
|
module.exports = typeof process === "object" && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG) ? (...args) => console.error("SEMVER", ...args) : () => {};
|
|
3188
3187
|
}));
|
|
3189
3188
|
//#endregion
|
|
3190
3189
|
//#region ../../node_modules/.pnpm/semver@7.8.1/node_modules/semver/internal/re.js
|
|
3191
|
-
var require_re = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
3190
|
+
var require_re = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
|
|
3192
3191
|
const { MAX_SAFE_COMPONENT_LENGTH, MAX_SAFE_BUILD_LENGTH, MAX_LENGTH } = require_constants();
|
|
3193
3192
|
const debug = require_debug();
|
|
3194
3193
|
exports = module.exports = {};
|
|
@@ -3267,7 +3266,7 @@ var require_re = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
3267
3266
|
}));
|
|
3268
3267
|
//#endregion
|
|
3269
3268
|
//#region ../../node_modules/.pnpm/semver@7.8.1/node_modules/semver/internal/parse-options.js
|
|
3270
|
-
var require_parse_options = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
3269
|
+
var require_parse_options = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
|
|
3271
3270
|
const looseOption = Object.freeze({ loose: true });
|
|
3272
3271
|
const emptyOpts = Object.freeze({});
|
|
3273
3272
|
const parseOptions = (options) => {
|
|
@@ -3279,7 +3278,7 @@ var require_parse_options = /* @__PURE__ */ __commonJSMin(((exports, module) =>
|
|
|
3279
3278
|
}));
|
|
3280
3279
|
//#endregion
|
|
3281
3280
|
//#region ../../node_modules/.pnpm/semver@7.8.1/node_modules/semver/internal/identifiers.js
|
|
3282
|
-
var require_identifiers = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
3281
|
+
var require_identifiers = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
|
|
3283
3282
|
const numeric = /^[0-9]+$/;
|
|
3284
3283
|
const compareIdentifiers = (a, b) => {
|
|
3285
3284
|
if (typeof a === "number" && typeof b === "number") return a === b ? 0 : a < b ? -1 : 1;
|
|
@@ -3299,7 +3298,7 @@ var require_identifiers = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
3299
3298
|
}));
|
|
3300
3299
|
//#endregion
|
|
3301
3300
|
//#region ../../node_modules/.pnpm/semver@7.8.1/node_modules/semver/classes/semver.js
|
|
3302
|
-
var require_semver$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
3301
|
+
var require_semver$1 = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
|
|
3303
3302
|
const debug = require_debug();
|
|
3304
3303
|
const { MAX_LENGTH, MAX_SAFE_INTEGER } = require_constants();
|
|
3305
3304
|
const { safeRe: re, t } = require_re();
|
|
@@ -3478,7 +3477,7 @@ var require_semver$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
3478
3477
|
}));
|
|
3479
3478
|
//#endregion
|
|
3480
3479
|
//#region ../../node_modules/.pnpm/semver@7.8.1/node_modules/semver/functions/parse.js
|
|
3481
|
-
var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
3480
|
+
var require_parse = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
|
|
3482
3481
|
const SemVer = require_semver$1();
|
|
3483
3482
|
const parse = (version, options, throwErrors = false) => {
|
|
3484
3483
|
if (version instanceof SemVer) return version;
|
|
@@ -3493,7 +3492,7 @@ var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
3493
3492
|
}));
|
|
3494
3493
|
//#endregion
|
|
3495
3494
|
//#region ../../node_modules/.pnpm/semver@7.8.1/node_modules/semver/functions/valid.js
|
|
3496
|
-
var require_valid$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
3495
|
+
var require_valid$1 = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
|
|
3497
3496
|
const parse = require_parse();
|
|
3498
3497
|
const valid = (version, options) => {
|
|
3499
3498
|
const v = parse(version, options);
|
|
@@ -3503,7 +3502,7 @@ var require_valid$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
3503
3502
|
}));
|
|
3504
3503
|
//#endregion
|
|
3505
3504
|
//#region ../../node_modules/.pnpm/semver@7.8.1/node_modules/semver/functions/clean.js
|
|
3506
|
-
var require_clean = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
3505
|
+
var require_clean = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
|
|
3507
3506
|
const parse = require_parse();
|
|
3508
3507
|
const clean = (version, options) => {
|
|
3509
3508
|
const s = parse(version.trim().replace(/^[=v]+/, ""), options);
|
|
@@ -3513,7 +3512,7 @@ var require_clean = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
3513
3512
|
}));
|
|
3514
3513
|
//#endregion
|
|
3515
3514
|
//#region ../../node_modules/.pnpm/semver@7.8.1/node_modules/semver/functions/inc.js
|
|
3516
|
-
var require_inc = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
3515
|
+
var require_inc = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
|
|
3517
3516
|
const SemVer = require_semver$1();
|
|
3518
3517
|
const inc = (version, release, options, identifier, identifierBase) => {
|
|
3519
3518
|
if (typeof options === "string") {
|
|
@@ -3531,7 +3530,7 @@ var require_inc = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
3531
3530
|
}));
|
|
3532
3531
|
//#endregion
|
|
3533
3532
|
//#region ../../node_modules/.pnpm/semver@7.8.1/node_modules/semver/functions/diff.js
|
|
3534
|
-
var require_diff = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
3533
|
+
var require_diff = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
|
|
3535
3534
|
const parse = require_parse();
|
|
3536
3535
|
const diff = (version1, version2) => {
|
|
3537
3536
|
const v1 = parse(version1, null, true);
|
|
@@ -3559,28 +3558,28 @@ var require_diff = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
3559
3558
|
}));
|
|
3560
3559
|
//#endregion
|
|
3561
3560
|
//#region ../../node_modules/.pnpm/semver@7.8.1/node_modules/semver/functions/major.js
|
|
3562
|
-
var require_major = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
3561
|
+
var require_major = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
|
|
3563
3562
|
const SemVer = require_semver$1();
|
|
3564
3563
|
const major = (a, loose) => new SemVer(a, loose).major;
|
|
3565
3564
|
module.exports = major;
|
|
3566
3565
|
}));
|
|
3567
3566
|
//#endregion
|
|
3568
3567
|
//#region ../../node_modules/.pnpm/semver@7.8.1/node_modules/semver/functions/minor.js
|
|
3569
|
-
var require_minor = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
3568
|
+
var require_minor = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
|
|
3570
3569
|
const SemVer = require_semver$1();
|
|
3571
3570
|
const minor = (a, loose) => new SemVer(a, loose).minor;
|
|
3572
3571
|
module.exports = minor;
|
|
3573
3572
|
}));
|
|
3574
3573
|
//#endregion
|
|
3575
3574
|
//#region ../../node_modules/.pnpm/semver@7.8.1/node_modules/semver/functions/patch.js
|
|
3576
|
-
var require_patch = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
3575
|
+
var require_patch = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
|
|
3577
3576
|
const SemVer = require_semver$1();
|
|
3578
3577
|
const patch = (a, loose) => new SemVer(a, loose).patch;
|
|
3579
3578
|
module.exports = patch;
|
|
3580
3579
|
}));
|
|
3581
3580
|
//#endregion
|
|
3582
3581
|
//#region ../../node_modules/.pnpm/semver@7.8.1/node_modules/semver/functions/prerelease.js
|
|
3583
|
-
var require_prerelease = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
3582
|
+
var require_prerelease = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
|
|
3584
3583
|
const parse = require_parse();
|
|
3585
3584
|
const prerelease = (version, options) => {
|
|
3586
3585
|
const parsed = parse(version, options);
|
|
@@ -3590,28 +3589,28 @@ var require_prerelease = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
3590
3589
|
}));
|
|
3591
3590
|
//#endregion
|
|
3592
3591
|
//#region ../../node_modules/.pnpm/semver@7.8.1/node_modules/semver/functions/compare.js
|
|
3593
|
-
var require_compare = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
3592
|
+
var require_compare = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
|
|
3594
3593
|
const SemVer = require_semver$1();
|
|
3595
3594
|
const compare = (a, b, loose) => new SemVer(a, loose).compare(new SemVer(b, loose));
|
|
3596
3595
|
module.exports = compare;
|
|
3597
3596
|
}));
|
|
3598
3597
|
//#endregion
|
|
3599
3598
|
//#region ../../node_modules/.pnpm/semver@7.8.1/node_modules/semver/functions/rcompare.js
|
|
3600
|
-
var require_rcompare = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
3599
|
+
var require_rcompare = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
|
|
3601
3600
|
const compare = require_compare();
|
|
3602
3601
|
const rcompare = (a, b, loose) => compare(b, a, loose);
|
|
3603
3602
|
module.exports = rcompare;
|
|
3604
3603
|
}));
|
|
3605
3604
|
//#endregion
|
|
3606
3605
|
//#region ../../node_modules/.pnpm/semver@7.8.1/node_modules/semver/functions/compare-loose.js
|
|
3607
|
-
var require_compare_loose = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
3606
|
+
var require_compare_loose = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
|
|
3608
3607
|
const compare = require_compare();
|
|
3609
3608
|
const compareLoose = (a, b) => compare(a, b, true);
|
|
3610
3609
|
module.exports = compareLoose;
|
|
3611
3610
|
}));
|
|
3612
3611
|
//#endregion
|
|
3613
3612
|
//#region ../../node_modules/.pnpm/semver@7.8.1/node_modules/semver/functions/compare-build.js
|
|
3614
|
-
var require_compare_build = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
3613
|
+
var require_compare_build = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
|
|
3615
3614
|
const SemVer = require_semver$1();
|
|
3616
3615
|
const compareBuild = (a, b, loose) => {
|
|
3617
3616
|
const versionA = new SemVer(a, loose);
|
|
@@ -3622,63 +3621,63 @@ var require_compare_build = /* @__PURE__ */ __commonJSMin(((exports, module) =>
|
|
|
3622
3621
|
}));
|
|
3623
3622
|
//#endregion
|
|
3624
3623
|
//#region ../../node_modules/.pnpm/semver@7.8.1/node_modules/semver/functions/sort.js
|
|
3625
|
-
var require_sort = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
3624
|
+
var require_sort = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
|
|
3626
3625
|
const compareBuild = require_compare_build();
|
|
3627
3626
|
const sort = (list, loose) => list.sort((a, b) => compareBuild(a, b, loose));
|
|
3628
3627
|
module.exports = sort;
|
|
3629
3628
|
}));
|
|
3630
3629
|
//#endregion
|
|
3631
3630
|
//#region ../../node_modules/.pnpm/semver@7.8.1/node_modules/semver/functions/rsort.js
|
|
3632
|
-
var require_rsort = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
3631
|
+
var require_rsort = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
|
|
3633
3632
|
const compareBuild = require_compare_build();
|
|
3634
3633
|
const rsort = (list, loose) => list.sort((a, b) => compareBuild(b, a, loose));
|
|
3635
3634
|
module.exports = rsort;
|
|
3636
3635
|
}));
|
|
3637
3636
|
//#endregion
|
|
3638
3637
|
//#region ../../node_modules/.pnpm/semver@7.8.1/node_modules/semver/functions/gt.js
|
|
3639
|
-
var require_gt = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
3638
|
+
var require_gt = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
|
|
3640
3639
|
const compare = require_compare();
|
|
3641
3640
|
const gt = (a, b, loose) => compare(a, b, loose) > 0;
|
|
3642
3641
|
module.exports = gt;
|
|
3643
3642
|
}));
|
|
3644
3643
|
//#endregion
|
|
3645
3644
|
//#region ../../node_modules/.pnpm/semver@7.8.1/node_modules/semver/functions/lt.js
|
|
3646
|
-
var require_lt = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
3645
|
+
var require_lt = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
|
|
3647
3646
|
const compare = require_compare();
|
|
3648
3647
|
const lt = (a, b, loose) => compare(a, b, loose) < 0;
|
|
3649
3648
|
module.exports = lt;
|
|
3650
3649
|
}));
|
|
3651
3650
|
//#endregion
|
|
3652
3651
|
//#region ../../node_modules/.pnpm/semver@7.8.1/node_modules/semver/functions/eq.js
|
|
3653
|
-
var require_eq = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
3652
|
+
var require_eq = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
|
|
3654
3653
|
const compare = require_compare();
|
|
3655
3654
|
const eq = (a, b, loose) => compare(a, b, loose) === 0;
|
|
3656
3655
|
module.exports = eq;
|
|
3657
3656
|
}));
|
|
3658
3657
|
//#endregion
|
|
3659
3658
|
//#region ../../node_modules/.pnpm/semver@7.8.1/node_modules/semver/functions/neq.js
|
|
3660
|
-
var require_neq = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
3659
|
+
var require_neq = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
|
|
3661
3660
|
const compare = require_compare();
|
|
3662
3661
|
const neq = (a, b, loose) => compare(a, b, loose) !== 0;
|
|
3663
3662
|
module.exports = neq;
|
|
3664
3663
|
}));
|
|
3665
3664
|
//#endregion
|
|
3666
3665
|
//#region ../../node_modules/.pnpm/semver@7.8.1/node_modules/semver/functions/gte.js
|
|
3667
|
-
var require_gte = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
3666
|
+
var require_gte = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
|
|
3668
3667
|
const compare = require_compare();
|
|
3669
3668
|
const gte = (a, b, loose) => compare(a, b, loose) >= 0;
|
|
3670
3669
|
module.exports = gte;
|
|
3671
3670
|
}));
|
|
3672
3671
|
//#endregion
|
|
3673
3672
|
//#region ../../node_modules/.pnpm/semver@7.8.1/node_modules/semver/functions/lte.js
|
|
3674
|
-
var require_lte = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
3673
|
+
var require_lte = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
|
|
3675
3674
|
const compare = require_compare();
|
|
3676
3675
|
const lte = (a, b, loose) => compare(a, b, loose) <= 0;
|
|
3677
3676
|
module.exports = lte;
|
|
3678
3677
|
}));
|
|
3679
3678
|
//#endregion
|
|
3680
3679
|
//#region ../../node_modules/.pnpm/semver@7.8.1/node_modules/semver/functions/cmp.js
|
|
3681
|
-
var require_cmp = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
3680
|
+
var require_cmp = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
|
|
3682
3681
|
const eq = require_eq();
|
|
3683
3682
|
const neq = require_neq();
|
|
3684
3683
|
const gt = require_gt();
|
|
@@ -3710,7 +3709,7 @@ var require_cmp = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
3710
3709
|
}));
|
|
3711
3710
|
//#endregion
|
|
3712
3711
|
//#region ../../node_modules/.pnpm/semver@7.8.1/node_modules/semver/functions/coerce.js
|
|
3713
|
-
var require_coerce = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
3712
|
+
var require_coerce = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
|
|
3714
3713
|
const SemVer = require_semver$1();
|
|
3715
3714
|
const parse = require_parse();
|
|
3716
3715
|
const { safeRe: re, t } = require_re();
|
|
@@ -3742,7 +3741,7 @@ var require_coerce = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
3742
3741
|
}));
|
|
3743
3742
|
//#endregion
|
|
3744
3743
|
//#region ../../node_modules/.pnpm/semver@7.8.1/node_modules/semver/functions/truncate.js
|
|
3745
|
-
var require_truncate = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
3744
|
+
var require_truncate = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
|
|
3746
3745
|
const parse = require_parse();
|
|
3747
3746
|
const constants = require_constants();
|
|
3748
3747
|
const SemVer = require_semver$1();
|
|
@@ -3774,7 +3773,7 @@ var require_truncate = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
3774
3773
|
}));
|
|
3775
3774
|
//#endregion
|
|
3776
3775
|
//#region ../../node_modules/.pnpm/semver@7.8.1/node_modules/semver/internal/lrucache.js
|
|
3777
|
-
var require_lrucache = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
3776
|
+
var require_lrucache = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
|
|
3778
3777
|
var LRUCache = class {
|
|
3779
3778
|
constructor() {
|
|
3780
3779
|
this.max = 1e3;
|
|
@@ -3807,7 +3806,7 @@ var require_lrucache = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
3807
3806
|
}));
|
|
3808
3807
|
//#endregion
|
|
3809
3808
|
//#region ../../node_modules/.pnpm/semver@7.8.1/node_modules/semver/classes/range.js
|
|
3810
|
-
var require_range = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
3809
|
+
var require_range = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
|
|
3811
3810
|
const SPACE_CHARACTERS = /\s+/g;
|
|
3812
3811
|
module.exports = class Range {
|
|
3813
3812
|
constructor(range, options) {
|
|
@@ -4087,7 +4086,7 @@ var require_range = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
4087
4086
|
}));
|
|
4088
4087
|
//#endregion
|
|
4089
4088
|
//#region ../../node_modules/.pnpm/semver@7.8.1/node_modules/semver/classes/comparator.js
|
|
4090
|
-
var require_comparator = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
4089
|
+
var require_comparator = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
|
|
4091
4090
|
const ANY = Symbol("SemVer ANY");
|
|
4092
4091
|
module.exports = class Comparator {
|
|
4093
4092
|
static get ANY() {
|
|
@@ -4159,7 +4158,7 @@ var require_comparator = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
4159
4158
|
}));
|
|
4160
4159
|
//#endregion
|
|
4161
4160
|
//#region ../../node_modules/.pnpm/semver@7.8.1/node_modules/semver/functions/satisfies.js
|
|
4162
|
-
var require_satisfies = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
4161
|
+
var require_satisfies = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
|
|
4163
4162
|
const Range = require_range();
|
|
4164
4163
|
const satisfies = (version, range, options) => {
|
|
4165
4164
|
try {
|
|
@@ -4173,14 +4172,14 @@ var require_satisfies = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
4173
4172
|
}));
|
|
4174
4173
|
//#endregion
|
|
4175
4174
|
//#region ../../node_modules/.pnpm/semver@7.8.1/node_modules/semver/ranges/to-comparators.js
|
|
4176
|
-
var require_to_comparators = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
4175
|
+
var require_to_comparators = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
|
|
4177
4176
|
const Range = require_range();
|
|
4178
4177
|
const toComparators = (range, options) => new Range(range, options).set.map((comp) => comp.map((c) => c.value).join(" ").trim().split(" "));
|
|
4179
4178
|
module.exports = toComparators;
|
|
4180
4179
|
}));
|
|
4181
4180
|
//#endregion
|
|
4182
4181
|
//#region ../../node_modules/.pnpm/semver@7.8.1/node_modules/semver/ranges/max-satisfying.js
|
|
4183
|
-
var require_max_satisfying = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
4182
|
+
var require_max_satisfying = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
|
|
4184
4183
|
const SemVer = require_semver$1();
|
|
4185
4184
|
const Range = require_range();
|
|
4186
4185
|
const maxSatisfying = (versions, range, options) => {
|
|
@@ -4206,7 +4205,7 @@ var require_max_satisfying = /* @__PURE__ */ __commonJSMin(((exports, module) =>
|
|
|
4206
4205
|
}));
|
|
4207
4206
|
//#endregion
|
|
4208
4207
|
//#region ../../node_modules/.pnpm/semver@7.8.1/node_modules/semver/ranges/min-satisfying.js
|
|
4209
|
-
var require_min_satisfying = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
4208
|
+
var require_min_satisfying = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
|
|
4210
4209
|
const SemVer = require_semver$1();
|
|
4211
4210
|
const Range = require_range();
|
|
4212
4211
|
const minSatisfying = (versions, range, options) => {
|
|
@@ -4232,7 +4231,7 @@ var require_min_satisfying = /* @__PURE__ */ __commonJSMin(((exports, module) =>
|
|
|
4232
4231
|
}));
|
|
4233
4232
|
//#endregion
|
|
4234
4233
|
//#region ../../node_modules/.pnpm/semver@7.8.1/node_modules/semver/ranges/min-version.js
|
|
4235
|
-
var require_min_version = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
4234
|
+
var require_min_version = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
|
|
4236
4235
|
const SemVer = require_semver$1();
|
|
4237
4236
|
const Range = require_range();
|
|
4238
4237
|
const gt = require_gt();
|
|
@@ -4272,7 +4271,7 @@ var require_min_version = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
4272
4271
|
}));
|
|
4273
4272
|
//#endregion
|
|
4274
4273
|
//#region ../../node_modules/.pnpm/semver@7.8.1/node_modules/semver/ranges/valid.js
|
|
4275
|
-
var require_valid = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
4274
|
+
var require_valid = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
|
|
4276
4275
|
const Range = require_range();
|
|
4277
4276
|
const validRange = (range, options) => {
|
|
4278
4277
|
try {
|
|
@@ -4285,7 +4284,7 @@ var require_valid = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
4285
4284
|
}));
|
|
4286
4285
|
//#endregion
|
|
4287
4286
|
//#region ../../node_modules/.pnpm/semver@7.8.1/node_modules/semver/ranges/outside.js
|
|
4288
|
-
var require_outside = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
4287
|
+
var require_outside = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
|
|
4289
4288
|
const SemVer = require_semver$1();
|
|
4290
4289
|
const Comparator = require_comparator();
|
|
4291
4290
|
const { ANY } = Comparator;
|
|
@@ -4338,21 +4337,21 @@ var require_outside = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
4338
4337
|
}));
|
|
4339
4338
|
//#endregion
|
|
4340
4339
|
//#region ../../node_modules/.pnpm/semver@7.8.1/node_modules/semver/ranges/gtr.js
|
|
4341
|
-
var require_gtr = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
4340
|
+
var require_gtr = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
|
|
4342
4341
|
const outside = require_outside();
|
|
4343
4342
|
const gtr = (version, range, options) => outside(version, range, ">", options);
|
|
4344
4343
|
module.exports = gtr;
|
|
4345
4344
|
}));
|
|
4346
4345
|
//#endregion
|
|
4347
4346
|
//#region ../../node_modules/.pnpm/semver@7.8.1/node_modules/semver/ranges/ltr.js
|
|
4348
|
-
var require_ltr = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
4347
|
+
var require_ltr = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
|
|
4349
4348
|
const outside = require_outside();
|
|
4350
4349
|
const ltr = (version, range, options) => outside(version, range, "<", options);
|
|
4351
4350
|
module.exports = ltr;
|
|
4352
4351
|
}));
|
|
4353
4352
|
//#endregion
|
|
4354
4353
|
//#region ../../node_modules/.pnpm/semver@7.8.1/node_modules/semver/ranges/intersects.js
|
|
4355
|
-
var require_intersects = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
4354
|
+
var require_intersects = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
|
|
4356
4355
|
const Range = require_range();
|
|
4357
4356
|
const intersects = (r1, r2, options) => {
|
|
4358
4357
|
r1 = new Range(r1, options);
|
|
@@ -4363,7 +4362,7 @@ var require_intersects = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
4363
4362
|
}));
|
|
4364
4363
|
//#endregion
|
|
4365
4364
|
//#region ../../node_modules/.pnpm/semver@7.8.1/node_modules/semver/ranges/simplify.js
|
|
4366
|
-
var require_simplify = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
4365
|
+
var require_simplify = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
|
|
4367
4366
|
const satisfies = require_satisfies();
|
|
4368
4367
|
const compare = require_compare();
|
|
4369
4368
|
module.exports = (versions, range, options) => {
|
|
@@ -4393,7 +4392,7 @@ var require_simplify = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
4393
4392
|
}));
|
|
4394
4393
|
//#endregion
|
|
4395
4394
|
//#region ../../node_modules/.pnpm/semver@7.8.1/node_modules/semver/ranges/subset.js
|
|
4396
|
-
var require_subset = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
4395
|
+
var require_subset = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
|
|
4397
4396
|
const Range = require_range();
|
|
4398
4397
|
const Comparator = require_comparator();
|
|
4399
4398
|
const { ANY } = Comparator;
|
|
@@ -4492,7 +4491,7 @@ var require_subset = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
4492
4491
|
}));
|
|
4493
4492
|
//#endregion
|
|
4494
4493
|
//#region src/dependencies/dependencies.ts
|
|
4495
|
-
var import_semver = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
4494
|
+
var import_semver = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin$1(((exports, module) => {
|
|
4496
4495
|
const internalRe = require_re();
|
|
4497
4496
|
const constants = require_constants();
|
|
4498
4497
|
const SemVer = require_semver$1();
|
|
@@ -7161,7 +7160,116 @@ function summarize(rows) {
|
|
|
7161
7160
|
};
|
|
7162
7161
|
}
|
|
7163
7162
|
//#endregion
|
|
7163
|
+
//#region src/compile/main-guard.ts
|
|
7164
|
+
/** A script's main guard runs its CLI only when the script is the process's main module. Once a
|
|
7165
|
+
* compile inlines one script into another, every inlined module shares the output file's
|
|
7166
|
+
* `import.meta.url`, so every inlined guard would pass and every inlined CLI would run (issue #192).
|
|
7167
|
+
* The compile keeps the entry's guard and turns the others to `false`.
|
|
7168
|
+
*
|
|
7169
|
+
* Recognized forms:
|
|
7170
|
+
* - `import.meta.main`
|
|
7171
|
+
* - `import.meta.url === pathToFileURL(…).href`, either side, `==` or `===`
|
|
7172
|
+
* - `fileURLToPath(import.meta.url) === …` or `… === fileURLToPath(import.meta.url)` where `…` is
|
|
7173
|
+
* `process.argv[1]` or a call around it, such as `realpathSync(process.argv[1])` */
|
|
7174
|
+
const ARGS = String.raw`\((?:[^()]|\((?:[^()]|\([^()]*\))*\))*\)`;
|
|
7175
|
+
const META_URL = String.raw`import\.meta\.url`;
|
|
7176
|
+
const EQ = String.raw`\s*===?\s*`;
|
|
7177
|
+
const TO_FILE_URL = String.raw`(?:\w+\.)?pathToFileURL${ARGS}\.href`;
|
|
7178
|
+
const FROM_META_URL = String.raw`(?:\w+\.)?fileURLToPath\(\s*${META_URL}\s*\)`;
|
|
7179
|
+
const ARGV = String.raw`process\.argv\[1\]`;
|
|
7180
|
+
const CALL = String.raw`[\w.]+\(\s*`;
|
|
7181
|
+
const ARGV1 = String.raw`(?:${CALL}${CALL}${ARGV}\s*\)\s*\)|${CALL}${ARGV}\s*\)|${ARGV})`;
|
|
7182
|
+
const GUARDS = new RegExp([
|
|
7183
|
+
`${META_URL}${EQ}${TO_FILE_URL}`,
|
|
7184
|
+
`${TO_FILE_URL}${EQ}${META_URL}`,
|
|
7185
|
+
`${FROM_META_URL}${EQ}${ARGV1}`,
|
|
7186
|
+
`${ARGV1}${EQ}${FROM_META_URL}`,
|
|
7187
|
+
String.raw`import\.meta\.main\b`
|
|
7188
|
+
].join("|"), "g");
|
|
7189
|
+
/** The code with every recognized main guard replaced by `false`, or `undefined` when it has none. */
|
|
7190
|
+
function neutralizeMainGuards(code) {
|
|
7191
|
+
const out = code.replace(GUARDS, "false");
|
|
7192
|
+
return out === code ? void 0 : out;
|
|
7193
|
+
}
|
|
7194
|
+
//#endregion
|
|
7195
|
+
//#region src/compile/tsconfig-diagnosis.ts
|
|
7196
|
+
const failedTsconfig = /Failed to load tsconfig '([^']+)'/;
|
|
7197
|
+
/** The `extends` specifier rolldown could not load, or undefined when the error is not a tsconfig
|
|
7198
|
+
* failure. */
|
|
7199
|
+
function failedExtends(error) {
|
|
7200
|
+
return failedTsconfig.exec(error instanceof Error ? error.message : String(error))?.[1];
|
|
7201
|
+
}
|
|
7202
|
+
function readTsconfig(file) {
|
|
7203
|
+
try {
|
|
7204
|
+
const text = fs$1.readFileSync(file, "utf8").replace(/("(?:[^"\\]|\\.)*")|\/\/[^\n]*|\/\*[\s\S]*?\*\//g, (_m, str) => str ?? "").replace(/,(\s*[}\]])/g, "$1");
|
|
7205
|
+
return JSON.parse(text);
|
|
7206
|
+
} catch {
|
|
7207
|
+
return;
|
|
7208
|
+
}
|
|
7209
|
+
}
|
|
7210
|
+
function referenceFile(from, ref) {
|
|
7211
|
+
const target = path$1.resolve(path$1.dirname(from), ref);
|
|
7212
|
+
return target.endsWith(".json") ? target : path$1.join(target, "tsconfig.json");
|
|
7213
|
+
}
|
|
7214
|
+
function localExtends(from, spec) {
|
|
7215
|
+
for (const candidate of [spec, `${spec}.json`]) {
|
|
7216
|
+
const file = path$1.resolve(path$1.dirname(from), candidate);
|
|
7217
|
+
if (fs$1.existsSync(file) && fs$1.statSync(file).isFile()) return file;
|
|
7218
|
+
}
|
|
7219
|
+
}
|
|
7220
|
+
/** Finds the tsconfig file that declares `spec` in `extends`, walking the tsconfig the entry falls
|
|
7221
|
+
* under: its `extends` chain and its project `references`. */
|
|
7222
|
+
function findExtendsOwner(entry, spec) {
|
|
7223
|
+
let dir = path$1.dirname(entry);
|
|
7224
|
+
let start;
|
|
7225
|
+
for (;;) {
|
|
7226
|
+
const candidate = path$1.join(dir, "tsconfig.json");
|
|
7227
|
+
if (fs$1.existsSync(candidate)) {
|
|
7228
|
+
start = candidate;
|
|
7229
|
+
break;
|
|
7230
|
+
}
|
|
7231
|
+
const parent = path$1.dirname(dir);
|
|
7232
|
+
if (parent === dir) return void 0;
|
|
7233
|
+
dir = parent;
|
|
7234
|
+
}
|
|
7235
|
+
const seen = /* @__PURE__ */ new Set();
|
|
7236
|
+
const visit = (file) => {
|
|
7237
|
+
if (seen.has(file)) return void 0;
|
|
7238
|
+
seen.add(file);
|
|
7239
|
+
const config = readTsconfig(file);
|
|
7240
|
+
if (!config) return void 0;
|
|
7241
|
+
const extended = [config.extends ?? []].flat();
|
|
7242
|
+
if (extended.includes(spec)) return file;
|
|
7243
|
+
for (const e of extended) {
|
|
7244
|
+
const next = e.startsWith(".") ? localExtends(file, e) : void 0;
|
|
7245
|
+
const found = next && visit(next);
|
|
7246
|
+
if (found) return found;
|
|
7247
|
+
}
|
|
7248
|
+
for (const ref of config.references ?? []) {
|
|
7249
|
+
const found = visit(referenceFile(file, ref.path));
|
|
7250
|
+
if (found) return found;
|
|
7251
|
+
}
|
|
7252
|
+
};
|
|
7253
|
+
return visit(start);
|
|
7254
|
+
}
|
|
7255
|
+
/** Explains a tsconfig failure: names the file and the `extends` path, and the usual fix. */
|
|
7256
|
+
function explainTsconfigFailure(entry, root, spec) {
|
|
7257
|
+
const owner = findExtendsOwner(entry, spec);
|
|
7258
|
+
return `${owner ? `${path$1.relative(root, owner) || path$1.basename(owner)} extends` : "a tsconfig extends"} "${spec}", which rolldown could not load.${spec.endsWith(".json") ? "" : " Add the `.json` extension to it: rolldown, unlike tsc, does not resolve an `extends` without one."}`;
|
|
7259
|
+
}
|
|
7260
|
+
//#endregion
|
|
7164
7261
|
//#region src/compile/rolldown.ts
|
|
7262
|
+
/** Keeps only the entry's main guard, so an entry that imports another script runs one CLI. */
|
|
7263
|
+
function onlyEntryMain() {
|
|
7264
|
+
return {
|
|
7265
|
+
name: "universal-plugin:only-entry-main",
|
|
7266
|
+
transform(code, id) {
|
|
7267
|
+
if (this.getModuleInfo(id)?.isEntry) return null;
|
|
7268
|
+
const out = neutralizeMainGuards(code);
|
|
7269
|
+
return out === void 0 ? null : { code: out };
|
|
7270
|
+
}
|
|
7271
|
+
};
|
|
7272
|
+
}
|
|
7165
7273
|
/** Compiles an entry with rolldown, the engine under tsdown. Node built-ins stay imports; everything
|
|
7166
7274
|
* else is inlined, so the file runs from a skill folder with no `node_modules` beside it.
|
|
7167
7275
|
*
|
|
@@ -7175,6 +7283,7 @@ const rolldownCompiler = { async compile(sourcePath, root) {
|
|
|
7175
7283
|
input: sourcePath,
|
|
7176
7284
|
cwd: root,
|
|
7177
7285
|
platform: "node",
|
|
7286
|
+
plugins: [onlyEntryMain()],
|
|
7178
7287
|
onLog(_level, log) {
|
|
7179
7288
|
if (log.code === "UNRESOLVED_IMPORT") unresolved.push(log.message);
|
|
7180
7289
|
}
|
|
@@ -7194,6 +7303,9 @@ const rolldownCompiler = { async compile(sourcePath, root) {
|
|
|
7194
7303
|
codeSplitting: false,
|
|
7195
7304
|
minify: true
|
|
7196
7305
|
})).output[0].code;
|
|
7306
|
+
} catch (error) {
|
|
7307
|
+
const spec = failedExtends(error);
|
|
7308
|
+
throw spec ? new Error(explainTsconfigFailure(sourcePath, root, spec), { cause: error }) : error;
|
|
7197
7309
|
} finally {
|
|
7198
7310
|
await bundle.close();
|
|
7199
7311
|
}
|
|
@@ -8982,212 +9094,477 @@ function initCommand$1(deps = { fs: realInitFs }) {
|
|
|
8982
9094
|
return cmd;
|
|
8983
9095
|
}
|
|
8984
9096
|
//#endregion
|
|
8985
|
-
//#region ../../node_modules/.pnpm
|
|
8986
|
-
var
|
|
8987
|
-
|
|
8988
|
-
|
|
8989
|
-
|
|
8990
|
-
|
|
8991
|
-
|
|
8992
|
-
|
|
8993
|
-
|
|
8994
|
-
|
|
8995
|
-
|
|
8996
|
-
|
|
8997
|
-
|
|
8998
|
-
|
|
8999
|
-
|
|
9000
|
-
|
|
9001
|
-
|
|
9002
|
-
|
|
9003
|
-
|
|
9004
|
-
|
|
9005
|
-
|
|
9006
|
-
|
|
9007
|
-
|
|
9008
|
-
|
|
9009
|
-
|
|
9010
|
-
|
|
9011
|
-
|
|
9012
|
-
|
|
9013
|
-
}
|
|
9014
|
-
return false;
|
|
9015
|
-
}
|
|
9016
|
-
const hasAnchor = (node) => (isScalar(node) || isCollection(node)) && !!node.anchor;
|
|
9017
|
-
exports.ALIAS = ALIAS;
|
|
9018
|
-
exports.DOC = DOC;
|
|
9019
|
-
exports.MAP = MAP;
|
|
9020
|
-
exports.NODE_TYPE = NODE_TYPE;
|
|
9021
|
-
exports.PAIR = PAIR;
|
|
9022
|
-
exports.SCALAR = SCALAR;
|
|
9023
|
-
exports.SEQ = SEQ;
|
|
9024
|
-
exports.hasAnchor = hasAnchor;
|
|
9025
|
-
exports.isAlias = isAlias;
|
|
9026
|
-
exports.isCollection = isCollection;
|
|
9027
|
-
exports.isDocument = isDocument;
|
|
9028
|
-
exports.isMap = isMap;
|
|
9029
|
-
exports.isNode = isNode;
|
|
9030
|
-
exports.isPair = isPair;
|
|
9031
|
-
exports.isScalar = isScalar;
|
|
9032
|
-
exports.isSeq = isSeq;
|
|
9033
|
-
}));
|
|
9034
|
-
//#endregion
|
|
9035
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/dist/visit.js
|
|
9036
|
-
var require_visit = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
9037
|
-
var identity = require_identity();
|
|
9038
|
-
const BREAK = Symbol("break visit");
|
|
9039
|
-
const SKIP = Symbol("skip children");
|
|
9040
|
-
const REMOVE = Symbol("remove node");
|
|
9041
|
-
/**
|
|
9042
|
-
* Apply a visitor to an AST node or document.
|
|
9043
|
-
*
|
|
9044
|
-
* Walks through the tree (depth-first) starting from `node`, calling a
|
|
9045
|
-
* `visitor` function with three arguments:
|
|
9046
|
-
* - `key`: For sequence values and map `Pair`, the node's index in the
|
|
9047
|
-
* collection. Within a `Pair`, `'key'` or `'value'`, correspondingly.
|
|
9048
|
-
* `null` for the root node.
|
|
9049
|
-
* - `node`: The current node.
|
|
9050
|
-
* - `path`: The ancestry of the current node.
|
|
9051
|
-
*
|
|
9052
|
-
* The return value of the visitor may be used to control the traversal:
|
|
9053
|
-
* - `undefined` (default): Do nothing and continue
|
|
9054
|
-
* - `visit.SKIP`: Do not visit the children of this node, continue with next
|
|
9055
|
-
* sibling
|
|
9056
|
-
* - `visit.BREAK`: Terminate traversal completely
|
|
9057
|
-
* - `visit.REMOVE`: Remove the current node, then continue with the next one
|
|
9058
|
-
* - `Node`: Replace the current node, then continue by visiting it
|
|
9059
|
-
* - `number`: While iterating the items of a sequence or map, set the index
|
|
9060
|
-
* of the next step. This is useful especially if the index of the current
|
|
9061
|
-
* node has changed.
|
|
9062
|
-
*
|
|
9063
|
-
* If `visitor` is a single function, it will be called with all values
|
|
9064
|
-
* encountered in the tree, including e.g. `null` values. Alternatively,
|
|
9065
|
-
* separate visitor functions may be defined for each `Map`, `Pair`, `Seq`,
|
|
9066
|
-
* `Alias` and `Scalar` node. To define the same visitor function for more than
|
|
9067
|
-
* one node type, use the `Collection` (map and seq), `Value` (map, seq & scalar)
|
|
9068
|
-
* and `Node` (alias, map, seq & scalar) targets. Of all these, only the most
|
|
9069
|
-
* specific defined one will be used for each node.
|
|
9070
|
-
*/
|
|
9071
|
-
function visit(node, visitor) {
|
|
9072
|
-
const visitor_ = initVisitor(visitor);
|
|
9073
|
-
if (identity.isDocument(node)) {
|
|
9074
|
-
if (visit_(null, node.contents, visitor_, Object.freeze([node])) === REMOVE) node.contents = null;
|
|
9075
|
-
} else visit_(null, node, visitor_, Object.freeze([]));
|
|
9097
|
+
//#region ../../node_modules/.pnpm/@cyberuni+agent-harness@0.7.0/node_modules/@cyberuni/agent-harness/dist/reference-where-CIcUR8xX.js
|
|
9098
|
+
var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports);
|
|
9099
|
+
var __require = /* #__PURE__ */ (() => createRequire(import.meta.url))();
|
|
9100
|
+
function resolveHarnessEnvironment(environment = {}) {
|
|
9101
|
+
return {
|
|
9102
|
+
env: environment.env ?? process.env,
|
|
9103
|
+
homedir: environment.homedir ?? homedir(),
|
|
9104
|
+
cwd: environment.cwd ?? process.cwd(),
|
|
9105
|
+
platform: environment.platform ?? process.platform
|
|
9106
|
+
};
|
|
9107
|
+
}
|
|
9108
|
+
/**
|
|
9109
|
+
* Where a harness keeps plugins at the user level. Paths are computed, not checked: a location may
|
|
9110
|
+
* not exist until the first plugin is installed.
|
|
9111
|
+
*/
|
|
9112
|
+
function pluginStorage(harness, environment = {}) {
|
|
9113
|
+
return storages[harness](resolveHarnessEnvironment(environment));
|
|
9114
|
+
}
|
|
9115
|
+
/** `$XDG_CONFIG_HOME`, else `~/.config`, as the `xdg-basedir` package resolves it. */
|
|
9116
|
+
const xdgConfig = ({ env, homedir }) => env.XDG_CONFIG_HOME || join(homedir, ".config");
|
|
9117
|
+
/** The agent plugin folder of the stable VS Code build, per OS (E-VSC-P3). */
|
|
9118
|
+
function vscodeAgentPlugins({ env, homedir, platform }) {
|
|
9119
|
+
if (platform === "win32") {
|
|
9120
|
+
const configDir = win32.join(env.APPDATA || win32.join(homedir, "AppData", "Roaming"), "Code");
|
|
9121
|
+
return {
|
|
9122
|
+
configDir,
|
|
9123
|
+
path: win32.join(configDir, "agentPlugins")
|
|
9124
|
+
};
|
|
9076
9125
|
}
|
|
9077
|
-
|
|
9078
|
-
|
|
9079
|
-
|
|
9080
|
-
|
|
9081
|
-
|
|
9082
|
-
|
|
9083
|
-
|
|
9084
|
-
|
|
9085
|
-
|
|
9086
|
-
|
|
9087
|
-
|
|
9088
|
-
|
|
9089
|
-
|
|
9090
|
-
|
|
9091
|
-
|
|
9092
|
-
|
|
9093
|
-
|
|
9094
|
-
|
|
9095
|
-
|
|
9096
|
-
|
|
9097
|
-
|
|
9098
|
-
|
|
9099
|
-
|
|
9126
|
+
const configDir = platform === "darwin" ? join(homedir, "Library", "Application Support", "Code") : join(homedir, ".config", "Code");
|
|
9127
|
+
return {
|
|
9128
|
+
configDir,
|
|
9129
|
+
path: join(configDir, "agentPlugins")
|
|
9130
|
+
};
|
|
9131
|
+
}
|
|
9132
|
+
const storages = {
|
|
9133
|
+
"claude-code": ({ env, homedir }) => {
|
|
9134
|
+
const configDir = env.CLAUDE_CONFIG_DIR || join(homedir, ".claude");
|
|
9135
|
+
const plugins = join(configDir, "plugins");
|
|
9136
|
+
return {
|
|
9137
|
+
harness: "claude-code",
|
|
9138
|
+
configDir,
|
|
9139
|
+
locations: [
|
|
9140
|
+
{
|
|
9141
|
+
kind: "plugin-cache",
|
|
9142
|
+
path: join(plugins, "cache"),
|
|
9143
|
+
description: "Installed plugins as <marketplace>/<plugin>/<version>/",
|
|
9144
|
+
research: "E-CC-P1"
|
|
9145
|
+
},
|
|
9146
|
+
{
|
|
9147
|
+
kind: "marketplaces",
|
|
9148
|
+
path: join(plugins, "marketplaces"),
|
|
9149
|
+
description: "Marketplace checkouts",
|
|
9150
|
+
research: "E-CC-P1"
|
|
9151
|
+
},
|
|
9152
|
+
{
|
|
9153
|
+
kind: "install-record",
|
|
9154
|
+
path: join(plugins, "installed_plugins.json"),
|
|
9155
|
+
description: "Installs keyed by plugin@marketplace, each with scope, installPath, and version",
|
|
9156
|
+
research: "E-CC-P2"
|
|
9157
|
+
},
|
|
9158
|
+
{
|
|
9159
|
+
kind: "enabled-record",
|
|
9160
|
+
path: join(configDir, "settings.json"),
|
|
9161
|
+
description: "User settings; enabledPlugins maps plugin@marketplace to a boolean",
|
|
9162
|
+
research: "E-CC-P3"
|
|
9100
9163
|
}
|
|
9101
|
-
|
|
9102
|
-
|
|
9103
|
-
|
|
9104
|
-
|
|
9105
|
-
|
|
9106
|
-
|
|
9107
|
-
|
|
9108
|
-
|
|
9109
|
-
|
|
9110
|
-
|
|
9111
|
-
|
|
9112
|
-
|
|
9113
|
-
|
|
9114
|
-
|
|
9115
|
-
|
|
9116
|
-
|
|
9117
|
-
|
|
9118
|
-
|
|
9119
|
-
|
|
9120
|
-
|
|
9121
|
-
|
|
9122
|
-
|
|
9123
|
-
|
|
9124
|
-
|
|
9125
|
-
|
|
9126
|
-
|
|
9127
|
-
|
|
9128
|
-
|
|
9129
|
-
|
|
9130
|
-
|
|
9131
|
-
|
|
9132
|
-
|
|
9133
|
-
|
|
9134
|
-
|
|
9135
|
-
|
|
9136
|
-
|
|
9137
|
-
|
|
9138
|
-
|
|
9139
|
-
|
|
9140
|
-
|
|
9141
|
-
|
|
9142
|
-
|
|
9143
|
-
|
|
9144
|
-
|
|
9145
|
-
|
|
9146
|
-
|
|
9147
|
-
|
|
9148
|
-
|
|
9149
|
-
|
|
9150
|
-
|
|
9151
|
-
|
|
9152
|
-
|
|
9153
|
-
|
|
9154
|
-
|
|
9155
|
-
|
|
9156
|
-
|
|
9157
|
-
|
|
9158
|
-
|
|
9159
|
-
|
|
9160
|
-
|
|
9161
|
-
|
|
9162
|
-
|
|
9163
|
-
if (identity.isCollection(node)) {
|
|
9164
|
-
path = Object.freeze(path.concat(node));
|
|
9165
|
-
for (let i = 0; i < node.items.length; ++i) {
|
|
9166
|
-
const ci = await visitAsync_(i, node.items[i], visitor, path);
|
|
9167
|
-
if (typeof ci === "number") i = ci - 1;
|
|
9168
|
-
else if (ci === BREAK) return BREAK;
|
|
9169
|
-
else if (ci === REMOVE) {
|
|
9170
|
-
node.items.splice(i, 1);
|
|
9171
|
-
i -= 1;
|
|
9172
|
-
}
|
|
9164
|
+
]
|
|
9165
|
+
};
|
|
9166
|
+
},
|
|
9167
|
+
cursor: ({ homedir }) => {
|
|
9168
|
+
const configDir = join(homedir, ".cursor");
|
|
9169
|
+
return {
|
|
9170
|
+
harness: "cursor",
|
|
9171
|
+
configDir,
|
|
9172
|
+
locations: [{
|
|
9173
|
+
kind: "local-plugins",
|
|
9174
|
+
path: join(configDir, "plugins", "local"),
|
|
9175
|
+
description: "Plugins under development, one folder each",
|
|
9176
|
+
research: "E-CUR-P2"
|
|
9177
|
+
}, {
|
|
9178
|
+
kind: "marketplaces",
|
|
9179
|
+
path: join(configDir, "plugins", "marketplaces"),
|
|
9180
|
+
description: "Marketplace checkouts",
|
|
9181
|
+
research: "E-CUR-P3"
|
|
9182
|
+
}]
|
|
9183
|
+
};
|
|
9184
|
+
},
|
|
9185
|
+
codex: ({ env, homedir }) => {
|
|
9186
|
+
const configDir = env.CODEX_HOME || join(homedir, ".codex");
|
|
9187
|
+
return {
|
|
9188
|
+
harness: "codex",
|
|
9189
|
+
configDir,
|
|
9190
|
+
locations: [{
|
|
9191
|
+
kind: "plugin-cache",
|
|
9192
|
+
path: join(configDir, "plugins", "cache"),
|
|
9193
|
+
description: "Installed plugins as <marketplace>/<plugin>/<version>/",
|
|
9194
|
+
research: "E-CODEX-P3"
|
|
9195
|
+
}, {
|
|
9196
|
+
kind: "enabled-record",
|
|
9197
|
+
path: join(configDir, "config.toml"),
|
|
9198
|
+
description: "User config; [plugins.\"<plugin>@<marketplace>\"] tables carry enabled = <bool>",
|
|
9199
|
+
research: "E-CODEX-P2"
|
|
9200
|
+
}]
|
|
9201
|
+
};
|
|
9202
|
+
},
|
|
9203
|
+
"copilot-cli": ({ env, homedir }) => {
|
|
9204
|
+
const configDir = env.COPILOT_HOME || join(homedir, ".copilot");
|
|
9205
|
+
return {
|
|
9206
|
+
harness: "copilot-cli",
|
|
9207
|
+
configDir,
|
|
9208
|
+
locations: [
|
|
9209
|
+
{
|
|
9210
|
+
kind: "installed-plugins",
|
|
9211
|
+
path: join(configDir, "installed-plugins"),
|
|
9212
|
+
description: "Installed plugins as <marketplace>/<plugin>/, or _direct/<source-id>/ for direct installs",
|
|
9213
|
+
research: "E-COPILOT-P9"
|
|
9214
|
+
},
|
|
9215
|
+
{
|
|
9216
|
+
kind: "install-record",
|
|
9217
|
+
path: join(configDir, "config.json"),
|
|
9218
|
+
description: "Application state, including installedPlugins",
|
|
9219
|
+
research: "E-COPILOT-P9"
|
|
9220
|
+
},
|
|
9221
|
+
{
|
|
9222
|
+
kind: "enabled-record",
|
|
9223
|
+
path: join(configDir, "settings.json"),
|
|
9224
|
+
description: "User settings (JSON with comments); enabledPlugins maps plugin specs to a boolean",
|
|
9225
|
+
research: "E-COPILOT-P4"
|
|
9173
9226
|
}
|
|
9174
|
-
|
|
9175
|
-
|
|
9176
|
-
|
|
9177
|
-
|
|
9178
|
-
|
|
9179
|
-
|
|
9180
|
-
|
|
9181
|
-
|
|
9182
|
-
|
|
9227
|
+
]
|
|
9228
|
+
};
|
|
9229
|
+
},
|
|
9230
|
+
opencode: (environment) => {
|
|
9231
|
+
const configDir = join(xdgConfig(environment), "opencode");
|
|
9232
|
+
return {
|
|
9233
|
+
harness: "opencode",
|
|
9234
|
+
configDir,
|
|
9235
|
+
locations: [{
|
|
9236
|
+
kind: "local-plugins",
|
|
9237
|
+
path: join(configDir, "plugins"),
|
|
9238
|
+
description: "JS/TS plugin modules loaded at startup; npm plugins are named in the plugin config array",
|
|
9239
|
+
research: "E-OC-P2"
|
|
9240
|
+
}]
|
|
9241
|
+
};
|
|
9242
|
+
},
|
|
9243
|
+
kilo: (environment) => {
|
|
9244
|
+
const configDir = join(xdgConfig(environment), "kilo");
|
|
9245
|
+
return {
|
|
9246
|
+
harness: "kilo",
|
|
9247
|
+
configDir,
|
|
9248
|
+
locations: [{
|
|
9249
|
+
kind: "local-plugins",
|
|
9250
|
+
path: join(configDir, "plugin"),
|
|
9251
|
+
description: "JS/TS plugin modules loaded at startup; npm plugins are named in the plugin config array",
|
|
9252
|
+
research: "E-KILO-P2"
|
|
9253
|
+
}]
|
|
9254
|
+
};
|
|
9255
|
+
},
|
|
9256
|
+
"gemini-cli": ({ env, homedir }) => {
|
|
9257
|
+
const configDir = join(env.GEMINI_CLI_HOME || homedir, ".gemini");
|
|
9258
|
+
const extensions = join(configDir, "extensions");
|
|
9259
|
+
return {
|
|
9260
|
+
harness: "gemini-cli",
|
|
9261
|
+
configDir,
|
|
9262
|
+
locations: [{
|
|
9263
|
+
kind: "installed-plugins",
|
|
9264
|
+
path: extensions,
|
|
9265
|
+
description: "Installed extensions, one folder each with a gemini-extension.json manifest",
|
|
9266
|
+
research: "E-GEM-P1"
|
|
9267
|
+
}, {
|
|
9268
|
+
kind: "enabled-record",
|
|
9269
|
+
path: join(extensions, "extension-enablement.json"),
|
|
9270
|
+
description: "Per-extension path-glob overrides that enable or disable it by folder, not a boolean",
|
|
9271
|
+
research: "E-GEM-P3"
|
|
9272
|
+
}]
|
|
9273
|
+
};
|
|
9274
|
+
},
|
|
9275
|
+
"qwen-code": ({ env, homedir }) => {
|
|
9276
|
+
const configDir = env.QWEN_HOME || join(homedir, ".qwen");
|
|
9277
|
+
const extensions = join(configDir, "extensions");
|
|
9278
|
+
return {
|
|
9279
|
+
harness: "qwen-code",
|
|
9280
|
+
configDir,
|
|
9281
|
+
locations: [{
|
|
9282
|
+
kind: "installed-plugins",
|
|
9283
|
+
path: extensions,
|
|
9284
|
+
description: "Installed extensions, one folder each with a qwen-extension.json manifest",
|
|
9285
|
+
research: "E-QWEN-P1"
|
|
9286
|
+
}, {
|
|
9287
|
+
kind: "enabled-record",
|
|
9288
|
+
path: join(extensions, "extension-enablement.json"),
|
|
9289
|
+
description: "Extension enable/disable state, inherited from Gemini CLI's format",
|
|
9290
|
+
research: "E-QWEN-P2"
|
|
9291
|
+
}]
|
|
9292
|
+
};
|
|
9293
|
+
},
|
|
9294
|
+
"vscode-copilot": (environment) => {
|
|
9295
|
+
const { configDir, path } = vscodeAgentPlugins(environment);
|
|
9296
|
+
return {
|
|
9297
|
+
harness: "vscode-copilot",
|
|
9298
|
+
configDir,
|
|
9299
|
+
locations: [{
|
|
9300
|
+
kind: "installed-plugins",
|
|
9301
|
+
path,
|
|
9302
|
+
description: "Installed agent plugins as <host>/<org>/<repo>/",
|
|
9303
|
+
research: "E-VSC-P3"
|
|
9304
|
+
}]
|
|
9305
|
+
};
|
|
9306
|
+
},
|
|
9307
|
+
cline: ({ homedir }) => {
|
|
9308
|
+
const configDir = join(homedir, ".cline");
|
|
9309
|
+
return {
|
|
9310
|
+
harness: "cline",
|
|
9311
|
+
configDir,
|
|
9312
|
+
locations: [{
|
|
9313
|
+
kind: "installed-plugins",
|
|
9314
|
+
path: join(configDir, "plugins", "_installed"),
|
|
9315
|
+
description: "Installed plugins, grouped by source: npm, git, remote, or local",
|
|
9316
|
+
research: "E-CLINE-P3"
|
|
9317
|
+
}]
|
|
9318
|
+
};
|
|
9319
|
+
},
|
|
9320
|
+
crush: ({ env, homedir }) => {
|
|
9321
|
+
return {
|
|
9322
|
+
harness: "crush",
|
|
9323
|
+
configDir: env.CRUSH_GLOBAL_CONFIG || join(env.XDG_CONFIG_HOME || join(homedir, ".config"), "crush"),
|
|
9324
|
+
locations: []
|
|
9325
|
+
};
|
|
9326
|
+
},
|
|
9327
|
+
openhands: ({ env, homedir }) => {
|
|
9328
|
+
const configDir = env.OH_PERSISTENCE_DIR || env.OPENHANDS_PERSISTENCE_DIR || join(homedir, ".openhands");
|
|
9329
|
+
const installed = join(configDir, "plugins", "installed");
|
|
9330
|
+
return {
|
|
9331
|
+
harness: "openhands",
|
|
9332
|
+
configDir,
|
|
9333
|
+
locations: [{
|
|
9334
|
+
kind: "installed-plugins",
|
|
9335
|
+
path: installed,
|
|
9336
|
+
description: "Installed plugins, one folder each",
|
|
9337
|
+
research: "E-OH-P3"
|
|
9338
|
+
}, {
|
|
9339
|
+
kind: "enabled-record",
|
|
9340
|
+
path: join(installed, ".installed.json"),
|
|
9341
|
+
description: "Install metadata keyed by plugin name, each with enabled: <bool>",
|
|
9342
|
+
research: "E-OH-P4"
|
|
9343
|
+
}]
|
|
9344
|
+
};
|
|
9345
|
+
},
|
|
9346
|
+
augment: ({ homedir }) => {
|
|
9347
|
+
const configDir = join(homedir, ".augment");
|
|
9348
|
+
return {
|
|
9349
|
+
harness: "augment",
|
|
9350
|
+
configDir,
|
|
9351
|
+
locations: [{
|
|
9352
|
+
kind: "marketplaces",
|
|
9353
|
+
path: join(configDir, "plugins", "marketplaces"),
|
|
9354
|
+
description: "Marketplace checkouts",
|
|
9355
|
+
research: "E-AUG-P2"
|
|
9356
|
+
}, {
|
|
9357
|
+
kind: "enabled-record",
|
|
9358
|
+
path: join(configDir, "settings.json"),
|
|
9359
|
+
description: "User settings; enabledPlugins maps plugin@marketplace to a boolean",
|
|
9360
|
+
research: "E-AUG-P4"
|
|
9361
|
+
}]
|
|
9362
|
+
};
|
|
9363
|
+
}
|
|
9364
|
+
};
|
|
9365
|
+
var require_identity = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
9366
|
+
const ALIAS = Symbol.for("yaml.alias");
|
|
9367
|
+
const DOC = Symbol.for("yaml.document");
|
|
9368
|
+
const MAP = Symbol.for("yaml.map");
|
|
9369
|
+
const PAIR = Symbol.for("yaml.pair");
|
|
9370
|
+
const SCALAR = Symbol.for("yaml.scalar");
|
|
9371
|
+
const SEQ = Symbol.for("yaml.seq");
|
|
9372
|
+
const NODE_TYPE = Symbol.for("yaml.node.type");
|
|
9373
|
+
const isAlias = (node) => !!node && typeof node === "object" && node[NODE_TYPE] === ALIAS;
|
|
9374
|
+
const isDocument = (node) => !!node && typeof node === "object" && node[NODE_TYPE] === DOC;
|
|
9375
|
+
const isMap = (node) => !!node && typeof node === "object" && node[NODE_TYPE] === MAP;
|
|
9376
|
+
const isPair = (node) => !!node && typeof node === "object" && node[NODE_TYPE] === PAIR;
|
|
9377
|
+
const isScalar = (node) => !!node && typeof node === "object" && node[NODE_TYPE] === SCALAR;
|
|
9378
|
+
const isSeq = (node) => !!node && typeof node === "object" && node[NODE_TYPE] === SEQ;
|
|
9379
|
+
function isCollection(node) {
|
|
9380
|
+
if (node && typeof node === "object") switch (node[NODE_TYPE]) {
|
|
9381
|
+
case MAP:
|
|
9382
|
+
case SEQ: return true;
|
|
9183
9383
|
}
|
|
9184
|
-
return
|
|
9384
|
+
return false;
|
|
9185
9385
|
}
|
|
9186
|
-
function
|
|
9187
|
-
if (typeof
|
|
9188
|
-
|
|
9189
|
-
|
|
9190
|
-
|
|
9386
|
+
function isNode(node) {
|
|
9387
|
+
if (node && typeof node === "object") switch (node[NODE_TYPE]) {
|
|
9388
|
+
case ALIAS:
|
|
9389
|
+
case MAP:
|
|
9390
|
+
case SCALAR:
|
|
9391
|
+
case SEQ: return true;
|
|
9392
|
+
}
|
|
9393
|
+
return false;
|
|
9394
|
+
}
|
|
9395
|
+
const hasAnchor = (node) => (isScalar(node) || isCollection(node)) && !!node.anchor;
|
|
9396
|
+
exports.ALIAS = ALIAS;
|
|
9397
|
+
exports.DOC = DOC;
|
|
9398
|
+
exports.MAP = MAP;
|
|
9399
|
+
exports.NODE_TYPE = NODE_TYPE;
|
|
9400
|
+
exports.PAIR = PAIR;
|
|
9401
|
+
exports.SCALAR = SCALAR;
|
|
9402
|
+
exports.SEQ = SEQ;
|
|
9403
|
+
exports.hasAnchor = hasAnchor;
|
|
9404
|
+
exports.isAlias = isAlias;
|
|
9405
|
+
exports.isCollection = isCollection;
|
|
9406
|
+
exports.isDocument = isDocument;
|
|
9407
|
+
exports.isMap = isMap;
|
|
9408
|
+
exports.isNode = isNode;
|
|
9409
|
+
exports.isPair = isPair;
|
|
9410
|
+
exports.isScalar = isScalar;
|
|
9411
|
+
exports.isSeq = isSeq;
|
|
9412
|
+
}));
|
|
9413
|
+
var require_visit = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
9414
|
+
var identity = require_identity();
|
|
9415
|
+
const BREAK = Symbol("break visit");
|
|
9416
|
+
const SKIP = Symbol("skip children");
|
|
9417
|
+
const REMOVE = Symbol("remove node");
|
|
9418
|
+
/**
|
|
9419
|
+
* Apply a visitor to an AST node or document.
|
|
9420
|
+
*
|
|
9421
|
+
* Walks through the tree (depth-first) starting from `node`, calling a
|
|
9422
|
+
* `visitor` function with three arguments:
|
|
9423
|
+
* - `key`: For sequence values and map `Pair`, the node's index in the
|
|
9424
|
+
* collection. Within a `Pair`, `'key'` or `'value'`, correspondingly.
|
|
9425
|
+
* `null` for the root node.
|
|
9426
|
+
* - `node`: The current node.
|
|
9427
|
+
* - `path`: The ancestry of the current node.
|
|
9428
|
+
*
|
|
9429
|
+
* The return value of the visitor may be used to control the traversal:
|
|
9430
|
+
* - `undefined` (default): Do nothing and continue
|
|
9431
|
+
* - `visit.SKIP`: Do not visit the children of this node, continue with next
|
|
9432
|
+
* sibling
|
|
9433
|
+
* - `visit.BREAK`: Terminate traversal completely
|
|
9434
|
+
* - `visit.REMOVE`: Remove the current node, then continue with the next one
|
|
9435
|
+
* - `Node`: Replace the current node, then continue by visiting it
|
|
9436
|
+
* - `number`: While iterating the items of a sequence or map, set the index
|
|
9437
|
+
* of the next step. This is useful especially if the index of the current
|
|
9438
|
+
* node has changed.
|
|
9439
|
+
*
|
|
9440
|
+
* If `visitor` is a single function, it will be called with all values
|
|
9441
|
+
* encountered in the tree, including e.g. `null` values. Alternatively,
|
|
9442
|
+
* separate visitor functions may be defined for each `Map`, `Pair`, `Seq`,
|
|
9443
|
+
* `Alias` and `Scalar` node. To define the same visitor function for more than
|
|
9444
|
+
* one node type, use the `Collection` (map and seq), `Value` (map, seq & scalar)
|
|
9445
|
+
* and `Node` (alias, map, seq & scalar) targets. Of all these, only the most
|
|
9446
|
+
* specific defined one will be used for each node.
|
|
9447
|
+
*/
|
|
9448
|
+
function visit(node, visitor) {
|
|
9449
|
+
const visitor_ = initVisitor(visitor);
|
|
9450
|
+
if (identity.isDocument(node)) {
|
|
9451
|
+
if (visit_(null, node.contents, visitor_, Object.freeze([node])) === REMOVE) node.contents = null;
|
|
9452
|
+
} else visit_(null, node, visitor_, Object.freeze([]));
|
|
9453
|
+
}
|
|
9454
|
+
/** Terminate visit traversal completely */
|
|
9455
|
+
visit.BREAK = BREAK;
|
|
9456
|
+
/** Do not visit the children of the current node */
|
|
9457
|
+
visit.SKIP = SKIP;
|
|
9458
|
+
/** Remove the current node */
|
|
9459
|
+
visit.REMOVE = REMOVE;
|
|
9460
|
+
function visit_(key, node, visitor, path) {
|
|
9461
|
+
const ctrl = callVisitor(key, node, visitor, path);
|
|
9462
|
+
if (identity.isNode(ctrl) || identity.isPair(ctrl)) {
|
|
9463
|
+
replaceNode(key, path, ctrl);
|
|
9464
|
+
return visit_(key, ctrl, visitor, path);
|
|
9465
|
+
}
|
|
9466
|
+
if (typeof ctrl !== "symbol") {
|
|
9467
|
+
if (identity.isCollection(node)) {
|
|
9468
|
+
path = Object.freeze(path.concat(node));
|
|
9469
|
+
for (let i = 0; i < node.items.length; ++i) {
|
|
9470
|
+
const ci = visit_(i, node.items[i], visitor, path);
|
|
9471
|
+
if (typeof ci === "number") i = ci - 1;
|
|
9472
|
+
else if (ci === BREAK) return BREAK;
|
|
9473
|
+
else if (ci === REMOVE) {
|
|
9474
|
+
node.items.splice(i, 1);
|
|
9475
|
+
i -= 1;
|
|
9476
|
+
}
|
|
9477
|
+
}
|
|
9478
|
+
} else if (identity.isPair(node)) {
|
|
9479
|
+
path = Object.freeze(path.concat(node));
|
|
9480
|
+
const ck = visit_("key", node.key, visitor, path);
|
|
9481
|
+
if (ck === BREAK) return BREAK;
|
|
9482
|
+
else if (ck === REMOVE) node.key = null;
|
|
9483
|
+
const cv = visit_("value", node.value, visitor, path);
|
|
9484
|
+
if (cv === BREAK) return BREAK;
|
|
9485
|
+
else if (cv === REMOVE) node.value = null;
|
|
9486
|
+
}
|
|
9487
|
+
}
|
|
9488
|
+
return ctrl;
|
|
9489
|
+
}
|
|
9490
|
+
/**
|
|
9491
|
+
* Apply an async visitor to an AST node or document.
|
|
9492
|
+
*
|
|
9493
|
+
* Walks through the tree (depth-first) starting from `node`, calling a
|
|
9494
|
+
* `visitor` function with three arguments:
|
|
9495
|
+
* - `key`: For sequence values and map `Pair`, the node's index in the
|
|
9496
|
+
* collection. Within a `Pair`, `'key'` or `'value'`, correspondingly.
|
|
9497
|
+
* `null` for the root node.
|
|
9498
|
+
* - `node`: The current node.
|
|
9499
|
+
* - `path`: The ancestry of the current node.
|
|
9500
|
+
*
|
|
9501
|
+
* The return value of the visitor may be used to control the traversal:
|
|
9502
|
+
* - `Promise`: Must resolve to one of the following values
|
|
9503
|
+
* - `undefined` (default): Do nothing and continue
|
|
9504
|
+
* - `visit.SKIP`: Do not visit the children of this node, continue with next
|
|
9505
|
+
* sibling
|
|
9506
|
+
* - `visit.BREAK`: Terminate traversal completely
|
|
9507
|
+
* - `visit.REMOVE`: Remove the current node, then continue with the next one
|
|
9508
|
+
* - `Node`: Replace the current node, then continue by visiting it
|
|
9509
|
+
* - `number`: While iterating the items of a sequence or map, set the index
|
|
9510
|
+
* of the next step. This is useful especially if the index of the current
|
|
9511
|
+
* node has changed.
|
|
9512
|
+
*
|
|
9513
|
+
* If `visitor` is a single function, it will be called with all values
|
|
9514
|
+
* encountered in the tree, including e.g. `null` values. Alternatively,
|
|
9515
|
+
* separate visitor functions may be defined for each `Map`, `Pair`, `Seq`,
|
|
9516
|
+
* `Alias` and `Scalar` node. To define the same visitor function for more than
|
|
9517
|
+
* one node type, use the `Collection` (map and seq), `Value` (map, seq & scalar)
|
|
9518
|
+
* and `Node` (alias, map, seq & scalar) targets. Of all these, only the most
|
|
9519
|
+
* specific defined one will be used for each node.
|
|
9520
|
+
*/
|
|
9521
|
+
async function visitAsync(node, visitor) {
|
|
9522
|
+
const visitor_ = initVisitor(visitor);
|
|
9523
|
+
if (identity.isDocument(node)) {
|
|
9524
|
+
if (await visitAsync_(null, node.contents, visitor_, Object.freeze([node])) === REMOVE) node.contents = null;
|
|
9525
|
+
} else await visitAsync_(null, node, visitor_, Object.freeze([]));
|
|
9526
|
+
}
|
|
9527
|
+
/** Terminate visit traversal completely */
|
|
9528
|
+
visitAsync.BREAK = BREAK;
|
|
9529
|
+
/** Do not visit the children of the current node */
|
|
9530
|
+
visitAsync.SKIP = SKIP;
|
|
9531
|
+
/** Remove the current node */
|
|
9532
|
+
visitAsync.REMOVE = REMOVE;
|
|
9533
|
+
async function visitAsync_(key, node, visitor, path) {
|
|
9534
|
+
const ctrl = await callVisitor(key, node, visitor, path);
|
|
9535
|
+
if (identity.isNode(ctrl) || identity.isPair(ctrl)) {
|
|
9536
|
+
replaceNode(key, path, ctrl);
|
|
9537
|
+
return visitAsync_(key, ctrl, visitor, path);
|
|
9538
|
+
}
|
|
9539
|
+
if (typeof ctrl !== "symbol") {
|
|
9540
|
+
if (identity.isCollection(node)) {
|
|
9541
|
+
path = Object.freeze(path.concat(node));
|
|
9542
|
+
for (let i = 0; i < node.items.length; ++i) {
|
|
9543
|
+
const ci = await visitAsync_(i, node.items[i], visitor, path);
|
|
9544
|
+
if (typeof ci === "number") i = ci - 1;
|
|
9545
|
+
else if (ci === BREAK) return BREAK;
|
|
9546
|
+
else if (ci === REMOVE) {
|
|
9547
|
+
node.items.splice(i, 1);
|
|
9548
|
+
i -= 1;
|
|
9549
|
+
}
|
|
9550
|
+
}
|
|
9551
|
+
} else if (identity.isPair(node)) {
|
|
9552
|
+
path = Object.freeze(path.concat(node));
|
|
9553
|
+
const ck = await visitAsync_("key", node.key, visitor, path);
|
|
9554
|
+
if (ck === BREAK) return BREAK;
|
|
9555
|
+
else if (ck === REMOVE) node.key = null;
|
|
9556
|
+
const cv = await visitAsync_("value", node.value, visitor, path);
|
|
9557
|
+
if (cv === BREAK) return BREAK;
|
|
9558
|
+
else if (cv === REMOVE) node.value = null;
|
|
9559
|
+
}
|
|
9560
|
+
}
|
|
9561
|
+
return ctrl;
|
|
9562
|
+
}
|
|
9563
|
+
function initVisitor(visitor) {
|
|
9564
|
+
if (typeof visitor === "object" && (visitor.Collection || visitor.Node || visitor.Value)) return Object.assign({
|
|
9565
|
+
Alias: visitor.Node,
|
|
9566
|
+
Map: visitor.Node,
|
|
9567
|
+
Scalar: visitor.Node,
|
|
9191
9568
|
Seq: visitor.Node
|
|
9192
9569
|
}, visitor.Value && {
|
|
9193
9570
|
Map: visitor.Value,
|
|
@@ -9222,8 +9599,6 @@ var require_visit = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
9222
9599
|
exports.visit = visit;
|
|
9223
9600
|
exports.visitAsync = visitAsync;
|
|
9224
9601
|
}));
|
|
9225
|
-
//#endregion
|
|
9226
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/dist/doc/directives.js
|
|
9227
9602
|
var require_directives = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
9228
9603
|
var identity = require_identity();
|
|
9229
9604
|
var visit = require_visit();
|
|
@@ -9386,8 +9761,6 @@ var require_directives = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
9386
9761
|
Directives.defaultTags = { "!!": "tag:yaml.org,2002:" };
|
|
9387
9762
|
exports.Directives = Directives;
|
|
9388
9763
|
}));
|
|
9389
|
-
//#endregion
|
|
9390
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/dist/doc/anchors.js
|
|
9391
9764
|
var require_anchors = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
9392
9765
|
var identity = require_identity();
|
|
9393
9766
|
var visit = require_visit();
|
|
@@ -9453,8 +9826,6 @@ var require_anchors = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
9453
9826
|
exports.createNodeAnchors = createNodeAnchors;
|
|
9454
9827
|
exports.findNewAnchor = findNewAnchor;
|
|
9455
9828
|
}));
|
|
9456
|
-
//#endregion
|
|
9457
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/dist/doc/applyReviver.js
|
|
9458
9829
|
var require_applyReviver = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
9459
9830
|
/**
|
|
9460
9831
|
* Applies the JSON.parse reviver algorithm as defined in the ECMA-262 spec,
|
|
@@ -9495,8 +9866,6 @@ var require_applyReviver = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
9495
9866
|
}
|
|
9496
9867
|
exports.applyReviver = applyReviver;
|
|
9497
9868
|
}));
|
|
9498
|
-
//#endregion
|
|
9499
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/dist/nodes/toJS.js
|
|
9500
9869
|
var require_toJS = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
9501
9870
|
var identity = require_identity();
|
|
9502
9871
|
/**
|
|
@@ -9532,8 +9901,6 @@ var require_toJS = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
9532
9901
|
}
|
|
9533
9902
|
exports.toJS = toJS;
|
|
9534
9903
|
}));
|
|
9535
|
-
//#endregion
|
|
9536
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/dist/nodes/Node.js
|
|
9537
9904
|
var require_Node = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
9538
9905
|
var applyReviver = require_applyReviver();
|
|
9539
9906
|
var identity = require_identity();
|
|
@@ -9566,8 +9933,6 @@ var require_Node = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
9566
9933
|
};
|
|
9567
9934
|
exports.NodeBase = NodeBase;
|
|
9568
9935
|
}));
|
|
9569
|
-
//#endregion
|
|
9570
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/dist/nodes/Alias.js
|
|
9571
9936
|
var require_Alias = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
9572
9937
|
var anchors = require_anchors();
|
|
9573
9938
|
var visit = require_visit();
|
|
@@ -9602,29 +9967,31 @@ var require_Alias = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
9602
9967
|
if (node === this) break;
|
|
9603
9968
|
if (node.anchor === this.source) found = node;
|
|
9604
9969
|
}
|
|
9970
|
+
if (found && ctx) {
|
|
9971
|
+
const { anchors, doc, maxAliasCount } = ctx;
|
|
9972
|
+
let data = anchors.get(found);
|
|
9973
|
+
if (!data) {
|
|
9974
|
+
toJS.toJS(found, null, ctx);
|
|
9975
|
+
data = anchors.get(found);
|
|
9976
|
+
}
|
|
9977
|
+
/* istanbul ignore if */
|
|
9978
|
+
if (data?.res === void 0) throw new ReferenceError("This should not happen: Alias anchor was not resolved?");
|
|
9979
|
+
if (maxAliasCount >= 0) {
|
|
9980
|
+
data.count += 1;
|
|
9981
|
+
if (data.aliasCount === 0) data.aliasCount = getAliasCount(doc, found, anchors);
|
|
9982
|
+
if (data.count * data.aliasCount > maxAliasCount) throw new ReferenceError("Excessive alias count indicates a resource exhaustion attack");
|
|
9983
|
+
}
|
|
9984
|
+
}
|
|
9605
9985
|
return found;
|
|
9606
9986
|
}
|
|
9607
9987
|
toJSON(_arg, ctx) {
|
|
9608
9988
|
if (!ctx) return { source: this.source };
|
|
9609
|
-
const
|
|
9610
|
-
const source = this.resolve(doc, ctx);
|
|
9989
|
+
const source = this.resolve(ctx.doc, ctx);
|
|
9611
9990
|
if (!source) {
|
|
9612
9991
|
const msg = `Unresolved alias (the anchor must be set before the alias): ${this.source}`;
|
|
9613
9992
|
throw new ReferenceError(msg);
|
|
9614
9993
|
}
|
|
9615
|
-
|
|
9616
|
-
if (!data) {
|
|
9617
|
-
toJS.toJS(source, null, ctx);
|
|
9618
|
-
data = anchors.get(source);
|
|
9619
|
-
}
|
|
9620
|
-
/* istanbul ignore if */
|
|
9621
|
-
if (data?.res === void 0) throw new ReferenceError("This should not happen: Alias anchor was not resolved?");
|
|
9622
|
-
if (maxAliasCount >= 0) {
|
|
9623
|
-
data.count += 1;
|
|
9624
|
-
if (data.aliasCount === 0) data.aliasCount = getAliasCount(doc, source, anchors);
|
|
9625
|
-
if (data.count * data.aliasCount > maxAliasCount) throw new ReferenceError("Excessive alias count indicates a resource exhaustion attack");
|
|
9626
|
-
}
|
|
9627
|
-
return data.res;
|
|
9994
|
+
return ctx.anchors.get(source).res;
|
|
9628
9995
|
}
|
|
9629
9996
|
toString(ctx, _onComment, _onChompKeep) {
|
|
9630
9997
|
const src = `*${this.source}`;
|
|
@@ -9660,8 +10027,6 @@ var require_Alias = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
9660
10027
|
}
|
|
9661
10028
|
exports.Alias = Alias;
|
|
9662
10029
|
}));
|
|
9663
|
-
//#endregion
|
|
9664
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/dist/nodes/Scalar.js
|
|
9665
10030
|
var require_Scalar = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
9666
10031
|
var identity = require_identity();
|
|
9667
10032
|
var Node = require_Node();
|
|
@@ -9687,8 +10052,6 @@ var require_Scalar = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
9687
10052
|
exports.Scalar = Scalar;
|
|
9688
10053
|
exports.isScalarValue = isScalarValue;
|
|
9689
10054
|
}));
|
|
9690
|
-
//#endregion
|
|
9691
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/dist/doc/createNode.js
|
|
9692
10055
|
var require_createNode = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
9693
10056
|
var Alias = require_Alias();
|
|
9694
10057
|
var identity = require_identity();
|
|
@@ -9750,8 +10113,6 @@ var require_createNode = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
9750
10113
|
}
|
|
9751
10114
|
exports.createNode = createNode;
|
|
9752
10115
|
}));
|
|
9753
|
-
//#endregion
|
|
9754
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/dist/nodes/Collection.js
|
|
9755
10116
|
var require_Collection = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
9756
10117
|
var createNode = require_createNode();
|
|
9757
10118
|
var identity = require_identity();
|
|
@@ -9871,8 +10232,6 @@ var require_Collection = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
9871
10232
|
exports.collectionFromPath = collectionFromPath;
|
|
9872
10233
|
exports.isEmptyPath = isEmptyPath;
|
|
9873
10234
|
}));
|
|
9874
|
-
//#endregion
|
|
9875
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/dist/stringify/stringifyComment.js
|
|
9876
10235
|
var require_stringifyComment = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
9877
10236
|
/**
|
|
9878
10237
|
* Stringifies a comment.
|
|
@@ -9891,8 +10250,6 @@ var require_stringifyComment = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
9891
10250
|
exports.lineComment = lineComment;
|
|
9892
10251
|
exports.stringifyComment = stringifyComment;
|
|
9893
10252
|
}));
|
|
9894
|
-
//#endregion
|
|
9895
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/dist/stringify/foldFlowLines.js
|
|
9896
10253
|
var require_foldFlowLines = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
9897
10254
|
const FOLD_FLOW = "flow";
|
|
9898
10255
|
const FOLD_BLOCK = "block";
|
|
@@ -10011,8 +10368,6 @@ var require_foldFlowLines = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
10011
10368
|
exports.FOLD_QUOTED = FOLD_QUOTED;
|
|
10012
10369
|
exports.foldFlowLines = foldFlowLines;
|
|
10013
10370
|
}));
|
|
10014
|
-
//#endregion
|
|
10015
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/dist/stringify/stringifyString.js
|
|
10016
10371
|
var require_stringifyString = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
10017
10372
|
var Scalar = require_Scalar();
|
|
10018
10373
|
var foldFlowLines = require_foldFlowLines();
|
|
@@ -10235,8 +10590,6 @@ var require_stringifyString = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
10235
10590
|
}
|
|
10236
10591
|
exports.stringifyString = stringifyString;
|
|
10237
10592
|
}));
|
|
10238
|
-
//#endregion
|
|
10239
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/dist/stringify/stringify.js
|
|
10240
10593
|
var require_stringify = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
10241
10594
|
var anchors = require_anchors();
|
|
10242
10595
|
var identity = require_identity();
|
|
@@ -10343,8 +10696,6 @@ var require_stringify = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
10343
10696
|
exports.createStringifyContext = createStringifyContext;
|
|
10344
10697
|
exports.stringify = stringify;
|
|
10345
10698
|
}));
|
|
10346
|
-
//#endregion
|
|
10347
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/dist/stringify/stringifyPair.js
|
|
10348
10699
|
var require_stringifyPair = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
10349
10700
|
var identity = require_identity();
|
|
10350
10701
|
var Scalar = require_Scalar();
|
|
@@ -10440,8 +10791,6 @@ var require_stringifyPair = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
10440
10791
|
}
|
|
10441
10792
|
exports.stringifyPair = stringifyPair;
|
|
10442
10793
|
}));
|
|
10443
|
-
//#endregion
|
|
10444
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/dist/log.js
|
|
10445
10794
|
var require_log = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
10446
10795
|
var node_process$2 = __require("process");
|
|
10447
10796
|
function debug(logLevel, ...messages) {
|
|
@@ -10456,8 +10805,6 @@ var require_log = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
10456
10805
|
exports.debug = debug;
|
|
10457
10806
|
exports.warn = warn;
|
|
10458
10807
|
}));
|
|
10459
|
-
//#endregion
|
|
10460
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/dist/schema/yaml-1.1/merge.js
|
|
10461
10808
|
var require_merge = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
10462
10809
|
var identity = require_identity();
|
|
10463
10810
|
var Scalar = require_Scalar();
|
|
@@ -10499,8 +10846,6 @@ var require_merge = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
10499
10846
|
exports.isMergeKey = isMergeKey;
|
|
10500
10847
|
exports.merge = merge;
|
|
10501
10848
|
}));
|
|
10502
|
-
//#endregion
|
|
10503
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/dist/nodes/addPairToJSMap.js
|
|
10504
10849
|
var require_addPairToJSMap = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
10505
10850
|
var log = require_log();
|
|
10506
10851
|
var merge = require_merge();
|
|
@@ -10550,8 +10895,6 @@ var require_addPairToJSMap = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
10550
10895
|
}
|
|
10551
10896
|
exports.addPairToJSMap = addPairToJSMap;
|
|
10552
10897
|
}));
|
|
10553
|
-
//#endregion
|
|
10554
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/dist/nodes/Pair.js
|
|
10555
10898
|
var require_Pair = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
10556
10899
|
var createNode = require_createNode();
|
|
10557
10900
|
var stringifyPair = require_stringifyPair();
|
|
@@ -10583,8 +10926,6 @@ var require_Pair = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
10583
10926
|
exports.Pair = Pair;
|
|
10584
10927
|
exports.createPair = createPair;
|
|
10585
10928
|
}));
|
|
10586
|
-
//#endregion
|
|
10587
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/dist/stringify/stringifyCollection.js
|
|
10588
10929
|
var require_stringifyCollection = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
10589
10930
|
var identity = require_identity();
|
|
10590
10931
|
var stringify = require_stringify();
|
|
@@ -10701,8 +11042,6 @@ var require_stringifyCollection = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
10701
11042
|
}
|
|
10702
11043
|
exports.stringifyCollection = stringifyCollection;
|
|
10703
11044
|
}));
|
|
10704
|
-
//#endregion
|
|
10705
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/dist/nodes/YAMLMap.js
|
|
10706
11045
|
var require_YAMLMap = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
10707
11046
|
var stringifyCollection = require_stringifyCollection();
|
|
10708
11047
|
var addPairToJSMap = require_addPairToJSMap();
|
|
@@ -10810,8 +11149,6 @@ var require_YAMLMap = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
10810
11149
|
exports.YAMLMap = YAMLMap;
|
|
10811
11150
|
exports.findPair = findPair;
|
|
10812
11151
|
}));
|
|
10813
|
-
//#endregion
|
|
10814
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/dist/schema/common/map.js
|
|
10815
11152
|
var require_map = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
10816
11153
|
var identity = require_identity();
|
|
10817
11154
|
var YAMLMap = require_YAMLMap();
|
|
@@ -10827,8 +11164,6 @@ var require_map = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
10827
11164
|
createNode: (schema, obj, ctx) => YAMLMap.YAMLMap.from(schema, obj, ctx)
|
|
10828
11165
|
};
|
|
10829
11166
|
}));
|
|
10830
|
-
//#endregion
|
|
10831
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/dist/nodes/YAMLSeq.js
|
|
10832
11167
|
var require_YAMLSeq = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
10833
11168
|
var createNode = require_createNode();
|
|
10834
11169
|
var stringifyCollection = require_stringifyCollection();
|
|
@@ -10933,8 +11268,6 @@ var require_YAMLSeq = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
10933
11268
|
}
|
|
10934
11269
|
exports.YAMLSeq = YAMLSeq;
|
|
10935
11270
|
}));
|
|
10936
|
-
//#endregion
|
|
10937
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/dist/schema/common/seq.js
|
|
10938
11271
|
var require_seq = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
10939
11272
|
var identity = require_identity();
|
|
10940
11273
|
var YAMLSeq = require_YAMLSeq();
|
|
@@ -10950,8 +11283,6 @@ var require_seq = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
10950
11283
|
createNode: (schema, obj, ctx) => YAMLSeq.YAMLSeq.from(schema, obj, ctx)
|
|
10951
11284
|
};
|
|
10952
11285
|
}));
|
|
10953
|
-
//#endregion
|
|
10954
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/dist/schema/common/string.js
|
|
10955
11286
|
var require_string = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
10956
11287
|
var stringifyString = require_stringifyString();
|
|
10957
11288
|
exports.string = {
|
|
@@ -10965,8 +11296,6 @@ var require_string = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
10965
11296
|
}
|
|
10966
11297
|
};
|
|
10967
11298
|
}));
|
|
10968
|
-
//#endregion
|
|
10969
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/dist/schema/common/null.js
|
|
10970
11299
|
var require_null = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
10971
11300
|
var Scalar = require_Scalar();
|
|
10972
11301
|
const nullTag = {
|
|
@@ -10980,8 +11309,6 @@ var require_null = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
10980
11309
|
};
|
|
10981
11310
|
exports.nullTag = nullTag;
|
|
10982
11311
|
}));
|
|
10983
|
-
//#endregion
|
|
10984
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/dist/schema/core/bool.js
|
|
10985
11312
|
var require_bool$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
10986
11313
|
var Scalar = require_Scalar();
|
|
10987
11314
|
const boolTag = {
|
|
@@ -10999,8 +11326,6 @@ var require_bool$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
10999
11326
|
};
|
|
11000
11327
|
exports.boolTag = boolTag;
|
|
11001
11328
|
}));
|
|
11002
|
-
//#endregion
|
|
11003
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/dist/stringify/stringifyNumber.js
|
|
11004
11329
|
var require_stringifyNumber = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
11005
11330
|
function stringifyNumber({ format, minFractionDigits, tag, value }) {
|
|
11006
11331
|
if (typeof value === "bigint") return String(value);
|
|
@@ -11020,8 +11345,6 @@ var require_stringifyNumber = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
11020
11345
|
}
|
|
11021
11346
|
exports.stringifyNumber = stringifyNumber;
|
|
11022
11347
|
}));
|
|
11023
|
-
//#endregion
|
|
11024
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/dist/schema/core/float.js
|
|
11025
11348
|
var require_float$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
11026
11349
|
var Scalar = require_Scalar();
|
|
11027
11350
|
var stringifyNumber = require_stringifyNumber();
|
|
@@ -11061,8 +11384,6 @@ var require_float$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
11061
11384
|
exports.floatExp = floatExp;
|
|
11062
11385
|
exports.floatNaN = floatNaN;
|
|
11063
11386
|
}));
|
|
11064
|
-
//#endregion
|
|
11065
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/dist/schema/core/int.js
|
|
11066
11387
|
var require_int$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
11067
11388
|
var stringifyNumber = require_stringifyNumber();
|
|
11068
11389
|
const intIdentify = (value) => typeof value === "bigint" || Number.isInteger(value);
|
|
@@ -11102,8 +11423,6 @@ var require_int$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
11102
11423
|
exports.intHex = intHex;
|
|
11103
11424
|
exports.intOct = intOct;
|
|
11104
11425
|
}));
|
|
11105
|
-
//#endregion
|
|
11106
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/dist/schema/core/schema.js
|
|
11107
11426
|
var require_schema$2 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
11108
11427
|
var map = require_map();
|
|
11109
11428
|
var _null = require_null();
|
|
@@ -11126,8 +11445,6 @@ var require_schema$2 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
11126
11445
|
float.float
|
|
11127
11446
|
];
|
|
11128
11447
|
}));
|
|
11129
|
-
//#endregion
|
|
11130
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/dist/schema/json/schema.js
|
|
11131
11448
|
var require_schema$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
11132
11449
|
var Scalar = require_Scalar();
|
|
11133
11450
|
var map = require_map();
|
|
@@ -11188,8 +11505,6 @@ var require_schema$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
11188
11505
|
}
|
|
11189
11506
|
});
|
|
11190
11507
|
}));
|
|
11191
|
-
//#endregion
|
|
11192
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/dist/schema/yaml-1.1/binary.js
|
|
11193
11508
|
var require_binary = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
11194
11509
|
var node_buffer = __require("buffer");
|
|
11195
11510
|
var Scalar = require_Scalar();
|
|
@@ -11244,8 +11559,6 @@ var require_binary = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
11244
11559
|
}
|
|
11245
11560
|
};
|
|
11246
11561
|
}));
|
|
11247
|
-
//#endregion
|
|
11248
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/dist/schema/yaml-1.1/pairs.js
|
|
11249
11562
|
var require_pairs = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
11250
11563
|
var identity = require_identity();
|
|
11251
11564
|
var Pair = require_Pair();
|
|
@@ -11305,8 +11618,6 @@ var require_pairs = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
11305
11618
|
exports.pairs = pairs;
|
|
11306
11619
|
exports.resolvePairs = resolvePairs;
|
|
11307
11620
|
}));
|
|
11308
|
-
//#endregion
|
|
11309
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/dist/schema/yaml-1.1/omap.js
|
|
11310
11621
|
var require_omap = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
11311
11622
|
var identity = require_identity();
|
|
11312
11623
|
var toJS = require_toJS();
|
|
@@ -11370,8 +11681,6 @@ var require_omap = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
11370
11681
|
exports.YAMLOMap = YAMLOMap;
|
|
11371
11682
|
exports.omap = omap;
|
|
11372
11683
|
}));
|
|
11373
|
-
//#endregion
|
|
11374
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/dist/schema/yaml-1.1/bool.js
|
|
11375
11684
|
var require_bool = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
11376
11685
|
var Scalar = require_Scalar();
|
|
11377
11686
|
function boolStringify({ value, source }, ctx) {
|
|
@@ -11397,8 +11706,6 @@ var require_bool = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
11397
11706
|
exports.falseTag = falseTag;
|
|
11398
11707
|
exports.trueTag = trueTag;
|
|
11399
11708
|
}));
|
|
11400
|
-
//#endregion
|
|
11401
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/dist/schema/yaml-1.1/float.js
|
|
11402
11709
|
var require_float = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
11403
11710
|
var Scalar = require_Scalar();
|
|
11404
11711
|
var stringifyNumber = require_stringifyNumber();
|
|
@@ -11441,8 +11748,6 @@ var require_float = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
11441
11748
|
exports.floatExp = floatExp;
|
|
11442
11749
|
exports.floatNaN = floatNaN;
|
|
11443
11750
|
}));
|
|
11444
|
-
//#endregion
|
|
11445
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/dist/schema/yaml-1.1/int.js
|
|
11446
11751
|
var require_int = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
11447
11752
|
var stringifyNumber = require_stringifyNumber();
|
|
11448
11753
|
const intIdentify = (value) => typeof value === "bigint" || Number.isInteger(value);
|
|
@@ -11514,8 +11819,6 @@ var require_int = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
11514
11819
|
exports.intHex = intHex;
|
|
11515
11820
|
exports.intOct = intOct;
|
|
11516
11821
|
}));
|
|
11517
|
-
//#endregion
|
|
11518
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/dist/schema/yaml-1.1/set.js
|
|
11519
11822
|
var require_set = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
11520
11823
|
var identity = require_identity();
|
|
11521
11824
|
var Pair = require_Pair();
|
|
@@ -11583,8 +11886,6 @@ var require_set = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
11583
11886
|
exports.YAMLSet = YAMLSet;
|
|
11584
11887
|
exports.set = set;
|
|
11585
11888
|
}));
|
|
11586
|
-
//#endregion
|
|
11587
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/dist/schema/yaml-1.1/timestamp.js
|
|
11588
11889
|
var require_timestamp = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
11589
11890
|
var stringifyNumber = require_stringifyNumber();
|
|
11590
11891
|
/** Internal types handle bigint as number, because TS can't figure it out. */
|
|
@@ -11666,8 +11967,6 @@ var require_timestamp = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
11666
11967
|
exports.intTime = intTime;
|
|
11667
11968
|
exports.timestamp = timestamp;
|
|
11668
11969
|
}));
|
|
11669
|
-
//#endregion
|
|
11670
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/dist/schema/yaml-1.1/schema.js
|
|
11671
11970
|
var require_schema = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
11672
11971
|
var map = require_map();
|
|
11673
11972
|
var _null = require_null();
|
|
@@ -11706,8 +12005,6 @@ var require_schema = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
11706
12005
|
timestamp.timestamp
|
|
11707
12006
|
];
|
|
11708
12007
|
}));
|
|
11709
|
-
//#endregion
|
|
11710
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/dist/schema/tags.js
|
|
11711
12008
|
var require_tags = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
11712
12009
|
var map = require_map();
|
|
11713
12010
|
var _null = require_null();
|
|
@@ -11792,8 +12089,6 @@ var require_tags = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
11792
12089
|
exports.coreKnownTags = coreKnownTags;
|
|
11793
12090
|
exports.getTags = getTags;
|
|
11794
12091
|
}));
|
|
11795
|
-
//#endregion
|
|
11796
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/dist/schema/Schema.js
|
|
11797
12092
|
var require_Schema = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
11798
12093
|
var identity = require_identity();
|
|
11799
12094
|
var map = require_map();
|
|
@@ -11820,8 +12115,6 @@ var require_Schema = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
11820
12115
|
}
|
|
11821
12116
|
};
|
|
11822
12117
|
}));
|
|
11823
|
-
//#endregion
|
|
11824
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/dist/stringify/stringifyDocument.js
|
|
11825
12118
|
var require_stringifyDocument = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
11826
12119
|
var identity = require_identity();
|
|
11827
12120
|
var stringify = require_stringify();
|
|
@@ -11882,8 +12175,6 @@ var require_stringifyDocument = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
11882
12175
|
}
|
|
11883
12176
|
exports.stringifyDocument = stringifyDocument;
|
|
11884
12177
|
}));
|
|
11885
|
-
//#endregion
|
|
11886
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/dist/doc/Document.js
|
|
11887
12178
|
var require_Document = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
11888
12179
|
var Alias = require_Alias();
|
|
11889
12180
|
var Collection = require_Collection();
|
|
@@ -12163,8 +12454,6 @@ var require_Document = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
12163
12454
|
}
|
|
12164
12455
|
exports.Document = Document;
|
|
12165
12456
|
}));
|
|
12166
|
-
//#endregion
|
|
12167
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/dist/errors.js
|
|
12168
12457
|
var require_errors = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
12169
12458
|
var YAMLError = class extends Error {
|
|
12170
12459
|
constructor(name, pos, code, message) {
|
|
@@ -12216,8 +12505,6 @@ var require_errors = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
12216
12505
|
exports.YAMLWarning = YAMLWarning;
|
|
12217
12506
|
exports.prettifyError = prettifyError;
|
|
12218
12507
|
}));
|
|
12219
|
-
//#endregion
|
|
12220
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/dist/compose/resolve-props.js
|
|
12221
12508
|
var require_resolve_props = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
12222
12509
|
function resolveProps(tokens, { flow, indicator, next, offset, onError, parentIndent, startOnNewline }) {
|
|
12223
12510
|
let spaceBefore = false;
|
|
@@ -12323,8 +12610,6 @@ var require_resolve_props = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
12323
12610
|
}
|
|
12324
12611
|
exports.resolveProps = resolveProps;
|
|
12325
12612
|
}));
|
|
12326
|
-
//#endregion
|
|
12327
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/dist/compose/util-contains-newline.js
|
|
12328
12613
|
var require_util_contains_newline = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
12329
12614
|
function containsNewline(key) {
|
|
12330
12615
|
if (!key) return null;
|
|
@@ -12352,8 +12637,6 @@ var require_util_contains_newline = /* @__PURE__ */ __commonJSMin(((exports) =>
|
|
|
12352
12637
|
}
|
|
12353
12638
|
exports.containsNewline = containsNewline;
|
|
12354
12639
|
}));
|
|
12355
|
-
//#endregion
|
|
12356
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/dist/compose/util-flow-indent-check.js
|
|
12357
12640
|
var require_util_flow_indent_check = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
12358
12641
|
var utilContainsNewline = require_util_contains_newline();
|
|
12359
12642
|
function flowIndentCheck(indent, fc, onError) {
|
|
@@ -12364,8 +12647,6 @@ var require_util_flow_indent_check = /* @__PURE__ */ __commonJSMin(((exports) =>
|
|
|
12364
12647
|
}
|
|
12365
12648
|
exports.flowIndentCheck = flowIndentCheck;
|
|
12366
12649
|
}));
|
|
12367
|
-
//#endregion
|
|
12368
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/dist/compose/util-map-includes.js
|
|
12369
12650
|
var require_util_map_includes = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
12370
12651
|
var identity = require_identity();
|
|
12371
12652
|
function mapIncludes(ctx, items, search) {
|
|
@@ -12376,8 +12657,6 @@ var require_util_map_includes = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
12376
12657
|
}
|
|
12377
12658
|
exports.mapIncludes = mapIncludes;
|
|
12378
12659
|
}));
|
|
12379
|
-
//#endregion
|
|
12380
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/dist/compose/resolve-block-map.js
|
|
12381
12660
|
var require_resolve_block_map = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
12382
12661
|
var Pair = require_Pair();
|
|
12383
12662
|
var YAMLMap = require_YAMLMap();
|
|
@@ -12464,8 +12743,6 @@ var require_resolve_block_map = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
12464
12743
|
}
|
|
12465
12744
|
exports.resolveBlockMap = resolveBlockMap;
|
|
12466
12745
|
}));
|
|
12467
|
-
//#endregion
|
|
12468
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/dist/compose/resolve-block-seq.js
|
|
12469
12746
|
var require_resolve_block_seq = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
12470
12747
|
var YAMLSeq = require_YAMLSeq();
|
|
12471
12748
|
var resolveProps = require_resolve_props();
|
|
@@ -12509,8 +12786,6 @@ var require_resolve_block_seq = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
12509
12786
|
}
|
|
12510
12787
|
exports.resolveBlockSeq = resolveBlockSeq;
|
|
12511
12788
|
}));
|
|
12512
|
-
//#endregion
|
|
12513
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/dist/compose/resolve-end.js
|
|
12514
12789
|
var require_resolve_end = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
12515
12790
|
function resolveEnd(end, offset, reqSpace, onError) {
|
|
12516
12791
|
let comment = "";
|
|
@@ -12547,8 +12822,6 @@ var require_resolve_end = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
12547
12822
|
}
|
|
12548
12823
|
exports.resolveEnd = resolveEnd;
|
|
12549
12824
|
}));
|
|
12550
|
-
//#endregion
|
|
12551
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/dist/compose/resolve-flow-collection.js
|
|
12552
12825
|
var require_resolve_flow_collection = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
12553
12826
|
var identity = require_identity();
|
|
12554
12827
|
var Pair = require_Pair();
|
|
@@ -12710,8 +12983,6 @@ var require_resolve_flow_collection = /* @__PURE__ */ __commonJSMin(((exports) =
|
|
|
12710
12983
|
}
|
|
12711
12984
|
exports.resolveFlowCollection = resolveFlowCollection;
|
|
12712
12985
|
}));
|
|
12713
|
-
//#endregion
|
|
12714
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/dist/compose/compose-collection.js
|
|
12715
12986
|
var require_compose_collection = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
12716
12987
|
var identity = require_identity();
|
|
12717
12988
|
var Scalar = require_Scalar();
|
|
@@ -12762,8 +13033,6 @@ var require_compose_collection = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
12762
13033
|
}
|
|
12763
13034
|
exports.composeCollection = composeCollection;
|
|
12764
13035
|
}));
|
|
12765
|
-
//#endregion
|
|
12766
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/dist/compose/resolve-block-scalar.js
|
|
12767
13036
|
var require_resolve_block_scalar = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
12768
13037
|
var Scalar = require_Scalar();
|
|
12769
13038
|
function resolveBlockScalar(ctx, scalar, onError) {
|
|
@@ -12939,8 +13208,6 @@ var require_resolve_block_scalar = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
12939
13208
|
}
|
|
12940
13209
|
exports.resolveBlockScalar = resolveBlockScalar;
|
|
12941
13210
|
}));
|
|
12942
|
-
//#endregion
|
|
12943
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/dist/compose/resolve-flow-scalar.js
|
|
12944
13211
|
var require_resolve_flow_scalar = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
12945
13212
|
var Scalar = require_Scalar();
|
|
12946
13213
|
var resolveEnd = require_resolve_end();
|
|
@@ -13010,40 +13277,41 @@ var require_resolve_flow_scalar = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
13010
13277
|
case "`": badChar = `reserved character ${source[0]}`;
|
|
13011
13278
|
}
|
|
13012
13279
|
if (badChar) onError(0, "BAD_SCALAR_START", `Plain value cannot start with ${badChar}`);
|
|
13013
|
-
return
|
|
13280
|
+
return unfoldLines(source);
|
|
13014
13281
|
}
|
|
13015
13282
|
function singleQuotedValue(source, onError) {
|
|
13016
13283
|
if (source[source.length - 1] !== "'" || source.length === 1) onError(source.length, "MISSING_CHAR", "Missing closing 'quote");
|
|
13017
|
-
return
|
|
13284
|
+
return unfoldLines(source.slice(1, -1)).replace(/''/g, "'");
|
|
13018
13285
|
}
|
|
13019
|
-
function
|
|
13286
|
+
function unfoldLines(source) {
|
|
13287
|
+
const line = /(.*?)\r?\n/sy;
|
|
13288
|
+
let match = line.exec(source);
|
|
13289
|
+
if (!match) return source;
|
|
13020
13290
|
/**
|
|
13021
|
-
* The negative
|
|
13291
|
+
* The negative lookbehinds in these RegExps are to
|
|
13022
13292
|
* prevent causing a polynomial search time in certain cases.
|
|
13023
13293
|
*
|
|
13024
|
-
* The try-catch is for Safari
|
|
13294
|
+
* The try-catch is for Safari < 16.4 and other old browsers:
|
|
13025
13295
|
* https://caniuse.com/js-regexp-lookbehind
|
|
13026
13296
|
*/
|
|
13027
|
-
let
|
|
13297
|
+
let trimEnd, trimBoth;
|
|
13028
13298
|
try {
|
|
13029
|
-
|
|
13030
|
-
|
|
13299
|
+
trimEnd = /* @__PURE__ */ new RegExp("(?<![ ])[ ]+$");
|
|
13300
|
+
trimBoth = /* @__PURE__ */ new RegExp("^[ ]+|(?<![ ])[ ]+$", "g");
|
|
13031
13301
|
} catch {
|
|
13032
|
-
|
|
13033
|
-
|
|
13302
|
+
trimEnd = /[ \t]+$/;
|
|
13303
|
+
trimBoth = /^[ \t]+|[ \t]+$/g;
|
|
13034
13304
|
}
|
|
13035
|
-
let
|
|
13036
|
-
if (!match) return source;
|
|
13037
|
-
let res = match[1];
|
|
13305
|
+
let res = match[1].replace(trimEnd, "");
|
|
13038
13306
|
let sep = " ";
|
|
13039
|
-
let pos =
|
|
13040
|
-
line.lastIndex = pos;
|
|
13307
|
+
let pos = line.lastIndex;
|
|
13041
13308
|
while (match = line.exec(source)) {
|
|
13042
|
-
|
|
13309
|
+
const lm = match[1].replace(trimBoth, "");
|
|
13310
|
+
if (lm === "") {
|
|
13043
13311
|
if (sep === "\n") res += sep;
|
|
13044
13312
|
else sep = "\n";
|
|
13045
13313
|
} else {
|
|
13046
|
-
res += sep +
|
|
13314
|
+
res += sep + lm;
|
|
13047
13315
|
sep = " ";
|
|
13048
13316
|
}
|
|
13049
13317
|
pos = line.lastIndex;
|
|
@@ -13143,8 +13411,6 @@ var require_resolve_flow_scalar = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
13143
13411
|
}
|
|
13144
13412
|
exports.resolveFlowScalar = resolveFlowScalar;
|
|
13145
13413
|
}));
|
|
13146
|
-
//#endregion
|
|
13147
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/dist/compose/compose-scalar.js
|
|
13148
13414
|
var require_compose_scalar = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
13149
13415
|
var identity = require_identity();
|
|
13150
13416
|
var Scalar = require_Scalar();
|
|
@@ -13204,8 +13470,6 @@ var require_compose_scalar = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
13204
13470
|
}
|
|
13205
13471
|
exports.composeScalar = composeScalar;
|
|
13206
13472
|
}));
|
|
13207
|
-
//#endregion
|
|
13208
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/dist/compose/util-empty-scalar-position.js
|
|
13209
13473
|
var require_util_empty_scalar_position = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
13210
13474
|
function emptyScalarPosition(offset, before, pos) {
|
|
13211
13475
|
if (before) {
|
|
@@ -13231,8 +13495,6 @@ var require_util_empty_scalar_position = /* @__PURE__ */ __commonJSMin(((exports
|
|
|
13231
13495
|
}
|
|
13232
13496
|
exports.emptyScalarPosition = emptyScalarPosition;
|
|
13233
13497
|
}));
|
|
13234
|
-
//#endregion
|
|
13235
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/dist/compose/compose-node.js
|
|
13236
13498
|
var require_compose_node = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
13237
13499
|
var Alias = require_Alias();
|
|
13238
13500
|
var identity = require_identity();
|
|
@@ -13322,8 +13584,6 @@ var require_compose_node = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
13322
13584
|
exports.composeEmptyNode = composeEmptyNode;
|
|
13323
13585
|
exports.composeNode = composeNode;
|
|
13324
13586
|
}));
|
|
13325
|
-
//#endregion
|
|
13326
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/dist/compose/compose-doc.js
|
|
13327
13587
|
var require_compose_doc = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
13328
13588
|
var Document = require_Document();
|
|
13329
13589
|
var composeNode = require_compose_node();
|
|
@@ -13364,8 +13624,6 @@ var require_compose_doc = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
13364
13624
|
}
|
|
13365
13625
|
exports.composeDoc = composeDoc;
|
|
13366
13626
|
}));
|
|
13367
|
-
//#endregion
|
|
13368
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/dist/compose/composer.js
|
|
13369
13627
|
var require_composer = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
13370
13628
|
var node_process$1 = __require("process");
|
|
13371
13629
|
var directives = require_directives();
|
|
@@ -13562,8 +13820,6 @@ var require_composer = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
13562
13820
|
};
|
|
13563
13821
|
exports.Composer = Composer;
|
|
13564
13822
|
}));
|
|
13565
|
-
//#endregion
|
|
13566
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/dist/parse/cst-scalar.js
|
|
13567
13823
|
var require_cst_scalar = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
13568
13824
|
var resolveBlockScalar = require_resolve_block_scalar();
|
|
13569
13825
|
var resolveFlowScalar = require_resolve_flow_scalar();
|
|
@@ -13829,8 +14085,6 @@ var require_cst_scalar = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
13829
14085
|
exports.resolveAsScalar = resolveAsScalar;
|
|
13830
14086
|
exports.setScalarValue = setScalarValue;
|
|
13831
14087
|
}));
|
|
13832
|
-
//#endregion
|
|
13833
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/dist/parse/cst-stringify.js
|
|
13834
14088
|
var require_cst_stringify = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
13835
14089
|
/**
|
|
13836
14090
|
* Stringify a CST document, token, or collection item
|
|
@@ -13880,8 +14134,6 @@ var require_cst_stringify = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
13880
14134
|
}
|
|
13881
14135
|
exports.stringify = stringify;
|
|
13882
14136
|
}));
|
|
13883
|
-
//#endregion
|
|
13884
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/dist/parse/cst-visit.js
|
|
13885
14137
|
var require_cst_visit = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
13886
14138
|
const BREAK = Symbol("break visit");
|
|
13887
14139
|
const SKIP = Symbol("skip children");
|
|
@@ -13971,8 +14223,6 @@ var require_cst_visit = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
13971
14223
|
}
|
|
13972
14224
|
exports.visit = visit;
|
|
13973
14225
|
}));
|
|
13974
|
-
//#endregion
|
|
13975
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/dist/parse/cst.js
|
|
13976
14226
|
var require_cst = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
13977
14227
|
var cstScalar = require_cst_scalar();
|
|
13978
14228
|
var cstStringify = require_cst_stringify();
|
|
@@ -14050,8 +14300,6 @@ var require_cst = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
14050
14300
|
exports.prettyToken = prettyToken;
|
|
14051
14301
|
exports.tokenType = tokenType;
|
|
14052
14302
|
}));
|
|
14053
|
-
//#endregion
|
|
14054
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/dist/parse/lexer.js
|
|
14055
14303
|
var require_lexer = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
14056
14304
|
var cst = require_cst();
|
|
14057
14305
|
function isEmpty(ch) {
|
|
@@ -14583,8 +14831,6 @@ var require_lexer = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
14583
14831
|
};
|
|
14584
14832
|
exports.Lexer = Lexer;
|
|
14585
14833
|
}));
|
|
14586
|
-
//#endregion
|
|
14587
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/dist/parse/line-counter.js
|
|
14588
14834
|
var require_line_counter = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
14589
14835
|
/**
|
|
14590
14836
|
* Tracks newlines during parsing in order to provide an efficient API for
|
|
@@ -14630,8 +14876,6 @@ var require_line_counter = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
14630
14876
|
};
|
|
14631
14877
|
exports.LineCounter = LineCounter;
|
|
14632
14878
|
}));
|
|
14633
|
-
//#endregion
|
|
14634
|
-
//#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/dist/parse/parser.js
|
|
14635
14879
|
var require_parser = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
14636
14880
|
var node_process = __require("process");
|
|
14637
14881
|
var cst = require_cst();
|
|
@@ -15384,520 +15628,253 @@ var require_parser = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
15384
15628
|
sep
|
|
15385
15629
|
}]
|
|
15386
15630
|
};
|
|
15387
|
-
this.onKeyLine = true;
|
|
15388
|
-
this.stack[this.stack.length - 1] = map;
|
|
15389
|
-
} else yield* this.lineEnd(fc);
|
|
15390
|
-
}
|
|
15391
|
-
}
|
|
15392
|
-
flowScalar(type) {
|
|
15393
|
-
if (this.onNewLine) {
|
|
15394
|
-
let nl = this.source.indexOf("\n") + 1;
|
|
15395
|
-
while (nl !== 0) {
|
|
15396
|
-
this.onNewLine(this.offset + nl);
|
|
15397
|
-
nl = this.source.indexOf("\n", nl) + 1;
|
|
15398
|
-
}
|
|
15399
|
-
}
|
|
15400
|
-
return {
|
|
15401
|
-
type,
|
|
15402
|
-
offset: this.offset,
|
|
15403
|
-
indent: this.indent,
|
|
15404
|
-
source: this.source
|
|
15405
|
-
};
|
|
15406
|
-
}
|
|
15407
|
-
startBlockValue(parent) {
|
|
15408
|
-
switch (this.type) {
|
|
15409
|
-
case "alias":
|
|
15410
|
-
case "scalar":
|
|
15411
|
-
case "single-quoted-scalar":
|
|
15412
|
-
case "double-quoted-scalar": return this.flowScalar(this.type);
|
|
15413
|
-
case "block-scalar-header": return {
|
|
15414
|
-
type: "block-scalar",
|
|
15415
|
-
offset: this.offset,
|
|
15416
|
-
indent: this.indent,
|
|
15417
|
-
props: [this.sourceToken],
|
|
15418
|
-
source: ""
|
|
15419
|
-
};
|
|
15420
|
-
case "flow-map-start":
|
|
15421
|
-
case "flow-seq-start": return {
|
|
15422
|
-
type: "flow-collection",
|
|
15423
|
-
offset: this.offset,
|
|
15424
|
-
indent: this.indent,
|
|
15425
|
-
start: this.sourceToken,
|
|
15426
|
-
items: [],
|
|
15427
|
-
end: []
|
|
15428
|
-
};
|
|
15429
|
-
case "seq-item-ind": return {
|
|
15430
|
-
type: "block-seq",
|
|
15431
|
-
offset: this.offset,
|
|
15432
|
-
indent: this.indent,
|
|
15433
|
-
items: [{ start: [this.sourceToken] }]
|
|
15434
|
-
};
|
|
15435
|
-
case "explicit-key-ind": {
|
|
15436
|
-
this.onKeyLine = true;
|
|
15437
|
-
const start = getFirstKeyStartProps(getPrevProps(parent));
|
|
15438
|
-
start.push(this.sourceToken);
|
|
15439
|
-
return {
|
|
15440
|
-
type: "block-map",
|
|
15441
|
-
offset: this.offset,
|
|
15442
|
-
indent: this.indent,
|
|
15443
|
-
items: [{
|
|
15444
|
-
start,
|
|
15445
|
-
explicitKey: true
|
|
15446
|
-
}]
|
|
15447
|
-
};
|
|
15448
|
-
}
|
|
15449
|
-
case "map-value-ind": {
|
|
15450
|
-
this.onKeyLine = true;
|
|
15451
|
-
const start = getFirstKeyStartProps(getPrevProps(parent));
|
|
15452
|
-
return {
|
|
15453
|
-
type: "block-map",
|
|
15454
|
-
offset: this.offset,
|
|
15455
|
-
indent: this.indent,
|
|
15456
|
-
items: [{
|
|
15457
|
-
start,
|
|
15458
|
-
key: null,
|
|
15459
|
-
sep: [this.sourceToken]
|
|
15460
|
-
}]
|
|
15461
|
-
};
|
|
15462
|
-
}
|
|
15463
|
-
}
|
|
15464
|
-
return null;
|
|
15465
|
-
}
|
|
15466
|
-
atIndentedComment(start, indent) {
|
|
15467
|
-
if (this.type !== "comment") return false;
|
|
15468
|
-
if (this.indent <= indent) return false;
|
|
15469
|
-
return start.every((st) => st.type === "newline" || st.type === "space");
|
|
15470
|
-
}
|
|
15471
|
-
*documentEnd(docEnd) {
|
|
15472
|
-
if (this.type !== "doc-mode") {
|
|
15473
|
-
if (docEnd.end) docEnd.end.push(this.sourceToken);
|
|
15474
|
-
else docEnd.end = [this.sourceToken];
|
|
15475
|
-
if (this.type === "newline") yield* this.pop();
|
|
15476
|
-
}
|
|
15477
|
-
}
|
|
15478
|
-
*lineEnd(token) {
|
|
15479
|
-
switch (this.type) {
|
|
15480
|
-
case "comma":
|
|
15481
|
-
case "doc-start":
|
|
15482
|
-
case "doc-end":
|
|
15483
|
-
case "flow-seq-end":
|
|
15484
|
-
case "flow-map-end":
|
|
15485
|
-
case "map-value-ind":
|
|
15486
|
-
yield* this.pop();
|
|
15487
|
-
yield* this.step();
|
|
15488
|
-
break;
|
|
15489
|
-
case "newline": this.onKeyLine = false;
|
|
15490
|
-
default:
|
|
15491
|
-
if (token.end) token.end.push(this.sourceToken);
|
|
15492
|
-
else token.end = [this.sourceToken];
|
|
15493
|
-
if (this.type === "newline") yield* this.pop();
|
|
15494
|
-
}
|
|
15495
|
-
}
|
|
15496
|
-
};
|
|
15497
|
-
exports.Parser = Parser;
|
|
15498
|
-
}));
|
|
15499
|
-
|
|
15500
|
-
|
|
15501
|
-
var
|
|
15502
|
-
var
|
|
15503
|
-
var
|
|
15504
|
-
var
|
|
15505
|
-
var
|
|
15506
|
-
var
|
|
15507
|
-
|
|
15508
|
-
|
|
15509
|
-
function parseOptions(options) {
|
|
15510
|
-
const prettyErrors = options.prettyErrors !== false;
|
|
15511
|
-
return {
|
|
15512
|
-
lineCounter: options.lineCounter || prettyErrors && new lineCounter.LineCounter() || null,
|
|
15513
|
-
prettyErrors
|
|
15514
|
-
};
|
|
15515
|
-
}
|
|
15516
|
-
/**
|
|
15517
|
-
* Parse the input as a stream of YAML documents.
|
|
15518
|
-
*
|
|
15519
|
-
* Documents should be separated from each other by `...` or `---` marker lines.
|
|
15520
|
-
*
|
|
15521
|
-
* @returns If an empty `docs` array is returned, it will be of type
|
|
15522
|
-
* EmptyStream and contain additional stream information. In
|
|
15523
|
-
* TypeScript, you should use `'empty' in docs` as a type guard for it.
|
|
15524
|
-
*/
|
|
15525
|
-
function parseAllDocuments(source, options = {}) {
|
|
15526
|
-
const { lineCounter, prettyErrors } = parseOptions(options);
|
|
15527
|
-
const parser$1 = new parser.Parser(lineCounter?.addNewLine);
|
|
15528
|
-
const composer$1 = new composer.Composer(options);
|
|
15529
|
-
const docs = Array.from(composer$1.compose(parser$1.parse(source)));
|
|
15530
|
-
if (prettyErrors && lineCounter) for (const doc of docs) {
|
|
15531
|
-
doc.errors.forEach(errors.prettifyError(source, lineCounter));
|
|
15532
|
-
doc.warnings.forEach(errors.prettifyError(source, lineCounter));
|
|
15533
|
-
}
|
|
15534
|
-
if (docs.length > 0) return docs;
|
|
15535
|
-
return Object.assign([], { empty: true }, composer$1.streamInfo());
|
|
15536
|
-
}
|
|
15537
|
-
/** Parse an input string into a single YAML.Document */
|
|
15538
|
-
function parseDocument(source, options = {}) {
|
|
15539
|
-
const { lineCounter, prettyErrors } = parseOptions(options);
|
|
15540
|
-
const parser$1 = new parser.Parser(lineCounter?.addNewLine);
|
|
15541
|
-
const composer$1 = new composer.Composer(options);
|
|
15542
|
-
let doc = null;
|
|
15543
|
-
for (const _doc of composer$1.compose(parser$1.parse(source), true, source.length)) if (!doc) doc = _doc;
|
|
15544
|
-
else if (doc.options.logLevel !== "silent") {
|
|
15545
|
-
doc.errors.push(new errors.YAMLParseError(_doc.range.slice(0, 2), "MULTIPLE_DOCS", "Source contains multiple documents; please use YAML.parseAllDocuments()"));
|
|
15546
|
-
break;
|
|
15547
|
-
}
|
|
15548
|
-
if (prettyErrors && lineCounter) {
|
|
15549
|
-
doc.errors.forEach(errors.prettifyError(source, lineCounter));
|
|
15550
|
-
doc.warnings.forEach(errors.prettifyError(source, lineCounter));
|
|
15551
|
-
}
|
|
15552
|
-
return doc;
|
|
15553
|
-
}
|
|
15554
|
-
function parse(src, reviver, options) {
|
|
15555
|
-
let _reviver = void 0;
|
|
15556
|
-
if (typeof reviver === "function") _reviver = reviver;
|
|
15557
|
-
else if (options === void 0 && reviver && typeof reviver === "object") options = reviver;
|
|
15558
|
-
const doc = parseDocument(src, options);
|
|
15559
|
-
if (!doc) return null;
|
|
15560
|
-
doc.warnings.forEach((warning) => log.warn(doc.options.logLevel, warning));
|
|
15561
|
-
if (doc.errors.length > 0) {
|
|
15562
|
-
if (doc.options.logLevel !== "silent") throw doc.errors[0];
|
|
15563
|
-
else doc.errors = [];
|
|
15564
|
-
}
|
|
15565
|
-
return doc.toJS(Object.assign({ reviver: _reviver }, options));
|
|
15566
|
-
}
|
|
15567
|
-
function stringify(value, replacer, options) {
|
|
15568
|
-
let _replacer = null;
|
|
15569
|
-
if (typeof replacer === "function" || Array.isArray(replacer)) _replacer = replacer;
|
|
15570
|
-
else if (options === void 0 && replacer) options = replacer;
|
|
15571
|
-
if (typeof options === "string") options = options.length;
|
|
15572
|
-
if (typeof options === "number") {
|
|
15573
|
-
const indent = Math.round(options);
|
|
15574
|
-
options = indent < 1 ? void 0 : indent > 8 ? { indent: 8 } : { indent };
|
|
15575
|
-
}
|
|
15576
|
-
if (value === void 0) {
|
|
15577
|
-
const { keepUndefined } = options ?? replacer ?? {};
|
|
15578
|
-
if (!keepUndefined) return void 0;
|
|
15579
|
-
}
|
|
15580
|
-
if (identity.isDocument(value) && !_replacer) return value.toString(options);
|
|
15581
|
-
return new Document.Document(value, _replacer, options).toString(options);
|
|
15582
|
-
}
|
|
15583
|
-
exports.parse = parse;
|
|
15584
|
-
exports.parseAllDocuments = parseAllDocuments;
|
|
15585
|
-
exports.parseDocument = parseDocument;
|
|
15586
|
-
exports.stringify = stringify;
|
|
15587
|
-
}));
|
|
15588
|
-
(/* @__PURE__ */ __commonJSMin(((exports) => {
|
|
15589
|
-
var composer = require_composer();
|
|
15590
|
-
var Document = require_Document();
|
|
15591
|
-
var Schema = require_Schema();
|
|
15592
|
-
var errors = require_errors();
|
|
15593
|
-
var Alias = require_Alias();
|
|
15594
|
-
var identity = require_identity();
|
|
15595
|
-
var Pair = require_Pair();
|
|
15596
|
-
var Scalar = require_Scalar();
|
|
15597
|
-
var YAMLMap = require_YAMLMap();
|
|
15598
|
-
var YAMLSeq = require_YAMLSeq();
|
|
15599
|
-
require_cst();
|
|
15600
|
-
var lexer = require_lexer();
|
|
15601
|
-
var lineCounter = require_line_counter();
|
|
15602
|
-
var parser = require_parser();
|
|
15603
|
-
var publicApi = require_public_api();
|
|
15604
|
-
var visit = require_visit();
|
|
15605
|
-
exports.Composer = composer.Composer;
|
|
15606
|
-
exports.Document = Document.Document;
|
|
15607
|
-
exports.Schema = Schema.Schema;
|
|
15608
|
-
exports.YAMLError = errors.YAMLError;
|
|
15609
|
-
exports.YAMLParseError = errors.YAMLParseError;
|
|
15610
|
-
exports.YAMLWarning = errors.YAMLWarning;
|
|
15611
|
-
exports.Alias = Alias.Alias;
|
|
15612
|
-
exports.isAlias = identity.isAlias;
|
|
15613
|
-
exports.isCollection = identity.isCollection;
|
|
15614
|
-
exports.isDocument = identity.isDocument;
|
|
15615
|
-
exports.isMap = identity.isMap;
|
|
15616
|
-
exports.isNode = identity.isNode;
|
|
15617
|
-
exports.isPair = identity.isPair;
|
|
15618
|
-
exports.isScalar = identity.isScalar;
|
|
15619
|
-
exports.isSeq = identity.isSeq;
|
|
15620
|
-
exports.Pair = Pair.Pair;
|
|
15621
|
-
exports.Scalar = Scalar.Scalar;
|
|
15622
|
-
exports.YAMLMap = YAMLMap.YAMLMap;
|
|
15623
|
-
exports.YAMLSeq = YAMLSeq.YAMLSeq;
|
|
15624
|
-
exports.Lexer = lexer.Lexer;
|
|
15625
|
-
exports.LineCounter = lineCounter.LineCounter;
|
|
15626
|
-
exports.Parser = parser.Parser;
|
|
15627
|
-
exports.parse = publicApi.parse;
|
|
15628
|
-
exports.parseAllDocuments = publicApi.parseAllDocuments;
|
|
15629
|
-
exports.parseDocument = publicApi.parseDocument;
|
|
15630
|
-
exports.stringify = publicApi.stringify;
|
|
15631
|
-
exports.visit = visit.visit;
|
|
15632
|
-
exports.visitAsync = visit.visitAsync;
|
|
15633
|
-
})))();
|
|
15634
|
-
function resolveHarnessEnvironment(environment = {}) {
|
|
15635
|
-
return {
|
|
15636
|
-
env: environment.env ?? process.env,
|
|
15637
|
-
homedir: environment.homedir ?? homedir(),
|
|
15638
|
-
cwd: environment.cwd ?? process.cwd(),
|
|
15639
|
-
platform: environment.platform ?? process.platform
|
|
15640
|
-
};
|
|
15641
|
-
}
|
|
15642
|
-
/**
|
|
15643
|
-
* Where a harness keeps plugins at the user level. Paths are computed, not checked: a location may
|
|
15644
|
-
* not exist until the first plugin is installed.
|
|
15645
|
-
*/
|
|
15646
|
-
function pluginStorage(harness, environment = {}) {
|
|
15647
|
-
return storages[harness](resolveHarnessEnvironment(environment));
|
|
15648
|
-
}
|
|
15649
|
-
/** `$XDG_CONFIG_HOME`, else `~/.config`, as the `xdg-basedir` package resolves it. */
|
|
15650
|
-
const xdgConfig = ({ env, homedir }) => env.XDG_CONFIG_HOME || join(homedir, ".config");
|
|
15651
|
-
/** The agent plugin folder of the stable VS Code build, per OS (E-VSC-P3). */
|
|
15652
|
-
function vscodeAgentPlugins({ env, homedir, platform }) {
|
|
15653
|
-
if (platform === "win32") {
|
|
15654
|
-
const configDir = win32.join(env.APPDATA || win32.join(homedir, "AppData", "Roaming"), "Code");
|
|
15655
|
-
return {
|
|
15656
|
-
configDir,
|
|
15657
|
-
path: win32.join(configDir, "agentPlugins")
|
|
15658
|
-
};
|
|
15659
|
-
}
|
|
15660
|
-
const configDir = platform === "darwin" ? join(homedir, "Library", "Application Support", "Code") : join(homedir, ".config", "Code");
|
|
15661
|
-
return {
|
|
15662
|
-
configDir,
|
|
15663
|
-
path: join(configDir, "agentPlugins")
|
|
15664
|
-
};
|
|
15665
|
-
}
|
|
15666
|
-
const storages = {
|
|
15667
|
-
"claude-code": ({ env, homedir }) => {
|
|
15668
|
-
const configDir = env.CLAUDE_CONFIG_DIR || join(homedir, ".claude");
|
|
15669
|
-
const plugins = join(configDir, "plugins");
|
|
15670
|
-
return {
|
|
15671
|
-
harness: "claude-code",
|
|
15672
|
-
configDir,
|
|
15673
|
-
locations: [
|
|
15674
|
-
{
|
|
15675
|
-
kind: "plugin-cache",
|
|
15676
|
-
path: join(plugins, "cache"),
|
|
15677
|
-
description: "Installed plugins as <marketplace>/<plugin>/<version>/",
|
|
15678
|
-
research: "E-CC-P1"
|
|
15679
|
-
},
|
|
15680
|
-
{
|
|
15681
|
-
kind: "marketplaces",
|
|
15682
|
-
path: join(plugins, "marketplaces"),
|
|
15683
|
-
description: "Marketplace checkouts",
|
|
15684
|
-
research: "E-CC-P1"
|
|
15685
|
-
},
|
|
15686
|
-
{
|
|
15687
|
-
kind: "install-record",
|
|
15688
|
-
path: join(plugins, "installed_plugins.json"),
|
|
15689
|
-
description: "Installs keyed by plugin@marketplace, each with scope, installPath, and version",
|
|
15690
|
-
research: "E-CC-P2"
|
|
15691
|
-
},
|
|
15692
|
-
{
|
|
15693
|
-
kind: "enabled-record",
|
|
15694
|
-
path: join(configDir, "settings.json"),
|
|
15695
|
-
description: "User settings; enabledPlugins maps plugin@marketplace to a boolean",
|
|
15696
|
-
research: "E-CC-P3"
|
|
15697
|
-
}
|
|
15698
|
-
]
|
|
15699
|
-
};
|
|
15700
|
-
},
|
|
15701
|
-
cursor: ({ homedir }) => {
|
|
15702
|
-
const configDir = join(homedir, ".cursor");
|
|
15703
|
-
return {
|
|
15704
|
-
harness: "cursor",
|
|
15705
|
-
configDir,
|
|
15706
|
-
locations: [{
|
|
15707
|
-
kind: "local-plugins",
|
|
15708
|
-
path: join(configDir, "plugins", "local"),
|
|
15709
|
-
description: "Plugins under development, one folder each",
|
|
15710
|
-
research: "E-CUR-P2"
|
|
15711
|
-
}, {
|
|
15712
|
-
kind: "marketplaces",
|
|
15713
|
-
path: join(configDir, "plugins", "marketplaces"),
|
|
15714
|
-
description: "Marketplace checkouts",
|
|
15715
|
-
research: "E-CUR-P3"
|
|
15716
|
-
}]
|
|
15717
|
-
};
|
|
15718
|
-
},
|
|
15719
|
-
codex: ({ env, homedir }) => {
|
|
15720
|
-
const configDir = env.CODEX_HOME || join(homedir, ".codex");
|
|
15721
|
-
return {
|
|
15722
|
-
harness: "codex",
|
|
15723
|
-
configDir,
|
|
15724
|
-
locations: [{
|
|
15725
|
-
kind: "plugin-cache",
|
|
15726
|
-
path: join(configDir, "plugins", "cache"),
|
|
15727
|
-
description: "Installed plugins as <marketplace>/<plugin>/<version>/",
|
|
15728
|
-
research: "E-CODEX-P3"
|
|
15729
|
-
}, {
|
|
15730
|
-
kind: "enabled-record",
|
|
15731
|
-
path: join(configDir, "config.toml"),
|
|
15732
|
-
description: "User config; [plugins.\"<plugin>@<marketplace>\"] tables carry enabled = <bool>",
|
|
15733
|
-
research: "E-CODEX-P2"
|
|
15734
|
-
}]
|
|
15735
|
-
};
|
|
15736
|
-
},
|
|
15737
|
-
"copilot-cli": ({ env, homedir }) => {
|
|
15738
|
-
const configDir = env.COPILOT_HOME || join(homedir, ".copilot");
|
|
15739
|
-
return {
|
|
15740
|
-
harness: "copilot-cli",
|
|
15741
|
-
configDir,
|
|
15742
|
-
locations: [
|
|
15743
|
-
{
|
|
15744
|
-
kind: "installed-plugins",
|
|
15745
|
-
path: join(configDir, "installed-plugins"),
|
|
15746
|
-
description: "Installed plugins as <marketplace>/<plugin>/, or _direct/<source-id>/ for direct installs",
|
|
15747
|
-
research: "E-COPILOT-P9"
|
|
15748
|
-
},
|
|
15749
|
-
{
|
|
15750
|
-
kind: "install-record",
|
|
15751
|
-
path: join(configDir, "config.json"),
|
|
15752
|
-
description: "Application state, including installedPlugins",
|
|
15753
|
-
research: "E-COPILOT-P9"
|
|
15754
|
-
},
|
|
15755
|
-
{
|
|
15756
|
-
kind: "enabled-record",
|
|
15757
|
-
path: join(configDir, "settings.json"),
|
|
15758
|
-
description: "User settings (JSON with comments); enabledPlugins maps plugin specs to a boolean",
|
|
15759
|
-
research: "E-COPILOT-P4"
|
|
15760
|
-
}
|
|
15761
|
-
]
|
|
15762
|
-
};
|
|
15763
|
-
},
|
|
15764
|
-
opencode: (environment) => {
|
|
15765
|
-
const configDir = join(xdgConfig(environment), "opencode");
|
|
15766
|
-
return {
|
|
15767
|
-
harness: "opencode",
|
|
15768
|
-
configDir,
|
|
15769
|
-
locations: [{
|
|
15770
|
-
kind: "local-plugins",
|
|
15771
|
-
path: join(configDir, "plugins"),
|
|
15772
|
-
description: "JS/TS plugin modules loaded at startup; npm plugins are named in the plugin config array",
|
|
15773
|
-
research: "E-OC-P2"
|
|
15774
|
-
}]
|
|
15775
|
-
};
|
|
15776
|
-
},
|
|
15777
|
-
kilo: (environment) => {
|
|
15778
|
-
const configDir = join(xdgConfig(environment), "kilo");
|
|
15779
|
-
return {
|
|
15780
|
-
harness: "kilo",
|
|
15781
|
-
configDir,
|
|
15782
|
-
locations: [{
|
|
15783
|
-
kind: "local-plugins",
|
|
15784
|
-
path: join(configDir, "plugin"),
|
|
15785
|
-
description: "JS/TS plugin modules loaded at startup; npm plugins are named in the plugin config array",
|
|
15786
|
-
research: "E-KILO-P2"
|
|
15787
|
-
}]
|
|
15788
|
-
};
|
|
15789
|
-
},
|
|
15790
|
-
"gemini-cli": ({ env, homedir }) => {
|
|
15791
|
-
const configDir = join(env.GEMINI_CLI_HOME || homedir, ".gemini");
|
|
15792
|
-
const extensions = join(configDir, "extensions");
|
|
15793
|
-
return {
|
|
15794
|
-
harness: "gemini-cli",
|
|
15795
|
-
configDir,
|
|
15796
|
-
locations: [{
|
|
15797
|
-
kind: "installed-plugins",
|
|
15798
|
-
path: extensions,
|
|
15799
|
-
description: "Installed extensions, one folder each with a gemini-extension.json manifest",
|
|
15800
|
-
research: "E-GEM-P1"
|
|
15801
|
-
}, {
|
|
15802
|
-
kind: "enabled-record",
|
|
15803
|
-
path: join(extensions, "extension-enablement.json"),
|
|
15804
|
-
description: "Per-extension path-glob overrides that enable or disable it by folder, not a boolean",
|
|
15805
|
-
research: "E-GEM-P3"
|
|
15806
|
-
}]
|
|
15807
|
-
};
|
|
15808
|
-
},
|
|
15809
|
-
"qwen-code": ({ env, homedir }) => {
|
|
15810
|
-
const configDir = env.QWEN_HOME || join(homedir, ".qwen");
|
|
15811
|
-
const extensions = join(configDir, "extensions");
|
|
15812
|
-
return {
|
|
15813
|
-
harness: "qwen-code",
|
|
15814
|
-
configDir,
|
|
15815
|
-
locations: [{
|
|
15816
|
-
kind: "installed-plugins",
|
|
15817
|
-
path: extensions,
|
|
15818
|
-
description: "Installed extensions, one folder each with a qwen-extension.json manifest",
|
|
15819
|
-
research: "E-QWEN-P1"
|
|
15820
|
-
}, {
|
|
15821
|
-
kind: "enabled-record",
|
|
15822
|
-
path: join(extensions, "extension-enablement.json"),
|
|
15823
|
-
description: "Extension enable/disable state, inherited from Gemini CLI's format",
|
|
15824
|
-
research: "E-QWEN-P2"
|
|
15825
|
-
}]
|
|
15826
|
-
};
|
|
15827
|
-
},
|
|
15828
|
-
"vscode-copilot": (environment) => {
|
|
15829
|
-
const { configDir, path } = vscodeAgentPlugins(environment);
|
|
15830
|
-
return {
|
|
15831
|
-
harness: "vscode-copilot",
|
|
15832
|
-
configDir,
|
|
15833
|
-
locations: [{
|
|
15834
|
-
kind: "installed-plugins",
|
|
15835
|
-
path,
|
|
15836
|
-
description: "Installed agent plugins as <host>/<org>/<repo>/",
|
|
15837
|
-
research: "E-VSC-P3"
|
|
15838
|
-
}]
|
|
15839
|
-
};
|
|
15840
|
-
},
|
|
15841
|
-
cline: ({ homedir }) => {
|
|
15842
|
-
const configDir = join(homedir, ".cline");
|
|
15843
|
-
return {
|
|
15844
|
-
harness: "cline",
|
|
15845
|
-
configDir,
|
|
15846
|
-
locations: [{
|
|
15847
|
-
kind: "installed-plugins",
|
|
15848
|
-
path: join(configDir, "plugins", "_installed"),
|
|
15849
|
-
description: "Installed plugins, grouped by source: npm, git, remote, or local",
|
|
15850
|
-
research: "E-CLINE-P3"
|
|
15851
|
-
}]
|
|
15852
|
-
};
|
|
15853
|
-
},
|
|
15854
|
-
crush: ({ env, homedir }) => {
|
|
15855
|
-
return {
|
|
15856
|
-
harness: "crush",
|
|
15857
|
-
configDir: env.CRUSH_GLOBAL_CONFIG || join(env.XDG_CONFIG_HOME || join(homedir, ".config"), "crush"),
|
|
15858
|
-
locations: []
|
|
15859
|
-
};
|
|
15860
|
-
},
|
|
15861
|
-
openhands: ({ env, homedir }) => {
|
|
15862
|
-
const configDir = env.OH_PERSISTENCE_DIR || env.OPENHANDS_PERSISTENCE_DIR || join(homedir, ".openhands");
|
|
15863
|
-
const installed = join(configDir, "plugins", "installed");
|
|
15864
|
-
return {
|
|
15865
|
-
harness: "openhands",
|
|
15866
|
-
configDir,
|
|
15867
|
-
locations: [{
|
|
15868
|
-
kind: "installed-plugins",
|
|
15869
|
-
path: installed,
|
|
15870
|
-
description: "Installed plugins, one folder each",
|
|
15871
|
-
research: "E-OH-P3"
|
|
15872
|
-
}, {
|
|
15873
|
-
kind: "enabled-record",
|
|
15874
|
-
path: join(installed, ".installed.json"),
|
|
15875
|
-
description: "Install metadata keyed by plugin name, each with enabled: <bool>",
|
|
15876
|
-
research: "E-OH-P4"
|
|
15877
|
-
}]
|
|
15878
|
-
};
|
|
15879
|
-
},
|
|
15880
|
-
augment: ({ homedir }) => {
|
|
15881
|
-
const configDir = join(homedir, ".augment");
|
|
15631
|
+
this.onKeyLine = true;
|
|
15632
|
+
this.stack[this.stack.length - 1] = map;
|
|
15633
|
+
} else yield* this.lineEnd(fc);
|
|
15634
|
+
}
|
|
15635
|
+
}
|
|
15636
|
+
flowScalar(type) {
|
|
15637
|
+
if (this.onNewLine) {
|
|
15638
|
+
let nl = this.source.indexOf("\n") + 1;
|
|
15639
|
+
while (nl !== 0) {
|
|
15640
|
+
this.onNewLine(this.offset + nl);
|
|
15641
|
+
nl = this.source.indexOf("\n", nl) + 1;
|
|
15642
|
+
}
|
|
15643
|
+
}
|
|
15644
|
+
return {
|
|
15645
|
+
type,
|
|
15646
|
+
offset: this.offset,
|
|
15647
|
+
indent: this.indent,
|
|
15648
|
+
source: this.source
|
|
15649
|
+
};
|
|
15650
|
+
}
|
|
15651
|
+
startBlockValue(parent) {
|
|
15652
|
+
switch (this.type) {
|
|
15653
|
+
case "alias":
|
|
15654
|
+
case "scalar":
|
|
15655
|
+
case "single-quoted-scalar":
|
|
15656
|
+
case "double-quoted-scalar": return this.flowScalar(this.type);
|
|
15657
|
+
case "block-scalar-header": return {
|
|
15658
|
+
type: "block-scalar",
|
|
15659
|
+
offset: this.offset,
|
|
15660
|
+
indent: this.indent,
|
|
15661
|
+
props: [this.sourceToken],
|
|
15662
|
+
source: ""
|
|
15663
|
+
};
|
|
15664
|
+
case "flow-map-start":
|
|
15665
|
+
case "flow-seq-start": return {
|
|
15666
|
+
type: "flow-collection",
|
|
15667
|
+
offset: this.offset,
|
|
15668
|
+
indent: this.indent,
|
|
15669
|
+
start: this.sourceToken,
|
|
15670
|
+
items: [],
|
|
15671
|
+
end: []
|
|
15672
|
+
};
|
|
15673
|
+
case "seq-item-ind": return {
|
|
15674
|
+
type: "block-seq",
|
|
15675
|
+
offset: this.offset,
|
|
15676
|
+
indent: this.indent,
|
|
15677
|
+
items: [{ start: [this.sourceToken] }]
|
|
15678
|
+
};
|
|
15679
|
+
case "explicit-key-ind": {
|
|
15680
|
+
this.onKeyLine = true;
|
|
15681
|
+
const start = getFirstKeyStartProps(getPrevProps(parent));
|
|
15682
|
+
start.push(this.sourceToken);
|
|
15683
|
+
return {
|
|
15684
|
+
type: "block-map",
|
|
15685
|
+
offset: this.offset,
|
|
15686
|
+
indent: this.indent,
|
|
15687
|
+
items: [{
|
|
15688
|
+
start,
|
|
15689
|
+
explicitKey: true
|
|
15690
|
+
}]
|
|
15691
|
+
};
|
|
15692
|
+
}
|
|
15693
|
+
case "map-value-ind": {
|
|
15694
|
+
this.onKeyLine = true;
|
|
15695
|
+
const start = getFirstKeyStartProps(getPrevProps(parent));
|
|
15696
|
+
return {
|
|
15697
|
+
type: "block-map",
|
|
15698
|
+
offset: this.offset,
|
|
15699
|
+
indent: this.indent,
|
|
15700
|
+
items: [{
|
|
15701
|
+
start,
|
|
15702
|
+
key: null,
|
|
15703
|
+
sep: [this.sourceToken]
|
|
15704
|
+
}]
|
|
15705
|
+
};
|
|
15706
|
+
}
|
|
15707
|
+
}
|
|
15708
|
+
return null;
|
|
15709
|
+
}
|
|
15710
|
+
atIndentedComment(start, indent) {
|
|
15711
|
+
if (this.type !== "comment") return false;
|
|
15712
|
+
if (this.indent <= indent) return false;
|
|
15713
|
+
return start.every((st) => st.type === "newline" || st.type === "space");
|
|
15714
|
+
}
|
|
15715
|
+
*documentEnd(docEnd) {
|
|
15716
|
+
if (this.type !== "doc-mode") {
|
|
15717
|
+
if (docEnd.end) docEnd.end.push(this.sourceToken);
|
|
15718
|
+
else docEnd.end = [this.sourceToken];
|
|
15719
|
+
if (this.type === "newline") yield* this.pop();
|
|
15720
|
+
}
|
|
15721
|
+
}
|
|
15722
|
+
*lineEnd(token) {
|
|
15723
|
+
switch (this.type) {
|
|
15724
|
+
case "comma":
|
|
15725
|
+
case "doc-start":
|
|
15726
|
+
case "doc-end":
|
|
15727
|
+
case "flow-seq-end":
|
|
15728
|
+
case "flow-map-end":
|
|
15729
|
+
case "map-value-ind":
|
|
15730
|
+
yield* this.pop();
|
|
15731
|
+
yield* this.step();
|
|
15732
|
+
break;
|
|
15733
|
+
case "newline": this.onKeyLine = false;
|
|
15734
|
+
default:
|
|
15735
|
+
if (token.end) token.end.push(this.sourceToken);
|
|
15736
|
+
else token.end = [this.sourceToken];
|
|
15737
|
+
if (this.type === "newline") yield* this.pop();
|
|
15738
|
+
}
|
|
15739
|
+
}
|
|
15740
|
+
};
|
|
15741
|
+
exports.Parser = Parser;
|
|
15742
|
+
}));
|
|
15743
|
+
var require_public_api = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
15744
|
+
var composer = require_composer();
|
|
15745
|
+
var Document = require_Document();
|
|
15746
|
+
var errors = require_errors();
|
|
15747
|
+
var log = require_log();
|
|
15748
|
+
var identity = require_identity();
|
|
15749
|
+
var lineCounter = require_line_counter();
|
|
15750
|
+
var parser = require_parser();
|
|
15751
|
+
function parseOptions(options) {
|
|
15752
|
+
const prettyErrors = options.prettyErrors !== false;
|
|
15882
15753
|
return {
|
|
15883
|
-
|
|
15884
|
-
|
|
15885
|
-
locations: [{
|
|
15886
|
-
kind: "marketplaces",
|
|
15887
|
-
path: join(configDir, "plugins", "marketplaces"),
|
|
15888
|
-
description: "Marketplace checkouts",
|
|
15889
|
-
research: "E-AUG-P2"
|
|
15890
|
-
}, {
|
|
15891
|
-
kind: "enabled-record",
|
|
15892
|
-
path: join(configDir, "settings.json"),
|
|
15893
|
-
description: "User settings; enabledPlugins maps plugin@marketplace to a boolean",
|
|
15894
|
-
research: "E-AUG-P4"
|
|
15895
|
-
}]
|
|
15754
|
+
lineCounter: options.lineCounter || prettyErrors && new lineCounter.LineCounter() || null,
|
|
15755
|
+
prettyErrors
|
|
15896
15756
|
};
|
|
15897
15757
|
}
|
|
15898
|
-
|
|
15758
|
+
/**
|
|
15759
|
+
* Parse the input as a stream of YAML documents.
|
|
15760
|
+
*
|
|
15761
|
+
* Documents should be separated from each other by `...` or `---` marker lines.
|
|
15762
|
+
*
|
|
15763
|
+
* @returns If an empty `docs` array is returned, it will be of type
|
|
15764
|
+
* EmptyStream and contain additional stream information. In
|
|
15765
|
+
* TypeScript, you should use `'empty' in docs` as a type guard for it.
|
|
15766
|
+
*/
|
|
15767
|
+
function parseAllDocuments(source, options = {}) {
|
|
15768
|
+
const { lineCounter, prettyErrors } = parseOptions(options);
|
|
15769
|
+
const parser$1 = new parser.Parser(lineCounter?.addNewLine);
|
|
15770
|
+
const composer$1 = new composer.Composer(options);
|
|
15771
|
+
const docs = Array.from(composer$1.compose(parser$1.parse(source)));
|
|
15772
|
+
if (prettyErrors && lineCounter) for (const doc of docs) {
|
|
15773
|
+
doc.errors.forEach(errors.prettifyError(source, lineCounter));
|
|
15774
|
+
doc.warnings.forEach(errors.prettifyError(source, lineCounter));
|
|
15775
|
+
}
|
|
15776
|
+
if (docs.length > 0) return docs;
|
|
15777
|
+
return Object.assign([], { empty: true }, composer$1.streamInfo());
|
|
15778
|
+
}
|
|
15779
|
+
/** Parse an input string into a single YAML.Document */
|
|
15780
|
+
function parseDocument(source, options = {}) {
|
|
15781
|
+
const { lineCounter, prettyErrors } = parseOptions(options);
|
|
15782
|
+
const parser$1 = new parser.Parser(lineCounter?.addNewLine);
|
|
15783
|
+
const composer$1 = new composer.Composer(options);
|
|
15784
|
+
let doc = null;
|
|
15785
|
+
for (const _doc of composer$1.compose(parser$1.parse(source), true, source.length)) if (!doc) doc = _doc;
|
|
15786
|
+
else if (doc.options.logLevel !== "silent") {
|
|
15787
|
+
doc.errors.push(new errors.YAMLParseError(_doc.range.slice(0, 2), "MULTIPLE_DOCS", "Source contains multiple documents; please use YAML.parseAllDocuments()"));
|
|
15788
|
+
break;
|
|
15789
|
+
}
|
|
15790
|
+
if (prettyErrors && lineCounter) {
|
|
15791
|
+
doc.errors.forEach(errors.prettifyError(source, lineCounter));
|
|
15792
|
+
doc.warnings.forEach(errors.prettifyError(source, lineCounter));
|
|
15793
|
+
}
|
|
15794
|
+
return doc;
|
|
15795
|
+
}
|
|
15796
|
+
function parse(src, reviver, options) {
|
|
15797
|
+
let _reviver = void 0;
|
|
15798
|
+
if (typeof reviver === "function") _reviver = reviver;
|
|
15799
|
+
else if (options === void 0 && reviver && typeof reviver === "object") options = reviver;
|
|
15800
|
+
const doc = parseDocument(src, options);
|
|
15801
|
+
if (!doc) return null;
|
|
15802
|
+
doc.warnings.forEach((warning) => log.warn(doc.options.logLevel, warning));
|
|
15803
|
+
if (doc.errors.length > 0) {
|
|
15804
|
+
if (doc.options.logLevel !== "silent") throw doc.errors[0];
|
|
15805
|
+
else doc.errors = [];
|
|
15806
|
+
}
|
|
15807
|
+
return doc.toJS(Object.assign({ reviver: _reviver }, options));
|
|
15808
|
+
}
|
|
15809
|
+
function stringify(value, replacer, options) {
|
|
15810
|
+
let _replacer = null;
|
|
15811
|
+
if (typeof replacer === "function" || Array.isArray(replacer)) _replacer = replacer;
|
|
15812
|
+
else if (options === void 0 && replacer) options = replacer;
|
|
15813
|
+
if (typeof options === "string") options = options.length;
|
|
15814
|
+
if (typeof options === "number") {
|
|
15815
|
+
const indent = Math.round(options);
|
|
15816
|
+
options = indent < 1 ? void 0 : indent > 8 ? { indent: 8 } : { indent };
|
|
15817
|
+
}
|
|
15818
|
+
if (value === void 0) {
|
|
15819
|
+
const { keepUndefined } = options ?? replacer ?? {};
|
|
15820
|
+
if (!keepUndefined) return void 0;
|
|
15821
|
+
}
|
|
15822
|
+
if (identity.isDocument(value) && !_replacer) return value.toString(options);
|
|
15823
|
+
return new Document.Document(value, _replacer, options).toString(options);
|
|
15824
|
+
}
|
|
15825
|
+
exports.parse = parse;
|
|
15826
|
+
exports.parseAllDocuments = parseAllDocuments;
|
|
15827
|
+
exports.parseDocument = parseDocument;
|
|
15828
|
+
exports.stringify = stringify;
|
|
15829
|
+
}));
|
|
15830
|
+
(/* @__PURE__ */ __commonJSMin(((exports) => {
|
|
15831
|
+
var composer = require_composer();
|
|
15832
|
+
var Document = require_Document();
|
|
15833
|
+
var Schema = require_Schema();
|
|
15834
|
+
var errors = require_errors();
|
|
15835
|
+
var Alias = require_Alias();
|
|
15836
|
+
var identity = require_identity();
|
|
15837
|
+
var Pair = require_Pair();
|
|
15838
|
+
var Scalar = require_Scalar();
|
|
15839
|
+
var YAMLMap = require_YAMLMap();
|
|
15840
|
+
var YAMLSeq = require_YAMLSeq();
|
|
15841
|
+
require_cst();
|
|
15842
|
+
var lexer = require_lexer();
|
|
15843
|
+
var lineCounter = require_line_counter();
|
|
15844
|
+
var parser = require_parser();
|
|
15845
|
+
var publicApi = require_public_api();
|
|
15846
|
+
var visit = require_visit();
|
|
15847
|
+
exports.Composer = composer.Composer;
|
|
15848
|
+
exports.Document = Document.Document;
|
|
15849
|
+
exports.Schema = Schema.Schema;
|
|
15850
|
+
exports.YAMLError = errors.YAMLError;
|
|
15851
|
+
exports.YAMLParseError = errors.YAMLParseError;
|
|
15852
|
+
exports.YAMLWarning = errors.YAMLWarning;
|
|
15853
|
+
exports.Alias = Alias.Alias;
|
|
15854
|
+
exports.isAlias = identity.isAlias;
|
|
15855
|
+
exports.isCollection = identity.isCollection;
|
|
15856
|
+
exports.isDocument = identity.isDocument;
|
|
15857
|
+
exports.isMap = identity.isMap;
|
|
15858
|
+
exports.isNode = identity.isNode;
|
|
15859
|
+
exports.isPair = identity.isPair;
|
|
15860
|
+
exports.isScalar = identity.isScalar;
|
|
15861
|
+
exports.isSeq = identity.isSeq;
|
|
15862
|
+
exports.Pair = Pair.Pair;
|
|
15863
|
+
exports.Scalar = Scalar.Scalar;
|
|
15864
|
+
exports.YAMLMap = YAMLMap.YAMLMap;
|
|
15865
|
+
exports.YAMLSeq = YAMLSeq.YAMLSeq;
|
|
15866
|
+
exports.Lexer = lexer.Lexer;
|
|
15867
|
+
exports.LineCounter = lineCounter.LineCounter;
|
|
15868
|
+
exports.Parser = parser.Parser;
|
|
15869
|
+
exports.parse = publicApi.parse;
|
|
15870
|
+
exports.parseAllDocuments = publicApi.parseAllDocuments;
|
|
15871
|
+
exports.parseDocument = publicApi.parseDocument;
|
|
15872
|
+
exports.stringify = publicApi.stringify;
|
|
15873
|
+
exports.visit = visit.visit;
|
|
15874
|
+
exports.visitAsync = visit.visitAsync;
|
|
15875
|
+
})))();
|
|
15899
15876
|
//#endregion
|
|
15900
|
-
//#region ../../node_modules/.pnpm/@cyberuni+agent-harness@0.
|
|
15877
|
+
//#region ../../node_modules/.pnpm/@cyberuni+agent-harness@0.7.0/node_modules/@cyberuni/agent-harness/dist/index.js
|
|
15901
15878
|
const harnessIds = [
|
|
15902
15879
|
"claude-code",
|
|
15903
15880
|
"cursor",
|