@intlayer/cli 9.0.0-canary.2 → 9.0.0-canary.21
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 +44 -31
- 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 -125
- 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 +4 -4
- package/dist/cjs/init.cjs +369 -3
- package/dist/cjs/init.cjs.map +1 -1
- package/dist/cjs/initBuildOptimization.cjs +81 -0
- package/dist/cjs/initBuildOptimization.cjs.map +1 -0
- package/dist/cjs/initCompiler.cjs +117 -0
- package/dist/cjs/initCompiler.cjs.map +1 -0
- package/dist/cjs/initMCP.cjs +24 -21
- package/dist/cjs/initMCP.cjs.map +1 -1
- package/dist/cjs/initSkills.cjs +31 -28
- 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 +12 -12
- 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 +6 -6
- 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 +43 -30
- 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 -102
- 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 +4 -4
- package/dist/esm/init.mjs +368 -4
- package/dist/esm/init.mjs.map +1 -1
- package/dist/esm/initBuildOptimization.mjs +78 -0
- package/dist/esm/initBuildOptimization.mjs.map +1 -0
- package/dist/esm/initCompiler.mjs +114 -0
- package/dist/esm/initCompiler.mjs.map +1 -0
- package/dist/esm/initMCP.mjs +23 -20
- package/dist/esm/initMCP.mjs.map +1 -1
- package/dist/esm/initSkills.mjs +22 -19
- 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 +3 -3
- 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 +2 -2
- 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 +13 -5
- 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 +2 -3
- package/dist/types/init.d.ts.map +1 -1
- package/dist/types/initBuildOptimization.d.ts +20 -0
- package/dist/types/initBuildOptimization.d.ts.map +1 -0
- package/dist/types/initCompiler.d.ts +18 -0
- package/dist/types/initCompiler.d.ts.map +1 -0
- package/dist/types/initMCP.d.ts +2 -1
- package/dist/types/initMCP.d.ts.map +1 -1
- package/dist/types/initSkills.d.ts +2 -3
- 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,26 +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 { init } from "./init.mjs";
|
|
6
|
-
import { startEditor } from "./editor.mjs";
|
|
7
|
-
import { watchContentDeclaration } from "./watch.mjs";
|
|
8
|
-
import { scan } from "./scan.mjs";
|
|
9
|
-
import { login } from "./auth/login.mjs";
|
|
10
|
-
import { build } from "./build.mjs";
|
|
11
|
-
import { bundle } from "./bundle.mjs";
|
|
12
|
-
import { runCI } from "./ci.mjs";
|
|
13
|
-
import { getConfig } from "./config.mjs";
|
|
14
|
-
import { testMissingTranslations } from "./test/test.mjs";
|
|
15
|
-
import { fill } from "./fill/fill.mjs";
|
|
16
|
-
import { initSkills } from "./initSkills.mjs";
|
|
17
|
-
import { initMCP } from "./initMCP.mjs";
|
|
18
|
-
import { pull } from "./pull.mjs";
|
|
19
|
-
import { push } from "./push/push.mjs";
|
|
20
|
-
import { pushConfig } from "./pushConfig.mjs";
|
|
21
|
-
import { reviewDoc } from "./reviewDoc/reviewDoc.mjs";
|
|
22
|
-
import { searchDoc } from "./searchDoc.mjs";
|
|
23
|
-
import { translateDoc } from "./translateDoc/translateDoc.mjs";
|
|
24
1
|
import { getParentPackageJSON } from "./utils/getParentPackageJSON.mjs";
|
|
25
2
|
import { dirname as dirname$1 } from "node:path";
|
|
26
3
|
import { setPrefix } from "@intlayer/config/logger";
|
|
@@ -96,13 +73,14 @@ const gitOptionKeys = [
|
|
|
96
73
|
const extractGitOptions = (options) => {
|
|
97
74
|
if (extractKeysFromOptions(options, gitOptionKeys).length === 0) return void 0;
|
|
98
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);
|
|
99
82
|
return removeUndefined({
|
|
100
|
-
mode
|
|
101
|
-
gitDiff && "gitDiff",
|
|
102
|
-
uncommitted && "uncommitted",
|
|
103
|
-
unpushed && "unpushed",
|
|
104
|
-
untracked && "untracked"
|
|
105
|
-
].filter(Boolean),
|
|
83
|
+
mode,
|
|
106
84
|
baseRef: gitDiffBase,
|
|
107
85
|
currentRef: gitDiffCurrent,
|
|
108
86
|
absolute: true
|
|
@@ -153,7 +131,8 @@ const setAPI = () => {
|
|
|
153
131
|
*/
|
|
154
132
|
const loginCmd = program.command("login").description("Login to Intlayer").option("--cms-url [cmsUrl]", "CMS URL");
|
|
155
133
|
applyConfigOptions(loginCmd);
|
|
156
|
-
loginCmd.action((options) => {
|
|
134
|
+
loginCmd.action(async (options) => {
|
|
135
|
+
const { login } = await import("./auth/login.mjs");
|
|
157
136
|
const configOptions = extractConfigOptions(options) ?? { override: { log: {
|
|
158
137
|
prefix: "",
|
|
159
138
|
mode: "verbose"
|
|
@@ -166,12 +145,27 @@ const setAPI = () => {
|
|
|
166
145
|
/**
|
|
167
146
|
* INIT
|
|
168
147
|
*/
|
|
169
|
-
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").action((options) =>
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
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
|
+
});
|
|
175
169
|
/**
|
|
176
170
|
* DICTIONARIES
|
|
177
171
|
*/
|
|
@@ -188,7 +182,8 @@ const setAPI = () => {
|
|
|
188
182
|
const dictionariesBuildCmd = dictionariesProgram.command("build").description(buildOptions.description);
|
|
189
183
|
applyOptions(dictionariesBuildCmd, buildOptions.options);
|
|
190
184
|
applyConfigOptions(dictionariesBuildCmd);
|
|
191
|
-
dictionariesBuildCmd.action((options) => {
|
|
185
|
+
dictionariesBuildCmd.action(async (options) => {
|
|
186
|
+
const { build } = await import("./build.mjs");
|
|
192
187
|
build({
|
|
193
188
|
...options,
|
|
194
189
|
configOptions: extractConfigOptions(options)
|
|
@@ -197,7 +192,8 @@ const setAPI = () => {
|
|
|
197
192
|
const rootBuildCmd = program.command("build").description(buildOptions.description);
|
|
198
193
|
applyOptions(rootBuildCmd, buildOptions.options);
|
|
199
194
|
applyConfigOptions(rootBuildCmd);
|
|
200
|
-
rootBuildCmd.action((options) => {
|
|
195
|
+
rootBuildCmd.action(async (options) => {
|
|
196
|
+
const { build } = await import("./build.mjs");
|
|
201
197
|
build({
|
|
202
198
|
...options,
|
|
203
199
|
configOptions: extractConfigOptions(options)
|
|
@@ -210,7 +206,8 @@ const setAPI = () => {
|
|
|
210
206
|
const dictionariesWatchCmd = dictionariesProgram.command("watch").description(buildOptions.description);
|
|
211
207
|
applyOptions(dictionariesWatchCmd, watchOptions.options);
|
|
212
208
|
applyConfigOptions(dictionariesWatchCmd);
|
|
213
|
-
dictionariesWatchCmd.action((options) => {
|
|
209
|
+
dictionariesWatchCmd.action(async (options) => {
|
|
210
|
+
const { watchContentDeclaration } = await import("./watch.mjs");
|
|
214
211
|
watchContentDeclaration({
|
|
215
212
|
...options,
|
|
216
213
|
configOptions: extractConfigOptions(options)
|
|
@@ -219,7 +216,8 @@ const setAPI = () => {
|
|
|
219
216
|
const rootWatchCmd = program.command("watch").description(buildOptions.description);
|
|
220
217
|
applyOptions(rootWatchCmd, watchOptions.options);
|
|
221
218
|
applyConfigOptions(rootWatchCmd);
|
|
222
|
-
rootWatchCmd.action((options) => {
|
|
219
|
+
rootWatchCmd.action(async (options) => {
|
|
220
|
+
const { watchContentDeclaration } = await import("./watch.mjs");
|
|
223
221
|
watchContentDeclaration({
|
|
224
222
|
...options,
|
|
225
223
|
configOptions: extractConfigOptions(options)
|
|
@@ -237,21 +235,20 @@ const setAPI = () => {
|
|
|
237
235
|
const dictionariesPullCmd = dictionariesProgram.command("pull").description(pullOptions.description);
|
|
238
236
|
applyOptions(dictionariesPullCmd, pullOptions.options);
|
|
239
237
|
applyConfigOptions(dictionariesPullCmd);
|
|
240
|
-
dictionariesPullCmd.action((options) => {
|
|
238
|
+
dictionariesPullCmd.action(async (options) => {
|
|
239
|
+
const { pull } = await import("./pull.mjs");
|
|
241
240
|
const dictionaries = [...options.dictionaries ?? [], ...options.dictionary ?? []];
|
|
242
241
|
pull({
|
|
243
242
|
...options,
|
|
244
243
|
dictionaries: dictionaries.length > 0 ? dictionaries : void 0,
|
|
245
|
-
configOptions:
|
|
246
|
-
...options.configOptions,
|
|
247
|
-
baseDir: options.baseDir
|
|
248
|
-
}
|
|
244
|
+
configOptions: extractConfigOptions(options)
|
|
249
245
|
});
|
|
250
246
|
});
|
|
251
247
|
const rootPullCmd = program.command("pull").description(pullOptions.description);
|
|
252
248
|
applyOptions(rootPullCmd, pullOptions.options);
|
|
253
249
|
applyConfigOptions(rootPullCmd);
|
|
254
|
-
rootPullCmd.action((options) => {
|
|
250
|
+
rootPullCmd.action(async (options) => {
|
|
251
|
+
const { pull } = await import("./pull.mjs");
|
|
255
252
|
const dictionaries = [...options.dictionaries ?? [], ...options.dictionary ?? []];
|
|
256
253
|
pull({
|
|
257
254
|
...options,
|
|
@@ -275,7 +272,8 @@ const setAPI = () => {
|
|
|
275
272
|
applyOptions(dictionariesPushCmd, pushOptions.options);
|
|
276
273
|
applyConfigOptions(dictionariesPushCmd);
|
|
277
274
|
applyGitOptions(dictionariesPushCmd);
|
|
278
|
-
dictionariesPushCmd.action((options) => {
|
|
275
|
+
dictionariesPushCmd.action(async (options) => {
|
|
276
|
+
const { push } = await import("./push/push.mjs");
|
|
279
277
|
const dictionaries = [...options.dictionaries || [], ...options.dictionary || []];
|
|
280
278
|
return push({
|
|
281
279
|
...options,
|
|
@@ -288,7 +286,8 @@ const setAPI = () => {
|
|
|
288
286
|
applyOptions(rootPushCmd, pushOptions.options);
|
|
289
287
|
applyConfigOptions(rootPushCmd);
|
|
290
288
|
applyGitOptions(rootPushCmd);
|
|
291
|
-
rootPushCmd.action((options) => {
|
|
289
|
+
rootPushCmd.action(async (options) => {
|
|
290
|
+
const { push } = await import("./push/push.mjs");
|
|
292
291
|
const dictionaries = [...options.dictionaries || [], ...options.dictionary || []];
|
|
293
292
|
return push({
|
|
294
293
|
...options,
|
|
@@ -303,7 +302,8 @@ const setAPI = () => {
|
|
|
303
302
|
const configurationProgram = program.command("configuration").alias("config").alias("conf").description("Configuration operations");
|
|
304
303
|
const configGetCmd = configurationProgram.command("get").description("Get the configuration");
|
|
305
304
|
applyConfigOptions(configGetCmd);
|
|
306
|
-
configGetCmd.action((options) => {
|
|
305
|
+
configGetCmd.action(async (options) => {
|
|
306
|
+
const { getConfig } = await import("./config.mjs");
|
|
307
307
|
getConfig({
|
|
308
308
|
...options,
|
|
309
309
|
configOptions: extractConfigOptions(options)
|
|
@@ -311,20 +311,23 @@ const setAPI = () => {
|
|
|
311
311
|
});
|
|
312
312
|
const configPushCmd = configurationProgram.command("push").description("Push the configuration");
|
|
313
313
|
applyConfigOptions(configPushCmd);
|
|
314
|
-
configPushCmd.action((options) => {
|
|
314
|
+
configPushCmd.action(async (options) => {
|
|
315
|
+
const { pushConfig } = await import("./pushConfig.mjs");
|
|
315
316
|
pushConfig({
|
|
316
317
|
...options,
|
|
317
318
|
configOptions: extractConfigOptions(options)
|
|
318
319
|
});
|
|
319
320
|
});
|
|
320
|
-
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");
|
|
321
323
|
listProjectsCommand({
|
|
322
324
|
baseDir: options.baseDir,
|
|
323
325
|
gitRoot: options.gitRoot,
|
|
324
326
|
json: options.json
|
|
325
327
|
});
|
|
326
328
|
});
|
|
327
|
-
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");
|
|
328
331
|
listProjectsCommand({
|
|
329
332
|
baseDir: options.baseDir,
|
|
330
333
|
gitRoot: options.gitRoot,
|
|
@@ -336,13 +339,15 @@ const setAPI = () => {
|
|
|
336
339
|
* CONTENT DECLARATION
|
|
337
340
|
*/
|
|
338
341
|
const contentProgram = program.command("content").description("Content declaration operations");
|
|
339
|
-
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");
|
|
340
344
|
listContentDeclaration({
|
|
341
345
|
json: options.json,
|
|
342
346
|
absolute: options.absolute
|
|
343
347
|
});
|
|
344
348
|
});
|
|
345
|
-
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");
|
|
346
351
|
listContentDeclaration({
|
|
347
352
|
json: options.json,
|
|
348
353
|
absolute: options.absolute
|
|
@@ -350,7 +355,8 @@ const setAPI = () => {
|
|
|
350
355
|
});
|
|
351
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");
|
|
352
357
|
applyConfigOptions(testProgram);
|
|
353
|
-
testProgram.action((options) => {
|
|
358
|
+
testProgram.action(async (options) => {
|
|
359
|
+
const { testMissingTranslations } = await import("./test/index.mjs");
|
|
354
360
|
testMissingTranslations({
|
|
355
361
|
...options,
|
|
356
362
|
configOptions: extractConfigOptions(options)
|
|
@@ -358,7 +364,8 @@ const setAPI = () => {
|
|
|
358
364
|
});
|
|
359
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");
|
|
360
366
|
applyConfigOptions(rootTestCmd);
|
|
361
|
-
rootTestCmd.action((options) => {
|
|
367
|
+
rootTestCmd.action(async (options) => {
|
|
368
|
+
const { testMissingTranslations } = await import("./test/index.mjs");
|
|
362
369
|
testMissingTranslations({
|
|
363
370
|
...options,
|
|
364
371
|
configOptions: extractConfigOptions(options)
|
|
@@ -368,7 +375,8 @@ const setAPI = () => {
|
|
|
368
375
|
applyConfigOptions(fillProgram);
|
|
369
376
|
applyAIOptions(fillProgram);
|
|
370
377
|
applyGitOptions(fillProgram);
|
|
371
|
-
fillProgram.action((options) => {
|
|
378
|
+
fillProgram.action(async (options) => {
|
|
379
|
+
const { fill } = await import("./fill/fill.mjs");
|
|
372
380
|
const keys = [...options.keys ?? [], ...options.key ?? []];
|
|
373
381
|
const excludedKeys = [...options.excludedKeys ?? [], ...options.excludedKey ?? []];
|
|
374
382
|
const dictionaries = [...options.dictionaries ?? [], ...options.dictionary ?? []];
|
|
@@ -402,47 +410,56 @@ const setAPI = () => {
|
|
|
402
410
|
applyAIOptions(translateProgram);
|
|
403
411
|
applyGitOptions(translateProgram);
|
|
404
412
|
applyOptions(translateProgram, docParams);
|
|
405
|
-
translateProgram.action((options) =>
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
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
|
+
});
|
|
419
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.");
|
|
420
431
|
applyConfigOptions(reviewProgram);
|
|
421
432
|
applyAIOptions(reviewProgram);
|
|
422
433
|
applyGitOptions(reviewProgram);
|
|
423
434
|
applyOptions(reviewProgram, docParams);
|
|
424
|
-
reviewProgram.action((options) =>
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
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
|
+
});
|
|
439
453
|
const searchProgram = docProgram.command("search").description("Search the documentation").argument("<query>", "Search query").option("--limit [limit]", "Limit the number of results", "10");
|
|
440
454
|
applyConfigOptions(searchProgram);
|
|
441
|
-
searchProgram.action((query, options) =>
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
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
|
+
});
|
|
446
463
|
/**
|
|
447
464
|
* LIVE SYNC
|
|
448
465
|
*/
|
|
@@ -450,16 +467,29 @@ const setAPI = () => {
|
|
|
450
467
|
const liveCmd = program.command("live").description("Live sync - Watch for changes made on the CMS and update the application content accordingly");
|
|
451
468
|
applyOptions(liveCmd, liveOptions);
|
|
452
469
|
applyConfigOptions(liveCmd);
|
|
453
|
-
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
|
+
});
|
|
454
477
|
const editorStartCmd = program.command("editor").description("Visual editor operations").command("start").description("Start the Intlayer visual editor");
|
|
455
478
|
applyConfigOptions(editorStartCmd);
|
|
456
|
-
editorStartCmd.action((options) => {
|
|
479
|
+
editorStartCmd.action(async (options) => {
|
|
480
|
+
const { startEditor } = await import("./editor.mjs");
|
|
457
481
|
startEditor({
|
|
458
482
|
env: options.env,
|
|
459
483
|
envFile: options.envFile
|
|
460
484
|
});
|
|
461
485
|
});
|
|
462
|
-
|
|
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");
|
|
463
493
|
extract({
|
|
464
494
|
files: options.file,
|
|
465
495
|
configOptions: extractConfigOptions(options),
|
|
@@ -467,7 +497,11 @@ const setAPI = () => {
|
|
|
467
497
|
declarationOnly: options.declarationOnly
|
|
468
498
|
});
|
|
469
499
|
});
|
|
470
|
-
|
|
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");
|
|
471
505
|
bundle({
|
|
472
506
|
outfile: options.outfile,
|
|
473
507
|
bundlePackages: options.packages,
|
|
@@ -477,24 +511,29 @@ const setAPI = () => {
|
|
|
477
511
|
format: options.format,
|
|
478
512
|
configOptions: extractConfigOptions(options)
|
|
479
513
|
});
|
|
480
|
-
})
|
|
514
|
+
});
|
|
515
|
+
applyConfigOptions(bundleCmd);
|
|
481
516
|
/**
|
|
482
517
|
* SCAN
|
|
483
518
|
*/
|
|
484
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");
|
|
485
520
|
applyConfigOptions(scanCmd);
|
|
486
|
-
scanCmd.action((url, options) =>
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
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
|
+
});
|
|
491
529
|
program.parse(process.argv);
|
|
492
530
|
/**
|
|
493
531
|
* CI / AUTOMATION
|
|
494
532
|
*
|
|
495
533
|
* Used to iterate over all projects in a monorepo, and help to parse secrets
|
|
496
534
|
*/
|
|
497
|
-
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");
|
|
498
537
|
runCI(args);
|
|
499
538
|
});
|
|
500
539
|
return program;
|