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

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-CLW7EYYD.js → chunk-27WMBKFH.js} +30 -23
  2. package/dist/{chunk-WB437JJ2.mjs → chunk-DJO45NRZ.mjs} +17 -3
  3. package/dist/{chunk-ALJSRZ4Z.js → chunk-GWLM5DEJ.js} +17 -3
  4. package/dist/{chunk-EP4EN3MM.mjs → chunk-HQ5RLYMA.mjs} +1 -1
  5. package/dist/{chunk-ZV4O77YM.js → chunk-KOWUK5OV.js} +65 -61
  6. package/dist/{chunk-DBYLTVRY.mjs → chunk-L5SFPHG6.mjs} +25 -21
  7. package/dist/{chunk-GY5KXMJJ.js → chunk-SSZS3GSQ.js} +2 -2
  8. package/dist/{chunk-BXJSLR46.mjs → chunk-UXPHQ7OT.mjs} +9 -2
  9. package/dist/{core-fe0991cd.d.ts → core-295348b7.d.ts} +3 -1
  10. package/dist/index.d.ts +14 -12
  11. package/dist/index.js +66 -62
  12. package/dist/index.mjs +20 -16
  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 +3 -3
  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 +3 -3
  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 +3 -3
  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 +4 -4
  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 +4 -4
  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 +4 -4
  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 +4 -4
  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
@@ -5,7 +5,7 @@ import {
5
5
  __name,
6
6
  __publicField,
7
7
  log
8
- } from "./chunk-WB437JJ2.mjs";
8
+ } from "./chunk-DJO45NRZ.mjs";
9
9
 
10
10
  // src/exception/base.ts
11
11
  var Exception = class extends Error {
@@ -169,16 +169,12 @@ import pc from "picocolors";
169
169
  // src/filter.ts
170
170
  var defaultFilter = /* @__PURE__ */ __name((e) => {
171
171
  if (!(e instanceof Exception)) {
172
- if (IS_DEV) {
173
- log(e.message, "error");
174
- console.error(e.stack);
175
- }
172
+ log(e.message, "error");
173
+ console.error(e.stack);
176
174
  e = new UndefinedException(e.message || e);
177
175
  } else {
178
- if (IS_DEV) {
179
- log(`[${e.constructor.name}] ${e.message}`, "error");
180
- console.error(e.stack);
181
- }
176
+ log(`[${e.constructor.name}] ${e.message}`, "error");
177
+ console.error(e.stack);
182
178
  }
183
179
  return e.data;
184
180
  }, "defaultFilter");
@@ -272,12 +268,12 @@ var _Context = class {
272
268
  static usePlugin(plugins) {
273
269
  const ret = [];
274
270
  for (const m of plugins) {
275
- if (!(m in _Context.pluginRecord)) {
271
+ if (!(m in _Context.addonRecord)) {
276
272
  if (IS_STRICT)
277
273
  throw new FrameworkException(`can't find middleware named '${m}'`);
278
274
  continue;
279
275
  }
280
- ret.push(_Context.pluginRecord[m]);
276
+ ret.push(_Context.addonRecord[m]);
281
277
  }
282
278
  return ret;
283
279
  }
@@ -292,30 +288,38 @@ __publicField(Context, "pipeRecord", {
292
288
  });
293
289
  __publicField(Context, "guardRecord", {});
294
290
  __publicField(Context, "interceptorRecord", {});
295
- __publicField(Context, "pluginRecord", {});
296
- function addPlugin(key, handler) {
297
- Context.pluginRecord[key] = handler;
291
+ __publicField(Context, "addonRecord", {});
292
+ function addAddon(key, handler) {
293
+ if (Context.addonRecord[key] && Context.addonRecord[key] !== handler)
294
+ log(`overwrite Addon "${key}"`, "warn");
295
+ Context.addonRecord[key] = handler;
298
296
  }
299
- __name(addPlugin, "addPlugin");
300
- function addPipe(key, pipe) {
301
- Context.pipeRecord[key] = pipe;
297
+ __name(addAddon, "addAddon");
298
+ function addPipe(key, handler) {
299
+ if (Context.pipeRecord[key] && Context.pipeRecord[key] !== handler)
300
+ log(`overwrite Pipe "${key}"`, "warn");
301
+ Context.pipeRecord[key] = handler;
302
302
  }
303
303
  __name(addPipe, "addPipe");
304
304
  function addFilter(key, handler) {
305
+ if (Context.filterRecord[key] && Context.filterRecord[key] !== handler)
306
+ log(`overwrite Filter "${key}"`, "warn");
305
307
  Context.filterRecord[key] = handler;
306
308
  }
307
309
  __name(addFilter, "addFilter");
308
310
  function addGuard(key, handler) {
311
+ if (Context.guardRecord[key] && Context.guardRecord[key] !== handler)
312
+ log(`overwrite Guard "${key}"`, "warn");
309
313
  Context.guardRecord[key] = handler;
310
314
  }
311
315
  __name(addGuard, "addGuard");
312
316
  function addInterceptor(key, handler) {
317
+ if (Context.interceptorRecord[key] && Context.interceptorRecord[key] !== handler)
318
+ log(`overwrite Interceptor "${key}"`, "warn");
313
319
  Context.interceptorRecord[key] = handler;
314
320
  }
315
321
  __name(addInterceptor, "addInterceptor");
316
322
  function isAopDepInject(meta, { guards, interceptors, plugins } = {}) {
317
- if (!IS_DEV)
318
- return;
319
323
  const pluginSet = new Set(plugins);
320
324
  const guardSet = new Set(guards);
321
325
  const interceptorSet = new Set(interceptors);
@@ -334,7 +338,7 @@ function isAopDepInject(meta, { guards, interceptors, plugins } = {}) {
334
338
  });
335
339
  const missPlugins = [
336
340
  ...pluginSet
337
- ].filter((i) => !Context.pluginRecord[i]);
341
+ ].filter((i) => !Context.addonRecord[i]);
338
342
  const missGuards = [
339
343
  ...guardSet
340
344
  ].filter((i) => !Context.guardRecord[i]);
@@ -379,7 +383,7 @@ export {
379
383
  FrameworkException,
380
384
  guardRecord,
381
385
  Context,
382
- addPlugin,
386
+ addAddon,
383
387
  addPipe,
384
388
  addFilter,
385
389
  addGuard,
@@ -1,6 +1,6 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
2
2
 
3
- var _chunkALJSRZ4Zjs = require('./chunk-ALJSRZ4Z.js');
3
+ var _chunkGWLM5DEJjs = require('./chunk-GWLM5DEJ.js');
4
4
 
5
5
  // src/helper.ts
6
6
  function resolveDep(ret, key) {
@@ -8,7 +8,7 @@ function resolveDep(ret, key) {
8
8
  return _optionalChain([ret, 'optionalAccess', _ => _[key]]);
9
9
  return ret;
10
10
  }
11
- _chunkALJSRZ4Zjs.__name.call(void 0, resolveDep, "resolveDep");
11
+ _chunkGWLM5DEJjs.__name.call(void 0, resolveDep, "resolveDep");
12
12
 
13
13
 
14
14
 
@@ -3,7 +3,7 @@ import {
3
3
  UNMOUNT_SYMBOL,
4
4
  __name,
5
5
  log
6
- } from "./chunk-WB437JJ2.mjs";
6
+ } from "./chunk-DJO45NRZ.mjs";
7
7
 
8
8
  // src/meta.ts
9
9
  var Meta = class {
@@ -151,6 +151,12 @@ async function Factory(Modules, opts = {}) {
151
151
  return instance;
152
152
  }
153
153
  __name(del, "del");
154
+ async function destroy() {
155
+ debug("destroy all");
156
+ for (const [tag] of moduleMap)
157
+ await del(tag);
158
+ }
159
+ __name(destroy, "destroy");
154
160
  async function add(Module) {
155
161
  const tag = Module.prototype?.__TAG__ || Module.name;
156
162
  const oldInstance = await del(tag);
@@ -247,7 +253,8 @@ async function Factory(Modules, opts = {}) {
247
253
  meta,
248
254
  constructorMap,
249
255
  add,
250
- del
256
+ del,
257
+ destroy
251
258
  };
252
259
  }
253
260
  __name(Factory, "Factory");
@@ -20,6 +20,7 @@ declare const META_SYMBOL = "__PS_META__";
20
20
  declare const APP_SYMBOL = "__PS__";
21
21
  declare const IS_DEV: boolean;
22
22
  declare const IS_STRICT: boolean;
23
+ declare const IS_LOG_BAN: boolean;
23
24
  declare const ERROR_SYMBOL = "__PS_ERROR__";
24
25
  declare const PS_FILE_RE: RegExp;
25
26
  declare const PS_IMPORT_RE: RegExp;
@@ -118,6 +119,7 @@ declare function Factory(Modules: (new (...args: any) => any)[], opts?: {
118
119
  constructorMap: Map<any, any>;
119
120
  add: (Module: Construct) => Promise<void>;
120
121
  del: (tag: string) => Promise<any>;
122
+ destroy: () => Promise<void>;
121
123
  }>;
122
124
 
123
- export { APP_SYMBOL as A, Exception as E, Factory as F, Injectable as I, Meta as M, P, RequestType as R, ToControllerMap as T, UNMOUNT_SYMBOL as U, Emitter as a, PickKeysByValue as b, PickFunc as c, MERGE_SYMBOL as d, emitter as e, MODULE_SYMBOL as f, META_SYMBOL as g, IS_DEV as h, IS_STRICT as i, ERROR_SYMBOL as j, PS_FILE_RE as k, PS_IMPORT_RE as l };
125
+ export { APP_SYMBOL as A, Exception as E, Factory as F, Injectable as I, Meta as M, P, RequestType as R, ToControllerMap as T, UNMOUNT_SYMBOL as U, Emitter as a, PickKeysByValue as b, PickFunc as c, MERGE_SYMBOL as d, emitter as e, MODULE_SYMBOL as f, META_SYMBOL as g, IS_DEV as h, IS_STRICT as i, IS_LOG_BAN as j, ERROR_SYMBOL as k, PS_FILE_RE as l, PS_IMPORT_RE as m };
package/dist/index.d.ts CHANGED
@@ -1,5 +1,6 @@
1
- import { E as Exception, P, M as Meta, U as UNMOUNT_SYMBOL } from './core-fe0991cd.js';
2
- export { A as APP_SYMBOL, j as ERROR_SYMBOL, a as Emitter, F as Factory, h as IS_DEV, i as IS_STRICT, I as Injectable, d as MERGE_SYMBOL, g as META_SYMBOL, f as MODULE_SYMBOL, k as PS_FILE_RE, l as PS_IMPORT_RE, c as PickFunc, b as PickKeysByValue, R as RequestType, T as ToControllerMap, e as emitter } from './core-fe0991cd.js';
1
+ import { E as Exception, P, M as Meta, U as UNMOUNT_SYMBOL } from './core-295348b7.js';
2
+ export { A as APP_SYMBOL, k as ERROR_SYMBOL, a as Emitter, F as Factory, h as IS_DEV, j as IS_LOG_BAN, i as IS_STRICT, I as Injectable, d as MERGE_SYMBOL, g as META_SYMBOL, f as MODULE_SYMBOL, l as PS_FILE_RE, m as PS_IMPORT_RE, c as PickFunc, b as PickKeysByValue, R as RequestType, T as ToControllerMap, e as emitter } from './core-295348b7.js';
3
+ import { Construct } from 'phecda-core';
3
4
  export * from 'phecda-core';
4
5
 
5
6
  declare class Histroy {
@@ -74,7 +75,7 @@ declare class Context<Data extends P.BaseContext> {
74
75
  static pipeRecord: Record<string, P.Pipe>;
75
76
  static guardRecord: Record<string, P.Guard>;
76
77
  static interceptorRecord: Record<string, P.Interceptor>;
77
- static pluginRecord: Record<string, any>;
78
+ static addonRecord: Record<string, any>;
78
79
  postInterceptors: Function[];
79
80
  constructor(data: Data);
80
81
  usePipe(args: {
@@ -92,8 +93,8 @@ declare class Context<Data extends P.BaseContext> {
92
93
  useInterceptor(interceptors: string[]): Promise<any>;
93
94
  static usePlugin(plugins: string[]): any[];
94
95
  }
95
- declare function addPlugin<T>(key: string, handler: T): void;
96
- declare function addPipe<C extends P.BaseContext>(key: string, pipe: P.Pipe<C>): void;
96
+ declare function addAddon<T>(key: string, handler: T): void;
97
+ declare function addPipe<C extends P.BaseContext>(key: string, handler: P.Pipe<C>): void;
97
98
  declare function addFilter<C extends P.BaseContext>(key: string, handler: P.Filter<C>): void;
98
99
  declare function addGuard<C extends P.BaseContext>(key: string, handler: P.Guard<C>): void;
99
100
  declare function addInterceptor<C extends P.BaseContext>(key: string, handler: P.Interceptor<C>): void;
@@ -112,11 +113,11 @@ declare function Param(key: string): any;
112
113
  declare function Arg(): any;
113
114
 
114
115
  declare function Route(route: string, type?: string): any;
115
- declare function Get(route: string): any;
116
- declare function Post(route: string): any;
117
- declare function Put(route: string): any;
118
- declare function Patch(route: string): any;
119
- declare function Delete(route: string): any;
116
+ declare function Get(route?: string): any;
117
+ declare function Post(route?: string): any;
118
+ declare function Put(route?: string): any;
119
+ declare function Patch(route?: string): any;
120
+ declare function Delete(route?: string): any;
120
121
  declare function Controller(route?: string): any;
121
122
  declare function Rpc(...types: ('rabbitmq' | 'redis' | 'kafka' | string)[]): (target: any, key?: PropertyKey) => void;
122
123
  declare function Event(isEvent?: boolean): (target: any, key?: PropertyKey) => void;
@@ -187,7 +188,7 @@ interface PExtension<C extends P.BaseContext = any, E extends Exception = Except
187
188
  reflect: any;
188
189
  }, ctx: C): any;
189
190
  filter(error: Error | E, ctx?: C): P.Error;
190
- plugin(...args: any): void;
191
+ addon(...args: any): void;
191
192
  }
192
193
  declare class PExtension extends Dev {
193
194
  readonly key: string;
@@ -201,5 +202,6 @@ declare function generateHTTPCode(meta: P.MetaData[]): string;
201
202
  declare function log(msg: string, level?: 'error' | 'info' | 'warn'): void;
202
203
  declare function getConfig<C = any>(key: string, defaultConf?: C): C;
203
204
  declare function setConfig<C = any>(key: string, conf: C, force?: boolean): void;
205
+ declare function Mix<C1 extends Construct, C2 extends Construct>(InternalClass: C1, ExtendClass: C2): new (...args: ConstructorParameters<C2>) => InstanceType<C1> & InstanceType<C2>;
204
206
 
205
- export { Arg, BadGatewayException, BadRequestException, BaseParam, Body, ConflictException, Context, Controller, Define, Delete, Dev, Event, Exception, Filter, ForbiddenException, FrameworkException, Get, Guard, Head, Header, Interceptor, InvalidInputException, Meta, NotFoundException, P, PAddon, PExtension, PFilter, PGuard, PInterceptor, PPipe, Param, Patch, PayloadLargeException, Pipe, Plugin, Post, Put, Query, Route, Rpc, ServiceUnavailableException, TimeoutException, UNMOUNT_SYMBOL, UnauthorizedException, UndefinedException, UnsupportedMediaTypeException, ValidateException, addFilter, addGuard, addInterceptor, addPipe, addPlugin, defaultPipe, generateHTTPCode, generateRPCCode, getConfig, guardRecord, isAopDepInject, log, resolveDep, setConfig };
207
+ export { Arg, BadGatewayException, BadRequestException, BaseParam, Body, ConflictException, Context, Controller, Define, Delete, Dev, Event, Exception, Filter, ForbiddenException, FrameworkException, Get, Guard, Head, Header, Interceptor, InvalidInputException, Meta, Mix, NotFoundException, P, PAddon, PExtension, PFilter, PGuard, PInterceptor, PPipe, Param, Patch, PayloadLargeException, Pipe, Plugin, Post, Put, Query, Route, Rpc, ServiceUnavailableException, TimeoutException, UNMOUNT_SYMBOL, UnauthorizedException, UndefinedException, UnsupportedMediaTypeException, ValidateException, addAddon, addFilter, addGuard, addInterceptor, addPipe, defaultPipe, generateHTTPCode, generateRPCCode, getConfig, guardRecord, isAopDepInject, log, resolveDep, setConfig };
package/dist/index.js CHANGED
@@ -5,10 +5,10 @@
5
5
 
6
6
 
7
7
 
8
- var _chunkCLW7EYYDjs = require('./chunk-CLW7EYYD.js');
8
+ var _chunk27WMBKFHjs = require('./chunk-27WMBKFH.js');
9
9
 
10
10
 
11
- var _chunkGY5KXMJJjs = require('./chunk-GY5KXMJJ.js');
11
+ var _chunkSSZS3GSQjs = require('./chunk-SSZS3GSQ.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 _chunkKOWUK5OVjs = require('./chunk-KOWUK5OV.js');
38
38
 
39
39
 
40
40
 
@@ -50,7 +50,9 @@ var _chunkZV4O77YMjs = require('./chunk-ZV4O77YM.js');
50
50
 
51
51
 
52
52
 
53
- var _chunkALJSRZ4Zjs = require('./chunk-ALJSRZ4Z.js');
53
+
54
+
55
+ var _chunkGWLM5DEJjs = require('./chunk-GWLM5DEJ.js');
54
56
 
55
57
  // src/decorators/index.ts
56
58
  var _phecdacore = require('phecda-core'); _createStarExport(_phecdacore);
@@ -78,7 +80,7 @@ function BaseParam(type, key) {
78
80
  _phecdacore.setState.call(void 0, target, k, state);
79
81
  };
80
82
  }
81
- _chunkALJSRZ4Zjs.__name.call(void 0, BaseParam, "BaseParam");
83
+ _chunkGWLM5DEJjs.__name.call(void 0, BaseParam, "BaseParam");
82
84
  function Pipe(key, opts) {
83
85
  return (target, k, index) => {
84
86
  _phecdacore.setVar.call(void 0, target, k);
@@ -100,27 +102,27 @@ function Pipe(key, opts) {
100
102
  _phecdacore.setState.call(void 0, target, k, state);
101
103
  };
102
104
  }
103
- _chunkALJSRZ4Zjs.__name.call(void 0, Pipe, "Pipe");
105
+ _chunkGWLM5DEJjs.__name.call(void 0, Pipe, "Pipe");
104
106
  function Body(key = "") {
105
107
  return BaseParam("body", key);
106
108
  }
107
- _chunkALJSRZ4Zjs.__name.call(void 0, Body, "Body");
109
+ _chunkGWLM5DEJjs.__name.call(void 0, Body, "Body");
108
110
  function Head(key) {
109
111
  return BaseParam("headers", key.toLowerCase());
110
112
  }
111
- _chunkALJSRZ4Zjs.__name.call(void 0, Head, "Head");
113
+ _chunkGWLM5DEJjs.__name.call(void 0, Head, "Head");
112
114
  function Query(key = "") {
113
115
  return BaseParam("query", key);
114
116
  }
115
- _chunkALJSRZ4Zjs.__name.call(void 0, Query, "Query");
117
+ _chunkGWLM5DEJjs.__name.call(void 0, Query, "Query");
116
118
  function Param(key) {
117
119
  return BaseParam("params", key);
118
120
  }
119
- _chunkALJSRZ4Zjs.__name.call(void 0, Param, "Param");
121
+ _chunkGWLM5DEJjs.__name.call(void 0, Param, "Param");
120
122
  function Arg() {
121
123
  return BaseParam("params", "");
122
124
  }
123
- _chunkALJSRZ4Zjs.__name.call(void 0, Arg, "Arg");
125
+ _chunkGWLM5DEJjs.__name.call(void 0, Arg, "Arg");
124
126
 
125
127
  // src/decorators/route.ts
126
128
 
@@ -138,31 +140,31 @@ function Route(route, type) {
138
140
  _phecdacore.setState.call(void 0, target, key, state);
139
141
  };
140
142
  }
141
- _chunkALJSRZ4Zjs.__name.call(void 0, Route, "Route");
142
- function Get(route) {
143
+ _chunkGWLM5DEJjs.__name.call(void 0, Route, "Route");
144
+ function Get(route = "") {
143
145
  return Route(route, "get");
144
146
  }
145
- _chunkALJSRZ4Zjs.__name.call(void 0, Get, "Get");
146
- function Post(route) {
147
+ _chunkGWLM5DEJjs.__name.call(void 0, Get, "Get");
148
+ function Post(route = "") {
147
149
  return Route(route, "post");
148
150
  }
149
- _chunkALJSRZ4Zjs.__name.call(void 0, Post, "Post");
150
- function Put(route) {
151
+ _chunkGWLM5DEJjs.__name.call(void 0, Post, "Post");
152
+ function Put(route = "") {
151
153
  return Route(route, "put");
152
154
  }
153
- _chunkALJSRZ4Zjs.__name.call(void 0, Put, "Put");
154
- function Patch(route) {
155
+ _chunkGWLM5DEJjs.__name.call(void 0, Put, "Put");
156
+ function Patch(route = "") {
155
157
  return Route(route, "patch");
156
158
  }
157
- _chunkALJSRZ4Zjs.__name.call(void 0, Patch, "Patch");
158
- function Delete(route) {
159
+ _chunkGWLM5DEJjs.__name.call(void 0, Patch, "Patch");
160
+ function Delete(route = "") {
159
161
  return Route(route, "delete");
160
162
  }
161
- _chunkALJSRZ4Zjs.__name.call(void 0, Delete, "Delete");
163
+ _chunkGWLM5DEJjs.__name.call(void 0, Delete, "Delete");
162
164
  function Controller(route = "") {
163
165
  return Route(route);
164
166
  }
165
- _chunkALJSRZ4Zjs.__name.call(void 0, Controller, "Controller");
167
+ _chunkGWLM5DEJjs.__name.call(void 0, Controller, "Controller");
166
168
  function Rpc(...types) {
167
169
  return (target, key) => {
168
170
  if (!key)
@@ -176,7 +178,7 @@ function Rpc(...types) {
176
178
  _phecdacore.setState.call(void 0, target, key, state);
177
179
  };
178
180
  }
179
- _chunkALJSRZ4Zjs.__name.call(void 0, Rpc, "Rpc");
181
+ _chunkGWLM5DEJjs.__name.call(void 0, Rpc, "Rpc");
180
182
  function Event(isEvent = true) {
181
183
  return (target, key) => {
182
184
  if (!key)
@@ -190,7 +192,7 @@ function Event(isEvent = true) {
190
192
  _phecdacore.setState.call(void 0, target, key, state);
191
193
  };
192
194
  }
193
- _chunkALJSRZ4Zjs.__name.call(void 0, Event, "Event");
195
+ _chunkGWLM5DEJjs.__name.call(void 0, Event, "Event");
194
196
 
195
197
  // src/decorators/aop.ts
196
198
 
@@ -207,7 +209,7 @@ function Guard(...guards) {
207
209
  _phecdacore.setState.call(void 0, target, key, state);
208
210
  };
209
211
  }
210
- _chunkALJSRZ4Zjs.__name.call(void 0, Guard, "Guard");
212
+ _chunkGWLM5DEJjs.__name.call(void 0, Guard, "Guard");
211
213
  function Plugin(...plugins) {
212
214
  return (target, key) => {
213
215
  if (!key)
@@ -221,7 +223,7 @@ function Plugin(...plugins) {
221
223
  _phecdacore.setState.call(void 0, target, key, state);
222
224
  };
223
225
  }
224
- _chunkALJSRZ4Zjs.__name.call(void 0, Plugin, "Plugin");
226
+ _chunkGWLM5DEJjs.__name.call(void 0, Plugin, "Plugin");
225
227
  function Interceptor(...interceptors) {
226
228
  return (target, key) => {
227
229
  if (!key)
@@ -235,7 +237,7 @@ function Interceptor(...interceptors) {
235
237
  _phecdacore.setState.call(void 0, target, key, state);
236
238
  };
237
239
  }
238
- _chunkALJSRZ4Zjs.__name.call(void 0, Interceptor, "Interceptor");
240
+ _chunkGWLM5DEJjs.__name.call(void 0, Interceptor, "Interceptor");
239
241
  function Filter(filter) {
240
242
  return (target, key) => {
241
243
  if (!key)
@@ -247,7 +249,7 @@ function Filter(filter) {
247
249
  _phecdacore.setState.call(void 0, target, key, state);
248
250
  };
249
251
  }
250
- _chunkALJSRZ4Zjs.__name.call(void 0, Filter, "Filter");
252
+ _chunkGWLM5DEJjs.__name.call(void 0, Filter, "Filter");
251
253
 
252
254
  // src/decorators/index.ts
253
255
  function Header(name, value) {
@@ -260,7 +262,7 @@ function Header(name, value) {
260
262
  _phecdacore.setState.call(void 0, target, k, state);
261
263
  };
262
264
  }
263
- _chunkALJSRZ4Zjs.__name.call(void 0, Header, "Header");
265
+ _chunkGWLM5DEJjs.__name.call(void 0, Header, "Header");
264
266
  function Define(key, value) {
265
267
  return (target, k) => {
266
268
  if (!k) {
@@ -275,7 +277,7 @@ function Define(key, value) {
275
277
  _phecdacore.setState.call(void 0, target, k, state);
276
278
  };
277
279
  }
278
- _chunkALJSRZ4Zjs.__name.call(void 0, Define, "Define");
280
+ _chunkGWLM5DEJjs.__name.call(void 0, Define, "Define");
279
281
 
280
282
  // src/index.ts
281
283
 
@@ -292,10 +294,10 @@ var __decorate = function(decorators, target, key, desc) {
292
294
  r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
293
295
  return c > 3 && r && Object.defineProperty(target, key, r), r;
294
296
  };
295
- var Dev = /* @__PURE__ */ _chunkALJSRZ4Zjs.__name.call(void 0, (_class =class Dev2 {constructor() { _class.prototype.__init.call(this); }
296
- __init() {this[_chunkALJSRZ4Zjs.UNMOUNT_SYMBOL] = []}
297
+ var Dev = /* @__PURE__ */ _chunkGWLM5DEJjs.__name.call(void 0, (_class =class Dev2 {constructor() { _class.prototype.__init.call(this); }
298
+ __init() {this[_chunkGWLM5DEJjs.UNMOUNT_SYMBOL] = []}
297
299
  onUnmount(cb) {
298
- this[_chunkALJSRZ4Zjs.UNMOUNT_SYMBOL].push(cb);
300
+ this[_chunkGWLM5DEJjs.UNMOUNT_SYMBOL].push(cb);
299
301
  }
300
302
  }, _class), "Dev");
301
303
  Dev = exports.Dev = __decorate([
@@ -309,13 +311,13 @@ var PFilter = class extends Dev {
309
311
  constructor(tag) {
310
312
  super();
311
313
  this.key = tag || _phecdacore.getTag.call(void 0, this);
312
- _chunkZV4O77YMjs.addFilter.call(void 0, this.key, this.use.bind(this));
314
+ _chunkKOWUK5OVjs.addFilter.call(void 0, this.key, this.use.bind(this));
313
315
  this.onUnmount(() => {
314
- delete _chunkZV4O77YMjs.Context.filterRecord[this.key];
316
+ delete _chunkKOWUK5OVjs.Context.filterRecord[this.key];
315
317
  });
316
318
  }
317
319
  };
318
- _chunkALJSRZ4Zjs.__name.call(void 0, PFilter, "PFilter");
320
+ _chunkGWLM5DEJjs.__name.call(void 0, PFilter, "PFilter");
319
321
 
320
322
  // src/modules/guard.ts
321
323
 
@@ -324,13 +326,13 @@ var PGuard = class extends Dev {
324
326
  constructor(tag) {
325
327
  super();
326
328
  this.key = tag || _phecdacore.getTag.call(void 0, this);
327
- _chunkZV4O77YMjs.addGuard.call(void 0, this.key, this.use.bind(this));
329
+ _chunkKOWUK5OVjs.addGuard.call(void 0, this.key, this.use.bind(this));
328
330
  this.onUnmount(() => {
329
- delete _chunkZV4O77YMjs.Context.guardRecord[this.key];
331
+ delete _chunkKOWUK5OVjs.Context.guardRecord[this.key];
330
332
  });
331
333
  }
332
334
  };
333
- _chunkALJSRZ4Zjs.__name.call(void 0, PGuard, "PGuard");
335
+ _chunkGWLM5DEJjs.__name.call(void 0, PGuard, "PGuard");
334
336
 
335
337
  // src/modules/interceptor.ts
336
338
 
@@ -340,12 +342,12 @@ var PInterceptor = class extends Dev {
340
342
  super();
341
343
  this.key = tag || _phecdacore.getTag.call(void 0, this);
342
344
  this.onUnmount(() => {
343
- delete _chunkZV4O77YMjs.Context.interceptorRecord[this.key];
345
+ delete _chunkKOWUK5OVjs.Context.interceptorRecord[this.key];
344
346
  });
345
- _chunkZV4O77YMjs.addInterceptor.call(void 0, this.key, this.use.bind(this));
347
+ _chunkKOWUK5OVjs.addInterceptor.call(void 0, this.key, this.use.bind(this));
346
348
  }
347
349
  };
348
- _chunkALJSRZ4Zjs.__name.call(void 0, PInterceptor, "PInterceptor");
350
+ _chunkGWLM5DEJjs.__name.call(void 0, PInterceptor, "PInterceptor");
349
351
 
350
352
  // src/modules/pipe.ts
351
353
 
@@ -354,13 +356,13 @@ var PPipe = class extends Dev {
354
356
  constructor(tag) {
355
357
  super();
356
358
  this.key = tag || _phecdacore.getTag.call(void 0, this);
357
- _chunkZV4O77YMjs.addPipe.call(void 0, this.key, this.use.bind(this));
359
+ _chunkKOWUK5OVjs.addPipe.call(void 0, this.key, this.use.bind(this));
358
360
  this.onUnmount(() => {
359
- delete _chunkZV4O77YMjs.Context.pipeRecord[this.key];
361
+ delete _chunkKOWUK5OVjs.Context.pipeRecord[this.key];
360
362
  });
361
363
  }
362
364
  };
363
- _chunkALJSRZ4Zjs.__name.call(void 0, PPipe, "PPipe");
365
+ _chunkGWLM5DEJjs.__name.call(void 0, PPipe, "PPipe");
364
366
 
365
367
  // src/modules/addon.ts
366
368
 
@@ -369,13 +371,13 @@ var PAddon = class extends Dev {
369
371
  constructor(tag) {
370
372
  super();
371
373
  this.key = tag || _phecdacore.getTag.call(void 0, this);
372
- _chunkZV4O77YMjs.addPlugin.call(void 0, this.key, this.use.bind(this));
374
+ _chunkKOWUK5OVjs.addAddon.call(void 0, this.key, this.use.bind(this));
373
375
  this.onUnmount(() => {
374
- delete _chunkZV4O77YMjs.Context.pluginRecord[this.key];
376
+ delete _chunkKOWUK5OVjs.Context.addonRecord[this.key];
375
377
  });
376
378
  }
377
379
  };
378
- _chunkALJSRZ4Zjs.__name.call(void 0, PAddon, "PAddon");
380
+ _chunkGWLM5DEJjs.__name.call(void 0, PAddon, "PAddon");
379
381
 
380
382
  // src/modules/extension.ts
381
383
 
@@ -385,38 +387,40 @@ var PExtension = class extends Dev {
385
387
  super();
386
388
  const key = this.key = tag || _phecdacore.getTag.call(void 0, this);
387
389
  if (this.pipe) {
388
- _chunkZV4O77YMjs.addPipe.call(void 0, key, this.pipe.bind(this));
390
+ _chunkKOWUK5OVjs.addPipe.call(void 0, key, this.pipe.bind(this));
389
391
  this.onUnmount(() => {
390
- delete _chunkZV4O77YMjs.Context.pipeRecord[key];
392
+ delete _chunkKOWUK5OVjs.Context.pipeRecord[key];
391
393
  });
392
394
  }
393
- if (this.plugin) {
394
- _chunkZV4O77YMjs.addPlugin.call(void 0, key, this.plugin.bind(this));
395
+ if (this.addon) {
396
+ _chunkKOWUK5OVjs.addAddon.call(void 0, key, this.addon.bind(this));
395
397
  this.onUnmount(() => {
396
- delete _chunkZV4O77YMjs.Context.pluginRecord[key];
398
+ delete _chunkKOWUK5OVjs.Context.addonRecord[key];
397
399
  });
398
400
  }
399
401
  if (this.intercept) {
400
- _chunkZV4O77YMjs.addInterceptor.call(void 0, key, this.intercept.bind(this));
402
+ _chunkKOWUK5OVjs.addInterceptor.call(void 0, key, this.intercept.bind(this));
401
403
  this.onUnmount(() => {
402
- delete _chunkZV4O77YMjs.Context.interceptorRecord[key];
404
+ delete _chunkKOWUK5OVjs.Context.interceptorRecord[key];
403
405
  });
404
406
  }
405
407
  if (this.guard) {
406
- _chunkZV4O77YMjs.addGuard.call(void 0, key, this.guard.bind(this));
408
+ _chunkKOWUK5OVjs.addGuard.call(void 0, key, this.guard.bind(this));
407
409
  this.onUnmount(() => {
408
- delete _chunkZV4O77YMjs.Context.guardRecord[key];
410
+ delete _chunkKOWUK5OVjs.Context.guardRecord[key];
409
411
  });
410
412
  }
411
413
  if (this.filter) {
412
- _chunkZV4O77YMjs.addFilter.call(void 0, key, this.filter.bind(this));
414
+ _chunkKOWUK5OVjs.addFilter.call(void 0, key, this.filter.bind(this));
413
415
  this.onUnmount(() => {
414
- delete _chunkZV4O77YMjs.Context.filterRecord[key];
416
+ delete _chunkKOWUK5OVjs.Context.filterRecord[key];
415
417
  });
416
418
  }
417
419
  }
418
420
  };
419
- _chunkALJSRZ4Zjs.__name.call(void 0, PExtension, "PExtension");
421
+ _chunkGWLM5DEJjs.__name.call(void 0, PExtension, "PExtension");
422
+
423
+
420
424
 
421
425
 
422
426
 
@@ -491,4 +495,4 @@ _chunkALJSRZ4Zjs.__name.call(void 0, PExtension, "PExtension");
491
495
 
492
496
 
493
497
 
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;
498
+ exports.APP_SYMBOL = _chunkGWLM5DEJjs.APP_SYMBOL; exports.Arg = Arg; exports.BadGatewayException = _chunkKOWUK5OVjs.BadGatewayException; exports.BadRequestException = _chunkKOWUK5OVjs.BadRequestException; exports.BaseParam = BaseParam; exports.Body = Body; exports.ConflictException = _chunkKOWUK5OVjs.ConflictException; exports.Context = _chunkKOWUK5OVjs.Context; exports.Controller = Controller; exports.Define = Define; exports.Delete = Delete; exports.Dev = Dev; exports.ERROR_SYMBOL = _chunkGWLM5DEJjs.ERROR_SYMBOL; exports.Event = Event; exports.Exception = _chunkKOWUK5OVjs.Exception; exports.Factory = _chunk27WMBKFHjs.Factory; exports.Filter = Filter; exports.ForbiddenException = _chunkKOWUK5OVjs.ForbiddenException; exports.FrameworkException = _chunkKOWUK5OVjs.FrameworkException; exports.Get = Get; exports.Guard = Guard; exports.Head = Head; exports.Header = Header; exports.IS_DEV = _chunkGWLM5DEJjs.IS_DEV; exports.IS_LOG_BAN = _chunkGWLM5DEJjs.IS_LOG_BAN; exports.IS_STRICT = _chunkGWLM5DEJjs.IS_STRICT; exports.Injectable = _chunk27WMBKFHjs.Injectable; exports.Interceptor = Interceptor; exports.InvalidInputException = _chunkKOWUK5OVjs.InvalidInputException; exports.MERGE_SYMBOL = _chunkGWLM5DEJjs.MERGE_SYMBOL; exports.META_SYMBOL = _chunkGWLM5DEJjs.META_SYMBOL; exports.MODULE_SYMBOL = _chunkGWLM5DEJjs.MODULE_SYMBOL; exports.Meta = _chunk27WMBKFHjs.Meta; exports.Mix = _chunkGWLM5DEJjs.Mix; exports.NotFoundException = _chunkKOWUK5OVjs.NotFoundException; exports.PAddon = PAddon; exports.PExtension = PExtension; exports.PFilter = PFilter; exports.PGuard = PGuard; exports.PInterceptor = PInterceptor; exports.PPipe = PPipe; exports.PS_FILE_RE = _chunkGWLM5DEJjs.PS_FILE_RE; exports.PS_IMPORT_RE = _chunkGWLM5DEJjs.PS_IMPORT_RE; exports.Param = Param; exports.Patch = Patch; exports.PayloadLargeException = _chunkKOWUK5OVjs.PayloadLargeException; exports.Pipe = Pipe; exports.Plugin = Plugin; exports.Post = Post; exports.Put = Put; exports.Query = Query; exports.Route = Route; exports.Rpc = Rpc; exports.ServiceUnavailableException = _chunkKOWUK5OVjs.ServiceUnavailableException; exports.TimeoutException = _chunkKOWUK5OVjs.TimeoutException; exports.UNMOUNT_SYMBOL = _chunkGWLM5DEJjs.UNMOUNT_SYMBOL; exports.UnauthorizedException = _chunkKOWUK5OVjs.UnauthorizedException; exports.UndefinedException = _chunkKOWUK5OVjs.UndefinedException; exports.UnsupportedMediaTypeException = _chunkKOWUK5OVjs.UnsupportedMediaTypeException; exports.ValidateException = _chunkKOWUK5OVjs.ValidateException; exports.addAddon = _chunkKOWUK5OVjs.addAddon; exports.addFilter = _chunkKOWUK5OVjs.addFilter; exports.addGuard = _chunkKOWUK5OVjs.addGuard; exports.addInterceptor = _chunkKOWUK5OVjs.addInterceptor; exports.addPipe = _chunkKOWUK5OVjs.addPipe; exports.defaultPipe = _chunkKOWUK5OVjs.defaultPipe; exports.emitter = _chunk27WMBKFHjs.emitter; exports.generateHTTPCode = _chunk27WMBKFHjs.generateHTTPCode; exports.generateRPCCode = _chunk27WMBKFHjs.generateRPCCode; exports.getConfig = _chunkGWLM5DEJjs.getConfig; exports.guardRecord = _chunkKOWUK5OVjs.guardRecord; exports.isAopDepInject = _chunkKOWUK5OVjs.isAopDepInject; exports.log = _chunkGWLM5DEJjs.log; exports.resolveDep = _chunkSSZS3GSQjs.resolveDep; exports.setConfig = _chunkGWLM5DEJjs.setConfig;