phecda-server 8.6.0 → 8.7.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 (92) hide show
  1. package/bin/cli.mjs +1 -9
  2. package/dist/{chunk-XOWAQGBO.js → chunk-CCK6KDM3.js} +59 -65
  3. package/dist/{chunk-LLF55NZP.js → chunk-IBVPZSZJ.js} +6 -6
  4. package/dist/{chunk-URKOYTBU.mjs → chunk-ITDH2YDL.mjs} +6 -6
  5. package/dist/{chunk-5ZZAOOKE.js → chunk-KVWT2QTL.js} +26 -26
  6. package/dist/{chunk-LQFHZGVJ.mjs → chunk-LNL3MVTR.mjs} +2 -8
  7. package/dist/{chunk-ZHNYWZRL.mjs → chunk-T5F6Q2CZ.mjs} +1 -1
  8. package/dist/{chunk-MUUKKO67.mjs → chunk-UK3RDUEP.mjs} +1 -1
  9. package/dist/{chunk-SKGOTR4T.js → chunk-UP64TNWR.js} +20 -20
  10. package/dist/{core-BiS3xJKx.d.ts → core-Bd2ynlyb.d.ts} +1 -1
  11. package/dist/{core-BYxcQ8kf.d.mts → core-nqk9d66O.d.mts} +1 -1
  12. package/dist/helper.d.mts +1 -1
  13. package/dist/helper.d.ts +1 -1
  14. package/dist/helper.js +3 -3
  15. package/dist/helper.mjs +2 -2
  16. package/dist/http/elysia/index.d.mts +3 -3
  17. package/dist/http/elysia/index.d.ts +3 -3
  18. package/dist/http/elysia/index.js +40 -40
  19. package/dist/http/elysia/index.mjs +3 -3
  20. package/dist/http/express/index.d.mts +3 -3
  21. package/dist/http/express/index.d.ts +3 -3
  22. package/dist/http/express/index.js +37 -37
  23. package/dist/http/express/index.mjs +2 -2
  24. package/dist/http/fastify/index.d.mts +3 -3
  25. package/dist/http/fastify/index.d.ts +3 -3
  26. package/dist/http/fastify/index.js +38 -38
  27. package/dist/http/fastify/index.mjs +3 -3
  28. package/dist/http/h3/index.d.mts +3 -3
  29. package/dist/http/h3/index.d.ts +3 -3
  30. package/dist/http/h3/index.js +38 -38
  31. package/dist/http/h3/index.mjs +2 -2
  32. package/dist/http/hono/index.d.mts +3 -3
  33. package/dist/http/hono/index.d.ts +3 -3
  34. package/dist/http/hono/index.js +34 -34
  35. package/dist/http/hono/index.mjs +2 -2
  36. package/dist/http/hyper-express/index.d.mts +3 -3
  37. package/dist/http/hyper-express/index.d.ts +3 -3
  38. package/dist/http/hyper-express/index.js +35 -35
  39. package/dist/http/hyper-express/index.mjs +2 -2
  40. package/dist/http/koa/index.d.mts +3 -3
  41. package/dist/http/koa/index.d.ts +3 -3
  42. package/dist/http/koa/index.js +37 -37
  43. package/dist/http/koa/index.mjs +2 -2
  44. package/dist/index.d.mts +8 -8
  45. package/dist/index.d.ts +8 -8
  46. package/dist/index.js +54 -54
  47. package/dist/index.mjs +14 -14
  48. package/dist/{meta-Csp1xcSR.d.mts → meta-ZbvaS7xK.d.mts} +2 -2
  49. package/dist/{meta-Csp1xcSR.d.ts → meta-ZbvaS7xK.d.ts} +2 -2
  50. package/dist/rpc/bullmq/index.d.mts +3 -3
  51. package/dist/rpc/bullmq/index.d.ts +3 -3
  52. package/dist/rpc/bullmq/index.js +11 -11
  53. package/dist/rpc/bullmq/index.mjs +2 -2
  54. package/dist/rpc/electron/index.d.mts +3 -3
  55. package/dist/rpc/electron/index.d.ts +3 -3
  56. package/dist/rpc/electron/index.js +8 -8
  57. package/dist/rpc/electron/index.mjs +2 -2
  58. package/dist/rpc/kafka/index.d.mts +3 -3
  59. package/dist/rpc/kafka/index.d.ts +3 -3
  60. package/dist/rpc/kafka/index.js +10 -10
  61. package/dist/rpc/kafka/index.mjs +2 -2
  62. package/dist/rpc/nats/index.d.mts +3 -3
  63. package/dist/rpc/nats/index.d.ts +3 -3
  64. package/dist/rpc/nats/index.js +11 -11
  65. package/dist/rpc/nats/index.mjs +2 -2
  66. package/dist/rpc/rabbitmq/index.d.mts +3 -3
  67. package/dist/rpc/rabbitmq/index.d.ts +3 -3
  68. package/dist/rpc/rabbitmq/index.js +12 -12
  69. package/dist/rpc/rabbitmq/index.mjs +2 -2
  70. package/dist/rpc/redis/index.d.mts +3 -3
  71. package/dist/rpc/redis/index.d.ts +3 -3
  72. package/dist/rpc/redis/index.js +10 -10
  73. package/dist/rpc/redis/index.mjs +2 -2
  74. package/dist/rpc/web-ext/index.d.mts +3 -3
  75. package/dist/rpc/web-ext/index.d.ts +3 -3
  76. package/dist/rpc/web-ext/index.js +8 -8
  77. package/dist/rpc/web-ext/index.mjs +2 -2
  78. package/dist/rpc/ws/index.d.mts +3 -3
  79. package/dist/rpc/ws/index.d.ts +3 -3
  80. package/dist/rpc/ws/index.js +7 -7
  81. package/dist/rpc/ws/index.mjs +2 -2
  82. package/dist/test.d.mts +2 -2
  83. package/dist/test.d.ts +2 -2
  84. package/dist/test.js +6 -6
  85. package/dist/test.mjs +2 -2
  86. package/dist/{types-Bs64nYvd.d.ts → types-B4zY7i87.d.ts} +1 -1
  87. package/dist/{types-CjVwVyJT.d.mts → types-BfcBZVua.d.mts} +1 -1
  88. package/dist/{types-DExQe0qk.d.ts → types-CHWgzilt.d.ts} +1 -1
  89. package/dist/{types-DSlyrmns.d.mts → types-f_hV_rCD.d.mts} +1 -1
  90. package/package.json +1 -1
  91. package/register/index.mjs +2 -0
  92. package/register/loader.mjs +3 -3
@@ -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 _chunk5ZZAOOKEjs = require('../../chunk-5ZZAOOKE.js');
3
+ var _chunkKVWT2QTLjs = require('../../chunk-KVWT2QTL.js');
4
4
 
5
5
 
6
6
 
7
7
 
8
8
 
9
9
 
10
- var _chunkXOWAQGBOjs = require('../../chunk-XOWAQGBO.js');
10
+ var _chunkCCK6KDM3js = require('../../chunk-CCK6KDM3.js');
11
11
 
12
12
 
13
- var _chunkLLF55NZPjs = require('../../chunk-LLF55NZP.js');
13
+ var _chunkIBVPZSZJjs = require('../../chunk-IBVPZSZJ.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, globalAddons = [], parallelAddons = [], globalFilter, globalPipe, dynamic = false } = opts;
21
21
  const { moduleMap, meta } = data;
22
- const metaMap = _chunkXOWAQGBOjs.createControllerMetaMap.call(void 0, meta, (meta2) => {
22
+ const metaMap = _chunkCCK6KDM3js.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
- _chunkXOWAQGBOjs.detectAopDep.call(void 0, meta, {
29
+ _chunkCCK6KDM3js.detectAopDep.call(void 0, meta, {
30
30
  addons: [
31
31
  ...globalAddons,
32
32
  ...parallelAddons
@@ -35,19 +35,19 @@ function bind(app, data, opts = {}) {
35
35
  });
36
36
  registerRoute();
37
37
  function registerRoute() {
38
- _chunkXOWAQGBOjs.Context.applyAddons(globalAddons, app, "elysia");
38
+ _chunkCCK6KDM3js.Context.applyAddons(globalAddons, app, "elysia");
39
39
  if (parallelRoute) {
40
40
  const parallelRouter = new (0, _elysia.Elysia)();
41
- _chunkXOWAQGBOjs.Context.applyAddons(parallelAddons, app, "elysia");
41
+ _chunkCCK6KDM3js.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 _chunkXOWAQGBOjs.Context.filterRecord.default(e);
45
+ const error = await _chunkCCK6KDM3js.Context.filterRecord.default(e);
46
46
  c.set.status = error.status;
47
47
  return error;
48
48
  }
49
- _chunkLLF55NZPjs.__name.call(void 0, errorHandler, "errorHandler");
50
- if (!Array.isArray(body)) return errorHandler(new (0, _chunkXOWAQGBOjs.BadRequestException)("data format should be an array"));
49
+ _chunkIBVPZSZJjs.__name.call(void 0, errorHandler, "errorHandler");
50
+ if (!Array.isArray(body)) return errorHandler(new (0, _chunkCCK6KDM3js.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) => {
@@ -55,13 +55,13 @@ function bind(app, data, opts = {}) {
55
55
  const { tag, method } = item;
56
56
  debug(`(parallel)invoke method "${method}" in module "${tag}"`);
57
57
  if (!metaMap.has(tag)) {
58
- return resolve(await _chunkXOWAQGBOjs.Context.filterRecord.default(new (0, _chunkXOWAQGBOjs.BadRequestException)(`module "${tag}" doesn't exist`)));
58
+ return resolve(await _chunkCCK6KDM3js.Context.filterRecord.default(new (0, _chunkCCK6KDM3js.BadRequestException)(`module "${tag}" doesn't exist`)));
59
59
  }
60
60
  const meta2 = metaMap.get(tag)[method];
61
61
  if (!meta2) {
62
- return resolve(await _chunkXOWAQGBOjs.Context.filterRecord.default(new (0, _chunkXOWAQGBOjs.BadRequestException)(`"${method}" in "${tag}" doesn't exist`)));
62
+ return resolve(await _chunkCCK6KDM3js.Context.filterRecord.default(new (0, _chunkCCK6KDM3js.BadRequestException)(`"${method}" in "${tag}" doesn't exist`)));
63
63
  }
64
- const aop = _chunkXOWAQGBOjs.Context.getAop(meta2, {
64
+ const aop = _chunkCCK6KDM3js.Context.getAop(meta2, {
65
65
  globalGuards,
66
66
  globalFilter,
67
67
  globalPipe
@@ -76,23 +76,23 @@ function bind(app, data, opts = {}) {
76
76
  moduleMap,
77
77
  app,
78
78
  ...item,
79
- getCookie: /* @__PURE__ */ _chunkLLF55NZPjs.__name.call(void 0, (key) => c.cookie[key].value, "getCookie"),
80
- setCookie: /* @__PURE__ */ _chunkLLF55NZPjs.__name.call(void 0, (key, value, opts2 = {}) => c.cookie[key].set({
79
+ getCookie: /* @__PURE__ */ _chunkIBVPZSZJjs.__name.call(void 0, (key) => c.cookie[key].value, "getCookie"),
80
+ setCookie: /* @__PURE__ */ _chunkIBVPZSZJjs.__name.call(void 0, (key, value, opts2 = {}) => c.cookie[key].set({
81
81
  ...opts2,
82
82
  value
83
83
  }), "setCookie"),
84
- delCookie: /* @__PURE__ */ _chunkLLF55NZPjs.__name.call(void 0, (key) => c.cookie[key].remove(), "delCookie"),
85
- redirect: /* @__PURE__ */ _chunkLLF55NZPjs.__name.call(void 0, (url) => c.redirect(url), "redirect"),
86
- setResHeaders: /* @__PURE__ */ _chunkLLF55NZPjs.__name.call(void 0, (headers) => Object.assign(c.set.headers, headers), "setResHeaders"),
87
- setResStatus: /* @__PURE__ */ _chunkLLF55NZPjs.__name.call(void 0, (status) => c.set.status = status, "setResStatus"),
88
- getRequest: /* @__PURE__ */ _chunkLLF55NZPjs.__name.call(void 0, () => {
84
+ delCookie: /* @__PURE__ */ _chunkIBVPZSZJjs.__name.call(void 0, (key) => c.cookie[key].remove(), "delCookie"),
85
+ redirect: /* @__PURE__ */ _chunkIBVPZSZJjs.__name.call(void 0, (url) => c.redirect(url), "redirect"),
86
+ setResHeaders: /* @__PURE__ */ _chunkIBVPZSZJjs.__name.call(void 0, (headers) => Object.assign(c.set.headers, headers), "setResHeaders"),
87
+ setResStatus: /* @__PURE__ */ _chunkIBVPZSZJjs.__name.call(void 0, (status) => c.set.status = status, "setResStatus"),
88
+ getRequest: /* @__PURE__ */ _chunkIBVPZSZJjs.__name.call(void 0, () => {
89
89
  throw new Error("elysia can't support getRequest");
90
90
  }, "getRequest"),
91
- getResponse: /* @__PURE__ */ _chunkLLF55NZPjs.__name.call(void 0, () => {
91
+ getResponse: /* @__PURE__ */ _chunkIBVPZSZJjs.__name.call(void 0, () => {
92
92
  throw new Error("elysia can't support getResponse");
93
93
  }, "getResponse")
94
94
  };
95
- const context = new (0, _chunkXOWAQGBOjs.Context)(contextData);
95
+ const context = new (0, _chunkCCK6KDM3js.Context)(contextData);
96
96
  context.run(aop, resolve, resolve);
97
97
  });
98
98
  })).then((ret) => {
@@ -114,14 +114,14 @@ function bind(app, data, opts = {}) {
114
114
  if (!_optionalChain([http, 'optionalAccess', _2 => _2.method])) continue;
115
115
  let aop;
116
116
  if (!dynamic) {
117
- aop = _chunkXOWAQGBOjs.Context.getAop(meta2, {
117
+ aop = _chunkCCK6KDM3js.Context.getAop(meta2, {
118
118
  globalFilter,
119
119
  globalGuards,
120
120
  globalPipe
121
121
  });
122
122
  }
123
- _chunkXOWAQGBOjs.Context.applyAddons(addons, subApp, "elysia");
124
- subApp[http.method](_chunkXOWAQGBOjs.joinUrl.call(void 0, http.prefix, http.route), async (c) => {
123
+ _chunkCCK6KDM3js.Context.applyAddons(addons, subApp, "elysia");
124
+ subApp[http.method](_chunkCCK6KDM3js.joinUrl.call(void 0, http.prefix, http.route), async (c) => {
125
125
  debug(`invoke method "${method}" in module "${tag}"`);
126
126
  const contextData = {
127
127
  type: "elysia",
@@ -136,33 +136,33 @@ function bind(app, data, opts = {}) {
136
136
  params: c.params,
137
137
  headers: c.headers,
138
138
  app,
139
- getCookie: /* @__PURE__ */ _chunkLLF55NZPjs.__name.call(void 0, (key) => c.cookie[key].value, "getCookie"),
140
- setCookie: /* @__PURE__ */ _chunkLLF55NZPjs.__name.call(void 0, (key, value, opts2 = {}) => c.cookie[key].set({
139
+ getCookie: /* @__PURE__ */ _chunkIBVPZSZJjs.__name.call(void 0, (key) => c.cookie[key].value, "getCookie"),
140
+ setCookie: /* @__PURE__ */ _chunkIBVPZSZJjs.__name.call(void 0, (key, value, opts2 = {}) => c.cookie[key].set({
141
141
  ...opts2,
142
142
  value
143
143
  }), "setCookie"),
144
- delCookie: /* @__PURE__ */ _chunkLLF55NZPjs.__name.call(void 0, (key) => c.cookie[key].remove(), "delCookie"),
145
- redirect: /* @__PURE__ */ _chunkLLF55NZPjs.__name.call(void 0, (url) => c.redirect(url), "redirect"),
146
- setResHeaders: /* @__PURE__ */ _chunkLLF55NZPjs.__name.call(void 0, (headers) => Object.assign(c.set.headers, headers), "setResHeaders"),
147
- setResStatus: /* @__PURE__ */ _chunkLLF55NZPjs.__name.call(void 0, (status) => c.set.status = status, "setResStatus"),
148
- getRequest: /* @__PURE__ */ _chunkLLF55NZPjs.__name.call(void 0, () => {
144
+ delCookie: /* @__PURE__ */ _chunkIBVPZSZJjs.__name.call(void 0, (key) => c.cookie[key].remove(), "delCookie"),
145
+ redirect: /* @__PURE__ */ _chunkIBVPZSZJjs.__name.call(void 0, (url) => c.redirect(url), "redirect"),
146
+ setResHeaders: /* @__PURE__ */ _chunkIBVPZSZJjs.__name.call(void 0, (headers) => Object.assign(c.set.headers, headers), "setResHeaders"),
147
+ setResStatus: /* @__PURE__ */ _chunkIBVPZSZJjs.__name.call(void 0, (status) => c.set.status = status, "setResStatus"),
148
+ getRequest: /* @__PURE__ */ _chunkIBVPZSZJjs.__name.call(void 0, () => {
149
149
  throw new Error("elysia can't support getRequest");
150
150
  }, "getRequest"),
151
- getResponse: /* @__PURE__ */ _chunkLLF55NZPjs.__name.call(void 0, () => {
151
+ getResponse: /* @__PURE__ */ _chunkIBVPZSZJjs.__name.call(void 0, () => {
152
152
  throw new Error("elysia can't support getResponse");
153
153
  }, "getResponse")
154
154
  };
155
155
  if (dynamic) {
156
- aop = _chunkXOWAQGBOjs.Context.getAop(meta2, {
156
+ aop = _chunkCCK6KDM3js.Context.getAop(meta2, {
157
157
  globalFilter,
158
158
  globalGuards,
159
159
  globalPipe
160
160
  });
161
161
  }
162
- const context = new (0, _chunkXOWAQGBOjs.Context)(contextData);
162
+ const context = new (0, _chunkCCK6KDM3js.Context)(contextData);
163
163
  if (http.headers) c.set.headers = http.headers;
164
164
  if (dynamic) {
165
- aop = _chunkXOWAQGBOjs.Context.getAop(meta2, {
165
+ aop = _chunkCCK6KDM3js.Context.getAop(meta2, {
166
166
  globalFilter,
167
167
  globalGuards,
168
168
  globalPipe
@@ -177,13 +177,13 @@ function bind(app, data, opts = {}) {
177
177
  }
178
178
  }
179
179
  }
180
- _chunkLLF55NZPjs.__name.call(void 0, registerRoute, "registerRoute");
180
+ _chunkIBVPZSZJjs.__name.call(void 0, registerRoute, "registerRoute");
181
181
  }
182
- _chunkLLF55NZPjs.__name.call(void 0, bind, "bind");
182
+ _chunkIBVPZSZJjs.__name.call(void 0, bind, "bind");
183
183
  function Elysia(opts) {
184
- return _chunk5ZZAOOKEjs.Define.call(void 0, "elysia", opts);
184
+ return _chunkKVWT2QTLjs.Define.call(void 0, "elysia", opts);
185
185
  }
186
- _chunkLLF55NZPjs.__name.call(void 0, Elysia, "Elysia");
186
+ _chunkIBVPZSZJjs.__name.call(void 0, Elysia, "Elysia");
187
187
 
188
188
 
189
189
 
@@ -1,16 +1,16 @@
1
1
  import {
2
2
  Define
3
- } from "../../chunk-MUUKKO67.mjs";
3
+ } from "../../chunk-UK3RDUEP.mjs";
4
4
  import {
5
5
  BadRequestException,
6
6
  Context,
7
7
  createControllerMetaMap,
8
8
  detectAopDep,
9
9
  joinUrl
10
- } from "../../chunk-LQFHZGVJ.mjs";
10
+ } from "../../chunk-LNL3MVTR.mjs";
11
11
  import {
12
12
  __name
13
- } from "../../chunk-URKOYTBU.mjs";
13
+ } from "../../chunk-ITDH2YDL.mjs";
14
14
 
15
15
  // src/http/elysia/bind.ts
16
16
  import Debug from "debug";
@@ -1,8 +1,8 @@
1
1
  import { RequestHandler, Request, Response, Router } from 'express';
2
- import { H as HttpCtx, a as HttpOptions } from '../../types-CjVwVyJT.mjs';
3
- import { F as Factory } from '../../core-BYxcQ8kf.mjs';
2
+ import { H as HttpCtx, a as HttpOptions } from '../../types-BfcBZVua.mjs';
3
+ import { F as Factory } from '../../core-nqk9d66O.mjs';
4
4
  import 'node:http';
5
- import '../../meta-Csp1xcSR.mjs';
5
+ import '../../meta-ZbvaS7xK.mjs';
6
6
  import 'phecda-core';
7
7
 
8
8
  interface ExpressCtx extends HttpCtx {
@@ -1,8 +1,8 @@
1
1
  import { RequestHandler, Request, Response, Router } from 'express';
2
- import { H as HttpCtx, a as HttpOptions } from '../../types-Bs64nYvd.js';
3
- import { F as Factory } from '../../core-BiS3xJKx.js';
2
+ import { H as HttpCtx, a as HttpOptions } from '../../types-B4zY7i87.js';
3
+ import { F as Factory } from '../../core-Bd2ynlyb.js';
4
4
  import 'node:http';
5
- import '../../meta-Csp1xcSR.js';
5
+ import '../../meta-ZbvaS7xK.js';
6
6
  import 'phecda-core';
7
7
 
8
8
  interface ExpressCtx extends HttpCtx {
@@ -4,11 +4,11 @@
4
4
 
5
5
 
6
6
 
7
- var _chunkXOWAQGBOjs = require('../../chunk-XOWAQGBO.js');
7
+ var _chunkCCK6KDM3js = require('../../chunk-CCK6KDM3.js');
8
8
 
9
9
 
10
10
 
11
- var _chunkLLF55NZPjs = require('../../chunk-LLF55NZP.js');
11
+ var _chunkIBVPZSZJjs = require('../../chunk-IBVPZSZJ.js');
12
12
 
13
13
  // src/http/express/bind.ts
14
14
  var _express = require('express');
@@ -18,14 +18,14 @@ function bind(router, data, opts = {}) {
18
18
  const { globalGuards, parallelRoute, globalAddons = [], parallelAddons = [], globalFilter, globalPipe, dynamic = false } = opts;
19
19
  const { moduleMap, meta } = data;
20
20
  const originStack = router.stack.slice(0, router.stack.length);
21
- const metaMap = _chunkXOWAQGBOjs.createControllerMetaMap.call(void 0, meta, (meta2) => {
21
+ const metaMap = _chunkCCK6KDM3js.createControllerMetaMap.call(void 0, meta, (meta2) => {
22
22
  const { controller, http, method, tag } = meta2.data;
23
23
  if (controller === "http" && _optionalChain([http, 'optionalAccess', _ => _.method])) {
24
24
  debug(`register method "${method}" in module "${tag}"`);
25
25
  return true;
26
26
  }
27
27
  });
28
- _chunkXOWAQGBOjs.detectAopDep.call(void 0, meta, {
28
+ _chunkCCK6KDM3js.detectAopDep.call(void 0, meta, {
29
29
  addons: [
30
30
  ...globalAddons,
31
31
  ...parallelAddons
@@ -33,33 +33,33 @@ function bind(router, data, opts = {}) {
33
33
  guards: globalGuards
34
34
  });
35
35
  registerRoute();
36
- _chunkLLF55NZPjs.HMR.call(void 0, async () => {
36
+ _chunkIBVPZSZJjs.HMR.call(void 0, async () => {
37
37
  router.stack = originStack;
38
38
  registerRoute();
39
39
  });
40
40
  function registerRoute() {
41
- _chunkXOWAQGBOjs.Context.applyAddons(globalAddons, router, "express");
41
+ _chunkCCK6KDM3js.Context.applyAddons(globalAddons, router, "express");
42
42
  if (parallelRoute) {
43
43
  const subRouter = _express.Router.call(void 0, );
44
- _chunkXOWAQGBOjs.Context.applyAddons(parallelAddons, subRouter, "express");
44
+ _chunkCCK6KDM3js.Context.applyAddons(parallelAddons, subRouter, "express");
45
45
  subRouter.use(async (req, res, next) => {
46
46
  const { body } = req;
47
47
  async function errorHandler(e) {
48
- const error = await _chunkXOWAQGBOjs.Context.filterRecord.default(e);
48
+ const error = await _chunkCCK6KDM3js.Context.filterRecord.default(e);
49
49
  return res.status(error.status).json(error);
50
50
  }
51
- _chunkLLF55NZPjs.__name.call(void 0, errorHandler, "errorHandler");
52
- if (!Array.isArray(body)) return errorHandler(new (0, _chunkXOWAQGBOjs.BadRequestException)("data format should be an array"));
51
+ _chunkIBVPZSZJjs.__name.call(void 0, errorHandler, "errorHandler");
52
+ if (!Array.isArray(body)) return errorHandler(new (0, _chunkCCK6KDM3js.BadRequestException)("data format should be an array"));
53
53
  try {
54
54
  return Promise.all(body.map((item, i) => {
55
55
  return new Promise(async (resolve) => {
56
56
  if (!item) return resolve(null);
57
57
  const { tag, method } = item;
58
58
  debug(`(parallel)invoke method "${method}" in module "${tag}"`);
59
- if (!metaMap.has(tag)) return resolve(await _chunkXOWAQGBOjs.Context.filterRecord.default(new (0, _chunkXOWAQGBOjs.BadRequestException)(`module "${tag}" doesn't exist`)));
59
+ if (!metaMap.has(tag)) return resolve(await _chunkCCK6KDM3js.Context.filterRecord.default(new (0, _chunkCCK6KDM3js.BadRequestException)(`module "${tag}" doesn't exist`)));
60
60
  const meta2 = metaMap.get(tag)[method];
61
- if (!meta2) return resolve(await _chunkXOWAQGBOjs.Context.filterRecord.default(new (0, _chunkXOWAQGBOjs.BadRequestException)(`"${method}" in "${tag}" doesn't exist`)));
62
- const aop = _chunkXOWAQGBOjs.Context.getAop(meta2, {
61
+ if (!meta2) return resolve(await _chunkCCK6KDM3js.Context.filterRecord.default(new (0, _chunkCCK6KDM3js.BadRequestException)(`"${method}" in "${tag}" doesn't exist`)));
62
+ const aop = _chunkCCK6KDM3js.Context.getAop(meta2, {
63
63
  globalFilter,
64
64
  globalGuards,
65
65
  globalPipe
@@ -76,18 +76,18 @@ function bind(router, data, opts = {}) {
76
76
  next,
77
77
  app: router,
78
78
  ...item,
79
- getCookie: /* @__PURE__ */ _chunkLLF55NZPjs.__name.call(void 0, (key) => req.cookies[key], "getCookie"),
80
- setCookie: /* @__PURE__ */ _chunkLLF55NZPjs.__name.call(void 0, (key, value, opts2) => res.cookie(key, value, opts2 || {}), "setCookie"),
81
- delCookie: /* @__PURE__ */ _chunkLLF55NZPjs.__name.call(void 0, (key) => res.cookie(key, "", {
79
+ getCookie: /* @__PURE__ */ _chunkIBVPZSZJjs.__name.call(void 0, (key) => req.cookies[key], "getCookie"),
80
+ setCookie: /* @__PURE__ */ _chunkIBVPZSZJjs.__name.call(void 0, (key, value, opts2) => res.cookie(key, value, opts2 || {}), "setCookie"),
81
+ delCookie: /* @__PURE__ */ _chunkIBVPZSZJjs.__name.call(void 0, (key) => res.cookie(key, "", {
82
82
  expires: /* @__PURE__ */ new Date(0)
83
83
  }), "delCookie"),
84
- redirect: /* @__PURE__ */ _chunkLLF55NZPjs.__name.call(void 0, (url, status) => status ? res.redirect(status, url) : res.redirect(url), "redirect"),
85
- setResHeaders: /* @__PURE__ */ _chunkLLF55NZPjs.__name.call(void 0, (headers) => res.set(headers), "setResHeaders"),
86
- setResStatus: /* @__PURE__ */ _chunkLLF55NZPjs.__name.call(void 0, (code) => res.status(code), "setResStatus"),
87
- getRequest: /* @__PURE__ */ _chunkLLF55NZPjs.__name.call(void 0, () => req, "getRequest"),
88
- getResponse: /* @__PURE__ */ _chunkLLF55NZPjs.__name.call(void 0, () => res, "getResponse")
84
+ redirect: /* @__PURE__ */ _chunkIBVPZSZJjs.__name.call(void 0, (url, status) => status ? res.redirect(status, url) : res.redirect(url), "redirect"),
85
+ setResHeaders: /* @__PURE__ */ _chunkIBVPZSZJjs.__name.call(void 0, (headers) => res.set(headers), "setResHeaders"),
86
+ setResStatus: /* @__PURE__ */ _chunkIBVPZSZJjs.__name.call(void 0, (code) => res.status(code), "setResStatus"),
87
+ getRequest: /* @__PURE__ */ _chunkIBVPZSZJjs.__name.call(void 0, () => req, "getRequest"),
88
+ getResponse: /* @__PURE__ */ _chunkIBVPZSZJjs.__name.call(void 0, () => res, "getResponse")
89
89
  };
90
- const context = new (0, _chunkXOWAQGBOjs.Context)(contextData);
90
+ const context = new (0, _chunkCCK6KDM3js.Context)(contextData);
91
91
  context.run(aop, resolve, resolve);
92
92
  });
93
93
  })).then((ret) => {
@@ -106,15 +106,15 @@ function bind(router, data, opts = {}) {
106
106
  if (!_optionalChain([http, 'optionalAccess', _2 => _2.method])) continue;
107
107
  let aop;
108
108
  if (!dynamic) {
109
- aop = _chunkXOWAQGBOjs.Context.getAop(meta2, {
109
+ aop = _chunkCCK6KDM3js.Context.getAop(meta2, {
110
110
  globalFilter,
111
111
  globalGuards,
112
112
  globalPipe
113
113
  });
114
114
  }
115
115
  const subRouter = _express.Router.call(void 0, );
116
- _chunkXOWAQGBOjs.Context.applyAddons(addons, subRouter, "express");
117
- subRouter[http.method](_chunkXOWAQGBOjs.joinUrl.call(void 0, http.prefix, http.route), async (req, res, next) => {
116
+ _chunkCCK6KDM3js.Context.applyAddons(addons, subRouter, "express");
117
+ subRouter[http.method](_chunkCCK6KDM3js.joinUrl.call(void 0, http.prefix, http.route), async (req, res, next) => {
118
118
  debug(`invoke method "${method}" in module "${tag}"`);
119
119
  const contextData = {
120
120
  type: "express",
@@ -131,21 +131,21 @@ function bind(router, data, opts = {}) {
131
131
  headers: req.headers,
132
132
  app: router,
133
133
  next,
134
- getCookie: /* @__PURE__ */ _chunkLLF55NZPjs.__name.call(void 0, (key) => req.cookies[key], "getCookie"),
135
- setCookie: /* @__PURE__ */ _chunkLLF55NZPjs.__name.call(void 0, (key, value, opts2) => res.cookie(key, value, opts2 || {}), "setCookie"),
136
- delCookie: /* @__PURE__ */ _chunkLLF55NZPjs.__name.call(void 0, (key) => res.cookie(key, "", {
134
+ getCookie: /* @__PURE__ */ _chunkIBVPZSZJjs.__name.call(void 0, (key) => req.cookies[key], "getCookie"),
135
+ setCookie: /* @__PURE__ */ _chunkIBVPZSZJjs.__name.call(void 0, (key, value, opts2) => res.cookie(key, value, opts2 || {}), "setCookie"),
136
+ delCookie: /* @__PURE__ */ _chunkIBVPZSZJjs.__name.call(void 0, (key) => res.cookie(key, "", {
137
137
  expires: /* @__PURE__ */ new Date(0)
138
138
  }), "delCookie"),
139
- redirect: /* @__PURE__ */ _chunkLLF55NZPjs.__name.call(void 0, (url, status) => status ? res.redirect(status, url) : res.redirect(url), "redirect"),
140
- setResHeaders: /* @__PURE__ */ _chunkLLF55NZPjs.__name.call(void 0, (headers) => res.set(headers), "setResHeaders"),
141
- setResStatus: /* @__PURE__ */ _chunkLLF55NZPjs.__name.call(void 0, (code) => res.status(code), "setResStatus"),
142
- getRequest: /* @__PURE__ */ _chunkLLF55NZPjs.__name.call(void 0, () => req, "getRequest"),
143
- getResponse: /* @__PURE__ */ _chunkLLF55NZPjs.__name.call(void 0, () => res, "getResponse")
139
+ redirect: /* @__PURE__ */ _chunkIBVPZSZJjs.__name.call(void 0, (url, status) => status ? res.redirect(status, url) : res.redirect(url), "redirect"),
140
+ setResHeaders: /* @__PURE__ */ _chunkIBVPZSZJjs.__name.call(void 0, (headers) => res.set(headers), "setResHeaders"),
141
+ setResStatus: /* @__PURE__ */ _chunkIBVPZSZJjs.__name.call(void 0, (code) => res.status(code), "setResStatus"),
142
+ getRequest: /* @__PURE__ */ _chunkIBVPZSZJjs.__name.call(void 0, () => req, "getRequest"),
143
+ getResponse: /* @__PURE__ */ _chunkIBVPZSZJjs.__name.call(void 0, () => res, "getResponse")
144
144
  };
145
- const context = new (0, _chunkXOWAQGBOjs.Context)(contextData);
145
+ const context = new (0, _chunkCCK6KDM3js.Context)(contextData);
146
146
  if (http.headers) res.set(http.headers);
147
147
  if (dynamic) {
148
- aop = _chunkXOWAQGBOjs.Context.getAop(meta2, {
148
+ aop = _chunkCCK6KDM3js.Context.getAop(meta2, {
149
149
  globalFilter,
150
150
  globalGuards,
151
151
  globalPipe
@@ -164,9 +164,9 @@ function bind(router, data, opts = {}) {
164
164
  }
165
165
  }
166
166
  }
167
- _chunkLLF55NZPjs.__name.call(void 0, registerRoute, "registerRoute");
167
+ _chunkIBVPZSZJjs.__name.call(void 0, registerRoute, "registerRoute");
168
168
  }
169
- _chunkLLF55NZPjs.__name.call(void 0, bind, "bind");
169
+ _chunkIBVPZSZJjs.__name.call(void 0, bind, "bind");
170
170
 
171
171
 
172
172
  exports.bind = bind;
@@ -4,11 +4,11 @@ import {
4
4
  createControllerMetaMap,
5
5
  detectAopDep,
6
6
  joinUrl
7
- } from "../../chunk-LQFHZGVJ.mjs";
7
+ } from "../../chunk-LNL3MVTR.mjs";
8
8
  import {
9
9
  HMR,
10
10
  __name
11
- } from "../../chunk-URKOYTBU.mjs";
11
+ } from "../../chunk-ITDH2YDL.mjs";
12
12
 
13
13
  // src/http/express/bind.ts
14
14
  import { Router } from "express";
@@ -1,8 +1,8 @@
1
1
  import { FastifyPluginCallback, RouteShorthandOptions, FastifyRequest, FastifyReply, FastifyInstance, FastifyRegisterOptions, FastifyPluginOptions } from 'fastify';
2
- import { H as HttpCtx, a as HttpOptions } from '../../types-CjVwVyJT.mjs';
3
- import { F as Factory } from '../../core-BYxcQ8kf.mjs';
2
+ import { H as HttpCtx, a as HttpOptions } from '../../types-BfcBZVua.mjs';
3
+ import { F as Factory } from '../../core-nqk9d66O.mjs';
4
4
  import 'node:http';
5
- import '../../meta-Csp1xcSR.mjs';
5
+ import '../../meta-ZbvaS7xK.mjs';
6
6
  import 'phecda-core';
7
7
 
8
8
  interface FastifyCtx extends HttpCtx {
@@ -1,8 +1,8 @@
1
1
  import { FastifyPluginCallback, RouteShorthandOptions, FastifyRequest, FastifyReply, FastifyInstance, FastifyRegisterOptions, FastifyPluginOptions } from 'fastify';
2
- import { H as HttpCtx, a as HttpOptions } from '../../types-Bs64nYvd.js';
3
- import { F as Factory } from '../../core-BiS3xJKx.js';
2
+ import { H as HttpCtx, a as HttpOptions } from '../../types-B4zY7i87.js';
3
+ import { F as Factory } from '../../core-Bd2ynlyb.js';
4
4
  import 'node:http';
5
- import '../../meta-Csp1xcSR.js';
5
+ import '../../meta-ZbvaS7xK.js';
6
6
  import 'phecda-core';
7
7
 
8
8
  interface FastifyCtx extends HttpCtx {
@@ -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 _chunk5ZZAOOKEjs = require('../../chunk-5ZZAOOKE.js');
3
+ var _chunkKVWT2QTLjs = require('../../chunk-KVWT2QTL.js');
4
4
 
5
5
 
6
6
 
7
7
 
8
8
 
9
9
 
10
- var _chunkXOWAQGBOjs = require('../../chunk-XOWAQGBO.js');
10
+ var _chunkCCK6KDM3js = require('../../chunk-CCK6KDM3.js');
11
11
 
12
12
 
13
- var _chunkLLF55NZPjs = require('../../chunk-LLF55NZP.js');
13
+ var _chunkIBVPZSZJjs = require('../../chunk-IBVPZSZJ.js');
14
14
 
15
15
  // src/http/fastify/bind.ts
16
16
  var _debug = require('debug'); var _debug2 = _interopRequireDefault(_debug);
@@ -18,14 +18,14 @@ var debug = _debug2.default.call(void 0, "phecda-server/fastify");
18
18
  function bind(fastify, data, opts = {}) {
19
19
  const { globalGuards, parallelRoute, globalAddons = [], parallelAddons = [], globalFilter, globalPipe, fastifyOpts, dynamic = false } = opts;
20
20
  const { moduleMap, meta } = data;
21
- const metaMap = _chunkXOWAQGBOjs.createControllerMetaMap.call(void 0, meta, (meta2) => {
21
+ const metaMap = _chunkCCK6KDM3js.createControllerMetaMap.call(void 0, meta, (meta2) => {
22
22
  const { controller, http, method, tag } = meta2.data;
23
23
  if (controller === "http" && _optionalChain([http, 'optionalAccess', _2 => _2.method])) {
24
24
  debug(`register method "${method}" in module "${tag}"`);
25
25
  return true;
26
26
  }
27
27
  });
28
- _chunkXOWAQGBOjs.detectAopDep.call(void 0, meta, {
28
+ _chunkCCK6KDM3js.detectAopDep.call(void 0, meta, {
29
29
  addons: [
30
30
  ...globalAddons,
31
31
  ...parallelAddons
@@ -33,28 +33,28 @@ function bind(fastify, data, opts = {}) {
33
33
  guards: globalGuards
34
34
  });
35
35
  fastify.register(async (fastify2, _, done) => {
36
- _chunkXOWAQGBOjs.Context.applyAddons(globalAddons, fastify2, "fastify");
36
+ _chunkCCK6KDM3js.Context.applyAddons(globalAddons, fastify2, "fastify");
37
37
  if (parallelRoute) {
38
38
  fastify2.register(async (fastify3, _opts, done2) => {
39
- _chunkXOWAQGBOjs.Context.applyAddons(parallelAddons, fastify3, "fastify");
39
+ _chunkCCK6KDM3js.Context.applyAddons(parallelAddons, fastify3, "fastify");
40
40
  fastify3.post(parallelRoute, async (req, res) => {
41
41
  const { body } = req;
42
42
  async function errorHandler(e) {
43
- const error = await _chunkXOWAQGBOjs.Context.filterRecord.default(e);
43
+ const error = await _chunkCCK6KDM3js.Context.filterRecord.default(e);
44
44
  return res.status(error.status).send(error);
45
45
  }
46
- _chunkLLF55NZPjs.__name.call(void 0, errorHandler, "errorHandler");
47
- if (!Array.isArray(body)) return errorHandler(new (0, _chunkXOWAQGBOjs.BadRequestException)("data format should be an array"));
46
+ _chunkIBVPZSZJjs.__name.call(void 0, errorHandler, "errorHandler");
47
+ if (!Array.isArray(body)) return errorHandler(new (0, _chunkCCK6KDM3js.BadRequestException)("data format should be an array"));
48
48
  try {
49
49
  return Promise.all(body.map((item, i) => {
50
50
  return new Promise(async (resolve) => {
51
51
  if (!item) return resolve(null);
52
52
  const { tag, method } = item;
53
53
  debug(`(parallel)invoke method "${method}" in module "${tag}"`);
54
- if (!metaMap.has(tag)) return resolve(await _chunkXOWAQGBOjs.Context.filterRecord.default(new (0, _chunkXOWAQGBOjs.BadRequestException)(`module "${tag}" doesn't exist`)));
54
+ if (!metaMap.has(tag)) return resolve(await _chunkCCK6KDM3js.Context.filterRecord.default(new (0, _chunkCCK6KDM3js.BadRequestException)(`module "${tag}" doesn't exist`)));
55
55
  const meta2 = metaMap.get(tag)[method];
56
- if (!meta2) return resolve(await _chunkXOWAQGBOjs.Context.filterRecord.default(new (0, _chunkXOWAQGBOjs.BadRequestException)(`"${method}" in "${tag}" doesn't exist`)));
57
- const aop = _chunkXOWAQGBOjs.Context.getAop(meta2, {
56
+ if (!meta2) return resolve(await _chunkCCK6KDM3js.Context.filterRecord.default(new (0, _chunkCCK6KDM3js.BadRequestException)(`"${method}" in "${tag}" doesn't exist`)));
57
+ const aop = _chunkCCK6KDM3js.Context.getAop(meta2, {
58
58
  globalFilter,
59
59
  globalGuards,
60
60
  globalPipe
@@ -71,18 +71,18 @@ function bind(fastify, data, opts = {}) {
71
71
  app: fastify3,
72
72
  ...item,
73
73
  // @ts-expect-error need @fastify/cookie
74
- getCookie: /* @__PURE__ */ _chunkLLF55NZPjs.__name.call(void 0, (key) => req.cookies[key], "getCookie"),
74
+ getCookie: /* @__PURE__ */ _chunkIBVPZSZJjs.__name.call(void 0, (key) => req.cookies[key], "getCookie"),
75
75
  // @ts-expect-error need @fastify/cookie
76
- setCookie: /* @__PURE__ */ _chunkLLF55NZPjs.__name.call(void 0, (key, value, opts2) => res.setCookie(key, value, opts2), "setCookie"),
76
+ setCookie: /* @__PURE__ */ _chunkIBVPZSZJjs.__name.call(void 0, (key, value, opts2) => res.setCookie(key, value, opts2), "setCookie"),
77
77
  // @ts-expect-error need @fastify/cookie
78
- delCookie: /* @__PURE__ */ _chunkLLF55NZPjs.__name.call(void 0, (key) => res.clearCookie(key), "delCookie"),
79
- redirect: /* @__PURE__ */ _chunkLLF55NZPjs.__name.call(void 0, (url, status) => res.redirect(url, status), "redirect"),
80
- setResHeaders: /* @__PURE__ */ _chunkLLF55NZPjs.__name.call(void 0, (headers) => res.headers(headers), "setResHeaders"),
81
- setResStatus: /* @__PURE__ */ _chunkLLF55NZPjs.__name.call(void 0, (code) => res.status(code), "setResStatus"),
82
- getRequest: /* @__PURE__ */ _chunkLLF55NZPjs.__name.call(void 0, () => req.raw, "getRequest"),
83
- getResponse: /* @__PURE__ */ _chunkLLF55NZPjs.__name.call(void 0, () => res.raw, "getResponse")
78
+ delCookie: /* @__PURE__ */ _chunkIBVPZSZJjs.__name.call(void 0, (key) => res.clearCookie(key), "delCookie"),
79
+ redirect: /* @__PURE__ */ _chunkIBVPZSZJjs.__name.call(void 0, (url, status) => res.redirect(url, status), "redirect"),
80
+ setResHeaders: /* @__PURE__ */ _chunkIBVPZSZJjs.__name.call(void 0, (headers) => res.headers(headers), "setResHeaders"),
81
+ setResStatus: /* @__PURE__ */ _chunkIBVPZSZJjs.__name.call(void 0, (code) => res.status(code), "setResStatus"),
82
+ getRequest: /* @__PURE__ */ _chunkIBVPZSZJjs.__name.call(void 0, () => req.raw, "getRequest"),
83
+ getResponse: /* @__PURE__ */ _chunkIBVPZSZJjs.__name.call(void 0, () => res.raw, "getResponse")
84
84
  };
85
- const context = new (0, _chunkXOWAQGBOjs.Context)(contextData);
85
+ const context = new (0, _chunkCCK6KDM3js.Context)(contextData);
86
86
  context.run(aop, resolve, resolve);
87
87
  });
88
88
  })).then((ret) => {
@@ -101,16 +101,16 @@ function bind(fastify, data, opts = {}) {
101
101
  const { data: { addons, define, http } } = meta2;
102
102
  if (!_optionalChain([http, 'optionalAccess', _3 => _3.method])) continue;
103
103
  fastify2.register(async (fastify3, _opts, done2) => {
104
- _chunkXOWAQGBOjs.Context.applyAddons(addons, fastify3, "fastify");
104
+ _chunkCCK6KDM3js.Context.applyAddons(addons, fastify3, "fastify");
105
105
  let aop;
106
106
  if (!dynamic) {
107
- aop = _chunkXOWAQGBOjs.Context.getAop(meta2, {
107
+ aop = _chunkCCK6KDM3js.Context.getAop(meta2, {
108
108
  globalFilter,
109
109
  globalGuards,
110
110
  globalPipe
111
111
  });
112
112
  }
113
- fastify3[http.method](_chunkXOWAQGBOjs.joinUrl.call(void 0, http.prefix, http.route), _optionalChain([define, 'optionalAccess', _4 => _4.fastify]) || {}, async (req, res) => {
113
+ fastify3[http.method](_chunkCCK6KDM3js.joinUrl.call(void 0, http.prefix, http.route), _optionalChain([define, 'optionalAccess', _4 => _4.fastify]) || {}, async (req, res) => {
114
114
  debug(`invoke method "${method}" in module "${tag}"`);
115
115
  const contextData = {
116
116
  type: "fastify",
@@ -127,23 +127,23 @@ function bind(fastify, data, opts = {}) {
127
127
  headers: req.headers,
128
128
  app: fastify3,
129
129
  // @ts-expect-error need @fastify/cookie
130
- getCookie: /* @__PURE__ */ _chunkLLF55NZPjs.__name.call(void 0, (key) => req.cookies[key], "getCookie"),
130
+ getCookie: /* @__PURE__ */ _chunkIBVPZSZJjs.__name.call(void 0, (key) => req.cookies[key], "getCookie"),
131
131
  // @ts-expect-error need @fastify/cookie
132
- setCookie: /* @__PURE__ */ _chunkLLF55NZPjs.__name.call(void 0, (key, value, opts2) => res.setCookie(key, value, opts2), "setCookie"),
132
+ setCookie: /* @__PURE__ */ _chunkIBVPZSZJjs.__name.call(void 0, (key, value, opts2) => res.setCookie(key, value, opts2), "setCookie"),
133
133
  // @ts-expect-error need @fastify/cookie
134
- delCookie: /* @__PURE__ */ _chunkLLF55NZPjs.__name.call(void 0, (key) => res.clearCookie(key, {
134
+ delCookie: /* @__PURE__ */ _chunkIBVPZSZJjs.__name.call(void 0, (key) => res.clearCookie(key, {
135
135
  url: ""
136
136
  }), "delCookie"),
137
- redirect: /* @__PURE__ */ _chunkLLF55NZPjs.__name.call(void 0, (url, status) => res.redirect(url, status), "redirect"),
138
- setResHeaders: /* @__PURE__ */ _chunkLLF55NZPjs.__name.call(void 0, (headers) => res.headers(headers), "setResHeaders"),
139
- setResStatus: /* @__PURE__ */ _chunkLLF55NZPjs.__name.call(void 0, (code) => res.status(code), "setResStatus"),
140
- getRequest: /* @__PURE__ */ _chunkLLF55NZPjs.__name.call(void 0, () => req.raw, "getRequest"),
141
- getResponse: /* @__PURE__ */ _chunkLLF55NZPjs.__name.call(void 0, () => res.raw, "getResponse")
137
+ redirect: /* @__PURE__ */ _chunkIBVPZSZJjs.__name.call(void 0, (url, status) => res.redirect(url, status), "redirect"),
138
+ setResHeaders: /* @__PURE__ */ _chunkIBVPZSZJjs.__name.call(void 0, (headers) => res.headers(headers), "setResHeaders"),
139
+ setResStatus: /* @__PURE__ */ _chunkIBVPZSZJjs.__name.call(void 0, (code) => res.status(code), "setResStatus"),
140
+ getRequest: /* @__PURE__ */ _chunkIBVPZSZJjs.__name.call(void 0, () => req.raw, "getRequest"),
141
+ getResponse: /* @__PURE__ */ _chunkIBVPZSZJjs.__name.call(void 0, () => res.raw, "getResponse")
142
142
  };
143
- const context = new (0, _chunkXOWAQGBOjs.Context)(contextData);
143
+ const context = new (0, _chunkCCK6KDM3js.Context)(contextData);
144
144
  if (http.headers) res.headers(http.headers);
145
145
  if (dynamic) {
146
- aop = _chunkXOWAQGBOjs.Context.getAop(meta2, {
146
+ aop = _chunkCCK6KDM3js.Context.getAop(meta2, {
147
147
  globalFilter,
148
148
  globalGuards,
149
149
  globalPipe
@@ -164,11 +164,11 @@ function bind(fastify, data, opts = {}) {
164
164
  done();
165
165
  }, fastifyOpts);
166
166
  }
167
- _chunkLLF55NZPjs.__name.call(void 0, bind, "bind");
167
+ _chunkIBVPZSZJjs.__name.call(void 0, bind, "bind");
168
168
  function Fastify(opts) {
169
- return _chunk5ZZAOOKEjs.Define.call(void 0, "fastify", opts);
169
+ return _chunkKVWT2QTLjs.Define.call(void 0, "fastify", opts);
170
170
  }
171
- _chunkLLF55NZPjs.__name.call(void 0, Fastify, "Fastify");
171
+ _chunkIBVPZSZJjs.__name.call(void 0, Fastify, "Fastify");
172
172
 
173
173
 
174
174