@t2000/cli 0.22.21 → 0.22.23

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 (43) hide show
  1. package/dist/{ccip-3TXHQUZ5.js → ccip-JEEJV65M.js} +3 -3
  2. package/dist/{chunk-3W7OQGNS.js → chunk-3XUF7GM3.js} +21 -42
  3. package/dist/chunk-3XUF7GM3.js.map +1 -0
  4. package/dist/chunk-77SWBATH.js +204 -0
  5. package/dist/chunk-77SWBATH.js.map +1 -0
  6. package/dist/{chunk-ML6HST4W.js → chunk-A5X4KG7U.js} +1878 -341
  7. package/dist/chunk-A5X4KG7U.js.map +1 -0
  8. package/dist/{chunk-VREOXJUB.js → chunk-EEPD7SHV.js} +15455 -14941
  9. package/dist/chunk-EEPD7SHV.js.map +1 -0
  10. package/dist/chunk-KHIL2KNW.js +4016 -0
  11. package/dist/chunk-KHIL2KNW.js.map +1 -0
  12. package/dist/{chunk-ZNF5QSAT.js → chunk-RN7Z6TWD.js} +33444 -24623
  13. package/dist/chunk-RN7Z6TWD.js.map +1 -0
  14. package/dist/{chunk-AB65Y674.js → chunk-V7PXDEKG.js} +2 -2
  15. package/dist/chunk-V7PXDEKG.js.map +1 -0
  16. package/dist/client-I4SGZLVD.js +746 -0
  17. package/dist/client-I4SGZLVD.js.map +1 -0
  18. package/dist/{client-SYS6Z5RX.js → client-R3NRAXMD.js} +5715 -2933
  19. package/dist/client-R3NRAXMD.js.map +1 -0
  20. package/dist/{dist-73ESA7QZ.js → dist-FDS4MNUV.js} +135 -4160
  21. package/dist/dist-FDS4MNUV.js.map +1 -0
  22. package/dist/{dist-IANNA5N7.js → dist-G5YKLWC5.js} +5 -5
  23. package/dist/{esm-IQVNJILX.js → esm-QBJBHFZA.js} +11 -11
  24. package/dist/esm-QBJBHFZA.js.map +1 -0
  25. package/dist/index.js +48 -36
  26. package/dist/index.js.map +1 -1
  27. package/package.json +4 -4
  28. package/dist/chunk-3W7OQGNS.js.map +0 -1
  29. package/dist/chunk-AB65Y674.js.map +0 -1
  30. package/dist/chunk-H66DC3S3.js +0 -1908
  31. package/dist/chunk-H66DC3S3.js.map +0 -1
  32. package/dist/chunk-IHPSFXUW.js +0 -5002
  33. package/dist/chunk-IHPSFXUW.js.map +0 -1
  34. package/dist/chunk-ML6HST4W.js.map +0 -1
  35. package/dist/chunk-VREOXJUB.js.map +0 -1
  36. package/dist/chunk-ZNF5QSAT.js.map +0 -1
  37. package/dist/client-4DBCJNJO.js +0 -117
  38. package/dist/client-4DBCJNJO.js.map +0 -1
  39. package/dist/client-SYS6Z5RX.js.map +0 -1
  40. package/dist/dist-73ESA7QZ.js.map +0 -1
  41. package/dist/esm-IQVNJILX.js.map +0 -1
  42. /package/dist/{ccip-3TXHQUZ5.js.map → ccip-JEEJV65M.js.map} +0 -0
  43. /package/dist/{dist-IANNA5N7.js.map → dist-G5YKLWC5.js.map} +0 -0
package/dist/index.js CHANGED
@@ -20,10 +20,10 @@ import {
20
20
  saveKey,
21
21
  truncateAddress,
22
22
  walletExists
23
- } from "./chunk-ZNF5QSAT.js";
24
- import "./chunk-AB65Y674.js";
25
- import "./chunk-IHPSFXUW.js";
26
- import "./chunk-3W7OQGNS.js";
23
+ } from "./chunk-RN7Z6TWD.js";
24
+ import "./chunk-V7PXDEKG.js";
25
+ import "./chunk-KHIL2KNW.js";
26
+ import "./chunk-3XUF7GM3.js";
27
27
  import {
28
28
  __commonJS,
29
29
  __require,
@@ -4471,17 +4471,23 @@ function getNestedValue(obj, path) {
4471
4471
  }
4472
4472
  return current;
4473
4473
  }
4474
+ var UNSAFE_KEYS = /* @__PURE__ */ new Set(["__proto__", "constructor", "prototype"]);
4474
4475
  function setNestedValue(obj, path, value) {
4475
4476
  const parts = path.split(".");
4477
+ if (parts.some((p) => UNSAFE_KEYS.has(p))) return;
4478
+ const sanitized = parts.map((p) => p.replace(/[^a-zA-Z0-9_]/g, ""));
4476
4479
  let current = obj;
4477
- for (let i = 0; i < parts.length - 1; i++) {
4478
- const part = parts[i];
4479
- if (!(part in current) || typeof current[part] !== "object" || current[part] === null) {
4480
+ for (let i = 0; i < sanitized.length - 1; i++) {
4481
+ const part = sanitized[i];
4482
+ if (!part) return;
4483
+ if (!Object.hasOwn(current, part) || typeof current[part] !== "object" || current[part] === null) {
4480
4484
  current[part] = {};
4481
4485
  }
4482
4486
  current = current[part];
4483
4487
  }
4484
- current[parts[parts.length - 1]] = value;
4488
+ const key = sanitized[sanitized.length - 1];
4489
+ if (!key) return;
4490
+ current[key] = value;
4485
4491
  }
4486
4492
  function loadConfig() {
4487
4493
  try {
@@ -4607,7 +4613,7 @@ function registerConfig(program3) {
4607
4613
  });
4608
4614
  }
4609
4615
 
4610
- // ../../node_modules/.pnpm/@hono+node-server@1.19.11_hono@4.12.5/node_modules/@hono/node-server/dist/index.mjs
4616
+ // ../../node_modules/.pnpm/@hono+node-server@1.19.11_hono@4.12.9/node_modules/@hono/node-server/dist/index.mjs
4611
4617
  import { createServer as createServerHTTP } from "http";
4612
4618
  import { Http2ServerRequest as Http2ServerRequest2 } from "http2";
4613
4619
  import { Http2ServerRequest } from "http2";
@@ -5178,7 +5184,7 @@ var serve = (options, listeningListener) => {
5178
5184
  return server;
5179
5185
  };
5180
5186
 
5181
- // ../../node_modules/.pnpm/hono@4.12.5/node_modules/hono/dist/compose.js
5187
+ // ../../node_modules/.pnpm/hono@4.12.9/node_modules/hono/dist/compose.js
5182
5188
  var compose = (middleware, onError, onNotFound) => {
5183
5189
  return (context, next) => {
5184
5190
  let index = -1;
@@ -5222,10 +5228,10 @@ var compose = (middleware, onError, onNotFound) => {
5222
5228
  };
5223
5229
  };
5224
5230
 
5225
- // ../../node_modules/.pnpm/hono@4.12.5/node_modules/hono/dist/request/constants.js
5231
+ // ../../node_modules/.pnpm/hono@4.12.9/node_modules/hono/dist/request/constants.js
5226
5232
  var GET_MATCH_RESULT = /* @__PURE__ */ Symbol();
5227
5233
 
5228
- // ../../node_modules/.pnpm/hono@4.12.5/node_modules/hono/dist/utils/body.js
5234
+ // ../../node_modules/.pnpm/hono@4.12.9/node_modules/hono/dist/utils/body.js
5229
5235
  var parseBody = async (request, options = /* @__PURE__ */ Object.create(null)) => {
5230
5236
  const { all = false, dot = false } = options;
5231
5237
  const headers = request instanceof HonoRequest ? request.raw.headers : request.headers;
@@ -5280,6 +5286,9 @@ var handleParsingAllValues = (form, key, value) => {
5280
5286
  }
5281
5287
  };
5282
5288
  var handleParsingNestedValues = (form, key, value) => {
5289
+ if (/(?:^|\.)__proto__\./.test(key)) {
5290
+ return;
5291
+ }
5283
5292
  let nestedForm = form;
5284
5293
  const keys = key.split(".");
5285
5294
  keys.forEach((key2, index) => {
@@ -5294,7 +5303,7 @@ var handleParsingNestedValues = (form, key, value) => {
5294
5303
  });
5295
5304
  };
5296
5305
 
5297
- // ../../node_modules/.pnpm/hono@4.12.5/node_modules/hono/dist/utils/url.js
5306
+ // ../../node_modules/.pnpm/hono@4.12.9/node_modules/hono/dist/utils/url.js
5298
5307
  var splitPath = (path) => {
5299
5308
  const paths = path.split("/");
5300
5309
  if (paths[0] === "") {
@@ -5498,7 +5507,7 @@ var getQueryParams = (url, key) => {
5498
5507
  };
5499
5508
  var decodeURIComponent_ = decodeURIComponent;
5500
5509
 
5501
- // ../../node_modules/.pnpm/hono@4.12.5/node_modules/hono/dist/request.js
5510
+ // ../../node_modules/.pnpm/hono@4.12.9/node_modules/hono/dist/request.js
5502
5511
  var tryDecodeURIComponent = (str) => tryDecode(str, decodeURIComponent_);
5503
5512
  var HonoRequest = class {
5504
5513
  /**
@@ -5579,7 +5588,7 @@ var HonoRequest = class {
5579
5588
  return headerData;
5580
5589
  }
5581
5590
  async parseBody(options) {
5582
- return this.bodyCache.parsedBody ??= await parseBody(this, options);
5591
+ return parseBody(this, options);
5583
5592
  }
5584
5593
  #cachedBody = (key) => {
5585
5594
  const { bodyCache, raw: raw2 } = this;
@@ -5766,7 +5775,7 @@ var HonoRequest = class {
5766
5775
  }
5767
5776
  };
5768
5777
 
5769
- // ../../node_modules/.pnpm/hono@4.12.5/node_modules/hono/dist/utils/html.js
5778
+ // ../../node_modules/.pnpm/hono@4.12.9/node_modules/hono/dist/utils/html.js
5770
5779
  var HtmlEscapedCallbackPhase = {
5771
5780
  Stringify: 1,
5772
5781
  BeforeStream: 2,
@@ -5808,7 +5817,7 @@ var resolveCallback = async (str, phase, preserveCallbacks, context, buffer) =>
5808
5817
  }
5809
5818
  };
5810
5819
 
5811
- // ../../node_modules/.pnpm/hono@4.12.5/node_modules/hono/dist/context.js
5820
+ // ../../node_modules/.pnpm/hono@4.12.9/node_modules/hono/dist/context.js
5812
5821
  var TEXT_PLAIN = "text/plain; charset=UTF-8";
5813
5822
  var setDefaultContentType = (contentType, headers) => {
5814
5823
  return {
@@ -6215,7 +6224,7 @@ var Context = class {
6215
6224
  };
6216
6225
  };
6217
6226
 
6218
- // ../../node_modules/.pnpm/hono@4.12.5/node_modules/hono/dist/router.js
6227
+ // ../../node_modules/.pnpm/hono@4.12.9/node_modules/hono/dist/router.js
6219
6228
  var METHOD_NAME_ALL = "ALL";
6220
6229
  var METHOD_NAME_ALL_LOWERCASE = "all";
6221
6230
  var METHODS = ["get", "post", "put", "delete", "options", "patch"];
@@ -6223,10 +6232,10 @@ var MESSAGE_MATCHER_IS_ALREADY_BUILT = "Can not add a route since the matcher is
6223
6232
  var UnsupportedPathError = class extends Error {
6224
6233
  };
6225
6234
 
6226
- // ../../node_modules/.pnpm/hono@4.12.5/node_modules/hono/dist/utils/constants.js
6235
+ // ../../node_modules/.pnpm/hono@4.12.9/node_modules/hono/dist/utils/constants.js
6227
6236
  var COMPOSED_HANDLER = "__COMPOSED_HANDLER";
6228
6237
 
6229
- // ../../node_modules/.pnpm/hono@4.12.5/node_modules/hono/dist/hono-base.js
6238
+ // ../../node_modules/.pnpm/hono@4.12.9/node_modules/hono/dist/hono-base.js
6230
6239
  var notFoundHandler = (c) => {
6231
6240
  return c.text("404 Not Found", 404);
6232
6241
  };
@@ -6597,7 +6606,7 @@ var Hono = class _Hono {
6597
6606
  };
6598
6607
  };
6599
6608
 
6600
- // ../../node_modules/.pnpm/hono@4.12.5/node_modules/hono/dist/router/reg-exp-router/matcher.js
6609
+ // ../../node_modules/.pnpm/hono@4.12.9/node_modules/hono/dist/router/reg-exp-router/matcher.js
6601
6610
  var emptyParam = [];
6602
6611
  function match(method, path) {
6603
6612
  const matchers = this.buildAllMatchers();
@@ -6618,7 +6627,7 @@ function match(method, path) {
6618
6627
  return match2(method, path);
6619
6628
  }
6620
6629
 
6621
- // ../../node_modules/.pnpm/hono@4.12.5/node_modules/hono/dist/router/reg-exp-router/node.js
6630
+ // ../../node_modules/.pnpm/hono@4.12.9/node_modules/hono/dist/router/reg-exp-router/node.js
6622
6631
  var LABEL_REG_EXP_STR = "[^/]+";
6623
6632
  var ONLY_WILDCARD_REG_EXP_STR = ".*";
6624
6633
  var TAIL_WILDCARD_REG_EXP_STR = "(?:|/.*)";
@@ -6726,7 +6735,7 @@ var Node = class _Node {
6726
6735
  }
6727
6736
  };
6728
6737
 
6729
- // ../../node_modules/.pnpm/hono@4.12.5/node_modules/hono/dist/router/reg-exp-router/trie.js
6738
+ // ../../node_modules/.pnpm/hono@4.12.9/node_modules/hono/dist/router/reg-exp-router/trie.js
6730
6739
  var Trie = class {
6731
6740
  #context = { varIndex: 0 };
6732
6741
  #root = new Node();
@@ -6782,7 +6791,7 @@ var Trie = class {
6782
6791
  }
6783
6792
  };
6784
6793
 
6785
- // ../../node_modules/.pnpm/hono@4.12.5/node_modules/hono/dist/router/reg-exp-router/router.js
6794
+ // ../../node_modules/.pnpm/hono@4.12.9/node_modules/hono/dist/router/reg-exp-router/router.js
6786
6795
  var nullMatcher = [/^$/, [], /* @__PURE__ */ Object.create(null)];
6787
6796
  var wildcardRegExpCache = /* @__PURE__ */ Object.create(null);
6788
6797
  function buildWildcardRegExp(path) {
@@ -6961,7 +6970,7 @@ var RegExpRouter = class {
6961
6970
  }
6962
6971
  };
6963
6972
 
6964
- // ../../node_modules/.pnpm/hono@4.12.5/node_modules/hono/dist/router/smart-router/router.js
6973
+ // ../../node_modules/.pnpm/hono@4.12.9/node_modules/hono/dist/router/smart-router/router.js
6965
6974
  var SmartRouter = class {
6966
6975
  name = "SmartRouter";
6967
6976
  #routers = [];
@@ -7016,7 +7025,7 @@ var SmartRouter = class {
7016
7025
  }
7017
7026
  };
7018
7027
 
7019
- // ../../node_modules/.pnpm/hono@4.12.5/node_modules/hono/dist/router/trie-router/node.js
7028
+ // ../../node_modules/.pnpm/hono@4.12.9/node_modules/hono/dist/router/trie-router/node.js
7020
7029
  var emptyParams = /* @__PURE__ */ Object.create(null);
7021
7030
  var hasChildren = (children) => {
7022
7031
  for (const _ in children) {
@@ -7191,7 +7200,7 @@ var Node2 = class _Node2 {
7191
7200
  }
7192
7201
  };
7193
7202
 
7194
- // ../../node_modules/.pnpm/hono@4.12.5/node_modules/hono/dist/router/trie-router/router.js
7203
+ // ../../node_modules/.pnpm/hono@4.12.9/node_modules/hono/dist/router/trie-router/router.js
7195
7204
  var TrieRouter = class {
7196
7205
  name = "TrieRouter";
7197
7206
  #node;
@@ -7213,7 +7222,7 @@ var TrieRouter = class {
7213
7222
  }
7214
7223
  };
7215
7224
 
7216
- // ../../node_modules/.pnpm/hono@4.12.5/node_modules/hono/dist/hono.js
7225
+ // ../../node_modules/.pnpm/hono@4.12.9/node_modules/hono/dist/hono.js
7217
7226
  var Hono2 = class extends Hono {
7218
7227
  /**
7219
7228
  * Creates an instance of the Hono class.
@@ -7228,7 +7237,7 @@ var Hono2 = class extends Hono {
7228
7237
  }
7229
7238
  };
7230
7239
 
7231
- // ../../node_modules/.pnpm/hono@4.12.5/node_modules/hono/dist/middleware/cors/index.js
7240
+ // ../../node_modules/.pnpm/hono@4.12.9/node_modules/hono/dist/middleware/cors/index.js
7232
7241
  var cors = (options) => {
7233
7242
  const defaults = {
7234
7243
  origin: "*",
@@ -7243,6 +7252,9 @@ var cors = (options) => {
7243
7252
  const findAllowOrigin = ((optsOrigin) => {
7244
7253
  if (typeof optsOrigin === "string") {
7245
7254
  if (optsOrigin === "*") {
7255
+ if (opts.credentials) {
7256
+ return (origin) => origin || null;
7257
+ }
7246
7258
  return () => optsOrigin;
7247
7259
  } else {
7248
7260
  return (origin) => optsOrigin === origin ? origin : null;
@@ -7277,7 +7289,7 @@ var cors = (options) => {
7277
7289
  set("Access-Control-Expose-Headers", opts.exposeHeaders.join(","));
7278
7290
  }
7279
7291
  if (c.req.method === "OPTIONS") {
7280
- if (opts.origin !== "*") {
7292
+ if (opts.origin !== "*" || opts.credentials) {
7281
7293
  set("Vary", "Origin");
7282
7294
  }
7283
7295
  if (opts.maxAge != null) {
@@ -7307,7 +7319,7 @@ var cors = (options) => {
7307
7319
  });
7308
7320
  }
7309
7321
  await next();
7310
- if (opts.origin !== "*") {
7322
+ if (opts.origin !== "*" || opts.credentials) {
7311
7323
  c.header("Vary", "Origin", { append: true });
7312
7324
  }
7313
7325
  };
@@ -7319,7 +7331,7 @@ import { readFileSync as readFileSync3, writeFileSync as writeFileSync3, mkdirSy
7319
7331
  import { join as join3 } from "path";
7320
7332
  import { homedir as homedir5 } from "os";
7321
7333
 
7322
- // ../../node_modules/.pnpm/hono@4.12.5/node_modules/hono/dist/utils/stream.js
7334
+ // ../../node_modules/.pnpm/hono@4.12.9/node_modules/hono/dist/utils/stream.js
7323
7335
  var StreamingApi = class {
7324
7336
  writer;
7325
7337
  encoder;
@@ -7396,7 +7408,7 @@ var StreamingApi = class {
7396
7408
  }
7397
7409
  };
7398
7410
 
7399
- // ../../node_modules/.pnpm/hono@4.12.5/node_modules/hono/dist/helper/streaming/utils.js
7411
+ // ../../node_modules/.pnpm/hono@4.12.9/node_modules/hono/dist/helper/streaming/utils.js
7400
7412
  var isOldBunVersion = () => {
7401
7413
  const version = typeof Bun !== "undefined" ? Bun.version : void 0;
7402
7414
  if (version === void 0) {
@@ -7407,7 +7419,7 @@ var isOldBunVersion = () => {
7407
7419
  return result;
7408
7420
  };
7409
7421
 
7410
- // ../../node_modules/.pnpm/hono@4.12.5/node_modules/hono/dist/helper/streaming/sse.js
7422
+ // ../../node_modules/.pnpm/hono@4.12.9/node_modules/hono/dist/helper/streaming/sse.js
7411
7423
  var SSEStreamingApi = class extends StreamingApi {
7412
7424
  constructor(writable, readable) {
7413
7425
  super(writable, readable);
@@ -7860,7 +7872,7 @@ function registerLock(program3) {
7860
7872
  });
7861
7873
  program3.command("unlock").description("Unlock agent \u2014 resume operations").action(async () => {
7862
7874
  try {
7863
- const { T2000: T20003 } = await import("./dist-IANNA5N7.js");
7875
+ const { T2000: T20003 } = await import("./dist-G5YKLWC5.js");
7864
7876
  const MAX_ATTEMPTS2 = 3;
7865
7877
  let pin;
7866
7878
  for (let attempt = 1; attempt <= MAX_ATTEMPTS2; attempt++) {
@@ -8494,7 +8506,7 @@ function registerMcp(program3) {
8494
8506
  mcp.command("start", { isDefault: true }).description("Start MCP server (stdio transport)").option("--key <path>", "Key file path").action(async (opts) => {
8495
8507
  let mod;
8496
8508
  try {
8497
- mod = await import("./dist-73ESA7QZ.js");
8509
+ mod = await import("./dist-FDS4MNUV.js");
8498
8510
  } catch {
8499
8511
  console.error(
8500
8512
  "MCP server not installed. Run:\n npm install -g @t2000/mcp"