phecda-server 5.2.5 → 5.2.6

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 (77) hide show
  1. package/dist/{chunk-JJJ7AUEF.mjs → chunk-5E2AVYP2.mjs} +2 -2
  2. package/dist/{chunk-6QLTBEXP.js → chunk-AUAAKHWS.js} +38 -38
  3. package/dist/{chunk-2O6X54P5.mjs → chunk-BZKJ5NBU.mjs} +1 -1
  4. package/dist/{chunk-MGADYFW4.mjs → chunk-LHLQIQPH.mjs} +27 -25
  5. package/dist/{chunk-2NTXVYQC.mjs → chunk-MESZCLSS.mjs} +0 -2
  6. package/dist/{chunk-MKZOLLJS.js → chunk-N4ULJDEQ.js} +43 -41
  7. package/dist/{chunk-6T4UZ4LV.js → chunk-QYX5Q7KO.js} +60 -60
  8. package/dist/{chunk-H2FWLKXN.js → chunk-RVWBJ6LV.js} +1 -3
  9. package/dist/{core-C3cON4Um.d.ts → core-Bc2ENEHX.d.mts} +7 -5
  10. package/dist/{core-BIm7dkko.d.mts → core-dx9E5x2N.d.ts} +7 -5
  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/index.d.mts +16 -18
  16. package/dist/index.d.ts +16 -18
  17. package/dist/index.js +50 -68
  18. package/dist/index.mjs +20 -38
  19. package/dist/rpc/bullmq/index.d.mts +3 -3
  20. package/dist/rpc/bullmq/index.d.ts +3 -3
  21. package/dist/rpc/bullmq/index.js +12 -12
  22. package/dist/rpc/bullmq/index.mjs +2 -2
  23. package/dist/rpc/kafka/index.d.mts +3 -3
  24. package/dist/rpc/kafka/index.d.ts +3 -3
  25. package/dist/rpc/kafka/index.js +12 -12
  26. package/dist/rpc/kafka/index.mjs +2 -2
  27. package/dist/rpc/nats/index.d.mts +3 -3
  28. package/dist/rpc/nats/index.d.ts +3 -3
  29. package/dist/rpc/nats/index.js +11 -11
  30. package/dist/rpc/nats/index.mjs +2 -2
  31. package/dist/rpc/rabbitmq/index.d.mts +3 -3
  32. package/dist/rpc/rabbitmq/index.d.ts +3 -3
  33. package/dist/rpc/rabbitmq/index.js +13 -13
  34. package/dist/rpc/rabbitmq/index.mjs +2 -2
  35. package/dist/rpc/redis/index.d.mts +3 -3
  36. package/dist/rpc/redis/index.d.ts +3 -3
  37. package/dist/rpc/redis/index.js +11 -11
  38. package/dist/rpc/redis/index.mjs +2 -2
  39. package/dist/server/elysia/index.d.mts +3 -3
  40. package/dist/server/elysia/index.d.ts +3 -3
  41. package/dist/server/elysia/index.js +20 -20
  42. package/dist/server/elysia/index.mjs +3 -3
  43. package/dist/server/express/index.d.mts +3 -3
  44. package/dist/server/express/index.d.ts +3 -3
  45. package/dist/server/express/index.js +18 -18
  46. package/dist/server/express/index.mjs +2 -2
  47. package/dist/server/fastify/index.d.mts +3 -3
  48. package/dist/server/fastify/index.d.ts +3 -3
  49. package/dist/server/fastify/index.js +19 -19
  50. package/dist/server/fastify/index.mjs +3 -3
  51. package/dist/server/h3/index.d.mts +3 -3
  52. package/dist/server/h3/index.d.ts +3 -3
  53. package/dist/server/h3/index.js +18 -18
  54. package/dist/server/h3/index.mjs +2 -2
  55. package/dist/server/hono/index.d.mts +3 -3
  56. package/dist/server/hono/index.d.ts +3 -3
  57. package/dist/server/hono/index.js +17 -17
  58. package/dist/server/hono/index.mjs +2 -2
  59. package/dist/server/hyper-express/index.d.mts +3 -3
  60. package/dist/server/hyper-express/index.d.ts +3 -3
  61. package/dist/server/hyper-express/index.js +17 -17
  62. package/dist/server/hyper-express/index.mjs +2 -2
  63. package/dist/server/koa/index.d.mts +3 -3
  64. package/dist/server/koa/index.d.ts +3 -3
  65. package/dist/server/koa/index.js +18 -18
  66. package/dist/server/koa/index.mjs +2 -2
  67. package/dist/test.d.mts +3 -3
  68. package/dist/test.d.ts +3 -3
  69. package/dist/test.js +14 -14
  70. package/dist/test.mjs +11 -11
  71. package/dist/{types-CdQey96H.d.ts → types-BlIBlnVT.d.mts} +1 -2
  72. package/dist/{types-CdQey96H.d.mts → types-BlIBlnVT.d.ts} +1 -2
  73. package/dist/{types-CIZbw8S2.d.ts → types-CJSkC9tO.d.ts} +1 -1
  74. package/dist/{types-ByP1fKMe.d.mts → types-Dp5ixUqW.d.mts} +1 -1
  75. package/dist/{types-C5sdDiDQ.d.ts → types-PY43OKEP.d.ts} +1 -1
  76. package/dist/{types-B-y2TwhC.d.mts → types-vF4Hvnvo.d.mts} +1 -1
  77. package/package.json +2 -2
package/dist/index.d.ts CHANGED
@@ -1,11 +1,11 @@
1
- import { B as BaseContext, D as DefaultOptions, C as ControllerMetaData, M as MetaData, U as UNMOUNT_SYMBOL, a as BaseError } from './types-CdQey96H.js';
2
- export { e as BaseRequestType, d as BaseReturn, i as ControllerMeta, f as CustomResponse, j as ERROR_SYMBOL, E as Emitter, g as ExtractResponse, I as IS_HMR, k as IS_ONLY_GENERATE, l as IS_STRICT, L as LOG_LEVEL, h as Meta, O as OmitFunction, m as PS_EXIT_CODE, P as PickFunc, S as ServiceMetaData, c as ToClientFn, b as ToClientInstance, T as ToClientMap } from './types-CdQey96H.js';
3
- import { G as Generator } from './core-C3cON4Um.js';
4
- export { F as Factory, e as emitter } from './core-C3cON4Um.js';
5
- import { Construct, AbConstruct } from 'phecda-core';
1
+ import { B as BaseContext, D as DefaultOptions, C as ControllerMetaData, M as MetaData, E as Emitter, a as BaseError } from './types-BlIBlnVT.js';
2
+ export { e as BaseRequestType, d as BaseReturn, i as ControllerMeta, f as CustomResponse, j as ERROR_SYMBOL, g as ExtractResponse, I as IS_HMR, k as IS_ONLY_GENERATE, l as IS_STRICT, L as LOG_LEVEL, h as Meta, O as OmitFunction, m as PS_EXIT_CODE, P as PickFunc, S as ServiceMetaData, c as ToClientFn, b as ToClientInstance, T as ToClientMap } from './types-BlIBlnVT.js';
3
+ import { G as Generator } from './core-dx9E5x2N.js';
4
+ export { F as Factory, O as Options, c as createPhecda, e as emitter } from './core-dx9E5x2N.js';
5
+ import { Base, Construct, AbConstruct } from 'phecda-core';
6
6
  export * from 'phecda-core';
7
- export { a as HttpContext, H as HttpOptions } from './types-C5sdDiDQ.js';
8
- export { a as RpcClientOptions, b as RpcContext, R as RpcServerOptions } from './types-CIZbw8S2.js';
7
+ export { a as HttpContext, H as HttpOptions } from './types-PY43OKEP.js';
8
+ export { a as RpcClientOptions, b as RpcContext, R as RpcServerOptions } from './types-CJSkC9tO.js';
9
9
  import 'node:http';
10
10
 
11
11
  declare class Exception extends Error {
@@ -175,32 +175,30 @@ declare function Define(key: string, value: any): any;
175
175
 
176
176
  declare const defaultPipe: PipeType;
177
177
 
178
- declare class Dev {
179
- private readonly [UNMOUNT_SYMBOL];
178
+ declare class ServerBase extends Base {
180
179
  protected context: BaseContext;
181
- protected onUnmount(cb: () => void): void;
182
- private unmount;
180
+ emitter: Emitter;
183
181
  }
184
182
 
185
- declare abstract class PFilter<C extends BaseContext = any, E extends Exception = Exception> extends Dev {
183
+ declare abstract class PFilter<C extends BaseContext = any, E extends Exception = Exception> extends ServerBase {
186
184
  readonly key: PropertyKey;
187
185
  constructor(tag?: string);
188
186
  abstract use(error: Error | E, ctx?: C): BaseError;
189
187
  }
190
188
 
191
- declare abstract class PGuard<C extends BaseContext = any> extends Dev {
189
+ declare abstract class PGuard<C extends BaseContext = any> extends ServerBase {
192
190
  abstract use(ctx: C): Promise<boolean> | boolean;
193
191
  readonly key: PropertyKey;
194
192
  constructor(tag?: string);
195
193
  }
196
194
 
197
- declare abstract class PInterceptor<C extends BaseContext = any> extends Dev {
195
+ declare abstract class PInterceptor<C extends BaseContext = any> extends ServerBase {
198
196
  abstract use(ctx: C): Function | Promise<Function> | any;
199
197
  readonly key: PropertyKey;
200
198
  constructor(tag?: string);
201
199
  }
202
200
 
203
- declare abstract class PPipe<C extends BaseContext = any> extends Dev {
201
+ declare abstract class PPipe<C extends BaseContext = any> extends ServerBase {
204
202
  readonly key: PropertyKey;
205
203
  constructor(tag?: string);
206
204
  abstract use(param: {
@@ -213,7 +211,7 @@ declare abstract class PPipe<C extends BaseContext = any> extends Dev {
213
211
  }, ctx: C): any;
214
212
  }
215
213
 
216
- declare abstract class PPlugin extends Dev {
214
+ declare abstract class PPlugin extends ServerBase {
217
215
  readonly key: PropertyKey;
218
216
  constructor(tag?: string);
219
217
  abstract use<Plugin = any>(framework: string): Plugin;
@@ -233,7 +231,7 @@ interface PExtension<C extends BaseContext = any, E extends Exception = Exceptio
233
231
  filter(error: Error | E, ctx?: C): BaseError;
234
232
  plugin<Plugin = any>(framework: string): Plugin;
235
233
  }
236
- declare class PExtension extends Dev {
234
+ declare class PExtension extends ServerBase {
237
235
  readonly key: PropertyKey;
238
236
  constructor(tag?: string);
239
237
  }
@@ -243,4 +241,4 @@ declare function setLogger(logger: Record<LogLevel, (msg: string) => void>): voi
243
241
  declare function log(msg: string, level?: LogLevel): void;
244
242
  declare function Mix<C1 extends Construct | AbConstruct, C2 extends Construct>(InternalClass: C1, ExtendClass: C2): new (...args: ConstructorParameters<C2>) => InstanceType<C1> & InstanceType<C2>;
245
243
 
246
- export { Arg, BadGatewayException, BadRequestException, BaseContext, BaseError, BaseParam, Body, ConflictException, Context, Controller, ControllerMetaData, Ctx, DefaultOptions, Define, Delete, Dev, Event, Exception, Filter, type FilterType, ForbiddenException, FrameworkException, Generator, Get, Guard, type GuardType, HTTPGenerator, Head, Header, Injectable, Interceptor, type InterceptorType, InvalidInputException, MetaData, Mix, NotFoundException, PExtension, PFilter, PGuard, PInterceptor, PPipe, PPlugin, Param, Patch, PayloadLargeException, Pipe, type PipeArg, type PipeType, Plugin, Post, Put, Query, Queue, RPCGenerator, Route, Rpc, ServiceUnavailableException, TimeoutException, TimerException, UNMOUNT_SYMBOL, UnauthorizedException, UndefinedException, UnsupportedMediaTypeException, ValidateException, WorkerException, addFilter, addGuard, addInterceptor, addPipe, addPlugin, defaultPipe, log, setLogger };
244
+ export { Arg, BadGatewayException, BadRequestException, BaseContext, BaseError, BaseParam, Body, ConflictException, Context, Controller, ControllerMetaData, Ctx, DefaultOptions, Define, Delete, Emitter, Event, Exception, Filter, type FilterType, ForbiddenException, FrameworkException, Generator, Get, Guard, type GuardType, HTTPGenerator, Head, Header, Injectable, Interceptor, type InterceptorType, InvalidInputException, MetaData, Mix, NotFoundException, PExtension, PFilter, PGuard, PInterceptor, PPipe, PPlugin, Param, Patch, PayloadLargeException, Pipe, type PipeArg, type PipeType, Plugin, Post, Put, Query, Queue, RPCGenerator, Route, Rpc, ServerBase, ServiceUnavailableException, TimeoutException, TimerException, UnauthorizedException, UndefinedException, UnsupportedMediaTypeException, ValidateException, WorkerException, addFilter, addGuard, addInterceptor, addPipe, addPlugin, defaultPipe, log, setLogger };
package/dist/index.js CHANGED
@@ -2,8 +2,8 @@
2
2
 
3
3
 
4
4
 
5
- var _chunkMKZOLLJSjs = require('./chunk-MKZOLLJS.js');
6
5
 
6
+ var _chunkN4ULJDEQjs = require('./chunk-N4ULJDEQ.js');
7
7
 
8
8
 
9
9
 
@@ -29,8 +29,8 @@ var _chunkMKZOLLJSjs = require('./chunk-MKZOLLJS.js');
29
29
 
30
30
 
31
31
 
32
- var _chunk6QLTBEXPjs = require('./chunk-6QLTBEXP.js');
33
32
 
33
+ var _chunkAUAAKHWSjs = require('./chunk-AUAAKHWS.js');
34
34
 
35
35
 
36
36
 
@@ -55,8 +55,8 @@ var _chunk6QLTBEXPjs = require('./chunk-6QLTBEXP.js');
55
55
 
56
56
 
57
57
 
58
- var _chunk6T4UZ4LVjs = require('./chunk-6T4UZ4LV.js');
59
58
 
59
+ var _chunkQYX5Q7KOjs = require('./chunk-QYX5Q7KO.js');
60
60
 
61
61
 
62
62
 
@@ -68,18 +68,18 @@ var _chunk6T4UZ4LVjs = require('./chunk-6T4UZ4LV.js');
68
68
 
69
69
 
70
70
 
71
- var _chunkH2FWLKXNjs = require('./chunk-H2FWLKXN.js');
71
+ var _chunkRVWBJ6LVjs = require('./chunk-RVWBJ6LV.js');
72
72
 
73
73
  // src/types.ts
74
74
  var ResponseSymbol = Symbol("response");
75
75
  var CustomResponse = class {
76
76
  static {
77
- _chunkH2FWLKXNjs.__name.call(void 0, this, "CustomResponse");
77
+ _chunkRVWBJ6LVjs.__name.call(void 0, this, "CustomResponse");
78
78
  }
79
79
 
80
80
  };
81
81
 
82
- // src/modules/dev.ts
82
+ // src/modules/base.ts
83
83
  var _phecdacore = require('phecda-core'); _createStarExport(_phecdacore);
84
84
  function _ts_decorate(decorators, target, key, desc) {
85
85
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
@@ -87,159 +87,141 @@ function _ts_decorate(decorators, target, key, desc) {
87
87
  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;
88
88
  return c > 3 && r && Object.defineProperty(target, key, r), r;
89
89
  }
90
- _chunkH2FWLKXNjs.__name.call(void 0, _ts_decorate, "_ts_decorate");
91
- function _ts_metadata(k, v) {
92
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
93
- }
94
- _chunkH2FWLKXNjs.__name.call(void 0, _ts_metadata, "_ts_metadata");
95
- var Dev = (_class = class {constructor() { _class.prototype.__init.call(this); }
90
+ _chunkRVWBJ6LVjs.__name.call(void 0, _ts_decorate, "_ts_decorate");
91
+ var ServerBase = (_class = class extends _phecdacore.Base {constructor(...args2) { super(...args2); _class.prototype.__init.call(this); }
96
92
  static {
97
- _chunkH2FWLKXNjs.__name.call(void 0, this, "Dev");
93
+ _chunkRVWBJ6LVjs.__name.call(void 0, this, "ServerBase");
98
94
  }
99
- __init() {this[_chunkH2FWLKXNjs.UNMOUNT_SYMBOL] = []}
100
95
 
101
- // work for hmr
102
- // exec callback when module unmount
103
- onUnmount(cb) {
104
- this[_chunkH2FWLKXNjs.UNMOUNT_SYMBOL].push(cb);
105
- }
106
- async unmount() {
107
- for (const cb of this[_chunkH2FWLKXNjs.UNMOUNT_SYMBOL]) await cb();
108
- }
96
+ __init() {this.emitter = exports.emitter = _chunkN4ULJDEQjs.emitter}
109
97
  }, _class);
110
- _ts_decorate([
111
- _phecdacore.Unmount,
112
- _ts_metadata("design:type", Function),
113
- _ts_metadata("design:paramtypes", []),
114
- _ts_metadata("design:returntype", Promise)
115
- ], Dev.prototype, "unmount", null);
116
- Dev = exports.Dev = _ts_decorate([
98
+ ServerBase = exports.ServerBase = _ts_decorate([
117
99
  _phecdacore.Empty
118
- ], Dev);
100
+ ], ServerBase);
119
101
 
120
102
  // src/modules/filter.ts
121
103
 
122
- var PFilter = class extends Dev {
104
+ var PFilter = class extends ServerBase {
123
105
  static {
124
- _chunkH2FWLKXNjs.__name.call(void 0, this, "PFilter");
106
+ _chunkRVWBJ6LVjs.__name.call(void 0, this, "PFilter");
125
107
  }
126
108
 
127
109
  constructor(tag) {
128
110
  super();
129
111
  this.key = tag || _phecdacore.getTag.call(void 0, this);
130
- _chunk6T4UZ4LVjs.addFilter.call(void 0, this.key, this.use.bind(this));
112
+ _chunkQYX5Q7KOjs.addFilter.call(void 0, this.key, this.use.bind(this));
131
113
  this.onUnmount(() => {
132
- delete _chunk6T4UZ4LVjs.Context.filterRecord[this.key];
114
+ delete _chunkQYX5Q7KOjs.Context.filterRecord[this.key];
133
115
  });
134
116
  }
135
117
  };
136
118
 
137
119
  // src/modules/guard.ts
138
120
 
139
- var PGuard = class extends Dev {
121
+ var PGuard = class extends ServerBase {
140
122
  static {
141
- _chunkH2FWLKXNjs.__name.call(void 0, this, "PGuard");
123
+ _chunkRVWBJ6LVjs.__name.call(void 0, this, "PGuard");
142
124
  }
143
125
 
144
126
  constructor(tag) {
145
127
  super();
146
128
  this.key = tag || _phecdacore.getTag.call(void 0, this);
147
- _chunk6T4UZ4LVjs.addGuard.call(void 0, this.key, this.use.bind(this));
129
+ _chunkQYX5Q7KOjs.addGuard.call(void 0, this.key, this.use.bind(this));
148
130
  this.onUnmount(() => {
149
- delete _chunk6T4UZ4LVjs.Context.guardRecord[this.key];
131
+ delete _chunkQYX5Q7KOjs.Context.guardRecord[this.key];
150
132
  });
151
133
  }
152
134
  };
153
135
 
154
136
  // src/modules/interceptor.ts
155
137
 
156
- var PInterceptor = class extends Dev {
138
+ var PInterceptor = class extends ServerBase {
157
139
  static {
158
- _chunkH2FWLKXNjs.__name.call(void 0, this, "PInterceptor");
140
+ _chunkRVWBJ6LVjs.__name.call(void 0, this, "PInterceptor");
159
141
  }
160
142
 
161
143
  constructor(tag) {
162
144
  super();
163
145
  this.key = tag || _phecdacore.getTag.call(void 0, this);
164
146
  this.onUnmount(() => {
165
- delete _chunk6T4UZ4LVjs.Context.interceptorRecord[this.key];
147
+ delete _chunkQYX5Q7KOjs.Context.interceptorRecord[this.key];
166
148
  });
167
- _chunk6T4UZ4LVjs.addInterceptor.call(void 0, this.key, this.use.bind(this));
149
+ _chunkQYX5Q7KOjs.addInterceptor.call(void 0, this.key, this.use.bind(this));
168
150
  }
169
151
  };
170
152
 
171
153
  // src/modules/pipe.ts
172
154
 
173
- var PPipe = class extends Dev {
155
+ var PPipe = class extends ServerBase {
174
156
  static {
175
- _chunkH2FWLKXNjs.__name.call(void 0, this, "PPipe");
157
+ _chunkRVWBJ6LVjs.__name.call(void 0, this, "PPipe");
176
158
  }
177
159
 
178
160
  constructor(tag) {
179
161
  super();
180
162
  this.key = tag || _phecdacore.getTag.call(void 0, this);
181
- _chunk6T4UZ4LVjs.addPipe.call(void 0, this.key, this.use.bind(this));
163
+ _chunkQYX5Q7KOjs.addPipe.call(void 0, this.key, this.use.bind(this));
182
164
  this.onUnmount(() => {
183
- delete _chunk6T4UZ4LVjs.Context.pipeRecord[this.key];
165
+ delete _chunkQYX5Q7KOjs.Context.pipeRecord[this.key];
184
166
  });
185
167
  }
186
168
  };
187
169
 
188
170
  // src/modules/plugin.ts
189
171
 
190
- var PPlugin = class extends Dev {
172
+ var PPlugin = class extends ServerBase {
191
173
  static {
192
- _chunkH2FWLKXNjs.__name.call(void 0, this, "PPlugin");
174
+ _chunkRVWBJ6LVjs.__name.call(void 0, this, "PPlugin");
193
175
  }
194
176
 
195
177
  constructor(tag) {
196
178
  super();
197
179
  this.key = tag || _phecdacore.getTag.call(void 0, this);
198
- _chunk6T4UZ4LVjs.addPlugin.call(void 0, this.key, this.use.bind(this));
180
+ _chunkQYX5Q7KOjs.addPlugin.call(void 0, this.key, this.use.bind(this));
199
181
  this.onUnmount(() => {
200
- delete _chunk6T4UZ4LVjs.Context.pluginRecord[this.key];
182
+ delete _chunkQYX5Q7KOjs.Context.pluginRecord[this.key];
201
183
  });
202
184
  }
203
185
  };
204
186
 
205
187
  // src/modules/extension.ts
206
188
 
207
- var PExtension = class extends Dev {
189
+ var PExtension = class extends ServerBase {
208
190
  static {
209
- _chunkH2FWLKXNjs.__name.call(void 0, this, "PExtension");
191
+ _chunkRVWBJ6LVjs.__name.call(void 0, this, "PExtension");
210
192
  }
211
193
 
212
194
  constructor(tag) {
213
195
  super();
214
196
  const key = this.key = tag || _phecdacore.getTag.call(void 0, this);
215
197
  if (this.pipe) {
216
- _chunk6T4UZ4LVjs.addPipe.call(void 0, key, this.pipe.bind(this));
198
+ _chunkQYX5Q7KOjs.addPipe.call(void 0, key, this.pipe.bind(this));
217
199
  this.onUnmount(() => {
218
- delete _chunk6T4UZ4LVjs.Context.pipeRecord[key];
200
+ delete _chunkQYX5Q7KOjs.Context.pipeRecord[key];
219
201
  });
220
202
  }
221
203
  if (this.plugin) {
222
- _chunk6T4UZ4LVjs.addPlugin.call(void 0, key, this.plugin.bind(this));
204
+ _chunkQYX5Q7KOjs.addPlugin.call(void 0, key, this.plugin.bind(this));
223
205
  this.onUnmount(() => {
224
- delete _chunk6T4UZ4LVjs.Context.pluginRecord[key];
206
+ delete _chunkQYX5Q7KOjs.Context.pluginRecord[key];
225
207
  });
226
208
  }
227
209
  if (this.intercept) {
228
- _chunk6T4UZ4LVjs.addInterceptor.call(void 0, key, this.intercept.bind(this));
210
+ _chunkQYX5Q7KOjs.addInterceptor.call(void 0, key, this.intercept.bind(this));
229
211
  this.onUnmount(() => {
230
- delete _chunk6T4UZ4LVjs.Context.interceptorRecord[key];
212
+ delete _chunkQYX5Q7KOjs.Context.interceptorRecord[key];
231
213
  });
232
214
  }
233
215
  if (this.guard) {
234
- _chunk6T4UZ4LVjs.addGuard.call(void 0, key, this.guard.bind(this));
216
+ _chunkQYX5Q7KOjs.addGuard.call(void 0, key, this.guard.bind(this));
235
217
  this.onUnmount(() => {
236
- delete _chunk6T4UZ4LVjs.Context.guardRecord[key];
218
+ delete _chunkQYX5Q7KOjs.Context.guardRecord[key];
237
219
  });
238
220
  }
239
221
  if (this.filter) {
240
- _chunk6T4UZ4LVjs.addFilter.call(void 0, key, this.filter.bind(this));
222
+ _chunkQYX5Q7KOjs.addFilter.call(void 0, key, this.filter.bind(this));
241
223
  this.onUnmount(() => {
242
- delete _chunk6T4UZ4LVjs.Context.filterRecord[key];
224
+ delete _chunkQYX5Q7KOjs.Context.filterRecord[key];
243
225
  });
244
226
  }
245
227
  }
@@ -249,7 +231,7 @@ var PExtension = class extends Dev {
249
231
  var _fsextra = require('fs-extra'); var _fsextra2 = _interopRequireDefault(_fsextra);
250
232
  var Generator = class {
251
233
  static {
252
- _chunkH2FWLKXNjs.__name.call(void 0, this, "Generator");
234
+ _chunkRVWBJ6LVjs.__name.call(void 0, this, "Generator");
253
235
  }
254
236
 
255
237
  constructor(path) {
@@ -264,9 +246,9 @@ var Generator = class {
264
246
  };
265
247
 
266
248
  // src/generator/rpc.ts
267
- var RPCGenerator = (_class2 = class extends Generator {constructor(...args2) { super(...args2); _class2.prototype.__init2.call(this);_class2.prototype.__init3.call(this); }
249
+ var RPCGenerator = (_class2 = class extends Generator {constructor(...args3) { super(...args3); _class2.prototype.__init2.call(this);_class2.prototype.__init3.call(this); }
268
250
  static {
269
- _chunkH2FWLKXNjs.__name.call(void 0, this, "RPCGenerator");
251
+ _chunkRVWBJ6LVjs.__name.call(void 0, this, "RPCGenerator");
270
252
  }
271
253
  __init2() {this.name = "RPC"}
272
254
  __init3() {this.classMap = {}}
@@ -300,9 +282,9 @@ var RPCGenerator = (_class2 = class extends Generator {constructor(...args2) { s
300
282
  }, _class2);
301
283
 
302
284
  // src/generator/http.ts
303
- var HTTPGenerator = (_class3 = class extends Generator {constructor(...args3) { super(...args3); _class3.prototype.__init4.call(this);_class3.prototype.__init5.call(this); }
285
+ var HTTPGenerator = (_class3 = class extends Generator {constructor(...args4) { super(...args4); _class3.prototype.__init4.call(this);_class3.prototype.__init5.call(this); }
304
286
  static {
305
- _chunkH2FWLKXNjs.__name.call(void 0, this, "HTTPGenerator");
287
+ _chunkRVWBJ6LVjs.__name.call(void 0, this, "HTTPGenerator");
306
288
  }
307
289
  __init4() {this.name = "HTTP"}
308
290
  __init5() {this.classMap = {}}
@@ -416,4 +398,4 @@ return ret
416
398
 
417
399
 
418
400
 
419
- exports.Arg = _chunk6QLTBEXPjs.Arg; exports.BadGatewayException = _chunk6T4UZ4LVjs.BadGatewayException; exports.BadRequestException = _chunk6T4UZ4LVjs.BadRequestException; exports.BaseParam = _chunk6QLTBEXPjs.BaseParam; exports.Body = _chunk6QLTBEXPjs.Body; exports.ConflictException = _chunk6T4UZ4LVjs.ConflictException; exports.Context = _chunk6T4UZ4LVjs.Context; exports.Controller = _chunk6QLTBEXPjs.Controller; exports.Ctx = _chunk6QLTBEXPjs.Ctx; exports.CustomResponse = CustomResponse; exports.Define = _chunk6QLTBEXPjs.Define; exports.Delete = _chunk6QLTBEXPjs.Delete; exports.Dev = Dev; exports.ERROR_SYMBOL = _chunkH2FWLKXNjs.ERROR_SYMBOL; exports.Event = _chunk6QLTBEXPjs.Event; exports.Exception = _chunk6T4UZ4LVjs.Exception; exports.Factory = _chunkMKZOLLJSjs.Factory; exports.Filter = _chunk6QLTBEXPjs.Filter; exports.ForbiddenException = _chunk6T4UZ4LVjs.ForbiddenException; exports.FrameworkException = _chunk6T4UZ4LVjs.FrameworkException; exports.Generator = Generator; exports.Get = _chunk6QLTBEXPjs.Get; exports.Guard = _chunk6QLTBEXPjs.Guard; exports.HTTPGenerator = HTTPGenerator; exports.Head = _chunk6QLTBEXPjs.Head; exports.Header = _chunk6QLTBEXPjs.Header; exports.IS_HMR = _chunkH2FWLKXNjs.IS_HMR; exports.IS_ONLY_GENERATE = _chunkH2FWLKXNjs.IS_ONLY_GENERATE; exports.IS_STRICT = _chunkH2FWLKXNjs.IS_STRICT; exports.Injectable = _chunk6QLTBEXPjs.Injectable; exports.Interceptor = _chunk6QLTBEXPjs.Interceptor; exports.InvalidInputException = _chunk6T4UZ4LVjs.InvalidInputException; exports.LOG_LEVEL = _chunkH2FWLKXNjs.LOG_LEVEL; exports.Meta = _chunkMKZOLLJSjs.Meta; exports.Mix = _chunkH2FWLKXNjs.Mix; exports.NotFoundException = _chunk6T4UZ4LVjs.NotFoundException; exports.PExtension = PExtension; exports.PFilter = PFilter; exports.PGuard = PGuard; exports.PInterceptor = PInterceptor; exports.PPipe = PPipe; exports.PPlugin = PPlugin; exports.PS_EXIT_CODE = _chunkH2FWLKXNjs.PS_EXIT_CODE; exports.Param = _chunk6QLTBEXPjs.Param; exports.Patch = _chunk6QLTBEXPjs.Patch; exports.PayloadLargeException = _chunk6T4UZ4LVjs.PayloadLargeException; exports.Pipe = _chunk6QLTBEXPjs.Pipe; exports.Plugin = _chunk6QLTBEXPjs.Plugin; exports.Post = _chunk6QLTBEXPjs.Post; exports.Put = _chunk6QLTBEXPjs.Put; exports.Query = _chunk6QLTBEXPjs.Query; exports.Queue = _chunk6QLTBEXPjs.Queue; exports.RPCGenerator = RPCGenerator; exports.Route = _chunk6QLTBEXPjs.Route; exports.Rpc = _chunk6QLTBEXPjs.Rpc; exports.ServiceUnavailableException = _chunk6T4UZ4LVjs.ServiceUnavailableException; exports.TimeoutException = _chunk6T4UZ4LVjs.TimeoutException; exports.TimerException = _chunk6T4UZ4LVjs.TimerException; exports.UNMOUNT_SYMBOL = _chunkH2FWLKXNjs.UNMOUNT_SYMBOL; exports.UnauthorizedException = _chunk6T4UZ4LVjs.UnauthorizedException; exports.UndefinedException = _chunk6T4UZ4LVjs.UndefinedException; exports.UnsupportedMediaTypeException = _chunk6T4UZ4LVjs.UnsupportedMediaTypeException; exports.ValidateException = _chunk6T4UZ4LVjs.ValidateException; exports.WorkerException = _chunk6T4UZ4LVjs.WorkerException; exports.addFilter = _chunk6T4UZ4LVjs.addFilter; exports.addGuard = _chunk6T4UZ4LVjs.addGuard; exports.addInterceptor = _chunk6T4UZ4LVjs.addInterceptor; exports.addPipe = _chunk6T4UZ4LVjs.addPipe; exports.addPlugin = _chunk6T4UZ4LVjs.addPlugin; exports.defaultPipe = _chunk6T4UZ4LVjs.defaultPipe; exports.emitter = _chunkMKZOLLJSjs.emitter; exports.log = _chunkH2FWLKXNjs.log; exports.setLogger = _chunkH2FWLKXNjs.setLogger;
401
+ exports.Arg = _chunkAUAAKHWSjs.Arg; exports.BadGatewayException = _chunkQYX5Q7KOjs.BadGatewayException; exports.BadRequestException = _chunkQYX5Q7KOjs.BadRequestException; exports.BaseParam = _chunkAUAAKHWSjs.BaseParam; exports.Body = _chunkAUAAKHWSjs.Body; exports.ConflictException = _chunkQYX5Q7KOjs.ConflictException; exports.Context = _chunkQYX5Q7KOjs.Context; exports.Controller = _chunkAUAAKHWSjs.Controller; exports.Ctx = _chunkAUAAKHWSjs.Ctx; exports.CustomResponse = CustomResponse; exports.Define = _chunkAUAAKHWSjs.Define; exports.Delete = _chunkAUAAKHWSjs.Delete; exports.ERROR_SYMBOL = _chunkRVWBJ6LVjs.ERROR_SYMBOL; exports.Event = _chunkAUAAKHWSjs.Event; exports.Exception = _chunkQYX5Q7KOjs.Exception; exports.Factory = _chunkN4ULJDEQjs.Factory; exports.Filter = _chunkAUAAKHWSjs.Filter; exports.ForbiddenException = _chunkQYX5Q7KOjs.ForbiddenException; exports.FrameworkException = _chunkQYX5Q7KOjs.FrameworkException; exports.Generator = Generator; exports.Get = _chunkAUAAKHWSjs.Get; exports.Guard = _chunkAUAAKHWSjs.Guard; exports.HTTPGenerator = HTTPGenerator; exports.Head = _chunkAUAAKHWSjs.Head; exports.Header = _chunkAUAAKHWSjs.Header; exports.IS_HMR = _chunkRVWBJ6LVjs.IS_HMR; exports.IS_ONLY_GENERATE = _chunkRVWBJ6LVjs.IS_ONLY_GENERATE; exports.IS_STRICT = _chunkRVWBJ6LVjs.IS_STRICT; exports.Injectable = _chunkAUAAKHWSjs.Injectable; exports.Interceptor = _chunkAUAAKHWSjs.Interceptor; exports.InvalidInputException = _chunkQYX5Q7KOjs.InvalidInputException; exports.LOG_LEVEL = _chunkRVWBJ6LVjs.LOG_LEVEL; exports.Meta = _chunkN4ULJDEQjs.Meta; exports.Mix = _chunkRVWBJ6LVjs.Mix; exports.NotFoundException = _chunkQYX5Q7KOjs.NotFoundException; exports.PExtension = PExtension; exports.PFilter = PFilter; exports.PGuard = PGuard; exports.PInterceptor = PInterceptor; exports.PPipe = PPipe; exports.PPlugin = PPlugin; exports.PS_EXIT_CODE = _chunkRVWBJ6LVjs.PS_EXIT_CODE; exports.Param = _chunkAUAAKHWSjs.Param; exports.Patch = _chunkAUAAKHWSjs.Patch; exports.PayloadLargeException = _chunkQYX5Q7KOjs.PayloadLargeException; exports.Pipe = _chunkAUAAKHWSjs.Pipe; exports.Plugin = _chunkAUAAKHWSjs.Plugin; exports.Post = _chunkAUAAKHWSjs.Post; exports.Put = _chunkAUAAKHWSjs.Put; exports.Query = _chunkAUAAKHWSjs.Query; exports.Queue = _chunkAUAAKHWSjs.Queue; exports.RPCGenerator = RPCGenerator; exports.Route = _chunkAUAAKHWSjs.Route; exports.Rpc = _chunkAUAAKHWSjs.Rpc; exports.ServerBase = ServerBase; exports.ServiceUnavailableException = _chunkQYX5Q7KOjs.ServiceUnavailableException; exports.TimeoutException = _chunkQYX5Q7KOjs.TimeoutException; exports.TimerException = _chunkQYX5Q7KOjs.TimerException; exports.UnauthorizedException = _chunkQYX5Q7KOjs.UnauthorizedException; exports.UndefinedException = _chunkQYX5Q7KOjs.UndefinedException; exports.UnsupportedMediaTypeException = _chunkQYX5Q7KOjs.UnsupportedMediaTypeException; exports.ValidateException = _chunkQYX5Q7KOjs.ValidateException; exports.WorkerException = _chunkQYX5Q7KOjs.WorkerException; exports.addFilter = _chunkQYX5Q7KOjs.addFilter; exports.addGuard = _chunkQYX5Q7KOjs.addGuard; exports.addInterceptor = _chunkQYX5Q7KOjs.addInterceptor; exports.addPipe = _chunkQYX5Q7KOjs.addPipe; exports.addPlugin = _chunkQYX5Q7KOjs.addPlugin; exports.createPhecda = _chunkN4ULJDEQjs.createPhecda; exports.defaultPipe = _chunkQYX5Q7KOjs.defaultPipe; exports.emitter = _chunkN4ULJDEQjs.emitter; exports.log = _chunkRVWBJ6LVjs.log; exports.setLogger = _chunkRVWBJ6LVjs.setLogger;
package/dist/index.mjs CHANGED
@@ -1,8 +1,9 @@
1
1
  import {
2
2
  Factory,
3
3
  Meta,
4
+ createPhecda,
4
5
  emitter
5
- } from "./chunk-MGADYFW4.mjs";
6
+ } from "./chunk-LHLQIQPH.mjs";
6
7
  import {
7
8
  Arg,
8
9
  BaseParam,
@@ -29,7 +30,7 @@ import {
29
30
  Queue,
30
31
  Route,
31
32
  Rpc
32
- } from "./chunk-JJJ7AUEF.mjs";
33
+ } from "./chunk-5E2AVYP2.mjs";
33
34
  import {
34
35
  BadGatewayException,
35
36
  BadRequestException,
@@ -55,7 +56,7 @@ import {
55
56
  addPipe,
56
57
  addPlugin,
57
58
  defaultPipe
58
- } from "./chunk-2O6X54P5.mjs";
59
+ } from "./chunk-BZKJ5NBU.mjs";
59
60
  import {
60
61
  ERROR_SYMBOL,
61
62
  IS_HMR,
@@ -64,11 +65,10 @@ import {
64
65
  LOG_LEVEL,
65
66
  Mix,
66
67
  PS_EXIT_CODE,
67
- UNMOUNT_SYMBOL,
68
68
  __name,
69
69
  log,
70
70
  setLogger
71
- } from "./chunk-2NTXVYQC.mjs";
71
+ } from "./chunk-MESZCLSS.mjs";
72
72
 
73
73
  // src/types.ts
74
74
  var ResponseSymbol = Symbol("response");
@@ -79,8 +79,8 @@ var CustomResponse = class {
79
79
  [ResponseSymbol];
80
80
  };
81
81
 
82
- // src/modules/dev.ts
83
- import { Empty, Unmount } from "phecda-core";
82
+ // src/modules/base.ts
83
+ import { Base, Empty } from "phecda-core";
84
84
  function _ts_decorate(decorators, target, key, desc) {
85
85
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
86
86
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
@@ -88,38 +88,20 @@ function _ts_decorate(decorators, target, key, desc) {
88
88
  return c > 3 && r && Object.defineProperty(target, key, r), r;
89
89
  }
90
90
  __name(_ts_decorate, "_ts_decorate");
91
- function _ts_metadata(k, v) {
92
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
93
- }
94
- __name(_ts_metadata, "_ts_metadata");
95
- var Dev = class {
91
+ var ServerBase = class extends Base {
96
92
  static {
97
- __name(this, "Dev");
93
+ __name(this, "ServerBase");
98
94
  }
99
- [UNMOUNT_SYMBOL] = [];
100
95
  context;
101
- // work for hmr
102
- // exec callback when module unmount
103
- onUnmount(cb) {
104
- this[UNMOUNT_SYMBOL].push(cb);
105
- }
106
- async unmount() {
107
- for (const cb of this[UNMOUNT_SYMBOL]) await cb();
108
- }
96
+ emitter = emitter;
109
97
  };
110
- _ts_decorate([
111
- Unmount,
112
- _ts_metadata("design:type", Function),
113
- _ts_metadata("design:paramtypes", []),
114
- _ts_metadata("design:returntype", Promise)
115
- ], Dev.prototype, "unmount", null);
116
- Dev = _ts_decorate([
98
+ ServerBase = _ts_decorate([
117
99
  Empty
118
- ], Dev);
100
+ ], ServerBase);
119
101
 
120
102
  // src/modules/filter.ts
121
103
  import { getTag } from "phecda-core";
122
- var PFilter = class extends Dev {
104
+ var PFilter = class extends ServerBase {
123
105
  static {
124
106
  __name(this, "PFilter");
125
107
  }
@@ -136,7 +118,7 @@ var PFilter = class extends Dev {
136
118
 
137
119
  // src/modules/guard.ts
138
120
  import { getTag as getTag2 } from "phecda-core";
139
- var PGuard = class extends Dev {
121
+ var PGuard = class extends ServerBase {
140
122
  static {
141
123
  __name(this, "PGuard");
142
124
  }
@@ -153,7 +135,7 @@ var PGuard = class extends Dev {
153
135
 
154
136
  // src/modules/interceptor.ts
155
137
  import { getTag as getTag3 } from "phecda-core";
156
- var PInterceptor = class extends Dev {
138
+ var PInterceptor = class extends ServerBase {
157
139
  static {
158
140
  __name(this, "PInterceptor");
159
141
  }
@@ -170,7 +152,7 @@ var PInterceptor = class extends Dev {
170
152
 
171
153
  // src/modules/pipe.ts
172
154
  import { getTag as getTag4 } from "phecda-core";
173
- var PPipe = class extends Dev {
155
+ var PPipe = class extends ServerBase {
174
156
  static {
175
157
  __name(this, "PPipe");
176
158
  }
@@ -187,7 +169,7 @@ var PPipe = class extends Dev {
187
169
 
188
170
  // src/modules/plugin.ts
189
171
  import { getTag as getTag5 } from "phecda-core";
190
- var PPlugin = class extends Dev {
172
+ var PPlugin = class extends ServerBase {
191
173
  static {
192
174
  __name(this, "PPlugin");
193
175
  }
@@ -204,7 +186,7 @@ var PPlugin = class extends Dev {
204
186
 
205
187
  // src/modules/extension.ts
206
188
  import { getTag as getTag6 } from "phecda-core";
207
- var PExtension = class extends Dev {
189
+ var PExtension = class extends ServerBase {
208
190
  static {
209
191
  __name(this, "PExtension");
210
192
  }
@@ -355,7 +337,6 @@ export {
355
337
  CustomResponse,
356
338
  Define,
357
339
  Delete,
358
- Dev,
359
340
  ERROR_SYMBOL,
360
341
  Event,
361
342
  Exception,
@@ -398,10 +379,10 @@ export {
398
379
  RPCGenerator,
399
380
  Route,
400
381
  Rpc,
382
+ ServerBase,
401
383
  ServiceUnavailableException,
402
384
  TimeoutException,
403
385
  TimerException,
404
- UNMOUNT_SYMBOL,
405
386
  UnauthorizedException,
406
387
  UndefinedException,
407
388
  UnsupportedMediaTypeException,
@@ -412,6 +393,7 @@ export {
412
393
  addInterceptor,
413
394
  addPipe,
414
395
  addPlugin,
396
+ createPhecda,
415
397
  defaultPipe,
416
398
  emitter,
417
399
  log,
@@ -1,7 +1,7 @@
1
1
  import { WorkerOptions, QueueOptions, Worker, Queue } from 'bullmq';
2
- import { F as Factory } from '../../core-BIm7dkko.mjs';
3
- import { b as RpcContext, R as RpcServerOptions, a as RpcClientOptions } from '../../types-B-y2TwhC.mjs';
4
- import { T as ToClientMap } from '../../types-CdQey96H.mjs';
2
+ import { F as Factory } from '../../core-Bc2ENEHX.mjs';
3
+ import { b as RpcContext, R as RpcServerOptions, a as RpcClientOptions } from '../../types-vF4Hvnvo.mjs';
4
+ import { T as ToClientMap } from '../../types-BlIBlnVT.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-C3cON4Um.js';
3
- import { b as RpcContext, R as RpcServerOptions, a as RpcClientOptions } from '../../types-CIZbw8S2.js';
4
- import { T as ToClientMap } from '../../types-CdQey96H.js';
2
+ import { F as Factory } from '../../core-dx9E5x2N.js';
3
+ import { b as RpcContext, R as RpcServerOptions, a as RpcClientOptions } from '../../types-CJSkC9tO.js';
4
+ import { T as ToClientMap } from '../../types-BlIBlnVT.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 _chunk6T4UZ4LVjs = require('../../chunk-6T4UZ4LV.js');
7
+ var _chunkQYX5Q7KOjs = require('../../chunk-QYX5Q7KO.js');
8
8
 
9
9
 
10
- var _chunkH2FWLKXNjs = require('../../chunk-H2FWLKXN.js');
10
+ var _chunkRVWBJ6LVjs = require('../../chunk-RVWBJ6LV.js');
11
11
 
12
12
  // src/rpc/bullmq/bind.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 = _chunk6T4UZ4LVjs.createControllerMetaMap.call(void 0, meta, (meta2) => {
21
+ const metaMap = _chunkQYX5Q7KOjs.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
- _chunk6T4UZ4LVjs.detectAopDep.call(void 0, meta, {
28
+ _chunkQYX5Q7KOjs.detectAopDep.call(void 0, meta, {
29
29
  guards: globalGuards,
30
30
  interceptors: globalInterceptors
31
31
  }, "rpc");
@@ -44,7 +44,7 @@ async function create({ moduleMap, meta }, opts = {}) {
44
44
  }
45
45
  }
46
46
  }
47
- _chunkH2FWLKXNjs.__name.call(void 0, subscribeQueues, "subscribeQueues");
47
+ _chunkRVWBJ6LVjs.__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,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, _chunk6T4UZ4LVjs.Context)({
56
+ const context = new (0, _chunkQYX5Q7KOjs.Context)({
57
57
  type: "bullmq",
58
58
  moduleMap,
59
59
  meta: meta2,
@@ -85,9 +85,9 @@ async function create({ moduleMap, meta }, opts = {}) {
85
85
  }
86
86
  });
87
87
  }
88
- _chunkH2FWLKXNjs.__name.call(void 0, handleRequest, "handleRequest");
88
+ _chunkRVWBJ6LVjs.__name.call(void 0, handleRequest, "handleRequest");
89
89
  subscribeQueues();
90
- _chunk6T4UZ4LVjs.HMR.call(void 0, async () => {
90
+ _chunkQYX5Q7KOjs.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();
@@ -97,7 +97,7 @@ async function create({ moduleMap, meta }, opts = {}) {
97
97
  queueMap
98
98
  };
99
99
  }
100
- _chunkH2FWLKXNjs.__name.call(void 0, create, "create");
100
+ _chunkRVWBJ6LVjs.__name.call(void 0, create, "create");
101
101
 
102
102
  // src/rpc/bullmq/client.ts
103
103
  var _events = require('events');
@@ -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 = _chunk6T4UZ4LVjs.genClientQueue.call(void 0, key);
111
+ const clientQueue = _chunkQYX5Q7KOjs.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;
@@ -153,7 +153,7 @@ async function createClient(controllers, opts = {}) {
153
153
  if (error) reject(data);
154
154
  else resolve(data);
155
155
  }
156
- _chunkH2FWLKXNjs.__name.call(void 0, listener, "listener");
156
+ _chunkRVWBJ6LVjs.__name.call(void 0, listener, "listener");
157
157
  eventCount++;
158
158
  emitter.once(id, listener);
159
159
  });
@@ -163,7 +163,7 @@ async function createClient(controllers, opts = {}) {
163
163
  }
164
164
  return ret;
165
165
  }
166
- _chunkH2FWLKXNjs.__name.call(void 0, createClient, "createClient");
166
+ _chunkRVWBJ6LVjs.__name.call(void 0, createClient, "createClient");
167
167
 
168
168
 
169
169