@intlayer/docs 7.0.8 → 7.0.9-canary.2

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 (193) hide show
  1. package/README.md +6 -5
  2. package/dist/cjs/generated/frequentQuestions.entry.cjs +19 -0
  3. package/dist/cjs/generated/frequentQuestions.entry.cjs.map +1 -1
  4. package/dist/cjs/packages/@intlayer/config/dist/esm/_virtual/rolldown_runtime.cjs +10 -0
  5. package/dist/cjs/packages/@intlayer/config/dist/esm/_virtual/rolldown_runtime.cjs.map +1 -0
  6. package/dist/cjs/packages/@intlayer/config/dist/esm/utils/ESMxCJSHelpers.cjs +26 -0
  7. package/dist/cjs/packages/@intlayer/config/dist/esm/utils/ESMxCJSHelpers.cjs.map +1 -0
  8. package/dist/cjs/packages/@intlayer/config/dist/esm/utils/cache.cjs +262 -0
  9. package/dist/cjs/packages/@intlayer/config/dist/esm/utils/cache.cjs.map +1 -0
  10. package/dist/cjs/packages/@intlayer/config/dist/esm/utils/getPackageJsonPath.cjs +34 -0
  11. package/dist/cjs/packages/@intlayer/config/dist/esm/utils/getPackageJsonPath.cjs.map +1 -0
  12. package/dist/cjs/packages/@intlayer/core/dist/esm/_virtual/rolldown_runtime.cjs +10 -0
  13. package/dist/cjs/packages/@intlayer/core/dist/esm/_virtual/rolldown_runtime.cjs.map +1 -0
  14. package/dist/cjs/packages/@intlayer/core/dist/esm/config/dist/esm/_virtual/rolldown_runtime.cjs +21 -0
  15. package/dist/cjs/packages/@intlayer/core/dist/esm/config/dist/esm/_virtual/rolldown_runtime.cjs.map +1 -0
  16. package/dist/cjs/packages/@intlayer/core/dist/esm/config/dist/esm/built.cjs +8 -0
  17. package/dist/cjs/packages/@intlayer/core/dist/esm/config/dist/esm/built.cjs.map +1 -0
  18. package/dist/cjs/packages/@intlayer/core/dist/esm/config/dist/esm/configFile/buildConfigurationFields.cjs +119 -0
  19. package/dist/cjs/packages/@intlayer/core/dist/esm/config/dist/esm/configFile/buildConfigurationFields.cjs.map +1 -0
  20. package/dist/cjs/packages/@intlayer/core/dist/esm/config/dist/esm/configFile/getConfiguration.cjs +69 -0
  21. package/dist/cjs/packages/@intlayer/core/dist/esm/config/dist/esm/configFile/getConfiguration.cjs.map +1 -0
  22. package/dist/cjs/packages/@intlayer/core/dist/esm/config/dist/esm/configFile/loadConfigurationFile.cjs +26 -0
  23. package/dist/cjs/packages/@intlayer/core/dist/esm/config/dist/esm/configFile/loadConfigurationFile.cjs.map +1 -0
  24. package/dist/cjs/packages/@intlayer/core/dist/esm/config/dist/esm/configFile/searchConfigurationFile.cjs +51 -0
  25. package/dist/cjs/packages/@intlayer/core/dist/esm/config/dist/esm/configFile/searchConfigurationFile.cjs.map +1 -0
  26. package/dist/cjs/packages/@intlayer/core/dist/esm/config/dist/esm/defaultValues/build.cjs +24 -0
  27. package/dist/cjs/packages/@intlayer/core/dist/esm/config/dist/esm/defaultValues/build.cjs.map +1 -0
  28. package/dist/cjs/packages/@intlayer/core/dist/esm/config/dist/esm/defaultValues/content.cjs +78 -0
  29. package/dist/cjs/packages/@intlayer/core/dist/esm/config/dist/esm/defaultValues/content.cjs.map +1 -0
  30. package/dist/cjs/packages/@intlayer/core/dist/esm/config/dist/esm/defaultValues/dictionary.cjs +7 -0
  31. package/dist/cjs/packages/@intlayer/core/dist/esm/config/dist/esm/defaultValues/dictionary.cjs.map +1 -0
  32. package/dist/cjs/packages/@intlayer/core/dist/esm/config/dist/esm/defaultValues/editor.cjs +36 -0
  33. package/dist/cjs/packages/@intlayer/core/dist/esm/config/dist/esm/defaultValues/editor.cjs.map +1 -0
  34. package/dist/cjs/packages/@intlayer/core/dist/esm/config/dist/esm/defaultValues/index.cjs +21 -0
  35. package/dist/cjs/packages/@intlayer/core/dist/esm/config/dist/esm/defaultValues/index.cjs.map +1 -0
  36. package/dist/cjs/packages/@intlayer/core/dist/esm/config/dist/esm/defaultValues/internationalization.cjs +22 -0
  37. package/dist/cjs/packages/@intlayer/core/dist/esm/config/dist/esm/defaultValues/internationalization.cjs.map +1 -0
  38. package/dist/cjs/packages/@intlayer/core/dist/esm/config/dist/esm/defaultValues/log.cjs +16 -0
  39. package/dist/cjs/packages/@intlayer/core/dist/esm/config/dist/esm/defaultValues/log.cjs.map +1 -0
  40. package/dist/cjs/packages/@intlayer/core/dist/esm/config/dist/esm/defaultValues/routing.cjs +26 -0
  41. package/dist/cjs/packages/@intlayer/core/dist/esm/config/dist/esm/defaultValues/routing.cjs.map +1 -0
  42. package/dist/cjs/packages/@intlayer/core/dist/esm/config/dist/esm/loadEnvFile.cjs +26 -0
  43. package/dist/cjs/packages/@intlayer/core/dist/esm/config/dist/esm/loadEnvFile.cjs.map +1 -0
  44. package/dist/cjs/packages/@intlayer/core/dist/esm/config/dist/esm/loadExternalFile/bundleFile.cjs +23 -0
  45. package/dist/cjs/packages/@intlayer/core/dist/esm/config/dist/esm/loadExternalFile/bundleFile.cjs.map +1 -0
  46. package/dist/cjs/packages/@intlayer/core/dist/esm/config/dist/esm/loadExternalFile/loadExternalFile.cjs +48 -0
  47. package/dist/cjs/packages/@intlayer/core/dist/esm/config/dist/esm/loadExternalFile/loadExternalFile.cjs.map +1 -0
  48. package/dist/cjs/packages/@intlayer/core/dist/esm/config/dist/esm/loadExternalFile/parseFileContent.cjs +65 -0
  49. package/dist/cjs/packages/@intlayer/core/dist/esm/config/dist/esm/loadExternalFile/parseFileContent.cjs.map +1 -0
  50. package/dist/cjs/packages/@intlayer/core/dist/esm/config/dist/esm/loadExternalFile/transpileTSToMJS.cjs +45 -0
  51. package/dist/cjs/packages/@intlayer/core/dist/esm/config/dist/esm/loadExternalFile/transpileTSToMJS.cjs.map +1 -0
  52. package/dist/cjs/packages/@intlayer/core/dist/esm/config/dist/esm/logger.cjs +47 -0
  53. package/dist/cjs/packages/@intlayer/core/dist/esm/config/dist/esm/logger.cjs.map +1 -0
  54. package/dist/cjs/packages/@intlayer/core/dist/esm/config/dist/esm/types/dist/esm/_virtual/rolldown_runtime.cjs +15 -0
  55. package/dist/cjs/packages/@intlayer/core/dist/esm/config/dist/esm/types/dist/esm/_virtual/rolldown_runtime.cjs.map +1 -0
  56. package/dist/cjs/packages/@intlayer/core/dist/esm/config/dist/esm/types/dist/esm/locales.cjs +1128 -0
  57. package/dist/cjs/packages/@intlayer/core/dist/esm/config/dist/esm/types/dist/esm/locales.cjs.map +1 -0
  58. package/dist/cjs/packages/@intlayer/core/dist/esm/config/dist/esm/utils/ESMxCJSHelpers.cjs +27 -0
  59. package/dist/cjs/packages/@intlayer/core/dist/esm/config/dist/esm/utils/ESMxCJSHelpers.cjs.map +1 -0
  60. package/dist/cjs/packages/@intlayer/core/dist/esm/config/dist/esm/utils/cache.cjs +262 -0
  61. package/dist/cjs/packages/@intlayer/core/dist/esm/config/dist/esm/utils/cache.cjs.map +1 -0
  62. package/dist/cjs/packages/@intlayer/core/dist/esm/config/dist/esm/utils/getPackageJsonPath.cjs +34 -0
  63. package/dist/cjs/packages/@intlayer/core/dist/esm/config/dist/esm/utils/getPackageJsonPath.cjs.map +1 -0
  64. package/dist/cjs/packages/@intlayer/core/dist/esm/config/dist/esm/utils/normalizePath.cjs +17 -0
  65. package/dist/cjs/packages/@intlayer/core/dist/esm/config/dist/esm/utils/normalizePath.cjs.map +1 -0
  66. package/dist/cjs/packages/@intlayer/core/dist/esm/localization/getLocalizedUrl.cjs +46 -0
  67. package/dist/cjs/packages/@intlayer/core/dist/esm/localization/getLocalizedUrl.cjs.map +1 -0
  68. package/dist/cjs/packages/@intlayer/core/dist/esm/localization/getMultilingualUrls.cjs +70 -0
  69. package/dist/cjs/packages/@intlayer/core/dist/esm/localization/getMultilingualUrls.cjs.map +1 -0
  70. package/dist/cjs/packages/@intlayer/core/dist/esm/localization/getPathWithoutLocale.cjs +53 -0
  71. package/dist/cjs/packages/@intlayer/core/dist/esm/localization/getPathWithoutLocale.cjs.map +1 -0
  72. package/dist/cjs/packages/@intlayer/core/dist/esm/transpiler/markdown/getMarkdownMetadata.cjs +23 -0
  73. package/dist/cjs/packages/@intlayer/core/dist/esm/transpiler/markdown/getMarkdownMetadata.cjs.map +1 -0
  74. package/dist/cjs/packages/@intlayer/core/dist/esm/utils/checkIsURLAbsolute.cjs +7 -0
  75. package/dist/cjs/packages/@intlayer/core/dist/esm/utils/checkIsURLAbsolute.cjs.map +1 -0
  76. package/dist/cjs/packages/@intlayer/core/dist/esm/utils/parseYaml.cjs +322 -0
  77. package/dist/cjs/packages/@intlayer/core/dist/esm/utils/parseYaml.cjs.map +1 -0
  78. package/dist/cjs/packages/@intlayer/types/dist/esm/_virtual/rolldown_runtime.cjs +15 -0
  79. package/dist/cjs/packages/@intlayer/types/dist/esm/_virtual/rolldown_runtime.cjs.map +1 -0
  80. package/dist/cjs/packages/@intlayer/types/dist/esm/locales.cjs +1128 -0
  81. package/dist/cjs/packages/@intlayer/types/dist/esm/locales.cjs.map +1 -0
  82. package/dist/esm/_virtual/rolldown_runtime.mjs +8 -0
  83. package/dist/esm/generated/frequentQuestions.entry.mjs +19 -0
  84. package/dist/esm/generated/frequentQuestions.entry.mjs.map +1 -1
  85. package/dist/esm/packages/@intlayer/core/dist/esm/_virtual/rolldown_runtime.mjs +11 -0
  86. package/dist/esm/packages/@intlayer/core/dist/esm/_virtual/rolldown_runtime.mjs.map +1 -0
  87. package/dist/esm/packages/@intlayer/core/dist/esm/config/dist/esm/_virtual/rolldown_runtime.mjs +20 -0
  88. package/dist/esm/packages/@intlayer/core/dist/esm/config/dist/esm/_virtual/rolldown_runtime.mjs.map +1 -0
  89. package/dist/esm/packages/@intlayer/core/dist/esm/config/dist/esm/built.mjs +8 -0
  90. package/dist/esm/packages/@intlayer/core/dist/esm/config/dist/esm/built.mjs.map +1 -0
  91. package/dist/esm/packages/@intlayer/core/dist/esm/config/dist/esm/configFile/buildConfigurationFields.mjs +118 -0
  92. package/dist/esm/packages/@intlayer/core/dist/esm/config/dist/esm/configFile/buildConfigurationFields.mjs.map +1 -0
  93. package/dist/esm/packages/@intlayer/core/dist/esm/config/dist/esm/configFile/getConfiguration.mjs +67 -0
  94. package/dist/esm/packages/@intlayer/core/dist/esm/config/dist/esm/configFile/getConfiguration.mjs.map +1 -0
  95. package/dist/esm/packages/@intlayer/core/dist/esm/config/dist/esm/configFile/loadConfigurationFile.mjs +26 -0
  96. package/dist/esm/packages/@intlayer/core/dist/esm/config/dist/esm/configFile/loadConfigurationFile.mjs.map +1 -0
  97. package/dist/esm/packages/@intlayer/core/dist/esm/config/dist/esm/configFile/searchConfigurationFile.mjs +50 -0
  98. package/dist/esm/packages/@intlayer/core/dist/esm/config/dist/esm/configFile/searchConfigurationFile.mjs.map +1 -0
  99. package/dist/esm/packages/@intlayer/core/dist/esm/config/dist/esm/defaultValues/build.mjs +19 -0
  100. package/dist/esm/packages/@intlayer/core/dist/esm/config/dist/esm/defaultValues/build.mjs.map +1 -0
  101. package/dist/esm/packages/@intlayer/core/dist/esm/config/dist/esm/defaultValues/content.mjs +64 -0
  102. package/dist/esm/packages/@intlayer/core/dist/esm/config/dist/esm/defaultValues/content.mjs.map +1 -0
  103. package/dist/esm/packages/@intlayer/core/dist/esm/config/dist/esm/defaultValues/dictionary.mjs +6 -0
  104. package/dist/esm/packages/@intlayer/core/dist/esm/config/dist/esm/defaultValues/dictionary.mjs.map +1 -0
  105. package/dist/esm/packages/@intlayer/core/dist/esm/config/dist/esm/defaultValues/editor.mjs +27 -0
  106. package/dist/esm/packages/@intlayer/core/dist/esm/config/dist/esm/defaultValues/editor.mjs.map +1 -0
  107. package/dist/esm/packages/@intlayer/core/dist/esm/config/dist/esm/defaultValues/index.mjs +21 -0
  108. package/dist/esm/packages/@intlayer/core/dist/esm/config/dist/esm/defaultValues/index.mjs.map +1 -0
  109. package/dist/esm/packages/@intlayer/core/dist/esm/config/dist/esm/defaultValues/internationalization.mjs +18 -0
  110. package/dist/esm/packages/@intlayer/core/dist/esm/config/dist/esm/defaultValues/internationalization.mjs.map +1 -0
  111. package/dist/esm/packages/@intlayer/core/dist/esm/config/dist/esm/defaultValues/log.mjs +14 -0
  112. package/dist/esm/packages/@intlayer/core/dist/esm/config/dist/esm/defaultValues/log.mjs.map +1 -0
  113. package/dist/esm/packages/@intlayer/core/dist/esm/config/dist/esm/defaultValues/routing.mjs +23 -0
  114. package/dist/esm/packages/@intlayer/core/dist/esm/config/dist/esm/defaultValues/routing.mjs.map +1 -0
  115. package/dist/esm/packages/@intlayer/core/dist/esm/config/dist/esm/loadEnvFile.mjs +24 -0
  116. package/dist/esm/packages/@intlayer/core/dist/esm/config/dist/esm/loadEnvFile.mjs.map +1 -0
  117. package/dist/esm/packages/@intlayer/core/dist/esm/config/dist/esm/loadExternalFile/bundleFile.mjs +23 -0
  118. package/dist/esm/packages/@intlayer/core/dist/esm/config/dist/esm/loadExternalFile/bundleFile.mjs.map +1 -0
  119. package/dist/esm/packages/@intlayer/core/dist/esm/config/dist/esm/loadExternalFile/loadExternalFile.mjs +47 -0
  120. package/dist/esm/packages/@intlayer/core/dist/esm/config/dist/esm/loadExternalFile/loadExternalFile.mjs.map +1 -0
  121. package/dist/esm/packages/@intlayer/core/dist/esm/config/dist/esm/loadExternalFile/parseFileContent.mjs +63 -0
  122. package/dist/esm/packages/@intlayer/core/dist/esm/config/dist/esm/loadExternalFile/parseFileContent.mjs.map +1 -0
  123. package/dist/esm/packages/@intlayer/core/dist/esm/config/dist/esm/loadExternalFile/transpileTSToMJS.mjs +44 -0
  124. package/dist/esm/packages/@intlayer/core/dist/esm/config/dist/esm/loadExternalFile/transpileTSToMJS.mjs.map +1 -0
  125. package/dist/esm/packages/@intlayer/core/dist/esm/config/dist/esm/logger.mjs +45 -0
  126. package/dist/esm/packages/@intlayer/core/dist/esm/config/dist/esm/logger.mjs.map +1 -0
  127. package/dist/esm/packages/@intlayer/core/dist/esm/config/dist/esm/types/dist/esm/_virtual/rolldown_runtime.mjs +14 -0
  128. package/dist/esm/packages/@intlayer/core/dist/esm/config/dist/esm/types/dist/esm/_virtual/rolldown_runtime.mjs.map +1 -0
  129. package/dist/esm/packages/@intlayer/core/dist/esm/config/dist/esm/types/dist/esm/locales.mjs +1128 -0
  130. package/dist/esm/packages/@intlayer/core/dist/esm/config/dist/esm/types/dist/esm/locales.mjs.map +1 -0
  131. package/dist/esm/packages/@intlayer/core/dist/esm/config/dist/esm/utils/ESMxCJSHelpers.mjs +25 -0
  132. package/dist/esm/packages/@intlayer/core/dist/esm/config/dist/esm/utils/ESMxCJSHelpers.mjs.map +1 -0
  133. package/dist/esm/packages/@intlayer/core/dist/esm/config/dist/esm/utils/cache.mjs +263 -0
  134. package/dist/esm/packages/@intlayer/core/dist/esm/config/dist/esm/utils/cache.mjs.map +1 -0
  135. package/dist/esm/packages/@intlayer/core/dist/esm/config/dist/esm/utils/getPackageJsonPath.mjs +33 -0
  136. package/dist/esm/packages/@intlayer/core/dist/esm/config/dist/esm/utils/getPackageJsonPath.mjs.map +1 -0
  137. package/dist/esm/packages/@intlayer/core/dist/esm/config/dist/esm/utils/normalizePath.mjs +16 -0
  138. package/dist/esm/packages/@intlayer/core/dist/esm/config/dist/esm/utils/normalizePath.mjs.map +1 -0
  139. package/dist/esm/packages/@intlayer/core/dist/esm/localization/getLocalizedUrl.mjs +46 -0
  140. package/dist/esm/packages/@intlayer/core/dist/esm/localization/getLocalizedUrl.mjs.map +1 -0
  141. package/dist/esm/packages/@intlayer/core/dist/esm/localization/getMultilingualUrls.mjs +70 -0
  142. package/dist/esm/packages/@intlayer/core/dist/esm/localization/getMultilingualUrls.mjs.map +1 -0
  143. package/dist/esm/packages/@intlayer/core/dist/esm/localization/getPathWithoutLocale.mjs +53 -0
  144. package/dist/esm/packages/@intlayer/core/dist/esm/localization/getPathWithoutLocale.mjs.map +1 -0
  145. package/dist/esm/packages/@intlayer/core/dist/esm/transpiler/markdown/getMarkdownMetadata.mjs +23 -0
  146. package/dist/esm/packages/@intlayer/core/dist/esm/transpiler/markdown/getMarkdownMetadata.mjs.map +1 -0
  147. package/dist/esm/packages/@intlayer/core/dist/esm/utils/checkIsURLAbsolute.mjs +6 -0
  148. package/dist/esm/packages/@intlayer/core/dist/esm/utils/checkIsURLAbsolute.mjs.map +1 -0
  149. package/dist/esm/packages/@intlayer/core/dist/esm/utils/parseYaml.mjs +321 -0
  150. package/dist/esm/packages/@intlayer/core/dist/esm/utils/parseYaml.mjs.map +1 -0
  151. package/dist/esm/packages/@intlayer/types/dist/esm/_virtual/rolldown_runtime.mjs +14 -0
  152. package/dist/esm/packages/@intlayer/types/dist/esm/_virtual/rolldown_runtime.mjs.map +1 -0
  153. package/dist/esm/packages/@intlayer/types/dist/esm/locales.mjs +1128 -0
  154. package/dist/esm/packages/@intlayer/types/dist/esm/locales.mjs.map +1 -0
  155. package/dist/types/generated/frequentQuestions.entry.d.ts +1 -0
  156. package/dist/types/generated/frequentQuestions.entry.d.ts.map +1 -1
  157. package/docs/ar/readme.md +3 -3
  158. package/docs/de/readme.md +5 -5
  159. package/docs/en/readme.md +8 -6
  160. package/docs/en-GB/readme.md +3 -3
  161. package/docs/es/readme.md +3 -3
  162. package/docs/fr/readme.md +3 -3
  163. package/docs/hi/readme.md +3 -3
  164. package/docs/id/readme.md +3 -3
  165. package/docs/it/readme.md +3 -3
  166. package/docs/ja/readme.md +3 -3
  167. package/docs/ko/readme.md +3 -3
  168. package/docs/pl/intlayer_with_nextjs_15.md +36 -37
  169. package/docs/pl/readme.md +3 -3
  170. package/docs/pt/readme.md +3 -3
  171. package/docs/ru/readme.md +3 -3
  172. package/docs/tr/readme.md +3 -3
  173. package/docs/vi/readme.md +3 -3
  174. package/docs/zh/readme.md +3 -3
  175. package/frequent_questions/ar/package_version_error.md +132 -0
  176. package/frequent_questions/de/package_version_error.md +132 -0
  177. package/frequent_questions/en/package_version_error.md +153 -0
  178. package/frequent_questions/en-GB/package_version_error.md +132 -0
  179. package/frequent_questions/es/package_version_error.md +132 -0
  180. package/frequent_questions/fr/package_version_error.md +132 -0
  181. package/frequent_questions/hi/package_version_error.md +132 -0
  182. package/frequent_questions/id/package_version_error.md +132 -0
  183. package/frequent_questions/it/package_version_error.md +132 -0
  184. package/frequent_questions/ja/package_version_error.md +132 -0
  185. package/frequent_questions/ko/package_version_error.md +132 -0
  186. package/frequent_questions/pl/package_version_error.md +132 -0
  187. package/frequent_questions/pt/package_version_error.md +132 -0
  188. package/frequent_questions/ru/package_version_error.md +132 -0
  189. package/frequent_questions/tr/package_version_error.md +132 -0
  190. package/frequent_questions/vi/package_version_error.md +132 -0
  191. package/frequent_questions/zh/package_version_error.md +132 -0
  192. package/package.json +20 -17
  193. package/src/generated/frequentQuestions.entry.ts +19 -0
@@ -0,0 +1,26 @@
1
+ import { configESMxCJSRequire } from "../utils/ESMxCJSHelpers.mjs";
2
+ import { loadExternalFileSync } from "../loadExternalFile/loadExternalFile.mjs";
3
+
4
+ //#region ../packages/@intlayer/core/dist/esm/config/dist/esm/configFile/loadConfigurationFile.mjs
5
+ const filterValidConfiguration = (configuration) => {
6
+ return configuration;
7
+ };
8
+ /**
9
+ * Load the configuration file from the given path
10
+ * Example of configuration file: intlayer.config.js
11
+ *
12
+ * Accepts JSON, JS, MJS and TS files as configuration
13
+ */
14
+ const loadConfigurationFile = (configFilePath, options) => {
15
+ return filterValidConfiguration(loadExternalFileSync(configFilePath, {
16
+ ...options,
17
+ aliases: {
18
+ ...options?.aliases,
19
+ intlayer: configESMxCJSRequire.resolve("@intlayer/types")
20
+ }
21
+ }));
22
+ };
23
+
24
+ //#endregion
25
+ export { loadConfigurationFile };
26
+ //# sourceMappingURL=loadConfigurationFile.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"loadConfigurationFile.mjs","names":[],"sources":["../../../../../../../../../../../../packages/@intlayer/core/dist/esm/config/dist/esm/configFile/loadConfigurationFile.mjs"],"sourcesContent":["import { configESMxCJSRequire } from \"../utils/ESMxCJSHelpers.mjs\";\nimport { loadExternalFileSync } from \"../loadExternalFile/loadExternalFile.mjs\";\n\n//#region ../config/dist/esm/configFile/loadConfigurationFile.mjs\nconst filterValidConfiguration = (configuration) => {\n\treturn configuration;\n};\n/**\n* Load the configuration file from the given path\n* Example of configuration file: intlayer.config.js\n*\n* Accepts JSON, JS, MJS and TS files as configuration\n*/\nconst loadConfigurationFile = (configFilePath, options) => {\n\treturn filterValidConfiguration(loadExternalFileSync(configFilePath, {\n\t\t...options,\n\t\taliases: {\n\t\t\t...options?.aliases,\n\t\t\tintlayer: configESMxCJSRequire.resolve(\"@intlayer/types\")\n\t\t}\n\t}));\n};\n\n//#endregion\nexport { loadConfigurationFile };\n//# sourceMappingURL=loadConfigurationFile.mjs.map"],"mappings":";;;;AAIA,MAAM,4BAA4B,kBAAkB;AACnD,QAAO;;;;;;;;AAQR,MAAM,yBAAyB,gBAAgB,YAAY;AAC1D,QAAO,yBAAyB,qBAAqB,gBAAgB;EACpE,GAAG;EACH,SAAS;GACR,GAAG,SAAS;GACZ,UAAU,qBAAqB,QAAQ,kBAAkB;GACzD;EACD,CAAC,CAAC"}
@@ -0,0 +1,50 @@
1
+ import { logger } from "../logger.mjs";
2
+ import { getPackageJsonPath } from "../utils/getPackageJsonPath.mjs";
3
+ import { resolve } from "node:path";
4
+ import { existsSync } from "node:fs";
5
+
6
+ //#region ../packages/@intlayer/core/dist/esm/config/dist/esm/configFile/searchConfigurationFile.mjs
7
+ const EXTENSION = [
8
+ "ts",
9
+ "js",
10
+ "json",
11
+ "cjs",
12
+ "mjs",
13
+ ""
14
+ ];
15
+ const CONFIGURATION_FILE_NAME_1 = "intlayer.config";
16
+ const CONFIGURATION_FILE_NAME_2 = ".intlayerrc";
17
+ const configurationFiles = [...EXTENSION.filter((extension) => extension !== "").map((ext) => `${CONFIGURATION_FILE_NAME_1}.${ext}`), CONFIGURATION_FILE_NAME_2];
18
+ /**
19
+ * Search for the configuration file in the given path
20
+ *
21
+ * List of detected configuration files:
22
+ * - intlayer.config.ts
23
+ * - intlayer.config.js
24
+ * - intlayer.config.json
25
+ * - intlayer.config.cjs
26
+ * - intlayer.config.mjs
27
+ * - .intlayerrc
28
+ */
29
+ const searchConfigurationFile = (startDir) => {
30
+ let configurationFilePath;
31
+ let numCustomConfiguration = 0;
32
+ const { baseDir } = getPackageJsonPath(startDir);
33
+ for (const fileName of configurationFiles) try {
34
+ const filePath = resolve(baseDir, fileName);
35
+ if (!existsSync(filePath)) {} else {
36
+ numCustomConfiguration += 1;
37
+ if (!configurationFilePath) configurationFilePath = filePath;
38
+ }
39
+ } catch (error) {
40
+ logger(`${fileName}: ${error}`, { level: "error" });
41
+ }
42
+ return {
43
+ configurationFilePath,
44
+ numCustomConfiguration
45
+ };
46
+ };
47
+
48
+ //#endregion
49
+ export { searchConfigurationFile };
50
+ //# sourceMappingURL=searchConfigurationFile.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"searchConfigurationFile.mjs","names":[],"sources":["../../../../../../../../../../../../packages/@intlayer/core/dist/esm/config/dist/esm/configFile/searchConfigurationFile.mjs"],"sourcesContent":["import { logger } from \"../logger.mjs\";\nimport { getPackageJsonPath } from \"../utils/getPackageJsonPath.mjs\";\nimport { resolve } from \"node:path\";\nimport { existsSync } from \"node:fs\";\n\n//#region ../config/dist/esm/configFile/searchConfigurationFile.mjs\nconst EXTENSION = [\n\t\"ts\",\n\t\"js\",\n\t\"json\",\n\t\"cjs\",\n\t\"mjs\",\n\t\"\"\n];\nconst CONFIGURATION_FILE_NAME_1 = \"intlayer.config\";\nconst CONFIGURATION_FILE_NAME_2 = \".intlayerrc\";\nconst configurationFiles = [...EXTENSION.filter((extension) => extension !== \"\").map((ext) => `${CONFIGURATION_FILE_NAME_1}.${ext}`), CONFIGURATION_FILE_NAME_2];\n/**\n* Search for the configuration file in the given path\n*\n* List of detected configuration files:\n* - intlayer.config.ts\n* - intlayer.config.js\n* - intlayer.config.json\n* - intlayer.config.cjs\n* - intlayer.config.mjs\n* - .intlayerrc\n*/\nconst searchConfigurationFile = (startDir) => {\n\tlet configurationFilePath;\n\tlet numCustomConfiguration = 0;\n\tconst { baseDir } = getPackageJsonPath(startDir);\n\tfor (const fileName of configurationFiles) try {\n\t\tconst filePath = resolve(baseDir, fileName);\n\t\tif (!existsSync(filePath)) {} else {\n\t\t\tnumCustomConfiguration += 1;\n\t\t\tif (!configurationFilePath) configurationFilePath = filePath;\n\t\t}\n\t} catch (error) {\n\t\tlogger(`${fileName}: ${error}`, { level: \"error\" });\n\t}\n\treturn {\n\t\tconfigurationFilePath,\n\t\tnumCustomConfiguration\n\t};\n};\n\n//#endregion\nexport { searchConfigurationFile };\n//# sourceMappingURL=searchConfigurationFile.mjs.map"],"mappings":";;;;;;AAMA,MAAM,YAAY;CACjB;CACA;CACA;CACA;CACA;CACA;CACA;AACD,MAAM,4BAA4B;AAClC,MAAM,4BAA4B;AAClC,MAAM,qBAAqB,CAAC,GAAG,UAAU,QAAQ,cAAc,cAAc,GAAG,CAAC,KAAK,QAAQ,GAAG,0BAA0B,GAAG,MAAM,EAAE,0BAA0B;;;;;;;;;;;;AAYhK,MAAM,2BAA2B,aAAa;CAC7C,IAAI;CACJ,IAAI,yBAAyB;CAC7B,MAAM,EAAE,YAAY,mBAAmB,SAAS;AAChD,MAAK,MAAM,YAAY,mBAAoB,KAAI;EAC9C,MAAM,WAAW,QAAQ,SAAS,SAAS;AAC3C,MAAI,CAAC,WAAW,SAAS,EAAE,QAAQ;AAClC,6BAA0B;AAC1B,OAAI,CAAC,sBAAuB,yBAAwB;;UAE7C,OAAO;AACf,SAAO,GAAG,SAAS,IAAI,SAAS,EAAE,OAAO,SAAS,CAAC;;AAEpD,QAAO;EACN;EACA;EACA"}
@@ -0,0 +1,19 @@
1
+ import { __export } from "../_virtual/rolldown_runtime.mjs";
2
+
3
+ //#region ../packages/@intlayer/core/dist/esm/config/dist/esm/defaultValues/build.mjs
4
+ var build_exports = /* @__PURE__ */ __export({
5
+ CACHE: () => CACHE,
6
+ IMPORT_MODE: () => IMPORT_MODE,
7
+ OPTIMIZE: () => OPTIMIZE,
8
+ OUTPUT_FORMAT: () => OUTPUT_FORMAT,
9
+ TRAVERSE_PATTERN: () => TRAVERSE_PATTERN
10
+ });
11
+ const OPTIMIZE = false;
12
+ const IMPORT_MODE = "static";
13
+ const TRAVERSE_PATTERN = ["**/*.{js,ts,mjs,cjs,jsx,tsx,mjx,cjx,vue,svelte,svte}", "!**/node_modules/**"];
14
+ const OUTPUT_FORMAT = ["cjs", "esm"];
15
+ const CACHE = true;
16
+
17
+ //#endregion
18
+ export { CACHE, IMPORT_MODE, OPTIMIZE, OUTPUT_FORMAT, TRAVERSE_PATTERN, build_exports };
19
+ //# sourceMappingURL=build.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"build.mjs","names":[],"sources":["../../../../../../../../../../../../packages/@intlayer/core/dist/esm/config/dist/esm/defaultValues/build.mjs"],"sourcesContent":["import { __export } from \"../_virtual/rolldown_runtime.mjs\";\n\n//#region ../config/dist/esm/defaultValues/build.mjs\nvar build_exports = /* @__PURE__ */ __export({\n\tCACHE: () => CACHE,\n\tIMPORT_MODE: () => IMPORT_MODE,\n\tOPTIMIZE: () => OPTIMIZE,\n\tOUTPUT_FORMAT: () => OUTPUT_FORMAT,\n\tTRAVERSE_PATTERN: () => TRAVERSE_PATTERN\n});\nconst OPTIMIZE = false;\nconst IMPORT_MODE = \"static\";\nconst TRAVERSE_PATTERN = [\"**/*.{js,ts,mjs,cjs,jsx,tsx,mjx,cjx,vue,svelte,svte}\", \"!**/node_modules/**\"];\nconst OUTPUT_FORMAT = [\"cjs\", \"esm\"];\nconst CACHE = true;\n\n//#endregion\nexport { CACHE, IMPORT_MODE, OPTIMIZE, OUTPUT_FORMAT, TRAVERSE_PATTERN, build_exports };\n//# sourceMappingURL=build.mjs.map"],"mappings":";;;AAGA,IAAI,gBAAgC,yBAAS;CAC5C,aAAa;CACb,mBAAmB;CACnB,gBAAgB;CAChB,qBAAqB;CACrB,wBAAwB;CACxB,CAAC;AACF,MAAM,WAAW;AACjB,MAAM,cAAc;AACpB,MAAM,mBAAmB,CAAC,wDAAwD,sBAAsB;AACxG,MAAM,gBAAgB,CAAC,OAAO,MAAM;AACpC,MAAM,QAAQ"}
@@ -0,0 +1,64 @@
1
+ import { __export } from "../_virtual/rolldown_runtime.mjs";
2
+
3
+ //#region ../packages/@intlayer/core/dist/esm/config/dist/esm/defaultValues/content.mjs
4
+ var content_exports = /* @__PURE__ */ __export({
5
+ CACHE_DIR: () => CACHE_DIR,
6
+ CONFIG_DIR: () => CONFIG_DIR,
7
+ CONTENT_DIR: () => CONTENT_DIR,
8
+ DICTIONARIES_DIR: () => DICTIONARIES_DIR,
9
+ DYNAMIC_DICTIONARIES_DIR: () => DYNAMIC_DICTIONARIES_DIR,
10
+ EXCLUDED_PATHS: () => EXCLUDED_PATHS,
11
+ FETCH_DICTIONARIES_DIR: () => FETCH_DICTIONARIES_DIR,
12
+ FILE_EXTENSIONS: () => FILE_EXTENSIONS,
13
+ I18NEXT_DICTIONARIES_DIR: () => I18NEXT_DICTIONARIES_DIR,
14
+ MAIN_DIR: () => MAIN_DIR,
15
+ MASKS_DIR: () => MASKS_DIR,
16
+ MODULE_AUGMENTATION_DIR: () => MODULE_AUGMENTATION_DIR,
17
+ REACT_INTL_MESSAGES_DIR: () => REACT_INTL_MESSAGES_DIR,
18
+ REMOTE_DICTIONARIES_DIR: () => REMOTE_DICTIONARIES_DIR,
19
+ TYPES_DIR: () => TYPES_DIR,
20
+ UNMERGED_DICTIONARIES_DIR: () => UNMERGED_DICTIONARIES_DIR,
21
+ WATCH: () => WATCH
22
+ });
23
+ const FILE_EXTENSIONS = [
24
+ ".content.ts",
25
+ ".content.js",
26
+ ".content.cjs",
27
+ ".content.cjx",
28
+ ".content.mjs",
29
+ ".content.mjx",
30
+ ".content.json",
31
+ ".content.tsx",
32
+ ".content.jsx"
33
+ ];
34
+ const EXCLUDED_PATHS = [
35
+ "**/node_modules/**",
36
+ "**/dist/**",
37
+ "**/build/**",
38
+ "**/.intlayer/**",
39
+ "**/.next/**",
40
+ "**/.nuxt/**",
41
+ "**/.expo/**",
42
+ "**/.vercel/**",
43
+ "**/.turbo/**",
44
+ "**/.tanstack/**"
45
+ ];
46
+ const CONTENT_DIR = ["."];
47
+ const MAIN_DIR = ".intlayer/main";
48
+ const DICTIONARIES_DIR = ".intlayer/dictionary";
49
+ const MASKS_DIR = ".intlayer/mask";
50
+ const REMOTE_DICTIONARIES_DIR = ".intlayer/remote_dictionary";
51
+ const UNMERGED_DICTIONARIES_DIR = ".intlayer/unmerged_dictionary";
52
+ const DYNAMIC_DICTIONARIES_DIR = ".intlayer/dynamic_dictionary";
53
+ const FETCH_DICTIONARIES_DIR = ".intlayer/fetch_dictionary";
54
+ const TYPES_DIR = ".intlayer/types";
55
+ const MODULE_AUGMENTATION_DIR = ".intlayer/types";
56
+ const I18NEXT_DICTIONARIES_DIR = "i18next_resources";
57
+ const REACT_INTL_MESSAGES_DIR = "intl_messages";
58
+ const CONFIG_DIR = ".intlayer/config";
59
+ const CACHE_DIR = ".intlayer/cache";
60
+ const WATCH = true;
61
+
62
+ //#endregion
63
+ export { CACHE_DIR, CONFIG_DIR, CONTENT_DIR, DICTIONARIES_DIR, DYNAMIC_DICTIONARIES_DIR, EXCLUDED_PATHS, FETCH_DICTIONARIES_DIR, FILE_EXTENSIONS, MAIN_DIR, MODULE_AUGMENTATION_DIR, REMOTE_DICTIONARIES_DIR, TYPES_DIR, UNMERGED_DICTIONARIES_DIR, WATCH, content_exports };
64
+ //# sourceMappingURL=content.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"content.mjs","names":[],"sources":["../../../../../../../../../../../../packages/@intlayer/core/dist/esm/config/dist/esm/defaultValues/content.mjs"],"sourcesContent":["import { __export } from \"../_virtual/rolldown_runtime.mjs\";\n\n//#region ../config/dist/esm/defaultValues/content.mjs\nvar content_exports = /* @__PURE__ */ __export({\n\tCACHE_DIR: () => CACHE_DIR,\n\tCONFIG_DIR: () => CONFIG_DIR,\n\tCONTENT_DIR: () => CONTENT_DIR,\n\tDICTIONARIES_DIR: () => DICTIONARIES_DIR,\n\tDYNAMIC_DICTIONARIES_DIR: () => DYNAMIC_DICTIONARIES_DIR,\n\tEXCLUDED_PATHS: () => EXCLUDED_PATHS,\n\tFETCH_DICTIONARIES_DIR: () => FETCH_DICTIONARIES_DIR,\n\tFILE_EXTENSIONS: () => FILE_EXTENSIONS,\n\tI18NEXT_DICTIONARIES_DIR: () => I18NEXT_DICTIONARIES_DIR,\n\tMAIN_DIR: () => MAIN_DIR,\n\tMASKS_DIR: () => MASKS_DIR,\n\tMODULE_AUGMENTATION_DIR: () => MODULE_AUGMENTATION_DIR,\n\tREACT_INTL_MESSAGES_DIR: () => REACT_INTL_MESSAGES_DIR,\n\tREMOTE_DICTIONARIES_DIR: () => REMOTE_DICTIONARIES_DIR,\n\tTYPES_DIR: () => TYPES_DIR,\n\tUNMERGED_DICTIONARIES_DIR: () => UNMERGED_DICTIONARIES_DIR,\n\tWATCH: () => WATCH\n});\nconst FILE_EXTENSIONS = [\n\t\".content.ts\",\n\t\".content.js\",\n\t\".content.cjs\",\n\t\".content.cjx\",\n\t\".content.mjs\",\n\t\".content.mjx\",\n\t\".content.json\",\n\t\".content.tsx\",\n\t\".content.jsx\"\n];\nconst EXCLUDED_PATHS = [\n\t\"**/node_modules/**\",\n\t\"**/dist/**\",\n\t\"**/build/**\",\n\t\"**/.intlayer/**\",\n\t\"**/.next/**\",\n\t\"**/.nuxt/**\",\n\t\"**/.expo/**\",\n\t\"**/.vercel/**\",\n\t\"**/.turbo/**\",\n\t\"**/.tanstack/**\"\n];\nconst CONTENT_DIR = [\".\"];\nconst MAIN_DIR = \".intlayer/main\";\nconst DICTIONARIES_DIR = \".intlayer/dictionary\";\nconst MASKS_DIR = \".intlayer/mask\";\nconst REMOTE_DICTIONARIES_DIR = \".intlayer/remote_dictionary\";\nconst UNMERGED_DICTIONARIES_DIR = \".intlayer/unmerged_dictionary\";\nconst DYNAMIC_DICTIONARIES_DIR = \".intlayer/dynamic_dictionary\";\nconst FETCH_DICTIONARIES_DIR = \".intlayer/fetch_dictionary\";\nconst TYPES_DIR = \".intlayer/types\";\nconst MODULE_AUGMENTATION_DIR = \".intlayer/types\";\nconst I18NEXT_DICTIONARIES_DIR = \"i18next_resources\";\nconst REACT_INTL_MESSAGES_DIR = \"intl_messages\";\nconst CONFIG_DIR = \".intlayer/config\";\nconst CACHE_DIR = \".intlayer/cache\";\nconst WATCH = true;\n\n//#endregion\nexport { CACHE_DIR, CONFIG_DIR, CONTENT_DIR, DICTIONARIES_DIR, DYNAMIC_DICTIONARIES_DIR, EXCLUDED_PATHS, FETCH_DICTIONARIES_DIR, FILE_EXTENSIONS, MAIN_DIR, MODULE_AUGMENTATION_DIR, REMOTE_DICTIONARIES_DIR, TYPES_DIR, UNMERGED_DICTIONARIES_DIR, WATCH, content_exports };\n//# sourceMappingURL=content.mjs.map"],"mappings":";;;AAGA,IAAI,kBAAkC,yBAAS;CAC9C,iBAAiB;CACjB,kBAAkB;CAClB,mBAAmB;CACnB,wBAAwB;CACxB,gCAAgC;CAChC,sBAAsB;CACtB,8BAA8B;CAC9B,uBAAuB;CACvB,gCAAgC;CAChC,gBAAgB;CAChB,iBAAiB;CACjB,+BAA+B;CAC/B,+BAA+B;CAC/B,+BAA+B;CAC/B,iBAAiB;CACjB,iCAAiC;CACjC,aAAa;CACb,CAAC;AACF,MAAM,kBAAkB;CACvB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD,MAAM,iBAAiB;CACtB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD,MAAM,cAAc,CAAC,IAAI;AACzB,MAAM,WAAW;AACjB,MAAM,mBAAmB;AACzB,MAAM,YAAY;AAClB,MAAM,0BAA0B;AAChC,MAAM,4BAA4B;AAClC,MAAM,2BAA2B;AACjC,MAAM,yBAAyB;AAC/B,MAAM,YAAY;AAClB,MAAM,0BAA0B;AAChC,MAAM,2BAA2B;AACjC,MAAM,0BAA0B;AAChC,MAAM,aAAa;AACnB,MAAM,YAAY;AAClB,MAAM,QAAQ"}
@@ -0,0 +1,6 @@
1
+ //#region ../packages/@intlayer/core/dist/esm/config/dist/esm/defaultValues/dictionary.mjs
2
+ const FILL = true;
3
+
4
+ //#endregion
5
+ export { FILL };
6
+ //# sourceMappingURL=dictionary.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dictionary.mjs","names":[],"sources":["../../../../../../../../../../../../packages/@intlayer/core/dist/esm/config/dist/esm/defaultValues/dictionary.mjs"],"sourcesContent":["//#region ../config/dist/esm/defaultValues/dictionary.mjs\nconst FILL = true;\n\n//#endregion\nexport { FILL };\n//# sourceMappingURL=dictionary.mjs.map"],"mappings":";AACA,MAAM,OAAO"}
@@ -0,0 +1,27 @@
1
+ import { __export } from "../_virtual/rolldown_runtime.mjs";
2
+
3
+ //#region ../packages/@intlayer/core/dist/esm/config/dist/esm/defaultValues/editor.mjs
4
+ var editor_exports = /* @__PURE__ */ __export({
5
+ APPLICATION_URL: () => APPLICATION_URL,
6
+ BACKEND_URL: () => BACKEND_URL,
7
+ CMS_URL: () => CMS_URL,
8
+ DICTIONARY_PRIORITY_STRATEGY: () => DICTIONARY_PRIORITY_STRATEGY,
9
+ EDITOR_URL: () => EDITOR_URL,
10
+ IS_ENABLED: () => IS_ENABLED,
11
+ LIVE_SYNC: () => LIVE_SYNC,
12
+ LIVE_SYNC_PORT: () => LIVE_SYNC_PORT,
13
+ PORT: () => PORT
14
+ });
15
+ const APPLICATION_URL = "";
16
+ const EDITOR_URL = "http://localhost:8000";
17
+ const CMS_URL = "https://intlayer.org";
18
+ const PORT = 8e3;
19
+ const BACKEND_URL = "https://back.intlayer.org";
20
+ const IS_ENABLED = true;
21
+ const LIVE_SYNC = true;
22
+ const DICTIONARY_PRIORITY_STRATEGY = "local_first";
23
+ const LIVE_SYNC_PORT = 4e3;
24
+
25
+ //#endregion
26
+ export { APPLICATION_URL, BACKEND_URL, CMS_URL, DICTIONARY_PRIORITY_STRATEGY, EDITOR_URL, IS_ENABLED, LIVE_SYNC, LIVE_SYNC_PORT, PORT, editor_exports };
27
+ //# sourceMappingURL=editor.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"editor.mjs","names":[],"sources":["../../../../../../../../../../../../packages/@intlayer/core/dist/esm/config/dist/esm/defaultValues/editor.mjs"],"sourcesContent":["import { __export } from \"../_virtual/rolldown_runtime.mjs\";\n\n//#region ../config/dist/esm/defaultValues/editor.mjs\nvar editor_exports = /* @__PURE__ */ __export({\n\tAPPLICATION_URL: () => APPLICATION_URL,\n\tBACKEND_URL: () => BACKEND_URL,\n\tCMS_URL: () => CMS_URL,\n\tDICTIONARY_PRIORITY_STRATEGY: () => DICTIONARY_PRIORITY_STRATEGY,\n\tEDITOR_URL: () => EDITOR_URL,\n\tIS_ENABLED: () => IS_ENABLED,\n\tLIVE_SYNC: () => LIVE_SYNC,\n\tLIVE_SYNC_PORT: () => LIVE_SYNC_PORT,\n\tPORT: () => PORT\n});\nconst APPLICATION_URL = \"\";\nconst EDITOR_URL = \"http://localhost:8000\";\nconst CMS_URL = \"https://intlayer.org\";\nconst PORT = 8e3;\nconst BACKEND_URL = \"https://back.intlayer.org\";\nconst IS_ENABLED = true;\nconst LIVE_SYNC = true;\nconst DICTIONARY_PRIORITY_STRATEGY = \"local_first\";\nconst LIVE_SYNC_PORT = 4e3;\n\n//#endregion\nexport { APPLICATION_URL, BACKEND_URL, CMS_URL, DICTIONARY_PRIORITY_STRATEGY, EDITOR_URL, IS_ENABLED, LIVE_SYNC, LIVE_SYNC_PORT, PORT, editor_exports };\n//# sourceMappingURL=editor.mjs.map"],"mappings":";;;AAGA,IAAI,iBAAiC,yBAAS;CAC7C,uBAAuB;CACvB,mBAAmB;CACnB,eAAe;CACf,oCAAoC;CACpC,kBAAkB;CAClB,kBAAkB;CAClB,iBAAiB;CACjB,sBAAsB;CACtB,YAAY;CACZ,CAAC;AACF,MAAM,kBAAkB;AACxB,MAAM,aAAa;AACnB,MAAM,UAAU;AAChB,MAAM,OAAO;AACb,MAAM,cAAc;AACpB,MAAM,aAAa;AACnB,MAAM,YAAY;AAClB,MAAM,+BAA+B;AACrC,MAAM,iBAAiB"}
@@ -0,0 +1,21 @@
1
+ import { __export } from "../_virtual/rolldown_runtime.mjs";
2
+ import { build_exports } from "./build.mjs";
3
+ import { content_exports } from "./content.mjs";
4
+ import { editor_exports } from "./editor.mjs";
5
+ import { internationalization_exports } from "./internationalization.mjs";
6
+ import { log_exports } from "./log.mjs";
7
+ import { routing_exports } from "./routing.mjs";
8
+
9
+ //#region ../packages/@intlayer/core/dist/esm/config/dist/esm/defaultValues/index.mjs
10
+ var defaultValues_exports = /* @__PURE__ */ __export({
11
+ Build: () => build_exports,
12
+ Content: () => content_exports,
13
+ Editor: () => editor_exports,
14
+ Internationalization: () => internationalization_exports,
15
+ Log: () => log_exports,
16
+ Routing: () => routing_exports
17
+ });
18
+
19
+ //#endregion
20
+ export { defaultValues_exports };
21
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","names":[],"sources":["../../../../../../../../../../../../packages/@intlayer/core/dist/esm/config/dist/esm/defaultValues/index.mjs"],"sourcesContent":["import { __export } from \"../_virtual/rolldown_runtime.mjs\";\nimport { build_exports } from \"./build.mjs\";\nimport { content_exports } from \"./content.mjs\";\nimport { editor_exports } from \"./editor.mjs\";\nimport { internationalization_exports } from \"./internationalization.mjs\";\nimport { log_exports } from \"./log.mjs\";\nimport { routing_exports } from \"./routing.mjs\";\n\n//#region ../config/dist/esm/defaultValues/index.mjs\nvar defaultValues_exports = /* @__PURE__ */ __export({\n\tBuild: () => build_exports,\n\tContent: () => content_exports,\n\tEditor: () => editor_exports,\n\tInternationalization: () => internationalization_exports,\n\tLog: () => log_exports,\n\tRouting: () => routing_exports\n});\n\n//#endregion\nexport { defaultValues_exports };\n//# sourceMappingURL=index.mjs.map"],"mappings":";;;;;;;;;AASA,IAAI,wBAAwC,yBAAS;CACpD,aAAa;CACb,eAAe;CACf,cAAc;CACd,4BAA4B;CAC5B,WAAW;CACX,eAAe;CACf,CAAC"}
@@ -0,0 +1,18 @@
1
+ import { __export } from "../_virtual/rolldown_runtime.mjs";
2
+ import { locales_exports } from "../types/dist/esm/locales.mjs";
3
+
4
+ //#region ../packages/@intlayer/core/dist/esm/config/dist/esm/defaultValues/internationalization.mjs
5
+ var internationalization_exports = /* @__PURE__ */ __export({
6
+ DEFAULT_LOCALE: () => DEFAULT_LOCALE,
7
+ LOCALES: () => LOCALES,
8
+ REQUIRED_LOCALES: () => REQUIRED_LOCALES,
9
+ STRICT_MODE: () => STRICT_MODE
10
+ });
11
+ const LOCALES = [locales_exports.ENGLISH];
12
+ const REQUIRED_LOCALES = [];
13
+ const DEFAULT_LOCALE = locales_exports.ENGLISH;
14
+ const STRICT_MODE = "inclusive";
15
+
16
+ //#endregion
17
+ export { DEFAULT_LOCALE, LOCALES, REQUIRED_LOCALES, STRICT_MODE, internationalization_exports };
18
+ //# sourceMappingURL=internationalization.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"internationalization.mjs","names":[],"sources":["../../../../../../../../../../../../packages/@intlayer/core/dist/esm/config/dist/esm/defaultValues/internationalization.mjs"],"sourcesContent":["import { __export } from \"../_virtual/rolldown_runtime.mjs\";\nimport { locales_exports } from \"../types/dist/esm/locales.mjs\";\n\n//#region ../config/dist/esm/defaultValues/internationalization.mjs\nvar internationalization_exports = /* @__PURE__ */ __export({\n\tDEFAULT_LOCALE: () => DEFAULT_LOCALE,\n\tLOCALES: () => LOCALES,\n\tREQUIRED_LOCALES: () => REQUIRED_LOCALES,\n\tSTRICT_MODE: () => STRICT_MODE\n});\nconst LOCALES = [locales_exports.ENGLISH];\nconst REQUIRED_LOCALES = [];\nconst DEFAULT_LOCALE = locales_exports.ENGLISH;\nconst STRICT_MODE = \"inclusive\";\n\n//#endregion\nexport { DEFAULT_LOCALE, LOCALES, REQUIRED_LOCALES, STRICT_MODE, internationalization_exports };\n//# sourceMappingURL=internationalization.mjs.map"],"mappings":";;;;AAIA,IAAI,+BAA+C,yBAAS;CAC3D,sBAAsB;CACtB,eAAe;CACf,wBAAwB;CACxB,mBAAmB;CACnB,CAAC;AACF,MAAM,UAAU,CAAC,gBAAgB,QAAQ;AACzC,MAAM,mBAAmB,EAAE;AAC3B,MAAM,iBAAiB,gBAAgB;AACvC,MAAM,cAAc"}
@@ -0,0 +1,14 @@
1
+ import { __export } from "../_virtual/rolldown_runtime.mjs";
2
+ import { ANSIColors } from "../logger.mjs";
3
+
4
+ //#region ../packages/@intlayer/core/dist/esm/config/dist/esm/defaultValues/log.mjs
5
+ var log_exports = /* @__PURE__ */ __export({
6
+ MODE: () => MODE,
7
+ PREFIX: () => PREFIX
8
+ });
9
+ const MODE = "default";
10
+ const PREFIX = `${ANSIColors.GREY_DARK}[intlayer] ${ANSIColors.RESET}`;
11
+
12
+ //#endregion
13
+ export { MODE, PREFIX, log_exports };
14
+ //# sourceMappingURL=log.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"log.mjs","names":[],"sources":["../../../../../../../../../../../../packages/@intlayer/core/dist/esm/config/dist/esm/defaultValues/log.mjs"],"sourcesContent":["import { ANSIColors } from \"../logger.mjs\";\nimport { __export } from \"../_virtual/rolldown_runtime.mjs\";\n\n//#region ../config/dist/esm/defaultValues/log.mjs\nvar log_exports = /* @__PURE__ */ __export({\n\tMODE: () => MODE,\n\tPREFIX: () => PREFIX\n});\nconst MODE = \"default\";\nconst PREFIX = `${ANSIColors.GREY_DARK}[intlayer] ${ANSIColors.RESET}`;\n\n//#endregion\nexport { MODE, PREFIX, log_exports };\n//# sourceMappingURL=log.mjs.map"],"mappings":";;;;AAIA,IAAI,cAA8B,yBAAS;CAC1C,YAAY;CACZ,cAAc;CACd,CAAC;AACF,MAAM,OAAO;AACb,MAAM,SAAS,GAAG,WAAW,UAAU,aAAa,WAAW"}
@@ -0,0 +1,23 @@
1
+ import { __export } from "../_virtual/rolldown_runtime.mjs";
2
+
3
+ //#region ../packages/@intlayer/core/dist/esm/config/dist/esm/defaultValues/routing.mjs
4
+ var routing_exports = /* @__PURE__ */ __export({
5
+ BASE_PATH: () => BASE_PATH,
6
+ COOKIE_NAME: () => COOKIE_NAME,
7
+ HEADER_NAME: () => HEADER_NAME,
8
+ LOCALE_STORAGE_NAME: () => LOCALE_STORAGE_NAME,
9
+ ROUTING_MODE: () => ROUTING_MODE,
10
+ SERVER_SET_COOKIE: () => SERVER_SET_COOKIE,
11
+ STORAGE: () => STORAGE
12
+ });
13
+ const HEADER_NAME = "x-intlayer-locale";
14
+ const COOKIE_NAME = "INTLAYER_LOCALE";
15
+ const LOCALE_STORAGE_NAME = "INTLAYER_LOCALE";
16
+ const BASE_PATH = "";
17
+ const SERVER_SET_COOKIE = "always";
18
+ const ROUTING_MODE = "prefix-no-default";
19
+ const STORAGE = ["cookie", "header"];
20
+
21
+ //#endregion
22
+ export { BASE_PATH, ROUTING_MODE, STORAGE, routing_exports };
23
+ //# sourceMappingURL=routing.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"routing.mjs","names":[],"sources":["../../../../../../../../../../../../packages/@intlayer/core/dist/esm/config/dist/esm/defaultValues/routing.mjs"],"sourcesContent":["import { __export } from \"../_virtual/rolldown_runtime.mjs\";\n\n//#region ../config/dist/esm/defaultValues/routing.mjs\nvar routing_exports = /* @__PURE__ */ __export({\n\tBASE_PATH: () => BASE_PATH,\n\tCOOKIE_NAME: () => COOKIE_NAME,\n\tHEADER_NAME: () => HEADER_NAME,\n\tLOCALE_STORAGE_NAME: () => LOCALE_STORAGE_NAME,\n\tROUTING_MODE: () => ROUTING_MODE,\n\tSERVER_SET_COOKIE: () => SERVER_SET_COOKIE,\n\tSTORAGE: () => STORAGE\n});\nconst HEADER_NAME = \"x-intlayer-locale\";\nconst COOKIE_NAME = \"INTLAYER_LOCALE\";\nconst LOCALE_STORAGE_NAME = \"INTLAYER_LOCALE\";\nconst BASE_PATH = \"\";\nconst SERVER_SET_COOKIE = \"always\";\nconst ROUTING_MODE = \"prefix-no-default\";\nconst STORAGE = [\"cookie\", \"header\"];\n\n//#endregion\nexport { BASE_PATH, ROUTING_MODE, STORAGE, routing_exports };\n//# sourceMappingURL=routing.mjs.map"],"mappings":";;;AAGA,IAAI,kBAAkC,yBAAS;CAC9C,iBAAiB;CACjB,mBAAmB;CACnB,mBAAmB;CACnB,2BAA2B;CAC3B,oBAAoB;CACpB,yBAAyB;CACzB,eAAe;CACf,CAAC;AACF,MAAM,cAAc;AACpB,MAAM,cAAc;AACpB,MAAM,sBAAsB;AAC5B,MAAM,YAAY;AAClB,MAAM,oBAAoB;AAC1B,MAAM,eAAe;AACrB,MAAM,UAAU,CAAC,UAAU,SAAS"}
@@ -0,0 +1,24 @@
1
+ import { existsSync } from "node:fs";
2
+ import dotenv from "dotenv";
3
+
4
+ //#region ../packages/@intlayer/core/dist/esm/config/dist/esm/loadEnvFile.mjs
5
+ const DEFAULT_ENV = "development";
6
+ const loadEnvFile = (options) => {
7
+ const env = options?.env ?? DEFAULT_ENV;
8
+ const envFiles = options?.envFile ? [options.envFile] : [
9
+ `.env.${env}.local`,
10
+ `.env.${env}`,
11
+ ".env.local",
12
+ ".env"
13
+ ];
14
+ const result = {};
15
+ dotenv.config({
16
+ path: envFiles,
17
+ processEnv: result
18
+ });
19
+ return result;
20
+ };
21
+
22
+ //#endregion
23
+ export { loadEnvFile };
24
+ //# sourceMappingURL=loadEnvFile.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"loadEnvFile.mjs","names":[],"sources":["../../../../../../../../../../../packages/@intlayer/core/dist/esm/config/dist/esm/loadEnvFile.mjs"],"sourcesContent":["import { existsSync } from \"node:fs\";\nimport dotenv from \"dotenv\";\n\n//#region ../config/dist/esm/loadEnvFile.mjs\nconst DEFAULT_ENV = \"development\";\nconst loadEnvFile = (options) => {\n\tconst env = options?.env ?? DEFAULT_ENV;\n\tconst envFiles = options?.envFile ? [options.envFile] : [\n\t\t`.env.${env}.local`,\n\t\t`.env.${env}`,\n\t\t\".env.local\",\n\t\t\".env\"\n\t];\n\tconst result = {};\n\tdotenv.config({\n\t\tpath: envFiles,\n\t\tprocessEnv: result\n\t});\n\treturn result;\n};\n\n//#endregion\nexport { loadEnvFile };\n//# sourceMappingURL=loadEnvFile.mjs.map"],"mappings":";;;;AAIA,MAAM,cAAc;AACpB,MAAM,eAAe,YAAY;CAChC,MAAM,MAAM,SAAS,OAAO;CAC5B,MAAM,WAAW,SAAS,UAAU,CAAC,QAAQ,QAAQ,GAAG;EACvD,QAAQ,IAAI;EACZ,QAAQ;EACR;EACA;EACA;CACD,MAAM,SAAS,EAAE;AACjB,QAAO,OAAO;EACb,MAAM;EACN,YAAY;EACZ,CAAC;AACF,QAAO"}
@@ -0,0 +1,23 @@
1
+ import { dirname, extname } from "node:path";
2
+ import { buildSync } from "esbuild";
3
+ import { pathToFileURL } from "node:url";
4
+
5
+ //#region ../packages/@intlayer/core/dist/esm/config/dist/esm/loadExternalFile/bundleFile.mjs
6
+ const getLoader = (extension) => {
7
+ switch (extension) {
8
+ case ".js": return "js";
9
+ case ".jsx": return "jsx";
10
+ case ".mjs": return "js";
11
+ case ".ts": return "ts";
12
+ case ".tsx": return "tsx";
13
+ case ".cjs": return "js";
14
+ case ".json": return "json";
15
+ case ".md": return "text";
16
+ case ".mdx": return "text";
17
+ default: return "js";
18
+ }
19
+ };
20
+
21
+ //#endregion
22
+ export { getLoader };
23
+ //# sourceMappingURL=bundleFile.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bundleFile.mjs","names":[],"sources":["../../../../../../../../../../../../packages/@intlayer/core/dist/esm/config/dist/esm/loadExternalFile/bundleFile.mjs"],"sourcesContent":["import { dirname, extname } from \"node:path\";\nimport { buildSync } from \"esbuild\";\nimport { pathToFileURL } from \"node:url\";\n\n//#region ../config/dist/esm/loadExternalFile/bundleFile.mjs\nconst getLoader = (extension) => {\n\tswitch (extension) {\n\t\tcase \".js\": return \"js\";\n\t\tcase \".jsx\": return \"jsx\";\n\t\tcase \".mjs\": return \"js\";\n\t\tcase \".ts\": return \"ts\";\n\t\tcase \".tsx\": return \"tsx\";\n\t\tcase \".cjs\": return \"js\";\n\t\tcase \".json\": return \"json\";\n\t\tcase \".md\": return \"text\";\n\t\tcase \".mdx\": return \"text\";\n\t\tdefault: return \"js\";\n\t}\n};\n\n//#endregion\nexport { getLoader };\n//# sourceMappingURL=bundleFile.mjs.map"],"mappings":";;;;;AAKA,MAAM,aAAa,cAAc;AAChC,SAAQ,WAAR;EACC,KAAK,MAAO,QAAO;EACnB,KAAK,OAAQ,QAAO;EACpB,KAAK,OAAQ,QAAO;EACpB,KAAK,MAAO,QAAO;EACnB,KAAK,OAAQ,QAAO;EACpB,KAAK,OAAQ,QAAO;EACpB,KAAK,QAAS,QAAO;EACrB,KAAK,MAAO,QAAO;EACnB,KAAK,OAAQ,QAAO;EACpB,QAAS,QAAO"}
@@ -0,0 +1,47 @@
1
+ import { logger } from "../logger.mjs";
2
+ import { getProjectRequire } from "../utils/ESMxCJSHelpers.mjs";
3
+ import { parseFileContent } from "./parseFileContent.mjs";
4
+ import { transpileTSToMJSSync } from "./transpileTSToMJS.mjs";
5
+ import { extname } from "node:path";
6
+ import "node:fs/promises";
7
+ import { readFileSync } from "node:fs";
8
+
9
+ //#region ../packages/@intlayer/core/dist/esm/config/dist/esm/loadExternalFile/loadExternalFile.mjs
10
+ /**
11
+ * Load the content declaration from the given path
12
+ *
13
+ * Accepts JSON, JS, MJS and TS files as configuration
14
+ */
15
+ const loadExternalFileSync = (filePath, options) => {
16
+ const fileExtension = extname(filePath);
17
+ const safeProjectRequire = options?.projectRequire ?? getProjectRequire();
18
+ try {
19
+ if (fileExtension === "json") {
20
+ delete safeProjectRequire.cache[safeProjectRequire.resolve(filePath)];
21
+ return safeProjectRequire(filePath);
22
+ }
23
+ const moduleResultString = transpileTSToMJSSync(readFileSync(filePath, "utf-8"), filePath);
24
+ if (!moduleResultString) {
25
+ logger("File could not be loaded.", { level: "error" });
26
+ return;
27
+ }
28
+ const fileContent = parseFileContent(moduleResultString, {
29
+ projectRequire: options?.projectRequire,
30
+ envVarOptions: options?.envVarOptions,
31
+ additionalEnvVars: options?.additionalEnvVars,
32
+ mocks: options?.mocks,
33
+ aliases: options?.aliases
34
+ });
35
+ if (typeof fileContent === "undefined") {
36
+ logger(`File file could not be loaded. Path : ${filePath}`);
37
+ return;
38
+ }
39
+ return fileContent;
40
+ } catch (error) {
41
+ logger([`Error: ${error.message} - `, JSON.stringify(error.stack, null, 2)], { level: "error" });
42
+ }
43
+ };
44
+
45
+ //#endregion
46
+ export { loadExternalFileSync };
47
+ //# sourceMappingURL=loadExternalFile.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"loadExternalFile.mjs","names":[],"sources":["../../../../../../../../../../../../packages/@intlayer/core/dist/esm/config/dist/esm/loadExternalFile/loadExternalFile.mjs"],"sourcesContent":["import { logger } from \"../logger.mjs\";\nimport { getProjectRequire } from \"../utils/ESMxCJSHelpers.mjs\";\nimport { parseFileContent } from \"./parseFileContent.mjs\";\nimport { transpileTSToMJSSync } from \"./transpileTSToMJS.mjs\";\nimport { extname } from \"node:path\";\nimport \"node:fs/promises\";\nimport { readFileSync } from \"node:fs\";\n\n//#region ../config/dist/esm/loadExternalFile/loadExternalFile.mjs\n/**\n* Load the content declaration from the given path\n*\n* Accepts JSON, JS, MJS and TS files as configuration\n*/\nconst loadExternalFileSync = (filePath, options) => {\n\tconst fileExtension = extname(filePath);\n\tconst safeProjectRequire = options?.projectRequire ?? getProjectRequire();\n\ttry {\n\t\tif (fileExtension === \"json\") {\n\t\t\tdelete safeProjectRequire.cache[safeProjectRequire.resolve(filePath)];\n\t\t\treturn safeProjectRequire(filePath);\n\t\t}\n\t\tconst moduleResultString = transpileTSToMJSSync(readFileSync(filePath, \"utf-8\"), filePath);\n\t\tif (!moduleResultString) {\n\t\t\tlogger(\"File could not be loaded.\", { level: \"error\" });\n\t\t\treturn;\n\t\t}\n\t\tconst fileContent = parseFileContent(moduleResultString, {\n\t\t\tprojectRequire: options?.projectRequire,\n\t\t\tenvVarOptions: options?.envVarOptions,\n\t\t\tadditionalEnvVars: options?.additionalEnvVars,\n\t\t\tmocks: options?.mocks,\n\t\t\taliases: options?.aliases\n\t\t});\n\t\tif (typeof fileContent === \"undefined\") {\n\t\t\tlogger(`File file could not be loaded. Path : ${filePath}`);\n\t\t\treturn;\n\t\t}\n\t\treturn fileContent;\n\t} catch (error) {\n\t\tlogger([`Error: ${error.message} - `, JSON.stringify(error.stack, null, 2)], { level: \"error\" });\n\t}\n};\n\n//#endregion\nexport { loadExternalFileSync };\n//# sourceMappingURL=loadExternalFile.mjs.map"],"mappings":";;;;;;;;;;;;;;AAcA,MAAM,wBAAwB,UAAU,YAAY;CACnD,MAAM,gBAAgB,QAAQ,SAAS;CACvC,MAAM,qBAAqB,SAAS,kBAAkB,mBAAmB;AACzE,KAAI;AACH,MAAI,kBAAkB,QAAQ;AAC7B,UAAO,mBAAmB,MAAM,mBAAmB,QAAQ,SAAS;AACpE,UAAO,mBAAmB,SAAS;;EAEpC,MAAM,qBAAqB,qBAAqB,aAAa,UAAU,QAAQ,EAAE,SAAS;AAC1F,MAAI,CAAC,oBAAoB;AACxB,UAAO,6BAA6B,EAAE,OAAO,SAAS,CAAC;AACvD;;EAED,MAAM,cAAc,iBAAiB,oBAAoB;GACxD,gBAAgB,SAAS;GACzB,eAAe,SAAS;GACxB,mBAAmB,SAAS;GAC5B,OAAO,SAAS;GAChB,SAAS,SAAS;GAClB,CAAC;AACF,MAAI,OAAO,gBAAgB,aAAa;AACvC,UAAO,yCAAyC,WAAW;AAC3D;;AAED,SAAO;UACC,OAAO;AACf,SAAO,CAAC,UAAU,MAAM,QAAQ,MAAM,KAAK,UAAU,MAAM,OAAO,MAAM,EAAE,CAAC,EAAE,EAAE,OAAO,SAAS,CAAC"}
@@ -0,0 +1,63 @@
1
+ import { getProjectRequire } from "../utils/ESMxCJSHelpers.mjs";
2
+ import { loadEnvFile } from "../loadEnvFile.mjs";
3
+ import { runInNewContext } from "node:vm";
4
+ import * as esbuild from "esbuild";
5
+
6
+ //#region ../packages/@intlayer/core/dist/esm/config/dist/esm/loadExternalFile/parseFileContent.mjs
7
+ const getSandBoxContext = (options) => {
8
+ const { envVarOptions, projectRequire, additionalEnvVars, mocks, aliases } = options ?? {};
9
+ let additionalGlobalVar = {};
10
+ const baseRequire = typeof projectRequire === "function" ? projectRequire : getProjectRequire();
11
+ const mockedRequire = (() => {
12
+ const mockTable = Object.assign({ esbuild }, mocks);
13
+ const aliasTable = Object.assign({}, aliases);
14
+ const wrappedRequire = function mockableRequire(id) {
15
+ const target = aliasTable?.[id] ? aliasTable[id] : id;
16
+ if (mockTable && Object.hasOwn(mockTable, target)) return mockTable[target];
17
+ if (target !== id && mockTable && Object.hasOwn(mockTable, id)) return mockTable[id];
18
+ return baseRequire(target);
19
+ };
20
+ wrappedRequire.resolve = baseRequire.resolve.bind(baseRequire);
21
+ wrappedRequire.main = baseRequire.main;
22
+ wrappedRequire.extensions = baseRequire.extensions;
23
+ wrappedRequire.cache = baseRequire.cache;
24
+ return wrappedRequire;
25
+ })();
26
+ try {
27
+ additionalGlobalVar = { React: baseRequire("react") };
28
+ } catch (_err) {}
29
+ const sandboxContext = {
30
+ exports: { default: {} },
31
+ module: { exports: {} },
32
+ process: {
33
+ ...process,
34
+ env: {
35
+ ...process.env,
36
+ ...loadEnvFile(envVarOptions),
37
+ ...additionalEnvVars
38
+ }
39
+ },
40
+ console,
41
+ require: mockedRequire,
42
+ ...additionalGlobalVar
43
+ };
44
+ Object.getOwnPropertyNames(globalThis).forEach((key) => {
45
+ if (!(key in sandboxContext)) sandboxContext[key] = globalThis[key];
46
+ });
47
+ return sandboxContext;
48
+ };
49
+ const parseFileContent = (fileContentString, options) => {
50
+ const sandboxContext = getSandBoxContext(options);
51
+ runInNewContext(`"use strict";\n${fileContentString}`, sandboxContext);
52
+ const candidates = [
53
+ sandboxContext.exports?.default,
54
+ sandboxContext.module?.exports?.defaults,
55
+ sandboxContext.module?.exports?.default,
56
+ sandboxContext.module?.exports
57
+ ];
58
+ for (const candidate of candidates) if (candidate && typeof candidate === "object" && Object.keys(candidate).length > 0) return candidate;
59
+ };
60
+
61
+ //#endregion
62
+ export { parseFileContent };
63
+ //# sourceMappingURL=parseFileContent.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parseFileContent.mjs","names":[],"sources":["../../../../../../../../../../../../packages/@intlayer/core/dist/esm/config/dist/esm/loadExternalFile/parseFileContent.mjs"],"sourcesContent":["import { getProjectRequire } from \"../utils/ESMxCJSHelpers.mjs\";\nimport { loadEnvFile } from \"../loadEnvFile.mjs\";\nimport { runInNewContext } from \"node:vm\";\nimport * as esbuild from \"esbuild\";\n\n//#region ../config/dist/esm/loadExternalFile/parseFileContent.mjs\nconst getSandBoxContext = (options) => {\n\tconst { envVarOptions, projectRequire, additionalEnvVars, mocks, aliases } = options ?? {};\n\tlet additionalGlobalVar = {};\n\tconst baseRequire = typeof projectRequire === \"function\" ? projectRequire : getProjectRequire();\n\tconst mockedRequire = (() => {\n\t\tconst mockTable = Object.assign({ esbuild }, mocks);\n\t\tconst aliasTable = Object.assign({}, aliases);\n\t\tconst wrappedRequire = function mockableRequire(id) {\n\t\t\tconst target = aliasTable?.[id] ? aliasTable[id] : id;\n\t\t\tif (mockTable && Object.hasOwn(mockTable, target)) return mockTable[target];\n\t\t\tif (target !== id && mockTable && Object.hasOwn(mockTable, id)) return mockTable[id];\n\t\t\treturn baseRequire(target);\n\t\t};\n\t\twrappedRequire.resolve = baseRequire.resolve.bind(baseRequire);\n\t\twrappedRequire.main = baseRequire.main;\n\t\twrappedRequire.extensions = baseRequire.extensions;\n\t\twrappedRequire.cache = baseRequire.cache;\n\t\treturn wrappedRequire;\n\t})();\n\ttry {\n\t\tadditionalGlobalVar = { React: baseRequire(\"react\") };\n\t} catch (_err) {}\n\tconst sandboxContext = {\n\t\texports: { default: {} },\n\t\tmodule: { exports: {} },\n\t\tprocess: {\n\t\t\t...process,\n\t\t\tenv: {\n\t\t\t\t...process.env,\n\t\t\t\t...loadEnvFile(envVarOptions),\n\t\t\t\t...additionalEnvVars\n\t\t\t}\n\t\t},\n\t\tconsole,\n\t\trequire: mockedRequire,\n\t\t...additionalGlobalVar\n\t};\n\tObject.getOwnPropertyNames(globalThis).forEach((key) => {\n\t\tif (!(key in sandboxContext)) sandboxContext[key] = globalThis[key];\n\t});\n\treturn sandboxContext;\n};\nconst parseFileContent = (fileContentString, options) => {\n\tconst sandboxContext = getSandBoxContext(options);\n\trunInNewContext(`\"use strict\";\\n${fileContentString}`, sandboxContext);\n\tconst candidates = [\n\t\tsandboxContext.exports?.default,\n\t\tsandboxContext.module?.exports?.defaults,\n\t\tsandboxContext.module?.exports?.default,\n\t\tsandboxContext.module?.exports\n\t];\n\tfor (const candidate of candidates) if (candidate && typeof candidate === \"object\" && Object.keys(candidate).length > 0) return candidate;\n};\n\n//#endregion\nexport { parseFileContent };\n//# sourceMappingURL=parseFileContent.mjs.map"],"mappings":";;;;;;AAMA,MAAM,qBAAqB,YAAY;CACtC,MAAM,EAAE,eAAe,gBAAgB,mBAAmB,OAAO,YAAY,WAAW,EAAE;CAC1F,IAAI,sBAAsB,EAAE;CAC5B,MAAM,cAAc,OAAO,mBAAmB,aAAa,iBAAiB,mBAAmB;CAC/F,MAAM,uBAAuB;EAC5B,MAAM,YAAY,OAAO,OAAO,EAAE,SAAS,EAAE,MAAM;EACnD,MAAM,aAAa,OAAO,OAAO,EAAE,EAAE,QAAQ;EAC7C,MAAM,iBAAiB,SAAS,gBAAgB,IAAI;GACnD,MAAM,SAAS,aAAa,MAAM,WAAW,MAAM;AACnD,OAAI,aAAa,OAAO,OAAO,WAAW,OAAO,CAAE,QAAO,UAAU;AACpE,OAAI,WAAW,MAAM,aAAa,OAAO,OAAO,WAAW,GAAG,CAAE,QAAO,UAAU;AACjF,UAAO,YAAY,OAAO;;AAE3B,iBAAe,UAAU,YAAY,QAAQ,KAAK,YAAY;AAC9D,iBAAe,OAAO,YAAY;AAClC,iBAAe,aAAa,YAAY;AACxC,iBAAe,QAAQ,YAAY;AACnC,SAAO;KACJ;AACJ,KAAI;AACH,wBAAsB,EAAE,OAAO,YAAY,QAAQ,EAAE;UAC7C,MAAM;CACf,MAAM,iBAAiB;EACtB,SAAS,EAAE,SAAS,EAAE,EAAE;EACxB,QAAQ,EAAE,SAAS,EAAE,EAAE;EACvB,SAAS;GACR,GAAG;GACH,KAAK;IACJ,GAAG,QAAQ;IACX,GAAG,YAAY,cAAc;IAC7B,GAAG;IACH;GACD;EACD;EACA,SAAS;EACT,GAAG;EACH;AACD,QAAO,oBAAoB,WAAW,CAAC,SAAS,QAAQ;AACvD,MAAI,EAAE,OAAO,gBAAiB,gBAAe,OAAO,WAAW;GAC9D;AACF,QAAO;;AAER,MAAM,oBAAoB,mBAAmB,YAAY;CACxD,MAAM,iBAAiB,kBAAkB,QAAQ;AACjD,iBAAgB,kBAAkB,qBAAqB,eAAe;CACtE,MAAM,aAAa;EAClB,eAAe,SAAS;EACxB,eAAe,QAAQ,SAAS;EAChC,eAAe,QAAQ,SAAS;EAChC,eAAe,QAAQ;EACvB;AACD,MAAK,MAAM,aAAa,WAAY,KAAI,aAAa,OAAO,cAAc,YAAY,OAAO,KAAK,UAAU,CAAC,SAAS,EAAG,QAAO"}
@@ -0,0 +1,44 @@
1
+ import { getPackageJsonPath } from "../utils/getPackageJsonPath.mjs";
2
+ import { getLoader } from "./bundleFile.mjs";
3
+ import { dirname, extname, join } from "node:path";
4
+ import { buildSync } from "esbuild";
5
+ import { pathToFileURL } from "node:url";
6
+
7
+ //#region ../packages/@intlayer/core/dist/esm/config/dist/esm/loadExternalFile/transpileTSToMJS.mjs
8
+ const getTransformationOptions = (filePath) => ({
9
+ loader: {
10
+ ".js": "js",
11
+ ".jsx": "jsx",
12
+ ".mjs": "js",
13
+ ".ts": "ts",
14
+ ".tsx": "tsx",
15
+ ".cjs": "js",
16
+ ".json": "json",
17
+ ".md": "text",
18
+ ".mdx": "text"
19
+ },
20
+ format: "cjs",
21
+ target: "node20",
22
+ platform: "node",
23
+ write: false,
24
+ packages: "external",
25
+ bundle: true,
26
+ tsconfig: join(getPackageJsonPath(dirname(filePath)).baseDir, "tsconfig.json"),
27
+ define: { "import.meta.url": JSON.stringify(pathToFileURL(filePath).href) }
28
+ });
29
+ const transpileTSToMJSSync = (code, filePath, options) => {
30
+ return buildSync({
31
+ stdin: {
32
+ contents: code,
33
+ loader: getLoader(extname(filePath)),
34
+ resolveDir: dirname(filePath),
35
+ sourcefile: filePath
36
+ },
37
+ ...getTransformationOptions(filePath),
38
+ ...options
39
+ }).outputFiles?.[0].text;
40
+ };
41
+
42
+ //#endregion
43
+ export { transpileTSToMJSSync };
44
+ //# sourceMappingURL=transpileTSToMJS.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"transpileTSToMJS.mjs","names":[],"sources":["../../../../../../../../../../../../packages/@intlayer/core/dist/esm/config/dist/esm/loadExternalFile/transpileTSToMJS.mjs"],"sourcesContent":["import { getPackageJsonPath } from \"../utils/getPackageJsonPath.mjs\";\nimport { getLoader } from \"./bundleFile.mjs\";\nimport { dirname, extname, join } from \"node:path\";\nimport { buildSync } from \"esbuild\";\nimport { pathToFileURL } from \"node:url\";\n\n//#region ../config/dist/esm/loadExternalFile/transpileTSToMJS.mjs\nconst getTransformationOptions = (filePath) => ({\n\tloader: {\n\t\t\".js\": \"js\",\n\t\t\".jsx\": \"jsx\",\n\t\t\".mjs\": \"js\",\n\t\t\".ts\": \"ts\",\n\t\t\".tsx\": \"tsx\",\n\t\t\".cjs\": \"js\",\n\t\t\".json\": \"json\",\n\t\t\".md\": \"text\",\n\t\t\".mdx\": \"text\"\n\t},\n\tformat: \"cjs\",\n\ttarget: \"node20\",\n\tplatform: \"node\",\n\twrite: false,\n\tpackages: \"external\",\n\tbundle: true,\n\ttsconfig: join(getPackageJsonPath(dirname(filePath)).baseDir, \"tsconfig.json\"),\n\tdefine: { \"import.meta.url\": JSON.stringify(pathToFileURL(filePath).href) }\n});\nconst transpileTSToMJSSync = (code, filePath, options) => {\n\treturn buildSync({\n\t\tstdin: {\n\t\t\tcontents: code,\n\t\t\tloader: getLoader(extname(filePath)),\n\t\t\tresolveDir: dirname(filePath),\n\t\t\tsourcefile: filePath\n\t\t},\n\t\t...getTransformationOptions(filePath),\n\t\t...options\n\t}).outputFiles?.[0].text;\n};\n\n//#endregion\nexport { transpileTSToMJSSync };\n//# sourceMappingURL=transpileTSToMJS.mjs.map"],"mappings":";;;;;;;AAOA,MAAM,4BAA4B,cAAc;CAC/C,QAAQ;EACP,OAAO;EACP,QAAQ;EACR,QAAQ;EACR,OAAO;EACP,QAAQ;EACR,QAAQ;EACR,SAAS;EACT,OAAO;EACP,QAAQ;EACR;CACD,QAAQ;CACR,QAAQ;CACR,UAAU;CACV,OAAO;CACP,UAAU;CACV,QAAQ;CACR,UAAU,KAAK,mBAAmB,QAAQ,SAAS,CAAC,CAAC,SAAS,gBAAgB;CAC9E,QAAQ,EAAE,mBAAmB,KAAK,UAAU,cAAc,SAAS,CAAC,KAAK,EAAE;CAC3E;AACD,MAAM,wBAAwB,MAAM,UAAU,YAAY;AACzD,QAAO,UAAU;EAChB,OAAO;GACN,UAAU;GACV,QAAQ,UAAU,QAAQ,SAAS,CAAC;GACpC,YAAY,QAAQ,SAAS;GAC7B,YAAY;GACZ;EACD,GAAG,yBAAyB,SAAS;EACrC,GAAG;EACH,CAAC,CAAC,cAAc,GAAG"}