@ldsg/application 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/resource.d.ts.map +1 -1
- package/dist/resource.js +4 -0
- package/package.json +8 -7
package/dist/resource.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resource.d.ts","sourceRoot":"","sources":["../src/resource.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,OAAgB,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,EAAE,mCAAmC,EAAE,MAAM,SAAS,CAAC;AAE9D,KAAK,gBAAgB,GAAG,MAAM,OAAO,CAAC;AAEtC,UAAU,sBAAsB;IAC9B,GAAG,EAAE,OAAO,CAAC;CACd;AAED,MAAM,MAAM,gBAAgB,GAAG,CAAC,MAAM,EAAE,sBAAsB,KAAK,IAAI,CAAC;AAExE,qBAAa,mBAAoB,SAAQ,QAAQ,CAAC,mCAAmC,CAAC;IACpF,gBAAgB,EAAE,gBAAgB,
|
|
1
|
+
{"version":3,"file":"resource.d.ts","sourceRoot":"","sources":["../src/resource.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,OAAgB,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,EAAE,mCAAmC,EAAE,MAAM,SAAS,CAAC;AAE9D,KAAK,gBAAgB,GAAG,MAAM,OAAO,CAAC;AAEtC,UAAU,sBAAsB;IAC9B,GAAG,EAAE,OAAO,CAAC;CACd;AAED,MAAM,MAAM,gBAAgB,GAAG,CAAC,MAAM,EAAE,sBAAsB,KAAK,IAAI,CAAC;AAExE,qBAAa,mBAAoB,SAAQ,QAAQ,CAAC,mCAAmC,CAAC;IACpF,gBAAgB,EAAE,gBAAgB,CAahC;IAEF,gBAAgB,EAAE,gBAAgB,CAchC;CACH"}
|
package/dist/resource.js
CHANGED
|
@@ -11,6 +11,10 @@ class ApplicationResource extends resource_1.Resource {
|
|
|
11
11
|
super(...arguments);
|
|
12
12
|
this.createExpressApp = () => {
|
|
13
13
|
const app = (0, express_1.default)();
|
|
14
|
+
// 中间件:解析 application/x-www-form-urlencoded
|
|
15
|
+
app.use(express_1.default.urlencoded({ extended: true }));
|
|
16
|
+
// 中间件:解析 application/json
|
|
17
|
+
app.use(express_1.default.json());
|
|
14
18
|
this.extendExpressApp({
|
|
15
19
|
app
|
|
16
20
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ldsg/application",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.18",
|
|
4
4
|
"description": "",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"license": "MIT",
|
|
@@ -12,11 +12,11 @@
|
|
|
12
12
|
],
|
|
13
13
|
"dependencies": {
|
|
14
14
|
"express": "^4.18.2",
|
|
15
|
-
"@ldsg/constants": "0.3.
|
|
16
|
-
"@ldsg/handler": "0.3.
|
|
17
|
-
"@ldsg/resource-definition": "0.3.
|
|
18
|
-
"@ldsg/
|
|
19
|
-
"@ldsg/
|
|
15
|
+
"@ldsg/constants": "0.3.18",
|
|
16
|
+
"@ldsg/handler": "0.3.18",
|
|
17
|
+
"@ldsg/resource-definition": "0.3.18",
|
|
18
|
+
"@ldsg/resource": "0.3.18",
|
|
19
|
+
"@ldsg/types": "0.3.18"
|
|
20
20
|
},
|
|
21
21
|
"devDependencies": {
|
|
22
22
|
"@types/express": "^4.17.17",
|
|
@@ -34,6 +34,7 @@
|
|
|
34
34
|
},
|
|
35
35
|
"scripts": {
|
|
36
36
|
"build": "tsc --project tsconfig.build.json",
|
|
37
|
-
"clean": "rm -rf dist"
|
|
37
|
+
"clean": "rm -rf dist",
|
|
38
|
+
"test": "jest"
|
|
38
39
|
}
|
|
39
40
|
}
|