phecda-server 7.0.0-alpha.4 → 7.0.0-alpha.5

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-MMG73S64.mjs → chunk-2ESEXJQM.mjs} +1 -1
  2. package/dist/{chunk-A53KNKY4.mjs → chunk-3ISYBU3P.mjs} +33 -3
  3. package/dist/{chunk-6EBEME3I.js → chunk-K54JYYXK.js} +51 -51
  4. package/dist/{chunk-RQSQRZL4.js → chunk-KFFS2P7I.js} +3 -1
  5. package/dist/{chunk-KUGFI6SC.mjs → chunk-PXLG75ED.mjs} +1 -1
  6. package/dist/{chunk-PKSWGQLW.js → chunk-TR5Z4SDI.js} +50 -20
  7. package/dist/{chunk-QD3QR3NW.mjs → chunk-UXGJD2PK.mjs} +2 -0
  8. package/dist/{chunk-QCOBXM7F.js → chunk-Y2OLA5OJ.js} +24 -24
  9. package/dist/{core-C1kHRqU9.d.ts → core-CzElxZoF.d.ts} +2 -1
  10. package/dist/{core-CSiaRU7r.d.mts → core-DU7gQKSk.d.mts} +2 -1
  11. package/dist/helper.d.mts +1 -1
  12. package/dist/helper.d.ts +1 -1
  13. package/dist/helper.js +3 -3
  14. package/dist/helper.mjs +2 -2
  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 +40 -40
  18. package/dist/http/elysia/index.mjs +3 -3
  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 +37 -37
  22. package/dist/http/express/index.mjs +2 -2
  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 +38 -38
  26. package/dist/http/fastify/index.mjs +3 -3
  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 +37 -37
  30. package/dist/http/h3/index.mjs +2 -2
  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 -35
  34. package/dist/http/hono/index.mjs +2 -2
  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 +35 -35
  38. package/dist/http/hyper-express/index.mjs +2 -2
  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 +37 -37
  42. package/dist/http/koa/index.mjs +2 -2
  43. package/dist/index.d.mts +8 -8
  44. package/dist/index.d.ts +8 -8
  45. package/dist/index.js +40 -38
  46. package/dist/index.mjs +6 -4
  47. package/dist/{meta-D1M85Hef.d.ts → meta-BTnLXuCa.d.mts} +2 -1
  48. package/dist/{meta-D1M85Hef.d.mts → meta-BTnLXuCa.d.ts} +2 -1
  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 +2 -2
  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 +2 -2
  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 +2 -2
  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 +2 -2
  69. package/dist/test.d.mts +2 -2
  70. package/dist/test.d.ts +2 -2
  71. package/dist/test.js +6 -6
  72. package/dist/test.mjs +2 -2
  73. package/dist/{types-ee1FBodH.d.ts → types--E-OCZhC.d.ts} +1 -1
  74. package/dist/{types-JMhFVp-Z.d.mts → types-BYqBeqrs.d.mts} +1 -1
  75. package/dist/{types-wbHHC93P.d.mts → types-BxlzVoRv.d.mts} +1 -1
  76. package/dist/{types-C9Remkup.d.ts → types-CbfaGkPA.d.ts} +1 -1
  77. package/package.json +1 -1
  78. package/register/loader.mjs +2 -1
  79. package/register/utils.mjs +56 -56
package/dist/index.js CHANGED
@@ -6,7 +6,7 @@
6
6
 
7
7
 
8
8
 
9
- var _chunkPKSWGQLWjs = require('./chunk-PKSWGQLW.js');
9
+ var _chunkTR5Z4SDIjs = require('./chunk-TR5Z4SDI.js');
10
10
 
11
11
 
12
12
 
@@ -31,7 +31,7 @@ var _chunkPKSWGQLWjs = require('./chunk-PKSWGQLW.js');
31
31
 
32
32
 
33
33
 
34
- var _chunkQCOBXM7Fjs = require('./chunk-QCOBXM7F.js');
34
+ var _chunkY2OLA5OJjs = require('./chunk-Y2OLA5OJ.js');
35
35
 
36
36
 
37
37
 
@@ -56,7 +56,7 @@ var _chunkQCOBXM7Fjs = require('./chunk-QCOBXM7F.js');
56
56
 
57
57
 
58
58
 
59
- var _chunk6EBEME3Ijs = require('./chunk-6EBEME3I.js');
59
+ var _chunkK54JYYXKjs = require('./chunk-K54JYYXK.js');
60
60
 
61
61
 
62
62
 
@@ -70,13 +70,14 @@ var _chunk6EBEME3Ijs = require('./chunk-6EBEME3I.js');
70
70
 
71
71
 
72
72
 
73
- var _chunkRQSQRZL4js = require('./chunk-RQSQRZL4.js');
73
+
74
+ var _chunkKFFS2P7Ijs = require('./chunk-KFFS2P7I.js');
74
75
 
75
76
  // src/types.ts
76
77
  var ResponseSymbol = Symbol("response");
77
78
  var CustomResponse = class {
78
79
  static {
79
- _chunkRQSQRZL4js.__name.call(void 0, this, "CustomResponse");
80
+ _chunkKFFS2P7Ijs.__name.call(void 0, this, "CustomResponse");
80
81
  }
81
82
 
82
83
  };
@@ -89,35 +90,35 @@ function _ts_decorate(decorators, target, key, desc) {
89
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;
90
91
  return c > 3 && r && Object.defineProperty(target, key, r), r;
91
92
  }
92
- _chunkRQSQRZL4js.__name.call(void 0, _ts_decorate, "_ts_decorate");
93
+ _chunkKFFS2P7Ijs.__name.call(void 0, _ts_decorate, "_ts_decorate");
93
94
  function _ts_metadata(k, v) {
94
95
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
95
96
  }
96
- _chunkRQSQRZL4js.__name.call(void 0, _ts_metadata, "_ts_metadata");
97
+ _chunkKFFS2P7Ijs.__name.call(void 0, _ts_metadata, "_ts_metadata");
97
98
  var ServerBase = (_class = class extends _phecdacore.Base {constructor(...args2) { super(...args2); _class.prototype.__init.call(this); }
98
99
  static {
99
- _chunkRQSQRZL4js.__name.call(void 0, this, "ServerBase");
100
+ _chunkKFFS2P7Ijs.__name.call(void 0, this, "ServerBase");
100
101
  }
101
- __init() {this.emitter = exports.emitter = _chunkPKSWGQLWjs.emitter}
102
+ __init() {this.emitter = exports.emitter = _chunkTR5Z4SDIjs.emitter}
102
103
  }, _class);
103
104
  var HttpBase = class extends ServerBase {
104
105
  static {
105
- _chunkRQSQRZL4js.__name.call(void 0, this, "HttpBase");
106
+ _chunkKFFS2P7Ijs.__name.call(void 0, this, "HttpBase");
106
107
  }
107
108
 
108
109
  };
109
110
  _ts_decorate([
110
- _chunkQCOBXM7Fjs.Ctx,
111
+ _chunkY2OLA5OJjs.Ctx,
111
112
  _ts_metadata("design:type", typeof HttpContext === "undefined" ? Object : HttpContext)
112
113
  ], HttpBase.prototype, "context", void 0);
113
114
  var RpcBase = class extends ServerBase {
114
115
  static {
115
- _chunkRQSQRZL4js.__name.call(void 0, this, "RpcBase");
116
+ _chunkKFFS2P7Ijs.__name.call(void 0, this, "RpcBase");
116
117
  }
117
118
 
118
119
  };
119
120
  _ts_decorate([
120
- _chunkQCOBXM7Fjs.Ctx,
121
+ _chunkY2OLA5OJjs.Ctx,
121
122
  _ts_metadata("design:type", typeof RpcContext === "undefined" ? Object : RpcContext)
122
123
  ], RpcBase.prototype, "context", void 0);
123
124
 
@@ -125,15 +126,15 @@ _ts_decorate([
125
126
 
126
127
  var PFilter = class extends ServerBase {
127
128
  static {
128
- _chunkRQSQRZL4js.__name.call(void 0, this, "PFilter");
129
+ _chunkKFFS2P7Ijs.__name.call(void 0, this, "PFilter");
129
130
  }
130
131
 
131
132
  constructor(tag) {
132
133
  super();
133
134
  this.key = tag || _phecdacore.getTag.call(void 0, this);
134
- _chunk6EBEME3Ijs.addFilter.call(void 0, this.key, this.use.bind(this));
135
+ _chunkK54JYYXKjs.addFilter.call(void 0, this.key, this.use.bind(this));
135
136
  this.onUnmount(() => {
136
- delete _chunk6EBEME3Ijs.Context.filterRecord[this.key];
137
+ delete _chunkK54JYYXKjs.Context.filterRecord[this.key];
137
138
  });
138
139
  }
139
140
  };
@@ -142,16 +143,16 @@ var PFilter = class extends ServerBase {
142
143
 
143
144
  var PGuard = (_class2 = class extends ServerBase {
144
145
  static {
145
- _chunkRQSQRZL4js.__name.call(void 0, this, "PGuard");
146
+ _chunkKFFS2P7Ijs.__name.call(void 0, this, "PGuard");
146
147
  }
147
148
 
148
149
  __init2() {this.priority = 0}
149
150
  constructor(tag) {
150
151
  super();_class2.prototype.__init2.call(this);;
151
152
  this.key = tag || _phecdacore.getTag.call(void 0, this);
152
- _chunk6EBEME3Ijs.addGuard.call(void 0, this.key, this.use.bind(this), this.priority);
153
+ _chunkK54JYYXKjs.addGuard.call(void 0, this.key, this.use.bind(this), this.priority);
153
154
  this.onUnmount(() => {
154
- delete _chunk6EBEME3Ijs.Context.guardRecord[this.key];
155
+ delete _chunkK54JYYXKjs.Context.guardRecord[this.key];
155
156
  });
156
157
  }
157
158
  }, _class2);
@@ -160,15 +161,15 @@ var PGuard = (_class2 = class extends ServerBase {
160
161
 
161
162
  var PPipe = class extends ServerBase {
162
163
  static {
163
- _chunkRQSQRZL4js.__name.call(void 0, this, "PPipe");
164
+ _chunkKFFS2P7Ijs.__name.call(void 0, this, "PPipe");
164
165
  }
165
166
 
166
167
  constructor(tag) {
167
168
  super();
168
169
  this.key = tag || _phecdacore.getTag.call(void 0, this);
169
- _chunk6EBEME3Ijs.addPipe.call(void 0, this.key, this.use.bind(this));
170
+ _chunkK54JYYXKjs.addPipe.call(void 0, this.key, this.use.bind(this));
170
171
  this.onUnmount(() => {
171
- delete _chunk6EBEME3Ijs.Context.pipeRecord[this.key];
172
+ delete _chunkK54JYYXKjs.Context.pipeRecord[this.key];
172
173
  });
173
174
  }
174
175
  };
@@ -177,16 +178,16 @@ var PPipe = class extends ServerBase {
177
178
 
178
179
  var PAddon = (_class3 = class extends ServerBase {
179
180
  static {
180
- _chunkRQSQRZL4js.__name.call(void 0, this, "PAddon");
181
+ _chunkKFFS2P7Ijs.__name.call(void 0, this, "PAddon");
181
182
  }
182
183
 
183
184
  __init3() {this.priority = 0}
184
185
  constructor(tag) {
185
186
  super();_class3.prototype.__init3.call(this);;
186
187
  this.key = tag || _phecdacore.getTag.call(void 0, this);
187
- _chunk6EBEME3Ijs.addAddon.call(void 0, this.key, this.use.bind(this), this.priority);
188
+ _chunkK54JYYXKjs.addAddon.call(void 0, this.key, this.use.bind(this), this.priority);
188
189
  this.onUnmount(() => {
189
- delete _chunk6EBEME3Ijs.Context.addonRecord[this.key];
190
+ delete _chunkK54JYYXKjs.Context.addonRecord[this.key];
190
191
  });
191
192
  }
192
193
  }, _class3);
@@ -195,7 +196,7 @@ var PAddon = (_class3 = class extends ServerBase {
195
196
 
196
197
  var PExtension = class extends ServerBase {
197
198
  static {
198
- _chunkRQSQRZL4js.__name.call(void 0, this, "PExtension");
199
+ _chunkKFFS2P7Ijs.__name.call(void 0, this, "PExtension");
199
200
  }
200
201
 
201
202
 
@@ -204,27 +205,27 @@ var PExtension = class extends ServerBase {
204
205
  super();
205
206
  const key = this.key = tag || _phecdacore.getTag.call(void 0, this);
206
207
  if (this.pipe) {
207
- _chunk6EBEME3Ijs.addPipe.call(void 0, key, this.pipe.bind(this));
208
+ _chunkK54JYYXKjs.addPipe.call(void 0, key, this.pipe.bind(this));
208
209
  this.onUnmount(() => {
209
- delete _chunk6EBEME3Ijs.Context.pipeRecord[key];
210
+ delete _chunkK54JYYXKjs.Context.pipeRecord[key];
210
211
  });
211
212
  }
212
213
  if (this.addon) {
213
- _chunk6EBEME3Ijs.addAddon.call(void 0, key, this.addon.bind(this), this.addonPriority);
214
+ _chunkK54JYYXKjs.addAddon.call(void 0, key, this.addon.bind(this), this.addonPriority);
214
215
  this.onUnmount(() => {
215
- delete _chunk6EBEME3Ijs.Context.addonRecord[key];
216
+ delete _chunkK54JYYXKjs.Context.addonRecord[key];
216
217
  });
217
218
  }
218
219
  if (this.guard) {
219
- _chunk6EBEME3Ijs.addGuard.call(void 0, key, this.guard.bind(this), this.guardPriority);
220
+ _chunkK54JYYXKjs.addGuard.call(void 0, key, this.guard.bind(this), this.guardPriority);
220
221
  this.onUnmount(() => {
221
- delete _chunk6EBEME3Ijs.Context.guardRecord[key];
222
+ delete _chunkK54JYYXKjs.Context.guardRecord[key];
222
223
  });
223
224
  }
224
225
  if (this.filter) {
225
- _chunk6EBEME3Ijs.addFilter.call(void 0, key, this.filter.bind(this));
226
+ _chunkK54JYYXKjs.addFilter.call(void 0, key, this.filter.bind(this));
226
227
  this.onUnmount(() => {
227
- delete _chunk6EBEME3Ijs.Context.filterRecord[key];
228
+ delete _chunkK54JYYXKjs.Context.filterRecord[key];
228
229
  });
229
230
  }
230
231
  }
@@ -234,7 +235,7 @@ var PExtension = class extends ServerBase {
234
235
  var _fsextra = require('fs-extra'); var _fsextra2 = _interopRequireDefault(_fsextra);
235
236
  var Generator = class {
236
237
  static {
237
- _chunkRQSQRZL4js.__name.call(void 0, this, "Generator");
238
+ _chunkKFFS2P7Ijs.__name.call(void 0, this, "Generator");
238
239
  }
239
240
 
240
241
  constructor(path) {
@@ -251,7 +252,7 @@ var Generator = class {
251
252
  // src/generator/rpc.ts
252
253
  var RPCGenerator = (_class4 = class extends Generator {constructor(...args3) { super(...args3); _class4.prototype.__init4.call(this);_class4.prototype.__init5.call(this); }
253
254
  static {
254
- _chunkRQSQRZL4js.__name.call(void 0, this, "RPCGenerator");
255
+ _chunkKFFS2P7Ijs.__name.call(void 0, this, "RPCGenerator");
255
256
  }
256
257
  __init4() {this.name = "RPC"}
257
258
  __init5() {this.classMap = {}}
@@ -287,7 +288,7 @@ var RPCGenerator = (_class4 = class extends Generator {constructor(...args3) { s
287
288
  // src/generator/http.ts
288
289
  var HTTPGenerator = (_class5 = class extends Generator {constructor(...args4) { super(...args4); _class5.prototype.__init6.call(this);_class5.prototype.__init7.call(this); }
289
290
  static {
290
- _chunkRQSQRZL4js.__name.call(void 0, this, "HTTPGenerator");
291
+ _chunkKFFS2P7Ijs.__name.call(void 0, this, "HTTPGenerator");
291
292
  }
292
293
  __init6() {this.name = "HTTP"}
293
294
  __init7() {this.classMap = {}}
@@ -404,4 +405,5 @@ return ret
404
405
 
405
406
 
406
407
 
407
- exports.Addon = _chunkQCOBXM7Fjs.Addon; exports.Arg = _chunkQCOBXM7Fjs.Arg; exports.BadGatewayException = _chunk6EBEME3Ijs.BadGatewayException; exports.BadRequestException = _chunk6EBEME3Ijs.BadRequestException; exports.BaseParam = _chunkQCOBXM7Fjs.BaseParam; exports.Body = _chunkQCOBXM7Fjs.Body; exports.ConflictException = _chunk6EBEME3Ijs.ConflictException; exports.Context = _chunk6EBEME3Ijs.Context; exports.Controller = _chunkQCOBXM7Fjs.Controller; exports.Ctx = _chunkQCOBXM7Fjs.Ctx; exports.CustomResponse = CustomResponse; exports.Define = _chunkQCOBXM7Fjs.Define; exports.Delete = _chunkQCOBXM7Fjs.Delete; exports.ERROR_SYMBOL = _chunkRQSQRZL4js.ERROR_SYMBOL; exports.Exception = _chunk6EBEME3Ijs.Exception; exports.Factory = _chunkPKSWGQLWjs.Factory; exports.Filter = _chunkQCOBXM7Fjs.Filter; exports.ForbiddenException = _chunk6EBEME3Ijs.ForbiddenException; exports.FrameworkException = _chunk6EBEME3Ijs.FrameworkException; exports.Generator = Generator; exports.Get = _chunkQCOBXM7Fjs.Get; exports.Guard = _chunkQCOBXM7Fjs.Guard; exports.HTTPGenerator = HTTPGenerator; exports.Head = _chunkQCOBXM7Fjs.Head; exports.Header = _chunkQCOBXM7Fjs.Header; exports.HttpBase = HttpBase; exports.IS_HMR = _chunkRQSQRZL4js.IS_HMR; exports.IS_ONLY_GENERATE = _chunkRQSQRZL4js.IS_ONLY_GENERATE; exports.IS_STRICT = _chunkRQSQRZL4js.IS_STRICT; exports.InvalidInputException = _chunk6EBEME3Ijs.InvalidInputException; exports.LOG_LEVEL = _chunkRQSQRZL4js.LOG_LEVEL; exports.Meta = _chunkPKSWGQLWjs.Meta; exports.Mixin = _chunkRQSQRZL4js.Mixin; exports.NotFoundException = _chunk6EBEME3Ijs.NotFoundException; exports.PAddon = PAddon; exports.PExtension = PExtension; exports.PFilter = PFilter; exports.PGuard = PGuard; exports.PPipe = PPipe; exports.PS_EXIT_CODE = _chunkRQSQRZL4js.PS_EXIT_CODE; exports.Param = _chunkQCOBXM7Fjs.Param; exports.Patch = _chunkQCOBXM7Fjs.Patch; exports.PayloadLargeException = _chunk6EBEME3Ijs.PayloadLargeException; exports.Pipe = _chunkQCOBXM7Fjs.Pipe; exports.Post = _chunkQCOBXM7Fjs.Post; exports.Put = _chunkQCOBXM7Fjs.Put; exports.Query = _chunkQCOBXM7Fjs.Query; exports.Queue = _chunkQCOBXM7Fjs.Queue; exports.RPCGenerator = RPCGenerator; exports.Route = _chunkQCOBXM7Fjs.Route; exports.Rpc = _chunkQCOBXM7Fjs.Rpc; exports.RpcBase = RpcBase; exports.Search = _chunkQCOBXM7Fjs.Search; exports.ServerBase = ServerBase; exports.ServerPhecda = _chunkPKSWGQLWjs.ServerPhecda; exports.ServiceUnavailableException = _chunk6EBEME3Ijs.ServiceUnavailableException; exports.TimeoutException = _chunk6EBEME3Ijs.TimeoutException; exports.TimerException = _chunk6EBEME3Ijs.TimerException; exports.UnauthorizedException = _chunk6EBEME3Ijs.UnauthorizedException; exports.UndefinedException = _chunk6EBEME3Ijs.UndefinedException; exports.UnsupportedMediaTypeException = _chunk6EBEME3Ijs.UnsupportedMediaTypeException; exports.ValidateException = _chunk6EBEME3Ijs.ValidateException; exports.WorkerException = _chunk6EBEME3Ijs.WorkerException; exports.addAddon = _chunk6EBEME3Ijs.addAddon; exports.addFilter = _chunk6EBEME3Ijs.addFilter; exports.addGuard = _chunk6EBEME3Ijs.addGuard; exports.addPipe = _chunk6EBEME3Ijs.addPipe; exports.defaultPipe = _chunk6EBEME3Ijs.defaultPipe; exports.defaultServerInject = _chunkPKSWGQLWjs.defaultServerInject; exports.emitter = _chunkPKSWGQLWjs.emitter; exports.getLogger = _chunkRQSQRZL4js.getLogger; exports.log = _chunkRQSQRZL4js.log; exports.phecdaNamespace = _chunkPKSWGQLWjs.phecdaNamespace; exports.runMiddleware = _chunkRQSQRZL4js.runMiddleware; exports.setLogger = _chunkRQSQRZL4js.setLogger; exports.useS = _chunkPKSWGQLWjs.useS;
408
+
409
+ exports.Addon = _chunkY2OLA5OJjs.Addon; exports.Arg = _chunkY2OLA5OJjs.Arg; exports.BadGatewayException = _chunkK54JYYXKjs.BadGatewayException; exports.BadRequestException = _chunkK54JYYXKjs.BadRequestException; exports.BaseParam = _chunkY2OLA5OJjs.BaseParam; exports.Body = _chunkY2OLA5OJjs.Body; exports.ConflictException = _chunkK54JYYXKjs.ConflictException; exports.Context = _chunkK54JYYXKjs.Context; exports.Controller = _chunkY2OLA5OJjs.Controller; exports.Ctx = _chunkY2OLA5OJjs.Ctx; exports.CustomResponse = CustomResponse; exports.Define = _chunkY2OLA5OJjs.Define; exports.Delete = _chunkY2OLA5OJjs.Delete; exports.ERROR_SYMBOL = _chunkKFFS2P7Ijs.ERROR_SYMBOL; exports.Exception = _chunkK54JYYXKjs.Exception; exports.Factory = _chunkTR5Z4SDIjs.Factory; exports.Filter = _chunkY2OLA5OJjs.Filter; exports.ForbiddenException = _chunkK54JYYXKjs.ForbiddenException; exports.FrameworkException = _chunkK54JYYXKjs.FrameworkException; exports.Generator = Generator; exports.Get = _chunkY2OLA5OJjs.Get; exports.Guard = _chunkY2OLA5OJjs.Guard; exports.HTTPGenerator = HTTPGenerator; exports.Head = _chunkY2OLA5OJjs.Head; exports.Header = _chunkY2OLA5OJjs.Header; exports.HttpBase = HttpBase; exports.IS_HMR = _chunkKFFS2P7Ijs.IS_HMR; exports.IS_ONLY_GENERATE = _chunkKFFS2P7Ijs.IS_ONLY_GENERATE; exports.IS_READY = _chunkKFFS2P7Ijs.IS_READY; exports.IS_STRICT = _chunkKFFS2P7Ijs.IS_STRICT; exports.InvalidInputException = _chunkK54JYYXKjs.InvalidInputException; exports.LOG_LEVEL = _chunkKFFS2P7Ijs.LOG_LEVEL; exports.Meta = _chunkTR5Z4SDIjs.Meta; exports.Mixin = _chunkKFFS2P7Ijs.Mixin; exports.NotFoundException = _chunkK54JYYXKjs.NotFoundException; exports.PAddon = PAddon; exports.PExtension = PExtension; exports.PFilter = PFilter; exports.PGuard = PGuard; exports.PPipe = PPipe; exports.PS_EXIT_CODE = _chunkKFFS2P7Ijs.PS_EXIT_CODE; exports.Param = _chunkY2OLA5OJjs.Param; exports.Patch = _chunkY2OLA5OJjs.Patch; exports.PayloadLargeException = _chunkK54JYYXKjs.PayloadLargeException; exports.Pipe = _chunkY2OLA5OJjs.Pipe; exports.Post = _chunkY2OLA5OJjs.Post; exports.Put = _chunkY2OLA5OJjs.Put; exports.Query = _chunkY2OLA5OJjs.Query; exports.Queue = _chunkY2OLA5OJjs.Queue; exports.RPCGenerator = RPCGenerator; exports.Route = _chunkY2OLA5OJjs.Route; exports.Rpc = _chunkY2OLA5OJjs.Rpc; exports.RpcBase = RpcBase; exports.Search = _chunkY2OLA5OJjs.Search; exports.ServerBase = ServerBase; exports.ServerPhecda = _chunkTR5Z4SDIjs.ServerPhecda; exports.ServiceUnavailableException = _chunkK54JYYXKjs.ServiceUnavailableException; exports.TimeoutException = _chunkK54JYYXKjs.TimeoutException; exports.TimerException = _chunkK54JYYXKjs.TimerException; exports.UnauthorizedException = _chunkK54JYYXKjs.UnauthorizedException; exports.UndefinedException = _chunkK54JYYXKjs.UndefinedException; exports.UnsupportedMediaTypeException = _chunkK54JYYXKjs.UnsupportedMediaTypeException; exports.ValidateException = _chunkK54JYYXKjs.ValidateException; exports.WorkerException = _chunkK54JYYXKjs.WorkerException; exports.addAddon = _chunkK54JYYXKjs.addAddon; exports.addFilter = _chunkK54JYYXKjs.addFilter; exports.addGuard = _chunkK54JYYXKjs.addGuard; exports.addPipe = _chunkK54JYYXKjs.addPipe; exports.defaultPipe = _chunkK54JYYXKjs.defaultPipe; exports.defaultServerInject = _chunkTR5Z4SDIjs.defaultServerInject; exports.emitter = _chunkTR5Z4SDIjs.emitter; exports.getLogger = _chunkKFFS2P7Ijs.getLogger; exports.log = _chunkKFFS2P7Ijs.log; exports.phecdaNamespace = _chunkTR5Z4SDIjs.phecdaNamespace; exports.runMiddleware = _chunkKFFS2P7Ijs.runMiddleware; exports.setLogger = _chunkKFFS2P7Ijs.setLogger; exports.useS = _chunkTR5Z4SDIjs.useS;
package/dist/index.mjs CHANGED
@@ -6,7 +6,7 @@ import {
6
6
  emitter,
7
7
  phecdaNamespace,
8
8
  useS
9
- } from "./chunk-A53KNKY4.mjs";
9
+ } from "./chunk-3ISYBU3P.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-KUGFI6SC.mjs";
34
+ } from "./chunk-PXLG75ED.mjs";
35
35
  import {
36
36
  BadGatewayException,
37
37
  BadRequestException,
@@ -56,11 +56,12 @@ import {
56
56
  addGuard,
57
57
  addPipe,
58
58
  defaultPipe
59
- } from "./chunk-MMG73S64.mjs";
59
+ } from "./chunk-2ESEXJQM.mjs";
60
60
  import {
61
61
  ERROR_SYMBOL,
62
62
  IS_HMR,
63
63
  IS_ONLY_GENERATE,
64
+ IS_READY,
64
65
  IS_STRICT,
65
66
  LOG_LEVEL,
66
67
  Mixin,
@@ -70,7 +71,7 @@ import {
70
71
  log,
71
72
  runMiddleware,
72
73
  setLogger
73
- } from "./chunk-QD3QR3NW.mjs";
74
+ } from "./chunk-UXGJD2PK.mjs";
74
75
 
75
76
  // src/types.ts
76
77
  var ResponseSymbol = Symbol("response");
@@ -356,6 +357,7 @@ export {
356
357
  HttpBase,
357
358
  IS_HMR,
358
359
  IS_ONLY_GENERATE,
360
+ IS_READY,
359
361
  IS_STRICT,
360
362
  InvalidInputException,
361
363
  LOG_LEVEL,
@@ -5,6 +5,7 @@ declare const IS_HMR: 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;
8
9
  declare enum PS_EXIT_CODE {
9
10
  RELAUNCH = 2,
10
11
  CODE = 4
@@ -104,4 +105,4 @@ interface ControllerMeta extends Meta {
104
105
  data: ControllerMetaData;
105
106
  }
106
107
 
107
- export { type BaseContext as B, type ControllerMetaData as C, type DefaultOptions as D, type Emitter as E, IS_HMR 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, PS_EXIT_CODE as m };
108
+ export { type BaseContext as B, type ControllerMetaData as C, type DefaultOptions as D, type Emitter as E, IS_HMR 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 };
@@ -5,6 +5,7 @@ declare const IS_HMR: 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;
8
9
  declare enum PS_EXIT_CODE {
9
10
  RELAUNCH = 2,
10
11
  CODE = 4
@@ -104,4 +105,4 @@ interface ControllerMeta extends Meta {
104
105
  data: ControllerMetaData;
105
106
  }
106
107
 
107
- export { type BaseContext as B, type ControllerMetaData as C, type DefaultOptions as D, type Emitter as E, IS_HMR 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, PS_EXIT_CODE as m };
108
+ export { type BaseContext as B, type ControllerMetaData as C, type DefaultOptions as D, type Emitter as E, IS_HMR 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 };
@@ -1,7 +1,7 @@
1
1
  import { WorkerOptions, QueueOptions, Worker, Queue } from 'bullmq';
2
- import { F as Factory } from '../../core-CSiaRU7r.mjs';
3
- import { R as RpcContext, a as RpcServerOptions, b as RpcClientOptions } from '../../types-JMhFVp-Z.mjs';
4
- import { T as ToClientMap } from '../../meta-D1M85Hef.mjs';
2
+ import { F as Factory } from '../../core-DU7gQKSk.mjs';
3
+ import { R as RpcContext, a as RpcServerOptions, b as RpcClientOptions } from '../../types-BYqBeqrs.mjs';
4
+ import { T as ToClientMap } from '../../meta-BTnLXuCa.mjs';
5
5
  import 'phecda-core';
6
6
 
7
7
  interface BullmqCtx extends RpcContext {
@@ -1,7 +1,7 @@
1
1
  import { WorkerOptions, QueueOptions, Worker, Queue } from 'bullmq';
2
- import { F as Factory } from '../../core-C1kHRqU9.js';
3
- import { R as RpcContext, a as RpcServerOptions, b as RpcClientOptions } from '../../types-C9Remkup.js';
4
- import { T as ToClientMap } from '../../meta-D1M85Hef.js';
2
+ import { F as Factory } from '../../core-CzElxZoF.js';
3
+ import { R as RpcContext, a as RpcServerOptions, b as RpcClientOptions } from '../../types-CbfaGkPA.js';
4
+ import { T as ToClientMap } from '../../meta-BTnLXuCa.js';
5
5
  import 'phecda-core';
6
6
 
7
7
  interface BullmqCtx extends RpcContext {
@@ -4,10 +4,10 @@
4
4
 
5
5
 
6
6
 
7
- var _chunk6EBEME3Ijs = require('../../chunk-6EBEME3I.js');
7
+ var _chunkK54JYYXKjs = require('../../chunk-K54JYYXK.js');
8
8
 
9
9
 
10
- var _chunkRQSQRZL4js = require('../../chunk-RQSQRZL4.js');
10
+ var _chunkKFFS2P7Ijs = require('../../chunk-KFFS2P7I.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 = _chunk6EBEME3Ijs.createControllerMetaMap.call(void 0, meta, (meta2) => {
21
+ const metaMap = _chunkK54JYYXKjs.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
- _chunk6EBEME3Ijs.detectAopDep.call(void 0, meta, {
28
+ _chunkK54JYYXKjs.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
- _chunk6EBEME3Ijs.Context.applyAddons(addons, workerMap[queue], "bullmq");
42
+ _chunkK54JYYXKjs.Context.applyAddons(addons, workerMap[queue], "bullmq");
43
43
  }
44
44
  }
45
45
  }
46
46
  }
47
- _chunkRQSQRZL4js.__name.call(void 0, subscribeQueues, "subscribeQueues");
47
+ _chunkKFFS2P7Ijs.__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 = _chunk6EBEME3Ijs.Context.getAop(meta2, {
56
+ const aop = _chunkK54JYYXKjs.Context.getAop(meta2, {
57
57
  globalFilter,
58
58
  globalGuards,
59
59
  globalPipe
60
60
  });
61
- const context = new (0, _chunk6EBEME3Ijs.Context)({
61
+ const context = new (0, _chunkK54JYYXKjs.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
- _chunkRQSQRZL4js.__name.call(void 0, handleRequest, "handleRequest");
89
+ _chunkKFFS2P7Ijs.__name.call(void 0, handleRequest, "handleRequest");
90
90
  subscribeQueues();
91
- _chunk6EBEME3Ijs.HMR.call(void 0, async () => {
91
+ _chunkK54JYYXKjs.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
- _chunkRQSQRZL4js.__name.call(void 0, create, "create");
101
+ _chunkKFFS2P7Ijs.__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 = _chunk6EBEME3Ijs.genClientQueue.call(void 0, key);
112
+ const clientQueue = _chunkK54JYYXKjs.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
- _chunkRQSQRZL4js.__name.call(void 0, listener, "listener");
157
+ _chunkKFFS2P7Ijs.__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
- _chunkRQSQRZL4js.__name.call(void 0, createClient, "createClient");
167
+ _chunkKFFS2P7Ijs.__name.call(void 0, createClient, "createClient");
168
168
 
169
169
 
170
170
 
@@ -4,10 +4,10 @@ import {
4
4
  createControllerMetaMap,
5
5
  detectAopDep,
6
6
  genClientQueue
7
- } from "../../chunk-MMG73S64.mjs";
7
+ } from "../../chunk-2ESEXJQM.mjs";
8
8
  import {
9
9
  __name
10
- } from "../../chunk-QD3QR3NW.mjs";
10
+ } from "../../chunk-UXGJD2PK.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-CSiaRU7r.mjs';
3
- import { R as RpcContext, a as RpcServerOptions, b as RpcClientOptions } from '../../types-JMhFVp-Z.mjs';
4
- import { T as ToClientMap } from '../../meta-D1M85Hef.mjs';
2
+ import { F as Factory } from '../../core-DU7gQKSk.mjs';
3
+ import { R as RpcContext, a as RpcServerOptions, b as RpcClientOptions } from '../../types-BYqBeqrs.mjs';
4
+ import { T as ToClientMap } from '../../meta-BTnLXuCa.mjs';
5
5
  import 'phecda-core';
6
6
 
7
7
  interface KafkaCtx extends RpcContext {
@@ -1,7 +1,7 @@
1
1
  import { Consumer, Producer } from 'kafkajs';
2
- import { F as Factory } from '../../core-C1kHRqU9.js';
3
- import { R as RpcContext, a as RpcServerOptions, b as RpcClientOptions } from '../../types-C9Remkup.js';
4
- import { T as ToClientMap } from '../../meta-D1M85Hef.js';
2
+ import { F as Factory } from '../../core-CzElxZoF.js';
3
+ import { R as RpcContext, a as RpcServerOptions, b as RpcClientOptions } from '../../types-CbfaGkPA.js';
4
+ import { T as ToClientMap } from '../../meta-BTnLXuCa.js';
5
5
  import 'phecda-core';
6
6
 
7
7
  interface KafkaCtx extends RpcContext {
@@ -3,10 +3,10 @@
3
3
 
4
4
 
5
5
 
6
- var _chunk6EBEME3Ijs = require('../../chunk-6EBEME3I.js');
6
+ var _chunkK54JYYXKjs = require('../../chunk-K54JYYXK.js');
7
7
 
8
8
 
9
- var _chunkRQSQRZL4js = require('../../chunk-RQSQRZL4.js');
9
+ var _chunkKFFS2P7Ijs = require('../../chunk-KFFS2P7I.js');
10
10
 
11
11
  // src/rpc/kafka/bind.ts
12
12
  var _debug = require('debug'); var _debug2 = _interopRequireDefault(_debug);
@@ -14,18 +14,18 @@ var debug = _debug2.default.call(void 0, "phecda-server/kafka");
14
14
  async function bind({ consumer, producer }, { moduleMap, meta }, opts = {}) {
15
15
  const { globalGuards, globalFilter, globalPipe, globalAddons = [], defaultQueue } = opts;
16
16
  const existQueue = /* @__PURE__ */ new Set();
17
- const metaMap = _chunk6EBEME3Ijs.createControllerMetaMap.call(void 0, meta, (meta2) => {
17
+ const metaMap = _chunkK54JYYXKjs.createControllerMetaMap.call(void 0, meta, (meta2) => {
18
18
  const { controller, rpc, func, tag } = meta2.data;
19
19
  if (controller === "rpc" && _optionalChain([rpc, 'optionalAccess', _ => _.queue]) !== void 0) {
20
20
  debug(`register method "${func}" in module "${tag}"`);
21
21
  return true;
22
22
  }
23
23
  });
24
- _chunk6EBEME3Ijs.detectAopDep.call(void 0, meta, {
24
+ _chunkK54JYYXKjs.detectAopDep.call(void 0, meta, {
25
25
  guards: globalGuards,
26
26
  addons: globalAddons
27
27
  }, "rpc");
28
- _chunk6EBEME3Ijs.Context.applyAddons(globalAddons, {
28
+ _chunkK54JYYXKjs.Context.applyAddons(globalAddons, {
29
29
  consumer,
30
30
  producer
31
31
  }, "kafka");
@@ -47,10 +47,10 @@ async function bind({ consumer, producer }, { moduleMap, meta }, opts = {}) {
47
47
  }
48
48
  }
49
49
  }
50
- _chunkRQSQRZL4js.__name.call(void 0, subscribeQueues, "subscribeQueues");
50
+ _chunkKFFS2P7Ijs.__name.call(void 0, subscribeQueues, "subscribeQueues");
51
51
  await subscribeQueues();
52
52
  await consumer.run({
53
- eachMessage: /* @__PURE__ */ _chunkRQSQRZL4js.__name.call(void 0, async ({ message, partition, topic, heartbeat, pause }) => {
53
+ eachMessage: /* @__PURE__ */ _chunkKFFS2P7Ijs.__name.call(void 0, async ({ message, partition, topic, heartbeat, pause }) => {
54
54
  if (!existQueue.has(topic)) return;
55
55
  const data = JSON.parse(message.value.toString());
56
56
  const { tag, func, id, queue: clientQueue, _ps, args } = data;
@@ -59,12 +59,12 @@ async function bind({ consumer, producer }, { moduleMap, meta }, opts = {}) {
59
59
  const meta2 = metaMap.get(tag)[func];
60
60
  const { data: { rpc } } = meta2;
61
61
  const isEvent = rpc.isEvent;
62
- const aop = _chunk6EBEME3Ijs.Context.getAop(meta2, {
62
+ const aop = _chunkK54JYYXKjs.Context.getAop(meta2, {
63
63
  globalFilter,
64
64
  globalGuards,
65
65
  globalPipe
66
66
  });
67
- const context = new (0, _chunk6EBEME3Ijs.Context)({
67
+ const context = new (0, _chunkK54JYYXKjs.Context)({
68
68
  type: "kafka",
69
69
  category: "rpc",
70
70
  moduleMap,
@@ -113,7 +113,7 @@ async function bind({ consumer, producer }, { moduleMap, meta }, opts = {}) {
113
113
  }, "eachMessage")
114
114
  });
115
115
  }
116
- _chunkRQSQRZL4js.__name.call(void 0, bind, "bind");
116
+ _chunkKFFS2P7Ijs.__name.call(void 0, bind, "bind");
117
117
 
118
118
  // src/rpc/kafka/client.ts
119
119
  var _events = require('events');
@@ -122,7 +122,7 @@ async function createClient({ producer, consumer }, controllers, opts) {
122
122
  let eventCount = 1;
123
123
  const ret = {};
124
124
  const emitter = new (0, _events.EventEmitter)();
125
- const clientQueue = _chunk6EBEME3Ijs.genClientQueue.call(void 0, _optionalChain([opts, 'optionalAccess', _2 => _2.key]));
125
+ const clientQueue = _chunkK54JYYXKjs.genClientQueue.call(void 0, _optionalChain([opts, 'optionalAccess', _2 => _2.key]));
126
126
  await consumer.subscribe({
127
127
  topic: clientQueue,
128
128
  fromBeginning: true
@@ -172,7 +172,7 @@ async function createClient({ producer, consumer }, controllers, opts) {
172
172
  if (error) reject(data);
173
173
  else resolve(data);
174
174
  }
175
- _chunkRQSQRZL4js.__name.call(void 0, listener, "listener");
175
+ _chunkKFFS2P7Ijs.__name.call(void 0, listener, "listener");
176
176
  eventCount++;
177
177
  emitter.once(id, listener);
178
178
  });
@@ -181,7 +181,7 @@ async function createClient({ producer, consumer }, controllers, opts) {
181
181
  });
182
182
  }
183
183
  await consumer.run({
184
- eachMessage: /* @__PURE__ */ _chunkRQSQRZL4js.__name.call(void 0, async ({ message, topic }) => {
184
+ eachMessage: /* @__PURE__ */ _chunkKFFS2P7Ijs.__name.call(void 0, async ({ message, topic }) => {
185
185
  if (clientQueue === topic && message.value) {
186
186
  const { data, id, error } = JSON.parse(message.value.toString());
187
187
  emitter.emit(id, data, error);
@@ -190,7 +190,7 @@ async function createClient({ producer, consumer }, controllers, opts) {
190
190
  });
191
191
  return ret;
192
192
  }
193
- _chunkRQSQRZL4js.__name.call(void 0, createClient, "createClient");
193
+ _chunkKFFS2P7Ijs.__name.call(void 0, createClient, "createClient");
194
194
 
195
195
 
196
196
 
@@ -3,10 +3,10 @@ import {
3
3
  createControllerMetaMap,
4
4
  detectAopDep,
5
5
  genClientQueue
6
- } from "../../chunk-MMG73S64.mjs";
6
+ } from "../../chunk-2ESEXJQM.mjs";
7
7
  import {
8
8
  __name
9
- } from "../../chunk-QD3QR3NW.mjs";
9
+ } from "../../chunk-UXGJD2PK.mjs";
10
10
 
11
11
  // src/rpc/kafka/bind.ts
12
12
  import Debug from "debug";
@@ -1,7 +1,7 @@
1
1
  import { NatsConnection } from 'nats';
2
- import { F as Factory } from '../../core-CSiaRU7r.mjs';
3
- import { R as RpcContext, a as RpcServerOptions, b as RpcClientOptions } from '../../types-JMhFVp-Z.mjs';
4
- import { T as ToClientMap } from '../../meta-D1M85Hef.mjs';
2
+ import { F as Factory } from '../../core-DU7gQKSk.mjs';
3
+ import { R as RpcContext, a as RpcServerOptions, b as RpcClientOptions } from '../../types-BYqBeqrs.mjs';
4
+ import { T as ToClientMap } from '../../meta-BTnLXuCa.mjs';
5
5
  import 'phecda-core';
6
6
 
7
7
  interface NatsCtx extends RpcContext {
@@ -1,7 +1,7 @@
1
1
  import { NatsConnection } from 'nats';
2
- import { F as Factory } from '../../core-C1kHRqU9.js';
3
- import { R as RpcContext, a as RpcServerOptions, b as RpcClientOptions } from '../../types-C9Remkup.js';
4
- import { T as ToClientMap } from '../../meta-D1M85Hef.js';
2
+ import { F as Factory } from '../../core-CzElxZoF.js';
3
+ import { R as RpcContext, a as RpcServerOptions, b as RpcClientOptions } from '../../types-CbfaGkPA.js';
4
+ import { T as ToClientMap } from '../../meta-BTnLXuCa.js';
5
5
  import 'phecda-core';
6
6
 
7
7
  interface NatsCtx extends RpcContext {