@verbaly/vite 0.11.0 → 0.13.0
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/README.md +1 -1
- package/dist/index.d.ts +7 -7
- package/dist/index.js +109 -139
- package/dist/index.js.map +1 -1
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<p align="center">
|
|
2
|
-
<img src="https://raw.githubusercontent.com/AronSoto/verbaly/develop/assets/logo
|
|
2
|
+
<img src="https://raw.githubusercontent.com/AronSoto/verbaly/develop/assets/logo.png" alt="Verbaly" width="300" />
|
|
3
3
|
</p>
|
|
4
4
|
|
|
5
5
|
<p align="center"><em>Zero-config Vite plugin for Verbaly — live extraction, codegen and HMR.</em></p>
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { VerbalyConfig } from
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import { VerbalyConfig, VerbalyConfig as VerbalyConfig$1 } from "@verbaly/compiler";
|
|
2
|
+
import { Plugin } from "vite";
|
|
3
|
+
//#region src/index.d.ts
|
|
4
|
+
declare function verbaly(options?: VerbalyConfig$1): Plugin;
|
|
5
|
+
//#endregion
|
|
6
|
+
export { type VerbalyConfig, verbaly as default };
|
|
7
|
+
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.js
CHANGED
|
@@ -1,144 +1,114 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
formatCheckResult,
|
|
8
|
-
generateLocaleModule,
|
|
9
|
-
generateRuntimeModule,
|
|
10
|
-
loadCatalogs,
|
|
11
|
-
loadConfig,
|
|
12
|
-
syncCatalogs,
|
|
13
|
-
transformCode,
|
|
14
|
-
writeCatalog,
|
|
15
|
-
writeDts
|
|
16
|
-
} from "@verbaly/compiler";
|
|
17
|
-
import { readFileSync } from "fs";
|
|
18
|
-
var RESOLVED = "\0" + VIRTUAL_ID;
|
|
19
|
-
var LOCALE_PREFIX = `${RESOLVED}/locale/`;
|
|
20
|
-
var SOURCE_RE = /\.[cm]?[jt]sx?$/;
|
|
1
|
+
import { MessageRegistry, VIRTUAL_ID, analyze, check, formatCheckResult, generateLocaleModule, generateRuntimeModule, loadCatalogs, loadConfig, syncCatalogs, transformCode, writeCatalog, writeDts } from "@verbaly/compiler";
|
|
2
|
+
import { readFileSync } from "node:fs";
|
|
3
|
+
//#region src/index.ts
|
|
4
|
+
const RESOLVED = "\0" + VIRTUAL_ID;
|
|
5
|
+
const LOCALE_PREFIX = `${RESOLVED}/locale/`;
|
|
6
|
+
const SOURCE_RE = /\.[cm]?[jt]sx?$/;
|
|
21
7
|
function safeRead(file) {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
8
|
+
try {
|
|
9
|
+
return readFileSync(file, "utf8");
|
|
10
|
+
} catch {
|
|
11
|
+
return;
|
|
12
|
+
}
|
|
27
13
|
}
|
|
28
14
|
function verbaly(options = {}) {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
if (changed) scheduleFlush();
|
|
125
|
-
}
|
|
126
|
-
return transformCode(code, id, analysis) ?? void 0;
|
|
127
|
-
},
|
|
128
|
-
buildEnd() {
|
|
129
|
-
if (!isBuild) return;
|
|
130
|
-
const result = check(cfg, loadCatalogs(cfg), registry);
|
|
131
|
-
if (!result.ok) {
|
|
132
|
-
throw new Error(
|
|
133
|
-
`[verbaly] build blocked
|
|
134
|
-
${formatCheckResult(result)}
|
|
135
|
-
Run \`npx verbaly extract\` and fill the missing translations.`
|
|
136
|
-
);
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
};
|
|
15
|
+
let cfg;
|
|
16
|
+
let catalogs;
|
|
17
|
+
let isBuild = false;
|
|
18
|
+
let server;
|
|
19
|
+
let writeTimer;
|
|
20
|
+
const registry = new MessageRegistry();
|
|
21
|
+
const selfWrites = /* @__PURE__ */ new Map();
|
|
22
|
+
function invalidateVirtual() {
|
|
23
|
+
if (!server) return;
|
|
24
|
+
const ids = [RESOLVED, ...cfg.locales.map((locale) => LOCALE_PREFIX + locale)];
|
|
25
|
+
for (const id of ids) {
|
|
26
|
+
const mod = server.moduleGraph.getModuleById(id);
|
|
27
|
+
if (mod) server.moduleGraph.invalidateModule(mod);
|
|
28
|
+
}
|
|
29
|
+
server.ws.send({ type: "full-reload" });
|
|
30
|
+
}
|
|
31
|
+
function flushCatalogs() {
|
|
32
|
+
syncCatalogs(cfg, catalogs, registry);
|
|
33
|
+
for (const locale of cfg.locales) {
|
|
34
|
+
const serialized = writeCatalog(cfg, locale, catalogs[locale] ?? {});
|
|
35
|
+
selfWrites.set(locale, serialized);
|
|
36
|
+
}
|
|
37
|
+
writeDts(cfg, new Map(Object.entries(catalogs[cfg.sourceLocale] ?? {})));
|
|
38
|
+
invalidateVirtual();
|
|
39
|
+
}
|
|
40
|
+
function scheduleFlush() {
|
|
41
|
+
clearTimeout(writeTimer);
|
|
42
|
+
writeTimer = setTimeout(flushCatalogs, 50);
|
|
43
|
+
}
|
|
44
|
+
async function reloadFromDisk() {
|
|
45
|
+
cfg = await loadConfig(cfg.root, options);
|
|
46
|
+
catalogs = loadCatalogs(cfg);
|
|
47
|
+
invalidateVirtual();
|
|
48
|
+
}
|
|
49
|
+
return {
|
|
50
|
+
name: "verbaly",
|
|
51
|
+
enforce: "pre",
|
|
52
|
+
async configResolved(viteConfig) {
|
|
53
|
+
isBuild = viteConfig.command === "build";
|
|
54
|
+
cfg = await loadConfig(options.root ?? viteConfig.root, options);
|
|
55
|
+
catalogs = loadCatalogs(cfg);
|
|
56
|
+
if (!isBuild) writeDts(cfg, new Map(Object.entries(catalogs[cfg.sourceLocale] ?? {})));
|
|
57
|
+
},
|
|
58
|
+
configureServer(devServer) {
|
|
59
|
+
server = devServer;
|
|
60
|
+
devServer.watcher.add(cfg.dir);
|
|
61
|
+
const onCatalogFile = (file, locale) => {
|
|
62
|
+
if (!file.startsWith(cfg.dir) || !file.endsWith(".json")) return;
|
|
63
|
+
if (locale) {
|
|
64
|
+
const expected = selfWrites.get(locale);
|
|
65
|
+
if (expected !== void 0) {
|
|
66
|
+
selfWrites.delete(locale);
|
|
67
|
+
if (safeRead(file) === expected) return;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
reloadFromDisk();
|
|
71
|
+
};
|
|
72
|
+
const localeOf = (file) => file.split(/[\\/]/).pop()?.slice(0, -5);
|
|
73
|
+
devServer.watcher.on("change", (file) => onCatalogFile(file, localeOf(file)));
|
|
74
|
+
devServer.watcher.on("add", (file) => onCatalogFile(file, localeOf(file)));
|
|
75
|
+
devServer.watcher.on("unlink", (file) => {
|
|
76
|
+
if (SOURCE_RE.test(file) && !file.includes("node_modules")) {
|
|
77
|
+
registry.remove(file);
|
|
78
|
+
scheduleFlush();
|
|
79
|
+
}
|
|
80
|
+
});
|
|
81
|
+
},
|
|
82
|
+
resolveId(id) {
|
|
83
|
+
if (id === VIRTUAL_ID || id.startsWith(`${VIRTUAL_ID}/`)) return "\0" + id;
|
|
84
|
+
},
|
|
85
|
+
load(id) {
|
|
86
|
+
if (id === RESOLVED) return generateRuntimeModule(cfg);
|
|
87
|
+
if (id.startsWith(LOCALE_PREFIX)) return generateLocaleModule(catalogs[id.slice(LOCALE_PREFIX.length)] ?? {});
|
|
88
|
+
},
|
|
89
|
+
transform(code, id) {
|
|
90
|
+
if (!SOURCE_RE.test(id) || id.includes("node_modules") || id.startsWith("\0")) return;
|
|
91
|
+
const analysis = analyze(code, id);
|
|
92
|
+
registry.update(id, analysis);
|
|
93
|
+
if (!isBuild && analysis.tagged.length > 0) {
|
|
94
|
+
const source = catalogs[cfg.sourceLocale] ??= {};
|
|
95
|
+
let changed = false;
|
|
96
|
+
for (const msg of analysis.tagged) if (source[msg.key] !== msg.message) {
|
|
97
|
+
source[msg.key] = msg.message;
|
|
98
|
+
changed = true;
|
|
99
|
+
}
|
|
100
|
+
if (changed) scheduleFlush();
|
|
101
|
+
}
|
|
102
|
+
return transformCode(code, id, analysis) ?? void 0;
|
|
103
|
+
},
|
|
104
|
+
buildEnd() {
|
|
105
|
+
if (!isBuild) return;
|
|
106
|
+
const result = check(cfg, loadCatalogs(cfg), registry);
|
|
107
|
+
if (!result.ok) throw new Error(`[verbaly] build blocked\n${formatCheckResult(result)}\nRun \`npx verbaly extract\` and fill the missing translations.`);
|
|
108
|
+
}
|
|
109
|
+
};
|
|
140
110
|
}
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
111
|
+
//#endregion
|
|
112
|
+
export { verbaly as default };
|
|
113
|
+
|
|
144
114
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["import {\n MessageRegistry,\n VIRTUAL_ID,\n analyze,\n check,\n formatCheckResult,\n generateLocaleModule,\n generateRuntimeModule,\n loadCatalogs,\n loadConfig,\n syncCatalogs,\n transformCode,\n writeCatalog,\n writeDts,\n type Catalogs,\n type ResolvedConfig,\n type VerbalyConfig,\n} from '@verbaly/compiler';\nimport { readFileSync } from 'node:fs';\nimport type { Plugin, ViteDevServer } from 'vite';\n\nconst RESOLVED = '\\0' + VIRTUAL_ID;\nconst LOCALE_PREFIX = `${RESOLVED}/locale/`;\nconst SOURCE_RE = /\\.[cm]?[jt]sx?$/;\n\nfunction safeRead(file: string): string | undefined {\n try {\n return readFileSync(file, 'utf8');\n } catch {\n return undefined;\n }\n}\n\nexport type { VerbalyConfig } from '@verbaly/compiler';\n\nexport default function verbaly(options: VerbalyConfig = {}): Plugin {\n let cfg: ResolvedConfig;\n let catalogs: Catalogs;\n let isBuild = false;\n let server: ViteDevServer | undefined;\n let writeTimer: ReturnType<typeof setTimeout> | undefined;\n const registry = new MessageRegistry();\n const selfWrites = new Map<string, string>();\n\n function invalidateVirtual(): void {\n if (!server) return;\n const ids = [RESOLVED, ...cfg.locales.map((locale) => LOCALE_PREFIX + locale)];\n for (const id of ids) {\n const mod = server.moduleGraph.getModuleById(id);\n if (mod) server.moduleGraph.invalidateModule(mod);\n }\n server.ws.send({ type: 'full-reload' });\n }\n\n function flushCatalogs(): void {\n syncCatalogs(cfg, catalogs, registry);\n for (const locale of cfg.locales) {\n const serialized = writeCatalog(cfg, locale, catalogs[locale] ?? {});\n selfWrites.set(locale, serialized);\n }\n writeDts(cfg, new Map(Object.entries(catalogs[cfg.sourceLocale] ?? {})));\n invalidateVirtual();\n }\n\n function scheduleFlush(): void {\n clearTimeout(writeTimer);\n writeTimer = setTimeout(flushCatalogs, 50);\n }\n\n async function reloadFromDisk(): Promise<void> {\n cfg = await loadConfig(cfg.root, options);\n catalogs = loadCatalogs(cfg);\n invalidateVirtual();\n }\n\n return {\n name: 'verbaly',\n enforce: 'pre',\n\n async configResolved(viteConfig) {\n isBuild = viteConfig.command === 'build';\n cfg = await loadConfig(options.root ?? viteConfig.root, options);\n catalogs = loadCatalogs(cfg);\n if (!isBuild) {\n writeDts(cfg, new Map(Object.entries(catalogs[cfg.sourceLocale] ?? {})));\n }\n },\n\n configureServer(devServer) {\n server = devServer;\n devServer.watcher.add(cfg.dir);\n const onCatalogFile = (file: string, locale?: string): void => {\n if (!file.startsWith(cfg.dir) || !file.endsWith('.json')) return;\n if (locale) {\n const expected = selfWrites.get(locale);\n if (expected !== undefined) {\n selfWrites.delete(locale);\n // content compare — a stale entry must not swallow an external edit\n if (safeRead(file) === expected) return;\n }\n }\n void reloadFromDisk();\n };\n const localeOf = (file: string): string | undefined =>\n file.split(/[\\\\/]/).pop()?.slice(0, -5);\n devServer.watcher.on('change', (file) => onCatalogFile(file, localeOf(file)));\n devServer.watcher.on('add', (file) => onCatalogFile(file, localeOf(file)));\n devServer.watcher.on('unlink', (file) => {\n if (SOURCE_RE.test(file) && !file.includes('node_modules')) {\n registry.remove(file);\n scheduleFlush();\n }\n });\n },\n\n resolveId(id) {\n if (id === VIRTUAL_ID || id.startsWith(`${VIRTUAL_ID}/`)) return '\\0' + id;\n return undefined;\n },\n\n load(id) {\n if (id === RESOLVED) return generateRuntimeModule(cfg);\n if (id.startsWith(LOCALE_PREFIX)) {\n return generateLocaleModule(catalogs[id.slice(LOCALE_PREFIX.length)] ?? {});\n }\n return undefined;\n },\n\n transform(code, id) {\n if (!SOURCE_RE.test(id) || id.includes('node_modules') || id.startsWith('\\0')) {\n return undefined;\n }\n const analysis = analyze(code, id);\n registry.update(id, analysis);\n\n if (!isBuild && analysis.tagged.length > 0) {\n const source = (catalogs[cfg.sourceLocale] ??= {});\n let changed = false;\n for (const msg of analysis.tagged) {\n if (source[msg.key] !== msg.message) {\n source[msg.key] = msg.message;\n changed = true;\n }\n }\n if (changed) scheduleFlush();\n }\n\n return transformCode(code, id, analysis) ?? undefined;\n },\n\n buildEnd() {\n if (!isBuild) return;\n const result = check(cfg, loadCatalogs(cfg), registry);\n if (!result.ok) {\n throw new Error(\n `[verbaly] build blocked\\n${formatCheckResult(result)}\\n` +\n `Run \\`npx verbaly extract\\` and fill the missing translations.`,\n );\n }\n },\n };\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../src/index.ts"],"sourcesContent":["import {\n MessageRegistry,\n VIRTUAL_ID,\n analyze,\n check,\n formatCheckResult,\n generateLocaleModule,\n generateRuntimeModule,\n loadCatalogs,\n loadConfig,\n syncCatalogs,\n transformCode,\n writeCatalog,\n writeDts,\n type Catalogs,\n type ResolvedConfig,\n type VerbalyConfig,\n} from '@verbaly/compiler';\nimport { readFileSync } from 'node:fs';\nimport type { Plugin, ViteDevServer } from 'vite';\n\nconst RESOLVED = '\\0' + VIRTUAL_ID;\nconst LOCALE_PREFIX = `${RESOLVED}/locale/`;\nconst SOURCE_RE = /\\.[cm]?[jt]sx?$/;\n\nfunction safeRead(file: string): string | undefined {\n try {\n return readFileSync(file, 'utf8');\n } catch {\n return undefined;\n }\n}\n\nexport type { VerbalyConfig } from '@verbaly/compiler';\n\nexport default function verbaly(options: VerbalyConfig = {}): Plugin {\n let cfg: ResolvedConfig;\n let catalogs: Catalogs;\n let isBuild = false;\n let server: ViteDevServer | undefined;\n let writeTimer: ReturnType<typeof setTimeout> | undefined;\n const registry = new MessageRegistry();\n const selfWrites = new Map<string, string>();\n\n function invalidateVirtual(): void {\n if (!server) return;\n const ids = [RESOLVED, ...cfg.locales.map((locale) => LOCALE_PREFIX + locale)];\n for (const id of ids) {\n const mod = server.moduleGraph.getModuleById(id);\n if (mod) server.moduleGraph.invalidateModule(mod);\n }\n server.ws.send({ type: 'full-reload' });\n }\n\n function flushCatalogs(): void {\n syncCatalogs(cfg, catalogs, registry);\n for (const locale of cfg.locales) {\n const serialized = writeCatalog(cfg, locale, catalogs[locale] ?? {});\n selfWrites.set(locale, serialized);\n }\n writeDts(cfg, new Map(Object.entries(catalogs[cfg.sourceLocale] ?? {})));\n invalidateVirtual();\n }\n\n function scheduleFlush(): void {\n clearTimeout(writeTimer);\n writeTimer = setTimeout(flushCatalogs, 50);\n }\n\n async function reloadFromDisk(): Promise<void> {\n cfg = await loadConfig(cfg.root, options);\n catalogs = loadCatalogs(cfg);\n invalidateVirtual();\n }\n\n return {\n name: 'verbaly',\n enforce: 'pre',\n\n async configResolved(viteConfig) {\n isBuild = viteConfig.command === 'build';\n cfg = await loadConfig(options.root ?? viteConfig.root, options);\n catalogs = loadCatalogs(cfg);\n if (!isBuild) {\n writeDts(cfg, new Map(Object.entries(catalogs[cfg.sourceLocale] ?? {})));\n }\n },\n\n configureServer(devServer) {\n server = devServer;\n devServer.watcher.add(cfg.dir);\n const onCatalogFile = (file: string, locale?: string): void => {\n if (!file.startsWith(cfg.dir) || !file.endsWith('.json')) return;\n if (locale) {\n const expected = selfWrites.get(locale);\n if (expected !== undefined) {\n selfWrites.delete(locale);\n // content compare — a stale entry must not swallow an external edit\n if (safeRead(file) === expected) return;\n }\n }\n void reloadFromDisk();\n };\n const localeOf = (file: string): string | undefined =>\n file.split(/[\\\\/]/).pop()?.slice(0, -5);\n devServer.watcher.on('change', (file) => onCatalogFile(file, localeOf(file)));\n devServer.watcher.on('add', (file) => onCatalogFile(file, localeOf(file)));\n devServer.watcher.on('unlink', (file) => {\n if (SOURCE_RE.test(file) && !file.includes('node_modules')) {\n registry.remove(file);\n scheduleFlush();\n }\n });\n },\n\n resolveId(id) {\n if (id === VIRTUAL_ID || id.startsWith(`${VIRTUAL_ID}/`)) return '\\0' + id;\n return undefined;\n },\n\n load(id) {\n if (id === RESOLVED) return generateRuntimeModule(cfg);\n if (id.startsWith(LOCALE_PREFIX)) {\n return generateLocaleModule(catalogs[id.slice(LOCALE_PREFIX.length)] ?? {});\n }\n return undefined;\n },\n\n transform(code, id) {\n if (!SOURCE_RE.test(id) || id.includes('node_modules') || id.startsWith('\\0')) {\n return undefined;\n }\n const analysis = analyze(code, id);\n registry.update(id, analysis);\n\n if (!isBuild && analysis.tagged.length > 0) {\n const source = (catalogs[cfg.sourceLocale] ??= {});\n let changed = false;\n for (const msg of analysis.tagged) {\n if (source[msg.key] !== msg.message) {\n source[msg.key] = msg.message;\n changed = true;\n }\n }\n if (changed) scheduleFlush();\n }\n\n return transformCode(code, id, analysis) ?? undefined;\n },\n\n buildEnd() {\n if (!isBuild) return;\n const result = check(cfg, loadCatalogs(cfg), registry);\n if (!result.ok) {\n throw new Error(\n `[verbaly] build blocked\\n${formatCheckResult(result)}\\n` +\n `Run \\`npx verbaly extract\\` and fill the missing translations.`,\n );\n }\n },\n };\n}\n"],"mappings":";;;AAqBA,MAAM,WAAW,OAAO;AACxB,MAAM,gBAAgB,GAAG,SAAS;AAClC,MAAM,YAAY;AAElB,SAAS,SAAS,MAAkC;CAClD,IAAI;EACF,OAAO,aAAa,MAAM,MAAM;CAClC,QAAQ;EACN;CACF;AACF;AAIA,SAAwB,QAAQ,UAAyB,CAAC,GAAW;CACnE,IAAI;CACJ,IAAI;CACJ,IAAI,UAAU;CACd,IAAI;CACJ,IAAI;CACJ,MAAM,WAAW,IAAI,gBAAgB;CACrC,MAAM,6BAAa,IAAI,IAA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C,OAAO,IAAI,OAAO,IAAI;KACtB,UAAU;IACZ;IAEF,IAAI,SAAS,cAAc;GAC7B;GAEA,OAAO,cAAc,MAAM,IAAI,QAAQ,KAAK,KAAA;EAC9C;EAEA,WAAW;GACT,IAAI,CAAC,SAAS;GACd,MAAM,SAAS,MAAM,KAAK,aAAa,GAAG,GAAG,QAAQ;GACrD,IAAI,CAAC,OAAO,IACV,MAAM,IAAI,MACR,4BAA4B,kBAAkB,MAAM,EAAE,iEAExD;EAEJ;CACF;AACF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@verbaly/vite",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.13.0",
|
|
4
4
|
"description": "Zero-config Vite plugin for Verbaly — extraction, codegen and HMR.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"i18n",
|
|
@@ -38,19 +38,19 @@
|
|
|
38
38
|
"access": "public"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@verbaly/compiler": "0.
|
|
41
|
+
"@verbaly/compiler": "0.13.0"
|
|
42
42
|
},
|
|
43
43
|
"peerDependencies": {
|
|
44
44
|
"vite": "^7.0.0 || ^8.0.0",
|
|
45
|
-
"verbaly": "^0.
|
|
45
|
+
"verbaly": "^0.13.0"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"vite": "^8.1.3",
|
|
49
|
-
"verbaly": "0.
|
|
49
|
+
"verbaly": "0.13.0"
|
|
50
50
|
},
|
|
51
51
|
"scripts": {
|
|
52
|
-
"build": "
|
|
53
|
-
"dev": "
|
|
52
|
+
"build": "tsdown",
|
|
53
|
+
"dev": "tsdown --watch",
|
|
54
54
|
"test": "vitest run --passWithNoTests",
|
|
55
55
|
"typecheck": "tsc --noEmit"
|
|
56
56
|
}
|