@maiyunnet/kebab 2.0.3 → 2.0.5
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/index.d.ts +14 -0
- package/index.js +1 -1
- package/lib/buffer.d.ts +25 -0
- package/lib/captcha.d.ts +12 -0
- package/lib/consistent.d.ts +20 -0
- package/lib/core.d.ts +85 -0
- package/lib/crypto.d.ts +47 -0
- package/lib/db.d.ts +88 -0
- package/lib/dns.d.ts +75 -0
- package/lib/fs.d.ts +49 -0
- package/lib/jwt.d.ts +30 -0
- package/lib/kv.d.ts +111 -0
- package/lib/lan.d.ts +10 -0
- package/lib/net/formdata.d.ts +23 -0
- package/lib/net/request.d.ts +23 -0
- package/lib/net/response.d.ts +14 -0
- package/lib/net.d.ts +65 -0
- package/lib/s3.d.ts +35 -0
- package/lib/scan.d.ts +31 -0
- package/lib/session.d.ts +22 -0
- package/lib/sql.d.ts +57 -0
- package/lib/ssh/sftp.d.ts +40 -0
- package/lib/ssh/shell.d.ts +13 -0
- package/lib/ssh.d.ts +24 -0
- package/lib/text.d.ts +40 -0
- package/lib/time.d.ts +22 -0
- package/lib/ws.d.ts +87 -0
- package/lib/zip.d.ts +40 -0
- package/lib/zlib.d.ts +25 -0
- package/main.d.ts +1 -0
- package/package.json +1 -1
- package/sys/child.d.ts +1 -0
- package/sys/cmd.d.ts +1 -0
- package/sys/ctr.d.ts +96 -0
- package/sys/master.d.ts +1 -0
- package/sys/mod.d.ts +205 -0
- package/sys/route.d.ts +31 -0
- package/tsconfig.json +1 -1
- package/www/example/ctr/main.d.ts +4 -0
- package/www/example/ctr/middle.d.ts +6 -0
- package/www/example/ctr/test.d.ts +94 -0
- package/www/example/mod/test.d.ts +20 -0
- package/www/example/mod/testdata.d.ts +9 -0
- package/www/example/ws/mproxy.d.ts +4 -0
- package/www/example/ws/rproxy.d.ts +4 -0
- package/www/example/ws/test.d.ts +7 -0
- package/index.ts +0 -33
- package/lib/buffer.ts +0 -152
- package/lib/captcha.ts +0 -63
- package/lib/consistent.ts +0 -219
- package/lib/core.ts +0 -880
- package/lib/crypto.ts +0 -384
- package/lib/db.ts +0 -719
- package/lib/dns.ts +0 -405
- package/lib/fs.ts +0 -527
- package/lib/jwt.ts +0 -276
- package/lib/kv.ts +0 -1489
- package/lib/lan.ts +0 -87
- package/lib/net/formdata.ts +0 -166
- package/lib/net/request.ts +0 -150
- package/lib/net/response.ts +0 -59
- package/lib/net.ts +0 -662
- package/lib/s3.ts +0 -235
- package/lib/scan.ts +0 -364
- package/lib/session.ts +0 -230
- package/lib/sql.ts +0 -1149
- package/lib/ssh/sftp.ts +0 -508
- package/lib/ssh/shell.ts +0 -123
- package/lib/ssh.ts +0 -191
- package/lib/text.ts +0 -626
- package/lib/time.ts +0 -254
- package/lib/ws.ts +0 -523
- package/lib/zip.ts +0 -447
- package/lib/zlib.ts +0 -350
- package/main.ts +0 -27
- package/sys/child.ts +0 -678
- package/sys/cmd.ts +0 -225
- package/sys/ctr.ts +0 -904
- package/sys/master.ts +0 -355
- package/sys/mod.ts +0 -1871
- package/sys/route.ts +0 -1113
- package/www/example/ctr/main.ts +0 -9
- package/www/example/ctr/middle.ts +0 -26
- package/www/example/ctr/test.ts +0 -3218
- package/www/example/mod/test.ts +0 -47
- package/www/example/mod/testdata.ts +0 -30
- package/www/example/ws/mproxy.ts +0 -16
- package/www/example/ws/rproxy.ts +0 -14
- package/www/example/ws/test.ts +0 -36
package/www/example/ctr/main.ts
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import * as ctr from '~/sys/ctr';
|
|
2
|
-
import * as types from '~/types';
|
|
3
|
-
|
|
4
|
-
export default class extends ctr.Ctr {
|
|
5
|
-
|
|
6
|
-
public onLoad(): string | boolean {
|
|
7
|
-
if (this._config.const.path !== 'test/middle') {
|
|
8
|
-
return true;
|
|
9
|
-
}
|
|
10
|
-
return '_action: ' + this._action + "<br><br>In fact, the middle method does not exist in the test controller, which uses Kebab's middle structure to preprocess requests.";
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
public onUnload(rtn: string | boolean | types.DbValue[]): string | boolean | types.DbValue[] {
|
|
14
|
-
if (!Array.isArray(rtn)) {
|
|
15
|
-
return rtn;
|
|
16
|
-
}
|
|
17
|
-
if (rtn[0] !== -101) {
|
|
18
|
-
return rtn;
|
|
19
|
-
}
|
|
20
|
-
rtn.push({
|
|
21
|
-
'middle': 'unload'
|
|
22
|
-
});
|
|
23
|
-
return rtn;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
}
|