phecda-server 5.2.4 → 5.2.6

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 (77) hide show
  1. package/dist/{chunk-IJNA24EZ.mjs → chunk-5E2AVYP2.mjs} +39 -55
  2. package/dist/{chunk-AWY6FTH4.js → chunk-AUAAKHWS.js} +70 -86
  3. package/dist/{chunk-Q4AGVGVA.mjs → chunk-BZKJ5NBU.mjs} +103 -105
  4. package/dist/{chunk-LGP5AT6W.mjs → chunk-LHLQIQPH.mjs} +51 -70
  5. package/dist/{chunk-VYDBNZJ2.mjs → chunk-MESZCLSS.mjs} +1 -10
  6. package/dist/{chunk-UJAI73O6.js → chunk-N4ULJDEQ.js} +62 -81
  7. package/dist/{chunk-H6NYBVBV.js → chunk-QYX5Q7KO.js} +130 -132
  8. package/dist/{chunk-FNJWO324.js → chunk-RVWBJ6LV.js} +2 -11
  9. package/dist/core-Bc2ENEHX.d.mts +29 -0
  10. package/dist/{core-7f6d2be6.d.ts → core-dx9E5x2N.d.ts} +7 -5
  11. package/dist/helper.d.mts +27 -0
  12. package/dist/helper.d.ts +1 -1
  13. package/dist/helper.js +3 -3
  14. package/dist/helper.mjs +2 -2
  15. package/dist/index.d.mts +244 -0
  16. package/dist/index.d.ts +16 -18
  17. package/dist/index.js +81 -90
  18. package/dist/index.mjs +61 -70
  19. package/dist/rpc/bullmq/index.d.mts +21 -0
  20. package/dist/rpc/bullmq/index.d.ts +4 -4
  21. package/dist/rpc/bullmq/index.js +30 -43
  22. package/dist/rpc/bullmq/index.mjs +20 -33
  23. package/dist/rpc/kafka/index.d.mts +24 -0
  24. package/dist/rpc/kafka/index.d.ts +4 -4
  25. package/dist/rpc/kafka/index.js +25 -34
  26. package/dist/rpc/kafka/index.mjs +17 -26
  27. package/dist/rpc/nats/index.d.mts +15 -0
  28. package/dist/rpc/nats/index.d.ts +4 -4
  29. package/dist/rpc/nats/index.js +33 -46
  30. package/dist/rpc/nats/index.mjs +24 -37
  31. package/dist/rpc/rabbitmq/index.d.mts +16 -0
  32. package/dist/rpc/rabbitmq/index.d.ts +4 -4
  33. package/dist/rpc/rabbitmq/index.js +34 -46
  34. package/dist/rpc/rabbitmq/index.mjs +23 -35
  35. package/dist/rpc/redis/index.d.mts +23 -0
  36. package/dist/rpc/redis/index.d.ts +4 -4
  37. package/dist/rpc/redis/index.js +27 -38
  38. package/dist/rpc/redis/index.mjs +18 -29
  39. package/dist/server/elysia/index.d.mts +18 -0
  40. package/dist/server/elysia/index.d.ts +4 -4
  41. package/dist/server/elysia/index.js +22 -27
  42. package/dist/server/elysia/index.mjs +8 -13
  43. package/dist/server/express/index.d.mts +18 -0
  44. package/dist/server/express/index.d.ts +4 -4
  45. package/dist/server/express/index.js +24 -33
  46. package/dist/server/express/index.mjs +11 -20
  47. package/dist/server/fastify/index.d.mts +20 -0
  48. package/dist/server/fastify/index.d.ts +4 -4
  49. package/dist/server/fastify/index.js +23 -30
  50. package/dist/server/fastify/index.mjs +10 -17
  51. package/dist/server/h3/index.d.mts +16 -0
  52. package/dist/server/h3/index.d.ts +4 -4
  53. package/dist/server/h3/index.js +21 -25
  54. package/dist/server/h3/index.mjs +10 -14
  55. package/dist/server/hono/index.d.mts +16 -0
  56. package/dist/server/hono/index.d.ts +4 -4
  57. package/dist/server/hono/index.js +22 -30
  58. package/dist/server/hono/index.mjs +10 -18
  59. package/dist/server/hyper-express/index.d.mts +18 -0
  60. package/dist/server/hyper-express/index.d.ts +4 -4
  61. package/dist/server/hyper-express/index.js +23 -32
  62. package/dist/server/hyper-express/index.mjs +11 -20
  63. package/dist/server/koa/index.d.mts +18 -0
  64. package/dist/server/koa/index.d.ts +4 -4
  65. package/dist/server/koa/index.js +22 -29
  66. package/dist/server/koa/index.mjs +9 -16
  67. package/dist/test.d.mts +18 -0
  68. package/dist/test.d.ts +4 -4
  69. package/dist/test.js +19 -27
  70. package/dist/test.mjs +16 -24
  71. package/dist/{types-81be0ba3.d.ts → types-BlIBlnVT.d.mts} +1 -2
  72. package/dist/types-BlIBlnVT.d.ts +107 -0
  73. package/dist/{types-f3b79218.d.ts → types-CJSkC9tO.d.ts} +2 -2
  74. package/dist/types-Dp5ixUqW.d.mts +27 -0
  75. package/dist/{types-0a76c4bc.d.ts → types-PY43OKEP.d.ts} +2 -2
  76. package/dist/types-vF4Hvnvo.d.mts +17 -0
  77. package/package.json +3 -3
@@ -1,30 +1,26 @@
1
1
  import {
2
2
  mergeObject,
3
3
  shallowClone
4
- } from "./chunk-Q4AGVGVA.mjs";
4
+ } from "./chunk-BZKJ5NBU.mjs";
5
5
  import {
6
6
  __name
7
- } from "./chunk-VYDBNZJ2.mjs";
7
+ } from "./chunk-MESZCLSS.mjs";
8
8
 
9
9
  // src/decorators/param.ts
10
10
  import { getState, setPropertyState } from "phecda-core";
11
11
  function BaseParam(data) {
12
12
  return (target, k, index) => {
13
- if (!k)
14
- return;
13
+ if (!k) return;
15
14
  setPropertyState(target, k, (state) => {
16
- if (!state.params)
17
- state.params = [
18
- ...getState(target, k)?.params || []
19
- ].map(shallowClone);
15
+ if (!state.params) state.params = [
16
+ ...getState(target, k)?.params || []
17
+ ].map(shallowClone);
20
18
  const existItem = state.params.find((item) => item.index === index);
21
- if (existItem)
22
- Object.assign(existItem, data);
23
- else
24
- state.params.push({
25
- ...data,
26
- index
27
- });
19
+ if (existItem) Object.assign(existItem, data);
20
+ else state.params.push({
21
+ ...data,
22
+ index
23
+ });
28
24
  });
29
25
  };
30
26
  }
@@ -70,13 +66,11 @@ import { getState as getState2, setPropertyState as setPropertyState2 } from "ph
70
66
  function Guard(...guards) {
71
67
  return (target, k) => {
72
68
  setPropertyState2(target, k, (state) => {
73
- if (!state.guards)
74
- state.guards = /* @__PURE__ */ new Set([
75
- ...getState2(target, k)?.guards || []
76
- ]);
69
+ if (!state.guards) state.guards = /* @__PURE__ */ new Set([
70
+ ...getState2(target, k)?.guards || []
71
+ ]);
77
72
  guards.forEach((guard) => {
78
- if (state.guards.has(guard))
79
- state.guards.delete(guard);
73
+ if (state.guards.has(guard)) state.guards.delete(guard);
80
74
  state.guards.add(guard);
81
75
  });
82
76
  });
@@ -86,13 +80,11 @@ __name(Guard, "Guard");
86
80
  function Plugin(...plugins) {
87
81
  return (target, k) => {
88
82
  setPropertyState2(target, k, (state) => {
89
- if (!state.plugins)
90
- state.plugins = /* @__PURE__ */ new Set([
91
- ...getState2(target, k)?.plugins || []
92
- ]);
83
+ if (!state.plugins) state.plugins = /* @__PURE__ */ new Set([
84
+ ...getState2(target, k)?.plugins || []
85
+ ]);
93
86
  plugins.forEach((plugin) => {
94
- if (state.plugins.has(plugin))
95
- state.plugins.delete(plugin);
87
+ if (state.plugins.has(plugin)) state.plugins.delete(plugin);
96
88
  state.plugins.add(plugin);
97
89
  });
98
90
  });
@@ -102,13 +94,11 @@ __name(Plugin, "Plugin");
102
94
  function Interceptor(...interceptors) {
103
95
  return (target, k) => {
104
96
  setPropertyState2(target, k, (state) => {
105
- if (!state.interceptors)
106
- state.interceptors = /* @__PURE__ */ new Set([
107
- ...getState2(target, k)?.interceptors || []
108
- ]);
97
+ if (!state.interceptors) state.interceptors = /* @__PURE__ */ new Set([
98
+ ...getState2(target, k)?.interceptors || []
99
+ ]);
109
100
  interceptors.forEach((interceptor) => {
110
- if (state.interceptors.has(interceptor))
111
- state.interceptors.delete(interceptor);
101
+ if (state.interceptors.has(interceptor)) state.interceptors.delete(interceptor);
112
102
  state.interceptors.add(interceptor);
113
103
  });
114
104
  });
@@ -150,8 +140,7 @@ __name(Route, "Route");
150
140
  function Header(headers) {
151
141
  return (target, k) => {
152
142
  setPropertyState3(target, k, (state) => {
153
- if (!state.http)
154
- state.http = mergeObject(getState3(target, k)?.http);
143
+ if (!state.http) state.http = mergeObject(getState3(target, k)?.http);
155
144
  state.http = mergeObject(state.http, {
156
145
  headers: mergeObject(state.http?.headers, headers)
157
146
  });
@@ -230,10 +219,9 @@ function Injectable() {
230
219
  __name(Injectable, "Injectable");
231
220
  var Ctx = /* @__PURE__ */ __name((target, key) => {
232
221
  setPropertyState5(target, SHARE_KEY, (state) => {
233
- if (!state.ctxs)
234
- state.ctxs = /* @__PURE__ */ new Set([
235
- ...getState5(target)?.ctxs || []
236
- ]);
222
+ if (!state.ctxs) state.ctxs = /* @__PURE__ */ new Set([
223
+ ...getState5(target)?.ctxs || []
224
+ ]);
237
225
  state.ctxs.add(key);
238
226
  });
239
227
  }, "Ctx");
@@ -242,29 +230,25 @@ function Define(key, value) {
242
230
  if (typeof index === "number") {
243
231
  setPropertyState5(target, k, (state) => {
244
232
  const parentState = getState5(target, k)?.params || [];
245
- if (!state.params)
246
- state.params = [
247
- ...parentState
248
- ].map(shallowClone);
233
+ if (!state.params) state.params = [
234
+ ...parentState
235
+ ].map(shallowClone);
249
236
  const existItem = state.params.find((item) => item.index === index);
250
- if (existItem)
251
- existItem.define = mergeObject(existItem.define, {
237
+ if (existItem) existItem.define = mergeObject(existItem.define, {
238
+ [key]: value
239
+ });
240
+ else state.params.push({
241
+ define: {
252
242
  [key]: value
253
- });
254
- else
255
- state.params.push({
256
- define: {
257
- [key]: value
258
- },
259
- index
260
- });
243
+ },
244
+ index
245
+ });
261
246
  });
262
247
  return;
263
248
  }
264
249
  setPropertyState5(target, k, (state) => {
265
250
  const parentState = getState5(target, k)?.define;
266
- if (!state.define)
267
- state.define = mergeObject(parentState);
251
+ if (!state.define) state.define = mergeObject(parentState);
268
252
  state.define[key] = value;
269
253
  });
270
254
  };
@@ -1,126 +1,116 @@
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
3
 
4
- var _chunkH6NYBVBVjs = require('./chunk-H6NYBVBV.js');
4
+ var _chunkQYX5Q7KOjs = require('./chunk-QYX5Q7KO.js');
5
5
 
6
6
 
7
- var _chunkFNJWO324js = require('./chunk-FNJWO324.js');
7
+ var _chunkRVWBJ6LVjs = require('./chunk-RVWBJ6LV.js');
8
8
 
9
9
  // src/decorators/param.ts
10
10
  var _phecdacore = require('phecda-core');
11
11
  function BaseParam(data) {
12
12
  return (target, k, index) => {
13
- if (!k)
14
- return;
13
+ if (!k) return;
15
14
  _phecdacore.setPropertyState.call(void 0, target, k, (state) => {
16
- if (!state.params)
17
- state.params = [
18
- ..._optionalChain([_phecdacore.getState.call(void 0, target, k), 'optionalAccess', _ => _.params]) || []
19
- ].map(_chunkH6NYBVBVjs.shallowClone);
15
+ if (!state.params) state.params = [
16
+ ..._optionalChain([_phecdacore.getState.call(void 0, target, k), 'optionalAccess', _ => _.params]) || []
17
+ ].map(_chunkQYX5Q7KOjs.shallowClone);
20
18
  const existItem = state.params.find((item) => item.index === index);
21
- if (existItem)
22
- Object.assign(existItem, data);
23
- else
24
- state.params.push({
25
- ...data,
26
- index
27
- });
19
+ if (existItem) Object.assign(existItem, data);
20
+ else state.params.push({
21
+ ...data,
22
+ index
23
+ });
28
24
  });
29
25
  };
30
26
  }
31
- _chunkFNJWO324js.__name.call(void 0, BaseParam, "BaseParam");
27
+ _chunkRVWBJ6LVjs.__name.call(void 0, BaseParam, "BaseParam");
32
28
  function Body(key = "") {
33
29
  return BaseParam({
34
30
  type: "body",
35
31
  key
36
32
  });
37
33
  }
38
- _chunkFNJWO324js.__name.call(void 0, Body, "Body");
34
+ _chunkRVWBJ6LVjs.__name.call(void 0, Body, "Body");
39
35
  function Head(key) {
40
36
  return BaseParam({
41
37
  type: "headers",
42
38
  key: key.toLowerCase()
43
39
  });
44
40
  }
45
- _chunkFNJWO324js.__name.call(void 0, Head, "Head");
41
+ _chunkRVWBJ6LVjs.__name.call(void 0, Head, "Head");
46
42
  function Query(key = "") {
47
43
  return BaseParam({
48
44
  type: "query",
49
45
  key
50
46
  });
51
47
  }
52
- _chunkFNJWO324js.__name.call(void 0, Query, "Query");
48
+ _chunkRVWBJ6LVjs.__name.call(void 0, Query, "Query");
53
49
  function Param(key) {
54
50
  return BaseParam({
55
51
  type: "params",
56
52
  key
57
53
  });
58
54
  }
59
- _chunkFNJWO324js.__name.call(void 0, Param, "Param");
55
+ _chunkRVWBJ6LVjs.__name.call(void 0, Param, "Param");
60
56
  function Arg(target, k, index) {
61
57
  BaseParam({
62
58
  type: "args",
63
59
  key: `${index}`
64
60
  })(target, k, index);
65
61
  }
66
- _chunkFNJWO324js.__name.call(void 0, Arg, "Arg");
62
+ _chunkRVWBJ6LVjs.__name.call(void 0, Arg, "Arg");
67
63
 
68
64
  // src/decorators/aop.ts
69
65
 
70
66
  function Guard(...guards) {
71
67
  return (target, k) => {
72
68
  _phecdacore.setPropertyState.call(void 0, target, k, (state) => {
73
- if (!state.guards)
74
- state.guards = /* @__PURE__ */ new Set([
75
- ..._optionalChain([_phecdacore.getState.call(void 0, target, k), 'optionalAccess', _2 => _2.guards]) || []
76
- ]);
69
+ if (!state.guards) state.guards = /* @__PURE__ */ new Set([
70
+ ..._optionalChain([_phecdacore.getState.call(void 0, target, k), 'optionalAccess', _2 => _2.guards]) || []
71
+ ]);
77
72
  guards.forEach((guard) => {
78
- if (state.guards.has(guard))
79
- state.guards.delete(guard);
73
+ if (state.guards.has(guard)) state.guards.delete(guard);
80
74
  state.guards.add(guard);
81
75
  });
82
76
  });
83
77
  };
84
78
  }
85
- _chunkFNJWO324js.__name.call(void 0, Guard, "Guard");
79
+ _chunkRVWBJ6LVjs.__name.call(void 0, Guard, "Guard");
86
80
  function Plugin(...plugins) {
87
81
  return (target, k) => {
88
82
  _phecdacore.setPropertyState.call(void 0, target, k, (state) => {
89
- if (!state.plugins)
90
- state.plugins = /* @__PURE__ */ new Set([
91
- ..._optionalChain([_phecdacore.getState.call(void 0, target, k), 'optionalAccess', _3 => _3.plugins]) || []
92
- ]);
83
+ if (!state.plugins) state.plugins = /* @__PURE__ */ new Set([
84
+ ..._optionalChain([_phecdacore.getState.call(void 0, target, k), 'optionalAccess', _3 => _3.plugins]) || []
85
+ ]);
93
86
  plugins.forEach((plugin) => {
94
- if (state.plugins.has(plugin))
95
- state.plugins.delete(plugin);
87
+ if (state.plugins.has(plugin)) state.plugins.delete(plugin);
96
88
  state.plugins.add(plugin);
97
89
  });
98
90
  });
99
91
  };
100
92
  }
101
- _chunkFNJWO324js.__name.call(void 0, Plugin, "Plugin");
93
+ _chunkRVWBJ6LVjs.__name.call(void 0, Plugin, "Plugin");
102
94
  function Interceptor(...interceptors) {
103
95
  return (target, k) => {
104
96
  _phecdacore.setPropertyState.call(void 0, target, k, (state) => {
105
- if (!state.interceptors)
106
- state.interceptors = /* @__PURE__ */ new Set([
107
- ..._optionalChain([_phecdacore.getState.call(void 0, target, k), 'optionalAccess', _4 => _4.interceptors]) || []
108
- ]);
97
+ if (!state.interceptors) state.interceptors = /* @__PURE__ */ new Set([
98
+ ..._optionalChain([_phecdacore.getState.call(void 0, target, k), 'optionalAccess', _4 => _4.interceptors]) || []
99
+ ]);
109
100
  interceptors.forEach((interceptor) => {
110
- if (state.interceptors.has(interceptor))
111
- state.interceptors.delete(interceptor);
101
+ if (state.interceptors.has(interceptor)) state.interceptors.delete(interceptor);
112
102
  state.interceptors.add(interceptor);
113
103
  });
114
104
  });
115
105
  };
116
106
  }
117
- _chunkFNJWO324js.__name.call(void 0, Interceptor, "Interceptor");
107
+ _chunkRVWBJ6LVjs.__name.call(void 0, Interceptor, "Interceptor");
118
108
  function Filter(filter) {
119
109
  return (target, k) => {
120
110
  _phecdacore.setPropertyState.call(void 0, target, k, (state) => state.filter = filter);
121
111
  };
122
112
  }
123
- _chunkFNJWO324js.__name.call(void 0, Filter, "Filter");
113
+ _chunkRVWBJ6LVjs.__name.call(void 0, Filter, "Filter");
124
114
  function Pipe(pipe) {
125
115
  return (target, k, index) => {
126
116
  if (typeof index === "number") {
@@ -132,87 +122,86 @@ function Pipe(pipe) {
132
122
  _phecdacore.setPropertyState.call(void 0, target, k, (state) => state.pipe = pipe);
133
123
  };
134
124
  }
135
- _chunkFNJWO324js.__name.call(void 0, Pipe, "Pipe");
125
+ _chunkRVWBJ6LVjs.__name.call(void 0, Pipe, "Pipe");
136
126
 
137
127
  // src/decorators/http.ts
138
128
 
139
129
  function Route(route, type) {
140
130
  return (target, k) => {
141
131
  _phecdacore.setPropertyState.call(void 0, target, k, (state) => {
142
- state.http = _chunkH6NYBVBVjs.mergeObject.call(void 0, state.http || _optionalChain([_phecdacore.getState.call(void 0, target, k), 'optionalAccess', _5 => _5.http]), {
132
+ state.http = _chunkQYX5Q7KOjs.mergeObject.call(void 0, state.http || _optionalChain([_phecdacore.getState.call(void 0, target, k), 'optionalAccess', _5 => _5.http]), {
143
133
  route,
144
134
  type
145
135
  });
146
136
  });
147
137
  };
148
138
  }
149
- _chunkFNJWO324js.__name.call(void 0, Route, "Route");
139
+ _chunkRVWBJ6LVjs.__name.call(void 0, Route, "Route");
150
140
  function Header(headers) {
151
141
  return (target, k) => {
152
142
  _phecdacore.setPropertyState.call(void 0, target, k, (state) => {
153
- if (!state.http)
154
- state.http = _chunkH6NYBVBVjs.mergeObject.call(void 0, _optionalChain([_phecdacore.getState.call(void 0, target, k), 'optionalAccess', _6 => _6.http]));
155
- state.http = _chunkH6NYBVBVjs.mergeObject.call(void 0, state.http, {
156
- headers: _chunkH6NYBVBVjs.mergeObject.call(void 0, _optionalChain([state, 'access', _7 => _7.http, 'optionalAccess', _8 => _8.headers]), headers)
143
+ if (!state.http) state.http = _chunkQYX5Q7KOjs.mergeObject.call(void 0, _optionalChain([_phecdacore.getState.call(void 0, target, k), 'optionalAccess', _6 => _6.http]));
144
+ state.http = _chunkQYX5Q7KOjs.mergeObject.call(void 0, state.http, {
145
+ headers: _chunkQYX5Q7KOjs.mergeObject.call(void 0, _optionalChain([state, 'access', _7 => _7.http, 'optionalAccess', _8 => _8.headers]), headers)
157
146
  });
158
147
  });
159
148
  };
160
149
  }
161
- _chunkFNJWO324js.__name.call(void 0, Header, "Header");
150
+ _chunkRVWBJ6LVjs.__name.call(void 0, Header, "Header");
162
151
  function Get(route = "") {
163
152
  return Route(route, "get");
164
153
  }
165
- _chunkFNJWO324js.__name.call(void 0, Get, "Get");
154
+ _chunkRVWBJ6LVjs.__name.call(void 0, Get, "Get");
166
155
  function Post(route = "") {
167
156
  return Route(route, "post");
168
157
  }
169
- _chunkFNJWO324js.__name.call(void 0, Post, "Post");
158
+ _chunkRVWBJ6LVjs.__name.call(void 0, Post, "Post");
170
159
  function Put(route = "") {
171
160
  return Route(route, "put");
172
161
  }
173
- _chunkFNJWO324js.__name.call(void 0, Put, "Put");
162
+ _chunkRVWBJ6LVjs.__name.call(void 0, Put, "Put");
174
163
  function Patch(route = "") {
175
164
  return Route(route, "patch");
176
165
  }
177
- _chunkFNJWO324js.__name.call(void 0, Patch, "Patch");
166
+ _chunkRVWBJ6LVjs.__name.call(void 0, Patch, "Patch");
178
167
  function Delete(route = "") {
179
168
  return Route(route, "delete");
180
169
  }
181
- _chunkFNJWO324js.__name.call(void 0, Delete, "Delete");
170
+ _chunkRVWBJ6LVjs.__name.call(void 0, Delete, "Delete");
182
171
  function Controller(prefix = "") {
183
172
  return (target) => {
184
173
  _phecdacore.setPropertyState.call(void 0, target, void 0, (state) => {
185
174
  state.controller = "http";
186
- state.http = _chunkH6NYBVBVjs.mergeObject.call(void 0, state.http || _optionalChain([_phecdacore.getState.call(void 0, target), 'optionalAccess', _9 => _9.http]), {
175
+ state.http = _chunkQYX5Q7KOjs.mergeObject.call(void 0, state.http || _optionalChain([_phecdacore.getState.call(void 0, target), 'optionalAccess', _9 => _9.http]), {
187
176
  prefix
188
177
  });
189
178
  });
190
179
  };
191
180
  }
192
- _chunkFNJWO324js.__name.call(void 0, Controller, "Controller");
181
+ _chunkRVWBJ6LVjs.__name.call(void 0, Controller, "Controller");
193
182
 
194
183
  // src/decorators/rpc.ts
195
184
 
196
185
  function Event(isEvent = true) {
197
186
  return (target, k) => {
198
187
  _phecdacore.setPropertyState.call(void 0, target, k, (state) => {
199
- state.rpc = _chunkH6NYBVBVjs.mergeObject.call(void 0, state.rpc || _optionalChain([_phecdacore.getState.call(void 0, target, k), 'optionalAccess', _10 => _10.rpc]), {
188
+ state.rpc = _chunkQYX5Q7KOjs.mergeObject.call(void 0, state.rpc || _optionalChain([_phecdacore.getState.call(void 0, target, k), 'optionalAccess', _10 => _10.rpc]), {
200
189
  isEvent
201
190
  });
202
191
  });
203
192
  };
204
193
  }
205
- _chunkFNJWO324js.__name.call(void 0, Event, "Event");
194
+ _chunkRVWBJ6LVjs.__name.call(void 0, Event, "Event");
206
195
  function Queue(queue = "") {
207
196
  return (target, k) => {
208
197
  _phecdacore.setPropertyState.call(void 0, target, k, (state) => {
209
- state.rpc = _chunkH6NYBVBVjs.mergeObject.call(void 0, state.rpc || _optionalChain([_phecdacore.getState.call(void 0, target, k), 'optionalAccess', _11 => _11.rpc]), {
198
+ state.rpc = _chunkQYX5Q7KOjs.mergeObject.call(void 0, state.rpc || _optionalChain([_phecdacore.getState.call(void 0, target, k), 'optionalAccess', _11 => _11.rpc]), {
210
199
  queue
211
200
  });
212
201
  });
213
202
  };
214
203
  }
215
- _chunkFNJWO324js.__name.call(void 0, Queue, "Queue");
204
+ _chunkRVWBJ6LVjs.__name.call(void 0, Queue, "Queue");
216
205
  function Rpc() {
217
206
  return (target) => {
218
207
  _phecdacore.setPropertyState.call(void 0, target, void 0, (state) => {
@@ -220,20 +209,19 @@ function Rpc() {
220
209
  });
221
210
  };
222
211
  }
223
- _chunkFNJWO324js.__name.call(void 0, Rpc, "Rpc");
212
+ _chunkRVWBJ6LVjs.__name.call(void 0, Rpc, "Rpc");
224
213
 
225
214
  // src/decorators/ctx.ts
226
215
 
227
216
  function Injectable() {
228
217
  return (target) => _phecdacore.Empty.call(void 0, target);
229
218
  }
230
- _chunkFNJWO324js.__name.call(void 0, Injectable, "Injectable");
231
- var Ctx = /* @__PURE__ */ _chunkFNJWO324js.__name.call(void 0, (target, key) => {
219
+ _chunkRVWBJ6LVjs.__name.call(void 0, Injectable, "Injectable");
220
+ var Ctx = /* @__PURE__ */ _chunkRVWBJ6LVjs.__name.call(void 0, (target, key) => {
232
221
  _phecdacore.setPropertyState.call(void 0, target, _phecdacore.SHARE_KEY, (state) => {
233
- if (!state.ctxs)
234
- state.ctxs = /* @__PURE__ */ new Set([
235
- ..._optionalChain([_phecdacore.getState.call(void 0, target), 'optionalAccess', _12 => _12.ctxs]) || []
236
- ]);
222
+ if (!state.ctxs) state.ctxs = /* @__PURE__ */ new Set([
223
+ ..._optionalChain([_phecdacore.getState.call(void 0, target), 'optionalAccess', _12 => _12.ctxs]) || []
224
+ ]);
237
225
  state.ctxs.add(key);
238
226
  });
239
227
  }, "Ctx");
@@ -242,34 +230,30 @@ function Define(key, value) {
242
230
  if (typeof index === "number") {
243
231
  _phecdacore.setPropertyState.call(void 0, target, k, (state) => {
244
232
  const parentState = _optionalChain([_phecdacore.getState.call(void 0, target, k), 'optionalAccess', _13 => _13.params]) || [];
245
- if (!state.params)
246
- state.params = [
247
- ...parentState
248
- ].map(_chunkH6NYBVBVjs.shallowClone);
233
+ if (!state.params) state.params = [
234
+ ...parentState
235
+ ].map(_chunkQYX5Q7KOjs.shallowClone);
249
236
  const existItem = state.params.find((item) => item.index === index);
250
- if (existItem)
251
- existItem.define = _chunkH6NYBVBVjs.mergeObject.call(void 0, existItem.define, {
237
+ if (existItem) existItem.define = _chunkQYX5Q7KOjs.mergeObject.call(void 0, existItem.define, {
238
+ [key]: value
239
+ });
240
+ else state.params.push({
241
+ define: {
252
242
  [key]: value
253
- });
254
- else
255
- state.params.push({
256
- define: {
257
- [key]: value
258
- },
259
- index
260
- });
243
+ },
244
+ index
245
+ });
261
246
  });
262
247
  return;
263
248
  }
264
249
  _phecdacore.setPropertyState.call(void 0, target, k, (state) => {
265
250
  const parentState = _optionalChain([_phecdacore.getState.call(void 0, target, k), 'optionalAccess', _14 => _14.define]);
266
- if (!state.define)
267
- state.define = _chunkH6NYBVBVjs.mergeObject.call(void 0, parentState);
251
+ if (!state.define) state.define = _chunkQYX5Q7KOjs.mergeObject.call(void 0, parentState);
268
252
  state.define[key] = value;
269
253
  });
270
254
  };
271
255
  }
272
- _chunkFNJWO324js.__name.call(void 0, Define, "Define");
256
+ _chunkRVWBJ6LVjs.__name.call(void 0, Define, "Define");
273
257
 
274
258
 
275
259