phecda-server 7.0.0 → 7.0.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.
- package/README.md +10 -10
- package/bin/cli.mjs +1 -1
- package/dist/{chunk-RLFCI3RG.js → chunk-4LLLQOMF.js} +0 -1
- package/dist/{chunk-WTJKTICN.mjs → chunk-AIAO6SV6.mjs} +2 -3
- package/dist/{chunk-5SUY5UVC.js → chunk-DPPDWBYO.js} +28 -29
- package/dist/{chunk-LBH4RXQQ.mjs → chunk-E7EAPAGM.mjs} +1 -2
- package/dist/{chunk-VDOICQ2U.mjs → chunk-MKRHYZCL.mjs} +2 -3
- package/dist/{chunk-MDPW6WGF.mjs → chunk-NQ55PA2X.mjs} +0 -1
- package/dist/{chunk-H7OCHDZT.js → chunk-XKK2SQ7W.js} +53 -54
- package/dist/{chunk-KRUOHWFR.js → chunk-ZWPOWMZP.js} +20 -21
- package/dist/helper.js +3 -4
- package/dist/helper.mjs +2 -3
- package/dist/http/elysia/index.js +40 -41
- package/dist/http/elysia/index.mjs +3 -4
- package/dist/http/express/index.js +37 -38
- package/dist/http/express/index.mjs +2 -3
- package/dist/http/fastify/index.js +38 -39
- package/dist/http/fastify/index.mjs +3 -4
- package/dist/http/h3/index.js +38 -39
- package/dist/http/h3/index.mjs +2 -3
- package/dist/http/hono/index.js +34 -35
- package/dist/http/hono/index.mjs +2 -3
- package/dist/http/hyper-express/index.js +35 -36
- package/dist/http/hyper-express/index.mjs +2 -3
- package/dist/http/koa/index.js +37 -38
- package/dist/http/koa/index.mjs +2 -3
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +44 -47
- package/dist/index.mjs +6 -9
- package/dist/rpc/bullmq/index.js +11 -12
- package/dist/rpc/bullmq/index.mjs +2 -3
- package/dist/rpc/electron/index.js +8 -9
- package/dist/rpc/electron/index.mjs +2 -3
- package/dist/rpc/kafka/index.js +10 -11
- package/dist/rpc/kafka/index.mjs +2 -3
- package/dist/rpc/nats/index.js +11 -12
- package/dist/rpc/nats/index.mjs +2 -3
- package/dist/rpc/rabbitmq/index.js +12 -13
- package/dist/rpc/rabbitmq/index.mjs +2 -3
- package/dist/rpc/redis/index.js +10 -11
- package/dist/rpc/redis/index.mjs +2 -3
- package/dist/rpc/web-ext/index.js +1 -1
- package/dist/rpc/web-ext/index.mjs +0 -1
- package/dist/rpc/ws/index.js +7 -8
- package/dist/rpc/ws/index.mjs +2 -3
- package/dist/test.js +6 -7
- package/dist/test.mjs +2 -3
- package/package.json +2 -2
- package/dist/chunk-5SUY5UVC.js.map +0 -1
- package/dist/chunk-6JAHCTOT.mjs +0 -334
- package/dist/chunk-6JAHCTOT.mjs.map +0 -1
- package/dist/chunk-EDAWJVJ4.js +0 -246
- package/dist/chunk-EDAWJVJ4.js.map +0 -1
- package/dist/chunk-H7OCHDZT.js.map +0 -1
- package/dist/chunk-KRUOHWFR.js.map +0 -1
- package/dist/chunk-KUGU3UGO.js +0 -334
- package/dist/chunk-KUGU3UGO.js.map +0 -1
- package/dist/chunk-LBH4RXQQ.mjs.map +0 -1
- package/dist/chunk-MDPW6WGF.mjs.map +0 -1
- package/dist/chunk-RLFCI3RG.js.map +0 -1
- package/dist/chunk-TTHYUNOT.mjs +0 -246
- package/dist/chunk-TTHYUNOT.mjs.map +0 -1
- package/dist/chunk-VDOICQ2U.mjs.map +0 -1
- package/dist/chunk-WTJKTICN.mjs.map +0 -1
- package/dist/core-BOo3uGFX.d.ts +0 -49
- package/dist/core-CF45G79J.d.mts +0 -49
- package/dist/helper.js.map +0 -1
- package/dist/helper.mjs.map +0 -1
- package/dist/http/elysia/index.js.map +0 -1
- package/dist/http/elysia/index.mjs.map +0 -1
- package/dist/http/express/index.js.map +0 -1
- package/dist/http/express/index.mjs.map +0 -1
- package/dist/http/fastify/index.js.map +0 -1
- package/dist/http/fastify/index.mjs.map +0 -1
- package/dist/http/h3/index.js.map +0 -1
- package/dist/http/h3/index.mjs.map +0 -1
- package/dist/http/hono/index.js.map +0 -1
- package/dist/http/hono/index.mjs.map +0 -1
- package/dist/http/hyper-express/index.js.map +0 -1
- package/dist/http/hyper-express/index.mjs.map +0 -1
- package/dist/http/koa/index.js.map +0 -1
- package/dist/http/koa/index.mjs.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/index.mjs.map +0 -1
- package/dist/rpc/bullmq/index.js.map +0 -1
- package/dist/rpc/bullmq/index.mjs.map +0 -1
- package/dist/rpc/electron/index.js.map +0 -1
- package/dist/rpc/electron/index.mjs.map +0 -1
- package/dist/rpc/kafka/index.js.map +0 -1
- package/dist/rpc/kafka/index.mjs.map +0 -1
- package/dist/rpc/nats/index.js.map +0 -1
- package/dist/rpc/nats/index.mjs.map +0 -1
- package/dist/rpc/rabbitmq/index.js.map +0 -1
- package/dist/rpc/rabbitmq/index.mjs.map +0 -1
- package/dist/rpc/redis/index.js.map +0 -1
- package/dist/rpc/redis/index.mjs.map +0 -1
- package/dist/rpc/web-ext/index.js.map +0 -1
- package/dist/rpc/web-ext/index.mjs.map +0 -1
- package/dist/rpc/ws/index.js.map +0 -1
- package/dist/rpc/ws/index.mjs.map +0 -1
- package/dist/test.js.map +0 -1
- package/dist/test.mjs.map +0 -1
package/dist/http/koa/index.js
CHANGED
|
@@ -4,11 +4,11 @@
|
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _chunkXKK2SQ7Wjs = require('../../chunk-XKK2SQ7W.js');
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
var
|
|
11
|
+
var _chunk4LLLQOMFjs = require('../../chunk-4LLLQOMF.js');
|
|
12
12
|
|
|
13
13
|
// src/http/koa/bind.ts
|
|
14
14
|
var _router = require('@koa/router'); var _router2 = _interopRequireDefault(_router);
|
|
@@ -18,14 +18,14 @@ function bind(router, data, opts = {}) {
|
|
|
18
18
|
const { globalGuards, parallelRoute = "/__PHECDA_SERVER__", globalAddons = [], parallelAddons = [], globalFilter, globalPipe, dynamic = false } = opts;
|
|
19
19
|
const { moduleMap, meta } = data;
|
|
20
20
|
const originStack = router.stack.slice(0, router.stack.length);
|
|
21
|
-
const metaMap =
|
|
21
|
+
const metaMap = _chunkXKK2SQ7Wjs.createControllerMetaMap.call(void 0, meta, (meta2) => {
|
|
22
22
|
const { controller, http, func, tag } = meta2.data;
|
|
23
23
|
if (controller === "http" && _optionalChain([http, 'optionalAccess', _ => _.type])) {
|
|
24
24
|
debug(`register method "${func}" in module "${tag}"`);
|
|
25
25
|
return true;
|
|
26
26
|
}
|
|
27
27
|
});
|
|
28
|
-
|
|
28
|
+
_chunkXKK2SQ7Wjs.detectAopDep.call(void 0, meta, {
|
|
29
29
|
addons: [
|
|
30
30
|
...globalAddons,
|
|
31
31
|
...parallelAddons
|
|
@@ -34,29 +34,29 @@ function bind(router, data, opts = {}) {
|
|
|
34
34
|
});
|
|
35
35
|
registerRoute();
|
|
36
36
|
function registerRoute() {
|
|
37
|
-
|
|
37
|
+
_chunkXKK2SQ7Wjs.Context.applyAddons(globalAddons, router, "koa");
|
|
38
38
|
if (parallelRoute) {
|
|
39
39
|
const subRouter = new (0, _router2.default)();
|
|
40
|
-
|
|
40
|
+
_chunkXKK2SQ7Wjs.Context.applyAddons(parallelAddons, subRouter, "koa");
|
|
41
41
|
subRouter.post(parallelRoute, async (ctx, next) => {
|
|
42
42
|
const { body } = ctx.request;
|
|
43
43
|
async function errorHandler(e) {
|
|
44
|
-
const error = await
|
|
44
|
+
const error = await _chunkXKK2SQ7Wjs.Context.filterRecord.default(e);
|
|
45
45
|
ctx.status = error.status;
|
|
46
46
|
ctx.body = error;
|
|
47
47
|
}
|
|
48
|
-
|
|
49
|
-
if (!Array.isArray(body)) return errorHandler(new (0,
|
|
48
|
+
_chunk4LLLQOMFjs.__name.call(void 0, errorHandler, "errorHandler");
|
|
49
|
+
if (!Array.isArray(body)) return errorHandler(new (0, _chunkXKK2SQ7Wjs.BadRequestException)("data format should be an array"));
|
|
50
50
|
try {
|
|
51
51
|
return Promise.all(body.map((item, i) => {
|
|
52
52
|
return new Promise(async (resolve) => {
|
|
53
53
|
if (!item) return resolve(null);
|
|
54
54
|
const { tag, func } = item;
|
|
55
55
|
debug(`(parallel)invoke method "${func}" in module "${tag}"`);
|
|
56
|
-
if (!metaMap.has(tag)) return resolve(await
|
|
56
|
+
if (!metaMap.has(tag)) return resolve(await _chunkXKK2SQ7Wjs.Context.filterRecord.default(new (0, _chunkXKK2SQ7Wjs.BadRequestException)(`module "${tag}" doesn't exist`)));
|
|
57
57
|
const meta2 = metaMap.get(tag)[func];
|
|
58
|
-
if (!meta2) return resolve(await
|
|
59
|
-
const aop =
|
|
58
|
+
if (!meta2) return resolve(await _chunkXKK2SQ7Wjs.Context.filterRecord.default(new (0, _chunkXKK2SQ7Wjs.BadRequestException)(`"${func}" in "${tag}" doesn't exist`)));
|
|
59
|
+
const aop = _chunkXKK2SQ7Wjs.Context.getAop(meta2, {
|
|
60
60
|
globalGuards,
|
|
61
61
|
globalFilter,
|
|
62
62
|
globalPipe
|
|
@@ -72,18 +72,18 @@ function bind(router, data, opts = {}) {
|
|
|
72
72
|
next,
|
|
73
73
|
app: router,
|
|
74
74
|
...item,
|
|
75
|
-
getCookie: /* @__PURE__ */
|
|
76
|
-
setCookie: /* @__PURE__ */
|
|
77
|
-
delCookie: /* @__PURE__ */
|
|
75
|
+
getCookie: /* @__PURE__ */ _chunk4LLLQOMFjs.__name.call(void 0, (key) => ctx.cookies.get(key), "getCookie"),
|
|
76
|
+
setCookie: /* @__PURE__ */ _chunk4LLLQOMFjs.__name.call(void 0, (key, value, opts2) => ctx.cookies.set(key, value, opts2), "setCookie"),
|
|
77
|
+
delCookie: /* @__PURE__ */ _chunk4LLLQOMFjs.__name.call(void 0, (key) => ctx.cookies.set(key, "", {
|
|
78
78
|
expires: /* @__PURE__ */ new Date(0)
|
|
79
79
|
}), "delCookie"),
|
|
80
|
-
redirect: /* @__PURE__ */
|
|
81
|
-
setResHeaders: /* @__PURE__ */
|
|
82
|
-
setResStatus: /* @__PURE__ */
|
|
83
|
-
getRequest: /* @__PURE__ */
|
|
84
|
-
getResponse: /* @__PURE__ */
|
|
80
|
+
redirect: /* @__PURE__ */ _chunk4LLLQOMFjs.__name.call(void 0, (url) => ctx.redirect(url), "redirect"),
|
|
81
|
+
setResHeaders: /* @__PURE__ */ _chunk4LLLQOMFjs.__name.call(void 0, (headers) => ctx.set(headers), "setResHeaders"),
|
|
82
|
+
setResStatus: /* @__PURE__ */ _chunk4LLLQOMFjs.__name.call(void 0, (status) => ctx.status = status, "setResStatus"),
|
|
83
|
+
getRequest: /* @__PURE__ */ _chunk4LLLQOMFjs.__name.call(void 0, () => ctx.req, "getRequest"),
|
|
84
|
+
getResponse: /* @__PURE__ */ _chunk4LLLQOMFjs.__name.call(void 0, () => ctx.res, "getResponse")
|
|
85
85
|
};
|
|
86
|
-
const context = new (0,
|
|
86
|
+
const context = new (0, _chunkXKK2SQ7Wjs.Context)(contextData);
|
|
87
87
|
context.run(aop, resolve, resolve);
|
|
88
88
|
});
|
|
89
89
|
})).then((ret) => {
|
|
@@ -102,15 +102,15 @@ function bind(router, data, opts = {}) {
|
|
|
102
102
|
if (!_optionalChain([http, 'optionalAccess', _2 => _2.type])) continue;
|
|
103
103
|
let aop;
|
|
104
104
|
if (!dynamic) {
|
|
105
|
-
aop =
|
|
105
|
+
aop = _chunkXKK2SQ7Wjs.Context.getAop(meta2, {
|
|
106
106
|
globalFilter,
|
|
107
107
|
globalGuards,
|
|
108
108
|
globalPipe
|
|
109
109
|
});
|
|
110
110
|
}
|
|
111
111
|
const subRouter = new (0, _router2.default)();
|
|
112
|
-
|
|
113
|
-
router[http.type](
|
|
112
|
+
_chunkXKK2SQ7Wjs.Context.applyAddons(addons, subRouter, "koa");
|
|
113
|
+
router[http.type](_chunkXKK2SQ7Wjs.joinUrl.call(void 0, http.prefix, http.route), async (ctx, next) => {
|
|
114
114
|
debug(`invoke method "${func}" in module "${tag}"`);
|
|
115
115
|
const contextData = {
|
|
116
116
|
type: "koa",
|
|
@@ -126,21 +126,21 @@ function bind(router, data, opts = {}) {
|
|
|
126
126
|
body: ctx.request.body,
|
|
127
127
|
headers: ctx.headers,
|
|
128
128
|
next,
|
|
129
|
-
getCookie: /* @__PURE__ */
|
|
130
|
-
setCookie: /* @__PURE__ */
|
|
131
|
-
delCookie: /* @__PURE__ */
|
|
129
|
+
getCookie: /* @__PURE__ */ _chunk4LLLQOMFjs.__name.call(void 0, (key) => ctx.cookies.get(key), "getCookie"),
|
|
130
|
+
setCookie: /* @__PURE__ */ _chunk4LLLQOMFjs.__name.call(void 0, (key, value, opts2) => ctx.cookies.set(key, value, opts2), "setCookie"),
|
|
131
|
+
delCookie: /* @__PURE__ */ _chunk4LLLQOMFjs.__name.call(void 0, (key) => ctx.cookies.set(key, "", {
|
|
132
132
|
expires: /* @__PURE__ */ new Date(0)
|
|
133
133
|
}), "delCookie"),
|
|
134
|
-
redirect: /* @__PURE__ */
|
|
135
|
-
setResHeaders: /* @__PURE__ */
|
|
136
|
-
setResStatus: /* @__PURE__ */
|
|
137
|
-
getRequest: /* @__PURE__ */
|
|
138
|
-
getResponse: /* @__PURE__ */
|
|
134
|
+
redirect: /* @__PURE__ */ _chunk4LLLQOMFjs.__name.call(void 0, (url) => ctx.redirect(url), "redirect"),
|
|
135
|
+
setResHeaders: /* @__PURE__ */ _chunk4LLLQOMFjs.__name.call(void 0, (headers) => ctx.set(headers), "setResHeaders"),
|
|
136
|
+
setResStatus: /* @__PURE__ */ _chunk4LLLQOMFjs.__name.call(void 0, (status) => ctx.status = status, "setResStatus"),
|
|
137
|
+
getRequest: /* @__PURE__ */ _chunk4LLLQOMFjs.__name.call(void 0, () => ctx.req, "getRequest"),
|
|
138
|
+
getResponse: /* @__PURE__ */ _chunk4LLLQOMFjs.__name.call(void 0, () => ctx.res, "getResponse")
|
|
139
139
|
};
|
|
140
|
-
const context = new (0,
|
|
140
|
+
const context = new (0, _chunkXKK2SQ7Wjs.Context)(contextData);
|
|
141
141
|
if (http.headers) ctx.set(http.headers);
|
|
142
142
|
if (dynamic) {
|
|
143
|
-
aop =
|
|
143
|
+
aop = _chunkXKK2SQ7Wjs.Context.getAop(meta2, {
|
|
144
144
|
globalFilter,
|
|
145
145
|
globalGuards,
|
|
146
146
|
globalPipe
|
|
@@ -159,14 +159,13 @@ function bind(router, data, opts = {}) {
|
|
|
159
159
|
}
|
|
160
160
|
}
|
|
161
161
|
}
|
|
162
|
-
|
|
163
|
-
|
|
162
|
+
_chunk4LLLQOMFjs.__name.call(void 0, registerRoute, "registerRoute");
|
|
163
|
+
_chunk4LLLQOMFjs.HMR.call(void 0, async () => {
|
|
164
164
|
router.stack = originStack;
|
|
165
165
|
registerRoute();
|
|
166
166
|
});
|
|
167
167
|
}
|
|
168
|
-
|
|
168
|
+
_chunk4LLLQOMFjs.__name.call(void 0, bind, "bind");
|
|
169
169
|
|
|
170
170
|
|
|
171
171
|
exports.bind = bind;
|
|
172
|
-
//# sourceMappingURL=index.js.map
|
package/dist/http/koa/index.mjs
CHANGED
|
@@ -4,11 +4,11 @@ import {
|
|
|
4
4
|
createControllerMetaMap,
|
|
5
5
|
detectAopDep,
|
|
6
6
|
joinUrl
|
|
7
|
-
} from "../../chunk-
|
|
7
|
+
} from "../../chunk-E7EAPAGM.mjs";
|
|
8
8
|
import {
|
|
9
9
|
HMR,
|
|
10
10
|
__name
|
|
11
|
-
} from "../../chunk-
|
|
11
|
+
} from "../../chunk-NQ55PA2X.mjs";
|
|
12
12
|
|
|
13
13
|
// src/http/koa/bind.ts
|
|
14
14
|
import Router from "@koa/router";
|
|
@@ -169,4 +169,3 @@ __name(bind, "bind");
|
|
|
169
169
|
export {
|
|
170
170
|
bind
|
|
171
171
|
};
|
|
172
|
-
//# sourceMappingURL=index.mjs.map
|
package/dist/index.d.mts
CHANGED
|
@@ -252,7 +252,7 @@ interface OpenAPIConfig extends OpenAPIBaseConfig {
|
|
|
252
252
|
* OpenAPI 装饰器函数
|
|
253
253
|
* @param config OpenAPI/Swagger 配置
|
|
254
254
|
*/
|
|
255
|
-
declare function ApiDoc(config: OpenAPIConfig): (target: any, propertyKey: string,
|
|
255
|
+
declare function ApiDoc(config: OpenAPIConfig): (target: any, propertyKey: string, _descriptor: PropertyDescriptor) => void;
|
|
256
256
|
|
|
257
257
|
declare const defaultPipe: PipeType;
|
|
258
258
|
|
package/dist/index.d.ts
CHANGED
|
@@ -252,7 +252,7 @@ interface OpenAPIConfig extends OpenAPIBaseConfig {
|
|
|
252
252
|
* OpenAPI 装饰器函数
|
|
253
253
|
* @param config OpenAPI/Swagger 配置
|
|
254
254
|
*/
|
|
255
|
-
declare function ApiDoc(config: OpenAPIConfig): (target: any, propertyKey: string,
|
|
255
|
+
declare function ApiDoc(config: OpenAPIConfig): (target: any, propertyKey: string, _descriptor: PropertyDescriptor) => void;
|
|
256
256
|
|
|
257
257
|
declare const defaultPipe: PipeType;
|
|
258
258
|
|
package/dist/index.js
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
var
|
|
9
|
+
var _chunkZWPOWMZPjs = require('./chunk-ZWPOWMZP.js');
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
|
|
@@ -34,7 +34,7 @@ var _chunkKRUOHWFRjs = require('./chunk-KRUOHWFR.js');
|
|
|
34
34
|
|
|
35
35
|
|
|
36
36
|
|
|
37
|
-
var
|
|
37
|
+
var _chunkDPPDWBYOjs = require('./chunk-DPPDWBYO.js');
|
|
38
38
|
|
|
39
39
|
|
|
40
40
|
|
|
@@ -60,7 +60,7 @@ var _chunk5SUY5UVCjs = require('./chunk-5SUY5UVC.js');
|
|
|
60
60
|
|
|
61
61
|
|
|
62
62
|
|
|
63
|
-
var
|
|
63
|
+
var _chunkXKK2SQ7Wjs = require('./chunk-XKK2SQ7W.js');
|
|
64
64
|
|
|
65
65
|
|
|
66
66
|
|
|
@@ -75,12 +75,12 @@ var _chunkH7OCHDZTjs = require('./chunk-H7OCHDZT.js');
|
|
|
75
75
|
|
|
76
76
|
|
|
77
77
|
|
|
78
|
-
var
|
|
78
|
+
var _chunk4LLLQOMFjs = require('./chunk-4LLLQOMF.js');
|
|
79
79
|
|
|
80
80
|
// src/types.ts
|
|
81
81
|
var CustomResponse = class {
|
|
82
82
|
static {
|
|
83
|
-
|
|
83
|
+
_chunk4LLLQOMFjs.__name.call(void 0, this, "CustomResponse");
|
|
84
84
|
}
|
|
85
85
|
|
|
86
86
|
};
|
|
@@ -93,38 +93,38 @@ function _ts_decorate(decorators, target, key, desc) {
|
|
|
93
93
|
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;
|
|
94
94
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
95
95
|
}
|
|
96
|
-
|
|
96
|
+
_chunk4LLLQOMFjs.__name.call(void 0, _ts_decorate, "_ts_decorate");
|
|
97
97
|
function _ts_metadata(k, v) {
|
|
98
98
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
99
99
|
}
|
|
100
|
-
|
|
100
|
+
_chunk4LLLQOMFjs.__name.call(void 0, _ts_metadata, "_ts_metadata");
|
|
101
101
|
var ServerBase = (_class = class extends _phecdacore.Base {constructor(...args2) { super(...args2); _class.prototype.__init.call(this); }
|
|
102
102
|
static {
|
|
103
|
-
|
|
103
|
+
_chunk4LLLQOMFjs.__name.call(void 0, this, "ServerBase");
|
|
104
104
|
}
|
|
105
|
-
__init() {this.emitter = exports.emitter =
|
|
105
|
+
__init() {this.emitter = exports.emitter = _chunkZWPOWMZPjs.emitter}
|
|
106
106
|
log(msg, level = "log") {
|
|
107
|
-
|
|
107
|
+
_chunk4LLLQOMFjs.log.call(void 0, msg, level, this.tag);
|
|
108
108
|
}
|
|
109
109
|
}, _class);
|
|
110
110
|
var HttpBase = class extends ServerBase {
|
|
111
111
|
static {
|
|
112
|
-
|
|
112
|
+
_chunk4LLLQOMFjs.__name.call(void 0, this, "HttpBase");
|
|
113
113
|
}
|
|
114
114
|
|
|
115
115
|
};
|
|
116
116
|
_ts_decorate([
|
|
117
|
-
|
|
117
|
+
_chunkDPPDWBYOjs.Ctx,
|
|
118
118
|
_ts_metadata("design:type", typeof Ctx === "undefined" ? Object : Ctx)
|
|
119
119
|
], HttpBase.prototype, "context", void 0);
|
|
120
120
|
var RpcBase = class extends ServerBase {
|
|
121
121
|
static {
|
|
122
|
-
|
|
122
|
+
_chunk4LLLQOMFjs.__name.call(void 0, this, "RpcBase");
|
|
123
123
|
}
|
|
124
124
|
|
|
125
125
|
};
|
|
126
126
|
_ts_decorate([
|
|
127
|
-
|
|
127
|
+
_chunkDPPDWBYOjs.Ctx,
|
|
128
128
|
_ts_metadata("design:type", typeof Ctx === "undefined" ? Object : Ctx)
|
|
129
129
|
], RpcBase.prototype, "context", void 0);
|
|
130
130
|
|
|
@@ -132,15 +132,15 @@ _ts_decorate([
|
|
|
132
132
|
|
|
133
133
|
var PFilter = class extends ServerBase {
|
|
134
134
|
static {
|
|
135
|
-
|
|
135
|
+
_chunk4LLLQOMFjs.__name.call(void 0, this, "PFilter");
|
|
136
136
|
}
|
|
137
137
|
|
|
138
138
|
constructor(tag) {
|
|
139
139
|
super();
|
|
140
140
|
this.key = tag || _phecdacore.getTag.call(void 0, this);
|
|
141
|
-
|
|
141
|
+
_chunkXKK2SQ7Wjs.addFilter.call(void 0, this.key, this.use.bind(this));
|
|
142
142
|
this.onUnmount(() => {
|
|
143
|
-
delete
|
|
143
|
+
delete _chunkXKK2SQ7Wjs.Context.filterRecord[this.key];
|
|
144
144
|
});
|
|
145
145
|
}
|
|
146
146
|
};
|
|
@@ -149,16 +149,16 @@ var PFilter = class extends ServerBase {
|
|
|
149
149
|
|
|
150
150
|
var PGuard = (_class2 = class extends ServerBase {
|
|
151
151
|
static {
|
|
152
|
-
|
|
152
|
+
_chunk4LLLQOMFjs.__name.call(void 0, this, "PGuard");
|
|
153
153
|
}
|
|
154
154
|
|
|
155
155
|
__init2() {this.priority = 0}
|
|
156
156
|
constructor(tag) {
|
|
157
157
|
super();_class2.prototype.__init2.call(this);;
|
|
158
158
|
this.key = tag || _phecdacore.getTag.call(void 0, this);
|
|
159
|
-
|
|
159
|
+
_chunkXKK2SQ7Wjs.addGuard.call(void 0, this.key, this.use.bind(this), this.priority);
|
|
160
160
|
this.onUnmount(() => {
|
|
161
|
-
delete
|
|
161
|
+
delete _chunkXKK2SQ7Wjs.Context.guardRecord[this.key];
|
|
162
162
|
});
|
|
163
163
|
}
|
|
164
164
|
}, _class2);
|
|
@@ -167,15 +167,15 @@ var PGuard = (_class2 = class extends ServerBase {
|
|
|
167
167
|
|
|
168
168
|
var PPipe = class extends ServerBase {
|
|
169
169
|
static {
|
|
170
|
-
|
|
170
|
+
_chunk4LLLQOMFjs.__name.call(void 0, this, "PPipe");
|
|
171
171
|
}
|
|
172
172
|
|
|
173
173
|
constructor(tag) {
|
|
174
174
|
super();
|
|
175
175
|
this.key = tag || _phecdacore.getTag.call(void 0, this);
|
|
176
|
-
|
|
176
|
+
_chunkXKK2SQ7Wjs.addPipe.call(void 0, this.key, this.use.bind(this));
|
|
177
177
|
this.onUnmount(() => {
|
|
178
|
-
delete
|
|
178
|
+
delete _chunkXKK2SQ7Wjs.Context.pipeRecord[this.key];
|
|
179
179
|
});
|
|
180
180
|
}
|
|
181
181
|
};
|
|
@@ -184,16 +184,16 @@ var PPipe = class extends ServerBase {
|
|
|
184
184
|
|
|
185
185
|
var PAddon = (_class3 = class extends ServerBase {
|
|
186
186
|
static {
|
|
187
|
-
|
|
187
|
+
_chunk4LLLQOMFjs.__name.call(void 0, this, "PAddon");
|
|
188
188
|
}
|
|
189
189
|
|
|
190
190
|
__init3() {this.priority = 0}
|
|
191
191
|
constructor(tag) {
|
|
192
192
|
super();_class3.prototype.__init3.call(this);;
|
|
193
193
|
this.key = tag || _phecdacore.getTag.call(void 0, this);
|
|
194
|
-
|
|
194
|
+
_chunkXKK2SQ7Wjs.addAddon.call(void 0, this.key, this.use.bind(this), this.priority);
|
|
195
195
|
this.onUnmount(() => {
|
|
196
|
-
delete
|
|
196
|
+
delete _chunkXKK2SQ7Wjs.Context.addonRecord[this.key];
|
|
197
197
|
});
|
|
198
198
|
}
|
|
199
199
|
}, _class3);
|
|
@@ -202,7 +202,7 @@ var PAddon = (_class3 = class extends ServerBase {
|
|
|
202
202
|
|
|
203
203
|
var PExtension = class extends ServerBase {
|
|
204
204
|
static {
|
|
205
|
-
|
|
205
|
+
_chunk4LLLQOMFjs.__name.call(void 0, this, "PExtension");
|
|
206
206
|
}
|
|
207
207
|
|
|
208
208
|
|
|
@@ -211,27 +211,27 @@ var PExtension = class extends ServerBase {
|
|
|
211
211
|
super();
|
|
212
212
|
const key = this.key = tag || _phecdacore.getTag.call(void 0, this);
|
|
213
213
|
if (this.pipe) {
|
|
214
|
-
|
|
214
|
+
_chunkXKK2SQ7Wjs.addPipe.call(void 0, key, this.pipe.bind(this));
|
|
215
215
|
this.onUnmount(() => {
|
|
216
|
-
delete
|
|
216
|
+
delete _chunkXKK2SQ7Wjs.Context.pipeRecord[key];
|
|
217
217
|
});
|
|
218
218
|
}
|
|
219
219
|
if (this.addon) {
|
|
220
|
-
|
|
220
|
+
_chunkXKK2SQ7Wjs.addAddon.call(void 0, key, this.addon.bind(this), this.addonPriority);
|
|
221
221
|
this.onUnmount(() => {
|
|
222
|
-
delete
|
|
222
|
+
delete _chunkXKK2SQ7Wjs.Context.addonRecord[key];
|
|
223
223
|
});
|
|
224
224
|
}
|
|
225
225
|
if (this.guard) {
|
|
226
|
-
|
|
226
|
+
_chunkXKK2SQ7Wjs.addGuard.call(void 0, key, this.guard.bind(this), this.guardPriority);
|
|
227
227
|
this.onUnmount(() => {
|
|
228
|
-
delete
|
|
228
|
+
delete _chunkXKK2SQ7Wjs.Context.guardRecord[key];
|
|
229
229
|
});
|
|
230
230
|
}
|
|
231
231
|
if (this.filter) {
|
|
232
|
-
|
|
232
|
+
_chunkXKK2SQ7Wjs.addFilter.call(void 0, key, this.filter.bind(this));
|
|
233
233
|
this.onUnmount(() => {
|
|
234
|
-
delete
|
|
234
|
+
delete _chunkXKK2SQ7Wjs.Context.filterRecord[key];
|
|
235
235
|
});
|
|
236
236
|
}
|
|
237
237
|
}
|
|
@@ -241,7 +241,7 @@ var PExtension = class extends ServerBase {
|
|
|
241
241
|
var _fsextra = require('fs-extra'); var _fsextra2 = _interopRequireDefault(_fsextra);
|
|
242
242
|
var Generator = class {
|
|
243
243
|
static {
|
|
244
|
-
|
|
244
|
+
_chunk4LLLQOMFjs.__name.call(void 0, this, "Generator");
|
|
245
245
|
}
|
|
246
246
|
|
|
247
247
|
constructor(path) {
|
|
@@ -258,7 +258,7 @@ var Generator = class {
|
|
|
258
258
|
// src/generator/rpc.ts
|
|
259
259
|
var RPCGenerator = (_class4 = class extends Generator {constructor(...args3) { super(...args3); _class4.prototype.__init4.call(this);_class4.prototype.__init5.call(this); }
|
|
260
260
|
static {
|
|
261
|
-
|
|
261
|
+
_chunk4LLLQOMFjs.__name.call(void 0, this, "RPCGenerator");
|
|
262
262
|
}
|
|
263
263
|
__init4() {this.name = "RPC"}
|
|
264
264
|
__init5() {this.classMap = {}}
|
|
@@ -294,7 +294,7 @@ var RPCGenerator = (_class4 = class extends Generator {constructor(...args3) { s
|
|
|
294
294
|
// src/generator/http.ts
|
|
295
295
|
var HTTPGenerator = (_class5 = class extends Generator {constructor(...args4) { super(...args4); _class5.prototype.__init6.call(this);_class5.prototype.__init7.call(this); }
|
|
296
296
|
static {
|
|
297
|
-
|
|
297
|
+
_chunk4LLLQOMFjs.__name.call(void 0, this, "HTTPGenerator");
|
|
298
298
|
}
|
|
299
299
|
__init6() {this.name = "HTTP"}
|
|
300
300
|
__init7() {this.classMap = {}}
|
|
@@ -311,7 +311,7 @@ var HTTPGenerator = (_class5 = class extends Generator {constructor(...args4) {
|
|
|
311
311
|
addMethod(args) {
|
|
312
312
|
const { http, name, func, params, tag } = args;
|
|
313
313
|
if (!_optionalChain([http, 'optionalAccess', _2 => _2.type])) return;
|
|
314
|
-
const url =
|
|
314
|
+
const url = _chunkXKK2SQ7Wjs.joinUrl.call(void 0, http.prefix, http.route).replace(/\/\:([^\/]*)/g, (_, js) => `/{{${js}}}`);
|
|
315
315
|
if (!this.classMap[name]) this.classMap[name] = {};
|
|
316
316
|
this.classMap[name][func] = `
|
|
317
317
|
${func}(...args){
|
|
@@ -336,7 +336,7 @@ return ret
|
|
|
336
336
|
|
|
337
337
|
var OpenAPIGenerator = (_class6 = class extends Generator {constructor(...args5) { super(...args5); _class6.prototype.__init8.call(this);_class6.prototype.__init9.call(this); }
|
|
338
338
|
static {
|
|
339
|
-
|
|
339
|
+
_chunk4LLLQOMFjs.__name.call(void 0, this, "OpenAPIGenerator");
|
|
340
340
|
}
|
|
341
341
|
__init8() {this.name = "OpenAPI"}
|
|
342
342
|
__init9() {this.paths = {}}
|
|
@@ -354,11 +354,9 @@ var OpenAPIGenerator = (_class6 = class extends Generator {constructor(...args5)
|
|
|
354
354
|
addMethod(args) {
|
|
355
355
|
const { http, tag, func } = args;
|
|
356
356
|
if (!_optionalChain([http, 'optionalAccess', _3 => _3.type])) return;
|
|
357
|
-
const path =
|
|
358
|
-
if (!this.paths[path]) {
|
|
359
|
-
|
|
360
|
-
}
|
|
361
|
-
const config = _phecdacore.getMergedMeta.call(void 0, _chunkKRUOHWFRjs.useS.call(void 0, ).getModel(tag), func)["openapi"];
|
|
357
|
+
const path = _chunkXKK2SQ7Wjs.joinUrl.call(void 0, http.prefix, http.route);
|
|
358
|
+
if (!this.paths[path]) this.paths[path] = {};
|
|
359
|
+
const config = _phecdacore.getMergedMeta.call(void 0, _chunkZWPOWMZPjs.useS.call(void 0, ).getModel(tag), func).openapi;
|
|
362
360
|
this.paths[path][http.type] = {
|
|
363
361
|
summary: config.summary,
|
|
364
362
|
description: config.description,
|
|
@@ -463,5 +461,4 @@ var OpenAPIGenerator = (_class6 = class extends Generator {constructor(...args5)
|
|
|
463
461
|
|
|
464
462
|
|
|
465
463
|
|
|
466
|
-
exports.Addon =
|
|
467
|
-
//# sourceMappingURL=index.js.map
|
|
464
|
+
exports.Addon = _chunkDPPDWBYOjs.Addon; exports.ApiDoc = _chunkDPPDWBYOjs.ApiDoc; exports.Arg = _chunkDPPDWBYOjs.Arg; exports.BadGatewayException = _chunkXKK2SQ7Wjs.BadGatewayException; exports.BadRequestException = _chunkXKK2SQ7Wjs.BadRequestException; exports.BaseParam = _chunkDPPDWBYOjs.BaseParam; exports.Body = _chunkDPPDWBYOjs.Body; exports.ConflictException = _chunkXKK2SQ7Wjs.ConflictException; exports.Context = _chunkXKK2SQ7Wjs.Context; exports.Controller = _chunkDPPDWBYOjs.Controller; exports.Ctx = _chunkDPPDWBYOjs.Ctx; exports.CustomResponse = CustomResponse; exports.Define = _chunkDPPDWBYOjs.Define; exports.Delete = _chunkDPPDWBYOjs.Delete; exports.ERROR_SYMBOL = _chunk4LLLQOMFjs.ERROR_SYMBOL; exports.Exception = _chunkXKK2SQ7Wjs.Exception; exports.Factory = _chunkZWPOWMZPjs.Factory; exports.Filter = _chunkDPPDWBYOjs.Filter; exports.ForbiddenException = _chunkXKK2SQ7Wjs.ForbiddenException; exports.FrameworkException = _chunkXKK2SQ7Wjs.FrameworkException; exports.Generator = Generator; exports.Get = _chunkDPPDWBYOjs.Get; exports.Guard = _chunkDPPDWBYOjs.Guard; exports.HTTPGenerator = HTTPGenerator; exports.Head = _chunkDPPDWBYOjs.Head; exports.Header = _chunkDPPDWBYOjs.Header; exports.HttpBase = HttpBase; exports.IS_DEV = _chunk4LLLQOMFjs.IS_DEV; exports.IS_ONLY_GENERATE = _chunk4LLLQOMFjs.IS_ONLY_GENERATE; exports.IS_PURE = _chunk4LLLQOMFjs.IS_PURE; exports.IS_STRICT = _chunk4LLLQOMFjs.IS_STRICT; exports.InvalidInputException = _chunkXKK2SQ7Wjs.InvalidInputException; exports.LOG_LEVEL = _chunk4LLLQOMFjs.LOG_LEVEL; exports.ManyFiles = _chunkDPPDWBYOjs.ManyFiles; exports.Meta = _chunkZWPOWMZPjs.Meta; exports.Mixin = _chunk4LLLQOMFjs.Mixin; exports.NotFoundException = _chunkXKK2SQ7Wjs.NotFoundException; exports.OneFile = _chunkDPPDWBYOjs.OneFile; exports.OpenAPIGenerator = OpenAPIGenerator; exports.PAddon = PAddon; exports.PExtension = PExtension; exports.PFilter = PFilter; exports.PGuard = PGuard; exports.PPipe = PPipe; exports.PS_EXIT_CODE = _chunk4LLLQOMFjs.PS_EXIT_CODE; exports.Param = _chunkDPPDWBYOjs.Param; exports.Patch = _chunkDPPDWBYOjs.Patch; exports.PayloadLargeException = _chunkXKK2SQ7Wjs.PayloadLargeException; exports.Pipe = _chunkDPPDWBYOjs.Pipe; exports.Post = _chunkDPPDWBYOjs.Post; exports.Put = _chunkDPPDWBYOjs.Put; exports.Query = _chunkDPPDWBYOjs.Query; exports.Queue = _chunkDPPDWBYOjs.Queue; exports.RPCGenerator = RPCGenerator; exports.Route = _chunkDPPDWBYOjs.Route; exports.Rpc = _chunkDPPDWBYOjs.Rpc; exports.RpcBase = RpcBase; exports.Search = _chunkDPPDWBYOjs.Search; exports.ServerBase = ServerBase; exports.ServerPhecda = _chunkZWPOWMZPjs.ServerPhecda; exports.ServiceUnavailableException = _chunkXKK2SQ7Wjs.ServiceUnavailableException; exports.TimeoutException = _chunkXKK2SQ7Wjs.TimeoutException; exports.TimerException = _chunkXKK2SQ7Wjs.TimerException; exports.UnauthorizedException = _chunkXKK2SQ7Wjs.UnauthorizedException; exports.UndefinedException = _chunkXKK2SQ7Wjs.UndefinedException; exports.UnsupportedMediaTypeException = _chunkXKK2SQ7Wjs.UnsupportedMediaTypeException; exports.ValidateException = _chunkXKK2SQ7Wjs.ValidateException; exports.WorkerException = _chunkXKK2SQ7Wjs.WorkerException; exports.addAddon = _chunkXKK2SQ7Wjs.addAddon; exports.addFilter = _chunkXKK2SQ7Wjs.addFilter; exports.addGuard = _chunkXKK2SQ7Wjs.addGuard; exports.addPipe = _chunkXKK2SQ7Wjs.addPipe; exports.defaultPipe = _chunkXKK2SQ7Wjs.defaultPipe; exports.defaultServerInject = _chunkZWPOWMZPjs.defaultServerInject; exports.emitter = _chunkZWPOWMZPjs.emitter; exports.getLogger = _chunk4LLLQOMFjs.getLogger; exports.log = _chunk4LLLQOMFjs.log; exports.phecdaNamespace = _chunkZWPOWMZPjs.phecdaNamespace; exports.runMiddleware = _chunk4LLLQOMFjs.runMiddleware; exports.setLogger = _chunk4LLLQOMFjs.setLogger; exports.useS = _chunkZWPOWMZPjs.useS;
|
package/dist/index.mjs
CHANGED
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
emitter,
|
|
7
7
|
phecdaNamespace,
|
|
8
8
|
useS
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-AIAO6SV6.mjs";
|
|
10
10
|
import {
|
|
11
11
|
Addon,
|
|
12
12
|
ApiDoc,
|
|
@@ -34,7 +34,7 @@ import {
|
|
|
34
34
|
Route,
|
|
35
35
|
Rpc,
|
|
36
36
|
Search
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-MKRHYZCL.mjs";
|
|
38
38
|
import {
|
|
39
39
|
BadGatewayException,
|
|
40
40
|
BadRequestException,
|
|
@@ -60,7 +60,7 @@ import {
|
|
|
60
60
|
addPipe,
|
|
61
61
|
defaultPipe,
|
|
62
62
|
joinUrl
|
|
63
|
-
} from "./chunk-
|
|
63
|
+
} from "./chunk-E7EAPAGM.mjs";
|
|
64
64
|
import {
|
|
65
65
|
ERROR_SYMBOL,
|
|
66
66
|
IS_DEV,
|
|
@@ -75,7 +75,7 @@ import {
|
|
|
75
75
|
log,
|
|
76
76
|
runMiddleware,
|
|
77
77
|
setLogger
|
|
78
|
-
} from "./chunk-
|
|
78
|
+
} from "./chunk-NQ55PA2X.mjs";
|
|
79
79
|
|
|
80
80
|
// src/types.ts
|
|
81
81
|
var CustomResponse = class {
|
|
@@ -355,10 +355,8 @@ var OpenAPIGenerator = class extends Generator {
|
|
|
355
355
|
const { http, tag, func } = args;
|
|
356
356
|
if (!http?.type) return;
|
|
357
357
|
const path = joinUrl(http.prefix, http.route);
|
|
358
|
-
if (!this.paths[path]) {
|
|
359
|
-
|
|
360
|
-
}
|
|
361
|
-
const config = getMergedMeta(useS().getModel(tag), func)["openapi"];
|
|
358
|
+
if (!this.paths[path]) this.paths[path] = {};
|
|
359
|
+
const config = getMergedMeta(useS().getModel(tag), func).openapi;
|
|
362
360
|
this.paths[path][http.type] = {
|
|
363
361
|
summary: config.summary,
|
|
364
362
|
description: config.description,
|
|
@@ -464,4 +462,3 @@ export {
|
|
|
464
462
|
setLogger,
|
|
465
463
|
useS
|
|
466
464
|
};
|
|
467
|
-
//# sourceMappingURL=index.mjs.map
|
package/dist/rpc/bullmq/index.js
CHANGED
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var _chunkXKK2SQ7Wjs = require('../../chunk-XKK2SQ7W.js');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
var
|
|
9
|
+
var _chunk4LLLQOMFjs = require('../../chunk-4LLLQOMF.js');
|
|
10
10
|
|
|
11
11
|
// src/rpc/bullmq/create.ts
|
|
12
12
|
var _bullmq = require('bullmq');
|
|
@@ -17,14 +17,14 @@ async function create({ moduleMap, meta }, opts = {}) {
|
|
|
17
17
|
const workerMap = {};
|
|
18
18
|
const queueMap = {};
|
|
19
19
|
const existQueue = /* @__PURE__ */ new Set();
|
|
20
|
-
const metaMap =
|
|
20
|
+
const metaMap = _chunkXKK2SQ7Wjs.createControllerMetaMap.call(void 0, meta, (meta2) => {
|
|
21
21
|
const { controller, rpc, func, tag } = meta2.data;
|
|
22
22
|
if (controller === "rpc" && _optionalChain([rpc, 'optionalAccess', _ => _.queue]) !== void 0) {
|
|
23
23
|
debug(`register method "${func}" in module "${tag}"`);
|
|
24
24
|
return true;
|
|
25
25
|
}
|
|
26
26
|
});
|
|
27
|
-
|
|
27
|
+
_chunkXKK2SQ7Wjs.detectAopDep.call(void 0, meta, {
|
|
28
28
|
guards: globalGuards
|
|
29
29
|
}, "rpc");
|
|
30
30
|
async function subscribeQueues() {
|
|
@@ -38,12 +38,12 @@ async function create({ moduleMap, meta }, opts = {}) {
|
|
|
38
38
|
if (existQueue.has(queue)) continue;
|
|
39
39
|
existQueue.add(queue);
|
|
40
40
|
workerMap[queue] = new (0, _bullmq.Worker)(queue, handleRequest, workerOpts);
|
|
41
|
-
|
|
41
|
+
_chunkXKK2SQ7Wjs.Context.applyAddons(addons, workerMap[queue], "bullmq");
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
|
-
|
|
46
|
+
_chunk4LLLQOMFjs.__name.call(void 0, subscribeQueues, "subscribeQueues");
|
|
47
47
|
async function handleRequest(job) {
|
|
48
48
|
const { data } = job;
|
|
49
49
|
const { tag, func, args, id, queue: clientQueue, _ps } = data;
|
|
@@ -52,12 +52,12 @@ async function create({ moduleMap, meta }, opts = {}) {
|
|
|
52
52
|
const meta2 = metaMap.get(tag)[func];
|
|
53
53
|
const { data: { rpc: { isEvent } = {} } } = meta2;
|
|
54
54
|
if (!isEvent && !(clientQueue in queueMap)) queueMap[clientQueue] = new (0, _bullmq.Queue)(clientQueue, queueOpts);
|
|
55
|
-
const aop =
|
|
55
|
+
const aop = _chunkXKK2SQ7Wjs.Context.getAop(meta2, {
|
|
56
56
|
globalFilter,
|
|
57
57
|
globalGuards,
|
|
58
58
|
globalPipe
|
|
59
59
|
});
|
|
60
|
-
const context = new (0,
|
|
60
|
+
const context = new (0, _chunkXKK2SQ7Wjs.Context)({
|
|
61
61
|
type: "bullmq",
|
|
62
62
|
category: "rpc",
|
|
63
63
|
moduleMap,
|
|
@@ -85,9 +85,9 @@ async function create({ moduleMap, meta }, opts = {}) {
|
|
|
85
85
|
}
|
|
86
86
|
});
|
|
87
87
|
}
|
|
88
|
-
|
|
88
|
+
_chunk4LLLQOMFjs.__name.call(void 0, handleRequest, "handleRequest");
|
|
89
89
|
subscribeQueues();
|
|
90
|
-
|
|
90
|
+
_chunk4LLLQOMFjs.HMR.call(void 0, async () => {
|
|
91
91
|
for (const i in workerMap) await workerMap[i].close(true);
|
|
92
92
|
for (const i in queueMap) await queueMap[i].close();
|
|
93
93
|
await subscribeQueues();
|
|
@@ -97,8 +97,7 @@ async function create({ moduleMap, meta }, opts = {}) {
|
|
|
97
97
|
queueMap
|
|
98
98
|
};
|
|
99
99
|
}
|
|
100
|
-
|
|
100
|
+
_chunk4LLLQOMFjs.__name.call(void 0, create, "create");
|
|
101
101
|
|
|
102
102
|
|
|
103
103
|
exports.create = create;
|
|
104
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -2,11 +2,11 @@ import {
|
|
|
2
2
|
Context,
|
|
3
3
|
createControllerMetaMap,
|
|
4
4
|
detectAopDep
|
|
5
|
-
} from "../../chunk-
|
|
5
|
+
} from "../../chunk-E7EAPAGM.mjs";
|
|
6
6
|
import {
|
|
7
7
|
HMR,
|
|
8
8
|
__name
|
|
9
|
-
} from "../../chunk-
|
|
9
|
+
} from "../../chunk-NQ55PA2X.mjs";
|
|
10
10
|
|
|
11
11
|
// src/rpc/bullmq/create.ts
|
|
12
12
|
import { Queue, Worker } from "bullmq";
|
|
@@ -101,4 +101,3 @@ __name(create, "create");
|
|
|
101
101
|
export {
|
|
102
102
|
create
|
|
103
103
|
};
|
|
104
|
-
//# sourceMappingURL=index.mjs.map
|