phecda-server 7.0.0-alpha.8 → 7.0.0

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 (154) hide show
  1. package/README.md +10 -10
  2. package/assets/schema.json +12 -9
  3. package/bin/cli.mjs +96 -37
  4. package/dist/chunk-5SUY5UVC.js +258 -0
  5. package/dist/chunk-5SUY5UVC.js.map +1 -0
  6. package/dist/chunk-6JAHCTOT.mjs +334 -0
  7. package/dist/chunk-6JAHCTOT.mjs.map +1 -0
  8. package/dist/{chunk-BBNJVYVX.js → chunk-EDAWJVJ4.js} +42 -25
  9. package/dist/chunk-EDAWJVJ4.js.map +1 -0
  10. package/dist/{chunk-7EMAZGYO.js → chunk-H7OCHDZT.js} +65 -95
  11. package/dist/chunk-H7OCHDZT.js.map +1 -0
  12. package/dist/{chunk-QJIAXSLZ.js → chunk-KRUOHWFR.js} +79 -68
  13. package/dist/chunk-KRUOHWFR.js.map +1 -0
  14. package/dist/chunk-KUGU3UGO.js +334 -0
  15. package/dist/chunk-KUGU3UGO.js.map +1 -0
  16. package/dist/{chunk-SGMQZRP6.mjs → chunk-LBH4RXQQ.mjs} +12 -42
  17. package/dist/chunk-LBH4RXQQ.mjs.map +1 -0
  18. package/dist/{chunk-YKP4ODZA.mjs → chunk-MDPW6WGF.mjs} +32 -6
  19. package/dist/chunk-MDPW6WGF.mjs.map +1 -0
  20. package/dist/{chunk-VSGYTGHY.js → chunk-RLFCI3RG.js} +31 -5
  21. package/dist/chunk-RLFCI3RG.js.map +1 -0
  22. package/dist/{chunk-7NWDKK7D.mjs → chunk-TTHYUNOT.mjs} +18 -1
  23. package/dist/chunk-TTHYUNOT.mjs.map +1 -0
  24. package/dist/chunk-VDOICQ2U.mjs +258 -0
  25. package/dist/chunk-VDOICQ2U.mjs.map +1 -0
  26. package/dist/{chunk-B45BN7LY.mjs → chunk-WTJKTICN.mjs} +65 -54
  27. package/dist/chunk-WTJKTICN.mjs.map +1 -0
  28. package/dist/{core-BGEsBtTG.d.ts → core-BOo3uGFX.d.ts} +5 -4
  29. package/dist/{core-BcKywWLd.d.mts → core-CF45G79J.d.mts} +5 -4
  30. package/dist/core-DbqWh47p.d.mts +50 -0
  31. package/dist/core-Rq7BhPHE.d.ts +50 -0
  32. package/dist/helper.d.mts +7 -8
  33. package/dist/helper.d.ts +7 -8
  34. package/dist/helper.js +5 -3
  35. package/dist/helper.js.map +1 -0
  36. package/dist/helper.mjs +9 -7
  37. package/dist/helper.mjs.map +1 -0
  38. package/dist/http/elysia/index.d.mts +4 -4
  39. package/dist/http/elysia/index.d.ts +4 -4
  40. package/dist/http/elysia/index.js +43 -45
  41. package/dist/http/elysia/index.js.map +1 -0
  42. package/dist/http/elysia/index.mjs +6 -8
  43. package/dist/http/elysia/index.mjs.map +1 -0
  44. package/dist/http/express/index.d.mts +3 -3
  45. package/dist/http/express/index.d.ts +3 -3
  46. package/dist/http/express/index.js +40 -42
  47. package/dist/http/express/index.js.map +1 -0
  48. package/dist/http/express/index.mjs +6 -8
  49. package/dist/http/express/index.mjs.map +1 -0
  50. package/dist/http/fastify/index.d.mts +3 -3
  51. package/dist/http/fastify/index.d.ts +3 -3
  52. package/dist/http/fastify/index.js +41 -43
  53. package/dist/http/fastify/index.js.map +1 -0
  54. package/dist/http/fastify/index.mjs +6 -8
  55. package/dist/http/fastify/index.mjs.map +1 -0
  56. package/dist/http/h3/index.d.mts +3 -3
  57. package/dist/http/h3/index.d.ts +3 -3
  58. package/dist/http/h3/index.js +41 -43
  59. package/dist/http/h3/index.js.map +1 -0
  60. package/dist/http/h3/index.mjs +5 -7
  61. package/dist/http/h3/index.mjs.map +1 -0
  62. package/dist/http/hono/index.d.mts +3 -3
  63. package/dist/http/hono/index.d.ts +3 -3
  64. package/dist/http/hono/index.js +37 -39
  65. package/dist/http/hono/index.js.map +1 -0
  66. package/dist/http/hono/index.mjs +5 -7
  67. package/dist/http/hono/index.mjs.map +1 -0
  68. package/dist/http/hyper-express/index.d.mts +3 -3
  69. package/dist/http/hyper-express/index.d.ts +3 -3
  70. package/dist/http/hyper-express/index.js +38 -40
  71. package/dist/http/hyper-express/index.js.map +1 -0
  72. package/dist/http/hyper-express/index.mjs +5 -7
  73. package/dist/http/hyper-express/index.mjs.map +1 -0
  74. package/dist/http/koa/index.d.mts +3 -3
  75. package/dist/http/koa/index.d.ts +3 -3
  76. package/dist/http/koa/index.js +40 -42
  77. package/dist/http/koa/index.js.map +1 -0
  78. package/dist/http/koa/index.mjs +6 -8
  79. package/dist/http/koa/index.mjs.map +1 -0
  80. package/dist/index.d.mts +76 -12
  81. package/dist/index.d.ts +76 -12
  82. package/dist/index.js +103 -49
  83. package/dist/index.js.map +1 -0
  84. package/dist/index.mjs +68 -14
  85. package/dist/index.mjs.map +1 -0
  86. package/dist/{meta-B_HW7cWh.d.ts → meta-BoS1E-Nz.d.mts} +6 -24
  87. package/dist/{meta-B_HW7cWh.d.mts → meta-BoS1E-Nz.d.ts} +6 -24
  88. package/dist/rpc/bullmq/index.d.mts +4 -6
  89. package/dist/rpc/bullmq/index.d.ts +4 -6
  90. package/dist/rpc/bullmq/index.js +13 -80
  91. package/dist/rpc/bullmq/index.js.map +1 -0
  92. package/dist/rpc/bullmq/index.mjs +6 -73
  93. package/dist/rpc/bullmq/index.mjs.map +1 -0
  94. package/dist/rpc/electron/index.d.mts +13 -0
  95. package/dist/rpc/electron/index.d.ts +13 -0
  96. package/dist/rpc/electron/index.js +73 -0
  97. package/dist/rpc/electron/index.js.map +1 -0
  98. package/dist/rpc/electron/index.mjs +73 -0
  99. package/dist/rpc/electron/index.mjs.map +1 -0
  100. package/dist/rpc/kafka/index.d.mts +4 -9
  101. package/dist/rpc/kafka/index.d.ts +4 -9
  102. package/dist/rpc/kafka/index.js +12 -90
  103. package/dist/rpc/kafka/index.js.map +1 -0
  104. package/dist/rpc/kafka/index.mjs +5 -83
  105. package/dist/rpc/kafka/index.mjs.map +1 -0
  106. package/dist/rpc/nats/index.d.mts +4 -6
  107. package/dist/rpc/nats/index.d.ts +4 -6
  108. package/dist/rpc/nats/index.js +13 -72
  109. package/dist/rpc/nats/index.js.map +1 -0
  110. package/dist/rpc/nats/index.mjs +5 -64
  111. package/dist/rpc/nats/index.mjs.map +1 -0
  112. package/dist/rpc/rabbitmq/index.d.mts +4 -6
  113. package/dist/rpc/rabbitmq/index.d.ts +4 -6
  114. package/dist/rpc/rabbitmq/index.js +14 -79
  115. package/dist/rpc/rabbitmq/index.js.map +1 -0
  116. package/dist/rpc/rabbitmq/index.mjs +6 -71
  117. package/dist/rpc/rabbitmq/index.mjs.map +1 -0
  118. package/dist/rpc/redis/index.d.mts +4 -9
  119. package/dist/rpc/redis/index.d.ts +4 -9
  120. package/dist/rpc/redis/index.js +12 -78
  121. package/dist/rpc/redis/index.js.map +1 -0
  122. package/dist/rpc/redis/index.mjs +6 -72
  123. package/dist/rpc/redis/index.mjs.map +1 -0
  124. package/dist/rpc/web-ext/index.d.mts +2 -0
  125. package/dist/rpc/web-ext/index.d.ts +2 -0
  126. package/dist/rpc/web-ext/index.js +1 -0
  127. package/dist/rpc/web-ext/index.js.map +1 -0
  128. package/dist/rpc/web-ext/index.mjs +1 -0
  129. package/dist/rpc/web-ext/index.mjs.map +1 -0
  130. package/dist/rpc/ws/index.d.mts +14 -0
  131. package/dist/rpc/ws/index.d.ts +14 -0
  132. package/dist/rpc/ws/index.js +74 -0
  133. package/dist/rpc/ws/index.js.map +1 -0
  134. package/dist/rpc/ws/index.mjs +74 -0
  135. package/dist/rpc/ws/index.mjs.map +1 -0
  136. package/dist/test.d.mts +8 -4
  137. package/dist/test.d.ts +8 -4
  138. package/dist/test.js +7 -6
  139. package/dist/test.js.map +1 -0
  140. package/dist/test.mjs +3 -2
  141. package/dist/test.mjs.map +1 -0
  142. package/dist/types-CInz3bD0.d.ts +14 -0
  143. package/dist/types-E-rqlg3-.d.mts +14 -0
  144. package/dist/{types-C2SQ9U9V.d.mts → types-SCJZFCYt.d.mts} +1 -1
  145. package/dist/{types-PFPIQWVF.d.ts → types-xruyYmyu.d.ts} +1 -1
  146. package/package.json +24 -8
  147. package/register/export.mjs +30 -0
  148. package/register/index.mjs +20 -12
  149. package/register/loader.mjs +94 -116
  150. package/register/utils.mjs +36 -6
  151. package/assets/ps.json +0 -24
  152. package/assets/tsconfig.json +0 -21
  153. package/dist/types-CYF0vha6.d.ts +0 -19
  154. package/dist/types-DEQb_e59.d.mts +0 -19
package/README.md CHANGED
@@ -1,10 +1,10 @@
1
- # phecda-server
2
-
3
- [DOCUMENT](https://fgsreally.github.io/phecda/)
4
-
5
- nodejs server framework that provide IOC/type-reuse/http&rpc-adaptor
6
-
7
- like `nestjs`+ `trpc`, work with `elysia/express/hono/h3/koa/fastify/hyper-express` and `redis/rabbimq/kafka/bullmq/nats`
8
-
9
- Pragmatism , Progressive, Less code and Easy to maintain
10
-
1
+ # phecda-server
2
+
3
+ [DOCUMENT](https://fgsreally.github.io/phecda/)
4
+
5
+ nodejs server framework that provide IOC/type-reuse/http&rpc-adaptor
6
+
7
+ like `nestjs`+ `trpc`, work with `elysia/express/hono/h3/koa/fastify/hyper-express` and `redis/rabbimq/kafka/bullmq/nats`
8
+
9
+ Pragmatism , Progressive, Less code and Easy to maintain
10
+
@@ -38,16 +38,19 @@
38
38
  },
39
39
  "description": "Including the module's file middle name, such as controller mapping to xx.controller.ts"
40
40
  },
41
- "virtualFile": {
42
- "type": "object",
43
- "additionalProperties": {
44
- "type": "string"
45
- },
46
- "description": "Virtual module, just like in Vite."
47
- },
41
+
48
42
  "unimport": {
49
- "type": "object",
50
- "description": "Includes the arguments passed to unimport and 'dtsPath' that specifies the location for generating type files."
43
+ "oneOf": [
44
+ {
45
+ "type": "object",
46
+ "description": "Includes the arguments passed to unimport"
47
+ },
48
+ {
49
+ "type": "boolean",
50
+ "enum": [false],
51
+ "description": "Disable unimport"
52
+ }
53
+ ]
51
54
  }
52
55
  },
53
56
 
package/bin/cli.mjs CHANGED
@@ -1,20 +1,24 @@
1
- #! /usr/bin/env node
1
+ #! /usr/bin/env node
2
2
  import { fork } from 'child_process'
3
3
  import { createRequire } from 'module'
4
- import { fileURLToPath } from 'url'
5
-
6
- import { dirname, resolve } from 'path'
7
4
  import pc from 'picocolors'
8
5
  import cac from 'cac'
9
6
  import fse from 'fs-extra'
10
- import { log } from '../dist/index.mjs'
7
+ import { log as psLog } from '../dist/index.mjs'
8
+
9
+ const log = (...args) => {
10
+ if (process.env.PS_BAN_CLI_LOG)
11
+ return
12
+
13
+ psLog(...args)
14
+ }
11
15
 
12
16
  const cli = cac('phecda').option('-c,--config <config>', 'config file', {
13
17
  default: 'ps.json',
18
+ }).option('-n,--node-args <node-args>', 'args that will be passed to nodejs', {
19
+ default: '',
14
20
  })
15
21
 
16
- const __dirname = dirname(fileURLToPath(import.meta.url))
17
-
18
22
  const require = createRequire(import.meta.url)
19
23
  let child
20
24
 
@@ -29,33 +33,25 @@ if (nodeVersion < 18.19) {
29
33
  }
30
34
 
31
35
  function startChild(file, args) {
32
- child = fork(file, {
36
+ child = globalThis.PS_CREATE_CHILD?.() || fork(file, {
33
37
  env: { ...process.env },
34
38
  stdio: 'inherit',
35
39
  execArgv: [
40
+ ...args,
36
41
  nodeVersion < 18.19
37
42
  ? '--loader=phecda-server/register/loader.mjs'
38
43
  : '--import=phecda-server/register',
39
- ...args,
40
44
  ],
41
45
  })
42
46
 
43
47
  closePromise = new Promise((resolve) => {
44
48
  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...')
49
+ if (code === 4171)
57
50
  startChild(file, args)
58
- }
51
+
52
+ if (code === 4172)
53
+ return process.exit()
54
+
59
55
  child = undefined
60
56
 
61
57
  resolve()
@@ -80,7 +76,7 @@ process.on('SIGINT', () => {
80
76
 
81
77
  cli
82
78
  .command('init [root]', 'init config file')
83
- .allowUnknownOptions()
79
+ // .allowUnknownOptions()
84
80
  .option('-t,--tsconfig <tsconfig>', 'init tsconfig file', {
85
81
  default: 'tsconfig.json',
86
82
  })
@@ -88,22 +84,82 @@ cli
88
84
  if (root)
89
85
  process.chdir(root)
90
86
 
87
+ let hasUnimport
88
+
89
+ try {
90
+ await import('unimport')
91
+ hasUnimport = true
92
+ }
93
+
94
+ catch (e) {
95
+ hasUnimport = false
96
+ }
97
+
91
98
  const tsconfigPath = options.tsconfig
92
- const psconfigPath = options.config
99
+ const psconfigPath = process.env.PS_CONFIG_FILE || options.config
93
100
 
94
101
  if (!fse.existsSync(tsconfigPath)) {
95
102
  log(`create ${tsconfigPath}`)
96
103
 
97
- await fse.copyFile(
98
- resolve(__dirname, '../assets/tsconfig.json'),
104
+ await fse.outputJSON(
99
105
  tsconfigPath,
106
+ {
107
+ compilerOptions: {
108
+ target: 'esnext',
109
+ useDefineForClassFields: false,
110
+ experimentalDecorators: true,
111
+ emitDecoratorMetadata: true,
112
+ module: 'esnext',
113
+ lib: ['esnext', 'DOM'],
114
+ paths: {
115
+
116
+ },
117
+ strictPropertyInitialization: false,
118
+ moduleResolution: 'bundler',
119
+ strict: true,
120
+ resolveJsonModule: true,
121
+ esModuleInterop: true,
122
+ noEmit: true,
123
+ noUnusedLocals: true,
124
+ noUnusedParameters: true,
125
+ noImplicitReturns: true,
126
+ skipLibCheck: true,
127
+ },
128
+ include: ['.', hasUnimport ? (process.env.PS_DTS_PATH || 'ps.d.ts') : undefined],
129
+ },
130
+
100
131
  )
101
132
  }
102
133
 
103
134
  if (!fse.existsSync(psconfigPath)) {
104
135
  log(`create ${psconfigPath}`)
105
136
 
106
- await fse.copyFile(resolve(__dirname, '../assets/ps.json'), psconfigPath)
137
+ await fse.outputJSON(psconfigPath, {
138
+ $schema: './node_modules/phecda-server/assets/schema.json',
139
+ resolve: [
140
+ {
141
+ source: 'controller',
142
+ importer: 'http',
143
+ path: '.ps/http.js',
144
+ },
145
+ {
146
+ source: 'rpc',
147
+ importer: 'client',
148
+ path: '.ps/rpc.js',
149
+ },
150
+ ],
151
+ unimport: hasUnimport && {
152
+ dirs: [
153
+ '.',
154
+ ],
155
+ dirsScanOptions: {
156
+ filePatterns: [
157
+ '*.{service,controller,module,rpc,solo,guard,extension,pipe,filter,addon}.ts',
158
+ ],
159
+ },
160
+ },
161
+ moduleFile: [],
162
+ })
107
163
  }
108
164
 
109
165
  log('init finish')
@@ -112,12 +168,13 @@ cli
112
168
  cli
113
169
  .command('<file> [root]', 'run file')
114
170
  .alias('run')
115
- .allowUnknownOptions()
116
- .alias('run')
117
- .option('-p,--prod [prod]', 'prod mode', {
171
+ // .allowUnknownOptions()
172
+ .option('-p,--prod', 'prod mode', {
118
173
  default: false,
119
174
  })
120
175
  .action((file, root, options) => {
176
+ const nodeArgs = options.nodeArgs.split(' ').filter(Boolean)
177
+
121
178
  if (root)
122
179
  process.chdir(root)
123
180
 
@@ -126,11 +183,11 @@ cli
126
183
  else
127
184
  process.env.NODE_ENV = 'development'
128
185
 
129
- process.env.PS_CONFIG_FILE = options.config
186
+ process.env.PS_CONFIG_FILE = process.env.PS_CONFIG_FILE || options.config
130
187
 
131
188
  log('process start!')
132
189
 
133
- startChild(file, options['--'])
190
+ startChild(file, nodeArgs)
134
191
  console.log(`${pc.green('->')} press ${pc.green('e')} to exit`)
135
192
  console.log(`${pc.green('->')} press ${pc.green('r')} to relaunch`)
136
193
  console.log(`${pc.green('->')} press ${pc.green('c')} to clear terminal`)
@@ -143,12 +200,12 @@ cli
143
200
  if (closePromise)
144
201
  await closePromise
145
202
  log('relaunch...')
146
- startChild(file, options['--'])
203
+ startChild(file, nodeArgs)
147
204
  }
148
205
  else {
149
206
  log('relaunch...')
150
207
 
151
- startChild(file, options['--'])
208
+ startChild(file, nodeArgs)
152
209
  }
153
210
  }
154
211
  if (input === 'e')
@@ -161,13 +218,15 @@ cli
161
218
 
162
219
  cli
163
220
  .command('generate <file> [root]', 'generate code(mainly for ci)')
164
- .allowUnknownOptions()
221
+ // .allowUnknownOptions()
165
222
  .action((file, root, options) => {
223
+ const nodeArgs = options.nodeArgs.split(' ').filter(Boolean)
224
+
166
225
  if (root)
167
226
  process.chdir(root)
168
227
  process.env.PS_GENERATE = 'true'
169
- process.env.PS_CONFIG_FILE = options.config
170
- startChild(file, options['--'])
228
+ process.env.PS_CONFIG_FILE = process.env.PS_CONFIG_FILE || options.config
229
+ startChild(file, nodeArgs)
171
230
  })
172
231
 
173
232
  cli.help()
@@ -0,0 +1,258 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+ var _chunkRLFCI3RGjs = require('./chunk-RLFCI3RG.js');
4
+
5
+ // src/decorators/param.ts
6
+ var _phecdacore = require('phecda-core');
7
+ function BaseParam(data) {
8
+ return (target, property, index) => {
9
+ if (!property) return;
10
+ _phecdacore.setMeta.call(void 0, target, property, index, data);
11
+ };
12
+ }
13
+ _chunkRLFCI3RGjs.__name.call(void 0, BaseParam, "BaseParam");
14
+ function Body(key = "") {
15
+ return BaseParam({
16
+ type: "body",
17
+ key
18
+ });
19
+ }
20
+ _chunkRLFCI3RGjs.__name.call(void 0, Body, "Body");
21
+ function Head(key) {
22
+ return BaseParam({
23
+ type: "headers",
24
+ key: key.toLowerCase()
25
+ });
26
+ }
27
+ _chunkRLFCI3RGjs.__name.call(void 0, Head, "Head");
28
+ function Query(key = "") {
29
+ return BaseParam({
30
+ type: "query",
31
+ key
32
+ });
33
+ }
34
+ _chunkRLFCI3RGjs.__name.call(void 0, Query, "Query");
35
+ function Param(key) {
36
+ return BaseParam({
37
+ type: "params",
38
+ key
39
+ });
40
+ }
41
+ _chunkRLFCI3RGjs.__name.call(void 0, Param, "Param");
42
+ function Arg(target, k, index) {
43
+ BaseParam({
44
+ type: "args",
45
+ key: `${index}`
46
+ })(target, k, index);
47
+ }
48
+ _chunkRLFCI3RGjs.__name.call(void 0, Arg, "Arg");
49
+ function OneFile(key = "") {
50
+ return BaseParam({
51
+ type: "file",
52
+ key
53
+ });
54
+ }
55
+ _chunkRLFCI3RGjs.__name.call(void 0, OneFile, "OneFile");
56
+ function ManyFiles(key = "") {
57
+ return BaseParam({
58
+ type: "files",
59
+ key
60
+ });
61
+ }
62
+ _chunkRLFCI3RGjs.__name.call(void 0, ManyFiles, "ManyFiles");
63
+
64
+ // src/decorators/aop.ts
65
+
66
+ function Guard(...guards) {
67
+ return (target, property) => {
68
+ _phecdacore.setMeta.call(void 0, target, property, void 0, {
69
+ guards
70
+ });
71
+ };
72
+ }
73
+ _chunkRLFCI3RGjs.__name.call(void 0, Guard, "Guard");
74
+ function Addon(...addons) {
75
+ return (target, property) => {
76
+ _phecdacore.setMeta.call(void 0, target, property, void 0, {
77
+ addons
78
+ });
79
+ };
80
+ }
81
+ _chunkRLFCI3RGjs.__name.call(void 0, Addon, "Addon");
82
+ function Filter(filter) {
83
+ return (target, property) => {
84
+ _phecdacore.setMeta.call(void 0, target, property, void 0, {
85
+ filter
86
+ });
87
+ };
88
+ }
89
+ _chunkRLFCI3RGjs.__name.call(void 0, Filter, "Filter");
90
+ function Pipe(pipe) {
91
+ return (target, property, index) => {
92
+ if (typeof index === "number") {
93
+ BaseParam({
94
+ pipe
95
+ })(target, property, index);
96
+ return;
97
+ }
98
+ _phecdacore.setMeta.call(void 0, target, property, void 0, {
99
+ pipe
100
+ });
101
+ };
102
+ }
103
+ _chunkRLFCI3RGjs.__name.call(void 0, Pipe, "Pipe");
104
+
105
+ // src/decorators/http.ts
106
+
107
+ function Route(route, type) {
108
+ return (target, property) => {
109
+ _phecdacore.setMeta.call(void 0, target, property, void 0, {
110
+ http: {
111
+ route,
112
+ type
113
+ }
114
+ });
115
+ };
116
+ }
117
+ _chunkRLFCI3RGjs.__name.call(void 0, Route, "Route");
118
+ function Header(headers) {
119
+ return (target, property) => {
120
+ _phecdacore.setMeta.call(void 0, target, property, void 0, {
121
+ http: {
122
+ headers
123
+ }
124
+ });
125
+ };
126
+ }
127
+ _chunkRLFCI3RGjs.__name.call(void 0, Header, "Header");
128
+ function Get(route = "") {
129
+ return Route(route, "get");
130
+ }
131
+ _chunkRLFCI3RGjs.__name.call(void 0, Get, "Get");
132
+ function Post(route = "") {
133
+ return Route(route, "post");
134
+ }
135
+ _chunkRLFCI3RGjs.__name.call(void 0, Post, "Post");
136
+ function Put(route = "") {
137
+ return Route(route, "put");
138
+ }
139
+ _chunkRLFCI3RGjs.__name.call(void 0, Put, "Put");
140
+ function Search(route = "") {
141
+ return Route(route, "search");
142
+ }
143
+ _chunkRLFCI3RGjs.__name.call(void 0, Search, "Search");
144
+ function Patch(route = "") {
145
+ return Route(route, "patch");
146
+ }
147
+ _chunkRLFCI3RGjs.__name.call(void 0, Patch, "Patch");
148
+ function Delete(route = "") {
149
+ return Route(route, "delete");
150
+ }
151
+ _chunkRLFCI3RGjs.__name.call(void 0, Delete, "Delete");
152
+ function Controller(prefix = "") {
153
+ return (target) => {
154
+ _phecdacore.setMeta.call(void 0, target, void 0, void 0, {
155
+ controller: "http",
156
+ http: {
157
+ prefix
158
+ }
159
+ });
160
+ };
161
+ }
162
+ _chunkRLFCI3RGjs.__name.call(void 0, Controller, "Controller");
163
+
164
+ // src/decorators/rpc.ts
165
+
166
+ function Queue(queue = "", isEvent) {
167
+ return (target, property) => {
168
+ _phecdacore.setMeta.call(void 0, target, property, void 0, {
169
+ rpc: {
170
+ queue,
171
+ isEvent
172
+ }
173
+ });
174
+ };
175
+ }
176
+ _chunkRLFCI3RGjs.__name.call(void 0, Queue, "Queue");
177
+ function Rpc() {
178
+ return (target) => {
179
+ _phecdacore.setMeta.call(void 0, target, void 0, void 0, {
180
+ controller: "rpc"
181
+ });
182
+ };
183
+ }
184
+ _chunkRLFCI3RGjs.__name.call(void 0, Rpc, "Rpc");
185
+
186
+ // src/decorators/ctx.ts
187
+
188
+ var Ctx = /* @__PURE__ */ _chunkRLFCI3RGjs.__name.call(void 0, (target, property) => {
189
+ _phecdacore.setMeta.call(void 0, target, _phecdacore.SHARE_KEY, void 0, {
190
+ ctxs: [
191
+ property
192
+ ]
193
+ });
194
+ }, "Ctx");
195
+ function Define(key, value) {
196
+ return (target, property, index) => {
197
+ if (typeof index === "number") {
198
+ _phecdacore.setMeta.call(void 0, target, property, void 0, {
199
+ params: [
200
+ {
201
+ define: {
202
+ [key]: value
203
+ },
204
+ index
205
+ }
206
+ ]
207
+ });
208
+ } else {
209
+ _phecdacore.setMeta.call(void 0, target, property, void 0, {
210
+ define: {
211
+ [key]: value
212
+ }
213
+ });
214
+ }
215
+ };
216
+ }
217
+ _chunkRLFCI3RGjs.__name.call(void 0, Define, "Define");
218
+
219
+ // src/decorators/openapi.ts
220
+
221
+ function ApiDoc(config) {
222
+ return function(target, propertyKey, descriptor) {
223
+ _phecdacore.setMeta.call(void 0, target, propertyKey, void 0, {
224
+ openapi: config
225
+ });
226
+ };
227
+ }
228
+ _chunkRLFCI3RGjs.__name.call(void 0, ApiDoc, "ApiDoc");
229
+
230
+
231
+
232
+
233
+
234
+
235
+
236
+
237
+
238
+
239
+
240
+
241
+
242
+
243
+
244
+
245
+
246
+
247
+
248
+
249
+
250
+
251
+
252
+
253
+
254
+
255
+
256
+
257
+ exports.BaseParam = BaseParam; exports.Body = Body; exports.Head = Head; exports.Query = Query; exports.Param = Param; exports.Arg = Arg; exports.OneFile = OneFile; exports.ManyFiles = ManyFiles; exports.Guard = Guard; exports.Addon = Addon; exports.Filter = Filter; exports.Pipe = Pipe; exports.Route = Route; exports.Header = Header; exports.Get = Get; exports.Post = Post; exports.Put = Put; exports.Search = Search; exports.Patch = Patch; exports.Delete = Delete; exports.Controller = Controller; exports.Queue = Queue; exports.Rpc = Rpc; exports.Ctx = Ctx; exports.Define = Define; exports.ApiDoc = ApiDoc;
258
+ //# sourceMappingURL=chunk-5SUY5UVC.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["d:\\myproject\\phecda\\packages\\server\\dist\\chunk-5SUY5UVC.js"],"names":[],"mappings":"AAAA;AACE;AACF,sDAA4B;AAC5B;AACA;AACA,yCAAqC;AACrC,SAAS,SAAS,CAAC,IAAI,EAAE;AACzB,EAAE,OAAO,CAAC,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,GAAG;AACtC,IAAI,GAAG,CAAC,CAAC,QAAQ,EAAE,MAAM;AACzB,IAAI,iCAAO,MAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,IAAI,CAAC;AAC1C,EAAE,CAAC;AACH;AACA,qCAAM,SAAU,EAAE,WAAW,CAAC;AAC9B,SAAS,IAAI,CAAC,IAAI,EAAE,EAAE,EAAE;AACxB,EAAE,OAAO,SAAS,CAAC;AACnB,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI;AACJ,EAAE,CAAC,CAAC;AACJ;AACA,qCAAM,IAAK,EAAE,MAAM,CAAC;AACpB,SAAS,IAAI,CAAC,GAAG,EAAE;AACnB,EAAE,OAAO,SAAS,CAAC;AACnB,IAAI,IAAI,EAAE,SAAS;AACnB,IAAI,GAAG,EAAE,GAAG,CAAC,WAAW,CAAC;AACzB,EAAE,CAAC,CAAC;AACJ;AACA,qCAAM,IAAK,EAAE,MAAM,CAAC;AACpB,SAAS,KAAK,CAAC,IAAI,EAAE,EAAE,EAAE;AACzB,EAAE,OAAO,SAAS,CAAC;AACnB,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI;AACJ,EAAE,CAAC,CAAC;AACJ;AACA,qCAAM,KAAM,EAAE,OAAO,CAAC;AACtB,SAAS,KAAK,CAAC,GAAG,EAAE;AACpB,EAAE,OAAO,SAAS,CAAC;AACnB,IAAI,IAAI,EAAE,QAAQ;AAClB,IAAI;AACJ,EAAE,CAAC,CAAC;AACJ;AACA,qCAAM,KAAM,EAAE,OAAO,CAAC;AACtB,SAAS,GAAG,CAAC,MAAM,EAAE,CAAC,EAAE,KAAK,EAAE;AAC/B,EAAE,SAAS,CAAC;AACZ,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,GAAG,EAAE,CAAC,EAAA;AACA,EAAA;AACA;AACA;AACA;AACA,EAAA;AACA,IAAA;AACA,IAAA;AACA,EAAA;AACA;AACA;AACA;AACA,EAAA;AACA,IAAA;AACA,IAAA;AACA,EAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAA;AACA,IAAA;AACA,MAAA;AACA,IAAA;AACA,EAAA;AACA;AACA;AACA;AACA,EAAA;AACA,IAAA;AACA,MAAA;AACA,IAAA;AACA,EAAA;AACA;AACA;AACA;AACA,EAAA;AACA,IAAA;AACA,MAAA;AACA,IAAA;AACA,EAAA;AACA;AACA;AACA;AACA,EAAA;AACA,IAAA;AACA,MAAA;AACA,QAAA;AACA,MAAA;AACA,MAAA;AACA,IAAA;AACA,IAAA;AACA,MAAA;AACA,IAAA;AACA,EAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAA;AACA,IAAA;AACA,MAAA;AACA,QAAA;AACA,QAAA;AACA,MAAA;AACA,IAAA;AACA,EAAA;AACA;AACA;AACA;AACA,EAAA;AACA,IAAA;AACA,MAAA;AACA,QAAA;AACA,MAAA;AACA,IAAA;AACA,EAAA;AACA;AACA;AACA;AACA,EAAA;AACA;AACA;AACA;AACA,EAAA;AACA;AACA;AACA;AACA,EAAA;AACA;AACA;AACA;AACA,EAAA;AACA;AACA;AACA;AACA,EAAA;AACA;AACA;AACA;AACA,EAAA;AACA;AACA;AACA;AACA,EAAA;AACA,IAAA;AACA,MAAA;AACA,MAAA;AACA,QAAA;AACA,MAAA;AACA,IAAA;AACA,EAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAA;AACA,IAAA;AACA,MAAA;AACA,QAAA;AACA,QAAA;AACA,MAAA;AACA,IAAA;AACA,EAAA;AACA;AACA;AACA;AACA,EAAA;AACA,IAAA;AACA,MAAA;AACA,IAAA;AACA,EAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAA;AACA,IAAA;AACA,MAAA;AACA,IAAA;AACA,EAAA;AACA;AACA;AACA,EAAA;AACA,IAAA;AACA,MAAA;AACA,QAAA;AACA,UAAA;AACA,YAAA;AACA,cAAA;AACA,YAAA;AACA,YAAA;AACA,UAAA;AACA,QAAA;AACA,MAAA;AACA,IAAA;AACA,MAAA;AACA,QAAA;AACA,UAAA;AACA,QAAA;AACA,MAAA;AACA,IAAA;AACA,EAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAA;AACA,IAAA;AACA,MAAA;AACA,IAAA;AACA,EAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","file":"D:\\myproject\\phecda\\packages\\server\\dist\\chunk-5SUY5UVC.js","sourcesContent":[null]}