@adeficior/data-modifier-lang 2.0.0-rc.20260814115618
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/emitter.d.ts +31 -0
- package/dist/emitter.js +106 -0
- package/dist/emitter.js.map +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -0
- package/dist/loader.d.ts +6 -0
- package/dist/loader.js +12 -0
- package/dist/loader.js.map +1 -0
- package/dist/module.d.ts +11 -0
- package/dist/module.js +20 -0
- package/dist/module.js.map +1 -0
- package/dist/schema.d.ts +3 -0
- package/dist/schema.js +3 -0
- package/dist/schema.js.map +1 -0
- package/package.json +35 -0
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { type ClearableEmitter, type IdInput, type LoaderContext, type RegistryProvider } from "@adeficior/data-modifier-core";
|
|
2
|
+
import { type InferIds, type RegistryId } from "@adeficior/data-modifier/generated";
|
|
3
|
+
import { type LangDefinition } from "./schema";
|
|
4
|
+
type ReplaceOptions = Readonly<{
|
|
5
|
+
matchCase?: boolean;
|
|
6
|
+
keepCase?: boolean;
|
|
7
|
+
lang?: string | string[];
|
|
8
|
+
namespaces?: string | string[];
|
|
9
|
+
}>;
|
|
10
|
+
type EntryOptions = {
|
|
11
|
+
lang?: string;
|
|
12
|
+
};
|
|
13
|
+
export interface LangRules {
|
|
14
|
+
replaceValue(match: string, value: string, options?: ReplaceOptions): void;
|
|
15
|
+
replaceValue(match: RegExp, value: string, options?: Omit<ReplaceOptions, "matchCase">): void;
|
|
16
|
+
addCustom(file: IdInput, key: string, value: string): void;
|
|
17
|
+
entryName<T extends RegistryId>(registry: T, id: IdInput<InferIds<T>>, value: string, options?: EntryOptions): void;
|
|
18
|
+
}
|
|
19
|
+
export declare class LangEmitter implements LangRules, ClearableEmitter {
|
|
20
|
+
private readonly registry;
|
|
21
|
+
private custom;
|
|
22
|
+
private rules;
|
|
23
|
+
constructor(registry: RegistryProvider<LangDefinition>);
|
|
24
|
+
resolver(context: LoaderContext): import("@adeficior/pack-resolver").Resolver<import("@adeficior/pack-resolver").Acceptable, import("@adeficior/pack-resolver").BaseContext>;
|
|
25
|
+
clear(): void;
|
|
26
|
+
private langPath;
|
|
27
|
+
replaceValue(match: string | RegExp, value: string, options?: ReplaceOptions): void;
|
|
28
|
+
addCustom(file: IdInput, key: string, value: string): void;
|
|
29
|
+
entryName<T extends RegistryId>(registry: T, id: IdInput<InferIds<T>>, value: string, { lang }?: EntryOptions): void;
|
|
30
|
+
}
|
|
31
|
+
export {};
|
package/dist/emitter.js
ADDED
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import { createId, encodeId, Registry, toJson, } from "@adeficior/data-modifier-core";
|
|
2
|
+
import {} from "@adeficior/data-modifier/generated";
|
|
3
|
+
import { arrayOrSelf, simpleResolver } from "@adeficior/pack-resolver";
|
|
4
|
+
import { mapValues, omitBy } from "lodash-es";
|
|
5
|
+
import {} from "./schema";
|
|
6
|
+
export class LangEmitter {
|
|
7
|
+
registry;
|
|
8
|
+
custom = new Registry();
|
|
9
|
+
rules = [];
|
|
10
|
+
constructor(registry) {
|
|
11
|
+
this.registry = registry;
|
|
12
|
+
}
|
|
13
|
+
resolver(context) {
|
|
14
|
+
return simpleResolver(async (acceptor) => {
|
|
15
|
+
const missingCustomFiles = new Set(this.custom.keys());
|
|
16
|
+
await this.registry.forEachAsync(async (lang, id) => {
|
|
17
|
+
const allRules = this.rules.filter((rule) => {
|
|
18
|
+
return ((rule.languages.length === 0 || rule.languages.includes(id.path)) &&
|
|
19
|
+
(rule.namespaces.length === 0 ||
|
|
20
|
+
rule.namespaces.includes(id.namespace)));
|
|
21
|
+
});
|
|
22
|
+
const replaced = omitBy(mapValues(lang, (value, key) => {
|
|
23
|
+
const rules = allRules.filter((rule) => rule.key?.(key) || rule.value?.(value));
|
|
24
|
+
if (rules.length === 0)
|
|
25
|
+
return undefined;
|
|
26
|
+
return rules.reduce((previous, rule) => rule.replacer(previous), value);
|
|
27
|
+
}), (it) => !it);
|
|
28
|
+
const custom = this.custom.get(id) ?? {};
|
|
29
|
+
const output = {
|
|
30
|
+
...replaced,
|
|
31
|
+
...custom,
|
|
32
|
+
};
|
|
33
|
+
if (Object.keys(output).length > 0) {
|
|
34
|
+
missingCustomFiles.delete(encodeId(id));
|
|
35
|
+
const path = this.langPath(id);
|
|
36
|
+
await acceptor(path, toJson(output));
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
await Promise.all(Array.from(missingCustomFiles).map(async (id) => {
|
|
40
|
+
const path = this.langPath(createId(id));
|
|
41
|
+
await acceptor(path, toJson(this.custom.get(id)));
|
|
42
|
+
}));
|
|
43
|
+
}, context);
|
|
44
|
+
}
|
|
45
|
+
clear() {
|
|
46
|
+
this.rules = [];
|
|
47
|
+
this.custom.clear();
|
|
48
|
+
}
|
|
49
|
+
langPath(id) {
|
|
50
|
+
return `assets/${id.namespace}/lang/${id.path}.json`;
|
|
51
|
+
}
|
|
52
|
+
replaceValue(match, value, options = {}) {
|
|
53
|
+
const languages = arrayOrSelf(options.lang);
|
|
54
|
+
const namespaces = arrayOrSelf(options.namespaces);
|
|
55
|
+
const matcher = options.keepCase === false ? () => value : keepCaseMatcher(value);
|
|
56
|
+
if (typeof match === "string") {
|
|
57
|
+
if (options.matchCase) {
|
|
58
|
+
this.rules.push({
|
|
59
|
+
languages,
|
|
60
|
+
namespaces,
|
|
61
|
+
value: (it) => it.includes(match),
|
|
62
|
+
replacer: (it) => it.replaceAll(match, matcher),
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
else {
|
|
66
|
+
this.replaceValue(new RegExp(match, "i"), value, options);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
else {
|
|
70
|
+
this.rules.push({
|
|
71
|
+
languages,
|
|
72
|
+
namespaces,
|
|
73
|
+
value: (it) => match.test(it),
|
|
74
|
+
replacer: (it) => it.replace(match, matcher),
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
addCustom(file, key, value) {
|
|
79
|
+
const definition = this.custom.getOrPut(file, () => ({}));
|
|
80
|
+
definition[key] = value;
|
|
81
|
+
}
|
|
82
|
+
entryName(registry, id, value, { lang } = {}) {
|
|
83
|
+
const { namespace, path } = createId(id);
|
|
84
|
+
const file = createId({ namespace, path: lang ?? "en_us" });
|
|
85
|
+
const { path: registryPath } = createId(registry);
|
|
86
|
+
this.addCustom(file, `${registryPath}.${namespace}.${path}`, value);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
// Taken from https://stackoverflow.com/questions/17264639/replace-text-but-keep-case
|
|
90
|
+
function keepCaseMatcher(replaceValue) {
|
|
91
|
+
return (input) => {
|
|
92
|
+
let result = "";
|
|
93
|
+
for (let i = 0; i < replaceValue.length; i++) {
|
|
94
|
+
const c = replaceValue.charAt(i);
|
|
95
|
+
const p = input.charCodeAt(i);
|
|
96
|
+
if (p >= 65 && p < 65 + 26) {
|
|
97
|
+
result += c.toUpperCase();
|
|
98
|
+
}
|
|
99
|
+
else {
|
|
100
|
+
result += c.toLowerCase();
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
return result;
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
//# sourceMappingURL=emitter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"emitter.js","sourceRoot":"","sources":["../src/emitter.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,MAAM,GAMP,MAAM,+BAA+B,CAAC;AAKvC,OAAO,EAGN,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AACvE,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAC9C,OAAO,EAAuB,MAAM,UAAU,CAAC;AAsC/C,MAAM,OAAO,WAAW;IAIO;IAHrB,MAA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ACH,CAAC;QAED,OAAO,MAAM,CAAC;IAChB,CAAC,CAAC;AACJ,CAAC"}
|
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC"}
|
package/dist/loader.d.ts
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { JsonLoader, type Id, type RegistryProvider } from "@adeficior/data-modifier-core";
|
|
2
|
+
import { type LangDefinition } from "./schema";
|
|
3
|
+
export type LangRegistry = RegistryProvider<LangDefinition>;
|
|
4
|
+
export declare class LangLoader extends JsonLoader<LangDefinition> implements LangRegistry {
|
|
5
|
+
protected parse(json: unknown, id: Id): LangDefinition | null;
|
|
6
|
+
}
|
package/dist/loader.js
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { JsonLoader, } from "@adeficior/data-modifier-core";
|
|
2
|
+
import { LangSchema } from "./schema";
|
|
3
|
+
export class LangLoader extends JsonLoader {
|
|
4
|
+
parse(json, id) {
|
|
5
|
+
const parsed = LangSchema.parse(json);
|
|
6
|
+
const existing = this.get(id);
|
|
7
|
+
if (!existing)
|
|
8
|
+
return parsed;
|
|
9
|
+
return { ...existing, ...parsed };
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=loader.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"loader.js","sourceRoot":"","sources":["../src/loader.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,GAGX,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,UAAU,EAAuB,MAAM,UAAU,CAAC;AAI3D,MAAM,OAAO,UACX,SAAQ,UAA0B;IAGxB,KAAK,CAAC,IAAa,EAAE,EAAM;QACnC,MAAM,MAAM,GAAG,UAAU,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QACtC,MAAM,QAAQ,GAAG,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;QAC9B,IAAI,CAAC,QAAQ;YAAE,OAAO,MAAM,CAAC;QAC7B,OAAO,EAAE,GAAG,QAAQ,EAAE,GAAG,MAAM,EAAE,CAAC;IACpC,CAAC;CACF"}
|
package/dist/module.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type LangRules } from "./emitter";
|
|
2
|
+
import { type LangRegistry } from "./loader";
|
|
3
|
+
declare const _default: import("@adeficior/data-modifier-core").ModuleConfig<{
|
|
4
|
+
loaders: {
|
|
5
|
+
lang: LangRegistry;
|
|
6
|
+
};
|
|
7
|
+
emitters: {
|
|
8
|
+
lang: LangRules;
|
|
9
|
+
};
|
|
10
|
+
}>;
|
|
11
|
+
export default _default;
|
package/dist/module.js
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { defineModule, jsonFilePattern } from "@adeficior/data-modifier-core";
|
|
2
|
+
import { name } from "../package.json";
|
|
3
|
+
import { LangEmitter } from "./emitter";
|
|
4
|
+
import { LangLoader } from "./loader";
|
|
5
|
+
export default defineModule({
|
|
6
|
+
importModule: name,
|
|
7
|
+
types: {
|
|
8
|
+
loaders: {
|
|
9
|
+
lang: "LangRegistry",
|
|
10
|
+
},
|
|
11
|
+
emitters: {
|
|
12
|
+
lang: "LangRules",
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
setup: (pack) => {
|
|
16
|
+
const loader = pack.loader("lang", () => new LangLoader(), jsonFilePattern("assets", "lang"));
|
|
17
|
+
pack.emitter("lang", () => new LangEmitter(loader()));
|
|
18
|
+
},
|
|
19
|
+
});
|
|
20
|
+
//# sourceMappingURL=module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"module.js","sourceRoot":"","sources":["../src/module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAC9E,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AACvC,OAAO,EAAE,WAAW,EAAkB,MAAM,WAAW,CAAC;AACxD,OAAO,EAAE,UAAU,EAAqB,MAAM,UAAU,CAAC;AAEzD,eAAe,YAAY,CAOxB;IACD,YAAY,EAAE,IAAI;IAClB,KAAK,EAAE;QACL,OAAO,EAAE;YACP,IAAI,EAAE,cAAc;SACrB;QACD,QAAQ,EAAE;YACR,IAAI,EAAE,WAAW;SAClB;KACF;IACD,KAAK,EAAE,CAAC,IAAI,EAAE,EAAE;QACd,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CACxB,MAAM,EACN,GAAG,EAAE,CAAC,IAAI,UAAU,EAAE,EACtB,eAAe,CAAC,QAAQ,EAAE,MAAM,CAAC,CAClC,CAAC;QACF,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,GAAG,EAAE,CAAC,IAAI,WAAW,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;IACxD,CAAC;CACF,CAAC,CAAC"}
|
package/dist/schema.d.ts
ADDED
package/dist/schema.js
ADDED
|
@@ -0,0 +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"}
|
package/package.json
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@adeficior/data-modifier-lang",
|
|
3
|
+
"version": "2.0.0-rc.20260814115618",
|
|
4
|
+
"exports": {
|
|
5
|
+
".": "./dist/index.js"
|
|
6
|
+
},
|
|
7
|
+
"types": "./dist/index.d.ts",
|
|
8
|
+
"files": [
|
|
9
|
+
"dist"
|
|
10
|
+
],
|
|
11
|
+
"type": "module",
|
|
12
|
+
"scripts": {
|
|
13
|
+
"build": "tsc --project tsconfig.build.json",
|
|
14
|
+
"check": "tsc --noEmit",
|
|
15
|
+
"dev": "bun run build --watch",
|
|
16
|
+
"lint": "eslint {src,test}",
|
|
17
|
+
"test": "bun test --timeout 10000",
|
|
18
|
+
"prune": "bun run datamod-dev --prune",
|
|
19
|
+
"prepare": "datamod-dev --configs && datamod-dev --types",
|
|
20
|
+
"test:ci": "bun run lint && bun run check && bun run test --coverage"
|
|
21
|
+
},
|
|
22
|
+
"devDependencies": {
|
|
23
|
+
"@adeficior/configs": "workspace:*",
|
|
24
|
+
"@adeficior/testing": "workspace:*",
|
|
25
|
+
"@types/lodash-es": "catalog:",
|
|
26
|
+
"@adeficior/data-modifier-core": "workspace:*"
|
|
27
|
+
},
|
|
28
|
+
"peerDependencies": {
|
|
29
|
+
"@adeficior/pack-resolver": "catalog:",
|
|
30
|
+
"typescript": "catalog:",
|
|
31
|
+
"zod": "catalog:",
|
|
32
|
+
"lodash-es": "catalog:",
|
|
33
|
+
"@adeficior/data-modifier-core": "workspace:*"
|
|
34
|
+
}
|
|
35
|
+
}
|