@intlayer/core 7.0.9-canary.0 → 7.0.9-canary.3

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 (301) hide show
  1. package/README.md +2 -1
  2. package/dist/cjs/config/dist/esm/_virtual/rolldown_runtime.cjs +20 -0
  3. package/dist/cjs/config/dist/esm/_virtual/rolldown_runtime.cjs.map +1 -0
  4. package/dist/cjs/config/dist/esm/built.cjs +8 -0
  5. package/dist/cjs/config/dist/esm/built.cjs.map +1 -0
  6. package/dist/cjs/config/dist/esm/configFile/buildConfigurationFields.cjs +119 -0
  7. package/dist/cjs/config/dist/esm/configFile/buildConfigurationFields.cjs.map +1 -0
  8. package/dist/cjs/config/dist/esm/configFile/getConfiguration.cjs +69 -0
  9. package/dist/cjs/config/dist/esm/configFile/getConfiguration.cjs.map +1 -0
  10. package/dist/cjs/config/dist/esm/configFile/loadConfigurationFile.cjs +26 -0
  11. package/dist/cjs/config/dist/esm/configFile/loadConfigurationFile.cjs.map +1 -0
  12. package/dist/cjs/config/dist/esm/configFile/searchConfigurationFile.cjs +51 -0
  13. package/dist/cjs/config/dist/esm/configFile/searchConfigurationFile.cjs.map +1 -0
  14. package/dist/cjs/config/dist/esm/defaultValues/build.cjs +24 -0
  15. package/dist/cjs/config/dist/esm/defaultValues/build.cjs.map +1 -0
  16. package/dist/cjs/config/dist/esm/defaultValues/content.cjs +78 -0
  17. package/dist/cjs/config/dist/esm/defaultValues/content.cjs.map +1 -0
  18. package/dist/cjs/config/dist/esm/defaultValues/dictionary.cjs +7 -0
  19. package/dist/cjs/config/dist/esm/defaultValues/dictionary.cjs.map +1 -0
  20. package/dist/cjs/config/dist/esm/defaultValues/editor.cjs +36 -0
  21. package/dist/cjs/config/dist/esm/defaultValues/editor.cjs.map +1 -0
  22. package/dist/cjs/config/dist/esm/defaultValues/index.cjs +21 -0
  23. package/dist/cjs/config/dist/esm/defaultValues/index.cjs.map +1 -0
  24. package/dist/cjs/config/dist/esm/defaultValues/internationalization.cjs +22 -0
  25. package/dist/cjs/config/dist/esm/defaultValues/internationalization.cjs.map +1 -0
  26. package/dist/cjs/config/dist/esm/defaultValues/log.cjs +16 -0
  27. package/dist/cjs/config/dist/esm/defaultValues/log.cjs.map +1 -0
  28. package/dist/cjs/config/dist/esm/defaultValues/routing.cjs +26 -0
  29. package/dist/cjs/config/dist/esm/defaultValues/routing.cjs.map +1 -0
  30. package/dist/cjs/config/dist/esm/loadEnvFile.cjs +26 -0
  31. package/dist/cjs/config/dist/esm/loadEnvFile.cjs.map +1 -0
  32. package/dist/cjs/config/dist/esm/loadExternalFile/bundleFile.cjs +23 -0
  33. package/dist/cjs/config/dist/esm/loadExternalFile/bundleFile.cjs.map +1 -0
  34. package/dist/cjs/config/dist/esm/loadExternalFile/loadExternalFile.cjs +47 -0
  35. package/dist/cjs/config/dist/esm/loadExternalFile/loadExternalFile.cjs.map +1 -0
  36. package/dist/cjs/config/dist/esm/loadExternalFile/parseFileContent.cjs +65 -0
  37. package/dist/cjs/config/dist/esm/loadExternalFile/parseFileContent.cjs.map +1 -0
  38. package/dist/cjs/config/dist/esm/loadExternalFile/transpileTSToMJS.cjs +45 -0
  39. package/dist/cjs/config/dist/esm/loadExternalFile/transpileTSToMJS.cjs.map +1 -0
  40. package/dist/cjs/config/dist/esm/logger.cjs +65 -0
  41. package/dist/cjs/config/dist/esm/logger.cjs.map +1 -0
  42. package/dist/cjs/config/dist/esm/types/dist/esm/_virtual/rolldown_runtime.cjs +15 -0
  43. package/dist/cjs/config/dist/esm/types/dist/esm/_virtual/rolldown_runtime.cjs.map +1 -0
  44. package/dist/cjs/config/dist/esm/types/dist/esm/locales.cjs +1128 -0
  45. package/dist/cjs/config/dist/esm/types/dist/esm/locales.cjs.map +1 -0
  46. package/dist/cjs/config/dist/esm/utils/ESMxCJSHelpers.cjs +27 -0
  47. package/dist/cjs/config/dist/esm/utils/ESMxCJSHelpers.cjs.map +1 -0
  48. package/dist/cjs/config/dist/esm/utils/cache.cjs +261 -0
  49. package/dist/cjs/config/dist/esm/utils/cache.cjs.map +1 -0
  50. package/dist/cjs/config/dist/esm/utils/clearModuleCache.cjs +26 -0
  51. package/dist/cjs/config/dist/esm/utils/clearModuleCache.cjs.map +1 -0
  52. package/dist/cjs/config/dist/esm/utils/getPackageJsonPath.cjs +34 -0
  53. package/dist/cjs/config/dist/esm/utils/getPackageJsonPath.cjs.map +1 -0
  54. package/dist/cjs/config/dist/esm/utils/normalizePath.cjs +17 -0
  55. package/dist/cjs/config/dist/esm/utils/normalizePath.cjs.map +1 -0
  56. package/dist/cjs/dictionaries-entry/dist/esm/_virtual/rolldown_runtime.cjs +10 -0
  57. package/dist/cjs/dictionaries-entry/dist/esm/_virtual/rolldown_runtime.cjs.map +1 -0
  58. package/dist/cjs/dictionaries-entry/dist/esm/config/dist/esm/_virtual/rolldown_runtime.cjs +11 -0
  59. package/dist/cjs/dictionaries-entry/dist/esm/config/dist/esm/_virtual/rolldown_runtime.cjs.map +1 -0
  60. package/dist/cjs/dictionaries-entry/dist/esm/config/dist/esm/built.cjs +8 -0
  61. package/dist/cjs/dictionaries-entry/dist/esm/config/dist/esm/built.cjs.map +1 -0
  62. package/dist/cjs/dictionaries-entry/dist/esm/config/dist/esm/configFile/buildConfigurationFields.cjs +119 -0
  63. package/dist/cjs/dictionaries-entry/dist/esm/config/dist/esm/configFile/buildConfigurationFields.cjs.map +1 -0
  64. package/dist/cjs/dictionaries-entry/dist/esm/config/dist/esm/configFile/getConfiguration.cjs +69 -0
  65. package/dist/cjs/dictionaries-entry/dist/esm/config/dist/esm/configFile/getConfiguration.cjs.map +1 -0
  66. package/dist/cjs/dictionaries-entry/dist/esm/config/dist/esm/configFile/loadConfigurationFile.cjs +26 -0
  67. package/dist/cjs/dictionaries-entry/dist/esm/config/dist/esm/configFile/loadConfigurationFile.cjs.map +1 -0
  68. package/dist/cjs/dictionaries-entry/dist/esm/config/dist/esm/configFile/searchConfigurationFile.cjs +51 -0
  69. package/dist/cjs/dictionaries-entry/dist/esm/config/dist/esm/configFile/searchConfigurationFile.cjs.map +1 -0
  70. package/dist/cjs/dictionaries-entry/dist/esm/config/dist/esm/defaultValues/build.cjs +15 -0
  71. package/dist/cjs/dictionaries-entry/dist/esm/config/dist/esm/defaultValues/build.cjs.map +1 -0
  72. package/dist/cjs/dictionaries-entry/dist/esm/config/dist/esm/defaultValues/content.cjs +54 -0
  73. package/dist/cjs/dictionaries-entry/dist/esm/config/dist/esm/defaultValues/content.cjs.map +1 -0
  74. package/dist/cjs/dictionaries-entry/dist/esm/config/dist/esm/defaultValues/dictionary.cjs +7 -0
  75. package/dist/cjs/dictionaries-entry/dist/esm/config/dist/esm/defaultValues/dictionary.cjs.map +1 -0
  76. package/dist/cjs/dictionaries-entry/dist/esm/config/dist/esm/defaultValues/editor.cjs +23 -0
  77. package/dist/cjs/dictionaries-entry/dist/esm/config/dist/esm/defaultValues/editor.cjs.map +1 -0
  78. package/dist/cjs/dictionaries-entry/dist/esm/config/dist/esm/defaultValues/internationalization.cjs +14 -0
  79. package/dist/cjs/dictionaries-entry/dist/esm/config/dist/esm/defaultValues/internationalization.cjs.map +1 -0
  80. package/dist/cjs/dictionaries-entry/dist/esm/config/dist/esm/defaultValues/log.cjs +10 -0
  81. package/dist/cjs/dictionaries-entry/dist/esm/config/dist/esm/defaultValues/log.cjs.map +1 -0
  82. package/dist/cjs/dictionaries-entry/dist/esm/config/dist/esm/defaultValues/routing.cjs +11 -0
  83. package/dist/cjs/dictionaries-entry/dist/esm/config/dist/esm/defaultValues/routing.cjs.map +1 -0
  84. package/dist/cjs/dictionaries-entry/dist/esm/config/dist/esm/loadEnvFile.cjs +26 -0
  85. package/dist/cjs/dictionaries-entry/dist/esm/config/dist/esm/loadEnvFile.cjs.map +1 -0
  86. package/dist/cjs/dictionaries-entry/dist/esm/config/dist/esm/loadExternalFile/bundleFile.cjs +23 -0
  87. package/dist/cjs/dictionaries-entry/dist/esm/config/dist/esm/loadExternalFile/bundleFile.cjs.map +1 -0
  88. package/dist/cjs/dictionaries-entry/dist/esm/config/dist/esm/loadExternalFile/loadExternalFile.cjs +47 -0
  89. package/dist/cjs/dictionaries-entry/dist/esm/config/dist/esm/loadExternalFile/loadExternalFile.cjs.map +1 -0
  90. package/dist/cjs/dictionaries-entry/dist/esm/config/dist/esm/loadExternalFile/parseFileContent.cjs +65 -0
  91. package/dist/cjs/dictionaries-entry/dist/esm/config/dist/esm/loadExternalFile/parseFileContent.cjs.map +1 -0
  92. package/dist/cjs/dictionaries-entry/dist/esm/config/dist/esm/loadExternalFile/transpileTSToMJS.cjs +45 -0
  93. package/dist/cjs/dictionaries-entry/dist/esm/config/dist/esm/loadExternalFile/transpileTSToMJS.cjs.map +1 -0
  94. package/dist/cjs/dictionaries-entry/dist/esm/config/dist/esm/logger.cjs +47 -0
  95. package/dist/cjs/dictionaries-entry/dist/esm/config/dist/esm/logger.cjs.map +1 -0
  96. package/dist/cjs/dictionaries-entry/dist/esm/config/dist/esm/types/dist/esm/_virtual/rolldown_runtime.cjs +15 -0
  97. package/dist/cjs/dictionaries-entry/dist/esm/config/dist/esm/types/dist/esm/_virtual/rolldown_runtime.cjs.map +1 -0
  98. package/dist/cjs/dictionaries-entry/dist/esm/config/dist/esm/types/dist/esm/locales.cjs +1128 -0
  99. package/dist/cjs/dictionaries-entry/dist/esm/config/dist/esm/types/dist/esm/locales.cjs.map +1 -0
  100. package/dist/cjs/dictionaries-entry/dist/esm/config/dist/esm/utils/ESMxCJSHelpers.cjs +27 -0
  101. package/dist/cjs/dictionaries-entry/dist/esm/config/dist/esm/utils/ESMxCJSHelpers.cjs.map +1 -0
  102. package/dist/cjs/dictionaries-entry/dist/esm/config/dist/esm/utils/cache.cjs +261 -0
  103. package/dist/cjs/dictionaries-entry/dist/esm/config/dist/esm/utils/cache.cjs.map +1 -0
  104. package/dist/cjs/dictionaries-entry/dist/esm/config/dist/esm/utils/getPackageJsonPath.cjs +34 -0
  105. package/dist/cjs/dictionaries-entry/dist/esm/config/dist/esm/utils/getPackageJsonPath.cjs.map +1 -0
  106. package/dist/cjs/dictionaries-entry/dist/esm/config/dist/esm/utils/normalizePath.cjs +17 -0
  107. package/dist/cjs/dictionaries-entry/dist/esm/config/dist/esm/utils/normalizePath.cjs.map +1 -0
  108. package/dist/cjs/dictionaries-entry/dist/esm/index.cjs +27 -0
  109. package/dist/cjs/dictionaries-entry/dist/esm/index.cjs.map +1 -0
  110. package/dist/cjs/index.cjs +3 -1
  111. package/dist/cjs/localization/getLocalizedUrl.cjs +33 -10
  112. package/dist/cjs/localization/getLocalizedUrl.cjs.map +1 -1
  113. package/dist/cjs/localization/getMultilingualUrls.cjs +16 -33
  114. package/dist/cjs/localization/getMultilingualUrls.cjs.map +1 -1
  115. package/dist/cjs/localization/getPrefix.cjs +47 -0
  116. package/dist/cjs/localization/getPrefix.cjs.map +1 -0
  117. package/dist/cjs/localization/index.cjs +3 -1
  118. package/dist/cjs/types/dist/esm/_virtual/rolldown_runtime.cjs +15 -0
  119. package/dist/cjs/types/dist/esm/_virtual/rolldown_runtime.cjs.map +1 -0
  120. package/dist/cjs/types/dist/esm/locales.cjs +1128 -0
  121. package/dist/cjs/types/dist/esm/locales.cjs.map +1 -0
  122. package/dist/cjs/types/dist/esm/nodeType.cjs +31 -0
  123. package/dist/cjs/types/dist/esm/nodeType.cjs.map +1 -0
  124. package/dist/esm/_virtual/rolldown_runtime.mjs +8 -0
  125. package/dist/esm/config/dist/esm/_virtual/rolldown_runtime.mjs +20 -0
  126. package/dist/esm/config/dist/esm/_virtual/rolldown_runtime.mjs.map +1 -0
  127. package/dist/esm/config/dist/esm/built.mjs +8 -0
  128. package/dist/esm/config/dist/esm/built.mjs.map +1 -0
  129. package/dist/esm/config/dist/esm/configFile/buildConfigurationFields.mjs +118 -0
  130. package/dist/esm/config/dist/esm/configFile/buildConfigurationFields.mjs.map +1 -0
  131. package/dist/esm/config/dist/esm/configFile/getConfiguration.mjs +67 -0
  132. package/dist/esm/config/dist/esm/configFile/getConfiguration.mjs.map +1 -0
  133. package/dist/esm/config/dist/esm/configFile/loadConfigurationFile.mjs +26 -0
  134. package/dist/esm/config/dist/esm/configFile/loadConfigurationFile.mjs.map +1 -0
  135. package/dist/esm/config/dist/esm/configFile/searchConfigurationFile.mjs +50 -0
  136. package/dist/esm/config/dist/esm/configFile/searchConfigurationFile.mjs.map +1 -0
  137. package/dist/esm/config/dist/esm/defaultValues/build.mjs +19 -0
  138. package/dist/esm/config/dist/esm/defaultValues/build.mjs.map +1 -0
  139. package/dist/esm/config/dist/esm/defaultValues/content.mjs +64 -0
  140. package/dist/esm/config/dist/esm/defaultValues/content.mjs.map +1 -0
  141. package/dist/esm/config/dist/esm/defaultValues/dictionary.mjs +6 -0
  142. package/dist/esm/config/dist/esm/defaultValues/dictionary.mjs.map +1 -0
  143. package/dist/esm/config/dist/esm/defaultValues/editor.mjs +27 -0
  144. package/dist/esm/config/dist/esm/defaultValues/editor.mjs.map +1 -0
  145. package/dist/esm/config/dist/esm/defaultValues/index.mjs +21 -0
  146. package/dist/esm/config/dist/esm/defaultValues/index.mjs.map +1 -0
  147. package/dist/esm/config/dist/esm/defaultValues/internationalization.mjs +18 -0
  148. package/dist/esm/config/dist/esm/defaultValues/internationalization.mjs.map +1 -0
  149. package/dist/esm/config/dist/esm/defaultValues/log.mjs +14 -0
  150. package/dist/esm/config/dist/esm/defaultValues/log.mjs.map +1 -0
  151. package/dist/esm/config/dist/esm/defaultValues/routing.mjs +23 -0
  152. package/dist/esm/config/dist/esm/defaultValues/routing.mjs.map +1 -0
  153. package/dist/esm/config/dist/esm/loadEnvFile.mjs +24 -0
  154. package/dist/esm/config/dist/esm/loadEnvFile.mjs.map +1 -0
  155. package/dist/esm/config/dist/esm/loadExternalFile/bundleFile.mjs +23 -0
  156. package/dist/esm/config/dist/esm/loadExternalFile/bundleFile.mjs.map +1 -0
  157. package/dist/esm/config/dist/esm/loadExternalFile/loadExternalFile.mjs +47 -0
  158. package/dist/esm/config/dist/esm/loadExternalFile/loadExternalFile.mjs.map +1 -0
  159. package/dist/esm/config/dist/esm/loadExternalFile/parseFileContent.mjs +63 -0
  160. package/dist/esm/config/dist/esm/loadExternalFile/parseFileContent.mjs.map +1 -0
  161. package/dist/esm/config/dist/esm/loadExternalFile/transpileTSToMJS.mjs +44 -0
  162. package/dist/esm/config/dist/esm/loadExternalFile/transpileTSToMJS.mjs.map +1 -0
  163. package/dist/esm/config/dist/esm/logger.mjs +59 -0
  164. package/dist/esm/config/dist/esm/logger.mjs.map +1 -0
  165. package/dist/esm/config/dist/esm/types/dist/esm/_virtual/rolldown_runtime.mjs +14 -0
  166. package/dist/esm/config/dist/esm/types/dist/esm/_virtual/rolldown_runtime.mjs.map +1 -0
  167. package/dist/esm/config/dist/esm/types/dist/esm/locales.mjs +1128 -0
  168. package/dist/esm/config/dist/esm/types/dist/esm/locales.mjs.map +1 -0
  169. package/dist/esm/config/dist/esm/utils/ESMxCJSHelpers.mjs +25 -0
  170. package/dist/esm/config/dist/esm/utils/ESMxCJSHelpers.mjs.map +1 -0
  171. package/dist/esm/config/dist/esm/utils/cache.mjs +263 -0
  172. package/dist/esm/config/dist/esm/utils/cache.mjs.map +1 -0
  173. package/dist/esm/config/dist/esm/utils/getPackageJsonPath.mjs +33 -0
  174. package/dist/esm/config/dist/esm/utils/getPackageJsonPath.mjs.map +1 -0
  175. package/dist/esm/config/dist/esm/utils/normalizePath.mjs +16 -0
  176. package/dist/esm/config/dist/esm/utils/normalizePath.mjs.map +1 -0
  177. package/dist/esm/dictionaries-entry/dist/esm/_virtual/rolldown_runtime.mjs +11 -0
  178. package/dist/esm/dictionaries-entry/dist/esm/_virtual/rolldown_runtime.mjs.map +1 -0
  179. package/dist/esm/dictionaries-entry/dist/esm/config/dist/esm/_virtual/rolldown_runtime.mjs +11 -0
  180. package/dist/esm/dictionaries-entry/dist/esm/config/dist/esm/_virtual/rolldown_runtime.mjs.map +1 -0
  181. package/dist/esm/dictionaries-entry/dist/esm/config/dist/esm/built.mjs +8 -0
  182. package/dist/esm/dictionaries-entry/dist/esm/config/dist/esm/built.mjs.map +1 -0
  183. package/dist/esm/dictionaries-entry/dist/esm/config/dist/esm/configFile/buildConfigurationFields.mjs +118 -0
  184. package/dist/esm/dictionaries-entry/dist/esm/config/dist/esm/configFile/buildConfigurationFields.mjs.map +1 -0
  185. package/dist/esm/dictionaries-entry/dist/esm/config/dist/esm/configFile/getConfiguration.mjs +67 -0
  186. package/dist/esm/dictionaries-entry/dist/esm/config/dist/esm/configFile/getConfiguration.mjs.map +1 -0
  187. package/dist/esm/dictionaries-entry/dist/esm/config/dist/esm/configFile/loadConfigurationFile.mjs +26 -0
  188. package/dist/esm/dictionaries-entry/dist/esm/config/dist/esm/configFile/loadConfigurationFile.mjs.map +1 -0
  189. package/dist/esm/dictionaries-entry/dist/esm/config/dist/esm/configFile/searchConfigurationFile.mjs +50 -0
  190. package/dist/esm/dictionaries-entry/dist/esm/config/dist/esm/configFile/searchConfigurationFile.mjs.map +1 -0
  191. package/dist/esm/dictionaries-entry/dist/esm/config/dist/esm/defaultValues/build.mjs +10 -0
  192. package/dist/esm/dictionaries-entry/dist/esm/config/dist/esm/defaultValues/build.mjs.map +1 -0
  193. package/dist/esm/dictionaries-entry/dist/esm/config/dist/esm/defaultValues/content.mjs +40 -0
  194. package/dist/esm/dictionaries-entry/dist/esm/config/dist/esm/defaultValues/content.mjs.map +1 -0
  195. package/dist/esm/dictionaries-entry/dist/esm/config/dist/esm/defaultValues/dictionary.mjs +6 -0
  196. package/dist/esm/dictionaries-entry/dist/esm/config/dist/esm/defaultValues/dictionary.mjs.map +1 -0
  197. package/dist/esm/dictionaries-entry/dist/esm/config/dist/esm/defaultValues/editor.mjs +14 -0
  198. package/dist/esm/dictionaries-entry/dist/esm/config/dist/esm/defaultValues/editor.mjs.map +1 -0
  199. package/dist/esm/dictionaries-entry/dist/esm/config/dist/esm/defaultValues/internationalization.mjs +11 -0
  200. package/dist/esm/dictionaries-entry/dist/esm/config/dist/esm/defaultValues/internationalization.mjs.map +1 -0
  201. package/dist/esm/dictionaries-entry/dist/esm/config/dist/esm/defaultValues/log.mjs +9 -0
  202. package/dist/esm/dictionaries-entry/dist/esm/config/dist/esm/defaultValues/log.mjs.map +1 -0
  203. package/dist/esm/dictionaries-entry/dist/esm/config/dist/esm/defaultValues/routing.mjs +8 -0
  204. package/dist/esm/dictionaries-entry/dist/esm/config/dist/esm/defaultValues/routing.mjs.map +1 -0
  205. package/dist/esm/dictionaries-entry/dist/esm/config/dist/esm/loadEnvFile.mjs +24 -0
  206. package/dist/esm/dictionaries-entry/dist/esm/config/dist/esm/loadEnvFile.mjs.map +1 -0
  207. package/dist/esm/dictionaries-entry/dist/esm/config/dist/esm/loadExternalFile/bundleFile.mjs +23 -0
  208. package/dist/esm/dictionaries-entry/dist/esm/config/dist/esm/loadExternalFile/bundleFile.mjs.map +1 -0
  209. package/dist/esm/dictionaries-entry/dist/esm/config/dist/esm/loadExternalFile/loadExternalFile.mjs +47 -0
  210. package/dist/esm/dictionaries-entry/dist/esm/config/dist/esm/loadExternalFile/loadExternalFile.mjs.map +1 -0
  211. package/dist/esm/dictionaries-entry/dist/esm/config/dist/esm/loadExternalFile/parseFileContent.mjs +63 -0
  212. package/dist/esm/dictionaries-entry/dist/esm/config/dist/esm/loadExternalFile/parseFileContent.mjs.map +1 -0
  213. package/dist/esm/dictionaries-entry/dist/esm/config/dist/esm/loadExternalFile/transpileTSToMJS.mjs +44 -0
  214. package/dist/esm/dictionaries-entry/dist/esm/config/dist/esm/loadExternalFile/transpileTSToMJS.mjs.map +1 -0
  215. package/dist/esm/dictionaries-entry/dist/esm/config/dist/esm/logger.mjs +45 -0
  216. package/dist/esm/dictionaries-entry/dist/esm/config/dist/esm/logger.mjs.map +1 -0
  217. package/dist/esm/dictionaries-entry/dist/esm/config/dist/esm/types/dist/esm/_virtual/rolldown_runtime.mjs +14 -0
  218. package/dist/esm/dictionaries-entry/dist/esm/config/dist/esm/types/dist/esm/_virtual/rolldown_runtime.mjs.map +1 -0
  219. package/dist/esm/dictionaries-entry/dist/esm/config/dist/esm/types/dist/esm/locales.mjs +1128 -0
  220. package/dist/esm/dictionaries-entry/dist/esm/config/dist/esm/types/dist/esm/locales.mjs.map +1 -0
  221. package/dist/esm/dictionaries-entry/dist/esm/config/dist/esm/utils/ESMxCJSHelpers.mjs +25 -0
  222. package/dist/esm/dictionaries-entry/dist/esm/config/dist/esm/utils/ESMxCJSHelpers.mjs.map +1 -0
  223. package/dist/esm/dictionaries-entry/dist/esm/config/dist/esm/utils/cache.mjs +263 -0
  224. package/dist/esm/dictionaries-entry/dist/esm/config/dist/esm/utils/cache.mjs.map +1 -0
  225. package/dist/esm/dictionaries-entry/dist/esm/config/dist/esm/utils/getPackageJsonPath.mjs +33 -0
  226. package/dist/esm/dictionaries-entry/dist/esm/config/dist/esm/utils/getPackageJsonPath.mjs.map +1 -0
  227. package/dist/esm/dictionaries-entry/dist/esm/config/dist/esm/utils/normalizePath.mjs +16 -0
  228. package/dist/esm/dictionaries-entry/dist/esm/config/dist/esm/utils/normalizePath.mjs.map +1 -0
  229. package/dist/esm/dictionaries-entry/dist/esm/index.mjs +25 -0
  230. package/dist/esm/dictionaries-entry/dist/esm/index.mjs.map +1 -0
  231. package/dist/esm/index.mjs +3 -2
  232. package/dist/esm/localization/getLocalizedUrl.mjs +33 -10
  233. package/dist/esm/localization/getLocalizedUrl.mjs.map +1 -1
  234. package/dist/esm/localization/getMultilingualUrls.mjs +16 -33
  235. package/dist/esm/localization/getMultilingualUrls.mjs.map +1 -1
  236. package/dist/esm/localization/getPrefix.mjs +45 -0
  237. package/dist/esm/localization/getPrefix.mjs.map +1 -0
  238. package/dist/esm/localization/index.mjs +3 -2
  239. package/dist/esm/types/dist/esm/_virtual/rolldown_runtime.mjs +14 -0
  240. package/dist/esm/types/dist/esm/_virtual/rolldown_runtime.mjs.map +1 -0
  241. package/dist/esm/types/dist/esm/locales.mjs +1128 -0
  242. package/dist/esm/types/dist/esm/locales.mjs.map +1 -0
  243. package/dist/esm/types/dist/esm/nodeType.mjs +29 -0
  244. package/dist/esm/types/dist/esm/nodeType.mjs.map +1 -0
  245. package/dist/index.d.mts +1323 -0
  246. package/dist/index.mjs +3348 -0
  247. package/dist/types/deepTransformPlugins/getFilterMissingTranslationsContent.d.ts +7 -7
  248. package/dist/types/deepTransformPlugins/getFilterMissingTranslationsContent.d.ts.map +1 -1
  249. package/dist/types/deepTransformPlugins/getFilterTranslationsOnlyContent.d.ts +7 -7
  250. package/dist/types/deepTransformPlugins/getFilterTranslationsOnlyContent.d.ts.map +1 -1
  251. package/dist/types/deepTransformPlugins/getFilteredLocalesContent.d.ts +7 -7
  252. package/dist/types/deepTransformPlugins/getFilteredLocalesContent.d.ts.map +1 -1
  253. package/dist/types/dictionaryManipulator/orderDictionaries.d.ts +2 -2
  254. package/dist/types/dictionaryManipulator/orderDictionaries.d.ts.map +1 -1
  255. package/dist/types/index.d.ts +2 -1
  256. package/dist/types/localization/getLocalizedUrl.d.ts +13 -8
  257. package/dist/types/localization/getLocalizedUrl.d.ts.map +1 -1
  258. package/dist/types/localization/getMultilingualUrls.d.ts +13 -8
  259. package/dist/types/localization/getMultilingualUrls.d.ts.map +1 -1
  260. package/dist/types/localization/getPrefix.d.ts +46 -0
  261. package/dist/types/localization/getPrefix.d.ts.map +1 -0
  262. package/dist/types/localization/index.d.ts +2 -1
  263. package/package.json +20 -17
  264. package/dist/cjs/dictionaryManipulator/getUnmergedDictionaryByKeyPath.cjs +0 -20
  265. package/dist/cjs/dictionaryManipulator/getUnmergedDictionaryByKeyPath.cjs.map +0 -1
  266. package/dist/esm/dictionaryManipulator/getUnmergedDictionaryByKeyPath.mjs +0 -17
  267. package/dist/esm/dictionaryManipulator/getUnmergedDictionaryByKeyPath.mjs.map +0 -1
  268. package/dist/types/deepTransformPlugins/index.d.ts.map +0 -1
  269. package/dist/types/dictionaryManipulator/getUnmergedDictionaryByKeyPath.d.ts +0 -9
  270. package/dist/types/dictionaryManipulator/getUnmergedDictionaryByKeyPath.d.ts.map +0 -1
  271. package/dist/types/dictionaryManipulator/index.d.ts.map +0 -1
  272. package/dist/types/formatters/index.d.ts.map +0 -1
  273. package/dist/types/index.d.ts.map +0 -1
  274. package/dist/types/interpreter/getContent/index.d.ts.map +0 -1
  275. package/dist/types/interpreter/getIntlayerAsync.d.ts +0 -13
  276. package/dist/types/interpreter/getIntlayerAsync.d.ts.map +0 -1
  277. package/dist/types/interpreter/index.d.ts.map +0 -1
  278. package/dist/types/localization/index.d.ts.map +0 -1
  279. package/dist/types/localization/localeList.d.ts +0 -3
  280. package/dist/types/localization/localeList.d.ts.map +0 -1
  281. package/dist/types/transpiler/condition/index.d.ts.map +0 -1
  282. package/dist/types/transpiler/enumeration/index.d.ts.map +0 -1
  283. package/dist/types/transpiler/file/index.d.ts.map +0 -1
  284. package/dist/types/transpiler/gender/index.d.ts.map +0 -1
  285. package/dist/types/transpiler/index.d.ts.map +0 -1
  286. package/dist/types/transpiler/insertion/index.d.ts.map +0 -1
  287. package/dist/types/transpiler/markdown/index.d.ts.map +0 -1
  288. package/dist/types/transpiler/nesting/index.d.ts.map +0 -1
  289. package/dist/types/transpiler/translation/index.d.ts.map +0 -1
  290. package/dist/types/types/dictionary.d.ts +0 -307
  291. package/dist/types/types/dictionary.d.ts.map +0 -1
  292. package/dist/types/types/index.d.ts +0 -5
  293. package/dist/types/types/index.d.ts.map +0 -1
  294. package/dist/types/types/intlayer.d.ts +0 -5
  295. package/dist/types/types/intlayer.d.ts.map +0 -1
  296. package/dist/types/types/keyPath.d.ts +0 -47
  297. package/dist/types/types/keyPath.d.ts.map +0 -1
  298. package/dist/types/types/nodeType.d.ts +0 -30
  299. package/dist/types/types/nodeType.d.ts.map +0 -1
  300. package/dist/types/types/translation.d.ts +0 -25
  301. package/dist/types/types/translation.d.ts.map +0 -1
@@ -0,0 +1,26 @@
1
+ const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
2
+
3
+ //#region ../config/dist/esm/defaultValues/routing.mjs
4
+ var routing_exports = /* @__PURE__ */ require_rolldown_runtime.__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
+ exports.BASE_PATH = BASE_PATH;
23
+ exports.ROUTING_MODE = ROUTING_MODE;
24
+ exports.STORAGE = STORAGE;
25
+ exports.routing_exports = routing_exports;
26
+ //# sourceMappingURL=routing.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"routing.cjs","names":[],"sources":["../../../../../../../config/dist/esm/defaultValues/routing.mjs"],"sourcesContent":["import { __export } from \"../_virtual/rolldown_runtime.mjs\";\n\n//#region src/defaultValues/routing.ts\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, COOKIE_NAME, HEADER_NAME, LOCALE_STORAGE_NAME, ROUTING_MODE, SERVER_SET_COOKIE, STORAGE, routing_exports };\n//# sourceMappingURL=routing.mjs.map"],"mappings":";;;AAGA,IAAI,kBAAkC,kDAAS;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,26 @@
1
+ const require_rolldown_runtime = require('../../../_virtual/rolldown_runtime.cjs');
2
+ let node_fs = require("node:fs");
3
+ let dotenv = require("dotenv");
4
+ dotenv = require_rolldown_runtime.__toESM(dotenv);
5
+
6
+ //#region ../config/dist/esm/loadEnvFile.mjs
7
+ const DEFAULT_ENV = "development";
8
+ const loadEnvFile = (options) => {
9
+ const env = options?.env ?? DEFAULT_ENV;
10
+ const envFiles = options?.envFile ? [options.envFile] : [
11
+ `.env.${env}.local`,
12
+ `.env.${env}`,
13
+ ".env.local",
14
+ ".env"
15
+ ];
16
+ const result = {};
17
+ dotenv.default.config({
18
+ path: envFiles,
19
+ processEnv: result
20
+ });
21
+ return result;
22
+ };
23
+
24
+ //#endregion
25
+ exports.loadEnvFile = loadEnvFile;
26
+ //# sourceMappingURL=loadEnvFile.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"loadEnvFile.cjs","names":[],"sources":["../../../../../../config/dist/esm/loadEnvFile.mjs"],"sourcesContent":["import { existsSync } from \"node:fs\";\nimport dotenv from \"dotenv\";\n\n//#region src/loadEnvFile.ts\nconst DEFAULT_ENV = \"development\";\nconst getEnvFilePath = (env = \"development\", envFile) => {\n\treturn (envFile ? [envFile] : [\n\t\t`.env.${env}.local`,\n\t\t`.env.${env}`,\n\t\t\".env.local\",\n\t\t\".env\"\n\t]).find(existsSync);\n};\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 { getEnvFilePath, loadEnvFile };\n//# sourceMappingURL=loadEnvFile.mjs.map"],"mappings":";;;;;;AAIA,MAAM,cAAc;AASpB,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,gBAAO,OAAO;EACb,MAAM;EACN,YAAY;EACZ,CAAC;AACF,QAAO"}
@@ -0,0 +1,23 @@
1
+ let node_path = require("node:path");
2
+ let esbuild = require("esbuild");
3
+ let node_url = require("node:url");
4
+
5
+ //#region ../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
+ exports.getLoader = getLoader;
23
+ //# sourceMappingURL=bundleFile.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bundleFile.cjs","names":[],"sources":["../../../../../../../config/dist/esm/loadExternalFile/bundleFile.mjs"],"sourcesContent":["import { dirname, extname } from \"node:path\";\nimport { build, buildSync } from \"esbuild\";\nimport { pathToFileURL } from \"node:url\";\n\n//#region src/loadExternalFile/bundleFile.ts\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};\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: \"node16\",\n\tplatform: \"neutral\",\n\twrite: false,\n\tpackages: \"bundle\",\n\texternal: [\"esbuild\"],\n\tbundle: true,\n\tdefine: { \"import.meta.url\": JSON.stringify(pathToFileURL(filePath).href) }\n});\nconst bundleFileSync = (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};\nconst bundleFile = async (code, filePath, options) => {\n\treturn (await build({\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 { bundleFile, bundleFileSync, 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
+ const require_rolldown_runtime = require('../../../../_virtual/rolldown_runtime.cjs');
2
+ const require_logger = require('../logger.cjs');
3
+ const require_ESMxCJSHelpers = require('../utils/ESMxCJSHelpers.cjs');
4
+ const require_parseFileContent = require('./parseFileContent.cjs');
5
+ const require_transpileTSToMJS = require('./transpileTSToMJS.cjs');
6
+ let node_path = require("node:path");
7
+ let node_fs = require("node:fs");
8
+
9
+ //#region ../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 = (0, node_path.extname)(filePath);
17
+ const safeProjectRequire = options?.projectRequire ?? require_ESMxCJSHelpers.getProjectRequire();
18
+ try {
19
+ if (fileExtension === "json") {
20
+ delete safeProjectRequire.cache[safeProjectRequire.resolve(filePath)];
21
+ return safeProjectRequire(filePath);
22
+ }
23
+ const moduleResultString = require_transpileTSToMJS.transpileTSToMJSSync((0, node_fs.readFileSync)(filePath, "utf-8"), filePath);
24
+ if (!moduleResultString) {
25
+ require_logger.logger("File could not be loaded.", { level: "error" });
26
+ return;
27
+ }
28
+ const fileContent = require_parseFileContent.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
+ require_logger.logger(`File file could not be loaded. Path : ${filePath}`);
37
+ return;
38
+ }
39
+ return fileContent;
40
+ } catch (error) {
41
+ require_logger.logger([`Error: ${error.message} - `, JSON.stringify(error.stack, null, 2)], { level: "error" });
42
+ }
43
+ };
44
+
45
+ //#endregion
46
+ exports.loadExternalFileSync = loadExternalFileSync;
47
+ //# sourceMappingURL=loadExternalFile.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"loadExternalFile.cjs","names":["getProjectRequire","transpileTSToMJSSync","parseFileContent"],"sources":["../../../../../../../config/dist/esm/loadExternalFile/loadExternalFile.mjs"],"sourcesContent":["import { colorizePath, logger } from \"../logger.mjs\";\nimport { getProjectRequire } from \"../utils/ESMxCJSHelpers.mjs\";\nimport { parseFileContent } from \"./parseFileContent.mjs\";\nimport { transpileTSToMJS, transpileTSToMJSSync } from \"./transpileTSToMJS.mjs\";\nimport { extname } from \"node:path\";\nimport { readFile } from \"node:fs/promises\";\nimport { readFileSync } from \"node:fs\";\n\n//#region src/loadExternalFile/loadExternalFile.ts\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* Load the content declaration from the given path\n*\n* Accepts JSON, JS, MJS and TS files as configuration\n*/\nconst loadExternalFile = async (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 = await transpileTSToMJS(await readFile(filePath, \"utf-8\"), filePath, options?.buildOptions);\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 : ${colorizePath(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 { loadExternalFile, loadExternalFileSync };\n//# sourceMappingURL=loadExternalFile.mjs.map"],"mappings":";;;;;;;;;;;;;;AAcA,MAAM,wBAAwB,UAAU,YAAY;CACnD,MAAM,uCAAwB,SAAS;CACvC,MAAM,qBAAqB,SAAS,kBAAkBA,0CAAmB;AACzE,KAAI;AACH,MAAI,kBAAkB,QAAQ;AAC7B,UAAO,mBAAmB,MAAM,mBAAmB,QAAQ,SAAS;AACpE,UAAO,mBAAmB,SAAS;;EAEpC,MAAM,qBAAqBC,wEAAkC,UAAU,QAAQ,EAAE,SAAS;AAC1F,MAAI,CAAC,oBAAoB;AACxB,yBAAO,6BAA6B,EAAE,OAAO,SAAS,CAAC;AACvD;;EAED,MAAM,cAAcC,0CAAiB,oBAAoB;GACxD,gBAAgB,SAAS;GACzB,eAAe,SAAS;GACxB,mBAAmB,SAAS;GAC5B,OAAO,SAAS;GAChB,SAAS,SAAS;GAClB,CAAC;AACF,MAAI,OAAO,gBAAgB,aAAa;AACvC,yBAAO,yCAAyC,WAAW;AAC3D;;AAED,SAAO;UACC,OAAO;AACf,wBAAO,CAAC,UAAU,MAAM,QAAQ,MAAM,KAAK,UAAU,MAAM,OAAO,MAAM,EAAE,CAAC,EAAE,EAAE,OAAO,SAAS,CAAC"}
@@ -0,0 +1,65 @@
1
+ const require_rolldown_runtime = require('../../../../_virtual/rolldown_runtime.cjs');
2
+ const require_ESMxCJSHelpers = require('../utils/ESMxCJSHelpers.cjs');
3
+ const require_loadEnvFile = require('../loadEnvFile.cjs');
4
+ let node_vm = require("node:vm");
5
+ let esbuild = require("esbuild");
6
+ esbuild = require_rolldown_runtime.__toESM(esbuild);
7
+
8
+ //#region ../config/dist/esm/loadExternalFile/parseFileContent.mjs
9
+ const getSandBoxContext = (options) => {
10
+ const { envVarOptions, projectRequire, additionalEnvVars, mocks, aliases } = options ?? {};
11
+ let additionalGlobalVar = {};
12
+ const baseRequire = typeof projectRequire === "function" ? projectRequire : require_ESMxCJSHelpers.getProjectRequire();
13
+ const mockedRequire = (() => {
14
+ const mockTable = Object.assign({ esbuild }, mocks);
15
+ const aliasTable = Object.assign({}, aliases);
16
+ const wrappedRequire = function mockableRequire(id) {
17
+ const target = aliasTable?.[id] ? aliasTable[id] : id;
18
+ if (mockTable && Object.hasOwn(mockTable, target)) return mockTable[target];
19
+ if (target !== id && mockTable && Object.hasOwn(mockTable, id)) return mockTable[id];
20
+ return baseRequire(target);
21
+ };
22
+ wrappedRequire.resolve = baseRequire.resolve.bind(baseRequire);
23
+ wrappedRequire.main = baseRequire.main;
24
+ wrappedRequire.extensions = baseRequire.extensions;
25
+ wrappedRequire.cache = baseRequire.cache;
26
+ return wrappedRequire;
27
+ })();
28
+ try {
29
+ additionalGlobalVar = { React: baseRequire("react") };
30
+ } catch (_err) {}
31
+ const sandboxContext = {
32
+ exports: { default: {} },
33
+ module: { exports: {} },
34
+ process: {
35
+ ...process,
36
+ env: {
37
+ ...process.env,
38
+ ...require_loadEnvFile.loadEnvFile(envVarOptions),
39
+ ...additionalEnvVars
40
+ }
41
+ },
42
+ console,
43
+ require: mockedRequire,
44
+ ...additionalGlobalVar
45
+ };
46
+ Object.getOwnPropertyNames(globalThis).forEach((key) => {
47
+ if (!(key in sandboxContext)) sandboxContext[key] = globalThis[key];
48
+ });
49
+ return sandboxContext;
50
+ };
51
+ const parseFileContent = (fileContentString, options) => {
52
+ const sandboxContext = getSandBoxContext(options);
53
+ (0, node_vm.runInNewContext)(`"use strict";\n${fileContentString}`, sandboxContext);
54
+ const candidates = [
55
+ sandboxContext.exports?.default,
56
+ sandboxContext.module?.exports?.defaults,
57
+ sandboxContext.module?.exports?.default,
58
+ sandboxContext.module?.exports
59
+ ];
60
+ for (const candidate of candidates) if (candidate && typeof candidate === "object" && Object.keys(candidate).length > 0) return candidate;
61
+ };
62
+
63
+ //#endregion
64
+ exports.parseFileContent = parseFileContent;
65
+ //# sourceMappingURL=parseFileContent.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parseFileContent.cjs","names":["getProjectRequire","loadEnvFile"],"sources":["../../../../../../../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 src/loadExternalFile/parseFileContent.ts\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 { getSandBoxContext, 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,iBAAiBA,0CAAmB;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,GAAGC,gCAAY,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,8BAAgB,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,45 @@
1
+ const require_rolldown_runtime = require('../../../../_virtual/rolldown_runtime.cjs');
2
+ const require_getPackageJsonPath = require('../utils/getPackageJsonPath.cjs');
3
+ const require_bundleFile = require('./bundleFile.cjs');
4
+ let node_path = require("node:path");
5
+ let esbuild = require("esbuild");
6
+ let node_url = require("node:url");
7
+
8
+ //#region ../config/dist/esm/loadExternalFile/transpileTSToMJS.mjs
9
+ const getTransformationOptions = (filePath) => ({
10
+ loader: {
11
+ ".js": "js",
12
+ ".jsx": "jsx",
13
+ ".mjs": "js",
14
+ ".ts": "ts",
15
+ ".tsx": "tsx",
16
+ ".cjs": "js",
17
+ ".json": "json",
18
+ ".md": "text",
19
+ ".mdx": "text"
20
+ },
21
+ format: "cjs",
22
+ target: "node20",
23
+ platform: "node",
24
+ write: false,
25
+ packages: "external",
26
+ bundle: true,
27
+ tsconfig: (0, node_path.join)(require_getPackageJsonPath.getPackageJsonPath((0, node_path.dirname)(filePath)).baseDir, "tsconfig.json"),
28
+ define: { "import.meta.url": JSON.stringify((0, node_url.pathToFileURL)(filePath).href) }
29
+ });
30
+ const transpileTSToMJSSync = (code, filePath, options) => {
31
+ return (0, esbuild.buildSync)({
32
+ stdin: {
33
+ contents: code,
34
+ loader: require_bundleFile.getLoader((0, node_path.extname)(filePath)),
35
+ resolveDir: (0, node_path.dirname)(filePath),
36
+ sourcefile: filePath
37
+ },
38
+ ...getTransformationOptions(filePath),
39
+ ...options
40
+ }).outputFiles?.[0].text;
41
+ };
42
+
43
+ //#endregion
44
+ exports.transpileTSToMJSSync = transpileTSToMJSSync;
45
+ //# sourceMappingURL=transpileTSToMJS.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"transpileTSToMJS.cjs","names":["getPackageJsonPath","getLoader"],"sources":["../../../../../../../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 { build, buildSync } from \"esbuild\";\nimport { pathToFileURL } from \"node:url\";\n\n//#region src/loadExternalFile/transpileTSToMJS.ts\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};\nconst transpileTSToMJS = async (code, filePath, options) => {\n\treturn (await build({\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 { transpileTSToMJS, 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,8BAAeA,qEAA2B,SAAS,CAAC,CAAC,SAAS,gBAAgB;CAC9E,QAAQ,EAAE,mBAAmB,KAAK,sCAAwB,SAAS,CAAC,KAAK,EAAE;CAC3E;AACD,MAAM,wBAAwB,MAAM,UAAU,YAAY;AACzD,+BAAiB;EAChB,OAAO;GACN,UAAU;GACV,QAAQC,oDAAkB,SAAS,CAAC;GACpC,mCAAoB,SAAS;GAC7B,YAAY;GACZ;EACD,GAAG,yBAAyB,SAAS;EACrC,GAAG;EACH,CAAC,CAAC,cAAc,GAAG"}
@@ -0,0 +1,65 @@
1
+
2
+ //#region ../config/dist/esm/logger.mjs
3
+ const logger = (content, details) => {
4
+ const isVerbose = details?.isVerbose ?? false;
5
+ const mode = details?.config?.mode ?? "default";
6
+ const level = details?.level ?? "info";
7
+ const prefix = details?.config?.prefix ? details?.config?.prefix : void 0;
8
+ const log = details?.config?.log ?? console.log;
9
+ const info = details?.config?.info ?? console.info;
10
+ const warn = details?.config?.warn ?? console.warn;
11
+ const error = details?.config?.error ?? console.error;
12
+ const debug = details?.config?.debug ?? console.debug;
13
+ if (mode === "disabled") return;
14
+ if (isVerbose && mode !== "verbose") return;
15
+ const flatContent = prefix ? [prefix, ...[content].flat()] : [content].flat();
16
+ if (level === "debug") return debug(...flatContent);
17
+ if (level === "info") return info(...flatContent);
18
+ if (level === "warn") return warn(...flatContent);
19
+ if (level === "error") return error(...flatContent);
20
+ log(...flatContent);
21
+ };
22
+ let ANSIColors = /* @__PURE__ */ function(ANSIColors$1) {
23
+ ANSIColors$1["RESET"] = "\x1B[0m";
24
+ ANSIColors$1["GREY"] = "\x1B[90m";
25
+ ANSIColors$1["GREY_DARK"] = "\x1B[38;5;239m";
26
+ ANSIColors$1["GREY_LIGHT"] = "\x1B[38;5;252m";
27
+ ANSIColors$1["BLUE"] = "\x1B[34m";
28
+ ANSIColors$1["RED"] = "\x1B[31m";
29
+ ANSIColors$1["GREEN"] = "\x1B[32m";
30
+ ANSIColors$1["YELLOW"] = "\x1B[38;5;226m";
31
+ ANSIColors$1["MAGENTA"] = "\x1B[35m";
32
+ ANSIColors$1["BEIGE"] = "\x1B[38;5;3m";
33
+ ANSIColors$1["ORANGE"] = "\x1B[38;5;208m";
34
+ ANSIColors$1["CYAN"] = "\x1B[36m";
35
+ ANSIColors$1["WHITE"] = "\x1B[37m";
36
+ ANSIColors$1["BOLD"] = "\x1B[1m";
37
+ return ANSIColors$1;
38
+ }({});
39
+ /**
40
+ * The appLogger function takes the logger and merges it with the configuration from the intlayer config file.
41
+ * It allows overriding the default configuration by passing a config object in the details parameter.
42
+ * The configuration is merged with the default configuration from the intlayer config file.
43
+ */
44
+ const getAppLogger = (configuration, globalDetails) => (content, details) => logger(content, {
45
+ ...details ?? {},
46
+ config: {
47
+ ...configuration?.log,
48
+ ...globalDetails?.config,
49
+ ...details?.config ?? {}
50
+ }
51
+ });
52
+ const colorize = (s, color, reset) => color ? `${color}${s}${reset ? typeof reset === "boolean" ? ANSIColors.RESET : reset : ANSIColors.RESET}` : s;
53
+ const colorizeKey = (keyPath, color = ANSIColors.BEIGE, reset = ANSIColors.RESET) => [keyPath].flat().map((key) => colorize(key, color, reset)).join(`, `);
54
+ const colorizePath = (path, color = ANSIColors.GREY, reset = ANSIColors.RESET) => [path].flat().map((p) => colorize(p, color, reset)).join(`, `);
55
+ const x = colorize("✗", ANSIColors.RED);
56
+ const v = colorize("✓", ANSIColors.GREEN);
57
+ const clock = colorize("⏲", ANSIColors.BLUE);
58
+
59
+ //#endregion
60
+ exports.ANSIColors = ANSIColors;
61
+ exports.colorizeKey = colorizeKey;
62
+ exports.colorizePath = colorizePath;
63
+ exports.getAppLogger = getAppLogger;
64
+ exports.logger = logger;
65
+ //# sourceMappingURL=logger.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logger.cjs","names":[],"sources":["../../../../../../config/dist/esm/logger.mjs"],"sourcesContent":["//#region src/logger.ts\nconst logger = (content, details) => {\n\tconst isVerbose = details?.isVerbose ?? false;\n\tconst mode = details?.config?.mode ?? \"default\";\n\tconst level = details?.level ?? \"info\";\n\tconst prefix = details?.config?.prefix ? details?.config?.prefix : void 0;\n\tconst log = details?.config?.log ?? console.log;\n\tconst info = details?.config?.info ?? console.info;\n\tconst warn = details?.config?.warn ?? console.warn;\n\tconst error = details?.config?.error ?? console.error;\n\tconst debug = details?.config?.debug ?? console.debug;\n\tif (mode === \"disabled\") return;\n\tif (isVerbose && mode !== \"verbose\") return;\n\tconst flatContent = prefix ? [prefix, ...[content].flat()] : [content].flat();\n\tif (level === \"debug\") return debug(...flatContent);\n\tif (level === \"info\") return info(...flatContent);\n\tif (level === \"warn\") return warn(...flatContent);\n\tif (level === \"error\") return error(...flatContent);\n\tlog(...flatContent);\n};\nlet ANSIColors = /* @__PURE__ */ function(ANSIColors$1) {\n\tANSIColors$1[\"RESET\"] = \"\\x1B[0m\";\n\tANSIColors$1[\"GREY\"] = \"\\x1B[90m\";\n\tANSIColors$1[\"GREY_DARK\"] = \"\\x1B[38;5;239m\";\n\tANSIColors$1[\"GREY_LIGHT\"] = \"\\x1B[38;5;252m\";\n\tANSIColors$1[\"BLUE\"] = \"\\x1B[34m\";\n\tANSIColors$1[\"RED\"] = \"\\x1B[31m\";\n\tANSIColors$1[\"GREEN\"] = \"\\x1B[32m\";\n\tANSIColors$1[\"YELLOW\"] = \"\\x1B[38;5;226m\";\n\tANSIColors$1[\"MAGENTA\"] = \"\\x1B[35m\";\n\tANSIColors$1[\"BEIGE\"] = \"\\x1B[38;5;3m\";\n\tANSIColors$1[\"ORANGE\"] = \"\\x1B[38;5;208m\";\n\tANSIColors$1[\"CYAN\"] = \"\\x1B[36m\";\n\tANSIColors$1[\"WHITE\"] = \"\\x1B[37m\";\n\tANSIColors$1[\"BOLD\"] = \"\\x1B[1m\";\n\treturn ANSIColors$1;\n}({});\nconst spinnerFrames = [\n\t\"⠋\",\n\t\"⠙\",\n\t\"⠹\",\n\t\"⠸\",\n\t\"⠼\",\n\t\"⠴\",\n\t\"⠦\",\n\t\"⠧\",\n\t\"⠇\",\n\t\"⠏\"\n];\n/**\n* The appLogger function takes the logger and merges it with the configuration from the intlayer config file.\n* It allows overriding the default configuration by passing a config object in the details parameter.\n* The configuration is merged with the default configuration from the intlayer config file.\n*/\nconst getAppLogger = (configuration, globalDetails) => (content, details) => logger(content, {\n\t...details ?? {},\n\tconfig: {\n\t\t...configuration?.log,\n\t\t...globalDetails?.config,\n\t\t...details?.config ?? {}\n\t}\n});\nconst colorize = (s, color, reset) => color ? `${color}${s}${reset ? typeof reset === \"boolean\" ? ANSIColors.RESET : reset : ANSIColors.RESET}` : s;\nconst colorizeLocales = (locales, color = ANSIColors.GREEN, reset = ANSIColors.RESET) => [locales].flat().map((locale) => colorize(locale, color, reset)).join(`, `);\nconst colorizeKey = (keyPath, color = ANSIColors.BEIGE, reset = ANSIColors.RESET) => [keyPath].flat().map((key) => colorize(key, color, reset)).join(`, `);\nconst colorizePath = (path, color = ANSIColors.GREY, reset = ANSIColors.RESET) => [path].flat().map((p) => colorize(p, color, reset)).join(`, `);\n/**\n* Colorize numeric value using Intl.NumberFormat and optional ANSI colors.\n*\n* Examples:\n* colorizeNumber(2, [{ pluralRule: 'one' , color: ANSIColors.GREEN}, { pluralRule: 'other' , color: ANSIColors.RED}]) // \"'\\x1b[31m2\\x1b[0m\"\n*/\nconst colorizeNumber = (number, options = {\n\tzero: ANSIColors.BLUE,\n\tone: ANSIColors.BLUE,\n\ttwo: ANSIColors.BLUE,\n\tfew: ANSIColors.BLUE,\n\tmany: ANSIColors.BLUE,\n\tother: ANSIColors.BLUE\n}) => {\n\tif (number === 0) {\n\t\tconst color$1 = options.zero ?? ANSIColors.GREEN;\n\t\treturn colorize(number.toString(), color$1);\n\t}\n\tconst color = options[new Intl.PluralRules(\"en\").select(number)];\n\treturn colorize(number.toString(), color);\n};\nconst removeColor = (text) => text.replace(/\\x1b\\[[0-9;]*m/g, \"\");\nconst getLength = (length) => {\n\tlet value = 0;\n\tif (typeof length === \"number\") value = length;\n\tif (typeof length === \"string\") value = length.length;\n\tif (Array.isArray(length) && length.every((l) => typeof l === \"string\")) value = Math.max(...length.map((str) => str.length));\n\tif (Array.isArray(length) && length.every((l) => typeof l === \"number\")) value = Math.max(...length);\n\treturn Math.max(value, 0);\n};\nconst defaultColonOptions = {\n\tcolSize: 0,\n\tminSize: 0,\n\tmaxSize: Infinity,\n\tpad: \"right\",\n\tpadChar: \"0\"\n};\n/**\n* Create a string of spaces of a given length.\n*\n* @param colSize - The length of the string to create.\n* @returns A string of spaces.\n*/\nconst colon = (text, options) => [text].flat().map((text$1) => {\n\tconst { colSize, minSize, maxSize, pad, padChar } = {\n\t\t...defaultColonOptions,\n\t\t...options ?? {}\n\t};\n\tconst length = getLength(colSize);\n\tconst spacesLength = Math.max(minSize, Math.min(maxSize, length - removeColor(text$1).length));\n\tif (pad === \"left\") return `${\" \".repeat(spacesLength)}${text$1}`;\n\treturn `${text$1}${\" \".repeat(spacesLength)}`;\n}).join(\"\");\nconst x = colorize(\"✗\", ANSIColors.RED);\nconst v = colorize(\"✓\", ANSIColors.GREEN);\nconst clock = colorize(\"⏲\", ANSIColors.BLUE);\n\n//#endregion\nexport { ANSIColors, clock, colon, colorize, colorizeKey, colorizeLocales, colorizeNumber, colorizePath, getAppLogger, logger, removeColor, spinnerFrames, v, x };\n//# sourceMappingURL=logger.mjs.map"],"mappings":";;AACA,MAAM,UAAU,SAAS,YAAY;CACpC,MAAM,YAAY,SAAS,aAAa;CACxC,MAAM,OAAO,SAAS,QAAQ,QAAQ;CACtC,MAAM,QAAQ,SAAS,SAAS;CAChC,MAAM,SAAS,SAAS,QAAQ,SAAS,SAAS,QAAQ,SAAS,KAAK;CACxE,MAAM,MAAM,SAAS,QAAQ,OAAO,QAAQ;CAC5C,MAAM,OAAO,SAAS,QAAQ,QAAQ,QAAQ;CAC9C,MAAM,OAAO,SAAS,QAAQ,QAAQ,QAAQ;CAC9C,MAAM,QAAQ,SAAS,QAAQ,SAAS,QAAQ;CAChD,MAAM,QAAQ,SAAS,QAAQ,SAAS,QAAQ;AAChD,KAAI,SAAS,WAAY;AACzB,KAAI,aAAa,SAAS,UAAW;CACrC,MAAM,cAAc,SAAS,CAAC,QAAQ,GAAG,CAAC,QAAQ,CAAC,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC,MAAM;AAC7E,KAAI,UAAU,QAAS,QAAO,MAAM,GAAG,YAAY;AACnD,KAAI,UAAU,OAAQ,QAAO,KAAK,GAAG,YAAY;AACjD,KAAI,UAAU,OAAQ,QAAO,KAAK,GAAG,YAAY;AACjD,KAAI,UAAU,QAAS,QAAO,MAAM,GAAG,YAAY;AACnD,KAAI,GAAG,YAAY;;AAEpB,IAAI,aAA6B,yBAAS,cAAc;AACvD,cAAa,WAAW;AACxB,cAAa,UAAU;AACvB,cAAa,eAAe;AAC5B,cAAa,gBAAgB;AAC7B,cAAa,UAAU;AACvB,cAAa,SAAS;AACtB,cAAa,WAAW;AACxB,cAAa,YAAY;AACzB,cAAa,aAAa;AAC1B,cAAa,WAAW;AACxB,cAAa,YAAY;AACzB,cAAa,UAAU;AACvB,cAAa,WAAW;AACxB,cAAa,UAAU;AACvB,QAAO;EACN,EAAE,CAAC;;;;;;AAkBL,MAAM,gBAAgB,eAAe,mBAAmB,SAAS,YAAY,OAAO,SAAS;CAC5F,GAAG,WAAW,EAAE;CAChB,QAAQ;EACP,GAAG,eAAe;EAClB,GAAG,eAAe;EAClB,GAAG,SAAS,UAAU,EAAE;EACxB;CACD,CAAC;AACF,MAAM,YAAY,GAAG,OAAO,UAAU,QAAQ,GAAG,QAAQ,IAAI,QAAQ,OAAO,UAAU,YAAY,WAAW,QAAQ,QAAQ,WAAW,UAAU;AAElJ,MAAM,eAAe,SAAS,QAAQ,WAAW,OAAO,QAAQ,WAAW,UAAU,CAAC,QAAQ,CAAC,MAAM,CAAC,KAAK,QAAQ,SAAS,KAAK,OAAO,MAAM,CAAC,CAAC,KAAK,KAAK;AAC1J,MAAM,gBAAgB,MAAM,QAAQ,WAAW,MAAM,QAAQ,WAAW,UAAU,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,MAAM,SAAS,GAAG,OAAO,MAAM,CAAC,CAAC,KAAK,KAAK;AAsDhJ,MAAM,IAAI,SAAS,KAAK,WAAW,IAAI;AACvC,MAAM,IAAI,SAAS,KAAK,WAAW,MAAM;AACzC,MAAM,QAAQ,SAAS,KAAK,WAAW,KAAK"}
@@ -0,0 +1,15 @@
1
+
2
+ //#region ../config/dist/esm/types/dist/esm/_virtual/rolldown_runtime.mjs
3
+ var __defProp = Object.defineProperty;
4
+ var __export = (all) => {
5
+ let target = {};
6
+ for (var name in all) __defProp(target, name, {
7
+ get: all[name],
8
+ enumerable: true
9
+ });
10
+ return target;
11
+ };
12
+
13
+ //#endregion
14
+ exports.__export = __export;
15
+ //# sourceMappingURL=rolldown_runtime.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rolldown_runtime.cjs","names":[],"sources":["../../../../../../../../../../config/dist/esm/types/dist/esm/_virtual/rolldown_runtime.mjs"],"sourcesContent":["//#region ../types/dist/esm/_virtual/rolldown_runtime.mjs\nvar __defProp = Object.defineProperty;\nvar __export = (all) => {\n\tlet target = {};\n\tfor (var name in all) __defProp(target, name, {\n\t\tget: all[name],\n\t\tenumerable: true\n\t});\n\treturn target;\n};\n\n//#endregion\nexport { __export };\n//# sourceMappingURL=rolldown_runtime.mjs.map"],"mappings":";;AACA,IAAI,YAAY,OAAO;AACvB,IAAI,YAAY,QAAQ;CACvB,IAAI,SAAS,EAAE;AACf,MAAK,IAAI,QAAQ,IAAK,WAAU,QAAQ,MAAM;EAC7C,KAAK,IAAI;EACT,YAAY;EACZ,CAAC;AACF,QAAO"}