phecda-server 7.0.0-alpha.8 → 7.0.0-alpha.9

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 (79) hide show
  1. package/dist/{chunk-VSGYTGHY.js → chunk-5RBTN33A.js} +22 -2
  2. package/dist/{chunk-B45BN7LY.mjs → chunk-7ZGYJ5OW.mjs} +88 -54
  3. package/dist/{chunk-SGMQZRP6.mjs → chunk-CVPZWDXU.mjs} +2 -23
  4. package/dist/{chunk-7EMAZGYO.js → chunk-FX3LDQII.js} +59 -80
  5. package/dist/{chunk-YKP4ODZA.mjs → chunk-FXTJ3BJ6.mjs} +23 -3
  6. package/dist/{chunk-QJIAXSLZ.js → chunk-KJUD2BKE.js} +103 -69
  7. package/dist/{chunk-7NWDKK7D.mjs → chunk-ODVWOXVB.mjs} +1 -1
  8. package/dist/{chunk-BBNJVYVX.js → chunk-V5EYXVJT.js} +24 -24
  9. package/dist/{core-BcKywWLd.d.mts → core-BDkhrEyf.d.mts} +4 -3
  10. package/dist/{core-BGEsBtTG.d.ts → core-D_cz0tKa.d.ts} +4 -3
  11. package/dist/helper.d.mts +6 -5
  12. package/dist/helper.d.ts +6 -5
  13. package/dist/helper.js +6 -3
  14. package/dist/helper.mjs +8 -5
  15. package/dist/http/elysia/index.d.mts +3 -3
  16. package/dist/http/elysia/index.d.ts +3 -3
  17. package/dist/http/elysia/index.js +41 -45
  18. package/dist/http/elysia/index.mjs +4 -8
  19. package/dist/http/express/index.d.mts +3 -3
  20. package/dist/http/express/index.d.ts +3 -3
  21. package/dist/http/express/index.js +38 -42
  22. package/dist/http/express/index.mjs +4 -8
  23. package/dist/http/fastify/index.d.mts +3 -3
  24. package/dist/http/fastify/index.d.ts +3 -3
  25. package/dist/http/fastify/index.js +39 -43
  26. package/dist/http/fastify/index.mjs +4 -8
  27. package/dist/http/h3/index.d.mts +3 -3
  28. package/dist/http/h3/index.d.ts +3 -3
  29. package/dist/http/h3/index.js +39 -43
  30. package/dist/http/h3/index.mjs +3 -7
  31. package/dist/http/hono/index.d.mts +3 -3
  32. package/dist/http/hono/index.d.ts +3 -3
  33. package/dist/http/hono/index.js +35 -39
  34. package/dist/http/hono/index.mjs +3 -7
  35. package/dist/http/hyper-express/index.d.mts +3 -3
  36. package/dist/http/hyper-express/index.d.ts +3 -3
  37. package/dist/http/hyper-express/index.js +36 -40
  38. package/dist/http/hyper-express/index.mjs +3 -7
  39. package/dist/http/koa/index.d.mts +3 -3
  40. package/dist/http/koa/index.d.ts +3 -3
  41. package/dist/http/koa/index.js +38 -42
  42. package/dist/http/koa/index.mjs +4 -8
  43. package/dist/index.d.mts +8 -8
  44. package/dist/index.d.ts +8 -8
  45. package/dist/index.js +40 -42
  46. package/dist/index.mjs +4 -6
  47. package/dist/{meta-B_HW7cWh.d.mts → meta-BX5jhe4Z.d.mts} +1 -2
  48. package/dist/{meta-B_HW7cWh.d.ts → meta-BX5jhe4Z.d.ts} +1 -2
  49. package/dist/rpc/bullmq/index.d.mts +3 -3
  50. package/dist/rpc/bullmq/index.d.ts +3 -3
  51. package/dist/rpc/bullmq/index.js +14 -14
  52. package/dist/rpc/bullmq/index.mjs +3 -3
  53. package/dist/rpc/kafka/index.d.mts +3 -3
  54. package/dist/rpc/kafka/index.d.ts +3 -3
  55. package/dist/rpc/kafka/index.js +14 -14
  56. package/dist/rpc/kafka/index.mjs +2 -2
  57. package/dist/rpc/nats/index.d.mts +3 -3
  58. package/dist/rpc/nats/index.d.ts +3 -3
  59. package/dist/rpc/nats/index.js +13 -13
  60. package/dist/rpc/nats/index.mjs +3 -3
  61. package/dist/rpc/rabbitmq/index.d.mts +3 -3
  62. package/dist/rpc/rabbitmq/index.d.ts +3 -3
  63. package/dist/rpc/rabbitmq/index.js +15 -15
  64. package/dist/rpc/rabbitmq/index.mjs +3 -3
  65. package/dist/rpc/redis/index.d.mts +3 -3
  66. package/dist/rpc/redis/index.d.ts +3 -3
  67. package/dist/rpc/redis/index.js +13 -13
  68. package/dist/rpc/redis/index.mjs +3 -3
  69. package/dist/test.d.mts +3 -3
  70. package/dist/test.d.ts +3 -3
  71. package/dist/test.js +6 -6
  72. package/dist/test.mjs +2 -2
  73. package/dist/{types-DEQb_e59.d.mts → types-B-rUM9Fm.d.mts} +1 -1
  74. package/dist/{types-PFPIQWVF.d.ts → types-CMeuFoyd.d.ts} +1 -1
  75. package/dist/{types-C2SQ9U9V.d.mts → types-DKVhyZk_.d.mts} +1 -1
  76. package/dist/{types-CYF0vha6.d.ts → types-MxxtkZXw.d.ts} +1 -1
  77. package/package.json +1 -1
  78. package/register/index.mjs +20 -11
  79. package/register/loader.mjs +12 -27
@@ -1,15 +1,14 @@
1
1
  import {
2
2
  BadRequestException,
3
3
  Context,
4
- HMR,
5
- argToReq,
6
4
  createControllerMetaMap,
7
5
  detectAopDep,
8
6
  joinUrl
9
- } from "../../chunk-SGMQZRP6.mjs";
7
+ } from "../../chunk-CVPZWDXU.mjs";
10
8
  import {
9
+ HMR,
11
10
  __name
12
- } from "../../chunk-YKP4ODZA.mjs";
11
+ } from "../../chunk-FXTJ3BJ6.mjs";
13
12
 
14
13
  // src/http/koa/bind.ts
15
14
  import Router from "@koa/router";
@@ -56,7 +55,6 @@ function bind(router, data, opts = {}) {
56
55
  if (!metaMap.has(tag)) return resolve(await Context.filterRecord.default(new BadRequestException(`module "${tag}" doesn't exist`)));
57
56
  const meta2 = metaMap.get(tag)[func];
58
57
  if (!meta2) return resolve(await Context.filterRecord.default(new BadRequestException(`"${func}" in "${tag}" doesn't exist`)));
59
- const { data: { params } } = meta2;
60
58
  const aop = Context.getAop(meta2, {
61
59
  globalGuards,
62
60
  globalFilter,
@@ -72,9 +70,7 @@ function bind(router, data, opts = {}) {
72
70
  parallel: true,
73
71
  next,
74
72
  app: router,
75
- ...argToReq(params, item.args, ctx.headers),
76
- tag,
77
- func,
73
+ ...item,
78
74
  getCookie: /* @__PURE__ */ __name((key) => ctx.cookies.get(key), "getCookie"),
79
75
  setCookie: /* @__PURE__ */ __name((key, value, opts2) => ctx.cookies.set(key, value, opts2), "setCookie"),
80
76
  delCookie: /* @__PURE__ */ __name((key) => ctx.cookies.set(key, "", {
package/dist/index.d.mts CHANGED
@@ -1,13 +1,13 @@
1
- import { B as BaseCtx, a as ControllerMeta, D as DefaultOptions, C as ControllerMetaData, b as MetaData, E as Emitter, c as BaseError } from './meta-B_HW7cWh.mjs';
2
- export { g as BaseRequestType, f as BaseReturn, h as CustomResponse, j as ERROR_SYMBOL, i as ExtractResponse, I as IS_DEV, k as IS_ONLY_GENERATE, m as IS_READY, l as IS_STRICT, L as LOG_LEVEL, M as Meta, O as OmitFunction, n as PS_EXIT_CODE, P as PickFunc, S as ServiceMetaData, e as ToClientFn, d as ToClientInstance, T as ToClientMap } from './meta-B_HW7cWh.mjs';
3
- import { G as Generator } from './core-BcKywWLd.mjs';
4
- export { F as Factory, O as Options, S as ServerPhecda, d as defaultServerInject, e as emitter, p as phecdaNamespace, u as useS } from './core-BcKywWLd.mjs';
1
+ import { B as BaseCtx, C as ControllerMeta, D as DefaultOptions, a as ControllerMetaData, b as MetaData, E as Emitter, c as BaseError } from './meta-BX5jhe4Z.mjs';
2
+ export { g as BaseRequestType, f as BaseReturn, h as CustomResponse, j as ERROR_SYMBOL, i as ExtractResponse, I as IS_DEV, k as IS_ONLY_GENERATE, l as IS_STRICT, L as LOG_LEVEL, M as Meta, O as OmitFunction, m as PS_EXIT_CODE, P as PickFunc, S as ServiceMetaData, e as ToClientFn, d as ToClientInstance, T as ToClientMap } from './meta-BX5jhe4Z.mjs';
3
+ import { G as Generator } from './core-BDkhrEyf.mjs';
4
+ export { F as Factory, O as Options, S as ServerPhecda, d as defaultServerInject, e as emitter, p as phecdaNamespace, u as useS } from './core-BDkhrEyf.mjs';
5
5
  import { Base } from 'phecda-core';
6
6
  export * from 'phecda-core';
7
- import { H as HttpCtx } from './types-C2SQ9U9V.mjs';
8
- export { C as CookieSerializeOptions, a as HttpOptions } from './types-C2SQ9U9V.mjs';
9
- import { R as RpcCtx } from './types-DEQb_e59.mjs';
10
- export { b as RpcClientOptions, a as RpcServerOptions } from './types-DEQb_e59.mjs';
7
+ import { H as HttpCtx } from './types-DKVhyZk_.mjs';
8
+ export { C as CookieSerializeOptions, a as HttpOptions } from './types-DKVhyZk_.mjs';
9
+ import { R as RpcCtx } from './types-B-rUM9Fm.mjs';
10
+ export { b as RpcClientOptions, a as RpcServerOptions } from './types-B-rUM9Fm.mjs';
11
11
  export { Mixin } from 'ts-mixer';
12
12
  import 'node:http';
13
13
 
package/dist/index.d.ts CHANGED
@@ -1,13 +1,13 @@
1
- import { B as BaseCtx, a as ControllerMeta, D as DefaultOptions, C as ControllerMetaData, b as MetaData, E as Emitter, c as BaseError } from './meta-B_HW7cWh.js';
2
- export { g as BaseRequestType, f as BaseReturn, h as CustomResponse, j as ERROR_SYMBOL, i as ExtractResponse, I as IS_DEV, k as IS_ONLY_GENERATE, m as IS_READY, l as IS_STRICT, L as LOG_LEVEL, M as Meta, O as OmitFunction, n as PS_EXIT_CODE, P as PickFunc, S as ServiceMetaData, e as ToClientFn, d as ToClientInstance, T as ToClientMap } from './meta-B_HW7cWh.js';
3
- import { G as Generator } from './core-BGEsBtTG.js';
4
- export { F as Factory, O as Options, S as ServerPhecda, d as defaultServerInject, e as emitter, p as phecdaNamespace, u as useS } from './core-BGEsBtTG.js';
1
+ import { B as BaseCtx, C as ControllerMeta, D as DefaultOptions, a as ControllerMetaData, b as MetaData, E as Emitter, c as BaseError } from './meta-BX5jhe4Z.js';
2
+ export { g as BaseRequestType, f as BaseReturn, h as CustomResponse, j as ERROR_SYMBOL, i as ExtractResponse, I as IS_DEV, k as IS_ONLY_GENERATE, l as IS_STRICT, L as LOG_LEVEL, M as Meta, O as OmitFunction, m as PS_EXIT_CODE, P as PickFunc, S as ServiceMetaData, e as ToClientFn, d as ToClientInstance, T as ToClientMap } from './meta-BX5jhe4Z.js';
3
+ import { G as Generator } from './core-D_cz0tKa.js';
4
+ export { F as Factory, O as Options, S as ServerPhecda, d as defaultServerInject, e as emitter, p as phecdaNamespace, u as useS } from './core-D_cz0tKa.js';
5
5
  import { Base } from 'phecda-core';
6
6
  export * from 'phecda-core';
7
- import { H as HttpCtx } from './types-PFPIQWVF.js';
8
- export { C as CookieSerializeOptions, a as HttpOptions } from './types-PFPIQWVF.js';
9
- import { R as RpcCtx } from './types-CYF0vha6.js';
10
- export { b as RpcClientOptions, a as RpcServerOptions } from './types-CYF0vha6.js';
7
+ import { H as HttpCtx } from './types-CMeuFoyd.js';
8
+ export { C as CookieSerializeOptions, a as HttpOptions } from './types-CMeuFoyd.js';
9
+ import { R as RpcCtx } from './types-MxxtkZXw.js';
10
+ export { b as RpcClientOptions, a as RpcServerOptions } from './types-MxxtkZXw.js';
11
11
  export { Mixin } from 'ts-mixer';
12
12
  import 'node:http';
13
13
 
package/dist/index.js CHANGED
@@ -6,7 +6,7 @@
6
6
 
7
7
 
8
8
 
9
- var _chunkQJIAXSLZjs = require('./chunk-QJIAXSLZ.js');
9
+ var _chunkKJUD2BKEjs = require('./chunk-KJUD2BKE.js');
10
10
 
11
11
 
12
12
 
@@ -31,7 +31,7 @@ var _chunkQJIAXSLZjs = require('./chunk-QJIAXSLZ.js');
31
31
 
32
32
 
33
33
 
34
- var _chunkBBNJVYVXjs = require('./chunk-BBNJVYVX.js');
34
+ var _chunkV5EYXVJTjs = require('./chunk-V5EYXVJT.js');
35
35
 
36
36
 
37
37
 
@@ -57,7 +57,7 @@ var _chunkBBNJVYVXjs = require('./chunk-BBNJVYVX.js');
57
57
 
58
58
 
59
59
 
60
- var _chunk7EMAZGYOjs = require('./chunk-7EMAZGYO.js');
60
+ var _chunkFX3LDQIIjs = require('./chunk-FX3LDQII.js');
61
61
 
62
62
 
63
63
 
@@ -71,14 +71,13 @@ var _chunk7EMAZGYOjs = require('./chunk-7EMAZGYO.js');
71
71
 
72
72
 
73
73
 
74
-
75
- var _chunkVSGYTGHYjs = require('./chunk-VSGYTGHY.js');
74
+ var _chunk5RBTN33Ajs = require('./chunk-5RBTN33A.js');
76
75
 
77
76
  // src/types.ts
78
77
  var ResponseSymbol = Symbol("response");
79
78
  var CustomResponse = class {
80
79
  static {
81
- _chunkVSGYTGHYjs.__name.call(void 0, this, "CustomResponse");
80
+ _chunk5RBTN33Ajs.__name.call(void 0, this, "CustomResponse");
82
81
  }
83
82
 
84
83
  };
@@ -91,38 +90,38 @@ function _ts_decorate(decorators, target, key, desc) {
91
90
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
92
91
  return c > 3 && r && Object.defineProperty(target, key, r), r;
93
92
  }
94
- _chunkVSGYTGHYjs.__name.call(void 0, _ts_decorate, "_ts_decorate");
93
+ _chunk5RBTN33Ajs.__name.call(void 0, _ts_decorate, "_ts_decorate");
95
94
  function _ts_metadata(k, v) {
96
95
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
97
96
  }
98
- _chunkVSGYTGHYjs.__name.call(void 0, _ts_metadata, "_ts_metadata");
97
+ _chunk5RBTN33Ajs.__name.call(void 0, _ts_metadata, "_ts_metadata");
99
98
  var ServerBase = (_class = class extends _phecdacore.Base {constructor(...args2) { super(...args2); _class.prototype.__init.call(this); }
100
99
  static {
101
- _chunkVSGYTGHYjs.__name.call(void 0, this, "ServerBase");
100
+ _chunk5RBTN33Ajs.__name.call(void 0, this, "ServerBase");
102
101
  }
103
- __init() {this.emitter = exports.emitter = _chunkQJIAXSLZjs.emitter}
102
+ __init() {this.emitter = exports.emitter = _chunkKJUD2BKEjs.emitter}
104
103
  log(msg, level = "log") {
105
- _chunkVSGYTGHYjs.log.call(void 0, msg, level, this.tag);
104
+ _chunk5RBTN33Ajs.log.call(void 0, msg, level, this.tag);
106
105
  }
107
106
  }, _class);
108
107
  var HttpBase = class extends ServerBase {
109
108
  static {
110
- _chunkVSGYTGHYjs.__name.call(void 0, this, "HttpBase");
109
+ _chunk5RBTN33Ajs.__name.call(void 0, this, "HttpBase");
111
110
  }
112
111
 
113
112
  };
114
113
  _ts_decorate([
115
- _chunkBBNJVYVXjs.Ctx,
114
+ _chunkV5EYXVJTjs.Ctx,
116
115
  _ts_metadata("design:type", typeof Ctx === "undefined" ? Object : Ctx)
117
116
  ], HttpBase.prototype, "context", void 0);
118
117
  var RpcBase = class extends ServerBase {
119
118
  static {
120
- _chunkVSGYTGHYjs.__name.call(void 0, this, "RpcBase");
119
+ _chunk5RBTN33Ajs.__name.call(void 0, this, "RpcBase");
121
120
  }
122
121
 
123
122
  };
124
123
  _ts_decorate([
125
- _chunkBBNJVYVXjs.Ctx,
124
+ _chunkV5EYXVJTjs.Ctx,
126
125
  _ts_metadata("design:type", typeof Ctx === "undefined" ? Object : Ctx)
127
126
  ], RpcBase.prototype, "context", void 0);
128
127
 
@@ -130,15 +129,15 @@ _ts_decorate([
130
129
 
131
130
  var PFilter = class extends ServerBase {
132
131
  static {
133
- _chunkVSGYTGHYjs.__name.call(void 0, this, "PFilter");
132
+ _chunk5RBTN33Ajs.__name.call(void 0, this, "PFilter");
134
133
  }
135
134
 
136
135
  constructor(tag) {
137
136
  super();
138
137
  this.key = tag || _phecdacore.getTag.call(void 0, this);
139
- _chunk7EMAZGYOjs.addFilter.call(void 0, this.key, this.use.bind(this));
138
+ _chunkFX3LDQIIjs.addFilter.call(void 0, this.key, this.use.bind(this));
140
139
  this.onUnmount(() => {
141
- delete _chunk7EMAZGYOjs.Context.filterRecord[this.key];
140
+ delete _chunkFX3LDQIIjs.Context.filterRecord[this.key];
142
141
  });
143
142
  }
144
143
  };
@@ -147,16 +146,16 @@ var PFilter = class extends ServerBase {
147
146
 
148
147
  var PGuard = (_class2 = class extends ServerBase {
149
148
  static {
150
- _chunkVSGYTGHYjs.__name.call(void 0, this, "PGuard");
149
+ _chunk5RBTN33Ajs.__name.call(void 0, this, "PGuard");
151
150
  }
152
151
 
153
152
  __init2() {this.priority = 0}
154
153
  constructor(tag) {
155
154
  super();_class2.prototype.__init2.call(this);;
156
155
  this.key = tag || _phecdacore.getTag.call(void 0, this);
157
- _chunk7EMAZGYOjs.addGuard.call(void 0, this.key, this.use.bind(this), this.priority);
156
+ _chunkFX3LDQIIjs.addGuard.call(void 0, this.key, this.use.bind(this), this.priority);
158
157
  this.onUnmount(() => {
159
- delete _chunk7EMAZGYOjs.Context.guardRecord[this.key];
158
+ delete _chunkFX3LDQIIjs.Context.guardRecord[this.key];
160
159
  });
161
160
  }
162
161
  }, _class2);
@@ -165,15 +164,15 @@ var PGuard = (_class2 = class extends ServerBase {
165
164
 
166
165
  var PPipe = class extends ServerBase {
167
166
  static {
168
- _chunkVSGYTGHYjs.__name.call(void 0, this, "PPipe");
167
+ _chunk5RBTN33Ajs.__name.call(void 0, this, "PPipe");
169
168
  }
170
169
 
171
170
  constructor(tag) {
172
171
  super();
173
172
  this.key = tag || _phecdacore.getTag.call(void 0, this);
174
- _chunk7EMAZGYOjs.addPipe.call(void 0, this.key, this.use.bind(this));
173
+ _chunkFX3LDQIIjs.addPipe.call(void 0, this.key, this.use.bind(this));
175
174
  this.onUnmount(() => {
176
- delete _chunk7EMAZGYOjs.Context.pipeRecord[this.key];
175
+ delete _chunkFX3LDQIIjs.Context.pipeRecord[this.key];
177
176
  });
178
177
  }
179
178
  };
@@ -182,16 +181,16 @@ var PPipe = class extends ServerBase {
182
181
 
183
182
  var PAddon = (_class3 = class extends ServerBase {
184
183
  static {
185
- _chunkVSGYTGHYjs.__name.call(void 0, this, "PAddon");
184
+ _chunk5RBTN33Ajs.__name.call(void 0, this, "PAddon");
186
185
  }
187
186
 
188
187
  __init3() {this.priority = 0}
189
188
  constructor(tag) {
190
189
  super();_class3.prototype.__init3.call(this);;
191
190
  this.key = tag || _phecdacore.getTag.call(void 0, this);
192
- _chunk7EMAZGYOjs.addAddon.call(void 0, this.key, this.use.bind(this), this.priority);
191
+ _chunkFX3LDQIIjs.addAddon.call(void 0, this.key, this.use.bind(this), this.priority);
193
192
  this.onUnmount(() => {
194
- delete _chunk7EMAZGYOjs.Context.addonRecord[this.key];
193
+ delete _chunkFX3LDQIIjs.Context.addonRecord[this.key];
195
194
  });
196
195
  }
197
196
  }, _class3);
@@ -200,7 +199,7 @@ var PAddon = (_class3 = class extends ServerBase {
200
199
 
201
200
  var PExtension = class extends ServerBase {
202
201
  static {
203
- _chunkVSGYTGHYjs.__name.call(void 0, this, "PExtension");
202
+ _chunk5RBTN33Ajs.__name.call(void 0, this, "PExtension");
204
203
  }
205
204
 
206
205
 
@@ -209,27 +208,27 @@ var PExtension = class extends ServerBase {
209
208
  super();
210
209
  const key = this.key = tag || _phecdacore.getTag.call(void 0, this);
211
210
  if (this.pipe) {
212
- _chunk7EMAZGYOjs.addPipe.call(void 0, key, this.pipe.bind(this));
211
+ _chunkFX3LDQIIjs.addPipe.call(void 0, key, this.pipe.bind(this));
213
212
  this.onUnmount(() => {
214
- delete _chunk7EMAZGYOjs.Context.pipeRecord[key];
213
+ delete _chunkFX3LDQIIjs.Context.pipeRecord[key];
215
214
  });
216
215
  }
217
216
  if (this.addon) {
218
- _chunk7EMAZGYOjs.addAddon.call(void 0, key, this.addon.bind(this), this.addonPriority);
217
+ _chunkFX3LDQIIjs.addAddon.call(void 0, key, this.addon.bind(this), this.addonPriority);
219
218
  this.onUnmount(() => {
220
- delete _chunk7EMAZGYOjs.Context.addonRecord[key];
219
+ delete _chunkFX3LDQIIjs.Context.addonRecord[key];
221
220
  });
222
221
  }
223
222
  if (this.guard) {
224
- _chunk7EMAZGYOjs.addGuard.call(void 0, key, this.guard.bind(this), this.guardPriority);
223
+ _chunkFX3LDQIIjs.addGuard.call(void 0, key, this.guard.bind(this), this.guardPriority);
225
224
  this.onUnmount(() => {
226
- delete _chunk7EMAZGYOjs.Context.guardRecord[key];
225
+ delete _chunkFX3LDQIIjs.Context.guardRecord[key];
227
226
  });
228
227
  }
229
228
  if (this.filter) {
230
- _chunk7EMAZGYOjs.addFilter.call(void 0, key, this.filter.bind(this));
229
+ _chunkFX3LDQIIjs.addFilter.call(void 0, key, this.filter.bind(this));
231
230
  this.onUnmount(() => {
232
- delete _chunk7EMAZGYOjs.Context.filterRecord[key];
231
+ delete _chunkFX3LDQIIjs.Context.filterRecord[key];
233
232
  });
234
233
  }
235
234
  }
@@ -239,7 +238,7 @@ var PExtension = class extends ServerBase {
239
238
  var _fsextra = require('fs-extra'); var _fsextra2 = _interopRequireDefault(_fsextra);
240
239
  var Generator = class {
241
240
  static {
242
- _chunkVSGYTGHYjs.__name.call(void 0, this, "Generator");
241
+ _chunk5RBTN33Ajs.__name.call(void 0, this, "Generator");
243
242
  }
244
243
 
245
244
  constructor(path) {
@@ -256,7 +255,7 @@ var Generator = class {
256
255
  // src/generator/rpc.ts
257
256
  var RPCGenerator = (_class4 = class extends Generator {constructor(...args3) { super(...args3); _class4.prototype.__init4.call(this);_class4.prototype.__init5.call(this); }
258
257
  static {
259
- _chunkVSGYTGHYjs.__name.call(void 0, this, "RPCGenerator");
258
+ _chunk5RBTN33Ajs.__name.call(void 0, this, "RPCGenerator");
260
259
  }
261
260
  __init4() {this.name = "RPC"}
262
261
  __init5() {this.classMap = {}}
@@ -292,7 +291,7 @@ var RPCGenerator = (_class4 = class extends Generator {constructor(...args3) { s
292
291
  // src/generator/http.ts
293
292
  var HTTPGenerator = (_class5 = class extends Generator {constructor(...args4) { super(...args4); _class5.prototype.__init6.call(this);_class5.prototype.__init7.call(this); }
294
293
  static {
295
- _chunkVSGYTGHYjs.__name.call(void 0, this, "HTTPGenerator");
294
+ _chunk5RBTN33Ajs.__name.call(void 0, this, "HTTPGenerator");
296
295
  }
297
296
  __init6() {this.name = "HTTP"}
298
297
  __init7() {this.classMap = {}}
@@ -309,7 +308,7 @@ var HTTPGenerator = (_class5 = class extends Generator {constructor(...args4) {
309
308
  addMethod(args) {
310
309
  const { http, name, func, params, tag } = args;
311
310
  if (!_optionalChain([http, 'optionalAccess', _2 => _2.type])) return;
312
- const url = _chunk7EMAZGYOjs.joinUrl.call(void 0, http.prefix, http.route).replace(/\/\:([^\/]*)/g, (_, js) => `/{{${js}}}`);
311
+ const url = _chunkFX3LDQIIjs.joinUrl.call(void 0, http.prefix, http.route).replace(/\/\:([^\/]*)/g, (_, js) => `/{{${js}}}`);
313
312
  if (!this.classMap[name]) this.classMap[name] = {};
314
313
  this.classMap[name][func] = `
315
314
  ${func}(...args){
@@ -409,5 +408,4 @@ return ret
409
408
 
410
409
 
411
410
 
412
-
413
- exports.Addon = _chunkBBNJVYVXjs.Addon; exports.Arg = _chunkBBNJVYVXjs.Arg; exports.BadGatewayException = _chunk7EMAZGYOjs.BadGatewayException; exports.BadRequestException = _chunk7EMAZGYOjs.BadRequestException; exports.BaseParam = _chunkBBNJVYVXjs.BaseParam; exports.Body = _chunkBBNJVYVXjs.Body; exports.ConflictException = _chunk7EMAZGYOjs.ConflictException; exports.Context = _chunk7EMAZGYOjs.Context; exports.Controller = _chunkBBNJVYVXjs.Controller; exports.Ctx = _chunkBBNJVYVXjs.Ctx; exports.CustomResponse = CustomResponse; exports.Define = _chunkBBNJVYVXjs.Define; exports.Delete = _chunkBBNJVYVXjs.Delete; exports.ERROR_SYMBOL = _chunkVSGYTGHYjs.ERROR_SYMBOL; exports.Exception = _chunk7EMAZGYOjs.Exception; exports.Factory = _chunkQJIAXSLZjs.Factory; exports.Filter = _chunkBBNJVYVXjs.Filter; exports.ForbiddenException = _chunk7EMAZGYOjs.ForbiddenException; exports.FrameworkException = _chunk7EMAZGYOjs.FrameworkException; exports.Generator = Generator; exports.Get = _chunkBBNJVYVXjs.Get; exports.Guard = _chunkBBNJVYVXjs.Guard; exports.HTTPGenerator = HTTPGenerator; exports.Head = _chunkBBNJVYVXjs.Head; exports.Header = _chunkBBNJVYVXjs.Header; exports.HttpBase = HttpBase; exports.IS_DEV = _chunkVSGYTGHYjs.IS_DEV; exports.IS_ONLY_GENERATE = _chunkVSGYTGHYjs.IS_ONLY_GENERATE; exports.IS_READY = _chunkVSGYTGHYjs.IS_READY; exports.IS_STRICT = _chunkVSGYTGHYjs.IS_STRICT; exports.InvalidInputException = _chunk7EMAZGYOjs.InvalidInputException; exports.LOG_LEVEL = _chunkVSGYTGHYjs.LOG_LEVEL; exports.Meta = _chunkQJIAXSLZjs.Meta; exports.Mixin = _chunkVSGYTGHYjs.Mixin; exports.NotFoundException = _chunk7EMAZGYOjs.NotFoundException; exports.PAddon = PAddon; exports.PExtension = PExtension; exports.PFilter = PFilter; exports.PGuard = PGuard; exports.PPipe = PPipe; exports.PS_EXIT_CODE = _chunkVSGYTGHYjs.PS_EXIT_CODE; exports.Param = _chunkBBNJVYVXjs.Param; exports.Patch = _chunkBBNJVYVXjs.Patch; exports.PayloadLargeException = _chunk7EMAZGYOjs.PayloadLargeException; exports.Pipe = _chunkBBNJVYVXjs.Pipe; exports.Post = _chunkBBNJVYVXjs.Post; exports.Put = _chunkBBNJVYVXjs.Put; exports.Query = _chunkBBNJVYVXjs.Query; exports.Queue = _chunkBBNJVYVXjs.Queue; exports.RPCGenerator = RPCGenerator; exports.Route = _chunkBBNJVYVXjs.Route; exports.Rpc = _chunkBBNJVYVXjs.Rpc; exports.RpcBase = RpcBase; exports.Search = _chunkBBNJVYVXjs.Search; exports.ServerBase = ServerBase; exports.ServerPhecda = _chunkQJIAXSLZjs.ServerPhecda; exports.ServiceUnavailableException = _chunk7EMAZGYOjs.ServiceUnavailableException; exports.TimeoutException = _chunk7EMAZGYOjs.TimeoutException; exports.TimerException = _chunk7EMAZGYOjs.TimerException; exports.UnauthorizedException = _chunk7EMAZGYOjs.UnauthorizedException; exports.UndefinedException = _chunk7EMAZGYOjs.UndefinedException; exports.UnsupportedMediaTypeException = _chunk7EMAZGYOjs.UnsupportedMediaTypeException; exports.ValidateException = _chunk7EMAZGYOjs.ValidateException; exports.WorkerException = _chunk7EMAZGYOjs.WorkerException; exports.addAddon = _chunk7EMAZGYOjs.addAddon; exports.addFilter = _chunk7EMAZGYOjs.addFilter; exports.addGuard = _chunk7EMAZGYOjs.addGuard; exports.addPipe = _chunk7EMAZGYOjs.addPipe; exports.defaultPipe = _chunk7EMAZGYOjs.defaultPipe; exports.defaultServerInject = _chunkQJIAXSLZjs.defaultServerInject; exports.emitter = _chunkQJIAXSLZjs.emitter; exports.getLogger = _chunkVSGYTGHYjs.getLogger; exports.log = _chunkVSGYTGHYjs.log; exports.phecdaNamespace = _chunkQJIAXSLZjs.phecdaNamespace; exports.runMiddleware = _chunkVSGYTGHYjs.runMiddleware; exports.setLogger = _chunkVSGYTGHYjs.setLogger; exports.useS = _chunkQJIAXSLZjs.useS;
411
+ exports.Addon = _chunkV5EYXVJTjs.Addon; exports.Arg = _chunkV5EYXVJTjs.Arg; exports.BadGatewayException = _chunkFX3LDQIIjs.BadGatewayException; exports.BadRequestException = _chunkFX3LDQIIjs.BadRequestException; exports.BaseParam = _chunkV5EYXVJTjs.BaseParam; exports.Body = _chunkV5EYXVJTjs.Body; exports.ConflictException = _chunkFX3LDQIIjs.ConflictException; exports.Context = _chunkFX3LDQIIjs.Context; exports.Controller = _chunkV5EYXVJTjs.Controller; exports.Ctx = _chunkV5EYXVJTjs.Ctx; exports.CustomResponse = CustomResponse; exports.Define = _chunkV5EYXVJTjs.Define; exports.Delete = _chunkV5EYXVJTjs.Delete; exports.ERROR_SYMBOL = _chunk5RBTN33Ajs.ERROR_SYMBOL; exports.Exception = _chunkFX3LDQIIjs.Exception; exports.Factory = _chunkKJUD2BKEjs.Factory; exports.Filter = _chunkV5EYXVJTjs.Filter; exports.ForbiddenException = _chunkFX3LDQIIjs.ForbiddenException; exports.FrameworkException = _chunkFX3LDQIIjs.FrameworkException; exports.Generator = Generator; exports.Get = _chunkV5EYXVJTjs.Get; exports.Guard = _chunkV5EYXVJTjs.Guard; exports.HTTPGenerator = HTTPGenerator; exports.Head = _chunkV5EYXVJTjs.Head; exports.Header = _chunkV5EYXVJTjs.Header; exports.HttpBase = HttpBase; exports.IS_DEV = _chunk5RBTN33Ajs.IS_DEV; exports.IS_ONLY_GENERATE = _chunk5RBTN33Ajs.IS_ONLY_GENERATE; exports.IS_STRICT = _chunk5RBTN33Ajs.IS_STRICT; exports.InvalidInputException = _chunkFX3LDQIIjs.InvalidInputException; exports.LOG_LEVEL = _chunk5RBTN33Ajs.LOG_LEVEL; exports.Meta = _chunkKJUD2BKEjs.Meta; exports.Mixin = _chunk5RBTN33Ajs.Mixin; exports.NotFoundException = _chunkFX3LDQIIjs.NotFoundException; exports.PAddon = PAddon; exports.PExtension = PExtension; exports.PFilter = PFilter; exports.PGuard = PGuard; exports.PPipe = PPipe; exports.PS_EXIT_CODE = _chunk5RBTN33Ajs.PS_EXIT_CODE; exports.Param = _chunkV5EYXVJTjs.Param; exports.Patch = _chunkV5EYXVJTjs.Patch; exports.PayloadLargeException = _chunkFX3LDQIIjs.PayloadLargeException; exports.Pipe = _chunkV5EYXVJTjs.Pipe; exports.Post = _chunkV5EYXVJTjs.Post; exports.Put = _chunkV5EYXVJTjs.Put; exports.Query = _chunkV5EYXVJTjs.Query; exports.Queue = _chunkV5EYXVJTjs.Queue; exports.RPCGenerator = RPCGenerator; exports.Route = _chunkV5EYXVJTjs.Route; exports.Rpc = _chunkV5EYXVJTjs.Rpc; exports.RpcBase = RpcBase; exports.Search = _chunkV5EYXVJTjs.Search; exports.ServerBase = ServerBase; exports.ServerPhecda = _chunkKJUD2BKEjs.ServerPhecda; exports.ServiceUnavailableException = _chunkFX3LDQIIjs.ServiceUnavailableException; exports.TimeoutException = _chunkFX3LDQIIjs.TimeoutException; exports.TimerException = _chunkFX3LDQIIjs.TimerException; exports.UnauthorizedException = _chunkFX3LDQIIjs.UnauthorizedException; exports.UndefinedException = _chunkFX3LDQIIjs.UndefinedException; exports.UnsupportedMediaTypeException = _chunkFX3LDQIIjs.UnsupportedMediaTypeException; exports.ValidateException = _chunkFX3LDQIIjs.ValidateException; exports.WorkerException = _chunkFX3LDQIIjs.WorkerException; exports.addAddon = _chunkFX3LDQIIjs.addAddon; exports.addFilter = _chunkFX3LDQIIjs.addFilter; exports.addGuard = _chunkFX3LDQIIjs.addGuard; exports.addPipe = _chunkFX3LDQIIjs.addPipe; exports.defaultPipe = _chunkFX3LDQIIjs.defaultPipe; exports.defaultServerInject = _chunkKJUD2BKEjs.defaultServerInject; exports.emitter = _chunkKJUD2BKEjs.emitter; exports.getLogger = _chunk5RBTN33Ajs.getLogger; exports.log = _chunk5RBTN33Ajs.log; exports.phecdaNamespace = _chunkKJUD2BKEjs.phecdaNamespace; exports.runMiddleware = _chunk5RBTN33Ajs.runMiddleware; exports.setLogger = _chunk5RBTN33Ajs.setLogger; exports.useS = _chunkKJUD2BKEjs.useS;
package/dist/index.mjs CHANGED
@@ -6,7 +6,7 @@ import {
6
6
  emitter,
7
7
  phecdaNamespace,
8
8
  useS
9
- } from "./chunk-B45BN7LY.mjs";
9
+ } from "./chunk-7ZGYJ5OW.mjs";
10
10
  import {
11
11
  Addon,
12
12
  Arg,
@@ -31,7 +31,7 @@ import {
31
31
  Route,
32
32
  Rpc,
33
33
  Search
34
- } from "./chunk-7NWDKK7D.mjs";
34
+ } from "./chunk-ODVWOXVB.mjs";
35
35
  import {
36
36
  BadGatewayException,
37
37
  BadRequestException,
@@ -57,12 +57,11 @@ import {
57
57
  addPipe,
58
58
  defaultPipe,
59
59
  joinUrl
60
- } from "./chunk-SGMQZRP6.mjs";
60
+ } from "./chunk-CVPZWDXU.mjs";
61
61
  import {
62
62
  ERROR_SYMBOL,
63
63
  IS_DEV,
64
64
  IS_ONLY_GENERATE,
65
- IS_READY,
66
65
  IS_STRICT,
67
66
  LOG_LEVEL,
68
67
  Mixin,
@@ -72,7 +71,7 @@ import {
72
71
  log,
73
72
  runMiddleware,
74
73
  setLogger
75
- } from "./chunk-YKP4ODZA.mjs";
74
+ } from "./chunk-FXTJ3BJ6.mjs";
76
75
 
77
76
  // src/types.ts
78
77
  var ResponseSymbol = Symbol("response");
@@ -361,7 +360,6 @@ export {
361
360
  HttpBase,
362
361
  IS_DEV,
363
362
  IS_ONLY_GENERATE,
364
- IS_READY,
365
363
  IS_STRICT,
366
364
  InvalidInputException,
367
365
  LOG_LEVEL,
@@ -5,7 +5,6 @@ declare const IS_DEV: boolean;
5
5
  declare const IS_ONLY_GENERATE: boolean;
6
6
  declare const IS_STRICT: boolean;
7
7
  declare const LOG_LEVEL: number;
8
- declare const IS_READY: unique symbol;
9
8
  declare enum PS_EXIT_CODE {
10
9
  RELAUNCH = 2,
11
10
  CODE = 4
@@ -105,4 +104,4 @@ interface ControllerMeta extends Meta {
105
104
  data: ControllerMetaData;
106
105
  }
107
106
 
108
- export { type BaseCtx as B, type ControllerMetaData as C, type DefaultOptions as D, type Emitter as E, IS_DEV as I, LOG_LEVEL as L, Meta as M, type OmitFunction as O, type PickFunc as P, type ServiceMetaData as S, type ToClientMap as T, type ControllerMeta as a, type MetaData as b, type BaseError as c, type ToClientInstance as d, type ToClientFn as e, type BaseReturn as f, type BaseRequestType as g, CustomResponse as h, type ExtractResponse as i, ERROR_SYMBOL as j, IS_ONLY_GENERATE as k, IS_STRICT as l, IS_READY as m, PS_EXIT_CODE as n };
107
+ export { type BaseCtx as B, type ControllerMeta as C, type DefaultOptions as D, type Emitter as E, IS_DEV as I, LOG_LEVEL as L, Meta as M, type OmitFunction as O, type PickFunc as P, type ServiceMetaData as S, type ToClientMap as T, type ControllerMetaData as a, type MetaData as b, type BaseError as c, type ToClientInstance as d, type ToClientFn as e, type BaseReturn as f, type BaseRequestType as g, CustomResponse as h, type ExtractResponse as i, ERROR_SYMBOL as j, IS_ONLY_GENERATE as k, IS_STRICT as l, PS_EXIT_CODE as m };
@@ -5,7 +5,6 @@ declare const IS_DEV: boolean;
5
5
  declare const IS_ONLY_GENERATE: boolean;
6
6
  declare const IS_STRICT: boolean;
7
7
  declare const LOG_LEVEL: number;
8
- declare const IS_READY: unique symbol;
9
8
  declare enum PS_EXIT_CODE {
10
9
  RELAUNCH = 2,
11
10
  CODE = 4
@@ -105,4 +104,4 @@ interface ControllerMeta extends Meta {
105
104
  data: ControllerMetaData;
106
105
  }
107
106
 
108
- export { type BaseCtx as B, type ControllerMetaData as C, type DefaultOptions as D, type Emitter as E, IS_DEV as I, LOG_LEVEL as L, Meta as M, type OmitFunction as O, type PickFunc as P, type ServiceMetaData as S, type ToClientMap as T, type ControllerMeta as a, type MetaData as b, type BaseError as c, type ToClientInstance as d, type ToClientFn as e, type BaseReturn as f, type BaseRequestType as g, CustomResponse as h, type ExtractResponse as i, ERROR_SYMBOL as j, IS_ONLY_GENERATE as k, IS_STRICT as l, IS_READY as m, PS_EXIT_CODE as n };
107
+ export { type BaseCtx as B, type ControllerMeta as C, type DefaultOptions as D, type Emitter as E, IS_DEV as I, LOG_LEVEL as L, Meta as M, type OmitFunction as O, type PickFunc as P, type ServiceMetaData as S, type ToClientMap as T, type ControllerMetaData as a, type MetaData as b, type BaseError as c, type ToClientInstance as d, type ToClientFn as e, type BaseReturn as f, type BaseRequestType as g, CustomResponse as h, type ExtractResponse as i, ERROR_SYMBOL as j, IS_ONLY_GENERATE as k, IS_STRICT as l, PS_EXIT_CODE as m };
@@ -1,7 +1,7 @@
1
1
  import { WorkerOptions, QueueOptions, Worker, Queue } from 'bullmq';
2
- import { F as Factory } from '../../core-BcKywWLd.mjs';
3
- import { R as RpcCtx, a as RpcServerOptions, b as RpcClientOptions } from '../../types-DEQb_e59.mjs';
4
- import { T as ToClientMap } from '../../meta-B_HW7cWh.mjs';
2
+ import { F as Factory } from '../../core-BDkhrEyf.mjs';
3
+ import { R as RpcCtx, a as RpcServerOptions, b as RpcClientOptions } from '../../types-B-rUM9Fm.mjs';
4
+ import { T as ToClientMap } from '../../meta-BX5jhe4Z.mjs';
5
5
  import 'phecda-core';
6
6
 
7
7
  interface BullmqCtx extends RpcCtx {
@@ -1,7 +1,7 @@
1
1
  import { WorkerOptions, QueueOptions, Worker, Queue } from 'bullmq';
2
- import { F as Factory } from '../../core-BGEsBtTG.js';
3
- import { R as RpcCtx, a as RpcServerOptions, b as RpcClientOptions } from '../../types-CYF0vha6.js';
4
- import { T as ToClientMap } from '../../meta-B_HW7cWh.js';
2
+ import { F as Factory } from '../../core-D_cz0tKa.js';
3
+ import { R as RpcCtx, a as RpcServerOptions, b as RpcClientOptions } from '../../types-MxxtkZXw.js';
4
+ import { T as ToClientMap } from '../../meta-BX5jhe4Z.js';
5
5
  import 'phecda-core';
6
6
 
7
7
  interface BullmqCtx extends RpcCtx {
@@ -3,11 +3,11 @@
3
3
 
4
4
 
5
5
 
6
+ var _chunkFX3LDQIIjs = require('../../chunk-FX3LDQII.js');
6
7
 
7
- var _chunk7EMAZGYOjs = require('../../chunk-7EMAZGYO.js');
8
8
 
9
9
 
10
- var _chunkVSGYTGHYjs = require('../../chunk-VSGYTGHY.js');
10
+ var _chunk5RBTN33Ajs = require('../../chunk-5RBTN33A.js');
11
11
 
12
12
  // src/rpc/bullmq/create.ts
13
13
  var _bullmq = require('bullmq');
@@ -18,14 +18,14 @@ async function create({ moduleMap, meta }, opts = {}) {
18
18
  const workerMap = {};
19
19
  const queueMap = {};
20
20
  const existQueue = /* @__PURE__ */ new Set();
21
- const metaMap = _chunk7EMAZGYOjs.createControllerMetaMap.call(void 0, meta, (meta2) => {
21
+ const metaMap = _chunkFX3LDQIIjs.createControllerMetaMap.call(void 0, meta, (meta2) => {
22
22
  const { controller, rpc, func, tag } = meta2.data;
23
23
  if (controller === "rpc" && _optionalChain([rpc, 'optionalAccess', _ => _.queue]) !== void 0) {
24
24
  debug(`register method "${func}" in module "${tag}"`);
25
25
  return true;
26
26
  }
27
27
  });
28
- _chunk7EMAZGYOjs.detectAopDep.call(void 0, meta, {
28
+ _chunkFX3LDQIIjs.detectAopDep.call(void 0, meta, {
29
29
  guards: globalGuards
30
30
  }, "rpc");
31
31
  async function subscribeQueues() {
@@ -39,12 +39,12 @@ async function create({ moduleMap, meta }, opts = {}) {
39
39
  if (existQueue.has(queue)) continue;
40
40
  existQueue.add(queue);
41
41
  workerMap[queue] = new (0, _bullmq.Worker)(queue, handleRequest, workerOpts);
42
- _chunk7EMAZGYOjs.Context.applyAddons(addons, workerMap[queue], "bullmq");
42
+ _chunkFX3LDQIIjs.Context.applyAddons(addons, workerMap[queue], "bullmq");
43
43
  }
44
44
  }
45
45
  }
46
46
  }
47
- _chunkVSGYTGHYjs.__name.call(void 0, subscribeQueues, "subscribeQueues");
47
+ _chunk5RBTN33Ajs.__name.call(void 0, subscribeQueues, "subscribeQueues");
48
48
  async function handleRequest(job) {
49
49
  const { data } = job;
50
50
  const { tag, func, args, id, queue: clientQueue, _ps } = data;
@@ -53,12 +53,12 @@ async function create({ moduleMap, meta }, opts = {}) {
53
53
  const meta2 = metaMap.get(tag)[func];
54
54
  const { data: { rpc: { isEvent } = {} } } = meta2;
55
55
  if (!isEvent && !(clientQueue in queueMap)) queueMap[clientQueue] = new (0, _bullmq.Queue)(clientQueue, queueOpts);
56
- const aop = _chunk7EMAZGYOjs.Context.getAop(meta2, {
56
+ const aop = _chunkFX3LDQIIjs.Context.getAop(meta2, {
57
57
  globalFilter,
58
58
  globalGuards,
59
59
  globalPipe
60
60
  });
61
- const context = new (0, _chunk7EMAZGYOjs.Context)({
61
+ const context = new (0, _chunkFX3LDQIIjs.Context)({
62
62
  type: "bullmq",
63
63
  category: "rpc",
64
64
  moduleMap,
@@ -86,9 +86,9 @@ async function create({ moduleMap, meta }, opts = {}) {
86
86
  }
87
87
  });
88
88
  }
89
- _chunkVSGYTGHYjs.__name.call(void 0, handleRequest, "handleRequest");
89
+ _chunk5RBTN33Ajs.__name.call(void 0, handleRequest, "handleRequest");
90
90
  subscribeQueues();
91
- _chunk7EMAZGYOjs.HMR.call(void 0, async () => {
91
+ _chunk5RBTN33Ajs.HMR.call(void 0, async () => {
92
92
  for (const i in workerMap) await workerMap[i].close(true);
93
93
  for (const i in queueMap) await queueMap[i].close();
94
94
  await subscribeQueues();
@@ -98,7 +98,7 @@ async function create({ moduleMap, meta }, opts = {}) {
98
98
  queueMap
99
99
  };
100
100
  }
101
- _chunkVSGYTGHYjs.__name.call(void 0, create, "create");
101
+ _chunk5RBTN33Ajs.__name.call(void 0, create, "create");
102
102
 
103
103
  // src/rpc/bullmq/client.ts
104
104
  var _events = require('events');
@@ -109,7 +109,7 @@ async function createClient(controllers, opts = {}) {
109
109
  const { max, workerOpts, queueOpts, timeout, key } = opts;
110
110
  const ret = {};
111
111
  const emitter = new (0, _events.EventEmitter)();
112
- const clientQueue = _chunk7EMAZGYOjs.genClientQueue.call(void 0, key);
112
+ const clientQueue = _chunkFX3LDQIIjs.genClientQueue.call(void 0, key);
113
113
  const queueMap = {};
114
114
  new (0, _bullmq.Worker)(clientQueue, async (job) => {
115
115
  const { data, id, error } = job.data;
@@ -154,7 +154,7 @@ async function createClient(controllers, opts = {}) {
154
154
  if (error) reject(data);
155
155
  else resolve(data);
156
156
  }
157
- _chunkVSGYTGHYjs.__name.call(void 0, listener, "listener");
157
+ _chunk5RBTN33Ajs.__name.call(void 0, listener, "listener");
158
158
  eventCount++;
159
159
  emitter.once(id, listener);
160
160
  });
@@ -164,7 +164,7 @@ async function createClient(controllers, opts = {}) {
164
164
  }
165
165
  return ret;
166
166
  }
167
- _chunkVSGYTGHYjs.__name.call(void 0, createClient, "createClient");
167
+ _chunk5RBTN33Ajs.__name.call(void 0, createClient, "createClient");
168
168
 
169
169
 
170
170
 
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  Context,
3
- HMR,
4
3
  createControllerMetaMap,
5
4
  detectAopDep,
6
5
  genClientQueue
7
- } from "../../chunk-SGMQZRP6.mjs";
6
+ } from "../../chunk-CVPZWDXU.mjs";
8
7
  import {
8
+ HMR,
9
9
  __name
10
- } from "../../chunk-YKP4ODZA.mjs";
10
+ } from "../../chunk-FXTJ3BJ6.mjs";
11
11
 
12
12
  // src/rpc/bullmq/create.ts
13
13
  import { Queue, Worker } from "bullmq";
@@ -1,7 +1,7 @@
1
1
  import { Consumer, Producer } from 'kafkajs';
2
- import { F as Factory } from '../../core-BcKywWLd.mjs';
3
- import { R as RpcCtx, a as RpcServerOptions, b as RpcClientOptions } from '../../types-DEQb_e59.mjs';
4
- import { T as ToClientMap } from '../../meta-B_HW7cWh.mjs';
2
+ import { F as Factory } from '../../core-BDkhrEyf.mjs';
3
+ import { R as RpcCtx, a as RpcServerOptions, b as RpcClientOptions } from '../../types-B-rUM9Fm.mjs';
4
+ import { T as ToClientMap } from '../../meta-BX5jhe4Z.mjs';
5
5
  import 'phecda-core';
6
6
 
7
7
  interface KafkaCtx extends RpcCtx {
@@ -1,7 +1,7 @@
1
1
  import { Consumer, Producer } from 'kafkajs';
2
- import { F as Factory } from '../../core-BGEsBtTG.js';
3
- import { R as RpcCtx, a as RpcServerOptions, b as RpcClientOptions } from '../../types-CYF0vha6.js';
4
- import { T as ToClientMap } from '../../meta-B_HW7cWh.js';
2
+ import { F as Factory } from '../../core-D_cz0tKa.js';
3
+ import { R as RpcCtx, a as RpcServerOptions, b as RpcClientOptions } from '../../types-MxxtkZXw.js';
4
+ import { T as ToClientMap } from '../../meta-BX5jhe4Z.js';
5
5
  import 'phecda-core';
6
6
 
7
7
  interface KafkaCtx extends RpcCtx {