@kevisual/router 0.0.6 → 0.0.7
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/router-browser.d.ts +18 -0
- package/dist/router-browser.js +279 -90
- package/dist/router-sign.js +7 -7
- package/dist/router-simple.d.ts +1 -1
- package/dist/router.d.ts +18 -0
- package/dist/router.js +278 -90
- package/package.json +1 -1
package/dist/router-sign.js
CHANGED
|
@@ -6527,16 +6527,16 @@ function requireAsn1 () {
|
|
|
6527
6527
|
*/
|
|
6528
6528
|
asn1$1.integerToDer = function(x) {
|
|
6529
6529
|
var rval = forge.util.createBuffer();
|
|
6530
|
-
if(x >= -
|
|
6530
|
+
if(x >= -128 && x < 0x80) {
|
|
6531
6531
|
return rval.putSignedInt(x, 8);
|
|
6532
6532
|
}
|
|
6533
|
-
if(x >= -
|
|
6533
|
+
if(x >= -32768 && x < 0x8000) {
|
|
6534
6534
|
return rval.putSignedInt(x, 16);
|
|
6535
6535
|
}
|
|
6536
|
-
if(x >= -
|
|
6536
|
+
if(x >= -8388608 && x < 0x800000) {
|
|
6537
6537
|
return rval.putSignedInt(x, 24);
|
|
6538
6538
|
}
|
|
6539
|
-
if(x >= -
|
|
6539
|
+
if(x >= -2147483648 && x < 0x80000000) {
|
|
6540
6540
|
return rval.putSignedInt(x, 32);
|
|
6541
6541
|
}
|
|
6542
6542
|
var error = new Error('Integer too large; max is 32-bits.');
|
|
@@ -7828,7 +7828,7 @@ function requireDes () {
|
|
|
7828
7828
|
/** DES implementation **/
|
|
7829
7829
|
|
|
7830
7830
|
var spfunction1 = [0x1010400,0,0x10000,0x1010404,0x1010004,0x10404,0x4,0x10000,0x400,0x1010400,0x1010404,0x400,0x1000404,0x1010004,0x1000000,0x4,0x404,0x1000400,0x1000400,0x10400,0x10400,0x1010000,0x1010000,0x1000404,0x10004,0x1000004,0x1000004,0x10004,0,0x404,0x10404,0x1000000,0x10000,0x1010404,0x4,0x1010000,0x1010400,0x1000000,0x1000000,0x400,0x1010004,0x10000,0x10400,0x1000004,0x400,0x4,0x1000404,0x10404,0x1010404,0x10004,0x1010000,0x1000404,0x1000004,0x404,0x10404,0x1010400,0x404,0x1000400,0x1000400,0,0x10004,0x10400,0,0x1010004];
|
|
7831
|
-
var spfunction2 = [-
|
|
7831
|
+
var spfunction2 = [-2146402272,-2147450880,0x8000,0x108020,0x100000,0x20,-2146435040,-2147450848,-2147483616,-2146402272,-2146402304,-2147483648,-2147450880,0x100000,0x20,-2146435040,0x108000,0x100020,-2147450848,0,-2147483648,0x8000,0x108020,-2146435072,0x100020,-2147483616,0,0x108000,0x8020,-2146402304,-2146435072,0x8020,0,0x108020,-2146435040,0x100000,-2147450848,-2146435072,-2146402304,0x8000,-2146435072,-2147450880,0x20,-2146402272,0x108020,0x20,0x8000,-2147483648,0x8020,-2146402304,0x100000,-2147483616,0x100020,-2147450848,-2147483616,0x100020,0x108000,0,-2147450880,0x8020,-2147483648,-2146435040,-2146402272,0x108000];
|
|
7832
7832
|
var spfunction3 = [0x208,0x8020200,0,0x8020008,0x8000200,0,0x20208,0x8000200,0x20008,0x8000008,0x8000008,0x20000,0x8020208,0x20008,0x8020000,0x208,0x8000000,0x8,0x8020200,0x200,0x20200,0x8020000,0x8020008,0x20208,0x8000208,0x20200,0x20000,0x8000208,0x8,0x8020208,0x200,0x8000000,0x8020200,0x8000000,0x20008,0x208,0x20000,0x8020200,0x8000200,0,0x200,0x20008,0x8020208,0x8000200,0x8000008,0x200,0,0x8020008,0x8000208,0x20000,0x8000000,0x8020208,0x8,0x20208,0x20200,0x8000008,0x8020000,0x8000208,0x208,0x8020000,0x20208,0x8,0x8020008,0x20200];
|
|
7833
7833
|
var spfunction4 = [0x802001,0x2081,0x2081,0x80,0x802080,0x800081,0x800001,0x2001,0,0x802000,0x802000,0x802081,0x81,0,0x800080,0x800001,0x1,0x2000,0x800000,0x802001,0x80,0x800000,0x2001,0x2080,0x800081,0x1,0x2080,0x800080,0x2000,0x802080,0x802081,0x81,0x800080,0x800001,0x802000,0x802081,0x81,0,0,0x802000,0x2080,0x800080,0x800081,0x1,0x802001,0x2081,0x2081,0x80,0x802081,0x81,0x1,0x2000,0x800001,0x2001,0x802080,0x800081,0x2001,0x2080,0x800000,0x802001,0x80,0x800000,0x2000,0x802080];
|
|
7834
7834
|
var spfunction5 = [0x100,0x2080100,0x2080000,0x42000100,0x80000,0x100,0x40000000,0x2080000,0x40080100,0x80000,0x2000100,0x40080100,0x42000100,0x42080000,0x80100,0x40000000,0x2000000,0x40080000,0x40080000,0,0x40000100,0x42080100,0x42080100,0x2000100,0x42080000,0x40000100,0,0x42000000,0x2080100,0x2000000,0x42000000,0x80100,0x80000,0x42000100,0x100,0x2000000,0x40000000,0x2080000,0x42000100,0x40080100,0x2000100,0x40000000,0x42080000,0x2080100,0x40080100,0x100,0x2000000,0x42080000,0x42080100,0x80100,0x42000000,0x42080100,0x2080000,0,0x40080000,0x42000000,0x80100,0x2000100,0x40000100,0x80000,0,0x40080000,0x2080100,0x40000100];
|
|
@@ -7920,8 +7920,8 @@ function requireDes () {
|
|
|
7920
7920
|
left = (left << 1) | (left >>> 27);
|
|
7921
7921
|
right = (right << 1) | (right >>> 27);
|
|
7922
7922
|
}
|
|
7923
|
-
left &= -
|
|
7924
|
-
right &= -
|
|
7923
|
+
left &= -15;
|
|
7924
|
+
right &= -15;
|
|
7925
7925
|
|
|
7926
7926
|
// now apply PC-2, in such a way that E is easier when encrypting or
|
|
7927
7927
|
// decrypting this conversion will look like PC-2 except only the last 6
|
package/dist/router-simple.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as querystring from 'querystring';
|
|
2
2
|
import { Key } from 'path-to-regexp';
|
|
3
|
-
import {
|
|
3
|
+
import { IncomingMessage, ServerResponse } from 'http';
|
|
4
4
|
|
|
5
5
|
type Req = IncomingMessage & {
|
|
6
6
|
params?: Record<string, string>;
|
package/dist/router.d.ts
CHANGED
|
@@ -98,6 +98,9 @@ type RouteOpts = {
|
|
|
98
98
|
run?: Run;
|
|
99
99
|
nextRoute?: NextRoute;
|
|
100
100
|
description?: string;
|
|
101
|
+
metadata?: {
|
|
102
|
+
[key: string]: any;
|
|
103
|
+
};
|
|
101
104
|
middleware?: Route[] | string[];
|
|
102
105
|
type?: 'route' | 'middleware';
|
|
103
106
|
/**
|
|
@@ -129,13 +132,22 @@ type RouteInfo = Pick<Route, (typeof pickValue)[number]>;
|
|
|
129
132
|
declare class Route<U = {
|
|
130
133
|
[key: string]: any;
|
|
131
134
|
}> {
|
|
135
|
+
/**
|
|
136
|
+
* 一级路径
|
|
137
|
+
*/
|
|
132
138
|
path?: string;
|
|
139
|
+
/**
|
|
140
|
+
* 二级路径
|
|
141
|
+
*/
|
|
133
142
|
key?: string;
|
|
134
143
|
id?: string;
|
|
135
144
|
share?: boolean;
|
|
136
145
|
run?: Run;
|
|
137
146
|
nextRoute?: NextRoute;
|
|
138
147
|
description?: string;
|
|
148
|
+
metadata?: {
|
|
149
|
+
[key: string]: any;
|
|
150
|
+
};
|
|
139
151
|
middleware?: (Route | string)[];
|
|
140
152
|
type?: string;
|
|
141
153
|
private _validator?;
|
|
@@ -143,7 +155,13 @@ declare class Route<U = {
|
|
|
143
155
|
[key: string]: Schema<any>;
|
|
144
156
|
};
|
|
145
157
|
data?: any;
|
|
158
|
+
/**
|
|
159
|
+
* 是否需要验证
|
|
160
|
+
*/
|
|
146
161
|
isVerify?: boolean;
|
|
162
|
+
/**
|
|
163
|
+
* 是否开启debug,开启后会打印错误信息
|
|
164
|
+
*/
|
|
147
165
|
isDebug?: boolean;
|
|
148
166
|
constructor(path: string, key?: string, opts?: RouteOpts);
|
|
149
167
|
private createSchema;
|