@hubspot/cli 6.2.2-experimental.0 → 6.2.2-experimental.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +12 -0
- package/README.md +71 -0
- package/bin/cli.js +2 -0
- package/commands/accounts/clean.d.ts +1 -4
- package/commands/accounts/clean.js +2 -0
- package/commands/accounts/info.d.ts +1 -4
- package/commands/accounts/info.js +3 -1
- package/commands/accounts/list.d.ts +1 -4
- package/commands/accounts/list.js +2 -0
- package/commands/accounts/remove.d.ts +1 -4
- package/commands/accounts/remove.js +2 -0
- package/commands/accounts/rename.d.ts +1 -4
- package/commands/accounts/rename.js +2 -0
- package/commands/accounts/use.d.ts +1 -4
- package/commands/accounts/use.js +2 -0
- package/commands/accounts.d.ts +1 -3
- package/commands/accounts.js +2 -0
- package/commands/auth.d.ts +1 -4
- package/commands/auth.js +2 -2
- package/commands/cms/convertFields.d.ts +1 -4
- package/commands/cms/convertFields.js +2 -0
- package/commands/cms/lighthouseScore.d.ts +1 -4
- package/commands/cms/lighthouseScore.js +2 -0
- package/commands/cms/reactModules.d.ts +1 -4
- package/commands/cms/reactModules.js +2 -0
- package/commands/cms.d.ts +1 -3
- package/commands/cms.js +2 -0
- package/commands/config/set.d.ts +1 -4
- package/commands/config/set.js +3 -3
- package/commands/config.d.ts +1 -3
- package/commands/config.js +2 -0
- package/commands/create/api-sample.d.ts +1 -13
- package/commands/create/api-sample.js +4 -2
- package/commands/create/app.d.ts +1 -10
- package/commands/create/app.js +2 -0
- package/commands/create/function.d.ts +1 -6
- package/commands/create/function.js +2 -0
- package/commands/create/index.d.ts +1 -109
- package/commands/create/index.js +2 -0
- package/commands/create/module.d.ts +1 -11
- package/commands/create/module.js +2 -0
- package/commands/create/react-app.d.ts +1 -9
- package/commands/create/react-app.js +2 -0
- package/commands/create/template.d.ts +1 -12
- package/commands/create/template.js +2 -0
- package/commands/create/vue-app.d.ts +1 -9
- package/commands/create/vue-app.js +2 -0
- package/commands/create/webpack-serverless.d.ts +1 -9
- package/commands/create/webpack-serverless.js +2 -0
- package/commands/create/website-theme.d.ts +1 -9
- package/commands/create/website-theme.js +2 -0
- package/commands/create.d.ts +24 -4
- package/commands/create.js +4 -3
- package/commands/customObject/create.d.ts +1 -4
- package/commands/customObject/create.js +2 -0
- package/commands/customObject/schema/create.d.ts +1 -4
- package/commands/customObject/schema/create.js +2 -0
- package/commands/customObject/schema/delete.d.ts +1 -4
- package/commands/customObject/schema/delete.js +3 -1
- package/commands/customObject/schema/fetch-all.d.ts +1 -4
- package/commands/customObject/schema/fetch-all.js +2 -0
- package/commands/customObject/schema/fetch.d.ts +1 -4
- package/commands/customObject/schema/fetch.js +3 -1
- package/commands/customObject/schema/list.d.ts +1 -3
- package/commands/customObject/schema/list.js +2 -0
- package/commands/customObject/schema/update.d.ts +1 -4
- package/commands/customObject/schema/update.js +2 -0
- package/commands/customObject/schema.d.ts +1 -3
- package/commands/customObject/schema.js +2 -0
- package/commands/customObject.d.ts +1 -3
- package/commands/customObject.js +2 -0
- package/commands/doctor.d.ts +8 -0
- package/commands/doctor.js +60 -0
- package/commands/feedback.d.ts +1 -4
- package/commands/feedback.js +21 -4
- package/commands/fetch.d.ts +1 -4
- package/commands/fetch.js +2 -0
- package/commands/filemanager/fetch.d.ts +1 -4
- package/commands/filemanager/fetch.js +4 -2
- package/commands/filemanager/upload.d.ts +1 -4
- package/commands/filemanager/upload.js +2 -0
- package/commands/filemanager.d.ts +1 -3
- package/commands/filemanager.js +2 -0
- package/commands/functions/deploy.d.ts +1 -4
- package/commands/functions/deploy.js +2 -0
- package/commands/functions/list.d.ts +1 -4
- package/commands/functions/list.js +13 -2
- package/commands/functions/server.d.ts +1 -4
- package/commands/functions/server.js +2 -0
- package/commands/functions.d.ts +1 -3
- package/commands/functions.js +2 -0
- package/commands/hubdb/clear.d.ts +1 -4
- package/commands/hubdb/clear.js +2 -0
- package/commands/hubdb/create.d.ts +1 -4
- package/commands/hubdb/create.js +2 -0
- package/commands/hubdb/delete.d.ts +1 -4
- package/commands/hubdb/delete.js +2 -0
- package/commands/hubdb/fetch.d.ts +1 -4
- package/commands/hubdb/fetch.js +2 -0
- package/commands/hubdb.d.ts +1 -3
- package/commands/hubdb.js +2 -0
- package/commands/init.d.ts +1 -4
- package/commands/init.js +22 -9
- package/commands/lint.d.ts +4 -4
- package/commands/lint.js +41 -3
- package/commands/list.d.ts +1 -4
- package/commands/list.js +2 -0
- package/commands/logs.d.ts +1 -4
- package/commands/logs.js +2 -0
- package/commands/module/marketplace-validate.d.ts +1 -4
- package/commands/module/marketplace-validate.js +3 -1
- package/commands/module.d.ts +1 -3
- package/commands/module.js +2 -0
- package/commands/mv.d.ts +1 -4
- package/commands/mv.js +2 -0
- package/commands/open.d.ts +1 -4
- package/commands/open.js +2 -0
- package/commands/project/add.d.ts +1 -4
- package/commands/project/add.js +2 -0
- package/commands/project/cloneApp.d.ts +1 -4
- package/commands/project/cloneApp.js +2 -0
- package/commands/project/create.d.ts +1 -4
- package/commands/project/create.js +2 -0
- package/commands/project/deploy.d.ts +1 -4
- package/commands/project/deploy.js +12 -3
- package/commands/project/dev.d.ts +1 -4
- package/commands/project/dev.js +3 -0
- package/commands/project/download.d.ts +1 -4
- package/commands/project/download.js +4 -2
- package/commands/project/installDeps.d.ts +1 -6
- package/commands/project/installDeps.js +7 -5
- package/commands/project/listBuilds.d.ts +1 -4
- package/commands/project/listBuilds.js +2 -0
- package/commands/project/logs.d.ts +1 -4
- package/commands/project/logs.js +4 -2
- package/commands/project/migrateApp.d.ts +1 -4
- package/commands/project/migrateApp.js +2 -0
- package/commands/project/open.d.ts +1 -4
- package/commands/project/open.js +2 -0
- package/commands/project/upload.d.ts +1 -4
- package/commands/project/upload.js +2 -0
- package/commands/project/watch.d.ts +1 -4
- package/commands/project/watch.js +2 -0
- package/commands/project.d.ts +1 -3
- package/commands/project.js +2 -0
- package/commands/remove.d.ts +1 -4
- package/commands/remove.js +2 -0
- package/commands/sandbox/create.d.ts +1 -4
- package/commands/sandbox/create.js +2 -0
- package/commands/sandbox/delete.d.ts +1 -4
- package/commands/sandbox/delete.js +7 -3
- package/commands/sandbox.d.ts +1 -3
- package/commands/sandbox.js +2 -0
- package/commands/secrets/addSecret.d.ts +1 -4
- package/commands/secrets/addSecret.js +2 -0
- package/commands/secrets/deleteSecret.d.ts +1 -4
- package/commands/secrets/deleteSecret.js +2 -0
- package/commands/secrets/listSecrets.d.ts +1 -4
- package/commands/secrets/listSecrets.js +2 -0
- package/commands/secrets/updateSecret.d.ts +1 -4
- package/commands/secrets/updateSecret.js +2 -0
- package/commands/secrets.d.ts +1 -3
- package/commands/secrets.js +2 -0
- package/commands/theme/generate-selectors.d.ts +1 -4
- package/commands/theme/generate-selectors.js +3 -1
- package/commands/theme/marketplace-validate.d.ts +1 -4
- package/commands/theme/marketplace-validate.js +3 -1
- package/commands/theme/preview.d.ts +1 -4
- package/commands/theme/preview.js +56 -46
- package/commands/theme.d.ts +1 -3
- package/commands/theme.js +2 -0
- package/commands/upload.d.ts +1 -4
- package/commands/upload.js +2 -0
- package/commands/watch.d.ts +1 -4
- package/commands/watch.js +2 -0
- package/lang/en.lyaml +75 -13
- package/lib/DevServerManager.d.ts +1 -35
- package/lib/DevServerManager.js +4 -5
- package/lib/LocalDevManager.d.ts +1 -41
- package/lib/LocalDevManager.js +5 -3
- package/lib/ProjectLogsManager.d.ts +1 -0
- package/lib/{projectLogsManager.js → ProjectLogsManager.js} +2 -0
- package/lib/accountTypes.d.ts +7 -6
- package/lib/accountTypes.js +31 -17
- package/lib/buildAccount.d.ts +1 -22
- package/lib/buildAccount.js +2 -0
- package/lib/commonOpts.d.ts +24 -17
- package/lib/commonOpts.js +75 -56
- package/lib/configOptions.d.ts +1 -0
- package/lib/configOptions.js +110 -0
- package/lib/constants.d.ts +76 -83
- package/lib/constants.js +21 -46
- package/lib/dependencyManagement.d.ts +3 -7
- package/lib/dependencyManagement.js +21 -0
- package/lib/developerTestAccounts.d.ts +1 -7
- package/lib/developerTestAccounts.js +2 -0
- package/lib/doctor/Diagnosis.d.ts +27 -0
- package/lib/doctor/Diagnosis.js +119 -0
- package/lib/doctor/DiagnosticInfoBuilder.d.ts +61 -0
- package/lib/doctor/DiagnosticInfoBuilder.js +158 -0
- package/lib/doctor/Doctor.d.ts +21 -0
- package/lib/doctor/Doctor.js +328 -0
- package/lib/enums/exitCodes.d.ts +5 -5
- package/lib/enums/exitCodes.js +3 -2
- package/lib/errorHandlers/index.d.ts +1 -19
- package/lib/errorHandlers/index.js +2 -0
- package/lib/errorHandlers/suppressError.d.ts +1 -1
- package/lib/errorHandlers/suppressError.js +2 -0
- package/lib/filesystem.d.ts +2 -2
- package/lib/filesystem.js +12 -10
- package/lib/generateSelectors.d.ts +1 -0
- package/lib/{generate-selectors.js → generateSelectors.js} +3 -1
- package/lib/hasFeature.d.ts +1 -1
- package/lib/hasFeature.js +7 -8
- package/lib/hasFlag.d.ts +1 -2
- package/lib/hasFlag.js +7 -3
- package/lib/interpolation.d.ts +8 -10
- package/lib/interpolation.js +42 -47
- package/lib/lang.d.ts +9 -3
- package/lib/lang.js +38 -31
- package/lib/links.d.ts +1 -127
- package/lib/links.js +2 -0
- package/lib/localDev.d.ts +1 -11
- package/lib/localDev.js +2 -0
- package/lib/marketplaceValidate.d.ts +1 -0
- package/lib/{marketplace-validate.js → marketplaceValidate.js} +2 -0
- package/lib/oauth.d.ts +1 -1
- package/lib/oauth.js +3 -1
- package/lib/polling.d.ts +1 -1
- package/lib/polling.js +2 -0
- package/lib/process.d.ts +12 -2
- package/lib/process.js +17 -15
- package/lib/projectStructure.d.ts +1 -13
- package/lib/projectStructure.js +4 -2
- package/lib/projects.d.ts +2 -38
- package/lib/projects.js +15 -8
- package/lib/projectsWatch.d.ts +1 -1
- package/lib/projectsWatch.js +8 -3
- package/lib/prompts/accountNamePrompt.d.ts +1 -11
- package/lib/prompts/accountNamePrompt.js +3 -2
- package/lib/prompts/accountsPrompt.d.ts +1 -3
- package/lib/prompts/accountsPrompt.js +2 -17
- package/lib/prompts/cleanUploadPrompt.d.ts +1 -1
- package/lib/prompts/cleanUploadPrompt.js +2 -0
- package/lib/prompts/cmsFieldPrompt.d.ts +1 -1
- package/lib/prompts/cmsFieldPrompt.js +2 -0
- package/lib/prompts/createApiSamplePrompt.d.ts +1 -1
- package/lib/prompts/createApiSamplePrompt.js +2 -0
- package/lib/prompts/createFunctionPrompt.d.ts +1 -1
- package/lib/prompts/createFunctionPrompt.js +5 -4
- package/lib/prompts/createModulePrompt.d.ts +1 -1
- package/lib/prompts/createModulePrompt.js +2 -0
- package/lib/prompts/createProjectPrompt.d.ts +1 -1
- package/lib/prompts/createProjectPrompt.js +10 -5
- package/lib/prompts/createTemplatePrompt.d.ts +1 -1
- package/lib/prompts/createTemplatePrompt.js +2 -0
- package/lib/prompts/downloadProjectPrompt.d.ts +1 -1
- package/lib/prompts/downloadProjectPrompt.js +3 -1
- package/lib/prompts/installPublicAppPrompt.d.ts +1 -1
- package/lib/prompts/installPublicAppPrompt.js +2 -0
- package/lib/prompts/personalAccessKeyPrompt.d.ts +1 -69
- package/lib/prompts/personalAccessKeyPrompt.js +2 -0
- package/lib/prompts/previewPrompt.d.ts +1 -2
- package/lib/prompts/previewPrompt.js +2 -0
- package/lib/prompts/projectAddPrompt.d.ts +1 -1
- package/lib/prompts/projectAddPrompt.js +2 -0
- package/lib/prompts/projectDevTargetAccountPrompt.d.ts +1 -4
- package/lib/prompts/projectDevTargetAccountPrompt.js +2 -0
- package/lib/prompts/projectNamePrompt.d.ts +1 -1
- package/lib/prompts/projectNamePrompt.js +2 -0
- package/lib/prompts/projectsLogsPrompt.d.ts +1 -5
- package/lib/prompts/projectsLogsPrompt.js +2 -0
- package/lib/prompts/promptUtils.d.ts +12 -2
- package/lib/prompts/promptUtils.js +25 -12
- package/lib/prompts/sandboxesPrompt.d.ts +1 -2
- package/lib/prompts/sandboxesPrompt.js +2 -0
- package/lib/prompts/secretPrompt.d.ts +1 -1
- package/lib/prompts/secretPrompt.js +2 -0
- package/lib/prompts/selectPublicAppPrompt.d.ts +1 -5
- package/lib/prompts/selectPublicAppPrompt.js +3 -1
- package/lib/prompts/setAsDefaultAccountPrompt.d.ts +1 -1
- package/lib/prompts/setAsDefaultAccountPrompt.js +2 -0
- package/lib/prompts/uploadPrompt.d.ts +1 -1
- package/lib/prompts/uploadPrompt.js +2 -0
- package/lib/sandboxSync.d.ts +1 -8
- package/lib/sandboxSync.js +3 -1
- package/lib/sandboxes.d.ts +1 -40
- package/lib/sandboxes.js +2 -0
- package/lib/schema.d.ts +3 -2
- package/lib/schema.js +20 -18
- package/lib/serverlessLogs.d.ts +1 -8
- package/lib/serverlessLogs.js +3 -1
- package/lib/ui/SpinniesManager.d.ts +35 -57
- package/lib/ui/SpinniesManager.js +67 -34
- package/lib/ui/git.d.ts +1 -1
- package/lib/ui/git.js +18 -16
- package/lib/ui/index.d.ts +16 -36
- package/lib/ui/index.js +88 -113
- package/lib/ui/serverlessFunctionLogs.d.ts +1 -1
- package/lib/ui/serverlessFunctionLogs.js +26 -19
- package/lib/ui/spinniesUtils.d.ts +29 -57
- package/lib/ui/spinniesUtils.js +46 -30
- package/lib/ui/supportHyperlinks.d.ts +7 -3
- package/lib/ui/supportHyperlinks.js +11 -9
- package/lib/ui/supportsColor.d.ts +13 -9
- package/lib/ui/supportsColor.js +20 -16
- package/lib/ui/table.d.ts +3 -2
- package/lib/ui/table.js +18 -10
- package/lib/upload.d.ts +1 -1
- package/lib/upload.js +4 -2
- package/lib/usageTracking.d.ts +2 -6
- package/lib/usageTracking.js +14 -1
- package/lib/validation.d.ts +1 -16
- package/lib/validation.js +2 -2
- package/package.json +20 -10
- package/commands/config/set/allowUsageTracking.d.ts +0 -4
- package/commands/config/set/allowUsageTracking.js +0 -45
- package/commands/config/set/defaultMode.d.ts +0 -4
- package/commands/config/set/defaultMode.js +0 -48
- package/commands/config/set/httpTimeout.d.ts +0 -4
- package/commands/config/set/httpTimeout.js +0 -33
- package/lib/debugInfo.d.ts +0 -3
- package/lib/debugInfo.js +0 -18
- package/lib/environment.d.ts +0 -1
- package/lib/environment.js +0 -14
- package/lib/generate-selectors.d.ts +0 -6
- package/lib/getFunctionArrays.d.ts +0 -1
- package/lib/getFunctionArrays.js +0 -17
- package/lib/hublValidate.d.ts +0 -4
- package/lib/hublValidate.js +0 -28
- package/lib/interpolationHelpers.d.ts +0 -6
- package/lib/interpolationHelpers.js +0 -26
- package/lib/marketplace-validate.d.ts +0 -5
- package/lib/projectLogsManager.d.ts +0 -19
- package/lib/prompts/activeInstallConfirmationPrompt.d.ts +0 -1
- package/lib/prompts/activeInstallConfirmationPrompt.js +0 -18
- package/lib/prompts/deployBuildIdPrompt.d.ts +0 -1
- package/lib/prompts/deployBuildIdPrompt.js +0 -20
- package/lib/prompts/feedbackPrompt.d.ts +0 -2
- package/lib/prompts/feedbackPrompt.js +0 -37
- package/lib/prompts/folderOverwritePrompt.d.ts +0 -1
- package/lib/prompts/folderOverwritePrompt.js +0 -15
- package/lib/regex.d.ts +0 -1
- package/lib/regex.js +0 -5
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
// @ts-nocheck
|
|
2
4
|
const { addAccountOptions, addConfigOptions, addUseEnvironmentOptions, getAccountId, addTestingOptions, } = require('../../lib/commonOpts');
|
|
3
5
|
const { logger } = require('@hubspot/local-dev-lib/logger');
|
|
4
6
|
const { trackCommandUsage } = require('../../lib/usageTracking');
|
|
@@ -9,7 +11,7 @@ const { deleteSandbox } = require('@hubspot/local-dev-lib/api/sandboxHubs');
|
|
|
9
11
|
const { i18n } = require('../../lib/lang');
|
|
10
12
|
const { deleteSandboxPrompt } = require('../../lib/prompts/sandboxesPrompt');
|
|
11
13
|
const { getConfig, getEnv, removeSandboxAccountFromConfig, updateDefaultAccount, } = require('@hubspot/local-dev-lib/config');
|
|
12
|
-
const {
|
|
14
|
+
const { selectAccountFromConfig } = require('../../lib/prompts/accountsPrompt');
|
|
13
15
|
const { EXIT_CODES } = require('../../lib/enums/exitCodes');
|
|
14
16
|
const { promptUser } = require('../../lib/prompts/promptUtils');
|
|
15
17
|
const { getHubSpotWebsiteOrigin } = require('@hubspot/local-dev-lib/urls');
|
|
@@ -111,7 +113,8 @@ exports.handler = async (options) => {
|
|
|
111
113
|
logger.log('');
|
|
112
114
|
const promptDefaultAccount = removeSandboxAccountFromConfig(sandboxAccountId);
|
|
113
115
|
if (promptDefaultAccount && !force) {
|
|
114
|
-
await
|
|
116
|
+
const newDefaultAccount = await selectAccountFromConfig(getConfig());
|
|
117
|
+
updateDefaultAccount(newDefaultAccount);
|
|
115
118
|
}
|
|
116
119
|
else {
|
|
117
120
|
// If force is specified, skip prompt and set the parent account id as the default account
|
|
@@ -153,7 +156,8 @@ exports.handler = async (options) => {
|
|
|
153
156
|
logger.log('');
|
|
154
157
|
const promptDefaultAccount = removeSandboxAccountFromConfig(sandboxAccountId);
|
|
155
158
|
if (promptDefaultAccount && !force) {
|
|
156
|
-
await
|
|
159
|
+
const newDefaultAccount = await selectAccountFromConfig(getConfig());
|
|
160
|
+
updateDefaultAccount(newDefaultAccount);
|
|
157
161
|
}
|
|
158
162
|
else {
|
|
159
163
|
// If force is specified, skip prompt and set the parent account id as the default account
|
package/commands/sandbox.d.ts
CHANGED
package/commands/sandbox.js
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
// @ts-nocheck
|
|
2
4
|
const { logger } = require('@hubspot/local-dev-lib/logger');
|
|
3
5
|
const { logError, ApiErrorContext } = require('../../lib/errorHandlers/index');
|
|
4
6
|
const { addSecret } = require('@hubspot/local-dev-lib/api/secrets');
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
// @ts-nocheck
|
|
2
4
|
const { logger } = require('@hubspot/local-dev-lib/logger');
|
|
3
5
|
const { ApiErrorContext, logError } = require('../../lib/errorHandlers/index');
|
|
4
6
|
const { deleteSecret } = require('@hubspot/local-dev-lib/api/secrets');
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
// @ts-nocheck
|
|
2
4
|
const { logger } = require('@hubspot/local-dev-lib/logger');
|
|
3
5
|
const { logError, ApiErrorContext } = require('../../lib/errorHandlers/index');
|
|
4
6
|
const { fetchSecrets } = require('@hubspot/local-dev-lib/api/secrets');
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
// @ts-nocheck
|
|
2
4
|
const { logger } = require('@hubspot/local-dev-lib/logger');
|
|
3
5
|
const { ApiErrorContext, logError } = require('../../lib/errorHandlers/index');
|
|
4
6
|
const { updateSecret } = require('@hubspot/local-dev-lib/api/secrets');
|
package/commands/secrets.d.ts
CHANGED
package/commands/secrets.js
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
// @ts-nocheck
|
|
2
4
|
const { addConfigOptions, addAccountOptions } = require('../lib/commonOpts');
|
|
3
5
|
const addSecretCommand = require('./secrets/addSecret');
|
|
4
6
|
const listSecretsCommand = require('./secrets/listSecrets');
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
// @ts-nocheck
|
|
2
4
|
const fs = require('fs');
|
|
3
5
|
const { i18n } = require('../../lib/lang');
|
|
4
6
|
const { logger } = require('@hubspot/local-dev-lib/logger');
|
|
5
|
-
const { findFieldsJsonPath, combineThemeCss, setPreviewSelectors, generateInheritedSelectors, generateSelectorsMap, getMaxFieldsDepth, } = require('../../lib/
|
|
7
|
+
const { findFieldsJsonPath, combineThemeCss, setPreviewSelectors, generateInheritedSelectors, generateSelectorsMap, getMaxFieldsDepth, } = require('../../lib/generateSelectors');
|
|
6
8
|
const { EXIT_CODES } = require('../../lib/enums/exitCodes');
|
|
7
9
|
const HUBL_EXPRESSION_REGEX = new RegExp(/{%\s*(.*)\s*%}/, 'g');
|
|
8
10
|
const HUBL_VARIABLE_NAME_REGEX = new RegExp(/{%\s*set\s*(\w*)/, 'i');
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
// @ts-nocheck
|
|
2
4
|
const SpinniesManager = require('../../lib/ui/SpinniesManager');
|
|
3
5
|
const { addConfigOptions, addAccountOptions, addUseEnvironmentOptions, getAccountId, } = require('../../lib/commonOpts');
|
|
4
6
|
const { loadAndValidateOptions } = require('../../lib/validation');
|
|
5
7
|
const { trackCommandUsage } = require('../../lib/usageTracking');
|
|
6
|
-
const { kickOffValidation, pollForValidationFinish, fetchValidationResults, processValidationErrors, displayValidationResults, } = require('../../lib/
|
|
8
|
+
const { kickOffValidation, pollForValidationFinish, fetchValidationResults, processValidationErrors, displayValidationResults, } = require('../../lib/marketplaceValidate');
|
|
7
9
|
const { i18n } = require('../../lib/lang');
|
|
8
10
|
const i18nKey = 'commands.theme.subcommands.marketplaceValidate';
|
|
9
11
|
exports.command = 'marketplace-validate <src>';
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
// @ts-nocheck
|
|
2
4
|
const fs = require('fs');
|
|
3
5
|
const path = require('path');
|
|
4
6
|
const { i18n } = require('../../lib/lang');
|
|
@@ -87,56 +89,59 @@ const determineSrcAndDest = async (options) => {
|
|
|
87
89
|
return { absoluteSrc, dest };
|
|
88
90
|
};
|
|
89
91
|
exports.handler = async (options) => {
|
|
90
|
-
const { notify, skipUpload, noSsl, port, debug } = options;
|
|
92
|
+
const { notify, skipUpload, noSsl, port, debug, resetSession } = options;
|
|
91
93
|
await loadAndValidateOptions(options);
|
|
92
94
|
const accountId = getAccountId(options);
|
|
93
95
|
const { absoluteSrc, dest } = await determineSrcAndDest(options);
|
|
94
96
|
const filePaths = await getUploadableFileList(absoluteSrc, false);
|
|
95
|
-
const
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
uploadsHaveStarted
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
},
|
|
117
|
-
onFirstErrorCallback: () => {
|
|
118
|
-
/* Intentionally blank */
|
|
119
|
-
},
|
|
120
|
-
onRetryCallback: () => {
|
|
121
|
-
/* Intentionally blank */
|
|
122
|
-
},
|
|
123
|
-
onFinalErrorCallback: () => initialUploadProgressBar.increment(),
|
|
124
|
-
onFinishCallback: results => {
|
|
125
|
-
initialUploadProgressBar.update(filePaths.length, {
|
|
126
|
-
label: i18n(`${i18nKey}.initialUploadProgressBar.finish`),
|
|
127
|
-
});
|
|
128
|
-
initialUploadProgressBar.stop();
|
|
129
|
-
results.forEach(result => {
|
|
130
|
-
if (result.resultType == FILE_UPLOAD_RESULT_TYPES.FAILURE) {
|
|
131
|
-
logger.error('Uploading file "%s" to "%s" failed', result.file, dest);
|
|
132
|
-
logError(result.error, new ApiErrorContext({
|
|
133
|
-
accountId,
|
|
134
|
-
request: dest,
|
|
135
|
-
payload: result.file,
|
|
136
|
-
}));
|
|
97
|
+
const startProgressBar = numFiles => {
|
|
98
|
+
const initialUploadProgressBar = new cliProgress.SingleBar({
|
|
99
|
+
gracefulExit: true,
|
|
100
|
+
format: '[{bar}] {percentage}% | {value}/{total} | {label}',
|
|
101
|
+
hideCursor: true,
|
|
102
|
+
}, cliProgress.Presets.rect);
|
|
103
|
+
initialUploadProgressBar.start(numFiles, 0, {
|
|
104
|
+
label: i18n(`${i18nKey}.initialUploadProgressBar.start`),
|
|
105
|
+
});
|
|
106
|
+
let uploadsHaveStarted = false;
|
|
107
|
+
const uploadOptions = {
|
|
108
|
+
onAttemptCallback: () => {
|
|
109
|
+
/* Intentionally blank */
|
|
110
|
+
},
|
|
111
|
+
onSuccessCallback: () => {
|
|
112
|
+
initialUploadProgressBar.increment();
|
|
113
|
+
if (!uploadsHaveStarted) {
|
|
114
|
+
uploadsHaveStarted = true;
|
|
115
|
+
initialUploadProgressBar.update(0, {
|
|
116
|
+
label: i18n(`${i18nKey}.initialUploadProgressBar.uploading`),
|
|
117
|
+
});
|
|
137
118
|
}
|
|
138
|
-
}
|
|
139
|
-
|
|
119
|
+
},
|
|
120
|
+
onFirstErrorCallback: () => {
|
|
121
|
+
/* Intentionally blank */
|
|
122
|
+
},
|
|
123
|
+
onRetryCallback: () => {
|
|
124
|
+
/* Intentionally blank */
|
|
125
|
+
},
|
|
126
|
+
onFinalErrorCallback: () => initialUploadProgressBar.increment(),
|
|
127
|
+
onFinishCallback: results => {
|
|
128
|
+
initialUploadProgressBar.update(numFiles, {
|
|
129
|
+
label: i18n(`${i18nKey}.initialUploadProgressBar.finish`),
|
|
130
|
+
});
|
|
131
|
+
initialUploadProgressBar.stop();
|
|
132
|
+
results.forEach(result => {
|
|
133
|
+
if (result.resultType == FILE_UPLOAD_RESULT_TYPES.FAILURE) {
|
|
134
|
+
logger.error('Uploading file "%s" to "%s" failed', result.file, dest);
|
|
135
|
+
logError(result.error, new ApiErrorContext({
|
|
136
|
+
accountId,
|
|
137
|
+
request: dest,
|
|
138
|
+
payload: result.file,
|
|
139
|
+
}));
|
|
140
|
+
}
|
|
141
|
+
});
|
|
142
|
+
},
|
|
143
|
+
};
|
|
144
|
+
return uploadOptions;
|
|
140
145
|
};
|
|
141
146
|
trackCommandUsage('preview', accountId);
|
|
142
147
|
preview(accountId, absoluteSrc, dest, {
|
|
@@ -146,7 +151,8 @@ exports.handler = async (options) => {
|
|
|
146
151
|
noSsl,
|
|
147
152
|
port,
|
|
148
153
|
debug,
|
|
149
|
-
|
|
154
|
+
resetSession,
|
|
155
|
+
startProgressBar,
|
|
150
156
|
handleUserInput,
|
|
151
157
|
});
|
|
152
158
|
};
|
|
@@ -186,5 +192,9 @@ exports.builder = yargs => {
|
|
|
186
192
|
describe: false,
|
|
187
193
|
type: 'boolean',
|
|
188
194
|
});
|
|
195
|
+
yargs.option('resetSession', {
|
|
196
|
+
describe: false,
|
|
197
|
+
type: 'boolean',
|
|
198
|
+
});
|
|
189
199
|
return yargs;
|
|
190
200
|
};
|
package/commands/theme.d.ts
CHANGED
package/commands/theme.js
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
// @ts-nocheck
|
|
2
4
|
const marketplaceValidate = require('./theme/marketplace-validate');
|
|
3
5
|
const generateSelectors = require('./theme/generate-selectors');
|
|
4
6
|
const previewCommand = require('./theme/preview');
|
package/commands/upload.d.ts
CHANGED
package/commands/upload.js
CHANGED
package/commands/watch.d.ts
CHANGED
package/commands/watch.js
CHANGED
package/lang/en.lyaml
CHANGED
|
@@ -178,6 +178,7 @@ en:
|
|
|
178
178
|
describe: "Type of asset"
|
|
179
179
|
subcommands:
|
|
180
180
|
apiSample:
|
|
181
|
+
folderOverwritePrompt: "The folder with name \"{{ folderName }}\" already exists. Overwrite?"
|
|
181
182
|
errors:
|
|
182
183
|
nameRequired: "The \"name\" argument is required when creating an API Sample."
|
|
183
184
|
noSamples: "Currently there are no samples available, please, try again later."
|
|
@@ -274,6 +275,14 @@ en:
|
|
|
274
275
|
success:
|
|
275
276
|
update: "Your schema has been updated in account \"{{ accountId }}\""
|
|
276
277
|
viewAtUrl: "Schema can be viewed at {{ url }}"
|
|
278
|
+
doctor:
|
|
279
|
+
describe: "Retrieve diagnostic information about your local HubSpot configurations."
|
|
280
|
+
options:
|
|
281
|
+
outputDir: "Directory to save a detailed diagnosis JSON file in"
|
|
282
|
+
errors:
|
|
283
|
+
generatingDiagnosis: "Error generating diagnosis"
|
|
284
|
+
unableToWriteOutputFile: "Unable to write output to {{#bold}}{{ file }}{{/bold}}, {{ errorMessage }}"
|
|
285
|
+
outputWritten: "Output written to {{#bold}}{{ filename }}{{/bold}}"
|
|
277
286
|
fetch:
|
|
278
287
|
describe: "Fetch a file, directory or module from HubSpot and write to a path on your computer."
|
|
279
288
|
errors:
|
|
@@ -570,6 +579,7 @@ en:
|
|
|
570
579
|
withFlags: "Use --name and --type flags to bypass the prompt."
|
|
571
580
|
deploy:
|
|
572
581
|
describe: "Deploy a project build"
|
|
582
|
+
deployBuildIdPrompt: "[--build] Deploy which build?"
|
|
573
583
|
debug:
|
|
574
584
|
deploying: "Deploying project at path: {{ path }}"
|
|
575
585
|
errors:
|
|
@@ -702,6 +712,11 @@ en:
|
|
|
702
712
|
success: "Successfully opened \"{{ projectName }}\""
|
|
703
713
|
feedback:
|
|
704
714
|
describe: "Leave feedback on HubSpot projects or file a bug report"
|
|
715
|
+
feedbackType:
|
|
716
|
+
prompt: "What type of feedback would you like to leave?"
|
|
717
|
+
bug: "[--bug] Report a bug"
|
|
718
|
+
general: "[--general] Tell us about your experience with HubSpot's developer tools"
|
|
719
|
+
openPrompt: "Create a Github issue in your browser?"
|
|
705
720
|
success: "We opened {{ url }} in your browser."
|
|
706
721
|
options:
|
|
707
722
|
bug:
|
|
@@ -999,6 +1014,7 @@ en:
|
|
|
999
1014
|
installCount: "{{#bold}}The app {{ appName }} has {{ installCount }} production {{ installText }}{{/bold}}"
|
|
1000
1015
|
explanation: "Some changes made during local development may need to be synced to HubSpot, which will impact those existing installs. We strongly recommend creating a copy of this app to use instead."
|
|
1001
1016
|
confirmation: "You will always be asked to confirm any permanent changes to your app’s configuration before uploading them."
|
|
1017
|
+
confirmationPrompt: "Proceed with local development of this {{#bold}}production{{/bold}} app?"
|
|
1002
1018
|
devServer:
|
|
1003
1019
|
cleanupError: "Failed to cleanup local dev server: {{ message }}"
|
|
1004
1020
|
setupError: "Failed to setup local dev server: {{ message }}"
|
|
@@ -1193,8 +1209,6 @@ en:
|
|
|
1193
1209
|
invalidOauthClientSecretCopy: "Please copy the actual OAuth2 client secret rather than the asterisks that mask it."
|
|
1194
1210
|
invalidPersonalAccessKey: "You did not enter a valid access key. Please try again."
|
|
1195
1211
|
invalidPersonalAccessKeyCopy: "Please copy the actual access key rather than the bullets that mask it."
|
|
1196
|
-
folderOverwritePrompt:
|
|
1197
|
-
overwriteConfirm: "The folder with name \"{{ folderName }}\" already exists. Overwrite?"
|
|
1198
1212
|
createTemplatePrompt:
|
|
1199
1213
|
selectTemplate: "Select the type of template to create"
|
|
1200
1214
|
createModulePrompt:
|
|
@@ -1276,15 +1290,6 @@ en:
|
|
|
1276
1290
|
errors:
|
|
1277
1291
|
invalidName: "You entered an invalid name. Please try again."
|
|
1278
1292
|
projectDoesNotExist: "Project {{#bold}}{{ projectName }}{{/bold}} could not be found in \"{{ accountIdentifier }}\""
|
|
1279
|
-
feedbackPrompt:
|
|
1280
|
-
feedbackType:
|
|
1281
|
-
message: "What type of feedback would you like to leave?"
|
|
1282
|
-
bug: "[--bug] Report a bug"
|
|
1283
|
-
general: "[--general] Tell us about your experience with HubSpot's developer tools"
|
|
1284
|
-
bugPrompt: "Create an issue on Github in your browser?"
|
|
1285
|
-
generalPrompt: "Create an issue on Github in your browser?"
|
|
1286
|
-
deployBuildIdPrompt:
|
|
1287
|
-
enterBuildId: "[--build] Deploy which build?"
|
|
1288
1293
|
previewPrompt:
|
|
1289
1294
|
enterSrc: "[--src] Enter a local theme directory to preview."
|
|
1290
1295
|
enterDest: "[--dest] Enter the destination path for the src theme in HubSpot Design Tools."
|
|
@@ -1300,8 +1305,6 @@ en:
|
|
|
1300
1305
|
prompt: "Open hubspot.com to install this app?"
|
|
1301
1306
|
reinstallPrompt: "Open hubspot.com to reinstall this app?"
|
|
1302
1307
|
decline: "To continue local development of this app, install it in your target test account and re-run {{#bold}}`hs project dev`{{/bold}}"
|
|
1303
|
-
activeInstallConfirmationPrompt:
|
|
1304
|
-
message: "Proceed with local development of this {{#bold}}production{{/bold}} app?"
|
|
1305
1308
|
convertFields:
|
|
1306
1309
|
positionals:
|
|
1307
1310
|
src:
|
|
@@ -1423,3 +1426,62 @@ en:
|
|
|
1423
1426
|
portalMissingScope: "Your account does not have access to this action. Talk to an account admin to request it."
|
|
1424
1427
|
userMissingScope: "You don't have access to this action. Ask an account admin to change your permissions in Users & Teams settings."
|
|
1425
1428
|
genericMissingScope: "Your access key does not allow this action. Please generate a new access key by running `hs auth personalaccesskey`."
|
|
1429
|
+
doctor:
|
|
1430
|
+
runningDiagnostics: "Running diagnostics..."
|
|
1431
|
+
diagnosticsComplete: "Diagnostics complete"
|
|
1432
|
+
accountChecks:
|
|
1433
|
+
active: "Default account active"
|
|
1434
|
+
inactive: "Default account isn't active"
|
|
1435
|
+
inactiveSecondary: "Run {{ command }} to remove inactive accounts from your CLI config"
|
|
1436
|
+
unableToDetermine: "Unable to determine if the portal is active"
|
|
1437
|
+
pak:
|
|
1438
|
+
invalid: "Personal access key is invalid"
|
|
1439
|
+
invalidSecondary: "To get a new key, run {{ command }}, deactivate your access key, and generate a new one. Then use that new key to authenticate your account."
|
|
1440
|
+
valid: "Personal Access Key is valid. {{ link }}"
|
|
1441
|
+
viewScopes: "View selected scopes"
|
|
1442
|
+
nodeChecks:
|
|
1443
|
+
unableToDetermine: "Unable to determine what version of node is installed"
|
|
1444
|
+
minimumNotMet: "Minimum Node version is not met. Upgrade to {{ nodeVersion }} or higher"
|
|
1445
|
+
success: "node v{{ nodeVersion }} is installed"
|
|
1446
|
+
npmChecks:
|
|
1447
|
+
notInstalled: "npm is not installed"
|
|
1448
|
+
installed: "npm v{{ npmVersion }} is installed"
|
|
1449
|
+
unableToDetermine: "Unable to determine if npm is installed"
|
|
1450
|
+
hsChecks:
|
|
1451
|
+
notLatest: "Version {{ hsVersion }} outdated"
|
|
1452
|
+
notLatestSecondary: "Run {{ command }} to upgrade to the latest version {{ hsVersion }}"
|
|
1453
|
+
latest: "HubSpot CLI v{{ hsVersion }} up to date"
|
|
1454
|
+
unableToDetermine: "Unable to determine if HubSpot CLI is up to date."
|
|
1455
|
+
unableToDetermineSecondary: "Run {{ command }} to check your installed version; then visit the {{ link }} to validate whether you have the latest version"
|
|
1456
|
+
unableToDetermineSecondaryLink: "npm HubSpot CLI version history"
|
|
1457
|
+
projectDependenciesChecks:
|
|
1458
|
+
missingDependencies: "missing dependencies in {{#bold}}{{ dir }}{{/bold}}"
|
|
1459
|
+
missingDependenciesSecondary: "Run {{ command }} to install all project dependencies locally"
|
|
1460
|
+
unableToDetermine: "Unable to determine if dependencies are installed {{ dir }}"
|
|
1461
|
+
success: "App dependencies are installed and up to date"
|
|
1462
|
+
files:
|
|
1463
|
+
invalidJson: "invalid JSON in {{#bold}}{{ filename }}{{/bold}}"
|
|
1464
|
+
validJson: "JSON files valid"
|
|
1465
|
+
port:
|
|
1466
|
+
inUse: "Port {{ port }} is in use"
|
|
1467
|
+
inUseSecondary: "Make sure it is available if before running {{ command }}"
|
|
1468
|
+
available: "Port {{ port }} available for local development"
|
|
1469
|
+
diagnosis:
|
|
1470
|
+
cli:
|
|
1471
|
+
header: "HubSpot CLI install"
|
|
1472
|
+
cliConfig:
|
|
1473
|
+
header: "CLI configuration"
|
|
1474
|
+
configFileSubHeader: "Config File: {{#bold}}{{ filename }}{{/bold}}"
|
|
1475
|
+
defaultAccountSubHeader: "Default Account: {{accountDetails}}"
|
|
1476
|
+
noConfigFile: "CLI configuration not found"
|
|
1477
|
+
noConfigFileSecondary: "Run {{command}} and follow the prompts to create your CLI configuration file and connect it to your HubSpot account"
|
|
1478
|
+
projectConfig:
|
|
1479
|
+
header: "Project configuration"
|
|
1480
|
+
projectDirSubHeader: "Project dir: {{#bold}}{{ projectDir }}{{/bold}}"
|
|
1481
|
+
projectNameSubHeader: "Project name: {{#bold}}{{ projectName }}{{/bold}}"
|
|
1482
|
+
counts:
|
|
1483
|
+
errors: '{{#bold}}Errors:{{/bold}} {{ count }}'
|
|
1484
|
+
warnings: "{{#bold}}Warning:{{/bold}} {{ count }}"
|
|
1485
|
+
|
|
1486
|
+
|
|
1487
|
+
|
|
@@ -1,35 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export = _exports;
|
|
3
|
-
declare class DevServerManager {
|
|
4
|
-
initialized: boolean;
|
|
5
|
-
started: boolean;
|
|
6
|
-
componentsByType: {};
|
|
7
|
-
server: any;
|
|
8
|
-
path: any;
|
|
9
|
-
devServers: {
|
|
10
|
-
[x: string]: {
|
|
11
|
-
componentType: "private-app";
|
|
12
|
-
serverInterface: import("@hubspot/ui-extensions-dev-server").DevModeInterfaceNonSingleton;
|
|
13
|
-
} | {
|
|
14
|
-
componentType: "public-app";
|
|
15
|
-
serverInterface: import("@hubspot/ui-extensions-dev-server").DevModeInterfaceNonSingleton;
|
|
16
|
-
};
|
|
17
|
-
};
|
|
18
|
-
iterateDevServers(callback: any): Promise<void>;
|
|
19
|
-
arrangeComponentsByType(components: any): any;
|
|
20
|
-
setup({ components, onUploadRequired, accountId, setActiveApp }: {
|
|
21
|
-
components: any;
|
|
22
|
-
onUploadRequired: any;
|
|
23
|
-
accountId: any;
|
|
24
|
-
setActiveApp: any;
|
|
25
|
-
}): Promise<void>;
|
|
26
|
-
start({ accountId, projectConfig }: {
|
|
27
|
-
accountId: any;
|
|
28
|
-
projectConfig: any;
|
|
29
|
-
}): Promise<void>;
|
|
30
|
-
fileChange({ filePath, event }: {
|
|
31
|
-
filePath: any;
|
|
32
|
-
event: any;
|
|
33
|
-
}): void;
|
|
34
|
-
cleanup(): Promise<void>;
|
|
35
|
-
}
|
|
1
|
+
export {};
|
package/lib/DevServerManager.js
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
// @ts-nocheck
|
|
2
4
|
const { logger } = require('@hubspot/local-dev-lib/logger');
|
|
3
5
|
const { COMPONENT_TYPES } = require('./projectStructure');
|
|
4
6
|
const { i18n } = require('./lang');
|
|
5
7
|
const { promptUser } = require('./prompts/promptUtils');
|
|
6
8
|
const { DevModeInterface } = require('@hubspot/ui-extensions-dev-server');
|
|
7
|
-
const { startPortManagerServer,
|
|
9
|
+
const { startPortManagerServer, stopPortManagerServer, requestPorts, } = require('@hubspot/local-dev-lib/portManager');
|
|
8
10
|
const { getHubSpotApiOrigin, getHubSpotWebsiteOrigin, } = require('@hubspot/local-dev-lib/urls');
|
|
9
11
|
const { getAccountConfig } = require('@hubspot/local-dev-lib/config');
|
|
10
12
|
const i18nKey = 'lib.DevServerManager';
|
|
@@ -107,10 +109,7 @@ class DevServerManager {
|
|
|
107
109
|
await serverInterface.cleanup();
|
|
108
110
|
}
|
|
109
111
|
});
|
|
110
|
-
|
|
111
|
-
if (!hasActiveServers) {
|
|
112
|
-
await stopPortManagerServer();
|
|
113
|
-
}
|
|
112
|
+
await stopPortManagerServer();
|
|
114
113
|
}
|
|
115
114
|
}
|
|
116
115
|
}
|
package/lib/LocalDevManager.d.ts
CHANGED
|
@@ -1,41 +1 @@
|
|
|
1
|
-
export
|
|
2
|
-
declare class LocalDevManager {
|
|
3
|
-
constructor(options: any);
|
|
4
|
-
targetAccountId: any;
|
|
5
|
-
targetProjectAccountId: any;
|
|
6
|
-
projectConfig: any;
|
|
7
|
-
projectDir: any;
|
|
8
|
-
projectId: any;
|
|
9
|
-
debug: any;
|
|
10
|
-
deployedBuild: any;
|
|
11
|
-
isGithubLinked: any;
|
|
12
|
-
watcher: chokidar.FSWatcher | null;
|
|
13
|
-
uploadWarnings: {};
|
|
14
|
-
runnableComponents: any;
|
|
15
|
-
activeApp: any;
|
|
16
|
-
activePublicAppData: any;
|
|
17
|
-
env: any;
|
|
18
|
-
publicAppActiveInstalls: number | null;
|
|
19
|
-
projectSourceDir: string;
|
|
20
|
-
setActiveApp(appUid: any): Promise<void>;
|
|
21
|
-
setActivePublicAppData(): Promise<void>;
|
|
22
|
-
checkActivePublicAppInstalls(): Promise<void>;
|
|
23
|
-
start(): Promise<void>;
|
|
24
|
-
stop(showProgress?: boolean): Promise<void>;
|
|
25
|
-
getActiveAppInstallationData(): Promise<import("@hubspot/local-dev-lib/types/Apps").PublicAppInstallationData>;
|
|
26
|
-
checkPublicAppInstallation(): Promise<void>;
|
|
27
|
-
updateKeypressListeners(): void;
|
|
28
|
-
getUploadCommand(): string;
|
|
29
|
-
logUploadWarning(reason: any): void;
|
|
30
|
-
mostRecentUploadWarning: any;
|
|
31
|
-
monitorConsoleOutput(): void;
|
|
32
|
-
compareLocalProjectToDeployed(): void;
|
|
33
|
-
startWatching(): void;
|
|
34
|
-
stopWatching(): Promise<void>;
|
|
35
|
-
handleWatchEvent(filePath: any, event: any, configPaths: any): void;
|
|
36
|
-
devServerSetup(): Promise<boolean>;
|
|
37
|
-
devServerStart(): Promise<void>;
|
|
38
|
-
devServerFileChange(filePath: any, event: any): void;
|
|
39
|
-
devServerCleanup(): Promise<boolean>;
|
|
40
|
-
}
|
|
41
|
-
import chokidar = require("chokidar");
|
|
1
|
+
export {};
|
package/lib/LocalDevManager.js
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
// @ts-nocheck
|
|
2
4
|
const path = require('path');
|
|
3
5
|
const chokidar = require('chokidar');
|
|
4
6
|
const chalk = require('chalk');
|
|
@@ -18,7 +20,7 @@ const { CONFIG_FILES, COMPONENT_TYPES, getAppCardConfigs, } = require('./project
|
|
|
18
20
|
const { UI_COLORS, uiCommandReference, uiAccountDescription, uiBetaTag, uiLink, uiLine, } = require('./ui');
|
|
19
21
|
const { logError } = require('./errorHandlers/index');
|
|
20
22
|
const { installPublicAppPrompt } = require('./prompts/installPublicAppPrompt');
|
|
21
|
-
const {
|
|
23
|
+
const { confirmPrompt } = require('./prompts/promptUtils');
|
|
22
24
|
const WATCH_EVENTS = {
|
|
23
25
|
add: 'add',
|
|
24
26
|
change: 'change',
|
|
@@ -96,7 +98,7 @@ class LocalDevManager {
|
|
|
96
98
|
}));
|
|
97
99
|
logger.log(i18n(`${i18nKey}.activeInstallWarning.explanation`));
|
|
98
100
|
uiLine();
|
|
99
|
-
const proceed = await
|
|
101
|
+
const proceed = await confirmPrompt(i18n(`${i18nKey}.activeInstallWarning.confirmationPrompt`), { defaultAnswer: false });
|
|
100
102
|
if (!proceed) {
|
|
101
103
|
process.exit(EXIT_CODES.SUCCESS);
|
|
102
104
|
}
|
|
@@ -240,7 +242,7 @@ class LocalDevManager {
|
|
|
240
242
|
}
|
|
241
243
|
compareLocalProjectToDeployed() {
|
|
242
244
|
const deployedComponentNames = this.deployedBuild.subbuildStatuses.map(subbuildStatus => subbuildStatus.buildName);
|
|
243
|
-
|
|
245
|
+
const missingComponents = [];
|
|
244
246
|
this.runnableComponents.forEach(({ type, config, path }) => {
|
|
245
247
|
if (Object.values(COMPONENT_TYPES).includes(type)) {
|
|
246
248
|
const cardConfigs = getAppCardConfigs(config, path);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|