phecda-server 5.0.0-alpha.11 → 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-ANH53I6B.js → chunk-27WMBKFH.js} +23 -23
  2. package/dist/{chunk-KGMDCF26.mjs → chunk-DJO45NRZ.mjs} +6 -2
  3. package/dist/{chunk-C36XJ7D3.js → chunk-GWLM5DEJ.js} +7 -3
  4. package/dist/{chunk-MZBE4NIO.mjs → chunk-HQ5RLYMA.mjs} +1 -1
  5. package/dist/{chunk-P5LJBZPN.js → chunk-KOWUK5OV.js} +65 -61
  6. package/dist/{chunk-JJG37LHY.mjs → chunk-L5SFPHG6.mjs} +25 -21
  7. package/dist/{chunk-2AI7ID6X.js → chunk-SSZS3GSQ.js} +2 -2
  8. package/dist/{chunk-KKTRNKCF.mjs → chunk-UXPHQ7OT.mjs} +1 -1
  9. package/dist/{core-39d78b79.d.ts → core-295348b7.d.ts} +2 -1
  10. package/dist/index.d.ts +12 -12
  11. package/dist/index.js +64 -62
  12. package/dist/index.mjs +18 -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-KGMDCF26.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 _chunkC36XJ7D3js = require('./chunk-C36XJ7D3.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
- _chunkC36XJ7D3js.__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-KGMDCF26.mjs";
6
+ } from "./chunk-DJO45NRZ.mjs";
7
7
 
8
8
  // src/meta.ts
9
9
  var Meta = class {
@@ -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;
@@ -121,4 +122,4 @@ declare function Factory(Modules: (new (...args: any) => any)[], opts?: {
121
122
  destroy: () => Promise<void>;
122
123
  }>;
123
124
 
124
- 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,5 @@
1
- import { E as Exception, P, M as Meta, U as UNMOUNT_SYMBOL } from './core-39d78b79.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-39d78b79.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
3
  import { Construct } from 'phecda-core';
4
4
  export * from 'phecda-core';
5
5
 
@@ -75,7 +75,7 @@ declare class Context<Data extends P.BaseContext> {
75
75
  static pipeRecord: Record<string, P.Pipe>;
76
76
  static guardRecord: Record<string, P.Guard>;
77
77
  static interceptorRecord: Record<string, P.Interceptor>;
78
- static pluginRecord: Record<string, any>;
78
+ static addonRecord: Record<string, any>;
79
79
  postInterceptors: Function[];
80
80
  constructor(data: Data);
81
81
  usePipe(args: {
@@ -93,8 +93,8 @@ declare class Context<Data extends P.BaseContext> {
93
93
  useInterceptor(interceptors: string[]): Promise<any>;
94
94
  static usePlugin(plugins: string[]): any[];
95
95
  }
96
- declare function addPlugin<T>(key: string, handler: T): void;
97
- 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;
98
98
  declare function addFilter<C extends P.BaseContext>(key: string, handler: P.Filter<C>): void;
99
99
  declare function addGuard<C extends P.BaseContext>(key: string, handler: P.Guard<C>): void;
100
100
  declare function addInterceptor<C extends P.BaseContext>(key: string, handler: P.Interceptor<C>): void;
@@ -113,11 +113,11 @@ declare function Param(key: string): any;
113
113
  declare function Arg(): any;
114
114
 
115
115
  declare function Route(route: string, type?: 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;
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;
121
121
  declare function Controller(route?: string): any;
122
122
  declare function Rpc(...types: ('rabbitmq' | 'redis' | 'kafka' | string)[]): (target: any, key?: PropertyKey) => void;
123
123
  declare function Event(isEvent?: boolean): (target: any, key?: PropertyKey) => void;
@@ -188,7 +188,7 @@ interface PExtension<C extends P.BaseContext = any, E extends Exception = Except
188
188
  reflect: any;
189
189
  }, ctx: C): any;
190
190
  filter(error: Error | E, ctx?: C): P.Error;
191
- plugin(...args: any): void;
191
+ addon(...args: any): void;
192
192
  }
193
193
  declare class PExtension extends Dev {
194
194
  readonly key: string;
@@ -204,4 +204,4 @@ declare function getConfig<C = any>(key: string, defaultConf?: C): C;
204
204
  declare function setConfig<C = any>(key: string, conf: C, force?: boolean): void;
205
205
  declare function Mix<C1 extends Construct, C2 extends Construct>(InternalClass: C1, ExtendClass: C2): new (...args: ConstructorParameters<C2>) => InstanceType<C1> & InstanceType<C2>;
206
206
 
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, 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 _chunkANH53I6Bjs = require('./chunk-ANH53I6B.js');
8
+ var _chunk27WMBKFHjs = require('./chunk-27WMBKFH.js');
9
9
 
10
10
 
11
- var _chunk2AI7ID6Xjs = require('./chunk-2AI7ID6X.js');
11
+ var _chunkSSZS3GSQjs = require('./chunk-SSZS3GSQ.js');
12
12
 
13
13
 
14
14
 
@@ -34,7 +34,7 @@ var _chunk2AI7ID6Xjs = require('./chunk-2AI7ID6X.js');
34
34
 
35
35
 
36
36
 
37
- var _chunkP5LJBZPNjs = require('./chunk-P5LJBZPN.js');
37
+ var _chunkKOWUK5OVjs = require('./chunk-KOWUK5OV.js');
38
38
 
39
39
 
40
40
 
@@ -51,7 +51,8 @@ var _chunkP5LJBZPNjs = require('./chunk-P5LJBZPN.js');
51
51
 
52
52
 
53
53
 
54
- var _chunkC36XJ7D3js = require('./chunk-C36XJ7D3.js');
54
+
55
+ var _chunkGWLM5DEJjs = require('./chunk-GWLM5DEJ.js');
55
56
 
56
57
  // src/decorators/index.ts
57
58
  var _phecdacore = require('phecda-core'); _createStarExport(_phecdacore);
@@ -79,7 +80,7 @@ function BaseParam(type, key) {
79
80
  _phecdacore.setState.call(void 0, target, k, state);
80
81
  };
81
82
  }
82
- _chunkC36XJ7D3js.__name.call(void 0, BaseParam, "BaseParam");
83
+ _chunkGWLM5DEJjs.__name.call(void 0, BaseParam, "BaseParam");
83
84
  function Pipe(key, opts) {
84
85
  return (target, k, index) => {
85
86
  _phecdacore.setVar.call(void 0, target, k);
@@ -101,27 +102,27 @@ function Pipe(key, opts) {
101
102
  _phecdacore.setState.call(void 0, target, k, state);
102
103
  };
103
104
  }
104
- _chunkC36XJ7D3js.__name.call(void 0, Pipe, "Pipe");
105
+ _chunkGWLM5DEJjs.__name.call(void 0, Pipe, "Pipe");
105
106
  function Body(key = "") {
106
107
  return BaseParam("body", key);
107
108
  }
108
- _chunkC36XJ7D3js.__name.call(void 0, Body, "Body");
109
+ _chunkGWLM5DEJjs.__name.call(void 0, Body, "Body");
109
110
  function Head(key) {
110
111
  return BaseParam("headers", key.toLowerCase());
111
112
  }
112
- _chunkC36XJ7D3js.__name.call(void 0, Head, "Head");
113
+ _chunkGWLM5DEJjs.__name.call(void 0, Head, "Head");
113
114
  function Query(key = "") {
114
115
  return BaseParam("query", key);
115
116
  }
116
- _chunkC36XJ7D3js.__name.call(void 0, Query, "Query");
117
+ _chunkGWLM5DEJjs.__name.call(void 0, Query, "Query");
117
118
  function Param(key) {
118
119
  return BaseParam("params", key);
119
120
  }
120
- _chunkC36XJ7D3js.__name.call(void 0, Param, "Param");
121
+ _chunkGWLM5DEJjs.__name.call(void 0, Param, "Param");
121
122
  function Arg() {
122
123
  return BaseParam("params", "");
123
124
  }
124
- _chunkC36XJ7D3js.__name.call(void 0, Arg, "Arg");
125
+ _chunkGWLM5DEJjs.__name.call(void 0, Arg, "Arg");
125
126
 
126
127
  // src/decorators/route.ts
127
128
 
@@ -139,31 +140,31 @@ function Route(route, type) {
139
140
  _phecdacore.setState.call(void 0, target, key, state);
140
141
  };
141
142
  }
142
- _chunkC36XJ7D3js.__name.call(void 0, Route, "Route");
143
- function Get(route) {
143
+ _chunkGWLM5DEJjs.__name.call(void 0, Route, "Route");
144
+ function Get(route = "") {
144
145
  return Route(route, "get");
145
146
  }
146
- _chunkC36XJ7D3js.__name.call(void 0, Get, "Get");
147
- function Post(route) {
147
+ _chunkGWLM5DEJjs.__name.call(void 0, Get, "Get");
148
+ function Post(route = "") {
148
149
  return Route(route, "post");
149
150
  }
150
- _chunkC36XJ7D3js.__name.call(void 0, Post, "Post");
151
- function Put(route) {
151
+ _chunkGWLM5DEJjs.__name.call(void 0, Post, "Post");
152
+ function Put(route = "") {
152
153
  return Route(route, "put");
153
154
  }
154
- _chunkC36XJ7D3js.__name.call(void 0, Put, "Put");
155
- function Patch(route) {
155
+ _chunkGWLM5DEJjs.__name.call(void 0, Put, "Put");
156
+ function Patch(route = "") {
156
157
  return Route(route, "patch");
157
158
  }
158
- _chunkC36XJ7D3js.__name.call(void 0, Patch, "Patch");
159
- function Delete(route) {
159
+ _chunkGWLM5DEJjs.__name.call(void 0, Patch, "Patch");
160
+ function Delete(route = "") {
160
161
  return Route(route, "delete");
161
162
  }
162
- _chunkC36XJ7D3js.__name.call(void 0, Delete, "Delete");
163
+ _chunkGWLM5DEJjs.__name.call(void 0, Delete, "Delete");
163
164
  function Controller(route = "") {
164
165
  return Route(route);
165
166
  }
166
- _chunkC36XJ7D3js.__name.call(void 0, Controller, "Controller");
167
+ _chunkGWLM5DEJjs.__name.call(void 0, Controller, "Controller");
167
168
  function Rpc(...types) {
168
169
  return (target, key) => {
169
170
  if (!key)
@@ -177,7 +178,7 @@ function Rpc(...types) {
177
178
  _phecdacore.setState.call(void 0, target, key, state);
178
179
  };
179
180
  }
180
- _chunkC36XJ7D3js.__name.call(void 0, Rpc, "Rpc");
181
+ _chunkGWLM5DEJjs.__name.call(void 0, Rpc, "Rpc");
181
182
  function Event(isEvent = true) {
182
183
  return (target, key) => {
183
184
  if (!key)
@@ -191,7 +192,7 @@ function Event(isEvent = true) {
191
192
  _phecdacore.setState.call(void 0, target, key, state);
192
193
  };
193
194
  }
194
- _chunkC36XJ7D3js.__name.call(void 0, Event, "Event");
195
+ _chunkGWLM5DEJjs.__name.call(void 0, Event, "Event");
195
196
 
196
197
  // src/decorators/aop.ts
197
198
 
@@ -208,7 +209,7 @@ function Guard(...guards) {
208
209
  _phecdacore.setState.call(void 0, target, key, state);
209
210
  };
210
211
  }
211
- _chunkC36XJ7D3js.__name.call(void 0, Guard, "Guard");
212
+ _chunkGWLM5DEJjs.__name.call(void 0, Guard, "Guard");
212
213
  function Plugin(...plugins) {
213
214
  return (target, key) => {
214
215
  if (!key)
@@ -222,7 +223,7 @@ function Plugin(...plugins) {
222
223
  _phecdacore.setState.call(void 0, target, key, state);
223
224
  };
224
225
  }
225
- _chunkC36XJ7D3js.__name.call(void 0, Plugin, "Plugin");
226
+ _chunkGWLM5DEJjs.__name.call(void 0, Plugin, "Plugin");
226
227
  function Interceptor(...interceptors) {
227
228
  return (target, key) => {
228
229
  if (!key)
@@ -236,7 +237,7 @@ function Interceptor(...interceptors) {
236
237
  _phecdacore.setState.call(void 0, target, key, state);
237
238
  };
238
239
  }
239
- _chunkC36XJ7D3js.__name.call(void 0, Interceptor, "Interceptor");
240
+ _chunkGWLM5DEJjs.__name.call(void 0, Interceptor, "Interceptor");
240
241
  function Filter(filter) {
241
242
  return (target, key) => {
242
243
  if (!key)
@@ -248,7 +249,7 @@ function Filter(filter) {
248
249
  _phecdacore.setState.call(void 0, target, key, state);
249
250
  };
250
251
  }
251
- _chunkC36XJ7D3js.__name.call(void 0, Filter, "Filter");
252
+ _chunkGWLM5DEJjs.__name.call(void 0, Filter, "Filter");
252
253
 
253
254
  // src/decorators/index.ts
254
255
  function Header(name, value) {
@@ -261,7 +262,7 @@ function Header(name, value) {
261
262
  _phecdacore.setState.call(void 0, target, k, state);
262
263
  };
263
264
  }
264
- _chunkC36XJ7D3js.__name.call(void 0, Header, "Header");
265
+ _chunkGWLM5DEJjs.__name.call(void 0, Header, "Header");
265
266
  function Define(key, value) {
266
267
  return (target, k) => {
267
268
  if (!k) {
@@ -276,7 +277,7 @@ function Define(key, value) {
276
277
  _phecdacore.setState.call(void 0, target, k, state);
277
278
  };
278
279
  }
279
- _chunkC36XJ7D3js.__name.call(void 0, Define, "Define");
280
+ _chunkGWLM5DEJjs.__name.call(void 0, Define, "Define");
280
281
 
281
282
  // src/index.ts
282
283
 
@@ -293,10 +294,10 @@ var __decorate = function(decorators, target, key, desc) {
293
294
  r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
294
295
  return c > 3 && r && Object.defineProperty(target, key, r), r;
295
296
  };
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
+ var Dev = /* @__PURE__ */ _chunkGWLM5DEJjs.__name.call(void 0, (_class =class Dev2 {constructor() { _class.prototype.__init.call(this); }
298
+ __init() {this[_chunkGWLM5DEJjs.UNMOUNT_SYMBOL] = []}
298
299
  onUnmount(cb) {
299
- this[_chunkC36XJ7D3js.UNMOUNT_SYMBOL].push(cb);
300
+ this[_chunkGWLM5DEJjs.UNMOUNT_SYMBOL].push(cb);
300
301
  }
301
302
  }, _class), "Dev");
302
303
  Dev = exports.Dev = __decorate([
@@ -310,13 +311,13 @@ var PFilter = class extends Dev {
310
311
  constructor(tag) {
311
312
  super();
312
313
  this.key = tag || _phecdacore.getTag.call(void 0, this);
313
- _chunkP5LJBZPNjs.addFilter.call(void 0, this.key, this.use.bind(this));
314
+ _chunkKOWUK5OVjs.addFilter.call(void 0, this.key, this.use.bind(this));
314
315
  this.onUnmount(() => {
315
- delete _chunkP5LJBZPNjs.Context.filterRecord[this.key];
316
+ delete _chunkKOWUK5OVjs.Context.filterRecord[this.key];
316
317
  });
317
318
  }
318
319
  };
319
- _chunkC36XJ7D3js.__name.call(void 0, PFilter, "PFilter");
320
+ _chunkGWLM5DEJjs.__name.call(void 0, PFilter, "PFilter");
320
321
 
321
322
  // src/modules/guard.ts
322
323
 
@@ -325,13 +326,13 @@ var PGuard = class extends Dev {
325
326
  constructor(tag) {
326
327
  super();
327
328
  this.key = tag || _phecdacore.getTag.call(void 0, this);
328
- _chunkP5LJBZPNjs.addGuard.call(void 0, this.key, this.use.bind(this));
329
+ _chunkKOWUK5OVjs.addGuard.call(void 0, this.key, this.use.bind(this));
329
330
  this.onUnmount(() => {
330
- delete _chunkP5LJBZPNjs.Context.guardRecord[this.key];
331
+ delete _chunkKOWUK5OVjs.Context.guardRecord[this.key];
331
332
  });
332
333
  }
333
334
  };
334
- _chunkC36XJ7D3js.__name.call(void 0, PGuard, "PGuard");
335
+ _chunkGWLM5DEJjs.__name.call(void 0, PGuard, "PGuard");
335
336
 
336
337
  // src/modules/interceptor.ts
337
338
 
@@ -341,12 +342,12 @@ var PInterceptor = class extends Dev {
341
342
  super();
342
343
  this.key = tag || _phecdacore.getTag.call(void 0, this);
343
344
  this.onUnmount(() => {
344
- delete _chunkP5LJBZPNjs.Context.interceptorRecord[this.key];
345
+ delete _chunkKOWUK5OVjs.Context.interceptorRecord[this.key];
345
346
  });
346
- _chunkP5LJBZPNjs.addInterceptor.call(void 0, this.key, this.use.bind(this));
347
+ _chunkKOWUK5OVjs.addInterceptor.call(void 0, this.key, this.use.bind(this));
347
348
  }
348
349
  };
349
- _chunkC36XJ7D3js.__name.call(void 0, PInterceptor, "PInterceptor");
350
+ _chunkGWLM5DEJjs.__name.call(void 0, PInterceptor, "PInterceptor");
350
351
 
351
352
  // src/modules/pipe.ts
352
353
 
@@ -355,13 +356,13 @@ var PPipe = class extends Dev {
355
356
  constructor(tag) {
356
357
  super();
357
358
  this.key = tag || _phecdacore.getTag.call(void 0, this);
358
- _chunkP5LJBZPNjs.addPipe.call(void 0, this.key, this.use.bind(this));
359
+ _chunkKOWUK5OVjs.addPipe.call(void 0, this.key, this.use.bind(this));
359
360
  this.onUnmount(() => {
360
- delete _chunkP5LJBZPNjs.Context.pipeRecord[this.key];
361
+ delete _chunkKOWUK5OVjs.Context.pipeRecord[this.key];
361
362
  });
362
363
  }
363
364
  };
364
- _chunkC36XJ7D3js.__name.call(void 0, PPipe, "PPipe");
365
+ _chunkGWLM5DEJjs.__name.call(void 0, PPipe, "PPipe");
365
366
 
366
367
  // src/modules/addon.ts
367
368
 
@@ -370,13 +371,13 @@ var PAddon = class extends Dev {
370
371
  constructor(tag) {
371
372
  super();
372
373
  this.key = tag || _phecdacore.getTag.call(void 0, this);
373
- _chunkP5LJBZPNjs.addPlugin.call(void 0, this.key, this.use.bind(this));
374
+ _chunkKOWUK5OVjs.addAddon.call(void 0, this.key, this.use.bind(this));
374
375
  this.onUnmount(() => {
375
- delete _chunkP5LJBZPNjs.Context.pluginRecord[this.key];
376
+ delete _chunkKOWUK5OVjs.Context.addonRecord[this.key];
376
377
  });
377
378
  }
378
379
  };
379
- _chunkC36XJ7D3js.__name.call(void 0, PAddon, "PAddon");
380
+ _chunkGWLM5DEJjs.__name.call(void 0, PAddon, "PAddon");
380
381
 
381
382
  // src/modules/extension.ts
382
383
 
@@ -386,38 +387,39 @@ var PExtension = class extends Dev {
386
387
  super();
387
388
  const key = this.key = tag || _phecdacore.getTag.call(void 0, this);
388
389
  if (this.pipe) {
389
- _chunkP5LJBZPNjs.addPipe.call(void 0, key, this.pipe.bind(this));
390
+ _chunkKOWUK5OVjs.addPipe.call(void 0, key, this.pipe.bind(this));
390
391
  this.onUnmount(() => {
391
- delete _chunkP5LJBZPNjs.Context.pipeRecord[key];
392
+ delete _chunkKOWUK5OVjs.Context.pipeRecord[key];
392
393
  });
393
394
  }
394
- if (this.plugin) {
395
- _chunkP5LJBZPNjs.addPlugin.call(void 0, key, this.plugin.bind(this));
395
+ if (this.addon) {
396
+ _chunkKOWUK5OVjs.addAddon.call(void 0, key, this.addon.bind(this));
396
397
  this.onUnmount(() => {
397
- delete _chunkP5LJBZPNjs.Context.pluginRecord[key];
398
+ delete _chunkKOWUK5OVjs.Context.addonRecord[key];
398
399
  });
399
400
  }
400
401
  if (this.intercept) {
401
- _chunkP5LJBZPNjs.addInterceptor.call(void 0, key, this.intercept.bind(this));
402
+ _chunkKOWUK5OVjs.addInterceptor.call(void 0, key, this.intercept.bind(this));
402
403
  this.onUnmount(() => {
403
- delete _chunkP5LJBZPNjs.Context.interceptorRecord[key];
404
+ delete _chunkKOWUK5OVjs.Context.interceptorRecord[key];
404
405
  });
405
406
  }
406
407
  if (this.guard) {
407
- _chunkP5LJBZPNjs.addGuard.call(void 0, key, this.guard.bind(this));
408
+ _chunkKOWUK5OVjs.addGuard.call(void 0, key, this.guard.bind(this));
408
409
  this.onUnmount(() => {
409
- delete _chunkP5LJBZPNjs.Context.guardRecord[key];
410
+ delete _chunkKOWUK5OVjs.Context.guardRecord[key];
410
411
  });
411
412
  }
412
413
  if (this.filter) {
413
- _chunkP5LJBZPNjs.addFilter.call(void 0, key, this.filter.bind(this));
414
+ _chunkKOWUK5OVjs.addFilter.call(void 0, key, this.filter.bind(this));
414
415
  this.onUnmount(() => {
415
- delete _chunkP5LJBZPNjs.Context.filterRecord[key];
416
+ delete _chunkKOWUK5OVjs.Context.filterRecord[key];
416
417
  });
417
418
  }
418
419
  }
419
420
  };
420
- _chunkC36XJ7D3js.__name.call(void 0, PExtension, "PExtension");
421
+ _chunkGWLM5DEJjs.__name.call(void 0, PExtension, "PExtension");
422
+
421
423
 
422
424
 
423
425
 
@@ -493,4 +495,4 @@ _chunkC36XJ7D3js.__name.call(void 0, PExtension, "PExtension");
493
495
 
494
496
 
495
497
 
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;
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;