@intlayer/cli 9.0.0-canary.8 → 9.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/IntlayerEventListener.cjs +1 -1
- package/dist/cjs/IntlayerEventListener.cjs.map +1 -1
- package/dist/cjs/_virtual/_utils_asset.cjs +4 -3
- package/dist/cjs/auth/login.cjs +2 -2
- package/dist/cjs/auth/login.cjs.map +1 -1
- package/dist/cjs/auth/sessionToken.cjs +0 -1
- package/dist/cjs/auth/sessionToken.cjs.map +1 -1
- package/dist/cjs/build.cjs +6 -7
- package/dist/cjs/build.cjs.map +1 -1
- package/dist/cjs/bundle.cjs +32 -1
- package/dist/cjs/bundle.cjs.map +1 -1
- package/dist/cjs/ci.cjs +96 -29
- package/dist/cjs/ci.cjs.map +1 -1
- package/dist/cjs/cli.cjs +163 -129
- package/dist/cjs/cli.cjs.map +1 -1
- package/dist/cjs/config.cjs +2 -3
- package/dist/cjs/config.cjs.map +1 -1
- package/dist/cjs/editor.cjs +0 -1
- package/dist/cjs/editor.cjs.map +1 -1
- package/dist/cjs/extract.cjs +7 -7
- package/dist/cjs/extract.cjs.map +1 -1
- package/dist/cjs/fill/deepMergeContent.cjs.map +1 -1
- package/dist/cjs/fill/extractTranslatableContent.cjs.map +1 -1
- package/dist/cjs/fill/fill.cjs +11 -11
- package/dist/cjs/fill/fill.cjs.map +1 -1
- package/dist/cjs/fill/formatAutoFilledFilePath.cjs +2 -3
- package/dist/cjs/fill/formatAutoFilledFilePath.cjs.map +1 -1
- package/dist/cjs/fill/formatFillData.cjs +3 -4
- package/dist/cjs/fill/formatFillData.cjs.map +1 -1
- package/dist/cjs/fill/getAvailableLocalesInDictionary.cjs.map +1 -1
- package/dist/cjs/fill/getFilterMissingContentPerLocale.cjs.map +1 -1
- package/dist/cjs/fill/listTranslationsTasks.cjs +2 -2
- package/dist/cjs/fill/listTranslationsTasks.cjs.map +1 -1
- package/dist/cjs/fill/translateDictionary.cjs +7 -7
- package/dist/cjs/fill/translateDictionary.cjs.map +1 -1
- package/dist/cjs/fill/writeFill.cjs +5 -6
- package/dist/cjs/fill/writeFill.cjs.map +1 -1
- package/dist/cjs/getTargetDictionary.cjs +2 -3
- package/dist/cjs/getTargetDictionary.cjs.map +1 -1
- package/dist/cjs/index.cjs +3 -3
- package/dist/cjs/init.cjs +171 -6
- package/dist/cjs/init.cjs.map +1 -1
- package/dist/cjs/initBuildOptimization.cjs +6 -6
- package/dist/cjs/initBuildOptimization.cjs.map +1 -1
- package/dist/cjs/initCompiler.cjs +3 -3
- package/dist/cjs/initCompiler.cjs.map +1 -1
- package/dist/cjs/initMCP.cjs +3 -3
- package/dist/cjs/initMCP.cjs.map +1 -1
- package/dist/cjs/initSkills.cjs +11 -11
- package/dist/cjs/initSkills.cjs.map +1 -1
- package/dist/cjs/listContentDeclaration.cjs +4 -5
- package/dist/cjs/listContentDeclaration.cjs.map +1 -1
- package/dist/cjs/listProjects.cjs +2 -3
- package/dist/cjs/listProjects.cjs.map +1 -1
- package/dist/cjs/liveSync.cjs +4 -4
- package/dist/cjs/liveSync.cjs.map +1 -1
- package/dist/cjs/pull.cjs +7 -7
- package/dist/cjs/pull.cjs.map +1 -1
- package/dist/cjs/push/pullLog.cjs +2 -2
- package/dist/cjs/push/pullLog.cjs.map +1 -1
- package/dist/cjs/push/push.cjs +13 -13
- package/dist/cjs/push/push.cjs.map +1 -1
- package/dist/cjs/pushConfig.cjs +2 -3
- package/dist/cjs/pushConfig.cjs.map +1 -1
- package/dist/cjs/pushLog.cjs.map +1 -1
- package/dist/cjs/reviewDoc/reviewDoc.cjs +16 -16
- package/dist/cjs/reviewDoc/reviewDoc.cjs.map +1 -1
- package/dist/cjs/reviewDoc/reviewDocBlockAware.cjs +11 -11
- package/dist/cjs/reviewDoc/reviewDocBlockAware.cjs.map +1 -1
- package/dist/cjs/reviewDoc/reviewDocLog.cjs +7 -8
- package/dist/cjs/reviewDoc/reviewDocLog.cjs.map +1 -1
- package/dist/cjs/scan.cjs +5 -5
- package/dist/cjs/scan.cjs.map +1 -1
- package/dist/cjs/searchDoc.cjs +2 -3
- package/dist/cjs/searchDoc.cjs.map +1 -1
- package/dist/cjs/test/listMissingTranslations.cjs +3 -4
- package/dist/cjs/test/listMissingTranslations.cjs.map +1 -1
- package/dist/cjs/test/test.cjs +11 -11
- package/dist/cjs/test/test.cjs.map +1 -1
- package/dist/cjs/translateDoc/translateDoc.cjs +6 -6
- package/dist/cjs/translateDoc/translateDoc.cjs.map +1 -1
- package/dist/cjs/translateDoc/translateFile.cjs +5 -5
- package/dist/cjs/translateDoc/translateFile.cjs.map +1 -1
- package/dist/cjs/translateDoc/validation.cjs.map +1 -1
- package/dist/cjs/utils/calculateChunks.cjs +4 -5
- package/dist/cjs/utils/calculateChunks.cjs.map +1 -1
- package/dist/cjs/utils/checkAccess.cjs.map +1 -1
- package/dist/cjs/utils/checkConfigConsistency.cjs.map +1 -1
- package/dist/cjs/utils/checkFileModifiedRange.cjs.map +1 -1
- package/dist/cjs/utils/checkLastUpdateTime.cjs +0 -1
- package/dist/cjs/utils/checkLastUpdateTime.cjs.map +1 -1
- package/dist/cjs/utils/chunkInference.cjs +0 -1
- package/dist/cjs/utils/chunkInference.cjs.map +1 -1
- package/dist/cjs/utils/fixChunkStartEndChars.cjs.map +1 -1
- package/dist/cjs/utils/formatLineRanges.cjs.map +1 -1
- package/dist/cjs/utils/formatTimeDiff.cjs.map +1 -1
- package/dist/cjs/utils/getIsFileUpdatedRecently.cjs +1 -2
- package/dist/cjs/utils/getIsFileUpdatedRecently.cjs.map +1 -1
- package/dist/cjs/utils/getOutputFilePath.cjs +2 -3
- package/dist/cjs/utils/getOutputFilePath.cjs.map +1 -1
- package/dist/cjs/utils/getParentPackageJSON.cjs +0 -1
- package/dist/cjs/utils/getParentPackageJSON.cjs.map +1 -1
- package/dist/cjs/utils/listSpecialChars.cjs.map +1 -1
- package/dist/cjs/utils/mapChunksBetweenFiles.cjs +4 -5
- package/dist/cjs/utils/mapChunksBetweenFiles.cjs.map +1 -1
- package/dist/cjs/utils/openBrowser.cjs +0 -1
- package/dist/cjs/utils/openBrowser.cjs.map +1 -1
- package/dist/cjs/utils/reorderParagraphs.cjs.map +1 -1
- package/dist/cjs/utils/selectCmsEnvironment.cjs.map +1 -1
- package/dist/cjs/utils/setupAI.cjs.map +1 -1
- package/dist/cjs/watch.cjs +28 -9
- package/dist/cjs/watch.cjs.map +1 -1
- package/dist/esm/IntlayerEventListener.mjs +1 -0
- package/dist/esm/IntlayerEventListener.mjs.map +1 -1
- package/dist/esm/_virtual/_utils_asset.mjs +4 -2
- package/dist/esm/auth/login.mjs +1 -1
- package/dist/esm/auth/login.mjs.map +1 -1
- package/dist/esm/auth/sessionToken.mjs.map +1 -1
- package/dist/esm/build.mjs +3 -3
- package/dist/esm/build.mjs.map +1 -1
- package/dist/esm/bundle.mjs +32 -1
- package/dist/esm/bundle.mjs.map +1 -1
- package/dist/esm/ci.mjs +95 -30
- package/dist/esm/ci.mjs.map +1 -1
- package/dist/esm/cli.mjs +141 -106
- package/dist/esm/cli.mjs.map +1 -1
- package/dist/esm/config.mjs +1 -1
- package/dist/esm/config.mjs.map +1 -1
- package/dist/esm/editor.mjs.map +1 -1
- package/dist/esm/extract.mjs +3 -3
- package/dist/esm/extract.mjs.map +1 -1
- package/dist/esm/fill/deepMergeContent.mjs.map +1 -1
- package/dist/esm/fill/extractTranslatableContent.mjs.map +1 -1
- package/dist/esm/fill/fill.mjs +3 -3
- package/dist/esm/fill/fill.mjs.map +1 -1
- package/dist/esm/fill/formatAutoFilledFilePath.mjs +1 -1
- package/dist/esm/fill/formatAutoFilledFilePath.mjs.map +1 -1
- package/dist/esm/fill/formatFillData.mjs +1 -1
- package/dist/esm/fill/formatFillData.mjs.map +1 -1
- package/dist/esm/fill/getAvailableLocalesInDictionary.mjs.map +1 -1
- package/dist/esm/fill/getFilterMissingContentPerLocale.mjs.map +1 -1
- package/dist/esm/fill/listTranslationsTasks.mjs +1 -1
- package/dist/esm/fill/listTranslationsTasks.mjs.map +1 -1
- package/dist/esm/fill/translateDictionary.mjs +1 -1
- package/dist/esm/fill/translateDictionary.mjs.map +1 -1
- package/dist/esm/fill/writeFill.mjs +2 -2
- package/dist/esm/fill/writeFill.mjs.map +1 -1
- package/dist/esm/getTargetDictionary.mjs +1 -1
- package/dist/esm/getTargetDictionary.mjs.map +1 -1
- package/dist/esm/index.mjs +3 -3
- package/dist/esm/init.mjs +167 -2
- package/dist/esm/init.mjs.map +1 -1
- package/dist/esm/initBuildOptimization.mjs +1 -1
- package/dist/esm/initBuildOptimization.mjs.map +1 -1
- package/dist/esm/initCompiler.mjs +1 -1
- package/dist/esm/initCompiler.mjs.map +1 -1
- package/dist/esm/initMCP.mjs +1 -1
- package/dist/esm/initMCP.mjs.map +1 -1
- package/dist/esm/initSkills.mjs +1 -1
- package/dist/esm/initSkills.mjs.map +1 -1
- package/dist/esm/listContentDeclaration.mjs +2 -2
- package/dist/esm/listContentDeclaration.mjs.map +1 -1
- package/dist/esm/listProjects.mjs +1 -1
- package/dist/esm/listProjects.mjs.map +1 -1
- package/dist/esm/liveSync.mjs +2 -2
- package/dist/esm/liveSync.mjs.map +1 -1
- package/dist/esm/pull.mjs +4 -4
- package/dist/esm/pull.mjs.map +1 -1
- package/dist/esm/push/pullLog.mjs +2 -2
- package/dist/esm/push/pullLog.mjs.map +1 -1
- package/dist/esm/push/push.mjs +3 -3
- package/dist/esm/push/push.mjs.map +1 -1
- package/dist/esm/pushConfig.mjs +1 -1
- package/dist/esm/pushConfig.mjs.map +1 -1
- package/dist/esm/pushLog.mjs.map +1 -1
- package/dist/esm/reviewDoc/reviewDoc.mjs +3 -3
- package/dist/esm/reviewDoc/reviewDoc.mjs.map +1 -1
- package/dist/esm/reviewDoc/reviewDocBlockAware.mjs +2 -2
- package/dist/esm/reviewDoc/reviewDocBlockAware.mjs.map +1 -1
- package/dist/esm/reviewDoc/reviewDocLog.mjs +2 -2
- package/dist/esm/reviewDoc/reviewDocLog.mjs.map +1 -1
- package/dist/esm/scan.mjs +1 -1
- package/dist/esm/scan.mjs.map +1 -1
- package/dist/esm/searchDoc.mjs +1 -1
- package/dist/esm/searchDoc.mjs.map +1 -1
- package/dist/esm/test/listMissingTranslations.mjs +2 -2
- package/dist/esm/test/listMissingTranslations.mjs.map +1 -1
- package/dist/esm/test/test.mjs +2 -2
- package/dist/esm/test/test.mjs.map +1 -1
- package/dist/esm/translateDoc/translateDoc.mjs +2 -2
- package/dist/esm/translateDoc/translateDoc.mjs.map +1 -1
- package/dist/esm/translateDoc/translateFile.mjs +1 -1
- package/dist/esm/translateDoc/translateFile.mjs.map +1 -1
- package/dist/esm/translateDoc/validation.mjs.map +1 -1
- package/dist/esm/utils/calculateChunks.mjs +1 -1
- package/dist/esm/utils/calculateChunks.mjs.map +1 -1
- package/dist/esm/utils/checkAccess.mjs.map +1 -1
- package/dist/esm/utils/checkConfigConsistency.mjs.map +1 -1
- package/dist/esm/utils/checkFileModifiedRange.mjs.map +1 -1
- package/dist/esm/utils/checkLastUpdateTime.mjs.map +1 -1
- package/dist/esm/utils/chunkInference.mjs.map +1 -1
- package/dist/esm/utils/fixChunkStartEndChars.mjs.map +1 -1
- package/dist/esm/utils/formatLineRanges.mjs.map +1 -1
- package/dist/esm/utils/formatTimeDiff.mjs.map +1 -1
- package/dist/esm/utils/getIsFileUpdatedRecently.mjs +1 -1
- package/dist/esm/utils/getIsFileUpdatedRecently.mjs.map +1 -1
- package/dist/esm/utils/getOutputFilePath.mjs +1 -1
- package/dist/esm/utils/getOutputFilePath.mjs.map +1 -1
- package/dist/esm/utils/getParentPackageJSON.mjs.map +1 -1
- package/dist/esm/utils/listSpecialChars.mjs.map +1 -1
- package/dist/esm/utils/mapChunksBetweenFiles.mjs +1 -1
- package/dist/esm/utils/mapChunksBetweenFiles.mjs.map +1 -1
- package/dist/esm/utils/openBrowser.mjs.map +1 -1
- package/dist/esm/utils/reorderParagraphs.mjs.map +1 -1
- package/dist/esm/utils/selectCmsEnvironment.mjs.map +1 -1
- package/dist/esm/utils/setupAI.mjs.map +1 -1
- package/dist/esm/watch.mjs +25 -5
- package/dist/esm/watch.mjs.map +1 -1
- package/dist/types/IntlayerEventListener.d.ts +0 -1
- package/dist/types/IntlayerEventListener.d.ts.map +1 -1
- package/dist/types/auth/login.d.ts +0 -1
- package/dist/types/auth/login.d.ts.map +1 -1
- package/dist/types/auth/sessionToken.d.ts +0 -1
- package/dist/types/auth/sessionToken.d.ts.map +1 -1
- package/dist/types/build.d.ts +0 -1
- package/dist/types/build.d.ts.map +1 -1
- package/dist/types/bundle.d.ts +0 -1
- package/dist/types/bundle.d.ts.map +1 -1
- package/dist/types/ci.d.ts +40 -1
- package/dist/types/ci.d.ts.map +1 -1
- package/dist/types/cli.d.ts +0 -1
- package/dist/types/cli.d.ts.map +1 -1
- package/dist/types/config.d.ts +0 -1
- package/dist/types/config.d.ts.map +1 -1
- package/dist/types/editor.d.ts.map +1 -1
- package/dist/types/extract.d.ts +0 -1
- package/dist/types/extract.d.ts.map +1 -1
- package/dist/types/fill/deepMergeContent.d.ts.map +1 -1
- package/dist/types/fill/extractTranslatableContent.d.ts.map +1 -1
- package/dist/types/fill/fill.d.ts +1 -2
- package/dist/types/fill/fill.d.ts.map +1 -1
- package/dist/types/fill/formatAutoFilledFilePath.d.ts +0 -1
- package/dist/types/fill/formatAutoFilledFilePath.d.ts.map +1 -1
- package/dist/types/fill/formatFillData.d.ts +0 -1
- package/dist/types/fill/formatFillData.d.ts.map +1 -1
- package/dist/types/fill/getAvailableLocalesInDictionary.d.ts +0 -1
- package/dist/types/fill/getAvailableLocalesInDictionary.d.ts.map +1 -1
- package/dist/types/fill/getFilterMissingContentPerLocale.d.ts +0 -1
- package/dist/types/fill/getFilterMissingContentPerLocale.d.ts.map +1 -1
- package/dist/types/fill/listTranslationsTasks.d.ts +1 -2
- package/dist/types/fill/listTranslationsTasks.d.ts.map +1 -1
- package/dist/types/fill/translateDictionary.d.ts +1 -3
- package/dist/types/fill/translateDictionary.d.ts.map +1 -1
- package/dist/types/fill/writeFill.d.ts +0 -1
- package/dist/types/fill/writeFill.d.ts.map +1 -1
- package/dist/types/getTargetDictionary.d.ts +1 -2
- package/dist/types/getTargetDictionary.d.ts.map +1 -1
- package/dist/types/index.d.ts +5 -4
- package/dist/types/init.d.ts +1 -2
- package/dist/types/init.d.ts.map +1 -1
- package/dist/types/initBuildOptimization.d.ts.map +1 -1
- package/dist/types/initCompiler.d.ts.map +1 -1
- package/dist/types/initMCP.d.ts +1 -2
- package/dist/types/initMCP.d.ts.map +1 -1
- package/dist/types/initSkills.d.ts +1 -2
- package/dist/types/initSkills.d.ts.map +1 -1
- package/dist/types/listContentDeclaration.d.ts +0 -1
- package/dist/types/listContentDeclaration.d.ts.map +1 -1
- package/dist/types/listProjects.d.ts +1 -2
- package/dist/types/listProjects.d.ts.map +1 -1
- package/dist/types/liveSync.d.ts +0 -1
- package/dist/types/liveSync.d.ts.map +1 -1
- package/dist/types/pull.d.ts +0 -1
- package/dist/types/pull.d.ts.map +1 -1
- package/dist/types/push/pullLog.d.ts +1 -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 +0 -1
- package/dist/types/pushConfig.d.ts.map +1 -1
- package/dist/types/pushLog.d.ts.map +1 -1
- package/dist/types/reviewDoc/reviewDoc.d.ts +2 -17
- package/dist/types/reviewDoc/reviewDoc.d.ts.map +1 -1
- package/dist/types/reviewDoc/reviewDocBlockAware.d.ts +0 -1
- package/dist/types/reviewDoc/reviewDocBlockAware.d.ts.map +1 -1
- package/dist/types/reviewDoc/reviewDocLog.d.ts +1 -2
- package/dist/types/reviewDoc/reviewDocLog.d.ts.map +1 -1
- package/dist/types/scan.d.ts +3 -2
- package/dist/types/scan.d.ts.map +1 -1
- package/dist/types/searchDoc.d.ts +1 -6
- package/dist/types/searchDoc.d.ts.map +1 -1
- package/dist/types/test/listMissingTranslations.d.ts +0 -1
- package/dist/types/test/listMissingTranslations.d.ts.map +1 -1
- package/dist/types/test/test.d.ts +0 -1
- package/dist/types/test/test.d.ts.map +1 -1
- package/dist/types/translateDoc/translateDoc.d.ts +1 -16
- package/dist/types/translateDoc/translateDoc.d.ts.map +1 -1
- package/dist/types/translateDoc/translateFile.d.ts +1 -16
- package/dist/types/translateDoc/translateFile.d.ts.map +1 -1
- package/dist/types/translateDoc/types.d.ts +1 -2
- package/dist/types/translateDoc/types.d.ts.map +1 -1
- package/dist/types/translateDoc/validation.d.ts +0 -1
- package/dist/types/translateDoc/validation.d.ts.map +1 -1
- package/dist/types/utils/calculateChunks.d.ts.map +1 -1
- package/dist/types/utils/checkAccess.d.ts +0 -1
- package/dist/types/utils/checkAccess.d.ts.map +1 -1
- package/dist/types/utils/checkConfigConsistency.d.ts.map +1 -1
- package/dist/types/utils/checkFileModifiedRange.d.ts.map +1 -1
- package/dist/types/utils/checkLastUpdateTime.d.ts.map +1 -1
- package/dist/types/utils/chunkInference.d.ts +0 -1
- package/dist/types/utils/chunkInference.d.ts.map +1 -1
- package/dist/types/utils/fixChunkStartEndChars.d.ts.map +1 -1
- package/dist/types/utils/formatLineRanges.d.ts.map +1 -1
- package/dist/types/utils/formatTimeDiff.d.ts.map +1 -1
- package/dist/types/utils/getIsFileUpdatedRecently.d.ts.map +1 -1
- package/dist/types/utils/getOutputFilePath.d.ts +0 -1
- package/dist/types/utils/getOutputFilePath.d.ts.map +1 -1
- package/dist/types/utils/getParentPackageJSON.d.ts.map +1 -1
- package/dist/types/utils/listSpecialChars.d.ts +4 -2
- package/dist/types/utils/listSpecialChars.d.ts.map +1 -1
- package/dist/types/utils/mapChunksBetweenFiles.d.ts +0 -1
- package/dist/types/utils/mapChunksBetweenFiles.d.ts.map +1 -1
- package/dist/types/utils/openBrowser.d.ts.map +1 -1
- package/dist/types/utils/reorderParagraphs.d.ts.map +1 -1
- package/dist/types/utils/selectCmsEnvironment.d.ts +0 -1
- package/dist/types/utils/selectCmsEnvironment.d.ts.map +1 -1
- package/dist/types/utils/setupAI.d.ts +1 -3
- package/dist/types/utils/setupAI.d.ts.map +1 -1
- package/dist/types/watch.d.ts +0 -1
- package/dist/types/watch.d.ts.map +1 -1
- package/package.json +17 -17
package/dist/esm/cli.mjs
CHANGED
|
@@ -1,27 +1,3 @@
|
|
|
1
|
-
import { extract } from "./extract.mjs";
|
|
2
|
-
import { listProjectsCommand } from "./listProjects.mjs";
|
|
3
|
-
import { liveSync } from "./liveSync.mjs";
|
|
4
|
-
import { listContentDeclaration } from "./listContentDeclaration.mjs";
|
|
5
|
-
import { login } from "./auth/login.mjs";
|
|
6
|
-
import { initBuildOptimization } from "./initBuildOptimization.mjs";
|
|
7
|
-
import { initSkills } from "./initSkills.mjs";
|
|
8
|
-
import { initMCP } from "./initMCP.mjs";
|
|
9
|
-
import { init } from "./init.mjs";
|
|
10
|
-
import { startEditor } from "./editor.mjs";
|
|
11
|
-
import { watchContentDeclaration } from "./watch.mjs";
|
|
12
|
-
import { scan } from "./scan.mjs";
|
|
13
|
-
import { build } from "./build.mjs";
|
|
14
|
-
import { bundle } from "./bundle.mjs";
|
|
15
|
-
import { runCI } from "./ci.mjs";
|
|
16
|
-
import { getConfig } from "./config.mjs";
|
|
17
|
-
import { testMissingTranslations } from "./test/test.mjs";
|
|
18
|
-
import { fill } from "./fill/fill.mjs";
|
|
19
|
-
import { pull } from "./pull.mjs";
|
|
20
|
-
import { push } from "./push/push.mjs";
|
|
21
|
-
import { pushConfig } from "./pushConfig.mjs";
|
|
22
|
-
import { reviewDoc } from "./reviewDoc/reviewDoc.mjs";
|
|
23
|
-
import { searchDoc } from "./searchDoc.mjs";
|
|
24
|
-
import { translateDoc } from "./translateDoc/translateDoc.mjs";
|
|
25
1
|
import { getParentPackageJSON } from "./utils/getParentPackageJSON.mjs";
|
|
26
2
|
import { dirname as dirname$1 } from "node:path";
|
|
27
3
|
import { setPrefix } from "@intlayer/config/logger";
|
|
@@ -97,13 +73,14 @@ const gitOptionKeys = [
|
|
|
97
73
|
const extractGitOptions = (options) => {
|
|
98
74
|
if (extractKeysFromOptions(options, gitOptionKeys).length === 0) return void 0;
|
|
99
75
|
const { gitDiff, gitDiffBase, gitDiffCurrent, uncommitted, unpushed, untracked } = options;
|
|
76
|
+
const mode = [
|
|
77
|
+
gitDiff && "gitDiff",
|
|
78
|
+
uncommitted && "uncommitted",
|
|
79
|
+
unpushed && "unpushed",
|
|
80
|
+
untracked && "untracked"
|
|
81
|
+
].filter(Boolean);
|
|
100
82
|
return removeUndefined({
|
|
101
|
-
mode
|
|
102
|
-
gitDiff && "gitDiff",
|
|
103
|
-
uncommitted && "uncommitted",
|
|
104
|
-
unpushed && "unpushed",
|
|
105
|
-
untracked && "untracked"
|
|
106
|
-
].filter(Boolean),
|
|
83
|
+
mode,
|
|
107
84
|
baseRef: gitDiffBase,
|
|
108
85
|
currentRef: gitDiffCurrent,
|
|
109
86
|
absolute: true
|
|
@@ -154,7 +131,8 @@ const setAPI = () => {
|
|
|
154
131
|
*/
|
|
155
132
|
const loginCmd = program.command("login").description("Login to Intlayer").option("--cms-url [cmsUrl]", "CMS URL");
|
|
156
133
|
applyConfigOptions(loginCmd);
|
|
157
|
-
loginCmd.action((options) => {
|
|
134
|
+
loginCmd.action(async (options) => {
|
|
135
|
+
const { login } = await import("./auth/login.mjs");
|
|
158
136
|
const configOptions = extractConfigOptions(options) ?? { override: { log: {
|
|
159
137
|
prefix: "",
|
|
160
138
|
mode: "verbose"
|
|
@@ -167,15 +145,27 @@ const setAPI = () => {
|
|
|
167
145
|
/**
|
|
168
146
|
* INIT
|
|
169
147
|
*/
|
|
170
|
-
const initCmd = program.command("init").description("Initialize Intlayer in the project").option("--project-root [projectRoot]", "Project root directory").option("--no-gitignore", "Do not add .intlayer to .gitignore").option("--no-github-actions", "Do not scaffold the fill and test GitHub Actions workflows").option("--no-framework-setup", "Do not scaffold framework middleware/proxy and providers in layout/page").option("-i, --interactive", "Interactively choose what to set up (packages, skills, MCP, VS Code extension, LSP, …)").action((options) =>
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
148
|
+
const initCmd = program.command("init").description("Initialize Intlayer in the project").option("--project-root [projectRoot]", "Project root directory").option("--no-gitignore", "Do not add .intlayer to .gitignore").option("--no-github-actions", "Do not scaffold the fill and test GitHub Actions workflows").option("--no-framework-setup", "Do not scaffold framework middleware/proxy and providers in layout/page").option("-i, --interactive", "Interactively choose what to set up (packages, skills, MCP, VS Code extension, LSP, …)").action(async (options) => {
|
|
149
|
+
const { init } = await import("./init.mjs");
|
|
150
|
+
return init(options.projectRoot, {
|
|
151
|
+
noGitignore: options.gitignore === false,
|
|
152
|
+
noGithubActions: options.githubActions === false,
|
|
153
|
+
noFrameworkSetup: options.frameworkSetup === false,
|
|
154
|
+
upgradeToVersion: packageJson.version
|
|
155
|
+
}, options.interactive === true);
|
|
156
|
+
});
|
|
157
|
+
initCmd.command("skills").description("Initialize Intlayer skills in the project").option("--project-root [projectRoot]", "Project root directory").action(async (options) => {
|
|
158
|
+
const { initSkills } = await import("./initSkills.mjs");
|
|
159
|
+
return initSkills(options.projectRoot);
|
|
160
|
+
});
|
|
161
|
+
initCmd.command("mcp").description("Initialize Intlayer MCP server in the project").option("--project-root [projectRoot]", "Project root directory").action(async (options) => {
|
|
162
|
+
const { initMCP } = await import("./initMCP.mjs");
|
|
163
|
+
return initMCP(options.projectRoot);
|
|
164
|
+
});
|
|
165
|
+
initCmd.command("build-optimization").description("Configure build optimization for Next.js (@intlayer/swc or @intlayer/babel)").option("--project-root [projectRoot]", "Project root directory").action(async (options) => {
|
|
166
|
+
const { initBuildOptimization } = await import("./initBuildOptimization.mjs");
|
|
167
|
+
return initBuildOptimization(options.projectRoot);
|
|
168
|
+
});
|
|
179
169
|
/**
|
|
180
170
|
* DICTIONARIES
|
|
181
171
|
*/
|
|
@@ -192,7 +182,8 @@ const setAPI = () => {
|
|
|
192
182
|
const dictionariesBuildCmd = dictionariesProgram.command("build").description(buildOptions.description);
|
|
193
183
|
applyOptions(dictionariesBuildCmd, buildOptions.options);
|
|
194
184
|
applyConfigOptions(dictionariesBuildCmd);
|
|
195
|
-
dictionariesBuildCmd.action((options) => {
|
|
185
|
+
dictionariesBuildCmd.action(async (options) => {
|
|
186
|
+
const { build } = await import("./build.mjs");
|
|
196
187
|
build({
|
|
197
188
|
...options,
|
|
198
189
|
configOptions: extractConfigOptions(options)
|
|
@@ -201,7 +192,8 @@ const setAPI = () => {
|
|
|
201
192
|
const rootBuildCmd = program.command("build").description(buildOptions.description);
|
|
202
193
|
applyOptions(rootBuildCmd, buildOptions.options);
|
|
203
194
|
applyConfigOptions(rootBuildCmd);
|
|
204
|
-
rootBuildCmd.action((options) => {
|
|
195
|
+
rootBuildCmd.action(async (options) => {
|
|
196
|
+
const { build } = await import("./build.mjs");
|
|
205
197
|
build({
|
|
206
198
|
...options,
|
|
207
199
|
configOptions: extractConfigOptions(options)
|
|
@@ -214,7 +206,8 @@ const setAPI = () => {
|
|
|
214
206
|
const dictionariesWatchCmd = dictionariesProgram.command("watch").description(buildOptions.description);
|
|
215
207
|
applyOptions(dictionariesWatchCmd, watchOptions.options);
|
|
216
208
|
applyConfigOptions(dictionariesWatchCmd);
|
|
217
|
-
dictionariesWatchCmd.action((options) => {
|
|
209
|
+
dictionariesWatchCmd.action(async (options) => {
|
|
210
|
+
const { watchContentDeclaration } = await import("./watch.mjs");
|
|
218
211
|
watchContentDeclaration({
|
|
219
212
|
...options,
|
|
220
213
|
configOptions: extractConfigOptions(options)
|
|
@@ -223,7 +216,8 @@ const setAPI = () => {
|
|
|
223
216
|
const rootWatchCmd = program.command("watch").description(buildOptions.description);
|
|
224
217
|
applyOptions(rootWatchCmd, watchOptions.options);
|
|
225
218
|
applyConfigOptions(rootWatchCmd);
|
|
226
|
-
rootWatchCmd.action((options) => {
|
|
219
|
+
rootWatchCmd.action(async (options) => {
|
|
220
|
+
const { watchContentDeclaration } = await import("./watch.mjs");
|
|
227
221
|
watchContentDeclaration({
|
|
228
222
|
...options,
|
|
229
223
|
configOptions: extractConfigOptions(options)
|
|
@@ -241,21 +235,20 @@ const setAPI = () => {
|
|
|
241
235
|
const dictionariesPullCmd = dictionariesProgram.command("pull").description(pullOptions.description);
|
|
242
236
|
applyOptions(dictionariesPullCmd, pullOptions.options);
|
|
243
237
|
applyConfigOptions(dictionariesPullCmd);
|
|
244
|
-
dictionariesPullCmd.action((options) => {
|
|
238
|
+
dictionariesPullCmd.action(async (options) => {
|
|
239
|
+
const { pull } = await import("./pull.mjs");
|
|
245
240
|
const dictionaries = [...options.dictionaries ?? [], ...options.dictionary ?? []];
|
|
246
241
|
pull({
|
|
247
242
|
...options,
|
|
248
243
|
dictionaries: dictionaries.length > 0 ? dictionaries : void 0,
|
|
249
|
-
configOptions:
|
|
250
|
-
...options.configOptions,
|
|
251
|
-
baseDir: options.baseDir
|
|
252
|
-
}
|
|
244
|
+
configOptions: extractConfigOptions(options)
|
|
253
245
|
});
|
|
254
246
|
});
|
|
255
247
|
const rootPullCmd = program.command("pull").description(pullOptions.description);
|
|
256
248
|
applyOptions(rootPullCmd, pullOptions.options);
|
|
257
249
|
applyConfigOptions(rootPullCmd);
|
|
258
|
-
rootPullCmd.action((options) => {
|
|
250
|
+
rootPullCmd.action(async (options) => {
|
|
251
|
+
const { pull } = await import("./pull.mjs");
|
|
259
252
|
const dictionaries = [...options.dictionaries ?? [], ...options.dictionary ?? []];
|
|
260
253
|
pull({
|
|
261
254
|
...options,
|
|
@@ -279,7 +272,8 @@ const setAPI = () => {
|
|
|
279
272
|
applyOptions(dictionariesPushCmd, pushOptions.options);
|
|
280
273
|
applyConfigOptions(dictionariesPushCmd);
|
|
281
274
|
applyGitOptions(dictionariesPushCmd);
|
|
282
|
-
dictionariesPushCmd.action((options) => {
|
|
275
|
+
dictionariesPushCmd.action(async (options) => {
|
|
276
|
+
const { push } = await import("./push/push.mjs");
|
|
283
277
|
const dictionaries = [...options.dictionaries || [], ...options.dictionary || []];
|
|
284
278
|
return push({
|
|
285
279
|
...options,
|
|
@@ -292,7 +286,8 @@ const setAPI = () => {
|
|
|
292
286
|
applyOptions(rootPushCmd, pushOptions.options);
|
|
293
287
|
applyConfigOptions(rootPushCmd);
|
|
294
288
|
applyGitOptions(rootPushCmd);
|
|
295
|
-
rootPushCmd.action((options) => {
|
|
289
|
+
rootPushCmd.action(async (options) => {
|
|
290
|
+
const { push } = await import("./push/push.mjs");
|
|
296
291
|
const dictionaries = [...options.dictionaries || [], ...options.dictionary || []];
|
|
297
292
|
return push({
|
|
298
293
|
...options,
|
|
@@ -307,7 +302,8 @@ const setAPI = () => {
|
|
|
307
302
|
const configurationProgram = program.command("configuration").alias("config").alias("conf").description("Configuration operations");
|
|
308
303
|
const configGetCmd = configurationProgram.command("get").description("Get the configuration");
|
|
309
304
|
applyConfigOptions(configGetCmd);
|
|
310
|
-
configGetCmd.action((options) => {
|
|
305
|
+
configGetCmd.action(async (options) => {
|
|
306
|
+
const { getConfig } = await import("./config.mjs");
|
|
311
307
|
getConfig({
|
|
312
308
|
...options,
|
|
313
309
|
configOptions: extractConfigOptions(options)
|
|
@@ -315,20 +311,23 @@ const setAPI = () => {
|
|
|
315
311
|
});
|
|
316
312
|
const configPushCmd = configurationProgram.command("push").description("Push the configuration");
|
|
317
313
|
applyConfigOptions(configPushCmd);
|
|
318
|
-
configPushCmd.action((options) => {
|
|
314
|
+
configPushCmd.action(async (options) => {
|
|
315
|
+
const { pushConfig } = await import("./pushConfig.mjs");
|
|
319
316
|
pushConfig({
|
|
320
317
|
...options,
|
|
321
318
|
configOptions: extractConfigOptions(options)
|
|
322
319
|
});
|
|
323
320
|
});
|
|
324
|
-
program.command("projects").alias("project").description("List Intlayer projects").command("list").description("List all Intlayer projects in the directory").option("--base-dir [baseDir]", "Base directory to search from").option("--git-root", "Search from the git root directory instead of the base directory").option("--json", "Output the results as JSON").action((options) => {
|
|
321
|
+
program.command("projects").alias("project").description("List Intlayer projects").command("list").description("List all Intlayer projects in the directory").option("--base-dir [baseDir]", "Base directory to search from").option("--git-root", "Search from the git root directory instead of the base directory").option("--json", "Output the results as JSON").action(async (options) => {
|
|
322
|
+
const { listProjectsCommand } = await import("./listProjects.mjs");
|
|
325
323
|
listProjectsCommand({
|
|
326
324
|
baseDir: options.baseDir,
|
|
327
325
|
gitRoot: options.gitRoot,
|
|
328
326
|
json: options.json
|
|
329
327
|
});
|
|
330
328
|
});
|
|
331
|
-
program.command("projects-list").alias("pl").description("List all Intlayer projects in the directory").option("--base-dir [baseDir]", "Base directory to search from").option("--git-root", "Search from the git root directory instead of the base directory").option("--absolute", "Output the results as absolute paths").option("--json", "Output the results as JSON").action((options) => {
|
|
329
|
+
program.command("projects-list").alias("pl").description("List all Intlayer projects in the directory").option("--base-dir [baseDir]", "Base directory to search from").option("--git-root", "Search from the git root directory instead of the base directory").option("--absolute", "Output the results as absolute paths").option("--json", "Output the results as JSON").action(async (options) => {
|
|
330
|
+
const { listProjectsCommand } = await import("./listProjects.mjs");
|
|
332
331
|
listProjectsCommand({
|
|
333
332
|
baseDir: options.baseDir,
|
|
334
333
|
gitRoot: options.gitRoot,
|
|
@@ -340,13 +339,15 @@ const setAPI = () => {
|
|
|
340
339
|
* CONTENT DECLARATION
|
|
341
340
|
*/
|
|
342
341
|
const contentProgram = program.command("content").description("Content declaration operations");
|
|
343
|
-
contentProgram.command("list").description("List the content declaration files").option("--json", "Output the results as JSON").option("--absolute", "Output the results as absolute paths").action((options) => {
|
|
342
|
+
contentProgram.command("list").description("List the content declaration files").option("--json", "Output the results as JSON").option("--absolute", "Output the results as absolute paths").action(async (options) => {
|
|
343
|
+
const { listContentDeclaration } = await import("./listContentDeclaration.mjs");
|
|
344
344
|
listContentDeclaration({
|
|
345
345
|
json: options.json,
|
|
346
346
|
absolute: options.absolute
|
|
347
347
|
});
|
|
348
348
|
});
|
|
349
|
-
program.command("list").description("List the content declaration files").option("--json", "Output the results as JSON").option("--absolute", "Output the results as absolute paths").action((options) => {
|
|
349
|
+
program.command("list").description("List the content declaration files").option("--json", "Output the results as JSON").option("--absolute", "Output the results as absolute paths").action(async (options) => {
|
|
350
|
+
const { listContentDeclaration } = await import("./listContentDeclaration.mjs");
|
|
350
351
|
listContentDeclaration({
|
|
351
352
|
json: options.json,
|
|
352
353
|
absolute: options.absolute
|
|
@@ -354,7 +355,8 @@ const setAPI = () => {
|
|
|
354
355
|
});
|
|
355
356
|
const testProgram = contentProgram.command("test").description("Test if there are missing translations").option("--build [build]", "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");
|
|
356
357
|
applyConfigOptions(testProgram);
|
|
357
|
-
testProgram.action((options) => {
|
|
358
|
+
testProgram.action(async (options) => {
|
|
359
|
+
const { testMissingTranslations } = await import("./test/index.mjs");
|
|
358
360
|
testMissingTranslations({
|
|
359
361
|
...options,
|
|
360
362
|
configOptions: extractConfigOptions(options)
|
|
@@ -362,7 +364,8 @@ const setAPI = () => {
|
|
|
362
364
|
});
|
|
363
365
|
const rootTestCmd = program.command("test").description("Test if there are missing translations").option("--build [build]", "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");
|
|
364
366
|
applyConfigOptions(rootTestCmd);
|
|
365
|
-
rootTestCmd.action((options) => {
|
|
367
|
+
rootTestCmd.action(async (options) => {
|
|
368
|
+
const { testMissingTranslations } = await import("./test/index.mjs");
|
|
366
369
|
testMissingTranslations({
|
|
367
370
|
...options,
|
|
368
371
|
configOptions: extractConfigOptions(options)
|
|
@@ -372,7 +375,8 @@ const setAPI = () => {
|
|
|
372
375
|
applyConfigOptions(fillProgram);
|
|
373
376
|
applyAIOptions(fillProgram);
|
|
374
377
|
applyGitOptions(fillProgram);
|
|
375
|
-
fillProgram.action((options) => {
|
|
378
|
+
fillProgram.action(async (options) => {
|
|
379
|
+
const { fill } = await import("./fill/fill.mjs");
|
|
376
380
|
const keys = [...options.keys ?? [], ...options.key ?? []];
|
|
377
381
|
const excludedKeys = [...options.excludedKeys ?? [], ...options.excludedKey ?? []];
|
|
378
382
|
const dictionaries = [...options.dictionaries ?? [], ...options.dictionary ?? []];
|
|
@@ -406,47 +410,56 @@ const setAPI = () => {
|
|
|
406
410
|
applyAIOptions(translateProgram);
|
|
407
411
|
applyGitOptions(translateProgram);
|
|
408
412
|
applyOptions(translateProgram, docParams);
|
|
409
|
-
translateProgram.action((options) =>
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
413
|
+
translateProgram.action(async (options) => {
|
|
414
|
+
const { translateDoc } = await import("./translateDoc/translateDoc.mjs");
|
|
415
|
+
return translateDoc({
|
|
416
|
+
docPattern: options.docPattern,
|
|
417
|
+
excludedGlobPattern: options.excludedGlobPattern,
|
|
418
|
+
locales: options.locales,
|
|
419
|
+
baseLocale: options.baseLocale,
|
|
420
|
+
aiOptions: extractAiOptions(options),
|
|
421
|
+
gitOptions: extractGitOptions(options),
|
|
422
|
+
nbSimultaneousFileProcessed: options.nbSimultaneousFileProcessed,
|
|
423
|
+
configOptions: extractConfigOptions(options),
|
|
424
|
+
customInstructions: options.customInstructions,
|
|
425
|
+
skipIfModifiedBefore: options.skipIfModifiedBefore,
|
|
426
|
+
skipIfModifiedAfter: options.skipIfModifiedAfter,
|
|
427
|
+
skipIfExists: options.skipIfExists
|
|
428
|
+
});
|
|
429
|
+
});
|
|
423
430
|
const reviewProgram = docProgram.command("review").description("Review the documentation").option("--log", "Log-only mode. Do not translate with AI; instead log the blocks that need attention (with line numbers and content) for the base and target locales, to help another agent generate the translations.");
|
|
424
431
|
applyConfigOptions(reviewProgram);
|
|
425
432
|
applyAIOptions(reviewProgram);
|
|
426
433
|
applyGitOptions(reviewProgram);
|
|
427
434
|
applyOptions(reviewProgram, docParams);
|
|
428
|
-
reviewProgram.action((options) =>
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
435
|
+
reviewProgram.action(async (options) => {
|
|
436
|
+
const { reviewDoc } = await import("./reviewDoc/reviewDoc.mjs");
|
|
437
|
+
return reviewDoc({
|
|
438
|
+
docPattern: options.docPattern,
|
|
439
|
+
excludedGlobPattern: options.excludedGlobPattern,
|
|
440
|
+
locales: options.locales,
|
|
441
|
+
baseLocale: options.baseLocale,
|
|
442
|
+
aiOptions: extractAiOptions(options),
|
|
443
|
+
gitOptions: extractGitOptions(options),
|
|
444
|
+
nbSimultaneousFileProcessed: options.nbSimultaneousFileProcessed,
|
|
445
|
+
configOptions: extractConfigOptions(options),
|
|
446
|
+
customInstructions: options.customInstructions,
|
|
447
|
+
skipIfModifiedBefore: options.skipIfModifiedBefore,
|
|
448
|
+
skipIfModifiedAfter: options.skipIfModifiedAfter,
|
|
449
|
+
skipIfExists: options.skipIfExists,
|
|
450
|
+
log: options.log
|
|
451
|
+
});
|
|
452
|
+
});
|
|
443
453
|
const searchProgram = docProgram.command("search").description("Search the documentation").argument("<query>", "Search query").option("--limit [limit]", "Limit the number of results", "10");
|
|
444
454
|
applyConfigOptions(searchProgram);
|
|
445
|
-
searchProgram.action((query, options) =>
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
455
|
+
searchProgram.action(async (query, options) => {
|
|
456
|
+
const { searchDoc } = await import("./searchDoc.mjs");
|
|
457
|
+
return searchDoc({
|
|
458
|
+
query,
|
|
459
|
+
limit: options.limit ? parseInt(options.limit, 10) : 10,
|
|
460
|
+
configOptions: extractConfigOptions(options)
|
|
461
|
+
});
|
|
462
|
+
});
|
|
450
463
|
/**
|
|
451
464
|
* LIVE SYNC
|
|
452
465
|
*/
|
|
@@ -454,16 +467,29 @@ const setAPI = () => {
|
|
|
454
467
|
const liveCmd = program.command("live").description("Live sync - Watch for changes made on the CMS and update the application content accordingly");
|
|
455
468
|
applyOptions(liveCmd, liveOptions);
|
|
456
469
|
applyConfigOptions(liveCmd);
|
|
457
|
-
liveCmd.action((options) =>
|
|
470
|
+
liveCmd.action(async (options) => {
|
|
471
|
+
const { liveSync } = await import("./liveSync.mjs");
|
|
472
|
+
return liveSync({
|
|
473
|
+
...options,
|
|
474
|
+
configOptions: extractConfigOptions(options)
|
|
475
|
+
});
|
|
476
|
+
});
|
|
458
477
|
const editorStartCmd = program.command("editor").description("Visual editor operations").command("start").description("Start the Intlayer visual editor");
|
|
459
478
|
applyConfigOptions(editorStartCmd);
|
|
460
|
-
editorStartCmd.action((options) => {
|
|
479
|
+
editorStartCmd.action(async (options) => {
|
|
480
|
+
const { startEditor } = await import("./editor.mjs");
|
|
461
481
|
startEditor({
|
|
462
482
|
env: options.env,
|
|
463
483
|
envFile: options.envFile
|
|
464
484
|
});
|
|
465
485
|
});
|
|
466
|
-
|
|
486
|
+
/**
|
|
487
|
+
* EXTRACT
|
|
488
|
+
*/
|
|
489
|
+
const extractProgram = program.command("extract").alias("ext").description("Extract strings from components to be placed in a .content file close to the component");
|
|
490
|
+
applyConfigOptions(extractProgram);
|
|
491
|
+
extractProgram.option("-f, --file [files...]", "List of files to extract").option("--code-only", "Only extract the component code", false).option("--declaration-only", "Only generate content declaration", false).action(async (options) => {
|
|
492
|
+
const { extract } = await import("./extract.mjs");
|
|
467
493
|
extract({
|
|
468
494
|
files: options.file,
|
|
469
495
|
configOptions: extractConfigOptions(options),
|
|
@@ -471,7 +497,11 @@ const setAPI = () => {
|
|
|
471
497
|
declarationOnly: options.declarationOnly
|
|
472
498
|
});
|
|
473
499
|
});
|
|
474
|
-
|
|
500
|
+
/**
|
|
501
|
+
* STANDALONE
|
|
502
|
+
*/
|
|
503
|
+
const bundleCmd = program.command("standalone").description("Create a standalone bundle of the application content").option("-o, --outfile [outfile]", "Output file for the bundle", "intlayer-bundle.js").option("--packages [packages...]", "List of packages to bundle").option("--version [version]", "Version of the packages to bundle").option("--minify", "Minify the output").option("--platform [platform]", "Target platform", "browser").option("--format [format]", "Output format", "esm").action(async (options) => {
|
|
504
|
+
const { bundle } = await import("./bundle.mjs");
|
|
475
505
|
bundle({
|
|
476
506
|
outfile: options.outfile,
|
|
477
507
|
bundlePackages: options.packages,
|
|
@@ -481,24 +511,29 @@ const setAPI = () => {
|
|
|
481
511
|
format: options.format,
|
|
482
512
|
configOptions: extractConfigOptions(options)
|
|
483
513
|
});
|
|
484
|
-
})
|
|
514
|
+
});
|
|
515
|
+
applyConfigOptions(bundleCmd);
|
|
485
516
|
/**
|
|
486
517
|
* SCAN
|
|
487
518
|
*/
|
|
488
519
|
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");
|
|
489
520
|
applyConfigOptions(scanCmd);
|
|
490
|
-
scanCmd.action((url, options) =>
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
521
|
+
scanCmd.action(async (url, options) => {
|
|
522
|
+
const { scan } = await import("./scan.mjs");
|
|
523
|
+
return scan(url, {
|
|
524
|
+
deep: options.deep,
|
|
525
|
+
json: options.json,
|
|
526
|
+
configOptions: extractConfigOptions(options)
|
|
527
|
+
});
|
|
528
|
+
});
|
|
495
529
|
program.parse(process.argv);
|
|
496
530
|
/**
|
|
497
531
|
* CI / AUTOMATION
|
|
498
532
|
*
|
|
499
533
|
* Used to iterate over all projects in a monorepo, and help to parse secrets
|
|
500
534
|
*/
|
|
501
|
-
program.command("ci").description("Run Intlayer commands with auto-injected credentials from INTLAYER_PROJECT_CREDENTIALS. Detects current project or iterates over all projects.").argument("<command...>", "The intlayer command to execute (e.g., \"fill\", \"push\")").allowUnknownOption().action((args) => {
|
|
535
|
+
program.command("ci").description("Run Intlayer commands with auto-injected credentials from INTLAYER_PROJECT_CREDENTIALS. Detects current project or iterates over all projects.").argument("<command...>", "The intlayer command to execute (e.g., \"fill\", \"push\")").allowUnknownOption().action(async (args) => {
|
|
536
|
+
const { runCI } = await import("./ci.mjs");
|
|
502
537
|
runCI(args);
|
|
503
538
|
});
|
|
504
539
|
return program;
|