@hubspot/cli 5.0.2-beta.0 → 5.0.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/bin/cli.js +1 -1
- package/commands/accounts/clean.js +1 -1
- package/commands/auth.js +1 -1
- package/commands/config/set/defaultMode.js +1 -1
- package/commands/create.js +1 -1
- package/commands/customObject/create.js +1 -1
- package/commands/customObject/schema/create.js +3 -1
- package/commands/customObject/schema/delete.js +3 -1
- package/commands/customObject/schema/fetch-all.js +3 -1
- package/commands/customObject/schema/fetch.js +3 -1
- package/commands/customObject/schema/list.js +4 -2
- package/commands/customObject/schema/update.js +3 -1
- package/commands/filemanager/upload.js +2 -2
- package/commands/functions/deploy.js +1 -1
- package/commands/functions/list.js +2 -2
- package/commands/hubdb/clear.js +1 -1
- package/commands/hubdb/create.js +1 -1
- package/commands/hubdb/delete.js +1 -1
- package/commands/hubdb/fetch.js +1 -1
- package/commands/init.js +2 -2
- package/commands/lint.js +3 -5
- package/commands/list.js +1 -1
- package/commands/mv.js +1 -1
- package/commands/project/add.js +1 -1
- package/commands/project/create.js +1 -0
- package/commands/project/deploy.js +1 -1
- package/commands/project/dev.js +6 -7
- package/commands/project/download.js +1 -1
- package/commands/project/listBuilds.js +1 -1
- package/commands/project/logs.js +1 -1
- package/commands/project/upload.js +2 -4
- package/commands/project/watch.js +3 -3
- package/commands/remove.js +1 -1
- package/commands/sandbox/create.js +2 -4
- package/commands/sandbox/delete.js +7 -6
- package/commands/sandbox/sync.js +2 -6
- package/commands/secrets/addSecret.js +1 -1
- package/commands/secrets/deleteSecret.js +1 -1
- package/commands/secrets/listSecrets.js +1 -1
- package/commands/secrets/updateSecret.js +1 -1
- package/commands/upload.js +2 -2
- package/lang/en.lyaml +57 -2
- package/lib/LocalDevManager.js +7 -2
- package/lib/errorHandlers/apiErrors.js +352 -0
- package/lib/errorHandlers/fileSystemErrors.js +55 -0
- package/lib/errorHandlers/standardErrors.js +95 -0
- package/lib/getFunctionArrays.js +18 -0
- package/lib/hublValidate.js +32 -0
- package/lib/oauth.js +1 -1
- package/lib/process.js +42 -0
- package/lib/projects.js +24 -8
- package/lib/projectsWatch.js +225 -0
- package/lib/prompts/downloadProjectPrompt.js +1 -1
- package/lib/prompts/projectsLogsPrompt.js +1 -1
- package/lib/sandbox-create.js +2 -2
- package/lib/sandbox-sync.js +5 -5
- package/lib/sandboxes.js +1 -1
- package/lib/schema.js +31 -0
- package/lib/serverlessLogs.js +2 -2
- package/lib/ui.js +1 -0
- package/lib/validation.js +1 -1
- package/package.json +7 -4
package/bin/cli.js
CHANGED
|
@@ -5,7 +5,7 @@ const updateNotifier = require('update-notifier');
|
|
|
5
5
|
const chalk = require('chalk');
|
|
6
6
|
|
|
7
7
|
const { logger } = require('@hubspot/cli-lib/logger');
|
|
8
|
-
const { logErrorInstance } = require('
|
|
8
|
+
const { logErrorInstance } = require('../lib/errorHandlers/standardErrors');
|
|
9
9
|
const { setLogLevel, getCommandName } = require('../lib/commonOpts');
|
|
10
10
|
const {
|
|
11
11
|
trackHelpUsage,
|
|
@@ -21,7 +21,7 @@ const SpinniesManager = require('../../lib/SpinniesManager');
|
|
|
21
21
|
const { deleteAccount } = require('@hubspot/cli-lib/lib/config');
|
|
22
22
|
const {
|
|
23
23
|
isSpecifiedHubSpotAuthError,
|
|
24
|
-
} = require('
|
|
24
|
+
} = require('../../lib/errorHandlers/apiErrors');
|
|
25
25
|
|
|
26
26
|
const i18nKey = 'cli.commands.accounts.subcommands.clean';
|
|
27
27
|
|
package/commands/auth.js
CHANGED
|
@@ -16,7 +16,7 @@ const {
|
|
|
16
16
|
getConfig,
|
|
17
17
|
getConfigPath,
|
|
18
18
|
} = require('@hubspot/cli-lib/lib/config');
|
|
19
|
-
const { commaSeparatedValues } = require('@hubspot/
|
|
19
|
+
const { commaSeparatedValues } = require('@hubspot/local-dev-lib/text');
|
|
20
20
|
const { promptUser } = require('../lib/prompts/promptUtils');
|
|
21
21
|
const {
|
|
22
22
|
personalAccessKeyPrompt,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const { logger } = require('@hubspot/cli-lib/logger');
|
|
2
2
|
const { updateDefaultMode } = require('@hubspot/cli-lib/lib/config');
|
|
3
3
|
const { Mode } = require('@hubspot/cli-lib');
|
|
4
|
-
const { commaSeparatedValues } = require('@hubspot/
|
|
4
|
+
const { commaSeparatedValues } = require('@hubspot/local-dev-lib/text');
|
|
5
5
|
const { trackCommandUsage } = require('../../../lib/usageTracking');
|
|
6
6
|
const { promptUser } = require('../../../lib/prompts/promptUtils');
|
|
7
7
|
const { i18n } = require('../../../lib/lang');
|
package/commands/create.js
CHANGED
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
const fs = require('fs-extra');
|
|
25
25
|
const {
|
|
26
26
|
logFileSystemErrorInstance,
|
|
27
|
-
} = require('
|
|
27
|
+
} = require('../lib/errorHandlers/fileSystemErrors');
|
|
28
28
|
const { logger } = require('@hubspot/cli-lib/logger');
|
|
29
29
|
const { setLogLevel, getAccountId } = require('../lib/commonOpts');
|
|
30
30
|
const { logDebugInfo } = require('../lib/debugInfo');
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const { logger } = require('@hubspot/cli-lib/logger');
|
|
2
|
-
const { logErrorInstance } = require('
|
|
2
|
+
const { logErrorInstance } = require('../../lib/errorHandlers/standardErrors');
|
|
3
3
|
const { getAbsoluteFilePath } = require('@hubspot/cli-lib/path');
|
|
4
4
|
const {
|
|
5
5
|
isFileValidJSON,
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
const { logger } = require('@hubspot/cli-lib/logger');
|
|
2
|
-
const {
|
|
2
|
+
const {
|
|
3
|
+
logErrorInstance,
|
|
4
|
+
} = require('../../../lib/errorHandlers/standardErrors');
|
|
3
5
|
const { getAbsoluteFilePath } = require('@hubspot/cli-lib/path');
|
|
4
6
|
const {
|
|
5
7
|
isFileValidJSON,
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
const { logger } = require('@hubspot/cli-lib/logger');
|
|
2
|
-
const {
|
|
2
|
+
const {
|
|
3
|
+
logErrorInstance,
|
|
4
|
+
} = require('../../../lib/errorHandlers/standardErrors');
|
|
3
5
|
|
|
4
6
|
const { loadAndValidateOptions } = require('../../../lib/validation');
|
|
5
7
|
const { trackCommandUsage } = require('../../../lib/usageTracking');
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
const { logger } = require('@hubspot/cli-lib/logger');
|
|
2
|
-
const {
|
|
2
|
+
const {
|
|
3
|
+
logErrorInstance,
|
|
4
|
+
} = require('../../../lib/errorHandlers/standardErrors');
|
|
3
5
|
|
|
4
6
|
const { loadAndValidateOptions } = require('../../../lib/validation');
|
|
5
7
|
const { trackCommandUsage } = require('../../../lib/usageTracking');
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
const path = require('path');
|
|
2
2
|
const { isConfigFlagEnabled } = require('@hubspot/cli-lib');
|
|
3
3
|
const { logger } = require('@hubspot/cli-lib/logger');
|
|
4
|
-
const {
|
|
4
|
+
const {
|
|
5
|
+
logErrorInstance,
|
|
6
|
+
} = require('../../../lib/errorHandlers/standardErrors');
|
|
5
7
|
const { ConfigFlags } = require('@hubspot/cli-lib/lib/constants');
|
|
6
8
|
const { downloadSchema, getResolvedPath } = require('@hubspot/cli-lib/schema');
|
|
7
9
|
const { fetchSchema } = require('@hubspot/cli-lib/api/fileTransport');
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
const { logger } = require('@hubspot/cli-lib/logger');
|
|
2
|
-
const {
|
|
2
|
+
const {
|
|
3
|
+
logErrorInstance,
|
|
4
|
+
} = require('../../../lib/errorHandlers/standardErrors');
|
|
3
5
|
|
|
4
6
|
const { loadAndValidateOptions } = require('../../../lib/validation');
|
|
5
7
|
const { trackCommandUsage } = require('../../../lib/usageTracking');
|
|
6
8
|
const { getAccountId } = require('../../../lib/commonOpts');
|
|
7
|
-
const { listSchemas } = require('
|
|
9
|
+
const { listSchemas } = require('../../../lib/schema');
|
|
8
10
|
const { i18n } = require('../../../lib/lang');
|
|
9
11
|
|
|
10
12
|
const i18nKey = 'cli.commands.customObject.subcommands.schema.subcommands.list';
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
const { logger } = require('@hubspot/cli-lib/logger');
|
|
2
|
-
const {
|
|
2
|
+
const {
|
|
3
|
+
logErrorInstance,
|
|
4
|
+
} = require('../../../lib/errorHandlers/standardErrors');
|
|
3
5
|
const { getAbsoluteFilePath } = require('@hubspot/cli-lib/path');
|
|
4
6
|
const {
|
|
5
7
|
isFileValidJSON,
|
|
@@ -6,10 +6,10 @@ const { uploadFile } = require('@hubspot/cli-lib/api/fileManager');
|
|
|
6
6
|
const { getCwd, convertToUnixPath } = require('@hubspot/cli-lib/path');
|
|
7
7
|
const { logger } = require('@hubspot/cli-lib/logger');
|
|
8
8
|
const {
|
|
9
|
-
logErrorInstance,
|
|
10
9
|
ApiErrorContext,
|
|
11
10
|
logApiUploadErrorInstance,
|
|
12
|
-
} = require('
|
|
11
|
+
} = require('../../lib/errorHandlers/apiErrors');
|
|
12
|
+
const { logErrorInstance } = require('../../lib/errorHandlers/standardErrors');
|
|
13
13
|
const { validateSrcAndDestPaths } = require('@hubspot/cli-lib/modules');
|
|
14
14
|
const { shouldIgnoreFile } = require('@hubspot/cli-lib/ignoreRules');
|
|
15
15
|
|
|
@@ -9,7 +9,7 @@ const { trackCommandUsage } = require('../../lib/usageTracking');
|
|
|
9
9
|
const {
|
|
10
10
|
logApiErrorInstance,
|
|
11
11
|
ApiErrorContext,
|
|
12
|
-
} = require('
|
|
12
|
+
} = require('../../lib/errorHandlers/apiErrors');
|
|
13
13
|
const { POLLING_DELAY } = require('@hubspot/cli-lib/lib/constants');
|
|
14
14
|
const { logger } = require('@hubspot/cli-lib/logger');
|
|
15
15
|
const {
|
|
@@ -3,8 +3,8 @@ const { logger } = require('@hubspot/cli-lib/logger');
|
|
|
3
3
|
const {
|
|
4
4
|
logApiErrorInstance,
|
|
5
5
|
ApiErrorContext,
|
|
6
|
-
} = require('
|
|
7
|
-
const { getFunctionArrays } = require('
|
|
6
|
+
} = require('../../lib/errorHandlers/apiErrors');
|
|
7
|
+
const { getFunctionArrays } = require('../../lib/getFunctionArrays');
|
|
8
8
|
const {
|
|
9
9
|
getTableContents,
|
|
10
10
|
getTableHeader,
|
package/commands/hubdb/clear.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const { logger } = require('@hubspot/cli-lib/logger');
|
|
2
|
-
const { logErrorInstance } = require('
|
|
2
|
+
const { logErrorInstance } = require('../../lib/errorHandlers/standardErrors');
|
|
3
3
|
const { clearHubDbTableRows } = require('@hubspot/cli-lib/hubdb');
|
|
4
4
|
const { publishTable } = require('@hubspot/cli-lib/api/hubdb');
|
|
5
5
|
|
package/commands/hubdb/create.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const path = require('path');
|
|
2
2
|
|
|
3
3
|
const { logger } = require('@hubspot/cli-lib/logger');
|
|
4
|
-
const { logErrorInstance } = require('
|
|
4
|
+
const { logErrorInstance } = require('../../lib/errorHandlers/standardErrors');
|
|
5
5
|
const { getCwd } = require('@hubspot/cli-lib/path');
|
|
6
6
|
const { createHubDbTable } = require('@hubspot/cli-lib/hubdb');
|
|
7
7
|
|
package/commands/hubdb/delete.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const { logger } = require('@hubspot/cli-lib/logger');
|
|
2
|
-
const { logErrorInstance } = require('
|
|
2
|
+
const { logErrorInstance } = require('../../lib/errorHandlers/standardErrors');
|
|
3
3
|
const { deleteTable } = require('@hubspot/cli-lib/api/hubdb');
|
|
4
4
|
const { loadAndValidateOptions } = require('../../lib/validation');
|
|
5
5
|
const { trackCommandUsage } = require('../../lib/usageTracking');
|
package/commands/hubdb/fetch.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const { logger } = require('@hubspot/cli-lib/logger');
|
|
2
|
-
const { logErrorInstance } = require('
|
|
2
|
+
const { logErrorInstance } = require('../../lib/errorHandlers/standardErrors');
|
|
3
3
|
const { downloadHubDbTable } = require('@hubspot/cli-lib/hubdb');
|
|
4
4
|
|
|
5
5
|
const { loadAndValidateOptions } = require('../../lib/validation');
|
package/commands/init.js
CHANGED
|
@@ -7,9 +7,9 @@ const {
|
|
|
7
7
|
updateDefaultAccount,
|
|
8
8
|
} = require('@hubspot/cli-lib/lib/config');
|
|
9
9
|
const { addConfigOptions } = require('../lib/commonOpts');
|
|
10
|
-
const { handleExit } = require('
|
|
10
|
+
const { handleExit } = require('../lib/process');
|
|
11
11
|
const { checkAndUpdateGitignore } = require('@hubspot/cli-lib/lib/git');
|
|
12
|
-
const { logErrorInstance } = require('
|
|
12
|
+
const { logErrorInstance } = require('../lib/errorHandlers/standardErrors');
|
|
13
13
|
const {
|
|
14
14
|
DEFAULT_HUBSPOT_CONFIG_YAML_FILE_NAME,
|
|
15
15
|
PERSONAL_ACCESS_KEY_AUTH_METHOD,
|
package/commands/lint.js
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
const {
|
|
2
|
-
|
|
3
|
-
printHublValidationResult,
|
|
4
|
-
} = require('@hubspot/cli-lib/validate');
|
|
1
|
+
const { lint } = require('@hubspot/cli-lib/validate');
|
|
2
|
+
const { printHublValidationResult } = require('../lib/hublValidate');
|
|
5
3
|
const { logger } = require('@hubspot/cli-lib/logger');
|
|
6
|
-
const { logErrorInstance } = require('
|
|
4
|
+
const { logErrorInstance } = require('../lib/errorHandlers/standardErrors');
|
|
7
5
|
|
|
8
6
|
const {
|
|
9
7
|
addConfigOptions,
|
package/commands/list.js
CHANGED
|
@@ -12,7 +12,7 @@ const { logger } = require('@hubspot/cli-lib/logger');
|
|
|
12
12
|
const {
|
|
13
13
|
logApiErrorInstance,
|
|
14
14
|
ApiErrorContext,
|
|
15
|
-
} = require('
|
|
15
|
+
} = require('../lib/errorHandlers/apiErrors');
|
|
16
16
|
const {
|
|
17
17
|
getDirectoryContentsByPath,
|
|
18
18
|
} = require('@hubspot/cli-lib/api/fileMapper');
|
package/commands/mv.js
CHANGED
package/commands/project/add.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const { logger } = require('@hubspot/cli-lib/logger');
|
|
2
2
|
const { getAccountId } = require('@hubspot/cli-lib/lib/config');
|
|
3
|
-
const { logErrorInstance } = require('
|
|
3
|
+
const { logErrorInstance } = require('../../lib/errorHandlers/standardErrors');
|
|
4
4
|
const { fetchReleaseData } = require('@hubspot/cli-lib/github');
|
|
5
5
|
|
|
6
6
|
const { trackCommandUsage } = require('../../lib/usageTracking');
|
|
@@ -9,7 +9,7 @@ const { trackCommandUsage } = require('../../lib/usageTracking');
|
|
|
9
9
|
const {
|
|
10
10
|
logApiErrorInstance,
|
|
11
11
|
ApiErrorContext,
|
|
12
|
-
} = require('
|
|
12
|
+
} = require('../../lib/errorHandlers/apiErrors');
|
|
13
13
|
const { logger } = require('@hubspot/cli-lib/logger');
|
|
14
14
|
const { deployProject, fetchProject } = require('@hubspot/cli-lib/api/dfs');
|
|
15
15
|
const { loadAndValidateOptions } = require('../../lib/validation');
|
package/commands/project/dev.js
CHANGED
|
@@ -10,11 +10,11 @@ const {
|
|
|
10
10
|
trackCommandMetadataUsage,
|
|
11
11
|
} = require('../../lib/usageTracking');
|
|
12
12
|
const { loadAndValidateOptions } = require('../../lib/validation');
|
|
13
|
+
const { handleExit } = require('../../lib/process');
|
|
13
14
|
const { i18n } = require('../../lib/lang');
|
|
14
15
|
const { logger } = require('@hubspot/cli-lib/logger');
|
|
15
16
|
const { getConfigAccounts } = require('@hubspot/cli-lib/lib/config');
|
|
16
17
|
const { createProject, fetchProject } = require('@hubspot/cli-lib/api/dfs');
|
|
17
|
-
const { handleExit } = require('@hubspot/cli-lib/lib/process');
|
|
18
18
|
const {
|
|
19
19
|
getProjectConfig,
|
|
20
20
|
ensureProjectExists,
|
|
@@ -50,18 +50,17 @@ const {
|
|
|
50
50
|
PROJECT_DEPLOY_TEXT,
|
|
51
51
|
ERROR_TYPES,
|
|
52
52
|
} = require('@hubspot/cli-lib/lib/constants');
|
|
53
|
-
|
|
54
|
-
logErrorInstance,
|
|
55
|
-
logApiErrorInstance,
|
|
56
|
-
ApiErrorContext,
|
|
57
|
-
} = require('@hubspot/cli-lib/errorHandlers');
|
|
53
|
+
|
|
58
54
|
const { buildSandbox } = require('../../lib/sandbox-create');
|
|
59
55
|
const { syncSandbox } = require('../../lib/sandbox-sync');
|
|
60
56
|
const { getHubSpotWebsiteOrigin } = require('@hubspot/cli-lib/lib/urls');
|
|
61
57
|
const {
|
|
58
|
+
logApiErrorInstance,
|
|
59
|
+
ApiErrorContext,
|
|
62
60
|
isMissingScopeError,
|
|
63
61
|
isSpecifiedError,
|
|
64
|
-
} = require('
|
|
62
|
+
} = require('../../lib/errorHandlers/apiErrors');
|
|
63
|
+
const { logErrorInstance } = require('../../lib/errorHandlers/standardErrors');
|
|
65
64
|
|
|
66
65
|
const i18nKey = 'cli.commands.project.subcommands.dev';
|
|
67
66
|
|
|
@@ -10,7 +10,7 @@ const { getCwd } = require('@hubspot/cli-lib/path');
|
|
|
10
10
|
const {
|
|
11
11
|
logApiErrorInstance,
|
|
12
12
|
ApiErrorContext,
|
|
13
|
-
} = require('
|
|
13
|
+
} = require('../../lib/errorHandlers/apiErrors');
|
|
14
14
|
const { logger } = require('@hubspot/cli-lib/logger');
|
|
15
15
|
const { extractZipArchive } = require('@hubspot/cli-lib/archive');
|
|
16
16
|
const {
|
|
@@ -11,7 +11,7 @@ const { i18n } = require('../../lib/lang');
|
|
|
11
11
|
const {
|
|
12
12
|
logApiErrorInstance,
|
|
13
13
|
ApiErrorContext,
|
|
14
|
-
} = require('
|
|
14
|
+
} = require('../../lib/errorHandlers/apiErrors');
|
|
15
15
|
const { logger } = require('@hubspot/cli-lib/logger');
|
|
16
16
|
const {
|
|
17
17
|
fetchProject,
|
package/commands/project/logs.js
CHANGED
|
@@ -21,13 +21,11 @@ const {
|
|
|
21
21
|
const { i18n } = require('../../lib/lang');
|
|
22
22
|
const { getAccountConfig } = require('@hubspot/cli-lib');
|
|
23
23
|
const { ERROR_TYPES } = require('@hubspot/cli-lib/lib/constants');
|
|
24
|
-
const {
|
|
25
|
-
isSpecifiedError,
|
|
26
|
-
} = require('@hubspot/cli-lib/errorHandlers/apiErrors');
|
|
27
24
|
const {
|
|
28
25
|
logApiErrorInstance,
|
|
29
26
|
ApiErrorContext,
|
|
30
|
-
|
|
27
|
+
isSpecifiedError,
|
|
28
|
+
} = require('../../lib/errorHandlers/apiErrors');
|
|
31
29
|
const { EXIT_CODES } = require('../../lib/enums/exitCodes');
|
|
32
30
|
|
|
33
31
|
const i18nKey = 'cli.commands.project.subcommands.upload';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
const { i18n } = require('../../lib/lang');
|
|
2
|
-
const { createWatcher } = require('
|
|
2
|
+
const { createWatcher } = require('../../lib/projectsWatch');
|
|
3
3
|
const {
|
|
4
4
|
logApiErrorInstance,
|
|
5
5
|
ApiErrorContext,
|
|
6
|
-
} = require('
|
|
6
|
+
} = require('../../lib/errorHandlers/apiErrors');
|
|
7
7
|
const { logger } = require('@hubspot/cli-lib/logger');
|
|
8
8
|
const { ERROR_TYPES } = require('@hubspot/cli-lib/lib/constants');
|
|
9
9
|
const {
|
|
@@ -30,7 +30,7 @@ const {
|
|
|
30
30
|
} = require('@hubspot/cli-lib/api/dfs');
|
|
31
31
|
const { loadAndValidateOptions } = require('../../lib/validation');
|
|
32
32
|
const { EXIT_CODES } = require('../../lib/enums/exitCodes');
|
|
33
|
-
const { handleKeypress, handleExit } = require('
|
|
33
|
+
const { handleKeypress, handleExit } = require('../../lib/process');
|
|
34
34
|
|
|
35
35
|
const i18nKey = 'cli.commands.project.subcommands.watch';
|
|
36
36
|
|
package/commands/remove.js
CHANGED
|
@@ -32,10 +32,8 @@ const {
|
|
|
32
32
|
} = require('../../lib/prompts/sandboxesPrompt');
|
|
33
33
|
const { promptUser } = require('../../lib/prompts/promptUtils');
|
|
34
34
|
const { syncSandbox } = require('../../lib/sandbox-sync');
|
|
35
|
-
const { logErrorInstance } = require('
|
|
36
|
-
const {
|
|
37
|
-
isMissingScopeError,
|
|
38
|
-
} = require('@hubspot/cli-lib/errorHandlers/apiErrors');
|
|
35
|
+
const { logErrorInstance } = require('../../lib/errorHandlers/standardErrors');
|
|
36
|
+
const { isMissingScopeError } = require('../../lib/errorHandlers/apiErrors');
|
|
39
37
|
const { getHubSpotWebsiteOrigin } = require('@hubspot/cli-lib/lib/urls');
|
|
40
38
|
|
|
41
39
|
const i18nKey = 'cli.commands.sandbox.subcommands.create';
|
|
@@ -9,9 +9,13 @@ const { logger } = require('@hubspot/cli-lib/logger');
|
|
|
9
9
|
const { trackCommandUsage } = require('../../lib/usageTracking');
|
|
10
10
|
const { loadAndValidateOptions } = require('../../lib/validation');
|
|
11
11
|
const {
|
|
12
|
+
logErrorInstance,
|
|
12
13
|
debugErrorAndContext,
|
|
13
|
-
} = require('
|
|
14
|
-
const {
|
|
14
|
+
} = require('../../lib/errorHandlers/standardErrors');
|
|
15
|
+
const {
|
|
16
|
+
isSpecifiedError,
|
|
17
|
+
isSpecifiedHubSpotAuthError,
|
|
18
|
+
} = require('../../lib/errorHandlers/apiErrors');
|
|
15
19
|
const { deleteSandbox } = require('@hubspot/cli-lib/sandboxes');
|
|
16
20
|
const { i18n } = require('../../lib/lang');
|
|
17
21
|
const { getConfig, getEnv, getAccountConfig } = require('@hubspot/cli-lib');
|
|
@@ -26,10 +30,7 @@ const {
|
|
|
26
30
|
const { EXIT_CODES } = require('../../lib/enums/exitCodes');
|
|
27
31
|
const { promptUser } = require('../../lib/prompts/promptUtils');
|
|
28
32
|
const { getHubSpotWebsiteOrigin } = require('@hubspot/cli-lib/lib/urls');
|
|
29
|
-
|
|
30
|
-
isSpecifiedError,
|
|
31
|
-
isSpecifiedHubSpotAuthError,
|
|
32
|
-
} = require('@hubspot/cli-lib/errorHandlers/apiErrors');
|
|
33
|
+
|
|
33
34
|
const { getAccountName } = require('../../lib/sandboxes');
|
|
34
35
|
const { getValidEnv } = require('@hubspot/cli-lib/lib/environment');
|
|
35
36
|
|
package/commands/sandbox/sync.js
CHANGED
|
@@ -24,12 +24,8 @@ const {
|
|
|
24
24
|
} = require('../../lib/sandboxes');
|
|
25
25
|
const { syncSandbox } = require('../../lib/sandbox-sync');
|
|
26
26
|
const { getValidEnv } = require('@hubspot/cli-lib/lib/environment');
|
|
27
|
-
const {
|
|
28
|
-
|
|
29
|
-
} = require('@hubspot/cli-lib/errorHandlers/apiErrors');
|
|
30
|
-
const {
|
|
31
|
-
logErrorInstance,
|
|
32
|
-
} = require('@hubspot/cli-lib/errorHandlers/standardErrors');
|
|
27
|
+
const { isSpecifiedError } = require('../../lib/errorHandlers/apiErrors');
|
|
28
|
+
const { logErrorInstance } = require('../../lib/errorHandlers/standardErrors');
|
|
33
29
|
|
|
34
30
|
const i18nKey = 'cli.commands.sandbox.subcommands.sync';
|
|
35
31
|
|
|
@@ -2,7 +2,7 @@ const { logger } = require('@hubspot/cli-lib/logger');
|
|
|
2
2
|
const {
|
|
3
3
|
logServerlessFunctionApiErrorInstance,
|
|
4
4
|
ApiErrorContext,
|
|
5
|
-
} = require('
|
|
5
|
+
} = require('../../lib/errorHandlers/apiErrors');
|
|
6
6
|
const { addSecret } = require('@hubspot/cli-lib/api/secrets');
|
|
7
7
|
|
|
8
8
|
const { loadAndValidateOptions } = require('../../lib/validation');
|
|
@@ -2,7 +2,7 @@ const { logger } = require('@hubspot/cli-lib/logger');
|
|
|
2
2
|
const {
|
|
3
3
|
logServerlessFunctionApiErrorInstance,
|
|
4
4
|
ApiErrorContext,
|
|
5
|
-
} = require('
|
|
5
|
+
} = require('../../lib/errorHandlers/apiErrors');
|
|
6
6
|
const { deleteSecret } = require('@hubspot/cli-lib/api/secrets');
|
|
7
7
|
|
|
8
8
|
const { loadAndValidateOptions } = require('../../lib/validation');
|
|
@@ -2,7 +2,7 @@ const { logger } = require('@hubspot/cli-lib/logger');
|
|
|
2
2
|
const {
|
|
3
3
|
logServerlessFunctionApiErrorInstance,
|
|
4
4
|
ApiErrorContext,
|
|
5
|
-
} = require('
|
|
5
|
+
} = require('../../lib/errorHandlers/apiErrors');
|
|
6
6
|
const { fetchSecrets } = require('@hubspot/cli-lib/api/secrets');
|
|
7
7
|
|
|
8
8
|
const { loadAndValidateOptions } = require('../../lib/validation');
|
|
@@ -2,7 +2,7 @@ const { logger } = require('@hubspot/cli-lib/logger');
|
|
|
2
2
|
const {
|
|
3
3
|
logServerlessFunctionApiErrorInstance,
|
|
4
4
|
ApiErrorContext,
|
|
5
|
-
} = require('
|
|
5
|
+
} = require('../../lib/errorHandlers/apiErrors');
|
|
6
6
|
const { updateSecret } = require('@hubspot/cli-lib/api/secrets');
|
|
7
7
|
|
|
8
8
|
const { loadAndValidateOptions } = require('../../lib/validation');
|
package/commands/upload.js
CHANGED
|
@@ -10,10 +10,10 @@ const {
|
|
|
10
10
|
} = require('@hubspot/cli-lib/path');
|
|
11
11
|
const { logger } = require('@hubspot/cli-lib/logger');
|
|
12
12
|
const {
|
|
13
|
-
logErrorInstance,
|
|
14
13
|
ApiErrorContext,
|
|
15
14
|
logApiUploadErrorInstance,
|
|
16
|
-
} = require('
|
|
15
|
+
} = require('../lib/errorHandlers/apiErrors');
|
|
16
|
+
const { logErrorInstance } = require('../lib/errorHandlers/standardErrors');
|
|
17
17
|
const { validateSrcAndDestPaths } = require('@hubspot/cli-lib/modules');
|
|
18
18
|
const { shouldIgnoreFile } = require('@hubspot/cli-lib/ignoreRules');
|
|
19
19
|
|
package/lang/en.lyaml
CHANGED
|
@@ -587,12 +587,31 @@ en:
|
|
|
587
587
|
default: "Watch a project within the myProjectFolder folder"
|
|
588
588
|
logs:
|
|
589
589
|
processExited: "Stopping watcher..."
|
|
590
|
+
watchCancelledFromUi: "The watch process has been cancelled from the UI. Any changes made since cancelling have not been uploaded. To resume watching, rerun {{#yellow}}`hs project watch`{{/yellow}}."
|
|
591
|
+
resuming: "Resuming watcher..."
|
|
592
|
+
uploadSucceeded: "Uploaded file \"{{ filePath }}\" to \"{{ remotePath }}\""
|
|
593
|
+
deleteFileSucceeded: "Deleted file \"{{ remotePath }}\""
|
|
594
|
+
deleteFolderSucceeded: "Deleted folder \"{{ remotePath }}\""
|
|
595
|
+
watching: "Watcher is ready and watching \"{{ projectDir }}\". Any changes detected will be automatically uploaded."
|
|
596
|
+
previousStagingBuildCancelled: "Killed the previous watch process. Please try running `hs project watch` again"
|
|
590
597
|
positionals:
|
|
591
598
|
path:
|
|
592
599
|
describe: "Path to a project folder"
|
|
593
600
|
options:
|
|
594
601
|
initialUpload:
|
|
595
602
|
describe: "Upload directory before watching for updates"
|
|
603
|
+
debug:
|
|
604
|
+
pause: "Pausing watcher, attempting to queue build"
|
|
605
|
+
buildStarted: "Build queued."
|
|
606
|
+
extensionNotAllowed: "Skipping \"{{ filePath }}\" due to unsupported extension"
|
|
607
|
+
ignored: "Skipping \"{{ filePath }}\" due to an ignore rule"
|
|
608
|
+
uploading: "Attempting to upload file \"{{ filePath }}\" to \"{{ remotePath }}\""
|
|
609
|
+
attemptNewBuild: "Attempting to create a new build"
|
|
610
|
+
fileAlreadyQueued: "File \"{{ filePath }}\" is already queued for upload"
|
|
611
|
+
errors:
|
|
612
|
+
uploadFailed: "Failed to upload file \"{{ filePath }}\" to \"{{ remotePath }}\""
|
|
613
|
+
deleteFileFailed: "Failed to delete file \"{{ remotePath }}\""
|
|
614
|
+
deleteFolderFailed: "Failed to delete folder \"{{ remotePath }}\""
|
|
596
615
|
download:
|
|
597
616
|
describe: "Download your project files from HubSpot and write to a path on your computer"
|
|
598
617
|
examples:
|
|
@@ -874,7 +893,7 @@ en:
|
|
|
874
893
|
failedToInitialize: "Missing required arguments to initialize Local Dev"
|
|
875
894
|
noDeployedBuild: "There is no deployed build for this project in {{ accountIdentifier }}. Run {{ uploadCommand }} to upload and deploy your project."
|
|
876
895
|
noComponents: "There are no components in this project."
|
|
877
|
-
noRunnableComponents: "
|
|
896
|
+
noRunnableComponents: "No supported components were found under {{#bold}}{{ projectSourceDir }}{{/bold}}. Run {{ command }} to see a list of available components."
|
|
878
897
|
betaMessage: "HubSpot projects local development"
|
|
879
898
|
running: "Running {{#bold}}{{ projectName }}{{/bold}} locally on {{ accountIdentifier }}, waiting for changes ..."
|
|
880
899
|
quitHelper: "Press {{#bold}}'q'{{/bold}} to stop the local dev server"
|
|
@@ -885,7 +904,7 @@ en:
|
|
|
885
904
|
uploadWarning:
|
|
886
905
|
appLabel: "[App]"
|
|
887
906
|
uiExtensionLabel: "[UI Extension]"
|
|
888
|
-
missingComponents: "
|
|
907
|
+
missingComponents: "Couldn't find the following components in the deployed build for this project: {{#bold}}'{{ missingComponents }}'{{/bold}}. This may cause issues in local development."
|
|
889
908
|
defaultWarning: "Changing project configuration requires a new project build."
|
|
890
909
|
header: "{{ warning }} To reflect these changes and continue testing:"
|
|
891
910
|
stopDev: " * Stop {{ command }}"
|
|
@@ -907,6 +926,7 @@ en:
|
|
|
907
926
|
emptySource: "Source directory \"{{ srcDir }}\" is empty. Add files to your project and rerun `{{#yellow}}hs project upload{{/yellow}}` to upload them to HubSpot."
|
|
908
927
|
compressed: "Project files compressed: {{ byteCount }} bytes"
|
|
909
928
|
compressing: "Compressing build files to \"{{ path }}\""
|
|
929
|
+
fileFiltered: "Ignore rule triggered for \"{{ filename }}\""
|
|
910
930
|
ensureProjectExists:
|
|
911
931
|
createPrompt: "The project {{ projectName }} does not exist in {{ accountIdentifier }}. Would you like to create it?"
|
|
912
932
|
createSuccess: "New project {{#bold}}{{ projectName }}{{/bold}} successfully created in {{#bold}}{{ accountIdentifier }}{{/bold}}."
|
|
@@ -974,6 +994,10 @@ en:
|
|
|
974
994
|
sandboxSyncStandardCommand:
|
|
975
995
|
command: "hs sandbox sync"
|
|
976
996
|
message: "Run {{ command }} to to update all supported assets to your sandbox from production"
|
|
997
|
+
sampleProjects:
|
|
998
|
+
linkText: "HubSpot's sample projects"
|
|
999
|
+
url: "https://developers.hubspot.com/docs/platform/sample-projects?utm_source=cli&utm_content=project_create_whats_next"
|
|
1000
|
+
message: "See {{ link }}"
|
|
977
1001
|
commonOpts:
|
|
978
1002
|
options:
|
|
979
1003
|
portal:
|
|
@@ -1239,6 +1263,37 @@ en:
|
|
|
1239
1263
|
label: "Lead Flows"
|
|
1240
1264
|
marketing-email:
|
|
1241
1265
|
label: "Marketing emails"
|
|
1266
|
+
errorHandlers:
|
|
1267
|
+
standardErrors:
|
|
1268
|
+
errorOccurred: "Error: {{ error }}"
|
|
1269
|
+
errorContext: "Context: {{ context }}"
|
|
1270
|
+
systemErrorOccurred: "A system error has occurred: {{ errorMessage }}"
|
|
1271
|
+
genericErrorOccurred: "A {{ name }} has occurred."
|
|
1272
|
+
unknownErrorOccurred: "An unknown error has occurred"
|
|
1273
|
+
fileSystemErrors:
|
|
1274
|
+
errorOccurred: "An error occurred while {{ fileAction }} {{ filepath }}."
|
|
1275
|
+
errorExplanation: "This is the result of a system error: {{ errorMessage }}"
|
|
1276
|
+
apiErrors:
|
|
1277
|
+
messageDetail: "{{ request }} in account {{ accountId }}"
|
|
1278
|
+
unableToUpload: 'Unable to upload "{{ payload }}.'
|
|
1279
|
+
codes:
|
|
1280
|
+
400: "The {{ messageDetail }} was bad."
|
|
1281
|
+
401: "The {{ messageDetail }} was unauthorized."
|
|
1282
|
+
403MissingScope: "Couldn't run the project command because there are scopes missing in your production account. To update scopes, deactivate your current personal access key for {{ accountId }}, and generate a new one. Then run `hs auth` to update the CLI with the new key."
|
|
1283
|
+
403Gating: "The current target account {{ accountId }} does not have access to HubSpot projects. To opt in to the CRM Development Beta and use projects, visit https://app.hubspot.com/l/whats-new/betas?productUpdateId=13860216."
|
|
1284
|
+
403: "The {{ messageDetail }} was forbidden."
|
|
1285
|
+
404Request: 'The {{ action }} failed because "{{ request }}" was not found in account {{ accountId }}.'
|
|
1286
|
+
404: "The {{ messageDetail }} was not found."
|
|
1287
|
+
429: "The {{ messageDetail }} surpassed the rate limit. Retry in one minute."
|
|
1288
|
+
503: "The {{ messageDetail }} could not be handled at this time. Please try again or visit https://help.hubspot.com/ to submit a ticket or contact HubSpot Support if the issue persists."
|
|
1289
|
+
500generic: "The {{ messageDetail }} failed due to a server error. Please try again or visit https://help.hubspot.com/ to submit a ticket or contact HubSpot Support if the issue persists."
|
|
1290
|
+
400generic: "The {{ messageDetail }} failed due to a client error."
|
|
1291
|
+
generic: "The {{ messageDetail }} failed."
|
|
1292
|
+
verifyAccessKeyAndUserAccess:
|
|
1293
|
+
fetchScopeDataError: "Error verifying access of scopeGroup {{ scopeGroup }}: {{ error }}"
|
|
1294
|
+
portalMissingScope: "Your account does not have access to this action. Talk to an account admin to request it."
|
|
1295
|
+
userMissingScope: "You don't have access to this action. Ask an account admin to change your permissions in Users & Teams settings."
|
|
1296
|
+
genericMissingScope: "Your access key does not allow this action. Please generate a new access key by running `hs auth personalaccesskey`."
|
|
1242
1297
|
|
|
1243
1298
|
|
|
1244
1299
|
|