@kanjijs/platform-hono 0.2.0-beta.55 → 0.2.0-beta.57

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +28 -26
  2. package/package.json +5 -5
package/dist/index.js CHANGED
@@ -1363,7 +1363,7 @@ class HttpException extends Error {
1363
1363
  // ../core/src/index.ts
1364
1364
  var GLOBAL_MIDDLEWARE_TOKEN = Symbol("GLOBAL_MIDDLEWARE_TOKEN");
1365
1365
 
1366
- // ../../node_modules/.bun/hono@4.11.5/node_modules/hono/dist/compose.js
1366
+ // ../../node_modules/.bun/hono@4.11.9/node_modules/hono/dist/compose.js
1367
1367
  var compose = (middleware, onError, onNotFound) => {
1368
1368
  return (context2, next) => {
1369
1369
  let index = -1;
@@ -1407,7 +1407,7 @@ var compose = (middleware, onError, onNotFound) => {
1407
1407
  };
1408
1408
  };
1409
1409
 
1410
- // ../../node_modules/.bun/hono@4.11.5/node_modules/hono/dist/http-exception.js
1410
+ // ../../node_modules/.bun/hono@4.11.9/node_modules/hono/dist/http-exception.js
1411
1411
  var HTTPException = class extends Error {
1412
1412
  res;
1413
1413
  status;
@@ -1430,10 +1430,10 @@ var HTTPException = class extends Error {
1430
1430
  }
1431
1431
  };
1432
1432
 
1433
- // ../../node_modules/.bun/hono@4.11.5/node_modules/hono/dist/request/constants.js
1433
+ // ../../node_modules/.bun/hono@4.11.9/node_modules/hono/dist/request/constants.js
1434
1434
  var GET_MATCH_RESULT = /* @__PURE__ */ Symbol();
1435
1435
 
1436
- // ../../node_modules/.bun/hono@4.11.5/node_modules/hono/dist/utils/body.js
1436
+ // ../../node_modules/.bun/hono@4.11.9/node_modules/hono/dist/utils/body.js
1437
1437
  var parseBody = async (request, options = /* @__PURE__ */ Object.create(null)) => {
1438
1438
  const { all = false, dot = false } = options;
1439
1439
  const headers = request instanceof HonoRequest ? request.raw.headers : request.headers;
@@ -1501,7 +1501,7 @@ var handleParsingNestedValues = (form, key, value) => {
1501
1501
  });
1502
1502
  };
1503
1503
 
1504
- // ../../node_modules/.bun/hono@4.11.5/node_modules/hono/dist/utils/url.js
1504
+ // ../../node_modules/.bun/hono@4.11.9/node_modules/hono/dist/utils/url.js
1505
1505
  var splitPath = (path) => {
1506
1506
  const paths = path.split("/");
1507
1507
  if (paths[0] === "") {
@@ -1576,9 +1576,11 @@ var getPath = (request) => {
1576
1576
  const charCode = url.charCodeAt(i);
1577
1577
  if (charCode === 37) {
1578
1578
  const queryIndex = url.indexOf("?", i);
1579
- const path = url.slice(start, queryIndex === -1 ? undefined : queryIndex);
1579
+ const hashIndex = url.indexOf("#", i);
1580
+ const end = queryIndex === -1 ? hashIndex === -1 ? undefined : hashIndex : hashIndex === -1 ? queryIndex : Math.min(queryIndex, hashIndex);
1581
+ const path = url.slice(start, end);
1580
1582
  return tryDecodeURI(path.includes("%25") ? path.replace(/%25/g, "%2525") : path);
1581
- } else if (charCode === 63) {
1583
+ } else if (charCode === 63 || charCode === 35) {
1582
1584
  break;
1583
1585
  }
1584
1586
  }
@@ -1699,7 +1701,7 @@ var getQueryParams = (url, key) => {
1699
1701
  };
1700
1702
  var decodeURIComponent_ = decodeURIComponent;
1701
1703
 
1702
- // ../../node_modules/.bun/hono@4.11.5/node_modules/hono/dist/request.js
1704
+ // ../../node_modules/.bun/hono@4.11.9/node_modules/hono/dist/request.js
1703
1705
  var tryDecodeURIComponent = (str) => tryDecode(str, decodeURIComponent_);
1704
1706
  var HonoRequest = class {
1705
1707
  raw;
@@ -1810,7 +1812,7 @@ var HonoRequest = class {
1810
1812
  }
1811
1813
  };
1812
1814
 
1813
- // ../../node_modules/.bun/hono@4.11.5/node_modules/hono/dist/utils/html.js
1815
+ // ../../node_modules/.bun/hono@4.11.9/node_modules/hono/dist/utils/html.js
1814
1816
  var HtmlEscapedCallbackPhase = {
1815
1817
  Stringify: 1,
1816
1818
  BeforeStream: 2,
@@ -1848,7 +1850,7 @@ var resolveCallback = async (str, phase, preserveCallbacks, context2, buffer) =>
1848
1850
  }
1849
1851
  };
1850
1852
 
1851
- // ../../node_modules/.bun/hono@4.11.5/node_modules/hono/dist/context.js
1853
+ // ../../node_modules/.bun/hono@4.11.9/node_modules/hono/dist/context.js
1852
1854
  var TEXT_PLAIN = "text/plain; charset=UTF-8";
1853
1855
  var setDefaultContentType = (contentType, headers) => {
1854
1856
  return {
@@ -2014,7 +2016,7 @@ var Context = class {
2014
2016
  };
2015
2017
  };
2016
2018
 
2017
- // ../../node_modules/.bun/hono@4.11.5/node_modules/hono/dist/router.js
2019
+ // ../../node_modules/.bun/hono@4.11.9/node_modules/hono/dist/router.js
2018
2020
  var METHOD_NAME_ALL = "ALL";
2019
2021
  var METHOD_NAME_ALL_LOWERCASE = "all";
2020
2022
  var METHODS = ["get", "post", "put", "delete", "options", "patch"];
@@ -2022,10 +2024,10 @@ var MESSAGE_MATCHER_IS_ALREADY_BUILT = "Can not add a route since the matcher is
2022
2024
  var UnsupportedPathError = class extends Error {
2023
2025
  };
2024
2026
 
2025
- // ../../node_modules/.bun/hono@4.11.5/node_modules/hono/dist/utils/constants.js
2027
+ // ../../node_modules/.bun/hono@4.11.9/node_modules/hono/dist/utils/constants.js
2026
2028
  var COMPOSED_HANDLER = "__COMPOSED_HANDLER";
2027
2029
 
2028
- // ../../node_modules/.bun/hono@4.11.5/node_modules/hono/dist/hono-base.js
2030
+ // ../../node_modules/.bun/hono@4.11.9/node_modules/hono/dist/hono-base.js
2029
2031
  var notFoundHandler = (c) => {
2030
2032
  return c.text("404 Not Found", 404);
2031
2033
  };
@@ -2244,7 +2246,7 @@ var Hono = class _Hono {
2244
2246
  };
2245
2247
  };
2246
2248
 
2247
- // ../../node_modules/.bun/hono@4.11.5/node_modules/hono/dist/router/reg-exp-router/matcher.js
2249
+ // ../../node_modules/.bun/hono@4.11.9/node_modules/hono/dist/router/reg-exp-router/matcher.js
2248
2250
  var emptyParam = [];
2249
2251
  function match(method, path) {
2250
2252
  const matchers = this.buildAllMatchers();
@@ -2265,7 +2267,7 @@ function match(method, path) {
2265
2267
  return match2(method, path);
2266
2268
  }
2267
2269
 
2268
- // ../../node_modules/.bun/hono@4.11.5/node_modules/hono/dist/router/reg-exp-router/node.js
2270
+ // ../../node_modules/.bun/hono@4.11.9/node_modules/hono/dist/router/reg-exp-router/node.js
2269
2271
  var LABEL_REG_EXP_STR = "[^/]+";
2270
2272
  var ONLY_WILDCARD_REG_EXP_STR = ".*";
2271
2273
  var TAIL_WILDCARD_REG_EXP_STR = "(?:|/.*)";
@@ -2369,7 +2371,7 @@ var Node = class _Node {
2369
2371
  }
2370
2372
  };
2371
2373
 
2372
- // ../../node_modules/.bun/hono@4.11.5/node_modules/hono/dist/router/reg-exp-router/trie.js
2374
+ // ../../node_modules/.bun/hono@4.11.9/node_modules/hono/dist/router/reg-exp-router/trie.js
2373
2375
  var Trie = class {
2374
2376
  #context = { varIndex: 0 };
2375
2377
  #root = new Node;
@@ -2425,7 +2427,7 @@ var Trie = class {
2425
2427
  }
2426
2428
  };
2427
2429
 
2428
- // ../../node_modules/.bun/hono@4.11.5/node_modules/hono/dist/router/reg-exp-router/router.js
2430
+ // ../../node_modules/.bun/hono@4.11.9/node_modules/hono/dist/router/reg-exp-router/router.js
2429
2431
  var nullMatcher = [/^$/, [], /* @__PURE__ */ Object.create(null)];
2430
2432
  var wildcardRegExpCache = /* @__PURE__ */ Object.create(null);
2431
2433
  function buildWildcardRegExp(path) {
@@ -2590,7 +2592,7 @@ var RegExpRouter = class {
2590
2592
  }
2591
2593
  };
2592
2594
 
2593
- // ../../node_modules/.bun/hono@4.11.5/node_modules/hono/dist/router/reg-exp-router/prepared-router.js
2595
+ // ../../node_modules/.bun/hono@4.11.9/node_modules/hono/dist/router/reg-exp-router/prepared-router.js
2594
2596
  var PreparedRegExpRouter = class {
2595
2597
  name = "PreparedRegExpRouter";
2596
2598
  #matchers;
@@ -2662,7 +2664,7 @@ var PreparedRegExpRouter = class {
2662
2664
  match = match;
2663
2665
  };
2664
2666
 
2665
- // ../../node_modules/.bun/hono@4.11.5/node_modules/hono/dist/router/smart-router/router.js
2667
+ // ../../node_modules/.bun/hono@4.11.9/node_modules/hono/dist/router/smart-router/router.js
2666
2668
  var SmartRouter = class {
2667
2669
  name = "SmartRouter";
2668
2670
  #routers = [];
@@ -2717,7 +2719,7 @@ var SmartRouter = class {
2717
2719
  }
2718
2720
  };
2719
2721
 
2720
- // ../../node_modules/.bun/hono@4.11.5/node_modules/hono/dist/router/trie-router/node.js
2722
+ // ../../node_modules/.bun/hono@4.11.9/node_modules/hono/dist/router/trie-router/node.js
2721
2723
  var emptyParams = /* @__PURE__ */ Object.create(null);
2722
2724
  var Node2 = class _Node2 {
2723
2725
  #methods;
@@ -2871,7 +2873,7 @@ var Node2 = class _Node2 {
2871
2873
  }
2872
2874
  };
2873
2875
 
2874
- // ../../node_modules/.bun/hono@4.11.5/node_modules/hono/dist/router/trie-router/router.js
2876
+ // ../../node_modules/.bun/hono@4.11.9/node_modules/hono/dist/router/trie-router/router.js
2875
2877
  var TrieRouter = class {
2876
2878
  name = "TrieRouter";
2877
2879
  #node;
@@ -2893,7 +2895,7 @@ var TrieRouter = class {
2893
2895
  }
2894
2896
  };
2895
2897
 
2896
- // ../../node_modules/.bun/hono@4.11.5/node_modules/hono/dist/hono.js
2898
+ // ../../node_modules/.bun/hono@4.11.9/node_modules/hono/dist/hono.js
2897
2899
  var Hono2 = class extends Hono {
2898
2900
  constructor(options = {}) {
2899
2901
  super(options);
@@ -2903,7 +2905,7 @@ var Hono2 = class extends Hono {
2903
2905
  }
2904
2906
  };
2905
2907
 
2906
- // ../../node_modules/.bun/hono@4.11.5/node_modules/hono/dist/middleware/cors/index.js
2908
+ // ../../node_modules/.bun/hono@4.11.9/node_modules/hono/dist/middleware/cors/index.js
2907
2909
  var cors = (options) => {
2908
2910
  const defaults = {
2909
2911
  origin: "*",
@@ -2988,7 +2990,7 @@ var cors = (options) => {
2988
2990
  };
2989
2991
  };
2990
2992
 
2991
- // ../../node_modules/.bun/hono@4.11.5/node_modules/hono/dist/utils/color.js
2993
+ // ../../node_modules/.bun/hono@4.11.9/node_modules/hono/dist/utils/color.js
2992
2994
  function getColorEnabled() {
2993
2995
  const { process, Deno } = globalThis;
2994
2996
  const isNoColor = typeof Deno?.noColor === "boolean" ? Deno.noColor : process !== undefined ? "NO_COLOR" in process?.env : false;
@@ -3007,7 +3009,7 @@ async function getColorEnabledAsync() {
3007
3009
  return !isNoColor;
3008
3010
  }
3009
3011
 
3010
- // ../../node_modules/.bun/hono@4.11.5/node_modules/hono/dist/middleware/logger/index.js
3012
+ // ../../node_modules/.bun/hono@4.11.9/node_modules/hono/dist/middleware/logger/index.js
3011
3013
  var humanize = (times) => {
3012
3014
  const [delimiter, separator] = [",", "."];
3013
3015
  const orderTimes = times.map((v) => v.replace(/(\d)(?=(\d\d\d)+(?!\d))/g, "$1" + delimiter));
@@ -3048,7 +3050,7 @@ var logger = (fn = console.log) => {
3048
3050
  };
3049
3051
  };
3050
3052
 
3051
- // ../../node_modules/.bun/hono@4.11.5/node_modules/hono/dist/middleware/secure-headers/secure-headers.js
3053
+ // ../../node_modules/.bun/hono@4.11.9/node_modules/hono/dist/middleware/secure-headers/secure-headers.js
3052
3054
  var HEADERS_MAP = {
3053
3055
  crossOriginEmbedderPolicy: ["Cross-Origin-Embedder-Policy", "require-corp"],
3054
3056
  crossOriginResourcePolicy: ["Cross-Origin-Resource-Policy", "same-origin"],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kanjijs/platform-hono",
3
- "version": "0.2.0-beta.55",
3
+ "version": "0.2.0-beta.57",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -13,16 +13,16 @@
13
13
  "build": "bun build src/index.ts --outdir dist --target bun && bunx tsc --emitDeclarationOnly --declaration --outDir dist -p tsconfig.build.json"
14
14
  },
15
15
  "dependencies": {
16
- "@kanjijs/common": "^0.2.0-beta.55",
17
- "@kanjijs/contracts": "^0.2.0-beta.55",
16
+ "@kanjijs/common": "^0.2.0-beta.57",
17
+ "@kanjijs/contracts": "^0.2.0-beta.57",
18
18
  "hono": "^4.0.0",
19
19
  "reflect-metadata": "^0.2.0"
20
20
  },
21
21
  "peerDependencies": {
22
- "@kanjijs/core": "^0.2.0-beta.55"
22
+ "@kanjijs/core": "^0.2.0-beta.57"
23
23
  },
24
24
  "devDependencies": {
25
25
  "bun-types": "latest",
26
- "@kanjijs/core": "^0.2.0-beta.55"
26
+ "@kanjijs/core": "^0.2.0-beta.57"
27
27
  }
28
28
  }