@hubspot/cli 4.0.2-beta.3 → 4.0.2-beta.4
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/commands/accounts/list.js +1 -1
- package/commands/accounts/rename.js +1 -1
- package/commands/accounts/use.js +1 -1
- package/commands/config/set/allowUsageTracking.js +1 -1
- package/commands/config/set/defaultMode.js +1 -1
- package/commands/config/set/httpTimeout.js +1 -1
- package/commands/config/set.js +1 -1
- package/commands/create.js +2 -6
- package/commands/filemanager/fetch.js +1 -1
- package/commands/functions/deploy.js +1 -1
- package/commands/functions/list.js +1 -2
- package/commands/functions/server.js +1 -1
- 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/lint.js +1 -1
- package/commands/list.js +1 -1
- package/commands/module/marketplace-validate.js +1 -1
- package/commands/mv.js +1 -1
- package/commands/open.js +1 -1
- package/commands/project/create.js +1 -1
- package/commands/project/deploy.js +4 -1
- package/commands/project/download.js +1 -1
- package/commands/project/listBuilds.js +1 -1
- package/commands/project/logs.js +1 -1
- package/commands/project/open.js +1 -1
- package/commands/project/upload.js +4 -1
- package/commands/project/watch.js +1 -1
- package/commands/remove.js +1 -1
- package/commands/sandbox/create.js +1 -3
- package/commands/sandbox/delete.js +1 -3
- 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/theme/marketplace-validate.js +1 -1
- package/package.json +4 -4
|
@@ -72,7 +72,7 @@ exports.handler = async options => {
|
|
|
72
72
|
|
|
73
73
|
const accountId = getAccountId(options);
|
|
74
74
|
|
|
75
|
-
trackCommandUsage('accounts-list',
|
|
75
|
+
trackCommandUsage('accounts-list', null, accountId);
|
|
76
76
|
|
|
77
77
|
const config = getConfig();
|
|
78
78
|
const configPath = getConfigPath();
|
|
@@ -21,7 +21,7 @@ exports.handler = async options => {
|
|
|
21
21
|
const { accountName, newName } = options;
|
|
22
22
|
const accountId = getAccountId(options);
|
|
23
23
|
|
|
24
|
-
trackCommandUsage('accounts-rename',
|
|
24
|
+
trackCommandUsage('accounts-rename', null, accountId);
|
|
25
25
|
|
|
26
26
|
await renameAccount(accountName, newName);
|
|
27
27
|
|
package/commands/accounts/use.js
CHANGED
|
@@ -33,7 +33,7 @@ const enableOrDisableUsageTracking = async () => {
|
|
|
33
33
|
};
|
|
34
34
|
|
|
35
35
|
const setAllowUsageTracking = async ({ accountId, allowUsageTracking }) => {
|
|
36
|
-
trackCommandUsage('config-set-allow-usage-tracking',
|
|
36
|
+
trackCommandUsage('config-set-allow-usage-tracking', null, accountId);
|
|
37
37
|
|
|
38
38
|
let isEnabled;
|
|
39
39
|
|
|
@@ -27,7 +27,7 @@ const selectMode = async () => {
|
|
|
27
27
|
};
|
|
28
28
|
|
|
29
29
|
const setDefaultMode = async ({ accountId, defaultMode }) => {
|
|
30
|
-
trackCommandUsage('config-set-default-mode',
|
|
30
|
+
trackCommandUsage('config-set-default-mode', null, accountId);
|
|
31
31
|
|
|
32
32
|
let newDefault;
|
|
33
33
|
|
|
@@ -20,7 +20,7 @@ const enterTimeout = async () => {
|
|
|
20
20
|
};
|
|
21
21
|
|
|
22
22
|
const setHttpTimeout = async ({ accountId, httpTimeout }) => {
|
|
23
|
-
trackCommandUsage('config-set-http-timeout',
|
|
23
|
+
trackCommandUsage('config-set-http-timeout', null, accountId);
|
|
24
24
|
|
|
25
25
|
let newHttpTimeout;
|
|
26
26
|
|
package/commands/config/set.js
CHANGED
|
@@ -54,7 +54,7 @@ exports.handler = async options => {
|
|
|
54
54
|
|
|
55
55
|
const accountId = getAccountId(options);
|
|
56
56
|
|
|
57
|
-
trackCommandUsage('config-set',
|
|
57
|
+
trackCommandUsage('config-set', null, accountId);
|
|
58
58
|
|
|
59
59
|
const configUpdated = await handleConfigUpdate(accountId, options);
|
|
60
60
|
|
package/commands/create.js
CHANGED
|
@@ -93,13 +93,9 @@ exports.handler = async options => {
|
|
|
93
93
|
|
|
94
94
|
if (asset.validate && !asset.validate(argsToPass)) return;
|
|
95
95
|
|
|
96
|
-
|
|
96
|
+
await asset.execute(argsToPass);
|
|
97
97
|
|
|
98
|
-
trackCommandUsage(
|
|
99
|
-
'create',
|
|
100
|
-
{ assetType, ...additionalTracking },
|
|
101
|
-
getAccountId(options)
|
|
102
|
-
);
|
|
98
|
+
trackCommandUsage('create', { assetType }, getAccountId(options));
|
|
103
99
|
};
|
|
104
100
|
|
|
105
101
|
exports.builder = yargs => {
|
|
@@ -32,7 +32,7 @@ exports.handler = async options => {
|
|
|
32
32
|
|
|
33
33
|
const accountId = getAccountId(options);
|
|
34
34
|
|
|
35
|
-
trackCommandUsage('filemanager-fetch',
|
|
35
|
+
trackCommandUsage('filemanager-fetch', null, accountId);
|
|
36
36
|
|
|
37
37
|
// Fetch and write file/folder.
|
|
38
38
|
await downloadFileOrFolder(accountId, src, dest, options);
|
|
@@ -50,7 +50,7 @@ exports.handler = async options => {
|
|
|
50
50
|
const splitFunctionPath = functionPath.split('.');
|
|
51
51
|
let spinner;
|
|
52
52
|
|
|
53
|
-
trackCommandUsage('functions-deploy',
|
|
53
|
+
trackCommandUsage('functions-deploy', null, accountId);
|
|
54
54
|
|
|
55
55
|
if (
|
|
56
56
|
!splitFunctionPath.length ||
|
|
@@ -29,10 +29,9 @@ exports.describe = i18n(`${i18nKey}.describe`);
|
|
|
29
29
|
exports.handler = async options => {
|
|
30
30
|
loadAndValidateOptions(options);
|
|
31
31
|
|
|
32
|
-
const { json, compact } = options;
|
|
33
32
|
const accountId = getAccountId(options);
|
|
34
33
|
|
|
35
|
-
trackCommandUsage('functions-list',
|
|
34
|
+
trackCommandUsage('functions-list', null, accountId);
|
|
36
35
|
|
|
37
36
|
logger.debug(i18n(`${i18nKey}.debug.gettingFunctions`));
|
|
38
37
|
|
|
@@ -21,7 +21,7 @@ exports.handler = async options => {
|
|
|
21
21
|
const { path: functionPath } = options;
|
|
22
22
|
const accountId = getAccountId(options);
|
|
23
23
|
|
|
24
|
-
trackCommandUsage('functions-server',
|
|
24
|
+
trackCommandUsage('functions-server', null, accountId);
|
|
25
25
|
|
|
26
26
|
logger.debug(
|
|
27
27
|
i18n(`${i18nKey}.debug.startingServer`, {
|
package/commands/hubdb/clear.js
CHANGED
|
@@ -26,7 +26,7 @@ exports.handler = async options => {
|
|
|
26
26
|
|
|
27
27
|
const accountId = getAccountId(options);
|
|
28
28
|
|
|
29
|
-
trackCommandUsage('hubdb-clear',
|
|
29
|
+
trackCommandUsage('hubdb-clear', null, accountId);
|
|
30
30
|
|
|
31
31
|
try {
|
|
32
32
|
const { deletedRowCount } = await clearHubDbTableRows(accountId, tableId);
|
package/commands/hubdb/create.js
CHANGED
package/commands/hubdb/delete.js
CHANGED
package/commands/hubdb/fetch.js
CHANGED
|
@@ -25,7 +25,7 @@ exports.handler = async options => {
|
|
|
25
25
|
|
|
26
26
|
const accountId = getAccountId(options);
|
|
27
27
|
|
|
28
|
-
trackCommandUsage('hubdb-fetch',
|
|
28
|
+
trackCommandUsage('hubdb-fetch', null, accountId);
|
|
29
29
|
|
|
30
30
|
try {
|
|
31
31
|
const { filePath } = await downloadHubDbTable(accountId, tableId, dest);
|
package/commands/lint.js
CHANGED
package/commands/list.js
CHANGED
|
@@ -37,7 +37,7 @@ exports.handler = async options => {
|
|
|
37
37
|
const accountId = getAccountId(options);
|
|
38
38
|
let contentsResp;
|
|
39
39
|
|
|
40
|
-
trackCommandUsage('list',
|
|
40
|
+
trackCommandUsage('list', null, accountId);
|
|
41
41
|
|
|
42
42
|
logger.debug(
|
|
43
43
|
i18n(`${i18nKey}.gettingPathContents`, {
|
package/commands/mv.js
CHANGED
|
@@ -36,7 +36,7 @@ exports.handler = async options => {
|
|
|
36
36
|
const { srcPath, destPath } = options;
|
|
37
37
|
const accountId = getAccountId(options);
|
|
38
38
|
|
|
39
|
-
trackCommandUsage('mv',
|
|
39
|
+
trackCommandUsage('mv', null, accountId);
|
|
40
40
|
|
|
41
41
|
try {
|
|
42
42
|
await moveFile(accountId, srcPath, getCorrectedDestPath(srcPath, destPath));
|
package/commands/open.js
CHANGED
|
@@ -34,7 +34,7 @@ exports.handler = async options => {
|
|
|
34
34
|
const { shortcut, list } = options;
|
|
35
35
|
const accountId = getAccountId(options);
|
|
36
36
|
|
|
37
|
-
trackCommandUsage('open',
|
|
37
|
+
trackCommandUsage('open', null, accountId);
|
|
38
38
|
|
|
39
39
|
if (shortcut === undefined && !list) {
|
|
40
40
|
const choice = await createListPrompt(accountId);
|
|
@@ -30,7 +30,7 @@ exports.handler = async options => {
|
|
|
30
30
|
|
|
31
31
|
const { name, template, location } = await createProjectPrompt(options);
|
|
32
32
|
|
|
33
|
-
trackCommandUsage('project-create',
|
|
33
|
+
trackCommandUsage('project-create', null, accountId);
|
|
34
34
|
|
|
35
35
|
await createProjectConfig(
|
|
36
36
|
path.resolve(getCwd(), options.location || location),
|
|
@@ -15,6 +15,7 @@ const { loadAndValidateOptions } = require('../../lib/validation');
|
|
|
15
15
|
const { getProjectConfig, pollDeployStatus } = require('../../lib/projects');
|
|
16
16
|
const { projectNamePrompt } = require('../../lib/prompts/projectNamePrompt');
|
|
17
17
|
const { i18n } = require('@hubspot/cli-lib/lib/lang');
|
|
18
|
+
// const { getAccountConfig } = require('@hubspot/cli-lib');
|
|
18
19
|
|
|
19
20
|
const i18nKey = 'cli.commands.project.subcommands.deploy';
|
|
20
21
|
const { EXIT_CODES } = require('../../lib/enums/exitCodes');
|
|
@@ -26,9 +27,11 @@ exports.handler = async options => {
|
|
|
26
27
|
await loadAndValidateOptions(options);
|
|
27
28
|
|
|
28
29
|
const accountId = getAccountId(options);
|
|
30
|
+
// const accountConfig = getAccountConfig(accountId);
|
|
29
31
|
const { project, buildId } = options;
|
|
32
|
+
// const sandboxType = accountConfig && accountConfig.sandboxAccountType;
|
|
30
33
|
|
|
31
|
-
trackCommandUsage('project-deploy',
|
|
34
|
+
trackCommandUsage('project-deploy', null, accountId);
|
|
32
35
|
|
|
33
36
|
const { projectConfig } = await getProjectConfig();
|
|
34
37
|
|
|
@@ -36,7 +36,7 @@ exports.handler = async options => {
|
|
|
36
36
|
const { name: projectName, dest, buildNumber } = options;
|
|
37
37
|
const accountId = getAccountId(options);
|
|
38
38
|
|
|
39
|
-
trackCommandUsage('project-download',
|
|
39
|
+
trackCommandUsage('project-download', null, accountId);
|
|
40
40
|
|
|
41
41
|
const projectExists = await ensureProjectExists(accountId, projectName, {
|
|
42
42
|
allowCreate: false,
|
|
@@ -40,7 +40,7 @@ exports.handler = async options => {
|
|
|
40
40
|
const { path: projectPath, limit } = options;
|
|
41
41
|
const accountId = getAccountId(options);
|
|
42
42
|
|
|
43
|
-
trackCommandUsage('project-list-builds',
|
|
43
|
+
trackCommandUsage('project-list-builds', null, accountId);
|
|
44
44
|
|
|
45
45
|
const cwd = projectPath ? path.resolve(getCwd(), projectPath) : getCwd();
|
|
46
46
|
const { projectConfig, projectDir } = await getProjectConfig(cwd);
|
package/commands/project/logs.js
CHANGED
|
@@ -188,7 +188,7 @@ exports.handler = async options => {
|
|
|
188
188
|
}
|
|
189
189
|
}
|
|
190
190
|
|
|
191
|
-
trackCommandUsage('project-logs',
|
|
191
|
+
trackCommandUsage('project-logs', null, accountId);
|
|
192
192
|
|
|
193
193
|
const logsInfo = [accountId, `"${projectName}"`];
|
|
194
194
|
let tableHeader;
|
package/commands/project/open.js
CHANGED
|
@@ -29,7 +29,7 @@ exports.handler = async options => {
|
|
|
29
29
|
const accountId = getAccountId(options);
|
|
30
30
|
const { project } = options;
|
|
31
31
|
|
|
32
|
-
trackCommandUsage('project-open',
|
|
32
|
+
trackCommandUsage('project-open', null, accountId);
|
|
33
33
|
|
|
34
34
|
const { projectConfig } = await getProjectConfig();
|
|
35
35
|
|
|
@@ -18,6 +18,7 @@ const {
|
|
|
18
18
|
validateProjectConfig,
|
|
19
19
|
} = require('../../lib/projects');
|
|
20
20
|
const { i18n } = require('@hubspot/cli-lib/lib/lang');
|
|
21
|
+
// const { getAccountConfig } = require('@hubspot/cli-lib');
|
|
21
22
|
const { EXIT_CODES } = require('../../lib/enums/exitCodes');
|
|
22
23
|
|
|
23
24
|
const i18nKey = 'cli.commands.project.subcommands.upload';
|
|
@@ -30,8 +31,10 @@ exports.handler = async options => {
|
|
|
30
31
|
|
|
31
32
|
const { forceCreate, path: projectPath } = options;
|
|
32
33
|
const accountId = getAccountId(options);
|
|
34
|
+
// const accountConfig = getAccountConfig(accountId);
|
|
35
|
+
// const sandboxType = accountConfig && accountConfig.sandboxAccountType;
|
|
33
36
|
|
|
34
|
-
trackCommandUsage('project-upload',
|
|
37
|
+
trackCommandUsage('project-upload', null, accountId);
|
|
35
38
|
|
|
36
39
|
const { projectConfig, projectDir } = await getProjectConfig(projectPath);
|
|
37
40
|
|
|
@@ -83,7 +83,7 @@ exports.handler = async options => {
|
|
|
83
83
|
const { initialUpload, path: projectPath } = options;
|
|
84
84
|
const accountId = getAccountId(options);
|
|
85
85
|
|
|
86
|
-
trackCommandUsage('project-watch',
|
|
86
|
+
trackCommandUsage('project-watch', null, accountId);
|
|
87
87
|
|
|
88
88
|
const { projectConfig, projectDir } = await getProjectConfig(projectPath);
|
|
89
89
|
|
package/commands/remove.js
CHANGED
|
@@ -120,7 +120,7 @@ exports.handler = async options => {
|
|
|
120
120
|
succeedColor: 'white',
|
|
121
121
|
});
|
|
122
122
|
|
|
123
|
-
trackCommandUsage('sandbox-create',
|
|
123
|
+
trackCommandUsage('sandbox-create', null, accountId);
|
|
124
124
|
|
|
125
125
|
let namePrompt;
|
|
126
126
|
|
|
@@ -151,8 +151,6 @@ exports.handler = async options => {
|
|
|
151
151
|
} catch (err) {
|
|
152
152
|
debugErrorAndContext(err);
|
|
153
153
|
|
|
154
|
-
trackCommandUsage('sandbox-create', { success: false }, accountId);
|
|
155
|
-
|
|
156
154
|
spinnies.fail('sandboxCreate', {
|
|
157
155
|
text: i18n(`${i18nKey}.loading.fail`, {
|
|
158
156
|
sandboxName,
|
|
@@ -49,7 +49,7 @@ exports.handler = async options => {
|
|
|
49
49
|
account: account || accountPrompt.account,
|
|
50
50
|
});
|
|
51
51
|
|
|
52
|
-
trackCommandUsage('sandbox-delete',
|
|
52
|
+
trackCommandUsage('sandbox-delete', null, sandboxAccountId);
|
|
53
53
|
|
|
54
54
|
let parentAccountId;
|
|
55
55
|
for (const portal of config.portals) {
|
|
@@ -126,8 +126,6 @@ exports.handler = async options => {
|
|
|
126
126
|
} catch (err) {
|
|
127
127
|
debugErrorAndContext(err);
|
|
128
128
|
|
|
129
|
-
trackCommandUsage('sandbox-delete', { success: false }, sandboxAccountId);
|
|
130
|
-
|
|
131
129
|
if (
|
|
132
130
|
err.error &&
|
|
133
131
|
err.error.category === OBJECT_NOT_FOUND &&
|
|
@@ -28,7 +28,7 @@ exports.handler = async options => {
|
|
|
28
28
|
await loadAndValidateOptions(options);
|
|
29
29
|
|
|
30
30
|
const accountId = getAccountId(options);
|
|
31
|
-
trackCommandUsage('secrets-add',
|
|
31
|
+
trackCommandUsage('secrets-add', null, accountId);
|
|
32
32
|
|
|
33
33
|
try {
|
|
34
34
|
const { secretValue } = await secretValuePrompt();
|
|
@@ -27,7 +27,7 @@ exports.handler = async options => {
|
|
|
27
27
|
await loadAndValidateOptions(options);
|
|
28
28
|
|
|
29
29
|
const accountId = getAccountId(options);
|
|
30
|
-
trackCommandUsage('secrets-delete',
|
|
30
|
+
trackCommandUsage('secrets-delete', null, accountId);
|
|
31
31
|
|
|
32
32
|
try {
|
|
33
33
|
await deleteSecret(accountId, secretName);
|
|
@@ -25,7 +25,7 @@ exports.handler = async options => {
|
|
|
25
25
|
await loadAndValidateOptions(options);
|
|
26
26
|
|
|
27
27
|
const accountId = getAccountId(options);
|
|
28
|
-
trackCommandUsage('secrets-list',
|
|
28
|
+
trackCommandUsage('secrets-list', null, accountId);
|
|
29
29
|
|
|
30
30
|
try {
|
|
31
31
|
const { results } = await fetchSecrets(accountId);
|
|
@@ -28,7 +28,7 @@ exports.handler = async options => {
|
|
|
28
28
|
await loadAndValidateOptions(options);
|
|
29
29
|
|
|
30
30
|
const accountId = getAccountId(options);
|
|
31
|
-
trackCommandUsage('secrets-update',
|
|
31
|
+
trackCommandUsage('secrets-update', null, accountId);
|
|
32
32
|
|
|
33
33
|
try {
|
|
34
34
|
const { secretValue } = await secretValuePrompt();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hubspot/cli",
|
|
3
|
-
"version": "4.0.2-beta.
|
|
3
|
+
"version": "4.0.2-beta.4",
|
|
4
4
|
"description": "CLI for working with HubSpot",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
"url": "https://github.com/HubSpot/hubspot-cms-tools"
|
|
9
9
|
},
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@hubspot/cli-lib": "4.0.2-beta.
|
|
12
|
-
"@hubspot/serverless-dev-runtime": "4.0.2-beta.
|
|
11
|
+
"@hubspot/cli-lib": "4.0.2-beta.4",
|
|
12
|
+
"@hubspot/serverless-dev-runtime": "4.0.2-beta.4",
|
|
13
13
|
"archiver": "^5.3.0",
|
|
14
14
|
"chalk": "^4.1.2",
|
|
15
15
|
"express": "^4.17.1",
|
|
@@ -37,5 +37,5 @@
|
|
|
37
37
|
"publishConfig": {
|
|
38
38
|
"access": "public"
|
|
39
39
|
},
|
|
40
|
-
"gitHead": "
|
|
40
|
+
"gitHead": "56347c4026ac958b9a721ed0057b68c7c4c4918d"
|
|
41
41
|
}
|