@ariestools/toolchain 9.1.0 → 9.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/actions/gitlint.d.ts.map +1 -1
- package/dist/actions/gitlintIgnore.d.ts +19 -0
- package/dist/actions/gitlintIgnore.d.ts.map +1 -0
- package/dist/actions/index.d.ts +1 -0
- package/dist/actions/index.d.ts.map +1 -1
- package/dist/actions/skills/defaults.d.ts +16 -2
- package/dist/actions/skills/defaults.d.ts.map +1 -1
- package/dist/actions/skills/index.d.ts +1 -1
- package/dist/actions/skills/index.d.ts.map +1 -1
- package/dist/actions/skills/lint.d.ts +7 -0
- package/dist/actions/skills/lint.d.ts.map +1 -1
- package/dist/actions/skills/lock.d.ts +22 -0
- package/dist/actions/skills/lock.d.ts.map +1 -0
- package/dist/actions/skills/passthrough.d.ts.map +1 -1
- package/dist/actions/skills/skillRules.d.ts +2 -2
- package/dist/actions/skills/skillRules.d.ts.map +1 -1
- package/dist/bin/package/build.mjs +23 -23
- package/dist/bin/package/build.mjs.map +1 -1
- package/dist/bin/package/publint.mjs +23 -23
- package/dist/bin/package/publint.mjs.map +1 -1
- package/dist/bin/skills.mjs +336 -141
- package/dist/bin/skills.mjs.map +1 -1
- package/dist/bin/xy.mjs +337 -162
- package/dist/bin/xy.mjs.map +1 -1
- package/dist/xy/common/skills/index.d.ts.map +1 -1
- package/package.json +12 -12
- package/templates/gitignore/gitignore/template.gitignore +12 -11
- package/templates/gitignore/template.gitignore +12 -11
package/dist/bin/xy.mjs
CHANGED
|
@@ -10635,7 +10635,7 @@ In-flight workspace loads — concurrent jobs for the same dir share one search.
|
|
|
10635
10635
|
*/
|
|
10636
10636
|
const workspaceConfigLoadPromises = /* @__PURE__ */ new Map();
|
|
10637
10637
|
const deprecationWarned = /* @__PURE__ */ new Set();
|
|
10638
|
-
function isRecord$
|
|
10638
|
+
function isRecord$11(value) {
|
|
10639
10639
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
10640
10640
|
}
|
|
10641
10641
|
const explorerState = {};
|
|
@@ -10716,12 +10716,12 @@ function warnOnce(key, message) {
|
|
|
10716
10716
|
*/
|
|
10717
10717
|
function resolveCommandField(cfg, commandName, configPath) {
|
|
10718
10718
|
const configKey = canonicalRuleConfigKey(commandName);
|
|
10719
|
-
const commands = isRecord$
|
|
10719
|
+
const commands = isRecord$11(cfg.commands) ? cfg.commands : void 0;
|
|
10720
10720
|
const fromCommands = commands?.[configKey];
|
|
10721
|
-
if (isRecord$
|
|
10721
|
+
if (isRecord$11(fromCommands)) return fromCommands;
|
|
10722
10722
|
for (const alias of deprecatedRuleConfigAliases(configKey)) {
|
|
10723
10723
|
const fromAlias = commands?.[alias];
|
|
10724
|
-
if (!isRecord$
|
|
10724
|
+
if (!isRecord$11(fromAlias)) continue;
|
|
10725
10725
|
warnOnce(`${configPath ?? "unknown"}:commands.${alias}`, `[xy] Deprecated: "commands.${alias}" in ${configPath ?? "xy.config"} — use "commands.${configKey}"`);
|
|
10726
10726
|
return fromAlias;
|
|
10727
10727
|
}
|
|
@@ -10733,7 +10733,7 @@ function resolveCommandField(cfg, commandName, configPath) {
|
|
|
10733
10733
|
return {};
|
|
10734
10734
|
}
|
|
10735
10735
|
function mergeRuleConfigs(target, source) {
|
|
10736
|
-
if (isRecord$
|
|
10736
|
+
if (isRecord$11(target) && isRecord$11(source)) return {
|
|
10737
10737
|
...target,
|
|
10738
10738
|
...source
|
|
10739
10739
|
};
|
|
@@ -19474,7 +19474,7 @@ const SEVERITIES = /* @__PURE__ */ new Set([
|
|
|
19474
19474
|
]);
|
|
19475
19475
|
const SCOPES = /* @__PURE__ */ new Set(["development", "runtime"]);
|
|
19476
19476
|
const RELATIONSHIPS = /* @__PURE__ */ new Set(["direct", "transitive"]);
|
|
19477
|
-
function isRecord$
|
|
19477
|
+
function isRecord$10(value) {
|
|
19478
19478
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
19479
19479
|
}
|
|
19480
19480
|
function readString(value) {
|
|
@@ -19493,13 +19493,13 @@ function readRelationship(value) {
|
|
|
19493
19493
|
return RELATIONSHIPS.has(raw) ? raw : "unknown";
|
|
19494
19494
|
}
|
|
19495
19495
|
function parseDependabotAlert(raw) {
|
|
19496
|
-
if (!isRecord$
|
|
19497
|
-
const dependency = isRecord$
|
|
19498
|
-
const dependencyPackage = isRecord$
|
|
19499
|
-
const advisory = isRecord$
|
|
19500
|
-
const vulnerability = isRecord$
|
|
19501
|
-
const patched = isRecord$
|
|
19502
|
-
const repository = isRecord$
|
|
19496
|
+
if (!isRecord$10(raw)) return void 0;
|
|
19497
|
+
const dependency = isRecord$10(raw.dependency) ? raw.dependency : {};
|
|
19498
|
+
const dependencyPackage = isRecord$10(dependency.package) ? dependency.package : {};
|
|
19499
|
+
const advisory = isRecord$10(raw.security_advisory) ? raw.security_advisory : {};
|
|
19500
|
+
const vulnerability = isRecord$10(raw.security_vulnerability) ? raw.security_vulnerability : {};
|
|
19501
|
+
const patched = isRecord$10(vulnerability.first_patched_version) ? vulnerability.first_patched_version : {};
|
|
19502
|
+
const repository = isRecord$10(raw.repository) ? raw.repository : {};
|
|
19503
19503
|
const packageName = readString(dependencyPackage.name);
|
|
19504
19504
|
if (packageName.length === 0) return void 0;
|
|
19505
19505
|
const patchedVersion = readString(patched.identifier);
|
|
@@ -20532,13 +20532,13 @@ async function fetchAllRegistryInfo(packageNames, options = {}) {
|
|
|
20532
20532
|
return await fetchAllRegistryInfoDirect(packageNames, options);
|
|
20533
20533
|
}
|
|
20534
20534
|
//#endregion
|
|
20535
|
-
//#region ../../node_modules/.pnpm/@inquirer+core@
|
|
20535
|
+
//#region ../../node_modules/.pnpm/@inquirer+core@12.0.0_@types+node@26.2.0/node_modules/@inquirer/core/dist/lib/key.js
|
|
20536
20536
|
const isUpKey = (key, keybindings = []) => key.name === "up" || keybindings.includes("vim") && key.name === "k" || keybindings.includes("emacs") && key.ctrl && key.name === "p";
|
|
20537
20537
|
const isDownKey = (key, keybindings = []) => key.name === "down" || keybindings.includes("vim") && key.name === "j" || keybindings.includes("emacs") && key.ctrl && key.name === "n";
|
|
20538
20538
|
const isSpaceKey = (key) => key.name === "space";
|
|
20539
20539
|
const isEnterKey = (key) => key.name === "enter" || key.name === "return";
|
|
20540
20540
|
//#endregion
|
|
20541
|
-
//#region ../../node_modules/.pnpm/@inquirer+core@
|
|
20541
|
+
//#region ../../node_modules/.pnpm/@inquirer+core@12.0.0_@types+node@26.2.0/node_modules/@inquirer/core/dist/lib/errors.js
|
|
20542
20542
|
var AbortPromptError = class extends Error {
|
|
20543
20543
|
name = "AbortPromptError";
|
|
20544
20544
|
message = "Prompt was aborted";
|
|
@@ -20561,7 +20561,7 @@ var ValidationError = class extends Error {
|
|
|
20561
20561
|
name = "ValidationError";
|
|
20562
20562
|
};
|
|
20563
20563
|
//#endregion
|
|
20564
|
-
//#region ../../node_modules/.pnpm/@inquirer+core@
|
|
20564
|
+
//#region ../../node_modules/.pnpm/@inquirer+core@12.0.0_@types+node@26.2.0/node_modules/@inquirer/core/dist/lib/hook-engine.js
|
|
20565
20565
|
const hookStorage = new AsyncLocalStorage();
|
|
20566
20566
|
function createStore(rl) {
|
|
20567
20567
|
return {
|
|
@@ -20657,15 +20657,20 @@ const effectScheduler = {
|
|
|
20657
20657
|
}
|
|
20658
20658
|
};
|
|
20659
20659
|
//#endregion
|
|
20660
|
-
//#region ../../node_modules/.pnpm/@inquirer+core@
|
|
20660
|
+
//#region ../../node_modules/.pnpm/@inquirer+core@12.0.0_@types+node@26.2.0/node_modules/@inquirer/core/dist/lib/use-state.js
|
|
20661
20661
|
function isFactory(value) {
|
|
20662
20662
|
return typeof value === "function";
|
|
20663
20663
|
}
|
|
20664
|
+
function isReducer(value) {
|
|
20665
|
+
return typeof value === "function";
|
|
20666
|
+
}
|
|
20664
20667
|
function useState(defaultValue) {
|
|
20665
20668
|
return withPointer((pointer) => {
|
|
20666
20669
|
const setState = AsyncResource.bind(function setState(newValue) {
|
|
20667
|
-
|
|
20668
|
-
|
|
20670
|
+
const currentValue = pointer.get();
|
|
20671
|
+
const nextValue = isReducer(newValue) ? newValue(currentValue) : newValue;
|
|
20672
|
+
if (!Object.is(currentValue, nextValue)) {
|
|
20673
|
+
pointer.set(nextValue);
|
|
20669
20674
|
handleChange();
|
|
20670
20675
|
}
|
|
20671
20676
|
});
|
|
@@ -20676,7 +20681,7 @@ function useState(defaultValue) {
|
|
|
20676
20681
|
});
|
|
20677
20682
|
}
|
|
20678
20683
|
//#endregion
|
|
20679
|
-
//#region ../../node_modules/.pnpm/@inquirer+core@
|
|
20684
|
+
//#region ../../node_modules/.pnpm/@inquirer+core@12.0.0_@types+node@26.2.0/node_modules/@inquirer/core/dist/lib/use-effect.js
|
|
20680
20685
|
function useEffect(cb, depArray) {
|
|
20681
20686
|
withPointer((pointer) => {
|
|
20682
20687
|
const oldDeps = pointer.get();
|
|
@@ -20685,12 +20690,12 @@ function useEffect(cb, depArray) {
|
|
|
20685
20690
|
});
|
|
20686
20691
|
}
|
|
20687
20692
|
//#endregion
|
|
20688
|
-
//#region ../../node_modules/.pnpm/@inquirer+core@
|
|
20693
|
+
//#region ../../node_modules/.pnpm/@inquirer+core@12.0.0_@types+node@26.2.0/node_modules/@inquirer/core/dist/lib/use-ref.js
|
|
20689
20694
|
function useRef(val) {
|
|
20690
20695
|
return useState({ current: val })[0];
|
|
20691
20696
|
}
|
|
20692
20697
|
//#endregion
|
|
20693
|
-
//#region ../../node_modules/.pnpm/@inquirer+core@
|
|
20698
|
+
//#region ../../node_modules/.pnpm/@inquirer+core@12.0.0_@types+node@26.2.0/node_modules/@inquirer/core/dist/lib/use-keypress.js
|
|
20694
20699
|
function useKeypress(userHandler) {
|
|
20695
20700
|
const signal = useRef(userHandler);
|
|
20696
20701
|
signal.current = userHandler;
|
|
@@ -21018,7 +21023,7 @@ function wrapAnsi$1(string, columns, options) {
|
|
|
21018
21023
|
return String(string).normalize().split(CRLF_OR_LF).map((line) => exec$2(line, columns, options)).join("\n");
|
|
21019
21024
|
}
|
|
21020
21025
|
//#endregion
|
|
21021
|
-
//#region ../../node_modules/.pnpm/@inquirer+core@
|
|
21026
|
+
//#region ../../node_modules/.pnpm/@inquirer+core@12.0.0_@types+node@26.2.0/node_modules/@inquirer/core/dist/lib/utils.js
|
|
21022
21027
|
var import_cli_width = /* @__PURE__ */ __toESM(require_cli_width(), 1);
|
|
21023
21028
|
/**
|
|
21024
21029
|
* Force line returns at specific width. This function is ANSI code friendly and it'll
|
|
@@ -21358,7 +21363,7 @@ const eraseLine = "\x1B[2K";
|
|
|
21358
21363
|
/** Erase the specified number of lines above the cursor */
|
|
21359
21364
|
const eraseLines = (lines) => lines > 0 ? (eraseLine + cursorUp(1)).repeat(lines - 1) + "\x1B[2K\x1B[G" : "";
|
|
21360
21365
|
//#endregion
|
|
21361
|
-
//#region ../../node_modules/.pnpm/@inquirer+core@
|
|
21366
|
+
//#region ../../node_modules/.pnpm/@inquirer+core@12.0.0_@types+node@26.2.0/node_modules/@inquirer/core/dist/lib/screen-manager.js
|
|
21362
21367
|
const height = (content) => content.split("\n").length;
|
|
21363
21368
|
const lastLine = (content) => content.split("\n").pop() ?? "";
|
|
21364
21369
|
var ScreenManager = class {
|
|
@@ -21415,7 +21420,7 @@ var ScreenManager = class {
|
|
|
21415
21420
|
}
|
|
21416
21421
|
};
|
|
21417
21422
|
//#endregion
|
|
21418
|
-
//#region ../../node_modules/.pnpm/@inquirer+core@
|
|
21423
|
+
//#region ../../node_modules/.pnpm/@inquirer+core@12.0.0_@types+node@26.2.0/node_modules/@inquirer/core/dist/lib/promise-polyfill.js
|
|
21419
21424
|
var PromisePolyfill = class extends Promise {
|
|
21420
21425
|
static withResolver() {
|
|
21421
21426
|
let resolve;
|
|
@@ -21431,7 +21436,7 @@ var PromisePolyfill = class extends Promise {
|
|
|
21431
21436
|
}
|
|
21432
21437
|
};
|
|
21433
21438
|
//#endregion
|
|
21434
|
-
//#region ../../node_modules/.pnpm/@inquirer+core@
|
|
21439
|
+
//#region ../../node_modules/.pnpm/@inquirer+core@12.0.0_@types+node@26.2.0/node_modules/@inquirer/core/dist/lib/create-prompt.js
|
|
21435
21440
|
var import_lib = /* @__PURE__ */ __toESM(require_lib(), 1);
|
|
21436
21441
|
const nativeSetImmediate = globalThis.setImmediate;
|
|
21437
21442
|
function getCallSites() {
|
|
@@ -23063,7 +23068,7 @@ const RULE_LEVELS$2 = /* @__PURE__ */ new Set([
|
|
|
23063
23068
|
"off",
|
|
23064
23069
|
"warn"
|
|
23065
23070
|
]);
|
|
23066
|
-
function isRecord$
|
|
23071
|
+
function isRecord$9(value) {
|
|
23067
23072
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
23068
23073
|
}
|
|
23069
23074
|
function isValidWeight(value) {
|
|
@@ -23080,7 +23085,7 @@ function parseTupleRuleSetting(location, setting) {
|
|
|
23080
23085
|
if (setting.length !== 2) throw new TypeError(`${location} tuple must be [level, options]`);
|
|
23081
23086
|
const [level, options] = setting;
|
|
23082
23087
|
if (!isRuleLevel$5(level)) throw new TypeError(`${location} level must be "error", "warn", or "off"`);
|
|
23083
|
-
if (!isRecord$
|
|
23088
|
+
if (!isRecord$9(options)) throw new TypeError(`${location} options must be an object`);
|
|
23084
23089
|
return {
|
|
23085
23090
|
enabled: level !== "off",
|
|
23086
23091
|
level,
|
|
@@ -23113,7 +23118,7 @@ function parseRuleSetting(location, setting) {
|
|
|
23113
23118
|
weight: parseWeight(location, setting)
|
|
23114
23119
|
};
|
|
23115
23120
|
if (Array.isArray(setting)) return parseTupleRuleSetting(location, setting);
|
|
23116
|
-
if (isRecord$
|
|
23121
|
+
if (isRecord$9(setting)) return parseObjectRuleSetting(location, setting);
|
|
23117
23122
|
throw new TypeError(`${location} must be a boolean, rule level, number, "infinite", [level, options], or { enabled?, level?, weight? } object`);
|
|
23118
23123
|
}
|
|
23119
23124
|
function validateRuleIds(location, rules) {
|
|
@@ -26424,11 +26429,11 @@ function applyPackageEditsToTsSource(text, edits) {
|
|
|
26424
26429
|
}
|
|
26425
26430
|
return result;
|
|
26426
26431
|
}
|
|
26427
|
-
function isRecord$
|
|
26432
|
+
function isRecord$8(value) {
|
|
26428
26433
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
26429
26434
|
}
|
|
26430
26435
|
function readJsonPackageConfig(value) {
|
|
26431
|
-
if (!isRecord$
|
|
26436
|
+
if (!isRecord$8(value)) return void 0;
|
|
26432
26437
|
const config = {};
|
|
26433
26438
|
if (typeof value.placement === "string") config.placement = value.placement;
|
|
26434
26439
|
if (typeof value.presence === "string") config.presence = value.presence;
|
|
@@ -26437,10 +26442,10 @@ function readJsonPackageConfig(value) {
|
|
|
26437
26442
|
return config;
|
|
26438
26443
|
}
|
|
26439
26444
|
function resolveJsonDeplintObject(root) {
|
|
26440
|
-
const commands = isRecord$
|
|
26441
|
-
if (commands !== void 0 && isRecord$
|
|
26442
|
-
if (isRecord$
|
|
26443
|
-
if (!isRecord$
|
|
26445
|
+
const commands = isRecord$8(root.commands) ? root.commands : void 0;
|
|
26446
|
+
if (commands !== void 0 && isRecord$8(commands.deplint)) return commands.deplint;
|
|
26447
|
+
if (isRecord$8(root.deplint)) return root.deplint;
|
|
26448
|
+
if (!isRecord$8(root.commands)) root.commands = {};
|
|
26444
26449
|
const cmds = root.commands;
|
|
26445
26450
|
const deplint = {};
|
|
26446
26451
|
cmds.deplint = deplint;
|
|
@@ -26453,7 +26458,7 @@ function applyPackageEditsToJsonSource(text, edits) {
|
|
|
26453
26458
|
if (edits.length === 0) return text;
|
|
26454
26459
|
const root = JSON.parse(text);
|
|
26455
26460
|
const deplint = resolveJsonDeplintObject(root);
|
|
26456
|
-
const packages = isRecord$
|
|
26461
|
+
const packages = isRecord$8(deplint.packages) ? deplint.packages : deplint.packages = {};
|
|
26457
26462
|
for (const edit of edits) if (edit.config === void 0) delete packages[edit.dependency];
|
|
26458
26463
|
else packages[edit.dependency] = edit.config;
|
|
26459
26464
|
if (Object.keys(packages).length === 0) delete deplint.packages;
|
|
@@ -26488,9 +26493,9 @@ function readPackagesFromConfigFile(configPath) {
|
|
|
26488
26493
|
const result = /* @__PURE__ */ new Map();
|
|
26489
26494
|
if (isJsonConfigPath$1(configPath)) try {
|
|
26490
26495
|
const root = JSON.parse(text);
|
|
26491
|
-
const commands = isRecord$
|
|
26492
|
-
const deplint = commands !== void 0 && isRecord$
|
|
26493
|
-
const packages = deplint !== void 0 && isRecord$
|
|
26496
|
+
const commands = isRecord$8(root.commands) ? root.commands : void 0;
|
|
26497
|
+
const deplint = commands !== void 0 && isRecord$8(commands.deplint) ? commands.deplint : isRecord$8(root.deplint) ? root.deplint : void 0;
|
|
26498
|
+
const packages = deplint !== void 0 && isRecord$8(deplint.packages) ? deplint.packages : void 0;
|
|
26494
26499
|
if (packages === void 0) return result;
|
|
26495
26500
|
for (const [name, value] of Object.entries(packages)) {
|
|
26496
26501
|
const config = readJsonPackageConfig(value);
|
|
@@ -26836,7 +26841,7 @@ const BUILT_IN_RULE_OPTION_KEYS = {
|
|
|
26836
26841
|
]),
|
|
26837
26842
|
"dep.workspace.protocol": /* @__PURE__ */ new Set(["ignore", "protocol"])
|
|
26838
26843
|
};
|
|
26839
|
-
function isRecord$
|
|
26844
|
+
function isRecord$7(value) {
|
|
26840
26845
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
26841
26846
|
}
|
|
26842
26847
|
function isRuleLevel$4(value) {
|
|
@@ -26873,7 +26878,7 @@ function parseRuleConfig$1(ruleId, value) {
|
|
|
26873
26878
|
const level = value[0];
|
|
26874
26879
|
if (!isRuleLevel$4(level)) throw new TypeError(`${formatRuleConfigLocation$1(ruleId)} level must be one of "off", "warn", or "error"`);
|
|
26875
26880
|
const options = value[1];
|
|
26876
|
-
if (!isRecord$
|
|
26881
|
+
if (!isRecord$7(options)) throw new TypeError(`${formatRuleConfigLocation$1(ruleId)} options must be an object`);
|
|
26877
26882
|
return {
|
|
26878
26883
|
level,
|
|
26879
26884
|
options: { ...options }
|
|
@@ -34254,7 +34259,7 @@ function formatExportPath$1(pathParts) {
|
|
|
34254
34259
|
function ensureExportsPath$1(value) {
|
|
34255
34260
|
return value.startsWith("./") ? value : `./${value}`;
|
|
34256
34261
|
}
|
|
34257
|
-
function isRecord$
|
|
34262
|
+
function isRecord$6(value) {
|
|
34258
34263
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
34259
34264
|
}
|
|
34260
34265
|
function normalizeTarget(target) {
|
|
@@ -34291,7 +34296,7 @@ function collectExportLeaves(value, subpath = ".", pathParts = ["exports"], cond
|
|
|
34291
34296
|
}];
|
|
34292
34297
|
}
|
|
34293
34298
|
if (Array.isArray(value)) return value.flatMap((entry, index) => collectExportLeaves(entry, subpath, [...pathParts, `[${index}]`], conditionPath));
|
|
34294
|
-
if (!isRecord$
|
|
34299
|
+
if (!isRecord$6(value)) return [];
|
|
34295
34300
|
return Object.entries(value).flatMap(([key, nested]) => {
|
|
34296
34301
|
if (isSubpathExportKey$1(key)) return collectExportLeaves(nested, key, [...pathParts, key], conditionPath);
|
|
34297
34302
|
return collectExportLeaves(nested, subpath, [...pathParts, key], [...conditionPath, key]);
|
|
@@ -34389,14 +34394,14 @@ function shouldNormalizeExportsForFix(pkg) {
|
|
|
34389
34394
|
pkg.exports = { ".": pkg.exports };
|
|
34390
34395
|
return true;
|
|
34391
34396
|
}
|
|
34392
|
-
if (isRecord$
|
|
34397
|
+
if (isRecord$6(pkg.exports) && !hasSubpathKeys(pkg.exports)) {
|
|
34393
34398
|
pkg.exports = { ".": pkg.exports };
|
|
34394
34399
|
return true;
|
|
34395
34400
|
}
|
|
34396
34401
|
return false;
|
|
34397
34402
|
}
|
|
34398
34403
|
function isRecordObject(value) {
|
|
34399
|
-
return isRecord$
|
|
34404
|
+
return isRecord$6(value);
|
|
34400
34405
|
}
|
|
34401
34406
|
function ensureSubpath(exports, subpath) {
|
|
34402
34407
|
const existing = exports[subpath];
|
|
@@ -35283,7 +35288,7 @@ var init_main = __esmMin((() => {
|
|
|
35283
35288
|
exec$1 = x;
|
|
35284
35289
|
}));
|
|
35285
35290
|
//#endregion
|
|
35286
|
-
//#region ../../node_modules/.pnpm/@publint+pack@0.1.
|
|
35291
|
+
//#region ../../node_modules/.pnpm/@publint+pack@0.1.7/node_modules/@publint/pack/src/node/utils.js
|
|
35287
35292
|
/**
|
|
35288
35293
|
* @param {string} packageManager
|
|
35289
35294
|
* @returns {string[]}
|
|
@@ -35306,7 +35311,7 @@ async function getTempPackDir() {
|
|
|
35306
35311
|
}
|
|
35307
35312
|
var init_utils$2 = __esmMin((() => {}));
|
|
35308
35313
|
//#endregion
|
|
35309
|
-
//#region ../../node_modules/.pnpm/@publint+pack@0.1.
|
|
35314
|
+
//#region ../../node_modules/.pnpm/@publint+pack@0.1.7/node_modules/@publint/pack/src/node/pack.js
|
|
35310
35315
|
/** @type {import('../index.d.ts').pack} */
|
|
35311
35316
|
async function pack(dir, opts) {
|
|
35312
35317
|
const packageManager = opts?.packageManager ?? "npm";
|
|
@@ -35344,7 +35349,7 @@ var init_pack = __esmMin((() => {
|
|
|
35344
35349
|
init_utils$2();
|
|
35345
35350
|
}));
|
|
35346
35351
|
//#endregion
|
|
35347
|
-
//#region ../../node_modules/.pnpm/@publint+pack@0.1.
|
|
35352
|
+
//#region ../../node_modules/.pnpm/@publint+pack@0.1.7/node_modules/@publint/pack/src/node/pack-as-json.js
|
|
35348
35353
|
/** @type {import('../index.d.ts').packAsJson} */
|
|
35349
35354
|
async function packAsJson(dir, opts) {
|
|
35350
35355
|
const packageManager = opts?.packageManager ?? "npm";
|
|
@@ -35403,7 +35408,7 @@ var init_pack_as_json = __esmMin((() => {
|
|
|
35403
35408
|
init_utils$2();
|
|
35404
35409
|
}));
|
|
35405
35410
|
//#endregion
|
|
35406
|
-
//#region ../../node_modules/.pnpm/@publint+pack@0.1.
|
|
35411
|
+
//#region ../../node_modules/.pnpm/@publint+pack@0.1.7/node_modules/@publint/pack/src/shared/buffer-stream.js
|
|
35407
35412
|
/**
|
|
35408
35413
|
* @param {ReadableStream<Uint8Array>} readableStream
|
|
35409
35414
|
* @returns {Promise<ArrayBuffer>}
|
|
@@ -35413,7 +35418,7 @@ async function readableStreamToArrayBuffer(readableStream) {
|
|
|
35413
35418
|
}
|
|
35414
35419
|
var init_buffer_stream = __esmMin((() => {}));
|
|
35415
35420
|
//#endregion
|
|
35416
|
-
//#region ../../node_modules/.pnpm/@publint+pack@0.1.
|
|
35421
|
+
//#region ../../node_modules/.pnpm/@publint+pack@0.1.7/node_modules/@publint/pack/src/shared/parse-tar.js
|
|
35417
35422
|
/**
|
|
35418
35423
|
* @param {ArrayBuffer} buffer
|
|
35419
35424
|
* @returns {import('../index.d.ts').TarballFile[]}
|
|
@@ -35423,11 +35428,11 @@ function parseTar(buffer) {
|
|
|
35423
35428
|
/** @type {import('../index.d.ts').TarballFile[]} */
|
|
35424
35429
|
const files = [];
|
|
35425
35430
|
let offset = 0;
|
|
35426
|
-
while (offset
|
|
35427
|
-
const type = read(buffer, decoder, offset + 156, 1);
|
|
35428
|
-
if (type === "\0") break;
|
|
35431
|
+
while (offset + 512 <= buffer.byteLength) {
|
|
35429
35432
|
const size = parseInt(read(buffer, decoder, offset + 124, 12), 8);
|
|
35430
|
-
if (
|
|
35433
|
+
if (Number.isNaN(size)) break;
|
|
35434
|
+
const type = read(buffer, decoder, offset + 156, 1);
|
|
35435
|
+
if (type === "0" || type === "\0") {
|
|
35431
35436
|
const name = read(buffer, decoder, offset, 100).split("\0", 1)[0];
|
|
35432
35437
|
const data = new Uint8Array(buffer, offset + 512, size);
|
|
35433
35438
|
files.push({
|
|
@@ -35457,7 +35462,7 @@ function getFilesRootDir(files) {
|
|
|
35457
35462
|
}
|
|
35458
35463
|
var init_parse_tar = __esmMin((() => {}));
|
|
35459
35464
|
//#endregion
|
|
35460
|
-
//#region ../../node_modules/.pnpm/@publint+pack@0.1.
|
|
35465
|
+
//#region ../../node_modules/.pnpm/@publint+pack@0.1.7/node_modules/@publint/pack/src/node/unpack.js
|
|
35461
35466
|
/** @type {import('../index.d.ts').unpack} */
|
|
35462
35467
|
async function unpack(tarball) {
|
|
35463
35468
|
/** @type {ArrayBuffer} */
|
|
@@ -35478,7 +35483,7 @@ var init_unpack = __esmMin((() => {
|
|
|
35478
35483
|
init_parse_tar();
|
|
35479
35484
|
}));
|
|
35480
35485
|
//#endregion
|
|
35481
|
-
//#region ../../node_modules/.pnpm/@publint+pack@0.1.
|
|
35486
|
+
//#region ../../node_modules/.pnpm/@publint+pack@0.1.7/node_modules/@publint/pack/src/node/pack-as-list.js
|
|
35482
35487
|
/** @type {import('../index.d.ts').packAsList} */
|
|
35483
35488
|
async function packAsList(dir, opts) {
|
|
35484
35489
|
const packageManager = opts?.packageManager ?? "npm";
|
|
@@ -35562,7 +35567,7 @@ var init_pack_as_list = __esmMin((() => {
|
|
|
35562
35567
|
init_utils$2();
|
|
35563
35568
|
}));
|
|
35564
35569
|
//#endregion
|
|
35565
|
-
//#region ../../node_modules/.pnpm/@publint+pack@0.1.
|
|
35570
|
+
//#region ../../node_modules/.pnpm/@publint+pack@0.1.7/node_modules/@publint/pack/src/node/get-pack-directory.js
|
|
35566
35571
|
/** @type {import('../index.d.ts').getPackDirectory} */
|
|
35567
35572
|
async function getPackDirectory(dir, packageManager) {
|
|
35568
35573
|
if (packageManager === "pnpm") try {
|
|
@@ -35574,7 +35579,7 @@ async function getPackDirectory(dir, packageManager) {
|
|
|
35574
35579
|
}
|
|
35575
35580
|
var init_get_pack_directory = __esmMin((() => {}));
|
|
35576
35581
|
//#endregion
|
|
35577
|
-
//#region ../../node_modules/.pnpm/@publint+pack@0.1.
|
|
35582
|
+
//#region ../../node_modules/.pnpm/@publint+pack@0.1.7/node_modules/@publint/pack/src/shared/constants.js
|
|
35578
35583
|
var supportedPackageManagers;
|
|
35579
35584
|
var init_constants$2 = __esmMin((() => {
|
|
35580
35585
|
supportedPackageManagers = [
|
|
@@ -35585,7 +35590,7 @@ var init_constants$2 = __esmMin((() => {
|
|
|
35585
35590
|
];
|
|
35586
35591
|
}));
|
|
35587
35592
|
//#endregion
|
|
35588
|
-
//#region ../../node_modules/.pnpm/@publint+pack@0.1.
|
|
35593
|
+
//#region ../../node_modules/.pnpm/@publint+pack@0.1.7/node_modules/@publint/pack/src/index-node.js
|
|
35589
35594
|
var init_index_node$1 = __esmMin((() => {
|
|
35590
35595
|
init_pack();
|
|
35591
35596
|
init_pack_as_list();
|
|
@@ -35595,7 +35600,7 @@ var init_index_node$1 = __esmMin((() => {
|
|
|
35595
35600
|
init_constants$2();
|
|
35596
35601
|
}));
|
|
35597
35602
|
//#endregion
|
|
35598
|
-
//#region ../../node_modules/.pnpm/publint@0.3.
|
|
35603
|
+
//#region ../../node_modules/.pnpm/publint@0.3.24/node_modules/publint/src/node/vfs-node.js
|
|
35599
35604
|
/**
|
|
35600
35605
|
* Creates a node-compatible Vfs object
|
|
35601
35606
|
* @returns {import('../shared/core.js').Vfs}
|
|
@@ -35634,7 +35639,7 @@ function createNodeVfs() {
|
|
|
35634
35639
|
}
|
|
35635
35640
|
var init_vfs_node = __esmMin((() => {}));
|
|
35636
35641
|
//#endregion
|
|
35637
|
-
//#region ../../node_modules/.pnpm/publint@0.3.
|
|
35642
|
+
//#region ../../node_modules/.pnpm/publint@0.3.24/node_modules/publint/src/shared/constants.js
|
|
35638
35643
|
var lintableFileExtensions, invalidJsxExtensions, knownBrowserishConditions, commonInternalPaths, commonInternalTestFileRegex, licenseFiles;
|
|
35639
35644
|
var init_constants$1 = __esmMin((() => {
|
|
35640
35645
|
lintableFileExtensions = [
|
|
@@ -35695,7 +35700,7 @@ var init_constants$1 = __esmMin((() => {
|
|
|
35695
35700
|
];
|
|
35696
35701
|
}));
|
|
35697
35702
|
//#endregion
|
|
35698
|
-
//#region ../../node_modules/.pnpm/publint@0.3.
|
|
35703
|
+
//#region ../../node_modules/.pnpm/publint@0.3.24/node_modules/publint/src/shared/utils.js
|
|
35699
35704
|
/**
|
|
35700
35705
|
* @param {string} code
|
|
35701
35706
|
*/
|
|
@@ -36111,7 +36116,7 @@ var init_utils$1 = __esmMin((() => {
|
|
|
36111
36116
|
DTS_RE = /\.d\.[mc]?ts$/;
|
|
36112
36117
|
}));
|
|
36113
36118
|
//#endregion
|
|
36114
|
-
//#region ../../node_modules/.pnpm/publint@0.3.
|
|
36119
|
+
//#region ../../node_modules/.pnpm/publint@0.3.24/node_modules/publint/src/shared/core.js
|
|
36115
36120
|
/**
|
|
36116
36121
|
* @typedef Vfs
|
|
36117
36122
|
* @property {(path: string) => Promise<string>} readFile
|
|
@@ -36469,7 +36474,7 @@ async function core({ pkgDir, vfs, level, strict, _packedFiles }) {
|
|
|
36469
36474
|
path: ["repository"],
|
|
36470
36475
|
type: "warning"
|
|
36471
36476
|
});
|
|
36472
|
-
} else if (typeof repository === "object" && repository.url && repository.type === "git") {
|
|
36477
|
+
} else if (typeof repository === "object" && repository.url && (repository.type === "git" || repository.type == null)) {
|
|
36473
36478
|
if (!isGitUrl(repository.url)) messages.push({
|
|
36474
36479
|
code: "INVALID_REPOSITORY_VALUE",
|
|
36475
36480
|
args: { type: "invalid-git-url" },
|
|
@@ -36987,7 +36992,7 @@ var init_core = __esmMin((() => {
|
|
|
36987
36992
|
init_utils$1();
|
|
36988
36993
|
}));
|
|
36989
36994
|
//#endregion
|
|
36990
|
-
//#region ../../node_modules/.pnpm/publint@0.3.
|
|
36995
|
+
//#region ../../node_modules/.pnpm/publint@0.3.24/node_modules/publint/src/shared/vfs-tarball.js
|
|
36991
36996
|
/**
|
|
36992
36997
|
* @param {import("../index.d.ts").PackFile[]} files
|
|
36993
36998
|
* @return {import("./core.js").Vfs}
|
|
@@ -37211,7 +37216,7 @@ var init_detect = __esmMin((() => {
|
|
|
37211
37216
|
init_constants();
|
|
37212
37217
|
}));
|
|
37213
37218
|
//#endregion
|
|
37214
|
-
//#region ../../node_modules/.pnpm/publint@0.3.
|
|
37219
|
+
//#region ../../node_modules/.pnpm/publint@0.3.24/node_modules/publint/src/index-node.js
|
|
37215
37220
|
var index_node_exports = /* @__PURE__ */ __exportAll({ publint: () => publint$1 });
|
|
37216
37221
|
/**
|
|
37217
37222
|
* @typedef {T extends string ? T : never} ExtractStringLiteral
|
|
@@ -37363,7 +37368,7 @@ var require_picocolors = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
37363
37368
|
module.exports.createColors = createColors;
|
|
37364
37369
|
}));
|
|
37365
37370
|
//#endregion
|
|
37366
|
-
//#region ../../node_modules/.pnpm/publint@0.3.
|
|
37371
|
+
//#region ../../node_modules/.pnpm/publint@0.3.24/node_modules/publint/src/shared/message.js
|
|
37367
37372
|
/** @type {import('../utils.d.ts').formatMessage} */
|
|
37368
37373
|
function formatMessage(m, pkg, opts = {}) {
|
|
37369
37374
|
const h = getHighlighter(opts.color);
|
|
@@ -37532,7 +37537,7 @@ var init_message = __esmMin((() => {
|
|
|
37532
37537
|
EMPTY_MSG = "<empty>";
|
|
37533
37538
|
}));
|
|
37534
37539
|
//#endregion
|
|
37535
|
-
//#region ../../node_modules/.pnpm/publint@0.3.
|
|
37540
|
+
//#region ../../node_modules/.pnpm/publint@0.3.24/node_modules/publint/src/utils.js
|
|
37536
37541
|
var utils_exports = /* @__PURE__ */ __exportAll({
|
|
37537
37542
|
formatMessage: () => formatMessage,
|
|
37538
37543
|
formatMessagePath: () => formatMessagePath,
|
|
@@ -39965,7 +39970,7 @@ const VALID_RULE_LEVELS = /* @__PURE__ */ new Set([
|
|
|
39965
39970
|
"warn",
|
|
39966
39971
|
"error"
|
|
39967
39972
|
]);
|
|
39968
|
-
function isRecord$
|
|
39973
|
+
function isRecord$5(value) {
|
|
39969
39974
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
39970
39975
|
}
|
|
39971
39976
|
function isRuleLevel$1(value) {
|
|
@@ -39990,13 +39995,13 @@ function parseRuleConfig(ruleId, value) {
|
|
|
39990
39995
|
const level = value[0];
|
|
39991
39996
|
if (!isRuleLevel$1(level)) throw new TypeError(`${formatRuleConfigLocation(ruleId)} level must be one of "off", "warn", or "error"`);
|
|
39992
39997
|
const options = value[1];
|
|
39993
|
-
if (!isRecord$
|
|
39998
|
+
if (!isRecord$5(options)) throw new TypeError(`${formatRuleConfigLocation(ruleId)} options must be an object`);
|
|
39994
39999
|
return {
|
|
39995
40000
|
level,
|
|
39996
40001
|
options: { ...options }
|
|
39997
40002
|
};
|
|
39998
40003
|
}
|
|
39999
|
-
if (isRecord$
|
|
40004
|
+
if (isRecord$5(value)) return {
|
|
40000
40005
|
level: "warn",
|
|
40001
40006
|
options: { ...value }
|
|
40002
40007
|
};
|
|
@@ -41130,7 +41135,7 @@ function applyCompileCompilerToTsSource(text, compiler) {
|
|
|
41130
41135
|
if ((ts.isStringLiteral(validator.initializer) || ts.isNoSubstitutionTemplateLiteral(validator.initializer)) && validator.initializer.text === "shared") result = removePropertyFromObject(result, validator, afterCompiler);
|
|
41131
41136
|
return result;
|
|
41132
41137
|
}
|
|
41133
|
-
function isRecord$
|
|
41138
|
+
function isRecord$4(value) {
|
|
41134
41139
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
41135
41140
|
}
|
|
41136
41141
|
/**
|
|
@@ -41138,7 +41143,7 @@ function isRecord$3(value) {
|
|
|
41138
41143
|
*/
|
|
41139
41144
|
function applyCompileCompilerToJsonSource(text, compiler) {
|
|
41140
41145
|
const root = JSON.parse(text);
|
|
41141
|
-
const compile = isRecord$
|
|
41146
|
+
const compile = isRecord$4(root.compile) ? { ...root.compile } : {};
|
|
41142
41147
|
compile.compiler = compiler;
|
|
41143
41148
|
if (compiler === "native" && compile.validator === "shared") delete compile.validator;
|
|
41144
41149
|
root.compile = compile;
|
|
@@ -41440,6 +41445,81 @@ function gitignore() {
|
|
|
41440
41445
|
}
|
|
41441
41446
|
}
|
|
41442
41447
|
//#endregion
|
|
41448
|
+
//#region src/actions/gitlintIgnore.ts
|
|
41449
|
+
/** The canonical entry that denies the toolchain cache at every depth. */
|
|
41450
|
+
const TOOLCHAIN_CACHE_IGNORE_ENTRY = "**/.xy/cache/";
|
|
41451
|
+
const TOOLCHAIN_CACHE_IGNORE_COMMENT = "# XY toolchain cache (never .xy/work, which is tracked)";
|
|
41452
|
+
/**
|
|
41453
|
+
* Entries that deny `.xy/cache` in every package rather than only at the root.
|
|
41454
|
+
*
|
|
41455
|
+
* `.xy/cache` is deliberately absent. A Git ignore pattern containing an
|
|
41456
|
+
* interior slash is anchored to the directory of the ignore file, so that entry
|
|
41457
|
+
* denies the root cache and misses every per-package one — which is the exact
|
|
41458
|
+
* gap this rule exists to close. `.xy` on its own has no interior slash, so it
|
|
41459
|
+
* matches at any depth and does cover the cache, at the cost of also hiding the
|
|
41460
|
+
* tracked `.xy/work` store.
|
|
41461
|
+
*/
|
|
41462
|
+
const NestedCacheCoveringEntries = /* @__PURE__ */ new Set([
|
|
41463
|
+
".xy",
|
|
41464
|
+
"**/.xy",
|
|
41465
|
+
"**/.xy/cache"
|
|
41466
|
+
]);
|
|
41467
|
+
/** Root-anchored entries this rule replaces rather than duplicates. */
|
|
41468
|
+
const SupersededCacheEntries = /* @__PURE__ */ new Set([".xy/cache", "/.xy/cache"]);
|
|
41469
|
+
function significantEntry(line) {
|
|
41470
|
+
const trimmed = line.trim();
|
|
41471
|
+
if (trimmed.length === 0 || trimmed.startsWith("#")) return void 0;
|
|
41472
|
+
return trimmed.endsWith("/") ? trimmed.slice(0, -1) : trimmed;
|
|
41473
|
+
}
|
|
41474
|
+
/**
|
|
41475
|
+
* Whether the ignore file denies the toolchain cache in every package.
|
|
41476
|
+
*
|
|
41477
|
+
* The toolchain writes `<packageRoot>/.xy/cache` for each package it compiles,
|
|
41478
|
+
* so a root-only rule leaves every package's cache committable.
|
|
41479
|
+
*/
|
|
41480
|
+
function coversNestedToolchainCache(content) {
|
|
41481
|
+
return content.split("\n").some((line) => {
|
|
41482
|
+
const entry = significantEntry(line);
|
|
41483
|
+
return entry !== void 0 && NestedCacheCoveringEntries.has(entry);
|
|
41484
|
+
});
|
|
41485
|
+
}
|
|
41486
|
+
/**
|
|
41487
|
+
* Add the canonical entry, replacing a superseded root-anchored one in place
|
|
41488
|
+
* so the file gains coverage without gaining a redundant line.
|
|
41489
|
+
*/
|
|
41490
|
+
function applyToolchainCacheEntry(content) {
|
|
41491
|
+
if (coversNestedToolchainCache(content)) return content;
|
|
41492
|
+
const lines = content.split("\n");
|
|
41493
|
+
const supersededIndex = lines.findIndex((line) => {
|
|
41494
|
+
const entry = significantEntry(line);
|
|
41495
|
+
return entry !== void 0 && SupersededCacheEntries.has(entry);
|
|
41496
|
+
});
|
|
41497
|
+
if (supersededIndex !== -1) {
|
|
41498
|
+
lines[supersededIndex] = TOOLCHAIN_CACHE_IGNORE_ENTRY;
|
|
41499
|
+
return lines.join("\n");
|
|
41500
|
+
}
|
|
41501
|
+
const body = content.length === 0 || content.endsWith("\n") ? content : `${content}\n`;
|
|
41502
|
+
return `${body}${body.length === 0 || body.endsWith("\n\n") ? "" : "\n"}${TOOLCHAIN_CACHE_IGNORE_COMMENT}\n${TOOLCHAIN_CACHE_IGNORE_ENTRY}\n`;
|
|
41503
|
+
}
|
|
41504
|
+
function ignorePath(rootDir) {
|
|
41505
|
+
return PATH.join(rootDir, ".gitignore");
|
|
41506
|
+
}
|
|
41507
|
+
function readIgnoreFile(rootDir) {
|
|
41508
|
+
const path = ignorePath(rootDir);
|
|
41509
|
+
return existsSync(path) ? readFileSync(path, "utf8") : "";
|
|
41510
|
+
}
|
|
41511
|
+
function hasNestedToolchainCacheEntry(rootDir) {
|
|
41512
|
+
return coversNestedToolchainCache(readIgnoreFile(rootDir));
|
|
41513
|
+
}
|
|
41514
|
+
/** Returns true when the file was changed. */
|
|
41515
|
+
function writeToolchainCacheEntry(rootDir) {
|
|
41516
|
+
const content = readIgnoreFile(rootDir);
|
|
41517
|
+
const updated = applyToolchainCacheEntry(content);
|
|
41518
|
+
if (updated === content) return false;
|
|
41519
|
+
writeFileSync(ignorePath(rootDir), updated, "utf8");
|
|
41520
|
+
return true;
|
|
41521
|
+
}
|
|
41522
|
+
//#endregion
|
|
41443
41523
|
//#region src/actions/ruleRunner.ts
|
|
41444
41524
|
const RULE_LEVELS = /* @__PURE__ */ new Set([
|
|
41445
41525
|
"error",
|
|
@@ -41615,6 +41695,20 @@ const GITLINT_RULES = [
|
|
|
41615
41695
|
description: "core.eol must be lf",
|
|
41616
41696
|
fixable: true,
|
|
41617
41697
|
id: "git.eol"
|
|
41698
|
+
},
|
|
41699
|
+
{
|
|
41700
|
+
check: (_context, { fix }) => {
|
|
41701
|
+
if (hasNestedToolchainCacheEntry(INIT_CWD())) return {};
|
|
41702
|
+
if (fix) {
|
|
41703
|
+
writeToolchainCacheEntry(INIT_CWD());
|
|
41704
|
+
return { fixedCount: 1 };
|
|
41705
|
+
}
|
|
41706
|
+
return { diagnostics: [{ message: `.gitignore does not deny the toolchain cache in every package; add "${TOOLCHAIN_CACHE_IGNORE_ENTRY}" [run xy git lint --fix]` }] };
|
|
41707
|
+
},
|
|
41708
|
+
defaultLevel: "warn",
|
|
41709
|
+
description: "The .xy/cache toolchain cache is ignored in every package, not only at the repository root",
|
|
41710
|
+
fixable: true,
|
|
41711
|
+
id: "git.ignore-toolchain-cache"
|
|
41618
41712
|
}
|
|
41619
41713
|
];
|
|
41620
41714
|
function logGitlintDiagnostic(diagnostic) {
|
|
@@ -43011,12 +43105,12 @@ function checkPnpmReleaseAgeExcludes(cwd, pm, workspaces = []) {
|
|
|
43011
43105
|
for (const pattern of unnecessary) result.fixable.push(`pnpm-workspace.yaml minimumReleaseAgeExclude includes '${pattern}' but the repo does not use that scope`);
|
|
43012
43106
|
return result;
|
|
43013
43107
|
}
|
|
43014
|
-
function isRecord$
|
|
43108
|
+
function isRecord$3(value) {
|
|
43015
43109
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
43016
43110
|
}
|
|
43017
43111
|
function isConfiguredValue(value) {
|
|
43018
43112
|
if (value === void 0 || value === null) return false;
|
|
43019
|
-
if (isRecord$
|
|
43113
|
+
if (isRecord$3(value)) return Object.keys(value).length > 0;
|
|
43020
43114
|
if (Array.isArray(value)) return value.length > 0;
|
|
43021
43115
|
return value !== "";
|
|
43022
43116
|
}
|
|
@@ -43044,8 +43138,8 @@ function formatOverrideWarning(location, keys) {
|
|
|
43044
43138
|
function checkPnpmDependencyOverrides(cwd, pm, rootPkg) {
|
|
43045
43139
|
const result = emptyResult$2();
|
|
43046
43140
|
if (pm !== "pnpm") return result;
|
|
43047
|
-
const packageJsonOverrides = (isRecord$
|
|
43048
|
-
if (isConfiguredValue(packageJsonOverrides)) result.warnings.push(formatOverrideWarning("Root package.json pnpm.overrides field", isRecord$
|
|
43141
|
+
const packageJsonOverrides = (isRecord$3(rootPkg.pnpm) ? rootPkg.pnpm : void 0)?.overrides;
|
|
43142
|
+
if (isConfiguredValue(packageJsonOverrides)) result.warnings.push(formatOverrideWarning("Root package.json pnpm.overrides field", isRecord$3(packageJsonOverrides) ? Object.keys(packageJsonOverrides) : []));
|
|
43049
43143
|
const workspaceOverrides = readPnpmWorkspaceDocument(cwd)?.get("overrides");
|
|
43050
43144
|
if (isConfiguredYamlNode(workspaceOverrides)) result.warnings.push(formatOverrideWarning("pnpm-workspace.yaml overrides field", configuredYamlKeys(workspaceOverrides)));
|
|
43051
43145
|
return result;
|
|
@@ -45204,15 +45298,14 @@ const SKILLS_COMMANDS = [
|
|
|
45204
45298
|
"init",
|
|
45205
45299
|
"experimental_sync",
|
|
45206
45300
|
"defaults",
|
|
45207
|
-
"lint"
|
|
45208
|
-
"updo"
|
|
45301
|
+
"lint"
|
|
45209
45302
|
].join("|");
|
|
45210
45303
|
const NPX_SKILLS_PATTERN = new RegExp(String.raw`${COMMAND_PREFIX}npx(?:\s+-y)?\s+skills(?:@latest)?(?=\W|$)`, "g");
|
|
45211
45304
|
const BARE_USAGE_SKILLS_PATTERN = new RegExp(String.raw`^(\s*(?:${ANSI_PREFIX})*Usage:(?:${ANSI_PREFIX})*\s*)skills(?=\s+<command>)`, "gm");
|
|
45212
45305
|
const BARE_PROMPT_SKILLS_PATTERN = new RegExp(String.raw`^(\s*(?:${ANSI_PREFIX})*\$(?:${ANSI_PREFIX})*\s*)skills(?=\s+(?:${SKILLS_COMMANDS})(?:\W|$))`, "gm");
|
|
45213
45306
|
const require$3 = createRequire(import.meta.url);
|
|
45214
45307
|
const YES_FLAGS = /* @__PURE__ */ new Set(["-y", "--yes"]);
|
|
45215
|
-
const SCOPE_FLAGS
|
|
45308
|
+
const SCOPE_FLAGS = /* @__PURE__ */ new Set([
|
|
45216
45309
|
"-g",
|
|
45217
45310
|
"--global",
|
|
45218
45311
|
"-p",
|
|
@@ -45239,7 +45332,7 @@ const needsSkillsInteractive = (args) => {
|
|
|
45239
45332
|
if (command === void 0 || !INTERACTIVE_COMMANDS.has(command)) return false;
|
|
45240
45333
|
switch (command) {
|
|
45241
45334
|
case "update":
|
|
45242
|
-
case "upgrade": return !hasSkillsFlag(tail, SCOPE_FLAGS
|
|
45335
|
+
case "upgrade": return !hasSkillsFlag(tail, SCOPE_FLAGS) && !hasSkillsFlag(tail, YES_FLAGS) && skillsPositionalArgs(tail).length === 0;
|
|
45243
45336
|
case "add":
|
|
45244
45337
|
case "a":
|
|
45245
45338
|
case "experimental_sync": return !hasSkillsFlag(tail, YES_FLAGS);
|
|
@@ -45324,6 +45417,7 @@ const ARIESTOOLS_SKILLS = [
|
|
|
45324
45417
|
];
|
|
45325
45418
|
const XYO_STACK_SKILLS = [
|
|
45326
45419
|
"xl1-build",
|
|
45420
|
+
"xl1-dapp-kit",
|
|
45327
45421
|
"xl1-knowledge",
|
|
45328
45422
|
"xl1-patterns",
|
|
45329
45423
|
"xl1-scaffold",
|
|
@@ -45331,6 +45425,19 @@ const XYO_STACK_SKILLS = [
|
|
|
45331
45425
|
"xyo-knowledge"
|
|
45332
45426
|
];
|
|
45333
45427
|
/**
|
|
45428
|
+
* Skills that used to live in xyo-skills and now live in ariestools-skills.
|
|
45429
|
+
* `xy skills lint` reports (and `--fix` reinstalls) lockfile entries still on `from`.
|
|
45430
|
+
*/
|
|
45431
|
+
const MIGRATED_SKILLS = [{
|
|
45432
|
+
from: XYO_SKILLS_SOURCE,
|
|
45433
|
+
name: "xy-development",
|
|
45434
|
+
to: ARIESTOOLS_SKILLS_SOURCE
|
|
45435
|
+
}, {
|
|
45436
|
+
from: XYO_SKILLS_SOURCE,
|
|
45437
|
+
name: "xy-toolchain",
|
|
45438
|
+
to: ARIESTOOLS_SKILLS_SOURCE
|
|
45439
|
+
}];
|
|
45440
|
+
/**
|
|
45334
45441
|
All skills managed by `xy skills` conveniences (both sources).
|
|
45335
45442
|
*/
|
|
45336
45443
|
const XYO_DEFAULT_SKILLS = [...ARIESTOOLS_SKILLS, ...XYO_STACK_SKILLS];
|
|
@@ -45379,6 +45486,7 @@ const SKILL_ORDER = [
|
|
|
45379
45486
|
"xyo-knowledge",
|
|
45380
45487
|
"xl1-knowledge",
|
|
45381
45488
|
"xl1-patterns",
|
|
45489
|
+
"xl1-dapp-kit",
|
|
45382
45490
|
"xl1-testing",
|
|
45383
45491
|
"xl1-scaffold",
|
|
45384
45492
|
"xl1-build"
|
|
@@ -45397,7 +45505,11 @@ const XL1_SKILLS = [
|
|
|
45397
45505
|
"xl1-patterns",
|
|
45398
45506
|
"xl1-testing"
|
|
45399
45507
|
];
|
|
45400
|
-
const XL1_OPTIONAL_SKILLS = [
|
|
45508
|
+
const XL1_OPTIONAL_SKILLS = [
|
|
45509
|
+
"xl1-dapp-kit",
|
|
45510
|
+
"xl1-scaffold",
|
|
45511
|
+
"xl1-build"
|
|
45512
|
+
];
|
|
45401
45513
|
const TIER_REQUIRED_SKILLS = {
|
|
45402
45514
|
xy: XY_SKILLS,
|
|
45403
45515
|
xyo: [...XY_SKILLS, ...XYO_SKILLS],
|
|
@@ -51885,6 +51997,64 @@ const listSkillDirsAt = (root) => {
|
|
|
51885
51997
|
return listSkillDirs(root);
|
|
51886
51998
|
};
|
|
51887
51999
|
//#endregion
|
|
52000
|
+
//#region src/actions/skills/lock.ts
|
|
52001
|
+
const SKILLS_LOCK_FILE = "skills-lock.json";
|
|
52002
|
+
const normalizeSkillSource = (source) => {
|
|
52003
|
+
return source.trim().replace(/^https?:\/\/github\.com\//i, "").replace(/^github:/i, "").replace(/\.git$/i, "").replace(/\/+$/, "").toLowerCase();
|
|
52004
|
+
};
|
|
52005
|
+
const isRecord$2 = (value) => {
|
|
52006
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
52007
|
+
};
|
|
52008
|
+
const parseLockEntry = (value) => {
|
|
52009
|
+
if (!isRecord$2(value) || typeof value.source !== "string" || value.source.length === 0) return void 0;
|
|
52010
|
+
return {
|
|
52011
|
+
computedHash: typeof value.computedHash === "string" ? value.computedHash : void 0,
|
|
52012
|
+
skillPath: typeof value.skillPath === "string" ? value.skillPath : void 0,
|
|
52013
|
+
source: value.source,
|
|
52014
|
+
sourceType: typeof value.sourceType === "string" ? value.sourceType : void 0
|
|
52015
|
+
};
|
|
52016
|
+
};
|
|
52017
|
+
const parseSkillsLock = (value) => {
|
|
52018
|
+
if (!isRecord$2(value) || !isRecord$2(value.skills)) return void 0;
|
|
52019
|
+
const skills = {};
|
|
52020
|
+
for (const [name, entry] of Object.entries(value.skills)) {
|
|
52021
|
+
const parsed = parseLockEntry(entry);
|
|
52022
|
+
if (parsed == null) continue;
|
|
52023
|
+
skills[name] = parsed;
|
|
52024
|
+
}
|
|
52025
|
+
return {
|
|
52026
|
+
skills,
|
|
52027
|
+
version: typeof value.version === "number" ? value.version : 1
|
|
52028
|
+
};
|
|
52029
|
+
};
|
|
52030
|
+
const readSkillsLock = (cwd) => {
|
|
52031
|
+
const lockPath = PATH.resolve(cwd, SKILLS_LOCK_FILE);
|
|
52032
|
+
if (!existsSync(lockPath)) return void 0;
|
|
52033
|
+
try {
|
|
52034
|
+
return parseSkillsLock(JSON.parse(readFileSync(lockPath, "utf8")));
|
|
52035
|
+
} catch {
|
|
52036
|
+
return;
|
|
52037
|
+
}
|
|
52038
|
+
};
|
|
52039
|
+
const unmigratedSkillsFromLock = (lock) => {
|
|
52040
|
+
if (lock == null) return [];
|
|
52041
|
+
const unmigrated = [];
|
|
52042
|
+
for (const skill of MIGRATED_SKILLS) {
|
|
52043
|
+
const entry = lock.skills[skill.name];
|
|
52044
|
+
if (entry == null) continue;
|
|
52045
|
+
if (normalizeSkillSource(entry.source) !== normalizeSkillSource(skill.from)) continue;
|
|
52046
|
+
unmigrated.push({
|
|
52047
|
+
currentSource: entry.source,
|
|
52048
|
+
expectedSource: skill.to,
|
|
52049
|
+
name: skill.name
|
|
52050
|
+
});
|
|
52051
|
+
}
|
|
52052
|
+
return unmigrated;
|
|
52053
|
+
};
|
|
52054
|
+
const findUnmigratedSkills = (cwd) => {
|
|
52055
|
+
return unmigratedSkillsFromLock(readSkillsLock(cwd));
|
|
52056
|
+
};
|
|
52057
|
+
//#endregion
|
|
51888
52058
|
//#region src/actions/skills/versions.ts
|
|
51889
52059
|
const VERSION_PATTERN = /metadata:\s*\n(?:[ \t]+[^\n]+\n)*?[ \t]+version:\s*([^\s#]+)/;
|
|
51890
52060
|
const upstreamSkillUrl = (skillName) => {
|
|
@@ -51943,21 +52113,23 @@ const logWarning = (message) => {
|
|
|
51943
52113
|
const logInfo = (message) => {
|
|
51944
52114
|
console.log(chalk.gray(` \u{2139} ${message}`));
|
|
51945
52115
|
};
|
|
51946
|
-
const
|
|
51947
|
-
return
|
|
51948
|
-
|
|
51949
|
-
|
|
51950
|
-
|
|
51951
|
-
|
|
51952
|
-
|
|
51953
|
-
|
|
52116
|
+
const createSkillInstaller = (cwd) => {
|
|
52117
|
+
return async (skillName) => {
|
|
52118
|
+
return runSkills([
|
|
52119
|
+
"add",
|
|
52120
|
+
skillSourceForName(skillName),
|
|
52121
|
+
"--skill",
|
|
52122
|
+
skillName,
|
|
52123
|
+
"-y"
|
|
52124
|
+
], { cwd });
|
|
52125
|
+
};
|
|
51954
52126
|
};
|
|
51955
52127
|
const missingSkillReason = (profile, skillName) => {
|
|
51956
52128
|
if (skillName === "ariestools-sdk" && profile.isUsingAriestoolsSdk) return "repo uses packages from ariestools/sdk-js";
|
|
51957
52129
|
if (skillName === "xy-toolchain" && profile.isUsingToolchain) return "repo uses @ariestools/toolchain";
|
|
51958
52130
|
return "required for repo profile";
|
|
51959
52131
|
};
|
|
51960
|
-
const checkRequiredSkills = (required, installed, latestVersions
|
|
52132
|
+
const checkRequiredSkills = (required, installed, latestVersions) => {
|
|
51961
52133
|
const current = [];
|
|
51962
52134
|
const missing = [];
|
|
51963
52135
|
const outdated = [];
|
|
@@ -51969,7 +52141,7 @@ const checkRequiredSkills = (required, installed, latestVersions, profile, isOff
|
|
|
51969
52141
|
}
|
|
51970
52142
|
const installedVersion = installedSkill.version;
|
|
51971
52143
|
const latestVersion = latestVersions.get(skillName);
|
|
51972
|
-
if (
|
|
52144
|
+
if (isSkillVersionOutdated(installedVersion, latestVersion)) {
|
|
51973
52145
|
outdated.push({
|
|
51974
52146
|
latest: latestVersion,
|
|
51975
52147
|
name: skillName,
|
|
@@ -51989,6 +52161,11 @@ const checkRequiredSkills = (required, installed, latestVersions, profile, isOff
|
|
|
51989
52161
|
outdated
|
|
51990
52162
|
};
|
|
51991
52163
|
};
|
|
52164
|
+
const resolveLatestSkillVersions = async (skillNames, options) => {
|
|
52165
|
+
if (options.latestVersions != null) return new Map(options.latestVersions);
|
|
52166
|
+
if (options.isOffline === true) return /* @__PURE__ */ new Map();
|
|
52167
|
+
return fetchLatestSkillVersions(skillNames);
|
|
52168
|
+
};
|
|
51992
52169
|
const findDuplicateSkills = (cwd, globalDir) => {
|
|
51993
52170
|
const projectClaudeDir = PATH.resolve(cwd, ".claude", "skills");
|
|
51994
52171
|
const projectSkills = listSkillDirsAt(projectClaudeDir);
|
|
@@ -52019,22 +52196,22 @@ const skillDiagnostics = (rule, messages) => {
|
|
|
52019
52196
|
rule
|
|
52020
52197
|
}));
|
|
52021
52198
|
};
|
|
52022
|
-
const
|
|
52199
|
+
const installSkills = async (skillNames, installSkill, heading, success) => {
|
|
52023
52200
|
console.log();
|
|
52024
|
-
console.log(chalk.gray(
|
|
52025
|
-
for (const skillName of
|
|
52026
|
-
const code = await
|
|
52201
|
+
console.log(chalk.gray(heading));
|
|
52202
|
+
for (const skillName of skillNames) {
|
|
52203
|
+
const code = await installSkill(skillName);
|
|
52027
52204
|
if (code !== 0) return code;
|
|
52028
52205
|
}
|
|
52029
|
-
console.log(chalk.green(
|
|
52206
|
+
console.log(chalk.green(success));
|
|
52030
52207
|
return 0;
|
|
52031
52208
|
};
|
|
52032
52209
|
const SKILLS_LINT_RULES = [
|
|
52033
52210
|
{
|
|
52034
|
-
check: async ({ missing, profile }, { fix }) => {
|
|
52211
|
+
check: async ({ installSkill, missing, profile }, { fix }) => {
|
|
52035
52212
|
if (missing.length === 0) return {};
|
|
52036
52213
|
if (fix) {
|
|
52037
|
-
if (await
|
|
52214
|
+
if (await installSkills(missing, installSkill, "Installing missing required skills...", "Missing skills installed. Re-run `xy skills lint` to verify versions.") === 0) return { fixedCount: missing.length };
|
|
52038
52215
|
}
|
|
52039
52216
|
return { diagnostics: skillDiagnostics("skills.required-installed", missing.map((skillName) => `${skillName} — missing (${missingSkillReason(profile, skillName)})`)) };
|
|
52040
52217
|
},
|
|
@@ -52044,11 +52221,35 @@ const SKILLS_LINT_RULES = [
|
|
|
52044
52221
|
id: "skills.required-installed"
|
|
52045
52222
|
},
|
|
52046
52223
|
{
|
|
52047
|
-
check:
|
|
52224
|
+
check: async ({ installSkill, outdated }, { fix }) => {
|
|
52225
|
+
if (outdated.length === 0) return {};
|
|
52226
|
+
if (fix) {
|
|
52227
|
+
if (await installSkills(outdated.map((skill) => skill.name), installSkill, "Updating outdated skills...", "Outdated skills updated. Re-run `xy skills lint` to verify versions.") === 0) return { fixedCount: outdated.length };
|
|
52228
|
+
}
|
|
52229
|
+
return { diagnostics: skillDiagnostics("skills.required-current", outdated.map((skill) => `${skill.name} v${skill.version ?? "unknown"} — outdated (latest ${skill.latest ?? "unknown"})`)) };
|
|
52230
|
+
},
|
|
52048
52231
|
defaultLevel: "error",
|
|
52049
52232
|
description: "Installed required skills are up to date",
|
|
52233
|
+
fixable: true,
|
|
52050
52234
|
id: "skills.required-current"
|
|
52051
52235
|
},
|
|
52236
|
+
{
|
|
52237
|
+
check: async ({ installSkill, unmigrated }, { fix }) => {
|
|
52238
|
+
if (unmigrated.length === 0) return {};
|
|
52239
|
+
if (fix) {
|
|
52240
|
+
if (await installSkills(unmigrated.map((skill) => skill.name), installSkill, "Migrating skills to canonical sources...", "Migrated skills reinstalled from ariestools/ariestools-skills. Re-run `xy skills lint` to verify versions.") === 0) return { fixedCount: unmigrated.length };
|
|
52241
|
+
}
|
|
52242
|
+
return { diagnostics: unmigrated.map((skill) => ({
|
|
52243
|
+
file: SKILLS_LOCK_FILE,
|
|
52244
|
+
message: `${skill.name} — installed from ${skill.currentSource}; migrate to ${skill.expectedSource}`,
|
|
52245
|
+
rule: "skills.migrated-source"
|
|
52246
|
+
})) };
|
|
52247
|
+
},
|
|
52248
|
+
defaultLevel: "error",
|
|
52249
|
+
description: "xy-development and xy-toolchain are installed from ariestools/ariestools-skills, not XYOracleNetwork/xyo-skills",
|
|
52250
|
+
fixable: true,
|
|
52251
|
+
id: "skills.migrated-source"
|
|
52252
|
+
},
|
|
52052
52253
|
{
|
|
52053
52254
|
check: ({ unnecessary }) => ({ diagnostics: skillDiagnostics("skills.unnecessary", unnecessary.map((skillName) => `${skillName} — installed but not required for this repo profile`)) }),
|
|
52054
52255
|
defaultLevel: "warn",
|
|
@@ -52072,23 +52273,48 @@ function logCurrentRequiredSkills(requiredCheck) {
|
|
|
52072
52273
|
logOk(`${skill.name}${versionSuffix}`);
|
|
52073
52274
|
}
|
|
52074
52275
|
}
|
|
52276
|
+
function logSkillsLintHints(diagnostics) {
|
|
52277
|
+
const hasMissingDiagnostic = diagnostics.some((diagnostic) => diagnostic.rule === "skills.required-installed");
|
|
52278
|
+
const hasMigratedDiagnostic = diagnostics.some((diagnostic) => diagnostic.rule === "skills.migrated-source");
|
|
52279
|
+
const hasOutdatedDiagnostic = diagnostics.some((diagnostic) => diagnostic.rule === "skills.required-current");
|
|
52280
|
+
if (!hasMissingDiagnostic && !hasMigratedDiagnostic && !hasOutdatedDiagnostic) return;
|
|
52281
|
+
const hints = [];
|
|
52282
|
+
const fixReasons = [];
|
|
52283
|
+
if (hasMissingDiagnostic) fixReasons.push("install missing required skills");
|
|
52284
|
+
if (hasMigratedDiagnostic) fixReasons.push("migrate xy-development and xy-toolchain to ariestools-skills");
|
|
52285
|
+
if (hasOutdatedDiagnostic) fixReasons.push("update outdated skills");
|
|
52286
|
+
if (fixReasons.length > 0) hints.push(`run \`xy skills lint --fix\` to ${fixReasons.join(" and ")}`);
|
|
52287
|
+
console.log(chalk.yellow(`${hints.join(", or ")}.`));
|
|
52288
|
+
}
|
|
52289
|
+
function reportSkillsLintResult(result, profile, optional, installed) {
|
|
52290
|
+
logOptionalSkills(profile.tier, optional, installed);
|
|
52291
|
+
console.log();
|
|
52292
|
+
const { diagnostics, fixedCount } = result.envelope.data;
|
|
52293
|
+
if (fixedCount === 0 && diagnostics.length === 0) {
|
|
52294
|
+
console.log(chalk.green("All required skills are installed and up to date."));
|
|
52295
|
+
return result;
|
|
52296
|
+
}
|
|
52297
|
+
logSkillsLintHints(diagnostics);
|
|
52298
|
+
return result;
|
|
52299
|
+
}
|
|
52075
52300
|
const skillsLint = async (options = {}) => {
|
|
52076
52301
|
const cwd = options.cwd ?? INIT_CWD();
|
|
52077
52302
|
const projectDirs = options.projectDirs ?? [...PROJECT_SKILL_DIRS];
|
|
52078
52303
|
const globalDir = options.globalDir ?? DEFAULT_GLOBAL_DIR;
|
|
52079
|
-
const isOffline = options.isOffline === true;
|
|
52080
52304
|
const isStrict = options.isStrict === true || options.strict === true;
|
|
52081
52305
|
const profile = detectRepoProfile(cwd);
|
|
52082
52306
|
const required = requiredSkillsForProfile(profile);
|
|
52083
52307
|
const optional = optionalSkillsForTier(profile.tier);
|
|
52084
52308
|
const installed = scanInstalledSkills(cwd, projectDirs);
|
|
52085
52309
|
logProfileHeader(profile);
|
|
52086
|
-
const latestVersions =
|
|
52087
|
-
const requiredCheck = checkRequiredSkills(required, installed, latestVersions
|
|
52310
|
+
const latestVersions = await resolveLatestSkillVersions(collectSkillNamesToCheck(required, installed), options);
|
|
52311
|
+
const requiredCheck = checkRequiredSkills(required, installed, latestVersions);
|
|
52088
52312
|
logCurrentRequiredSkills(requiredCheck);
|
|
52089
52313
|
const unnecessary = collectUnnecessarySkills(profile, installed);
|
|
52090
52314
|
const duplicates = findDuplicateSkills(cwd, globalDir);
|
|
52091
|
-
const
|
|
52315
|
+
const unmigrated = findUnmigratedSkills(cwd);
|
|
52316
|
+
const installSkill = options.installSkill ?? createSkillInstaller(cwd);
|
|
52317
|
+
return reportSkillsLintResult(await runRuleChecks({
|
|
52092
52318
|
commandName: "skills lint",
|
|
52093
52319
|
configKey: "skillsLint",
|
|
52094
52320
|
config: await loadWorkspaceCommandConfig(cwd, "skillsLint"),
|
|
@@ -52096,31 +52322,18 @@ const skillsLint = async (options = {}) => {
|
|
|
52096
52322
|
cwd,
|
|
52097
52323
|
duplicates,
|
|
52098
52324
|
globalDir,
|
|
52325
|
+
installSkill,
|
|
52099
52326
|
missing: requiredCheck.missing,
|
|
52100
52327
|
outdated: requiredCheck.outdated,
|
|
52101
52328
|
profile,
|
|
52329
|
+
unmigrated,
|
|
52102
52330
|
unnecessary
|
|
52103
52331
|
},
|
|
52104
52332
|
fix: options.fix === true,
|
|
52105
52333
|
reporter: { diagnostic: logSkillsDiagnostic },
|
|
52106
52334
|
rules: SKILLS_LINT_RULES,
|
|
52107
52335
|
strict: isStrict
|
|
52108
|
-
});
|
|
52109
|
-
logOptionalSkills(profile.tier, optional, installed);
|
|
52110
|
-
console.log();
|
|
52111
|
-
if (result.envelope.data.diagnostics.length === 0 && result.envelope.data.fixedCount === 0) {
|
|
52112
|
-
console.log(chalk.green("All required skills are installed and up to date."));
|
|
52113
|
-
return result;
|
|
52114
|
-
}
|
|
52115
|
-
const hasMissingDiagnostic = result.envelope.data.diagnostics.some((diagnostic) => diagnostic.rule === "skills.required-installed");
|
|
52116
|
-
const hasOutdatedDiagnostic = result.envelope.data.diagnostics.some((diagnostic) => diagnostic.rule === "skills.required-current");
|
|
52117
|
-
if (hasMissingDiagnostic || hasOutdatedDiagnostic) {
|
|
52118
|
-
const hints = [];
|
|
52119
|
-
if (hasMissingDiagnostic) hints.push("run `xy skills lint --fix` to install missing required skills");
|
|
52120
|
-
if (hasOutdatedDiagnostic) hints.push("run `xy skills updo` to update outdated skills");
|
|
52121
|
-
console.log(chalk.yellow(`${hints.join(", or ")}.`));
|
|
52122
|
-
}
|
|
52123
|
-
return result;
|
|
52336
|
+
}), profile, optional, installed);
|
|
52124
52337
|
};
|
|
52125
52338
|
//#endregion
|
|
52126
52339
|
//#region src/actions/work/id.ts
|
|
@@ -53759,21 +53972,6 @@ const sitemap = () => {
|
|
|
53759
53972
|
return runSteps("Sitemap", [["ts-node-script", "./scripts/sitemap.ts"]]);
|
|
53760
53973
|
};
|
|
53761
53974
|
//#endregion
|
|
53762
|
-
//#region src/actions/skills/updo.ts
|
|
53763
|
-
const SCOPE_FLAGS = /* @__PURE__ */ new Set([
|
|
53764
|
-
"-g",
|
|
53765
|
-
"--global",
|
|
53766
|
-
"-p",
|
|
53767
|
-
"--project"
|
|
53768
|
-
]);
|
|
53769
|
-
const hasSkillsScopeFlag = (args) => args.some((a) => SCOPE_FLAGS.has(a));
|
|
53770
|
-
const skillsUpdoArgs = (args) => {
|
|
53771
|
-
return ["update", ...hasSkillsScopeFlag(args) ? args : ["-p", ...args]];
|
|
53772
|
-
};
|
|
53773
|
-
const skillsUpdo = (args) => {
|
|
53774
|
-
return runSkills(skillsUpdoArgs(args));
|
|
53775
|
-
};
|
|
53776
|
-
//#endregion
|
|
53777
53975
|
//#region src/actions/sonar.ts
|
|
53778
53976
|
const sonar = () => {
|
|
53779
53977
|
return runSteps("Sonar", [["eslint", [
|
|
@@ -55357,11 +55555,7 @@ const secureCommand = {
|
|
|
55357
55555
|
};
|
|
55358
55556
|
//#endregion
|
|
55359
55557
|
//#region src/xy/common/skills/index.ts
|
|
55360
|
-
const CUSTOM_SKILLS_COMMANDS = /* @__PURE__ */ new Set([
|
|
55361
|
-
"defaults",
|
|
55362
|
-
"lint",
|
|
55363
|
-
"updo"
|
|
55364
|
-
]);
|
|
55558
|
+
const CUSTOM_SKILLS_COMMANDS = /* @__PURE__ */ new Set(["defaults", "lint"]);
|
|
55365
55559
|
const HELP_FLAGS = /* @__PURE__ */ new Set(["--help", "-h"]);
|
|
55366
55560
|
const hasHelpFlag = (args) => args.some((arg) => HELP_FLAGS.has(arg));
|
|
55367
55561
|
const printDefaultsHelp = () => {
|
|
@@ -55407,34 +55601,20 @@ Checks:
|
|
|
55407
55601
|
- Detect repo tier (xy, xyo, xl1) from package.json and toolchain signals
|
|
55408
55602
|
- Require ariestools-sdk when packages from ariestools/sdk-js are used
|
|
55409
55603
|
- Required skills installed in .claude/skills and/or .agents/skills
|
|
55604
|
+
- xy-development and xy-toolchain are locked to ariestools-skills, not xyo-skills
|
|
55410
55605
|
- Installed skill versions vs upstream main
|
|
55411
55606
|
(ariestools/ariestools-skills for xy/ariestools-sdk skills;
|
|
55412
55607
|
XYOracleNetwork/xyo-skills for xyo/xl1 skills)
|
|
55413
55608
|
- Project/global duplicate installs
|
|
55414
55609
|
|
|
55415
55610
|
Options:
|
|
55416
|
-
--fix Install missing
|
|
55611
|
+
--fix Install missing, migrate relocated, and update outdated skills (project scope)
|
|
55417
55612
|
--offline Skip upstream version checks
|
|
55418
55613
|
--rules List supported skills lint rules and their effective levels
|
|
55419
55614
|
--strict Fail on warnings (duplicates, unnecessary skills)
|
|
55420
55615
|
-h, --help Show this help
|
|
55421
55616
|
`);
|
|
55422
55617
|
};
|
|
55423
|
-
const printUpdoHelp = () => {
|
|
55424
|
-
console.log(`xy skills updo
|
|
55425
|
-
|
|
55426
|
-
Update installed Skills.sh skills. Defaults to project scope.
|
|
55427
|
-
|
|
55428
|
-
Usage:
|
|
55429
|
-
xy skills updo [skills..] [options]
|
|
55430
|
-
|
|
55431
|
-
Options:
|
|
55432
|
-
-g, --global Update global skills instead of project skills
|
|
55433
|
-
-p, --project Update project skills (default)
|
|
55434
|
-
-y, --yes Skip confirmation prompts
|
|
55435
|
-
-h, --help Show this help
|
|
55436
|
-
`);
|
|
55437
|
-
};
|
|
55438
55618
|
const runSkillsTail = async (tail) => {
|
|
55439
55619
|
const [subcommand, ...args] = tail;
|
|
55440
55620
|
if (subcommand === "defaults" && hasHelpFlag(args)) {
|
|
@@ -55445,10 +55625,6 @@ const runSkillsTail = async (tail) => {
|
|
|
55445
55625
|
printLintHelp();
|
|
55446
55626
|
return 0;
|
|
55447
55627
|
}
|
|
55448
|
-
if (subcommand === "updo" && hasHelpFlag(args)) {
|
|
55449
|
-
printUpdoHelp();
|
|
55450
|
-
return 0;
|
|
55451
|
-
}
|
|
55452
55628
|
if (subcommand === "defaults") return skillsDefaults(args);
|
|
55453
55629
|
if (subcommand === "lint") {
|
|
55454
55630
|
if (args.includes("--rules")) return ruleCatalogResult(await getSkillsLintRuleCatalog(), RULE_COMMANDS.skillsLint.title);
|
|
@@ -55459,7 +55635,6 @@ const runSkillsTail = async (tail) => {
|
|
|
55459
55635
|
}
|
|
55460
55636
|
return skillsLint(parseLintArgs(args));
|
|
55461
55637
|
}
|
|
55462
|
-
if (subcommand === "updo") return skillsUpdo(args);
|
|
55463
55638
|
return runSkills(tail);
|
|
55464
55639
|
};
|
|
55465
55640
|
const skillsCommand = {
|
|
@@ -55471,7 +55646,7 @@ const skillsCommand = {
|
|
|
55471
55646
|
}).help(false).strict(false).version(false);
|
|
55472
55647
|
},
|
|
55473
55648
|
command: "skills [args..]",
|
|
55474
|
-
describe: "Manage agent skills via the bundled Skills.sh CLI; forwards unknown commands and adds XY conveniences: defaults, lint
|
|
55649
|
+
describe: "Manage agent skills via the bundled Skills.sh CLI; forwards unknown commands and adds XY conveniences: defaults, lint",
|
|
55475
55650
|
handler: async () => {
|
|
55476
55651
|
const tail = argvAfterCommand("skills");
|
|
55477
55652
|
await withEnvelope(CUSTOM_SKILLS_COMMANDS.has(tail[0] ?? "") ? `skills ${tail[0]}` : "skills", () => runSkillsTail(tail));
|