@intlayer/config 8.4.4 → 8.4.5

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 (226) hide show
  1. package/dist/cjs/_virtual/_rolldown/runtime.cjs +29 -0
  2. package/dist/cjs/built.cjs +7 -1
  3. package/dist/cjs/built.cjs.map +1 -1
  4. package/dist/cjs/client.cjs +16 -1
  5. package/dist/cjs/colors.cjs +33 -1
  6. package/dist/cjs/colors.cjs.map +1 -1
  7. package/dist/cjs/configFile/buildConfigurationFields.cjs +199 -1
  8. package/dist/cjs/configFile/buildConfigurationFields.cjs.map +1 -1
  9. package/dist/cjs/configFile/configurationSchema.cjs +210 -1
  10. package/dist/cjs/configFile/configurationSchema.cjs.map +1 -1
  11. package/dist/cjs/configFile/getConfiguration.cjs +69 -1
  12. package/dist/cjs/configFile/getConfiguration.cjs.map +1 -1
  13. package/dist/cjs/configFile/index.cjs +28 -1
  14. package/dist/cjs/configFile/loadConfigurationFile.cjs +30 -1
  15. package/dist/cjs/configFile/loadConfigurationFile.cjs.map +1 -1
  16. package/dist/cjs/configFile/searchConfigurationFile.cjs +53 -1
  17. package/dist/cjs/configFile/searchConfigurationFile.cjs.map +1 -1
  18. package/dist/cjs/defaultValues/build.cjs +35 -1
  19. package/dist/cjs/defaultValues/build.cjs.map +1 -1
  20. package/dist/cjs/defaultValues/compiler.cjs +13 -1
  21. package/dist/cjs/defaultValues/compiler.cjs.map +1 -1
  22. package/dist/cjs/defaultValues/content.cjs +40 -1
  23. package/dist/cjs/defaultValues/content.cjs.map +1 -1
  24. package/dist/cjs/defaultValues/dictionary.cjs +13 -1
  25. package/dist/cjs/defaultValues/dictionary.cjs.map +1 -1
  26. package/dist/cjs/defaultValues/editor.cjs +23 -1
  27. package/dist/cjs/defaultValues/editor.cjs.map +1 -1
  28. package/dist/cjs/defaultValues/index.cjs +66 -1
  29. package/dist/cjs/defaultValues/internationalization.cjs +15 -1
  30. package/dist/cjs/defaultValues/internationalization.cjs.map +1 -1
  31. package/dist/cjs/defaultValues/log.cjs +10 -1
  32. package/dist/cjs/defaultValues/log.cjs.map +1 -1
  33. package/dist/cjs/defaultValues/routing.cjs +19 -1
  34. package/dist/cjs/defaultValues/routing.cjs.map +1 -1
  35. package/dist/cjs/defaultValues/system.cjs +29 -1
  36. package/dist/cjs/defaultValues/system.cjs.map +1 -1
  37. package/dist/cjs/loadEnvFile.cjs +31 -1
  38. package/dist/cjs/loadEnvFile.cjs.map +1 -1
  39. package/dist/cjs/loadExternalFile/bundleFile.cjs +71 -1
  40. package/dist/cjs/loadExternalFile/bundleFile.cjs.map +1 -1
  41. package/dist/cjs/loadExternalFile/bundleJSFile.cjs +33 -1
  42. package/dist/cjs/loadExternalFile/bundleJSFile.cjs.map +1 -1
  43. package/dist/cjs/loadExternalFile/index.cjs +17 -1
  44. package/dist/cjs/loadExternalFile/loadExternalFile.cjs +77 -1
  45. package/dist/cjs/loadExternalFile/loadExternalFile.cjs.map +1 -1
  46. package/dist/cjs/loadExternalFile/parseFileContent.cjs +77 -1
  47. package/dist/cjs/loadExternalFile/parseFileContent.cjs.map +1 -1
  48. package/dist/cjs/loadExternalFile/transpileTSToCJS.cjs +67 -1
  49. package/dist/cjs/loadExternalFile/transpileTSToCJS.cjs.map +1 -1
  50. package/dist/cjs/logger.cjs +133 -1
  51. package/dist/cjs/logger.cjs.map +1 -1
  52. package/dist/cjs/node.cjs +28 -1
  53. package/dist/cjs/utils/ESMxCJSHelpers.cjs +27 -1
  54. package/dist/cjs/utils/ESMxCJSHelpers.cjs.map +1 -1
  55. package/dist/cjs/utils/alias.cjs +29 -1
  56. package/dist/cjs/utils/alias.cjs.map +1 -1
  57. package/dist/cjs/utils/cacheDisk.cjs +173 -1
  58. package/dist/cjs/utils/cacheDisk.cjs.map +1 -1
  59. package/dist/cjs/utils/cacheMemory.cjs +269 -1
  60. package/dist/cjs/utils/cacheMemory.cjs.map +1 -1
  61. package/dist/cjs/utils/clearModuleCache.cjs +26 -1
  62. package/dist/cjs/utils/clearModuleCache.cjs.map +1 -1
  63. package/dist/cjs/utils/compareVersions.cjs +38 -1
  64. package/dist/cjs/utils/compareVersions.cjs.map +1 -1
  65. package/dist/cjs/utils/extractErrorMessage.cjs +95 -1
  66. package/dist/cjs/utils/extractErrorMessage.cjs.map +1 -1
  67. package/dist/cjs/utils/getExtension.cjs +14 -1
  68. package/dist/cjs/utils/getExtension.cjs.map +1 -1
  69. package/dist/cjs/utils/getPackageJsonPath.cjs +33 -1
  70. package/dist/cjs/utils/getPackageJsonPath.cjs.map +1 -1
  71. package/dist/cjs/utils/index.cjs +45 -1
  72. package/dist/cjs/utils/logStack.cjs +17 -1
  73. package/dist/cjs/utils/logStack.cjs.map +1 -1
  74. package/dist/cjs/utils/normalizePath.cjs +17 -1
  75. package/dist/cjs/utils/normalizePath.cjs.map +1 -1
  76. package/dist/cjs/utils/parseFilePathPattern.cjs +24 -1
  77. package/dist/cjs/utils/parseFilePathPattern.cjs.map +1 -1
  78. package/dist/cjs/utils/retryManager.cjs +45 -1
  79. package/dist/cjs/utils/retryManager.cjs.map +1 -1
  80. package/dist/cjs/utils/stringFormatter/camelCaseToKebabCase.cjs +13 -1
  81. package/dist/cjs/utils/stringFormatter/camelCaseToKebabCase.cjs.map +1 -1
  82. package/dist/cjs/utils/stringFormatter/camelCaseToSentence.cjs +16 -1
  83. package/dist/cjs/utils/stringFormatter/camelCaseToSentence.cjs.map +1 -1
  84. package/dist/cjs/utils/stringFormatter/index.cjs +10 -1
  85. package/dist/cjs/utils/stringFormatter/kebabCaseToCamelCase.cjs +14 -1
  86. package/dist/cjs/utils/stringFormatter/kebabCaseToCamelCase.cjs.map +1 -1
  87. package/dist/cjs/utils/stringFormatter/toLowerCamelCase.cjs +19 -1
  88. package/dist/cjs/utils/stringFormatter/toLowerCamelCase.cjs.map +1 -1
  89. package/dist/esm/_virtual/_rolldown/runtime.mjs +8 -0
  90. package/dist/esm/built.mjs +7 -1
  91. package/dist/esm/built.mjs.map +1 -1
  92. package/dist/esm/client.mjs +9 -1
  93. package/dist/esm/colors.mjs +18 -1
  94. package/dist/esm/colors.mjs.map +1 -1
  95. package/dist/esm/configFile/buildConfigurationFields.mjs +197 -1
  96. package/dist/esm/configFile/buildConfigurationFields.mjs.map +1 -1
  97. package/dist/esm/configFile/configurationSchema.mjs +191 -1
  98. package/dist/esm/configFile/configurationSchema.mjs.map +1 -1
  99. package/dist/esm/configFile/getConfiguration.mjs +66 -1
  100. package/dist/esm/configFile/getConfiguration.mjs.map +1 -1
  101. package/dist/esm/configFile/index.mjs +6 -1
  102. package/dist/esm/configFile/loadConfigurationFile.mjs +29 -1
  103. package/dist/esm/configFile/loadConfigurationFile.mjs.map +1 -1
  104. package/dist/esm/configFile/searchConfigurationFile.mjs +50 -1
  105. package/dist/esm/configFile/searchConfigurationFile.mjs.map +1 -1
  106. package/dist/esm/defaultValues/build.mjs +28 -1
  107. package/dist/esm/defaultValues/build.mjs.map +1 -1
  108. package/dist/esm/defaultValues/compiler.mjs +8 -1
  109. package/dist/esm/defaultValues/compiler.mjs.map +1 -1
  110. package/dist/esm/defaultValues/content.mjs +32 -1
  111. package/dist/esm/defaultValues/content.mjs.map +1 -1
  112. package/dist/esm/defaultValues/dictionary.mjs +8 -1
  113. package/dist/esm/defaultValues/dictionary.mjs.map +1 -1
  114. package/dist/esm/defaultValues/editor.mjs +13 -1
  115. package/dist/esm/defaultValues/editor.mjs.map +1 -1
  116. package/dist/esm/defaultValues/index.mjs +11 -1
  117. package/dist/esm/defaultValues/internationalization.mjs +10 -1
  118. package/dist/esm/defaultValues/internationalization.mjs.map +1 -1
  119. package/dist/esm/defaultValues/log.mjs +8 -1
  120. package/dist/esm/defaultValues/log.mjs.map +1 -1
  121. package/dist/esm/defaultValues/routing.mjs +11 -1
  122. package/dist/esm/defaultValues/routing.mjs.map +1 -1
  123. package/dist/esm/defaultValues/system.mjs +16 -1
  124. package/dist/esm/defaultValues/system.mjs.map +1 -1
  125. package/dist/esm/loadEnvFile.mjs +27 -1
  126. package/dist/esm/loadEnvFile.mjs.map +1 -1
  127. package/dist/esm/loadExternalFile/bundleFile.mjs +67 -1
  128. package/dist/esm/loadExternalFile/bundleFile.mjs.map +1 -1
  129. package/dist/esm/loadExternalFile/bundleJSFile.mjs +31 -1
  130. package/dist/esm/loadExternalFile/bundleJSFile.mjs.map +1 -1
  131. package/dist/esm/loadExternalFile/index.mjs +7 -1
  132. package/dist/esm/loadExternalFile/loadExternalFile.mjs +73 -1
  133. package/dist/esm/loadExternalFile/loadExternalFile.mjs.map +1 -1
  134. package/dist/esm/loadExternalFile/parseFileContent.mjs +73 -1
  135. package/dist/esm/loadExternalFile/parseFileContent.mjs.map +1 -1
  136. package/dist/esm/loadExternalFile/transpileTSToCJS.mjs +64 -1
  137. package/dist/esm/loadExternalFile/transpileTSToCJS.mjs.map +1 -1
  138. package/dist/esm/logger.mjs +118 -1
  139. package/dist/esm/logger.mjs.map +1 -1
  140. package/dist/esm/node.mjs +6 -1
  141. package/dist/esm/utils/ESMxCJSHelpers.mjs +25 -1
  142. package/dist/esm/utils/ESMxCJSHelpers.mjs.map +1 -0
  143. package/dist/esm/utils/alias.mjs +27 -1
  144. package/dist/esm/utils/alias.mjs.map +1 -1
  145. package/dist/esm/utils/cacheDisk.mjs +170 -1
  146. package/dist/esm/utils/cacheDisk.mjs.map +1 -1
  147. package/dist/esm/utils/cacheMemory.mjs +261 -1
  148. package/dist/esm/utils/cacheMemory.mjs.map +1 -1
  149. package/dist/esm/utils/clearModuleCache.mjs +25 -1
  150. package/dist/esm/utils/clearModuleCache.mjs.map +1 -1
  151. package/dist/esm/utils/compareVersions.mjs +36 -1
  152. package/dist/esm/utils/compareVersions.mjs.map +1 -1
  153. package/dist/esm/utils/extractErrorMessage.mjs +93 -1
  154. package/dist/esm/utils/extractErrorMessage.mjs.map +1 -1
  155. package/dist/esm/utils/getExtension.mjs +12 -1
  156. package/dist/esm/utils/getExtension.mjs.map +1 -1
  157. package/dist/esm/utils/getPackageJsonPath.mjs +31 -1
  158. package/dist/esm/utils/getPackageJsonPath.mjs.map +1 -1
  159. package/dist/esm/utils/index.mjs +19 -1
  160. package/dist/esm/utils/logStack.mjs +16 -1
  161. package/dist/esm/utils/logStack.mjs.map +1 -1
  162. package/dist/esm/utils/normalizePath.mjs +15 -1
  163. package/dist/esm/utils/normalizePath.mjs.map +1 -1
  164. package/dist/esm/utils/parseFilePathPattern.mjs +21 -1
  165. package/dist/esm/utils/parseFilePathPattern.mjs.map +1 -1
  166. package/dist/esm/utils/retryManager.mjs +44 -1
  167. package/dist/esm/utils/retryManager.mjs.map +1 -1
  168. package/dist/esm/utils/stringFormatter/camelCaseToKebabCase.mjs +11 -1
  169. package/dist/esm/utils/stringFormatter/camelCaseToKebabCase.mjs.map +1 -1
  170. package/dist/esm/utils/stringFormatter/camelCaseToSentence.mjs +14 -1
  171. package/dist/esm/utils/stringFormatter/camelCaseToSentence.mjs.map +1 -1
  172. package/dist/esm/utils/stringFormatter/index.mjs +6 -1
  173. package/dist/esm/utils/stringFormatter/kebabCaseToCamelCase.mjs +12 -1
  174. package/dist/esm/utils/stringFormatter/kebabCaseToCamelCase.mjs.map +1 -1
  175. package/dist/esm/utils/stringFormatter/toLowerCamelCase.mjs +17 -1
  176. package/dist/esm/utils/stringFormatter/toLowerCamelCase.mjs.map +1 -1
  177. package/dist/types/client.d.ts +4 -4
  178. package/dist/types/colors.d.ts +20 -2
  179. package/dist/types/colors.d.ts.map +1 -0
  180. package/dist/types/configFile/buildConfigurationFields.d.ts.map +1 -1
  181. package/dist/types/configFile/configurationSchema.d.ts +1 -1
  182. package/dist/types/configFile/getConfiguration.d.ts +2 -2
  183. package/dist/types/configFile/loadConfigurationFile.d.ts +1 -1
  184. package/dist/types/configFile/loadConfigurationFile.d.ts.map +1 -1
  185. package/dist/types/loadEnvFile.d.ts +10 -2
  186. package/dist/types/loadEnvFile.d.ts.map +1 -0
  187. package/dist/types/loadExternalFile/index.d.ts +3 -3
  188. package/dist/types/loadExternalFile/loadExternalFile.d.ts +25 -2
  189. package/dist/types/loadExternalFile/loadExternalFile.d.ts.map +1 -0
  190. package/dist/types/loadExternalFile/parseFileContent.d.ts +29 -2
  191. package/dist/types/loadExternalFile/parseFileContent.d.ts.map +1 -0
  192. package/dist/types/loadExternalFile/transpileTSToCJS.d.ts +19 -2
  193. package/dist/types/loadExternalFile/transpileTSToCJS.d.ts.map +1 -0
  194. package/dist/types/logger.d.ts +1 -1
  195. package/dist/types/utils/index.d.ts +4 -4
  196. package/dist/types/utils/stringFormatter/camelCaseToKebabCase.d.ts +9 -2
  197. package/dist/types/utils/stringFormatter/camelCaseToKebabCase.d.ts.map +1 -0
  198. package/dist/types/utils/stringFormatter/camelCaseToSentence.d.ts +9 -2
  199. package/dist/types/utils/stringFormatter/camelCaseToSentence.d.ts.map +1 -0
  200. package/dist/types/utils/stringFormatter/index.d.ts +4 -4
  201. package/dist/types/utils/stringFormatter/kebabCaseToCamelCase.d.ts +5 -2
  202. package/dist/types/utils/stringFormatter/kebabCaseToCamelCase.d.ts.map +1 -0
  203. package/dist/types/utils/stringFormatter/toLowerCamelCase.d.ts +10 -2
  204. package/dist/types/utils/stringFormatter/toLowerCamelCase.d.ts.map +1 -0
  205. package/package.json +2 -2
  206. package/dist/cjs/chunk-Bmb41Sf3.cjs +0 -1
  207. package/dist/esm/ESMxCJSHelpers-BAuqwNXV.mjs +0 -2
  208. package/dist/esm/ESMxCJSHelpers-BAuqwNXV.mjs.map +0 -1
  209. package/dist/types/camelCaseToKebabCase-BV_lLJHR.d.ts +0 -9
  210. package/dist/types/camelCaseToKebabCase-BV_lLJHR.d.ts.map +0 -1
  211. package/dist/types/camelCaseToSentence-DAbbkwe6.d.ts +0 -9
  212. package/dist/types/camelCaseToSentence-DAbbkwe6.d.ts.map +0 -1
  213. package/dist/types/colors-BbZeGWYU.d.ts +0 -20
  214. package/dist/types/colors-BbZeGWYU.d.ts.map +0 -1
  215. package/dist/types/kebabCaseToCamelCase-h9PkNVuO.d.ts +0 -5
  216. package/dist/types/kebabCaseToCamelCase-h9PkNVuO.d.ts.map +0 -1
  217. package/dist/types/loadEnvFile-BiTBX4fe.d.ts +0 -10
  218. package/dist/types/loadEnvFile-BiTBX4fe.d.ts.map +0 -1
  219. package/dist/types/loadExternalFile-DmM_TGcA.d.ts +0 -25
  220. package/dist/types/loadExternalFile-DmM_TGcA.d.ts.map +0 -1
  221. package/dist/types/parseFileContent--o_QlW5j.d.ts +0 -29
  222. package/dist/types/parseFileContent--o_QlW5j.d.ts.map +0 -1
  223. package/dist/types/toLowerCamelCase-DUdT00I1.d.ts +0 -10
  224. package/dist/types/toLowerCamelCase-DUdT00I1.d.ts.map +0 -1
  225. package/dist/types/transpileTSToCJS-OifpV3zk.d.ts +0 -19
  226. package/dist/types/transpileTSToCJS-OifpV3zk.d.ts.map +0 -1
@@ -1,2 +1,32 @@
1
- import{cacheMemory as e}from"./cacheMemory.mjs";import{existsSync as t}from"node:fs";import{dirname as n,join as r}from"node:path";const i=(i=process.cwd())=>{let a=e.get(`packageJsonPath`,i);if(a)return a;let o=i;for(let a=0;a<15;a++){let a=r(o,`package.json`);if(t(a))return e.set(`packageJsonPath`,i,{packageJsonPath:a,baseDir:o}),{packageJsonPath:a,baseDir:o};let s=n(o);if(s===o)break;o=s}throw Error(`Could not find package.json in current directory or any of the 15 parent directories. Searched from: ${i}`)};export{i as getPackageJsonPath};
1
+ import { cacheMemory } from "./cacheMemory.mjs";
2
+ import { existsSync } from "node:fs";
3
+ import { dirname, join } from "node:path";
4
+
5
+ //#region src/utils/getPackageJsonPath.ts
6
+ const MAX_LEVELS = 15;
7
+ const getPackageJsonPath = (startDir = process.cwd()) => {
8
+ const checkedCache = cacheMemory.get("packageJsonPath", startDir);
9
+ if (checkedCache) return checkedCache;
10
+ let currentDir = startDir;
11
+ for (let level = 0; level < MAX_LEVELS; level++) {
12
+ const packageJsonPath = join(currentDir, "package.json");
13
+ if (existsSync(packageJsonPath)) {
14
+ cacheMemory.set("packageJsonPath", startDir, {
15
+ packageJsonPath,
16
+ baseDir: currentDir
17
+ });
18
+ return {
19
+ packageJsonPath,
20
+ baseDir: currentDir
21
+ };
22
+ }
23
+ const parentDir = dirname(currentDir);
24
+ if (parentDir === currentDir) break;
25
+ currentDir = parentDir;
26
+ }
27
+ throw new Error(`Could not find package.json in current directory or any of the ${MAX_LEVELS} parent directories. Searched from: ${startDir}`);
28
+ };
29
+
30
+ //#endregion
31
+ export { getPackageJsonPath };
2
32
  //# sourceMappingURL=getPackageJsonPath.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"getPackageJsonPath.mjs","names":[],"sources":["../../../src/utils/getPackageJsonPath.ts"],"sourcesContent":["import { existsSync } from 'node:fs';\nimport { dirname, join } from 'node:path';\nimport { cacheMemory } from './cacheMemory';\n\nconst MAX_LEVELS = 15;\n\ntype PackageJsonPathCache = {\n packageJsonPath: string;\n baseDir: string;\n};\n\nexport const getPackageJsonPath = (\n startDir: string = process.cwd()\n): PackageJsonPathCache => {\n const checkedCache = cacheMemory.get<PackageJsonPathCache>(\n 'packageJsonPath',\n startDir\n );\n\n if (checkedCache) return checkedCache;\n\n let currentDir = startDir;\n\n for (let level = 0; level < MAX_LEVELS; level++) {\n const packageJsonPath = join(currentDir, 'package.json');\n\n if (existsSync(packageJsonPath)) {\n cacheMemory.set('packageJsonPath', startDir, {\n packageJsonPath,\n baseDir: currentDir,\n });\n\n return { packageJsonPath, baseDir: currentDir };\n }\n\n const parentDir = dirname(currentDir);\n\n // If we've reached the root directory, stop\n if (parentDir === currentDir) {\n break;\n }\n\n currentDir = parentDir;\n }\n\n throw new Error(\n `Could not find package.json in current directory or any of the ${MAX_LEVELS} parent directories. Searched from: ${startDir}`\n );\n};\n"],"mappings":"mIAIA,MAOa,GACX,EAAmB,QAAQ,KAAK,GACP,CACzB,IAAM,EAAe,EAAY,IAC/B,kBACA,EACD,CAED,GAAI,EAAc,OAAO,EAEzB,IAAI,EAAa,EAEjB,IAAK,IAAI,EAAQ,EAAG,EAAQ,GAAY,IAAS,CAC/C,IAAM,EAAkB,EAAK,EAAY,eAAe,CAExD,GAAI,EAAW,EAAgB,CAM7B,OALA,EAAY,IAAI,kBAAmB,EAAU,CAC3C,kBACA,QAAS,EACV,CAAC,CAEK,CAAE,kBAAiB,QAAS,EAAY,CAGjD,IAAM,EAAY,EAAQ,EAAW,CAGrC,GAAI,IAAc,EAChB,MAGF,EAAa,EAGf,MAAU,MACR,wGAAmH,IACpH"}
1
+ {"version":3,"file":"getPackageJsonPath.mjs","names":[],"sources":["../../../src/utils/getPackageJsonPath.ts"],"sourcesContent":["import { existsSync } from 'node:fs';\nimport { dirname, join } from 'node:path';\nimport { cacheMemory } from './cacheMemory';\n\nconst MAX_LEVELS = 15;\n\ntype PackageJsonPathCache = {\n packageJsonPath: string;\n baseDir: string;\n};\n\nexport const getPackageJsonPath = (\n startDir: string = process.cwd()\n): PackageJsonPathCache => {\n const checkedCache = cacheMemory.get<PackageJsonPathCache>(\n 'packageJsonPath',\n startDir\n );\n\n if (checkedCache) return checkedCache;\n\n let currentDir = startDir;\n\n for (let level = 0; level < MAX_LEVELS; level++) {\n const packageJsonPath = join(currentDir, 'package.json');\n\n if (existsSync(packageJsonPath)) {\n cacheMemory.set('packageJsonPath', startDir, {\n packageJsonPath,\n baseDir: currentDir,\n });\n\n return { packageJsonPath, baseDir: currentDir };\n }\n\n const parentDir = dirname(currentDir);\n\n // If we've reached the root directory, stop\n if (parentDir === currentDir) {\n break;\n }\n\n currentDir = parentDir;\n }\n\n throw new Error(\n `Could not find package.json in current directory or any of the ${MAX_LEVELS} parent directories. Searched from: ${startDir}`\n );\n};\n"],"mappings":";;;;;AAIA,MAAM,aAAa;AAOnB,MAAa,sBACX,WAAmB,QAAQ,KAAK,KACP;CACzB,MAAM,eAAe,YAAY,IAC/B,mBACA,SACD;AAED,KAAI,aAAc,QAAO;CAEzB,IAAI,aAAa;AAEjB,MAAK,IAAI,QAAQ,GAAG,QAAQ,YAAY,SAAS;EAC/C,MAAM,kBAAkB,KAAK,YAAY,eAAe;AAExD,MAAI,WAAW,gBAAgB,EAAE;AAC/B,eAAY,IAAI,mBAAmB,UAAU;IAC3C;IACA,SAAS;IACV,CAAC;AAEF,UAAO;IAAE;IAAiB,SAAS;IAAY;;EAGjD,MAAM,YAAY,QAAQ,WAAW;AAGrC,MAAI,cAAc,WAChB;AAGF,eAAa;;AAGf,OAAM,IAAI,MACR,kEAAkE,WAAW,sCAAsC,WACpH"}
@@ -1 +1,19 @@
1
- import{n as e,r as t,t as n}from"../ESMxCJSHelpers-BAuqwNXV.mjs";import{getExtension as r}from"./getExtension.mjs";import{normalizePath as i}from"./normalizePath.mjs";import{getAlias as a}from"./alias.mjs";import{cacheMemory as o,clearAllCache as s,clearCache as c,computeKeyId as l,getCache as u,setCache as d,stableStringify as f}from"./cacheMemory.mjs";import{cacheDisk as p}from"./cacheDisk.mjs";import{getPackageJsonPath as m}from"./getPackageJsonPath.mjs";import{clearModuleCache as h}from"./clearModuleCache.mjs";import{compareVersions as g}from"./compareVersions.mjs";import{extractErrorMessage as _}from"./extractErrorMessage.mjs";import{logStack as v}from"./logStack.mjs";import{parseFilePathPattern as y,parseStringPattern as b}from"./parseFilePathPattern.mjs";import{retryManager as x}from"./retryManager.mjs";import{camelCaseToKebabCase as S}from"./stringFormatter/camelCaseToKebabCase.mjs";import{camelCaseToSentence as C}from"./stringFormatter/camelCaseToSentence.mjs";import{kebabCaseToCamelCase as w}from"./stringFormatter/kebabCaseToCamelCase.mjs";import{toLowerCamelCase as T}from"./stringFormatter/toLowerCamelCase.mjs";export{p as cacheDisk,o as cacheMemory,S as camelCaseToKebabCase,C as camelCaseToSentence,s as clearAllCache,c as clearCache,h as clearModuleCache,g as compareVersions,l as computeKeyId,n as configESMxCJSRequire,_ as extractErrorMessage,a as getAlias,u as getCache,r as getExtension,m as getPackageJsonPath,e as getProjectRequire,t as isESModule,w as kebabCaseToCamelCase,v as logStack,i as normalizePath,y as parseFilePathPattern,b as parseStringPattern,x as retryManager,d as setCache,f as stableStringify,T as toLowerCamelCase};
1
+ import { getExtension } from "./getExtension.mjs";
2
+ import { normalizePath } from "./normalizePath.mjs";
3
+ import { getAlias } from "./alias.mjs";
4
+ import { cacheMemory, clearAllCache, clearCache, computeKeyId, getCache, setCache, stableStringify } from "./cacheMemory.mjs";
5
+ import { cacheDisk } from "./cacheDisk.mjs";
6
+ import { getPackageJsonPath } from "./getPackageJsonPath.mjs";
7
+ import { configESMxCJSRequire, getProjectRequire, isESModule } from "./ESMxCJSHelpers.mjs";
8
+ import { clearModuleCache } from "./clearModuleCache.mjs";
9
+ import { compareVersions } from "./compareVersions.mjs";
10
+ import { extractErrorMessage } from "./extractErrorMessage.mjs";
11
+ import { logStack } from "./logStack.mjs";
12
+ import { parseFilePathPattern, parseStringPattern } from "./parseFilePathPattern.mjs";
13
+ import { retryManager } from "./retryManager.mjs";
14
+ import { camelCaseToKebabCase } from "./stringFormatter/camelCaseToKebabCase.mjs";
15
+ import { camelCaseToSentence } from "./stringFormatter/camelCaseToSentence.mjs";
16
+ import { kebabCaseToCamelCase } from "./stringFormatter/kebabCaseToCamelCase.mjs";
17
+ import { toLowerCamelCase } from "./stringFormatter/toLowerCamelCase.mjs";
18
+
19
+ export { cacheDisk, cacheMemory, camelCaseToKebabCase, camelCaseToSentence, clearAllCache, clearCache, clearModuleCache, compareVersions, computeKeyId, configESMxCJSRequire, extractErrorMessage, getAlias, getCache, getExtension, getPackageJsonPath, getProjectRequire, isESModule, kebabCaseToCamelCase, logStack, normalizePath, parseFilePathPattern, parseStringPattern, retryManager, setCache, stableStringify, toLowerCamelCase };
@@ -1,2 +1,17 @@
1
- import{BLUE as e,YELLOW as t}from"../colors.mjs";import{colorize as n}from"../logger.mjs";const r=(r,i={limit:50})=>{Error.stackTraceLimit=i.limit;try{throw Error(`test`)}catch(i){console.log(n(r,t)),console.log(n(i.stack??``,e))}};export{r as logStack};
1
+ import { BLUE, YELLOW } from "../colors.mjs";
2
+ import { colorize } from "../logger.mjs";
3
+
4
+ //#region src/utils/logStack.ts
5
+ const logStack = (message, options = { limit: 50 }) => {
6
+ Error.stackTraceLimit = options.limit;
7
+ try {
8
+ throw new Error("test");
9
+ } catch (error) {
10
+ console.log(colorize(message, YELLOW));
11
+ console.log(colorize(error.stack ?? "", BLUE));
12
+ }
13
+ };
14
+
15
+ //#endregion
16
+ export { logStack };
2
17
  //# sourceMappingURL=logStack.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"logStack.mjs","names":["ANSIColors.YELLOW","ANSIColors.BLUE"],"sources":["../../../src/utils/logStack.ts"],"sourcesContent":["import * as ANSIColors from '../colors';\nimport { colorize } from '../logger';\n\nexport const logStack = (\n message: string,\n options: { limit: number } = { limit: 50 }\n) => {\n Error.stackTraceLimit = options.limit;\n\n try {\n throw new Error('test');\n } catch (error) {\n console.log(colorize(message, ANSIColors.YELLOW));\n console.log(colorize((error as Error).stack ?? '', ANSIColors.BLUE));\n }\n};\n"],"mappings":"0FAGA,MAAa,GACX,EACA,EAA6B,CAAE,MAAO,GAAI,GACvC,CACH,MAAM,gBAAkB,EAAQ,MAEhC,GAAI,CACF,MAAU,MAAM,OAAO,OAChB,EAAO,CACd,QAAQ,IAAI,EAAS,EAASA,EAAkB,CAAC,CACjD,QAAQ,IAAI,EAAU,EAAgB,OAAS,GAAIC,EAAgB,CAAC"}
1
+ {"version":3,"file":"logStack.mjs","names":["ANSIColors.YELLOW","ANSIColors.BLUE"],"sources":["../../../src/utils/logStack.ts"],"sourcesContent":["import * as ANSIColors from '../colors';\nimport { colorize } from '../logger';\n\nexport const logStack = (\n message: string,\n options: { limit: number } = { limit: 50 }\n) => {\n Error.stackTraceLimit = options.limit;\n\n try {\n throw new Error('test');\n } catch (error) {\n console.log(colorize(message, ANSIColors.YELLOW));\n console.log(colorize((error as Error).stack ?? '', ANSIColors.BLUE));\n }\n};\n"],"mappings":";;;;AAGA,MAAa,YACX,SACA,UAA6B,EAAE,OAAO,IAAI,KACvC;AACH,OAAM,kBAAkB,QAAQ;AAEhC,KAAI;AACF,QAAM,IAAI,MAAM,OAAO;UAChB,OAAO;AACd,UAAQ,IAAI,SAAS,SAASA,OAAkB,CAAC;AACjD,UAAQ,IAAI,SAAU,MAAgB,SAAS,IAAIC,KAAgB,CAAC"}
@@ -1,2 +1,16 @@
1
- const e=e=>e.replace(/\\/g,`/`);export{e as normalizePath};
1
+ //#region src/utils/normalizePath.ts
2
+ /**
3
+ * Normalize a path for glob by replacing backslashes with forward slashes
4
+ *
5
+ * Utils for Windows compatibility, as Glob pattern as `**\\*.js` is not supported
6
+ *
7
+ * C:\\Users\\John\\Desktop\\test.txt -> C:/Users/John/Desktop/test.txt
8
+ *
9
+ * @param path - The path to normalize
10
+ * @returns The normalized path
11
+ */
12
+ const normalizePath = (path) => path.replace(/\\/g, "/");
13
+
14
+ //#endregion
15
+ export { normalizePath };
2
16
  //# sourceMappingURL=normalizePath.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"normalizePath.mjs","names":[],"sources":["../../../src/utils/normalizePath.ts"],"sourcesContent":["/**\n * Normalize a path for glob by replacing backslashes with forward slashes\n *\n * Utils for Windows compatibility, as Glob pattern as `**\\\\*.js` is not supported\n *\n * C:\\\\Users\\\\John\\\\Desktop\\\\test.txt -> C:/Users/John/Desktop/test.txt\n *\n * @param path - The path to normalize\n * @returns The normalized path\n */\nexport const normalizePath = (path: string): string => path.replace(/\\\\/g, '/');\n"],"mappings":"AAUA,MAAa,EAAiB,GAAyB,EAAK,QAAQ,MAAO,IAAI"}
1
+ {"version":3,"file":"normalizePath.mjs","names":[],"sources":["../../../src/utils/normalizePath.ts"],"sourcesContent":["/**\n * Normalize a path for glob by replacing backslashes with forward slashes\n *\n * Utils for Windows compatibility, as Glob pattern as `**\\\\*.js` is not supported\n *\n * C:\\\\Users\\\\John\\\\Desktop\\\\test.txt -> C:/Users/John/Desktop/test.txt\n *\n * @param path - The path to normalize\n * @returns The normalized path\n */\nexport const normalizePath = (path: string): string => path.replace(/\\\\/g, '/');\n"],"mappings":";;;;;;;;;;;AAUA,MAAa,iBAAiB,SAAyB,KAAK,QAAQ,OAAO,IAAI"}
@@ -1,2 +1,22 @@
1
- const e=async(e,n)=>{if(typeof e==`function`)return await e(n);if(typeof e==`object`&&e&&n.locale){let r=e[n.locale];if(r)return typeof r==`function`?await r(n):t(r,n)}return typeof e==`string`?t(e,n):``},t=(e,t)=>e.replaceAll(/\{\{\s*locale\s*\}\}/g,t.locale??``).replaceAll(/\{\{\s*key\s*\}\}/g,t.key??``).replaceAll(/\{\{\s*fileName\s*\}\}/g,t.fileName??``).replaceAll(/\{\{\s*extension\s*\}\}/g,t.extension??``).replaceAll(/\{\{\s*componentFileName\s*\}\}/g,t.componentFileName??``).replaceAll(/\{\{\s*componentExtension\s*\}\}/g,t.componentExtension??``).replaceAll(/\{\{\s*format\s*\}\}/g,t.format??``).replaceAll(/\{\{\s*componentFormat\s*\}\}/g,t.componentFormat??``).replaceAll(/\{\{\s*componentDirPath\s*\}\}/g,t.componentDirPath??``);export{e as parseFilePathPattern,t as parseStringPattern};
1
+ //#region src/utils/parseFilePathPattern.ts
2
+ /**
3
+ * Parses a FilePathPattern configuration string or function to a final string path.
4
+ * Resolves context variables like `{{locale}}`, `{{key}}`, `{{fileName}}`, `{{extension}}`.
5
+ */
6
+ const parseFilePathPattern = async (pattern, context) => {
7
+ if (typeof pattern === "function") return await pattern(context);
8
+ if (typeof pattern === "object" && pattern !== null && context.locale) {
9
+ const localePattern = pattern[context.locale];
10
+ if (localePattern) {
11
+ if (typeof localePattern === "function") return await localePattern(context);
12
+ return parseStringPattern(localePattern, context);
13
+ }
14
+ }
15
+ if (typeof pattern === "string") return parseStringPattern(pattern, context);
16
+ return "";
17
+ };
18
+ const parseStringPattern = (pattern, context) => pattern.replaceAll(/\{\{\s*locale\s*\}\}/g, context.locale ?? "").replaceAll(/\{\{\s*key\s*\}\}/g, context.key ?? "").replaceAll(/\{\{\s*fileName\s*\}\}/g, context.fileName ?? "").replaceAll(/\{\{\s*extension\s*\}\}/g, context.extension ?? "").replaceAll(/\{\{\s*componentFileName\s*\}\}/g, context.componentFileName ?? "").replaceAll(/\{\{\s*componentExtension\s*\}\}/g, context.componentExtension ?? "").replaceAll(/\{\{\s*format\s*\}\}/g, context.format ?? "").replaceAll(/\{\{\s*componentFormat\s*\}\}/g, context.componentFormat ?? "").replaceAll(/\{\{\s*componentDirPath\s*\}\}/g, context.componentDirPath ?? "");
19
+
20
+ //#endregion
21
+ export { parseFilePathPattern, parseStringPattern };
2
22
  //# sourceMappingURL=parseFilePathPattern.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"parseFilePathPattern.mjs","names":[],"sources":["../../../src/utils/parseFilePathPattern.ts"],"sourcesContent":["import type {\n FilePathPattern,\n FilePathPatternContext,\n} from '@intlayer/types/filePathPattern';\n\n/**\n * Parses a FilePathPattern configuration string or function to a final string path.\n * Resolves context variables like `{{locale}}`, `{{key}}`, `{{fileName}}`, `{{extension}}`.\n */\nexport const parseFilePathPattern = async (\n pattern: FilePathPattern,\n context: FilePathPatternContext\n): Promise<string> => {\n if (typeof pattern === 'function') {\n return await (pattern as any)(context);\n }\n\n if (typeof pattern === 'object' && pattern !== null && context.locale) {\n const localePattern = (pattern as any)[context.locale];\n\n if (localePattern) {\n if (typeof localePattern === 'function') {\n return await localePattern(context);\n }\n return parseStringPattern(localePattern, context);\n }\n }\n\n if (typeof pattern === 'string') {\n return parseStringPattern(pattern, context);\n }\n\n return '';\n};\n\nexport const parseStringPattern = (\n pattern: string,\n context: FilePathPatternContext\n): string =>\n pattern\n .replaceAll(/\\{\\{\\s*locale\\s*\\}\\}/g, context.locale ?? '')\n .replaceAll(/\\{\\{\\s*key\\s*\\}\\}/g, context.key ?? '')\n .replaceAll(/\\{\\{\\s*fileName\\s*\\}\\}/g, context.fileName ?? '')\n .replaceAll(/\\{\\{\\s*extension\\s*\\}\\}/g, context.extension ?? '')\n .replaceAll(\n /\\{\\{\\s*componentFileName\\s*\\}\\}/g,\n context.componentFileName ?? ''\n )\n .replaceAll(\n /\\{\\{\\s*componentExtension\\s*\\}\\}/g,\n context.componentExtension ?? ''\n )\n .replaceAll(/\\{\\{\\s*format\\s*\\}\\}/g, context.format ?? '')\n .replaceAll(/\\{\\{\\s*componentFormat\\s*\\}\\}/g, context.componentFormat ?? '')\n .replaceAll(\n /\\{\\{\\s*componentDirPath\\s*\\}\\}/g,\n context.componentDirPath ?? ''\n );\n"],"mappings":"AASA,MAAa,EAAuB,MAClC,EACA,IACoB,CACpB,GAAI,OAAO,GAAY,WACrB,OAAO,MAAO,EAAgB,EAAQ,CAGxC,GAAI,OAAO,GAAY,UAAY,GAAoB,EAAQ,OAAQ,CACrE,IAAM,EAAiB,EAAgB,EAAQ,QAE/C,GAAI,EAIF,OAHI,OAAO,GAAkB,WACpB,MAAM,EAAc,EAAQ,CAE9B,EAAmB,EAAe,EAAQ,CAQrD,OAJI,OAAO,GAAY,SACd,EAAmB,EAAS,EAAQ,CAGtC,IAGI,GACX,EACA,IAEA,EACG,WAAW,wBAAyB,EAAQ,QAAU,GAAG,CACzD,WAAW,qBAAsB,EAAQ,KAAO,GAAG,CACnD,WAAW,0BAA2B,EAAQ,UAAY,GAAG,CAC7D,WAAW,2BAA4B,EAAQ,WAAa,GAAG,CAC/D,WACC,mCACA,EAAQ,mBAAqB,GAC9B,CACA,WACC,oCACA,EAAQ,oBAAsB,GAC/B,CACA,WAAW,wBAAyB,EAAQ,QAAU,GAAG,CACzD,WAAW,iCAAkC,EAAQ,iBAAmB,GAAG,CAC3E,WACC,kCACA,EAAQ,kBAAoB,GAC7B"}
1
+ {"version":3,"file":"parseFilePathPattern.mjs","names":[],"sources":["../../../src/utils/parseFilePathPattern.ts"],"sourcesContent":["import type {\n FilePathPattern,\n FilePathPatternContext,\n} from '@intlayer/types/filePathPattern';\n\n/**\n * Parses a FilePathPattern configuration string or function to a final string path.\n * Resolves context variables like `{{locale}}`, `{{key}}`, `{{fileName}}`, `{{extension}}`.\n */\nexport const parseFilePathPattern = async (\n pattern: FilePathPattern,\n context: FilePathPatternContext\n): Promise<string> => {\n if (typeof pattern === 'function') {\n return await (pattern as any)(context);\n }\n\n if (typeof pattern === 'object' && pattern !== null && context.locale) {\n const localePattern = (pattern as any)[context.locale];\n\n if (localePattern) {\n if (typeof localePattern === 'function') {\n return await localePattern(context);\n }\n return parseStringPattern(localePattern, context);\n }\n }\n\n if (typeof pattern === 'string') {\n return parseStringPattern(pattern, context);\n }\n\n return '';\n};\n\nexport const parseStringPattern = (\n pattern: string,\n context: FilePathPatternContext\n): string =>\n pattern\n .replaceAll(/\\{\\{\\s*locale\\s*\\}\\}/g, context.locale ?? '')\n .replaceAll(/\\{\\{\\s*key\\s*\\}\\}/g, context.key ?? '')\n .replaceAll(/\\{\\{\\s*fileName\\s*\\}\\}/g, context.fileName ?? '')\n .replaceAll(/\\{\\{\\s*extension\\s*\\}\\}/g, context.extension ?? '')\n .replaceAll(\n /\\{\\{\\s*componentFileName\\s*\\}\\}/g,\n context.componentFileName ?? ''\n )\n .replaceAll(\n /\\{\\{\\s*componentExtension\\s*\\}\\}/g,\n context.componentExtension ?? ''\n )\n .replaceAll(/\\{\\{\\s*format\\s*\\}\\}/g, context.format ?? '')\n .replaceAll(/\\{\\{\\s*componentFormat\\s*\\}\\}/g, context.componentFormat ?? '')\n .replaceAll(\n /\\{\\{\\s*componentDirPath\\s*\\}\\}/g,\n context.componentDirPath ?? ''\n );\n"],"mappings":";;;;;AASA,MAAa,uBAAuB,OAClC,SACA,YACoB;AACpB,KAAI,OAAO,YAAY,WACrB,QAAO,MAAO,QAAgB,QAAQ;AAGxC,KAAI,OAAO,YAAY,YAAY,YAAY,QAAQ,QAAQ,QAAQ;EACrE,MAAM,gBAAiB,QAAgB,QAAQ;AAE/C,MAAI,eAAe;AACjB,OAAI,OAAO,kBAAkB,WAC3B,QAAO,MAAM,cAAc,QAAQ;AAErC,UAAO,mBAAmB,eAAe,QAAQ;;;AAIrD,KAAI,OAAO,YAAY,SACrB,QAAO,mBAAmB,SAAS,QAAQ;AAG7C,QAAO;;AAGT,MAAa,sBACX,SACA,YAEA,QACG,WAAW,yBAAyB,QAAQ,UAAU,GAAG,CACzD,WAAW,sBAAsB,QAAQ,OAAO,GAAG,CACnD,WAAW,2BAA2B,QAAQ,YAAY,GAAG,CAC7D,WAAW,4BAA4B,QAAQ,aAAa,GAAG,CAC/D,WACC,oCACA,QAAQ,qBAAqB,GAC9B,CACA,WACC,qCACA,QAAQ,sBAAsB,GAC/B,CACA,WAAW,yBAAyB,QAAQ,UAAU,GAAG,CACzD,WAAW,kCAAkC,QAAQ,mBAAmB,GAAG,CAC3E,WACC,mCACA,QAAQ,oBAAoB,GAC7B"}
@@ -1,2 +1,45 @@
1
- import{extractErrorMessage as e}from"./extractErrorMessage.mjs";import{logger as t}from"../logger.mjs";const n=(n,{maxRetry:r=3,delay:i=0,onError:a,onMaxTryReached:o}={})=>async(...s)=>{let c;for(let l=0;l<=r;l++)try{return await n(...s)}catch(n){c=n;let s=e(n);if(l>=r){if(o)return o?.({error:s,attempt:l,maxRetry:r}),null;throw n}a?a?.({error:s,attempt:l,maxRetry:r}):t(s,{level:`error`}),i>0&&await new Promise(e=>setTimeout(e,i))}throw c??Error(`Unexpected: retry loop completed without result`)};export{n as retryManager};
1
+ import { extractErrorMessage } from "./extractErrorMessage.mjs";
2
+ import { logger } from "../logger.mjs";
3
+
4
+ //#region src/utils/retryManager.ts
5
+ const DEFAULT_MAX_RETRY = 3;
6
+ const DEFAULT_DELAY = 0;
7
+ /**
8
+ * Wrap an async function `fn` so it’s retried on failure.
9
+ *
10
+ * @param fn The async function to wrap
11
+ * @param options { maxRetry, delay }
12
+ * @returns A new function with the same signature as `fn`
13
+ */
14
+ const retryManager = (fn, { maxRetry = DEFAULT_MAX_RETRY, delay = DEFAULT_DELAY, onError, onMaxTryReached } = {}) => async (...args) => {
15
+ let lastError;
16
+ for (let attempt = 0; attempt <= maxRetry; attempt++) try {
17
+ return await fn(...args);
18
+ } catch (err) {
19
+ lastError = err;
20
+ const error = extractErrorMessage(err);
21
+ if (attempt >= maxRetry) {
22
+ if (onMaxTryReached) {
23
+ onMaxTryReached?.({
24
+ error,
25
+ attempt,
26
+ maxRetry
27
+ });
28
+ return null;
29
+ }
30
+ throw err;
31
+ }
32
+ if (onError) onError?.({
33
+ error,
34
+ attempt,
35
+ maxRetry
36
+ });
37
+ else logger(error, { level: "error" });
38
+ if (delay > 0) await new Promise((res) => setTimeout(res, delay));
39
+ }
40
+ throw lastError ?? /* @__PURE__ */ new Error("Unexpected: retry loop completed without result");
41
+ };
42
+
43
+ //#endregion
44
+ export { retryManager };
2
45
  //# sourceMappingURL=retryManager.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"retryManager.mjs","names":[],"sources":["../../../src/utils/retryManager.ts"],"sourcesContent":["import { logger } from '../logger';\nimport { extractErrorMessage } from './extractErrorMessage';\n\nexport type RetryManagerOptions = {\n /** maximum number of retries before giving up */\n maxRetry?: number;\n /** delay between attempts, in milliseconds */\n delay?: number;\n /** function to call when an error occurs */\n onError?: (details: {\n error: string;\n attempt: number;\n maxRetry: number;\n }) => void;\n /** function to call when the maximum number of retries is reached */\n onMaxTryReached?: (details: {\n error: string;\n attempt: number;\n maxRetry: number;\n }) => void;\n};\n\nconst DEFAULT_MAX_RETRY = 3;\nconst DEFAULT_DELAY = 0;\n\n/**\n * Wrap an async function `fn` so it’s retried on failure.\n *\n * @param fn The async function to wrap\n * @param options { maxRetry, delay }\n * @returns A new function with the same signature as `fn`\n */\nexport const retryManager =\n <Args extends any[], R>(\n fn: (...args: Args) => Promise<R>,\n {\n maxRetry = DEFAULT_MAX_RETRY,\n delay = DEFAULT_DELAY,\n onError,\n onMaxTryReached,\n }: RetryManagerOptions = {}\n ): ((...args: Args) => Promise<R>) =>\n // ───────────────────────────────^ returned wrapper function\n async (...args: Args): Promise<R> => {\n let lastError: unknown;\n\n for (let attempt = 0; attempt <= maxRetry; attempt++) {\n try {\n return await fn(...args);\n } catch (err) {\n lastError = err;\n const error = extractErrorMessage(err);\n\n // If this was the last attempt, handle max retry reached\n if (attempt >= maxRetry) {\n if (onMaxTryReached) {\n onMaxTryReached?.({ error, attempt, maxRetry });\n return null as R;\n }\n\n // Otherwise, throw the error\n throw err;\n }\n\n if (onError) {\n onError?.({ error, attempt, maxRetry });\n } else {\n logger(error, {\n level: 'error',\n });\n }\n\n // Wait before retrying\n if (delay > 0) {\n await new Promise((res) => setTimeout(res, delay));\n }\n }\n }\n\n // This should never be reached, but TypeScript needs it\n throw (\n lastError ?? new Error('Unexpected: retry loop completed without result')\n );\n };\n"],"mappings":"uGAsBA,MAUa,GAET,EACA,CACE,WAAW,EACX,QAAQ,EACR,UACA,mBACuB,EAAE,GAG7B,MAAO,GAAG,IAA2B,CACnC,IAAI,EAEJ,IAAK,IAAI,EAAU,EAAG,GAAW,EAAU,IACzC,GAAI,CACF,OAAO,MAAM,EAAG,GAAG,EAAK,OACjB,EAAK,CACZ,EAAY,EACZ,IAAM,EAAQ,EAAoB,EAAI,CAGtC,GAAI,GAAW,EAAU,CACvB,GAAI,EAEF,OADA,IAAkB,CAAE,QAAO,UAAS,WAAU,CAAC,CACxC,KAIT,MAAM,EAGJ,EACF,IAAU,CAAE,QAAO,UAAS,WAAU,CAAC,CAEvC,EAAO,EAAO,CACZ,MAAO,QACR,CAAC,CAIA,EAAQ,GACV,MAAM,IAAI,QAAS,GAAQ,WAAW,EAAK,EAAM,CAAC,CAMxD,MACE,GAAiB,MAAM,kDAAkD"}
1
+ {"version":3,"file":"retryManager.mjs","names":[],"sources":["../../../src/utils/retryManager.ts"],"sourcesContent":["import { logger } from '../logger';\nimport { extractErrorMessage } from './extractErrorMessage';\n\nexport type RetryManagerOptions = {\n /** maximum number of retries before giving up */\n maxRetry?: number;\n /** delay between attempts, in milliseconds */\n delay?: number;\n /** function to call when an error occurs */\n onError?: (details: {\n error: string;\n attempt: number;\n maxRetry: number;\n }) => void;\n /** function to call when the maximum number of retries is reached */\n onMaxTryReached?: (details: {\n error: string;\n attempt: number;\n maxRetry: number;\n }) => void;\n};\n\nconst DEFAULT_MAX_RETRY = 3;\nconst DEFAULT_DELAY = 0;\n\n/**\n * Wrap an async function `fn` so it’s retried on failure.\n *\n * @param fn The async function to wrap\n * @param options { maxRetry, delay }\n * @returns A new function with the same signature as `fn`\n */\nexport const retryManager =\n <Args extends any[], R>(\n fn: (...args: Args) => Promise<R>,\n {\n maxRetry = DEFAULT_MAX_RETRY,\n delay = DEFAULT_DELAY,\n onError,\n onMaxTryReached,\n }: RetryManagerOptions = {}\n ): ((...args: Args) => Promise<R>) =>\n // ───────────────────────────────^ returned wrapper function\n async (...args: Args): Promise<R> => {\n let lastError: unknown;\n\n for (let attempt = 0; attempt <= maxRetry; attempt++) {\n try {\n return await fn(...args);\n } catch (err) {\n lastError = err;\n const error = extractErrorMessage(err);\n\n // If this was the last attempt, handle max retry reached\n if (attempt >= maxRetry) {\n if (onMaxTryReached) {\n onMaxTryReached?.({ error, attempt, maxRetry });\n return null as R;\n }\n\n // Otherwise, throw the error\n throw err;\n }\n\n if (onError) {\n onError?.({ error, attempt, maxRetry });\n } else {\n logger(error, {\n level: 'error',\n });\n }\n\n // Wait before retrying\n if (delay > 0) {\n await new Promise((res) => setTimeout(res, delay));\n }\n }\n }\n\n // This should never be reached, but TypeScript needs it\n throw (\n lastError ?? new Error('Unexpected: retry loop completed without result')\n );\n };\n"],"mappings":";;;;AAsBA,MAAM,oBAAoB;AAC1B,MAAM,gBAAgB;;;;;;;;AAStB,MAAa,gBAET,IACA,EACE,WAAW,mBACX,QAAQ,eACR,SACA,oBACuB,EAAE,KAG7B,OAAO,GAAG,SAA2B;CACnC,IAAI;AAEJ,MAAK,IAAI,UAAU,GAAG,WAAW,UAAU,UACzC,KAAI;AACF,SAAO,MAAM,GAAG,GAAG,KAAK;UACjB,KAAK;AACZ,cAAY;EACZ,MAAM,QAAQ,oBAAoB,IAAI;AAGtC,MAAI,WAAW,UAAU;AACvB,OAAI,iBAAiB;AACnB,sBAAkB;KAAE;KAAO;KAAS;KAAU,CAAC;AAC/C,WAAO;;AAIT,SAAM;;AAGR,MAAI,QACF,WAAU;GAAE;GAAO;GAAS;GAAU,CAAC;MAEvC,QAAO,OAAO,EACZ,OAAO,SACR,CAAC;AAIJ,MAAI,QAAQ,EACV,OAAM,IAAI,SAAS,QAAQ,WAAW,KAAK,MAAM,CAAC;;AAMxD,OACE,6BAAa,IAAI,MAAM,kDAAkD"}
@@ -1,2 +1,12 @@
1
- const e=e=>e.replace(/([a-z])([A-Z])/g,`$1-$2`).replace(/([A-Z])([A-Z][a-z])/g,`$1-$2`).toLowerCase();export{e as camelCaseToKebabCase};
1
+ //#region src/utils/stringFormatter/camelCaseToKebabCase.ts
2
+ /**
3
+ * Convert a string to kebab-case
4
+ * e.g. "MyNewComponent" => "my-new-component"
5
+ */
6
+ const camelCaseToKebabCase = (str) => {
7
+ return str.replace(/([a-z])([A-Z])/g, "$1-$2").replace(/([A-Z])([A-Z][a-z])/g, "$1-$2").toLowerCase();
8
+ };
9
+
10
+ //#endregion
11
+ export { camelCaseToKebabCase };
2
12
  //# sourceMappingURL=camelCaseToKebabCase.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"camelCaseToKebabCase.mjs","names":[],"sources":["../../../../src/utils/stringFormatter/camelCaseToKebabCase.ts"],"sourcesContent":["/**\n * Convert a string to kebab-case\n * e.g. \"MyNewComponent\" => \"my-new-component\"\n */\nexport const camelCaseToKebabCase = (str: string): string => {\n // Split on transition from lower->upper: \"MyNewComponent\" => [\"My\", \"New\", \"Component\"]\n // Then lowercase each chunk and join by \"-\"\n return str\n .replace(/([a-z])([A-Z])/g, '$1-$2')\n .replace(/([A-Z])([A-Z][a-z])/g, '$1-$2')\n .toLowerCase();\n};\n"],"mappings":"AAIA,MAAa,EAAwB,GAG5B,EACJ,QAAQ,kBAAmB,QAAQ,CACnC,QAAQ,uBAAwB,QAAQ,CACxC,aAAa"}
1
+ {"version":3,"file":"camelCaseToKebabCase.mjs","names":[],"sources":["../../../../src/utils/stringFormatter/camelCaseToKebabCase.ts"],"sourcesContent":["/**\n * Convert a string to kebab-case\n * e.g. \"MyNewComponent\" => \"my-new-component\"\n */\nexport const camelCaseToKebabCase = (str: string): string => {\n // Split on transition from lower->upper: \"MyNewComponent\" => [\"My\", \"New\", \"Component\"]\n // Then lowercase each chunk and join by \"-\"\n return str\n .replace(/([a-z])([A-Z])/g, '$1-$2')\n .replace(/([A-Z])([A-Z][a-z])/g, '$1-$2')\n .toLowerCase();\n};\n"],"mappings":";;;;;AAIA,MAAa,wBAAwB,QAAwB;AAG3D,QAAO,IACJ,QAAQ,mBAAmB,QAAQ,CACnC,QAAQ,wBAAwB,QAAQ,CACxC,aAAa"}
@@ -1,2 +1,15 @@
1
- const e=e=>{if(!e||typeof e!=`string`)return``;let t=e.replace(/([a-z])([A-Z])/g,`$1 $2`).replace(/([A-Z]+)([A-Z][a-z])/g,`$1 $2`);return t.charAt(0).toUpperCase()+t.slice(1).toLowerCase()};export{e as camelCaseToSentence};
1
+ //#region src/utils/stringFormatter/camelCaseToSentence.ts
2
+ /**
3
+ * Convert a string to sentence case
4
+ * e.g. 'my-new-component' → 'My new component'
5
+ */
6
+ const camelCaseToSentence = (value) => {
7
+ if (!value) return "";
8
+ if (typeof value !== "string") return "";
9
+ const withSpaces = value.replace(/([a-z])([A-Z])/g, "$1 $2").replace(/([A-Z]+)([A-Z][a-z])/g, "$1 $2");
10
+ return withSpaces.charAt(0).toUpperCase() + withSpaces.slice(1).toLowerCase();
11
+ };
12
+
13
+ //#endregion
14
+ export { camelCaseToSentence };
2
15
  //# sourceMappingURL=camelCaseToSentence.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"camelCaseToSentence.mjs","names":[],"sources":["../../../../src/utils/stringFormatter/camelCaseToSentence.ts"],"sourcesContent":["/**\n * Convert a string to sentence case\n * e.g. 'my-new-component' → 'My new component'\n */\nexport const camelCaseToSentence = (value: string): string => {\n if (!value) return '';\n if (typeof value !== 'string') return '';\n\n // Insert space before all caps that follow lowercase letters\n const withSpaces = value\n .replace(/([a-z])([A-Z])/g, '$1 $2')\n // Insert space between sequences like \"XMLParser\" → \"XML Parser\"\n .replace(/([A-Z]+)([A-Z][a-z])/g, '$1 $2');\n\n // Lowercase everything except the first character\n return withSpaces.charAt(0).toUpperCase() + withSpaces.slice(1).toLowerCase();\n};\n"],"mappings":"AAIA,MAAa,EAAuB,GAA0B,CAE5D,GADI,CAAC,GACD,OAAO,GAAU,SAAU,MAAO,GAGtC,IAAM,EAAa,EAChB,QAAQ,kBAAmB,QAAQ,CAEnC,QAAQ,wBAAyB,QAAQ,CAG5C,OAAO,EAAW,OAAO,EAAE,CAAC,aAAa,CAAG,EAAW,MAAM,EAAE,CAAC,aAAa"}
1
+ {"version":3,"file":"camelCaseToSentence.mjs","names":[],"sources":["../../../../src/utils/stringFormatter/camelCaseToSentence.ts"],"sourcesContent":["/**\n * Convert a string to sentence case\n * e.g. 'my-new-component' → 'My new component'\n */\nexport const camelCaseToSentence = (value: string): string => {\n if (!value) return '';\n if (typeof value !== 'string') return '';\n\n // Insert space before all caps that follow lowercase letters\n const withSpaces = value\n .replace(/([a-z])([A-Z])/g, '$1 $2')\n // Insert space between sequences like \"XMLParser\" → \"XML Parser\"\n .replace(/([A-Z]+)([A-Z][a-z])/g, '$1 $2');\n\n // Lowercase everything except the first character\n return withSpaces.charAt(0).toUpperCase() + withSpaces.slice(1).toLowerCase();\n};\n"],"mappings":";;;;;AAIA,MAAa,uBAAuB,UAA0B;AAC5D,KAAI,CAAC,MAAO,QAAO;AACnB,KAAI,OAAO,UAAU,SAAU,QAAO;CAGtC,MAAM,aAAa,MAChB,QAAQ,mBAAmB,QAAQ,CAEnC,QAAQ,yBAAyB,QAAQ;AAG5C,QAAO,WAAW,OAAO,EAAE,CAAC,aAAa,GAAG,WAAW,MAAM,EAAE,CAAC,aAAa"}
@@ -1 +1,6 @@
1
- import{camelCaseToKebabCase as e}from"./camelCaseToKebabCase.mjs";import{camelCaseToSentence as t}from"./camelCaseToSentence.mjs";import{kebabCaseToCamelCase as n}from"./kebabCaseToCamelCase.mjs";import{toLowerCamelCase as r}from"./toLowerCamelCase.mjs";export{e as camelCaseToKebabCase,t as camelCaseToSentence,n as kebabCaseToCamelCase,r as toLowerCamelCase};
1
+ import { camelCaseToKebabCase } from "./camelCaseToKebabCase.mjs";
2
+ import { camelCaseToSentence } from "./camelCaseToSentence.mjs";
3
+ import { kebabCaseToCamelCase } from "./kebabCaseToCamelCase.mjs";
4
+ import { toLowerCamelCase } from "./toLowerCamelCase.mjs";
5
+
6
+ export { camelCaseToKebabCase, camelCaseToSentence, kebabCaseToCamelCase, toLowerCamelCase };
@@ -1,2 +1,13 @@
1
- const e=e=>e.split(/[^a-zA-Z0-9]+/).filter(Boolean).map(e=>{let t=e.toLowerCase(),n=t.charAt(0).toUpperCase()+t.slice(1);return n=n.replace(/(\d)([a-z])/g,(e,t,n)=>t+n.toUpperCase()),n}).join(``);export{e as kebabCaseToCamelCase};
1
+ //#region src/utils/stringFormatter/kebabCaseToCamelCase.ts
2
+ const kebabCaseToCamelCase = (name) => {
3
+ return name.split(/[^a-zA-Z0-9]+/).filter(Boolean).map((word) => {
4
+ const lowerWord = word.toLowerCase();
5
+ let capitalized = lowerWord.charAt(0).toUpperCase() + lowerWord.slice(1);
6
+ capitalized = capitalized.replace(/(\d)([a-z])/g, (_, number, char) => number + char.toUpperCase());
7
+ return capitalized;
8
+ }).join("");
9
+ };
10
+
11
+ //#endregion
12
+ export { kebabCaseToCamelCase };
2
13
  //# sourceMappingURL=kebabCaseToCamelCase.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"kebabCaseToCamelCase.mjs","names":[],"sources":["../../../../src/utils/stringFormatter/kebabCaseToCamelCase.ts"],"sourcesContent":["export const kebabCaseToCamelCase = (name: string): string => {\n return name\n .split(/[^a-zA-Z0-9]+/) // Split on any non-alphanumeric character\n .filter(Boolean) // Remove any empty strings\n .map((word) => {\n // Convert the entire word to lowercase first\n const lowerWord = word.toLowerCase();\n\n // Capitalize the first character\n let capitalized = lowerWord.charAt(0).toUpperCase() + lowerWord.slice(1);\n\n // Capitalize any letter that follows a number\n capitalized = capitalized.replace(\n /(\\d)([a-z])/g,\n (_, number, char) => number + char.toUpperCase()\n );\n\n return capitalized;\n })\n .join(''); // Concatenate all parts into a single string\n};\n"],"mappings":"AAAA,MAAa,EAAwB,GAC5B,EACJ,MAAM,gBAAgB,CACtB,OAAO,QAAQ,CACf,IAAK,GAAS,CAEb,IAAM,EAAY,EAAK,aAAa,CAGhC,EAAc,EAAU,OAAO,EAAE,CAAC,aAAa,CAAG,EAAU,MAAM,EAAE,CAQxE,MALA,GAAc,EAAY,QACxB,gBACC,EAAG,EAAQ,IAAS,EAAS,EAAK,aAAa,CACjD,CAEM,GACP,CACD,KAAK,GAAG"}
1
+ {"version":3,"file":"kebabCaseToCamelCase.mjs","names":[],"sources":["../../../../src/utils/stringFormatter/kebabCaseToCamelCase.ts"],"sourcesContent":["export const kebabCaseToCamelCase = (name: string): string => {\n return name\n .split(/[^a-zA-Z0-9]+/) // Split on any non-alphanumeric character\n .filter(Boolean) // Remove any empty strings\n .map((word) => {\n // Convert the entire word to lowercase first\n const lowerWord = word.toLowerCase();\n\n // Capitalize the first character\n let capitalized = lowerWord.charAt(0).toUpperCase() + lowerWord.slice(1);\n\n // Capitalize any letter that follows a number\n capitalized = capitalized.replace(\n /(\\d)([a-z])/g,\n (_, number, char) => number + char.toUpperCase()\n );\n\n return capitalized;\n })\n .join(''); // Concatenate all parts into a single string\n};\n"],"mappings":";AAAA,MAAa,wBAAwB,SAAyB;AAC5D,QAAO,KACJ,MAAM,gBAAgB,CACtB,OAAO,QAAQ,CACf,KAAK,SAAS;EAEb,MAAM,YAAY,KAAK,aAAa;EAGpC,IAAI,cAAc,UAAU,OAAO,EAAE,CAAC,aAAa,GAAG,UAAU,MAAM,EAAE;AAGxE,gBAAc,YAAY,QACxB,iBACC,GAAG,QAAQ,SAAS,SAAS,KAAK,aAAa,CACjD;AAED,SAAO;GACP,CACD,KAAK,GAAG"}
@@ -1,2 +1,18 @@
1
- const e=e=>e?e.includes(`-`)?e.split(`-`).map((e,t)=>t===0?e.toLowerCase():e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()).join(``):e.charAt(0).toLowerCase()+e.slice(1):``;export{e as toLowerCamelCase};
1
+ //#region src/utils/stringFormatter/toLowerCamelCase.ts
2
+ /**
3
+ * Convert a string to lowerCamelCase
4
+ * e.g. "MyComponent" => "myComponent"
5
+ * e.g. "auth-middleware" => "authMiddleware"
6
+ */
7
+ const toLowerCamelCase = (str) => {
8
+ if (!str) return "";
9
+ if (str.includes("-")) return str.split("-").map((word, index) => {
10
+ if (index === 0) return word.toLowerCase();
11
+ return word.charAt(0).toUpperCase() + word.slice(1).toLowerCase();
12
+ }).join("");
13
+ return str.charAt(0).toLowerCase() + str.slice(1);
14
+ };
15
+
16
+ //#endregion
17
+ export { toLowerCamelCase };
2
18
  //# sourceMappingURL=toLowerCamelCase.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"toLowerCamelCase.mjs","names":[],"sources":["../../../../src/utils/stringFormatter/toLowerCamelCase.ts"],"sourcesContent":["/**\n * Convert a string to lowerCamelCase\n * e.g. \"MyComponent\" => \"myComponent\"\n * e.g. \"auth-middleware\" => \"authMiddleware\"\n */\nexport const toLowerCamelCase = (str: string): string => {\n if (!str) {\n return '';\n }\n\n // Handle kebab-case: \"auth-middleware\" => \"authMiddleware\"\n if (str.includes('-')) {\n return str\n .split('-')\n .map((word, index) => {\n if (index === 0) {\n return word.toLowerCase();\n }\n return word.charAt(0).toUpperCase() + word.slice(1).toLowerCase();\n })\n .join('');\n }\n\n // Handle PascalCase: \"MyComponent\" => \"myComponent\"\n return str.charAt(0).toLowerCase() + str.slice(1);\n};\n"],"mappings":"AAKA,MAAa,EAAoB,GAC1B,EAKD,EAAI,SAAS,IAAI,CACZ,EACJ,MAAM,IAAI,CACV,KAAK,EAAM,IACN,IAAU,EACL,EAAK,aAAa,CAEpB,EAAK,OAAO,EAAE,CAAC,aAAa,CAAG,EAAK,MAAM,EAAE,CAAC,aAAa,CACjE,CACD,KAAK,GAAG,CAIN,EAAI,OAAO,EAAE,CAAC,aAAa,CAAG,EAAI,MAAM,EAAE,CAjBxC"}
1
+ {"version":3,"file":"toLowerCamelCase.mjs","names":[],"sources":["../../../../src/utils/stringFormatter/toLowerCamelCase.ts"],"sourcesContent":["/**\n * Convert a string to lowerCamelCase\n * e.g. \"MyComponent\" => \"myComponent\"\n * e.g. \"auth-middleware\" => \"authMiddleware\"\n */\nexport const toLowerCamelCase = (str: string): string => {\n if (!str) {\n return '';\n }\n\n // Handle kebab-case: \"auth-middleware\" => \"authMiddleware\"\n if (str.includes('-')) {\n return str\n .split('-')\n .map((word, index) => {\n if (index === 0) {\n return word.toLowerCase();\n }\n return word.charAt(0).toUpperCase() + word.slice(1).toLowerCase();\n })\n .join('');\n }\n\n // Handle PascalCase: \"MyComponent\" => \"myComponent\"\n return str.charAt(0).toLowerCase() + str.slice(1);\n};\n"],"mappings":";;;;;;AAKA,MAAa,oBAAoB,QAAwB;AACvD,KAAI,CAAC,IACH,QAAO;AAIT,KAAI,IAAI,SAAS,IAAI,CACnB,QAAO,IACJ,MAAM,IAAI,CACV,KAAK,MAAM,UAAU;AACpB,MAAI,UAAU,EACZ,QAAO,KAAK,aAAa;AAE3B,SAAO,KAAK,OAAO,EAAE,CAAC,aAAa,GAAG,KAAK,MAAM,EAAE,CAAC,aAAa;GACjE,CACD,KAAK,GAAG;AAIb,QAAO,IAAI,OAAO,EAAE,CAAC,aAAa,GAAG,IAAI,MAAM,EAAE"}
@@ -1,8 +1,8 @@
1
1
  import { extractErrorMessage } from "./utils/extractErrorMessage.js";
2
2
  import { logStack } from "./utils/logStack.js";
3
3
  import { normalizePath } from "./utils/normalizePath.js";
4
- import { t as camelCaseToKebabCase } from "./camelCaseToKebabCase-BV_lLJHR.js";
5
- import { t as camelCaseToSentence } from "./camelCaseToSentence-DAbbkwe6.js";
6
- import { t as kebabCaseToCamelCase } from "./kebabCaseToCamelCase-h9PkNVuO.js";
7
- import { t as toLowerCamelCase } from "./toLowerCamelCase-DUdT00I1.js";
4
+ import { camelCaseToKebabCase } from "./utils/stringFormatter/camelCaseToKebabCase.js";
5
+ import { camelCaseToSentence } from "./utils/stringFormatter/camelCaseToSentence.js";
6
+ import { kebabCaseToCamelCase } from "./utils/stringFormatter/kebabCaseToCamelCase.js";
7
+ import { toLowerCamelCase } from "./utils/stringFormatter/toLowerCamelCase.js";
8
8
  export { camelCaseToKebabCase, camelCaseToSentence, extractErrorMessage, kebabCaseToCamelCase, logStack, normalizePath, toLowerCamelCase };
@@ -1,2 +1,20 @@
1
- import { a as GREEN, c as GREY_LIGHT, d as RED, f as RESET, i as CYAN, l as MAGENTA, m as YELLOW, n as BLUE, o as GREY, p as WHITE, r as BOLD, s as GREY_DARK, t as BEIGE, u as ORANGE } from "./colors-BbZeGWYU.js";
2
- export { BEIGE, BLUE, BOLD, CYAN, GREEN, GREY, GREY_DARK, GREY_LIGHT, MAGENTA, ORANGE, RED, RESET, WHITE, YELLOW };
1
+ declare namespace colors_d_exports {
2
+ export { BEIGE, BLUE, BOLD, CYAN, GREEN, GREY, GREY_DARK, GREY_LIGHT, MAGENTA, ORANGE, RED, RESET, WHITE, YELLOW };
3
+ }
4
+ declare const RESET: "\u001B[0m";
5
+ declare const GREY: "\u001B[90m";
6
+ declare const GREY_DARK: "\u001B[38;5;239m";
7
+ declare const GREY_LIGHT: "\u001B[38;5;252m";
8
+ declare const BLUE: "\u001B[34m";
9
+ declare const RED: "\u001B[31m";
10
+ declare const GREEN: "\u001B[32m";
11
+ declare const YELLOW: "\u001B[38;5;226m";
12
+ declare const MAGENTA: "\u001B[35m";
13
+ declare const BEIGE: "\u001B[38;5;3m";
14
+ declare const ORANGE: "\u001B[38;5;208m";
15
+ declare const CYAN: "\u001B[36m";
16
+ declare const WHITE: "\u001B[37m";
17
+ declare const BOLD: "\u001B[1m";
18
+ //#endregion
19
+ export { BEIGE, BLUE, BOLD, CYAN, GREEN, GREY, GREY_DARK, GREY_LIGHT, MAGENTA, ORANGE, RED, RESET, WHITE, YELLOW, colors_d_exports };
20
+ //# sourceMappingURL=colors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"colors.d.ts","names":[],"sources":["../../src/colors.ts"],"mappings":";;;cAAa,KAAA;AAAA,cACA,IAAA;AAAA,cACA,SAAA;AAAA,cACA,UAAA;AAAA,cACA,IAAA;AAAA,cACA,GAAA;AAAA,cACA,KAAA;AAAA,cACA,MAAA;AAAA,cACA,OAAA;AAAA,cACA,KAAA;AAAA,cACA,MAAA;AAAA,cACA,IAAA;AAAA,cACA,KAAA;AAAA,cACA,IAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"buildConfigurationFields.d.ts","names":[],"sources":["../../../src/configFile/buildConfigurationFields.ts"],"mappings":";;;;;AAy4BA;cAAa,wBAAA,GACX,mBAAA,GAAsB,oBAAA,EACtB,OAAA,WACA,YAAA,GAAe,YAAA,KACd,cAAA"}
1
+ {"version":3,"file":"buildConfigurationFields.d.ts","names":[],"sources":["../../../src/configFile/buildConfigurationFields.ts"],"mappings":";;;;;AA04BA;cAAa,wBAAA,GACX,mBAAA,GAAsB,oBAAA,EACtB,OAAA,WACA,YAAA,GAAe,YAAA,KACd,cAAA"}
@@ -1,5 +1,5 @@
1
1
  import { AiProviders } from "@intlayer/types/config";
2
- import { z } from "zod";
2
+ import z from "zod";
3
3
 
4
4
  //#region src/configFile/configurationSchema.d.ts
5
5
  declare const internationalizationSchema: z.ZodObject<{
@@ -1,5 +1,5 @@
1
- import { t as SandBoxContextOptions } from "../parseFileContent--o_QlW5j.js";
2
- import { t as LoadExternalFileOptions } from "../loadExternalFile-DmM_TGcA.js";
1
+ import { SandBoxContextOptions } from "../loadExternalFile/parseFileContent.js";
2
+ import { LoadExternalFileOptions } from "../loadExternalFile/loadExternalFile.js";
3
3
  import { CustomIntlayerConfig, IntlayerConfig, LogFunctions } from "@intlayer/types/config";
4
4
 
5
5
  //#region src/configFile/getConfiguration.d.ts
@@ -1,4 +1,4 @@
1
- import { t as LoadExternalFileOptions } from "../loadExternalFile-DmM_TGcA.js";
1
+ import { LoadExternalFileOptions } from "../loadExternalFile/loadExternalFile.js";
2
2
  import { CustomIntlayerConfig } from "@intlayer/types/config";
3
3
 
4
4
  //#region src/configFile/loadConfigurationFile.d.ts
@@ -1 +1 @@
1
- {"version":3,"file":"loadConfigurationFile.d.ts","names":[],"sources":["../../../src/configFile/loadConfigurationFile.ts"],"mappings":";;;;;;;;AA4BA;;cAAa,qBAAA,GACX,cAAA,UACA,OAAA,GAAU,IAAA,CAAK,uBAAA,uBACd,oBAAA"}
1
+ {"version":3,"file":"loadConfigurationFile.d.ts","names":[],"sources":["../../../src/configFile/loadConfigurationFile.ts"],"mappings":";;;;;;AA4BA;;;;cAAa,qBAAA,GACX,cAAA,UACA,OAAA,GAAU,IAAA,CAAK,uBAAA,uBACd,oBAAA"}
@@ -1,2 +1,10 @@
1
- import { n as getEnvFilePath, r as loadEnvFile, t as LoadEnvFileOptions } from "./loadEnvFile-BiTBX4fe.js";
2
- export { LoadEnvFileOptions, getEnvFilePath, loadEnvFile };
1
+ //#region src/loadEnvFile.d.ts
2
+ type LoadEnvFileOptions = {
3
+ env?: string;
4
+ envFile?: string;
5
+ };
6
+ declare const getEnvFilePath: (env?: string, envFile?: string) => string | undefined;
7
+ declare const loadEnvFile: (options?: Partial<LoadEnvFileOptions>) => {};
8
+ //#endregion
9
+ export { LoadEnvFileOptions, getEnvFilePath, loadEnvFile };
10
+ //# sourceMappingURL=loadEnvFile.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"loadEnvFile.d.ts","names":[],"sources":["../../src/loadEnvFile.ts"],"mappings":";KAKY,kBAAA;EACV,GAAA;EACA,OAAA;AAAA;AAAA,cAGW,cAAA,GACX,GAAA,WACA,OAAA;AAAA,cASW,WAAA,GAAe,OAAA,GAAU,OAAA,CAAQ,kBAAA"}
@@ -1,6 +1,6 @@
1
- import { n as getSandBoxContext, r as parseFileContent, t as SandBoxContextOptions } from "../parseFileContent--o_QlW5j.js";
2
- import { n as transpileTSToCJS, r as transpileTSToCJSSync, t as TranspileOptions } from "../transpileTSToCJS-OifpV3zk.js";
3
- import { n as loadExternalFile, r as loadExternalFileSync, t as LoadExternalFileOptions } from "../loadExternalFile-DmM_TGcA.js";
1
+ import { SandBoxContextOptions, getSandBoxContext, parseFileContent } from "./parseFileContent.js";
2
+ import { TranspileOptions, transpileTSToCJS, transpileTSToCJSSync } from "./transpileTSToCJS.js";
3
+ import { LoadExternalFileOptions, loadExternalFile, loadExternalFileSync } from "./loadExternalFile.js";
4
4
  import { ESBuildPlugin, bundleFile, bundleFileSync, getLoader } from "./bundleFile.js";
5
5
  import { bundleJSFile } from "./bundleJSFile.js";
6
6
  export { ESBuildPlugin, LoadExternalFileOptions, SandBoxContextOptions, TranspileOptions, bundleFile, bundleFileSync, bundleJSFile, getLoader, getSandBoxContext, loadExternalFile, loadExternalFileSync, parseFileContent, transpileTSToCJS, transpileTSToCJSSync };
@@ -1,2 +1,25 @@
1
- import { n as loadExternalFile, r as loadExternalFileSync, t as LoadExternalFileOptions } from "../loadExternalFile-DmM_TGcA.js";
2
- export { LoadExternalFileOptions, loadExternalFile, loadExternalFileSync };
1
+ import { SandBoxContextOptions } from "./parseFileContent.js";
2
+ import { TranspileOptions } from "./transpileTSToCJS.js";
3
+ import { IntlayerConfig } from "@intlayer/types/config";
4
+
5
+ //#region src/loadExternalFile/loadExternalFile.d.ts
6
+ type LoadExternalFileOptions = {
7
+ configuration?: IntlayerConfig;
8
+ buildOptions?: TranspileOptions;
9
+ logError?: boolean;
10
+ } & SandBoxContextOptions;
11
+ /**
12
+ * Load the content declaration from the given path
13
+ *
14
+ * Accepts JSON, JS, MJS and TS files as configuration
15
+ */
16
+ declare const loadExternalFileSync: (filePath: string, options?: LoadExternalFileOptions) => any | undefined;
17
+ /**
18
+ * Load the content declaration from the given path
19
+ *
20
+ * Accepts JSON, JS, MJS and TS files as configuration
21
+ */
22
+ declare const loadExternalFile: (filePath: string, options?: LoadExternalFileOptions) => Promise<any | undefined>;
23
+ //#endregion
24
+ export { LoadExternalFileOptions, loadExternalFile, loadExternalFileSync };
25
+ //# sourceMappingURL=loadExternalFile.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"loadExternalFile.d.ts","names":[],"sources":["../../../src/loadExternalFile/loadExternalFile.ts"],"mappings":";;;;;KAmBY,uBAAA;EACV,aAAA,GAAgB,cAAA;EAChB,YAAA,GAAe,gBAAA;EACf,QAAA;AAAA,IACE,qBAAA;;;;;;cAOS,oBAAA,GACX,QAAA,UACA,OAAA,GAAU,uBAAA;;;;;;cA4DC,gBAAA,GACX,QAAA,UACA,OAAA,GAAU,uBAAA,KACT,OAAA"}
@@ -1,2 +1,29 @@
1
- import { n as getSandBoxContext, r as parseFileContent, t as SandBoxContextOptions } from "../parseFileContent--o_QlW5j.js";
2
- export { SandBoxContextOptions, getSandBoxContext, parseFileContent };
1
+ import { LoadEnvFileOptions } from "../loadEnvFile.js";
2
+ import { Context } from "node:vm";
3
+
4
+ //#region src/loadExternalFile/parseFileContent.d.ts
5
+ type SandBoxContextOptions = {
6
+ envVarOptions?: LoadEnvFileOptions;
7
+ projectRequire?: NodeJS.Require;
8
+ additionalEnvVars?: Record<string, string>;
9
+ /**
10
+ * Map of specifier -> mocked export to be returned when code in the VM calls require(specifier).
11
+ * Example:
12
+ * mocks: {
13
+ * '@intlayer/config/built': { getConfig: () => ({}), Locales: {} }
14
+ * }
15
+ */
16
+ mocks?: Record<string, any>;
17
+ /**
18
+ * Optional alias map if you want to redirect specifiers.
19
+ * Useful when user code imports a subpath you want to collapse.
20
+ * Example:
21
+ * aliases: { '@intlayer/config/built': '@intlayer/config' }
22
+ */
23
+ aliases?: Record<string, string>;
24
+ };
25
+ declare const getSandBoxContext: (options?: SandBoxContextOptions) => Context;
26
+ declare const parseFileContent: <T>(fileContentString: string, options?: SandBoxContextOptions) => T | undefined;
27
+ //#endregion
28
+ export { SandBoxContextOptions, getSandBoxContext, parseFileContent };
29
+ //# sourceMappingURL=parseFileContent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parseFileContent.d.ts","names":[],"sources":["../../../src/loadExternalFile/parseFileContent.ts"],"mappings":";;;;KAKY,qBAAA;EACV,aAAA,GAAgB,kBAAA;EAChB,cAAA,GAAiB,MAAA,CAAO,OAAA;EACxB,iBAAA,GAAoB,MAAA;;;;;;;;EAQpB,KAAA,GAAQ,MAAA;EAVR;;;;;;EAiBA,OAAA,GAAU,MAAA;AAAA;AAAA,cAGC,iBAAA,GAAqB,OAAA,GAAU,qBAAA,KAAwB,OAAA;AAAA,cAgGvD,gBAAA,MACX,iBAAA,UACA,OAAA,GAAU,qBAAA,KACT,CAAA"}
@@ -1,2 +1,19 @@
1
- import { n as transpileTSToCJS, r as transpileTSToCJSSync, t as TranspileOptions } from "../transpileTSToCJS-OifpV3zk.js";
2
- export { TranspileOptions, transpileTSToCJS, transpileTSToCJSSync };
1
+ import * as esbuild from "esbuild";
2
+ import { BuildOptions } from "esbuild";
3
+
4
+ //#region src/loadExternalFile/transpileTSToCJS.d.ts
5
+ type TranspileOptions = BuildOptions & {
6
+ /**
7
+ * Optional custom esbuild instance to use for transpilation.
8
+ * Useful in environments (e.g. VS Code extensions) where the bundled
9
+ * esbuild binary may not match the host platform.
10
+ * When provided, its `buildSync`/`build` methods are used instead of
11
+ * the ones imported from the `esbuild` package.
12
+ */
13
+ esbuildInstance?: typeof esbuild;
14
+ };
15
+ declare const transpileTSToCJSSync: (code: string, filePath: string, options?: TranspileOptions) => string | undefined;
16
+ declare const transpileTSToCJS: (code: string, filePath: string, options?: TranspileOptions) => Promise<string | undefined>;
17
+ //#endregion
18
+ export { TranspileOptions, transpileTSToCJS, transpileTSToCJSSync };
19
+ //# sourceMappingURL=transpileTSToCJS.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"transpileTSToCJS.d.ts","names":[],"sources":["../../../src/loadExternalFile/transpileTSToCJS.ts"],"mappings":";;;;KAOY,gBAAA,GAAmB,YAAA;;;AAA/B;;;;;EAQE,eAAA,UARyC,OAAA;AAAA;AAAA,cA6C9B,oBAAA,GACX,IAAA,UACA,QAAA,UACA,OAAA,GAAU,gBAAA;AAAA,cAwBC,gBAAA,GACX,IAAA,UACA,QAAA,UACA,OAAA,GAAU,gBAAA,KACT,OAAA"}
@@ -1,4 +1,4 @@
1
- import { h as colors_d_exports } from "./colors-BbZeGWYU.js";
1
+ import { colors_d_exports } from "./colors.js";
2
2
  import { CustomIntlayerConfig } from "@intlayer/types/config";
3
3
  import { Locale } from "@intlayer/types/allLocales";
4
4
 
@@ -1,10 +1,10 @@
1
1
  import { extractErrorMessage } from "./extractErrorMessage.js";
2
2
  import { logStack } from "./logStack.js";
3
3
  import { normalizePath } from "./normalizePath.js";
4
- import { t as camelCaseToKebabCase } from "../camelCaseToKebabCase-BV_lLJHR.js";
5
- import { t as camelCaseToSentence } from "../camelCaseToSentence-DAbbkwe6.js";
6
- import { t as kebabCaseToCamelCase } from "../kebabCaseToCamelCase-h9PkNVuO.js";
7
- import { t as toLowerCamelCase } from "../toLowerCamelCase-DUdT00I1.js";
4
+ import { camelCaseToKebabCase } from "./stringFormatter/camelCaseToKebabCase.js";
5
+ import { camelCaseToSentence } from "./stringFormatter/camelCaseToSentence.js";
6
+ import { kebabCaseToCamelCase } from "./stringFormatter/kebabCaseToCamelCase.js";
7
+ import { toLowerCamelCase } from "./stringFormatter/toLowerCamelCase.js";
8
8
  import { configESMxCJSRequire, getProjectRequire, isESModule } from "./ESMxCJSHelpers.js";
9
9
  import { GetAliasOptions, getAlias } from "./alias.js";
10
10
  import { CacheKey, cacheMemory, clearAllCache, clearCache, computeKeyId, getCache, setCache, stableStringify } from "./cacheMemory.js";