phecda-server 7.0.0-alpha.7 → 7.0.0-alpha.9

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 (80) hide show
  1. package/bin/cli.mjs +10 -1
  2. package/dist/{chunk-M5HGFUCV.js → chunk-5RBTN33A.js} +23 -3
  3. package/dist/{chunk-RGSKKTHD.mjs → chunk-7ZGYJ5OW.mjs} +88 -54
  4. package/dist/{chunk-IRXNF6ZE.mjs → chunk-CVPZWDXU.mjs} +39 -30
  5. package/dist/{chunk-MENRZSGW.js → chunk-FX3LDQII.js} +88 -79
  6. package/dist/{chunk-C5BVKEGW.mjs → chunk-FXTJ3BJ6.mjs} +25 -5
  7. package/dist/{chunk-XSMUJ77A.js → chunk-KJUD2BKE.js} +103 -69
  8. package/dist/{chunk-JPSXNDXP.mjs → chunk-ODVWOXVB.mjs} +1 -1
  9. package/dist/{chunk-VYMSCWXC.js → chunk-V5EYXVJT.js} +24 -24
  10. package/dist/{core-DU7gQKSk.d.mts → core-BDkhrEyf.d.mts} +4 -3
  11. package/dist/{core-CzElxZoF.d.ts → core-D_cz0tKa.d.ts} +4 -3
  12. package/dist/helper.d.mts +7 -5
  13. package/dist/helper.d.ts +7 -5
  14. package/dist/helper.js +8 -3
  15. package/dist/helper.mjs +10 -5
  16. package/dist/http/elysia/index.d.mts +4 -4
  17. package/dist/http/elysia/index.d.ts +4 -4
  18. package/dist/http/elysia/index.js +41 -44
  19. package/dist/http/elysia/index.mjs +7 -10
  20. package/dist/http/express/index.d.mts +4 -4
  21. package/dist/http/express/index.d.ts +4 -4
  22. package/dist/http/express/index.js +38 -41
  23. package/dist/http/express/index.mjs +7 -10
  24. package/dist/http/fastify/index.d.mts +4 -4
  25. package/dist/http/fastify/index.d.ts +4 -4
  26. package/dist/http/fastify/index.js +39 -42
  27. package/dist/http/fastify/index.mjs +7 -10
  28. package/dist/http/h3/index.d.mts +4 -4
  29. package/dist/http/h3/index.d.ts +4 -4
  30. package/dist/http/h3/index.js +39 -42
  31. package/dist/http/h3/index.mjs +7 -10
  32. package/dist/http/hono/index.d.mts +4 -4
  33. package/dist/http/hono/index.d.ts +4 -4
  34. package/dist/http/hono/index.js +35 -39
  35. package/dist/http/hono/index.mjs +3 -7
  36. package/dist/http/hyper-express/index.d.mts +4 -4
  37. package/dist/http/hyper-express/index.d.ts +4 -4
  38. package/dist/http/hyper-express/index.js +36 -39
  39. package/dist/http/hyper-express/index.mjs +6 -9
  40. package/dist/http/koa/index.d.mts +4 -4
  41. package/dist/http/koa/index.d.ts +4 -4
  42. package/dist/http/koa/index.js +38 -41
  43. package/dist/http/koa/index.mjs +7 -10
  44. package/dist/index.d.mts +35 -33
  45. package/dist/index.d.ts +35 -33
  46. package/dist/index.js +42 -43
  47. package/dist/index.mjs +15 -16
  48. package/dist/{meta-BTnLXuCa.d.ts → meta-BX5jhe4Z.d.mts} +3 -4
  49. package/dist/{meta-BTnLXuCa.d.mts → meta-BX5jhe4Z.d.ts} +3 -4
  50. package/dist/rpc/bullmq/index.d.mts +4 -4
  51. package/dist/rpc/bullmq/index.d.ts +4 -4
  52. package/dist/rpc/bullmq/index.js +14 -14
  53. package/dist/rpc/bullmq/index.mjs +3 -3
  54. package/dist/rpc/kafka/index.d.mts +4 -4
  55. package/dist/rpc/kafka/index.d.ts +4 -4
  56. package/dist/rpc/kafka/index.js +14 -14
  57. package/dist/rpc/kafka/index.mjs +2 -2
  58. package/dist/rpc/nats/index.d.mts +4 -4
  59. package/dist/rpc/nats/index.d.ts +4 -4
  60. package/dist/rpc/nats/index.js +13 -13
  61. package/dist/rpc/nats/index.mjs +3 -3
  62. package/dist/rpc/rabbitmq/index.d.mts +4 -4
  63. package/dist/rpc/rabbitmq/index.d.ts +4 -4
  64. package/dist/rpc/rabbitmq/index.js +15 -15
  65. package/dist/rpc/rabbitmq/index.mjs +3 -3
  66. package/dist/rpc/redis/index.d.mts +4 -4
  67. package/dist/rpc/redis/index.d.ts +4 -4
  68. package/dist/rpc/redis/index.js +13 -13
  69. package/dist/rpc/redis/index.mjs +3 -3
  70. package/dist/test.d.mts +3 -3
  71. package/dist/test.d.ts +3 -3
  72. package/dist/test.js +6 -6
  73. package/dist/test.mjs +2 -2
  74. package/dist/{types-CbfaGkPA.d.ts → types-B-rUM9Fm.d.mts} +3 -3
  75. package/dist/{types--E-OCZhC.d.ts → types-CMeuFoyd.d.ts} +3 -3
  76. package/dist/{types-BxlzVoRv.d.mts → types-DKVhyZk_.d.mts} +3 -3
  77. package/dist/{types-BYqBeqrs.d.mts → types-MxxtkZXw.d.ts} +3 -3
  78. package/package.json +3 -2
  79. package/register/index.mjs +20 -11
  80. package/register/loader.mjs +13 -28
package/dist/index.js CHANGED
@@ -6,7 +6,7 @@
6
6
 
7
7
 
8
8
 
9
- var _chunkXSMUJ77Ajs = require('./chunk-XSMUJ77A.js');
9
+ var _chunkKJUD2BKEjs = require('./chunk-KJUD2BKE.js');
10
10
 
11
11
 
12
12
 
@@ -31,7 +31,7 @@ var _chunkXSMUJ77Ajs = require('./chunk-XSMUJ77A.js');
31
31
 
32
32
 
33
33
 
34
- var _chunkVYMSCWXCjs = require('./chunk-VYMSCWXC.js');
34
+ var _chunkV5EYXVJTjs = require('./chunk-V5EYXVJT.js');
35
35
 
36
36
 
37
37
 
@@ -56,8 +56,8 @@ var _chunkVYMSCWXCjs = require('./chunk-VYMSCWXC.js');
56
56
 
57
57
 
58
58
 
59
- var _chunkMENRZSGWjs = require('./chunk-MENRZSGW.js');
60
59
 
60
+ var _chunkFX3LDQIIjs = require('./chunk-FX3LDQII.js');
61
61
 
62
62
 
63
63
 
@@ -71,13 +71,13 @@ var _chunkMENRZSGWjs = require('./chunk-MENRZSGW.js');
71
71
 
72
72
 
73
73
 
74
- var _chunkM5HGFUCVjs = require('./chunk-M5HGFUCV.js');
74
+ var _chunk5RBTN33Ajs = require('./chunk-5RBTN33A.js');
75
75
 
76
76
  // src/types.ts
77
77
  var ResponseSymbol = Symbol("response");
78
78
  var CustomResponse = class {
79
79
  static {
80
- _chunkM5HGFUCVjs.__name.call(void 0, this, "CustomResponse");
80
+ _chunk5RBTN33Ajs.__name.call(void 0, this, "CustomResponse");
81
81
  }
82
82
 
83
83
  };
@@ -90,54 +90,54 @@ function _ts_decorate(decorators, target, key, desc) {
90
90
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
91
91
  return c > 3 && r && Object.defineProperty(target, key, r), r;
92
92
  }
93
- _chunkM5HGFUCVjs.__name.call(void 0, _ts_decorate, "_ts_decorate");
93
+ _chunk5RBTN33Ajs.__name.call(void 0, _ts_decorate, "_ts_decorate");
94
94
  function _ts_metadata(k, v) {
95
95
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
96
96
  }
97
- _chunkM5HGFUCVjs.__name.call(void 0, _ts_metadata, "_ts_metadata");
97
+ _chunk5RBTN33Ajs.__name.call(void 0, _ts_metadata, "_ts_metadata");
98
98
  var ServerBase = (_class = class extends _phecdacore.Base {constructor(...args2) { super(...args2); _class.prototype.__init.call(this); }
99
99
  static {
100
- _chunkM5HGFUCVjs.__name.call(void 0, this, "ServerBase");
100
+ _chunk5RBTN33Ajs.__name.call(void 0, this, "ServerBase");
101
101
  }
102
- __init() {this.emitter = exports.emitter = _chunkXSMUJ77Ajs.emitter}
102
+ __init() {this.emitter = exports.emitter = _chunkKJUD2BKEjs.emitter}
103
103
  log(msg, level = "log") {
104
- _chunkM5HGFUCVjs.log.call(void 0, msg, level, this.tag);
104
+ _chunk5RBTN33Ajs.log.call(void 0, msg, level, this.tag);
105
105
  }
106
106
  }, _class);
107
107
  var HttpBase = class extends ServerBase {
108
108
  static {
109
- _chunkM5HGFUCVjs.__name.call(void 0, this, "HttpBase");
109
+ _chunk5RBTN33Ajs.__name.call(void 0, this, "HttpBase");
110
110
  }
111
111
 
112
112
  };
113
113
  _ts_decorate([
114
- _chunkVYMSCWXCjs.Ctx,
115
- _ts_metadata("design:type", typeof HttpContext === "undefined" ? Object : HttpContext)
114
+ _chunkV5EYXVJTjs.Ctx,
115
+ _ts_metadata("design:type", typeof Ctx === "undefined" ? Object : Ctx)
116
116
  ], HttpBase.prototype, "context", void 0);
117
117
  var RpcBase = class extends ServerBase {
118
118
  static {
119
- _chunkM5HGFUCVjs.__name.call(void 0, this, "RpcBase");
119
+ _chunk5RBTN33Ajs.__name.call(void 0, this, "RpcBase");
120
120
  }
121
121
 
122
122
  };
123
123
  _ts_decorate([
124
- _chunkVYMSCWXCjs.Ctx,
125
- _ts_metadata("design:type", typeof RpcContext === "undefined" ? Object : RpcContext)
124
+ _chunkV5EYXVJTjs.Ctx,
125
+ _ts_metadata("design:type", typeof Ctx === "undefined" ? Object : Ctx)
126
126
  ], RpcBase.prototype, "context", void 0);
127
127
 
128
128
  // src/modules/filter.ts
129
129
 
130
130
  var PFilter = class extends ServerBase {
131
131
  static {
132
- _chunkM5HGFUCVjs.__name.call(void 0, this, "PFilter");
132
+ _chunk5RBTN33Ajs.__name.call(void 0, this, "PFilter");
133
133
  }
134
134
 
135
135
  constructor(tag) {
136
136
  super();
137
137
  this.key = tag || _phecdacore.getTag.call(void 0, this);
138
- _chunkMENRZSGWjs.addFilter.call(void 0, this.key, this.use.bind(this));
138
+ _chunkFX3LDQIIjs.addFilter.call(void 0, this.key, this.use.bind(this));
139
139
  this.onUnmount(() => {
140
- delete _chunkMENRZSGWjs.Context.filterRecord[this.key];
140
+ delete _chunkFX3LDQIIjs.Context.filterRecord[this.key];
141
141
  });
142
142
  }
143
143
  };
@@ -146,16 +146,16 @@ var PFilter = class extends ServerBase {
146
146
 
147
147
  var PGuard = (_class2 = class extends ServerBase {
148
148
  static {
149
- _chunkM5HGFUCVjs.__name.call(void 0, this, "PGuard");
149
+ _chunk5RBTN33Ajs.__name.call(void 0, this, "PGuard");
150
150
  }
151
151
 
152
152
  __init2() {this.priority = 0}
153
153
  constructor(tag) {
154
154
  super();_class2.prototype.__init2.call(this);;
155
155
  this.key = tag || _phecdacore.getTag.call(void 0, this);
156
- _chunkMENRZSGWjs.addGuard.call(void 0, this.key, this.use.bind(this), this.priority);
156
+ _chunkFX3LDQIIjs.addGuard.call(void 0, this.key, this.use.bind(this), this.priority);
157
157
  this.onUnmount(() => {
158
- delete _chunkMENRZSGWjs.Context.guardRecord[this.key];
158
+ delete _chunkFX3LDQIIjs.Context.guardRecord[this.key];
159
159
  });
160
160
  }
161
161
  }, _class2);
@@ -164,15 +164,15 @@ var PGuard = (_class2 = class extends ServerBase {
164
164
 
165
165
  var PPipe = class extends ServerBase {
166
166
  static {
167
- _chunkM5HGFUCVjs.__name.call(void 0, this, "PPipe");
167
+ _chunk5RBTN33Ajs.__name.call(void 0, this, "PPipe");
168
168
  }
169
169
 
170
170
  constructor(tag) {
171
171
  super();
172
172
  this.key = tag || _phecdacore.getTag.call(void 0, this);
173
- _chunkMENRZSGWjs.addPipe.call(void 0, this.key, this.use.bind(this));
173
+ _chunkFX3LDQIIjs.addPipe.call(void 0, this.key, this.use.bind(this));
174
174
  this.onUnmount(() => {
175
- delete _chunkMENRZSGWjs.Context.pipeRecord[this.key];
175
+ delete _chunkFX3LDQIIjs.Context.pipeRecord[this.key];
176
176
  });
177
177
  }
178
178
  };
@@ -181,16 +181,16 @@ var PPipe = class extends ServerBase {
181
181
 
182
182
  var PAddon = (_class3 = class extends ServerBase {
183
183
  static {
184
- _chunkM5HGFUCVjs.__name.call(void 0, this, "PAddon");
184
+ _chunk5RBTN33Ajs.__name.call(void 0, this, "PAddon");
185
185
  }
186
186
 
187
187
  __init3() {this.priority = 0}
188
188
  constructor(tag) {
189
189
  super();_class3.prototype.__init3.call(this);;
190
190
  this.key = tag || _phecdacore.getTag.call(void 0, this);
191
- _chunkMENRZSGWjs.addAddon.call(void 0, this.key, this.use.bind(this), this.priority);
191
+ _chunkFX3LDQIIjs.addAddon.call(void 0, this.key, this.use.bind(this), this.priority);
192
192
  this.onUnmount(() => {
193
- delete _chunkMENRZSGWjs.Context.addonRecord[this.key];
193
+ delete _chunkFX3LDQIIjs.Context.addonRecord[this.key];
194
194
  });
195
195
  }
196
196
  }, _class3);
@@ -199,7 +199,7 @@ var PAddon = (_class3 = class extends ServerBase {
199
199
 
200
200
  var PExtension = class extends ServerBase {
201
201
  static {
202
- _chunkM5HGFUCVjs.__name.call(void 0, this, "PExtension");
202
+ _chunk5RBTN33Ajs.__name.call(void 0, this, "PExtension");
203
203
  }
204
204
 
205
205
 
@@ -208,27 +208,27 @@ var PExtension = class extends ServerBase {
208
208
  super();
209
209
  const key = this.key = tag || _phecdacore.getTag.call(void 0, this);
210
210
  if (this.pipe) {
211
- _chunkMENRZSGWjs.addPipe.call(void 0, key, this.pipe.bind(this));
211
+ _chunkFX3LDQIIjs.addPipe.call(void 0, key, this.pipe.bind(this));
212
212
  this.onUnmount(() => {
213
- delete _chunkMENRZSGWjs.Context.pipeRecord[key];
213
+ delete _chunkFX3LDQIIjs.Context.pipeRecord[key];
214
214
  });
215
215
  }
216
216
  if (this.addon) {
217
- _chunkMENRZSGWjs.addAddon.call(void 0, key, this.addon.bind(this), this.addonPriority);
217
+ _chunkFX3LDQIIjs.addAddon.call(void 0, key, this.addon.bind(this), this.addonPriority);
218
218
  this.onUnmount(() => {
219
- delete _chunkMENRZSGWjs.Context.addonRecord[key];
219
+ delete _chunkFX3LDQIIjs.Context.addonRecord[key];
220
220
  });
221
221
  }
222
222
  if (this.guard) {
223
- _chunkMENRZSGWjs.addGuard.call(void 0, key, this.guard.bind(this), this.guardPriority);
223
+ _chunkFX3LDQIIjs.addGuard.call(void 0, key, this.guard.bind(this), this.guardPriority);
224
224
  this.onUnmount(() => {
225
- delete _chunkMENRZSGWjs.Context.guardRecord[key];
225
+ delete _chunkFX3LDQIIjs.Context.guardRecord[key];
226
226
  });
227
227
  }
228
228
  if (this.filter) {
229
- _chunkMENRZSGWjs.addFilter.call(void 0, key, this.filter.bind(this));
229
+ _chunkFX3LDQIIjs.addFilter.call(void 0, key, this.filter.bind(this));
230
230
  this.onUnmount(() => {
231
- delete _chunkMENRZSGWjs.Context.filterRecord[key];
231
+ delete _chunkFX3LDQIIjs.Context.filterRecord[key];
232
232
  });
233
233
  }
234
234
  }
@@ -238,7 +238,7 @@ var PExtension = class extends ServerBase {
238
238
  var _fsextra = require('fs-extra'); var _fsextra2 = _interopRequireDefault(_fsextra);
239
239
  var Generator = class {
240
240
  static {
241
- _chunkM5HGFUCVjs.__name.call(void 0, this, "Generator");
241
+ _chunk5RBTN33Ajs.__name.call(void 0, this, "Generator");
242
242
  }
243
243
 
244
244
  constructor(path) {
@@ -255,7 +255,7 @@ var Generator = class {
255
255
  // src/generator/rpc.ts
256
256
  var RPCGenerator = (_class4 = class extends Generator {constructor(...args3) { super(...args3); _class4.prototype.__init4.call(this);_class4.prototype.__init5.call(this); }
257
257
  static {
258
- _chunkM5HGFUCVjs.__name.call(void 0, this, "RPCGenerator");
258
+ _chunk5RBTN33Ajs.__name.call(void 0, this, "RPCGenerator");
259
259
  }
260
260
  __init4() {this.name = "RPC"}
261
261
  __init5() {this.classMap = {}}
@@ -291,7 +291,7 @@ var RPCGenerator = (_class4 = class extends Generator {constructor(...args3) { s
291
291
  // src/generator/http.ts
292
292
  var HTTPGenerator = (_class5 = class extends Generator {constructor(...args4) { super(...args4); _class5.prototype.__init6.call(this);_class5.prototype.__init7.call(this); }
293
293
  static {
294
- _chunkM5HGFUCVjs.__name.call(void 0, this, "HTTPGenerator");
294
+ _chunk5RBTN33Ajs.__name.call(void 0, this, "HTTPGenerator");
295
295
  }
296
296
  __init6() {this.name = "HTTP"}
297
297
  __init7() {this.classMap = {}}
@@ -308,7 +308,7 @@ var HTTPGenerator = (_class5 = class extends Generator {constructor(...args4) {
308
308
  addMethod(args) {
309
309
  const { http, name, func, params, tag } = args;
310
310
  if (!_optionalChain([http, 'optionalAccess', _2 => _2.type])) return;
311
- const url = http.prefix + http.route.replace(/\/\:([^\/]*)/g, (_, js) => `/{{${js}}}`);
311
+ const url = _chunkFX3LDQIIjs.joinUrl.call(void 0, http.prefix, http.route).replace(/\/\:([^\/]*)/g, (_, js) => `/{{${js}}}`);
312
312
  if (!this.classMap[name]) this.classMap[name] = {};
313
313
  this.classMap[name][func] = `
314
314
  ${func}(...args){
@@ -408,5 +408,4 @@ return ret
408
408
 
409
409
 
410
410
 
411
-
412
- exports.Addon = _chunkVYMSCWXCjs.Addon; exports.Arg = _chunkVYMSCWXCjs.Arg; exports.BadGatewayException = _chunkMENRZSGWjs.BadGatewayException; exports.BadRequestException = _chunkMENRZSGWjs.BadRequestException; exports.BaseParam = _chunkVYMSCWXCjs.BaseParam; exports.Body = _chunkVYMSCWXCjs.Body; exports.ConflictException = _chunkMENRZSGWjs.ConflictException; exports.Context = _chunkMENRZSGWjs.Context; exports.Controller = _chunkVYMSCWXCjs.Controller; exports.Ctx = _chunkVYMSCWXCjs.Ctx; exports.CustomResponse = CustomResponse; exports.Define = _chunkVYMSCWXCjs.Define; exports.Delete = _chunkVYMSCWXCjs.Delete; exports.ERROR_SYMBOL = _chunkM5HGFUCVjs.ERROR_SYMBOL; exports.Exception = _chunkMENRZSGWjs.Exception; exports.Factory = _chunkXSMUJ77Ajs.Factory; exports.Filter = _chunkVYMSCWXCjs.Filter; exports.ForbiddenException = _chunkMENRZSGWjs.ForbiddenException; exports.FrameworkException = _chunkMENRZSGWjs.FrameworkException; exports.Generator = Generator; exports.Get = _chunkVYMSCWXCjs.Get; exports.Guard = _chunkVYMSCWXCjs.Guard; exports.HTTPGenerator = HTTPGenerator; exports.Head = _chunkVYMSCWXCjs.Head; exports.Header = _chunkVYMSCWXCjs.Header; exports.HttpBase = HttpBase; exports.IS_HMR = _chunkM5HGFUCVjs.IS_HMR; exports.IS_ONLY_GENERATE = _chunkM5HGFUCVjs.IS_ONLY_GENERATE; exports.IS_READY = _chunkM5HGFUCVjs.IS_READY; exports.IS_STRICT = _chunkM5HGFUCVjs.IS_STRICT; exports.InvalidInputException = _chunkMENRZSGWjs.InvalidInputException; exports.LOG_LEVEL = _chunkM5HGFUCVjs.LOG_LEVEL; exports.Meta = _chunkXSMUJ77Ajs.Meta; exports.Mixin = _chunkM5HGFUCVjs.Mixin; exports.NotFoundException = _chunkMENRZSGWjs.NotFoundException; exports.PAddon = PAddon; exports.PExtension = PExtension; exports.PFilter = PFilter; exports.PGuard = PGuard; exports.PPipe = PPipe; exports.PS_EXIT_CODE = _chunkM5HGFUCVjs.PS_EXIT_CODE; exports.Param = _chunkVYMSCWXCjs.Param; exports.Patch = _chunkVYMSCWXCjs.Patch; exports.PayloadLargeException = _chunkMENRZSGWjs.PayloadLargeException; exports.Pipe = _chunkVYMSCWXCjs.Pipe; exports.Post = _chunkVYMSCWXCjs.Post; exports.Put = _chunkVYMSCWXCjs.Put; exports.Query = _chunkVYMSCWXCjs.Query; exports.Queue = _chunkVYMSCWXCjs.Queue; exports.RPCGenerator = RPCGenerator; exports.Route = _chunkVYMSCWXCjs.Route; exports.Rpc = _chunkVYMSCWXCjs.Rpc; exports.RpcBase = RpcBase; exports.Search = _chunkVYMSCWXCjs.Search; exports.ServerBase = ServerBase; exports.ServerPhecda = _chunkXSMUJ77Ajs.ServerPhecda; exports.ServiceUnavailableException = _chunkMENRZSGWjs.ServiceUnavailableException; exports.TimeoutException = _chunkMENRZSGWjs.TimeoutException; exports.TimerException = _chunkMENRZSGWjs.TimerException; exports.UnauthorizedException = _chunkMENRZSGWjs.UnauthorizedException; exports.UndefinedException = _chunkMENRZSGWjs.UndefinedException; exports.UnsupportedMediaTypeException = _chunkMENRZSGWjs.UnsupportedMediaTypeException; exports.ValidateException = _chunkMENRZSGWjs.ValidateException; exports.WorkerException = _chunkMENRZSGWjs.WorkerException; exports.addAddon = _chunkMENRZSGWjs.addAddon; exports.addFilter = _chunkMENRZSGWjs.addFilter; exports.addGuard = _chunkMENRZSGWjs.addGuard; exports.addPipe = _chunkMENRZSGWjs.addPipe; exports.defaultPipe = _chunkMENRZSGWjs.defaultPipe; exports.defaultServerInject = _chunkXSMUJ77Ajs.defaultServerInject; exports.emitter = _chunkXSMUJ77Ajs.emitter; exports.getLogger = _chunkM5HGFUCVjs.getLogger; exports.log = _chunkM5HGFUCVjs.log; exports.phecdaNamespace = _chunkXSMUJ77Ajs.phecdaNamespace; exports.runMiddleware = _chunkM5HGFUCVjs.runMiddleware; exports.setLogger = _chunkM5HGFUCVjs.setLogger; exports.useS = _chunkXSMUJ77Ajs.useS;
411
+ exports.Addon = _chunkV5EYXVJTjs.Addon; exports.Arg = _chunkV5EYXVJTjs.Arg; exports.BadGatewayException = _chunkFX3LDQIIjs.BadGatewayException; exports.BadRequestException = _chunkFX3LDQIIjs.BadRequestException; exports.BaseParam = _chunkV5EYXVJTjs.BaseParam; exports.Body = _chunkV5EYXVJTjs.Body; exports.ConflictException = _chunkFX3LDQIIjs.ConflictException; exports.Context = _chunkFX3LDQIIjs.Context; exports.Controller = _chunkV5EYXVJTjs.Controller; exports.Ctx = _chunkV5EYXVJTjs.Ctx; exports.CustomResponse = CustomResponse; exports.Define = _chunkV5EYXVJTjs.Define; exports.Delete = _chunkV5EYXVJTjs.Delete; exports.ERROR_SYMBOL = _chunk5RBTN33Ajs.ERROR_SYMBOL; exports.Exception = _chunkFX3LDQIIjs.Exception; exports.Factory = _chunkKJUD2BKEjs.Factory; exports.Filter = _chunkV5EYXVJTjs.Filter; exports.ForbiddenException = _chunkFX3LDQIIjs.ForbiddenException; exports.FrameworkException = _chunkFX3LDQIIjs.FrameworkException; exports.Generator = Generator; exports.Get = _chunkV5EYXVJTjs.Get; exports.Guard = _chunkV5EYXVJTjs.Guard; exports.HTTPGenerator = HTTPGenerator; exports.Head = _chunkV5EYXVJTjs.Head; exports.Header = _chunkV5EYXVJTjs.Header; exports.HttpBase = HttpBase; exports.IS_DEV = _chunk5RBTN33Ajs.IS_DEV; exports.IS_ONLY_GENERATE = _chunk5RBTN33Ajs.IS_ONLY_GENERATE; exports.IS_STRICT = _chunk5RBTN33Ajs.IS_STRICT; exports.InvalidInputException = _chunkFX3LDQIIjs.InvalidInputException; exports.LOG_LEVEL = _chunk5RBTN33Ajs.LOG_LEVEL; exports.Meta = _chunkKJUD2BKEjs.Meta; exports.Mixin = _chunk5RBTN33Ajs.Mixin; exports.NotFoundException = _chunkFX3LDQIIjs.NotFoundException; exports.PAddon = PAddon; exports.PExtension = PExtension; exports.PFilter = PFilter; exports.PGuard = PGuard; exports.PPipe = PPipe; exports.PS_EXIT_CODE = _chunk5RBTN33Ajs.PS_EXIT_CODE; exports.Param = _chunkV5EYXVJTjs.Param; exports.Patch = _chunkV5EYXVJTjs.Patch; exports.PayloadLargeException = _chunkFX3LDQIIjs.PayloadLargeException; exports.Pipe = _chunkV5EYXVJTjs.Pipe; exports.Post = _chunkV5EYXVJTjs.Post; exports.Put = _chunkV5EYXVJTjs.Put; exports.Query = _chunkV5EYXVJTjs.Query; exports.Queue = _chunkV5EYXVJTjs.Queue; exports.RPCGenerator = RPCGenerator; exports.Route = _chunkV5EYXVJTjs.Route; exports.Rpc = _chunkV5EYXVJTjs.Rpc; exports.RpcBase = RpcBase; exports.Search = _chunkV5EYXVJTjs.Search; exports.ServerBase = ServerBase; exports.ServerPhecda = _chunkKJUD2BKEjs.ServerPhecda; exports.ServiceUnavailableException = _chunkFX3LDQIIjs.ServiceUnavailableException; exports.TimeoutException = _chunkFX3LDQIIjs.TimeoutException; exports.TimerException = _chunkFX3LDQIIjs.TimerException; exports.UnauthorizedException = _chunkFX3LDQIIjs.UnauthorizedException; exports.UndefinedException = _chunkFX3LDQIIjs.UndefinedException; exports.UnsupportedMediaTypeException = _chunkFX3LDQIIjs.UnsupportedMediaTypeException; exports.ValidateException = _chunkFX3LDQIIjs.ValidateException; exports.WorkerException = _chunkFX3LDQIIjs.WorkerException; exports.addAddon = _chunkFX3LDQIIjs.addAddon; exports.addFilter = _chunkFX3LDQIIjs.addFilter; exports.addGuard = _chunkFX3LDQIIjs.addGuard; exports.addPipe = _chunkFX3LDQIIjs.addPipe; exports.defaultPipe = _chunkFX3LDQIIjs.defaultPipe; exports.defaultServerInject = _chunkKJUD2BKEjs.defaultServerInject; exports.emitter = _chunkKJUD2BKEjs.emitter; exports.getLogger = _chunk5RBTN33Ajs.getLogger; exports.log = _chunk5RBTN33Ajs.log; exports.phecdaNamespace = _chunkKJUD2BKEjs.phecdaNamespace; exports.runMiddleware = _chunk5RBTN33Ajs.runMiddleware; exports.setLogger = _chunk5RBTN33Ajs.setLogger; exports.useS = _chunkKJUD2BKEjs.useS;
package/dist/index.mjs CHANGED
@@ -6,14 +6,14 @@ import {
6
6
  emitter,
7
7
  phecdaNamespace,
8
8
  useS
9
- } from "./chunk-RGSKKTHD.mjs";
9
+ } from "./chunk-7ZGYJ5OW.mjs";
10
10
  import {
11
11
  Addon,
12
12
  Arg,
13
13
  BaseParam,
14
14
  Body,
15
15
  Controller,
16
- Ctx,
16
+ Ctx as Ctx2,
17
17
  Define,
18
18
  Delete,
19
19
  Filter,
@@ -31,7 +31,7 @@ import {
31
31
  Route,
32
32
  Rpc,
33
33
  Search
34
- } from "./chunk-JPSXNDXP.mjs";
34
+ } from "./chunk-ODVWOXVB.mjs";
35
35
  import {
36
36
  BadGatewayException,
37
37
  BadRequestException,
@@ -55,13 +55,13 @@ import {
55
55
  addFilter,
56
56
  addGuard,
57
57
  addPipe,
58
- defaultPipe
59
- } from "./chunk-IRXNF6ZE.mjs";
58
+ defaultPipe,
59
+ joinUrl
60
+ } from "./chunk-CVPZWDXU.mjs";
60
61
  import {
61
62
  ERROR_SYMBOL,
62
- IS_HMR,
63
+ IS_DEV,
63
64
  IS_ONLY_GENERATE,
64
- IS_READY,
65
65
  IS_STRICT,
66
66
  LOG_LEVEL,
67
67
  Mixin,
@@ -71,7 +71,7 @@ import {
71
71
  log,
72
72
  runMiddleware,
73
73
  setLogger
74
- } from "./chunk-C5BVKEGW.mjs";
74
+ } from "./chunk-FXTJ3BJ6.mjs";
75
75
 
76
76
  // src/types.ts
77
77
  var ResponseSymbol = Symbol("response");
@@ -111,8 +111,8 @@ var HttpBase = class extends ServerBase {
111
111
  context;
112
112
  };
113
113
  _ts_decorate([
114
- Ctx,
115
- _ts_metadata("design:type", typeof HttpContext === "undefined" ? Object : HttpContext)
114
+ Ctx2,
115
+ _ts_metadata("design:type", typeof Ctx === "undefined" ? Object : Ctx)
116
116
  ], HttpBase.prototype, "context", void 0);
117
117
  var RpcBase = class extends ServerBase {
118
118
  static {
@@ -121,8 +121,8 @@ var RpcBase = class extends ServerBase {
121
121
  context;
122
122
  };
123
123
  _ts_decorate([
124
- Ctx,
125
- _ts_metadata("design:type", typeof RpcContext === "undefined" ? Object : RpcContext)
124
+ Ctx2,
125
+ _ts_metadata("design:type", typeof Ctx === "undefined" ? Object : Ctx)
126
126
  ], RpcBase.prototype, "context", void 0);
127
127
 
128
128
  // src/modules/filter.ts
@@ -308,7 +308,7 @@ var HTTPGenerator = class extends Generator {
308
308
  addMethod(args) {
309
309
  const { http, name, func, params, tag } = args;
310
310
  if (!http?.type) return;
311
- const url = http.prefix + http.route.replace(/\/\:([^\/]*)/g, (_, js) => `/{{${js}}}`);
311
+ const url = joinUrl(http.prefix, http.route).replace(/\/\:([^\/]*)/g, (_, js) => `/{{${js}}}`);
312
312
  if (!this.classMap[name]) this.classMap[name] = {};
313
313
  this.classMap[name][func] = `
314
314
  ${func}(...args){
@@ -341,7 +341,7 @@ export {
341
341
  ConflictException,
342
342
  Context,
343
343
  Controller,
344
- Ctx,
344
+ Ctx2 as Ctx,
345
345
  CustomResponse,
346
346
  Define,
347
347
  Delete,
@@ -358,9 +358,8 @@ export {
358
358
  Head,
359
359
  Header,
360
360
  HttpBase,
361
- IS_HMR,
361
+ IS_DEV,
362
362
  IS_ONLY_GENERATE,
363
- IS_READY,
364
363
  IS_STRICT,
365
364
  InvalidInputException,
366
365
  LOG_LEVEL,
@@ -1,11 +1,10 @@
1
1
  import { Events, Construct } from 'phecda-core';
2
2
 
3
3
  declare const ERROR_SYMBOL = "__PS_ERROR__";
4
- declare const IS_HMR: boolean;
4
+ declare const IS_DEV: boolean;
5
5
  declare const IS_ONLY_GENERATE: boolean;
6
6
  declare const IS_STRICT: boolean;
7
7
  declare const LOG_LEVEL: number;
8
- declare const IS_READY: unique symbol;
9
8
  declare enum PS_EXIT_CODE {
10
9
  RELAUNCH = 2,
11
10
  CODE = 4
@@ -32,7 +31,7 @@ type ToClientInstance<Instance extends Record<string, any>> = ParseInstance<Pick
32
31
  type ToClientFn<Func extends AnyFunction> = (...p: Parameters<Func>) => Promise<BaseReturn<ReturnType<Func>>>;
33
32
  type PickFunc<Instance> = Pick<Instance, PickFuncKeys<Instance>>;
34
33
  type OmitFunction<Instance> = Omit<Instance, PickFuncKeys<Instance>>;
35
- interface BaseContext {
34
+ interface BaseCtx {
36
35
  meta: ControllerMeta;
37
36
  moduleMap: Record<string, any>;
38
37
  type: string;
@@ -105,4 +104,4 @@ interface ControllerMeta extends Meta {
105
104
  data: ControllerMetaData;
106
105
  }
107
106
 
108
- export { type BaseContext as B, type ControllerMetaData as C, type DefaultOptions as D, type Emitter as E, IS_HMR as I, LOG_LEVEL as L, Meta as M, type OmitFunction as O, type PickFunc as P, type ServiceMetaData as S, type ToClientMap as T, type ControllerMeta as a, type MetaData as b, type BaseError as c, type ToClientInstance as d, type ToClientFn as e, type BaseReturn as f, type BaseRequestType as g, CustomResponse as h, type ExtractResponse as i, ERROR_SYMBOL as j, IS_ONLY_GENERATE as k, IS_STRICT as l, IS_READY as m, PS_EXIT_CODE as n };
107
+ export { type BaseCtx as B, type ControllerMeta as C, type DefaultOptions as D, type Emitter as E, IS_DEV as I, LOG_LEVEL as L, Meta as M, type OmitFunction as O, type PickFunc as P, type ServiceMetaData as S, type ToClientMap as T, type ControllerMetaData as a, type MetaData as b, type BaseError as c, type ToClientInstance as d, type ToClientFn as e, type BaseReturn as f, type BaseRequestType as g, CustomResponse as h, type ExtractResponse as i, ERROR_SYMBOL as j, IS_ONLY_GENERATE as k, IS_STRICT as l, PS_EXIT_CODE as m };
@@ -1,11 +1,10 @@
1
1
  import { Events, Construct } from 'phecda-core';
2
2
 
3
3
  declare const ERROR_SYMBOL = "__PS_ERROR__";
4
- declare const IS_HMR: boolean;
4
+ declare const IS_DEV: boolean;
5
5
  declare const IS_ONLY_GENERATE: boolean;
6
6
  declare const IS_STRICT: boolean;
7
7
  declare const LOG_LEVEL: number;
8
- declare const IS_READY: unique symbol;
9
8
  declare enum PS_EXIT_CODE {
10
9
  RELAUNCH = 2,
11
10
  CODE = 4
@@ -32,7 +31,7 @@ type ToClientInstance<Instance extends Record<string, any>> = ParseInstance<Pick
32
31
  type ToClientFn<Func extends AnyFunction> = (...p: Parameters<Func>) => Promise<BaseReturn<ReturnType<Func>>>;
33
32
  type PickFunc<Instance> = Pick<Instance, PickFuncKeys<Instance>>;
34
33
  type OmitFunction<Instance> = Omit<Instance, PickFuncKeys<Instance>>;
35
- interface BaseContext {
34
+ interface BaseCtx {
36
35
  meta: ControllerMeta;
37
36
  moduleMap: Record<string, any>;
38
37
  type: string;
@@ -105,4 +104,4 @@ interface ControllerMeta extends Meta {
105
104
  data: ControllerMetaData;
106
105
  }
107
106
 
108
- export { type BaseContext as B, type ControllerMetaData as C, type DefaultOptions as D, type Emitter as E, IS_HMR as I, LOG_LEVEL as L, Meta as M, type OmitFunction as O, type PickFunc as P, type ServiceMetaData as S, type ToClientMap as T, type ControllerMeta as a, type MetaData as b, type BaseError as c, type ToClientInstance as d, type ToClientFn as e, type BaseReturn as f, type BaseRequestType as g, CustomResponse as h, type ExtractResponse as i, ERROR_SYMBOL as j, IS_ONLY_GENERATE as k, IS_STRICT as l, IS_READY as m, PS_EXIT_CODE as n };
107
+ export { type BaseCtx as B, type ControllerMeta as C, type DefaultOptions as D, type Emitter as E, IS_DEV as I, LOG_LEVEL as L, Meta as M, type OmitFunction as O, type PickFunc as P, type ServiceMetaData as S, type ToClientMap as T, type ControllerMetaData as a, type MetaData as b, type BaseError as c, type ToClientInstance as d, type ToClientFn as e, type BaseReturn as f, type BaseRequestType as g, CustomResponse as h, type ExtractResponse as i, ERROR_SYMBOL as j, IS_ONLY_GENERATE as k, IS_STRICT as l, PS_EXIT_CODE as m };
@@ -1,10 +1,10 @@
1
1
  import { WorkerOptions, QueueOptions, Worker, Queue } from 'bullmq';
2
- import { F as Factory } from '../../core-DU7gQKSk.mjs';
3
- import { R as RpcContext, a as RpcServerOptions, b as RpcClientOptions } from '../../types-BYqBeqrs.mjs';
4
- import { T as ToClientMap } from '../../meta-BTnLXuCa.mjs';
2
+ import { F as Factory } from '../../core-BDkhrEyf.mjs';
3
+ import { R as RpcCtx, a as RpcServerOptions, b as RpcClientOptions } from '../../types-B-rUM9Fm.mjs';
4
+ import { T as ToClientMap } from '../../meta-BX5jhe4Z.mjs';
5
5
  import 'phecda-core';
6
6
 
7
- interface BullmqCtx extends RpcContext {
7
+ interface BullmqCtx extends RpcCtx {
8
8
  type: 'bullmq';
9
9
  }
10
10
  type BullmqOptions = Omit<RpcServerOptions, 'globalAddons'> & {
@@ -1,10 +1,10 @@
1
1
  import { WorkerOptions, QueueOptions, Worker, Queue } from 'bullmq';
2
- import { F as Factory } from '../../core-CzElxZoF.js';
3
- import { R as RpcContext, a as RpcServerOptions, b as RpcClientOptions } from '../../types-CbfaGkPA.js';
4
- import { T as ToClientMap } from '../../meta-BTnLXuCa.js';
2
+ import { F as Factory } from '../../core-D_cz0tKa.js';
3
+ import { R as RpcCtx, a as RpcServerOptions, b as RpcClientOptions } from '../../types-MxxtkZXw.js';
4
+ import { T as ToClientMap } from '../../meta-BX5jhe4Z.js';
5
5
  import 'phecda-core';
6
6
 
7
- interface BullmqCtx extends RpcContext {
7
+ interface BullmqCtx extends RpcCtx {
8
8
  type: 'bullmq';
9
9
  }
10
10
  type BullmqOptions = Omit<RpcServerOptions, 'globalAddons'> & {
@@ -3,11 +3,11 @@
3
3
 
4
4
 
5
5
 
6
+ var _chunkFX3LDQIIjs = require('../../chunk-FX3LDQII.js');
6
7
 
7
- var _chunkMENRZSGWjs = require('../../chunk-MENRZSGW.js');
8
8
 
9
9
 
10
- var _chunkM5HGFUCVjs = require('../../chunk-M5HGFUCV.js');
10
+ var _chunk5RBTN33Ajs = require('../../chunk-5RBTN33A.js');
11
11
 
12
12
  // src/rpc/bullmq/create.ts
13
13
  var _bullmq = require('bullmq');
@@ -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 = _chunkMENRZSGWjs.createControllerMetaMap.call(void 0, meta, (meta2) => {
21
+ const metaMap = _chunkFX3LDQIIjs.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
- _chunkMENRZSGWjs.detectAopDep.call(void 0, meta, {
28
+ _chunkFX3LDQIIjs.detectAopDep.call(void 0, meta, {
29
29
  guards: globalGuards
30
30
  }, "rpc");
31
31
  async function subscribeQueues() {
@@ -39,12 +39,12 @@ async function create({ moduleMap, meta }, opts = {}) {
39
39
  if (existQueue.has(queue)) continue;
40
40
  existQueue.add(queue);
41
41
  workerMap[queue] = new (0, _bullmq.Worker)(queue, handleRequest, workerOpts);
42
- _chunkMENRZSGWjs.Context.applyAddons(addons, workerMap[queue], "bullmq");
42
+ _chunkFX3LDQIIjs.Context.applyAddons(addons, workerMap[queue], "bullmq");
43
43
  }
44
44
  }
45
45
  }
46
46
  }
47
- _chunkM5HGFUCVjs.__name.call(void 0, subscribeQueues, "subscribeQueues");
47
+ _chunk5RBTN33Ajs.__name.call(void 0, subscribeQueues, "subscribeQueues");
48
48
  async function handleRequest(job) {
49
49
  const { data } = job;
50
50
  const { tag, func, args, id, queue: clientQueue, _ps } = data;
@@ -53,12 +53,12 @@ async function create({ moduleMap, meta }, opts = {}) {
53
53
  const meta2 = metaMap.get(tag)[func];
54
54
  const { data: { rpc: { isEvent } = {} } } = meta2;
55
55
  if (!isEvent && !(clientQueue in queueMap)) queueMap[clientQueue] = new (0, _bullmq.Queue)(clientQueue, queueOpts);
56
- const aop = _chunkMENRZSGWjs.Context.getAop(meta2, {
56
+ const aop = _chunkFX3LDQIIjs.Context.getAop(meta2, {
57
57
  globalFilter,
58
58
  globalGuards,
59
59
  globalPipe
60
60
  });
61
- const context = new (0, _chunkMENRZSGWjs.Context)({
61
+ const context = new (0, _chunkFX3LDQIIjs.Context)({
62
62
  type: "bullmq",
63
63
  category: "rpc",
64
64
  moduleMap,
@@ -86,9 +86,9 @@ async function create({ moduleMap, meta }, opts = {}) {
86
86
  }
87
87
  });
88
88
  }
89
- _chunkM5HGFUCVjs.__name.call(void 0, handleRequest, "handleRequest");
89
+ _chunk5RBTN33Ajs.__name.call(void 0, handleRequest, "handleRequest");
90
90
  subscribeQueues();
91
- _chunkMENRZSGWjs.HMR.call(void 0, async () => {
91
+ _chunk5RBTN33Ajs.HMR.call(void 0, async () => {
92
92
  for (const i in workerMap) await workerMap[i].close(true);
93
93
  for (const i in queueMap) await queueMap[i].close();
94
94
  await subscribeQueues();
@@ -98,7 +98,7 @@ async function create({ moduleMap, meta }, opts = {}) {
98
98
  queueMap
99
99
  };
100
100
  }
101
- _chunkM5HGFUCVjs.__name.call(void 0, create, "create");
101
+ _chunk5RBTN33Ajs.__name.call(void 0, create, "create");
102
102
 
103
103
  // src/rpc/bullmq/client.ts
104
104
  var _events = require('events');
@@ -109,7 +109,7 @@ async function createClient(controllers, opts = {}) {
109
109
  const { max, workerOpts, queueOpts, timeout, key } = opts;
110
110
  const ret = {};
111
111
  const emitter = new (0, _events.EventEmitter)();
112
- const clientQueue = _chunkMENRZSGWjs.genClientQueue.call(void 0, key);
112
+ const clientQueue = _chunkFX3LDQIIjs.genClientQueue.call(void 0, key);
113
113
  const queueMap = {};
114
114
  new (0, _bullmq.Worker)(clientQueue, async (job) => {
115
115
  const { data, id, error } = job.data;
@@ -154,7 +154,7 @@ async function createClient(controllers, opts = {}) {
154
154
  if (error) reject(data);
155
155
  else resolve(data);
156
156
  }
157
- _chunkM5HGFUCVjs.__name.call(void 0, listener, "listener");
157
+ _chunk5RBTN33Ajs.__name.call(void 0, listener, "listener");
158
158
  eventCount++;
159
159
  emitter.once(id, listener);
160
160
  });
@@ -164,7 +164,7 @@ async function createClient(controllers, opts = {}) {
164
164
  }
165
165
  return ret;
166
166
  }
167
- _chunkM5HGFUCVjs.__name.call(void 0, createClient, "createClient");
167
+ _chunk5RBTN33Ajs.__name.call(void 0, createClient, "createClient");
168
168
 
169
169
 
170
170
 
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  Context,
3
- HMR,
4
3
  createControllerMetaMap,
5
4
  detectAopDep,
6
5
  genClientQueue
7
- } from "../../chunk-IRXNF6ZE.mjs";
6
+ } from "../../chunk-CVPZWDXU.mjs";
8
7
  import {
8
+ HMR,
9
9
  __name
10
- } from "../../chunk-C5BVKEGW.mjs";
10
+ } from "../../chunk-FXTJ3BJ6.mjs";
11
11
 
12
12
  // src/rpc/bullmq/create.ts
13
13
  import { Queue, Worker } from "bullmq";
@@ -1,10 +1,10 @@
1
1
  import { Consumer, Producer } from 'kafkajs';
2
- import { F as Factory } from '../../core-DU7gQKSk.mjs';
3
- import { R as RpcContext, a as RpcServerOptions, b as RpcClientOptions } from '../../types-BYqBeqrs.mjs';
4
- import { T as ToClientMap } from '../../meta-BTnLXuCa.mjs';
2
+ import { F as Factory } from '../../core-BDkhrEyf.mjs';
3
+ import { R as RpcCtx, a as RpcServerOptions, b as RpcClientOptions } from '../../types-B-rUM9Fm.mjs';
4
+ import { T as ToClientMap } from '../../meta-BX5jhe4Z.mjs';
5
5
  import 'phecda-core';
6
6
 
7
- interface KafkaCtx extends RpcContext {
7
+ interface KafkaCtx extends RpcCtx {
8
8
  type: 'kafka';
9
9
  topic: string;
10
10
  partition: number;
@@ -1,10 +1,10 @@
1
1
  import { Consumer, Producer } from 'kafkajs';
2
- import { F as Factory } from '../../core-CzElxZoF.js';
3
- import { R as RpcContext, a as RpcServerOptions, b as RpcClientOptions } from '../../types-CbfaGkPA.js';
4
- import { T as ToClientMap } from '../../meta-BTnLXuCa.js';
2
+ import { F as Factory } from '../../core-D_cz0tKa.js';
3
+ import { R as RpcCtx, a as RpcServerOptions, b as RpcClientOptions } from '../../types-MxxtkZXw.js';
4
+ import { T as ToClientMap } from '../../meta-BX5jhe4Z.js';
5
5
  import 'phecda-core';
6
6
 
7
- interface KafkaCtx extends RpcContext {
7
+ interface KafkaCtx extends RpcCtx {
8
8
  type: 'kafka';
9
9
  topic: string;
10
10
  partition: number;