@coze-arch/cli 0.0.15-alpha.0f8aee → 0.0.15-alpha.511af9

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 (2) hide show
  1. package/lib/cli.js +273 -89
  2. package/package.json +1 -1
package/lib/cli.js CHANGED
@@ -1628,7 +1628,7 @@ function createNodeTransport() {
1628
1628
  };
1629
1629
  }
1630
1630
 
1631
- function _nullishCoalesce$9(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain$o(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }/**
1631
+ function _nullishCoalesce$9(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain$p(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }/**
1632
1632
  * Slardar CLI Reporter 主类
1633
1633
  * 封装 @slardar/base 的初始化和上报逻辑
1634
1634
  */
@@ -1700,7 +1700,7 @@ class SlardarCLIReporter {constructor() { SlardarCLIReporter.prototype.__init.ca
1700
1700
  this.client.on('send', (ev) => {
1701
1701
  log$6(
1702
1702
  'send hook called for event: %s',
1703
- (_optionalChain$o([ev, 'optionalAccess', _ => _.ev_type]) ) || 'unknown',
1703
+ (_optionalChain$p([ev, 'optionalAccess', _ => _.ev_type]) ) || 'unknown',
1704
1704
  );
1705
1705
  });
1706
1706
 
@@ -1758,7 +1758,7 @@ class SlardarCLIReporter {constructor() { SlardarCLIReporter.prototype.__init.ca
1758
1758
  )
1759
1759
  : undefined;
1760
1760
 
1761
- _optionalChain$o([this, 'access', _2 => _2.client, 'access', _3 => _3.sendEvent, 'optionalCall', _4 => _4({
1761
+ _optionalChain$p([this, 'access', _2 => _2.client, 'access', _3 => _3.sendEvent, 'optionalCall', _4 => _4({
1762
1762
  name,
1763
1763
  metrics: cleanMetrics ,
1764
1764
  categories: cleanCategories ,
@@ -1829,7 +1829,7 @@ class SlardarCLIReporter {constructor() { SlardarCLIReporter.prototype.__init.ca
1829
1829
  log$6('Reporting JS error:', {
1830
1830
  name: error.name,
1831
1831
  message: error.message.slice(0, 100),
1832
- stack: _optionalChain$o([error, 'access', _5 => _5.stack, 'optionalAccess', _6 => _6.slice, 'call', _7 => _7(0, 200)]),
1832
+ stack: _optionalChain$p([error, 'access', _5 => _5.stack, 'optionalAccess', _6 => _6.slice, 'call', _7 => _7(0, 200)]),
1833
1833
  extra,
1834
1834
  source,
1835
1835
  });
@@ -1849,7 +1849,7 @@ class SlardarCLIReporter {constructor() { SlardarCLIReporter.prototype.__init.ca
1849
1849
  if (!this.ensureInitialized()) {
1850
1850
  return;
1851
1851
  }
1852
- _optionalChain$o([this, 'access', _8 => _8.client, 'access', _9 => _9.context, 'optionalAccess', _10 => _10.set, 'call', _11 => _11(key, value)]);
1852
+ _optionalChain$p([this, 'access', _8 => _8.client, 'access', _9 => _9.context, 'optionalAccess', _10 => _10.set, 'call', _11 => _11(key, value)]);
1853
1853
  }
1854
1854
 
1855
1855
  /**
@@ -1860,7 +1860,7 @@ class SlardarCLIReporter {constructor() { SlardarCLIReporter.prototype.__init.ca
1860
1860
  return;
1861
1861
  }
1862
1862
  log$6('Merging context:', context);
1863
- _optionalChain$o([this, 'access', _12 => _12.client, 'access', _13 => _13.context, 'optionalAccess', _14 => _14.merge, 'call', _15 => _15(context)]);
1863
+ _optionalChain$p([this, 'access', _12 => _12.client, 'access', _13 => _13.context, 'optionalAccess', _14 => _14.merge, 'call', _15 => _15(context)]);
1864
1864
  }
1865
1865
 
1866
1866
  /**
@@ -1870,7 +1870,7 @@ class SlardarCLIReporter {constructor() { SlardarCLIReporter.prototype.__init.ca
1870
1870
  if (!this.ensureInitialized()) {
1871
1871
  return;
1872
1872
  }
1873
- _optionalChain$o([this, 'access', _16 => _16.client, 'access', _17 => _17.context, 'optionalAccess', _18 => _18.delete, 'call', _19 => _19(key)]);
1873
+ _optionalChain$p([this, 'access', _16 => _16.client, 'access', _17 => _17.context, 'optionalAccess', _18 => _18.delete, 'call', _19 => _19(key)]);
1874
1874
  }
1875
1875
 
1876
1876
  /**
@@ -1880,7 +1880,7 @@ class SlardarCLIReporter {constructor() { SlardarCLIReporter.prototype.__init.ca
1880
1880
  if (!this.ensureInitialized()) {
1881
1881
  return;
1882
1882
  }
1883
- _optionalChain$o([this, 'access', _20 => _20.client, 'access', _21 => _21.context, 'optionalAccess', _22 => _22.clear, 'call', _23 => _23()]);
1883
+ _optionalChain$p([this, 'access', _20 => _20.client, 'access', _21 => _21.context, 'optionalAccess', _22 => _22.clear, 'call', _23 => _23()]);
1884
1884
  }
1885
1885
 
1886
1886
  /**
@@ -1917,7 +1917,7 @@ class SlardarCLIReporter {constructor() { SlardarCLIReporter.prototype.__init.ca
1917
1917
  return;
1918
1918
  }
1919
1919
  log$6('Flushing Slardar data...');
1920
- _optionalChain$o([this, 'access', _24 => _24.client, 'access', _25 => _25.getSender, 'optionalCall', _26 => _26(), 'optionalAccess', _27 => _27.flush, 'call', _28 => _28()]);
1920
+ _optionalChain$p([this, 'access', _24 => _24.client, 'access', _25 => _25.getSender, 'optionalCall', _26 => _26(), 'optionalAccess', _27 => _27.flush, 'call', _28 => _28()]);
1921
1921
  log$6('Waiting %dms for events to be sent...', waitMs);
1922
1922
  await new Promise(resolve => setTimeout(resolve, waitMs));
1923
1923
  log$6('Slardar data flushed');
@@ -1936,7 +1936,7 @@ class SlardarCLIReporter {constructor() { SlardarCLIReporter.prototype.__init.ca
1936
1936
  */
1937
1937
  const reporter = new SlardarCLIReporter();
1938
1938
 
1939
- function _optionalChain$n(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
1939
+ function _optionalChain$o(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
1940
1940
 
1941
1941
 
1942
1942
 
@@ -1996,11 +1996,11 @@ const EventBuilder = {
1996
1996
  name: CLI_EVENTS.CLI_COMMAND,
1997
1997
  categories: {
1998
1998
  command,
1999
- args: _optionalChain$n([options, 'optionalAccess', _ => _.args]),
1999
+ args: _optionalChain$o([options, 'optionalAccess', _ => _.args]),
2000
2000
  status: 'running' ,
2001
- ..._optionalChain$n([options, 'optionalAccess', _2 => _2.categories]),
2001
+ ..._optionalChain$o([options, 'optionalAccess', _2 => _2.categories]),
2002
2002
  },
2003
- metrics: _optionalChain$n([options, 'optionalAccess', _3 => _3.metrics]),
2003
+ metrics: _optionalChain$o([options, 'optionalAccess', _3 => _3.metrics]),
2004
2004
  };
2005
2005
  },
2006
2006
 
@@ -2021,13 +2021,13 @@ const EventBuilder = {
2021
2021
  name: CLI_EVENTS.CLI_COMMAND_COMPLETE,
2022
2022
  categories: {
2023
2023
  command,
2024
- args: _optionalChain$n([options, 'optionalAccess', _4 => _4.args]),
2024
+ args: _optionalChain$o([options, 'optionalAccess', _4 => _4.args]),
2025
2025
  status: success ? ('success' ) : ('fail' ),
2026
- ..._optionalChain$n([options, 'optionalAccess', _5 => _5.categories]),
2026
+ ..._optionalChain$o([options, 'optionalAccess', _5 => _5.categories]),
2027
2027
  },
2028
2028
  metrics: {
2029
2029
  duration,
2030
- ...(_optionalChain$n([options, 'optionalAccess', _6 => _6.errorCode]) && { errorCode: options.errorCode }),
2030
+ ...(_optionalChain$o([options, 'optionalAccess', _6 => _6.errorCode]) && { errorCode: options.errorCode }),
2031
2031
  },
2032
2032
  };
2033
2033
  },
@@ -2048,12 +2048,12 @@ const EventBuilder = {
2048
2048
  name: CLI_EVENTS.NETWORK_REQUEST,
2049
2049
  categories: {
2050
2050
  url,
2051
- method: _optionalChain$n([options, 'optionalAccess', _7 => _7.method]) || 'GET',
2052
- statusCode: _optionalChain$n([options, 'optionalAccess', _8 => _8.statusCode, 'optionalAccess', _9 => _9.toString, 'call', _10 => _10()]),
2053
- status: _optionalChain$n([options, 'optionalAccess', _11 => _11.success]) ? ('success' ) : ('fail' ),
2051
+ method: _optionalChain$o([options, 'optionalAccess', _7 => _7.method]) || 'GET',
2052
+ statusCode: _optionalChain$o([options, 'optionalAccess', _8 => _8.statusCode, 'optionalAccess', _9 => _9.toString, 'call', _10 => _10()]),
2053
+ status: _optionalChain$o([options, 'optionalAccess', _11 => _11.success]) ? ('success' ) : ('fail' ),
2054
2054
  },
2055
2055
  metrics: {
2056
- duration: _optionalChain$n([options, 'optionalAccess', _12 => _12.duration]),
2056
+ duration: _optionalChain$o([options, 'optionalAccess', _12 => _12.duration]),
2057
2057
  },
2058
2058
  };
2059
2059
  },
@@ -2075,11 +2075,11 @@ const EventBuilder = {
2075
2075
  categories: {
2076
2076
  operation,
2077
2077
  filePath,
2078
- status: _optionalChain$n([options, 'optionalAccess', _13 => _13.success]) ? ('success' ) : ('fail' ),
2078
+ status: _optionalChain$o([options, 'optionalAccess', _13 => _13.success]) ? ('success' ) : ('fail' ),
2079
2079
  },
2080
2080
  metrics: {
2081
- duration: _optionalChain$n([options, 'optionalAccess', _14 => _14.duration]),
2082
- fileSize: _optionalChain$n([options, 'optionalAccess', _15 => _15.fileSize]),
2081
+ duration: _optionalChain$o([options, 'optionalAccess', _14 => _14.duration]),
2082
+ fileSize: _optionalChain$o([options, 'optionalAccess', _15 => _15.fileSize]),
2083
2083
  },
2084
2084
  };
2085
2085
  },
@@ -2107,7 +2107,7 @@ const EventBuilder = {
2107
2107
  };
2108
2108
 
2109
2109
  var name = "@coze-arch/cli";
2110
- var version = "0.0.15-alpha.0f8aee";
2110
+ var version = "0.0.15-alpha.511af9";
2111
2111
  var description = "coze coding devtools cli";
2112
2112
  var license = "MIT";
2113
2113
  var author = "fanwenjie.fe@bytedance.com";
@@ -2213,7 +2213,7 @@ var packageJson = {
2213
2213
  cozePublishConfig: cozePublishConfig
2214
2214
  };
2215
2215
 
2216
- function _optionalChain$m(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }/**
2216
+ function _optionalChain$n(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }/**
2217
2217
  * Slardar 监控初始化和上报
2218
2218
  */
2219
2219
 
@@ -2316,11 +2316,11 @@ const reportCommandComplete = safeRun(
2316
2316
  ,
2317
2317
  ) => {
2318
2318
  const event = EventBuilder.cliCommandComplete(command, success, duration, {
2319
- args: _optionalChain$m([options, 'optionalAccess', _ => _.args]),
2320
- errorCode: _optionalChain$m([options, 'optionalAccess', _2 => _2.errorCode]),
2319
+ args: _optionalChain$n([options, 'optionalAccess', _ => _.args]),
2320
+ errorCode: _optionalChain$n([options, 'optionalAccess', _2 => _2.errorCode]),
2321
2321
  categories: {
2322
- ...(_optionalChain$m([options, 'optionalAccess', _3 => _3.errorMessage]) && { errorMessage: options.errorMessage }),
2323
- ..._optionalChain$m([options, 'optionalAccess', _4 => _4.categories]),
2322
+ ...(_optionalChain$n([options, 'optionalAccess', _3 => _3.errorMessage]) && { errorMessage: options.errorMessage }),
2323
+ ..._optionalChain$n([options, 'optionalAccess', _4 => _4.categories]),
2324
2324
  },
2325
2325
  });
2326
2326
  reporter.sendEvent(event.name, event.metrics, event.categories);
@@ -2379,7 +2379,7 @@ const flushSlardar = safeRun('flushSlardar', async () => {
2379
2379
  await reporter.flush();
2380
2380
  });
2381
2381
 
2382
- function _nullishCoalesce$8(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain$l(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }var LogLevel; (function (LogLevel) {
2382
+ function _nullishCoalesce$8(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain$m(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }var LogLevel; (function (LogLevel) {
2383
2383
  const ERROR = 0; LogLevel[LogLevel["ERROR"] = ERROR] = "ERROR";
2384
2384
  const WARN = 1; LogLevel[LogLevel["WARN"] = WARN] = "WARN";
2385
2385
  const SUCCESS = 2; LogLevel[LogLevel["SUCCESS"] = SUCCESS] = "SUCCESS";
@@ -2426,7 +2426,7 @@ class Logger {
2426
2426
  return level;
2427
2427
  }
2428
2428
 
2429
- const envLevel = _optionalChain$l([process, 'access', _ => _.env, 'access', _2 => _2.LOG_LEVEL, 'optionalAccess', _3 => _3.toLowerCase, 'call', _4 => _4()]);
2429
+ const envLevel = _optionalChain$m([process, 'access', _ => _.env, 'access', _2 => _2.LOG_LEVEL, 'optionalAccess', _3 => _3.toLowerCase, 'call', _4 => _4()]);
2430
2430
  if (envLevel && envLevel in LOG_LEVEL_MAP) {
2431
2431
  return LOG_LEVEL_MAP[envLevel];
2432
2432
  }
@@ -2438,7 +2438,7 @@ class Logger {
2438
2438
  // 简单检测:Node.js 环境且支持 TTY
2439
2439
  return (
2440
2440
  typeof process !== 'undefined' &&
2441
- _optionalChain$l([process, 'access', _5 => _5.stdout, 'optionalAccess', _6 => _6.isTTY]) === true &&
2441
+ _optionalChain$m([process, 'access', _5 => _5.stdout, 'optionalAccess', _6 => _6.isTTY]) === true &&
2442
2442
  process.env.NO_COLOR === undefined
2443
2443
  );
2444
2444
  }
@@ -3277,7 +3277,7 @@ const registerCommand$5 = program => {
3277
3277
  });
3278
3278
  };
3279
3279
 
3280
- function _optionalChain$k(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }/* eslint-disable @typescript-eslint/no-explicit-any */
3280
+ function _optionalChain$l(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }/* eslint-disable @typescript-eslint/no-explicit-any */
3281
3281
  // Safe JSON parsing utilities with type safety and error handling
3282
3282
  // Provides fallback values, validation, and error monitoring capabilities
3283
3283
 
@@ -3377,12 +3377,12 @@ function safeJsonParse(
3377
3377
  const parsed = JSON.parse(String(input));
3378
3378
 
3379
3379
  // Optional validation
3380
- if (_optionalChain$k([options, 'optionalAccess', _ => _.validate])) {
3380
+ if (_optionalChain$l([options, 'optionalAccess', _ => _.validate])) {
3381
3381
  if (options.validate(parsed)) {
3382
3382
  return parsed;
3383
3383
  } else {
3384
3384
  const validationError = new Error('JSON validation failed');
3385
- _optionalChain$k([options, 'access', _2 => _2.onError, 'optionalCall', _3 => _3(validationError, input)]);
3385
+ _optionalChain$l([options, 'access', _2 => _2.onError, 'optionalCall', _3 => _3(validationError, input)]);
3386
3386
 
3387
3387
  if (options.throwOnValidationError) {
3388
3388
  throw validationError;
@@ -3394,10 +3394,10 @@ function safeJsonParse(
3394
3394
  return parsed;
3395
3395
  } catch (error) {
3396
3396
  // Re-throw validation errors when throwOnValidationError is true
3397
- if (error instanceof Error && error.message === 'JSON validation failed' && _optionalChain$k([options, 'optionalAccess', _4 => _4.throwOnValidationError])) {
3397
+ if (error instanceof Error && error.message === 'JSON validation failed' && _optionalChain$l([options, 'optionalAccess', _4 => _4.throwOnValidationError])) {
3398
3398
  throw error;
3399
3399
  }
3400
- _optionalChain$k([options, 'optionalAccess', _5 => _5.onError, 'optionalCall', _6 => _6(error , input)]);
3400
+ _optionalChain$l([options, 'optionalAccess', _5 => _5.onError, 'optionalCall', _6 => _6(error , input)]);
3401
3401
  return defaultValue;
3402
3402
  }
3403
3403
  }
@@ -3437,7 +3437,7 @@ function isNode(node) {
3437
3437
  }
3438
3438
  const hasAnchor = (node) => (isScalar(node) || isCollection(node)) && !!node.anchor;
3439
3439
 
3440
- function _optionalChain$j(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
3440
+ function _optionalChain$k(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
3441
3441
  const BREAK = Symbol('break visit');
3442
3442
  const SKIP = Symbol('skip children');
3443
3443
  const REMOVE = Symbol('remove node');
@@ -3550,15 +3550,15 @@ function callVisitor(key, node, visitor, path) {
3550
3550
  if (typeof visitor === 'function')
3551
3551
  return visitor(key, node, path);
3552
3552
  if (isMap(node))
3553
- return _optionalChain$j([visitor, 'access', _ => _.Map, 'optionalCall', _2 => _2(key, node, path)]);
3553
+ return _optionalChain$k([visitor, 'access', _ => _.Map, 'optionalCall', _2 => _2(key, node, path)]);
3554
3554
  if (isSeq(node))
3555
- return _optionalChain$j([visitor, 'access', _3 => _3.Seq, 'optionalCall', _4 => _4(key, node, path)]);
3555
+ return _optionalChain$k([visitor, 'access', _3 => _3.Seq, 'optionalCall', _4 => _4(key, node, path)]);
3556
3556
  if (isPair(node))
3557
- return _optionalChain$j([visitor, 'access', _5 => _5.Pair, 'optionalCall', _6 => _6(key, node, path)]);
3557
+ return _optionalChain$k([visitor, 'access', _5 => _5.Pair, 'optionalCall', _6 => _6(key, node, path)]);
3558
3558
  if (isScalar(node))
3559
- return _optionalChain$j([visitor, 'access', _7 => _7.Scalar, 'optionalCall', _8 => _8(key, node, path)]);
3559
+ return _optionalChain$k([visitor, 'access', _7 => _7.Scalar, 'optionalCall', _8 => _8(key, node, path)]);
3560
3560
  if (isAlias(node))
3561
- return _optionalChain$j([visitor, 'access', _9 => _9.Alias, 'optionalCall', _10 => _10(key, node, path)]);
3561
+ return _optionalChain$k([visitor, 'access', _9 => _9.Alias, 'optionalCall', _10 => _10(key, node, path)]);
3562
3562
  return undefined;
3563
3563
  }
3564
3564
  function replaceNode(key, path, node) {
@@ -3649,7 +3649,7 @@ function applyReviver(reviver, obj, key, val) {
3649
3649
  return reviver.call(obj, key, val);
3650
3650
  }
3651
3651
 
3652
- function _optionalChain$i(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
3652
+ function _optionalChain$j(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
3653
3653
  /**
3654
3654
  * Recursively convert any node or its contents to native JavaScript
3655
3655
  *
@@ -3679,7 +3679,7 @@ function toJS(value, arg, ctx) {
3679
3679
  ctx.onCreate(res);
3680
3680
  return res;
3681
3681
  }
3682
- if (typeof value === 'bigint' && !_optionalChain$i([ctx, 'optionalAccess', _ => _.keep]))
3682
+ if (typeof value === 'bigint' && !_optionalChain$j([ctx, 'optionalAccess', _ => _.keep]))
3683
3683
  return Number(value);
3684
3684
  return value;
3685
3685
  }
@@ -3717,7 +3717,7 @@ class NodeBase {
3717
3717
  }
3718
3718
  }
3719
3719
 
3720
- function _optionalChain$h(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
3720
+ function _optionalChain$i(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
3721
3721
  class Alias extends NodeBase {
3722
3722
  constructor(source) {
3723
3723
  super(ALIAS);
@@ -3734,7 +3734,7 @@ class Alias extends NodeBase {
3734
3734
  */
3735
3735
  resolve(doc, ctx) {
3736
3736
  let nodes;
3737
- if (_optionalChain$h([ctx, 'optionalAccess', _ => _.aliasResolveCache])) {
3737
+ if (_optionalChain$i([ctx, 'optionalAccess', _ => _.aliasResolveCache])) {
3738
3738
  nodes = ctx.aliasResolveCache;
3739
3739
  }
3740
3740
  else {
@@ -3773,7 +3773,7 @@ class Alias extends NodeBase {
3773
3773
  data = anchors.get(source);
3774
3774
  }
3775
3775
  /* istanbul ignore if */
3776
- if (_optionalChain$h([data, 'optionalAccess', _2 => _2.res]) === undefined) {
3776
+ if (_optionalChain$i([data, 'optionalAccess', _2 => _2.res]) === undefined) {
3777
3777
  const msg = 'This should not happen: Alias anchor was not resolved?';
3778
3778
  throw new ReferenceError(msg);
3779
3779
  }
@@ -3825,7 +3825,7 @@ function getAliasCount(doc, node, anchors) {
3825
3825
  return 1;
3826
3826
  }
3827
3827
 
3828
- function _optionalChain$g(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
3828
+ function _optionalChain$h(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
3829
3829
  const isScalarValue = (value) => !value || (typeof value !== 'function' && typeof value !== 'object');
3830
3830
  class Scalar extends NodeBase {
3831
3831
  constructor(value) {
@@ -3833,7 +3833,7 @@ class Scalar extends NodeBase {
3833
3833
  this.value = value;
3834
3834
  }
3835
3835
  toJSON(arg, ctx) {
3836
- return _optionalChain$g([ctx, 'optionalAccess', _ => _.keep]) ? this.value : toJS(this.value, arg, ctx);
3836
+ return _optionalChain$h([ctx, 'optionalAccess', _ => _.keep]) ? this.value : toJS(this.value, arg, ctx);
3837
3837
  }
3838
3838
  toString() {
3839
3839
  return String(this.value);
@@ -3845,7 +3845,7 @@ Scalar.PLAIN = 'PLAIN';
3845
3845
  Scalar.QUOTE_DOUBLE = 'QUOTE_DOUBLE';
3846
3846
  Scalar.QUOTE_SINGLE = 'QUOTE_SINGLE';
3847
3847
 
3848
- function _nullishCoalesce$7(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain$f(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
3848
+ function _nullishCoalesce$7(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain$g(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
3849
3849
  const defaultTagPrefix = 'tag:yaml.org,2002:';
3850
3850
  function findTagObject(value, tagName, tags) {
3851
3851
  if (tagName) {
@@ -3855,7 +3855,7 @@ function findTagObject(value, tagName, tags) {
3855
3855
  throw new Error(`Tag ${tagName} not found`);
3856
3856
  return tagObj;
3857
3857
  }
3858
- return tags.find(t => _optionalChain$f([t, 'access', _ => _.identify, 'optionalCall', _2 => _2(value)]) && !t.format);
3858
+ return tags.find(t => _optionalChain$g([t, 'access', _ => _.identify, 'optionalCall', _2 => _2(value)]) && !t.format);
3859
3859
  }
3860
3860
  function createNode(value, tagName, ctx) {
3861
3861
  if (isDocument(value))
@@ -3863,7 +3863,7 @@ function createNode(value, tagName, ctx) {
3863
3863
  if (isNode(value))
3864
3864
  return value;
3865
3865
  if (isPair(value)) {
3866
- const map = _optionalChain$f([ctx, 'access', _3 => _3.schema, 'access', _4 => _4[MAP], 'access', _5 => _5.createNode, 'optionalCall', _6 => _6(ctx.schema, null, ctx)]);
3866
+ const map = _optionalChain$g([ctx, 'access', _3 => _3.schema, 'access', _4 => _4[MAP], 'access', _5 => _5.createNode, 'optionalCall', _6 => _6(ctx.schema, null, ctx)]);
3867
3867
  map.items.push(value);
3868
3868
  return map;
3869
3869
  }
@@ -3890,7 +3890,7 @@ function createNode(value, tagName, ctx) {
3890
3890
  sourceObjects.set(value, ref);
3891
3891
  }
3892
3892
  }
3893
- if (_optionalChain$f([tagName, 'optionalAccess', _7 => _7.startsWith, 'call', _8 => _8('!!')]))
3893
+ if (_optionalChain$g([tagName, 'optionalAccess', _7 => _7.startsWith, 'call', _8 => _8('!!')]))
3894
3894
  tagName = defaultTagPrefix + tagName.slice(2);
3895
3895
  let tagObj = findTagObject(value, tagName, schema.tags);
3896
3896
  if (!tagObj) {
@@ -3915,9 +3915,9 @@ function createNode(value, tagName, ctx) {
3915
3915
  onTagObj(tagObj);
3916
3916
  delete ctx.onTagObj;
3917
3917
  }
3918
- const node = _optionalChain$f([tagObj, 'optionalAccess', _9 => _9.createNode])
3918
+ const node = _optionalChain$g([tagObj, 'optionalAccess', _9 => _9.createNode])
3919
3919
  ? tagObj.createNode(ctx.schema, value, ctx)
3920
- : typeof _optionalChain$f([tagObj, 'optionalAccess', _10 => _10.nodeClass, 'optionalAccess', _11 => _11.from]) === 'function'
3920
+ : typeof _optionalChain$g([tagObj, 'optionalAccess', _10 => _10.nodeClass, 'optionalAccess', _11 => _11.from]) === 'function'
3921
3921
  ? tagObj.nodeClass.from(ctx.schema, value, ctx)
3922
3922
  : new Scalar(value);
3923
3923
  if (tagName)
@@ -4235,7 +4235,7 @@ function consumeMoreIndentedLines(text, i, indent) {
4235
4235
  return end;
4236
4236
  }
4237
4237
 
4238
- function _optionalChain$e(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
4238
+ function _optionalChain$f(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
4239
4239
  const getFoldOptions = (ctx, isBlock) => ({
4240
4240
  indentAtStart: isBlock ? ctx.indent.length : ctx.indentAtStart,
4241
4241
  lineWidth: ctx.options.lineWidth,
@@ -4520,9 +4520,9 @@ function plainString(item, ctx, onComment, onChompKeep) {
4520
4520
  // booleans get parsed with those types in v1.2 (e.g. '42', 'true' & '0.9e-3'),
4521
4521
  // and others in v1.1.
4522
4522
  if (actualString) {
4523
- const test = (tag) => tag.default && tag.tag !== 'tag:yaml.org,2002:str' && _optionalChain$e([tag, 'access', _ => _.test, 'optionalAccess', _2 => _2.test, 'call', _3 => _3(str)]);
4523
+ const test = (tag) => tag.default && tag.tag !== 'tag:yaml.org,2002:str' && _optionalChain$f([tag, 'access', _ => _.test, 'optionalAccess', _2 => _2.test, 'call', _3 => _3(str)]);
4524
4524
  const { compat, tags } = ctx.doc.schema;
4525
- if (tags.some(test) || _optionalChain$e([compat, 'optionalAccess', _4 => _4.some, 'call', _5 => _5(test)]))
4525
+ if (tags.some(test) || _optionalChain$f([compat, 'optionalAccess', _4 => _4.some, 'call', _5 => _5(test)]))
4526
4526
  return quotedString(value, ctx);
4527
4527
  }
4528
4528
  return implicitKey
@@ -4568,7 +4568,7 @@ function stringifyString(item, ctx, onComment, onChompKeep) {
4568
4568
  return res;
4569
4569
  }
4570
4570
 
4571
- function _nullishCoalesce$6(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain$d(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
4571
+ function _nullishCoalesce$6(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain$e(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
4572
4572
  function createStringifyContext(doc, options) {
4573
4573
  const opt = Object.assign({
4574
4574
  blockQuote: true,
@@ -4621,7 +4621,7 @@ function getTagObject(tags, item) {
4621
4621
  let obj;
4622
4622
  if (isScalar(item)) {
4623
4623
  obj = item.value;
4624
- let match = tags.filter(t => _optionalChain$d([t, 'access', _ => _.identify, 'optionalCall', _2 => _2(obj)]));
4624
+ let match = tags.filter(t => _optionalChain$e([t, 'access', _ => _.identify, 'optionalCall', _2 => _2(obj)]));
4625
4625
  if (match.length > 1) {
4626
4626
  const testMatch = match.filter(t => t.test);
4627
4627
  if (testMatch.length > 0)
@@ -4635,7 +4635,7 @@ function getTagObject(tags, item) {
4635
4635
  tagObj = tags.find(t => t.nodeClass && obj instanceof t.nodeClass);
4636
4636
  }
4637
4637
  if (!tagObj) {
4638
- const name = _nullishCoalesce$6(_optionalChain$d([obj, 'optionalAccess', _3 => _3.constructor, 'optionalAccess', _4 => _4.name]), () => ( (obj === null ? 'null' : typeof obj)));
4638
+ const name = _nullishCoalesce$6(_optionalChain$e([obj, 'optionalAccess', _3 => _3.constructor, 'optionalAccess', _4 => _4.name]), () => ( (obj === null ? 'null' : typeof obj)));
4639
4639
  throw new Error(`Tag not resolved for ${name} value`);
4640
4640
  }
4641
4641
  return tagObj;
@@ -4661,7 +4661,7 @@ function stringify(item, ctx, onComment, onChompKeep) {
4661
4661
  if (isAlias(item)) {
4662
4662
  if (ctx.doc.directives)
4663
4663
  return item.toString(ctx);
4664
- if (_optionalChain$d([ctx, 'access', _5 => _5.resolvedAliases, 'optionalAccess', _6 => _6.has, 'call', _7 => _7(item)])) {
4664
+ if (_optionalChain$e([ctx, 'access', _5 => _5.resolvedAliases, 'optionalAccess', _6 => _6.has, 'call', _7 => _7(item)])) {
4665
4665
  throw new TypeError(`Cannot stringify circular structure without alias nodes`);
4666
4666
  }
4667
4667
  else {
@@ -4843,7 +4843,7 @@ function warn(logLevel, warning) {
4843
4843
  }
4844
4844
  }
4845
4845
 
4846
- function _optionalChain$c(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
4846
+ function _optionalChain$d(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
4847
4847
  // If the value associated with a merge key is a single mapping node, each of
4848
4848
  // its key/value pairs is inserted into the current mapping, unless the key
4849
4849
  // already exists in it. If the value associated with the merge key is a
@@ -4867,7 +4867,7 @@ const isMergeKey = (ctx, key) => (merge.identify(key) ||
4867
4867
  (isScalar(key) &&
4868
4868
  (!key.type || key.type === Scalar.PLAIN) &&
4869
4869
  merge.identify(key.value))) &&
4870
- _optionalChain$c([ctx, 'optionalAccess', _ => _.doc, 'access', _2 => _2.schema, 'access', _3 => _3.tags, 'access', _4 => _4.some, 'call', _5 => _5(tag => tag.tag === merge.tag && tag.default)]);
4870
+ _optionalChain$d([ctx, 'optionalAccess', _ => _.doc, 'access', _2 => _2.schema, 'access', _3 => _3.tags, 'access', _4 => _4.some, 'call', _5 => _5(tag => tag.tag === merge.tag && tag.default)]);
4871
4871
  function addMergeToJSMap(ctx, map, value) {
4872
4872
  value = ctx && isAlias(value) ? value.resolve(ctx.doc) : value;
4873
4873
  if (isSeq(value))
@@ -4904,7 +4904,7 @@ function mergeValue(ctx, map, value) {
4904
4904
  return map;
4905
4905
  }
4906
4906
 
4907
- function _optionalChain$b(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
4907
+ function _optionalChain$c(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
4908
4908
  function addPairToJSMap(ctx, map, { key, value }) {
4909
4909
  if (isNode(key) && key.addToJSMap)
4910
4910
  key.addToJSMap(ctx, map, value);
@@ -4941,7 +4941,7 @@ function stringifyKey(key, jsKey, ctx) {
4941
4941
  // eslint-disable-next-line @typescript-eslint/no-base-to-string
4942
4942
  if (typeof jsKey !== 'object')
4943
4943
  return String(jsKey);
4944
- if (isNode(key) && _optionalChain$b([ctx, 'optionalAccess', _ => _.doc])) {
4944
+ if (isNode(key) && _optionalChain$c([ctx, 'optionalAccess', _ => _.doc])) {
4945
4945
  const strCtx = createStringifyContext(ctx.doc, {});
4946
4946
  strCtx.anchors = new Set();
4947
4947
  for (const node of ctx.anchors.keys())
@@ -4961,7 +4961,7 @@ function stringifyKey(key, jsKey, ctx) {
4961
4961
  return JSON.stringify(jsKey);
4962
4962
  }
4963
4963
 
4964
- function _optionalChain$a(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
4964
+ function _optionalChain$b(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
4965
4965
  function createPair(key, value, ctx) {
4966
4966
  const k = createNode(key, undefined, ctx);
4967
4967
  const v = createNode(value, undefined, ctx);
@@ -4982,17 +4982,17 @@ class Pair {
4982
4982
  return new Pair(key, value);
4983
4983
  }
4984
4984
  toJSON(_, ctx) {
4985
- const pair = _optionalChain$a([ctx, 'optionalAccess', _2 => _2.mapAsMap]) ? new Map() : {};
4985
+ const pair = _optionalChain$b([ctx, 'optionalAccess', _2 => _2.mapAsMap]) ? new Map() : {};
4986
4986
  return addPairToJSMap(ctx, pair, this);
4987
4987
  }
4988
4988
  toString(ctx, onComment, onChompKeep) {
4989
- return _optionalChain$a([ctx, 'optionalAccess', _3 => _3.doc])
4989
+ return _optionalChain$b([ctx, 'optionalAccess', _3 => _3.doc])
4990
4990
  ? stringifyPair(this, ctx, onComment, onChompKeep)
4991
4991
  : JSON.stringify(this);
4992
4992
  }
4993
4993
  }
4994
4994
 
4995
- function _nullishCoalesce$4(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain$9(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
4995
+ function _nullishCoalesce$4(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain$a(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
4996
4996
  function stringifyCollection(collection, ctx, options) {
4997
4997
  const flow = _nullishCoalesce$4(ctx.inFlow, () => ( collection.flow));
4998
4998
  const stringify = flow ? stringifyFlowCollection : stringifyBlockCollection;
@@ -5086,7 +5086,7 @@ function stringifyFlowCollection({ items }, ctx, { flowChars, itemIndent }) {
5086
5086
  if (iv.commentBefore)
5087
5087
  reqNewline = true;
5088
5088
  }
5089
- else if (item.value == null && _optionalChain$9([ik, 'optionalAccess', _ => _.comment])) {
5089
+ else if (item.value == null && _optionalChain$a([ik, 'optionalAccess', _ => _.comment])) {
5090
5090
  comment = ik.comment;
5091
5091
  }
5092
5092
  }
@@ -5141,7 +5141,7 @@ function addCommentBefore({ indent, options: { commentString } }, lines, comment
5141
5141
  }
5142
5142
  }
5143
5143
 
5144
- function _nullishCoalesce$3(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain$8(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
5144
+ function _nullishCoalesce$3(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain$9(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
5145
5145
  function findPair(items, key) {
5146
5146
  const k = isScalar(key) ? key.value : key;
5147
5147
  for (const it of items) {
@@ -5202,12 +5202,12 @@ class YAMLMap extends Collection {
5202
5202
  _pair = pair;
5203
5203
  else if (!pair || typeof pair !== 'object' || !('key' in pair)) {
5204
5204
  // In TypeScript, this never happens.
5205
- _pair = new Pair(pair, _optionalChain$8([pair, 'optionalAccess', _2 => _2.value]));
5205
+ _pair = new Pair(pair, _optionalChain$9([pair, 'optionalAccess', _2 => _2.value]));
5206
5206
  }
5207
5207
  else
5208
5208
  _pair = new Pair(pair.key, pair.value);
5209
5209
  const prev = findPair(this.items, _pair.key);
5210
- const sortEntries = _optionalChain$8([this, 'access', _3 => _3.schema, 'optionalAccess', _4 => _4.sortMapEntries]);
5210
+ const sortEntries = _optionalChain$9([this, 'access', _3 => _3.schema, 'optionalAccess', _4 => _4.sortMapEntries]);
5211
5211
  if (prev) {
5212
5212
  if (!overwrite)
5213
5213
  throw new Error(`Key ${_pair.key} already set`);
@@ -5237,7 +5237,7 @@ class YAMLMap extends Collection {
5237
5237
  }
5238
5238
  get(key, keepScalar) {
5239
5239
  const it = findPair(this.items, key);
5240
- const node = _optionalChain$8([it, 'optionalAccess', _5 => _5.value]);
5240
+ const node = _optionalChain$9([it, 'optionalAccess', _5 => _5.value]);
5241
5241
  return _nullishCoalesce$3((!keepScalar && isScalar(node) ? node.value : node), () => ( undefined));
5242
5242
  }
5243
5243
  has(key) {
@@ -5252,8 +5252,8 @@ class YAMLMap extends Collection {
5252
5252
  * @returns Instance of Type, Map, or Object
5253
5253
  */
5254
5254
  toJSON(_, ctx, Type) {
5255
- const map = Type ? new Type() : _optionalChain$8([ctx, 'optionalAccess', _6 => _6.mapAsMap]) ? new Map() : {};
5256
- if (_optionalChain$8([ctx, 'optionalAccess', _7 => _7.onCreate]))
5255
+ const map = Type ? new Type() : _optionalChain$9([ctx, 'optionalAccess', _6 => _6.mapAsMap]) ? new Map() : {};
5256
+ if (_optionalChain$9([ctx, 'optionalAccess', _7 => _7.onCreate]))
5257
5257
  ctx.onCreate(map);
5258
5258
  for (const item of this.items)
5259
5259
  addPairToJSMap(ctx, map, item);
@@ -5278,7 +5278,7 @@ class YAMLMap extends Collection {
5278
5278
  }
5279
5279
  }
5280
5280
 
5281
- function _optionalChain$7(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
5281
+ function _optionalChain$8(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
5282
5282
  class YAMLSeq extends Collection {
5283
5283
  static get tagName() {
5284
5284
  return 'tag:yaml.org,2002:seq';
@@ -5341,7 +5341,7 @@ class YAMLSeq extends Collection {
5341
5341
  }
5342
5342
  toJSON(_, ctx) {
5343
5343
  const seq = [];
5344
- if (_optionalChain$7([ctx, 'optionalAccess', _2 => _2.onCreate]))
5344
+ if (_optionalChain$8([ctx, 'optionalAccess', _2 => _2.onCreate]))
5345
5345
  ctx.onCreate(seq);
5346
5346
  let i = 0;
5347
5347
  for (const item of this.items)
@@ -5420,7 +5420,7 @@ function createPairs(schema, iterable, ctx) {
5420
5420
  return pairs;
5421
5421
  }
5422
5422
 
5423
- function _optionalChain$6(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
5423
+ function _optionalChain$7(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
5424
5424
  class YAMLOMap extends YAMLSeq {
5425
5425
  constructor() {
5426
5426
  super();
@@ -5439,7 +5439,7 @@ class YAMLOMap extends YAMLSeq {
5439
5439
  if (!ctx)
5440
5440
  return super.toJSON(_);
5441
5441
  const map = new Map();
5442
- if (_optionalChain$6([ctx, 'optionalAccess', _2 => _2.onCreate]))
5442
+ if (_optionalChain$7([ctx, 'optionalAccess', _2 => _2.onCreate]))
5443
5443
  ctx.onCreate(map);
5444
5444
  for (const pair of this.items) {
5445
5445
  let key, value;
@@ -5557,7 +5557,7 @@ const isDirExists = async (file) => {
5557
5557
  }
5558
5558
  };
5559
5559
 
5560
- function _optionalChain$5(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }// ABOUTME: Project type detection utility
5560
+ function _optionalChain$6(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }// ABOUTME: Project type detection utility
5561
5561
 
5562
5562
  /**
5563
5563
  * 支持的项目类型枚举
@@ -5659,7 +5659,7 @@ const collectProjectInfo = async (
5659
5659
  }
5660
5660
 
5661
5661
  const scripts = Object.entries(
5662
- (_optionalChain$5([packageJson, 'optionalAccess', _ => _.scripts]) ) || {},
5662
+ (_optionalChain$6([packageJson, 'optionalAccess', _ => _.scripts]) ) || {},
5663
5663
  ).reduce((acc, [name, script]) => {
5664
5664
  if (typeof script === 'string') {
5665
5665
  acc[name] = script;
@@ -5813,7 +5813,7 @@ const detectProjectType = async (
5813
5813
  };
5814
5814
  };
5815
5815
 
5816
- function _optionalChain$4(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
5816
+ function _optionalChain$5(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
5817
5817
 
5818
5818
 
5819
5819
  /**
@@ -5987,16 +5987,16 @@ const getCommandConfig = (
5987
5987
 
5988
5988
  switch (commandName) {
5989
5989
  case 'dev':
5990
- commandConfig = _optionalChain$4([config, 'access', _ => _.dev, 'optionalAccess', _2 => _2.run]);
5990
+ commandConfig = _optionalChain$5([config, 'access', _ => _.dev, 'optionalAccess', _2 => _2.run]);
5991
5991
  break;
5992
5992
  case 'build':
5993
- commandConfig = _optionalChain$4([config, 'access', _3 => _3.deploy, 'optionalAccess', _4 => _4.build]);
5993
+ commandConfig = _optionalChain$5([config, 'access', _3 => _3.deploy, 'optionalAccess', _4 => _4.build]);
5994
5994
  break;
5995
5995
  case 'start':
5996
- commandConfig = _optionalChain$4([config, 'access', _5 => _5.deploy, 'optionalAccess', _6 => _6.run]);
5996
+ commandConfig = _optionalChain$5([config, 'access', _5 => _5.deploy, 'optionalAccess', _6 => _6.run]);
5997
5997
  break;
5998
5998
  case 'validate':
5999
- commandConfig = _optionalChain$4([config, 'access', _7 => _7.dev, 'optionalAccess', _8 => _8.validate]);
5999
+ commandConfig = _optionalChain$5([config, 'access', _7 => _7.dev, 'optionalAccess', _8 => _8.validate]);
6000
6000
  break;
6001
6001
  default:
6002
6002
  throw new Error(`Unknown command: ${commandName}`);
@@ -6147,6 +6147,189 @@ const byFlag = (flag) => {
6147
6147
  return predicate;
6148
6148
  };
6149
6149
 
6150
+ function _optionalChain$4(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
6151
+ const PATCH_ID$3 = 'vite/add-validate@0.0.14';
6152
+ const COZE_FILE = '.coze';
6153
+ const VALIDATE_SCRIPT_FILE = 'scripts/validate.sh';
6154
+ const PACKAGE_JSON_FILE$1 = 'package.json';
6155
+
6156
+ const VALIDATE_LINE = 'validate = ["bash", "./scripts/validate.sh"]';
6157
+
6158
+ const REQUIRED_SCRIPTS = {
6159
+ 'ts-check': 'tsc -p tsconfig.json',
6160
+ 'lint:build': 'eslint . --quiet',
6161
+ validate: "pnpm run --parallel '/^(ts-check|lint:build)$/'",
6162
+ };
6163
+
6164
+
6165
+
6166
+
6167
+
6168
+ const getTemplateValidateScriptPath = () =>
6169
+ path.join(getTemplatesDir(), 'vite', 'scripts', 'validate.sh');
6170
+
6171
+ const getProjectValidateScriptPath = (projectFolder) =>
6172
+ path.join(projectFolder, VALIDATE_SCRIPT_FILE);
6173
+
6174
+ const readTemplateValidateScriptContent = async () =>
6175
+ fs$1.readFile(getTemplateValidateScriptPath(), 'utf-8');
6176
+
6177
+ const hasValidateInCoze = (context) =>
6178
+ _optionalChain$4([context, 'access', _ => _.cozeConfig, 'optionalAccess', _2 => _2.dev, 'optionalAccess', _3 => _3.validate]) !== undefined;
6179
+
6180
+ const getMissingScripts = (
6181
+ scripts,
6182
+ ) => {
6183
+ const missing = {};
6184
+ for (const [key, value] of Object.entries(REQUIRED_SCRIPTS)) {
6185
+ if (!scripts || scripts[key] === undefined) {
6186
+ missing[key] = value;
6187
+ }
6188
+ }
6189
+ return missing;
6190
+ };
6191
+
6192
+ const addValidateToCoze = async (projectFolder) => {
6193
+ const cozePath = path.join(projectFolder, COZE_FILE);
6194
+ const content = await fs$1.readFile(cozePath, 'utf-8');
6195
+
6196
+ const runLinePattern = /^(run\s*=\s*\[.*\])\s*$/m;
6197
+ const match = content.match(runLinePattern);
6198
+ if (!match) {
6199
+ return false;
6200
+ }
6201
+
6202
+ const runLine = match[1];
6203
+ const nextContent = content.replace(
6204
+ runLinePattern,
6205
+ `${runLine}\n${VALIDATE_LINE}`,
6206
+ );
6207
+
6208
+ await fs$1.writeFile(cozePath, nextContent, 'utf-8');
6209
+ return true;
6210
+ };
6211
+
6212
+ const createValidateScript = async (
6213
+ projectFolder,
6214
+ ) => {
6215
+ const targetPath = getProjectValidateScriptPath(projectFolder);
6216
+ if (await isFileExists(targetPath)) {
6217
+ return false;
6218
+ }
6219
+
6220
+ const scriptsDir = path.join(projectFolder, 'scripts');
6221
+ if (!(await isFileExists(scriptsDir))) {
6222
+ await fs$1.mkdir(scriptsDir, { recursive: true });
6223
+ }
6224
+
6225
+ const templateContent = await readTemplateValidateScriptContent();
6226
+ await fs$1.writeFile(targetPath, templateContent, 'utf-8');
6227
+ return true;
6228
+ };
6229
+
6230
+ const addMissingScriptsToPackageJson = async (
6231
+ projectFolder,
6232
+ ) => {
6233
+ const packageJsonPath = path.join(projectFolder, PACKAGE_JSON_FILE$1);
6234
+ if (!(await isFileExists(packageJsonPath))) {
6235
+ return false;
6236
+ }
6237
+
6238
+ const content = await fs$1.readFile(packageJsonPath, 'utf-8');
6239
+ const packageJson = safeJsonParse(content, null);
6240
+ if (!packageJson) {
6241
+ return false;
6242
+ }
6243
+
6244
+ const missingScripts = getMissingScripts(packageJson.scripts);
6245
+ if (Object.keys(missingScripts).length === 0) {
6246
+ return false;
6247
+ }
6248
+
6249
+ packageJson.scripts = { ...packageJson.scripts, ...missingScripts };
6250
+ await fs$1.writeFile(
6251
+ packageJsonPath,
6252
+ JSON.stringify(packageJson, null, 2),
6253
+ 'utf-8',
6254
+ );
6255
+ return true;
6256
+ };
6257
+
6258
+ const patchViteAddValidate = {
6259
+ id: PATCH_ID$3,
6260
+ template: 'vite',
6261
+ disabled: byFlag('coding.arch.patch_vite_validate'),
6262
+ operations: [
6263
+ {
6264
+ kind: 'file-patch',
6265
+ file: COZE_FILE,
6266
+ description: '在 [dev] 下添加 validate 命令',
6267
+ },
6268
+ {
6269
+ kind: 'create-file',
6270
+ file: VALIDATE_SCRIPT_FILE,
6271
+ description: '创建 validate 脚本',
6272
+ },
6273
+ {
6274
+ kind: 'file-patch',
6275
+ file: PACKAGE_JSON_FILE$1,
6276
+ description: '补齐 validate/ts-check/lint:build 脚本',
6277
+ },
6278
+ ],
6279
+ shouldApply: context =>
6280
+ context.template === 'vite' && !hasValidateInCoze(context),
6281
+ apply: async (context) => {
6282
+ if (context.template !== 'vite') {
6283
+ return {
6284
+ applied: false,
6285
+ patchId: PATCH_ID$3,
6286
+ message: 'Only applies to vite projects, skipping',
6287
+ };
6288
+ }
6289
+
6290
+ if (hasValidateInCoze(context)) {
6291
+ return {
6292
+ applied: false,
6293
+ patchId: PATCH_ID$3,
6294
+ message: '.coze already has validate config, skipping',
6295
+ };
6296
+ }
6297
+
6298
+ const cozeUpdated = await addValidateToCoze(context.projectFolder);
6299
+ if (!cozeUpdated) {
6300
+ return {
6301
+ applied: false,
6302
+ patchId: PATCH_ID$3,
6303
+ message:
6304
+ 'Failed to add validate to .coze (run line not found), skipping',
6305
+ };
6306
+ }
6307
+ logger.info('Patched .coze: added validate command');
6308
+
6309
+ const scriptCreated = await createValidateScript(context.projectFolder);
6310
+ if (scriptCreated) {
6311
+ logger.info('Created scripts/validate.sh');
6312
+ } else {
6313
+ logger.info('scripts/validate.sh already exists, skipping');
6314
+ }
6315
+
6316
+ const scriptsUpdated = await addMissingScriptsToPackageJson(
6317
+ context.projectFolder,
6318
+ );
6319
+ if (scriptsUpdated) {
6320
+ logger.info('Patched package.json: added missing scripts');
6321
+ } else {
6322
+ logger.info('package.json scripts already complete, skipping');
6323
+ }
6324
+
6325
+ return {
6326
+ applied: true,
6327
+ patchId: PATCH_ID$3,
6328
+ message: 'Added validate support to vite project',
6329
+ };
6330
+ },
6331
+ };
6332
+
6150
6333
  function _optionalChain$3(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
6151
6334
  const PATCH_ID$2 = 'taro/update-pack-script-for-tt-build@0.0.13';
6152
6335
  const PACKAGE_JSON_FILE = 'package.json';
@@ -6573,6 +6756,7 @@ const patches = [
6573
6756
  patchNextOutputTracingRoot,
6574
6757
  patchTaroAgentsMd,
6575
6758
  patchTaroPackScript,
6759
+ patchViteAddValidate,
6576
6760
  ] ;
6577
6761
 
6578
6762
  const getTemplatePatches = (
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coze-arch/cli",
3
- "version": "0.0.15-alpha.0f8aee",
3
+ "version": "0.0.15-alpha.511af9",
4
4
  "private": false,
5
5
  "description": "coze coding devtools cli",
6
6
  "license": "MIT",