@adeficior/data-modifier-lang 2.0.1 → 2.0.3

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
@@ -1,4 +1,5 @@
1
1
  export type { LangEmitter } from "./emitter";
2
2
  export type { LangLoader } from "./loader";
3
3
  export { default } from "./module";
4
+ export { langFolder } from "./schema";
4
5
  export type { LangDefinition } from "./schema";
package/dist/index.js CHANGED
@@ -1,2 +1,3 @@
1
1
  export { default } from "./module";
2
+ export { langFolder } from "./schema";
2
3
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AACnC,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC"}
package/dist/module.js CHANGED
@@ -2,6 +2,7 @@ import { defineModule, jsonFilePattern } from "@adeficior/data-modifier-core";
2
2
  import { name } from "../package.json";
3
3
  import { LangEmitterImpl } from "./emitter";
4
4
  import { LangLoaderImpl } from "./loader";
5
+ import { langFolder } from "./schema";
5
6
  export default defineModule({
6
7
  importModule: name,
7
8
  types: {
@@ -14,7 +15,7 @@ export default defineModule({
14
15
  },
15
16
  promote: [{ key: "lang", service: "emitter:lang" }],
16
17
  setup: (pack) => {
17
- const loader = pack.loader("lang", () => new LangLoaderImpl(), jsonFilePattern("assets", "lang"));
18
+ const loader = pack.loader("lang", () => new LangLoaderImpl(langFolder()), jsonFilePattern(langFolder()));
18
19
  pack.emitter("lang", () => new LangEmitterImpl(loader()));
19
20
  },
20
21
  });
@@ -1 +1 @@
1
- {"version":3,"file":"module.js","sourceRoot":"","sources":["../src/module.ts"],"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AY;SACnB;QACD,QAAQ,EAAE;YACR,IAAI,EAAE,aAAa;SACpB;KACF;IACD,OAAO,EAAE,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,cAAc,EAAE,CAAC;IACnD,KAAK,EAAE,CAAC,IAAI,EAAE,EAAE;QACd,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CACxB,MAAM,EACN,GAAG,EAAE,CAAC,IAAI,cAAc,CAAC,UAAU,EAAE,CAAC,EACtC,eAAe,CAAC,UAAU,EAAE,CAAC,CAC9B,CAAC;QACF,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,GAAG,EAAE,CAAC,IAAI,eAAe,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;IAC5D,CAAC;CACF,CAAC,CAAC"}
package/dist/schema.d.ts CHANGED
@@ -1,3 +1,5 @@
1
+ import type { ResourceFolder } from "@adeficior/data-modifier-core";
1
2
  import * as z from "zod";
2
3
  export declare const LangSchema: z.ZodRecord<z.ZodString, z.ZodString>;
3
4
  export type LangDefinition = z.infer<typeof LangSchema>;
5
+ export declare function langFolder(): ResourceFolder;
package/dist/schema.js CHANGED
@@ -1,3 +1,6 @@
1
1
  import * as z from "zod";
2
2
  export const LangSchema = z.record(z.string(), z.string());
3
+ export function langFolder() {
4
+ return { packType: "assets", folder: "lang" };
5
+ }
3
6
  //# sourceMappingURL=schema.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"schema.js","sourceRoot":"","sources":["../src/schema.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAEzB,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC"}
1
+ {"version":3,"file":"schema.js","sourceRoot":"","sources":["../src/schema.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAEzB,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC;AAI3D,MAAM,UAAU,UAAU;IACxB,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC;AAChD,CAAC"}
package/package.json CHANGED
@@ -1,19 +1,19 @@
1
1
  {
2
2
  "name": "@adeficior/data-modifier-lang",
3
3
  "description": "data-modifier module for translations",
4
- "version": "2.0.1",
4
+ "version": "2.0.3",
5
5
  "exports": { ".": "./dist/index.js" },
6
6
  "type": "module",
7
7
  "devDependencies": {
8
8
  "@types/lodash-es": "^4.17.12",
9
- "@adeficior/data-modifier-core": "^2.0.1"
9
+ "@adeficior/data-modifier-core": "^2.1.0"
10
10
  },
11
11
  "peerDependencies": {
12
12
  "@adeficior/pack-resolver": "^2.0.1",
13
13
  "typescript": "^5",
14
14
  "zod": "^4.4.3",
15
15
  "lodash-es": "^4.18.1",
16
- "@adeficior/data-modifier-core": "^2.0.1"
16
+ "@adeficior/data-modifier-core": "^2.1.0"
17
17
  },
18
18
  "typesVersions": { "*": {} },
19
19
  "types": "./dist/index.d.ts",