phecda-server 5.0.2 → 5.1.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 (57) hide show
  1. package/README.md +4 -102
  2. package/bin/cli.mjs +17 -14
  3. package/dist/{chunk-RCTOVYZY.mjs → chunk-2HKQPZDT.mjs} +1 -1
  4. package/dist/{chunk-BXLBWRHS.js → chunk-3BV2GRS7.js} +38 -38
  5. package/dist/{chunk-AB4OX3WV.mjs → chunk-665MB62T.mjs} +127 -99
  6. package/dist/{chunk-YERBWZCS.js → chunk-FSBD5R22.js} +180 -152
  7. package/dist/{chunk-F5YWXY5W.js → chunk-HMPTPTFL.js} +17 -17
  8. package/dist/{chunk-W5EOVGQD.mjs → chunk-UU6RHGRF.mjs} +2 -2
  9. package/dist/{chunk-ITTD2GBR.mjs → chunk-VLV3AO3H.mjs} +7 -19
  10. package/dist/{chunk-YR5Q5F2K.js → chunk-ZP7HNASU.js} +7 -19
  11. package/dist/{core-fd134ffa.d.ts → core-39f27fe8.d.ts} +4 -3
  12. package/dist/{helper-73e8d2f0.d.ts → helper-6133f78f.d.ts} +1 -1
  13. package/dist/{helper-f29f082f.d.ts → helper-fcbf6aa8.d.ts} +4 -3
  14. package/dist/index.d.ts +27 -32
  15. package/dist/index.js +44 -40
  16. package/dist/index.mjs +14 -10
  17. package/dist/rpc/bullmq/index.d.ts +10 -6
  18. package/dist/rpc/bullmq/index.js +32 -53
  19. package/dist/rpc/bullmq/index.mjs +26 -47
  20. package/dist/rpc/kafka/index.d.ts +10 -4
  21. package/dist/rpc/kafka/index.js +20 -37
  22. package/dist/rpc/kafka/index.mjs +15 -32
  23. package/dist/rpc/nats/index.d.ts +2 -2
  24. package/dist/rpc/nats/index.js +20 -34
  25. package/dist/rpc/nats/index.mjs +13 -27
  26. package/dist/rpc/rabbitmq/index.d.ts +2 -2
  27. package/dist/rpc/rabbitmq/index.js +23 -37
  28. package/dist/rpc/rabbitmq/index.mjs +14 -28
  29. package/dist/rpc/redis/index.d.ts +10 -4
  30. package/dist/rpc/redis/index.js +23 -37
  31. package/dist/rpc/redis/index.mjs +16 -30
  32. package/dist/server/elysia/index.d.ts +4 -3
  33. package/dist/server/elysia/index.js +77 -94
  34. package/dist/server/elysia/index.mjs +74 -91
  35. package/dist/server/express/index.d.ts +5 -4
  36. package/dist/server/express/index.js +79 -93
  37. package/dist/server/express/index.mjs +77 -91
  38. package/dist/server/fastify/index.d.ts +8 -5
  39. package/dist/server/fastify/index.js +83 -102
  40. package/dist/server/fastify/index.mjs +79 -98
  41. package/dist/server/h3/index.d.ts +5 -4
  42. package/dist/server/h3/index.js +81 -97
  43. package/dist/server/h3/index.mjs +80 -96
  44. package/dist/server/hono/index.d.ts +5 -4
  45. package/dist/server/hono/index.js +73 -90
  46. package/dist/server/hono/index.mjs +72 -89
  47. package/dist/server/hyper-express/index.d.ts +6 -5
  48. package/dist/server/hyper-express/index.js +78 -96
  49. package/dist/server/hyper-express/index.mjs +77 -95
  50. package/dist/server/koa/index.d.ts +5 -4
  51. package/dist/server/koa/index.js +79 -92
  52. package/dist/server/koa/index.mjs +76 -89
  53. package/dist/test.d.ts +1 -1
  54. package/dist/test.js +6 -6
  55. package/dist/test.mjs +2 -2
  56. package/package.json +9 -8
  57. package/register/loader.mjs +19 -5
package/README.md CHANGED
@@ -1,108 +1,10 @@
1
1
  # phecda-server
2
- types share between server and client, `nestjs` format
3
2
 
4
- ## express
3
+ [DOCUMENT](https://fgsreally.github.io/phecda/)
5
4
 
6
- actually, it works as a set of middlewares
7
- ### server side
8
- ```ts
9
- // in test.controller.ts
10
- import { Body, Controller, Get, Param, Post, Query, Watcher, emitter } from 'phecda-server'
5
+ nodejs server framework that provide IOC/type-reuse/http&rpc-adaptor
11
6
 
12
- @Controller('/base')
13
- export class TestController {
14
- @Post('/:test')
15
- async test(@Param('test') test: string, @Body('name') name: string, @Query('id') id: string) {
16
- console.log(`${test}-${name}-${id}`)
17
- emitter.emit('watch', 1)
18
- return `${test}-${name}-${id}`
19
- }
7
+ like `nestjs`+ `trpc`, work with `elysia/express/hono/h3/koa/fastify/hyper-express` and `redis/rabbimq/kafka/bullmq/nats`
20
8
 
21
- @Get('/get')
22
- async get() {
23
- return {
24
- data: 'test',
25
- }
26
- }
27
- }
28
- ```
29
- ```ts
30
- // in server.ts
31
- import fs from 'fs'
32
- import { Factory, bind } from 'phecda-server'
33
- import express from 'express'
34
- import { TestController } from './test.controller'
35
- const data = await Factory([TestController])
36
- fs.writeFileSync('meta.p.js', JSON.stringify(data.meta.map(item => item.data)))
37
- const app = express()
38
- app.all('*', (req, res, next) => {
39
- res.header('Access-Control-Allow-Origin', '*')
40
- res.header('Access-Control-Allow-Headers', 'Content-Type')
41
- res.header('Access-Control-Allow-Methods', '*')
42
- next()
43
- })
44
- app.use(express.json())
9
+ Pragmatism , Progressive, Less code and Easy to maintain
45
10
 
46
- bind(app, data)
47
- ```
48
-
49
- ### client side
50
-
51
- ```ts
52
- // in vite.config.ts
53
-
54
- import { defineConfig } from 'vite'
55
- import { Server } from 'phecda-server'
56
-
57
- export default defineConfig({
58
- plugins: [Server('meta.p.js')],
59
-
60
- })
61
- ```
62
-
63
- ```ts
64
- // in main.ts
65
-
66
- import { $S, createBeacon, createMergeReq, createReq, isError } from 'phecda-server/client'
67
- import axios from 'axios'
68
- import { TestController } from './test.controller'
69
-
70
- const instance = axios.create({
71
- // ...
72
- })
73
- const useRequest = createReq(instance)
74
- const useMergeRequest = createMergeReq(instance)
75
- const { test, get } = new TestController()
76
- async function request() {
77
- const { data } = await useRequest(test('phecda', 'server', '1'))
78
- console.log('[normal request]:')
79
-
80
- console.log(data)
81
- }
82
-
83
- async function seriesRequest() {
84
- const { data: [, res2] } = await useMergeRequest([get(), test($S(0, 'data'), 'server', '1')])
85
- console.log('[series request]:')
86
-
87
- if (isError(res2))
88
- console.error(res2.message)
89
- else console.log(res2)
90
- }
91
-
92
- async function mergeRequest() {
93
- const { data: [res1, res2] } = await useMergeRequest([test('phecda', 'server', '1'), get()])
94
- console.log('[merge request]:')
95
-
96
- if (isError(res1))
97
- console.error(res1.message)
98
- else console.log(res1)
99
-
100
- if (isError(res2))
101
- console.error(res2.message)
102
- else console.log(res2)
103
- }
104
-
105
- request()
106
- mergeRequest()
107
- seriesRequest()
108
- ```
package/bin/cli.mjs CHANGED
@@ -5,7 +5,9 @@ import pc from 'picocolors'
5
5
  import cac from 'cac'
6
6
  import fse from 'fs-extra'
7
7
  import { log } from '../dist/index.mjs'
8
- const cli = cac('phecda')
8
+ const cli = cac('phecda').option('-c,--config <config>', 'config file', {
9
+ default: 'ps.json',
10
+ })
9
11
  const require = createRequire(import.meta.url)
10
12
  let child
11
13
 
@@ -64,7 +66,7 @@ process.on('SIGINT', () => {
64
66
  process.exit()
65
67
  })
66
68
 
67
- cli.command('init', 'init config file').action(async () => {
69
+ cli.command('init', 'init config file').action(async (options) => {
68
70
  if (!fse.existsSync('tsconfig.json')) {
69
71
  log('init tsconfig.json')
70
72
 
@@ -95,27 +97,34 @@ cli.command('init', 'init config file').action(async () => {
95
97
  )
96
98
  }
97
99
 
98
- if (!fse.existsSync('ps.json')) {
99
- log('init ps.json')
100
+ if (!fse.existsSync(options.config)) {
101
+ log(`init ${options.config}`)
100
102
 
101
103
  await fse.outputFile(
102
- 'ps.json',
104
+ options.config,
103
105
  `{
104
106
  "$schema": "node_modules/phecda-server/bin/schema.json",
105
107
  "resolve": [
106
108
  {
107
109
  "source": "controller",
108
110
  "importer": "http",
109
- "path": ".ps/http.ts"
111
+ "path": ".ps/http.js"
110
112
  },
111
113
  {
112
114
  "source": "rpc",
113
115
  "importer": "client",
114
- "path": ".ps/rpc.ts"
116
+ "path": ".ps/rpc.js"
115
117
  }
116
118
  ],
117
- "unimport":false,
119
+ "unimport": {
120
+ "dirs": [],
121
+ "dirsScanOptions":{
122
+ "filePatterns":["*.{service,controller,module,rpc,edge,guard,interceptor,extension,pipe,filter,plugin}.ts"]
123
+ }
124
+ },
125
+ "virtualFile":{},
118
126
  "moduleFile": []
127
+
119
128
  }
120
129
  `,
121
130
  )
@@ -125,9 +134,6 @@ cli.command('init', 'init config file').action(async () => {
125
134
  cli
126
135
  .command('[file]', 'run file')
127
136
  .alias('run')
128
- .option('-c, --config', 'config file', {
129
- default: './ps.json',
130
- })
131
137
  .action((file, options) => {
132
138
  process.env.PS_CONFIG_FILE = options.config
133
139
 
@@ -160,9 +166,6 @@ cli
160
166
 
161
167
  cli
162
168
  .command('generate [file]', 'generate code(mainly for ci)')
163
- .option('-c, --config', 'config file', {
164
- default: './ps.json',
165
- })
166
169
  .action((file, options) => {
167
170
  process.env.PS_GENERATE = 'true'
168
171
  process.env.PS_CONFIG_FILE = options.config
@@ -3,7 +3,7 @@ import {
3
3
  IS_ONLY_GENERATE,
4
4
  __name,
5
5
  log
6
- } from "./chunk-ITTD2GBR.mjs";
6
+ } from "./chunk-VLV3AO3H.mjs";
7
7
 
8
8
  // src/meta.ts
9
9
  var Meta = class {
@@ -1,10 +1,10 @@
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 _chunkYERBWZCSjs = require('./chunk-YERBWZCS.js');
4
+ var _chunkFSBD5R22js = require('./chunk-FSBD5R22.js');
5
5
 
6
6
 
7
- var _chunkYR5Q5F2Kjs = require('./chunk-YR5Q5F2K.js');
7
+ var _chunkZP7HNASUjs = require('./chunk-ZP7HNASU.js');
8
8
 
9
9
  // src/decorators/param.ts
10
10
  var _phecdacore = require('phecda-core');
@@ -16,7 +16,7 @@ function BaseParam(data) {
16
16
  if (!state.params)
17
17
  state.params = [
18
18
  ..._optionalChain([_phecdacore.getState.call(void 0, target, k), 'optionalAccess', _ => _.params]) || []
19
- ].map(_chunkYERBWZCSjs.shallowClone);
19
+ ].map(_chunkFSBD5R22js.shallowClone);
20
20
  const existItem = state.params.find((item) => item.index === index);
21
21
  if (existItem)
22
22
  Object.assign(existItem, data);
@@ -28,42 +28,42 @@ function BaseParam(data) {
28
28
  });
29
29
  };
30
30
  }
31
- _chunkYR5Q5F2Kjs.__name.call(void 0, BaseParam, "BaseParam");
31
+ _chunkZP7HNASUjs.__name.call(void 0, BaseParam, "BaseParam");
32
32
  function Body(key = "") {
33
33
  return BaseParam({
34
34
  type: "body",
35
35
  key
36
36
  });
37
37
  }
38
- _chunkYR5Q5F2Kjs.__name.call(void 0, Body, "Body");
38
+ _chunkZP7HNASUjs.__name.call(void 0, Body, "Body");
39
39
  function Head(key) {
40
40
  return BaseParam({
41
41
  type: "headers",
42
42
  key: key.toLowerCase()
43
43
  });
44
44
  }
45
- _chunkYR5Q5F2Kjs.__name.call(void 0, Head, "Head");
45
+ _chunkZP7HNASUjs.__name.call(void 0, Head, "Head");
46
46
  function Query(key = "") {
47
47
  return BaseParam({
48
48
  type: "query",
49
49
  key
50
50
  });
51
51
  }
52
- _chunkYR5Q5F2Kjs.__name.call(void 0, Query, "Query");
52
+ _chunkZP7HNASUjs.__name.call(void 0, Query, "Query");
53
53
  function Param(key) {
54
54
  return BaseParam({
55
55
  type: "params",
56
56
  key
57
57
  });
58
58
  }
59
- _chunkYR5Q5F2Kjs.__name.call(void 0, Param, "Param");
59
+ _chunkZP7HNASUjs.__name.call(void 0, Param, "Param");
60
60
  function Arg(target, k, index) {
61
61
  BaseParam({
62
62
  type: "args",
63
63
  key: `${index}`
64
64
  })(target, k, index);
65
65
  }
66
- _chunkYR5Q5F2Kjs.__name.call(void 0, Arg, "Arg");
66
+ _chunkZP7HNASUjs.__name.call(void 0, Arg, "Arg");
67
67
 
68
68
  // src/decorators/aop.ts
69
69
 
@@ -82,7 +82,7 @@ function Guard(...guards) {
82
82
  });
83
83
  };
84
84
  }
85
- _chunkYR5Q5F2Kjs.__name.call(void 0, Guard, "Guard");
85
+ _chunkZP7HNASUjs.__name.call(void 0, Guard, "Guard");
86
86
  function Plugin(...plugins) {
87
87
  return (target, k) => {
88
88
  _phecdacore.setPropertyState.call(void 0, target, k, (state) => {
@@ -98,7 +98,7 @@ function Plugin(...plugins) {
98
98
  });
99
99
  };
100
100
  }
101
- _chunkYR5Q5F2Kjs.__name.call(void 0, Plugin, "Plugin");
101
+ _chunkZP7HNASUjs.__name.call(void 0, Plugin, "Plugin");
102
102
  function Interceptor(...interceptors) {
103
103
  return (target, k) => {
104
104
  _phecdacore.setPropertyState.call(void 0, target, k, (state) => {
@@ -114,13 +114,13 @@ function Interceptor(...interceptors) {
114
114
  });
115
115
  };
116
116
  }
117
- _chunkYR5Q5F2Kjs.__name.call(void 0, Interceptor, "Interceptor");
117
+ _chunkZP7HNASUjs.__name.call(void 0, Interceptor, "Interceptor");
118
118
  function Filter(filter) {
119
119
  return (target, k) => {
120
120
  _phecdacore.setPropertyState.call(void 0, target, k, (state) => state.filter = filter);
121
121
  };
122
122
  }
123
- _chunkYR5Q5F2Kjs.__name.call(void 0, Filter, "Filter");
123
+ _chunkZP7HNASUjs.__name.call(void 0, Filter, "Filter");
124
124
  function Pipe(pipe) {
125
125
  return (target, k, index) => {
126
126
  if (typeof index === "number") {
@@ -132,87 +132,87 @@ function Pipe(pipe) {
132
132
  _phecdacore.setPropertyState.call(void 0, target, k, (state) => state.pipe = pipe);
133
133
  };
134
134
  }
135
- _chunkYR5Q5F2Kjs.__name.call(void 0, Pipe, "Pipe");
135
+ _chunkZP7HNASUjs.__name.call(void 0, Pipe, "Pipe");
136
136
 
137
137
  // src/decorators/http.ts
138
138
 
139
139
  function Route(route, type) {
140
140
  return (target, k) => {
141
141
  _phecdacore.setPropertyState.call(void 0, target, k, (state) => {
142
- state.http = _chunkYERBWZCSjs.mergeObject.call(void 0, state.http || _optionalChain([_phecdacore.getState.call(void 0, target, k), 'optionalAccess', _5 => _5.http]), {
142
+ state.http = _chunkFSBD5R22js.mergeObject.call(void 0, state.http || _optionalChain([_phecdacore.getState.call(void 0, target, k), 'optionalAccess', _5 => _5.http]), {
143
143
  route,
144
144
  type
145
145
  });
146
146
  });
147
147
  };
148
148
  }
149
- _chunkYR5Q5F2Kjs.__name.call(void 0, Route, "Route");
149
+ _chunkZP7HNASUjs.__name.call(void 0, Route, "Route");
150
150
  function Header(headers) {
151
151
  return (target, k) => {
152
152
  _phecdacore.setPropertyState.call(void 0, target, k, (state) => {
153
153
  if (!state.http)
154
- state.http = _chunkYERBWZCSjs.mergeObject.call(void 0, _optionalChain([_phecdacore.getState.call(void 0, target, k), 'optionalAccess', _6 => _6.http]));
155
- state.http = _chunkYERBWZCSjs.mergeObject.call(void 0, state.http, {
156
- headers: _chunkYERBWZCSjs.mergeObject.call(void 0, _optionalChain([state, 'access', _7 => _7.http, 'optionalAccess', _8 => _8.headers]), headers)
154
+ state.http = _chunkFSBD5R22js.mergeObject.call(void 0, _optionalChain([_phecdacore.getState.call(void 0, target, k), 'optionalAccess', _6 => _6.http]));
155
+ state.http = _chunkFSBD5R22js.mergeObject.call(void 0, state.http, {
156
+ headers: _chunkFSBD5R22js.mergeObject.call(void 0, _optionalChain([state, 'access', _7 => _7.http, 'optionalAccess', _8 => _8.headers]), headers)
157
157
  });
158
158
  });
159
159
  };
160
160
  }
161
- _chunkYR5Q5F2Kjs.__name.call(void 0, Header, "Header");
161
+ _chunkZP7HNASUjs.__name.call(void 0, Header, "Header");
162
162
  function Get(route = "") {
163
163
  return Route(route, "get");
164
164
  }
165
- _chunkYR5Q5F2Kjs.__name.call(void 0, Get, "Get");
165
+ _chunkZP7HNASUjs.__name.call(void 0, Get, "Get");
166
166
  function Post(route = "") {
167
167
  return Route(route, "post");
168
168
  }
169
- _chunkYR5Q5F2Kjs.__name.call(void 0, Post, "Post");
169
+ _chunkZP7HNASUjs.__name.call(void 0, Post, "Post");
170
170
  function Put(route = "") {
171
171
  return Route(route, "put");
172
172
  }
173
- _chunkYR5Q5F2Kjs.__name.call(void 0, Put, "Put");
173
+ _chunkZP7HNASUjs.__name.call(void 0, Put, "Put");
174
174
  function Patch(route = "") {
175
175
  return Route(route, "patch");
176
176
  }
177
- _chunkYR5Q5F2Kjs.__name.call(void 0, Patch, "Patch");
177
+ _chunkZP7HNASUjs.__name.call(void 0, Patch, "Patch");
178
178
  function Delete(route = "") {
179
179
  return Route(route, "delete");
180
180
  }
181
- _chunkYR5Q5F2Kjs.__name.call(void 0, Delete, "Delete");
181
+ _chunkZP7HNASUjs.__name.call(void 0, Delete, "Delete");
182
182
  function Controller(prefix = "") {
183
183
  return (target) => {
184
184
  _phecdacore.setPropertyState.call(void 0, target, void 0, (state) => {
185
185
  state.controller = "http";
186
- state.http = _chunkYERBWZCSjs.mergeObject.call(void 0, state.http || _optionalChain([_phecdacore.getState.call(void 0, target), 'optionalAccess', _9 => _9.http]), {
186
+ state.http = _chunkFSBD5R22js.mergeObject.call(void 0, state.http || _optionalChain([_phecdacore.getState.call(void 0, target), 'optionalAccess', _9 => _9.http]), {
187
187
  prefix
188
188
  });
189
189
  });
190
190
  };
191
191
  }
192
- _chunkYR5Q5F2Kjs.__name.call(void 0, Controller, "Controller");
192
+ _chunkZP7HNASUjs.__name.call(void 0, Controller, "Controller");
193
193
 
194
194
  // src/decorators/rpc.ts
195
195
 
196
196
  function Event(isEvent = true) {
197
197
  return (target, k) => {
198
198
  _phecdacore.setPropertyState.call(void 0, target, k, (state) => {
199
- state.rpc = _chunkYERBWZCSjs.mergeObject.call(void 0, state.rpc || _optionalChain([_phecdacore.getState.call(void 0, target, k), 'optionalAccess', _10 => _10.rpc]), {
199
+ state.rpc = _chunkFSBD5R22js.mergeObject.call(void 0, state.rpc || _optionalChain([_phecdacore.getState.call(void 0, target, k), 'optionalAccess', _10 => _10.rpc]), {
200
200
  isEvent
201
201
  });
202
202
  });
203
203
  };
204
204
  }
205
- _chunkYR5Q5F2Kjs.__name.call(void 0, Event, "Event");
205
+ _chunkZP7HNASUjs.__name.call(void 0, Event, "Event");
206
206
  function Queue(queue = "") {
207
207
  return (target, k) => {
208
208
  _phecdacore.setPropertyState.call(void 0, target, k, (state) => {
209
- state.rpc = _chunkYERBWZCSjs.mergeObject.call(void 0, state.rpc || _optionalChain([_phecdacore.getState.call(void 0, target, k), 'optionalAccess', _11 => _11.rpc]), {
209
+ state.rpc = _chunkFSBD5R22js.mergeObject.call(void 0, state.rpc || _optionalChain([_phecdacore.getState.call(void 0, target, k), 'optionalAccess', _11 => _11.rpc]), {
210
210
  queue
211
211
  });
212
212
  });
213
213
  };
214
214
  }
215
- _chunkYR5Q5F2Kjs.__name.call(void 0, Queue, "Queue");
215
+ _chunkZP7HNASUjs.__name.call(void 0, Queue, "Queue");
216
216
  function Rpc() {
217
217
  return (target) => {
218
218
  _phecdacore.setPropertyState.call(void 0, target, void 0, (state) => {
@@ -220,15 +220,15 @@ function Rpc() {
220
220
  });
221
221
  };
222
222
  }
223
- _chunkYR5Q5F2Kjs.__name.call(void 0, Rpc, "Rpc");
223
+ _chunkZP7HNASUjs.__name.call(void 0, Rpc, "Rpc");
224
224
 
225
225
  // src/decorators/index.ts
226
226
 
227
227
  function Injectable() {
228
228
  return (target) => _phecdacore.Empty.call(void 0, target);
229
229
  }
230
- _chunkYR5Q5F2Kjs.__name.call(void 0, Injectable, "Injectable");
231
- var Ctx = /* @__PURE__ */ _chunkYR5Q5F2Kjs.__name.call(void 0, (target, key) => {
230
+ _chunkZP7HNASUjs.__name.call(void 0, Injectable, "Injectable");
231
+ var Ctx = /* @__PURE__ */ _chunkZP7HNASUjs.__name.call(void 0, (target, key) => {
232
232
  _phecdacore.set.call(void 0, target, "context", key);
233
233
  }, "Ctx");
234
234
  function Define(key, value) {
@@ -239,10 +239,10 @@ function Define(key, value) {
239
239
  if (!state.params)
240
240
  state.params = [
241
241
  ...parentState
242
- ].map(_chunkYERBWZCSjs.shallowClone);
242
+ ].map(_chunkFSBD5R22js.shallowClone);
243
243
  const existItem = state.params.find((item) => item.index === index);
244
244
  if (existItem)
245
- existItem.define = _chunkYERBWZCSjs.mergeObject.call(void 0, existItem.define, {
245
+ existItem.define = _chunkFSBD5R22js.mergeObject.call(void 0, existItem.define, {
246
246
  [key]: value
247
247
  });
248
248
  else
@@ -258,12 +258,12 @@ function Define(key, value) {
258
258
  _phecdacore.setPropertyState.call(void 0, target, k, (state) => {
259
259
  const parentState = _optionalChain([_phecdacore.getState.call(void 0, target, k), 'optionalAccess', _13 => _13.define]);
260
260
  if (!state.define)
261
- state.define = _chunkYERBWZCSjs.mergeObject.call(void 0, parentState);
261
+ state.define = _chunkFSBD5R22js.mergeObject.call(void 0, parentState);
262
262
  state.define[key] = value;
263
263
  });
264
264
  };
265
265
  }
266
- _chunkYR5Q5F2Kjs.__name.call(void 0, Define, "Define");
266
+ _chunkZP7HNASUjs.__name.call(void 0, Define, "Define");
267
267
 
268
268
 
269
269