@intlayer/cli 9.7.0 → 9.7.2
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/IntlayerEventListener.cjs +1 -2
- package/dist/cjs/_virtual/_rolldown/runtime.cjs +1 -2
- package/dist/cjs/_virtual/_utils_asset.cjs +1 -2
- package/dist/cjs/auth/login.cjs +8 -9
- package/dist/cjs/auth/sessionToken.cjs +1 -2
- package/dist/cjs/auth/setupRepository.cjs +6 -7
- package/dist/cjs/build.cjs +2 -3
- package/dist/cjs/bundle.cjs +1 -2
- package/dist/cjs/bundle.cjs.map +1 -1
- package/dist/cjs/ci.cjs +2 -3
- package/dist/cjs/cli.cjs +8 -5
- package/dist/cjs/cli.cjs.map +1 -1
- package/dist/cjs/config.cjs +2 -3
- package/dist/cjs/editor.cjs +3 -4
- package/dist/cjs/extract.cjs +6 -7
- package/dist/cjs/fill/deepMergeContent.cjs +1 -2
- package/dist/cjs/fill/extractTranslatableContent.cjs +1 -2
- package/dist/cjs/fill/fill.cjs +9 -10
- package/dist/cjs/fill/formatAutoFilledFilePath.cjs +1 -2
- package/dist/cjs/fill/formatFillData.cjs +2 -3
- package/dist/cjs/fill/getAvailableLocalesInDictionary.cjs +1 -2
- package/dist/cjs/fill/getFilterMissingContentPerLocale.cjs +1 -2
- package/dist/cjs/fill/index.cjs +2 -2
- package/dist/cjs/fill/listTranslationsTasks.cjs +4 -5
- package/dist/cjs/fill/translateDictionary.cjs +7 -8
- package/dist/cjs/fill/writeFill.cjs +4 -5
- package/dist/cjs/getTargetDictionary.cjs +2 -3
- package/dist/cjs/index.cjs +28 -27
- package/dist/cjs/init.cjs +30 -13
- package/dist/cjs/init.cjs.map +1 -1
- package/dist/cjs/initChromeExtension.cjs +5 -6
- package/dist/cjs/initInfra.cjs +4 -5
- package/dist/cjs/initMCP.cjs +6 -7
- package/dist/cjs/initSkills.cjs +6 -7
- package/dist/cjs/listContentDeclaration.cjs +3 -4
- package/dist/cjs/listProjects.cjs +2 -3
- package/dist/cjs/liveSync.cjs +7 -8
- package/dist/cjs/loadPrompts.cjs +1 -2
- package/dist/cjs/pull.cjs +20 -13
- package/dist/cjs/pull.cjs.map +1 -1
- package/dist/cjs/push/pullLog.cjs +2 -3
- package/dist/cjs/push/push.cjs +12 -12
- package/dist/cjs/push/push.cjs.map +1 -1
- package/dist/cjs/pushConfig.cjs +4 -5
- package/dist/cjs/pushLog.cjs +2 -3
- package/dist/cjs/reviewDoc/reviewDoc.cjs +14 -14
- package/dist/cjs/reviewDoc/reviewDoc.cjs.map +1 -1
- package/dist/cjs/reviewDoc/reviewDocBlockAware.cjs +9 -10
- package/dist/cjs/reviewDoc/reviewDocBlockAware.cjs.map +1 -1
- package/dist/cjs/reviewDoc/reviewDocLog.cjs +2 -3
- package/dist/cjs/reviewDoc/reviewDocProgress.cjs +2 -3
- package/dist/cjs/reviewDoc/reviewDocSynthesis.cjs +2 -3
- package/dist/cjs/scan.cjs +2 -3
- package/dist/cjs/searchDoc.cjs +2 -3
- package/dist/cjs/test/index.cjs +2 -2
- package/dist/cjs/test/listMissingTranslations.cjs +2 -3
- package/dist/cjs/test/test.cjs +4 -5
- package/dist/cjs/translateDoc/index.cjs +3 -3
- package/dist/cjs/translateDoc/translateDoc.cjs +10 -11
- package/dist/cjs/translateDoc/translateDoc.cjs.map +1 -1
- package/dist/cjs/translateDoc/translateFile.cjs +10 -11
- package/dist/cjs/translateDoc/translateFile.cjs.map +1 -1
- package/dist/cjs/translateDoc/validation.cjs +1 -2
- package/dist/cjs/upgrade.cjs +3 -4
- package/dist/cjs/utils/calculateChunks.cjs +1 -2
- package/dist/cjs/utils/checkAccess.cjs +6 -7
- package/dist/cjs/utils/checkConfigConsistency.cjs +1 -2
- package/dist/cjs/utils/checkFileModifiedRange.cjs +3 -4
- package/dist/cjs/utils/checkLastUpdateTime.cjs +1 -2
- package/dist/cjs/utils/chunkInference.cjs +2 -3
- package/dist/cjs/utils/detectGitRepository.cjs +1 -2
- package/dist/cjs/utils/fixChunkStartEndChars.cjs +1 -2
- package/dist/cjs/utils/formatLineRanges.cjs +1 -2
- package/dist/cjs/utils/formatTimeDiff.cjs +1 -2
- package/dist/cjs/utils/getIsFileUpdatedRecently.cjs +1 -2
- package/dist/cjs/utils/getOutputFilePath.cjs +1 -2
- package/dist/cjs/utils/getParentPackageJSON.cjs +1 -2
- package/dist/cjs/utils/isInteractiveTerminal.cjs +1 -2
- package/dist/cjs/utils/listSpecialChars.cjs +1 -2
- package/dist/cjs/utils/mapChunksBetweenFiles.cjs +2 -3
- package/dist/cjs/utils/openBrowser.cjs +1 -2
- package/dist/cjs/utils/parseChoice.cjs +1 -2
- package/dist/cjs/utils/reorderParagraphs.cjs +2 -3
- package/dist/cjs/utils/selectCmsEnvironment.cjs +2 -3
- package/dist/cjs/utils/setupAI.cjs +3 -4
- package/dist/cjs/watch.cjs +2 -3
- package/dist/esm/IntlayerEventListener.mjs +1 -2
- package/dist/esm/_virtual/_rolldown/runtime.mjs +1 -2
- package/dist/esm/_virtual/_utils_asset.mjs +1 -2
- package/dist/esm/auth/login.mjs +4 -5
- package/dist/esm/auth/sessionToken.mjs +1 -2
- package/dist/esm/auth/setupRepository.mjs +3 -4
- package/dist/esm/build.mjs +2 -3
- package/dist/esm/bundle.mjs +1 -2
- package/dist/esm/bundle.mjs.map +1 -1
- package/dist/esm/ci.mjs +2 -3
- package/dist/esm/cli.mjs +7 -4
- package/dist/esm/cli.mjs.map +1 -1
- package/dist/esm/config.mjs +2 -3
- package/dist/esm/editor.mjs +2 -3
- package/dist/esm/extract.mjs +6 -7
- package/dist/esm/extract.mjs.map +1 -1
- package/dist/esm/fill/deepMergeContent.mjs +1 -2
- package/dist/esm/fill/extractTranslatableContent.mjs +1 -2
- package/dist/esm/fill/fill.mjs +5 -6
- package/dist/esm/fill/fill.mjs.map +1 -1
- package/dist/esm/fill/formatAutoFilledFilePath.mjs +1 -2
- package/dist/esm/fill/formatFillData.mjs +1 -2
- package/dist/esm/fill/getAvailableLocalesInDictionary.mjs +1 -2
- package/dist/esm/fill/getFilterMissingContentPerLocale.mjs +1 -2
- package/dist/esm/fill/index.mjs +1 -1
- package/dist/esm/fill/listTranslationsTasks.mjs +2 -3
- package/dist/esm/fill/translateDictionary.mjs +3 -4
- package/dist/esm/fill/writeFill.mjs +2 -3
- package/dist/esm/getTargetDictionary.mjs +2 -3
- package/dist/esm/index.mjs +14 -14
- package/dist/esm/init.mjs +24 -8
- package/dist/esm/init.mjs.map +1 -1
- package/dist/esm/initChromeExtension.mjs +2 -3
- package/dist/esm/initInfra.mjs +2 -3
- package/dist/esm/initMCP.mjs +3 -4
- package/dist/esm/initSkills.mjs +2 -3
- package/dist/esm/listContentDeclaration.mjs +3 -4
- package/dist/esm/listProjects.mjs +2 -3
- package/dist/esm/liveSync.mjs +4 -5
- package/dist/esm/loadPrompts.mjs +1 -2
- package/dist/esm/pull.mjs +16 -9
- package/dist/esm/pull.mjs.map +1 -1
- package/dist/esm/push/pullLog.mjs +1 -2
- package/dist/esm/push/push.mjs +9 -9
- package/dist/esm/push/push.mjs.map +1 -1
- package/dist/esm/pushConfig.mjs +2 -3
- package/dist/esm/pushLog.mjs +1 -2
- package/dist/esm/reviewDoc/reviewDoc.mjs +6 -6
- package/dist/esm/reviewDoc/reviewDoc.mjs.map +1 -1
- package/dist/esm/reviewDoc/reviewDocBlockAware.mjs +4 -5
- package/dist/esm/reviewDoc/reviewDocBlockAware.mjs.map +1 -1
- package/dist/esm/reviewDoc/reviewDocLog.mjs +2 -3
- package/dist/esm/reviewDoc/reviewDocProgress.mjs +1 -2
- package/dist/esm/reviewDoc/reviewDocSynthesis.mjs +1 -2
- package/dist/esm/scan.mjs +1 -2
- package/dist/esm/searchDoc.mjs +2 -3
- package/dist/esm/test/listMissingTranslations.mjs +2 -3
- package/dist/esm/test/test.mjs +2 -3
- package/dist/esm/translateDoc/index.mjs +2 -2
- package/dist/esm/translateDoc/translateDoc.mjs +5 -6
- package/dist/esm/translateDoc/translateDoc.mjs.map +1 -1
- package/dist/esm/translateDoc/translateFile.mjs +6 -7
- package/dist/esm/translateDoc/translateFile.mjs.map +1 -1
- package/dist/esm/translateDoc/validation.mjs +1 -2
- package/dist/esm/upgrade.mjs +2 -3
- package/dist/esm/utils/calculateChunks.mjs +1 -2
- package/dist/esm/utils/checkAccess.mjs +3 -4
- package/dist/esm/utils/checkConfigConsistency.mjs +1 -2
- package/dist/esm/utils/checkFileModifiedRange.mjs +1 -2
- package/dist/esm/utils/checkLastUpdateTime.mjs +1 -2
- package/dist/esm/utils/chunkInference.mjs +1 -2
- package/dist/esm/utils/detectGitRepository.mjs +1 -2
- package/dist/esm/utils/fixChunkStartEndChars.mjs +1 -2
- package/dist/esm/utils/formatLineRanges.mjs +1 -2
- package/dist/esm/utils/formatTimeDiff.mjs +1 -2
- package/dist/esm/utils/getIsFileUpdatedRecently.mjs +1 -2
- package/dist/esm/utils/getOutputFilePath.mjs +1 -2
- package/dist/esm/utils/getParentPackageJSON.mjs +1 -2
- package/dist/esm/utils/isInteractiveTerminal.mjs +1 -2
- package/dist/esm/utils/listSpecialChars.mjs +1 -2
- package/dist/esm/utils/mapChunksBetweenFiles.mjs +1 -2
- package/dist/esm/utils/openBrowser.mjs +1 -2
- package/dist/esm/utils/parseChoice.mjs +1 -2
- package/dist/esm/utils/reorderParagraphs.mjs +1 -2
- package/dist/esm/utils/selectCmsEnvironment.mjs +1 -2
- package/dist/esm/utils/setupAI.mjs +1 -2
- package/dist/esm/watch.mjs +2 -3
- package/dist/types/IntlayerEventListener.d.ts +1 -3
- package/dist/types/IntlayerEventListener.d.ts.map +1 -1
- package/dist/types/auth/login.d.ts +1 -2
- package/dist/types/auth/login.d.ts.map +1 -1
- package/dist/types/auth/sessionToken.d.ts +0 -2
- package/dist/types/auth/sessionToken.d.ts.map +1 -1
- package/dist/types/auth/setupRepository.d.ts +1 -2
- package/dist/types/auth/setupRepository.d.ts.map +1 -1
- package/dist/types/build.d.ts +1 -2
- package/dist/types/build.d.ts.map +1 -1
- package/dist/types/bundle.d.ts +0 -2
- package/dist/types/bundle.d.ts.map +1 -1
- package/dist/types/ci.d.ts +1 -2
- package/dist/types/ci.d.ts.map +1 -1
- package/dist/types/cli.d.ts +1 -2
- package/dist/types/cli.d.ts.map +1 -1
- package/dist/types/config.d.ts +1 -2
- package/dist/types/config.d.ts.map +1 -1
- package/dist/types/editor.d.ts +1 -2
- package/dist/types/editor.d.ts.map +1 -1
- package/dist/types/extract.d.ts +1 -2
- package/dist/types/extract.d.ts.map +1 -1
- package/dist/types/fill/deepMergeContent.d.ts +0 -2
- package/dist/types/fill/deepMergeContent.d.ts.map +1 -1
- package/dist/types/fill/extractTranslatableContent.d.ts +0 -2
- package/dist/types/fill/extractTranslatableContent.d.ts.map +1 -1
- package/dist/types/fill/fill.d.ts +1 -3
- package/dist/types/fill/fill.d.ts.map +1 -1
- package/dist/types/fill/formatAutoFilledFilePath.d.ts +1 -3
- package/dist/types/fill/formatAutoFilledFilePath.d.ts.map +1 -1
- package/dist/types/fill/formatFillData.d.ts +0 -2
- package/dist/types/fill/formatFillData.d.ts.map +1 -1
- package/dist/types/fill/getAvailableLocalesInDictionary.d.ts +0 -2
- package/dist/types/fill/getAvailableLocalesInDictionary.d.ts.map +1 -1
- package/dist/types/fill/getFilterMissingContentPerLocale.d.ts +0 -2
- package/dist/types/fill/getFilterMissingContentPerLocale.d.ts.map +1 -1
- package/dist/types/fill/listTranslationsTasks.d.ts +0 -2
- package/dist/types/fill/listTranslationsTasks.d.ts.map +1 -1
- package/dist/types/fill/translateDictionary.d.ts +2 -3
- package/dist/types/fill/translateDictionary.d.ts.map +1 -1
- package/dist/types/fill/writeFill.d.ts +0 -2
- package/dist/types/fill/writeFill.d.ts.map +1 -1
- package/dist/types/getTargetDictionary.d.ts +0 -2
- package/dist/types/getTargetDictionary.d.ts.map +1 -1
- package/dist/types/index.d.ts +4 -4
- package/dist/types/init.d.ts +6 -3
- package/dist/types/init.d.ts.map +1 -1
- package/dist/types/initChromeExtension.d.ts +0 -2
- package/dist/types/initChromeExtension.d.ts.map +1 -1
- package/dist/types/initInfra.d.ts +0 -2
- package/dist/types/initInfra.d.ts.map +1 -1
- package/dist/types/initMCP.d.ts +0 -2
- package/dist/types/initMCP.d.ts.map +1 -1
- package/dist/types/initSkills.d.ts +0 -2
- package/dist/types/initSkills.d.ts.map +1 -1
- package/dist/types/listContentDeclaration.d.ts +1 -2
- package/dist/types/listContentDeclaration.d.ts.map +1 -1
- package/dist/types/listProjects.d.ts +0 -2
- package/dist/types/listProjects.d.ts.map +1 -1
- package/dist/types/liveSync.d.ts +1 -2
- package/dist/types/liveSync.d.ts.map +1 -1
- package/dist/types/loadPrompts.d.ts +0 -2
- package/dist/types/loadPrompts.d.ts.map +1 -1
- package/dist/types/pull.d.ts +15 -3
- package/dist/types/pull.d.ts.map +1 -1
- package/dist/types/push/pullLog.d.ts +0 -2
- package/dist/types/push/pullLog.d.ts.map +1 -1
- package/dist/types/push/push.d.ts +1 -2
- package/dist/types/push/push.d.ts.map +1 -1
- package/dist/types/pushConfig.d.ts +1 -2
- package/dist/types/pushConfig.d.ts.map +1 -1
- package/dist/types/pushLog.d.ts +0 -2
- package/dist/types/pushLog.d.ts.map +1 -1
- package/dist/types/reviewDoc/reviewDoc.d.ts +2 -3
- package/dist/types/reviewDoc/reviewDoc.d.ts.map +1 -1
- package/dist/types/reviewDoc/reviewDocBlockAware.d.ts +0 -2
- package/dist/types/reviewDoc/reviewDocBlockAware.d.ts.map +1 -1
- package/dist/types/reviewDoc/reviewDocLog.d.ts +0 -2
- package/dist/types/reviewDoc/reviewDocLog.d.ts.map +1 -1
- package/dist/types/reviewDoc/reviewDocProgress.d.ts +0 -2
- package/dist/types/reviewDoc/reviewDocProgress.d.ts.map +1 -1
- package/dist/types/reviewDoc/reviewDocSynthesis.d.ts +0 -2
- package/dist/types/reviewDoc/reviewDocSynthesis.d.ts.map +1 -1
- package/dist/types/scan.d.ts +0 -2
- package/dist/types/scan.d.ts.map +1 -1
- package/dist/types/searchDoc.d.ts +1 -2
- package/dist/types/searchDoc.d.ts.map +1 -1
- package/dist/types/test/listMissingTranslations.d.ts +1 -3
- package/dist/types/test/listMissingTranslations.d.ts.map +1 -1
- package/dist/types/test/test.d.ts +1 -2
- package/dist/types/test/test.d.ts.map +1 -1
- package/dist/types/translateDoc/index.d.ts +1 -1
- package/dist/types/translateDoc/translateDoc.d.ts +0 -2
- package/dist/types/translateDoc/translateDoc.d.ts.map +1 -1
- package/dist/types/translateDoc/translateFile.d.ts +0 -2
- package/dist/types/translateDoc/translateFile.d.ts.map +1 -1
- package/dist/types/translateDoc/types.d.ts +2 -4
- package/dist/types/translateDoc/types.d.ts.map +1 -1
- package/dist/types/translateDoc/validation.d.ts +0 -2
- package/dist/types/translateDoc/validation.d.ts.map +1 -1
- package/dist/types/upgrade.d.ts +0 -2
- package/dist/types/upgrade.d.ts.map +1 -1
- package/dist/types/utils/calculateChunks.d.ts +0 -2
- package/dist/types/utils/calculateChunks.d.ts.map +1 -1
- package/dist/types/utils/checkAccess.d.ts +1 -3
- package/dist/types/utils/checkAccess.d.ts.map +1 -1
- package/dist/types/utils/checkConfigConsistency.d.ts +0 -2
- package/dist/types/utils/checkConfigConsistency.d.ts.map +1 -1
- package/dist/types/utils/checkFileModifiedRange.d.ts +1 -2
- package/dist/types/utils/checkFileModifiedRange.d.ts.map +1 -1
- package/dist/types/utils/checkLastUpdateTime.d.ts +0 -2
- package/dist/types/utils/checkLastUpdateTime.d.ts.map +1 -1
- package/dist/types/utils/chunkInference.d.ts +1 -2
- package/dist/types/utils/chunkInference.d.ts.map +1 -1
- package/dist/types/utils/detectGitRepository.d.ts +0 -2
- package/dist/types/utils/detectGitRepository.d.ts.map +1 -1
- package/dist/types/utils/fixChunkStartEndChars.d.ts +0 -2
- package/dist/types/utils/fixChunkStartEndChars.d.ts.map +1 -1
- package/dist/types/utils/formatLineRanges.d.ts +0 -2
- package/dist/types/utils/formatLineRanges.d.ts.map +1 -1
- package/dist/types/utils/formatTimeDiff.d.ts +0 -2
- package/dist/types/utils/formatTimeDiff.d.ts.map +1 -1
- package/dist/types/utils/getIsFileUpdatedRecently.d.ts +0 -2
- package/dist/types/utils/getIsFileUpdatedRecently.d.ts.map +1 -1
- package/dist/types/utils/getOutputFilePath.d.ts +0 -2
- package/dist/types/utils/getOutputFilePath.d.ts.map +1 -1
- package/dist/types/utils/getParentPackageJSON.d.ts +1 -2
- package/dist/types/utils/getParentPackageJSON.d.ts.map +1 -1
- package/dist/types/utils/isInteractiveTerminal.d.ts +0 -2
- package/dist/types/utils/isInteractiveTerminal.d.ts.map +1 -1
- package/dist/types/utils/listSpecialChars.d.ts +1 -2
- package/dist/types/utils/listSpecialChars.d.ts.map +1 -1
- package/dist/types/utils/mapChunksBetweenFiles.d.ts +0 -2
- package/dist/types/utils/mapChunksBetweenFiles.d.ts.map +1 -1
- package/dist/types/utils/openBrowser.d.ts +0 -2
- package/dist/types/utils/openBrowser.d.ts.map +1 -1
- package/dist/types/utils/parseChoice.d.ts +0 -2
- package/dist/types/utils/parseChoice.d.ts.map +1 -1
- package/dist/types/utils/reorderParagraphs.d.ts +0 -2
- package/dist/types/utils/reorderParagraphs.d.ts.map +1 -1
- package/dist/types/utils/selectCmsEnvironment.d.ts +1 -3
- package/dist/types/utils/selectCmsEnvironment.d.ts.map +1 -1
- package/dist/types/utils/setupAI.d.ts +1 -2
- package/dist/types/utils/setupAI.d.ts.map +1 -1
- package/dist/types/watch.d.ts +1 -2
- package/dist/types/watch.d.ts.map +1 -1
- package/package.json +32 -32
|
@@ -4,7 +4,7 @@ let _intlayer_api = require("@intlayer/api");
|
|
|
4
4
|
let _intlayer_config_built = require("@intlayer/config/built");
|
|
5
5
|
let eventsource = require("eventsource");
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
// src/IntlayerEventListener.ts
|
|
8
8
|
/**
|
|
9
9
|
* IntlayerEventListener class to listen for dictionary changes via SSE (Server-Sent Events).
|
|
10
10
|
*
|
|
@@ -180,6 +180,5 @@ var IntlayerEventListener = class {
|
|
|
180
180
|
}
|
|
181
181
|
};
|
|
182
182
|
|
|
183
|
-
//#endregion
|
|
184
183
|
exports.IntlayerEventListener = IntlayerEventListener;
|
|
185
184
|
//# sourceMappingURL=IntlayerEventListener.cjs.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// \0rolldown/runtime.js
|
|
2
2
|
var __create = Object.create;
|
|
3
3
|
var __defProp = Object.defineProperty;
|
|
4
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
@@ -24,5 +24,4 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
24
24
|
enumerable: true
|
|
25
25
|
}) : target, mod));
|
|
26
26
|
|
|
27
|
-
//#endregion
|
|
28
27
|
exports.__toESM = __toESM;
|
|
@@ -2,7 +2,7 @@ let node_fs = require("node:fs");
|
|
|
2
2
|
let node_path = require("node:path");
|
|
3
3
|
let node_url = require("node:url");
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
// \0utils:asset
|
|
6
6
|
const hereDirname = () => {
|
|
7
7
|
try {
|
|
8
8
|
return (0, node_path.dirname)((0, node_url.fileURLToPath)(require("url").pathToFileURL(__filename).href));
|
|
@@ -96,5 +96,4 @@ const readAsset = (relPath, encoding = "utf8") => {
|
|
|
96
96
|
throw new Error(msg);
|
|
97
97
|
};
|
|
98
98
|
|
|
99
|
-
//#endregion
|
|
100
99
|
exports.readAsset = readAsset;
|
package/dist/cjs/auth/login.cjs
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
const require_runtime = require(
|
|
3
|
-
const require_utils_openBrowser = require(
|
|
4
|
-
const require_auth_sessionToken = require(
|
|
5
|
-
let _intlayer_engine_cli = require("@intlayer/engine/cli");
|
|
6
|
-
let node_http = require("node:http");
|
|
7
|
-
node_http = require_runtime.__toESM(node_http);
|
|
8
|
-
let node_url = require("node:url");
|
|
2
|
+
const require_runtime = require("../_virtual/_rolldown/runtime.cjs");
|
|
3
|
+
const require_utils_openBrowser = require("../utils/openBrowser.cjs");
|
|
4
|
+
const require_auth_sessionToken = require("./sessionToken.cjs");
|
|
9
5
|
let _intlayer_config_colors = require("@intlayer/config/colors");
|
|
10
6
|
_intlayer_config_colors = require_runtime.__toESM(_intlayer_config_colors);
|
|
11
7
|
let _intlayer_config_logger = require("@intlayer/config/logger");
|
|
12
8
|
let _intlayer_config_node = require("@intlayer/config/node");
|
|
9
|
+
let _intlayer_engine_cli = require("@intlayer/engine/cli");
|
|
10
|
+
let node_url = require("node:url");
|
|
11
|
+
let node_http = require("node:http");
|
|
12
|
+
node_http = require_runtime.__toESM(node_http);
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
// src/auth/login.ts
|
|
15
15
|
const buildSuccessHtml = (message) => `
|
|
16
16
|
<!DOCTYPE html>
|
|
17
17
|
<html lang="en" data-theme="dark">
|
|
@@ -189,6 +189,5 @@ const login = async (options = {}) => {
|
|
|
189
189
|
});
|
|
190
190
|
};
|
|
191
191
|
|
|
192
|
-
//#endregion
|
|
193
192
|
exports.login = login;
|
|
194
193
|
//# sourceMappingURL=login.cjs.map
|
|
@@ -2,7 +2,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
2
2
|
let node_path = require("node:path");
|
|
3
3
|
let node_fs_promises = require("node:fs/promises");
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
// src/auth/sessionToken.ts
|
|
6
6
|
const SESSION_FILE_NAME = "cli-session.json";
|
|
7
7
|
const getSessionFilePath = (config) => (0, node_path.join)(config.system.tempDir, SESSION_FILE_NAME);
|
|
8
8
|
const writeCliSessionToken = async (config, token, expiresAt) => {
|
|
@@ -35,7 +35,6 @@ const clearCliSessionToken = async (config) => {
|
|
|
35
35
|
} catch {}
|
|
36
36
|
};
|
|
37
37
|
|
|
38
|
-
//#endregion
|
|
39
38
|
exports.clearCliSessionToken = clearCliSessionToken;
|
|
40
39
|
exports.readCliSessionToken = readCliSessionToken;
|
|
41
40
|
exports.writeCliSessionToken = writeCliSessionToken;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
const require_runtime = require(
|
|
3
|
-
const require_utils_openBrowser = require(
|
|
4
|
-
let node_http = require("node:http");
|
|
5
|
-
node_http = require_runtime.__toESM(node_http);
|
|
6
|
-
let node_url = require("node:url");
|
|
2
|
+
const require_runtime = require("../_virtual/_rolldown/runtime.cjs");
|
|
3
|
+
const require_utils_openBrowser = require("../utils/openBrowser.cjs");
|
|
7
4
|
let _intlayer_config_colors = require("@intlayer/config/colors");
|
|
8
5
|
_intlayer_config_colors = require_runtime.__toESM(_intlayer_config_colors);
|
|
9
6
|
let _intlayer_config_logger = require("@intlayer/config/logger");
|
|
10
7
|
let _intlayer_config_node = require("@intlayer/config/node");
|
|
8
|
+
let node_url = require("node:url");
|
|
9
|
+
let node_http = require("node:http");
|
|
10
|
+
node_http = require_runtime.__toESM(node_http);
|
|
11
11
|
let node_crypto = require("node:crypto");
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
// src/auth/setupRepository.ts
|
|
14
14
|
/** Page shown once the browser handed the result back to the CLI. */
|
|
15
15
|
const DONE_HTML = `<!DOCTYPE html>
|
|
16
16
|
<html lang="en">
|
|
@@ -89,7 +89,6 @@ const setupRepository = async (options = {}) => {
|
|
|
89
89
|
});
|
|
90
90
|
};
|
|
91
91
|
|
|
92
|
-
//#endregion
|
|
93
92
|
exports.getRepositorySearchParams = getRepositorySearchParams;
|
|
94
93
|
exports.setupRepository = setupRepository;
|
|
95
94
|
//# sourceMappingURL=setupRepository.cjs.map
|
package/dist/cjs/build.cjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
2
|
let _intlayer_config_node = require("@intlayer/config/node");
|
|
3
3
|
let _intlayer_engine_utils = require("@intlayer/engine/utils");
|
|
4
|
-
let _intlayer_engine_watcher = require("@intlayer/engine/watcher");
|
|
5
4
|
let _intlayer_engine_logConfigDetails = require("@intlayer/engine/logConfigDetails");
|
|
5
|
+
let _intlayer_engine_watcher = require("@intlayer/engine/watcher");
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
// src/build.ts
|
|
8
8
|
/**
|
|
9
9
|
* Get locales dictionaries .content.{json|ts|tsx|js|jsx|mjs|cjs} and build the JSON dictionaries in the .intlayer directory.
|
|
10
10
|
* Watch mode available to get the change in the .content.{json|ts|tsx|js|jsx|mjs|cjs}
|
|
@@ -32,6 +32,5 @@ const build = async (options) => {
|
|
|
32
32
|
if (!options?.watch && parallelProcess) parallelProcess.kill();
|
|
33
33
|
};
|
|
34
34
|
|
|
35
|
-
//#endregion
|
|
36
35
|
exports.build = build;
|
|
37
36
|
//# sourceMappingURL=build.cjs.map
|
package/dist/cjs/bundle.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
|
|
2
|
+
// src/bundle.ts
|
|
3
3
|
/**
|
|
4
4
|
* Computes the tree-shaking defines derived from the project's built
|
|
5
5
|
* dictionaries (unused node types, dictionary selector usage) so the generated
|
|
@@ -41,6 +41,5 @@ const bundle = async (options) => {
|
|
|
41
41
|
}
|
|
42
42
|
};
|
|
43
43
|
|
|
44
|
-
//#endregion
|
|
45
44
|
exports.bundle = bundle;
|
|
46
45
|
//# sourceMappingURL=bundle.cjs.map
|
package/dist/cjs/bundle.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bundle.cjs","names":[],"sources":["../../src/bundle.ts"],"sourcesContent":["import type { BundleIntlayerOptions } from '@intlayer/config/bundle';\n\n/**\n * Computes the tree-shaking defines derived from the project's built\n * dictionaries (unused node types, dictionary selector usage) so the generated\n * bundle drops the corresponding runtime logic, mirroring what the bundler\n * plugins (vite / webpack / esbuild) inject at application build time.\n *\n * Returns an empty object when no dictionary has been built yet: shaking based\n * on an empty dictionary set would mark every node type as unused and strip\n * logic that the runtime content may require.\n */\nconst getDictionaryTreeShakingDefines = async (\n options: BundleIntlayerOptions\n): Promise<Record<string, string>> => {\n // Dynamic imports for performance reason\n const { formatDictionarySelectorEnvVar, formatNodeTypeToEnvVar } =\n await import('@intlayer/config/envVars');\n const { getConfiguration } = await import('@intlayer/config/node');\n const { getHasDictionarySelector, getUnusedNodeTypesAsync }
|
|
1
|
+
{"version":3,"file":"bundle.cjs","names":[],"sources":["../../src/bundle.ts"],"sourcesContent":["import type { BundleIntlayerOptions } from '@intlayer/config/bundle';\n\n/**\n * Computes the tree-shaking defines derived from the project's built\n * dictionaries (unused node types, dictionary selector usage) so the generated\n * bundle drops the corresponding runtime logic, mirroring what the bundler\n * plugins (vite / webpack / esbuild) inject at application build time.\n *\n * Returns an empty object when no dictionary has been built yet: shaking based\n * on an empty dictionary set would mark every node type as unused and strip\n * logic that the runtime content may require.\n */\nconst getDictionaryTreeShakingDefines = async (\n options: BundleIntlayerOptions\n): Promise<Record<string, string>> => {\n // Dynamic imports for performance reason\n const { formatDictionarySelectorEnvVar, formatNodeTypeToEnvVar } =\n await import('@intlayer/config/envVars');\n const { getConfiguration } = await import('@intlayer/config/node');\n const { getHasDictionarySelector, getUnusedNodeTypesAsync } =\n await import('@intlayer/config/utils');\n const { getDictionaries } = await import('@intlayer/dictionaries-entry');\n\n const configuration = getConfiguration(options.configOptions);\n const dictionaries = getDictionaries(configuration);\n\n if (Object.keys(dictionaries).length === 0) return {};\n\n const wrapKey = (key: string) => `process.env.${key}`;\n const wrapValue = (value: string) => `\"${value}\"`;\n\n const unusedNodeTypes = await getUnusedNodeTypesAsync(dictionaries);\n\n return {\n // Tree shaking based on unused node types\n ...formatNodeTypeToEnvVar(unusedNodeTypes, wrapKey, wrapValue),\n // Tree shaking the dictionary selector logic (collections / variants)\n ...formatDictionarySelectorEnvVar(\n getHasDictionarySelector(dictionaries),\n wrapKey,\n wrapValue\n ),\n };\n};\n\nexport const bundle = async (options: BundleIntlayerOptions): Promise<void> => {\n try {\n // Dynamic import for performance reason\n const { bundleIntlayer } = await import('@intlayer/config/bundle');\n\n const dictionaryDefines = await getDictionaryTreeShakingDefines(options);\n\n await bundleIntlayer({\n ...options,\n define: {\n ...dictionaryDefines,\n // Caller-supplied defines take precedence\n ...options.define,\n },\n });\n } catch (error) {\n console.error('Failed to create bundle:', error);\n process.exit(1);\n }\n};\n"],"mappings":";;;;;;;;;;;;AAYA,MAAM,kCAAkC,OACtC,YACoC;CAEpC,MAAM,EAAE,gCAAgC,2BACtC,MAAM,OAAO;CACf,MAAM,EAAE,qBAAqB,MAAM,OAAO;CAC1C,MAAM,EAAE,0BAA0B,4BAChC,MAAM,OAAO;CACf,MAAM,EAAE,oBAAoB,MAAM,OAAO;CAGzC,MAAM,eAAe,gBADC,iBAAiB,QAAQ,aACE,CAAC;CAElD,IAAI,OAAO,KAAK,YAAY,CAAC,CAAC,WAAW,GAAG,OAAO,CAAC;CAEpD,MAAM,WAAW,QAAgB,eAAe;CAChD,MAAM,aAAa,UAAkB,IAAI,MAAM;CAI/C,OAAO;EAEL,GAAG,uBAAuB,MAJE,wBAAwB,YAAY,GAIrB,SAAS,SAAS;EAE7D,GAAG,+BACD,yBAAyB,YAAY,GACrC,SACA,SACF;CACF;AACF;AAEA,MAAa,SAAS,OAAO,YAAkD;CAC7E,IAAI;EAEF,MAAM,EAAE,mBAAmB,MAAM,OAAO;EAExC,MAAM,oBAAoB,MAAM,gCAAgC,OAAO;EAEvE,MAAM,eAAe;GACnB,GAAG;GACH,QAAQ;IACN,GAAG;IAEH,GAAG,QAAQ;GACb;EACF,CAAC;CACH,SAAS,OAAO;EACd,QAAQ,MAAM,4BAA4B,KAAK;EAC/C,QAAQ,KAAK,CAAC;CAChB;AACF"}
|
package/dist/cjs/ci.cjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
let _intlayer_engine_cli = require("@intlayer/engine/cli");
|
|
3
2
|
let node_path = require("node:path");
|
|
4
3
|
let _intlayer_config_logger = require("@intlayer/config/logger");
|
|
4
|
+
let _intlayer_engine_cli = require("@intlayer/engine/cli");
|
|
5
5
|
let node_child_process = require("node:child_process");
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
// src/ci.ts
|
|
8
8
|
/**
|
|
9
9
|
* Detects the command used to run the local `intlayer` binary. Prefers the
|
|
10
10
|
* package manager that launched the current process (`npm_config_user_agent`),
|
|
@@ -149,7 +149,6 @@ const runCI = async (commands) => {
|
|
|
149
149
|
return 0;
|
|
150
150
|
};
|
|
151
151
|
|
|
152
|
-
//#endregion
|
|
153
152
|
exports.CI_FLAG = CI_FLAG;
|
|
154
153
|
exports.credentialsKeyMatchesProject = credentialsKeyMatchesProject;
|
|
155
154
|
exports.getPackageManagerCommand = getPackageManagerCommand;
|
package/dist/cjs/cli.cjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
const require_utils_getParentPackageJSON = require(
|
|
2
|
+
const require_utils_getParentPackageJSON = require("./utils/getParentPackageJSON.cjs");
|
|
3
3
|
let node_path = require("node:path");
|
|
4
|
-
let node_url = require("node:url");
|
|
5
4
|
let _intlayer_config_logger = require("@intlayer/config/logger");
|
|
6
5
|
let _intlayer_config_node = require("@intlayer/config/node");
|
|
6
|
+
let node_url = require("node:url");
|
|
7
7
|
let commander = require("commander");
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
// src/cli.ts
|
|
10
10
|
const isESModule = typeof require("url").pathToFileURL(__filename).href === "string";
|
|
11
11
|
const dirname = isESModule ? (0, node_path.dirname)((0, node_url.fileURLToPath)(require("url").pathToFileURL(__filename).href)) : __dirname;
|
|
12
12
|
const packageJson = require_utils_getParentPackageJSON.getParentPackageJSON(dirname);
|
|
@@ -193,6 +193,10 @@ const setAPI = () => {
|
|
|
193
193
|
const { initSteps } = await Promise.resolve().then(() => require("./init.cjs"));
|
|
194
194
|
return initSteps(options.projectRoot, ["eslint"], { upgradeToVersion: packageJson.version });
|
|
195
195
|
});
|
|
196
|
+
initCmd.command("prettier").description("Add the Intlayer Prettier plugin, when the project already formats with Prettier").option("--project-root [projectRoot]", "Project root directory").action(async (options) => {
|
|
197
|
+
const { initSteps } = await Promise.resolve().then(() => require("./init.cjs"));
|
|
198
|
+
return initSteps(options.projectRoot, ["prettier"], { upgradeToVersion: packageJson.version });
|
|
199
|
+
});
|
|
196
200
|
initCmd.command("skills").description("Initialize Intlayer skills in the project").option("--project-root [projectRoot]", "Project root directory").option("-p, --platform <platform>", "AI platform (e.g. Claude, Cursor, VSCode). Detected when omitted").option("-s, --skills <skills...>", "Skills to install (e.g. Usage Content React). Defaults to the project stack without a terminal").action(async (options) => {
|
|
197
201
|
const { initSkills, parsePlatform, parseSkills } = await Promise.resolve().then(() => require("./initSkills.cjs"));
|
|
198
202
|
await initSkills(options.projectRoot, {
|
|
@@ -584,7 +588,7 @@ const setAPI = () => {
|
|
|
584
588
|
/**
|
|
585
589
|
* SCAN
|
|
586
590
|
*/
|
|
587
|
-
const scanCmd = program.command("scan").description("Scan a website to measure its page size and audit its i18n / SEO health").argument("<url>", "URL of the website to scan").option("--no-deep", "Disable the deeper puppeteer-based render scan").option("--json", "Output the results as JSON");
|
|
591
|
+
const scanCmd = program.command("scan").description("Scan a website to measure its page size and audit its i18n / SEO health").argument("<url>", "URL or domain of the website to scan (e.g. intlayer.org)").option("--no-deep", "Disable the deeper puppeteer-based render scan").option("--json", "Output the results as JSON");
|
|
588
592
|
applyConfigOptions(scanCmd);
|
|
589
593
|
scanCmd.action(async (url, options) => {
|
|
590
594
|
const { scan } = await Promise.resolve().then(() => require("./scan.cjs"));
|
|
@@ -622,7 +626,6 @@ const setAPI = () => {
|
|
|
622
626
|
return program;
|
|
623
627
|
};
|
|
624
628
|
|
|
625
|
-
//#endregion
|
|
626
629
|
exports.dirname = dirname;
|
|
627
630
|
exports.setAPI = setAPI;
|
|
628
631
|
//# sourceMappingURL=cli.cjs.map
|
package/dist/cjs/cli.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.cjs","names":["pathDirname","fileURLToPath","getParentPackageJSON","getConfiguration","Command","Option"],"sources":["../../src/cli.ts"],"sourcesContent":["import { dirname as pathDirname } from 'node:path';\nimport { fileURLToPath } from 'node:url';\nimport type { AIOptions as BaseAIOptions } from '@intlayer/ai';\nimport { logger, setPrefix } from '@intlayer/config/logger';\nimport {\n type GetConfigurationOptions,\n getConfiguration,\n} from '@intlayer/config/node';\nimport type { DiffMode, ListGitFilesOptions } from '@intlayer/engine/cli';\nimport type { CustomIntlayerConfig } from '@intlayer/types/config';\nimport { Command, Option } from 'commander';\nimport type { FillOptions } from './fill/fill';\nimport { getParentPackageJSON } from './utils/getParentPackageJSON';\n\n// Extended AI options to include customPrompt\ntype AIOptions = BaseAIOptions & {\n customPrompt?: string;\n};\n\nconst isESModule = typeof import.meta.url === 'string';\n\nexport const dirname = isESModule\n ? pathDirname(fileURLToPath(import.meta.url))\n : __dirname;\n\nconst packageJson = getParentPackageJSON(dirname);\n\nconst logOptions = [\n ['--verbose', 'Verbose (default to true using CLI)'],\n ['--prefix [prefix]', 'Prefix'],\n];\n\nconst ciOptions = [\n [\n '--ci',\n 'CI mode - Run the command in every Intlayer project of the repository (or only the current one), injecting per-project credentials from INTLAYER_PROJECT_CREDENTIALS',\n ],\n];\n\nconst configurationOptions = [\n ['--env-file [envFile]', 'Environment file'],\n ['-e, --env [env]', 'Environment'],\n ['--base-dir [baseDir]', 'Base directory'],\n ['--no-cache [noCache]', 'No cache'],\n ...logOptions,\n ...ciOptions,\n];\n\nconst aiOptions = [\n ['--provider [provider]', 'Provider'],\n ['--temperature [temperature]', 'Temperature'],\n ['--model [model]', 'Model'],\n ['--api-key [apiKey]', 'Provider API key'],\n ['--custom-prompt [prompt]', 'Custom prompt'],\n ['--application-context [applicationContext]', 'Application context'],\n ['--data-serialization [dataSerialization]', 'Data serialization'],\n];\n\nconst gitOptions = [\n ['--git-diff [gitDiff]', 'Git diff mode - Check git diff between two refs'],\n ['--git-diff-base [gitDiffBase]', 'Git diff base ref'],\n ['--git-diff-current [gitDiffCurrent]', 'Git diff current ref'],\n ['--uncommitted [uncommitted]', 'Uncommitted'],\n ['--unpushed [unpushed]', 'Unpushed'],\n ['--untracked [untracked]', 'Untracked'],\n];\n\nconst extractKeysFromOptions = (options: object, keys: string[]) =>\n keys.filter((key) => options[key as keyof typeof options] !== undefined);\n\n/**\n * Helper functions to apply common options to commands\n */\nconst applyOptions = (command: Command, options: string[][]) => {\n options.forEach(([flag, description]) => {\n command.option(flag!, description);\n });\n return command;\n};\n\nconst removeUndefined = <T extends Record<string, any>>(obj: T): T =>\n Object.fromEntries(\n Object.entries(obj).filter(([_, value]) => value !== undefined)\n ) as T;\n\nconst applyConfigOptions = (command: Command) =>\n applyOptions(command, configurationOptions);\nconst applyAIOptions = (command: Command) => applyOptions(command, aiOptions);\nconst applyGitOptions = (command: Command) => applyOptions(command, gitOptions);\n\nconst extractAiOptions = (options: AIOptions): AIOptions | undefined => {\n const {\n apiKey,\n provider,\n model,\n temperature,\n applicationContext,\n customPrompt,\n dataSerialization,\n } = options;\n\n const configuration = getConfiguration();\n\n const { ai } = configuration;\n\n // `AIOptions` is discriminated on `provider`, which is only known at runtime\n // here (CLI flag or configuration file), so the merged object cannot be\n // narrowed to a single member of the union.\n return removeUndefined({\n ...ai,\n apiKey: apiKey ?? configuration.ai?.apiKey,\n provider: provider ?? (configuration.ai?.provider as AIOptions['provider']),\n model: model ?? configuration.ai?.model,\n temperature: temperature ?? configuration.ai?.temperature,\n applicationContext:\n applicationContext ?? configuration.ai?.applicationContext,\n customPrompt: customPrompt ?? (configuration.ai as any)?.customPrompt,\n dataSerialization: dataSerialization ?? configuration.ai?.dataSerialization,\n }) as AIOptions;\n};\n\ntype GitOptions = {\n gitDiff?: boolean;\n gitDiffBase?: string;\n gitDiffCurrent?: string;\n uncommitted?: boolean;\n unpushed?: boolean;\n untracked?: boolean;\n};\n\nconst gitOptionKeys: (keyof GitOptions)[] = [\n 'gitDiff',\n 'gitDiffBase',\n 'gitDiffCurrent',\n 'uncommitted',\n 'unpushed',\n 'untracked',\n];\n\nconst extractGitOptions = (\n options: GitOptions\n): ListGitFilesOptions | undefined => {\n const filteredOptions = extractKeysFromOptions(options, gitOptionKeys);\n\n const isOptionEmpty = filteredOptions.length === 0;\n\n if (isOptionEmpty) return undefined;\n\n const {\n gitDiff,\n gitDiffBase,\n gitDiffCurrent,\n uncommitted,\n unpushed,\n untracked,\n } = options;\n\n const mode = [\n gitDiff && 'gitDiff',\n uncommitted && 'uncommitted',\n unpushed && 'unpushed',\n untracked && 'untracked',\n ].filter(Boolean) as DiffMode[];\n\n return removeUndefined({\n mode,\n baseRef: gitDiffBase,\n currentRef: gitDiffCurrent,\n absolute: true,\n });\n};\n\ntype LogOptions = {\n prefix?: string;\n verbose?: boolean;\n};\n\nexport type ConfigurationOptions = {\n baseDir?: string;\n env?: string;\n envFile?: string;\n noCache?: boolean;\n checkTypes?: boolean;\n} & LogOptions;\n\nconst configurationOptionKeys: (keyof ConfigurationOptions)[] = [\n 'baseDir',\n 'env',\n 'envFile',\n 'verbose',\n 'prefix',\n 'checkTypes',\n];\n\nconst extractConfigOptions = (\n options: ConfigurationOptions & { with?: string }\n): GetConfigurationOptions | undefined => {\n const filteredOptions = extractKeysFromOptions(\n options,\n configurationOptionKeys\n );\n\n const isOptionEmpty = filteredOptions.length === 0;\n\n if (isOptionEmpty) {\n return undefined;\n }\n\n const { baseDir, env, envFile, verbose, noCache, checkTypes } = options;\n\n const log = removeUndefined({\n mode:\n typeof verbose !== 'undefined'\n ? verbose\n ? 'verbose'\n : 'default'\n : undefined,\n });\n\n const build = removeUndefined({\n checkTypes,\n });\n\n const override: CustomIntlayerConfig = removeUndefined({\n log:\n Object.keys(log).length > 0\n ? (log as CustomIntlayerConfig['log'])\n : undefined,\n build: Object.keys(build).length > 0 ? build : undefined,\n });\n\n return removeUndefined({\n baseDir,\n env,\n envFile,\n override: Object.keys(override).length > 0 ? override : undefined,\n cache: typeof noCache !== 'undefined' ? !noCache : undefined,\n });\n};\n\n/**\n * Set the API for the CLI\n *\n * Example of commands:\n *\n * npm run intlayer build --watch\n * npm run intlayer push --dictionaries id1 id2 id3 --deleteLocaleDir\n */\nexport const setAPI = (): Command => {\n const isWithCommand = process.argv.includes('--with');\n\n if (!isWithCommand) {\n setPrefix('');\n }\n\n const program = new Command();\n\n program\n .version(\n packageJson.version!,\n '-v, --version',\n 'Print the Intlayer CLI version'\n )\n .description('Intlayer CLI');\n\n // Keep `-V` (commander's default short flag) working alongside `-v`\n program.addOption(\n new Option('-V', 'Print the Intlayer CLI version').hideHelp()\n );\n program.on('option:V', () => {\n console.log(packageJson.version ?? 'unknown');\n process.exit(0);\n });\n\n // Explicit version subcommand for convenience: `npx intlayer version`\n program\n .command('version')\n .description('Print the Intlayer CLI version')\n .action(() => {\n // Prefer the resolved package.json version; fallback to unknown\n // Keeping output minimal to align with common CLI behavior\n console.log(packageJson.version ?? 'unknown');\n });\n\n /**\n * AUTH\n */\n const loginCmd = program\n .command('login')\n .description('Login to Intlayer')\n .option('--cms-url [cmsUrl]', 'CMS URL');\n\n applyConfigOptions(loginCmd);\n\n loginCmd.action(async (options) => {\n const { login } = await import('./auth/login');\n const configOptions = extractConfigOptions(options) ?? {\n override: {\n log: {\n prefix: '',\n mode: 'verbose',\n },\n },\n };\n\n return login({\n cmsUrl: options.cmsUrl,\n configOptions,\n });\n });\n\n /**\n * INIT\n */\n const initCmd = program\n .command('init')\n // Options after a subcommand belong to it: `init project --routing` and\n // `init skills --project-root` must not be consumed by `init` itself,\n // which declares the same options. Needs the root to be positional too.\n .enablePositionalOptions()\n .description(\n 'Install the Intlayer packages and set up the framework. Use --interactive, or the init subcommands, for the other setup steps (CI, skills, MCP, VS Code, LSP, lint, CMS, …)'\n )\n .option('--project-root [projectRoot]', 'Project root directory')\n .option('--no-gitignore', 'Do not add .intlayer to .gitignore')\n .option(\n '--no-github-actions',\n 'With --interactive: do not scaffold the GitHub Actions workflows, even if selected'\n )\n .option(\n '--no-framework-setup',\n 'Do not set up the project (Intlayer config, tsconfig, bundler plugin, middleware/proxy, providers in layout/page)'\n )\n .option(\n '-i, --interactive',\n 'Interactively choose what to set up (packages, skills, MCP, VS Code extension, LSP, …). Needs a terminal'\n )\n .option(\n '--routing <routing>',\n 'Locale routing: prefix-no-default | prefix-all | no-prefix | search-params | none'\n )\n .option(\n '--content <layout>',\n 'Content declaration layout: multilingual | per-locale | centralized | namespaces'\n )\n .option(\n '--content-format <format>',\n 'Content format, used with --content: ts | json (multilingual, per-locale), json | po (centralized, namespaces)'\n )\n .option(\n '--message-format <format>',\n 'Message format of JSON catalogs, used with --content centralized | namespaces: icu | i18next | vue-i18n | intlayer'\n )\n .action(async (options) => {\n const {\n init,\n parseLocaleRoutingChoice,\n getRoutingInitOptions,\n getContentInitOptions,\n } = await import('./init');\n return init(\n options.projectRoot,\n {\n noGitignore: options.gitignore === false,\n noGithubActions: options.githubActions === false,\n noFrameworkSetup: options.frameworkSetup === false,\n upgradeToVersion: packageJson.version,\n ...(options.routing\n ? getRoutingInitOptions(parseLocaleRoutingChoice(options.routing))\n : {}),\n ...getContentInitOptions(\n options.content,\n options.contentFormat,\n options.messageFormat\n ),\n },\n options.interactive === true\n );\n });\n\n initCmd\n .command('packages')\n .description(\n 'Install the missing Intlayer packages and upgrade the outdated ones'\n )\n .option('--project-root [projectRoot]', 'Project root directory')\n .action(async (options) => {\n const { initSteps } = await import('./init');\n return initSteps(options.projectRoot, ['packages'], {\n upgradeToVersion: packageJson.version,\n });\n });\n\n initCmd\n .command('project')\n .alias('framework')\n .description(\n 'Set up the project: Intlayer config, tsconfig, bundler plugin, middleware/proxy, providers in layout/page and .gitignore'\n )\n .option('--project-root [projectRoot]', 'Project root directory')\n .option('--no-gitignore', 'Do not add .intlayer to .gitignore')\n .option(\n '--routing <routing>',\n 'Locale routing: prefix-no-default | prefix-all | no-prefix | search-params | none'\n )\n .option(\n '--content <layout>',\n 'Content declaration layout: multilingual | per-locale | centralized | namespaces'\n )\n .option(\n '--content-format <format>',\n 'Content format, used with --content: ts | json (multilingual, per-locale), json | po (centralized, namespaces)'\n )\n .option(\n '--message-format <format>',\n 'Message format of JSON catalogs, used with --content centralized | namespaces: icu | i18next | vue-i18n | intlayer'\n )\n .action(async (options) => {\n const {\n initSteps,\n parseLocaleRoutingChoice,\n getRoutingInitOptions,\n getContentInitOptions,\n } = await import('./init');\n return initSteps(options.projectRoot, ['projectSetup'], {\n noGitignore: options.gitignore === false,\n ...(options.routing\n ? getRoutingInitOptions(parseLocaleRoutingChoice(options.routing))\n : {}),\n ...getContentInitOptions(\n options.content,\n options.contentFormat,\n options.messageFormat\n ),\n });\n });\n\n initCmd\n .command('github-actions')\n .alias('ci')\n .description(\n 'Scaffold the fill and test GitHub Actions workflows that run on every pull request'\n )\n .option('--project-root [projectRoot]', 'Project root directory')\n .action(async (options) => {\n const { initSteps } = await import('./init');\n return initSteps(options.projectRoot, ['githubActions']);\n });\n\n initCmd\n .command('vscode-extension')\n .alias('vscode')\n .description(\n 'Recommend the Intlayer VS Code extension in .vscode/extensions.json'\n )\n .option('--project-root [projectRoot]', 'Project root directory')\n .action(async (options) => {\n const { initSteps } = await import('./init');\n return initSteps(options.projectRoot, ['vscodeExtension']);\n });\n\n initCmd\n .command('lsp')\n .description(\n 'Configure the Intlayer language server in .vscode/settings.json'\n )\n .option('--project-root [projectRoot]', 'Project root directory')\n .action(async (options) => {\n const { initSteps } = await import('./init');\n return initSteps(options.projectRoot, ['lsp']);\n });\n\n initCmd\n .command('eslint')\n .alias('lint')\n .description(\n 'Enable the Intlayer lint rules (ESLint / oxlint), when the project already lints'\n )\n .option('--project-root [projectRoot]', 'Project root directory')\n .action(async (options) => {\n const { initSteps } = await import('./init');\n return initSteps(options.projectRoot, ['eslint'], {\n upgradeToVersion: packageJson.version,\n });\n });\n\n initCmd\n .command('skills')\n .description('Initialize Intlayer skills in the project')\n .option('--project-root [projectRoot]', 'Project root directory')\n .option(\n '-p, --platform <platform>',\n 'AI platform (e.g. Claude, Cursor, VSCode). Detected when omitted'\n )\n .option(\n '-s, --skills <skills...>',\n 'Skills to install (e.g. Usage Content React). Defaults to the project stack without a terminal'\n )\n .action(async (options) => {\n const { initSkills, parsePlatform, parseSkills } = await import(\n './initSkills'\n );\n await initSkills(options.projectRoot, {\n platform: options.platform\n ? parsePlatform(options.platform)\n : undefined,\n skills: options.skills ? parseSkills(options.skills) : undefined,\n });\n });\n\n initCmd\n .command('mcp')\n .description('Initialize Intlayer MCP server in the project')\n .option('--project-root [projectRoot]', 'Project root directory')\n .option(\n '-p, --platform <platform>',\n 'AI platform (e.g. Claude, Cursor, VSCode). Detected when omitted'\n )\n .option(\n '-t, --transport <transport>',\n 'stdio (local server, default without a terminal) | sse (hosted)'\n )\n .action(async (options) => {\n const { initMCP, parseMCPTransport } = await import('./initMCP');\n const { parsePlatform } = await import('./initSkills');\n return initMCP(options.projectRoot, {\n platform: options.platform\n ? parsePlatform(options.platform)\n : undefined,\n transport: options.transport\n ? parseMCPTransport(options.transport)\n : undefined,\n });\n });\n\n initCmd\n .command('cms')\n .description(\n 'Log in to the Intlayer CMS through your browser, then store the credentials in your .env'\n )\n .option('--project-root [projectRoot]', 'Project root directory')\n .action(async (options) => {\n const { initCms } = await import('./init');\n return initCms(options.projectRoot);\n });\n\n initCmd\n .command('repository')\n .description(\n 'Connect the git repository of the project (GitHub, GitLab, Bitbucket, Codeberg, Gitee) to its CMS project and set its build settings, through your browser'\n )\n .option('--project-root [projectRoot]', 'Project root directory')\n .action(async (options) => {\n const { initRepository } = await import('./init');\n return initRepository(options.projectRoot);\n });\n\n initCmd\n .command('infra')\n .description(\n 'Set up the Intlayer infrastructure: desktop app, all-in-one Docker container or Docker Compose stack (runs https://intlayer.org/install.sh, or install.ps1 on Windows)'\n )\n .option(\n '-m, --mode <mode>',\n 'Skip the menu: desktop | docker | compose (required without a terminal)'\n )\n .action(async (options) => {\n const { initInfra, parseInfraMode } = await import('./initInfra');\n return initInfra({\n mode: options.mode ? parseInfraMode(options.mode) : undefined,\n });\n });\n\n initCmd\n .command('extension')\n .alias('chrome-extension')\n .description(\n 'Install the Intlayer Chrome extension or Firefox add-on in your browser'\n )\n .option(\n '-b, --browser <browsers...>',\n 'Browsers to open the store page for: chrome | firefox. Without a terminal, the links are only printed'\n )\n .action(async (options) => {\n const { initChromeExtension, parseExtensionBrowsers } = await import(\n './initChromeExtension'\n );\n return initChromeExtension({\n browsers: options.browser\n ? parseExtensionBrowsers(options.browser)\n : undefined,\n });\n });\n\n /**\n * UPGRADE\n */\n program\n .command('upgrade')\n .description(\n 'List the Intlayer packages of every package.json of the project and upgrade them to the latest version'\n )\n .option('--project-root [projectRoot]', 'Project root directory')\n .option('--dry-run', 'List the packages and their target version only')\n .option('--tag <tag>', 'npm dist-tag to upgrade to (e.g. canary)', 'latest')\n .action(async (options) => {\n const { upgrade } = await import('./upgrade');\n return upgrade(options.projectRoot, {\n dryRun: options.dryRun === true,\n distTag: options.tag,\n });\n });\n\n /**\n * DICTIONARIES\n */\n\n const dictionariesProgram = program\n .command('dictionary')\n .alias('dictionaries')\n .alias('dic')\n .description('Dictionaries operations');\n\n // Dictionary build command\n const buildOptions = {\n description: 'Build the dictionaries',\n options: [\n ['-w, --watch', 'Watch for changes'],\n ['--skip-prepare', 'Skip the prepare step'],\n ['--with [with...]', 'Start command in parallel with the build'],\n ['--check-types', 'Check TypeScript type and log errors'],\n ],\n };\n\n // Add build command to dictionaries program\n const dictionariesBuildCmd = dictionariesProgram\n .command('build')\n .description(buildOptions.description);\n\n applyOptions(dictionariesBuildCmd, buildOptions.options);\n applyConfigOptions(dictionariesBuildCmd);\n dictionariesBuildCmd.action(async (options) => {\n const { build } = await import('./build');\n build({\n ...options,\n configOptions: extractConfigOptions(options),\n });\n });\n\n // Add build command to root program as well\n const rootBuildCmd = program\n .command('build')\n .description(buildOptions.description);\n\n applyOptions(rootBuildCmd, buildOptions.options);\n applyConfigOptions(rootBuildCmd);\n rootBuildCmd.action(async (options) => {\n const { build } = await import('./build');\n build({\n ...options,\n configOptions: extractConfigOptions(options),\n });\n });\n\n const watchOptions = {\n description: 'Watch the dictionaries changes',\n options: [['--with [with...]', 'Start command in parallel with the build']],\n };\n\n // Add build command to dictionaries program\n const dictionariesWatchCmd = dictionariesProgram\n .command('watch')\n .description(buildOptions.description);\n\n applyOptions(dictionariesWatchCmd, watchOptions.options);\n applyConfigOptions(dictionariesWatchCmd);\n dictionariesWatchCmd.action(async (options) => {\n const { watchContentDeclaration } = await import('./watch');\n watchContentDeclaration({\n ...options,\n configOptions: extractConfigOptions(options),\n });\n });\n\n // Add build command to root program as well\n const rootWatchCmd = program\n .command('watch')\n .description(buildOptions.description);\n\n applyOptions(rootWatchCmd, watchOptions.options);\n applyConfigOptions(rootWatchCmd);\n rootWatchCmd.action(async (options) => {\n const { watchContentDeclaration } = await import('./watch');\n watchContentDeclaration({\n ...options,\n configOptions: extractConfigOptions(options),\n });\n });\n\n // Dictionary pull command\n const pullOptions = {\n description: 'Pull dictionaries from the server',\n options: [\n ['-d, --dictionaries [ids...]', 'List of dictionary IDs to pull'],\n [\n '--dictionary [ids...]',\n 'List of dictionary IDs to pull (alias for --dictionaries)',\n ],\n ['--new-dictionaries-path [path]', 'Path to save the new dictionaries'],\n // Backward-compatibility for older tests/flags (camelCase)\n [\n '--newDictionariesPath [path]',\n '[alias] Path to save the new dictionaries',\n ],\n ],\n };\n\n // Add pull command to dictionaries program\n const dictionariesPullCmd = dictionariesProgram\n .command('pull')\n .description(pullOptions.description);\n\n applyOptions(dictionariesPullCmd, pullOptions.options);\n applyConfigOptions(dictionariesPullCmd);\n dictionariesPullCmd.action(async (options) => {\n const { pull } = await import('./pull');\n // Merge dictionary aliases\n const dictionaries = [\n ...(options.dictionaries ?? []),\n ...(options.dictionary ?? []),\n ];\n\n pull({\n ...options,\n dictionaries: dictionaries.length > 0 ? dictionaries : undefined,\n configOptions: extractConfigOptions(options),\n });\n });\n\n // Add pull command to root program as well\n const rootPullCmd = program\n .command('pull')\n .description(pullOptions.description);\n\n applyOptions(rootPullCmd, pullOptions.options);\n applyConfigOptions(rootPullCmd);\n rootPullCmd.action(async (options) => {\n const { pull } = await import('./pull');\n // Merge dictionary aliases\n const dictionaries = [\n ...(options.dictionaries ?? []),\n ...(options.dictionary ?? []),\n ];\n\n pull({\n ...options,\n dictionaries: dictionaries.length > 0 ? dictionaries : undefined,\n configOptions: extractConfigOptions(options),\n });\n });\n\n // Dictionary push command\n const pushOptions = {\n description:\n 'Push all dictionaries. Create or update the pushed dictionaries',\n options: [\n ['-d, --dictionaries [ids...]', 'List of dictionary IDs to push'],\n [\n '--dictionary [ids...]',\n 'List of dictionary IDs to push (alias for --dictionaries)',\n ],\n [\n '-r, --delete-locale-dictionary',\n 'Delete the local dictionaries after pushing',\n ],\n [\n '-k, --keep-locale-dictionary',\n 'Keep the local dictionaries after pushing',\n ],\n // Backward-compatibility for older tests/flags (camelCase)\n [\n '--deleteLocaleDictionary',\n '[alias] Delete the local dictionaries after pushing',\n ],\n [\n '--keepLocaleDictionary',\n '[alias] Keep the local dictionaries after pushing',\n ],\n [\n '--build [build]',\n 'Build the dictionaries before pushing to ensure the content is up to date. True will force the build, false will skip the build, undefined will allow using the cache of the build',\n ],\n ],\n };\n\n // Add push command to dictionaries program\n const dictionariesPushCmd = dictionariesProgram\n .command('push')\n .description(pushOptions.description);\n\n applyOptions(dictionariesPushCmd, pushOptions.options);\n applyConfigOptions(dictionariesPushCmd);\n applyGitOptions(dictionariesPushCmd);\n\n dictionariesPushCmd.action(async (options) => {\n const { push } = await import('./push/push');\n // Merge dictionary aliases\n const dictionaries = [\n ...(options.dictionaries || []),\n ...(options.dictionary || []),\n ];\n\n return push({\n ...options,\n dictionaries: dictionaries.length > 0 ? dictionaries : undefined,\n gitOptions: extractGitOptions(options),\n configOptions: extractConfigOptions(options),\n } as FillOptions);\n });\n\n // Add push command to root program as well\n const rootPushCmd = program\n .command('push')\n .description(pushOptions.description);\n\n applyOptions(rootPushCmd, pushOptions.options);\n applyConfigOptions(rootPushCmd);\n applyGitOptions(rootPushCmd);\n\n rootPushCmd.action(async (options) => {\n const { push } = await import('./push/push');\n // Merge dictionary aliases\n const dictionaries = [\n ...(options.dictionaries || []),\n ...(options.dictionary || []),\n ];\n\n return push({\n ...options,\n dictionaries: dictionaries.length > 0 ? dictionaries : undefined,\n gitOptions: extractGitOptions(options),\n configOptions: extractConfigOptions(options),\n } as FillOptions);\n });\n\n /**\n * CONFIGURATION\n */\n\n // Define the parent command\n const configurationProgram = program\n .command('configuration')\n .alias('config')\n .alias('conf')\n .description('Configuration operations');\n\n const configGetCmd = configurationProgram\n .command('get')\n .description('Get the configuration');\n\n applyConfigOptions(configGetCmd);\n configGetCmd.action(async (options) => {\n const { getConfig } = await import('./config');\n getConfig({\n ...options,\n configOptions: extractConfigOptions(options),\n });\n });\n\n // Define the `push config` subcommand and add it to the `push` command\n const configPushCmd = configurationProgram\n .command('push')\n .description('Push the configuration');\n\n applyConfigOptions(configPushCmd);\n configPushCmd.action(async (options) => {\n const { pushConfig } = await import('./pushConfig');\n pushConfig({\n ...options,\n configOptions: extractConfigOptions(options),\n });\n });\n\n /**\n * PROJECTS\n */\n\n const projectsProgram = program\n .command('projects')\n .alias('project')\n .description('List Intlayer projects');\n\n const projectsListCmd = projectsProgram\n .command('list')\n .description('List all Intlayer projects in the directory')\n .option('--base-dir [baseDir]', 'Base directory to search from')\n .option(\n '--git-root',\n 'Search from the git root directory instead of the base directory'\n )\n .option('--json', 'Output the results as JSON');\n\n projectsListCmd.action(async (options) => {\n const { listProjectsCommand } = await import('./listProjects');\n listProjectsCommand({\n baseDir: options.baseDir,\n gitRoot: options.gitRoot,\n json: options.json,\n });\n });\n\n // Add alias for projects list command at root level\n const rootProjectsListCmd = program\n .command('projects-list')\n .alias('pl')\n .description('List all Intlayer projects in the directory')\n .option('--base-dir [baseDir]', 'Base directory to search from')\n .option(\n '--git-root',\n 'Search from the git root directory instead of the base directory'\n )\n .option('--absolute', 'Output the results as absolute paths')\n .option('--json', 'Output the results as JSON');\n\n rootProjectsListCmd.action(async (options) => {\n const { listProjectsCommand } = await import('./listProjects');\n listProjectsCommand({\n baseDir: options.baseDir,\n gitRoot: options.gitRoot,\n json: options.json,\n absolute: options.absolute,\n });\n });\n\n /**\n * CONTENT DECLARATION\n */\n\n const contentProgram = program\n .command('content')\n .description('Content declaration operations');\n\n contentProgram\n .command('list')\n .description('List the content declaration files')\n .option('--json', 'Output the results as JSON')\n .option('--absolute', 'Output the results as absolute paths')\n .action(async (options) => {\n const { listContentDeclaration } = await import(\n './listContentDeclaration'\n );\n listContentDeclaration({\n json: options.json,\n absolute: options.absolute,\n });\n });\n\n // Add alias for content list command\n program\n .command('list')\n .description('List the content declaration files')\n .option('--json', 'Output the results as JSON')\n .option('--absolute', 'Output the results as absolute paths')\n .action(async (options) => {\n const { listContentDeclaration } = await import(\n './listContentDeclaration'\n );\n listContentDeclaration({\n json: options.json,\n absolute: options.absolute,\n });\n });\n\n const testProgram = contentProgram\n .command('test')\n .description('Test if there are missing translations')\n .option(\n '--build [build]',\n 'Build the dictionaries before testing to ensure the content is up to date. True will force the build, false will skip the build, undefined will allow using the cache of the build'\n );\n\n applyConfigOptions(testProgram);\n testProgram.action(async (options) => {\n const { testMissingTranslations } = await import('./test');\n testMissingTranslations({\n ...options,\n configOptions: extractConfigOptions(options),\n });\n });\n\n // Add alias for content test command\n const rootTestCmd = program\n .command('test')\n .description('Test if there are missing translations')\n .option(\n '--build [build]',\n 'Build the dictionaries before testing to ensure the content is up to date. True will force the build, false will skip the build, undefined will allow using the cache of the build'\n );\n\n applyConfigOptions(rootTestCmd);\n rootTestCmd.action(async (options) => {\n const { testMissingTranslations } = await import('./test');\n testMissingTranslations({\n ...options,\n configOptions: extractConfigOptions(options),\n });\n });\n\n const fillProgram = program\n .command('fill')\n .description('Fill the dictionaries')\n .option('-f, --file [files...]', 'List of Dictionary files to fill')\n .option('--source-locale [sourceLocale]', 'Source locale to translate from')\n .option(\n '--output-locales [outputLocales...]',\n 'Target locales to translate to'\n )\n .option(\n '--mode [mode]',\n 'Fill mode: complete, review. Complete will fill all missing content, review will fill missing content and review existing keys',\n 'complete'\n )\n .option('-k, --keys [keys...]', 'Filter dictionaries based on keys')\n .option(\n '--key [keys...]',\n 'Filter dictionaries based on keys (alias for --keys)'\n )\n .option(\n '--excluded-keys [excludedKeys...]',\n 'Filter out dictionaries based on keys'\n )\n .option(\n '--excluded-key [excludedKeys...]',\n 'Filter out dictionaries based on keys (alias for --excluded-keys)'\n )\n .option(\n '--path-filter [pathFilters...]',\n 'Filter dictionaries based on glob pattern'\n )\n .option(\n '--build [build]',\n 'Build the dictionaries before filling to ensure the content is up to date. True will force the build, false will skip the build, undefined will allow using the cache of the build'\n )\n .option(\n '--skip-metadata',\n 'Skip filling missing metadata (description, title, tags) for dictionaries'\n );\n\n applyConfigOptions(fillProgram);\n applyAIOptions(fillProgram);\n applyGitOptions(fillProgram);\n\n fillProgram.action(async (options) => {\n const { fill } = await import('./fill/fill');\n // Merge key aliases\n const keys = [...(options.keys ?? []), ...(options.key ?? [])];\n const excludedKeys = [\n ...(options.excludedKeys ?? []),\n ...(options.excludedKey ?? []),\n ];\n // Merge dictionary aliases\n const dictionaries = [\n ...(options.dictionaries ?? []),\n ...(options.dictionary ?? []),\n ];\n\n await fill({\n ...options,\n keys: keys.length > 0 ? keys : undefined,\n excludedKeys: excludedKeys.length > 0 ? excludedKeys : undefined,\n dictionaries: dictionaries.length > 0 ? dictionaries : undefined,\n aiOptions: extractAiOptions(options),\n gitOptions: extractGitOptions(options),\n configOptions: extractConfigOptions(options),\n } as FillOptions);\n });\n\n /**\n * DOCS\n */\n\n const docParams = [\n ['--doc-pattern [docPattern...]', 'Documentation pattern'],\n [\n '--excluded-glob-pattern [excludedGlobPattern...]',\n 'Excluded glob pattern',\n ],\n [\n '--nb-simultaneous-file-processed [nbSimultaneousFileProcessed]',\n 'Number of simultaneous file processed',\n ],\n ['--locales [locales...]', 'Locales'],\n ['--base-locale [baseLocale]', 'Base locale'],\n [\n '--custom-instructions [customInstructions]',\n 'Custom instructions added to the prompt. Usefull to apply specific rules regarding formatting, urls translation, etc.',\n ],\n [\n '--skip-if-modified-before [skipIfModifiedBefore]',\n 'Skip the file if it has been modified before the given time. Can be an absolute time as \"2025-12-05\" (string or Date) or a relative time in ms `1 * 60 * 60 * 1000` (1 hour). This option check update time of the file using the `fs.stat` method. So it could be impacted by Git or other tools that modify the file.',\n ],\n [\n '--skip-if-modified-after [skipIfModifiedAfter]',\n 'Skip the file if it has been modified within the given time. Can be an absolute time as \"2025-12-05\" (string or Date) or a relative time in ms `1 * 60 * 60 * 1000` (1 hour). This option check update time of the file using the `fs.stat` method. So it could be impacted by Git or other tools that modify the file.',\n ],\n ['--skip-if-exists', 'Skip the file if it already exists'],\n ];\n\n const docProgram = program\n .command('doc')\n .description('Documentation operations');\n\n const translateProgram = docProgram\n .command('translate')\n .description('Translate the documentation');\n\n applyConfigOptions(translateProgram);\n applyAIOptions(translateProgram);\n applyGitOptions(translateProgram);\n applyOptions(translateProgram, docParams);\n\n translateProgram.action(async (options) => {\n const { translateDoc } = await import('./translateDoc/translateDoc');\n return translateDoc({\n docPattern: options.docPattern,\n excludedGlobPattern: options.excludedGlobPattern,\n locales: options.locales,\n baseLocale: options.baseLocale,\n aiOptions: extractAiOptions(options),\n gitOptions: extractGitOptions(options),\n nbSimultaneousFileProcessed: options.nbSimultaneousFileProcessed,\n configOptions: extractConfigOptions(options),\n customInstructions: options.customInstructions,\n skipIfModifiedBefore: options.skipIfModifiedBefore,\n skipIfModifiedAfter: options.skipIfModifiedAfter,\n skipIfExists: options.skipIfExists,\n });\n });\n\n const reviewProgram = docProgram\n .command('review')\n .description('Review the documentation')\n .option(\n '--mode [mode]',\n 'How the review runs: \"apply\" (default) translates the diverging blocks with AI and writes the files; \"report\" calls no AI and logs the blocks that need attention (line numbers and content, for both locales) to help another agent generate the translations; \"synthesis\" calls no AI and only logs the final recap of the documents that are up to date and the ones that have blocks to edit.',\n 'apply'\n );\n\n applyConfigOptions(reviewProgram);\n applyAIOptions(reviewProgram);\n applyGitOptions(reviewProgram);\n applyOptions(reviewProgram, docParams);\n\n reviewProgram.action(async (options) => {\n const { reviewDoc } = await import('./reviewDoc/reviewDoc');\n await reviewDoc({\n docPattern: options.docPattern,\n excludedGlobPattern: options.excludedGlobPattern,\n locales: options.locales,\n baseLocale: options.baseLocale,\n aiOptions: extractAiOptions(options),\n gitOptions: extractGitOptions(options),\n nbSimultaneousFileProcessed: options.nbSimultaneousFileProcessed,\n configOptions: extractConfigOptions(options),\n customInstructions: options.customInstructions,\n skipIfModifiedBefore: options.skipIfModifiedBefore,\n skipIfModifiedAfter: options.skipIfModifiedAfter,\n skipIfExists: options.skipIfExists,\n mode: options.mode,\n });\n });\n\n const searchProgram = docProgram\n .command('search')\n .description('Search the documentation')\n .argument('<query>', 'Search query')\n .option('--limit [limit]', 'Limit the number of results', '10');\n\n applyConfigOptions(searchProgram);\n\n searchProgram.action(async (query, options) => {\n const { searchDoc } = await import('./searchDoc');\n return searchDoc({\n query,\n limit: options.limit ? parseInt(options.limit, 10) : 10,\n configOptions: extractConfigOptions(options),\n });\n });\n\n /**\n * LIVE SYNC\n */\n\n const liveOptions = [\n ['--with [with...]', 'Start command in parallel with the live sync'],\n ];\n\n const liveCmd = program\n .command('live')\n .description(\n 'Live sync - Watch for changes made on the CMS and update the application content accordingly'\n );\n\n applyOptions(liveCmd, liveOptions);\n applyConfigOptions(liveCmd);\n\n liveCmd.action(async (options) => {\n const { liveSync } = await import('./liveSync');\n return liveSync({\n ...options,\n configOptions: extractConfigOptions(options),\n });\n });\n\n /**\n * EDITOR\n */\n\n const editorProgram = program\n .command('editor')\n .description('Visual editor operations');\n\n const editorStartCmd = editorProgram\n .command('start')\n .description('Start the Intlayer visual editor');\n\n applyConfigOptions(editorStartCmd);\n\n editorStartCmd.action(async (options) => {\n const { startEditor } = await import('./editor');\n startEditor({\n env: options.env,\n envFile: options.envFile,\n });\n });\n\n /**\n * EXTRACT\n */\n const extractProgram = program\n .command('extract')\n .alias('ext')\n .description(\n 'Extract strings from components to be placed in a .content file close to the component'\n );\n\n applyConfigOptions(extractProgram);\n\n extractProgram\n .option('-f, --file [files...]', 'List of files to extract')\n .option('--code-only', 'Only extract the component code', false)\n .option('--declaration-only', 'Only generate content declaration', false)\n .action(async (options) => {\n const { extract } = await import('./extract');\n extract({\n files: options.file,\n configOptions: extractConfigOptions(options),\n codeOnly: options.codeOnly,\n declarationOnly: options.declarationOnly,\n });\n });\n\n /**\n * STANDALONE\n */\n const bundleCmd = program\n .command('standalone')\n .description('Create a standalone bundle of the application content')\n .option(\n '-o, --outfile [outfile]',\n 'Output file for the bundle',\n 'intlayer-bundle.js'\n )\n .option('--packages [packages...]', 'List of packages to bundle')\n .option('--version [version]', 'Version of the packages to bundle')\n .option('--minify', 'Minify the output')\n .option('--platform [platform]', 'Target platform', 'browser')\n .option('--format [format]', 'Output format', 'esm')\n .action(async (options) => {\n const { bundle } = await import('./bundle');\n bundle({\n outfile: options.outfile,\n bundlePackages: options.packages,\n version: options.version,\n minify: options.minify,\n platform: options.platform,\n format: options.format,\n configOptions: extractConfigOptions(options),\n });\n });\n\n applyConfigOptions(bundleCmd);\n\n /**\n * SCAN\n */\n const scanCmd = program\n .command('scan')\n .description(\n 'Scan a website to measure its page size and audit its i18n / SEO health'\n )\n .argument('<url>', 'URL of the website to scan')\n .option('--no-deep', 'Disable the deeper puppeteer-based render scan')\n .option('--json', 'Output the results as JSON');\n\n applyConfigOptions(scanCmd);\n\n scanCmd.action(async (url, options) => {\n const { scan } = await import('./scan');\n return scan(url, {\n deep: options.deep,\n json: options.json,\n configOptions: extractConfigOptions(options),\n });\n });\n\n /**\n * CI / AUTOMATION\n *\n * `--ci` is accepted by every command. It re-runs the same command (flag\n * stripped) in every Intlayer project of the repository, injecting\n * per-project credentials from INTLAYER_PROJECT_CREDENTIALS. Handled once at\n * the program level so no action needs to know about it: the process exits\n * with the aggregated status once every project has run.\n */\n program.hook('preAction', async (_program, actionCommand) => {\n if (!actionCommand.opts().ci) return;\n\n const { runCI } = await import('./ci');\n process.exit(await runCI(process.argv.slice(2)));\n });\n\n /**\n * @deprecated `intlayer ci <command...>` is replaced by `intlayer <command> --ci`.\n * Kept hidden so workflows scaffolded by older versions keep working.\n */\n program\n .command('ci', { hidden: true })\n .argument('<command...>', 'The intlayer command to execute')\n .allowUnknownOption() // Forward flags like --verbose to the subcommand\n .action(async (args: string[]) => {\n logger(\n '`intlayer ci <command>` is deprecated, use `intlayer <command> --ci` instead.',\n { level: 'warn' }\n );\n const { runCI } = await import('./ci');\n process.exit(await runCI(args));\n });\n\n // Hand the arguments after a subcommand name to that subcommand in order, so\n // `init` can let its subcommands own the options it declares too (see\n // `initCmd`). Set last: commands created before do not inherit it.\n program.enablePositionalOptions();\n\n // Every command must be registered before parsing: commander dispatches\n // synchronously, so anything added after this line is an unknown command.\n program.parse(process.argv);\n\n return program;\n};\n"],"mappings":";;;;;;;;;AAmBA,MAAM,aAAa,yDAA2B;AAE9C,MAAa,UAAU,iBACnBA,uBAAYC,qEAA6B,CAAC,IAC1C;AAEJ,MAAM,cAAcC,wDAAqB,OAAO;AAEhD,MAAM,aAAa,CACjB,CAAC,aAAa,qCAAqC,GACnD,CAAC,qBAAqB,QAAQ,CAChC;AAEA,MAAM,YAAY,CAChB,CACE,QACA,sKACF,CACF;AAEA,MAAM,uBAAuB;CAC3B,CAAC,wBAAwB,kBAAkB;CAC3C,CAAC,mBAAmB,aA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AAC;;;;;CAMD,QACG,QAAQ,MAAM,EAAE,QAAQ,KAAK,CAAC,CAAC,CAC/B,SAAS,gBAAgB,iCAAiC,CAAC,CAC3D,mBAAmB,CAAC,CACpB,OAAO,OAAO,SAAmB;EAChC,oCACE,iFACA,EAAE,OAAO,OAAO,CAClB;EACA,MAAM,EAAE,UAAU,2CAAM;EACxB,QAAQ,KAAK,MAAM,MAAM,IAAI,CAAC;CAChC,CAAC;CAKH,QAAQ,wBAAwB;CAIhC,QAAQ,MAAM,QAAQ,IAAI;CAE1B,OAAO;AACT"}
|
|
1
|
+
{"version":3,"file":"cli.cjs","names":["pathDirname","fileURLToPath","getParentPackageJSON","getConfiguration","Command","Option"],"sources":["../../src/cli.ts"],"sourcesContent":["import { dirname as pathDirname } from 'node:path';\nimport { fileURLToPath } from 'node:url';\nimport type { AIOptions as BaseAIOptions } from '@intlayer/ai';\nimport { logger, setPrefix } from '@intlayer/config/logger';\nimport {\n type GetConfigurationOptions,\n getConfiguration,\n} from '@intlayer/config/node';\nimport type { DiffMode, ListGitFilesOptions } from '@intlayer/engine/cli';\nimport type { CustomIntlayerConfig } from '@intlayer/types/config';\nimport { Command, Option } from 'commander';\nimport type { FillOptions } from './fill/fill';\nimport { getParentPackageJSON } from './utils/getParentPackageJSON';\n\n// Extended AI options to include customPrompt\ntype AIOptions = BaseAIOptions & {\n customPrompt?: string;\n};\n\nconst isESModule = typeof import.meta.url === 'string';\n\nexport const dirname = isESModule\n ? pathDirname(fileURLToPath(import.meta.url))\n : __dirname;\n\nconst packageJson = getParentPackageJSON(dirname);\n\nconst logOptions = [\n ['--verbose', 'Verbose (default to true using CLI)'],\n ['--prefix [prefix]', 'Prefix'],\n];\n\nconst ciOptions = [\n [\n '--ci',\n 'CI mode - Run the command in every Intlayer project of the repository (or only the current one), injecting per-project credentials from INTLAYER_PROJECT_CREDENTIALS',\n ],\n];\n\nconst configurationOptions = [\n ['--env-file [envFile]', 'Environment file'],\n ['-e, --env [env]', 'Environment'],\n ['--base-dir [baseDir]', 'Base directory'],\n ['--no-cache [noCache]', 'No cache'],\n ...logOptions,\n ...ciOptions,\n];\n\nconst aiOptions = [\n ['--provider [provider]', 'Provider'],\n ['--temperature [temperature]', 'Temperature'],\n ['--model [model]', 'Model'],\n ['--api-key [apiKey]', 'Provider API key'],\n ['--custom-prompt [prompt]', 'Custom prompt'],\n ['--application-context [applicationContext]', 'Application context'],\n ['--data-serialization [dataSerialization]', 'Data serialization'],\n];\n\nconst gitOptions = [\n ['--git-diff [gitDiff]', 'Git diff mode - Check git diff between two refs'],\n ['--git-diff-base [gitDiffBase]', 'Git diff base ref'],\n ['--git-diff-current [gitDiffCurrent]', 'Git diff current ref'],\n ['--uncommitted [uncommitted]', 'Uncommitted'],\n ['--unpushed [unpushed]', 'Unpushed'],\n ['--untracked [untracked]', 'Untracked'],\n];\n\nconst extractKeysFromOptions = (options: object, keys: string[]) =>\n keys.filter((key) => options[key as keyof typeof options] !== undefined);\n\n/**\n * Helper functions to apply common options to commands\n */\nconst applyOptions = (command: Command, options: string[][]) => {\n options.forEach(([flag, description]) => {\n command.option(flag!, description);\n });\n return command;\n};\n\nconst removeUndefined = <T extends Record<string, any>>(obj: T): T =>\n Object.fromEntries(\n Object.entries(obj).filter(([_, value]) => value !== undefined)\n ) as T;\n\nconst applyConfigOptions = (command: Command) =>\n applyOptions(command, configurationOptions);\nconst applyAIOptions = (command: Command) => applyOptions(command, aiOptions);\nconst applyGitOptions = (command: Command) => applyOptions(command, gitOptions);\n\nconst extractAiOptions = (options: AIOptions): AIOptions | undefined => {\n const {\n apiKey,\n provider,\n model,\n temperature,\n applicationContext,\n customPrompt,\n dataSerialization,\n } = options;\n\n const configuration = getConfiguration();\n\n const { ai } = configuration;\n\n // `AIOptions` is discriminated on `provider`, which is only known at runtime\n // here (CLI flag or configuration file), so the merged object cannot be\n // narrowed to a single member of the union.\n return removeUndefined({\n ...ai,\n apiKey: apiKey ?? configuration.ai?.apiKey,\n provider: provider ?? (configuration.ai?.provider as AIOptions['provider']),\n model: model ?? configuration.ai?.model,\n temperature: temperature ?? configuration.ai?.temperature,\n applicationContext:\n applicationContext ?? configuration.ai?.applicationContext,\n customPrompt: customPrompt ?? (configuration.ai as any)?.customPrompt,\n dataSerialization: dataSerialization ?? configuration.ai?.dataSerialization,\n }) as AIOptions;\n};\n\ntype GitOptions = {\n gitDiff?: boolean;\n gitDiffBase?: string;\n gitDiffCurrent?: string;\n uncommitted?: boolean;\n unpushed?: boolean;\n untracked?: boolean;\n};\n\nconst gitOptionKeys: (keyof GitOptions)[] = [\n 'gitDiff',\n 'gitDiffBase',\n 'gitDiffCurrent',\n 'uncommitted',\n 'unpushed',\n 'untracked',\n];\n\nconst extractGitOptions = (\n options: GitOptions\n): ListGitFilesOptions | undefined => {\n const filteredOptions = extractKeysFromOptions(options, gitOptionKeys);\n\n const isOptionEmpty = filteredOptions.length === 0;\n\n if (isOptionEmpty) return undefined;\n\n const {\n gitDiff,\n gitDiffBase,\n gitDiffCurrent,\n uncommitted,\n unpushed,\n untracked,\n } = options;\n\n const mode = [\n gitDiff && 'gitDiff',\n uncommitted && 'uncommitted',\n unpushed && 'unpushed',\n untracked && 'untracked',\n ].filter(Boolean) as DiffMode[];\n\n return removeUndefined({\n mode,\n baseRef: gitDiffBase,\n currentRef: gitDiffCurrent,\n absolute: true,\n });\n};\n\ntype LogOptions = {\n prefix?: string;\n verbose?: boolean;\n};\n\nexport type ConfigurationOptions = {\n baseDir?: string;\n env?: string;\n envFile?: string;\n noCache?: boolean;\n checkTypes?: boolean;\n} & LogOptions;\n\nconst configurationOptionKeys: (keyof ConfigurationOptions)[] = [\n 'baseDir',\n 'env',\n 'envFile',\n 'verbose',\n 'prefix',\n 'checkTypes',\n];\n\nconst extractConfigOptions = (\n options: ConfigurationOptions & { with?: string }\n): GetConfigurationOptions | undefined => {\n const filteredOptions = extractKeysFromOptions(\n options,\n configurationOptionKeys\n );\n\n const isOptionEmpty = filteredOptions.length === 0;\n\n if (isOptionEmpty) {\n return undefined;\n }\n\n const { baseDir, env, envFile, verbose, noCache, checkTypes } = options;\n\n const log = removeUndefined({\n mode:\n typeof verbose !== 'undefined'\n ? verbose\n ? 'verbose'\n : 'default'\n : undefined,\n });\n\n const build = removeUndefined({\n checkTypes,\n });\n\n const override: CustomIntlayerConfig = removeUndefined({\n log:\n Object.keys(log).length > 0\n ? (log as CustomIntlayerConfig['log'])\n : undefined,\n build: Object.keys(build).length > 0 ? build : undefined,\n });\n\n return removeUndefined({\n baseDir,\n env,\n envFile,\n override: Object.keys(override).length > 0 ? override : undefined,\n cache: typeof noCache !== 'undefined' ? !noCache : undefined,\n });\n};\n\n/**\n * Set the API for the CLI\n *\n * Example of commands:\n *\n * npm run intlayer build --watch\n * npm run intlayer push --dictionaries id1 id2 id3 --deleteLocaleDir\n */\nexport const setAPI = (): Command => {\n const isWithCommand = process.argv.includes('--with');\n\n if (!isWithCommand) {\n setPrefix('');\n }\n\n const program = new Command();\n\n program\n .version(\n packageJson.version!,\n '-v, --version',\n 'Print the Intlayer CLI version'\n )\n .description('Intlayer CLI');\n\n // Keep `-V` (commander's default short flag) working alongside `-v`\n program.addOption(\n new Option('-V', 'Print the Intlayer CLI version').hideHelp()\n );\n program.on('option:V', () => {\n console.log(packageJson.version ?? 'unknown');\n process.exit(0);\n });\n\n // Explicit version subcommand for convenience: `npx intlayer version`\n program\n .command('version')\n .description('Print the Intlayer CLI version')\n .action(() => {\n // Prefer the resolved package.json version; fallback to unknown\n // Keeping output minimal to align with common CLI behavior\n console.log(packageJson.version ?? 'unknown');\n });\n\n /**\n * AUTH\n */\n const loginCmd = program\n .command('login')\n .description('Login to Intlayer')\n .option('--cms-url [cmsUrl]', 'CMS URL');\n\n applyConfigOptions(loginCmd);\n\n loginCmd.action(async (options) => {\n const { login } = await import('./auth/login');\n const configOptions = extractConfigOptions(options) ?? {\n override: {\n log: {\n prefix: '',\n mode: 'verbose',\n },\n },\n };\n\n return login({\n cmsUrl: options.cmsUrl,\n configOptions,\n });\n });\n\n /**\n * INIT\n */\n const initCmd = program\n .command('init')\n // Options after a subcommand belong to it: `init project --routing` and\n // `init skills --project-root` must not be consumed by `init` itself,\n // which declares the same options. Needs the root to be positional too.\n .enablePositionalOptions()\n .description(\n 'Install the Intlayer packages and set up the framework. Use --interactive, or the init subcommands, for the other setup steps (CI, skills, MCP, VS Code, LSP, lint, CMS, …)'\n )\n .option('--project-root [projectRoot]', 'Project root directory')\n .option('--no-gitignore', 'Do not add .intlayer to .gitignore')\n .option(\n '--no-github-actions',\n 'With --interactive: do not scaffold the GitHub Actions workflows, even if selected'\n )\n .option(\n '--no-framework-setup',\n 'Do not set up the project (Intlayer config, tsconfig, bundler plugin, middleware/proxy, providers in layout/page)'\n )\n .option(\n '-i, --interactive',\n 'Interactively choose what to set up (packages, skills, MCP, VS Code extension, LSP, …). Needs a terminal'\n )\n .option(\n '--routing <routing>',\n 'Locale routing: prefix-no-default | prefix-all | no-prefix | search-params | none'\n )\n .option(\n '--content <layout>',\n 'Content declaration layout: multilingual | per-locale | centralized | namespaces'\n )\n .option(\n '--content-format <format>',\n 'Content format, used with --content: ts | json (multilingual, per-locale), json | po (centralized, namespaces)'\n )\n .option(\n '--message-format <format>',\n 'Message format of JSON catalogs, used with --content centralized | namespaces: icu | i18next | vue-i18n | intlayer'\n )\n .action(async (options) => {\n const {\n init,\n parseLocaleRoutingChoice,\n getRoutingInitOptions,\n getContentInitOptions,\n } = await import('./init');\n return init(\n options.projectRoot,\n {\n noGitignore: options.gitignore === false,\n noGithubActions: options.githubActions === false,\n noFrameworkSetup: options.frameworkSetup === false,\n upgradeToVersion: packageJson.version,\n ...(options.routing\n ? getRoutingInitOptions(parseLocaleRoutingChoice(options.routing))\n : {}),\n ...getContentInitOptions(\n options.content,\n options.contentFormat,\n options.messageFormat\n ),\n },\n options.interactive === true\n );\n });\n\n initCmd\n .command('packages')\n .description(\n 'Install the missing Intlayer packages and upgrade the outdated ones'\n )\n .option('--project-root [projectRoot]', 'Project root directory')\n .action(async (options) => {\n const { initSteps } = await import('./init');\n return initSteps(options.projectRoot, ['packages'], {\n upgradeToVersion: packageJson.version,\n });\n });\n\n initCmd\n .command('project')\n .alias('framework')\n .description(\n 'Set up the project: Intlayer config, tsconfig, bundler plugin, middleware/proxy, providers in layout/page and .gitignore'\n )\n .option('--project-root [projectRoot]', 'Project root directory')\n .option('--no-gitignore', 'Do not add .intlayer to .gitignore')\n .option(\n '--routing <routing>',\n 'Locale routing: prefix-no-default | prefix-all | no-prefix | search-params | none'\n )\n .option(\n '--content <layout>',\n 'Content declaration layout: multilingual | per-locale | centralized | namespaces'\n )\n .option(\n '--content-format <format>',\n 'Content format, used with --content: ts | json (multilingual, per-locale), json | po (centralized, namespaces)'\n )\n .option(\n '--message-format <format>',\n 'Message format of JSON catalogs, used with --content centralized | namespaces: icu | i18next | vue-i18n | intlayer'\n )\n .action(async (options) => {\n const {\n initSteps,\n parseLocaleRoutingChoice,\n getRoutingInitOptions,\n getContentInitOptions,\n } = await import('./init');\n return initSteps(options.projectRoot, ['projectSetup'], {\n noGitignore: options.gitignore === false,\n ...(options.routing\n ? getRoutingInitOptions(parseLocaleRoutingChoice(options.routing))\n : {}),\n ...getContentInitOptions(\n options.content,\n options.contentFormat,\n options.messageFormat\n ),\n });\n });\n\n initCmd\n .command('github-actions')\n .alias('ci')\n .description(\n 'Scaffold the fill and test GitHub Actions workflows that run on every pull request'\n )\n .option('--project-root [projectRoot]', 'Project root directory')\n .action(async (options) => {\n const { initSteps } = await import('./init');\n return initSteps(options.projectRoot, ['githubActions']);\n });\n\n initCmd\n .command('vscode-extension')\n .alias('vscode')\n .description(\n 'Recommend the Intlayer VS Code extension in .vscode/extensions.json'\n )\n .option('--project-root [projectRoot]', 'Project root directory')\n .action(async (options) => {\n const { initSteps } = await import('./init');\n return initSteps(options.projectRoot, ['vscodeExtension']);\n });\n\n initCmd\n .command('lsp')\n .description(\n 'Configure the Intlayer language server in .vscode/settings.json'\n )\n .option('--project-root [projectRoot]', 'Project root directory')\n .action(async (options) => {\n const { initSteps } = await import('./init');\n return initSteps(options.projectRoot, ['lsp']);\n });\n\n initCmd\n .command('eslint')\n .alias('lint')\n .description(\n 'Enable the Intlayer lint rules (ESLint / oxlint), when the project already lints'\n )\n .option('--project-root [projectRoot]', 'Project root directory')\n .action(async (options) => {\n const { initSteps } = await import('./init');\n return initSteps(options.projectRoot, ['eslint'], {\n upgradeToVersion: packageJson.version,\n });\n });\n\n initCmd\n .command('prettier')\n .description(\n 'Add the Intlayer Prettier plugin, when the project already formats with Prettier'\n )\n .option('--project-root [projectRoot]', 'Project root directory')\n .action(async (options) => {\n const { initSteps } = await import('./init');\n return initSteps(options.projectRoot, ['prettier'], {\n upgradeToVersion: packageJson.version,\n });\n });\n\n initCmd\n .command('skills')\n .description('Initialize Intlayer skills in the project')\n .option('--project-root [projectRoot]', 'Project root directory')\n .option(\n '-p, --platform <platform>',\n 'AI platform (e.g. Claude, Cursor, VSCode). Detected when omitted'\n )\n .option(\n '-s, --skills <skills...>',\n 'Skills to install (e.g. Usage Content React). Defaults to the project stack without a terminal'\n )\n .action(async (options) => {\n const { initSkills, parsePlatform, parseSkills } =\n await import('./initSkills');\n await initSkills(options.projectRoot, {\n platform: options.platform\n ? parsePlatform(options.platform)\n : undefined,\n skills: options.skills ? parseSkills(options.skills) : undefined,\n });\n });\n\n initCmd\n .command('mcp')\n .description('Initialize Intlayer MCP server in the project')\n .option('--project-root [projectRoot]', 'Project root directory')\n .option(\n '-p, --platform <platform>',\n 'AI platform (e.g. Claude, Cursor, VSCode). Detected when omitted'\n )\n .option(\n '-t, --transport <transport>',\n 'stdio (local server, default without a terminal) | sse (hosted)'\n )\n .action(async (options) => {\n const { initMCP, parseMCPTransport } = await import('./initMCP');\n const { parsePlatform } = await import('./initSkills');\n return initMCP(options.projectRoot, {\n platform: options.platform\n ? parsePlatform(options.platform)\n : undefined,\n transport: options.transport\n ? parseMCPTransport(options.transport)\n : undefined,\n });\n });\n\n initCmd\n .command('cms')\n .description(\n 'Log in to the Intlayer CMS through your browser, then store the credentials in your .env'\n )\n .option('--project-root [projectRoot]', 'Project root directory')\n .action(async (options) => {\n const { initCms } = await import('./init');\n return initCms(options.projectRoot);\n });\n\n initCmd\n .command('repository')\n .description(\n 'Connect the git repository of the project (GitHub, GitLab, Bitbucket, Codeberg, Gitee) to its CMS project and set its build settings, through your browser'\n )\n .option('--project-root [projectRoot]', 'Project root directory')\n .action(async (options) => {\n const { initRepository } = await import('./init');\n return initRepository(options.projectRoot);\n });\n\n initCmd\n .command('infra')\n .description(\n 'Set up the Intlayer infrastructure: desktop app, all-in-one Docker container or Docker Compose stack (runs https://intlayer.org/install.sh, or install.ps1 on Windows)'\n )\n .option(\n '-m, --mode <mode>',\n 'Skip the menu: desktop | docker | compose (required without a terminal)'\n )\n .action(async (options) => {\n const { initInfra, parseInfraMode } = await import('./initInfra');\n return initInfra({\n mode: options.mode ? parseInfraMode(options.mode) : undefined,\n });\n });\n\n initCmd\n .command('extension')\n .alias('chrome-extension')\n .description(\n 'Install the Intlayer Chrome extension or Firefox add-on in your browser'\n )\n .option(\n '-b, --browser <browsers...>',\n 'Browsers to open the store page for: chrome | firefox. Without a terminal, the links are only printed'\n )\n .action(async (options) => {\n const { initChromeExtension, parseExtensionBrowsers } =\n await import('./initChromeExtension');\n return initChromeExtension({\n browsers: options.browser\n ? parseExtensionBrowsers(options.browser)\n : undefined,\n });\n });\n\n /**\n * UPGRADE\n */\n program\n .command('upgrade')\n .description(\n 'List the Intlayer packages of every package.json of the project and upgrade them to the latest version'\n )\n .option('--project-root [projectRoot]', 'Project root directory')\n .option('--dry-run', 'List the packages and their target version only')\n .option('--tag <tag>', 'npm dist-tag to upgrade to (e.g. canary)', 'latest')\n .action(async (options) => {\n const { upgrade } = await import('./upgrade');\n return upgrade(options.projectRoot, {\n dryRun: options.dryRun === true,\n distTag: options.tag,\n });\n });\n\n /**\n * DICTIONARIES\n */\n\n const dictionariesProgram = program\n .command('dictionary')\n .alias('dictionaries')\n .alias('dic')\n .description('Dictionaries operations');\n\n // Dictionary build command\n const buildOptions = {\n description: 'Build the dictionaries',\n options: [\n ['-w, --watch', 'Watch for changes'],\n ['--skip-prepare', 'Skip the prepare step'],\n ['--with [with...]', 'Start command in parallel with the build'],\n ['--check-types', 'Check TypeScript type and log errors'],\n ],\n };\n\n // Add build command to dictionaries program\n const dictionariesBuildCmd = dictionariesProgram\n .command('build')\n .description(buildOptions.description);\n\n applyOptions(dictionariesBuildCmd, buildOptions.options);\n applyConfigOptions(dictionariesBuildCmd);\n dictionariesBuildCmd.action(async (options) => {\n const { build } = await import('./build');\n build({\n ...options,\n configOptions: extractConfigOptions(options),\n });\n });\n\n // Add build command to root program as well\n const rootBuildCmd = program\n .command('build')\n .description(buildOptions.description);\n\n applyOptions(rootBuildCmd, buildOptions.options);\n applyConfigOptions(rootBuildCmd);\n rootBuildCmd.action(async (options) => {\n const { build } = await import('./build');\n build({\n ...options,\n configOptions: extractConfigOptions(options),\n });\n });\n\n const watchOptions = {\n description: 'Watch the dictionaries changes',\n options: [['--with [with...]', 'Start command in parallel with the build']],\n };\n\n // Add build command to dictionaries program\n const dictionariesWatchCmd = dictionariesProgram\n .command('watch')\n .description(buildOptions.description);\n\n applyOptions(dictionariesWatchCmd, watchOptions.options);\n applyConfigOptions(dictionariesWatchCmd);\n dictionariesWatchCmd.action(async (options) => {\n const { watchContentDeclaration } = await import('./watch');\n watchContentDeclaration({\n ...options,\n configOptions: extractConfigOptions(options),\n });\n });\n\n // Add build command to root program as well\n const rootWatchCmd = program\n .command('watch')\n .description(buildOptions.description);\n\n applyOptions(rootWatchCmd, watchOptions.options);\n applyConfigOptions(rootWatchCmd);\n rootWatchCmd.action(async (options) => {\n const { watchContentDeclaration } = await import('./watch');\n watchContentDeclaration({\n ...options,\n configOptions: extractConfigOptions(options),\n });\n });\n\n // Dictionary pull command\n const pullOptions = {\n description: 'Pull dictionaries from the server',\n options: [\n ['-d, --dictionaries [ids...]', 'List of dictionary IDs to pull'],\n [\n '--dictionary [ids...]',\n 'List of dictionary IDs to pull (alias for --dictionaries)',\n ],\n ['--new-dictionaries-path [path]', 'Path to save the new dictionaries'],\n // Backward-compatibility for older tests/flags (camelCase)\n [\n '--newDictionariesPath [path]',\n '[alias] Path to save the new dictionaries',\n ],\n ],\n };\n\n // Add pull command to dictionaries program\n const dictionariesPullCmd = dictionariesProgram\n .command('pull')\n .description(pullOptions.description);\n\n applyOptions(dictionariesPullCmd, pullOptions.options);\n applyConfigOptions(dictionariesPullCmd);\n dictionariesPullCmd.action(async (options) => {\n const { pull } = await import('./pull');\n // Merge dictionary aliases\n const dictionaries = [\n ...(options.dictionaries ?? []),\n ...(options.dictionary ?? []),\n ];\n\n pull({\n ...options,\n dictionaries: dictionaries.length > 0 ? dictionaries : undefined,\n configOptions: extractConfigOptions(options),\n });\n });\n\n // Add pull command to root program as well\n const rootPullCmd = program\n .command('pull')\n .description(pullOptions.description);\n\n applyOptions(rootPullCmd, pullOptions.options);\n applyConfigOptions(rootPullCmd);\n rootPullCmd.action(async (options) => {\n const { pull } = await import('./pull');\n // Merge dictionary aliases\n const dictionaries = [\n ...(options.dictionaries ?? []),\n ...(options.dictionary ?? []),\n ];\n\n pull({\n ...options,\n dictionaries: dictionaries.length > 0 ? dictionaries : undefined,\n configOptions: extractConfigOptions(options),\n });\n });\n\n // Dictionary push command\n const pushOptions = {\n description:\n 'Push all dictionaries. Create or update the pushed dictionaries',\n options: [\n ['-d, --dictionaries [ids...]', 'List of dictionary IDs to push'],\n [\n '--dictionary [ids...]',\n 'List of dictionary IDs to push (alias for --dictionaries)',\n ],\n [\n '-r, --delete-locale-dictionary',\n 'Delete the local dictionaries after pushing',\n ],\n [\n '-k, --keep-locale-dictionary',\n 'Keep the local dictionaries after pushing',\n ],\n // Backward-compatibility for older tests/flags (camelCase)\n [\n '--deleteLocaleDictionary',\n '[alias] Delete the local dictionaries after pushing',\n ],\n [\n '--keepLocaleDictionary',\n '[alias] Keep the local dictionaries after pushing',\n ],\n [\n '--build [build]',\n 'Build the dictionaries before pushing to ensure the content is up to date. True will force the build, false will skip the build, undefined will allow using the cache of the build',\n ],\n ],\n };\n\n // Add push command to dictionaries program\n const dictionariesPushCmd = dictionariesProgram\n .command('push')\n .description(pushOptions.description);\n\n applyOptions(dictionariesPushCmd, pushOptions.options);\n applyConfigOptions(dictionariesPushCmd);\n applyGitOptions(dictionariesPushCmd);\n\n dictionariesPushCmd.action(async (options) => {\n const { push } = await import('./push/push');\n // Merge dictionary aliases\n const dictionaries = [\n ...(options.dictionaries || []),\n ...(options.dictionary || []),\n ];\n\n return push({\n ...options,\n dictionaries: dictionaries.length > 0 ? dictionaries : undefined,\n gitOptions: extractGitOptions(options),\n configOptions: extractConfigOptions(options),\n } as FillOptions);\n });\n\n // Add push command to root program as well\n const rootPushCmd = program\n .command('push')\n .description(pushOptions.description);\n\n applyOptions(rootPushCmd, pushOptions.options);\n applyConfigOptions(rootPushCmd);\n applyGitOptions(rootPushCmd);\n\n rootPushCmd.action(async (options) => {\n const { push } = await import('./push/push');\n // Merge dictionary aliases\n const dictionaries = [\n ...(options.dictionaries || []),\n ...(options.dictionary || []),\n ];\n\n return push({\n ...options,\n dictionaries: dictionaries.length > 0 ? dictionaries : undefined,\n gitOptions: extractGitOptions(options),\n configOptions: extractConfigOptions(options),\n } as FillOptions);\n });\n\n /**\n * CONFIGURATION\n */\n\n // Define the parent command\n const configurationProgram = program\n .command('configuration')\n .alias('config')\n .alias('conf')\n .description('Configuration operations');\n\n const configGetCmd = configurationProgram\n .command('get')\n .description('Get the configuration');\n\n applyConfigOptions(configGetCmd);\n configGetCmd.action(async (options) => {\n const { getConfig } = await import('./config');\n getConfig({\n ...options,\n configOptions: extractConfigOptions(options),\n });\n });\n\n // Define the `push config` subcommand and add it to the `push` command\n const configPushCmd = configurationProgram\n .command('push')\n .description('Push the configuration');\n\n applyConfigOptions(configPushCmd);\n configPushCmd.action(async (options) => {\n const { pushConfig } = await import('./pushConfig');\n pushConfig({\n ...options,\n configOptions: extractConfigOptions(options),\n });\n });\n\n /**\n * PROJECTS\n */\n\n const projectsProgram = program\n .command('projects')\n .alias('project')\n .description('List Intlayer projects');\n\n const projectsListCmd = projectsProgram\n .command('list')\n .description('List all Intlayer projects in the directory')\n .option('--base-dir [baseDir]', 'Base directory to search from')\n .option(\n '--git-root',\n 'Search from the git root directory instead of the base directory'\n )\n .option('--json', 'Output the results as JSON');\n\n projectsListCmd.action(async (options) => {\n const { listProjectsCommand } = await import('./listProjects');\n listProjectsCommand({\n baseDir: options.baseDir,\n gitRoot: options.gitRoot,\n json: options.json,\n });\n });\n\n // Add alias for projects list command at root level\n const rootProjectsListCmd = program\n .command('projects-list')\n .alias('pl')\n .description('List all Intlayer projects in the directory')\n .option('--base-dir [baseDir]', 'Base directory to search from')\n .option(\n '--git-root',\n 'Search from the git root directory instead of the base directory'\n )\n .option('--absolute', 'Output the results as absolute paths')\n .option('--json', 'Output the results as JSON');\n\n rootProjectsListCmd.action(async (options) => {\n const { listProjectsCommand } = await import('./listProjects');\n listProjectsCommand({\n baseDir: options.baseDir,\n gitRoot: options.gitRoot,\n json: options.json,\n absolute: options.absolute,\n });\n });\n\n /**\n * CONTENT DECLARATION\n */\n\n const contentProgram = program\n .command('content')\n .description('Content declaration operations');\n\n contentProgram\n .command('list')\n .description('List the content declaration files')\n .option('--json', 'Output the results as JSON')\n .option('--absolute', 'Output the results as absolute paths')\n .action(async (options) => {\n const { listContentDeclaration } =\n await import('./listContentDeclaration');\n listContentDeclaration({\n json: options.json,\n absolute: options.absolute,\n });\n });\n\n // Add alias for content list command\n program\n .command('list')\n .description('List the content declaration files')\n .option('--json', 'Output the results as JSON')\n .option('--absolute', 'Output the results as absolute paths')\n .action(async (options) => {\n const { listContentDeclaration } =\n await import('./listContentDeclaration');\n listContentDeclaration({\n json: options.json,\n absolute: options.absolute,\n });\n });\n\n const testProgram = contentProgram\n .command('test')\n .description('Test if there are missing translations')\n .option(\n '--build [build]',\n 'Build the dictionaries before testing to ensure the content is up to date. True will force the build, false will skip the build, undefined will allow using the cache of the build'\n );\n\n applyConfigOptions(testProgram);\n testProgram.action(async (options) => {\n const { testMissingTranslations } = await import('./test');\n testMissingTranslations({\n ...options,\n configOptions: extractConfigOptions(options),\n });\n });\n\n // Add alias for content test command\n const rootTestCmd = program\n .command('test')\n .description('Test if there are missing translations')\n .option(\n '--build [build]',\n 'Build the dictionaries before testing to ensure the content is up to date. True will force the build, false will skip the build, undefined will allow using the cache of the build'\n );\n\n applyConfigOptions(rootTestCmd);\n rootTestCmd.action(async (options) => {\n const { testMissingTranslations } = await import('./test');\n testMissingTranslations({\n ...options,\n configOptions: extractConfigOptions(options),\n });\n });\n\n const fillProgram = program\n .command('fill')\n .description('Fill the dictionaries')\n .option('-f, --file [files...]', 'List of Dictionary files to fill')\n .option('--source-locale [sourceLocale]', 'Source locale to translate from')\n .option(\n '--output-locales [outputLocales...]',\n 'Target locales to translate to'\n )\n .option(\n '--mode [mode]',\n 'Fill mode: complete, review. Complete will fill all missing content, review will fill missing content and review existing keys',\n 'complete'\n )\n .option('-k, --keys [keys...]', 'Filter dictionaries based on keys')\n .option(\n '--key [keys...]',\n 'Filter dictionaries based on keys (alias for --keys)'\n )\n .option(\n '--excluded-keys [excludedKeys...]',\n 'Filter out dictionaries based on keys'\n )\n .option(\n '--excluded-key [excludedKeys...]',\n 'Filter out dictionaries based on keys (alias for --excluded-keys)'\n )\n .option(\n '--path-filter [pathFilters...]',\n 'Filter dictionaries based on glob pattern'\n )\n .option(\n '--build [build]',\n 'Build the dictionaries before filling to ensure the content is up to date. True will force the build, false will skip the build, undefined will allow using the cache of the build'\n )\n .option(\n '--skip-metadata',\n 'Skip filling missing metadata (description, title, tags) for dictionaries'\n );\n\n applyConfigOptions(fillProgram);\n applyAIOptions(fillProgram);\n applyGitOptions(fillProgram);\n\n fillProgram.action(async (options) => {\n const { fill } = await import('./fill/fill');\n // Merge key aliases\n const keys = [...(options.keys ?? []), ...(options.key ?? [])];\n const excludedKeys = [\n ...(options.excludedKeys ?? []),\n ...(options.excludedKey ?? []),\n ];\n // Merge dictionary aliases\n const dictionaries = [\n ...(options.dictionaries ?? []),\n ...(options.dictionary ?? []),\n ];\n\n await fill({\n ...options,\n keys: keys.length > 0 ? keys : undefined,\n excludedKeys: excludedKeys.length > 0 ? excludedKeys : undefined,\n dictionaries: dictionaries.length > 0 ? dictionaries : undefined,\n aiOptions: extractAiOptions(options),\n gitOptions: extractGitOptions(options),\n configOptions: extractConfigOptions(options),\n } as FillOptions);\n });\n\n /**\n * DOCS\n */\n\n const docParams = [\n ['--doc-pattern [docPattern...]', 'Documentation pattern'],\n [\n '--excluded-glob-pattern [excludedGlobPattern...]',\n 'Excluded glob pattern',\n ],\n [\n '--nb-simultaneous-file-processed [nbSimultaneousFileProcessed]',\n 'Number of simultaneous file processed',\n ],\n ['--locales [locales...]', 'Locales'],\n ['--base-locale [baseLocale]', 'Base locale'],\n [\n '--custom-instructions [customInstructions]',\n 'Custom instructions added to the prompt. Usefull to apply specific rules regarding formatting, urls translation, etc.',\n ],\n [\n '--skip-if-modified-before [skipIfModifiedBefore]',\n 'Skip the file if it has been modified before the given time. Can be an absolute time as \"2025-12-05\" (string or Date) or a relative time in ms `1 * 60 * 60 * 1000` (1 hour). This option check update time of the file using the `fs.stat` method. So it could be impacted by Git or other tools that modify the file.',\n ],\n [\n '--skip-if-modified-after [skipIfModifiedAfter]',\n 'Skip the file if it has been modified within the given time. Can be an absolute time as \"2025-12-05\" (string or Date) or a relative time in ms `1 * 60 * 60 * 1000` (1 hour). This option check update time of the file using the `fs.stat` method. So it could be impacted by Git or other tools that modify the file.',\n ],\n ['--skip-if-exists', 'Skip the file if it already exists'],\n ];\n\n const docProgram = program\n .command('doc')\n .description('Documentation operations');\n\n const translateProgram = docProgram\n .command('translate')\n .description('Translate the documentation');\n\n applyConfigOptions(translateProgram);\n applyAIOptions(translateProgram);\n applyGitOptions(translateProgram);\n applyOptions(translateProgram, docParams);\n\n translateProgram.action(async (options) => {\n const { translateDoc } = await import('./translateDoc/translateDoc');\n return translateDoc({\n docPattern: options.docPattern,\n excludedGlobPattern: options.excludedGlobPattern,\n locales: options.locales,\n baseLocale: options.baseLocale,\n aiOptions: extractAiOptions(options),\n gitOptions: extractGitOptions(options),\n nbSimultaneousFileProcessed: options.nbSimultaneousFileProcessed,\n configOptions: extractConfigOptions(options),\n customInstructions: options.customInstructions,\n skipIfModifiedBefore: options.skipIfModifiedBefore,\n skipIfModifiedAfter: options.skipIfModifiedAfter,\n skipIfExists: options.skipIfExists,\n });\n });\n\n const reviewProgram = docProgram\n .command('review')\n .description('Review the documentation')\n .option(\n '--mode [mode]',\n 'How the review runs: \"apply\" (default) translates the diverging blocks with AI and writes the files; \"report\" calls no AI and logs the blocks that need attention (line numbers and content, for both locales) to help another agent generate the translations; \"synthesis\" calls no AI and only logs the final recap of the documents that are up to date and the ones that have blocks to edit.',\n 'apply'\n );\n\n applyConfigOptions(reviewProgram);\n applyAIOptions(reviewProgram);\n applyGitOptions(reviewProgram);\n applyOptions(reviewProgram, docParams);\n\n reviewProgram.action(async (options) => {\n const { reviewDoc } = await import('./reviewDoc/reviewDoc');\n await reviewDoc({\n docPattern: options.docPattern,\n excludedGlobPattern: options.excludedGlobPattern,\n locales: options.locales,\n baseLocale: options.baseLocale,\n aiOptions: extractAiOptions(options),\n gitOptions: extractGitOptions(options),\n nbSimultaneousFileProcessed: options.nbSimultaneousFileProcessed,\n configOptions: extractConfigOptions(options),\n customInstructions: options.customInstructions,\n skipIfModifiedBefore: options.skipIfModifiedBefore,\n skipIfModifiedAfter: options.skipIfModifiedAfter,\n skipIfExists: options.skipIfExists,\n mode: options.mode,\n });\n });\n\n const searchProgram = docProgram\n .command('search')\n .description('Search the documentation')\n .argument('<query>', 'Search query')\n .option('--limit [limit]', 'Limit the number of results', '10');\n\n applyConfigOptions(searchProgram);\n\n searchProgram.action(async (query, options) => {\n const { searchDoc } = await import('./searchDoc');\n return searchDoc({\n query,\n limit: options.limit ? parseInt(options.limit, 10) : 10,\n configOptions: extractConfigOptions(options),\n });\n });\n\n /**\n * LIVE SYNC\n */\n\n const liveOptions = [\n ['--with [with...]', 'Start command in parallel with the live sync'],\n ];\n\n const liveCmd = program\n .command('live')\n .description(\n 'Live sync - Watch for changes made on the CMS and update the application content accordingly'\n );\n\n applyOptions(liveCmd, liveOptions);\n applyConfigOptions(liveCmd);\n\n liveCmd.action(async (options) => {\n const { liveSync } = await import('./liveSync');\n return liveSync({\n ...options,\n configOptions: extractConfigOptions(options),\n });\n });\n\n /**\n * EDITOR\n */\n\n const editorProgram = program\n .command('editor')\n .description('Visual editor operations');\n\n const editorStartCmd = editorProgram\n .command('start')\n .description('Start the Intlayer visual editor');\n\n applyConfigOptions(editorStartCmd);\n\n editorStartCmd.action(async (options) => {\n const { startEditor } = await import('./editor');\n startEditor({\n env: options.env,\n envFile: options.envFile,\n });\n });\n\n /**\n * EXTRACT\n */\n const extractProgram = program\n .command('extract')\n .alias('ext')\n .description(\n 'Extract strings from components to be placed in a .content file close to the component'\n );\n\n applyConfigOptions(extractProgram);\n\n extractProgram\n .option('-f, --file [files...]', 'List of files to extract')\n .option('--code-only', 'Only extract the component code', false)\n .option('--declaration-only', 'Only generate content declaration', false)\n .action(async (options) => {\n const { extract } = await import('./extract');\n extract({\n files: options.file,\n configOptions: extractConfigOptions(options),\n codeOnly: options.codeOnly,\n declarationOnly: options.declarationOnly,\n });\n });\n\n /**\n * STANDALONE\n */\n const bundleCmd = program\n .command('standalone')\n .description('Create a standalone bundle of the application content')\n .option(\n '-o, --outfile [outfile]',\n 'Output file for the bundle',\n 'intlayer-bundle.js'\n )\n .option('--packages [packages...]', 'List of packages to bundle')\n .option('--version [version]', 'Version of the packages to bundle')\n .option('--minify', 'Minify the output')\n .option('--platform [platform]', 'Target platform', 'browser')\n .option('--format [format]', 'Output format', 'esm')\n .action(async (options) => {\n const { bundle } = await import('./bundle');\n bundle({\n outfile: options.outfile,\n bundlePackages: options.packages,\n version: options.version,\n minify: options.minify,\n platform: options.platform,\n format: options.format,\n configOptions: extractConfigOptions(options),\n });\n });\n\n applyConfigOptions(bundleCmd);\n\n /**\n * SCAN\n */\n const scanCmd = program\n .command('scan')\n .description(\n 'Scan a website to measure its page size and audit its i18n / SEO health'\n )\n .argument(\n '<url>',\n 'URL or domain of the website to scan (e.g. intlayer.org)'\n )\n .option('--no-deep', 'Disable the deeper puppeteer-based render scan')\n .option('--json', 'Output the results as JSON');\n\n applyConfigOptions(scanCmd);\n\n scanCmd.action(async (url, options) => {\n const { scan } = await import('./scan');\n return scan(url, {\n deep: options.deep,\n json: options.json,\n configOptions: extractConfigOptions(options),\n });\n });\n\n /**\n * CI / AUTOMATION\n *\n * `--ci` is accepted by every command. It re-runs the same command (flag\n * stripped) in every Intlayer project of the repository, injecting\n * per-project credentials from INTLAYER_PROJECT_CREDENTIALS. Handled once at\n * the program level so no action needs to know about it: the process exits\n * with the aggregated status once every project has run.\n */\n program.hook('preAction', async (_program, actionCommand) => {\n if (!actionCommand.opts().ci) return;\n\n const { runCI } = await import('./ci');\n process.exit(await runCI(process.argv.slice(2)));\n });\n\n /**\n * @deprecated `intlayer ci <command...>` is replaced by `intlayer <command> --ci`.\n * Kept hidden so workflows scaffolded by older versions keep working.\n */\n program\n .command('ci', { hidden: true })\n .argument('<command...>', 'The intlayer command to execute')\n .allowUnknownOption() // Forward flags like --verbose to the subcommand\n .action(async (args: string[]) => {\n logger(\n '`intlayer ci <command>` is deprecated, use `intlayer <command> --ci` instead.',\n { level: 'warn' }\n );\n const { runCI } = await import('./ci');\n process.exit(await runCI(args));\n });\n\n // Hand the arguments after a subcommand name to that subcommand in order, so\n // `init` can let its subcommands own the options it declares too (see\n // `initCmd`). Set last: commands created before do not inherit it.\n program.enablePositionalOptions();\n\n // Every command must be registered before parsing: commander dispatches\n // synchronously, so anything added after this line is an unknown command.\n program.parse(process.argv);\n\n return program;\n};\n"],"mappings":";;;;;;;;;AAmBA,MAAM,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f,YACC,yEACF,CAAC,CACA,SACC,SACA,0DACF,CAAC,CACA,OAAO,aAAa,gDAAgD,CAAC,CACrE,OAAO,UAAU,4BAA4B;CAEhD,mBAAmB,OAAO;CAE1B,QAAQ,OAAO,OAAO,KAAK,YAAY;EACrC,MAAM,EAAE,SAAS,2CAAM;EACvB,OAAO,KAAK,KAAK;GACf,MAAM,QAAQ;GACd,MAAM,QAAQ;GACd,eAAe,qBAAqB,OAAO;EAC7C,CAAC;CACH,CAAC;;;;;;;;;;CAWD,QAAQ,KAAK,aAAa,OAAO,UAAU,kBAAkB;EAC3D,IAAI,CAAC,cAAc,KAAK,CAAC,CAAC,IAAI;EAE9B,MAAM,EAAE,UAAU,2CAAM;EACxB,QAAQ,KAAK,MAAM,MAAM,QAAQ,KAAK,MAAM,CAAC,CAAC,CAAC;CACjD,CAAC;;;;;CAMD,QACG,QAAQ,MAAM,EAAE,QAAQ,KAAK,CAAC,CAAC,CAC/B,SAAS,gBAAgB,iCAAiC,CAAC,CAC3D,mBAAmB,CAAC,CACpB,OAAO,OAAO,SAAmB;EAChC,oCACE,iFACA,EAAE,OAAO,OAAO,CAClB;EACA,MAAM,EAAE,UAAU,2CAAM;EACxB,QAAQ,KAAK,MAAM,MAAM,IAAI,CAAC;CAChC,CAAC;CAKH,QAAQ,wBAAwB;CAIhC,QAAQ,MAAM,QAAQ,IAAI;CAE1B,OAAO;AACT"}
|
package/dist/cjs/config.cjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
let _intlayer_engine_cli = require("@intlayer/engine/cli");
|
|
3
2
|
let _intlayer_config_logger = require("@intlayer/config/logger");
|
|
4
3
|
let _intlayer_config_node = require("@intlayer/config/node");
|
|
4
|
+
let _intlayer_engine_cli = require("@intlayer/engine/cli");
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
// src/config.ts
|
|
7
7
|
const sanitize = (value) => {
|
|
8
8
|
if (typeof value === "function" || typeof value === "undefined") return null;
|
|
9
9
|
if (Array.isArray(value)) return value.map(sanitize);
|
|
@@ -16,6 +16,5 @@ const getConfig = (options) => {
|
|
|
16
16
|
(0, _intlayer_config_logger.getAppLogger)(config)((0, _intlayer_config_logger.colorizeObject)(sanitize(config)));
|
|
17
17
|
};
|
|
18
18
|
|
|
19
|
-
//#endregion
|
|
20
19
|
exports.getConfig = getConfig;
|
|
21
20
|
//# sourceMappingURL=config.cjs.map
|
package/dist/cjs/editor.cjs
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
const require_utils_getParentPackageJSON = require(
|
|
2
|
+
const require_utils_getParentPackageJSON = require("./utils/getParentPackageJSON.cjs");
|
|
3
3
|
let node_fs = require("node:fs");
|
|
4
4
|
let node_path = require("node:path");
|
|
5
|
-
let node_url = require("node:url");
|
|
6
5
|
let node_child_process = require("node:child_process");
|
|
6
|
+
let node_url = require("node:url");
|
|
7
7
|
let node_module = require("node:module");
|
|
8
8
|
let _intlayer_config_utils = require("@intlayer/config/utils");
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
// src/editor.ts
|
|
11
11
|
/** Version of this CLI: `intlayer-editor` is released in lockstep with it. */
|
|
12
12
|
const getCliVersion = () => require_utils_getParentPackageJSON.getParentPackageJSON(_intlayer_config_utils.isESModule ? (0, node_path.dirname)((0, node_url.fileURLToPath)(require("url").pathToFileURL(__filename).href)) : __dirname).version;
|
|
13
13
|
/**
|
|
@@ -75,7 +75,6 @@ const startEditor = (options) => {
|
|
|
75
75
|
forwardExit(child);
|
|
76
76
|
};
|
|
77
77
|
|
|
78
|
-
//#endregion
|
|
79
78
|
exports.getRemoteEditorRunners = getRemoteEditorRunners;
|
|
80
79
|
exports.startEditor = startEditor;
|
|
81
80
|
//# sourceMappingURL=editor.cjs.map
|