phecda-server 8.1.0 → 8.3.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 (50) hide show
  1. package/bin/cli.mjs +17 -2
  2. package/dist/{chunk-UYZSUBX4.js → chunk-C424F7TV.js} +27 -27
  3. package/dist/{chunk-NQ55PA2X.mjs → chunk-JRNXLEAU.mjs} +2 -2
  4. package/dist/{chunk-FI5756JX.mjs → chunk-LYLSA56Y.mjs} +1 -1
  5. package/dist/{chunk-4LLLQOMF.js → chunk-OUQM7GZH.js} +2 -2
  6. package/dist/{chunk-HKN3AAB2.js → chunk-R73A7HS3.js} +90 -88
  7. package/dist/{chunk-OLNN4U3O.js → chunk-SRPCXPAQ.js} +20 -20
  8. package/dist/{chunk-BLLRB5DQ.mjs → chunk-US2DTB3Z.mjs} +37 -35
  9. package/dist/{chunk-PFPOEZHH.mjs → chunk-YDJAOLT2.mjs} +1 -1
  10. package/dist/helper.js +3 -3
  11. package/dist/helper.mjs +2 -2
  12. package/dist/http/elysia/index.d.mts +3 -3
  13. package/dist/http/elysia/index.d.ts +3 -3
  14. package/dist/http/elysia/index.js +40 -40
  15. package/dist/http/elysia/index.mjs +3 -3
  16. package/dist/http/express/index.js +37 -37
  17. package/dist/http/express/index.mjs +2 -2
  18. package/dist/http/fastify/index.js +38 -38
  19. package/dist/http/fastify/index.mjs +3 -3
  20. package/dist/http/h3/index.js +38 -38
  21. package/dist/http/h3/index.mjs +2 -2
  22. package/dist/http/hono/index.js +34 -34
  23. package/dist/http/hono/index.mjs +2 -2
  24. package/dist/http/hyper-express/index.js +35 -35
  25. package/dist/http/hyper-express/index.mjs +2 -2
  26. package/dist/http/koa/index.js +37 -37
  27. package/dist/http/koa/index.mjs +2 -2
  28. package/dist/index.d.mts +21 -18
  29. package/dist/index.d.ts +21 -18
  30. package/dist/index.js +46 -44
  31. package/dist/index.mjs +6 -4
  32. package/dist/rpc/bullmq/index.js +11 -11
  33. package/dist/rpc/bullmq/index.mjs +2 -2
  34. package/dist/rpc/electron/index.js +8 -8
  35. package/dist/rpc/electron/index.mjs +2 -2
  36. package/dist/rpc/kafka/index.js +10 -10
  37. package/dist/rpc/kafka/index.mjs +2 -2
  38. package/dist/rpc/nats/index.js +11 -11
  39. package/dist/rpc/nats/index.mjs +2 -2
  40. package/dist/rpc/rabbitmq/index.js +12 -12
  41. package/dist/rpc/rabbitmq/index.mjs +2 -2
  42. package/dist/rpc/redis/index.js +10 -10
  43. package/dist/rpc/redis/index.mjs +2 -2
  44. package/dist/rpc/ws/index.js +7 -7
  45. package/dist/rpc/ws/index.mjs +2 -2
  46. package/dist/test.js +6 -6
  47. package/dist/test.mjs +2 -2
  48. package/package.json +31 -31
  49. package/register/utils.mjs +1 -10
  50. package/register/export.mjs +0 -39
@@ -7,7 +7,7 @@ import {
7
7
  LOG_LEVEL,
8
8
  __name,
9
9
  log
10
- } from "./chunk-NQ55PA2X.mjs";
10
+ } from "./chunk-JRNXLEAU.mjs";
11
11
 
12
12
  // src/helper.ts
13
13
  import pc2 from "picocolors";
@@ -25,10 +25,11 @@ var Exception = class extends Error {
25
25
  __name(this, "Exception");
26
26
  }
27
27
  message;
28
+ metadata;
28
29
  status;
29
30
  description;
30
- constructor(message, status = 0, description = "Exception") {
31
- super(message), this.message = message, this.status = status, this.description = description;
31
+ constructor(message, metadata, status = 0, description = "Exception") {
32
+ super(message), this.message = message, this.metadata = metadata, this.status = status, this.description = description;
32
33
  }
33
34
  get data() {
34
35
  return {
@@ -45,8 +46,8 @@ var UndefinedException = class extends Exception {
45
46
  static {
46
47
  __name(this, "UndefinedException");
47
48
  }
48
- constructor(message) {
49
- super(message, 500, "Undefined error");
49
+ constructor(message, metadata) {
50
+ super(message, metadata, 500, "Undefined error");
50
51
  }
51
52
  };
52
53
 
@@ -55,8 +56,8 @@ var ValidateException = class extends Exception {
55
56
  static {
56
57
  __name(this, "ValidateException");
57
58
  }
58
- constructor(message) {
59
- super(message, 400, "Validate exception");
59
+ constructor(message, metadata) {
60
+ super(message, metadata, 400, "Validate exception");
60
61
  }
61
62
  };
62
63
 
@@ -65,8 +66,8 @@ var ForbiddenException = class extends Exception {
65
66
  static {
66
67
  __name(this, "ForbiddenException");
67
68
  }
68
- constructor(message) {
69
- super(message, 403, "Forbidden resource");
69
+ constructor(message, metadata) {
70
+ super(message, metadata, 403, "Forbidden resource");
70
71
  }
71
72
  };
72
73
 
@@ -75,8 +76,8 @@ var BadRequestException = class extends Exception {
75
76
  static {
76
77
  __name(this, "BadRequestException");
77
78
  }
78
- constructor(message) {
79
- super(message, 400, "Bad Request");
79
+ constructor(message, metadata) {
80
+ super(message, metadata, 400, "Bad Request");
80
81
  }
81
82
  };
82
83
 
@@ -85,8 +86,8 @@ var NotFoundException = class extends Exception {
85
86
  static {
86
87
  __name(this, "NotFoundException");
87
88
  }
88
- constructor(message) {
89
- super(message, 404, "Not Found");
89
+ constructor(message, metadata) {
90
+ super(message, metadata, 404, "Not Found");
90
91
  }
91
92
  };
92
93
 
@@ -95,8 +96,8 @@ var ConflictException = class extends Exception {
95
96
  static {
96
97
  __name(this, "ConflictException");
97
98
  }
98
- constructor(message) {
99
- super(message, 409, "Conflict");
99
+ constructor(message, metadata) {
100
+ super(message, metadata, 409, "Conflict");
100
101
  }
101
102
  };
102
103
 
@@ -105,8 +106,8 @@ var BadGatewayException = class extends Exception {
105
106
  static {
106
107
  __name(this, "BadGatewayException");
107
108
  }
108
- constructor(message) {
109
- super(message, 502, "Bad Gatrway");
109
+ constructor(message, metadata) {
110
+ super(message, metadata, 502, "Bad Gatrway");
110
111
  }
111
112
  };
112
113
 
@@ -115,8 +116,8 @@ var InvalidInputException = class extends Exception {
115
116
  static {
116
117
  __name(this, "InvalidInputException");
117
118
  }
118
- constructor(message) {
119
- super(message, 502, "Invalid Input");
119
+ constructor(message, metadata) {
120
+ super(message, metadata, 502, "Invalid Input");
120
121
  }
121
122
  };
122
123
 
@@ -125,8 +126,8 @@ var UnsupportedMediaTypeException = class extends Exception {
125
126
  static {
126
127
  __name(this, "UnsupportedMediaTypeException");
127
128
  }
128
- constructor(message) {
129
- super(message, 415, "Unsupported Media Type");
129
+ constructor(message, metadata) {
130
+ super(message, metadata, 415, "Unsupported Media Type");
130
131
  }
131
132
  };
132
133
 
@@ -135,8 +136,8 @@ var PayloadLargeException = class extends Exception {
135
136
  static {
136
137
  __name(this, "PayloadLargeException");
137
138
  }
138
- constructor(message) {
139
- super(message, 413, "Payload Too Large");
139
+ constructor(message, metadata) {
140
+ super(message, metadata, 413, "Payload Too Large");
140
141
  }
141
142
  };
142
143
 
@@ -145,8 +146,8 @@ var TimeoutException = class extends Exception {
145
146
  static {
146
147
  __name(this, "TimeoutException");
147
148
  }
148
- constructor(message) {
149
- super(message, 408, "Request Timeout");
149
+ constructor(message, metadata) {
150
+ super(message, metadata, 408, "Request Timeout");
150
151
  }
151
152
  };
152
153
 
@@ -155,8 +156,8 @@ var UnauthorizedException = class extends Exception {
155
156
  static {
156
157
  __name(this, "UnauthorizedException");
157
158
  }
158
- constructor(message) {
159
- super(message, 401, "Unauthorized");
159
+ constructor(message, metadata) {
160
+ super(message, metadata, 401, "Unauthorized");
160
161
  }
161
162
  };
162
163
 
@@ -165,8 +166,8 @@ var ServiceUnavailableException = class extends Exception {
165
166
  static {
166
167
  __name(this, "ServiceUnavailableException");
167
168
  }
168
- constructor(message) {
169
- super(message, 503, "Service Unavailable");
169
+ constructor(message, metadata) {
170
+ super(message, metadata, 503, "Service Unavailable");
170
171
  }
171
172
  };
172
173
 
@@ -175,8 +176,8 @@ var FrameworkException = class extends Exception {
175
176
  static {
176
177
  __name(this, "FrameworkException");
177
178
  }
178
- constructor(message) {
179
- super(`[phecda-server] ${message}`, 500, "Framework Error");
179
+ constructor(message, metadata) {
180
+ super(`[phecda-server] ${message}`, metadata, 500, "Framework Error");
180
181
  }
181
182
  };
182
183
 
@@ -185,8 +186,8 @@ var TimerException = class extends Exception {
185
186
  static {
186
187
  __name(this, "TimerException");
187
188
  }
188
- constructor(message) {
189
- super(message, 0, "Timer Error");
189
+ constructor(message, metadata) {
190
+ super(message, metadata, 0, "Timer Error");
190
191
  }
191
192
  };
192
193
 
@@ -195,8 +196,8 @@ var WorkerException = class extends Exception {
195
196
  static {
196
197
  __name(this, "WorkerException");
197
198
  }
198
- constructor(message) {
199
- super(message, 0, "Worker Error");
199
+ constructor(message, metadata) {
200
+ super(message, metadata, 0, "Worker Error");
200
201
  }
201
202
  };
202
203
 
@@ -601,6 +602,7 @@ export {
601
602
  TimerException,
602
603
  WorkerException,
603
604
  defaultPipe,
605
+ defaultFilter,
604
606
  Context,
605
607
  addPipe,
606
608
  addFilter,
@@ -4,7 +4,7 @@ import {
4
4
  PS_EXIT_CODE,
5
5
  __name,
6
6
  log
7
- } from "./chunk-NQ55PA2X.mjs";
7
+ } from "./chunk-JRNXLEAU.mjs";
8
8
 
9
9
  // src/meta.ts
10
10
  var Meta = class {
package/dist/helper.js CHANGED
@@ -5,12 +5,12 @@
5
5
 
6
6
 
7
7
 
8
- var _chunkHKN3AAB2js = require('./chunk-HKN3AAB2.js');
8
+ var _chunkR73A7HS3js = require('./chunk-R73A7HS3.js');
9
9
 
10
10
 
11
11
 
12
12
 
13
- var _chunk4LLLQOMFjs = require('./chunk-4LLLQOMF.js');
13
+ var _chunkOUQM7GZHjs = require('./chunk-OUQM7GZH.js');
14
14
 
15
15
 
16
16
 
@@ -21,4 +21,4 @@ var _chunk4LLLQOMFjs = require('./chunk-4LLLQOMF.js');
21
21
 
22
22
 
23
23
 
24
- exports.HMR = _chunk4LLLQOMFjs.HMR; exports.RELAUNCH = _chunk4LLLQOMFjs.RELAUNCH; exports.RELOAD = _chunk4LLLQOMFjs.RELOAD; exports.createControllerMetaMap = _chunkHKN3AAB2js.createControllerMetaMap; exports.detectAopDep = _chunkHKN3AAB2js.detectAopDep; exports.joinUrl = _chunkHKN3AAB2js.joinUrl; exports.mergeObject = _chunkHKN3AAB2js.mergeObject; exports.resolveDep = _chunkHKN3AAB2js.resolveDep; exports.shallowClone = _chunkHKN3AAB2js.shallowClone;
24
+ exports.HMR = _chunkOUQM7GZHjs.HMR; exports.RELAUNCH = _chunkOUQM7GZHjs.RELAUNCH; exports.RELOAD = _chunkOUQM7GZHjs.RELOAD; exports.createControllerMetaMap = _chunkR73A7HS3js.createControllerMetaMap; exports.detectAopDep = _chunkR73A7HS3js.detectAopDep; exports.joinUrl = _chunkR73A7HS3js.joinUrl; exports.mergeObject = _chunkR73A7HS3js.mergeObject; exports.resolveDep = _chunkR73A7HS3js.resolveDep; exports.shallowClone = _chunkR73A7HS3js.shallowClone;
package/dist/helper.mjs CHANGED
@@ -5,12 +5,12 @@ import {
5
5
  mergeObject,
6
6
  resolveDep,
7
7
  shallowClone
8
- } from "./chunk-BLLRB5DQ.mjs";
8
+ } from "./chunk-US2DTB3Z.mjs";
9
9
  import {
10
10
  HMR,
11
11
  RELAUNCH,
12
12
  RELOAD
13
- } from "./chunk-NQ55PA2X.mjs";
13
+ } from "./chunk-JRNXLEAU.mjs";
14
14
  export {
15
15
  HMR,
16
16
  RELAUNCH,
@@ -1,5 +1,5 @@
1
- import { Elysia as Elysia$1, Context, LocalHook, InputSchema, RouteSchema, SingletonBase } from 'elysia';
2
- import { BaseMacro } from 'elysia/dist/types';
1
+ import { Elysia as Elysia$1, Context } from 'elysia';
2
+ import { AnyLocalHook } from 'elysia/dist/types';
3
3
  import { H as HttpCtx, a as HttpOptions } from '../../types-DtiHAXQB.mjs';
4
4
  import { F as Factory } from '../../core-D1YYphEn.mjs';
5
5
  import 'node:http';
@@ -13,6 +13,6 @@ interface ElysiaCtx extends HttpCtx {
13
13
  }
14
14
  type Addon = (app: Elysia$1<any>) => void;
15
15
  declare function bind(app: Elysia$1<any>, data: Awaited<ReturnType<typeof Factory>>, opts?: HttpOptions): void;
16
- declare function Elysia(opts: LocalHook<InputSchema, RouteSchema, SingletonBase, Record<string, Error>, BaseMacro, any>): any;
16
+ declare function Elysia(opts: AnyLocalHook): any;
17
17
 
18
18
  export { type Addon, Elysia, type ElysiaCtx, bind };
@@ -1,5 +1,5 @@
1
- import { Elysia as Elysia$1, Context, LocalHook, InputSchema, RouteSchema, SingletonBase } from 'elysia';
2
- import { BaseMacro } from 'elysia/dist/types';
1
+ import { Elysia as Elysia$1, Context } from 'elysia';
2
+ import { AnyLocalHook } from 'elysia/dist/types';
3
3
  import { H as HttpCtx, a as HttpOptions } from '../../types-Cosv4nol.js';
4
4
  import { F as Factory } from '../../core-BTSHIAyB.js';
5
5
  import 'node:http';
@@ -13,6 +13,6 @@ interface ElysiaCtx extends HttpCtx {
13
13
  }
14
14
  type Addon = (app: Elysia$1<any>) => void;
15
15
  declare function bind(app: Elysia$1<any>, data: Awaited<ReturnType<typeof Factory>>, opts?: HttpOptions): void;
16
- declare function Elysia(opts: LocalHook<InputSchema, RouteSchema, SingletonBase, Record<string, Error>, BaseMacro, any>): any;
16
+ declare function Elysia(opts: AnyLocalHook): any;
17
17
 
18
18
  export { type Addon, Elysia, type ElysiaCtx, bind };
@@ -1,16 +1,16 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
2
2
 
3
- var _chunkUYZSUBX4js = require('../../chunk-UYZSUBX4.js');
3
+ var _chunkC424F7TVjs = require('../../chunk-C424F7TV.js');
4
4
 
5
5
 
6
6
 
7
7
 
8
8
 
9
9
 
10
- var _chunkHKN3AAB2js = require('../../chunk-HKN3AAB2.js');
10
+ var _chunkR73A7HS3js = require('../../chunk-R73A7HS3.js');
11
11
 
12
12
 
13
- var _chunk4LLLQOMFjs = require('../../chunk-4LLLQOMF.js');
13
+ var _chunkOUQM7GZHjs = require('../../chunk-OUQM7GZH.js');
14
14
 
15
15
  // src/http/elysia/bind.ts
16
16
  var _debug = require('debug'); var _debug2 = _interopRequireDefault(_debug);
@@ -19,14 +19,14 @@ var debug = _debug2.default.call(void 0, "phecda-server/elysia");
19
19
  function bind(app, data, opts = {}) {
20
20
  const { globalGuards, parallelRoute = "/__PHECDA_SERVER__", globalAddons = [], parallelAddons = [], globalFilter, globalPipe, dynamic = false } = opts;
21
21
  const { moduleMap, meta } = data;
22
- const metaMap = _chunkHKN3AAB2js.createControllerMetaMap.call(void 0, meta, (meta2) => {
22
+ const metaMap = _chunkR73A7HS3js.createControllerMetaMap.call(void 0, meta, (meta2) => {
23
23
  const { controller, http, method, tag } = meta2.data;
24
24
  if (controller === "http" && _optionalChain([http, 'optionalAccess', _ => _.method])) {
25
25
  debug(`register method "${method}" in module "${tag}"`);
26
26
  return true;
27
27
  }
28
28
  });
29
- _chunkHKN3AAB2js.detectAopDep.call(void 0, meta, {
29
+ _chunkR73A7HS3js.detectAopDep.call(void 0, meta, {
30
30
  addons: [
31
31
  ...globalAddons,
32
32
  ...parallelAddons
@@ -35,29 +35,29 @@ function bind(app, data, opts = {}) {
35
35
  });
36
36
  registerRoute();
37
37
  function registerRoute() {
38
- _chunkHKN3AAB2js.Context.applyAddons(globalAddons, app, "elysia");
38
+ _chunkR73A7HS3js.Context.applyAddons(globalAddons, app, "elysia");
39
39
  if (parallelRoute) {
40
40
  const parallelRouter = new (0, _elysia.Elysia)();
41
- _chunkHKN3AAB2js.Context.applyAddons(parallelAddons, app, "elysia");
41
+ _chunkR73A7HS3js.Context.applyAddons(parallelAddons, app, "elysia");
42
42
  parallelRouter.post(parallelRoute, async (c) => {
43
43
  const { body } = c;
44
44
  async function errorHandler(e) {
45
- const error = await _chunkHKN3AAB2js.Context.filterRecord.default(e);
45
+ const error = await _chunkR73A7HS3js.Context.filterRecord.default(e);
46
46
  c.set.status = error.status;
47
47
  return error;
48
48
  }
49
- _chunk4LLLQOMFjs.__name.call(void 0, errorHandler, "errorHandler");
50
- if (!Array.isArray(body)) return errorHandler(new (0, _chunkHKN3AAB2js.BadRequestException)("data format should be an array"));
49
+ _chunkOUQM7GZHjs.__name.call(void 0, errorHandler, "errorHandler");
50
+ if (!Array.isArray(body)) return errorHandler(new (0, _chunkR73A7HS3js.BadRequestException)("data format should be an array"));
51
51
  try {
52
52
  return Promise.all(body.map((item, i) => {
53
53
  return new Promise(async (resolve) => {
54
54
  if (!item) return resolve(null);
55
55
  const { tag, method } = item;
56
56
  debug(`(parallel)invoke method "${method}" in module "${tag}"`);
57
- if (!metaMap.has(tag)) return resolve(await _chunkHKN3AAB2js.Context.filterRecord.default(new (0, _chunkHKN3AAB2js.BadRequestException)(`module "${tag}" doesn't exist`)));
57
+ if (!metaMap.has(tag)) return resolve(await _chunkR73A7HS3js.Context.filterRecord.default(new (0, _chunkR73A7HS3js.BadRequestException)(`module "${tag}" doesn't exist`)));
58
58
  const meta2 = metaMap.get(tag)[method];
59
- if (!meta2) return resolve(await _chunkHKN3AAB2js.Context.filterRecord.default(new (0, _chunkHKN3AAB2js.BadRequestException)(`"${method}" in "${tag}" doesn't exist`)));
60
- const aop = _chunkHKN3AAB2js.Context.getAop(meta2, {
59
+ if (!meta2) return resolve(await _chunkR73A7HS3js.Context.filterRecord.default(new (0, _chunkR73A7HS3js.BadRequestException)(`"${method}" in "${tag}" doesn't exist`)));
60
+ const aop = _chunkR73A7HS3js.Context.getAop(meta2, {
61
61
  globalGuards,
62
62
  globalFilter,
63
63
  globalPipe
@@ -72,23 +72,23 @@ function bind(app, data, opts = {}) {
72
72
  moduleMap,
73
73
  app,
74
74
  ...item,
75
- getCookie: /* @__PURE__ */ _chunk4LLLQOMFjs.__name.call(void 0, (key) => c.cookie[key].value, "getCookie"),
76
- setCookie: /* @__PURE__ */ _chunk4LLLQOMFjs.__name.call(void 0, (key, value, opts2 = {}) => c.cookie[key].set({
75
+ getCookie: /* @__PURE__ */ _chunkOUQM7GZHjs.__name.call(void 0, (key) => c.cookie[key].value, "getCookie"),
76
+ setCookie: /* @__PURE__ */ _chunkOUQM7GZHjs.__name.call(void 0, (key, value, opts2 = {}) => c.cookie[key].set({
77
77
  ...opts2,
78
78
  value
79
79
  }), "setCookie"),
80
- delCookie: /* @__PURE__ */ _chunk4LLLQOMFjs.__name.call(void 0, (key) => c.cookie[key].remove(), "delCookie"),
81
- redirect: /* @__PURE__ */ _chunk4LLLQOMFjs.__name.call(void 0, (url) => c.redirect(url), "redirect"),
82
- setResHeaders: /* @__PURE__ */ _chunk4LLLQOMFjs.__name.call(void 0, (headers) => Object.assign(c.set.headers, headers), "setResHeaders"),
83
- setResStatus: /* @__PURE__ */ _chunk4LLLQOMFjs.__name.call(void 0, (status) => c.set.status = status, "setResStatus"),
84
- getRequest: /* @__PURE__ */ _chunk4LLLQOMFjs.__name.call(void 0, () => {
80
+ delCookie: /* @__PURE__ */ _chunkOUQM7GZHjs.__name.call(void 0, (key) => c.cookie[key].remove(), "delCookie"),
81
+ redirect: /* @__PURE__ */ _chunkOUQM7GZHjs.__name.call(void 0, (url) => c.redirect(url), "redirect"),
82
+ setResHeaders: /* @__PURE__ */ _chunkOUQM7GZHjs.__name.call(void 0, (headers) => Object.assign(c.set.headers, headers), "setResHeaders"),
83
+ setResStatus: /* @__PURE__ */ _chunkOUQM7GZHjs.__name.call(void 0, (status) => c.set.status = status, "setResStatus"),
84
+ getRequest: /* @__PURE__ */ _chunkOUQM7GZHjs.__name.call(void 0, () => {
85
85
  throw new Error("elysia can't support getRequest");
86
86
  }, "getRequest"),
87
- getResponse: /* @__PURE__ */ _chunk4LLLQOMFjs.__name.call(void 0, () => {
87
+ getResponse: /* @__PURE__ */ _chunkOUQM7GZHjs.__name.call(void 0, () => {
88
88
  throw new Error("elysia can't support getResponse");
89
89
  }, "getResponse")
90
90
  };
91
- const context = new (0, _chunkHKN3AAB2js.Context)(contextData);
91
+ const context = new (0, _chunkR73A7HS3js.Context)(contextData);
92
92
  context.run(aop, resolve, resolve);
93
93
  });
94
94
  })).then((ret) => {
@@ -110,14 +110,14 @@ function bind(app, data, opts = {}) {
110
110
  if (!_optionalChain([http, 'optionalAccess', _2 => _2.method])) continue;
111
111
  let aop;
112
112
  if (!dynamic) {
113
- aop = _chunkHKN3AAB2js.Context.getAop(meta2, {
113
+ aop = _chunkR73A7HS3js.Context.getAop(meta2, {
114
114
  globalFilter,
115
115
  globalGuards,
116
116
  globalPipe
117
117
  });
118
118
  }
119
- _chunkHKN3AAB2js.Context.applyAddons(addons, subApp, "elysia");
120
- subApp[http.method](_chunkHKN3AAB2js.joinUrl.call(void 0, http.prefix, http.route), async (c) => {
119
+ _chunkR73A7HS3js.Context.applyAddons(addons, subApp, "elysia");
120
+ subApp[http.method](_chunkR73A7HS3js.joinUrl.call(void 0, http.prefix, http.route), async (c) => {
121
121
  debug(`invoke method "${method}" in module "${tag}"`);
122
122
  const contextData = {
123
123
  type: "elysia",
@@ -132,33 +132,33 @@ function bind(app, data, opts = {}) {
132
132
  params: c.params,
133
133
  headers: c.headers,
134
134
  app,
135
- getCookie: /* @__PURE__ */ _chunk4LLLQOMFjs.__name.call(void 0, (key) => c.cookie[key].value, "getCookie"),
136
- setCookie: /* @__PURE__ */ _chunk4LLLQOMFjs.__name.call(void 0, (key, value, opts2 = {}) => c.cookie[key].set({
135
+ getCookie: /* @__PURE__ */ _chunkOUQM7GZHjs.__name.call(void 0, (key) => c.cookie[key].value, "getCookie"),
136
+ setCookie: /* @__PURE__ */ _chunkOUQM7GZHjs.__name.call(void 0, (key, value, opts2 = {}) => c.cookie[key].set({
137
137
  ...opts2,
138
138
  value
139
139
  }), "setCookie"),
140
- delCookie: /* @__PURE__ */ _chunk4LLLQOMFjs.__name.call(void 0, (key) => c.cookie[key].remove(), "delCookie"),
141
- redirect: /* @__PURE__ */ _chunk4LLLQOMFjs.__name.call(void 0, (url) => c.redirect(url), "redirect"),
142
- setResHeaders: /* @__PURE__ */ _chunk4LLLQOMFjs.__name.call(void 0, (headers) => Object.assign(c.set.headers, headers), "setResHeaders"),
143
- setResStatus: /* @__PURE__ */ _chunk4LLLQOMFjs.__name.call(void 0, (status) => c.set.status = status, "setResStatus"),
144
- getRequest: /* @__PURE__ */ _chunk4LLLQOMFjs.__name.call(void 0, () => {
140
+ delCookie: /* @__PURE__ */ _chunkOUQM7GZHjs.__name.call(void 0, (key) => c.cookie[key].remove(), "delCookie"),
141
+ redirect: /* @__PURE__ */ _chunkOUQM7GZHjs.__name.call(void 0, (url) => c.redirect(url), "redirect"),
142
+ setResHeaders: /* @__PURE__ */ _chunkOUQM7GZHjs.__name.call(void 0, (headers) => Object.assign(c.set.headers, headers), "setResHeaders"),
143
+ setResStatus: /* @__PURE__ */ _chunkOUQM7GZHjs.__name.call(void 0, (status) => c.set.status = status, "setResStatus"),
144
+ getRequest: /* @__PURE__ */ _chunkOUQM7GZHjs.__name.call(void 0, () => {
145
145
  throw new Error("elysia can't support getRequest");
146
146
  }, "getRequest"),
147
- getResponse: /* @__PURE__ */ _chunk4LLLQOMFjs.__name.call(void 0, () => {
147
+ getResponse: /* @__PURE__ */ _chunkOUQM7GZHjs.__name.call(void 0, () => {
148
148
  throw new Error("elysia can't support getResponse");
149
149
  }, "getResponse")
150
150
  };
151
151
  if (dynamic) {
152
- aop = _chunkHKN3AAB2js.Context.getAop(meta2, {
152
+ aop = _chunkR73A7HS3js.Context.getAop(meta2, {
153
153
  globalFilter,
154
154
  globalGuards,
155
155
  globalPipe
156
156
  });
157
157
  }
158
- const context = new (0, _chunkHKN3AAB2js.Context)(contextData);
158
+ const context = new (0, _chunkR73A7HS3js.Context)(contextData);
159
159
  if (http.headers) c.set.headers = http.headers;
160
160
  if (dynamic) {
161
- aop = _chunkHKN3AAB2js.Context.getAop(meta2, {
161
+ aop = _chunkR73A7HS3js.Context.getAop(meta2, {
162
162
  globalFilter,
163
163
  globalGuards,
164
164
  globalPipe
@@ -173,13 +173,13 @@ function bind(app, data, opts = {}) {
173
173
  }
174
174
  }
175
175
  }
176
- _chunk4LLLQOMFjs.__name.call(void 0, registerRoute, "registerRoute");
176
+ _chunkOUQM7GZHjs.__name.call(void 0, registerRoute, "registerRoute");
177
177
  }
178
- _chunk4LLLQOMFjs.__name.call(void 0, bind, "bind");
178
+ _chunkOUQM7GZHjs.__name.call(void 0, bind, "bind");
179
179
  function Elysia(opts) {
180
- return _chunkUYZSUBX4js.Define.call(void 0, "elysia", opts);
180
+ return _chunkC424F7TVjs.Define.call(void 0, "elysia", opts);
181
181
  }
182
- _chunk4LLLQOMFjs.__name.call(void 0, Elysia, "Elysia");
182
+ _chunkOUQM7GZHjs.__name.call(void 0, Elysia, "Elysia");
183
183
 
184
184
 
185
185
 
@@ -1,16 +1,16 @@
1
1
  import {
2
2
  Define
3
- } from "../../chunk-FI5756JX.mjs";
3
+ } from "../../chunk-LYLSA56Y.mjs";
4
4
  import {
5
5
  BadRequestException,
6
6
  Context,
7
7
  createControllerMetaMap,
8
8
  detectAopDep,
9
9
  joinUrl
10
- } from "../../chunk-BLLRB5DQ.mjs";
10
+ } from "../../chunk-US2DTB3Z.mjs";
11
11
  import {
12
12
  __name
13
- } from "../../chunk-NQ55PA2X.mjs";
13
+ } from "../../chunk-JRNXLEAU.mjs";
14
14
 
15
15
  // src/http/elysia/bind.ts
16
16
  import Debug from "debug";