phecda-server 6.1.0 → 7.0.0-alpha.1

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 (82) hide show
  1. package/assets/ps.json +24 -24
  2. package/bin/cli.mjs +165 -157
  3. package/dist/{chunk-NL6QBQAR.js → chunk-7YQ57BQS.js} +21 -22
  4. package/dist/chunk-GSPBHZBH.js +534 -0
  5. package/dist/{chunk-J7B24YSE.mjs → chunk-HMVLXNV3.mjs} +5 -14
  6. package/dist/{chunk-TVT62GIX.js → chunk-J5CFUN4V.js} +8 -1
  7. package/dist/{chunk-JDV2XJYE.js → chunk-MBCHNDAY.js} +27 -36
  8. package/dist/{chunk-2CFYUXPM.mjs → chunk-V7EI76QQ.mjs} +136 -141
  9. package/dist/{chunk-G7TD2VB7.mjs → chunk-WHJ5FALK.mjs} +7 -0
  10. package/dist/{chunk-3H3T54IC.mjs → chunk-XYVMNY2X.mjs} +4 -5
  11. package/dist/{core-P1CsH6jz.d.mts → core-BIcUwV18.d.mts} +1 -1
  12. package/dist/{core-BlN0Spy9.d.ts → core-CYwEPfN4.d.ts} +1 -1
  13. package/dist/helper.d.mts +4 -6
  14. package/dist/helper.d.ts +4 -6
  15. package/dist/helper.js +3 -3
  16. package/dist/helper.mjs +2 -2
  17. package/dist/{server → http}/elysia/index.d.mts +5 -5
  18. package/dist/{server → http}/elysia/index.d.ts +5 -5
  19. package/dist/{server → http}/elysia/index.js +80 -62
  20. package/dist/{server → http}/elysia/index.mjs +50 -32
  21. package/dist/{server → http}/express/index.d.mts +5 -5
  22. package/dist/{server → http}/express/index.d.ts +5 -5
  23. package/dist/{server → http}/express/index.js +71 -55
  24. package/dist/{server → http}/express/index.mjs +42 -26
  25. package/dist/{server → http}/fastify/index.d.mts +5 -5
  26. package/dist/{server → http}/fastify/index.d.ts +5 -5
  27. package/dist/{server → http}/fastify/index.js +72 -72
  28. package/dist/{server → http}/fastify/index.mjs +47 -47
  29. package/dist/{server → http}/h3/index.d.mts +5 -5
  30. package/dist/{server → http}/h3/index.d.ts +5 -5
  31. package/dist/http/h3/index.js +160 -0
  32. package/dist/{server → http}/h3/index.mjs +68 -62
  33. package/dist/{server → http}/hono/index.d.mts +5 -5
  34. package/dist/{server → http}/hono/index.d.ts +5 -5
  35. package/dist/{server → http}/hono/index.js +69 -54
  36. package/dist/{server → http}/hono/index.mjs +41 -26
  37. package/dist/{server → http}/hyper-express/index.d.mts +5 -5
  38. package/dist/{server → http}/hyper-express/index.d.ts +5 -5
  39. package/dist/{server → http}/hyper-express/index.js +69 -56
  40. package/dist/{server → http}/hyper-express/index.mjs +41 -28
  41. package/dist/{server → http}/koa/index.d.mts +5 -5
  42. package/dist/{server → http}/koa/index.d.ts +5 -5
  43. package/dist/{server → http}/koa/index.js +71 -55
  44. package/dist/{server → http}/koa/index.mjs +42 -26
  45. package/dist/index.d.mts +52 -41
  46. package/dist/index.d.ts +52 -41
  47. package/dist/index.js +59 -81
  48. package/dist/index.mjs +39 -61
  49. package/dist/{meta-KtfiBIde.d.ts → meta-BXKLFTgG.d.mts} +2 -3
  50. package/dist/{meta-KtfiBIde.d.mts → meta-BXKLFTgG.d.ts} +2 -3
  51. package/dist/rpc/bullmq/index.d.mts +6 -6
  52. package/dist/rpc/bullmq/index.d.ts +6 -6
  53. package/dist/rpc/bullmq/index.js +24 -24
  54. package/dist/rpc/bullmq/index.mjs +14 -14
  55. package/dist/rpc/kafka/index.d.mts +3 -3
  56. package/dist/rpc/kafka/index.d.ts +3 -3
  57. package/dist/rpc/kafka/index.js +25 -21
  58. package/dist/rpc/kafka/index.mjs +15 -11
  59. package/dist/rpc/nats/index.d.mts +3 -3
  60. package/dist/rpc/nats/index.d.ts +3 -3
  61. package/dist/rpc/nats/index.js +22 -21
  62. package/dist/rpc/nats/index.mjs +13 -12
  63. package/dist/rpc/rabbitmq/index.d.mts +3 -3
  64. package/dist/rpc/rabbitmq/index.d.ts +3 -3
  65. package/dist/rpc/rabbitmq/index.js +23 -22
  66. package/dist/rpc/rabbitmq/index.mjs +12 -11
  67. package/dist/rpc/redis/index.d.mts +3 -3
  68. package/dist/rpc/redis/index.d.ts +3 -3
  69. package/dist/rpc/redis/index.js +24 -20
  70. package/dist/rpc/redis/index.mjs +15 -11
  71. package/dist/test.d.mts +3 -3
  72. package/dist/test.d.ts +3 -3
  73. package/dist/test.js +6 -6
  74. package/dist/test.mjs +2 -2
  75. package/dist/{types-JVT0mgLD.d.ts → types-BtbL49Zs.d.mts} +2 -1
  76. package/dist/{types-DIw7B6Up.d.ts → types-VFzEM7LL.d.ts} +5 -5
  77. package/dist/{types-BvD3B5Ny.d.mts → types-h40T3cRG.d.mts} +5 -5
  78. package/dist/{types-t9D1fU6G.d.mts → types-m3IEDKjP.d.ts} +2 -1
  79. package/package.json +23 -23
  80. package/register/loader.mjs +366 -367
  81. package/dist/chunk-DVTBLV6I.js +0 -539
  82. package/dist/server/h3/index.js +0 -154
package/assets/ps.json CHANGED
@@ -1,24 +1,24 @@
1
- {
2
- "$schema": "https://unpkg.com/phecda-server/assets/schema.json",
3
- "resolve": [
4
- {
5
- "source": "controller",
6
- "importer": "http",
7
- "path": ".ps/http.js"
8
- },
9
- {
10
- "source": "rpc",
11
- "importer": "client",
12
- "path": ".ps/rpc.js"
13
- }
14
- ],
15
- "unimport": {
16
- "dirs": ["."],
17
- "dirsScanOptions": {
18
- "filePatterns": ["*.{service,controller,module,rpc,edge,guard,interceptor,extension,pipe,filter,plugin}.ts"]
19
- }
20
- },
21
- "virtualFile": {},
22
- "moduleFile": []
23
-
24
- }
1
+ {
2
+ "$schema": "https://unpkg.com/phecda-server/assets/schema.json",
3
+ "resolve": [
4
+ {
5
+ "source": "controller",
6
+ "importer": "http",
7
+ "path": ".ps/http.js"
8
+ },
9
+ {
10
+ "source": "rpc",
11
+ "importer": "client",
12
+ "path": ".ps/rpc.js"
13
+ }
14
+ ],
15
+ "unimport": {
16
+ "dirs": ["."],
17
+ "dirsScanOptions": {
18
+ "filePatterns": ["*.{service,controller,module,rpc,edge,guard,extension,pipe,filter,addon}.ts"]
19
+ }
20
+ },
21
+ "virtualFile": {},
22
+ "moduleFile": []
23
+
24
+ }
package/bin/cli.mjs CHANGED
@@ -1,158 +1,166 @@
1
1
  #! /usr/bin/env node
2
- import { fork } from 'child_process'
3
- import { createRequire } from 'module'
4
- import { fileURLToPath } from 'url'
5
-
6
- import { dirname, join, resolve } from 'path'
7
- import pc from 'picocolors'
8
- import cac from 'cac'
9
- import fse from 'fs-extra'
10
- import { log } from '../dist/index.mjs'
11
-
12
- const cli = cac('phecda').option('-c,--config <config>', 'config file', {
13
- default: 'ps.json',
14
- })
15
-
16
- const __dirname = dirname(fileURLToPath(import.meta.url))
17
-
18
- const require = createRequire(import.meta.url)
19
- let child
20
-
21
- let closePromise
22
- const nodeVersion = parseFloat(process.version.slice(1))
23
-
24
- if (nodeVersion < 18.19) {
25
- log(
26
- `Nodejs version less than 18.19(current is ${nodeVersion}) can't support hmr`,
27
- 'yellow',
28
- )
29
- }
30
-
31
- function startChild(file, args) {
32
- child = fork(file, {
33
- env: { NODE_ENV: 'development', ...process.env },
34
- stdio: 'inherit',
35
- execArgv: [
36
- nodeVersion < 18.19
37
- ? '--loader=phecda-server/register/loader.mjs'
38
- : '--import=phecda-server/register',
39
- ...args,
40
- ],
41
- })
42
-
43
- closePromise = new Promise((resolve) => {
44
- child.once('exit', (code) => {
45
- if (code === 4) {
46
- log('only generate code')
47
- process.exit(0)
48
- }
49
- if (code >= 2) {
50
- // for relaunch
51
- log('relaunch...')
52
- startChild(file, args)
53
- }
54
- child = undefined
55
-
56
- resolve()
57
- })
58
- })
59
- }
60
-
61
- function exit() {
62
- log('process exit')
63
-
64
- if (child) {
65
- child.kill()
66
- process.exit(0)
67
- }
68
- else {
69
- process.exit(0)
70
- }
71
- }
72
- process.on('SIGINT', () => {
73
- process.exit()
74
- })
75
-
76
- cli
77
- .command('init [root]', 'init config file')
78
- .allowUnknownOptions()
79
- .option('-t,--tsconfig <tsconfig>', 'init tsconfig file', {
80
- default: 'tsconfig.json',
81
- })
82
- .action(async (root, options) => {
83
- if (!root)
84
- root = ''
85
-
86
- const tsconfigPath = join(root, options.tsconfig)
87
- const psconfigPath = join(root, options.config)
88
-
89
- if (!fse.existsSync(tsconfigPath)) {
90
- log(`create ${tsconfigPath}`)
91
-
92
- await fse.copyFile(
93
- resolve(__dirname, '../assets/tsconfig.json'),
94
- tsconfigPath,
95
- )
96
- }
97
-
98
- if (!fse.existsSync(psconfigPath)) {
99
- log(`create ${psconfigPath}`)
100
-
101
- await fse.copyFile(resolve(__dirname, '../assets/ps.json'), psconfigPath)
102
- }
103
-
104
- log('init finish')
105
- })
106
-
107
- cli
108
- .command('<file> [root]', 'run file')
109
- .alias('run')
110
- .allowUnknownOptions()
111
- .alias('run')
112
- .action((file, root, options) => {
113
- if (root)
114
- process.env.PS_WORKDIR = root
115
- process.env.PS_CONFIG_FILE = options.config
116
-
117
- log('process start!')
118
-
119
- startChild(file, options['--'])
120
- console.log(`${pc.green('->')} press ${pc.green('e')} to exit`)
121
- console.log(`${pc.green('->')} press ${pc.green('r')} to relaunch`)
122
-
123
- process.stdin.on('data', async (data) => {
124
- const input = data.toString().trim().toLocaleLowerCase()
125
- if (input === 'r') {
126
- if (child) {
127
- await child.kill()
128
- if (closePromise)
129
- await closePromise
130
- log('relaunch...')
131
- startChild(file, options['--'])
132
- }
133
- else {
134
- log('relaunch...')
135
-
136
- startChild(file, options['--'])
137
- }
138
- }
139
- if (input === 'e')
140
- exit()
141
- })
142
- })
143
-
144
- cli
145
- .command('generate <file> [root]', 'generate code(mainly for ci)')
146
- .allowUnknownOptions()
147
- .action((file, root, options) => {
148
- if (root)
149
- process.env.PS_WORKDIR = root
150
- process.env.PS_GENERATE = 'true'
151
- process.env.PS_CONFIG_FILE = options.config
152
- startChild(file, options['--'])
153
- })
154
-
155
- cli.help()
156
- cli.version(require('../package.json').version)
157
-
158
- cli.parse()
2
+ import { fork } from 'child_process'
3
+ import { createRequire } from 'module'
4
+ import { fileURLToPath } from 'url'
5
+
6
+ import { dirname, join, resolve } from 'path'
7
+ import pc from 'picocolors'
8
+ import cac from 'cac'
9
+ import fse from 'fs-extra'
10
+ import { log } from '../dist/index.mjs'
11
+
12
+ const cli = cac('phecda').option('-c,--config <config>', 'config file', {
13
+ default: 'ps.json',
14
+ })
15
+
16
+ const __dirname = dirname(fileURLToPath(import.meta.url))
17
+
18
+ const require = createRequire(import.meta.url)
19
+ let child
20
+
21
+ let closePromise
22
+ const nodeVersion = parseFloat(process.version.slice(1))
23
+
24
+ if (nodeVersion < 18.19) {
25
+ log(
26
+ `Nodejs version less than 18.19(current is ${nodeVersion}) can't support hmr`,
27
+ 'yellow',
28
+ )
29
+ }
30
+
31
+ function startChild(file, args) {
32
+ child = fork(file, {
33
+ env: { NODE_ENV: 'development', ...process.env },
34
+ stdio: 'inherit',
35
+ execArgv: [
36
+ nodeVersion < 18.19
37
+ ? '--loader=phecda-server/register/loader.mjs'
38
+ : '--import=phecda-server/register',
39
+ ...args,
40
+ ],
41
+ })
42
+
43
+ closePromise = new Promise((resolve) => {
44
+ child.once('exit', (code) => {
45
+ if (code === 4) {
46
+ log('only generate code')
47
+ process.exit(0)
48
+ }
49
+
50
+ if (code === 5) {
51
+ log('Does not comply with strict mode', 'error')
52
+ process.exit(0)
53
+ }
54
+ if (code >= 2) {
55
+ // for relaunch
56
+ log('relaunch...')
57
+ startChild(file, args)
58
+ }
59
+ child = undefined
60
+
61
+ resolve()
62
+ })
63
+ })
64
+ }
65
+
66
+ function exit() {
67
+ log('process exit')
68
+
69
+ if (child) {
70
+ child.kill()
71
+ process.exit(0)
72
+ }
73
+ else {
74
+ process.exit(0)
75
+ }
76
+ }
77
+ process.on('SIGINT', () => {
78
+ process.exit()
79
+ })
80
+
81
+ cli
82
+ .command('init [root]', 'init config file')
83
+ .allowUnknownOptions()
84
+ .option('-t,--tsconfig <tsconfig>', 'init tsconfig file', {
85
+ default: 'tsconfig.json',
86
+ })
87
+ .action(async (root, options) => {
88
+ if (!root)
89
+ root = ''
90
+
91
+ const tsconfigPath = join(root, options.tsconfig)
92
+ const psconfigPath = join(root, options.config)
93
+
94
+ if (!fse.existsSync(tsconfigPath)) {
95
+ log(`create ${tsconfigPath}`)
96
+
97
+ await fse.copyFile(
98
+ resolve(__dirname, '../assets/tsconfig.json'),
99
+ tsconfigPath,
100
+ )
101
+ }
102
+
103
+ if (!fse.existsSync(psconfigPath)) {
104
+ log(`create ${psconfigPath}`)
105
+
106
+ await fse.copyFile(resolve(__dirname, '../assets/ps.json'), psconfigPath)
107
+ }
108
+
109
+ log('init finish')
110
+ })
111
+
112
+ cli
113
+ .command('<file> [root]', 'run file')
114
+ .alias('run')
115
+ .allowUnknownOptions()
116
+ .alias('run')
117
+ .action((file, root, options) => {
118
+ if (root)
119
+ process.env.PS_WORKDIR = root
120
+ process.env.PS_CONFIG_FILE = options.config
121
+
122
+ log('process start!')
123
+
124
+ startChild(file, options['--'])
125
+ console.log(`${pc.green('->')} press ${pc.green('e')} to exit`)
126
+ console.log(`${pc.green('->')} press ${pc.green('r')} to relaunch`)
127
+
128
+ process.stdin.on('data', async (data) => {
129
+ const input = data.toString().trim().toLocaleLowerCase()
130
+ if (input === 'r') {
131
+ if (child) {
132
+ await child.kill()
133
+ if (closePromise)
134
+ await closePromise
135
+ log('relaunch...')
136
+ startChild(file, options['--'])
137
+ }
138
+ else {
139
+ log('relaunch...')
140
+
141
+ startChild(file, options['--'])
142
+ }
143
+ }
144
+ if (input === 'e')
145
+ exit()
146
+
147
+ if (input === 'c')
148
+ console.clear()
149
+ })
150
+ })
151
+
152
+ cli
153
+ .command('generate <file> [root]', 'generate code(mainly for ci)')
154
+ .allowUnknownOptions()
155
+ .action((file, root, options) => {
156
+ if (root)
157
+ process.env.PS_WORKDIR = root
158
+ process.env.PS_GENERATE = 'true'
159
+ process.env.PS_CONFIG_FILE = options.config
160
+ startChild(file, options['--'])
161
+ })
162
+
163
+ cli.help()
164
+ cli.version(require('../package.json').version)
165
+
166
+ cli.parse()
@@ -3,12 +3,12 @@
3
3
 
4
4
 
5
5
 
6
- var _chunkTVT62GIXjs = require('./chunk-TVT62GIX.js');
6
+ var _chunkJ5CFUN4Vjs = require('./chunk-J5CFUN4V.js');
7
7
 
8
8
  // src/meta.ts
9
9
  var Meta = class {
10
10
  static {
11
- _chunkTVT62GIXjs.__name.call(void 0, this, "Meta");
11
+ _chunkJ5CFUN4Vjs.__name.call(void 0, this, "Meta");
12
12
  }
13
13
 
14
14
 
@@ -23,7 +23,7 @@ require('reflect-metadata');
23
23
  var _events = require('events'); var _events2 = _interopRequireDefault(_events);
24
24
  var _phecdacore = require('phecda-core');
25
25
  var _debug = require('debug'); var _debug2 = _interopRequireDefault(_debug);
26
- var debug = _debug2.default.call(void 0, "phecda-server(createPhecda)");
26
+ var debug = _debug2.default.call(void 0, "phecda-server(Factory)");
27
27
  var emitter = new (0, _events2.default)();
28
28
  function defaultServerInject() {
29
29
  if (!_phecdacore.getInject.call(void 0, "watcher")) {
@@ -37,11 +37,11 @@ function defaultServerInject() {
37
37
  });
38
38
  }
39
39
  }
40
- _chunkTVT62GIXjs.__name.call(void 0, defaultServerInject, "defaultServerInject");
40
+ _chunkJ5CFUN4Vjs.__name.call(void 0, defaultServerInject, "defaultServerInject");
41
41
  var phecdaNamespace = /* @__PURE__ */ new Map();
42
42
  var ServerPhecda = (_class = class {
43
43
  static {
44
- _chunkTVT62GIXjs.__name.call(void 0, this, "ServerPhecda");
44
+ _chunkJ5CFUN4Vjs.__name.call(void 0, this, "ServerPhecda");
45
45
  }
46
46
  __init() {this.moduleMap = /* @__PURE__ */ new Map()}
47
47
  __init2() {this.meta = []}
@@ -53,7 +53,7 @@ var ServerPhecda = (_class = class {
53
53
 
54
54
  constructor(options) {;_class.prototype.__init.call(this);_class.prototype.__init2.call(this);_class.prototype.__init3.call(this);_class.prototype.__init4.call(this);_class.prototype.__init5.call(this);
55
55
  defaultServerInject();
56
- const { namespace = "default", parseModule = /* @__PURE__ */ _chunkTVT62GIXjs.__name.call(void 0, (module) => module, "parseModule"), parseMeta = /* @__PURE__ */ _chunkTVT62GIXjs.__name.call(void 0, (meta) => meta, "parseMeta"), generators = [] } = options;
56
+ const { namespace = "default", parseModule = /* @__PURE__ */ _chunkJ5CFUN4Vjs.__name.call(void 0, (module) => module, "parseModule"), parseMeta = /* @__PURE__ */ _chunkJ5CFUN4Vjs.__name.call(void 0, (meta) => meta, "parseMeta"), generators = [] } = options;
57
57
  phecdaNamespace.set(namespace, this);
58
58
  this.parseMeta = parseMeta;
59
59
  this.parseModule = parseModule;
@@ -61,8 +61,8 @@ var ServerPhecda = (_class = class {
61
61
  }
62
62
  async start(models) {
63
63
  for (const model of models) await this.buildDepModule(model);
64
- const generateCode = /* @__PURE__ */ _chunkTVT62GIXjs.__name.call(void 0, async () => {
65
- if (_chunkTVT62GIXjs.IS_HMR) {
64
+ const generateCode = /* @__PURE__ */ _chunkJ5CFUN4Vjs.__name.call(void 0, async () => {
65
+ if (_chunkJ5CFUN4Vjs.IS_HMR) {
66
66
  return Promise.all(this.generators.map((generator) => {
67
67
  debug(`generate "${generator.name}" code to ${generator.path}`);
68
68
  return generator.output(this.meta);
@@ -70,9 +70,9 @@ var ServerPhecda = (_class = class {
70
70
  }
71
71
  }, "generateCode");
72
72
  generateCode().then(() => {
73
- if (_chunkTVT62GIXjs.IS_ONLY_GENERATE) process.exit(4);
73
+ if (_chunkJ5CFUN4Vjs.IS_ONLY_GENERATE) process.exit(4);
74
74
  });
75
- if (_chunkTVT62GIXjs.IS_HMR) {
75
+ if (_chunkJ5CFUN4Vjs.IS_HMR) {
76
76
  if (!globalThis.__PS_HMR__) globalThis.__PS_HMR__ = [];
77
77
  _optionalChain([globalThis, 'access', _2 => _2.__PS_HMR__, 'optionalAccess', _3 => _3.push, 'call', _4 => _4(async (files) => {
78
78
  debug("reload files ");
@@ -128,8 +128,8 @@ var ServerPhecda = (_class = class {
128
128
  if (!module) throw new Error(`exist Circular-Dependency or Multiple modules with the same name/tag [tag] ${String(tag)}--[module] ${Model}`);
129
129
  if (this.modelMap.get(module) !== Model && !this.modelSet.has(Model)) {
130
130
  this.modelSet.add(Model);
131
- if (module instanceof Model) _chunkTVT62GIXjs.log.call(void 0, `Module taged ${String(tag)} has been overridden`);
132
- else _chunkTVT62GIXjs.log.call(void 0, `Synonym module: Module taged "${String(tag)}" has been loaded before, so phecda-server won't load Module "${Model.name}"`, "warn");
131
+ if (module instanceof Model) _chunkJ5CFUN4Vjs.log.call(void 0, `Module taged ${String(tag)} has been overridden`);
132
+ else _chunkJ5CFUN4Vjs.log.call(void 0, `Synonym module: Module taged "${String(tag)}" has been loaded before, so phecda-server won't load Module "${Model.name}"`, "warn");
133
133
  }
134
134
  return {
135
135
  module,
@@ -152,7 +152,7 @@ var ServerPhecda = (_class = class {
152
152
  }
153
153
  this.meta.push(...getMetaFromInstance(module, tag, Model.name).map(this.parseMeta).filter((item) => !!item));
154
154
  debug(`init module "${String(tag)}"`);
155
- if (!_chunkTVT62GIXjs.IS_ONLY_GENERATE) await _phecdacore.invokeInit.call(void 0, module);
155
+ if (!_chunkJ5CFUN4Vjs.IS_ONLY_GENERATE) await _phecdacore.invokeInit.call(void 0, module);
156
156
  debug(`add module "${String(tag)}"`);
157
157
  this.moduleMap.set(tag, module);
158
158
  this.modelMap.set(module, Model);
@@ -175,7 +175,7 @@ async function Factory(models, opts = {}) {
175
175
  await phecda.start(models);
176
176
  return phecda;
177
177
  }
178
- _chunkTVT62GIXjs.__name.call(void 0, Factory, "Factory");
178
+ _chunkJ5CFUN4Vjs.__name.call(void 0, Factory, "Factory");
179
179
  function useS(nsOrModel, namespace) {
180
180
  if (!nsOrModel) {
181
181
  namespace = "default";
@@ -188,7 +188,7 @@ function useS(nsOrModel, namespace) {
188
188
  if (nsOrModel && typeof nsOrModel !== "string") return serverPhecda.get(nsOrModel);
189
189
  else return serverPhecda;
190
190
  }
191
- _chunkTVT62GIXjs.__name.call(void 0, useS, "useS");
191
+ _chunkJ5CFUN4Vjs.__name.call(void 0, useS, "useS");
192
192
  function getMetaFromInstance(instance, tag, name) {
193
193
  const propertyKeys = _phecdacore.getMetaKey.call(void 0, instance).filter((item) => typeof item === "string");
194
194
  const baseMeta = _phecdacore.getMergedMeta.call(void 0, instance, void 0);
@@ -202,7 +202,7 @@ function getMetaFromInstance(instance, tag, name) {
202
202
  func: i
203
203
  };
204
204
  if (baseMeta.controller) {
205
- if (typeof tag !== "string") _chunkTVT62GIXjs.log.call(void 0, `can't use Tag with ${typeof tag} on controller "${instance.constructor.name}",instead with "${tag = String(tag)}"`, "error");
205
+ if (typeof tag !== "string") _chunkJ5CFUN4Vjs.log.call(void 0, `can't use Tag with ${typeof tag} on controller "${instance.constructor.name}",instead with "${tag = String(tag)}"`, "error");
206
206
  metaData.controller = baseMeta.controller;
207
207
  metaData[baseMeta.controller] = {
208
208
  ...baseMeta[baseMeta.controller],
@@ -222,9 +222,8 @@ function getMetaFromInstance(instance, tag, name) {
222
222
  ...meta.define
223
223
  };
224
224
  for (const item of [
225
- "plugins",
226
- "guards",
227
- "interceptors"
225
+ "addons",
226
+ "guards"
228
227
  ]) {
229
228
  const set = new Set(baseMeta[item]);
230
229
  if (meta[item]) {
@@ -241,7 +240,7 @@ function getMetaFromInstance(instance, tag, name) {
241
240
  return new Meta(deepFreeze(metaData), getParamTypes(instance, i) || []);
242
241
  });
243
242
  }
244
- _chunkTVT62GIXjs.__name.call(void 0, getMetaFromInstance, "getMetaFromInstance");
243
+ _chunkJ5CFUN4Vjs.__name.call(void 0, getMetaFromInstance, "getMetaFromInstance");
245
244
  function deepFreeze(object) {
246
245
  Object.freeze(object);
247
246
  Object.getOwnPropertyNames(object).forEach((prop) => {
@@ -249,11 +248,11 @@ function deepFreeze(object) {
249
248
  });
250
249
  return object;
251
250
  }
252
- _chunkTVT62GIXjs.__name.call(void 0, deepFreeze, "deepFreeze");
251
+ _chunkJ5CFUN4Vjs.__name.call(void 0, deepFreeze, "deepFreeze");
253
252
  function getParamTypes(Model, key) {
254
253
  return Reflect.getMetadata("design:paramtypes", Model, key);
255
254
  }
256
- _chunkTVT62GIXjs.__name.call(void 0, getParamTypes, "getParamTypes");
255
+ _chunkJ5CFUN4Vjs.__name.call(void 0, getParamTypes, "getParamTypes");
257
256
 
258
257
 
259
258