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.
- package/bin/cli.mjs +10 -1
- package/dist/{chunk-M5HGFUCV.js → chunk-5RBTN33A.js} +23 -3
- package/dist/{chunk-RGSKKTHD.mjs → chunk-7ZGYJ5OW.mjs} +88 -54
- package/dist/{chunk-IRXNF6ZE.mjs → chunk-CVPZWDXU.mjs} +39 -30
- package/dist/{chunk-MENRZSGW.js → chunk-FX3LDQII.js} +88 -79
- package/dist/{chunk-C5BVKEGW.mjs → chunk-FXTJ3BJ6.mjs} +25 -5
- package/dist/{chunk-XSMUJ77A.js → chunk-KJUD2BKE.js} +103 -69
- package/dist/{chunk-JPSXNDXP.mjs → chunk-ODVWOXVB.mjs} +1 -1
- package/dist/{chunk-VYMSCWXC.js → chunk-V5EYXVJT.js} +24 -24
- package/dist/{core-DU7gQKSk.d.mts → core-BDkhrEyf.d.mts} +4 -3
- package/dist/{core-CzElxZoF.d.ts → core-D_cz0tKa.d.ts} +4 -3
- package/dist/helper.d.mts +7 -5
- package/dist/helper.d.ts +7 -5
- package/dist/helper.js +8 -3
- package/dist/helper.mjs +10 -5
- package/dist/http/elysia/index.d.mts +4 -4
- package/dist/http/elysia/index.d.ts +4 -4
- package/dist/http/elysia/index.js +41 -44
- package/dist/http/elysia/index.mjs +7 -10
- package/dist/http/express/index.d.mts +4 -4
- package/dist/http/express/index.d.ts +4 -4
- package/dist/http/express/index.js +38 -41
- package/dist/http/express/index.mjs +7 -10
- package/dist/http/fastify/index.d.mts +4 -4
- package/dist/http/fastify/index.d.ts +4 -4
- package/dist/http/fastify/index.js +39 -42
- package/dist/http/fastify/index.mjs +7 -10
- package/dist/http/h3/index.d.mts +4 -4
- package/dist/http/h3/index.d.ts +4 -4
- package/dist/http/h3/index.js +39 -42
- package/dist/http/h3/index.mjs +7 -10
- package/dist/http/hono/index.d.mts +4 -4
- package/dist/http/hono/index.d.ts +4 -4
- package/dist/http/hono/index.js +35 -39
- package/dist/http/hono/index.mjs +3 -7
- package/dist/http/hyper-express/index.d.mts +4 -4
- package/dist/http/hyper-express/index.d.ts +4 -4
- package/dist/http/hyper-express/index.js +36 -39
- package/dist/http/hyper-express/index.mjs +6 -9
- package/dist/http/koa/index.d.mts +4 -4
- package/dist/http/koa/index.d.ts +4 -4
- package/dist/http/koa/index.js +38 -41
- package/dist/http/koa/index.mjs +7 -10
- package/dist/index.d.mts +35 -33
- package/dist/index.d.ts +35 -33
- package/dist/index.js +42 -43
- package/dist/index.mjs +15 -16
- package/dist/{meta-BTnLXuCa.d.ts → meta-BX5jhe4Z.d.mts} +3 -4
- package/dist/{meta-BTnLXuCa.d.mts → meta-BX5jhe4Z.d.ts} +3 -4
- package/dist/rpc/bullmq/index.d.mts +4 -4
- package/dist/rpc/bullmq/index.d.ts +4 -4
- package/dist/rpc/bullmq/index.js +14 -14
- package/dist/rpc/bullmq/index.mjs +3 -3
- package/dist/rpc/kafka/index.d.mts +4 -4
- package/dist/rpc/kafka/index.d.ts +4 -4
- package/dist/rpc/kafka/index.js +14 -14
- package/dist/rpc/kafka/index.mjs +2 -2
- package/dist/rpc/nats/index.d.mts +4 -4
- package/dist/rpc/nats/index.d.ts +4 -4
- package/dist/rpc/nats/index.js +13 -13
- package/dist/rpc/nats/index.mjs +3 -3
- package/dist/rpc/rabbitmq/index.d.mts +4 -4
- package/dist/rpc/rabbitmq/index.d.ts +4 -4
- package/dist/rpc/rabbitmq/index.js +15 -15
- package/dist/rpc/rabbitmq/index.mjs +3 -3
- package/dist/rpc/redis/index.d.mts +4 -4
- package/dist/rpc/redis/index.d.ts +4 -4
- package/dist/rpc/redis/index.js +13 -13
- package/dist/rpc/redis/index.mjs +3 -3
- package/dist/test.d.mts +3 -3
- package/dist/test.d.ts +3 -3
- package/dist/test.js +6 -6
- package/dist/test.mjs +2 -2
- package/dist/{types-CbfaGkPA.d.ts → types-B-rUM9Fm.d.mts} +3 -3
- package/dist/{types--E-OCZhC.d.ts → types-CMeuFoyd.d.ts} +3 -3
- package/dist/{types-BxlzVoRv.d.mts → types-DKVhyZk_.d.mts} +3 -3
- package/dist/{types-BYqBeqrs.d.mts → types-MxxtkZXw.d.ts} +3 -3
- package/package.json +3 -2
- package/register/index.mjs +20 -11
- package/register/loader.mjs +13 -28
package/dist/index.js
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
var
|
|
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
|
|
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
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
100
|
+
_chunk5RBTN33Ajs.__name.call(void 0, this, "ServerBase");
|
|
101
101
|
}
|
|
102
|
-
__init() {this.emitter = exports.emitter =
|
|
102
|
+
__init() {this.emitter = exports.emitter = _chunkKJUD2BKEjs.emitter}
|
|
103
103
|
log(msg, level = "log") {
|
|
104
|
-
|
|
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
|
-
|
|
109
|
+
_chunk5RBTN33Ajs.__name.call(void 0, this, "HttpBase");
|
|
110
110
|
}
|
|
111
111
|
|
|
112
112
|
};
|
|
113
113
|
_ts_decorate([
|
|
114
|
-
|
|
115
|
-
_ts_metadata("design:type", typeof
|
|
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
|
-
|
|
119
|
+
_chunk5RBTN33Ajs.__name.call(void 0, this, "RpcBase");
|
|
120
120
|
}
|
|
121
121
|
|
|
122
122
|
};
|
|
123
123
|
_ts_decorate([
|
|
124
|
-
|
|
125
|
-
_ts_metadata("design:type", typeof
|
|
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
|
-
|
|
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
|
-
|
|
138
|
+
_chunkFX3LDQIIjs.addFilter.call(void 0, this.key, this.use.bind(this));
|
|
139
139
|
this.onUnmount(() => {
|
|
140
|
-
delete
|
|
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
|
-
|
|
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
|
-
|
|
156
|
+
_chunkFX3LDQIIjs.addGuard.call(void 0, this.key, this.use.bind(this), this.priority);
|
|
157
157
|
this.onUnmount(() => {
|
|
158
|
-
delete
|
|
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
|
-
|
|
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
|
-
|
|
173
|
+
_chunkFX3LDQIIjs.addPipe.call(void 0, this.key, this.use.bind(this));
|
|
174
174
|
this.onUnmount(() => {
|
|
175
|
-
delete
|
|
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
|
-
|
|
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
|
-
|
|
191
|
+
_chunkFX3LDQIIjs.addAddon.call(void 0, this.key, this.use.bind(this), this.priority);
|
|
192
192
|
this.onUnmount(() => {
|
|
193
|
-
delete
|
|
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
|
-
|
|
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
|
-
|
|
211
|
+
_chunkFX3LDQIIjs.addPipe.call(void 0, key, this.pipe.bind(this));
|
|
212
212
|
this.onUnmount(() => {
|
|
213
|
-
delete
|
|
213
|
+
delete _chunkFX3LDQIIjs.Context.pipeRecord[key];
|
|
214
214
|
});
|
|
215
215
|
}
|
|
216
216
|
if (this.addon) {
|
|
217
|
-
|
|
217
|
+
_chunkFX3LDQIIjs.addAddon.call(void 0, key, this.addon.bind(this), this.addonPriority);
|
|
218
218
|
this.onUnmount(() => {
|
|
219
|
-
delete
|
|
219
|
+
delete _chunkFX3LDQIIjs.Context.addonRecord[key];
|
|
220
220
|
});
|
|
221
221
|
}
|
|
222
222
|
if (this.guard) {
|
|
223
|
-
|
|
223
|
+
_chunkFX3LDQIIjs.addGuard.call(void 0, key, this.guard.bind(this), this.guardPriority);
|
|
224
224
|
this.onUnmount(() => {
|
|
225
|
-
delete
|
|
225
|
+
delete _chunkFX3LDQIIjs.Context.guardRecord[key];
|
|
226
226
|
});
|
|
227
227
|
}
|
|
228
228
|
if (this.filter) {
|
|
229
|
-
|
|
229
|
+
_chunkFX3LDQIIjs.addFilter.call(void 0, key, this.filter.bind(this));
|
|
230
230
|
this.onUnmount(() => {
|
|
231
|
-
delete
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
|
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-
|
|
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-
|
|
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
|
-
|
|
58
|
+
defaultPipe,
|
|
59
|
+
joinUrl
|
|
60
|
+
} from "./chunk-CVPZWDXU.mjs";
|
|
60
61
|
import {
|
|
61
62
|
ERROR_SYMBOL,
|
|
62
|
-
|
|
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-
|
|
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
|
-
|
|
115
|
-
_ts_metadata("design:type", typeof
|
|
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
|
-
|
|
125
|
-
_ts_metadata("design:type", typeof
|
|
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
|
|
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
|
-
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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-
|
|
3
|
-
import { R as
|
|
4
|
-
import { T as ToClientMap } from '../../meta-
|
|
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
|
|
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-
|
|
3
|
-
import { R as
|
|
4
|
-
import { T as ToClientMap } from '../../meta-
|
|
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
|
|
7
|
+
interface BullmqCtx extends RpcCtx {
|
|
8
8
|
type: 'bullmq';
|
|
9
9
|
}
|
|
10
10
|
type BullmqOptions = Omit<RpcServerOptions, 'globalAddons'> & {
|
package/dist/rpc/bullmq/index.js
CHANGED
|
@@ -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
|
|
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 =
|
|
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
|
-
|
|
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
|
-
|
|
42
|
+
_chunkFX3LDQIIjs.Context.applyAddons(addons, workerMap[queue], "bullmq");
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
|
-
|
|
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 =
|
|
56
|
+
const aop = _chunkFX3LDQIIjs.Context.getAop(meta2, {
|
|
57
57
|
globalFilter,
|
|
58
58
|
globalGuards,
|
|
59
59
|
globalPipe
|
|
60
60
|
});
|
|
61
|
-
const context = new (0,
|
|
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
|
-
|
|
89
|
+
_chunk5RBTN33Ajs.__name.call(void 0, handleRequest, "handleRequest");
|
|
90
90
|
subscribeQueues();
|
|
91
|
-
|
|
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
|
-
|
|
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 =
|
|
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
|
-
|
|
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
|
-
|
|
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-
|
|
6
|
+
} from "../../chunk-CVPZWDXU.mjs";
|
|
8
7
|
import {
|
|
8
|
+
HMR,
|
|
9
9
|
__name
|
|
10
|
-
} from "../../chunk-
|
|
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-
|
|
3
|
-
import { R as
|
|
4
|
-
import { T as ToClientMap } from '../../meta-
|
|
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
|
|
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-
|
|
3
|
-
import { R as
|
|
4
|
-
import { T as ToClientMap } from '../../meta-
|
|
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
|
|
7
|
+
interface KafkaCtx extends RpcCtx {
|
|
8
8
|
type: 'kafka';
|
|
9
9
|
topic: string;
|
|
10
10
|
partition: number;
|