@intlayer/chokidar 7.5.1 → 7.5.2-canary.0

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 (86) hide show
  1. package/dist/cjs/buildIntlayerDictionary/buildIntlayerDictionary.cjs +1 -1
  2. package/dist/cjs/buildIntlayerDictionary/writeDynamicDictionary.cjs +1 -1
  3. package/dist/cjs/buildIntlayerDictionary/writeFetchDictionary.cjs +1 -1
  4. package/dist/cjs/buildIntlayerDictionary/writeMergedDictionary.cjs +1 -1
  5. package/dist/cjs/buildIntlayerDictionary/writeRemoteDictionary.cjs +2 -2
  6. package/dist/cjs/buildIntlayerDictionary/writeUnmergedDictionary.cjs +2 -2
  7. package/dist/cjs/cleanRemovedContentDeclaration.cjs +67 -0
  8. package/dist/cjs/cleanRemovedContentDeclaration.cjs.map +1 -0
  9. package/dist/cjs/createDictionaryEntryPoint/createDictionaryEntryPoint.cjs +1 -1
  10. package/dist/cjs/createDictionaryEntryPoint/generateDictionaryListContent.cjs +1 -1
  11. package/dist/cjs/createType/createModuleAugmentation.cjs +1 -1
  12. package/dist/cjs/createType/createType.cjs +1 -1
  13. package/dist/cjs/fetchDistantDictionaries.cjs +1 -1
  14. package/dist/cjs/handleAdditionalContentDeclarationFile.cjs +2 -2
  15. package/dist/cjs/handleContentDeclarationFileChange.cjs +8 -3
  16. package/dist/cjs/handleContentDeclarationFileChange.cjs.map +1 -1
  17. package/dist/cjs/handleUnlinkedContentDeclarationFile.cjs +8 -3
  18. package/dist/cjs/handleUnlinkedContentDeclarationFile.cjs.map +1 -1
  19. package/dist/cjs/index.cjs +5 -5
  20. package/dist/cjs/listGitFiles.cjs +1 -1
  21. package/dist/cjs/loadDictionaries/getIntlayerBundle.cjs +1 -1
  22. package/dist/cjs/loadDictionaries/loadContentDeclaration.cjs +1 -1
  23. package/dist/cjs/loadDictionaries/loadRemoteDictionaries.cjs +1 -1
  24. package/dist/cjs/prepareIntlayer.cjs +2 -2
  25. package/dist/cjs/transformFiles/transformFiles.cjs +1 -1
  26. package/dist/cjs/utils/formatter.cjs +1 -1
  27. package/dist/cjs/watcher.cjs +12 -3
  28. package/dist/cjs/watcher.cjs.map +1 -1
  29. package/dist/cjs/writeContentDeclaration/processContentDeclarationContent.cjs +1 -1
  30. package/dist/cjs/writeContentDeclaration/writeContentDeclaration.cjs +1 -1
  31. package/dist/cjs/writeContentDeclaration/writeContentDeclaration.cjs.map +1 -1
  32. package/dist/cjs/writeContentDeclaration/writeJSFile.cjs +7 -2
  33. package/dist/cjs/writeContentDeclaration/writeJSFile.cjs.map +1 -1
  34. package/dist/esm/buildIntlayerDictionary/buildIntlayerDictionary.mjs +1 -1
  35. package/dist/esm/buildIntlayerDictionary/writeDynamicDictionary.mjs +1 -1
  36. package/dist/esm/buildIntlayerDictionary/writeFetchDictionary.mjs +1 -1
  37. package/dist/esm/buildIntlayerDictionary/writeMergedDictionary.mjs +1 -1
  38. package/dist/esm/buildIntlayerDictionary/writeRemoteDictionary.mjs +2 -2
  39. package/dist/esm/buildIntlayerDictionary/writeUnmergedDictionary.mjs +2 -2
  40. package/dist/esm/cleanRemovedContentDeclaration.mjs +66 -0
  41. package/dist/esm/cleanRemovedContentDeclaration.mjs.map +1 -0
  42. package/dist/esm/createDictionaryEntryPoint/createDictionaryEntryPoint.mjs +1 -1
  43. package/dist/esm/createDictionaryEntryPoint/generateDictionaryListContent.mjs +1 -1
  44. package/dist/esm/createType/createModuleAugmentation.mjs +1 -1
  45. package/dist/esm/createType/createType.mjs +1 -1
  46. package/dist/esm/fetchDistantDictionaries.mjs +1 -1
  47. package/dist/esm/handleAdditionalContentDeclarationFile.mjs +2 -2
  48. package/dist/esm/handleContentDeclarationFileChange.mjs +8 -3
  49. package/dist/esm/handleContentDeclarationFileChange.mjs.map +1 -1
  50. package/dist/esm/handleUnlinkedContentDeclarationFile.mjs +8 -3
  51. package/dist/esm/handleUnlinkedContentDeclarationFile.mjs.map +1 -1
  52. package/dist/esm/index.mjs +5 -5
  53. package/dist/esm/listGitFiles.mjs +1 -1
  54. package/dist/esm/loadDictionaries/getIntlayerBundle.mjs +1 -1
  55. package/dist/esm/loadDictionaries/loadContentDeclaration.mjs +1 -1
  56. package/dist/esm/loadDictionaries/loadRemoteDictionaries.mjs +1 -1
  57. package/dist/esm/prepareIntlayer.mjs +2 -2
  58. package/dist/esm/transformFiles/transformFiles.mjs +1 -1
  59. package/dist/esm/utils/formatter.mjs +1 -1
  60. package/dist/esm/watcher.mjs +12 -3
  61. package/dist/esm/watcher.mjs.map +1 -1
  62. package/dist/esm/writeContentDeclaration/processContentDeclarationContent.mjs +1 -1
  63. package/dist/esm/writeContentDeclaration/writeContentDeclaration.mjs +1 -1
  64. package/dist/esm/writeContentDeclaration/writeContentDeclaration.mjs.map +1 -1
  65. package/dist/esm/writeContentDeclaration/writeJSFile.mjs +7 -2
  66. package/dist/esm/writeContentDeclaration/writeJSFile.mjs.map +1 -1
  67. package/dist/types/buildIntlayerDictionary/buildIntlayerDictionary.d.ts +2 -2
  68. package/dist/types/buildIntlayerDictionary/buildIntlayerDictionary.d.ts.map +1 -1
  69. package/dist/types/buildIntlayerDictionary/writeDynamicDictionary.d.ts +3 -3
  70. package/dist/types/buildIntlayerDictionary/writeDynamicDictionary.d.ts.map +1 -1
  71. package/dist/types/buildIntlayerDictionary/writeFetchDictionary.d.ts +3 -3
  72. package/dist/types/buildIntlayerDictionary/writeMergedDictionary.d.ts +2 -2
  73. package/dist/types/buildIntlayerDictionary/writeRemoteDictionary.d.ts +2 -2
  74. package/dist/types/buildIntlayerDictionary/writeRemoteDictionary.d.ts.map +1 -1
  75. package/dist/types/cleanRemovedContentDeclaration.d.ts +7 -0
  76. package/dist/types/cleanRemovedContentDeclaration.d.ts.map +1 -0
  77. package/dist/types/createDictionaryEntryPoint/createDictionaryEntryPoint.d.ts +2 -2
  78. package/dist/types/createDictionaryEntryPoint/generateDictionaryListContent.d.ts +2 -2
  79. package/dist/types/formatDictionary.d.ts +15 -15
  80. package/dist/types/handleContentDeclarationFileChange.d.ts.map +1 -1
  81. package/dist/types/handleUnlinkedContentDeclarationFile.d.ts.map +1 -1
  82. package/dist/types/loadDictionaries/loadRemoteDictionaries.d.ts +2 -2
  83. package/dist/types/loadDictionaries/loadRemoteDictionaries.d.ts.map +1 -1
  84. package/dist/types/utils/getFormatFromExtension.d.ts.map +1 -1
  85. package/dist/types/watcher.d.ts.map +1 -1
  86. package/package.json +10 -10
@@ -1 +1 @@
1
- {"version":3,"file":"writeJSFile.mjs","names":[],"sources":["../../../src/writeContentDeclaration/writeJSFile.ts"],"sourcesContent":["import { execSync } from 'node:child_process';\nimport { existsSync } from 'node:fs';\nimport { readFile, writeFile } from 'node:fs/promises';\nimport { extname } from 'node:path';\nimport { getAppLogger, logger } from '@intlayer/config';\nimport type { Dictionary, IntlayerConfig } from '@intlayer/types';\nimport { getContentDeclarationFileTemplate } from '../getContentDeclarationFileTemplate/getContentDeclarationFileTemplate';\nimport {\n type Extension,\n getFormatFromExtension,\n} from '../utils/getFormatFromExtension';\nimport { detectFormatCommand } from './detectFormatCommand';\nimport { transformJSFile } from './transformJSFile';\n\n/**\n * Updates a JavaScript/TypeScript file based on the provided JSON instructions.\n * It targets a specific dictionary object within the file (identified by its 'key' property)\n * and updates its 'content' entries. Currently, it focuses on modifying arguments\n * of 't' (translation) function calls.\n */\nexport const writeJSFile = async (\n filePath: string,\n dictionary: Dictionary,\n configuration: IntlayerConfig\n): Promise<void> => {\n const mergedDictionary = {\n ...configuration.dictionary,\n ...dictionary,\n };\n\n const appLogger = getAppLogger(configuration);\n\n // Check if the file exist\n if (!existsSync(filePath)) {\n const fileExtension = extname(filePath) as Extension;\n\n const format = getFormatFromExtension(fileExtension);\n\n appLogger('File does not exist, creating it', {\n isVerbose: true,\n });\n const template = await getContentDeclarationFileTemplate(\n mergedDictionary.key,\n format,\n // Filter out undefined values\n Object.fromEntries(\n Object.entries({\n id: mergedDictionary.id,\n locale: mergedDictionary.locale,\n filled: mergedDictionary.filled,\n fill: mergedDictionary.fill,\n description: mergedDictionary.description,\n title: mergedDictionary.title,\n tags: mergedDictionary.tags,\n version: mergedDictionary.version,\n priority: mergedDictionary.priority,\n live: mergedDictionary.live,\n }).filter(([, value]) => value !== undefined)\n )\n );\n\n await writeFile(filePath, template, 'utf-8');\n }\n\n const fileContent = await readFile(filePath, 'utf-8');\n\n const finalCode = await transformJSFile(fileContent, dictionary);\n\n // Write the modified code back to the file\n try {\n await writeFile(filePath, finalCode, 'utf-8');\n logger(`Successfully updated ${filePath}`, {\n level: 'info',\n isVerbose: true,\n });\n } catch (error) {\n const err = error as Error;\n logger(`Failed to write updated file: ${filePath}`, {\n level: 'error',\n });\n throw new Error(`Failed to write updated file ${filePath}: ${err.message}`);\n }\n\n const formatCommand = detectFormatCommand(configuration);\n\n if (formatCommand) {\n try {\n execSync(formatCommand.replace('{{file}}', filePath), {\n stdio: 'inherit',\n cwd: configuration.content.baseDir,\n });\n } catch (error) {\n console.error(error);\n }\n }\n};\n"],"mappings":";;;;;;;;;;;;;;;;;AAoBA,MAAa,cAAc,OACzB,UACA,YACA,kBACkB;CAClB,MAAM,mBAAmB;EACvB,GAAG,cAAc;EACjB,GAAG;EACJ;CAED,MAAM,YAAY,aAAa,cAAc;AAG7C,KAAI,CAAC,WAAW,SAAS,EAAE;EAGzB,MAAM,SAAS,uBAFO,QAAQ,SAAS,CAEa;AAEpD,YAAU,oCAAoC,EAC5C,WAAW,MACZ,CAAC;AAqBF,QAAM,UAAU,UApBC,MAAM,kCACrB,iBAAiB,KACjB,QAEA,OAAO,YACL,OAAO,QAAQ;GACb,IAAI,iBAAiB;GACrB,QAAQ,iBAAiB;GACzB,QAAQ,iBAAiB;GACzB,MAAM,iBAAiB;GACvB,aAAa,iBAAiB;GAC9B,OAAO,iBAAiB;GACxB,MAAM,iBAAiB;GACvB,SAAS,iBAAiB;GAC1B,UAAU,iBAAiB;GAC3B,MAAM,iBAAiB;GACxB,CAAC,CAAC,QAAQ,GAAG,WAAW,UAAU,OAAU,CAC9C,CACF,EAEmC,QAAQ;;CAK9C,MAAM,YAAY,MAAM,gBAFJ,MAAM,SAAS,UAAU,QAAQ,EAEA,WAAW;AAGhE,KAAI;AACF,QAAM,UAAU,UAAU,WAAW,QAAQ;AAC7C,SAAO,wBAAwB,YAAY;GACzC,OAAO;GACP,WAAW;GACZ,CAAC;UACK,OAAO;EACd,MAAM,MAAM;AACZ,SAAO,iCAAiC,YAAY,EAClD,OAAO,SACR,CAAC;AACF,QAAM,IAAI,MAAM,gCAAgC,SAAS,IAAI,IAAI,UAAU;;CAG7E,MAAM,gBAAgB,oBAAoB,cAAc;AAExD,KAAI,cACF,KAAI;AACF,WAAS,cAAc,QAAQ,YAAY,SAAS,EAAE;GACpD,OAAO;GACP,KAAK,cAAc,QAAQ;GAC5B,CAAC;UACK,OAAO;AACd,UAAQ,MAAM,MAAM"}
1
+ {"version":3,"file":"writeJSFile.mjs","names":[],"sources":["../../../src/writeContentDeclaration/writeJSFile.ts"],"sourcesContent":["import { execSync } from 'node:child_process';\nimport { existsSync } from 'node:fs';\nimport { readFile, writeFile } from 'node:fs/promises';\nimport { extname } from 'node:path';\nimport { getAppLogger, logger } from '@intlayer/config';\nimport type { Dictionary, IntlayerConfig } from '@intlayer/types';\nimport { getContentDeclarationFileTemplate } from '../getContentDeclarationFileTemplate/getContentDeclarationFileTemplate';\nimport {\n type Extension,\n getFormatFromExtension,\n} from '../utils/getFormatFromExtension';\nimport { detectFormatCommand } from './detectFormatCommand';\nimport { transformJSFile } from './transformJSFile';\n\n/**\n * Updates a JavaScript/TypeScript file based on the provided JSON instructions.\n * It targets a specific dictionary object within the file (identified by its 'key' property)\n * and updates its 'content' entries. Currently, it focuses on modifying arguments\n * of 't' (translation) function calls.\n */\nexport const writeJSFile = async (\n filePath: string,\n dictionary: Dictionary,\n configuration: IntlayerConfig\n): Promise<void> => {\n const mergedDictionary = {\n ...configuration.dictionary,\n ...dictionary,\n };\n\n const appLogger = getAppLogger(configuration);\n\n // Check if the file exist\n if (!existsSync(filePath)) {\n const fileExtension = extname(filePath) as Extension;\n\n const format = getFormatFromExtension(fileExtension);\n\n appLogger('File does not exist, creating it', {\n isVerbose: true,\n });\n const template = await getContentDeclarationFileTemplate(\n mergedDictionary.key,\n format,\n // Filter out undefined values\n Object.fromEntries(\n Object.entries({\n id: mergedDictionary.id,\n locale: mergedDictionary.locale,\n filled: mergedDictionary.filled,\n fill: mergedDictionary.fill,\n description: mergedDictionary.description,\n title: mergedDictionary.title,\n tags: mergedDictionary.tags,\n version: mergedDictionary.version,\n priority: mergedDictionary.priority,\n live: mergedDictionary.live,\n }).filter(([, value]) => value !== undefined)\n )\n );\n\n await writeFile(filePath, template, 'utf-8');\n }\n\n let fileContent = await readFile(filePath, 'utf-8');\n\n if (fileContent === '') {\n const format = getFormatFromExtension(extname(filePath) as Extension);\n\n fileContent = await getContentDeclarationFileTemplate(\n mergedDictionary.key,\n format\n );\n }\n\n const finalCode = await transformJSFile(fileContent, dictionary);\n\n // Write the modified code back to the file\n try {\n await writeFile(filePath, finalCode, 'utf-8');\n logger(`Successfully updated ${filePath}`, {\n level: 'info',\n isVerbose: true,\n });\n } catch (error) {\n const err = error as Error;\n logger(`Failed to write updated file: ${filePath}`, {\n level: 'error',\n });\n throw new Error(`Failed to write updated file ${filePath}: ${err.message}`);\n }\n\n const formatCommand = detectFormatCommand(configuration);\n\n if (formatCommand) {\n try {\n execSync(formatCommand.replace('{{file}}', filePath), {\n stdio: 'inherit',\n cwd: configuration.content.baseDir,\n });\n } catch (error) {\n console.error(error);\n }\n }\n};\n"],"mappings":";;;;;;;;;;;;;;;;;AAoBA,MAAa,cAAc,OACzB,UACA,YACA,kBACkB;CAClB,MAAM,mBAAmB;EACvB,GAAG,cAAc;EACjB,GAAG;EACJ;CAED,MAAM,YAAY,aAAa,cAAc;AAG7C,KAAI,CAAC,WAAW,SAAS,EAAE;EAGzB,MAAM,SAAS,uBAFO,QAAQ,SAAS,CAEa;AAEpD,YAAU,oCAAoC,EAC5C,WAAW,MACZ,CAAC;AAqBF,QAAM,UAAU,UApBC,MAAM,kCACrB,iBAAiB,KACjB,QAEA,OAAO,YACL,OAAO,QAAQ;GACb,IAAI,iBAAiB;GACrB,QAAQ,iBAAiB;GACzB,QAAQ,iBAAiB;GACzB,MAAM,iBAAiB;GACvB,aAAa,iBAAiB;GAC9B,OAAO,iBAAiB;GACxB,MAAM,iBAAiB;GACvB,SAAS,iBAAiB;GAC1B,UAAU,iBAAiB;GAC3B,MAAM,iBAAiB;GACxB,CAAC,CAAC,QAAQ,GAAG,WAAW,UAAU,OAAU,CAC9C,CACF,EAEmC,QAAQ;;CAG9C,IAAI,cAAc,MAAM,SAAS,UAAU,QAAQ;AAEnD,KAAI,gBAAgB,IAAI;EACtB,MAAM,SAAS,uBAAuB,QAAQ,SAAS,CAAc;AAErE,gBAAc,MAAM,kCAClB,iBAAiB,KACjB,OACD;;CAGH,MAAM,YAAY,MAAM,gBAAgB,aAAa,WAAW;AAGhE,KAAI;AACF,QAAM,UAAU,UAAU,WAAW,QAAQ;AAC7C,SAAO,wBAAwB,YAAY;GACzC,OAAO;GACP,WAAW;GACZ,CAAC;UACK,OAAO;EACd,MAAM,MAAM;AACZ,SAAO,iCAAiC,YAAY,EAClD,OAAO,SACR,CAAC;AACF,QAAM,IAAI,MAAM,gCAAgC,SAAS,IAAI,IAAI,UAAU;;CAG7E,MAAM,gBAAgB,oBAAoB,cAAc;AAExD,KAAI,cACF,KAAI;AACF,WAAS,cAAc,QAAQ,YAAY,SAAS,EAAE;GACpD,OAAO;GACP,KAAK,cAAc,QAAQ;GAC5B,CAAC;UACK,OAAO;AACd,UAAQ,MAAM,MAAM"}
@@ -1,14 +1,14 @@
1
1
  import { UnmergedDictionaryOutput } from "./writeUnmergedDictionary.js";
2
2
  import { MergedDictionaryOutput } from "./writeMergedDictionary.js";
3
3
  import { LocalizedDictionaryOutput } from "./writeDynamicDictionary.js";
4
- import * as _intlayer_types13 from "@intlayer/types";
4
+ import * as _intlayer_types0 from "@intlayer/types";
5
5
  import { Dictionary } from "@intlayer/types";
6
6
 
7
7
  //#region src/buildIntlayerDictionary/buildIntlayerDictionary.d.ts
8
8
  /**
9
9
  * This function transpile the bundled code to to make dictionaries as JSON files
10
10
  */
11
- declare const buildDictionary: (localDictionariesEntries: Dictionary[], configuration?: _intlayer_types13.IntlayerConfig, formats?: ("cjs" | "esm")[], importOtherDictionaries?: boolean) => Promise<{
11
+ declare const buildDictionary: (localDictionariesEntries: Dictionary[], configuration?: _intlayer_types0.IntlayerConfig, formats?: ("cjs" | "esm")[], importOtherDictionaries?: boolean) => Promise<{
12
12
  unmergedDictionaries: UnmergedDictionaryOutput;
13
13
  mergedDictionaries: MergedDictionaryOutput;
14
14
  dynamicDictionaries: LocalizedDictionaryOutput;
@@ -1 +1 @@
1
- {"version":3,"file":"buildIntlayerDictionary.d.ts","names":[],"sources":["../../../src/buildIntlayerDictionary/buildIntlayerDictionary.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;cAca,4CACe,8BAAU,iBAAA,CACpC,mFAE8B;wBAFI;EAFvB,kBAsEZ,wBAAA;EArE2B,mBAAA,2BAAA;EAAU,iBACpC,2BAAA;CAAkC,CAAA"}
1
+ {"version":3,"file":"buildIntlayerDictionary.d.ts","names":[],"sources":["../../../src/buildIntlayerDictionary/buildIntlayerDictionary.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;cAca,4CACe,8BAAU,gBAAA,CACpC,mFAE8B;wBAFI;EAFvB,kBAsEZ,wBAAA;EArE2B,mBAAA,2BAAA;EAAU,iBACpC,2BAAA;CAAkC,CAAA"}
@@ -1,5 +1,5 @@
1
1
  import { MergedDictionaryOutput } from "./writeMergedDictionary.js";
2
- import * as _intlayer_types14 from "@intlayer/types";
2
+ import * as _intlayer_types1 from "@intlayer/types";
3
3
  import { Dictionary, Locale } from "@intlayer/types";
4
4
 
5
5
  //#region src/buildIntlayerDictionary/writeDynamicDictionary.d.ts
@@ -12,7 +12,7 @@ type LocalizedDictionaryOutput = Record<string, LocalizedDictionaryResult>;
12
12
  /**
13
13
  * This function generates the content of the dictionary list file
14
14
  */
15
- declare const generateDictionaryEntryPoint: (localizedDictionariesPathsRecord: LocalizedDictionaryResult, format?: "cjs" | "esm", configuration?: _intlayer_types14.IntlayerConfig) => string;
15
+ declare const generateDictionaryEntryPoint: (localizedDictionariesPathsRecord: LocalizedDictionaryResult, format?: "cjs" | "esm", configuration?: _intlayer_types1.IntlayerConfig) => string;
16
16
  /**
17
17
  * Write the localized dictionaries to the dictionariesDir
18
18
  * @param mergedDictionaries - The merged dictionaries
@@ -29,7 +29,7 @@ declare const generateDictionaryEntryPoint: (localizedDictionariesPathsRecord: L
29
29
  * // { key: 'home', content: { ... } },
30
30
  * ```
31
31
  */
32
- declare const writeDynamicDictionary: (mergedDictionaries: MergedDictionaryOutput, configuration?: _intlayer_types14.IntlayerConfig, formats?: ("cjs" | "esm")[]) => Promise<LocalizedDictionaryOutput>;
32
+ declare const writeDynamicDictionary: (mergedDictionaries: MergedDictionaryOutput, configuration?: _intlayer_types1.IntlayerConfig, formats?: ("cjs" | "esm")[]) => Promise<LocalizedDictionaryOutput>;
33
33
  //#endregion
34
34
  export { DictionaryResult, LocalizedDictionaryOutput, LocalizedDictionaryResult, generateDictionaryEntryPoint, writeDynamicDictionary };
35
35
  //# sourceMappingURL=writeDynamicDictionary.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"writeDynamicDictionary.d.ts","names":[],"sources":["../../../src/buildIntlayerDictionary/writeDynamicDictionary.ts"],"sourcesContent":[],"mappings":";;;;;KAcY,gBAAA;;cAEE;AAFd,CAAA;AAKY,KAAA,yBAAA,GAA4B,OAAH,CACnC,MADmC,CAC5B,MAD4B,EACpB,gBADoB,CAAA,CAAA;AAC5B,KAGG,yBAAA,GAA4B,MAH/B,CAAA,MAAA,EAKP,yBALO,CAAA;;;;AADsC,cAYlC,4BAZkC,EAAA,CAAA,gCAAA,EAaX,yBAbW,EAAA,MAAA,CAAA,EAAA,KAAA,GAAA,KAAA,EAAA,aAAA,CAAA,EAac,iBAAA,CAE3D,cAf6C,EAAA,GAAA,MAAA;AAI/C;AAQA;AAsDA;;;;;;;;;;;;;;cAAa,6CACS,wCAAsB,iBAAA,CAC1C,gDAEC,QAAQ"}
1
+ {"version":3,"file":"writeDynamicDictionary.d.ts","names":[],"sources":["../../../src/buildIntlayerDictionary/writeDynamicDictionary.ts"],"sourcesContent":[],"mappings":";;;;;KAcY,gBAAA;;cAEE;AAFd,CAAA;AAKY,KAAA,yBAAA,GAA4B,OAAH,CACnC,MADmC,CAC5B,MAD4B,EACpB,gBADoB,CAAA,CAAA;AAC5B,KAGG,yBAAA,GAA4B,MAH/B,CAAA,MAAA,EAKP,yBALO,CAAA;;;;AADsC,cAYlC,4BAZkC,EAAA,CAAA,gCAAA,EAaX,yBAbW,EAAA,MAAA,CAAA,EAAA,KAAA,GAAA,KAAA,EAAA,aAAA,CAAA,EAac,gBAAA,CAE3D,cAf6C,EAAA,GAAA,MAAA;AAI/C;AAQA;AAsDA;;;;;;;;;;;;;;cAAa,6CACS,wCAAsB,gBAAA,CAC1C,gDAEC,QAAQ"}
@@ -1,11 +1,11 @@
1
1
  import { LocalizedDictionaryOutput, LocalizedDictionaryResult } from "./writeDynamicDictionary.js";
2
- import * as _intlayer_types18 from "@intlayer/types";
2
+ import * as _intlayer_types21 from "@intlayer/types";
3
3
 
4
4
  //#region src/buildIntlayerDictionary/writeFetchDictionary.d.ts
5
5
  /**
6
6
  * This function generates the content of the dictionary list file
7
7
  */
8
- declare const generateDictionaryEntryPoint: (localedDictionariesPathsRecord: LocalizedDictionaryResult, format?: "cjs" | "esm", configuration?: _intlayer_types18.IntlayerConfig) => string;
8
+ declare const generateDictionaryEntryPoint: (localedDictionariesPathsRecord: LocalizedDictionaryResult, format?: "cjs" | "esm", configuration?: _intlayer_types21.IntlayerConfig) => string;
9
9
  /**
10
10
  * Write the localized dictionaries to the dictionariesDir
11
11
  * @param mergedDictionaries - The merged dictionaries
@@ -22,7 +22,7 @@ declare const generateDictionaryEntryPoint: (localedDictionariesPathsRecord: Loc
22
22
  * // { key: 'home', content: { ... } },
23
23
  * ```
24
24
  */
25
- declare const writeFetchDictionary: (dynamicDictionaries: LocalizedDictionaryOutput, configuration?: _intlayer_types18.IntlayerConfig, formats?: ("cjs" | "esm")[]) => Promise<LocalizedDictionaryOutput>;
25
+ declare const writeFetchDictionary: (dynamicDictionaries: LocalizedDictionaryOutput, configuration?: _intlayer_types21.IntlayerConfig, formats?: ("cjs" | "esm")[]) => Promise<LocalizedDictionaryOutput>;
26
26
  //#endregion
27
27
  export { generateDictionaryEntryPoint, writeFetchDictionary };
28
28
  //# sourceMappingURL=writeFetchDictionary.d.ts.map
@@ -1,5 +1,5 @@
1
1
  import { UnmergedDictionaryOutput } from "./writeUnmergedDictionary.js";
2
- import * as _intlayer_types16 from "@intlayer/types";
2
+ import * as _intlayer_types20 from "@intlayer/types";
3
3
  import { Dictionary } from "@intlayer/types";
4
4
 
5
5
  //#region src/buildIntlayerDictionary/writeMergedDictionary.d.ts
@@ -24,7 +24,7 @@ type MergedDictionaryOutput = Record<string, MergedDictionaryResult>;
24
24
  * // { key: 'home', content: { ... } },
25
25
  * ```
26
26
  */
27
- declare const writeMergedDictionaries: (groupedDictionaries: UnmergedDictionaryOutput, configuration?: _intlayer_types16.IntlayerConfig) => Promise<MergedDictionaryOutput>;
27
+ declare const writeMergedDictionaries: (groupedDictionaries: UnmergedDictionaryOutput, configuration?: _intlayer_types20.IntlayerConfig) => Promise<MergedDictionaryOutput>;
28
28
  //#endregion
29
29
  export { MergedDictionaryOutput, MergedDictionaryResult, writeMergedDictionaries };
30
30
  //# sourceMappingURL=writeMergedDictionary.d.ts.map
@@ -1,4 +1,4 @@
1
- import * as _intlayer_types22 from "@intlayer/types";
1
+ import * as _intlayer_types0 from "@intlayer/types";
2
2
  import { Dictionary } from "@intlayer/types";
3
3
 
4
4
  //#region src/buildIntlayerDictionary/writeRemoteDictionary.d.ts
@@ -23,7 +23,7 @@ type RemoteDictionaryOutput = Record<string, RemoteDictionaryResult>;
23
23
  * // { key: 'home', content: { ... } },
24
24
  * ```
25
25
  */
26
- declare const writeRemoteDictionary: (remoteDictionaries: Dictionary[], configuration?: _intlayer_types22.IntlayerConfig) => Promise<RemoteDictionaryOutput>;
26
+ declare const writeRemoteDictionary: (remoteDictionaries: Dictionary[], configuration?: _intlayer_types0.IntlayerConfig) => Promise<RemoteDictionaryOutput>;
27
27
  //#endregion
28
28
  export { RemoteDictionaryOutput, RemoteDictionaryResult, writeRemoteDictionary };
29
29
  //# sourceMappingURL=writeRemoteDictionary.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"writeRemoteDictionary.d.ts","names":[],"sources":["../../../src/buildIntlayerDictionary/writeRemoteDictionary.ts"],"sourcesContent":[],"mappings":";;;;KAcY,sBAAA;;gBAEI;AAFhB,CAAA;AAKY,KAAA,sBAAA,GAAyB,MAAe,CAAA,MAAA,EAAA,sBAAT,CAAA;AAkB3C;;;;;;;;;;;;;;;;cAAa,4CACS,8BAAU,iBAAA,CAC9B,mBACC,QAAQ"}
1
+ {"version":3,"file":"writeRemoteDictionary.d.ts","names":[],"sources":["../../../src/buildIntlayerDictionary/writeRemoteDictionary.ts"],"sourcesContent":[],"mappings":";;;;KAcY,sBAAA;;gBAEI;AAFhB,CAAA;AAKY,KAAA,sBAAA,GAAyB,MAAe,CAAA,MAAA,EAAA,sBAAT,CAAA;AAkB3C;;;;;;;;;;;;;;;;cAAa,4CACS,8BAAU,gBAAA,CAC9B,mBACC,QAAQ"}
@@ -0,0 +1,7 @@
1
+ import { IntlayerConfig } from "@intlayer/types";
2
+
3
+ //#region src/cleanRemovedContentDeclaration.d.ts
4
+ declare const cleanRemovedContentDeclaration: (filePath: string, key: string, configuration: IntlayerConfig) => Promise<string[]>;
5
+ //#endregion
6
+ export { cleanRemovedContentDeclaration };
7
+ //# sourceMappingURL=cleanRemovedContentDeclaration.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cleanRemovedContentDeclaration.d.ts","names":[],"sources":["../../src/cleanRemovedContentDeclaration.ts"],"sourcesContent":[],"mappings":";;;cAUa,+EAGI,mBACd"}
@@ -1,10 +1,10 @@
1
- import * as _intlayer_types17 from "@intlayer/types";
1
+ import * as _intlayer_types19 from "@intlayer/types";
2
2
 
3
3
  //#region src/createDictionaryEntryPoint/createDictionaryEntryPoint.d.ts
4
4
  /**
5
5
  * This function generates a list of dictionaries in the main directory
6
6
  */
7
- declare const createDictionaryEntryPoint: (configuration?: _intlayer_types17.IntlayerConfig, formats?: ("cjs" | "esm")[]) => Promise<void>;
7
+ declare const createDictionaryEntryPoint: (configuration?: _intlayer_types19.IntlayerConfig, formats?: ("cjs" | "esm")[]) => Promise<void>;
8
8
  //#endregion
9
9
  export { createDictionaryEntryPoint };
10
10
  //# sourceMappingURL=createDictionaryEntryPoint.d.ts.map
@@ -1,10 +1,10 @@
1
- import * as _intlayer_types20 from "@intlayer/types";
1
+ import * as _intlayer_types18 from "@intlayer/types";
2
2
 
3
3
  //#region src/createDictionaryEntryPoint/generateDictionaryListContent.d.ts
4
4
  /**
5
5
  * This function generates the content of the dictionary list file
6
6
  */
7
- declare const generateDictionaryListContent: (dictionaries: string[], functionName: string, importType: "json" | "javascript", format?: "cjs" | "esm", configuration?: _intlayer_types20.IntlayerConfig) => string;
7
+ declare const generateDictionaryListContent: (dictionaries: string[], functionName: string, importType: "json" | "javascript", format?: "cjs" | "esm", configuration?: _intlayer_types18.IntlayerConfig) => string;
8
8
  //#endregion
9
9
  export { generateDictionaryListContent };
10
10
  //# sourceMappingURL=generateDictionaryListContent.d.ts.map
@@ -1,4 +1,4 @@
1
- import * as _intlayer_types0 from "@intlayer/types";
1
+ import * as _intlayer_types4 from "@intlayer/types";
2
2
  import { Dictionary } from "@intlayer/types";
3
3
  import * as _intlayer_core_messageFormat0 from "@intlayer/core/messageFormat";
4
4
 
@@ -9,45 +9,45 @@ declare const formatDictionaryOutput: (dictionary: Dictionary) => Dictionary | {
9
9
  format: string;
10
10
  content: _intlayer_core_messageFormat0.JsonValue;
11
11
  $schema?: string;
12
- id?: _intlayer_types0.DictionaryId;
12
+ id?: _intlayer_types4.DictionaryId;
13
13
  projectIds?: string[];
14
- localId?: _intlayer_types0.LocalDictionaryId;
15
- localIds?: _intlayer_types0.LocalDictionaryId[];
16
- key: _intlayer_types0.DictionaryKey;
14
+ localId?: _intlayer_types4.LocalDictionaryId;
15
+ localIds?: _intlayer_types4.LocalDictionaryId[];
16
+ key: _intlayer_types4.DictionaryKey;
17
17
  title?: string;
18
18
  description?: string;
19
19
  versions?: string[];
20
20
  version?: string;
21
21
  filePath?: string;
22
22
  tags?: string[];
23
- locale?: _intlayer_types0.LocalesValues;
24
- fill?: _intlayer_types0.Fill;
23
+ locale?: _intlayer_types4.LocalesValues;
24
+ fill?: _intlayer_types4.Fill;
25
25
  filled?: true;
26
26
  priority?: number;
27
27
  live?: boolean;
28
- location?: _intlayer_types0.DictionaryLocation;
28
+ location?: _intlayer_types4.DictionaryLocation;
29
29
  };
30
30
  declare const formatDictionariesOutput: (dictionaries: Dictionary[]) => (Dictionary | {
31
31
  format: string;
32
32
  content: _intlayer_core_messageFormat0.JsonValue;
33
33
  $schema?: string;
34
- id?: _intlayer_types0.DictionaryId;
34
+ id?: _intlayer_types4.DictionaryId;
35
35
  projectIds?: string[];
36
- localId?: _intlayer_types0.LocalDictionaryId;
37
- localIds?: _intlayer_types0.LocalDictionaryId[];
38
- key: _intlayer_types0.DictionaryKey;
36
+ localId?: _intlayer_types4.LocalDictionaryId;
37
+ localIds?: _intlayer_types4.LocalDictionaryId[];
38
+ key: _intlayer_types4.DictionaryKey;
39
39
  title?: string;
40
40
  description?: string;
41
41
  versions?: string[];
42
42
  version?: string;
43
43
  filePath?: string;
44
44
  tags?: string[];
45
- locale?: _intlayer_types0.LocalesValues;
46
- fill?: _intlayer_types0.Fill;
45
+ locale?: _intlayer_types4.LocalesValues;
46
+ fill?: _intlayer_types4.Fill;
47
47
  filled?: true;
48
48
  priority?: number;
49
49
  live?: boolean;
50
- location?: _intlayer_types0.DictionaryLocation;
50
+ location?: _intlayer_types4.DictionaryLocation;
51
51
  })[];
52
52
  //#endregion
53
53
  export { formatDictionaries, formatDictionariesOutput, formatDictionary, formatDictionaryOutput };
@@ -1 +1 @@
1
- {"version":3,"file":"handleContentDeclarationFileChange.d.ts","names":[],"sources":["../../src/handleContentDeclarationFileChange.ts"],"sourcesContent":[],"mappings":";;;cAUa,+DAEH,mBAAc"}
1
+ {"version":3,"file":"handleContentDeclarationFileChange.d.ts","names":[],"sources":["../../src/handleContentDeclarationFileChange.ts"],"sourcesContent":[],"mappings":";;;cAWa,+DAEH,mBAAc"}
@@ -1 +1 @@
1
- {"version":3,"file":"handleUnlinkedContentDeclarationFile.d.ts","names":[],"sources":["../../src/handleUnlinkedContentDeclarationFile.ts"],"sourcesContent":[],"mappings":";;;cAUa,iEAEH,mBAAc"}
1
+ {"version":3,"file":"handleUnlinkedContentDeclarationFile.d.ts","names":[],"sources":["../../src/handleUnlinkedContentDeclarationFile.ts"],"sourcesContent":[],"mappings":";;;cAWa,iEAEH,mBAAc"}
@@ -1,11 +1,11 @@
1
1
  import { DictionariesStatus } from "./loadDictionaries.js";
2
- import * as _intlayer_types21 from "@intlayer/types";
2
+ import * as _intlayer_types3 from "@intlayer/types";
3
3
  import { Dictionary } from "@intlayer/types";
4
4
  import { DictionaryAPI } from "@intlayer/backend";
5
5
 
6
6
  //#region src/loadDictionaries/loadRemoteDictionaries.d.ts
7
7
  declare const formatDistantDictionaries: (dictionaries: (DictionaryAPI | Dictionary)[]) => Dictionary[];
8
- declare const loadRemoteDictionaries: (configuration?: _intlayer_types21.IntlayerConfig, onStatusUpdate?: (status: DictionariesStatus[]) => void, options?: {
8
+ declare const loadRemoteDictionaries: (configuration?: _intlayer_types3.IntlayerConfig, onStatusUpdate?: (status: DictionariesStatus[]) => void, options?: {
9
9
  onStartRemoteCheck?: () => void;
10
10
  onStopRemoteCheck?: () => void;
11
11
  onError?: (error: Error) => void;
@@ -1 +1 @@
1
- {"version":3,"file":"loadRemoteDictionaries.d.ts","names":[],"sources":["../../../src/loadDictionaries/loadRemoteDictionaries.ts"],"sourcesContent":[],"mappings":";;;;;;cAUa,2CACI,gBAAgB,kBAC9B;cAOU,yCAsIZ,iBAAA,CArIC,0CAC0B,sCAVK;;EADpB,iBAAA,CAAA,EAAA,GAAA,GAAA,IAOR;EANY,OAAA,CAAA,EAAA,CAAA,KAAA,EAcK,KAdL,EAAA,GAAA,IAAA;CAAgB,EAAA,GAgB9B,OAhB8B,CAgBtB,UAhBsB,EAAA,CAAA"}
1
+ {"version":3,"file":"loadRemoteDictionaries.d.ts","names":[],"sources":["../../../src/loadDictionaries/loadRemoteDictionaries.ts"],"sourcesContent":[],"mappings":";;;;;;cAUa,2CACI,gBAAgB,kBAC9B;cAOU,yCAsIZ,gBAAA,CArIC,0CAC0B,sCAVK;;EADpB,iBAAA,CAAA,EAAA,GAAA,GAAA,IAOR;EANY,OAAA,CAAA,EAAA,CAAA,KAAA,EAcK,KAdL,EAAA,GAAA,IAAA;CAAgB,EAAA,GAgB9B,OAhB8B,CAgBtB,UAhBsB,EAAA,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"getFormatFromExtension.d.ts","names":[],"sources":["../../../src/utils/getFormatFromExtension.ts"],"sourcesContent":[],"mappings":";KAAY,MAAA;AAAA,KACA,SAAA,GADM,KAAA,GAAA,MAAA,GAAA,KAAA,GAAA,MAAA,GAAA,MAAA,GAAA,OAAA,GAAA,MAAA,GAAA,OAAA,GAAA,OAAA,GAAA,QAAA;AACN,cAYC,sBAZQ,EAAA,CAAA,SAAA,EAY6B,SAZ7B,EAAA,GAYyC,MAZzC;AAYR,cAkBA,sBAlBqC,EAAA,CAAA,MAAY,EAkBf,MAF9C,EAAA,GAEuD,SAFvD"}
1
+ {"version":3,"file":"getFormatFromExtension.d.ts","names":[],"sources":["../../../src/utils/getFormatFromExtension.ts"],"sourcesContent":[],"mappings":";KAAY,MAAA;AAAA,KACA,SAAA,GADM,KAAA,GAAA,MAAA,GAAA,KAAA,GAAA,MAAA,GAAA,MAAA,GAAA,OAAA,GAAA,MAAA,GAAA,OAAA,GAAA,OAAA,GAAA,QAAA;AACN,cAYC,sBAZQ,EAAA,CAAA,SAAA,EAY6B,SAZ7B,EAAA,GAYyC,MAZzC;AAYR,cAkBA,sBAlBqC,EAAA,CAAA,MAAA,EAkBH,MAF9C,EAAA,GAEuD,SAFvD"}
@@ -1 +1 @@
1
- {"version":3,"file":"watcher.d.ts","names":[],"sources":["../../src/watcher.ts"],"sourcesContent":[],"mappings":";;;;;;KAgBK,YAAA,GAAe;kBACF;EADb,aAAA,CAAA,EAEa,uBAFD;EAAG,WAAA,CAAA,EAAA,OAAA;CACF;AACA,cAKL,KALK,EAAA,CAAA,OAAA,CAAA,EAKc,YALd,EAAA,GAK0B,SAAA,CAAA,SAL1B;AAAuB,cAiE5B,qBAjE4B,EAAA,CAAA,OAAA,CAAA,EAiEa,YAjEb,EAAA,GAiEyB,OAjEzB,CAAA,IAAA,CAAA"}
1
+ {"version":3,"file":"watcher.d.ts","names":[],"sources":["../../src/watcher.ts"],"sourcesContent":[],"mappings":";;;;;;KAkBK,YAAA,GAAe;kBACF;EADb,aAAA,CAAA,EAEa,uBAFD;EAAG,WAAA,CAAA,EAAA,OAAA;CACF;AACA,cAKL,KALK,EAAA,CAAA,OAAA,CAAA,EAKc,YALd,EAAA,GAK0B,SAAA,CAAA,SAL1B;AAAuB,cA0F5B,qBA1F4B,EAAA,CAAA,OAAA,CAAA,EA0Fa,YA1Fb,EAAA,GA0FyB,OA1FzB,CAAA,IAAA,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@intlayer/chokidar",
3
- "version": "7.5.1",
3
+ "version": "7.5.2-canary.0",
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": [
@@ -75,13 +75,13 @@
75
75
  "typecheck": "tsc --noEmit --project tsconfig.types.json"
76
76
  },
77
77
  "dependencies": {
78
- "@intlayer/api": "7.5.1",
79
- "@intlayer/config": "7.5.1",
80
- "@intlayer/core": "7.5.1",
81
- "@intlayer/dictionaries-entry": "7.5.1",
82
- "@intlayer/remote-dictionaries-entry": "7.5.1",
83
- "@intlayer/types": "7.5.1",
84
- "@intlayer/unmerged-dictionaries-entry": "7.5.1",
78
+ "@intlayer/api": "7.5.2-canary.0",
79
+ "@intlayer/config": "7.5.2-canary.0",
80
+ "@intlayer/core": "7.5.2-canary.0",
81
+ "@intlayer/dictionaries-entry": "7.5.2-canary.0",
82
+ "@intlayer/remote-dictionaries-entry": "7.5.2-canary.0",
83
+ "@intlayer/types": "7.5.2-canary.0",
84
+ "@intlayer/unmerged-dictionaries-entry": "7.5.2-canary.0",
85
85
  "chokidar": "3.6.0",
86
86
  "crypto-js": "4.2.0",
87
87
  "defu": "6.1.4",
@@ -101,8 +101,8 @@
101
101
  "vitest": "4.0.16"
102
102
  },
103
103
  "peerDependencies": {
104
- "@intlayer/svelte-transformer": "7.5.1",
105
- "@intlayer/vue-transformer": "7.5.1"
104
+ "@intlayer/svelte-transformer": "7.5.2-canary.0",
105
+ "@intlayer/vue-transformer": "7.5.2-canary.0"
106
106
  },
107
107
  "peerDependenciesMeta": {
108
108
  "@intlayer/svelte-transformer": {