@intlayer/engine 9.5.3 → 9.5.4-canary.0

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 (125) hide show
  1. package/README.md +8 -8
  2. package/dist/cjs/_virtual/_utils_asset.cjs +1 -1
  3. package/dist/cjs/build.cjs +2 -2
  4. package/dist/cjs/cleanOutputDir.cjs +1 -1
  5. package/dist/cjs/cleanRemovedContentDeclaration.cjs +37 -20
  6. package/dist/cjs/cleanRemovedContentDeclaration.cjs.map +1 -1
  7. package/dist/cjs/cli.cjs +2 -2
  8. package/dist/cjs/createDictionaryEntryPoint/getBuiltDictionariesPath.cjs +2 -2
  9. package/dist/cjs/createDictionaryEntryPoint/getBuiltDynamicDictionariesPath.cjs +2 -2
  10. package/dist/cjs/createDictionaryEntryPoint/getBuiltFetchDictionariesPath.cjs +2 -2
  11. package/dist/cjs/createDictionaryEntryPoint/getBuiltRemoteDictionariesPath.cjs +2 -2
  12. package/dist/cjs/createDictionaryEntryPoint/getBuiltUnmergedDictionariesPath.cjs +2 -2
  13. package/dist/cjs/createType/createModuleAugmentation.cjs +2 -2
  14. package/dist/cjs/docReview/index.cjs +4 -4
  15. package/dist/cjs/docReview/pipeline.cjs +2 -2
  16. package/dist/cjs/docReview/reviewReport.cjs +1 -1
  17. package/dist/cjs/filterInvalidDictionaries.cjs +1 -1
  18. package/dist/cjs/handleAdditionalContentDeclarationFile.cjs +1 -1
  19. package/dist/cjs/handleContentDeclarationFileChange.cjs +4 -4
  20. package/dist/cjs/handleContentDeclarationFileMoved.cjs +1 -1
  21. package/dist/cjs/handleUnlinkedContentDeclarationFile.cjs +1 -1
  22. package/dist/cjs/init/cms.cjs +2 -2
  23. package/dist/cjs/init/frameworkSetup/nextAppRouter/index.cjs +1 -1
  24. package/dist/cjs/init/frameworkSetup/tanstackStart/index.cjs +1 -1
  25. package/dist/cjs/init/index.cjs +2 -2
  26. package/dist/cjs/init/utils/fileSystem.cjs +1 -1
  27. package/dist/cjs/init/utils/githubActions.cjs +1 -1
  28. package/dist/cjs/init/utils/nextCompilerBabel.cjs +1 -1
  29. package/dist/cjs/init/utils/packageManager.cjs +1 -1
  30. package/dist/cjs/installLSP.cjs +1 -1
  31. package/dist/cjs/installMCP/installMCP.cjs +1 -1
  32. package/dist/cjs/installSkills/index.cjs +1 -1
  33. package/dist/cjs/listDictionariesPath.cjs +1 -1
  34. package/dist/cjs/listGitFiles.cjs +2 -2
  35. package/dist/cjs/listProjects.cjs +1 -1
  36. package/dist/cjs/loadDictionaries/getIntlayerBundle.cjs +1 -1
  37. package/dist/cjs/loadDictionaries/loadContentDeclaration.cjs +1 -1
  38. package/dist/cjs/loadDictionaries/loadDictionaries.cjs +1 -1
  39. package/dist/cjs/loadDictionaries/loadRemoteDictionaries.cjs +2 -2
  40. package/dist/cjs/loadDictionaries/loadRemoteDictionaries.cjs.map +1 -1
  41. package/dist/cjs/loadDictionaries/log.cjs +2 -2
  42. package/dist/cjs/logConfigDetails.cjs +3 -3
  43. package/dist/cjs/logConfigDetails.cjs.map +1 -1
  44. package/dist/cjs/prepareIntlayer.cjs +3 -3
  45. package/dist/cjs/scan/index.cjs +1 -1
  46. package/dist/cjs/scan/scanWebsite.cjs +2 -2
  47. package/dist/cjs/syncPluginKit/createFileAdapter.cjs +1 -1
  48. package/dist/cjs/utils/autoDecorateContent.cjs +5 -5
  49. package/dist/cjs/utils/autoDecorateContent.cjs.map +1 -1
  50. package/dist/cjs/utils/buildComponentFilesList.cjs +2 -2
  51. package/dist/cjs/utils/contentWatcherLock.cjs +2 -2
  52. package/dist/cjs/utils/formatter.cjs +1 -1
  53. package/dist/cjs/utils/readDictionariesFromDisk.cjs +1 -1
  54. package/dist/cjs/utils/runOnce.cjs +1 -1
  55. package/dist/cjs/utils/runParallel/pidTree.cjs +1 -1
  56. package/dist/cjs/utils/withFileLock.cjs +1 -1
  57. package/dist/cjs/watcher.cjs +5 -5
  58. package/dist/cjs/writeContentDeclaration/processContentDeclarationContent.cjs +1 -1
  59. package/dist/cjs/writeContentDeclaration/writeContentDeclaration.cjs +1 -1
  60. package/dist/cjs/writeContentDeclaration/writeJSFile.cjs +1 -1
  61. package/dist/cjs/writeFileIfChanged.cjs +1 -1
  62. package/dist/esm/_virtual/_utils_asset.mjs +1 -1
  63. package/dist/esm/build.mjs +2 -2
  64. package/dist/esm/cleanOutputDir.mjs +1 -1
  65. package/dist/esm/cleanRemovedContentDeclaration.mjs +37 -20
  66. package/dist/esm/cleanRemovedContentDeclaration.mjs.map +1 -1
  67. package/dist/esm/cli.mjs +2 -2
  68. package/dist/esm/createDictionaryEntryPoint/getBuiltDictionariesPath.mjs +2 -2
  69. package/dist/esm/createDictionaryEntryPoint/getBuiltDynamicDictionariesPath.mjs +2 -2
  70. package/dist/esm/createDictionaryEntryPoint/getBuiltFetchDictionariesPath.mjs +2 -2
  71. package/dist/esm/createDictionaryEntryPoint/getBuiltRemoteDictionariesPath.mjs +2 -2
  72. package/dist/esm/createDictionaryEntryPoint/getBuiltUnmergedDictionariesPath.mjs +2 -2
  73. package/dist/esm/createType/createModuleAugmentation.mjs +1 -1
  74. package/dist/esm/docReview/index.mjs +4 -4
  75. package/dist/esm/docReview/pipeline.mjs +2 -2
  76. package/dist/esm/docReview/reviewReport.mjs +1 -1
  77. package/dist/esm/filterInvalidDictionaries.mjs +1 -1
  78. package/dist/esm/handleAdditionalContentDeclarationFile.mjs +1 -1
  79. package/dist/esm/handleContentDeclarationFileChange.mjs +4 -4
  80. package/dist/esm/handleContentDeclarationFileMoved.mjs +1 -1
  81. package/dist/esm/handleUnlinkedContentDeclarationFile.mjs +1 -1
  82. package/dist/esm/init/cms.mjs +1 -1
  83. package/dist/esm/init/frameworkSetup/nextAppRouter/index.mjs +1 -1
  84. package/dist/esm/init/frameworkSetup/tanstackStart/index.mjs +1 -1
  85. package/dist/esm/init/index.mjs +1 -1
  86. package/dist/esm/init/utils/fileSystem.mjs +1 -1
  87. package/dist/esm/init/utils/githubActions.mjs +1 -1
  88. package/dist/esm/init/utils/nextCompilerBabel.mjs +1 -1
  89. package/dist/esm/init/utils/packageManager.mjs +1 -1
  90. package/dist/esm/installLSP.mjs +1 -1
  91. package/dist/esm/installMCP/installMCP.mjs +1 -1
  92. package/dist/esm/installSkills/index.mjs +1 -1
  93. package/dist/esm/listDictionariesPath.mjs +1 -1
  94. package/dist/esm/listGitFiles.mjs +2 -2
  95. package/dist/esm/listProjects.mjs +1 -1
  96. package/dist/esm/loadDictionaries/getIntlayerBundle.mjs +1 -1
  97. package/dist/esm/loadDictionaries/loadContentDeclaration.mjs +1 -1
  98. package/dist/esm/loadDictionaries/loadDictionaries.mjs +1 -1
  99. package/dist/esm/loadDictionaries/loadRemoteDictionaries.mjs +1 -1
  100. package/dist/esm/loadDictionaries/loadRemoteDictionaries.mjs.map +1 -1
  101. package/dist/esm/loadDictionaries/log.mjs +1 -1
  102. package/dist/esm/logConfigDetails.mjs +3 -3
  103. package/dist/esm/logConfigDetails.mjs.map +1 -1
  104. package/dist/esm/prepareIntlayer.mjs +2 -2
  105. package/dist/esm/scan/index.mjs +1 -1
  106. package/dist/esm/scan/scanWebsite.mjs +2 -2
  107. package/dist/esm/syncPluginKit/createFileAdapter.mjs +1 -1
  108. package/dist/esm/utils/autoDecorateContent.mjs +5 -5
  109. package/dist/esm/utils/autoDecorateContent.mjs.map +1 -1
  110. package/dist/esm/utils/buildComponentFilesList.mjs +1 -1
  111. package/dist/esm/utils/contentWatcherLock.mjs +2 -2
  112. package/dist/esm/utils/formatter.mjs +1 -1
  113. package/dist/esm/utils/readDictionariesFromDisk.mjs +1 -1
  114. package/dist/esm/utils/runOnce.mjs +1 -1
  115. package/dist/esm/utils/runParallel/pidTree.mjs +1 -1
  116. package/dist/esm/utils/withFileLock.mjs +1 -1
  117. package/dist/esm/watcher.mjs +4 -4
  118. package/dist/esm/writeContentDeclaration/processContentDeclarationContent.mjs +1 -1
  119. package/dist/esm/writeContentDeclaration/writeContentDeclaration.mjs +1 -1
  120. package/dist/esm/writeContentDeclaration/writeJSFile.mjs +1 -1
  121. package/dist/esm/writeFileIfChanged.mjs +1 -1
  122. package/dist/types/cleanRemovedContentDeclaration.d.ts.map +1 -1
  123. package/dist/types/logConfigDetails.d.ts.map +1 -1
  124. package/dist/types/utils/autoDecorateContent.d.ts.map +1 -1
  125. package/package.json +9 -10
@@ -1,6 +1,6 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- let node_path = require("node:path");
3
2
  let node_fs = require("node:fs");
3
+ let node_path = require("node:path");
4
4
  let _intlayer_config_utils = require("@intlayer/config/utils");
5
5
  let node_child_process = require("node:child_process");
6
6
 
@@ -1,8 +1,8 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
2
  const require_runtime = require('./_virtual/_rolldown/runtime.cjs');
3
+ let node_fs = require("node:fs");
3
4
  let node_path = require("node:path");
4
5
  node_path = require_runtime.__toESM(node_path);
5
- let node_fs = require("node:fs");
6
6
 
7
7
  //#region src/installLSP.ts
8
8
  const VSCODE_DIR = ".vscode";
@@ -1,9 +1,9 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
2
  const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
3
3
  const require_installSkills_index = require('../installSkills/index.cjs');
4
+ let node_fs = require("node:fs");
4
5
  let node_path = require("node:path");
5
6
  node_path = require_runtime.__toESM(node_path);
6
- let node_fs = require("node:fs");
7
7
  let node_os = require("node:os");
8
8
  node_os = require_runtime.__toESM(node_os);
9
9
 
@@ -1,10 +1,10 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
2
  const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
3
3
  const require__utils_asset = require('../_virtual/_utils_asset.cjs');
4
+ let node_fs = require("node:fs");
4
5
  let node_path = require("node:path");
5
6
  node_path = require_runtime.__toESM(node_path);
6
7
  let _intlayer_config_logger = require("@intlayer/config/logger");
7
- let node_fs = require("node:fs");
8
8
  let _intlayer_core_markdown = require("@intlayer/core/markdown");
9
9
 
10
10
  //#region src/installSkills/index.ts
@@ -1,9 +1,9 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
2
  const require_runtime = require('./_virtual/_rolldown/runtime.cjs');
3
3
  let node_fs_promises = require("node:fs/promises");
4
+ let _intlayer_config_utils = require("@intlayer/config/utils");
4
5
  let fast_glob = require("fast-glob");
5
6
  fast_glob = require_runtime.__toESM(fast_glob);
6
- let _intlayer_config_utils = require("@intlayer/config/utils");
7
7
 
8
8
  //#region src/listDictionariesPath.ts
9
9
  /**
@@ -1,11 +1,11 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
2
  const require_runtime = require('./_virtual/_rolldown/runtime.cjs');
3
+ let node_fs = require("node:fs");
3
4
  let node_path = require("node:path");
4
5
  let _intlayer_config_logger = require("@intlayer/config/logger");
5
- let node_fs = require("node:fs");
6
+ let _intlayer_config_built = require("@intlayer/config/built");
6
7
  let simple_git = require("simple-git");
7
8
  simple_git = require_runtime.__toESM(simple_git);
8
- let _intlayer_config_built = require("@intlayer/config/built");
9
9
 
10
10
  //#region src/listGitFiles.ts
11
11
  const getGitRootDir = async () => {
@@ -1,9 +1,9 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
2
  const require_runtime = require('./_virtual/_rolldown/runtime.cjs');
3
3
  let node_path = require("node:path");
4
+ let _intlayer_config_node = require("@intlayer/config/node");
4
5
  let fast_glob = require("fast-glob");
5
6
  fast_glob = require_runtime.__toESM(fast_glob);
6
- let _intlayer_config_node = require("@intlayer/config/node");
7
7
  let simple_git = require("simple-git");
8
8
  simple_git = require_runtime.__toESM(simple_git);
9
9
 
@@ -1,8 +1,8 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
2
  let node_fs_promises = require("node:fs/promises");
3
3
  let node_path = require("node:path");
4
- let _intlayer_config_utils = require("@intlayer/config/utils");
5
4
  let _intlayer_config_file = require("@intlayer/config/file");
5
+ let _intlayer_config_utils = require("@intlayer/config/utils");
6
6
  let node_module = require("node:module");
7
7
 
8
8
  //#region src/loadDictionaries/getIntlayerBundle.ts
@@ -8,8 +8,8 @@ const require_loadDictionaries_loadYamlContentDeclaration = require('./loadYamlC
8
8
  const require_loadDictionaries_logTypeScriptErrors = require('./logTypeScriptErrors.cjs');
9
9
  let node_fs_promises = require("node:fs/promises");
10
10
  let node_path = require("node:path");
11
- let _intlayer_config_utils = require("@intlayer/config/utils");
12
11
  let _intlayer_config_file = require("@intlayer/config/file");
12
+ let _intlayer_config_utils = require("@intlayer/config/utils");
13
13
 
14
14
  //#region src/loadDictionaries/loadContentDeclaration.ts
15
15
  const formatLocalDictionaries = (dictionariesRecord, configuration) => Object.entries(dictionariesRecord).map(([relativePath, dict]) => ({
@@ -5,9 +5,9 @@ const require_loadDictionaries_loadContentDeclaration = require('./loadContentDe
5
5
  const require_formatDictionary = require('../formatDictionary.cjs');
6
6
  const require_loadDictionaries_loadRemoteDictionaries = require('./loadRemoteDictionaries.cjs');
7
7
  const require_loadDictionaries_log = require('./log.cjs');
8
- let _intlayer_config_logger = require("@intlayer/config/logger");
9
8
  let _intlayer_config_colors = require("@intlayer/config/colors");
10
9
  _intlayer_config_colors = require_runtime.__toESM(_intlayer_config_colors);
10
+ let _intlayer_config_logger = require("@intlayer/config/logger");
11
11
 
12
12
  //#region src/loadDictionaries/loadDictionaries.ts
13
13
  let loadDictionariesStatus = [];
@@ -4,7 +4,7 @@ const require_fetchDistantDictionaries = require('../fetchDistantDictionaries.cj
4
4
  let _intlayer_config_node = require("@intlayer/config/node");
5
5
  let _intlayer_api = require("@intlayer/api");
6
6
  let _intlayer_api_dictionary = require("@intlayer/api/dictionary");
7
- let _intlayer_remote_dictionaries_entry = require("@intlayer/remote-dictionaries-entry");
7
+ let _intlayer_dictionaries_entry_remote = require("@intlayer/dictionaries-entry/remote");
8
8
 
9
9
  //#region src/loadDictionaries/loadRemoteDictionaries.ts
10
10
  const formatDistantDictionaries = (dictionaries) => dictionaries.map((dict) => ({
@@ -14,7 +14,7 @@ const formatDistantDictionaries = (dictionaries) => dictionaries.map((dict) => (
14
14
  }));
15
15
  const loadRemoteDictionaries = async (configuration = (0, _intlayer_config_node.getConfiguration)(), onStatusUpdate, options) => {
16
16
  const { editor } = configuration;
17
- const remoteDictionariesRecord = (0, _intlayer_remote_dictionaries_entry.getRemoteDictionaries)(configuration);
17
+ const remoteDictionariesRecord = (0, _intlayer_dictionaries_entry_remote.getRemoteDictionaries)(configuration);
18
18
  if (!Boolean(editor.clientId && editor.clientSecret)) return [];
19
19
  try {
20
20
  options?.onStartRemoteCheck?.();
@@ -1 +1 @@
1
- {"version":3,"file":"loadRemoteDictionaries.cjs","names":["getConfiguration","getRemoteDictionaries","dictionaryEndpoint","createIntlayerCMS","sortAlphabetically","fetchDistantDictionaries"],"sources":["../../../src/loadDictionaries/loadRemoteDictionaries.ts"],"sourcesContent":["import { createIntlayerCMS } from '@intlayer/api';\nimport { dictionaryEndpoint } from '@intlayer/api/dictionary';\n// @ts-ignore @intlayer/backend is not build yet\nimport type { DictionaryAPI } from '@intlayer/backend';\nimport { getConfiguration } from '@intlayer/config/node';\nimport { getRemoteDictionaries } from '@intlayer/remote-dictionaries-entry';\nimport type {\n Dictionary,\n DictionaryId,\n DictionaryKey,\n} from '@intlayer/types/dictionary';\nimport { fetchDistantDictionaries } from '../fetchDistantDictionaries';\nimport { sortAlphabetically } from '../utils/sortAlphabetically';\nimport type { DictionariesStatus } from './loadDictionaries';\n\nexport const formatDistantDictionaries = (\n dictionaries: (DictionaryAPI | Dictionary)[]\n): Dictionary[] =>\n dictionaries.map((dict) => ({\n ...dict,\n localId: `${dict.key}::remote::${dict.id}`,\n location: 'remote' as const,\n }));\n\nexport const loadRemoteDictionaries = async (\n configuration = getConfiguration(),\n onStatusUpdate?: (status: DictionariesStatus[]) => void,\n options?: {\n onStartRemoteCheck?: () => void;\n onStopRemoteCheck?: () => void;\n onError?: (error: Error) => void;\n }\n): Promise<Dictionary[]> => {\n const { editor } = configuration;\n const remoteDictionariesRecord = getRemoteDictionaries(configuration);\n\n const hasRemoteDictionaries = Boolean(editor.clientId && editor.clientSecret);\n\n if (!hasRemoteDictionaries) return [];\n\n try {\n options?.onStartRemoteCheck?.();\n\n const dictionary = dictionaryEndpoint(createIntlayerCMS(configuration));\n\n // Get the list of dictionary keys\n const getDictionariesKeysResult =\n await dictionary.getDictionariesUpdateTimestamp();\n\n const distantDictionaryUpdateTimeStamp: Record<\n DictionaryId,\n { key: DictionaryKey; updatedAt: number }\n > | null = getDictionariesKeysResult.data;\n\n if (!distantDictionaryUpdateTimeStamp) {\n throw new Error('No distant dictionaries found');\n }\n\n const dictionariesIdToFetch = Object.entries(\n distantDictionaryUpdateTimeStamp\n ).filter(([dictionaryId, data]) => {\n // If remote doesn't provide updatedAt, fetch to be safe\n if (!data.updatedAt) return true;\n\n // If no local cache exists, fetch\n const local: Dictionary | undefined = remoteDictionariesRecord[\n data.key\n ]?.find((dictionary) => dictionary.id === dictionaryId);\n if (!local) return true;\n\n const localUpdatedAtRaw = (local as any)?.updatedAt as\n | number\n | string\n | undefined;\n\n const localUpdatedAt =\n typeof localUpdatedAtRaw === 'number'\n ? localUpdatedAtRaw\n : localUpdatedAtRaw\n ? new Date(localUpdatedAtRaw).getTime()\n : undefined;\n\n // If local timestamp missing or older than remote, fetch\n if (typeof localUpdatedAt !== 'number') return true;\n\n return data.updatedAt > localUpdatedAt;\n });\n\n const flatRemoteDictionariesRecord: DictionaryAPI[] = Object.values(\n remoteDictionariesRecord\n ).flat();\n\n const cachedDictionaries: Dictionary[] =\n flatRemoteDictionariesRecord.filter((dictionary) => {\n const remoteUpdatedAt =\n distantDictionaryUpdateTimeStamp[dictionary.id!].updatedAt;\n\n const localUpdatedAtRaw = dictionary.updatedAt;\n\n const localUpdatedAt =\n typeof localUpdatedAtRaw === 'number'\n ? localUpdatedAtRaw\n : localUpdatedAtRaw\n ? new Date(localUpdatedAtRaw).getTime()\n : undefined;\n\n // Consider as cached/imported when local exists and is up-to-date or newer\n return (\n typeof localUpdatedAt === 'number' &&\n typeof remoteUpdatedAt === 'number' &&\n localUpdatedAt >= remoteUpdatedAt\n );\n });\n\n // Report cached as already imported\n if (cachedDictionaries.length > 0) {\n onStatusUpdate?.(\n cachedDictionaries.map((dictionary) => ({\n dictionaryKey: dictionary.key,\n type: 'remote',\n status: 'imported',\n }))\n );\n }\n\n // Several qualified dictionaries can share a key, so keys are deduplicated:\n // one request per key already returns all of its siblings.\n const orderedDistantDictionaryKeys = [\n ...new Set(dictionariesIdToFetch.map(([, data]) => data.key)),\n ].sort(sortAlphabetically);\n\n // Report pending for keys to be fetched so totals are visible immediately\n if (orderedDistantDictionaryKeys.length > 0) {\n onStatusUpdate?.(\n orderedDistantDictionaryKeys.map((key) => ({\n dictionaryKey: key,\n type: 'remote',\n status: 'pending',\n }))\n );\n }\n\n const distantDictionariesData = await fetchDistantDictionaries(\n {\n dictionaryKeys: orderedDistantDictionaryKeys,\n },\n onStatusUpdate\n );\n\n const distantDictionaries: Dictionary[] = formatDistantDictionaries(\n distantDictionariesData\n );\n\n // Fetching by key also returns the up-to-date siblings of a stale\n // dictionary, so drop the cached copies the remote just sent back.\n const fetchedDictionaryIds = new Set(\n distantDictionaries.map((dictionary) => dictionary.id)\n );\n\n const notRefetchedCachedDictionaries = cachedDictionaries.filter(\n (dictionary) => !fetchedDictionaryIds.has(dictionary.id)\n );\n\n return [...notRefetchedCachedDictionaries, ...distantDictionaries];\n } catch (error) {\n options?.onError?.(error as Error);\n return [];\n } finally {\n options?.onStopRemoteCheck?.();\n }\n};\n"],"mappings":";;;;;;;;;AAeA,MAAa,6BACX,iBAEA,aAAa,KAAK,UAAU;CAC1B,GAAG;CACH,SAAS,GAAG,KAAK,IAAI,YAAY,KAAK;CACtC,UAAU;AACZ,EAAE;AAEJ,MAAa,yBAAyB,OACpC,oBAAg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B,CACnC,GAAG,IAAI,IAAI,sBAAsB,KAAK,GAAG,UAAU,KAAK,GAAG,CAAC,CAC9D,CAAC,CAAC,KAAKC,mDAAkB;EAGzB,IAAI,6BAA6B,SAAS,GACxC,iBACE,6BAA6B,KAAK,SAAS;GACzC,eAAe;GACf,MAAM;GACN,QAAQ;EACV,EAAE,CACJ;EAGF,MAAM,0BAA0B,MAAMC,0DACpC,EACE,gBAAgB,6BAClB,GACA,cACF;EAEA,MAAM,sBAAoC,0BACxC,uBACF;EAIA,MAAM,uBAAuB,IAAI,IAC/B,oBAAoB,KAAK,eAAe,WAAW,EAAE,CACvD;EAMA,OAAO,CAAC,GAJ+B,mBAAmB,QACvD,eAAe,CAAC,qBAAqB,IAAI,WAAW,EAAE,CAGjB,GAAG,GAAG,mBAAmB;CACnE,SAAS,OAAO;EACd,SAAS,UAAU,KAAc;EACjC,OAAO,CAAC;CACV,UAAU;EACR,SAAS,oBAAoB;CAC/B;AACF"}
1
+ {"version":3,"file":"loadRemoteDictionaries.cjs","names":["getConfiguration","getRemoteDictionaries","dictionaryEndpoint","createIntlayerCMS","sortAlphabetically","fetchDistantDictionaries"],"sources":["../../../src/loadDictionaries/loadRemoteDictionaries.ts"],"sourcesContent":["import { createIntlayerCMS } from '@intlayer/api';\nimport { dictionaryEndpoint } from '@intlayer/api/dictionary';\n// @ts-ignore @intlayer/backend is not build yet\nimport type { DictionaryAPI } from '@intlayer/backend';\nimport { getConfiguration } from '@intlayer/config/node';\nimport { getRemoteDictionaries } from '@intlayer/dictionaries-entry/remote';\nimport type {\n Dictionary,\n DictionaryId,\n DictionaryKey,\n} from '@intlayer/types/dictionary';\nimport { fetchDistantDictionaries } from '../fetchDistantDictionaries';\nimport { sortAlphabetically } from '../utils/sortAlphabetically';\nimport type { DictionariesStatus } from './loadDictionaries';\n\nexport const formatDistantDictionaries = (\n dictionaries: (DictionaryAPI | Dictionary)[]\n): Dictionary[] =>\n dictionaries.map((dict) => ({\n ...dict,\n localId: `${dict.key}::remote::${dict.id}`,\n location: 'remote' as const,\n }));\n\nexport const loadRemoteDictionaries = async (\n configuration = getConfiguration(),\n onStatusUpdate?: (status: DictionariesStatus[]) => void,\n options?: {\n onStartRemoteCheck?: () => void;\n onStopRemoteCheck?: () => void;\n onError?: (error: Error) => void;\n }\n): Promise<Dictionary[]> => {\n const { editor } = configuration;\n const remoteDictionariesRecord = getRemoteDictionaries(configuration);\n\n const hasRemoteDictionaries = Boolean(editor.clientId && editor.clientSecret);\n\n if (!hasRemoteDictionaries) return [];\n\n try {\n options?.onStartRemoteCheck?.();\n\n const dictionary = dictionaryEndpoint(createIntlayerCMS(configuration));\n\n // Get the list of dictionary keys\n const getDictionariesKeysResult =\n await dictionary.getDictionariesUpdateTimestamp();\n\n const distantDictionaryUpdateTimeStamp: Record<\n DictionaryId,\n { key: DictionaryKey; updatedAt: number }\n > | null = getDictionariesKeysResult.data;\n\n if (!distantDictionaryUpdateTimeStamp) {\n throw new Error('No distant dictionaries found');\n }\n\n const dictionariesIdToFetch = Object.entries(\n distantDictionaryUpdateTimeStamp\n ).filter(([dictionaryId, data]) => {\n // If remote doesn't provide updatedAt, fetch to be safe\n if (!data.updatedAt) return true;\n\n // If no local cache exists, fetch\n const local: Dictionary | undefined = remoteDictionariesRecord[\n data.key\n ]?.find((dictionary) => dictionary.id === dictionaryId);\n if (!local) return true;\n\n const localUpdatedAtRaw = (local as any)?.updatedAt as\n | number\n | string\n | undefined;\n\n const localUpdatedAt =\n typeof localUpdatedAtRaw === 'number'\n ? localUpdatedAtRaw\n : localUpdatedAtRaw\n ? new Date(localUpdatedAtRaw).getTime()\n : undefined;\n\n // If local timestamp missing or older than remote, fetch\n if (typeof localUpdatedAt !== 'number') return true;\n\n return data.updatedAt > localUpdatedAt;\n });\n\n const flatRemoteDictionariesRecord: DictionaryAPI[] = Object.values(\n remoteDictionariesRecord\n ).flat();\n\n const cachedDictionaries: Dictionary[] =\n flatRemoteDictionariesRecord.filter((dictionary) => {\n const remoteUpdatedAt =\n distantDictionaryUpdateTimeStamp[dictionary.id!].updatedAt;\n\n const localUpdatedAtRaw = dictionary.updatedAt;\n\n const localUpdatedAt =\n typeof localUpdatedAtRaw === 'number'\n ? localUpdatedAtRaw\n : localUpdatedAtRaw\n ? new Date(localUpdatedAtRaw).getTime()\n : undefined;\n\n // Consider as cached/imported when local exists and is up-to-date or newer\n return (\n typeof localUpdatedAt === 'number' &&\n typeof remoteUpdatedAt === 'number' &&\n localUpdatedAt >= remoteUpdatedAt\n );\n });\n\n // Report cached as already imported\n if (cachedDictionaries.length > 0) {\n onStatusUpdate?.(\n cachedDictionaries.map((dictionary) => ({\n dictionaryKey: dictionary.key,\n type: 'remote',\n status: 'imported',\n }))\n );\n }\n\n // Several qualified dictionaries can share a key, so keys are deduplicated:\n // one request per key already returns all of its siblings.\n const orderedDistantDictionaryKeys = [\n ...new Set(dictionariesIdToFetch.map(([, data]) => data.key)),\n ].sort(sortAlphabetically);\n\n // Report pending for keys to be fetched so totals are visible immediately\n if (orderedDistantDictionaryKeys.length > 0) {\n onStatusUpdate?.(\n orderedDistantDictionaryKeys.map((key) => ({\n dictionaryKey: key,\n type: 'remote',\n status: 'pending',\n }))\n );\n }\n\n const distantDictionariesData = await fetchDistantDictionaries(\n {\n dictionaryKeys: orderedDistantDictionaryKeys,\n },\n onStatusUpdate\n );\n\n const distantDictionaries: Dictionary[] = formatDistantDictionaries(\n distantDictionariesData\n );\n\n // Fetching by key also returns the up-to-date siblings of a stale\n // dictionary, so drop the cached copies the remote just sent back.\n const fetchedDictionaryIds = new Set(\n distantDictionaries.map((dictionary) => dictionary.id)\n );\n\n const notRefetchedCachedDictionaries = cachedDictionaries.filter(\n (dictionary) => !fetchedDictionaryIds.has(dictionary.id)\n );\n\n return [...notRefetchedCachedDictionaries, ...distantDictionaries];\n } catch (error) {\n options?.onError?.(error as Error);\n return [];\n } finally {\n options?.onStopRemoteCheck?.();\n }\n};\n"],"mappings":";;;;;;;;;AAeA,MAAa,6BACX,i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,IAAI,mBAAmB,SAAS,GAC9B,iBACE,mBAAmB,KAAK,gBAAgB;GACtC,eAAe,WAAW;GAC1B,MAAM;GACN,QAAQ;EACV,EAAE,CACJ;EAKF,MAAM,+BAA+B,CACnC,GAAG,IAAI,IAAI,sBAAsB,KAAK,GAAG,UAAU,KAAK,GAAG,CAAC,CAC9D,CAAC,CAAC,KAAKC,mDAAkB;EAGzB,IAAI,6BAA6B,SAAS,GACxC,iBACE,6BAA6B,KAAK,SAAS;GACzC,eAAe;GACf,MAAM;GACN,QAAQ;EACV,EAAE,CACJ;EAGF,MAAM,0BAA0B,MAAMC,0DACpC,EACE,gBAAgB,6BAClB,GACA,cACF;EAEA,MAAM,sBAAoC,0BACxC,uBACF;EAIA,MAAM,uBAAuB,IAAI,IAC/B,oBAAoB,KAAK,eAAe,WAAW,EAAE,CACvD;EAMA,OAAO,CAAC,GAJ+B,mBAAmB,QACvD,eAAe,CAAC,qBAAqB,IAAI,WAAW,EAAE,CAGjB,GAAG,GAAG,mBAAmB;CACnE,SAAS,OAAO;EACd,SAAS,UAAU,KAAc;EACjC,OAAO,CAAC;CACV,UAAU;EACR,SAAS,oBAAoB;CAC/B;AACF"}
@@ -1,9 +1,9 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
2
  const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
3
- let _intlayer_config_logger = require("@intlayer/config/logger");
4
- let _intlayer_config_utils = require("@intlayer/config/utils");
5
3
  let _intlayer_config_colors = require("@intlayer/config/colors");
6
4
  _intlayer_config_colors = require_runtime.__toESM(_intlayer_config_colors);
5
+ let _intlayer_config_logger = require("@intlayer/config/logger");
6
+ let _intlayer_config_utils = require("@intlayer/config/utils");
7
7
  let _intlayer_config_built = require("@intlayer/config/built");
8
8
 
9
9
  //#region src/loadDictionaries/log.ts
@@ -3,10 +3,10 @@ const require_runtime = require('./_virtual/_rolldown/runtime.cjs');
3
3
  const require_utils_formatter = require('./utils/formatter.cjs');
4
4
  const require_utils_runOnce = require('./utils/runOnce.cjs');
5
5
  let node_path = require("node:path");
6
- let _intlayer_config_logger = require("@intlayer/config/logger");
7
- let _intlayer_config_node = require("@intlayer/config/node");
8
6
  let _intlayer_config_colors = require("@intlayer/config/colors");
9
7
  _intlayer_config_colors = require_runtime.__toESM(_intlayer_config_colors);
8
+ let _intlayer_config_logger = require("@intlayer/config/logger");
9
+ let _intlayer_config_node = require("@intlayer/config/node");
10
10
  let _intlayer_config_env = require("@intlayer/config/env");
11
11
 
12
12
  //#region src/logConfigDetails.ts
@@ -24,7 +24,7 @@ const logConfigDetails = (options) => {
24
24
  } else appLogger(`Multiple configuration files found, using ${require_utils_formatter.formatPath(relativeOutputPath)}.`, { isVerbose: true });
25
25
  }
26
26
  if (customConfiguration) {
27
- const validation = _intlayer_config_node.intlayerConfigSchema.safeParse(customConfiguration);
27
+ const validation = _intlayer_config_node.intlayerConfigSchema.safeParse(customConfiguration, _intlayer_config_node.intlayerConfigSchemaParseContext);
28
28
  if (!validation.success) {
29
29
  const errorMessages = validation.error.issues.map((error) => {
30
30
  return `${(0, _intlayer_config_logger.colorizePath)(` - ${error.path.join(".")}:`)} ${(0, _intlayer_config_logger.colorize)(error.message, _intlayer_config_colors.GREY_DARK)}`;
@@ -1 +1 @@
1
- {"version":3,"file":"logConfigDetails.cjs","names":["getConfigurationAndFilePath","getAppLogger","join","relative","getEnvFilePath","formatPath","intlayerConfigSchema","colorizePath","colorize","ANSIColors","x"],"sources":["../../src/logConfigDetails.ts"],"sourcesContent":["import { join, relative } from 'node:path';\nimport * as ANSIColors from '@intlayer/config/colors';\nimport { getEnvFilePath } from '@intlayer/config/env';\nimport {\n colorize,\n colorizePath,\n getAppLogger,\n x,\n} from '@intlayer/config/logger';\nimport {\n type GetConfigurationOptions,\n getConfigurationAndFilePath,\n intlayerConfigSchema,\n} from '@intlayer/config/node';\nimport { formatPath, runOnce } from './utils';\n\nexport const logConfigDetails = (options?: GetConfigurationOptions) => {\n const {\n configuration,\n customConfiguration,\n numCustomConfiguration,\n configurationFilePath,\n } = getConfigurationAndFilePath(options);\n const appLogger = getAppLogger(configuration);\n\n runOnce(\n join(\n configuration.system.baseDir,\n '.intlayer',\n 'cache',\n 'intlayer-config-locaded.lock'\n ),\n () => {\n if (numCustomConfiguration === 0) {\n appLogger(\n 'Configuration file not found, using default configuration.',\n {\n isVerbose: true,\n }\n );\n } else {\n const baseDir = configuration.system.baseDir;\n const relativeOutputPath = relative(baseDir, configurationFilePath!);\n\n if (numCustomConfiguration === 1) {\n const dotEnvFilePath = getEnvFilePath(options?.env, options?.envFile);\n\n appLogger(\n `Configuration loaded ${formatPath(relativeOutputPath)}${dotEnvFilePath ? ` - Env: ${formatPath(dotEnvFilePath)}` : ''}`,\n {\n isVerbose: true,\n }\n );\n } else {\n appLogger(\n `Multiple configuration files found, using ${formatPath(relativeOutputPath)}.`,\n {\n isVerbose: true,\n }\n );\n }\n }\n\n if (customConfiguration) {\n const validation = intlayerConfigSchema.safeParse(customConfiguration);\n\n if (!validation.success) {\n const errorMessages = validation.error.issues\n .map((error) => {\n const path = colorizePath(` - ${error.path.join('.')}:`);\n const message = colorize(error.message, ANSIColors.GREY_DARK);\n return `${path} ${message}`;\n })\n .join('\\n');\n const errorMessage = `${x} Invalid configuration:\\n${errorMessages}`;\n\n appLogger(errorMessage);\n }\n\n if (customConfiguration.build?.importMode) {\n appLogger(\n `${colorize('build.importMode', ANSIColors.BLUE)} is deprecated, use ${colorize('dictionary.importMode', ANSIColors.BLUE)} instead`\n );\n }\n if (customConfiguration.compiler?.transformPattern) {\n appLogger(\n `${colorize('compiler.transformPattern', ANSIColors.BLUE)} is deprecated, use ${colorize('build.traversePattern', ANSIColors.BLUE)} instead`\n );\n }\n if (customConfiguration.compiler?.excludePattern) {\n appLogger(\n `${colorize('compiler.excludePattern', ANSIColors.BLUE)} is deprecated, use ${colorize('build.traversePattern', ANSIColors.BLUE)} instead`\n );\n }\n }\n },\n {\n cacheTimeoutMs: 1000 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AAW,IAAI,EAAE,SACrI;GAEF,IAAI,oBAAoB,UAAU,gBAChC,UACE,OAAGD,kCAAS,2BAA2BC,wBAAW,IAAI,EAAE,0BAAsBD,kCAAS,yBAAyBC,wBAAW,IAAI,EAAE,SACnI;EAEJ;CACF,GACA,EACE,gBAAgB,IAClB,CACF;AACF"}
1
+ {"version":3,"file":"logConfigDetails.cjs","names":["getConfigurationAndFilePath","getAppLogger","join","relative","getEnvFilePath","formatPath","intlayerConfigSchema","intlayerConfigSchemaParseContext","colorizePath","colorize","ANSIColors","x"],"sources":["../../src/logConfigDetails.ts"],"sourcesContent":["import { join, relative } from 'node:path';\nimport * as ANSIColors from '@intlayer/config/colors';\nimport { getEnvFilePath } from '@intlayer/config/env';\nimport {\n colorize,\n colorizePath,\n getAppLogger,\n x,\n} from '@intlayer/config/logger';\nimport {\n type GetConfigurationOptions,\n getConfigurationAndFilePath,\n intlayerConfigSchema,\n intlayerConfigSchemaParseContext,\n} from '@intlayer/config/node';\nimport { formatPath, runOnce } from './utils';\n\nexport const logConfigDetails = (options?: GetConfigurationOptions) => {\n const {\n configuration,\n customConfiguration,\n numCustomConfiguration,\n configurationFilePath,\n } = getConfigurationAndFilePath(options);\n const appLogger = getAppLogger(configuration);\n\n runOnce(\n join(\n configuration.system.baseDir,\n '.intlayer',\n 'cache',\n 'intlayer-config-locaded.lock'\n ),\n () => {\n if (numCustomConfiguration === 0) {\n appLogger(\n 'Configuration file not found, using default configuration.',\n {\n isVerbose: true,\n }\n );\n } else {\n const baseDir = configuration.system.baseDir;\n const relativeOutputPath = relative(baseDir, configurationFilePath!);\n\n if (numCustomConfiguration === 1) {\n const dotEnvFilePath = getEnvFilePath(options?.env, options?.envFile);\n\n appLogger(\n `Configuration loaded ${formatPath(relativeOutputPath)}${dotEnvFilePath ? ` - Env: ${formatPath(dotEnvFilePath)}` : ''}`,\n {\n isVerbose: true,\n }\n );\n } else {\n appLogger(\n `Multiple configuration files found, using ${formatPath(relativeOutputPath)}.`,\n {\n isVerbose: true,\n }\n );\n }\n }\n\n if (customConfiguration) {\n const validation = intlayerConfigSchema.safeParse(\n customConfiguration,\n intlayerConfigSchemaParseContext\n );\n\n if (!validation.success) {\n const errorMessages = validation.error.issues\n .map((error) => {\n const path = colorizePath(` - ${error.path.join('.')}:`);\n const message = colorize(error.message, ANSIColors.GREY_DARK);\n return `${path} ${message}`;\n })\n .join('\\n');\n const errorMessage = `${x} Invalid configuration:\\n${errorMessages}`;\n\n appLogger(errorMessage);\n }\n\n if (customConfiguration.build?.importMode) {\n appLogger(\n `${colorize('build.importMode', ANSIColors.BLUE)} is deprecated, use ${colorize('dictionary.importMode', ANSIColors.BLUE)} instead`\n );\n }\n if (customConfiguration.compiler?.transformPattern) {\n appLogger(\n `${colorize('compiler.transformPattern', ANSIColors.BLUE)} is deprecated, use ${colorize('build.traversePattern', ANSIColors.BLUE)} instead`\n );\n }\n if (customConfiguration.compiler?.excludePattern) {\n appLogger(\n `${colorize('compiler.excludePattern', ANSIColors.BLUE)} is deprecated, use ${colorize('build.traversePattern', ANSIColors.BLUE)} instead`\n );\n }\n }\n },\n {\n cacheTimeoutMs: 1000 * 60, // 1 minute\n }\n );\n};\n"],"mappings":";;;;;;;;;;;;AAiBA,MAAa,oBAAoB,YAAsC;CACrE,MAAM,EACJ,eACA,qBACA,wBACA,8BACEA,mDAA4B,OAAO;CACvC,MAAM,gBAAYC,sCAAa,aAAa;CAE5C,kCACEC,gBACE,cAAc,OAAO,SACrB,aACA,SACA,8BACF,SACM;EACJ,IAAI,2BAA2B,GAC7B,UACE,8DACA,EACE,WAAW,KACb,CACF;OACK;GACL,MAAM,UAAU,cAAc,OAAO;GACrC,MAAM,yBAAqBC,oBAAS,SAAS,qBAAsB;GAEnE,IAAI,2BAA2B,GAAG;IAChC,MAAM,qBAAiBC,qCAAe,SAAS,KAAK,SAAS,OAAO;IAEpE,UACE,wBAAwBC,mCAAW,kBAAkB,IAAI,iBAAiB,WAAWA,mCAAW,cAAc,MAAM,MACpH,EACE,WAAW,KACb,CACF;GACF,OACE,UACE,6CAA6CA,mCAAW,kBAAkB,EAAE,IAC5E,EACE,WAAW,KACb,CACF;EAEJ;EAEA,IAAI,qBAAqB;GACvB,MAAM,aAAaC,2CAAqB,UACtC,qBACAC,sDACF;GAEA,IAAI,CAAC,WAAW,SAAS;IACvB,MAAM,gBAAgB,WAAW,MAAM,OACpC,KAAK,UAAU;KAGd,OAAO,OAFMC,sCAAa,MAAM,MAAM,KAAK,KAAK,GAAG,EAAE,EAExC,EAAE,OADCC,kCAAS,MAAM,SAASC,wBAAW,SAC3B;IAC1B,CAAC,CAAC,CACD,KAAK,IAAI;IACZ,MAAM,eAAe,GAAGC,0BAAE,2BAA2B;IAErD,UAAU,YAAY;GACxB;GAEA,IAAI,oBAAoB,OAAO,YAC7B,UACE,OAAGF,kCAAS,oBAAoBC,wBAAW,IAAI,EAAE,0BAAsBD,kCAAS,yBAAyBC,wBAAW,IAAI,EAAE,SAC5H;GAEF,IAAI,oBAAoB,UAAU,kBAChC,UACE,OAAGD,kCAAS,6BAA6BC,wBAAW,IAAI,EAAE,0BAAsBD,kCAAS,yBAAyBC,wBAAW,IAAI,EAAE,SACrI;GAEF,IAAI,oBAAoB,UAAU,gBAChC,UACE,OAAGD,kCAAS,2BAA2BC,wBAAW,IAAI,EAAE,0BAAsBD,kCAAS,yBAAyBC,wBAAW,IAAI,EAAE,SACnI;EAEJ;CACF,GACA,EACE,gBAAgB,IAClB,CACF;AACF"}
@@ -1,7 +1,7 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
2
  const require_runtime = require('./_virtual/_rolldown/runtime.cjs');
3
- const require_createDictionaryEntryPoint_createDictionaryEntryPoint = require('./createDictionaryEntryPoint/createDictionaryEntryPoint.cjs');
4
3
  const require_buildIntlayerDictionary_buildIntlayerDictionary = require('./buildIntlayerDictionary/buildIntlayerDictionary.cjs');
4
+ const require_createDictionaryEntryPoint_createDictionaryEntryPoint = require('./createDictionaryEntryPoint/createDictionaryEntryPoint.cjs');
5
5
  const require_utils_runOnce = require('./utils/runOnce.cjs');
6
6
  const require_createType_createModuleAugmentation = require('./createType/createModuleAugmentation.cjs');
7
7
  const require_createType_createType = require('./createType/createType.cjs');
@@ -12,10 +12,10 @@ const require_cleanOutputDir = require('./cleanOutputDir.cjs');
12
12
  const require_writeConfiguration_index = require('./writeConfiguration/index.cjs');
13
13
  let node_fs_promises = require("node:fs/promises");
14
14
  let node_path = require("node:path");
15
- let _intlayer_config_logger = require("@intlayer/config/logger");
16
- let _intlayer_config_utils = require("@intlayer/config/utils");
17
15
  let _intlayer_config_colors = require("@intlayer/config/colors");
18
16
  _intlayer_config_colors = require_runtime.__toESM(_intlayer_config_colors);
17
+ let _intlayer_config_logger = require("@intlayer/config/logger");
18
+ let _intlayer_config_utils = require("@intlayer/config/utils");
19
19
  let _intlayer_config_package_json = require("@intlayer/config/package.json");
20
20
  _intlayer_config_package_json = require_runtime.__toESM(_intlayer_config_package_json);
21
21
 
@@ -1,6 +1,6 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- const require_scan_calculateScore = require('./calculateScore.cjs');
3
2
  const require_scan_parseHtml = require('./parseHtml.cjs');
3
+ const require_scan_calculateScore = require('./calculateScore.cjs');
4
4
  const require_scan_analyzeBundleContent = require('./analyzeBundleContent.cjs');
5
5
  const require_scan_checks = require('./checks.cjs');
6
6
  const require_scan_scanWebsite = require('./scanWebsite.cjs');
@@ -1,9 +1,9 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- const require_scan_calculateScore = require('./calculateScore.cjs');
3
2
  const require_scan_parseHtml = require('./parseHtml.cjs');
3
+ const require_scan_calculateScore = require('./calculateScore.cjs');
4
4
  const require_scan_checks = require('./checks.cjs');
5
- let _intlayer_config_logger = require("@intlayer/config/logger");
6
5
  let _intlayer_config_colors = require("@intlayer/config/colors");
6
+ let _intlayer_config_logger = require("@intlayer/config/logger");
7
7
 
8
8
  //#region src/scan/scanWebsite.ts
9
9
  const DEFAULT_USER_AGENT = "Mozilla/5.0 (compatible; IntlayerScanBot/1.0; +https://intlayer.org)";
@@ -5,9 +5,9 @@ const require_syncPluginKit_extractKeyAndLocaleFromPath = require('./extractKeyA
5
5
  const require_syncPluginKit_filePathPatternHelpers = require('./filePathPatternHelpers.cjs');
6
6
  let node_fs_promises = require("node:fs/promises");
7
7
  let node_path = require("node:path");
8
+ let _intlayer_config_utils = require("@intlayer/config/utils");
8
9
  let fast_glob = require("fast-glob");
9
10
  fast_glob = require_runtime.__toESM(fast_glob);
10
- let _intlayer_config_utils = require("@intlayer/config/utils");
11
11
 
12
12
  //#region src/syncPluginKit/createFileAdapter.ts
13
13
  /**
@@ -59,13 +59,13 @@ const autoDecorateContent = (content, options = true) => {
59
59
  if (options === false) return content;
60
60
  const { markdown = true, html: htmlOption = true, insertion = true } = typeof options === "object" ? options : {};
61
61
  if (typeof content === "string") {
62
- if (markdown && isMarkdown(content)) return {
62
+ const withInsertion = (node) => insertion && isInsertion(content) ? (0, _intlayer_core_transpiler.insert)(node) : node;
63
+ if (markdown && isMarkdown(content)) return withInsertion({
63
64
  ...(0, _intlayer_core_transpiler.md)(content),
64
65
  metadata: (0, _intlayer_core_markdown.getMarkdownMetadata)(content)
65
- };
66
- if (htmlOption && isHTML(content)) return (0, _intlayer_core_transpiler.html)(content);
67
- if (insertion && isInsertion(content)) return (0, _intlayer_core_transpiler.insert)(content);
68
- return content;
66
+ });
67
+ if (htmlOption && isHTML(content)) return withInsertion((0, _intlayer_core_transpiler.html)(content));
68
+ return withInsertion(content);
69
69
  }
70
70
  if (Array.isArray(content)) return content.map((item) => autoDecorateContent(item, options));
71
71
  if (content && typeof content === "object") {
@@ -1 +1 @@
1
- {"version":3,"file":"autoDecorateContent.cjs","names":["getInsertionValues","NodeTypes","md","getMarkdownMetadata","html","insert"],"sources":["../../../src/utils/autoDecorateContent.ts"],"sourcesContent":["import { getMarkdownMetadata } from '@intlayer/core/markdown';\nimport {\n getInsertionValues,\n html,\n insert,\n md,\n} from '@intlayer/core/transpiler';\nimport * as NodeTypes from '@intlayer/types/nodeType';\n\n/**\n * Check if a string is a markdown string\n */\nconst isMarkdown = (str: string): boolean => {\n // Check for common markdown indicators\n const patterns = [\n /^\\s*---/m, // Front Matter\n /^\\s*#+\\s/m, // Headers: # Title\n /^\\s*[-*+]\\s/m, // Unordered lists: - Item or * Item\n /^\\s*\\d+\\.\\s/m, // Ordered lists: 1. Item\n /^\\s*>\\s/m, // Blockquotes: > Quote\n /\\[.+\\]\\(.+\\)/, // Links: [text](url)\n /!\\[.+\\]\\(.+\\)/, // Images: ![alt](url)\n /`{1,3}.+`{1,3}/, // Code blocks or inline code: `code` or ```code```\n /\\*\\*.+\\*\\*/, // Bold: **text**\n /__.+__/, // Bold: __text__\n /<(https?:\\/\\/[^\\s>]+)>/, // Autolinks: <http://...>\n ];\n\n return patterns.some((pattern) => pattern.test(str));\n};\n\n/**\n * Check if a string is an insertion string\n */\nconst isInsertion = (str: string): boolean =>\n getInsertionValues(str).length > 0;\n\n/**\n * Check if a string is an HTML/JSX string\n * Matches:\n * - <Tag>\n * - </Tag>\n * - <Tag />\n * - <Tag attribute=\"value\">\n * - <Component.SubComponent>\n */\nconst isHTML = (str: string): boolean => {\n // 1. Matches opening or self-closing tags: <Tag ... > or <Tag ... />\n // - Must start with < followed by a letter (to avoid math comparisons like a < b)\n // - Allows alphanumeric, hyphens, and dots (for Namespaced components) in tag name\n // - Allows attributes until the closing >\n const openTagRegex = /<[a-zA-Z][a-zA-Z0-9\\-.]*(\\s+[^>]*)?\\/?>/;\n\n // 2. Matches closing tags: </Tag>\n const closeTagRegex = /<\\/[a-zA-Z][a-zA-Z0-9\\-.]*\\s*>/;\n\n return openTagRegex.test(str) || closeTagRegex.test(str);\n};\n\nconst leafNodeTypes: string[] = [\n NodeTypes.HTML,\n NodeTypes.MARKDOWN,\n NodeTypes.INSERTION,\n NodeTypes.FILE,\n NodeTypes.REACT_NODE,\n NodeTypes.TEXT,\n NodeTypes.NUMBER,\n NodeTypes.BOOLEAN,\n NodeTypes.NULL,\n NodeTypes.UNKNOWN,\n];\n\ntype AutoTransformationOptions = {\n markdown?: boolean;\n html?: boolean;\n insertion?: boolean;\n};\n\n/**\n * Automatically decorate content strings with md() or insert() if they match\n */\nexport const autoDecorateContent = (\n content: any,\n options: boolean | AutoTransformationOptions = true\n): any => {\n if (options === false) {\n return content;\n }\n\n const {\n markdown = true,\n html: htmlOption = true,\n insertion = true,\n } = typeof options === 'object' ? options : {};\n\n if (typeof content === 'string') {\n if (markdown && isMarkdown(content)) {\n const markdownNode = md(content);\n\n return {\n ...markdownNode,\n metadata: getMarkdownMetadata(content),\n };\n }\n\n if (htmlOption && isHTML(content)) {\n return html(content);\n }\n\n if (insertion && isInsertion(content)) {\n return insert(content);\n }\n\n return content;\n }\n\n if (Array.isArray(content)) {\n return content.map((item) => autoDecorateContent(item, options));\n }\n\n if (content && typeof content === 'object') {\n // If it's already a decorated node (has nodeType)\n if ('nodeType' in content) {\n const nodeType = content.nodeType;\n\n // If it's a leaf node type, don't re-decorate its content\n if (leafNodeTypes.includes(nodeType)) {\n return content;\n }\n\n // If it's a container node type (like translation, enumeration, etc.), recurse into its content field\n if (nodeType in content) {\n return {\n ...content,\n [nodeType]: autoDecorateContent(content[nodeType], options),\n };\n }\n\n return content;\n }\n\n // Plain object, recurse into all keys\n const result: Record<string, any> = {};\n for (const key of Object.keys(content)) {\n result[key] = autoDecorateContent(content[key], options);\n }\n return result;\n }\n\n return content;\n};\n"],"mappings":";;;;;;;;;;;AAYA,MAAM,cAAc,QAAyB;CAgB3C,OAAO;EAbL;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CAGY,CAAC,CAAC,MAAM,YAAY,QAAQ,KAAK,GAAG,CAAC;AACrD;;;;AAKA,MAAM,eAAe,YACnBA,8CAAmB,GAAG,CAAC,CAAC,SAAS;;;;;;;;;;AAWnC,MAAM,UAAU,QAAyB;CAUvC,OAAO,0CAAa,KAAK,GAAG,KAAK,iCAAc,KAAK,GAAG;AACzD;AAEA,MAAM,gBAA0B;CAC9BC,yBAAU;CACVA,yBAAU;CACVA,yBAAU;CACVA,yBAAU;CACVA,yBAAU;CACVA,yBAAU;CACVA,yBAAU;CACVA,yBAAU;CACVA,yBAAU;CACVA,yBAAU;AACZ;;;;AAWA,MAAa,uBACX,SACA,UAA+C,SACvC;CACR,IAAI,YAAY,OACd,OAAO;CAGT,MAAM,EACJ,WAAW,MACX,MAAM,aAAa,MACnB,YAAY,SACV,OAAO,YAAY,WAAW,UAAU,CAAC;CAE7C,IAAI,OAAO,YAAY,UAAU;EAC/B,IAAI,YAAY,WAAW,OAAO,GAGhC,OAAO;GACL,OAHmBC,8BAAG,OAGR;GACd,cAAUC,6CAAoB,OAAO;EACvC;EAGF,IAAI,cAAc,OAAO,OAAO,GAC9B,WAAOC,gCAAK,OAAO;EAGrB,IAAI,aAAa,YAAY,OAAO,GAClC,WAAOC,kCAAO,OAAO;EAGvB,OAAO;CACT;CAEA,IAAI,MAAM,QAAQ,OAAO,GACvB,OAAO,QAAQ,KAAK,SAAS,oBAAoB,MAAM,OAAO,CAAC;CAGjE,IAAI,WAAW,OAAO,YAAY,UAAU;EAE1C,IAAI,cAAc,SAAS;GACzB,MAAM,WAAW,QAAQ;GAGzB,IAAI,cAAc,SAAS,QAAQ,GACjC,OAAO;GAIT,IAAI,YAAY,SACd,OAAO;IACL,GAAG;KACF,WAAW,oBAAoB,QAAQ,WAAW,OAAO;GAC5D;GAGF,OAAO;EACT;EAGA,MAAM,SAA8B,CAAC;EACrC,KAAK,MAAM,OAAO,OAAO,KAAK,OAAO,GACnC,OAAO,OAAO,oBAAoB,QAAQ,MAAM,OAAO;EAEzD,OAAO;CACT;CAEA,OAAO;AACT"}
1
+ {"version":3,"file":"autoDecorateContent.cjs","names":["getInsertionValues","NodeTypes","insert","md","getMarkdownMetadata","html"],"sources":["../../../src/utils/autoDecorateContent.ts"],"sourcesContent":["import { getMarkdownMetadata } from '@intlayer/core/markdown';\nimport {\n getInsertionValues,\n html,\n type InsertionContent,\n insert,\n md,\n} from '@intlayer/core/transpiler';\nimport * as NodeTypes from '@intlayer/types/nodeType';\n\n/**\n * Check if a string is a markdown string\n */\nconst isMarkdown = (str: string): boolean => {\n // Check for common markdown indicators\n const patterns = [\n /^\\s*---/m, // Front Matter\n /^\\s*#+\\s/m, // Headers: # Title\n /^\\s*[-*+]\\s/m, // Unordered lists: - Item or * Item\n /^\\s*\\d+\\.\\s/m, // Ordered lists: 1. Item\n /^\\s*>\\s/m, // Blockquotes: > Quote\n /\\[.+\\]\\(.+\\)/, // Links: [text](url)\n /!\\[.+\\]\\(.+\\)/, // Images: ![alt](url)\n /`{1,3}.+`{1,3}/, // Code blocks or inline code: `code` or ```code```\n /\\*\\*.+\\*\\*/, // Bold: **text**\n /__.+__/, // Bold: __text__\n /<(https?:\\/\\/[^\\s>]+)>/, // Autolinks: <http://...>\n ];\n\n return patterns.some((pattern) => pattern.test(str));\n};\n\n/**\n * Check if a string is an insertion string\n */\nconst isInsertion = (str: string): boolean =>\n getInsertionValues(str).length > 0;\n\n/**\n * Check if a string is an HTML/JSX string\n * Matches:\n * - <Tag>\n * - </Tag>\n * - <Tag />\n * - <Tag attribute=\"value\">\n * - <Component.SubComponent>\n */\nconst isHTML = (str: string): boolean => {\n // 1. Matches opening or self-closing tags: <Tag ... > or <Tag ... />\n // - Must start with < followed by a letter (to avoid math comparisons like a < b)\n // - Allows alphanumeric, hyphens, and dots (for Namespaced components) in tag name\n // - Allows attributes until the closing >\n const openTagRegex = /<[a-zA-Z][a-zA-Z0-9\\-.]*(\\s+[^>]*)?\\/?>/;\n\n // 2. Matches closing tags: </Tag>\n const closeTagRegex = /<\\/[a-zA-Z][a-zA-Z0-9\\-.]*\\s*>/;\n\n return openTagRegex.test(str) || closeTagRegex.test(str);\n};\n\nconst leafNodeTypes: string[] = [\n NodeTypes.HTML,\n NodeTypes.MARKDOWN,\n NodeTypes.INSERTION,\n NodeTypes.FILE,\n NodeTypes.REACT_NODE,\n NodeTypes.TEXT,\n NodeTypes.NUMBER,\n NodeTypes.BOOLEAN,\n NodeTypes.NULL,\n NodeTypes.UNKNOWN,\n];\n\ntype AutoTransformationOptions = {\n markdown?: boolean;\n html?: boolean;\n insertion?: boolean;\n};\n\n/**\n * Automatically decorate content strings with md() or insert() if they match\n */\nexport const autoDecorateContent = (\n content: any,\n options: boolean | AutoTransformationOptions = true\n): any => {\n if (options === false) {\n return content;\n }\n\n const {\n markdown = true,\n html: htmlOption = true,\n insertion = true,\n } = typeof options === 'object' ? options : {};\n\n if (typeof content === 'string') {\n // `html()`/`markdown()` content may itself carry `{{ … }}` placeholders.\n // Wrap the node in `insert()` so it stays callable with the values.\n const withInsertion = <Node>(node: Node): Node | InsertionContent<Node> =>\n insertion && isInsertion(content) ? insert(node) : node;\n\n if (markdown && isMarkdown(content)) {\n const markdownNode = md(content);\n\n return withInsertion({\n ...markdownNode,\n metadata: getMarkdownMetadata(content),\n });\n }\n\n if (htmlOption && isHTML(content)) {\n return withInsertion(html(content));\n }\n\n return withInsertion(content);\n }\n\n if (Array.isArray(content)) {\n return content.map((item) => autoDecorateContent(item, options));\n }\n\n if (content && typeof content === 'object') {\n // If it's already a decorated node (has nodeType)\n if ('nodeType' in content) {\n const nodeType = content.nodeType;\n\n // If it's a leaf node type, don't re-decorate its content\n if (leafNodeTypes.includes(nodeType)) {\n return content;\n }\n\n // If it's a container node type (like translation, enumeration, etc.), recurse into its content field\n if (nodeType in content) {\n return {\n ...content,\n [nodeType]: autoDecorateContent(content[nodeType], options),\n };\n }\n\n return content;\n }\n\n // Plain object, recurse into all keys\n const result: Record<string, any> = {};\n for (const key of Object.keys(content)) {\n result[key] = autoDecorateContent(content[key], options);\n }\n return result;\n }\n\n return content;\n};\n"],"mappings":";;;;;;;;;;;AAaA,MAAM,cAAc,QAAyB;CAgB3C,OAAO;EAbL;EACA;EACA;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MAAM,SAA8B,CAAC;EACrC,KAAK,MAAM,OAAO,OAAO,KAAK,OAAO,GACnC,OAAO,OAAO,oBAAoB,QAAQ,MAAM,OAAO;EAEzD,OAAO;CACT;CAEA,OAAO;AACT"}
@@ -1,10 +1,10 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
2
  const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
3
3
  let node_path = require("node:path");
4
- let fast_glob = require("fast-glob");
5
- fast_glob = require_runtime.__toESM(fast_glob);
6
4
  let _intlayer_config_utils = require("@intlayer/config/utils");
7
5
  let _intlayer_config_defaultValues = require("@intlayer/config/defaultValues");
6
+ let fast_glob = require("fast-glob");
7
+ fast_glob = require_runtime.__toESM(fast_glob);
8
8
 
9
9
  //#region src/utils/buildComponentFilesList.ts
10
10
  /**
@@ -1,11 +1,11 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
2
  const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
3
+ let node_fs = require("node:fs");
3
4
  let node_fs_promises = require("node:fs/promises");
4
5
  let node_path = require("node:path");
5
- let _intlayer_config_logger = require("@intlayer/config/logger");
6
- let node_fs = require("node:fs");
7
6
  let _intlayer_config_colors = require("@intlayer/config/colors");
8
7
  _intlayer_config_colors = require_runtime.__toESM(_intlayer_config_colors);
8
+ let _intlayer_config_logger = require("@intlayer/config/logger");
9
9
 
10
10
  //#region src/utils/contentWatcherLock.ts
11
11
  /**
@@ -1,9 +1,9 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
2
  const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
3
3
  let node_path = require("node:path");
4
- let _intlayer_config_logger = require("@intlayer/config/logger");
5
4
  let _intlayer_config_colors = require("@intlayer/config/colors");
6
5
  _intlayer_config_colors = require_runtime.__toESM(_intlayer_config_colors);
6
+ let _intlayer_config_logger = require("@intlayer/config/logger");
7
7
  let _intlayer_config_built = require("@intlayer/config/built");
8
8
  let _intlayer_core_localization = require("@intlayer/core/localization");
9
9
  let _intlayer_types_locales = require("@intlayer/types/locales");
@@ -1,6 +1,6 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- let node_path = require("node:path");
3
2
  let node_fs = require("node:fs");
3
+ let node_path = require("node:path");
4
4
 
5
5
  //#region src/utils/readDictionariesFromDisk.ts
6
6
  /**
@@ -1,8 +1,8 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
2
  const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
3
+ let node_fs = require("node:fs");
3
4
  let node_fs_promises = require("node:fs/promises");
4
5
  let node_path = require("node:path");
5
- let node_fs = require("node:fs");
6
6
  let _intlayer_core_package_json = require("@intlayer/core/package.json");
7
7
  _intlayer_core_package_json = require_runtime.__toESM(_intlayer_core_package_json);
8
8
 
@@ -1,7 +1,7 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
2
  const require_runtime = require('../../_virtual/_rolldown/runtime.cjs');
3
- const require_utils_runParallel_ps = require('./ps.cjs');
4
3
  const require_utils_runParallel_wmic = require('./wmic.cjs');
4
+ const require_utils_runParallel_ps = require('./ps.cjs');
5
5
  let node_os = require("node:os");
6
6
  node_os = require_runtime.__toESM(node_os);
7
7
 
@@ -1,7 +1,7 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
+ let node_fs = require("node:fs");
2
3
  let node_fs_promises = require("node:fs/promises");
3
4
  let node_path = require("node:path");
4
- let node_fs = require("node:fs");
5
5
 
6
6
  //#region src/utils/withFileLock.ts
7
7
  const DEFAULT_OPTIONS = {
@@ -3,21 +3,21 @@ const require_runtime = require('./_virtual/_rolldown/runtime.cjs');
3
3
  const require_utils_formatter = require('./utils/formatter.cjs');
4
4
  const require_utils_getFormatFromExtension = require('./utils/getFormatFromExtension.cjs');
5
5
  const require_utils_parseContentDeclarationFileName = require('./utils/parseContentDeclarationFileName.cjs');
6
+ const require_handleAdditionalContentDeclarationFile = require('./handleAdditionalContentDeclarationFile.cjs');
6
7
  const require_handleContentDeclarationFileChange = require('./handleContentDeclarationFileChange.cjs');
7
8
  const require_handleContentDeclarationFileMoved = require('./handleContentDeclarationFileMoved.cjs');
8
- const require_handleAdditionalContentDeclarationFile = require('./handleAdditionalContentDeclarationFile.cjs');
9
9
  const require_handleUnlinkedContentDeclarationFile = require('./handleUnlinkedContentDeclarationFile.cjs');
10
10
  const require_prepareIntlayer = require('./prepareIntlayer.cjs');
11
11
  const require_writeContentDeclaration_writeContentDeclaration = require('./writeContentDeclaration/writeContentDeclaration.cjs');
12
+ let node_fs = require("node:fs");
12
13
  let node_fs_promises = require("node:fs/promises");
13
14
  let node_path = require("node:path");
14
- let _intlayer_config_logger = require("@intlayer/config/logger");
15
- let _intlayer_config_node = require("@intlayer/config/node");
16
- let node_fs = require("node:fs");
17
- let _intlayer_config_utils = require("@intlayer/config/utils");
18
15
  let _intlayer_config_colors = require("@intlayer/config/colors");
19
16
  _intlayer_config_colors = require_runtime.__toESM(_intlayer_config_colors);
20
17
  let _intlayer_config_file = require("@intlayer/config/file");
18
+ let _intlayer_config_logger = require("@intlayer/config/logger");
19
+ let _intlayer_config_node = require("@intlayer/config/node");
20
+ let _intlayer_config_utils = require("@intlayer/config/utils");
21
21
 
22
22
  //#region src/watcher.ts
23
23
  const pendingUnlinks = /* @__PURE__ */ new Map();
@@ -1,8 +1,8 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
2
  const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
3
+ let node_fs = require("node:fs");
3
4
  let node_path = require("node:path");
4
5
  let _intlayer_config_logger = require("@intlayer/config/logger");
5
- let node_fs = require("node:fs");
6
6
  let _intlayer_core_interpreter = require("@intlayer/core/interpreter");
7
7
  let _intlayer_types_nodeType = require("@intlayer/types/nodeType");
8
8
  _intlayer_types_nodeType = require_runtime.__toESM(_intlayer_types_nodeType);
@@ -7,9 +7,9 @@ const require_writeContentDeclaration_transformJSONFile = require('./transformJS
7
7
  const require_writeContentDeclaration_writeJSFile = require('./writeJSFile.cjs');
8
8
  const require_writeContentDeclaration_writeMarkdownFile = require('./writeMarkdownFile.cjs');
9
9
  const require_writeContentDeclaration_writeYamlFile = require('./writeYamlFile.cjs');
10
+ let node_fs = require("node:fs");
10
11
  let node_fs_promises = require("node:fs/promises");
11
12
  let node_path = require("node:path");
12
- let node_fs = require("node:fs");
13
13
  let _intlayer_config_defaultValues = require("@intlayer/config/defaultValues");
14
14
  let _intlayer_core_plugins = require("@intlayer/core/plugins");
15
15
  let node_child_process = require("node:child_process");
@@ -3,10 +3,10 @@ const require_utils_getFormatFromExtension = require('../utils/getFormatFromExte
3
3
  const require_writeContentDeclaration_transformJSFile = require('./transformJSFile.cjs');
4
4
  const require_detectFormatCommand = require('../detectFormatCommand.cjs');
5
5
  const require_getContentDeclarationFileTemplate_getContentDeclarationFileTemplate = require('../getContentDeclarationFileTemplate/getContentDeclarationFileTemplate.cjs');
6
+ let node_fs = require("node:fs");
6
7
  let node_fs_promises = require("node:fs/promises");
7
8
  let node_path = require("node:path");
8
9
  let _intlayer_config_logger = require("@intlayer/config/logger");
9
- let node_fs = require("node:fs");
10
10
  let node_child_process = require("node:child_process");
11
11
 
12
12
  //#region src/writeContentDeclaration/writeJSFile.ts
@@ -1,8 +1,8 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
+ let node_fs = require("node:fs");
2
3
  let node_fs_promises = require("node:fs/promises");
3
4
  let node_path = require("node:path");
4
5
  let node_crypto = require("node:crypto");
5
- let node_fs = require("node:fs");
6
6
 
7
7
  //#region src/writeFileIfChanged.ts
8
8
  const activeTempFiles = /* @__PURE__ */ new Set();
@@ -1,5 +1,5 @@
1
- import { basename, dirname, join, relative, resolve, sep } from "node:path";
2
1
  import { existsSync, readFileSync } from "node:fs";
2
+ import { basename, dirname, join, relative, resolve, sep } from "node:path";
3
3
  import { fileURLToPath } from "node:url";
4
4
 
5
5
  //#region \0utils:asset
@@ -1,3 +1,5 @@
1
+ import { readDictionariesFromDisk } from "./utils/readDictionariesFromDisk.mjs";
2
+ import { buildDictionary } from "./buildIntlayerDictionary/buildIntlayerDictionary.mjs";
1
3
  import { generateDictionaryListContent } from "./createDictionaryEntryPoint/generateDictionaryListContent.mjs";
2
4
  import { getBuiltDictionariesPath } from "./createDictionaryEntryPoint/getBuiltDictionariesPath.mjs";
3
5
  import { getBuiltDynamicDictionariesPath } from "./createDictionaryEntryPoint/getBuiltDynamicDictionariesPath.mjs";
@@ -5,8 +7,6 @@ import { getBuiltFetchDictionariesPath } from "./createDictionaryEntryPoint/getB
5
7
  import { getBuiltRemoteDictionariesPath } from "./createDictionaryEntryPoint/getBuiltRemoteDictionariesPath.mjs";
6
8
  import { getBuiltUnmergedDictionariesPath } from "./createDictionaryEntryPoint/getBuiltUnmergedDictionariesPath.mjs";
7
9
  import { createDictionaryEntryPoint } from "./createDictionaryEntryPoint/createDictionaryEntryPoint.mjs";
8
- import { readDictionariesFromDisk } from "./utils/readDictionariesFromDisk.mjs";
9
- import { buildDictionary } from "./buildIntlayerDictionary/buildIntlayerDictionary.mjs";
10
10
  import { createModuleAugmentation, formatDomains, formatRewriteRules, getTypeName } from "./createType/createModuleAugmentation.mjs";
11
11
  import { createTypes, generateTypeScriptType } from "./createType/createType.mjs";
12
12
  import { processContentDeclaration } from "./buildIntlayerDictionary/processContentDeclaration.mjs";
@@ -1,6 +1,6 @@
1
+ import { existsSync } from "node:fs";
1
2
  import { rm } from "node:fs/promises";
2
3
  import { getAppLogger } from "@intlayer/config/logger";
3
- import { existsSync } from "node:fs";
4
4
 
5
5
  //#region src/cleanOutputDir.ts
6
6
  const cleanOutputDir = async (configuration) => {