alepha 0.8.0 → 0.8.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/vite.d.ts CHANGED
@@ -1,7 +1,56 @@
1
1
  import { BrotliOptions, ZlibOptions } from "node:zlib";
2
2
  import { Alepha } from "alepha";
3
- import { Plugin } from "vite";
3
+ import { Plugin, UserConfig } from "vite";
4
4
 
5
+ //#region src/viteCompress.d.ts
6
+ interface ViteCompressOptions {
7
+ /**
8
+ * If true, the plugin will not compress the files.
9
+ *
10
+ * @default false
11
+ */
12
+ disabled?: boolean;
13
+ /**
14
+ * If true, the plugin will compress the files using brotli.
15
+ * Can also be an object with brotli options.
16
+ *
17
+ * @default true
18
+ */
19
+ brotli?: boolean | BrotliOptions;
20
+ /**
21
+ * If true, the plugin will compress the files using gzip.
22
+ * Can also be an object with gzip options.
23
+ *
24
+ * @default true
25
+ */
26
+ gzip?: boolean | ZlibOptions;
27
+ /**
28
+ * A filter to determine which files to compress.
29
+ * Can be a RegExp or a function that returns true for files to compress.
30
+ *
31
+ * @default /\.(js|mjs|cjs|css|wasm|svg|html)$/
32
+ */
33
+ filter?: RegExp | ((fileName: string) => boolean);
34
+ }
35
+ declare function viteCompress(options?: ViteCompressOptions): Plugin;
36
+ declare function compressFile(options: ViteCompressOptions | undefined, filePath: string): Promise<void>;
37
+ //# sourceMappingURL=viteCompress.d.ts.map
38
+ //#endregion
39
+ //#region src/helpers/buildClient.d.ts
40
+ interface BuildClientOptions {
41
+ dist: string;
42
+ html: string;
43
+ /**
44
+ * @default false
45
+ */
46
+ precompress?: ViteCompressOptions | boolean;
47
+ /**
48
+ * @default false
49
+ */
50
+ prerender?: boolean;
51
+ config?: UserConfig;
52
+ }
53
+ //#endregion
5
54
  //#region src/viteAlephaBuild.d.ts
6
55
  interface ViteAlephaBuildOptions {
7
56
  /**
@@ -13,7 +62,7 @@ interface ViteAlephaBuildOptions {
13
62
  * Set false to skip the client build.
14
63
  * This is useful if you only want to build the server-side application.
15
64
  */
16
- client?: false;
65
+ client?: false | Partial<BuildClientOptions>;
17
66
  /**
18
67
  * If true, the build will be optimized for Vercel deployment.
19
68
  *
@@ -73,39 +122,6 @@ declare function viteAlephaBuildVercel(opts?: ViteAlephaBuildVercelOptions): Pro
73
122
  }>;
74
123
  //# sourceMappingURL=viteAlephaBuildVercel.d.ts.map
75
124
  //#endregion
76
- //#region src/viteCompress.d.ts
77
- interface ViteCompressOptions {
78
- /**
79
- * If true, the plugin will not compress the files.
80
- *
81
- * @default false
82
- */
83
- disabled?: boolean;
84
- /**
85
- * If true, the plugin will compress the files using brotli.
86
- * Can also be an object with brotli options.
87
- *
88
- * @default true
89
- */
90
- brotli?: boolean | BrotliOptions;
91
- /**
92
- * If true, the plugin will compress the files using gzip.
93
- * Can also be an object with gzip options.
94
- *
95
- * @default true
96
- */
97
- gzip?: boolean | ZlibOptions;
98
- /**
99
- * A filter to determine which files to compress.
100
- * Can be a RegExp or a function that returns true for files to compress.
101
- *
102
- * @default /\.(js|mjs|cjs|css|wasm|svg)$/
103
- */
104
- filter?: RegExp | ((fileName: string) => boolean);
105
- }
106
- declare function viteCompress(options?: ViteCompressOptions): Plugin;
107
- //# sourceMappingURL=viteCompress.d.ts.map
108
- //#endregion
109
125
  //#region src/index.d.ts
110
126
  declare global {
111
127
  var __alepha: Alepha;
@@ -113,5 +129,5 @@ declare global {
113
129
  //# sourceMappingURL=index.d.ts.map
114
130
 
115
131
  //#endregion
116
- export { ViteAlephaBuildOptions, ViteAlephaBuildVercelOptions, ViteAlephaDevOptions, ViteAlephaOptions, ViteCompressOptions, viteAlepha, viteAlephaBuild, viteAlephaBuildVercel, viteAlephaDev, viteCompress };
132
+ export { ViteAlephaBuildOptions, ViteAlephaBuildVercelOptions, ViteAlephaDevOptions, ViteAlephaOptions, ViteCompressOptions, compressFile, viteAlepha, viteAlephaBuild, viteAlephaBuildVercel, viteAlephaDev, viteCompress };
117
133
  //# sourceMappingURL=index.d.ts.map