@cimplify/sdk 0.52.2 → 0.54.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (60) hide show
  1. package/dist/{ads-BxbWrwqp.d.mts → ads-C2c2Aald.d.mts} +1 -1
  2. package/dist/{ads-BxbWrwqp.d.ts → ads-C2c2Aald.d.ts} +1 -1
  3. package/dist/advanced.d.mts +3 -3
  4. package/dist/advanced.d.ts +3 -3
  5. package/dist/advanced.js +20 -20
  6. package/dist/advanced.mjs +1 -1
  7. package/dist/{chunk-R3F55BRN.mjs → chunk-3G4QCENX.mjs} +42 -22
  8. package/dist/{chunk-APHYBBDD.mjs → chunk-6QZQQRBB.mjs} +20 -9
  9. package/dist/{chunk-GLAVTDDE.mjs → chunk-B3Y4C4A7.mjs} +56 -53
  10. package/dist/{chunk-ROURLUXG.js → chunk-EJUKGJTZ.js} +4 -4
  11. package/dist/{chunk-Q5VGDCQF.js → chunk-HCZTBWU4.js} +42 -22
  12. package/dist/{chunk-EMS6DQIX.js → chunk-IJ32BXKZ.js} +54 -43
  13. package/dist/{chunk-VZS453ON.mjs → chunk-NEK7CVE2.mjs} +2 -2
  14. package/dist/{chunk-EQLT46ZR.js → chunk-YJLOOC3L.js} +56 -53
  15. package/dist/{client-C6J_RGlr.d.mts → client-306peWZ0.d.ts} +47 -29
  16. package/dist/{client-CX7IFIkL.d.ts → client-Bj2apl_y.d.mts} +47 -29
  17. package/dist/{client-Lt7uGLmT.d.ts → client-C2bKMy5g.d.ts} +2 -2
  18. package/dist/{client-DdefKjcs.d.mts → client-D1Gknspz.d.mts} +2 -2
  19. package/dist/{index-Bo0NjgR6.d.mts → index-D8vnKlOQ.d.mts} +4 -4
  20. package/dist/{index-BAohYhdg.d.ts → index-DIIlPUOC.d.ts} +4 -4
  21. package/dist/index.d.mts +7 -7
  22. package/dist/index.d.ts +7 -7
  23. package/dist/index.js +61 -61
  24. package/dist/index.mjs +2 -2
  25. package/dist/mock/cli.mjs +42 -22
  26. package/dist/mock/library.js +42 -22
  27. package/dist/mock/library.mjs +42 -22
  28. package/dist/mock/msw.js +42 -22
  29. package/dist/mock/msw.mjs +42 -22
  30. package/dist/{payment-_e99nSRj.d.ts → payment-DVS7ZUEp.d.mts} +2 -2
  31. package/dist/{payment-9L_-GWqQ.d.mts → payment-sn-yGL7v.d.ts} +2 -2
  32. package/dist/{price-BjehlIhG.d.mts → price-9T1Y47oS.d.ts} +2 -2
  33. package/dist/{price-CWQ5TQmk.d.ts → price-Cm0tU0V5.d.mts} +2 -2
  34. package/dist/{product-C-xLzh7Q.d.ts → product-B_kS4Oxa.d.mts} +1 -1
  35. package/dist/{product-C-xLzh7Q.d.mts → product-B_kS4Oxa.d.ts} +1 -1
  36. package/dist/react.d.mts +6 -6
  37. package/dist/react.d.ts +6 -6
  38. package/dist/react.js +16 -16
  39. package/dist/react.mjs +2 -2
  40. package/dist/{server-72rzvJ4Y.d.ts → server-BQzz921M.d.ts} +1 -1
  41. package/dist/{server-BgccqOLT.d.mts → server-D8rwqZQ6.d.mts} +1 -1
  42. package/dist/server.d.mts +39 -47
  43. package/dist/server.d.ts +39 -47
  44. package/dist/server.js +3 -89
  45. package/dist/server.mjs +3 -88
  46. package/dist/testing/msw.d.mts +2 -2
  47. package/dist/testing/msw.d.ts +2 -2
  48. package/dist/testing/msw.js +2 -2
  49. package/dist/testing/msw.mjs +1 -1
  50. package/dist/testing/suite.d.mts +6 -6
  51. package/dist/testing/suite.d.ts +6 -6
  52. package/dist/testing/suite.js +23 -23
  53. package/dist/testing/suite.mjs +4 -4
  54. package/dist/testing.d.mts +5 -5
  55. package/dist/testing.d.ts +5 -5
  56. package/dist/testing.js +79 -79
  57. package/dist/testing.mjs +5 -5
  58. package/dist/utils.d.mts +4 -4
  59. package/dist/utils.d.ts +4 -4
  60. package/package.json +1 -1
package/dist/mock/cli.mjs CHANGED
@@ -634,7 +634,7 @@ var serve = (options, listeningListener) => {
634
634
  return server;
635
635
  };
636
636
 
637
- // ../node_modules/.bun/hono@4.12.16/node_modules/hono/dist/compose.js
637
+ // ../node_modules/.bun/hono@4.12.22/node_modules/hono/dist/compose.js
638
638
  var compose = (middleware, onError, onNotFound) => {
639
639
  return (context, next) => {
640
640
  let index = -1;
@@ -678,10 +678,10 @@ var compose = (middleware, onError, onNotFound) => {
678
678
  };
679
679
  };
680
680
 
681
- // ../node_modules/.bun/hono@4.12.16/node_modules/hono/dist/request/constants.js
681
+ // ../node_modules/.bun/hono@4.12.22/node_modules/hono/dist/request/constants.js
682
682
  var GET_MATCH_RESULT = /* @__PURE__ */ Symbol();
683
683
 
684
- // ../node_modules/.bun/hono@4.12.16/node_modules/hono/dist/utils/body.js
684
+ // ../node_modules/.bun/hono@4.12.22/node_modules/hono/dist/utils/body.js
685
685
  var parseBody = async (request, options = /* @__PURE__ */ Object.create(null)) => {
686
686
  const { all = false, dot = false } = options;
687
687
  const headers = request instanceof HonoRequest ? request.raw.headers : request.headers;
@@ -752,7 +752,7 @@ var handleParsingNestedValues = (form, key, value) => {
752
752
  });
753
753
  };
754
754
 
755
- // ../node_modules/.bun/hono@4.12.16/node_modules/hono/dist/utils/url.js
755
+ // ../node_modules/.bun/hono@4.12.22/node_modules/hono/dist/utils/url.js
756
756
  var splitPath = (path) => {
757
757
  const paths = path.split("/");
758
758
  if (paths[0] === "") {
@@ -955,7 +955,7 @@ var getQueryParams = (url, key) => {
955
955
  };
956
956
  var decodeURIComponent_ = decodeURIComponent;
957
957
 
958
- // ../node_modules/.bun/hono@4.12.16/node_modules/hono/dist/request.js
958
+ // ../node_modules/.bun/hono@4.12.22/node_modules/hono/dist/request.js
959
959
  var tryDecodeURIComponent = (str) => tryDecode(str, decodeURIComponent_);
960
960
  var HonoRequest = class {
961
961
  /**
@@ -1100,6 +1100,21 @@ var HonoRequest = class {
1100
1100
  arrayBuffer() {
1101
1101
  return this.#cachedBody("arrayBuffer");
1102
1102
  }
1103
+ /**
1104
+ * `.bytes()` parses the request body as a `Uint8Array`.
1105
+ *
1106
+ * @see {@link https://hono.dev/docs/api/request#bytes}
1107
+ *
1108
+ * @example
1109
+ * ```ts
1110
+ * app.post('/entry', async (c) => {
1111
+ * const body = await c.req.bytes()
1112
+ * })
1113
+ * ```
1114
+ */
1115
+ bytes() {
1116
+ return this.#cachedBody("arrayBuffer").then((buffer) => new Uint8Array(buffer));
1117
+ }
1103
1118
  /**
1104
1119
  * Parses the request body as a `Blob`.
1105
1120
  * @example
@@ -1223,7 +1238,7 @@ var HonoRequest = class {
1223
1238
  }
1224
1239
  };
1225
1240
 
1226
- // ../node_modules/.bun/hono@4.12.16/node_modules/hono/dist/utils/html.js
1241
+ // ../node_modules/.bun/hono@4.12.22/node_modules/hono/dist/utils/html.js
1227
1242
  var HtmlEscapedCallbackPhase = {
1228
1243
  Stringify: 1};
1229
1244
  var resolveCallback = async (str, phase, preserveCallbacks, context, buffer) => {
@@ -1254,7 +1269,7 @@ var resolveCallback = async (str, phase, preserveCallbacks, context, buffer) =>
1254
1269
  }
1255
1270
  };
1256
1271
 
1257
- // ../node_modules/.bun/hono@4.12.16/node_modules/hono/dist/context.js
1272
+ // ../node_modules/.bun/hono@4.12.22/node_modules/hono/dist/context.js
1258
1273
  var TEXT_PLAIN = "text/plain; charset=UTF-8";
1259
1274
  var setDefaultContentType = (contentType, headers) => {
1260
1275
  return {
@@ -1661,7 +1676,7 @@ var Context = class {
1661
1676
  };
1662
1677
  };
1663
1678
 
1664
- // ../node_modules/.bun/hono@4.12.16/node_modules/hono/dist/router.js
1679
+ // ../node_modules/.bun/hono@4.12.22/node_modules/hono/dist/router.js
1665
1680
  var METHOD_NAME_ALL = "ALL";
1666
1681
  var METHOD_NAME_ALL_LOWERCASE = "all";
1667
1682
  var METHODS = ["get", "post", "put", "delete", "options", "patch"];
@@ -1669,10 +1684,10 @@ var MESSAGE_MATCHER_IS_ALREADY_BUILT = "Can not add a route since the matcher is
1669
1684
  var UnsupportedPathError = class extends Error {
1670
1685
  };
1671
1686
 
1672
- // ../node_modules/.bun/hono@4.12.16/node_modules/hono/dist/utils/constants.js
1687
+ // ../node_modules/.bun/hono@4.12.22/node_modules/hono/dist/utils/constants.js
1673
1688
  var COMPOSED_HANDLER = "__COMPOSED_HANDLER";
1674
1689
 
1675
- // ../node_modules/.bun/hono@4.12.16/node_modules/hono/dist/hono-base.js
1690
+ // ../node_modules/.bun/hono@4.12.22/node_modules/hono/dist/hono-base.js
1676
1691
  var notFoundHandler = (c) => {
1677
1692
  return c.text("404 Not Found", 404);
1678
1693
  };
@@ -1787,7 +1802,7 @@ var Hono = class _Hono {
1787
1802
  handler = async (c, next) => (await compose([], app.errorHandler)(c, () => r.handler(c, next))).res;
1788
1803
  handler[COMPOSED_HANDLER] = r.handler;
1789
1804
  }
1790
- subApp.#addRoute(r.method, r.path, handler);
1805
+ subApp.#addRoute(r.method, r.path, handler, r.basePath);
1791
1806
  });
1792
1807
  return this;
1793
1808
  }
@@ -1911,7 +1926,7 @@ var Hono = class _Hono {
1911
1926
  const pathPrefixLength = mergedPath === "/" ? 0 : mergedPath.length;
1912
1927
  return (request) => {
1913
1928
  const url = new URL(request.url);
1914
- url.pathname = url.pathname.slice(pathPrefixLength) || "/";
1929
+ url.pathname = this.getPath(request).slice(pathPrefixLength) || "/";
1915
1930
  return new Request(url, request);
1916
1931
  };
1917
1932
  })();
@@ -1925,10 +1940,15 @@ var Hono = class _Hono {
1925
1940
  this.#addRoute(METHOD_NAME_ALL, mergePath(path, "*"), handler);
1926
1941
  return this;
1927
1942
  }
1928
- #addRoute(method, path, handler) {
1943
+ #addRoute(method, path, handler, baseRoutePath) {
1929
1944
  method = method.toUpperCase();
1930
1945
  path = mergePath(this._basePath, path);
1931
- const r = { basePath: this._basePath, path, method, handler };
1946
+ const r = {
1947
+ basePath: baseRoutePath !== void 0 ? mergePath(this._basePath, baseRoutePath) : this._basePath,
1948
+ path,
1949
+ method,
1950
+ handler
1951
+ };
1932
1952
  this.router.add(method, path, [handler, r]);
1933
1953
  this.routes.push(r);
1934
1954
  }
@@ -2043,7 +2063,7 @@ var Hono = class _Hono {
2043
2063
  };
2044
2064
  };
2045
2065
 
2046
- // ../node_modules/.bun/hono@4.12.16/node_modules/hono/dist/router/reg-exp-router/matcher.js
2066
+ // ../node_modules/.bun/hono@4.12.22/node_modules/hono/dist/router/reg-exp-router/matcher.js
2047
2067
  var emptyParam = [];
2048
2068
  function match(method, path) {
2049
2069
  const matchers = this.buildAllMatchers();
@@ -2064,7 +2084,7 @@ function match(method, path) {
2064
2084
  return match2(method, path);
2065
2085
  }
2066
2086
 
2067
- // ../node_modules/.bun/hono@4.12.16/node_modules/hono/dist/router/reg-exp-router/node.js
2087
+ // ../node_modules/.bun/hono@4.12.22/node_modules/hono/dist/router/reg-exp-router/node.js
2068
2088
  var LABEL_REG_EXP_STR = "[^/]+";
2069
2089
  var ONLY_WILDCARD_REG_EXP_STR = ".*";
2070
2090
  var TAIL_WILDCARD_REG_EXP_STR = "(?:|/.*)";
@@ -2172,7 +2192,7 @@ var Node = class _Node {
2172
2192
  }
2173
2193
  };
2174
2194
 
2175
- // ../node_modules/.bun/hono@4.12.16/node_modules/hono/dist/router/reg-exp-router/trie.js
2195
+ // ../node_modules/.bun/hono@4.12.22/node_modules/hono/dist/router/reg-exp-router/trie.js
2176
2196
  var Trie = class {
2177
2197
  #context = { varIndex: 0 };
2178
2198
  #root = new Node();
@@ -2228,7 +2248,7 @@ var Trie = class {
2228
2248
  }
2229
2249
  };
2230
2250
 
2231
- // ../node_modules/.bun/hono@4.12.16/node_modules/hono/dist/router/reg-exp-router/router.js
2251
+ // ../node_modules/.bun/hono@4.12.22/node_modules/hono/dist/router/reg-exp-router/router.js
2232
2252
  var nullMatcher = [/^$/, [], /* @__PURE__ */ Object.create(null)];
2233
2253
  var wildcardRegExpCache = /* @__PURE__ */ Object.create(null);
2234
2254
  function buildWildcardRegExp(path) {
@@ -2406,7 +2426,7 @@ var RegExpRouter = class {
2406
2426
  }
2407
2427
  };
2408
2428
 
2409
- // ../node_modules/.bun/hono@4.12.16/node_modules/hono/dist/router/smart-router/router.js
2429
+ // ../node_modules/.bun/hono@4.12.22/node_modules/hono/dist/router/smart-router/router.js
2410
2430
  var SmartRouter = class {
2411
2431
  name = "SmartRouter";
2412
2432
  #routers = [];
@@ -2461,7 +2481,7 @@ var SmartRouter = class {
2461
2481
  }
2462
2482
  };
2463
2483
 
2464
- // ../node_modules/.bun/hono@4.12.16/node_modules/hono/dist/router/trie-router/node.js
2484
+ // ../node_modules/.bun/hono@4.12.22/node_modules/hono/dist/router/trie-router/node.js
2465
2485
  var emptyParams = /* @__PURE__ */ Object.create(null);
2466
2486
  var hasChildren = (children) => {
2467
2487
  for (const _ in children) {
@@ -2636,7 +2656,7 @@ var Node2 = class _Node2 {
2636
2656
  }
2637
2657
  };
2638
2658
 
2639
- // ../node_modules/.bun/hono@4.12.16/node_modules/hono/dist/router/trie-router/router.js
2659
+ // ../node_modules/.bun/hono@4.12.22/node_modules/hono/dist/router/trie-router/router.js
2640
2660
  var TrieRouter = class {
2641
2661
  name = "TrieRouter";
2642
2662
  #node;
@@ -2658,7 +2678,7 @@ var TrieRouter = class {
2658
2678
  }
2659
2679
  };
2660
2680
 
2661
- // ../node_modules/.bun/hono@4.12.16/node_modules/hono/dist/hono.js
2681
+ // ../node_modules/.bun/hono@4.12.22/node_modules/hono/dist/hono.js
2662
2682
  var Hono2 = class extends Hono {
2663
2683
  /**
2664
2684
  * Creates an instance of the Hono class.
@@ -2,7 +2,7 @@
2
2
 
3
3
  var crypto = require('crypto');
4
4
 
5
- // ../node_modules/.bun/hono@4.12.16/node_modules/hono/dist/compose.js
5
+ // ../node_modules/.bun/hono@4.12.22/node_modules/hono/dist/compose.js
6
6
  var compose = (middleware, onError, onNotFound) => {
7
7
  return (context, next) => {
8
8
  let index = -1;
@@ -46,10 +46,10 @@ var compose = (middleware, onError, onNotFound) => {
46
46
  };
47
47
  };
48
48
 
49
- // ../node_modules/.bun/hono@4.12.16/node_modules/hono/dist/request/constants.js
49
+ // ../node_modules/.bun/hono@4.12.22/node_modules/hono/dist/request/constants.js
50
50
  var GET_MATCH_RESULT = /* @__PURE__ */ Symbol();
51
51
 
52
- // ../node_modules/.bun/hono@4.12.16/node_modules/hono/dist/utils/body.js
52
+ // ../node_modules/.bun/hono@4.12.22/node_modules/hono/dist/utils/body.js
53
53
  var parseBody = async (request, options = /* @__PURE__ */ Object.create(null)) => {
54
54
  const { all = false, dot = false } = options;
55
55
  const headers = request instanceof HonoRequest ? request.raw.headers : request.headers;
@@ -120,7 +120,7 @@ var handleParsingNestedValues = (form, key, value) => {
120
120
  });
121
121
  };
122
122
 
123
- // ../node_modules/.bun/hono@4.12.16/node_modules/hono/dist/utils/url.js
123
+ // ../node_modules/.bun/hono@4.12.22/node_modules/hono/dist/utils/url.js
124
124
  var splitPath = (path) => {
125
125
  const paths = path.split("/");
126
126
  if (paths[0] === "") {
@@ -323,7 +323,7 @@ var getQueryParams = (url, key) => {
323
323
  };
324
324
  var decodeURIComponent_ = decodeURIComponent;
325
325
 
326
- // ../node_modules/.bun/hono@4.12.16/node_modules/hono/dist/request.js
326
+ // ../node_modules/.bun/hono@4.12.22/node_modules/hono/dist/request.js
327
327
  var tryDecodeURIComponent = (str) => tryDecode(str, decodeURIComponent_);
328
328
  var HonoRequest = class {
329
329
  /**
@@ -468,6 +468,21 @@ var HonoRequest = class {
468
468
  arrayBuffer() {
469
469
  return this.#cachedBody("arrayBuffer");
470
470
  }
471
+ /**
472
+ * `.bytes()` parses the request body as a `Uint8Array`.
473
+ *
474
+ * @see {@link https://hono.dev/docs/api/request#bytes}
475
+ *
476
+ * @example
477
+ * ```ts
478
+ * app.post('/entry', async (c) => {
479
+ * const body = await c.req.bytes()
480
+ * })
481
+ * ```
482
+ */
483
+ bytes() {
484
+ return this.#cachedBody("arrayBuffer").then((buffer) => new Uint8Array(buffer));
485
+ }
471
486
  /**
472
487
  * Parses the request body as a `Blob`.
473
488
  * @example
@@ -591,7 +606,7 @@ var HonoRequest = class {
591
606
  }
592
607
  };
593
608
 
594
- // ../node_modules/.bun/hono@4.12.16/node_modules/hono/dist/utils/html.js
609
+ // ../node_modules/.bun/hono@4.12.22/node_modules/hono/dist/utils/html.js
595
610
  var HtmlEscapedCallbackPhase = {
596
611
  Stringify: 1};
597
612
  var resolveCallback = async (str, phase, preserveCallbacks, context, buffer) => {
@@ -622,7 +637,7 @@ var resolveCallback = async (str, phase, preserveCallbacks, context, buffer) =>
622
637
  }
623
638
  };
624
639
 
625
- // ../node_modules/.bun/hono@4.12.16/node_modules/hono/dist/context.js
640
+ // ../node_modules/.bun/hono@4.12.22/node_modules/hono/dist/context.js
626
641
  var TEXT_PLAIN = "text/plain; charset=UTF-8";
627
642
  var setDefaultContentType = (contentType, headers) => {
628
643
  return {
@@ -1029,7 +1044,7 @@ var Context = class {
1029
1044
  };
1030
1045
  };
1031
1046
 
1032
- // ../node_modules/.bun/hono@4.12.16/node_modules/hono/dist/router.js
1047
+ // ../node_modules/.bun/hono@4.12.22/node_modules/hono/dist/router.js
1033
1048
  var METHOD_NAME_ALL = "ALL";
1034
1049
  var METHOD_NAME_ALL_LOWERCASE = "all";
1035
1050
  var METHODS = ["get", "post", "put", "delete", "options", "patch"];
@@ -1037,10 +1052,10 @@ var MESSAGE_MATCHER_IS_ALREADY_BUILT = "Can not add a route since the matcher is
1037
1052
  var UnsupportedPathError = class extends Error {
1038
1053
  };
1039
1054
 
1040
- // ../node_modules/.bun/hono@4.12.16/node_modules/hono/dist/utils/constants.js
1055
+ // ../node_modules/.bun/hono@4.12.22/node_modules/hono/dist/utils/constants.js
1041
1056
  var COMPOSED_HANDLER = "__COMPOSED_HANDLER";
1042
1057
 
1043
- // ../node_modules/.bun/hono@4.12.16/node_modules/hono/dist/hono-base.js
1058
+ // ../node_modules/.bun/hono@4.12.22/node_modules/hono/dist/hono-base.js
1044
1059
  var notFoundHandler = (c) => {
1045
1060
  return c.text("404 Not Found", 404);
1046
1061
  };
@@ -1155,7 +1170,7 @@ var Hono = class _Hono {
1155
1170
  handler = async (c, next) => (await compose([], app.errorHandler)(c, () => r.handler(c, next))).res;
1156
1171
  handler[COMPOSED_HANDLER] = r.handler;
1157
1172
  }
1158
- subApp.#addRoute(r.method, r.path, handler);
1173
+ subApp.#addRoute(r.method, r.path, handler, r.basePath);
1159
1174
  });
1160
1175
  return this;
1161
1176
  }
@@ -1279,7 +1294,7 @@ var Hono = class _Hono {
1279
1294
  const pathPrefixLength = mergedPath === "/" ? 0 : mergedPath.length;
1280
1295
  return (request) => {
1281
1296
  const url = new URL(request.url);
1282
- url.pathname = url.pathname.slice(pathPrefixLength) || "/";
1297
+ url.pathname = this.getPath(request).slice(pathPrefixLength) || "/";
1283
1298
  return new Request(url, request);
1284
1299
  };
1285
1300
  })();
@@ -1293,10 +1308,15 @@ var Hono = class _Hono {
1293
1308
  this.#addRoute(METHOD_NAME_ALL, mergePath(path, "*"), handler);
1294
1309
  return this;
1295
1310
  }
1296
- #addRoute(method, path, handler) {
1311
+ #addRoute(method, path, handler, baseRoutePath) {
1297
1312
  method = method.toUpperCase();
1298
1313
  path = mergePath(this._basePath, path);
1299
- const r = { basePath: this._basePath, path, method, handler };
1314
+ const r = {
1315
+ basePath: baseRoutePath !== void 0 ? mergePath(this._basePath, baseRoutePath) : this._basePath,
1316
+ path,
1317
+ method,
1318
+ handler
1319
+ };
1300
1320
  this.router.add(method, path, [handler, r]);
1301
1321
  this.routes.push(r);
1302
1322
  }
@@ -1411,7 +1431,7 @@ var Hono = class _Hono {
1411
1431
  };
1412
1432
  };
1413
1433
 
1414
- // ../node_modules/.bun/hono@4.12.16/node_modules/hono/dist/router/reg-exp-router/matcher.js
1434
+ // ../node_modules/.bun/hono@4.12.22/node_modules/hono/dist/router/reg-exp-router/matcher.js
1415
1435
  var emptyParam = [];
1416
1436
  function match(method, path) {
1417
1437
  const matchers = this.buildAllMatchers();
@@ -1432,7 +1452,7 @@ function match(method, path) {
1432
1452
  return match2(method, path);
1433
1453
  }
1434
1454
 
1435
- // ../node_modules/.bun/hono@4.12.16/node_modules/hono/dist/router/reg-exp-router/node.js
1455
+ // ../node_modules/.bun/hono@4.12.22/node_modules/hono/dist/router/reg-exp-router/node.js
1436
1456
  var LABEL_REG_EXP_STR = "[^/]+";
1437
1457
  var ONLY_WILDCARD_REG_EXP_STR = ".*";
1438
1458
  var TAIL_WILDCARD_REG_EXP_STR = "(?:|/.*)";
@@ -1540,7 +1560,7 @@ var Node = class _Node {
1540
1560
  }
1541
1561
  };
1542
1562
 
1543
- // ../node_modules/.bun/hono@4.12.16/node_modules/hono/dist/router/reg-exp-router/trie.js
1563
+ // ../node_modules/.bun/hono@4.12.22/node_modules/hono/dist/router/reg-exp-router/trie.js
1544
1564
  var Trie = class {
1545
1565
  #context = { varIndex: 0 };
1546
1566
  #root = new Node();
@@ -1596,7 +1616,7 @@ var Trie = class {
1596
1616
  }
1597
1617
  };
1598
1618
 
1599
- // ../node_modules/.bun/hono@4.12.16/node_modules/hono/dist/router/reg-exp-router/router.js
1619
+ // ../node_modules/.bun/hono@4.12.22/node_modules/hono/dist/router/reg-exp-router/router.js
1600
1620
  var nullMatcher = [/^$/, [], /* @__PURE__ */ Object.create(null)];
1601
1621
  var wildcardRegExpCache = /* @__PURE__ */ Object.create(null);
1602
1622
  function buildWildcardRegExp(path) {
@@ -1774,7 +1794,7 @@ var RegExpRouter = class {
1774
1794
  }
1775
1795
  };
1776
1796
 
1777
- // ../node_modules/.bun/hono@4.12.16/node_modules/hono/dist/router/smart-router/router.js
1797
+ // ../node_modules/.bun/hono@4.12.22/node_modules/hono/dist/router/smart-router/router.js
1778
1798
  var SmartRouter = class {
1779
1799
  name = "SmartRouter";
1780
1800
  #routers = [];
@@ -1829,7 +1849,7 @@ var SmartRouter = class {
1829
1849
  }
1830
1850
  };
1831
1851
 
1832
- // ../node_modules/.bun/hono@4.12.16/node_modules/hono/dist/router/trie-router/node.js
1852
+ // ../node_modules/.bun/hono@4.12.22/node_modules/hono/dist/router/trie-router/node.js
1833
1853
  var emptyParams = /* @__PURE__ */ Object.create(null);
1834
1854
  var hasChildren = (children) => {
1835
1855
  for (const _ in children) {
@@ -2004,7 +2024,7 @@ var Node2 = class _Node2 {
2004
2024
  }
2005
2025
  };
2006
2026
 
2007
- // ../node_modules/.bun/hono@4.12.16/node_modules/hono/dist/router/trie-router/router.js
2027
+ // ../node_modules/.bun/hono@4.12.22/node_modules/hono/dist/router/trie-router/router.js
2008
2028
  var TrieRouter = class {
2009
2029
  name = "TrieRouter";
2010
2030
  #node;
@@ -2026,7 +2046,7 @@ var TrieRouter = class {
2026
2046
  }
2027
2047
  };
2028
2048
 
2029
- // ../node_modules/.bun/hono@4.12.16/node_modules/hono/dist/hono.js
2049
+ // ../node_modules/.bun/hono@4.12.22/node_modules/hono/dist/hono.js
2030
2050
  var Hono2 = class extends Hono {
2031
2051
  /**
2032
2052
  * Creates an instance of the Hono class.
@@ -1,6 +1,6 @@
1
1
  import { createHmac } from 'crypto';
2
2
 
3
- // ../node_modules/.bun/hono@4.12.16/node_modules/hono/dist/compose.js
3
+ // ../node_modules/.bun/hono@4.12.22/node_modules/hono/dist/compose.js
4
4
  var compose = (middleware, onError, onNotFound) => {
5
5
  return (context, next) => {
6
6
  let index = -1;
@@ -44,10 +44,10 @@ var compose = (middleware, onError, onNotFound) => {
44
44
  };
45
45
  };
46
46
 
47
- // ../node_modules/.bun/hono@4.12.16/node_modules/hono/dist/request/constants.js
47
+ // ../node_modules/.bun/hono@4.12.22/node_modules/hono/dist/request/constants.js
48
48
  var GET_MATCH_RESULT = /* @__PURE__ */ Symbol();
49
49
 
50
- // ../node_modules/.bun/hono@4.12.16/node_modules/hono/dist/utils/body.js
50
+ // ../node_modules/.bun/hono@4.12.22/node_modules/hono/dist/utils/body.js
51
51
  var parseBody = async (request, options = /* @__PURE__ */ Object.create(null)) => {
52
52
  const { all = false, dot = false } = options;
53
53
  const headers = request instanceof HonoRequest ? request.raw.headers : request.headers;
@@ -118,7 +118,7 @@ var handleParsingNestedValues = (form, key, value) => {
118
118
  });
119
119
  };
120
120
 
121
- // ../node_modules/.bun/hono@4.12.16/node_modules/hono/dist/utils/url.js
121
+ // ../node_modules/.bun/hono@4.12.22/node_modules/hono/dist/utils/url.js
122
122
  var splitPath = (path) => {
123
123
  const paths = path.split("/");
124
124
  if (paths[0] === "") {
@@ -321,7 +321,7 @@ var getQueryParams = (url, key) => {
321
321
  };
322
322
  var decodeURIComponent_ = decodeURIComponent;
323
323
 
324
- // ../node_modules/.bun/hono@4.12.16/node_modules/hono/dist/request.js
324
+ // ../node_modules/.bun/hono@4.12.22/node_modules/hono/dist/request.js
325
325
  var tryDecodeURIComponent = (str) => tryDecode(str, decodeURIComponent_);
326
326
  var HonoRequest = class {
327
327
  /**
@@ -466,6 +466,21 @@ var HonoRequest = class {
466
466
  arrayBuffer() {
467
467
  return this.#cachedBody("arrayBuffer");
468
468
  }
469
+ /**
470
+ * `.bytes()` parses the request body as a `Uint8Array`.
471
+ *
472
+ * @see {@link https://hono.dev/docs/api/request#bytes}
473
+ *
474
+ * @example
475
+ * ```ts
476
+ * app.post('/entry', async (c) => {
477
+ * const body = await c.req.bytes()
478
+ * })
479
+ * ```
480
+ */
481
+ bytes() {
482
+ return this.#cachedBody("arrayBuffer").then((buffer) => new Uint8Array(buffer));
483
+ }
469
484
  /**
470
485
  * Parses the request body as a `Blob`.
471
486
  * @example
@@ -589,7 +604,7 @@ var HonoRequest = class {
589
604
  }
590
605
  };
591
606
 
592
- // ../node_modules/.bun/hono@4.12.16/node_modules/hono/dist/utils/html.js
607
+ // ../node_modules/.bun/hono@4.12.22/node_modules/hono/dist/utils/html.js
593
608
  var HtmlEscapedCallbackPhase = {
594
609
  Stringify: 1};
595
610
  var resolveCallback = async (str, phase, preserveCallbacks, context, buffer) => {
@@ -620,7 +635,7 @@ var resolveCallback = async (str, phase, preserveCallbacks, context, buffer) =>
620
635
  }
621
636
  };
622
637
 
623
- // ../node_modules/.bun/hono@4.12.16/node_modules/hono/dist/context.js
638
+ // ../node_modules/.bun/hono@4.12.22/node_modules/hono/dist/context.js
624
639
  var TEXT_PLAIN = "text/plain; charset=UTF-8";
625
640
  var setDefaultContentType = (contentType, headers) => {
626
641
  return {
@@ -1027,7 +1042,7 @@ var Context = class {
1027
1042
  };
1028
1043
  };
1029
1044
 
1030
- // ../node_modules/.bun/hono@4.12.16/node_modules/hono/dist/router.js
1045
+ // ../node_modules/.bun/hono@4.12.22/node_modules/hono/dist/router.js
1031
1046
  var METHOD_NAME_ALL = "ALL";
1032
1047
  var METHOD_NAME_ALL_LOWERCASE = "all";
1033
1048
  var METHODS = ["get", "post", "put", "delete", "options", "patch"];
@@ -1035,10 +1050,10 @@ var MESSAGE_MATCHER_IS_ALREADY_BUILT = "Can not add a route since the matcher is
1035
1050
  var UnsupportedPathError = class extends Error {
1036
1051
  };
1037
1052
 
1038
- // ../node_modules/.bun/hono@4.12.16/node_modules/hono/dist/utils/constants.js
1053
+ // ../node_modules/.bun/hono@4.12.22/node_modules/hono/dist/utils/constants.js
1039
1054
  var COMPOSED_HANDLER = "__COMPOSED_HANDLER";
1040
1055
 
1041
- // ../node_modules/.bun/hono@4.12.16/node_modules/hono/dist/hono-base.js
1056
+ // ../node_modules/.bun/hono@4.12.22/node_modules/hono/dist/hono-base.js
1042
1057
  var notFoundHandler = (c) => {
1043
1058
  return c.text("404 Not Found", 404);
1044
1059
  };
@@ -1153,7 +1168,7 @@ var Hono = class _Hono {
1153
1168
  handler = async (c, next) => (await compose([], app.errorHandler)(c, () => r.handler(c, next))).res;
1154
1169
  handler[COMPOSED_HANDLER] = r.handler;
1155
1170
  }
1156
- subApp.#addRoute(r.method, r.path, handler);
1171
+ subApp.#addRoute(r.method, r.path, handler, r.basePath);
1157
1172
  });
1158
1173
  return this;
1159
1174
  }
@@ -1277,7 +1292,7 @@ var Hono = class _Hono {
1277
1292
  const pathPrefixLength = mergedPath === "/" ? 0 : mergedPath.length;
1278
1293
  return (request) => {
1279
1294
  const url = new URL(request.url);
1280
- url.pathname = url.pathname.slice(pathPrefixLength) || "/";
1295
+ url.pathname = this.getPath(request).slice(pathPrefixLength) || "/";
1281
1296
  return new Request(url, request);
1282
1297
  };
1283
1298
  })();
@@ -1291,10 +1306,15 @@ var Hono = class _Hono {
1291
1306
  this.#addRoute(METHOD_NAME_ALL, mergePath(path, "*"), handler);
1292
1307
  return this;
1293
1308
  }
1294
- #addRoute(method, path, handler) {
1309
+ #addRoute(method, path, handler, baseRoutePath) {
1295
1310
  method = method.toUpperCase();
1296
1311
  path = mergePath(this._basePath, path);
1297
- const r = { basePath: this._basePath, path, method, handler };
1312
+ const r = {
1313
+ basePath: baseRoutePath !== void 0 ? mergePath(this._basePath, baseRoutePath) : this._basePath,
1314
+ path,
1315
+ method,
1316
+ handler
1317
+ };
1298
1318
  this.router.add(method, path, [handler, r]);
1299
1319
  this.routes.push(r);
1300
1320
  }
@@ -1409,7 +1429,7 @@ var Hono = class _Hono {
1409
1429
  };
1410
1430
  };
1411
1431
 
1412
- // ../node_modules/.bun/hono@4.12.16/node_modules/hono/dist/router/reg-exp-router/matcher.js
1432
+ // ../node_modules/.bun/hono@4.12.22/node_modules/hono/dist/router/reg-exp-router/matcher.js
1413
1433
  var emptyParam = [];
1414
1434
  function match(method, path) {
1415
1435
  const matchers = this.buildAllMatchers();
@@ -1430,7 +1450,7 @@ function match(method, path) {
1430
1450
  return match2(method, path);
1431
1451
  }
1432
1452
 
1433
- // ../node_modules/.bun/hono@4.12.16/node_modules/hono/dist/router/reg-exp-router/node.js
1453
+ // ../node_modules/.bun/hono@4.12.22/node_modules/hono/dist/router/reg-exp-router/node.js
1434
1454
  var LABEL_REG_EXP_STR = "[^/]+";
1435
1455
  var ONLY_WILDCARD_REG_EXP_STR = ".*";
1436
1456
  var TAIL_WILDCARD_REG_EXP_STR = "(?:|/.*)";
@@ -1538,7 +1558,7 @@ var Node = class _Node {
1538
1558
  }
1539
1559
  };
1540
1560
 
1541
- // ../node_modules/.bun/hono@4.12.16/node_modules/hono/dist/router/reg-exp-router/trie.js
1561
+ // ../node_modules/.bun/hono@4.12.22/node_modules/hono/dist/router/reg-exp-router/trie.js
1542
1562
  var Trie = class {
1543
1563
  #context = { varIndex: 0 };
1544
1564
  #root = new Node();
@@ -1594,7 +1614,7 @@ var Trie = class {
1594
1614
  }
1595
1615
  };
1596
1616
 
1597
- // ../node_modules/.bun/hono@4.12.16/node_modules/hono/dist/router/reg-exp-router/router.js
1617
+ // ../node_modules/.bun/hono@4.12.22/node_modules/hono/dist/router/reg-exp-router/router.js
1598
1618
  var nullMatcher = [/^$/, [], /* @__PURE__ */ Object.create(null)];
1599
1619
  var wildcardRegExpCache = /* @__PURE__ */ Object.create(null);
1600
1620
  function buildWildcardRegExp(path) {
@@ -1772,7 +1792,7 @@ var RegExpRouter = class {
1772
1792
  }
1773
1793
  };
1774
1794
 
1775
- // ../node_modules/.bun/hono@4.12.16/node_modules/hono/dist/router/smart-router/router.js
1795
+ // ../node_modules/.bun/hono@4.12.22/node_modules/hono/dist/router/smart-router/router.js
1776
1796
  var SmartRouter = class {
1777
1797
  name = "SmartRouter";
1778
1798
  #routers = [];
@@ -1827,7 +1847,7 @@ var SmartRouter = class {
1827
1847
  }
1828
1848
  };
1829
1849
 
1830
- // ../node_modules/.bun/hono@4.12.16/node_modules/hono/dist/router/trie-router/node.js
1850
+ // ../node_modules/.bun/hono@4.12.22/node_modules/hono/dist/router/trie-router/node.js
1831
1851
  var emptyParams = /* @__PURE__ */ Object.create(null);
1832
1852
  var hasChildren = (children) => {
1833
1853
  for (const _ in children) {
@@ -2002,7 +2022,7 @@ var Node2 = class _Node2 {
2002
2022
  }
2003
2023
  };
2004
2024
 
2005
- // ../node_modules/.bun/hono@4.12.16/node_modules/hono/dist/router/trie-router/router.js
2025
+ // ../node_modules/.bun/hono@4.12.22/node_modules/hono/dist/router/trie-router/router.js
2006
2026
  var TrieRouter = class {
2007
2027
  name = "TrieRouter";
2008
2028
  #node;
@@ -2024,7 +2044,7 @@ var TrieRouter = class {
2024
2044
  }
2025
2045
  };
2026
2046
 
2027
- // ../node_modules/.bun/hono@4.12.16/node_modules/hono/dist/hono.js
2047
+ // ../node_modules/.bun/hono@4.12.22/node_modules/hono/dist/hono.js
2028
2048
  var Hono2 = class extends Hono {
2029
2049
  /**
2030
2050
  * Creates an instance of the Hono class.