@payloadcms/translations 3.0.0-alpha.3 → 3.0.0-alpha.30

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.
Files changed (37) hide show
  1. package/dist/_generatedFiles_/api/index.d.ts +1 -0
  2. package/dist/_generatedFiles_/api/index.d.ts.map +1 -0
  3. package/dist/_generatedFiles_/api/index.js +62 -67
  4. package/dist/_generatedFiles_/api/index.js.map +1 -0
  5. package/dist/_generatedFiles_/client/index.d.ts +1 -0
  6. package/dist/_generatedFiles_/client/index.d.ts.map +1 -0
  7. package/dist/_generatedFiles_/client/index.js +62 -67
  8. package/dist/_generatedFiles_/client/index.js.map +1 -0
  9. package/dist/exports/index.d.ts +4 -3
  10. package/dist/exports/index.d.ts.map +1 -0
  11. package/dist/exports/index.js +3 -9
  12. package/dist/exports/index.js.map +1 -0
  13. package/dist/types.d.ts +13 -11
  14. package/dist/types.d.ts.map +1 -0
  15. package/dist/types.js +2 -2
  16. package/dist/types.js.map +1 -0
  17. package/dist/utilities/copyFile.d.ts +1 -0
  18. package/dist/utilities/copyFile.d.ts.map +1 -0
  19. package/dist/utilities/copyFile.js +3 -6
  20. package/dist/utilities/copyFile.js.map +1 -0
  21. package/dist/utilities/deepMerge.d.ts +1 -0
  22. package/dist/utilities/deepMerge.d.ts.map +1 -0
  23. package/dist/utilities/deepMerge.js +2 -5
  24. package/dist/utilities/deepMerge.js.map +1 -0
  25. package/dist/utilities/ensureDirExists.d.ts +1 -0
  26. package/dist/utilities/ensureDirExists.d.ts.map +1 -0
  27. package/dist/utilities/ensureDirExists.js +5 -11
  28. package/dist/utilities/ensureDirExists.js.map +1 -0
  29. package/dist/utilities/getTranslation.d.ts +2 -1
  30. package/dist/utilities/getTranslation.d.ts.map +1 -0
  31. package/dist/utilities/getTranslation.js +2 -5
  32. package/dist/utilities/getTranslation.js.map +1 -0
  33. package/dist/utilities/init.d.ts +2 -1
  34. package/dist/utilities/init.d.ts.map +1 -0
  35. package/dist/utilities/init.js +31 -27
  36. package/dist/utilities/init.js.map +1 -0
  37. package/package.json +6 -4
@@ -2550,3 +2550,4 @@ export declare const translations: {
2550
2550
  };
2551
2551
  };
2552
2552
  };
2553
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/_generatedFiles_/api/index.ts"],"names":[],"mappings":"AA+BA,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+BxB,CAAA"}
@@ -1,68 +1,63 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.translations = void 0;
7
- const ar_json_1 = __importDefault(require("./ar.json"));
8
- const az_json_1 = __importDefault(require("./az.json"));
9
- const bg_json_1 = __importDefault(require("./bg.json"));
10
- const cs_json_1 = __importDefault(require("./cs.json"));
11
- const de_json_1 = __importDefault(require("./de.json"));
12
- const en_json_1 = __importDefault(require("./en.json"));
13
- const es_json_1 = __importDefault(require("./es.json"));
14
- const fa_json_1 = __importDefault(require("./fa.json"));
15
- const fr_json_1 = __importDefault(require("./fr.json"));
16
- const hr_json_1 = __importDefault(require("./hr.json"));
17
- const hu_json_1 = __importDefault(require("./hu.json"));
18
- const it_json_1 = __importDefault(require("./it.json"));
19
- const ja_json_1 = __importDefault(require("./ja.json"));
20
- const ko_json_1 = __importDefault(require("./ko.json"));
21
- const my_json_1 = __importDefault(require("./my.json"));
22
- const nb_json_1 = __importDefault(require("./nb.json"));
23
- const nl_json_1 = __importDefault(require("./nl.json"));
24
- const pl_json_1 = __importDefault(require("./pl.json"));
25
- const pt_json_1 = __importDefault(require("./pt.json"));
26
- const ro_json_1 = __importDefault(require("./ro.json"));
27
- const rs_json_1 = __importDefault(require("./rs.json"));
28
- const rs_latin_json_1 = __importDefault(require("./rs-latin.json"));
29
- const ru_json_1 = __importDefault(require("./ru.json"));
30
- const sv_json_1 = __importDefault(require("./sv.json"));
31
- const th_json_1 = __importDefault(require("./th.json"));
32
- const tr_json_1 = __importDefault(require("./tr.json"));
33
- const ua_json_1 = __importDefault(require("./ua.json"));
34
- const vi_json_1 = __importDefault(require("./vi.json"));
35
- const zh_json_1 = __importDefault(require("./zh.json"));
36
- const zh_tw_json_1 = __importDefault(require("./zh-tw.json"));
37
- exports.translations = {
38
- ar: ar_json_1.default,
39
- az: az_json_1.default,
40
- bg: bg_json_1.default,
41
- cs: cs_json_1.default,
42
- de: de_json_1.default,
43
- en: en_json_1.default,
44
- es: es_json_1.default,
45
- fa: fa_json_1.default,
46
- fr: fr_json_1.default,
47
- hr: hr_json_1.default,
48
- hu: hu_json_1.default,
49
- it: it_json_1.default,
50
- ja: ja_json_1.default,
51
- ko: ko_json_1.default,
52
- my: my_json_1.default,
53
- nb: nb_json_1.default,
54
- nl: nl_json_1.default,
55
- pl: pl_json_1.default,
56
- pt: pt_json_1.default,
57
- ro: ro_json_1.default,
58
- rs: rs_json_1.default,
59
- rsLatin: rs_latin_json_1.default,
60
- ru: ru_json_1.default,
61
- sv: sv_json_1.default,
62
- th: th_json_1.default,
63
- tr: tr_json_1.default,
64
- ua: ua_json_1.default,
65
- vi: vi_json_1.default,
66
- zh: zh_json_1.default,
67
- zhTw: zh_tw_json_1.default,
1
+ import ar from './ar.json' assert { type: 'json' };
2
+ import az from './az.json' assert { type: 'json' };
3
+ import bg from './bg.json' assert { type: 'json' };
4
+ import cs from './cs.json' assert { type: 'json' };
5
+ import de from './de.json' assert { type: 'json' };
6
+ import en from './en.json' assert { type: 'json' };
7
+ import es from './es.json' assert { type: 'json' };
8
+ import fa from './fa.json' assert { type: 'json' };
9
+ import fr from './fr.json' assert { type: 'json' };
10
+ import hr from './hr.json' assert { type: 'json' };
11
+ import hu from './hu.json' assert { type: 'json' };
12
+ import it from './it.json' assert { type: 'json' };
13
+ import ja from './ja.json' assert { type: 'json' };
14
+ import ko from './ko.json' assert { type: 'json' };
15
+ import my from './my.json' assert { type: 'json' };
16
+ import nb from './nb.json' assert { type: 'json' };
17
+ import nl from './nl.json' assert { type: 'json' };
18
+ import pl from './pl.json' assert { type: 'json' };
19
+ import pt from './pt.json' assert { type: 'json' };
20
+ import ro from './ro.json' assert { type: 'json' };
21
+ import rs from './rs.json' assert { type: 'json' };
22
+ import rsLatin from './rs-latin.json' assert { type: 'json' };
23
+ import ru from './ru.json' assert { type: 'json' };
24
+ import sv from './sv.json' assert { type: 'json' };
25
+ import th from './th.json' assert { type: 'json' };
26
+ import tr from './tr.json' assert { type: 'json' };
27
+ import ua from './ua.json' assert { type: 'json' };
28
+ import vi from './vi.json' assert { type: 'json' };
29
+ import zh from './zh.json' assert { type: 'json' };
30
+ import zhTw from './zh-tw.json' assert { type: 'json' };
31
+ export const translations = {
32
+ ar,
33
+ az,
34
+ bg,
35
+ cs,
36
+ de,
37
+ en,
38
+ es,
39
+ fa,
40
+ fr,
41
+ hr,
42
+ hu,
43
+ it,
44
+ ja,
45
+ ko,
46
+ my,
47
+ nb,
48
+ nl,
49
+ pl,
50
+ pt,
51
+ ro,
52
+ rs,
53
+ rsLatin,
54
+ ru,
55
+ sv,
56
+ th,
57
+ tr,
58
+ ua,
59
+ vi,
60
+ zh,
61
+ zhTw,
68
62
  };
63
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/_generatedFiles_/api/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,WAAW,CAAC,SAAS,IAAI,EAAE,MAAM,EAAE,CAAA;AAClD,OAAO,EAAE,MAAM,WAAW,CAAC,SAAS,IAAI,EAAE,MAAM,EAAE,CAAA;AAClD,OAAO,EAAE,MAAM,WAAW,CAAC,SAAS,IAAI,EAAE,MAAM,EAAE,CAAA;AAClD,OAAO,EAAE,MAAM,WAAW,CAAC,SAAS,IAAI,EAAE,MAAM,EAAE,CAAA;AAClD,OAAO,EAAE,MAAM,WAAW,CAAC,SAAS,IAAI,EAAE,MAAM,EAAE,CAAA;AAClD,OAAO,EAAE,MAAM,WAAW,CAAC,SAAS,IAAI,EAAE,MAAM,EAAE,CAAA;AAClD,OAAO,EAAE,MAAM,WAAW,CAAC,SAAS,IAAI,EAAE,MAAM,EAAE,CAAA;AAClD,OAAO,EAAE,MAAM,WAAW,CAAC,SAAS,IAAI,EAAE,MAAM,EAAE,CAAA;AAClD,OAAO,EAAE,MAAM,WAAW,CAAC,SAAS,IAAI,EAAE,MAAM,EAAE,CAAA;AAClD,OAAO,EAAE,MAAM,WAAW,CAAC,SAAS,IAAI,EAAE,MAAM,EAAE,CAAA;AAClD,OAAO,EAAE,MAAM,WAAW,CAAC,SAAS,IAAI,EAAE,MAAM,EAAE,CAAA;AAClD,OAAO,EAAE,MAAM,WAAW,CAAC,SAAS,IAAI,EAAE,MAAM,EAAE,CAAA;AAClD,OAAO,EAAE,MAAM,WAAW,CAAC,SAAS,IAAI,EAAE,MAAM,EAAE,CAAA;AAClD,O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AAM,CAAC,MAAM,YAAY,GAAG;IAC1B,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,OAAO;IACP,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,IAAI;CACL,CAAA"}
@@ -8195,3 +8195,4 @@ export declare const translations: {
8195
8195
  };
8196
8196
  };
8197
8197
  };
8198
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/_generatedFiles_/client/index.ts"],"names":[],"mappings":"AA+BA,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+BxB,CAAA"}
@@ -1,68 +1,63 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.translations = void 0;
7
- const ar_json_1 = __importDefault(require("./ar.json"));
8
- const az_json_1 = __importDefault(require("./az.json"));
9
- const bg_json_1 = __importDefault(require("./bg.json"));
10
- const cs_json_1 = __importDefault(require("./cs.json"));
11
- const de_json_1 = __importDefault(require("./de.json"));
12
- const en_json_1 = __importDefault(require("./en.json"));
13
- const es_json_1 = __importDefault(require("./es.json"));
14
- const fa_json_1 = __importDefault(require("./fa.json"));
15
- const fr_json_1 = __importDefault(require("./fr.json"));
16
- const hr_json_1 = __importDefault(require("./hr.json"));
17
- const hu_json_1 = __importDefault(require("./hu.json"));
18
- const it_json_1 = __importDefault(require("./it.json"));
19
- const ja_json_1 = __importDefault(require("./ja.json"));
20
- const ko_json_1 = __importDefault(require("./ko.json"));
21
- const my_json_1 = __importDefault(require("./my.json"));
22
- const nb_json_1 = __importDefault(require("./nb.json"));
23
- const nl_json_1 = __importDefault(require("./nl.json"));
24
- const pl_json_1 = __importDefault(require("./pl.json"));
25
- const pt_json_1 = __importDefault(require("./pt.json"));
26
- const ro_json_1 = __importDefault(require("./ro.json"));
27
- const rs_json_1 = __importDefault(require("./rs.json"));
28
- const rs_latin_json_1 = __importDefault(require("./rs-latin.json"));
29
- const ru_json_1 = __importDefault(require("./ru.json"));
30
- const sv_json_1 = __importDefault(require("./sv.json"));
31
- const th_json_1 = __importDefault(require("./th.json"));
32
- const tr_json_1 = __importDefault(require("./tr.json"));
33
- const ua_json_1 = __importDefault(require("./ua.json"));
34
- const vi_json_1 = __importDefault(require("./vi.json"));
35
- const zh_json_1 = __importDefault(require("./zh.json"));
36
- const zh_tw_json_1 = __importDefault(require("./zh-tw.json"));
37
- exports.translations = {
38
- ar: ar_json_1.default,
39
- az: az_json_1.default,
40
- bg: bg_json_1.default,
41
- cs: cs_json_1.default,
42
- de: de_json_1.default,
43
- en: en_json_1.default,
44
- es: es_json_1.default,
45
- fa: fa_json_1.default,
46
- fr: fr_json_1.default,
47
- hr: hr_json_1.default,
48
- hu: hu_json_1.default,
49
- it: it_json_1.default,
50
- ja: ja_json_1.default,
51
- ko: ko_json_1.default,
52
- my: my_json_1.default,
53
- nb: nb_json_1.default,
54
- nl: nl_json_1.default,
55
- pl: pl_json_1.default,
56
- pt: pt_json_1.default,
57
- ro: ro_json_1.default,
58
- rs: rs_json_1.default,
59
- rsLatin: rs_latin_json_1.default,
60
- ru: ru_json_1.default,
61
- sv: sv_json_1.default,
62
- th: th_json_1.default,
63
- tr: tr_json_1.default,
64
- ua: ua_json_1.default,
65
- vi: vi_json_1.default,
66
- zh: zh_json_1.default,
67
- zhTw: zh_tw_json_1.default,
1
+ import ar from './ar.json' assert { type: 'json' };
2
+ import az from './az.json' assert { type: 'json' };
3
+ import bg from './bg.json' assert { type: 'json' };
4
+ import cs from './cs.json' assert { type: 'json' };
5
+ import de from './de.json' assert { type: 'json' };
6
+ import en from './en.json' assert { type: 'json' };
7
+ import es from './es.json' assert { type: 'json' };
8
+ import fa from './fa.json' assert { type: 'json' };
9
+ import fr from './fr.json' assert { type: 'json' };
10
+ import hr from './hr.json' assert { type: 'json' };
11
+ import hu from './hu.json' assert { type: 'json' };
12
+ import it from './it.json' assert { type: 'json' };
13
+ import ja from './ja.json' assert { type: 'json' };
14
+ import ko from './ko.json' assert { type: 'json' };
15
+ import my from './my.json' assert { type: 'json' };
16
+ import nb from './nb.json' assert { type: 'json' };
17
+ import nl from './nl.json' assert { type: 'json' };
18
+ import pl from './pl.json' assert { type: 'json' };
19
+ import pt from './pt.json' assert { type: 'json' };
20
+ import ro from './ro.json' assert { type: 'json' };
21
+ import rs from './rs.json' assert { type: 'json' };
22
+ import rsLatin from './rs-latin.json' assert { type: 'json' };
23
+ import ru from './ru.json' assert { type: 'json' };
24
+ import sv from './sv.json' assert { type: 'json' };
25
+ import th from './th.json' assert { type: 'json' };
26
+ import tr from './tr.json' assert { type: 'json' };
27
+ import ua from './ua.json' assert { type: 'json' };
28
+ import vi from './vi.json' assert { type: 'json' };
29
+ import zh from './zh.json' assert { type: 'json' };
30
+ import zhTw from './zh-tw.json' assert { type: 'json' };
31
+ export const translations = {
32
+ ar,
33
+ az,
34
+ bg,
35
+ cs,
36
+ de,
37
+ en,
38
+ es,
39
+ fa,
40
+ fr,
41
+ hr,
42
+ hu,
43
+ it,
44
+ ja,
45
+ ko,
46
+ my,
47
+ nb,
48
+ nl,
49
+ pl,
50
+ pt,
51
+ ro,
52
+ rs,
53
+ rsLatin,
54
+ ru,
55
+ sv,
56
+ th,
57
+ tr,
58
+ ua,
59
+ vi,
60
+ zh,
61
+ zhTw,
68
62
  };
63
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/_generatedFiles_/client/index.ts"],"names":[],"mappings":"AAAA,OAAO,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AE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,IAAI;CACL,CAAA"}
@@ -1,3 +1,4 @@
1
- export { initI18n, t, matchLanguage } from '../utilities/init';
2
- export { getTranslation } from '../utilities/getTranslation';
3
- export type * from '../types';
1
+ export { getTranslation } from '../utilities/getTranslation.js';
2
+ export { initI18n, matchLanguage, t } from '../utilities/init.js';
3
+ export type * from '../types.d.ts';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/exports/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAA;AAC/D,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,CAAC,EAAE,MAAM,sBAAsB,CAAA;AACjE,mBAAmB,eAAe,CAAA"}
@@ -1,9 +1,3 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getTranslation = exports.matchLanguage = exports.t = exports.initI18n = void 0;
4
- var init_1 = require("../utilities/init");
5
- Object.defineProperty(exports, "initI18n", { enumerable: true, get: function () { return init_1.initI18n; } });
6
- Object.defineProperty(exports, "t", { enumerable: true, get: function () { return init_1.t; } });
7
- Object.defineProperty(exports, "matchLanguage", { enumerable: true, get: function () { return init_1.matchLanguage; } });
8
- var getTranslation_1 = require("../utilities/getTranslation");
9
- Object.defineProperty(exports, "getTranslation", { enumerable: true, get: function () { return getTranslation_1.getTranslation; } });
1
+ export { getTranslation } from '../utilities/getTranslation.js';
2
+ export { initI18n, matchLanguage, t } from '../utilities/init.js';
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/exports/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAA;AAC/D,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,CAAC,EAAE,MAAM,sBAAsB,CAAA"}
package/dist/types.d.ts CHANGED
@@ -1,11 +1,12 @@
1
+ export type LanguageTranslations = {
2
+ [namespace: string]: {
3
+ [key: string]: string;
4
+ };
5
+ };
1
6
  export type Translations = {
2
7
  [language: string]: {
3
8
  $schema: string;
4
- } | {
5
- [namespace: string]: {
6
- [key: string]: string;
7
- };
8
- };
9
+ } | LanguageTranslations;
9
10
  };
10
11
  export type TFunction = (key: string, options?: Record<string, any>) => string;
11
12
  export type I18n = {
@@ -15,6 +16,7 @@ export type I18n = {
15
16
  language: string;
16
17
  /** Translate function */
17
18
  t: (key: string, options?: Record<string, unknown>) => string;
19
+ translations: Translations;
18
20
  };
19
21
  export type I18nOptions = {
20
22
  fallbackLanguage?: string;
@@ -22,21 +24,21 @@ export type I18nOptions = {
22
24
  translations?: {
23
25
  [language: string]: {
24
26
  $schema: string;
25
- } | {
26
- [namespace: string]: {
27
- [key: string]: string;
28
- };
29
- };
27
+ } | LanguageTranslations;
30
28
  };
31
29
  };
32
30
  export type InitTFunction = (args: {
33
31
  config: I18nOptions;
34
32
  language?: string;
35
33
  translations?: Translations;
36
- }) => TFunction;
34
+ }) => {
35
+ t: TFunction;
36
+ translations: Translations;
37
+ };
37
38
  export type InitI18n = (args: {
38
39
  config: I18nOptions;
39
40
  language?: string;
40
41
  translations: Translations;
41
42
  context: 'api' | 'client';
42
43
  }) => I18n;
44
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,oBAAoB,GAAG;IACjC,CAAC,SAAS,EAAE,MAAM,GAAG;QACnB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KACtB,CAAA;CACF,CAAA;AAED,MAAM,MAAM,YAAY,GAAG;IACzB,CAAC,QAAQ,EAAE,MAAM,GACb;QACE,OAAO,EAAE,MAAM,CAAA;KAChB,GACD,oBAAoB,CAAA;CACzB,CAAA;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+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":""}
@@ -1 +1,2 @@
1
1
  export declare function copyFile(source: any, destination: any): void;
2
+ //# sourceMappingURL=copyFile.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"copyFile.d.ts","sourceRoot":"","sources":["../../src/utilities/copyFile.ts"],"names":[],"mappings":"AAEA,wBAAgB,QAAQ,CAAC,MAAM,KAAA,EAAE,WAAW,KAAA,QAS3C"}
@@ -1,8 +1,5 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.copyFile = void 0;
4
- const fs = require('fs');
5
- function copyFile(source, destination) {
1
+ import fs from 'fs';
2
+ export function copyFile(source, destination) {
6
3
  fs.copyFile(source, destination, (err) => {
7
4
  if (err) {
8
5
  // Handle error
@@ -12,4 +9,4 @@ function copyFile(source, destination) {
12
9
  console.log(`File copied successfully from ${source} to ${destination}.`);
13
10
  });
14
11
  }
15
- exports.copyFile = copyFile;
12
+ //# sourceMappingURL=copyFile.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"copyFile.js","sourceRoot":"","sources":["../../src/utilities/copyFile.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,CAAA;AAEnB,MAAM,UAAU,QAAQ,CAAC,MAAM,EAAE,WAAW;IAC1C,EAAE,CAAC,QAAQ,CAAC,MAAM,EAAE,WAAW,EAAE,CAAC,GAAG,EAAE,EAAE;QACvC,IAAI,GAAG,EAAE;YACP,eAAe;YACf,OAAO,CAAC,KAAK,CAAC,2BAA2B,MAAM,OAAO,WAAW,GAAG,EAAE,GAAG,CAAC,CAAA;YAC1E,OAAM;SACP;QACD,OAAO,CAAC,GAAG,CAAC,iCAAiC,MAAM,OAAO,WAAW,GAAG,CAAC,CAAA;IAC3E,CAAC,CAAC,CAAA;AACJ,CAAC"}
@@ -1 +1,2 @@
1
1
  export declare function deepMerge(obj1: any, obj2: any): any;
2
+ //# sourceMappingURL=deepMerge.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deepMerge.d.ts","sourceRoot":"","sources":["../../src/utilities/deepMerge.ts"],"names":[],"mappings":"AAAA,wBAAgB,SAAS,CAAC,IAAI,KAAA,EAAE,IAAI,KAAA,OAcnC"}
@@ -1,7 +1,4 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.deepMerge = void 0;
4
- function deepMerge(obj1, obj2) {
1
+ export function deepMerge(obj1, obj2) {
5
2
  const output = { ...obj1 };
6
3
  for (const key in obj2) {
7
4
  if (Object.prototype.hasOwnProperty.call(obj2, key)) {
@@ -15,4 +12,4 @@ function deepMerge(obj1, obj2) {
15
12
  }
16
13
  return output;
17
14
  }
18
- exports.deepMerge = deepMerge;
15
+ //# sourceMappingURL=deepMerge.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deepMerge.js","sourceRoot":"","sources":["../../src/utilities/deepMerge.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,SAAS,CAAC,IAAI,EAAE,IAAI;IAClC,MAAM,MAAM,GAAG,EAAE,GAAG,IAAI,EAAE,CAAA;IAE1B,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE;QACtB,IAAI,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,EAAE,GAAG,CAAC,EAAE;YACnD,IAAI,OAAO,IAAI,CAAC,GAAG,CAAC,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,IAAI,CAAC,GAAG,CAAC,EAAE;gBAC3E,MAAM,CAAC,GAAG,CAAC,GAAG,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,CAAA;aAC9C;iBAAM;gBACL,MAAM,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,CAAA;aACxB;SACF;KACF;IAED,OAAO,MAAM,CAAA;AACf,CAAC"}
@@ -1 +1,2 @@
1
1
  export declare function ensureDirectoryExists(directory: any): void;
2
+ //# sourceMappingURL=ensureDirExists.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ensureDirExists.d.ts","sourceRoot":"","sources":["../../src/utilities/ensureDirExists.ts"],"names":[],"mappings":"AAEA,wBAAgB,qBAAqB,CAAC,SAAS,KAAA,QAQ9C"}
@@ -1,18 +1,12 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.ensureDirectoryExists = void 0;
7
- const fs_1 = __importDefault(require("fs"));
8
- function ensureDirectoryExists(directory) {
1
+ import fs from 'fs';
2
+ export function ensureDirectoryExists(directory) {
9
3
  try {
10
- if (!fs_1.default.existsSync(directory)) {
11
- fs_1.default.mkdirSync(directory, { recursive: true });
4
+ if (!fs.existsSync(directory)) {
5
+ fs.mkdirSync(directory, { recursive: true });
12
6
  }
13
7
  }
14
8
  catch (error) {
15
9
  console.error(`Error creating directory '${directory}': ${error.message}`);
16
10
  }
17
11
  }
18
- exports.ensureDirectoryExists = ensureDirectoryExists;
12
+ //# sourceMappingURL=ensureDirExists.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ensureDirExists.js","sourceRoot":"","sources":["../../src/utilities/ensureDirExists.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,CAAA;AAEnB,MAAM,UAAU,qBAAqB,CAAC,SAAS;IAC7C,IAAI;QACF,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,SAAS,CAAC,EAAE;YAC7B,EAAE,CAAC,SAAS,CAAC,SAAS,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAA;SAC7C;KACF;IAAC,OAAO,KAAK,EAAE;QACd,OAAO,CAAC,KAAK,CAAC,6BAA6B,SAAS,MAAM,KAAK,CAAC,OAAO,EAAE,CAAC,CAAA;KAC3E;AACH,CAAC"}
@@ -1,3 +1,4 @@
1
1
  import type { JSX } from 'react';
2
- import { I18n } from '../types';
2
+ import { I18n } from '../types.js';
3
3
  export declare const getTranslation: (label: JSX.Element | Record<string, string> | string, i18n: Pick<I18n, 'fallbackLanguage' | 'language'>) => string;
4
+ //# sourceMappingURL=getTranslation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getTranslation.d.ts","sourceRoot":"","sources":["../../src/utilities/getTranslation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,OAAO,CAAA;AAChC,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AAElC,eAAO,MAAM,cAAc,UAClB,WAAW,GAAG,OAAO,MAAM,EAAE,MAAM,CAAC,GAAG,MAAM,QAC9C,KAAK,IAAI,EAAE,kBAAkB,GAAG,UAAU,CAAC,KAChD,MAkBF,CAAA"}
@@ -1,7 +1,4 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getTranslation = void 0;
4
- const getTranslation = (label, i18n) => {
1
+ export const getTranslation = (label, i18n) => {
5
2
  if (typeof label === 'object') {
6
3
  if (label[i18n.language]) {
7
4
  return label[i18n.language];
@@ -18,4 +15,4 @@ const getTranslation = (label, i18n) => {
18
15
  }
19
16
  return label;
20
17
  };
21
- exports.getTranslation = getTranslation;
18
+ //# sourceMappingURL=getTranslation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getTranslation.js","sourceRoot":"","sources":["../../src/utilities/getTranslation.ts"],"names":[],"mappings":"AAGA,MAAM,CAAC,MAAM,cAAc,GAAG,CAC5B,KAAoD,EACpD,IAAiD,EACzC,EAAE;IACV,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;QAC7B,IAAI,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE;YACxB,OAAO,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAA;SAC5B;QAED,IAAI,SAAS,GAAa,EAAE,CAAA;QAC5B,IAAI,OAAO,IAAI,CAAC,gBAAgB,KAAK,QAAQ,EAAE;YAC7C,SAAS,GAAG,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAA;SACpC;aAAM,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,gBAAgB,CAAC,EAAE;YAC/C,SAAS,GAAG,IAAI,CAAC,gBAAgB,CAAA;SAClC;QAED,MAAM,YAAY,GAAG,SAAS,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAA;QAClE,OAAO,YAAY,IAAI,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KACzF;IAED,OAAO,KAAK,CAAA;AACd,CAAC,CAAA"}
@@ -1,4 +1,4 @@
1
- import { Translations, InitI18n } from '../types';
1
+ import { Translations, InitI18n } from '../types.js';
2
2
  /**
3
3
  * @function getTranslationString
4
4
  *
@@ -28,3 +28,4 @@ export declare const t: TFunctionConstructor;
28
28
  export declare function matchLanguage(header: string): string | undefined;
29
29
  export declare const initI18n: InitI18n;
30
30
  export {};
31
+ //# sourceMappingURL=init.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../src/utilities/init.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAiB,QAAQ,EAAQ,MAAM,aAAa,CAAA;AAGzE;;;;;;GAMG;AACH,eAAO,MAAM,oBAAoB;YAKvB,MAAM;SACT,MAAM;kBACG,YAAY,CAAC,CAAC,CAAC;YAwC9B,CAAA;AAiCD;;;;;;;GAOG;AACH,KAAK,oBAAoB,GAAG,CAAC,EAC3B,GAAG,EACH,YAAY,EACZ,IAAI,GACL,EAAE;IACD,GAAG,EAAE,MAAM,CAAA;IACX,YAAY,CAAC,EAAE,YAAY,CAAC,CAAC,CAAC,CAAA;IAC9B,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;CAC3B,KAAK,MAAM,CAAA;AAEZ,eAAO,MAAM,CAAC,EAAE,oBAmBf,CAAA;AAqDD,wBAAgB,aAAa,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAYhE;AAoCD,eAAO,MAAM,QAAQ,EAAE,QAuBtB,CAAA"}
@@ -1,7 +1,4 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.initI18n = exports.matchLanguage = exports.t = exports.getTranslationString = void 0;
4
- const deepMerge_1 = require("./deepMerge");
1
+ import { deepMerge } from './deepMerge.js';
5
2
  /**
6
3
  * @function getTranslationString
7
4
  *
@@ -9,7 +6,7 @@ const deepMerge_1 = require("./deepMerge");
9
6
  *
10
7
  * @returns string
11
8
  */
12
- const getTranslationString = ({ count, key, translations, }) => {
9
+ export const getTranslationString = ({ count, key, translations, }) => {
13
10
  const keys = key.split(':');
14
11
  let keySuffix = '';
15
12
  const translation = keys.reduce((acc, key, index) => {
@@ -49,7 +46,6 @@ const getTranslationString = ({ count, key, translations, }) => {
49
46
  }
50
47
  return translation || key;
51
48
  };
52
- exports.getTranslationString = getTranslationString;
53
49
  /**
54
50
  * @function replaceVars
55
51
  *
@@ -63,7 +59,8 @@ const replaceVars = ({ translationString, vars, }) => {
63
59
  .map((part) => {
64
60
  if (part.startsWith('{{') && part.endsWith('}}')) {
65
61
  const placeholder = part.substring(2, part.length - 2).trim();
66
- return vars[placeholder] || part;
62
+ const value = vars[placeholder];
63
+ return value !== undefined && value !== null ? value : part;
67
64
  }
68
65
  else {
69
66
  return part;
@@ -71,8 +68,8 @@ const replaceVars = ({ translationString, vars, }) => {
71
68
  })
72
69
  .join('');
73
70
  };
74
- const t = ({ key, translations, vars }) => {
75
- let translationString = (0, exports.getTranslationString)({
71
+ export const t = ({ key, translations, vars }) => {
72
+ let translationString = getTranslationString({
76
73
  count: typeof vars?.count === 'number' ? vars.count : undefined,
77
74
  key,
78
75
  translations,
@@ -88,7 +85,6 @@ const t = ({ key, translations, vars }) => {
88
85
  }
89
86
  return translationString;
90
87
  };
91
- exports.t = t;
92
88
  function parseAcceptLanguage(header) {
93
89
  return header
94
90
  .split(',')
@@ -133,7 +129,7 @@ const acceptedLanguages = [
133
129
  'zh',
134
130
  'zhTw',
135
131
  ];
136
- function matchLanguage(header) {
132
+ export function matchLanguage(header) {
137
133
  const parsedHeader = parseAcceptLanguage(header);
138
134
  for (const { language } of parsedHeader) {
139
135
  for (const acceptedLanguage of acceptedLanguages) {
@@ -144,20 +140,24 @@ function matchLanguage(header) {
144
140
  }
145
141
  return undefined;
146
142
  }
147
- exports.matchLanguage = matchLanguage;
148
- const initTFunction = (args) => (key, vars) => {
143
+ const initTFunction = (args) => {
149
144
  const { config, language, translations } = args;
150
- const mergedLanguages = (0, deepMerge_1.deepMerge)(config?.translations ?? {}, translations);
145
+ const mergedTranslations = deepMerge(config?.translations ?? {}, translations);
151
146
  const languagePreference = matchLanguage(language);
152
- return (0, exports.t)({
153
- key,
154
- translations: mergedLanguages[languagePreference],
155
- vars,
156
- });
147
+ return {
148
+ translations: mergedTranslations,
149
+ t: (key, vars) => {
150
+ return t({
151
+ key,
152
+ translations: mergedTranslations[languagePreference],
153
+ vars,
154
+ });
155
+ },
156
+ };
157
157
  };
158
158
  function memoize(fn, keys) {
159
159
  const cacheMap = new Map();
160
- return function (args) {
160
+ const memoized = (args) => {
161
161
  const cacheKey = keys.reduce((acc, key) => acc + args[key], '');
162
162
  if (!cacheMap.has(cacheKey)) {
163
163
  const result = fn(args);
@@ -165,16 +165,20 @@ function memoize(fn, keys) {
165
165
  }
166
166
  return cacheMap.get(cacheKey);
167
167
  };
168
+ return memoized;
168
169
  }
169
- exports.initI18n = memoize((({ config, language = 'en', translations, context }) => {
170
+ export const initI18n = memoize(({ config, language = 'en', translations: incomingTranslations, context, }) => {
171
+ const { t, translations } = initTFunction({
172
+ config,
173
+ language: language || config.fallbackLanguage,
174
+ translations: incomingTranslations,
175
+ });
170
176
  const i18n = {
171
177
  fallbackLanguage: config.fallbackLanguage,
172
178
  language: language || config.fallbackLanguage,
173
- t: initTFunction({
174
- config,
175
- language: language || config.fallbackLanguage,
176
- translations,
177
- }),
179
+ t,
180
+ translations,
178
181
  };
179
182
  return i18n;
180
- }), ['language', 'context']);
183
+ }, ['language', 'context']);
184
+ //# sourceMappingURL=init.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"init.js","sourceRoot":"","sources":["../../src/utilities/init.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAE1C;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,EACnC,KAAK,EACL,GAAG,EACH,YAAY,GAKb,EAAE,EAAE;IACH,MAAM,IAAI,GAAG,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;IAC3B,IAAI,SAAS,GAAG,EAAE,CAAA;IAElB,MAAM,WAAW,GAAW,IAAI,CAAC,MAAM,CAAC,CAAC,GAAQ,EAAE,GAAG,EAAE,KAAK,EAAE,EAAE;QAC/D,IAAI,OAAO,GAAG,KAAK,QAAQ;YAAE,OAAO,GAAG,CAAA;QAEvC,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;YAC7B,IAAI,KAAK,KAAK,CAAC,IAAI,GAAG,GAAG,OAAO,IAAI,GAAG,EAAE;gBACvC,SAAS,GAAG,OAAO,CAAA;aACpB;iBAAM,IAAI,KAAK,KAAK,CAAC,IAAI,GAAG,GAAG,MAAM,IAAI,GAAG,EAAE;gBAC7C,SAAS,GAAG,MAAM,CAAA;aACnB;iBAAM,IAAI,KAAK,KAAK,CAAC,IAAI,GAAG,GA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AAA;IAED,OAAO,IAAI,CAAA;AACb,CAAC,EACD,CAAC,UAAU,EAAE,SAAS,CAAgD,CACvE,CAAA"}
package/package.json CHANGED
@@ -1,8 +1,9 @@
1
1
  {
2
2
  "name": "@payloadcms/translations",
3
- "version": "3.0.0-alpha.3",
3
+ "version": "3.0.0-alpha.30",
4
4
  "main": "./dist/exports/index.ts",
5
5
  "types": "./dist/types.d.ts",
6
+ "type": "module",
6
7
  "publishConfig": {
7
8
  "access": "public"
8
9
  },
@@ -30,8 +31,9 @@
30
31
  "dist"
31
32
  ],
32
33
  "scripts": {
33
- "writeFiles": "npx ts-node ./writeTranslationFiles.ts",
34
- "build": "pnpm writeFiles && tsc",
35
- "clean": "rimraf {dist,*.tsbuildinfo}"
34
+ "build:types": "tsc --outDir dist",
35
+ "build": "pnpm writeFiles && pnpm build:types",
36
+ "clean": "rimraf {dist,*.tsbuildinfo}",
37
+ "writeFiles": "npx tsx ./writeTranslationFiles.ts"
36
38
  }
37
39
  }