@ariestools/toolchain 8.7.27 → 8.7.28

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.
Files changed (199) hide show
  1. package/dist/actions/analyze.d.ts +27 -9
  2. package/dist/actions/analyze.d.ts.map +1 -1
  3. package/dist/actions/api-exposure/analyzer/analyzePackage.d.ts +6 -2
  4. package/dist/actions/api-exposure/analyzer/analyzePackage.d.ts.map +1 -1
  5. package/dist/actions/api-exposure/analyzer/couplingWalk.d.ts.map +1 -1
  6. package/dist/actions/api-exposure/analyzer/depSignals.d.ts +12 -4
  7. package/dist/actions/api-exposure/analyzer/depSignals.d.ts.map +1 -1
  8. package/dist/actions/api-exposure/analyzer/exposureWalk.d.ts +9 -3
  9. package/dist/actions/api-exposure/analyzer/exposureWalk.d.ts.map +1 -1
  10. package/dist/actions/api-exposure/analyzer/importedPackages.d.ts +6 -2
  11. package/dist/actions/api-exposure/analyzer/importedPackages.d.ts.map +1 -1
  12. package/dist/actions/api-exposure/apiExposure.d.ts +9 -3
  13. package/dist/actions/api-exposure/apiExposure.d.ts.map +1 -1
  14. package/dist/actions/api-exposure/config.d.ts +12 -4
  15. package/dist/actions/api-exposure/config.d.ts.map +1 -1
  16. package/dist/actions/api-exposure/installStrategy.d.ts +6 -2
  17. package/dist/actions/api-exposure/installStrategy.d.ts.map +1 -1
  18. package/dist/actions/api-exposure/reporters.d.ts +3 -1
  19. package/dist/actions/api-exposure/reporters.d.ts.map +1 -1
  20. package/dist/actions/api-exposure/scoring.d.ts +3 -1
  21. package/dist/actions/api-exposure/scoring.d.ts.map +1 -1
  22. package/dist/actions/api-exposure/types.d.ts +48 -16
  23. package/dist/actions/api-exposure/types.d.ts.map +1 -1
  24. package/dist/actions/barrel/index.d.ts +0 -1
  25. package/dist/actions/barrel/index.d.ts.map +1 -1
  26. package/dist/actions/barrel/restrictionHelpers.d.ts +0 -19
  27. package/dist/actions/barrel/restrictionHelpers.d.ts.map +1 -1
  28. package/dist/actions/compile.d.ts +9 -3
  29. package/dist/actions/compile.d.ts.map +1 -1
  30. package/dist/actions/dead/analyzePackage.d.ts +18 -6
  31. package/dist/actions/dead/analyzePackage.d.ts.map +1 -1
  32. package/dist/actions/dead/collectSymbols.d.ts +12 -4
  33. package/dist/actions/dead/collectSymbols.d.ts.map +1 -1
  34. package/dist/actions/dead/evaluateRules.d.ts +3 -1
  35. package/dist/actions/dead/evaluateRules.d.ts.map +1 -1
  36. package/dist/actions/dead/findWorkspaceFile.d.ts +3 -1
  37. package/dist/actions/dead/findWorkspaceFile.d.ts.map +1 -1
  38. package/dist/actions/dead/ruleNames.d.ts +3 -1
  39. package/dist/actions/dead/ruleNames.d.ts.map +1 -1
  40. package/dist/actions/dead/runDeadAnalysis.d.ts +3 -1
  41. package/dist/actions/dead/runDeadAnalysis.d.ts.map +1 -1
  42. package/dist/actions/dead/sourceEdits.d.ts +3 -1
  43. package/dist/actions/dead/sourceEdits.d.ts.map +1 -1
  44. package/dist/actions/deplint/checkPackage/checkPackage.d.ts +3 -1
  45. package/dist/actions/deplint/checkPackage/checkPackage.d.ts.map +1 -1
  46. package/dist/actions/deplint/checkPackage/getUnsatisfiedPeerDependencies.d.ts +6 -2
  47. package/dist/actions/deplint/checkPackage/getUnsatisfiedPeerDependencies.d.ts.map +1 -1
  48. package/dist/actions/deplint/collectPickRows.d.ts +24 -8
  49. package/dist/actions/deplint/collectPickRows.d.ts.map +1 -1
  50. package/dist/actions/deplint/deplint.d.ts +9 -3
  51. package/dist/actions/deplint/deplint.d.ts.map +1 -1
  52. package/dist/actions/deplint/deplintPick.d.ts +3 -1
  53. package/dist/actions/deplint/deplintPick.d.ts.map +1 -1
  54. package/dist/actions/deplint/editXyConfigPackages.d.ts +9 -3
  55. package/dist/actions/deplint/editXyConfigPackages.d.ts.map +1 -1
  56. package/dist/actions/deplint/fetchPackageManifest.d.ts +6 -2
  57. package/dist/actions/deplint/fetchPackageManifest.d.ts.map +1 -1
  58. package/dist/actions/deplint/findFiles.d.ts +6 -2
  59. package/dist/actions/deplint/findFiles.d.ts.map +1 -1
  60. package/dist/actions/deplint/getExternalImportsFromFiles.d.ts.map +1 -1
  61. package/dist/actions/deplint/interactivePick.d.ts +3 -1
  62. package/dist/actions/deplint/interactivePick.d.ts.map +1 -1
  63. package/dist/actions/deplint/isTerminalPackage.d.ts +12 -4
  64. package/dist/actions/deplint/isTerminalPackage.d.ts.map +1 -1
  65. package/dist/actions/deplint/resolvePeerBumpFixes.d.ts +3 -1
  66. package/dist/actions/deplint/resolvePeerBumpFixes.d.ts.map +1 -1
  67. package/dist/actions/deplint/snapshot.d.ts +24 -8
  68. package/dist/actions/deplint/snapshot.d.ts.map +1 -1
  69. package/dist/actions/deplint/sourceFileCache.d.ts +3 -1
  70. package/dist/actions/deplint/sourceFileCache.d.ts.map +1 -1
  71. package/dist/actions/deplint/types.d.ts +66 -22
  72. package/dist/actions/deplint/types.d.ts.map +1 -1
  73. package/dist/actions/gitignore.d.ts +3 -1
  74. package/dist/actions/gitignore.d.ts.map +1 -1
  75. package/dist/actions/lint.d.ts +15 -5
  76. package/dist/actions/lint.d.ts.map +1 -1
  77. package/dist/actions/lintNext.d.ts +6 -2
  78. package/dist/actions/lintNext.d.ts.map +1 -1
  79. package/dist/actions/lintNextWorker.d.ts +36 -12
  80. package/dist/actions/lintNextWorker.d.ts.map +1 -1
  81. package/dist/actions/lintPackageFilter.d.ts +15 -5
  82. package/dist/actions/lintPackageFilter.d.ts.map +1 -1
  83. package/dist/actions/package/clean-outputs.d.ts +3 -1
  84. package/dist/actions/package/clean-outputs.d.ts.map +1 -1
  85. package/dist/actions/package/clean-typescript.d.ts +3 -1
  86. package/dist/actions/package/clean-typescript.d.ts.map +1 -1
  87. package/dist/actions/package/cleanGitignore.d.ts +6 -2
  88. package/dist/actions/package/cleanGitignore.d.ts.map +1 -1
  89. package/dist/actions/package/cleanPlan.d.ts +6 -2
  90. package/dist/actions/package/cleanPlan.d.ts.map +1 -1
  91. package/dist/actions/package/cleanRules.d.ts +15 -5
  92. package/dist/actions/package/cleanRules.d.ts.map +1 -1
  93. package/dist/actions/package/compile/ApiExposureConfig.d.ts +24 -8
  94. package/dist/actions/package/compile/ApiExposureConfig.d.ts.map +1 -1
  95. package/dist/actions/package/compile/CleanConfig.d.ts +3 -1
  96. package/dist/actions/package/compile/CleanConfig.d.ts.map +1 -1
  97. package/dist/actions/package/compile/MonolithConfig.d.ts +39 -13
  98. package/dist/actions/package/compile/MonolithConfig.d.ts.map +1 -1
  99. package/dist/actions/package/compile/PublintConfig.d.ts +6 -2
  100. package/dist/actions/package/compile/PublintConfig.d.ts.map +1 -1
  101. package/dist/actions/package/compile/XyConfig.d.ts +162 -54
  102. package/dist/actions/package/compile/XyConfig.d.ts.map +1 -1
  103. package/dist/actions/package/compile/createProgramFromConfig.d.ts +18 -6
  104. package/dist/actions/package/compile/createProgramFromConfig.d.ts.map +1 -1
  105. package/dist/actions/package/compile/inputs.d.ts.map +1 -1
  106. package/dist/actions/package/compile/monolithCompileDeclarations.d.ts +3 -1
  107. package/dist/actions/package/compile/monolithCompileDeclarations.d.ts.map +1 -1
  108. package/dist/actions/package/compile/monolithCompileEntries.d.ts.map +1 -1
  109. package/dist/actions/package/compile/monolithCompileLayout.d.ts +15 -5
  110. package/dist/actions/package/compile/monolithCompileLayout.d.ts.map +1 -1
  111. package/dist/actions/package/compile/monolithCopyEntries.d.ts +6 -2
  112. package/dist/actions/package/compile/monolithCopyEntries.d.ts.map +1 -1
  113. package/dist/actions/package/compile/monolithReexport.d.ts +12 -4
  114. package/dist/actions/package/compile/monolithReexport.d.ts.map +1 -1
  115. package/dist/actions/package/compile/packageCompileMonolith.d.ts.map +1 -1
  116. package/dist/actions/recompile.d.ts +3 -1
  117. package/dist/actions/recompile.d.ts.map +1 -1
  118. package/dist/actions/skills/defaults.d.ts +14 -6
  119. package/dist/actions/skills/defaults.d.ts.map +1 -1
  120. package/dist/actions/skills/skillRules.d.ts +4 -2
  121. package/dist/actions/skills/skillRules.d.ts.map +1 -1
  122. package/dist/actions/tsc-validate/sharedValidate.d.ts +6 -2
  123. package/dist/actions/tsc-validate/sharedValidate.d.ts.map +1 -1
  124. package/dist/actions/tsc-validate/tscValidate.d.ts.map +1 -1
  125. package/dist/actions/work/github.d.ts +9 -3
  126. package/dist/actions/work/github.d.ts.map +1 -1
  127. package/dist/actions/work/helpers.d.ts +3 -1
  128. package/dist/actions/work/helpers.d.ts.map +1 -1
  129. package/dist/actions/work/index.d.ts +6 -2
  130. package/dist/actions/work/index.d.ts.map +1 -1
  131. package/dist/actions/work/list.d.ts +6 -2
  132. package/dist/actions/work/list.d.ts.map +1 -1
  133. package/dist/actions/work/move.d.ts +3 -1
  134. package/dist/actions/work/move.d.ts.map +1 -1
  135. package/dist/actions/work/store.d.ts +3 -1
  136. package/dist/actions/work/store.d.ts.map +1 -1
  137. package/dist/actions/work/sync.d.ts +15 -5
  138. package/dist/actions/work/sync.d.ts.map +1 -1
  139. package/dist/actions/work/workspace.d.ts +15 -5
  140. package/dist/actions/work/workspace.d.ts.map +1 -1
  141. package/dist/bin/package/build.mjs +269 -185
  142. package/dist/bin/package/build.mjs.map +1 -1
  143. package/dist/bin/package/clean.mjs +137 -96
  144. package/dist/bin/package/clean.mjs.map +1 -1
  145. package/dist/bin/package/compile.mjs +149 -100
  146. package/dist/bin/package/compile.mjs.map +1 -1
  147. package/dist/bin/package/copy-assets-cjs.mjs +16 -14
  148. package/dist/bin/package/copy-assets-cjs.mjs.map +1 -1
  149. package/dist/bin/package/copy-assets-esm.mjs +16 -14
  150. package/dist/bin/package/copy-assets-esm.mjs.map +1 -1
  151. package/dist/bin/package/fix.mjs +4 -3
  152. package/dist/bin/package/fix.mjs.map +1 -1
  153. package/dist/bin/package/lint-verbose.mjs +4 -3
  154. package/dist/bin/package/lint-verbose.mjs.map +1 -1
  155. package/dist/bin/package/lint.mjs +4 -3
  156. package/dist/bin/package/lint.mjs.map +1 -1
  157. package/dist/bin/package/publint.mjs +220 -165
  158. package/dist/bin/package/publint.mjs.map +1 -1
  159. package/dist/bin/package/recompile.mjs +173 -108
  160. package/dist/bin/package/recompile.mjs.map +1 -1
  161. package/dist/bin/package/relint.mjs +4 -3
  162. package/dist/bin/package/relint.mjs.map +1 -1
  163. package/dist/bin/package/sync-layout.mjs +97 -71
  164. package/dist/bin/package/sync-layout.mjs.map +1 -1
  165. package/dist/bin/run-or-exec.mjs +8 -4
  166. package/dist/bin/run-or-exec.mjs.map +1 -1
  167. package/dist/bin/skills.mjs +494 -222
  168. package/dist/bin/skills.mjs.map +1 -1
  169. package/dist/bin/xy.mjs +2029 -1992
  170. package/dist/bin/xy.mjs.map +1 -1
  171. package/dist/lib/copyAssetFiles.d.ts +3 -1
  172. package/dist/lib/copyAssetFiles.d.ts.map +1 -1
  173. package/dist/lib/licenseCheck/checkLicenses.d.ts +18 -6
  174. package/dist/lib/licenseCheck/checkLicenses.d.ts.map +1 -1
  175. package/dist/lib/licenseCheck/collectProductionLicenses.d.ts +9 -3
  176. package/dist/lib/licenseCheck/collectProductionLicenses.d.ts.map +1 -1
  177. package/dist/lib/licenseCheck/readPackageLicense.d.ts +6 -2
  178. package/dist/lib/licenseCheck/readPackageLicense.d.ts.map +1 -1
  179. package/dist/lib/loadConfig.d.ts.map +1 -1
  180. package/dist/lib/match.d.ts +6 -2
  181. package/dist/lib/match.d.ts.map +1 -1
  182. package/dist/lib/pnpmConfig/readMinReleaseAge.d.ts +12 -4
  183. package/dist/lib/pnpmConfig/readMinReleaseAge.d.ts.map +1 -1
  184. package/dist/lib/safeExit.d.ts +3 -1
  185. package/dist/lib/safeExit.d.ts.map +1 -1
  186. package/dist/lib/updo/fetchRegistryInfo.d.ts.map +1 -1
  187. package/dist/lib/updo/interactiveSelect.d.ts +6 -2
  188. package/dist/lib/updo/interactiveSelect.d.ts.map +1 -1
  189. package/dist/lib/updo/interfaces.d.ts +15 -5
  190. package/dist/lib/updo/interfaces.d.ts.map +1 -1
  191. package/dist/lib/updo/resolveVersions.d.ts +15 -5
  192. package/dist/lib/updo/resolveVersions.d.ts.map +1 -1
  193. package/dist/lib/updo/runUpdo.d.ts +12 -4
  194. package/dist/lib/updo/runUpdo.d.ts.map +1 -1
  195. package/dist/pm/PackageManager.d.ts +45 -15
  196. package/dist/pm/PackageManager.d.ts.map +1 -1
  197. package/dist/xy/common/work/options.d.ts +3 -1
  198. package/dist/xy/common/work/options.d.ts.map +1 -1
  199. package/package.json +18 -18
@@ -53,7 +53,7 @@ var __exportAll = (all, no_symbols) => {
53
53
  };
54
54
  var __require$1 = /* #__PURE__ */ (() => createRequire(import.meta.url))();
55
55
  //#endregion
56
- //#region ../../node_modules/.pnpm/skills@1.5.21/node_modules/skills/dist/_chunks/rolldown-runtime.mjs
56
+ //#region ../../node_modules/.pnpm/skills@1.5.22/node_modules/skills/dist/_chunks/rolldown-runtime.mjs
57
57
  var __create, __defProp$1, __getOwnPropDesc$1, __getOwnPropNames$1, __getProtoOf, __hasOwnProp$1, __commonJSMin, __copyProps$1, __toESM, __require;
58
58
  var init_rolldown_runtime = __esmMin((() => {
59
59
  __create = Object.create;
@@ -80,7 +80,7 @@ var init_rolldown_runtime = __esmMin((() => {
80
80
  __require = /* #__PURE__ */ (() => createRequire(import.meta.url))();
81
81
  }));
82
82
  //#endregion
83
- //#region ../../node_modules/.pnpm/skills@1.5.21/node_modules/skills/dist/_chunks/libs/@clack/core.mjs
83
+ //#region ../../node_modules/.pnpm/skills@1.5.22/node_modules/skills/dist/_chunks/libs/@clack/core.mjs
84
84
  function wrapAnsi(string, columns, options) {
85
85
  return String(string).normalize().split(CRLF_OR_LF).map((line) => exec(line, columns, options)).join("\n");
86
86
  }
@@ -779,7 +779,7 @@ var init_core = __esmMin((() => {
779
779
  };
780
780
  }));
781
781
  //#endregion
782
- //#region ../../node_modules/.pnpm/skills@1.5.21/node_modules/skills/dist/_chunks/libs/@clack/prompts.mjs
782
+ //#region ../../node_modules/.pnpm/skills@1.5.22/node_modules/skills/dist/_chunks/libs/@clack/prompts.mjs
783
783
  function isUnicodeSupported() {
784
784
  if (process$1.platform !== "win32") return process$1.env.TERM !== "linux";
785
785
  return Boolean(process$1.env.CI) || Boolean(process$1.env.WT_SESSION) || Boolean(process$1.env.TERMINUS_SUBLIME) || process$1.env.ConEmuTask === "{cmd::Cmder}" || process$1.env.TERM_PROGRAM === "Terminus-Sublime" || process$1.env.TERM_PROGRAM === "vscode" || process$1.env.TERM === "xterm-256color" || process$1.env.TERM === "alacritty" || process$1.env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
@@ -1226,7 +1226,7 @@ ${b}
1226
1226
  `${styleText("gray", S_BAR$1)}`;
1227
1227
  }));
1228
1228
  //#endregion
1229
- //#region ../../node_modules/.pnpm/skills@1.5.21/node_modules/skills/dist/_chunks/libs/picocolors.mjs
1229
+ //#region ../../node_modules/.pnpm/skills@1.5.22/node_modules/skills/dist/_chunks/libs/picocolors.mjs
1230
1230
  var require_picocolors;
1231
1231
  var init_picocolors = __esmMin((() => {
1232
1232
  init_rolldown_runtime();
@@ -1300,7 +1300,7 @@ var init_picocolors = __esmMin((() => {
1300
1300
  }));
1301
1301
  }));
1302
1302
  //#endregion
1303
- //#region ../../node_modules/.pnpm/skills@1.5.21/node_modules/skills/dist/_chunks/libs/@kwsites/file-exists.mjs
1303
+ //#region ../../node_modules/.pnpm/skills@1.5.22/node_modules/skills/dist/_chunks/libs/@kwsites/file-exists.mjs
1304
1304
  var require_ms, require_common, require_browser, require_node, require_src$1, require_src, require_dist$3;
1305
1305
  var init_file_exists = __esmMin((() => {
1306
1306
  init_rolldown_runtime();
@@ -1866,7 +1866,7 @@ var init_file_exists = __esmMin((() => {
1866
1866
  }));
1867
1867
  }));
1868
1868
  //#endregion
1869
- //#region ../../node_modules/.pnpm/skills@1.5.21/node_modules/skills/dist/_chunks/libs/@simple-git/args-pathspec.mjs
1869
+ //#region ../../node_modules/.pnpm/skills@1.5.22/node_modules/skills/dist/_chunks/libs/@simple-git/args-pathspec.mjs
1870
1870
  function c$1(...n) {
1871
1871
  const e = new String(n);
1872
1872
  return t.set(e, n), e;
@@ -1882,7 +1882,7 @@ var init_args_pathspec = __esmMin((() => {
1882
1882
  t = /* @__PURE__ */ new WeakMap();
1883
1883
  }));
1884
1884
  //#endregion
1885
- //#region ../../node_modules/.pnpm/skills@1.5.21/node_modules/skills/dist/_chunks/libs/@kwsites/promise-deferred.mjs
1885
+ //#region ../../node_modules/.pnpm/skills@1.5.22/node_modules/skills/dist/_chunks/libs/@kwsites/promise-deferred.mjs
1886
1886
  var require_dist$2;
1887
1887
  var init_promise_deferred = __esmMin((() => {
1888
1888
  init_rolldown_runtime();
@@ -1923,7 +1923,7 @@ var init_promise_deferred = __esmMin((() => {
1923
1923
  }));
1924
1924
  }));
1925
1925
  //#endregion
1926
- //#region ../../node_modules/.pnpm/skills@1.5.21/node_modules/skills/dist/_chunks/libs/@simple-git/argv-parser.mjs
1926
+ //#region ../../node_modules/.pnpm/skills@1.5.22/node_modules/skills/dist/_chunks/libs/@simple-git/argv-parser.mjs
1927
1927
  function* U$1(e, t) {
1928
1928
  const n = t === "global";
1929
1929
  for (const o of e) o.isGlobal === n && (yield o);
@@ -2398,7 +2398,7 @@ var init_argv_parser = __esmMin((() => {
2398
2398
  };
2399
2399
  }));
2400
2400
  //#endregion
2401
- //#region ../../node_modules/.pnpm/skills@1.5.21/node_modules/skills/dist/_chunks/libs/simple-git.mjs
2401
+ //#region ../../node_modules/.pnpm/skills@1.5.22/node_modules/skills/dist/_chunks/libs/simple-git.mjs
2402
2402
  function asFunction(source) {
2403
2403
  if (typeof source !== "function") return NOOP;
2404
2404
  return source;
@@ -5908,7 +5908,7 @@ var init_simple_git = __esmMin((() => {
5908
5908
  esm_default = gitInstanceFactory;
5909
5909
  }));
5910
5910
  //#endregion
5911
- //#region ../../node_modules/.pnpm/skills@1.5.21/node_modules/skills/dist/_chunks/libs/xdg-basedir.mjs
5911
+ //#region ../../node_modules/.pnpm/skills@1.5.22/node_modules/skills/dist/_chunks/libs/xdg-basedir.mjs
5912
5912
  var homeDirectory, env, xdgData, xdgConfig, xdgDataDirectories, xdgConfigDirectories;
5913
5913
  var init_xdg_basedir = __esmMin((() => {
5914
5914
  homeDirectory = os.homedir();
@@ -5924,7 +5924,7 @@ var init_xdg_basedir = __esmMin((() => {
5924
5924
  if (xdgConfig) xdgConfigDirectories.unshift(xdgConfig);
5925
5925
  }));
5926
5926
  //#endregion
5927
- //#region ../../node_modules/.pnpm/skills@1.5.21/node_modules/skills/dist/_chunks/libs/@vercel/detect-agent.mjs
5927
+ //#region ../../node_modules/.pnpm/skills@1.5.22/node_modules/skills/dist/_chunks/libs/@vercel/detect-agent.mjs
5928
5928
  var require_dist$1;
5929
5929
  var init_detect_agent = __esmMin((() => {
5930
5930
  init_rolldown_runtime();
@@ -6298,9 +6298,10 @@ var require_visit = /* @__PURE__ */ __commonJSMin$1(((exports) => {
6298
6298
  function replaceNode(key, path, node) {
6299
6299
  const parent = path[path.length - 1];
6300
6300
  if (identity.isCollection(parent)) parent.items[key] = node;
6301
- else if (identity.isPair(parent)) if (key === "key") parent.key = node;
6302
- else parent.value = node;
6303
- else if (identity.isDocument(parent)) parent.contents = node;
6301
+ else if (identity.isPair(parent)) {
6302
+ if (key === "key") parent.key = node;
6303
+ else parent.value = node;
6304
+ } else if (identity.isDocument(parent)) parent.contents = node;
6304
6305
  else {
6305
6306
  const pt = identity.isAlias(parent) ? "alias" : "scalar";
6306
6307
  throw new Error(`Cannot replace node with ${pt} parent`);
@@ -6551,30 +6552,32 @@ var require_applyReviver = /* @__PURE__ */ __commonJSMin$1(((exports) => {
6551
6552
  * Includes extensions for handling Map and Set objects.
6552
6553
  */
6553
6554
  function applyReviver(reviver, obj, key, val) {
6554
- if (val && typeof val === "object") if (Array.isArray(val)) for (let i = 0, len = val.length; i < len; ++i) {
6555
- const v0 = val[i];
6556
- const v1 = applyReviver(reviver, val, String(i), v0);
6557
- if (v1 === void 0) delete val[i];
6558
- else if (v1 !== v0) val[i] = v1;
6559
- }
6560
- else if (val instanceof Map) for (const k of Array.from(val.keys())) {
6561
- const v0 = val.get(k);
6562
- const v1 = applyReviver(reviver, val, k, v0);
6563
- if (v1 === void 0) val.delete(k);
6564
- else if (v1 !== v0) val.set(k, v1);
6565
- }
6566
- else if (val instanceof Set) for (const v0 of Array.from(val)) {
6567
- const v1 = applyReviver(reviver, val, v0, v0);
6568
- if (v1 === void 0) val.delete(v0);
6569
- else if (v1 !== v0) {
6570
- val.delete(v0);
6571
- val.add(v1);
6572
- }
6573
- }
6574
- else for (const [k, v0] of Object.entries(val)) {
6575
- const v1 = applyReviver(reviver, val, k, v0);
6576
- if (v1 === void 0) delete val[k];
6577
- else if (v1 !== v0) val[k] = v1;
6555
+ if (val && typeof val === "object") {
6556
+ if (Array.isArray(val)) for (let i = 0, len = val.length; i < len; ++i) {
6557
+ const v0 = val[i];
6558
+ const v1 = applyReviver(reviver, val, String(i), v0);
6559
+ if (v1 === void 0) delete val[i];
6560
+ else if (v1 !== v0) val[i] = v1;
6561
+ }
6562
+ else if (val instanceof Map) for (const k of Array.from(val.keys())) {
6563
+ const v0 = val.get(k);
6564
+ const v1 = applyReviver(reviver, val, k, v0);
6565
+ if (v1 === void 0) val.delete(k);
6566
+ else if (v1 !== v0) val.set(k, v1);
6567
+ }
6568
+ else if (val instanceof Set) for (const v0 of Array.from(val)) {
6569
+ const v1 = applyReviver(reviver, val, v0, v0);
6570
+ if (v1 === void 0) val.delete(v0);
6571
+ else if (v1 !== v0) {
6572
+ val.delete(v0);
6573
+ val.add(v1);
6574
+ }
6575
+ }
6576
+ else for (const [k, v0] of Object.entries(val)) {
6577
+ const v1 = applyReviver(reviver, val, k, v0);
6578
+ if (v1 === void 0) delete val[k];
6579
+ else if (v1 !== v0) val[k] = v1;
6580
+ }
6578
6581
  }
6579
6582
  return reviver.call(obj, key, val);
6580
6583
  }
@@ -6995,8 +6998,10 @@ var require_foldFlowLines = /* @__PURE__ */ __commonJSMin$1(((exports) => {
6995
6998
  const folds = [];
6996
6999
  const escapedFolds = {};
6997
7000
  let end = lineWidth - indent.length;
6998
- if (typeof indentAtStart === "number") if (indentAtStart > lineWidth - Math.max(2, minContentWidth)) folds.push(0);
6999
- else end = lineWidth - indentAtStart;
7001
+ if (typeof indentAtStart === "number") {
7002
+ if (indentAtStart > lineWidth - Math.max(2, minContentWidth)) folds.push(0);
7003
+ else end = lineWidth - indentAtStart;
7004
+ }
7000
7005
  let split = void 0;
7001
7006
  let prev = void 0;
7002
7007
  let overflow = false;
@@ -7033,23 +7038,25 @@ var require_foldFlowLines = /* @__PURE__ */ __commonJSMin$1(((exports) => {
7033
7038
  const next = text[i + 1];
7034
7039
  if (next && next !== " " && next !== "\n" && next !== " ") split = i;
7035
7040
  }
7036
- if (i >= end) if (split) {
7037
- folds.push(split);
7038
- end = split + endStep;
7039
- split = void 0;
7040
- } else if (mode === FOLD_QUOTED) {
7041
- while (prev === " " || prev === " ") {
7042
- prev = ch;
7043
- ch = text[i += 1];
7044
- overflow = true;
7045
- }
7046
- const j = i > escEnd + 1 ? i - 2 : escStart - 1;
7047
- if (escapedFolds[j]) return text;
7048
- folds.push(j);
7049
- escapedFolds[j] = true;
7050
- end = j + endStep;
7051
- split = void 0;
7052
- } else overflow = true;
7041
+ if (i >= end) {
7042
+ if (split) {
7043
+ folds.push(split);
7044
+ end = split + endStep;
7045
+ split = void 0;
7046
+ } else if (mode === FOLD_QUOTED) {
7047
+ while (prev === " " || prev === " ") {
7048
+ prev = ch;
7049
+ ch = text[i += 1];
7050
+ overflow = true;
7051
+ }
7052
+ const j = i > escEnd + 1 ? i - 2 : escStart - 1;
7053
+ if (escapedFolds[j]) return text;
7054
+ folds.push(j);
7055
+ escapedFolds[j] = true;
7056
+ end = j + endStep;
7057
+ split = void 0;
7058
+ } else overflow = true;
7059
+ }
7053
7060
  }
7054
7061
  prev = ch;
7055
7062
  }
@@ -7529,8 +7536,10 @@ var require_log = /* @__PURE__ */ __commonJSMin$1(((exports) => {
7529
7536
  if (logLevel === "debug") console.log(...messages);
7530
7537
  }
7531
7538
  function warn(logLevel, warning) {
7532
- if (logLevel === "debug" || logLevel === "warn") if (typeof node_process$2.emitWarning === "function") node_process$2.emitWarning(warning);
7533
- else console.warn(warning);
7539
+ if (logLevel === "debug" || logLevel === "warn") {
7540
+ if (typeof node_process$2.emitWarning === "function") node_process$2.emitWarning(warning);
7541
+ else console.warn(warning);
7542
+ }
7534
7543
  }
7535
7544
  exports.debug = debug;
7536
7545
  exports.warn = warn;
@@ -8357,11 +8366,12 @@ var require_pairs = /* @__PURE__ */ __commonJSMin$1(((exports) => {
8357
8366
  if (iterable && Symbol.iterator in Object(iterable)) for (let it of iterable) {
8358
8367
  if (typeof replacer === "function") it = replacer.call(iterable, String(i++), it);
8359
8368
  let key, value;
8360
- if (Array.isArray(it)) if (it.length === 2) {
8361
- key = it[0];
8362
- value = it[1];
8363
- } else throw new TypeError(`Expected [key, value] tuple: ${it}`);
8364
- else if (it && it instanceof Object) {
8369
+ if (Array.isArray(it)) {
8370
+ if (it.length === 2) {
8371
+ key = it[0];
8372
+ value = it[1];
8373
+ } else throw new TypeError(`Expected [key, value] tuple: ${it}`);
8374
+ } else if (it && it instanceof Object) {
8365
8375
  const keys = Object.keys(it);
8366
8376
  if (keys.length === 1) {
8367
8377
  key = keys[0];
@@ -8437,8 +8447,10 @@ var require_omap = /* @__PURE__ */ __commonJSMin$1(((exports) => {
8437
8447
  resolve(seq, onError) {
8438
8448
  const pairs$1 = pairs.resolvePairs(seq, onError);
8439
8449
  const seenKeys = [];
8440
- for (const { key } of pairs$1.items) if (identity.isScalar(key)) if (seenKeys.includes(key.value)) onError(`Ordered maps must not include duplicate keys: ${key.value}`);
8441
- else seenKeys.push(key.value);
8450
+ for (const { key } of pairs$1.items) if (identity.isScalar(key)) {
8451
+ if (seenKeys.includes(key.value)) onError(`Ordered maps must not include duplicate keys: ${key.value}`);
8452
+ else seenKeys.push(key.value);
8453
+ }
8442
8454
  return Object.assign(new YAMLOMap(), pairs$1);
8443
8455
  },
8444
8456
  createNode: (schema, iterable, ctx) => YAMLOMap.from(schema, iterable, ctx)
@@ -8649,9 +8661,10 @@ var require_set = /* @__PURE__ */ __commonJSMin$1(((exports) => {
8649
8661
  tag: "tag:yaml.org,2002:set",
8650
8662
  createNode: (schema, iterable, ctx) => YAMLSet.from(schema, iterable, ctx),
8651
8663
  resolve(map, onError) {
8652
- if (identity.isMap(map)) if (map.hasAllNullValues(true)) return Object.assign(new YAMLSet(), map);
8653
- else onError("Set items must all have null values");
8654
- else onError("Expected a mapping for this tag");
8664
+ if (identity.isMap(map)) {
8665
+ if (map.hasAllNullValues(true)) return Object.assign(new YAMLSet(), map);
8666
+ else onError("Set items must all have null values");
8667
+ } else onError("Expected a mapping for this tag");
8655
8668
  return map;
8656
8669
  }
8657
8670
  };
@@ -8843,10 +8856,12 @@ var require_tags = /* @__PURE__ */ __commonJSMin$1(((exports) => {
8843
8856
  const schemaTags = schemas.get(schemaName);
8844
8857
  if (schemaTags && !customTags) return addMergeTag && !schemaTags.includes(merge.merge) ? schemaTags.concat(merge.merge) : schemaTags.slice();
8845
8858
  let tags = schemaTags;
8846
- if (!tags) if (Array.isArray(customTags)) tags = [];
8847
- else {
8848
- const keys = Array.from(schemas.keys()).filter((key) => key !== "yaml11").map((key) => JSON.stringify(key)).join(", ");
8849
- throw new Error(`Unknown schema "${schemaName}"; use one of ${keys} or define customTags array`);
8859
+ if (!tags) {
8860
+ if (Array.isArray(customTags)) tags = [];
8861
+ else {
8862
+ const keys = Array.from(schemas.keys()).filter((key) => key !== "yaml11").map((key) => JSON.stringify(key)).join(", ");
8863
+ throw new Error(`Unknown schema "${schemaName}"; use one of ${keys} or define customTags array`);
8864
+ }
8850
8865
  }
8851
8866
  if (Array.isArray(customTags)) for (const tag of customTags) tags = tags.concat(tag);
8852
8867
  else if (typeof customTags === "function") tags = customTags(tags.slice());
@@ -8935,14 +8950,15 @@ var require_stringifyDocument = /* @__PURE__ */ __commonJSMin$1(((exports) => {
8935
8950
  if ((body[0] === "|" || body[0] === ">") && lines[lines.length - 1] === "---") lines[lines.length - 1] = `--- ${body}`;
8936
8951
  else lines.push(body);
8937
8952
  } else lines.push(stringify.stringify(doc.contents, ctx));
8938
- if (doc.directives?.docEnd) if (doc.comment) {
8939
- const cs = commentString(doc.comment);
8940
- if (cs.includes("\n")) {
8941
- lines.push("...");
8942
- lines.push(stringifyComment.indentComment(cs, ""));
8943
- } else lines.push(`... ${cs}`);
8944
- } else lines.push("...");
8945
- else {
8953
+ if (doc.directives?.docEnd) {
8954
+ if (doc.comment) {
8955
+ const cs = commentString(doc.comment);
8956
+ if (cs.includes("\n")) {
8957
+ lines.push("...");
8958
+ lines.push(stringifyComment.indentComment(cs, ""));
8959
+ } else lines.push(`... ${cs}`);
8960
+ } else lines.push("...");
8961
+ } else {
8946
8962
  let dc = doc.comment;
8947
8963
  if (dc && chompKeep) dc = dc.replace(/^\n+/, "");
8948
8964
  if (dc) {
@@ -9481,8 +9497,10 @@ var require_resolve_block_map = /* @__PURE__ */ __commonJSMin$1(((exports) => {
9481
9497
  }
9482
9498
  if (!keyProps.anchor && !keyProps.tag && !sep) {
9483
9499
  commentEnd = keyProps.end;
9484
- if (keyProps.comment) if (map.comment) map.comment += "\n" + keyProps.comment;
9485
- else map.comment = keyProps.comment;
9500
+ if (keyProps.comment) {
9501
+ if (map.comment) map.comment += "\n" + keyProps.comment;
9502
+ else map.comment = keyProps.comment;
9503
+ }
9486
9504
  continue;
9487
9505
  }
9488
9506
  if (keyProps.newlineAfterProp || utilContainsNewline.containsNewline(key)) onError(key ?? start[start.length - 1], "MULTILINE_IMPLICIT_KEY", "Implicit keys need to be on a single line");
@@ -9515,8 +9533,10 @@ var require_resolve_block_map = /* @__PURE__ */ __commonJSMin$1(((exports) => {
9515
9533
  map.items.push(pair);
9516
9534
  } else {
9517
9535
  if (implicitKey) onError(keyNode.range, "MISSING_CHAR", "Implicit map keys need to be followed by map values");
9518
- if (valueProps.comment) if (keyNode.comment) keyNode.comment += "\n" + valueProps.comment;
9519
- else keyNode.comment = valueProps.comment;
9536
+ if (valueProps.comment) {
9537
+ if (keyNode.comment) keyNode.comment += "\n" + valueProps.comment;
9538
+ else keyNode.comment = valueProps.comment;
9539
+ }
9520
9540
  const pair = new Pair.Pair(keyNode);
9521
9541
  if (ctx.options.keepSourceTokens) pair.srcToken = collItem;
9522
9542
  map.items.push(pair);
@@ -9553,12 +9573,15 @@ var require_resolve_block_seq = /* @__PURE__ */ __commonJSMin$1(((exports) => {
9553
9573
  parentIndent: bs.indent,
9554
9574
  startOnNewline: true
9555
9575
  });
9556
- if (!props.found) if (props.anchor || props.tag || value) if (value?.type === "block-seq") onError(props.end, "BAD_INDENT", "All sequence items must start at the same column");
9557
- else onError(offset, "MISSING_CHAR", "Sequence item without - indicator");
9558
- else {
9559
- commentEnd = props.end;
9560
- if (props.comment) seq.comment = props.comment;
9561
- continue;
9576
+ if (!props.found) {
9577
+ if (props.anchor || props.tag || value) {
9578
+ if (value?.type === "block-seq") onError(props.end, "BAD_INDENT", "All sequence items must start at the same column");
9579
+ else onError(offset, "MISSING_CHAR", "Sequence item without - indicator");
9580
+ } else {
9581
+ commentEnd = props.end;
9582
+ if (props.comment) seq.comment = props.comment;
9583
+ continue;
9584
+ }
9562
9585
  }
9563
9586
  const node = value ? composeNode(ctx, value, props, onError) : composeEmptyNode(ctx, props.end, start, null, props, onError);
9564
9587
  if (ctx.schema.compat) utilFlowIndentCheck.flowIndentCheck(bs.indent, value, onError);
@@ -9650,8 +9673,10 @@ var require_resolve_flow_collection = /* @__PURE__ */ __commonJSMin$1(((exports)
9650
9673
  if (!props.anchor && !props.tag && !sep && !value) {
9651
9674
  if (i === 0 && props.comma) onError(props.comma, "UNEXPECTED_TOKEN", `Unexpected , in ${fcName}`);
9652
9675
  else if (i < fc.items.length - 1) onError(props.start, "UNEXPECTED_TOKEN", `Unexpected empty item in ${fcName}`);
9653
- if (props.comment) if (coll.comment) coll.comment += "\n" + props.comment;
9654
- else coll.comment = props.comment;
9676
+ if (props.comment) {
9677
+ if (coll.comment) coll.comment += "\n" + props.comment;
9678
+ else coll.comment = props.comment;
9679
+ }
9655
9680
  offset = props.end;
9656
9681
  continue;
9657
9682
  }
@@ -9711,13 +9736,17 @@ var require_resolve_flow_collection = /* @__PURE__ */ __commonJSMin$1(((exports)
9711
9736
  }
9712
9737
  if (props.start < valueProps.found.offset - 1024) onError(valueProps.found, "KEY_OVER_1024_CHARS", "The : indicator must be at most 1024 chars after the start of an implicit flow sequence key");
9713
9738
  }
9714
- } else if (value) if ("source" in value && value.source?.[0] === ":") onError(value, "MISSING_CHAR", `Missing space after : in ${fcName}`);
9715
- else onError(valueProps.start, "MISSING_CHAR", `Missing , or : between ${fcName} items`);
9739
+ } else if (value) {
9740
+ if ("source" in value && value.source?.[0] === ":") onError(value, "MISSING_CHAR", `Missing space after : in ${fcName}`);
9741
+ else onError(valueProps.start, "MISSING_CHAR", `Missing , or : between ${fcName} items`);
9742
+ }
9716
9743
  const valueNode = value ? composeNode(ctx, value, valueProps, onError) : valueProps.found ? composeEmptyNode(ctx, valueProps.end, sep, null, valueProps, onError) : null;
9717
9744
  if (valueNode) {
9718
9745
  if (isBlock(value)) onError(valueNode.range, "BLOCK_IN_FLOW", blockMsg);
9719
- } else if (valueProps.comment) if (keyNode.comment) keyNode.comment += "\n" + valueProps.comment;
9720
- else keyNode.comment = valueProps.comment;
9746
+ } else if (valueProps.comment) {
9747
+ if (keyNode.comment) keyNode.comment += "\n" + valueProps.comment;
9748
+ else keyNode.comment = valueProps.comment;
9749
+ }
9721
9750
  const pair = new Pair.Pair(keyNode, valueNode);
9722
9751
  if (ctx.options.keepSourceTokens) pair.srcToken = collItem;
9723
9752
  if (isMap) {
@@ -9751,8 +9780,10 @@ var require_resolve_flow_collection = /* @__PURE__ */ __commonJSMin$1(((exports)
9751
9780
  }
9752
9781
  if (ee.length > 0) {
9753
9782
  const end = resolveEnd.resolveEnd(ee, cePos, ctx.options.strict, onError);
9754
- if (end.comment) if (coll.comment) coll.comment += "\n" + end.comment;
9755
- else coll.comment = end.comment;
9783
+ if (end.comment) {
9784
+ if (coll.comment) coll.comment += "\n" + end.comment;
9785
+ else coll.comment = end.comment;
9786
+ }
9756
9787
  coll.range = [
9757
9788
  fc.offset,
9758
9789
  cePos,
@@ -9900,9 +9931,10 @@ var require_resolve_block_scalar = /* @__PURE__ */ __commonJSMin$1(((exports) =>
9900
9931
  value += sep + indent.slice(trimIndent) + content;
9901
9932
  sep = "\n";
9902
9933
  prevMoreIndented = true;
9903
- } else if (content === "") if (sep === "\n") value += "\n";
9904
- else sep = "\n";
9905
- else {
9934
+ } else if (content === "") {
9935
+ if (sep === "\n") value += "\n";
9936
+ else sep = "\n";
9937
+ } else {
9906
9938
  value += sep + content;
9907
9939
  sep = " ";
9908
9940
  prevMoreIndented = false;
@@ -10095,9 +10127,10 @@ var require_resolve_flow_scalar = /* @__PURE__ */ __commonJSMin$1(((exports) =>
10095
10127
  let pos = first.lastIndex;
10096
10128
  line.lastIndex = pos;
10097
10129
  while (match = line.exec(source)) {
10098
- if (match[1] === "") if (sep === "\n") res += sep;
10099
- else sep = "\n";
10100
- else {
10130
+ if (match[1] === "") {
10131
+ if (sep === "\n") res += sep;
10132
+ else sep = "\n";
10133
+ } else {
10101
10134
  res += sep + match[1];
10102
10135
  sep = " ";
10103
10136
  }
@@ -10233,8 +10266,10 @@ var require_compose_scalar = /* @__PURE__ */ __commonJSMin$1(((exports) => {
10233
10266
  function findScalarTagByName(schema, value, tagName, tagToken, onError) {
10234
10267
  if (tagName === "!") return schema[identity.SCALAR];
10235
10268
  const matchWithTest = [];
10236
- for (const tag of schema.tags) if (!tag.collection && tag.tag === tagName) if (tag.default && tag.test) matchWithTest.push(tag);
10237
- else return tag;
10269
+ for (const tag of schema.tags) if (!tag.collection && tag.tag === tagName) {
10270
+ if (tag.default && tag.test) matchWithTest.push(tag);
10271
+ else return tag;
10272
+ }
10238
10273
  for (const tag of matchWithTest) if (tag.test?.test(value)) return tag;
10239
10274
  const kt = schema.knownTags[tagName];
10240
10275
  if (kt && !kt.collection) {
@@ -10332,8 +10367,10 @@ var require_compose_node = /* @__PURE__ */ __commonJSMin$1(((exports) => {
10332
10367
  if (anchor && node.anchor === "") onError(anchor, "BAD_ALIAS", "Anchor cannot be an empty string");
10333
10368
  if (atKey && ctx.options.stringKeys && (!identity.isScalar(node) || typeof node.value !== "string" || node.tag && node.tag !== "tag:yaml.org,2002:str")) onError(tag ?? token, "NON_STRING_KEY", "With stringKeys, all keys must be strings");
10334
10369
  if (spaceBefore) node.spaceBefore = true;
10335
- if (comment) if (token.type === "scalar" && token.source === "") node.comment = comment;
10336
- else node.commentBefore = comment;
10370
+ if (comment) {
10371
+ if (token.type === "scalar" && token.source === "") node.comment = comment;
10372
+ else node.commentBefore = comment;
10373
+ }
10337
10374
  if (ctx.options.keepSourceTokens && isSrcToken) node.srcToken = token;
10338
10375
  return node;
10339
10376
  }
@@ -11522,11 +11559,13 @@ var require_lexer = /* @__PURE__ */ __commonJSMin$1(((exports) => {
11522
11559
  end = i;
11523
11560
  } else if (isEmpty(ch)) {
11524
11561
  let next = this.buffer[i + 1];
11525
- if (ch === "\r") if (next === "\n") {
11526
- i += 1;
11527
- ch = "\n";
11528
- next = this.buffer[i + 1];
11529
- } else end = i;
11562
+ if (ch === "\r") {
11563
+ if (next === "\n") {
11564
+ i += 1;
11565
+ ch = "\n";
11566
+ next = this.buffer[i + 1];
11567
+ } else end = i;
11568
+ }
11530
11569
  if (next === "#" || inFlow && flowIndicatorChars.has(next)) break;
11531
11570
  if (ch === "\n") {
11532
11571
  const cs = this.continueScalar(i + 1);
@@ -11743,9 +11782,10 @@ var require_parser = /* @__PURE__ */ __commonJSMin$1(((exports) => {
11743
11782
  for (const it of fc.items) if (it.sep && !it.value && !includesToken(it.start, "explicit-key-ind") && !includesToken(it.sep, "map-value-ind")) {
11744
11783
  if (it.key) it.value = it.key;
11745
11784
  delete it.key;
11746
- if (isFlowToken(it.value)) if (it.value.end) arrayPushArray(it.value.end, it.sep);
11747
- else it.value.end = it.sep;
11748
- else arrayPushArray(it.start, it.sep);
11785
+ if (isFlowToken(it.value)) {
11786
+ if (it.value.end) arrayPushArray(it.value.end, it.sep);
11787
+ else it.value.end = it.sep;
11788
+ } else arrayPushArray(it.start, it.sep);
11749
11789
  delete it.sep;
11750
11790
  }
11751
11791
  }
@@ -12180,58 +12220,60 @@ var require_parser = /* @__PURE__ */ __commonJSMin$1(((exports) => {
12180
12220
  this.onKeyLine = true;
12181
12221
  return;
12182
12222
  case "map-value-ind":
12183
- if (it.explicitKey) if (!it.sep) if (includesToken(it.start, "newline")) Object.assign(it, {
12184
- key: null,
12185
- sep: [this.sourceToken]
12186
- });
12187
- else {
12188
- const start = getFirstKeyStartProps(it.start);
12189
- this.stack.push({
12190
- type: "block-map",
12191
- offset: this.offset,
12192
- indent: this.indent,
12193
- items: [{
12194
- start,
12223
+ if (it.explicitKey) {
12224
+ if (!it.sep) {
12225
+ if (includesToken(it.start, "newline")) Object.assign(it, {
12195
12226
  key: null,
12196
12227
  sep: [this.sourceToken]
12197
- }]
12198
- });
12199
- }
12200
- else if (it.value) map.items.push({
12201
- start: [],
12202
- key: null,
12203
- sep: [this.sourceToken]
12204
- });
12205
- else if (includesToken(it.sep, "map-value-ind")) this.stack.push({
12206
- type: "block-map",
12207
- offset: this.offset,
12208
- indent: this.indent,
12209
- items: [{
12210
- start,
12228
+ });
12229
+ else {
12230
+ const start = getFirstKeyStartProps(it.start);
12231
+ this.stack.push({
12232
+ type: "block-map",
12233
+ offset: this.offset,
12234
+ indent: this.indent,
12235
+ items: [{
12236
+ start,
12237
+ key: null,
12238
+ sep: [this.sourceToken]
12239
+ }]
12240
+ });
12241
+ }
12242
+ } else if (it.value) map.items.push({
12243
+ start: [],
12211
12244
  key: null,
12212
12245
  sep: [this.sourceToken]
12213
- }]
12214
- });
12215
- else if (isFlowToken(it.key) && !includesToken(it.sep, "newline")) {
12216
- const start = getFirstKeyStartProps(it.start);
12217
- const key = it.key;
12218
- const sep = it.sep;
12219
- sep.push(this.sourceToken);
12220
- delete it.key;
12221
- delete it.sep;
12222
- this.stack.push({
12246
+ });
12247
+ else if (includesToken(it.sep, "map-value-ind")) this.stack.push({
12223
12248
  type: "block-map",
12224
12249
  offset: this.offset,
12225
12250
  indent: this.indent,
12226
12251
  items: [{
12227
12252
  start,
12228
- key,
12229
- sep
12253
+ key: null,
12254
+ sep: [this.sourceToken]
12230
12255
  }]
12231
12256
  });
12232
- } else if (start.length > 0) it.sep = it.sep.concat(start, this.sourceToken);
12233
- else it.sep.push(this.sourceToken);
12234
- else if (!it.sep) Object.assign(it, {
12257
+ else if (isFlowToken(it.key) && !includesToken(it.sep, "newline")) {
12258
+ const start = getFirstKeyStartProps(it.start);
12259
+ const key = it.key;
12260
+ const sep = it.sep;
12261
+ sep.push(this.sourceToken);
12262
+ delete it.key;
12263
+ delete it.sep;
12264
+ this.stack.push({
12265
+ type: "block-map",
12266
+ offset: this.offset,
12267
+ indent: this.indent,
12268
+ items: [{
12269
+ start,
12270
+ key,
12271
+ sep
12272
+ }]
12273
+ });
12274
+ } else if (start.length > 0) it.sep = it.sep.concat(start, this.sourceToken);
12275
+ else it.sep.push(this.sourceToken);
12276
+ } else if (!it.sep) Object.assign(it, {
12235
12277
  key: null,
12236
12278
  sep: [this.sourceToken]
12237
12279
  });
@@ -12604,8 +12646,10 @@ var require_public_api = /* @__PURE__ */ __commonJSMin$1(((exports) => {
12604
12646
  const doc = parseDocument(src, options);
12605
12647
  if (!doc) return null;
12606
12648
  doc.warnings.forEach((warning) => log.warn(doc.options.logLevel, warning));
12607
- if (doc.errors.length > 0) if (doc.options.logLevel !== "silent") throw doc.errors[0];
12608
- else doc.errors = [];
12649
+ if (doc.errors.length > 0) {
12650
+ if (doc.options.logLevel !== "silent") throw doc.errors[0];
12651
+ else doc.errors = [];
12652
+ }
12609
12653
  return doc.toJS(Object.assign({ reviver: _reviver }, options));
12610
12654
  }
12611
12655
  function stringify(value, replacer, options) {
@@ -13105,7 +13149,7 @@ while (this[As](this[Ie]()) && this[b].length);
13105
13149
  [ht];
13106
13150
  constructor(t, e) {
13107
13151
  if (e = e || {}, super(e), this.readable = !0, this.writable = !1, typeof t != "string") throw new TypeError("path must be a string");
13108
- this[bt] = !1, this[m] = typeof e.fd == "number" ? e.fd : void 0, this[U] = t, this[Ci] = e.readSize || 16777216, this[j] = !1, this[Fi] = typeof e.size == "number" ? e.size : Infinity, this[ee] = this[Fi], this[ht] = typeof e.autoClose == "boolean" ? e.autoClose : !0, typeof this[m] == "number" ? this[zt]() : this[at]();
13152
+ this[bt] = !1, this[m] = typeof e.fd == "number" ? e.fd : void 0, this[U] = t, this[Ci] = e.readSize || 16777216, this[j] = !1, this[Fi] = typeof e.size == "number" ? e.size : 1 / 0, this[ee] = this[Fi], this[ht] = typeof e.autoClose == "boolean" ? e.autoClose : !0, typeof this[m] == "number" ? this[zt]() : this[at]();
13109
13153
  }
13110
13154
  get fd() {
13111
13155
  return this[m];
@@ -13395,7 +13439,7 @@ while (this[As](this[Ie]()) && this[b].length);
13395
13439
  Z_MAX_WINDOWBITS: 15,
13396
13440
  Z_DEFAULT_WINDOWBITS: 15,
13397
13441
  Z_MIN_CHUNK: 64,
13398
- Z_MAX_CHUNK: Infinity,
13442
+ Z_MAX_CHUNK: 1 / 0,
13399
13443
  Z_DEFAULT_CHUNK: 16384,
13400
13444
  Z_MIN_MEMLEVEL: 1,
13401
13445
  Z_MAX_MEMLEVEL: 9,
@@ -15979,7 +16023,7 @@ while (this[Zs](this[st].shift()));
15979
16023
  };
15980
16024
  }));
15981
16025
  //#endregion
15982
- //#region ../../node_modules/.pnpm/skills@1.5.21/node_modules/skills/dist/cli.mjs
16026
+ //#region ../../node_modules/.pnpm/skills@1.5.22/node_modules/skills/dist/cli.mjs
15983
16027
  var cli_exports = /* @__PURE__ */ __exportAll({});
15984
16028
  function getGitHubHost() {
15985
16029
  const configuredHost = process.env.GH_HOST?.trim();
@@ -16809,27 +16853,45 @@ function getLocalLockPath(cwd) {
16809
16853
  return join$1(cwd || process.cwd(), LOCAL_LOCK_FILE);
16810
16854
  }
16811
16855
  async function readLocalLock(cwd) {
16812
- const lockPath = getLocalLockPath(cwd);
16856
+ const lockDir = cwd || process.cwd();
16857
+ const lockPath = getLocalLockPath(lockDir);
16813
16858
  try {
16814
16859
  const content = await readFile(lockPath, "utf-8");
16815
16860
  const parsed = JSON.parse(content);
16816
16861
  if (typeof parsed.version !== "number" || !parsed.skills) return createEmptyLocalLock();
16817
16862
  if (parsed.version < CURRENT_VERSION$1) return createEmptyLocalLock();
16863
+ for (const entry of Object.values(parsed.skills)) if (entry.sourceType === "local" && !isAbsolute(entry.source)) entry.source = resolve$1(lockDir, entry.source);
16818
16864
  return parsed;
16819
16865
  } catch {
16820
16866
  return createEmptyLocalLock();
16821
16867
  }
16822
16868
  }
16823
16869
  async function writeLocalLock(lock, cwd) {
16824
- const lockPath = getLocalLockPath(cwd);
16870
+ const lockDir = cwd || process.cwd();
16871
+ const lockPath = getLocalLockPath(lockDir);
16825
16872
  const sortedSkills = {};
16826
- for (const key of Object.keys(lock.skills).sort()) sortedSkills[key] = lock.skills[key];
16873
+ for (const key of Object.keys(lock.skills).sort()) {
16874
+ const entry = lock.skills[key];
16875
+ sortedSkills[key] = entry.sourceType === "local" ? {
16876
+ ...entry,
16877
+ source: getPortableLocalSource(entry.source, lockDir)
16878
+ } : entry;
16879
+ }
16827
16880
  const sorted = {
16828
16881
  version: lock.version,
16829
16882
  skills: sortedSkills
16830
16883
  };
16831
16884
  await writeFile(lockPath, JSON.stringify(sorted, null, 2) + "\n", "utf-8");
16832
16885
  }
16886
+ function getPortableLocalSource(source, lockDir) {
16887
+ const absoluteSource = isAbsolute(source) ? source : resolve$1(lockDir, source);
16888
+ const relativeSource = relative(lockDir, absoluteSource);
16889
+ if (isAbsolute(relativeSource)) return absoluteSource.split(sep$1).join("/");
16890
+ const portableSource = relativeSource.split(sep$1).join("/");
16891
+ if (!portableSource) return ".";
16892
+ if (portableSource === ".." || portableSource.startsWith("../")) return portableSource;
16893
+ return `./${portableSource}`;
16894
+ }
16833
16895
  async function computeSkillFolderHash(skillDir) {
16834
16896
  const files = [];
16835
16897
  await collectFiles(skillDir, skillDir, files);
@@ -17010,25 +17072,18 @@ async function discoverSkills(basePath, subpath, options) {
17010
17072
  seenNames.add(skill.name);
17011
17073
  return true;
17012
17074
  };
17013
- for (const dir of prioritySearchDirs) {
17014
- const walkDeep = deepContainerDirs.has(dir);
17075
+ const walkSkillDirs = async (dir, maxDepth, depth = 1) => {
17015
17076
  try {
17016
17077
  const entries = await readdir(dir, { withFileTypes: true });
17017
17078
  for (const entry of entries) {
17018
17079
  if (!entry.isDirectory()) continue;
17019
17080
  const childDir = join$1(dir, entry.name);
17020
- if (await tryAddSkillAt(childDir) || !walkDeep) continue;
17021
- if (SKIP_DIRS.includes(entry.name)) continue;
17022
- try {
17023
- const grandEntries = await readdir(childDir, { withFileTypes: true });
17024
- for (const grand of grandEntries) {
17025
- if (!grand.isDirectory() || SKIP_DIRS.includes(grand.name)) continue;
17026
- await tryAddSkillAt(join$1(childDir, grand.name));
17027
- }
17028
- } catch {}
17081
+ if (await tryAddSkillAt(childDir) || depth >= maxDepth || SKIP_DIRS.includes(entry.name)) continue;
17082
+ await walkSkillDirs(childDir, maxDepth, depth + 1);
17029
17083
  }
17030
17084
  } catch {}
17031
- }
17085
+ };
17086
+ for (const dir of prioritySearchDirs) await walkSkillDirs(dir, deepContainerDirs.has(dir) ? 3 : 1);
17032
17087
  if (skills.length === 0 || options?.fullDepth) {
17033
17088
  const allSkillDirs = await findSkillDirs(searchPath);
17034
17089
  for (const skillDir of allSkillDirs) {
@@ -17073,6 +17128,9 @@ function isZCodeInstalled(homeDir = home, pathExists = existsSync) {
17073
17128
  function isKimchiInstalled(homeDir = home, pathExists = existsSync) {
17074
17129
  return pathExists(join$1(homeDir, ".config", "kimchi"));
17075
17130
  }
17131
+ function isMiniMaxCodeInstalled(homeDir = home, pathExists = existsSync) {
17132
+ return pathExists(join$1(homeDir, ".minimax")) || pathExists("/Applications/MiniMax Code.app");
17133
+ }
17076
17134
  async function detectInstalledAgents() {
17077
17135
  return (await Promise.all(Object.entries(agents).map(async ([type, config]) => ({
17078
17136
  type,
@@ -17954,6 +18012,17 @@ function readZipArchive(bytes, limits) {
17954
18012
  if (offset !== centralDirectory.offset + centralDirectory.size) throw new Error("Invalid zip central directory size");
17955
18013
  return files;
17956
18014
  }
18015
+ function computeWellKnownSkillDigest(skill) {
18016
+ if ("digest" in skill.indexEntry && skill.indexEntry.digest) return skill.indexEntry.digest;
18017
+ const hash = createHash$1("sha256");
18018
+ for (const path of Array.from(skill.files.keys()).sort()) {
18019
+ hash.update(path);
18020
+ hash.update("\0");
18021
+ hash.update(skill.files.get(path));
18022
+ hash.update("\0");
18023
+ }
18024
+ return `sha256:${hash.digest("hex")}`;
18025
+ }
17957
18026
  function getPositiveIntegerEnv(name, fallback) {
17958
18027
  const raw = process.env[name];
17959
18028
  if (!raw) return fallback;
@@ -18339,9 +18408,13 @@ function findSkillMdPaths(tree, subpath) {
18339
18408
  }
18340
18409
  continue;
18341
18410
  }
18342
- if (isContainer && parts.length === 3 && parts[2].toLowerCase() === "skill.md" && !SKIP_DIRS.has(parts[0]) && !SKIP_DIRS.has(parts[1])) {
18343
- const parentSkillMd = `${fullPrefix}${parts[0]}/SKILL.md`.toLowerCase();
18344
- if (!lowerSkillMdSet.has(parentSkillMd) && !seen.has(skillMd)) {
18411
+ const skillDirs = parts.slice(0, -1);
18412
+ const hasAncestorSkill = skillDirs.slice(0, -1).some((_, index) => {
18413
+ const ancestorPath = skillDirs.slice(0, index + 1).join("/");
18414
+ return lowerSkillMdSet.has(`${fullPrefix}${ancestorPath}/SKILL.md`.toLowerCase());
18415
+ });
18416
+ if (isContainer && parts.length >= 3 && parts.length <= 4 && parts.at(-1).toLowerCase() === "skill.md" && skillDirs.every((part) => !SKIP_DIRS.has(part)) && !hasAncestorSkill) {
18417
+ if (!seen.has(skillMd)) {
18345
18418
  priorityResults.push(skillMd);
18346
18419
  seen.add(skillMd);
18347
18420
  }
@@ -18671,6 +18744,14 @@ async function selectAgentsInteractive(options) {
18671
18744
  } catch {}
18672
18745
  return selected;
18673
18746
  }
18747
+ function isSkillsShPackUrl(url) {
18748
+ try {
18749
+ const parsed = new URL(url);
18750
+ return parsed.hostname.replace(/^www\./, "") === "skills.sh" && /^\/p\/[^/]+/.test(parsed.pathname);
18751
+ } catch {
18752
+ return false;
18753
+ }
18754
+ }
18674
18755
  async function handleWellKnownSkills(source, url, options, spinner) {
18675
18756
  spinner.start("Discovering skills from well-known endpoint...");
18676
18757
  const skills = await wellKnownProvider.fetchAllSkills(url).catch(() => []);
@@ -18723,6 +18804,7 @@ async function handleWellKnownSkills(source, url, options, spinner) {
18723
18804
  label: s.installName,
18724
18805
  hint: s.description.length > 60 ? s.description.slice(0, 57) + "…" : s.description
18725
18806
  })),
18807
+ initialValues: isSkillsShPackUrl(url) ? skills : void 0,
18726
18808
  required: true
18727
18809
  });
18728
18810
  if (isCancel(selected)) {
@@ -18892,7 +18974,9 @@ async function handleWellKnownSkills(source, url, options, spinner) {
18892
18974
  source: sourceIdentifier,
18893
18975
  sourceType: "well-known",
18894
18976
  sourceUrl: skill.sourceUrl,
18895
- skillFolderHash: ""
18977
+ skillFolderHash: "",
18978
+ sourceBaseUrl: url,
18979
+ wellKnownDigest: computeWellKnownSkillDigest(skill)
18896
18980
  });
18897
18981
  } catch {}
18898
18982
  }
@@ -18905,8 +18989,10 @@ async function handleWellKnownSkills(source, url, options, spinner) {
18905
18989
  const computedHash = await computeSkillFolderHash(installDir);
18906
18990
  await addSkillToLocalLock(skill.installName, {
18907
18991
  source: sourceIdentifier,
18992
+ sourceUrl: url,
18908
18993
  sourceType: "well-known",
18909
- computedHash
18994
+ computedHash,
18995
+ wellKnownDigest: computeWellKnownSkillDigest(skill)
18910
18996
  }, cwd);
18911
18997
  }
18912
18998
  } catch {}
@@ -19745,7 +19831,7 @@ async function searchSkillsAPI(query, owner) {
19745
19831
  try {
19746
19832
  const params = new URLSearchParams({
19747
19833
  q: query,
19748
- limit: "10"
19834
+ limit: SEARCH_RESULT_LIMIT
19749
19835
  });
19750
19836
  if (owner) params.set("owner", owner);
19751
19837
  const url = `${SEARCH_API_BASE}/api/search?${params.toString()}`;
@@ -19916,7 +20002,7 @@ ${DIM$3} 2) npx skills add <owner/repo@skill>${RESET$3}`;
19916
20002
  }
19917
20003
  console.log(`${DIM$3}Install with${RESET$3} npx skills add <owner/repo@skill>`);
19918
20004
  console.log();
19919
- for (const skill of results.slice(0, 6)) {
20005
+ for (const skill of results) {
19920
20006
  const pkg = skill.source || skill.slug;
19921
20007
  const installs = formatInstalls(skill.installs);
19922
20008
  console.log(`${TEXT$2}${pkg}@${skill.name}${RESET$3}${installs ? ` ${CYAN$1}${installs}${RESET$3}` : ""}`);
@@ -20291,6 +20377,12 @@ function getLocalSource(entry) {
20291
20377
  if ((entry.sourceType === "git" || entry.sourceType === "gitlab") && isBareShorthand(entry.source)) return null;
20292
20378
  return entry.source;
20293
20379
  }
20380
+ function buildLocalCloneSource(entry) {
20381
+ const source = getLocalSource(entry);
20382
+ if (!source) return null;
20383
+ if (entry.sourceType === "github" && isBareShorthand(source)) return `https://github.com/${source.replace(/\.git$/, "")}.git`;
20384
+ return source;
20385
+ }
20294
20386
  function shouldUseFullDepthForUpdate(entry) {
20295
20387
  if (!entry.skillPath) return false;
20296
20388
  const source = entry.sourceType && entry.sourceType !== "github" ? getLocalSource(entry) : entry.source;
@@ -20662,12 +20754,12 @@ async function removeCommand(skillNames, options) {
20662
20754
  const lockEntry = await getSkillFromLock(skillName);
20663
20755
  effectiveSource = lockEntry?.source || "local";
20664
20756
  effectiveSourceType = lockEntry?.sourceType || "local";
20665
- await removeSkillFromLock(skillName);
20757
+ if (!isStillUsed) await removeSkillFromLock(skillName);
20666
20758
  } else {
20667
20759
  const lockEntry = (await readLocalLock(cwd)).skills[skillName];
20668
20760
  effectiveSource = lockEntry?.source || "local";
20669
20761
  effectiveSourceType = lockEntry?.sourceType || "local";
20670
- await removeSkillFromLocalLock(skillName, cwd);
20762
+ if (!isStillUsed) await removeSkillFromLocalLock(skillName, cwd);
20671
20763
  }
20672
20764
  results.push({
20673
20765
  skill: skillName,
@@ -20736,6 +20828,13 @@ function parseRemoveOptions(args) {
20736
20828
  options
20737
20829
  };
20738
20830
  }
20831
+ function getUpdateChildEnv(sourceType) {
20832
+ if (sourceType !== "github") return;
20833
+ return {
20834
+ ...process.env,
20835
+ GH_HOST: "github.com"
20836
+ };
20837
+ }
20739
20838
  function parseUpdateOptions(args) {
20740
20839
  const options = {};
20741
20840
  const positional = [];
@@ -20852,29 +20951,143 @@ async function getProjectSkillsForUpdate(skillFilter) {
20852
20951
  }
20853
20952
  return skills;
20854
20953
  }
20954
+ async function promptDeletions(source, deletedSkills, isGlobal, options) {
20955
+ if (deletedSkills.length === 0) return;
20956
+ console.log();
20957
+ console.log(`${DIM$1}Warning:${RESET$1} The following skills from ${DIM$1}${source}${RESET$1} appear to have been deleted upstream:`);
20958
+ for (const s of deletedSkills) console.log(` ${DIM$1}•${RESET$1} ${s}`);
20959
+ if (options.yes || !process.stdin.isTTY) {
20960
+ console.log(`${DIM$1}Skipping deletion in non-interactive mode.${RESET$1}`);
20961
+ return;
20962
+ }
20963
+ const confirmed = await confirm({ message: `Would you like to remove the local copies of these deleted skills?` });
20964
+ if (confirmed && !isCancel(confirmed)) for (const s of deletedSkills) {
20965
+ console.log(`${DIM$1}Removing${RESET$1} ${s}…`);
20966
+ await removeCommand([s], {
20967
+ yes: true,
20968
+ global: isGlobal
20969
+ });
20970
+ }
20971
+ }
20855
20972
  async function checkAndPromptForDeletions(source, allLockedForSource, lockSkills, isGlobal, options, discoveredPaths) {
20856
20973
  const deletedSkills = allLockedForSource.filter((name) => {
20857
20974
  const entry = lockSkills[name];
20858
20975
  if (!entry?.skillPath) return false;
20859
20976
  return !discoveredPaths.includes(entry.skillPath);
20860
20977
  });
20861
- if (deletedSkills.length > 0) {
20862
- console.log();
20863
- console.log(`${DIM$1}Warning:${RESET$1} The following skills from ${DIM$1}${source}${RESET$1} appear to have been deleted upstream:`);
20864
- for (const s of deletedSkills) console.log(` ${DIM$1}•${RESET$1} ${s}`);
20865
- if (options.yes || !process.stdin.isTTY) console.log(`${DIM$1}Skipping deletion in non-interactive mode.${RESET$1}`);
20866
- else {
20867
- const confirmed = await confirm({ message: `Would you like to remove the local copies of these deleted skills?` });
20868
- if (confirmed && !isCancel(confirmed)) for (const s of deletedSkills) {
20869
- console.log(`${DIM$1}Removing${RESET$1} ${s}…`);
20870
- await removeCommand([s], {
20871
- yes: true,
20872
- global: isGlobal
20873
- });
20978
+ await promptDeletions(source, deletedSkills, isGlobal, options);
20979
+ return deletedSkills;
20980
+ }
20981
+ async function checkWellKnownForUpdates(baseUrl, items) {
20982
+ let indexResult;
20983
+ try {
20984
+ indexResult = await wellKnownProvider.fetchIndex(baseUrl, { updateCheck: true });
20985
+ } catch {
20986
+ return { status: "error" };
20987
+ }
20988
+ if (!indexResult) return { status: "error" };
20989
+ const byName = new Map(indexResult.entries.map((entry) => [entry.name, entry]));
20990
+ const removedSkills = items.filter((item) => !byName.has(item.name)).map((item) => item.name);
20991
+ const localNames = new Set(items.map((item) => item.name));
20992
+ const newSkills = indexResult.entries.map((entry) => entry.name).filter((name) => !localNames.has(name));
20993
+ const changedSkills = [];
20994
+ const needsContentCheck = [];
20995
+ for (const item of items) {
20996
+ const entry = byName.get(item.name);
20997
+ if (!entry) continue;
20998
+ if (entry.version === "0.2.0") {
20999
+ if (!item.digest || entry.digest !== item.digest) changedSkills.push(item.name);
21000
+ } else needsContentCheck.push(item);
21001
+ }
21002
+ if (needsContentCheck.length > 0) {
21003
+ const tracked = new Set(needsContentCheck.map((item) => item.name));
21004
+ const skills = (await Promise.all(indexResult.entries.filter((entry) => tracked.has(entry.name)).map((entry) => wellKnownProvider.fetchSkillByEntry(entry).catch(() => null)))).filter((skill) => skill !== null);
21005
+ if (skills.length === 0) return { status: "error" };
21006
+ const digests = new Map(skills.map((skill) => [skill.installName, computeWellKnownSkillDigest(skill)]));
21007
+ for (const item of needsContentCheck) {
21008
+ const digest = digests.get(item.name);
21009
+ if (!digest || !item.digest || digest !== item.digest) changedSkills.push(item.name);
21010
+ }
21011
+ }
21012
+ if (changedSkills.length === 0 && removedSkills.length === 0) return {
21013
+ status: "current",
21014
+ newSkills
21015
+ };
21016
+ return {
21017
+ status: "changed",
21018
+ changedSkills,
21019
+ removedSkills,
21020
+ newSkills
21021
+ };
21022
+ }
21023
+ function printNewSkills(baseUrl, newSkills, isGlobal) {
21024
+ if (newSkills.length === 0) return;
21025
+ const names = newSkills.map(sanitizeMetadata);
21026
+ console.log(` ${DIM$1}${newSkills.length} new skill(s) available from this source:${RESET$1} ${names.join(", ")}`);
21027
+ console.log(` ${DIM$1}To install: ${TEXT$1}npx skills add ${baseUrl} --skill ${names.join(" ")}${isGlobal ? " -g" : ""}${RESET$1}`);
21028
+ }
21029
+ async function processWellKnownUpdates(groups, isGlobal, options) {
21030
+ let successCount = 0;
21031
+ let failCount = 0;
21032
+ let changed = false;
21033
+ for (const [baseUrl, items] of groups) {
21034
+ process.stdout.write(`\r${DIM$1}Checking skills from source: ${baseUrl}${RESET$1}\x1b[K\n`);
21035
+ const result = await checkWellKnownForUpdates(baseUrl, items);
21036
+ if (result.status === "error") {
21037
+ console.log(` ${DIM$1}✗ Failed to check skills from ${baseUrl}${RESET$1}`);
21038
+ continue;
21039
+ }
21040
+ if (result.status === "current") {
21041
+ printNewSkills(baseUrl, result.newSkills, isGlobal);
21042
+ continue;
21043
+ }
21044
+ changed = true;
21045
+ await promptDeletions(baseUrl, result.removedSkills, isGlobal, options);
21046
+ printNewSkills(baseUrl, result.newSkills, isGlobal);
21047
+ if (result.changedSkills.length === 0) continue;
21048
+ const cliEntry = join$1(__dirname$1, "..", "bin", "cli.mjs");
21049
+ if (!existsSync(cliEntry)) {
21050
+ failCount += result.changedSkills.length;
21051
+ console.log(` ${DIM$1}✗ CLI entrypoint not found at ${cliEntry}${RESET$1}`);
21052
+ continue;
21053
+ }
21054
+ const itemByName = new Map(items.map((item) => [item.name, item]));
21055
+ for (const name of result.changedSkills) {
21056
+ const safeName = sanitizeMetadata(name);
21057
+ console.log(`${TEXT$1}Updating ${safeName}…${RESET$1}`);
21058
+ const subagents = itemByName.get(name)?.subagents;
21059
+ const subagentArgs = !isGlobal && subagents?.length ? ["--subagent", ...subagents.map((s) => s === "" ? "root" : s)] : [];
21060
+ if (spawnSync(process.execPath, [
21061
+ cliEntry,
21062
+ "add",
21063
+ baseUrl,
21064
+ "--skill",
21065
+ name,
21066
+ ...subagentArgs,
21067
+ ...isGlobal ? ["-g"] : [],
21068
+ "-y"
21069
+ ], {
21070
+ stdio: [
21071
+ "inherit",
21072
+ "pipe",
21073
+ "pipe"
21074
+ ],
21075
+ encoding: "utf-8",
21076
+ shell: false
21077
+ }).status === 0) {
21078
+ successCount++;
21079
+ console.log(` ${TEXT$1}✓${RESET$1} Updated ${safeName}`);
21080
+ } else {
21081
+ failCount++;
21082
+ console.log(` ${DIM$1}✗ Failed to update ${safeName}${RESET$1}`);
20874
21083
  }
20875
21084
  }
20876
21085
  }
20877
- return deletedSkills;
21086
+ return {
21087
+ successCount,
21088
+ failCount,
21089
+ changed
21090
+ };
20878
21091
  }
20879
21092
  async function updateGlobalSkills(options = {}) {
20880
21093
  const lock = await readSkillLock();
@@ -20895,10 +21108,20 @@ async function updateGlobalSkills(options = {}) {
20895
21108
  const updates = [];
20896
21109
  const skipped = [];
20897
21110
  const checkable = [];
21111
+ const wellKnownGroups = /* @__PURE__ */ new Map();
20898
21112
  for (const skillName of skillNames) {
20899
21113
  if (!matchesSkillFilter(skillName, options.skills)) continue;
20900
21114
  const entry = lock.skills[skillName];
20901
21115
  if (!entry) continue;
21116
+ if (entry.sourceType === "well-known" && entry.sourceBaseUrl && entry.wellKnownDigest) {
21117
+ const group = wellKnownGroups.get(entry.sourceBaseUrl) || [];
21118
+ group.push({
21119
+ name: skillName,
21120
+ digest: entry.wellKnownDigest
21121
+ });
21122
+ wellKnownGroups.set(entry.sourceBaseUrl, group);
21123
+ continue;
21124
+ }
20902
21125
  if (!entry.skillFolderHash || !entry.skillPath) {
20903
21126
  skipped.push({
20904
21127
  name: skillName,
@@ -20914,6 +21137,10 @@ async function updateGlobalSkills(options = {}) {
20914
21137
  entry
20915
21138
  });
20916
21139
  }
21140
+ const wellKnownCount = Array.from(wellKnownGroups.values()).reduce((sum, items) => sum + items.length, 0);
21141
+ const { successCount: wkSuccessCount, failCount: wkFailCount, changed: wkChanged } = await processWellKnownUpdates(wellKnownGroups, true, options);
21142
+ successCount += wkSuccessCount;
21143
+ failCount += wkFailCount;
20917
21144
  const bySource = /* @__PURE__ */ new Map();
20918
21145
  for (const item of checkable) {
20919
21146
  const source = item.entry.source;
@@ -20971,8 +21198,8 @@ async function updateGlobalSkills(options = {}) {
20971
21198
  }
20972
21199
  }
20973
21200
  if (checkable.length > 0) process.stdout.write("\r\x1B[K");
20974
- const checkedCount = checkable.length + skipped.length;
20975
- if (checkable.length === 0 && skipped.length === 0) {
21201
+ const checkedCount = checkable.length + skipped.length + wellKnownCount;
21202
+ if (checkable.length === 0 && skipped.length === 0 && wellKnownCount === 0) {
20976
21203
  if (!options.skills) console.log(`${DIM$1}No global skills to check.${RESET$1}`);
20977
21204
  return {
20978
21205
  successCount,
@@ -20980,6 +21207,14 @@ async function updateGlobalSkills(options = {}) {
20980
21207
  checkedCount: 0
20981
21208
  };
20982
21209
  }
21210
+ if (checkable.length === 0 && skipped.length === 0) {
21211
+ if (!wkChanged) console.log(`${TEXT$1}✓ All global skills are up to date${RESET$1}`);
21212
+ return {
21213
+ successCount,
21214
+ failCount,
21215
+ checkedCount
21216
+ };
21217
+ }
20983
21218
  if (checkable.length === 0 && skipped.length > 0) {
20984
21219
  printSkippedSkills(skipped);
20985
21220
  return {
@@ -20989,7 +21224,7 @@ async function updateGlobalSkills(options = {}) {
20989
21224
  };
20990
21225
  }
20991
21226
  if (updates.length === 0) {
20992
- console.log(`${TEXT$1}✓ All global skills are up to date${RESET$1}`);
21227
+ if (!wkChanged) console.log(`${TEXT$1}✓ All global skills are up to date${RESET$1}`);
20993
21228
  return {
20994
21229
  successCount,
20995
21230
  failCount,
@@ -21018,6 +21253,8 @@ async function updateGlobalSkills(options = {}) {
21018
21253
  cliEntry,
21019
21254
  "add",
21020
21255
  installUrl,
21256
+ "--skill",
21257
+ update.name,
21021
21258
  ...fullDepthArgs,
21022
21259
  "-g",
21023
21260
  "-y"
@@ -21028,6 +21265,7 @@ async function updateGlobalSkills(options = {}) {
21028
21265
  "pipe"
21029
21266
  ],
21030
21267
  encoding: "utf-8",
21268
+ env: getUpdateChildEnv(update.entry.sourceType),
21031
21269
  shell: false
21032
21270
  }).status === 0) {
21033
21271
  successCount++;
@@ -21059,9 +21297,24 @@ async function updateProjectSkills(options = {}) {
21059
21297
  foundCount: 0
21060
21298
  };
21061
21299
  }
21062
- const updatable = projectSkills.filter((s) => s.entry.skillPath);
21063
- const legacy = projectSkills.filter((s) => !s.entry.skillPath);
21064
- if (updatable.length === 0) {
21300
+ const wellKnownGroups = /* @__PURE__ */ new Map();
21301
+ const nonWellKnown = [];
21302
+ for (const skill of projectSkills) {
21303
+ const { entry } = skill;
21304
+ if (entry.sourceType === "well-known" && entry.sourceUrl && entry.wellKnownDigest) {
21305
+ const group = wellKnownGroups.get(entry.sourceUrl) || [];
21306
+ group.push({
21307
+ name: skill.name,
21308
+ digest: entry.wellKnownDigest,
21309
+ subagents: entry.subagents
21310
+ });
21311
+ wellKnownGroups.set(entry.sourceUrl, group);
21312
+ } else nonWellKnown.push(skill);
21313
+ }
21314
+ const wellKnownCount = Array.from(wellKnownGroups.values()).reduce((sum, items) => sum + items.length, 0);
21315
+ const updatable = nonWellKnown.filter((s) => s.entry.skillPath);
21316
+ const legacy = nonWellKnown.filter((s) => !s.entry.skillPath);
21317
+ if (updatable.length === 0 && wellKnownCount === 0) {
21065
21318
  console.log(`${DIM$1}No project skills can be updated in place.${RESET$1}`);
21066
21319
  printLegacyProjectSkills(legacy);
21067
21320
  return {
@@ -21083,8 +21336,11 @@ async function updateProjectSkills(options = {}) {
21083
21336
  if (hasUniversal) targetParts.push("Universal");
21084
21337
  targetParts.push(...targetAgentNames);
21085
21338
  if (targetParts.length > 0) console.log(`${TEXT$1}Updating for: ${targetParts.join(", ")}${RESET$1}`);
21086
- console.log(`${TEXT$1}Refreshing ${updatable.length} skill(s)…${RESET$1}`);
21339
+ console.log(`${TEXT$1}Refreshing ${updatable.length + wellKnownCount} skill(s)…${RESET$1}`);
21087
21340
  console.log();
21341
+ const { successCount: wkSuccessCount, failCount: wkFailCount } = await processWellKnownUpdates(wellKnownGroups, false, options);
21342
+ successCount += wkSuccessCount;
21343
+ failCount += wkFailCount;
21088
21344
  const bySource = /* @__PURE__ */ new Map();
21089
21345
  for (const skill of updatable) {
21090
21346
  const source = skill.entry.sourceUrl || skill.entry.source;
@@ -21094,28 +21350,28 @@ async function updateProjectSkills(options = {}) {
21094
21350
  }
21095
21351
  const localLock = await readLocalLock();
21096
21352
  const cliEntry = join$1(__dirname$1, "..", "bin", "cli.mjs");
21097
- if (!existsSync(cliEntry)) {
21353
+ if (updatable.length > 0 && !existsSync(cliEntry)) {
21098
21354
  console.log(`${DIM$1}✗ CLI entrypoint not found at ${cliEntry}${RESET$1}`);
21099
21355
  return {
21100
21356
  successCount,
21101
- failCount: updatable.length,
21357
+ failCount: failCount + updatable.length,
21102
21358
  foundCount: projectSkills.length
21103
21359
  };
21104
21360
  }
21105
21361
  for (const [source, skillsForSource] of bySource) {
21106
21362
  const firstEntry = skillsForSource[0].entry;
21107
- const sourceUrl = firstEntry.sourceUrl || firstEntry.source;
21363
+ const cloneSource = buildLocalCloneSource(firstEntry);
21108
21364
  const ref = firstEntry.ref;
21109
21365
  const allLockedForSource = Object.entries(localLock.skills).filter(([_, entry]) => (entry.sourceUrl || entry.source) === source).map(([name, _]) => name);
21110
21366
  let tempDir = null;
21111
21367
  let deletedSkills = [];
21112
- if (buildLocalUpdateSource(firstEntry) === null) {
21368
+ if (cloneSource === null) {
21113
21369
  failCount += skillsForSource.length;
21114
21370
  console.log(`${DIM$1}✗ Cannot update ${source}: skills-lock.json is missing sourceUrl for this generic Git source${RESET$1}`);
21115
21371
  continue;
21116
21372
  }
21117
21373
  try {
21118
- tempDir = await cloneRepo(sourceUrl, ref);
21374
+ tempDir = await cloneRepo(cloneSource, ref);
21119
21375
  const discoveredPaths = (await discoverSkills(tempDir, void 0, { fullDepth: true })).map((s) => {
21120
21376
  return join$1(relative(tempDir, s.path), "SKILL.md").split(sep$1).join("/");
21121
21377
  });
@@ -21153,6 +21409,7 @@ async function updateProjectSkills(options = {}) {
21153
21409
  "pipe"
21154
21410
  ],
21155
21411
  encoding: "utf-8",
21412
+ env: getUpdateChildEnv(skill.entry.sourceType),
21156
21413
  shell: false
21157
21414
  }).status === 0) {
21158
21415
  successCount++;
@@ -21881,7 +22138,7 @@ async function main() {
21881
22138
  process.exitCode = 1;
21882
22139
  }
21883
22140
  }
21884
- var import_dist, import_picocolors, DEFAULT_GITHUB_HOST, SOURCE_ALIASES, CSI_RE, OSC_RE, DCS_PM_APC_RE, SIMPLE_ESC_RE, C1_RE, CONTROL_RE, silentOutput, S_STEP_ACTIVE, S_STEP_CANCEL, S_STEP_SUBMIT, S_RADIO_ACTIVE, S_RADIO_INACTIVE, S_BULLET, S_BAR, S_BAR_H, cancelSymbol, DEFAULT_CLONE_TIMEOUT_MS, ALLOWED_GIT_PROTOCOLS, CLONE_TIMEOUT_MS, execFileAsync, GitCloneError, LOCAL_LOCK_FILE, CURRENT_VERSION$1, SKIP_DIRS, AGENT_PROJECT_SKILL_DIRS, home, configHome, codexHome, claudeHome, vibeHome, hermesHome, autohandHome, grokHome, zedAppDataHome, zedFlatpakConfigHome, agents, EVE_SUBAGENTS_DIR, AGENTS_DIR$1, SKILLS_SUBDIR, EXCLUDE_FILES$1, EXCLUDE_DIRS$1, isExcluded$1, TELEMETRY_URL, AUDIT_URL, cliVersion, detectedAgentName, pendingTelemetry, import_dist$1, cachedResult, agentNameToType, ProviderRegistryImpl, ZIP_LOCAL_FILE_HEADER, ZIP_CENTRAL_DIRECTORY_HEADER, ZIP_END_OF_CENTRAL_DIRECTORY, ZIP64_END_OF_CENTRAL_DIRECTORY, ZIP64_END_OF_CENTRAL_DIRECTORY_LOCATOR, ZIP_END_MIN_SIZE, ZIP_MAX_COMMENT_SIZE, CP437_HIGH_BYTES, ArchiveValidationError, DISCOVERY_SCHEMA_V2, MAX_ARCHIVE_UNPACKED_BYTES, MAX_ARCHIVE_FILES, DISCOVERY_TIMEOUT_MS, WellKnownProvider, wellKnownProvider, DEFAULT_DOWNLOAD_MAX_BYTES, DEFAULT_EXTRACT_MAX_BYTES, DEFAULT_EXTRACT_MAX_FILES, FETCH_TIMEOUT_MS, AGENTS_DIR, LOCK_FILE, CURRENT_VERSION, _ghWarningShown, DOWNLOAD_BASE_URL, BLOB_ALLOWED_REPOS, FETCH_TIMEOUT, _rateLimitedThisSession, PRIORITY_PREFIXES, version$1, isCancelled$1, EVE_AGENT_LABEL, RESET$3, BOLD$3, DIM$3, TEXT$2, CYAN$1, SEARCH_API_BASE, GITHUB_OWNER_PATTERN, HIDE_CURSOR, SHOW_CURSOR, CLEAR_DOWN, MOVE_UP, MOVE_TO_COL, isCancelled, RESET$2, BOLD$2, DIM$2, CYAN, YELLOW, __dirname$1, RESET$1, BOLD$1, DIM$1, TEXT$1, BLOB_ALLOWED_OWNERS, EXCLUDE_FILES, EXCLUDE_DIRS, USE_AGENT_CONFIGS, SUPPORTED_USE_AGENTS, UseCommandError, __dirname, VERSION, RESET, BOLD, DIM, TEXT, LOGO_LINES, GRAYS;
22141
+ var import_dist, import_picocolors, DEFAULT_GITHUB_HOST, SOURCE_ALIASES, CSI_RE, OSC_RE, DCS_PM_APC_RE, SIMPLE_ESC_RE, C1_RE, CONTROL_RE, silentOutput, S_STEP_ACTIVE, S_STEP_CANCEL, S_STEP_SUBMIT, S_RADIO_ACTIVE, S_RADIO_INACTIVE, S_BULLET, S_BAR, S_BAR_H, cancelSymbol, DEFAULT_CLONE_TIMEOUT_MS, ALLOWED_GIT_PROTOCOLS, CLONE_TIMEOUT_MS, execFileAsync, GitCloneError, LOCAL_LOCK_FILE, CURRENT_VERSION$1, AGENTS_DIR$1, SKILLS_SUBDIR, SKIP_DIRS, AGENT_PROJECT_SKILL_DIRS, home, configHome, codexHome, claudeHome, vibeHome, hermesHome, autohandHome, grokHome, zedAppDataHome, zedFlatpakConfigHome, agents, EVE_SUBAGENTS_DIR, EXCLUDE_FILES$1, EXCLUDE_DIRS$1, isExcluded$1, TELEMETRY_URL, AUDIT_URL, cliVersion, detectedAgentName, pendingTelemetry, import_dist$1, cachedResult, agentNameToType, ProviderRegistryImpl, ZIP_LOCAL_FILE_HEADER, ZIP_CENTRAL_DIRECTORY_HEADER, ZIP_END_OF_CENTRAL_DIRECTORY, ZIP64_END_OF_CENTRAL_DIRECTORY, ZIP64_END_OF_CENTRAL_DIRECTORY_LOCATOR, ZIP_END_MIN_SIZE, ZIP_MAX_COMMENT_SIZE, CP437_HIGH_BYTES, ArchiveValidationError, DISCOVERY_SCHEMA_V2, MAX_ARCHIVE_UNPACKED_BYTES, MAX_ARCHIVE_FILES, DISCOVERY_TIMEOUT_MS, WellKnownProvider, wellKnownProvider, DEFAULT_DOWNLOAD_MAX_BYTES, DEFAULT_EXTRACT_MAX_BYTES, DEFAULT_EXTRACT_MAX_FILES, FETCH_TIMEOUT_MS, AGENTS_DIR, LOCK_FILE, CURRENT_VERSION, _ghWarningShown, DOWNLOAD_BASE_URL, BLOB_ALLOWED_REPOS, FETCH_TIMEOUT, _rateLimitedThisSession, PRIORITY_PREFIXES, version$1, isCancelled$1, EVE_AGENT_LABEL, RESET$3, BOLD$3, DIM$3, TEXT$2, CYAN$1, SEARCH_API_BASE, SEARCH_RESULT_LIMIT, GITHUB_OWNER_PATTERN, HIDE_CURSOR, SHOW_CURSOR, CLEAR_DOWN, MOVE_UP, MOVE_TO_COL, isCancelled, RESET$2, BOLD$2, DIM$2, CYAN, YELLOW, __dirname$1, RESET$1, BOLD$1, DIM$1, TEXT$1, BLOB_ALLOWED_OWNERS, EXCLUDE_FILES, EXCLUDE_DIRS, USE_AGENT_CONFIGS, SUPPORTED_USE_AGENTS, UseCommandError, __dirname, VERSION, RESET, BOLD, DIM, TEXT, LOGO_LINES, GRAYS;
21885
22142
  var init_cli = __esmMin((() => {
21886
22143
  init_rolldown_runtime();
21887
22144
  init_core();
@@ -21940,6 +22197,8 @@ var init_cli = __esmMin((() => {
21940
22197
  };
21941
22198
  LOCAL_LOCK_FILE = "skills-lock.json";
21942
22199
  CURRENT_VERSION$1 = 1;
22200
+ AGENTS_DIR$1 = ".agents";
22201
+ SKILLS_SUBDIR = "skills";
21943
22202
  SKIP_DIRS = [
21944
22203
  "node_modules",
21945
22204
  ".git",
@@ -21963,6 +22222,7 @@ var init_cli = __esmMin((() => {
21963
22222
  ".kilocode/skills",
21964
22223
  ".kimchi/skills",
21965
22224
  ".kiro/skills",
22225
+ ".minimax/skills",
21966
22226
  ".mux/skills",
21967
22227
  ".neovate/skills",
21968
22228
  ".opencode/skills",
@@ -22395,6 +22655,15 @@ var init_cli = __esmMin((() => {
22395
22655
  return existsSync(join$1(home, ".mcpjam"));
22396
22656
  }
22397
22657
  },
22658
+ "minimax-code": {
22659
+ name: "minimax-code",
22660
+ displayName: "MiniMax Code",
22661
+ skillsDir: ".minimax/skills",
22662
+ globalSkillsDir: join$1(home, ".minimax/skills"),
22663
+ detectInstalled: async () => {
22664
+ return isMiniMaxCodeInstalled();
22665
+ }
22666
+ },
22398
22667
  "mistral-vibe": {
22399
22668
  name: "mistral-vibe",
22400
22669
  displayName: "Mistral Vibe",
@@ -22668,8 +22937,6 @@ var init_cli = __esmMin((() => {
22668
22937
  }
22669
22938
  };
22670
22939
  EVE_SUBAGENTS_DIR = join$1("agent", "subagents");
22671
- AGENTS_DIR$1 = ".agents";
22672
- SKILLS_SUBDIR = "skills";
22673
22940
  EXCLUDE_FILES$1 = /* @__PURE__ */ new Set(["metadata.json"]);
22674
22941
  EXCLUDE_DIRS$1 = /* @__PURE__ */ new Set([
22675
22942
  ".git",
@@ -22766,10 +23033,10 @@ var init_cli = __esmMin((() => {
22766
23033
  return { matches: false };
22767
23034
  }
22768
23035
  }
22769
- async fetchIndex(baseUrl) {
22770
- return (await this.fetchIndexCandidates(baseUrl))[0] ?? null;
23036
+ async fetchIndex(baseUrl, options) {
23037
+ return (await this.fetchIndexCandidates(baseUrl, options))[0] ?? null;
22771
23038
  }
22772
- async fetchIndexCandidates(baseUrl) {
23039
+ async fetchIndexCandidates(baseUrl, options) {
22773
23040
  try {
22774
23041
  const parsed = new URL(baseUrl);
22775
23042
  const basePath = parsed.pathname.replace(/\/$/, "");
@@ -22789,7 +23056,10 @@ var init_cli = __esmMin((() => {
22789
23056
  }
22790
23057
  const candidates = [];
22791
23058
  for (const { indexUrl, baseUrl: resolvedBase, wellKnownPath } of urlsToTry) try {
22792
- const response = await fetch(indexUrl, { signal });
23059
+ const response = await fetch(indexUrl, {
23060
+ signal,
23061
+ ...options?.updateCheck ? { headers: { "X-Skills-Update-Check": "1" } } : {}
23062
+ });
22793
23063
  if (!response.ok) continue;
22794
23064
  const rawIndex = await response.json();
22795
23065
  const normalized = this.normalizeIndex(rawIndex, indexUrl, wellKnownPath);
@@ -23180,6 +23450,7 @@ var init_cli = __esmMin((() => {
23180
23450
  ".kilocode/skills/",
23181
23451
  ".kimchi/skills/",
23182
23452
  ".kiro/skills/",
23453
+ ".minimax/skills/",
23183
23454
  ".mux/skills/",
23184
23455
  ".neovate/skills/",
23185
23456
  ".opencode/skills/",
@@ -23192,7 +23463,7 @@ var init_cli = __esmMin((() => {
23192
23463
  ".zcode/skills/",
23193
23464
  ".zencoder/skills/"
23194
23465
  ];
23195
- version$1 = "1.5.21";
23466
+ version$1 = "1.5.22";
23196
23467
  isCancelled$1 = (value) => typeof value === "symbol";
23197
23468
  EVE_AGENT_LABEL = "eve agent";
23198
23469
  setVersion(version$1);
@@ -23202,6 +23473,7 @@ var init_cli = __esmMin((() => {
23202
23473
  TEXT$2 = "\x1B[38;5;145m";
23203
23474
  CYAN$1 = "\x1B[36m";
23204
23475
  SEARCH_API_BASE = process.env.SKILLS_API_URL || "https://skills.sh";
23476
+ SEARCH_RESULT_LIMIT = "20";
23205
23477
  GITHUB_OWNER_PATTERN = /^[a-z0-9](?:[a-z0-9-]{0,38})$/i;
23206
23478
  HIDE_CURSOR = "\x1B[?25l";
23207
23479
  SHOW_CURSOR = "\x1B[?25h";
@@ -23268,7 +23540,7 @@ var init_cli = __esmMin((() => {
23268
23540
  main().finally(() => flushTelemetry().then(() => process.exit(process.exitCode ?? 0)));
23269
23541
  }));
23270
23542
  //#endregion
23271
- //#region ../../node_modules/.pnpm/skills@1.5.21/node_modules/skills/bin/cli.mjs
23543
+ //#region ../../node_modules/.pnpm/skills@1.5.22/node_modules/skills/bin/cli.mjs
23272
23544
  if (module.enableCompileCache && !process.env.NODE_DISABLE_COMPILE_CACHE) try {
23273
23545
  module.enableCompileCache();
23274
23546
  } catch {}