@wuchale/vite-plugin 0.14.1 → 0.14.2
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 +6 -25
- package/dist/index.js +2 -2
- package/package.json +4 -3
package/dist/index.d.ts
CHANGED
|
@@ -1,38 +1,19 @@
|
|
|
1
|
-
type
|
|
2
|
-
|
|
3
|
-
server: {
|
|
4
|
-
ws: {
|
|
5
|
-
send: Function;
|
|
6
|
-
};
|
|
7
|
-
moduleGraph: {
|
|
8
|
-
getModulesByFile: Function;
|
|
9
|
-
invalidateModule: Function;
|
|
10
|
-
};
|
|
11
|
-
};
|
|
12
|
-
timestamp: number;
|
|
13
|
-
};
|
|
14
|
-
declare class Plugin {
|
|
1
|
+
import type { HmrContext, ResolvedConfig, TransformOptions, Plugin } from 'vite';
|
|
2
|
+
declare class Wuchale implements Plugin {
|
|
15
3
|
#private;
|
|
16
4
|
name: string;
|
|
17
5
|
constructor(configPath: string);
|
|
18
|
-
configResolved: (config:
|
|
19
|
-
|
|
20
|
-
DEV?: boolean;
|
|
21
|
-
};
|
|
22
|
-
root: string;
|
|
23
|
-
}) => Promise<void>;
|
|
24
|
-
handleHotUpdate: (ctx: HotUpdateCtx) => Promise<any[]>;
|
|
6
|
+
configResolved: (config: ResolvedConfig) => Promise<void>;
|
|
7
|
+
handleHotUpdate: (ctx: HmrContext) => Promise<any[]>;
|
|
25
8
|
resolveId: (source: string, importer?: string) => string;
|
|
26
9
|
load: (id: string) => string;
|
|
27
10
|
transform: {
|
|
28
11
|
order: "pre";
|
|
29
|
-
handler: (code: string, id: string, options
|
|
30
|
-
ssr?: boolean;
|
|
31
|
-
}) => Promise<{
|
|
12
|
+
handler: (code: string, id: string, options: TransformOptions) => Promise<{
|
|
32
13
|
code?: string;
|
|
33
14
|
map?: any;
|
|
34
15
|
}>;
|
|
35
16
|
};
|
|
36
17
|
}
|
|
37
|
-
export declare const wuchale: (configPath?: string) =>
|
|
18
|
+
export declare const wuchale: (configPath?: string) => Wuchale;
|
|
38
19
|
export {};
|
package/dist/index.js
CHANGED
|
@@ -4,7 +4,7 @@ import { getConfig as getConfig, Logger, AdapterHandler } from "wuchale";
|
|
|
4
4
|
const pluginName = 'wuchale';
|
|
5
5
|
const virtualPrefix = `virtual:${pluginName}/`;
|
|
6
6
|
const virtualResolvedPrefix = '\0';
|
|
7
|
-
class
|
|
7
|
+
class Wuchale {
|
|
8
8
|
name = pluginName;
|
|
9
9
|
#config;
|
|
10
10
|
#locales = [];
|
|
@@ -143,4 +143,4 @@ class Plugin {
|
|
|
143
143
|
};
|
|
144
144
|
transform = { order: 'pre', handler: this.#transformHandler };
|
|
145
145
|
}
|
|
146
|
-
export const wuchale = (configPath) => new
|
|
146
|
+
export const wuchale = (configPath) => new Wuchale(configPath);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wuchale/vite-plugin",
|
|
3
|
-
"version": "0.14.
|
|
3
|
+
"version": "0.14.2",
|
|
4
4
|
"description": "Protobuf-like i18n from plain code: Vite plugin",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"dev": "tsc --watch",
|
|
@@ -40,10 +40,11 @@
|
|
|
40
40
|
"author": "K1DV5",
|
|
41
41
|
"license": "MIT",
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"wuchale": "^0.15.
|
|
43
|
+
"wuchale": "^0.15.4"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
|
-
"typescript": "^5.8.3"
|
|
46
|
+
"typescript": "^5.8.3",
|
|
47
|
+
"vite": "^7.1.3"
|
|
47
48
|
},
|
|
48
49
|
"type": "module"
|
|
49
50
|
}
|