@jixo/cli 0.26.0 → 4.0.0

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.
@@ -270,27 +270,6 @@ const obj_assign_props = /* @__NO_SIDE_EFFECTS__ */ (a$1, b$1) => {
270
270
  Object.defineProperties(a$1, b_props);
271
271
  return a$1;
272
272
  };
273
- /**
274
- * 获取对象的属性
275
- *
276
- * opts.excludeSymbols default is false
277
- * opts.enumerableOnly default is true
278
- */
279
- const obj_props = ((a$1, opts) => {
280
- const excludeSymbols = opts?.excludeSymbols ?? false;
281
- if (opts?.enumerableOnly ?? true) {
282
- if (excludeSymbols) return Object.keys(a$1);
283
- const propDesMap = Object.getOwnPropertyDescriptors(a$1);
284
- const props = [];
285
- for (const prop in propDesMap) if (propDesMap[prop].enumerable) props.push(prop);
286
- return props;
287
- } else {
288
- const props = Object.getOwnPropertyNames(a$1);
289
- if (excludeSymbols) return props;
290
- props.push(...Object.getOwnPropertySymbols(a$1));
291
- return props;
292
- }
293
- });
294
273
 
295
274
  //#endregion
296
275
  //#region ../../node_modules/.pnpm/@gaubee+util@0.35.1/node_modules/@gaubee/util/esm/promise-helper.js
@@ -1694,9 +1673,9 @@ var require_fs$3 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/fast-g
1694
1673
  //#region ../../node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/utils/path.js
1695
1674
  var require_path = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/utils/path.js": ((exports) => {
1696
1675
  Object.defineProperty(exports, "__esModule", { value: true });
1697
- const os$1 = __require("os");
1676
+ const os$2 = __require("os");
1698
1677
  const path$10 = __require("path");
1699
- const IS_WINDOWS_PLATFORM = os$1.platform() === "win32";
1678
+ const IS_WINDOWS_PLATFORM = os$2.platform() === "win32";
1700
1679
  const LEADING_DOT_SEGMENT_CHARACTERS_COUNT = 2;
1701
1680
  /**
1702
1681
  * All non-escaped special characters.
@@ -7052,12 +7031,12 @@ var require_sync = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/fast-g
7052
7031
  var require_settings = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/settings.js": ((exports) => {
7053
7032
  Object.defineProperty(exports, "__esModule", { value: true });
7054
7033
  const fs$2 = __require("fs");
7055
- const os = __require("os");
7034
+ const os$1 = __require("os");
7056
7035
  /**
7057
7036
  * The `os.cpus` method can return zero. We expect the number of cores to be greater than zero.
7058
7037
  * https://github.com/nodejs/node/blob/7faeddf23a98c53896f8b574a6e66589e8fb1eb8/lib/os.js#L106-L107
7059
7038
  */
7060
- const CPU_COUNT = Math.max(os.cpus().length, 1);
7039
+ const CPU_COUNT = Math.max(os$1.cpus().length, 1);
7061
7040
  exports.DEFAULT_FILE_SYSTEM_ADAPTER = {
7062
7041
  lstat: fs$2.lstat,
7063
7042
  lstatSync: fs$2.lstatSync,
@@ -7614,7 +7593,7 @@ var require_common = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/debu
7614
7593
  * This is the common logic for both the Node.js and web browser
7615
7594
  * implementations of `debug()`.
7616
7595
  */
7617
- function setup(env) {
7596
+ function setup(env$1) {
7618
7597
  createDebug.debug = createDebug;
7619
7598
  createDebug.default = createDebug;
7620
7599
  createDebug.coerce = coerce;
@@ -7623,8 +7602,8 @@ var require_common = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/debu
7623
7602
  createDebug.enabled = enabled;
7624
7603
  createDebug.humanize = require_ms();
7625
7604
  createDebug.destroy = destroy;
7626
- Object.keys(env).forEach((key) => {
7627
- createDebug[key] = env[key];
7605
+ Object.keys(env$1).forEach((key) => {
7606
+ createDebug[key] = env$1[key];
7628
7607
  });
7629
7608
  /**
7630
7609
  * The currently active debug mode names, and names to skip.
@@ -8007,6 +7986,87 @@ var require_browser = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/deb
8007
7986
  };
8008
7987
  }) });
8009
7988
 
7989
+ //#endregion
7990
+ //#region ../../node_modules/.pnpm/has-flag@4.0.0/node_modules/has-flag/index.js
7991
+ var require_has_flag = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/has-flag@4.0.0/node_modules/has-flag/index.js": ((exports, module) => {
7992
+ module.exports = (flag, argv = process.argv) => {
7993
+ const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
7994
+ const position = argv.indexOf(prefix + flag);
7995
+ const terminatorPosition = argv.indexOf("--");
7996
+ return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
7997
+ };
7998
+ }) });
7999
+
8000
+ //#endregion
8001
+ //#region ../../node_modules/.pnpm/supports-color@7.2.0/node_modules/supports-color/index.js
8002
+ var require_supports_color = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/supports-color@7.2.0/node_modules/supports-color/index.js": ((exports, module) => {
8003
+ const os = __require("os");
8004
+ const tty$1 = __require("tty");
8005
+ const hasFlag = require_has_flag();
8006
+ const { env } = process;
8007
+ let forceColor;
8008
+ if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) forceColor = 0;
8009
+ else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) forceColor = 1;
8010
+ if ("FORCE_COLOR" in env) if (env.FORCE_COLOR === "true") forceColor = 1;
8011
+ else if (env.FORCE_COLOR === "false") forceColor = 0;
8012
+ else forceColor = env.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(env.FORCE_COLOR, 10), 3);
8013
+ function translateLevel(level) {
8014
+ if (level === 0) return false;
8015
+ return {
8016
+ level,
8017
+ hasBasic: true,
8018
+ has256: level >= 2,
8019
+ has16m: level >= 3
8020
+ };
8021
+ }
8022
+ function supportsColor(haveStream, streamIsTTY) {
8023
+ if (forceColor === 0) return 0;
8024
+ if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) return 3;
8025
+ if (hasFlag("color=256")) return 2;
8026
+ if (haveStream && !streamIsTTY && forceColor === void 0) return 0;
8027
+ const min = forceColor || 0;
8028
+ if (env.TERM === "dumb") return min;
8029
+ if (process.platform === "win32") {
8030
+ const osRelease = os.release().split(".");
8031
+ if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) return Number(osRelease[2]) >= 14931 ? 3 : 2;
8032
+ return 1;
8033
+ }
8034
+ if ("CI" in env) {
8035
+ if ([
8036
+ "TRAVIS",
8037
+ "CIRCLECI",
8038
+ "APPVEYOR",
8039
+ "GITLAB_CI",
8040
+ "GITHUB_ACTIONS",
8041
+ "BUILDKITE"
8042
+ ].some((sign) => sign in env) || env.CI_NAME === "codeship") return 1;
8043
+ return min;
8044
+ }
8045
+ if ("TEAMCITY_VERSION" in env) return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
8046
+ if (env.COLORTERM === "truecolor") return 3;
8047
+ if ("TERM_PROGRAM" in env) {
8048
+ const version$1 = parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
8049
+ switch (env.TERM_PROGRAM) {
8050
+ case "iTerm.app": return version$1 >= 3 ? 3 : 2;
8051
+ case "Apple_Terminal": return 2;
8052
+ }
8053
+ }
8054
+ if (/-256(color)?$/i.test(env.TERM)) return 2;
8055
+ if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) return 1;
8056
+ if ("COLORTERM" in env) return 1;
8057
+ return min;
8058
+ }
8059
+ function getSupportLevel(stream$1) {
8060
+ const level = supportsColor(stream$1, stream$1 && stream$1.isTTY);
8061
+ return translateLevel(level);
8062
+ }
8063
+ module.exports = {
8064
+ supportsColor: getSupportLevel,
8065
+ stdout: translateLevel(supportsColor(true, tty$1.isatty(1))),
8066
+ stderr: translateLevel(supportsColor(true, tty$1.isatty(2)))
8067
+ };
8068
+ }) });
8069
+
8010
8070
  //#endregion
8011
8071
  //#region ../../node_modules/.pnpm/debug@4.4.1/node_modules/debug/src/node.js
8012
8072
  var require_node = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/debug@4.4.1/node_modules/debug/src/node.js": ((exports, module) => {
@@ -8037,8 +8097,8 @@ var require_node = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/debug@
8037
8097
  1
8038
8098
  ];
8039
8099
  try {
8040
- const supportsColor = __require("supports-color");
8041
- if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) exports.colors = [
8100
+ const supportsColor$1 = require_supports_color();
8101
+ if (supportsColor$1 && (supportsColor$1.stderr || supportsColor$1).level >= 2) exports.colors = [
8042
8102
  20,
8043
8103
  21,
8044
8104
  26,
@@ -19772,7 +19832,7 @@ const jixoProvider = async (specifier, options) => {
19772
19832
  if (specifier === "code_name") return options.codeName;
19773
19833
  if (specifier === "datetime") return (/* @__PURE__ */ new Date()).toLocaleString();
19774
19834
  if (specifier === "memory") {
19775
- const { localFileReplacement: localFileReplacement$1 } = await import("./file-replacer-CQZSjZXb.js");
19835
+ const { localFileReplacement: localFileReplacement$1 } = await import("./file-replacer-ajVzZOp7.js");
19776
19836
  const memoryOptions = {
19777
19837
  ...options,
19778
19838
  globOrFilepath: `.jixo/memory/${options.codeName}/*.md`,
@@ -19787,12 +19847,12 @@ const jixoProvider = async (specifier, options) => {
19787
19847
  let content = (await GET_JIXO_PROMPT())[specifier];
19788
19848
  if (/\.(json|ts)$/.test(specifier)) content = JSON.stringify(content, null, zod_default.int().optional().safeParse(options.params.spaces).data ?? 2);
19789
19849
  else {
19790
- const { _gen_content } = await import("./gen-prompt-IINGP6mf.js");
19850
+ const { _gen_content } = await import("./gen-prompt-DF1HOjXb.js");
19791
19851
  if (!content) throw new Error(`No found jixo specifier: ${specifier}`);
19792
19852
  content = await _gen_content(options.codeName, content, options.rootResolver);
19793
19853
  }
19794
19854
  if (content) {
19795
- const { useFileOrInject: useFileOrInject$1 } = await import("./file-replacer-CQZSjZXb.js");
19855
+ const { useFileOrInject: useFileOrInject$1 } = await import("./file-replacer-ajVzZOp7.js");
19796
19856
  return useFileOrInject$1(options.mode, `${specifier}.md`, content, options.params);
19797
19857
  }
19798
19858
  return `<!-- unknown jixo content ${specifier} -->`;
@@ -19937,5 +19997,5 @@ const localFileReplacement = async (options) => {
19937
19997
  };
19938
19998
 
19939
19999
  //#endregion
19940
- export { $ZodAny, $ZodArray, $ZodBoolean, $ZodCustom, $ZodLiteral, $ZodNumber, $ZodObject, $ZodOptional, $ZodString, $ZodType, $ZodUnion, $ZodUnknown, $constructor, N, __commonJS, __export, __require, __toESM, _any, _boolean, _custom, _enum, _number, _string, _unknown, array, assetsResolver, assignProp, boolean$1 as boolean, clone, createAcontext, createResolver, createResolverByRootFile, defaultParseSearch, defineLazy, delay, extend, func_catch, func_parallel_limit, func_remember, globFilesWithParams, globbySync, handleFileReplacement, isDynamicPattern, iter_map_not_null, literal, localFileReplacement, map_get_or_put, map_get_or_put_async, normalizeFilePath, normalizeParams, number$1 as number, obj_assign_props, obj_props, object, parse$1 as parse, parseAsync$1 as parseAsync, partial, reactiveFs, readJson, require_micromatch, require_src, safeParse$1 as safeParse, safeParseAsync$1 as safeParseAsync, string$1 as string, timmers, toJSONSchema, toPath, traversePathUp, union, useFileOrInject, z, zod_default };
19941
- //# sourceMappingURL=file-replacer-CZhq6MJJ.js.map
20000
+ export { $ZodAny, $ZodArray, $ZodBoolean, $ZodCustom, $ZodDiscriminatedUnion, $ZodLiteral, $ZodNumber, $ZodObject, $ZodOptional, $ZodString, $ZodType, $ZodUnion, $ZodUnknown, $constructor, N, __commonJS, __export, __require, __toESM, _any, _boolean, _custom, _enum, _number, _string, _unknown, array, assignProp, boolean$1 as boolean, clone, createAcontext, createResolver, createResolverByRootFile, defaultParseSearch, defineLazy, delay, extend, func_catch, func_parallel_limit, func_remember, globFilesWithParams, globbySync, handleFileReplacement, isDynamicPattern, iter_map_not_null, literal, localFileReplacement, map_get_or_put, map_get_or_put_async, normalizeFilePath, normalizeParams, number$1 as number, obj_assign_props, object, parse$1 as parse, parseAsync$1 as parseAsync, partial, reactiveFs, require_micromatch, require_src, safeParse$1 as safeParse, safeParseAsync$1 as safeParseAsync, string$1 as string, timmers, toJSONSchema, toPath, traversePathUp, union, useFileOrInject, z, zod_default };
20001
+ //# sourceMappingURL=file-replacer-C3H2FqOL.js.map