@hubspot/cli 7.2.5-experimental.0 → 7.3.0-beta.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/bin/cli.js +10 -60
- package/commands/account/clean.js +12 -44
- package/commands/account/info.js +9 -33
- package/commands/account/list.js +9 -28
- package/commands/account/remove.js +8 -37
- package/commands/account/rename.js +4 -5
- package/commands/account/use.js +7 -21
- package/commands/account.js +0 -6
- package/commands/auth.js +2 -6
- package/commands/cms/convertFields.js +5 -6
- package/commands/cms/getReactModule.js +7 -8
- package/commands/cms/lighthouseScore.js +15 -16
- package/commands/config/set.d.ts +0 -12
- package/commands/config/set.js +29 -31
- package/commands/config.d.ts +1 -4
- package/commands/config.js +10 -45
- package/commands/create/api-sample.js +6 -7
- package/commands/create/module.js +1 -2
- package/commands/create/template.js +1 -2
- package/commands/customObject/create.js +8 -9
- package/commands/customObject/schema/create.js +5 -6
- package/commands/customObject/schema/delete.js +9 -10
- package/commands/customObject/schema/fetch-all.js +7 -8
- package/commands/customObject/schema/fetch.js +9 -10
- package/commands/customObject/schema/list.js +2 -3
- package/commands/customObject/schema/update.js +7 -8
- package/commands/customObject/schema.js +1 -2
- package/commands/customObject.d.ts +1 -1
- package/commands/filemanager/fetch.js +5 -6
- package/commands/filemanager/upload.js +12 -13
- package/commands/function/deploy.js +9 -10
- package/commands/function/list.js +4 -5
- package/commands/function/server.js +7 -8
- package/commands/init.js +10 -9
- package/commands/mv.d.ts +1 -1
- package/commands/project/add.d.ts +10 -0
- package/commands/project/add.js +64 -52
- package/commands/project/create.js +1 -0
- package/commands/project/deploy.d.ts +11 -1
- package/commands/project/deploy.js +79 -71
- package/commands/project/dev/index.d.ts +1 -1
- package/commands/project/download.d.ts +11 -0
- package/commands/project/download.js +56 -54
- package/commands/project/listBuilds.d.ts +10 -0
- package/commands/project/listBuilds.js +101 -91
- package/commands/project/open.d.ts +9 -0
- package/commands/project/open.js +43 -35
- package/commands/sandbox/create.d.ts +1 -1
- package/commands/sandbox/delete.d.ts +1 -1
- package/commands/sandbox.d.ts +1 -1
- package/lang/en.js +3453 -0
- package/lang/en.lyaml +17 -88
- package/lib/DevServerManagerV2.d.ts +1 -2
- package/lib/DevServerManagerV2.js +1 -2
- package/lib/LocalDevManagerV2.js +10 -15
- package/lib/dependencyManagement.js +8 -9
- package/lib/doctor/Diagnosis.d.ts +2 -1
- package/lib/doctor/Diagnosis.js +6 -10
- package/lib/doctor/DiagnosticInfoBuilder.d.ts +0 -1
- package/lib/doctor/DiagnosticInfoBuilder.js +0 -1
- package/lib/doctor/Doctor.d.ts +0 -1
- package/lib/doctor/Doctor.js +0 -18
- package/lib/errorHandlers/index.js +17 -0
- package/lib/projects/buildAndDeploy.d.ts +1 -1
- package/lib/projects/buildAndDeploy.js +1 -1
- package/lib/projects/index.d.ts +1 -1
- package/lib/projects/index.js +1 -1
- package/lib/projects/structure.d.ts +1 -2
- package/lib/projects/structure.js +0 -4
- package/lib/prompts/downloadProjectPrompt.js +5 -1
- package/lib/prompts/projectNamePrompt.d.ts +6 -1
- package/lib/prompts/projectNamePrompt.js +17 -16
- package/lib/testUtils.d.ts +4 -2
- package/lib/testUtils.js +17 -3
- package/lib/ui/index.d.ts +2 -2
- package/lib/ui/index.js +0 -5
- package/lib/yargsUtils.d.ts +2 -2
- package/lib/yargsUtils.js +2 -2
- package/package.json +4 -4
- package/types/ProjectComponents.d.ts +0 -15
- package/commands/account/auth.d.ts +0 -10
- package/commands/account/auth.js +0 -169
- package/commands/account/createOverride.d.ts +0 -10
- package/commands/account/createOverride.js +0 -103
- package/commands/account/removeOverride.d.ts +0 -10
- package/commands/account/removeOverride.js +0 -77
- package/commands/config/migrate.d.ts +0 -10
- package/commands/config/migrate.js +0 -85
- package/lib/configMigrate.d.ts +0 -2
- package/lib/configMigrate.js +0 -105
package/lang/en.js
ADDED
|
@@ -0,0 +1,3453 @@
|
|
|
1
|
+
import chalk from 'chalk';
|
|
2
|
+
|
|
3
|
+
export const commands = {
|
|
4
|
+
generalErrors: {
|
|
5
|
+
updateNotify: {
|
|
6
|
+
notifyTitle: 'Update available',
|
|
7
|
+
cmsUpdateNotification: (packageName, updateCommand) =>
|
|
8
|
+
`${chalk.bold('The CMS CLI is now the HubSpot CLI')}\n\nTo upgrade, uninstall ${chalk.bold(packageName)}\nand then run ${updateCommand}`,
|
|
9
|
+
cliUpdateNotification: (currentVersion, latestVersion, updateCommand) =>
|
|
10
|
+
`HubSpot CLI version ${chalk.cyan(chalk.bold(currentVersion))} is outdated.\nRun ${updateCommand} to upgrade to version ${chalk.cyan(chalk.bold(latestVersion))}`,
|
|
11
|
+
},
|
|
12
|
+
srcIsProject: (src, command) =>
|
|
13
|
+
`"${src}" is in a project folder. Did you mean "hs project ${command}"?`,
|
|
14
|
+
setDefaultAccountMoved:
|
|
15
|
+
'This command has moved. Try `hs accounts use` instead',
|
|
16
|
+
handleDeprecatedEnvVariables: {
|
|
17
|
+
portalEnvVarDeprecated:
|
|
18
|
+
'The HUBSPOT_PORTAL_ID environment variable is deprecated. Please use HUBSPOT_ACCOUNT_ID instead.',
|
|
19
|
+
},
|
|
20
|
+
loadConfigMiddleware: {
|
|
21
|
+
configFileExists: configPath =>
|
|
22
|
+
`A configuration file already exists at ${configPath}. To specify a new configuration file, delete the existing one and try again.`,
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
completion: {
|
|
26
|
+
describe:
|
|
27
|
+
'Enable bash completion shortcuts for commands. Concat the generated script to your .bashrc, .bash_profile, or .zshrc file.',
|
|
28
|
+
examples: {
|
|
29
|
+
default: 'Generate shell completion scripts for the zsh shell',
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
account: {
|
|
33
|
+
describe: 'Commands for managing configured accounts.',
|
|
34
|
+
subcommands: {
|
|
35
|
+
list: {
|
|
36
|
+
accounts: `${chalk.bold('Accounts')}:`,
|
|
37
|
+
defaultAccount: account =>
|
|
38
|
+
`${chalk.bold('Default account')}: ${account}`,
|
|
39
|
+
describe: 'List names of accounts defined in config.',
|
|
40
|
+
configPath: configPath => `${chalk.bold('Config path')}: ${configPath}`,
|
|
41
|
+
labels: {
|
|
42
|
+
accountId: 'Account ID',
|
|
43
|
+
authType: 'Auth Type',
|
|
44
|
+
name: 'Name',
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
rename: {
|
|
48
|
+
describe: 'Rename an account in the config.',
|
|
49
|
+
positionals: {
|
|
50
|
+
accountName: {
|
|
51
|
+
describe: 'Name of account to be renamed.',
|
|
52
|
+
},
|
|
53
|
+
newName: {
|
|
54
|
+
describe: 'New name for account.',
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
success: {
|
|
58
|
+
renamed: (name, newName) =>
|
|
59
|
+
`Account "${name}" renamed to "${newName}"`,
|
|
60
|
+
},
|
|
61
|
+
},
|
|
62
|
+
use: {
|
|
63
|
+
describe:
|
|
64
|
+
'Set the Hubspot account to use as the default account. The default account can be overridden with the "--account" option.',
|
|
65
|
+
errors: {
|
|
66
|
+
accountNotFound: (specifiedAccount, configPath) =>
|
|
67
|
+
`The account "${specifiedAccount}" could not be found in ${configPath}`,
|
|
68
|
+
},
|
|
69
|
+
examples: {
|
|
70
|
+
default: 'Select a HubSpot account to use as the default account',
|
|
71
|
+
idBased:
|
|
72
|
+
'Set the default account to the account in the config with accountId equal to "1234567"',
|
|
73
|
+
nameBased:
|
|
74
|
+
'Set the default account to the account in the config with name equal to "MyAccount"',
|
|
75
|
+
},
|
|
76
|
+
options: {
|
|
77
|
+
account: {
|
|
78
|
+
describe: 'Account name or id to use as the default',
|
|
79
|
+
},
|
|
80
|
+
},
|
|
81
|
+
promptMessage: 'Select an account to use as the default',
|
|
82
|
+
success: {
|
|
83
|
+
defaultAccountUpdated: accountName =>
|
|
84
|
+
`Default account updated to "${accountName}"`,
|
|
85
|
+
},
|
|
86
|
+
},
|
|
87
|
+
remove: {
|
|
88
|
+
describe: 'Remove an account from the config.',
|
|
89
|
+
logs: {
|
|
90
|
+
replaceDefaultAccount: 'The removed account was the default account.',
|
|
91
|
+
},
|
|
92
|
+
prompts: {
|
|
93
|
+
selectAccountToRemove: 'Select an account to remove from the config',
|
|
94
|
+
},
|
|
95
|
+
errors: {
|
|
96
|
+
accountNotFound: (specifiedAccount, configPath) =>
|
|
97
|
+
`The account "${specifiedAccount}" could not be found in ${configPath}`,
|
|
98
|
+
},
|
|
99
|
+
examples: {
|
|
100
|
+
default: 'Select a HubSpot account to remove from the config',
|
|
101
|
+
byName: 'Remove the account "MyAccount" from the config',
|
|
102
|
+
},
|
|
103
|
+
options: {
|
|
104
|
+
account: {
|
|
105
|
+
describe: 'Account name or id to remove',
|
|
106
|
+
},
|
|
107
|
+
},
|
|
108
|
+
promptMessage: 'Select an account to remove',
|
|
109
|
+
success: {
|
|
110
|
+
accountRemoved: accountName =>
|
|
111
|
+
`Account "${accountName}" removed from the config`,
|
|
112
|
+
},
|
|
113
|
+
},
|
|
114
|
+
info: {
|
|
115
|
+
accountId: accountId => `${chalk.bold('Account ID')}: ${accountId}`,
|
|
116
|
+
describe:
|
|
117
|
+
'Print information about the default account, or about the account specified with the "account" option.',
|
|
118
|
+
errors: {
|
|
119
|
+
notUsingPersonalAccessKey:
|
|
120
|
+
'This command currently only supports fetching scopes for the personal access key auth type.',
|
|
121
|
+
},
|
|
122
|
+
examples: {
|
|
123
|
+
default: 'Print information for the default account',
|
|
124
|
+
idBased:
|
|
125
|
+
'Print information for the account with accountId equal to "1234567"',
|
|
126
|
+
nameBased:
|
|
127
|
+
'Print information for the account in the config with name equal to "MyAccount"',
|
|
128
|
+
},
|
|
129
|
+
name: name => `${chalk.bold('Account name')}: ${name}`,
|
|
130
|
+
scopeGroups: `${chalk.bold('Scopes available')}:`,
|
|
131
|
+
},
|
|
132
|
+
clean: {
|
|
133
|
+
describe:
|
|
134
|
+
'Check for inactive accounts and removes them from the CLI config.',
|
|
135
|
+
noResults: 'No inactive accounts found to remove.',
|
|
136
|
+
loading: {
|
|
137
|
+
add: 'Looking for inactive accounts…',
|
|
138
|
+
},
|
|
139
|
+
inactiveAccountsFound: {
|
|
140
|
+
one: '1 inactive account found:',
|
|
141
|
+
other: count => `${count} inactive accounts found:`,
|
|
142
|
+
},
|
|
143
|
+
confirm: {
|
|
144
|
+
one: 'Remove 1 inactive account from the CLI config?',
|
|
145
|
+
other: count =>
|
|
146
|
+
`Remove ${count} inactive accounts from the CLI config?`,
|
|
147
|
+
},
|
|
148
|
+
removeSuccess: accountName =>
|
|
149
|
+
`Removed ${accountName} from the CLI config.`,
|
|
150
|
+
},
|
|
151
|
+
},
|
|
152
|
+
},
|
|
153
|
+
auth: {
|
|
154
|
+
describe: configName =>
|
|
155
|
+
`Configure authentication for your HubSpot account. This will update the ${configName} file that stores your account information.`,
|
|
156
|
+
errors: {
|
|
157
|
+
noConfigFileFound:
|
|
158
|
+
'No config file was found. To create a new config file, use the "hs init" command.',
|
|
159
|
+
unsupportedAuthType: (type, supportedProtocols) =>
|
|
160
|
+
`Unsupported auth type: ${type}. The only supported authentication protocols are ${supportedProtocols}.`,
|
|
161
|
+
},
|
|
162
|
+
options: {
|
|
163
|
+
authType: {
|
|
164
|
+
describe: 'Authentication mechanism',
|
|
165
|
+
defaultDescription: authMethod =>
|
|
166
|
+
`"${authMethod}": An access token tied to a specific user account. This is the recommended way of authenticating with local development tools.`,
|
|
167
|
+
},
|
|
168
|
+
account: {
|
|
169
|
+
describe: 'HubSpot account to authenticate',
|
|
170
|
+
},
|
|
171
|
+
},
|
|
172
|
+
success: {
|
|
173
|
+
configFileUpdated: (accountName, configFilename, authType) =>
|
|
174
|
+
`Account "${accountName}" updated in ${configFilename} using "${authType}"`,
|
|
175
|
+
},
|
|
176
|
+
},
|
|
177
|
+
config: {
|
|
178
|
+
describe: 'Commands for managing the CLI config file.',
|
|
179
|
+
subcommands: {
|
|
180
|
+
set: {
|
|
181
|
+
describe:
|
|
182
|
+
'Set various configuration options within the hubspot.config.yml file.',
|
|
183
|
+
promptMessage: 'Select a config option to update',
|
|
184
|
+
examples: {
|
|
185
|
+
default: 'Opens a prompt to select a config item to modify',
|
|
186
|
+
},
|
|
187
|
+
options: {
|
|
188
|
+
defaultMode: {
|
|
189
|
+
describe: 'Set the default CMS publish mode',
|
|
190
|
+
promptMessage: 'Select CMS publish mode to be used as the default',
|
|
191
|
+
error: validModes =>
|
|
192
|
+
`The provided CMS publish mode is invalid. Valid values are ${validModes}.`,
|
|
193
|
+
success: mode => `Default mode updated to: ${mode}`,
|
|
194
|
+
},
|
|
195
|
+
allowUsageTracking: {
|
|
196
|
+
describe: 'Enable or disable usage tracking',
|
|
197
|
+
promptMessage: 'Choose to enable or disable usage tracking',
|
|
198
|
+
success: isEnabled => `Allow usage tracking set to: "${isEnabled}"`,
|
|
199
|
+
labels: {
|
|
200
|
+
enabled: 'Enabled',
|
|
201
|
+
disabled: 'Disabled',
|
|
202
|
+
},
|
|
203
|
+
},
|
|
204
|
+
httpTimeout: {
|
|
205
|
+
describe: 'Set the http timeout duration',
|
|
206
|
+
promptMessage: 'Enter http timeout duration',
|
|
207
|
+
success: timeout => `The http timeout has been set to: ${timeout}`,
|
|
208
|
+
},
|
|
209
|
+
},
|
|
210
|
+
},
|
|
211
|
+
},
|
|
212
|
+
},
|
|
213
|
+
cms: {
|
|
214
|
+
describe: 'Commands for working with the CMS.',
|
|
215
|
+
subcommands: {
|
|
216
|
+
lighthouseScore: {
|
|
217
|
+
describe: 'Score a theme using Google lighthouse.',
|
|
218
|
+
examples: {
|
|
219
|
+
default: 'Get the lighthouse score for the my-theme theme',
|
|
220
|
+
},
|
|
221
|
+
info: {
|
|
222
|
+
promptMessage: 'Select a theme to score',
|
|
223
|
+
fetchingThemes: 'Fetching available themes',
|
|
224
|
+
generatingScore: theme =>
|
|
225
|
+
`Generating Google Lighthouse score for ${theme}`,
|
|
226
|
+
targetDeviceNote: target =>
|
|
227
|
+
`Scores are being shown for ${target} only.`,
|
|
228
|
+
verboseOptionNote:
|
|
229
|
+
'Theme scores are averages of all theme templates. Use the [--verbose] option to include individual template scores.',
|
|
230
|
+
pageTemplateScoreTitle: 'Page template scores',
|
|
231
|
+
lighthouseLinksTitle: 'Lighthouse links',
|
|
232
|
+
failedTemplatePathsTitle:
|
|
233
|
+
'The following templates could not be scored',
|
|
234
|
+
},
|
|
235
|
+
errors: {
|
|
236
|
+
targetOptionRequired: '[--target] is required for detailed view',
|
|
237
|
+
invalidTargetOption: '[--target] can only be used for detailed view',
|
|
238
|
+
themeNotFound: theme =>
|
|
239
|
+
`Theme "${theme}" not found. Please rerun using a valid theme path.`,
|
|
240
|
+
failedToFetchThemes:
|
|
241
|
+
'Failed to fetch available themes. Try running again with the [--theme] option',
|
|
242
|
+
failedToGetLighthouseScore:
|
|
243
|
+
'Failed to generate a Google Lighthouse score',
|
|
244
|
+
},
|
|
245
|
+
options: {
|
|
246
|
+
theme: {
|
|
247
|
+
describe: 'Path to the theme in the Design Manager',
|
|
248
|
+
},
|
|
249
|
+
target: {
|
|
250
|
+
describe: 'Medium to test against',
|
|
251
|
+
},
|
|
252
|
+
verbose: {
|
|
253
|
+
describe: 'View a detailed output of the lighthouse scores',
|
|
254
|
+
},
|
|
255
|
+
},
|
|
256
|
+
},
|
|
257
|
+
getReactModule: {
|
|
258
|
+
describe: 'Get a specified default React module.',
|
|
259
|
+
selectModulePrompt: 'Select a React module to download',
|
|
260
|
+
positionals: {
|
|
261
|
+
name: {
|
|
262
|
+
describe: 'Name of the react modules to be fetched',
|
|
263
|
+
},
|
|
264
|
+
dest: {
|
|
265
|
+
describe: 'Destination to download the react module to',
|
|
266
|
+
},
|
|
267
|
+
},
|
|
268
|
+
success: {
|
|
269
|
+
moduleDownloaded: (moduleName, path) =>
|
|
270
|
+
`"${moduleName}" succesfully downloaded to "${path}"`,
|
|
271
|
+
},
|
|
272
|
+
errors: {
|
|
273
|
+
pathExists: path => `Folder already exists at "${path}"`,
|
|
274
|
+
invalidName:
|
|
275
|
+
'Module not found with that name, please check the spelling of the module you are trying to download.',
|
|
276
|
+
},
|
|
277
|
+
},
|
|
278
|
+
},
|
|
279
|
+
},
|
|
280
|
+
create: {
|
|
281
|
+
describe: supportedAssetTypes =>
|
|
282
|
+
`Create HubSpot sample apps and CMS assets. Supported assets are ${supportedAssetTypes}.`,
|
|
283
|
+
errors: {
|
|
284
|
+
deprecatedAssetType: (assetType, newCommand, type) =>
|
|
285
|
+
`The CLI command for asset type ${assetType} has been deprecated in an effort to make it easier to know what asset types can be created. Run the "${newCommand}" command instead. Then when prompted select "${type}".`,
|
|
286
|
+
unsupportedAssetType: (assetType, supportedAssetTypes) =>
|
|
287
|
+
`The asset type ${assetType} is not supported. Supported asset types are ${supportedAssetTypes}.`,
|
|
288
|
+
unusablePath: path =>
|
|
289
|
+
`The "${path}" is not a usable path to a directory.`,
|
|
290
|
+
},
|
|
291
|
+
positionals: {
|
|
292
|
+
dest: {
|
|
293
|
+
describe:
|
|
294
|
+
'Destination folder for the new asset, relative to your current working directory. If omitted, this argument will default to your current working directory',
|
|
295
|
+
},
|
|
296
|
+
name: {
|
|
297
|
+
describe: 'Name of new asset',
|
|
298
|
+
},
|
|
299
|
+
type: {
|
|
300
|
+
describe: 'Type of asset',
|
|
301
|
+
},
|
|
302
|
+
},
|
|
303
|
+
subcommands: {
|
|
304
|
+
apiSample: {
|
|
305
|
+
folderOverwritePrompt: folderName =>
|
|
306
|
+
`The folder with name "${folderName}" already exists. Overwrite?`,
|
|
307
|
+
errors: {
|
|
308
|
+
nameRequired:
|
|
309
|
+
'The "name" argument is required when creating an API Sample.',
|
|
310
|
+
noSamples:
|
|
311
|
+
'Currently there are no samples available. Please try again later.',
|
|
312
|
+
},
|
|
313
|
+
info: {
|
|
314
|
+
sampleChosen: (sampleType, sampleLanguage) =>
|
|
315
|
+
`You've chosen ${sampleType} sample written on ${sampleLanguage} language`,
|
|
316
|
+
},
|
|
317
|
+
success: {
|
|
318
|
+
sampleCreated: filePath =>
|
|
319
|
+
`Please follow ${filePath}/README.md to find out how to run the sample`,
|
|
320
|
+
},
|
|
321
|
+
},
|
|
322
|
+
module: {
|
|
323
|
+
errors: {
|
|
324
|
+
nameRequired:
|
|
325
|
+
'The "name" argument is required when creating a Custom Module.',
|
|
326
|
+
},
|
|
327
|
+
},
|
|
328
|
+
template: {
|
|
329
|
+
errors: {
|
|
330
|
+
nameRequired:
|
|
331
|
+
'The "name" argument is required when creating a Template.',
|
|
332
|
+
},
|
|
333
|
+
},
|
|
334
|
+
},
|
|
335
|
+
},
|
|
336
|
+
customObject: {
|
|
337
|
+
betaMessage: `${chalk.bold('[BETA]')} The Custom Object CLI is currently in beta and is subject to change.`,
|
|
338
|
+
describe: 'Commands for managing custom objects.',
|
|
339
|
+
seeMoreLink: 'View our docs to find out more.',
|
|
340
|
+
subcommands: {
|
|
341
|
+
create: {
|
|
342
|
+
describe: 'Create custom object instances.',
|
|
343
|
+
errors: {
|
|
344
|
+
invalidObjectDefinition:
|
|
345
|
+
'The object definition is invalid. Please check the schema and try again.',
|
|
346
|
+
creationFailed: definition =>
|
|
347
|
+
`Object creation from ${definition} failed`,
|
|
348
|
+
},
|
|
349
|
+
options: {
|
|
350
|
+
path: {
|
|
351
|
+
describe:
|
|
352
|
+
'Local path to the JSON file containing an array of object definitions',
|
|
353
|
+
},
|
|
354
|
+
},
|
|
355
|
+
positionals: {
|
|
356
|
+
name: {
|
|
357
|
+
describe: 'Schema name to add the object instance to',
|
|
358
|
+
},
|
|
359
|
+
},
|
|
360
|
+
success: {
|
|
361
|
+
objectsCreated: 'Objects created',
|
|
362
|
+
},
|
|
363
|
+
inputName:
|
|
364
|
+
"[--name] Enter the name of the schema for the custom object(s) you'd like to create:",
|
|
365
|
+
inputPath:
|
|
366
|
+
'[--path] Enter the path to the JSON file containing the object definitions:',
|
|
367
|
+
},
|
|
368
|
+
schema: {
|
|
369
|
+
describe: 'Commands for managing custom object schemas.',
|
|
370
|
+
subcommands: {
|
|
371
|
+
create: {
|
|
372
|
+
describe: 'Create a custom object schema.',
|
|
373
|
+
errors: {
|
|
374
|
+
invalidSchema:
|
|
375
|
+
'The schema definition is invalid. Please check the schema and try again.',
|
|
376
|
+
creationFailed: definition =>
|
|
377
|
+
`Schema creation from ${definition} failed`,
|
|
378
|
+
},
|
|
379
|
+
options: {
|
|
380
|
+
definition: {
|
|
381
|
+
describe:
|
|
382
|
+
'Local path to the JSON file containing the schema definition',
|
|
383
|
+
},
|
|
384
|
+
},
|
|
385
|
+
success: {
|
|
386
|
+
schemaCreated: accountId =>
|
|
387
|
+
`Your schema has been created in account "${accountId}"`,
|
|
388
|
+
schemaViewable: url => `Schema can be viewed at ${url}`,
|
|
389
|
+
},
|
|
390
|
+
},
|
|
391
|
+
delete: {
|
|
392
|
+
describe: 'Delete a custom object schema.',
|
|
393
|
+
errors: {
|
|
394
|
+
delete: name => `Unable to delete ${name}`,
|
|
395
|
+
},
|
|
396
|
+
examples: {
|
|
397
|
+
default: 'Delete "schemaName" schema',
|
|
398
|
+
},
|
|
399
|
+
positionals: {
|
|
400
|
+
name: {
|
|
401
|
+
describe: 'Name of the target schema',
|
|
402
|
+
},
|
|
403
|
+
},
|
|
404
|
+
options: {
|
|
405
|
+
force: {
|
|
406
|
+
describe: 'Force the deletion of the schema.',
|
|
407
|
+
},
|
|
408
|
+
},
|
|
409
|
+
success: {
|
|
410
|
+
delete: name => `Successfully initiated deletion of ${name}`,
|
|
411
|
+
},
|
|
412
|
+
confirmDelete: name =>
|
|
413
|
+
`Are you sure you want to delete the schema "${name}"?`,
|
|
414
|
+
deleteCancelled: name => `Deletion of schema "${name}" cancelled.`,
|
|
415
|
+
selectSchema: 'Which schema would you like to delete?',
|
|
416
|
+
},
|
|
417
|
+
fetchAll: {
|
|
418
|
+
describe: 'Fetch all custom object schemas for an account.',
|
|
419
|
+
errors: {
|
|
420
|
+
fetch: 'Unable to fetch schemas',
|
|
421
|
+
},
|
|
422
|
+
examples: {
|
|
423
|
+
default:
|
|
424
|
+
'Fetch all schemas for an account and put them in the current working directory',
|
|
425
|
+
specifyPath:
|
|
426
|
+
'Fetch all schemas for an account and put them in a directory named my/folder',
|
|
427
|
+
},
|
|
428
|
+
positionals: {
|
|
429
|
+
dest: {
|
|
430
|
+
describe: 'Local folder where schemas will be written',
|
|
431
|
+
},
|
|
432
|
+
},
|
|
433
|
+
success: {
|
|
434
|
+
fetch: path => `Saved schemas to ${path}`,
|
|
435
|
+
},
|
|
436
|
+
inputDest: 'Where would you like to save the schemas?',
|
|
437
|
+
},
|
|
438
|
+
fetch: {
|
|
439
|
+
describe: 'Fetch a custom object schema.',
|
|
440
|
+
errors: {
|
|
441
|
+
fetch: name => `Unable to fetch ${name}`,
|
|
442
|
+
},
|
|
443
|
+
examples: {
|
|
444
|
+
default:
|
|
445
|
+
'Fetch "schemaId" schema and put it in the current working directory',
|
|
446
|
+
specifyPath:
|
|
447
|
+
'Fetch "schemaId" schema and put it in a directory named my/folder',
|
|
448
|
+
},
|
|
449
|
+
positionals: {
|
|
450
|
+
dest: {
|
|
451
|
+
describe: 'Local folder where schema will be written',
|
|
452
|
+
},
|
|
453
|
+
name: {
|
|
454
|
+
describe: 'Name of the target schema',
|
|
455
|
+
},
|
|
456
|
+
},
|
|
457
|
+
selectSchema: 'Which schema would you like to fetch?',
|
|
458
|
+
inputDest: 'What would you like to name the destination file?',
|
|
459
|
+
success: {
|
|
460
|
+
save: (name, path) =>
|
|
461
|
+
`The schema "${name}" has been saved to "${path}"`,
|
|
462
|
+
savedToPath: path => `Saved schema to ${path}`,
|
|
463
|
+
},
|
|
464
|
+
},
|
|
465
|
+
list: {
|
|
466
|
+
describe: 'List custom object schemas.',
|
|
467
|
+
errors: {
|
|
468
|
+
list: 'Unable to list schemas',
|
|
469
|
+
},
|
|
470
|
+
},
|
|
471
|
+
update: {
|
|
472
|
+
describe: 'Update an existing custom object schema.',
|
|
473
|
+
errors: {
|
|
474
|
+
invalidSchema:
|
|
475
|
+
'The schema definition is invalid. Please check the schema and try again.',
|
|
476
|
+
update: definition => `Schema update from ${definition} failed`,
|
|
477
|
+
},
|
|
478
|
+
options: {
|
|
479
|
+
path: {
|
|
480
|
+
describe:
|
|
481
|
+
'Local path to the JSON file containing the schema definition',
|
|
482
|
+
},
|
|
483
|
+
},
|
|
484
|
+
positionals: {
|
|
485
|
+
name: {
|
|
486
|
+
describe: 'Name of the target schema',
|
|
487
|
+
},
|
|
488
|
+
},
|
|
489
|
+
success: {
|
|
490
|
+
update: accountId =>
|
|
491
|
+
`Your schema has been updated in account "${accountId}"`,
|
|
492
|
+
viewAtUrl: url => `Schema can be viewed at ${url}`,
|
|
493
|
+
},
|
|
494
|
+
selectSchema: 'Which schema would you like to update?',
|
|
495
|
+
},
|
|
496
|
+
},
|
|
497
|
+
},
|
|
498
|
+
},
|
|
499
|
+
},
|
|
500
|
+
doctor: {
|
|
501
|
+
describe:
|
|
502
|
+
'Retrieve diagnostic information about your local HubSpot configurations.',
|
|
503
|
+
options: {
|
|
504
|
+
outputDir: 'Directory to save a detailed diagnosis JSON file in',
|
|
505
|
+
},
|
|
506
|
+
errors: {
|
|
507
|
+
generatingDiagnosis: 'Error generating diagnosis',
|
|
508
|
+
unableToWriteOutputFile: (file, errorMessage) =>
|
|
509
|
+
`Unable to write output to ${chalk.bold(file)}, ${errorMessage}`,
|
|
510
|
+
},
|
|
511
|
+
outputWritten: filename => `Output written to ${chalk.bold(filename)}`,
|
|
512
|
+
},
|
|
513
|
+
fetch: {
|
|
514
|
+
describe:
|
|
515
|
+
'Fetch a file, directory or module from HubSpot and write to a path on your computer.',
|
|
516
|
+
errors: {
|
|
517
|
+
sourceRequired: 'A source to fetch is required.',
|
|
518
|
+
},
|
|
519
|
+
options: {
|
|
520
|
+
staging: {
|
|
521
|
+
describe: 'Retrieve staged changes for project',
|
|
522
|
+
},
|
|
523
|
+
assetVersion: {
|
|
524
|
+
describe: 'Specify what version of a default asset to fetch',
|
|
525
|
+
},
|
|
526
|
+
},
|
|
527
|
+
positionals: {
|
|
528
|
+
dest: {
|
|
529
|
+
describe:
|
|
530
|
+
'Local directory you would like the files to be placed in, relative to your current working directory',
|
|
531
|
+
},
|
|
532
|
+
src: {
|
|
533
|
+
describe: 'Path in HubSpot Design Tools',
|
|
534
|
+
},
|
|
535
|
+
},
|
|
536
|
+
},
|
|
537
|
+
filemanager: {
|
|
538
|
+
describe: 'Commands for managing files in the File Manager.',
|
|
539
|
+
subcommands: {
|
|
540
|
+
fetch: {
|
|
541
|
+
describe: 'Fetch a folder or file from the File Manager.',
|
|
542
|
+
errors: {
|
|
543
|
+
sourceRequired: 'A source to fetch is required.',
|
|
544
|
+
},
|
|
545
|
+
options: {
|
|
546
|
+
includeArchived: {
|
|
547
|
+
describe: 'Include files that have been marked as "archived"',
|
|
548
|
+
},
|
|
549
|
+
},
|
|
550
|
+
positionals: {
|
|
551
|
+
dest: {
|
|
552
|
+
describe: 'Path in HubSpot Design Tools',
|
|
553
|
+
},
|
|
554
|
+
src: {
|
|
555
|
+
describe:
|
|
556
|
+
'Path to the local directory you would like the files to be placed, relative to your current working directory. If omitted, this argument will default to your current working directory',
|
|
557
|
+
},
|
|
558
|
+
},
|
|
559
|
+
},
|
|
560
|
+
upload: {
|
|
561
|
+
describe: 'Upload a folder or file to the File Manager.',
|
|
562
|
+
errors: {
|
|
563
|
+
destinationRequired: 'A destination path needs to be passed',
|
|
564
|
+
fileIgnored: path =>
|
|
565
|
+
`The file "${path}" is being ignored via an .hsignore rule`,
|
|
566
|
+
invalidPath: path =>
|
|
567
|
+
`The path "${path}" is not a path to a file or folder`,
|
|
568
|
+
upload: (src, dest) => `Uploading file "${src}" to "${dest}" failed`,
|
|
569
|
+
uploadingFailed: 'Uploading failed',
|
|
570
|
+
},
|
|
571
|
+
logs: {
|
|
572
|
+
uploading: (src, dest, accountId) =>
|
|
573
|
+
`Uploading files from "${src}" to "${dest}" in the File Manager of account ${accountId}`,
|
|
574
|
+
},
|
|
575
|
+
positionals: {
|
|
576
|
+
dest: {
|
|
577
|
+
describe: 'Path in HubSpot Design Tools, can be a net new path',
|
|
578
|
+
},
|
|
579
|
+
src: {
|
|
580
|
+
describe:
|
|
581
|
+
'Path to the local file, relative to your current working directory',
|
|
582
|
+
},
|
|
583
|
+
},
|
|
584
|
+
success: {
|
|
585
|
+
upload: (src, dest, accountId) =>
|
|
586
|
+
`Uploaded file from "${src}" to "${dest}" in the File Manager of account ${accountId}`,
|
|
587
|
+
uploadComplete: dest =>
|
|
588
|
+
`Uploading files to "${dest}" in the File Manager is complete`,
|
|
589
|
+
},
|
|
590
|
+
},
|
|
591
|
+
},
|
|
592
|
+
},
|
|
593
|
+
function: {
|
|
594
|
+
describe: 'Commands for managing CMS serverless functions.',
|
|
595
|
+
subcommands: {
|
|
596
|
+
deploy: {
|
|
597
|
+
debug: {
|
|
598
|
+
startingBuildAndDeploy: functionPath =>
|
|
599
|
+
`Starting build and deploy for .functions folder with path: ${functionPath}`,
|
|
600
|
+
},
|
|
601
|
+
errors: {
|
|
602
|
+
buildError: details => `Build error: ${details}`,
|
|
603
|
+
noPackageJson: functionPath =>
|
|
604
|
+
`Unable to find package.json for function ${functionPath}.`,
|
|
605
|
+
notFunctionsFolder: functionPath =>
|
|
606
|
+
`Specified path ${functionPath} is not a .functions folder.`,
|
|
607
|
+
},
|
|
608
|
+
examples: {
|
|
609
|
+
default:
|
|
610
|
+
'Build and deploy a new bundle for all functions within the myFunctionFolder.functions folder',
|
|
611
|
+
},
|
|
612
|
+
loading: (functionPath, account) =>
|
|
613
|
+
`Building and deploying bundle for "${functionPath}" on ${account}`,
|
|
614
|
+
loadingFailed: (functionPath, account) =>
|
|
615
|
+
`Failed to build and deploy bundle for "${functionPath}" on ${account}`,
|
|
616
|
+
positionals: {
|
|
617
|
+
path: {
|
|
618
|
+
describe: 'Path to the ".functions" folder',
|
|
619
|
+
},
|
|
620
|
+
},
|
|
621
|
+
success: {
|
|
622
|
+
deployed: (functionPath, accountId, buildTimeSeconds) =>
|
|
623
|
+
`Built and deployed bundle from package.json for ${functionPath} on account ${accountId} in ${buildTimeSeconds}s.`,
|
|
624
|
+
},
|
|
625
|
+
},
|
|
626
|
+
list: {
|
|
627
|
+
debug: {
|
|
628
|
+
gettingFunctions: 'Getting currently deployed functions',
|
|
629
|
+
},
|
|
630
|
+
describe: 'List the currently deployed CMS serverless functions.',
|
|
631
|
+
info: {
|
|
632
|
+
noFunctions: 'No functions found',
|
|
633
|
+
},
|
|
634
|
+
options: {
|
|
635
|
+
json: {
|
|
636
|
+
describe: 'output raw json data',
|
|
637
|
+
},
|
|
638
|
+
},
|
|
639
|
+
},
|
|
640
|
+
server: {
|
|
641
|
+
debug: {
|
|
642
|
+
startingServer: functionPath =>
|
|
643
|
+
`Starting local test server for .functions folder with path: ${functionPath}`,
|
|
644
|
+
},
|
|
645
|
+
examples: {
|
|
646
|
+
default: 'Run a local function test server.',
|
|
647
|
+
},
|
|
648
|
+
options: {
|
|
649
|
+
contact: {
|
|
650
|
+
describe: 'Pass contact data to the test function',
|
|
651
|
+
},
|
|
652
|
+
logOutput: {
|
|
653
|
+
describe:
|
|
654
|
+
'Output the response body from the serverless function execution (It is suggested not to use this in production environments as it can reveal any secure data returned by the function in logs)',
|
|
655
|
+
},
|
|
656
|
+
port: {
|
|
657
|
+
describe: 'Port to run the test server on',
|
|
658
|
+
},
|
|
659
|
+
watch: {
|
|
660
|
+
describe:
|
|
661
|
+
'Watch the specified .functions folder for changes and restart the server',
|
|
662
|
+
},
|
|
663
|
+
},
|
|
664
|
+
positionals: {
|
|
665
|
+
path: {
|
|
666
|
+
describe: 'Path to local .functions folder',
|
|
667
|
+
},
|
|
668
|
+
},
|
|
669
|
+
},
|
|
670
|
+
},
|
|
671
|
+
},
|
|
672
|
+
hubdb: {
|
|
673
|
+
describe: 'Commands for managing HubDB tables.',
|
|
674
|
+
subcommands: {
|
|
675
|
+
clear: {
|
|
676
|
+
describe: 'Clear all rows in a HubDB table.',
|
|
677
|
+
logs: {
|
|
678
|
+
removedRows: (deletedRowCount, tableId) =>
|
|
679
|
+
`Removed ${deletedRowCount} rows from HubDB table ${tableId}`,
|
|
680
|
+
rowCount: (tableId, rowCount) =>
|
|
681
|
+
`HubDB table ${tableId} now contains ${rowCount} rows`,
|
|
682
|
+
tableEmpty: tableId => `HubDB table ${tableId} is already empty`,
|
|
683
|
+
},
|
|
684
|
+
positionals: {
|
|
685
|
+
tableId: {
|
|
686
|
+
describe: 'HubDB Table ID',
|
|
687
|
+
},
|
|
688
|
+
},
|
|
689
|
+
},
|
|
690
|
+
create: {
|
|
691
|
+
describe: 'Create a HubDB table.',
|
|
692
|
+
enterPath: '[--path] Enter the local path to the file used for import:',
|
|
693
|
+
errors: {
|
|
694
|
+
create: filePath => `Creating the table at "${filePath}" failed`,
|
|
695
|
+
pathRequired:
|
|
696
|
+
'A path to a local file with a HubDB schema is required to create a HubDB table',
|
|
697
|
+
invalidCharacters:
|
|
698
|
+
'The selected file path contains invalid characters. Please provide a new path and try again.',
|
|
699
|
+
},
|
|
700
|
+
options: {
|
|
701
|
+
path: {
|
|
702
|
+
describe: 'Local path to file used for import',
|
|
703
|
+
},
|
|
704
|
+
},
|
|
705
|
+
success: {
|
|
706
|
+
create: (tableId, accountId, rowCount) =>
|
|
707
|
+
`The table ${tableId} was created in ${accountId} with ${rowCount} rows`,
|
|
708
|
+
},
|
|
709
|
+
},
|
|
710
|
+
delete: {
|
|
711
|
+
describe: 'Delete a HubDB table.',
|
|
712
|
+
shouldDeleteTable: tableId =>
|
|
713
|
+
`Proceed with deleting HubDB table ${tableId}?`,
|
|
714
|
+
errors: {
|
|
715
|
+
delete: tableId => `Deleting the table ${tableId} failed`,
|
|
716
|
+
},
|
|
717
|
+
positionals: {
|
|
718
|
+
tableId: {
|
|
719
|
+
describe: 'HubDB Table ID',
|
|
720
|
+
},
|
|
721
|
+
},
|
|
722
|
+
options: {
|
|
723
|
+
force: {
|
|
724
|
+
describe: 'Skips confirmation prompt when deleting a HubDB table',
|
|
725
|
+
},
|
|
726
|
+
},
|
|
727
|
+
success: {
|
|
728
|
+
delete: (tableId, accountId) =>
|
|
729
|
+
`The table ${tableId} was deleted from ${accountId}`,
|
|
730
|
+
},
|
|
731
|
+
},
|
|
732
|
+
fetch: {
|
|
733
|
+
describe: 'Fetch the schema for a HubDB table.',
|
|
734
|
+
positionals: {
|
|
735
|
+
dest: {
|
|
736
|
+
describe: 'Local destination folder to fetch table to',
|
|
737
|
+
},
|
|
738
|
+
tableId: {
|
|
739
|
+
describe: 'HubDB Table ID',
|
|
740
|
+
},
|
|
741
|
+
},
|
|
742
|
+
success: {
|
|
743
|
+
fetch: (tableId, path) =>
|
|
744
|
+
`Downloaded HubDB table ${tableId} to ${path}`,
|
|
745
|
+
},
|
|
746
|
+
},
|
|
747
|
+
},
|
|
748
|
+
},
|
|
749
|
+
init: {
|
|
750
|
+
describe: configName =>
|
|
751
|
+
`Configure authentication for your HubSpot account. This will create a ${configName} file to store your account information.`,
|
|
752
|
+
options: {
|
|
753
|
+
authType: {
|
|
754
|
+
describe: 'Authentication mechanism',
|
|
755
|
+
defaultDescription: authMethod =>
|
|
756
|
+
`"${authMethod}": An access token tied to a specific user account. This is the recommended way of authenticating with local development tools.`,
|
|
757
|
+
},
|
|
758
|
+
account: {
|
|
759
|
+
describe: 'HubSpot account to authenticate',
|
|
760
|
+
},
|
|
761
|
+
useHiddenConfig: {
|
|
762
|
+
describe:
|
|
763
|
+
"Use the new HubSpot configuration file located in a hidden file in the user's home directory",
|
|
764
|
+
},
|
|
765
|
+
},
|
|
766
|
+
success: {
|
|
767
|
+
configFileCreated: configPath => `Created config file "${configPath}"`,
|
|
768
|
+
configFileUpdated: (account, authType) =>
|
|
769
|
+
`Connected account "${account}" using "${authType}" and set it as the default account`,
|
|
770
|
+
},
|
|
771
|
+
logs: {
|
|
772
|
+
updateConfig:
|
|
773
|
+
'To update an existing config file, use the "hs auth" command.',
|
|
774
|
+
},
|
|
775
|
+
errors: {
|
|
776
|
+
configFileExists: configPath =>
|
|
777
|
+
`The config file ${configPath} already exists.`,
|
|
778
|
+
bothConfigFilesNotAllowed: path =>
|
|
779
|
+
`Unable to create config file, because there is an existing one at "${path}". To create a new config file, delete the existing one and try again.`,
|
|
780
|
+
},
|
|
781
|
+
},
|
|
782
|
+
lint: {
|
|
783
|
+
issuesFound: count => `${count} issues found.`,
|
|
784
|
+
groupName: path => `Linting ${path}`,
|
|
785
|
+
positionals: {
|
|
786
|
+
path: {
|
|
787
|
+
describe: 'Local folder to lint',
|
|
788
|
+
},
|
|
789
|
+
},
|
|
790
|
+
},
|
|
791
|
+
list: {
|
|
792
|
+
describe: 'List remote contents of a directory.',
|
|
793
|
+
gettingPathContents: path => `Getting contents of ${path}.`,
|
|
794
|
+
noFilesFoundAtPath: path => `No files found in ${path}.`,
|
|
795
|
+
positionals: {
|
|
796
|
+
path: {
|
|
797
|
+
describe: 'Remote directory to list contents',
|
|
798
|
+
},
|
|
799
|
+
},
|
|
800
|
+
},
|
|
801
|
+
logs: {
|
|
802
|
+
describe: 'View logs for a CMS serverless function.',
|
|
803
|
+
errors: {
|
|
804
|
+
noLogsFound: (functionPath, accountId) =>
|
|
805
|
+
`No logs were found for the function path "${functionPath}" in account "${accountId}".`,
|
|
806
|
+
},
|
|
807
|
+
examples: {
|
|
808
|
+
default:
|
|
809
|
+
'Get 5 most recent logs for function residing at /_hcms/api/my-endpoint',
|
|
810
|
+
follow:
|
|
811
|
+
'Poll for and output logs for function residing at /_hcms/api/my-endpoint immediately upon new execution',
|
|
812
|
+
limit:
|
|
813
|
+
'Get 10 most recent logs for function residing at /_hcms/api/my-endpoint',
|
|
814
|
+
},
|
|
815
|
+
endpointPrompt: 'Enter a serverless function endpoint:',
|
|
816
|
+
gettingLogs: (latest, functionPath) =>
|
|
817
|
+
`Getting ${latest ? 'latest ' : ''}logs for function with path: ${functionPath}.`,
|
|
818
|
+
options: {
|
|
819
|
+
compact: {
|
|
820
|
+
describe: 'output compact logs',
|
|
821
|
+
},
|
|
822
|
+
follow: {
|
|
823
|
+
describe: 'follow logs',
|
|
824
|
+
},
|
|
825
|
+
latest: {
|
|
826
|
+
describe: 'retrieve most recent log only',
|
|
827
|
+
},
|
|
828
|
+
limit: {
|
|
829
|
+
describe: 'limit the number of logs to output',
|
|
830
|
+
},
|
|
831
|
+
},
|
|
832
|
+
positionals: {
|
|
833
|
+
endpoint: {
|
|
834
|
+
describe: 'Serverless function endpoint',
|
|
835
|
+
},
|
|
836
|
+
},
|
|
837
|
+
tailLogs: (functionPath, accountId) =>
|
|
838
|
+
`Waiting for log entries for "${functionPath}" on account "${accountId}".\n`,
|
|
839
|
+
},
|
|
840
|
+
mv: {
|
|
841
|
+
describe:
|
|
842
|
+
'Move a remote file or folder in HubSpot. This feature is currently in beta and the CLI contract is subject to change.',
|
|
843
|
+
errors: {
|
|
844
|
+
sourcePathExists: (srcPath, destPath) =>
|
|
845
|
+
`The folder "${srcPath}" already exists in "${destPath}".`,
|
|
846
|
+
moveFailed: (srcPath, destPath, accountId) =>
|
|
847
|
+
`Moving "${srcPath}" to "${destPath}" in account ${accountId} failed`,
|
|
848
|
+
},
|
|
849
|
+
move: (srcPath, destPath, accountId) =>
|
|
850
|
+
`Moved "${srcPath}" to "${destPath}" in account ${accountId}`,
|
|
851
|
+
},
|
|
852
|
+
open: {
|
|
853
|
+
describe: 'Open a HubSpot page in your browser.',
|
|
854
|
+
options: {
|
|
855
|
+
list: {
|
|
856
|
+
describe: 'List all supported shortcuts',
|
|
857
|
+
},
|
|
858
|
+
},
|
|
859
|
+
positionals: {
|
|
860
|
+
shortcut: {
|
|
861
|
+
describe: "Shortcut of the link you'd like to open",
|
|
862
|
+
},
|
|
863
|
+
},
|
|
864
|
+
selectLink: 'Select a link to open',
|
|
865
|
+
},
|
|
866
|
+
project: {
|
|
867
|
+
dev: {
|
|
868
|
+
describe: 'Start local dev for the current project.',
|
|
869
|
+
logs: {
|
|
870
|
+
betaMessage: 'HubSpot projects local development',
|
|
871
|
+
placeholderAccountSelection:
|
|
872
|
+
'Using default account as target account (for now)',
|
|
873
|
+
learnMoreLocalDevServer:
|
|
874
|
+
'Learn more about the projects local dev server',
|
|
875
|
+
},
|
|
876
|
+
errors: {
|
|
877
|
+
noProjectConfig:
|
|
878
|
+
'No project detected. Please run this command again from a project directory.',
|
|
879
|
+
noAccount: (accountId, authCommand) =>
|
|
880
|
+
`An error occurred while reading account ${accountId} from your config. Run ${chalk.bold(authCommand)} to re-auth this account.`,
|
|
881
|
+
noAccountsInConfig: authCommand =>
|
|
882
|
+
`No accounts found in your config. Run ${chalk.bold(authCommand)} to configure a HubSpot account with the CLI.`,
|
|
883
|
+
invalidProjectComponents:
|
|
884
|
+
'Projects cannot contain both private and public apps. Move your apps to separate projects before attempting local development.',
|
|
885
|
+
noRunnableComponents: command =>
|
|
886
|
+
`No supported components were found in this project. Run ${chalk.bold(command)} to see a list of available components and add one to your project.`,
|
|
887
|
+
},
|
|
888
|
+
examples: {
|
|
889
|
+
default: 'Start local dev for the current project',
|
|
890
|
+
},
|
|
891
|
+
},
|
|
892
|
+
create: {
|
|
893
|
+
describe: 'Create a new project.',
|
|
894
|
+
errors: {
|
|
895
|
+
failedToDownloadProject:
|
|
896
|
+
'Failed to download project. Please try again later.',
|
|
897
|
+
failedToFetchProjectList:
|
|
898
|
+
'Failed to fetch the list of available project templates. Please try again later.',
|
|
899
|
+
cannotNestProjects: projectDir =>
|
|
900
|
+
`A project already exists at ${projectDir}. Projects cannot be nested within other projects. Please choose a different destination and try again.`,
|
|
901
|
+
},
|
|
902
|
+
logs: {
|
|
903
|
+
success: (projectName, projectDest) =>
|
|
904
|
+
`Project ${chalk.bold(projectName)} was successfully created in ${projectDest}`,
|
|
905
|
+
welcomeMessage: 'Welcome to HubSpot Developer Projects!',
|
|
906
|
+
},
|
|
907
|
+
examples: {
|
|
908
|
+
default: 'Create a new project',
|
|
909
|
+
templateSource:
|
|
910
|
+
'Create a new project from a custom GitHub repository. The repository must contain a valid project template and a config.json file defining the available templates',
|
|
911
|
+
},
|
|
912
|
+
options: {
|
|
913
|
+
dest: {
|
|
914
|
+
describe: 'Directory where the project should be created',
|
|
915
|
+
},
|
|
916
|
+
name: {
|
|
917
|
+
describe: 'Project name (cannot be changed)',
|
|
918
|
+
},
|
|
919
|
+
template: {
|
|
920
|
+
describe: 'The starting template',
|
|
921
|
+
},
|
|
922
|
+
templateSource: {
|
|
923
|
+
describe:
|
|
924
|
+
'Path to custom GitHub repository from which to create project template',
|
|
925
|
+
},
|
|
926
|
+
},
|
|
927
|
+
},
|
|
928
|
+
migrateApp: {
|
|
929
|
+
describe: 'Migrate a public app to the projects framework.',
|
|
930
|
+
examples: {
|
|
931
|
+
default: 'Migrate a public app to the projects framework',
|
|
932
|
+
},
|
|
933
|
+
options: {
|
|
934
|
+
appId: {
|
|
935
|
+
describe:
|
|
936
|
+
'The ID for the public app being migrated to the projects framework',
|
|
937
|
+
},
|
|
938
|
+
dest: {
|
|
939
|
+
describe: 'Directory where the project should be created',
|
|
940
|
+
},
|
|
941
|
+
name: {
|
|
942
|
+
describe: 'Project name (cannot be changed)',
|
|
943
|
+
},
|
|
944
|
+
},
|
|
945
|
+
header: {
|
|
946
|
+
text: 'Migrate an app to the projects framework',
|
|
947
|
+
link: 'Learn more about migrating apps to the projects framework',
|
|
948
|
+
},
|
|
949
|
+
deprecationWarning: (oldCommand, newCommand) =>
|
|
950
|
+
`The ${oldCommand} command is deprecated and will be removed. Use ${newCommand} going forward.`,
|
|
951
|
+
migrationStatus: {
|
|
952
|
+
inProgress: () =>
|
|
953
|
+
`Converting app configuration to ${chalk.bold('public-app.json')} component definition ...`,
|
|
954
|
+
success: () =>
|
|
955
|
+
`${chalk.bold('Your app was converted and build #1 is deployed')}`,
|
|
956
|
+
done: () =>
|
|
957
|
+
'Converting app configuration to public-app.json component definition ... DONE',
|
|
958
|
+
failure: () =>
|
|
959
|
+
'Converting app configuration to public-app.json component definition ... FAILED',
|
|
960
|
+
},
|
|
961
|
+
warning: {
|
|
962
|
+
title: () =>
|
|
963
|
+
`${chalk.bold('You are about to migrate an app to the projects framework')}`,
|
|
964
|
+
projectConversion: () =>
|
|
965
|
+
`${chalk.bold('The selected app will be converted to a project component.')}`,
|
|
966
|
+
appConfig: () =>
|
|
967
|
+
`All supported app configuration will be moved to the ${chalk.bold('public-app.json')} component definition file. Future updates to those features must be made through the project build and deploy pipeline, not the developer account UI.`,
|
|
968
|
+
buildAndDeploy:
|
|
969
|
+
'This will create a new project with a single app component and immediately build and deploy it to your developer account (build #1).',
|
|
970
|
+
existingApps: () =>
|
|
971
|
+
`${chalk.bold('This will not affect existing app users or installs.')}`,
|
|
972
|
+
copyApp:
|
|
973
|
+
'We strongly recommend making a copy of your app to test this process in a development app before replacing production.',
|
|
974
|
+
},
|
|
975
|
+
migrationInterrupted:
|
|
976
|
+
'\nThe command is terminated, but app migration is still in progress. Please check your account to ensure that the project and associated app have been created successfully.',
|
|
977
|
+
createAppPrompt:
|
|
978
|
+
"Proceed with migrating this app to a project component (this process can't be aborted)?",
|
|
979
|
+
projectDetailsLink: 'View project details in your developer account',
|
|
980
|
+
componentsToBeMigrated: components =>
|
|
981
|
+
`The following component types will be migrated: ${components}`,
|
|
982
|
+
componentsThatWillNotBeMigrated: components =>
|
|
983
|
+
`[NOTE] These component types are not yet supported for migration but will be available later: ${components}`,
|
|
984
|
+
errors: {
|
|
985
|
+
noApps: accountId => `No apps found in account ${accountId}`,
|
|
986
|
+
noAppsEligible: accountId =>
|
|
987
|
+
`No apps in account ${accountId} are currently migratable`,
|
|
988
|
+
invalidAccountTypeTitle: () =>
|
|
989
|
+
`${chalk.bold('Developer account not targeted')}`,
|
|
990
|
+
invalidAccountTypeDescription: (useCommand, authCommand) =>
|
|
991
|
+
`Only public apps created in a developer account can be converted to a project component. Select a connected developer account with ${useCommand} or ${authCommand} and try again.`,
|
|
992
|
+
projectAlreadyExists: projectName =>
|
|
993
|
+
`A project with name ${projectName} already exists. Please choose another name.`,
|
|
994
|
+
invalidApp: appId =>
|
|
995
|
+
`Could not migrate appId ${appId}. This app cannot be migrated at this time. Please choose another public app.`,
|
|
996
|
+
appWithAppIdNotFound: appId =>
|
|
997
|
+
`Could not find an app with the id ${appId} `,
|
|
998
|
+
},
|
|
999
|
+
prompt: {
|
|
1000
|
+
chooseApp: 'Which app would you like to migrate?',
|
|
1001
|
+
inputName: '[--name] What would you like to name the project?',
|
|
1002
|
+
inputDest: '[--dest] Where would you like to save the project?',
|
|
1003
|
+
uidForComponent: componentName =>
|
|
1004
|
+
`What UID would you like to use for ${componentName}?`,
|
|
1005
|
+
proceed: 'Would you like to proceed?',
|
|
1006
|
+
},
|
|
1007
|
+
spinners: {
|
|
1008
|
+
beginningMigration: 'Beginning migration',
|
|
1009
|
+
migrationStarted: 'Migration started',
|
|
1010
|
+
unableToStartMigration: 'Unable to begin migration',
|
|
1011
|
+
finishingMigration: 'Wrapping up migration',
|
|
1012
|
+
migrationComplete: 'Migration completed',
|
|
1013
|
+
migrationFailed: 'Migration failed',
|
|
1014
|
+
downloadingProjectContents: 'Downloading migrated project files',
|
|
1015
|
+
downloadingProjectContentsComplete: 'Migrated project files downloaded',
|
|
1016
|
+
downloadingProjectContentsFailed:
|
|
1017
|
+
'Unable to download migrated project files',
|
|
1018
|
+
copyingProjectFiles: 'Copying migrated project files',
|
|
1019
|
+
copyingProjectFilesComplete: 'Migrated project files copied',
|
|
1020
|
+
copyingProjectFilesFailed: 'Unable to copy migrated project files',
|
|
1021
|
+
},
|
|
1022
|
+
migrationNotAllowedReasons: {
|
|
1023
|
+
upToDate: 'App is already up to date',
|
|
1024
|
+
isPrivateApp: 'Private apps are not currently migratable',
|
|
1025
|
+
listedInMarketplace: 'Listed apps are not currently migratable',
|
|
1026
|
+
generic: reasonCode => `Unable to migrate app: ${reasonCode}`,
|
|
1027
|
+
},
|
|
1028
|
+
},
|
|
1029
|
+
cloneApp: {
|
|
1030
|
+
describe: 'Clone a public app using the projects framework.',
|
|
1031
|
+
examples: {
|
|
1032
|
+
default: 'Clone a public app using the projects framework',
|
|
1033
|
+
},
|
|
1034
|
+
options: {
|
|
1035
|
+
appId: {
|
|
1036
|
+
describe: 'The ID for the public app being cloned',
|
|
1037
|
+
},
|
|
1038
|
+
dest: {
|
|
1039
|
+
describe: 'Directory where the project should be created',
|
|
1040
|
+
},
|
|
1041
|
+
},
|
|
1042
|
+
cloneStatus: {
|
|
1043
|
+
inProgress: () =>
|
|
1044
|
+
`Cloning app configuration to ${chalk.bold('public-app.json')} component definition ...`,
|
|
1045
|
+
done: 'Cloning app configuration to public-app.json component definition ... DONE',
|
|
1046
|
+
success: dest => `Your cloned project was created in ${dest}`,
|
|
1047
|
+
failure:
|
|
1048
|
+
'Cloning app configuration to public-app.json component definition ... FAILED',
|
|
1049
|
+
},
|
|
1050
|
+
errors: {
|
|
1051
|
+
invalidAccountTypeTitle: () =>
|
|
1052
|
+
`${chalk.bold('Developer account not targeted')}`,
|
|
1053
|
+
invalidAccountTypeDescription: (useCommand, authCommand) =>
|
|
1054
|
+
`Only public apps created in a developer account can be converted to a project component. Select a connected developer account with ${useCommand} or ${authCommand} and try again.`,
|
|
1055
|
+
couldNotWriteConfigPath: configPath =>
|
|
1056
|
+
`Failed to write project config at ${configPath}`,
|
|
1057
|
+
},
|
|
1058
|
+
},
|
|
1059
|
+
add: {
|
|
1060
|
+
describe: 'Create a new component within a project.',
|
|
1061
|
+
options: {
|
|
1062
|
+
name: {
|
|
1063
|
+
describe: 'The name for your newly created component',
|
|
1064
|
+
},
|
|
1065
|
+
type: {
|
|
1066
|
+
describe:
|
|
1067
|
+
"The path to the component type's location within the hubspot-project-components Github repo: https://github.com/HubSpot/hubspot-project-components",
|
|
1068
|
+
},
|
|
1069
|
+
},
|
|
1070
|
+
creatingComponent: projectName =>
|
|
1071
|
+
`Adding a new component to ${chalk.bold(projectName)}`,
|
|
1072
|
+
success: componentName =>
|
|
1073
|
+
`${componentName} was successfully added to your project.`,
|
|
1074
|
+
error: {
|
|
1075
|
+
failedToDownloadComponent:
|
|
1076
|
+
'Failed to download project component. Please try again later.',
|
|
1077
|
+
locationInProject:
|
|
1078
|
+
'This command must be run from within a project directory.',
|
|
1079
|
+
failedToFetchComponentList:
|
|
1080
|
+
'Failed to fetch the list of available components. Please try again later.',
|
|
1081
|
+
projectContainsPublicApp:
|
|
1082
|
+
'This project contains a public app. This command is currently only compatible with projects that contain private apps.',
|
|
1083
|
+
},
|
|
1084
|
+
examples: {
|
|
1085
|
+
default: 'Create a component within your project',
|
|
1086
|
+
withFlags: 'Use --name and --type flags to bypass the prompt.',
|
|
1087
|
+
},
|
|
1088
|
+
},
|
|
1089
|
+
deploy: {
|
|
1090
|
+
describe: 'Deploy a project build.',
|
|
1091
|
+
deployBuildIdPrompt: '[--build] Deploy which build?',
|
|
1092
|
+
debug: {
|
|
1093
|
+
deploying: path => `Deploying project at path: ${path}`,
|
|
1094
|
+
},
|
|
1095
|
+
errors: {
|
|
1096
|
+
deploy: details => `Deploy error: ${details}`,
|
|
1097
|
+
noBuilds: 'Deploy error: no builds for this project were found.',
|
|
1098
|
+
noBuildId: 'You must specify a build to deploy',
|
|
1099
|
+
projectNotFound: (projectName, accountIdentifier, command) =>
|
|
1100
|
+
`The project ${chalk.bold(projectName)} does not exist in account ${accountIdentifier}. Run ${command} to upload your project files to HubSpot.`,
|
|
1101
|
+
buildIdDoesNotExist: (buildId, projectName, linkToProject) =>
|
|
1102
|
+
`Build ${buildId} does not exist for project ${chalk.bold(projectName)}. ${linkToProject}`,
|
|
1103
|
+
buildAlreadyDeployed: (buildId, linkToProject) =>
|
|
1104
|
+
`Build ${buildId} is already deployed. ${linkToProject}`,
|
|
1105
|
+
viewProjectsBuilds: 'View project builds in HubSpot',
|
|
1106
|
+
},
|
|
1107
|
+
examples: {
|
|
1108
|
+
default: 'Deploy the latest build of the current project',
|
|
1109
|
+
withOptions: 'Deploy build 5 of the project my-project',
|
|
1110
|
+
},
|
|
1111
|
+
options: {
|
|
1112
|
+
build: {
|
|
1113
|
+
describe: 'Project build ID to be deployed',
|
|
1114
|
+
},
|
|
1115
|
+
project: {
|
|
1116
|
+
describe: 'Project name',
|
|
1117
|
+
},
|
|
1118
|
+
},
|
|
1119
|
+
},
|
|
1120
|
+
listBuilds: {
|
|
1121
|
+
describe: "List the project's builds.",
|
|
1122
|
+
continueOrExitPrompt: 'Press <enter> to load more, or ctrl+c to exit',
|
|
1123
|
+
viewAllBuildsLink: 'View all builds',
|
|
1124
|
+
showingNextBuilds: (count, projectName) =>
|
|
1125
|
+
`Showing the next ${count} builds for ${projectName}`,
|
|
1126
|
+
showingRecentBuilds: (count, projectName, viewAllBuildsLink) =>
|
|
1127
|
+
`Showing the most ${count} recent builds for ${projectName}. ${viewAllBuildsLink}.`,
|
|
1128
|
+
errors: {
|
|
1129
|
+
noBuilds: 'No builds for this project were found.',
|
|
1130
|
+
projectNotFound: projectName => `Project ${projectName} not found.`,
|
|
1131
|
+
},
|
|
1132
|
+
options: {
|
|
1133
|
+
project: {
|
|
1134
|
+
describe: 'Project name',
|
|
1135
|
+
},
|
|
1136
|
+
limit: {
|
|
1137
|
+
describe: 'Limit the number of builds to output',
|
|
1138
|
+
},
|
|
1139
|
+
},
|
|
1140
|
+
examples: {
|
|
1141
|
+
default: 'List the builds for the current project',
|
|
1142
|
+
},
|
|
1143
|
+
},
|
|
1144
|
+
logs: {
|
|
1145
|
+
describe:
|
|
1146
|
+
'Get execution logs for a serverless function within a project.',
|
|
1147
|
+
errors: {
|
|
1148
|
+
noProjectConfig:
|
|
1149
|
+
'No project detected. Run this command again from a project directory.',
|
|
1150
|
+
failedToFetchProjectDetails:
|
|
1151
|
+
'There was an error fetching project details',
|
|
1152
|
+
noFunctionsLinkText: 'Visit developer docs',
|
|
1153
|
+
noFunctionsInProject: link =>
|
|
1154
|
+
`There aren't any functions in this project\n\t- Run ${chalk.orange('hs project logs --help')} to learn more about logs\n\t- ${link} to learn more about serverless functions`,
|
|
1155
|
+
noFunctionWithName: name => `No function with name "${name}"`,
|
|
1156
|
+
functionNotDeployed: name =>
|
|
1157
|
+
`The function with name "${name}" is not deployed`,
|
|
1158
|
+
projectLogsManagerNotInitialized:
|
|
1159
|
+
'Function called on ProjectLogsManager before initialization',
|
|
1160
|
+
generic: 'Error fetching logs',
|
|
1161
|
+
},
|
|
1162
|
+
logs: {
|
|
1163
|
+
showingLogs: 'Showing logs for:',
|
|
1164
|
+
hubspotLogsDirectLink: 'View function logs in HubSpot',
|
|
1165
|
+
noLogsFound: name => `No logs were found for "${name}"`,
|
|
1166
|
+
},
|
|
1167
|
+
table: {
|
|
1168
|
+
accountHeader: 'Account',
|
|
1169
|
+
functionHeader: 'Function',
|
|
1170
|
+
endpointHeader: 'Endpoint',
|
|
1171
|
+
},
|
|
1172
|
+
examples: {
|
|
1173
|
+
default:
|
|
1174
|
+
'Open the project logs prompt to get logs for a serverless function',
|
|
1175
|
+
withOptions:
|
|
1176
|
+
'Get logs for function named "my-function" within the app named "app" within the project named "my-project"',
|
|
1177
|
+
},
|
|
1178
|
+
options: {
|
|
1179
|
+
app: {
|
|
1180
|
+
describe: 'App name',
|
|
1181
|
+
},
|
|
1182
|
+
compact: {
|
|
1183
|
+
describe: 'Output compact logs',
|
|
1184
|
+
},
|
|
1185
|
+
tail: {
|
|
1186
|
+
describe: 'Tail logs',
|
|
1187
|
+
},
|
|
1188
|
+
latest: {
|
|
1189
|
+
describe: 'Retrieve most recent log only',
|
|
1190
|
+
},
|
|
1191
|
+
limit: {
|
|
1192
|
+
describe: 'Limit the number of logs to output',
|
|
1193
|
+
},
|
|
1194
|
+
function: {
|
|
1195
|
+
describe: 'App function name',
|
|
1196
|
+
},
|
|
1197
|
+
},
|
|
1198
|
+
},
|
|
1199
|
+
upload: {
|
|
1200
|
+
describe: 'Upload your project files and create a new build.',
|
|
1201
|
+
examples: {
|
|
1202
|
+
default: 'Upload a project into your HubSpot account',
|
|
1203
|
+
},
|
|
1204
|
+
logs: {
|
|
1205
|
+
buildSucceeded: buildId => `Build #${buildId} succeeded\n`,
|
|
1206
|
+
readyToGoLive: '🚀 Ready to take your project live?',
|
|
1207
|
+
runCommand: command => `Run \`${command}\``,
|
|
1208
|
+
autoDeployDisabled: deployCommand =>
|
|
1209
|
+
`Automatic deploys are disabled for this project. Run ${deployCommand} to deploy this build.`,
|
|
1210
|
+
},
|
|
1211
|
+
errors: {
|
|
1212
|
+
projectLockedError: () =>
|
|
1213
|
+
`Your project is locked. This may mean that another user is running the ${chalk.bold('`hs project dev`')} command for this project. If this is you, unlock the project in Projects UI.`,
|
|
1214
|
+
},
|
|
1215
|
+
options: {
|
|
1216
|
+
forceCreate: {
|
|
1217
|
+
describe: 'Automatically create project if it does not exist',
|
|
1218
|
+
},
|
|
1219
|
+
message: {
|
|
1220
|
+
describe:
|
|
1221
|
+
'Add a message when you upload your project and create a build',
|
|
1222
|
+
},
|
|
1223
|
+
},
|
|
1224
|
+
},
|
|
1225
|
+
watch: {
|
|
1226
|
+
describe:
|
|
1227
|
+
'Watch your local project for changes and automatically upload changed files to a new build in HubSpot.',
|
|
1228
|
+
examples: {
|
|
1229
|
+
default: 'Start watching the current project',
|
|
1230
|
+
},
|
|
1231
|
+
logs: {
|
|
1232
|
+
processExited: 'Stopping watcher...',
|
|
1233
|
+
watchCancelledFromUi: () =>
|
|
1234
|
+
`The watch process has been cancelled from the UI. Any changes made since cancelling have not been uploaded. To resume watching, rerun ${chalk.yellow('`hs project watch`')}.`,
|
|
1235
|
+
resuming: 'Resuming watcher...',
|
|
1236
|
+
uploadSucceeded: ({ filePath, remotePath }) =>
|
|
1237
|
+
`Uploaded file "${filePath}" to "${remotePath}"`,
|
|
1238
|
+
deleteFileSucceeded: ({ remotePath }) => `Deleted file "${remotePath}"`,
|
|
1239
|
+
deleteFolderSucceeded: ({ remotePath }) =>
|
|
1240
|
+
`Deleted folder "${remotePath}"`,
|
|
1241
|
+
watching: ({ projectDir }) =>
|
|
1242
|
+
`Watcher is ready and watching "${projectDir}". Any changes detected will be automatically uploaded.`,
|
|
1243
|
+
previousStagingBuildCancelled:
|
|
1244
|
+
'Killed the previous watch process. Please try running `hs project watch` again',
|
|
1245
|
+
},
|
|
1246
|
+
options: {
|
|
1247
|
+
initialUpload: {
|
|
1248
|
+
describe: 'Upload directory before watching for updates',
|
|
1249
|
+
},
|
|
1250
|
+
},
|
|
1251
|
+
debug: {
|
|
1252
|
+
pause: 'Pausing watcher, attempting to queue build',
|
|
1253
|
+
buildStarted: 'Build queued.',
|
|
1254
|
+
extensionNotAllowed: ({ filePath }) =>
|
|
1255
|
+
`Skipping "${filePath}" due to unsupported extension`,
|
|
1256
|
+
ignored: ({ filePath }) =>
|
|
1257
|
+
`Skipping "${filePath}" due to an ignore rule`,
|
|
1258
|
+
uploading: ({ filePath, remotePath }) =>
|
|
1259
|
+
`Attempting to upload file "${filePath}" to "${remotePath}"`,
|
|
1260
|
+
attemptNewBuild: 'Attempting to create a new build',
|
|
1261
|
+
fileAlreadyQueued: ({ filePath }) =>
|
|
1262
|
+
`File "${filePath}" is already queued for upload`,
|
|
1263
|
+
},
|
|
1264
|
+
errors: {
|
|
1265
|
+
uploadFailed: ({ filePath, remotePath }) =>
|
|
1266
|
+
`Failed to upload file "${filePath}" to "${remotePath}"`,
|
|
1267
|
+
deleteFileFailed: ({ remotePath }) =>
|
|
1268
|
+
`Failed to delete file "${remotePath}"`,
|
|
1269
|
+
deleteFolderFailed: ({ remotePath }) =>
|
|
1270
|
+
`Failed to delete folder "${remotePath}"`,
|
|
1271
|
+
},
|
|
1272
|
+
},
|
|
1273
|
+
download: {
|
|
1274
|
+
describe: 'Download your project files from HubSpot.',
|
|
1275
|
+
examples: {
|
|
1276
|
+
default: 'Download the project myProject into myProjectFolder folder',
|
|
1277
|
+
},
|
|
1278
|
+
logs: {
|
|
1279
|
+
downloadCancelled: 'Cancelling project download',
|
|
1280
|
+
downloadSucceeded: ({ buildId, projectName }) =>
|
|
1281
|
+
`Downloaded build "${buildId}" from project "${projectName}"`,
|
|
1282
|
+
},
|
|
1283
|
+
errors: {
|
|
1284
|
+
downloadFailed: 'Something went wrong downloading the project',
|
|
1285
|
+
projectNotFound: ({ projectName, accountId }) =>
|
|
1286
|
+
`Your project ${chalk.bold(projectName)} could not be found in ${accountId}`,
|
|
1287
|
+
},
|
|
1288
|
+
warnings: {
|
|
1289
|
+
cannotDownloadWithinProject:
|
|
1290
|
+
'Cancelling project download. Please run the command again outside the context of an existing project.',
|
|
1291
|
+
},
|
|
1292
|
+
options: {
|
|
1293
|
+
build: {
|
|
1294
|
+
describe: 'The build to download',
|
|
1295
|
+
},
|
|
1296
|
+
project: {
|
|
1297
|
+
describe: 'The name of the project to download',
|
|
1298
|
+
},
|
|
1299
|
+
dest: {
|
|
1300
|
+
describe: 'Destination folder for the project',
|
|
1301
|
+
},
|
|
1302
|
+
},
|
|
1303
|
+
},
|
|
1304
|
+
open: {
|
|
1305
|
+
describe: "Open the project's details page in the browser.",
|
|
1306
|
+
options: {
|
|
1307
|
+
project: {
|
|
1308
|
+
describe: 'Name of project to open',
|
|
1309
|
+
},
|
|
1310
|
+
},
|
|
1311
|
+
examples: {
|
|
1312
|
+
default: 'Opens the projects page for the specified account',
|
|
1313
|
+
},
|
|
1314
|
+
success: projectName => `Successfully opened "${projectName}"`,
|
|
1315
|
+
},
|
|
1316
|
+
feedback: {
|
|
1317
|
+
describe: 'Leave feedback on HubSpot projects or file a bug report.',
|
|
1318
|
+
feedbackType: {
|
|
1319
|
+
prompt: 'What type of feedback would you like to leave?',
|
|
1320
|
+
bug: '[--bug] Report a bug',
|
|
1321
|
+
general:
|
|
1322
|
+
"[--general] Tell us about your experience with HubSpot's developer tools",
|
|
1323
|
+
},
|
|
1324
|
+
openPrompt: 'Create a Github issue in your browser?',
|
|
1325
|
+
success: url => `We opened ${url} in your browser.`,
|
|
1326
|
+
options: {
|
|
1327
|
+
bug: {
|
|
1328
|
+
describe: 'Open Github issues in your browser to report a bug.',
|
|
1329
|
+
},
|
|
1330
|
+
general: {
|
|
1331
|
+
describe: 'Open Github issues in your browser to give feedback.',
|
|
1332
|
+
},
|
|
1333
|
+
},
|
|
1334
|
+
},
|
|
1335
|
+
installDeps: {
|
|
1336
|
+
help: {
|
|
1337
|
+
describe:
|
|
1338
|
+
'Install the dependencies for your project, or add a dependency to a subcomponent of a project.',
|
|
1339
|
+
installAppDepsExample: 'Install the dependencies for the project',
|
|
1340
|
+
addDepToSubComponentExample:
|
|
1341
|
+
'Install the dependencies to one or more project subcomponents',
|
|
1342
|
+
},
|
|
1343
|
+
installLocationPrompt:
|
|
1344
|
+
'Choose the project components to install the dependencies:',
|
|
1345
|
+
installLocationPromptRequired:
|
|
1346
|
+
'You must choose at least one subcomponent',
|
|
1347
|
+
installingDependencies: directory =>
|
|
1348
|
+
`Installing dependencies in ${directory}`,
|
|
1349
|
+
installationSuccessful: directory =>
|
|
1350
|
+
`Installed dependencies in ${directory}`,
|
|
1351
|
+
addingDependenciesToLocation: (dependencies, directory) =>
|
|
1352
|
+
`Installing ${dependencies} in ${directory}`,
|
|
1353
|
+
installingDependenciesFailed: directory =>
|
|
1354
|
+
`Installing dependencies for ${directory} failed`,
|
|
1355
|
+
noProjectConfig:
|
|
1356
|
+
'No project detected. Run this command from a project directory.',
|
|
1357
|
+
noPackageJsonInProject: (projectName, link) =>
|
|
1358
|
+
`No dependencies to install. The project ${projectName} folder might be missing component or subcomponent files. ${link}`,
|
|
1359
|
+
packageManagerNotInstalled: (packageManager, link) =>
|
|
1360
|
+
`This command depends on ${packageManager}, install ${chalk.bold(link)}`,
|
|
1361
|
+
},
|
|
1362
|
+
},
|
|
1363
|
+
remove: {
|
|
1364
|
+
describe: 'Delete a file or folder from HubSpot.',
|
|
1365
|
+
deleted: (path, accountId) => `Deleted "${path}" from account ${accountId}`,
|
|
1366
|
+
errors: {
|
|
1367
|
+
deleteFailed: (path, accountId) =>
|
|
1368
|
+
`Deleting "${path}" from account ${accountId} failed`,
|
|
1369
|
+
},
|
|
1370
|
+
positionals: {
|
|
1371
|
+
path: {
|
|
1372
|
+
describe: 'Remote hubspot path',
|
|
1373
|
+
},
|
|
1374
|
+
},
|
|
1375
|
+
},
|
|
1376
|
+
sandbox: {
|
|
1377
|
+
describe: 'Commands for managing sandboxes.',
|
|
1378
|
+
subcommands: {
|
|
1379
|
+
create: {
|
|
1380
|
+
developer: {
|
|
1381
|
+
loading: {
|
|
1382
|
+
add: accountName =>
|
|
1383
|
+
`Creating developer sandbox ${chalk.bold(accountName)}`,
|
|
1384
|
+
fail: accountName =>
|
|
1385
|
+
`Failed to create a developer sandbox ${chalk.bold(accountName)}.`,
|
|
1386
|
+
succeed: (accountName, accountId) =>
|
|
1387
|
+
`Successfully created a developer sandbox ${chalk.bold(accountName)} with portalId ${chalk.bold(accountId)}.`,
|
|
1388
|
+
},
|
|
1389
|
+
success: {
|
|
1390
|
+
configFileUpdated: (accountName, authType) =>
|
|
1391
|
+
`Account "${accountName}" updated using "${authType}"`,
|
|
1392
|
+
},
|
|
1393
|
+
failure: {
|
|
1394
|
+
invalidUser: (accountName, parentAccountName) =>
|
|
1395
|
+
`Couldn't create ${chalk.bold(accountName)} because your account has been removed from ${chalk.bold(parentAccountName)} or your permission set doesn't allow you to create the sandbox. To update your permissions, contact a super admin in ${chalk.bold(parentAccountName)}.`,
|
|
1396
|
+
limit: (accountName, limit) =>
|
|
1397
|
+
`${chalk.bold(accountName)} reached the limit of ${limit} developer sandboxes. \n- To connect a developer sandbox to your HubSpot CLI, run ${chalk.bold('hs auth')} and follow the prompts.`,
|
|
1398
|
+
alreadyInConfig: (accountName, limit) =>
|
|
1399
|
+
`${chalk.bold(accountName)} reached the limit of ${limit} developer sandboxes. \n- To use an existing developer sandbox, run ${chalk.bold('hs accounts use')}.`,
|
|
1400
|
+
scopes: {
|
|
1401
|
+
message:
|
|
1402
|
+
"The personal access key you provided doesn't include developer sandbox permissions.",
|
|
1403
|
+
instructions: (accountName, url) =>
|
|
1404
|
+
`To update CLI permissions for "${accountName}": \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes developer sandbox permissions. \n- Update the CLI config for this account by running ${chalk.bold('hs auth')} and entering the new key.\n`,
|
|
1405
|
+
},
|
|
1406
|
+
},
|
|
1407
|
+
},
|
|
1408
|
+
standard: {
|
|
1409
|
+
loading: {
|
|
1410
|
+
add: accountName =>
|
|
1411
|
+
`Creating standard sandbox ${chalk.bold(accountName)}`,
|
|
1412
|
+
fail: accountName =>
|
|
1413
|
+
`Failed to create a standard sandbox ${chalk.bold(accountName)}.`,
|
|
1414
|
+
succeed: (accountName, accountId) =>
|
|
1415
|
+
`Successfully created a standard sandbox ${chalk.bold(accountName)} with portalId ${chalk.bold(accountId)}.`,
|
|
1416
|
+
},
|
|
1417
|
+
success: {
|
|
1418
|
+
configFileUpdated: (accountName, authType) =>
|
|
1419
|
+
`Account "${accountName}" updated using "${authType}"`,
|
|
1420
|
+
},
|
|
1421
|
+
failure: {
|
|
1422
|
+
invalidUser: (accountName, parentAccountName) =>
|
|
1423
|
+
`Couldn't create ${chalk.bold(accountName)} because your account has been removed from ${chalk.bold(parentAccountName)} or your permission set doesn't allow you to create the sandbox. To update your permissions, contact a super admin in ${chalk.bold(parentAccountName)}.`,
|
|
1424
|
+
limit: (accountName, limit) =>
|
|
1425
|
+
`${chalk.bold(accountName)} reached the limit of ${limit} standard sandboxes. \n- To connect a standard sandbox to your HubSpot CLI, run ${chalk.bold('hs auth')} and follow the prompts.`,
|
|
1426
|
+
alreadyInConfig: (accountName, limit) =>
|
|
1427
|
+
`${chalk.bold(accountName)} reached the limit of ${limit} standard sandboxes. \n- To use an existing standard sandbox, run ${chalk.bold('hs accounts use')}.`,
|
|
1428
|
+
scopes: {
|
|
1429
|
+
message:
|
|
1430
|
+
"The personal access key you provided doesn't include standard sandbox permissions.",
|
|
1431
|
+
instructions: (accountName, url) =>
|
|
1432
|
+
`To update CLI permissions for "${accountName}": \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes standard sandbox permissions. \n- Update the CLI config for this account by running ${chalk.bold('hs auth')} and entering the new key.\n`,
|
|
1433
|
+
},
|
|
1434
|
+
},
|
|
1435
|
+
},
|
|
1436
|
+
},
|
|
1437
|
+
delete: {
|
|
1438
|
+
describe: 'Delete a sandbox account.',
|
|
1439
|
+
debug: {
|
|
1440
|
+
deleting: account => `Deleting sandbox account "${account}"`,
|
|
1441
|
+
error: 'Error deleting sandbox account:',
|
|
1442
|
+
},
|
|
1443
|
+
examples: {
|
|
1444
|
+
default: 'Deletes the sandbox account named MySandboxAccount.',
|
|
1445
|
+
},
|
|
1446
|
+
confirm: account =>
|
|
1447
|
+
`Delete sandbox ${chalk.bold(account)}? All data for this sandbox will be permanently deleted.`,
|
|
1448
|
+
defaultAccountWarning: account =>
|
|
1449
|
+
`The sandbox ${chalk.bold(account)} is currently set as the default account.`,
|
|
1450
|
+
success: {
|
|
1451
|
+
delete: (account, sandboxHubId) =>
|
|
1452
|
+
`Sandbox "${account}" with portalId "${sandboxHubId}" was deleted successfully.`,
|
|
1453
|
+
deleteDefault: (account, sandboxHubId) =>
|
|
1454
|
+
`Sandbox "${account}" with portalId "${sandboxHubId}" was deleted successfully and removed as the default account.`,
|
|
1455
|
+
configFileUpdated: (account, configFilename) =>
|
|
1456
|
+
`Removed account ${account} from ${configFilename}.`,
|
|
1457
|
+
},
|
|
1458
|
+
failure: {
|
|
1459
|
+
invalidUser: (accountName, parentAccountName) =>
|
|
1460
|
+
`Couldn't delete ${accountName} because your account has been removed from ${parentAccountName} or your permission set doesn't allow you to delete the sandbox. To update your permissions, contact a super admin in ${parentAccountName}.`,
|
|
1461
|
+
noAccount:
|
|
1462
|
+
'No account specified. Specify an account by using the --account flag.',
|
|
1463
|
+
noSandboxAccounts: authCommand =>
|
|
1464
|
+
`There are no sandboxes connected to the CLI. To add a sandbox, run ${authCommand}.`,
|
|
1465
|
+
noSandboxAccountId:
|
|
1466
|
+
"This sandbox can't be deleted from the CLI because we could not find the associated sandbox account.",
|
|
1467
|
+
noParentAccount: authCommand =>
|
|
1468
|
+
`This sandbox can't be deleted from the CLI because you haven't given the CLI access to its parent account. To do this, run ${authCommand} and add the parent account.`,
|
|
1469
|
+
objectNotFound: account =>
|
|
1470
|
+
`Sandbox ${chalk.bold(account)} may have been deleted through the UI. The account has been removed from the config.`,
|
|
1471
|
+
noParentPortalAvailable: (command, url) =>
|
|
1472
|
+
`This sandbox can't be deleted from the CLI because you haven't given the CLI access to its parent account. To do this, run ${command}. You can also delete the sandbox from the HubSpot management tool: ${chalk.bold(url)}.`,
|
|
1473
|
+
invalidKey: (account, authCommand) =>
|
|
1474
|
+
`Your personal access key for account ${chalk.bold(account)} is inactive. To re-authenticate, please run ${authCommand}.`,
|
|
1475
|
+
},
|
|
1476
|
+
options: {
|
|
1477
|
+
force: {
|
|
1478
|
+
describe:
|
|
1479
|
+
'Skips all confirmation prompts when deleting a sandbox account.',
|
|
1480
|
+
},
|
|
1481
|
+
account: {
|
|
1482
|
+
describe: 'Account name or id to delete',
|
|
1483
|
+
},
|
|
1484
|
+
},
|
|
1485
|
+
},
|
|
1486
|
+
},
|
|
1487
|
+
sync: {
|
|
1488
|
+
loading: {
|
|
1489
|
+
add: accountName => `Syncing sandbox ${chalk.bold(accountName)}`,
|
|
1490
|
+
fail: accountName =>
|
|
1491
|
+
`Failed to sync sandbox ${chalk.bold(accountName)}.`,
|
|
1492
|
+
succeed: accountName =>
|
|
1493
|
+
`Successfully synced sandbox ${chalk.bold(accountName)}.`,
|
|
1494
|
+
},
|
|
1495
|
+
success: {
|
|
1496
|
+
configFileUpdated: (accountName, authType) =>
|
|
1497
|
+
`Account "${accountName}" updated using "${authType}"`,
|
|
1498
|
+
},
|
|
1499
|
+
failure: {
|
|
1500
|
+
invalidUser: (accountName, parentAccountName) =>
|
|
1501
|
+
`Couldn't sync ${chalk.bold(accountName)} because your account has been removed from ${chalk.bold(parentAccountName)} or your permission set doesn't allow you to sync the sandbox. To update your permissions, contact a super admin in ${chalk.bold(parentAccountName)}.`,
|
|
1502
|
+
scopes: {
|
|
1503
|
+
message:
|
|
1504
|
+
"The personal access key you provided doesn't include sandbox sync permissions.",
|
|
1505
|
+
instructions: (accountName, url) =>
|
|
1506
|
+
`To update CLI permissions for "${accountName}": \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes sandbox sync permissions. \n- Update the CLI config for this account by running ${chalk.bold('hs auth')} and entering the new key.\n`,
|
|
1507
|
+
},
|
|
1508
|
+
},
|
|
1509
|
+
},
|
|
1510
|
+
},
|
|
1511
|
+
secret: {
|
|
1512
|
+
describe: 'Commands for managing secrets.',
|
|
1513
|
+
subcommands: {
|
|
1514
|
+
add: {
|
|
1515
|
+
describe: 'Create a new secret.',
|
|
1516
|
+
errors: {
|
|
1517
|
+
add: secretName => `The secret "${secretName}" was not added`,
|
|
1518
|
+
alreadyExists: (secretName, command) =>
|
|
1519
|
+
`The secret "${secretName}" already exists, it's value can be modified with ${command}`,
|
|
1520
|
+
},
|
|
1521
|
+
positionals: {
|
|
1522
|
+
name: {
|
|
1523
|
+
describe: 'Name of the secret',
|
|
1524
|
+
},
|
|
1525
|
+
},
|
|
1526
|
+
success: {
|
|
1527
|
+
add: (secretName, accountIdentifier) =>
|
|
1528
|
+
`The secret "${secretName}" was added to the HubSpot account: ${accountIdentifier}`,
|
|
1529
|
+
},
|
|
1530
|
+
},
|
|
1531
|
+
delete: {
|
|
1532
|
+
describe: 'Delete a secret.',
|
|
1533
|
+
selectSecret: 'Select the secret you want to delete',
|
|
1534
|
+
deleteCanceled: 'Delete canceled',
|
|
1535
|
+
confirmDelete: secretName =>
|
|
1536
|
+
`Are you sure you want to delete the secret "${secretName}"?`,
|
|
1537
|
+
errors: {
|
|
1538
|
+
delete: secretName => `The secret "${secretName}" was not deleted`,
|
|
1539
|
+
noSecret: secretName =>
|
|
1540
|
+
`Unable to delete secret with name "${secretName}", it does not exist`,
|
|
1541
|
+
},
|
|
1542
|
+
positionals: {
|
|
1543
|
+
name: {
|
|
1544
|
+
describe: 'Name of the secret',
|
|
1545
|
+
},
|
|
1546
|
+
},
|
|
1547
|
+
success: {
|
|
1548
|
+
delete: (secretName, accountIdentifier) =>
|
|
1549
|
+
`The secret "${secretName}" was deleted from the HubSpot account: ${accountIdentifier}`,
|
|
1550
|
+
},
|
|
1551
|
+
},
|
|
1552
|
+
list: {
|
|
1553
|
+
describe: 'List all secrets.',
|
|
1554
|
+
errors: {
|
|
1555
|
+
list: 'The secrets could not be listed',
|
|
1556
|
+
},
|
|
1557
|
+
groupLabel: accountIdentifier =>
|
|
1558
|
+
`Secrets for account ${accountIdentifier}:`,
|
|
1559
|
+
},
|
|
1560
|
+
update: {
|
|
1561
|
+
describe: 'Update an existing secret.',
|
|
1562
|
+
selectSecret: 'Select the secret you want to update',
|
|
1563
|
+
errors: {
|
|
1564
|
+
update: secretName => `The secret "${secretName}" was not updated`,
|
|
1565
|
+
noSecret: secretName =>
|
|
1566
|
+
`Unable to update secret with name "${secretName}", it does not exist`,
|
|
1567
|
+
},
|
|
1568
|
+
positionals: {
|
|
1569
|
+
name: {
|
|
1570
|
+
describe: 'Name of the secret to be updated',
|
|
1571
|
+
},
|
|
1572
|
+
},
|
|
1573
|
+
success: {
|
|
1574
|
+
update: (secretName, accountIdentifier) =>
|
|
1575
|
+
`The secret "${secretName}" was updated in the HubSpot account: ${accountIdentifier}`,
|
|
1576
|
+
updateExplanation:
|
|
1577
|
+
'Existing serverless functions will start using this new value within 10 seconds.',
|
|
1578
|
+
},
|
|
1579
|
+
},
|
|
1580
|
+
},
|
|
1581
|
+
},
|
|
1582
|
+
theme: {
|
|
1583
|
+
describe: 'Commands for managing themes.',
|
|
1584
|
+
subcommands: {
|
|
1585
|
+
generateSelectors: {
|
|
1586
|
+
describe:
|
|
1587
|
+
'Automatically generates an editor-preview.json file for the given theme. The selectors this command generates are not perfect, so please edit editor-preview.json after running.',
|
|
1588
|
+
errors: {
|
|
1589
|
+
invalidPath: themePath => `Could not find directory "${themePath}"`,
|
|
1590
|
+
fieldsNotFound: "Unable to find theme's fields.json.",
|
|
1591
|
+
noSelectorsFound: 'No selectors found.',
|
|
1592
|
+
},
|
|
1593
|
+
success: (themePath, selectorsPath) =>
|
|
1594
|
+
`Selectors generated for ${themePath}, please double check the selectors generated at ${selectorsPath} before uploading the theme.`,
|
|
1595
|
+
positionals: {
|
|
1596
|
+
path: {
|
|
1597
|
+
describe:
|
|
1598
|
+
"The path of the theme you'd like to generate an editor-preview.json for.",
|
|
1599
|
+
},
|
|
1600
|
+
},
|
|
1601
|
+
},
|
|
1602
|
+
marketplaceValidate: {
|
|
1603
|
+
describe: 'Validate a theme for the marketplace.',
|
|
1604
|
+
errors: {
|
|
1605
|
+
invalidPath: path =>
|
|
1606
|
+
`The path "${path}" is not a path to a folder in the Design Manager`,
|
|
1607
|
+
},
|
|
1608
|
+
logs: {
|
|
1609
|
+
validatingTheme: path => `Validating theme "${path}" \n`,
|
|
1610
|
+
},
|
|
1611
|
+
results: {
|
|
1612
|
+
required: 'Required validation results:',
|
|
1613
|
+
recommended: 'Recommended validation results:',
|
|
1614
|
+
warnings: {
|
|
1615
|
+
file: file => `File: ${file}`,
|
|
1616
|
+
lineNumber: line => `Line number: ${line}`,
|
|
1617
|
+
},
|
|
1618
|
+
noErrors: 'No errors',
|
|
1619
|
+
},
|
|
1620
|
+
positionals: {
|
|
1621
|
+
path: {
|
|
1622
|
+
describe: 'Path to the theme within the Design Manager.',
|
|
1623
|
+
},
|
|
1624
|
+
},
|
|
1625
|
+
},
|
|
1626
|
+
preview: {
|
|
1627
|
+
describe:
|
|
1628
|
+
'Upload and watch a theme directory on your computer for changes and start a local development server to preview theme changes on a site.',
|
|
1629
|
+
errors: {
|
|
1630
|
+
invalidPath: path =>
|
|
1631
|
+
`The path "${path}" is not a path to a directory`,
|
|
1632
|
+
noThemeComponents:
|
|
1633
|
+
'Your project has no theme components available to preview.',
|
|
1634
|
+
},
|
|
1635
|
+
positionals: {
|
|
1636
|
+
src: {
|
|
1637
|
+
describe:
|
|
1638
|
+
'Path to the local directory your theme is in, relative to your current working directory',
|
|
1639
|
+
},
|
|
1640
|
+
dest: {
|
|
1641
|
+
describe:
|
|
1642
|
+
'Path in HubSpot Design Tools. Can be a net new path. If you wish to preview a site page using your theme changes it must match the path of the theme used by the site.',
|
|
1643
|
+
},
|
|
1644
|
+
},
|
|
1645
|
+
options: {
|
|
1646
|
+
notify: {
|
|
1647
|
+
describe:
|
|
1648
|
+
'Log to specified file when a watch task is triggered and after workers have gone idle. Ex. --notify path/to/file',
|
|
1649
|
+
},
|
|
1650
|
+
noSsl: {
|
|
1651
|
+
describe: 'Disable HTTPS',
|
|
1652
|
+
},
|
|
1653
|
+
port: {
|
|
1654
|
+
describe: 'The port on which to start the local server',
|
|
1655
|
+
},
|
|
1656
|
+
},
|
|
1657
|
+
initialUploadProgressBar: {
|
|
1658
|
+
start: 'Starting...',
|
|
1659
|
+
uploading: 'Uploading...',
|
|
1660
|
+
finish: 'Complete!',
|
|
1661
|
+
},
|
|
1662
|
+
logs: {
|
|
1663
|
+
processExited: 'Stopping dev server...',
|
|
1664
|
+
},
|
|
1665
|
+
},
|
|
1666
|
+
},
|
|
1667
|
+
},
|
|
1668
|
+
module: {
|
|
1669
|
+
describe:
|
|
1670
|
+
'Commands for working with modules, including marketplace validation with the marketplace-validate subcommand.',
|
|
1671
|
+
subcommands: {
|
|
1672
|
+
marketplaceValidate: {
|
|
1673
|
+
describe:
|
|
1674
|
+
'Validate a module for the marketplace. Make sure to include the suffix .module in the path to the module within the Design Manager.',
|
|
1675
|
+
errors: {
|
|
1676
|
+
invalidPath: path =>
|
|
1677
|
+
`The path "${path}" is not a path to a module within the Design Manager.`,
|
|
1678
|
+
},
|
|
1679
|
+
logs: {
|
|
1680
|
+
validatingModule: path => `Validating module "${path}" \n`,
|
|
1681
|
+
},
|
|
1682
|
+
options: {
|
|
1683
|
+
json: {
|
|
1684
|
+
describe: 'Output raw json data',
|
|
1685
|
+
},
|
|
1686
|
+
},
|
|
1687
|
+
results: {
|
|
1688
|
+
required: 'Required validation results:',
|
|
1689
|
+
recommended: 'Recommended validation results:',
|
|
1690
|
+
warnings: {
|
|
1691
|
+
file: file => `File: ${file}`,
|
|
1692
|
+
lineNumber: line => `Line number: ${line}`,
|
|
1693
|
+
},
|
|
1694
|
+
noErrors: 'No errors',
|
|
1695
|
+
},
|
|
1696
|
+
positionals: {
|
|
1697
|
+
src: {
|
|
1698
|
+
describe: 'Path to the module within the Design Manager.',
|
|
1699
|
+
},
|
|
1700
|
+
},
|
|
1701
|
+
},
|
|
1702
|
+
},
|
|
1703
|
+
},
|
|
1704
|
+
upload: {
|
|
1705
|
+
describe: 'Upload a folder or file from your computer to the HubSpot CMS.',
|
|
1706
|
+
errors: {
|
|
1707
|
+
destinationRequired: 'A destination path needs to be passed',
|
|
1708
|
+
fileIgnored: path =>
|
|
1709
|
+
`The file "${path}" is being ignored via an .hsignore rule`,
|
|
1710
|
+
invalidPath: path =>
|
|
1711
|
+
`The path "${path}" is not a path to a file or folder`,
|
|
1712
|
+
uploadFailed: (src, dest) =>
|
|
1713
|
+
`Uploading file "${src}" to "${dest}" failed`,
|
|
1714
|
+
someFilesFailed: dest =>
|
|
1715
|
+
`One or more files failed to upload to "${dest}" in the Design Manager`,
|
|
1716
|
+
deleteFailed: (path, accountId) =>
|
|
1717
|
+
`Deleting "${path}" from account ${accountId} failed`,
|
|
1718
|
+
},
|
|
1719
|
+
options: {
|
|
1720
|
+
options: {
|
|
1721
|
+
describe: 'Options to pass to javascript fields files',
|
|
1722
|
+
},
|
|
1723
|
+
saveOutput: {
|
|
1724
|
+
describe:
|
|
1725
|
+
"If true, saves all output from javascript fields files as 'fields.output.json'.",
|
|
1726
|
+
},
|
|
1727
|
+
convertFields: {
|
|
1728
|
+
describe:
|
|
1729
|
+
'If true, converts any javascript fields files contained in module folder or project root.',
|
|
1730
|
+
},
|
|
1731
|
+
clean: {
|
|
1732
|
+
describe:
|
|
1733
|
+
'Will delete the destination directory and its contents before uploading. This will also clear the global content associated with any global partial templates and modules.',
|
|
1734
|
+
},
|
|
1735
|
+
force: {
|
|
1736
|
+
describe: 'Skips confirmation prompts when doing a clean upload.',
|
|
1737
|
+
},
|
|
1738
|
+
},
|
|
1739
|
+
previewUrl: previewUrl => `To preview this theme, visit: ${previewUrl}`,
|
|
1740
|
+
positionals: {
|
|
1741
|
+
src: {
|
|
1742
|
+
describe:
|
|
1743
|
+
'Path to the local file, relative to your current working directory.',
|
|
1744
|
+
},
|
|
1745
|
+
dest: {
|
|
1746
|
+
describe: 'Path in HubSpot Design Tools, can be a net new path.',
|
|
1747
|
+
},
|
|
1748
|
+
},
|
|
1749
|
+
success: {
|
|
1750
|
+
fileUploaded: ({ src, dest, accountId }) =>
|
|
1751
|
+
`Uploaded file from "${src}" to "${dest}" in the Design Manager of account ${accountId}`,
|
|
1752
|
+
uploadComplete: ({ dest }) =>
|
|
1753
|
+
`Uploading files to "${dest}" in the Design Manager is complete`,
|
|
1754
|
+
},
|
|
1755
|
+
uploading: ({ src, dest, accountId }) =>
|
|
1756
|
+
`Uploading files from "${src}" to "${dest}" in the Design Manager of account ${accountId}`,
|
|
1757
|
+
notUploaded: ({ src }) =>
|
|
1758
|
+
`There was an error processing "${src}". The file has not been uploaded.`,
|
|
1759
|
+
cleaning: ({ filePath, accountId }) =>
|
|
1760
|
+
`Removing "${filePath}" from account ${accountId} and uploading local...`,
|
|
1761
|
+
confirmCleanUpload: ({ filePath, accountId }) =>
|
|
1762
|
+
`You are about to delete the directory "${filePath}" and its contents on HubSpot account ${accountId} before uploading. This will also clear the global content associated with any global partial templates and modules. Are you sure you want to do this?`,
|
|
1763
|
+
},
|
|
1764
|
+
watch: {
|
|
1765
|
+
describe:
|
|
1766
|
+
'Watch a directory on your computer for changes and upload the changed files to the HubSpot CMS.',
|
|
1767
|
+
errors: {
|
|
1768
|
+
folderFailed: (src, dest, accountId) =>
|
|
1769
|
+
`Initial uploading of folder "${src}" to "${dest}" in account ${accountId} had failures`,
|
|
1770
|
+
fileFailed: (file, dest, accountId) =>
|
|
1771
|
+
`Upload of file "${file}" to "${dest}" in account ${accountId} failed`,
|
|
1772
|
+
destinationRequired: 'A destination directory needs to be passed',
|
|
1773
|
+
invalidPath: path => `The "${path}" is not a path to a directory`,
|
|
1774
|
+
},
|
|
1775
|
+
options: {
|
|
1776
|
+
disableInitial: {
|
|
1777
|
+
describe:
|
|
1778
|
+
'Disable the initial upload when watching a directory (default)',
|
|
1779
|
+
},
|
|
1780
|
+
initialUpload: {
|
|
1781
|
+
describe: 'Upload directory before watching for updates',
|
|
1782
|
+
},
|
|
1783
|
+
notify: {
|
|
1784
|
+
describe:
|
|
1785
|
+
'Log to specified file when a watch task is triggered and after workers have gone idle. Ex. --notify path/to/file',
|
|
1786
|
+
},
|
|
1787
|
+
remove: {
|
|
1788
|
+
describe:
|
|
1789
|
+
'Will cause watch to delete files in your HubSpot account that are not found locally.',
|
|
1790
|
+
},
|
|
1791
|
+
convertFields: {
|
|
1792
|
+
describe:
|
|
1793
|
+
'If true, converts any javascript fields files contained in module folder or project root.',
|
|
1794
|
+
},
|
|
1795
|
+
saveOutput: {
|
|
1796
|
+
describe:
|
|
1797
|
+
"If true, saves all output from javascript fields files as 'fields.output.json'.",
|
|
1798
|
+
},
|
|
1799
|
+
options: {
|
|
1800
|
+
describe: 'Options to pass to javascript fields files',
|
|
1801
|
+
},
|
|
1802
|
+
},
|
|
1803
|
+
positionals: {
|
|
1804
|
+
src: {
|
|
1805
|
+
describe:
|
|
1806
|
+
'Path to the local directory your files are in, relative to your current working directory',
|
|
1807
|
+
},
|
|
1808
|
+
dest: {
|
|
1809
|
+
describe: 'Path in HubSpot Design Tools. Can be a net new path',
|
|
1810
|
+
},
|
|
1811
|
+
},
|
|
1812
|
+
warnings: {
|
|
1813
|
+
disableInitial: () =>
|
|
1814
|
+
`Passing the "${chalk.bold('--disable-initial')}" option is no longer necessary. Running "${chalk.bold('hs watch')}" no longer uploads the watched directory by default.`,
|
|
1815
|
+
initialUpload: () =>
|
|
1816
|
+
`To upload the directory run "${chalk.bold('hs upload')}" beforehand or add the "${chalk.bold('--initial-upload')}" option when running "${chalk.bold('hs watch')}".`,
|
|
1817
|
+
notUploaded: path =>
|
|
1818
|
+
`The "${chalk.bold('hs watch')}" command no longer uploads the watched directory when started. The directory "${path}" was not uploaded.`,
|
|
1819
|
+
},
|
|
1820
|
+
},
|
|
1821
|
+
convertFields: {
|
|
1822
|
+
describe:
|
|
1823
|
+
'Converts a specific JavaScript fields file of a module or theme to JSON.',
|
|
1824
|
+
positionals: {
|
|
1825
|
+
src: {
|
|
1826
|
+
describe:
|
|
1827
|
+
'Path to JS Fields file or directory containing javascript fields files.',
|
|
1828
|
+
},
|
|
1829
|
+
},
|
|
1830
|
+
options: {
|
|
1831
|
+
options: {
|
|
1832
|
+
describe: 'Options to pass to javascript fields files',
|
|
1833
|
+
},
|
|
1834
|
+
},
|
|
1835
|
+
errors: {
|
|
1836
|
+
invalidPath: path =>
|
|
1837
|
+
`The path "${path}" specified in the "--src" flag is not a path to a file or directory`,
|
|
1838
|
+
missingSrc:
|
|
1839
|
+
'Please specify the path to your javascript fields file or directory with the --src flag.',
|
|
1840
|
+
},
|
|
1841
|
+
},
|
|
1842
|
+
secrets: {
|
|
1843
|
+
add: {
|
|
1844
|
+
loading: {
|
|
1845
|
+
add: secretName => `Adding secret ${chalk.bold(secretName)}`,
|
|
1846
|
+
fail: secretName => `Failed to add secret ${chalk.bold(secretName)}.`,
|
|
1847
|
+
succeed: secretName =>
|
|
1848
|
+
`Successfully added secret ${chalk.bold(secretName)}.`,
|
|
1849
|
+
},
|
|
1850
|
+
success: {
|
|
1851
|
+
configFileUpdated: (secretName, authType) =>
|
|
1852
|
+
`Secret "${secretName}" updated using "${authType}"`,
|
|
1853
|
+
},
|
|
1854
|
+
failure: {
|
|
1855
|
+
invalidUser: (secretName, parentAccountName) =>
|
|
1856
|
+
`Couldn't add ${chalk.bold(secretName)} because your account has been removed from ${chalk.bold(parentAccountName)} or your permission set doesn't allow you to add secrets. To update your permissions, contact a super admin in ${chalk.bold(parentAccountName)}.`,
|
|
1857
|
+
scopes: {
|
|
1858
|
+
message:
|
|
1859
|
+
"The personal access key you provided doesn't include secrets permissions.",
|
|
1860
|
+
instructions: (secretName, url) =>
|
|
1861
|
+
`To update CLI permissions for "${secretName}": \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes secrets permissions. \n- Update the CLI config for this account by running ${chalk.bold('hs auth')} and entering the new key.\n`,
|
|
1862
|
+
},
|
|
1863
|
+
},
|
|
1864
|
+
},
|
|
1865
|
+
delete: {
|
|
1866
|
+
loading: {
|
|
1867
|
+
add: secretName => `Deleting secret ${chalk.bold(secretName)}`,
|
|
1868
|
+
fail: secretName =>
|
|
1869
|
+
`Failed to delete secret ${chalk.bold(secretName)}.`,
|
|
1870
|
+
succeed: secretName =>
|
|
1871
|
+
`Successfully deleted secret ${chalk.bold(secretName)}.`,
|
|
1872
|
+
},
|
|
1873
|
+
success: {
|
|
1874
|
+
configFileUpdated: (secretName, authType) =>
|
|
1875
|
+
`Secret "${secretName}" updated using "${authType}"`,
|
|
1876
|
+
},
|
|
1877
|
+
failure: {
|
|
1878
|
+
invalidUser: (secretName, parentAccountName) =>
|
|
1879
|
+
`Couldn't delete ${chalk.bold(secretName)} because your account has been removed from ${chalk.bold(parentAccountName)} or your permission set doesn't allow you to delete secrets. To update your permissions, contact a super admin in ${chalk.bold(parentAccountName)}.`,
|
|
1880
|
+
scopes: {
|
|
1881
|
+
message:
|
|
1882
|
+
"The personal access key you provided doesn't include secrets permissions.",
|
|
1883
|
+
instructions: (secretName, url) =>
|
|
1884
|
+
`To update CLI permissions for "${secretName}": \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes secrets permissions. \n- Update the CLI config for this account by running ${chalk.bold('hs auth')} and entering the new key.\n`,
|
|
1885
|
+
},
|
|
1886
|
+
},
|
|
1887
|
+
},
|
|
1888
|
+
list: {
|
|
1889
|
+
loading: {
|
|
1890
|
+
add: () => `Listing secrets`,
|
|
1891
|
+
fail: () => `Failed to list secrets.`,
|
|
1892
|
+
succeed: () => `Successfully listed secrets.`,
|
|
1893
|
+
},
|
|
1894
|
+
success: {
|
|
1895
|
+
configFileUpdated: authType => `Secrets updated using "${authType}"`,
|
|
1896
|
+
},
|
|
1897
|
+
failure: {
|
|
1898
|
+
invalidUser: parentAccountName =>
|
|
1899
|
+
`Couldn't list secrets because your account has been removed from ${chalk.bold(parentAccountName)} or your permission set doesn't allow you to list secrets. To update your permissions, contact a super admin in ${chalk.bold(parentAccountName)}.`,
|
|
1900
|
+
scopes: {
|
|
1901
|
+
message:
|
|
1902
|
+
"The personal access key you provided doesn't include secrets permissions.",
|
|
1903
|
+
instructions: url =>
|
|
1904
|
+
`To update CLI permissions: \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes secrets permissions. \n- Update the CLI config for this account by running ${chalk.bold('hs auth')} and entering the new key.\n`,
|
|
1905
|
+
},
|
|
1906
|
+
},
|
|
1907
|
+
},
|
|
1908
|
+
},
|
|
1909
|
+
serverless: {
|
|
1910
|
+
add: {
|
|
1911
|
+
loading: {
|
|
1912
|
+
add: functionName =>
|
|
1913
|
+
`Adding serverless function ${chalk.bold(functionName)}`,
|
|
1914
|
+
fail: functionName =>
|
|
1915
|
+
`Failed to add serverless function ${chalk.bold(functionName)}.`,
|
|
1916
|
+
succeed: functionName =>
|
|
1917
|
+
`Successfully added serverless function ${chalk.bold(functionName)}.`,
|
|
1918
|
+
},
|
|
1919
|
+
success: {
|
|
1920
|
+
configFileUpdated: (functionName, authType) =>
|
|
1921
|
+
`Serverless function "${functionName}" updated using "${authType}"`,
|
|
1922
|
+
},
|
|
1923
|
+
failure: {
|
|
1924
|
+
invalidUser: (functionName, parentAccountName) =>
|
|
1925
|
+
`Couldn't add ${chalk.bold(functionName)} because your account has been removed from ${chalk.bold(parentAccountName)} or your permission set doesn't allow you to add serverless functions. To update your permissions, contact a super admin in ${chalk.bold(parentAccountName)}.`,
|
|
1926
|
+
scopes: {
|
|
1927
|
+
message:
|
|
1928
|
+
"The personal access key you provided doesn't include serverless function permissions.",
|
|
1929
|
+
instructions: (functionName, url) =>
|
|
1930
|
+
`To update CLI permissions for "${functionName}": \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes serverless function permissions. \n- Update the CLI config for this account by running ${chalk.bold('hs auth')} and entering the new key.\n`,
|
|
1931
|
+
},
|
|
1932
|
+
},
|
|
1933
|
+
},
|
|
1934
|
+
delete: {
|
|
1935
|
+
loading: {
|
|
1936
|
+
add: functionName =>
|
|
1937
|
+
`Deleting serverless function ${chalk.bold(functionName)}`,
|
|
1938
|
+
fail: functionName =>
|
|
1939
|
+
`Failed to delete serverless function ${chalk.bold(functionName)}.`,
|
|
1940
|
+
succeed: functionName =>
|
|
1941
|
+
`Successfully deleted serverless function ${chalk.bold(functionName)}.`,
|
|
1942
|
+
},
|
|
1943
|
+
success: {
|
|
1944
|
+
configFileUpdated: (functionName, authType) =>
|
|
1945
|
+
`Serverless function "${functionName}" updated using "${authType}"`,
|
|
1946
|
+
},
|
|
1947
|
+
failure: {
|
|
1948
|
+
invalidUser: (functionName, parentAccountName) =>
|
|
1949
|
+
`Couldn't delete ${chalk.bold(functionName)} because your account has been removed from ${chalk.bold(parentAccountName)} or your permission set doesn't allow you to delete serverless functions. To update your permissions, contact a super admin in ${chalk.bold(parentAccountName)}.`,
|
|
1950
|
+
scopes: {
|
|
1951
|
+
message:
|
|
1952
|
+
"The personal access key you provided doesn't include serverless function permissions.",
|
|
1953
|
+
instructions: (functionName, url) =>
|
|
1954
|
+
`To update CLI permissions for "${functionName}": \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes serverless function permissions. \n- Update the CLI config for this account by running ${chalk.bold('hs auth')} and entering the new key.\n`,
|
|
1955
|
+
},
|
|
1956
|
+
},
|
|
1957
|
+
},
|
|
1958
|
+
list: {
|
|
1959
|
+
loading: {
|
|
1960
|
+
add: () => `Listing serverless functions`,
|
|
1961
|
+
fail: () => `Failed to list serverless functions.`,
|
|
1962
|
+
succeed: () => `Successfully listed serverless functions.`,
|
|
1963
|
+
},
|
|
1964
|
+
success: {
|
|
1965
|
+
configFileUpdated: authType =>
|
|
1966
|
+
`Serverless functions updated using "${authType}"`,
|
|
1967
|
+
},
|
|
1968
|
+
failure: {
|
|
1969
|
+
invalidUser: parentAccountName =>
|
|
1970
|
+
`Couldn't list serverless functions because your account has been removed from ${chalk.bold(parentAccountName)} or your permission set doesn't allow you to list serverless functions. To update your permissions, contact a super admin in ${chalk.bold(parentAccountName)}.`,
|
|
1971
|
+
scopes: {
|
|
1972
|
+
message:
|
|
1973
|
+
"The personal access key you provided doesn't include serverless function permissions.",
|
|
1974
|
+
instructions: url =>
|
|
1975
|
+
`To update CLI permissions: \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes serverless function permissions. \n- Update the CLI config for this account by running ${chalk.bold('hs auth')} and entering the new key.\n`,
|
|
1976
|
+
},
|
|
1977
|
+
},
|
|
1978
|
+
},
|
|
1979
|
+
},
|
|
1980
|
+
serverlessFunctionLogs: {
|
|
1981
|
+
add: {
|
|
1982
|
+
loading: {
|
|
1983
|
+
add: functionName =>
|
|
1984
|
+
`Adding serverless function logs ${chalk.bold(functionName)}`,
|
|
1985
|
+
fail: functionName =>
|
|
1986
|
+
`Failed to add serverless function logs ${chalk.bold(functionName)}.`,
|
|
1987
|
+
succeed: functionName =>
|
|
1988
|
+
`Successfully added serverless function logs ${chalk.bold(functionName)}.`,
|
|
1989
|
+
},
|
|
1990
|
+
success: {
|
|
1991
|
+
configFileUpdated: (functionName, authType) =>
|
|
1992
|
+
`Serverless function logs "${functionName}" updated using "${authType}"`,
|
|
1993
|
+
},
|
|
1994
|
+
failure: {
|
|
1995
|
+
invalidUser: (functionName, parentAccountName) =>
|
|
1996
|
+
`Couldn't add ${chalk.bold(functionName)} because your account has been removed from ${chalk.bold(parentAccountName)} or your permission set doesn't allow you to add serverless function logs. To update your permissions, contact a super admin in ${chalk.bold(parentAccountName)}.`,
|
|
1997
|
+
scopes: {
|
|
1998
|
+
message:
|
|
1999
|
+
"The personal access key you provided doesn't include serverless function log permissions.",
|
|
2000
|
+
instructions: (functionName, url) =>
|
|
2001
|
+
`To update CLI permissions for "${functionName}": \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes serverless function log permissions. \n- Update the CLI config for this account by running ${chalk.bold('hs auth')} and entering the new key.\n`,
|
|
2002
|
+
},
|
|
2003
|
+
},
|
|
2004
|
+
},
|
|
2005
|
+
delete: {
|
|
2006
|
+
loading: {
|
|
2007
|
+
add: functionName =>
|
|
2008
|
+
`Deleting serverless function logs ${chalk.bold(functionName)}`,
|
|
2009
|
+
fail: functionName =>
|
|
2010
|
+
`Failed to delete serverless function logs ${chalk.bold(functionName)}.`,
|
|
2011
|
+
succeed: functionName =>
|
|
2012
|
+
`Successfully deleted serverless function logs ${chalk.bold(functionName)}.`,
|
|
2013
|
+
},
|
|
2014
|
+
success: {
|
|
2015
|
+
configFileUpdated: (functionName, authType) =>
|
|
2016
|
+
`Serverless function logs "${functionName}" updated using "${authType}"`,
|
|
2017
|
+
},
|
|
2018
|
+
failure: {
|
|
2019
|
+
invalidUser: (functionName, parentAccountName) =>
|
|
2020
|
+
`Couldn't delete ${chalk.bold(functionName)} because your account has been removed from ${chalk.bold(parentAccountName)} or your permission set doesn't allow you to delete serverless function logs. To update your permissions, contact a super admin in ${chalk.bold(parentAccountName)}.`,
|
|
2021
|
+
scopes: {
|
|
2022
|
+
message:
|
|
2023
|
+
"The personal access key you provided doesn't include serverless function log permissions.",
|
|
2024
|
+
instructions: (functionName, url) =>
|
|
2025
|
+
`To update CLI permissions for "${functionName}": \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes serverless function log permissions. \n- Update the CLI config for this account by running ${chalk.bold('hs auth')} and entering the new key.\n`,
|
|
2026
|
+
},
|
|
2027
|
+
},
|
|
2028
|
+
},
|
|
2029
|
+
list: {
|
|
2030
|
+
loading: {
|
|
2031
|
+
add: () => `Listing serverless function logs`,
|
|
2032
|
+
fail: () => `Failed to list serverless function logs.`,
|
|
2033
|
+
succeed: () => `Successfully listed serverless function logs.`,
|
|
2034
|
+
},
|
|
2035
|
+
success: {
|
|
2036
|
+
configFileUpdated: authType =>
|
|
2037
|
+
`Serverless function logs updated using "${authType}"`,
|
|
2038
|
+
},
|
|
2039
|
+
failure: {
|
|
2040
|
+
invalidUser: parentAccountName =>
|
|
2041
|
+
`Couldn't list serverless function logs because your account has been removed from ${chalk.bold(parentAccountName)} or your permission set doesn't allow you to list serverless function logs. To update your permissions, contact a super admin in ${chalk.bold(parentAccountName)}.`,
|
|
2042
|
+
scopes: {
|
|
2043
|
+
message:
|
|
2044
|
+
"The personal access key you provided doesn't include serverless function log permissions.",
|
|
2045
|
+
instructions: url =>
|
|
2046
|
+
`To update CLI permissions: \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes serverless function log permissions. \n- Update the CLI config for this account by running ${chalk.bold('hs auth')} and entering the new key.\n`,
|
|
2047
|
+
},
|
|
2048
|
+
},
|
|
2049
|
+
},
|
|
2050
|
+
},
|
|
2051
|
+
serverlessFunctionMetrics: {
|
|
2052
|
+
add: {
|
|
2053
|
+
loading: {
|
|
2054
|
+
add: functionName =>
|
|
2055
|
+
`Adding serverless function metrics ${chalk.bold(functionName)}`,
|
|
2056
|
+
fail: functionName =>
|
|
2057
|
+
`Failed to add serverless function metrics ${chalk.bold(functionName)}.`,
|
|
2058
|
+
succeed: functionName =>
|
|
2059
|
+
`Successfully added serverless function metrics ${chalk.bold(functionName)}.`,
|
|
2060
|
+
},
|
|
2061
|
+
success: {
|
|
2062
|
+
configFileUpdated: (functionName, authType) =>
|
|
2063
|
+
`Serverless function metrics "${functionName}" updated using "${authType}"`,
|
|
2064
|
+
},
|
|
2065
|
+
failure: {
|
|
2066
|
+
invalidUser: (functionName, parentAccountName) =>
|
|
2067
|
+
`Couldn't add ${chalk.bold(functionName)} because your account has been removed from ${chalk.bold(parentAccountName)} or your permission set doesn't allow you to add serverless function metrics. To update your permissions, contact a super admin in ${chalk.bold(parentAccountName)}.`,
|
|
2068
|
+
scopes: {
|
|
2069
|
+
message:
|
|
2070
|
+
"The personal access key you provided doesn't include serverless function metric permissions.",
|
|
2071
|
+
instructions: (functionName, url) =>
|
|
2072
|
+
`To update CLI permissions for "${functionName}": \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes serverless function metric permissions. \n- Update the CLI config for this account by running ${chalk.bold('hs auth')} and entering the new key.\n`,
|
|
2073
|
+
},
|
|
2074
|
+
},
|
|
2075
|
+
},
|
|
2076
|
+
delete: {
|
|
2077
|
+
loading: {
|
|
2078
|
+
add: functionName =>
|
|
2079
|
+
`Deleting serverless function metrics ${chalk.bold(functionName)}`,
|
|
2080
|
+
fail: functionName =>
|
|
2081
|
+
`Failed to delete serverless function metrics ${chalk.bold(functionName)}.`,
|
|
2082
|
+
succeed: functionName =>
|
|
2083
|
+
`Successfully deleted serverless function metrics ${chalk.bold(functionName)}.`,
|
|
2084
|
+
},
|
|
2085
|
+
success: {
|
|
2086
|
+
configFileUpdated: (functionName, authType) =>
|
|
2087
|
+
`Serverless function metrics "${functionName}" updated using "${authType}"`,
|
|
2088
|
+
},
|
|
2089
|
+
failure: {
|
|
2090
|
+
invalidUser: (functionName, parentAccountName) =>
|
|
2091
|
+
`Couldn't delete ${chalk.bold(functionName)} because your account has been removed from ${chalk.bold(parentAccountName)} or your permission set doesn't allow you to delete serverless function metrics. To update your permissions, contact a super admin in ${chalk.bold(parentAccountName)}.`,
|
|
2092
|
+
scopes: {
|
|
2093
|
+
message:
|
|
2094
|
+
"The personal access key you provided doesn't include serverless function metric permissions.",
|
|
2095
|
+
instructions: (functionName, url) =>
|
|
2096
|
+
`To update CLI permissions for "${functionName}": \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes serverless function metric permissions. \n- Update the CLI config for this account by running ${chalk.bold('hs auth')} and entering the new key.\n`,
|
|
2097
|
+
},
|
|
2098
|
+
},
|
|
2099
|
+
},
|
|
2100
|
+
list: {
|
|
2101
|
+
loading: {
|
|
2102
|
+
add: () => `Listing serverless function metrics`,
|
|
2103
|
+
fail: () => `Failed to list serverless function metrics.`,
|
|
2104
|
+
succeed: () => `Successfully listed serverless function metrics.`,
|
|
2105
|
+
},
|
|
2106
|
+
success: {
|
|
2107
|
+
configFileUpdated: authType =>
|
|
2108
|
+
`Serverless function metrics updated using "${authType}"`,
|
|
2109
|
+
},
|
|
2110
|
+
failure: {
|
|
2111
|
+
invalidUser: parentAccountName =>
|
|
2112
|
+
`Couldn't list serverless function metrics because your account has been removed from ${chalk.bold(parentAccountName)} or your permission set doesn't allow you to list serverless function metrics. To update your permissions, contact a super admin in ${chalk.bold(parentAccountName)}.`,
|
|
2113
|
+
scopes: {
|
|
2114
|
+
message:
|
|
2115
|
+
"The personal access key you provided doesn't include serverless function metric permissions.",
|
|
2116
|
+
instructions: url =>
|
|
2117
|
+
`To update CLI permissions: \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes serverless function metric permissions. \n- Update the CLI config for this account by running ${chalk.bold('hs auth')} and entering the new key.\n`,
|
|
2118
|
+
},
|
|
2119
|
+
},
|
|
2120
|
+
},
|
|
2121
|
+
},
|
|
2122
|
+
serverlessFunctionSettings: {
|
|
2123
|
+
add: {
|
|
2124
|
+
loading: {
|
|
2125
|
+
add: functionName =>
|
|
2126
|
+
`Adding serverless function settings ${chalk.bold(functionName)}`,
|
|
2127
|
+
fail: functionName =>
|
|
2128
|
+
`Failed to add serverless function settings ${chalk.bold(functionName)}.`,
|
|
2129
|
+
succeed: functionName =>
|
|
2130
|
+
`Successfully added serverless function settings ${chalk.bold(functionName)}.`,
|
|
2131
|
+
},
|
|
2132
|
+
success: {
|
|
2133
|
+
configFileUpdated: (functionName, authType) =>
|
|
2134
|
+
`Serverless function settings "${functionName}" updated using "${authType}"`,
|
|
2135
|
+
},
|
|
2136
|
+
failure: {
|
|
2137
|
+
invalidUser: (functionName, parentAccountName) =>
|
|
2138
|
+
`Couldn't add ${chalk.bold(functionName)} because your account has been removed from ${chalk.bold(parentAccountName)} or your permission set doesn't allow you to add serverless function settings. To update your permissions, contact a super admin in ${chalk.bold(parentAccountName)}.`,
|
|
2139
|
+
scopes: {
|
|
2140
|
+
message:
|
|
2141
|
+
"The personal access key you provided doesn't include serverless function setting permissions.",
|
|
2142
|
+
instructions: (functionName, url) =>
|
|
2143
|
+
`To update CLI permissions for "${functionName}": \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes serverless function setting permissions. \n- Update the CLI config for this account by running ${chalk.bold('hs auth')} and entering the new key.\n`,
|
|
2144
|
+
},
|
|
2145
|
+
},
|
|
2146
|
+
},
|
|
2147
|
+
delete: {
|
|
2148
|
+
loading: {
|
|
2149
|
+
add: functionName =>
|
|
2150
|
+
`Deleting serverless function settings ${chalk.bold(functionName)}`,
|
|
2151
|
+
fail: functionName =>
|
|
2152
|
+
`Failed to delete serverless function settings ${chalk.bold(functionName)}.`,
|
|
2153
|
+
succeed: functionName =>
|
|
2154
|
+
`Successfully deleted serverless function settings ${chalk.bold(functionName)}.`,
|
|
2155
|
+
},
|
|
2156
|
+
success: {
|
|
2157
|
+
configFileUpdated: (functionName, authType) =>
|
|
2158
|
+
`Serverless function settings "${functionName}" updated using "${authType}"`,
|
|
2159
|
+
},
|
|
2160
|
+
failure: {
|
|
2161
|
+
invalidUser: (functionName, parentAccountName) =>
|
|
2162
|
+
`Couldn't delete ${chalk.bold(functionName)} because your account has been removed from ${chalk.bold(parentAccountName)} or your permission set doesn't allow you to delete serverless function settings. To update your permissions, contact a super admin in ${chalk.bold(parentAccountName)}.`,
|
|
2163
|
+
scopes: {
|
|
2164
|
+
message:
|
|
2165
|
+
"The personal access key you provided doesn't include serverless function setting permissions.",
|
|
2166
|
+
instructions: (functionName, url) =>
|
|
2167
|
+
`To update CLI permissions for "${functionName}": \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes serverless function setting permissions. \n- Update the CLI config for this account by running ${chalk.bold('hs auth')} and entering the new key.\n`,
|
|
2168
|
+
},
|
|
2169
|
+
},
|
|
2170
|
+
},
|
|
2171
|
+
list: {
|
|
2172
|
+
loading: {
|
|
2173
|
+
add: () => `Listing serverless function settings`,
|
|
2174
|
+
fail: () => `Failed to list serverless function settings.`,
|
|
2175
|
+
succeed: () => `Successfully listed serverless function settings.`,
|
|
2176
|
+
},
|
|
2177
|
+
success: {
|
|
2178
|
+
configFileUpdated: authType =>
|
|
2179
|
+
`Serverless function settings updated using "${authType}"`,
|
|
2180
|
+
},
|
|
2181
|
+
failure: {
|
|
2182
|
+
invalidUser: parentAccountName =>
|
|
2183
|
+
`Couldn't list serverless function settings because your account has been removed from ${chalk.bold(parentAccountName)} or your permission set doesn't allow you to list serverless function settings. To update your permissions, contact a super admin in ${chalk.bold(parentAccountName)}.`,
|
|
2184
|
+
scopes: {
|
|
2185
|
+
message:
|
|
2186
|
+
"The personal access key you provided doesn't include serverless function setting permissions.",
|
|
2187
|
+
instructions: url =>
|
|
2188
|
+
`To update CLI permissions: \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes serverless function setting permissions. \n- Update the CLI config for this account by running ${chalk.bold('hs auth')} and entering the new key.\n`,
|
|
2189
|
+
},
|
|
2190
|
+
},
|
|
2191
|
+
},
|
|
2192
|
+
},
|
|
2193
|
+
serverlessFunctionVersions: {
|
|
2194
|
+
add: {
|
|
2195
|
+
loading: {
|
|
2196
|
+
add: functionName =>
|
|
2197
|
+
`Adding serverless function versions ${chalk.bold(functionName)}`,
|
|
2198
|
+
fail: functionName =>
|
|
2199
|
+
`Failed to add serverless function versions ${chalk.bold(functionName)}.`,
|
|
2200
|
+
succeed: functionName =>
|
|
2201
|
+
`Successfully added serverless function versions ${chalk.bold(functionName)}.`,
|
|
2202
|
+
},
|
|
2203
|
+
success: {
|
|
2204
|
+
configFileUpdated: (functionName, authType) =>
|
|
2205
|
+
`Serverless function versions "${functionName}" updated using "${authType}"`,
|
|
2206
|
+
},
|
|
2207
|
+
failure: {
|
|
2208
|
+
invalidUser: (functionName, parentAccountName) =>
|
|
2209
|
+
`Couldn't add ${chalk.bold(functionName)} because your account has been removed from ${chalk.bold(parentAccountName)} or your permission set doesn't allow you to add serverless function versions. To update your permissions, contact a super admin in ${chalk.bold(parentAccountName)}.`,
|
|
2210
|
+
scopes: {
|
|
2211
|
+
message:
|
|
2212
|
+
"The personal access key you provided doesn't include serverless function version permissions.",
|
|
2213
|
+
instructions: (functionName, url) =>
|
|
2214
|
+
`To update CLI permissions for "${functionName}": \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes serverless function version permissions. \n- Update the CLI config for this account by running ${chalk.bold('hs auth')} and entering the new key.\n`,
|
|
2215
|
+
},
|
|
2216
|
+
},
|
|
2217
|
+
},
|
|
2218
|
+
delete: {
|
|
2219
|
+
loading: {
|
|
2220
|
+
add: functionName =>
|
|
2221
|
+
`Deleting serverless function versions ${chalk.bold(functionName)}`,
|
|
2222
|
+
fail: functionName =>
|
|
2223
|
+
`Failed to delete serverless function versions ${chalk.bold(functionName)}.`,
|
|
2224
|
+
succeed: functionName =>
|
|
2225
|
+
`Successfully deleted serverless function versions ${chalk.bold(functionName)}.`,
|
|
2226
|
+
},
|
|
2227
|
+
success: {
|
|
2228
|
+
configFileUpdated: (functionName, authType) =>
|
|
2229
|
+
`Serverless function versions "${functionName}" updated using "${authType}"`,
|
|
2230
|
+
},
|
|
2231
|
+
failure: {
|
|
2232
|
+
invalidUser: (functionName, parentAccountName) =>
|
|
2233
|
+
`Couldn't delete ${chalk.bold(functionName)} because your account has been removed from ${chalk.bold(parentAccountName)} or your permission set doesn't allow you to delete serverless function versions. To update your permissions, contact a super admin in ${chalk.bold(parentAccountName)}.`,
|
|
2234
|
+
scopes: {
|
|
2235
|
+
message:
|
|
2236
|
+
"The personal access key you provided doesn't include serverless function version permissions.",
|
|
2237
|
+
instructions: (functionName, url) =>
|
|
2238
|
+
`To update CLI permissions for "${functionName}": \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes serverless function version permissions. \n- Update the CLI config for this account by running ${chalk.bold('hs auth')} and entering the new key.\n`,
|
|
2239
|
+
},
|
|
2240
|
+
},
|
|
2241
|
+
},
|
|
2242
|
+
list: {
|
|
2243
|
+
loading: {
|
|
2244
|
+
add: () => `Listing serverless function versions`,
|
|
2245
|
+
fail: () => `Failed to list serverless function versions.`,
|
|
2246
|
+
succeed: () => `Successfully listed serverless function versions.`,
|
|
2247
|
+
},
|
|
2248
|
+
success: {
|
|
2249
|
+
configFileUpdated: authType =>
|
|
2250
|
+
`Serverless function versions updated using "${authType}"`,
|
|
2251
|
+
},
|
|
2252
|
+
failure: {
|
|
2253
|
+
invalidUser: parentAccountName =>
|
|
2254
|
+
`Couldn't list serverless function versions because your account has been removed from ${chalk.bold(parentAccountName)} or your permission set doesn't allow you to list serverless function versions. To update your permissions, contact a super admin in ${chalk.bold(parentAccountName)}.`,
|
|
2255
|
+
scopes: {
|
|
2256
|
+
message:
|
|
2257
|
+
"The personal access key you provided doesn't include serverless function version permissions.",
|
|
2258
|
+
instructions: url =>
|
|
2259
|
+
`To update CLI permissions: \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes serverless function version permissions. \n- Update the CLI config for this account by running ${chalk.bold('hs auth')} and entering the new key.\n`,
|
|
2260
|
+
},
|
|
2261
|
+
},
|
|
2262
|
+
},
|
|
2263
|
+
},
|
|
2264
|
+
serverlessFunctionWebhooks: {
|
|
2265
|
+
add: {
|
|
2266
|
+
loading: {
|
|
2267
|
+
add: functionName =>
|
|
2268
|
+
`Adding serverless function webhooks ${chalk.bold(functionName)}`,
|
|
2269
|
+
fail: functionName =>
|
|
2270
|
+
`Failed to add serverless function webhooks ${chalk.bold(functionName)}.`,
|
|
2271
|
+
succeed: functionName =>
|
|
2272
|
+
`Successfully added serverless function webhooks ${chalk.bold(functionName)}.`,
|
|
2273
|
+
},
|
|
2274
|
+
success: {
|
|
2275
|
+
configFileUpdated: (functionName, authType) =>
|
|
2276
|
+
`Serverless function webhooks "${functionName}" updated using "${authType}"`,
|
|
2277
|
+
},
|
|
2278
|
+
failure: {
|
|
2279
|
+
invalidUser: (functionName, parentAccountName) =>
|
|
2280
|
+
`Couldn't add ${chalk.bold(functionName)} because your account has been removed from ${chalk.bold(parentAccountName)} or your permission set doesn't allow you to add serverless function webhooks. To update your permissions, contact a super admin in ${chalk.bold(parentAccountName)}.`,
|
|
2281
|
+
scopes: {
|
|
2282
|
+
message:
|
|
2283
|
+
"The personal access key you provided doesn't include serverless function webhook permissions.",
|
|
2284
|
+
instructions: (functionName, url) =>
|
|
2285
|
+
`To update CLI permissions for "${functionName}": \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes serverless function webhook permissions. \n- Update the CLI config for this account by running ${chalk.bold('hs auth')} and entering the new key.\n`,
|
|
2286
|
+
},
|
|
2287
|
+
},
|
|
2288
|
+
},
|
|
2289
|
+
delete: {
|
|
2290
|
+
loading: {
|
|
2291
|
+
add: functionName =>
|
|
2292
|
+
`Deleting serverless function webhooks ${chalk.bold(functionName)}`,
|
|
2293
|
+
fail: functionName =>
|
|
2294
|
+
`Failed to delete serverless function webhooks ${chalk.bold(functionName)}.`,
|
|
2295
|
+
succeed: functionName =>
|
|
2296
|
+
`Successfully deleted serverless function webhooks ${chalk.bold(functionName)}.`,
|
|
2297
|
+
},
|
|
2298
|
+
success: {
|
|
2299
|
+
configFileUpdated: (functionName, authType) =>
|
|
2300
|
+
`Serverless function webhooks "${functionName}" updated using "${authType}"`,
|
|
2301
|
+
},
|
|
2302
|
+
failure: {
|
|
2303
|
+
invalidUser: (functionName, parentAccountName) =>
|
|
2304
|
+
`Couldn't delete ${chalk.bold(functionName)} because your account has been removed from ${chalk.bold(parentAccountName)} or your permission set doesn't allow you to delete serverless function webhooks. To update your permissions, contact a super admin in ${chalk.bold(parentAccountName)}.`,
|
|
2305
|
+
scopes: {
|
|
2306
|
+
message:
|
|
2307
|
+
"The personal access key you provided doesn't include serverless function webhook permissions.",
|
|
2308
|
+
instructions: (functionName, url) =>
|
|
2309
|
+
`To update CLI permissions for "${functionName}": \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes serverless function webhook permissions. \n- Update the CLI config for this account by running ${chalk.bold('hs auth')} and entering the new key.\n`,
|
|
2310
|
+
},
|
|
2311
|
+
},
|
|
2312
|
+
},
|
|
2313
|
+
list: {
|
|
2314
|
+
loading: {
|
|
2315
|
+
add: () => `Listing serverless function webhooks`,
|
|
2316
|
+
fail: () => `Failed to list serverless function webhooks.`,
|
|
2317
|
+
succeed: () => `Successfully listed serverless function webhooks.`,
|
|
2318
|
+
},
|
|
2319
|
+
success: {
|
|
2320
|
+
configFileUpdated: authType =>
|
|
2321
|
+
`Serverless function webhooks updated using "${authType}"`,
|
|
2322
|
+
},
|
|
2323
|
+
failure: {
|
|
2324
|
+
invalidUser: parentAccountName =>
|
|
2325
|
+
`Couldn't list serverless function webhooks because your account has been removed from ${chalk.bold(parentAccountName)} or your permission set doesn't allow you to list serverless function webhooks. To update your permissions, contact a super admin in ${chalk.bold(parentAccountName)}.`,
|
|
2326
|
+
scopes: {
|
|
2327
|
+
message:
|
|
2328
|
+
"The personal access key you provided doesn't include serverless function webhook permissions.",
|
|
2329
|
+
instructions: url =>
|
|
2330
|
+
`To update CLI permissions: \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes serverless function webhook permissions. \n- Update the CLI config for this account by running ${chalk.bold('hs auth')} and entering the new key.\n`,
|
|
2331
|
+
},
|
|
2332
|
+
},
|
|
2333
|
+
},
|
|
2334
|
+
},
|
|
2335
|
+
serverlessFunctionWebhookSubscriptions: {
|
|
2336
|
+
add: {
|
|
2337
|
+
loading: {
|
|
2338
|
+
add: functionName =>
|
|
2339
|
+
`Adding serverless function webhook subscriptions ${chalk.bold(functionName)}`,
|
|
2340
|
+
fail: functionName =>
|
|
2341
|
+
`Failed to add serverless function webhook subscriptions ${chalk.bold(functionName)}.`,
|
|
2342
|
+
succeed: functionName =>
|
|
2343
|
+
`Successfully added serverless function webhook subscriptions ${chalk.bold(functionName)}.`,
|
|
2344
|
+
},
|
|
2345
|
+
success: {
|
|
2346
|
+
configFileUpdated: (functionName, authType) =>
|
|
2347
|
+
`Serverless function webhook subscriptions "${functionName}" updated using "${authType}"`,
|
|
2348
|
+
},
|
|
2349
|
+
failure: {
|
|
2350
|
+
invalidUser: (functionName, parentAccountName) =>
|
|
2351
|
+
`Couldn't add ${chalk.bold(functionName)} because your account has been removed from ${chalk.bold(parentAccountName)} or your permission set doesn't allow you to add serverless function webhook subscriptions. To update your permissions, contact a super admin in ${chalk.bold(parentAccountName)}.`,
|
|
2352
|
+
scopes: {
|
|
2353
|
+
message:
|
|
2354
|
+
"The personal access key you provided doesn't include serverless function webhook subscription permissions.",
|
|
2355
|
+
instructions: (functionName, url) =>
|
|
2356
|
+
`To update CLI permissions for "${functionName}": \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes serverless function webhook subscription permissions. \n- Update the CLI config for this account by running ${chalk.bold('hs auth')} and entering the new key.\n`,
|
|
2357
|
+
},
|
|
2358
|
+
},
|
|
2359
|
+
},
|
|
2360
|
+
delete: {
|
|
2361
|
+
loading: {
|
|
2362
|
+
add: functionName =>
|
|
2363
|
+
`Deleting serverless function webhook subscriptions ${chalk.bold(functionName)}`,
|
|
2364
|
+
fail: functionName =>
|
|
2365
|
+
`Failed to delete serverless function webhook subscriptions ${chalk.bold(functionName)}.`,
|
|
2366
|
+
succeed: functionName =>
|
|
2367
|
+
`Successfully deleted serverless function webhook subscriptions ${chalk.bold(functionName)}.`,
|
|
2368
|
+
},
|
|
2369
|
+
success: {
|
|
2370
|
+
configFileUpdated: (functionName, authType) =>
|
|
2371
|
+
`Serverless function webhook subscriptions "${functionName}" updated using "${authType}"`,
|
|
2372
|
+
},
|
|
2373
|
+
failure: {
|
|
2374
|
+
invalidUser: (functionName, parentAccountName) =>
|
|
2375
|
+
`Couldn't delete ${chalk.bold(functionName)} because your account has been removed from ${chalk.bold(parentAccountName)} or your permission set doesn't allow you to delete serverless function webhook subscriptions. To update your permissions, contact a super admin in ${chalk.bold(parentAccountName)}.`,
|
|
2376
|
+
scopes: {
|
|
2377
|
+
message:
|
|
2378
|
+
"The personal access key you provided doesn't include serverless function webhook subscription permissions.",
|
|
2379
|
+
instructions: (functionName, url) =>
|
|
2380
|
+
`To update CLI permissions for "${functionName}": \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes serverless function webhook subscription permissions. \n- Update the CLI config for this account by running ${chalk.bold('hs auth')} and entering the new key.\n`,
|
|
2381
|
+
},
|
|
2382
|
+
},
|
|
2383
|
+
},
|
|
2384
|
+
list: {
|
|
2385
|
+
loading: {
|
|
2386
|
+
add: () => `Listing serverless function webhook subscriptions`,
|
|
2387
|
+
fail: () => `Failed to list serverless function webhook subscriptions.`,
|
|
2388
|
+
succeed: () =>
|
|
2389
|
+
`Successfully listed serverless function webhook subscriptions.`,
|
|
2390
|
+
},
|
|
2391
|
+
success: {
|
|
2392
|
+
configFileUpdated: authType =>
|
|
2393
|
+
`Serverless function webhook subscriptions updated using "${authType}"`,
|
|
2394
|
+
},
|
|
2395
|
+
failure: {
|
|
2396
|
+
invalidUser: parentAccountName =>
|
|
2397
|
+
`Couldn't list serverless function webhook subscriptions because your account has been removed from ${chalk.bold(parentAccountName)} or your permission set doesn't allow you to list serverless function webhook subscriptions. To update your permissions, contact a super admin in ${chalk.bold(parentAccountName)}.`,
|
|
2398
|
+
scopes: {
|
|
2399
|
+
message:
|
|
2400
|
+
"The personal access key you provided doesn't include serverless function webhook subscription permissions.",
|
|
2401
|
+
instructions: url =>
|
|
2402
|
+
`To update CLI permissions: \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes serverless function webhook subscription permissions. \n- Update the CLI config for this account by running ${chalk.bold('hs auth')} and entering the new key.\n`,
|
|
2403
|
+
},
|
|
2404
|
+
},
|
|
2405
|
+
},
|
|
2406
|
+
},
|
|
2407
|
+
serverlessFunctionWebhookSubscriptionEvents: {
|
|
2408
|
+
add: {
|
|
2409
|
+
loading: {
|
|
2410
|
+
add: functionName =>
|
|
2411
|
+
`Adding serverless function webhook subscription events ${chalk.bold(functionName)}`,
|
|
2412
|
+
fail: functionName =>
|
|
2413
|
+
`Failed to add serverless function webhook subscription events ${chalk.bold(functionName)}.`,
|
|
2414
|
+
succeed: functionName =>
|
|
2415
|
+
`Successfully added serverless function webhook subscription events ${chalk.bold(functionName)}.`,
|
|
2416
|
+
},
|
|
2417
|
+
success: {
|
|
2418
|
+
configFileUpdated: (functionName, authType) =>
|
|
2419
|
+
`Serverless function webhook subscription events "${functionName}" updated using "${authType}"`,
|
|
2420
|
+
},
|
|
2421
|
+
failure: {
|
|
2422
|
+
invalidUser: (functionName, parentAccountName) =>
|
|
2423
|
+
`Couldn't add ${chalk.bold(functionName)} because your account has been removed from ${chalk.bold(parentAccountName)} or your permission set doesn't allow you to add serverless function webhook subscription events. To update your permissions, contact a super admin in ${chalk.bold(parentAccountName)}.`,
|
|
2424
|
+
scopes: {
|
|
2425
|
+
message:
|
|
2426
|
+
"The personal access key you provided doesn't include serverless function webhook subscription event permissions.",
|
|
2427
|
+
instructions: (functionName, url) =>
|
|
2428
|
+
`To update CLI permissions for "${functionName}": \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes serverless function webhook subscription event permissions. \n- Update the CLI config for this account by running ${chalk.bold('hs auth')} and entering the new key.\n`,
|
|
2429
|
+
},
|
|
2430
|
+
},
|
|
2431
|
+
},
|
|
2432
|
+
delete: {
|
|
2433
|
+
loading: {
|
|
2434
|
+
add: functionName =>
|
|
2435
|
+
`Deleting serverless function webhook subscription events ${chalk.bold(functionName)}`,
|
|
2436
|
+
fail: functionName =>
|
|
2437
|
+
`Failed to delete serverless function webhook subscription events ${chalk.bold(functionName)}.`,
|
|
2438
|
+
succeed: functionName =>
|
|
2439
|
+
`Successfully deleted serverless function webhook subscription events ${chalk.bold(functionName)}.`,
|
|
2440
|
+
},
|
|
2441
|
+
success: {
|
|
2442
|
+
configFileUpdated: (functionName, authType) =>
|
|
2443
|
+
`Serverless function webhook subscription events "${functionName}" updated using "${authType}"`,
|
|
2444
|
+
},
|
|
2445
|
+
failure: {
|
|
2446
|
+
invalidUser: (functionName, parentAccountName) =>
|
|
2447
|
+
`Couldn't delete ${chalk.bold(functionName)} because your account has been removed from ${chalk.bold(parentAccountName)} or your permission set doesn't allow you to delete serverless function webhook subscription events. To update your permissions, contact a super admin in ${chalk.bold(parentAccountName)}.`,
|
|
2448
|
+
scopes: {
|
|
2449
|
+
message:
|
|
2450
|
+
"The personal access key you provided doesn't include serverless function webhook subscription event permissions.",
|
|
2451
|
+
instructions: (functionName, url) =>
|
|
2452
|
+
`To update CLI permissions for "${functionName}": \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes serverless function webhook subscription event permissions. \n- Update the CLI config for this account by running ${chalk.bold('hs auth')} and entering the new key.\n`,
|
|
2453
|
+
},
|
|
2454
|
+
},
|
|
2455
|
+
},
|
|
2456
|
+
list: {
|
|
2457
|
+
loading: {
|
|
2458
|
+
add: () => `Listing serverless function webhook subscription events`,
|
|
2459
|
+
fail: () =>
|
|
2460
|
+
`Failed to list serverless function webhook subscription events.`,
|
|
2461
|
+
succeed: () =>
|
|
2462
|
+
`Successfully listed serverless function webhook subscription events.`,
|
|
2463
|
+
},
|
|
2464
|
+
success: {
|
|
2465
|
+
configFileUpdated: authType =>
|
|
2466
|
+
`Serverless function webhook subscription events updated using "${authType}"`,
|
|
2467
|
+
},
|
|
2468
|
+
failure: {
|
|
2469
|
+
invalidUser: parentAccountName =>
|
|
2470
|
+
`Couldn't list serverless function webhook subscription events because your account has been removed from ${chalk.bold(parentAccountName)} or your permission set doesn't allow you to list serverless function webhook subscription events. To update your permissions, contact a super admin in ${chalk.bold(parentAccountName)}.`,
|
|
2471
|
+
scopes: {
|
|
2472
|
+
message:
|
|
2473
|
+
"The personal access key you provided doesn't include serverless function webhook subscription event permissions.",
|
|
2474
|
+
instructions: url =>
|
|
2475
|
+
`To update CLI permissions: \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes serverless function webhook subscription event permissions. \n- Update the CLI config for this account by running ${chalk.bold('hs auth')} and entering the new key.\n`,
|
|
2476
|
+
},
|
|
2477
|
+
},
|
|
2478
|
+
},
|
|
2479
|
+
},
|
|
2480
|
+
serverlessFunctionWebhookSubscriptionEventTypes: {
|
|
2481
|
+
add: {
|
|
2482
|
+
loading: {
|
|
2483
|
+
add: functionName =>
|
|
2484
|
+
`Adding serverless function webhook subscription event types ${chalk.bold(functionName)}`,
|
|
2485
|
+
fail: functionName =>
|
|
2486
|
+
`Failed to add serverless function webhook subscription event types ${chalk.bold(functionName)}.`,
|
|
2487
|
+
succeed: functionName =>
|
|
2488
|
+
`Successfully added serverless function webhook subscription event types ${chalk.bold(functionName)}.`,
|
|
2489
|
+
},
|
|
2490
|
+
success: {
|
|
2491
|
+
configFileUpdated: (functionName, authType) =>
|
|
2492
|
+
`Serverless function webhook subscription event types "${functionName}" updated using "${authType}"`,
|
|
2493
|
+
},
|
|
2494
|
+
failure: {
|
|
2495
|
+
invalidUser: (functionName, parentAccountName) =>
|
|
2496
|
+
`Couldn't add ${chalk.bold(functionName)} because your account has been removed from ${chalk.bold(parentAccountName)} or your permission set doesn't allow you to add serverless function webhook subscription event types. To update your permissions, contact a super admin in ${chalk.bold(parentAccountName)}.`,
|
|
2497
|
+
scopes: {
|
|
2498
|
+
message:
|
|
2499
|
+
"The personal access key you provided doesn't include serverless function webhook subscription event type permissions.",
|
|
2500
|
+
instructions: (functionName, url) =>
|
|
2501
|
+
`To update CLI permissions for "${functionName}": \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes serverless function webhook subscription event type permissions. \n- Update the CLI config for this account by running ${chalk.bold('hs auth')} and entering the new key.\n`,
|
|
2502
|
+
},
|
|
2503
|
+
},
|
|
2504
|
+
},
|
|
2505
|
+
delete: {
|
|
2506
|
+
loading: {
|
|
2507
|
+
add: functionName =>
|
|
2508
|
+
`Deleting serverless function webhook subscription event types ${chalk.bold(functionName)}`,
|
|
2509
|
+
fail: functionName =>
|
|
2510
|
+
`Failed to delete serverless function webhook subscription event types ${chalk.bold(functionName)}.`,
|
|
2511
|
+
succeed: functionName =>
|
|
2512
|
+
`Successfully deleted serverless function webhook subscription event types ${chalk.bold(functionName)}.`,
|
|
2513
|
+
},
|
|
2514
|
+
success: {
|
|
2515
|
+
configFileUpdated: (functionName, authType) =>
|
|
2516
|
+
`Serverless function webhook subscription event types "${functionName}" updated using "${authType}"`,
|
|
2517
|
+
},
|
|
2518
|
+
failure: {
|
|
2519
|
+
invalidUser: (functionName, parentAccountName) =>
|
|
2520
|
+
`Couldn't delete ${chalk.bold(functionName)} because your account has been removed from ${chalk.bold(parentAccountName)} or your permission set doesn't allow you to delete serverless function webhook subscription event types. To update your permissions, contact a super admin in ${chalk.bold(parentAccountName)}.`,
|
|
2521
|
+
scopes: {
|
|
2522
|
+
message:
|
|
2523
|
+
"The personal access key you provided doesn't include serverless function webhook subscription event type permissions.",
|
|
2524
|
+
instructions: (functionName, url) =>
|
|
2525
|
+
`To update CLI permissions for "${functionName}": \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes serverless function webhook subscription event type permissions. \n- Update the CLI config for this account by running ${chalk.bold('hs auth')} and entering the new key.\n`,
|
|
2526
|
+
},
|
|
2527
|
+
},
|
|
2528
|
+
},
|
|
2529
|
+
list: {
|
|
2530
|
+
loading: {
|
|
2531
|
+
add: () =>
|
|
2532
|
+
`Listing serverless function webhook subscription event types`,
|
|
2533
|
+
fail: () =>
|
|
2534
|
+
`Failed to list serverless function webhook subscription event types.`,
|
|
2535
|
+
succeed: () =>
|
|
2536
|
+
`Successfully listed serverless function webhook subscription event types.`,
|
|
2537
|
+
},
|
|
2538
|
+
success: {
|
|
2539
|
+
configFileUpdated: authType =>
|
|
2540
|
+
`Serverless function webhook subscription event types updated using "${authType}"`,
|
|
2541
|
+
},
|
|
2542
|
+
failure: {
|
|
2543
|
+
invalidUser: parentAccountName =>
|
|
2544
|
+
`Couldn't list serverless function webhook subscription event types because your account has been removed from ${chalk.bold(parentAccountName)} or your permission set doesn't allow you to list serverless function webhook subscription event types. To update your permissions, contact a super admin in ${chalk.bold(parentAccountName)}.`,
|
|
2545
|
+
scopes: {
|
|
2546
|
+
message:
|
|
2547
|
+
"The personal access key you provided doesn't include serverless function webhook subscription event type permissions.",
|
|
2548
|
+
instructions: url =>
|
|
2549
|
+
`To update CLI permissions: \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes serverless function webhook subscription event type permissions. \n- Update the CLI config for this account by running ${chalk.bold('hs auth')} and entering the new key.\n`,
|
|
2550
|
+
},
|
|
2551
|
+
},
|
|
2552
|
+
},
|
|
2553
|
+
},
|
|
2554
|
+
serverlessFunctionWebhookSubscriptionEventTypeOptions: {
|
|
2555
|
+
add: {
|
|
2556
|
+
loading: {
|
|
2557
|
+
add: functionName =>
|
|
2558
|
+
`Adding serverless function webhook subscription event type options ${chalk.bold(functionName)}`,
|
|
2559
|
+
fail: functionName =>
|
|
2560
|
+
`Failed to add serverless function webhook subscription event type options ${chalk.bold(functionName)}.`,
|
|
2561
|
+
succeed: functionName =>
|
|
2562
|
+
`Successfully added serverless function webhook subscription event type options ${chalk.bold(functionName)}.`,
|
|
2563
|
+
},
|
|
2564
|
+
success: {
|
|
2565
|
+
configFileUpdated: (functionName, authType) =>
|
|
2566
|
+
`Serverless function webhook subscription event type options "${functionName}" updated using "${authType}"`,
|
|
2567
|
+
},
|
|
2568
|
+
failure: {
|
|
2569
|
+
invalidUser: (functionName, parentAccountName) =>
|
|
2570
|
+
`Couldn't add ${chalk.bold(functionName)} because your account has been removed from ${chalk.bold(parentAccountName)} or your permission set doesn't allow you to add serverless function webhook subscription event type options. To update your permissions, contact a super admin in ${chalk.bold(parentAccountName)}.`,
|
|
2571
|
+
scopes: {
|
|
2572
|
+
message:
|
|
2573
|
+
"The personal access key you provided doesn't include serverless function webhook subscription event type option permissions.",
|
|
2574
|
+
instructions: (functionName, url) =>
|
|
2575
|
+
`To update CLI permissions for "${functionName}": \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes serverless function webhook subscription event type option permissions. \n- Update the CLI config for this account by running ${chalk.bold('hs auth')} and entering the new key.\n`,
|
|
2576
|
+
},
|
|
2577
|
+
},
|
|
2578
|
+
},
|
|
2579
|
+
delete: {
|
|
2580
|
+
loading: {
|
|
2581
|
+
add: functionName =>
|
|
2582
|
+
`Deleting serverless function webhook subscription event type options ${chalk.bold(functionName)}`,
|
|
2583
|
+
fail: functionName =>
|
|
2584
|
+
`Failed to delete serverless function webhook subscription event type options ${chalk.bold(functionName)}.`,
|
|
2585
|
+
succeed: functionName =>
|
|
2586
|
+
`Successfully deleted serverless function webhook subscription event type options ${chalk.bold(functionName)}.`,
|
|
2587
|
+
},
|
|
2588
|
+
success: {
|
|
2589
|
+
configFileUpdated: (functionName, authType) =>
|
|
2590
|
+
`Serverless function webhook subscription event type options "${functionName}" updated using "${authType}"`,
|
|
2591
|
+
},
|
|
2592
|
+
failure: {
|
|
2593
|
+
invalidUser: (functionName, parentAccountName) =>
|
|
2594
|
+
`Couldn't delete ${chalk.bold(functionName)} because your account has been removed from ${chalk.bold(parentAccountName)} or your permission set doesn't allow you to delete serverless function webhook subscription event type options. To update your permissions, contact a super admin in ${chalk.bold(parentAccountName)}.`,
|
|
2595
|
+
scopes: {
|
|
2596
|
+
message:
|
|
2597
|
+
"The personal access key you provided doesn't include serverless function webhook subscription event type option permissions.",
|
|
2598
|
+
instructions: (functionName, url) =>
|
|
2599
|
+
`To update CLI permissions for "${functionName}": \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes serverless function webhook subscription event type option permissions. \n- Update the CLI config for this account by running ${chalk.bold('hs auth')} and entering the new key.\n`,
|
|
2600
|
+
},
|
|
2601
|
+
},
|
|
2602
|
+
},
|
|
2603
|
+
list: {
|
|
2604
|
+
loading: {
|
|
2605
|
+
add: () =>
|
|
2606
|
+
`Listing serverless function webhook subscription event type options`,
|
|
2607
|
+
fail: () =>
|
|
2608
|
+
`Failed to list serverless function webhook subscription event type options.`,
|
|
2609
|
+
succeed: () =>
|
|
2610
|
+
`Successfully listed serverless function webhook subscription event type options.`,
|
|
2611
|
+
},
|
|
2612
|
+
success: {
|
|
2613
|
+
configFileUpdated: authType =>
|
|
2614
|
+
`Serverless function webhook subscription event type options updated using "${authType}"`,
|
|
2615
|
+
},
|
|
2616
|
+
failure: {
|
|
2617
|
+
invalidUser: parentAccountName =>
|
|
2618
|
+
`Couldn't list serverless function webhook subscription event type options because your account has been removed from ${chalk.bold(parentAccountName)} or your permission set doesn't allow you to list serverless function webhook subscription event type options. To update your permissions, contact a super admin in ${chalk.bold(parentAccountName)}.`,
|
|
2619
|
+
scopes: {
|
|
2620
|
+
message:
|
|
2621
|
+
"The personal access key you provided doesn't include serverless function webhook subscription event type option permissions.",
|
|
2622
|
+
instructions: url =>
|
|
2623
|
+
`To update CLI permissions: \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes serverless function webhook subscription event type option permissions. \n- Update the CLI config for this account by running ${chalk.bold('hs auth')} and entering the new key.\n`,
|
|
2624
|
+
},
|
|
2625
|
+
},
|
|
2626
|
+
},
|
|
2627
|
+
},
|
|
2628
|
+
};
|
|
2629
|
+
export const lib = {
|
|
2630
|
+
process: {
|
|
2631
|
+
exitDebug: signal =>
|
|
2632
|
+
`Attempting to gracefully exit. Triggered by ${signal}`,
|
|
2633
|
+
},
|
|
2634
|
+
DevServerManager: {
|
|
2635
|
+
portConflict: port => `The port ${port} is already in use.`,
|
|
2636
|
+
notInitialized:
|
|
2637
|
+
'The Dev Server Manager must be initialized before it is started.',
|
|
2638
|
+
noCompatibleComponents: serverKey =>
|
|
2639
|
+
`Skipping call to ${serverKey} because there are no compatible components in the project.`,
|
|
2640
|
+
},
|
|
2641
|
+
LocalDevManager: {
|
|
2642
|
+
failedToInitialize: 'Missing required arguments to initialize Local Dev',
|
|
2643
|
+
noDeployedBuild: (projectName, accountIdentifier, uploadCommand) =>
|
|
2644
|
+
`Your project ${chalk.bold(projectName)} exists in ${accountIdentifier}, but has no deployed build. Projects must be successfully deployed to be developed locally. Address any build and deploy errors your project may have, then run ${uploadCommand} to upload and deploy your project.`,
|
|
2645
|
+
noComponents: 'There are no components in this project.',
|
|
2646
|
+
betaMessage: 'HubSpot projects local development',
|
|
2647
|
+
learnMoreLocalDevServer: 'Learn more about the projects local dev server',
|
|
2648
|
+
running: (projectName, accountIdentifier) =>
|
|
2649
|
+
`Running ${chalk.bold(projectName)} locally on ${accountIdentifier}, waiting for changes ...`,
|
|
2650
|
+
quitHelper: `Press ${chalk.bold('q')} to stop the local dev server`,
|
|
2651
|
+
viewProjectLink: 'View project in HubSpot',
|
|
2652
|
+
viewTestAccountLink: 'View developer test account in HubSpot',
|
|
2653
|
+
exitingStart: 'Stopping local dev server ...',
|
|
2654
|
+
exitingSucceed: 'Successfully exited',
|
|
2655
|
+
exitingFail: 'Failed to cleanup before exiting',
|
|
2656
|
+
missingUid: devCommand =>
|
|
2657
|
+
`Could not find a uid for the selected app. Confirm that the app config file contains the uid field and re-run ${devCommand}.`,
|
|
2658
|
+
uploadWarning: {
|
|
2659
|
+
appLabel: '[App]',
|
|
2660
|
+
uiExtensionLabel: '[UI Extension]',
|
|
2661
|
+
missingComponents: missingComponents =>
|
|
2662
|
+
`Couldn't find the following components in the deployed build for this project: ${chalk.bold(missingComponents)}. This may cause issues in local development.`,
|
|
2663
|
+
defaultWarning: chalk.bold(
|
|
2664
|
+
'Changing project configuration requires a new project build.'
|
|
2665
|
+
),
|
|
2666
|
+
defaultPublicAppWarning: (installCount, installText) =>
|
|
2667
|
+
`${chalk.bold('Changing project configuration requires a new project build.')}\n\nThis will affect your public app's ${chalk.bold(`${installCount} existing ${installText}`)}. If your app has users in production, we strongly recommend creating a copy of this app to test your changes before proceding.`,
|
|
2668
|
+
header: warning =>
|
|
2669
|
+
`${warning} To reflect these changes and continue testing:`,
|
|
2670
|
+
stopDev: command => ` * Stop ${command}`,
|
|
2671
|
+
runUpload: command => ` * Run ${command}`,
|
|
2672
|
+
restartDev: command => ` * Re-run ${command}`,
|
|
2673
|
+
pushToGithub: ' * Commit and push your changes to GitHub',
|
|
2674
|
+
},
|
|
2675
|
+
activeInstallWarning: {
|
|
2676
|
+
installCount: (appName, installCount, installText) =>
|
|
2677
|
+
`${chalk.bold(`The app ${appName} has ${installCount} production ${installText}`)}`,
|
|
2678
|
+
explanation:
|
|
2679
|
+
'Some changes made during local development may need to be synced to HubSpot, which will impact those existing installs. We strongly recommend creating a copy of this app to use instead.',
|
|
2680
|
+
confirmation: `You will always be asked to confirm any permanent changes to your app's configuration before uploading them.`,
|
|
2681
|
+
confirmationPrompt: `Proceed with local development of this ${chalk.bold('production')} app?`,
|
|
2682
|
+
},
|
|
2683
|
+
devServer: {
|
|
2684
|
+
cleanupError: message => `Failed to cleanup local dev server: ${message}`,
|
|
2685
|
+
setupError: message => `Failed to setup local dev server: ${message}`,
|
|
2686
|
+
startError: message => `Failed to start local dev server: ${message}`,
|
|
2687
|
+
fileChangeError: message =>
|
|
2688
|
+
`Failed to notify local dev server of file change: ${message}`,
|
|
2689
|
+
},
|
|
2690
|
+
},
|
|
2691
|
+
localDev: {
|
|
2692
|
+
confirmDefaultAccountIsTarget: {
|
|
2693
|
+
configError: authCommand =>
|
|
2694
|
+
`An error occurred while reading the default account from your config. Run ${authCommand} to re-auth this account`,
|
|
2695
|
+
declineDefaultAccountExplanation: (useCommand, devCommand) =>
|
|
2696
|
+
`To develop on a different account, run ${useCommand} to change your default account, then re-run ${devCommand}.`,
|
|
2697
|
+
},
|
|
2698
|
+
checkIfDefaultAccountIsSupported: {
|
|
2699
|
+
publicApp: (useCommand, authCommand) =>
|
|
2700
|
+
`This project contains a public app. Local development of public apps is only supported on developer accounts and developer test accounts. Change your default account using ${useCommand}, or link a new account with ${authCommand}.`,
|
|
2701
|
+
privateApp: (useCommand, authCommand) =>
|
|
2702
|
+
`This project contains a private app. Local development of private apps is not supported in developer accounts. Change your default account using ${useCommand}, or link a new account with ${authCommand}.`,
|
|
2703
|
+
},
|
|
2704
|
+
validateAccountOption: {
|
|
2705
|
+
invalidPublicAppAccount: (useCommand, devCommand) =>
|
|
2706
|
+
`This project contains a public app. The "--account" flag must point to a developer test account to develop this project locally. Alternatively, change your default account to an App Developer Account using ${useCommand} and run ${devCommand} to set up a new Developer Test Account.`,
|
|
2707
|
+
invalidPrivateAppAccount: useCommand =>
|
|
2708
|
+
`This project contains a private app. The account specified with the "--account" flag points to a developer account, which do not support the local development of private apps. Update the "--account" flag to point to a standard, sandbox, or developer test account, or change your default account by running ${useCommand}.`,
|
|
2709
|
+
nonSandboxWarning: command =>
|
|
2710
|
+
`Testing in a sandbox is strongly recommended. To switch the target account, select an option below or run ${chalk.bold(command)} before running the command again.`,
|
|
2711
|
+
publicAppNonDeveloperTestAccountWarning: () =>
|
|
2712
|
+
`Local development of public apps is only supported in ${chalk.bold('developer test accounts')}.`,
|
|
2713
|
+
},
|
|
2714
|
+
createNewProjectForLocalDev: {
|
|
2715
|
+
projectMustExistExplanation: (projectName, accountIdentifier) =>
|
|
2716
|
+
`The project ${projectName} does not exist in the target account ${accountIdentifier}. This command requires the project to exist in the target account.`,
|
|
2717
|
+
publicAppProjectMustExistExplanation: (projectName, accountIdentifier) =>
|
|
2718
|
+
`The project ${projectName} does not exist in ${accountIdentifier}, the app developer account associated with your target account. This command requires the project to exist in this app developer account.`,
|
|
2719
|
+
createProject: (projectName, accountIdentifier) =>
|
|
2720
|
+
`Create new project ${projectName} in ${accountIdentifier}?`,
|
|
2721
|
+
choseNotToCreateProject:
|
|
2722
|
+
'Exiting because this command requires the project to exist in the target account.',
|
|
2723
|
+
creatingProject: (projectName, accountIdentifier) =>
|
|
2724
|
+
`Creating project ${projectName} in ${accountIdentifier}`,
|
|
2725
|
+
createdProject: (projectName, accountIdentifier) =>
|
|
2726
|
+
`Created project ${projectName} in ${accountIdentifier}`,
|
|
2727
|
+
failedToCreateProject: 'Failed to create project in the target account.',
|
|
2728
|
+
},
|
|
2729
|
+
createInitialBuildForNewProject: {
|
|
2730
|
+
initialUploadMessage: 'HubSpot Local Dev Server Startup',
|
|
2731
|
+
projectLockedError:
|
|
2732
|
+
'Your project is locked. This may mean that another user is running the `hs project watch` command for this project. If this is you, unlock the project in Projects UI.',
|
|
2733
|
+
genericError: uploadCommand =>
|
|
2734
|
+
`An error occurred while creating the initial build for this project. Run ${uploadCommand} to try again.`,
|
|
2735
|
+
},
|
|
2736
|
+
checkIfParentAccountIsAuthed: {
|
|
2737
|
+
notAuthedError: (authCommand, accountId, accountIdentifier) =>
|
|
2738
|
+
`To develop this project locally, run ${authCommand} to authenticate the App Developer Account ${accountId} associated with ${accountIdentifier}.`,
|
|
2739
|
+
},
|
|
2740
|
+
},
|
|
2741
|
+
projects: {
|
|
2742
|
+
create: {
|
|
2743
|
+
errors: {
|
|
2744
|
+
noProjectsInConfig:
|
|
2745
|
+
'Unable to find any projects in the target repository\'s config.json file. Please ensure that there is a "projects" array in the config file.',
|
|
2746
|
+
missingConfigFileTemplateSource:
|
|
2747
|
+
'Failed to fetch the config.json file from the target repository. Please ensure that there is a valid config.json file at the root of the repository and try again.',
|
|
2748
|
+
missingPropertiesInConfig:
|
|
2749
|
+
'Found misconfigured projects in the target repository\'s config.json file. Please ensure that each project in the target repository\'s config.json file contains the following properties: ["name", "label", "path", "insertPath"].',
|
|
2750
|
+
},
|
|
2751
|
+
},
|
|
2752
|
+
validateProjectConfig: {
|
|
2753
|
+
configNotFound: createCommand =>
|
|
2754
|
+
`Unable to locate a project configuration file. Try running again from a project directory, or run ${createCommand} to create a new project.`,
|
|
2755
|
+
configMissingFields:
|
|
2756
|
+
'The project configuruation file is missing required fields.',
|
|
2757
|
+
srcDirNotFound: (srcDir, projectDir) =>
|
|
2758
|
+
`Project source directory ${chalk.bold(srcDir)} could not be found in ${chalk.bold(projectDir)}.`,
|
|
2759
|
+
srcOutsideProjectDir: (projectConfig, srcDir) =>
|
|
2760
|
+
`Invalid value for 'srcDir' in ${projectConfig}: ${chalk.bold(`srcDir: "${srcDir}"`)}\n\t'srcDir' must be a relative path to a folder under the project root, such as "." or "./src"`,
|
|
2761
|
+
},
|
|
2762
|
+
ensureProjectExists: {
|
|
2763
|
+
createPrompt: (projectName, accountIdentifier) =>
|
|
2764
|
+
`The project ${projectName} does not exist in ${accountIdentifier}. Would you like to create it?`,
|
|
2765
|
+
createPromptUpload: (projectName, accountIdentifier) =>
|
|
2766
|
+
`[--forceCreate] The project ${projectName} does not exist in ${accountIdentifier}. Would you like to create it?`,
|
|
2767
|
+
createSuccess: (projectName, accountIdentifier) =>
|
|
2768
|
+
`New project ${chalk.bold(projectName)} successfully created in ${chalk.bold(accountIdentifier)}.`,
|
|
2769
|
+
notFound: (projectName, accountIdentifier) =>
|
|
2770
|
+
`Your project ${chalk.bold(projectName)} could not be found in ${chalk.bold(accountIdentifier)}.`,
|
|
2771
|
+
},
|
|
2772
|
+
pollFetchProject: {
|
|
2773
|
+
checkingProject: accountIdentifier =>
|
|
2774
|
+
`Checking if project exists in ${accountIdentifier}`,
|
|
2775
|
+
},
|
|
2776
|
+
logFeedbackMessage: {
|
|
2777
|
+
feedbackHeader: "We'd love to hear your feedback!",
|
|
2778
|
+
feedbackMessage: command =>
|
|
2779
|
+
`How are you liking the new projects and developer tools? \n > Run \`${chalk.yellow(command)}\` to let us know what you think!\n`,
|
|
2780
|
+
},
|
|
2781
|
+
},
|
|
2782
|
+
projectBuildAndDeploy: {
|
|
2783
|
+
makePollTaskStatusFunc: {
|
|
2784
|
+
componentCountSingular: 'Found 1 component in this project',
|
|
2785
|
+
componentCount: numComponents =>
|
|
2786
|
+
`Found ${numComponents} components in this project`,
|
|
2787
|
+
successStatusText: 'DONE',
|
|
2788
|
+
failedStatusText: 'FAILED',
|
|
2789
|
+
errorFetchingTaskStatus: taskType => `Error fetching ${taskType} status`,
|
|
2790
|
+
},
|
|
2791
|
+
pollBuildAutodeployStatusError: buildId =>
|
|
2792
|
+
`Error fetching autodeploy status for build #${buildId}`,
|
|
2793
|
+
pollProjectBuildAndDeploy: {
|
|
2794
|
+
buildSucceededAutomaticallyDeploying: (buildId, accountIdentifier) =>
|
|
2795
|
+
`Build #${buildId} succeeded. ${chalk.bold('Automatically deploying')} to ${accountIdentifier}\n`,
|
|
2796
|
+
cleanedUpTempFile: path => `Cleaned up temporary file ${path}`,
|
|
2797
|
+
viewDeploys: 'View all deploys for this project in HubSpot',
|
|
2798
|
+
unableToFindAutodeployStatus: (buildId, viewDeploysLink) =>
|
|
2799
|
+
`Unable to find the auto deploy for build #${buildId}. This deploy may have been skipped. ${viewDeploysLink}.`,
|
|
2800
|
+
},
|
|
2801
|
+
},
|
|
2802
|
+
projectUpload: {
|
|
2803
|
+
uploadProjectFiles: {
|
|
2804
|
+
add: (projectName, accountIdentifier) =>
|
|
2805
|
+
`Uploading ${chalk.bold(projectName)} project files to ${accountIdentifier}`,
|
|
2806
|
+
fail: (projectName, accountIdentifier) =>
|
|
2807
|
+
`Failed to upload ${chalk.bold(projectName)} project files to ${accountIdentifier}`,
|
|
2808
|
+
succeed: (projectName, accountIdentifier) =>
|
|
2809
|
+
`Uploaded ${chalk.bold(projectName)} project files to ${accountIdentifier}`,
|
|
2810
|
+
buildCreated: (projectName, buildId) =>
|
|
2811
|
+
`Project "${projectName}" uploaded and build #${buildId} created`,
|
|
2812
|
+
},
|
|
2813
|
+
handleProjectUpload: {
|
|
2814
|
+
emptySource: (srcDir, command) =>
|
|
2815
|
+
`Source directory "${srcDir}" is empty. Add files to your project and rerun ${chalk.yellow(command)} to upload them to HubSpot.`,
|
|
2816
|
+
compressed: byteCount => `Project files compressed: ${byteCount} bytes`,
|
|
2817
|
+
compressing: path => `Compressing build files to "${path}"`,
|
|
2818
|
+
fileFiltered: filename => `Ignore rule triggered for "${filename}"`,
|
|
2819
|
+
},
|
|
2820
|
+
},
|
|
2821
|
+
ui: {
|
|
2822
|
+
betaTag: chalk.bold('[BETA]'),
|
|
2823
|
+
betaWarning: {
|
|
2824
|
+
header: chalk.yellow(
|
|
2825
|
+
'***************************** WARNING ****************************'
|
|
2826
|
+
),
|
|
2827
|
+
footer: chalk.yellow(
|
|
2828
|
+
'******************************************************************'
|
|
2829
|
+
),
|
|
2830
|
+
},
|
|
2831
|
+
infoTag: chalk.bold('[INFO]'),
|
|
2832
|
+
deprecatedTag: chalk.bold('[DEPRECATED]'),
|
|
2833
|
+
errorTag: chalk.bold('[ERROR]'),
|
|
2834
|
+
deprecatedMessage: (command, url) =>
|
|
2835
|
+
`The ${command} command is deprecated and will be disabled soon. ${url}`,
|
|
2836
|
+
deprecatedDescription: (message, command, url) =>
|
|
2837
|
+
`${message}. The ${command} command is deprecated and will be disabled soon. ${url}`,
|
|
2838
|
+
deprecatedUrlText: 'Learn more.',
|
|
2839
|
+
disabledMessage: (command, npmCommand, url) =>
|
|
2840
|
+
`The ${command} command is disabled. Run ${npmCommand} to update to the latest HubSpot CLI version. ${url}`,
|
|
2841
|
+
disabledUrlText: 'See all HubSpot CLI commands here.',
|
|
2842
|
+
featureHighlight: {
|
|
2843
|
+
defaultTitle: "What's next?",
|
|
2844
|
+
featureKeys: {
|
|
2845
|
+
accountOption: {
|
|
2846
|
+
command: '--account',
|
|
2847
|
+
message: command =>
|
|
2848
|
+
`Use the ${command} option with any command to override the default account`,
|
|
2849
|
+
},
|
|
2850
|
+
accountsListCommand: {
|
|
2851
|
+
command: 'hs accounts list',
|
|
2852
|
+
message: command =>
|
|
2853
|
+
`Run ${command} to see a list of configured HubSpot accounts`,
|
|
2854
|
+
},
|
|
2855
|
+
accountsUseCommand: {
|
|
2856
|
+
command: 'hs accounts use',
|
|
2857
|
+
message: command =>
|
|
2858
|
+
`Run ${command} to set the Hubspot account that the CLI will target by default`,
|
|
2859
|
+
},
|
|
2860
|
+
authCommand: {
|
|
2861
|
+
command: 'hs auth',
|
|
2862
|
+
message: command =>
|
|
2863
|
+
`Run ${command} to connect the CLI to additional HubSpot accounts`,
|
|
2864
|
+
},
|
|
2865
|
+
feedbackCommand: {
|
|
2866
|
+
command: 'hs feedback',
|
|
2867
|
+
message: command =>
|
|
2868
|
+
`Run ${command} to report a bug or leave feedback`,
|
|
2869
|
+
},
|
|
2870
|
+
helpCommand: {
|
|
2871
|
+
command: 'hs help',
|
|
2872
|
+
message: command =>
|
|
2873
|
+
`Run ${command} to see a list of available commands`,
|
|
2874
|
+
},
|
|
2875
|
+
projectCreateCommand: {
|
|
2876
|
+
command: 'hs project create',
|
|
2877
|
+
message: command => `Run ${command} to create a new project`,
|
|
2878
|
+
},
|
|
2879
|
+
projectDeployCommand: {
|
|
2880
|
+
command: 'hs project deploy',
|
|
2881
|
+
message: command => `Ready to take your project live? Run ${command}`,
|
|
2882
|
+
},
|
|
2883
|
+
projectHelpCommand: {
|
|
2884
|
+
command: 'hs project --help',
|
|
2885
|
+
message: command =>
|
|
2886
|
+
`Run ${command} to learn more about available project commands`,
|
|
2887
|
+
},
|
|
2888
|
+
projectUploadCommand: {
|
|
2889
|
+
command: 'hs project upload',
|
|
2890
|
+
message: command =>
|
|
2891
|
+
`Run ${command} to upload your project to HubSpot and trigger builds`,
|
|
2892
|
+
},
|
|
2893
|
+
projectDevCommand: {
|
|
2894
|
+
command: 'hs project dev',
|
|
2895
|
+
message: command =>
|
|
2896
|
+
`Run ${command} to set up your test environment and start local development`,
|
|
2897
|
+
},
|
|
2898
|
+
projectInstallDepsCommand: {
|
|
2899
|
+
command: 'hs project install-deps',
|
|
2900
|
+
message: command =>
|
|
2901
|
+
`Run ${command} to install dependencies for your project components`,
|
|
2902
|
+
},
|
|
2903
|
+
sampleProjects: {
|
|
2904
|
+
linkText: "HubSpot's sample projects",
|
|
2905
|
+
url: 'https://developers.hubspot.com/docs/platform/sample-projects?utm_source=cli&utm_content=project_create_whats_next',
|
|
2906
|
+
message: link => `See ${link}`,
|
|
2907
|
+
},
|
|
2908
|
+
},
|
|
2909
|
+
},
|
|
2910
|
+
git: {
|
|
2911
|
+
securityIssue: 'Security Issue Detected',
|
|
2912
|
+
configFileTracked: 'The HubSpot config file can be tracked by git.',
|
|
2913
|
+
fileName: configPath => `File: "${configPath}"`,
|
|
2914
|
+
remediate: 'To remediate:',
|
|
2915
|
+
moveConfig: homeDir =>
|
|
2916
|
+
`- Move the config file to your home directory: '${homeDir}'`,
|
|
2917
|
+
addGitignore: configPath =>
|
|
2918
|
+
`- Add gitignore pattern '${configPath}' to a .gitignore file in root of your repository.`,
|
|
2919
|
+
noRemote:
|
|
2920
|
+
'- Ensure that the config file has not already been pushed to a remote repository.',
|
|
2921
|
+
checkFailed:
|
|
2922
|
+
'Unable to determine if config file is properly ignored by git.',
|
|
2923
|
+
},
|
|
2924
|
+
serverlessFunctionLogs: {
|
|
2925
|
+
unableToProcessLog: log => `Unable to process log ${log}`,
|
|
2926
|
+
noLogsFound: 'No logs found.',
|
|
2927
|
+
},
|
|
2928
|
+
},
|
|
2929
|
+
commonOpts: {
|
|
2930
|
+
options: {
|
|
2931
|
+
account: {
|
|
2932
|
+
describe: 'HubSpot account id or name from config',
|
|
2933
|
+
},
|
|
2934
|
+
config: {
|
|
2935
|
+
describe: 'Path to a config file',
|
|
2936
|
+
},
|
|
2937
|
+
overwrite: {
|
|
2938
|
+
describe: 'Overwrite existing files',
|
|
2939
|
+
},
|
|
2940
|
+
modes: {
|
|
2941
|
+
describe: {
|
|
2942
|
+
default: modes => `${modes}`,
|
|
2943
|
+
read: modes => `Read from ${modes}`,
|
|
2944
|
+
write: modes => `Write to ${modes}`,
|
|
2945
|
+
},
|
|
2946
|
+
},
|
|
2947
|
+
qa: {
|
|
2948
|
+
describe: 'Run command in QA mode',
|
|
2949
|
+
},
|
|
2950
|
+
useEnv: {
|
|
2951
|
+
describe: 'Use environment variable config',
|
|
2952
|
+
},
|
|
2953
|
+
debug: {
|
|
2954
|
+
describe: 'Set log level to debug',
|
|
2955
|
+
},
|
|
2956
|
+
},
|
|
2957
|
+
},
|
|
2958
|
+
prompts: {
|
|
2959
|
+
projectDevTargetAccountPrompt: {
|
|
2960
|
+
createNewSandboxOption: '<Test on a new development sandbox>',
|
|
2961
|
+
createNewDeveloperTestAccountOption:
|
|
2962
|
+
'<Test on a new developer test account>',
|
|
2963
|
+
chooseDefaultAccountOption: () =>
|
|
2964
|
+
`<${chalk.bold('❗')} Test on this production account ${chalk.bold('❗')}>`,
|
|
2965
|
+
promptMessage: (accountType, accountIdentifier) =>
|
|
2966
|
+
`[--account] Choose a ${accountType} under ${accountIdentifier} to test with:`,
|
|
2967
|
+
sandboxLimit: limit =>
|
|
2968
|
+
`Your account reached the limit of ${limit} development sandboxes`,
|
|
2969
|
+
sandboxLimitWithSuggestion: (limit, authCommand) =>
|
|
2970
|
+
`Your account reached the limit of ${limit} development sandboxes. Run ${authCommand} to add an existing one to the config.`,
|
|
2971
|
+
developerTestAccountLimit: limit =>
|
|
2972
|
+
`Your account reached the limit of ${limit} developer test accounts.`,
|
|
2973
|
+
confirmDefaultAccount: (accountName, accountType) =>
|
|
2974
|
+
`Continue testing on ${chalk.bold(`${accountName} (${accountType})`)}? (Y/n)`,
|
|
2975
|
+
confirmUseExistingDeveloperTestAccount: accountName =>
|
|
2976
|
+
`Continue with ${accountName}? This account isn't currently connected to the HubSpot CLI. By continuing, you'll be prompted to generate a personal access key and connect it.`,
|
|
2977
|
+
noAccountId:
|
|
2978
|
+
'No account ID found for the selected account. Please try again.',
|
|
2979
|
+
},
|
|
2980
|
+
projectLogsPrompt: {
|
|
2981
|
+
functionName: projectName =>
|
|
2982
|
+
`[--function] Select function in ${chalk.bold(projectName)} project`,
|
|
2983
|
+
},
|
|
2984
|
+
setAsDefaultAccountPrompt: {
|
|
2985
|
+
setAsDefaultAccountMessage: 'Set this account as the default?',
|
|
2986
|
+
setAsDefaultAccount: accountName =>
|
|
2987
|
+
`Account "${accountName}" set as the default account`,
|
|
2988
|
+
keepingCurrentDefault: accountName =>
|
|
2989
|
+
`Account "${accountName}" will continue to be the default account`,
|
|
2990
|
+
},
|
|
2991
|
+
accountNamePrompt: {
|
|
2992
|
+
enterAccountName:
|
|
2993
|
+
'Enter a unique name to reference this account in the CLI:',
|
|
2994
|
+
enterDeveloperTestAccountName: 'Name your developer test account:',
|
|
2995
|
+
enterStandardSandboxName: 'Name your standard sandbox:',
|
|
2996
|
+
enterDevelopmentSandboxName: 'Name your development sandbox:',
|
|
2997
|
+
sandboxDefaultName: sandboxType => `New ${sandboxType} sandbox`,
|
|
2998
|
+
developerTestAccountDefaultName: count =>
|
|
2999
|
+
`Developer test account ${count}`,
|
|
3000
|
+
errors: {
|
|
3001
|
+
invalidName: 'You entered an invalid name. Please try again.',
|
|
3002
|
+
nameRequired: 'The name may not be blank. Please try again.',
|
|
3003
|
+
spacesInName: 'The name may not contain spaces. Please try again.',
|
|
3004
|
+
accountNameExists: name =>
|
|
3005
|
+
`Account with name "${name}" already exists in the CLI config, please enter a different name.`,
|
|
3006
|
+
},
|
|
3007
|
+
},
|
|
3008
|
+
personalAccessKeyPrompt: {
|
|
3009
|
+
enterAccountId:
|
|
3010
|
+
'Enter the account ID for your account (the number under the DOMAIN column at https://app.hubspot.com/myaccounts-beta ): ',
|
|
3011
|
+
enterClientId: 'Enter your OAuth2 client ID: ',
|
|
3012
|
+
enterClientSecret: 'Enter your OAuth2 client secret: ',
|
|
3013
|
+
enterPersonalAccessKey: 'Enter your personal access key: ',
|
|
3014
|
+
selectScopes:
|
|
3015
|
+
'Select access scopes (see https://developers.hubspot.com/docs/methods/oauth2/initiate-oauth-integration#scopes)',
|
|
3016
|
+
personalAccessKeySetupTitle: 'HubSpot Personal Access Key Setup',
|
|
3017
|
+
personalAccessKeyBrowserOpenPrep:
|
|
3018
|
+
"A personal access key is required to authenticate the CLI to interact with your HubSpot account. We'll open a secure page in your default browser where you can view and copy your personal access key.",
|
|
3019
|
+
personalAccessKeyBrowserOpenPrompt:
|
|
3020
|
+
'Open HubSpot to copy your personal access key?',
|
|
3021
|
+
logs: {
|
|
3022
|
+
openingWebBrowser: url => `Opening ${url} in your web browser`,
|
|
3023
|
+
},
|
|
3024
|
+
errors: {
|
|
3025
|
+
invalidAccountId:
|
|
3026
|
+
'You did not enter a valid account ID. Please try again.',
|
|
3027
|
+
invalidOauthClientId:
|
|
3028
|
+
'You entered an invalid OAuth2 client ID. Please try again.',
|
|
3029
|
+
invalidOauthClientIdLength:
|
|
3030
|
+
'The OAuth2 client ID must be 36 characters long. Please try again.',
|
|
3031
|
+
invalidOauthClientSecret:
|
|
3032
|
+
'You entered an invalid OAuth2 client secret. Please try again.',
|
|
3033
|
+
invalidOauthClientSecretLength:
|
|
3034
|
+
'The OAuth2 client secret must be 36 characters long. Please try again.',
|
|
3035
|
+
invalidOauthClientSecretCopy:
|
|
3036
|
+
'Please copy the actual OAuth2 client secret rather than the asterisks that mask it.',
|
|
3037
|
+
invalidPersonalAccessKey:
|
|
3038
|
+
'You did not enter a valid access key. Please try again.',
|
|
3039
|
+
invalidPersonalAccessKeyCopy:
|
|
3040
|
+
'Please copy the actual access key rather than the bullets that mask it.',
|
|
3041
|
+
},
|
|
3042
|
+
},
|
|
3043
|
+
createTemplatePrompt: {
|
|
3044
|
+
selectTemplate: 'Select the type of template to create',
|
|
3045
|
+
},
|
|
3046
|
+
createModulePrompt: {
|
|
3047
|
+
enterLabel: 'What should the module label be?',
|
|
3048
|
+
selectReactType: 'Is this a React module?',
|
|
3049
|
+
selectContentType: 'What types of content will this module be used in?',
|
|
3050
|
+
confirmGlobal: 'Is this a global module?',
|
|
3051
|
+
availableForNewContent: 'Make this module available for new content?',
|
|
3052
|
+
errors: {
|
|
3053
|
+
invalidLabel: 'You entered an invalid name. Please try again.',
|
|
3054
|
+
labelRequired: 'The name may not be blank. Please try again.',
|
|
3055
|
+
contentTypeRequired:
|
|
3056
|
+
'Please select at least one content type for this module.',
|
|
3057
|
+
},
|
|
3058
|
+
},
|
|
3059
|
+
createFunctionPrompt: {
|
|
3060
|
+
enterFolder: 'Name of the folder where your function will be created: ',
|
|
3061
|
+
enterFilename: 'Name of the JavaScript file for your function: ',
|
|
3062
|
+
enterEndpointPath: 'Path portion of the URL created for the function: ',
|
|
3063
|
+
selectEndpointMethod: 'Select the HTTP method for the endpoint',
|
|
3064
|
+
errors: {
|
|
3065
|
+
invalid: 'You entered an invalid name. Please try again.',
|
|
3066
|
+
blank: 'The name may not be blank. Please try again.',
|
|
3067
|
+
space: 'The name may not contain spaces. Please try again.',
|
|
3068
|
+
},
|
|
3069
|
+
},
|
|
3070
|
+
createApiSamplePrompt: {
|
|
3071
|
+
selectApiSampleApp: 'Please select API sample app',
|
|
3072
|
+
selectLanguage: "Please select sample app's language",
|
|
3073
|
+
errors: {
|
|
3074
|
+
apiSampleAppRequired: 'Please select API sample app',
|
|
3075
|
+
languageRequired: "Please select API sample app's language",
|
|
3076
|
+
},
|
|
3077
|
+
},
|
|
3078
|
+
createProjectPrompt: {
|
|
3079
|
+
enterName: '[--name] Give your project a name: ',
|
|
3080
|
+
enterDest: '[--dest] Enter the folder to create the project in:',
|
|
3081
|
+
selectTemplate: '[--template] Choose a project template: ',
|
|
3082
|
+
errors: {
|
|
3083
|
+
nameRequired: 'A project name is required',
|
|
3084
|
+
destRequired: 'A project dest is required',
|
|
3085
|
+
invalidDest:
|
|
3086
|
+
'There is an existing project at this destination. Please provide a new path for this project.',
|
|
3087
|
+
invalidCharacters:
|
|
3088
|
+
'The selected destination contains invalid characters. Please provide a new path and try again.',
|
|
3089
|
+
invalidTemplate: template =>
|
|
3090
|
+
`[--template] Could not find template "${template}". Please choose an available template:`,
|
|
3091
|
+
},
|
|
3092
|
+
},
|
|
3093
|
+
selectPublicAppPrompt: {
|
|
3094
|
+
selectAppIdMigrate: accountName =>
|
|
3095
|
+
`[--appId] Choose an app under ${accountName} to migrate:`,
|
|
3096
|
+
selectAppIdClone: accountName =>
|
|
3097
|
+
`[--appId] Choose an app under ${accountName} to clone:`,
|
|
3098
|
+
errors: {
|
|
3099
|
+
noAccountId: 'An account ID is required to select an app.',
|
|
3100
|
+
noAppsMigration: () => `${chalk.bold('No apps to migrate')}`,
|
|
3101
|
+
noAppsClone: () => `${chalk.bold('No apps to clone')}`,
|
|
3102
|
+
noAppsMigrationMessage: accountName =>
|
|
3103
|
+
`The selected developer account ${chalk.bold(accountName)} doesn't have any apps that can be migrated to the projects framework.`,
|
|
3104
|
+
noAppsCloneMessage: accountName =>
|
|
3105
|
+
`The selected developer account ${chalk.bold(accountName)} doesn't have any apps that can be cloned to the projects framework.`,
|
|
3106
|
+
errorFetchingApps: 'There was an error fetching public apps.',
|
|
3107
|
+
cannotBeMigrated: 'Cannot be migrated',
|
|
3108
|
+
},
|
|
3109
|
+
},
|
|
3110
|
+
downloadProjectPrompt: {
|
|
3111
|
+
selectProject: 'Select a project to download:',
|
|
3112
|
+
errors: {
|
|
3113
|
+
projectNotFound: (projectName, accountId) =>
|
|
3114
|
+
`Your project ${projectName} could not be found in ${accountId}. Please select a valid project:`,
|
|
3115
|
+
accountIdRequired: 'An account ID is required to download a project.',
|
|
3116
|
+
},
|
|
3117
|
+
},
|
|
3118
|
+
projectAddPrompt: {
|
|
3119
|
+
selectType: '[--type] Select a component to add: ',
|
|
3120
|
+
enterName: '[--name] Give your component a name: ',
|
|
3121
|
+
errors: {
|
|
3122
|
+
nameRequired: 'A component name is required',
|
|
3123
|
+
invalidType: type =>
|
|
3124
|
+
`[--type] Could not find type "${type}". Please choose an available type:`,
|
|
3125
|
+
},
|
|
3126
|
+
},
|
|
3127
|
+
secretPrompt: {
|
|
3128
|
+
enterValue: 'Enter a value for your secret: ',
|
|
3129
|
+
enterName: 'Enter a name for your secret: ',
|
|
3130
|
+
selectSecretUpdate: 'Select the secret you want to update',
|
|
3131
|
+
selectSecretDelete: 'Select the secret you want to delete',
|
|
3132
|
+
errors: {
|
|
3133
|
+
invalidValue: 'You entered an invalid value. Please try again.',
|
|
3134
|
+
},
|
|
3135
|
+
},
|
|
3136
|
+
sandboxesPrompt: {
|
|
3137
|
+
selectAccountName: 'Select the sandbox account you want to delete',
|
|
3138
|
+
selectParentAccountName: 'Select the account that the sandbox belongs to',
|
|
3139
|
+
type: {
|
|
3140
|
+
message: 'Choose the type of sandbox you want to create',
|
|
3141
|
+
developer:
|
|
3142
|
+
"Development sandbox (Includes production's object definitions)",
|
|
3143
|
+
standard:
|
|
3144
|
+
"Standard sandbox (Includes partial copy of production's assets)",
|
|
3145
|
+
},
|
|
3146
|
+
},
|
|
3147
|
+
uploadPrompt: {
|
|
3148
|
+
enterDest: 'Enter the destination path: ',
|
|
3149
|
+
enterSrc: 'Enter the source path: ',
|
|
3150
|
+
errors: {
|
|
3151
|
+
srcRequired: 'You must specify a source directory.',
|
|
3152
|
+
destRequired: 'You must specify a destination directory.',
|
|
3153
|
+
},
|
|
3154
|
+
fieldsPrompt: dir =>
|
|
3155
|
+
`Multiple fields files located in "${dir}". Please choose which to upload: `,
|
|
3156
|
+
},
|
|
3157
|
+
projectNamePrompt: {
|
|
3158
|
+
enterName: '[--project] Enter project name:',
|
|
3159
|
+
errors: {
|
|
3160
|
+
invalidName: 'You entered an invalid name. Please try again.',
|
|
3161
|
+
projectDoesNotExist: (projectName, accountIdentifier) =>
|
|
3162
|
+
`Project ${chalk.bold(projectName)} could not be found in "${accountIdentifier}"`,
|
|
3163
|
+
},
|
|
3164
|
+
},
|
|
3165
|
+
previewPrompt: {
|
|
3166
|
+
enterSrc: '[--src] Enter a local theme directory to preview.',
|
|
3167
|
+
enterDest:
|
|
3168
|
+
'[--dest] Enter the destination path for the src theme in HubSpot Design Tools.',
|
|
3169
|
+
themeProjectSelect: '[--theme] Select which theme to preview.',
|
|
3170
|
+
errors: {
|
|
3171
|
+
srcRequired: 'You must specify a source directory.',
|
|
3172
|
+
destRequired: 'You must specify a destination directory.',
|
|
3173
|
+
},
|
|
3174
|
+
},
|
|
3175
|
+
installPublicAppPrompt: {
|
|
3176
|
+
explanation:
|
|
3177
|
+
'Local development requires this app to be installed in the target test account',
|
|
3178
|
+
reinstallExplanation:
|
|
3179
|
+
"This app's required scopes have been updated since it was last installed on the target test account. To avoid issues with local development, we recommend reinstalling the app with the updated scopes.",
|
|
3180
|
+
prompt: 'Open HubSpot to install this app?',
|
|
3181
|
+
reinstallPrompt: 'Open HubSpot to reinstall this app?',
|
|
3182
|
+
decline: () =>
|
|
3183
|
+
`To continue local development of this app, install it in your target test account and re-run ${chalk.bold('`hs project dev`')}`,
|
|
3184
|
+
},
|
|
3185
|
+
selectHubDBTablePrompt: {
|
|
3186
|
+
selectTable: 'Select a HubDB table:',
|
|
3187
|
+
enterDest: 'Enter the destination path:',
|
|
3188
|
+
errors: {
|
|
3189
|
+
noTables: accountId => `No HubDB tables found in account ${accountId}`,
|
|
3190
|
+
errorFetchingTables: accountId =>
|
|
3191
|
+
`Unable to fetch HubDB tables in account ${accountId}`,
|
|
3192
|
+
destRequired: 'A destination is required',
|
|
3193
|
+
invalidDest:
|
|
3194
|
+
'The selected destination already exists. Please provide a new path.',
|
|
3195
|
+
invalidCharacters:
|
|
3196
|
+
'The selected destination contains invalid characters. Please provide a new path and try again.',
|
|
3197
|
+
},
|
|
3198
|
+
},
|
|
3199
|
+
},
|
|
3200
|
+
convertFields: {
|
|
3201
|
+
positionals: {
|
|
3202
|
+
src: {
|
|
3203
|
+
describe:
|
|
3204
|
+
'Path to JS Fields file or directory containing javascript fields files.',
|
|
3205
|
+
},
|
|
3206
|
+
},
|
|
3207
|
+
options: {
|
|
3208
|
+
options: {
|
|
3209
|
+
describe: 'Options to pass to javascript fields files',
|
|
3210
|
+
},
|
|
3211
|
+
},
|
|
3212
|
+
},
|
|
3213
|
+
developerTestAccount: {
|
|
3214
|
+
create: {
|
|
3215
|
+
loading: {
|
|
3216
|
+
add: accountName =>
|
|
3217
|
+
`Creating developer test account ${chalk.bold(accountName)}`,
|
|
3218
|
+
fail: accountName =>
|
|
3219
|
+
`Failed to create a developer test account ${chalk.bold(accountName)}.`,
|
|
3220
|
+
succeed: (accountName, accountId) =>
|
|
3221
|
+
`Successfully created a developer test account ${chalk.bold(accountName)} with portalId ${chalk.bold(accountId)}.`,
|
|
3222
|
+
},
|
|
3223
|
+
success: {
|
|
3224
|
+
configFileUpdated: (accountName, authType) =>
|
|
3225
|
+
`Account "${accountName}" updated using "${authType}"`,
|
|
3226
|
+
},
|
|
3227
|
+
failure: {
|
|
3228
|
+
invalidUser: (accountName, parentAccountName) =>
|
|
3229
|
+
`Couldn't create ${chalk.bold(accountName)} because your account has been removed from ${chalk.bold(parentAccountName)} or your permission set doesn't allow you to create the sandbox. To update your permissions, contact a super admin in ${chalk.bold(parentAccountName)}.`,
|
|
3230
|
+
limit: (accountName, limit) =>
|
|
3231
|
+
`${chalk.bold(accountName)} reached the limit of ${limit} developer test accounts. \n- To connect a developer test account to your HubSpot CLI, run ${chalk.bold('hs auth')} and follow the prompts.`,
|
|
3232
|
+
alreadyInConfig: (accountName, limit) =>
|
|
3233
|
+
`${chalk.bold(accountName)} reached the limit of ${limit} developer test accounts. \n- To use an existing developer test account, run ${chalk.bold('hs accounts use')}.`,
|
|
3234
|
+
scopes: {
|
|
3235
|
+
message:
|
|
3236
|
+
"The personal access key you provided doesn't include developer test account permissions.",
|
|
3237
|
+
instructions: (accountName, url) =>
|
|
3238
|
+
`To update CLI permissions for "${accountName}": \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes developer test account permissions. \n- Update the CLI config for this account by running ${chalk.bold('hs auth')} and entering the new key.\n`,
|
|
3239
|
+
},
|
|
3240
|
+
},
|
|
3241
|
+
},
|
|
3242
|
+
},
|
|
3243
|
+
sandbox: {
|
|
3244
|
+
create: {
|
|
3245
|
+
developer: {
|
|
3246
|
+
loading: {
|
|
3247
|
+
add: accountName =>
|
|
3248
|
+
`Creating developer sandbox ${chalk.bold(accountName)}`,
|
|
3249
|
+
fail: accountName =>
|
|
3250
|
+
`Failed to create a developer sandbox ${chalk.bold(accountName)}.`,
|
|
3251
|
+
succeed: (accountName, accountId) =>
|
|
3252
|
+
`Successfully created a developer sandbox ${chalk.bold(accountName)} with portalId ${chalk.bold(accountId)}.`,
|
|
3253
|
+
},
|
|
3254
|
+
success: {
|
|
3255
|
+
configFileUpdated: (accountName, authType) =>
|
|
3256
|
+
`Account "${accountName}" updated using "${authType}"`,
|
|
3257
|
+
},
|
|
3258
|
+
failure: {
|
|
3259
|
+
invalidUser: (accountName, parentAccountName) =>
|
|
3260
|
+
`Couldn't create ${chalk.bold(accountName)} because your account has been removed from ${chalk.bold(parentAccountName)} or your permission set doesn't allow you to create the sandbox. To update your permissions, contact a super admin in ${chalk.bold(parentAccountName)}.`,
|
|
3261
|
+
limit: (accountName, limit) =>
|
|
3262
|
+
`${chalk.bold(accountName)} reached the limit of ${limit} developer sandboxes. \n- To connect a developer sandbox to your HubSpot CLI, run ${chalk.bold('hs auth')} and follow the prompts.`,
|
|
3263
|
+
alreadyInConfig: (accountName, limit) =>
|
|
3264
|
+
`${chalk.bold(accountName)} reached the limit of ${limit} developer sandboxes. \n- To use an existing developer sandbox, run ${chalk.bold('hs accounts use')}.`,
|
|
3265
|
+
scopes: {
|
|
3266
|
+
message:
|
|
3267
|
+
"The personal access key you provided doesn't include developer sandbox permissions.",
|
|
3268
|
+
instructions: (accountName, url) =>
|
|
3269
|
+
`To update CLI permissions for "${accountName}": \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes developer sandbox permissions. \n- Update the CLI config for this account by running ${chalk.bold('hs auth')} and entering the new key.\n`,
|
|
3270
|
+
},
|
|
3271
|
+
},
|
|
3272
|
+
},
|
|
3273
|
+
standard: {
|
|
3274
|
+
loading: {
|
|
3275
|
+
add: accountName =>
|
|
3276
|
+
`Creating standard sandbox ${chalk.bold(accountName)}`,
|
|
3277
|
+
fail: accountName =>
|
|
3278
|
+
`Failed to create a standard sandbox ${chalk.bold(accountName)}.`,
|
|
3279
|
+
succeed: (accountName, accountId) =>
|
|
3280
|
+
`Successfully created a standard sandbox ${chalk.bold(accountName)} with portalId ${chalk.bold(accountId)}.`,
|
|
3281
|
+
},
|
|
3282
|
+
success: {
|
|
3283
|
+
configFileUpdated: (accountName, authType) =>
|
|
3284
|
+
`Account "${accountName}" updated using "${authType}"`,
|
|
3285
|
+
},
|
|
3286
|
+
failure: {
|
|
3287
|
+
invalidUser: (accountName, parentAccountName) =>
|
|
3288
|
+
`Couldn't create ${chalk.bold(accountName)} because your account has been removed from ${chalk.bold(parentAccountName)} or your permission set doesn't allow you to create the sandbox. To update your permissions, contact a super admin in ${chalk.bold(parentAccountName)}.`,
|
|
3289
|
+
limit: (accountName, limit) =>
|
|
3290
|
+
`${chalk.bold(accountName)} reached the limit of ${limit} standard sandboxes. \n- To connect a standard sandbox to your HubSpot CLI, run ${chalk.bold('hs auth')} and follow the prompts.`,
|
|
3291
|
+
alreadyInConfig: (accountName, limit) =>
|
|
3292
|
+
`${chalk.bold(accountName)} reached the limit of ${limit} standard sandboxes. \n- To use an existing standard sandbox, run ${chalk.bold('hs accounts use')}.`,
|
|
3293
|
+
scopes: {
|
|
3294
|
+
message:
|
|
3295
|
+
"The personal access key you provided doesn't include standard sandbox permissions.",
|
|
3296
|
+
instructions: (accountName, url) =>
|
|
3297
|
+
`To update CLI permissions for "${accountName}": \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes standard sandbox permissions. \n- Update the CLI config for this account by running ${chalk.bold('hs auth')} and entering the new key.\n`,
|
|
3298
|
+
},
|
|
3299
|
+
},
|
|
3300
|
+
},
|
|
3301
|
+
},
|
|
3302
|
+
sync: {
|
|
3303
|
+
loading: {
|
|
3304
|
+
add: accountName => `Syncing sandbox ${chalk.bold(accountName)}`,
|
|
3305
|
+
fail: accountName =>
|
|
3306
|
+
`Failed to sync sandbox ${chalk.bold(accountName)}.`,
|
|
3307
|
+
succeed: accountName =>
|
|
3308
|
+
`Successfully synced sandbox ${chalk.bold(accountName)}.`,
|
|
3309
|
+
},
|
|
3310
|
+
success: {
|
|
3311
|
+
configFileUpdated: (accountName, authType) =>
|
|
3312
|
+
`Account "${accountName}" updated using "${authType}"`,
|
|
3313
|
+
},
|
|
3314
|
+
failure: {
|
|
3315
|
+
invalidUser: (accountName, parentAccountName) =>
|
|
3316
|
+
`Couldn't sync ${chalk.bold(accountName)} because your account has been removed from ${chalk.bold(parentAccountName)} or your permission set doesn't allow you to sync the sandbox. To update your permissions, contact a super admin in ${chalk.bold(parentAccountName)}.`,
|
|
3317
|
+
scopes: {
|
|
3318
|
+
message:
|
|
3319
|
+
"The personal access key you provided doesn't include sandbox sync permissions.",
|
|
3320
|
+
instructions: (accountName, url) =>
|
|
3321
|
+
`To update CLI permissions for "${accountName}": \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes sandbox sync permissions. \n- Update the CLI config for this account by running ${chalk.bold('hs auth')} and entering the new key.\n`,
|
|
3322
|
+
},
|
|
3323
|
+
},
|
|
3324
|
+
},
|
|
3325
|
+
},
|
|
3326
|
+
errorHandlers: {
|
|
3327
|
+
index: {
|
|
3328
|
+
errorOccurred: error => `Error: ${error}`,
|
|
3329
|
+
errorContext: context => `Context: ${context}`,
|
|
3330
|
+
errorCause: cause => `Cause: ${cause}`,
|
|
3331
|
+
unknownErrorOccurred: 'An unknown error has occurred.',
|
|
3332
|
+
},
|
|
3333
|
+
suppressErrors: {
|
|
3334
|
+
platformVersionErrors: {
|
|
3335
|
+
header: 'Platform version update required',
|
|
3336
|
+
unspecifiedPlatformVersion: platformVersion =>
|
|
3337
|
+
`Projects with an ${chalk.bold(platformVersion)} are no longer supported.`,
|
|
3338
|
+
platformVersionRetired: platformVersion =>
|
|
3339
|
+
`Projects with ${chalk.bold(`platformVersion ${platformVersion}`)} are no longer supported.`,
|
|
3340
|
+
nonExistentPlatformVersion: platformVersion =>
|
|
3341
|
+
`Projects with ${chalk.bold(`platformVersion ${platformVersion}`)} are not supported.`,
|
|
3342
|
+
updateProject:
|
|
3343
|
+
'Please update your project to the latest version and try again.',
|
|
3344
|
+
docsLink: 'Projects platform versioning (BETA)',
|
|
3345
|
+
betaLink: docsLink => `For more info, see ${docsLink}.`,
|
|
3346
|
+
},
|
|
3347
|
+
missingScopeError: (request, accountName, authCommand) =>
|
|
3348
|
+
`Couldn't execute the ${request} because the access key for ${accountName} is missing required scopes. To update scopes, run ${authCommand}. Then deactivate the existing key and generate a new one that includes the missing scopes.`,
|
|
3349
|
+
},
|
|
3350
|
+
},
|
|
3351
|
+
serverless: {
|
|
3352
|
+
verifyAccessKeyAndUserAccess: {
|
|
3353
|
+
fetchScopeDataError: scopeGroup =>
|
|
3354
|
+
`Error verifying access of scopeGroup ${scopeGroup}:`,
|
|
3355
|
+
portalMissingScope:
|
|
3356
|
+
'Your account does not have access to this action. Talk to an account admin to request it.',
|
|
3357
|
+
userMissingScope:
|
|
3358
|
+
"You don't have access to this action. Ask an account admin to change your permissions in Users & Teams settings.",
|
|
3359
|
+
genericMissingScope:
|
|
3360
|
+
'Your access key does not allow this action. Please generate a new access key by running `hs auth personalaccesskey`.',
|
|
3361
|
+
},
|
|
3362
|
+
},
|
|
3363
|
+
doctor: {
|
|
3364
|
+
runningDiagnostics: 'Running diagnostics...',
|
|
3365
|
+
diagnosticsComplete: 'Diagnostics complete',
|
|
3366
|
+
accountChecks: {
|
|
3367
|
+
active: 'Default account active',
|
|
3368
|
+
inactive: "Default account isn't active",
|
|
3369
|
+
inactiveSecondary: command =>
|
|
3370
|
+
`Run ${command} to remove inactive accounts from your CLI config`,
|
|
3371
|
+
unableToDetermine: 'Unable to determine if the portal is active',
|
|
3372
|
+
pak: {
|
|
3373
|
+
incomplete:
|
|
3374
|
+
'Personal access key is valid, but there are more scopes available to your user that are not included in your key.',
|
|
3375
|
+
incompleteSecondary: (command, link) =>
|
|
3376
|
+
`To add the available scopes, run ${command} and re-authenticate your account with a new key that has those scopes. Visit HubSpot to view selected and available scopes for your personal access key. ${link}`,
|
|
3377
|
+
invalid: 'Personal access key is invalid',
|
|
3378
|
+
invalidSecondary: command =>
|
|
3379
|
+
`To get a new key, run ${command}, deactivate your access key, and generate a new one. Then use that new key to authenticate your account.`,
|
|
3380
|
+
valid: link => `Personal Access Key is valid. ${link}`,
|
|
3381
|
+
viewScopes: 'View selected scopes',
|
|
3382
|
+
},
|
|
3383
|
+
},
|
|
3384
|
+
nodeChecks: {
|
|
3385
|
+
unableToDetermine:
|
|
3386
|
+
'Unable to determine what version of node is installed',
|
|
3387
|
+
minimumNotMet: nodeVersion =>
|
|
3388
|
+
`Minimum Node version is not met. Upgrade to ${nodeVersion} or higher`,
|
|
3389
|
+
success: nodeVersion => `node v${nodeVersion} is installed`,
|
|
3390
|
+
},
|
|
3391
|
+
npmChecks: {
|
|
3392
|
+
notInstalled: 'npm is not installed',
|
|
3393
|
+
installed: npmVersion => `npm v${npmVersion} is installed`,
|
|
3394
|
+
unableToDetermine: 'Unable to determine if npm is installed',
|
|
3395
|
+
},
|
|
3396
|
+
hsChecks: {
|
|
3397
|
+
notLatest: hsVersion => `Version ${hsVersion} outdated`,
|
|
3398
|
+
notLatestSecondary: (command, hsVersion) =>
|
|
3399
|
+
`Run ${command} to upgrade to the latest version ${hsVersion}`,
|
|
3400
|
+
latest: hsVersion => `HubSpot CLI v${hsVersion} up to date`,
|
|
3401
|
+
unableToDetermine: 'Unable to determine if HubSpot CLI is up to date.',
|
|
3402
|
+
unableToDetermineSecondary: (command, link) =>
|
|
3403
|
+
`Run ${command} to check your installed version; then visit the ${link} to validate whether you have the latest version`,
|
|
3404
|
+
unableToDetermineSecondaryLink: 'npm HubSpot CLI version history',
|
|
3405
|
+
},
|
|
3406
|
+
projectDependenciesChecks: {
|
|
3407
|
+
missingDependencies: dir => `missing dependencies in ${chalk.bold(dir)}`,
|
|
3408
|
+
missingDependenciesSecondary: command =>
|
|
3409
|
+
`Run ${command} to install all project dependencies locally`,
|
|
3410
|
+
unableToDetermine: dir =>
|
|
3411
|
+
`Unable to determine if dependencies are installed ${dir}`,
|
|
3412
|
+
success: 'App dependencies are installed and up to date',
|
|
3413
|
+
},
|
|
3414
|
+
files: {
|
|
3415
|
+
invalidJson: filename => `invalid JSON in ${chalk.bold(filename)}`,
|
|
3416
|
+
validJson: 'JSON files valid',
|
|
3417
|
+
},
|
|
3418
|
+
port: {
|
|
3419
|
+
inUse: port => `Port ${port} is in use`,
|
|
3420
|
+
inUseSecondary: command =>
|
|
3421
|
+
`Make sure it is available if before running ${command}`,
|
|
3422
|
+
available: port => `Port ${port} available for local development`,
|
|
3423
|
+
},
|
|
3424
|
+
diagnosis: {
|
|
3425
|
+
cli: {
|
|
3426
|
+
header: 'HubSpot CLI install',
|
|
3427
|
+
},
|
|
3428
|
+
cliConfig: {
|
|
3429
|
+
header: 'CLI configuration',
|
|
3430
|
+
configFileSubHeader: filename => `Config File: ${chalk.bold(filename)}`,
|
|
3431
|
+
defaultAccountSubHeader: accountDetails =>
|
|
3432
|
+
`Default Account: ${accountDetails}`,
|
|
3433
|
+
noConfigFile: 'CLI configuration not found',
|
|
3434
|
+
noConfigFileSecondary: command =>
|
|
3435
|
+
`Run ${command} and follow the prompts to create your CLI configuration file and connect it to your HubSpot account`,
|
|
3436
|
+
},
|
|
3437
|
+
projectConfig: {
|
|
3438
|
+
header: 'Project configuration',
|
|
3439
|
+
projectDirSubHeader: projectDir =>
|
|
3440
|
+
`Project dir: ${chalk.bold(projectDir)}`,
|
|
3441
|
+
projectNameSubHeader: projectName =>
|
|
3442
|
+
`Project name: ${chalk.bold(projectName)}`,
|
|
3443
|
+
},
|
|
3444
|
+
counts: {
|
|
3445
|
+
errors: count => `${chalk.bold('Errors:')} ${count}`,
|
|
3446
|
+
warnings: count => `${chalk.bold('Warning:')} ${count}`,
|
|
3447
|
+
},
|
|
3448
|
+
},
|
|
3449
|
+
},
|
|
3450
|
+
oauth: {
|
|
3451
|
+
missingClientId: 'Error building oauth URL: missing client ID.',
|
|
3452
|
+
},
|
|
3453
|
+
};
|