@ldsg/route 0.3.10 → 0.3.17

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.
@@ -1 +1 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,+BAA+B,EAAE,MAAM,eAAe,CAAC;AAChE,OAAO,EAAE,0CAA0C,EAAE,MAAM,2BAA2B,CAAC;AACvF,OAAO,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAC;AAEtD;;;GAGG;AACH,eAAO,MAAM,sDAAsD,EAAE,uBAGpE,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,uDAAuD,EAAE,+BAOrE,CAAC;AAEF,eAAO,MAAM,6CAA6C,EAAE,uBAG3D,CAAC;AAEF,eAAO,MAAM,8CAA8C,EAAE,0CAE5D,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,kDAAkD,EAAE,uBAGhE,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,mDAAmD,EAAE,+BAWjE,CAAC"}
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,+BAA+B,EAAE,MAAM,eAAe,CAAC;AAChE,OAAO,EAAE,0CAA0C,EAAE,MAAM,2BAA2B,CAAC;AACvF,OAAO,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAC;AAEtD;;;GAGG;AACH,eAAO,MAAM,sDAAsD,EAAE,uBAGpE,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,uDAAuD,EAAE,+BAOrE,CAAC;AAEF,eAAO,MAAM,6CAA6C,EAAE,uBAG3D,CAAC;AAEF,eAAO,MAAM,8CAA8C,EAAE,0CAE5D,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,kDAAkD,EAAE,uBAGhE,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,mDAAmD,EAAE,+BAajE,CAAC"}
package/dist/constants.js CHANGED
@@ -42,9 +42,11 @@ exports.DEFAULT_EXTENDED_HANDLER_GENERAL_RESOURCE_SETTINGS = {
42
42
  * 默认扩展处理程序特殊资源配置
43
43
  */
44
44
  exports.DEFAULT_EXTENDED_HANDLER_SPECIFIC_RESOURCE_SETTINGS = {
45
- code: `import { RequestHandler } from "express";
45
+ code: `import { RouteResourceExtendedHandler } from "@ldsg/route";
46
+
47
+ export const handler: RouteResourceExtendedHandler = (params) => {
48
+ const { req, res } = params
46
49
 
47
- const handler: RequestHandler = (req, res) => {
48
50
  res.send("Hello, World!");
49
51
  };`,
50
52
  dependencies: [
@@ -1,7 +1,8 @@
1
1
  import { ResourceExtendedHandler } from '@ldsg/handler';
2
+ import { Request, Response } from 'express';
2
3
  interface RouteResourceExtendedHandlerParams {
3
- req: any;
4
- res: any;
4
+ req: Request;
5
+ res: Response;
5
6
  }
6
7
  export type RouteResourceExtendedHandler = ResourceExtendedHandler<RouteResourceExtendedHandlerParams, void>;
7
8
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"resource-extended-handler.d.ts","sourceRoot":"","sources":["../../src/types/resource-extended-handler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,eAAe,CAAC;AAExD,UAAU,kCAAkC;IAC1C,GAAG,EAAE,GAAG,CAAC;IACT,GAAG,EAAE,GAAG,CAAC;CACV;AAED,MAAM,MAAM,4BAA4B,GAAG,uBAAuB,CAAC,kCAAkC,EAAE,IAAI,CAAC,CAAC"}
1
+ {"version":3,"file":"resource-extended-handler.d.ts","sourceRoot":"","sources":["../../src/types/resource-extended-handler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,eAAe,CAAC;AACxD,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAE5C,UAAU,kCAAkC;IAC1C,GAAG,EAAE,OAAO,CAAC;IACb,GAAG,EAAE,QAAQ,CAAC;CACf;AAED,MAAM,MAAM,4BAA4B,GAAG,uBAAuB,CAAC,kCAAkC,EAAE,IAAI,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ldsg/route",
3
- "version": "0.3.10",
3
+ "version": "0.3.17",
4
4
  "description": "",
5
5
  "keywords": [],
6
6
  "license": "MIT",
@@ -11,28 +11,29 @@
11
11
  "dist/"
12
12
  ],
13
13
  "dependencies": {
14
- "@ldsg/handler": "0.3.10",
15
- "@ldsg/resource": "0.3.10",
16
- "@ldsg/resource-definition": "0.3.10"
14
+ "@ldsg/handler": "0.3.17",
15
+ "@ldsg/resource": "0.3.17",
16
+ "@ldsg/resource-definition": "0.3.17"
17
17
  },
18
18
  "devDependencies": {
19
- "@types/express": "^5.0.1",
19
+ "@types/express": "^4.17.17",
20
20
  "@types/jest": "^29.5.2",
21
21
  "@types/supertest": "^6.0.0",
22
- "express": "^5.1.0",
22
+ "express": "^4.18.2",
23
23
  "jest": "^29.5.0",
24
24
  "supertest": "^6.3.4",
25
25
  "ts-jest": "^29.1.5",
26
26
  "ts-node": "^10.9.2",
27
27
  "typescript": "^5.8.3",
28
- "@ldsg/application": "0.3.10",
29
- "@ldsg/types": "0.3.10"
28
+ "@ldsg/application": "0.3.17",
29
+ "@ldsg/types": "0.3.17"
30
30
  },
31
31
  "publishConfig": {
32
32
  "access": "public"
33
33
  },
34
34
  "scripts": {
35
35
  "build": "tsc --project tsconfig.build.json",
36
- "clean": "rm -rf dist"
36
+ "clean": "rm -rf dist",
37
+ "test": "jest"
37
38
  }
38
39
  }
@@ -1,9 +0,0 @@
1
- import { Handler, HandlerWithHandlerResourceInstance } from '@ldsg/handler';
2
- interface RouteResourceExtendedHandlerParams {
3
- req: any;
4
- res: any;
5
- }
6
- export type RouteResourceExtendedHandler = Handler<RouteResourceExtendedHandlerParams, void>;
7
- export type RouteResourceExtendedHandlerWithHandlerResourceInstance = HandlerWithHandlerResourceInstance<RouteResourceExtendedHandlerParams, void>;
8
- export {};
9
- //# sourceMappingURL=handler.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"handler.d.ts","sourceRoot":"","sources":["../../src/types/handler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,kCAAkC,EAAE,MAAM,eAAe,CAAC;AAE5E,UAAU,kCAAkC;IAC1C,GAAG,EAAE,GAAG,CAAC;IACT,GAAG,EAAE,GAAG,CAAC;CACV;AAED,MAAM,MAAM,4BAA4B,GAAG,OAAO,CAAC,kCAAkC,EAAE,IAAI,CAAC,CAAC;AAE7F,MAAM,MAAM,uDAAuD,GAAG,kCAAkC,CACtG,kCAAkC,EAClC,IAAI,CACL,CAAC"}
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });