@intlayer/chokidar 8.9.4-canary.0 → 8.9.4
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.
|
@@ -19,6 +19,11 @@ const formatDictionary = (dictionary) => {
|
|
|
19
19
|
format: "intlayer",
|
|
20
20
|
content: (0, _intlayer_core_messageFormat.vueI18nToIntlayerFormatter)(dictionary.content)
|
|
21
21
|
};
|
|
22
|
+
if (dictionary.format === "po") return {
|
|
23
|
+
...dictionary,
|
|
24
|
+
format: "intlayer",
|
|
25
|
+
content: (0, _intlayer_core_messageFormat.portableObjectToIntlayerFormatter)(dictionary.content)
|
|
26
|
+
};
|
|
22
27
|
return dictionary;
|
|
23
28
|
};
|
|
24
29
|
const formatDictionaries = async (dictionaries) => Promise.all(dictionaries.map(formatDictionary));
|
|
@@ -38,6 +43,11 @@ const formatDictionaryOutput = (dictionary, format) => {
|
|
|
38
43
|
format: "vue-i18n",
|
|
39
44
|
content: (0, _intlayer_core_messageFormat.intlayerToVueI18nFormatter)(dictionary.content)
|
|
40
45
|
};
|
|
46
|
+
if (dictionary.format === "po") return {
|
|
47
|
+
...dictionary,
|
|
48
|
+
format: "po",
|
|
49
|
+
content: (0, _intlayer_core_messageFormat.intlayerToPortableObjectFormatter)(dictionary.content)
|
|
50
|
+
};
|
|
41
51
|
return dictionary;
|
|
42
52
|
};
|
|
43
53
|
const formatDictionariesOutput = (dictionaries, format) => dictionaries.map((dictionary) => formatDictionaryOutput(dictionary, format));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"formatDictionary.cjs","names":[],"sources":["../../src/formatDictionary.ts"],"sourcesContent":["import {\n i18nextToIntlayerFormatter,\n icuToIntlayerFormatter,\n intlayerToI18nextFormatter,\n intlayerToICUFormatter,\n intlayerToVueI18nFormatter,\n vueI18nToIntlayerFormatter,\n} from '@intlayer/core/messageFormat';\nimport type { Dictionary } from '@intlayer/types/dictionary';\n\nexport const formatDictionary = (dictionary: Dictionary): Dictionary => {\n if (dictionary.format === 'icu') {\n return {\n ...dictionary,\n format: 'intlayer',\n content: icuToIntlayerFormatter(dictionary.content),\n };\n }\n\n if (dictionary.format === 'i18next') {\n return {\n ...dictionary,\n format: 'intlayer',\n content: i18nextToIntlayerFormatter(dictionary.content),\n };\n }\n\n if (dictionary.format === 'vue-i18n') {\n return {\n ...dictionary,\n format: 'intlayer',\n content: vueI18nToIntlayerFormatter(dictionary.content),\n };\n }\n\n return dictionary;\n};\n\nexport const formatDictionaries = async (\n dictionaries: Dictionary[]\n): Promise<Dictionary[]> => Promise.all(dictionaries.map(formatDictionary));\n\nexport const formatDictionaryOutput = (\n dictionary: Dictionary,\n format: Dictionary['format']\n) => {\n if (format === 'icu') {\n return {\n ...dictionary,\n format: 'icu',\n content: intlayerToICUFormatter(dictionary.content),\n };\n }\n\n if (format === 'i18next') {\n return {\n ...dictionary,\n format: 'i18next',\n content: intlayerToI18nextFormatter(dictionary.content),\n };\n }\n\n if (format === 'vue-i18n') {\n return {\n ...dictionary,\n format: 'vue-i18n',\n content: intlayerToVueI18nFormatter(dictionary.content),\n };\n }\n\n return dictionary;\n};\n\nexport const formatDictionariesOutput = (\n dictionaries: Dictionary[],\n format: Dictionary['format']\n) =>\n dictionaries.map((dictionary) => formatDictionaryOutput(dictionary, format));\n"],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"formatDictionary.cjs","names":[],"sources":["../../src/formatDictionary.ts"],"sourcesContent":["import {\n i18nextToIntlayerFormatter,\n icuToIntlayerFormatter,\n intlayerToI18nextFormatter,\n intlayerToICUFormatter,\n intlayerToPortableObjectFormatter,\n intlayerToVueI18nFormatter,\n portableObjectToIntlayerFormatter,\n vueI18nToIntlayerFormatter,\n} from '@intlayer/core/messageFormat';\nimport type { Dictionary } from '@intlayer/types/dictionary';\n\nexport const formatDictionary = (dictionary: Dictionary): Dictionary => {\n if (dictionary.format === 'icu') {\n return {\n ...dictionary,\n format: 'intlayer',\n content: icuToIntlayerFormatter(dictionary.content),\n };\n }\n\n if (dictionary.format === 'i18next') {\n return {\n ...dictionary,\n format: 'intlayer',\n content: i18nextToIntlayerFormatter(dictionary.content),\n };\n }\n\n if (dictionary.format === 'vue-i18n') {\n return {\n ...dictionary,\n format: 'intlayer',\n content: vueI18nToIntlayerFormatter(dictionary.content),\n };\n }\n\n if (dictionary.format === 'po') {\n return {\n ...dictionary,\n format: 'intlayer',\n content: portableObjectToIntlayerFormatter(dictionary.content),\n };\n }\n\n return dictionary;\n};\n\nexport const formatDictionaries = async (\n dictionaries: Dictionary[]\n): Promise<Dictionary[]> => Promise.all(dictionaries.map(formatDictionary));\n\nexport const formatDictionaryOutput = (\n dictionary: Dictionary,\n format: Dictionary['format']\n) => {\n if (format === 'icu') {\n return {\n ...dictionary,\n format: 'icu',\n content: intlayerToICUFormatter(dictionary.content),\n };\n }\n\n if (format === 'i18next') {\n return {\n ...dictionary,\n format: 'i18next',\n content: intlayerToI18nextFormatter(dictionary.content),\n };\n }\n\n if (format === 'vue-i18n') {\n return {\n ...dictionary,\n format: 'vue-i18n',\n content: intlayerToVueI18nFormatter(dictionary.content),\n };\n }\n\n if (dictionary.format === 'po') {\n return {\n ...dictionary,\n format: 'po',\n content: intlayerToPortableObjectFormatter(dictionary.content),\n };\n }\n\n return dictionary;\n};\n\nexport const formatDictionariesOutput = (\n dictionaries: Dictionary[],\n format: Dictionary['format']\n) =>\n dictionaries.map((dictionary) => formatDictionaryOutput(dictionary, format));\n"],"mappings":";;;;;AAYA,MAAa,oBAAoB,eAAuC;CACtE,IAAI,WAAW,WAAW,OACxB,OAAO;EACL,GAAG;EACH,QAAQ;EACR,kEAAgC,WAAW,QAAQ;EACpD;CAGH,IAAI,WAAW,WAAW,WACxB,OAAO;EACL,GAAG;EACH,QAAQ;EACR,sEAAoC,WAAW,QAAQ;EACxD;CAGH,IAAI,WAAW,WAAW,YACxB,OAAO;EACL,GAAG;EACH,QAAQ;EACR,sEAAoC,WAAW,QAAQ;EACxD;CAGH,IAAI,WAAW,WAAW,MACxB,OAAO;EACL,GAAG;EACH,QAAQ;EACR,6EAA2C,WAAW,QAAQ;EAC/D;CAGH,OAAO;;AAGT,MAAa,qBAAqB,OAChC,iBAC0B,QAAQ,IAAI,aAAa,IAAI,iBAAiB,CAAC;AAE3E,MAAa,0BACX,YACA,WACG;CACH,IAAI,WAAW,OACb,OAAO;EACL,GAAG;EACH,QAAQ;EACR,kEAAgC,WAAW,QAAQ;EACpD;CAGH,IAAI,WAAW,WACb,OAAO;EACL,GAAG;EACH,QAAQ;EACR,sEAAoC,WAAW,QAAQ;EACxD;CAGH,IAAI,WAAW,YACb,OAAO;EACL,GAAG;EACH,QAAQ;EACR,sEAAoC,WAAW,QAAQ;EACxD;CAGH,IAAI,WAAW,WAAW,MACxB,OAAO;EACL,GAAG;EACH,QAAQ;EACR,6EAA2C,WAAW,QAAQ;EAC/D;CAGH,OAAO;;AAGT,MAAa,4BACX,cACA,WAEA,aAAa,KAAK,eAAe,uBAAuB,YAAY,OAAO,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i18nextToIntlayerFormatter, icuToIntlayerFormatter, intlayerToI18nextFormatter, intlayerToICUFormatter, intlayerToVueI18nFormatter, vueI18nToIntlayerFormatter } from "@intlayer/core/messageFormat";
|
|
1
|
+
import { i18nextToIntlayerFormatter, icuToIntlayerFormatter, intlayerToI18nextFormatter, intlayerToICUFormatter, intlayerToPortableObjectFormatter, intlayerToVueI18nFormatter, portableObjectToIntlayerFormatter, vueI18nToIntlayerFormatter } from "@intlayer/core/messageFormat";
|
|
2
2
|
|
|
3
3
|
//#region src/formatDictionary.ts
|
|
4
4
|
const formatDictionary = (dictionary) => {
|
|
@@ -17,6 +17,11 @@ const formatDictionary = (dictionary) => {
|
|
|
17
17
|
format: "intlayer",
|
|
18
18
|
content: vueI18nToIntlayerFormatter(dictionary.content)
|
|
19
19
|
};
|
|
20
|
+
if (dictionary.format === "po") return {
|
|
21
|
+
...dictionary,
|
|
22
|
+
format: "intlayer",
|
|
23
|
+
content: portableObjectToIntlayerFormatter(dictionary.content)
|
|
24
|
+
};
|
|
20
25
|
return dictionary;
|
|
21
26
|
};
|
|
22
27
|
const formatDictionaries = async (dictionaries) => Promise.all(dictionaries.map(formatDictionary));
|
|
@@ -36,6 +41,11 @@ const formatDictionaryOutput = (dictionary, format) => {
|
|
|
36
41
|
format: "vue-i18n",
|
|
37
42
|
content: intlayerToVueI18nFormatter(dictionary.content)
|
|
38
43
|
};
|
|
44
|
+
if (dictionary.format === "po") return {
|
|
45
|
+
...dictionary,
|
|
46
|
+
format: "po",
|
|
47
|
+
content: intlayerToPortableObjectFormatter(dictionary.content)
|
|
48
|
+
};
|
|
39
49
|
return dictionary;
|
|
40
50
|
};
|
|
41
51
|
const formatDictionariesOutput = (dictionaries, format) => dictionaries.map((dictionary) => formatDictionaryOutput(dictionary, format));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"formatDictionary.mjs","names":[],"sources":["../../src/formatDictionary.ts"],"sourcesContent":["import {\n i18nextToIntlayerFormatter,\n icuToIntlayerFormatter,\n intlayerToI18nextFormatter,\n intlayerToICUFormatter,\n intlayerToVueI18nFormatter,\n vueI18nToIntlayerFormatter,\n} from '@intlayer/core/messageFormat';\nimport type { Dictionary } from '@intlayer/types/dictionary';\n\nexport const formatDictionary = (dictionary: Dictionary): Dictionary => {\n if (dictionary.format === 'icu') {\n return {\n ...dictionary,\n format: 'intlayer',\n content: icuToIntlayerFormatter(dictionary.content),\n };\n }\n\n if (dictionary.format === 'i18next') {\n return {\n ...dictionary,\n format: 'intlayer',\n content: i18nextToIntlayerFormatter(dictionary.content),\n };\n }\n\n if (dictionary.format === 'vue-i18n') {\n return {\n ...dictionary,\n format: 'intlayer',\n content: vueI18nToIntlayerFormatter(dictionary.content),\n };\n }\n\n return dictionary;\n};\n\nexport const formatDictionaries = async (\n dictionaries: Dictionary[]\n): Promise<Dictionary[]> => Promise.all(dictionaries.map(formatDictionary));\n\nexport const formatDictionaryOutput = (\n dictionary: Dictionary,\n format: Dictionary['format']\n) => {\n if (format === 'icu') {\n return {\n ...dictionary,\n format: 'icu',\n content: intlayerToICUFormatter(dictionary.content),\n };\n }\n\n if (format === 'i18next') {\n return {\n ...dictionary,\n format: 'i18next',\n content: intlayerToI18nextFormatter(dictionary.content),\n };\n }\n\n if (format === 'vue-i18n') {\n return {\n ...dictionary,\n format: 'vue-i18n',\n content: intlayerToVueI18nFormatter(dictionary.content),\n };\n }\n\n return dictionary;\n};\n\nexport const formatDictionariesOutput = (\n dictionaries: Dictionary[],\n format: Dictionary['format']\n) =>\n dictionaries.map((dictionary) => formatDictionaryOutput(dictionary, format));\n"],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"formatDictionary.mjs","names":[],"sources":["../../src/formatDictionary.ts"],"sourcesContent":["import {\n i18nextToIntlayerFormatter,\n icuToIntlayerFormatter,\n intlayerToI18nextFormatter,\n intlayerToICUFormatter,\n intlayerToPortableObjectFormatter,\n intlayerToVueI18nFormatter,\n portableObjectToIntlayerFormatter,\n vueI18nToIntlayerFormatter,\n} from '@intlayer/core/messageFormat';\nimport type { Dictionary } from '@intlayer/types/dictionary';\n\nexport const formatDictionary = (dictionary: Dictionary): Dictionary => {\n if (dictionary.format === 'icu') {\n return {\n ...dictionary,\n format: 'intlayer',\n content: icuToIntlayerFormatter(dictionary.content),\n };\n }\n\n if (dictionary.format === 'i18next') {\n return {\n ...dictionary,\n format: 'intlayer',\n content: i18nextToIntlayerFormatter(dictionary.content),\n };\n }\n\n if (dictionary.format === 'vue-i18n') {\n return {\n ...dictionary,\n format: 'intlayer',\n content: vueI18nToIntlayerFormatter(dictionary.content),\n };\n }\n\n if (dictionary.format === 'po') {\n return {\n ...dictionary,\n format: 'intlayer',\n content: portableObjectToIntlayerFormatter(dictionary.content),\n };\n }\n\n return dictionary;\n};\n\nexport const formatDictionaries = async (\n dictionaries: Dictionary[]\n): Promise<Dictionary[]> => Promise.all(dictionaries.map(formatDictionary));\n\nexport const formatDictionaryOutput = (\n dictionary: Dictionary,\n format: Dictionary['format']\n) => {\n if (format === 'icu') {\n return {\n ...dictionary,\n format: 'icu',\n content: intlayerToICUFormatter(dictionary.content),\n };\n }\n\n if (format === 'i18next') {\n return {\n ...dictionary,\n format: 'i18next',\n content: intlayerToI18nextFormatter(dictionary.content),\n };\n }\n\n if (format === 'vue-i18n') {\n return {\n ...dictionary,\n format: 'vue-i18n',\n content: intlayerToVueI18nFormatter(dictionary.content),\n };\n }\n\n if (dictionary.format === 'po') {\n return {\n ...dictionary,\n format: 'po',\n content: intlayerToPortableObjectFormatter(dictionary.content),\n };\n }\n\n return dictionary;\n};\n\nexport const formatDictionariesOutput = (\n dictionaries: Dictionary[],\n format: Dictionary['format']\n) =>\n dictionaries.map((dictionary) => formatDictionaryOutput(dictionary, format));\n"],"mappings":";;;AAYA,MAAa,oBAAoB,eAAuC;CACtE,IAAI,WAAW,WAAW,OACxB,OAAO;EACL,GAAG;EACH,QAAQ;EACR,SAAS,uBAAuB,WAAW,QAAQ;EACpD;CAGH,IAAI,WAAW,WAAW,WACxB,OAAO;EACL,GAAG;EACH,QAAQ;EACR,SAAS,2BAA2B,WAAW,QAAQ;EACxD;CAGH,IAAI,WAAW,WAAW,YACxB,OAAO;EACL,GAAG;EACH,QAAQ;EACR,SAAS,2BAA2B,WAAW,QAAQ;EACxD;CAGH,IAAI,WAAW,WAAW,MACxB,OAAO;EACL,GAAG;EACH,QAAQ;EACR,SAAS,kCAAkC,WAAW,QAAQ;EAC/D;CAGH,OAAO;;AAGT,MAAa,qBAAqB,OAChC,iBAC0B,QAAQ,IAAI,aAAa,IAAI,iBAAiB,CAAC;AAE3E,MAAa,0BACX,YACA,WACG;CACH,IAAI,WAAW,OACb,OAAO;EACL,GAAG;EACH,QAAQ;EACR,SAAS,uBAAuB,WAAW,QAAQ;EACpD;CAGH,IAAI,WAAW,WACb,OAAO;EACL,GAAG;EACH,QAAQ;EACR,SAAS,2BAA2B,WAAW,QAAQ;EACxD;CAGH,IAAI,WAAW,YACb,OAAO;EACL,GAAG;EACH,QAAQ;EACR,SAAS,2BAA2B,WAAW,QAAQ;EACxD;CAGH,IAAI,WAAW,WAAW,MACxB,OAAO;EACL,GAAG;EACH,QAAQ;EACR,SAAS,kCAAkC,WAAW,QAAQ;EAC/D;CAGH,OAAO;;AAGT,MAAa,4BACX,cACA,WAEA,aAAa,KAAK,eAAe,uBAAuB,YAAY,OAAO,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"formatDictionary.d.ts","names":[],"sources":["../../src/formatDictionary.ts"],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"formatDictionary.d.ts","names":[],"sources":["../../src/formatDictionary.ts"],"mappings":";;;;;cAYa,gBAAA,GAAoB,UAAA,EAAY,UAAA,KAAa,UAAA;AAAA,cAoC7C,kBAAA,GACX,YAAA,EAAc,UAAA,OACb,OAAA,CAAQ,UAAA;AAAA,cAEE,sBAAA,GACX,UAAA,EAAY,UAAA,EACZ,MAAA,EAAQ,UAAA,eAAoB,UAAA;;WAAA,+BAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;cAqCjB,wBAAA,GACX,YAAA,EAAc,UAAA,IACd,MAAA,EAAQ,UAAA,gBAAoB,UAAA;;WAAA,+BAAA,CAAA,SAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@intlayer/chokidar",
|
|
3
|
-
"version": "8.9.4
|
|
3
|
+
"version": "8.9.4",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Uses chokidar to scan and build Intlayer declaration files into dictionaries based on Intlayer configuration.",
|
|
6
6
|
"keywords": [
|
|
@@ -109,13 +109,13 @@
|
|
|
109
109
|
"typecheck": "tsc --noEmit --project tsconfig.types.json"
|
|
110
110
|
},
|
|
111
111
|
"dependencies": {
|
|
112
|
-
"@intlayer/api": "8.9.4
|
|
113
|
-
"@intlayer/config": "8.9.4
|
|
114
|
-
"@intlayer/core": "8.9.4
|
|
115
|
-
"@intlayer/dictionaries-entry": "8.9.4
|
|
116
|
-
"@intlayer/remote-dictionaries-entry": "8.9.4
|
|
117
|
-
"@intlayer/types": "8.9.4
|
|
118
|
-
"@intlayer/unmerged-dictionaries-entry": "8.9.4
|
|
112
|
+
"@intlayer/api": "8.9.4",
|
|
113
|
+
"@intlayer/config": "8.9.4",
|
|
114
|
+
"@intlayer/core": "8.9.4",
|
|
115
|
+
"@intlayer/dictionaries-entry": "8.9.4",
|
|
116
|
+
"@intlayer/remote-dictionaries-entry": "8.9.4",
|
|
117
|
+
"@intlayer/types": "8.9.4",
|
|
118
|
+
"@intlayer/unmerged-dictionaries-entry": "8.9.4",
|
|
119
119
|
"chokidar": "5.0.0",
|
|
120
120
|
"defu": "6.1.7",
|
|
121
121
|
"fast-glob": "3.3.3",
|