@kanjijs/testing 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
@@ -1378,7 +1378,7 @@ class HttpException extends Error {
1378
1378
  // ../core/src/index.ts
1379
1379
  var GLOBAL_MIDDLEWARE_TOKEN = Symbol("GLOBAL_MIDDLEWARE_TOKEN");
1380
1380
 
1381
- // ../../node_modules/.bun/hono@4.11.5/node_modules/hono/dist/compose.js
1381
+ // ../../node_modules/.bun/hono@4.11.9/node_modules/hono/dist/compose.js
1382
1382
  var compose = (middleware, onError, onNotFound) => {
1383
1383
  return (context2, next) => {
1384
1384
  let index = -1;
@@ -1422,7 +1422,7 @@ var compose = (middleware, onError, onNotFound) => {
1422
1422
  };
1423
1423
  };
1424
1424
 
1425
- // ../../node_modules/.bun/hono@4.11.5/node_modules/hono/dist/http-exception.js
1425
+ // ../../node_modules/.bun/hono@4.11.9/node_modules/hono/dist/http-exception.js
1426
1426
  var HTTPException = class extends Error {
1427
1427
  res;
1428
1428
  status;
@@ -1445,10 +1445,10 @@ var HTTPException = class extends Error {
1445
1445
  }
1446
1446
  };
1447
1447
 
1448
- // ../../node_modules/.bun/hono@4.11.5/node_modules/hono/dist/request/constants.js
1448
+ // ../../node_modules/.bun/hono@4.11.9/node_modules/hono/dist/request/constants.js
1449
1449
  var GET_MATCH_RESULT = /* @__PURE__ */ Symbol();
1450
1450
 
1451
- // ../../node_modules/.bun/hono@4.11.5/node_modules/hono/dist/utils/body.js
1451
+ // ../../node_modules/.bun/hono@4.11.9/node_modules/hono/dist/utils/body.js
1452
1452
  var parseBody = async (request, options = /* @__PURE__ */ Object.create(null)) => {
1453
1453
  const { all = false, dot = false } = options;
1454
1454
  const headers = request instanceof HonoRequest ? request.raw.headers : request.headers;
@@ -1516,7 +1516,7 @@ var handleParsingNestedValues = (form, key, value) => {
1516
1516
  });
1517
1517
  };
1518
1518
 
1519
- // ../../node_modules/.bun/hono@4.11.5/node_modules/hono/dist/utils/url.js
1519
+ // ../../node_modules/.bun/hono@4.11.9/node_modules/hono/dist/utils/url.js
1520
1520
  var splitPath = (path) => {
1521
1521
  const paths = path.split("/");
1522
1522
  if (paths[0] === "") {
@@ -1591,9 +1591,11 @@ var getPath = (request) => {
1591
1591
  const charCode = url.charCodeAt(i);
1592
1592
  if (charCode === 37) {
1593
1593
  const queryIndex = url.indexOf("?", i);
1594
- const path = url.slice(start, queryIndex === -1 ? undefined : queryIndex);
1594
+ const hashIndex = url.indexOf("#", i);
1595
+ const end = queryIndex === -1 ? hashIndex === -1 ? undefined : hashIndex : hashIndex === -1 ? queryIndex : Math.min(queryIndex, hashIndex);
1596
+ const path = url.slice(start, end);
1595
1597
  return tryDecodeURI(path.includes("%25") ? path.replace(/%25/g, "%2525") : path);
1596
- } else if (charCode === 63) {
1598
+ } else if (charCode === 63 || charCode === 35) {
1597
1599
  break;
1598
1600
  }
1599
1601
  }
@@ -1714,7 +1716,7 @@ var getQueryParams = (url, key) => {
1714
1716
  };
1715
1717
  var decodeURIComponent_ = decodeURIComponent;
1716
1718
 
1717
- // ../../node_modules/.bun/hono@4.11.5/node_modules/hono/dist/request.js
1719
+ // ../../node_modules/.bun/hono@4.11.9/node_modules/hono/dist/request.js
1718
1720
  var tryDecodeURIComponent = (str) => tryDecode(str, decodeURIComponent_);
1719
1721
  var HonoRequest = class {
1720
1722
  raw;
@@ -1825,7 +1827,7 @@ var HonoRequest = class {
1825
1827
  }
1826
1828
  };
1827
1829
 
1828
- // ../../node_modules/.bun/hono@4.11.5/node_modules/hono/dist/utils/html.js
1830
+ // ../../node_modules/.bun/hono@4.11.9/node_modules/hono/dist/utils/html.js
1829
1831
  var HtmlEscapedCallbackPhase = {
1830
1832
  Stringify: 1,
1831
1833
  BeforeStream: 2,
@@ -1863,7 +1865,7 @@ var resolveCallback = async (str, phase, preserveCallbacks, context2, buffer) =>
1863
1865
  }
1864
1866
  };
1865
1867
 
1866
- // ../../node_modules/.bun/hono@4.11.5/node_modules/hono/dist/context.js
1868
+ // ../../node_modules/.bun/hono@4.11.9/node_modules/hono/dist/context.js
1867
1869
  var TEXT_PLAIN = "text/plain; charset=UTF-8";
1868
1870
  var setDefaultContentType = (contentType, headers) => {
1869
1871
  return {
@@ -2029,7 +2031,7 @@ var Context = class {
2029
2031
  };
2030
2032
  };
2031
2033
 
2032
- // ../../node_modules/.bun/hono@4.11.5/node_modules/hono/dist/router.js
2034
+ // ../../node_modules/.bun/hono@4.11.9/node_modules/hono/dist/router.js
2033
2035
  var METHOD_NAME_ALL = "ALL";
2034
2036
  var METHOD_NAME_ALL_LOWERCASE = "all";
2035
2037
  var METHODS = ["get", "post", "put", "delete", "options", "patch"];
@@ -2037,10 +2039,10 @@ var MESSAGE_MATCHER_IS_ALREADY_BUILT = "Can not add a route since the matcher is
2037
2039
  var UnsupportedPathError = class extends Error {
2038
2040
  };
2039
2041
 
2040
- // ../../node_modules/.bun/hono@4.11.5/node_modules/hono/dist/utils/constants.js
2042
+ // ../../node_modules/.bun/hono@4.11.9/node_modules/hono/dist/utils/constants.js
2041
2043
  var COMPOSED_HANDLER = "__COMPOSED_HANDLER";
2042
2044
 
2043
- // ../../node_modules/.bun/hono@4.11.5/node_modules/hono/dist/hono-base.js
2045
+ // ../../node_modules/.bun/hono@4.11.9/node_modules/hono/dist/hono-base.js
2044
2046
  var notFoundHandler = (c) => {
2045
2047
  return c.text("404 Not Found", 404);
2046
2048
  };
@@ -2259,7 +2261,7 @@ var Hono = class _Hono {
2259
2261
  };
2260
2262
  };
2261
2263
 
2262
- // ../../node_modules/.bun/hono@4.11.5/node_modules/hono/dist/router/reg-exp-router/matcher.js
2264
+ // ../../node_modules/.bun/hono@4.11.9/node_modules/hono/dist/router/reg-exp-router/matcher.js
2263
2265
  var emptyParam = [];
2264
2266
  function match(method, path) {
2265
2267
  const matchers = this.buildAllMatchers();
@@ -2280,7 +2282,7 @@ function match(method, path) {
2280
2282
  return match2(method, path);
2281
2283
  }
2282
2284
 
2283
- // ../../node_modules/.bun/hono@4.11.5/node_modules/hono/dist/router/reg-exp-router/node.js
2285
+ // ../../node_modules/.bun/hono@4.11.9/node_modules/hono/dist/router/reg-exp-router/node.js
2284
2286
  var LABEL_REG_EXP_STR = "[^/]+";
2285
2287
  var ONLY_WILDCARD_REG_EXP_STR = ".*";
2286
2288
  var TAIL_WILDCARD_REG_EXP_STR = "(?:|/.*)";
@@ -2384,7 +2386,7 @@ var Node = class _Node {
2384
2386
  }
2385
2387
  };
2386
2388
 
2387
- // ../../node_modules/.bun/hono@4.11.5/node_modules/hono/dist/router/reg-exp-router/trie.js
2389
+ // ../../node_modules/.bun/hono@4.11.9/node_modules/hono/dist/router/reg-exp-router/trie.js
2388
2390
  var Trie = class {
2389
2391
  #context = { varIndex: 0 };
2390
2392
  #root = new Node;
@@ -2440,7 +2442,7 @@ var Trie = class {
2440
2442
  }
2441
2443
  };
2442
2444
 
2443
- // ../../node_modules/.bun/hono@4.11.5/node_modules/hono/dist/router/reg-exp-router/router.js
2445
+ // ../../node_modules/.bun/hono@4.11.9/node_modules/hono/dist/router/reg-exp-router/router.js
2444
2446
  var nullMatcher = [/^$/, [], /* @__PURE__ */ Object.create(null)];
2445
2447
  var wildcardRegExpCache = /* @__PURE__ */ Object.create(null);
2446
2448
  function buildWildcardRegExp(path) {
@@ -2605,7 +2607,7 @@ var RegExpRouter = class {
2605
2607
  }
2606
2608
  };
2607
2609
 
2608
- // ../../node_modules/.bun/hono@4.11.5/node_modules/hono/dist/router/reg-exp-router/prepared-router.js
2610
+ // ../../node_modules/.bun/hono@4.11.9/node_modules/hono/dist/router/reg-exp-router/prepared-router.js
2609
2611
  var PreparedRegExpRouter = class {
2610
2612
  name = "PreparedRegExpRouter";
2611
2613
  #matchers;
@@ -2677,7 +2679,7 @@ var PreparedRegExpRouter = class {
2677
2679
  match = match;
2678
2680
  };
2679
2681
 
2680
- // ../../node_modules/.bun/hono@4.11.5/node_modules/hono/dist/router/smart-router/router.js
2682
+ // ../../node_modules/.bun/hono@4.11.9/node_modules/hono/dist/router/smart-router/router.js
2681
2683
  var SmartRouter = class {
2682
2684
  name = "SmartRouter";
2683
2685
  #routers = [];
@@ -2732,7 +2734,7 @@ var SmartRouter = class {
2732
2734
  }
2733
2735
  };
2734
2736
 
2735
- // ../../node_modules/.bun/hono@4.11.5/node_modules/hono/dist/router/trie-router/node.js
2737
+ // ../../node_modules/.bun/hono@4.11.9/node_modules/hono/dist/router/trie-router/node.js
2736
2738
  var emptyParams = /* @__PURE__ */ Object.create(null);
2737
2739
  var Node2 = class _Node2 {
2738
2740
  #methods;
@@ -2886,7 +2888,7 @@ var Node2 = class _Node2 {
2886
2888
  }
2887
2889
  };
2888
2890
 
2889
- // ../../node_modules/.bun/hono@4.11.5/node_modules/hono/dist/router/trie-router/router.js
2891
+ // ../../node_modules/.bun/hono@4.11.9/node_modules/hono/dist/router/trie-router/router.js
2890
2892
  var TrieRouter = class {
2891
2893
  name = "TrieRouter";
2892
2894
  #node;
@@ -2908,7 +2910,7 @@ var TrieRouter = class {
2908
2910
  }
2909
2911
  };
2910
2912
 
2911
- // ../../node_modules/.bun/hono@4.11.5/node_modules/hono/dist/hono.js
2913
+ // ../../node_modules/.bun/hono@4.11.9/node_modules/hono/dist/hono.js
2912
2914
  var Hono2 = class extends Hono {
2913
2915
  constructor(options = {}) {
2914
2916
  super(options);
@@ -2918,7 +2920,7 @@ var Hono2 = class extends Hono {
2918
2920
  }
2919
2921
  };
2920
2922
 
2921
- // ../../node_modules/.bun/hono@4.11.5/node_modules/hono/dist/middleware/cors/index.js
2923
+ // ../../node_modules/.bun/hono@4.11.9/node_modules/hono/dist/middleware/cors/index.js
2922
2924
  var cors = (options) => {
2923
2925
  const defaults = {
2924
2926
  origin: "*",
@@ -3003,7 +3005,7 @@ var cors = (options) => {
3003
3005
  };
3004
3006
  };
3005
3007
 
3006
- // ../../node_modules/.bun/hono@4.11.5/node_modules/hono/dist/utils/color.js
3008
+ // ../../node_modules/.bun/hono@4.11.9/node_modules/hono/dist/utils/color.js
3007
3009
  function getColorEnabled() {
3008
3010
  const { process, Deno } = globalThis;
3009
3011
  const isNoColor = typeof Deno?.noColor === "boolean" ? Deno.noColor : process !== undefined ? "NO_COLOR" in process?.env : false;
@@ -3022,7 +3024,7 @@ async function getColorEnabledAsync() {
3022
3024
  return !isNoColor;
3023
3025
  }
3024
3026
 
3025
- // ../../node_modules/.bun/hono@4.11.5/node_modules/hono/dist/middleware/logger/index.js
3027
+ // ../../node_modules/.bun/hono@4.11.9/node_modules/hono/dist/middleware/logger/index.js
3026
3028
  var humanize = (times) => {
3027
3029
  const [delimiter, separator] = [",", "."];
3028
3030
  const orderTimes = times.map((v) => v.replace(/(\d)(?=(\d\d\d)+(?!\d))/g, "$1" + delimiter));
@@ -3063,7 +3065,7 @@ var logger = (fn = console.log) => {
3063
3065
  };
3064
3066
  };
3065
3067
 
3066
- // ../../node_modules/.bun/hono@4.11.5/node_modules/hono/dist/middleware/secure-headers/secure-headers.js
3068
+ // ../../node_modules/.bun/hono@4.11.9/node_modules/hono/dist/middleware/secure-headers/secure-headers.js
3067
3069
  var HEADERS_MAP = {
3068
3070
  crossOriginEmbedderPolicy: ["Cross-Origin-Embedder-Policy", "require-corp"],
3069
3071
  crossOriginResourcePolicy: ["Cross-Origin-Resource-Policy", "same-origin"],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kanjijs/testing",
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,12 +13,12 @@
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
  "peerDependencies": {
16
- "@kanjijs/core": "^0.2.0-beta.55",
17
- "@kanjijs/platform-hono": "^0.2.0-beta.55"
16
+ "@kanjijs/core": "^0.2.0-beta.57",
17
+ "@kanjijs/platform-hono": "^0.2.0-beta.57"
18
18
  },
19
19
  "devDependencies": {
20
- "@kanjijs/core": "^0.2.0-beta.55",
21
- "@kanjijs/platform-hono": "^0.2.0-beta.55",
20
+ "@kanjijs/core": "^0.2.0-beta.57",
21
+ "@kanjijs/platform-hono": "^0.2.0-beta.57",
22
22
  "hono": "^4.0.0"
23
23
  },
24
24
  "dependencies": {