@hubspot/cli 5.2.1-beta.1 → 5.2.1-beta.11
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/bin/hs +1 -1
- package/commands/accounts/clean.js +7 -7
- package/commands/accounts/info.js +3 -3
- package/commands/accounts/list.js +7 -18
- package/commands/accounts/remove.js +1 -1
- package/commands/accounts/rename.js +3 -3
- package/commands/accounts/use.js +1 -1
- package/commands/accounts.js +3 -3
- package/commands/auth.js +7 -9
- package/commands/cms/convertFields.js +1 -1
- package/commands/cms/lighthouseScore.js +4 -4
- package/commands/cms/reactModules.js +1 -1
- package/commands/cms.js +3 -3
- package/commands/config/set/allowUsageTracking.js +1 -2
- 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/config.js +3 -3
- package/commands/create/api-sample.js +1 -1
- package/commands/create/module.js +1 -1
- package/commands/create/template.js +1 -1
- package/commands/create.js +1 -1
- package/commands/customObject/create.js +1 -1
- package/commands/customObject/schema/create.js +2 -3
- package/commands/customObject/schema/delete.js +1 -2
- package/commands/customObject/schema/fetch-all.js +1 -2
- package/commands/customObject/schema/fetch.js +1 -2
- package/commands/customObject/schema/list.js +1 -1
- package/commands/customObject/schema/update.js +2 -3
- package/commands/customObject/schema.js +1 -1
- package/commands/customObject.js +3 -3
- package/commands/feedback.js +4 -6
- package/commands/fetch.js +6 -6
- package/commands/filemanager/fetch.js +4 -4
- package/commands/filemanager/upload.js +4 -4
- package/commands/filemanager.js +4 -4
- package/commands/functions/deploy.js +9 -25
- package/commands/functions/list.js +4 -4
- package/commands/functions/server.js +4 -4
- package/commands/functions.js +3 -3
- package/commands/hubdb/clear.js +4 -4
- package/commands/hubdb/create.js +4 -4
- package/commands/hubdb/delete.js +4 -4
- package/commands/hubdb/fetch.js +4 -4
- package/commands/hubdb.js +3 -3
- package/commands/init.js +6 -8
- package/commands/lint.js +3 -3
- package/commands/list.js +4 -4
- package/commands/logs.js +4 -4
- package/commands/module/marketplace-validate.js +5 -5
- package/commands/module.js +3 -3
- package/commands/mv.js +4 -4
- package/commands/open.js +4 -4
- package/commands/project/__tests__/deploy.test.js +431 -0
- package/commands/project/add.js +1 -1
- package/commands/project/cloneApp.js +161 -0
- package/commands/project/create.js +4 -4
- package/commands/project/deploy.js +79 -25
- package/commands/project/dev.js +70 -27
- package/commands/project/download.js +11 -7
- package/commands/project/listBuilds.js +5 -5
- package/commands/project/logs.js +5 -5
- package/commands/project/migrateApp.js +244 -0
- package/commands/project/open.js +12 -8
- package/commands/project/upload.js +13 -8
- package/commands/project/watch.js +4 -4
- package/commands/project.js +7 -3
- package/commands/remove.js +4 -4
- package/commands/sandbox/create.js +22 -18
- package/commands/sandbox/delete.js +10 -7
- package/commands/sandbox/sync.js +8 -8
- package/commands/sandbox.js +5 -4
- package/commands/secrets/addSecret.js +4 -4
- package/commands/secrets/deleteSecret.js +4 -4
- package/commands/secrets/listSecrets.js +4 -4
- package/commands/secrets/updateSecret.js +4 -4
- package/commands/secrets.js +3 -3
- package/commands/theme/generate-selectors.js +1 -1
- package/commands/theme/marketplace-validate.js +5 -5
- package/commands/theme/preview.js +52 -17
- package/commands/theme.js +1 -1
- package/commands/upload.js +5 -5
- package/commands/watch.js +61 -18
- package/jest.config.js +1 -0
- package/lang/en.lyaml +1450 -1371
- package/lib/DevServerManager.js +3 -2
- package/lib/LocalDevManager.js +169 -7
- package/lib/__tests__/{commonOpts.js → commonOpts.test.js} +3 -0
- package/lib/__tests__/downloadProjectPrompt.test.js +31 -0
- package/lib/__tests__/projects.test.js +13 -17
- package/lib/__tests__/{serverlessLogs.js → serverlessLogs.test.js} +1 -0
- package/lib/buildAccount.js +197 -0
- package/lib/commonOpts.js +1 -1
- package/lib/constants.js +12 -1
- package/lib/developerTestAccounts.js +52 -4
- package/lib/errorHandlers/apiErrors.js +1 -1
- package/lib/errorHandlers/overrideErrors.js +1 -1
- package/lib/errorHandlers/standardErrors.js +1 -1
- package/lib/generate-selectors.js +1 -1
- package/lib/localDev.js +102 -52
- package/lib/marketplace-validate.js +11 -3
- package/lib/polling.js +31 -0
- package/lib/process.js +1 -1
- package/lib/projectStructure.js +5 -2
- package/lib/projects.js +68 -15
- package/lib/projectsWatch.js +1 -1
- package/lib/prompts/accountNamePrompt.js +81 -0
- package/lib/prompts/accountsPrompt.js +1 -1
- package/lib/prompts/activeInstallConfirmationPrompt.js +20 -0
- package/lib/prompts/buildIdPrompt.js +8 -17
- package/lib/prompts/cleanUploadPrompt.js +1 -1
- package/lib/prompts/cloneAppLocationPrompt.js +32 -0
- package/lib/prompts/cmsFieldPrompt.js +1 -1
- package/lib/prompts/createApiSamplePrompt.js +1 -1
- package/lib/prompts/createFunctionPrompt.js +1 -1
- package/lib/prompts/createModulePrompt.js +1 -1
- package/lib/prompts/createProjectPrompt.js +32 -10
- package/lib/prompts/createTemplatePrompt.js +1 -1
- package/lib/prompts/downloadProjectPrompt.js +5 -6
- package/lib/prompts/feedbackPrompt.js +1 -1
- package/lib/prompts/folderOverwritePrompt.js +1 -1
- package/lib/prompts/installPublicAppPrompt.js +51 -0
- package/lib/prompts/personalAccessKeyPrompt.js +3 -3
- package/lib/prompts/previewPrompt.js +19 -1
- package/lib/prompts/projectAddPrompt.js +1 -1
- package/lib/prompts/projectDevTargetAccountPrompt.js +48 -6
- package/lib/prompts/projectNamePrompt.js +2 -2
- package/lib/prompts/projectsLogsPrompt.js +1 -1
- package/lib/prompts/sandboxesPrompt.js +13 -42
- package/lib/prompts/secretPrompt.js +1 -1
- package/lib/prompts/selectPublicAppPrompt.js +84 -0
- package/lib/prompts/setAsDefaultAccountPrompt.js +1 -1
- package/lib/prompts/uploadPrompt.js +1 -1
- package/lib/sandboxSync.js +1 -1
- package/lib/sandboxes.js +167 -14
- package/lib/serverlessLogs.js +2 -2
- package/lib/ui/git.js +1 -1
- package/lib/ui/index.js +5 -22
- package/lib/ui/serverlessFunctionLogs.js +1 -1
- package/package.json +7 -6
- package/lib/developerTestAccountCreate.js +0 -186
- package/lib/prompts/developerTestAccountNamePrompt.js +0 -29
- package/lib/prompts/enterAccountNamePrompt.js +0 -33
- package/lib/sandboxCreate.js +0 -319
- /package/lib/__tests__/{validation.js → validation.test.js} +0 -0
|
@@ -17,7 +17,7 @@ const {
|
|
|
17
17
|
} = require('../../lib/commonOpts');
|
|
18
18
|
const { i18n } = require('../../lib/lang');
|
|
19
19
|
|
|
20
|
-
const i18nKey = '
|
|
20
|
+
const i18nKey = 'commands.secrets.subcommands.list';
|
|
21
21
|
|
|
22
22
|
exports.command = 'list';
|
|
23
23
|
exports.describe = i18n(`${i18nKey}.describe`);
|
|
@@ -49,8 +49,8 @@ exports.handler = async options => {
|
|
|
49
49
|
};
|
|
50
50
|
|
|
51
51
|
exports.builder = yargs => {
|
|
52
|
-
addConfigOptions(yargs
|
|
53
|
-
addAccountOptions(yargs
|
|
54
|
-
addUseEnvironmentOptions(yargs
|
|
52
|
+
addConfigOptions(yargs);
|
|
53
|
+
addAccountOptions(yargs);
|
|
54
|
+
addUseEnvironmentOptions(yargs);
|
|
55
55
|
return yargs;
|
|
56
56
|
};
|
|
@@ -18,7 +18,7 @@ const {
|
|
|
18
18
|
const { secretValuePrompt } = require('../../lib/prompts/secretPrompt');
|
|
19
19
|
const { i18n } = require('../../lib/lang');
|
|
20
20
|
|
|
21
|
-
const i18nKey = '
|
|
21
|
+
const i18nKey = 'commands.secrets.subcommands.update';
|
|
22
22
|
|
|
23
23
|
exports.command = 'update <name>';
|
|
24
24
|
exports.describe = i18n(`${i18nKey}.describe`);
|
|
@@ -59,9 +59,9 @@ exports.handler = async options => {
|
|
|
59
59
|
};
|
|
60
60
|
|
|
61
61
|
exports.builder = yargs => {
|
|
62
|
-
addConfigOptions(yargs
|
|
63
|
-
addAccountOptions(yargs
|
|
64
|
-
addUseEnvironmentOptions(yargs
|
|
62
|
+
addConfigOptions(yargs);
|
|
63
|
+
addAccountOptions(yargs);
|
|
64
|
+
addUseEnvironmentOptions(yargs);
|
|
65
65
|
yargs.positional('name', {
|
|
66
66
|
describe: i18n(`${i18nKey}.positionals.name.describe`),
|
|
67
67
|
type: 'string',
|
package/commands/secrets.js
CHANGED
|
@@ -6,14 +6,14 @@ const deleteSecretCommand = require('./secrets/deleteSecret');
|
|
|
6
6
|
const updateSecretCommand = require('./secrets/updateSecret');
|
|
7
7
|
const { i18n } = require('../lib/lang');
|
|
8
8
|
|
|
9
|
-
const i18nKey = '
|
|
9
|
+
const i18nKey = 'commands.secrets';
|
|
10
10
|
|
|
11
11
|
exports.command = 'secrets';
|
|
12
12
|
exports.describe = i18n(`${i18nKey}.describe`);
|
|
13
13
|
|
|
14
14
|
exports.builder = yargs => {
|
|
15
|
-
addConfigOptions(yargs
|
|
16
|
-
addAccountOptions(yargs
|
|
15
|
+
addConfigOptions(yargs);
|
|
16
|
+
addAccountOptions(yargs);
|
|
17
17
|
yargs
|
|
18
18
|
.command(listSecretsCommand)
|
|
19
19
|
.command(addSecretCommand)
|
|
@@ -22,7 +22,7 @@ const CSS_SELECTORS_REGEX = new RegExp(/([\s\w:.,\0-[\]]*){/, 'i');
|
|
|
22
22
|
const CSS_EXPRESSION_REGEX = new RegExp(/(?!\s)([^}])*(?![.#\s,>])[^}]*}/, 'g');
|
|
23
23
|
const THEME_PATH_REGEX = new RegExp(/=\s*.*(theme\.(\w|\.)*)/, 'i');
|
|
24
24
|
|
|
25
|
-
const i18nKey = '
|
|
25
|
+
const i18nKey = 'commands.theme.subcommands.generateSelectors';
|
|
26
26
|
|
|
27
27
|
exports.command = 'generate-selectors <themePath>';
|
|
28
28
|
exports.describe = i18n(`${i18nKey}.describe`);
|
|
@@ -16,7 +16,7 @@ const {
|
|
|
16
16
|
} = require('../../lib/marketplace-validate');
|
|
17
17
|
const { i18n } = require('../../lib/lang');
|
|
18
18
|
|
|
19
|
-
const i18nKey = '
|
|
19
|
+
const i18nKey = 'commands.theme.subcommands.marketplaceValidate';
|
|
20
20
|
|
|
21
21
|
exports.command = 'marketplace-validate <src>';
|
|
22
22
|
exports.describe = i18n(`${i18nKey}.describe`);
|
|
@@ -48,16 +48,16 @@ exports.handler = async options => {
|
|
|
48
48
|
accountId,
|
|
49
49
|
validationId
|
|
50
50
|
);
|
|
51
|
-
processValidationErrors(validationResults);
|
|
51
|
+
processValidationErrors(i18nKey, validationResults);
|
|
52
52
|
displayValidationResults(i18nKey, validationResults);
|
|
53
53
|
|
|
54
54
|
process.exit();
|
|
55
55
|
};
|
|
56
56
|
|
|
57
57
|
exports.builder = yargs => {
|
|
58
|
-
addConfigOptions(yargs
|
|
59
|
-
addAccountOptions(yargs
|
|
60
|
-
addUseEnvironmentOptions(yargs
|
|
58
|
+
addConfigOptions(yargs);
|
|
59
|
+
addAccountOptions(yargs);
|
|
60
|
+
addUseEnvironmentOptions(yargs);
|
|
61
61
|
|
|
62
62
|
yargs.positional('src', {
|
|
63
63
|
describe: i18n(`${i18nKey}.positionals.src.describe`),
|
|
@@ -12,21 +12,31 @@ const { preview } = require('@hubspot/theme-preview-dev-server');
|
|
|
12
12
|
const { getUploadableFileList } = require('../../lib/upload');
|
|
13
13
|
const { trackCommandUsage } = require('../../lib/usageTracking');
|
|
14
14
|
const { loadAndValidateOptions } = require('../../lib/validation');
|
|
15
|
-
const {
|
|
15
|
+
const {
|
|
16
|
+
previewPrompt,
|
|
17
|
+
previewProjectPrompt,
|
|
18
|
+
} = require('../../lib/prompts/previewPrompt');
|
|
16
19
|
const { EXIT_CODES } = require('../../lib/enums/exitCodes');
|
|
17
20
|
const {
|
|
18
21
|
FILE_UPLOAD_RESULT_TYPES,
|
|
19
22
|
} = require('@hubspot/local-dev-lib/constants/files');
|
|
20
|
-
const i18nKey = 'cli.commands.preview';
|
|
21
23
|
const cliProgress = require('cli-progress');
|
|
22
24
|
const {
|
|
23
25
|
ApiErrorContext,
|
|
24
26
|
logApiUploadErrorInstance,
|
|
25
27
|
} = require('../../lib/errorHandlers/apiErrors');
|
|
26
28
|
const { handleExit, handleKeypress } = require('../../lib/process');
|
|
29
|
+
const { getThemeJSONPath } = require('@hubspot/local-dev-lib/cms/themes');
|
|
30
|
+
const { getProjectConfig } = require('../../lib/projects');
|
|
31
|
+
const {
|
|
32
|
+
findProjectComponents,
|
|
33
|
+
COMPONENT_TYPES,
|
|
34
|
+
} = require('../../lib/projectStructure');
|
|
35
|
+
|
|
36
|
+
const i18nKey = 'commands.theme.subcommands.preview';
|
|
27
37
|
|
|
28
38
|
exports.command = 'preview [--src] [--dest]';
|
|
29
|
-
exports.describe =
|
|
39
|
+
exports.describe = i18n(`${i18nKey}.describe`);
|
|
30
40
|
|
|
31
41
|
const validateSrcPath = src => {
|
|
32
42
|
const logInvalidPath = () => {
|
|
@@ -63,6 +73,42 @@ const handleUserInput = () => {
|
|
|
63
73
|
});
|
|
64
74
|
};
|
|
65
75
|
|
|
76
|
+
const determineSrcAndDest = async options => {
|
|
77
|
+
let absoluteSrc;
|
|
78
|
+
let dest;
|
|
79
|
+
const { projectDir, projectConfig } = await getProjectConfig();
|
|
80
|
+
if (!(projectDir && projectConfig)) {
|
|
81
|
+
// Not in a project, prompt for src and dest of traditional theme
|
|
82
|
+
const previewPromptAnswers = await previewPrompt(options);
|
|
83
|
+
const src = options.src || previewPromptAnswers.src;
|
|
84
|
+
dest = options.dest || previewPromptAnswers.dest;
|
|
85
|
+
absoluteSrc = path.resolve(getCwd(), src);
|
|
86
|
+
if (!dest || !validateSrcPath(absoluteSrc)) {
|
|
87
|
+
process.exit(EXIT_CODES.ERROR);
|
|
88
|
+
}
|
|
89
|
+
} else {
|
|
90
|
+
// In a project
|
|
91
|
+
let themeJsonPath = getThemeJSONPath();
|
|
92
|
+
if (!themeJsonPath) {
|
|
93
|
+
const projectComponents = await findProjectComponents(projectDir);
|
|
94
|
+
const themeComponents = projectComponents.filter(
|
|
95
|
+
c => c.type === COMPONENT_TYPES.hublTheme
|
|
96
|
+
);
|
|
97
|
+
if (themeComponents.length === 0) {
|
|
98
|
+
logger.error(i18n(`${i18nKey}.errors.noThemeComponents`));
|
|
99
|
+
process.exit(EXIT_CODES.ERROR);
|
|
100
|
+
}
|
|
101
|
+
const answer = await previewProjectPrompt(themeComponents);
|
|
102
|
+
themeJsonPath = `${answer.themeComponentPath}/theme.json`;
|
|
103
|
+
}
|
|
104
|
+
const { dir: themeDir } = path.parse(themeJsonPath);
|
|
105
|
+
absoluteSrc = themeDir;
|
|
106
|
+
const { base: themeName } = path.parse(themeDir);
|
|
107
|
+
dest = `@projects/${projectConfig.name}/${themeName}`;
|
|
108
|
+
}
|
|
109
|
+
return { absoluteSrc, dest };
|
|
110
|
+
};
|
|
111
|
+
|
|
66
112
|
exports.handler = async options => {
|
|
67
113
|
const { notify, skipUpload, noSsl, port, debug } = options;
|
|
68
114
|
|
|
@@ -70,18 +116,7 @@ exports.handler = async options => {
|
|
|
70
116
|
|
|
71
117
|
const accountId = getAccountId(options);
|
|
72
118
|
|
|
73
|
-
const
|
|
74
|
-
const src = options.src || previewPromptAnswers.src;
|
|
75
|
-
let dest = options.dest || previewPromptAnswers.dest;
|
|
76
|
-
if (!dest) {
|
|
77
|
-
logger.error(i18n(`${i18nKey}.errors.destinationRequired`));
|
|
78
|
-
return;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
const absoluteSrc = path.resolve(getCwd(), src);
|
|
82
|
-
if (!validateSrcPath(absoluteSrc)) {
|
|
83
|
-
process.exit(EXIT_CODES.ERROR);
|
|
84
|
-
}
|
|
119
|
+
const { absoluteSrc, dest } = await determineSrcAndDest(options);
|
|
85
120
|
|
|
86
121
|
const filePaths = await getUploadableFileList(absoluteSrc, false);
|
|
87
122
|
|
|
@@ -153,8 +188,8 @@ exports.handler = async options => {
|
|
|
153
188
|
};
|
|
154
189
|
|
|
155
190
|
exports.builder = yargs => {
|
|
156
|
-
addConfigOptions(yargs
|
|
157
|
-
addAccountOptions(yargs
|
|
191
|
+
addConfigOptions(yargs);
|
|
192
|
+
addAccountOptions(yargs);
|
|
158
193
|
|
|
159
194
|
yargs.option('src', {
|
|
160
195
|
describe: i18n(`${i18nKey}.options.src.describe`),
|
package/commands/theme.js
CHANGED
package/commands/upload.js
CHANGED
|
@@ -43,7 +43,7 @@ const { trackCommandUsage } = require('../lib/usageTracking');
|
|
|
43
43
|
const { getUploadableFileList } = require('../lib/upload');
|
|
44
44
|
|
|
45
45
|
const { i18n } = require('../lib/lang');
|
|
46
|
-
const i18nKey = '
|
|
46
|
+
const i18nKey = 'commands.upload';
|
|
47
47
|
const { EXIT_CODES } = require('../lib/enums/exitCodes');
|
|
48
48
|
const {
|
|
49
49
|
FieldsJs,
|
|
@@ -279,10 +279,10 @@ exports.handler = async options => {
|
|
|
279
279
|
};
|
|
280
280
|
|
|
281
281
|
exports.builder = yargs => {
|
|
282
|
-
addConfigOptions(yargs
|
|
283
|
-
addAccountOptions(yargs
|
|
284
|
-
addModeOptions(yargs, { write: true }
|
|
285
|
-
addUseEnvironmentOptions(yargs
|
|
282
|
+
addConfigOptions(yargs);
|
|
283
|
+
addAccountOptions(yargs);
|
|
284
|
+
addModeOptions(yargs, { write: true });
|
|
285
|
+
addUseEnvironmentOptions(yargs);
|
|
286
286
|
|
|
287
287
|
yargs.positional('src', {
|
|
288
288
|
describe: i18n(`${i18nKey}.positionals.src.describe`),
|
package/commands/watch.js
CHANGED
|
@@ -18,8 +18,13 @@ const { validateMode, loadAndValidateOptions } = require('../lib/validation');
|
|
|
18
18
|
const { trackCommandUsage } = require('../lib/usageTracking');
|
|
19
19
|
const { i18n } = require('../lib/lang');
|
|
20
20
|
const { getUploadableFileList } = require('../lib/upload');
|
|
21
|
+
const { logErrorInstance } = require('../lib/errorHandlers/standardErrors');
|
|
22
|
+
const {
|
|
23
|
+
logApiUploadErrorInstance,
|
|
24
|
+
ApiErrorContext,
|
|
25
|
+
} = require('../lib/errorHandlers/apiErrors');
|
|
26
|
+
const i18nKey = 'commands.watch';
|
|
21
27
|
|
|
22
|
-
const i18nKey = 'cli.commands.watch';
|
|
23
28
|
const { EXIT_CODES } = require('../lib/enums/exitCodes');
|
|
24
29
|
|
|
25
30
|
exports.command = 'watch [--src] [--dest]';
|
|
@@ -71,12 +76,9 @@ exports.handler = async options => {
|
|
|
71
76
|
|
|
72
77
|
if (disableInitial) {
|
|
73
78
|
logger.info(i18n(`${i18nKey}.warnings.disableInitial`));
|
|
74
|
-
} else {
|
|
79
|
+
} else if (!initialUpload) {
|
|
75
80
|
logger.info(i18n(`${i18nKey}.warnings.notUploaded`, { path: src }));
|
|
76
|
-
|
|
77
|
-
if (!initialUpload) {
|
|
78
|
-
logger.info(i18n(`${i18nKey}.warnings.initialUpload`));
|
|
79
|
-
}
|
|
81
|
+
logger.info(i18n(`${i18nKey}.warnings.initialUpload`));
|
|
80
82
|
}
|
|
81
83
|
|
|
82
84
|
if (initialUpload) {
|
|
@@ -87,21 +89,62 @@ exports.handler = async options => {
|
|
|
87
89
|
}
|
|
88
90
|
|
|
89
91
|
trackCommandUsage('watch', { mode }, accountId);
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
92
|
+
|
|
93
|
+
const postInitialUploadCallback = null;
|
|
94
|
+
const onUploadFolderError = error => {
|
|
95
|
+
logger.error(
|
|
96
|
+
i18n(`${i18nKey}.errors.folderFailed`, {
|
|
97
|
+
src,
|
|
98
|
+
dest,
|
|
99
|
+
accountId,
|
|
100
|
+
})
|
|
101
|
+
);
|
|
102
|
+
logErrorInstance(error, {
|
|
103
|
+
accountId,
|
|
104
|
+
});
|
|
105
|
+
};
|
|
106
|
+
const onQueueAddError = null;
|
|
107
|
+
const onUploadFileError = (file, dest, accountId) => error => {
|
|
108
|
+
logger.error(
|
|
109
|
+
i18n(`${i18nKey}.errors.fileFailed`, {
|
|
110
|
+
file,
|
|
111
|
+
dest,
|
|
112
|
+
accountId,
|
|
113
|
+
})
|
|
114
|
+
);
|
|
115
|
+
logApiUploadErrorInstance(
|
|
116
|
+
error,
|
|
117
|
+
new ApiErrorContext({
|
|
118
|
+
accountId,
|
|
119
|
+
request: dest,
|
|
120
|
+
payload: file,
|
|
121
|
+
})
|
|
122
|
+
);
|
|
123
|
+
};
|
|
124
|
+
watch(
|
|
125
|
+
accountId,
|
|
126
|
+
absoluteSrcPath,
|
|
127
|
+
dest,
|
|
128
|
+
{
|
|
129
|
+
mode,
|
|
130
|
+
remove,
|
|
131
|
+
disableInitial: initialUpload ? false : true,
|
|
132
|
+
notify,
|
|
133
|
+
commandOptions: options,
|
|
134
|
+
filePaths: filesToUpload,
|
|
135
|
+
},
|
|
136
|
+
postInitialUploadCallback,
|
|
137
|
+
onUploadFolderError,
|
|
138
|
+
onQueueAddError,
|
|
139
|
+
onUploadFileError
|
|
140
|
+
);
|
|
98
141
|
};
|
|
99
142
|
|
|
100
143
|
exports.builder = yargs => {
|
|
101
|
-
addConfigOptions(yargs
|
|
102
|
-
addAccountOptions(yargs
|
|
103
|
-
addModeOptions(yargs, { write: true }
|
|
104
|
-
addUseEnvironmentOptions(yargs
|
|
144
|
+
addConfigOptions(yargs);
|
|
145
|
+
addAccountOptions(yargs);
|
|
146
|
+
addModeOptions(yargs, { write: true });
|
|
147
|
+
addUseEnvironmentOptions(yargs);
|
|
105
148
|
|
|
106
149
|
yargs.positional('src', {
|
|
107
150
|
describe: i18n(`${i18nKey}.positionals.src.describe`),
|
package/jest.config.js
CHANGED