@kevisual/router 0.1.0 → 0.1.2
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 +9 -11
- package/dist/commander.js +562 -15
- 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 +13 -8
- package/src/app.ts +1 -1
- package/src/commander.ts +71 -10
- package/src/route.ts +6 -15
- package/src/utils/random.ts +11 -2
package/dist/commander.d.ts
CHANGED
|
@@ -147,14 +147,6 @@ type RouteOpts<U = {}, T = SimpleObject> = {
|
|
|
147
147
|
metadata?: T;
|
|
148
148
|
middleware?: RouteMiddleware[];
|
|
149
149
|
type?: 'route' | 'middleware' | 'compound';
|
|
150
|
-
/**
|
|
151
|
-
* $#$ will be used to split path and key
|
|
152
|
-
*/
|
|
153
|
-
idUsePath?: boolean;
|
|
154
|
-
/**
|
|
155
|
-
* id 合并的分隔符,默认为 $#$
|
|
156
|
-
*/
|
|
157
|
-
delimiter?: string;
|
|
158
150
|
isDebug?: boolean;
|
|
159
151
|
};
|
|
160
152
|
type DefineRouteOpts = Omit<RouteOpts, 'idUsePath' | 'nextRoute'>;
|
|
@@ -805,14 +797,20 @@ declare const groupByPath: (routes: App["routes"]) => Record<string, Route<Simpl
|
|
|
805
797
|
declare const parseArgs: (args: string) => any;
|
|
806
798
|
declare const parseDescription: (route: App["routes"][number]) => string;
|
|
807
799
|
declare const createCommand: (opts: {
|
|
808
|
-
app:
|
|
800
|
+
app: any;
|
|
809
801
|
program: Command;
|
|
810
802
|
}) => void;
|
|
811
803
|
declare const parse: (opts: {
|
|
812
|
-
app:
|
|
804
|
+
app: any;
|
|
813
805
|
description?: string;
|
|
814
806
|
parse?: boolean;
|
|
807
|
+
version?: string;
|
|
815
808
|
program?: Command;
|
|
816
|
-
|
|
809
|
+
remote?: {
|
|
810
|
+
token?: string;
|
|
811
|
+
username?: string;
|
|
812
|
+
id?: string;
|
|
813
|
+
};
|
|
814
|
+
}) => Promise<void>;
|
|
817
815
|
|
|
818
816
|
export { createCommand, groupByPath, parse, parseArgs, parseDescription };
|