@hubspot/cli 7.5.11-experimental.0 → 7.7.0-experimental.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/bin/cli.js +5 -6
- package/bin/hsmcp.d.ts +2 -0
- package/bin/hsmcp.js +13 -0
- package/commands/account/auth.d.ts +3 -7
- package/commands/account/auth.js +19 -9
- package/commands/account/clean.d.ts +3 -7
- package/commands/account/clean.js +16 -9
- package/commands/account/createOverride.d.ts +3 -7
- package/commands/account/createOverride.js +23 -6
- package/commands/account/info.d.ts +3 -7
- package/commands/account/info.js +13 -5
- package/commands/account/list.d.ts +3 -7
- package/commands/account/list.js +15 -8
- package/commands/account/remove.d.ts +3 -7
- package/commands/account/remove.js +21 -9
- package/commands/account/removeOverride.d.ts +3 -7
- package/commands/account/removeOverride.js +23 -6
- package/commands/account/rename.d.ts +3 -7
- package/commands/account/rename.js +16 -9
- package/commands/account/use.d.ts +5 -9
- package/commands/account/use.js +14 -6
- package/commands/account.d.ts +3 -4
- package/commands/account.js +35 -58
- package/commands/app/migrate.d.ts +1 -2
- package/commands/app/migrate.js +7 -8
- package/commands/app/secret/add.d.ts +7 -0
- package/commands/app/secret/add.js +64 -0
- package/commands/app/secret/delete.d.ts +8 -0
- package/commands/app/secret/delete.js +87 -0
- package/commands/app/secret/list.d.ts +6 -0
- package/commands/app/secret/list.js +64 -0
- package/commands/app/secret/update.d.ts +7 -0
- package/commands/app/secret/update.js +77 -0
- package/commands/app/secret.d.ts +3 -0
- package/commands/app/secret.js +30 -0
- package/commands/app.d.ts +2 -5
- package/commands/app.js +12 -8
- package/commands/auth.d.ts +3 -7
- package/commands/auth.js +12 -5
- package/commands/cms/convertFields.d.ts +7 -1
- package/commands/cms/convertFields.js +57 -41
- package/commands/cms/getReactModule.d.ts +7 -1
- package/commands/cms/getReactModule.js +52 -34
- package/commands/cms/lighthouseScore.d.ts +8 -1
- package/commands/cms/lighthouseScore.js +129 -100
- package/commands/cms.d.ts +3 -1
- package/commands/cms.js +24 -15
- package/commands/completion.d.ts +3 -1
- package/commands/completion.js +25 -12
- package/commands/config/migrate.d.ts +3 -7
- package/commands/config/migrate.js +25 -15
- package/commands/config/set.d.ts +5 -6
- package/commands/config/set.js +38 -14
- package/commands/config.d.ts +3 -4
- package/commands/config.js +20 -44
- package/commands/create/api-sample.d.ts +3 -1
- package/commands/create/api-sample.js +34 -38
- package/commands/create/app.d.ts +3 -1
- package/commands/create/app.js +9 -7
- package/commands/create/function.d.ts +3 -1
- package/commands/create/function.js +11 -10
- package/commands/create/index.d.ts +5 -1
- package/commands/create/index.js +23 -11
- package/commands/create/module.d.ts +3 -1
- package/commands/create/module.js +14 -13
- package/commands/create/react-app.d.ts +3 -1
- package/commands/create/react-app.js +10 -7
- package/commands/create/template.d.ts +3 -1
- package/commands/create/template.js +14 -14
- package/commands/create/vue-app.d.ts +3 -1
- package/commands/create/vue-app.js +10 -7
- package/commands/create/webpack-serverless.d.ts +3 -1
- package/commands/create/webpack-serverless.js +10 -7
- package/commands/create/website-theme.d.ts +3 -1
- package/commands/create/website-theme.js +10 -9
- package/commands/create.d.ts +4 -24
- package/commands/create.js +64 -74
- package/commands/customObject/create.d.ts +4 -9
- package/commands/customObject/create.js +17 -10
- package/commands/customObject/schema/create.d.ts +4 -9
- package/commands/customObject/schema/create.js +18 -11
- package/commands/customObject/schema/delete.d.ts +4 -9
- package/commands/customObject/schema/delete.js +17 -10
- package/commands/customObject/schema/fetch-all.d.ts +4 -9
- package/commands/customObject/schema/fetch-all.js +17 -10
- package/commands/customObject/schema/fetch.d.ts +4 -9
- package/commands/customObject/schema/fetch.js +17 -10
- package/commands/customObject/schema/list.d.ts +4 -8
- package/commands/customObject/schema/list.js +17 -10
- package/commands/customObject/schema/update.d.ts +4 -9
- package/commands/customObject/schema/update.js +18 -11
- package/commands/customObject/schema.d.ts +3 -5
- package/commands/customObject/schema.js +27 -54
- package/commands/customObject.d.ts +3 -4
- package/commands/customObject.js +20 -45
- package/commands/doctor.d.ts +6 -8
- package/commands/doctor.js +32 -21
- package/commands/feedback.d.ts +4 -1
- package/commands/feedback.js +40 -47
- package/commands/fetch.d.ts +12 -1
- package/commands/fetch.js +49 -33
- package/commands/filemanager/fetch.d.ts +4 -9
- package/commands/filemanager/fetch.js +18 -11
- package/commands/filemanager/upload.d.ts +4 -9
- package/commands/filemanager/upload.js +17 -11
- package/commands/filemanager.d.ts +3 -4
- package/commands/filemanager.js +20 -41
- package/commands/function/deploy.d.ts +6 -1
- package/commands/function/deploy.js +70 -50
- package/commands/function/list.d.ts +6 -1
- package/commands/function/list.js +44 -32
- package/commands/function/server.d.ts +10 -1
- package/commands/function/server.js +49 -38
- package/commands/function.d.ts +5 -1
- package/commands/function.js +24 -10
- package/commands/hubdb/clear.d.ts +4 -9
- package/commands/hubdb/clear.js +17 -10
- package/commands/hubdb/create.d.ts +4 -9
- package/commands/hubdb/create.js +17 -10
- package/commands/hubdb/delete.d.ts +4 -9
- package/commands/hubdb/delete.js +17 -10
- package/commands/hubdb/fetch.d.ts +4 -9
- package/commands/hubdb/fetch.js +17 -10
- package/commands/hubdb.d.ts +3 -2
- package/commands/hubdb.js +23 -45
- package/commands/init.d.ts +3 -7
- package/commands/init.js +12 -5
- package/commands/lint.d.ts +6 -4
- package/commands/lint.js +44 -43
- package/commands/list.d.ts +3 -7
- package/commands/list.js +19 -11
- package/commands/logs.d.ts +10 -1
- package/commands/logs.js +53 -44
- package/commands/module/marketplace-validate.d.ts +6 -1
- package/commands/module/marketplace-validate.js +39 -27
- package/commands/module.d.ts +3 -1
- package/commands/module.js +22 -10
- package/commands/mv.d.ts +3 -7
- package/commands/mv.js +19 -11
- package/commands/open.d.ts +3 -7
- package/commands/open.js +19 -11
- package/commands/project/cloneApp.d.ts +1 -1
- package/commands/project/cloneApp.js +2 -2
- package/commands/project/create.js +3 -3
- package/commands/project/deploy.d.ts +1 -0
- package/commands/project/deploy.js +40 -12
- package/commands/project/dev/index.d.ts +1 -4
- package/commands/project/dev/index.js +48 -16
- package/commands/project/dev/unifiedFlow.d.ts +2 -1
- package/commands/project/dev/unifiedFlow.js +85 -30
- package/commands/project/migrate.d.ts +1 -0
- package/commands/project/profile/add.d.ts +7 -0
- package/commands/project/profile/add.js +209 -0
- package/commands/project/profile/delete.d.ts +6 -0
- package/commands/project/profile/delete.js +123 -0
- package/commands/project/profile.d.ts +3 -0
- package/commands/project/profile.js +25 -0
- package/commands/project/upload.d.ts +1 -0
- package/commands/project/upload.js +38 -8
- package/commands/project/validate.d.ts +4 -0
- package/commands/project/validate.js +53 -0
- package/commands/project.js +4 -0
- package/commands/remove.d.ts +3 -7
- package/commands/remove.js +19 -11
- package/commands/sandbox/create.d.ts +4 -9
- package/commands/sandbox/create.js +18 -11
- package/commands/sandbox/delete.d.ts +4 -9
- package/commands/sandbox/delete.js +18 -11
- package/commands/sandbox.d.ts +3 -4
- package/commands/sandbox.js +20 -43
- package/commands/secret/addSecret.d.ts +4 -9
- package/commands/secret/addSecret.js +17 -10
- package/commands/secret/deleteSecret.d.ts +4 -9
- package/commands/secret/deleteSecret.js +17 -10
- package/commands/secret/listSecret.d.ts +4 -9
- package/commands/secret/listSecret.js +17 -10
- package/commands/secret/updateSecret.d.ts +4 -9
- package/commands/secret/updateSecret.js +17 -10
- package/commands/secret.d.ts +3 -4
- package/commands/secret.js +25 -48
- package/commands/setupMcp.d.ts +8 -0
- package/commands/setupMcp.js +229 -0
- package/commands/theme/generate-selectors.d.ts +3 -7
- package/commands/theme/generate-selectors.js +14 -6
- package/commands/theme/marketplace-validate.d.ts +4 -9
- package/commands/theme/marketplace-validate.js +17 -10
- package/commands/theme/preview.d.ts +4 -9
- package/commands/theme/preview.js +16 -9
- package/commands/theme.d.ts +3 -4
- package/commands/theme.js +23 -46
- package/commands/upload.d.ts +12 -1
- package/commands/upload.js +118 -97
- package/commands/watch.d.ts +14 -1
- package/commands/watch.js +76 -65
- package/lang/en.d.ts +838 -574
- package/lang/en.js +630 -373
- package/lang/en.lyaml +30 -23
- package/lib/accountTypes.js +2 -1
- package/lib/app/migrate.d.ts +23 -0
- package/lib/app/migrate.js +14 -3
- package/lib/app/migrate_legacy.js +7 -7
- package/lib/app/urls.d.ts +16 -0
- package/lib/app/urls.js +16 -0
- package/lib/configMigrate.js +24 -10
- package/lib/configOptions.d.ts +4 -0
- package/lib/configOptions.js +41 -46
- package/lib/constants.d.ts +6 -0
- package/lib/constants.js +7 -1
- package/lib/dependencyManagement.d.ts +0 -5
- package/lib/dependencyManagement.js +13 -39
- package/lib/doctor/Doctor.js +2 -1
- package/lib/filesystem.d.ts +1 -1
- package/lib/interpolation.d.ts +2 -3
- package/lib/lang.d.ts +2 -3
- package/lib/middleware/autoUpdateMiddleware.d.ts +1 -0
- package/lib/middleware/autoUpdateMiddleware.js +89 -0
- package/lib/middleware/configMiddleware.js +8 -0
- package/lib/npm.d.ts +9 -0
- package/lib/npm.js +36 -0
- package/lib/projectProfiles.d.ts +6 -0
- package/lib/projectProfiles.js +65 -0
- package/lib/projects/buildAndDeploy.js +17 -2
- package/lib/projects/localDev/AppDevModeInterface.d.ts +26 -0
- package/lib/projects/localDev/AppDevModeInterface.js +156 -0
- package/lib/projects/localDev/DevServerManagerV2.d.ts +11 -22
- package/lib/projects/localDev/DevServerManagerV2.js +19 -15
- package/lib/projects/localDev/LocalDevLogger.d.ts +30 -0
- package/lib/projects/localDev/LocalDevLogger.js +158 -0
- package/lib/projects/localDev/LocalDevManager.js +12 -5
- package/lib/projects/localDev/LocalDevProcess.d.ts +27 -0
- package/lib/projects/localDev/LocalDevProcess.js +171 -0
- package/lib/projects/localDev/LocalDevState.d.ts +37 -0
- package/lib/projects/localDev/LocalDevState.js +78 -0
- package/lib/projects/localDev/LocalDevWatcher.d.ts +10 -0
- package/lib/projects/localDev/LocalDevWatcher.js +56 -0
- package/lib/projects/localDev/LocalDevWebsocketServer.d.ts +17 -0
- package/lib/projects/localDev/LocalDevWebsocketServer.js +92 -0
- package/lib/projects/localDev/helpers.d.ts +3 -2
- package/lib/projects/localDev/helpers.js +32 -2
- package/lib/projects/upload.d.ts +2 -1
- package/lib/projects/upload.js +2 -2
- package/lib/prompts/createApiSamplePrompt.d.ts +2 -10
- package/lib/prompts/createTemplatePrompt.d.ts +22 -4
- package/lib/prompts/installAppPrompt.d.ts +1 -0
- package/lib/prompts/installAppPrompt.js +35 -0
- package/lib/prompts/projectDevTargetAccountPrompt.d.ts +6 -1
- package/lib/prompts/projectDevTargetAccountPrompt.js +6 -6
- package/lib/prompts/promptUtils.d.ts +2 -1
- package/lib/prompts/promptUtils.js +2 -1
- package/lib/prompts/selectAppPrompt.d.ts +2 -0
- package/lib/prompts/selectAppPrompt.js +40 -0
- package/lib/prompts/{selectPublicAppPrompt.d.ts → selectPublicAppForMigrationPrompt.d.ts} +1 -1
- package/lib/prompts/{selectPublicAppPrompt.js → selectPublicAppForMigrationPrompt.js} +8 -8
- package/lib/testUtils.d.ts +3 -3
- package/lib/testUtils.js +8 -9
- package/lib/ui/index.js +4 -1
- package/lib/upload.d.ts +1 -1
- package/lib/validation.js +4 -5
- package/lib/yargsUtils.d.ts +4 -0
- package/lib/yargsUtils.js +6 -0
- package/mcp-server/index.d.ts +1 -0
- package/mcp-server/index.js +17 -0
- package/mcp-server/mcpLoader.d.ts +5 -0
- package/mcp-server/mcpLoader.js +24 -0
- package/mcp-server/tools/ExplainProjectStructureTool.d.ts +33 -0
- package/mcp-server/tools/ExplainProjectStructureTool.js +266 -0
- package/mcp-server/tools/GenerateAppComponentTool.d.ts +99 -0
- package/mcp-server/tools/GenerateAppComponentTool.js +193 -0
- package/mcp-server/tools/GenerateCardComponentTool.d.ts +74 -0
- package/mcp-server/tools/GenerateCardComponentTool.js +146 -0
- package/mcp-server/tools/GenerateProjectConfigTool.d.ts +32 -0
- package/mcp-server/tools/GenerateProjectConfigTool.js +40 -0
- package/mcp-server/tools/HubSpotCLIHelper.d.ts +16 -0
- package/mcp-server/tools/HubSpotCLIHelper.js +74 -0
- package/mcp-server/tools/UploadProjectTool.d.ts +44 -0
- package/mcp-server/tools/UploadProjectTool.js +149 -0
- package/mcp-server/tools/ValidateProjectTool.d.ts +62 -0
- package/mcp-server/tools/ValidateProjectTool.js +315 -0
- package/package.json +13 -6
- package/types/Cms.d.ts +30 -0
- package/types/Cms.js +2 -0
- package/types/LocalDev.d.ts +24 -0
- package/types/LocalDev.js +2 -0
- package/types/Prompts.d.ts +0 -7
- package/types/Yargs.d.ts +8 -1
- package/lib/projects/localDev/LocalDevManagerV2.d.ts +0 -64
- package/lib/projects/localDev/LocalDevManagerV2.js +0 -345
- package/lib/prompts/installPublicAppPrompt.d.ts +0 -1
- package/lib/prompts/installPublicAppPrompt.js +0 -41
|
@@ -1,17 +1,19 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
|
|
4
|
-
const
|
|
5
|
-
const
|
|
6
|
-
const
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
const
|
|
10
|
-
const
|
|
11
|
-
const
|
|
12
|
-
const
|
|
13
|
-
const
|
|
14
|
-
const { EXIT_CODES } = require('../../lib/enums/exitCodes');
|
|
6
|
+
const SpinniesManager_1 = __importDefault(require("../../lib/ui/SpinniesManager"));
|
|
7
|
+
const logger_1 = require("@hubspot/local-dev-lib/logger");
|
|
8
|
+
const table_1 = require("../../lib/ui/table");
|
|
9
|
+
const promptUtils_1 = require("../../lib/prompts/promptUtils");
|
|
10
|
+
const lang_1 = require("../../lib/lang");
|
|
11
|
+
const designManager_1 = require("@hubspot/local-dev-lib/api/designManager");
|
|
12
|
+
const lighthouseScore_1 = require("@hubspot/local-dev-lib/api/lighthouseScore");
|
|
13
|
+
const constants_1 = require("../../lib/constants");
|
|
14
|
+
const ui_1 = require("../../lib/ui");
|
|
15
|
+
const exitCodes_1 = require("../../lib/enums/exitCodes");
|
|
16
|
+
const yargsUtils_1 = require("../../lib/yargsUtils");
|
|
15
17
|
const DEFAULT_TABLE_HEADER = [
|
|
16
18
|
'Accessibility',
|
|
17
19
|
'Best practices',
|
|
@@ -19,96 +21,107 @@ const DEFAULT_TABLE_HEADER = [
|
|
|
19
21
|
'PWA',
|
|
20
22
|
'SEO',
|
|
21
23
|
];
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
const EMPTY_SCORE = {
|
|
25
|
+
accessibilityScore: 0,
|
|
26
|
+
bestPracticesScore: 0,
|
|
27
|
+
performanceScore: 0,
|
|
28
|
+
pwaScore: 0,
|
|
29
|
+
seoScore: 0,
|
|
30
|
+
runWarnings: [],
|
|
31
|
+
auditDetails: null,
|
|
32
|
+
emulatedFormFactor: '',
|
|
33
|
+
templatePath: null,
|
|
34
|
+
link: null,
|
|
35
|
+
};
|
|
36
|
+
const command = 'lighthouse-score [--theme]';
|
|
37
|
+
const describe = undefined;
|
|
38
|
+
async function selectTheme(accountId) {
|
|
39
|
+
let themes = [];
|
|
40
|
+
try {
|
|
41
|
+
const { data: result } = await (0, designManager_1.fetchThemes)(accountId, {
|
|
42
|
+
limit: 500,
|
|
43
|
+
sorting: 'MOST_USED',
|
|
44
|
+
});
|
|
45
|
+
if (result && result.objects) {
|
|
46
|
+
themes = result.objects
|
|
47
|
+
.map(({ theme }) => theme.path)
|
|
48
|
+
.filter(themePath => !themePath.startsWith(constants_1.HUBSPOT_FOLDER) &&
|
|
49
|
+
!themePath.startsWith(constants_1.MARKETPLACE_FOLDER));
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
catch (err) {
|
|
53
|
+
logger_1.logger.error((0, lang_1.i18n)(`commands.cms.subcommands.lighthouseScore.errors.failedToFetchThemes`));
|
|
54
|
+
process.exit(exitCodes_1.EXIT_CODES.ERROR);
|
|
55
|
+
}
|
|
56
|
+
const { theme: selectedTheme } = await (0, promptUtils_1.promptUser)([
|
|
26
57
|
{
|
|
27
58
|
type: 'list',
|
|
28
|
-
look: false,
|
|
29
59
|
name: 'theme',
|
|
30
|
-
message: i18n(`commands.cms.subcommands.lighthouseScore.info.promptMessage`),
|
|
31
|
-
choices:
|
|
32
|
-
try {
|
|
33
|
-
const { data: result } = await fetchThemes(accountId, {
|
|
34
|
-
limit: 500,
|
|
35
|
-
sorting: 'MOST_USED',
|
|
36
|
-
});
|
|
37
|
-
if (result && result.objects) {
|
|
38
|
-
return result.objects
|
|
39
|
-
.map(({ theme }) => theme.path)
|
|
40
|
-
.filter(themePath => !themePath.startsWith(HUBSPOT_FOLDER) &&
|
|
41
|
-
!themePath.startsWith(MARKETPLACE_FOLDER));
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
catch (err) {
|
|
45
|
-
logger.error(i18n(`commands.cms.subcommands.lighthouseScore.errors.failedToFetchThemes`));
|
|
46
|
-
process.exit(EXIT_CODES.ERROR);
|
|
47
|
-
}
|
|
48
|
-
},
|
|
60
|
+
message: (0, lang_1.i18n)(`commands.cms.subcommands.lighthouseScore.info.promptMessage`),
|
|
61
|
+
choices: themes,
|
|
49
62
|
},
|
|
50
63
|
]);
|
|
51
64
|
return selectedTheme;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
const { target, verbose, theme, derivedAccountId } =
|
|
65
|
+
}
|
|
66
|
+
async function handler(args) {
|
|
67
|
+
const { target, verbose, theme, derivedAccountId } = args;
|
|
55
68
|
const includeDesktopScore = target === 'desktop' || !verbose;
|
|
56
69
|
const includeMobileScore = target === 'mobile' || !verbose;
|
|
57
70
|
let themeToCheck = theme;
|
|
58
71
|
if (themeToCheck) {
|
|
59
72
|
let isValidTheme = true;
|
|
60
73
|
try {
|
|
61
|
-
const { data: result } = await fetchThemes(derivedAccountId, {
|
|
74
|
+
const { data: result } = await (0, designManager_1.fetchThemes)(derivedAccountId, {
|
|
62
75
|
name: encodeURIComponent(themeToCheck),
|
|
63
76
|
});
|
|
64
|
-
isValidTheme = result && result.total;
|
|
77
|
+
isValidTheme = result && !!result.total;
|
|
65
78
|
}
|
|
66
79
|
catch (err) {
|
|
67
80
|
isValidTheme = false;
|
|
68
81
|
}
|
|
69
82
|
if (!isValidTheme) {
|
|
70
|
-
logger.error(i18n(`commands.cms.subcommands.lighthouseScore.errors.themeNotFound`, {
|
|
83
|
+
logger_1.logger.error((0, lang_1.i18n)(`commands.cms.subcommands.lighthouseScore.errors.themeNotFound`, {
|
|
71
84
|
theme: themeToCheck,
|
|
72
85
|
}));
|
|
73
|
-
process.exit(EXIT_CODES.ERROR);
|
|
86
|
+
process.exit(exitCodes_1.EXIT_CODES.ERROR);
|
|
74
87
|
}
|
|
75
88
|
}
|
|
76
89
|
else {
|
|
77
90
|
themeToCheck = await selectTheme(derivedAccountId);
|
|
78
|
-
logger.log();
|
|
91
|
+
logger_1.logger.log();
|
|
79
92
|
}
|
|
80
93
|
// Kick off the scoring
|
|
81
94
|
let requestResult;
|
|
82
95
|
try {
|
|
83
|
-
const { data } = await requestLighthouseScore(derivedAccountId, {
|
|
96
|
+
const { data } = await (0, lighthouseScore_1.requestLighthouseScore)(derivedAccountId, {
|
|
84
97
|
themePath: themeToCheck,
|
|
85
98
|
});
|
|
86
99
|
requestResult = data;
|
|
87
100
|
}
|
|
88
101
|
catch (err) {
|
|
89
|
-
logger.debug(err);
|
|
102
|
+
logger_1.logger.debug(err);
|
|
90
103
|
}
|
|
91
104
|
if (!requestResult || !requestResult.mobileId || !requestResult.desktopId) {
|
|
92
|
-
logger.error(i18n(`commands.cms.subcommands.lighthouseScore.errors.failedToGetLighthouseScore`));
|
|
93
|
-
process.exit(EXIT_CODES.ERROR);
|
|
105
|
+
logger_1.logger.error((0, lang_1.i18n)(`commands.cms.subcommands.lighthouseScore.errors.failedToGetLighthouseScore`));
|
|
106
|
+
process.exit(exitCodes_1.EXIT_CODES.ERROR);
|
|
94
107
|
}
|
|
95
108
|
// Poll till scoring is finished
|
|
96
109
|
try {
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
text: i18n(`commands.cms.subcommands.lighthouseScore.info.generatingScore`, { theme: themeToCheck }),
|
|
110
|
+
SpinniesManager_1.default.init();
|
|
111
|
+
SpinniesManager_1.default.add('lighthouseScore', {
|
|
112
|
+
text: (0, lang_1.i18n)(`commands.cms.subcommands.lighthouseScore.info.generatingScore`, { theme: themeToCheck }),
|
|
100
113
|
});
|
|
101
|
-
|
|
114
|
+
async function checkScoreStatus() {
|
|
102
115
|
let desktopScoreStatus = 'COMPLETED';
|
|
103
116
|
if (includeDesktopScore) {
|
|
104
|
-
const { data } = await getLighthouseScoreStatus(derivedAccountId, {
|
|
117
|
+
const { data } = await (0, lighthouseScore_1.getLighthouseScoreStatus)(derivedAccountId, {
|
|
105
118
|
themeId: requestResult.desktopId,
|
|
106
119
|
});
|
|
107
120
|
desktopScoreStatus = data;
|
|
108
121
|
}
|
|
109
122
|
let mobileScoreStatus = 'COMPLETED';
|
|
110
123
|
if (includeDesktopScore) {
|
|
111
|
-
const { data } = await getLighthouseScoreStatus(derivedAccountId, {
|
|
124
|
+
const { data } = await (0, lighthouseScore_1.getLighthouseScoreStatus)(derivedAccountId, {
|
|
112
125
|
themeId: requestResult.mobileId,
|
|
113
126
|
});
|
|
114
127
|
mobileScoreStatus = data;
|
|
@@ -118,29 +131,29 @@ exports.handler = async (options) => {
|
|
|
118
131
|
await new Promise(resolve => setTimeout(resolve, 2000));
|
|
119
132
|
await checkScoreStatus();
|
|
120
133
|
}
|
|
121
|
-
}
|
|
134
|
+
}
|
|
122
135
|
await checkScoreStatus();
|
|
123
|
-
|
|
136
|
+
SpinniesManager_1.default.remove('lighthouseScore');
|
|
124
137
|
}
|
|
125
138
|
catch (err) {
|
|
126
|
-
logger.debug(err);
|
|
127
|
-
process.exit(EXIT_CODES.ERROR);
|
|
139
|
+
logger_1.logger.debug(err);
|
|
140
|
+
process.exit(exitCodes_1.EXIT_CODES.ERROR);
|
|
128
141
|
}
|
|
129
142
|
// Fetch the scoring results
|
|
130
|
-
let desktopScoreResult
|
|
131
|
-
let mobileScoreResult
|
|
132
|
-
let verboseViewAverageScoreResult
|
|
143
|
+
let desktopScoreResult;
|
|
144
|
+
let mobileScoreResult;
|
|
145
|
+
let verboseViewAverageScoreResult;
|
|
133
146
|
try {
|
|
134
147
|
const params = { isAverage: !verbose };
|
|
135
148
|
if (includeDesktopScore) {
|
|
136
|
-
const { data } = await getLighthouseScore(derivedAccountId, {
|
|
149
|
+
const { data } = await (0, lighthouseScore_1.getLighthouseScore)(derivedAccountId, {
|
|
137
150
|
...params,
|
|
138
151
|
desktopId: requestResult.desktopId,
|
|
139
152
|
});
|
|
140
153
|
desktopScoreResult = data;
|
|
141
154
|
}
|
|
142
155
|
if (includeMobileScore) {
|
|
143
|
-
const { data } = await getLighthouseScore(derivedAccountId, {
|
|
156
|
+
const { data } = await (0, lighthouseScore_1.getLighthouseScore)(derivedAccountId, {
|
|
144
157
|
...params,
|
|
145
158
|
mobileId: requestResult.mobileId,
|
|
146
159
|
});
|
|
@@ -148,25 +161,30 @@ exports.handler = async (options) => {
|
|
|
148
161
|
}
|
|
149
162
|
// This is needed to show the average scores above the verbose output
|
|
150
163
|
if (verbose) {
|
|
151
|
-
const { data } = await getLighthouseScore(derivedAccountId, {
|
|
164
|
+
const { data } = await (0, lighthouseScore_1.getLighthouseScore)(derivedAccountId, {
|
|
152
165
|
...params,
|
|
153
166
|
isAverage: true,
|
|
154
|
-
desktopId: includeDesktopScore ? requestResult.desktopId :
|
|
155
|
-
mobileId: includeMobileScore ? requestResult.mobileId :
|
|
167
|
+
desktopId: includeDesktopScore ? requestResult.desktopId : undefined,
|
|
168
|
+
mobileId: includeMobileScore ? requestResult.mobileId : undefined,
|
|
156
169
|
});
|
|
157
170
|
verboseViewAverageScoreResult = data;
|
|
158
171
|
}
|
|
159
172
|
}
|
|
160
173
|
catch (err) {
|
|
161
|
-
logger.error(i18n(`commands.cms.subcommands.lighthouseScore.errors.failedToGetLighthouseScore`));
|
|
162
|
-
process.exit(EXIT_CODES.ERROR);
|
|
174
|
+
logger_1.logger.error((0, lang_1.i18n)(`commands.cms.subcommands.lighthouseScore.errors.failedToGetLighthouseScore`));
|
|
175
|
+
process.exit(exitCodes_1.EXIT_CODES.ERROR);
|
|
163
176
|
}
|
|
164
177
|
if (verbose) {
|
|
165
|
-
|
|
166
|
-
|
|
178
|
+
const scoreResult = target === 'desktop' ? desktopScoreResult : mobileScoreResult;
|
|
179
|
+
if (!verboseViewAverageScoreResult || !scoreResult) {
|
|
180
|
+
logger_1.logger.error((0, lang_1.i18n)(`commands.cms.subcommands.lighthouseScore.errors.failedToGetLighthouseScore`));
|
|
181
|
+
process.exit(exitCodes_1.EXIT_CODES.ERROR);
|
|
182
|
+
}
|
|
183
|
+
logger_1.logger.log(`${themeToCheck} ${target} scores`);
|
|
184
|
+
const tableHeader = (0, table_1.getTableHeader)(DEFAULT_TABLE_HEADER);
|
|
167
185
|
const scores = verboseViewAverageScoreResult.scores
|
|
168
186
|
? verboseViewAverageScoreResult.scores[0]
|
|
169
|
-
:
|
|
187
|
+
: EMPTY_SCORE;
|
|
170
188
|
const averageTableData = [
|
|
171
189
|
scores.accessibilityScore,
|
|
172
190
|
scores.bestPracticesScore,
|
|
@@ -174,15 +192,14 @@ exports.handler = async (options) => {
|
|
|
174
192
|
scores.pwaScore,
|
|
175
193
|
scores.seoScore,
|
|
176
194
|
];
|
|
177
|
-
logger.log(getTableContents([tableHeader, averageTableData], {
|
|
195
|
+
logger_1.logger.log((0, table_1.getTableContents)([tableHeader, averageTableData], {
|
|
178
196
|
border: { bodyLeft: ' ' },
|
|
179
197
|
}));
|
|
180
|
-
logger.log(i18n(`commands.cms.subcommands.lighthouseScore.info.pageTemplateScoreTitle`));
|
|
181
|
-
const table2Header = getTableHeader([
|
|
198
|
+
logger_1.logger.log((0, lang_1.i18n)(`commands.cms.subcommands.lighthouseScore.info.pageTemplateScoreTitle`));
|
|
199
|
+
const table2Header = (0, table_1.getTableHeader)([
|
|
182
200
|
'Template path',
|
|
183
201
|
...DEFAULT_TABLE_HEADER,
|
|
184
202
|
]);
|
|
185
|
-
const scoreResult = target === 'desktop' ? desktopScoreResult : mobileScoreResult;
|
|
186
203
|
const templateTableData = scoreResult.scores.map(score => {
|
|
187
204
|
return [
|
|
188
205
|
score.templatePath,
|
|
@@ -193,30 +210,32 @@ exports.handler = async (options) => {
|
|
|
193
210
|
score.seoScore,
|
|
194
211
|
];
|
|
195
212
|
});
|
|
196
|
-
logger.log(getTableContents([table2Header, ...templateTableData], {
|
|
213
|
+
logger_1.logger.log((0, table_1.getTableContents)([table2Header, ...templateTableData], {
|
|
197
214
|
border: { bodyLeft: ' ' },
|
|
198
215
|
}));
|
|
199
|
-
logger.log(i18n(`commands.cms.subcommands.lighthouseScore.info.lighthouseLinksTitle`));
|
|
216
|
+
logger_1.logger.log((0, lang_1.i18n)(`commands.cms.subcommands.lighthouseScore.info.lighthouseLinksTitle`));
|
|
200
217
|
scoreResult.scores.forEach(score => {
|
|
201
|
-
|
|
218
|
+
if (score.templatePath && score.link) {
|
|
219
|
+
logger_1.logger.log(' ', (0, ui_1.uiLink)(score.templatePath, score.link));
|
|
220
|
+
}
|
|
202
221
|
});
|
|
203
222
|
if (scoreResult.failedTemplatePaths.length) {
|
|
204
|
-
logger.log();
|
|
205
|
-
logger.error(i18n(`commands.cms.subcommands.lighthouseScore.info.failedTemplatePathsTitle`));
|
|
223
|
+
logger_1.logger.log();
|
|
224
|
+
logger_1.logger.error((0, lang_1.i18n)(`commands.cms.subcommands.lighthouseScore.info.failedTemplatePathsTitle`));
|
|
206
225
|
scoreResult.failedTemplatePaths.forEach(failedTemplatePath => {
|
|
207
|
-
logger.log(' ', failedTemplatePath);
|
|
226
|
+
logger_1.logger.log(' ', failedTemplatePath);
|
|
208
227
|
});
|
|
209
228
|
}
|
|
210
|
-
logger.log();
|
|
211
|
-
logger.info(i18n(`commands.cms.subcommands.lighthouseScore.info.targetDeviceNote`, {
|
|
229
|
+
logger_1.logger.log();
|
|
230
|
+
logger_1.logger.info((0, lang_1.i18n)(`commands.cms.subcommands.lighthouseScore.info.targetDeviceNote`, {
|
|
212
231
|
target,
|
|
213
232
|
}));
|
|
214
233
|
}
|
|
215
234
|
else {
|
|
216
|
-
logger.log(`Theme: ${themeToCheck}`);
|
|
217
|
-
const tableHeader = getTableHeader(['Target', ...DEFAULT_TABLE_HEADER]);
|
|
235
|
+
logger_1.logger.log(`Theme: ${themeToCheck}`);
|
|
236
|
+
const tableHeader = (0, table_1.getTableHeader)(['Target', ...DEFAULT_TABLE_HEADER]);
|
|
218
237
|
const getTableData = (target, scoreResult) => {
|
|
219
|
-
const scores = scoreResult
|
|
238
|
+
const scores = scoreResult?.scores ? scoreResult.scores[0] : EMPTY_SCORE;
|
|
220
239
|
return [
|
|
221
240
|
target,
|
|
222
241
|
scores.accessibilityScore,
|
|
@@ -230,39 +249,49 @@ exports.handler = async (options) => {
|
|
|
230
249
|
getTableData('desktop', desktopScoreResult),
|
|
231
250
|
getTableData('mobile', mobileScoreResult),
|
|
232
251
|
];
|
|
233
|
-
logger.log(getTableContents([tableHeader, ...tableData], {
|
|
252
|
+
logger_1.logger.log((0, table_1.getTableContents)([tableHeader, ...tableData], {
|
|
234
253
|
border: { bodyLeft: ' ' },
|
|
235
254
|
}));
|
|
236
|
-
logger.info(i18n(`commands.cms.subcommands.lighthouseScore.info.verboseOptionNote`));
|
|
255
|
+
logger_1.logger.info((0, lang_1.i18n)(`commands.cms.subcommands.lighthouseScore.info.verboseOptionNote`));
|
|
237
256
|
}
|
|
238
|
-
logger.log();
|
|
239
|
-
logger.log(`Powered by ${uiLink('Google Lighthouse', 'https://developer.chrome.com/docs/lighthouse/overview/')}.`);
|
|
240
|
-
process.exit();
|
|
241
|
-
}
|
|
242
|
-
|
|
257
|
+
logger_1.logger.log();
|
|
258
|
+
logger_1.logger.log(`Powered by ${(0, ui_1.uiLink)('Google Lighthouse', 'https://developer.chrome.com/docs/lighthouse/overview/')}.`);
|
|
259
|
+
process.exit(exitCodes_1.EXIT_CODES.SUCCESS);
|
|
260
|
+
}
|
|
261
|
+
function cmslighthouseScoreBuilder(yargs) {
|
|
243
262
|
yargs.option('theme', {
|
|
244
|
-
describe: i18n(`commands.cms.subcommands.lighthouseScore.options.theme.describe`),
|
|
263
|
+
describe: (0, lang_1.i18n)(`commands.cms.subcommands.lighthouseScore.options.theme.describe`),
|
|
245
264
|
type: 'string',
|
|
246
265
|
});
|
|
247
266
|
yargs.option('target', {
|
|
248
|
-
describe: i18n(`commands.cms.subcommands.lighthouseScore.options.target.describe`),
|
|
267
|
+
describe: (0, lang_1.i18n)(`commands.cms.subcommands.lighthouseScore.options.target.describe`),
|
|
249
268
|
type: 'string',
|
|
250
269
|
choices: ['desktop', 'mobile'],
|
|
251
270
|
default: 'desktop',
|
|
252
271
|
});
|
|
253
272
|
yargs.option('verbose', {
|
|
254
|
-
describe: i18n(`commands.cms.subcommands.lighthouseScore.options.verbose.describe`),
|
|
273
|
+
describe: (0, lang_1.i18n)(`commands.cms.subcommands.lighthouseScore.options.verbose.describe`),
|
|
255
274
|
boolean: true,
|
|
256
275
|
default: false,
|
|
257
276
|
});
|
|
258
277
|
yargs.example([
|
|
259
278
|
[
|
|
260
279
|
'$0 cms lighthouse-score --theme=my-theme',
|
|
261
|
-
i18n(`commands.cms.subcommands.lighthouseScore.examples.default`),
|
|
280
|
+
(0, lang_1.i18n)(`commands.cms.subcommands.lighthouseScore.examples.default`),
|
|
262
281
|
],
|
|
263
282
|
]);
|
|
264
|
-
addConfigOptions(yargs);
|
|
265
|
-
addAccountOptions(yargs);
|
|
266
|
-
addUseEnvironmentOptions(yargs);
|
|
267
283
|
return yargs;
|
|
284
|
+
}
|
|
285
|
+
const builder = (0, yargsUtils_1.makeYargsBuilder)(cmslighthouseScoreBuilder, command, describe, {
|
|
286
|
+
useGlobalOptions: true,
|
|
287
|
+
useConfigOptions: true,
|
|
288
|
+
useAccountOptions: true,
|
|
289
|
+
useEnvironmentOptions: true,
|
|
290
|
+
});
|
|
291
|
+
const cmslighthouseScoreCommand = {
|
|
292
|
+
command,
|
|
293
|
+
describe,
|
|
294
|
+
handler,
|
|
295
|
+
builder,
|
|
268
296
|
};
|
|
297
|
+
exports.default = cmslighthouseScoreCommand;
|
package/commands/cms.d.ts
CHANGED
package/commands/cms.js
CHANGED
|
@@ -1,21 +1,30 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
|
|
4
|
-
const
|
|
5
|
-
const
|
|
6
|
-
const
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
exports.builder = yargs => {
|
|
12
|
-
addConfigOptions(yargs);
|
|
13
|
-
addAccountOptions(yargs);
|
|
14
|
-
addGlobalOptions(yargs);
|
|
6
|
+
const lang_1 = require("../lib/lang");
|
|
7
|
+
const yargsUtils_1 = require("../lib/yargsUtils");
|
|
8
|
+
const lighthouseScore_1 = __importDefault(require("./cms/lighthouseScore"));
|
|
9
|
+
const convertFields_1 = __importDefault(require("./cms/convertFields"));
|
|
10
|
+
const getReactModule_1 = __importDefault(require("./cms/getReactModule"));
|
|
11
|
+
const command = 'cms';
|
|
12
|
+
const describe = (0, lang_1.i18n)(`commands.cms.describe`);
|
|
13
|
+
function cmsBuilder(yargs) {
|
|
15
14
|
yargs
|
|
16
|
-
.command(
|
|
17
|
-
.command(
|
|
18
|
-
.command(
|
|
15
|
+
.command(lighthouseScore_1.default)
|
|
16
|
+
.command(convertFields_1.default)
|
|
17
|
+
.command(getReactModule_1.default)
|
|
19
18
|
.demandCommand(1, '');
|
|
20
19
|
return yargs;
|
|
20
|
+
}
|
|
21
|
+
const builder = (0, yargsUtils_1.makeYargsBuilder)(cmsBuilder, command, describe);
|
|
22
|
+
const cmsCommand = {
|
|
23
|
+
command,
|
|
24
|
+
describe,
|
|
25
|
+
builder,
|
|
26
|
+
handler: () => { },
|
|
21
27
|
};
|
|
28
|
+
exports.default = cmsCommand;
|
|
29
|
+
// TODO Remove this legacy export once we've migrated all commands to TS
|
|
30
|
+
module.exports = cmsCommand;
|
package/commands/completion.d.ts
CHANGED
package/commands/completion.js
CHANGED
|
@@ -1,21 +1,34 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const yargsParser = require('yargs-parser');
|
|
5
|
-
const { i18n } = require('../lib/lang');
|
|
6
|
-
const { trackCommandUsage } = require('../lib/usageTracking');
|
|
7
|
-
exports.command = 'completion';
|
|
8
|
-
exports.describe = i18n('commands.completion.describe');
|
|
9
|
-
exports.handler = async () => {
|
|
10
|
-
await trackCommandUsage('completion');
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
11
4
|
};
|
|
12
|
-
exports
|
|
13
|
-
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const yargs_parser_1 = __importDefault(require("yargs-parser"));
|
|
7
|
+
const lang_1 = require("../lib/lang");
|
|
8
|
+
const usageTracking_1 = require("../lib/usageTracking");
|
|
9
|
+
const yargsUtils_1 = require("../lib/yargsUtils");
|
|
10
|
+
const command = 'completion';
|
|
11
|
+
const describe = (0, lang_1.i18n)('commands.completion.describe');
|
|
12
|
+
async function handler() {
|
|
13
|
+
await (0, usageTracking_1.trackCommandUsage)('completion');
|
|
14
|
+
}
|
|
15
|
+
function completionBuilder(yargs) {
|
|
16
|
+
const { help } = (0, yargs_parser_1.default)(process.argv.slice(2));
|
|
14
17
|
if (!help) {
|
|
15
18
|
yargs.completion();
|
|
16
19
|
}
|
|
17
20
|
yargs.example([
|
|
18
|
-
['$0 completion >> ~/.zshrc', i18n('commands.completion.examples.default')],
|
|
21
|
+
['$0 completion >> ~/.zshrc', (0, lang_1.i18n)('commands.completion.examples.default')],
|
|
19
22
|
]);
|
|
20
23
|
return yargs;
|
|
24
|
+
}
|
|
25
|
+
const builder = (0, yargsUtils_1.makeYargsBuilder)(completionBuilder, command, describe);
|
|
26
|
+
const completionCommand = {
|
|
27
|
+
command,
|
|
28
|
+
describe,
|
|
29
|
+
handler,
|
|
30
|
+
builder,
|
|
21
31
|
};
|
|
32
|
+
exports.default = completionCommand;
|
|
33
|
+
// TODO Remove this legacy export once we've migrated all commands to TS
|
|
34
|
+
module.exports = completionCommand;
|
|
@@ -1,10 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { CommonArgs, ConfigArgs } from '../../types/Yargs';
|
|
3
|
-
export declare const describe: string;
|
|
4
|
-
export declare const command = "migrate";
|
|
1
|
+
import { CommonArgs, ConfigArgs, YargsCommandModule } from '../../types/Yargs';
|
|
5
2
|
type ConfigMigrateArgs = CommonArgs & ConfigArgs & {
|
|
6
3
|
force?: boolean;
|
|
7
4
|
};
|
|
8
|
-
|
|
9
|
-
export
|
|
10
|
-
export {};
|
|
5
|
+
declare const configMigrateCommand: YargsCommandModule<unknown, ConfigMigrateArgs>;
|
|
6
|
+
export default configMigrateCommand;
|
|
@@ -3,24 +3,21 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.command = exports.describe = void 0;
|
|
7
|
-
exports.handler = handler;
|
|
8
|
-
exports.builder = builder;
|
|
9
6
|
const fs_1 = __importDefault(require("fs"));
|
|
10
7
|
const config_1 = require("@hubspot/local-dev-lib/constants/config");
|
|
11
8
|
const migrate_1 = require("@hubspot/local-dev-lib/config/migrate");
|
|
12
9
|
const logger_1 = require("@hubspot/local-dev-lib/logger");
|
|
13
10
|
const configMigrate_1 = require("../../lib/configMigrate");
|
|
14
|
-
const commonOpts_1 = require("../../lib/commonOpts");
|
|
15
11
|
const lang_1 = require("../../lib/lang");
|
|
16
12
|
const usageTracking_1 = require("../../lib/usageTracking");
|
|
17
13
|
const index_1 = require("../../lib/errorHandlers/index");
|
|
18
14
|
const exitCodes_1 = require("../../lib/enums/exitCodes");
|
|
19
|
-
|
|
15
|
+
const yargsUtils_1 = require("../../lib/yargsUtils");
|
|
16
|
+
const describe = (0, lang_1.i18n)('commands.config.subcommands.migrate.describe', {
|
|
20
17
|
deprecatedConfigPath: config_1.DEFAULT_HUBSPOT_CONFIG_YAML_FILE_NAME,
|
|
21
18
|
globalConfigPath: config_1.GLOBAL_CONFIG_PATH,
|
|
22
19
|
});
|
|
23
|
-
|
|
20
|
+
const command = 'migrate';
|
|
24
21
|
async function handler(args) {
|
|
25
22
|
const { config: configPath, force, derivedAccountId } = args;
|
|
26
23
|
if (configPath && !fs_1.default.existsSync(configPath)) {
|
|
@@ -56,14 +53,15 @@ async function handler(args) {
|
|
|
56
53
|
process.exit(exitCodes_1.EXIT_CODES.ERROR);
|
|
57
54
|
}
|
|
58
55
|
}
|
|
59
|
-
function
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
56
|
+
function configMigrateBuilder(yargs) {
|
|
57
|
+
return yargs
|
|
58
|
+
.option({
|
|
59
|
+
force: {
|
|
60
|
+
alias: 'f',
|
|
61
|
+
type: 'boolean',
|
|
62
|
+
default: false,
|
|
63
|
+
description: (0, lang_1.i18n)('commands.config.subcommands.migrate.options.force'),
|
|
64
|
+
},
|
|
67
65
|
})
|
|
68
66
|
.example([
|
|
69
67
|
[
|
|
@@ -80,5 +78,17 @@ function builder(yargs) {
|
|
|
80
78
|
}),
|
|
81
79
|
],
|
|
82
80
|
]);
|
|
83
|
-
return yargs;
|
|
84
81
|
}
|
|
82
|
+
const builder = (0, yargsUtils_1.makeYargsBuilder)(configMigrateBuilder, command, (0, lang_1.i18n)('commands.config.subcommands.migrate.verboseDescribe', {
|
|
83
|
+
archivedConfigPath: config_1.ARCHIVED_HUBSPOT_CONFIG_YAML_FILE_NAME,
|
|
84
|
+
}), {
|
|
85
|
+
useGlobalOptions: true,
|
|
86
|
+
useConfigOptions: true,
|
|
87
|
+
});
|
|
88
|
+
const configMigrateCommand = {
|
|
89
|
+
command,
|
|
90
|
+
describe,
|
|
91
|
+
handler,
|
|
92
|
+
builder,
|
|
93
|
+
};
|
|
94
|
+
exports.default = configMigrateCommand;
|
package/commands/config/set.d.ts
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import { ArgumentsCamelCase, Argv } from 'yargs';
|
|
2
|
-
import { CommonArgs } from '../../types/Yargs';
|
|
3
1
|
import { CmsPublishMode } from '@hubspot/local-dev-lib/types/Files';
|
|
4
|
-
|
|
2
|
+
import { CommonArgs, ConfigArgs, YargsCommandModule } from '../../types/Yargs';
|
|
3
|
+
type ConfigSetArgs = CommonArgs & ConfigArgs & {
|
|
5
4
|
defaultCmsPublishMode: CmsPublishMode;
|
|
6
5
|
allowUsageTracking?: boolean;
|
|
7
6
|
httpTimeout?: string;
|
|
7
|
+
allowAutoUpdates?: boolean;
|
|
8
8
|
};
|
|
9
|
-
|
|
10
|
-
export
|
|
11
|
-
export {};
|
|
9
|
+
declare const configSetCommand: YargsCommandModule<unknown, ConfigSetArgs>;
|
|
10
|
+
export default configSetCommand;
|