@ariestools/toolchain 10.0.3 → 10.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/actions/dead/types.d.ts +0 -1
- package/dist/actions/dead/types.d.ts.map +1 -1
- package/dist/actions/package/compile/XyConfig.d.ts +11 -0
- package/dist/actions/package/compile/XyConfig.d.ts.map +1 -1
- package/dist/actions/package-lint-docs.d.ts +12 -0
- package/dist/actions/package-lint-docs.d.ts.map +1 -0
- package/dist/actions/package-lint.d.ts.map +1 -1
- package/dist/actions/plan/lint.d.ts.map +1 -1
- package/dist/actions/plan/markdown.d.ts +8 -0
- package/dist/actions/plan/markdown.d.ts.map +1 -0
- package/dist/actions/plan/rootDocs.d.ts +10 -0
- package/dist/actions/plan/rootDocs.d.ts.map +1 -0
- package/dist/actions/plan/templates.d.ts +18 -3
- package/dist/actions/plan/templates.d.ts.map +1 -1
- package/dist/actions/repo-init/scaffold.d.ts.map +1 -1
- package/dist/actions/skills/lint.d.ts.map +1 -1
- package/dist/actions/skills/skillRules.d.ts +14 -1
- package/dist/actions/skills/skillRules.d.ts.map +1 -1
- package/dist/bin/package/build.mjs +2 -2
- package/dist/bin/package/build.mjs.map +1 -1
- package/dist/bin/package/clean.mjs +2 -2
- package/dist/bin/package/clean.mjs.map +1 -1
- package/dist/bin/package/compile.mjs +2 -2
- package/dist/bin/package/compile.mjs.map +1 -1
- package/dist/bin/package/publint.mjs +2 -2
- package/dist/bin/package/publint.mjs.map +1 -1
- package/dist/bin/package/recompile.mjs +2 -2
- package/dist/bin/package/recompile.mjs.map +1 -1
- package/dist/bin/package/sync-layout.mjs +2 -2
- package/dist/bin/package/sync-layout.mjs.map +1 -1
- package/dist/bin/xy.mjs +396 -80
- package/dist/bin/xy.mjs.map +1 -1
- package/dist/bin/xyex.mjs +396 -80
- package/dist/bin/xyex.mjs.map +1 -1
- package/dist/xy/common/skills/index.d.ts.map +1 -1
- package/package.json +5 -5
- package/templates/repo/cli/package/README.md.tmpl +11 -0
- package/templates/repo/cli/root/AGENTS.md.tmpl +6 -1
- package/templates/repo/cli/root/CLAUDE.md.tmpl +2 -36
- package/templates/repo/cli/root/README.md.tmpl +14 -0
package/dist/bin/xyex.mjs
CHANGED
|
@@ -11808,7 +11808,7 @@ var require_dist$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
11808
11808
|
exports.cosmiconfigSync = cosmiconfigSync;
|
|
11809
11809
|
}));
|
|
11810
11810
|
//#endregion
|
|
11811
|
-
//#region ../../node_modules/.pnpm/cosmiconfig-typescript-loader@6.3.0_@types+node@26.
|
|
11811
|
+
//#region ../../node_modules/.pnpm/cosmiconfig-typescript-loader@6.3.0_@types+node@26.5.0_cosmiconfig@10.0.1_typescript@6.0.3/node_modules/cosmiconfig-typescript-loader/dist/esm/typescript-compile-error.mjs
|
|
11812
11812
|
var TypeScriptCompileError = class _TypeScriptCompileError extends Error {
|
|
11813
11813
|
constructor(message) {
|
|
11814
11814
|
super(message);
|
|
@@ -11824,7 +11824,7 @@ ${error.message}`;
|
|
|
11824
11824
|
}
|
|
11825
11825
|
};
|
|
11826
11826
|
//#endregion
|
|
11827
|
-
//#region ../../node_modules/.pnpm/cosmiconfig-typescript-loader@6.3.0_@types+node@26.
|
|
11827
|
+
//#region ../../node_modules/.pnpm/cosmiconfig-typescript-loader@6.3.0_@types+node@26.5.0_cosmiconfig@10.0.1_typescript@6.0.3/node_modules/cosmiconfig-typescript-loader/dist/esm/loader.mjs
|
|
11828
11828
|
function TypeScriptLoader(options) {
|
|
11829
11829
|
const loader = createJiti("", {
|
|
11830
11830
|
interopDefault: true,
|
|
@@ -20736,7 +20736,7 @@ const LOCAL_PROTOCOLS = [
|
|
|
20736
20736
|
"link:",
|
|
20737
20737
|
"portal:"
|
|
20738
20738
|
];
|
|
20739
|
-
function readPackageJson$
|
|
20739
|
+
function readPackageJson$11(filePath) {
|
|
20740
20740
|
if (!existsSync(filePath)) return void 0;
|
|
20741
20741
|
try {
|
|
20742
20742
|
return JSON.parse(readFileSync(filePath, "utf8"));
|
|
@@ -20747,7 +20747,7 @@ function readPackageJson$10(filePath) {
|
|
|
20747
20747
|
function collectSecurePackageTargets(cwd, workspaces) {
|
|
20748
20748
|
const targets = [];
|
|
20749
20749
|
const seenLocations = /* @__PURE__ */ new Set();
|
|
20750
|
-
const rootName = readPackageJson$
|
|
20750
|
+
const rootName = readPackageJson$11(PATH.resolve(cwd, "package.json"))?.name;
|
|
20751
20751
|
if (rootName !== void 0 && rootName.length > 0) {
|
|
20752
20752
|
targets.push({
|
|
20753
20753
|
dir: PATH.resolve(cwd),
|
|
@@ -20788,7 +20788,7 @@ function collectExternalDeclaredDeps(deps, depType, target, localPackageNames, d
|
|
|
20788
20788
|
function collectSecureDeclaredDependencies(cwd, targets, localPackageNames) {
|
|
20789
20789
|
const declared = [];
|
|
20790
20790
|
for (const target of targets) {
|
|
20791
|
-
const pkg = readPackageJson$
|
|
20791
|
+
const pkg = readPackageJson$11(PATH.resolve(cwd, target.location, "package.json"));
|
|
20792
20792
|
if (!pkg) continue;
|
|
20793
20793
|
for (const depType of DEP_FIELDS$1) collectExternalDeclaredDeps(pkg[depType], depType, target, localPackageNames, declared);
|
|
20794
20794
|
}
|
|
@@ -21880,13 +21880,13 @@ async function fetchAllRegistryInfo(packageNames, options = {}) {
|
|
|
21880
21880
|
return await fetchAllRegistryInfoDirect(packageNames, options);
|
|
21881
21881
|
}
|
|
21882
21882
|
//#endregion
|
|
21883
|
-
//#region ../../node_modules/.pnpm/@inquirer+core@12.0.2_@types+node@26.
|
|
21883
|
+
//#region ../../node_modules/.pnpm/@inquirer+core@12.0.2_@types+node@26.5.0/node_modules/@inquirer/core/dist/lib/key.js
|
|
21884
21884
|
const isUpKey = (key, keybindings = []) => key.name === "up" || keybindings.includes("vim") && key.name === "k" || keybindings.includes("emacs") && key.ctrl && key.name === "p";
|
|
21885
21885
|
const isDownKey = (key, keybindings = []) => key.name === "down" || keybindings.includes("vim") && key.name === "j" || keybindings.includes("emacs") && key.ctrl && key.name === "n";
|
|
21886
21886
|
const isSpaceKey = (key) => key.name === "space";
|
|
21887
21887
|
const isEnterKey = (key) => key.name === "enter" || key.name === "return";
|
|
21888
21888
|
//#endregion
|
|
21889
|
-
//#region ../../node_modules/.pnpm/@inquirer+core@12.0.2_@types+node@26.
|
|
21889
|
+
//#region ../../node_modules/.pnpm/@inquirer+core@12.0.2_@types+node@26.5.0/node_modules/@inquirer/core/dist/lib/errors.js
|
|
21890
21890
|
var AbortPromptError = class extends Error {
|
|
21891
21891
|
name = "AbortPromptError";
|
|
21892
21892
|
message = "Prompt was aborted";
|
|
@@ -21909,7 +21909,7 @@ var ValidationError = class extends Error {
|
|
|
21909
21909
|
name = "ValidationError";
|
|
21910
21910
|
};
|
|
21911
21911
|
//#endregion
|
|
21912
|
-
//#region ../../node_modules/.pnpm/@inquirer+core@12.0.2_@types+node@26.
|
|
21912
|
+
//#region ../../node_modules/.pnpm/@inquirer+core@12.0.2_@types+node@26.5.0/node_modules/@inquirer/core/dist/lib/hook-engine.js
|
|
21913
21913
|
const hookStorage = new AsyncLocalStorage();
|
|
21914
21914
|
function createStore(rl) {
|
|
21915
21915
|
return {
|
|
@@ -22005,7 +22005,7 @@ const effectScheduler = {
|
|
|
22005
22005
|
}
|
|
22006
22006
|
};
|
|
22007
22007
|
//#endregion
|
|
22008
|
-
//#region ../../node_modules/.pnpm/@inquirer+core@12.0.2_@types+node@26.
|
|
22008
|
+
//#region ../../node_modules/.pnpm/@inquirer+core@12.0.2_@types+node@26.5.0/node_modules/@inquirer/core/dist/lib/use-state.js
|
|
22009
22009
|
function isFactory(value) {
|
|
22010
22010
|
return typeof value === "function";
|
|
22011
22011
|
}
|
|
@@ -22029,7 +22029,7 @@ function useState(defaultValue) {
|
|
|
22029
22029
|
});
|
|
22030
22030
|
}
|
|
22031
22031
|
//#endregion
|
|
22032
|
-
//#region ../../node_modules/.pnpm/@inquirer+core@12.0.2_@types+node@26.
|
|
22032
|
+
//#region ../../node_modules/.pnpm/@inquirer+core@12.0.2_@types+node@26.5.0/node_modules/@inquirer/core/dist/lib/use-effect.js
|
|
22033
22033
|
function useEffect(cb, depArray) {
|
|
22034
22034
|
withPointer((pointer) => {
|
|
22035
22035
|
const oldDeps = pointer.get();
|
|
@@ -22038,12 +22038,12 @@ function useEffect(cb, depArray) {
|
|
|
22038
22038
|
});
|
|
22039
22039
|
}
|
|
22040
22040
|
//#endregion
|
|
22041
|
-
//#region ../../node_modules/.pnpm/@inquirer+core@12.0.2_@types+node@26.
|
|
22041
|
+
//#region ../../node_modules/.pnpm/@inquirer+core@12.0.2_@types+node@26.5.0/node_modules/@inquirer/core/dist/lib/use-ref.js
|
|
22042
22042
|
function useRef(val) {
|
|
22043
22043
|
return useState({ current: val })[0];
|
|
22044
22044
|
}
|
|
22045
22045
|
//#endregion
|
|
22046
|
-
//#region ../../node_modules/.pnpm/@inquirer+core@12.0.2_@types+node@26.
|
|
22046
|
+
//#region ../../node_modules/.pnpm/@inquirer+core@12.0.2_@types+node@26.5.0/node_modules/@inquirer/core/dist/lib/use-keypress.js
|
|
22047
22047
|
function useKeypress(userHandler) {
|
|
22048
22048
|
const signal = useRef(userHandler);
|
|
22049
22049
|
signal.current = userHandler;
|
|
@@ -22371,7 +22371,7 @@ function wrapAnsi$1(string, columns, options) {
|
|
|
22371
22371
|
return String(string).normalize().split(CRLF_OR_LF).map((line) => exec$2(line, columns, options)).join("\n");
|
|
22372
22372
|
}
|
|
22373
22373
|
//#endregion
|
|
22374
|
-
//#region ../../node_modules/.pnpm/@inquirer+core@12.0.2_@types+node@26.
|
|
22374
|
+
//#region ../../node_modules/.pnpm/@inquirer+core@12.0.2_@types+node@26.5.0/node_modules/@inquirer/core/dist/lib/utils.js
|
|
22375
22375
|
var import_cli_width = /* @__PURE__ */ __toESM(require_cli_width(), 1);
|
|
22376
22376
|
/**
|
|
22377
22377
|
* Force line returns at specific width. This function is ANSI code friendly and it'll
|
|
@@ -22711,7 +22711,7 @@ const eraseLine = "\x1B[2K";
|
|
|
22711
22711
|
/** Erase the specified number of lines above the cursor */
|
|
22712
22712
|
const eraseLines = (lines) => lines > 0 ? (eraseLine + cursorUp(1)).repeat(lines - 1) + "\x1B[2K\x1B[G" : "";
|
|
22713
22713
|
//#endregion
|
|
22714
|
-
//#region ../../node_modules/.pnpm/@inquirer+core@12.0.2_@types+node@26.
|
|
22714
|
+
//#region ../../node_modules/.pnpm/@inquirer+core@12.0.2_@types+node@26.5.0/node_modules/@inquirer/core/dist/lib/screen-manager.js
|
|
22715
22715
|
const height = (content) => content.split("\n").length;
|
|
22716
22716
|
const lastLine = (content) => content.split("\n").pop() ?? "";
|
|
22717
22717
|
var ScreenManager = class {
|
|
@@ -22768,7 +22768,7 @@ var ScreenManager = class {
|
|
|
22768
22768
|
}
|
|
22769
22769
|
};
|
|
22770
22770
|
//#endregion
|
|
22771
|
-
//#region ../../node_modules/.pnpm/@inquirer+core@12.0.2_@types+node@26.
|
|
22771
|
+
//#region ../../node_modules/.pnpm/@inquirer+core@12.0.2_@types+node@26.5.0/node_modules/@inquirer/core/dist/lib/promise-polyfill.js
|
|
22772
22772
|
var PromisePolyfill = class extends Promise {
|
|
22773
22773
|
static withResolver() {
|
|
22774
22774
|
let resolve;
|
|
@@ -22784,7 +22784,7 @@ var PromisePolyfill = class extends Promise {
|
|
|
22784
22784
|
}
|
|
22785
22785
|
};
|
|
22786
22786
|
//#endregion
|
|
22787
|
-
//#region ../../node_modules/.pnpm/@inquirer+core@12.0.2_@types+node@26.
|
|
22787
|
+
//#region ../../node_modules/.pnpm/@inquirer+core@12.0.2_@types+node@26.5.0/node_modules/@inquirer/core/dist/lib/create-prompt.js
|
|
22788
22788
|
var import_lib = /* @__PURE__ */ __toESM(require_lib(), 1);
|
|
22789
22789
|
const nativeSetImmediate = globalThis.setImmediate;
|
|
22790
22790
|
function getCallSites() {
|
|
@@ -23771,7 +23771,7 @@ function isWorkspaceRootPackage(location, pkg) {
|
|
|
23771
23771
|
const abs = PATH.resolve(location);
|
|
23772
23772
|
return fs.existsSync(PATH.join(abs, "pnpm-workspace.yaml")) || fs.existsSync(PATH.join(abs, "pnpm-workspace.yml"));
|
|
23773
23773
|
}
|
|
23774
|
-
function readPackageJson$
|
|
23774
|
+
function readPackageJson$10(location) {
|
|
23775
23775
|
try {
|
|
23776
23776
|
return JSON.parse(fs.readFileSync(`${location}/package.json`, "utf8"));
|
|
23777
23777
|
} catch {
|
|
@@ -23843,7 +23843,7 @@ function buildClassification(role, facets, runtimeRoots) {
|
|
|
23843
23843
|
*/
|
|
23844
23844
|
function classifyDeplintPackage(location, optionsOrTerminal) {
|
|
23845
23845
|
const options = typeof optionsOrTerminal === "boolean" ? { terminal: optionsOrTerminal } : optionsOrTerminal;
|
|
23846
|
-
const pkg = readPackageJson$
|
|
23846
|
+
const pkg = readPackageJson$10(location);
|
|
23847
23847
|
if (pkg === void 0) return buildClassification("library", applyFacetOverrides(ROLE_FACET_DEFAULTS.library, options ?? {}), options?.runtimeRoots ?? []);
|
|
23848
23848
|
const merged = mergeOptions(pkg.xy?.commands?.deplint, options);
|
|
23849
23849
|
const autoRole = detectRole(location, pkg);
|
|
@@ -25374,7 +25374,7 @@ function collectExportTargets$3(value) {
|
|
|
25374
25374
|
if (typeof value !== "object" || value === null) return [];
|
|
25375
25375
|
return Object.values(value).flatMap(collectExportTargets$3);
|
|
25376
25376
|
}
|
|
25377
|
-
function readPackageJson$
|
|
25377
|
+
function readPackageJson$9(workspaceDir) {
|
|
25378
25378
|
try {
|
|
25379
25379
|
return JSON.parse(fs.readFileSync(PATH.join(workspaceDir, "package.json"), "utf8"));
|
|
25380
25380
|
} catch {
|
|
@@ -25427,7 +25427,7 @@ function mapEntryToSource(workspaceDir, entry) {
|
|
|
25427
25427
|
* to its `src/` origin. Falls back to `src/index.ts` when nothing maps.
|
|
25428
25428
|
*/
|
|
25429
25429
|
function resolveEntryPoints(workspaceDir) {
|
|
25430
|
-
const pkg = readPackageJson$
|
|
25430
|
+
const pkg = readPackageJson$9(workspaceDir);
|
|
25431
25431
|
const bin = pkg?.bin;
|
|
25432
25432
|
const manifestEntries = [
|
|
25433
25433
|
...collectExportTargets$3(pkg?.exports),
|
|
@@ -26753,7 +26753,7 @@ function readJsonFile(filePath) {
|
|
|
26753
26753
|
return {};
|
|
26754
26754
|
}
|
|
26755
26755
|
}
|
|
26756
|
-
function readPackageJson$
|
|
26756
|
+
function readPackageJson$8(rootDir, workspace) {
|
|
26757
26757
|
return readJsonFile(PATH.resolve(rootDir, workspace.location, "package.json"));
|
|
26758
26758
|
}
|
|
26759
26759
|
function isStringRecord(value) {
|
|
@@ -26891,7 +26891,7 @@ function createCurrentSnapshot({ action, options, pm, workspaces }) {
|
|
|
26891
26891
|
const fingerprints = {};
|
|
26892
26892
|
const sortedWorkspaces = workspaces.toSorted((a, b) => a.name.localeCompare(b.name));
|
|
26893
26893
|
for (const workspace of sortedWorkspaces) {
|
|
26894
|
-
const pkg = readPackageJson$
|
|
26894
|
+
const pkg = readPackageJson$8(rootDir, workspace);
|
|
26895
26895
|
const packageJsonPath = PATH.resolve(rootDir, workspace.location, "package.json");
|
|
26896
26896
|
const deps = workspaceDependencyNames(pkg, workspaceNames);
|
|
26897
26897
|
workspaceDeps[workspace.name] = deps;
|
|
@@ -26942,7 +26942,7 @@ function createDependentsMap(workspaces) {
|
|
|
26942
26942
|
const dependents = /* @__PURE__ */ new Map();
|
|
26943
26943
|
for (const workspace of workspaces) dependents.set(workspace.name, /* @__PURE__ */ new Set());
|
|
26944
26944
|
for (const workspace of workspaces) {
|
|
26945
|
-
const deps = workspaceDependencyNames(readPackageJson$
|
|
26945
|
+
const deps = workspaceDependencyNames(readPackageJson$8(rootDir, workspace), workspaceNames);
|
|
26946
26946
|
for (const dep of deps) dependents.get(dep)?.add(workspace.name);
|
|
26947
26947
|
}
|
|
26948
26948
|
return dependents;
|
|
@@ -28423,7 +28423,7 @@ function createSourceFileFilter(location, sourceIgnorePatterns) {
|
|
|
28423
28423
|
return !isIgnored(relativePath);
|
|
28424
28424
|
};
|
|
28425
28425
|
}
|
|
28426
|
-
function readPackageJson$
|
|
28426
|
+
function readPackageJson$7(location) {
|
|
28427
28427
|
try {
|
|
28428
28428
|
return JSON.parse(fs.readFileSync(`${location}/package.json`, "utf8"));
|
|
28429
28429
|
} catch {
|
|
@@ -28593,7 +28593,7 @@ function normalizeFindFilesOptions(sourceExcludeOrOptions) {
|
|
|
28593
28593
|
*/
|
|
28594
28594
|
function findFiles(location, sourceExcludeOrOptions) {
|
|
28595
28595
|
const { sourceExclude, runtimeEntry = "manifest", extraRuntimeRoots = [] } = normalizeFindFilesOptions(sourceExcludeOrOptions);
|
|
28596
|
-
const pkg = readPackageJson$
|
|
28596
|
+
const pkg = readPackageJson$7(location);
|
|
28597
28597
|
const workspaceIgnores = getNestedWorkspaceIgnores(location);
|
|
28598
28598
|
const sourceIgnorePatterns = toSourceIgnorePatterns(location, sourceExclude);
|
|
28599
28599
|
const shouldIncludeFile = createSourceFileFilter(location, sourceIgnorePatterns);
|
|
@@ -28848,7 +28848,7 @@ function hasExportTarget(location, target) {
|
|
|
28848
28848
|
if (target.includes("*")) return findFilesByGlob(location, target).length > 0;
|
|
28849
28849
|
return fs.existsSync(PATH.resolve(location, target));
|
|
28850
28850
|
}
|
|
28851
|
-
function readPackageJson$
|
|
28851
|
+
function readPackageJson$6(location) {
|
|
28852
28852
|
try {
|
|
28853
28853
|
return JSON.parse(fs.readFileSync(`${location}/package.json`, "utf8"));
|
|
28854
28854
|
} catch {
|
|
@@ -28856,7 +28856,7 @@ function readPackageJson$5(location) {
|
|
|
28856
28856
|
}
|
|
28857
28857
|
}
|
|
28858
28858
|
function warnMissingExportTargets(name, location) {
|
|
28859
|
-
const targets = collectExportTargets$1(readPackageJson$
|
|
28859
|
+
const targets = collectExportTargets$1(readPackageJson$6(location)?.exports);
|
|
28860
28860
|
const warnedTargets = /* @__PURE__ */ new Set();
|
|
28861
28861
|
const prefix = name != null && name.length > 0 ? `[${chalk.blue(name)}] ` : "";
|
|
28862
28862
|
for (const { path: exportPath, target } of targets) {
|
|
@@ -28868,7 +28868,7 @@ function warnMissingExportTargets(name, location) {
|
|
|
28868
28868
|
}
|
|
28869
28869
|
}
|
|
28870
28870
|
function hasShippedTsconfig(location) {
|
|
28871
|
-
return (readPackageJson$
|
|
28871
|
+
return (readPackageJson$6(location)?.files)?.some((f) => f === "tsconfig.json" || f.includes("tsconfig")) ?? false;
|
|
28872
28872
|
}
|
|
28873
28873
|
function getEffectiveRuntimeImportPaths({ distImportPaths, distTypeImportPaths, hasDist, srcImportPaths, srcTypeImportPaths, useSourceFallback }) {
|
|
28874
28874
|
if (hasDist) return {
|
|
@@ -29688,10 +29688,10 @@ function sortPackageJson(jsonIsh, options = {}) {
|
|
|
29688
29688
|
}
|
|
29689
29689
|
//#endregion
|
|
29690
29690
|
//#region src/actions/deplint/packageJsonEditor.ts
|
|
29691
|
-
function readPackageJson$
|
|
29691
|
+
function readPackageJson$5(location) {
|
|
29692
29692
|
return JSON.parse(fs.readFileSync(`${location}/package.json`, "utf8"));
|
|
29693
29693
|
}
|
|
29694
|
-
function writePackageJson$
|
|
29694
|
+
function writePackageJson$3(location, pkg) {
|
|
29695
29695
|
const sorted = sortPackageJson(JSON.stringify(pkg, null, 2));
|
|
29696
29696
|
fs.writeFileSync(`${location}/package.json`, `${sorted}\n`);
|
|
29697
29697
|
}
|
|
@@ -30798,7 +30798,7 @@ async function lookupNpmjsPublicAvailabilities(packageNames, concurrency = 16) {
|
|
|
30798
30798
|
function workspaceVisibilityByName(workspaceDirs) {
|
|
30799
30799
|
const visibilities = /* @__PURE__ */ new Map();
|
|
30800
30800
|
for (const [name, dir] of workspaceDirs) try {
|
|
30801
|
-
visibilities.set(name, classifyPackageVisibility(readPackageJson$
|
|
30801
|
+
visibilities.set(name, classifyPackageVisibility(readPackageJson$5(dir)));
|
|
30802
30802
|
} catch {}
|
|
30803
30803
|
return visibilities;
|
|
30804
30804
|
}
|
|
@@ -30867,7 +30867,7 @@ async function evaluateNotPublicSection(context, section, dependencies, versions
|
|
|
30867
30867
|
}
|
|
30868
30868
|
function readPackageJsonSafe(context) {
|
|
30869
30869
|
try {
|
|
30870
|
-
return readPackageJson$
|
|
30870
|
+
return readPackageJson$5(context.workspace.dir);
|
|
30871
30871
|
} catch {
|
|
30872
30872
|
return;
|
|
30873
30873
|
}
|
|
@@ -32169,7 +32169,7 @@ var DeplintPackageEditor = class {
|
|
|
32169
32169
|
workspace;
|
|
32170
32170
|
constructor(workspace) {
|
|
32171
32171
|
this.workspace = workspace;
|
|
32172
|
-
this.pkg = readPackageJson$
|
|
32172
|
+
this.pkg = readPackageJson$5(workspace.location);
|
|
32173
32173
|
}
|
|
32174
32174
|
applyFix(fix) {
|
|
32175
32175
|
const before = JSON.stringify(this.pkg);
|
|
@@ -32199,7 +32199,7 @@ var DeplintPackageEditor = class {
|
|
|
32199
32199
|
}
|
|
32200
32200
|
save() {
|
|
32201
32201
|
if (!this.dirty) return;
|
|
32202
|
-
writePackageJson$
|
|
32202
|
+
writePackageJson$3(this.workspace.location, this.pkg);
|
|
32203
32203
|
}
|
|
32204
32204
|
};
|
|
32205
32205
|
//#endregion
|
|
@@ -32541,7 +32541,7 @@ async function runDeplint(workspaces, options, workspaceNames) {
|
|
|
32541
32541
|
}
|
|
32542
32542
|
//#endregion
|
|
32543
32543
|
//#region src/actions/deplint/deplint.ts
|
|
32544
|
-
function emptyResult$
|
|
32544
|
+
function emptyResult$8() {
|
|
32545
32545
|
return {
|
|
32546
32546
|
envelope: { errorCount: 0 },
|
|
32547
32547
|
exitCode: 0
|
|
@@ -32572,7 +32572,7 @@ const deplint = async ({ pkg, classifier, deps, devDeps, fix, peerDeps, profile,
|
|
|
32572
32572
|
const effectiveFormat = format ?? (isJsonMode() ? "json" : "human");
|
|
32573
32573
|
const targetPackage = typeof pkg === "string" && pkg !== "undefined" && pkg.length > 0 ? pkg : void 0;
|
|
32574
32574
|
const { allWorkspaces, targetWorkspaces, workspaceNames } = resolveTargetWorkspaces$1(targetPackage, inputWorkspaces);
|
|
32575
|
-
if (targetPackage === void 0 && inputWorkspaces !== void 0 && targetWorkspaces.length === 0) return emptyResult$
|
|
32575
|
+
if (targetPackage === void 0 && inputWorkspaces !== void 0 && targetWorkspaces.length === 0) return emptyResult$8();
|
|
32576
32576
|
if (targetWorkspaces.length === 0) return missingWorkspaceResult(targetPackage);
|
|
32577
32577
|
const result = await runDeplint(targetWorkspaces, {
|
|
32578
32578
|
classifier,
|
|
@@ -35617,7 +35617,7 @@ const CONFIG_FILE_NAMES$1 = [
|
|
|
35617
35617
|
"xy.config.mjs",
|
|
35618
35618
|
"xy.config.cjs"
|
|
35619
35619
|
];
|
|
35620
|
-
function emptyResult$
|
|
35620
|
+
function emptyResult$7() {
|
|
35621
35621
|
return {
|
|
35622
35622
|
errors: 0,
|
|
35623
35623
|
modified: false,
|
|
@@ -35685,7 +35685,7 @@ function removeProperties(text, props, sourceFile) {
|
|
|
35685
35685
|
* field should be `false` (explicit off) or removed.
|
|
35686
35686
|
*/
|
|
35687
35687
|
function checkCompileTargets(pkgDir, shouldFix) {
|
|
35688
|
-
const result = emptyResult$
|
|
35688
|
+
const result = emptyResult$7();
|
|
35689
35689
|
const configPath = findConfigFile(pkgDir);
|
|
35690
35690
|
if (configPath === void 0) return result;
|
|
35691
35691
|
const text = fs.readFileSync(configPath, "utf8");
|
|
@@ -35703,7 +35703,7 @@ function checkCompileTargets(pkgDir, shouldFix) {
|
|
|
35703
35703
|
}
|
|
35704
35704
|
//#endregion
|
|
35705
35705
|
//#region src/actions/package/exportConditionPublint.ts
|
|
35706
|
-
function emptyResult$
|
|
35706
|
+
function emptyResult$6() {
|
|
35707
35707
|
return {
|
|
35708
35708
|
errors: 0,
|
|
35709
35709
|
modified: false,
|
|
@@ -35780,7 +35780,7 @@ function shouldReorderDefaultKeys(exports) {
|
|
|
35780
35780
|
return isModified;
|
|
35781
35781
|
}
|
|
35782
35782
|
function checkNeutralToDefault(pkg, shouldFix, log) {
|
|
35783
|
-
const result = emptyResult$
|
|
35783
|
+
const result = emptyResult$6();
|
|
35784
35784
|
const exports = pkg.exports;
|
|
35785
35785
|
if (!isNestedExportObject(exports) || !hasNeutralExport(exports)) return result;
|
|
35786
35786
|
if (shouldFix) {
|
|
@@ -35792,7 +35792,7 @@ function checkNeutralToDefault(pkg, shouldFix, log) {
|
|
|
35792
35792
|
return result;
|
|
35793
35793
|
}
|
|
35794
35794
|
function checkDefaultExportOrder(pkg, shouldFix, log) {
|
|
35795
|
-
const result = emptyResult$
|
|
35795
|
+
const result = emptyResult$6();
|
|
35796
35796
|
const exports = pkg.exports;
|
|
35797
35797
|
if (!isNestedExportObject(exports) || !hasDefaultNotLast(exports)) return result;
|
|
35798
35798
|
if (shouldFix) {
|
|
@@ -35929,7 +35929,7 @@ const platformSegments$1 = /* @__PURE__ */ new Set([
|
|
|
35929
35929
|
"neutral",
|
|
35930
35930
|
"node"
|
|
35931
35931
|
]);
|
|
35932
|
-
function emptyResult$
|
|
35932
|
+
function emptyResult$5() {
|
|
35933
35933
|
return {
|
|
35934
35934
|
errors: 0,
|
|
35935
35935
|
modified: false,
|
|
@@ -36122,7 +36122,7 @@ function activePlatforms(outputs) {
|
|
|
36122
36122
|
return [...new Set(outputs.map((output) => output.platform))];
|
|
36123
36123
|
}
|
|
36124
36124
|
function fixMissingExport(pkg, expected, allOutputs) {
|
|
36125
|
-
const result = emptyResult$
|
|
36125
|
+
const result = emptyResult$5();
|
|
36126
36126
|
const isNormalized = shouldNormalizeExportsForFix(pkg);
|
|
36127
36127
|
if (!isRecordObject(pkg.exports)) {
|
|
36128
36128
|
result.modified = isNormalized;
|
|
@@ -36144,7 +36144,7 @@ function fixMissingExport(pkg, expected, allOutputs) {
|
|
|
36144
36144
|
return result;
|
|
36145
36145
|
}
|
|
36146
36146
|
async function checkExportMappings(pkgDir, pkg, shouldFix) {
|
|
36147
|
-
const result = emptyResult$
|
|
36147
|
+
const result = emptyResult$5();
|
|
36148
36148
|
const expectedOutputs = await collectExpectedCompileOutputs(pkgDir);
|
|
36149
36149
|
if (expectedOutputs.length === 0) return result;
|
|
36150
36150
|
const diagnostics = dedupeDiagnostics$1(exportMapDiagnostics(pkgDir, pkg, expectedOutputs));
|
|
@@ -39311,10 +39311,10 @@ function mergeLeveledResult(target, source, check, rules) {
|
|
|
39311
39311
|
} else mergeResults(target, source);
|
|
39312
39312
|
target.modified ||= source.modified;
|
|
39313
39313
|
}
|
|
39314
|
-
async function readPackageJson$
|
|
39314
|
+
async function readPackageJson$4(pkgDir) {
|
|
39315
39315
|
return JSON.parse(await promises.readFile(PATH.join(pkgDir, "package.json"), "utf8"));
|
|
39316
39316
|
}
|
|
39317
|
-
async function writePackageJson$
|
|
39317
|
+
async function writePackageJson$2(pkgDir, pkg) {
|
|
39318
39318
|
const sorted = sortPackageJson(JSON.stringify(pkg, null, 2));
|
|
39319
39319
|
await promises.writeFile(PATH.join(pkgDir, "package.json"), sorted);
|
|
39320
39320
|
}
|
|
@@ -39537,9 +39537,9 @@ function applyEffectiveExcludes(pkg, exclude, rules) {
|
|
|
39537
39537
|
async function runCustomPublintPass(pkgDir, pkg, shouldFix, rules) {
|
|
39538
39538
|
const [errors, warnings, modified] = await customPubLint(pkgDir, pkg, shouldFix, rules);
|
|
39539
39539
|
if (shouldFix && modified) {
|
|
39540
|
-
await writePackageJson$
|
|
39540
|
+
await writePackageJson$2(pkgDir, pkg);
|
|
39541
39541
|
return {
|
|
39542
|
-
pkg: await readPackageJson$
|
|
39542
|
+
pkg: await readPackageJson$4(pkgDir),
|
|
39543
39543
|
result: {
|
|
39544
39544
|
errors,
|
|
39545
39545
|
modified,
|
|
@@ -39594,7 +39594,7 @@ const packagePublintDetailed = async ({ exclude = /* @__PURE__ */ new Set(), rul
|
|
|
39594
39594
|
const wsPublintConfig = normalizePublintConfig$1(await loadWorkspaceCommandConfig(pkgDir, "publint"));
|
|
39595
39595
|
const shouldPack = shouldPackParam ?? wsPublintConfig.pack ?? true;
|
|
39596
39596
|
const resolvedRules = ruleLevels === void 0 ? resolvePublintRules(wsPublintConfig) : cloneResolvedPublintRules(ruleLevels);
|
|
39597
|
-
let pkg = await readPackageJson$
|
|
39597
|
+
let pkg = await readPackageJson$4(pkgDir);
|
|
39598
39598
|
applyEffectiveExcludes(pkg, exclude, resolvedRules);
|
|
39599
39599
|
console.log(chalk.green(`Publint: ${String(pkg.name)}${Boolean(pkg.private) ? chalk.gray(" (private)") : ""}`));
|
|
39600
39600
|
console.log(chalk.gray(pkgDir));
|
|
@@ -40273,7 +40273,7 @@ const build = async ({ incremental, jobs, verbose, pkg }) => {
|
|
|
40273
40273
|
};
|
|
40274
40274
|
//#endregion
|
|
40275
40275
|
//#region src/actions/clean.ts
|
|
40276
|
-
function readPackageJson$
|
|
40276
|
+
function readPackageJson$3(packagePath) {
|
|
40277
40277
|
const packageJsonPath = PATH.join(packagePath, "package.json");
|
|
40278
40278
|
if (!existsSync(packageJsonPath)) return void 0;
|
|
40279
40279
|
try {
|
|
@@ -40283,7 +40283,7 @@ function readPackageJson$2(packagePath) {
|
|
|
40283
40283
|
}
|
|
40284
40284
|
}
|
|
40285
40285
|
function rootWorkspace(rootDir) {
|
|
40286
|
-
const name = readPackageJson$
|
|
40286
|
+
const name = readPackageJson$3(rootDir)?.name ?? packageName();
|
|
40287
40287
|
return name != null && name.length > 0 ? {
|
|
40288
40288
|
dir: PATH.resolve(rootDir),
|
|
40289
40289
|
location: ".",
|
|
@@ -40297,7 +40297,7 @@ function cleanWorkspaces(rootDir, pm) {
|
|
|
40297
40297
|
return root === void 0 ? workspaces : [root, ...workspaces];
|
|
40298
40298
|
}
|
|
40299
40299
|
function hasPackageCleanScript(rootDir, workspace) {
|
|
40300
|
-
const pkg = readPackageJson$
|
|
40300
|
+
const pkg = readPackageJson$3(PATH.join(rootDir, workspace.location));
|
|
40301
40301
|
return Object.hasOwn(pkg?.scripts ?? {}, "package-clean");
|
|
40302
40302
|
}
|
|
40303
40303
|
async function cleanBuiltInWorkspaces(rootDir, workspaces, jobs, fullMode) {
|
|
@@ -42972,7 +42972,7 @@ function ensureNativeDevDependency(cwd, pkg, nativeSpec, isVerbose) {
|
|
|
42972
42972
|
if (Object.keys(pkg.dependencies).length === 0) delete pkg.dependencies;
|
|
42973
42973
|
}
|
|
42974
42974
|
addDep(pkg, DEFAULT_NATIVE_PACKAGE, nativeSpec, "devDependencies");
|
|
42975
|
-
writePackageJson$
|
|
42975
|
+
writePackageJson$3(cwd, pkg);
|
|
42976
42976
|
console.log(chalk.green(`Added ${DEFAULT_NATIVE_PACKAGE}@${nativeSpec} to devDependencies`));
|
|
42977
42977
|
return true;
|
|
42978
42978
|
}
|
|
@@ -43031,7 +43031,7 @@ function enableTsNative({ noInstall = false, isVerbose = false } = {}) {
|
|
|
43031
43031
|
const cwd = INIT_CWD();
|
|
43032
43032
|
const packageJsonPath = PATH.join(cwd, "package.json");
|
|
43033
43033
|
if (!existsSync(packageJsonPath)) throw new Error(`No package.json found in ${cwd}`);
|
|
43034
|
-
const pkg = readPackageJson$
|
|
43034
|
+
const pkg = readPackageJson$5(cwd);
|
|
43035
43035
|
const nativeSpec = resolveNativeAliasSpec(pkg.devDependencies?.["typescript-native"] ?? pkg.dependencies?.["typescript-native"]);
|
|
43036
43036
|
const packageJsonChanged = ensureNativeDevDependency(cwd, pkg, nativeSpec, isVerbose);
|
|
43037
43037
|
logTypescriptApiStatus(pkg, isVerbose);
|
|
@@ -44230,14 +44230,14 @@ async function lintlint({ shouldFix, isVerbose } = {}) {
|
|
|
44230
44230
|
//#region src/actions/node-lint.ts
|
|
44231
44231
|
const REQUIRED_NODE_RANGE = ">=22";
|
|
44232
44232
|
const nodeConditionNames = /* @__PURE__ */ new Set(["node", "node-addons"]);
|
|
44233
|
-
function readPackageJson$
|
|
44233
|
+
function readPackageJson$2(path) {
|
|
44234
44234
|
try {
|
|
44235
44235
|
return JSON.parse(readFileSync(path, "utf8"));
|
|
44236
44236
|
} catch {
|
|
44237
44237
|
return;
|
|
44238
44238
|
}
|
|
44239
44239
|
}
|
|
44240
|
-
function writePackageJson(path, pkg) {
|
|
44240
|
+
function writePackageJson$1(path, pkg) {
|
|
44241
44241
|
writeFileSync(path, `${JSON.stringify(pkg, null, 2)}\n`, "utf8");
|
|
44242
44242
|
}
|
|
44243
44243
|
function targetPathPlatform(target) {
|
|
@@ -44260,14 +44260,14 @@ function isNodePackage(pkg) {
|
|
|
44260
44260
|
}
|
|
44261
44261
|
function checkVoltaNodeVersion(cwd, shouldFix) {
|
|
44262
44262
|
const rootPath = PATH.resolve(cwd, "package.json");
|
|
44263
|
-
const rootPkg = readPackageJson$
|
|
44263
|
+
const rootPkg = readPackageJson$2(rootPath);
|
|
44264
44264
|
if (!rootPkg?.volta) return [];
|
|
44265
44265
|
const pinned = rootPkg.volta.node;
|
|
44266
44266
|
const latest = latestVersions.node;
|
|
44267
44267
|
if (!(pinned === void 0 || import_semver.default.valid(pinned) === null || import_semver.default.lt(pinned, latest))) return [];
|
|
44268
44268
|
if (shouldFix) {
|
|
44269
44269
|
rootPkg.volta.node = latest;
|
|
44270
|
-
writePackageJson(rootPath, rootPkg);
|
|
44270
|
+
writePackageJson$1(rootPath, rootPkg);
|
|
44271
44271
|
console.log(chalk.green(` ✔ Fixed: set volta.node to ${latest} in root package.json`));
|
|
44272
44272
|
return [];
|
|
44273
44273
|
}
|
|
@@ -44279,7 +44279,7 @@ function checkVoltaNodeVersion(cwd, shouldFix) {
|
|
|
44279
44279
|
}
|
|
44280
44280
|
function checkPackageEngines(cwd, location, shouldFix) {
|
|
44281
44281
|
const pkgPath = PATH.resolve(cwd, location, "package.json");
|
|
44282
|
-
const pkg = readPackageJson$
|
|
44282
|
+
const pkg = readPackageJson$2(pkgPath);
|
|
44283
44283
|
if (!pkg) return [];
|
|
44284
44284
|
if (pkg.private === true) return [];
|
|
44285
44285
|
const label = pkg.name ?? location;
|
|
@@ -44292,7 +44292,7 @@ function checkPackageEngines(cwd, location, shouldFix) {
|
|
|
44292
44292
|
...pkg.engines,
|
|
44293
44293
|
node: REQUIRED_NODE_RANGE
|
|
44294
44294
|
};
|
|
44295
|
-
writePackageJson(pkgPath, pkg);
|
|
44295
|
+
writePackageJson$1(pkgPath, pkg);
|
|
44296
44296
|
console.log(chalk.green(` ✔ Fixed: set engines.node to "${REQUIRED_NODE_RANGE}" in ${file}`));
|
|
44297
44297
|
return [];
|
|
44298
44298
|
}
|
|
@@ -44308,7 +44308,7 @@ function checkPackageEngines(cwd, location, shouldFix) {
|
|
|
44308
44308
|
delete engines.node;
|
|
44309
44309
|
if (Object.keys(engines).length === 0) delete pkg.engines;
|
|
44310
44310
|
else pkg.engines = engines;
|
|
44311
|
-
writePackageJson(pkgPath, pkg);
|
|
44311
|
+
writePackageJson$1(pkgPath, pkg);
|
|
44312
44312
|
console.log(chalk.green(` ✔ Fixed: removed engines.node from ${file}`));
|
|
44313
44313
|
return [];
|
|
44314
44314
|
}
|
|
@@ -44361,7 +44361,7 @@ function logNodeDiagnostic(diagnostic) {
|
|
|
44361
44361
|
async function nodeLint(options = {}) {
|
|
44362
44362
|
const { shouldFix: isFix = false, verbose: isVerbose = false } = options;
|
|
44363
44363
|
const cwd = INIT_CWD();
|
|
44364
|
-
if (!readPackageJson$
|
|
44364
|
+
if (!readPackageJson$2(PATH.resolve(cwd, "package.json"))) {
|
|
44365
44365
|
console.error(chalk.red("Could not read package.json"));
|
|
44366
44366
|
return 1;
|
|
44367
44367
|
}
|
|
@@ -44460,6 +44460,113 @@ function orphanClean({ isVerbose } = {}) {
|
|
|
44460
44460
|
return 0;
|
|
44461
44461
|
}
|
|
44462
44462
|
//#endregion
|
|
44463
|
+
//#region src/actions/package-lint-docs.ts
|
|
44464
|
+
function emptyResult$4() {
|
|
44465
|
+
return {
|
|
44466
|
+
errors: [],
|
|
44467
|
+
fixable: [],
|
|
44468
|
+
warnings: []
|
|
44469
|
+
};
|
|
44470
|
+
}
|
|
44471
|
+
function isRootWorkspace(location) {
|
|
44472
|
+
return location === ".";
|
|
44473
|
+
}
|
|
44474
|
+
function packageDir(cwd, location) {
|
|
44475
|
+
return PATH.resolve(cwd, location);
|
|
44476
|
+
}
|
|
44477
|
+
function readPackageJson$1(cwd, location) {
|
|
44478
|
+
try {
|
|
44479
|
+
const raw = readFileSync(PATH.resolve(cwd, location, "package.json"), "utf8");
|
|
44480
|
+
return JSON.parse(raw);
|
|
44481
|
+
} catch {
|
|
44482
|
+
return;
|
|
44483
|
+
}
|
|
44484
|
+
}
|
|
44485
|
+
function writePackageJson(cwd, location, pkg) {
|
|
44486
|
+
writeFileSync(PATH.resolve(cwd, location, "package.json"), `${JSON.stringify(pkg, null, 2)}\n`, "utf8");
|
|
44487
|
+
}
|
|
44488
|
+
function readmeEntryKind(cwd, location) {
|
|
44489
|
+
const directory = packageDir(cwd, location);
|
|
44490
|
+
try {
|
|
44491
|
+
if (readdirSync(directory, { withFileTypes: true }).find((candidate) => candidate.name === "README.md") === void 0) return "missing";
|
|
44492
|
+
const stat = lstatSync(PATH.join(directory, "README.md"));
|
|
44493
|
+
return stat.isFile() && !stat.isSymbolicLink() ? "regular" : "other";
|
|
44494
|
+
} catch {
|
|
44495
|
+
return "missing";
|
|
44496
|
+
}
|
|
44497
|
+
}
|
|
44498
|
+
function packageReadmeTemplate(name, description) {
|
|
44499
|
+
return `# ${name}
|
|
44500
|
+
|
|
44501
|
+
${typeof description === "string" && description.trim().length > 0 ? description.trim() : "Package documentation for consumers."}
|
|
44502
|
+
|
|
44503
|
+
## Install
|
|
44504
|
+
|
|
44505
|
+
\`\`\`sh
|
|
44506
|
+
pnpm add ${name}
|
|
44507
|
+
\`\`\`
|
|
44508
|
+
|
|
44509
|
+
This README is the consumer entry point for the published package. Repository development docs live at the repository root (\`README.md\`, \`AGENTS.md\`, \`papers/\`, \`docs/\`).
|
|
44510
|
+
`;
|
|
44511
|
+
}
|
|
44512
|
+
function checkPackageReadme(cwd, workspaces) {
|
|
44513
|
+
const result = emptyResult$4();
|
|
44514
|
+
for (const { location, name } of workspaces) {
|
|
44515
|
+
if (isRootWorkspace(location)) continue;
|
|
44516
|
+
const kind = readmeEntryKind(cwd, location);
|
|
44517
|
+
if (kind === "regular") continue;
|
|
44518
|
+
if (kind === "missing") {
|
|
44519
|
+
result.fixable.push(`${name} (${location}) is missing README.md`);
|
|
44520
|
+
continue;
|
|
44521
|
+
}
|
|
44522
|
+
result.errors.push(`${name} (${location}) README.md must be a regular, non-symlink file`);
|
|
44523
|
+
}
|
|
44524
|
+
return result;
|
|
44525
|
+
}
|
|
44526
|
+
function fixPackageReadme(cwd, workspaces) {
|
|
44527
|
+
for (const { location, name } of workspaces) {
|
|
44528
|
+
if (isRootWorkspace(location)) continue;
|
|
44529
|
+
if (readmeEntryKind(cwd, location) !== "missing") continue;
|
|
44530
|
+
const pkg = readPackageJson$1(cwd, location);
|
|
44531
|
+
const packageName = typeof pkg?.name === "string" && pkg.name.length > 0 ? pkg.name : name;
|
|
44532
|
+
try {
|
|
44533
|
+
writeFileSync(PATH.join(packageDir(cwd, location), "README.md"), packageReadmeTemplate(packageName, pkg?.description), {
|
|
44534
|
+
encoding: "utf8",
|
|
44535
|
+
flag: "wx"
|
|
44536
|
+
});
|
|
44537
|
+
console.log(chalk.green(` ✔ Fixed: created ${location}/README.md`));
|
|
44538
|
+
} catch {}
|
|
44539
|
+
}
|
|
44540
|
+
}
|
|
44541
|
+
function checkPackageReadmeFiles(cwd, workspaces) {
|
|
44542
|
+
const result = emptyResult$4();
|
|
44543
|
+
for (const { location, name } of workspaces) {
|
|
44544
|
+
if (isRootWorkspace(location)) continue;
|
|
44545
|
+
const pkg = readPackageJson$1(cwd, location);
|
|
44546
|
+
if (pkg === void 0 || Boolean(pkg.private)) continue;
|
|
44547
|
+
const files = pkg.files;
|
|
44548
|
+
if (!Array.isArray(files)) {
|
|
44549
|
+
result.errors.push(`${name} (${location}) is missing a files field that includes README.md`);
|
|
44550
|
+
continue;
|
|
44551
|
+
}
|
|
44552
|
+
if (!files.includes("README.md")) result.fixable.push(`${name} (${location}) files must include README.md`);
|
|
44553
|
+
}
|
|
44554
|
+
return result;
|
|
44555
|
+
}
|
|
44556
|
+
function fixPackageReadmeFiles(cwd, workspaces) {
|
|
44557
|
+
for (const { location } of workspaces) {
|
|
44558
|
+
if (isRootWorkspace(location)) continue;
|
|
44559
|
+
const pkg = readPackageJson$1(cwd, location);
|
|
44560
|
+
if (pkg === void 0 || Boolean(pkg.private)) continue;
|
|
44561
|
+
const files = pkg.files;
|
|
44562
|
+
if (!Array.isArray(files) || files.includes("README.md")) continue;
|
|
44563
|
+
files.push("README.md");
|
|
44564
|
+
pkg.files = files;
|
|
44565
|
+
writePackageJson(cwd, location, pkg);
|
|
44566
|
+
console.log(chalk.green(` ✔ Fixed: added README.md to ${location}/package.json files`));
|
|
44567
|
+
}
|
|
44568
|
+
}
|
|
44569
|
+
//#endregion
|
|
44463
44570
|
//#region src/actions/package-lint-engines.ts
|
|
44464
44571
|
function emptyResult$3() {
|
|
44465
44572
|
return {
|
|
@@ -45061,6 +45168,18 @@ const REPO_LINT_RULES = [
|
|
|
45061
45168
|
description: "Spec files live in spec/ folders",
|
|
45062
45169
|
id: "repo.spec-layout"
|
|
45063
45170
|
}),
|
|
45171
|
+
repoLintRule({
|
|
45172
|
+
check: ({ cwd, workspaces }) => checkPackageReadme(cwd, workspaces),
|
|
45173
|
+
description: "Workspace packages have a consumer README.md",
|
|
45174
|
+
fix: ({ cwd, workspaces }) => fixPackageReadme(cwd, workspaces),
|
|
45175
|
+
id: "repo.package-readme"
|
|
45176
|
+
}),
|
|
45177
|
+
repoLintRule({
|
|
45178
|
+
check: ({ cwd, workspaces }) => checkPackageReadmeFiles(cwd, workspaces),
|
|
45179
|
+
description: "Publishable workspace packages include README.md in files",
|
|
45180
|
+
fix: ({ cwd, workspaces }) => fixPackageReadmeFiles(cwd, workspaces),
|
|
45181
|
+
id: "repo.package-readme-files"
|
|
45182
|
+
}),
|
|
45064
45183
|
repoLintRule({
|
|
45065
45184
|
check: ({ cwd, pm, workspaces }) => checkWorkspacesFieldPlacement(cwd, pm, workspaces),
|
|
45066
45185
|
description: "Workspace fields are declared in the package-manager-specific location",
|
|
@@ -46297,15 +46416,79 @@ const resolvePlanGitRoot = (start, command) => {
|
|
|
46297
46416
|
return root;
|
|
46298
46417
|
};
|
|
46299
46418
|
//#endregion
|
|
46419
|
+
//#region src/actions/plan/markdown.ts
|
|
46420
|
+
const DOC_INDEX_FOLDERS = ["papers", "docs"];
|
|
46421
|
+
function visibleMarkdown(markdown) {
|
|
46422
|
+
return markdown.replaceAll(/^ {0,3}([`~]{3,})[^\n]*\n[\s\S]*?^ {0,3}\1[^\n]*$/gmu, "\n").replaceAll(/`[^`\n]+`/gu, " ").replaceAll(/<!--[\s\S]*?-->/gu, " ");
|
|
46423
|
+
}
|
|
46424
|
+
function hasClaudeAgentsImport(markdown) {
|
|
46425
|
+
return /(?:^|[\s(])@(?:\.\/)?AGENTS\.md(?=$|[\s).,;:])/u.test(visibleMarkdown(markdown));
|
|
46426
|
+
}
|
|
46427
|
+
function claudeFileImports(markdown) {
|
|
46428
|
+
const imports = [];
|
|
46429
|
+
for (const match of visibleMarkdown(markdown).matchAll(/(?:^|[^A-Za-z0-9._-])@(?<imported>(?:\.\.?\/|\/|~\/)[^\s`<>]+|(?:[\w.-]+\/)*[\w.-]+\.(?:md|json|ts|tsx|js|mjs|cjs|txt|yml|yaml|toml))\b/gu)) {
|
|
46430
|
+
const imported = match.groups?.imported;
|
|
46431
|
+
if (imported !== void 0 && imported.length > 0) imports.push(imported);
|
|
46432
|
+
}
|
|
46433
|
+
return imports;
|
|
46434
|
+
}
|
|
46435
|
+
const normalizeLinkDestination = (raw) => {
|
|
46436
|
+
let dest = raw.trim();
|
|
46437
|
+
if (dest.startsWith("<") && dest.endsWith(">")) dest = dest.slice(1, -1).trim();
|
|
46438
|
+
const [unquoted] = dest.split(/\s/u, 2);
|
|
46439
|
+
dest = unquoted ?? "";
|
|
46440
|
+
if (dest.length === 0) return void 0;
|
|
46441
|
+
if (/^[a-z][a-z0-9+.-]*:/iu.test(dest)) return void 0;
|
|
46442
|
+
return dest.replace(/^\.\//u, "");
|
|
46443
|
+
};
|
|
46444
|
+
const linkDestinations = (markdown) => {
|
|
46445
|
+
const text = visibleMarkdown(markdown);
|
|
46446
|
+
const destinations = [];
|
|
46447
|
+
for (const match of text.matchAll(/(?<image>!)?\[[^\]]*\]\((?<dest>[^)]+)\)/gu)) {
|
|
46448
|
+
if (match.groups?.image === "!") continue;
|
|
46449
|
+
const dest = normalizeLinkDestination(match.groups?.dest ?? "");
|
|
46450
|
+
if (dest !== void 0) destinations.push(dest);
|
|
46451
|
+
}
|
|
46452
|
+
for (const match of text.matchAll(/^ {0,3}\[[^\]]+\]:\s+(?<dest>\S+)/gmu)) {
|
|
46453
|
+
const dest = normalizeLinkDestination(match.groups?.dest ?? "");
|
|
46454
|
+
if (dest !== void 0) destinations.push(dest);
|
|
46455
|
+
}
|
|
46456
|
+
return destinations;
|
|
46457
|
+
};
|
|
46458
|
+
function linksToDocFolder(markdown, folder) {
|
|
46459
|
+
return linkDestinations(markdown).some((dest) => {
|
|
46460
|
+
return dest === folder || dest.startsWith(`${folder}/`);
|
|
46461
|
+
});
|
|
46462
|
+
}
|
|
46463
|
+
function missingDocIndexFolders(markdown) {
|
|
46464
|
+
return DOC_INDEX_FOLDERS.filter((folder) => !linksToDocFolder(markdown, folder));
|
|
46465
|
+
}
|
|
46466
|
+
function documentationIndexSection(folders) {
|
|
46467
|
+
const labels = {
|
|
46468
|
+
docs: "Docs",
|
|
46469
|
+
papers: "Papers"
|
|
46470
|
+
};
|
|
46471
|
+
return `\n## Documentation\n\n${folders.map((folder) => `- [${labels[folder]}](./${folder}/README.md)`).join("\n")}\n`;
|
|
46472
|
+
}
|
|
46473
|
+
//#endregion
|
|
46300
46474
|
//#region src/actions/plan/templates.ts
|
|
46301
46475
|
const PLAN_REQUIRED_FILE_TEMPLATES = {
|
|
46302
46476
|
"AGENTS.md": `# Agent Instructions
|
|
46303
46477
|
|
|
46478
|
+
This file is the agent entry point for developing this repository. Human contributors should start at [README.md](./README.md).
|
|
46479
|
+
|
|
46480
|
+
## Documentation
|
|
46481
|
+
|
|
46482
|
+
- [Papers](./papers/README.md)
|
|
46483
|
+
- [Docs](./docs/README.md)
|
|
46484
|
+
- [Roadmap](./docs/ROADMAP.md)
|
|
46485
|
+
|
|
46304
46486
|
## Repository guidance
|
|
46305
46487
|
|
|
46306
46488
|
- Read \`README.md\`, the canonical papers, and \`docs/ROADMAP.md\` before making broad changes.
|
|
46307
46489
|
- Preserve unrelated worktree changes and follow repository-local tooling.
|
|
46308
46490
|
- Record durable implementation work in the configured issue tracker.
|
|
46491
|
+
- Use Markdown links to papers and docs. Do not use Claude \`@path\` imports in this file.
|
|
46309
46492
|
|
|
46310
46493
|
## Verification
|
|
46311
46494
|
|
|
@@ -46318,9 +46501,8 @@ All notable changes to this project are documented in this file.
|
|
|
46318
46501
|
## Unreleased
|
|
46319
46502
|
|
|
46320
46503
|
`,
|
|
46321
|
-
"CLAUDE.md":
|
|
46322
|
-
|
|
46323
|
-
Follow [AGENTS.md](./AGENTS.md) and all repository-local contribution and verification guidance.
|
|
46504
|
+
"CLAUDE.md": `<!-- Canonical agent instructions live in AGENTS.md. Claude Code imports that file. -->
|
|
46505
|
+
@AGENTS.md
|
|
46324
46506
|
`,
|
|
46325
46507
|
"CONTRIBUTING.md": `# Contributing
|
|
46326
46508
|
|
|
@@ -46335,6 +46517,13 @@ Run the applicable build, lint, and test commands before submitting changes.
|
|
|
46335
46517
|
"README.md": `# Project
|
|
46336
46518
|
|
|
46337
46519
|
Describe the project's purpose, supported workflows, and development entry points here.
|
|
46520
|
+
|
|
46521
|
+
This README is the human entry point for developing this repository. AI agents should start at [AGENTS.md](./AGENTS.md). Published package consumers should start at each package README.
|
|
46522
|
+
|
|
46523
|
+
## Documentation
|
|
46524
|
+
|
|
46525
|
+
- [Papers](./papers/README.md)
|
|
46526
|
+
- [Docs](./docs/README.md)
|
|
46338
46527
|
`,
|
|
46339
46528
|
"docs/README.md": `# Documentation
|
|
46340
46529
|
|
|
@@ -46432,6 +46621,105 @@ Identify the tests and operational evidence that support implementation claims.
|
|
|
46432
46621
|
`
|
|
46433
46622
|
};
|
|
46434
46623
|
//#endregion
|
|
46624
|
+
//#region src/actions/plan/rootDocs.ts
|
|
46625
|
+
const lstatIfPresent$2 = (filePath) => {
|
|
46626
|
+
try {
|
|
46627
|
+
return fs.lstatSync(filePath);
|
|
46628
|
+
} catch (error) {
|
|
46629
|
+
if (error.code === "ENOENT") return void 0;
|
|
46630
|
+
throw error;
|
|
46631
|
+
}
|
|
46632
|
+
};
|
|
46633
|
+
const rootFilePath = (root, relativePath) => {
|
|
46634
|
+
return PATH.join(root, relativePath);
|
|
46635
|
+
};
|
|
46636
|
+
const readRootMarkdown = (root, relativePath) => {
|
|
46637
|
+
const target = rootFilePath(root, relativePath);
|
|
46638
|
+
const stat = lstatIfPresent$2(target);
|
|
46639
|
+
if (stat === void 0 || !stat.isFile() || stat.isSymbolicLink()) return void 0;
|
|
46640
|
+
return fs.readFileSync(target, "utf8");
|
|
46641
|
+
};
|
|
46642
|
+
const writeRootMarkdown = (root, relativePath, contents) => {
|
|
46643
|
+
const target = rootFilePath(root, relativePath);
|
|
46644
|
+
const stat = lstatIfPresent$2(target);
|
|
46645
|
+
if (stat === void 0 || !stat.isFile() || stat.isSymbolicLink()) return false;
|
|
46646
|
+
fs.writeFileSync(target, contents.endsWith("\n") ? contents : `${contents}\n`, "utf8");
|
|
46647
|
+
return true;
|
|
46648
|
+
};
|
|
46649
|
+
const claudeImportsOutcome = (root, hasClaude, fix) => {
|
|
46650
|
+
if (!hasClaude) return { diagnostics: [] };
|
|
46651
|
+
const contents = readRootMarkdown(root, "CLAUDE.md");
|
|
46652
|
+
if (contents === void 0 || hasClaudeAgentsImport(contents)) return { diagnostics: [] };
|
|
46653
|
+
if (fix) {
|
|
46654
|
+
const template = PLAN_REQUIRED_FILE_TEMPLATES["CLAUDE.md"];
|
|
46655
|
+
const next = contents.trim().length === 0 ? template : `${template}${contents.trimStart()}`;
|
|
46656
|
+
if (writeRootMarkdown(root, "CLAUDE.md", next)) return {
|
|
46657
|
+
diagnostics: [],
|
|
46658
|
+
fixedCount: 1
|
|
46659
|
+
};
|
|
46660
|
+
}
|
|
46661
|
+
return { diagnostics: [{
|
|
46662
|
+
file: "CLAUDE.md",
|
|
46663
|
+
message: "CLAUDE.md must import AGENTS.md with @AGENTS.md (not a Markdown link, code span, or HTML comment)"
|
|
46664
|
+
}] };
|
|
46665
|
+
};
|
|
46666
|
+
const agentsNoAtImportsOutcome = (root, hasAgents) => {
|
|
46667
|
+
if (!hasAgents) return { diagnostics: [] };
|
|
46668
|
+
const contents = readRootMarkdown(root, "AGENTS.md");
|
|
46669
|
+
if (contents === void 0) return { diagnostics: [] };
|
|
46670
|
+
const imports = claudeFileImports(contents);
|
|
46671
|
+
if (imports.length === 0) return { diagnostics: [] };
|
|
46672
|
+
return { diagnostics: imports.map((imported) => ({
|
|
46673
|
+
file: "AGENTS.md",
|
|
46674
|
+
message: `AGENTS.md must not use Claude @imports (found @${imported}); use Markdown links so CLAUDE.md can import this file without recursively loading papers or docs`
|
|
46675
|
+
})) };
|
|
46676
|
+
};
|
|
46677
|
+
const docsIndexOutcome = (root, inventory, fix) => {
|
|
46678
|
+
const diagnostics = [];
|
|
46679
|
+
let fixedCount = 0;
|
|
46680
|
+
for (const file of ["README.md", "AGENTS.md"]) {
|
|
46681
|
+
if (!inventory.has(file)) continue;
|
|
46682
|
+
const contents = readRootMarkdown(root, file);
|
|
46683
|
+
if (contents === void 0) continue;
|
|
46684
|
+
const missing = missingDocIndexFolders(contents);
|
|
46685
|
+
if (missing.length === 0) continue;
|
|
46686
|
+
if (fix && writeRootMarkdown(root, file, `${contents.trimEnd()}${documentationIndexSection(missing)}`)) {
|
|
46687
|
+
fixedCount += 1;
|
|
46688
|
+
continue;
|
|
46689
|
+
}
|
|
46690
|
+
diagnostics.push({
|
|
46691
|
+
file,
|
|
46692
|
+
message: `${file} must Markdown-link to ${missing.map((folder) => `${folder}/`).join(" and ")}`
|
|
46693
|
+
});
|
|
46694
|
+
}
|
|
46695
|
+
return {
|
|
46696
|
+
diagnostics,
|
|
46697
|
+
...fixedCount > 0 && { fixedCount }
|
|
46698
|
+
};
|
|
46699
|
+
};
|
|
46700
|
+
const PLAN_ROOT_DOCUMENTATION_RULES = [
|
|
46701
|
+
{
|
|
46702
|
+
check: ({ root, rootEntries }, { fix }) => claudeImportsOutcome(root, rootEntries.regularFiles.has("CLAUDE.md"), fix),
|
|
46703
|
+
defaultLevel: "error",
|
|
46704
|
+
description: "CLAUDE.md imports AGENTS.md with @AGENTS.md",
|
|
46705
|
+
fixable: true,
|
|
46706
|
+
id: "plan.root.claude-imports-agents"
|
|
46707
|
+
},
|
|
46708
|
+
{
|
|
46709
|
+
check: ({ root, rootEntries }) => agentsNoAtImportsOutcome(root, rootEntries.regularFiles.has("AGENTS.md")),
|
|
46710
|
+
defaultLevel: "error",
|
|
46711
|
+
description: "AGENTS.md does not use Claude @path imports",
|
|
46712
|
+
id: "plan.root.agents-no-at-imports"
|
|
46713
|
+
},
|
|
46714
|
+
{
|
|
46715
|
+
check: ({ root, rootEntries }, { fix }) => docsIndexOutcome(root, rootEntries.regularFiles, fix),
|
|
46716
|
+
defaultLevel: "error",
|
|
46717
|
+
description: "root README.md and AGENTS.md Markdown-link to papers/ and docs/",
|
|
46718
|
+
fixable: true,
|
|
46719
|
+
id: "plan.root.docs-index"
|
|
46720
|
+
}
|
|
46721
|
+
];
|
|
46722
|
+
//#endregion
|
|
46435
46723
|
//#region src/actions/plan/lint.ts
|
|
46436
46724
|
const REQUIRED_ROOT_PATHS = [
|
|
46437
46725
|
"AGENTS.md",
|
|
@@ -46716,6 +47004,7 @@ const PLAN_LINT_RULES = [
|
|
|
46716
47004
|
fixable: true,
|
|
46717
47005
|
id: "plan.root.required-files"
|
|
46718
47006
|
},
|
|
47007
|
+
...PLAN_ROOT_DOCUMENTATION_RULES,
|
|
46719
47008
|
{
|
|
46720
47009
|
check: ({ papers, root }, { fix }) => unexpectedFilesOutcome(root, papers, ALLOWED_PAPER_PATHS, REQUIRED_PAPER_PATH_SET, "papers/ permits only README.md, WHITE-PAPER.md, YELLOW-PAPER.md, and optional GREEN-PAPER.md", fix),
|
|
46721
47010
|
defaultLevel: "error",
|
|
@@ -47836,7 +48125,7 @@ function scaffoldProject(plan) {
|
|
|
47836
48125
|
count += scaffoldFiles(plan.template, "package", projectDir, plan.pm, false, variables, plan.isVerbose);
|
|
47837
48126
|
const packagePkgPath = PATH.resolve(projectDir, "package.json");
|
|
47838
48127
|
const packagePkg = JSON.parse(readFileSync(packagePkgPath, "utf8"));
|
|
47839
|
-
count += scaffoldFiles(plan.template, "root", projectDir, plan.pm, false, variables, plan.isVerbose);
|
|
48128
|
+
count += scaffoldFiles(plan.template, "root", projectDir, plan.pm, false, variables, plan.isVerbose, /* @__PURE__ */ new Set(["README.md.tmpl"]));
|
|
47840
48129
|
normalizeRootPackageJson(projectDir, plan, packagePkg);
|
|
47841
48130
|
const mergeTmp = PATH.resolve(projectDir, ".package.json.merge");
|
|
47842
48131
|
if (existsSync(mergeTmp)) unlinkSync(mergeTmp);
|
|
@@ -48098,19 +48387,37 @@ const requiredSkillsForTier = (tier) => {
|
|
|
48098
48387
|
return TIER_REQUIRED_SKILLS[tier];
|
|
48099
48388
|
};
|
|
48100
48389
|
/**
|
|
48390
|
+
* Validates raw `commands.skillsLint.additionalSkills` config values.
|
|
48391
|
+
* Returns the deduped, deterministically ordered skill names.
|
|
48392
|
+
* @throws TypeError when the value is not an array of known managed skill names.
|
|
48393
|
+
*/
|
|
48394
|
+
const normalizeAdditionalSkills = (value) => {
|
|
48395
|
+
if (value === void 0) return [];
|
|
48396
|
+
if (!Array.isArray(value) || value.some((entry) => typeof entry !== "string")) throw new TypeError("commands.skillsLint.additionalSkills must be an array of skill names");
|
|
48397
|
+
const unknown = value.filter((entry) => !isXyoSkillName(entry));
|
|
48398
|
+
if (unknown.length > 0) throw new TypeError(`Unknown skills in commands.skillsLint.additionalSkills: ${unknown.join(", ")}. Known skills: ${XYO_SKILL_NAMES.join(", ")}`);
|
|
48399
|
+
return sortSkills([...new Set(value)]);
|
|
48400
|
+
};
|
|
48401
|
+
/**
|
|
48101
48402
|
* Required skills for a detected repo profile.
|
|
48102
|
-
* Adds `ariestools-sdk` when the repo depends on or produces packages from ariestools/sdk-js
|
|
48403
|
+
* Adds `ariestools-sdk` when the repo depends on or produces packages from ariestools/sdk-js,
|
|
48404
|
+
* plus any validated `additionalSkills` override from xy config.
|
|
48103
48405
|
*/
|
|
48104
48406
|
const requiredSkillsForProfile = (profile) => {
|
|
48105
48407
|
const base = requiredSkillsForTier(profile.tier);
|
|
48106
|
-
|
|
48107
|
-
|
|
48108
|
-
|
|
48109
|
-
|
|
48110
|
-
|
|
48111
|
-
|
|
48112
|
-
|
|
48113
|
-
|
|
48408
|
+
const withSdk = (() => {
|
|
48409
|
+
if (!profile.isUsingAriestoolsSdk) return base;
|
|
48410
|
+
if (base.length === 0) return sortSkills([
|
|
48411
|
+
"xy-development",
|
|
48412
|
+
"xy-toolchain",
|
|
48413
|
+
"ariestools-sdk"
|
|
48414
|
+
]);
|
|
48415
|
+
if (base.includes("ariestools-sdk")) return base;
|
|
48416
|
+
return sortSkills([...base, "ariestools-sdk"]);
|
|
48417
|
+
})();
|
|
48418
|
+
const additional = profile.additionalSkills ?? [];
|
|
48419
|
+
if (additional.length === 0) return withSdk;
|
|
48420
|
+
return sortSkills([.../* @__PURE__ */ new Set([...withSdk, ...additional])]);
|
|
48114
48421
|
};
|
|
48115
48422
|
const optionalSkillsForTier = (tier) => {
|
|
48116
48423
|
if (tier !== "xl1") return [];
|
|
@@ -54706,6 +55013,7 @@ const createSkillInstaller = (cwd) => {
|
|
|
54706
55013
|
const missingSkillReason = (profile, skillName) => {
|
|
54707
55014
|
if (skillName === "ariestools-sdk" && profile.isUsingAriestoolsSdk) return "repo uses packages from ariestools/sdk-js";
|
|
54708
55015
|
if (skillName === "xy-toolchain" && profile.isUsingToolchain) return "repo uses @ariestools/toolchain";
|
|
55016
|
+
if (profile.additionalSkills?.includes(skillName) === true) return "listed in commands.skillsLint.additionalSkills";
|
|
54709
55017
|
return "required for repo profile";
|
|
54710
55018
|
};
|
|
54711
55019
|
const checkRequiredSkills = (required, installed, latestVersions) => {
|
|
@@ -54832,7 +55140,7 @@ const SKILLS_LINT_RULES = [
|
|
|
54832
55140
|
{
|
|
54833
55141
|
check: ({ unnecessary }) => ({ diagnostics: skillDiagnostics("skills.unnecessary", unnecessary.map((skillName) => `${skillName} — installed but not required for this repo profile`)) }),
|
|
54834
55142
|
defaultLevel: "warn",
|
|
54835
|
-
description: "Installed skills are required or optional for the detected repo profile",
|
|
55143
|
+
description: "Installed skills are required or optional for the detected repo profile (extend via commands.skillsLint.additionalSkills)",
|
|
54836
55144
|
id: "skills.unnecessary"
|
|
54837
55145
|
},
|
|
54838
55146
|
{
|
|
@@ -54881,7 +55189,11 @@ const skillsLint = async (options = {}) => {
|
|
|
54881
55189
|
const projectDirs = options.projectDirs ?? [...PROJECT_SKILL_DIRS];
|
|
54882
55190
|
const globalDir = options.globalDir ?? DEFAULT_GLOBAL_DIR;
|
|
54883
55191
|
const isStrict = options.isStrict === true || options.strict === true;
|
|
54884
|
-
const
|
|
55192
|
+
const config = await loadWorkspaceCommandConfig(cwd, "skillsLint");
|
|
55193
|
+
const profile = {
|
|
55194
|
+
...detectRepoProfile(cwd),
|
|
55195
|
+
additionalSkills: normalizeAdditionalSkills(config.additionalSkills)
|
|
55196
|
+
};
|
|
54885
55197
|
const required = requiredSkillsForProfile(profile);
|
|
54886
55198
|
const optional = optionalSkillsForTier(profile.tier);
|
|
54887
55199
|
const installed = scanInstalledSkills(cwd, projectDirs);
|
|
@@ -54892,16 +55204,15 @@ const skillsLint = async (options = {}) => {
|
|
|
54892
55204
|
const unnecessary = collectUnnecessarySkills(profile, installed);
|
|
54893
55205
|
const duplicates = findDuplicateSkills(cwd, globalDir);
|
|
54894
55206
|
const unmigrated = findUnmigratedSkills(cwd);
|
|
54895
|
-
const installSkill = options.installSkill ?? createSkillInstaller(cwd);
|
|
54896
55207
|
return reportSkillsLintResult(await runRuleChecks({
|
|
54897
55208
|
commandName: "skills lint",
|
|
54898
55209
|
configKey: "skillsLint",
|
|
54899
|
-
config
|
|
55210
|
+
config,
|
|
54900
55211
|
context: {
|
|
54901
55212
|
cwd,
|
|
54902
55213
|
duplicates,
|
|
54903
55214
|
globalDir,
|
|
54904
|
-
installSkill,
|
|
55215
|
+
installSkill: options.installSkill ?? createSkillInstaller(cwd),
|
|
54905
55216
|
missing: requiredCheck.missing,
|
|
54906
55217
|
outdated: requiredCheck.outdated,
|
|
54907
55218
|
profile,
|
|
@@ -58267,6 +58578,11 @@ Checks:
|
|
|
58267
58578
|
XYOracleNetwork/xyo-skills for xyo/xl1 skills)
|
|
58268
58579
|
- Project/global duplicate installs
|
|
58269
58580
|
|
|
58581
|
+
Config (xy.config.ts):
|
|
58582
|
+
- commands.skillsLint.additionalSkills
|
|
58583
|
+
Treat extra skills as required even when the detected
|
|
58584
|
+
profile does not require them
|
|
58585
|
+
|
|
58270
58586
|
Options:
|
|
58271
58587
|
--fix Install missing, migrate relocated, and update outdated skills (project scope)
|
|
58272
58588
|
--offline Skip upstream version checks
|