intlayer-editor 9.5.3 → 9.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.
Files changed (144) hide show
  1. package/client/dist/assets/{CodeBlockShiki-D7zTJXzX.js → CodeBlockShiki-DZWJNoDB.js} +2 -2
  2. package/client/dist/assets/MarkDownRender-DX6LxYNy.js +1 -0
  3. package/client/dist/assets/{MarkDownRender-13fWMurT.js → MarkDownRender-DfDAGi54.js} +9 -9
  4. package/client/dist/assets/{MarkdownEditor-DeEk15uV.js → MarkdownEditor-phFFpt9U.js} +5 -5
  5. package/client/dist/assets/dynamic-B58ESQZ7.js +41 -0
  6. package/client/dist/assets/index-BTUTm4rD.js +59 -0
  7. package/client/dist/assets/{shikiBundle-CnnFdFOD.js → shikiBundle-CilRy02_.js} +1 -1
  8. package/client/dist/index.html +2 -2
  9. package/package.json +17 -16
  10. package/server/dist/controllers/dictionary.controller.cjs +3 -3
  11. package/server/dist/controllers/dictionary.controller.cjs.map +1 -1
  12. package/server/dist/controllers/dictionary.controller.d.ts +1 -1
  13. package/server/dist/controllers/dictionary.controller.mjs +2 -2
  14. package/server/dist/controllers/dictionary.controller.mjs.map +1 -1
  15. package/server/dist/index.cjs +3 -3
  16. package/server/dist/index.mjs +3 -3
  17. package/client/dist/assets/MarkDownRender-D3kXJ_Ol.js +0 -1
  18. package/client/dist/assets/dynamic-D0kyHp6d.js +0 -41
  19. package/client/dist/assets/index-Dl8Djuia.js +0 -113
  20. package/server/dist/@intlayer/chokidar/dist/types/build.d.ts +0 -1
  21. package/server/dist/@intlayer/chokidar/dist/types/buildIntlayerDictionary/buildIntlayerDictionary.d.ts +0 -2
  22. package/server/dist/@intlayer/chokidar/dist/types/buildIntlayerDictionary/processContentDeclaration.d.ts +0 -2
  23. package/server/dist/@intlayer/chokidar/dist/types/buildIntlayerDictionary/writeDynamicDictionary.d.ts +0 -2
  24. package/server/dist/@intlayer/chokidar/dist/types/buildIntlayerDictionary/writeMergedDictionary.d.ts +0 -2
  25. package/server/dist/@intlayer/chokidar/dist/types/buildIntlayerDictionary/writeUnmergedDictionary.d.ts +0 -2
  26. package/server/dist/@intlayer/chokidar/dist/types/cleanOutputDir.d.ts +0 -1
  27. package/server/dist/@intlayer/chokidar/dist/types/createDictionaryEntryPoint/createDictionaryEntryPoint.d.ts +0 -1
  28. package/server/dist/@intlayer/chokidar/dist/types/createDictionaryEntryPoint/generateDictionaryListContent.d.ts +0 -1
  29. package/server/dist/@intlayer/chokidar/dist/types/createDictionaryEntryPoint/getBuiltDictionariesPath.d.ts +0 -1
  30. package/server/dist/@intlayer/chokidar/dist/types/createDictionaryEntryPoint/getBuiltDynamicDictionariesPath.d.ts +0 -1
  31. package/server/dist/@intlayer/chokidar/dist/types/createDictionaryEntryPoint/getBuiltFetchDictionariesPath.d.ts +0 -1
  32. package/server/dist/@intlayer/chokidar/dist/types/createDictionaryEntryPoint/getBuiltRemoteDictionariesPath.d.ts +0 -1
  33. package/server/dist/@intlayer/chokidar/dist/types/createDictionaryEntryPoint/getBuiltUnmergedDictionariesPath.d.ts +0 -1
  34. package/server/dist/@intlayer/chokidar/dist/types/createType/createModuleAugmentation.d.ts +0 -1
  35. package/server/dist/@intlayer/chokidar/dist/types/createType/createType.d.ts +0 -2
  36. package/server/dist/@intlayer/chokidar/dist/types/formatDictionary.d.ts +0 -1
  37. package/server/dist/@intlayer/chokidar/dist/types/intlayer/dist/types/index.d.ts +0 -1
  38. package/server/dist/@intlayer/chokidar/dist/types/loadDictionaries/loadContentDeclaration.d.ts +0 -2
  39. package/server/dist/@intlayer/chokidar/dist/types/loadDictionaries/loadDictionaries.d.ts +0 -2
  40. package/server/dist/@intlayer/chokidar/dist/types/loadDictionaries/loadLocalDictionaries.d.ts +0 -2
  41. package/server/dist/@intlayer/chokidar/dist/types/loadDictionaries/loadRemoteDictionaries.d.ts +0 -1
  42. package/server/dist/@intlayer/chokidar/dist/types/prepareIntlayer.d.ts +0 -1
  43. package/server/dist/@intlayer/chokidar/dist/types/writeConfiguration/index.d.ts +0 -1
  44. package/server/dist/@intlayer/chokidar/dist/types/writeContentDeclaration/dictionaryStatus.d.ts +0 -6
  45. package/server/dist/@intlayer/chokidar/dist/types/writeContentDeclaration/transformJSFile.d.ts +0 -1
  46. package/server/dist/@intlayer/chokidar/dist/types/writeContentDeclaration/writeContentDeclaration.d.ts +0 -2
  47. package/server/dist/@intlayer/chokidar/dist/types/writeContentDeclaration/writeJSFile.d.ts +0 -2
  48. package/server/dist/@intlayer/core/dist/types/messageFormat/ICU.d.ts +0 -1
  49. package/server/dist/@intlayer/core/dist/types/messageFormat/i18next.d.ts +0 -1
  50. package/server/dist/@intlayer/core/dist/types/messageFormat/index.d.ts +0 -1
  51. package/server/dist/@intlayer/core/dist/types/messageFormat/po.d.ts +0 -1
  52. package/server/dist/@intlayer/core/dist/types/messageFormat/vue-i18n.d.ts +0 -1
  53. package/server/dist/packages/@intlayer/chokidar/dist/esm/detectFormatCommand.cjs +0 -32
  54. package/server/dist/packages/@intlayer/chokidar/dist/esm/detectFormatCommand.cjs.map +0 -1
  55. package/server/dist/packages/@intlayer/chokidar/dist/esm/detectFormatCommand.mjs +0 -31
  56. package/server/dist/packages/@intlayer/chokidar/dist/esm/detectFormatCommand.mjs.map +0 -1
  57. package/server/dist/packages/@intlayer/chokidar/dist/esm/getContentDeclarationFileTemplate/getContentDeclarationFileTemplate.cjs +0 -82
  58. package/server/dist/packages/@intlayer/chokidar/dist/esm/getContentDeclarationFileTemplate/getContentDeclarationFileTemplate.cjs.map +0 -1
  59. package/server/dist/packages/@intlayer/chokidar/dist/esm/getContentDeclarationFileTemplate/getContentDeclarationFileTemplate.mjs +0 -81
  60. package/server/dist/packages/@intlayer/chokidar/dist/esm/getContentDeclarationFileTemplate/getContentDeclarationFileTemplate.mjs.map +0 -1
  61. package/server/dist/packages/@intlayer/chokidar/dist/esm/utils/getFormatFromExtension.cjs +0 -26
  62. package/server/dist/packages/@intlayer/chokidar/dist/esm/utils/getFormatFromExtension.cjs.map +0 -1
  63. package/server/dist/packages/@intlayer/chokidar/dist/esm/utils/getFormatFromExtension.mjs +0 -25
  64. package/server/dist/packages/@intlayer/chokidar/dist/esm/utils/getFormatFromExtension.mjs.map +0 -1
  65. package/server/dist/packages/@intlayer/chokidar/dist/esm/utils/readDictionariesFromDisk.cjs +0 -24
  66. package/server/dist/packages/@intlayer/chokidar/dist/esm/utils/readDictionariesFromDisk.cjs.map +0 -1
  67. package/server/dist/packages/@intlayer/chokidar/dist/esm/utils/readDictionariesFromDisk.mjs +0 -23
  68. package/server/dist/packages/@intlayer/chokidar/dist/esm/utils/readDictionariesFromDisk.mjs.map +0 -1
  69. package/server/dist/packages/@intlayer/chokidar/dist/esm/writeContentDeclaration/processContentDeclarationContent.cjs +0 -94
  70. package/server/dist/packages/@intlayer/chokidar/dist/esm/writeContentDeclaration/processContentDeclarationContent.cjs.map +0 -1
  71. package/server/dist/packages/@intlayer/chokidar/dist/esm/writeContentDeclaration/processContentDeclarationContent.mjs +0 -92
  72. package/server/dist/packages/@intlayer/chokidar/dist/esm/writeContentDeclaration/processContentDeclarationContent.mjs.map +0 -1
  73. package/server/dist/packages/@intlayer/chokidar/dist/esm/writeContentDeclaration/transformJSFile.cjs +0 -416
  74. package/server/dist/packages/@intlayer/chokidar/dist/esm/writeContentDeclaration/transformJSFile.cjs.map +0 -1
  75. package/server/dist/packages/@intlayer/chokidar/dist/esm/writeContentDeclaration/transformJSFile.mjs +0 -412
  76. package/server/dist/packages/@intlayer/chokidar/dist/esm/writeContentDeclaration/transformJSFile.mjs.map +0 -1
  77. package/server/dist/packages/@intlayer/chokidar/dist/esm/writeContentDeclaration/transformJSONFile.cjs +0 -127
  78. package/server/dist/packages/@intlayer/chokidar/dist/esm/writeContentDeclaration/transformJSONFile.cjs.map +0 -1
  79. package/server/dist/packages/@intlayer/chokidar/dist/esm/writeContentDeclaration/transformJSONFile.mjs +0 -125
  80. package/server/dist/packages/@intlayer/chokidar/dist/esm/writeContentDeclaration/transformJSONFile.mjs.map +0 -1
  81. package/server/dist/packages/@intlayer/chokidar/dist/esm/writeContentDeclaration/writeContentDeclaration.cjs +0 -164
  82. package/server/dist/packages/@intlayer/chokidar/dist/esm/writeContentDeclaration/writeContentDeclaration.cjs.map +0 -1
  83. package/server/dist/packages/@intlayer/chokidar/dist/esm/writeContentDeclaration/writeContentDeclaration.mjs +0 -163
  84. package/server/dist/packages/@intlayer/chokidar/dist/esm/writeContentDeclaration/writeContentDeclaration.mjs.map +0 -1
  85. package/server/dist/packages/@intlayer/chokidar/dist/esm/writeContentDeclaration/writeJSFile.cjs +0 -92
  86. package/server/dist/packages/@intlayer/chokidar/dist/esm/writeContentDeclaration/writeJSFile.cjs.map +0 -1
  87. package/server/dist/packages/@intlayer/chokidar/dist/esm/writeContentDeclaration/writeJSFile.mjs +0 -91
  88. package/server/dist/packages/@intlayer/chokidar/dist/esm/writeContentDeclaration/writeJSFile.mjs.map +0 -1
  89. package/server/dist/packages/@intlayer/chokidar/dist/esm/writeContentDeclaration/writeMarkdownFile.cjs +0 -65
  90. package/server/dist/packages/@intlayer/chokidar/dist/esm/writeContentDeclaration/writeMarkdownFile.cjs.map +0 -1
  91. package/server/dist/packages/@intlayer/chokidar/dist/esm/writeContentDeclaration/writeMarkdownFile.mjs +0 -64
  92. package/server/dist/packages/@intlayer/chokidar/dist/esm/writeContentDeclaration/writeMarkdownFile.mjs.map +0 -1
  93. package/server/dist/packages/@intlayer/chokidar/dist/esm/writeContentDeclaration/writeYamlFile.cjs +0 -43
  94. package/server/dist/packages/@intlayer/chokidar/dist/esm/writeContentDeclaration/writeYamlFile.cjs.map +0 -1
  95. package/server/dist/packages/@intlayer/chokidar/dist/esm/writeContentDeclaration/writeYamlFile.mjs +0 -42
  96. package/server/dist/packages/@intlayer/chokidar/dist/esm/writeContentDeclaration/writeYamlFile.mjs.map +0 -1
  97. package/server/dist/packages/@intlayer/core/dist/esm/deepTransformPlugins/getFilteredLocalesContent.cjs +0 -45
  98. package/server/dist/packages/@intlayer/core/dist/esm/deepTransformPlugins/getFilteredLocalesContent.cjs.map +0 -1
  99. package/server/dist/packages/@intlayer/core/dist/esm/deepTransformPlugins/getFilteredLocalesContent.mjs +0 -43
  100. package/server/dist/packages/@intlayer/core/dist/esm/deepTransformPlugins/getFilteredLocalesContent.mjs.map +0 -1
  101. package/server/dist/packages/@intlayer/core/dist/esm/deepTransformPlugins/getLocalizedContent.cjs +0 -32
  102. package/server/dist/packages/@intlayer/core/dist/esm/deepTransformPlugins/getLocalizedContent.cjs.map +0 -1
  103. package/server/dist/packages/@intlayer/core/dist/esm/deepTransformPlugins/getLocalizedContent.mjs +0 -32
  104. package/server/dist/packages/@intlayer/core/dist/esm/deepTransformPlugins/getLocalizedContent.mjs.map +0 -1
  105. package/server/dist/packages/@intlayer/core/dist/esm/dictionaryManipulator/getNodeType.cjs +0 -56
  106. package/server/dist/packages/@intlayer/core/dist/esm/dictionaryManipulator/getNodeType.cjs.map +0 -1
  107. package/server/dist/packages/@intlayer/core/dist/esm/dictionaryManipulator/getNodeType.mjs +0 -54
  108. package/server/dist/packages/@intlayer/core/dist/esm/dictionaryManipulator/getNodeType.mjs.map +0 -1
  109. package/server/dist/packages/@intlayer/core/dist/esm/interpreter/getCondition.cjs +0 -27
  110. package/server/dist/packages/@intlayer/core/dist/esm/interpreter/getCondition.cjs.map +0 -1
  111. package/server/dist/packages/@intlayer/core/dist/esm/interpreter/getCondition.mjs +0 -26
  112. package/server/dist/packages/@intlayer/core/dist/esm/interpreter/getCondition.mjs.map +0 -1
  113. package/server/dist/packages/@intlayer/core/dist/esm/interpreter/getContent/deepTransform.cjs +0 -58
  114. package/server/dist/packages/@intlayer/core/dist/esm/interpreter/getContent/deepTransform.cjs.map +0 -1
  115. package/server/dist/packages/@intlayer/core/dist/esm/interpreter/getContent/deepTransform.mjs +0 -56
  116. package/server/dist/packages/@intlayer/core/dist/esm/interpreter/getContent/deepTransform.mjs.map +0 -1
  117. package/server/dist/packages/@intlayer/core/dist/esm/interpreter/getContent/plugins.cjs +0 -160
  118. package/server/dist/packages/@intlayer/core/dist/esm/interpreter/getContent/plugins.cjs.map +0 -1
  119. package/server/dist/packages/@intlayer/core/dist/esm/interpreter/getContent/plugins.mjs +0 -158
  120. package/server/dist/packages/@intlayer/core/dist/esm/interpreter/getContent/plugins.mjs.map +0 -1
  121. package/server/dist/packages/@intlayer/core/dist/esm/interpreter/getEnumeration.cjs +0 -71
  122. package/server/dist/packages/@intlayer/core/dist/esm/interpreter/getEnumeration.cjs.map +0 -1
  123. package/server/dist/packages/@intlayer/core/dist/esm/interpreter/getEnumeration.mjs +0 -70
  124. package/server/dist/packages/@intlayer/core/dist/esm/interpreter/getEnumeration.mjs.map +0 -1
  125. package/server/dist/packages/@intlayer/core/dist/esm/interpreter/getGender.cjs +0 -38
  126. package/server/dist/packages/@intlayer/core/dist/esm/interpreter/getGender.cjs.map +0 -1
  127. package/server/dist/packages/@intlayer/core/dist/esm/interpreter/getGender.mjs +0 -37
  128. package/server/dist/packages/@intlayer/core/dist/esm/interpreter/getGender.mjs.map +0 -1
  129. package/server/dist/packages/@intlayer/core/dist/esm/interpreter/getInsertion.cjs +0 -22
  130. package/server/dist/packages/@intlayer/core/dist/esm/interpreter/getInsertion.cjs.map +0 -1
  131. package/server/dist/packages/@intlayer/core/dist/esm/interpreter/getInsertion.mjs +0 -21
  132. package/server/dist/packages/@intlayer/core/dist/esm/interpreter/getInsertion.mjs.map +0 -1
  133. package/server/dist/packages/@intlayer/core/dist/esm/interpreter/getTranslation.cjs +0 -87
  134. package/server/dist/packages/@intlayer/core/dist/esm/interpreter/getTranslation.cjs.map +0 -1
  135. package/server/dist/packages/@intlayer/core/dist/esm/interpreter/getTranslation.mjs +0 -86
  136. package/server/dist/packages/@intlayer/core/dist/esm/interpreter/getTranslation.mjs.map +0 -1
  137. package/server/dist/packages/@intlayer/core/dist/esm/utils/isValidReactElement.cjs +0 -14
  138. package/server/dist/packages/@intlayer/core/dist/esm/utils/isValidReactElement.cjs.map +0 -1
  139. package/server/dist/packages/@intlayer/core/dist/esm/utils/isValidReactElement.mjs +0 -13
  140. package/server/dist/packages/@intlayer/core/dist/esm/utils/isValidReactElement.mjs.map +0 -1
  141. package/server/dist/packages/@intlayer/core/dist/esm/utils/stringifyYaml.cjs +0 -58
  142. package/server/dist/packages/@intlayer/core/dist/esm/utils/stringifyYaml.cjs.map +0 -1
  143. package/server/dist/packages/@intlayer/core/dist/esm/utils/stringifyYaml.mjs +0 -57
  144. package/server/dist/packages/@intlayer/core/dist/esm/utils/stringifyYaml.mjs.map +0 -1
@@ -1 +0,0 @@
1
- import { DictionaryStatus } from "./writeContentDeclaration/dictionaryStatus.js";
@@ -1,2 +0,0 @@
1
- import { IntlayerConfig } from "@intlayer/types/config";
2
- import { Dictionary } from "@intlayer/types/dictionary";
@@ -1,2 +0,0 @@
1
- import { IntlayerConfig } from "@intlayer/types/config";
2
- import { Dictionary } from "@intlayer/types/dictionary";
@@ -1,2 +0,0 @@
1
- import { IntlayerConfig } from "@intlayer/types/config";
2
- import { Dictionary } from "@intlayer/types/dictionary";
@@ -1,2 +0,0 @@
1
- import { IntlayerConfig } from "@intlayer/types/config";
2
- import { Dictionary } from "@intlayer/types/dictionary";
@@ -1,2 +0,0 @@
1
- import { IntlayerConfig } from "@intlayer/types/config";
2
- import { Dictionary } from "@intlayer/types/dictionary";
@@ -1 +0,0 @@
1
- import { IntlayerConfig } from "@intlayer/types/config";
@@ -1 +0,0 @@
1
- import { IntlayerConfig } from "@intlayer/types/config";
@@ -1 +0,0 @@
1
- import { IntlayerConfig } from "@intlayer/types/config";
@@ -1 +0,0 @@
1
- import { IntlayerConfig } from "@intlayer/types/config";
@@ -1 +0,0 @@
1
- import { IntlayerConfig } from "@intlayer/types/config";
@@ -1 +0,0 @@
1
- import { IntlayerConfig } from "@intlayer/types/config";
@@ -1 +0,0 @@
1
- import { IntlayerConfig } from "@intlayer/types/config";
@@ -1,2 +0,0 @@
1
- import { IntlayerConfig } from "@intlayer/types/config";
2
- import { Dictionary } from "@intlayer/types/dictionary";
@@ -1 +0,0 @@
1
- import { Dictionary } from "@intlayer/types/dictionary";
@@ -1,2 +0,0 @@
1
- import { IntlayerConfig } from "@intlayer/types/config";
2
- import { Dictionary } from "@intlayer/types/dictionary";
@@ -1,2 +0,0 @@
1
- import { IntlayerConfig } from "@intlayer/types/config";
2
- import { Dictionary } from "@intlayer/types/dictionary";
@@ -1,2 +0,0 @@
1
- import { IntlayerConfig } from "@intlayer/types/config";
2
- import { Dictionary } from "@intlayer/types/dictionary";
@@ -1 +0,0 @@
1
- import { Dictionary } from "@intlayer/types/dictionary";
@@ -1 +0,0 @@
1
- import { IntlayerConfig } from "@intlayer/types/config";
@@ -1 +0,0 @@
1
- import { IntlayerConfig } from "@intlayer/types/config";
@@ -1,6 +0,0 @@
1
- //#region ../../@intlayer/chokidar/dist/types/writeContentDeclaration/dictionaryStatus.d.ts
2
- //#region src/writeContentDeclaration/dictionaryStatus.d.ts
3
- type DictionaryStatus = 'pending' | 'fetching' | 'up-to-date' | 'replaced' | 'updated' | 'fetched' | 'unknown' | 'error' | 'imported' | 'reimported in JSON' | 'new content file' | 'created'; //#endregion
4
- //#endregion
5
- export { DictionaryStatus };
6
- //# sourceMappingURL=dictionaryStatus.d.ts.map
@@ -1 +0,0 @@
1
- import { Dictionary } from "@intlayer/types/dictionary";
@@ -1,2 +0,0 @@
1
- import { IntlayerConfig } from "@intlayer/types/config";
2
- import { Dictionary } from "@intlayer/types/dictionary";
@@ -1,2 +0,0 @@
1
- import { IntlayerConfig } from "@intlayer/types/config";
2
- import { Dictionary } from "@intlayer/types/dictionary";
@@ -1 +0,0 @@
1
- import { Dictionary } from "@intlayer/types/dictionary";
@@ -1 +0,0 @@
1
- import { Dictionary } from "@intlayer/types/dictionary";
@@ -1 +0,0 @@
1
- import { Dictionary } from "@intlayer/types/dictionary";
@@ -1 +0,0 @@
1
- import { Dictionary } from "@intlayer/types/dictionary";
@@ -1,32 +0,0 @@
1
- const require_runtime = require('../../../../../_virtual/_rolldown/runtime.cjs');
2
- let _intlayer_config_utils = require("@intlayer/config/utils");
3
-
4
- //#region ../../@intlayer/chokidar/dist/esm/detectFormatCommand.mjs
5
- let cachedFormatCommand = null;
6
- const detectFormatCommand = (configuration, projectRequireProp) => {
7
- const { baseDir } = configuration.system;
8
- const { formatCommand } = configuration.content;
9
- const projectRequire = projectRequireProp ?? (0, _intlayer_config_utils.getProjectRequire)(baseDir);
10
- if (formatCommand) return formatCommand;
11
- if (cachedFormatCommand !== null) return cachedFormatCommand;
12
- try {
13
- projectRequire.resolve("prettier");
14
- cachedFormatCommand = "prettier --write \"{{file}}\" --log-level silent";
15
- return cachedFormatCommand;
16
- } catch (_error) {}
17
- try {
18
- projectRequire.resolve("biome");
19
- cachedFormatCommand = "biome format \"{{file}}\" --write --log-level none";
20
- return cachedFormatCommand;
21
- } catch (_error) {}
22
- try {
23
- projectRequire.resolve("eslint");
24
- cachedFormatCommand = "eslint --fix \"{{file}}\" --quiet || node -e \"process.exit(0)\"";
25
- return cachedFormatCommand;
26
- } catch (_error) {}
27
- cachedFormatCommand = void 0;
28
- };
29
-
30
- //#endregion
31
- exports.detectFormatCommand = detectFormatCommand;
32
- //# sourceMappingURL=detectFormatCommand.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"detectFormatCommand.cjs","names":[],"sources":["../../../../../../../../@intlayer/chokidar/dist/esm/detectFormatCommand.mjs"],"sourcesContent":["import { getProjectRequire } from \"@intlayer/config/utils\";\n\n//#region src/detectFormatCommand.ts\nlet cachedFormatCommand = null;\nconst detectFormatCommand = (configuration, projectRequireProp) => {\n\tconst { baseDir } = configuration.system;\n\tconst { formatCommand } = configuration.content;\n\tconst projectRequire = projectRequireProp ?? getProjectRequire(baseDir);\n\tif (formatCommand) return formatCommand;\n\tif (cachedFormatCommand !== null) return cachedFormatCommand;\n\ttry {\n\t\tprojectRequire.resolve(\"prettier\");\n\t\tcachedFormatCommand = \"prettier --write \\\"{{file}}\\\" --log-level silent\";\n\t\treturn cachedFormatCommand;\n\t} catch (_error) {}\n\ttry {\n\t\tprojectRequire.resolve(\"biome\");\n\t\tcachedFormatCommand = \"biome format \\\"{{file}}\\\" --write --log-level none\";\n\t\treturn cachedFormatCommand;\n\t} catch (_error) {}\n\ttry {\n\t\tprojectRequire.resolve(\"eslint\");\n\t\tcachedFormatCommand = \"eslint --fix \\\"{{file}}\\\" --quiet || node -e \\\"process.exit(0)\\\"\";\n\t\treturn cachedFormatCommand;\n\t} catch (_error) {}\n\tcachedFormatCommand = void 0;\n};\n\n//#endregion\nexport { detectFormatCommand };\n//# sourceMappingURL=detectFormatCommand.mjs.map"],"mappings":";;;;AAGA,IAAI,sBAAsB;AAC1B,MAAM,uBAAuB,eAAe,uBAAuB;CAClE,MAAM,EAAE,YAAY,cAAc;CAClC,MAAM,EAAE,kBAAkB,cAAc;CACxC,MAAM,iBAAiB,oEAAwC,QAAQ;AACvE,KAAI,cAAe,QAAO;AAC1B,KAAI,wBAAwB,KAAM,QAAO;AACzC,KAAI;AACH,iBAAe,QAAQ,WAAW;AAClC,wBAAsB;AACtB,SAAO;UACC,QAAQ;AACjB,KAAI;AACH,iBAAe,QAAQ,QAAQ;AAC/B,wBAAsB;AACtB,SAAO;UACC,QAAQ;AACjB,KAAI;AACH,iBAAe,QAAQ,SAAS;AAChC,wBAAsB;AACtB,SAAO;UACC,QAAQ;AACjB,uBAAsB,KAAK"}
@@ -1,31 +0,0 @@
1
- import { getProjectRequire } from "@intlayer/config/utils";
2
-
3
- //#region ../../@intlayer/chokidar/dist/esm/detectFormatCommand.mjs
4
- let cachedFormatCommand = null;
5
- const detectFormatCommand = (configuration, projectRequireProp) => {
6
- const { baseDir } = configuration.system;
7
- const { formatCommand } = configuration.content;
8
- const projectRequire = projectRequireProp ?? getProjectRequire(baseDir);
9
- if (formatCommand) return formatCommand;
10
- if (cachedFormatCommand !== null) return cachedFormatCommand;
11
- try {
12
- projectRequire.resolve("prettier");
13
- cachedFormatCommand = "prettier --write \"{{file}}\" --log-level silent";
14
- return cachedFormatCommand;
15
- } catch (_error) {}
16
- try {
17
- projectRequire.resolve("biome");
18
- cachedFormatCommand = "biome format \"{{file}}\" --write --log-level none";
19
- return cachedFormatCommand;
20
- } catch (_error) {}
21
- try {
22
- projectRequire.resolve("eslint");
23
- cachedFormatCommand = "eslint --fix \"{{file}}\" --quiet || node -e \"process.exit(0)\"";
24
- return cachedFormatCommand;
25
- } catch (_error) {}
26
- cachedFormatCommand = void 0;
27
- };
28
-
29
- //#endregion
30
- export { detectFormatCommand };
31
- //# sourceMappingURL=detectFormatCommand.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"detectFormatCommand.mjs","names":[],"sources":["../../../../../../../../@intlayer/chokidar/dist/esm/detectFormatCommand.mjs"],"sourcesContent":["import { getProjectRequire } from \"@intlayer/config/utils\";\n\n//#region src/detectFormatCommand.ts\nlet cachedFormatCommand = null;\nconst detectFormatCommand = (configuration, projectRequireProp) => {\n\tconst { baseDir } = configuration.system;\n\tconst { formatCommand } = configuration.content;\n\tconst projectRequire = projectRequireProp ?? getProjectRequire(baseDir);\n\tif (formatCommand) return formatCommand;\n\tif (cachedFormatCommand !== null) return cachedFormatCommand;\n\ttry {\n\t\tprojectRequire.resolve(\"prettier\");\n\t\tcachedFormatCommand = \"prettier --write \\\"{{file}}\\\" --log-level silent\";\n\t\treturn cachedFormatCommand;\n\t} catch (_error) {}\n\ttry {\n\t\tprojectRequire.resolve(\"biome\");\n\t\tcachedFormatCommand = \"biome format \\\"{{file}}\\\" --write --log-level none\";\n\t\treturn cachedFormatCommand;\n\t} catch (_error) {}\n\ttry {\n\t\tprojectRequire.resolve(\"eslint\");\n\t\tcachedFormatCommand = \"eslint --fix \\\"{{file}}\\\" --quiet || node -e \\\"process.exit(0)\\\"\";\n\t\treturn cachedFormatCommand;\n\t} catch (_error) {}\n\tcachedFormatCommand = void 0;\n};\n\n//#endregion\nexport { detectFormatCommand };\n//# sourceMappingURL=detectFormatCommand.mjs.map"],"mappings":";;;AAGA,IAAI,sBAAsB;AAC1B,MAAM,uBAAuB,eAAe,uBAAuB;CAClE,MAAM,EAAE,YAAY,cAAc;CAClC,MAAM,EAAE,kBAAkB,cAAc;CACxC,MAAM,iBAAiB,sBAAsB,kBAAkB,QAAQ;AACvE,KAAI,cAAe,QAAO;AAC1B,KAAI,wBAAwB,KAAM,QAAO;AACzC,KAAI;AACH,iBAAe,QAAQ,WAAW;AAClC,wBAAsB;AACtB,SAAO;UACC,QAAQ;AACjB,KAAI;AACH,iBAAe,QAAQ,QAAQ;AAC/B,wBAAsB;AACtB,SAAO;UACC,QAAQ;AACjB,KAAI;AACH,iBAAe,QAAQ,SAAS;AAChC,wBAAsB;AACtB,SAAO;UACC,QAAQ;AACjB,uBAAsB,KAAK"}
@@ -1,82 +0,0 @@
1
- const require_runtime = require('../../../../../../_virtual/_rolldown/runtime.cjs');
2
- let _intlayer_config_utils = require("@intlayer/config/utils");
3
-
4
- //#region ../../@intlayer/chokidar/dist/esm/getContentDeclarationFileTemplate/getContentDeclarationFileTemplate.mjs
5
- const getContentDeclarationFileTemplate = async (key, format, fileParams = {}, noMetadata) => {
6
- const camelCaseKey = (0, _intlayer_config_utils.kebabCaseToCamelCase)(key);
7
- const name = camelCaseKey.charAt(0).toLowerCase() + camelCaseKey.slice(1);
8
- const fileParamsString = Object.entries(fileParams).filter(([, value]) => value !== void 0).map(([paramKey, value]) => {
9
- return `\n ${/^[a-zA-Z_$][a-zA-Z0-9_$]*$/.test(paramKey) ? paramKey : JSON.stringify(paramKey)}: ${typeof value === "object" || typeof value === "string" ? JSON.stringify(value) : value},`;
10
- }).join("");
11
- let content;
12
- if (noMetadata) content = "{}";
13
- else if (format === "json" || format === "jsonc" || format === "json5") content = [
14
- "{",
15
- " \"$schema\": \"https://intlayer.org/schema.json\",",
16
- ` "key": "${key}",${fileParamsString}`,
17
- " \"content\": {",
18
- " }",
19
- "}"
20
- ].join("\n");
21
- else content = [
22
- "{",
23
- ` key: '${key}',${fileParamsString}`,
24
- " content: {",
25
- " },",
26
- "}"
27
- ].join("\n");
28
- const jsdoc = `/** @type {import('intlayer').Dictionary${noMetadata ? "['content']" : ""}} **/`;
29
- const satisfiesType = noMetadata ? "Dictionary['content']" : "Dictionary";
30
- switch (format) {
31
- case "yaml": return `${[
32
- `key: ${key}`,
33
- ...fileParams.locale ? [`locale: ${fileParams.locale}`] : [],
34
- ...fileParams.title ? [`title: ${JSON.stringify(fileParams.title)}`] : [],
35
- ...fileParams.description ? [`description: ${JSON.stringify(fileParams.description)}`] : [],
36
- ...fileParams.tags?.length ? ["tags:", ...fileParams.tags.map((tag) => ` - ${JSON.stringify(tag)}`)] : [],
37
- "content: {}"
38
- ].join("\n")}\n`;
39
- case "md": return [
40
- "---",
41
- ...[
42
- `key: ${key}`,
43
- ...fileParams.locale ? [`locale: ${fileParams.locale}`] : [],
44
- ...fileParams.title ? [`title: ${JSON.stringify(fileParams.title)}`] : [],
45
- ...fileParams.description ? [`description: ${JSON.stringify(fileParams.description)}`] : [],
46
- ...fileParams.tags?.length ? ["tags:", ...fileParams.tags.map((t) => ` - ${JSON.stringify(t)}`)] : []
47
- ],
48
- "---",
49
- "",
50
- ""
51
- ].join("\n");
52
- case "ts": return [
53
- "import { type Dictionary } from 'intlayer';",
54
- "",
55
- `const ${name}Content = ${content} satisfies ${satisfiesType};`,
56
- "",
57
- `export default ${name}Content;`,
58
- ""
59
- ].join("\n");
60
- case "cjs": return [
61
- jsdoc,
62
- `const ${name}Content = ${content};`,
63
- "",
64
- `module.exports = ${name}Content;`,
65
- ""
66
- ].join("\n");
67
- case "json":
68
- case "jsonc":
69
- case "json5": return [content, ""].join("\n");
70
- default: return [
71
- jsdoc,
72
- `const ${name}Content = ${content};`,
73
- "",
74
- `export default ${name}Content;`,
75
- ""
76
- ].join("\n");
77
- }
78
- };
79
-
80
- //#endregion
81
- exports.getContentDeclarationFileTemplate = getContentDeclarationFileTemplate;
82
- //# sourceMappingURL=getContentDeclarationFileTemplate.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"getContentDeclarationFileTemplate.cjs","names":[],"sources":["../../../../../../../../../@intlayer/chokidar/dist/esm/getContentDeclarationFileTemplate/getContentDeclarationFileTemplate.mjs"],"sourcesContent":["import { kebabCaseToCamelCase } from \"@intlayer/config/utils\";\n\n//#region src/getContentDeclarationFileTemplate/getContentDeclarationFileTemplate.ts\nconst getContentDeclarationFileTemplate = async (key, format, fileParams = {}, noMetadata) => {\n\tconst camelCaseKey = kebabCaseToCamelCase(key);\n\tconst name = camelCaseKey.charAt(0).toLowerCase() + camelCaseKey.slice(1);\n\tconst fileParamsString = Object.entries(fileParams).filter(([, value]) => value !== void 0).map(([paramKey, value]) => {\n\t\treturn `\\n ${/^[a-zA-Z_$][a-zA-Z0-9_$]*$/.test(paramKey) ? paramKey : JSON.stringify(paramKey)}: ${typeof value === \"object\" || typeof value === \"string\" ? JSON.stringify(value) : value},`;\n\t}).join(\"\");\n\tlet content;\n\tif (noMetadata) content = \"{}\";\n\telse if (format === \"json\" || format === \"jsonc\" || format === \"json5\") content = [\n\t\t\"{\",\n\t\t\" \\\"$schema\\\": \\\"https://intlayer.org/schema.json\\\",\",\n\t\t` \"key\": \"${key}\",${fileParamsString}`,\n\t\t\" \\\"content\\\": {\",\n\t\t\" }\",\n\t\t\"}\"\n\t].join(\"\\n\");\n\telse content = [\n\t\t\"{\",\n\t\t` key: '${key}',${fileParamsString}`,\n\t\t\" content: {\",\n\t\t\" },\",\n\t\t\"}\"\n\t].join(\"\\n\");\n\tconst jsdoc = `/** @type {import('intlayer').Dictionary${noMetadata ? \"['content']\" : \"\"}} **/`;\n\tconst satisfiesType = noMetadata ? \"Dictionary['content']\" : \"Dictionary\";\n\tswitch (format) {\n\t\tcase \"yaml\": return `${[\n\t\t\t`key: ${key}`,\n\t\t\t...fileParams.locale ? [`locale: ${fileParams.locale}`] : [],\n\t\t\t...fileParams.title ? [`title: ${JSON.stringify(fileParams.title)}`] : [],\n\t\t\t...fileParams.description ? [`description: ${JSON.stringify(fileParams.description)}`] : [],\n\t\t\t...fileParams.tags?.length ? [\"tags:\", ...fileParams.tags.map((tag) => ` - ${JSON.stringify(tag)}`)] : [],\n\t\t\t\"content: {}\"\n\t\t].join(\"\\n\")}\\n`;\n\t\tcase \"md\": return [\n\t\t\t\"---\",\n\t\t\t...[\n\t\t\t\t`key: ${key}`,\n\t\t\t\t...fileParams.locale ? [`locale: ${fileParams.locale}`] : [],\n\t\t\t\t...fileParams.title ? [`title: ${JSON.stringify(fileParams.title)}`] : [],\n\t\t\t\t...fileParams.description ? [`description: ${JSON.stringify(fileParams.description)}`] : [],\n\t\t\t\t...fileParams.tags?.length ? [\"tags:\", ...fileParams.tags.map((t) => ` - ${JSON.stringify(t)}`)] : []\n\t\t\t],\n\t\t\t\"---\",\n\t\t\t\"\",\n\t\t\t\"\"\n\t\t].join(\"\\n\");\n\t\tcase \"ts\": return [\n\t\t\t\"import { type Dictionary } from 'intlayer';\",\n\t\t\t\"\",\n\t\t\t`const ${name}Content = ${content} satisfies ${satisfiesType};`,\n\t\t\t\"\",\n\t\t\t`export default ${name}Content;`,\n\t\t\t\"\"\n\t\t].join(\"\\n\");\n\t\tcase \"cjs\": return [\n\t\t\tjsdoc,\n\t\t\t`const ${name}Content = ${content};`,\n\t\t\t\"\",\n\t\t\t`module.exports = ${name}Content;`,\n\t\t\t\"\"\n\t\t].join(\"\\n\");\n\t\tcase \"json\":\n\t\tcase \"jsonc\":\n\t\tcase \"json5\": return [content, \"\"].join(\"\\n\");\n\t\tdefault: return [\n\t\t\tjsdoc,\n\t\t\t`const ${name}Content = ${content};`,\n\t\t\t\"\",\n\t\t\t`export default ${name}Content;`,\n\t\t\t\"\"\n\t\t].join(\"\\n\");\n\t}\n};\n\n//#endregion\nexport { getContentDeclarationFileTemplate };\n//# sourceMappingURL=getContentDeclarationFileTemplate.mjs.map"],"mappings":";;;;AAGA,MAAM,oCAAoC,OAAO,KAAK,QAAQ,aAAa,EAAE,EAAE,eAAe;CAC7F,MAAM,gEAAoC,IAAI;CAC9C,MAAM,OAAO,aAAa,OAAO,EAAE,CAAC,aAAa,GAAG,aAAa,MAAM,EAAE;CACzE,MAAM,mBAAmB,OAAO,QAAQ,WAAW,CAAC,QAAQ,GAAG,WAAW,UAAU,KAAK,EAAE,CAAC,KAAK,CAAC,UAAU,WAAW;AACtH,SAAO,OAAO,6BAA6B,KAAK,SAAS,GAAG,WAAW,KAAK,UAAU,SAAS,CAAC,IAAI,OAAO,UAAU,YAAY,OAAO,UAAU,WAAW,KAAK,UAAU,MAAM,GAAG,MAAM;GAC1L,CAAC,KAAK,GAAG;CACX,IAAI;AACJ,KAAI,WAAY,WAAU;UACjB,WAAW,UAAU,WAAW,WAAW,WAAW,QAAS,WAAU;EACjF;EACA;EACA,aAAa,IAAI,IAAI;EACrB;EACA;EACA;EACA,CAAC,KAAK,KAAK;KACP,WAAU;EACd;EACA,WAAW,IAAI,IAAI;EACnB;EACA;EACA;EACA,CAAC,KAAK,KAAK;CACZ,MAAM,QAAQ,2CAA2C,aAAa,gBAAgB,GAAG;CACzF,MAAM,gBAAgB,aAAa,0BAA0B;AAC7D,SAAQ,QAAR;EACC,KAAK,OAAQ,QAAO,GAAG;GACtB,QAAQ;GACR,GAAG,WAAW,SAAS,CAAC,WAAW,WAAW,SAAS,GAAG,EAAE;GAC5D,GAAG,WAAW,QAAQ,CAAC,UAAU,KAAK,UAAU,WAAW,MAAM,GAAG,GAAG,EAAE;GACzE,GAAG,WAAW,cAAc,CAAC,gBAAgB,KAAK,UAAU,WAAW,YAAY,GAAG,GAAG,EAAE;GAC3F,GAAG,WAAW,MAAM,SAAS,CAAC,SAAS,GAAG,WAAW,KAAK,KAAK,QAAQ,OAAO,KAAK,UAAU,IAAI,GAAG,CAAC,GAAG,EAAE;GAC1G;GACA,CAAC,KAAK,KAAK,CAAC;EACb,KAAK,KAAM,QAAO;GACjB;GACA,GAAG;IACF,QAAQ;IACR,GAAG,WAAW,SAAS,CAAC,WAAW,WAAW,SAAS,GAAG,EAAE;IAC5D,GAAG,WAAW,QAAQ,CAAC,UAAU,KAAK,UAAU,WAAW,MAAM,GAAG,GAAG,EAAE;IACzE,GAAG,WAAW,cAAc,CAAC,gBAAgB,KAAK,UAAU,WAAW,YAAY,GAAG,GAAG,EAAE;IAC3F,GAAG,WAAW,MAAM,SAAS,CAAC,SAAS,GAAG,WAAW,KAAK,KAAK,MAAM,OAAO,KAAK,UAAU,EAAE,GAAG,CAAC,GAAG,EAAE;IACtG;GACD;GACA;GACA;GACA,CAAC,KAAK,KAAK;EACZ,KAAK,KAAM,QAAO;GACjB;GACA;GACA,SAAS,KAAK,YAAY,QAAQ,aAAa,cAAc;GAC7D;GACA,kBAAkB,KAAK;GACvB;GACA,CAAC,KAAK,KAAK;EACZ,KAAK,MAAO,QAAO;GAClB;GACA,SAAS,KAAK,YAAY,QAAQ;GAClC;GACA,oBAAoB,KAAK;GACzB;GACA,CAAC,KAAK,KAAK;EACZ,KAAK;EACL,KAAK;EACL,KAAK,QAAS,QAAO,CAAC,SAAS,GAAG,CAAC,KAAK,KAAK;EAC7C,QAAS,QAAO;GACf;GACA,SAAS,KAAK,YAAY,QAAQ;GAClC;GACA,kBAAkB,KAAK;GACvB;GACA,CAAC,KAAK,KAAK"}
@@ -1,81 +0,0 @@
1
- import { kebabCaseToCamelCase } from "@intlayer/config/utils";
2
-
3
- //#region ../../@intlayer/chokidar/dist/esm/getContentDeclarationFileTemplate/getContentDeclarationFileTemplate.mjs
4
- const getContentDeclarationFileTemplate = async (key, format, fileParams = {}, noMetadata) => {
5
- const camelCaseKey = kebabCaseToCamelCase(key);
6
- const name = camelCaseKey.charAt(0).toLowerCase() + camelCaseKey.slice(1);
7
- const fileParamsString = Object.entries(fileParams).filter(([, value]) => value !== void 0).map(([paramKey, value]) => {
8
- return `\n ${/^[a-zA-Z_$][a-zA-Z0-9_$]*$/.test(paramKey) ? paramKey : JSON.stringify(paramKey)}: ${typeof value === "object" || typeof value === "string" ? JSON.stringify(value) : value},`;
9
- }).join("");
10
- let content;
11
- if (noMetadata) content = "{}";
12
- else if (format === "json" || format === "jsonc" || format === "json5") content = [
13
- "{",
14
- " \"$schema\": \"https://intlayer.org/schema.json\",",
15
- ` "key": "${key}",${fileParamsString}`,
16
- " \"content\": {",
17
- " }",
18
- "}"
19
- ].join("\n");
20
- else content = [
21
- "{",
22
- ` key: '${key}',${fileParamsString}`,
23
- " content: {",
24
- " },",
25
- "}"
26
- ].join("\n");
27
- const jsdoc = `/** @type {import('intlayer').Dictionary${noMetadata ? "['content']" : ""}} **/`;
28
- const satisfiesType = noMetadata ? "Dictionary['content']" : "Dictionary";
29
- switch (format) {
30
- case "yaml": return `${[
31
- `key: ${key}`,
32
- ...fileParams.locale ? [`locale: ${fileParams.locale}`] : [],
33
- ...fileParams.title ? [`title: ${JSON.stringify(fileParams.title)}`] : [],
34
- ...fileParams.description ? [`description: ${JSON.stringify(fileParams.description)}`] : [],
35
- ...fileParams.tags?.length ? ["tags:", ...fileParams.tags.map((tag) => ` - ${JSON.stringify(tag)}`)] : [],
36
- "content: {}"
37
- ].join("\n")}\n`;
38
- case "md": return [
39
- "---",
40
- ...[
41
- `key: ${key}`,
42
- ...fileParams.locale ? [`locale: ${fileParams.locale}`] : [],
43
- ...fileParams.title ? [`title: ${JSON.stringify(fileParams.title)}`] : [],
44
- ...fileParams.description ? [`description: ${JSON.stringify(fileParams.description)}`] : [],
45
- ...fileParams.tags?.length ? ["tags:", ...fileParams.tags.map((t) => ` - ${JSON.stringify(t)}`)] : []
46
- ],
47
- "---",
48
- "",
49
- ""
50
- ].join("\n");
51
- case "ts": return [
52
- "import { type Dictionary } from 'intlayer';",
53
- "",
54
- `const ${name}Content = ${content} satisfies ${satisfiesType};`,
55
- "",
56
- `export default ${name}Content;`,
57
- ""
58
- ].join("\n");
59
- case "cjs": return [
60
- jsdoc,
61
- `const ${name}Content = ${content};`,
62
- "",
63
- `module.exports = ${name}Content;`,
64
- ""
65
- ].join("\n");
66
- case "json":
67
- case "jsonc":
68
- case "json5": return [content, ""].join("\n");
69
- default: return [
70
- jsdoc,
71
- `const ${name}Content = ${content};`,
72
- "",
73
- `export default ${name}Content;`,
74
- ""
75
- ].join("\n");
76
- }
77
- };
78
-
79
- //#endregion
80
- export { getContentDeclarationFileTemplate };
81
- //# sourceMappingURL=getContentDeclarationFileTemplate.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"getContentDeclarationFileTemplate.mjs","names":[],"sources":["../../../../../../../../../@intlayer/chokidar/dist/esm/getContentDeclarationFileTemplate/getContentDeclarationFileTemplate.mjs"],"sourcesContent":["import { kebabCaseToCamelCase } from \"@intlayer/config/utils\";\n\n//#region src/getContentDeclarationFileTemplate/getContentDeclarationFileTemplate.ts\nconst getContentDeclarationFileTemplate = async (key, format, fileParams = {}, noMetadata) => {\n\tconst camelCaseKey = kebabCaseToCamelCase(key);\n\tconst name = camelCaseKey.charAt(0).toLowerCase() + camelCaseKey.slice(1);\n\tconst fileParamsString = Object.entries(fileParams).filter(([, value]) => value !== void 0).map(([paramKey, value]) => {\n\t\treturn `\\n ${/^[a-zA-Z_$][a-zA-Z0-9_$]*$/.test(paramKey) ? paramKey : JSON.stringify(paramKey)}: ${typeof value === \"object\" || typeof value === \"string\" ? JSON.stringify(value) : value},`;\n\t}).join(\"\");\n\tlet content;\n\tif (noMetadata) content = \"{}\";\n\telse if (format === \"json\" || format === \"jsonc\" || format === \"json5\") content = [\n\t\t\"{\",\n\t\t\" \\\"$schema\\\": \\\"https://intlayer.org/schema.json\\\",\",\n\t\t` \"key\": \"${key}\",${fileParamsString}`,\n\t\t\" \\\"content\\\": {\",\n\t\t\" }\",\n\t\t\"}\"\n\t].join(\"\\n\");\n\telse content = [\n\t\t\"{\",\n\t\t` key: '${key}',${fileParamsString}`,\n\t\t\" content: {\",\n\t\t\" },\",\n\t\t\"}\"\n\t].join(\"\\n\");\n\tconst jsdoc = `/** @type {import('intlayer').Dictionary${noMetadata ? \"['content']\" : \"\"}} **/`;\n\tconst satisfiesType = noMetadata ? \"Dictionary['content']\" : \"Dictionary\";\n\tswitch (format) {\n\t\tcase \"yaml\": return `${[\n\t\t\t`key: ${key}`,\n\t\t\t...fileParams.locale ? [`locale: ${fileParams.locale}`] : [],\n\t\t\t...fileParams.title ? [`title: ${JSON.stringify(fileParams.title)}`] : [],\n\t\t\t...fileParams.description ? [`description: ${JSON.stringify(fileParams.description)}`] : [],\n\t\t\t...fileParams.tags?.length ? [\"tags:\", ...fileParams.tags.map((tag) => ` - ${JSON.stringify(tag)}`)] : [],\n\t\t\t\"content: {}\"\n\t\t].join(\"\\n\")}\\n`;\n\t\tcase \"md\": return [\n\t\t\t\"---\",\n\t\t\t...[\n\t\t\t\t`key: ${key}`,\n\t\t\t\t...fileParams.locale ? [`locale: ${fileParams.locale}`] : [],\n\t\t\t\t...fileParams.title ? [`title: ${JSON.stringify(fileParams.title)}`] : [],\n\t\t\t\t...fileParams.description ? [`description: ${JSON.stringify(fileParams.description)}`] : [],\n\t\t\t\t...fileParams.tags?.length ? [\"tags:\", ...fileParams.tags.map((t) => ` - ${JSON.stringify(t)}`)] : []\n\t\t\t],\n\t\t\t\"---\",\n\t\t\t\"\",\n\t\t\t\"\"\n\t\t].join(\"\\n\");\n\t\tcase \"ts\": return [\n\t\t\t\"import { type Dictionary } from 'intlayer';\",\n\t\t\t\"\",\n\t\t\t`const ${name}Content = ${content} satisfies ${satisfiesType};`,\n\t\t\t\"\",\n\t\t\t`export default ${name}Content;`,\n\t\t\t\"\"\n\t\t].join(\"\\n\");\n\t\tcase \"cjs\": return [\n\t\t\tjsdoc,\n\t\t\t`const ${name}Content = ${content};`,\n\t\t\t\"\",\n\t\t\t`module.exports = ${name}Content;`,\n\t\t\t\"\"\n\t\t].join(\"\\n\");\n\t\tcase \"json\":\n\t\tcase \"jsonc\":\n\t\tcase \"json5\": return [content, \"\"].join(\"\\n\");\n\t\tdefault: return [\n\t\t\tjsdoc,\n\t\t\t`const ${name}Content = ${content};`,\n\t\t\t\"\",\n\t\t\t`export default ${name}Content;`,\n\t\t\t\"\"\n\t\t].join(\"\\n\");\n\t}\n};\n\n//#endregion\nexport { getContentDeclarationFileTemplate };\n//# sourceMappingURL=getContentDeclarationFileTemplate.mjs.map"],"mappings":";;;AAGA,MAAM,oCAAoC,OAAO,KAAK,QAAQ,aAAa,EAAE,EAAE,eAAe;CAC7F,MAAM,eAAe,qBAAqB,IAAI;CAC9C,MAAM,OAAO,aAAa,OAAO,EAAE,CAAC,aAAa,GAAG,aAAa,MAAM,EAAE;CACzE,MAAM,mBAAmB,OAAO,QAAQ,WAAW,CAAC,QAAQ,GAAG,WAAW,UAAU,KAAK,EAAE,CAAC,KAAK,CAAC,UAAU,WAAW;AACtH,SAAO,OAAO,6BAA6B,KAAK,SAAS,GAAG,WAAW,KAAK,UAAU,SAAS,CAAC,IAAI,OAAO,UAAU,YAAY,OAAO,UAAU,WAAW,KAAK,UAAU,MAAM,GAAG,MAAM;GAC1L,CAAC,KAAK,GAAG;CACX,IAAI;AACJ,KAAI,WAAY,WAAU;UACjB,WAAW,UAAU,WAAW,WAAW,WAAW,QAAS,WAAU;EACjF;EACA;EACA,aAAa,IAAI,IAAI;EACrB;EACA;EACA;EACA,CAAC,KAAK,KAAK;KACP,WAAU;EACd;EACA,WAAW,IAAI,IAAI;EACnB;EACA;EACA;EACA,CAAC,KAAK,KAAK;CACZ,MAAM,QAAQ,2CAA2C,aAAa,gBAAgB,GAAG;CACzF,MAAM,gBAAgB,aAAa,0BAA0B;AAC7D,SAAQ,QAAR;EACC,KAAK,OAAQ,QAAO,GAAG;GACtB,QAAQ;GACR,GAAG,WAAW,SAAS,CAAC,WAAW,WAAW,SAAS,GAAG,EAAE;GAC5D,GAAG,WAAW,QAAQ,CAAC,UAAU,KAAK,UAAU,WAAW,MAAM,GAAG,GAAG,EAAE;GACzE,GAAG,WAAW,cAAc,CAAC,gBAAgB,KAAK,UAAU,WAAW,YAAY,GAAG,GAAG,EAAE;GAC3F,GAAG,WAAW,MAAM,SAAS,CAAC,SAAS,GAAG,WAAW,KAAK,KAAK,QAAQ,OAAO,KAAK,UAAU,IAAI,GAAG,CAAC,GAAG,EAAE;GAC1G;GACA,CAAC,KAAK,KAAK,CAAC;EACb,KAAK,KAAM,QAAO;GACjB;GACA,GAAG;IACF,QAAQ;IACR,GAAG,WAAW,SAAS,CAAC,WAAW,WAAW,SAAS,GAAG,EAAE;IAC5D,GAAG,WAAW,QAAQ,CAAC,UAAU,KAAK,UAAU,WAAW,MAAM,GAAG,GAAG,EAAE;IACzE,GAAG,WAAW,cAAc,CAAC,gBAAgB,KAAK,UAAU,WAAW,YAAY,GAAG,GAAG,EAAE;IAC3F,GAAG,WAAW,MAAM,SAAS,CAAC,SAAS,GAAG,WAAW,KAAK,KAAK,MAAM,OAAO,KAAK,UAAU,EAAE,GAAG,CAAC,GAAG,EAAE;IACtG;GACD;GACA;GACA;GACA,CAAC,KAAK,KAAK;EACZ,KAAK,KAAM,QAAO;GACjB;GACA;GACA,SAAS,KAAK,YAAY,QAAQ,aAAa,cAAc;GAC7D;GACA,kBAAkB,KAAK;GACvB;GACA,CAAC,KAAK,KAAK;EACZ,KAAK,MAAO,QAAO;GAClB;GACA,SAAS,KAAK,YAAY,QAAQ;GAClC;GACA,oBAAoB,KAAK;GACzB;GACA,CAAC,KAAK,KAAK;EACZ,KAAK;EACL,KAAK;EACL,KAAK,QAAS,QAAO,CAAC,SAAS,GAAG,CAAC,KAAK,KAAK;EAC7C,QAAS,QAAO;GACf;GACA,SAAS,KAAK,YAAY,QAAQ;GAClC;GACA,kBAAkB,KAAK;GACvB;GACA,CAAC,KAAK,KAAK"}
@@ -1,26 +0,0 @@
1
-
2
- //#region ../../@intlayer/chokidar/dist/esm/utils/getFormatFromExtension.mjs
3
- const getFormatFromExtension = (extension) => {
4
- switch (extension) {
5
- case ".ts":
6
- case ".tsx": return "ts";
7
- case ".cjs":
8
- case ".cjsx": return "cjs";
9
- case ".js":
10
- case ".jsx":
11
- case ".mjs":
12
- case ".mjsx": return "esm";
13
- case ".json":
14
- case ".jsonc":
15
- case ".json5": return "json";
16
- case ".md":
17
- case ".mdx": return "md";
18
- case ".yaml":
19
- case ".yml": return "yaml";
20
- }
21
- return "ts";
22
- };
23
-
24
- //#endregion
25
- exports.getFormatFromExtension = getFormatFromExtension;
26
- //# sourceMappingURL=getFormatFromExtension.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"getFormatFromExtension.cjs","names":[],"sources":["../../../../../../../../../@intlayer/chokidar/dist/esm/utils/getFormatFromExtension.mjs"],"sourcesContent":["//#region src/utils/getFormatFromExtension.ts\nconst getFormatFromExtension = (extension) => {\n\tswitch (extension) {\n\t\tcase \".ts\":\n\t\tcase \".tsx\": return \"ts\";\n\t\tcase \".cjs\":\n\t\tcase \".cjsx\": return \"cjs\";\n\t\tcase \".js\":\n\t\tcase \".jsx\":\n\t\tcase \".mjs\":\n\t\tcase \".mjsx\": return \"esm\";\n\t\tcase \".json\":\n\t\tcase \".jsonc\":\n\t\tcase \".json5\": return \"json\";\n\t\tcase \".md\":\n\t\tcase \".mdx\": return \"md\";\n\t\tcase \".yaml\":\n\t\tcase \".yml\": return \"yaml\";\n\t}\n\treturn \"ts\";\n};\nconst getExtensionFromFormat = (format) => {\n\tswitch (format) {\n\t\tcase \"ts\": return \".ts\";\n\t\tcase \"cjs\": return \".cjs\";\n\t\tcase \"json\": return \".json\";\n\t\tcase \"jsonc\": return \".jsonc\";\n\t\tcase \"json5\": return \".json5\";\n\t\tcase \"esm\": return \".mjs\";\n\t\tcase \"md\": return \".md\";\n\t\tcase \"yaml\": return \".yaml\";\n\t}\n\treturn \".ts\";\n};\n\n//#endregion\nexport { getExtensionFromFormat, getFormatFromExtension };\n//# sourceMappingURL=getFormatFromExtension.mjs.map"],"mappings":";;AACA,MAAM,0BAA0B,cAAc;AAC7C,SAAQ,WAAR;EACC,KAAK;EACL,KAAK,OAAQ,QAAO;EACpB,KAAK;EACL,KAAK,QAAS,QAAO;EACrB,KAAK;EACL,KAAK;EACL,KAAK;EACL,KAAK,QAAS,QAAO;EACrB,KAAK;EACL,KAAK;EACL,KAAK,SAAU,QAAO;EACtB,KAAK;EACL,KAAK,OAAQ,QAAO;EACpB,KAAK;EACL,KAAK,OAAQ,QAAO;;AAErB,QAAO"}
@@ -1,25 +0,0 @@
1
- //#region ../../@intlayer/chokidar/dist/esm/utils/getFormatFromExtension.mjs
2
- const getFormatFromExtension = (extension) => {
3
- switch (extension) {
4
- case ".ts":
5
- case ".tsx": return "ts";
6
- case ".cjs":
7
- case ".cjsx": return "cjs";
8
- case ".js":
9
- case ".jsx":
10
- case ".mjs":
11
- case ".mjsx": return "esm";
12
- case ".json":
13
- case ".jsonc":
14
- case ".json5": return "json";
15
- case ".md":
16
- case ".mdx": return "md";
17
- case ".yaml":
18
- case ".yml": return "yaml";
19
- }
20
- return "ts";
21
- };
22
-
23
- //#endregion
24
- export { getFormatFromExtension };
25
- //# sourceMappingURL=getFormatFromExtension.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"getFormatFromExtension.mjs","names":[],"sources":["../../../../../../../../../@intlayer/chokidar/dist/esm/utils/getFormatFromExtension.mjs"],"sourcesContent":["//#region src/utils/getFormatFromExtension.ts\nconst getFormatFromExtension = (extension) => {\n\tswitch (extension) {\n\t\tcase \".ts\":\n\t\tcase \".tsx\": return \"ts\";\n\t\tcase \".cjs\":\n\t\tcase \".cjsx\": return \"cjs\";\n\t\tcase \".js\":\n\t\tcase \".jsx\":\n\t\tcase \".mjs\":\n\t\tcase \".mjsx\": return \"esm\";\n\t\tcase \".json\":\n\t\tcase \".jsonc\":\n\t\tcase \".json5\": return \"json\";\n\t\tcase \".md\":\n\t\tcase \".mdx\": return \"md\";\n\t\tcase \".yaml\":\n\t\tcase \".yml\": return \"yaml\";\n\t}\n\treturn \"ts\";\n};\nconst getExtensionFromFormat = (format) => {\n\tswitch (format) {\n\t\tcase \"ts\": return \".ts\";\n\t\tcase \"cjs\": return \".cjs\";\n\t\tcase \"json\": return \".json\";\n\t\tcase \"jsonc\": return \".jsonc\";\n\t\tcase \"json5\": return \".json5\";\n\t\tcase \"esm\": return \".mjs\";\n\t\tcase \"md\": return \".md\";\n\t\tcase \"yaml\": return \".yaml\";\n\t}\n\treturn \".ts\";\n};\n\n//#endregion\nexport { getExtensionFromFormat, getFormatFromExtension };\n//# sourceMappingURL=getFormatFromExtension.mjs.map"],"mappings":";AACA,MAAM,0BAA0B,cAAc;AAC7C,SAAQ,WAAR;EACC,KAAK;EACL,KAAK,OAAQ,QAAO;EACpB,KAAK;EACL,KAAK,QAAS,QAAO;EACrB,KAAK;EACL,KAAK;EACL,KAAK;EACL,KAAK,QAAS,QAAO;EACrB,KAAK;EACL,KAAK;EACL,KAAK,SAAU,QAAO;EACtB,KAAK;EACL,KAAK,OAAQ,QAAO;EACpB,KAAK;EACL,KAAK,OAAQ,QAAO;;AAErB,QAAO"}
@@ -1,24 +0,0 @@
1
- const require_runtime = require('../../../../../../_virtual/_rolldown/runtime.cjs');
2
- let node_path = require("node:path");
3
- let node_fs = require("node:fs");
4
-
5
- //#region ../../@intlayer/chokidar/dist/esm/utils/readDictionariesFromDisk.mjs
6
- /**
7
- * Reads all JSON dictionary files from a directory, keyed by filename.
8
- * Uses readFileSync instead of require() to avoid require.cache memory leak.
9
- */
10
- const readDictionariesFromDisk = (directory) => {
11
- const dictionaries = {};
12
- if ((0, node_fs.existsSync)(directory)) {
13
- const files = (0, node_fs.readdirSync)(directory).filter((file) => file.endsWith(".json"));
14
- for (const file of files) {
15
- const key = (0, node_path.basename)(file, (0, node_path.extname)(file));
16
- dictionaries[key] = JSON.parse((0, node_fs.readFileSync)((0, node_path.join)(directory, file), "utf-8"));
17
- }
18
- }
19
- return dictionaries;
20
- };
21
-
22
- //#endregion
23
- exports.readDictionariesFromDisk = readDictionariesFromDisk;
24
- //# sourceMappingURL=readDictionariesFromDisk.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"readDictionariesFromDisk.cjs","names":[],"sources":["../../../../../../../../../@intlayer/chokidar/dist/esm/utils/readDictionariesFromDisk.mjs"],"sourcesContent":["import { basename, extname, join } from \"node:path\";\nimport { existsSync, readFileSync, readdirSync } from \"node:fs\";\n\n//#region src/utils/readDictionariesFromDisk.ts\n/**\n* Reads all JSON dictionary files from a directory, keyed by filename.\n* Uses readFileSync instead of require() to avoid require.cache memory leak.\n*/\nconst readDictionariesFromDisk = (directory) => {\n\tconst dictionaries = {};\n\tif (existsSync(directory)) {\n\t\tconst files = readdirSync(directory).filter((file) => file.endsWith(\".json\"));\n\t\tfor (const file of files) {\n\t\t\tconst key = basename(file, extname(file));\n\t\t\tdictionaries[key] = JSON.parse(readFileSync(join(directory, file), \"utf-8\"));\n\t\t}\n\t}\n\treturn dictionaries;\n};\n\n//#endregion\nexport { readDictionariesFromDisk };\n//# sourceMappingURL=readDictionariesFromDisk.mjs.map"],"mappings":";;;;;;;;;AAQA,MAAM,4BAA4B,cAAc;CAC/C,MAAM,eAAe,EAAE;AACvB,6BAAe,UAAU,EAAE;EAC1B,MAAM,iCAAoB,UAAU,CAAC,QAAQ,SAAS,KAAK,SAAS,QAAQ,CAAC;AAC7E,OAAK,MAAM,QAAQ,OAAO;GACzB,MAAM,8BAAe,6BAAc,KAAK,CAAC;AACzC,gBAAa,OAAO,KAAK,oDAAwB,WAAW,KAAK,EAAE,QAAQ,CAAC;;;AAG9E,QAAO"}
@@ -1,23 +0,0 @@
1
- import { basename, extname, join } from "node:path";
2
- import { existsSync, readFileSync, readdirSync } from "node:fs";
3
-
4
- //#region ../../@intlayer/chokidar/dist/esm/utils/readDictionariesFromDisk.mjs
5
- /**
6
- * Reads all JSON dictionary files from a directory, keyed by filename.
7
- * Uses readFileSync instead of require() to avoid require.cache memory leak.
8
- */
9
- const readDictionariesFromDisk = (directory) => {
10
- const dictionaries = {};
11
- if (existsSync(directory)) {
12
- const files = readdirSync(directory).filter((file) => file.endsWith(".json"));
13
- for (const file of files) {
14
- const key = basename(file, extname(file));
15
- dictionaries[key] = JSON.parse(readFileSync(join(directory, file), "utf-8"));
16
- }
17
- }
18
- return dictionaries;
19
- };
20
-
21
- //#endregion
22
- export { readDictionariesFromDisk };
23
- //# sourceMappingURL=readDictionariesFromDisk.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"readDictionariesFromDisk.mjs","names":[],"sources":["../../../../../../../../../@intlayer/chokidar/dist/esm/utils/readDictionariesFromDisk.mjs"],"sourcesContent":["import { basename, extname, join } from \"node:path\";\nimport { existsSync, readFileSync, readdirSync } from \"node:fs\";\n\n//#region src/utils/readDictionariesFromDisk.ts\n/**\n* Reads all JSON dictionary files from a directory, keyed by filename.\n* Uses readFileSync instead of require() to avoid require.cache memory leak.\n*/\nconst readDictionariesFromDisk = (directory) => {\n\tconst dictionaries = {};\n\tif (existsSync(directory)) {\n\t\tconst files = readdirSync(directory).filter((file) => file.endsWith(\".json\"));\n\t\tfor (const file of files) {\n\t\t\tconst key = basename(file, extname(file));\n\t\t\tdictionaries[key] = JSON.parse(readFileSync(join(directory, file), \"utf-8\"));\n\t\t}\n\t}\n\treturn dictionaries;\n};\n\n//#endregion\nexport { readDictionariesFromDisk };\n//# sourceMappingURL=readDictionariesFromDisk.mjs.map"],"mappings":";;;;;;;;AAQA,MAAM,4BAA4B,cAAc;CAC/C,MAAM,eAAe,EAAE;AACvB,KAAI,WAAW,UAAU,EAAE;EAC1B,MAAM,QAAQ,YAAY,UAAU,CAAC,QAAQ,SAAS,KAAK,SAAS,QAAQ,CAAC;AAC7E,OAAK,MAAM,QAAQ,OAAO;GACzB,MAAM,MAAM,SAAS,MAAM,QAAQ,KAAK,CAAC;AACzC,gBAAa,OAAO,KAAK,MAAM,aAAa,KAAK,WAAW,KAAK,EAAE,QAAQ,CAAC;;;AAG9E,QAAO"}
@@ -1,94 +0,0 @@
1
- const require_runtime = require('../../../../../../_virtual/_rolldown/runtime.cjs');
2
- const require_deepTransform = require('../../../../core/dist/esm/interpreter/getContent/deepTransform.cjs');
3
- let node_path = require("node:path");
4
- let node_fs = require("node:fs");
5
- let _intlayer_config_logger = require("@intlayer/config/logger");
6
- let _intlayer_types_nodeType = require("@intlayer/types/nodeType");
7
- _intlayer_types_nodeType = require_runtime.__toESM(_intlayer_types_nodeType, 1);
8
-
9
- //#region ../../@intlayer/chokidar/dist/esm/writeContentDeclaration/processContentDeclarationContent.mjs
10
- /**
11
- * Write file plugin
12
- */
13
- const writeFilePlugin = {
14
- id: "write-file-plugin",
15
- canHandle: (node) => typeof node === "object" && node?.nodeType === _intlayer_types_nodeType.FILE,
16
- transform: (node) => {
17
- const fileContent = node.content;
18
- const filePath = node.fixedPath;
19
- if (typeof fileContent !== "string") throw new Error("File content must be a string");
20
- if (typeof filePath !== "string") throw new Error("File path must be a string");
21
- try {
22
- const absoluteFilePath = (0, node_path.join)(process.cwd(), filePath);
23
- const fileDirectory = (0, node_path.dirname)(absoluteFilePath);
24
- if (!(0, node_fs.existsSync)(fileDirectory)) (0, node_fs.mkdirSync)(fileDirectory, { recursive: true });
25
- (0, node_fs.writeFileSync)(absoluteFilePath, fileContent);
26
- } catch (error) {
27
- throw new Error(`${_intlayer_config_logger.x} Error writing file to ${(0, _intlayer_config_logger.colorizePath)(filePath)}: ${error}`);
28
- }
29
- return {
30
- nodeType: _intlayer_types_nodeType.FILE,
31
- [_intlayer_types_nodeType.FILE]: node[_intlayer_types_nodeType.FILE]
32
- };
33
- }
34
- };
35
- /**
36
- * Markdown file plugin
37
- */
38
- const markdownFilePlugin = {
39
- id: "markdown-file-plugin",
40
- canHandle: (node) => typeof node === "object" && node?.nodeType === _intlayer_types_nodeType.MARKDOWN,
41
- transform: (node, props, deepTransformNode) => {
42
- return {
43
- nodeType: _intlayer_types_nodeType.MARKDOWN,
44
- [_intlayer_types_nodeType.MARKDOWN]: deepTransformNode(node[_intlayer_types_nodeType.MARKDOWN], props)
45
- };
46
- }
47
- };
48
- /**
49
- * Insertion file plugin
50
- */
51
- const insertionFilePlugin = {
52
- id: "insertion-file-plugin",
53
- canHandle: (node) => typeof node === "object" && node?.nodeType === _intlayer_types_nodeType.INSERTION,
54
- transform: (node, props, deepTransformNode) => {
55
- return {
56
- nodeType: _intlayer_types_nodeType.INSERTION,
57
- [_intlayer_types_nodeType.INSERTION]: deepTransformNode(node[_intlayer_types_nodeType.INSERTION], props)
58
- };
59
- }
60
- };
61
- /**
62
- * HTML file plugin
63
- */
64
- const htmlFilePlugin = {
65
- id: "html-file-plugin",
66
- canHandle: (node) => typeof node === "object" && node?.nodeType === _intlayer_types_nodeType.HTML,
67
- transform: (node, props, deepTransformNode) => {
68
- return {
69
- nodeType: _intlayer_types_nodeType.HTML,
70
- [_intlayer_types_nodeType.HTML]: deepTransformNode(node[_intlayer_types_nodeType.HTML], props)
71
- };
72
- }
73
- };
74
- /**
75
- * Process content declaration content
76
- *
77
- * It filter node that are autogenerated by intlayer to do not rewrite them in the content declaration file.
78
- *
79
- * And write external sources as file content if necessary.
80
- */
81
- const processContentDeclarationContent = async (dictionary) => require_deepTransform.deepTransformNode(dictionary, {
82
- dictionaryKey: dictionary.key,
83
- keyPath: [],
84
- plugins: [
85
- writeFilePlugin,
86
- markdownFilePlugin,
87
- insertionFilePlugin,
88
- htmlFilePlugin
89
- ]
90
- });
91
-
92
- //#endregion
93
- exports.processContentDeclarationContent = processContentDeclarationContent;
94
- //# sourceMappingURL=processContentDeclarationContent.cjs.map