@verbaly/unplugin 0.75.0 → 0.76.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/dist/index.d.ts CHANGED
@@ -4,5 +4,4 @@ import { UnpluginInstance } from "unplugin";
4
4
  export type UnpluginVerbalyOptions = PluginOptions;
5
5
  export declare const verbaly: UnpluginInstance<UnpluginVerbalyOptions | undefined>;
6
6
  //#endregion
7
- export { type VerbalyConfig, verbaly as default };
8
- //# sourceMappingURL=index.d.ts.map
7
+ export { type VerbalyConfig, verbaly as default };
package/dist/index.js CHANGED
@@ -47,5 +47,3 @@ const factory = (options = {}) => {
47
47
  const verbaly = createUnplugin(factory);
48
48
  //#endregion
49
49
  export { verbaly as default, verbaly };
50
-
51
- //# sourceMappingURL=index.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@verbaly/unplugin",
3
- "version": "0.75.0",
3
+ "version": "0.76.0",
4
4
  "description": "Verbaly for webpack, Rollup, esbuild and Rspack: extraction, virtual modules and build gate via unplugin.",
5
5
  "keywords": [
6
6
  "i18n",
@@ -42,14 +42,14 @@
42
42
  "access": "public"
43
43
  },
44
44
  "dependencies": {
45
- "@verbaly/compiler": "0.75.0",
45
+ "@verbaly/compiler": "0.76.0",
46
46
  "unplugin": "^3.4.0"
47
47
  },
48
48
  "peerDependencies": {
49
- "verbaly": "^0.75.0"
49
+ "verbaly": "^0.76.0"
50
50
  },
51
51
  "devDependencies": {
52
- "verbaly": "^0.75.0"
52
+ "verbaly": "^0.76.0"
53
53
  },
54
54
  "scripts": {
55
55
  "build": "tsdown",
package/dist/index.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../src/index.ts"],"sourcesContent":["import {\n MessageRegistry,\n RESOLVED_VIRTUAL_ID,\n createSourceFilter,\n extractProject,\n isTransformTarget,\n loadCatalogs,\n loadConfig,\n loadVirtualModule,\n reportOutsideInclude,\n resolveVirtualId,\n runBuildGate,\n syncCatalogs,\n transformSource,\n type Catalogs,\n type PluginOptions,\n type ResolvedConfig,\n} from '@verbaly/compiler';\nimport { createUnplugin, type UnpluginFactory, type UnpluginInstance } from 'unplugin';\n\n// the shared bundler-plugin options (config + failOnMissing), named for this plugin\nexport type UnpluginVerbalyOptions = PluginOptions;\n\n// build-focused: virtual modules + transform + gate.\nconst factory: UnpluginFactory<UnpluginVerbalyOptions | undefined> = (options = {}) => {\n let cfg: ResolvedConfig;\n let catalogs: Catalogs;\n let included: (id: string) => boolean;\n // the first build's scan: each file it read unchanged reaches transform already parsed\n let scan: MessageRegistry | undefined;\n const registry = new MessageRegistry();\n const ready = (async () => {\n cfg = await loadConfig(options.root ?? process.cwd(), options, { plugin: true });\n catalogs = loadCatalogs(cfg);\n included = createSourceFilter(cfg);\n scan = await extractProject(cfg, { keepSource: true });\n // the code's text ships: a text it owns that was edited in the catalog never reaches the bundle\n syncCatalogs(cfg, catalogs, scan);\n })();\n // buildStart awaits it and reports the failure; unwatched till then, a rejection ends the process\n ready.catch(() => {});\n\n return {\n name: 'verbaly',\n enforce: 'pre',\n\n async buildStart() {\n await ready;\n // a file outside include writes a t`…` that no build translates: said once, at the start\n await reportOutsideInclude(cfg);\n },\n\n resolveId(id) {\n return resolveVirtualId(id) ?? null;\n },\n\n loadInclude(id) {\n return id.startsWith(RESOLVED_VIRTUAL_ID);\n },\n\n load(id) {\n return loadVirtualModule(id, cfg, catalogs) ?? null;\n },\n\n transformInclude(id) {\n return isTransformTarget(id);\n },\n\n transform(code, id) {\n if (!included(id)) return null;\n return transformSource(code, id, registry, scan).result;\n },\n\n buildEnd() {\n // a watch rebuild parses what changed: the scan only ever describes the first build\n scan = undefined;\n runBuildGate(cfg, registry, options.failOnMissing);\n },\n };\n};\n\nexport const verbaly: UnpluginInstance<UnpluginVerbalyOptions | undefined> =\n createUnplugin(factory);\n\nexport default verbaly;\n\nexport type { VerbalyConfig } from '@verbaly/compiler';\n"],"mappings":";;;AAwBA,MAAM,WAAgE,UAAU,CAAC,MAAM;CACrF,IAAI;CACJ,IAAI;CACJ,IAAI;CAEJ,IAAI;CACJ,MAAM,WAAW,IAAI,gBAAgB;CACrC,MAAM,SAAS,YAAY;EACzB,MAAM,MAAM,WAAW,QAAQ,QAAQ,QAAQ,IAAI,GAAG,SAAS,EAAE,QAAQ,KAAK,CAAC;EAC/E,WAAW,aAAa,GAAG;EAC3B,WAAW,mBAAmB,GAAG;EACjC,OAAO,MAAM,eAAe,KAAK,EAAE,YAAY,KAAK,CAAC;EAErD,aAAa,KAAK,UAAU,IAAI;CAClC,EAAA,CAAG;CAEH,MAAM,YAAY,CAAC,CAAC;CAEpB,OAAO;EACL,MAAM;EACN,SAAS;EAET,MAAM,aAAa;GACjB,MAAM;GAEN,MAAM,qBAAqB,GAAG;EAChC;EAEA,UAAU,IAAI;GACZ,OAAO,iBAAiB,EAAE,KAAK;EACjC;EAEA,YAAY,IAAI;GACd,OAAO,GAAG,WAAW,mBAAmB;EAC1C;EAEA,KAAK,IAAI;GACP,OAAO,kBAAkB,IAAI,KAAK,QAAQ,KAAK;EACjD;EAEA,iBAAiB,IAAI;GACnB,OAAO,kBAAkB,EAAE;EAC7B;EAEA,UAAU,MAAM,IAAI;GAClB,IAAI,CAAC,SAAS,EAAE,GAAG,OAAO;GAC1B,OAAO,gBAAgB,MAAM,IAAI,UAAU,IAAI,CAAC,CAAC;EACnD;EAEA,WAAW;GAET,OAAO,KAAA;GACP,aAAa,KAAK,UAAU,QAAQ,aAAa;EACnD;CACF;AACF;AAEA,MAAa,UACX,eAAe,OAAO"}