@eggjs/static 4.0.0-beta.18 → 4.0.0-beta.20
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/app/middleware/static.d.ts +1 -1
- package/dist/config/config.default.d.ts +1 -55
- package/dist/config.default-Dm2Tv50h.d.ts +56 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.js +2 -0
- package/dist/types-Cf9e9VC2.js +1 -0
- package/dist/types-DLTXrguM.d.ts +13 -0
- package/dist/types.d.ts +2 -13
- package/dist/types.js +2 -0
- package/package.json +7 -7
|
@@ -1,56 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { Options } from "@eggjs/koa-static-cache";
|
|
3
|
-
|
|
4
|
-
//#region src/config/config.default.d.ts
|
|
5
|
-
interface StaticDirOptions extends Omit<Options, 'dir'> {
|
|
6
|
-
/**
|
|
7
|
-
* static files store dir
|
|
8
|
-
*/
|
|
9
|
-
dir: string;
|
|
10
|
-
/**
|
|
11
|
-
* static files prefix
|
|
12
|
-
* Default to `'/public/'`
|
|
13
|
-
*/
|
|
14
|
-
prefix: string;
|
|
15
|
-
/**
|
|
16
|
-
* cache max age in `seconds`
|
|
17
|
-
* Default to `0` on development, `31536000` on production
|
|
18
|
-
*/
|
|
19
|
-
maxAge: number;
|
|
20
|
-
/**
|
|
21
|
-
* dynamic load file which not cached on initialization
|
|
22
|
-
* Default to `true`
|
|
23
|
-
*/
|
|
24
|
-
dynamic: boolean;
|
|
25
|
-
/**
|
|
26
|
-
* caches the assets on initialization or not,
|
|
27
|
-
* always work together with `options.dynamic`
|
|
28
|
-
* Default to `false`
|
|
29
|
-
*/
|
|
30
|
-
preload: boolean;
|
|
31
|
-
/**
|
|
32
|
-
* buffer the file content or not
|
|
33
|
-
* Default to `false` on development, `true` on production
|
|
34
|
-
*/
|
|
35
|
-
buffer: boolean;
|
|
36
|
-
/**
|
|
37
|
-
* max files count in store
|
|
38
|
-
* Default to `1000`
|
|
39
|
-
*/
|
|
40
|
-
maxFiles: number;
|
|
41
|
-
}
|
|
42
|
-
interface StaticConfig extends Omit<StaticDirOptions, 'dir'> {
|
|
43
|
-
/**
|
|
44
|
-
* static files store dir
|
|
45
|
-
* Default to `${baseDir}/app/public`
|
|
46
|
-
*/
|
|
47
|
-
dir: string | Array<string | StaticDirOptions>;
|
|
48
|
-
/**
|
|
49
|
-
* static files store dirs
|
|
50
|
-
* @deprecated use `dir` instead
|
|
51
|
-
*/
|
|
52
|
-
dirs?: Array<string | StaticDirOptions>;
|
|
53
|
-
}
|
|
54
|
-
declare const _default: egg0.EggConfigFactory;
|
|
55
|
-
//#endregion
|
|
1
|
+
import { StaticConfig, StaticDirOptions, _default } from "../config.default-Dm2Tv50h.js";
|
|
56
2
|
export { StaticConfig, StaticDirOptions, _default as default };
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import * as egg0 from "egg";
|
|
2
|
+
import { Options } from "@eggjs/koa-static-cache";
|
|
3
|
+
|
|
4
|
+
//#region src/config/config.default.d.ts
|
|
5
|
+
interface StaticDirOptions extends Omit<Options, 'dir'> {
|
|
6
|
+
/**
|
|
7
|
+
* static files store dir
|
|
8
|
+
*/
|
|
9
|
+
dir: string;
|
|
10
|
+
/**
|
|
11
|
+
* static files prefix
|
|
12
|
+
* Default to `'/public/'`
|
|
13
|
+
*/
|
|
14
|
+
prefix: string;
|
|
15
|
+
/**
|
|
16
|
+
* cache max age in `seconds`
|
|
17
|
+
* Default to `0` on development, `31536000` on production
|
|
18
|
+
*/
|
|
19
|
+
maxAge: number;
|
|
20
|
+
/**
|
|
21
|
+
* dynamic load file which not cached on initialization
|
|
22
|
+
* Default to `true`
|
|
23
|
+
*/
|
|
24
|
+
dynamic: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* caches the assets on initialization or not,
|
|
27
|
+
* always work together with `options.dynamic`
|
|
28
|
+
* Default to `false`
|
|
29
|
+
*/
|
|
30
|
+
preload: boolean;
|
|
31
|
+
/**
|
|
32
|
+
* buffer the file content or not
|
|
33
|
+
* Default to `false` on development, `true` on production
|
|
34
|
+
*/
|
|
35
|
+
buffer: boolean;
|
|
36
|
+
/**
|
|
37
|
+
* max files count in store
|
|
38
|
+
* Default to `1000`
|
|
39
|
+
*/
|
|
40
|
+
maxFiles: number;
|
|
41
|
+
}
|
|
42
|
+
interface StaticConfig extends Omit<StaticDirOptions, 'dir'> {
|
|
43
|
+
/**
|
|
44
|
+
* static files store dir
|
|
45
|
+
* Default to `${baseDir}/app/public`
|
|
46
|
+
*/
|
|
47
|
+
dir: string | Array<string | StaticDirOptions>;
|
|
48
|
+
/**
|
|
49
|
+
* static files store dirs
|
|
50
|
+
* @deprecated use `dir` instead
|
|
51
|
+
*/
|
|
52
|
+
dirs?: Array<string | StaticDirOptions>;
|
|
53
|
+
}
|
|
54
|
+
declare const _default: egg0.EggConfigFactory;
|
|
55
|
+
//#endregion
|
|
56
|
+
export { StaticConfig, StaticDirOptions, _default };
|
package/dist/index.d.ts
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import "./config.default-Dm2Tv50h.js";
|
|
2
|
+
import "./types-DLTXrguM.js";
|
package/dist/index.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { StaticConfig } from "./config.default-Dm2Tv50h.js";
|
|
2
|
+
|
|
3
|
+
//#region src/types.d.ts
|
|
4
|
+
declare module 'egg' {
|
|
5
|
+
/**
|
|
6
|
+
* Static file serve
|
|
7
|
+
* @member Config#static
|
|
8
|
+
* @see https://github.com/eggjs/egg/tree/next/packages/koa-static-cache
|
|
9
|
+
*/
|
|
10
|
+
interface EggAppConfig {
|
|
11
|
+
static: StaticConfig;
|
|
12
|
+
}
|
|
13
|
+
}
|
package/dist/types.d.ts
CHANGED
|
@@ -1,13 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
//#region src/types.d.ts
|
|
4
|
-
declare module 'egg' {
|
|
5
|
-
/**
|
|
6
|
-
* Static file serve
|
|
7
|
-
* @member Config#static
|
|
8
|
-
* @see https://github.com/eggjs/egg/tree/next/packages/koa-static-cache
|
|
9
|
-
*/
|
|
10
|
-
interface EggAppConfig {
|
|
11
|
-
static: StaticConfig;
|
|
12
|
-
}
|
|
13
|
-
}
|
|
1
|
+
import "./config.default-Dm2Tv50h.js";
|
|
2
|
+
import "./types-DLTXrguM.js";
|
package/dist/types.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eggjs/static",
|
|
3
|
-
"version": "4.0.0-beta.
|
|
3
|
+
"version": "4.0.0-beta.20",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -32,20 +32,20 @@
|
|
|
32
32
|
"koa-compose": "^4.1.0",
|
|
33
33
|
"koa-range": "^0.3.0",
|
|
34
34
|
"ylru": "^2.0.0",
|
|
35
|
-
"@eggjs/koa-static-cache": "7.0.0-beta.
|
|
35
|
+
"@eggjs/koa-static-cache": "7.0.0-beta.20"
|
|
36
36
|
},
|
|
37
37
|
"peerDependencies": {
|
|
38
|
-
"egg": "4.1.0-beta.
|
|
38
|
+
"egg": "4.1.0-beta.20"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"@types/koa-compose": "^3.2.8",
|
|
42
42
|
"@types/koa-range": "^0.3.5",
|
|
43
43
|
"oxlint": "^1.19.0",
|
|
44
44
|
"tsdown": "^0.15.4",
|
|
45
|
-
"typescript": "5.9.
|
|
46
|
-
"vitest": "4.0.0-beta.
|
|
47
|
-
"@eggjs/tsconfig": "3.1.0-beta.
|
|
48
|
-
"@eggjs/mock": "7.0.0-beta.
|
|
45
|
+
"typescript": "^5.9.3",
|
|
46
|
+
"vitest": "4.0.0-beta.16",
|
|
47
|
+
"@eggjs/tsconfig": "3.1.0-beta.20",
|
|
48
|
+
"@eggjs/mock": "7.0.0-beta.20"
|
|
49
49
|
},
|
|
50
50
|
"type": "module",
|
|
51
51
|
"exports": {
|