clear-router 2.7.6 → 2.8.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 (116) hide show
  1. package/dist/ClearRequest.cjs +23 -0
  2. package/dist/ClearRequest.d.cts +28 -0
  3. package/dist/ClearRequest.d.mts +28 -0
  4. package/dist/ClearRequest.mjs +22 -0
  5. package/dist/Contracts.d.cts +12 -0
  6. package/dist/Contracts.d.mts +12 -0
  7. package/dist/Controller.cjs +12 -0
  8. package/dist/Controller.d.cts +14 -0
  9. package/dist/Controller.d.mts +14 -0
  10. package/dist/Controller.mjs +11 -0
  11. package/dist/{Request-DKXwa_W0.d.mts → Request-Ci0UQ-Vl.d.mts} +32 -5
  12. package/dist/ResourceRouteSelection.cjs +26 -0
  13. package/dist/ResourceRouteSelection.d.cts +20 -0
  14. package/dist/ResourceRouteSelection.d.mts +20 -0
  15. package/dist/ResourceRouteSelection.mjs +25 -0
  16. package/dist/ResourceRoutes.cjs +60 -0
  17. package/dist/ResourceRoutes.d.cts +37 -0
  18. package/dist/ResourceRoutes.d.mts +37 -0
  19. package/dist/ResourceRoutes.mjs +60 -0
  20. package/dist/Route.cjs +90 -0
  21. package/dist/Route.d.cts +62 -0
  22. package/dist/Route.d.mts +62 -0
  23. package/dist/Route.mjs +89 -0
  24. package/dist/core/Request.cjs +35 -0
  25. package/dist/core/Request.d.cts +25 -0
  26. package/dist/core/Request.d.mts +25 -0
  27. package/dist/core/Request.mjs +35 -0
  28. package/dist/core/Response.cjs +59 -0
  29. package/dist/core/Response.d.cts +24 -0
  30. package/dist/core/Response.d.mts +24 -0
  31. package/dist/core/Response.mjs +58 -0
  32. package/dist/{bindings-CLsZjOEy.cjs → core/bindings.cjs} +10 -160
  33. package/dist/{bindings-CNL7bpz5.d.mts → core/bindings.d.cts} +1 -1
  34. package/dist/{bindings-CxvtC8XS.d.cts → core/bindings.d.mts} +1 -1
  35. package/dist/{bindings-XLDXFpHZ.mjs → core/bindings.mjs} +3 -110
  36. package/dist/core/index.cjs +7 -17
  37. package/dist/core/index.d.cts +4 -1
  38. package/dist/core/index.d.mts +4 -1
  39. package/dist/core/index.mjs +4 -14
  40. package/dist/core/plugins.cjs +14 -0
  41. package/dist/core/plugins.d.cts +109 -0
  42. package/dist/core/plugins.d.mts +109 -0
  43. package/dist/core/plugins.mjs +13 -0
  44. package/dist/{responses-Bvnk0uvc.cjs → core/responses.cjs} +5 -20
  45. package/dist/{responses-BvETUeDL.mjs → core/responses.mjs} +2 -2
  46. package/dist/{router-C6W-k6sS.cjs → core/router.cjs} +67 -72
  47. package/dist/core/router.d.cts +286 -0
  48. package/dist/core/router.d.mts +286 -0
  49. package/dist/{router-Dc9w86Wn.mjs → core/router.mjs} +62 -62
  50. package/dist/decorators/index.cjs +1 -1
  51. package/dist/decorators/index.d.cts +1 -1
  52. package/dist/decorators/index.d.mts +1 -1
  53. package/dist/decorators/index.mjs +1 -1
  54. package/dist/decorators/setup.cjs +2 -2
  55. package/dist/decorators/setup.d.cts +1 -1
  56. package/dist/decorators/setup.d.mts +1 -2
  57. package/dist/decorators/setup.mjs +2 -2
  58. package/dist/express/index.cjs +2 -265
  59. package/dist/express/index.d.cts +1 -127
  60. package/dist/express/index.d.mts +1 -127
  61. package/dist/express/index.mjs +1 -264
  62. package/dist/express/router.cjs +265 -0
  63. package/dist/express/router.d.cts +132 -0
  64. package/dist/express/router.d.mts +132 -0
  65. package/dist/express/router.mjs +265 -0
  66. package/dist/fastify/index.cjs +2 -254
  67. package/dist/fastify/index.d.cts +1 -125
  68. package/dist/fastify/index.d.mts +1 -125
  69. package/dist/fastify/index.mjs +1 -253
  70. package/dist/fastify/router.cjs +254 -0
  71. package/dist/fastify/router.d.cts +130 -0
  72. package/dist/fastify/router.d.mts +130 -0
  73. package/dist/fastify/router.mjs +254 -0
  74. package/dist/h3/index.cjs +2 -260
  75. package/dist/h3/index.d.cts +1 -128
  76. package/dist/h3/index.d.mts +1 -128
  77. package/dist/h3/index.mjs +1 -259
  78. package/dist/h3/router.cjs +260 -0
  79. package/dist/h3/router.d.cts +133 -0
  80. package/dist/h3/router.d.mts +133 -0
  81. package/dist/h3/router.mjs +260 -0
  82. package/dist/hono/index.cjs +2 -251
  83. package/dist/hono/index.d.cts +1 -130
  84. package/dist/hono/index.d.mts +1 -130
  85. package/dist/hono/index.mjs +1 -250
  86. package/dist/hono/router.cjs +251 -0
  87. package/dist/hono/router.d.cts +135 -0
  88. package/dist/hono/router.d.mts +135 -0
  89. package/dist/hono/router.mjs +251 -0
  90. package/dist/index.cjs +16 -1097
  91. package/dist/index.d.cts +9 -563
  92. package/dist/index.d.mts +9 -563
  93. package/dist/index.mjs +8 -1089
  94. package/dist/koa/index.cjs +2 -261
  95. package/dist/koa/index.d.cts +1 -131
  96. package/dist/koa/index.d.mts +1 -131
  97. package/dist/koa/index.mjs +1 -260
  98. package/dist/koa/router.cjs +261 -0
  99. package/dist/koa/router.d.cts +136 -0
  100. package/dist/koa/router.d.mts +136 -0
  101. package/dist/koa/router.mjs +261 -0
  102. package/dist/types/basic.d.cts +53 -0
  103. package/dist/types/basic.d.mts +11 -1
  104. package/dist/types/express.d.cts +48 -0
  105. package/dist/types/express.d.mts +10 -4
  106. package/dist/types/fastify.d.cts +24 -0
  107. package/dist/types/fastify.d.mts +7 -4
  108. package/dist/types/h3.d.cts +46 -0
  109. package/dist/types/h3.d.mts +10 -5
  110. package/dist/types/hono.d.cts +22 -0
  111. package/dist/types/hono.d.mts +8 -6
  112. package/dist/types/koa.d.cts +26 -0
  113. package/dist/types/koa.d.mts +7 -5
  114. package/package.json +1 -1
  115. package/dist/router-BEgAxp5A.d.cts +0 -649
  116. package/dist/router-DKKYx23P.d.mts +0 -649
@@ -22,4 +22,4 @@ declare class Container {
22
22
  }
23
23
  declare function Bind(...tokens: BindToken[]): BindDecorator;
24
24
  //#endregion
25
- export { BindValue as a, BindToken as i, BindDecorator as n, Container as o, BindFactory as r, Bind as t };
25
+ export { Bind, BindDecorator, BindFactory, BindToken, BindValue, Container };
@@ -1,113 +1,6 @@
1
- //#region src/ClearRequest.ts
2
- var ClearRequest = class {
3
- /**
4
- * @param body - Parsed request body
5
- */
6
- body;
7
- /**
8
- * @param query - Parsed query parameters
9
- */
10
- query;
11
- /**
12
- * @param params - Parsed route parameters
13
- */
14
- params;
15
- route;
16
- constructor(init) {
17
- Object.assign(this, init);
18
- }
19
- };
20
-
21
- //#endregion
22
- //#region src/core/Request.ts
23
- var Request = class extends ClearRequest {
24
- original;
25
- method = "GET";
26
- path = "/";
27
- url = "/";
28
- headers = {};
29
- constructor(init) {
30
- super(init);
31
- Object.assign(this, init);
32
- }
33
- getBody() {
34
- return this.body ?? {};
35
- }
36
- header(name) {
37
- if (typeof this.headers.get === "function") return this.headers.get(name) || "";
38
- const headers = this.headers;
39
- const value = headers[name] ?? headers[name.toLowerCase()];
40
- return Array.isArray(value) ? String(value[0] ?? "") : String(value ?? "");
41
- }
42
- param(name) {
43
- return this.params?.[name];
44
- }
45
- input(name) {
46
- return this.body?.[name] ?? this.query?.[name] ?? this.params?.[name];
47
- }
48
- is(method) {
49
- return this.method.toLowerCase() === String(method).toLowerCase();
50
- }
51
- };
52
-
53
- //#endregion
54
- //#region src/core/Response.ts
55
- var Response = class {
56
- body;
57
- headers = new Headers();
58
- sent = false;
59
- statusCode = 200;
60
- statusText = "OK";
61
- constructor(init) {
62
- const { status: _, ...rest } = init ?? {};
63
- Object.assign(this, rest);
64
- if (init?.headers && !(init.headers instanceof Headers)) this.headers = new Headers(init.headers);
65
- if (init?.status && typeof init.status === "number") this.statusCode = init?.status;
66
- }
67
- status(code) {
68
- this.statusCode = code;
69
- return this;
70
- }
71
- setStatusText(text) {
72
- this.statusText = text;
73
- return this;
74
- }
75
- code(code) {
76
- return this.status(code);
77
- }
78
- setHeader(name, value) {
79
- this.headers.set(name, value);
80
- return this;
81
- }
82
- header(name, value) {
83
- return this.setHeader(name, value);
84
- }
85
- set(name, value) {
86
- return this.setHeader(name, value);
87
- }
88
- type(contentType) {
89
- return this.setHeader("Content-Type", contentType);
90
- }
91
- send(body) {
92
- this.body = body;
93
- this.sent = true;
94
- return this;
95
- }
96
- json(body) {
97
- return this.type("application/json; charset=utf-8").send(body);
98
- }
99
- html(body) {
100
- return this.type("text/html; charset=utf-8").send(body);
101
- }
102
- text(body) {
103
- return this.type("text/plain; charset=utf-8").send(body);
104
- }
105
- noContent() {
106
- return this.status(204).send(null);
107
- }
108
- };
1
+ import { Request } from "./Request.mjs";
2
+ import { Response } from "./Response.mjs";
109
3
 
110
- //#endregion
111
4
  //#region src/core/bindings.ts
112
5
  const metadataKey = Symbol.for("clear-router:binding-metadata");
113
6
  const bindings = /* @__PURE__ */ new WeakMap();
@@ -258,4 +151,4 @@ function isClass(value) {
258
151
  }
259
152
 
260
153
  //#endregion
261
- export { getStandardMetadata as a, Request as c, getDesignParamTypes as i, Container as n, isClass as o, getBindingMetadataFromTargets as r, Response as s, Bind as t };
154
+ export { Bind, Container, getBindingMetadataFromTargets, getDesignParamTypes, getStandardMetadata, isClass };
@@ -1,20 +1,10 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- const require_bindings = require('../bindings-CLsZjOEy.cjs');
3
- const require_router = require('../router-C6W-k6sS.cjs');
2
+ const require_Request = require('./Request.cjs');
3
+ const require_Response = require('./Response.cjs');
4
+ const require_plugins = require('./plugins.cjs');
5
+ const require_router = require('./router.cjs');
4
6
 
5
- //#region src/core/plugins.ts
6
- /**
7
- * Creates a new plugin
8
- *
9
- * @param plugin
10
- * @returns
11
- */
12
- function definePlugin(plugin) {
13
- return plugin;
14
- }
15
-
16
- //#endregion
17
7
  exports.CoreRouter = require_router.CoreRouter;
18
- exports.Request = require_bindings.Request;
19
- exports.Response = require_bindings.Response;
20
- exports.definePlugin = definePlugin;
8
+ exports.Request = require_Request.Request;
9
+ exports.Response = require_Response.Response;
10
+ exports.definePlugin = require_plugins.definePlugin;
@@ -1,2 +1,5 @@
1
- import { P as Response, a as ClearRouterPluginInput, c as PluginBind, d as PluginSetupResult, f as definePlugin, i as ClearRouterPluginContext, l as PluginBindFactory, n as ClearRouterPlugin, o as ClearRouterPluginRequestContext, p as Request, r as ClearRouterPluginArgumentsContext, s as PluginArgumentsResolver, t as CoreRouter, u as PluginBindValue } from "../router-BEgAxp5A.cjs";
1
+ import { Response } from "./Response.cjs";
2
+ import { Request } from "./Request.cjs";
3
+ import { ClearRouterPlugin, ClearRouterPluginArgumentsContext, ClearRouterPluginContext, ClearRouterPluginInput, ClearRouterPluginRequestContext, PluginArgumentsResolver, PluginBind, PluginBindFactory, PluginBindValue, PluginSetupResult, definePlugin } from "./plugins.cjs";
4
+ import { CoreRouter } from "./router.cjs";
2
5
  export { ClearRouterPlugin, ClearRouterPluginArgumentsContext, ClearRouterPluginContext, ClearRouterPluginInput, ClearRouterPluginRequestContext, CoreRouter, PluginArgumentsResolver, PluginBind, PluginBindFactory, PluginBindValue, PluginSetupResult, Request, Response, definePlugin };
@@ -1,2 +1,5 @@
1
- import { P as Response, a as ClearRouterPluginInput, c as PluginBind, d as PluginSetupResult, f as definePlugin, i as ClearRouterPluginContext, l as PluginBindFactory, n as ClearRouterPlugin, o as ClearRouterPluginRequestContext, p as Request, r as ClearRouterPluginArgumentsContext, s as PluginArgumentsResolver, t as CoreRouter, u as PluginBindValue } from "../router-DKKYx23P.mjs";
1
+ import { Response } from "./Response.mjs";
2
+ import { Request } from "./Request.mjs";
3
+ import { ClearRouterPlugin, ClearRouterPluginArgumentsContext, ClearRouterPluginContext, ClearRouterPluginInput, ClearRouterPluginRequestContext, PluginArgumentsResolver, PluginBind, PluginBindFactory, PluginBindValue, PluginSetupResult, definePlugin } from "./plugins.mjs";
4
+ import { CoreRouter } from "./router.mjs";
2
5
  export { ClearRouterPlugin, ClearRouterPluginArgumentsContext, ClearRouterPluginContext, ClearRouterPluginInput, ClearRouterPluginRequestContext, CoreRouter, PluginArgumentsResolver, PluginBind, PluginBindFactory, PluginBindValue, PluginSetupResult, Request, Response, definePlugin };
@@ -1,16 +1,6 @@
1
- import { c as Request, s as Response } from "../bindings-XLDXFpHZ.mjs";
2
- import { t as CoreRouter } from "../router-Dc9w86Wn.mjs";
1
+ import { Request } from "./Request.mjs";
2
+ import { Response } from "./Response.mjs";
3
+ import { definePlugin } from "./plugins.mjs";
4
+ import { CoreRouter } from "./router.mjs";
3
5
 
4
- //#region src/core/plugins.ts
5
- /**
6
- * Creates a new plugin
7
- *
8
- * @param plugin
9
- * @returns
10
- */
11
- function definePlugin(plugin) {
12
- return plugin;
13
- }
14
-
15
- //#endregion
16
6
  export { CoreRouter, Request, Response, definePlugin };
@@ -0,0 +1,14 @@
1
+
2
+ //#region src/core/plugins.ts
3
+ /**
4
+ * Creates a new plugin
5
+ *
6
+ * @param plugin
7
+ * @returns
8
+ */
9
+ function definePlugin(plugin) {
10
+ return plugin;
11
+ }
12
+
13
+ //#endregion
14
+ exports.definePlugin = definePlugin;
@@ -0,0 +1,109 @@
1
+ import { RouterConfig } from "../types/basic.cjs";
2
+ import { Response } from "./Response.cjs";
3
+ import { Request } from "./Request.cjs";
4
+ import { BindToken, BindValue, Container } from "./bindings.cjs";
5
+
6
+ //#region src/core/plugins.d.ts
7
+ type PluginSetupResult = void | Promise<void>;
8
+ interface ClearRouterPluginRequestContext<HttpContext = any> {
9
+ ctx: HttpContext;
10
+ request: Request;
11
+ response: Response;
12
+ getBindings: () => Record<string, BindValue>;
13
+ [key: string]: any;
14
+ }
15
+ interface ClearRouterPluginArgumentsContext<X = any> extends ClearRouterPluginRequestContext<X> {
16
+ target?: object;
17
+ method?: PropertyKey;
18
+ handler?: object;
19
+ metadata?: object;
20
+ tokens: BindToken[];
21
+ designTokens: BindToken[];
22
+ }
23
+ type PluginBindFactory<T = any, X = any> = (ctx: ClearRouterPluginRequestContext<X>) => T | Promise<T>;
24
+ type PluginBindValue<T = any, X = any> = BindValue<T> | PluginBindFactory<T, X>;
25
+ type PluginBind<X = any> = <T>(token: BindToken<T>, value: PluginBindValue<T, X>) => void;
26
+ type PluginArgumentsResolver<HttpContext = any> = (ctx: ClearRouterPluginArgumentsContext<HttpContext>) => any[] | undefined | Promise<any[] | undefined>;
27
+ interface ClearRouterPluginContext<Options = any, HttpContext = any> {
28
+ /**
29
+ * The service container
30
+ */
31
+ container: typeof Container;
32
+ /**
33
+ * Register service container bindings
34
+ */
35
+ bind: PluginBind<HttpContext>;
36
+ /**
37
+ * Replace all controller method arguments
38
+ * @param resolver
39
+ * @returns
40
+ */
41
+ resolveArguments: (resolver: PluginArgumentsResolver<HttpContext>) => void;
42
+ /**
43
+ * Use the current http context
44
+ */
45
+ useHttpContext: (resolver: PluginArgumentsResolver<HttpContext>) => void;
46
+ /**
47
+ * All registered service container bindings
48
+ */
49
+ bindings: Record<string, BindValue>;
50
+ /**
51
+ * Configures the router with the given options, such as method override settings
52
+ *
53
+ * @param options
54
+ * @returns
55
+ */
56
+ configure: (options: RouterConfig) => void;
57
+ /**
58
+ * Default configuration used for everytime the router is reset
59
+ *
60
+ * @param options
61
+ */
62
+ configureDefaults: (options: RouterConfig) => void;
63
+ /**
64
+ * The current Request instance
65
+ */
66
+ readonly request?: Request;
67
+ /**
68
+ * The current Response instance
69
+ * @returns
70
+ */
71
+ readonly response?: Response;
72
+ /**
73
+ * Get the current Request instance
74
+ * @returns
75
+ */
76
+ getRequest: () => Request | undefined;
77
+ /**
78
+ * Get the current Response instance
79
+ * @returns
80
+ */
81
+ getResponse: () => Response | undefined;
82
+ /**
83
+ * Plugin configuration options
84
+ */
85
+ options: Options;
86
+ }
87
+ interface ClearRouterPlugin<Options = any, HttpContext = any> {
88
+ /**
89
+ * The name of the plugin
90
+ */
91
+ name?: string;
92
+ /**
93
+ * Plugin setup an implemnetation
94
+ *
95
+ * @param ctx
96
+ * @returns
97
+ */
98
+ setup: (ctx: ClearRouterPluginContext<Options, HttpContext>) => PluginSetupResult;
99
+ }
100
+ type ClearRouterPluginInput<Options = any, HttpContext = any> = ClearRouterPlugin<Options> | ((ctx: ClearRouterPluginContext<Options, HttpContext>) => PluginSetupResult);
101
+ /**
102
+ * Creates a new plugin
103
+ *
104
+ * @param plugin
105
+ * @returns
106
+ */
107
+ declare function definePlugin<Options = any, HttpContext = any>(plugin: ClearRouterPlugin<Options, HttpContext>): ClearRouterPlugin<Options, HttpContext>;
108
+ //#endregion
109
+ export { ClearRouterPlugin, ClearRouterPluginArgumentsContext, ClearRouterPluginContext, ClearRouterPluginInput, ClearRouterPluginRequestContext, PluginArgumentsResolver, PluginBind, PluginBindFactory, PluginBindValue, PluginSetupResult, definePlugin };
@@ -0,0 +1,109 @@
1
+ import { RouterConfig } from "../types/basic.mjs";
2
+ import { Response } from "./Response.mjs";
3
+ import { Request } from "./Request.mjs";
4
+ import { BindToken, BindValue, Container } from "./bindings.mjs";
5
+
6
+ //#region src/core/plugins.d.ts
7
+ type PluginSetupResult = void | Promise<void>;
8
+ interface ClearRouterPluginRequestContext<HttpContext = any> {
9
+ ctx: HttpContext;
10
+ request: Request;
11
+ response: Response;
12
+ getBindings: () => Record<string, BindValue>;
13
+ [key: string]: any;
14
+ }
15
+ interface ClearRouterPluginArgumentsContext<X = any> extends ClearRouterPluginRequestContext<X> {
16
+ target?: object;
17
+ method?: PropertyKey;
18
+ handler?: object;
19
+ metadata?: object;
20
+ tokens: BindToken[];
21
+ designTokens: BindToken[];
22
+ }
23
+ type PluginBindFactory<T = any, X = any> = (ctx: ClearRouterPluginRequestContext<X>) => T | Promise<T>;
24
+ type PluginBindValue<T = any, X = any> = BindValue<T> | PluginBindFactory<T, X>;
25
+ type PluginBind<X = any> = <T>(token: BindToken<T>, value: PluginBindValue<T, X>) => void;
26
+ type PluginArgumentsResolver<HttpContext = any> = (ctx: ClearRouterPluginArgumentsContext<HttpContext>) => any[] | undefined | Promise<any[] | undefined>;
27
+ interface ClearRouterPluginContext<Options = any, HttpContext = any> {
28
+ /**
29
+ * The service container
30
+ */
31
+ container: typeof Container;
32
+ /**
33
+ * Register service container bindings
34
+ */
35
+ bind: PluginBind<HttpContext>;
36
+ /**
37
+ * Replace all controller method arguments
38
+ * @param resolver
39
+ * @returns
40
+ */
41
+ resolveArguments: (resolver: PluginArgumentsResolver<HttpContext>) => void;
42
+ /**
43
+ * Use the current http context
44
+ */
45
+ useHttpContext: (resolver: PluginArgumentsResolver<HttpContext>) => void;
46
+ /**
47
+ * All registered service container bindings
48
+ */
49
+ bindings: Record<string, BindValue>;
50
+ /**
51
+ * Configures the router with the given options, such as method override settings
52
+ *
53
+ * @param options
54
+ * @returns
55
+ */
56
+ configure: (options: RouterConfig) => void;
57
+ /**
58
+ * Default configuration used for everytime the router is reset
59
+ *
60
+ * @param options
61
+ */
62
+ configureDefaults: (options: RouterConfig) => void;
63
+ /**
64
+ * The current Request instance
65
+ */
66
+ readonly request?: Request;
67
+ /**
68
+ * The current Response instance
69
+ * @returns
70
+ */
71
+ readonly response?: Response;
72
+ /**
73
+ * Get the current Request instance
74
+ * @returns
75
+ */
76
+ getRequest: () => Request | undefined;
77
+ /**
78
+ * Get the current Response instance
79
+ * @returns
80
+ */
81
+ getResponse: () => Response | undefined;
82
+ /**
83
+ * Plugin configuration options
84
+ */
85
+ options: Options;
86
+ }
87
+ interface ClearRouterPlugin<Options = any, HttpContext = any> {
88
+ /**
89
+ * The name of the plugin
90
+ */
91
+ name?: string;
92
+ /**
93
+ * Plugin setup an implemnetation
94
+ *
95
+ * @param ctx
96
+ * @returns
97
+ */
98
+ setup: (ctx: ClearRouterPluginContext<Options, HttpContext>) => PluginSetupResult;
99
+ }
100
+ type ClearRouterPluginInput<Options = any, HttpContext = any> = ClearRouterPlugin<Options> | ((ctx: ClearRouterPluginContext<Options, HttpContext>) => PluginSetupResult);
101
+ /**
102
+ * Creates a new plugin
103
+ *
104
+ * @param plugin
105
+ * @returns
106
+ */
107
+ declare function definePlugin<Options = any, HttpContext = any>(plugin: ClearRouterPlugin<Options, HttpContext>): ClearRouterPlugin<Options, HttpContext>;
108
+ //#endregion
109
+ export { ClearRouterPlugin, ClearRouterPluginArgumentsContext, ClearRouterPluginContext, ClearRouterPluginInput, ClearRouterPluginRequestContext, PluginArgumentsResolver, PluginBind, PluginBindFactory, PluginBindValue, PluginSetupResult, definePlugin };
@@ -0,0 +1,13 @@
1
+ //#region src/core/plugins.ts
2
+ /**
3
+ * Creates a new plugin
4
+ *
5
+ * @param plugin
6
+ * @returns
7
+ */
8
+ function definePlugin(plugin) {
9
+ return plugin;
10
+ }
11
+
12
+ //#endregion
13
+ export { definePlugin };
@@ -1,11 +1,11 @@
1
- const require_bindings = require('./bindings-CLsZjOEy.cjs');
1
+ const require_Response = require('./Response.cjs');
2
2
 
3
3
  //#region src/core/responses.ts
4
4
  function isFetchResponse(value) {
5
5
  return typeof globalThis.Response !== "undefined" && value instanceof globalThis.Response;
6
6
  }
7
7
  function isCoreResponse(value) {
8
- return value instanceof require_bindings.Response;
8
+ return value instanceof require_Response.Response;
9
9
  }
10
10
  function isH3Response(value) {
11
11
  return Boolean(value && typeof value === "object" && value.constructor?.name === "HTTPResponse");
@@ -88,21 +88,6 @@ function inferStringContentType(value, apiRequest) {
88
88
  }
89
89
 
90
90
  //#endregion
91
- Object.defineProperty(exports, 'isFetchResponse', {
92
- enumerable: true,
93
- get: function () {
94
- return isFetchResponse;
95
- }
96
- });
97
- Object.defineProperty(exports, 'resolveResponseMeta', {
98
- enumerable: true,
99
- get: function () {
100
- return resolveResponseMeta;
101
- }
102
- });
103
- Object.defineProperty(exports, 'responseWasSent', {
104
- enumerable: true,
105
- get: function () {
106
- return responseWasSent;
107
- }
108
- });
91
+ exports.isFetchResponse = isFetchResponse;
92
+ exports.resolveResponseMeta = resolveResponseMeta;
93
+ exports.responseWasSent = responseWasSent;
@@ -1,4 +1,4 @@
1
- import { s as Response } from "./bindings-XLDXFpHZ.mjs";
1
+ import { Response } from "./Response.mjs";
2
2
 
3
3
  //#region src/core/responses.ts
4
4
  function isFetchResponse(value) {
@@ -88,4 +88,4 @@ function inferStringContentType(value, apiRequest) {
88
88
  }
89
89
 
90
90
  //#endregion
91
- export { resolveResponseMeta as n, responseWasSent as r, isFetchResponse as t };
91
+ export { isFetchResponse, resolveResponseMeta, responseWasSent };