@hubspot/cli 5.2.1-beta.2 → 5.2.1-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/bin/cli.js +1 -1
- package/commands/accounts/clean.js +3 -3
- package/commands/accounts/info.js +1 -1
- package/commands/accounts/list.js +1 -1
- package/commands/accounts/remove.js +1 -1
- package/commands/accounts/rename.js +1 -1
- package/commands/accounts/use.js +1 -1
- package/commands/accounts.js +1 -1
- package/commands/auth.js +3 -3
- package/commands/cms/convertFields.js +1 -1
- package/commands/cms/lighthouseScore.js +1 -1
- package/commands/cms/reactModules.js +1 -1
- package/commands/cms.js +1 -1
- 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 +1 -1
- 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 +1 -2
- 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 +1 -2
- package/commands/customObject/schema.js +1 -1
- package/commands/customObject.js +1 -1
- package/commands/feedback.js +1 -1
- package/commands/fetch.js +1 -1
- package/commands/filemanager/fetch.js +1 -1
- package/commands/filemanager/upload.js +1 -1
- package/commands/filemanager.js +1 -1
- package/commands/functions/deploy.js +1 -1
- package/commands/functions/list.js +1 -1
- package/commands/functions/server.js +1 -1
- package/commands/functions.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/hubdb.js +1 -1
- package/commands/init.js +1 -1
- package/commands/lint.js +1 -1
- package/commands/list.js +1 -1
- package/commands/logs.js +1 -1
- package/commands/module/marketplace-validate.js +1 -1
- package/commands/module.js +1 -1
- package/commands/mv.js +1 -1
- package/commands/open.js +1 -1
- package/commands/project/add.js +1 -1
- package/commands/project/create.js +1 -1
- package/commands/project/deploy.js +1 -1
- package/commands/project/dev.js +37 -19
- package/commands/project/download.js +9 -5
- package/commands/project/listBuilds.js +1 -1
- package/commands/project/logs.js +1 -1
- package/commands/project/open.js +8 -4
- package/commands/project/upload.js +1 -1
- package/commands/project/watch.js +1 -1
- package/commands/project.js +1 -1
- package/commands/remove.js +1 -1
- package/commands/sandbox/create.js +4 -4
- package/commands/sandbox/delete.js +1 -1
- package/commands/sandbox/sync.js +2 -2
- package/commands/sandbox.js +1 -1
- 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/secrets.js +1 -1
- package/commands/theme/generate-selectors.js +1 -1
- package/commands/theme/marketplace-validate.js +1 -1
- package/commands/theme/preview.js +2 -2
- package/commands/theme.js +1 -1
- package/commands/upload.js +1 -1
- package/commands/watch.js +1 -1
- package/lang/en.lyaml +1378 -1374
- package/lib/DevServerManager.js +3 -2
- package/lib/LocalDevManager.js +89 -5
- package/lib/commonOpts.js +1 -1
- package/lib/developerTestAccountCreate.js +4 -5
- package/lib/developerTestAccounts.js +1 -1
- 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 +8 -12
- package/lib/process.js +1 -1
- package/lib/projects.js +6 -6
- package/lib/projectsWatch.js +1 -1
- package/lib/prompts/accountsPrompt.js +1 -1
- package/lib/prompts/buildIdPrompt.js +1 -1
- package/lib/prompts/cleanUploadPrompt.js +1 -1
- 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 +1 -1
- package/lib/prompts/createTemplatePrompt.js +1 -1
- package/lib/prompts/developerTestAccountNamePrompt.js +1 -1
- package/lib/prompts/downloadProjectPrompt.js +1 -1
- package/lib/prompts/enterAccountNamePrompt.js +1 -1
- package/lib/prompts/feedbackPrompt.js +1 -1
- package/lib/prompts/folderOverwritePrompt.js +1 -1
- package/lib/prompts/installPublicAppPrompt.js +42 -0
- package/lib/prompts/personalAccessKeyPrompt.js +1 -1
- package/lib/prompts/previewPrompt.js +1 -1
- package/lib/prompts/projectAddPrompt.js +1 -1
- package/lib/prompts/projectDevTargetAccountPrompt.js +1 -1
- package/lib/prompts/projectNamePrompt.js +2 -2
- package/lib/prompts/projectsLogsPrompt.js +1 -1
- package/lib/prompts/sandboxesPrompt.js +1 -1
- package/lib/prompts/secretPrompt.js +1 -1
- package/lib/prompts/setAsDefaultAccountPrompt.js +1 -1
- package/lib/prompts/uploadPrompt.js +1 -1
- package/lib/sandboxCreate.js +4 -5
- package/lib/sandboxSync.js +1 -1
- package/lib/sandboxes.js +7 -9
- package/lib/ui/git.js +1 -1
- package/lib/ui/index.js +2 -2
- package/lib/ui/serverlessFunctionLogs.js +1 -1
- package/package.json +6 -6
package/commands/project/dev.js
CHANGED
|
@@ -15,14 +15,17 @@ const {
|
|
|
15
15
|
getAccountConfig,
|
|
16
16
|
getEnv,
|
|
17
17
|
} = require('@hubspot/local-dev-lib/config');
|
|
18
|
-
const { fetchProject } = require('@hubspot/local-dev-lib/api/projects');
|
|
19
18
|
const {
|
|
20
19
|
getProjectConfig,
|
|
21
20
|
ensureProjectExists,
|
|
22
21
|
validateProjectConfig,
|
|
23
22
|
} = require('../../lib/projects');
|
|
24
23
|
const { EXIT_CODES } = require('../../lib/enums/exitCodes');
|
|
25
|
-
const {
|
|
24
|
+
const {
|
|
25
|
+
uiAccountDescription,
|
|
26
|
+
uiBetaTag,
|
|
27
|
+
uiCommandReference,
|
|
28
|
+
} = require('../../lib/ui');
|
|
26
29
|
const SpinniesManager = require('../../lib/ui/SpinniesManager');
|
|
27
30
|
const LocalDevManager = require('../../lib/LocalDevManager');
|
|
28
31
|
const {
|
|
@@ -50,7 +53,7 @@ const {
|
|
|
50
53
|
useExistingDevTestAccount,
|
|
51
54
|
} = require('../../lib/localDev');
|
|
52
55
|
|
|
53
|
-
const i18nKey = '
|
|
56
|
+
const i18nKey = 'commands.project.subcommands.dev';
|
|
54
57
|
|
|
55
58
|
exports.command = 'dev [--account]';
|
|
56
59
|
exports.describe = uiBetaTag(i18n(`${i18nKey}.describe`), false);
|
|
@@ -104,12 +107,30 @@ exports.handler = async options => {
|
|
|
104
107
|
let createNewSandbox = false;
|
|
105
108
|
let createNewDeveloperTestAccount = false;
|
|
106
109
|
|
|
110
|
+
// The user is targeting an account type that we recommend developing on
|
|
107
111
|
if (!targetProjectAccountId && defaultAccountIsRecommendedType) {
|
|
108
|
-
await confirmDefaultAccountIsTarget(accountConfig, hasPublicApps);
|
|
109
|
-
targetProjectAccountId = hasPublicApps
|
|
110
|
-
? accountConfig.parentAccountId
|
|
111
|
-
: accountId;
|
|
112
112
|
targetTestingAccountId = accountId;
|
|
113
|
+
|
|
114
|
+
await confirmDefaultAccountIsTarget(accountConfig, hasPublicApps);
|
|
115
|
+
|
|
116
|
+
if (hasPublicApps) {
|
|
117
|
+
// Exit if the user has not authed the parent account in the config
|
|
118
|
+
if (!getAccountConfig(accountConfig.parentAccountId)) {
|
|
119
|
+
logger.error(
|
|
120
|
+
i18n(`${i18nKey}.errors.parentAccountNotConfigured`, {
|
|
121
|
+
accountId: accountConfig.parentAccountId,
|
|
122
|
+
accountIdentifier: uiAccountDescription(targetTestingAccountId),
|
|
123
|
+
authCommand: uiCommandReference(
|
|
124
|
+
`hs auth --account=${accountConfig.parentAccountId}`
|
|
125
|
+
),
|
|
126
|
+
})
|
|
127
|
+
);
|
|
128
|
+
process.exit(EXIT_CODES.ERROR);
|
|
129
|
+
}
|
|
130
|
+
targetProjectAccountId = accountConfig.parentAccountId;
|
|
131
|
+
} else {
|
|
132
|
+
targetProjectAccountId = accountId;
|
|
133
|
+
}
|
|
113
134
|
} else if (!targetProjectAccountId && hasPublicApps) {
|
|
114
135
|
checkIfAppDeveloperAccount(accountConfig);
|
|
115
136
|
}
|
|
@@ -157,7 +178,7 @@ exports.handler = async options => {
|
|
|
157
178
|
targetProjectAccountId = accountId;
|
|
158
179
|
}
|
|
159
180
|
|
|
160
|
-
const projectExists = await ensureProjectExists(
|
|
181
|
+
const { projectExists, project } = await ensureProjectExists(
|
|
161
182
|
targetProjectAccountId,
|
|
162
183
|
projectConfig.name,
|
|
163
184
|
{
|
|
@@ -170,20 +191,14 @@ exports.handler = async options => {
|
|
|
170
191
|
let deployedBuild;
|
|
171
192
|
let isGithubLinked;
|
|
172
193
|
|
|
194
|
+
SpinniesManager.init();
|
|
195
|
+
|
|
173
196
|
if (projectExists) {
|
|
174
|
-
const project = await fetchProject(
|
|
175
|
-
targetProjectAccountId,
|
|
176
|
-
projectConfig.name
|
|
177
|
-
);
|
|
178
197
|
deployedBuild = project.deployedBuild;
|
|
179
198
|
isGithubLinked =
|
|
180
199
|
project.sourceIntegration &&
|
|
181
200
|
project.sourceIntegration.source === 'GITHUB';
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
SpinniesManager.init();
|
|
185
|
-
|
|
186
|
-
if (!projectExists) {
|
|
201
|
+
} else {
|
|
187
202
|
await createNewProjectForLocalDev(
|
|
188
203
|
projectConfig,
|
|
189
204
|
targetProjectAccountId,
|
|
@@ -199,13 +214,16 @@ exports.handler = async options => {
|
|
|
199
214
|
}
|
|
200
215
|
|
|
201
216
|
const LocalDev = new LocalDevManager({
|
|
217
|
+
components,
|
|
202
218
|
debug: options.debug,
|
|
203
219
|
deployedBuild,
|
|
220
|
+
isGithubLinked,
|
|
221
|
+
parentAccountId: targetProjectAccountId,
|
|
204
222
|
projectConfig,
|
|
205
223
|
projectDir,
|
|
224
|
+
projectId: project.id,
|
|
206
225
|
targetAccountId: targetTestingAccountId,
|
|
207
|
-
|
|
208
|
-
components,
|
|
226
|
+
env,
|
|
209
227
|
});
|
|
210
228
|
|
|
211
229
|
await LocalDev.start();
|
|
@@ -25,7 +25,7 @@ const {
|
|
|
25
25
|
const { i18n } = require('../../lib/lang');
|
|
26
26
|
const { uiBetaTag } = require('../../lib/ui');
|
|
27
27
|
|
|
28
|
-
const i18nKey = '
|
|
28
|
+
const i18nKey = 'commands.project.subcommands.download';
|
|
29
29
|
const { EXIT_CODES } = require('../../lib/enums/exitCodes');
|
|
30
30
|
|
|
31
31
|
exports.command = 'download [--project]';
|
|
@@ -50,10 +50,14 @@ exports.handler = async options => {
|
|
|
50
50
|
trackCommandUsage('project-download', null, accountId);
|
|
51
51
|
|
|
52
52
|
try {
|
|
53
|
-
const projectExists = await ensureProjectExists(
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
53
|
+
const { projectExists } = await ensureProjectExists(
|
|
54
|
+
accountId,
|
|
55
|
+
projectName,
|
|
56
|
+
{
|
|
57
|
+
allowCreate: false,
|
|
58
|
+
noLogs: true,
|
|
59
|
+
}
|
|
60
|
+
);
|
|
57
61
|
|
|
58
62
|
if (!projectExists) {
|
|
59
63
|
logger.error(
|
|
@@ -29,7 +29,7 @@ const {
|
|
|
29
29
|
const moment = require('moment');
|
|
30
30
|
const { promptUser } = require('../../lib/prompts/promptUtils');
|
|
31
31
|
|
|
32
|
-
const i18nKey = '
|
|
32
|
+
const i18nKey = 'commands.project.subcommands.listBuilds';
|
|
33
33
|
|
|
34
34
|
exports.command = 'list-builds [path]';
|
|
35
35
|
exports.describe = uiBetaTag(i18n(`${i18nKey}.describe`), false);
|
package/commands/project/logs.js
CHANGED
|
@@ -36,7 +36,7 @@ const { projectLogsPrompt } = require('../../lib/prompts/projectsLogsPrompt');
|
|
|
36
36
|
const { i18n } = require('../../lib/lang');
|
|
37
37
|
// const { EXIT_CODES } = require('../../lib/enums/exitCodes');
|
|
38
38
|
|
|
39
|
-
const i18nKey = '
|
|
39
|
+
const i18nKey = 'commands.project.subcommands.logs';
|
|
40
40
|
|
|
41
41
|
const getPrivateAppsUrl = accountId => {
|
|
42
42
|
const baseUrl = getHubSpotWebsiteOrigin(
|
package/commands/project/open.js
CHANGED
|
@@ -19,7 +19,7 @@ const { projectNamePrompt } = require('../../lib/prompts/projectNamePrompt');
|
|
|
19
19
|
const { uiBetaTag } = require('../../lib/ui');
|
|
20
20
|
const { EXIT_CODES } = require('../../lib/enums/exitCodes');
|
|
21
21
|
|
|
22
|
-
const i18nKey = '
|
|
22
|
+
const i18nKey = 'commands.project.subcommands.open';
|
|
23
23
|
|
|
24
24
|
exports.command = 'open [--project]';
|
|
25
25
|
exports.describe = uiBetaTag(i18n(`${i18nKey}.describe`), false);
|
|
@@ -37,9 +37,13 @@ exports.handler = async options => {
|
|
|
37
37
|
let projectName = project;
|
|
38
38
|
|
|
39
39
|
if (projectName) {
|
|
40
|
-
const projectExists = await ensureProjectExists(
|
|
41
|
-
|
|
42
|
-
|
|
40
|
+
const { projectExists } = await ensureProjectExists(
|
|
41
|
+
accountId,
|
|
42
|
+
projectName,
|
|
43
|
+
{
|
|
44
|
+
allowCreate: false,
|
|
45
|
+
}
|
|
46
|
+
);
|
|
43
47
|
|
|
44
48
|
if (!projectExists) {
|
|
45
49
|
process.exit(EXIT_CODES.ERROR);
|
|
@@ -28,7 +28,7 @@ const {
|
|
|
28
28
|
} = require('../../lib/errorHandlers/apiErrors');
|
|
29
29
|
const { EXIT_CODES } = require('../../lib/enums/exitCodes');
|
|
30
30
|
|
|
31
|
-
const i18nKey = '
|
|
31
|
+
const i18nKey = 'commands.project.subcommands.upload';
|
|
32
32
|
|
|
33
33
|
exports.command = 'upload [path] [--forceCreate] [--message]';
|
|
34
34
|
exports.describe = uiBetaTag(i18n(`${i18nKey}.describe`), false);
|
|
@@ -32,7 +32,7 @@ const { loadAndValidateOptions } = require('../../lib/validation');
|
|
|
32
32
|
const { EXIT_CODES } = require('../../lib/enums/exitCodes');
|
|
33
33
|
const { handleKeypress, handleExit } = require('../../lib/process');
|
|
34
34
|
|
|
35
|
-
const i18nKey = '
|
|
35
|
+
const i18nKey = 'commands.project.subcommands.watch';
|
|
36
36
|
|
|
37
37
|
exports.command = 'watch [path]';
|
|
38
38
|
exports.describe = uiBetaTag(i18n(`${i18nKey}.describe`), false);
|
package/commands/project.js
CHANGED
|
@@ -12,7 +12,7 @@ const open = require('./project/open');
|
|
|
12
12
|
const dev = require('./project/dev');
|
|
13
13
|
const add = require('./project/add');
|
|
14
14
|
|
|
15
|
-
const i18nKey = '
|
|
15
|
+
const i18nKey = 'commands.project';
|
|
16
16
|
|
|
17
17
|
exports.command = 'project';
|
|
18
18
|
exports.describe = uiBetaTag(i18n(`${i18nKey}.describe`), false);
|
package/commands/remove.js
CHANGED
|
@@ -15,7 +15,7 @@ const { loadAndValidateOptions } = require('../lib/validation');
|
|
|
15
15
|
const { trackCommandUsage } = require('../lib/usageTracking');
|
|
16
16
|
const { i18n } = require('../lib/lang');
|
|
17
17
|
|
|
18
|
-
const i18nKey = '
|
|
18
|
+
const i18nKey = 'commands.remove';
|
|
19
19
|
|
|
20
20
|
exports.command = 'remove <path>';
|
|
21
21
|
exports.describe = i18n(`${i18nKey}.describe`);
|
|
@@ -39,7 +39,7 @@ const {
|
|
|
39
39
|
HUBSPOT_ACCOUNT_TYPE_STRINGS,
|
|
40
40
|
} = require('@hubspot/local-dev-lib/constants/config');
|
|
41
41
|
|
|
42
|
-
const i18nKey = '
|
|
42
|
+
const i18nKey = 'commands.sandbox.subcommands.create';
|
|
43
43
|
|
|
44
44
|
exports.command = 'create [--name] [--type]';
|
|
45
45
|
exports.describe = i18n(`${i18nKey}.describe`);
|
|
@@ -92,14 +92,14 @@ exports.handler = async options => {
|
|
|
92
92
|
} catch (err) {
|
|
93
93
|
if (isMissingScopeError(err)) {
|
|
94
94
|
logger.error(
|
|
95
|
-
i18n('
|
|
95
|
+
i18n('lib.sandbox.create.failure.scopes.message', {
|
|
96
96
|
accountName: accountConfig.name || accountId,
|
|
97
97
|
})
|
|
98
98
|
);
|
|
99
99
|
const websiteOrigin = getHubSpotWebsiteOrigin(env);
|
|
100
100
|
const url = `${websiteOrigin}/personal-access-key/${accountId}`;
|
|
101
101
|
logger.info(
|
|
102
|
-
i18n('
|
|
102
|
+
i18n('lib.sandbox.create.failure.scopes.instructions', {
|
|
103
103
|
accountName: accountConfig.name || accountId,
|
|
104
104
|
url,
|
|
105
105
|
})
|
|
@@ -123,7 +123,7 @@ exports.handler = async options => {
|
|
|
123
123
|
let sandboxSyncPromptResult = true;
|
|
124
124
|
let contactRecordsSyncPromptResult = true;
|
|
125
125
|
if (!force) {
|
|
126
|
-
const syncI18nKey = '
|
|
126
|
+
const syncI18nKey = 'lib.sandbox.sync';
|
|
127
127
|
const sandboxLangKey =
|
|
128
128
|
sandboxType === HUBSPOT_ACCOUNT_TYPES.DEVELOPMENT_SANDBOX
|
|
129
129
|
? 'developer'
|
|
@@ -35,7 +35,7 @@ const { getHubSpotWebsiteOrigin } = require('@hubspot/local-dev-lib/urls');
|
|
|
35
35
|
const { getValidEnv } = require('@hubspot/local-dev-lib/environment');
|
|
36
36
|
const { uiAccountDescription } = require('../../lib/ui');
|
|
37
37
|
|
|
38
|
-
const i18nKey = '
|
|
38
|
+
const i18nKey = 'commands.sandbox.subcommands.delete';
|
|
39
39
|
|
|
40
40
|
exports.command = 'delete [--account]';
|
|
41
41
|
exports.describe = i18n(`${i18nKey}.describe`);
|
package/commands/sandbox/sync.js
CHANGED
|
@@ -32,7 +32,7 @@ const {
|
|
|
32
32
|
HUBSPOT_ACCOUNT_TYPES,
|
|
33
33
|
} = require('@hubspot/local-dev-lib/constants/config');
|
|
34
34
|
|
|
35
|
-
const i18nKey = '
|
|
35
|
+
const i18nKey = 'commands.sandbox.subcommands.sync';
|
|
36
36
|
|
|
37
37
|
exports.command = 'sync';
|
|
38
38
|
exports.describe = i18n(`${i18nKey}.describe`);
|
|
@@ -95,7 +95,7 @@ exports.handler = async options => {
|
|
|
95
95
|
})
|
|
96
96
|
) {
|
|
97
97
|
logger.error(
|
|
98
|
-
i18n('
|
|
98
|
+
i18n('lib.sandbox.sync.failure.objectNotFound', {
|
|
99
99
|
account: uiAccountDescription(accountId),
|
|
100
100
|
})
|
|
101
101
|
);
|
package/commands/sandbox.js
CHANGED
|
@@ -4,7 +4,7 @@ const create = require('./sandbox/create');
|
|
|
4
4
|
const del = require('./sandbox/delete');
|
|
5
5
|
const sync = require('./sandbox/sync');
|
|
6
6
|
|
|
7
|
-
const i18nKey = '
|
|
7
|
+
const i18nKey = 'commands.sandbox';
|
|
8
8
|
|
|
9
9
|
exports.command = 'sandbox';
|
|
10
10
|
exports.describe = i18n(`${i18nKey}.describe`);
|
|
@@ -18,7 +18,7 @@ const { uiAccountDescription } = require('../../lib/ui');
|
|
|
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.add';
|
|
22
22
|
|
|
23
23
|
exports.command = 'add <name>';
|
|
24
24
|
exports.describe = i18n(`${i18nKey}.describe`);
|
|
@@ -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.delete';
|
|
21
21
|
|
|
22
22
|
exports.command = 'delete <name>';
|
|
23
23
|
exports.describe = i18n(`${i18nKey}.describe`);
|
|
@@ -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`);
|
|
@@ -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`);
|
package/commands/secrets.js
CHANGED
|
@@ -6,7 +6,7 @@ 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`);
|
|
@@ -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`);
|
|
@@ -33,9 +33,9 @@ const {
|
|
|
33
33
|
COMPONENT_TYPES,
|
|
34
34
|
} = require('../../lib/projectStructure');
|
|
35
35
|
|
|
36
|
-
const i18nKey = '
|
|
36
|
+
const i18nKey = 'commands.preview';
|
|
37
37
|
exports.command = 'preview [--src] [--dest]';
|
|
38
|
-
exports.describe =
|
|
38
|
+
exports.describe = i18n(`${i18nKey}.describe`);
|
|
39
39
|
|
|
40
40
|
const validateSrcPath = src => {
|
|
41
41
|
const logInvalidPath = () => {
|
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,
|
package/commands/watch.js
CHANGED
|
@@ -19,7 +19,7 @@ const { trackCommandUsage } = require('../lib/usageTracking');
|
|
|
19
19
|
const { i18n } = require('../lib/lang');
|
|
20
20
|
const { getUploadableFileList } = require('../lib/upload');
|
|
21
21
|
|
|
22
|
-
const i18nKey = '
|
|
22
|
+
const i18nKey = 'commands.watch';
|
|
23
23
|
const { EXIT_CODES } = require('../lib/enums/exitCodes');
|
|
24
24
|
|
|
25
25
|
exports.command = 'watch [--src] [--dest]';
|