@intlayer/chokidar 5.5.3 → 5.5.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.
- package/dist/cjs/chokidar/watcher.cjs +12 -3
- package/dist/cjs/chokidar/watcher.cjs.map +1 -1
- package/dist/cjs/getBuiltDynamicDictionariesPath.cjs +52 -0
- package/dist/cjs/getBuiltDynamicDictionariesPath.cjs.map +1 -0
- package/dist/cjs/{filterDictionaryLocales.cjs → getFilteredLocalesContent.cjs} +25 -13
- package/dist/cjs/getFilteredLocalesContent.cjs.map +1 -0
- package/dist/cjs/index.cjs +3 -3
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/cjs/prepareIntlayer.cjs +5 -2
- package/dist/cjs/prepareIntlayer.cjs.map +1 -1
- package/dist/cjs/transpiler/declaration_file_to_dictionary/index.cjs +0 -1
- package/dist/cjs/transpiler/declaration_file_to_dictionary/index.cjs.map +1 -1
- package/dist/cjs/transpiler/declaration_file_to_dictionary/intlayer_dictionary/buildIntlayerDictionary.cjs +19 -8
- package/dist/cjs/transpiler/declaration_file_to_dictionary/intlayer_dictionary/buildIntlayerDictionary.cjs.map +1 -1
- package/dist/cjs/transpiler/declaration_file_to_dictionary/intlayer_dictionary/formatDictionaryText.cjs +30 -0
- package/dist/cjs/transpiler/declaration_file_to_dictionary/intlayer_dictionary/formatDictionaryText.cjs.map +1 -0
- package/dist/cjs/transpiler/declaration_file_to_dictionary/intlayer_dictionary/writeDynamicDictionary.cjs +107 -0
- package/dist/cjs/transpiler/declaration_file_to_dictionary/intlayer_dictionary/writeDynamicDictionary.cjs.map +1 -0
- package/dist/cjs/transpiler/declaration_file_to_dictionary/intlayer_dictionary/writeMergedDictionary.cjs +59 -0
- package/dist/cjs/transpiler/declaration_file_to_dictionary/intlayer_dictionary/writeMergedDictionary.cjs.map +1 -0
- package/dist/cjs/transpiler/declaration_file_to_dictionary/intlayer_dictionary/writeUnmergedDictionary.cjs +65 -0
- package/dist/cjs/transpiler/declaration_file_to_dictionary/intlayer_dictionary/writeUnmergedDictionary.cjs.map +1 -0
- package/dist/cjs/transpiler/dictionary_to_main/createDictionaryEntryPoint.cjs +44 -35
- package/dist/cjs/transpiler/dictionary_to_main/createDictionaryEntryPoint.cjs.map +1 -1
- package/dist/esm/chokidar/watcher.mjs +12 -3
- package/dist/esm/chokidar/watcher.mjs.map +1 -1
- package/dist/esm/getBuiltDynamicDictionariesPath.mjs +18 -0
- package/dist/esm/getBuiltDynamicDictionariesPath.mjs.map +1 -0
- package/dist/esm/{filterDictionaryLocales.mjs → getFilteredLocalesContent.mjs} +21 -9
- package/dist/esm/getFilteredLocalesContent.mjs.map +1 -0
- package/dist/esm/index.mjs +2 -2
- package/dist/esm/index.mjs.map +1 -1
- package/dist/esm/prepareIntlayer.mjs +5 -2
- package/dist/esm/prepareIntlayer.mjs.map +1 -1
- package/dist/esm/transpiler/declaration_file_to_dictionary/index.mjs +0 -1
- package/dist/esm/transpiler/declaration_file_to_dictionary/index.mjs.map +1 -1
- package/dist/esm/transpiler/declaration_file_to_dictionary/intlayer_dictionary/buildIntlayerDictionary.mjs +19 -8
- package/dist/esm/transpiler/declaration_file_to_dictionary/intlayer_dictionary/buildIntlayerDictionary.mjs.map +1 -1
- package/dist/esm/transpiler/declaration_file_to_dictionary/intlayer_dictionary/formatDictionaryText.mjs +6 -0
- package/dist/esm/transpiler/declaration_file_to_dictionary/intlayer_dictionary/formatDictionaryText.mjs.map +1 -0
- package/dist/esm/transpiler/declaration_file_to_dictionary/intlayer_dictionary/writeDynamicDictionary.mjs +82 -0
- package/dist/esm/transpiler/declaration_file_to_dictionary/intlayer_dictionary/writeDynamicDictionary.mjs.map +1 -0
- package/dist/esm/transpiler/declaration_file_to_dictionary/intlayer_dictionary/writeMergedDictionary.mjs +35 -0
- package/dist/esm/transpiler/declaration_file_to_dictionary/intlayer_dictionary/writeMergedDictionary.mjs.map +1 -0
- package/dist/esm/transpiler/declaration_file_to_dictionary/intlayer_dictionary/writeUnmergedDictionary.mjs +41 -0
- package/dist/esm/transpiler/declaration_file_to_dictionary/intlayer_dictionary/writeUnmergedDictionary.mjs.map +1 -0
- package/dist/esm/transpiler/dictionary_to_main/createDictionaryEntryPoint.mjs +44 -35
- package/dist/esm/transpiler/dictionary_to_main/createDictionaryEntryPoint.mjs.map +1 -1
- package/dist/types/chokidar/watcher.d.ts.map +1 -1
- package/dist/types/getBuiltDynamicDictionariesPath.d.ts +5 -0
- package/dist/types/getBuiltDynamicDictionariesPath.d.ts.map +1 -0
- package/dist/types/getFilteredLocalesContent.d.ts +4 -0
- package/dist/types/getFilteredLocalesContent.d.ts.map +1 -0
- package/dist/types/index.d.ts +1 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/prepareIntlayer.d.ts.map +1 -1
- package/dist/types/transpiler/declaration_file_to_dictionary/index.d.ts +5 -1
- package/dist/types/transpiler/declaration_file_to_dictionary/index.d.ts.map +1 -1
- package/dist/types/transpiler/declaration_file_to_dictionary/intlayer_dictionary/buildIntlayerDictionary.d.ts +5 -1
- package/dist/types/transpiler/declaration_file_to_dictionary/intlayer_dictionary/buildIntlayerDictionary.d.ts.map +1 -1
- package/dist/types/transpiler/declaration_file_to_dictionary/intlayer_dictionary/formatDictionaryText.d.ts +2 -0
- package/dist/types/transpiler/declaration_file_to_dictionary/intlayer_dictionary/formatDictionaryText.d.ts.map +1 -0
- package/dist/types/transpiler/declaration_file_to_dictionary/intlayer_dictionary/writeDynamicDictionary.d.ts +31 -0
- package/dist/types/transpiler/declaration_file_to_dictionary/intlayer_dictionary/writeDynamicDictionary.d.ts.map +1 -0
- package/dist/types/transpiler/declaration_file_to_dictionary/intlayer_dictionary/writeMergedDictionary.d.ts +25 -0
- package/dist/types/transpiler/declaration_file_to_dictionary/intlayer_dictionary/writeMergedDictionary.d.ts.map +1 -0
- package/dist/types/transpiler/declaration_file_to_dictionary/intlayer_dictionary/writeUnmergedDictionary.d.ts +28 -0
- package/dist/types/transpiler/declaration_file_to_dictionary/intlayer_dictionary/writeUnmergedDictionary.d.ts.map +1 -0
- package/dist/types/transpiler/dictionary_to_main/createDictionaryEntryPoint.d.ts +1 -1
- package/dist/types/transpiler/dictionary_to_main/createDictionaryEntryPoint.d.ts.map +1 -1
- package/package.json +12 -12
- package/dist/cjs/filterDictionaryLocales.cjs.map +0 -1
- package/dist/cjs/transpiler/declaration_file_to_dictionary/intlayer_dictionary/writeDictionary.cjs +0 -97
- package/dist/cjs/transpiler/declaration_file_to_dictionary/intlayer_dictionary/writeDictionary.cjs.map +0 -1
- package/dist/esm/filterDictionaryLocales.mjs.map +0 -1
- package/dist/esm/transpiler/declaration_file_to_dictionary/intlayer_dictionary/writeDictionary.mjs +0 -71
- package/dist/esm/transpiler/declaration_file_to_dictionary/intlayer_dictionary/writeDictionary.mjs.map +0 -1
- package/dist/types/filterDictionaryLocales.d.ts +0 -4
- package/dist/types/filterDictionaryLocales.d.ts.map +0 -1
- package/dist/types/transpiler/declaration_file_to_dictionary/intlayer_dictionary/writeDictionary.d.ts +0 -41
- package/dist/types/transpiler/declaration_file_to_dictionary/intlayer_dictionary/writeDictionary.d.ts.map +0 -1
package/dist/esm/transpiler/declaration_file_to_dictionary/intlayer_dictionary/writeDictionary.mjs
DELETED
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import { getConfiguration } from "@intlayer/config";
|
|
2
|
-
import { mkdir, writeFile } from "fs/promises";
|
|
3
|
-
import { resolve } from "path";
|
|
4
|
-
import { mergeDictionaries } from "../../../mergeDictionaries.mjs";
|
|
5
|
-
import { processPerLocaleDictionary } from "../../../processPerLocaleDictionary.mjs";
|
|
6
|
-
const groupDictionariesByKey = (dictionaries) => {
|
|
7
|
-
return dictionaries.reduce(
|
|
8
|
-
(acc, dictionary) => {
|
|
9
|
-
const key = dictionary.key;
|
|
10
|
-
if (!acc[key]) {
|
|
11
|
-
acc[key] = [];
|
|
12
|
-
}
|
|
13
|
-
acc[key].push(dictionary);
|
|
14
|
-
return acc;
|
|
15
|
-
},
|
|
16
|
-
{}
|
|
17
|
-
);
|
|
18
|
-
};
|
|
19
|
-
const writeUnmergedDictionaries = async (dictionaries, configuration = getConfiguration()) => {
|
|
20
|
-
const { unmergedDictionariesDir } = configuration.content;
|
|
21
|
-
await mkdir(unmergedDictionariesDir, { recursive: true });
|
|
22
|
-
const groupedDictionaries = groupDictionariesByKey(dictionaries);
|
|
23
|
-
for (const [key, dictionaries2] of Object.entries(groupedDictionaries)) {
|
|
24
|
-
if (key === "undefined") continue;
|
|
25
|
-
const isDevelopment = process.env.NODE_ENV === "development";
|
|
26
|
-
const contentString = isDevelopment ? JSON.stringify(dictionaries2, null, 2) : JSON.stringify(dictionaries2);
|
|
27
|
-
const outputFileName = `${key}.json`;
|
|
28
|
-
const unmergedFilePath = resolve(unmergedDictionariesDir, outputFileName);
|
|
29
|
-
await writeFile(unmergedFilePath, contentString, "utf8").catch((err) => {
|
|
30
|
-
console.error(`Error creating unmerged ${outputFileName}:`, err);
|
|
31
|
-
});
|
|
32
|
-
}
|
|
33
|
-
return groupedDictionaries;
|
|
34
|
-
};
|
|
35
|
-
const writeFinalDictionaries = async (groupedDictionaries, configuration = getConfiguration()) => {
|
|
36
|
-
const { dictionariesDir } = configuration.content;
|
|
37
|
-
const resultDictionariesPaths = [];
|
|
38
|
-
for (const [key, dictionaries] of Object.entries(groupedDictionaries)) {
|
|
39
|
-
if (key === "undefined") continue;
|
|
40
|
-
const multiLocaleDictionaries = dictionaries.map(
|
|
41
|
-
(dictionary) => processPerLocaleDictionary(dictionary)
|
|
42
|
-
);
|
|
43
|
-
const mergedDictionary = mergeDictionaries(multiLocaleDictionaries);
|
|
44
|
-
const isDevelopment = process.env.NODE_ENV === "development";
|
|
45
|
-
const contentString = isDevelopment ? JSON.stringify(mergedDictionary, null, 2) : JSON.stringify(mergedDictionary);
|
|
46
|
-
const outputFileName = `${key}.json`;
|
|
47
|
-
const resultFilePath = resolve(dictionariesDir, outputFileName);
|
|
48
|
-
await writeFile(resultFilePath, contentString, "utf8").catch((err) => {
|
|
49
|
-
console.error(`Error creating merged ${outputFileName}:`, err);
|
|
50
|
-
});
|
|
51
|
-
resultDictionariesPaths.push(resultFilePath);
|
|
52
|
-
}
|
|
53
|
-
return resultDictionariesPaths;
|
|
54
|
-
};
|
|
55
|
-
const writeDictionary = async (dictionaries, configuration = getConfiguration()) => {
|
|
56
|
-
const unmergedDictionaries = await writeUnmergedDictionaries(
|
|
57
|
-
dictionaries,
|
|
58
|
-
configuration
|
|
59
|
-
);
|
|
60
|
-
const finalDictionaries = await writeFinalDictionaries(
|
|
61
|
-
unmergedDictionaries,
|
|
62
|
-
configuration
|
|
63
|
-
);
|
|
64
|
-
return finalDictionaries;
|
|
65
|
-
};
|
|
66
|
-
export {
|
|
67
|
-
writeDictionary,
|
|
68
|
-
writeFinalDictionaries,
|
|
69
|
-
writeUnmergedDictionaries
|
|
70
|
-
};
|
|
71
|
-
//# sourceMappingURL=writeDictionary.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/transpiler/declaration_file_to_dictionary/intlayer_dictionary/writeDictionary.ts"],"sourcesContent":["import { getConfiguration } from '@intlayer/config';\nimport type { Dictionary } from '@intlayer/core';\nimport { mkdir, writeFile } from 'fs/promises';\nimport { resolve } from 'path';\nimport { mergeDictionaries } from '../../../mergeDictionaries';\nimport { processPerLocaleDictionary } from '../../../processPerLocaleDictionary';\n\nconst groupDictionariesByKey = (\n dictionaries: Dictionary[]\n): Record<string, Dictionary[]> => {\n return dictionaries.reduce(\n (acc, dictionary) => {\n const key = dictionary.key;\n if (!acc[key]) {\n acc[key] = [];\n }\n acc[key].push(dictionary);\n return acc;\n },\n {} as Record<string, Dictionary[]>\n );\n};\n\n/**\n * Write the unmerged dictionaries to the unmergedDictionariesDir\n * @param dictionaries - The dictionaries to write\n * @param configuration - The configuration\n * @returns The grouped dictionaries\n *\n * @example\n * ```ts\n * const unmergedDictionaries = await writeUnmergedDictionaries(dictionaries);\n * console.log(unmergedDictionaries);\n *\n * // .intlayer/unmerged_dictionaries/home.json\n * // {\n * // [\n * // { key: 'home', content: { ... } },\n * // { key: 'home', content: { ... } },\n * // ],\n * // }\n * ```\n */\nexport const writeUnmergedDictionaries = async (\n dictionaries: Dictionary[],\n configuration = getConfiguration()\n): Promise<Record<string, Dictionary[]>> => {\n const { unmergedDictionariesDir } = configuration.content;\n\n // Create the merged dictionaries directory\n await mkdir(unmergedDictionariesDir, { recursive: true });\n\n // Group dictionaries by key and write to unmergedDictionariesDir\n const groupedDictionaries = groupDictionariesByKey(dictionaries);\n\n for (const [key, dictionaries] of Object.entries(groupedDictionaries)) {\n if (key === 'undefined') continue;\n\n const isDevelopment = process.env.NODE_ENV === 'development';\n const contentString = isDevelopment\n ? JSON.stringify(dictionaries, null, 2)\n : JSON.stringify(dictionaries);\n\n const outputFileName = `${key}.json`;\n const unmergedFilePath = resolve(unmergedDictionariesDir, outputFileName);\n\n // Write the grouped dictionaries\n await writeFile(unmergedFilePath, contentString, 'utf8').catch((err) => {\n console.error(`Error creating unmerged ${outputFileName}:`, err);\n });\n }\n\n return groupedDictionaries;\n};\n\n/**\n * Write the final dictionaries to the dictionariesDir\n * @param groupedDictionaries - The grouped dictionaries\n * @param configuration - The configuration\n * @returns The final dictionaries\n *\n * @example\n * ```ts\n * const unmergedDictionaries = await writeUnmergedDictionaries(dictionaries);\n * const finalDictionaries = await writeFinalDictionaries(unmergedDictionaries);\n * console.log(finalDictionaries);\n *\n * // .intlayer/dictionaries/home.json\n * // { key: 'home', content: { ... } },\n * ```\n */\nexport const writeFinalDictionaries = async (\n groupedDictionaries: Record<string, Dictionary[]>,\n configuration = getConfiguration()\n) => {\n const { dictionariesDir } = configuration.content;\n const resultDictionariesPaths: string[] = [];\n\n // Merge dictionaries with the same key and write to dictionariesDir\n for (const [key, dictionaries] of Object.entries(groupedDictionaries)) {\n if (key === 'undefined') continue;\n\n const multiLocaleDictionaries = dictionaries.map((dictionary) =>\n processPerLocaleDictionary(dictionary)\n );\n const mergedDictionary = mergeDictionaries(multiLocaleDictionaries);\n\n const isDevelopment = process.env.NODE_ENV === 'development';\n const contentString = isDevelopment\n ? JSON.stringify(mergedDictionary, null, 2)\n : JSON.stringify(mergedDictionary);\n\n const outputFileName = `${key}.json`;\n const resultFilePath = resolve(dictionariesDir, outputFileName);\n\n // Write the merged dictionary\n await writeFile(resultFilePath, contentString, 'utf8').catch((err) => {\n console.error(`Error creating merged ${outputFileName}:`, err);\n });\n\n resultDictionariesPaths.push(resultFilePath);\n }\n\n return resultDictionariesPaths;\n};\n\nexport const writeDictionary = async (\n dictionaries: Dictionary[],\n configuration = getConfiguration()\n) => {\n const unmergedDictionaries = await writeUnmergedDictionaries(\n dictionaries,\n configuration\n );\n\n const finalDictionaries = await writeFinalDictionaries(\n unmergedDictionaries,\n configuration\n );\n\n return finalDictionaries;\n};\n"],"mappings":"AAAA,SAAS,wBAAwB;AAEjC,SAAS,OAAO,iBAAiB;AACjC,SAAS,eAAe;AACxB,SAAS,yBAAyB;AAClC,SAAS,kCAAkC;AAE3C,MAAM,yBAAyB,CAC7B,iBACiC;AACjC,SAAO,aAAa;AAAA,IAClB,CAAC,KAAK,eAAe;AACnB,YAAM,MAAM,WAAW;AACvB,UAAI,CAAC,IAAI,GAAG,GAAG;AACb,YAAI,GAAG,IAAI,CAAC;AAAA,MACd;AACA,UAAI,GAAG,EAAE,KAAK,UAAU;AACxB,aAAO;AAAA,IACT;AAAA,IACA,CAAC;AAAA,EACH;AACF;AAsBO,MAAM,4BAA4B,OACvC,cACA,gBAAgB,iBAAiB,MACS;AAC1C,QAAM,EAAE,wBAAwB,IAAI,cAAc;AAGlD,QAAM,MAAM,yBAAyB,EAAE,WAAW,KAAK,CAAC;AAGxD,QAAM,sBAAsB,uBAAuB,YAAY;AAE/D,aAAW,CAAC,KAAKA,aAAY,KAAK,OAAO,QAAQ,mBAAmB,GAAG;AACrE,QAAI,QAAQ,YAAa;AAEzB,UAAM,gBAAgB,QAAQ,IAAI,aAAa;AAC/C,UAAM,gBAAgB,gBAClB,KAAK,UAAUA,eAAc,MAAM,CAAC,IACpC,KAAK,UAAUA,aAAY;AAE/B,UAAM,iBAAiB,GAAG,GAAG;AAC7B,UAAM,mBAAmB,QAAQ,yBAAyB,cAAc;AAGxE,UAAM,UAAU,kBAAkB,eAAe,MAAM,EAAE,MAAM,CAAC,QAAQ;AACtE,cAAQ,MAAM,2BAA2B,cAAc,KAAK,GAAG;AAAA,IACjE,CAAC;AAAA,EACH;AAEA,SAAO;AACT;AAkBO,MAAM,yBAAyB,OACpC,qBACA,gBAAgB,iBAAiB,MAC9B;AACH,QAAM,EAAE,gBAAgB,IAAI,cAAc;AAC1C,QAAM,0BAAoC,CAAC;AAG3C,aAAW,CAAC,KAAK,YAAY,KAAK,OAAO,QAAQ,mBAAmB,GAAG;AACrE,QAAI,QAAQ,YAAa;AAEzB,UAAM,0BAA0B,aAAa;AAAA,MAAI,CAAC,eAChD,2BAA2B,UAAU;AAAA,IACvC;AACA,UAAM,mBAAmB,kBAAkB,uBAAuB;AAElE,UAAM,gBAAgB,QAAQ,IAAI,aAAa;AAC/C,UAAM,gBAAgB,gBAClB,KAAK,UAAU,kBAAkB,MAAM,CAAC,IACxC,KAAK,UAAU,gBAAgB;AAEnC,UAAM,iBAAiB,GAAG,GAAG;AAC7B,UAAM,iBAAiB,QAAQ,iBAAiB,cAAc;AAG9D,UAAM,UAAU,gBAAgB,eAAe,MAAM,EAAE,MAAM,CAAC,QAAQ;AACpE,cAAQ,MAAM,yBAAyB,cAAc,KAAK,GAAG;AAAA,IAC/D,CAAC;AAED,4BAAwB,KAAK,cAAc;AAAA,EAC7C;AAEA,SAAO;AACT;AAEO,MAAM,kBAAkB,OAC7B,cACA,gBAAgB,iBAAiB,MAC9B;AACH,QAAM,uBAAuB,MAAM;AAAA,IACjC;AAAA,IACA;AAAA,EACF;AAEA,QAAM,oBAAoB,MAAM;AAAA,IAC9B;AAAA,IACA;AAAA,EACF;AAEA,SAAO;AACT;","names":["dictionaries"]}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import type { Locales } from '@intlayer/config/client';
|
|
2
|
-
import { type Dictionary } from '@intlayer/core';
|
|
3
|
-
export declare const filterDictionaryLocales: (dictionary: Dictionary, locales: Locales[] | Locales) => any;
|
|
4
|
-
//# sourceMappingURL=filterDictionaryLocales.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"filterDictionaryLocales.d.ts","sourceRoot":"","sources":["../../src/filterDictionaryLocales.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAGL,KAAK,UAAU,EAEhB,MAAM,gBAAgB,CAAC;AAiCxB,eAAO,MAAM,uBAAuB,GAClC,YAAY,UAAU,EACtB,SAAS,OAAO,EAAE,GAAG,OAAO,QAM1B,CAAC"}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import type { Dictionary } from '@intlayer/core';
|
|
2
|
-
/**
|
|
3
|
-
* Write the unmerged dictionaries to the unmergedDictionariesDir
|
|
4
|
-
* @param dictionaries - The dictionaries to write
|
|
5
|
-
* @param configuration - The configuration
|
|
6
|
-
* @returns The grouped dictionaries
|
|
7
|
-
*
|
|
8
|
-
* @example
|
|
9
|
-
* ```ts
|
|
10
|
-
* const unmergedDictionaries = await writeUnmergedDictionaries(dictionaries);
|
|
11
|
-
* console.log(unmergedDictionaries);
|
|
12
|
-
*
|
|
13
|
-
* // .intlayer/unmerged_dictionaries/home.json
|
|
14
|
-
* // {
|
|
15
|
-
* // [
|
|
16
|
-
* // { key: 'home', content: { ... } },
|
|
17
|
-
* // { key: 'home', content: { ... } },
|
|
18
|
-
* // ],
|
|
19
|
-
* // }
|
|
20
|
-
* ```
|
|
21
|
-
*/
|
|
22
|
-
export declare const writeUnmergedDictionaries: (dictionaries: Dictionary[], configuration?: import("@intlayer/config").IntlayerConfig) => Promise<Record<string, Dictionary[]>>;
|
|
23
|
-
/**
|
|
24
|
-
* Write the final dictionaries to the dictionariesDir
|
|
25
|
-
* @param groupedDictionaries - The grouped dictionaries
|
|
26
|
-
* @param configuration - The configuration
|
|
27
|
-
* @returns The final dictionaries
|
|
28
|
-
*
|
|
29
|
-
* @example
|
|
30
|
-
* ```ts
|
|
31
|
-
* const unmergedDictionaries = await writeUnmergedDictionaries(dictionaries);
|
|
32
|
-
* const finalDictionaries = await writeFinalDictionaries(unmergedDictionaries);
|
|
33
|
-
* console.log(finalDictionaries);
|
|
34
|
-
*
|
|
35
|
-
* // .intlayer/dictionaries/home.json
|
|
36
|
-
* // { key: 'home', content: { ... } },
|
|
37
|
-
* ```
|
|
38
|
-
*/
|
|
39
|
-
export declare const writeFinalDictionaries: (groupedDictionaries: Record<string, Dictionary[]>, configuration?: import("@intlayer/config").IntlayerConfig) => Promise<string[]>;
|
|
40
|
-
export declare const writeDictionary: (dictionaries: Dictionary[], configuration?: import("@intlayer/config").IntlayerConfig) => Promise<string[]>;
|
|
41
|
-
//# sourceMappingURL=writeDictionary.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"writeDictionary.d.ts","sourceRoot":"","sources":["../../../../../src/transpiler/declaration_file_to_dictionary/intlayer_dictionary/writeDictionary.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAsBjD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,yBAAyB,GACpC,cAAc,UAAU,EAAE,EAC1B,yDAAkC,KACjC,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,UAAU,EAAE,CAAC,CA2BtC,CAAC;AAEF;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,sBAAsB,GACjC,qBAAqB,MAAM,CAAC,MAAM,EAAE,UAAU,EAAE,CAAC,EACjD,yDAAkC,sBA+BnC,CAAC;AAEF,eAAO,MAAM,eAAe,GAC1B,cAAc,UAAU,EAAE,EAC1B,yDAAkC,sBAanC,CAAC"}
|