phecda-server 6.0.1 → 6.1.0
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/dist/{chunk-YUXERDQ6.mjs → chunk-2CFYUXPM.mjs} +9 -12
- package/dist/{chunk-HDQAT2IM.mjs → chunk-3H3T54IC.mjs} +116 -87
- package/dist/{chunk-TZYATAJX.js → chunk-DVTBLV6I.js} +62 -65
- package/dist/{chunk-UXD62LGG.mjs → chunk-G7TD2VB7.mjs} +10 -2
- package/dist/{chunk-F3W3NN7F.mjs → chunk-J7B24YSE.mjs} +1 -1
- package/dist/{chunk-XCND2QW3.js → chunk-JDV2XJYE.js} +25 -25
- package/dist/chunk-NL6QBQAR.js +266 -0
- package/dist/{chunk-GHFSIZUO.js → chunk-TVT62GIX.js} +11 -3
- package/dist/core-BlN0Spy9.d.ts +47 -0
- package/dist/core-P1CsH6jz.d.mts +47 -0
- package/dist/helper.d.mts +1 -1
- package/dist/helper.d.ts +1 -1
- package/dist/helper.js +3 -3
- package/dist/helper.mjs +2 -2
- package/dist/index.d.mts +12 -11
- package/dist/index.d.ts +12 -11
- package/dist/index.js +49 -43
- package/dist/index.mjs +19 -13
- package/dist/{types-BlIBlnVT.d.ts → meta-KtfiBIde.d.mts} +44 -44
- package/dist/{types-BlIBlnVT.d.mts → meta-KtfiBIde.d.ts} +44 -44
- package/dist/rpc/bullmq/index.d.mts +3 -3
- package/dist/rpc/bullmq/index.d.ts +3 -3
- package/dist/rpc/bullmq/index.js +12 -12
- package/dist/rpc/bullmq/index.mjs +2 -2
- package/dist/rpc/kafka/index.d.mts +3 -3
- package/dist/rpc/kafka/index.d.ts +3 -3
- package/dist/rpc/kafka/index.js +12 -12
- package/dist/rpc/kafka/index.mjs +2 -2
- package/dist/rpc/nats/index.d.mts +3 -3
- package/dist/rpc/nats/index.d.ts +3 -3
- package/dist/rpc/nats/index.js +11 -11
- package/dist/rpc/nats/index.mjs +2 -2
- package/dist/rpc/rabbitmq/index.d.mts +3 -3
- package/dist/rpc/rabbitmq/index.d.ts +3 -3
- package/dist/rpc/rabbitmq/index.js +13 -13
- package/dist/rpc/rabbitmq/index.mjs +2 -2
- package/dist/rpc/redis/index.d.mts +3 -3
- package/dist/rpc/redis/index.d.ts +3 -3
- package/dist/rpc/redis/index.js +11 -11
- package/dist/rpc/redis/index.mjs +2 -2
- package/dist/server/elysia/index.d.mts +3 -3
- package/dist/server/elysia/index.d.ts +3 -3
- package/dist/server/elysia/index.js +44 -32
- package/dist/server/elysia/index.mjs +17 -5
- package/dist/server/express/index.d.mts +3 -3
- package/dist/server/express/index.d.ts +3 -3
- package/dist/server/express/index.js +34 -30
- package/dist/server/express/index.mjs +8 -4
- package/dist/server/fastify/index.d.mts +3 -3
- package/dist/server/fastify/index.d.ts +3 -3
- package/dist/server/fastify/index.js +35 -31
- package/dist/server/fastify/index.mjs +9 -5
- package/dist/server/h3/index.d.mts +3 -3
- package/dist/server/h3/index.d.ts +3 -3
- package/dist/server/h3/index.js +34 -30
- package/dist/server/h3/index.mjs +8 -4
- package/dist/server/hono/index.d.mts +3 -3
- package/dist/server/hono/index.d.ts +3 -3
- package/dist/server/hono/index.js +33 -29
- package/dist/server/hono/index.mjs +8 -4
- package/dist/server/hyper-express/index.d.mts +3 -3
- package/dist/server/hyper-express/index.d.ts +3 -3
- package/dist/server/hyper-express/index.js +33 -29
- package/dist/server/hyper-express/index.mjs +8 -4
- package/dist/server/koa/index.d.mts +3 -3
- package/dist/server/koa/index.d.ts +3 -3
- package/dist/server/koa/index.js +34 -30
- package/dist/server/koa/index.mjs +8 -4
- 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-BCJhmpQh.d.ts → types-BvD3B5Ny.d.mts} +4 -2
- package/dist/{types-Dgxirc9f.d.mts → types-DIw7B6Up.d.ts} +4 -2
- package/dist/{types-B-ZFZajI.d.ts → types-JVT0mgLD.d.ts} +1 -1
- package/dist/{types-AgVwUXPC.d.mts → types-t9D1fU6G.d.mts} +1 -1
- package/package.json +2 -2
- package/dist/chunk-LYEZ6RGX.js +0 -237
- package/dist/core-Blq8frmr.d.ts +0 -30
- package/dist/core-D2oL8Ge0.d.mts +0 -30
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkJDV2XJYEjs = require('../../chunk-JDV2XJYE.js');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _chunkDVTBLV6Ijs = require('../../chunk-DVTBLV6I.js');
|
|
11
11
|
|
|
12
12
|
|
|
13
|
-
var
|
|
13
|
+
var _chunkTVT62GIXjs = require('../../chunk-TVT62GIX.js');
|
|
14
14
|
|
|
15
15
|
// src/server/elysia/bind.ts
|
|
16
16
|
var _debug = require('debug'); var _debug2 = _interopRequireDefault(_debug);
|
|
@@ -19,14 +19,14 @@ var debug = _debug2.default.call(void 0, "phecda-server/elysia");
|
|
|
19
19
|
function bind(app, data, opts = {}) {
|
|
20
20
|
const { globalGuards, globalInterceptors, parallelRoute = "/__PHECDA_SERVER__", globalPlugins = [], parallelPlugins = [], globalFilter, globalPipe } = opts;
|
|
21
21
|
const { moduleMap, meta } = data;
|
|
22
|
-
const metaMap =
|
|
22
|
+
const metaMap = _chunkDVTBLV6Ijs.createControllerMetaMap.call(void 0, meta, (meta2) => {
|
|
23
23
|
const { controller, http, func, tag } = meta2.data;
|
|
24
24
|
if (controller === "http" && _optionalChain([http, 'optionalAccess', _ => _.type])) {
|
|
25
25
|
debug(`register method "${func}" in module "${tag}"`);
|
|
26
26
|
return true;
|
|
27
27
|
}
|
|
28
28
|
});
|
|
29
|
-
|
|
29
|
+
_chunkDVTBLV6Ijs.detectAopDep.call(void 0, meta, {
|
|
30
30
|
plugins: [
|
|
31
31
|
...globalPlugins,
|
|
32
32
|
...parallelPlugins
|
|
@@ -36,27 +36,27 @@ function bind(app, data, opts = {}) {
|
|
|
36
36
|
});
|
|
37
37
|
registerRoute();
|
|
38
38
|
async function registerRoute() {
|
|
39
|
-
|
|
39
|
+
_chunkDVTBLV6Ijs.Context.usePlugin(globalPlugins, "elysia").forEach((p) => p(app));
|
|
40
40
|
const parallelRouter = new (0, _elysia.Elysia)();
|
|
41
|
-
|
|
41
|
+
_chunkDVTBLV6Ijs.Context.usePlugin(parallelPlugins, "elysia").forEach((p) => p(parallelRouter));
|
|
42
42
|
if (parallelRoute) {
|
|
43
43
|
parallelRouter.post(parallelRoute, async (c) => {
|
|
44
44
|
const { body } = c;
|
|
45
45
|
async function errorHandler(e) {
|
|
46
|
-
const error = await
|
|
46
|
+
const error = await _chunkDVTBLV6Ijs.Context.filterRecord.default(e);
|
|
47
47
|
c.set.status = error.status;
|
|
48
48
|
return error;
|
|
49
49
|
}
|
|
50
|
-
|
|
51
|
-
if (!Array.isArray(body)) return errorHandler(new (0,
|
|
50
|
+
_chunkTVT62GIXjs.__name.call(void 0, errorHandler, "errorHandler");
|
|
51
|
+
if (!Array.isArray(body)) return errorHandler(new (0, _chunkDVTBLV6Ijs.BadRequestException)("data format should be an array"));
|
|
52
52
|
try {
|
|
53
53
|
return Promise.all(body.map((item, i) => {
|
|
54
54
|
return new Promise(async (resolve) => {
|
|
55
55
|
const { tag, func } = item;
|
|
56
56
|
debug(`(parallel)invoke method "${func}" in module "${tag}"`);
|
|
57
|
-
if (!metaMap.has(tag)) return resolve(await
|
|
57
|
+
if (!metaMap.has(tag)) return resolve(await _chunkDVTBLV6Ijs.Context.filterRecord.default(new (0, _chunkDVTBLV6Ijs.BadRequestException)(`module "${tag}" doesn't exist`)));
|
|
58
58
|
const meta2 = metaMap.get(tag)[func];
|
|
59
|
-
if (!meta2) return resolve(await
|
|
59
|
+
if (!meta2) return resolve(await _chunkDVTBLV6Ijs.Context.filterRecord.default(new (0, _chunkDVTBLV6Ijs.BadRequestException)(`"${func}" in "${tag}" doesn't exist`)));
|
|
60
60
|
const { data: { params } } = meta2;
|
|
61
61
|
const contextData = {
|
|
62
62
|
type: "elysia",
|
|
@@ -68,18 +68,24 @@ function bind(app, data, opts = {}) {
|
|
|
68
68
|
tag,
|
|
69
69
|
func,
|
|
70
70
|
app,
|
|
71
|
-
...
|
|
72
|
-
getCookie: /* @__PURE__ */
|
|
73
|
-
setCookie: /* @__PURE__ */
|
|
71
|
+
..._chunkDVTBLV6Ijs.argToReq.call(void 0, params, item.args, c.headers),
|
|
72
|
+
getCookie: /* @__PURE__ */ _chunkTVT62GIXjs.__name.call(void 0, (key) => c.cookie[key].value, "getCookie"),
|
|
73
|
+
setCookie: /* @__PURE__ */ _chunkTVT62GIXjs.__name.call(void 0, (key, value, opts2 = {}) => c.cookie[key].set({
|
|
74
74
|
...opts2,
|
|
75
75
|
value
|
|
76
76
|
}), "setCookie"),
|
|
77
|
-
delCookie: /* @__PURE__ */
|
|
78
|
-
redirect: /* @__PURE__ */
|
|
79
|
-
setResHeaders: /* @__PURE__ */
|
|
80
|
-
setResStatus: /* @__PURE__ */
|
|
77
|
+
delCookie: /* @__PURE__ */ _chunkTVT62GIXjs.__name.call(void 0, (key) => c.cookie[key].remove(), "delCookie"),
|
|
78
|
+
redirect: /* @__PURE__ */ _chunkTVT62GIXjs.__name.call(void 0, (url) => c.redirect(url), "redirect"),
|
|
79
|
+
setResHeaders: /* @__PURE__ */ _chunkTVT62GIXjs.__name.call(void 0, (headers) => Object.assign(c.set.headers, headers), "setResHeaders"),
|
|
80
|
+
setResStatus: /* @__PURE__ */ _chunkTVT62GIXjs.__name.call(void 0, (status) => c.set.status = status, "setResStatus"),
|
|
81
|
+
getRequest: /* @__PURE__ */ _chunkTVT62GIXjs.__name.call(void 0, () => {
|
|
82
|
+
throw new Error("elysia can't support getRequest");
|
|
83
|
+
}, "getRequest"),
|
|
84
|
+
getResponse: /* @__PURE__ */ _chunkTVT62GIXjs.__name.call(void 0, () => {
|
|
85
|
+
throw new Error("elysia can't support getResponse");
|
|
86
|
+
}, "getResponse")
|
|
81
87
|
};
|
|
82
|
-
const context = new (0,
|
|
88
|
+
const context = new (0, _chunkDVTBLV6Ijs.Context)(contextData);
|
|
83
89
|
context.run({
|
|
84
90
|
globalGuards,
|
|
85
91
|
globalInterceptors,
|
|
@@ -102,7 +108,7 @@ function bind(app, data, opts = {}) {
|
|
|
102
108
|
const { data: { define, plugins, http } } = meta2;
|
|
103
109
|
const funcRouter = new (0, _elysia.Elysia)();
|
|
104
110
|
if (!_optionalChain([http, 'optionalAccess', _2 => _2.type])) continue;
|
|
105
|
-
|
|
111
|
+
_chunkDVTBLV6Ijs.Context.usePlugin(plugins, "elysia").forEach((p) => p(funcRouter));
|
|
106
112
|
funcRouter[http.type](http.prefix + http.route, async (c) => {
|
|
107
113
|
debug(`invoke method "${func}" in module "${tag}"`);
|
|
108
114
|
const contextData = {
|
|
@@ -117,17 +123,23 @@ function bind(app, data, opts = {}) {
|
|
|
117
123
|
params: c.params,
|
|
118
124
|
headers: c.headers,
|
|
119
125
|
app,
|
|
120
|
-
getCookie: /* @__PURE__ */
|
|
121
|
-
setCookie: /* @__PURE__ */
|
|
126
|
+
getCookie: /* @__PURE__ */ _chunkTVT62GIXjs.__name.call(void 0, (key) => c.cookie[key].value, "getCookie"),
|
|
127
|
+
setCookie: /* @__PURE__ */ _chunkTVT62GIXjs.__name.call(void 0, (key, value, opts2 = {}) => c.cookie[key].set({
|
|
122
128
|
...opts2,
|
|
123
129
|
value
|
|
124
130
|
}), "setCookie"),
|
|
125
|
-
delCookie: /* @__PURE__ */
|
|
126
|
-
redirect: /* @__PURE__ */
|
|
127
|
-
setResHeaders: /* @__PURE__ */
|
|
128
|
-
setResStatus: /* @__PURE__ */
|
|
131
|
+
delCookie: /* @__PURE__ */ _chunkTVT62GIXjs.__name.call(void 0, (key) => c.cookie[key].remove(), "delCookie"),
|
|
132
|
+
redirect: /* @__PURE__ */ _chunkTVT62GIXjs.__name.call(void 0, (url) => c.redirect(url), "redirect"),
|
|
133
|
+
setResHeaders: /* @__PURE__ */ _chunkTVT62GIXjs.__name.call(void 0, (headers) => Object.assign(c.set.headers, headers), "setResHeaders"),
|
|
134
|
+
setResStatus: /* @__PURE__ */ _chunkTVT62GIXjs.__name.call(void 0, (status) => c.set.status = status, "setResStatus"),
|
|
135
|
+
getRequest: /* @__PURE__ */ _chunkTVT62GIXjs.__name.call(void 0, () => {
|
|
136
|
+
throw new Error("elysia can't support getRequest");
|
|
137
|
+
}, "getRequest"),
|
|
138
|
+
getResponse: /* @__PURE__ */ _chunkTVT62GIXjs.__name.call(void 0, () => {
|
|
139
|
+
throw new Error("elysia can't support getResponse");
|
|
140
|
+
}, "getResponse")
|
|
129
141
|
};
|
|
130
|
-
const context = new (0,
|
|
142
|
+
const context = new (0, _chunkDVTBLV6Ijs.Context)(contextData);
|
|
131
143
|
if (http.headers) c.set.headers = http.headers;
|
|
132
144
|
return context.run({
|
|
133
145
|
globalGuards,
|
|
@@ -143,13 +155,13 @@ function bind(app, data, opts = {}) {
|
|
|
143
155
|
}
|
|
144
156
|
}
|
|
145
157
|
}
|
|
146
|
-
|
|
158
|
+
_chunkTVT62GIXjs.__name.call(void 0, registerRoute, "registerRoute");
|
|
147
159
|
}
|
|
148
|
-
|
|
160
|
+
_chunkTVT62GIXjs.__name.call(void 0, bind, "bind");
|
|
149
161
|
function Elysia(opts) {
|
|
150
|
-
return
|
|
162
|
+
return _chunkJDV2XJYEjs.Define.call(void 0, "elysia", opts);
|
|
151
163
|
}
|
|
152
|
-
|
|
164
|
+
_chunkTVT62GIXjs.__name.call(void 0, Elysia, "Elysia");
|
|
153
165
|
|
|
154
166
|
|
|
155
167
|
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Define
|
|
3
|
-
} from "../../chunk-
|
|
3
|
+
} from "../../chunk-J7B24YSE.mjs";
|
|
4
4
|
import {
|
|
5
5
|
BadRequestException,
|
|
6
6
|
Context,
|
|
7
7
|
argToReq,
|
|
8
8
|
createControllerMetaMap,
|
|
9
9
|
detectAopDep
|
|
10
|
-
} from "../../chunk-
|
|
10
|
+
} from "../../chunk-2CFYUXPM.mjs";
|
|
11
11
|
import {
|
|
12
12
|
__name
|
|
13
|
-
} from "../../chunk-
|
|
13
|
+
} from "../../chunk-G7TD2VB7.mjs";
|
|
14
14
|
|
|
15
15
|
// src/server/elysia/bind.ts
|
|
16
16
|
import Debug from "debug";
|
|
@@ -77,7 +77,13 @@ function bind(app, data, opts = {}) {
|
|
|
77
77
|
delCookie: /* @__PURE__ */ __name((key) => c.cookie[key].remove(), "delCookie"),
|
|
78
78
|
redirect: /* @__PURE__ */ __name((url) => c.redirect(url), "redirect"),
|
|
79
79
|
setResHeaders: /* @__PURE__ */ __name((headers) => Object.assign(c.set.headers, headers), "setResHeaders"),
|
|
80
|
-
setResStatus: /* @__PURE__ */ __name((status) => c.set.status = status, "setResStatus")
|
|
80
|
+
setResStatus: /* @__PURE__ */ __name((status) => c.set.status = status, "setResStatus"),
|
|
81
|
+
getRequest: /* @__PURE__ */ __name(() => {
|
|
82
|
+
throw new Error("elysia can't support getRequest");
|
|
83
|
+
}, "getRequest"),
|
|
84
|
+
getResponse: /* @__PURE__ */ __name(() => {
|
|
85
|
+
throw new Error("elysia can't support getResponse");
|
|
86
|
+
}, "getResponse")
|
|
81
87
|
};
|
|
82
88
|
const context = new Context(contextData);
|
|
83
89
|
context.run({
|
|
@@ -125,7 +131,13 @@ function bind(app, data, opts = {}) {
|
|
|
125
131
|
delCookie: /* @__PURE__ */ __name((key) => c.cookie[key].remove(), "delCookie"),
|
|
126
132
|
redirect: /* @__PURE__ */ __name((url) => c.redirect(url), "redirect"),
|
|
127
133
|
setResHeaders: /* @__PURE__ */ __name((headers) => Object.assign(c.set.headers, headers), "setResHeaders"),
|
|
128
|
-
setResStatus: /* @__PURE__ */ __name((status) => c.set.status = status, "setResStatus")
|
|
134
|
+
setResStatus: /* @__PURE__ */ __name((status) => c.set.status = status, "setResStatus"),
|
|
135
|
+
getRequest: /* @__PURE__ */ __name(() => {
|
|
136
|
+
throw new Error("elysia can't support getRequest");
|
|
137
|
+
}, "getRequest"),
|
|
138
|
+
getResponse: /* @__PURE__ */ __name(() => {
|
|
139
|
+
throw new Error("elysia can't support getResponse");
|
|
140
|
+
}, "getResponse")
|
|
129
141
|
};
|
|
130
142
|
const context = new Context(contextData);
|
|
131
143
|
if (http.headers) c.set.headers = http.headers;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Request, Response, Router, RequestHandler } from 'express';
|
|
2
|
-
import { H as HttpContext, a as HttpOptions } from '../../types-
|
|
3
|
-
import { F as Factory } from '../../core-
|
|
2
|
+
import { H as HttpContext, a as HttpOptions } from '../../types-BvD3B5Ny.mjs';
|
|
3
|
+
import { F as Factory } from '../../core-P1CsH6jz.mjs';
|
|
4
4
|
import 'node:http';
|
|
5
|
-
import '../../
|
|
5
|
+
import '../../meta-KtfiBIde.mjs';
|
|
6
6
|
import 'phecda-core';
|
|
7
7
|
|
|
8
8
|
interface ExpressCtx extends HttpContext {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Request, Response, Router, RequestHandler } from 'express';
|
|
2
|
-
import { H as HttpContext, a as HttpOptions } from '../../types-
|
|
3
|
-
import { F as Factory } from '../../core-
|
|
2
|
+
import { H as HttpContext, a as HttpOptions } from '../../types-DIw7B6Up.js';
|
|
3
|
+
import { F as Factory } from '../../core-BlN0Spy9.js';
|
|
4
4
|
import 'node:http';
|
|
5
|
-
import '../../
|
|
5
|
+
import '../../meta-KtfiBIde.js';
|
|
6
6
|
import 'phecda-core';
|
|
7
7
|
|
|
8
8
|
interface ExpressCtx extends HttpContext {
|
|
@@ -5,10 +5,10 @@
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var
|
|
8
|
+
var _chunkDVTBLV6Ijs = require('../../chunk-DVTBLV6I.js');
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
var
|
|
11
|
+
var _chunkTVT62GIXjs = require('../../chunk-TVT62GIX.js');
|
|
12
12
|
|
|
13
13
|
// src/server/express/bind.ts
|
|
14
14
|
var _debug = require('debug'); var _debug2 = _interopRequireDefault(_debug);
|
|
@@ -17,14 +17,14 @@ function bind(router, data, opts = {}) {
|
|
|
17
17
|
const { globalGuards, globalInterceptors, parallelRoute = "/__PHECDA_SERVER__", globalPlugins = [], parallelPlugins = [], globalFilter, globalPipe } = opts;
|
|
18
18
|
const { moduleMap, meta } = data;
|
|
19
19
|
const originStack = router.stack.slice(0, router.stack.length);
|
|
20
|
-
const metaMap =
|
|
20
|
+
const metaMap = _chunkDVTBLV6Ijs.createControllerMetaMap.call(void 0, meta, (meta2) => {
|
|
21
21
|
const { controller, http, func, tag } = meta2.data;
|
|
22
22
|
if (controller === "http" && _optionalChain([http, 'optionalAccess', _ => _.type])) {
|
|
23
23
|
debug(`register method "${func}" in module "${tag}"`);
|
|
24
24
|
return true;
|
|
25
25
|
}
|
|
26
26
|
});
|
|
27
|
-
|
|
27
|
+
_chunkDVTBLV6Ijs.detectAopDep.call(void 0, meta, {
|
|
28
28
|
plugins: [
|
|
29
29
|
...globalPlugins,
|
|
30
30
|
...parallelPlugins
|
|
@@ -33,29 +33,29 @@ function bind(router, data, opts = {}) {
|
|
|
33
33
|
interceptors: globalInterceptors
|
|
34
34
|
});
|
|
35
35
|
registerRoute();
|
|
36
|
-
|
|
36
|
+
_chunkDVTBLV6Ijs.HMR.call(void 0, async () => {
|
|
37
37
|
router.stack = originStack;
|
|
38
38
|
registerRoute();
|
|
39
39
|
});
|
|
40
40
|
async function registerRoute() {
|
|
41
|
-
|
|
41
|
+
_chunkDVTBLV6Ijs.Context.usePlugin(globalPlugins, "express").forEach((p) => router.use(p));
|
|
42
42
|
if (parallelRoute) {
|
|
43
|
-
router.post(parallelRoute, ...
|
|
43
|
+
router.post(parallelRoute, ..._chunkDVTBLV6Ijs.Context.usePlugin(parallelPlugins, "express"), async (req, res, next) => {
|
|
44
44
|
const { body } = req;
|
|
45
45
|
async function errorHandler(e) {
|
|
46
|
-
const error = await
|
|
46
|
+
const error = await _chunkDVTBLV6Ijs.Context.filterRecord.default(e);
|
|
47
47
|
return res.status(error.status).json(error);
|
|
48
48
|
}
|
|
49
|
-
|
|
50
|
-
if (!Array.isArray(body)) return errorHandler(new (0,
|
|
49
|
+
_chunkTVT62GIXjs.__name.call(void 0, errorHandler, "errorHandler");
|
|
50
|
+
if (!Array.isArray(body)) return errorHandler(new (0, _chunkDVTBLV6Ijs.BadRequestException)("data format should be an array"));
|
|
51
51
|
try {
|
|
52
52
|
return Promise.all(body.map((item, i) => {
|
|
53
53
|
return new Promise(async (resolve) => {
|
|
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 _chunkDVTBLV6Ijs.Context.filterRecord.default(new (0, _chunkDVTBLV6Ijs.BadRequestException)(`module "${tag}" doesn't exist`)));
|
|
57
57
|
const meta2 = metaMap.get(tag)[func];
|
|
58
|
-
if (!meta2) return resolve(await
|
|
58
|
+
if (!meta2) return resolve(await _chunkDVTBLV6Ijs.Context.filterRecord.default(new (0, _chunkDVTBLV6Ijs.BadRequestException)(`"${func}" in "${tag}" doesn't exist`)));
|
|
59
59
|
const { data: { params } } = meta2;
|
|
60
60
|
const contextData = {
|
|
61
61
|
type: "express",
|
|
@@ -69,17 +69,19 @@ function bind(router, data, opts = {}) {
|
|
|
69
69
|
func,
|
|
70
70
|
next,
|
|
71
71
|
app: router,
|
|
72
|
-
...
|
|
73
|
-
getCookie: /* @__PURE__ */
|
|
74
|
-
setCookie: /* @__PURE__ */
|
|
75
|
-
delCookie: /* @__PURE__ */
|
|
72
|
+
..._chunkDVTBLV6Ijs.argToReq.call(void 0, params, item.args, req.headers),
|
|
73
|
+
getCookie: /* @__PURE__ */ _chunkTVT62GIXjs.__name.call(void 0, (key) => req.cookies[key], "getCookie"),
|
|
74
|
+
setCookie: /* @__PURE__ */ _chunkTVT62GIXjs.__name.call(void 0, (key, value, opts2) => res.cookie(key, value, opts2 || {}), "setCookie"),
|
|
75
|
+
delCookie: /* @__PURE__ */ _chunkTVT62GIXjs.__name.call(void 0, (key) => res.cookie(key, "", {
|
|
76
76
|
expires: /* @__PURE__ */ new Date(0)
|
|
77
77
|
}), "delCookie"),
|
|
78
|
-
redirect: /* @__PURE__ */
|
|
79
|
-
setResHeaders: /* @__PURE__ */
|
|
80
|
-
setResStatus: /* @__PURE__ */
|
|
78
|
+
redirect: /* @__PURE__ */ _chunkTVT62GIXjs.__name.call(void 0, (url, status) => status ? res.redirect(status, url) : res.redirect(url), "redirect"),
|
|
79
|
+
setResHeaders: /* @__PURE__ */ _chunkTVT62GIXjs.__name.call(void 0, (headers) => res.set(headers), "setResHeaders"),
|
|
80
|
+
setResStatus: /* @__PURE__ */ _chunkTVT62GIXjs.__name.call(void 0, (code) => res.status(code), "setResStatus"),
|
|
81
|
+
getRequest: /* @__PURE__ */ _chunkTVT62GIXjs.__name.call(void 0, () => req, "getRequest"),
|
|
82
|
+
getResponse: /* @__PURE__ */ _chunkTVT62GIXjs.__name.call(void 0, () => res, "getResponse")
|
|
81
83
|
};
|
|
82
|
-
const context = new (0,
|
|
84
|
+
const context = new (0, _chunkDVTBLV6Ijs.Context)(contextData);
|
|
83
85
|
context.run({
|
|
84
86
|
globalGuards,
|
|
85
87
|
globalInterceptors,
|
|
@@ -100,7 +102,7 @@ function bind(router, data, opts = {}) {
|
|
|
100
102
|
const meta2 = metaMap.get(tag)[func];
|
|
101
103
|
const { data: { plugins, http } } = meta2;
|
|
102
104
|
if (!_optionalChain([http, 'optionalAccess', _2 => _2.type])) continue;
|
|
103
|
-
router[http.type](http.prefix + http.route, ...
|
|
105
|
+
router[http.type](http.prefix + http.route, ..._chunkDVTBLV6Ijs.Context.usePlugin(plugins, "express"), async (req, res, next) => {
|
|
104
106
|
debug(`invoke method "${func}" in module "${tag}"`);
|
|
105
107
|
const contextData = {
|
|
106
108
|
type: "express",
|
|
@@ -116,16 +118,18 @@ function bind(router, data, opts = {}) {
|
|
|
116
118
|
headers: req.headers,
|
|
117
119
|
app: router,
|
|
118
120
|
next,
|
|
119
|
-
getCookie: /* @__PURE__ */
|
|
120
|
-
setCookie: /* @__PURE__ */
|
|
121
|
-
delCookie: /* @__PURE__ */
|
|
121
|
+
getCookie: /* @__PURE__ */ _chunkTVT62GIXjs.__name.call(void 0, (key) => req.cookies[key], "getCookie"),
|
|
122
|
+
setCookie: /* @__PURE__ */ _chunkTVT62GIXjs.__name.call(void 0, (key, value, opts2) => res.cookie(key, value, opts2 || {}), "setCookie"),
|
|
123
|
+
delCookie: /* @__PURE__ */ _chunkTVT62GIXjs.__name.call(void 0, (key) => res.cookie(key, "", {
|
|
122
124
|
expires: /* @__PURE__ */ new Date(0)
|
|
123
125
|
}), "delCookie"),
|
|
124
|
-
redirect: /* @__PURE__ */
|
|
125
|
-
setResHeaders: /* @__PURE__ */
|
|
126
|
-
setResStatus: /* @__PURE__ */
|
|
126
|
+
redirect: /* @__PURE__ */ _chunkTVT62GIXjs.__name.call(void 0, (url, status) => status ? res.redirect(status, url) : res.redirect(url), "redirect"),
|
|
127
|
+
setResHeaders: /* @__PURE__ */ _chunkTVT62GIXjs.__name.call(void 0, (headers) => res.set(headers), "setResHeaders"),
|
|
128
|
+
setResStatus: /* @__PURE__ */ _chunkTVT62GIXjs.__name.call(void 0, (code) => res.status(code), "setResStatus"),
|
|
129
|
+
getRequest: /* @__PURE__ */ _chunkTVT62GIXjs.__name.call(void 0, () => req, "getRequest"),
|
|
130
|
+
getResponse: /* @__PURE__ */ _chunkTVT62GIXjs.__name.call(void 0, () => res, "getResponse")
|
|
127
131
|
};
|
|
128
|
-
const context = new (0,
|
|
132
|
+
const context = new (0, _chunkDVTBLV6Ijs.Context)(contextData);
|
|
129
133
|
if (http.headers) res.set(http.headers);
|
|
130
134
|
await context.run({
|
|
131
135
|
globalGuards,
|
|
@@ -144,9 +148,9 @@ function bind(router, data, opts = {}) {
|
|
|
144
148
|
}
|
|
145
149
|
}
|
|
146
150
|
}
|
|
147
|
-
|
|
151
|
+
_chunkTVT62GIXjs.__name.call(void 0, registerRoute, "registerRoute");
|
|
148
152
|
}
|
|
149
|
-
|
|
153
|
+
_chunkTVT62GIXjs.__name.call(void 0, bind, "bind");
|
|
150
154
|
|
|
151
155
|
|
|
152
156
|
exports.bind = bind;
|
|
@@ -5,10 +5,10 @@ import {
|
|
|
5
5
|
argToReq,
|
|
6
6
|
createControllerMetaMap,
|
|
7
7
|
detectAopDep
|
|
8
|
-
} from "../../chunk-
|
|
8
|
+
} from "../../chunk-2CFYUXPM.mjs";
|
|
9
9
|
import {
|
|
10
10
|
__name
|
|
11
|
-
} from "../../chunk-
|
|
11
|
+
} from "../../chunk-G7TD2VB7.mjs";
|
|
12
12
|
|
|
13
13
|
// src/server/express/bind.ts
|
|
14
14
|
import Debug from "debug";
|
|
@@ -77,7 +77,9 @@ function bind(router, data, opts = {}) {
|
|
|
77
77
|
}), "delCookie"),
|
|
78
78
|
redirect: /* @__PURE__ */ __name((url, status) => status ? res.redirect(status, url) : res.redirect(url), "redirect"),
|
|
79
79
|
setResHeaders: /* @__PURE__ */ __name((headers) => res.set(headers), "setResHeaders"),
|
|
80
|
-
setResStatus: /* @__PURE__ */ __name((code) => res.status(code), "setResStatus")
|
|
80
|
+
setResStatus: /* @__PURE__ */ __name((code) => res.status(code), "setResStatus"),
|
|
81
|
+
getRequest: /* @__PURE__ */ __name(() => req, "getRequest"),
|
|
82
|
+
getResponse: /* @__PURE__ */ __name(() => res, "getResponse")
|
|
81
83
|
};
|
|
82
84
|
const context = new Context(contextData);
|
|
83
85
|
context.run({
|
|
@@ -123,7 +125,9 @@ function bind(router, data, opts = {}) {
|
|
|
123
125
|
}), "delCookie"),
|
|
124
126
|
redirect: /* @__PURE__ */ __name((url, status) => status ? res.redirect(status, url) : res.redirect(url), "redirect"),
|
|
125
127
|
setResHeaders: /* @__PURE__ */ __name((headers) => res.set(headers), "setResHeaders"),
|
|
126
|
-
setResStatus: /* @__PURE__ */ __name((code) => res.status(code), "setResStatus")
|
|
128
|
+
setResStatus: /* @__PURE__ */ __name((code) => res.status(code), "setResStatus"),
|
|
129
|
+
getRequest: /* @__PURE__ */ __name(() => req, "getRequest"),
|
|
130
|
+
getResponse: /* @__PURE__ */ __name(() => res, "getResponse")
|
|
127
131
|
};
|
|
128
132
|
const context = new Context(contextData);
|
|
129
133
|
if (http.headers) res.set(http.headers);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { FastifyRequest, FastifyReply, FastifyInstance, FastifyPluginCallback, FastifyRegisterOptions, FastifyPluginOptions, RouteShorthandOptions } from 'fastify';
|
|
2
|
-
import { H as HttpContext, a as HttpOptions } from '../../types-
|
|
3
|
-
import { F as Factory } from '../../core-
|
|
2
|
+
import { H as HttpContext, a as HttpOptions } from '../../types-BvD3B5Ny.mjs';
|
|
3
|
+
import { F as Factory } from '../../core-P1CsH6jz.mjs';
|
|
4
4
|
import 'node:http';
|
|
5
|
-
import '../../
|
|
5
|
+
import '../../meta-KtfiBIde.mjs';
|
|
6
6
|
import 'phecda-core';
|
|
7
7
|
|
|
8
8
|
interface FastifyCtx extends HttpContext {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { FastifyRequest, FastifyReply, FastifyInstance, FastifyPluginCallback, FastifyRegisterOptions, FastifyPluginOptions, RouteShorthandOptions } from 'fastify';
|
|
2
|
-
import { H as HttpContext, a as HttpOptions } from '../../types-
|
|
3
|
-
import { F as Factory } from '../../core-
|
|
2
|
+
import { H as HttpContext, a as HttpOptions } from '../../types-DIw7B6Up.js';
|
|
3
|
+
import { F as Factory } from '../../core-BlN0Spy9.js';
|
|
4
4
|
import 'node:http';
|
|
5
|
-
import '../../
|
|
5
|
+
import '../../meta-KtfiBIde.js';
|
|
6
6
|
import 'phecda-core';
|
|
7
7
|
|
|
8
8
|
interface FastifyCtx extends HttpContext {
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkJDV2XJYEjs = require('../../chunk-JDV2XJYE.js');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _chunkDVTBLV6Ijs = require('../../chunk-DVTBLV6I.js');
|
|
11
11
|
|
|
12
12
|
|
|
13
|
-
var
|
|
13
|
+
var _chunkTVT62GIXjs = require('../../chunk-TVT62GIX.js');
|
|
14
14
|
|
|
15
15
|
// src/server/fastify/bind.ts
|
|
16
16
|
var _debug = require('debug'); var _debug2 = _interopRequireDefault(_debug);
|
|
@@ -18,14 +18,14 @@ var debug = _debug2.default.call(void 0, "phecda-server/fastify");
|
|
|
18
18
|
function bind(fastify, data, opts = {}) {
|
|
19
19
|
const { globalGuards, globalInterceptors, parallelRoute = "/__PHECDA_SERVER__", globalPlugins = [], parallelPlugins = [], globalFilter, globalPipe, fastifyOpts } = opts;
|
|
20
20
|
const { moduleMap, meta } = data;
|
|
21
|
-
const metaMap =
|
|
21
|
+
const metaMap = _chunkDVTBLV6Ijs.createControllerMetaMap.call(void 0, meta, (meta2) => {
|
|
22
22
|
const { controller, http, func, tag } = meta2.data;
|
|
23
23
|
if (controller === "http" && _optionalChain([http, 'optionalAccess', _2 => _2.type])) {
|
|
24
24
|
debug(`register method "${func}" in module "${tag}"`);
|
|
25
25
|
return true;
|
|
26
26
|
}
|
|
27
27
|
});
|
|
28
|
-
|
|
28
|
+
_chunkDVTBLV6Ijs.detectAopDep.call(void 0, meta, {
|
|
29
29
|
plugins: [
|
|
30
30
|
...globalPlugins,
|
|
31
31
|
...parallelPlugins
|
|
@@ -34,12 +34,12 @@ function bind(fastify, data, opts = {}) {
|
|
|
34
34
|
interceptors: globalInterceptors
|
|
35
35
|
});
|
|
36
36
|
fastify.register((fastify2, _, done) => {
|
|
37
|
-
|
|
37
|
+
_chunkDVTBLV6Ijs.Context.usePlugin(globalPlugins, "fastify").forEach((p) => {
|
|
38
38
|
p[Symbol.for("skip-override")] = true;
|
|
39
39
|
fastify2.register(p);
|
|
40
40
|
});
|
|
41
41
|
fastify2.register((fastify3, _opts, done2) => {
|
|
42
|
-
|
|
42
|
+
_chunkDVTBLV6Ijs.Context.usePlugin(parallelPlugins, "fastify").forEach((p) => {
|
|
43
43
|
p[Symbol.for("skip-override")] = true;
|
|
44
44
|
fastify3.register(p);
|
|
45
45
|
});
|
|
@@ -47,19 +47,19 @@ function bind(fastify, data, opts = {}) {
|
|
|
47
47
|
fastify3.post(parallelRoute, async (req, res) => {
|
|
48
48
|
const { body } = req;
|
|
49
49
|
async function errorHandler(e) {
|
|
50
|
-
const error = await
|
|
50
|
+
const error = await _chunkDVTBLV6Ijs.Context.filterRecord.default(e);
|
|
51
51
|
return res.status(error.status).send(error);
|
|
52
52
|
}
|
|
53
|
-
|
|
54
|
-
if (!Array.isArray(body)) return errorHandler(new (0,
|
|
53
|
+
_chunkTVT62GIXjs.__name.call(void 0, errorHandler, "errorHandler");
|
|
54
|
+
if (!Array.isArray(body)) return errorHandler(new (0, _chunkDVTBLV6Ijs.BadRequestException)("data format should be an array"));
|
|
55
55
|
try {
|
|
56
56
|
return Promise.all(body.map((item, i) => {
|
|
57
57
|
return new Promise(async (resolve) => {
|
|
58
58
|
const { tag, func } = item;
|
|
59
59
|
debug(`(parallel)invoke method "${func}" in module "${tag}"`);
|
|
60
|
-
if (!metaMap.has(tag)) return resolve(await
|
|
60
|
+
if (!metaMap.has(tag)) return resolve(await _chunkDVTBLV6Ijs.Context.filterRecord.default(new (0, _chunkDVTBLV6Ijs.BadRequestException)(`module "${tag}" doesn't exist`)));
|
|
61
61
|
const meta2 = metaMap.get(tag)[func];
|
|
62
|
-
if (!meta2) return resolve(await
|
|
62
|
+
if (!meta2) return resolve(await _chunkDVTBLV6Ijs.Context.filterRecord.default(new (0, _chunkDVTBLV6Ijs.BadRequestException)(`"${func}" in "${tag}" doesn't exist`)));
|
|
63
63
|
const { data: { params } } = meta2;
|
|
64
64
|
const contextData = {
|
|
65
65
|
type: "fastify",
|
|
@@ -72,18 +72,20 @@ function bind(fastify, data, opts = {}) {
|
|
|
72
72
|
tag,
|
|
73
73
|
func,
|
|
74
74
|
app: fastify3,
|
|
75
|
-
...
|
|
75
|
+
..._chunkDVTBLV6Ijs.argToReq.call(void 0, params, item.args, req.headers),
|
|
76
76
|
// @ts-expect-error need @fastify/cookie
|
|
77
|
-
getCookie: /* @__PURE__ */
|
|
77
|
+
getCookie: /* @__PURE__ */ _chunkTVT62GIXjs.__name.call(void 0, (key) => req.cookies[key], "getCookie"),
|
|
78
78
|
// @ts-expect-error need @fastify/cookie
|
|
79
|
-
setCookie: /* @__PURE__ */
|
|
79
|
+
setCookie: /* @__PURE__ */ _chunkTVT62GIXjs.__name.call(void 0, (key, value, opts2) => res.setCookie(key, value, opts2), "setCookie"),
|
|
80
80
|
// @ts-expect-error need @fastify/cookie
|
|
81
|
-
delCookie: /* @__PURE__ */
|
|
82
|
-
redirect: /* @__PURE__ */
|
|
83
|
-
setResHeaders: /* @__PURE__ */
|
|
84
|
-
setResStatus: /* @__PURE__ */
|
|
81
|
+
delCookie: /* @__PURE__ */ _chunkTVT62GIXjs.__name.call(void 0, (key) => res.clearCookie(key), "delCookie"),
|
|
82
|
+
redirect: /* @__PURE__ */ _chunkTVT62GIXjs.__name.call(void 0, (url, status) => res.redirect(url, status), "redirect"),
|
|
83
|
+
setResHeaders: /* @__PURE__ */ _chunkTVT62GIXjs.__name.call(void 0, (headers) => res.headers(headers), "setResHeaders"),
|
|
84
|
+
setResStatus: /* @__PURE__ */ _chunkTVT62GIXjs.__name.call(void 0, (code) => res.status(code), "setResStatus"),
|
|
85
|
+
getRequest: /* @__PURE__ */ _chunkTVT62GIXjs.__name.call(void 0, () => req, "getRequest"),
|
|
86
|
+
getResponse: /* @__PURE__ */ _chunkTVT62GIXjs.__name.call(void 0, () => res, "getResponse")
|
|
85
87
|
};
|
|
86
|
-
const context = new (0,
|
|
88
|
+
const context = new (0, _chunkDVTBLV6Ijs.Context)(contextData);
|
|
87
89
|
context.run({
|
|
88
90
|
globalGuards,
|
|
89
91
|
globalInterceptors,
|
|
@@ -107,7 +109,7 @@ function bind(fastify, data, opts = {}) {
|
|
|
107
109
|
const { data: { plugins, define, http } } = meta2;
|
|
108
110
|
if (!_optionalChain([http, 'optionalAccess', _3 => _3.type])) continue;
|
|
109
111
|
fastify2.register((fastify3, _opts, done2) => {
|
|
110
|
-
|
|
112
|
+
_chunkDVTBLV6Ijs.Context.usePlugin(plugins, "fastify").forEach((p) => {
|
|
111
113
|
p[Symbol.for("skip-override")] = true;
|
|
112
114
|
fastify3.register(p);
|
|
113
115
|
});
|
|
@@ -127,18 +129,20 @@ function bind(fastify, data, opts = {}) {
|
|
|
127
129
|
headers: req.headers,
|
|
128
130
|
app: fastify3,
|
|
129
131
|
// @ts-expect-error need @fastify/cookie
|
|
130
|
-
getCookie: /* @__PURE__ */
|
|
132
|
+
getCookie: /* @__PURE__ */ _chunkTVT62GIXjs.__name.call(void 0, (key) => req.cookies[key], "getCookie"),
|
|
131
133
|
// @ts-expect-error need @fastify/cookie
|
|
132
|
-
setCookie: /* @__PURE__ */
|
|
134
|
+
setCookie: /* @__PURE__ */ _chunkTVT62GIXjs.__name.call(void 0, (key, value, opts2) => res.setCookie(key, value, opts2), "setCookie"),
|
|
133
135
|
// @ts-expect-error need @fastify/cookie
|
|
134
|
-
delCookie: /* @__PURE__ */
|
|
136
|
+
delCookie: /* @__PURE__ */ _chunkTVT62GIXjs.__name.call(void 0, (key) => res.clearCookie(key, {
|
|
135
137
|
path: ""
|
|
136
138
|
}), "delCookie"),
|
|
137
|
-
redirect: /* @__PURE__ */
|
|
138
|
-
setResHeaders: /* @__PURE__ */
|
|
139
|
-
setResStatus: /* @__PURE__ */
|
|
139
|
+
redirect: /* @__PURE__ */ _chunkTVT62GIXjs.__name.call(void 0, (url, status) => res.redirect(url, status), "redirect"),
|
|
140
|
+
setResHeaders: /* @__PURE__ */ _chunkTVT62GIXjs.__name.call(void 0, (headers) => res.headers(headers), "setResHeaders"),
|
|
141
|
+
setResStatus: /* @__PURE__ */ _chunkTVT62GIXjs.__name.call(void 0, (code) => res.status(code), "setResStatus"),
|
|
142
|
+
getRequest: /* @__PURE__ */ _chunkTVT62GIXjs.__name.call(void 0, () => req, "getRequest"),
|
|
143
|
+
getResponse: /* @__PURE__ */ _chunkTVT62GIXjs.__name.call(void 0, () => res, "getResponse")
|
|
140
144
|
};
|
|
141
|
-
const context = new (0,
|
|
145
|
+
const context = new (0, _chunkDVTBLV6Ijs.Context)(contextData);
|
|
142
146
|
if (http.headers) res.headers(http.headers);
|
|
143
147
|
return context.run({
|
|
144
148
|
globalGuards,
|
|
@@ -160,11 +164,11 @@ function bind(fastify, data, opts = {}) {
|
|
|
160
164
|
done();
|
|
161
165
|
}, fastifyOpts);
|
|
162
166
|
}
|
|
163
|
-
|
|
167
|
+
_chunkTVT62GIXjs.__name.call(void 0, bind, "bind");
|
|
164
168
|
function Fastify(opts) {
|
|
165
|
-
return
|
|
169
|
+
return _chunkJDV2XJYEjs.Define.call(void 0, "fastify", opts);
|
|
166
170
|
}
|
|
167
|
-
|
|
171
|
+
_chunkTVT62GIXjs.__name.call(void 0, Fastify, "Fastify");
|
|
168
172
|
|
|
169
173
|
|
|
170
174
|
|