@intlayer/editor-react 7.1.3 → 7.1.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 (157) hide show
  1. package/README.md +0 -3
  2. package/dist/types/ConfigurationContext.d.ts +2 -2
  3. package/dist/types/EditorEnabledContext.d.ts +2 -2
  4. package/dist/types/useEditorLocale.d.ts +2 -2
  5. package/package.json +6 -6
  6. package/dist/cjs/FocusDictionaryContext copy.cjs +0 -57
  7. package/dist/cjs/FocusDictionaryContext copy.cjs.map +0 -1
  8. package/dist/cjs/FocusDictionaryServerContext.cjs +0 -24
  9. package/dist/cjs/FocusDictionaryServerContext.cjs.map +0 -1
  10. package/dist/cjs/FocusDictionaryUnmergedContext.cjs +0 -102
  11. package/dist/cjs/FocusDictionaryUnmergedContext.cjs.map +0 -1
  12. package/dist/cjs/config/dist/esm/_virtual/rolldown_runtime.cjs +0 -10
  13. package/dist/cjs/config/dist/esm/_virtual/rolldown_runtime.cjs.map +0 -1
  14. package/dist/cjs/config/dist/esm/built.cjs +0 -8
  15. package/dist/cjs/config/dist/esm/built.cjs.map +0 -1
  16. package/dist/cjs/config/dist/esm/configFile/buildConfigurationFields.cjs +0 -119
  17. package/dist/cjs/config/dist/esm/configFile/buildConfigurationFields.cjs.map +0 -1
  18. package/dist/cjs/config/dist/esm/configFile/getConfiguration.cjs +0 -69
  19. package/dist/cjs/config/dist/esm/configFile/getConfiguration.cjs.map +0 -1
  20. package/dist/cjs/config/dist/esm/configFile/loadConfigurationFile.cjs +0 -26
  21. package/dist/cjs/config/dist/esm/configFile/loadConfigurationFile.cjs.map +0 -1
  22. package/dist/cjs/config/dist/esm/configFile/searchConfigurationFile.cjs +0 -51
  23. package/dist/cjs/config/dist/esm/configFile/searchConfigurationFile.cjs.map +0 -1
  24. package/dist/cjs/config/dist/esm/defaultValues/build.cjs +0 -15
  25. package/dist/cjs/config/dist/esm/defaultValues/build.cjs.map +0 -1
  26. package/dist/cjs/config/dist/esm/defaultValues/content.cjs +0 -54
  27. package/dist/cjs/config/dist/esm/defaultValues/content.cjs.map +0 -1
  28. package/dist/cjs/config/dist/esm/defaultValues/dictionary.cjs +0 -7
  29. package/dist/cjs/config/dist/esm/defaultValues/dictionary.cjs.map +0 -1
  30. package/dist/cjs/config/dist/esm/defaultValues/editor.cjs +0 -23
  31. package/dist/cjs/config/dist/esm/defaultValues/editor.cjs.map +0 -1
  32. package/dist/cjs/config/dist/esm/defaultValues/internationalization.cjs +0 -14
  33. package/dist/cjs/config/dist/esm/defaultValues/internationalization.cjs.map +0 -1
  34. package/dist/cjs/config/dist/esm/defaultValues/log.cjs +0 -10
  35. package/dist/cjs/config/dist/esm/defaultValues/log.cjs.map +0 -1
  36. package/dist/cjs/config/dist/esm/defaultValues/routing.cjs +0 -11
  37. package/dist/cjs/config/dist/esm/defaultValues/routing.cjs.map +0 -1
  38. package/dist/cjs/config/dist/esm/loadEnvFile.cjs +0 -26
  39. package/dist/cjs/config/dist/esm/loadEnvFile.cjs.map +0 -1
  40. package/dist/cjs/config/dist/esm/loadExternalFile/bundleFile.cjs +0 -23
  41. package/dist/cjs/config/dist/esm/loadExternalFile/bundleFile.cjs.map +0 -1
  42. package/dist/cjs/config/dist/esm/loadExternalFile/loadExternalFile.cjs +0 -47
  43. package/dist/cjs/config/dist/esm/loadExternalFile/loadExternalFile.cjs.map +0 -1
  44. package/dist/cjs/config/dist/esm/loadExternalFile/parseFileContent.cjs +0 -65
  45. package/dist/cjs/config/dist/esm/loadExternalFile/parseFileContent.cjs.map +0 -1
  46. package/dist/cjs/config/dist/esm/loadExternalFile/transpileTSToMJS.cjs +0 -45
  47. package/dist/cjs/config/dist/esm/loadExternalFile/transpileTSToMJS.cjs.map +0 -1
  48. package/dist/cjs/config/dist/esm/logger.cjs +0 -47
  49. package/dist/cjs/config/dist/esm/logger.cjs.map +0 -1
  50. package/dist/cjs/config/dist/esm/types/dist/esm/_virtual/rolldown_runtime.cjs +0 -15
  51. package/dist/cjs/config/dist/esm/types/dist/esm/_virtual/rolldown_runtime.cjs.map +0 -1
  52. package/dist/cjs/config/dist/esm/types/dist/esm/locales.cjs +0 -1128
  53. package/dist/cjs/config/dist/esm/types/dist/esm/locales.cjs.map +0 -1
  54. package/dist/cjs/config/dist/esm/utils/ESMxCJSHelpers.cjs +0 -27
  55. package/dist/cjs/config/dist/esm/utils/ESMxCJSHelpers.cjs.map +0 -1
  56. package/dist/cjs/config/dist/esm/utils/cache.cjs +0 -261
  57. package/dist/cjs/config/dist/esm/utils/cache.cjs.map +0 -1
  58. package/dist/cjs/config/dist/esm/utils/getPackageJsonPath.cjs +0 -34
  59. package/dist/cjs/config/dist/esm/utils/getPackageJsonPath.cjs.map +0 -1
  60. package/dist/cjs/config/dist/esm/utils/normalizePath.cjs +0 -17
  61. package/dist/cjs/config/dist/esm/utils/normalizePath.cjs.map +0 -1
  62. package/dist/cjs/core/dist/esm/dictionaryManipulator/editDictionaryByKeyPath.cjs +0 -60
  63. package/dist/cjs/core/dist/esm/dictionaryManipulator/editDictionaryByKeyPath.cjs.map +0 -1
  64. package/dist/cjs/core/dist/esm/dictionaryManipulator/getContentNodeByKeyPath.cjs +0 -17
  65. package/dist/cjs/core/dist/esm/dictionaryManipulator/getContentNodeByKeyPath.cjs.map +0 -1
  66. package/dist/cjs/core/dist/esm/dictionaryManipulator/renameContentNodeByKeyPath.cjs +0 -38
  67. package/dist/cjs/core/dist/esm/dictionaryManipulator/renameContentNodeByKeyPath.cjs.map +0 -1
  68. package/dist/cjs/core/dist/esm/types/dist/esm/nodeType.cjs +0 -25
  69. package/dist/cjs/core/dist/esm/types/dist/esm/nodeType.cjs.map +0 -1
  70. package/dist/cjs/editor/dist/esm/compareUrls.cjs +0 -39
  71. package/dist/cjs/editor/dist/esm/compareUrls.cjs.map +0 -1
  72. package/dist/cjs/editor/dist/esm/mergeIframeClick.cjs +0 -22
  73. package/dist/cjs/editor/dist/esm/mergeIframeClick.cjs.map +0 -1
  74. package/dist/cjs/editor/dist/esm/messagesKeys.cjs +0 -19
  75. package/dist/cjs/editor/dist/esm/messagesKeys.cjs.map +0 -1
  76. package/dist/cjs/types/dist/esm/nodeType.cjs +0 -25
  77. package/dist/cjs/types/dist/esm/nodeType.cjs.map +0 -1
  78. package/dist/esm/FocusDictionaryContext copy.mjs +0 -51
  79. package/dist/esm/FocusDictionaryContext copy.mjs.map +0 -1
  80. package/dist/esm/FocusDictionaryServerContext.mjs +0 -21
  81. package/dist/esm/FocusDictionaryServerContext.mjs.map +0 -1
  82. package/dist/esm/FocusDictionaryUnmergedContext.mjs +0 -93
  83. package/dist/esm/FocusDictionaryUnmergedContext.mjs.map +0 -1
  84. package/dist/esm/_virtual/rolldown_runtime.mjs +0 -8
  85. package/dist/esm/config/dist/esm/_virtual/rolldown_runtime.mjs +0 -11
  86. package/dist/esm/config/dist/esm/_virtual/rolldown_runtime.mjs.map +0 -1
  87. package/dist/esm/config/dist/esm/built.mjs +0 -8
  88. package/dist/esm/config/dist/esm/built.mjs.map +0 -1
  89. package/dist/esm/config/dist/esm/configFile/buildConfigurationFields.mjs +0 -118
  90. package/dist/esm/config/dist/esm/configFile/buildConfigurationFields.mjs.map +0 -1
  91. package/dist/esm/config/dist/esm/configFile/getConfiguration.mjs +0 -67
  92. package/dist/esm/config/dist/esm/configFile/getConfiguration.mjs.map +0 -1
  93. package/dist/esm/config/dist/esm/configFile/loadConfigurationFile.mjs +0 -26
  94. package/dist/esm/config/dist/esm/configFile/loadConfigurationFile.mjs.map +0 -1
  95. package/dist/esm/config/dist/esm/configFile/searchConfigurationFile.mjs +0 -50
  96. package/dist/esm/config/dist/esm/configFile/searchConfigurationFile.mjs.map +0 -1
  97. package/dist/esm/config/dist/esm/defaultValues/build.mjs +0 -10
  98. package/dist/esm/config/dist/esm/defaultValues/build.mjs.map +0 -1
  99. package/dist/esm/config/dist/esm/defaultValues/content.mjs +0 -40
  100. package/dist/esm/config/dist/esm/defaultValues/content.mjs.map +0 -1
  101. package/dist/esm/config/dist/esm/defaultValues/dictionary.mjs +0 -6
  102. package/dist/esm/config/dist/esm/defaultValues/dictionary.mjs.map +0 -1
  103. package/dist/esm/config/dist/esm/defaultValues/editor.mjs +0 -14
  104. package/dist/esm/config/dist/esm/defaultValues/editor.mjs.map +0 -1
  105. package/dist/esm/config/dist/esm/defaultValues/internationalization.mjs +0 -11
  106. package/dist/esm/config/dist/esm/defaultValues/internationalization.mjs.map +0 -1
  107. package/dist/esm/config/dist/esm/defaultValues/log.mjs +0 -9
  108. package/dist/esm/config/dist/esm/defaultValues/log.mjs.map +0 -1
  109. package/dist/esm/config/dist/esm/defaultValues/routing.mjs +0 -8
  110. package/dist/esm/config/dist/esm/defaultValues/routing.mjs.map +0 -1
  111. package/dist/esm/config/dist/esm/loadEnvFile.mjs +0 -24
  112. package/dist/esm/config/dist/esm/loadEnvFile.mjs.map +0 -1
  113. package/dist/esm/config/dist/esm/loadExternalFile/bundleFile.mjs +0 -23
  114. package/dist/esm/config/dist/esm/loadExternalFile/bundleFile.mjs.map +0 -1
  115. package/dist/esm/config/dist/esm/loadExternalFile/loadExternalFile.mjs +0 -47
  116. package/dist/esm/config/dist/esm/loadExternalFile/loadExternalFile.mjs.map +0 -1
  117. package/dist/esm/config/dist/esm/loadExternalFile/parseFileContent.mjs +0 -63
  118. package/dist/esm/config/dist/esm/loadExternalFile/parseFileContent.mjs.map +0 -1
  119. package/dist/esm/config/dist/esm/loadExternalFile/transpileTSToMJS.mjs +0 -44
  120. package/dist/esm/config/dist/esm/loadExternalFile/transpileTSToMJS.mjs.map +0 -1
  121. package/dist/esm/config/dist/esm/logger.mjs +0 -45
  122. package/dist/esm/config/dist/esm/logger.mjs.map +0 -1
  123. package/dist/esm/config/dist/esm/types/dist/esm/_virtual/rolldown_runtime.mjs +0 -14
  124. package/dist/esm/config/dist/esm/types/dist/esm/_virtual/rolldown_runtime.mjs.map +0 -1
  125. package/dist/esm/config/dist/esm/types/dist/esm/locales.mjs +0 -1128
  126. package/dist/esm/config/dist/esm/types/dist/esm/locales.mjs.map +0 -1
  127. package/dist/esm/config/dist/esm/utils/ESMxCJSHelpers.mjs +0 -25
  128. package/dist/esm/config/dist/esm/utils/ESMxCJSHelpers.mjs.map +0 -1
  129. package/dist/esm/config/dist/esm/utils/cache.mjs +0 -263
  130. package/dist/esm/config/dist/esm/utils/cache.mjs.map +0 -1
  131. package/dist/esm/config/dist/esm/utils/getPackageJsonPath.mjs +0 -33
  132. package/dist/esm/config/dist/esm/utils/getPackageJsonPath.mjs.map +0 -1
  133. package/dist/esm/config/dist/esm/utils/normalizePath.mjs +0 -16
  134. package/dist/esm/config/dist/esm/utils/normalizePath.mjs.map +0 -1
  135. package/dist/esm/core/dist/esm/dictionaryManipulator/editDictionaryByKeyPath.mjs +0 -60
  136. package/dist/esm/core/dist/esm/dictionaryManipulator/editDictionaryByKeyPath.mjs.map +0 -1
  137. package/dist/esm/core/dist/esm/dictionaryManipulator/getContentNodeByKeyPath.mjs +0 -17
  138. package/dist/esm/core/dist/esm/dictionaryManipulator/getContentNodeByKeyPath.mjs.map +0 -1
  139. package/dist/esm/core/dist/esm/dictionaryManipulator/renameContentNodeByKeyPath.mjs +0 -38
  140. package/dist/esm/core/dist/esm/dictionaryManipulator/renameContentNodeByKeyPath.mjs.map +0 -1
  141. package/dist/esm/core/dist/esm/types/dist/esm/nodeType.mjs +0 -24
  142. package/dist/esm/core/dist/esm/types/dist/esm/nodeType.mjs.map +0 -1
  143. package/dist/esm/editor/dist/esm/compareUrls.mjs +0 -38
  144. package/dist/esm/editor/dist/esm/compareUrls.mjs.map +0 -1
  145. package/dist/esm/editor/dist/esm/mergeIframeClick.mjs +0 -21
  146. package/dist/esm/editor/dist/esm/mergeIframeClick.mjs.map +0 -1
  147. package/dist/esm/editor/dist/esm/messagesKeys.mjs +0 -18
  148. package/dist/esm/editor/dist/esm/messagesKeys.mjs.map +0 -1
  149. package/dist/esm/types/dist/esm/nodeType.mjs +0 -24
  150. package/dist/esm/types/dist/esm/nodeType.mjs.map +0 -1
  151. package/dist/types/FocusDictionaryContext copy.d.ts +0 -23
  152. package/dist/types/FocusDictionaryContext copy.d.ts.map +0 -1
  153. package/dist/types/FocusDictionaryServerContext.d.ts +0 -9
  154. package/dist/types/FocusDictionaryServerContext.d.ts.map +0 -1
  155. package/dist/types/FocusDictionaryUnmergedContext.d.ts +0 -43
  156. package/dist/types/FocusDictionaryUnmergedContext.d.ts.map +0 -1
  157. package/dist/types/index.d.ts.map +0 -1
@@ -1,51 +0,0 @@
1
- const require_rolldown_runtime = require('../../../../_virtual/rolldown_runtime.cjs');
2
- const require_logger = require('../logger.cjs');
3
- const require_getPackageJsonPath = require('../utils/getPackageJsonPath.cjs');
4
- let node_path = require("node:path");
5
- let node_fs = require("node:fs");
6
-
7
- //#region ../config/dist/esm/configFile/searchConfigurationFile.mjs
8
- const EXTENSION = [
9
- "ts",
10
- "js",
11
- "json",
12
- "cjs",
13
- "mjs",
14
- ""
15
- ];
16
- const CONFIGURATION_FILE_NAME_1 = "intlayer.config";
17
- const CONFIGURATION_FILE_NAME_2 = ".intlayerrc";
18
- const configurationFiles = [...EXTENSION.filter((extension) => extension !== "").map((ext) => `${CONFIGURATION_FILE_NAME_1}.${ext}`), CONFIGURATION_FILE_NAME_2];
19
- /**
20
- * Search for the configuration file in the given path
21
- *
22
- * List of detected configuration files:
23
- * - intlayer.config.ts
24
- * - intlayer.config.js
25
- * - intlayer.config.json
26
- * - intlayer.config.cjs
27
- * - intlayer.config.mjs
28
- * - .intlayerrc
29
- */
30
- const searchConfigurationFile = (startDir) => {
31
- let configurationFilePath;
32
- let numCustomConfiguration = 0;
33
- const { baseDir } = require_getPackageJsonPath.getPackageJsonPath(startDir);
34
- for (const fileName of configurationFiles) try {
35
- const filePath = (0, node_path.resolve)(baseDir, fileName);
36
- if (!(0, node_fs.existsSync)(filePath)) {} else {
37
- numCustomConfiguration += 1;
38
- if (!configurationFilePath) configurationFilePath = filePath;
39
- }
40
- } catch (error) {
41
- require_logger.logger(`${fileName}: ${error}`, { level: "error" });
42
- }
43
- return {
44
- configurationFilePath,
45
- numCustomConfiguration
46
- };
47
- };
48
-
49
- //#endregion
50
- exports.searchConfigurationFile = searchConfigurationFile;
51
- //# sourceMappingURL=searchConfigurationFile.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"searchConfigurationFile.cjs","names":["getPackageJsonPath"],"sources":["../../../../../../../config/dist/esm/configFile/searchConfigurationFile.mjs"],"sourcesContent":["import { logger } from \"../logger.mjs\";\nimport { getPackageJsonPath } from \"../utils/getPackageJsonPath.mjs\";\nimport { resolve } from \"node:path\";\nimport { existsSync } from \"node:fs\";\n\n//#region src/configFile/searchConfigurationFile.ts\nconst EXTENSION = [\n\t\"ts\",\n\t\"js\",\n\t\"json\",\n\t\"cjs\",\n\t\"mjs\",\n\t\"\"\n];\nconst CONFIGURATION_FILE_NAME_1 = \"intlayer.config\";\nconst CONFIGURATION_FILE_NAME_2 = \".intlayerrc\";\nconst configurationFiles = [...EXTENSION.filter((extension) => extension !== \"\").map((ext) => `${CONFIGURATION_FILE_NAME_1}.${ext}`), CONFIGURATION_FILE_NAME_2];\n/**\n* Search for the configuration file in the given path\n*\n* List of detected configuration files:\n* - intlayer.config.ts\n* - intlayer.config.js\n* - intlayer.config.json\n* - intlayer.config.cjs\n* - intlayer.config.mjs\n* - .intlayerrc\n*/\nconst searchConfigurationFile = (startDir) => {\n\tlet configurationFilePath;\n\tlet numCustomConfiguration = 0;\n\tconst { baseDir } = getPackageJsonPath(startDir);\n\tfor (const fileName of configurationFiles) try {\n\t\tconst filePath = resolve(baseDir, fileName);\n\t\tif (!existsSync(filePath)) {} else {\n\t\t\tnumCustomConfiguration += 1;\n\t\t\tif (!configurationFilePath) configurationFilePath = filePath;\n\t\t}\n\t} catch (error) {\n\t\tlogger(`${fileName}: ${error}`, { level: \"error\" });\n\t}\n\treturn {\n\t\tconfigurationFilePath,\n\t\tnumCustomConfiguration\n\t};\n};\n\n//#endregion\nexport { searchConfigurationFile };\n//# sourceMappingURL=searchConfigurationFile.mjs.map"],"mappings":";;;;;;;AAMA,MAAM,YAAY;CACjB;CACA;CACA;CACA;CACA;CACA;CACA;AACD,MAAM,4BAA4B;AAClC,MAAM,4BAA4B;AAClC,MAAM,qBAAqB,CAAC,GAAG,UAAU,QAAQ,cAAc,cAAc,GAAG,CAAC,KAAK,QAAQ,GAAG,0BAA0B,GAAG,MAAM,EAAE,0BAA0B;;;;;;;;;;;;AAYhK,MAAM,2BAA2B,aAAa;CAC7C,IAAI;CACJ,IAAI,yBAAyB;CAC7B,MAAM,EAAE,YAAYA,8CAAmB,SAAS;AAChD,MAAK,MAAM,YAAY,mBAAoB,KAAI;EAC9C,MAAM,kCAAmB,SAAS,SAAS;AAC3C,MAAI,yBAAY,SAAS,EAAE,QAAQ;AAClC,6BAA0B;AAC1B,OAAI,CAAC,sBAAuB,yBAAwB;;UAE7C,OAAO;AACf,wBAAO,GAAG,SAAS,IAAI,SAAS,EAAE,OAAO,SAAS,CAAC;;AAEpD,QAAO;EACN;EACA;EACA"}
@@ -1,15 +0,0 @@
1
-
2
- //#region ../config/dist/esm/defaultValues/build.mjs
3
- const OPTIMIZE = false;
4
- const IMPORT_MODE = "static";
5
- const TRAVERSE_PATTERN = ["**/*.{js,ts,mjs,cjs,jsx,tsx,mjx,cjx,vue,svelte,svte}", "!**/node_modules/**"];
6
- const OUTPUT_FORMAT = ["cjs", "esm"];
7
- const CACHE = true;
8
-
9
- //#endregion
10
- exports.CACHE = CACHE;
11
- exports.IMPORT_MODE = IMPORT_MODE;
12
- exports.OPTIMIZE = OPTIMIZE;
13
- exports.OUTPUT_FORMAT = OUTPUT_FORMAT;
14
- exports.TRAVERSE_PATTERN = TRAVERSE_PATTERN;
15
- //# sourceMappingURL=build.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"build.cjs","names":[],"sources":["../../../../../../../config/dist/esm/defaultValues/build.mjs"],"sourcesContent":["import { __export } from \"../_virtual/rolldown_runtime.mjs\";\n\n//#region src/defaultValues/build.ts\nvar build_exports = /* @__PURE__ */ __export({\n\tCACHE: () => CACHE,\n\tIMPORT_MODE: () => IMPORT_MODE,\n\tOPTIMIZE: () => OPTIMIZE,\n\tOUTPUT_FORMAT: () => OUTPUT_FORMAT,\n\tTRAVERSE_PATTERN: () => TRAVERSE_PATTERN\n});\nconst OPTIMIZE = false;\nconst IMPORT_MODE = \"static\";\nconst TRAVERSE_PATTERN = [\"**/*.{js,ts,mjs,cjs,jsx,tsx,mjx,cjx,vue,svelte,svte}\", \"!**/node_modules/**\"];\nconst OUTPUT_FORMAT = [\"cjs\", \"esm\"];\nconst CACHE = true;\n\n//#endregion\nexport { CACHE, IMPORT_MODE, OPTIMIZE, OUTPUT_FORMAT, TRAVERSE_PATTERN, build_exports };\n//# sourceMappingURL=build.mjs.map"],"mappings":";;AAUA,MAAM,WAAW;AACjB,MAAM,cAAc;AACpB,MAAM,mBAAmB,CAAC,wDAAwD,sBAAsB;AACxG,MAAM,gBAAgB,CAAC,OAAO,MAAM;AACpC,MAAM,QAAQ"}
@@ -1,54 +0,0 @@
1
-
2
- //#region ../config/dist/esm/defaultValues/content.mjs
3
- const FILE_EXTENSIONS = [
4
- ".content.ts",
5
- ".content.js",
6
- ".content.cjs",
7
- ".content.cjx",
8
- ".content.mjs",
9
- ".content.mjx",
10
- ".content.json",
11
- ".content.tsx",
12
- ".content.jsx"
13
- ];
14
- const EXCLUDED_PATHS = [
15
- "**/node_modules/**",
16
- "**/dist/**",
17
- "**/build/**",
18
- "**/.intlayer/**",
19
- "**/.next/**",
20
- "**/.nuxt/**",
21
- "**/.expo/**",
22
- "**/.vercel/**",
23
- "**/.turbo/**",
24
- "**/.tanstack/**"
25
- ];
26
- const CONTENT_DIR = ["."];
27
- const MAIN_DIR = ".intlayer/main";
28
- const DICTIONARIES_DIR = ".intlayer/dictionary";
29
- const REMOTE_DICTIONARIES_DIR = ".intlayer/remote_dictionary";
30
- const UNMERGED_DICTIONARIES_DIR = ".intlayer/unmerged_dictionary";
31
- const DYNAMIC_DICTIONARIES_DIR = ".intlayer/dynamic_dictionary";
32
- const FETCH_DICTIONARIES_DIR = ".intlayer/fetch_dictionary";
33
- const TYPES_DIR = ".intlayer/types";
34
- const MODULE_AUGMENTATION_DIR = ".intlayer/types";
35
- const CONFIG_DIR = ".intlayer/config";
36
- const CACHE_DIR = ".intlayer/cache";
37
- const WATCH = true;
38
-
39
- //#endregion
40
- exports.CACHE_DIR = CACHE_DIR;
41
- exports.CONFIG_DIR = CONFIG_DIR;
42
- exports.CONTENT_DIR = CONTENT_DIR;
43
- exports.DICTIONARIES_DIR = DICTIONARIES_DIR;
44
- exports.DYNAMIC_DICTIONARIES_DIR = DYNAMIC_DICTIONARIES_DIR;
45
- exports.EXCLUDED_PATHS = EXCLUDED_PATHS;
46
- exports.FETCH_DICTIONARIES_DIR = FETCH_DICTIONARIES_DIR;
47
- exports.FILE_EXTENSIONS = FILE_EXTENSIONS;
48
- exports.MAIN_DIR = MAIN_DIR;
49
- exports.MODULE_AUGMENTATION_DIR = MODULE_AUGMENTATION_DIR;
50
- exports.REMOTE_DICTIONARIES_DIR = REMOTE_DICTIONARIES_DIR;
51
- exports.TYPES_DIR = TYPES_DIR;
52
- exports.UNMERGED_DICTIONARIES_DIR = UNMERGED_DICTIONARIES_DIR;
53
- exports.WATCH = WATCH;
54
- //# sourceMappingURL=content.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"content.cjs","names":[],"sources":["../../../../../../../config/dist/esm/defaultValues/content.mjs"],"sourcesContent":["import { __export } from \"../_virtual/rolldown_runtime.mjs\";\n\n//#region src/defaultValues/content.ts\nvar content_exports = /* @__PURE__ */ __export({\n\tCACHE_DIR: () => CACHE_DIR,\n\tCONFIG_DIR: () => CONFIG_DIR,\n\tCONTENT_DIR: () => CONTENT_DIR,\n\tDICTIONARIES_DIR: () => DICTIONARIES_DIR,\n\tDYNAMIC_DICTIONARIES_DIR: () => DYNAMIC_DICTIONARIES_DIR,\n\tEXCLUDED_PATHS: () => EXCLUDED_PATHS,\n\tFETCH_DICTIONARIES_DIR: () => FETCH_DICTIONARIES_DIR,\n\tFILE_EXTENSIONS: () => FILE_EXTENSIONS,\n\tI18NEXT_DICTIONARIES_DIR: () => I18NEXT_DICTIONARIES_DIR,\n\tMAIN_DIR: () => MAIN_DIR,\n\tMASKS_DIR: () => MASKS_DIR,\n\tMODULE_AUGMENTATION_DIR: () => MODULE_AUGMENTATION_DIR,\n\tREACT_INTL_MESSAGES_DIR: () => REACT_INTL_MESSAGES_DIR,\n\tREMOTE_DICTIONARIES_DIR: () => REMOTE_DICTIONARIES_DIR,\n\tTYPES_DIR: () => TYPES_DIR,\n\tUNMERGED_DICTIONARIES_DIR: () => UNMERGED_DICTIONARIES_DIR,\n\tWATCH: () => WATCH\n});\nconst FILE_EXTENSIONS = [\n\t\".content.ts\",\n\t\".content.js\",\n\t\".content.cjs\",\n\t\".content.cjx\",\n\t\".content.mjs\",\n\t\".content.mjx\",\n\t\".content.json\",\n\t\".content.tsx\",\n\t\".content.jsx\"\n];\nconst EXCLUDED_PATHS = [\n\t\"**/node_modules/**\",\n\t\"**/dist/**\",\n\t\"**/build/**\",\n\t\"**/.intlayer/**\",\n\t\"**/.next/**\",\n\t\"**/.nuxt/**\",\n\t\"**/.expo/**\",\n\t\"**/.vercel/**\",\n\t\"**/.turbo/**\",\n\t\"**/.tanstack/**\"\n];\nconst CONTENT_DIR = [\".\"];\nconst MAIN_DIR = \".intlayer/main\";\nconst DICTIONARIES_DIR = \".intlayer/dictionary\";\nconst MASKS_DIR = \".intlayer/mask\";\nconst REMOTE_DICTIONARIES_DIR = \".intlayer/remote_dictionary\";\nconst UNMERGED_DICTIONARIES_DIR = \".intlayer/unmerged_dictionary\";\nconst DYNAMIC_DICTIONARIES_DIR = \".intlayer/dynamic_dictionary\";\nconst FETCH_DICTIONARIES_DIR = \".intlayer/fetch_dictionary\";\nconst TYPES_DIR = \".intlayer/types\";\nconst MODULE_AUGMENTATION_DIR = \".intlayer/types\";\nconst I18NEXT_DICTIONARIES_DIR = \"i18next_resources\";\nconst REACT_INTL_MESSAGES_DIR = \"intl_messages\";\nconst CONFIG_DIR = \".intlayer/config\";\nconst CACHE_DIR = \".intlayer/cache\";\nconst WATCH = true;\n\n//#endregion\nexport { CACHE_DIR, CONFIG_DIR, CONTENT_DIR, DICTIONARIES_DIR, DYNAMIC_DICTIONARIES_DIR, EXCLUDED_PATHS, FETCH_DICTIONARIES_DIR, FILE_EXTENSIONS, I18NEXT_DICTIONARIES_DIR, MAIN_DIR, MASKS_DIR, MODULE_AUGMENTATION_DIR, REACT_INTL_MESSAGES_DIR, REMOTE_DICTIONARIES_DIR, TYPES_DIR, UNMERGED_DICTIONARIES_DIR, WATCH, content_exports };\n//# sourceMappingURL=content.mjs.map"],"mappings":";;AAsBA,MAAM,kBAAkB;CACvB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD,MAAM,iBAAiB;CACtB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD,MAAM,cAAc,CAAC,IAAI;AACzB,MAAM,WAAW;AACjB,MAAM,mBAAmB;AAEzB,MAAM,0BAA0B;AAChC,MAAM,4BAA4B;AAClC,MAAM,2BAA2B;AACjC,MAAM,yBAAyB;AAC/B,MAAM,YAAY;AAClB,MAAM,0BAA0B;AAGhC,MAAM,aAAa;AACnB,MAAM,YAAY;AAClB,MAAM,QAAQ"}
@@ -1,7 +0,0 @@
1
-
2
- //#region ../config/dist/esm/defaultValues/dictionary.mjs
3
- const FILL = true;
4
-
5
- //#endregion
6
- exports.FILL = FILL;
7
- //# sourceMappingURL=dictionary.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"dictionary.cjs","names":[],"sources":["../../../../../../../config/dist/esm/defaultValues/dictionary.mjs"],"sourcesContent":["//#region src/defaultValues/dictionary.ts\nconst FILL = true;\n\n//#endregion\nexport { FILL };\n//# sourceMappingURL=dictionary.mjs.map"],"mappings":";;AACA,MAAM,OAAO"}
@@ -1,23 +0,0 @@
1
-
2
- //#region ../config/dist/esm/defaultValues/editor.mjs
3
- const APPLICATION_URL = "";
4
- const EDITOR_URL = "http://localhost:8000";
5
- const CMS_URL = "https://intlayer.org";
6
- const PORT = 8e3;
7
- const BACKEND_URL = "https://back.intlayer.org";
8
- const IS_ENABLED = true;
9
- const LIVE_SYNC = true;
10
- const DICTIONARY_PRIORITY_STRATEGY = "local_first";
11
- const LIVE_SYNC_PORT = 4e3;
12
-
13
- //#endregion
14
- exports.APPLICATION_URL = APPLICATION_URL;
15
- exports.BACKEND_URL = BACKEND_URL;
16
- exports.CMS_URL = CMS_URL;
17
- exports.DICTIONARY_PRIORITY_STRATEGY = DICTIONARY_PRIORITY_STRATEGY;
18
- exports.EDITOR_URL = EDITOR_URL;
19
- exports.IS_ENABLED = IS_ENABLED;
20
- exports.LIVE_SYNC = LIVE_SYNC;
21
- exports.LIVE_SYNC_PORT = LIVE_SYNC_PORT;
22
- exports.PORT = PORT;
23
- //# sourceMappingURL=editor.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"editor.cjs","names":[],"sources":["../../../../../../../config/dist/esm/defaultValues/editor.mjs"],"sourcesContent":["import { __export } from \"../_virtual/rolldown_runtime.mjs\";\n\n//#region src/defaultValues/editor.ts\nvar editor_exports = /* @__PURE__ */ __export({\n\tAPPLICATION_URL: () => APPLICATION_URL,\n\tBACKEND_URL: () => BACKEND_URL,\n\tCMS_URL: () => CMS_URL,\n\tDICTIONARY_PRIORITY_STRATEGY: () => DICTIONARY_PRIORITY_STRATEGY,\n\tEDITOR_URL: () => EDITOR_URL,\n\tIS_ENABLED: () => IS_ENABLED,\n\tLIVE_SYNC: () => LIVE_SYNC,\n\tLIVE_SYNC_PORT: () => LIVE_SYNC_PORT,\n\tPORT: () => PORT\n});\nconst APPLICATION_URL = \"\";\nconst EDITOR_URL = \"http://localhost:8000\";\nconst CMS_URL = \"https://intlayer.org\";\nconst PORT = 8e3;\nconst BACKEND_URL = \"https://back.intlayer.org\";\nconst IS_ENABLED = true;\nconst LIVE_SYNC = true;\nconst DICTIONARY_PRIORITY_STRATEGY = \"local_first\";\nconst LIVE_SYNC_PORT = 4e3;\n\n//#endregion\nexport { APPLICATION_URL, BACKEND_URL, CMS_URL, DICTIONARY_PRIORITY_STRATEGY, EDITOR_URL, IS_ENABLED, LIVE_SYNC, LIVE_SYNC_PORT, PORT, editor_exports };\n//# sourceMappingURL=editor.mjs.map"],"mappings":";;AAcA,MAAM,kBAAkB;AACxB,MAAM,aAAa;AACnB,MAAM,UAAU;AAChB,MAAM,OAAO;AACb,MAAM,cAAc;AACpB,MAAM,aAAa;AACnB,MAAM,YAAY;AAClB,MAAM,+BAA+B;AACrC,MAAM,iBAAiB"}
@@ -1,14 +0,0 @@
1
- const require_locales = require('../types/dist/esm/locales.cjs');
2
-
3
- //#region ../config/dist/esm/defaultValues/internationalization.mjs
4
- const LOCALES = [require_locales.locales_exports.ENGLISH];
5
- const REQUIRED_LOCALES = [];
6
- const DEFAULT_LOCALE = require_locales.locales_exports.ENGLISH;
7
- const STRICT_MODE = "inclusive";
8
-
9
- //#endregion
10
- exports.DEFAULT_LOCALE = DEFAULT_LOCALE;
11
- exports.LOCALES = LOCALES;
12
- exports.REQUIRED_LOCALES = REQUIRED_LOCALES;
13
- exports.STRICT_MODE = STRICT_MODE;
14
- //# sourceMappingURL=internationalization.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"internationalization.cjs","names":["locales_exports"],"sources":["../../../../../../../config/dist/esm/defaultValues/internationalization.mjs"],"sourcesContent":["import { __export } from \"../_virtual/rolldown_runtime.mjs\";\nimport { locales_exports } from \"../types/dist/esm/locales.mjs\";\n\n//#region src/defaultValues/internationalization.ts\nvar internationalization_exports = /* @__PURE__ */ __export({\n\tDEFAULT_LOCALE: () => DEFAULT_LOCALE,\n\tLOCALES: () => LOCALES,\n\tREQUIRED_LOCALES: () => REQUIRED_LOCALES,\n\tSTRICT_MODE: () => STRICT_MODE\n});\nconst LOCALES = [locales_exports.ENGLISH];\nconst REQUIRED_LOCALES = [];\nconst DEFAULT_LOCALE = locales_exports.ENGLISH;\nconst STRICT_MODE = \"inclusive\";\n\n//#endregion\nexport { DEFAULT_LOCALE, LOCALES, REQUIRED_LOCALES, STRICT_MODE, internationalization_exports };\n//# sourceMappingURL=internationalization.mjs.map"],"mappings":";;;AAUA,MAAM,UAAU,CAACA,gCAAgB,QAAQ;AACzC,MAAM,mBAAmB,EAAE;AAC3B,MAAM,iBAAiBA,gCAAgB;AACvC,MAAM,cAAc"}
@@ -1,10 +0,0 @@
1
- const require_logger = require('../logger.cjs');
2
-
3
- //#region ../config/dist/esm/defaultValues/log.mjs
4
- const MODE = "default";
5
- const PREFIX = `${require_logger.ANSIColors.GREY_DARK}[intlayer] ${require_logger.ANSIColors.RESET}`;
6
-
7
- //#endregion
8
- exports.MODE = MODE;
9
- exports.PREFIX = PREFIX;
10
- //# sourceMappingURL=log.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"log.cjs","names":["ANSIColors"],"sources":["../../../../../../../config/dist/esm/defaultValues/log.mjs"],"sourcesContent":["import { __export } from \"../_virtual/rolldown_runtime.mjs\";\nimport { ANSIColors } from \"../logger.mjs\";\n\n//#region src/defaultValues/log.ts\nvar log_exports = /* @__PURE__ */ __export({\n\tMODE: () => MODE,\n\tPREFIX: () => PREFIX\n});\nconst MODE = \"default\";\nconst PREFIX = `${ANSIColors.GREY_DARK}[intlayer] ${ANSIColors.RESET}`;\n\n//#endregion\nexport { MODE, PREFIX, log_exports };\n//# sourceMappingURL=log.mjs.map"],"mappings":";;;AAQA,MAAM,OAAO;AACb,MAAM,SAAS,GAAGA,0BAAW,UAAU,aAAaA,0BAAW"}
@@ -1,11 +0,0 @@
1
-
2
- //#region ../config/dist/esm/defaultValues/routing.mjs
3
- const BASE_PATH = "";
4
- const ROUTING_MODE = "prefix-no-default";
5
- const STORAGE = ["cookie", "header"];
6
-
7
- //#endregion
8
- exports.BASE_PATH = BASE_PATH;
9
- exports.ROUTING_MODE = ROUTING_MODE;
10
- exports.STORAGE = STORAGE;
11
- //# sourceMappingURL=routing.cjs.map
@@ -1 +0,0 @@
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":";;AAeA,MAAM,YAAY;AAElB,MAAM,eAAe;AACrB,MAAM,UAAU,CAAC,UAAU,SAAS"}
@@ -1,26 +0,0 @@
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
@@ -1 +0,0 @@
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"}
@@ -1,23 +0,0 @@
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
@@ -1 +0,0 @@
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"}
@@ -1,47 +0,0 @@
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
@@ -1 +0,0 @@
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"}
@@ -1,65 +0,0 @@
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
@@ -1 +0,0 @@
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"}
@@ -1,45 +0,0 @@
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
@@ -1 +0,0 @@
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"}
@@ -1,47 +0,0 @@
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
- const colorize = (s, color, reset) => color ? `${color}${s}${reset ? typeof reset === "boolean" ? ANSIColors.RESET : reset : ANSIColors.RESET}` : s;
40
- const x = colorize("✗", ANSIColors.RED);
41
- const v = colorize("✓", ANSIColors.GREEN);
42
- const clock = colorize("⏲", ANSIColors.BLUE);
43
-
44
- //#endregion
45
- exports.ANSIColors = ANSIColors;
46
- exports.logger = logger;
47
- //# sourceMappingURL=logger.cjs.map
@@ -1 +0,0 @@
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;AA0BL,MAAM,YAAY,GAAG,OAAO,UAAU,QAAQ,GAAG,QAAQ,IAAI,QAAQ,OAAO,UAAU,YAAY,WAAW,QAAQ,QAAQ,WAAW,UAAU;AAyDlJ,MAAM,IAAI,SAAS,KAAK,WAAW,IAAI;AACvC,MAAM,IAAI,SAAS,KAAK,WAAW,MAAM;AACzC,MAAM,QAAQ,SAAS,KAAK,WAAW,KAAK"}
@@ -1,15 +0,0 @@
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
@@ -1 +0,0 @@
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"}