@intlayer/engine 9.7.1 → 9.7.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/_virtual/_utils_asset.cjs +1 -1
- package/dist/cjs/build.cjs +8 -8
- package/dist/cjs/buildIntlayerDictionary/writeDynamicDictionary.cjs +3 -3
- package/dist/cjs/buildIntlayerDictionary/writeFetchDictionary.cjs +2 -2
- package/dist/cjs/buildIntlayerDictionary/writeMergedDictionary.cjs +2 -2
- package/dist/cjs/buildIntlayerDictionary/writeNestedDictionary.cjs +2 -2
- package/dist/cjs/buildIntlayerDictionary/writeRemoteDictionary.cjs +2 -2
- package/dist/cjs/buildIntlayerDictionary/writeUnmergedDictionary.cjs +2 -2
- package/dist/cjs/cleanOutputDir.cjs +1 -1
- package/dist/cjs/cleanRemovedContentDeclaration.cjs +1 -1
- package/dist/cjs/cli.cjs +5 -2
- package/dist/cjs/createDictionaryEntryPoint/createDictionaryEntryPoint.cjs +1 -1
- package/dist/cjs/createDictionaryEntryPoint/getBuiltDictionariesPath.cjs +2 -2
- package/dist/cjs/createDictionaryEntryPoint/getBuiltDynamicDictionariesPath.cjs +2 -2
- package/dist/cjs/createDictionaryEntryPoint/getBuiltFetchDictionariesPath.cjs +2 -2
- package/dist/cjs/createDictionaryEntryPoint/getBuiltRemoteDictionariesPath.cjs +2 -2
- package/dist/cjs/createDictionaryEntryPoint/getBuiltUnmergedDictionariesPath.cjs +2 -2
- package/dist/cjs/createType/createModuleAugmentation.cjs +1 -1
- package/dist/cjs/createType/createType.cjs +1 -1
- package/dist/cjs/docReview/pipeline.cjs.map +1 -1
- package/dist/cjs/fetchDistantDictionaries.cjs.map +1 -1
- package/dist/cjs/handleContentDeclarationFileChange.cjs +2 -2
- package/dist/cjs/init/documentationRouter.cjs +1 -0
- package/dist/cjs/init/documentationRouter.cjs.map +1 -1
- package/dist/cjs/init/frameworkSetup/nextAppRouter/index.cjs +1 -1
- package/dist/cjs/init/frameworkSetup/nextAppRouter/restructure.cjs +1 -1
- package/dist/cjs/init/frameworkSetup/tanstackStart/index.cjs +1 -1
- package/dist/cjs/init/frameworkSetup/tanstackStart/restructure.cjs +1 -1
- package/dist/cjs/init/index.cjs +47 -3
- package/dist/cjs/init/index.cjs.map +1 -1
- package/dist/cjs/init/utils/fileSystem.cjs +2 -2
- package/dist/cjs/init/utils/githubActions.cjs +1 -1
- package/dist/cjs/init/utils/index.cjs +6 -0
- package/dist/cjs/init/utils/intlayerDependencies.cjs +2 -2
- package/dist/cjs/init/utils/packageManager.cjs +3 -1
- package/dist/cjs/init/utils/packageManager.cjs.map +1 -1
- package/dist/cjs/init/utils/prettierConfig.cjs +54 -0
- package/dist/cjs/init/utils/prettierConfig.cjs.map +1 -0
- package/dist/cjs/initConfig/index.cjs +1 -1
- package/dist/cjs/initConfig/index.cjs.map +1 -1
- package/dist/cjs/installLSP.cjs +1 -1
- package/dist/cjs/installMCP/installMCP.cjs +1 -1
- package/dist/cjs/installSkills/index.cjs +1 -1
- package/dist/cjs/installSkills/index.cjs.map +1 -1
- package/dist/cjs/listGitFiles.cjs +1 -1
- package/dist/cjs/listGitFiles.cjs.map +1 -1
- package/dist/cjs/loadDictionaries/getIntlayerBundle.cjs +1 -1
- package/dist/cjs/loadDictionaries/loadContentDeclaration.cjs +1 -1
- package/dist/cjs/loadDictionaries/loadLocalDictionaries.cjs +1 -1
- package/dist/cjs/loadDictionaries/log.cjs +1 -1
- package/dist/cjs/loadDictionaries/logTypeScriptErrors.cjs.map +1 -1
- package/dist/cjs/prepareIntlayer.cjs +2 -2
- package/dist/cjs/prepareIntlayer.cjs.map +1 -1
- package/dist/cjs/scan/index.cjs +1 -1
- package/dist/cjs/syncPluginKit/createFileAdapter.cjs +1 -1
- package/dist/cjs/utils/buildComponentFilesList.cjs +1 -1
- package/dist/cjs/utils/contentWatcherLock.cjs +2 -2
- package/dist/cjs/utils/readDictionariesFromDisk.cjs +1 -1
- package/dist/cjs/utils/runOnce.cjs +2 -2
- package/dist/cjs/utils/withFileLock.cjs +2 -2
- package/dist/cjs/watcher.cjs +4 -4
- package/dist/cjs/watcher.cjs.map +1 -1
- package/dist/cjs/writeConfiguration/index.cjs +2 -2
- package/dist/cjs/writeContentDeclaration/processContentDeclarationContent.cjs +1 -1
- package/dist/cjs/writeContentDeclaration/writeContentDeclaration.cjs +2 -2
- package/dist/cjs/writeContentDeclaration/writeJSFile.cjs +2 -2
- package/dist/cjs/writeContentDeclaration/writeMarkdownFile.cjs +1 -1
- package/dist/cjs/writeContentDeclaration/writeYamlFile.cjs +1 -1
- package/dist/cjs/writeFileIfChanged.cjs +2 -2
- package/dist/esm/_virtual/_utils_asset.mjs +1 -1
- package/dist/esm/build.mjs +8 -8
- package/dist/esm/buildIntlayerDictionary/writeDynamicDictionary.mjs +3 -3
- package/dist/esm/buildIntlayerDictionary/writeFetchDictionary.mjs +2 -2
- package/dist/esm/buildIntlayerDictionary/writeMergedDictionary.mjs +2 -2
- package/dist/esm/buildIntlayerDictionary/writeNestedDictionary.mjs +2 -2
- package/dist/esm/buildIntlayerDictionary/writeRemoteDictionary.mjs +2 -2
- package/dist/esm/buildIntlayerDictionary/writeUnmergedDictionary.mjs +2 -2
- package/dist/esm/cleanOutputDir.mjs +1 -1
- package/dist/esm/cleanRemovedContentDeclaration.mjs +1 -1
- package/dist/esm/cli.mjs +4 -3
- package/dist/esm/createDictionaryEntryPoint/createDictionaryEntryPoint.mjs +1 -1
- package/dist/esm/createDictionaryEntryPoint/getBuiltDictionariesPath.mjs +2 -2
- package/dist/esm/createDictionaryEntryPoint/getBuiltDynamicDictionariesPath.mjs +2 -2
- package/dist/esm/createDictionaryEntryPoint/getBuiltFetchDictionariesPath.mjs +2 -2
- package/dist/esm/createDictionaryEntryPoint/getBuiltRemoteDictionariesPath.mjs +2 -2
- package/dist/esm/createDictionaryEntryPoint/getBuiltUnmergedDictionariesPath.mjs +2 -2
- package/dist/esm/createType/createModuleAugmentation.mjs +1 -1
- package/dist/esm/createType/createType.mjs +1 -1
- package/dist/esm/docReview/pipeline.mjs.map +1 -1
- package/dist/esm/fetchDistantDictionaries.mjs.map +1 -1
- package/dist/esm/handleContentDeclarationFileChange.mjs +2 -2
- package/dist/esm/init/documentationRouter.mjs +1 -0
- package/dist/esm/init/documentationRouter.mjs.map +1 -1
- package/dist/esm/init/frameworkSetup/nextAppRouter/index.mjs +1 -1
- package/dist/esm/init/frameworkSetup/nextAppRouter/restructure.mjs +1 -1
- package/dist/esm/init/frameworkSetup/tanstackStart/index.mjs +1 -1
- package/dist/esm/init/frameworkSetup/tanstackStart/restructure.mjs +1 -1
- package/dist/esm/init/index.mjs +47 -3
- package/dist/esm/init/index.mjs.map +1 -1
- package/dist/esm/init/utils/fileSystem.mjs +2 -2
- package/dist/esm/init/utils/githubActions.mjs +1 -1
- package/dist/esm/init/utils/index.mjs +2 -1
- package/dist/esm/init/utils/intlayerDependencies.mjs +2 -2
- package/dist/esm/init/utils/packageManager.mjs +3 -1
- package/dist/esm/init/utils/packageManager.mjs.map +1 -1
- package/dist/esm/init/utils/prettierConfig.mjs +49 -0
- package/dist/esm/init/utils/prettierConfig.mjs.map +1 -0
- package/dist/esm/initConfig/index.mjs +1 -1
- package/dist/esm/initConfig/index.mjs.map +1 -1
- package/dist/esm/installLSP.mjs +1 -1
- package/dist/esm/installMCP/installMCP.mjs +1 -1
- package/dist/esm/installSkills/index.mjs +1 -1
- package/dist/esm/installSkills/index.mjs.map +1 -1
- package/dist/esm/listGitFiles.mjs +1 -1
- package/dist/esm/listGitFiles.mjs.map +1 -1
- package/dist/esm/loadDictionaries/getIntlayerBundle.mjs +1 -1
- package/dist/esm/loadDictionaries/loadContentDeclaration.mjs +1 -1
- package/dist/esm/loadDictionaries/loadLocalDictionaries.mjs +1 -1
- package/dist/esm/loadDictionaries/log.mjs +1 -1
- package/dist/esm/loadDictionaries/logTypeScriptErrors.mjs.map +1 -1
- package/dist/esm/prepareIntlayer.mjs +2 -2
- package/dist/esm/prepareIntlayer.mjs.map +1 -1
- package/dist/esm/scan/index.mjs +1 -1
- package/dist/esm/syncPluginKit/createFileAdapter.mjs +1 -1
- package/dist/esm/utils/buildComponentFilesList.mjs +1 -1
- package/dist/esm/utils/contentWatcherLock.mjs +2 -2
- package/dist/esm/utils/readDictionariesFromDisk.mjs +1 -1
- package/dist/esm/utils/runOnce.mjs +2 -2
- package/dist/esm/utils/withFileLock.mjs +2 -2
- package/dist/esm/watcher.mjs +4 -4
- package/dist/esm/watcher.mjs.map +1 -1
- package/dist/esm/writeConfiguration/index.mjs +2 -2
- package/dist/esm/writeContentDeclaration/processContentDeclarationContent.mjs +1 -1
- package/dist/esm/writeContentDeclaration/writeContentDeclaration.mjs +2 -2
- package/dist/esm/writeContentDeclaration/writeJSFile.mjs +2 -2
- package/dist/esm/writeContentDeclaration/writeMarkdownFile.mjs +1 -1
- package/dist/esm/writeContentDeclaration/writeYamlFile.mjs +1 -1
- package/dist/esm/writeFileIfChanged.mjs +2 -2
- package/dist/types/build.d.ts +17 -17
- package/dist/types/buildIntlayerDictionary/buildIntlayerDictionary.d.ts.map +1 -1
- package/dist/types/cli.d.ts +12 -10
- package/dist/types/docReview/pipeline.d.ts.map +1 -1
- package/dist/types/init/documentationRouter.d.ts +1 -0
- package/dist/types/init/documentationRouter.d.ts.map +1 -1
- package/dist/types/init/index.d.ts +2 -0
- package/dist/types/init/index.d.ts.map +1 -1
- package/dist/types/init/utils/index.d.ts +2 -1
- package/dist/types/init/utils/packageManager.d.ts +5 -0
- package/dist/types/init/utils/packageManager.d.ts.map +1 -1
- package/dist/types/init/utils/prettierConfig.d.ts +28 -0
- package/dist/types/init/utils/prettierConfig.d.ts.map +1 -0
- package/dist/types/loadDictionaries/loadRemoteDictionaries.d.ts +1 -1
- package/dist/types/loadDictionaries/logTypeScriptErrors.d.ts.map +1 -1
- package/dist/types/scan/detection/index.d.ts +4 -0
- package/dist/types/scan/index.d.ts +5 -4
- package/dist/types/watcher.d.ts.map +1 -1
- package/dist/types/writeContentDeclaration/writeContentDeclaration.d.ts +1 -1
- package/package.json +69 -69
package/dist/cjs/build.cjs
CHANGED
|
@@ -1,13 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
2
|
const require_cleanOutputDir = require("./cleanOutputDir.cjs");
|
|
3
3
|
const require_buildIntlayerDictionary_buildIntlayerDictionary = require("./buildIntlayerDictionary/buildIntlayerDictionary.cjs");
|
|
4
|
-
const require_buildIntlayerDictionary_processContentDeclaration = require("./buildIntlayerDictionary/processContentDeclaration.cjs");
|
|
5
|
-
const require_loadDictionaries_loadContentDeclaration = require("./loadDictionaries/loadContentDeclaration.cjs");
|
|
6
|
-
const require_formatDictionary = require("./formatDictionary.cjs");
|
|
7
|
-
const require_loadDictionaries_loadRemoteDictionaries = require("./loadDictionaries/loadRemoteDictionaries.cjs");
|
|
8
|
-
const require_loadDictionaries_loadDictionaries = require("./loadDictionaries/loadDictionaries.cjs");
|
|
9
|
-
const require_loadDictionaries_loadLocalDictionaries = require("./loadDictionaries/loadLocalDictionaries.cjs");
|
|
10
|
-
const require_prepareIntlayer = require("./prepareIntlayer.cjs");
|
|
11
4
|
const require_createDictionaryEntryPoint_generateDictionaryListContent = require("./createDictionaryEntryPoint/generateDictionaryListContent.cjs");
|
|
12
5
|
const require_createDictionaryEntryPoint_getBuiltDictionariesPath = require("./createDictionaryEntryPoint/getBuiltDictionariesPath.cjs");
|
|
13
6
|
const require_createDictionaryEntryPoint_getBuiltDynamicDictionariesPath = require("./createDictionaryEntryPoint/getBuiltDynamicDictionariesPath.cjs");
|
|
@@ -17,14 +10,21 @@ const require_createDictionaryEntryPoint_getBuiltUnmergedDictionariesPath = requ
|
|
|
17
10
|
const require_createDictionaryEntryPoint_createDictionaryEntryPoint = require("./createDictionaryEntryPoint/createDictionaryEntryPoint.cjs");
|
|
18
11
|
const require_createType_createModuleAugmentation = require("./createType/createModuleAugmentation.cjs");
|
|
19
12
|
const require_createType_createType = require("./createType/createType.cjs");
|
|
13
|
+
const require_buildIntlayerDictionary_processContentDeclaration = require("./buildIntlayerDictionary/processContentDeclaration.cjs");
|
|
14
|
+
const require_loadDictionaries_loadContentDeclaration = require("./loadDictionaries/loadContentDeclaration.cjs");
|
|
15
|
+
const require_loadDictionaries_loadLocalDictionaries = require("./loadDictionaries/loadLocalDictionaries.cjs");
|
|
16
|
+
const require_formatDictionary = require("./formatDictionary.cjs");
|
|
17
|
+
const require_loadDictionaries_loadRemoteDictionaries = require("./loadDictionaries/loadRemoteDictionaries.cjs");
|
|
18
|
+
const require_loadDictionaries_loadDictionaries = require("./loadDictionaries/loadDictionaries.cjs");
|
|
19
|
+
const require_prepareIntlayer = require("./prepareIntlayer.cjs");
|
|
20
20
|
const require_prepareIntlayerServer = require("./prepareIntlayerServer.cjs");
|
|
21
21
|
const require_utils_readDictionariesFromDisk = require("./utils/readDictionariesFromDisk.cjs");
|
|
22
|
-
const require_writeConfiguration_index = require("./writeConfiguration/index.cjs");
|
|
23
22
|
const require_writeContentDeclaration_detectExportedComponentName = require("./writeContentDeclaration/detectExportedComponentName.cjs");
|
|
24
23
|
const require_writeContentDeclaration_transformJSFile = require("./writeContentDeclaration/transformJSFile.cjs");
|
|
25
24
|
const require_writeContentDeclaration_renderContentDeclaration = require("./writeContentDeclaration/renderContentDeclaration.cjs");
|
|
26
25
|
const require_writeContentDeclaration_writeJSFile = require("./writeContentDeclaration/writeJSFile.cjs");
|
|
27
26
|
const require_writeContentDeclaration_writeContentDeclaration = require("./writeContentDeclaration/writeContentDeclaration.cjs");
|
|
27
|
+
const require_writeConfiguration_index = require("./writeConfiguration/index.cjs");
|
|
28
28
|
const require_buildIntlayerDictionary_rebuildUnmergedDictionaries = require("./buildIntlayerDictionary/rebuildUnmergedDictionaries.cjs");
|
|
29
29
|
|
|
30
30
|
exports.INTLAYER_WATCH_ENV_VAR = require_prepareIntlayerServer.INTLAYER_WATCH_ENV_VAR;
|
|
@@ -2,11 +2,11 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
2
2
|
const require_writeFileIfChanged = require("../writeFileIfChanged.cjs");
|
|
3
3
|
const require_writeJsonIfChanged = require("../writeJsonIfChanged.cjs");
|
|
4
4
|
let _intlayer_config_logger = require("@intlayer/config/logger");
|
|
5
|
-
let node_fs_promises = require("node:fs/promises");
|
|
6
|
-
let node_path = require("node:path");
|
|
7
|
-
let _intlayer_config_utils = require("@intlayer/config/utils");
|
|
8
5
|
let _intlayer_config_defaultValues = require("@intlayer/config/defaultValues");
|
|
9
6
|
let _intlayer_core_dictionaryManipulator = require("@intlayer/core/dictionaryManipulator");
|
|
7
|
+
let node_path = require("node:path");
|
|
8
|
+
let node_fs_promises = require("node:fs/promises");
|
|
9
|
+
let _intlayer_config_utils = require("@intlayer/config/utils");
|
|
10
10
|
let _intlayer_core_plugins = require("@intlayer/core/plugins");
|
|
11
11
|
|
|
12
12
|
// src/buildIntlayerDictionary/writeDynamicDictionary.ts
|
|
@@ -2,10 +2,10 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
2
2
|
const require_utils_getPathHash = require("../utils/getPathHash.cjs");
|
|
3
3
|
const require_writeFileIfChanged = require("../writeFileIfChanged.cjs");
|
|
4
4
|
let _intlayer_config_logger = require("@intlayer/config/logger");
|
|
5
|
-
let
|
|
5
|
+
let _intlayer_config_defaultValues = require("@intlayer/config/defaultValues");
|
|
6
6
|
let node_path = require("node:path");
|
|
7
|
+
let node_fs_promises = require("node:fs/promises");
|
|
7
8
|
let _intlayer_config_utils = require("@intlayer/config/utils");
|
|
8
|
-
let _intlayer_config_defaultValues = require("@intlayer/config/defaultValues");
|
|
9
9
|
|
|
10
10
|
// src/buildIntlayerDictionary/writeFetchDictionary.ts
|
|
11
11
|
/**
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
2
|
const require_writeJsonIfChanged = require("../writeJsonIfChanged.cjs");
|
|
3
3
|
let _intlayer_config_logger = require("@intlayer/config/logger");
|
|
4
|
-
let
|
|
4
|
+
let _intlayer_core_dictionaryManipulator = require("@intlayer/core/dictionaryManipulator");
|
|
5
5
|
let node_path = require("node:path");
|
|
6
|
+
let node_fs_promises = require("node:fs/promises");
|
|
6
7
|
let _intlayer_config_utils = require("@intlayer/config/utils");
|
|
7
|
-
let _intlayer_core_dictionaryManipulator = require("@intlayer/core/dictionaryManipulator");
|
|
8
8
|
|
|
9
9
|
// src/buildIntlayerDictionary/writeMergedDictionary.ts
|
|
10
10
|
/**
|
|
@@ -2,10 +2,10 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
2
2
|
const require_utils_getPathHash = require("../utils/getPathHash.cjs");
|
|
3
3
|
const require_writeFileIfChanged = require("../writeFileIfChanged.cjs");
|
|
4
4
|
let _intlayer_config_logger = require("@intlayer/config/logger");
|
|
5
|
-
let
|
|
5
|
+
let _intlayer_config_defaultValues = require("@intlayer/config/defaultValues");
|
|
6
6
|
let node_path = require("node:path");
|
|
7
|
+
let node_fs_promises = require("node:fs/promises");
|
|
7
8
|
let _intlayer_config_utils = require("@intlayer/config/utils");
|
|
8
|
-
let _intlayer_config_defaultValues = require("@intlayer/config/defaultValues");
|
|
9
9
|
|
|
10
10
|
// src/buildIntlayerDictionary/writeNestedDictionary.ts
|
|
11
11
|
/**
|
|
@@ -4,10 +4,10 @@ const require_loadDictionaries_loadRemoteDictionaries = require("../loadDictiona
|
|
|
4
4
|
const require_writeJsonIfChanged = require("../writeJsonIfChanged.cjs");
|
|
5
5
|
const require_buildIntlayerDictionary_writeUnmergedDictionary = require("./writeUnmergedDictionary.cjs");
|
|
6
6
|
let _intlayer_config_logger = require("@intlayer/config/logger");
|
|
7
|
-
let
|
|
7
|
+
let _intlayer_core_dictionaryManipulator = require("@intlayer/core/dictionaryManipulator");
|
|
8
8
|
let node_path = require("node:path");
|
|
9
|
+
let node_fs_promises = require("node:fs/promises");
|
|
9
10
|
let _intlayer_config_utils = require("@intlayer/config/utils");
|
|
10
|
-
let _intlayer_core_dictionaryManipulator = require("@intlayer/core/dictionaryManipulator");
|
|
11
11
|
|
|
12
12
|
// src/buildIntlayerDictionary/writeRemoteDictionary.ts
|
|
13
13
|
/**
|
|
@@ -2,10 +2,10 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
2
2
|
const require_filterInvalidDictionaries = require("../filterInvalidDictionaries.cjs");
|
|
3
3
|
const require_writeJsonIfChanged = require("../writeJsonIfChanged.cjs");
|
|
4
4
|
let _intlayer_config_logger = require("@intlayer/config/logger");
|
|
5
|
-
let
|
|
5
|
+
let _intlayer_core_dictionaryManipulator = require("@intlayer/core/dictionaryManipulator");
|
|
6
6
|
let node_path = require("node:path");
|
|
7
|
+
let node_fs_promises = require("node:fs/promises");
|
|
7
8
|
let _intlayer_config_utils = require("@intlayer/config/utils");
|
|
8
|
-
let _intlayer_core_dictionaryManipulator = require("@intlayer/core/dictionaryManipulator");
|
|
9
9
|
|
|
10
10
|
// src/buildIntlayerDictionary/writeUnmergedDictionary.ts
|
|
11
11
|
const groupDictionariesByKey = (dictionaries) => dictionaries.reduce((acc, dictionary) => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
2
|
let _intlayer_config_logger = require("@intlayer/config/logger");
|
|
3
|
-
let node_fs_promises = require("node:fs/promises");
|
|
4
3
|
let node_fs = require("node:fs");
|
|
4
|
+
let node_fs_promises = require("node:fs/promises");
|
|
5
5
|
|
|
6
6
|
// src/cleanOutputDir.ts
|
|
7
7
|
const cleanOutputDir = async (configuration) => {
|
|
@@ -4,8 +4,8 @@ const require_createDictionaryEntryPoint_createDictionaryEntryPoint = require(".
|
|
|
4
4
|
const require_utils_readDictionariesFromDisk = require("./utils/readDictionariesFromDisk.cjs");
|
|
5
5
|
const require_writeJsonIfChanged = require("./writeJsonIfChanged.cjs");
|
|
6
6
|
let _intlayer_config_logger = require("@intlayer/config/logger");
|
|
7
|
-
let node_fs_promises = require("node:fs/promises");
|
|
8
7
|
let node_path = require("node:path");
|
|
8
|
+
let node_fs_promises = require("node:fs/promises");
|
|
9
9
|
let fast_glob = require("fast-glob");
|
|
10
10
|
fast_glob = require_runtime.__toESM(fast_glob);
|
|
11
11
|
let _intlayer_config_client = require("@intlayer/config/client");
|
package/dist/cjs/cli.cjs
CHANGED
|
@@ -2,12 +2,13 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
2
2
|
const require_detectFormatCommand = require("./detectFormatCommand.cjs");
|
|
3
3
|
const require_init_cms = require("./init/cms.cjs");
|
|
4
4
|
const require_init_index = require("./init/index.cjs");
|
|
5
|
-
const require_getContentDeclarationFileTemplate_getContentDeclarationFileTemplate = require("./getContentDeclarationFileTemplate/getContentDeclarationFileTemplate.cjs");
|
|
6
5
|
const require_init_upgradeIntlayerPackages = require("./init/upgradeIntlayerPackages.cjs");
|
|
7
|
-
const
|
|
6
|
+
const require_getContentDeclarationFileTemplate_getContentDeclarationFileTemplate = require("./getContentDeclarationFileTemplate/getContentDeclarationFileTemplate.cjs");
|
|
8
7
|
const require_init_utils_contentLayout = require("./init/utils/contentLayout.cjs");
|
|
8
|
+
const require_init_documentationRouter = require("./init/documentationRouter.cjs");
|
|
9
9
|
const require_init_utils_nextCompilerBabel = require("./init/utils/nextCompilerBabel.cjs");
|
|
10
10
|
const require_init_utils_packageManager = require("./init/utils/packageManager.cjs");
|
|
11
|
+
const require_init_utils_prettierConfig = require("./init/utils/prettierConfig.cjs");
|
|
11
12
|
const require_init_utils_urlRoutingFramework = require("./init/utils/urlRoutingFramework.cjs");
|
|
12
13
|
const require_installLSP = require("./installLSP.cjs");
|
|
13
14
|
const require_installMCP_installMCP = require("./installMCP/installMCP.cjs");
|
|
@@ -31,6 +32,7 @@ exports.MCP_TRANSPORTS = require_installMCP_installMCP.MCP_TRANSPORTS;
|
|
|
31
32
|
exports.NEXT_INTLAYER_BABEL_CONFIG_CONTENT = require_init_utils_nextCompilerBabel.NEXT_INTLAYER_BABEL_CONFIG_CONTENT;
|
|
32
33
|
exports.PLATFORMS = require_installSkills_index.PLATFORMS;
|
|
33
34
|
exports.PLATFORMS_METADATA = require_installSkills_index.PLATFORMS_METADATA;
|
|
35
|
+
exports.PRETTIER_CONFIG_FILES = require_init_utils_prettierConfig.PRETTIER_CONFIG_FILES;
|
|
34
36
|
exports.SKILLS = require_installSkills_index.SKILLS;
|
|
35
37
|
exports.SKILLS_METADATA = require_installSkills_index.SKILLS_METADATA;
|
|
36
38
|
exports.detectCompatI18nLibraries = require_init_utils_packageManager.detectCompatI18nLibraries;
|
|
@@ -48,6 +50,7 @@ exports.getDocumentationUrl = require_init_documentationRouter.getDocumentationU
|
|
|
48
50
|
exports.getGitRootDir = require_listProjects.getGitRootDir;
|
|
49
51
|
exports.getInitialSkills = require_installSkills_index.getInitialSkills;
|
|
50
52
|
exports.hasLintTooling = require_init_utils_packageManager.hasLintTooling;
|
|
53
|
+
exports.hasPrettier = require_init_utils_prettierConfig.hasPrettier;
|
|
51
54
|
exports.hasUrlRoutingFramework = require_init_utils_urlRoutingFramework.hasUrlRoutingFramework;
|
|
52
55
|
exports.initIntlayer = require_init_index.initIntlayer;
|
|
53
56
|
exports.installLSP = require_installLSP.installLSP;
|
|
@@ -6,8 +6,8 @@ const require_createDictionaryEntryPoint_getBuiltDynamicDictionariesPath = requi
|
|
|
6
6
|
const require_createDictionaryEntryPoint_getBuiltFetchDictionariesPath = require("./getBuiltFetchDictionariesPath.cjs");
|
|
7
7
|
const require_createDictionaryEntryPoint_getBuiltRemoteDictionariesPath = require("./getBuiltRemoteDictionariesPath.cjs");
|
|
8
8
|
const require_createDictionaryEntryPoint_getBuiltUnmergedDictionariesPath = require("./getBuiltUnmergedDictionariesPath.cjs");
|
|
9
|
-
let node_fs_promises = require("node:fs/promises");
|
|
10
9
|
let node_path = require("node:path");
|
|
10
|
+
let node_fs_promises = require("node:fs/promises");
|
|
11
11
|
let _intlayer_config_utils = require("@intlayer/config/utils");
|
|
12
12
|
let _intlayer_config_node = require("@intlayer/config/node");
|
|
13
13
|
|
|
@@ -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
|
|
3
|
+
let node_fs = require("node:fs");
|
|
4
4
|
let node_path = require("node:path");
|
|
5
|
+
let node_fs_promises = require("node:fs/promises");
|
|
5
6
|
let _intlayer_config_utils = require("@intlayer/config/utils");
|
|
6
|
-
let node_fs = require("node:fs");
|
|
7
7
|
let fast_glob = require("fast-glob");
|
|
8
8
|
fast_glob = require_runtime.__toESM(fast_glob);
|
|
9
9
|
|
|
@@ -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
|
|
3
|
+
let node_fs = require("node:fs");
|
|
4
4
|
let node_path = require("node:path");
|
|
5
|
+
let node_fs_promises = require("node:fs/promises");
|
|
5
6
|
let _intlayer_config_utils = require("@intlayer/config/utils");
|
|
6
|
-
let node_fs = require("node:fs");
|
|
7
7
|
let fast_glob = require("fast-glob");
|
|
8
8
|
fast_glob = require_runtime.__toESM(fast_glob);
|
|
9
9
|
|
|
@@ -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
|
|
3
|
+
let node_fs = require("node:fs");
|
|
4
4
|
let node_path = require("node:path");
|
|
5
|
+
let node_fs_promises = require("node:fs/promises");
|
|
5
6
|
let _intlayer_config_utils = require("@intlayer/config/utils");
|
|
6
|
-
let node_fs = require("node:fs");
|
|
7
7
|
let fast_glob = require("fast-glob");
|
|
8
8
|
fast_glob = require_runtime.__toESM(fast_glob);
|
|
9
9
|
|
|
@@ -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
|
|
3
|
+
let node_fs = require("node:fs");
|
|
4
4
|
let node_path = require("node:path");
|
|
5
|
+
let node_fs_promises = require("node:fs/promises");
|
|
5
6
|
let _intlayer_config_utils = require("@intlayer/config/utils");
|
|
6
|
-
let node_fs = require("node:fs");
|
|
7
7
|
let fast_glob = require("fast-glob");
|
|
8
8
|
fast_glob = require_runtime.__toESM(fast_glob);
|
|
9
9
|
|
|
@@ -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
|
|
3
|
+
let node_fs = require("node:fs");
|
|
4
4
|
let node_path = require("node:path");
|
|
5
|
+
let node_fs_promises = require("node:fs/promises");
|
|
5
6
|
let _intlayer_config_utils = require("@intlayer/config/utils");
|
|
6
|
-
let node_fs = require("node:fs");
|
|
7
7
|
let fast_glob = require("fast-glob");
|
|
8
8
|
fast_glob = require_runtime.__toESM(fast_glob);
|
|
9
9
|
|
|
@@ -2,8 +2,8 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
2
2
|
const require_runtime = require("../_virtual/_rolldown/runtime.cjs");
|
|
3
3
|
const require_utils_getPathHash = require("../utils/getPathHash.cjs");
|
|
4
4
|
const require_writeFileIfChanged = require("../writeFileIfChanged.cjs");
|
|
5
|
-
let node_fs_promises = require("node:fs/promises");
|
|
6
5
|
let node_path = require("node:path");
|
|
6
|
+
let node_fs_promises = require("node:fs/promises");
|
|
7
7
|
let _intlayer_config_utils = require("@intlayer/config/utils");
|
|
8
8
|
let _intlayer_core_localization = require("@intlayer/core/localization");
|
|
9
9
|
let fast_glob = require("fast-glob");
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
2
|
const require_writeFileIfChanged = require("../writeFileIfChanged.cjs");
|
|
3
|
-
let node_fs_promises = require("node:fs/promises");
|
|
4
3
|
let node_path = require("node:path");
|
|
4
|
+
let node_fs_promises = require("node:fs/promises");
|
|
5
5
|
let _intlayer_config_utils = require("@intlayer/config/utils");
|
|
6
6
|
|
|
7
7
|
// src/createType/createType.ts
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pipeline.cjs","names":["normalizeBlock","fingerprintBlock","segmentDocument","segmentSections","alignBaseAndTargetBlocks","mapChangedLinesToBlocks","identifySegmentsToReview"],"sources":["../../../src/docReview/pipeline.ts"],"sourcesContent":["import { alignBaseAndTargetBlocks } from './alignBlocks';\nimport { fingerprintBlock } from './fingerprintBlock';\nimport { mapChangedLinesToBlocks } from './mapChangedLinesToBlocks';\nimport { normalizeBlock } from './normalizeBlock';\nimport {\n identifySegmentsToReview,\n mergeReviewedSegments,\n type SegmentToReview,\n} from './rebuildDocument';\nimport { segmentDocument, segmentSections } from './segmentDocument';\nimport type {\n AlignmentPlan,\n Block,\n FingerprintedBlock,\n PlannedAction,\n} from './types';\n\nexport type BuildAlignmentPlanInput = {\n /** The base (source) document, used as the translation reference. */\n baseText: string;\n /** The existing target (translated) document, possibly empty. */\n targetText: string;\n /**\n * 1-based line numbers that changed in the base document.\n *\n * `undefined` means the changed lines are unknown (no git history available):\n * every section is then compared block by block. An empty array means nothing\n * changed, and every aligned block is reused.\n */\n changedLines: number[] | undefined;\n};\n\nexport type BuildAlignmentPlanOutput = {\n baseBlocks: FingerprintedBlock[];\n targetBlocks: FingerprintedBlock[];\n plan: AlignmentPlan;\n segmentsToReview: SegmentToReview[];\n};\n\n/** Fingerprint a list of already-segmented blocks (context = neighbours). */\nconst fingerprintBlockList = (blocks: Block[]): FingerprintedBlock[] => {\n const normalized = blocks.map(normalizeBlock);\n\n return normalized.map((block, index, array) =>\n fingerprintBlock(block, array[index - 1] ?? null, array[index + 1] ?? null)\n );\n};\n\n/**\n * Re-segment a section's own text into fine blocks, shifting their relative line\n * numbers back to absolute document positions so changed-line mapping and the\n * review report keep reporting real file coordinates.\n */\nconst fingerprintSectionFineBlocks = (section: Block): FingerprintedBlock[] => {\n const lineOffset = section.lineStart - 1;\n\n const fineBlocks = segmentDocument(section.content).map(\n (block): Block => ({\n ...block,\n lineStart: block.lineStart + lineOffset,\n lineEnd: block.lineEnd + lineOffset,\n })\n );\n\n return fingerprintBlockList(fineBlocks);\n};\n\n/**\n * Build the block-aware alignment plan between a base document and its\n * translation, in two levels.\n *\n * 1. **Sections** (heading-anchored) are aligned first. Because a document and\n * its translation share the same heading structure, this alignment is robust\n * and never drops a section just because the prose was split into a different\n * number of paragraphs.\n * 2. Only the sections **touched by a changed line** are then re-segmented into\n * fine blocks (paragraphs, code fences) and aligned within the section, so a\n * small edit re-translates only the affected paragraph(s) instead of the\n * whole section. Within a changed section a target block with no base\n * counterpart is **kept as-is** (reused) rather than deleted, so a translation\n * that has extra paragraphs never loses content.\n * When `changedLines` is `undefined` the changed lines are simply unknown, so\n * **every** section is inspected instead of none: aligned blocks are still\n * reused (there is no way to tell which translation went stale), but blocks\n * living on one side only are reported as `insert_new` / `delete`. This is\n * what makes a plain \"compare this document with its translation\" run — one\n * with no git history behind it — report anything at all.\n *\n * Section-level insertions and deletions stay whole: a brand-new section is\n * translated as one unit, and a target section with no base counterpart is\n * reported as `delete` for visibility but never dropped by the merge (see\n * {@link mergeReviewedSegments}), so a review can never lose translated content.\n *\n * @param input - The base/target texts and optional changed lines.\n * @returns The (flattened) blocks, the plan, and the segments that need translation.\n */\nexport const buildAlignmentPlan = ({\n baseText,\n targetText,\n changedLines,\n}: BuildAlignmentPlanInput): BuildAlignmentPlanOutput => {\n // `undefined` means \"which lines changed is unknown\" (no git history to read),\n // which is not the same as \"no line changed\": the former must still compare the\n // two documents, the latter must reuse everything.\n const hasChangedLineInformation = Array.isArray(changedLines);\n const changedLineNumbers = changedLines ?? [];\n\n const baseSections = fingerprintBlockList(segmentSections(baseText));\n const targetSections = fingerprintBlockList(segmentSections(targetText));\n\n const sectionAlignment = alignBaseAndTargetBlocks(\n baseSections,\n targetSections\n );\n const changedSectionIndexes = mapChangedLinesToBlocks(\n baseSections,\n changedLineNumbers\n );\n\n /**\n * Whether a section must be opened and inspected block by block.\n *\n * Without changed-line information every section is inspected, so comparing a\n * document with its translation from scratch still reports the blocks that\n * exist on one side only. With changed lines, only the touched sections are.\n */\n const isSectionToInspect = (sectionIndex: number): boolean =>\n !hasChangedLineInformation || changedSectionIndexes.has(sectionIndex);\n\n // Flattened blocks the plan refers to by index. Reused/deleted/inserted\n // sections contribute their whole-section block; changed sections contribute\n // their fine sub-blocks.\n const baseBlocks: FingerprintedBlock[] = [];\n const targetBlocks: FingerprintedBlock[] = [];\n const actions: PlannedAction[] = [];\n\n const pushBaseBlock = (block: FingerprintedBlock): number =>\n baseBlocks.push(block) - 1;\n const pushTargetBlock = (block: FingerprintedBlock): number =>\n targetBlocks.push(block) - 1;\n\n for (const pair of sectionAlignment) {\n // Section present only in the target → reported as `delete` for visibility,\n // but kept verbatim by the merge (the aligner may simply have failed to\n // follow a reordered section), never silently dropped.\n if (pair.baseIndex === -1 && pair.targetIndex !== null) {\n const targetIndex = pushTargetBlock(targetSections[pair.targetIndex]!);\n actions.push({ kind: 'delete', targetIndex });\n continue;\n }\n\n // Section present only in the base → brand new, translate as one unit.\n if (pair.baseIndex >= 0 && pair.targetIndex === null) {\n const baseIndex = pushBaseBlock(baseSections[pair.baseIndex]!);\n actions.push({ kind: 'insert_new', baseIndex });\n continue;\n }\n\n if (pair.baseIndex < 0 || pair.targetIndex === null) continue;\n\n const baseSection = baseSections[pair.baseIndex]!;\n const targetSection = targetSections[pair.targetIndex]!;\n\n // Unchanged section → reuse the existing translation verbatim.\n if (!isSectionToInspect(pair.baseIndex)) {\n const baseIndex = pushBaseBlock(baseSection);\n const targetIndex = pushTargetBlock(targetSection);\n actions.push({ kind: 'reuse', baseIndex, targetIndex });\n continue;\n }\n\n // Inspected section → align its fine blocks and review only what changed.\n const baseFineBlocks = fingerprintSectionFineBlocks(baseSection);\n const targetFineBlocks = fingerprintSectionFineBlocks(targetSection);\n const fineAlignment = alignBaseAndTargetBlocks(\n baseFineBlocks,\n targetFineBlocks\n );\n const changedFineIndexes = mapChangedLinesToBlocks(\n baseFineBlocks,\n changedLineNumbers\n );\n\n for (const finePair of fineAlignment) {\n // Target-only fine block. Its content is kept either way — `delete` is\n // reported for visibility only and the merge keeps it verbatim (see\n // {@link mergeReviewedSegments}).\n // With changed lines the author's edit is known precisely, so an unmatched\n // target block is most likely the translator's own prose split and stays\n // silent. Without them the whole document is being compared, and such a\n // block is exactly the divergence the report exists to surface.\n if (finePair.baseIndex === -1 && finePair.targetIndex !== null) {\n const targetIndex = pushTargetBlock(\n targetFineBlocks[finePair.targetIndex]!\n );\n actions.push(\n hasChangedLineInformation\n ? { kind: 'reuse', baseIndex: -1, targetIndex }\n : { kind: 'delete', targetIndex }\n );\n continue;\n }\n\n // Base-only fine block: a new paragraph inside the section, translate it.\n if (finePair.baseIndex >= 0 && finePair.targetIndex === null) {\n const baseIndex = pushBaseBlock(baseFineBlocks[finePair.baseIndex]!);\n actions.push({ kind: 'insert_new', baseIndex });\n continue;\n }\n\n if (finePair.baseIndex < 0 || finePair.targetIndex === null) continue;\n\n const baseIndex = pushBaseBlock(baseFineBlocks[finePair.baseIndex]!);\n const targetIndex = pushTargetBlock(\n targetFineBlocks[finePair.targetIndex]!\n );\n\n actions.push(\n changedFineIndexes.has(finePair.baseIndex)\n ? { kind: 'review', baseIndex, targetIndex }\n : { kind: 'reuse', baseIndex, targetIndex }\n );\n }\n }\n\n const plan = { actions };\n\n const { segmentsToReview } = identifySegmentsToReview({\n baseBlocks,\n targetBlocks,\n plan,\n });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,SAAS,IACrC;IAAE,MAAM;IAAU;IAAW;GAAY,IACzC;IAAE,MAAM;IAAS;IAAW;GAAY,CAC9C;EACF;CACF;CAEA,MAAM,OAAO,EAAE,QAAQ;CAEvB,MAAM,EAAE,qBAAqBC,2DAAyB;EACpD;EACA;EACA;CACF,CAAC;CAED,OAAO;EAAE;EAAY;EAAc;EAAM;CAAiB;AAC5D"}
|
|
1
|
+
{"version":3,"file":"pipeline.cjs","names":["normalizeBlock","fingerprintBlock","segmentDocument","segmentSections","alignBaseAndTargetBlocks","mapChangedLinesToBlocks","identifySegmentsToReview"],"sources":["../../../src/docReview/pipeline.ts"],"sourcesContent":["import { alignBaseAndTargetBlocks } from './alignBlocks';\nimport { fingerprintBlock } from './fingerprintBlock';\nimport { mapChangedLinesToBlocks } from './mapChangedLinesToBlocks';\nimport { normalizeBlock } from './normalizeBlock';\nimport {\n identifySegmentsToReview,\n mergeReviewedSegments,\n type SegmentToReview,\n} from './rebuildDocument';\nimport { segmentDocument, segmentSections } from './segmentDocument';\nimport type {\n AlignmentPlan,\n Block,\n FingerprintedBlock,\n PlannedAction,\n} from './types';\n\nexport type BuildAlignmentPlanInput = {\n /** The base (source) document, used as the translation reference. */\n baseText: string;\n /** The existing target (translated) document, possibly empty. */\n targetText: string;\n /**\n * 1-based line numbers that changed in the base document.\n *\n * `undefined` means the changed lines are unknown (no git history available):\n * every section is then compared block by block. An empty array means nothing\n * changed, and every aligned block is reused.\n */\n changedLines: number[] | undefined;\n};\n\nexport type BuildAlignmentPlanOutput = {\n baseBlocks: FingerprintedBlock[];\n targetBlocks: FingerprintedBlock[];\n plan: AlignmentPlan;\n segmentsToReview: SegmentToReview[];\n};\n\n/** Fingerprint a list of already-segmented blocks (context = neighbours). */\nconst fingerprintBlockList = (blocks: Block[]): FingerprintedBlock[] => {\n const normalized = blocks.map(normalizeBlock);\n\n return normalized.map((block, index, array) =>\n fingerprintBlock(block, array[index - 1] ?? null, array[index + 1] ?? null)\n );\n};\n\n/**\n * Re-segment a section's own text into fine blocks, shifting their relative line\n * numbers back to absolute document positions so changed-line mapping and the\n * review report keep reporting real file coordinates.\n */\nconst fingerprintSectionFineBlocks = (section: Block): FingerprintedBlock[] => {\n const lineOffset = section.lineStart - 1;\n\n const fineBlocks = segmentDocument(section.content).map((block): Block => ({\n ...block,\n lineStart: block.lineStart + lineOffset,\n lineEnd: block.lineEnd + lineOffset,\n }));\n\n return fingerprintBlockList(fineBlocks);\n};\n\n/**\n * Build the block-aware alignment plan between a base document and its\n * translation, in two levels.\n *\n * 1. **Sections** (heading-anchored) are aligned first. Because a document and\n * its translation share the same heading structure, this alignment is robust\n * and never drops a section just because the prose was split into a different\n * number of paragraphs.\n * 2. Only the sections **touched by a changed line** are then re-segmented into\n * fine blocks (paragraphs, code fences) and aligned within the section, so a\n * small edit re-translates only the affected paragraph(s) instead of the\n * whole section. Within a changed section a target block with no base\n * counterpart is **kept as-is** (reused) rather than deleted, so a translation\n * that has extra paragraphs never loses content.\n * When `changedLines` is `undefined` the changed lines are simply unknown, so\n * **every** section is inspected instead of none: aligned blocks are still\n * reused (there is no way to tell which translation went stale), but blocks\n * living on one side only are reported as `insert_new` / `delete`. This is\n * what makes a plain \"compare this document with its translation\" run — one\n * with no git history behind it — report anything at all.\n *\n * Section-level insertions and deletions stay whole: a brand-new section is\n * translated as one unit, and a target section with no base counterpart is\n * reported as `delete` for visibility but never dropped by the merge (see\n * {@link mergeReviewedSegments}), so a review can never lose translated content.\n *\n * @param input - The base/target texts and optional changed lines.\n * @returns The (flattened) blocks, the plan, and the segments that need translation.\n */\nexport const buildAlignmentPlan = ({\n baseText,\n targetText,\n changedLines,\n}: BuildAlignmentPlanInput): BuildAlignmentPlanOutput => {\n // `undefined` means \"which lines changed is unknown\" (no git history to read),\n // which is not the same as \"no line changed\": the former must still compare the\n // two documents, the latter must reuse everything.\n const hasChangedLineInformation = Array.isArray(changedLines);\n const changedLineNumbers = changedLines ?? [];\n\n const baseSections = fingerprintBlockList(segmentSections(baseText));\n const targetSections = fingerprintBlockList(segmentSections(targetText));\n\n const sectionAlignment = alignBaseAndTargetBlocks(\n baseSections,\n targetSections\n );\n const changedSectionIndexes = mapChangedLinesToBlocks(\n baseSections,\n changedLineNumbers\n );\n\n /**\n * Whether a section must be opened and inspected block by block.\n *\n * Without changed-line information every section is inspected, so comparing a\n * document with its translation from scratch still reports the blocks that\n * exist on one side only. With changed lines, only the touched sections are.\n */\n const isSectionToInspect = (sectionIndex: number): boolean =>\n !hasChangedLineInformation || changedSectionIndexes.has(sectionIndex);\n\n // Flattened blocks the plan refers to by index. Reused/deleted/inserted\n // sections contribute their whole-section block; changed sections contribute\n // their fine sub-blocks.\n const baseBlocks: FingerprintedBlock[] = [];\n const targetBlocks: FingerprintedBlock[] = [];\n const actions: PlannedAction[] = [];\n\n const pushBaseBlock = (block: FingerprintedBlock): number =>\n baseBlocks.push(block) - 1;\n const pushTargetBlock = (block: FingerprintedBlock): number =>\n targetBlocks.push(block) - 1;\n\n for (const pair of sectionAlignment) {\n // Section present only in the target → reported as `delete` for visibility,\n // but kept verbatim by the merge (the aligner may simply have failed to\n // follow a reordered section), never silently dropped.\n if (pair.baseIndex === -1 && pair.targetIndex !== null) {\n const targetIndex = pushTargetBlock(targetSections[pair.targetIndex]!);\n actions.push({ kind: 'delete', targetIndex });\n continue;\n }\n\n // Section present only in the base → brand new, translate as one unit.\n if (pair.baseIndex >= 0 && pair.targetIndex === null) {\n const baseIndex = pushBaseBlock(baseSections[pair.baseIndex]!);\n actions.push({ kind: 'insert_new', baseIndex });\n continue;\n }\n\n if (pair.baseIndex < 0 || pair.targetIndex === null) continue;\n\n const baseSection = baseSections[pair.baseIndex]!;\n const targetSection = targetSections[pair.targetIndex]!;\n\n // Unchanged section → reuse the existing translation verbatim.\n if (!isSectionToInspect(pair.baseIndex)) {\n const baseIndex = pushBaseBlock(baseSection);\n const targetIndex = pushTargetBlock(targetSection);\n actions.push({ kind: 'reuse', baseIndex, targetIndex });\n continue;\n }\n\n // Inspected section → align its fine blocks and review only what changed.\n const baseFineBlocks = fingerprintSectionFineBlocks(baseSection);\n const targetFineBlocks = fingerprintSectionFineBlocks(targetSection);\n const fineAlignment = alignBaseAndTargetBlocks(\n baseFineBlocks,\n targetFineBlocks\n );\n const changedFineIndexes = mapChangedLinesToBlocks(\n baseFineBlocks,\n changedLineNumbers\n );\n\n for (const finePair of fineAlignment) {\n // Target-only fine block. Its content is kept either way — `delete` is\n // reported for visibility only and the merge keeps it verbatim (see\n // {@link mergeReviewedSegments}).\n // With changed lines the author's edit is known precisely, so an unmatched\n // target block is most likely the translator's own prose split and stays\n // silent. Without them the whole document is being compared, and such a\n // block is exactly the divergence the report exists to surface.\n if (finePair.baseIndex === -1 && finePair.targetIndex !== null) {\n const targetIndex = pushTargetBlock(\n targetFineBlocks[finePair.targetIndex]!\n );\n actions.push(\n hasChangedLineInformation\n ? { kind: 'reuse', baseIndex: -1, targetIndex }\n : { kind: 'delete', targetIndex }\n );\n continue;\n }\n\n // Base-only fine block: a new paragraph inside the section, translate it.\n if (finePair.baseIndex >= 0 && finePair.targetIndex === null) {\n const baseIndex = pushBaseBlock(baseFineBlocks[finePair.baseIndex]!);\n actions.push({ kind: 'insert_new', baseIndex });\n continue;\n }\n\n if (finePair.baseIndex < 0 || finePair.targetIndex === null) continue;\n\n const baseIndex = pushBaseBlock(baseFineBlocks[finePair.baseIndex]!);\n const targetIndex = pushTargetBlock(\n targetFineBlocks[finePair.targetIndex]!\n );\n\n actions.push(\n changedFineIndexes.has(finePair.baseIndex)\n ? { kind: 'review', baseIndex, targetIndex }\n : { kind: 'reuse', baseIndex, targetIndex }\n );\n }\n }\n\n const plan = { actions };\n\n const { segmentsToReview } = identifySegmentsToReview({\n baseBlocks,\n targetBlocks,\n plan,\n });\n\n return { baseBlocks, targetBlocks, plan, segmentsToReview };\n};\n\nexport type { SegmentToReview };\nexport { mergeReviewedSegments };\n"],"mappings":";;;;;;;;;;AAwCA,MAAM,wBAAwB,WAA0C;CA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B,MAAM,EAAE,qBAAqBC,2DAAyB;EACpD;EACA;EACA;CACF,CAAC;CAED,OAAO;EAAE;EAAY;EAAc;EAAM;CAAiB;AAC5D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fetchDistantDictionaries.cjs","names":["getConfiguration","getAppLogger","dictionaryEndpoint","createIntlayerCMS","chunkArray","parallelize","retryManager","x"],"sources":["../../src/fetchDistantDictionaries.ts"],"sourcesContent":["import { createIntlayerCMS, type DictionaryAPI } from '@intlayer/api';\nimport { dictionaryEndpoint } from '@intlayer/api/dictionary';\nimport { getAppLogger, x } from '@intlayer/config/logger';\nimport { getConfiguration } from '@intlayer/config/node';\nimport { chunkArray, parallelize, retryManager } from '@intlayer/config/utils';\nimport type { DictionariesStatus } from './loadDictionaries';\n\n/**\n * Number of dictionaries requested per HTTP call. Must stay under the batch\n * limit enforced by the backend (`MAX_DICTIONARY_KEYS_PER_REQUEST`).\n */\nconst DEFAULT_DICTIONARIES_PER_REQUEST = 3;\n\n/** Number of batch requests kept in flight at the same time. */\nconst DEFAULT_PARALLEL_REQUESTS = 5;\n\n/** Number of retries performed on a failing batch request. */\nconst DEFAULT_MAX_RETRY = 2;\n\n/** Delay between two attempts of a failing batch request, in milliseconds. */\nconst DEFAULT_RETRY_DELAY = 250;\n\n/** HTTP statuses worth another attempt despite being client errors. */\nconst RETRYABLE_CLIENT_ERROR_STATUSES = new Set([408, 425, 429]);\n\n/**\n * A request is worth retrying when it failed for a reason another attempt could\n * fix: a network error (no status at all) or a server-side / throttling status.\n * Replaying a `404` or a `401` only multiplies the noise.\n */\nconst isRetryableError = (error: unknown): boolean => {\n const status = (error as { status?: number })?.status;\n\n if (typeof status !== 'number') return true;\n\n if (status >= 500) return true;\n\n return RETRYABLE_CLIENT_ERROR_STATUSES.has(status);\n};\n\n/**\n * A backend that predates the batch endpoint routes `/dictionary/by-keys` to\n * its `/dictionary/:dictionaryKey` handler, which answers `404` - either as an\n * unknown dictionary or as an unknown route. Both mean the same thing here:\n * this backend cannot serve batches, so fall back to one request per key.\n */\nconst isBatchEndpointUnsupported = (error: unknown): boolean =>\n (error as { status?: number })?.status === 404;\n\ntype FetchDistantDictionariesOptions = {\n dictionaryKeys: string[];\n newDictionariesPath?: string;\n logPrefix?: string;\n /**\n * Number of dictionaries fetched by a single request.\n * @default 3\n */\n dictionariesPerRequest?: number;\n /**\n * Number of requests kept in flight at the same time.\n * @default 5\n */\n parallelRequests?: number;\n /**\n * Number of retries performed when a batch request fails.\n * @default 2\n */\n maxRetry?: number;\n /**\n * Delay between two attempts of a failing batch request, in milliseconds.\n * @default 250\n */\n retryDelay?: number;\n};\n\n/**\n * Fetch distant dictionaries and update the logger with their statuses.\n *\n * Keys are grouped into batches fetched by a single request each, and those\n * requests are kept in flight together — by default 5 concurrent requests of 3\n * dictionaries, so 15 dictionaries travel at any given time. A slot is refilled\n * as soon as its request settles, so no batch waits for the whole wave.\n * Failing requests are retried before their keys are reported as errors.\n */\nexport const fetchDistantDictionaries = async (\n options: FetchDistantDictionariesOptions,\n onStatusUpdate?: (status: DictionariesStatus[]) => void\n): Promise<DictionaryAPI[]> => {\n const config = getConfiguration();\n const appLogger = getAppLogger(config);\n try {\n const dictionary = dictionaryEndpoint(createIntlayerCMS(config));\n\n const {\n dictionariesPerRequest = DEFAULT_DICTIONARIES_PER_REQUEST,\n parallelRequests = DEFAULT_PARALLEL_REQUESTS,\n maxRetry = DEFAULT_MAX_RETRY,\n retryDelay = DEFAULT_RETRY_DELAY,\n } = options;\n\n // A same key can be listed twice when several qualified dictionaries share\n // it - one request per key is enough to retrieve all of its siblings.\n const distantDictionariesKeys = [...new Set(options.dictionaryKeys)];\n\n if (distantDictionariesKeys.length === 0) return [];\n\n const batches = chunkArray(distantDictionariesKeys, dictionariesPerRequest);\n\n // Flipped once for the whole run as soon as a backend proves unable to\n // serve batches, so the remaining batches skip the doomed request.\n let isBatchEndpointSupported = true;\n let hasLoggedBatchFallback = false;\n\n /**\n * Fetch each key of a batch with its own request. Used against backends\n * without the batch endpoint. A key missing on the remote only discards\n * itself, never its neighbours.\n */\n const requestDictionariesOneByOne = async (\n batchKeys: string[]\n ): Promise<DictionaryAPI[]> => {\n const results = await parallelize(\n batchKeys,\n async (dictionaryKey) => {\n try {\n const getDictionaryResult =\n await dictionary.getDictionary(dictionaryKey);\n\n return getDictionaryResult.data;\n } catch (_error) {\n return undefined;\n }\n },\n batchKeys.length\n );\n\n return results.filter(\n (distantDictionary): distantDictionary is DictionaryAPI =>\n distantDictionary !== undefined\n );\n };\n\n /**\n * Request one batch of dictionaries, retrying the whole request when it\n * fails for a transient reason - a batch carries several dictionaries, so\n * a network hiccup would otherwise discard all of them at once.\n */\n const requestBatch = retryManager(\n async (batchKeys: string[]): Promise<DictionaryAPI[]> => {\n if (isBatchEndpointSupported) {\n try {\n const getDictionariesResult =\n await dictionary.getDictionariesByKeys(batchKeys);\n\n return getDictionariesResult.data ?? [];\n } catch (error) {\n if (!isBatchEndpointUnsupported(error)) throw error;\n\n isBatchEndpointSupported = false;\n\n if (!hasLoggedBatchFallback) {\n hasLoggedBatchFallback = true;\n appLogger(\n 'This backend does not provide the batch dictionary endpoint - falling back to one request per dictionary.',\n { level: 'warn' }\n );\n }\n }\n }\n\n return await requestDictionariesOneByOne(batchKeys);\n },\n {\n maxRetry,\n delay: retryDelay,\n shouldRetry: isRetryableError,\n onError: ({ error, attempt }) =>\n appLogger(\n `Retrying distant dictionaries request (attempt ${attempt + 1}/${maxRetry}): ${error}`,\n { level: 'warn' }\n ),\n }\n );\n\n /**\n * Fetch one batch of dictionaries within a single request, and report the\n * resulting status of every key it contains.\n */\n const processBatch = async (\n batchKeys: string[]\n ): Promise<DictionaryAPI[]> => {\n onStatusUpdate?.(\n batchKeys.map((dictionaryKey) => ({\n dictionaryKey,\n type: 'remote',\n status: 'fetching',\n }))\n );\n\n try {\n const distantDictionaries = await requestBatch(batchKeys);\n\n const fetchedKeys = new Set(\n distantDictionaries.map(\n (distantDictionary: DictionaryAPI) => distantDictionary.key\n )\n );\n\n onStatusUpdate?.(\n batchKeys.map(\n (dictionaryKey): DictionariesStatus =>\n fetchedKeys.has(dictionaryKey)\n ? {\n dictionaryKey,\n type: 'remote',\n status: 'fetched',\n }\n : {\n dictionaryKey,\n type: 'remote',\n status: 'error',\n error: `Dictionary ${dictionaryKey} not found on remote`,\n }\n )\n );\n\n return distantDictionaries;\n } catch (error) {\n onStatusUpdate?.(\n batchKeys.map((dictionaryKey) => ({\n dictionaryKey,\n type: 'remote',\n status: 'error',\n error: `Error fetching dictionary ${dictionaryKey}: ${error}`,\n }))\n );\n return [];\n }\n };\n\n const batchResults = await parallelize(\n batches,\n processBatch,\n parallelRequests\n );\n\n return batchResults.flat();\n } catch (_error) {\n appLogger(`${x} Failed to fetch distant dictionaries`, { level: 'error' });\n return [];\n }\n};\n"],"mappings":";;;;;;;;;;;;AAWA,MAAM,mCAAmC;;AAGzC,MAAM,4BAA4B;;AAGlC,MAAM,oBAAoB;;AAG1B,MAAM,sBAAsB;;AAG5B,MAAM,kDAAkC,IAAI,IAAI;CAAC;CAAK;CAAK;AAAG,CAAC;;;;;;AAO/D,MAAM,oBAAoB,UAA4B;CACpD,MAAM,SAAU,OAA+B;CAE/C,IAAI,OAAO,WAAW,UAAU,OAAO;CAEvC,IAAI,UAAU,KAAK,OAAO;CAE1B,OAAO,gCAAgC,IAAI,MAAM;AACnD;;;;;;;AAQA,MAAM,8BAA8B,UACjC,OAA+B,WAAW;;;;;;;;;;AAqC7C,MAAa,2BAA2B,OACtC,SACA,mBAC6B;CAC7B,MAAM,aAASA,wCAAiB;CAChC,MAAM,gBAAYC,sCAAa,MAAM;CACrC,IAAI;EACF,MAAM,iBAAaC,iDAAmBC,iCAAkB,MAAM,CAAC;EAE/D,MAAM,EACJ,yBAAyB,kCACzB,mBAAmB,2BACnB,WAAW,mBACX,aAAa,wBACX;EAIJ,MAAM,0BAA0B,CAAC,GAAG,IAAI,IAAI,QAAQ,cAAc,CAAC;E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AO,cAAc,cAAc;IACrC,CACR,CACF;IAEA,OAAO;GACT,SAAS,OAAO;IACd,iBACE,UAAU,KAAK,mBAAmB;KAChC;KACA,MAAM;KACN,QAAQ;KACR,OAAO,6BAA6B,cAAc,IAAI;IACxD,EAAE,CACJ;IACA,OAAO,CAAC;GACV;EACF;EAQA,QAAO,UANoBD,oCACzB,SACA,cACA,gBACF,EAEmB,CAAC,KAAK;CAC3B,SAAS,QAAQ;EACf,UAAU,GAAGE,0BAAE,wCAAwC,EAAE,OAAO,QAAQ,CAAC;EACzE,OAAO,CAAC;CACV;AACF"}
|
|
1
|
+
{"version":3,"file":"fetchDistantDictionaries.cjs","names":["getConfiguration","getAppLogger","dictionaryEndpoint","createIntlayerCMS","chunkArray","parallelize","retryManager","x"],"sources":["../../src/fetchDistantDictionaries.ts"],"sourcesContent":["import { createIntlayerCMS, type DictionaryAPI } from '@intlayer/api';\nimport { dictionaryEndpoint } from '@intlayer/api/dictionary';\nimport { getAppLogger, x } from '@intlayer/config/logger';\nimport { getConfiguration } from '@intlayer/config/node';\nimport { chunkArray, parallelize, retryManager } from '@intlayer/config/utils';\nimport type { DictionariesStatus } from './loadDictionaries';\n\n/**\n * Number of dictionaries requested per HTTP call. Must stay under the batch\n * limit enforced by the backend (`MAX_DICTIONARY_KEYS_PER_REQUEST`).\n */\nconst DEFAULT_DICTIONARIES_PER_REQUEST = 3;\n\n/** Number of batch requests kept in flight at the same time. */\nconst DEFAULT_PARALLEL_REQUESTS = 5;\n\n/** Number of retries performed on a failing batch request. */\nconst DEFAULT_MAX_RETRY = 2;\n\n/** Delay between two attempts of a failing batch request, in milliseconds. */\nconst DEFAULT_RETRY_DELAY = 250;\n\n/** HTTP statuses worth another attempt despite being client errors. */\nconst RETRYABLE_CLIENT_ERROR_STATUSES = new Set([408, 425, 429]);\n\n/**\n * A request is worth retrying when it failed for a reason another attempt could\n * fix: a network error (no status at all) or a server-side / throttling status.\n * Replaying a `404` or a `401` only multiplies the noise.\n */\nconst isRetryableError = (error: unknown): boolean => {\n const status = (error as { status?: number })?.status;\n\n if (typeof status !== 'number') return true;\n\n if (status >= 500) return true;\n\n return RETRYABLE_CLIENT_ERROR_STATUSES.has(status);\n};\n\n/**\n * A backend that predates the batch endpoint routes `/dictionary/by-keys` to\n * its `/dictionary/:dictionaryKey` handler, which answers `404` - either as an\n * unknown dictionary or as an unknown route. Both mean the same thing here:\n * this backend cannot serve batches, so fall back to one request per key.\n */\nconst isBatchEndpointUnsupported = (error: unknown): boolean =>\n (error as { status?: number })?.status === 404;\n\ntype FetchDistantDictionariesOptions = {\n dictionaryKeys: string[];\n newDictionariesPath?: string;\n logPrefix?: string;\n /**\n * Number of dictionaries fetched by a single request.\n * @default 3\n */\n dictionariesPerRequest?: number;\n /**\n * Number of requests kept in flight at the same time.\n * @default 5\n */\n parallelRequests?: number;\n /**\n * Number of retries performed when a batch request fails.\n * @default 2\n */\n maxRetry?: number;\n /**\n * Delay between two attempts of a failing batch request, in milliseconds.\n * @default 250\n */\n retryDelay?: number;\n};\n\n/**\n * Fetch distant dictionaries and update the logger with their statuses.\n *\n * Keys are grouped into batches fetched by a single request each, and those\n * requests are kept in flight together — by default 5 concurrent requests of 3\n * dictionaries, so 15 dictionaries travel at any given time. A slot is refilled\n * as soon as its request settles, so no batch waits for the whole wave.\n * Failing requests are retried before their keys are reported as errors.\n */\nexport const fetchDistantDictionaries = async (\n options: FetchDistantDictionariesOptions,\n onStatusUpdate?: (status: DictionariesStatus[]) => void\n): Promise<DictionaryAPI[]> => {\n const config = getConfiguration();\n const appLogger = getAppLogger(config);\n try {\n const dictionary = dictionaryEndpoint(createIntlayerCMS(config));\n\n const {\n dictionariesPerRequest = DEFAULT_DICTIONARIES_PER_REQUEST,\n parallelRequests = DEFAULT_PARALLEL_REQUESTS,\n maxRetry = DEFAULT_MAX_RETRY,\n retryDelay = DEFAULT_RETRY_DELAY,\n } = options;\n\n // A same key can be listed twice when several qualified dictionaries share\n // it - one request per key is enough to retrieve all of its siblings.\n const distantDictionariesKeys = [...new Set(options.dictionaryKeys)];\n\n if (distantDictionariesKeys.length === 0) return [];\n\n const batches = chunkArray(distantDictionariesKeys, dictionariesPerRequest);\n\n // Flipped once for the whole run as soon as a backend proves unable to\n // serve batches, so the remaining batches skip the doomed request.\n let isBatchEndpointSupported = true;\n let hasLoggedBatchFallback = false;\n\n /**\n * Fetch each key of a batch with its own request. Used against backends\n * without the batch endpoint. A key missing on the remote only discards\n * itself, never its neighbours.\n */\n const requestDictionariesOneByOne = async (\n batchKeys: string[]\n ): Promise<DictionaryAPI[]> => {\n const results = await parallelize(\n batchKeys,\n async (dictionaryKey) => {\n try {\n const getDictionaryResult =\n await dictionary.getDictionary(dictionaryKey);\n\n return getDictionaryResult.data;\n } catch (_error) {\n return undefined;\n }\n },\n batchKeys.length\n );\n\n return results.filter(\n (distantDictionary): distantDictionary is DictionaryAPI =>\n distantDictionary !== undefined\n );\n };\n\n /**\n * Request one batch of dictionaries, retrying the whole request when it\n * fails for a transient reason - a batch carries several dictionaries, so\n * a network hiccup would otherwise discard all of them at once.\n */\n const requestBatch = retryManager(\n async (batchKeys: string[]): Promise<DictionaryAPI[]> => {\n if (isBatchEndpointSupported) {\n try {\n const getDictionariesResult =\n await dictionary.getDictionariesByKeys(batchKeys);\n\n return getDictionariesResult.data ?? [];\n } catch (error) {\n if (!isBatchEndpointUnsupported(error)) throw error;\n\n isBatchEndpointSupported = false;\n\n if (!hasLoggedBatchFallback) {\n hasLoggedBatchFallback = true;\n appLogger(\n 'This backend does not provide the batch dictionary endpoint - falling back to one request per dictionary.',\n { level: 'warn' }\n );\n }\n }\n }\n\n return await requestDictionariesOneByOne(batchKeys);\n },\n {\n maxRetry,\n delay: retryDelay,\n shouldRetry: isRetryableError,\n onError: ({ error, attempt }) =>\n appLogger(\n `Retrying distant dictionaries request (attempt ${attempt + 1}/${maxRetry}): ${error}`,\n { level: 'warn' }\n ),\n }\n );\n\n /**\n * Fetch one batch of dictionaries within a single request, and report the\n * resulting status of every key it contains.\n */\n const processBatch = async (\n batchKeys: string[]\n ): Promise<DictionaryAPI[]> => {\n onStatusUpdate?.(\n batchKeys.map((dictionaryKey) => ({\n dictionaryKey,\n type: 'remote',\n status: 'fetching',\n }))\n );\n\n try {\n const distantDictionaries = await requestBatch(batchKeys);\n\n const fetchedKeys = new Set(\n distantDictionaries.map(\n (distantDictionary: DictionaryAPI) => distantDictionary.key\n )\n );\n\n onStatusUpdate?.(\n batchKeys.map((dictionaryKey): DictionariesStatus =>\n fetchedKeys.has(dictionaryKey)\n ? {\n dictionaryKey,\n type: 'remote',\n status: 'fetched',\n }\n : {\n dictionaryKey,\n type: 'remote',\n status: 'error',\n error: `Dictionary ${dictionaryKey} not found on remote`,\n }\n )\n );\n\n return distantDictionaries;\n } catch (error) {\n onStatusUpdate?.(\n batchKeys.map((dictionaryKey) => ({\n dictionaryKey,\n type: 'remote',\n status: 'error',\n error: `Error fetching dictionary ${dictionaryKey}: ${error}`,\n }))\n );\n return [];\n }\n };\n\n const batchResults = await parallelize(\n batches,\n processBatch,\n parallelRequests\n );\n\n return batchResults.flat();\n } catch (_error) {\n appLogger(`${x} Failed to fetch distant dictionaries`, { level: 'error' });\n return [];\n }\n};\n"],"mappings":";;;;;;;;;;;;AAWA,MAAM,mCAAmC;;AAGzC,MAAM,4BAA4B;;AAGlC,MAAM,oBAAoB;;AAG1B,MAAM,sBAAsB;;AAG5B,MAAM,kDAAkC,IAAI,IAAI;CAAC;CAAK;CAAK;AAAG,CAAC;;;;;;AAO/D,MAAM,oBAAoB,UAA4B;CACpD,MAAM,SAAU,OAA+B;CAE/C,IAAI,OAAO,WAAW,UAAU,OAAO;CAEvC,IAAI,UAAU,KAAK,OAAO;CAE1B,OAAO,gCAAgC,IAAI,MAAM;AACnD;;;;;;;AAQA,MAAM,8BAA8B,UACjC,OAA+B,WAAW;;;;;;;;;;AAqC7C,MAAa,2BAA2B,OACtC,SACA,mBAC6B;CAC7B,MAAM,aAASA,wCAAiB;CAChC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MAAM,sBAAsB,MAAM,aAAa,SAAS;IAExD,MAAM,cAAc,IAAI,IACtB,oBAAoB,KACjB,sBAAqC,kBAAkB,GAC1D,CACF;IAEA,iBACE,UAAU,KAAK,kBACb,YAAY,IAAI,aAAa,IACzB;KACE;KACA,MAAM;KACN,QAAQ;IACV,IACA;KACE;KACA,MAAM;KACN,QAAQ;KACR,OAAO,cAAc,cAAc;IACrC,CACN,CACF;IAEA,OAAO;GACT,SAAS,OAAO;IACd,iBACE,UAAU,KAAK,mBAAmB;KAChC;KACA,MAAM;KACN,QAAQ;KACR,OAAO,6BAA6B,cAAc,IAAI;IACxD,EAAE,CACJ;IACA,OAAO,CAAC;GACV;EACF;EAQA,QAAO,UANoBD,oCACzB,SACA,cACA,gBACF,EAEmB,CAAC,KAAK;CAC3B,SAAS,QAAQ;EACf,UAAU,GAAGE,0BAAE,wCAAwC,EAAE,OAAO,QAAQ,CAAC;EACzE,OAAO,CAAC;CACV;AACF"}
|
|
@@ -8,9 +8,9 @@ const require_createType_createModuleAugmentation = require("./createType/create
|
|
|
8
8
|
const require_loadDictionaries_loadLocalDictionaries = require("./loadDictionaries/loadLocalDictionaries.cjs");
|
|
9
9
|
const require_utils_formatter = require("./utils/formatter.cjs");
|
|
10
10
|
let _intlayer_config_logger = require("@intlayer/config/logger");
|
|
11
|
-
let node_fs_promises = require("node:fs/promises");
|
|
12
|
-
let node_path = require("node:path");
|
|
13
11
|
let node_fs = require("node:fs");
|
|
12
|
+
let node_path = require("node:path");
|
|
13
|
+
let node_fs_promises = require("node:fs/promises");
|
|
14
14
|
|
|
15
15
|
// src/handleContentDeclarationFileChange.ts
|
|
16
16
|
/**
|
|
@@ -48,6 +48,7 @@ const DocumentationRouter = {
|
|
|
48
48
|
Default: "https://intlayer.org/doc/get-started",
|
|
49
49
|
LSP: "https://intlayer.org/doc/lsp",
|
|
50
50
|
ESLint: "https://intlayer.org/doc/eslint",
|
|
51
|
+
Prettier: "https://intlayer.org/doc/prettier",
|
|
51
52
|
NextIntl: "https://intlayer.org/doc/next-intl",
|
|
52
53
|
NextI18Next: "https://intlayer.org/doc/next-i18next",
|
|
53
54
|
ReactI18Next: "https://intlayer.org/doc/compatibility/react-i18next",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"documentationRouter.cjs","names":[],"sources":["../../../src/init/documentationRouter.ts"],"sourcesContent":["/**\n * Documentation URL Constants\n */\nexport const DocumentationRouter = {\n NextJS: 'https://intlayer.org/doc/environment/nextjs',\n NextJS_16: 'https://intlayer.org/doc/environment/nextjs',\n NextJS_15: 'https://intlayer.org/doc/environment/nextjs/15',\n NextJS_14: 'https://intlayer.org/doc/environment/nextjs/14',\n NextJS_PageRouter:\n 'https://intlayer.org/doc/environment/nextjs/next-with-page-router',\n CRA: 'https://intlayer.org/doc/environment/create-react-app',\n Astro: 'https://intlayer.org/doc/environment/astro',\n Astro_Lit: 'https://intlayer.org/doc/environment/astro/lit',\n Astro_Preact: 'https://intlayer.org/doc/environment/astro/preact',\n Astro_React: 'https://intlayer.org/doc/environment/astro/react',\n Astro_Solid: 'https://intlayer.org/doc/environment/astro/solid',\n Astro_Svelte: 'https://intlayer.org/doc/environment/astro/svelte',\n Astro_Vue: 'https://intlayer.org/doc/environment/astro/vue',\n ViteAndReact: 'https://intlayer.org/doc/environment/vite-and-react',\n ViteAndReact_ReactRouterV7:\n 'https://intlayer.org/doc/environment/vite-and-react/react-router-v7',\n ViteAndVue: 'https://intlayer.org/doc/environment/vite-and-vue',\n ViteAndSolid: 'https://intlayer.org/doc/environment/vite-and-solid',\n ViteAndSvelte: 'https://intlayer.org/doc/environment/vite-and-svelte',\n ViteAndPreact: 'https://intlayer.org/doc/environment/vite-and-preact',\n ViteAndLit: 'https://intlayer.org/doc/environment/vite-and-lit',\n ViteAndVanilla: 'https://intlayer.org/doc/environment/vite-and-vanilla',\n Vanilla: 'https://intlayer.org/doc/environment/vanilla',\n TanStackRouter: 'https://intlayer.org/doc/environment/tanstack-start',\n TanStackRouterAndSolid:\n 'https://intlayer.org/doc/environment/tanstack-start/solid',\n SolidStart: 'https://intlayer.org/doc/environment/solid-start',\n Analog: 'https://intlayer.org/doc/environment/analog',\n Remix: 'https://intlayer.org/doc/environment/remix-3',\n NuxtAndVue: 'https://intlayer.org/doc/environment/nuxt-and-vue',\n Angular: 'https://intlayer.org/doc/environment/angular',\n Angular_19: 'https://intlayer.org/doc/environment/angular/19',\n SvelteKit: 'https://intlayer.org/doc/environment/sveltekit',\n ReactNativeAndExpo:\n 'https://intlayer.org/doc/environment/react-native-and-expo',\n Lynx: 'https://intlayer.org/doc/environment/lynx-and-react',\n HTMX: 'https://intlayer.org/doc/environment/htmx',\n Storybook: 'https://intlayer.org/doc/storybook',\n Express: 'https://intlayer.org/doc/environment/express',\n NestJS: 'https://intlayer.org/doc/environment/nest',\n Fastify: 'https://intlayer.org/doc/environment/fastify',\n Hono: 'https://intlayer.org/doc/environment/hono',\n AdonisJS: 'https://intlayer.org/doc/environment/adonisjs',\n Elysia: 'https://intlayer.org/doc/environment/elysia',\n Default: 'https://intlayer.org/doc/get-started',\n\n // Intlayer Language Server (Go-to-Definition from getter keys to .content files)\n LSP: 'https://intlayer.org/doc/lsp',\n\n // Lint rules for hardcoded text and non-optimizable dynamic calls\n ESLint: 'https://intlayer.org/doc/eslint',\n\n // Competitor / Compat libs\n NextIntl: 'https://intlayer.org/doc/next-intl',\n NextI18Next: 'https://intlayer.org/doc/next-i18next',\n ReactI18Next: 'https://intlayer.org/doc/compatibility/react-i18next',\n ReactIntl: 'https://intlayer.org/doc/compatibility/react-intl',\n VueI18n: 'https://intlayer.org/doc/compatibility/vue-i18n',\n NuxtI18n: 'https://intlayer.org/doc/compatibility/nuxtjs-i18n',\n I18next: 'https://intlayer.org/doc/compatibility/i18next',\n};\n\nexport type DocumentationRouterType = typeof DocumentationRouter;\n\n/**\n * Helper: Detects the environment and returns the doc URL\n */\nexport const getDocumentationUrl = (packageJson: any): string => {\n const deps = {\n ...packageJson?.dependencies,\n ...packageJson?.devDependencies,\n };\n\n /**\n * Helper to check if a version string matches a specific major version\n * Matches: \"15\", \"^15.0.0\", \"~15.2\", \"15.0.0-beta\"\n */\n const isVersion = (versionString: string, major: number): boolean => {\n if (!versionString || typeof versionString !== 'string') return false;\n const regex = new RegExp(`^[\\\\^~]?${major}(?:\\\\.|$)`);\n return regex.test(versionString);\n };\n\n // Mobile / Cross-platform\n if (deps['@lynx-js/react'] || deps['@lynx-js/core']) {\n return DocumentationRouter.Lynx;\n }\n if (deps['react-native'] || deps.expo) {\n return DocumentationRouter.ReactNativeAndExpo;\n }\n\n // Meta-frameworks (Next, Nuxt, Astro, SvelteKit)\n if (deps.next) {\n const version = deps.next;\n\n if (isVersion(version, 14)) {\n return DocumentationRouter.NextJS_14;\n }\n\n if (isVersion(version, 15)) {\n return DocumentationRouter.NextJS_15;\n }\n\n return DocumentationRouter.NextJS;\n }\n\n if (deps.nuxt) return DocumentationRouter.NuxtAndVue;\n\n if (deps.astro) {\n if (deps['@astrojs/react'] || deps.react)\n return DocumentationRouter.Astro_React;\n if (deps['@astrojs/vue'] || deps.vue) return DocumentationRouter.Astro_Vue;\n if (deps['@astrojs/svelte'] || deps.svelte)\n return DocumentationRouter.Astro_Svelte;\n if (deps['@astrojs/solid-js'] || deps['solid-js'])\n return DocumentationRouter.Astro_Solid;\n if (deps['@astrojs/preact'] || deps.preact)\n return DocumentationRouter.Astro_Preact;\n if (deps['@astrojs/lit'] || deps.lit) return DocumentationRouter.Astro_Lit;\n\n return DocumentationRouter.Astro;\n }\n\n if (deps['@sveltejs/kit']) return DocumentationRouter.SvelteKit;\n if (deps['@analogjs/platform']) return DocumentationRouter.Analog;\n if (deps['@solidjs/start']) return DocumentationRouter.SolidStart;\n if (deps.remix || deps['remix-intlayer']) return DocumentationRouter.Remix;\n\n // Routers (TanStack & React Router v7)\n if (deps['@tanstack/react-router']) {\n return DocumentationRouter.TanStackRouter;\n }\n if (deps['@tanstack/solid-router']) {\n return DocumentationRouter.TanStackRouterAndSolid;\n }\n if (deps['@tanstack/start']) {\n if (deps['solid-js'] || deps['@tanstack/solid-router']) {\n return DocumentationRouter.TanStackRouterAndSolid;\n }\n return DocumentationRouter.TanStackRouter;\n }\n\n // Check for React Router v7 (the guide covers both config and FS routes)\n const reactRouterVersion = deps['react-router'];\n if (\n typeof reactRouterVersion === 'string' &&\n (deps['@react-router/fs-routes'] || isVersion(reactRouterVersion, 7))\n ) {\n return DocumentationRouter.ViteAndReact_ReactRouterV7;\n }\n\n // Vite Ecosystem (General)\n if (deps.vite) {\n if (deps.vue) return DocumentationRouter.ViteAndVue;\n if (deps['solid-js']) return DocumentationRouter.ViteAndSolid;\n if (deps.svelte) return DocumentationRouter.ViteAndSvelte;\n if (deps.preact) return DocumentationRouter.ViteAndPreact;\n if (deps.lit) return DocumentationRouter.ViteAndLit;\n if (deps['vanilla-intlayer']) return DocumentationRouter.ViteAndVanilla;\n\n // Default to React if Vite is present but specific other frameworks aren't found\n return DocumentationRouter.ViteAndReact;\n }\n\n // Other Web Frameworks\n if (deps['react-scripts']) return DocumentationRouter.CRA;\n if (deps['@angular/core']) {\n const version = deps['@angular/core'];\n if (isVersion(version, 19)) {\n return DocumentationRouter.Angular_19;\n }\n return DocumentationRouter.Angular;\n }\n if (deps.lit) return DocumentationRouter.ViteAndLit;\n if (deps['vanilla-intlayer']) return DocumentationRouter.Vanilla;\n if (deps.htmx || deps['htmx.org']) return DocumentationRouter.HTMX;\n if (deps.storybook || deps['@storybook/react'] || deps['@storybook/vue3'])\n return DocumentationRouter.Storybook;\n\n // Backend\n // NestJS first: it runs on top of Express (or Fastify), so both dependencies\n // are present and the more specific one has to win.\n if (deps['@nestjs/core']) return DocumentationRouter.NestJS;\n if (deps['@adonisjs/core']) return DocumentationRouter.AdonisJS;\n if (deps.elysia) return DocumentationRouter.Elysia;\n if (deps.hono) return DocumentationRouter.Hono;\n if (deps.express) return DocumentationRouter.Express;\n if (deps.fastify) return DocumentationRouter.Fastify;\n\n // Competitor Libs (Migration Guides)\n // We check these last as specific environment setup is usually higher priority,\n // but if no specific framework logic matched (or as a fallback), we guide to migration.\n if (deps['next-intl']) return DocumentationRouter.NextIntl;\n if (deps['react-i18next'] || deps.i18next)\n return DocumentationRouter.ReactI18Next;\n if (deps['react-intl']) return DocumentationRouter.ReactIntl;\n if (deps['next-i18next']) return DocumentationRouter.NextI18Next;\n if (deps['vue-i18n']) return DocumentationRouter.VueI18n;\n\n return DocumentationRouter.Default;\n};\n"],"mappings":";;;;;AAGA,MAAa,sBAAsB;CACjC,QAAQ;CACR,WAAW;CACX,WAAW;CACX,WAAW;CACX,mBACE;CACF,KAAK;CACL,OAAO;CACP,WAAW;CACX,cAAc;CACd,aAAa;CACb,aAAa;CACb,cAAc;CACd,WAAW;CACX,cAAc;CACd,4BACE;CACF,YAAY;CACZ,cAAc;CACd,eAAe;CACf,eAAe;CACf,YAAY;CACZ,gBAAgB;CAChB,SAAS;CACT,gBAAgB;CAChB,wBACE;CACF,YAAY;CACZ,QAAQ;CACR,OAAO;CACP,YAAY;CACZ,SAAS;CACT,YAAY;CACZ,WAAW;CACX,oBACE;CACF,MAAM;CACN,MAAM;CACN,WAAW;CACX,SAAS;CACT,QAAQ;CACR,SAAS;CACT,MAAM;CACN,UAAU;CACV,QAAQ;CACR,SAAS;CAGT,KAAK;CAGL,QAAQ;CAGR,UAAU;CACV,aAAa;CACb,cAAc;CACd,WAAW;CACX,SAAS;CACT,UAAU;CACV,SAAS;AACX;;;;AAOA,MAAa,uBAAuB,gBAA6B;CAC/D,MAAM,OAAO;EACX,GAAG,aAAa;EAChB,GAAG,aAAa;CAClB;;;;;CAMA,MAAM,aAAa,eAAuB,UAA2B;EACnE,IAAI,CAAC,iBAAiB,OAAO,kBAAkB,UAAU,OAAO;EAEhE,OAAO,IADW,OAAO,WAAW,MAAM,UAC/B,CAAC,CAAC,KAAK,aAAa;CACjC;CAGA,IAAI,KAAK,qBAAqB,KAAK,kBACjC,OAAO,oBAAoB;CA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jD,IAAI,KAAK,QAAQ,OAAO,oBAAoB;EAC5C,IAAI,KAAK,QAAQ,OAAO,oBAAoB;EAC5C,IAAI,KAAK,KAAK,OAAO,oBAAoB;EACzC,IAAI,KAAK,qBAAqB,OAAO,oBAAoB;EAGzD,OAAO,oBAAoB;CAC7B;CAGA,IAAI,KAAK,kBAAkB,OAAO,oBAAoB;CACtD,IAAI,KAAK,kBAAkB;EACzB,MAAM,UAAU,KAAK;EACrB,IAAI,UAAU,SAAS,EAAE,GACvB,OAAO,oBAAoB;EAE7B,OAAO,oBAAoB;CAC7B;CACA,IAAI,KAAK,KAAK,OAAO,oBAAoB;CACzC,IAAI,KAAK,qBAAqB,OAAO,oBAAoB;CACzD,IAAI,KAAK,QAAQ,KAAK,aAAa,OAAO,oBAAoB;CAC9D,IAAI,KAAK,aAAa,KAAK,uBAAuB,KAAK,oBACrD,OAAO,oBAAoB;CAK7B,IAAI,KAAK,iBAAiB,OAAO,oBAAoB;CACrD,IAAI,KAAK,mBAAmB,OAAO,oBAAoB;CACvD,IAAI,KAAK,QAAQ,OAAO,oBAAoB;CAC5C,IAAI,KAAK,MAAM,OAAO,oBAAoB;CAC1C,IAAI,KAAK,SAAS,OAAO,oBAAoB;CAC7C,IAAI,KAAK,SAAS,OAAO,oBAAoB;CAK7C,IAAI,KAAK,cAAc,OAAO,oBAAoB;CAClD,IAAI,KAAK,oBAAoB,KAAK,SAChC,OAAO,oBAAoB;CAC7B,IAAI,KAAK,eAAe,OAAO,oBAAoB;CACnD,IAAI,KAAK,iBAAiB,OAAO,oBAAoB;CACrD,IAAI,KAAK,aAAa,OAAO,oBAAoB;CAEjD,OAAO,oBAAoB;AAC7B"}
|
|
1
|
+
{"version":3,"file":"documentationRouter.cjs","names":[],"sources":["../../../src/init/documentationRouter.ts"],"sourcesContent":["/**\n * Documentation URL Constants\n */\nexport const DocumentationRouter = {\n NextJS: 'https://intlayer.org/doc/environment/nextjs',\n NextJS_16: 'https://intlayer.org/doc/environment/nextjs',\n NextJS_15: 'https://intlayer.org/doc/environment/nextjs/15',\n NextJS_14: 'https://intlayer.org/doc/environment/nextjs/14',\n NextJS_PageRouter:\n 'https://intlayer.org/doc/environment/nextjs/next-with-page-router',\n CRA: 'https://intlayer.org/doc/environment/create-react-app',\n Astro: 'https://intlayer.org/doc/environment/astro',\n Astro_Lit: 'https://intlayer.org/doc/environment/astro/lit',\n Astro_Preact: 'https://intlayer.org/doc/environment/astro/preact',\n Astro_React: 'https://intlayer.org/doc/environment/astro/react',\n Astro_Solid: 'https://intlayer.org/doc/environment/astro/solid',\n Astro_Svelte: 'https://intlayer.org/doc/environment/astro/svelte',\n Astro_Vue: 'https://intlayer.org/doc/environment/astro/vue',\n ViteAndReact: 'https://intlayer.org/doc/environment/vite-and-react',\n ViteAndReact_ReactRouterV7:\n 'https://intlayer.org/doc/environment/vite-and-react/react-router-v7',\n ViteAndVue: 'https://intlayer.org/doc/environment/vite-and-vue',\n ViteAndSolid: 'https://intlayer.org/doc/environment/vite-and-solid',\n ViteAndSvelte: 'https://intlayer.org/doc/environment/vite-and-svelte',\n ViteAndPreact: 'https://intlayer.org/doc/environment/vite-and-preact',\n ViteAndLit: 'https://intlayer.org/doc/environment/vite-and-lit',\n ViteAndVanilla: 'https://intlayer.org/doc/environment/vite-and-vanilla',\n Vanilla: 'https://intlayer.org/doc/environment/vanilla',\n TanStackRouter: 'https://intlayer.org/doc/environment/tanstack-start',\n TanStackRouterAndSolid:\n 'https://intlayer.org/doc/environment/tanstack-start/solid',\n SolidStart: 'https://intlayer.org/doc/environment/solid-start',\n Analog: 'https://intlayer.org/doc/environment/analog',\n Remix: 'https://intlayer.org/doc/environment/remix-3',\n NuxtAndVue: 'https://intlayer.org/doc/environment/nuxt-and-vue',\n Angular: 'https://intlayer.org/doc/environment/angular',\n Angular_19: 'https://intlayer.org/doc/environment/angular/19',\n SvelteKit: 'https://intlayer.org/doc/environment/sveltekit',\n ReactNativeAndExpo:\n 'https://intlayer.org/doc/environment/react-native-and-expo',\n Lynx: 'https://intlayer.org/doc/environment/lynx-and-react',\n HTMX: 'https://intlayer.org/doc/environment/htmx',\n Storybook: 'https://intlayer.org/doc/storybook',\n Express: 'https://intlayer.org/doc/environment/express',\n NestJS: 'https://intlayer.org/doc/environment/nest',\n Fastify: 'https://intlayer.org/doc/environment/fastify',\n Hono: 'https://intlayer.org/doc/environment/hono',\n AdonisJS: 'https://intlayer.org/doc/environment/adonisjs',\n Elysia: 'https://intlayer.org/doc/environment/elysia',\n Default: 'https://intlayer.org/doc/get-started',\n\n // Intlayer Language Server (Go-to-Definition from getter keys to .content files)\n LSP: 'https://intlayer.org/doc/lsp',\n\n // Lint rules for hardcoded text and non-optimizable dynamic calls\n ESLint: 'https://intlayer.org/doc/eslint',\n Prettier: 'https://intlayer.org/doc/prettier',\n\n // Competitor / Compat libs\n NextIntl: 'https://intlayer.org/doc/next-intl',\n NextI18Next: 'https://intlayer.org/doc/next-i18next',\n ReactI18Next: 'https://intlayer.org/doc/compatibility/react-i18next',\n ReactIntl: 'https://intlayer.org/doc/compatibility/react-intl',\n VueI18n: 'https://intlayer.org/doc/compatibility/vue-i18n',\n NuxtI18n: 'https://intlayer.org/doc/compatibility/nuxtjs-i18n',\n I18next: 'https://intlayer.org/doc/compatibility/i18next',\n};\n\nexport type DocumentationRouterType = typeof DocumentationRouter;\n\n/**\n * Helper: Detects the environment and returns the doc URL\n */\nexport const getDocumentationUrl = (packageJson: any): string => {\n const deps = {\n ...packageJson?.dependencies,\n ...packageJson?.devDependencies,\n };\n\n /**\n * Helper to check if a version string matches a specific major version\n * Matches: \"15\", \"^15.0.0\", \"~15.2\", \"15.0.0-beta\"\n */\n const isVersion = (versionString: string, major: number): boolean => {\n if (!versionString || typeof versionString !== 'string') return false;\n const regex = new RegExp(`^[\\\\^~]?${major}(?:\\\\.|$)`);\n return regex.test(versionString);\n };\n\n // Mobile / Cross-platform\n if (deps['@lynx-js/react'] || deps['@lynx-js/core']) {\n return DocumentationRouter.Lynx;\n }\n if (deps['react-native'] || deps.expo) {\n return DocumentationRouter.ReactNativeAndExpo;\n }\n\n // Meta-frameworks (Next, Nuxt, Astro, SvelteKit)\n if (deps.next) {\n const version = deps.next;\n\n if (isVersion(version, 14)) {\n return DocumentationRouter.NextJS_14;\n }\n\n if (isVersion(version, 15)) {\n return DocumentationRouter.NextJS_15;\n }\n\n return DocumentationRouter.NextJS;\n }\n\n if (deps.nuxt) return DocumentationRouter.NuxtAndVue;\n\n if (deps.astro) {\n if (deps['@astrojs/react'] || deps.react)\n return DocumentationRouter.Astro_React;\n if (deps['@astrojs/vue'] || deps.vue) return DocumentationRouter.Astro_Vue;\n if (deps['@astrojs/svelte'] || deps.svelte)\n return DocumentationRouter.Astro_Svelte;\n if (deps['@astrojs/solid-js'] || deps['solid-js'])\n return DocumentationRouter.Astro_Solid;\n if (deps['@astrojs/preact'] || deps.preact)\n return DocumentationRouter.Astro_Preact;\n if (deps['@astrojs/lit'] || deps.lit) return DocumentationRouter.Astro_Lit;\n\n return DocumentationRouter.Astro;\n }\n\n if (deps['@sveltejs/kit']) return DocumentationRouter.SvelteKit;\n if (deps['@analogjs/platform']) return DocumentationRouter.Analog;\n if (deps['@solidjs/start']) return DocumentationRouter.SolidStart;\n if (deps.remix || deps['remix-intlayer']) return DocumentationRouter.Remix;\n\n // Routers (TanStack & React Router v7)\n if (deps['@tanstack/react-router']) {\n return DocumentationRouter.TanStackRouter;\n }\n if (deps['@tanstack/solid-router']) {\n return DocumentationRouter.TanStackRouterAndSolid;\n }\n if (deps['@tanstack/start']) {\n if (deps['solid-js'] || deps['@tanstack/solid-router']) {\n return DocumentationRouter.TanStackRouterAndSolid;\n }\n return DocumentationRouter.TanStackRouter;\n }\n\n // Check for React Router v7 (the guide covers both config and FS routes)\n const reactRouterVersion = deps['react-router'];\n if (\n typeof reactRouterVersion === 'string' &&\n (deps['@react-router/fs-routes'] || isVersion(reactRouterVersion, 7))\n ) {\n return DocumentationRouter.ViteAndReact_ReactRouterV7;\n }\n\n // Vite Ecosystem (General)\n if (deps.vite) {\n if (deps.vue) return DocumentationRouter.ViteAndVue;\n if (deps['solid-js']) return DocumentationRouter.ViteAndSolid;\n if (deps.svelte) return DocumentationRouter.ViteAndSvelte;\n if (deps.preact) return DocumentationRouter.ViteAndPreact;\n if (deps.lit) return DocumentationRouter.ViteAndLit;\n if (deps['vanilla-intlayer']) return DocumentationRouter.ViteAndVanilla;\n\n // Default to React if Vite is present but specific other frameworks aren't found\n return DocumentationRouter.ViteAndReact;\n }\n\n // Other Web Frameworks\n if (deps['react-scripts']) return DocumentationRouter.CRA;\n if (deps['@angular/core']) {\n const version = deps['@angular/core'];\n if (isVersion(version, 19)) {\n return DocumentationRouter.Angular_19;\n }\n return DocumentationRouter.Angular;\n }\n if (deps.lit) return DocumentationRouter.ViteAndLit;\n if (deps['vanilla-intlayer']) return DocumentationRouter.Vanilla;\n if (deps.htmx || deps['htmx.org']) return DocumentationRouter.HTMX;\n if (deps.storybook || deps['@storybook/react'] || deps['@storybook/vue3'])\n return DocumentationRouter.Storybook;\n\n // Backend\n // NestJS first: it runs on top of Express (or Fastify), so both dependencies\n // are present and the more specific one has to win.\n if (deps['@nestjs/core']) return DocumentationRouter.NestJS;\n if (deps['@adonisjs/core']) return DocumentationRouter.AdonisJS;\n if (deps.elysia) return DocumentationRouter.Elysia;\n if (deps.hono) return DocumentationRouter.Hono;\n if (deps.express) return DocumentationRouter.Express;\n if (deps.fastify) return DocumentationRouter.Fastify;\n\n // Competitor Libs (Migration Guides)\n // We check these last as specific environment setup is usually higher priority,\n // but if no specific framework logic matched (or as a fallback), we guide to migration.\n if (deps['next-intl']) return DocumentationRouter.NextIntl;\n if (deps['react-i18next'] || deps.i18next)\n return DocumentationRouter.ReactI18Next;\n if (deps['react-intl']) return DocumentationRouter.ReactIntl;\n if (deps['next-i18next']) return DocumentationRouter.NextI18Next;\n if (deps['vue-i18n']) return DocumentationRouter.VueI18n;\n\n return DocumentationRouter.Default;\n};\n"],"mappings":";;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EAAE,GACvB,OAAO,oBAAoB;EAE7B,OAAO,oBAAoB;CAC7B;CACA,IAAI,KAAK,KAAK,OAAO,oBAAoB;CACzC,IAAI,KAAK,qBAAqB,OAAO,oBAAoB;CACzD,IAAI,KAAK,QAAQ,KAAK,aAAa,OAAO,oBAAoB;CAC9D,IAAI,KAAK,aAAa,KAAK,uBAAuB,KAAK,oBACrD,OAAO,oBAAoB;CAK7B,IAAI,KAAK,iBAAiB,OAAO,oBAAoB;CACrD,IAAI,KAAK,mBAAmB,OAAO,oBAAoB;CACvD,IAAI,KAAK,QAAQ,OAAO,oBAAoB;CAC5C,IAAI,KAAK,MAAM,OAAO,oBAAoB;CAC1C,IAAI,KAAK,SAAS,OAAO,oBAAoB;CAC7C,IAAI,KAAK,SAAS,OAAO,oBAAoB;CAK7C,IAAI,KAAK,cAAc,OAAO,oBAAoB;CAClD,IAAI,KAAK,oBAAoB,KAAK,SAChC,OAAO,oBAAoB;CAC7B,IAAI,KAAK,eAAe,OAAO,oBAAoB;CACnD,IAAI,KAAK,iBAAiB,OAAO,oBAAoB;CACrD,IAAI,KAAK,aAAa,OAAO,oBAAoB;CAEjD,OAAO,oBAAoB;AAC7B"}
|
|
@@ -8,8 +8,8 @@ const require_init_frameworkSetup_nextAppRouter_restructure = require("./restruc
|
|
|
8
8
|
const require_init_frameworkSetup_nextAppRouter_templates = require("./templates.cjs");
|
|
9
9
|
const require_init_frameworkSetup_nextAppRouter_transforms = require("./transforms.cjs");
|
|
10
10
|
let _intlayer_config_logger = require("@intlayer/config/logger");
|
|
11
|
-
let node_fs_promises = require("node:fs/promises");
|
|
12
11
|
let node_path = require("node:path");
|
|
12
|
+
let node_fs_promises = require("node:fs/promises");
|
|
13
13
|
let _intlayer_config_colors = require("@intlayer/config/colors");
|
|
14
14
|
_intlayer_config_colors = require_runtime.__toESM(_intlayer_config_colors);
|
|
15
15
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
2
|
const require_runtime = require("../../../_virtual/_rolldown/runtime.cjs");
|
|
3
3
|
const require_utils_babelParser = require("../../../utils/babelParser.cjs");
|
|
4
|
-
let node_fs_promises = require("node:fs/promises");
|
|
5
4
|
let node_path = require("node:path");
|
|
5
|
+
let node_fs_promises = require("node:fs/promises");
|
|
6
6
|
let fast_glob = require("fast-glob");
|
|
7
7
|
fast_glob = require_runtime.__toESM(fast_glob);
|
|
8
8
|
let recast = require("recast");
|
|
@@ -8,8 +8,8 @@ const require_init_frameworkSetup_tanstackStart_restructure = require("./restruc
|
|
|
8
8
|
const require_init_frameworkSetup_tanstackStart_templates = require("./templates.cjs");
|
|
9
9
|
const require_init_frameworkSetup_tanstackStart_transforms = require("./transforms.cjs");
|
|
10
10
|
let _intlayer_config_logger = require("@intlayer/config/logger");
|
|
11
|
-
let node_fs_promises = require("node:fs/promises");
|
|
12
11
|
let node_path = require("node:path");
|
|
12
|
+
let node_fs_promises = require("node:fs/promises");
|
|
13
13
|
let _intlayer_config_colors = require("@intlayer/config/colors");
|
|
14
14
|
_intlayer_config_colors = require_runtime.__toESM(_intlayer_config_colors);
|
|
15
15
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
2
|
const require_runtime = require("../../../_virtual/_rolldown/runtime.cjs");
|
|
3
3
|
const require_init_frameworkSetup_nextAppRouter_restructure = require("../nextAppRouter/restructure.cjs");
|
|
4
|
-
let node_fs_promises = require("node:fs/promises");
|
|
5
4
|
let node_path = require("node:path");
|
|
5
|
+
let node_fs_promises = require("node:fs/promises");
|
|
6
6
|
let fast_glob = require("fast-glob");
|
|
7
7
|
fast_glob = require_runtime.__toESM(fast_glob);
|
|
8
8
|
|