@kevisual/router 0.1.1 → 0.1.3
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/app.js +774 -281
- package/dist/commander.d.ts +10 -11
- package/dist/commander.js +551 -13
- package/dist/opencode.d.ts +0 -8
- package/dist/opencode.js +567 -84
- package/dist/router-browser.d.ts +0 -8
- package/dist/router-browser.js +18868 -275
- package/dist/router-define.d.ts +0 -8
- package/dist/router-simple.js +16 -2
- package/dist/router.d.ts +0 -8
- package/dist/router.js +752 -259
- package/dist/ws.d.ts +0 -8
- package/dist/ws.js +49 -24
- package/package.json +14 -9
- package/src/app.ts +1 -1
- package/src/commander.ts +61 -6
- package/src/route.ts +6 -15
- package/src/utils/random.ts +11 -2
package/dist/router-define.d.ts
CHANGED
|
@@ -144,14 +144,6 @@ type RouteOpts<U = {}, T = SimpleObject$1> = {
|
|
|
144
144
|
metadata?: T;
|
|
145
145
|
middleware?: RouteMiddleware[];
|
|
146
146
|
type?: 'route' | 'middleware' | 'compound';
|
|
147
|
-
/**
|
|
148
|
-
* $#$ will be used to split path and key
|
|
149
|
-
*/
|
|
150
|
-
idUsePath?: boolean;
|
|
151
|
-
/**
|
|
152
|
-
* id 合并的分隔符,默认为 $#$
|
|
153
|
-
*/
|
|
154
|
-
delimiter?: string;
|
|
155
147
|
isDebug?: boolean;
|
|
156
148
|
};
|
|
157
149
|
type DefineRouteOpts = Omit<RouteOpts, 'idUsePath' | 'nextRoute'>;
|
package/dist/router-simple.js
CHANGED
|
@@ -3,20 +3,34 @@ var __getProtoOf = Object.getPrototypeOf;
|
|
|
3
3
|
var __defProp = Object.defineProperty;
|
|
4
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
5
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
function __accessProp(key) {
|
|
7
|
+
return this[key];
|
|
8
|
+
}
|
|
9
|
+
var __toESMCache_node;
|
|
10
|
+
var __toESMCache_esm;
|
|
6
11
|
var __toESM = (mod, isNodeMode, target) => {
|
|
12
|
+
var canCache = mod != null && typeof mod === "object";
|
|
13
|
+
if (canCache) {
|
|
14
|
+
var cache = isNodeMode ? __toESMCache_node ??= new WeakMap : __toESMCache_esm ??= new WeakMap;
|
|
15
|
+
var cached = cache.get(mod);
|
|
16
|
+
if (cached)
|
|
17
|
+
return cached;
|
|
18
|
+
}
|
|
7
19
|
target = mod != null ? __create(__getProtoOf(mod)) : {};
|
|
8
20
|
const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
|
|
9
21
|
for (let key of __getOwnPropNames(mod))
|
|
10
22
|
if (!__hasOwnProp.call(to, key))
|
|
11
23
|
__defProp(to, key, {
|
|
12
|
-
get: (
|
|
24
|
+
get: __accessProp.bind(mod, key),
|
|
13
25
|
enumerable: true
|
|
14
26
|
});
|
|
27
|
+
if (canCache)
|
|
28
|
+
cache.set(mod, to);
|
|
15
29
|
return to;
|
|
16
30
|
};
|
|
17
31
|
var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
|
|
18
32
|
|
|
19
|
-
// node_modules/.pnpm/path-to-regexp@8.3.0/node_modules/path-to-regexp/dist/index.js
|
|
33
|
+
// ../../node_modules/.pnpm/path-to-regexp@8.3.0/node_modules/path-to-regexp/dist/index.js
|
|
20
34
|
var require_dist = __commonJS((exports) => {
|
|
21
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
36
|
exports.PathError = exports.TokenData = undefined;
|
package/dist/router.d.ts
CHANGED
|
@@ -194,14 +194,6 @@ type RouteOpts<U = {}, T = SimpleObject$1> = {
|
|
|
194
194
|
metadata?: T;
|
|
195
195
|
middleware?: RouteMiddleware[];
|
|
196
196
|
type?: 'route' | 'middleware' | 'compound';
|
|
197
|
-
/**
|
|
198
|
-
* $#$ will be used to split path and key
|
|
199
|
-
*/
|
|
200
|
-
idUsePath?: boolean;
|
|
201
|
-
/**
|
|
202
|
-
* id 合并的分隔符,默认为 $#$
|
|
203
|
-
*/
|
|
204
|
-
delimiter?: string;
|
|
205
197
|
isDebug?: boolean;
|
|
206
198
|
};
|
|
207
199
|
type DefineRouteOpts = Omit<RouteOpts, 'idUsePath' | 'nextRoute'>;
|