phecda-server 7.0.0-alpha.9 → 7.0.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/README.md +10 -10
- package/assets/schema.json +12 -9
- package/bin/cli.mjs +96 -37
- package/dist/chunk-5SUY5UVC.js +258 -0
- package/dist/chunk-5SUY5UVC.js.map +1 -0
- package/dist/{chunk-7ZGYJ5OW.mjs → chunk-6JAHCTOT.mjs} +7 -2
- package/dist/chunk-6JAHCTOT.mjs.map +1 -0
- package/dist/{chunk-V5EYXVJT.js → chunk-EDAWJVJ4.js} +42 -25
- package/dist/chunk-EDAWJVJ4.js.map +1 -0
- package/dist/{chunk-FX3LDQII.js → chunk-H7OCHDZT.js} +61 -70
- package/dist/chunk-H7OCHDZT.js.map +1 -0
- package/dist/chunk-KRUOHWFR.js +306 -0
- package/dist/chunk-KRUOHWFR.js.map +1 -0
- package/dist/{chunk-KJUD2BKE.js → chunk-KUGU3UGO.js} +23 -18
- package/dist/chunk-KUGU3UGO.js.map +1 -0
- package/dist/{chunk-CVPZWDXU.mjs → chunk-LBH4RXQQ.mjs} +11 -20
- package/dist/chunk-LBH4RXQQ.mjs.map +1 -0
- package/dist/{chunk-FXTJ3BJ6.mjs → chunk-MDPW6WGF.mjs} +10 -4
- package/dist/chunk-MDPW6WGF.mjs.map +1 -0
- package/dist/{chunk-5RBTN33A.js → chunk-RLFCI3RG.js} +11 -5
- package/dist/chunk-RLFCI3RG.js.map +1 -0
- package/dist/{chunk-ODVWOXVB.mjs → chunk-TTHYUNOT.mjs} +18 -1
- package/dist/chunk-TTHYUNOT.mjs.map +1 -0
- package/dist/chunk-VDOICQ2U.mjs +258 -0
- package/dist/chunk-VDOICQ2U.mjs.map +1 -0
- package/dist/chunk-WTJKTICN.mjs +306 -0
- package/dist/chunk-WTJKTICN.mjs.map +1 -0
- package/dist/{core-D_cz0tKa.d.ts → core-BOo3uGFX.d.ts} +2 -2
- package/dist/{core-BDkhrEyf.d.mts → core-CF45G79J.d.mts} +2 -2
- package/dist/core-DbqWh47p.d.mts +50 -0
- package/dist/core-Rq7BhPHE.d.ts +50 -0
- package/dist/helper.d.mts +3 -5
- package/dist/helper.d.ts +3 -5
- package/dist/helper.js +4 -5
- package/dist/helper.js.map +1 -0
- package/dist/helper.mjs +3 -4
- package/dist/helper.mjs.map +1 -0
- package/dist/http/elysia/index.d.mts +4 -4
- package/dist/http/elysia/index.d.ts +4 -4
- package/dist/http/elysia/index.js +42 -40
- package/dist/http/elysia/index.js.map +1 -0
- package/dist/http/elysia/index.mjs +5 -3
- package/dist/http/elysia/index.mjs.map +1 -0
- package/dist/http/express/index.d.mts +3 -3
- package/dist/http/express/index.d.ts +3 -3
- package/dist/http/express/index.js +39 -37
- package/dist/http/express/index.js.map +1 -0
- package/dist/http/express/index.mjs +4 -2
- package/dist/http/express/index.mjs.map +1 -0
- package/dist/http/fastify/index.d.mts +3 -3
- package/dist/http/fastify/index.d.ts +3 -3
- package/dist/http/fastify/index.js +40 -38
- package/dist/http/fastify/index.js.map +1 -0
- package/dist/http/fastify/index.mjs +5 -3
- package/dist/http/fastify/index.mjs.map +1 -0
- package/dist/http/h3/index.d.mts +3 -3
- package/dist/http/h3/index.d.ts +3 -3
- package/dist/http/h3/index.js +40 -38
- package/dist/http/h3/index.js.map +1 -0
- package/dist/http/h3/index.mjs +4 -2
- package/dist/http/h3/index.mjs.map +1 -0
- package/dist/http/hono/index.d.mts +3 -3
- package/dist/http/hono/index.d.ts +3 -3
- package/dist/http/hono/index.js +36 -34
- package/dist/http/hono/index.js.map +1 -0
- package/dist/http/hono/index.mjs +4 -2
- package/dist/http/hono/index.mjs.map +1 -0
- 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 +37 -35
- package/dist/http/hyper-express/index.js.map +1 -0
- package/dist/http/hyper-express/index.mjs +4 -2
- package/dist/http/hyper-express/index.mjs.map +1 -0
- package/dist/http/koa/index.d.mts +3 -3
- package/dist/http/koa/index.d.ts +3 -3
- package/dist/http/koa/index.js +39 -37
- package/dist/http/koa/index.js.map +1 -0
- package/dist/http/koa/index.mjs +4 -2
- package/dist/http/koa/index.mjs.map +1 -0
- package/dist/index.d.mts +76 -12
- package/dist/index.d.ts +76 -12
- package/dist/index.js +105 -49
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +68 -12
- package/dist/index.mjs.map +1 -0
- package/dist/{meta-BX5jhe4Z.d.mts → meta-BoS1E-Nz.d.mts} +6 -23
- package/dist/{meta-BX5jhe4Z.d.ts → meta-BoS1E-Nz.d.ts} +6 -23
- package/dist/rpc/bullmq/index.d.mts +4 -6
- package/dist/rpc/bullmq/index.d.ts +4 -6
- package/dist/rpc/bullmq/index.js +13 -80
- package/dist/rpc/bullmq/index.js.map +1 -0
- package/dist/rpc/bullmq/index.mjs +5 -72
- package/dist/rpc/bullmq/index.mjs.map +1 -0
- package/dist/rpc/electron/index.d.mts +13 -0
- package/dist/rpc/electron/index.d.ts +13 -0
- package/dist/rpc/electron/index.js +73 -0
- package/dist/rpc/electron/index.js.map +1 -0
- package/dist/rpc/electron/index.mjs +73 -0
- package/dist/rpc/electron/index.mjs.map +1 -0
- package/dist/rpc/kafka/index.d.mts +4 -9
- package/dist/rpc/kafka/index.d.ts +4 -9
- package/dist/rpc/kafka/index.js +12 -90
- package/dist/rpc/kafka/index.js.map +1 -0
- package/dist/rpc/kafka/index.mjs +5 -83
- package/dist/rpc/kafka/index.mjs.map +1 -0
- package/dist/rpc/nats/index.d.mts +4 -6
- package/dist/rpc/nats/index.d.ts +4 -6
- package/dist/rpc/nats/index.js +13 -72
- package/dist/rpc/nats/index.js.map +1 -0
- package/dist/rpc/nats/index.mjs +4 -63
- package/dist/rpc/nats/index.mjs.map +1 -0
- package/dist/rpc/rabbitmq/index.d.mts +4 -6
- package/dist/rpc/rabbitmq/index.d.ts +4 -6
- package/dist/rpc/rabbitmq/index.js +14 -79
- package/dist/rpc/rabbitmq/index.js.map +1 -0
- package/dist/rpc/rabbitmq/index.mjs +5 -70
- package/dist/rpc/rabbitmq/index.mjs.map +1 -0
- package/dist/rpc/redis/index.d.mts +4 -9
- package/dist/rpc/redis/index.d.ts +4 -9
- package/dist/rpc/redis/index.js +12 -78
- package/dist/rpc/redis/index.js.map +1 -0
- package/dist/rpc/redis/index.mjs +5 -71
- package/dist/rpc/redis/index.mjs.map +1 -0
- package/dist/rpc/web-ext/index.d.mts +2 -0
- package/dist/rpc/web-ext/index.d.ts +2 -0
- package/dist/rpc/web-ext/index.js +1 -0
- package/dist/rpc/web-ext/index.js.map +1 -0
- package/dist/rpc/web-ext/index.mjs +1 -0
- package/dist/rpc/web-ext/index.mjs.map +1 -0
- package/dist/rpc/ws/index.d.mts +14 -0
- package/dist/rpc/ws/index.d.ts +14 -0
- package/dist/rpc/ws/index.js +74 -0
- package/dist/rpc/ws/index.js.map +1 -0
- package/dist/rpc/ws/index.mjs +74 -0
- package/dist/rpc/ws/index.mjs.map +1 -0
- package/dist/test.d.mts +7 -3
- package/dist/test.d.ts +7 -3
- package/dist/test.js +7 -6
- package/dist/test.js.map +1 -0
- package/dist/test.mjs +3 -2
- package/dist/test.mjs.map +1 -0
- package/dist/types-CInz3bD0.d.ts +14 -0
- package/dist/types-E-rqlg3-.d.mts +14 -0
- package/dist/{types-DKVhyZk_.d.mts → types-SCJZFCYt.d.mts} +1 -1
- package/dist/{types-CMeuFoyd.d.ts → types-xruyYmyu.d.ts} +1 -1
- package/package.json +24 -8
- package/register/export.mjs +30 -0
- package/register/index.mjs +2 -3
- package/register/loader.mjs +83 -90
- package/register/utils.mjs +36 -6
- package/assets/ps.json +0 -24
- package/assets/tsconfig.json +0 -21
- package/dist/types-B-rUM9Fm.d.mts +0 -19
- package/dist/types-MxxtkZXw.d.ts +0 -19
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkRLFCI3RGjs = require('./chunk-RLFCI3RG.js');
|
|
4
4
|
|
|
5
5
|
// src/decorators/param.ts
|
|
6
6
|
var _phecdacore = require('phecda-core');
|
|
@@ -10,42 +10,56 @@ function BaseParam(data) {
|
|
|
10
10
|
_phecdacore.setMeta.call(void 0, target, property, index, data);
|
|
11
11
|
};
|
|
12
12
|
}
|
|
13
|
-
|
|
13
|
+
_chunkRLFCI3RGjs.__name.call(void 0, BaseParam, "BaseParam");
|
|
14
14
|
function Body(key = "") {
|
|
15
15
|
return BaseParam({
|
|
16
16
|
type: "body",
|
|
17
17
|
key
|
|
18
18
|
});
|
|
19
19
|
}
|
|
20
|
-
|
|
20
|
+
_chunkRLFCI3RGjs.__name.call(void 0, Body, "Body");
|
|
21
21
|
function Head(key) {
|
|
22
22
|
return BaseParam({
|
|
23
23
|
type: "headers",
|
|
24
24
|
key: key.toLowerCase()
|
|
25
25
|
});
|
|
26
26
|
}
|
|
27
|
-
|
|
27
|
+
_chunkRLFCI3RGjs.__name.call(void 0, Head, "Head");
|
|
28
28
|
function Query(key = "") {
|
|
29
29
|
return BaseParam({
|
|
30
30
|
type: "query",
|
|
31
31
|
key
|
|
32
32
|
});
|
|
33
33
|
}
|
|
34
|
-
|
|
34
|
+
_chunkRLFCI3RGjs.__name.call(void 0, Query, "Query");
|
|
35
35
|
function Param(key) {
|
|
36
36
|
return BaseParam({
|
|
37
37
|
type: "params",
|
|
38
38
|
key
|
|
39
39
|
});
|
|
40
40
|
}
|
|
41
|
-
|
|
41
|
+
_chunkRLFCI3RGjs.__name.call(void 0, Param, "Param");
|
|
42
42
|
function Arg(target, k, index) {
|
|
43
43
|
BaseParam({
|
|
44
44
|
type: "args",
|
|
45
45
|
key: `${index}`
|
|
46
46
|
})(target, k, index);
|
|
47
47
|
}
|
|
48
|
-
|
|
48
|
+
_chunkRLFCI3RGjs.__name.call(void 0, Arg, "Arg");
|
|
49
|
+
function OneFile(key = "") {
|
|
50
|
+
return BaseParam({
|
|
51
|
+
type: "file",
|
|
52
|
+
key
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
_chunkRLFCI3RGjs.__name.call(void 0, OneFile, "OneFile");
|
|
56
|
+
function ManyFiles(key = "") {
|
|
57
|
+
return BaseParam({
|
|
58
|
+
type: "files",
|
|
59
|
+
key
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
_chunkRLFCI3RGjs.__name.call(void 0, ManyFiles, "ManyFiles");
|
|
49
63
|
|
|
50
64
|
// src/decorators/aop.ts
|
|
51
65
|
|
|
@@ -56,7 +70,7 @@ function Guard(...guards) {
|
|
|
56
70
|
});
|
|
57
71
|
};
|
|
58
72
|
}
|
|
59
|
-
|
|
73
|
+
_chunkRLFCI3RGjs.__name.call(void 0, Guard, "Guard");
|
|
60
74
|
function Addon(...addons) {
|
|
61
75
|
return (target, property) => {
|
|
62
76
|
_phecdacore.setMeta.call(void 0, target, property, void 0, {
|
|
@@ -64,7 +78,7 @@ function Addon(...addons) {
|
|
|
64
78
|
});
|
|
65
79
|
};
|
|
66
80
|
}
|
|
67
|
-
|
|
81
|
+
_chunkRLFCI3RGjs.__name.call(void 0, Addon, "Addon");
|
|
68
82
|
function Filter(filter) {
|
|
69
83
|
return (target, property) => {
|
|
70
84
|
_phecdacore.setMeta.call(void 0, target, property, void 0, {
|
|
@@ -72,7 +86,7 @@ function Filter(filter) {
|
|
|
72
86
|
});
|
|
73
87
|
};
|
|
74
88
|
}
|
|
75
|
-
|
|
89
|
+
_chunkRLFCI3RGjs.__name.call(void 0, Filter, "Filter");
|
|
76
90
|
function Pipe(pipe) {
|
|
77
91
|
return (target, property, index) => {
|
|
78
92
|
if (typeof index === "number") {
|
|
@@ -86,7 +100,7 @@ function Pipe(pipe) {
|
|
|
86
100
|
});
|
|
87
101
|
};
|
|
88
102
|
}
|
|
89
|
-
|
|
103
|
+
_chunkRLFCI3RGjs.__name.call(void 0, Pipe, "Pipe");
|
|
90
104
|
|
|
91
105
|
// src/decorators/http.ts
|
|
92
106
|
|
|
@@ -100,7 +114,7 @@ function Route(route, type) {
|
|
|
100
114
|
});
|
|
101
115
|
};
|
|
102
116
|
}
|
|
103
|
-
|
|
117
|
+
_chunkRLFCI3RGjs.__name.call(void 0, Route, "Route");
|
|
104
118
|
function Header(headers) {
|
|
105
119
|
return (target, property) => {
|
|
106
120
|
_phecdacore.setMeta.call(void 0, target, property, void 0, {
|
|
@@ -110,31 +124,31 @@ function Header(headers) {
|
|
|
110
124
|
});
|
|
111
125
|
};
|
|
112
126
|
}
|
|
113
|
-
|
|
127
|
+
_chunkRLFCI3RGjs.__name.call(void 0, Header, "Header");
|
|
114
128
|
function Get(route = "") {
|
|
115
129
|
return Route(route, "get");
|
|
116
130
|
}
|
|
117
|
-
|
|
131
|
+
_chunkRLFCI3RGjs.__name.call(void 0, Get, "Get");
|
|
118
132
|
function Post(route = "") {
|
|
119
133
|
return Route(route, "post");
|
|
120
134
|
}
|
|
121
|
-
|
|
135
|
+
_chunkRLFCI3RGjs.__name.call(void 0, Post, "Post");
|
|
122
136
|
function Put(route = "") {
|
|
123
137
|
return Route(route, "put");
|
|
124
138
|
}
|
|
125
|
-
|
|
139
|
+
_chunkRLFCI3RGjs.__name.call(void 0, Put, "Put");
|
|
126
140
|
function Search(route = "") {
|
|
127
141
|
return Route(route, "search");
|
|
128
142
|
}
|
|
129
|
-
|
|
143
|
+
_chunkRLFCI3RGjs.__name.call(void 0, Search, "Search");
|
|
130
144
|
function Patch(route = "") {
|
|
131
145
|
return Route(route, "patch");
|
|
132
146
|
}
|
|
133
|
-
|
|
147
|
+
_chunkRLFCI3RGjs.__name.call(void 0, Patch, "Patch");
|
|
134
148
|
function Delete(route = "") {
|
|
135
149
|
return Route(route, "delete");
|
|
136
150
|
}
|
|
137
|
-
|
|
151
|
+
_chunkRLFCI3RGjs.__name.call(void 0, Delete, "Delete");
|
|
138
152
|
function Controller(prefix = "") {
|
|
139
153
|
return (target) => {
|
|
140
154
|
_phecdacore.setMeta.call(void 0, target, void 0, void 0, {
|
|
@@ -145,7 +159,7 @@ function Controller(prefix = "") {
|
|
|
145
159
|
});
|
|
146
160
|
};
|
|
147
161
|
}
|
|
148
|
-
|
|
162
|
+
_chunkRLFCI3RGjs.__name.call(void 0, Controller, "Controller");
|
|
149
163
|
|
|
150
164
|
// src/decorators/rpc.ts
|
|
151
165
|
|
|
@@ -159,7 +173,7 @@ function Queue(queue = "", isEvent) {
|
|
|
159
173
|
});
|
|
160
174
|
};
|
|
161
175
|
}
|
|
162
|
-
|
|
176
|
+
_chunkRLFCI3RGjs.__name.call(void 0, Queue, "Queue");
|
|
163
177
|
function Rpc() {
|
|
164
178
|
return (target) => {
|
|
165
179
|
_phecdacore.setMeta.call(void 0, target, void 0, void 0, {
|
|
@@ -167,11 +181,11 @@ function Rpc() {
|
|
|
167
181
|
});
|
|
168
182
|
};
|
|
169
183
|
}
|
|
170
|
-
|
|
184
|
+
_chunkRLFCI3RGjs.__name.call(void 0, Rpc, "Rpc");
|
|
171
185
|
|
|
172
186
|
// src/decorators/ctx.ts
|
|
173
187
|
|
|
174
|
-
var Ctx = /* @__PURE__ */
|
|
188
|
+
var Ctx = /* @__PURE__ */ _chunkRLFCI3RGjs.__name.call(void 0, (target, property) => {
|
|
175
189
|
_phecdacore.setMeta.call(void 0, target, _phecdacore.SHARE_KEY, void 0, {
|
|
176
190
|
ctxs: [
|
|
177
191
|
property
|
|
@@ -200,7 +214,9 @@ function Define(key, value) {
|
|
|
200
214
|
}
|
|
201
215
|
};
|
|
202
216
|
}
|
|
203
|
-
|
|
217
|
+
_chunkRLFCI3RGjs.__name.call(void 0, Define, "Define");
|
|
218
|
+
|
|
219
|
+
|
|
204
220
|
|
|
205
221
|
|
|
206
222
|
|
|
@@ -226,4 +242,5 @@ _chunk5RBTN33Ajs.__name.call(void 0, Define, "Define");
|
|
|
226
242
|
|
|
227
243
|
|
|
228
244
|
|
|
229
|
-
exports.BaseParam = BaseParam; exports.Body = Body; exports.Head = Head; exports.Query = Query; exports.Param = Param; exports.Arg = Arg; exports.Guard = Guard; exports.Addon = Addon; exports.Filter = Filter; exports.Pipe = Pipe; exports.Route = Route; exports.Header = Header; exports.Get = Get; exports.Post = Post; exports.Put = Put; exports.Search = Search; exports.Patch = Patch; exports.Delete = Delete; exports.Controller = Controller; exports.Queue = Queue; exports.Rpc = Rpc; exports.Ctx = Ctx; exports.Define = Define;
|
|
245
|
+
exports.BaseParam = BaseParam; exports.Body = Body; exports.Head = Head; exports.Query = Query; exports.Param = Param; exports.Arg = Arg; exports.OneFile = OneFile; exports.ManyFiles = ManyFiles; exports.Guard = Guard; exports.Addon = Addon; exports.Filter = Filter; exports.Pipe = Pipe; exports.Route = Route; exports.Header = Header; exports.Get = Get; exports.Post = Post; exports.Put = Put; exports.Search = Search; exports.Patch = Patch; exports.Delete = Delete; exports.Controller = Controller; exports.Queue = Queue; exports.Rpc = Rpc; exports.Ctx = Ctx; exports.Define = Define;
|
|
246
|
+
//# sourceMappingURL=chunk-EDAWJVJ4.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["d:\\myproject\\phecda\\packages\\server\\dist\\chunk-EDAWJVJ4.js"],"names":[],"mappings":"AAAA;AACE;AACF,sDAA4B;AAC5B;AACA;AACA,yCAAqC;AACrC,SAAS,SAAS,CAAC,IAAI,EAAE;AACzB,EAAE,OAAO,CAAC,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,GAAG;AACtC,IAAI,GAAG,CAAC,CAAC,QAAQ,EAAE,MAAM;AACzB,IAAI,iCAAO,MAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,IAAI,CAAC;AAC1C,EAAE,CAAC;AACH;AACA,qCAAM,SAAU,EAAE,WAAW,CAAC;AAC9B,SAAS,IAAI,CAAC,IAAI,EAAE,EAAE,EAAE;AACxB,EAAE,OAAO,SAAS,CAAC;AACnB,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI;AACJ,EAAE,CAAC,CAAC;A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A;AACA,EAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAA;AACA,IAAA;AACA,MAAA;AACA,QAAA;AACA,QAAA;AACA,MAAA;AACA,IAAA;AACA,EAAA;AACA;AACA;AACA;AACA,EAAA;AACA,IAAA;AACA,MAAA;AACA,QAAA;AACA,MAAA;AACA,IAAA;AACA,EAAA;AACA;AACA;AACA;AACA,EAAA;AACA;AACA;AACA;AACA,EAAA;AACA;AACA;AACA;AACA,EAAA;AACA;AACA;AACA;AACA,EAAA;AACA;AACA;AACA;AACA,EAAA;AACA;AACA;AACA;AACA,EAAA;AACA;AACA;AACA;AACA,EAAA;AACA,IAAA;AACA,MAAA;AACA,MAAA;AACA,QAAA;AACA,MAAA;AACA,IAAA;AACA,EAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAA;AACA,IAAA;AACA,MAAA;AACA,QAAA;AACA,QAAA;AACA,MAAA;AACA,IAAA;AACA,EAAA;AACA;AACA;AACA;AACA,EAAA;AACA,IAAA;AACA,MAAA;AACA,IAAA;AACA,EAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAA;AACA,IAAA;AACA,MAAA;AACA,IAAA;AACA,EAAA;AACA;AACA;AACA,EAAA;AACA,IAAA;AACA,MAAA;AACA,QAAA;AACA,UAAA;AACA,YAAA;AACA,cAAA;AACA,YAAA;AACA,YAAA;AACA,UAAA;AACA,QAAA;AACA,MAAA;AACA,IAAA;AACA,MAAA;AACA,QAAA;AACA,UAAA;AACA,QAAA;AACA,MAAA;AACA,IAAA;AACA,EAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","file":"D:\\myproject\\phecda\\packages\\server\\dist\\chunk-EDAWJVJ4.js","sourcesContent":[null]}
|
|
@@ -6,7 +6,8 @@
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
|
|
10
|
+
var _chunkRLFCI3RGjs = require('./chunk-RLFCI3RG.js');
|
|
10
11
|
|
|
11
12
|
// src/helper.ts
|
|
12
13
|
var _picocolors = require('picocolors'); var _picocolors2 = _interopRequireDefault(_picocolors);
|
|
@@ -16,14 +17,14 @@ var _debug = require('debug'); var _debug2 = _interopRequireDefault(_debug);
|
|
|
16
17
|
|
|
17
18
|
|
|
18
19
|
// src/pipe.ts
|
|
19
|
-
var defaultPipe = /* @__PURE__ */
|
|
20
|
+
var defaultPipe = /* @__PURE__ */ _chunkRLFCI3RGjs.__name.call(void 0, ({ arg }) => {
|
|
20
21
|
return arg;
|
|
21
22
|
}, "defaultPipe");
|
|
22
23
|
|
|
23
24
|
// src/exception/base.ts
|
|
24
25
|
var Exception = class extends Error {
|
|
25
26
|
static {
|
|
26
|
-
|
|
27
|
+
_chunkRLFCI3RGjs.__name.call(void 0, this, "Exception");
|
|
27
28
|
}
|
|
28
29
|
|
|
29
30
|
|
|
@@ -36,7 +37,7 @@ var Exception = class extends Error {
|
|
|
36
37
|
message: this.message,
|
|
37
38
|
description: this.description,
|
|
38
39
|
status: this.status,
|
|
39
|
-
[
|
|
40
|
+
[_chunkRLFCI3RGjs.ERROR_SYMBOL]: true
|
|
40
41
|
};
|
|
41
42
|
}
|
|
42
43
|
};
|
|
@@ -44,7 +45,7 @@ var Exception = class extends Error {
|
|
|
44
45
|
// src/exception/undefine.ts
|
|
45
46
|
var UndefinedException = class extends Exception {
|
|
46
47
|
static {
|
|
47
|
-
|
|
48
|
+
_chunkRLFCI3RGjs.__name.call(void 0, this, "UndefinedException");
|
|
48
49
|
}
|
|
49
50
|
constructor(message) {
|
|
50
51
|
super(message, 500, "Undefined error");
|
|
@@ -54,7 +55,7 @@ var UndefinedException = class extends Exception {
|
|
|
54
55
|
// src/exception/validate.ts
|
|
55
56
|
var ValidateException = class extends Exception {
|
|
56
57
|
static {
|
|
57
|
-
|
|
58
|
+
_chunkRLFCI3RGjs.__name.call(void 0, this, "ValidateException");
|
|
58
59
|
}
|
|
59
60
|
constructor(message) {
|
|
60
61
|
super(message, 400, "Validate exception");
|
|
@@ -64,7 +65,7 @@ var ValidateException = class extends Exception {
|
|
|
64
65
|
// src/exception/forbidden.ts
|
|
65
66
|
var ForbiddenException = class extends Exception {
|
|
66
67
|
static {
|
|
67
|
-
|
|
68
|
+
_chunkRLFCI3RGjs.__name.call(void 0, this, "ForbiddenException");
|
|
68
69
|
}
|
|
69
70
|
constructor(message) {
|
|
70
71
|
super(message, 403, "Forbidden resource");
|
|
@@ -74,7 +75,7 @@ var ForbiddenException = class extends Exception {
|
|
|
74
75
|
// src/exception/bad-request.ts
|
|
75
76
|
var BadRequestException = class extends Exception {
|
|
76
77
|
static {
|
|
77
|
-
|
|
78
|
+
_chunkRLFCI3RGjs.__name.call(void 0, this, "BadRequestException");
|
|
78
79
|
}
|
|
79
80
|
constructor(message) {
|
|
80
81
|
super(message, 400, "Bad Request");
|
|
@@ -84,7 +85,7 @@ var BadRequestException = class extends Exception {
|
|
|
84
85
|
// src/exception/not-found.ts
|
|
85
86
|
var NotFoundException = class extends Exception {
|
|
86
87
|
static {
|
|
87
|
-
|
|
88
|
+
_chunkRLFCI3RGjs.__name.call(void 0, this, "NotFoundException");
|
|
88
89
|
}
|
|
89
90
|
constructor(message) {
|
|
90
91
|
super(message, 404, "Not Found");
|
|
@@ -94,7 +95,7 @@ var NotFoundException = class extends Exception {
|
|
|
94
95
|
// src/exception/conflict.ts
|
|
95
96
|
var ConflictException = class extends Exception {
|
|
96
97
|
static {
|
|
97
|
-
|
|
98
|
+
_chunkRLFCI3RGjs.__name.call(void 0, this, "ConflictException");
|
|
98
99
|
}
|
|
99
100
|
constructor(message) {
|
|
100
101
|
super(message, 409, "Conflict");
|
|
@@ -104,7 +105,7 @@ var ConflictException = class extends Exception {
|
|
|
104
105
|
// src/exception/bad-gateway.ts
|
|
105
106
|
var BadGatewayException = class extends Exception {
|
|
106
107
|
static {
|
|
107
|
-
|
|
108
|
+
_chunkRLFCI3RGjs.__name.call(void 0, this, "BadGatewayException");
|
|
108
109
|
}
|
|
109
110
|
constructor(message) {
|
|
110
111
|
super(message, 502, "Bad Gatrway");
|
|
@@ -114,7 +115,7 @@ var BadGatewayException = class extends Exception {
|
|
|
114
115
|
// src/exception/invalid-input.ts
|
|
115
116
|
var InvalidInputException = class extends Exception {
|
|
116
117
|
static {
|
|
117
|
-
|
|
118
|
+
_chunkRLFCI3RGjs.__name.call(void 0, this, "InvalidInputException");
|
|
118
119
|
}
|
|
119
120
|
constructor(message) {
|
|
120
121
|
super(message, 502, "Invalid Input");
|
|
@@ -124,7 +125,7 @@ var InvalidInputException = class extends Exception {
|
|
|
124
125
|
// src/exception/media-type.ts
|
|
125
126
|
var UnsupportedMediaTypeException = class extends Exception {
|
|
126
127
|
static {
|
|
127
|
-
|
|
128
|
+
_chunkRLFCI3RGjs.__name.call(void 0, this, "UnsupportedMediaTypeException");
|
|
128
129
|
}
|
|
129
130
|
constructor(message) {
|
|
130
131
|
super(message, 415, "Unsupported Media Type");
|
|
@@ -134,7 +135,7 @@ var UnsupportedMediaTypeException = class extends Exception {
|
|
|
134
135
|
// src/exception/payload-large.ts
|
|
135
136
|
var PayloadLargeException = class extends Exception {
|
|
136
137
|
static {
|
|
137
|
-
|
|
138
|
+
_chunkRLFCI3RGjs.__name.call(void 0, this, "PayloadLargeException");
|
|
138
139
|
}
|
|
139
140
|
constructor(message) {
|
|
140
141
|
super(message, 413, "Payload Too Large");
|
|
@@ -144,7 +145,7 @@ var PayloadLargeException = class extends Exception {
|
|
|
144
145
|
// src/exception/timeout.ts
|
|
145
146
|
var TimeoutException = class extends Exception {
|
|
146
147
|
static {
|
|
147
|
-
|
|
148
|
+
_chunkRLFCI3RGjs.__name.call(void 0, this, "TimeoutException");
|
|
148
149
|
}
|
|
149
150
|
constructor(message) {
|
|
150
151
|
super(message, 408, "Request Timeout");
|
|
@@ -154,7 +155,7 @@ var TimeoutException = class extends Exception {
|
|
|
154
155
|
// src/exception/unauthorized.ts
|
|
155
156
|
var UnauthorizedException = class extends Exception {
|
|
156
157
|
static {
|
|
157
|
-
|
|
158
|
+
_chunkRLFCI3RGjs.__name.call(void 0, this, "UnauthorizedException");
|
|
158
159
|
}
|
|
159
160
|
constructor(message) {
|
|
160
161
|
super(message, 401, "Unauthorized");
|
|
@@ -164,7 +165,7 @@ var UnauthorizedException = class extends Exception {
|
|
|
164
165
|
// src/exception/unavailable-service.ts
|
|
165
166
|
var ServiceUnavailableException = class extends Exception {
|
|
166
167
|
static {
|
|
167
|
-
|
|
168
|
+
_chunkRLFCI3RGjs.__name.call(void 0, this, "ServiceUnavailableException");
|
|
168
169
|
}
|
|
169
170
|
constructor(message) {
|
|
170
171
|
super(message, 503, "Service Unavailable");
|
|
@@ -174,7 +175,7 @@ var ServiceUnavailableException = class extends Exception {
|
|
|
174
175
|
// src/exception/framework.ts
|
|
175
176
|
var FrameworkException = class extends Exception {
|
|
176
177
|
static {
|
|
177
|
-
|
|
178
|
+
_chunkRLFCI3RGjs.__name.call(void 0, this, "FrameworkException");
|
|
178
179
|
}
|
|
179
180
|
constructor(message) {
|
|
180
181
|
super(`[phecda-server] ${message}`, 500, "Framework Error");
|
|
@@ -184,7 +185,7 @@ var FrameworkException = class extends Exception {
|
|
|
184
185
|
// src/exception/timer.ts
|
|
185
186
|
var TimerException = class extends Exception {
|
|
186
187
|
static {
|
|
187
|
-
|
|
188
|
+
_chunkRLFCI3RGjs.__name.call(void 0, this, "TimerException");
|
|
188
189
|
}
|
|
189
190
|
constructor(message) {
|
|
190
191
|
super(message, 0, "Timer Error");
|
|
@@ -194,7 +195,7 @@ var TimerException = class extends Exception {
|
|
|
194
195
|
// src/exception/worker.ts
|
|
195
196
|
var WorkerException = class extends Exception {
|
|
196
197
|
static {
|
|
197
|
-
|
|
198
|
+
_chunkRLFCI3RGjs.__name.call(void 0, this, "WorkerException");
|
|
198
199
|
}
|
|
199
200
|
constructor(message) {
|
|
200
201
|
super(message, 0, "Worker Error");
|
|
@@ -202,14 +203,14 @@ var WorkerException = class extends Exception {
|
|
|
202
203
|
};
|
|
203
204
|
|
|
204
205
|
// src/filter.ts
|
|
205
|
-
var defaultFilter = /* @__PURE__ */
|
|
206
|
+
var defaultFilter = /* @__PURE__ */ _chunkRLFCI3RGjs.__name.call(void 0, (e) => {
|
|
206
207
|
if (!(e instanceof Exception)) {
|
|
207
|
-
|
|
208
|
-
if (
|
|
208
|
+
_chunkRLFCI3RGjs.log.call(void 0, e.message, "error");
|
|
209
|
+
if (_chunkRLFCI3RGjs.LOG_LEVEL <= 0) console.error(e.stack);
|
|
209
210
|
e = new UndefinedException(e.message || e);
|
|
210
211
|
} else {
|
|
211
|
-
|
|
212
|
-
if (
|
|
212
|
+
_chunkRLFCI3RGjs.log.call(void 0, `[${e.constructor.name}] ${e.message}`, "error");
|
|
213
|
+
if (_chunkRLFCI3RGjs.LOG_LEVEL <= 0) console.error(e.stack);
|
|
213
214
|
}
|
|
214
215
|
return e.data;
|
|
215
216
|
}, "defaultFilter");
|
|
@@ -218,7 +219,7 @@ var defaultFilter = /* @__PURE__ */ _chunk5RBTN33Ajs.__name.call(void 0, (e) =>
|
|
|
218
219
|
var debug = _debug2.default.call(void 0, "phecda-server(Context)");
|
|
219
220
|
var Context = (_class = class _Context {
|
|
220
221
|
static {
|
|
221
|
-
|
|
222
|
+
_chunkRLFCI3RGjs.__name.call(void 0, this, "Context");
|
|
222
223
|
}
|
|
223
224
|
|
|
224
225
|
|
|
@@ -232,17 +233,14 @@ var Context = (_class = class _Context {
|
|
|
232
233
|
static __initStatic3() {this.guardRecord = {}}
|
|
233
234
|
static __initStatic4() {this.addonRecord = {}}
|
|
234
235
|
|
|
235
|
-
|
|
236
|
+
// protected canGetCtx = true
|
|
236
237
|
constructor(data) {
|
|
237
238
|
this.data = data;
|
|
238
|
-
|
|
239
|
-
if (_chunk5RBTN33Ajs.IS_DEV)
|
|
239
|
+
if (_chunkRLFCI3RGjs.IS_DEV)
|
|
240
240
|
data._context = this;
|
|
241
|
-
const that = this;
|
|
242
241
|
this.ctx = new Proxy(data, {
|
|
243
242
|
get(target, p) {
|
|
244
|
-
if (
|
|
245
|
-
if (!(p in target)) _chunk5RBTN33Ajs.log.call(void 0, `attribute "${p}" does not exist on ctx, which might be due to a missing AOP role (such as a guard).`, "warn", data.tag);
|
|
243
|
+
if (!(p in target)) _chunkRLFCI3RGjs.log.call(void 0, `attribute "${p}" does not exist on ctx, which might be due to a missing AOP role (such as a guard).`, "warn", data.tag);
|
|
246
244
|
return target[p];
|
|
247
245
|
},
|
|
248
246
|
set(target, p, newValue) {
|
|
@@ -280,7 +278,7 @@ ${_picocolors2.default.red(`Filter ${filter2}[${filter2 || "default"}]`)}`);
|
|
|
280
278
|
const { paramsType, data: { ctxs, tag, params, func } } = meta;
|
|
281
279
|
try {
|
|
282
280
|
let res;
|
|
283
|
-
const nextHandler = /* @__PURE__ */
|
|
281
|
+
const nextHandler = /* @__PURE__ */ _chunkRLFCI3RGjs.__name.call(void 0, (index) => {
|
|
284
282
|
return async () => {
|
|
285
283
|
if (index === guards.length) {
|
|
286
284
|
const instance = moduleMap.get(tag);
|
|
@@ -292,13 +290,7 @@ ${_picocolors2.default.red(`Filter ${filter2}[${filter2 || "default"}]`)}`);
|
|
|
292
290
|
reflect: paramsType[item.index],
|
|
293
291
|
...item
|
|
294
292
|
}, this.ctx)));
|
|
295
|
-
if (_chunk5RBTN33Ajs.IS_DEV) {
|
|
296
|
-
Promise.resolve().then(() => {
|
|
297
|
-
this.canGetCtx = false;
|
|
298
|
-
});
|
|
299
|
-
}
|
|
300
293
|
res = await instance[func](...args);
|
|
301
|
-
this.canGetCtx = true;
|
|
302
294
|
} else {
|
|
303
295
|
let nextPromise;
|
|
304
296
|
async function next() {
|
|
@@ -310,7 +302,7 @@ ${_picocolors2.default.red(`Filter ${filter2}[${filter2 || "default"}]`)}`);
|
|
|
310
302
|
return res;
|
|
311
303
|
});
|
|
312
304
|
}
|
|
313
|
-
|
|
305
|
+
_chunkRLFCI3RGjs.__name.call(void 0, next, "next");
|
|
314
306
|
const ret = await guards[index](this.ctx, next);
|
|
315
307
|
if (ret !== void 0) {
|
|
316
308
|
res = ret;
|
|
@@ -355,12 +347,12 @@ function addPipe(key, pipe) {
|
|
|
355
347
|
if (Context.pipeRecord[key] && Context.pipeRecord[key] !== pipe) debug(`overwrite Pipe "${String(key)}"`, "warn");
|
|
356
348
|
Context.pipeRecord[key] = pipe;
|
|
357
349
|
}
|
|
358
|
-
|
|
350
|
+
_chunkRLFCI3RGjs.__name.call(void 0, addPipe, "addPipe");
|
|
359
351
|
function addFilter(key, filter) {
|
|
360
352
|
if (Context.filterRecord[key] && Context.filterRecord[key] !== filter) debug(`overwrite Filter "${String(key)}"`, "warn");
|
|
361
353
|
Context.filterRecord[key] = filter;
|
|
362
354
|
}
|
|
363
|
-
|
|
355
|
+
_chunkRLFCI3RGjs.__name.call(void 0, addFilter, "addFilter");
|
|
364
356
|
function addGuard(key, guard, priority = 0) {
|
|
365
357
|
if (Context.guardRecord[key] && Context.guardRecord[key].value !== guard) debug(`overwrite Guard "${String(key)}"`, "warn");
|
|
366
358
|
Context.guardRecord[key] = {
|
|
@@ -368,7 +360,7 @@ function addGuard(key, guard, priority = 0) {
|
|
|
368
360
|
priority
|
|
369
361
|
};
|
|
370
362
|
}
|
|
371
|
-
|
|
363
|
+
_chunkRLFCI3RGjs.__name.call(void 0, addGuard, "addGuard");
|
|
372
364
|
function addAddon(key, addon, priority = 0) {
|
|
373
365
|
if (Context.addonRecord[key] && Context.addonRecord[key].value !== addon) debug(`overwrite Addon "${String(key)}"`, "warn");
|
|
374
366
|
Context.addonRecord[key] = {
|
|
@@ -376,21 +368,14 @@ function addAddon(key, addon, priority = 0) {
|
|
|
376
368
|
priority
|
|
377
369
|
};
|
|
378
370
|
}
|
|
379
|
-
|
|
371
|
+
_chunkRLFCI3RGjs.__name.call(void 0, addAddon, "addAddon");
|
|
380
372
|
|
|
381
373
|
// src/http/helper.ts
|
|
382
374
|
function resolveDep(ret, key) {
|
|
383
375
|
if (key) return _optionalChain([ret, 'optionalAccess', _ => _[key]]);
|
|
384
376
|
return ret;
|
|
385
377
|
}
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
// src/rpc/helper.ts
|
|
389
|
-
var _os = require('os');
|
|
390
|
-
function genClientQueue(key) {
|
|
391
|
-
return `PS-${key ? `${key}-` : ""}${_os.hostname.call(void 0, )}-${process.pid}`;
|
|
392
|
-
}
|
|
393
|
-
_chunk5RBTN33Ajs.__name.call(void 0, genClientQueue, "genClientQueue");
|
|
378
|
+
_chunkRLFCI3RGjs.__name.call(void 0, resolveDep, "resolveDep");
|
|
394
379
|
|
|
395
380
|
// src/decorators/helper.ts
|
|
396
381
|
function shallowClone(obj) {
|
|
@@ -398,11 +383,11 @@ function shallowClone(obj) {
|
|
|
398
383
|
...obj
|
|
399
384
|
};
|
|
400
385
|
}
|
|
401
|
-
|
|
386
|
+
_chunkRLFCI3RGjs.__name.call(void 0, shallowClone, "shallowClone");
|
|
402
387
|
function mergeObject(...args) {
|
|
403
388
|
return Object.assign({}, ...args);
|
|
404
389
|
}
|
|
405
|
-
|
|
390
|
+
_chunkRLFCI3RGjs.__name.call(void 0, mergeObject, "mergeObject");
|
|
406
391
|
|
|
407
392
|
// src/helper.ts
|
|
408
393
|
function createControllerMetaMap(meta, filter) {
|
|
@@ -418,13 +403,14 @@ function createControllerMetaMap(meta, filter) {
|
|
|
418
403
|
});
|
|
419
404
|
}
|
|
420
405
|
}
|
|
421
|
-
|
|
406
|
+
_chunkRLFCI3RGjs.__name.call(void 0, handleMeta, "handleMeta");
|
|
422
407
|
handleMeta();
|
|
423
|
-
|
|
408
|
+
_chunkRLFCI3RGjs.HMR.call(void 0, handleMeta);
|
|
424
409
|
return metaMap;
|
|
425
410
|
}
|
|
426
|
-
|
|
411
|
+
_chunkRLFCI3RGjs.__name.call(void 0, createControllerMetaMap, "createControllerMetaMap");
|
|
427
412
|
function detectAopDep(meta, { guards, addons } = {}, controller = "http") {
|
|
413
|
+
if (_chunkRLFCI3RGjs.IS_PURE) return;
|
|
428
414
|
const addonSet = /* @__PURE__ */ new Set();
|
|
429
415
|
const guardSet = /* @__PURE__ */ new Set();
|
|
430
416
|
const pipeSet = /* @__PURE__ */ new Set();
|
|
@@ -443,6 +429,8 @@ function detectAopDep(meta, { guards, addons } = {}, controller = "http") {
|
|
|
443
429
|
guardSet.add(item);
|
|
444
430
|
})]);
|
|
445
431
|
meta.forEach(({ data }) => {
|
|
432
|
+
if (!data.controller) return;
|
|
433
|
+
if (typeof data.tag !== "string") warningSet.add(`Tag of controller "${data.name}" should be a string`);
|
|
446
434
|
if (data.controller !== controller) {
|
|
447
435
|
if (data[controller]) warningSet.add(`Should use ${controller} controller to decorate class "${data.name}"`);
|
|
448
436
|
return;
|
|
@@ -467,31 +455,34 @@ function detectAopDep(meta, { guards, addons } = {}, controller = "http") {
|
|
|
467
455
|
...filterSet
|
|
468
456
|
].filter((i) => !Context.filterRecord[i]);
|
|
469
457
|
function exit() {
|
|
470
|
-
if (
|
|
458
|
+
if (_chunkRLFCI3RGjs.IS_STRICT) {
|
|
459
|
+
_chunkRLFCI3RGjs.log.call(void 0, "Does not meet strict mode requirements", "error");
|
|
460
|
+
process.exit(1);
|
|
461
|
+
}
|
|
471
462
|
}
|
|
472
|
-
|
|
463
|
+
_chunkRLFCI3RGjs.__name.call(void 0, exit, "exit");
|
|
473
464
|
if (missAddons.length) {
|
|
474
|
-
|
|
465
|
+
_chunkRLFCI3RGjs.log.call(void 0, `${_picocolors2.default.white(`Addon [${missAddons.join(",")}]`)} doesn't exist`, "warn");
|
|
475
466
|
exit();
|
|
476
467
|
}
|
|
477
468
|
if (missGuards.length) {
|
|
478
|
-
|
|
469
|
+
_chunkRLFCI3RGjs.log.call(void 0, `${_picocolors2.default.magenta(`Guard [${missGuards.join(",")}]`)} doesn't exist`, "warn");
|
|
479
470
|
exit();
|
|
480
471
|
}
|
|
481
472
|
if (missPipes.length) {
|
|
482
|
-
|
|
473
|
+
_chunkRLFCI3RGjs.log.call(void 0, `${_picocolors2.default.blue(`Pipe [${missPipes.join(",")}]`)} doesn't exist`, "warn");
|
|
483
474
|
exit();
|
|
484
475
|
}
|
|
485
476
|
if (missFilters.length) {
|
|
486
|
-
|
|
477
|
+
_chunkRLFCI3RGjs.log.call(void 0, `${_picocolors2.default.red(`Filter [${missFilters.join(",")}]`)} doesn't exist`, "warn");
|
|
487
478
|
exit();
|
|
488
479
|
}
|
|
489
|
-
warningSet.forEach((warn) =>
|
|
480
|
+
warningSet.forEach((warn) => _chunkRLFCI3RGjs.log.call(void 0, warn, "warn"));
|
|
490
481
|
if (warningSet.size) exit();
|
|
491
482
|
}
|
|
492
|
-
|
|
483
|
+
_chunkRLFCI3RGjs.__name.call(void 0, handleMeta, "handleMeta");
|
|
493
484
|
handleMeta();
|
|
494
|
-
|
|
485
|
+
_chunkRLFCI3RGjs.HMR.call(void 0, handleMeta);
|
|
495
486
|
return {
|
|
496
487
|
addonSet,
|
|
497
488
|
guardSet,
|
|
@@ -499,7 +490,7 @@ function detectAopDep(meta, { guards, addons } = {}, controller = "http") {
|
|
|
499
490
|
filterSet
|
|
500
491
|
};
|
|
501
492
|
}
|
|
502
|
-
|
|
493
|
+
_chunkRLFCI3RGjs.__name.call(void 0, detectAopDep, "detectAopDep");
|
|
503
494
|
function joinUrl(base, ...paths) {
|
|
504
495
|
const joinedPath = [
|
|
505
496
|
base,
|
|
@@ -507,8 +498,7 @@ function joinUrl(base, ...paths) {
|
|
|
507
498
|
].filter((p) => p).map((path) => path.replace(/(^\/)/g, "")).join("/");
|
|
508
499
|
return `/${joinedPath}`;
|
|
509
500
|
}
|
|
510
|
-
|
|
511
|
-
|
|
501
|
+
_chunkRLFCI3RGjs.__name.call(void 0, joinUrl, "joinUrl");
|
|
512
502
|
|
|
513
503
|
|
|
514
504
|
|
|
@@ -540,4 +530,5 @@ _chunk5RBTN33Ajs.__name.call(void 0, joinUrl, "joinUrl");
|
|
|
540
530
|
|
|
541
531
|
|
|
542
532
|
|
|
543
|
-
exports.defaultPipe = defaultPipe; exports.Exception = Exception; exports.UndefinedException = UndefinedException; exports.ValidateException = ValidateException; exports.ForbiddenException = ForbiddenException; exports.BadRequestException = BadRequestException; exports.NotFoundException = NotFoundException; exports.ConflictException = ConflictException; exports.BadGatewayException = BadGatewayException; exports.InvalidInputException = InvalidInputException; exports.UnsupportedMediaTypeException = UnsupportedMediaTypeException; exports.PayloadLargeException = PayloadLargeException; exports.TimeoutException = TimeoutException; exports.UnauthorizedException = UnauthorizedException; exports.ServiceUnavailableException = ServiceUnavailableException; exports.FrameworkException = FrameworkException; exports.TimerException = TimerException; exports.WorkerException = WorkerException; exports.Context = Context; exports.addPipe = addPipe; exports.addFilter = addFilter; exports.addGuard = addGuard; exports.addAddon = addAddon; exports.resolveDep = resolveDep; exports.
|
|
533
|
+
exports.defaultPipe = defaultPipe; exports.Exception = Exception; exports.UndefinedException = UndefinedException; exports.ValidateException = ValidateException; exports.ForbiddenException = ForbiddenException; exports.BadRequestException = BadRequestException; exports.NotFoundException = NotFoundException; exports.ConflictException = ConflictException; exports.BadGatewayException = BadGatewayException; exports.InvalidInputException = InvalidInputException; exports.UnsupportedMediaTypeException = UnsupportedMediaTypeException; exports.PayloadLargeException = PayloadLargeException; exports.TimeoutException = TimeoutException; exports.UnauthorizedException = UnauthorizedException; exports.ServiceUnavailableException = ServiceUnavailableException; exports.FrameworkException = FrameworkException; exports.TimerException = TimerException; exports.WorkerException = WorkerException; exports.Context = Context; exports.addPipe = addPipe; exports.addFilter = addFilter; exports.addGuard = addGuard; exports.addAddon = addAddon; exports.resolveDep = resolveDep; exports.shallowClone = shallowClone; exports.mergeObject = mergeObject; exports.createControllerMetaMap = createControllerMetaMap; exports.detectAopDep = detectAopDep; exports.joinUrl = joinUrl;
|
|
534
|
+
//# sourceMappingURL=chunk-H7OCHDZT.js.map
|
|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AAA;AACA,EAAA;AACA,EAAA;AACA;AACA,EAAA;AACA,IAAA;AACA,IAAA;AACA,MAAA;AACA,IAAA;AACA,MAAA;AACA,QAAA;AACA,QAAA;AACA,MAAA;AACA,MAAA;AACA,QAAA;AACA,QAAA;AACA,MAAA;AACA,IAAA;AACA,EAAA;AACA,EAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,MAAA;AACA,QAAA;AACA,QAAA;AACA,MAAA;AACA,MAAA;AACA,MAAA;AACA,IAAA;AACA,IAAA;AACA,MAAA;AACA,MAAA;AACA;AACA;AACA;AACA,IAAA;AACA,IAAA;AACA,MAAA;AACA,MAAA;AACA,MAAA;AACA,IAAA;AACA,EAAA;AACA,EAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,MAAA;AACA,MAAA;AACA,QAAA;AACA,UAAA;AACA,YAAA;AACA,YAAA;AACA,cAAA;AACA,YAAA;AACA,YAAA;AACA,cAAA;AACA,cAAA;AACA,cAAA;AACA,YAAA;AACA,YAAA;AACA,UAAA;AACA,YAAA;AACA,YAAA;AACA,cAAA;AACA,gBAAA;AACA,kBAAA;AACA,kBAAA;AACA,gBAAA;AACA,gBAAA;AACA,cAAA;AACA,YAAA;AACA,YAAA;AACA,YAAA;AACA,YAAA;AACA,cAAA;AACA,YAAA;AACA,cAAA;AACA,cAAA;AACA,YAAA;AACA,UAAA;AACA,QAAA;AACA,MAAA;AACA,MAAA;AACA,MAAA;AACA,IAAA;AACA,MAAA;AACA,MAAA;AACA,IAAA;AACA,EAAA;AACA,EAAA;AACA,IAAA;AACA,MAAA;AACA,IAAA;AACA,EAAA;AACA,EAAA;AACA,IAAA;AACA,EAAA;AACA,EAAA;AACA,IAAA;AACA,IAAA;AACA,MAAA;AACA,IAAA;AACA,IAAA;AACA,EAAA;AACA,EAAA;AACA,IAAA;AACA,IAAA;AACA,MAAA;AACA,IAAA;AACA,IAAA;AACA,EAAA;AACA;AACA;AACA,EAAA;AACA,EAAA;AACA;AACA;AACA;AACA,EAAA;AACA,EAAA;AACA;AACA;AACA;AACA,EAAA;AACA,EAAA;AACA,IAAA;AACA,IAAA;AACA,EAAA;AACA;AACA;AACA;AACA,EAAA;AACA,EAAA;AACA,IAAA;AACA,IAAA;AACA,EAAA;AACA;AACA;AACA;AACA;AACA;AACA,EAAA;AACA,EAAA;AACA;AACA;AACA;AACA;AACA;AACA,EAAA;AACA,IAAA;AACA,EAAA;AACA;AACA;AACA;AACA,EAAA;AACA;AACA;AACA;AACA;AACA;AACA,EAAA;AACA,EAAA;AACA,IAAA;AACA,IAAA;AACA,MAAA;AACA,MAAA;AACA,MAAA;AACA,MAAA;AACA,QAAA;AACA,MAAA;AACA,IAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA;AACA;AACA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,oBAAA;AACA,MAAA;AACA,IAAA;AACA,oBAAA;AACA,MAAA;AACA,IAAA;AACA,IAAA;AACA,MAAA;AACA,MAAA;AACA,MAAA;AACA,QAAA;AACA,QAAA;AACA,MAAA;AACA,MAAA;AACA,MAAA;AACA,MAAA;AACA,MAAA;AACA,QAAA;AACA,MAAA;AACA,IAAA;AACA,IAAA;AACA,MAAA;AACA,IAAA;AACA,IAAA;AACA,MAAA;AACA,IAAA;AACA,IAAA;AACA,MAAA;AACA,IAAA;AACA,IAAA;AACA,MAAA;AACA,IAAA;AACA,IAAA;AACA,MAAA;AACA,QAAA;AACA,QAAA;AACA,MAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,MAAA;AACA,MAAA;AACA,IAAA;AACA,IAAA;AACA,MAAA;AACA,MAAA;AACA,IAAA;AACA,IAAA;AACA,MAAA;AACA,MAAA;AACA,IAAA;AACA,IAAA;AACA,MAAA;AACA,MAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,EAAA;AACA;AACA;AACA;AACA,EAAA;AACA,IAAA;AACA,IAAA;AACA,EAAA;AACA,EAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","file":"D:\\myproject\\phecda\\packages\\server\\dist\\chunk-H7OCHDZT.js","sourcesContent":[null]}
|