@hubspot/cli 6.2.2-experimental.0 → 6.3.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/LICENSE +12 -0
- package/README.md +71 -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/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 +2 -2
- package/commands/lint.d.ts +1 -4
- package/commands/lint.js +30 -1
- 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 +2 -0
- 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 +3 -1
- 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 +8 -13
- package/lib/DevServerManager.d.ts +1 -35
- package/lib/DevServerManager.js +2 -0
- 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 +23 -17
- package/lib/commonOpts.js +73 -54
- 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 +1 -7
- package/lib/dependencyManagement.js +2 -0
- package/lib/developerTestAccounts.d.ts +1 -7
- package/lib/developerTestAccounts.js +2 -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 +5 -10
- package/lib/interpolation.js +39 -45
- 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 +1 -40
- package/lib/projects.js +10 -5
- 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 +1 -61
- package/lib/ui/SpinniesManager.js +2 -0
- package/lib/ui/git.d.ts +1 -1
- package/lib/ui/git.js +2 -0
- package/lib/ui/index.d.ts +1 -36
- package/lib/ui/index.js +2 -0
- package/lib/ui/serverlessFunctionLogs.d.ts +1 -1
- package/lib/ui/serverlessFunctionLogs.js +2 -0
- package/lib/ui/spinniesUtils.d.ts +1 -60
- package/lib/ui/spinniesUtils.js +2 -0
- package/lib/ui/supportHyperlinks.d.ts +1 -3
- package/lib/ui/supportHyperlinks.js +3 -1
- package/lib/ui/supportsColor.d.ts +1 -13
- package/lib/ui/supportsColor.js +3 -1
- package/lib/ui/table.d.ts +1 -2
- package/lib/ui/table.js +2 -0
- package/lib/upload.d.ts +1 -1
- package/lib/upload.js +4 -2
- package/lib/usageTracking.d.ts +1 -6
- package/lib/usageTracking.js +12 -1
- package/lib/validation.d.ts +1 -16
- package/lib/validation.js +2 -2
- package/package.json +17 -9
- 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
package/lib/commonOpts.js
CHANGED
|
@@ -1,87 +1,106 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.addAccountOptions = addAccountOptions;
|
|
4
|
+
exports.addConfigOptions = addConfigOptions;
|
|
5
|
+
exports.addOverwriteOptions = addOverwriteOptions;
|
|
6
|
+
exports.addModeOptions = addModeOptions;
|
|
7
|
+
exports.addTestingOptions = addTestingOptions;
|
|
8
|
+
exports.addUseEnvironmentOptions = addUseEnvironmentOptions;
|
|
9
|
+
exports.setLogLevel = setLogLevel;
|
|
10
|
+
exports.getCommandName = getCommandName;
|
|
11
|
+
exports.getAccountId = getAccountId;
|
|
12
|
+
exports.getMode = getMode;
|
|
13
|
+
const logger_1 = require("@hubspot/local-dev-lib/logger");
|
|
14
|
+
const files_1 = require("@hubspot/local-dev-lib/constants/files");
|
|
15
|
+
const config_1 = require("@hubspot/local-dev-lib/config");
|
|
16
|
+
const lang_1 = require("./lang");
|
|
6
17
|
const i18nKey = 'lib.commonOpts';
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
18
|
+
function addAccountOptions(yargs) {
|
|
19
|
+
return yargs.option('portal', {
|
|
20
|
+
alias: ['p', 'account', 'a'],
|
|
21
|
+
describe: (0, lang_1.i18n)(`${i18nKey}.options.portal.describe`),
|
|
22
|
+
type: 'string',
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
function addConfigOptions(yargs) {
|
|
26
|
+
return yargs.option('config', {
|
|
27
|
+
alias: 'c',
|
|
28
|
+
describe: (0, lang_1.i18n)(`${i18nKey}.options.config.describe`),
|
|
29
|
+
type: 'string',
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
function addOverwriteOptions(yargs) {
|
|
33
|
+
return yargs.option('overwrite', {
|
|
34
|
+
alias: 'o',
|
|
35
|
+
describe: (0, lang_1.i18n)(`${i18nKey}.options.overwrite.describe`),
|
|
36
|
+
type: 'boolean',
|
|
37
|
+
default: false,
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
function addModeOptions(yargs, { read, write }) {
|
|
41
|
+
const modes = `<${Object.values(files_1.MODE).join(' | ')}>`;
|
|
25
42
|
return yargs.option('mode', {
|
|
26
43
|
alias: 'm',
|
|
27
|
-
describe: i18n(`${i18nKey}.options.modes.describe.${read ? 'read' : write ? 'write' : 'default'}`, { modes }),
|
|
44
|
+
describe: (0, lang_1.i18n)(`${i18nKey}.options.modes.describe.${read ? 'read' : write ? 'write' : 'default'}`, { modes }),
|
|
28
45
|
type: 'string',
|
|
29
46
|
});
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
})
|
|
42
|
-
|
|
47
|
+
}
|
|
48
|
+
function addTestingOptions(yargs) {
|
|
49
|
+
return yargs.option('qa', {
|
|
50
|
+
describe: (0, lang_1.i18n)(`${i18nKey}.options.qa.describe`),
|
|
51
|
+
type: 'boolean',
|
|
52
|
+
default: false,
|
|
53
|
+
hidden: true,
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
function addUseEnvironmentOptions(yargs) {
|
|
57
|
+
return yargs.option('use-env', {
|
|
58
|
+
describe: (0, lang_1.i18n)(`${i18nKey}.options.useEnv.describe`),
|
|
59
|
+
type: 'boolean',
|
|
60
|
+
default: false,
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
function setLogLevel(options) {
|
|
43
64
|
const { debug } = options;
|
|
44
65
|
if (debug) {
|
|
45
|
-
|
|
66
|
+
(0, logger_1.setLogLevel)(logger_1.LOG_LEVEL.DEBUG);
|
|
46
67
|
}
|
|
47
68
|
else {
|
|
48
|
-
|
|
69
|
+
(0, logger_1.setLogLevel)(logger_1.LOG_LEVEL.LOG);
|
|
49
70
|
}
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
*/
|
|
55
|
-
const getCommandName = argv => (argv && argv._ && argv._[0]) || '';
|
|
71
|
+
}
|
|
72
|
+
function getCommandName(argv) {
|
|
73
|
+
return (argv && argv._ && argv._[0]) || '';
|
|
74
|
+
}
|
|
56
75
|
/**
|
|
57
76
|
* Obtains accountId using supplied --account flag or from environment variables
|
|
58
77
|
*/
|
|
59
|
-
|
|
78
|
+
function getAccountId(options) {
|
|
60
79
|
const { portal, account } = options;
|
|
61
80
|
if (options.useEnv && process.env.HUBSPOT_PORTAL_ID) {
|
|
62
81
|
return parseInt(process.env.HUBSPOT_PORTAL_ID, 10);
|
|
63
82
|
}
|
|
64
|
-
return
|
|
65
|
-
}
|
|
66
|
-
|
|
83
|
+
return (0, config_1.getAccountId)(portal || account);
|
|
84
|
+
}
|
|
85
|
+
function getMode(options) {
|
|
67
86
|
// 1. --mode
|
|
68
|
-
const { mode } =
|
|
87
|
+
const { mode } = options;
|
|
69
88
|
if (mode && typeof mode === 'string') {
|
|
70
89
|
return mode.toLowerCase();
|
|
71
90
|
}
|
|
72
91
|
// 2. config[portal].defaultMode
|
|
73
|
-
const accountId = getAccountId(
|
|
92
|
+
const accountId = getAccountId(options);
|
|
74
93
|
if (accountId) {
|
|
75
|
-
const accountConfig = getAccountConfig(accountId);
|
|
94
|
+
const accountConfig = (0, config_1.getAccountConfig)(accountId);
|
|
76
95
|
if (accountConfig && accountConfig.defaultMode) {
|
|
77
96
|
return accountConfig.defaultMode;
|
|
78
97
|
}
|
|
79
98
|
}
|
|
80
99
|
// 3. config.defaultMode
|
|
81
100
|
// 4. DEFAULT_MODE
|
|
82
|
-
const config = getAndLoadConfigIfNeeded();
|
|
83
|
-
return (config && config.defaultMode) || DEFAULT_MODE;
|
|
84
|
-
}
|
|
101
|
+
const config = (0, config_1.getAndLoadConfigIfNeeded)();
|
|
102
|
+
return (config && config.defaultMode) || files_1.DEFAULT_MODE;
|
|
103
|
+
}
|
|
85
104
|
module.exports = {
|
|
86
105
|
addAccountOptions,
|
|
87
106
|
addConfigOptions,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
// @ts-nocheck
|
|
4
|
+
const { logger } = require('@hubspot/local-dev-lib/logger');
|
|
5
|
+
const { updateAllowUsageTracking, updateDefaultMode, updateHttpTimeout, } = require('@hubspot/local-dev-lib/config');
|
|
6
|
+
const { MODE } = require('@hubspot/local-dev-lib/constants/files');
|
|
7
|
+
const { commaSeparatedValues } = require('@hubspot/local-dev-lib/text');
|
|
8
|
+
const { trackCommandUsage } = require('./usageTracking');
|
|
9
|
+
const { promptUser } = require('./prompts/promptUtils');
|
|
10
|
+
const { i18n } = require('../lib/lang');
|
|
11
|
+
const i18nKey = 'commands.config.subcommands.set.options';
|
|
12
|
+
const enableOrDisableUsageTracking = async () => {
|
|
13
|
+
const { isEnabled } = await promptUser([
|
|
14
|
+
{
|
|
15
|
+
type: 'list',
|
|
16
|
+
look: false,
|
|
17
|
+
name: 'isEnabled',
|
|
18
|
+
pageSize: 20,
|
|
19
|
+
message: i18n(`${i18nKey}.allowUsageTracking.promptMessage`),
|
|
20
|
+
choices: [
|
|
21
|
+
{
|
|
22
|
+
name: i18n(`${i18nKey}.allowUsageTracking.labels.enabled`),
|
|
23
|
+
value: true,
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
name: i18n(`${i18nKey}.allowUsageTracking.labels.disabled`),
|
|
27
|
+
value: false,
|
|
28
|
+
},
|
|
29
|
+
],
|
|
30
|
+
default: true,
|
|
31
|
+
},
|
|
32
|
+
]);
|
|
33
|
+
return isEnabled;
|
|
34
|
+
};
|
|
35
|
+
const setAllowUsageTracking = async ({ accountId, allowUsageTracking }) => {
|
|
36
|
+
trackCommandUsage('config-set-allow-usage-tracking', null, accountId);
|
|
37
|
+
let isEnabled;
|
|
38
|
+
if (typeof allowUsageTracking === 'boolean') {
|
|
39
|
+
isEnabled = allowUsageTracking;
|
|
40
|
+
}
|
|
41
|
+
else {
|
|
42
|
+
isEnabled = await enableOrDisableUsageTracking();
|
|
43
|
+
}
|
|
44
|
+
updateAllowUsageTracking(isEnabled);
|
|
45
|
+
return logger.log(i18n(`${i18nKey}.allowUsageTracking.success`, { isEnabled }));
|
|
46
|
+
};
|
|
47
|
+
const ALL_MODES = Object.values(MODE);
|
|
48
|
+
const selectMode = async () => {
|
|
49
|
+
const { mode } = await promptUser([
|
|
50
|
+
{
|
|
51
|
+
type: 'list',
|
|
52
|
+
look: false,
|
|
53
|
+
name: 'mode',
|
|
54
|
+
pageSize: 20,
|
|
55
|
+
message: i18n(`${i18nKey}.defaultMode.promptMessage`),
|
|
56
|
+
choices: ALL_MODES,
|
|
57
|
+
default: MODE.publish,
|
|
58
|
+
},
|
|
59
|
+
]);
|
|
60
|
+
return mode;
|
|
61
|
+
};
|
|
62
|
+
const setDefaultMode = async ({ accountId, defaultMode }) => {
|
|
63
|
+
trackCommandUsage('config-set-default-mode', null, accountId);
|
|
64
|
+
let newDefault;
|
|
65
|
+
if (!defaultMode) {
|
|
66
|
+
newDefault = await selectMode();
|
|
67
|
+
}
|
|
68
|
+
else if (defaultMode && ALL_MODES.find(m => m === defaultMode)) {
|
|
69
|
+
newDefault = defaultMode;
|
|
70
|
+
}
|
|
71
|
+
else {
|
|
72
|
+
logger.error(i18n(`${i18nKey}.defaultMode.errors`, {
|
|
73
|
+
mode: newDefault,
|
|
74
|
+
validModes: commaSeparatedValues(ALL_MODES),
|
|
75
|
+
}));
|
|
76
|
+
newDefault = await selectMode();
|
|
77
|
+
}
|
|
78
|
+
updateDefaultMode(newDefault);
|
|
79
|
+
return logger.success(i18n(`${i18nKey}.defaultMode.success`, {
|
|
80
|
+
mode: newDefault,
|
|
81
|
+
}));
|
|
82
|
+
};
|
|
83
|
+
const enterTimeout = async () => {
|
|
84
|
+
const { timeout } = await promptUser([
|
|
85
|
+
{
|
|
86
|
+
name: 'timeout',
|
|
87
|
+
message: i18n(`${i18nKey}.httpTimeout.promptMessage`),
|
|
88
|
+
type: 'input',
|
|
89
|
+
default: 30000,
|
|
90
|
+
},
|
|
91
|
+
]);
|
|
92
|
+
return timeout;
|
|
93
|
+
};
|
|
94
|
+
const setHttpTimeout = async ({ accountId, httpTimeout }) => {
|
|
95
|
+
trackCommandUsage('config-set-http-timeout', null, accountId);
|
|
96
|
+
let newHttpTimeout;
|
|
97
|
+
if (!httpTimeout) {
|
|
98
|
+
newHttpTimeout = await enterTimeout();
|
|
99
|
+
}
|
|
100
|
+
else {
|
|
101
|
+
newHttpTimeout = httpTimeout;
|
|
102
|
+
}
|
|
103
|
+
updateHttpTimeout(newHttpTimeout);
|
|
104
|
+
return logger.success(i18n(`${i18nKey}.httpTimeout.success`, { timeout: newHttpTimeout }));
|
|
105
|
+
};
|
|
106
|
+
module.exports = {
|
|
107
|
+
setAllowUsageTracking,
|
|
108
|
+
setDefaultMode,
|
|
109
|
+
setHttpTimeout,
|
|
110
|
+
};
|
package/lib/constants.d.ts
CHANGED
|
@@ -1,83 +1,76 @@
|
|
|
1
|
-
export const HUBSPOT_PROJECT_COMPONENTS_GITHUB_PATH: "HubSpot/hubspot-project-components";
|
|
2
|
-
export const DEFAULT_PROJECT_TEMPLATE_BRANCH: "main";
|
|
3
|
-
export
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
export
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
}
|
|
62
|
-
export
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
let COMPONENTS: string;
|
|
78
|
-
}
|
|
79
|
-
export namespace PLATFORM_VERSION_ERROR_TYPES {
|
|
80
|
-
let PLATFORM_VERSION_NOT_SPECIFIED: string;
|
|
81
|
-
let PLATFORM_VERSION_RETIRED: string;
|
|
82
|
-
let PLATFORM_VERSION_SPECIFIED_DOES_NOT_EXIST: string;
|
|
83
|
-
}
|
|
1
|
+
export declare const HUBSPOT_PROJECT_COMPONENTS_GITHUB_PATH: "HubSpot/hubspot-project-components";
|
|
2
|
+
export declare const DEFAULT_PROJECT_TEMPLATE_BRANCH: "main";
|
|
3
|
+
export declare const FEEDBACK_INTERVAL: 10;
|
|
4
|
+
export declare const HUBSPOT_FOLDER: "@hubspot";
|
|
5
|
+
export declare const MARKETPLACE_FOLDER: "@marketplace";
|
|
6
|
+
export declare const CONFIG_FLAGS: {
|
|
7
|
+
readonly USE_CUSTOM_OBJECT_HUBFILE: "useCustomObjectHubfile";
|
|
8
|
+
};
|
|
9
|
+
export declare const POLLING_DELAY = 2000;
|
|
10
|
+
export declare const POLLING_STATUS: {
|
|
11
|
+
readonly SUCCESS: "SUCCESS";
|
|
12
|
+
readonly ERROR: "ERROR";
|
|
13
|
+
readonly REVERTED: "REVERTED";
|
|
14
|
+
readonly FAILURE: "FAILURE";
|
|
15
|
+
};
|
|
16
|
+
export declare const PROJECT_CONFIG_FILE: "hsproject.json";
|
|
17
|
+
export declare const PROJECT_BUILD_STATES: {
|
|
18
|
+
readonly BUILDING: "BUILDING";
|
|
19
|
+
readonly ENQUEUED: "ENQUEUED";
|
|
20
|
+
readonly FAILURE: "FAILURE";
|
|
21
|
+
readonly PENDING: "PENDING";
|
|
22
|
+
readonly SUCCESS: "SUCCESS";
|
|
23
|
+
};
|
|
24
|
+
export declare const PROJECT_DEPLOY_STATES: {
|
|
25
|
+
readonly DEPLOYING: "DEPLOYING";
|
|
26
|
+
readonly FAILURE: "FAILURE";
|
|
27
|
+
readonly PENDING: "PENDING";
|
|
28
|
+
readonly SUCCESS: "SUCCESS";
|
|
29
|
+
};
|
|
30
|
+
export declare const PROJECT_BUILD_TEXT: {
|
|
31
|
+
readonly STATES: {
|
|
32
|
+
readonly BUILDING: "BUILDING";
|
|
33
|
+
readonly ENQUEUED: "ENQUEUED";
|
|
34
|
+
readonly FAILURE: "FAILURE";
|
|
35
|
+
readonly PENDING: "PENDING";
|
|
36
|
+
readonly SUCCESS: "SUCCESS";
|
|
37
|
+
};
|
|
38
|
+
readonly STATUS_TEXT: "Building";
|
|
39
|
+
readonly SUBTASK_KEY: "subbuildStatuses";
|
|
40
|
+
readonly TYPE_KEY: "buildType";
|
|
41
|
+
readonly SUBTASK_NAME_KEY: "buildName";
|
|
42
|
+
};
|
|
43
|
+
export declare const PROJECT_DEPLOY_TEXT: {
|
|
44
|
+
readonly STATES: {
|
|
45
|
+
readonly DEPLOYING: "DEPLOYING";
|
|
46
|
+
readonly FAILURE: "FAILURE";
|
|
47
|
+
readonly PENDING: "PENDING";
|
|
48
|
+
readonly SUCCESS: "SUCCESS";
|
|
49
|
+
};
|
|
50
|
+
readonly STATUS_TEXT: "Deploying";
|
|
51
|
+
readonly SUBTASK_KEY: "subdeployStatuses";
|
|
52
|
+
readonly TYPE_KEY: "deployType";
|
|
53
|
+
readonly SUBTASK_NAME_KEY: "deployName";
|
|
54
|
+
};
|
|
55
|
+
export declare const PROJECT_ERROR_TYPES: {
|
|
56
|
+
readonly PROJECT_LOCKED: "BuildPipelineErrorType.PROJECT_LOCKED";
|
|
57
|
+
readonly MISSING_PROJECT_PROVISION: "BuildPipelineErrorType.MISSING_PROJECT_PROVISION";
|
|
58
|
+
readonly BUILD_NOT_IN_PROGRESS: "BuildPipelineErrorType.BUILD_NOT_IN_PROGRESS";
|
|
59
|
+
readonly SUBBUILD_FAILED: "BuildPipelineErrorType.DEPENDENT_SUBBUILD_FAILED";
|
|
60
|
+
readonly SUBDEPLOY_FAILED: "DeployPipelineErrorType.DEPENDENT_SUBDEPLOY_FAILED";
|
|
61
|
+
};
|
|
62
|
+
export declare const PROJECT_TASK_TYPES: {
|
|
63
|
+
readonly PRIVATE_APP: "private app";
|
|
64
|
+
readonly PUBLIC_APP: "public app";
|
|
65
|
+
readonly APP_FUNCTION: "function";
|
|
66
|
+
readonly CRM_CARD_V2: "card";
|
|
67
|
+
};
|
|
68
|
+
export declare const PROJECT_COMPONENT_TYPES: {
|
|
69
|
+
readonly PROJECTS: "projects";
|
|
70
|
+
readonly COMPONENTS: "components";
|
|
71
|
+
};
|
|
72
|
+
export declare const PLATFORM_VERSION_ERROR_TYPES: {
|
|
73
|
+
readonly PLATFORM_VERSION_NOT_SPECIFIED: "PlatformVersionErrorType.PLATFORM_VERSION_NOT_SPECIFIED";
|
|
74
|
+
readonly PLATFORM_VERSION_RETIRED: "PlatformVersionErrorType.PLATFORM_VERSION_RETIRED";
|
|
75
|
+
readonly PLATFORM_VERSION_SPECIFIED_DOES_NOT_EXIST: "PlatformVersionErrorType.PLATFORM_VERSION_SPECIFIED_DOES_NOT_EXIST";
|
|
76
|
+
};
|
package/lib/constants.js
CHANGED
|
@@ -1,93 +1,68 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
GENERAL: 'https://docs.google.com/forms/d/e/1FAIpQLSejZZewYzuH3oKBU01tseX-cSWOUsTHLTr-YsiMGpzwcvgIMg/viewform?usp=sf_link',
|
|
11
|
-
};
|
|
12
|
-
const FEEDBACK_INTERVAL = 10;
|
|
13
|
-
const HUBSPOT_FOLDER = '@hubspot';
|
|
14
|
-
const MARKETPLACE_FOLDER = '@marketplace';
|
|
15
|
-
const CONFIG_FLAGS = {
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PLATFORM_VERSION_ERROR_TYPES = exports.PROJECT_COMPONENT_TYPES = exports.PROJECT_TASK_TYPES = exports.PROJECT_ERROR_TYPES = exports.PROJECT_DEPLOY_TEXT = exports.PROJECT_BUILD_TEXT = exports.PROJECT_DEPLOY_STATES = exports.PROJECT_BUILD_STATES = exports.PROJECT_CONFIG_FILE = exports.POLLING_STATUS = exports.POLLING_DELAY = exports.CONFIG_FLAGS = exports.MARKETPLACE_FOLDER = exports.HUBSPOT_FOLDER = exports.FEEDBACK_INTERVAL = exports.DEFAULT_PROJECT_TEMPLATE_BRANCH = exports.HUBSPOT_PROJECT_COMPONENTS_GITHUB_PATH = void 0;
|
|
4
|
+
exports.HUBSPOT_PROJECT_COMPONENTS_GITHUB_PATH = 'HubSpot/hubspot-project-components';
|
|
5
|
+
exports.DEFAULT_PROJECT_TEMPLATE_BRANCH = 'main';
|
|
6
|
+
exports.FEEDBACK_INTERVAL = 10;
|
|
7
|
+
exports.HUBSPOT_FOLDER = '@hubspot';
|
|
8
|
+
exports.MARKETPLACE_FOLDER = '@marketplace';
|
|
9
|
+
exports.CONFIG_FLAGS = {
|
|
16
10
|
USE_CUSTOM_OBJECT_HUBFILE: 'useCustomObjectHubfile',
|
|
17
11
|
};
|
|
18
|
-
|
|
19
|
-
|
|
12
|
+
exports.POLLING_DELAY = 2000;
|
|
13
|
+
exports.POLLING_STATUS = {
|
|
20
14
|
SUCCESS: 'SUCCESS',
|
|
21
15
|
ERROR: 'ERROR',
|
|
22
16
|
REVERTED: 'REVERTED',
|
|
23
17
|
FAILURE: 'FAILURE',
|
|
24
18
|
};
|
|
25
|
-
|
|
26
|
-
|
|
19
|
+
exports.PROJECT_CONFIG_FILE = 'hsproject.json';
|
|
20
|
+
exports.PROJECT_BUILD_STATES = {
|
|
27
21
|
BUILDING: 'BUILDING',
|
|
28
22
|
ENQUEUED: 'ENQUEUED',
|
|
29
23
|
FAILURE: 'FAILURE',
|
|
30
24
|
PENDING: 'PENDING',
|
|
31
25
|
SUCCESS: 'SUCCESS',
|
|
32
26
|
};
|
|
33
|
-
|
|
27
|
+
exports.PROJECT_DEPLOY_STATES = {
|
|
34
28
|
DEPLOYING: 'DEPLOYING',
|
|
35
29
|
FAILURE: 'FAILURE',
|
|
36
30
|
PENDING: 'PENDING',
|
|
37
31
|
SUCCESS: 'SUCCESS',
|
|
38
32
|
};
|
|
39
|
-
|
|
40
|
-
STATES: { ...PROJECT_BUILD_STATES },
|
|
33
|
+
exports.PROJECT_BUILD_TEXT = {
|
|
34
|
+
STATES: { ...exports.PROJECT_BUILD_STATES },
|
|
41
35
|
STATUS_TEXT: 'Building',
|
|
42
36
|
SUBTASK_KEY: 'subbuildStatuses',
|
|
43
37
|
TYPE_KEY: 'buildType',
|
|
44
38
|
SUBTASK_NAME_KEY: 'buildName',
|
|
45
39
|
};
|
|
46
|
-
|
|
47
|
-
STATES: { ...PROJECT_DEPLOY_STATES },
|
|
40
|
+
exports.PROJECT_DEPLOY_TEXT = {
|
|
41
|
+
STATES: { ...exports.PROJECT_DEPLOY_STATES },
|
|
48
42
|
STATUS_TEXT: 'Deploying',
|
|
49
43
|
SUBTASK_KEY: 'subdeployStatuses',
|
|
50
44
|
TYPE_KEY: 'deployType',
|
|
51
45
|
SUBTASK_NAME_KEY: 'deployName',
|
|
52
46
|
};
|
|
53
|
-
|
|
47
|
+
exports.PROJECT_ERROR_TYPES = {
|
|
54
48
|
PROJECT_LOCKED: 'BuildPipelineErrorType.PROJECT_LOCKED',
|
|
55
49
|
MISSING_PROJECT_PROVISION: 'BuildPipelineErrorType.MISSING_PROJECT_PROVISION',
|
|
56
50
|
BUILD_NOT_IN_PROGRESS: 'BuildPipelineErrorType.BUILD_NOT_IN_PROGRESS',
|
|
57
51
|
SUBBUILD_FAILED: 'BuildPipelineErrorType.DEPENDENT_SUBBUILD_FAILED',
|
|
58
52
|
SUBDEPLOY_FAILED: 'DeployPipelineErrorType.DEPENDENT_SUBDEPLOY_FAILED',
|
|
59
53
|
};
|
|
60
|
-
|
|
54
|
+
exports.PROJECT_TASK_TYPES = {
|
|
61
55
|
PRIVATE_APP: 'private app',
|
|
62
56
|
PUBLIC_APP: 'public app',
|
|
63
57
|
APP_FUNCTION: 'function',
|
|
64
58
|
CRM_CARD_V2: 'card',
|
|
65
59
|
};
|
|
66
|
-
|
|
60
|
+
exports.PROJECT_COMPONENT_TYPES = {
|
|
67
61
|
PROJECTS: 'projects',
|
|
68
62
|
COMPONENTS: 'components',
|
|
69
63
|
};
|
|
70
|
-
|
|
64
|
+
exports.PLATFORM_VERSION_ERROR_TYPES = {
|
|
71
65
|
PLATFORM_VERSION_NOT_SPECIFIED: 'PlatformVersionErrorType.PLATFORM_VERSION_NOT_SPECIFIED',
|
|
72
66
|
PLATFORM_VERSION_RETIRED: 'PlatformVersionErrorType.PLATFORM_VERSION_RETIRED',
|
|
73
67
|
PLATFORM_VERSION_SPECIFIED_DOES_NOT_EXIST: 'PlatformVersionErrorType.PLATFORM_VERSION_SPECIFIED_DOES_NOT_EXIST',
|
|
74
68
|
};
|
|
75
|
-
module.exports = {
|
|
76
|
-
HUBSPOT_PROJECT_COMPONENTS_GITHUB_PATH,
|
|
77
|
-
DEFAULT_PROJECT_TEMPLATE_BRANCH,
|
|
78
|
-
FEEDBACK_OPTIONS,
|
|
79
|
-
FEEDBACK_URLS,
|
|
80
|
-
FEEDBACK_INTERVAL,
|
|
81
|
-
HUBSPOT_FOLDER,
|
|
82
|
-
MARKETPLACE_FOLDER,
|
|
83
|
-
CONFIG_FLAGS,
|
|
84
|
-
POLLING_DELAY,
|
|
85
|
-
POLLING_STATUS,
|
|
86
|
-
PROJECT_CONFIG_FILE,
|
|
87
|
-
PROJECT_BUILD_TEXT,
|
|
88
|
-
PROJECT_DEPLOY_TEXT,
|
|
89
|
-
PROJECT_ERROR_TYPES,
|
|
90
|
-
PROJECT_TASK_TYPES,
|
|
91
|
-
PROJECT_COMPONENT_TYPES,
|
|
92
|
-
PLATFORM_VERSION_ERROR_TYPES,
|
|
93
|
-
};
|
|
@@ -1,7 +1 @@
|
|
|
1
|
-
export
|
|
2
|
-
export function installPackages({ packages, installLocations }: {
|
|
3
|
-
packages: any;
|
|
4
|
-
installLocations: any;
|
|
5
|
-
}): Promise<void>;
|
|
6
|
-
export const DEFAULT_PACKAGE_MANAGER: "npm";
|
|
7
|
-
export function getProjectPackageJsonLocations(): Promise<any[]>;
|
|
1
|
+
export {};
|
|
@@ -1,7 +1 @@
|
|
|
1
|
-
export
|
|
2
|
-
export function handleDeveloperTestAccountCreateError({ err, accountId, env, portalLimit, }: {
|
|
3
|
-
err: any;
|
|
4
|
-
accountId: any;
|
|
5
|
-
env: any;
|
|
6
|
-
portalLimit: any;
|
|
7
|
-
}): void;
|
|
1
|
+
export {};
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
// @ts-nocheck
|
|
2
4
|
const { HUBSPOT_ACCOUNT_TYPES, } = require('@hubspot/local-dev-lib/constants/config');
|
|
3
5
|
const { getAccountId, getConfig } = require('@hubspot/local-dev-lib/config');
|
|
4
6
|
const { i18n } = require('./lang');
|
package/lib/enums/exitCodes.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
}
|
|
1
|
+
export declare const EXIT_CODES: {
|
|
2
|
+
readonly SUCCESS: 0;
|
|
3
|
+
readonly ERROR: 1;
|
|
4
|
+
readonly WARNING: 2;
|
|
5
|
+
};
|
package/lib/enums/exitCodes.js
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EXIT_CODES = void 0;
|
|
2
4
|
/*
|
|
3
5
|
* 0: Successful run
|
|
4
6
|
* 1: Config problem or internal error
|
|
5
7
|
* 2: Warnings or validation issues
|
|
6
8
|
*/
|
|
7
|
-
|
|
9
|
+
exports.EXIT_CODES = {
|
|
8
10
|
SUCCESS: 0,
|
|
9
11
|
ERROR: 1,
|
|
10
12
|
WARNING: 2,
|
|
11
13
|
};
|
|
12
|
-
module.exports = { EXIT_CODES };
|
|
@@ -1,19 +1 @@
|
|
|
1
|
-
export
|
|
2
|
-
/**
|
|
3
|
-
* Logs (debug) the error and context objects.
|
|
4
|
-
*
|
|
5
|
-
* @param {Error} error
|
|
6
|
-
* @param {ApiErrorContext} context
|
|
7
|
-
*/
|
|
8
|
-
export function debugError(error: Error, context?: ApiErrorContext): void;
|
|
9
|
-
export class ApiErrorContext {
|
|
10
|
-
constructor(props?: {});
|
|
11
|
-
/** @type {number} */
|
|
12
|
-
accountId: number;
|
|
13
|
-
/** @type {string} */
|
|
14
|
-
request: string;
|
|
15
|
-
/** @type {string} */
|
|
16
|
-
payload: string;
|
|
17
|
-
/** @type {string} */
|
|
18
|
-
projectName: string;
|
|
19
|
-
}
|
|
1
|
+
export {};
|
|
@@ -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 { isHubSpotHttpError, isSystemError, isFileSystemError, isValidationError, isMissingScopeError, } = require('@hubspot/local-dev-lib/errors/index');
|
|
4
6
|
const { shouldSuppressError } = require('./suppressError');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export {};
|