@eggjs/security 5.0.0-beta.32 → 5.0.0-beta.34

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/README.md CHANGED
@@ -16,12 +16,6 @@
16
16
 
17
17
  Egg's default security plugin, generally no need to configure.
18
18
 
19
- ## Install
20
-
21
- ```bash
22
- npm i @eggjs/security
23
- ```
24
-
25
19
  ## Usage & configuration
26
20
 
27
21
  - `config.default.js`
package/dist/index.d.ts CHANGED
@@ -1,4 +1,18 @@
1
- import './app/extend/application.ts';
2
- import './app/extend/context.ts';
3
- import './app/extend/response.ts';
4
1
  import './types.ts';
2
+ import { type EggPluginFactory } from 'egg';
3
+ /**
4
+ * Security plugin
5
+ *
6
+ * @since 4.1.0
7
+ * Usage:
8
+ * ```ts
9
+ * // config/plugin.ts
10
+ * import securityPlugin from '@eggjs/security';
11
+ *
12
+ * export default {
13
+ * ...securityPlugin(),
14
+ * };
15
+ * ```
16
+ */
17
+ declare const _default: EggPluginFactory;
18
+ export default _default;
package/dist/index.js CHANGED
@@ -1,5 +1,23 @@
1
- import "./app/extend/application.js";
2
- import "./app/extend/context.js";
3
- import "./app/extend/response.js";
4
1
  import "./types.js";
5
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyw2QkFBNkIsQ0FBQztBQUNyQyxPQUFPLHlCQUF5QixDQUFDO0FBQ2pDLE9BQU8sMEJBQTBCLENBQUM7QUFDbEMsT0FBTyxZQUFZLENBQUMifQ==
2
+ import { definePluginFactory } from 'egg';
3
+ /**
4
+ * Security plugin
5
+ *
6
+ * @since 4.1.0
7
+ * Usage:
8
+ * ```ts
9
+ * // config/plugin.ts
10
+ * import securityPlugin from '@eggjs/security';
11
+ *
12
+ * export default {
13
+ * ...securityPlugin(),
14
+ * };
15
+ * ```
16
+ */
17
+ export default definePluginFactory({
18
+ name: 'security',
19
+ enable: true,
20
+ path: import.meta.dirname,
21
+ optionalDependencies: ['session'],
22
+ });
23
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxZQUFZLENBQUM7QUFFcEIsT0FBTyxFQUFFLG1CQUFtQixFQUF5QixNQUFNLEtBQUssQ0FBQztBQUVqRTs7Ozs7Ozs7Ozs7OztHQWFHO0FBQ0gsZUFBZSxtQkFBbUIsQ0FBQztJQUNqQyxJQUFJLEVBQUUsVUFBVTtJQUNoQixNQUFNLEVBQUUsSUFBSTtJQUNaLElBQUksRUFBRSxNQUFNLENBQUMsSUFBSSxDQUFDLE9BQU87SUFDekIsb0JBQW9CLEVBQUUsQ0FBQyxTQUFTLENBQUM7Q0FDbEMsQ0FBcUIsQ0FBQyJ9
package/package.json CHANGED
@@ -1,17 +1,11 @@
1
1
  {
2
2
  "name": "@eggjs/security",
3
- "version": "5.0.0-beta.32",
3
+ "version": "5.0.0-beta.34",
4
4
  "type": "module",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
8
8
  "description": "security plugin in egg framework",
9
- "eggPlugin": {
10
- "name": "security",
11
- "optionalDependencies": [
12
- "session"
13
- ]
14
- },
15
9
  "keywords": [
16
10
  "egg",
17
11
  "eggPlugin",
@@ -81,10 +75,10 @@
81
75
  "type-is": "^2.0.0",
82
76
  "xss": "^1.0.15",
83
77
  "zod": "^3.24.1",
84
- "@eggjs/path-matching": "3.0.0-beta.32"
78
+ "@eggjs/path-matching": "3.0.0-beta.34"
85
79
  },
86
80
  "peerDependencies": {
87
- "egg": "4.1.0-beta.32"
81
+ "egg": "4.1.0-beta.34"
88
82
  },
89
83
  "devDependencies": {
90
84
  "@types/escape-html": "^1.0.4",
@@ -97,13 +91,13 @@
97
91
  "benchmark": "^2.1.4",
98
92
  "egg-view-nunjucks": "^2.3.0",
99
93
  "spy": "^1.0.0",
100
- "tsdown": "0.15.10",
94
+ "tsdown": "0.15.11",
101
95
  "typescript": "^5.9.3",
102
- "vitest": "4.0.4",
103
- "@eggjs/mock": "7.0.0-beta.32",
104
- "@eggjs/tsconfig": "3.1.0-beta.32",
105
- "@eggjs/supertest": "9.0.0-beta.32",
106
- "egg": "4.1.0-beta.32"
96
+ "vitest": "4.0.5",
97
+ "@eggjs/mock": "7.0.0-beta.34",
98
+ "@eggjs/supertest": "9.0.0-beta.34",
99
+ "@eggjs/tsconfig": "3.1.0-beta.34",
100
+ "egg": "4.1.0-beta.34"
107
101
  },
108
102
  "files": [
109
103
  "dist"