phecda-server 5.0.0-alpha.10 → 5.0.0-alpha.11

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 (37) hide show
  1. package/dist/{chunk-GY5KXMJJ.js → chunk-2AI7ID6X.js} +2 -2
  2. package/dist/{chunk-CLW7EYYD.js → chunk-ANH53I6B.js} +30 -23
  3. package/dist/{chunk-ALJSRZ4Z.js → chunk-C36XJ7D3.js} +11 -1
  4. package/dist/{chunk-DBYLTVRY.mjs → chunk-JJG37LHY.mjs} +1 -1
  5. package/dist/{chunk-WB437JJ2.mjs → chunk-KGMDCF26.mjs} +11 -1
  6. package/dist/{chunk-BXJSLR46.mjs → chunk-KKTRNKCF.mjs} +9 -2
  7. package/dist/{chunk-EP4EN3MM.mjs → chunk-MZBE4NIO.mjs} +1 -1
  8. package/dist/{chunk-ZV4O77YM.js → chunk-P5LJBZPN.js} +48 -48
  9. package/dist/{core-fe0991cd.d.ts → core-39d78b79.d.ts} +1 -0
  10. package/dist/index.d.ts +5 -3
  11. package/dist/index.js +58 -56
  12. package/dist/index.mjs +6 -4
  13. package/dist/rpc/kafka/index.d.ts +1 -1
  14. package/dist/rpc/kafka/index.js +9 -9
  15. package/dist/rpc/kafka/index.mjs +2 -2
  16. package/dist/rpc/rabbitmq/index.d.ts +1 -1
  17. package/dist/rpc/rabbitmq/index.js +9 -9
  18. package/dist/rpc/rabbitmq/index.mjs +2 -2
  19. package/dist/rpc/redis/index.d.ts +1 -1
  20. package/dist/rpc/redis/index.js +9 -9
  21. package/dist/rpc/redis/index.mjs +2 -2
  22. package/dist/server/express/index.d.ts +1 -1
  23. package/dist/server/express/index.js +24 -24
  24. package/dist/server/express/index.mjs +3 -3
  25. package/dist/server/fastify/index.d.ts +1 -1
  26. package/dist/server/fastify/index.js +22 -22
  27. package/dist/server/fastify/index.mjs +3 -3
  28. package/dist/server/h3/index.d.ts +1 -1
  29. package/dist/server/h3/index.js +21 -21
  30. package/dist/server/h3/index.mjs +3 -3
  31. package/dist/server/koa/index.d.ts +1 -1
  32. package/dist/server/koa/index.js +24 -24
  33. package/dist/server/koa/index.mjs +3 -3
  34. package/dist/test.d.ts +1 -1
  35. package/dist/test.js +5 -5
  36. package/dist/test.mjs +2 -2
  37. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -5,10 +5,10 @@
5
5
 
6
6
 
7
7
 
8
- var _chunkCLW7EYYDjs = require('./chunk-CLW7EYYD.js');
8
+ var _chunkANH53I6Bjs = require('./chunk-ANH53I6B.js');
9
9
 
10
10
 
11
- var _chunkGY5KXMJJjs = require('./chunk-GY5KXMJJ.js');
11
+ var _chunk2AI7ID6Xjs = require('./chunk-2AI7ID6X.js');
12
12
 
13
13
 
14
14
 
@@ -34,7 +34,7 @@ var _chunkGY5KXMJJjs = require('./chunk-GY5KXMJJ.js');
34
34
 
35
35
 
36
36
 
37
- var _chunkZV4O77YMjs = require('./chunk-ZV4O77YM.js');
37
+ var _chunkP5LJBZPNjs = require('./chunk-P5LJBZPN.js');
38
38
 
39
39
 
40
40
 
@@ -50,7 +50,8 @@ var _chunkZV4O77YMjs = require('./chunk-ZV4O77YM.js');
50
50
 
51
51
 
52
52
 
53
- var _chunkALJSRZ4Zjs = require('./chunk-ALJSRZ4Z.js');
53
+
54
+ var _chunkC36XJ7D3js = require('./chunk-C36XJ7D3.js');
54
55
 
55
56
  // src/decorators/index.ts
56
57
  var _phecdacore = require('phecda-core'); _createStarExport(_phecdacore);
@@ -78,7 +79,7 @@ function BaseParam(type, key) {
78
79
  _phecdacore.setState.call(void 0, target, k, state);
79
80
  };
80
81
  }
81
- _chunkALJSRZ4Zjs.__name.call(void 0, BaseParam, "BaseParam");
82
+ _chunkC36XJ7D3js.__name.call(void 0, BaseParam, "BaseParam");
82
83
  function Pipe(key, opts) {
83
84
  return (target, k, index) => {
84
85
  _phecdacore.setVar.call(void 0, target, k);
@@ -100,27 +101,27 @@ function Pipe(key, opts) {
100
101
  _phecdacore.setState.call(void 0, target, k, state);
101
102
  };
102
103
  }
103
- _chunkALJSRZ4Zjs.__name.call(void 0, Pipe, "Pipe");
104
+ _chunkC36XJ7D3js.__name.call(void 0, Pipe, "Pipe");
104
105
  function Body(key = "") {
105
106
  return BaseParam("body", key);
106
107
  }
107
- _chunkALJSRZ4Zjs.__name.call(void 0, Body, "Body");
108
+ _chunkC36XJ7D3js.__name.call(void 0, Body, "Body");
108
109
  function Head(key) {
109
110
  return BaseParam("headers", key.toLowerCase());
110
111
  }
111
- _chunkALJSRZ4Zjs.__name.call(void 0, Head, "Head");
112
+ _chunkC36XJ7D3js.__name.call(void 0, Head, "Head");
112
113
  function Query(key = "") {
113
114
  return BaseParam("query", key);
114
115
  }
115
- _chunkALJSRZ4Zjs.__name.call(void 0, Query, "Query");
116
+ _chunkC36XJ7D3js.__name.call(void 0, Query, "Query");
116
117
  function Param(key) {
117
118
  return BaseParam("params", key);
118
119
  }
119
- _chunkALJSRZ4Zjs.__name.call(void 0, Param, "Param");
120
+ _chunkC36XJ7D3js.__name.call(void 0, Param, "Param");
120
121
  function Arg() {
121
122
  return BaseParam("params", "");
122
123
  }
123
- _chunkALJSRZ4Zjs.__name.call(void 0, Arg, "Arg");
124
+ _chunkC36XJ7D3js.__name.call(void 0, Arg, "Arg");
124
125
 
125
126
  // src/decorators/route.ts
126
127
 
@@ -138,31 +139,31 @@ function Route(route, type) {
138
139
  _phecdacore.setState.call(void 0, target, key, state);
139
140
  };
140
141
  }
141
- _chunkALJSRZ4Zjs.__name.call(void 0, Route, "Route");
142
+ _chunkC36XJ7D3js.__name.call(void 0, Route, "Route");
142
143
  function Get(route) {
143
144
  return Route(route, "get");
144
145
  }
145
- _chunkALJSRZ4Zjs.__name.call(void 0, Get, "Get");
146
+ _chunkC36XJ7D3js.__name.call(void 0, Get, "Get");
146
147
  function Post(route) {
147
148
  return Route(route, "post");
148
149
  }
149
- _chunkALJSRZ4Zjs.__name.call(void 0, Post, "Post");
150
+ _chunkC36XJ7D3js.__name.call(void 0, Post, "Post");
150
151
  function Put(route) {
151
152
  return Route(route, "put");
152
153
  }
153
- _chunkALJSRZ4Zjs.__name.call(void 0, Put, "Put");
154
+ _chunkC36XJ7D3js.__name.call(void 0, Put, "Put");
154
155
  function Patch(route) {
155
156
  return Route(route, "patch");
156
157
  }
157
- _chunkALJSRZ4Zjs.__name.call(void 0, Patch, "Patch");
158
+ _chunkC36XJ7D3js.__name.call(void 0, Patch, "Patch");
158
159
  function Delete(route) {
159
160
  return Route(route, "delete");
160
161
  }
161
- _chunkALJSRZ4Zjs.__name.call(void 0, Delete, "Delete");
162
+ _chunkC36XJ7D3js.__name.call(void 0, Delete, "Delete");
162
163
  function Controller(route = "") {
163
164
  return Route(route);
164
165
  }
165
- _chunkALJSRZ4Zjs.__name.call(void 0, Controller, "Controller");
166
+ _chunkC36XJ7D3js.__name.call(void 0, Controller, "Controller");
166
167
  function Rpc(...types) {
167
168
  return (target, key) => {
168
169
  if (!key)
@@ -176,7 +177,7 @@ function Rpc(...types) {
176
177
  _phecdacore.setState.call(void 0, target, key, state);
177
178
  };
178
179
  }
179
- _chunkALJSRZ4Zjs.__name.call(void 0, Rpc, "Rpc");
180
+ _chunkC36XJ7D3js.__name.call(void 0, Rpc, "Rpc");
180
181
  function Event(isEvent = true) {
181
182
  return (target, key) => {
182
183
  if (!key)
@@ -190,7 +191,7 @@ function Event(isEvent = true) {
190
191
  _phecdacore.setState.call(void 0, target, key, state);
191
192
  };
192
193
  }
193
- _chunkALJSRZ4Zjs.__name.call(void 0, Event, "Event");
194
+ _chunkC36XJ7D3js.__name.call(void 0, Event, "Event");
194
195
 
195
196
  // src/decorators/aop.ts
196
197
 
@@ -207,7 +208,7 @@ function Guard(...guards) {
207
208
  _phecdacore.setState.call(void 0, target, key, state);
208
209
  };
209
210
  }
210
- _chunkALJSRZ4Zjs.__name.call(void 0, Guard, "Guard");
211
+ _chunkC36XJ7D3js.__name.call(void 0, Guard, "Guard");
211
212
  function Plugin(...plugins) {
212
213
  return (target, key) => {
213
214
  if (!key)
@@ -221,7 +222,7 @@ function Plugin(...plugins) {
221
222
  _phecdacore.setState.call(void 0, target, key, state);
222
223
  };
223
224
  }
224
- _chunkALJSRZ4Zjs.__name.call(void 0, Plugin, "Plugin");
225
+ _chunkC36XJ7D3js.__name.call(void 0, Plugin, "Plugin");
225
226
  function Interceptor(...interceptors) {
226
227
  return (target, key) => {
227
228
  if (!key)
@@ -235,7 +236,7 @@ function Interceptor(...interceptors) {
235
236
  _phecdacore.setState.call(void 0, target, key, state);
236
237
  };
237
238
  }
238
- _chunkALJSRZ4Zjs.__name.call(void 0, Interceptor, "Interceptor");
239
+ _chunkC36XJ7D3js.__name.call(void 0, Interceptor, "Interceptor");
239
240
  function Filter(filter) {
240
241
  return (target, key) => {
241
242
  if (!key)
@@ -247,7 +248,7 @@ function Filter(filter) {
247
248
  _phecdacore.setState.call(void 0, target, key, state);
248
249
  };
249
250
  }
250
- _chunkALJSRZ4Zjs.__name.call(void 0, Filter, "Filter");
251
+ _chunkC36XJ7D3js.__name.call(void 0, Filter, "Filter");
251
252
 
252
253
  // src/decorators/index.ts
253
254
  function Header(name, value) {
@@ -260,7 +261,7 @@ function Header(name, value) {
260
261
  _phecdacore.setState.call(void 0, target, k, state);
261
262
  };
262
263
  }
263
- _chunkALJSRZ4Zjs.__name.call(void 0, Header, "Header");
264
+ _chunkC36XJ7D3js.__name.call(void 0, Header, "Header");
264
265
  function Define(key, value) {
265
266
  return (target, k) => {
266
267
  if (!k) {
@@ -275,7 +276,7 @@ function Define(key, value) {
275
276
  _phecdacore.setState.call(void 0, target, k, state);
276
277
  };
277
278
  }
278
- _chunkALJSRZ4Zjs.__name.call(void 0, Define, "Define");
279
+ _chunkC36XJ7D3js.__name.call(void 0, Define, "Define");
279
280
 
280
281
  // src/index.ts
281
282
 
@@ -292,10 +293,10 @@ var __decorate = function(decorators, target, key, desc) {
292
293
  r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
293
294
  return c > 3 && r && Object.defineProperty(target, key, r), r;
294
295
  };
295
- var Dev = /* @__PURE__ */ _chunkALJSRZ4Zjs.__name.call(void 0, (_class =class Dev2 {constructor() { _class.prototype.__init.call(this); }
296
- __init() {this[_chunkALJSRZ4Zjs.UNMOUNT_SYMBOL] = []}
296
+ var Dev = /* @__PURE__ */ _chunkC36XJ7D3js.__name.call(void 0, (_class =class Dev2 {constructor() { _class.prototype.__init.call(this); }
297
+ __init() {this[_chunkC36XJ7D3js.UNMOUNT_SYMBOL] = []}
297
298
  onUnmount(cb) {
298
- this[_chunkALJSRZ4Zjs.UNMOUNT_SYMBOL].push(cb);
299
+ this[_chunkC36XJ7D3js.UNMOUNT_SYMBOL].push(cb);
299
300
  }
300
301
  }, _class), "Dev");
301
302
  Dev = exports.Dev = __decorate([
@@ -309,13 +310,13 @@ var PFilter = class extends Dev {
309
310
  constructor(tag) {
310
311
  super();
311
312
  this.key = tag || _phecdacore.getTag.call(void 0, this);
312
- _chunkZV4O77YMjs.addFilter.call(void 0, this.key, this.use.bind(this));
313
+ _chunkP5LJBZPNjs.addFilter.call(void 0, this.key, this.use.bind(this));
313
314
  this.onUnmount(() => {
314
- delete _chunkZV4O77YMjs.Context.filterRecord[this.key];
315
+ delete _chunkP5LJBZPNjs.Context.filterRecord[this.key];
315
316
  });
316
317
  }
317
318
  };
318
- _chunkALJSRZ4Zjs.__name.call(void 0, PFilter, "PFilter");
319
+ _chunkC36XJ7D3js.__name.call(void 0, PFilter, "PFilter");
319
320
 
320
321
  // src/modules/guard.ts
321
322
 
@@ -324,13 +325,13 @@ var PGuard = class extends Dev {
324
325
  constructor(tag) {
325
326
  super();
326
327
  this.key = tag || _phecdacore.getTag.call(void 0, this);
327
- _chunkZV4O77YMjs.addGuard.call(void 0, this.key, this.use.bind(this));
328
+ _chunkP5LJBZPNjs.addGuard.call(void 0, this.key, this.use.bind(this));
328
329
  this.onUnmount(() => {
329
- delete _chunkZV4O77YMjs.Context.guardRecord[this.key];
330
+ delete _chunkP5LJBZPNjs.Context.guardRecord[this.key];
330
331
  });
331
332
  }
332
333
  };
333
- _chunkALJSRZ4Zjs.__name.call(void 0, PGuard, "PGuard");
334
+ _chunkC36XJ7D3js.__name.call(void 0, PGuard, "PGuard");
334
335
 
335
336
  // src/modules/interceptor.ts
336
337
 
@@ -340,12 +341,12 @@ var PInterceptor = class extends Dev {
340
341
  super();
341
342
  this.key = tag || _phecdacore.getTag.call(void 0, this);
342
343
  this.onUnmount(() => {
343
- delete _chunkZV4O77YMjs.Context.interceptorRecord[this.key];
344
+ delete _chunkP5LJBZPNjs.Context.interceptorRecord[this.key];
344
345
  });
345
- _chunkZV4O77YMjs.addInterceptor.call(void 0, this.key, this.use.bind(this));
346
+ _chunkP5LJBZPNjs.addInterceptor.call(void 0, this.key, this.use.bind(this));
346
347
  }
347
348
  };
348
- _chunkALJSRZ4Zjs.__name.call(void 0, PInterceptor, "PInterceptor");
349
+ _chunkC36XJ7D3js.__name.call(void 0, PInterceptor, "PInterceptor");
349
350
 
350
351
  // src/modules/pipe.ts
351
352
 
@@ -354,13 +355,13 @@ var PPipe = class extends Dev {
354
355
  constructor(tag) {
355
356
  super();
356
357
  this.key = tag || _phecdacore.getTag.call(void 0, this);
357
- _chunkZV4O77YMjs.addPipe.call(void 0, this.key, this.use.bind(this));
358
+ _chunkP5LJBZPNjs.addPipe.call(void 0, this.key, this.use.bind(this));
358
359
  this.onUnmount(() => {
359
- delete _chunkZV4O77YMjs.Context.pipeRecord[this.key];
360
+ delete _chunkP5LJBZPNjs.Context.pipeRecord[this.key];
360
361
  });
361
362
  }
362
363
  };
363
- _chunkALJSRZ4Zjs.__name.call(void 0, PPipe, "PPipe");
364
+ _chunkC36XJ7D3js.__name.call(void 0, PPipe, "PPipe");
364
365
 
365
366
  // src/modules/addon.ts
366
367
 
@@ -369,13 +370,13 @@ var PAddon = class extends Dev {
369
370
  constructor(tag) {
370
371
  super();
371
372
  this.key = tag || _phecdacore.getTag.call(void 0, this);
372
- _chunkZV4O77YMjs.addPlugin.call(void 0, this.key, this.use.bind(this));
373
+ _chunkP5LJBZPNjs.addPlugin.call(void 0, this.key, this.use.bind(this));
373
374
  this.onUnmount(() => {
374
- delete _chunkZV4O77YMjs.Context.pluginRecord[this.key];
375
+ delete _chunkP5LJBZPNjs.Context.pluginRecord[this.key];
375
376
  });
376
377
  }
377
378
  };
378
- _chunkALJSRZ4Zjs.__name.call(void 0, PAddon, "PAddon");
379
+ _chunkC36XJ7D3js.__name.call(void 0, PAddon, "PAddon");
379
380
 
380
381
  // src/modules/extension.ts
381
382
 
@@ -385,38 +386,39 @@ var PExtension = class extends Dev {
385
386
  super();
386
387
  const key = this.key = tag || _phecdacore.getTag.call(void 0, this);
387
388
  if (this.pipe) {
388
- _chunkZV4O77YMjs.addPipe.call(void 0, key, this.pipe.bind(this));
389
+ _chunkP5LJBZPNjs.addPipe.call(void 0, key, this.pipe.bind(this));
389
390
  this.onUnmount(() => {
390
- delete _chunkZV4O77YMjs.Context.pipeRecord[key];
391
+ delete _chunkP5LJBZPNjs.Context.pipeRecord[key];
391
392
  });
392
393
  }
393
394
  if (this.plugin) {
394
- _chunkZV4O77YMjs.addPlugin.call(void 0, key, this.plugin.bind(this));
395
+ _chunkP5LJBZPNjs.addPlugin.call(void 0, key, this.plugin.bind(this));
395
396
  this.onUnmount(() => {
396
- delete _chunkZV4O77YMjs.Context.pluginRecord[key];
397
+ delete _chunkP5LJBZPNjs.Context.pluginRecord[key];
397
398
  });
398
399
  }
399
400
  if (this.intercept) {
400
- _chunkZV4O77YMjs.addInterceptor.call(void 0, key, this.intercept.bind(this));
401
+ _chunkP5LJBZPNjs.addInterceptor.call(void 0, key, this.intercept.bind(this));
401
402
  this.onUnmount(() => {
402
- delete _chunkZV4O77YMjs.Context.interceptorRecord[key];
403
+ delete _chunkP5LJBZPNjs.Context.interceptorRecord[key];
403
404
  });
404
405
  }
405
406
  if (this.guard) {
406
- _chunkZV4O77YMjs.addGuard.call(void 0, key, this.guard.bind(this));
407
+ _chunkP5LJBZPNjs.addGuard.call(void 0, key, this.guard.bind(this));
407
408
  this.onUnmount(() => {
408
- delete _chunkZV4O77YMjs.Context.guardRecord[key];
409
+ delete _chunkP5LJBZPNjs.Context.guardRecord[key];
409
410
  });
410
411
  }
411
412
  if (this.filter) {
412
- _chunkZV4O77YMjs.addFilter.call(void 0, key, this.filter.bind(this));
413
+ _chunkP5LJBZPNjs.addFilter.call(void 0, key, this.filter.bind(this));
413
414
  this.onUnmount(() => {
414
- delete _chunkZV4O77YMjs.Context.filterRecord[key];
415
+ delete _chunkP5LJBZPNjs.Context.filterRecord[key];
415
416
  });
416
417
  }
417
418
  }
418
419
  };
419
- _chunkALJSRZ4Zjs.__name.call(void 0, PExtension, "PExtension");
420
+ _chunkC36XJ7D3js.__name.call(void 0, PExtension, "PExtension");
421
+
420
422
 
421
423
 
422
424
 
@@ -491,4 +493,4 @@ _chunkALJSRZ4Zjs.__name.call(void 0, PExtension, "PExtension");
491
493
 
492
494
 
493
495
 
494
- exports.APP_SYMBOL = _chunkALJSRZ4Zjs.APP_SYMBOL; exports.Arg = Arg; exports.BadGatewayException = _chunkZV4O77YMjs.BadGatewayException; exports.BadRequestException = _chunkZV4O77YMjs.BadRequestException; exports.BaseParam = BaseParam; exports.Body = Body; exports.ConflictException = _chunkZV4O77YMjs.ConflictException; exports.Context = _chunkZV4O77YMjs.Context; exports.Controller = Controller; exports.Define = Define; exports.Delete = Delete; exports.Dev = Dev; exports.ERROR_SYMBOL = _chunkALJSRZ4Zjs.ERROR_SYMBOL; exports.Event = Event; exports.Exception = _chunkZV4O77YMjs.Exception; exports.Factory = _chunkCLW7EYYDjs.Factory; exports.Filter = Filter; exports.ForbiddenException = _chunkZV4O77YMjs.ForbiddenException; exports.FrameworkException = _chunkZV4O77YMjs.FrameworkException; exports.Get = Get; exports.Guard = Guard; exports.Head = Head; exports.Header = Header; exports.IS_DEV = _chunkALJSRZ4Zjs.IS_DEV; exports.IS_STRICT = _chunkALJSRZ4Zjs.IS_STRICT; exports.Injectable = _chunkCLW7EYYDjs.Injectable; exports.Interceptor = Interceptor; exports.InvalidInputException = _chunkZV4O77YMjs.InvalidInputException; exports.MERGE_SYMBOL = _chunkALJSRZ4Zjs.MERGE_SYMBOL; exports.META_SYMBOL = _chunkALJSRZ4Zjs.META_SYMBOL; exports.MODULE_SYMBOL = _chunkALJSRZ4Zjs.MODULE_SYMBOL; exports.Meta = _chunkCLW7EYYDjs.Meta; exports.NotFoundException = _chunkZV4O77YMjs.NotFoundException; exports.PAddon = PAddon; exports.PExtension = PExtension; exports.PFilter = PFilter; exports.PGuard = PGuard; exports.PInterceptor = PInterceptor; exports.PPipe = PPipe; exports.PS_FILE_RE = _chunkALJSRZ4Zjs.PS_FILE_RE; exports.PS_IMPORT_RE = _chunkALJSRZ4Zjs.PS_IMPORT_RE; exports.Param = Param; exports.Patch = Patch; exports.PayloadLargeException = _chunkZV4O77YMjs.PayloadLargeException; exports.Pipe = Pipe; exports.Plugin = Plugin; exports.Post = Post; exports.Put = Put; exports.Query = Query; exports.Route = Route; exports.Rpc = Rpc; exports.ServiceUnavailableException = _chunkZV4O77YMjs.ServiceUnavailableException; exports.TimeoutException = _chunkZV4O77YMjs.TimeoutException; exports.UNMOUNT_SYMBOL = _chunkALJSRZ4Zjs.UNMOUNT_SYMBOL; exports.UnauthorizedException = _chunkZV4O77YMjs.UnauthorizedException; exports.UndefinedException = _chunkZV4O77YMjs.UndefinedException; exports.UnsupportedMediaTypeException = _chunkZV4O77YMjs.UnsupportedMediaTypeException; exports.ValidateException = _chunkZV4O77YMjs.ValidateException; exports.addFilter = _chunkZV4O77YMjs.addFilter; exports.addGuard = _chunkZV4O77YMjs.addGuard; exports.addInterceptor = _chunkZV4O77YMjs.addInterceptor; exports.addPipe = _chunkZV4O77YMjs.addPipe; exports.addPlugin = _chunkZV4O77YMjs.addPlugin; exports.defaultPipe = _chunkZV4O77YMjs.defaultPipe; exports.emitter = _chunkCLW7EYYDjs.emitter; exports.generateHTTPCode = _chunkCLW7EYYDjs.generateHTTPCode; exports.generateRPCCode = _chunkCLW7EYYDjs.generateRPCCode; exports.getConfig = _chunkALJSRZ4Zjs.getConfig; exports.guardRecord = _chunkZV4O77YMjs.guardRecord; exports.isAopDepInject = _chunkZV4O77YMjs.isAopDepInject; exports.log = _chunkALJSRZ4Zjs.log; exports.resolveDep = _chunkGY5KXMJJjs.resolveDep; exports.setConfig = _chunkALJSRZ4Zjs.setConfig;
496
+ exports.APP_SYMBOL = _chunkC36XJ7D3js.APP_SYMBOL; exports.Arg = Arg; exports.BadGatewayException = _chunkP5LJBZPNjs.BadGatewayException; exports.BadRequestException = _chunkP5LJBZPNjs.BadRequestException; exports.BaseParam = BaseParam; exports.Body = Body; exports.ConflictException = _chunkP5LJBZPNjs.ConflictException; exports.Context = _chunkP5LJBZPNjs.Context; exports.Controller = Controller; exports.Define = Define; exports.Delete = Delete; exports.Dev = Dev; exports.ERROR_SYMBOL = _chunkC36XJ7D3js.ERROR_SYMBOL; exports.Event = Event; exports.Exception = _chunkP5LJBZPNjs.Exception; exports.Factory = _chunkANH53I6Bjs.Factory; exports.Filter = Filter; exports.ForbiddenException = _chunkP5LJBZPNjs.ForbiddenException; exports.FrameworkException = _chunkP5LJBZPNjs.FrameworkException; exports.Get = Get; exports.Guard = Guard; exports.Head = Head; exports.Header = Header; exports.IS_DEV = _chunkC36XJ7D3js.IS_DEV; exports.IS_STRICT = _chunkC36XJ7D3js.IS_STRICT; exports.Injectable = _chunkANH53I6Bjs.Injectable; exports.Interceptor = Interceptor; exports.InvalidInputException = _chunkP5LJBZPNjs.InvalidInputException; exports.MERGE_SYMBOL = _chunkC36XJ7D3js.MERGE_SYMBOL; exports.META_SYMBOL = _chunkC36XJ7D3js.META_SYMBOL; exports.MODULE_SYMBOL = _chunkC36XJ7D3js.MODULE_SYMBOL; exports.Meta = _chunkANH53I6Bjs.Meta; exports.Mix = _chunkC36XJ7D3js.Mix; exports.NotFoundException = _chunkP5LJBZPNjs.NotFoundException; exports.PAddon = PAddon; exports.PExtension = PExtension; exports.PFilter = PFilter; exports.PGuard = PGuard; exports.PInterceptor = PInterceptor; exports.PPipe = PPipe; exports.PS_FILE_RE = _chunkC36XJ7D3js.PS_FILE_RE; exports.PS_IMPORT_RE = _chunkC36XJ7D3js.PS_IMPORT_RE; exports.Param = Param; exports.Patch = Patch; exports.PayloadLargeException = _chunkP5LJBZPNjs.PayloadLargeException; exports.Pipe = Pipe; exports.Plugin = Plugin; exports.Post = Post; exports.Put = Put; exports.Query = Query; exports.Route = Route; exports.Rpc = Rpc; exports.ServiceUnavailableException = _chunkP5LJBZPNjs.ServiceUnavailableException; exports.TimeoutException = _chunkP5LJBZPNjs.TimeoutException; exports.UNMOUNT_SYMBOL = _chunkC36XJ7D3js.UNMOUNT_SYMBOL; exports.UnauthorizedException = _chunkP5LJBZPNjs.UnauthorizedException; exports.UndefinedException = _chunkP5LJBZPNjs.UndefinedException; exports.UnsupportedMediaTypeException = _chunkP5LJBZPNjs.UnsupportedMediaTypeException; exports.ValidateException = _chunkP5LJBZPNjs.ValidateException; exports.addFilter = _chunkP5LJBZPNjs.addFilter; exports.addGuard = _chunkP5LJBZPNjs.addGuard; exports.addInterceptor = _chunkP5LJBZPNjs.addInterceptor; exports.addPipe = _chunkP5LJBZPNjs.addPipe; exports.addPlugin = _chunkP5LJBZPNjs.addPlugin; exports.defaultPipe = _chunkP5LJBZPNjs.defaultPipe; exports.emitter = _chunkANH53I6Bjs.emitter; exports.generateHTTPCode = _chunkANH53I6Bjs.generateHTTPCode; exports.generateRPCCode = _chunkANH53I6Bjs.generateRPCCode; exports.getConfig = _chunkC36XJ7D3js.getConfig; exports.guardRecord = _chunkP5LJBZPNjs.guardRecord; exports.isAopDepInject = _chunkP5LJBZPNjs.isAopDepInject; exports.log = _chunkC36XJ7D3js.log; exports.resolveDep = _chunk2AI7ID6Xjs.resolveDep; exports.setConfig = _chunkC36XJ7D3js.setConfig;
package/dist/index.mjs CHANGED
@@ -5,10 +5,10 @@ import {
5
5
  emitter,
6
6
  generateHTTPCode,
7
7
  generateRPCCode
8
- } from "./chunk-BXJSLR46.mjs";
8
+ } from "./chunk-KKTRNKCF.mjs";
9
9
  import {
10
10
  resolveDep
11
- } from "./chunk-EP4EN3MM.mjs";
11
+ } from "./chunk-MZBE4NIO.mjs";
12
12
  import {
13
13
  BadGatewayException,
14
14
  BadRequestException,
@@ -34,7 +34,7 @@ import {
34
34
  defaultPipe,
35
35
  guardRecord,
36
36
  isAopDepInject
37
- } from "./chunk-DBYLTVRY.mjs";
37
+ } from "./chunk-JJG37LHY.mjs";
38
38
  import {
39
39
  APP_SYMBOL,
40
40
  ERROR_SYMBOL,
@@ -43,6 +43,7 @@ import {
43
43
  MERGE_SYMBOL,
44
44
  META_SYMBOL,
45
45
  MODULE_SYMBOL,
46
+ Mix,
46
47
  PS_FILE_RE,
47
48
  PS_IMPORT_RE,
48
49
  UNMOUNT_SYMBOL,
@@ -50,7 +51,7 @@ import {
50
51
  getConfig,
51
52
  log,
52
53
  setConfig
53
- } from "./chunk-WB437JJ2.mjs";
54
+ } from "./chunk-KGMDCF26.mjs";
54
55
 
55
56
  // src/decorators/index.ts
56
57
  import { SHARE_KEY as SHARE_KEY3, setState as setState4, setVar as setVar4 } from "phecda-core";
@@ -450,6 +451,7 @@ export {
450
451
  META_SYMBOL,
451
452
  MODULE_SYMBOL,
452
453
  Meta,
454
+ Mix,
453
455
  NotFoundException,
454
456
  PAddon,
455
457
  PExtension,
@@ -1,5 +1,5 @@
1
1
  import { Kafka } from 'kafkajs';
2
- import { P, F as Factory, T as ToControllerMap } from '../../core-fe0991cd.js';
2
+ import { P, F as Factory, T as ToControllerMap } from '../../core-39d78b79.js';
3
3
  import 'phecda-core';
4
4
 
5
5
  interface Options {
@@ -2,11 +2,11 @@
2
2
 
3
3
 
4
4
 
5
- var _chunkZV4O77YMjs = require('../../chunk-ZV4O77YM.js');
5
+ var _chunkP5LJBZPNjs = require('../../chunk-P5LJBZPN.js');
6
6
 
7
7
 
8
8
 
9
- var _chunkALJSRZ4Zjs = require('../../chunk-ALJSRZ4Z.js');
9
+ var _chunkC36XJ7D3js = require('../../chunk-C36XJ7D3.js');
10
10
 
11
11
  // src/rpc/kafka/bind.ts
12
12
  async function bind(kafka, topic, { moduleMap, meta }, opts) {
@@ -23,7 +23,7 @@ async function bind(kafka, topic, { moduleMap, meta }, opts) {
23
23
  fromBeginning: true
24
24
  });
25
25
  function handleMeta() {
26
- _chunkZV4O77YMjs.isAopDepInject.call(void 0, meta, {
26
+ _chunkP5LJBZPNjs.isAopDepInject.call(void 0, meta, {
27
27
  guards: globalGuards,
28
28
  interceptors: globalInterceptors
29
29
  });
@@ -33,7 +33,7 @@ async function bind(kafka, topic, { moduleMap, meta }, opts) {
33
33
  metaMap.set(`${name}-${method}`, item);
34
34
  }
35
35
  }
36
- _chunkALJSRZ4Zjs.__name.call(void 0, handleMeta, "handleMeta");
36
+ _chunkC36XJ7D3js.__name.call(void 0, handleMeta, "handleMeta");
37
37
  handleMeta();
38
38
  await consumer.run({
39
39
  eachMessage: async ({ message, partition, topic: topic2, heartbeat, pause }) => {
@@ -46,7 +46,7 @@ async function bind(kafka, topic, { moduleMap, meta }, opts) {
46
46
  messages: [
47
47
  {
48
48
  value: JSON.stringify({
49
- data: new (0, _chunkZV4O77YMjs.BadRequestException)(`service "${tag}" doesn't exist`).data,
49
+ data: new (0, _chunkP5LJBZPNjs.BadRequestException)(`service "${tag}" doesn't exist`).data,
50
50
  error: true,
51
51
  id
52
52
  })
@@ -57,7 +57,7 @@ async function bind(kafka, topic, { moduleMap, meta }, opts) {
57
57
  return;
58
58
  }
59
59
  const meta2 = metaMap.get(tag);
60
- const context = new (0, _chunkZV4O77YMjs.Context)({
60
+ const context = new (0, _chunkP5LJBZPNjs.Context)({
61
61
  type: "kafka",
62
62
  moduleMap,
63
63
  meta: meta2,
@@ -139,13 +139,13 @@ async function bind(kafka, topic, { moduleMap, meta }, opts) {
139
139
  }
140
140
  }
141
141
  });
142
- if (_chunkALJSRZ4Zjs.IS_DEV) {
142
+ if (_chunkC36XJ7D3js.IS_DEV) {
143
143
  _optionalChain([globalThis, 'access', _2 => _2.__PS_HMR__, 'optionalAccess', _3 => _3.push, 'call', _4 => _4(async () => {
144
144
  handleMeta();
145
145
  })]);
146
146
  }
147
147
  }
148
- _chunkALJSRZ4Zjs.__name.call(void 0, bind, "bind");
148
+ _chunkC36XJ7D3js.__name.call(void 0, bind, "bind");
149
149
 
150
150
  // src/rpc/kafka/client.ts
151
151
  var _events = require('events');
@@ -211,7 +211,7 @@ async function createClient(kafka, topic, controllers) {
211
211
  }
212
212
  return ret;
213
213
  }
214
- _chunkALJSRZ4Zjs.__name.call(void 0, createClient, "createClient");
214
+ _chunkC36XJ7D3js.__name.call(void 0, createClient, "createClient");
215
215
 
216
216
 
217
217
 
@@ -2,11 +2,11 @@ import {
2
2
  BadRequestException,
3
3
  Context,
4
4
  isAopDepInject
5
- } from "../../chunk-DBYLTVRY.mjs";
5
+ } from "../../chunk-JJG37LHY.mjs";
6
6
  import {
7
7
  IS_DEV,
8
8
  __name
9
- } from "../../chunk-WB437JJ2.mjs";
9
+ } from "../../chunk-KGMDCF26.mjs";
10
10
 
11
11
  // src/rpc/kafka/bind.ts
12
12
  async function bind(kafka, topic, { moduleMap, meta }, opts) {
@@ -1,5 +1,5 @@
1
1
  import amqplib from 'amqplib';
2
- import { P, F as Factory, T as ToControllerMap } from '../../core-fe0991cd.js';
2
+ import { P, F as Factory, T as ToControllerMap } from '../../core-39d78b79.js';
3
3
  import 'phecda-core';
4
4
 
5
5
  interface Options {
@@ -2,11 +2,11 @@
2
2
 
3
3
 
4
4
 
5
- var _chunkZV4O77YMjs = require('../../chunk-ZV4O77YM.js');
5
+ var _chunkP5LJBZPNjs = require('../../chunk-P5LJBZPN.js');
6
6
 
7
7
 
8
8
 
9
- var _chunkALJSRZ4Zjs = require('../../chunk-ALJSRZ4Z.js');
9
+ var _chunkC36XJ7D3js = require('../../chunk-C36XJ7D3.js');
10
10
 
11
11
  // src/rpc/rabbitmq/bind.ts
12
12
  async function bind(ch, queue, { moduleMap, meta }, opts) {
@@ -14,7 +14,7 @@ async function bind(ch, queue, { moduleMap, meta }, opts) {
14
14
  const existQueue = /* @__PURE__ */ new Set();
15
15
  const { globalGuards = [], globalInterceptors = [] } = opts || {};
16
16
  function handleMeta() {
17
- _chunkZV4O77YMjs.isAopDepInject.call(void 0, meta, {
17
+ _chunkP5LJBZPNjs.isAopDepInject.call(void 0, meta, {
18
18
  guards: globalGuards,
19
19
  interceptors: globalInterceptors
20
20
  });
@@ -24,7 +24,7 @@ async function bind(ch, queue, { moduleMap, meta }, opts) {
24
24
  metaMap.set(`${name}-${method}`, item);
25
25
  }
26
26
  }
27
- _chunkALJSRZ4Zjs.__name.call(void 0, handleMeta, "handleMeta");
27
+ _chunkC36XJ7D3js.__name.call(void 0, handleMeta, "handleMeta");
28
28
  handleMeta();
29
29
  await ch.assertQueue(queue);
30
30
  ch.consume(queue, async (msg) => {
@@ -35,14 +35,14 @@ async function bind(ch, queue, { moduleMap, meta }, opts) {
35
35
  await ch.assertQueue(queue2);
36
36
  if (!metaMap.has(tag)) {
37
37
  queue2 && ch.sendToQueue(queue2, Buffer.from(JSON.stringify({
38
- data: new (0, _chunkZV4O77YMjs.BadRequestException)(`service "${tag}" doesn't exist`).data,
38
+ data: new (0, _chunkP5LJBZPNjs.BadRequestException)(`service "${tag}" doesn't exist`).data,
39
39
  error: true,
40
40
  id
41
41
  })));
42
42
  return;
43
43
  }
44
44
  const meta2 = metaMap.get(tag);
45
- const context = new (0, _chunkZV4O77YMjs.Context)({
45
+ const context = new (0, _chunkP5LJBZPNjs.Context)({
46
46
  type: "rabbitmq",
47
47
  moduleMap,
48
48
  meta: meta2,
@@ -101,13 +101,13 @@ async function bind(ch, queue, { moduleMap, meta }, opts) {
101
101
  }, {
102
102
  noAck: true
103
103
  });
104
- if (_chunkALJSRZ4Zjs.IS_DEV) {
104
+ if (_chunkC36XJ7D3js.IS_DEV) {
105
105
  _optionalChain([globalThis, 'access', _2 => _2.__PS_HMR__, 'optionalAccess', _3 => _3.push, 'call', _4 => _4(async () => {
106
106
  handleMeta();
107
107
  })]);
108
108
  }
109
109
  }
110
- _chunkALJSRZ4Zjs.__name.call(void 0, bind, "bind");
110
+ _chunkC36XJ7D3js.__name.call(void 0, bind, "bind");
111
111
 
112
112
  // src/rpc/rabbitmq/client.ts
113
113
  var _events = require('events');
@@ -155,7 +155,7 @@ async function createClient(ch, queue, controllers) {
155
155
  }
156
156
  return ret;
157
157
  }
158
- _chunkALJSRZ4Zjs.__name.call(void 0, createClient, "createClient");
158
+ _chunkC36XJ7D3js.__name.call(void 0, createClient, "createClient");
159
159
 
160
160
 
161
161
 
@@ -2,11 +2,11 @@ import {
2
2
  BadRequestException,
3
3
  Context,
4
4
  isAopDepInject
5
- } from "../../chunk-DBYLTVRY.mjs";
5
+ } from "../../chunk-JJG37LHY.mjs";
6
6
  import {
7
7
  IS_DEV,
8
8
  __name
9
- } from "../../chunk-WB437JJ2.mjs";
9
+ } from "../../chunk-KGMDCF26.mjs";
10
10
 
11
11
  // src/rpc/rabbitmq/bind.ts
12
12
  async function bind(ch, queue, { moduleMap, meta }, opts) {
@@ -1,5 +1,5 @@
1
1
  import Redis from 'ioredis';
2
- import { P, F as Factory, T as ToControllerMap } from '../../core-fe0991cd.js';
2
+ import { P, F as Factory, T as ToControllerMap } from '../../core-39d78b79.js';
3
3
  import 'phecda-core';
4
4
 
5
5
  interface Options {
@@ -2,11 +2,11 @@
2
2
 
3
3
 
4
4
 
5
- var _chunkZV4O77YMjs = require('../../chunk-ZV4O77YM.js');
5
+ var _chunkP5LJBZPNjs = require('../../chunk-P5LJBZPN.js');
6
6
 
7
7
 
8
8
 
9
- var _chunkALJSRZ4Zjs = require('../../chunk-ALJSRZ4Z.js');
9
+ var _chunkC36XJ7D3js = require('../../chunk-C36XJ7D3.js');
10
10
 
11
11
  // src/rpc/redis/bind.ts
12
12
  var _ioredis = require('ioredis'); var _ioredis2 = _interopRequireDefault(_ioredis);
@@ -15,7 +15,7 @@ function bind(redis, channel, { moduleMap, meta }, opts) {
15
15
  const pub = new (0, _ioredis2.default)(redis.options);
16
16
  const { globalGuards = [], globalInterceptors = [] } = opts || {};
17
17
  function handleMeta() {
18
- _chunkZV4O77YMjs.isAopDepInject.call(void 0, meta, {
18
+ _chunkP5LJBZPNjs.isAopDepInject.call(void 0, meta, {
19
19
  guards: globalGuards,
20
20
  interceptors: globalInterceptors
21
21
  });
@@ -25,7 +25,7 @@ function bind(redis, channel, { moduleMap, meta }, opts) {
25
25
  metaMap.set(`${name}-${method}`, item);
26
26
  }
27
27
  }
28
- _chunkALJSRZ4Zjs.__name.call(void 0, handleMeta, "handleMeta");
28
+ _chunkC36XJ7D3js.__name.call(void 0, handleMeta, "handleMeta");
29
29
  handleMeta();
30
30
  redis.subscribe(channel);
31
31
  redis.on("message", async (channel2, msg) => {
@@ -34,14 +34,14 @@ function bind(redis, channel, { moduleMap, meta }, opts) {
34
34
  const { tag, args, id, queue } = data;
35
35
  if (!metaMap.has(tag)) {
36
36
  queue && pub.publish(queue, JSON.stringify({
37
- data: new (0, _chunkZV4O77YMjs.BadRequestException)(`service "${tag}" doesn't exist`).data,
37
+ data: new (0, _chunkP5LJBZPNjs.BadRequestException)(`service "${tag}" doesn't exist`).data,
38
38
  error: true,
39
39
  id
40
40
  }));
41
41
  return;
42
42
  }
43
43
  const meta2 = metaMap.get(tag);
44
- const context = new (0, _chunkZV4O77YMjs.Context)({
44
+ const context = new (0, _chunkP5LJBZPNjs.Context)({
45
45
  type: "redis",
46
46
  moduleMap,
47
47
  redis,
@@ -96,13 +96,13 @@ function bind(redis, channel, { moduleMap, meta }, opts) {
96
96
  }
97
97
  }
98
98
  });
99
- if (_chunkALJSRZ4Zjs.IS_DEV) {
99
+ if (_chunkC36XJ7D3js.IS_DEV) {
100
100
  _optionalChain([globalThis, 'access', _3 => _3.__PS_HMR__, 'optionalAccess', _4 => _4.push, 'call', _5 => _5(async () => {
101
101
  handleMeta();
102
102
  })]);
103
103
  }
104
104
  }
105
- _chunkALJSRZ4Zjs.__name.call(void 0, bind, "bind");
105
+ _chunkC36XJ7D3js.__name.call(void 0, bind, "bind");
106
106
 
107
107
  // src/rpc/redis/client.ts
108
108
  var _crypto = require('crypto');
@@ -150,7 +150,7 @@ function createClient(redis, queue, controllers) {
150
150
  }
151
151
  return ret;
152
152
  }
153
- _chunkALJSRZ4Zjs.__name.call(void 0, createClient, "createClient");
153
+ _chunkC36XJ7D3js.__name.call(void 0, createClient, "createClient");
154
154
 
155
155
 
156
156