phecda-server 5.0.0-beta.22 → 5.0.0-beta.23
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/index.js +11 -11
- package/dist/index.mjs +15 -15
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -61,7 +61,7 @@ var _phecdacore = require('phecda-core'); _createStarExport(_phecdacore);
|
|
|
61
61
|
|
|
62
62
|
function BaseParam(type, key) {
|
|
63
63
|
return (target, k, index) => {
|
|
64
|
-
_phecdacore.
|
|
64
|
+
_phecdacore.setStateKey.call(void 0, target, k);
|
|
65
65
|
const state = _phecdacore.getOwnState.call(void 0, target, k);
|
|
66
66
|
if (!state.params)
|
|
67
67
|
state.params = [];
|
|
@@ -83,7 +83,7 @@ function BaseParam(type, key) {
|
|
|
83
83
|
_chunkPC6CFB6Sjs.__name.call(void 0, BaseParam, "BaseParam");
|
|
84
84
|
function Pipe(key, opts) {
|
|
85
85
|
return (target, k, index) => {
|
|
86
|
-
_phecdacore.
|
|
86
|
+
_phecdacore.setStateKey.call(void 0, target, k);
|
|
87
87
|
const state = _phecdacore.getOwnState.call(void 0, target, k);
|
|
88
88
|
if (!state.params)
|
|
89
89
|
state.params = [];
|
|
@@ -131,7 +131,7 @@ function Route(route, type) {
|
|
|
131
131
|
if (!key)
|
|
132
132
|
key = _phecdacore.SHARE_KEY;
|
|
133
133
|
target = key === _phecdacore.SHARE_KEY ? target.prototype : target;
|
|
134
|
-
_phecdacore.
|
|
134
|
+
_phecdacore.setStateKey.call(void 0, target, key);
|
|
135
135
|
const state = _phecdacore.getOwnState.call(void 0, target, key);
|
|
136
136
|
state.http = {
|
|
137
137
|
route,
|
|
@@ -170,7 +170,7 @@ function Rpc(...types) {
|
|
|
170
170
|
if (!key)
|
|
171
171
|
key = _phecdacore.SHARE_KEY;
|
|
172
172
|
target = key === _phecdacore.SHARE_KEY ? target.prototype : target;
|
|
173
|
-
_phecdacore.
|
|
173
|
+
_phecdacore.setStateKey.call(void 0, target, key);
|
|
174
174
|
const state = _phecdacore.getOwnState.call(void 0, target, key);
|
|
175
175
|
if (!state.rpc)
|
|
176
176
|
state.rpc = {};
|
|
@@ -184,7 +184,7 @@ function Event(isEvent = true) {
|
|
|
184
184
|
if (!key)
|
|
185
185
|
key = _phecdacore.SHARE_KEY;
|
|
186
186
|
target = key === _phecdacore.SHARE_KEY ? target.prototype : target;
|
|
187
|
-
_phecdacore.
|
|
187
|
+
_phecdacore.setStateKey.call(void 0, target, key);
|
|
188
188
|
const state = _phecdacore.getOwnState.call(void 0, target, key);
|
|
189
189
|
if (!state.rpc)
|
|
190
190
|
state.rpc = {};
|
|
@@ -201,7 +201,7 @@ function Guard(...guards) {
|
|
|
201
201
|
if (!key)
|
|
202
202
|
key = _phecdacore.SHARE_KEY;
|
|
203
203
|
target = key === _phecdacore.SHARE_KEY ? target.prototype : target;
|
|
204
|
-
_phecdacore.
|
|
204
|
+
_phecdacore.setStateKey.call(void 0, target, key);
|
|
205
205
|
const state = _phecdacore.getOwnState.call(void 0, target, key);
|
|
206
206
|
if (!state.guards)
|
|
207
207
|
state.guards = [];
|
|
@@ -215,7 +215,7 @@ function Plugin(...plugins) {
|
|
|
215
215
|
if (!key)
|
|
216
216
|
key = _phecdacore.SHARE_KEY;
|
|
217
217
|
target = key === _phecdacore.SHARE_KEY ? target.prototype : target;
|
|
218
|
-
_phecdacore.
|
|
218
|
+
_phecdacore.setStateKey.call(void 0, target, key);
|
|
219
219
|
const state = _phecdacore.getOwnState.call(void 0, target, key);
|
|
220
220
|
if (!state.plugins)
|
|
221
221
|
state.plugins = [];
|
|
@@ -229,7 +229,7 @@ function Interceptor(...interceptors) {
|
|
|
229
229
|
if (!key)
|
|
230
230
|
key = _phecdacore.SHARE_KEY;
|
|
231
231
|
target = key === _phecdacore.SHARE_KEY ? target.prototype : target;
|
|
232
|
-
_phecdacore.
|
|
232
|
+
_phecdacore.setStateKey.call(void 0, target, key);
|
|
233
233
|
const state = _phecdacore.getOwnState.call(void 0, target, key);
|
|
234
234
|
if (!state.interceptors)
|
|
235
235
|
state.interceptors = [];
|
|
@@ -243,7 +243,7 @@ function Filter(filter) {
|
|
|
243
243
|
if (!key)
|
|
244
244
|
key = _phecdacore.SHARE_KEY;
|
|
245
245
|
target = key === _phecdacore.SHARE_KEY ? target.prototype : target;
|
|
246
|
-
_phecdacore.
|
|
246
|
+
_phecdacore.setStateKey.call(void 0, target, key);
|
|
247
247
|
const state = _phecdacore.getOwnState.call(void 0, target, key);
|
|
248
248
|
state.filter = filter;
|
|
249
249
|
_phecdacore.setState.call(void 0, target, key, state);
|
|
@@ -254,7 +254,7 @@ _chunkPC6CFB6Sjs.__name.call(void 0, Filter, "Filter");
|
|
|
254
254
|
// src/decorators/index.ts
|
|
255
255
|
function Header(name, value) {
|
|
256
256
|
return (target, k) => {
|
|
257
|
-
_phecdacore.
|
|
257
|
+
_phecdacore.setStateKey.call(void 0, target, k);
|
|
258
258
|
const state = _phecdacore.getOwnState.call(void 0, target, k);
|
|
259
259
|
if (!state.header)
|
|
260
260
|
state.header = {};
|
|
@@ -273,7 +273,7 @@ function Define(key, value) {
|
|
|
273
273
|
k = _phecdacore.SHARE_KEY;
|
|
274
274
|
target = target.prototype;
|
|
275
275
|
}
|
|
276
|
-
_phecdacore.
|
|
276
|
+
_phecdacore.setStateKey.call(void 0, target, k);
|
|
277
277
|
const state = _phecdacore.getOwnState.call(void 0, target, k);
|
|
278
278
|
if (!state.define)
|
|
279
279
|
state.define = {};
|
package/dist/index.mjs
CHANGED
|
@@ -55,13 +55,13 @@ import {
|
|
|
55
55
|
} from "./chunk-6UJL6PS3.mjs";
|
|
56
56
|
|
|
57
57
|
// src/decorators/index.ts
|
|
58
|
-
import { SHARE_KEY as SHARE_KEY3, getOwnState as getOwnState4, set, setState as setState4,
|
|
58
|
+
import { SHARE_KEY as SHARE_KEY3, getOwnState as getOwnState4, set, setState as setState4, setStateKey as setStateKey4 } from "phecda-core";
|
|
59
59
|
|
|
60
60
|
// src/decorators/param.ts
|
|
61
|
-
import { getOwnState, setState,
|
|
61
|
+
import { getOwnState, setState, setStateKey } from "phecda-core";
|
|
62
62
|
function BaseParam(type, key) {
|
|
63
63
|
return (target, k, index) => {
|
|
64
|
-
|
|
64
|
+
setStateKey(target, k);
|
|
65
65
|
const state = getOwnState(target, k);
|
|
66
66
|
if (!state.params)
|
|
67
67
|
state.params = [];
|
|
@@ -83,7 +83,7 @@ function BaseParam(type, key) {
|
|
|
83
83
|
__name(BaseParam, "BaseParam");
|
|
84
84
|
function Pipe(key, opts) {
|
|
85
85
|
return (target, k, index) => {
|
|
86
|
-
|
|
86
|
+
setStateKey(target, k);
|
|
87
87
|
const state = getOwnState(target, k);
|
|
88
88
|
if (!state.params)
|
|
89
89
|
state.params = [];
|
|
@@ -125,13 +125,13 @@ function Arg() {
|
|
|
125
125
|
__name(Arg, "Arg");
|
|
126
126
|
|
|
127
127
|
// src/decorators/route.ts
|
|
128
|
-
import { SHARE_KEY, getOwnState as getOwnState2, setState as setState2,
|
|
128
|
+
import { SHARE_KEY, getOwnState as getOwnState2, setState as setState2, setStateKey as setStateKey2 } from "phecda-core";
|
|
129
129
|
function Route(route, type) {
|
|
130
130
|
return (target, key) => {
|
|
131
131
|
if (!key)
|
|
132
132
|
key = SHARE_KEY;
|
|
133
133
|
target = key === SHARE_KEY ? target.prototype : target;
|
|
134
|
-
|
|
134
|
+
setStateKey2(target, key);
|
|
135
135
|
const state = getOwnState2(target, key);
|
|
136
136
|
state.http = {
|
|
137
137
|
route,
|
|
@@ -170,7 +170,7 @@ function Rpc(...types) {
|
|
|
170
170
|
if (!key)
|
|
171
171
|
key = SHARE_KEY;
|
|
172
172
|
target = key === SHARE_KEY ? target.prototype : target;
|
|
173
|
-
|
|
173
|
+
setStateKey2(target, key);
|
|
174
174
|
const state = getOwnState2(target, key);
|
|
175
175
|
if (!state.rpc)
|
|
176
176
|
state.rpc = {};
|
|
@@ -184,7 +184,7 @@ function Event(isEvent = true) {
|
|
|
184
184
|
if (!key)
|
|
185
185
|
key = SHARE_KEY;
|
|
186
186
|
target = key === SHARE_KEY ? target.prototype : target;
|
|
187
|
-
|
|
187
|
+
setStateKey2(target, key);
|
|
188
188
|
const state = getOwnState2(target, key);
|
|
189
189
|
if (!state.rpc)
|
|
190
190
|
state.rpc = {};
|
|
@@ -195,13 +195,13 @@ function Event(isEvent = true) {
|
|
|
195
195
|
__name(Event, "Event");
|
|
196
196
|
|
|
197
197
|
// src/decorators/aop.ts
|
|
198
|
-
import { SHARE_KEY as SHARE_KEY2, getOwnState as getOwnState3, setState as setState3,
|
|
198
|
+
import { SHARE_KEY as SHARE_KEY2, getOwnState as getOwnState3, setState as setState3, setStateKey as setStateKey3 } from "phecda-core";
|
|
199
199
|
function Guard(...guards) {
|
|
200
200
|
return (target, key) => {
|
|
201
201
|
if (!key)
|
|
202
202
|
key = SHARE_KEY2;
|
|
203
203
|
target = key === SHARE_KEY2 ? target.prototype : target;
|
|
204
|
-
|
|
204
|
+
setStateKey3(target, key);
|
|
205
205
|
const state = getOwnState3(target, key);
|
|
206
206
|
if (!state.guards)
|
|
207
207
|
state.guards = [];
|
|
@@ -215,7 +215,7 @@ function Plugin(...plugins) {
|
|
|
215
215
|
if (!key)
|
|
216
216
|
key = SHARE_KEY2;
|
|
217
217
|
target = key === SHARE_KEY2 ? target.prototype : target;
|
|
218
|
-
|
|
218
|
+
setStateKey3(target, key);
|
|
219
219
|
const state = getOwnState3(target, key);
|
|
220
220
|
if (!state.plugins)
|
|
221
221
|
state.plugins = [];
|
|
@@ -229,7 +229,7 @@ function Interceptor(...interceptors) {
|
|
|
229
229
|
if (!key)
|
|
230
230
|
key = SHARE_KEY2;
|
|
231
231
|
target = key === SHARE_KEY2 ? target.prototype : target;
|
|
232
|
-
|
|
232
|
+
setStateKey3(target, key);
|
|
233
233
|
const state = getOwnState3(target, key);
|
|
234
234
|
if (!state.interceptors)
|
|
235
235
|
state.interceptors = [];
|
|
@@ -243,7 +243,7 @@ function Filter(filter) {
|
|
|
243
243
|
if (!key)
|
|
244
244
|
key = SHARE_KEY2;
|
|
245
245
|
target = key === SHARE_KEY2 ? target.prototype : target;
|
|
246
|
-
|
|
246
|
+
setStateKey3(target, key);
|
|
247
247
|
const state = getOwnState3(target, key);
|
|
248
248
|
state.filter = filter;
|
|
249
249
|
setState3(target, key, state);
|
|
@@ -254,7 +254,7 @@ __name(Filter, "Filter");
|
|
|
254
254
|
// src/decorators/index.ts
|
|
255
255
|
function Header(name, value) {
|
|
256
256
|
return (target, k) => {
|
|
257
|
-
|
|
257
|
+
setStateKey4(target, k);
|
|
258
258
|
const state = getOwnState4(target, k);
|
|
259
259
|
if (!state.header)
|
|
260
260
|
state.header = {};
|
|
@@ -273,7 +273,7 @@ function Define(key, value) {
|
|
|
273
273
|
k = SHARE_KEY3;
|
|
274
274
|
target = target.prototype;
|
|
275
275
|
}
|
|
276
|
-
|
|
276
|
+
setStateKey4(target, k);
|
|
277
277
|
const state = getOwnState4(target, k);
|
|
278
278
|
if (!state.define)
|
|
279
279
|
state.define = {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "phecda-server",
|
|
3
|
-
"version": "5.0.0-beta.
|
|
3
|
+
"version": "5.0.0-beta.23",
|
|
4
4
|
"description": "provide express middlewares, `nestjs` format",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -129,7 +129,7 @@
|
|
|
129
129
|
"hyper-express": "^6.15.2",
|
|
130
130
|
"picocolors": "^1.0.0",
|
|
131
131
|
"reflect-metadata": "^0.1.13",
|
|
132
|
-
"phecda-core": "3.0.0-beta.
|
|
132
|
+
"phecda-core": "3.0.0-beta.15"
|
|
133
133
|
},
|
|
134
134
|
"scripts": {
|
|
135
135
|
"dev": "tsup --watch",
|