@aomex/helmet 0.0.21 → 1.0.1
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/CHANGELOG.md +2 -46
- package/LICENSE +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/package.json +8 -10
package/CHANGELOG.md
CHANGED
|
@@ -1,51 +1,7 @@
|
|
|
1
1
|
# @aomex/helmet
|
|
2
2
|
|
|
3
|
-
##
|
|
3
|
+
## 1.0.1
|
|
4
4
|
|
|
5
5
|
### Patch Changes
|
|
6
6
|
|
|
7
|
-
-
|
|
8
|
-
- @aomex/core@0.0.27
|
|
9
|
-
- @aomex/web@0.0.28
|
|
10
|
-
|
|
11
|
-
## 0.0.20
|
|
12
|
-
|
|
13
|
-
### Patch Changes
|
|
14
|
-
|
|
15
|
-
- Updated dependencies [[`33c3c61`](https://github.com/aomex/aomex/commit/33c3c614be9f66077f7487350b88d2db854f5fc8), [`fbcea3d`](https://github.com/aomex/aomex/commit/fbcea3d68ff033e6861130c645c8e5ad7336193f)]:
|
|
16
|
-
- @aomex/web@0.0.27
|
|
17
|
-
- @aomex/core@0.0.26
|
|
18
|
-
|
|
19
|
-
## 0.0.19
|
|
20
|
-
|
|
21
|
-
### Patch Changes
|
|
22
|
-
|
|
23
|
-
- Updated dependencies [[`5ef2022`](https://github.com/aomex/aomex/commit/5ef202248b4320ff9076fbecb54379055cffb7db), [`8d9e9d8`](https://github.com/aomex/aomex/commit/8d9e9d8ece0bbcc7e1ac685702eacbfdfa145aa9), [`0e6ed2c`](https://github.com/aomex/aomex/commit/0e6ed2c611100dcfaafb6fb41357624ad9f5c67a)]:
|
|
24
|
-
- @aomex/web@0.0.26
|
|
25
|
-
- @aomex/core@0.0.25
|
|
26
|
-
|
|
27
|
-
## 0.0.18
|
|
28
|
-
|
|
29
|
-
### Patch Changes
|
|
30
|
-
|
|
31
|
-
- Updated dependencies [[`2ac62fd`](https://github.com/aomex/aomex/commit/2ac62fd28166a1d9dd60b3c6d5a6508a6f9ee82b), [`4258410`](https://github.com/aomex/aomex/commit/42584107ad9f7e34492ae1053fef83aa2d9d747a), [`4177cba`](https://github.com/aomex/aomex/commit/4177cba7877e38120842bd8d287eaed54e4926ca)]:
|
|
32
|
-
- @aomex/core@0.0.24
|
|
33
|
-
- @aomex/web@0.0.25
|
|
34
|
-
|
|
35
|
-
## 0.0.17
|
|
36
|
-
|
|
37
|
-
### Patch Changes
|
|
38
|
-
|
|
39
|
-
- Updated dependencies [[`6621e4f`](https://github.com/aomex/aomex/commit/6621e4ff0f3509beeb332a0571a7db9c7d6ca99a), [`7b09277`](https://github.com/aomex/aomex/commit/7b09277136910966f500c8132303c7ddee84340c), [`46c5b72`](https://github.com/aomex/aomex/commit/46c5b72785011fa181767f4c8ea0d0f5008b21ae), [`9c78999`](https://github.com/aomex/aomex/commit/9c78999ebcb2962f30344acfbf6de0733d6fdd41), [`f4b012d`](https://github.com/aomex/aomex/commit/f4b012d98cddb2918479ea05df6c266dd914e53a)]:
|
|
40
|
-
- @aomex/web@0.0.24
|
|
41
|
-
- @aomex/core@0.0.23
|
|
42
|
-
|
|
43
|
-
## 0.0.16
|
|
44
|
-
|
|
45
|
-
### Patch Changes
|
|
46
|
-
|
|
47
|
-
- [`e21007a`](https://github.com/aomex/aomex/commit/e21007a82cb8eac73e1f696340bbe986d57dc159) Thanks [@geekact](https://github.com/geekact)! - chore(helmet): 升级依赖helmet到7.0.0
|
|
48
|
-
|
|
49
|
-
- Updated dependencies [[`6f7d706`](https://github.com/aomex/aomex/commit/6f7d7066c23711abdd149eb1c9a293ab8c4284a4), [`e21007a`](https://github.com/aomex/aomex/commit/e21007a82cb8eac73e1f696340bbe986d57dc159), [`e7bf93c`](https://github.com/aomex/aomex/commit/e7bf93cee6896c61d0bf3eb0921151dc6c1bc107), [`e21007a`](https://github.com/aomex/aomex/commit/e21007a82cb8eac73e1f696340bbe986d57dc159), [`818e840`](https://github.com/aomex/aomex/commit/818e840d36c7456a863fc071968b246c123c17f5), [`fb6c72d`](https://github.com/aomex/aomex/commit/fb6c72dbb266be4db92a542afe93dfa5d8c7cd41)]:
|
|
50
|
-
- @aomex/core@0.0.22
|
|
51
|
-
- @aomex/web@0.0.23
|
|
7
|
+
- [`002fe2a`](https://github.com/aomex/aomex/commit/002fe2a8caac8612201f0a76c1af76a9f54712fd) Thanks [@geekact](https://github.com/geekact)! - feat(helmet): 安全报文中间件
|
package/LICENSE
CHANGED
package/dist/index.js
CHANGED
|
@@ -3,9 +3,9 @@ import { promisify } from "node:util";
|
|
|
3
3
|
import originHelmet from "helmet";
|
|
4
4
|
import { middleware } from "@aomex/core";
|
|
5
5
|
var helmet = (options) => {
|
|
6
|
-
const
|
|
6
|
+
const helmetAsync = promisify(originHelmet(options));
|
|
7
7
|
return middleware.web((ctx, next) => {
|
|
8
|
-
return
|
|
8
|
+
return helmetAsync(ctx.request, ctx.response).then(next);
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
export {
|
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/core';\nimport type { WebMiddleware } from '@aomex/web';\n\nexport const helmet = (options?: HelmetOptions): WebMiddleware => {\n const
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["import { promisify } from 'node:util';\nimport originHelmet, { type HelmetOptions } from 'helmet';\nimport { middleware } from '@aomex/core';\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":";AAAA,SAAS,iBAAiB;AAC1B,OAAO,kBAA0C;AACjD,SAAS,kBAAkB;AAGpB,IAAM,SAAS,CAAC,YAA2C;AAChE,QAAM,cAAc,UAAU,aAAa,OAAO,CAAC;AAEnD,SAAO,WAAW,IAAI,CAAC,KAAK,SAAS;AACnC,WAAO,YAAY,IAAI,SAAS,IAAI,QAAQ,EAAE,KAAK,IAAI;AAAA,EACzD,CAAC;AACH;","names":[]}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aomex/helmet",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "1.0.1",
|
|
4
|
+
"description": "设置安全报文",
|
|
5
5
|
"repository": "git@github.com:aomex/aomex.git",
|
|
6
6
|
"homepage": "https://aomex.js.org",
|
|
7
7
|
"license": "MIT",
|
|
@@ -26,17 +26,15 @@
|
|
|
26
26
|
"access": "public"
|
|
27
27
|
},
|
|
28
28
|
"peerDependencies": {
|
|
29
|
-
"@aomex/core": "^0.0
|
|
30
|
-
"@aomex/web": "^0.0
|
|
29
|
+
"@aomex/core": "^1.0.0",
|
|
30
|
+
"@aomex/web": "^1.0.0"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"helmet": "^7.
|
|
33
|
+
"helmet": "^7.1.0"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
|
-
"@aomex/core": "^
|
|
37
|
-
"@aomex/web": "^
|
|
36
|
+
"@aomex/core": "^1.0.1",
|
|
37
|
+
"@aomex/web": "^1.0.1"
|
|
38
38
|
},
|
|
39
|
-
"scripts": {
|
|
40
|
-
"test": "vitest"
|
|
41
|
-
}
|
|
39
|
+
"scripts": {}
|
|
42
40
|
}
|