@kevisual/router 0.0.71 → 0.0.73

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/ws.d.ts CHANGED
@@ -217,7 +217,7 @@ declare class Route<U = {
217
217
  define<T extends {
218
218
  [key: string]: any;
219
219
  } = RouterContextT>(path: string, key: string, fn: Run<T & U>): this;
220
- update(opts: DefineRouteOpts, checkList?: string[]): this;
220
+ update(opts: DefineRouteOpts, onlyUpdateList?: string[]): this;
221
221
  addTo(router: QueryRouter | {
222
222
  add: (route: Route) => void;
223
223
  [key: string]: any;
@@ -255,7 +255,7 @@ declare class QueryRouter {
255
255
  * remove route by id
256
256
  * @param uniqueId
257
257
  */
258
- removeById(unique: string): void;
258
+ removeById(uniqueId: string): void;
259
259
  /**
260
260
  * 执行route
261
261
  * @param path
@@ -373,7 +373,11 @@ declare class QueryRouter {
373
373
  }): Route<{
374
374
  [key: string]: any;
375
375
  }, SimpleObject>;
376
- createRouteList(force?: boolean, filter?: (route: Route) => boolean): void;
376
+ createRouteList(opts?: {
377
+ force?: boolean;
378
+ filter?: (route: Route) => boolean;
379
+ middleware?: string[];
380
+ }): void;
377
381
  /**
378
382
  * 等待程序运行, 获取到message的数据,就执行
379
383
  * params 是预设参数
@@ -390,6 +394,7 @@ declare class QueryRouter {
390
394
  getList?: boolean;
391
395
  force?: boolean;
392
396
  filter?: (route: Route) => boolean;
397
+ routeListMiddleware?: string[];
393
398
  }): Promise<void>;
394
399
  toJSONSchema: (route: RouteInfo) => Pick<RouteInfo, "path" | "key" | "id" | "description" | "type" | "middleware" | "metadata">;
395
400
  fromJSONSchema: (route: RouteInfo) => RouteInfo;