@xyo-network/xl1-cli 4.5.5 → 4.5.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli-min.mjs CHANGED
@@ -83,7 +83,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
83
83
  var __toCommonJS = (mod) => __hasOwnProp.call(mod, "module.exports") ? mod["module.exports"] : __copyProps(__defProp$41({}, "__esModule", { value: true }), mod);
84
84
  var __require$2 = /* #__PURE__ */ (() => createRequire(import.meta.url))();
85
85
  //#endregion
86
- //#region ../../node_modules/.pnpm/@ariestools+cli-kit@1.0.5/node_modules/@ariestools/cli-kit/dist/node/index.mjs
86
+ //#region ../../node_modules/.pnpm/@ariestools+cli-kit@1.0.6_@ariestools+actor-model@1.1.0_@ariestools+sdk@8.1.6_@opentele_c5f41fc64ac037a480f24c65c958e5c2/node_modules/@ariestools/cli-kit/dist/node/index.mjs
87
87
  function createActorBuilderCatalog(definitions) {
88
88
  const definitionsByName = /* @__PURE__ */ new Map();
89
89
  const names = [];
@@ -14369,7 +14369,7 @@ function staticImplements() {
14369
14369
  return (constructor) => {};
14370
14370
  }
14371
14371
  //#endregion
14372
- //#region ../../node_modules/.pnpm/@ariestools+actor@1.0.2_@ariestools+sdk@8.1.6_@opentelemetry+api@1.9.1_zod@4.4.3__@opentelemetry+api@1.9.1/node_modules/@ariestools/actor/dist/neutral/index.mjs
14372
+ //#region ../../node_modules/.pnpm/@ariestools+actor@1.1.0_@ariestools+sdk@8.1.6_@opentelemetry+api@1.9.1_zod@4.4.3__@opentelemetry+api@1.9.1/node_modules/@ariestools/actor/dist/neutral/index.mjs
14373
14373
  var __defProp$39 = Object.defineProperty;
14374
14374
  var __getOwnPropDesc$38 = Object.getOwnPropertyDescriptor;
14375
14375
  var __decorateClass$38 = (decorators, target, key, kind) => {
@@ -62905,7 +62905,7 @@ config$1(en_default());
62905
62905
  //#region ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/index.js
62906
62906
  var zod_default = external_exports;
62907
62907
  //#endregion
62908
- //#region ../../node_modules/.pnpm/@xyo-network+xl1-protocol@4.6.3_@ariestools+sdk@8.1.6_@opentelemetry+api@1.9.1_zod@4.4._b4a8909994e190e40c62413c091d39da/node_modules/@xyo-network/xl1-protocol/dist/neutral/protocol-model.mjs
62908
+ //#region ../../node_modules/.pnpm/@xyo-network+xl1-protocol@4.6.4_@ariestools+sdk@8.1.6_@opentelemetry+api@1.9.1_zod@4.4._e9ba04f86bd75d5ef1ff0f293fc9585e/node_modules/@xyo-network/xl1-protocol/dist/neutral/protocol-model.mjs
62909
62909
  var ExchangeOutcomeSchema$1 = asSchema$1("network.xyo.exchange.outcome", true);
62910
62910
  var isExchangeOutcome$1 = isPayloadOfZodType$1(/* @__PURE__ */ object$5({
62911
62911
  /** Hash of the ExchangeTerms payload this outcome settles */
@@ -63605,7 +63605,7 @@ var TransactionRejectionSchema$1 = asSchema$1("network.xyo.transaction.rejection
63605
63605
  var isTransactionRejection$1 = isPayloadOfSchemaType$1(TransactionRejectionSchema$1);
63606
63606
  AsObjectFactory.create(isTransactionRejection$1);
63607
63607
  //#endregion
63608
- //#region ../../node_modules/.pnpm/@xyo-network+xl1-protocol@4.6.3_@ariestools+sdk@8.1.6_@opentelemetry+api@1.9.1_zod@4.4._b4a8909994e190e40c62413c091d39da/node_modules/@xyo-network/xl1-protocol/dist/neutral/protocol-lib.mjs
63608
+ //#region ../../node_modules/.pnpm/@xyo-network+xl1-protocol@4.6.4_@ariestools+sdk@8.1.6_@opentelemetry+api@1.9.1_zod@4.4._e9ba04f86bd75d5ef1ff0f293fc9585e/node_modules/@xyo-network/xl1-protocol/dist/neutral/protocol-lib.mjs
63609
63609
  function derivedReceiveAddress(address, scope) {
63610
63610
  return toAddress(keccak256(new TextEncoder().encode(isDefined$1(scope) ? `${scope}|${address}` : address)).slice(-40), { prefix: false });
63611
63611
  }
@@ -63835,7 +63835,7 @@ var TransactionValidationViewerMoniker$1 = "TransactionValidationViewer";
63835
63835
  var WindowedBlockViewerMoniker$1 = "WindowedBlockViewer";
63836
63836
  var XyoViewerMoniker$1 = "XyoViewer";
63837
63837
  //#endregion
63838
- //#region ../../node_modules/.pnpm/@xyo-network+xl1-protocol@4.6.3_@ariestools+sdk@8.1.6_@opentelemetry+api@1.9.1_zod@4.4._b4a8909994e190e40c62413c091d39da/node_modules/@xyo-network/xl1-protocol/dist/neutral/network-model.mjs
63838
+ //#region ../../node_modules/.pnpm/@xyo-network+xl1-protocol@4.6.4_@ariestools+sdk@8.1.6_@opentelemetry+api@1.9.1_zod@4.4._e9ba04f86bd75d5ef1ff0f293fc9585e/node_modules/@xyo-network/xl1-protocol/dist/neutral/network-model.mjs
63839
63839
  var local_default = "<svg id=\"Layer_1\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 256 256\"><g style=\"opacity:.5;\"><path d=\"M154.71,97c.46,2.59,2.5,4.62,5.1,5.05l14.05,2.34,31.71-46.17c4.57-6.65-3.62-14.62-10.14-9.87l-43.68,31.83,2.97,16.82Z\" style=\"fill:#f47f00;\"/><path d=\"M173.86,151.62l-14.05,2.34c-2.6.43-4.64,2.45-5.1,5.05l-2.97,16.82,43.68,31.83c6.52,4.75,14.71-3.21,10.14-9.87l-31.71-46.17Z\" style=\"fill:#f47f00;\"/><path d=\"M82.14,104.38l14.05-2.34c2.6-.43,4.64-2.45,5.1-5.05l2.97-16.82-43.68-31.83c-6.52-4.75-14.71,3.21-10.14,9.87l31.71,46.17Z\" style=\"fill:#f47f00;\"/><path d=\"M101.29,159c-.46-2.59-2.5-4.62-5.1-5.05l-14.05-2.34-31.71,46.17c-4.57,6.65,3.62,14.62,10.14,9.87l43.68-31.83-2.97-16.82Z\" style=\"fill:#f47f00;\"/></g><path d=\"M107.33,104l15.94-90.32c.93-5.3,8.53-5.3,9.47,0l15.94,90.32c.35,2.01,1.94,3.57,3.95,3.91l92.24,15.35c5.36.89,5.36,8.59,0,9.49l-92.24,15.35c-2.01.33-3.59,1.9-3.95,3.91l-15.94,90.32c-.93,5.3-8.53,5.3-9.47,0l-15.94-90.32c-.35-2.01-1.94-3.57-3.95-3.91l-92.24-15.35c-5.36-.89-5.36-8.59,0-9.49l92.24-15.35c2.01-.33,3.59-1.9,3.95-3.91Z\" style=\"fill:#f47f00;\"/></svg>";
63840
63840
  var mainnet_default = "<svg id=\"Layer_1\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 256 256\"><path d=\"M154.71,97c.46,2.59,2.5,4.62,5.1,5.05l14.05,2.34,31.71-46.17c4.57-6.65-3.62-14.62-10.14-9.87l-43.68,31.83,2.97,16.82Z\" style=\"fill:#8d8fc6;\"/><path d=\"M173.86,151.62l-14.05,2.34c-2.6.43-4.64,2.45-5.1,5.05l-2.97,16.82,43.68,31.83c6.52,4.75,14.71-3.21,10.14-9.87l-31.71-46.17Z\" style=\"fill:#eb407a;\"/><path d=\"M82.14,104.38l14.05-2.34c2.6-.43,4.64-2.45,5.1-5.05l2.97-16.82-43.68-31.83c-6.52-4.75-14.71,3.21-10.14,9.87l31.71,46.17Z\" style=\"fill:#579fd6;\"/><path d=\"M101.29,159c-.46-2.59-2.5-4.62-5.1-5.05l-14.05-2.34-31.71,46.17c-4.57,6.65,3.62,14.62,10.14,9.87l43.68-31.83-2.97-16.82Z\" style=\"fill:#f27046;\"/><path d=\"M107.33,104l15.94-90.32c.93-5.3,8.53-5.3,9.47,0l15.94,90.32c.35,2.01,1.94,3.57,3.95,3.91l92.24,15.35c5.36.89,5.36,8.59,0,9.49l-92.24,15.35c-2.01.33-3.59,1.9-3.95,3.91l-15.94,90.32c-.93,5.3-8.53,5.3-9.47,0l-15.94-90.32c-.35-2.01-1.94-3.57-3.95-3.91l-92.24-15.35c-5.36-.89-5.36-8.59,0-9.49l92.24-15.35c2.01-.33,3.59-1.9,3.95-3.91Z\" style=\"fill:#572aff;\"/></svg>";
63841
63841
  var testnet_default = "<svg id=\"Layer_1\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 256 256\"><g style=\"opacity:.5;\"><path d=\"M154.71,97c.46,2.59,2.5,4.62,5.1,5.05l14.05,2.34,31.71-46.17c4.57-6.65-3.62-14.62-10.14-9.87l-43.68,31.83,2.97,16.82Z\" style=\"fill:#579fd6;\"/><path d=\"M173.86,151.62l-14.05,2.34c-2.6.43-4.64,2.45-5.1,5.05l-2.97,16.82,43.68,31.83c6.52,4.75,14.71-3.21,10.14-9.87l-31.71-46.17Z\" style=\"fill:#579fd6;\"/><path d=\"M82.14,104.38l14.05-2.34c2.6-.43,4.64-2.45,5.1-5.05l2.97-16.82-43.68-31.83c-6.52-4.75-14.71,3.21-10.14,9.87l31.71,46.17Z\" style=\"fill:#579fd6;\"/><path d=\"M101.29,159c-.46-2.59-2.5-4.62-5.1-5.05l-14.05-2.34-31.71,46.17c-4.57,6.65,3.62,14.62,10.14,9.87l43.68-31.83-2.97-16.82Z\" style=\"fill:#579fd6;\"/></g><path d=\"M107.33,104l15.94-90.32c.93-5.3,8.53-5.3,9.47,0l15.94,90.32c.35,2.01,1.94,3.57,3.95,3.91l92.24,15.35c5.36.89,5.36,8.59,0,9.49l-92.24,15.35c-2.01.33-3.59,1.9-3.95,3.91l-15.94,90.32c-.93,5.3-8.53,5.3-9.47,0l-15.94-90.32c-.35-2.01-1.94-3.57-3.95-3.91l-92.24-15.35c-5.36-.89-5.36-8.59,0-9.49l92.24-15.35c2.01-.33,3.59-1.9,3.95-3.91Z\" style=\"fill:#579fd6;\"/></svg>";
@@ -64096,7 +64096,7 @@ function evmEventIndexTailPath(address) {
64096
64096
  return `${root(address)}/tail.json`;
64097
64097
  }
64098
64098
  //#endregion
64099
- //#region ../../node_modules/.pnpm/@xyo-network+xl1-protocol@4.6.3_@ariestools+sdk@8.1.6_@opentelemetry+api@1.9.1_zod@4.4._b4a8909994e190e40c62413c091d39da/node_modules/@xyo-network/xl1-protocol/dist/neutral/schema.mjs
64099
+ //#region ../../node_modules/.pnpm/@xyo-network+xl1-protocol@4.6.4_@ariestools+sdk@8.1.6_@opentelemetry+api@1.9.1_zod@4.4._e9ba04f86bd75d5ef1ff0f293fc9585e/node_modules/@xyo-network/xl1-protocol/dist/neutral/schema.mjs
64100
64100
  var asRequiredStrings = (required) => {
64101
64101
  if (typeof required === "string") return [required];
64102
64102
  if (!Array.isArray(required)) return [];
@@ -64332,7 +64332,7 @@ var TransferPayloadJsonSchema = {
64332
64332
  };
64333
64333
  var TransferPayloadJsonSchemaPayload = new PayloadBuilder$1({ schema: SchemaSchema$1 }).fields({ definition: TransferPayloadJsonSchema }).build();
64334
64334
  //#endregion
64335
- //#region ../../node_modules/.pnpm/@xyo-network+xl1-protocol@4.6.3_@ariestools+sdk@8.1.6_@opentelemetry+api@1.9.1_zod@4.4._b4a8909994e190e40c62413c091d39da/node_modules/@xyo-network/xl1-protocol/dist/neutral/validation.mjs
64335
+ //#region ../../node_modules/.pnpm/@xyo-network+xl1-protocol@4.6.4_@ariestools+sdk@8.1.6_@opentelemetry+api@1.9.1_zod@4.4._e9ba04f86bd75d5ef1ff0f293fc9585e/node_modules/@xyo-network/xl1-protocol/dist/neutral/validation.mjs
64336
64336
  function maxTransactionFeeCost(tx) {
64337
64337
  const { base, gasLimit, priority } = tx.fees;
64338
64338
  return hexToBigInt(base) + hexToBigInt(priority) + hexToBigInt(gasLimit);
@@ -64578,7 +64578,7 @@ var validateTransaction = async (context, tx, additionalValidators) => {
64578
64578
  }
64579
64579
  };
64580
64580
  //#endregion
64581
- //#region ../../node_modules/.pnpm/@xyo-network+xl1-sdk@4.6.3_@ariestools+sdk@8.1.6_@opentelemetry+api@1.9.1_zod@4.4.3__@o_50a514a5739f989ee2a17e5c5ff1f6d4/node_modules/@xyo-network/xl1-sdk/dist/neutral/driver-memory.mjs
64581
+ //#region ../../node_modules/.pnpm/@xyo-network+xl1-sdk@4.6.4_@ariestools+sdk@8.1.6_@opentelemetry+api@1.9.1_zod@4.4.3__@o_f9ddc89726e39fe46fa9040122900e73/node_modules/@xyo-network/xl1-sdk/dist/neutral/driver-memory.mjs
64582
64582
  var LruCacheMap$1 = class {
64583
64583
  lruCache;
64584
64584
  /** Creates an instance with the supplied configuration. */
@@ -69575,7 +69575,7 @@ var require_ExplorerSync = /* @__PURE__ */ __commonJSMin(((exports) => {
69575
69575
  exports.ExplorerSync = ExplorerSync;
69576
69576
  }));
69577
69577
  //#endregion
69578
- //#region ../../node_modules/.pnpm/@xyo-network+xl1-sdk@4.6.3_@ariestools+sdk@8.1.6_@opentelemetry+api@1.9.1_zod@4.4.3__@o_50a514a5739f989ee2a17e5c5ff1f6d4/node_modules/@xyo-network/xl1-sdk/dist/node/protocol-sdk.mjs
69578
+ //#region ../../node_modules/.pnpm/@xyo-network+xl1-sdk@4.6.4_@ariestools+sdk@8.1.6_@opentelemetry+api@1.9.1_zod@4.4.3__@o_f9ddc89726e39fe46fa9040122900e73/node_modules/@xyo-network/xl1-sdk/dist/node/protocol-sdk.mjs
69579
69579
  var import_dist = (/* @__PURE__ */ __commonJSMin(((exports) => {
69580
69580
  Object.defineProperty(exports, "__esModule", { value: true });
69581
69581
  exports.defaultLoadersSync = exports.defaultLoaders = exports.globalConfigSearchPlacesSync = exports.globalConfigSearchPlaces = exports.getDefaultSearchPlacesSync = exports.getDefaultSearchPlaces = void 0;
@@ -71685,6 +71685,7 @@ var AbstractCreatableProvider$1 = class extends AbstractCreatable {
71685
71685
  _contextCache;
71686
71686
  _logger;
71687
71687
  _primed = Promise.resolve();
71688
+ _cancelController = new AbortController();
71688
71689
  /** Returns the logger result exposed by this provider. */
71689
71690
  get logger() {
71690
71691
  if (this._logger === void 0) {
@@ -71705,6 +71706,20 @@ var AbstractCreatableProvider$1 = class extends AbstractCreatable {
71705
71706
  get primed() {
71706
71707
  return this._primed;
71707
71708
  }
71709
+ /**
71710
+ * Aborted when {@link requestCancel} is called. Long-running work started
71711
+ * from `startHandler` (chunked chain sweeps, backoff sleeps, background
71712
+ * priming) must honor this so a shutdown request does not have to wait for
71713
+ * the work to finish on its own.
71714
+ *
71715
+ * This is deliberately independent of `stop()`: `AbstractCreatable.stop()`
71716
+ * takes the same status mutex that `start()` holds, so it cannot interrupt
71717
+ * an in-flight start. `requestCancel` takes no lock and is the only path
71718
+ * that can cut a start short.
71719
+ */
71720
+ get signal() {
71721
+ return this._cancelController.signal;
71722
+ }
71708
71723
  /** Returns the tracer result exposed by this provider. */
71709
71724
  get tracer() {
71710
71725
  return this.context.traceProvider?.getTracer(this.name) ?? super.tracer;
@@ -71813,6 +71828,18 @@ var AbstractCreatableProvider$1 = class extends AbstractCreatable {
71813
71828
  return await this.locator.getInstance(moniker);
71814
71829
  }
71815
71830
  /**
71831
+ * Requests cancellation of any long-running work this provider has in
71832
+ * flight, without taking the lifecycle status mutex. Idempotent, safe from
71833
+ * a signal handler, and safe to call in any lifecycle status.
71834
+ *
71835
+ * Cancellation is terminal for the instance: the signal is never reset, so
71836
+ * a cancelled provider is not expected to start again.
71837
+ */
71838
+ requestCancel(reason) {
71839
+ if (this._cancelController.signal.aborted) return;
71840
+ this._cancelController.abort(reason ?? /* @__PURE__ */ new Error(`Provider [${this.moniker}] cancelled`));
71841
+ }
71842
+ /**
71816
71843
  * Execute `fn` inside a root tracing span using this provider's tracer. Restores the
71817
71844
  * instance method that @ariestools/sdk's AbstractCreatable removed in 8.1.1 (span/spanRoot
71818
71845
  * remain available only as standalone functions there).
@@ -77812,7 +77839,7 @@ var require_deep_freeze_strict = /* @__PURE__ */ __commonJSMin(((exports, module
77812
77839
  };
77813
77840
  }));
77814
77841
  //#endregion
77815
- //#region ../../node_modules/.pnpm/@xyo-network+xl1-sdk@4.6.3_@ariestools+sdk@8.1.6_@opentelemetry+api@1.9.1_zod@4.4.3__@o_50a514a5739f989ee2a17e5c5ff1f6d4/node_modules/@xyo-network/xl1-sdk/dist/neutral/rpc.mjs
77842
+ //#region ../../node_modules/.pnpm/@xyo-network+xl1-sdk@4.6.4_@ariestools+sdk@8.1.6_@opentelemetry+api@1.9.1_zod@4.4.3__@o_f9ddc89726e39fe46fa9040122900e73/node_modules/@xyo-network/xl1-sdk/dist/neutral/rpc.mjs
77816
77843
  var __defProp$26 = Object.defineProperty;
77817
77844
  var __getOwnPropDesc$25 = Object.getOwnPropertyDescriptor;
77818
77845
  var __defNormalProp$25 = (obj, key, value) => key in obj ? __defProp$26(obj, key, {
@@ -80266,7 +80293,7 @@ __publicField$25(JsonRpcXyoRunner$1, "monikers", [XyoRunnerMoniker$1]);
80266
80293
  __publicField$25(JsonRpcXyoRunner$1, "surface", "node");
80267
80294
  JsonRpcXyoRunner$1 = __decorateClass$25([creatableProvider$1()], JsonRpcXyoRunner$1);
80268
80295
  //#endregion
80269
- //#region ../../node_modules/.pnpm/@xyo-network+xl1-sdk@4.6.3_@ariestools+sdk@8.1.6_@opentelemetry+api@1.9.1_zod@4.4.3__@o_50a514a5739f989ee2a17e5c5ff1f6d4/node_modules/@xyo-network/xl1-sdk/dist/neutral/rest-block-viewer.mjs
80296
+ //#region ../../node_modules/.pnpm/@xyo-network+xl1-sdk@4.6.4_@ariestools+sdk@8.1.6_@opentelemetry+api@1.9.1_zod@4.4.3__@o_f9ddc89726e39fe46fa9040122900e73/node_modules/@xyo-network/xl1-sdk/dist/neutral/rest-block-viewer.mjs
80270
80297
  var __defProp$25 = Object.defineProperty;
80271
80298
  var __getOwnPropDesc$24 = Object.getOwnPropertyDescriptor;
80272
80299
  var __defNormalProp$24 = (obj, key, value) => key in obj ? __defProp$25(obj, key, {
@@ -100551,7 +100578,7 @@ var StakedXyoChainV2__factory = class extends ContractFactory {
100551
100578
  }
100552
100579
  };
100553
100580
  //#endregion
100554
- //#region ../../node_modules/.pnpm/@xyo-network+xl1-sdk@4.6.3_@ariestools+sdk@8.1.6_@opentelemetry+api@1.9.1_zod@4.4.3__@o_50a514a5739f989ee2a17e5c5ff1f6d4/node_modules/@xyo-network/xl1-sdk/dist/neutral/providers.mjs
100581
+ //#region ../../node_modules/.pnpm/@xyo-network+xl1-sdk@4.6.4_@ariestools+sdk@8.1.6_@opentelemetry+api@1.9.1_zod@4.4.3__@o_f9ddc89726e39fe46fa9040122900e73/node_modules/@xyo-network/xl1-sdk/dist/neutral/providers.mjs
100555
100582
  var __defProp$23 = Object.defineProperty;
100556
100583
  var __getOwnPropDesc$23 = Object.getOwnPropertyDescriptor;
100557
100584
  var __defNormalProp$23 = (obj, key, value) => key in obj ? __defProp$23(obj, key, {
@@ -100987,20 +101014,41 @@ function matchesRateLimitText$1(text) {
100987
101014
  const normalized = text.toLowerCase();
100988
101015
  return normalized.includes("too many requests") || normalized.includes("rate limit") || normalized.includes("rate exceeded") || normalized.includes("call rate limit") || normalized.includes("request limit") || normalized.includes("exceeded the quota");
100989
101016
  }
101017
+ async function abortableDelay$1(ms, signal) {
101018
+ if (signal === void 0) {
101019
+ await delay$2(ms);
101020
+ return;
101021
+ }
101022
+ const abortSignal = signal;
101023
+ abortSignal.throwIfAborted();
101024
+ await new Promise((resolve, reject) => {
101025
+ const timer = setTimeout(() => {
101026
+ abortSignal.removeEventListener("abort", onAbort);
101027
+ resolve();
101028
+ }, ms);
101029
+ const onAbort = () => {
101030
+ clearTimeout(timer);
101031
+ reject(abortSignal.reason);
101032
+ };
101033
+ abortSignal.addEventListener("abort", onAbort, { once: true });
101034
+ });
101035
+ }
100990
101036
  async function withRpcRateLimitBackoff$1(fn, options = {}) {
100991
- const { backoff = 2, initialDelayMs = 1e3, maxAttempts = 8, maxDelayMs = 3e4, onRetry } = options;
101037
+ const { backoff = 2, initialDelayMs = 1e3, maxAttempts = 8, maxDelayMs = 3e4, onRetry, signal } = options;
100992
101038
  if (!Number.isInteger(maxAttempts) || maxAttempts < 1) throw new TypeError(`maxAttempts must be an integer >= 1, got ${maxAttempts}`);
100993
101039
  let delayMs = initialDelayMs;
100994
101040
  let lastError;
101041
+ signal?.throwIfAborted();
100995
101042
  for (let attempt = 1; attempt <= maxAttempts; attempt++) try {
100996
101043
  return await fn();
100997
101044
  } catch (error) {
100998
101045
  lastError = error;
100999
101046
  const isLastAttempt = attempt >= maxAttempts;
101000
101047
  if (!isRpcRateLimitError$1(error) || isLastAttempt) throw error;
101048
+ signal?.throwIfAborted();
101001
101049
  const waitMs = Math.min(delayMs, maxDelayMs);
101002
101050
  onRetry?.(error, attempt, waitMs);
101003
- await delay$2(waitMs);
101051
+ await abortableDelay$1(waitMs, signal);
101004
101052
  delayMs = Math.min(delayMs * backoff, maxDelayMs);
101005
101053
  }
101006
101054
  throw lastError;
@@ -101107,6 +101155,7 @@ var EvmStakeEventsViewer$1 = class extends AbstractEvmViewer$1 {
101107
101155
  const latestBlock = assertEx$1(await provider.getBlockNumber(), () => /* @__PURE__ */ new Error("Failed to get latestEthBlock"));
101108
101156
  if (latestBlock > historyEndBlock) await this.loadHistoricalEvents(historyEndBlock + 1, latestBlock);
101109
101157
  } catch (error) {
101158
+ if (this.signal.aborted) throw error;
101110
101159
  this.logger?.error("EthereumChainStakeEvents failed to start:", error);
101111
101160
  throw error;
101112
101161
  }
@@ -101137,6 +101186,7 @@ var EvmStakeEventsViewer$1 = class extends AbstractEvmViewer$1 {
101137
101186
  let chunkCount = 0;
101138
101187
  let cursor = fromBlock;
101139
101188
  while (cursor <= toBlock) {
101189
+ this.signal.throwIfAborted();
101140
101190
  const chunkSize = this.eventQueryBlockChunkSize;
101141
101191
  const chunkTo = Math.min(cursor + chunkSize - 1, toBlock);
101142
101192
  let logs;
@@ -101144,11 +101194,16 @@ var EvmStakeEventsViewer$1 = class extends AbstractEvmViewer$1 {
101144
101194
  logs = await withRpcRateLimitBackoff$1(() => this.contract.queryFilter("*", cursor, chunkTo), {
101145
101195
  initialDelayMs: this.eventQueryInitialDelayMs,
101146
101196
  maxAttempts: this.eventQueryMaxAttempts,
101197
+ signal: this.signal,
101147
101198
  onRetry: (_error, attempt, delayMs) => {
101148
101199
  this.logger?.warn(`Rate limited fetching logs for blocks ${cursor}-${chunkTo} (attempt ${attempt}/${this.eventQueryMaxAttempts}); backing off ${delayMs}ms`);
101149
101200
  }
101150
101201
  });
101151
101202
  } catch (error) {
101203
+ if (this.signal.aborted) {
101204
+ this.logger?.log(`Stake event indexing cancelled at block ${cursor} (of ${fromBlock}-${toBlock})`);
101205
+ throw error;
101206
+ }
101152
101207
  if (!isDefined$1(this.fixedEventQueryBlockChunkSize) && isRpcRangeLimitError$1(error) && chunkSize > 1e3) {
101153
101208
  const advertised = rpcRangeLimitFromError$1(error);
101154
101209
  const nextSize = Math.max(MIN_EVENT_QUERY_BLOCK_CHUNK_SIZE$1, Math.min(advertised ?? Number.MAX_SAFE_INTEGER, Math.floor(chunkSize / 2)));
@@ -102555,7 +102610,7 @@ __publicField$23(SimpleXyoViewer$1, "monikers", [XyoViewerMoniker$1]);
102555
102610
  __publicField$23(SimpleXyoViewer$1, "surface", "node");
102556
102611
  SimpleXyoViewer$1 = __decorateClass$23([creatableProvider$1()], SimpleXyoViewer$1);
102557
102612
  //#endregion
102558
- //#region ../../node_modules/.pnpm/@xyo-network+xl1-sdk@4.6.3_@ariestools+sdk@8.1.6_@opentelemetry+api@1.9.1_zod@4.4.3__@o_50a514a5739f989ee2a17e5c5ff1f6d4/node_modules/@xyo-network/xl1-sdk/dist/neutral/gateway.mjs
102613
+ //#region ../../node_modules/.pnpm/@xyo-network+xl1-sdk@4.6.4_@ariestools+sdk@8.1.6_@opentelemetry+api@1.9.1_zod@4.4.3__@o_f9ddc89726e39fe46fa9040122900e73/node_modules/@xyo-network/xl1-sdk/dist/neutral/gateway.mjs
102559
102614
  var __defProp$22 = Object.defineProperty;
102560
102615
  var __getOwnPropDesc$22 = Object.getOwnPropertyDescriptor;
102561
102616
  var __defNormalProp$22 = (obj, key, value) => key in obj ? __defProp$22(obj, key, {
@@ -102631,7 +102686,7 @@ async function witnessPreviousStep(gateway, options) {
102631
102686
  return { witness };
102632
102687
  }
102633
102688
  //#endregion
102634
- //#region ../../node_modules/.pnpm/@xyo-network+xl1-sdk@4.6.3_@ariestools+sdk@8.1.6_@opentelemetry+api@1.9.1_zod@4.4.3__@o_50a514a5739f989ee2a17e5c5ff1f6d4/node_modules/@xyo-network/xl1-sdk/dist/neutral/wrappers.mjs
102689
+ //#region ../../node_modules/.pnpm/@xyo-network+xl1-sdk@4.6.4_@ariestools+sdk@8.1.6_@opentelemetry+api@1.9.1_zod@4.4.3__@o_f9ddc89726e39fe46fa9040122900e73/node_modules/@xyo-network/xl1-sdk/dist/neutral/wrappers.mjs
102635
102690
  function parseHexOrBigInt(value) {
102636
102691
  return AttoXL1$1(typeof value === "bigint" ? value : hexToBigInt(value));
102637
102692
  }
@@ -105122,7 +105177,7 @@ function initTelemetry(params) {
105122
105177
  }
105123
105178
  }
105124
105179
  //#endregion
105125
- //#region ../../node_modules/.pnpm/@xyo-network+xl1-sdk@4.6.3_@ariestools+sdk@8.1.6_@opentelemetry+api@1.9.1_zod@4.4.3__@o_50a514a5739f989ee2a17e5c5ff1f6d4/node_modules/@xyo-network/xl1-sdk/dist/node/providers.mjs
105180
+ //#region ../../node_modules/.pnpm/@xyo-network+xl1-sdk@4.6.4_@ariestools+sdk@8.1.6_@opentelemetry+api@1.9.1_zod@4.4.3__@o_f9ddc89726e39fe46fa9040122900e73/node_modules/@xyo-network/xl1-sdk/dist/node/providers.mjs
105126
105181
  var __defProp$18 = Object.defineProperty;
105127
105182
  var __getOwnPropDesc$18 = Object.getOwnPropertyDescriptor;
105128
105183
  var __defNormalProp$18 = (obj, key, value) => key in obj ? __defProp$18(obj, key, {
@@ -105558,20 +105613,41 @@ function matchesRateLimitText(text) {
105558
105613
  const normalized = text.toLowerCase();
105559
105614
  return normalized.includes("too many requests") || normalized.includes("rate limit") || normalized.includes("rate exceeded") || normalized.includes("call rate limit") || normalized.includes("request limit") || normalized.includes("exceeded the quota");
105560
105615
  }
105616
+ async function abortableDelay(ms, signal) {
105617
+ if (signal === void 0) {
105618
+ await delay$2(ms);
105619
+ return;
105620
+ }
105621
+ const abortSignal = signal;
105622
+ abortSignal.throwIfAborted();
105623
+ await new Promise((resolve, reject) => {
105624
+ const timer = setTimeout(() => {
105625
+ abortSignal.removeEventListener("abort", onAbort);
105626
+ resolve();
105627
+ }, ms);
105628
+ const onAbort = () => {
105629
+ clearTimeout(timer);
105630
+ reject(abortSignal.reason);
105631
+ };
105632
+ abortSignal.addEventListener("abort", onAbort, { once: true });
105633
+ });
105634
+ }
105561
105635
  async function withRpcRateLimitBackoff(fn, options = {}) {
105562
- const { backoff = 2, initialDelayMs = 1e3, maxAttempts = 8, maxDelayMs = 3e4, onRetry } = options;
105636
+ const { backoff = 2, initialDelayMs = 1e3, maxAttempts = 8, maxDelayMs = 3e4, onRetry, signal } = options;
105563
105637
  if (!Number.isInteger(maxAttempts) || maxAttempts < 1) throw new TypeError(`maxAttempts must be an integer >= 1, got ${maxAttempts}`);
105564
105638
  let delayMs = initialDelayMs;
105565
105639
  let lastError;
105640
+ signal?.throwIfAborted();
105566
105641
  for (let attempt = 1; attempt <= maxAttempts; attempt++) try {
105567
105642
  return await fn();
105568
105643
  } catch (error) {
105569
105644
  lastError = error;
105570
105645
  const isLastAttempt = attempt >= maxAttempts;
105571
105646
  if (!isRpcRateLimitError(error) || isLastAttempt) throw error;
105647
+ signal?.throwIfAborted();
105572
105648
  const waitMs = Math.min(delayMs, maxDelayMs);
105573
105649
  onRetry?.(error, attempt, waitMs);
105574
- await delay$2(waitMs);
105650
+ await abortableDelay(waitMs, signal);
105575
105651
  delayMs = Math.min(delayMs * backoff, maxDelayMs);
105576
105652
  }
105577
105653
  throw lastError;
@@ -105678,6 +105754,7 @@ var EvmStakeEventsViewer = class extends AbstractEvmViewer {
105678
105754
  const latestBlock = assertEx$1(await provider.getBlockNumber(), () => /* @__PURE__ */ new Error("Failed to get latestEthBlock"));
105679
105755
  if (latestBlock > historyEndBlock) await this.loadHistoricalEvents(historyEndBlock + 1, latestBlock);
105680
105756
  } catch (error) {
105757
+ if (this.signal.aborted) throw error;
105681
105758
  this.logger?.error("EthereumChainStakeEvents failed to start:", error);
105682
105759
  throw error;
105683
105760
  }
@@ -105708,6 +105785,7 @@ var EvmStakeEventsViewer = class extends AbstractEvmViewer {
105708
105785
  let chunkCount = 0;
105709
105786
  let cursor = fromBlock;
105710
105787
  while (cursor <= toBlock) {
105788
+ this.signal.throwIfAborted();
105711
105789
  const chunkSize = this.eventQueryBlockChunkSize;
105712
105790
  const chunkTo = Math.min(cursor + chunkSize - 1, toBlock);
105713
105791
  let logs;
@@ -105715,11 +105793,16 @@ var EvmStakeEventsViewer = class extends AbstractEvmViewer {
105715
105793
  logs = await withRpcRateLimitBackoff(() => this.contract.queryFilter("*", cursor, chunkTo), {
105716
105794
  initialDelayMs: this.eventQueryInitialDelayMs,
105717
105795
  maxAttempts: this.eventQueryMaxAttempts,
105796
+ signal: this.signal,
105718
105797
  onRetry: (_error, attempt, delayMs) => {
105719
105798
  this.logger?.warn(`Rate limited fetching logs for blocks ${cursor}-${chunkTo} (attempt ${attempt}/${this.eventQueryMaxAttempts}); backing off ${delayMs}ms`);
105720
105799
  }
105721
105800
  });
105722
105801
  } catch (error) {
105802
+ if (this.signal.aborted) {
105803
+ this.logger?.log(`Stake event indexing cancelled at block ${cursor} (of ${fromBlock}-${toBlock})`);
105804
+ throw error;
105805
+ }
105723
105806
  if (!isDefined$1(this.fixedEventQueryBlockChunkSize) && isRpcRangeLimitError(error) && chunkSize > 1e3) {
105724
105807
  const advertised = rpcRangeLimitFromError(error);
105725
105808
  const nextSize = Math.max(MIN_EVENT_QUERY_BLOCK_CHUNK_SIZE, Math.min(advertised ?? Number.MAX_SAFE_INTEGER, Math.floor(chunkSize / 2)));
@@ -107126,7 +107209,7 @@ __publicField$18(SimpleXyoViewer, "monikers", [XyoViewerMoniker$1]);
107126
107209
  __publicField$18(SimpleXyoViewer, "surface", "node");
107127
107210
  SimpleXyoViewer = __decorateClass$18([creatableProvider$1()], SimpleXyoViewer);
107128
107211
  //#endregion
107129
- //#region ../../node_modules/.pnpm/@xyo-network+xl1-s3-providers@4.6.3_@ariestools+sdk@8.1.6_@opentelemetry+api@1.9.1_zod@_95f9975343a65e1766074b992e9619f3/node_modules/@xyo-network/xl1-s3-providers/dist/node/index.mjs
107212
+ //#region ../../node_modules/.pnpm/@xyo-network+xl1-s3-providers@4.6.4_@ariestools+sdk@8.1.6_@opentelemetry+api@1.9.1_zod@_2dc22f1f2f979641329e910cb8283e15/node_modules/@xyo-network/xl1-s3-providers/dist/node/index.mjs
107130
107213
  var __defProp$17 = Object.defineProperty;
107131
107214
  var __getOwnPropDesc$17 = Object.getOwnPropertyDescriptor;
107132
107215
  var __defNormalProp$17 = (obj, key, value) => key in obj ? __defProp$17(obj, key, {
@@ -163453,7 +163536,7 @@ __publicField$11(MemoryArchivist, "labels", {
163453
163536
  });
163454
163537
  MemoryArchivist = __decorateClass$11([creatableModule()], MemoryArchivist);
163455
163538
  //#endregion
163456
- //#region ../../node_modules/.pnpm/@xyo-network+xl1-protocol@4.6.3_@ariestools+sdk@8.1.6_@opentelemetry+api@1.9.1_zod@4.4._3d423a4f3aaec1944adff376d56a5dad/node_modules/@xyo-network/xl1-protocol/dist/neutral/protocol-model.mjs
163539
+ //#region ../../node_modules/.pnpm/@xyo-network+xl1-protocol@4.6.4_@ariestools+sdk@8.1.6_@opentelemetry+api@1.9.1_zod@4.4._2c4bac37bf63d3edc3b03b3f95f9f16d/node_modules/@xyo-network/xl1-protocol/dist/neutral/protocol-model.mjs
163457
163540
  var ExchangeOutcomeSchema = asSchema("network.xyo.exchange.outcome", true);
163458
163541
  var isExchangeOutcome = isPayloadOfZodType(/* @__PURE__ */ object$5({
163459
163542
  /** Hash of the ExchangeTerms payload this outcome settles */
@@ -164273,7 +164356,7 @@ new import_ajv.Ajv({
164273
164356
  strict: true
164274
164357
  });
164275
164358
  //#endregion
164276
- //#region ../../node_modules/.pnpm/@xyo-network+xl1-sdk@4.6.3_@ariestools+sdk@8.1.6_@opentelemetry+api@1.9.1_zod@4.4.3__@o_028e7fc2c2e3d76b1f38dab75dc86620/node_modules/@xyo-network/xl1-sdk/dist/neutral/driver-memory.mjs
164359
+ //#region ../../node_modules/.pnpm/@xyo-network+xl1-sdk@4.6.4_@ariestools+sdk@8.1.6_@opentelemetry+api@1.9.1_zod@4.4.3__@o_93efe9e756156a858298b633a2686ded/node_modules/@xyo-network/xl1-sdk/dist/neutral/driver-memory.mjs
164277
164360
  var LruCacheMap = class {
164278
164361
  lruCache;
164279
164362
  /** Creates an instance with the supplied configuration. */
@@ -164355,7 +164438,7 @@ var MemoryMap = class {
164355
164438
  }
164356
164439
  };
164357
164440
  //#endregion
164358
- //#region ../../node_modules/.pnpm/@xyo-network+xl1-sdk@4.6.3_@ariestools+sdk@8.1.6_@opentelemetry+api@1.9.1_zod@4.4.3__@o_028e7fc2c2e3d76b1f38dab75dc86620/node_modules/@xyo-network/xl1-sdk/dist/node/protocol-sdk.mjs
164441
+ //#region ../../node_modules/.pnpm/@xyo-network+xl1-sdk@4.6.4_@ariestools+sdk@8.1.6_@opentelemetry+api@1.9.1_zod@4.4.3__@o_93efe9e756156a858298b633a2686ded/node_modules/@xyo-network/xl1-sdk/dist/node/protocol-sdk.mjs
164359
164442
  var __defProp$10 = Object.defineProperty;
164360
164443
  var __getOwnPropDesc$10 = Object.getOwnPropertyDescriptor;
164361
164444
  var __defNormalProp$10 = (obj, key, value) => key in obj ? __defProp$10(obj, key, {
@@ -165461,6 +165544,7 @@ var AbstractCreatableProvider = class extends AbstractCreatable {
165461
165544
  _contextCache;
165462
165545
  _logger;
165463
165546
  _primed = Promise.resolve();
165547
+ _cancelController = new AbortController();
165464
165548
  /** Returns the logger result exposed by this provider. */
165465
165549
  get logger() {
165466
165550
  if (this._logger === void 0) {
@@ -165481,6 +165565,20 @@ var AbstractCreatableProvider = class extends AbstractCreatable {
165481
165565
  get primed() {
165482
165566
  return this._primed;
165483
165567
  }
165568
+ /**
165569
+ * Aborted when {@link requestCancel} is called. Long-running work started
165570
+ * from `startHandler` (chunked chain sweeps, backoff sleeps, background
165571
+ * priming) must honor this so a shutdown request does not have to wait for
165572
+ * the work to finish on its own.
165573
+ *
165574
+ * This is deliberately independent of `stop()`: `AbstractCreatable.stop()`
165575
+ * takes the same status mutex that `start()` holds, so it cannot interrupt
165576
+ * an in-flight start. `requestCancel` takes no lock and is the only path
165577
+ * that can cut a start short.
165578
+ */
165579
+ get signal() {
165580
+ return this._cancelController.signal;
165581
+ }
165484
165582
  /** Returns the tracer result exposed by this provider. */
165485
165583
  get tracer() {
165486
165584
  return this.context.traceProvider?.getTracer(this.name) ?? super.tracer;
@@ -165589,6 +165687,18 @@ var AbstractCreatableProvider = class extends AbstractCreatable {
165589
165687
  return await this.locator.getInstance(moniker);
165590
165688
  }
165591
165689
  /**
165690
+ * Requests cancellation of any long-running work this provider has in
165691
+ * flight, without taking the lifecycle status mutex. Idempotent, safe from
165692
+ * a signal handler, and safe to call in any lifecycle status.
165693
+ *
165694
+ * Cancellation is terminal for the instance: the signal is never reset, so
165695
+ * a cancelled provider is not expected to start again.
165696
+ */
165697
+ requestCancel(reason) {
165698
+ if (this._cancelController.signal.aborted) return;
165699
+ this._cancelController.abort(reason ?? /* @__PURE__ */ new Error(`Provider [${this.moniker}] cancelled`));
165700
+ }
165701
+ /**
165592
165702
  * Execute `fn` inside a root tracing span using this provider's tracer. Restores the
165593
165703
  * instance method that @ariestools/sdk's AbstractCreatable removed in 8.1.1 (span/spanRoot
165594
165704
  * remain available only as standalone functions there).
@@ -169630,7 +169740,7 @@ function getOriginalId(rawRequest) {
169630
169740
  return [void 0, false];
169631
169741
  }
169632
169742
  //#endregion
169633
- //#region ../../node_modules/.pnpm/@xyo-network+xl1-sdk@4.6.3_@ariestools+sdk@8.1.6_@opentelemetry+api@1.9.1_zod@4.4.3__@o_028e7fc2c2e3d76b1f38dab75dc86620/node_modules/@xyo-network/xl1-sdk/dist/neutral/rpc.mjs
169743
+ //#region ../../node_modules/.pnpm/@xyo-network+xl1-sdk@4.6.4_@ariestools+sdk@8.1.6_@opentelemetry+api@1.9.1_zod@4.4.3__@o_93efe9e756156a858298b633a2686ded/node_modules/@xyo-network/xl1-sdk/dist/neutral/rpc.mjs
169634
169744
  var __defProp$9 = Object.defineProperty;
169635
169745
  var __getOwnPropDesc$9 = Object.getOwnPropertyDescriptor;
169636
169746
  var __defNormalProp$9 = (obj, key, value) => key in obj ? __defProp$9(obj, key, {
@@ -224826,6 +224936,7 @@ var BridgeConfigResponseZod = /* @__PURE__ */ object$5({
224826
224936
  feesAddress: /* @__PURE__ */ optional$2(AddressZod),
224827
224937
  maxBridgeAmount: HexZod,
224828
224938
  minBridgeAmount: HexZod,
224939
+ remoteBridgeContractAddress: AddressZod,
224829
224940
  remoteChainId: HexZod,
224830
224941
  remoteTokenAddress: HexZod,
224831
224942
  xl1ChainId: /* @__PURE__ */ optional$2(HexZod),
@@ -225093,7 +225204,7 @@ var require_bullMQOtel = /* @__PURE__ */ __commonJSMin(((exports) => {
225093
225204
  exports.BullMQOtel = BullMQOtel;
225094
225205
  }));
225095
225206
  //#endregion
225096
- //#region ../../node_modules/.pnpm/@xyo-network+xl1-driver-mongodb@4.6.3_@ariestools+sdk@8.1.6_@opentelemetry+api@1.9.1_zo_37c017b521cba126f50f77ecbc2ae0e5/node_modules/@xyo-network/xl1-driver-mongodb/dist/neutral/index.mjs
225207
+ //#region ../../node_modules/.pnpm/@xyo-network+xl1-driver-mongodb@4.6.4_@ariestools+sdk@8.1.6_@opentelemetry+api@1.9.1_zo_92676604b0c9927fd343c558a05d84ba/node_modules/@xyo-network/xl1-driver-mongodb/dist/neutral/index.mjs
225097
225208
  var import_cjs$1 = (/* @__PURE__ */ __commonJSMin(((exports) => {
225098
225209
  Object.defineProperty(exports, "__esModule", { value: true });
225099
225210
  (init_tslib_es6(), __toCommonJS(tslib_es6_exports)).__exportStar(require_bullMQOtel(), exports);
@@ -225795,6 +225906,7 @@ var getBridgeSettings = async (config) => {
225795
225906
  const { feesAddress, escrowAddress } = await getTransferAddresses(config);
225796
225907
  const maxBridgeAmount = getMaxBridgeAmount(config);
225797
225908
  const minBridgeAmount = getMinBridgeAmount(config);
225909
+ const remoteBridgeContractAddress = config.remoteBridgeContractAddress;
225798
225910
  const remoteChainId = getRemoteChainId(config);
225799
225911
  const remoteTokenAddress = getRemoteTokenAddress(config);
225800
225912
  const xl1ChainId = getXl1ChainId(config);
@@ -225805,6 +225917,7 @@ var getBridgeSettings = async (config) => {
225805
225917
  escrowAddress,
225806
225918
  maxBridgeAmount,
225807
225919
  minBridgeAmount,
225920
+ remoteBridgeContractAddress,
225808
225921
  remoteChainId,
225809
225922
  remoteTokenAddress,
225810
225923
  xl1TokenAddress: getXl1TokenAddress(config, xl1ChainId),
@@ -227252,7 +227365,7 @@ var makeBridgeConfigRoute = (config) => {
227252
227365
  method: "get",
227253
227366
  path: "/bridge/chains/:chainId/config",
227254
227367
  handlers: validateRequest$1(async (_, res) => {
227255
- const { escrowAddress, feeFixed, feeRateBasisPoints, feesAddress, maxBridgeAmount, minBridgeAmount, remoteChainId, remoteTokenAddress, xl1ChainId, xl1TokenAddress } = await getBridgeSettings(config);
227368
+ const { escrowAddress, feeFixed, feeRateBasisPoints, feesAddress, maxBridgeAmount, minBridgeAmount, remoteBridgeContractAddress, remoteChainId, remoteTokenAddress, xl1ChainId, xl1TokenAddress } = await getBridgeSettings(config);
227256
227369
  const sanitizedConfig = {
227257
227370
  escrowAddress,
227258
227371
  feeFixed,
@@ -227260,6 +227373,7 @@ var makeBridgeConfigRoute = (config) => {
227260
227373
  feesAddress,
227261
227374
  maxBridgeAmount,
227262
227375
  minBridgeAmount,
227376
+ remoteBridgeContractAddress,
227263
227377
  remoteChainId,
227264
227378
  remoteTokenAddress,
227265
227379
  xl1ChainId,
@@ -229368,7 +229482,7 @@ function validatorCommand(getConfiguration, getLocatorFromConfig) {
229368
229482
  };
229369
229483
  }
229370
229484
  //#endregion
229371
- //#region ../../node_modules/.pnpm/@ariestools+cli-kit-node@1.0.5/node_modules/@ariestools/cli-kit-node/dist/node/index.mjs
229485
+ //#region ../../node_modules/.pnpm/@ariestools+cli-kit-node@1.0.6_@ariestools+actor-model@1.1.0_@ariestools+sdk@8.1.6_@ope_9f318245cd6da85ed328b0e3c9d490dc/node_modules/@ariestools/cli-kit-node/dist/node/index.mjs
229372
229486
  function resolveEnvironmentValue(key, layers) {
229373
229487
  for (const layer of layers) {
229374
229488
  if (!Object.hasOwn(layer, key)) continue;
@@ -230360,16 +230474,16 @@ var import_emoji_regex = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(
230360
230474
  return /[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E-\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED8\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])))?))?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3C-\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE8A\uDE8E-\uDEC2\uDEC6\uDEC8\uDECD-\uDEDC\uDEDF-\uDEEA\uDEEF]|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g;
230361
230475
  };
230362
230476
  })))(), 1);
230363
- const segmenter = new Intl.Segmenter();
230477
+ const segmenter$1 = new Intl.Segmenter();
230364
230478
  const defaultIgnorableCodePointRegex = /^\p{Default_Ignorable_Code_Point}$/u;
230365
- function stringWidth(string, options = {}) {
230479
+ function stringWidth$1(string, options = {}) {
230366
230480
  if (typeof string !== "string" || string.length === 0) return 0;
230367
230481
  const { ambiguousIsNarrow = true, countAnsiEscapeCodes = false } = options;
230368
230482
  if (!countAnsiEscapeCodes) string = stripAnsi(string);
230369
230483
  if (string.length === 0) return 0;
230370
230484
  let width = 0;
230371
230485
  const eastAsianWidthOptions = { ambiguousAsWide: !ambiguousIsNarrow };
230372
- for (const { segment: character } of segmenter.segment(string)) {
230486
+ for (const { segment: character } of segmenter$1.segment(string)) {
230373
230487
  const codePoint = character.codePointAt(0);
230374
230488
  if (codePoint <= 31 || codePoint >= 127 && codePoint <= 159) continue;
230375
230489
  if (codePoint >= 8203 && codePoint <= 8207 || codePoint === 65279) continue;
@@ -230560,14 +230674,14 @@ const ANSI_SGR_TERMINATOR = "m";
230560
230674
  const ANSI_ESCAPE_LINK = `${ANSI_OSC}8;;`;
230561
230675
  const wrapAnsiCode = (code) => `${ESCAPES.values().next().value}${ANSI_CSI}${code}${ANSI_SGR_TERMINATOR}`;
230562
230676
  const wrapAnsiHyperlink = (url) => `${ESCAPES.values().next().value}${ANSI_ESCAPE_LINK}${url}${ANSI_ESCAPE_BELL}`;
230563
- const wordLengths = (string) => string.split(" ").map((character) => stringWidth(character));
230677
+ const wordLengths = (string) => string.split(" ").map((character) => stringWidth$1(character));
230564
230678
  const wrapWord = (rows, word, columns) => {
230565
230679
  const characters = [...word];
230566
230680
  let isInsideEscape = false;
230567
230681
  let isInsideLinkEscape = false;
230568
- let visible = stringWidth(stripAnsi(rows.at(-1)));
230682
+ let visible = stringWidth$1(stripAnsi(rows.at(-1)));
230569
230683
  for (const [index, character] of characters.entries()) {
230570
- const characterLength = stringWidth(character);
230684
+ const characterLength = stringWidth$1(character);
230571
230685
  if (visible + characterLength <= columns) rows[rows.length - 1] += character;
230572
230686
  else {
230573
230687
  rows.push(character);
@@ -230598,7 +230712,7 @@ const stringVisibleTrimSpacesRight = (string) => {
230598
230712
  const words = string.split(" ");
230599
230713
  let last = words.length;
230600
230714
  while (last > 0) {
230601
- if (stringWidth(words[last - 1]) > 0) break;
230715
+ if (stringWidth$1(words[last - 1]) > 0) break;
230602
230716
  last--;
230603
230717
  }
230604
230718
  if (last === words.length) return string;
@@ -230613,7 +230727,7 @@ const exec = (string, columns, options = {}) => {
230613
230727
  let rows = [""];
230614
230728
  for (const [index, word] of string.split(" ").entries()) {
230615
230729
  if (options.trim !== false) rows[rows.length - 1] = rows.at(-1).trimStart();
230616
- let rowLength = stringWidth(rows.at(-1));
230730
+ let rowLength = stringWidth$1(rows.at(-1));
230617
230731
  if (index !== 0) {
230618
230732
  if (rowLength >= columns && (options.wordWrap === false || options.trim === false)) {
230619
230733
  rows.push("");
@@ -230676,7 +230790,7 @@ function wrapAnsi(string, columns, options) {
230676
230790
  //#region ../../node_modules/.pnpm/cliui@9.0.1/node_modules/cliui/index.mjs
230677
230791
  function ui(opts) {
230678
230792
  return cliui(opts, {
230679
- stringWidth,
230793
+ stringWidth: stringWidth$1,
230680
230794
  stripAnsi,
230681
230795
  wrap: wrapAnsi
230682
230796
  });
@@ -231491,7 +231605,7 @@ yargsParser.camelCase = camelCase;
231491
231605
  yargsParser.decamelize = decamelize;
231492
231606
  yargsParser.looksLikeNumber = looksLikeNumber;
231493
231607
  //#endregion
231494
- //#region ../../node_modules/.pnpm/yargs@18.0.0/node_modules/yargs/build/lib/utils/process-argv.js
231608
+ //#region ../../node_modules/.pnpm/yargs@18.1.0/node_modules/yargs/build/lib/utils/process-argv.js
231495
231609
  function getProcessArgvBinIndex() {
231496
231610
  if (isBundledElectronApp()) return 0;
231497
231611
  return 1;
@@ -231509,6 +231623,116 @@ function getProcessArgvBin() {
231509
231623
  return process.argv[getProcessArgvBinIndex()];
231510
231624
  }
231511
231625
  //#endregion
231626
+ //#region ../../node_modules/.pnpm/string-width@8.2.2/node_modules/string-width/index.js
231627
+ /**
231628
+ Logic:
231629
+ - Segment graphemes to match how terminals render clusters.
231630
+ - Width rules:
231631
+ 1. Skip non-printing clusters (Default_Ignorable, Control, pure nonspacing/enclosing Mark, lone Surrogates). Tabs are ignored by design.
231632
+ 2. RGI emoji clusters (\p{RGI_Emoji}) are double-width.
231633
+ 3. Minimally-qualified/unqualified emoji clusters (ZWJ sequences with 2+ Extended_Pictographic, or keycap sequences) are double-width.
231634
+ 4. Hangul jamo collapse each standard modern Hangul L+V or L+V+T syllable piece to width 2.
231635
+ Unmatched repeated leading/vowel/trailing jamo stay additive because that matches how the terminals we target render them.
231636
+ 5. Otherwise use East Asian Width of the cluster's first visible code point, and add widths for trailing spacing marks and Halfwidth/Fullwidth Forms within the same cluster (e.g., dakuten/handakuten/prolonged sound mark).
231637
+ */
231638
+ const segmenter = new Intl.Segmenter();
231639
+ const zeroWidthClusterRegex = /^(?:\p{Default_Ignorable_Code_Point}|\p{Control}|\p{Format}|\p{Nonspacing_Mark}|\p{Enclosing_Mark}|\p{Surrogate})+$/v;
231640
+ const leadingNonPrintingRegex = /^[\p{Default_Ignorable_Code_Point}\p{Control}\p{Format}\p{Nonspacing_Mark}\p{Enclosing_Mark}\p{Surrogate}]+/v;
231641
+ const spacingMarkRegex = /\p{Spacing_Mark}/v;
231642
+ const rgiEmojiRegex = /^\p{RGI_Emoji}$/v;
231643
+ const unqualifiedKeycapRegex = /^[\d#*]\u20E3$/;
231644
+ const extendedPictographicRegex = /\p{Extended_Pictographic}/gu;
231645
+ function isDoubleWidthNonRgiEmojiSequence(segment) {
231646
+ if (segment.length > 50) return false;
231647
+ if (unqualifiedKeycapRegex.test(segment)) return true;
231648
+ if (segment.includes("‍")) {
231649
+ const pictographics = segment.match(extendedPictographicRegex);
231650
+ return pictographics !== null && pictographics.length >= 2;
231651
+ }
231652
+ return false;
231653
+ }
231654
+ function baseVisible(segment) {
231655
+ return segment.replace(leadingNonPrintingRegex, "");
231656
+ }
231657
+ function isZeroWidthCluster(segment) {
231658
+ return zeroWidthClusterRegex.test(segment);
231659
+ }
231660
+ function isHangulLeadingJamo(codePoint) {
231661
+ return codePoint >= 4352 && codePoint <= 4447 || codePoint >= 43360 && codePoint <= 43388;
231662
+ }
231663
+ function isHangulVowelJamo(codePoint) {
231664
+ return codePoint >= 4448 && codePoint <= 4519 || codePoint >= 55216 && codePoint <= 55238;
231665
+ }
231666
+ function isHangulTrailingJamo(codePoint) {
231667
+ return codePoint >= 4520 && codePoint <= 4607 || codePoint >= 55243 && codePoint <= 55291;
231668
+ }
231669
+ function isHangulJamo(codePoint) {
231670
+ return isHangulLeadingJamo(codePoint) || isHangulVowelJamo(codePoint) || isHangulTrailingJamo(codePoint);
231671
+ }
231672
+ function hangulClusterWidth(visibleSegment, eastAsianWidthOptions) {
231673
+ const codePoints = [];
231674
+ for (const character of visibleSegment) {
231675
+ if (zeroWidthClusterRegex.test(character)) continue;
231676
+ codePoints.push(character.codePointAt(0));
231677
+ }
231678
+ if (codePoints.length === 0) return;
231679
+ let width = 0;
231680
+ for (let index = 0; index < codePoints.length; index++) {
231681
+ const codePoint = codePoints[index];
231682
+ if (!isHangulJamo(codePoint)) {
231683
+ if (width === 0) return;
231684
+ for (let remaining = index; remaining < codePoints.length; remaining++) width += eastAsianWidth(codePoints[remaining], eastAsianWidthOptions);
231685
+ return width;
231686
+ }
231687
+ if (isHangulLeadingJamo(codePoint) && isHangulVowelJamo(codePoints[index + 1])) {
231688
+ width += 2;
231689
+ index += isHangulTrailingJamo(codePoints[index + 2]) ? 2 : 1;
231690
+ continue;
231691
+ }
231692
+ width += eastAsianWidth(codePoint, eastAsianWidthOptions);
231693
+ }
231694
+ return width;
231695
+ }
231696
+ function trailingWidth(visibleSegment, eastAsianWidthOptions) {
231697
+ let extra = 0;
231698
+ let first = true;
231699
+ for (const character of visibleSegment) {
231700
+ if (first) {
231701
+ first = false;
231702
+ continue;
231703
+ }
231704
+ if (spacingMarkRegex.test(character) || character >= "＀" && character <= "￯") extra += eastAsianWidth(character.codePointAt(0), eastAsianWidthOptions);
231705
+ }
231706
+ return extra;
231707
+ }
231708
+ function stringWidth(input, options = {}) {
231709
+ if (typeof input !== "string" || input.length === 0) return 0;
231710
+ const { ambiguousIsNarrow = true, countAnsiEscapeCodes = false } = options;
231711
+ let string = input;
231712
+ if (!countAnsiEscapeCodes && (string.includes("\x1B") || string.includes("›"))) string = stripAnsi(string);
231713
+ if (string.length === 0) return 0;
231714
+ if (/^[\u0020-\u007E]*$/.test(string)) return string.length;
231715
+ let width = 0;
231716
+ const eastAsianWidthOptions = { ambiguousAsWide: !ambiguousIsNarrow };
231717
+ for (const { segment } of segmenter.segment(string)) {
231718
+ if (isZeroWidthCluster(segment)) continue;
231719
+ if (rgiEmojiRegex.test(segment) || isDoubleWidthNonRgiEmojiSequence(segment)) {
231720
+ width += 2;
231721
+ continue;
231722
+ }
231723
+ const visibleSegment = baseVisible(segment);
231724
+ const hangulWidth = hangulClusterWidth(visibleSegment, eastAsianWidthOptions);
231725
+ if (hangulWidth !== void 0) {
231726
+ width += hangulWidth;
231727
+ continue;
231728
+ }
231729
+ const codePoint = visibleSegment.codePointAt(0);
231730
+ width += eastAsianWidth(codePoint, eastAsianWidthOptions);
231731
+ width += trailingWidth(visibleSegment, eastAsianWidthOptions);
231732
+ }
231733
+ return width;
231734
+ }
231735
+ //#endregion
231512
231736
  //#region ../../node_modules/.pnpm/y18n@5.0.8/node_modules/y18n/build/lib/platform-shims/node.js
231513
231737
  var node_default = {
231514
231738
  fs: {
@@ -231659,7 +231883,7 @@ const y18n = (opts) => {
231659
231883
  return y18n$1(opts, node_default);
231660
231884
  };
231661
231885
  //#endregion
231662
- //#region ../../node_modules/.pnpm/yargs@18.0.0/node_modules/yargs/lib/platform-shims/esm.mjs
231886
+ //#region ../../node_modules/.pnpm/yargs@18.1.0/node_modules/yargs/lib/platform-shims/esm.mjs
231663
231887
  var import_get_caller_file = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((exports, module) => {
231664
231888
  module.exports = function getCallerFile(position) {
231665
231889
  if (position === void 0) position = 2;
@@ -231723,7 +231947,7 @@ var esm_default = {
231723
231947
  })
231724
231948
  };
231725
231949
  //#endregion
231726
- //#region ../../node_modules/.pnpm/yargs@18.0.0/node_modules/yargs/build/lib/typings/common-types.js
231950
+ //#region ../../node_modules/.pnpm/yargs@18.1.0/node_modules/yargs/build/lib/typings/common-types.js
231727
231951
  function assertNotStrictEqual(actual, expected, shim, message) {
231728
231952
  shim.assert.notStrictEqual(actual, expected, message);
231729
231953
  }
@@ -231734,12 +231958,12 @@ function objectKeys(object) {
231734
231958
  return Object.keys(object);
231735
231959
  }
231736
231960
  //#endregion
231737
- //#region ../../node_modules/.pnpm/yargs@18.0.0/node_modules/yargs/build/lib/utils/is-promise.js
231961
+ //#region ../../node_modules/.pnpm/yargs@18.1.0/node_modules/yargs/build/lib/utils/is-promise.js
231738
231962
  function isPromise(maybePromise) {
231739
231963
  return !!maybePromise && !!maybePromise.then && typeof maybePromise.then === "function";
231740
231964
  }
231741
231965
  //#endregion
231742
- //#region ../../node_modules/.pnpm/yargs@18.0.0/node_modules/yargs/build/lib/yerror.js
231966
+ //#region ../../node_modules/.pnpm/yargs@18.1.0/node_modules/yargs/build/lib/yerror.js
231743
231967
  var YError = class YError extends Error {
231744
231968
  constructor(msg) {
231745
231969
  super(msg || "yargs error");
@@ -231748,7 +231972,7 @@ var YError = class YError extends Error {
231748
231972
  }
231749
231973
  };
231750
231974
  //#endregion
231751
- //#region ../../node_modules/.pnpm/yargs@18.0.0/node_modules/yargs/build/lib/parse-command.js
231975
+ //#region ../../node_modules/.pnpm/yargs@18.1.0/node_modules/yargs/build/lib/parse-command.js
231752
231976
  function parseCommand(cmd) {
231753
231977
  const splitCommand = cmd.replace(/\s{2,}/g, " ").split(/\s+(?![^[]*]|[^<]*>)/);
231754
231978
  const bregex = /\.*[\][<>]/g;
@@ -231775,7 +231999,7 @@ function parseCommand(cmd) {
231775
231999
  return parsedCommand;
231776
232000
  }
231777
232001
  //#endregion
231778
- //#region ../../node_modules/.pnpm/yargs@18.0.0/node_modules/yargs/build/lib/argsert.js
232002
+ //#region ../../node_modules/.pnpm/yargs@18.1.0/node_modules/yargs/build/lib/argsert.js
231779
232003
  const positionName = [
231780
232004
  "first",
231781
232005
  "second",
@@ -231832,7 +232056,7 @@ function argumentTypeError(observedType, allowedTypes, position) {
231832
232056
  throw new YError(`Invalid ${positionName[position] || "manyith"} argument. Expected ${allowedTypes.join(" or ")} but received ${observedType}.`);
231833
232057
  }
231834
232058
  //#endregion
231835
- //#region ../../node_modules/.pnpm/yargs@18.0.0/node_modules/yargs/build/lib/middleware.js
232059
+ //#region ../../node_modules/.pnpm/yargs@18.1.0/node_modules/yargs/build/lib/middleware.js
231836
232060
  var GlobalMiddleware = class {
231837
232061
  constructor(yargs) {
231838
232062
  this.globalMiddleware = [];
@@ -231908,7 +232132,7 @@ function applyMiddleware(argv, yargs, middlewares, beforeValidation) {
231908
232132
  }, argv);
231909
232133
  }
231910
232134
  //#endregion
231911
- //#region ../../node_modules/.pnpm/yargs@18.0.0/node_modules/yargs/build/lib/utils/maybe-async-result.js
232135
+ //#region ../../node_modules/.pnpm/yargs@18.1.0/node_modules/yargs/build/lib/utils/maybe-async-result.js
231912
232136
  function maybeAsyncResult(getResult, resultHandler, errorHandler = (err) => {
231913
232137
  throw err;
231914
232138
  }) {
@@ -231923,7 +232147,7 @@ function isFunction(arg) {
231923
232147
  return typeof arg === "function";
231924
232148
  }
231925
232149
  //#endregion
231926
- //#region ../../node_modules/.pnpm/yargs@18.0.0/node_modules/yargs/build/lib/command.js
232150
+ //#region ../../node_modules/.pnpm/yargs@18.1.0/node_modules/yargs/build/lib/command.js
231927
232151
  const DEFAULT_MARKER = /(^\*)|(^\$0)/;
231928
232152
  var CommandInstance = class {
231929
232153
  constructor(usage, validation, globalMiddleware, shim) {
@@ -232275,7 +232499,7 @@ function isCommandHandlerDefinition(cmd) {
232275
232499
  return typeof cmd === "object" && !Array.isArray(cmd);
232276
232500
  }
232277
232501
  //#endregion
232278
- //#region ../../node_modules/.pnpm/yargs@18.0.0/node_modules/yargs/build/lib/utils/obj-filter.js
232502
+ //#region ../../node_modules/.pnpm/yargs@18.1.0/node_modules/yargs/build/lib/utils/obj-filter.js
232279
232503
  function objFilter(original = {}, filter = () => true) {
232280
232504
  const obj = {};
232281
232505
  objectKeys(original).forEach((key) => {
@@ -232284,7 +232508,7 @@ function objFilter(original = {}, filter = () => true) {
232284
232508
  return obj;
232285
232509
  }
232286
232510
  //#endregion
232287
- //#region ../../node_modules/.pnpm/yargs@18.0.0/node_modules/yargs/build/lib/utils/set-blocking.js
232511
+ //#region ../../node_modules/.pnpm/yargs@18.1.0/node_modules/yargs/build/lib/utils/set-blocking.js
232288
232512
  function setBlocking(blocking) {
232289
232513
  if (typeof process === "undefined") return;
232290
232514
  [process.stdout, process.stderr].forEach((_stream) => {
@@ -232293,7 +232517,7 @@ function setBlocking(blocking) {
232293
232517
  });
232294
232518
  }
232295
232519
  //#endregion
232296
- //#region ../../node_modules/.pnpm/yargs@18.0.0/node_modules/yargs/build/lib/usage.js
232520
+ //#region ../../node_modules/.pnpm/yargs@18.1.0/node_modules/yargs/build/lib/usage.js
232297
232521
  function isBoolean(fail) {
232298
232522
  return typeof fail === "boolean";
232299
232523
  }
@@ -232773,7 +232997,7 @@ function getText(text) {
232773
232997
  return isIndentedText(text) ? text.text : text;
232774
232998
  }
232775
232999
  //#endregion
232776
- //#region ../../node_modules/.pnpm/yargs@18.0.0/node_modules/yargs/build/lib/completion-templates.js
233000
+ //#region ../../node_modules/.pnpm/yargs@18.1.0/node_modules/yargs/build/lib/completion-templates.js
232777
233001
  const completionShTemplate = `###-begin-{{app_name}}-completions-###
232778
233002
  #
232779
233003
  # yargs command completion script
@@ -232832,7 +233056,7 @@ fi
232832
233056
  ###-end-{{app_name}}-completions-###
232833
233057
  `;
232834
233058
  //#endregion
232835
- //#region ../../node_modules/.pnpm/yargs@18.0.0/node_modules/yargs/build/lib/completion.js
233059
+ //#region ../../node_modules/.pnpm/yargs@18.1.0/node_modules/yargs/build/lib/completion.js
232836
233060
  var Completion = class {
232837
233061
  constructor(yargs, usage, command, shim) {
232838
233062
  var _a, _b, _c;
@@ -233003,7 +233227,7 @@ function isFallbackCompletionFunction(completionFunction) {
233003
233227
  return completionFunction.length > 3;
233004
233228
  }
233005
233229
  //#endregion
233006
- //#region ../../node_modules/.pnpm/yargs@18.0.0/node_modules/yargs/build/lib/utils/levenshtein.js
233230
+ //#region ../../node_modules/.pnpm/yargs@18.1.0/node_modules/yargs/build/lib/utils/levenshtein.js
233007
233231
  function levenshtein(a, b) {
233008
233232
  if (a.length === 0) return b.length;
233009
233233
  if (b.length === 0) return a.length;
@@ -233018,7 +233242,7 @@ function levenshtein(a, b) {
233018
233242
  return matrix[b.length][a.length];
233019
233243
  }
233020
233244
  //#endregion
233021
- //#region ../../node_modules/.pnpm/yargs@18.0.0/node_modules/yargs/build/lib/validation.js
233245
+ //#region ../../node_modules/.pnpm/yargs@18.1.0/node_modules/yargs/build/lib/validation.js
233022
233246
  const specialKeys = [
233023
233247
  "$0",
233024
233248
  "--",
@@ -233221,7 +233445,7 @@ function validation(yargs, usage, shim) {
233221
233445
  return self;
233222
233446
  }
233223
233447
  //#endregion
233224
- //#region ../../node_modules/.pnpm/yargs@18.0.0/node_modules/yargs/build/lib/utils/apply-extends.js
233448
+ //#region ../../node_modules/.pnpm/yargs@18.1.0/node_modules/yargs/build/lib/utils/apply-extends.js
233225
233449
  let previouslyVisitedConfigs = [];
233226
233450
  let shim;
233227
233451
  function applyExtends(config, cwd, mergeExtends, _shim) {
@@ -233258,12 +233482,15 @@ function mergeDeep(config1, config2) {
233258
233482
  return obj && typeof obj === "object" && !Array.isArray(obj);
233259
233483
  }
233260
233484
  Object.assign(target, config1);
233261
- for (const key of Object.keys(config2)) if (isObject(config2[key]) && isObject(target[key])) target[key] = mergeDeep(config1[key], config2[key]);
233262
- else target[key] = config2[key];
233485
+ for (const key of Object.keys(config2)) {
233486
+ if (key === "__proto__") continue;
233487
+ if (isObject(config2[key]) && isObject(target[key])) target[key] = mergeDeep(config1[key], config2[key]);
233488
+ else target[key] = config2[key];
233489
+ }
233263
233490
  return target;
233264
233491
  }
233265
233492
  //#endregion
233266
- //#region ../../node_modules/.pnpm/yargs@18.0.0/node_modules/yargs/build/lib/yargs-factory.js
233493
+ //#region ../../node_modules/.pnpm/yargs@18.1.0/node_modules/yargs/build/lib/yargs-factory.js
233267
233494
  var __classPrivateFieldSet = function(receiver, state, value, kind, f) {
233268
233495
  if (kind === "m") throw new TypeError("Private method is not writable");
233269
233496
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
@@ -234212,7 +234439,7 @@ var YargsInstance = class {
234212
234439
  [kGetDollarZero]() {
234213
234440
  let $0 = "";
234214
234441
  let default$0;
234215
- if (/\b(node|iojs|electron)(\.exe)?$/.test(__classPrivateFieldGet(this, _YargsInstance_shim, "f").process.argv()[0])) default$0 = __classPrivateFieldGet(this, _YargsInstance_shim, "f").process.argv().slice(1, 2);
234442
+ if (/\b(node|iojs|electron|bun)(\.exe)?$/.test(__classPrivateFieldGet(this, _YargsInstance_shim, "f").process.argv()[0])) default$0 = __classPrivateFieldGet(this, _YargsInstance_shim, "f").process.argv().slice(1, 2);
234216
234443
  else default$0 = __classPrivateFieldGet(this, _YargsInstance_shim, "f").process.argv().slice(0, 1);
234217
234444
  $0 = default$0.map((x) => {
234218
234445
  const b = this[kRebase](__classPrivateFieldGet(this, _YargsInstance_cwd, "f"), x);
@@ -234584,10 +234811,10 @@ function isYargsInstance(y) {
234584
234811
  return !!y && typeof y.getInternalMethods === "function";
234585
234812
  }
234586
234813
  //#endregion
234587
- //#region ../../node_modules/.pnpm/yargs@18.0.0/node_modules/yargs/index.mjs
234814
+ //#region ../../node_modules/.pnpm/yargs@18.1.0/node_modules/yargs/index.mjs
234588
234815
  const Yargs = YargsFactory(esm_default);
234589
234816
  //#endregion
234590
- //#region ../../node_modules/.pnpm/@ariestools+cli-kit-yargs@1.0.5/node_modules/@ariestools/cli-kit-yargs/dist/node/index.mjs
234817
+ //#region ../../node_modules/.pnpm/@ariestools+cli-kit-yargs@1.0.6_@ariestools+actor-model@1.1.0_@ariestools+sdk@8.1.6_@op_318fdfad1e5b606a31f5008bd08b648e/node_modules/@ariestools/cli-kit-yargs/dist/node/index.mjs
234591
234818
  function camelCaseEnvironmentSegment(value) {
234592
234819
  const normalized = value !== value.toLowerCase() && value !== value.toUpperCase() ? value : value.toLowerCase();
234593
234820
  if (!normalized.includes("-") && !normalized.includes("_")) return normalized;
@@ -234665,7 +234892,7 @@ async function runYargsApplication({ configure, host, mapFailureToExitCode, onFa
234665
234892
  }
234666
234893
  }
234667
234894
  //#endregion
234668
- //#region ../../node_modules/.pnpm/@xyo-network+xl1-system-status@4.6.3_@ariestools+sdk@8.1.6_@opentelemetry+api@1.9.1_zod_92ee97d7600ada6fa126c90ce31f4ca9/node_modules/@xyo-network/xl1-system-status/dist/node/index.mjs
234895
+ //#region ../../node_modules/.pnpm/@xyo-network+xl1-system-status@4.6.4_@ariestools+sdk@8.1.6_@opentelemetry+api@1.9.1_zod_3d8efcb5cfd15ae05df10130d7210619/node_modules/@xyo-network/xl1-system-status/dist/node/index.mjs
234669
234896
  function resolveStatusProbe(status, url) {
234670
234897
  switch (url) {
234671
234898
  case "/healthz": {
@@ -235482,6 +235709,8 @@ function formatStartupBanner(version2, actors) {
235482
235709
  ""
235483
235710
  ].join("\n");
235484
235711
  }
235712
+ var DEFAULT_SHUTDOWN_TIMEOUT_MS = 15e3;
235713
+ var SHUTDOWN_TIMEOUT_ENV_VAR = "XL1_SHUTDOWN_TIMEOUT_MS";
235485
235714
  function logInterruptError(logger, ...values) {
235486
235715
  try {
235487
235716
  logger.error(...values);
@@ -235492,18 +235721,141 @@ function logInterruptInfo(logger, ...values) {
235492
235721
  logger.info(...values);
235493
235722
  } catch {}
235494
235723
  }
235495
- async function handleRuntimeInterrupt(host, logger, session) {
235496
- let exitCode = 0;
235497
- logInterruptInfo(logger, "\nShutdown requested. Attempting graceful shutdown...");
235724
+ function isCancellableProvider(value) {
235725
+ return typeof value === "object" && value !== null && "requestCancel" in value && typeof value.requestCancel === "function";
235726
+ }
235727
+ function resolveShutdownTimeoutMs(host, override) {
235728
+ if (override !== void 0) return override;
235729
+ const configured = host.environment?.[SHUTDOWN_TIMEOUT_ENV_VAR];
235730
+ if (configured === void 0 || configured === "") return DEFAULT_SHUTDOWN_TIMEOUT_MS;
235731
+ const parsed = Number(configured);
235732
+ return Number.isFinite(parsed) && parsed >= 0 ? parsed : DEFAULT_SHUTDOWN_TIMEOUT_MS;
235733
+ }
235734
+ function requestRuntimeProviderCancel(session, logger) {
235735
+ const singletons = session.locator?.context?.singletons;
235736
+ if (typeof singletons !== "object" || singletons === null) return;
235737
+ const reason = /* @__PURE__ */ new Error("XL1 runtime shutdown requested");
235738
+ for (const value of Object.values(singletons)) {
235739
+ if (isCancellableProvider(value)) {
235740
+ cancelProvider(value, reason, logger);
235741
+ continue;
235742
+ }
235743
+ Promise.resolve(value).then((resolved) => {
235744
+ if (isCancellableProvider(resolved)) cancelProvider(resolved, reason, logger);
235745
+ }, () => {});
235746
+ }
235747
+ }
235748
+ function cancelProvider(provider, reason, logger) {
235498
235749
  try {
235499
- await session.stop();
235500
- logInterruptInfo(logger, "Orchestrator stopped, exiting now.");
235501
- } catch (err) {
235502
- exitCode = 1;
235503
- logInterruptError(logger, "Error stopping orchestrator:", err);
235750
+ provider.requestCancel(reason);
235751
+ } catch (error) {
235752
+ logInterruptError(logger, "Error cancelling provider work during shutdown:", error);
235753
+ }
235754
+ }
235755
+ async function stopWithinTimeout(session, timeoutMs) {
235756
+ const stopped = session.stop().then(() => ({ kind: "stopped" }), (error) => ({
235757
+ kind: "failed",
235758
+ error
235759
+ }));
235760
+ if (timeoutMs <= 0) return await stopped;
235761
+ let timer;
235762
+ try {
235763
+ return await Promise.race([stopped, new Promise((resolve) => {
235764
+ timer = setTimeout(() => resolve({ kind: "timeout" }), timeoutMs);
235765
+ })]);
235766
+ } finally {
235767
+ clearTimeout(timer);
235768
+ }
235769
+ }
235770
+ async function handleRuntimeInterrupt(host, logger, session, options = {}) {
235771
+ const timeoutMs = resolveShutdownTimeoutMs(host, options.shutdownTimeoutMs);
235772
+ logInterruptInfo(logger, "\nShutdown requested. Attempting graceful shutdown...");
235773
+ requestRuntimeProviderCancel(session, logger);
235774
+ const outcome = await stopWithinTimeout(session, timeoutMs);
235775
+ let exitCode = 0;
235776
+ switch (outcome.kind) {
235777
+ case "stopped":
235778
+ logInterruptInfo(logger, "Orchestrator stopped, exiting now.");
235779
+ break;
235780
+ case "failed":
235781
+ exitCode = 1;
235782
+ logInterruptError(logger, "Error stopping orchestrator:", outcome.error);
235783
+ break;
235784
+ default:
235785
+ exitCode = 1;
235786
+ logInterruptError(logger, `Graceful shutdown did not finish within ${timeoutMs}ms; exiting anyway. Set ${SHUTDOWN_TIMEOUT_ENV_VAR} to allow more time.`);
235504
235787
  }
235505
235788
  await session.requestExit(host, exitCode);
235506
235789
  }
235790
+ var INTERRUPT_EXIT_CODE = 130;
235791
+ var DEFAULT_STARTUP_INTERRUPT_TIMEOUT_MS = 1e4;
235792
+ function hostLogger(host) {
235793
+ return {
235794
+ error: (...values) => host.io.error(...values),
235795
+ info: (...values) => host.io.log(...values)
235796
+ };
235797
+ }
235798
+ function installRuntimeInterruptController({ host, startupTimeoutMs = DEFAULT_STARTUP_INTERRUPT_TIMEOUT_MS }) {
235799
+ const logger = hostLogger(host);
235800
+ const abortController = new AbortController();
235801
+ let interruptCount = 0;
235802
+ let isSessionAdopted = false;
235803
+ let startupTimer;
235804
+ function forceExit() {
235805
+ clearTimeout(startupTimer);
235806
+ startupTimer = void 0;
235807
+ try {
235808
+ host.exit(INTERRUPT_EXIT_CODE);
235809
+ } catch (error) {
235810
+ logInterruptError(logger, "Error requesting immediate exit:", error);
235811
+ }
235812
+ }
235813
+ function armStartupTimer() {
235814
+ if (startupTimeoutMs <= 0 || startupTimer !== void 0) return;
235815
+ startupTimer = setTimeout(() => {
235816
+ startupTimer = void 0;
235817
+ logInterruptError(logger, `Startup did not stop within ${startupTimeoutMs}ms of the interrupt; exiting now.`);
235818
+ forceExit();
235819
+ }, startupTimeoutMs);
235820
+ startupTimer.unref?.();
235821
+ }
235822
+ function handleInterrupt() {
235823
+ interruptCount += 1;
235824
+ if (interruptCount === 1) {
235825
+ abortController.abort(/* @__PURE__ */ new Error("XL1 runtime interrupt requested"));
235826
+ if (!isSessionAdopted) {
235827
+ logInterruptInfo(logger, "\nShutdown requested during startup. Cancelling...");
235828
+ armStartupTimer();
235829
+ }
235830
+ return;
235831
+ }
235832
+ logInterruptInfo(logger, "\nSecond interrupt received. Exiting immediately.");
235833
+ forceExit();
235834
+ }
235835
+ const disposeListener = host.onInterrupt(handleInterrupt);
235836
+ return {
235837
+ get isInterrupted() {
235838
+ return interruptCount > 0;
235839
+ },
235840
+ get isSessionAdopted() {
235841
+ return isSessionAdopted;
235842
+ },
235843
+ get signal() {
235844
+ return abortController.signal;
235845
+ },
235846
+ adoptSession() {
235847
+ isSessionAdopted = true;
235848
+ if (interruptCount > 0) return;
235849
+ clearTimeout(startupTimer);
235850
+ startupTimer = void 0;
235851
+ },
235852
+ dispose() {
235853
+ clearTimeout(startupTimer);
235854
+ startupTimer = void 0;
235855
+ disposeListener();
235856
+ }
235857
+ };
235858
+ }
235507
235859
  var DEFAULT_GLOBAL_ERROR_EXIT_TIMEOUT_MS = 1e4;
235508
235860
  async function stopOrchestrator(orchestrator) {
235509
235861
  let stopError;
@@ -235731,6 +236083,7 @@ var defaultDependencies = {
235731
236083
  handleRuntimeInterrupt,
235732
236084
  initLogger,
235733
236085
  initializeResolvedWalletReport,
236086
+ installRuntimeInterruptController,
235734
236087
  splitRunConfig,
235735
236088
  stopRuntimeContext: stopXl1RuntimeContext
235736
236089
  };
@@ -235800,6 +236153,27 @@ async function createXl1RuntimeSession({ actors, configuration, fullVersion: ful
235800
236153
  ...defaultDependencies,
235801
236154
  ...dependencyOverrides
235802
236155
  };
236156
+ const interruptController = dependencies.installRuntimeInterruptController({ host });
236157
+ try {
236158
+ return await acquireXl1RuntimeSession({
236159
+ actors,
236160
+ configuration,
236161
+ dependencies,
236162
+ fullVersion: fullVersion2,
236163
+ host,
236164
+ interruptController,
236165
+ isDumpingProviders,
236166
+ isSkippingInsecureConfirm,
236167
+ version: version2
236168
+ });
236169
+ } finally {
236170
+ if (!interruptController.isSessionAdopted) interruptController.dispose();
236171
+ }
236172
+ }
236173
+ async function acquireXl1RuntimeSession({ actors, configuration, dependencies, fullVersion: fullVersion2, host, interruptController, isDumpingProviders, isSkippingInsecureConfirm, version: version2 }) {
236174
+ const throwIfInterrupted = () => {
236175
+ if (interruptController.isInterrupted) throw new Xl1RuntimeExitRequest(INTERRUPT_EXIT_CODE);
236176
+ };
235803
236177
  const { context, fullConfig, logger, requestedActors } = await prepareXl1Runtime({
235804
236178
  actors,
235805
236179
  configuration,
@@ -235810,14 +236184,17 @@ async function createXl1RuntimeSession({ actors, configuration, fullVersion: ful
235810
236184
  let session;
235811
236185
  let statusHttpPublisher;
235812
236186
  try {
236187
+ throwIfInterrupted();
235813
236188
  if (isSkippingInsecureConfirm) logger.warn("Insecure genesis reward wallet is active. Interactive confirmation skipped via --skip-insecure-confirm.");
235814
236189
  const onInsecureGenesisConfirm = isSkippingInsecureConfirm ? void 0 : async () => await promptForInsecureGenesisConfirmation(host, logger);
235815
236190
  const locator = await dependencies.buildRunLocator(context, fullConfig, onInsecureGenesisConfirm);
236191
+ throwIfInterrupted();
235816
236192
  if (isDumpingProviders) {
235817
236193
  host.io.log(dependencies.formatProviderTree(Object.fromEntries(requestedActors.map((name) => [name, locator]))));
235818
236194
  throw new Xl1RuntimeExitRequest(0);
235819
236195
  }
235820
236196
  orchestrator = await dependencies.createOrchestrator(logger);
236197
+ throwIfInterrupted();
235821
236198
  const healthCheckPort = configuration.healthCheckPort ?? DEFAULT_HEALTH_CHECK_PORT;
235822
236199
  const statusReporter = context.statusReporter;
235823
236200
  statusHttpPublisher = healthCheckPort > 0 && statusReporter !== void 0 ? dependencies.createStatusHttpPublisher(statusReporter, logger, healthCheckPort) : void 0;
@@ -235831,9 +236208,11 @@ async function createXl1RuntimeSession({ actors, configuration, fullVersion: ful
235831
236208
  session = acquiredSession;
235832
236209
  acquiredSession.armGlobalErrorHandling(host);
235833
236210
  await statusHttpPublisher?.start();
236211
+ throwIfInterrupted();
235834
236212
  acquiredSession.bindInterrupt(host, async () => {
235835
236213
  await dependencies.handleRuntimeInterrupt(host, logger, acquiredSession);
235836
236214
  });
236215
+ interruptController.adoptSession();
235837
236216
  return acquiredSession;
235838
236217
  } catch (error) {
235839
236218
  await cleanupFailedRuntimeAcquisition({
@@ -235934,8 +236313,8 @@ $0 <command> [options]`).parserConfiguration({
235934
236313
  }
235935
236314
  }).help().alias("help", "h").version(fullVersion2);
235936
236315
  }
235937
- var version = isDefined$1("4.5.5") ? "4.5.5" : "unknown";
235938
- var gitHash = isDefined$1("b522b1773") ? "b522b1773" : "";
236316
+ var version = isDefined$1("4.5.6") ? "4.5.6" : "unknown";
236317
+ var gitHash = isDefined$1("b800845e1") ? "b800845e1" : "";
235939
236318
  var fullVersion = gitHash.length > 0 ? `${version} (${gitHash})` : version;
235940
236319
  var defaultDependencies2 = {
235941
236320
  configureYargs: configureXl1Yargs,