phecda-server 5.3.2 → 6.0.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 (69) hide show
  1. package/dist/chunk-2UTKBEZE.mjs +233 -0
  2. package/dist/{chunk-NT6HEBC6.mjs → chunk-HDQAT2IM.mjs} +63 -62
  3. package/dist/{chunk-UIKQNJN3.js → chunk-LYEZ6RGX.js} +62 -61
  4. package/dist/chunk-PALEEADE.js +233 -0
  5. package/dist/{chunk-RZ7IXJYQ.js → chunk-TZYATAJX.js} +12 -30
  6. package/dist/{chunk-3IPYLGY2.mjs → chunk-YUXERDQ6.mjs} +13 -31
  7. package/dist/{core-dx9E5x2N.d.ts → core-Blq8frmr.d.ts} +4 -3
  8. package/dist/{core-Bc2ENEHX.d.mts → core-D2oL8Ge0.d.mts} +4 -3
  9. package/dist/helper.js +2 -2
  10. package/dist/helper.mjs +1 -1
  11. package/dist/index.d.mts +9 -10
  12. package/dist/index.d.ts +9 -10
  13. package/dist/index.js +27 -27
  14. package/dist/index.mjs +6 -6
  15. package/dist/rpc/bullmq/index.d.mts +1 -1
  16. package/dist/rpc/bullmq/index.d.ts +1 -1
  17. package/dist/rpc/bullmq/index.js +6 -6
  18. package/dist/rpc/bullmq/index.mjs +1 -1
  19. package/dist/rpc/kafka/index.d.mts +1 -1
  20. package/dist/rpc/kafka/index.d.ts +1 -1
  21. package/dist/rpc/kafka/index.js +5 -5
  22. package/dist/rpc/kafka/index.mjs +1 -1
  23. package/dist/rpc/nats/index.d.mts +1 -1
  24. package/dist/rpc/nats/index.d.ts +1 -1
  25. package/dist/rpc/nats/index.js +5 -5
  26. package/dist/rpc/nats/index.mjs +1 -1
  27. package/dist/rpc/rabbitmq/index.d.mts +1 -1
  28. package/dist/rpc/rabbitmq/index.d.ts +1 -1
  29. package/dist/rpc/rabbitmq/index.js +6 -6
  30. package/dist/rpc/rabbitmq/index.mjs +1 -1
  31. package/dist/rpc/redis/index.d.mts +1 -1
  32. package/dist/rpc/redis/index.d.ts +1 -1
  33. package/dist/rpc/redis/index.js +6 -6
  34. package/dist/rpc/redis/index.mjs +1 -1
  35. package/dist/server/elysia/index.d.mts +1 -1
  36. package/dist/server/elysia/index.d.ts +1 -1
  37. package/dist/server/elysia/index.js +15 -15
  38. package/dist/server/elysia/index.mjs +2 -2
  39. package/dist/server/express/index.d.mts +1 -1
  40. package/dist/server/express/index.d.ts +1 -1
  41. package/dist/server/express/index.js +14 -14
  42. package/dist/server/express/index.mjs +1 -1
  43. package/dist/server/fastify/index.d.mts +1 -1
  44. package/dist/server/fastify/index.d.ts +1 -1
  45. package/dist/server/fastify/index.js +15 -15
  46. package/dist/server/fastify/index.mjs +2 -2
  47. package/dist/server/h3/index.d.mts +1 -1
  48. package/dist/server/h3/index.d.ts +1 -1
  49. package/dist/server/h3/index.js +12 -12
  50. package/dist/server/h3/index.mjs +1 -1
  51. package/dist/server/hono/index.d.mts +1 -1
  52. package/dist/server/hono/index.d.ts +1 -1
  53. package/dist/server/hono/index.js +13 -13
  54. package/dist/server/hono/index.mjs +1 -1
  55. package/dist/server/hyper-express/index.d.mts +1 -1
  56. package/dist/server/hyper-express/index.d.ts +1 -1
  57. package/dist/server/hyper-express/index.js +13 -13
  58. package/dist/server/hyper-express/index.mjs +1 -1
  59. package/dist/server/koa/index.d.mts +1 -1
  60. package/dist/server/koa/index.d.ts +1 -1
  61. package/dist/server/koa/index.js +14 -14
  62. package/dist/server/koa/index.mjs +1 -1
  63. package/dist/test.d.mts +1 -1
  64. package/dist/test.d.ts +1 -1
  65. package/dist/test.js +2 -2
  66. package/dist/test.mjs +1 -1
  67. package/package.json +2 -2
  68. package/dist/chunk-2HVTWYS2.js +0 -279
  69. package/dist/chunk-SXOZVIKW.mjs +0 -279
package/dist/index.js CHANGED
@@ -3,8 +3,8 @@
3
3
 
4
4
 
5
5
 
6
- var _chunkUIKQNJN3js = require('./chunk-UIKQNJN3.js');
7
6
 
7
+ var _chunkLYEZ6RGXjs = require('./chunk-LYEZ6RGX.js');
8
8
 
9
9
 
10
10
 
@@ -29,7 +29,7 @@ var _chunkUIKQNJN3js = require('./chunk-UIKQNJN3.js');
29
29
 
30
30
 
31
31
 
32
- var _chunk2HVTWYS2js = require('./chunk-2HVTWYS2.js');
32
+ var _chunkPALEEADEjs = require('./chunk-PALEEADE.js');
33
33
 
34
34
 
35
35
 
@@ -55,7 +55,7 @@ var _chunk2HVTWYS2js = require('./chunk-2HVTWYS2.js');
55
55
 
56
56
 
57
57
 
58
- var _chunkRZ7IXJYQjs = require('./chunk-RZ7IXJYQ.js');
58
+ var _chunkTZYATAJXjs = require('./chunk-TZYATAJX.js');
59
59
 
60
60
 
61
61
 
@@ -95,7 +95,7 @@ var ServerBase = (_class = class extends _phecdacore.Base {constructor(...args2)
95
95
  static {
96
96
  _chunkGHFSIZUOjs.__name.call(void 0, this, "ServerBase");
97
97
  }
98
- __init() {this.emitter = exports.emitter = _chunkUIKQNJN3js.emitter}
98
+ __init() {this.emitter = exports.emitter = _chunkLYEZ6RGXjs.emitter}
99
99
  }, _class);
100
100
  var HttpBase = class extends ServerBase {
101
101
  static {
@@ -104,7 +104,7 @@ var HttpBase = class extends ServerBase {
104
104
 
105
105
  };
106
106
  _ts_decorate([
107
- _chunk2HVTWYS2js.Ctx,
107
+ _chunkPALEEADEjs.Ctx,
108
108
  _ts_metadata("design:type", typeof HttpContext === "undefined" ? Object : HttpContext)
109
109
  ], HttpBase.prototype, "context", void 0);
110
110
  var RpcBase = class extends ServerBase {
@@ -114,7 +114,7 @@ var RpcBase = class extends ServerBase {
114
114
 
115
115
  };
116
116
  _ts_decorate([
117
- _chunk2HVTWYS2js.Ctx,
117
+ _chunkPALEEADEjs.Ctx,
118
118
  _ts_metadata("design:type", typeof RpcContext === "undefined" ? Object : RpcContext)
119
119
  ], RpcBase.prototype, "context", void 0);
120
120
 
@@ -128,9 +128,9 @@ var PFilter = class extends ServerBase {
128
128
  constructor(tag) {
129
129
  super();
130
130
  this.key = tag || _phecdacore.getTag.call(void 0, this);
131
- _chunkRZ7IXJYQjs.addFilter.call(void 0, this.key, this.use.bind(this));
131
+ _chunkTZYATAJXjs.addFilter.call(void 0, this.key, this.use.bind(this));
132
132
  this.onUnmount(() => {
133
- delete _chunkRZ7IXJYQjs.Context.filterRecord[this.key];
133
+ delete _chunkTZYATAJXjs.Context.filterRecord[this.key];
134
134
  });
135
135
  }
136
136
  };
@@ -145,9 +145,9 @@ var PGuard = class extends ServerBase {
145
145
  constructor(tag) {
146
146
  super();
147
147
  this.key = tag || _phecdacore.getTag.call(void 0, this);
148
- _chunkRZ7IXJYQjs.addGuard.call(void 0, this.key, this.use.bind(this));
148
+ _chunkTZYATAJXjs.addGuard.call(void 0, this.key, this.use.bind(this));
149
149
  this.onUnmount(() => {
150
- delete _chunkRZ7IXJYQjs.Context.guardRecord[this.key];
150
+ delete _chunkTZYATAJXjs.Context.guardRecord[this.key];
151
151
  });
152
152
  }
153
153
  };
@@ -163,9 +163,9 @@ var PInterceptor = class extends ServerBase {
163
163
  super();
164
164
  this.key = tag || _phecdacore.getTag.call(void 0, this);
165
165
  this.onUnmount(() => {
166
- delete _chunkRZ7IXJYQjs.Context.interceptorRecord[this.key];
166
+ delete _chunkTZYATAJXjs.Context.interceptorRecord[this.key];
167
167
  });
168
- _chunkRZ7IXJYQjs.addInterceptor.call(void 0, this.key, this.use.bind(this));
168
+ _chunkTZYATAJXjs.addInterceptor.call(void 0, this.key, this.use.bind(this));
169
169
  }
170
170
  };
171
171
 
@@ -179,9 +179,9 @@ var PPipe = class extends ServerBase {
179
179
  constructor(tag) {
180
180
  super();
181
181
  this.key = tag || _phecdacore.getTag.call(void 0, this);
182
- _chunkRZ7IXJYQjs.addPipe.call(void 0, this.key, this.use.bind(this));
182
+ _chunkTZYATAJXjs.addPipe.call(void 0, this.key, this.use.bind(this));
183
183
  this.onUnmount(() => {
184
- delete _chunkRZ7IXJYQjs.Context.pipeRecord[this.key];
184
+ delete _chunkTZYATAJXjs.Context.pipeRecord[this.key];
185
185
  });
186
186
  }
187
187
  };
@@ -196,9 +196,9 @@ var PPlugin = class extends ServerBase {
196
196
  constructor(tag) {
197
197
  super();
198
198
  this.key = tag || _phecdacore.getTag.call(void 0, this);
199
- _chunkRZ7IXJYQjs.addPlugin.call(void 0, this.key, this.use.bind(this));
199
+ _chunkTZYATAJXjs.addPlugin.call(void 0, this.key, this.use.bind(this));
200
200
  this.onUnmount(() => {
201
- delete _chunkRZ7IXJYQjs.Context.pluginRecord[this.key];
201
+ delete _chunkTZYATAJXjs.Context.pluginRecord[this.key];
202
202
  });
203
203
  }
204
204
  };
@@ -214,33 +214,33 @@ var PExtension = class extends ServerBase {
214
214
  super();
215
215
  const key = this.key = tag || _phecdacore.getTag.call(void 0, this);
216
216
  if (this.pipe) {
217
- _chunkRZ7IXJYQjs.addPipe.call(void 0, key, this.pipe.bind(this));
217
+ _chunkTZYATAJXjs.addPipe.call(void 0, key, this.pipe.bind(this));
218
218
  this.onUnmount(() => {
219
- delete _chunkRZ7IXJYQjs.Context.pipeRecord[key];
219
+ delete _chunkTZYATAJXjs.Context.pipeRecord[key];
220
220
  });
221
221
  }
222
222
  if (this.plugin) {
223
- _chunkRZ7IXJYQjs.addPlugin.call(void 0, key, this.plugin.bind(this));
223
+ _chunkTZYATAJXjs.addPlugin.call(void 0, key, this.plugin.bind(this));
224
224
  this.onUnmount(() => {
225
- delete _chunkRZ7IXJYQjs.Context.pluginRecord[key];
225
+ delete _chunkTZYATAJXjs.Context.pluginRecord[key];
226
226
  });
227
227
  }
228
228
  if (this.intercept) {
229
- _chunkRZ7IXJYQjs.addInterceptor.call(void 0, key, this.intercept.bind(this));
229
+ _chunkTZYATAJXjs.addInterceptor.call(void 0, key, this.intercept.bind(this));
230
230
  this.onUnmount(() => {
231
- delete _chunkRZ7IXJYQjs.Context.interceptorRecord[key];
231
+ delete _chunkTZYATAJXjs.Context.interceptorRecord[key];
232
232
  });
233
233
  }
234
234
  if (this.guard) {
235
- _chunkRZ7IXJYQjs.addGuard.call(void 0, key, this.guard.bind(this));
235
+ _chunkTZYATAJXjs.addGuard.call(void 0, key, this.guard.bind(this));
236
236
  this.onUnmount(() => {
237
- delete _chunkRZ7IXJYQjs.Context.guardRecord[key];
237
+ delete _chunkTZYATAJXjs.Context.guardRecord[key];
238
238
  });
239
239
  }
240
240
  if (this.filter) {
241
- _chunkRZ7IXJYQjs.addFilter.call(void 0, key, this.filter.bind(this));
241
+ _chunkTZYATAJXjs.addFilter.call(void 0, key, this.filter.bind(this));
242
242
  this.onUnmount(() => {
243
- delete _chunkRZ7IXJYQjs.Context.filterRecord[key];
243
+ delete _chunkTZYATAJXjs.Context.filterRecord[key];
244
244
  });
245
245
  }
246
246
  }
@@ -418,4 +418,4 @@ return ret
418
418
 
419
419
 
420
420
 
421
- exports.Arg = _chunk2HVTWYS2js.Arg; exports.BadGatewayException = _chunkRZ7IXJYQjs.BadGatewayException; exports.BadRequestException = _chunkRZ7IXJYQjs.BadRequestException; exports.BaseParam = _chunk2HVTWYS2js.BaseParam; exports.Body = _chunk2HVTWYS2js.Body; exports.ConflictException = _chunkRZ7IXJYQjs.ConflictException; exports.Context = _chunkRZ7IXJYQjs.Context; exports.Controller = _chunk2HVTWYS2js.Controller; exports.Ctx = _chunk2HVTWYS2js.Ctx; exports.CustomResponse = CustomResponse; exports.Define = _chunk2HVTWYS2js.Define; exports.Delete = _chunk2HVTWYS2js.Delete; exports.ERROR_SYMBOL = _chunkGHFSIZUOjs.ERROR_SYMBOL; exports.Event = _chunk2HVTWYS2js.Event; exports.Exception = _chunkRZ7IXJYQjs.Exception; exports.Factory = _chunkUIKQNJN3js.Factory; exports.Filter = _chunk2HVTWYS2js.Filter; exports.ForbiddenException = _chunkRZ7IXJYQjs.ForbiddenException; exports.FrameworkException = _chunkRZ7IXJYQjs.FrameworkException; exports.Generator = Generator; exports.Get = _chunk2HVTWYS2js.Get; exports.Guard = _chunk2HVTWYS2js.Guard; exports.HTTPGenerator = HTTPGenerator; exports.Head = _chunk2HVTWYS2js.Head; exports.Header = _chunk2HVTWYS2js.Header; exports.HttpBase = HttpBase; exports.IS_HMR = _chunkGHFSIZUOjs.IS_HMR; exports.IS_ONLY_GENERATE = _chunkGHFSIZUOjs.IS_ONLY_GENERATE; exports.IS_STRICT = _chunkGHFSIZUOjs.IS_STRICT; exports.Interceptor = _chunk2HVTWYS2js.Interceptor; exports.InvalidInputException = _chunkRZ7IXJYQjs.InvalidInputException; exports.LOG_LEVEL = _chunkGHFSIZUOjs.LOG_LEVEL; exports.Meta = _chunkUIKQNJN3js.Meta; exports.Mixin = _chunkGHFSIZUOjs.Mixin; exports.NotFoundException = _chunkRZ7IXJYQjs.NotFoundException; exports.PExtension = PExtension; exports.PFilter = PFilter; exports.PGuard = PGuard; exports.PInterceptor = PInterceptor; exports.PPipe = PPipe; exports.PPlugin = PPlugin; exports.PS_EXIT_CODE = _chunkGHFSIZUOjs.PS_EXIT_CODE; exports.Param = _chunk2HVTWYS2js.Param; exports.Patch = _chunk2HVTWYS2js.Patch; exports.PayloadLargeException = _chunkRZ7IXJYQjs.PayloadLargeException; exports.Pipe = _chunk2HVTWYS2js.Pipe; exports.Plugin = _chunk2HVTWYS2js.Plugin; exports.Post = _chunk2HVTWYS2js.Post; exports.Put = _chunk2HVTWYS2js.Put; exports.Query = _chunk2HVTWYS2js.Query; exports.Queue = _chunk2HVTWYS2js.Queue; exports.RPCGenerator = RPCGenerator; exports.Route = _chunk2HVTWYS2js.Route; exports.Rpc = _chunk2HVTWYS2js.Rpc; exports.RpcBase = RpcBase; exports.ServerBase = ServerBase; exports.ServiceUnavailableException = _chunkRZ7IXJYQjs.ServiceUnavailableException; exports.TimeoutException = _chunkRZ7IXJYQjs.TimeoutException; exports.TimerException = _chunkRZ7IXJYQjs.TimerException; exports.UnauthorizedException = _chunkRZ7IXJYQjs.UnauthorizedException; exports.UndefinedException = _chunkRZ7IXJYQjs.UndefinedException; exports.UnsupportedMediaTypeException = _chunkRZ7IXJYQjs.UnsupportedMediaTypeException; exports.ValidateException = _chunkRZ7IXJYQjs.ValidateException; exports.WorkerException = _chunkRZ7IXJYQjs.WorkerException; exports.addFilter = _chunkRZ7IXJYQjs.addFilter; exports.addGuard = _chunkRZ7IXJYQjs.addGuard; exports.addInterceptor = _chunkRZ7IXJYQjs.addInterceptor; exports.addPipe = _chunkRZ7IXJYQjs.addPipe; exports.addPlugin = _chunkRZ7IXJYQjs.addPlugin; exports.createPhecda = _chunkUIKQNJN3js.createPhecda; exports.defaultPipe = _chunkRZ7IXJYQjs.defaultPipe; exports.emitter = _chunkUIKQNJN3js.emitter; exports.log = _chunkGHFSIZUOjs.log; exports.setLogger = _chunkGHFSIZUOjs.setLogger;
421
+ exports.Arg = _chunkPALEEADEjs.Arg; exports.BadGatewayException = _chunkTZYATAJXjs.BadGatewayException; exports.BadRequestException = _chunkTZYATAJXjs.BadRequestException; exports.BaseParam = _chunkPALEEADEjs.BaseParam; exports.Body = _chunkPALEEADEjs.Body; exports.ConflictException = _chunkTZYATAJXjs.ConflictException; exports.Context = _chunkTZYATAJXjs.Context; exports.Controller = _chunkPALEEADEjs.Controller; exports.Ctx = _chunkPALEEADEjs.Ctx; exports.CustomResponse = CustomResponse; exports.Define = _chunkPALEEADEjs.Define; exports.Delete = _chunkPALEEADEjs.Delete; exports.ERROR_SYMBOL = _chunkGHFSIZUOjs.ERROR_SYMBOL; exports.Exception = _chunkTZYATAJXjs.Exception; exports.Factory = _chunkLYEZ6RGXjs.Factory; exports.Filter = _chunkPALEEADEjs.Filter; exports.ForbiddenException = _chunkTZYATAJXjs.ForbiddenException; exports.FrameworkException = _chunkTZYATAJXjs.FrameworkException; exports.Generator = Generator; exports.Get = _chunkPALEEADEjs.Get; exports.Guard = _chunkPALEEADEjs.Guard; exports.HTTPGenerator = HTTPGenerator; exports.Head = _chunkPALEEADEjs.Head; exports.Header = _chunkPALEEADEjs.Header; exports.HttpBase = HttpBase; exports.IS_HMR = _chunkGHFSIZUOjs.IS_HMR; exports.IS_ONLY_GENERATE = _chunkGHFSIZUOjs.IS_ONLY_GENERATE; exports.IS_STRICT = _chunkGHFSIZUOjs.IS_STRICT; exports.Interceptor = _chunkPALEEADEjs.Interceptor; exports.InvalidInputException = _chunkTZYATAJXjs.InvalidInputException; exports.LOG_LEVEL = _chunkGHFSIZUOjs.LOG_LEVEL; exports.Meta = _chunkLYEZ6RGXjs.Meta; exports.Mixin = _chunkGHFSIZUOjs.Mixin; exports.NotFoundException = _chunkTZYATAJXjs.NotFoundException; exports.PExtension = PExtension; exports.PFilter = PFilter; exports.PGuard = PGuard; exports.PInterceptor = PInterceptor; exports.PPipe = PPipe; exports.PPlugin = PPlugin; exports.PS_EXIT_CODE = _chunkGHFSIZUOjs.PS_EXIT_CODE; exports.Param = _chunkPALEEADEjs.Param; exports.Patch = _chunkPALEEADEjs.Patch; exports.PayloadLargeException = _chunkTZYATAJXjs.PayloadLargeException; exports.Pipe = _chunkPALEEADEjs.Pipe; exports.Plugin = _chunkPALEEADEjs.Plugin; exports.Post = _chunkPALEEADEjs.Post; exports.Put = _chunkPALEEADEjs.Put; exports.Query = _chunkPALEEADEjs.Query; exports.Queue = _chunkPALEEADEjs.Queue; exports.RPCGenerator = RPCGenerator; exports.Route = _chunkPALEEADEjs.Route; exports.Rpc = _chunkPALEEADEjs.Rpc; exports.RpcBase = RpcBase; exports.ServerBase = ServerBase; exports.ServiceUnavailableException = _chunkTZYATAJXjs.ServiceUnavailableException; exports.TimeoutException = _chunkTZYATAJXjs.TimeoutException; exports.TimerException = _chunkTZYATAJXjs.TimerException; exports.UnauthorizedException = _chunkTZYATAJXjs.UnauthorizedException; exports.UndefinedException = _chunkTZYATAJXjs.UndefinedException; exports.UnsupportedMediaTypeException = _chunkTZYATAJXjs.UnsupportedMediaTypeException; exports.ValidateException = _chunkTZYATAJXjs.ValidateException; exports.WorkerException = _chunkTZYATAJXjs.WorkerException; exports.addFilter = _chunkTZYATAJXjs.addFilter; exports.addGuard = _chunkTZYATAJXjs.addGuard; exports.addInterceptor = _chunkTZYATAJXjs.addInterceptor; exports.addPipe = _chunkTZYATAJXjs.addPipe; exports.addPlugin = _chunkTZYATAJXjs.addPlugin; exports.createPhecda = _chunkLYEZ6RGXjs.createPhecda; exports.defaultPipe = _chunkTZYATAJXjs.defaultPipe; exports.emitter = _chunkLYEZ6RGXjs.emitter; exports.isObject = _chunkLYEZ6RGXjs.isObject; exports.log = _chunkGHFSIZUOjs.log; exports.setLogger = _chunkGHFSIZUOjs.setLogger;
package/dist/index.mjs CHANGED
@@ -2,8 +2,9 @@ import {
2
2
  Factory,
3
3
  Meta,
4
4
  createPhecda,
5
- emitter
6
- } from "./chunk-NT6HEBC6.mjs";
5
+ emitter,
6
+ isObject
7
+ } from "./chunk-HDQAT2IM.mjs";
7
8
  import {
8
9
  Arg,
9
10
  BaseParam,
@@ -12,7 +13,6 @@ import {
12
13
  Ctx,
13
14
  Define,
14
15
  Delete,
15
- Event,
16
16
  Filter,
17
17
  Get,
18
18
  Guard,
@@ -29,7 +29,7 @@ import {
29
29
  Queue,
30
30
  Route,
31
31
  Rpc
32
- } from "./chunk-SXOZVIKW.mjs";
32
+ } from "./chunk-2UTKBEZE.mjs";
33
33
  import {
34
34
  BadGatewayException,
35
35
  BadRequestException,
@@ -55,7 +55,7 @@ import {
55
55
  addPipe,
56
56
  addPlugin,
57
57
  defaultPipe
58
- } from "./chunk-3IPYLGY2.mjs";
58
+ } from "./chunk-YUXERDQ6.mjs";
59
59
  import {
60
60
  ERROR_SYMBOL,
61
61
  IS_HMR,
@@ -357,7 +357,6 @@ export {
357
357
  Define,
358
358
  Delete,
359
359
  ERROR_SYMBOL,
360
- Event,
361
360
  Exception,
362
361
  Factory,
363
362
  Filter,
@@ -416,6 +415,7 @@ export {
416
415
  createPhecda,
417
416
  defaultPipe,
418
417
  emitter,
418
+ isObject,
419
419
  log,
420
420
  setLogger
421
421
  };
@@ -1,5 +1,5 @@
1
1
  import { WorkerOptions, QueueOptions, Worker, Queue } from 'bullmq';
2
- import { F as Factory } from '../../core-Bc2ENEHX.mjs';
2
+ import { F as Factory } from '../../core-D2oL8Ge0.mjs';
3
3
  import { R as RpcContext, a as RpcServerOptions, b as RpcClientOptions } from '../../types-AgVwUXPC.mjs';
4
4
  import { T as ToClientMap } from '../../types-BlIBlnVT.mjs';
5
5
  import 'phecda-core';
@@ -1,5 +1,5 @@
1
1
  import { WorkerOptions, QueueOptions, Worker, Queue } from 'bullmq';
2
- import { F as Factory } from '../../core-dx9E5x2N.js';
2
+ import { F as Factory } from '../../core-Blq8frmr.js';
3
3
  import { R as RpcContext, a as RpcServerOptions, b as RpcClientOptions } from '../../types-B-ZFZajI.js';
4
4
  import { T as ToClientMap } from '../../types-BlIBlnVT.js';
5
5
  import 'phecda-core';
@@ -4,7 +4,7 @@
4
4
 
5
5
 
6
6
 
7
- var _chunkRZ7IXJYQjs = require('../../chunk-RZ7IXJYQ.js');
7
+ var _chunkTZYATAJXjs = require('../../chunk-TZYATAJX.js');
8
8
 
9
9
 
10
10
  var _chunkGHFSIZUOjs = require('../../chunk-GHFSIZUO.js');
@@ -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 = _chunkRZ7IXJYQjs.createControllerMetaMap.call(void 0, meta, (meta2) => {
21
+ const metaMap = _chunkTZYATAJXjs.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
- _chunkRZ7IXJYQjs.detectAopDep.call(void 0, meta, {
28
+ _chunkTZYATAJXjs.detectAopDep.call(void 0, meta, {
29
29
  guards: globalGuards,
30
30
  interceptors: globalInterceptors
31
31
  }, "rpc");
@@ -53,7 +53,7 @@ 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 context = new (0, _chunkRZ7IXJYQjs.Context)({
56
+ const context = new (0, _chunkTZYATAJXjs.Context)({
57
57
  type: "bullmq",
58
58
  moduleMap,
59
59
  meta: meta2,
@@ -87,7 +87,7 @@ async function create({ moduleMap, meta }, opts = {}) {
87
87
  }
88
88
  _chunkGHFSIZUOjs.__name.call(void 0, handleRequest, "handleRequest");
89
89
  subscribeQueues();
90
- _chunkRZ7IXJYQjs.HMR.call(void 0, async () => {
90
+ _chunkTZYATAJXjs.HMR.call(void 0, async () => {
91
91
  for (const i in workerMap) await workerMap[i].close(true);
92
92
  for (const i in queueMap) await queueMap[i].close();
93
93
  await subscribeQueues();
@@ -108,7 +108,7 @@ async function createClient(controllers, opts = {}) {
108
108
  const { max, workerOpts, queueOpts, timeout, key } = opts;
109
109
  const ret = {};
110
110
  const emitter = new (0, _events.EventEmitter)();
111
- const clientQueue = _chunkRZ7IXJYQjs.genClientQueue.call(void 0, key);
111
+ const clientQueue = _chunkTZYATAJXjs.genClientQueue.call(void 0, key);
112
112
  const queueMap = {};
113
113
  new (0, _bullmq.Worker)(clientQueue, async (job) => {
114
114
  const { data, id, error } = job.data;
@@ -4,7 +4,7 @@ import {
4
4
  createControllerMetaMap,
5
5
  detectAopDep,
6
6
  genClientQueue
7
- } from "../../chunk-3IPYLGY2.mjs";
7
+ } from "../../chunk-YUXERDQ6.mjs";
8
8
  import {
9
9
  __name
10
10
  } from "../../chunk-UXD62LGG.mjs";
@@ -1,5 +1,5 @@
1
1
  import { Consumer, Producer } from 'kafkajs';
2
- import { F as Factory } from '../../core-Bc2ENEHX.mjs';
2
+ import { F as Factory } from '../../core-D2oL8Ge0.mjs';
3
3
  import { R as RpcContext, a as RpcServerOptions, b as RpcClientOptions } from '../../types-AgVwUXPC.mjs';
4
4
  import { T as ToClientMap } from '../../types-BlIBlnVT.mjs';
5
5
  import 'phecda-core';
@@ -1,5 +1,5 @@
1
1
  import { Consumer, Producer } from 'kafkajs';
2
- import { F as Factory } from '../../core-dx9E5x2N.js';
2
+ import { F as Factory } from '../../core-Blq8frmr.js';
3
3
  import { R as RpcContext, a as RpcServerOptions, b as RpcClientOptions } from '../../types-B-ZFZajI.js';
4
4
  import { T as ToClientMap } from '../../types-BlIBlnVT.js';
5
5
  import 'phecda-core';
@@ -3,7 +3,7 @@
3
3
 
4
4
 
5
5
 
6
- var _chunkRZ7IXJYQjs = require('../../chunk-RZ7IXJYQ.js');
6
+ var _chunkTZYATAJXjs = require('../../chunk-TZYATAJX.js');
7
7
 
8
8
 
9
9
  var _chunkGHFSIZUOjs = require('../../chunk-GHFSIZUO.js');
@@ -14,14 +14,14 @@ var debug = _debug2.default.call(void 0, "phecda-server/kafka");
14
14
  async function bind({ consumer, producer }, { moduleMap, meta }, opts = {}) {
15
15
  const { globalGuards, globalInterceptors, globalFilter, globalPipe } = opts;
16
16
  const existQueue = /* @__PURE__ */ new Set();
17
- const metaMap = _chunkRZ7IXJYQjs.createControllerMetaMap.call(void 0, meta, (meta2) => {
17
+ const metaMap = _chunkTZYATAJXjs.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
- _chunkRZ7IXJYQjs.detectAopDep.call(void 0, meta, {
24
+ _chunkTZYATAJXjs.detectAopDep.call(void 0, meta, {
25
25
  guards: globalGuards,
26
26
  interceptors: globalInterceptors
27
27
  }, "rpc");
@@ -55,7 +55,7 @@ async function bind({ consumer, producer }, { moduleMap, meta }, opts = {}) {
55
55
  const meta2 = metaMap.get(tag)[func];
56
56
  const { data: { rpc } } = meta2;
57
57
  const isEvent = rpc.isEvent;
58
- const context = new (0, _chunkRZ7IXJYQjs.Context)({
58
+ const context = new (0, _chunkTZYATAJXjs.Context)({
59
59
  type: "kafka",
60
60
  moduleMap,
61
61
  meta: meta2,
@@ -117,7 +117,7 @@ async function createClient({ producer, consumer }, controllers, opts) {
117
117
  let eventCount = 1;
118
118
  const ret = {};
119
119
  const emitter = new (0, _events.EventEmitter)();
120
- const clientQueue = _chunkRZ7IXJYQjs.genClientQueue.call(void 0, _optionalChain([opts, 'optionalAccess', _2 => _2.key]));
120
+ const clientQueue = _chunkTZYATAJXjs.genClientQueue.call(void 0, _optionalChain([opts, 'optionalAccess', _2 => _2.key]));
121
121
  await consumer.subscribe({
122
122
  topic: clientQueue,
123
123
  fromBeginning: true
@@ -3,7 +3,7 @@ import {
3
3
  createControllerMetaMap,
4
4
  detectAopDep,
5
5
  genClientQueue
6
- } from "../../chunk-3IPYLGY2.mjs";
6
+ } from "../../chunk-YUXERDQ6.mjs";
7
7
  import {
8
8
  __name
9
9
  } from "../../chunk-UXD62LGG.mjs";
@@ -1,5 +1,5 @@
1
1
  import { NatsConnection } from 'nats';
2
- import { F as Factory } from '../../core-Bc2ENEHX.mjs';
2
+ import { F as Factory } from '../../core-D2oL8Ge0.mjs';
3
3
  import { R as RpcContext, a as RpcServerOptions, b as RpcClientOptions } from '../../types-AgVwUXPC.mjs';
4
4
  import { T as ToClientMap } from '../../types-BlIBlnVT.mjs';
5
5
  import 'phecda-core';
@@ -1,5 +1,5 @@
1
1
  import { NatsConnection } from 'nats';
2
- import { F as Factory } from '../../core-dx9E5x2N.js';
2
+ import { F as Factory } from '../../core-Blq8frmr.js';
3
3
  import { R as RpcContext, a as RpcServerOptions, b as RpcClientOptions } from '../../types-B-ZFZajI.js';
4
4
  import { T as ToClientMap } from '../../types-BlIBlnVT.js';
5
5
  import 'phecda-core';
@@ -3,7 +3,7 @@
3
3
 
4
4
 
5
5
 
6
- var _chunkRZ7IXJYQjs = require('../../chunk-RZ7IXJYQ.js');
6
+ var _chunkTZYATAJXjs = require('../../chunk-TZYATAJX.js');
7
7
 
8
8
 
9
9
  var _chunkGHFSIZUOjs = require('../../chunk-GHFSIZUO.js');
@@ -17,14 +17,14 @@ async function bind(nc, { moduleMap, meta }, opts = {}) {
17
17
  const sc = _nats.StringCodec.call(void 0, );
18
18
  const subscriptionMap = {};
19
19
  const existQueue = /* @__PURE__ */ new Set();
20
- const metaMap = _chunkRZ7IXJYQjs.createControllerMetaMap.call(void 0, meta, (meta2) => {
20
+ const metaMap = _chunkTZYATAJXjs.createControllerMetaMap.call(void 0, meta, (meta2) => {
21
21
  const { controller, rpc, func, tag } = meta2.data;
22
22
  if (controller === "rpc" && _optionalChain([rpc, 'optionalAccess', _2 => _2.queue]) !== void 0) {
23
23
  debug(`register method "${func}" in module "${tag}"`);
24
24
  return true;
25
25
  }
26
26
  });
27
- _chunkRZ7IXJYQjs.detectAopDep.call(void 0, meta, {
27
+ _chunkTZYATAJXjs.detectAopDep.call(void 0, meta, {
28
28
  guards: globalGuards,
29
29
  interceptors: globalInterceptors
30
30
  }, "rpc");
@@ -55,7 +55,7 @@ async function bind(nc, { moduleMap, meta }, opts = {}) {
55
55
  const meta2 = metaMap.get(tag)[func];
56
56
  const { data: { rpc: { isEvent } = {} } } = meta2;
57
57
  if (isEvent) msg.respond("{}");
58
- const context = new (0, _chunkRZ7IXJYQjs.Context)({
58
+ const context = new (0, _chunkTZYATAJXjs.Context)({
59
59
  type: "nats",
60
60
  moduleMap,
61
61
  meta: meta2,
@@ -88,7 +88,7 @@ async function bind(nc, { moduleMap, meta }, opts = {}) {
88
88
  }
89
89
  _chunkGHFSIZUOjs.__name.call(void 0, handleRequest, "handleRequest");
90
90
  subscribeQueues();
91
- _chunkRZ7IXJYQjs.HMR.call(void 0, async () => {
91
+ _chunkTZYATAJXjs.HMR.call(void 0, async () => {
92
92
  for (const i in subscriptionMap) subscriptionMap[i].unsubscribe();
93
93
  await subscribeQueues();
94
94
  });
@@ -3,7 +3,7 @@ import {
3
3
  HMR,
4
4
  createControllerMetaMap,
5
5
  detectAopDep
6
- } from "../../chunk-3IPYLGY2.mjs";
6
+ } from "../../chunk-YUXERDQ6.mjs";
7
7
  import {
8
8
  __name
9
9
  } from "../../chunk-UXD62LGG.mjs";
@@ -1,5 +1,5 @@
1
1
  import amqplib from 'amqplib';
2
- import { F as Factory } from '../../core-Bc2ENEHX.mjs';
2
+ import { F as Factory } from '../../core-D2oL8Ge0.mjs';
3
3
  import { R as RpcContext, a as RpcServerOptions, b as RpcClientOptions } from '../../types-AgVwUXPC.mjs';
4
4
  import { T as ToClientMap } from '../../types-BlIBlnVT.mjs';
5
5
  import 'phecda-core';
@@ -1,5 +1,5 @@
1
1
  import amqplib from 'amqplib';
2
- import { F as Factory } from '../../core-dx9E5x2N.js';
2
+ import { F as Factory } from '../../core-Blq8frmr.js';
3
3
  import { R as RpcContext, a as RpcServerOptions, b as RpcClientOptions } from '../../types-B-ZFZajI.js';
4
4
  import { T as ToClientMap } from '../../types-BlIBlnVT.js';
5
5
  import 'phecda-core';
@@ -4,7 +4,7 @@
4
4
 
5
5
 
6
6
 
7
- var _chunkRZ7IXJYQjs = require('../../chunk-RZ7IXJYQ.js');
7
+ var _chunkTZYATAJXjs = require('../../chunk-TZYATAJX.js');
8
8
 
9
9
 
10
10
  var _chunkGHFSIZUOjs = require('../../chunk-GHFSIZUO.js');
@@ -14,14 +14,14 @@ var _debug = require('debug'); var _debug2 = _interopRequireDefault(_debug);
14
14
  var debug = _debug2.default.call(void 0, "phecda-server/rabbitmq");
15
15
  async function bind(ch, { moduleMap, meta }, opts = {}) {
16
16
  const { globalGuards, globalInterceptors, globalFilter, globalPipe } = opts;
17
- const metaMap = _chunkRZ7IXJYQjs.createControllerMetaMap.call(void 0, meta, (meta2) => {
17
+ const metaMap = _chunkTZYATAJXjs.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
- _chunkRZ7IXJYQjs.detectAopDep.call(void 0, meta, {
24
+ _chunkTZYATAJXjs.detectAopDep.call(void 0, meta, {
25
25
  guards: globalGuards,
26
26
  interceptors: globalInterceptors
27
27
  }, "rpc");
@@ -57,7 +57,7 @@ async function bind(ch, { moduleMap, meta }, opts = {}) {
57
57
  debug(`invoke method "${func}" in module "${tag}"`);
58
58
  const meta2 = metaMap.get(tag)[func];
59
59
  const { data: { rpc: { isEvent } = {} } } = meta2;
60
- const context = new (0, _chunkRZ7IXJYQjs.Context)({
60
+ const context = new (0, _chunkTZYATAJXjs.Context)({
61
61
  type: "rabbitmq",
62
62
  moduleMap,
63
63
  meta: meta2,
@@ -91,7 +91,7 @@ async function bind(ch, { moduleMap, meta }, opts = {}) {
91
91
  }
92
92
  _chunkGHFSIZUOjs.__name.call(void 0, handleRequest, "handleRequest");
93
93
  subscribeQueues();
94
- _chunkRZ7IXJYQjs.HMR.call(void 0, async () => {
94
+ _chunkTZYATAJXjs.HMR.call(void 0, async () => {
95
95
  for (const queue of existQueue) await ch.deleteQueue(queue);
96
96
  await subscribeQueues();
97
97
  });
@@ -105,7 +105,7 @@ async function createClient(ch, controllers, opts) {
105
105
  let eventCount = 0;
106
106
  const ret = {};
107
107
  const emitter = new (0, _events.EventEmitter)();
108
- const clientQueue = _chunkRZ7IXJYQjs.genClientQueue.call(void 0, _optionalChain([opts, 'optionalAccess', _2 => _2.key]));
108
+ const clientQueue = _chunkTZYATAJXjs.genClientQueue.call(void 0, _optionalChain([opts, 'optionalAccess', _2 => _2.key]));
109
109
  await ch.assertQueue(clientQueue);
110
110
  ch.consume(clientQueue, (msg) => {
111
111
  if (!msg) return;
@@ -4,7 +4,7 @@ import {
4
4
  createControllerMetaMap,
5
5
  detectAopDep,
6
6
  genClientQueue
7
- } from "../../chunk-3IPYLGY2.mjs";
7
+ } from "../../chunk-YUXERDQ6.mjs";
8
8
  import {
9
9
  __name
10
10
  } from "../../chunk-UXD62LGG.mjs";
@@ -1,5 +1,5 @@
1
1
  import Redis from 'ioredis';
2
- import { F as Factory } from '../../core-Bc2ENEHX.mjs';
2
+ import { F as Factory } from '../../core-D2oL8Ge0.mjs';
3
3
  import { R as RpcContext, a as RpcServerOptions, b as RpcClientOptions } from '../../types-AgVwUXPC.mjs';
4
4
  import { T as ToClientMap } from '../../types-BlIBlnVT.mjs';
5
5
  import 'phecda-core';
@@ -1,5 +1,5 @@
1
1
  import Redis from 'ioredis';
2
- import { F as Factory } from '../../core-dx9E5x2N.js';
2
+ import { F as Factory } from '../../core-Blq8frmr.js';
3
3
  import { R as RpcContext, a as RpcServerOptions, b as RpcClientOptions } from '../../types-B-ZFZajI.js';
4
4
  import { T as ToClientMap } from '../../types-BlIBlnVT.js';
5
5
  import 'phecda-core';
@@ -4,7 +4,7 @@
4
4
 
5
5
 
6
6
 
7
- var _chunkRZ7IXJYQjs = require('../../chunk-RZ7IXJYQ.js');
7
+ var _chunkTZYATAJXjs = require('../../chunk-TZYATAJX.js');
8
8
 
9
9
 
10
10
  var _chunkGHFSIZUOjs = require('../../chunk-GHFSIZUO.js');
@@ -14,14 +14,14 @@ var _debug = require('debug'); var _debug2 = _interopRequireDefault(_debug);
14
14
  var debug = _debug2.default.call(void 0, "phecda-server/redis");
15
15
  function bind({ sub, pub }, { moduleMap, meta }, opts = {}) {
16
16
  const { globalGuards, globalInterceptors, globalFilter, globalPipe } = opts;
17
- const metaMap = _chunkRZ7IXJYQjs.createControllerMetaMap.call(void 0, meta, (meta2) => {
17
+ const metaMap = _chunkTZYATAJXjs.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
- _chunkRZ7IXJYQjs.detectAopDep.call(void 0, meta, {
24
+ _chunkTZYATAJXjs.detectAopDep.call(void 0, meta, {
25
25
  guards: globalGuards,
26
26
  interceptors: globalInterceptors
27
27
  }, "rpc");
@@ -51,7 +51,7 @@ function bind({ sub, pub }, { moduleMap, meta }, opts = {}) {
51
51
  if (_ps !== 1) return;
52
52
  const meta2 = metaMap.get(tag)[func];
53
53
  const { data: { rpc: { isEvent } = {} } } = meta2;
54
- const context = new (0, _chunkRZ7IXJYQjs.Context)({
54
+ const context = new (0, _chunkTZYATAJXjs.Context)({
55
55
  type: "redis",
56
56
  moduleMap,
57
57
  redis: sub,
@@ -87,7 +87,7 @@ function bind({ sub, pub }, { moduleMap, meta }, opts = {}) {
87
87
  }
88
88
  });
89
89
  subscribeQueues();
90
- _chunkRZ7IXJYQjs.HMR.call(void 0, async () => {
90
+ _chunkTZYATAJXjs.HMR.call(void 0, async () => {
91
91
  for (const queue of existQueue) await sub.unsubscribe(queue);
92
92
  subscribeQueues();
93
93
  });
@@ -101,7 +101,7 @@ async function createClient({ pub, sub }, controllers, opts) {
101
101
  let eventId = 1;
102
102
  let eventCount = 0;
103
103
  const emitter = new (0, _events2.default)();
104
- const clientQueue = _chunkRZ7IXJYQjs.genClientQueue.call(void 0, _optionalChain([opts, 'optionalAccess', _2 => _2.key]));
104
+ const clientQueue = _chunkTZYATAJXjs.genClientQueue.call(void 0, _optionalChain([opts, 'optionalAccess', _2 => _2.key]));
105
105
  await sub.subscribe(clientQueue);
106
106
  for (const i in controllers) {
107
107
  ret[i] = new Proxy(new controllers[i](), {
@@ -4,7 +4,7 @@ import {
4
4
  createControllerMetaMap,
5
5
  detectAopDep,
6
6
  genClientQueue
7
- } from "../../chunk-3IPYLGY2.mjs";
7
+ } from "../../chunk-YUXERDQ6.mjs";
8
8
  import {
9
9
  __name
10
10
  } from "../../chunk-UXD62LGG.mjs";
@@ -1,7 +1,7 @@
1
1
  import { Elysia as Elysia$1, Context, LocalHook, InputSchema, RouteSchema, SingletonBase } from 'elysia';
2
2
  import { BaseMacro } from 'elysia/dist/types';
3
3
  import { H as HttpContext, a as HttpOptions } from '../../types-Dgxirc9f.mjs';
4
- import { F as Factory } from '../../core-Bc2ENEHX.mjs';
4
+ import { F as Factory } from '../../core-D2oL8Ge0.mjs';
5
5
  import 'node:http';
6
6
  import '../../types-BlIBlnVT.mjs';
7
7
  import 'phecda-core';
@@ -1,7 +1,7 @@
1
1
  import { Elysia as Elysia$1, Context, LocalHook, InputSchema, RouteSchema, SingletonBase } from 'elysia';
2
2
  import { BaseMacro } from 'elysia/dist/types';
3
3
  import { H as HttpContext, a as HttpOptions } from '../../types-BCJhmpQh.js';
4
- import { F as Factory } from '../../core-dx9E5x2N.js';
4
+ import { F as Factory } from '../../core-Blq8frmr.js';
5
5
  import 'node:http';
6
6
  import '../../types-BlIBlnVT.js';
7
7
  import 'phecda-core';