@eggjs/router 4.0.0-beta.19 → 4.0.0-beta.21

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/index.d.ts CHANGED
@@ -1,9 +1,7 @@
1
- import { MiddlewareFunc, MiddlewareFuncWithParamProperty, MiddlewareFuncWithRouter, Next, ParamMiddlewareFunc, ResourcesController } from "./types.js";
2
- import { Layer, LayerOptions, LayerURLOptions } from "./Layer.js";
3
- import { AllowedMethodsOptions, MatchedResult, RegisterOptions, Router, RouterMethod, RouterOptions } from "./Router.js";
4
- import { EggRouter } from "./EggRouter.js";
5
-
6
- //#region src/index.d.ts
7
- declare const KoaRouter: typeof Router;
8
- //#endregion
9
- export { AllowedMethodsOptions, EggRouter, KoaRouter, Layer, LayerOptions, LayerURLOptions, MatchedResult, MiddlewareFunc, MiddlewareFuncWithParamProperty, MiddlewareFuncWithRouter, Next, ParamMiddlewareFunc, RegisterOptions, ResourcesController, Router, RouterMethod, RouterOptions, Router as default };
1
+ import { Router } from './Router.ts';
2
+ export type * from './types.ts';
3
+ export * from './Layer.ts';
4
+ export * from './Router.ts';
5
+ export * from './EggRouter.ts';
6
+ export declare const KoaRouter: typeof Router;
7
+ export default Router;
package/dist/index.js CHANGED
@@ -1,10 +1,7 @@
1
- import { Layer } from "./Layer.js";
2
1
  import { Router } from "./Router.js";
3
- import { EggRouter } from "./EggRouter.js";
4
-
5
- //#region src/index.ts
6
- const KoaRouter = Router;
7
- var src_default = Router;
8
-
9
- //#endregion
10
- export { EggRouter, KoaRouter, Layer, Router, src_default as default };
2
+ export * from "./Layer.js";
3
+ export * from "./Router.js";
4
+ export * from "./EggRouter.js";
5
+ export const KoaRouter = Router;
6
+ export default Router;
7
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLE1BQU0sRUFBRSxNQUFNLGFBQWEsQ0FBQztBQUdyQyxjQUFjLFlBQVksQ0FBQztBQUMzQixjQUFjLGFBQWEsQ0FBQztBQUM1QixjQUFjLGdCQUFnQixDQUFDO0FBRS9CLE1BQU0sQ0FBQyxNQUFNLFNBQVMsR0FBRyxNQUFNLENBQUM7QUFDaEMsZUFBZSxNQUFNLENBQUMifQ==
package/dist/types.d.ts CHANGED
@@ -1,21 +1,18 @@
1
- //#region src/types.d.ts
2
- type Next = () => Promise<void>;
3
- type MiddlewareFunc = (ctx: any, next: Next) => Promise<void> | void;
4
- type MiddlewareFuncWithParamProperty = MiddlewareFunc & {
5
- param?: string;
1
+ export type Next = () => Promise<void>;
2
+ export type MiddlewareFunc = (ctx: any, next: Next) => Promise<void> | void;
3
+ export type MiddlewareFuncWithParamProperty = MiddlewareFunc & {
4
+ param?: string;
6
5
  };
7
- type ParamMiddlewareFunc = (param: string, ctx: any, next: Next) => Promise<void> | void;
8
- type MiddlewareFuncWithRouter<T> = MiddlewareFunc & {
9
- router: T;
6
+ export type ParamMiddlewareFunc = (param: string, ctx: any, next: Next) => Promise<void> | void;
7
+ export type MiddlewareFuncWithRouter<T> = MiddlewareFunc & {
8
+ router: T;
10
9
  };
11
- interface ResourcesController {
12
- index?: MiddlewareFunc;
13
- new?: MiddlewareFunc;
14
- create?: MiddlewareFunc;
15
- show?: MiddlewareFunc;
16
- edit?: MiddlewareFunc;
17
- update?: MiddlewareFunc;
18
- destroy?: MiddlewareFunc;
10
+ export interface ResourcesController {
11
+ index?: MiddlewareFunc;
12
+ new?: MiddlewareFunc;
13
+ create?: MiddlewareFunc;
14
+ show?: MiddlewareFunc;
15
+ edit?: MiddlewareFunc;
16
+ update?: MiddlewareFunc;
17
+ destroy?: MiddlewareFunc;
19
18
  }
20
- //#endregion
21
- export { MiddlewareFunc, MiddlewareFuncWithParamProperty, MiddlewareFuncWithRouter, Next, ParamMiddlewareFunc, ResourcesController };
package/dist/types.js CHANGED
@@ -1 +1,2 @@
1
- export { };
1
+ export {};
2
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHlwZXMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvdHlwZXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiJ9
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eggjs/router",
3
- "version": "4.0.0-beta.19",
3
+ "version": "4.0.0-beta.21",
4
4
  "engines": {
5
5
  "node": ">=22.18.0"
6
6
  },
@@ -39,9 +39,9 @@
39
39
  "tsdown": "^0.15.4",
40
40
  "typescript": "^5.9.3",
41
41
  "vitest": "4.0.0-beta.16",
42
- "@eggjs/koa": "3.1.0-beta.19",
43
- "@eggjs/tsconfig": "3.1.0-beta.19",
44
- "@eggjs/supertest": "9.0.0-beta.19"
42
+ "@eggjs/koa": "3.1.0-beta.21",
43
+ "@eggjs/supertest": "9.0.0-beta.21",
44
+ "@eggjs/tsconfig": "3.1.0-beta.21"
45
45
  },
46
46
  "license": "MIT",
47
47
  "files": [
@@ -66,7 +66,7 @@
66
66
  "lint": "oxlint --type-aware",
67
67
  "typecheck": "tsc --noEmit",
68
68
  "test": "vitest run",
69
- "build": "tsdown",
69
+ "build": "tsdown && rimraf dist && tsc -b --clean && tsc",
70
70
  "prebench": "npm run build",
71
71
  "bench": "cd bench && make"
72
72
  }