@ldsg/route 0.3.10 → 0.3.18
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/constants.d.ts.map +1 -1
- package/dist/constants.js +4 -2
- package/dist/types/resource-extended-handler.d.ts +3 -2
- package/dist/types/resource-extended-handler.d.ts.map +1 -1
- package/package.json +10 -9
- package/dist/types/handler.d.ts +0 -9
- package/dist/types/handler.d.ts.map +0 -1
- package/dist/types/handler.js +0 -2
package/dist/constants.d.ts.map
CHANGED
|
@@ -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,+
|
|
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 {
|
|
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:
|
|
4
|
-
res:
|
|
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;
|
|
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.
|
|
3
|
+
"version": "0.3.18",
|
|
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.
|
|
15
|
-
"@ldsg/resource": "0.3.
|
|
16
|
-
"@ldsg/resource-definition": "0.3.
|
|
14
|
+
"@ldsg/handler": "0.3.18",
|
|
15
|
+
"@ldsg/resource": "0.3.18",
|
|
16
|
+
"@ldsg/resource-definition": "0.3.18"
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {
|
|
19
|
-
"@types/express": "^
|
|
19
|
+
"@types/express": "^4.17.17",
|
|
20
20
|
"@types/jest": "^29.5.2",
|
|
21
21
|
"@types/supertest": "^6.0.0",
|
|
22
|
-
"express": "^
|
|
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.
|
|
29
|
-
"@ldsg/types": "0.3.
|
|
28
|
+
"@ldsg/application": "0.3.18",
|
|
29
|
+
"@ldsg/types": "0.3.18"
|
|
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
|
}
|
package/dist/types/handler.d.ts
DELETED
|
@@ -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"}
|
package/dist/types/handler.js
DELETED