@aomex/helmet 0.0.22 → 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 CHANGED
@@ -1,59 +1,7 @@
1
1
  # @aomex/helmet
2
2
 
3
- ## 0.0.22
3
+ ## 1.0.1
4
4
 
5
5
  ### Patch Changes
6
6
 
7
- - Updated dependencies [[`59cd3f9`](https://github.com/aomex/aomex/commit/59cd3f98a0b5648a972d6118ba21501130a9ee7e), [`90ca7d5`](https://github.com/aomex/aomex/commit/90ca7d5fc736b523c4fbf7949f64653428dc413c)]:
8
- - @aomex/web@0.0.29
9
- - @aomex/core@0.0.28
10
-
11
- ## 0.0.21
12
-
13
- ### Patch Changes
14
-
15
- - Updated dependencies [[`00bafbb`](https://github.com/aomex/aomex/commit/00bafbbac2d32205b63a6bf561fb0a69c38a54bb), [`8becf8e`](https://github.com/aomex/aomex/commit/8becf8ee5ef86a5909783d0654e536db7be9bf5b), [`0776719`](https://github.com/aomex/aomex/commit/077671963401f1dafb5b03722899452d45df13fc), [`f996bf7`](https://github.com/aomex/aomex/commit/f996bf7e529e7751a5e858c579feed33f5f02d65)]:
16
- - @aomex/core@0.0.27
17
- - @aomex/web@0.0.28
18
-
19
- ## 0.0.20
20
-
21
- ### Patch Changes
22
-
23
- - Updated dependencies [[`33c3c61`](https://github.com/aomex/aomex/commit/33c3c614be9f66077f7487350b88d2db854f5fc8), [`fbcea3d`](https://github.com/aomex/aomex/commit/fbcea3d68ff033e6861130c645c8e5ad7336193f)]:
24
- - @aomex/web@0.0.27
25
- - @aomex/core@0.0.26
26
-
27
- ## 0.0.19
28
-
29
- ### Patch Changes
30
-
31
- - 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)]:
32
- - @aomex/web@0.0.26
33
- - @aomex/core@0.0.25
34
-
35
- ## 0.0.18
36
-
37
- ### Patch Changes
38
-
39
- - 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)]:
40
- - @aomex/core@0.0.24
41
- - @aomex/web@0.0.25
42
-
43
- ## 0.0.17
44
-
45
- ### Patch Changes
46
-
47
- - 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)]:
48
- - @aomex/web@0.0.24
49
- - @aomex/core@0.0.23
50
-
51
- ## 0.0.16
52
-
53
- ### Patch Changes
54
-
55
- - [`e21007a`](https://github.com/aomex/aomex/commit/e21007a82cb8eac73e1f696340bbe986d57dc159) Thanks [@geekact](https://github.com/geekact)! - chore(helmet): 升级依赖helmet到7.0.0
56
-
57
- - 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)]:
58
- - @aomex/core@0.0.22
59
- - @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
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2023 geekact
3
+ Copyright (c) 2023-2024 geekact
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
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 helmetPromise = promisify(originHelmet(options));
6
+ const helmetAsync = promisify(originHelmet(options));
7
7
  return middleware.web((ctx, next) => {
8
- return helmetPromise(ctx.request, ctx.response).then(next);
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 helmetPromise = promisify(originHelmet(options));\n\n return middleware.web((ctx, next) => {\n return helmetPromise(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,gBAAgB,UAAU,aAAa,OAAO,CAAC;AAErD,SAAO,WAAW,IAAI,CAAC,KAAK,SAAS;AACnC,WAAO,cAAc,IAAI,SAAS,IAAI,QAAQ,EAAE,KAAK,IAAI;AAAA,EAC3D,CAAC;AACH;","names":[]}
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": "0.0.22",
4
- "description": "Security headers",
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.28",
30
- "@aomex/web": "^0.0.29"
29
+ "@aomex/core": "^1.0.0",
30
+ "@aomex/web": "^1.0.0"
31
31
  },
32
32
  "dependencies": {
33
- "helmet": "^7.0.0"
33
+ "helmet": "^7.1.0"
34
34
  },
35
35
  "devDependencies": {
36
- "@aomex/core": "^0.0.28",
37
- "@aomex/web": "^0.0.29"
36
+ "@aomex/core": "^1.0.1",
37
+ "@aomex/web": "^1.0.1"
38
38
  },
39
- "scripts": {
40
- "test": "vitest"
41
- }
39
+ "scripts": {}
42
40
  }