@hubspot/cli 7.4.9-experimental.0 → 7.5.0-beta.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/api/migrate.d.ts +14 -4
- package/api/migrate.js +16 -2
- package/bin/cli.js +9 -187
- package/commands/account/auth.d.ts +6 -0
- package/commands/account/auth.js +198 -0
- package/commands/account/clean.d.ts +3 -7
- package/commands/account/clean.js +54 -14
- package/commands/account/createOverride.d.ts +6 -0
- package/commands/account/createOverride.js +121 -0
- package/commands/account/info.d.ts +3 -7
- package/commands/account/info.js +51 -9
- package/commands/account/list.d.ts +3 -7
- package/commands/account/list.js +38 -13
- package/commands/account/remove.d.ts +3 -7
- package/commands/account/remove.js +57 -11
- package/commands/account/removeOverride.d.ts +6 -0
- package/commands/account/removeOverride.js +93 -0
- 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 +39 -9
- package/commands/account.d.ts +3 -4
- package/commands/account.js +35 -53
- package/commands/app/migrate.d.ts +5 -6
- package/commands/app/migrate.js +60 -44
- package/commands/app/secret/add.d.ts +7 -0
- package/commands/app/secret/add.js +62 -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 -10
- package/commands/auth.d.ts +3 -7
- package/commands/auth.js +25 -15
- 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 +133 -100
- package/commands/cms.d.ts +3 -1
- package/commands/cms.js +24 -16
- package/commands/completion.d.ts +3 -1
- package/commands/completion.js +25 -13
- package/commands/config/migrate.d.ts +6 -0
- package/commands/config/migrate.js +94 -0
- package/commands/config/set.d.ts +10 -1
- package/commands/config/set.js +61 -32
- package/commands/config.d.ts +3 -1
- package/commands/config.js +21 -11
- package/commands/create/api-sample.d.ts +3 -1
- package/commands/create/api-sample.js +34 -36
- 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 -75
- 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 +21 -11
- package/commands/customObject/schema/fetch-all.d.ts +4 -9
- package/commands/customObject/schema/fetch-all.js +19 -11
- package/commands/customObject/schema/fetch.d.ts +4 -9
- package/commands/customObject/schema/fetch.js +19 -11
- 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 +22 -48
- package/commands/doctor.d.ts +6 -8
- package/commands/doctor.js +32 -22
- package/commands/feedback.d.ts +4 -1
- package/commands/feedback.js +40 -48
- package/commands/fetch.d.ts +12 -1
- package/commands/fetch.js +49 -34
- 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 -42
- 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 -11
- package/commands/hubdb/clear.d.ts +4 -9
- package/commands/hubdb/clear.js +21 -15
- package/commands/hubdb/create.d.ts +4 -9
- package/commands/hubdb/create.js +23 -17
- package/commands/hubdb/delete.d.ts +4 -9
- package/commands/hubdb/delete.js +24 -16
- package/commands/hubdb/fetch.d.ts +4 -9
- package/commands/hubdb/fetch.js +20 -14
- package/commands/hubdb.d.ts +3 -2
- package/commands/hubdb.js +24 -47
- package/commands/init.d.ts +3 -7
- package/commands/init.js +28 -23
- package/commands/lint.d.ts +6 -4
- package/commands/lint.js +44 -44
- package/commands/list.d.ts +3 -7
- package/commands/list.js +23 -16
- package/commands/logs.d.ts +10 -1
- package/commands/logs.js +53 -45
- package/commands/module/marketplace-validate.d.ts +6 -1
- package/commands/module/marketplace-validate.js +39 -28
- package/commands/module.d.ts +3 -1
- package/commands/module.js +22 -12
- package/commands/mv.d.ts +3 -7
- package/commands/mv.js +22 -15
- package/commands/open.d.ts +3 -7
- package/commands/open.js +22 -15
- package/commands/project/add.d.ts +3 -7
- package/commands/project/add.js +28 -23
- package/commands/project/cloneApp.d.ts +6 -8
- package/commands/project/cloneApp.js +51 -47
- package/commands/project/create.d.ts +10 -1
- package/commands/project/create.js +85 -63
- package/commands/project/deploy.d.ts +4 -6
- package/commands/project/deploy.js +66 -36
- package/commands/project/dev/deprecatedFlow.js +32 -25
- package/commands/project/dev/index.d.ts +4 -5
- package/commands/project/dev/index.js +70 -25
- package/commands/project/dev/unifiedFlow.d.ts +2 -1
- package/commands/project/dev/unifiedFlow.js +90 -36
- package/commands/project/download.d.ts +3 -7
- package/commands/project/download.js +18 -19
- package/commands/project/installDeps.d.ts +6 -1
- package/commands/project/installDeps.js +48 -32
- package/commands/project/listBuilds.d.ts +3 -7
- package/commands/project/listBuilds.js +32 -27
- package/commands/project/logs.d.ts +10 -1
- package/commands/project/logs.js +73 -65
- package/commands/project/migrate.d.ts +7 -0
- package/commands/project/migrate.js +71 -0
- package/commands/project/migrateApp.d.ts +3 -8
- package/commands/project/migrateApp.js +23 -20
- package/commands/project/open.d.ts +3 -7
- package/commands/project/open.js +29 -21
- 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 +10 -1
- package/commands/project/upload.js +110 -56
- package/commands/project/watch.d.ts +6 -1
- package/commands/project/watch.js +95 -61
- package/commands/project.d.ts +3 -1
- package/commands/project.js +49 -35
- package/commands/remove.d.ts +3 -7
- package/commands/remove.js +25 -15
- package/commands/sandbox/create.d.ts +4 -9
- package/commands/sandbox/create.js +27 -21
- package/commands/sandbox/delete.d.ts +4 -9
- package/commands/sandbox/delete.js +35 -29
- package/commands/sandbox.d.ts +3 -4
- package/commands/sandbox.js +20 -44
- package/commands/secret/addSecret.d.ts +4 -9
- package/commands/secret/addSecret.js +21 -15
- package/commands/secret/deleteSecret.d.ts +4 -9
- package/commands/secret/deleteSecret.js +28 -18
- package/commands/secret/listSecret.d.ts +4 -9
- package/commands/secret/listSecret.js +19 -13
- package/commands/secret/updateSecret.d.ts +4 -9
- package/commands/secret/updateSecret.js +25 -17
- package/commands/secret.d.ts +3 -4
- package/commands/secret.js +25 -49
- package/commands/theme/generate-selectors.d.ts +3 -7
- package/commands/theme/generate-selectors.js +18 -11
- package/commands/theme/marketplace-validate.d.ts +4 -9
- package/commands/theme/marketplace-validate.js +21 -15
- package/commands/theme/preview.d.ts +4 -9
- package/commands/theme/preview.js +31 -24
- package/commands/theme.d.ts +3 -4
- package/commands/theme.js +23 -47
- package/commands/upload.d.ts +12 -1
- package/commands/upload.js +118 -98
- package/commands/watch.d.ts +14 -1
- package/commands/watch.js +76 -66
- package/lang/en.d.ts +3016 -0
- package/lang/en.js +2877 -3315
- package/lang/en.lyaml +126 -62
- package/lib/accountTypes.d.ts +1 -0
- package/lib/accountTypes.js +13 -0
- package/lib/app/migrate.d.ts +33 -4
- package/lib/app/migrate.js +218 -93
- package/lib/app/migrate_legacy.d.ts +2 -2
- package/lib/app/migrate_legacy.js +16 -13
- package/lib/app/urls.d.ts +16 -0
- package/lib/app/urls.js +16 -0
- package/lib/buildAccount.d.ts +1 -2
- package/lib/buildAccount.js +11 -10
- package/lib/commonOpts.d.ts +3 -4
- package/lib/commonOpts.js +46 -18
- package/lib/configMigrate.d.ts +2 -0
- package/lib/configMigrate.js +118 -0
- package/lib/configOptions.d.ts +4 -0
- package/lib/configOptions.js +41 -45
- package/lib/constants.d.ts +10 -0
- package/lib/constants.js +11 -1
- package/lib/dependencyManagement.d.ts +0 -5
- package/lib/dependencyManagement.js +14 -40
- package/lib/doctor/Diagnosis.d.ts +1 -2
- package/lib/doctor/Diagnosis.js +19 -16
- package/lib/doctor/DiagnosticInfoBuilder.d.ts +2 -1
- package/lib/doctor/DiagnosticInfoBuilder.js +10 -9
- package/lib/doctor/Doctor.d.ts +1 -0
- package/lib/doctor/Doctor.js +59 -45
- package/lib/errorHandlers/index.js +6 -7
- package/lib/errorHandlers/suppressError.js +18 -26
- package/lib/filesystem.d.ts +1 -1
- package/lib/generateSelectors.js +1 -2
- package/lib/hasFeature.d.ts +3 -1
- package/lib/interpolation.d.ts +2 -3
- package/lib/lang.d.ts +2 -3
- package/lib/middleware/__test__/configMiddleware.test.d.ts +1 -0
- package/lib/middleware/__test__/configMiddleware.test.js +194 -0
- package/lib/middleware/__test__/gitMiddleware.test.d.ts +1 -0
- package/lib/middleware/__test__/gitMiddleware.test.js +76 -0
- package/lib/middleware/__test__/notificationsMiddleware.test.d.ts +1 -0
- package/lib/middleware/__test__/notificationsMiddleware.test.js +10 -0
- package/lib/middleware/__test__/requestMiddleware.test.d.ts +1 -0
- package/lib/middleware/__test__/requestMiddleware.test.js +20 -0
- package/lib/middleware/__test__/utils.test.d.ts +1 -0
- package/lib/middleware/__test__/utils.test.js +53 -0
- package/lib/middleware/__test__/yargsChecksMiddleware.test.d.ts +1 -0
- package/lib/middleware/__test__/yargsChecksMiddleware.test.js +81 -0
- package/lib/middleware/autoUpdateMiddleware.d.ts +1 -0
- package/lib/middleware/autoUpdateMiddleware.js +89 -0
- package/lib/middleware/configMiddleware.d.ts +13 -0
- package/lib/middleware/configMiddleware.js +124 -0
- package/lib/middleware/fireAlarmMiddleware.d.ts +4 -0
- package/lib/middleware/fireAlarmMiddleware.js +123 -0
- package/lib/middleware/gitMiddleware.d.ts +2 -0
- package/lib/middleware/gitMiddleware.js +14 -0
- package/lib/middleware/notificationsMiddleware.d.ts +1 -0
- package/lib/middleware/notificationsMiddleware.js +38 -0
- package/lib/middleware/requestMiddleware.d.ts +1 -0
- package/lib/middleware/requestMiddleware.js +11 -0
- package/lib/middleware/utils.d.ts +8 -0
- package/lib/middleware/utils.js +17 -0
- package/lib/middleware/yargsChecksMiddleware.d.ts +4 -0
- package/lib/middleware/yargsChecksMiddleware.js +24 -0
- package/lib/npm.d.ts +9 -0
- package/lib/npm.js +36 -0
- package/lib/oauth.js +1 -2
- package/lib/process.js +1 -2
- package/lib/projectProfiles.d.ts +6 -0
- package/lib/projectProfiles.js +65 -0
- package/lib/projects/ProjectLogsManager.d.ts +1 -1
- package/lib/projects/ProjectLogsManager.js +16 -21
- package/lib/projects/buildAndDeploy.js +45 -41
- package/lib/projects/config.d.ts +9 -0
- package/lib/projects/config.js +79 -0
- package/lib/projects/create.js +5 -6
- package/lib/projects/ensureProjectExists.d.ts +11 -0
- package/lib/projects/ensureProjectExists.js +97 -0
- package/lib/projects/localDev/AppDevModeInterface.d.ts +26 -0
- package/lib/projects/localDev/AppDevModeInterface.js +156 -0
- package/lib/{DevServerManager.d.ts → projects/localDev/DevServerManager.d.ts} +1 -1
- package/lib/{DevServerManager.js → projects/localDev/DevServerManager.js} +6 -6
- package/lib/projects/localDev/DevServerManagerV2.d.ts +22 -0
- package/lib/{DevServerManagerV2.js → projects/localDev/DevServerManagerV2.js} +22 -19
- package/lib/projects/localDev/LocalDevLogger.d.ts +30 -0
- package/lib/projects/localDev/LocalDevLogger.js +158 -0
- package/lib/{LocalDevManager.d.ts → projects/localDev/LocalDevManager.d.ts} +1 -1
- package/lib/{LocalDevManager.js → projects/localDev/LocalDevManager.js} +57 -83
- 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/{localDev.d.ts → projects/localDev/helpers.d.ts} +6 -4
- package/lib/{localDev.js → projects/localDev/helpers.js} +127 -114
- package/lib/projects/ui.d.ts +1 -0
- package/lib/projects/ui.js +15 -0
- package/lib/projects/upload.d.ts +14 -2
- package/lib/projects/upload.js +19 -35
- package/lib/projects/urls.d.ts +1 -0
- package/lib/projects/urls.js +6 -0
- package/lib/projects/watch.d.ts +1 -1
- package/lib/projects/watch.js +21 -18
- package/lib/prompts/accountNamePrompt.js +16 -13
- package/lib/prompts/accountsPrompt.js +1 -2
- package/lib/prompts/cmsFieldPrompt.js +1 -2
- package/lib/prompts/createApiSamplePrompt.d.ts +2 -10
- package/lib/prompts/createApiSamplePrompt.js +4 -5
- package/lib/prompts/createFunctionPrompt.js +13 -14
- package/lib/prompts/createModulePrompt.js +8 -9
- package/lib/prompts/createProjectPrompt.d.ts +11 -4
- package/lib/prompts/createProjectPrompt.js +14 -9
- package/lib/prompts/createTemplatePrompt.d.ts +22 -4
- package/lib/prompts/createTemplatePrompt.js +1 -2
- package/lib/prompts/downloadProjectPrompt.js +3 -4
- package/lib/prompts/installAppPrompt.d.ts +1 -0
- package/lib/prompts/installAppPrompt.js +35 -0
- package/lib/prompts/personalAccessKeyPrompt.js +17 -18
- package/lib/prompts/previewPrompt.js +5 -6
- package/lib/prompts/projectAddPrompt.js +4 -5
- package/lib/prompts/projectDevTargetAccountPrompt.d.ts +6 -1
- package/lib/prompts/projectDevTargetAccountPrompt.js +15 -16
- package/lib/prompts/projectNamePrompt.js +5 -6
- package/lib/prompts/projectsLogsPrompt.js +3 -2
- package/lib/prompts/promptUtils.d.ts +3 -2
- package/lib/prompts/promptUtils.js +2 -1
- package/lib/prompts/sandboxesPrompt.js +5 -6
- package/lib/prompts/secretPrompt.js +2 -3
- package/lib/prompts/selectAppPrompt.d.ts +2 -0
- package/lib/prompts/selectAppPrompt.js +40 -0
- package/lib/prompts/selectHubDBTablePrompt.js +11 -8
- package/lib/prompts/{selectPublicAppPrompt.d.ts → selectPublicAppForMigrationPrompt.d.ts} +1 -1
- package/lib/prompts/{selectPublicAppPrompt.js → selectPublicAppForMigrationPrompt.js} +8 -9
- package/lib/prompts/setAsDefaultAccountPrompt.js +1 -2
- package/lib/prompts/uploadPrompt.js +4 -5
- package/lib/sandboxSync.js +15 -14
- package/lib/sandboxes.js +12 -13
- package/lib/serverlessLogs.js +4 -6
- package/lib/testUtils.d.ts +3 -3
- package/lib/testUtils.js +8 -9
- package/lib/ui/SpinniesManager.d.ts +1 -1
- package/lib/ui/boxen.d.ts +5 -0
- package/lib/ui/boxen.js +30 -0
- package/lib/ui/git.js +8 -9
- package/lib/ui/index.d.ts +4 -2
- package/lib/ui/index.js +20 -17
- package/lib/ui/logger.d.ts +10 -0
- package/lib/ui/logger.js +15 -0
- package/lib/ui/serverlessFunctionLogs.js +2 -3
- package/lib/ui/spinniesUtils.d.ts +5 -5
- package/lib/upload.d.ts +1 -1
- package/lib/validation.js +4 -5
- package/lib/yargsUtils.d.ts +5 -1
- package/lib/yargsUtils.js +6 -0
- package/package.json +10 -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 +12 -11
- package/lib/DevServerManagerV2.d.ts +0 -33
- package/lib/LocalDevManagerV2.d.ts +0 -64
- package/lib/LocalDevManagerV2.js +0 -377
- package/lib/projects/index.d.ts +0 -20
- package/lib/projects/index.js +0 -194
- package/lib/prompts/installPublicAppPrompt.d.ts +0 -1
- package/lib/prompts/installPublicAppPrompt.js +0 -40
package/commands/config/set.js
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
|
|
4
|
-
const
|
|
5
|
-
const
|
|
6
|
-
const
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
const
|
|
12
|
-
|
|
3
|
+
const lang_1 = require("../../lib/lang");
|
|
4
|
+
const usageTracking_1 = require("../../lib/usageTracking");
|
|
5
|
+
const promptUtils_1 = require("../../lib/prompts/promptUtils");
|
|
6
|
+
const exitCodes_1 = require("../../lib/enums/exitCodes");
|
|
7
|
+
const configOptions_1 = require("../../lib/configOptions");
|
|
8
|
+
const en_1 = require("../../lang/en");
|
|
9
|
+
const yargsUtils_1 = require("../../lib/yargsUtils");
|
|
10
|
+
const command = 'set';
|
|
11
|
+
const describe = en_1.commands.config.subcommands.set.describe;
|
|
12
|
+
async function selectOptions() {
|
|
13
|
+
const { configOption } = await (0, promptUtils_1.promptUser)([
|
|
13
14
|
{
|
|
14
15
|
type: 'list',
|
|
15
|
-
|
|
16
|
-
name: 'cmsPublishMode',
|
|
16
|
+
name: 'configOption',
|
|
17
17
|
pageSize: 20,
|
|
18
|
-
message:
|
|
18
|
+
message: en_1.commands.config.subcommands.set.promptMessage,
|
|
19
19
|
choices: [
|
|
20
20
|
{
|
|
21
21
|
name: 'Default CMS publish mode',
|
|
@@ -23,56 +23,85 @@ const selectOptions = async () => {
|
|
|
23
23
|
},
|
|
24
24
|
{ name: 'Allow usage tracking', value: { allowUsageTracking: '' } },
|
|
25
25
|
{ name: 'HTTP timeout', value: { httpTimeout: '' } },
|
|
26
|
+
// TODO enable when we unhide this option { name: 'Allow auto updates', value: { allowAutoUpdates: '' } },
|
|
26
27
|
],
|
|
27
28
|
},
|
|
28
29
|
]);
|
|
29
|
-
return
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
const { allowUsageTracking, defaultCmsPublishMode, httpTimeout } =
|
|
30
|
+
return configOption;
|
|
31
|
+
}
|
|
32
|
+
async function handleConfigUpdate(accountId, args) {
|
|
33
|
+
const { allowAutoUpdates, allowUsageTracking, defaultCmsPublishMode, httpTimeout, } = args;
|
|
33
34
|
if (typeof defaultCmsPublishMode !== 'undefined') {
|
|
34
|
-
await setDefaultCmsPublishMode({ defaultCmsPublishMode, accountId });
|
|
35
|
+
await (0, configOptions_1.setDefaultCmsPublishMode)({ defaultCmsPublishMode, accountId });
|
|
35
36
|
return true;
|
|
36
37
|
}
|
|
37
38
|
else if (typeof httpTimeout !== 'undefined') {
|
|
38
|
-
await setHttpTimeout({ httpTimeout, accountId });
|
|
39
|
+
await (0, configOptions_1.setHttpTimeout)({ httpTimeout, accountId });
|
|
39
40
|
return true;
|
|
40
41
|
}
|
|
41
42
|
else if (typeof allowUsageTracking !== 'undefined') {
|
|
42
|
-
await setAllowUsageTracking({ allowUsageTracking, accountId });
|
|
43
|
+
await (0, configOptions_1.setAllowUsageTracking)({ allowUsageTracking, accountId });
|
|
44
|
+
return true;
|
|
45
|
+
}
|
|
46
|
+
else if (typeof allowAutoUpdates !== 'undefined') {
|
|
47
|
+
await (0, configOptions_1.setAllowAutoUpdates)({ allowAutoUpdates, accountId });
|
|
43
48
|
return true;
|
|
44
49
|
}
|
|
45
50
|
return false;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
const { derivedAccountId } =
|
|
49
|
-
trackCommandUsage('config-set',
|
|
50
|
-
const configUpdated = await handleConfigUpdate(derivedAccountId,
|
|
51
|
+
}
|
|
52
|
+
async function handler(args) {
|
|
53
|
+
const { derivedAccountId } = args;
|
|
54
|
+
(0, usageTracking_1.trackCommandUsage)('config-set', {}, derivedAccountId);
|
|
55
|
+
const configUpdated = await handleConfigUpdate(derivedAccountId, args);
|
|
51
56
|
if (!configUpdated) {
|
|
52
57
|
const selectedOptions = await selectOptions();
|
|
53
58
|
await handleConfigUpdate(derivedAccountId, selectedOptions);
|
|
54
59
|
}
|
|
55
|
-
process.exit(EXIT_CODES.SUCCESS);
|
|
56
|
-
}
|
|
57
|
-
|
|
60
|
+
process.exit(exitCodes_1.EXIT_CODES.SUCCESS);
|
|
61
|
+
}
|
|
62
|
+
function configSetBuilder(yargs) {
|
|
58
63
|
yargs
|
|
59
64
|
.options({
|
|
60
65
|
'default-cms-publish-mode': {
|
|
61
|
-
describe:
|
|
66
|
+
describe: en_1.commands.config.subcommands.set.options.defaultMode.describe,
|
|
62
67
|
type: 'string',
|
|
63
68
|
},
|
|
64
69
|
'allow-usage-tracking': {
|
|
65
|
-
describe:
|
|
70
|
+
describe: en_1.commands.config.subcommands.set.options.allowUsageTracking.describe,
|
|
66
71
|
type: 'boolean',
|
|
67
72
|
},
|
|
68
73
|
'http-timeout': {
|
|
69
|
-
describe:
|
|
74
|
+
describe: en_1.commands.config.subcommands.set.options.httpTimeout.describe,
|
|
70
75
|
type: 'string',
|
|
71
76
|
},
|
|
77
|
+
'allow-auto-updates': {
|
|
78
|
+
describe: en_1.commands.config.subcommands.set.options.allowAutoUpdates.describe,
|
|
79
|
+
type: 'boolean',
|
|
80
|
+
hidden: true,
|
|
81
|
+
},
|
|
72
82
|
})
|
|
73
83
|
.conflicts('defaultCmsPublishMode', 'allowUsageTracking')
|
|
74
84
|
.conflicts('defaultCmsPublishMode', 'httpTimeout')
|
|
75
85
|
.conflicts('allowUsageTracking', 'httpTimeout')
|
|
76
|
-
.
|
|
86
|
+
.conflicts('allowAutoUpdates', 'defaultCmsPublishMode')
|
|
87
|
+
.conflicts('allowAutoUpdates', 'allowUsageTracking')
|
|
88
|
+
.conflicts('allowAutoUpdates', 'httpTimeout')
|
|
89
|
+
.example([
|
|
90
|
+
[
|
|
91
|
+
'$0 config set',
|
|
92
|
+
(0, lang_1.i18n)(`commands.config.subcommands.set.examples.default`),
|
|
93
|
+
],
|
|
94
|
+
]);
|
|
77
95
|
return yargs;
|
|
96
|
+
}
|
|
97
|
+
const builder = (0, yargsUtils_1.makeYargsBuilder)(configSetBuilder, command, describe, {
|
|
98
|
+
useGlobalOptions: true,
|
|
99
|
+
useConfigOptions: true,
|
|
100
|
+
});
|
|
101
|
+
const configSetCommand = {
|
|
102
|
+
command,
|
|
103
|
+
describe,
|
|
104
|
+
handler,
|
|
105
|
+
builder,
|
|
78
106
|
};
|
|
107
|
+
exports.default = configSetCommand;
|
package/commands/config.d.ts
CHANGED
package/commands/config.js
CHANGED
|
@@ -1,15 +1,25 @@
|
|
|
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
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
addConfigOptions(yargs);
|
|
12
|
-
addGlobalOptions(yargs);
|
|
13
|
-
yargs.command(set).demandCommand(1, '');
|
|
6
|
+
const lang_1 = require("../lib/lang");
|
|
7
|
+
const set_1 = __importDefault(require("./config/set"));
|
|
8
|
+
const migrate_1 = __importDefault(require("./config/migrate"));
|
|
9
|
+
const yargsUtils_1 = require("../lib/yargsUtils");
|
|
10
|
+
const command = 'config';
|
|
11
|
+
const describe = (0, lang_1.i18n)('commands.config.describe');
|
|
12
|
+
function configBuilder(yargs) {
|
|
13
|
+
yargs.command(set_1.default).command(migrate_1.default).demandCommand(1, '');
|
|
14
14
|
return yargs;
|
|
15
|
+
}
|
|
16
|
+
const builder = (0, yargsUtils_1.makeYargsBuilder)(configBuilder, command, describe);
|
|
17
|
+
const configCommand = {
|
|
18
|
+
command,
|
|
19
|
+
describe,
|
|
20
|
+
builder,
|
|
21
|
+
handler: () => { },
|
|
15
22
|
};
|
|
23
|
+
exports.default = configCommand;
|
|
24
|
+
// TODO Remove this legacy export once we've migrated all commands to TS
|
|
25
|
+
module.exports = configCommand;
|
|
@@ -1,32 +1,34 @@
|
|
|
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
|
-
module.exports = {
|
|
6
|
+
const path_1 = __importDefault(require("path"));
|
|
7
|
+
const fs_extra_1 = __importDefault(require("fs-extra"));
|
|
8
|
+
const github_1 = require("@hubspot/local-dev-lib/api/github");
|
|
9
|
+
const github_2 = require("@hubspot/local-dev-lib/github");
|
|
10
|
+
const createApiSamplePrompt_1 = require("../../lib/prompts/createApiSamplePrompt");
|
|
11
|
+
const promptUtils_1 = require("../../lib/prompts/promptUtils");
|
|
12
|
+
const errorHandlers_1 = require("../../lib/errorHandlers");
|
|
13
|
+
const exitCodes_1 = require("../../lib/enums/exitCodes");
|
|
14
|
+
const en_1 = require("../../lang/en");
|
|
15
|
+
const logger_1 = require("../../lib/ui/logger");
|
|
16
|
+
const apiSampleAssetType = {
|
|
15
17
|
hidden: true,
|
|
16
18
|
dest: ({ dest }) => dest,
|
|
17
19
|
validate: ({ name }) => {
|
|
18
20
|
if (!name) {
|
|
19
|
-
|
|
21
|
+
logger_1.uiLogger.error(en_1.commands.create.subcommands.apiSample.errors.nameRequired);
|
|
20
22
|
return false;
|
|
21
23
|
}
|
|
22
24
|
return true;
|
|
23
25
|
},
|
|
24
|
-
execute: async ({ dest, name, assetType,
|
|
25
|
-
const filePath =
|
|
26
|
-
if (
|
|
27
|
-
const overwrite = await confirmPrompt(
|
|
26
|
+
execute: async ({ dest, name, assetType, commandArgs }) => {
|
|
27
|
+
const filePath = path_1.default.join(dest, name);
|
|
28
|
+
if (fs_extra_1.default.existsSync(filePath)) {
|
|
29
|
+
const overwrite = await (0, promptUtils_1.confirmPrompt)(en_1.commands.create.subcommands.apiSample.folderOverwritePrompt(filePath), { defaultAnswer: false });
|
|
28
30
|
if (overwrite) {
|
|
29
|
-
|
|
31
|
+
fs_extra_1.default.rmdirSync(filePath, { recursive: true });
|
|
30
32
|
}
|
|
31
33
|
else {
|
|
32
34
|
return;
|
|
@@ -34,37 +36,33 @@ module.exports = {
|
|
|
34
36
|
}
|
|
35
37
|
let samplesConfig;
|
|
36
38
|
try {
|
|
37
|
-
const { data } = await fetchRepoFile('HubSpot/sample-apps-list', 'samples.json', 'main');
|
|
39
|
+
const { data } = await (0, github_1.fetchRepoFile)('HubSpot/sample-apps-list', 'samples.json', 'main');
|
|
38
40
|
samplesConfig = data;
|
|
39
41
|
}
|
|
40
42
|
catch (err) {
|
|
41
|
-
debugError(err);
|
|
43
|
+
(0, errorHandlers_1.debugError)(err);
|
|
42
44
|
}
|
|
43
45
|
if (!samplesConfig) {
|
|
44
|
-
|
|
45
|
-
process.exit(EXIT_CODES.ERROR);
|
|
46
|
+
logger_1.uiLogger.error(en_1.commands.create.subcommands.apiSample.errors.noSamples);
|
|
47
|
+
process.exit(exitCodes_1.EXIT_CODES.ERROR);
|
|
46
48
|
}
|
|
47
|
-
const { sampleType, sampleLanguage } = await createApiSamplePrompt(samplesConfig);
|
|
49
|
+
const { sampleType, sampleLanguage } = await (0, createApiSamplePrompt_1.createApiSamplePrompt)(samplesConfig);
|
|
48
50
|
if (!sampleType || !sampleLanguage) {
|
|
49
|
-
|
|
50
|
-
process.exit(EXIT_CODES.ERROR);
|
|
51
|
+
logger_1.uiLogger.error(en_1.commands.create.subcommands.apiSample.errors.noSamples);
|
|
52
|
+
process.exit(exitCodes_1.EXIT_CODES.ERROR);
|
|
51
53
|
}
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
}));
|
|
56
|
-
const created = await cloneGithubRepo(`HubSpot/${sampleType}`, filePath, {
|
|
54
|
+
logger_1.uiLogger.info(en_1.commands.create.subcommands.apiSample.info.sampleChosen(sampleType, sampleLanguage));
|
|
55
|
+
const created = await (0, github_2.cloneGithubRepo)(`HubSpot/${sampleType}`, filePath, {
|
|
56
|
+
...commandArgs,
|
|
57
57
|
type: assetType,
|
|
58
58
|
sourceDir: sampleLanguage,
|
|
59
|
-
...options,
|
|
60
59
|
});
|
|
61
60
|
if (created) {
|
|
62
|
-
if (
|
|
63
|
-
|
|
61
|
+
if (fs_extra_1.default.existsSync(`${filePath}/.env.template`)) {
|
|
62
|
+
fs_extra_1.default.copySync(`${filePath}/.env.template`, `${filePath}/.env`);
|
|
64
63
|
}
|
|
65
|
-
|
|
66
|
-
filePath,
|
|
67
|
-
}));
|
|
64
|
+
logger_1.uiLogger.success(en_1.commands.create.subcommands.apiSample.success.sampleCreated(filePath));
|
|
68
65
|
}
|
|
69
66
|
},
|
|
70
67
|
};
|
|
68
|
+
exports.default = apiSampleAssetType;
|
package/commands/create/app.d.ts
CHANGED
package/commands/create/app.js
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
|
|
4
|
-
const
|
|
5
|
-
module.exports = {
|
|
3
|
+
const github_1 = require("@hubspot/local-dev-lib/github");
|
|
4
|
+
const appAssetType = {
|
|
6
5
|
hidden: true,
|
|
7
6
|
dest: ({ name, assetType }) => name || assetType,
|
|
8
|
-
execute: async ({
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
7
|
+
execute: async ({ commandArgs, dest, assetType }) => {
|
|
8
|
+
await (0, github_1.cloneGithubRepo)('HubSpot/crm-card-weather-app', dest, {
|
|
9
|
+
...commandArgs,
|
|
10
|
+
type: assetType,
|
|
11
|
+
});
|
|
12
|
+
},
|
|
12
13
|
};
|
|
14
|
+
exports.default = appAssetType;
|
|
@@ -1,20 +1,21 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
|
|
4
|
-
const
|
|
5
|
-
const
|
|
6
|
-
const
|
|
7
|
-
const
|
|
8
|
-
|
|
3
|
+
const functions_1 = require("@hubspot/local-dev-lib/cms/functions");
|
|
4
|
+
const createFunctionPrompt_1 = require("../../lib/prompts/createFunctionPrompt");
|
|
5
|
+
const index_1 = require("../../lib/errorHandlers/index");
|
|
6
|
+
const exitCodes_1 = require("../../lib/enums/exitCodes");
|
|
7
|
+
const functionAssetType = {
|
|
8
|
+
hidden: false,
|
|
9
9
|
dest: ({ name }) => name,
|
|
10
10
|
execute: async ({ dest }) => {
|
|
11
|
-
const functionDefinition = await createFunctionPrompt();
|
|
11
|
+
const functionDefinition = await (0, createFunctionPrompt_1.createFunctionPrompt)();
|
|
12
12
|
try {
|
|
13
|
-
await createFunction(functionDefinition, dest);
|
|
13
|
+
await (0, functions_1.createFunction)(functionDefinition, dest);
|
|
14
14
|
}
|
|
15
15
|
catch (e) {
|
|
16
|
-
logError(e);
|
|
17
|
-
process.exit(EXIT_CODES.ERROR);
|
|
16
|
+
(0, index_1.logError)(e);
|
|
17
|
+
process.exit(exitCodes_1.EXIT_CODES.ERROR);
|
|
18
18
|
}
|
|
19
19
|
},
|
|
20
20
|
};
|
|
21
|
+
exports.default = functionAssetType;
|
package/commands/create/index.js
CHANGED
|
@@ -1,14 +1,26 @@
|
|
|
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
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
'
|
|
6
|
+
const api_sample_1 = __importDefault(require("./api-sample"));
|
|
7
|
+
const app_1 = __importDefault(require("./app"));
|
|
8
|
+
const function_1 = __importDefault(require("./function"));
|
|
9
|
+
const module_1 = __importDefault(require("./module"));
|
|
10
|
+
const react_app_1 = __importDefault(require("./react-app"));
|
|
11
|
+
const template_1 = __importDefault(require("./template"));
|
|
12
|
+
const vue_app_1 = __importDefault(require("./vue-app"));
|
|
13
|
+
const webpack_serverless_1 = __importDefault(require("./webpack-serverless"));
|
|
14
|
+
const website_theme_1 = __importDefault(require("./website-theme"));
|
|
15
|
+
const assets = {
|
|
16
|
+
'api-sample': api_sample_1.default,
|
|
17
|
+
app: app_1.default,
|
|
18
|
+
function: function_1.default,
|
|
19
|
+
module: module_1.default,
|
|
20
|
+
'react-app': react_app_1.default,
|
|
21
|
+
template: template_1.default,
|
|
22
|
+
'vue-app': vue_app_1.default,
|
|
23
|
+
'webpack-serverless': webpack_serverless_1.default,
|
|
24
|
+
'website-theme': website_theme_1.default,
|
|
14
25
|
};
|
|
26
|
+
exports.default = assets;
|
|
@@ -1,29 +1,30 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
|
|
4
|
-
const
|
|
5
|
-
const
|
|
6
|
-
const
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
const
|
|
10
|
-
|
|
3
|
+
const modules_1 = require("@hubspot/local-dev-lib/cms/modules");
|
|
4
|
+
const createModulePrompt_1 = require("../../lib/prompts/createModulePrompt");
|
|
5
|
+
const index_1 = require("../../lib/errorHandlers/index");
|
|
6
|
+
const exitCodes_1 = require("../../lib/enums/exitCodes");
|
|
7
|
+
const logger_1 = require("../../lib/ui/logger");
|
|
8
|
+
const en_1 = require("../../lang/en");
|
|
9
|
+
const moduleAssetType = {
|
|
10
|
+
hidden: false,
|
|
11
11
|
dest: ({ dest }) => dest,
|
|
12
12
|
validate: ({ name }) => {
|
|
13
13
|
if (!name) {
|
|
14
|
-
|
|
14
|
+
logger_1.uiLogger.error(en_1.commands.create.subcommands.module.errors.nameRequired);
|
|
15
15
|
return false;
|
|
16
16
|
}
|
|
17
17
|
return true;
|
|
18
18
|
},
|
|
19
19
|
execute: async ({ name, dest, getInternalVersion }) => {
|
|
20
|
-
const moduleDefinition = await createModulePrompt();
|
|
20
|
+
const moduleDefinition = await (0, createModulePrompt_1.createModulePrompt)();
|
|
21
21
|
try {
|
|
22
|
-
await createModule(moduleDefinition, name, dest, getInternalVersion);
|
|
22
|
+
await (0, modules_1.createModule)(moduleDefinition, name, dest, getInternalVersion);
|
|
23
23
|
}
|
|
24
24
|
catch (e) {
|
|
25
|
-
logError(e);
|
|
26
|
-
process.exit(EXIT_CODES.ERROR);
|
|
25
|
+
(0, index_1.logError)(e);
|
|
26
|
+
process.exit(exitCodes_1.EXIT_CODES.ERROR);
|
|
27
27
|
}
|
|
28
28
|
},
|
|
29
29
|
};
|
|
30
|
+
exports.default = moduleAssetType;
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
|
|
4
|
-
const
|
|
5
|
-
|
|
3
|
+
const github_1 = require("@hubspot/local-dev-lib/github");
|
|
4
|
+
const reactAppAssetType = {
|
|
5
|
+
hidden: false,
|
|
6
6
|
dest: ({ name, assetType }) => name || assetType,
|
|
7
|
-
execute: async ({
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
execute: async ({ commandArgs, dest, assetType }) => {
|
|
8
|
+
await (0, github_1.cloneGithubRepo)('HubSpot/cms-react-boilerplate', dest, {
|
|
9
|
+
...commandArgs,
|
|
10
|
+
type: assetType,
|
|
11
|
+
});
|
|
12
|
+
},
|
|
11
13
|
};
|
|
14
|
+
exports.default = reactAppAssetType;
|
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
|
|
4
|
-
const
|
|
5
|
-
const
|
|
6
|
-
const
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
const
|
|
10
|
-
module.exports = {
|
|
3
|
+
const templates_1 = require("@hubspot/local-dev-lib/cms/templates");
|
|
4
|
+
const index_1 = require("../../lib/errorHandlers/index");
|
|
5
|
+
const createTemplatePrompt_1 = require("../../lib/prompts/createTemplatePrompt");
|
|
6
|
+
const exitCodes_1 = require("../../lib/enums/exitCodes");
|
|
7
|
+
const logger_1 = require("../../lib/ui/logger");
|
|
8
|
+
const en_1 = require("../../lang/en");
|
|
9
|
+
const templateAssetType = {
|
|
11
10
|
dest: ({ dest }) => dest,
|
|
11
|
+
hidden: false,
|
|
12
12
|
validate: ({ name }) => {
|
|
13
13
|
if (!name) {
|
|
14
|
-
|
|
14
|
+
logger_1.uiLogger.error(en_1.commands.create.subcommands.template.errors.nameRequired);
|
|
15
15
|
return false;
|
|
16
16
|
}
|
|
17
17
|
return true;
|
|
18
18
|
},
|
|
19
19
|
execute: async ({ name, dest }) => {
|
|
20
|
-
const { templateType } = await createTemplatePrompt();
|
|
20
|
+
const { templateType } = await (0, createTemplatePrompt_1.createTemplatePrompt)();
|
|
21
21
|
try {
|
|
22
|
-
await createTemplate(name, dest, templateType);
|
|
22
|
+
await (0, templates_1.createTemplate)(name, dest, templateType);
|
|
23
23
|
}
|
|
24
24
|
catch (e) {
|
|
25
|
-
logError(e);
|
|
26
|
-
process.exit(EXIT_CODES.ERROR);
|
|
25
|
+
(0, index_1.logError)(e);
|
|
26
|
+
process.exit(exitCodes_1.EXIT_CODES.ERROR);
|
|
27
27
|
}
|
|
28
|
-
return { templateType };
|
|
29
28
|
},
|
|
30
29
|
};
|
|
30
|
+
exports.default = templateAssetType;
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
|
|
4
|
-
const
|
|
5
|
-
|
|
3
|
+
const github_1 = require("@hubspot/local-dev-lib/github");
|
|
4
|
+
const vueAppAssetType = {
|
|
5
|
+
hidden: false,
|
|
6
6
|
dest: ({ name, assetType }) => name || assetType,
|
|
7
|
-
execute: async ({
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
execute: async ({ commandArgs, dest, assetType }) => {
|
|
8
|
+
await (0, github_1.cloneGithubRepo)('HubSpot/cms-vue-boilerplate', dest, {
|
|
9
|
+
...commandArgs,
|
|
10
|
+
type: assetType,
|
|
11
|
+
});
|
|
12
|
+
},
|
|
11
13
|
};
|
|
14
|
+
exports.default = vueAppAssetType;
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
|
|
4
|
-
const
|
|
5
|
-
|
|
3
|
+
const github_1 = require("@hubspot/local-dev-lib/github");
|
|
4
|
+
const webpackServerlessAssetType = {
|
|
5
|
+
hidden: false,
|
|
6
6
|
dest: ({ name, assetType }) => name || assetType,
|
|
7
|
-
execute: async ({
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
execute: async ({ commandArgs, dest, assetType }) => {
|
|
8
|
+
await (0, github_1.cloneGithubRepo)('HubSpot/cms-webpack-serverless-boilerplate', dest, {
|
|
9
|
+
...commandArgs,
|
|
10
|
+
type: assetType,
|
|
11
|
+
});
|
|
12
|
+
},
|
|
11
13
|
};
|
|
14
|
+
exports.default = webpackServerlessAssetType;
|