phecda-server 5.1.1 → 5.2.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 (62) hide show
  1. package/assets/ps.json +24 -0
  2. package/assets/tsconfig.json +21 -0
  3. package/bin/cli.mjs +41 -80
  4. package/dist/{chunk-HMPTPTFL.js → chunk-5BVUCNMA.js} +2 -2
  5. package/dist/{chunk-FSBD5R22.js → chunk-BSE2DSDK.js} +64 -66
  6. package/dist/{chunk-2HKQPZDT.mjs → chunk-CKQW3FDK.mjs} +3 -3
  7. package/dist/{chunk-665MB62T.mjs → chunk-JE6BBDXW.mjs} +63 -65
  8. package/dist/{chunk-UU6RHGRF.mjs → chunk-V3WIKOP3.mjs} +10 -4
  9. package/dist/{chunk-3BV2GRS7.js → chunk-VMLHTEW3.js} +22 -16
  10. package/dist/core-7f6d2be6.d.ts +27 -0
  11. package/dist/helper.d.ts +27 -0
  12. package/dist/helper.js +21 -0
  13. package/dist/helper.mjs +21 -0
  14. package/dist/index.d.ts +7 -24
  15. package/dist/index.js +24 -42
  16. package/dist/index.mjs +5 -23
  17. package/dist/rpc/bullmq/index.d.ts +3 -2
  18. package/dist/rpc/bullmq/index.js +6 -6
  19. package/dist/rpc/bullmq/index.mjs +1 -1
  20. package/dist/rpc/kafka/index.d.ts +3 -2
  21. package/dist/rpc/kafka/index.js +5 -5
  22. package/dist/rpc/kafka/index.mjs +1 -1
  23. package/dist/rpc/nats/index.d.ts +3 -2
  24. package/dist/rpc/nats/index.js +5 -5
  25. package/dist/rpc/nats/index.mjs +1 -1
  26. package/dist/rpc/rabbitmq/index.d.ts +3 -2
  27. package/dist/rpc/rabbitmq/index.js +6 -6
  28. package/dist/rpc/rabbitmq/index.mjs +1 -1
  29. package/dist/rpc/redis/index.d.ts +3 -2
  30. package/dist/rpc/redis/index.js +6 -6
  31. package/dist/rpc/redis/index.mjs +1 -1
  32. package/dist/server/elysia/index.d.ts +3 -2
  33. package/dist/server/elysia/index.js +15 -15
  34. package/dist/server/elysia/index.mjs +2 -2
  35. package/dist/server/express/index.d.ts +3 -2
  36. package/dist/server/express/index.js +14 -14
  37. package/dist/server/express/index.mjs +1 -1
  38. package/dist/server/fastify/index.d.ts +3 -2
  39. package/dist/server/fastify/index.js +15 -15
  40. package/dist/server/fastify/index.mjs +2 -2
  41. package/dist/server/h3/index.d.ts +3 -2
  42. package/dist/server/h3/index.js +12 -12
  43. package/dist/server/h3/index.mjs +1 -1
  44. package/dist/server/hono/index.d.ts +3 -2
  45. package/dist/server/hono/index.js +13 -13
  46. package/dist/server/hono/index.mjs +1 -1
  47. package/dist/server/hyper-express/index.d.ts +3 -2
  48. package/dist/server/hyper-express/index.js +13 -13
  49. package/dist/server/hyper-express/index.mjs +1 -1
  50. package/dist/server/koa/index.d.ts +3 -2
  51. package/dist/server/koa/index.js +14 -14
  52. package/dist/server/koa/index.mjs +1 -1
  53. package/dist/test.d.ts +3 -2
  54. package/dist/test.js +2 -2
  55. package/dist/test.mjs +1 -1
  56. package/dist/{helper-fcbf6aa8.d.ts → types-68f2ec2a.d.ts} +2 -4
  57. package/dist/{core-39f27fe8.d.ts → types-81be0ba3.d.ts} +2 -25
  58. package/dist/{helper-6133f78f.d.ts → types-f3b79218.d.ts} +2 -3
  59. package/package.json +61 -53
  60. package/register/loader.mjs +26 -13
  61. package/register/utils.mjs +6 -31
  62. /package/{bin → assets}/schema.json +0 -0
@@ -1,7 +1,7 @@
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 _chunkFSBD5R22js = require('./chunk-FSBD5R22.js');
4
+ var _chunkBSE2DSDKjs = require('./chunk-BSE2DSDK.js');
5
5
 
6
6
 
7
7
  var _chunkZP7HNASUjs = require('./chunk-ZP7HNASU.js');
@@ -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(_chunkFSBD5R22js.shallowClone);
19
+ ].map(_chunkBSE2DSDKjs.shallowClone);
20
20
  const existItem = state.params.find((item) => item.index === index);
21
21
  if (existItem)
22
22
  Object.assign(existItem, data);
@@ -139,7 +139,7 @@ _chunkZP7HNASUjs.__name.call(void 0, Pipe, "Pipe");
139
139
  function Route(route, type) {
140
140
  return (target, k) => {
141
141
  _phecdacore.setPropertyState.call(void 0, target, k, (state) => {
142
- state.http = _chunkFSBD5R22js.mergeObject.call(void 0, state.http || _optionalChain([_phecdacore.getState.call(void 0, target, k), 'optionalAccess', _5 => _5.http]), {
142
+ state.http = _chunkBSE2DSDKjs.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
  });
@@ -151,9 +151,9 @@ 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 = _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)
154
+ state.http = _chunkBSE2DSDKjs.mergeObject.call(void 0, _optionalChain([_phecdacore.getState.call(void 0, target, k), 'optionalAccess', _6 => _6.http]));
155
+ state.http = _chunkBSE2DSDKjs.mergeObject.call(void 0, state.http, {
156
+ headers: _chunkBSE2DSDKjs.mergeObject.call(void 0, _optionalChain([state, 'access', _7 => _7.http, 'optionalAccess', _8 => _8.headers]), headers)
157
157
  });
158
158
  });
159
159
  };
@@ -183,7 +183,7 @@ 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 = _chunkFSBD5R22js.mergeObject.call(void 0, state.http || _optionalChain([_phecdacore.getState.call(void 0, target), 'optionalAccess', _9 => _9.http]), {
186
+ state.http = _chunkBSE2DSDKjs.mergeObject.call(void 0, state.http || _optionalChain([_phecdacore.getState.call(void 0, target), 'optionalAccess', _9 => _9.http]), {
187
187
  prefix
188
188
  });
189
189
  });
@@ -196,7 +196,7 @@ _chunkZP7HNASUjs.__name.call(void 0, Controller, "Controller");
196
196
  function Event(isEvent = true) {
197
197
  return (target, k) => {
198
198
  _phecdacore.setPropertyState.call(void 0, target, k, (state) => {
199
- state.rpc = _chunkFSBD5R22js.mergeObject.call(void 0, state.rpc || _optionalChain([_phecdacore.getState.call(void 0, target, k), 'optionalAccess', _10 => _10.rpc]), {
199
+ state.rpc = _chunkBSE2DSDKjs.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
  });
@@ -206,7 +206,7 @@ _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 = _chunkFSBD5R22js.mergeObject.call(void 0, state.rpc || _optionalChain([_phecdacore.getState.call(void 0, target, k), 'optionalAccess', _11 => _11.rpc]), {
209
+ state.rpc = _chunkBSE2DSDKjs.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
  });
@@ -222,27 +222,33 @@ function Rpc() {
222
222
  }
223
223
  _chunkZP7HNASUjs.__name.call(void 0, Rpc, "Rpc");
224
224
 
225
- // src/decorators/index.ts
225
+ // src/decorators/ctx.ts
226
226
 
227
227
  function Injectable() {
228
228
  return (target) => _phecdacore.Empty.call(void 0, target);
229
229
  }
230
230
  _chunkZP7HNASUjs.__name.call(void 0, Injectable, "Injectable");
231
231
  var Ctx = /* @__PURE__ */ _chunkZP7HNASUjs.__name.call(void 0, (target, key) => {
232
- _phecdacore.set.call(void 0, target, "context", key);
232
+ _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
+ ]);
237
+ state.ctxs.add(key);
238
+ });
233
239
  }, "Ctx");
234
240
  function Define(key, value) {
235
241
  return (target, k, index) => {
236
242
  if (typeof index === "number") {
237
243
  _phecdacore.setPropertyState.call(void 0, target, k, (state) => {
238
- const parentState = _optionalChain([_phecdacore.getState.call(void 0, target, k), 'optionalAccess', _12 => _12.params]) || [];
244
+ const parentState = _optionalChain([_phecdacore.getState.call(void 0, target, k), 'optionalAccess', _13 => _13.params]) || [];
239
245
  if (!state.params)
240
246
  state.params = [
241
247
  ...parentState
242
- ].map(_chunkFSBD5R22js.shallowClone);
248
+ ].map(_chunkBSE2DSDKjs.shallowClone);
243
249
  const existItem = state.params.find((item) => item.index === index);
244
250
  if (existItem)
245
- existItem.define = _chunkFSBD5R22js.mergeObject.call(void 0, existItem.define, {
251
+ existItem.define = _chunkBSE2DSDKjs.mergeObject.call(void 0, existItem.define, {
246
252
  [key]: value
247
253
  });
248
254
  else
@@ -256,9 +262,9 @@ function Define(key, value) {
256
262
  return;
257
263
  }
258
264
  _phecdacore.setPropertyState.call(void 0, target, k, (state) => {
259
- const parentState = _optionalChain([_phecdacore.getState.call(void 0, target, k), 'optionalAccess', _13 => _13.define]);
265
+ const parentState = _optionalChain([_phecdacore.getState.call(void 0, target, k), 'optionalAccess', _14 => _14.define]);
260
266
  if (!state.define)
261
- state.define = _chunkFSBD5R22js.mergeObject.call(void 0, parentState);
267
+ state.define = _chunkBSE2DSDKjs.mergeObject.call(void 0, parentState);
262
268
  state.define[key] = value;
263
269
  });
264
270
  };
@@ -0,0 +1,27 @@
1
+ import { Construct } from 'phecda-core';
2
+ import { M as MetaData, h as Meta, E as Emitter } from './types-81be0ba3.js';
3
+
4
+ declare abstract class Generator {
5
+ private _path;
6
+ constructor(path?: string);
7
+ abstract name: string;
8
+ get path(): string;
9
+ abstract generateCode(meta: MetaData[]): string;
10
+ output(meta: Meta[]): Promise<void>;
11
+ }
12
+
13
+ declare const emitter: Emitter;
14
+ declare function Factory(models: (new (...args: any) => any)[], opts?: {
15
+ parseModule?: (module: any) => any;
16
+ parseMeta?: (meta: Meta) => Meta | null | undefined;
17
+ generators?: Generator[];
18
+ }): Promise<{
19
+ moduleMap: Map<PropertyKey, any>;
20
+ constructorMap: Map<any, any>;
21
+ meta: Meta[];
22
+ add: (Model: Construct) => Promise<void>;
23
+ del: (tag: PropertyKey) => Promise<any>;
24
+ destroy: () => Promise<void>;
25
+ }>;
26
+
27
+ export { Factory as F, Generator as G, emitter as e };
@@ -0,0 +1,27 @@
1
+ import { C as ControllerMetaData, h as Meta, i as ControllerMeta } from './types-81be0ba3.js';
2
+ import 'phecda-core';
3
+
4
+ declare function HMR(cb: (...args: any) => any): void;
5
+
6
+ declare function resolveDep(ret: any, key: string): any;
7
+ declare function argToReq(params: ControllerMetaData['params'], args: any[], headers: Record<string, any>): any;
8
+
9
+ declare function genClientQueue(key?: string): string;
10
+
11
+ declare function shallowClone(obj: any): any;
12
+ declare function mergeObject(...args: any[]): any;
13
+
14
+ declare function createControllerMetaMap(meta: Meta[], filter: (meta: Meta) => boolean | void): Map<string, Record<string, ControllerMeta>>;
15
+ declare function detectAopDep(meta: Meta[], { guards, interceptors, plugins }?: {
16
+ guards?: string[];
17
+ interceptors?: string[];
18
+ plugins?: string[];
19
+ }, controller?: string): {
20
+ pluginSet: Set<string>;
21
+ guardSet: Set<string>;
22
+ interceptorSet: Set<string>;
23
+ pipeSet: Set<string>;
24
+ filterSet: Set<string>;
25
+ };
26
+
27
+ export { HMR, argToReq, createControllerMetaMap, detectAopDep, genClientQueue, mergeObject, resolveDep, shallowClone };
package/dist/helper.js ADDED
@@ -0,0 +1,21 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+
4
+
5
+
6
+
7
+
8
+
9
+
10
+ var _chunkBSE2DSDKjs = require('./chunk-BSE2DSDK.js');
11
+ require('./chunk-ZP7HNASU.js');
12
+
13
+
14
+
15
+
16
+
17
+
18
+
19
+
20
+
21
+ exports.HMR = _chunkBSE2DSDKjs.HMR; exports.argToReq = _chunkBSE2DSDKjs.argToReq; exports.createControllerMetaMap = _chunkBSE2DSDKjs.createControllerMetaMap; exports.detectAopDep = _chunkBSE2DSDKjs.detectAopDep; exports.genClientQueue = _chunkBSE2DSDKjs.genClientQueue; exports.mergeObject = _chunkBSE2DSDKjs.mergeObject; exports.resolveDep = _chunkBSE2DSDKjs.resolveDep; exports.shallowClone = _chunkBSE2DSDKjs.shallowClone;
@@ -0,0 +1,21 @@
1
+ import {
2
+ HMR,
3
+ argToReq,
4
+ createControllerMetaMap,
5
+ detectAopDep,
6
+ genClientQueue,
7
+ mergeObject,
8
+ resolveDep,
9
+ shallowClone
10
+ } from "./chunk-JE6BBDXW.mjs";
11
+ import "./chunk-VLV3AO3H.mjs";
12
+ export {
13
+ HMR,
14
+ argToReq,
15
+ createControllerMetaMap,
16
+ detectAopDep,
17
+ genClientQueue,
18
+ mergeObject,
19
+ resolveDep,
20
+ shallowClone
21
+ };
package/dist/index.d.ts CHANGED
@@ -1,9 +1,11 @@
1
- import { B as BaseContext, D as DefaultOptions, G as Generator, C as ControllerMetaData, M as MetaData, U as UNMOUNT_SYMBOL, a as BaseError, b as Meta, c as ControllerMeta } from './core-39f27fe8.js';
2
- export { g as BaseRequestType, f as BaseReturn, h as CustomResponse, k as ERROR_SYMBOL, E as Emitter, i as ExtractResponse, F as Factory, I as IS_HMR, l as IS_ONLY_GENERATE, m as IS_STRICT, L as LOG_LEVEL, O as OmitFunction, n as PS_EXIT_CODE, P as PickFunc, S as ServiceMetaData, e as ToClientFn, d as ToClientInstance, T as ToClientMap, j as emitter } from './core-39f27fe8.js';
1
+ import { B as BaseContext, D as DefaultOptions, C as ControllerMetaData, M as MetaData, U as UNMOUNT_SYMBOL, a as BaseError } from './types-81be0ba3.js';
2
+ export { e as BaseRequestType, d as BaseReturn, i as ControllerMeta, f as CustomResponse, j as ERROR_SYMBOL, E as Emitter, g as ExtractResponse, I as IS_HMR, k as IS_ONLY_GENERATE, l as IS_STRICT, L as LOG_LEVEL, h as Meta, O as OmitFunction, m as PS_EXIT_CODE, P as PickFunc, S as ServiceMetaData, c as ToClientFn, b as ToClientInstance, T as ToClientMap } from './types-81be0ba3.js';
3
+ import { G as Generator } from './core-7f6d2be6.js';
4
+ export { F as Factory, e as emitter } from './core-7f6d2be6.js';
3
5
  import { Construct, AbConstruct } from 'phecda-core';
4
6
  export * from 'phecda-core';
5
- export { a as HttpContext, H as HttpOptions, b as argToReq, r as resolveDep } from './helper-fcbf6aa8.js';
6
- export { a as RpcClientOptions, b as RpcContext, R as RpcServerOptions, g as genClientQueue } from './helper-6133f78f.js';
7
+ export { a as HttpContext, H as HttpOptions } from './types-68f2ec2a.js';
8
+ export { a as RpcClientOptions, b as RpcContext, R as RpcServerOptions } from './types-f3b79218.js';
7
9
  import 'node:http';
8
10
 
9
11
  declare class Exception extends Error {
@@ -241,23 +243,4 @@ declare function setLogger(logger: Record<LogLevel, (msg: string) => void>): voi
241
243
  declare function log(msg: string, level?: LogLevel): void;
242
244
  declare function Mix<C1 extends Construct | AbConstruct, C2 extends Construct>(InternalClass: C1, ExtendClass: C2): new (...args: ConstructorParameters<C2>) => InstanceType<C1> & InstanceType<C2>;
243
245
 
244
- declare function HMR(cb: (...args: any) => any): void;
245
-
246
- declare function shallowClone(obj: any): any;
247
- declare function mergeObject(...args: any[]): any;
248
- declare function mergeArray(...args: any[]): any[];
249
-
250
- declare function createControllerMetaMap(meta: Meta[], filter: (meta: Meta) => boolean | void): Map<string, Record<string, ControllerMeta>>;
251
- declare function detectAopDep(meta: Meta[], { guards, interceptors, plugins }?: {
252
- guards?: string[];
253
- interceptors?: string[];
254
- plugins?: string[];
255
- }, controller?: string): {
256
- pluginSet: Set<string>;
257
- guardSet: Set<string>;
258
- interceptorSet: Set<string>;
259
- pipeSet: Set<string>;
260
- filterSet: Set<string>;
261
- };
262
-
263
- export { Arg, BadGatewayException, BadRequestException, BaseContext, BaseError, BaseParam, Body, ConflictException, Context, Controller, ControllerMeta, ControllerMetaData, Ctx, DefaultOptions, Define, Delete, Dev, Event, Exception, Filter, FilterType, ForbiddenException, FrameworkException, Generator, Get, Guard, GuardType, HMR, HTTPGenerator, Head, Header, Injectable, Interceptor, InterceptorType, InvalidInputException, Meta, MetaData, Mix, NotFoundException, PExtension, PFilter, PGuard, PInterceptor, PPipe, PPlugin, Param, Patch, PayloadLargeException, Pipe, PipeArg, PipeType, Plugin, Post, Put, Query, Queue, RPCGenerator, Route, Rpc, ServiceUnavailableException, TimeoutException, TimerException, UNMOUNT_SYMBOL, UnauthorizedException, UndefinedException, UnsupportedMediaTypeException, ValidateException, WorkerException, addFilter, addGuard, addInterceptor, addPipe, addPlugin, createControllerMetaMap, defaultPipe, detectAopDep, log, mergeArray, mergeObject, setLogger, shallowClone };
246
+ export { Arg, BadGatewayException, BadRequestException, BaseContext, BaseError, BaseParam, Body, ConflictException, Context, Controller, ControllerMetaData, Ctx, DefaultOptions, Define, Delete, Dev, Event, Exception, Filter, FilterType, ForbiddenException, FrameworkException, Generator, Get, Guard, GuardType, HTTPGenerator, Head, Header, Injectable, Interceptor, InterceptorType, InvalidInputException, MetaData, Mix, NotFoundException, PExtension, PFilter, PGuard, PInterceptor, PPipe, PPlugin, Param, Patch, PayloadLargeException, Pipe, PipeArg, PipeType, Plugin, Post, Put, Query, Queue, RPCGenerator, Route, Rpc, ServiceUnavailableException, TimeoutException, TimerException, UNMOUNT_SYMBOL, UnauthorizedException, UndefinedException, UnsupportedMediaTypeException, ValidateException, WorkerException, addFilter, addGuard, addInterceptor, addPipe, addPlugin, defaultPipe, log, setLogger };
package/dist/index.js CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
 
4
4
 
5
- var _chunkHMPTPTFLjs = require('./chunk-HMPTPTFL.js');
5
+ var _chunk5BVUCNMAjs = require('./chunk-5BVUCNMA.js');
6
6
 
7
7
 
8
8
 
@@ -29,7 +29,7 @@ var _chunkHMPTPTFLjs = require('./chunk-HMPTPTFL.js');
29
29
 
30
30
 
31
31
 
32
- var _chunk3BV2GRS7js = require('./chunk-3BV2GRS7.js');
32
+ var _chunkVMLHTEW3js = require('./chunk-VMLHTEW3.js');
33
33
 
34
34
 
35
35
 
@@ -55,16 +55,7 @@ var _chunk3BV2GRS7js = require('./chunk-3BV2GRS7.js');
55
55
 
56
56
 
57
57
 
58
-
59
-
60
-
61
-
62
-
63
-
64
-
65
-
66
-
67
- var _chunkFSBD5R22js = require('./chunk-FSBD5R22.js');
58
+ var _chunkBSE2DSDKjs = require('./chunk-BSE2DSDK.js');
68
59
 
69
60
 
70
61
 
@@ -129,9 +120,9 @@ var PFilter = class extends Dev {
129
120
  constructor(tag) {
130
121
  super();
131
122
  this.key = tag || _phecdacore.getTag.call(void 0, this);
132
- _chunkFSBD5R22js.addFilter.call(void 0, this.key, this.use.bind(this));
123
+ _chunkBSE2DSDKjs.addFilter.call(void 0, this.key, this.use.bind(this));
133
124
  this.onUnmount(() => {
134
- delete _chunkFSBD5R22js.Context.filterRecord[this.key];
125
+ delete _chunkBSE2DSDKjs.Context.filterRecord[this.key];
135
126
  });
136
127
  }
137
128
  };
@@ -144,9 +135,9 @@ var PGuard = class extends Dev {
144
135
  constructor(tag) {
145
136
  super();
146
137
  this.key = tag || _phecdacore.getTag.call(void 0, this);
147
- _chunkFSBD5R22js.addGuard.call(void 0, this.key, this.use.bind(this));
138
+ _chunkBSE2DSDKjs.addGuard.call(void 0, this.key, this.use.bind(this));
148
139
  this.onUnmount(() => {
149
- delete _chunkFSBD5R22js.Context.guardRecord[this.key];
140
+ delete _chunkBSE2DSDKjs.Context.guardRecord[this.key];
150
141
  });
151
142
  }
152
143
  };
@@ -160,9 +151,9 @@ var PInterceptor = class extends Dev {
160
151
  super();
161
152
  this.key = tag || _phecdacore.getTag.call(void 0, this);
162
153
  this.onUnmount(() => {
163
- delete _chunkFSBD5R22js.Context.interceptorRecord[this.key];
154
+ delete _chunkBSE2DSDKjs.Context.interceptorRecord[this.key];
164
155
  });
165
- _chunkFSBD5R22js.addInterceptor.call(void 0, this.key, this.use.bind(this));
156
+ _chunkBSE2DSDKjs.addInterceptor.call(void 0, this.key, this.use.bind(this));
166
157
  }
167
158
  };
168
159
  _chunkZP7HNASUjs.__name.call(void 0, PInterceptor, "PInterceptor");
@@ -174,9 +165,9 @@ var PPipe = class extends Dev {
174
165
  constructor(tag) {
175
166
  super();
176
167
  this.key = tag || _phecdacore.getTag.call(void 0, this);
177
- _chunkFSBD5R22js.addPipe.call(void 0, this.key, this.use.bind(this));
168
+ _chunkBSE2DSDKjs.addPipe.call(void 0, this.key, this.use.bind(this));
178
169
  this.onUnmount(() => {
179
- delete _chunkFSBD5R22js.Context.pipeRecord[this.key];
170
+ delete _chunkBSE2DSDKjs.Context.pipeRecord[this.key];
180
171
  });
181
172
  }
182
173
  };
@@ -189,9 +180,9 @@ var PPlugin = class extends Dev {
189
180
  constructor(tag) {
190
181
  super();
191
182
  this.key = tag || _phecdacore.getTag.call(void 0, this);
192
- _chunkFSBD5R22js.addPlugin.call(void 0, this.key, this.use.bind(this));
183
+ _chunkBSE2DSDKjs.addPlugin.call(void 0, this.key, this.use.bind(this));
193
184
  this.onUnmount(() => {
194
- delete _chunkFSBD5R22js.Context.pluginRecord[this.key];
185
+ delete _chunkBSE2DSDKjs.Context.pluginRecord[this.key];
195
186
  });
196
187
  }
197
188
  };
@@ -205,33 +196,33 @@ var PExtension = class extends Dev {
205
196
  super();
206
197
  const key = this.key = tag || _phecdacore.getTag.call(void 0, this);
207
198
  if (this.pipe) {
208
- _chunkFSBD5R22js.addPipe.call(void 0, key, this.pipe.bind(this));
199
+ _chunkBSE2DSDKjs.addPipe.call(void 0, key, this.pipe.bind(this));
209
200
  this.onUnmount(() => {
210
- delete _chunkFSBD5R22js.Context.pipeRecord[key];
201
+ delete _chunkBSE2DSDKjs.Context.pipeRecord[key];
211
202
  });
212
203
  }
213
204
  if (this.plugin) {
214
- _chunkFSBD5R22js.addPlugin.call(void 0, key, this.plugin.bind(this));
205
+ _chunkBSE2DSDKjs.addPlugin.call(void 0, key, this.plugin.bind(this));
215
206
  this.onUnmount(() => {
216
- delete _chunkFSBD5R22js.Context.pluginRecord[key];
207
+ delete _chunkBSE2DSDKjs.Context.pluginRecord[key];
217
208
  });
218
209
  }
219
210
  if (this.intercept) {
220
- _chunkFSBD5R22js.addInterceptor.call(void 0, key, this.intercept.bind(this));
211
+ _chunkBSE2DSDKjs.addInterceptor.call(void 0, key, this.intercept.bind(this));
221
212
  this.onUnmount(() => {
222
- delete _chunkFSBD5R22js.Context.interceptorRecord[key];
213
+ delete _chunkBSE2DSDKjs.Context.interceptorRecord[key];
223
214
  });
224
215
  }
225
216
  if (this.guard) {
226
- _chunkFSBD5R22js.addGuard.call(void 0, key, this.guard.bind(this));
217
+ _chunkBSE2DSDKjs.addGuard.call(void 0, key, this.guard.bind(this));
227
218
  this.onUnmount(() => {
228
- delete _chunkFSBD5R22js.Context.guardRecord[key];
219
+ delete _chunkBSE2DSDKjs.Context.guardRecord[key];
229
220
  });
230
221
  }
231
222
  if (this.filter) {
232
- _chunkFSBD5R22js.addFilter.call(void 0, key, this.filter.bind(this));
223
+ _chunkBSE2DSDKjs.addFilter.call(void 0, key, this.filter.bind(this));
233
224
  this.onUnmount(() => {
234
- delete _chunkFSBD5R22js.Context.filterRecord[key];
225
+ delete _chunkBSE2DSDKjs.Context.filterRecord[key];
235
226
  });
236
227
  }
237
228
  }
@@ -410,13 +401,4 @@ _chunkZP7HNASUjs.__name.call(void 0, HTTPGenerator, "HTTPGenerator");
410
401
 
411
402
 
412
403
 
413
-
414
-
415
-
416
-
417
-
418
-
419
-
420
-
421
-
422
- exports.Arg = _chunk3BV2GRS7js.Arg; exports.BadGatewayException = _chunkFSBD5R22js.BadGatewayException; exports.BadRequestException = _chunkFSBD5R22js.BadRequestException; exports.BaseParam = _chunk3BV2GRS7js.BaseParam; exports.Body = _chunk3BV2GRS7js.Body; exports.ConflictException = _chunkFSBD5R22js.ConflictException; exports.Context = _chunkFSBD5R22js.Context; exports.Controller = _chunk3BV2GRS7js.Controller; exports.Ctx = _chunk3BV2GRS7js.Ctx; exports.CustomResponse = CustomResponse; exports.Define = _chunk3BV2GRS7js.Define; exports.Delete = _chunk3BV2GRS7js.Delete; exports.Dev = Dev; exports.ERROR_SYMBOL = _chunkZP7HNASUjs.ERROR_SYMBOL; exports.Event = _chunk3BV2GRS7js.Event; exports.Exception = _chunkFSBD5R22js.Exception; exports.Factory = _chunkHMPTPTFLjs.Factory; exports.Filter = _chunk3BV2GRS7js.Filter; exports.ForbiddenException = _chunkFSBD5R22js.ForbiddenException; exports.FrameworkException = _chunkFSBD5R22js.FrameworkException; exports.Generator = Generator; exports.Get = _chunk3BV2GRS7js.Get; exports.Guard = _chunk3BV2GRS7js.Guard; exports.HMR = _chunkFSBD5R22js.HMR; exports.HTTPGenerator = HTTPGenerator; exports.Head = _chunk3BV2GRS7js.Head; exports.Header = _chunk3BV2GRS7js.Header; exports.IS_HMR = _chunkZP7HNASUjs.IS_HMR; exports.IS_ONLY_GENERATE = _chunkZP7HNASUjs.IS_ONLY_GENERATE; exports.IS_STRICT = _chunkZP7HNASUjs.IS_STRICT; exports.Injectable = _chunk3BV2GRS7js.Injectable; exports.Interceptor = _chunk3BV2GRS7js.Interceptor; exports.InvalidInputException = _chunkFSBD5R22js.InvalidInputException; exports.LOG_LEVEL = _chunkZP7HNASUjs.LOG_LEVEL; exports.Meta = _chunkHMPTPTFLjs.Meta; exports.Mix = _chunkZP7HNASUjs.Mix; exports.NotFoundException = _chunkFSBD5R22js.NotFoundException; exports.PExtension = PExtension; exports.PFilter = PFilter; exports.PGuard = PGuard; exports.PInterceptor = PInterceptor; exports.PPipe = PPipe; exports.PPlugin = PPlugin; exports.PS_EXIT_CODE = _chunkZP7HNASUjs.PS_EXIT_CODE; exports.Param = _chunk3BV2GRS7js.Param; exports.Patch = _chunk3BV2GRS7js.Patch; exports.PayloadLargeException = _chunkFSBD5R22js.PayloadLargeException; exports.Pipe = _chunk3BV2GRS7js.Pipe; exports.Plugin = _chunk3BV2GRS7js.Plugin; exports.Post = _chunk3BV2GRS7js.Post; exports.Put = _chunk3BV2GRS7js.Put; exports.Query = _chunk3BV2GRS7js.Query; exports.Queue = _chunk3BV2GRS7js.Queue; exports.RPCGenerator = RPCGenerator; exports.Route = _chunk3BV2GRS7js.Route; exports.Rpc = _chunk3BV2GRS7js.Rpc; exports.ServiceUnavailableException = _chunkFSBD5R22js.ServiceUnavailableException; exports.TimeoutException = _chunkFSBD5R22js.TimeoutException; exports.TimerException = _chunkFSBD5R22js.TimerException; exports.UNMOUNT_SYMBOL = _chunkZP7HNASUjs.UNMOUNT_SYMBOL; exports.UnauthorizedException = _chunkFSBD5R22js.UnauthorizedException; exports.UndefinedException = _chunkFSBD5R22js.UndefinedException; exports.UnsupportedMediaTypeException = _chunkFSBD5R22js.UnsupportedMediaTypeException; exports.ValidateException = _chunkFSBD5R22js.ValidateException; exports.WorkerException = _chunkFSBD5R22js.WorkerException; exports.addFilter = _chunkFSBD5R22js.addFilter; exports.addGuard = _chunkFSBD5R22js.addGuard; exports.addInterceptor = _chunkFSBD5R22js.addInterceptor; exports.addPipe = _chunkFSBD5R22js.addPipe; exports.addPlugin = _chunkFSBD5R22js.addPlugin; exports.argToReq = _chunkFSBD5R22js.argToReq; exports.createControllerMetaMap = _chunkFSBD5R22js.createControllerMetaMap; exports.defaultPipe = _chunkFSBD5R22js.defaultPipe; exports.detectAopDep = _chunkFSBD5R22js.detectAopDep; exports.emitter = _chunkHMPTPTFLjs.emitter; exports.genClientQueue = _chunkFSBD5R22js.genClientQueue; exports.log = _chunkZP7HNASUjs.log; exports.mergeArray = _chunkFSBD5R22js.mergeArray; exports.mergeObject = _chunkFSBD5R22js.mergeObject; exports.resolveDep = _chunkFSBD5R22js.resolveDep; exports.setLogger = _chunkZP7HNASUjs.setLogger; exports.shallowClone = _chunkFSBD5R22js.shallowClone;
404
+ exports.Arg = _chunkVMLHTEW3js.Arg; exports.BadGatewayException = _chunkBSE2DSDKjs.BadGatewayException; exports.BadRequestException = _chunkBSE2DSDKjs.BadRequestException; exports.BaseParam = _chunkVMLHTEW3js.BaseParam; exports.Body = _chunkVMLHTEW3js.Body; exports.ConflictException = _chunkBSE2DSDKjs.ConflictException; exports.Context = _chunkBSE2DSDKjs.Context; exports.Controller = _chunkVMLHTEW3js.Controller; exports.Ctx = _chunkVMLHTEW3js.Ctx; exports.CustomResponse = CustomResponse; exports.Define = _chunkVMLHTEW3js.Define; exports.Delete = _chunkVMLHTEW3js.Delete; exports.Dev = Dev; exports.ERROR_SYMBOL = _chunkZP7HNASUjs.ERROR_SYMBOL; exports.Event = _chunkVMLHTEW3js.Event; exports.Exception = _chunkBSE2DSDKjs.Exception; exports.Factory = _chunk5BVUCNMAjs.Factory; exports.Filter = _chunkVMLHTEW3js.Filter; exports.ForbiddenException = _chunkBSE2DSDKjs.ForbiddenException; exports.FrameworkException = _chunkBSE2DSDKjs.FrameworkException; exports.Generator = Generator; exports.Get = _chunkVMLHTEW3js.Get; exports.Guard = _chunkVMLHTEW3js.Guard; exports.HTTPGenerator = HTTPGenerator; exports.Head = _chunkVMLHTEW3js.Head; exports.Header = _chunkVMLHTEW3js.Header; exports.IS_HMR = _chunkZP7HNASUjs.IS_HMR; exports.IS_ONLY_GENERATE = _chunkZP7HNASUjs.IS_ONLY_GENERATE; exports.IS_STRICT = _chunkZP7HNASUjs.IS_STRICT; exports.Injectable = _chunkVMLHTEW3js.Injectable; exports.Interceptor = _chunkVMLHTEW3js.Interceptor; exports.InvalidInputException = _chunkBSE2DSDKjs.InvalidInputException; exports.LOG_LEVEL = _chunkZP7HNASUjs.LOG_LEVEL; exports.Meta = _chunk5BVUCNMAjs.Meta; exports.Mix = _chunkZP7HNASUjs.Mix; exports.NotFoundException = _chunkBSE2DSDKjs.NotFoundException; exports.PExtension = PExtension; exports.PFilter = PFilter; exports.PGuard = PGuard; exports.PInterceptor = PInterceptor; exports.PPipe = PPipe; exports.PPlugin = PPlugin; exports.PS_EXIT_CODE = _chunkZP7HNASUjs.PS_EXIT_CODE; exports.Param = _chunkVMLHTEW3js.Param; exports.Patch = _chunkVMLHTEW3js.Patch; exports.PayloadLargeException = _chunkBSE2DSDKjs.PayloadLargeException; exports.Pipe = _chunkVMLHTEW3js.Pipe; exports.Plugin = _chunkVMLHTEW3js.Plugin; exports.Post = _chunkVMLHTEW3js.Post; exports.Put = _chunkVMLHTEW3js.Put; exports.Query = _chunkVMLHTEW3js.Query; exports.Queue = _chunkVMLHTEW3js.Queue; exports.RPCGenerator = RPCGenerator; exports.Route = _chunkVMLHTEW3js.Route; exports.Rpc = _chunkVMLHTEW3js.Rpc; exports.ServiceUnavailableException = _chunkBSE2DSDKjs.ServiceUnavailableException; exports.TimeoutException = _chunkBSE2DSDKjs.TimeoutException; exports.TimerException = _chunkBSE2DSDKjs.TimerException; exports.UNMOUNT_SYMBOL = _chunkZP7HNASUjs.UNMOUNT_SYMBOL; exports.UnauthorizedException = _chunkBSE2DSDKjs.UnauthorizedException; exports.UndefinedException = _chunkBSE2DSDKjs.UndefinedException; exports.UnsupportedMediaTypeException = _chunkBSE2DSDKjs.UnsupportedMediaTypeException; exports.ValidateException = _chunkBSE2DSDKjs.ValidateException; exports.WorkerException = _chunkBSE2DSDKjs.WorkerException; exports.addFilter = _chunkBSE2DSDKjs.addFilter; exports.addGuard = _chunkBSE2DSDKjs.addGuard; exports.addInterceptor = _chunkBSE2DSDKjs.addInterceptor; exports.addPipe = _chunkBSE2DSDKjs.addPipe; exports.addPlugin = _chunkBSE2DSDKjs.addPlugin; exports.defaultPipe = _chunkBSE2DSDKjs.defaultPipe; exports.emitter = _chunk5BVUCNMAjs.emitter; exports.log = _chunkZP7HNASUjs.log; exports.setLogger = _chunkZP7HNASUjs.setLogger;
package/dist/index.mjs CHANGED
@@ -2,7 +2,7 @@ import {
2
2
  Factory,
3
3
  Meta,
4
4
  emitter
5
- } from "./chunk-2HKQPZDT.mjs";
5
+ } from "./chunk-CKQW3FDK.mjs";
6
6
  import {
7
7
  Arg,
8
8
  BaseParam,
@@ -29,7 +29,7 @@ import {
29
29
  Queue,
30
30
  Route,
31
31
  Rpc
32
- } from "./chunk-UU6RHGRF.mjs";
32
+ } from "./chunk-V3WIKOP3.mjs";
33
33
  import {
34
34
  BadGatewayException,
35
35
  BadRequestException,
@@ -38,7 +38,6 @@ import {
38
38
  Exception,
39
39
  ForbiddenException,
40
40
  FrameworkException,
41
- HMR,
42
41
  InvalidInputException,
43
42
  NotFoundException,
44
43
  PayloadLargeException,
@@ -55,16 +54,8 @@ import {
55
54
  addInterceptor,
56
55
  addPipe,
57
56
  addPlugin,
58
- argToReq,
59
- createControllerMetaMap,
60
- defaultPipe,
61
- detectAopDep,
62
- genClientQueue,
63
- mergeArray,
64
- mergeObject,
65
- resolveDep,
66
- shallowClone
67
- } from "./chunk-665MB62T.mjs";
57
+ defaultPipe
58
+ } from "./chunk-JE6BBDXW.mjs";
68
59
  import {
69
60
  ERROR_SYMBOL,
70
61
  IS_HMR,
@@ -360,7 +351,6 @@ export {
360
351
  Generator,
361
352
  Get,
362
353
  Guard,
363
- HMR,
364
354
  HTTPGenerator,
365
355
  Head,
366
356
  Header,
@@ -407,16 +397,8 @@ export {
407
397
  addInterceptor,
408
398
  addPipe,
409
399
  addPlugin,
410
- argToReq,
411
- createControllerMetaMap,
412
400
  defaultPipe,
413
- detectAopDep,
414
401
  emitter,
415
- genClientQueue,
416
402
  log,
417
- mergeArray,
418
- mergeObject,
419
- resolveDep,
420
- setLogger,
421
- shallowClone
403
+ setLogger
422
404
  };
@@ -1,6 +1,7 @@
1
1
  import { WorkerOptions, QueueOptions, Worker, Queue } from 'bullmq';
2
- import { F as Factory, T as ToClientMap } from '../../core-39f27fe8.js';
3
- import { b as RpcContext, R as RpcServerOptions, a as RpcClientOptions } from '../../helper-6133f78f.js';
2
+ import { F as Factory } from '../../core-7f6d2be6.js';
3
+ import { b as RpcContext, R as RpcServerOptions, a as RpcClientOptions } from '../../types-f3b79218.js';
4
+ import { T as ToClientMap } from '../../types-81be0ba3.js';
4
5
  import 'phecda-core';
5
6
 
6
7
  interface BullmqCtx extends RpcContext {
@@ -4,7 +4,7 @@
4
4
 
5
5
 
6
6
 
7
- var _chunkFSBD5R22js = require('../../chunk-FSBD5R22.js');
7
+ var _chunkBSE2DSDKjs = require('../../chunk-BSE2DSDK.js');
8
8
 
9
9
 
10
10
  var _chunkZP7HNASUjs = require('../../chunk-ZP7HNASU.js');
@@ -18,14 +18,14 @@ async function create({ moduleMap, meta }, opts = {}) {
18
18
  const workerMap = {};
19
19
  const queueMap = {};
20
20
  const existQueue = /* @__PURE__ */ new Set();
21
- const metaMap = _chunkFSBD5R22js.createControllerMetaMap.call(void 0, meta, (meta2) => {
21
+ const metaMap = _chunkBSE2DSDKjs.createControllerMetaMap.call(void 0, meta, (meta2) => {
22
22
  const { controller, rpc, func, tag } = meta2.data;
23
23
  if (controller === "rpc" && _optionalChain([rpc, 'optionalAccess', _ => _.queue]) !== void 0) {
24
24
  debug(`register method "${func}" in module "${tag}"`);
25
25
  return true;
26
26
  }
27
27
  });
28
- _chunkFSBD5R22js.detectAopDep.call(void 0, meta, {
28
+ _chunkBSE2DSDKjs.detectAopDep.call(void 0, meta, {
29
29
  guards: globalGuards,
30
30
  interceptors: globalInterceptors
31
31
  }, "rpc");
@@ -56,7 +56,7 @@ async function create({ moduleMap, meta }, opts = {}) {
56
56
  const { data: { rpc: { isEvent } = {} } } = meta2;
57
57
  if (!isEvent && !(clientQueue in queueMap))
58
58
  queueMap[clientQueue] = new (0, _bullmq.Queue)(clientQueue, queueOpts);
59
- const context = new (0, _chunkFSBD5R22js.Context)({
59
+ const context = new (0, _chunkBSE2DSDKjs.Context)({
60
60
  type: "bullmq",
61
61
  moduleMap,
62
62
  meta: meta2,
@@ -91,7 +91,7 @@ async function create({ moduleMap, meta }, opts = {}) {
91
91
  }
92
92
  _chunkZP7HNASUjs.__name.call(void 0, handleRequest, "handleRequest");
93
93
  subscribeQueues();
94
- _chunkFSBD5R22js.HMR.call(void 0, async () => {
94
+ _chunkBSE2DSDKjs.HMR.call(void 0, async () => {
95
95
  for (const i in workerMap)
96
96
  await workerMap[i].close(true);
97
97
  for (const i in queueMap)
@@ -114,7 +114,7 @@ async function createClient(controllers, opts = {}) {
114
114
  const { max, workerOpts, queueOpts, timeout, key } = opts;
115
115
  const ret = {};
116
116
  const emitter = new (0, _events.EventEmitter)();
117
- const clientQueue = _chunkFSBD5R22js.genClientQueue.call(void 0, key);
117
+ const clientQueue = _chunkBSE2DSDKjs.genClientQueue.call(void 0, key);
118
118
  const queueMap = {};
119
119
  new (0, _bullmq.Worker)(clientQueue, async (job) => {
120
120
  const { data, id, error } = job.data;
@@ -4,7 +4,7 @@ import {
4
4
  createControllerMetaMap,
5
5
  detectAopDep,
6
6
  genClientQueue
7
- } from "../../chunk-665MB62T.mjs";
7
+ } from "../../chunk-JE6BBDXW.mjs";
8
8
  import {
9
9
  __name
10
10
  } from "../../chunk-VLV3AO3H.mjs";
@@ -1,6 +1,7 @@
1
1
  import { Consumer, Producer } from 'kafkajs';
2
- import { F as Factory, T as ToClientMap } from '../../core-39f27fe8.js';
3
- import { b as RpcContext, R as RpcServerOptions, a as RpcClientOptions } from '../../helper-6133f78f.js';
2
+ import { F as Factory } from '../../core-7f6d2be6.js';
3
+ import { b as RpcContext, R as RpcServerOptions, a as RpcClientOptions } from '../../types-f3b79218.js';
4
+ import { T as ToClientMap } from '../../types-81be0ba3.js';
4
5
  import 'phecda-core';
5
6
 
6
7
  interface KafkaCtx extends RpcContext {
@@ -3,7 +3,7 @@
3
3
 
4
4
 
5
5
 
6
- var _chunkFSBD5R22js = require('../../chunk-FSBD5R22.js');
6
+ var _chunkBSE2DSDKjs = require('../../chunk-BSE2DSDK.js');
7
7
 
8
8
 
9
9
  var _chunkZP7HNASUjs = require('../../chunk-ZP7HNASU.js');
@@ -14,14 +14,14 @@ var debug = _debug2.default.call(void 0, "phecda-server/kafka");
14
14
  async function bind({ consumer, producer }, { moduleMap, meta }, opts = {}) {
15
15
  const { globalGuards, globalInterceptors, globalFilter, globalPipe } = opts;
16
16
  const existQueue = /* @__PURE__ */ new Set();
17
- const metaMap = _chunkFSBD5R22js.createControllerMetaMap.call(void 0, meta, (meta2) => {
17
+ const metaMap = _chunkBSE2DSDKjs.createControllerMetaMap.call(void 0, meta, (meta2) => {
18
18
  const { controller, rpc, func, tag } = meta2.data;
19
19
  if (controller === "rpc" && _optionalChain([rpc, 'optionalAccess', _ => _.queue]) !== void 0) {
20
20
  debug(`register method "${func}" in module "${tag}"`);
21
21
  return true;
22
22
  }
23
23
  });
24
- _chunkFSBD5R22js.detectAopDep.call(void 0, meta, {
24
+ _chunkBSE2DSDKjs.detectAopDep.call(void 0, meta, {
25
25
  guards: globalGuards,
26
26
  interceptors: globalInterceptors
27
27
  }, "rpc");
@@ -58,7 +58,7 @@ async function bind({ consumer, producer }, { moduleMap, meta }, opts = {}) {
58
58
  const meta2 = metaMap.get(tag)[func];
59
59
  const { data: { rpc } } = meta2;
60
60
  const isEvent = rpc.isEvent;
61
- const context = new (0, _chunkFSBD5R22js.Context)({
61
+ const context = new (0, _chunkBSE2DSDKjs.Context)({
62
62
  type: "kafka",
63
63
  moduleMap,
64
64
  meta: meta2,
@@ -120,7 +120,7 @@ async function createClient({ producer, consumer }, controllers, opts) {
120
120
  let eventCount = 1;
121
121
  const ret = {};
122
122
  const emitter = new (0, _events.EventEmitter)();
123
- const clientQueue = _chunkFSBD5R22js.genClientQueue.call(void 0, _optionalChain([opts, 'optionalAccess', _2 => _2.key]));
123
+ const clientQueue = _chunkBSE2DSDKjs.genClientQueue.call(void 0, _optionalChain([opts, 'optionalAccess', _2 => _2.key]));
124
124
  await consumer.subscribe({
125
125
  topic: clientQueue,
126
126
  fromBeginning: true
@@ -3,7 +3,7 @@ import {
3
3
  createControllerMetaMap,
4
4
  detectAopDep,
5
5
  genClientQueue
6
- } from "../../chunk-665MB62T.mjs";
6
+ } from "../../chunk-JE6BBDXW.mjs";
7
7
  import {
8
8
  __name
9
9
  } from "../../chunk-VLV3AO3H.mjs";
@@ -1,6 +1,7 @@
1
1
  import { NatsConnection } from 'nats';
2
- import { F as Factory, T as ToClientMap } from '../../core-39f27fe8.js';
3
- import { b as RpcContext, R as RpcServerOptions, a as RpcClientOptions } from '../../helper-6133f78f.js';
2
+ import { F as Factory } from '../../core-7f6d2be6.js';
3
+ import { b as RpcContext, R as RpcServerOptions, a as RpcClientOptions } from '../../types-f3b79218.js';
4
+ import { T as ToClientMap } from '../../types-81be0ba3.js';
4
5
  import 'phecda-core';
5
6
 
6
7
  interface NatsCtx extends RpcContext {