@adonisjs/http-server 8.0.0 → 8.1.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.
@@ -1 +0,0 @@
1
- export {};
@@ -1,618 +0,0 @@
1
- import { parseRoute } from "./src/helpers.js";
2
- import { createRequire } from "node:module";
3
- import { InvalidArgumentsException, RuntimeException } from "@poppinss/utils/exception";
4
- import { debuglog } from "node:util";
5
- import string from "@poppinss/utils/string";
6
- import { moduleCaller, moduleImporter } from "@adonisjs/fold";
7
- import Cache from "tmp-cache";
8
- import Macroable from "@poppinss/macroable";
9
- import is from "@sindresorhus/is";
10
- import Middleware from "@poppinss/middleware";
11
- import diagnostics_channel from "node:diagnostics_channel";
12
- import StringBuilder from "@poppinss/utils/string_builder";
13
- var __create = Object.create;
14
- var __defProp = Object.defineProperty;
15
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
16
- var __getOwnPropNames = Object.getOwnPropertyNames;
17
- var __getProtoOf = Object.getPrototypeOf;
18
- var __hasOwnProp = Object.prototype.hasOwnProperty;
19
- var __commonJSMin = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
20
- var __exportAll = (all, no_symbols) => {
21
- let target = {};
22
- for (var name in all) __defProp(target, name, {
23
- get: all[name],
24
- enumerable: true
25
- });
26
- if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
27
- return target;
28
- };
29
- var __copyProps = (to, from, except, desc) => {
30
- if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
31
- key = keys[i];
32
- if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
33
- get: ((k) => from[k]).bind(null, key),
34
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
35
- });
36
- }
37
- return to;
38
- };
39
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
40
- value: mod,
41
- enumerable: true
42
- }) : target, mod));
43
- var __require = /* @__PURE__ */ createRequire(import.meta.url);
44
- var debug_default = debuglog("adonisjs:http");
45
- function canWriteResponseBody(value, ctx) {
46
- return value !== void 0 && !ctx.response.hasLazyBody && value !== ctx.response;
47
- }
48
- function useReturnValue(ctx) {
49
- return function(value) {
50
- if (canWriteResponseBody(value, ctx)) ctx.response.send(value);
51
- };
52
- }
53
- var tracing_channels_exports = /* @__PURE__ */ __exportAll({
54
- httpExceptionHandler: () => httpExceptionHandler,
55
- httpMiddleware: () => httpMiddleware,
56
- httpRequest: () => httpRequest,
57
- httpResponseSerializer: () => httpResponseSerializer,
58
- httpRouteHandler: () => httpRouteHandler
59
- });
60
- const httpRequest = diagnostics_channel.tracingChannel("adonisjs.http.request");
61
- const httpMiddleware = diagnostics_channel.tracingChannel("adonisjs.http.middleware");
62
- const httpExceptionHandler = diagnostics_channel.tracingChannel("adonisjs.http.exception.handler");
63
- const httpRouteHandler = diagnostics_channel.tracingChannel("adonisjs.http.route.handler");
64
- const httpResponseSerializer = diagnostics_channel.tracingChannel("adonisjs.http.response.serializer");
65
- function execute(route, resolver, ctx, errorResponder) {
66
- return route.middleware.runner().errorHandler((error) => errorResponder(error, ctx)).finalHandler(() => {
67
- if (typeof route.handler === "function") return httpRouteHandler.tracePromise(($ctx) => Promise.resolve(route.handler($ctx)), httpRouteHandler.hasSubscribers ? { route } : void 0, void 0, ctx).then(useReturnValue(ctx));
68
- return httpRouteHandler.tracePromise(route.handler.handle, httpRouteHandler.hasSubscribers ? { route } : void 0, void 0, resolver, ctx).then(useReturnValue(ctx));
69
- }).run(async (middleware, next) => {
70
- if (typeof middleware === "function") return httpMiddleware.tracePromise(middleware, httpMiddleware.hasSubscribers ? { middleware } : void 0, void 0, ctx, next);
71
- return httpMiddleware.tracePromise(middleware.handle, httpMiddleware.hasSubscribers ? { middleware } : void 0, void 0, resolver, ctx, next, middleware.args);
72
- });
73
- }
74
- var Route = class extends Macroable {
75
- #pattern;
76
- #methods;
77
- #name;
78
- #isDeleted = false;
79
- #handler;
80
- #globalMatchers;
81
- #app;
82
- #routerMiddleware;
83
- #routeDomain = "root";
84
- #matchers = {};
85
- #prefixes = [];
86
- #middleware = [];
87
- constructor(app, routerMiddleware, options) {
88
- super();
89
- this.#app = app;
90
- this.#routerMiddleware = routerMiddleware;
91
- this.#pattern = options.pattern;
92
- this.#methods = options.methods;
93
- this.#globalMatchers = options.globalMatchers;
94
- const { handler, routeName } = this.#resolveRouteHandle(options.handler);
95
- this.#handler = handler;
96
- this.#name = routeName;
97
- }
98
- #resolveRouteHandle(handler) {
99
- if (typeof handler === "string") {
100
- const parts = handler.split(".");
101
- const method = parts.length === 1 ? "handle" : parts.pop();
102
- const moduleRefId = parts.join(".");
103
- const controllerName = new StringBuilder(moduleRefId.split("/").pop()).removeSuffix("controller").snakeCase();
104
- return {
105
- handler: {
106
- method,
107
- reference: handler,
108
- importExpression: moduleRefId,
109
- ...moduleImporter(() => this.#app.import(moduleRefId), method).toHandleMethod(),
110
- name: handler
111
- },
112
- routeName: method === "handle" ? controllerName.toString() : `${controllerName}.${string.snakeCase(method)}`
113
- };
114
- }
115
- if (Array.isArray(handler)) {
116
- const controller = handler[0];
117
- const method = handler[1] ?? "handle";
118
- if (is.class(controller)) {
119
- const controllerName = new StringBuilder(controller.name).removeSuffix("controller").snakeCase();
120
- return {
121
- handler: {
122
- method,
123
- reference: handler,
124
- importExpression: null,
125
- ...moduleCaller(controller, method).toHandleMethod()
126
- },
127
- routeName: method === "handle" ? controllerName.toString() : `${controllerName}.${string.snakeCase(method)}`
128
- };
129
- }
130
- const controllerName = controller.name ? new StringBuilder(controller.name).removeSuffix("controller").snakeCase() : void 0;
131
- return {
132
- handler: {
133
- method,
134
- reference: handler,
135
- importExpression: String(controller),
136
- ...moduleImporter(controller, method).toHandleMethod()
137
- },
138
- routeName: controllerName ? method === "handle" ? controllerName.toString() : `${controllerName}.${string.snakeCase(method)}` : void 0
139
- };
140
- }
141
- return { handler };
142
- }
143
- #getMatchers() {
144
- return {
145
- ...this.#globalMatchers,
146
- ...this.#matchers
147
- };
148
- }
149
- #computePattern() {
150
- const pattern = dropSlash(this.#pattern);
151
- const prefix = this.#prefixes.slice().reverse().map((one) => dropSlash(one)).join("");
152
- return prefix ? `${prefix}${pattern === "/" ? "" : pattern}` : pattern;
153
- }
154
- getHandler() {
155
- return this.#handler;
156
- }
157
- where(param, matcher) {
158
- if (this.#matchers[param]) return this;
159
- if (typeof matcher === "string") this.#matchers[param] = { match: new RegExp(matcher) };
160
- else if (is.regExp(matcher)) this.#matchers[param] = { match: matcher };
161
- else this.#matchers[param] = matcher;
162
- return this;
163
- }
164
- prefix(prefix) {
165
- this.#prefixes.push(prefix);
166
- return this;
167
- }
168
- domain(domain, overwrite = false) {
169
- if (this.#routeDomain === "root" || overwrite) this.#routeDomain = domain;
170
- return this;
171
- }
172
- use(middleware) {
173
- this.#middleware.push(Array.isArray(middleware) ? middleware : [middleware]);
174
- return this;
175
- }
176
- middleware(middleware) {
177
- return this.use(middleware);
178
- }
179
- as(name, prepend = false) {
180
- if (prepend) {
181
- if (!this.#name) throw new RuntimeException(`Routes inside a group must have names before calling "router.group.as"`);
182
- this.#name = `${name}.${this.#name}`;
183
- return this;
184
- }
185
- this.#name = name;
186
- return this;
187
- }
188
- isDeleted() {
189
- return this.#isDeleted;
190
- }
191
- markAsDeleted() {
192
- this.#isDeleted = true;
193
- }
194
- getName() {
195
- return this.#name;
196
- }
197
- getPattern() {
198
- return this.#pattern;
199
- }
200
- setPattern(pattern) {
201
- this.#pattern = pattern;
202
- return this;
203
- }
204
- getMiddleware() {
205
- return this.#middleware;
206
- }
207
- #getMiddlewareForStore() {
208
- const middleware = new Middleware();
209
- this.#routerMiddleware.forEach((one) => {
210
- debug_default("adding global middleware to route %s, %O", this.#pattern, one);
211
- middleware.add(one);
212
- });
213
- this.#middleware.flat().forEach((one) => {
214
- debug_default("adding named middleware to route %s, %O", this.#pattern, one);
215
- middleware.add(one);
216
- });
217
- middleware.freeze();
218
- return middleware;
219
- }
220
- toJSON() {
221
- const pattern = this.#computePattern();
222
- const matchers = this.#getMatchers();
223
- return {
224
- domain: this.#routeDomain,
225
- pattern,
226
- matchers,
227
- tokens: parseRoute(pattern, matchers),
228
- meta: {},
229
- name: this.#name,
230
- handler: this.#handler,
231
- methods: this.#methods,
232
- middleware: this.#getMiddlewareForStore(),
233
- execute
234
- };
235
- }
236
- };
237
- var BriskRoute = class extends Macroable {
238
- #pattern;
239
- #globalMatchers;
240
- #app;
241
- #routerMiddleware;
242
- route = null;
243
- constructor(app, routerMiddleware, options) {
244
- super();
245
- this.#app = app;
246
- this.#routerMiddleware = routerMiddleware;
247
- this.#pattern = options.pattern;
248
- this.#globalMatchers = options.globalMatchers;
249
- }
250
- setHandler(handler) {
251
- this.route = new Route(this.#app, this.#routerMiddleware, {
252
- pattern: this.#pattern,
253
- globalMatchers: this.#globalMatchers,
254
- methods: ["GET", "HEAD"],
255
- handler
256
- });
257
- return this.route;
258
- }
259
- redirect(...args) {
260
- const [identifier, params, options] = args;
261
- function redirectsToRoute(ctx) {
262
- const redirector = ctx.response.redirect();
263
- if (options?.status) redirector.status(options.status);
264
- return redirector.toRoute(identifier, params || ctx.params, options);
265
- }
266
- Object.defineProperty(redirectsToRoute, "listArgs", {
267
- value: identifier,
268
- writable: false
269
- });
270
- return this.setHandler(redirectsToRoute);
271
- }
272
- redirectToPath(url, options) {
273
- function redirectsToPath(ctx) {
274
- const redirector = ctx.response.redirect();
275
- if (options?.status) redirector.status(options.status);
276
- return redirector.toPath(url);
277
- }
278
- Object.defineProperty(redirectsToPath, "listArgs", {
279
- value: url,
280
- writable: false
281
- });
282
- return this.setHandler(redirectsToPath);
283
- }
284
- };
285
- var RouteResource = class extends Macroable {
286
- #resource;
287
- #controller;
288
- #shallow = false;
289
- #globalMatchers;
290
- #app;
291
- #routerMiddleware;
292
- #params = {};
293
- #routesBaseName;
294
- routes = [];
295
- constructor(app, routerMiddleware, options) {
296
- super();
297
- this.#validateResourceName(options.resource);
298
- this.#app = app;
299
- this.#shallow = options.shallow;
300
- this.#routerMiddleware = routerMiddleware;
301
- this.#controller = options.controller;
302
- this.#globalMatchers = options.globalMatchers;
303
- this.#resource = this.#normalizeResourceName(options.resource);
304
- this.#routesBaseName = this.#getRoutesBaseName();
305
- this.#buildRoutes();
306
- }
307
- #normalizeResourceName(resource) {
308
- return resource.replace(/^\//, "").replace(/\/$/, "");
309
- }
310
- #validateResourceName(resource) {
311
- if (!resource || resource === "/") throw new RuntimeException(`Invalid resource name "${resource}"`);
312
- }
313
- #getRoutesBaseName() {
314
- return this.#resource.split(".").map((token) => string.snakeCase(token)).join(".");
315
- }
316
- #createRoute(pattern, methods, action) {
317
- const route = new Route(this.#app, this.#routerMiddleware, {
318
- pattern,
319
- methods,
320
- handler: typeof this.#controller === "string" ? `${this.#controller}.${action}` : [this.#controller, action],
321
- globalMatchers: this.#globalMatchers
322
- });
323
- route.as(`${this.#routesBaseName}.${action}`);
324
- this.routes.push(route);
325
- }
326
- #getResourceId(resource) {
327
- return `${string.snakeCase(string.singular(resource))}_id`;
328
- }
329
- #buildRoutes() {
330
- const resources = this.#resource.split(".");
331
- const mainResource = resources.pop();
332
- this.#params[mainResource] = ":id";
333
- const baseURI = `${resources.map((resource) => {
334
- const paramName = `:${this.#getResourceId(resource)}`;
335
- this.#params[resource] = paramName;
336
- return `${resource}/${paramName}`;
337
- }).join("/")}/${mainResource}`;
338
- this.#createRoute(baseURI, ["GET", "HEAD"], "index");
339
- this.#createRoute(`${baseURI}/create`, ["GET", "HEAD"], "create");
340
- this.#createRoute(baseURI, ["POST"], "store");
341
- this.#createRoute(`${this.#shallow ? mainResource : baseURI}/:id`, ["GET", "HEAD"], "show");
342
- this.#createRoute(`${this.#shallow ? mainResource : baseURI}/:id/edit`, ["GET", "HEAD"], "edit");
343
- this.#createRoute(`${this.#shallow ? mainResource : baseURI}/:id`, ["PUT", "PATCH"], "update");
344
- this.#createRoute(`${this.#shallow ? mainResource : baseURI}/:id`, ["DELETE"], "destroy");
345
- }
346
- #filter(names, inverse) {
347
- const actions = Array.isArray(names) ? names : [names];
348
- return this.routes.filter((route) => {
349
- const match = actions.find((name) => route.getName().endsWith(name));
350
- return inverse ? !match : match;
351
- });
352
- }
353
- only(names) {
354
- this.#filter(names, true).forEach((route) => route.markAsDeleted());
355
- return this;
356
- }
357
- except(names) {
358
- this.#filter(names, false).forEach((route) => route.markAsDeleted());
359
- return this;
360
- }
361
- apiOnly() {
362
- return this.except(["create", "edit"]);
363
- }
364
- where(key, matcher) {
365
- this.routes.forEach((route) => {
366
- route.where(key, matcher);
367
- });
368
- return this;
369
- }
370
- tap(actions, callback) {
371
- if (typeof actions === "function") {
372
- this.routes.forEach((route) => {
373
- if (!route.isDeleted()) actions(route);
374
- });
375
- return this;
376
- }
377
- this.#filter(actions, false).forEach((route) => {
378
- if (!route.isDeleted()) callback(route);
379
- });
380
- return this;
381
- }
382
- params(resources) {
383
- Object.keys(resources).forEach((resource) => {
384
- const param = resources[resource];
385
- const existingParam = this.#params[resource];
386
- this.#params[resource] = `:${param}`;
387
- this.routes.forEach((route) => {
388
- route.setPattern(route.getPattern().replace(`${resource}/${existingParam}`, `${resource}/:${param}`));
389
- });
390
- });
391
- return this;
392
- }
393
- use(actions, middleware) {
394
- if (actions === "*") this.tap((route) => route.use(middleware));
395
- else this.tap(actions, (route) => route.use(middleware));
396
- return this;
397
- }
398
- middleware(actions, middleware) {
399
- return this.use(actions, middleware);
400
- }
401
- as(name, normalizeName = true) {
402
- name = normalizeName ? string.snakeCase(name) : name;
403
- this.routes.forEach((route) => {
404
- route.as(route.getName().replace(this.#routesBaseName, name), false);
405
- });
406
- this.#routesBaseName = name;
407
- return this;
408
- }
409
- };
410
- var RouteGroup = class RouteGroup extends Macroable {
411
- #middleware = [];
412
- constructor(routes) {
413
- super();
414
- this.routes = routes;
415
- }
416
- #shareMiddlewareStackWithRoutes(route) {
417
- if (route instanceof RouteGroup) {
418
- route.routes.forEach((child) => this.#shareMiddlewareStackWithRoutes(child));
419
- return;
420
- }
421
- if (route instanceof RouteResource) {
422
- route.routes.forEach((child) => child.getMiddleware().unshift(this.#middleware));
423
- return;
424
- }
425
- if (route instanceof BriskRoute) {
426
- route.route.getMiddleware().unshift(this.#middleware);
427
- return;
428
- }
429
- route.getMiddleware().unshift(this.#middleware);
430
- }
431
- #updateRouteName(route, name) {
432
- if (route instanceof RouteGroup) {
433
- route.routes.forEach((child) => this.#updateRouteName(child, name));
434
- return;
435
- }
436
- if (route instanceof RouteResource) {
437
- route.routes.forEach((child) => child.as(name, true));
438
- return;
439
- }
440
- if (route instanceof BriskRoute) {
441
- route.route.as(name, true);
442
- return;
443
- }
444
- route.as(name, true);
445
- }
446
- #setRoutePrefix(route, prefix) {
447
- if (route instanceof RouteGroup) {
448
- route.routes.forEach((child) => this.#setRoutePrefix(child, prefix));
449
- return;
450
- }
451
- if (route instanceof RouteResource) {
452
- route.routes.forEach((child) => child.prefix(prefix));
453
- return;
454
- }
455
- if (route instanceof BriskRoute) {
456
- route.route.prefix(prefix);
457
- return;
458
- }
459
- route.prefix(prefix);
460
- }
461
- #updateRouteDomain(route, domain) {
462
- if (route instanceof RouteGroup) {
463
- route.routes.forEach((child) => this.#updateRouteDomain(child, domain));
464
- return;
465
- }
466
- if (route instanceof RouteResource) {
467
- route.routes.forEach((child) => child.domain(domain));
468
- return;
469
- }
470
- if (route instanceof BriskRoute) {
471
- route.route.domain(domain, false);
472
- return;
473
- }
474
- route.domain(domain, false);
475
- }
476
- #updateRouteMatchers(route, param, matcher) {
477
- if (route instanceof RouteGroup) {
478
- route.routes.forEach((child) => this.#updateRouteMatchers(child, param, matcher));
479
- return;
480
- }
481
- if (route instanceof RouteResource) {
482
- route.routes.forEach((child) => child.where(param, matcher));
483
- return;
484
- }
485
- if (route instanceof BriskRoute) {
486
- route.route.where(param, matcher);
487
- return;
488
- }
489
- route.where(param, matcher);
490
- }
491
- where(param, matcher) {
492
- this.routes.forEach((route) => this.#updateRouteMatchers(route, param, matcher));
493
- return this;
494
- }
495
- prefix(prefix) {
496
- this.routes.forEach((route) => this.#setRoutePrefix(route, prefix));
497
- return this;
498
- }
499
- domain(domain) {
500
- this.routes.forEach((route) => this.#updateRouteDomain(route, domain));
501
- return this;
502
- }
503
- as(name) {
504
- this.routes.forEach((route) => this.#updateRouteName(route, name));
505
- return this;
506
- }
507
- use(middleware) {
508
- if (!this.#middleware.length) this.routes.forEach((route) => this.#shareMiddlewareStackWithRoutes(route));
509
- if (Array.isArray(middleware)) for (let one of middleware) this.#middleware.push(one);
510
- else this.#middleware.push(middleware);
511
- return this;
512
- }
513
- middleware(middleware) {
514
- return this.use(middleware);
515
- }
516
- };
517
- const proxyCache = new Cache({ max: 200 });
518
- function dropSlash(input) {
519
- if (input === "/") return "/";
520
- return `/${input.replace(/^\//, "").replace(/\/$/, "")}`;
521
- }
522
- function toRoutesJSON(routes) {
523
- return routes.reduce((list, route) => {
524
- if (route instanceof RouteGroup) {
525
- list = list.concat(toRoutesJSON(route.routes));
526
- return list;
527
- }
528
- if (route instanceof RouteResource) {
529
- list = list.concat(toRoutesJSON(route.routes));
530
- return list;
531
- }
532
- if (route instanceof BriskRoute) {
533
- if (route.route && !route.route.isDeleted()) list.push(route.route.toJSON());
534
- return list;
535
- }
536
- if (!route.isDeleted()) list.push(route.toJSON());
537
- return list;
538
- }, []);
539
- }
540
- function trustProxy(remoteAddress, proxyFn) {
541
- if (proxyCache.has(remoteAddress)) return proxyCache.get(remoteAddress);
542
- const result = proxyFn(remoteAddress, 0);
543
- proxyCache.set(remoteAddress, result);
544
- return result;
545
- }
546
- function parseRange(range, value) {
547
- const parts = range.split("..");
548
- const min = Number(parts[0]);
549
- const max = Number(parts[1]);
550
- if (parts.length === 1 && !Number.isNaN(min)) return { [min]: value };
551
- if (Number.isNaN(min) || Number.isNaN(max)) return {};
552
- if (min === max) return { [min]: value };
553
- if (max < min) throw new InvalidArgumentsException(`Invalid range "${range}"`);
554
- return [...Array(max - min + 1).keys()].reduce((result, step) => {
555
- result[min + step] = value;
556
- return result;
557
- }, {});
558
- }
559
- function decodeComponentChar(highCharCode, lowCharCode) {
560
- if (highCharCode === 50) {
561
- if (lowCharCode === 53) return "%";
562
- if (lowCharCode === 51) return "#";
563
- if (lowCharCode === 52) return "$";
564
- if (lowCharCode === 54) return "&";
565
- if (lowCharCode === 66) return "+";
566
- if (lowCharCode === 98) return "+";
567
- if (lowCharCode === 67) return ",";
568
- if (lowCharCode === 99) return ",";
569
- if (lowCharCode === 70) return "/";
570
- if (lowCharCode === 102) return "/";
571
- return null;
572
- }
573
- if (highCharCode === 51) {
574
- if (lowCharCode === 65) return ":";
575
- if (lowCharCode === 97) return ":";
576
- if (lowCharCode === 66) return ";";
577
- if (lowCharCode === 98) return ";";
578
- if (lowCharCode === 68) return "=";
579
- if (lowCharCode === 100) return "=";
580
- if (lowCharCode === 70) return "?";
581
- if (lowCharCode === 102) return "?";
582
- return null;
583
- }
584
- if (highCharCode === 52 && lowCharCode === 48) return "@";
585
- return null;
586
- }
587
- function safeDecodeURI(path, useSemicolonDelimiter) {
588
- let shouldDecode = false;
589
- let shouldDecodeParam = false;
590
- let querystring = "";
591
- for (let i = 1; i < path.length; i++) {
592
- const charCode = path.charCodeAt(i);
593
- if (charCode === 37) {
594
- const highCharCode = path.charCodeAt(i + 1);
595
- const lowCharCode = path.charCodeAt(i + 2);
596
- if (decodeComponentChar(highCharCode, lowCharCode) === null) shouldDecode = true;
597
- else {
598
- shouldDecodeParam = true;
599
- if (highCharCode === 50 && lowCharCode === 53) {
600
- shouldDecode = true;
601
- path = path.slice(0, i + 1) + "25" + path.slice(i + 1);
602
- i += 2;
603
- }
604
- i += 2;
605
- }
606
- } else if (charCode === 63 || charCode === 35 || charCode === 59 && useSemicolonDelimiter) {
607
- querystring = path.slice(i + 1);
608
- path = path.slice(0, i);
609
- break;
610
- }
611
- }
612
- return {
613
- pathname: shouldDecode ? decodeURI(path) : path,
614
- query: querystring,
615
- shouldDecodeParam
616
- };
617
- }
618
- export { __exportAll as _, RouteGroup as a, Route as c, httpRequest as d, httpResponseSerializer as f, __commonJSMin as g, debug_default as h, trustProxy as i, httpExceptionHandler as l, canWriteResponseBody as m, safeDecodeURI as n, RouteResource as o, tracing_channels_exports as p, toRoutesJSON as r, BriskRoute as s, parseRange as t, httpMiddleware as u, __require as v, __toESM as y };