@eggjs/static 4.0.0-beta.32 → 4.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/dist/index.d.ts +17 -0
- package/dist/index.js +21 -1
- package/package.json +8 -11
package/dist/index.d.ts
CHANGED
|
@@ -1 +1,18 @@
|
|
|
1
1
|
import './types.ts';
|
|
2
|
+
import { type EggPluginFactory } from 'egg';
|
|
3
|
+
/**
|
|
4
|
+
* Static file serve plugin
|
|
5
|
+
*
|
|
6
|
+
* @since 4.1.0
|
|
7
|
+
* Usage:
|
|
8
|
+
* ```ts
|
|
9
|
+
* // config/plugin.ts
|
|
10
|
+
* import staticPlugin from '@eggjs/static';
|
|
11
|
+
*
|
|
12
|
+
* export default {
|
|
13
|
+
* ...staticPlugin(),
|
|
14
|
+
* };
|
|
15
|
+
* ```
|
|
16
|
+
*/
|
|
17
|
+
declare const _default: EggPluginFactory;
|
|
18
|
+
export default _default;
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,22 @@
|
|
|
1
1
|
import "./types.js";
|
|
2
|
-
|
|
2
|
+
import { definePluginFactory } from 'egg';
|
|
3
|
+
/**
|
|
4
|
+
* Static file serve plugin
|
|
5
|
+
*
|
|
6
|
+
* @since 4.1.0
|
|
7
|
+
* Usage:
|
|
8
|
+
* ```ts
|
|
9
|
+
* // config/plugin.ts
|
|
10
|
+
* import staticPlugin from '@eggjs/static';
|
|
11
|
+
*
|
|
12
|
+
* export default {
|
|
13
|
+
* ...staticPlugin(),
|
|
14
|
+
* };
|
|
15
|
+
* ```
|
|
16
|
+
*/
|
|
17
|
+
export default definePluginFactory({
|
|
18
|
+
name: 'static',
|
|
19
|
+
enable: true,
|
|
20
|
+
path: import.meta.dirname,
|
|
21
|
+
});
|
|
22
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxZQUFZLENBQUM7QUFFcEIsT0FBTyxFQUFFLG1CQUFtQixFQUF5QixNQUFNLEtBQUssQ0FBQztBQUVqRTs7Ozs7Ozs7Ozs7OztHQWFHO0FBQ0gsZUFBZSxtQkFBbUIsQ0FBQztJQUNqQyxJQUFJLEVBQUUsUUFBUTtJQUNkLE1BQU0sRUFBRSxJQUFJO0lBQ1osSUFBSSxFQUFFLE1BQU0sQ0FBQyxJQUFJLENBQUMsT0FBTztDQUMxQixDQUFxQixDQUFDIn0=
|
package/package.json
CHANGED
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eggjs/static",
|
|
3
|
-
"version": "4.0.0-beta.
|
|
3
|
+
"version": "4.0.0-beta.34",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
7
7
|
"description": "static server plugin for egg",
|
|
8
|
-
"eggPlugin": {
|
|
9
|
-
"name": "static"
|
|
10
|
-
},
|
|
11
8
|
"repository": {
|
|
12
9
|
"type": "git",
|
|
13
10
|
"url": "https://github.com/eggjs/egg.git",
|
|
@@ -32,21 +29,21 @@
|
|
|
32
29
|
"koa-compose": "^4.1.0",
|
|
33
30
|
"koa-range": "^0.3.0",
|
|
34
31
|
"ylru": "^2.0.0",
|
|
35
|
-
"@eggjs/koa-static-cache": "7.0.0-beta.
|
|
32
|
+
"@eggjs/koa-static-cache": "7.0.0-beta.34"
|
|
36
33
|
},
|
|
37
34
|
"peerDependencies": {
|
|
38
|
-
"egg": "4.1.0-beta.
|
|
35
|
+
"egg": "4.1.0-beta.34"
|
|
39
36
|
},
|
|
40
37
|
"devDependencies": {
|
|
41
38
|
"@types/koa-compose": "^3.2.8",
|
|
42
39
|
"@types/koa-range": "^0.3.5",
|
|
43
40
|
"oxlint": "^1.24.0",
|
|
44
|
-
"tsdown": "0.15.
|
|
41
|
+
"tsdown": "0.15.11",
|
|
45
42
|
"typescript": "^5.9.3",
|
|
46
|
-
"vitest": "4.0.
|
|
47
|
-
"@eggjs/mock": "7.0.0-beta.
|
|
48
|
-
"@eggjs/tsconfig": "3.1.0-beta.
|
|
49
|
-
"egg": "4.1.0-beta.
|
|
43
|
+
"vitest": "4.0.5",
|
|
44
|
+
"@eggjs/mock": "7.0.0-beta.34",
|
|
45
|
+
"@eggjs/tsconfig": "3.1.0-beta.34",
|
|
46
|
+
"egg": "4.1.0-beta.34"
|
|
50
47
|
},
|
|
51
48
|
"type": "module",
|
|
52
49
|
"exports": {
|