@aomex/helmet 3.30.7 → 3.30.8-alpha.61a729b.0
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 +3 -6
- package/dist/index.js +9 -10
- package/dist/index.js.map +1 -1
- package/package.json +6 -6
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
import { HelmetOptions } from
|
|
2
|
-
import { WebMiddleware } from
|
|
3
|
-
|
|
4
|
-
declare const helmet: (options?: HelmetOptions) => WebMiddleware;
|
|
5
|
-
|
|
6
|
-
export { helmet };
|
|
1
|
+
import { HelmetOptions } from "helmet";
|
|
2
|
+
import { WebMiddleware } from "@aomex/web";
|
|
3
|
+
export declare const helmet: (options?: HelmetOptions) => WebMiddleware;
|
package/dist/index.js
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
import { promisify } from "util";
|
|
1
|
+
import { promisify } from "node:util";
|
|
3
2
|
import originHelmet from "helmet";
|
|
4
3
|
import { middleware } from "@aomex/common";
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
};
|
|
11
|
-
export {
|
|
12
|
-
helmet
|
|
4
|
+
// src/index.ts
|
|
5
|
+
const helmet = (options) => {
|
|
6
|
+
const helmetAsync = promisify(originHelmet(options));
|
|
7
|
+
return middleware.web((ctx, next) => {
|
|
8
|
+
return helmetAsync(ctx.request, ctx.response).then(next);
|
|
9
|
+
});
|
|
13
10
|
};
|
|
11
|
+
export { helmet };
|
|
12
|
+
|
|
14
13
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["import { promisify } from 'node:util';\nimport originHelmet, { type HelmetOptions } from 'helmet';\nimport { middleware } from '@aomex/common';\nimport type { WebMiddleware } from '@aomex/web';\n\nexport const helmet = (options?: HelmetOptions): WebMiddleware => {\n const helmetAsync = promisify(originHelmet(options));\n\n return middleware.web((ctx, next) => {\n return helmetAsync(ctx.request, ctx.response).then(next);\n });\n};\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../src/index.ts"],"sourcesContent":["import { promisify } from 'node:util';\nimport originHelmet, { type HelmetOptions } from 'helmet';\nimport { middleware } from '@aomex/common';\nimport type { WebMiddleware } from '@aomex/web';\n\nexport const helmet = (options?: HelmetOptions): WebMiddleware => {\n const helmetAsync = promisify(originHelmet(options));\n\n return middleware.web((ctx, next) => {\n return helmetAsync(ctx.request, ctx.response).then(next);\n });\n};\n"],"mappings":";;;;AAKA,MAAa,UAAU,YAA2C;CAChE,MAAM,cAAc,UAAU,aAAa,OAAO,CAAC;CAEnD,OAAO,WAAW,KAAK,KAAK,SAAS;EACnC,OAAO,YAAY,IAAI,SAAS,IAAI,QAAQ,CAAC,CAAC,KAAK,IAAI;CACzD,CAAC;AACH"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aomex/helmet",
|
|
3
|
-
"version": "3.30.
|
|
3
|
+
"version": "3.30.8-alpha.61a729b.0",
|
|
4
4
|
"description": "设置安全报文",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -29,15 +29,15 @@
|
|
|
29
29
|
"access": "public"
|
|
30
30
|
},
|
|
31
31
|
"peerDependencies": {
|
|
32
|
-
"@aomex/common": "^
|
|
33
|
-
"@aomex/web": "^
|
|
32
|
+
"@aomex/common": "^4.0.0",
|
|
33
|
+
"@aomex/web": "^4.0.0"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"helmet": "^8.
|
|
36
|
+
"helmet": "^8.3.0"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
|
-
"@aomex/common": "3.30.
|
|
40
|
-
"@aomex/web": "3.30.
|
|
39
|
+
"@aomex/common": "3.30.8-alpha.61a729b.0",
|
|
40
|
+
"@aomex/web": "3.30.8-alpha.61a729b.0"
|
|
41
41
|
},
|
|
42
42
|
"scripts": {}
|
|
43
43
|
}
|