phecda-server 7.0.0-alpha.8 → 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/dist/{chunk-VSGYTGHY.js → chunk-5RBTN33A.js} +22 -2
- package/dist/{chunk-B45BN7LY.mjs → chunk-7ZGYJ5OW.mjs} +88 -54
- package/dist/{chunk-SGMQZRP6.mjs → chunk-CVPZWDXU.mjs} +2 -23
- package/dist/{chunk-7EMAZGYO.js → chunk-FX3LDQII.js} +59 -80
- package/dist/{chunk-YKP4ODZA.mjs → chunk-FXTJ3BJ6.mjs} +23 -3
- package/dist/{chunk-QJIAXSLZ.js → chunk-KJUD2BKE.js} +103 -69
- package/dist/{chunk-7NWDKK7D.mjs → chunk-ODVWOXVB.mjs} +1 -1
- package/dist/{chunk-BBNJVYVX.js → chunk-V5EYXVJT.js} +24 -24
- package/dist/{core-BcKywWLd.d.mts → core-BDkhrEyf.d.mts} +4 -3
- package/dist/{core-BGEsBtTG.d.ts → core-D_cz0tKa.d.ts} +4 -3
- package/dist/helper.d.mts +6 -5
- package/dist/helper.d.ts +6 -5
- package/dist/helper.js +6 -3
- package/dist/helper.mjs +8 -5
- package/dist/http/elysia/index.d.mts +3 -3
- package/dist/http/elysia/index.d.ts +3 -3
- package/dist/http/elysia/index.js +41 -45
- package/dist/http/elysia/index.mjs +4 -8
- package/dist/http/express/index.d.mts +3 -3
- package/dist/http/express/index.d.ts +3 -3
- package/dist/http/express/index.js +38 -42
- package/dist/http/express/index.mjs +4 -8
- package/dist/http/fastify/index.d.mts +3 -3
- package/dist/http/fastify/index.d.ts +3 -3
- package/dist/http/fastify/index.js +39 -43
- package/dist/http/fastify/index.mjs +4 -8
- package/dist/http/h3/index.d.mts +3 -3
- package/dist/http/h3/index.d.ts +3 -3
- package/dist/http/h3/index.js +39 -43
- package/dist/http/h3/index.mjs +3 -7
- package/dist/http/hono/index.d.mts +3 -3
- package/dist/http/hono/index.d.ts +3 -3
- package/dist/http/hono/index.js +35 -39
- package/dist/http/hono/index.mjs +3 -7
- package/dist/http/hyper-express/index.d.mts +3 -3
- package/dist/http/hyper-express/index.d.ts +3 -3
- package/dist/http/hyper-express/index.js +36 -40
- package/dist/http/hyper-express/index.mjs +3 -7
- package/dist/http/koa/index.d.mts +3 -3
- package/dist/http/koa/index.d.ts +3 -3
- package/dist/http/koa/index.js +38 -42
- package/dist/http/koa/index.mjs +4 -8
- package/dist/index.d.mts +8 -8
- package/dist/index.d.ts +8 -8
- package/dist/index.js +40 -42
- package/dist/index.mjs +4 -6
- package/dist/{meta-B_HW7cWh.d.mts → meta-BX5jhe4Z.d.mts} +1 -2
- package/dist/{meta-B_HW7cWh.d.ts → meta-BX5jhe4Z.d.ts} +1 -2
- package/dist/rpc/bullmq/index.d.mts +3 -3
- package/dist/rpc/bullmq/index.d.ts +3 -3
- package/dist/rpc/bullmq/index.js +14 -14
- package/dist/rpc/bullmq/index.mjs +3 -3
- package/dist/rpc/kafka/index.d.mts +3 -3
- package/dist/rpc/kafka/index.d.ts +3 -3
- package/dist/rpc/kafka/index.js +14 -14
- 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 +13 -13
- package/dist/rpc/nats/index.mjs +3 -3
- package/dist/rpc/rabbitmq/index.d.mts +3 -3
- package/dist/rpc/rabbitmq/index.d.ts +3 -3
- package/dist/rpc/rabbitmq/index.js +15 -15
- package/dist/rpc/rabbitmq/index.mjs +3 -3
- package/dist/rpc/redis/index.d.mts +3 -3
- package/dist/rpc/redis/index.d.ts +3 -3
- 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-DEQb_e59.d.mts → types-B-rUM9Fm.d.mts} +1 -1
- package/dist/{types-PFPIQWVF.d.ts → types-CMeuFoyd.d.ts} +1 -1
- package/dist/{types-C2SQ9U9V.d.mts → types-DKVhyZk_.d.mts} +1 -1
- package/dist/{types-CYF0vha6.d.ts → types-MxxtkZXw.d.ts} +1 -1
- package/package.json +1 -1
- package/register/index.mjs +20 -11
- package/register/loader.mjs +12 -27
package/dist/http/hono/index.js
CHANGED
|
@@ -3,11 +3,10 @@
|
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
|
|
6
|
+
var _chunkFX3LDQIIjs = require('../../chunk-FX3LDQII.js');
|
|
6
7
|
|
|
7
|
-
var _chunk7EMAZGYOjs = require('../../chunk-7EMAZGYO.js');
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
var _chunkVSGYTGHYjs = require('../../chunk-VSGYTGHY.js');
|
|
9
|
+
var _chunk5RBTN33Ajs = require('../../chunk-5RBTN33A.js');
|
|
11
10
|
|
|
12
11
|
// src/http/hono/bind.ts
|
|
13
12
|
var _debug = require('debug'); var _debug2 = _interopRequireDefault(_debug);
|
|
@@ -17,14 +16,14 @@ var debug = _debug2.default.call(void 0, "phecda-server/hono");
|
|
|
17
16
|
function bind(router, data, opts = {}) {
|
|
18
17
|
const { globalGuards, parallelRoute = "/__PHECDA_SERVER__", globalAddons = [], parallelAddons = [], globalFilter, globalPipe, dynamic = false } = opts;
|
|
19
18
|
const { moduleMap, meta } = data;
|
|
20
|
-
const metaMap =
|
|
19
|
+
const metaMap = _chunkFX3LDQIIjs.createControllerMetaMap.call(void 0, meta, (meta2) => {
|
|
21
20
|
const { controller, http, func, tag } = meta2.data;
|
|
22
21
|
if (controller === "http" && _optionalChain([http, 'optionalAccess', _ => _.type])) {
|
|
23
22
|
debug(`register method "${func}" in module "${tag}"`);
|
|
24
23
|
return true;
|
|
25
24
|
}
|
|
26
25
|
});
|
|
27
|
-
|
|
26
|
+
_chunkFX3LDQIIjs.detectAopDep.call(void 0, meta, {
|
|
28
27
|
addons: [
|
|
29
28
|
...globalAddons,
|
|
30
29
|
...parallelAddons
|
|
@@ -35,26 +34,25 @@ function bind(router, data, opts = {}) {
|
|
|
35
34
|
function registerRoute() {
|
|
36
35
|
if (parallelRoute) {
|
|
37
36
|
const subApp = new (0, _hono.Hono)();
|
|
38
|
-
|
|
37
|
+
_chunkFX3LDQIIjs.Context.applyAddons(parallelAddons, subApp, "hono");
|
|
39
38
|
subApp.post("", async (c) => {
|
|
40
39
|
const body = await c.req.json();
|
|
41
40
|
async function errorHandler(e) {
|
|
42
|
-
const error = await
|
|
41
|
+
const error = await _chunkFX3LDQIIjs.Context.filterRecord.default(e);
|
|
43
42
|
c.status(error.status);
|
|
44
43
|
return c.json(error);
|
|
45
44
|
}
|
|
46
|
-
|
|
47
|
-
if (!Array.isArray(body)) return errorHandler(new (0,
|
|
45
|
+
_chunk5RBTN33Ajs.__name.call(void 0, errorHandler, "errorHandler");
|
|
46
|
+
if (!Array.isArray(body)) return errorHandler(new (0, _chunkFX3LDQIIjs.BadRequestException)("data format should be an array"));
|
|
48
47
|
try {
|
|
49
48
|
return Promise.all(body.map((item, i) => {
|
|
50
49
|
return new Promise(async (resolve) => {
|
|
51
50
|
const { tag, func } = item;
|
|
52
51
|
debug(`(parallel)invoke method "${func}" in module "${tag}"`);
|
|
53
|
-
if (!metaMap.has(tag)) return resolve(await
|
|
52
|
+
if (!metaMap.has(tag)) return resolve(await _chunkFX3LDQIIjs.Context.filterRecord.default(new (0, _chunkFX3LDQIIjs.BadRequestException)(`module "${tag}" doesn't exist`)));
|
|
54
53
|
const meta2 = metaMap.get(tag)[func];
|
|
55
|
-
if (!meta2) return resolve(await
|
|
56
|
-
const
|
|
57
|
-
const aop = _chunk7EMAZGYOjs.Context.getAop(meta2, {
|
|
54
|
+
if (!meta2) return resolve(await _chunkFX3LDQIIjs.Context.filterRecord.default(new (0, _chunkFX3LDQIIjs.BadRequestException)(`"${func}" in "${tag}" doesn't exist`)));
|
|
55
|
+
const aop = _chunkFX3LDQIIjs.Context.getAop(meta2, {
|
|
58
56
|
globalFilter,
|
|
59
57
|
globalGuards,
|
|
60
58
|
globalPipe
|
|
@@ -67,22 +65,20 @@ function bind(router, data, opts = {}) {
|
|
|
67
65
|
index: i,
|
|
68
66
|
meta: meta2,
|
|
69
67
|
moduleMap,
|
|
70
|
-
tag,
|
|
71
|
-
func,
|
|
72
68
|
app: router,
|
|
73
|
-
...
|
|
74
|
-
getCookie: /* @__PURE__ */
|
|
75
|
-
delCookie: /* @__PURE__ */
|
|
76
|
-
setCookie: /* @__PURE__ */
|
|
77
|
-
redirect: /* @__PURE__ */
|
|
78
|
-
setResHeaders: /* @__PURE__ */
|
|
69
|
+
...item,
|
|
70
|
+
getCookie: /* @__PURE__ */ _chunk5RBTN33Ajs.__name.call(void 0, (key) => _cookie.getCookie.call(void 0, c, key), "getCookie"),
|
|
71
|
+
delCookie: /* @__PURE__ */ _chunk5RBTN33Ajs.__name.call(void 0, (key) => _cookie.deleteCookie.call(void 0, c, key), "delCookie"),
|
|
72
|
+
setCookie: /* @__PURE__ */ _chunk5RBTN33Ajs.__name.call(void 0, (key, value, opts2) => _cookie.setCookie.call(void 0, c, key, value, opts2), "setCookie"),
|
|
73
|
+
redirect: /* @__PURE__ */ _chunk5RBTN33Ajs.__name.call(void 0, (url) => c.redirect(url), "redirect"),
|
|
74
|
+
setResHeaders: /* @__PURE__ */ _chunk5RBTN33Ajs.__name.call(void 0, (headers) => {
|
|
79
75
|
for (const name in headers) c.header(name, headers[name]);
|
|
80
76
|
}, "setResHeaders"),
|
|
81
|
-
setResStatus: /* @__PURE__ */
|
|
82
|
-
getRequest: /* @__PURE__ */
|
|
83
|
-
getResponse: /* @__PURE__ */
|
|
77
|
+
setResStatus: /* @__PURE__ */ _chunk5RBTN33Ajs.__name.call(void 0, (status) => c.status(status), "setResStatus"),
|
|
78
|
+
getRequest: /* @__PURE__ */ _chunk5RBTN33Ajs.__name.call(void 0, () => c.req.raw, "getRequest"),
|
|
79
|
+
getResponse: /* @__PURE__ */ _chunk5RBTN33Ajs.__name.call(void 0, () => c.res, "getResponse")
|
|
84
80
|
};
|
|
85
|
-
const context = new (0,
|
|
81
|
+
const context = new (0, _chunkFX3LDQIIjs.Context)(contextData);
|
|
86
82
|
context.run(aop, resolve, resolve);
|
|
87
83
|
});
|
|
88
84
|
})).then((ret) => {
|
|
@@ -102,14 +98,14 @@ function bind(router, data, opts = {}) {
|
|
|
102
98
|
const needBody = params.some((item) => item.type === "body");
|
|
103
99
|
let aop;
|
|
104
100
|
if (!dynamic) {
|
|
105
|
-
aop =
|
|
101
|
+
aop = _chunkFX3LDQIIjs.Context.getAop(meta2, {
|
|
106
102
|
globalFilter,
|
|
107
103
|
globalGuards,
|
|
108
104
|
globalPipe
|
|
109
105
|
});
|
|
110
106
|
}
|
|
111
107
|
const subApp = new (0, _hono.Hono)();
|
|
112
|
-
|
|
108
|
+
_chunkFX3LDQIIjs.Context.applyAddons(addons, subApp, "hono");
|
|
113
109
|
subApp[http.type](http.route, async (c) => {
|
|
114
110
|
debug(`invoke method "${func}" in module "${tag}"`);
|
|
115
111
|
const contextData = {
|
|
@@ -125,23 +121,23 @@ function bind(router, data, opts = {}) {
|
|
|
125
121
|
params: c.req.param(),
|
|
126
122
|
headers: c.req.header(),
|
|
127
123
|
app: router,
|
|
128
|
-
getCookie: /* @__PURE__ */
|
|
129
|
-
delCookie: /* @__PURE__ */
|
|
130
|
-
setCookie: /* @__PURE__ */
|
|
131
|
-
redirect: /* @__PURE__ */
|
|
132
|
-
setResHeaders: /* @__PURE__ */
|
|
124
|
+
getCookie: /* @__PURE__ */ _chunk5RBTN33Ajs.__name.call(void 0, (key) => _cookie.getCookie.call(void 0, c, key), "getCookie"),
|
|
125
|
+
delCookie: /* @__PURE__ */ _chunk5RBTN33Ajs.__name.call(void 0, (key) => _cookie.deleteCookie.call(void 0, c, key), "delCookie"),
|
|
126
|
+
setCookie: /* @__PURE__ */ _chunk5RBTN33Ajs.__name.call(void 0, (key, value, opts2) => _cookie.setCookie.call(void 0, c, key, value, opts2), "setCookie"),
|
|
127
|
+
redirect: /* @__PURE__ */ _chunk5RBTN33Ajs.__name.call(void 0, (url) => c.redirect(url), "redirect"),
|
|
128
|
+
setResHeaders: /* @__PURE__ */ _chunk5RBTN33Ajs.__name.call(void 0, (headers) => {
|
|
133
129
|
for (const name in headers) c.header(name, headers[name]);
|
|
134
130
|
}, "setResHeaders"),
|
|
135
|
-
setResStatus: /* @__PURE__ */
|
|
136
|
-
getRequest: /* @__PURE__ */
|
|
137
|
-
getResponse: /* @__PURE__ */
|
|
131
|
+
setResStatus: /* @__PURE__ */ _chunk5RBTN33Ajs.__name.call(void 0, (status) => c.status(status), "setResStatus"),
|
|
132
|
+
getRequest: /* @__PURE__ */ _chunk5RBTN33Ajs.__name.call(void 0, () => c.req.raw, "getRequest"),
|
|
133
|
+
getResponse: /* @__PURE__ */ _chunk5RBTN33Ajs.__name.call(void 0, () => c.res, "getResponse")
|
|
138
134
|
};
|
|
139
|
-
const context = new (0,
|
|
135
|
+
const context = new (0, _chunkFX3LDQIIjs.Context)(contextData);
|
|
140
136
|
if (http.headers) {
|
|
141
137
|
for (const name in http.headers) c.header(name, http.headers[name]);
|
|
142
138
|
}
|
|
143
139
|
if (dynamic) {
|
|
144
|
-
aop =
|
|
140
|
+
aop = _chunkFX3LDQIIjs.Context.getAop(meta2, {
|
|
145
141
|
globalFilter,
|
|
146
142
|
globalGuards,
|
|
147
143
|
globalPipe
|
|
@@ -160,9 +156,9 @@ function bind(router, data, opts = {}) {
|
|
|
160
156
|
}
|
|
161
157
|
}
|
|
162
158
|
}
|
|
163
|
-
|
|
159
|
+
_chunk5RBTN33Ajs.__name.call(void 0, registerRoute, "registerRoute");
|
|
164
160
|
}
|
|
165
|
-
|
|
161
|
+
_chunk5RBTN33Ajs.__name.call(void 0, bind, "bind");
|
|
166
162
|
|
|
167
163
|
|
|
168
164
|
exports.bind = bind;
|
package/dist/http/hono/index.mjs
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
BadRequestException,
|
|
3
3
|
Context,
|
|
4
|
-
argToReq,
|
|
5
4
|
createControllerMetaMap,
|
|
6
5
|
detectAopDep
|
|
7
|
-
} from "../../chunk-
|
|
6
|
+
} from "../../chunk-CVPZWDXU.mjs";
|
|
8
7
|
import {
|
|
9
8
|
__name
|
|
10
|
-
} from "../../chunk-
|
|
9
|
+
} from "../../chunk-FXTJ3BJ6.mjs";
|
|
11
10
|
|
|
12
11
|
// src/http/hono/bind.ts
|
|
13
12
|
import Debug from "debug";
|
|
@@ -53,7 +52,6 @@ function bind(router, data, opts = {}) {
|
|
|
53
52
|
if (!metaMap.has(tag)) return resolve(await Context.filterRecord.default(new BadRequestException(`module "${tag}" doesn't exist`)));
|
|
54
53
|
const meta2 = metaMap.get(tag)[func];
|
|
55
54
|
if (!meta2) return resolve(await Context.filterRecord.default(new BadRequestException(`"${func}" in "${tag}" doesn't exist`)));
|
|
56
|
-
const { data: { params } } = meta2;
|
|
57
55
|
const aop = Context.getAop(meta2, {
|
|
58
56
|
globalFilter,
|
|
59
57
|
globalGuards,
|
|
@@ -67,10 +65,8 @@ function bind(router, data, opts = {}) {
|
|
|
67
65
|
index: i,
|
|
68
66
|
meta: meta2,
|
|
69
67
|
moduleMap,
|
|
70
|
-
tag,
|
|
71
|
-
func,
|
|
72
68
|
app: router,
|
|
73
|
-
...
|
|
69
|
+
...item,
|
|
74
70
|
getCookie: /* @__PURE__ */ __name((key) => getCookie(c, key), "getCookie"),
|
|
75
71
|
delCookie: /* @__PURE__ */ __name((key) => deleteCookie(c, key), "delCookie"),
|
|
76
72
|
setCookie: /* @__PURE__ */ __name((key, value, opts2) => setCookie(c, key, value, opts2), "setCookie"),
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Request, Response, Router, MiddlewareHandler } from 'hyper-express';
|
|
2
|
-
import { H as HttpCtx, a as HttpOptions } from '../../types-
|
|
3
|
-
import { F as Factory } from '../../core-
|
|
2
|
+
import { H as HttpCtx, a as HttpOptions } from '../../types-DKVhyZk_.mjs';
|
|
3
|
+
import { F as Factory } from '../../core-BDkhrEyf.mjs';
|
|
4
4
|
import 'node:http';
|
|
5
|
-
import '../../meta-
|
|
5
|
+
import '../../meta-BX5jhe4Z.mjs';
|
|
6
6
|
import 'phecda-core';
|
|
7
7
|
|
|
8
8
|
interface HyperExpressCtx extends HttpCtx {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Request, Response, Router, MiddlewareHandler } from 'hyper-express';
|
|
2
|
-
import { H as HttpCtx, a as HttpOptions } from '../../types-
|
|
3
|
-
import { F as Factory } from '../../core-
|
|
2
|
+
import { H as HttpCtx, a as HttpOptions } from '../../types-CMeuFoyd.js';
|
|
3
|
+
import { F as Factory } from '../../core-D_cz0tKa.js';
|
|
4
4
|
import 'node:http';
|
|
5
|
-
import '../../meta-
|
|
5
|
+
import '../../meta-BX5jhe4Z.js';
|
|
6
6
|
import 'phecda-core';
|
|
7
7
|
|
|
8
8
|
interface HyperExpressCtx extends HttpCtx {
|
|
@@ -4,11 +4,10 @@
|
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
|
+
var _chunkFX3LDQIIjs = require('../../chunk-FX3LDQII.js');
|
|
7
8
|
|
|
8
|
-
var _chunk7EMAZGYOjs = require('../../chunk-7EMAZGYO.js');
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
var _chunkVSGYTGHYjs = require('../../chunk-VSGYTGHY.js');
|
|
10
|
+
var _chunk5RBTN33Ajs = require('../../chunk-5RBTN33A.js');
|
|
12
11
|
|
|
13
12
|
// src/http/hyper-express/bind.ts
|
|
14
13
|
var _hyperexpress = require('hyper-express');
|
|
@@ -17,14 +16,14 @@ var debug = _debug2.default.call(void 0, "phecda-server/hyper-express");
|
|
|
17
16
|
function bind(router, data, opts = {}) {
|
|
18
17
|
const { globalGuards, parallelRoute = "/__PHECDA_SERVER__", globalAddons = [], parallelAddons = [], globalFilter, globalPipe, dynamic = false } = opts;
|
|
19
18
|
const { moduleMap, meta } = data;
|
|
20
|
-
const metaMap =
|
|
19
|
+
const metaMap = _chunkFX3LDQIIjs.createControllerMetaMap.call(void 0, meta, (meta2) => {
|
|
21
20
|
const { controller, http, func, tag } = meta2.data;
|
|
22
21
|
if (controller === "http" && _optionalChain([http, 'optionalAccess', _ => _.type])) {
|
|
23
22
|
debug(`register method "${func}" in module "${tag}"`);
|
|
24
23
|
return true;
|
|
25
24
|
}
|
|
26
25
|
});
|
|
27
|
-
|
|
26
|
+
_chunkFX3LDQIIjs.detectAopDep.call(void 0, meta, {
|
|
28
27
|
addons: [
|
|
29
28
|
...globalAddons,
|
|
30
29
|
...parallelAddons
|
|
@@ -33,27 +32,26 @@ function bind(router, data, opts = {}) {
|
|
|
33
32
|
});
|
|
34
33
|
registerRoute();
|
|
35
34
|
async function registerRoute() {
|
|
36
|
-
|
|
35
|
+
_chunkFX3LDQIIjs.Context.applyAddons(globalAddons, router, "hyper-express");
|
|
37
36
|
if (parallelRoute) {
|
|
38
37
|
const subRouter = new (0, _hyperexpress.Router)();
|
|
39
38
|
subRouter.post(parallelRoute, async (req, res, next) => {
|
|
40
39
|
const body = await req.json();
|
|
41
40
|
async function errorHandler(e) {
|
|
42
|
-
const error = await
|
|
41
|
+
const error = await _chunkFX3LDQIIjs.Context.filterRecord.default(e);
|
|
43
42
|
return res.status(error.status).json(error);
|
|
44
43
|
}
|
|
45
|
-
|
|
46
|
-
if (!Array.isArray(body)) return errorHandler(new (0,
|
|
44
|
+
_chunk5RBTN33Ajs.__name.call(void 0, errorHandler, "errorHandler");
|
|
45
|
+
if (!Array.isArray(body)) return errorHandler(new (0, _chunkFX3LDQIIjs.BadRequestException)("data format should be an array"));
|
|
47
46
|
try {
|
|
48
47
|
return Promise.all(body.map((item, i) => {
|
|
49
48
|
return new Promise(async (resolve) => {
|
|
50
49
|
const { tag, func } = item;
|
|
51
50
|
debug(`(parallel)invoke method "${func}" in module "${tag}"`);
|
|
52
|
-
if (!metaMap.has(tag)) return resolve(await
|
|
51
|
+
if (!metaMap.has(tag)) return resolve(await _chunkFX3LDQIIjs.Context.filterRecord.default(new (0, _chunkFX3LDQIIjs.BadRequestException)(`module "${tag}" doesn't exist`)));
|
|
53
52
|
const meta2 = metaMap.get(tag)[func];
|
|
54
|
-
if (!meta2) return resolve(await
|
|
55
|
-
const
|
|
56
|
-
const aop = _chunk7EMAZGYOjs.Context.getAop(meta2, {
|
|
53
|
+
if (!meta2) return resolve(await _chunkFX3LDQIIjs.Context.filterRecord.default(new (0, _chunkFX3LDQIIjs.BadRequestException)(`"${func}" in "${tag}" doesn't exist`)));
|
|
54
|
+
const aop = _chunkFX3LDQIIjs.Context.getAop(meta2, {
|
|
57
55
|
globalFilter,
|
|
58
56
|
globalGuards,
|
|
59
57
|
globalPipe
|
|
@@ -67,21 +65,19 @@ function bind(router, data, opts = {}) {
|
|
|
67
65
|
meta: meta2,
|
|
68
66
|
response: res,
|
|
69
67
|
moduleMap,
|
|
70
|
-
tag,
|
|
71
|
-
func,
|
|
72
68
|
app: router,
|
|
73
|
-
...
|
|
69
|
+
...item,
|
|
74
70
|
next,
|
|
75
|
-
getCookie: /* @__PURE__ */
|
|
76
|
-
setCookie: /* @__PURE__ */
|
|
77
|
-
delCookie: /* @__PURE__ */
|
|
78
|
-
redirect: /* @__PURE__ */
|
|
79
|
-
setResHeaders: /* @__PURE__ */
|
|
80
|
-
setResStatus: /* @__PURE__ */
|
|
81
|
-
getRequest: /* @__PURE__ */
|
|
82
|
-
getResponse: /* @__PURE__ */
|
|
71
|
+
getCookie: /* @__PURE__ */ _chunk5RBTN33Ajs.__name.call(void 0, (key) => req.cookies[key], "getCookie"),
|
|
72
|
+
setCookie: /* @__PURE__ */ _chunk5RBTN33Ajs.__name.call(void 0, (key, value, opts2) => res.cookie(key, value, _optionalChain([opts2, 'optionalAccess', _2 => _2.expires]) && opts2.expires.getTime() - Date.now(), opts2 || {}), "setCookie"),
|
|
73
|
+
delCookie: /* @__PURE__ */ _chunk5RBTN33Ajs.__name.call(void 0, (key) => res.clearCookie(key), "delCookie"),
|
|
74
|
+
redirect: /* @__PURE__ */ _chunk5RBTN33Ajs.__name.call(void 0, (url) => res.redirect(url), "redirect"),
|
|
75
|
+
setResHeaders: /* @__PURE__ */ _chunk5RBTN33Ajs.__name.call(void 0, (headers) => res.set(headers), "setResHeaders"),
|
|
76
|
+
setResStatus: /* @__PURE__ */ _chunk5RBTN33Ajs.__name.call(void 0, (code) => res.status(code), "setResStatus"),
|
|
77
|
+
getRequest: /* @__PURE__ */ _chunk5RBTN33Ajs.__name.call(void 0, () => req, "getRequest"),
|
|
78
|
+
getResponse: /* @__PURE__ */ _chunk5RBTN33Ajs.__name.call(void 0, () => res, "getResponse")
|
|
83
79
|
};
|
|
84
|
-
const context = new (0,
|
|
80
|
+
const context = new (0, _chunkFX3LDQIIjs.Context)(contextData);
|
|
85
81
|
context.run(aop, resolve, resolve);
|
|
86
82
|
});
|
|
87
83
|
})).then((ret) => {
|
|
@@ -101,15 +97,15 @@ function bind(router, data, opts = {}) {
|
|
|
101
97
|
const needBody = params.some((item) => item.type === "body");
|
|
102
98
|
let aop;
|
|
103
99
|
if (!dynamic) {
|
|
104
|
-
aop =
|
|
100
|
+
aop = _chunkFX3LDQIIjs.Context.getAop(meta2, {
|
|
105
101
|
globalFilter,
|
|
106
102
|
globalGuards,
|
|
107
103
|
globalPipe
|
|
108
104
|
});
|
|
109
105
|
}
|
|
110
106
|
const subRouter = new (0, _hyperexpress.Router)();
|
|
111
|
-
|
|
112
|
-
subRouter[http.type](
|
|
107
|
+
_chunkFX3LDQIIjs.Context.applyAddons(addons, subRouter, "hyper-express");
|
|
108
|
+
subRouter[http.type](_chunkFX3LDQIIjs.joinUrl.call(void 0, http.prefix, http.route), async (req, res, next) => {
|
|
113
109
|
debug(`invoke method "${func}" in module "${tag}"`);
|
|
114
110
|
const contextData = {
|
|
115
111
|
type: "hyper-express",
|
|
@@ -126,21 +122,21 @@ function bind(router, data, opts = {}) {
|
|
|
126
122
|
params: req.path_parameters,
|
|
127
123
|
headers: req.headers,
|
|
128
124
|
next,
|
|
129
|
-
getCookie: /* @__PURE__ */
|
|
130
|
-
setCookie: /* @__PURE__ */
|
|
131
|
-
delCookie: /* @__PURE__ */
|
|
132
|
-
redirect: /* @__PURE__ */
|
|
133
|
-
setResHeaders: /* @__PURE__ */
|
|
134
|
-
setResStatus: /* @__PURE__ */
|
|
135
|
-
getRequest: /* @__PURE__ */
|
|
136
|
-
getResponse: /* @__PURE__ */
|
|
125
|
+
getCookie: /* @__PURE__ */ _chunk5RBTN33Ajs.__name.call(void 0, (key) => req.cookies[key], "getCookie"),
|
|
126
|
+
setCookie: /* @__PURE__ */ _chunk5RBTN33Ajs.__name.call(void 0, (key, value, opts2) => res.cookie(key, value, _optionalChain([opts2, 'optionalAccess', _4 => _4.expires]) && opts2.expires.getTime() - Date.now(), opts2 || {}), "setCookie"),
|
|
127
|
+
delCookie: /* @__PURE__ */ _chunk5RBTN33Ajs.__name.call(void 0, (key) => res.clearCookie(key), "delCookie"),
|
|
128
|
+
redirect: /* @__PURE__ */ _chunk5RBTN33Ajs.__name.call(void 0, (url) => res.redirect(url), "redirect"),
|
|
129
|
+
setResHeaders: /* @__PURE__ */ _chunk5RBTN33Ajs.__name.call(void 0, (headers) => res.set(headers), "setResHeaders"),
|
|
130
|
+
setResStatus: /* @__PURE__ */ _chunk5RBTN33Ajs.__name.call(void 0, (code) => res.status(code), "setResStatus"),
|
|
131
|
+
getRequest: /* @__PURE__ */ _chunk5RBTN33Ajs.__name.call(void 0, () => req, "getRequest"),
|
|
132
|
+
getResponse: /* @__PURE__ */ _chunk5RBTN33Ajs.__name.call(void 0, () => res, "getResponse")
|
|
137
133
|
};
|
|
138
|
-
const context = new (0,
|
|
134
|
+
const context = new (0, _chunkFX3LDQIIjs.Context)(contextData);
|
|
139
135
|
if (http.headers) {
|
|
140
136
|
for (const name in http.headers) res.set(name, http.headers[name]);
|
|
141
137
|
}
|
|
142
138
|
if (dynamic) {
|
|
143
|
-
aop =
|
|
139
|
+
aop = _chunkFX3LDQIIjs.Context.getAop(meta2, {
|
|
144
140
|
globalFilter,
|
|
145
141
|
globalGuards,
|
|
146
142
|
globalPipe
|
|
@@ -159,9 +155,9 @@ function bind(router, data, opts = {}) {
|
|
|
159
155
|
}
|
|
160
156
|
}
|
|
161
157
|
}
|
|
162
|
-
|
|
158
|
+
_chunk5RBTN33Ajs.__name.call(void 0, registerRoute, "registerRoute");
|
|
163
159
|
}
|
|
164
|
-
|
|
160
|
+
_chunk5RBTN33Ajs.__name.call(void 0, bind, "bind");
|
|
165
161
|
|
|
166
162
|
|
|
167
163
|
exports.bind = bind;
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
BadRequestException,
|
|
3
3
|
Context,
|
|
4
|
-
argToReq,
|
|
5
4
|
createControllerMetaMap,
|
|
6
5
|
detectAopDep,
|
|
7
6
|
joinUrl
|
|
8
|
-
} from "../../chunk-
|
|
7
|
+
} from "../../chunk-CVPZWDXU.mjs";
|
|
9
8
|
import {
|
|
10
9
|
__name
|
|
11
|
-
} from "../../chunk-
|
|
10
|
+
} from "../../chunk-FXTJ3BJ6.mjs";
|
|
12
11
|
|
|
13
12
|
// src/http/hyper-express/bind.ts
|
|
14
13
|
import { Router } from "hyper-express";
|
|
@@ -52,7 +51,6 @@ function bind(router, data, opts = {}) {
|
|
|
52
51
|
if (!metaMap.has(tag)) return resolve(await Context.filterRecord.default(new BadRequestException(`module "${tag}" doesn't exist`)));
|
|
53
52
|
const meta2 = metaMap.get(tag)[func];
|
|
54
53
|
if (!meta2) return resolve(await Context.filterRecord.default(new BadRequestException(`"${func}" in "${tag}" doesn't exist`)));
|
|
55
|
-
const { data: { params } } = meta2;
|
|
56
54
|
const aop = Context.getAop(meta2, {
|
|
57
55
|
globalFilter,
|
|
58
56
|
globalGuards,
|
|
@@ -67,10 +65,8 @@ function bind(router, data, opts = {}) {
|
|
|
67
65
|
meta: meta2,
|
|
68
66
|
response: res,
|
|
69
67
|
moduleMap,
|
|
70
|
-
tag,
|
|
71
|
-
func,
|
|
72
68
|
app: router,
|
|
73
|
-
...
|
|
69
|
+
...item,
|
|
74
70
|
next,
|
|
75
71
|
getCookie: /* @__PURE__ */ __name((key) => req.cookies[key], "getCookie"),
|
|
76
72
|
setCookie: /* @__PURE__ */ __name((key, value, opts2) => res.cookie(key, value, opts2?.expires && opts2.expires.getTime() - Date.now(), opts2 || {}), "setCookie"),
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import Router, { RouterParamContext } from '@koa/router';
|
|
2
2
|
import { DefaultContext, DefaultState } from 'koa';
|
|
3
|
-
import { H as HttpCtx, a as HttpOptions } from '../../types-
|
|
4
|
-
import { F as Factory } from '../../core-
|
|
3
|
+
import { H as HttpCtx, a as HttpOptions } from '../../types-DKVhyZk_.mjs';
|
|
4
|
+
import { F as Factory } from '../../core-BDkhrEyf.mjs';
|
|
5
5
|
import 'node:http';
|
|
6
|
-
import '../../meta-
|
|
6
|
+
import '../../meta-BX5jhe4Z.mjs';
|
|
7
7
|
import 'phecda-core';
|
|
8
8
|
|
|
9
9
|
interface KoaCtx extends HttpCtx {
|
package/dist/http/koa/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import Router, { RouterParamContext } from '@koa/router';
|
|
2
2
|
import { DefaultContext, DefaultState } from 'koa';
|
|
3
|
-
import { H as HttpCtx, a as HttpOptions } from '../../types-
|
|
4
|
-
import { F as Factory } from '../../core-
|
|
3
|
+
import { H as HttpCtx, a as HttpOptions } from '../../types-CMeuFoyd.js';
|
|
4
|
+
import { F as Factory } from '../../core-D_cz0tKa.js';
|
|
5
5
|
import 'node:http';
|
|
6
|
-
import '../../meta-
|
|
6
|
+
import '../../meta-BX5jhe4Z.js';
|
|
7
7
|
import 'phecda-core';
|
|
8
8
|
|
|
9
9
|
interface KoaCtx extends HttpCtx {
|
package/dist/http/koa/index.js
CHANGED
|
@@ -4,12 +4,11 @@
|
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
|
+
var _chunkFX3LDQIIjs = require('../../chunk-FX3LDQII.js');
|
|
7
8
|
|
|
8
9
|
|
|
9
|
-
var _chunk7EMAZGYOjs = require('../../chunk-7EMAZGYO.js');
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
var _chunkVSGYTGHYjs = require('../../chunk-VSGYTGHY.js');
|
|
11
|
+
var _chunk5RBTN33Ajs = require('../../chunk-5RBTN33A.js');
|
|
13
12
|
|
|
14
13
|
// src/http/koa/bind.ts
|
|
15
14
|
var _router = require('@koa/router'); var _router2 = _interopRequireDefault(_router);
|
|
@@ -19,14 +18,14 @@ function bind(router, data, opts = {}) {
|
|
|
19
18
|
const { globalGuards, parallelRoute = "/__PHECDA_SERVER__", globalAddons = [], parallelAddons = [], globalFilter, globalPipe, dynamic = false } = opts;
|
|
20
19
|
const { moduleMap, meta } = data;
|
|
21
20
|
const originStack = router.stack.slice(0, router.stack.length);
|
|
22
|
-
const metaMap =
|
|
21
|
+
const metaMap = _chunkFX3LDQIIjs.createControllerMetaMap.call(void 0, meta, (meta2) => {
|
|
23
22
|
const { controller, http, func, tag } = meta2.data;
|
|
24
23
|
if (controller === "http" && _optionalChain([http, 'optionalAccess', _ => _.type])) {
|
|
25
24
|
debug(`register method "${func}" in module "${tag}"`);
|
|
26
25
|
return true;
|
|
27
26
|
}
|
|
28
27
|
});
|
|
29
|
-
|
|
28
|
+
_chunkFX3LDQIIjs.detectAopDep.call(void 0, meta, {
|
|
30
29
|
addons: [
|
|
31
30
|
...globalAddons,
|
|
32
31
|
...parallelAddons
|
|
@@ -35,29 +34,28 @@ function bind(router, data, opts = {}) {
|
|
|
35
34
|
});
|
|
36
35
|
registerRoute();
|
|
37
36
|
function registerRoute() {
|
|
38
|
-
|
|
37
|
+
_chunkFX3LDQIIjs.Context.applyAddons(globalAddons, router, "koa");
|
|
39
38
|
if (parallelRoute) {
|
|
40
39
|
const subRouter = new (0, _router2.default)();
|
|
41
|
-
|
|
40
|
+
_chunkFX3LDQIIjs.Context.applyAddons(parallelAddons, subRouter, "koa");
|
|
42
41
|
subRouter.post(parallelRoute, async (ctx, next) => {
|
|
43
42
|
const { body } = ctx.request;
|
|
44
43
|
async function errorHandler(e) {
|
|
45
|
-
const error = await
|
|
44
|
+
const error = await _chunkFX3LDQIIjs.Context.filterRecord.default(e);
|
|
46
45
|
ctx.status = error.status;
|
|
47
46
|
ctx.body = error;
|
|
48
47
|
}
|
|
49
|
-
|
|
50
|
-
if (!Array.isArray(body)) return errorHandler(new (0,
|
|
48
|
+
_chunk5RBTN33Ajs.__name.call(void 0, errorHandler, "errorHandler");
|
|
49
|
+
if (!Array.isArray(body)) return errorHandler(new (0, _chunkFX3LDQIIjs.BadRequestException)("data format should be an array"));
|
|
51
50
|
try {
|
|
52
51
|
return Promise.all(body.map((item, i) => {
|
|
53
52
|
return new Promise(async (resolve) => {
|
|
54
53
|
const { tag, func } = item;
|
|
55
54
|
debug(`(parallel)invoke method "${func}" in module "${tag}"`);
|
|
56
|
-
if (!metaMap.has(tag)) return resolve(await
|
|
55
|
+
if (!metaMap.has(tag)) return resolve(await _chunkFX3LDQIIjs.Context.filterRecord.default(new (0, _chunkFX3LDQIIjs.BadRequestException)(`module "${tag}" doesn't exist`)));
|
|
57
56
|
const meta2 = metaMap.get(tag)[func];
|
|
58
|
-
if (!meta2) return resolve(await
|
|
59
|
-
const
|
|
60
|
-
const aop = _chunk7EMAZGYOjs.Context.getAop(meta2, {
|
|
57
|
+
if (!meta2) return resolve(await _chunkFX3LDQIIjs.Context.filterRecord.default(new (0, _chunkFX3LDQIIjs.BadRequestException)(`"${func}" in "${tag}" doesn't exist`)));
|
|
58
|
+
const aop = _chunkFX3LDQIIjs.Context.getAop(meta2, {
|
|
61
59
|
globalGuards,
|
|
62
60
|
globalFilter,
|
|
63
61
|
globalPipe
|
|
@@ -72,21 +70,19 @@ function bind(router, data, opts = {}) {
|
|
|
72
70
|
parallel: true,
|
|
73
71
|
next,
|
|
74
72
|
app: router,
|
|
75
|
-
...
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
setCookie: /* @__PURE__ */ _chunkVSGYTGHYjs.__name.call(void 0, (key, value, opts2) => ctx.cookies.set(key, value, opts2), "setCookie"),
|
|
80
|
-
delCookie: /* @__PURE__ */ _chunkVSGYTGHYjs.__name.call(void 0, (key) => ctx.cookies.set(key, "", {
|
|
73
|
+
...item,
|
|
74
|
+
getCookie: /* @__PURE__ */ _chunk5RBTN33Ajs.__name.call(void 0, (key) => ctx.cookies.get(key), "getCookie"),
|
|
75
|
+
setCookie: /* @__PURE__ */ _chunk5RBTN33Ajs.__name.call(void 0, (key, value, opts2) => ctx.cookies.set(key, value, opts2), "setCookie"),
|
|
76
|
+
delCookie: /* @__PURE__ */ _chunk5RBTN33Ajs.__name.call(void 0, (key) => ctx.cookies.set(key, "", {
|
|
81
77
|
expires: /* @__PURE__ */ new Date(0)
|
|
82
78
|
}), "delCookie"),
|
|
83
|
-
redirect: /* @__PURE__ */
|
|
84
|
-
setResHeaders: /* @__PURE__ */
|
|
85
|
-
setResStatus: /* @__PURE__ */
|
|
86
|
-
getRequest: /* @__PURE__ */
|
|
87
|
-
getResponse: /* @__PURE__ */
|
|
79
|
+
redirect: /* @__PURE__ */ _chunk5RBTN33Ajs.__name.call(void 0, (url) => ctx.redirect(url), "redirect"),
|
|
80
|
+
setResHeaders: /* @__PURE__ */ _chunk5RBTN33Ajs.__name.call(void 0, (headers) => ctx.set(headers), "setResHeaders"),
|
|
81
|
+
setResStatus: /* @__PURE__ */ _chunk5RBTN33Ajs.__name.call(void 0, (status) => ctx.status = status, "setResStatus"),
|
|
82
|
+
getRequest: /* @__PURE__ */ _chunk5RBTN33Ajs.__name.call(void 0, () => ctx.req, "getRequest"),
|
|
83
|
+
getResponse: /* @__PURE__ */ _chunk5RBTN33Ajs.__name.call(void 0, () => ctx.res, "getResponse")
|
|
88
84
|
};
|
|
89
|
-
const context = new (0,
|
|
85
|
+
const context = new (0, _chunkFX3LDQIIjs.Context)(contextData);
|
|
90
86
|
context.run(aop, resolve, resolve);
|
|
91
87
|
});
|
|
92
88
|
})).then((ret) => {
|
|
@@ -105,15 +101,15 @@ function bind(router, data, opts = {}) {
|
|
|
105
101
|
if (!_optionalChain([http, 'optionalAccess', _2 => _2.type])) continue;
|
|
106
102
|
let aop;
|
|
107
103
|
if (!dynamic) {
|
|
108
|
-
aop =
|
|
104
|
+
aop = _chunkFX3LDQIIjs.Context.getAop(meta2, {
|
|
109
105
|
globalFilter,
|
|
110
106
|
globalGuards,
|
|
111
107
|
globalPipe
|
|
112
108
|
});
|
|
113
109
|
}
|
|
114
110
|
const subRouter = new (0, _router2.default)();
|
|
115
|
-
|
|
116
|
-
router[http.type](
|
|
111
|
+
_chunkFX3LDQIIjs.Context.applyAddons(addons, subRouter, "koa");
|
|
112
|
+
router[http.type](_chunkFX3LDQIIjs.joinUrl.call(void 0, http.prefix, http.route), async (ctx, next) => {
|
|
117
113
|
debug(`invoke method "${func}" in module "${tag}"`);
|
|
118
114
|
const contextData = {
|
|
119
115
|
type: "koa",
|
|
@@ -129,21 +125,21 @@ function bind(router, data, opts = {}) {
|
|
|
129
125
|
body: ctx.request.body,
|
|
130
126
|
headers: ctx.headers,
|
|
131
127
|
next,
|
|
132
|
-
getCookie: /* @__PURE__ */
|
|
133
|
-
setCookie: /* @__PURE__ */
|
|
134
|
-
delCookie: /* @__PURE__ */
|
|
128
|
+
getCookie: /* @__PURE__ */ _chunk5RBTN33Ajs.__name.call(void 0, (key) => ctx.cookies.get(key), "getCookie"),
|
|
129
|
+
setCookie: /* @__PURE__ */ _chunk5RBTN33Ajs.__name.call(void 0, (key, value, opts2) => ctx.cookies.set(key, value, opts2), "setCookie"),
|
|
130
|
+
delCookie: /* @__PURE__ */ _chunk5RBTN33Ajs.__name.call(void 0, (key) => ctx.cookies.set(key, "", {
|
|
135
131
|
expires: /* @__PURE__ */ new Date(0)
|
|
136
132
|
}), "delCookie"),
|
|
137
|
-
redirect: /* @__PURE__ */
|
|
138
|
-
setResHeaders: /* @__PURE__ */
|
|
139
|
-
setResStatus: /* @__PURE__ */
|
|
140
|
-
getRequest: /* @__PURE__ */
|
|
141
|
-
getResponse: /* @__PURE__ */
|
|
133
|
+
redirect: /* @__PURE__ */ _chunk5RBTN33Ajs.__name.call(void 0, (url) => ctx.redirect(url), "redirect"),
|
|
134
|
+
setResHeaders: /* @__PURE__ */ _chunk5RBTN33Ajs.__name.call(void 0, (headers) => ctx.set(headers), "setResHeaders"),
|
|
135
|
+
setResStatus: /* @__PURE__ */ _chunk5RBTN33Ajs.__name.call(void 0, (status) => ctx.status = status, "setResStatus"),
|
|
136
|
+
getRequest: /* @__PURE__ */ _chunk5RBTN33Ajs.__name.call(void 0, () => ctx.req, "getRequest"),
|
|
137
|
+
getResponse: /* @__PURE__ */ _chunk5RBTN33Ajs.__name.call(void 0, () => ctx.res, "getResponse")
|
|
142
138
|
};
|
|
143
|
-
const context = new (0,
|
|
139
|
+
const context = new (0, _chunkFX3LDQIIjs.Context)(contextData);
|
|
144
140
|
if (http.headers) ctx.set(http.headers);
|
|
145
141
|
if (dynamic) {
|
|
146
|
-
aop =
|
|
142
|
+
aop = _chunkFX3LDQIIjs.Context.getAop(meta2, {
|
|
147
143
|
globalFilter,
|
|
148
144
|
globalGuards,
|
|
149
145
|
globalPipe
|
|
@@ -162,13 +158,13 @@ function bind(router, data, opts = {}) {
|
|
|
162
158
|
}
|
|
163
159
|
}
|
|
164
160
|
}
|
|
165
|
-
|
|
166
|
-
|
|
161
|
+
_chunk5RBTN33Ajs.__name.call(void 0, registerRoute, "registerRoute");
|
|
162
|
+
_chunk5RBTN33Ajs.HMR.call(void 0, async () => {
|
|
167
163
|
router.stack = originStack;
|
|
168
164
|
registerRoute();
|
|
169
165
|
});
|
|
170
166
|
}
|
|
171
|
-
|
|
167
|
+
_chunk5RBTN33Ajs.__name.call(void 0, bind, "bind");
|
|
172
168
|
|
|
173
169
|
|
|
174
170
|
exports.bind = bind;
|