@eggjs/static 4.0.0-beta.19 → 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.
@@ -1,4 +1,4 @@
1
- import { StaticConfig } from "../../config/config.default.js";
1
+ import { StaticConfig } from "../../config.default-Dm2Tv50h.js";
2
2
  import { Application, Context } from "egg";
3
3
  import compose from "koa-compose";
4
4
 
@@ -1,56 +1,2 @@
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
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
- export { };
1
+ import "./config.default-Dm2Tv50h.js";
2
+ import "./types-DLTXrguM.js";
package/dist/index.js CHANGED
@@ -1 +1,3 @@
1
+ import "./types-Cf9e9VC2.js";
2
+
1
3
  export { };
@@ -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 { StaticConfig } from "./config/config.default.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
- }
1
+ import "./config.default-Dm2Tv50h.js";
2
+ import "./types-DLTXrguM.js";
package/dist/types.js CHANGED
@@ -1 +1,3 @@
1
+ import "./types-Cf9e9VC2.js";
2
+
1
3
  export { };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eggjs/static",
3
- "version": "4.0.0-beta.19",
3
+ "version": "4.0.0-beta.20",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -32,10 +32,10 @@
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.19"
35
+ "@eggjs/koa-static-cache": "7.0.0-beta.20"
36
36
  },
37
37
  "peerDependencies": {
38
- "egg": "4.1.0-beta.19"
38
+ "egg": "4.1.0-beta.20"
39
39
  },
40
40
  "devDependencies": {
41
41
  "@types/koa-compose": "^3.2.8",
@@ -44,8 +44,8 @@
44
44
  "tsdown": "^0.15.4",
45
45
  "typescript": "^5.9.3",
46
46
  "vitest": "4.0.0-beta.16",
47
- "@eggjs/tsconfig": "3.1.0-beta.19",
48
- "@eggjs/mock": "7.0.0-beta.19"
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": {