@hubspot/cli 7.7.34-experimental.0 → 7.8.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.
Files changed (293) hide show
  1. package/bin/cli.js +31 -25
  2. package/commands/__tests__/auth.test.js +5 -0
  3. package/commands/__tests__/doctor.test.js +16 -16
  4. package/commands/__tests__/getStarted.test.js +2 -2
  5. package/commands/__tests__/mcp.test.js +1 -1
  6. package/commands/__tests__/project.test.js +0 -3
  7. package/commands/account/clean.js +18 -27
  8. package/commands/account/createOverride.js +13 -31
  9. package/commands/account/info.js +20 -31
  10. package/commands/account/list.js +16 -22
  11. package/commands/account/remove.js +12 -20
  12. package/commands/account/removeOverride.js +11 -21
  13. package/commands/account/rename.js +6 -9
  14. package/commands/account/use.js +12 -26
  15. package/commands/account.js +2 -2
  16. package/commands/app/__tests__/migrate.test.js +5 -6
  17. package/commands/app/migrate.js +13 -19
  18. package/commands/app/secret/add.js +2 -1
  19. package/commands/app/secret/delete.js +2 -1
  20. package/commands/app/secret/list.js +2 -1
  21. package/commands/app/secret/update.js +2 -1
  22. package/commands/app/secret.js +2 -1
  23. package/commands/app.js +3 -8
  24. package/commands/auth.d.ts +1 -0
  25. package/commands/auth.js +16 -7
  26. package/commands/cms/convertFields.js +7 -9
  27. package/commands/cms/getReactModule.js +9 -14
  28. package/commands/cms/lighthouseScore.js +33 -36
  29. package/commands/cms.js +2 -2
  30. package/commands/completion.js +3 -3
  31. package/commands/config/set.d.ts +1 -1
  32. package/commands/config/set.js +64 -37
  33. package/commands/config.js +2 -2
  34. package/commands/create.js +2 -2
  35. package/commands/customObject/create.js +10 -12
  36. package/commands/customObject/schema/create.js +9 -11
  37. package/commands/customObject/schema/delete.js +16 -16
  38. package/commands/customObject/schema/fetch-all.js +12 -11
  39. package/commands/customObject/schema/fetch.js +15 -15
  40. package/commands/customObject/schema/list.js +4 -4
  41. package/commands/customObject/schema/update.js +13 -13
  42. package/commands/customObject/schema.js +2 -2
  43. package/commands/customObject.js +6 -7
  44. package/commands/doctor.js +8 -11
  45. package/commands/feedback.js +7 -12
  46. package/commands/fetch.js +8 -8
  47. package/commands/filemanager/fetch.js +7 -7
  48. package/commands/filemanager/upload.js +15 -34
  49. package/commands/filemanager.js +2 -2
  50. package/commands/function/deploy.js +11 -29
  51. package/commands/function/list.js +8 -8
  52. package/commands/function/server.js +9 -11
  53. package/commands/function.d.ts +1 -1
  54. package/commands/function.js +2 -2
  55. package/commands/getStarted.d.ts +0 -2
  56. package/commands/getStarted.js +4 -4
  57. package/commands/hubdb/clear.js +7 -15
  58. package/commands/hubdb/create.js +9 -15
  59. package/commands/hubdb/delete.js +8 -15
  60. package/commands/hubdb/fetch.js +6 -9
  61. package/commands/hubdb.d.ts +1 -1
  62. package/commands/hubdb.js +2 -2
  63. package/commands/init.js +2 -3
  64. package/commands/lint.js +16 -16
  65. package/commands/list.js +8 -14
  66. package/commands/logs.js +14 -20
  67. package/commands/mcp/__tests__/setup.test.js +2 -2
  68. package/commands/mcp/setup.js +11 -2
  69. package/commands/mcp.js +3 -3
  70. package/commands/mv.js +6 -17
  71. package/commands/open.js +5 -5
  72. package/commands/project/__tests__/add.test.js +4 -2
  73. package/commands/project/__tests__/create.test.js +6 -6
  74. package/commands/project/__tests__/deploy.test.js +3 -7
  75. package/commands/project/__tests__/devUnifiedFlow.test.js +2 -4
  76. package/commands/project/__tests__/installDeps.test.js +8 -8
  77. package/commands/project/__tests__/logs.test.js +1 -4
  78. package/commands/project/__tests__/migrate.test.js +6 -7
  79. package/commands/project/__tests__/migrateApp.test.js +3 -7
  80. package/commands/project/__tests__/profile.test.js +1 -1
  81. package/commands/project/__tests__/validate.test.js +98 -0
  82. package/commands/project/add.js +4 -8
  83. package/commands/project/cloneApp.js +14 -19
  84. package/commands/project/create.js +3 -10
  85. package/commands/project/deploy.js +5 -5
  86. package/commands/project/dev/deprecatedFlow.js +7 -16
  87. package/commands/project/dev/index.js +16 -13
  88. package/commands/project/dev/unifiedFlow.js +8 -4
  89. package/commands/project/download.js +10 -14
  90. package/commands/project/installDeps.js +8 -9
  91. package/commands/project/listBuilds.js +12 -21
  92. package/commands/project/logs.js +21 -24
  93. package/commands/project/migrate.js +41 -13
  94. package/commands/project/migrateApp.js +10 -17
  95. package/commands/project/open.js +6 -14
  96. package/commands/project/profile/add.js +3 -3
  97. package/commands/project/profile/delete.js +1 -2
  98. package/commands/project/profile.js +2 -3
  99. package/commands/project/upload.d.ts +2 -2
  100. package/commands/project/upload.js +17 -26
  101. package/commands/project/validate.js +7 -7
  102. package/commands/project/watch.js +13 -22
  103. package/commands/project.js +2 -3
  104. package/commands/sandbox/__tests__/create.test.js +5 -5
  105. package/commands/sandbox/create.js +22 -32
  106. package/commands/sandbox/delete.js +35 -63
  107. package/commands/sandbox.js +2 -2
  108. package/commands/secret/addSecret.js +7 -17
  109. package/commands/secret/deleteSecret.js +10 -20
  110. package/commands/secret/listSecret.js +8 -10
  111. package/commands/secret/updateSecret.js +9 -17
  112. package/commands/secret.js +2 -2
  113. package/commands/testAccount/__tests__/delete.test.js +2 -4
  114. package/commands/testAccount/create.js +0 -3
  115. package/commands/testAccount/delete.d.ts +4 -3
  116. package/commands/testAccount/delete.js +155 -14
  117. package/commands/testAccount/importData.d.ts +1 -1
  118. package/commands/testAccount/importData.js +1 -1
  119. package/commands/testAccount.js +1 -1
  120. package/lang/en.d.ts +317 -120
  121. package/lang/en.js +312 -118
  122. package/lang/en.lyaml +2 -2
  123. package/lib/__tests__/buildAccount.test.js +2 -1
  124. package/lib/__tests__/commonOpts.test.js +1 -1
  125. package/lib/__tests__/dependencyManagement.test.js +1 -1
  126. package/lib/__tests__/developerTestAccounts.test.js +3 -3
  127. package/lib/__tests__/npm.test.js +1 -1
  128. package/lib/__tests__/oauth.test.js +4 -4
  129. package/lib/__tests__/process.test.js +10 -5
  130. package/lib/__tests__/sandboxSync.test.js +8 -8
  131. package/lib/__tests__/sandboxes.test.js +8 -8
  132. package/lib/__tests__/serverlessLogs.test.js +1 -1
  133. package/lib/__tests__/usageTracking.test.js +5 -5
  134. package/lib/__tests__/validation.test.js +2 -1
  135. package/lib/__tests__/yargsUtils.test.js +83 -9
  136. package/lib/app/__tests__/migrate.test.js +19 -56
  137. package/lib/app/__tests__/migrate_legacy.test.js +1 -1
  138. package/lib/app/migrate.d.ts +2 -8
  139. package/lib/app/migrate.js +5 -80
  140. package/lib/app/migrate_legacy.js +20 -24
  141. package/lib/buildAccount.js +25 -57
  142. package/lib/commonOpts.d.ts +1 -1
  143. package/lib/commonOpts.js +25 -22
  144. package/lib/configOptions.js +7 -0
  145. package/lib/constants.d.ts +13 -0
  146. package/lib/constants.js +17 -0
  147. package/lib/dependencyManagement.js +9 -27
  148. package/lib/developerTestAccounts.js +9 -23
  149. package/lib/doctor/Diagnosis.js +11 -23
  150. package/lib/doctor/DiagnosticInfoBuilder.js +12 -11
  151. package/lib/doctor/Doctor.js +42 -90
  152. package/lib/doctor/__tests__/Doctor.test.js +4 -4
  153. package/lib/errorHandlers/index.js +12 -20
  154. package/lib/errorHandlers/suppressError.js +10 -17
  155. package/lib/lang.js +6 -5
  156. package/lib/links.d.ts +1 -0
  157. package/lib/links.js +14 -7
  158. package/lib/mcp/setup.js +1 -1
  159. package/lib/middleware/__test__/commandTargetingUtils.test.js +99 -0
  160. package/lib/middleware/__test__/configMiddleware.test.js +11 -11
  161. package/lib/middleware/__test__/yargsChecksMiddleware.test.js +6 -8
  162. package/lib/middleware/commandTargetingUtils.d.ts +8 -0
  163. package/lib/middleware/commandTargetingUtils.js +78 -0
  164. package/lib/middleware/configMiddleware.d.ts +1 -1
  165. package/lib/middleware/configMiddleware.js +21 -81
  166. package/lib/middleware/fireAlarmMiddleware.js +15 -5
  167. package/lib/middleware/gitMiddleware.js +5 -1
  168. package/lib/middleware/notificationsMiddleware.js +5 -11
  169. package/lib/middleware/yargsChecksMiddleware.js +6 -9
  170. package/lib/npm.js +2 -2
  171. package/lib/oauth.js +5 -5
  172. package/lib/process.js +5 -4
  173. package/lib/projectProfiles.d.ts +1 -1
  174. package/lib/projectProfiles.js +2 -10
  175. package/lib/projects/__tests__/AppDevModeInterface.test.js +2 -0
  176. package/lib/projects/__tests__/LocalDevProcess.test.js +227 -16
  177. package/lib/projects/__tests__/LocalDevWebsocketServer.test.js +86 -60
  178. package/lib/projects/__tests__/deploy.test.js +71 -6
  179. package/lib/projects/__tests__/localDevProjectHelpers.test.js +6 -2
  180. package/lib/projects/__tests__/platformVersion.test.js +8 -8
  181. package/lib/projects/__tests__/projects.test.js +12 -12
  182. package/lib/projects/__tests__/structure.test.js +3 -3
  183. package/lib/projects/__tests__/upload.test.d.ts +1 -0
  184. package/lib/projects/__tests__/upload.test.js +82 -0
  185. package/lib/projects/add/__tests__/legacyAddComponent.test.js +6 -6
  186. package/lib/projects/add/__tests__/v3AddComponent.test.js +4 -4
  187. package/lib/projects/create/__tests__/legacy.test.js +5 -5
  188. package/lib/projects/create/__tests__/v3.test.js +80 -5
  189. package/lib/projects/create/index.js +2 -2
  190. package/lib/projects/create/legacy.js +2 -2
  191. package/lib/projects/create/v3.js +10 -8
  192. package/lib/projects/localDev/AppDevModeInterface.d.ts +2 -0
  193. package/lib/projects/localDev/AppDevModeInterface.js +21 -12
  194. package/lib/projects/localDev/LocalDevLogger.d.ts +4 -0
  195. package/lib/projects/localDev/LocalDevLogger.js +27 -6
  196. package/lib/projects/localDev/LocalDevManager.js +4 -5
  197. package/lib/projects/localDev/LocalDevProcess.d.ts +7 -5
  198. package/lib/projects/localDev/LocalDevProcess.js +90 -19
  199. package/lib/projects/localDev/LocalDevState.d.ts +9 -8
  200. package/lib/projects/localDev/LocalDevState.js +18 -17
  201. package/lib/projects/localDev/LocalDevWebsocketServer.d.ts +2 -1
  202. package/lib/projects/localDev/LocalDevWebsocketServer.js +62 -33
  203. package/lib/projects/localDev/helpers/project.d.ts +1 -0
  204. package/lib/projects/localDev/helpers/project.js +42 -1
  205. package/lib/projects/localDev/localDevWebsocketServerUtils.d.ts +4 -0
  206. package/lib/projects/localDev/localDevWebsocketServerUtils.js +10 -0
  207. package/lib/projects/platformVersion.d.ts +1 -1
  208. package/lib/projects/platformVersion.js +1 -1
  209. package/lib/projects/pollProjectBuildAndDeploy.js +4 -4
  210. package/lib/projects/structure.d.ts +2 -2
  211. package/lib/projects/structure.js +6 -6
  212. package/lib/projects/upload.d.ts +2 -3
  213. package/lib/projects/upload.js +17 -9
  214. package/lib/prompts/accountNamePrompt.js +14 -19
  215. package/lib/prompts/accountsPrompt.js +2 -2
  216. package/lib/prompts/cmsFieldPrompt.js +2 -2
  217. package/lib/prompts/createApiSamplePrompt.js +5 -5
  218. package/lib/prompts/createDeveloperTestAccountConfigPrompt.js +10 -1
  219. package/lib/prompts/createFunctionPrompt.js +14 -14
  220. package/lib/prompts/createModulePrompt.js +9 -9
  221. package/lib/prompts/createTemplatePrompt.js +2 -2
  222. package/lib/prompts/downloadProjectPrompt.js +5 -8
  223. package/lib/prompts/personalAccessKeyPrompt.js +3 -3
  224. package/lib/prompts/previewPrompt.js +6 -6
  225. package/lib/prompts/projectAddPrompt.js +8 -1
  226. package/lib/prompts/projectDevTargetAccountPrompt.js +20 -32
  227. package/lib/prompts/projectNamePrompt.js +4 -8
  228. package/lib/prompts/projectsLogsPrompt.js +2 -4
  229. package/lib/prompts/promptUtils.js +30 -9
  230. package/lib/prompts/sandboxesPrompt.js +7 -7
  231. package/lib/prompts/secretPrompt.js +3 -3
  232. package/lib/prompts/selectAppPrompt.js +3 -3
  233. package/lib/prompts/selectHubDBTablePrompt.js +9 -13
  234. package/lib/prompts/selectProjectTemplatePrompt.js +2 -0
  235. package/lib/prompts/selectPublicAppForMigrationPrompt.js +15 -19
  236. package/lib/prompts/setAsDefaultAccountPrompt.js +4 -8
  237. package/lib/prompts/uploadPrompt.js +5 -5
  238. package/lib/sandboxSync.js +24 -41
  239. package/lib/sandboxes.js +19 -47
  240. package/lib/schema.js +3 -3
  241. package/lib/serverlessLogs.js +11 -13
  242. package/lib/theme/__tests__/migrate.test.d.ts +1 -0
  243. package/lib/theme/__tests__/migrate.test.js +233 -0
  244. package/lib/theme/migrate.d.ts +13 -0
  245. package/lib/theme/migrate.js +90 -0
  246. package/lib/ui/SpinniesManager.d.ts +2 -0
  247. package/lib/ui/SpinniesManager.js +7 -0
  248. package/lib/ui/boxen.js +1 -2
  249. package/lib/ui/git.js +13 -10
  250. package/lib/ui/index.js +38 -37
  251. package/lib/ui/serverlessFunctionLogs.js +9 -7
  252. package/lib/ui/uiMessages.d.ts +68 -0
  253. package/lib/ui/uiMessages.js +71 -0
  254. package/lib/usageTracking.js +8 -8
  255. package/lib/validation.js +20 -23
  256. package/lib/yargsUtils.d.ts +1 -1
  257. package/lib/yargsUtils.js +12 -5
  258. package/mcp-server/tools/cms/HsCreateModuleTool.d.ts +2 -2
  259. package/mcp-server/tools/index.js +4 -0
  260. package/mcp-server/tools/project/AddFeatureToProjectTool.d.ts +2 -2
  261. package/mcp-server/tools/project/CreateProjectTool.d.ts +2 -2
  262. package/mcp-server/tools/project/DocsSearchTool.d.ts +4 -1
  263. package/mcp-server/tools/project/DocsSearchTool.js +5 -5
  264. package/mcp-server/tools/project/GetApiUsagePatternsByAppIdTool.d.ts +23 -0
  265. package/mcp-server/tools/project/GetApiUsagePatternsByAppIdTool.js +68 -0
  266. package/mcp-server/tools/project/GetApplicationInfoTool.d.ts +11 -0
  267. package/mcp-server/tools/project/GetApplicationInfoTool.js +49 -0
  268. package/mcp-server/tools/project/GetConfigValuesTool.d.ts +4 -1
  269. package/mcp-server/tools/project/GetConfigValuesTool.js +12 -6
  270. package/mcp-server/tools/project/GuidedWalkthroughTool.d.ts +2 -2
  271. package/mcp-server/tools/project/__tests__/DocsSearchTool.test.js +12 -10
  272. package/mcp-server/tools/project/__tests__/GetApiUsagePatternsByAppIdTool.test.d.ts +1 -0
  273. package/mcp-server/tools/project/__tests__/GetApiUsagePatternsByAppIdTool.test.js +169 -0
  274. package/mcp-server/tools/project/__tests__/GetApplicationInfoTool.test.d.ts +1 -0
  275. package/mcp-server/tools/project/__tests__/GetApplicationInfoTool.test.js +115 -0
  276. package/mcp-server/tools/project/__tests__/GetConfigValuesTool.test.js +8 -7
  277. package/mcp-server/utils/__tests__/cliConfig.test.d.ts +1 -0
  278. package/mcp-server/utils/__tests__/cliConfig.test.js +110 -0
  279. package/mcp-server/utils/cliConfig.d.ts +1 -0
  280. package/mcp-server/utils/cliConfig.js +12 -0
  281. package/mcp-server/utils/toolUsageTracking.js +2 -2
  282. package/package.json +4 -4
  283. package/types/LocalDev.d.ts +19 -3
  284. package/types/Yargs.d.ts +1 -1
  285. package/ui/index.js +1 -1
  286. package/commands/app/__tests__/install.test.js +0 -47
  287. package/commands/app/install.d.ts +0 -8
  288. package/commands/app/install.js +0 -122
  289. package/lib/middleware/__test__/utils.test.js +0 -51
  290. package/lib/middleware/utils.d.ts +0 -8
  291. package/lib/middleware/utils.js +0 -14
  292. /package/commands/{app/__tests__/install.test.d.ts → project/__tests__/validate.test.d.ts} +0 -0
  293. /package/lib/middleware/__test__/{utils.test.d.ts → commandTargetingUtils.test.d.ts} +0 -0
package/lang/en.js CHANGED
@@ -5,7 +5,8 @@ import { PERSONAL_ACCESS_KEY_AUTH_METHOD } from '@hubspot/local-dev-lib/constant
5
5
  import { ARCHIVED_HUBSPOT_CONFIG_YAML_FILE_NAME, GLOBAL_CONFIG_PATH, DEFAULT_HUBSPOT_CONFIG_YAML_FILE_NAME, } from '@hubspot/local-dev-lib/constants/config';
6
6
  import { uiAccountDescription, uiBetaTag, uiCommandReference, uiLink, UI_COLORS, } from '../lib/ui/index.js';
7
7
  import { getProjectDetailUrl, getProjectSettingsUrl, getLocalDevUiUrl, getAppAllowlistUrl, } from '../lib/projects/urls.js';
8
- import { APP_DISTRIBUTION_TYPES, APP_AUTH_TYPES, PROJECT_CONFIG_FILE, PROJECT_WITH_APP, } from '../lib/constants.js';
8
+ import { getProductUpdatesUrl } from '../lib/links.js';
9
+ import { APP_DISTRIBUTION_TYPES, APP_AUTH_TYPES, PROJECT_CONFIG_FILE, PROJECT_WITH_APP, LEGACY_PUBLIC_APP_FILE, } from '../lib/constants.js';
9
10
  import { getAccountIdentifier } from '@hubspot/local-dev-lib/config/getAccountIdentifier';
10
11
  export const commands = {
11
12
  generalErrors: {
@@ -18,6 +19,7 @@ export const commands = {
18
19
  },
19
20
  },
20
21
  getStarted: {
22
+ describe: 'A step-by-step command to get you started with a HubSpot project.',
21
23
  options: {
22
24
  dest: {
23
25
  describe: 'Directory where the project should be created',
@@ -94,9 +96,13 @@ export const commands = {
94
96
  },
95
97
  list: {
96
98
  accounts: `${chalk.bold('Accounts')}:`,
97
- defaultAccount: (account) => `${chalk.bold('Default account')}: ${account}`,
99
+ defaultAccountTitle: `${chalk.bold('Default Account')}`,
100
+ defaultAccount: (account) => `Account: ${account}`,
98
101
  describe: 'List names of accounts defined in config.',
99
- configPath: (configPath) => `${chalk.bold('Config path')}: ${configPath}`,
102
+ configPath: (configPath) => `Source: ${configPath}`,
103
+ overrideFilePathTitle: `${chalk.bold('Default Account Override')}`,
104
+ overrideFilePath: (overrideFilePath) => `Source: ${overrideFilePath}`,
105
+ overrideAccount: (account) => `Account: ${account}`,
100
106
  labels: {
101
107
  accountId: 'Account ID',
102
108
  authType: 'Auth Type',
@@ -122,6 +128,8 @@ export const commands = {
122
128
  errors: {
123
129
  accountNotFound: (specifiedAccount, configPath) => `The account "${specifiedAccount}" could not be found in ${configPath}`,
124
130
  },
131
+ accountOverride: (accountOverride) => `This project currently has an account override set: "${accountOverride}". Account "${accountOverride}" will continue to act as the default account for this project.`,
132
+ accountOverrideCommands: `Use ${uiCommandReference('hs account create-override')} to change override accounts, or ${uiCommandReference('hs account remove-override')} to remove the override and use your default account.`,
125
133
  examples: {
126
134
  default: 'Select a HubSpot account to use as the default account',
127
135
  idBased: 'Set the default account to the account in the config with accountId equal to "1234567"',
@@ -143,6 +151,7 @@ export const commands = {
143
151
  replaceDefaultAccount: 'The removed account was the default account.',
144
152
  },
145
153
  prompts: {
154
+ deleteOverrideFile: (overrideFilePath, accountName) => `Delete the override file (${overrideFilePath}) associated with ${accountName}?`,
146
155
  selectAccountToRemove: 'Select an account to remove from the config',
147
156
  },
148
157
  errors: {
@@ -162,12 +171,40 @@ export const commands = {
162
171
  accountRemoved: (accountName) => `Account "${accountName}" removed from the config`,
163
172
  },
164
173
  },
174
+ removeOverride: {
175
+ describe: (overrideFile) => `Remove the default account override file (${overrideFile}) from the current working directory.`,
176
+ accountOverride: (overrideFilePath, accountOverride) => `There is an account override file at ${overrideFilePath} associated with account "${accountOverride}".`,
177
+ prompts: {
178
+ deleteOverrideFile: 'Delete account override file?',
179
+ },
180
+ success: 'Removed the default account override file.',
181
+ noOverrideFile: 'No default account override file found in the current working directory. No action required.',
182
+ errors: {
183
+ globalConfigNotFound: `This command is only compatible with our new global config. Run ${uiCommandReference('hs account auth')} to get started.`,
184
+ },
185
+ options: {
186
+ force: {
187
+ describe: 'Skip confirmation prompt when removing the override file',
188
+ },
189
+ },
190
+ },
165
191
  info: {
166
192
  accountId: (accountId) => `${chalk.bold('Account ID')}: ${accountId}`,
193
+ defaultAccountTitle: `${chalk.bold('Default Account')}`,
194
+ configPath: (configPath) => `Source: ${configPath}`,
195
+ defaultAccount: (accountName) => `Account: ${accountName}`,
196
+ overrideFilePathTitle: `${chalk.bold('Default Account Override')}`,
197
+ overrideFilePath: (overrideFilePath) => `Source: ${overrideFilePath}`,
198
+ overrideAccount: (accountName) => `Account: ${accountName}`,
167
199
  describe: 'Print information about the default account, or about the account specified with the "account" option.',
168
200
  errors: {
169
201
  notUsingPersonalAccessKey: 'This command currently only supports fetching scopes for the personal access key auth type.',
170
202
  },
203
+ options: {
204
+ account: {
205
+ describe: 'Account name or id to show info for',
206
+ },
207
+ },
171
208
  examples: {
172
209
  default: 'Print information for the default account',
173
210
  idBased: 'Print information for the account with accountId equal to "1234567"',
@@ -191,6 +228,30 @@ export const commands = {
191
228
  other: (count) => `Remove ${count} inactive accounts from the CLI config?`,
192
229
  },
193
230
  removeSuccess: (accountName) => `Removed ${accountName} from the CLI config.`,
231
+ replaceDefaultAccount: 'The default account was removed.',
232
+ defaultAccountOverride: (overrideFilePath) => `\n(This will also delete the default account override file at ${overrideFilePath})`,
233
+ },
234
+ createOverride: {
235
+ describe: (hsAccountFileName) => `Create a new default account override file (${hsAccountFileName}) in the current working directory.`,
236
+ success: (overrideFilePath) => `Default account override file created at ${overrideFilePath}`,
237
+ accountOverride: (overrideFilePath, accountOverride) => `An account override file already exists at ${overrideFilePath} associated with account "${accountOverride}".`,
238
+ prompts: {
239
+ replaceOverrideFile: 'Replace existing account override file?',
240
+ },
241
+ errors: {
242
+ globalConfigNotFound: `This command is only compatible with our new global config. Run ${uiCommandReference('hs account auth')} to get started.`,
243
+ accountNotFound: (configPath) => `The specified account could not be found in the config file ${configPath}`,
244
+ },
245
+ options: {
246
+ account: {
247
+ describe: 'Name or ID of the account to create an override file for.',
248
+ },
249
+ },
250
+ examples: {
251
+ default: (hsAccountFileName) => `Create a new default account override file (${hsAccountFileName}) in the current working directory`,
252
+ idBased: (hsAccountFileName) => `Create a new default account override file (${hsAccountFileName}) in the current working directory, using the account with accountId "1234567"`,
253
+ nameBased: (hsAccountFileName) => `Create a new default account override file (${hsAccountFileName}) in the current working directory, using the account with name "MyAccount"`,
254
+ },
194
255
  },
195
256
  },
196
257
  },
@@ -260,6 +321,10 @@ export const commands = {
260
321
  describe: 'Enable or disable automatic opening of the browser',
261
322
  },
262
323
  },
324
+ errors: {
325
+ invalidBoolean: (commandName, value) => `Invalid boolean value "${value}" for --${commandName}. Valid values are: true, false`,
326
+ invalidHTTPTimeout: `Invalid HTTP timeout value. Must be a number greater than 3000.`,
327
+ },
263
328
  },
264
329
  },
265
330
  },
@@ -280,6 +345,9 @@ export const commands = {
280
345
  pageTemplateScoreTitle: 'Page template scores',
281
346
  lighthouseLinksTitle: 'Lighthouse links',
282
347
  failedTemplatePathsTitle: 'The following templates could not be scored',
348
+ themeToCheckTitle: (themeToCheck, target) => `${themeToCheck} ${target} scores`,
349
+ themeTitle: (themeToCheck) => `Theme: ${themeToCheck}`,
350
+ poweredByLink: `Powered by ${uiLink('Google Lighthouse', 'https://developer.chrome.com/docs/lighthouse/overview/')}`,
283
351
  },
284
352
  errors: {
285
353
  targetOptionRequired: '[--target] is required for detailed view',
@@ -398,9 +466,9 @@ export const commands = {
398
466
  },
399
467
  },
400
468
  customObject: {
401
- betaMessage: `${chalk.bold('[BETA]')} The Custom Object CLI is currently in beta and is subject to change.`,
469
+ betaMessage: `The Custom Object CLI is currently in beta and is subject to change.`,
402
470
  describe: 'Commands for managing custom objects.',
403
- seeMoreLink: 'View our docs to find out more.',
471
+ seeMoreLink: `${uiLink('View our docs to find out more', 'https://developers.hubspot.com/docs/api-reference/crm-custom-objects-v3/guide#custom-objects-api-guide')}`,
404
472
  subcommands: {
405
473
  create: {
406
474
  describe: 'Create custom object instances.',
@@ -862,8 +930,9 @@ export const commands = {
862
930
  tailLogs: (functionPath, accountId) => `Waiting for log entries for "${functionPath}" on account "${accountId}".\n`,
863
931
  },
864
932
  mcp: {
865
- describe: 'Commands for managing HubSpot MCP servers',
933
+ describe: 'Commands for managing HubSpot MCP servers.',
866
934
  setup: {
935
+ describe: 'Setup the HubSpot development MCP servers.',
867
936
  installingDocSearch: 'Adding the docs-search mcp server',
868
937
  claudeCode: 'Claude Code',
869
938
  cursor: 'Cursor',
@@ -875,6 +944,7 @@ export const commands = {
875
944
  },
876
945
  success: (derivedTargets) => `You can now use the HubSpot CLI MCP Server in ${derivedTargets.join(', ')}. ${chalk.bold('You may need to restart these tools to apply the changes')}.`,
877
946
  errors: {
947
+ needsMcpAccess: (accountId) => `You must opt in to the developer MCP beta to use this feature on ${uiAccountDescription(accountId)}. Try again with a different account or ${uiLink('join the beta now', getProductUpdatesUrl('239890', accountId))}`,
878
948
  needsNode20: `This feature requires node >=20`,
879
949
  errorParsingJsonFIle: (filename, errorMessage) => `Unable to update ${chalk.bold(filename)} due to invalid JSON: ${errorMessage}`,
880
950
  },
@@ -941,6 +1011,7 @@ export const commands = {
941
1011
  selectLink: 'Select a link to open',
942
1012
  },
943
1013
  project: {
1014
+ describe: `Commands for managing projects. For more information visit our documentation https://developers.hubspot.com/docs/getting-started/quickstart`,
944
1015
  profile: {
945
1016
  describe: 'Commands for managing project profiles',
946
1017
  verboseDescribe: `Commands for managing project profiles\n\nProfiles are stored at the root of your project's source directory and they make configuration dynamic. Use them to couple specialized configurations of your project to specific HubSpot accounts.\n\nRun ${uiCommandReference('hs project profile add')} to get started!`,
@@ -1009,11 +1080,11 @@ export const commands = {
1009
1080
  dev: {
1010
1081
  describe: 'Start local dev for the current project.',
1011
1082
  logs: {
1012
- betaMessage: 'HubSpot projects local development',
1083
+ header: 'HubSpot projects local development',
1013
1084
  placeholderAccountSelection: 'Using default account as target account (for now)',
1014
1085
  accountTypeInformation: 'Testing in a developer test account is strongly recommended, but you can use a sandbox account if your plan allows you to create one.',
1015
- learnMoreMessageV3: `Learn more about ${uiLink('HubSpot projects local dev', 'https://hubspot.mintlify.io/en-us/developer-tooling/local-development/hubspot-cli/project-commands#start-a-local-development-server')} | ${uiLink('HubSpot account types', 'https://developers.hubspot.com/docs/getting-started/account-types')}`,
1016
- learnMoreMessageLegacy: uiLink('Learn more about the projects local dev server', 'https://developers.hubspot.com/docs/platform/project-cli-commands#start-a-local-development-server'),
1086
+ learnMoreMessageV3: `Learn more about ${uiLink('HubSpot projects local dev', 'https://developers.hubspot.com/docs/developer-tooling/local-development/hubspot-cli/project-commands#start-a-local-development-server')} | ${uiLink('HubSpot account types', 'https://developers.hubspot.com/docs/getting-started/account-types')}`,
1087
+ learnMoreMessageLegacy: uiLink('Learn more about the projects local dev server', 'https://developers.hubspot.com/docs/developer-tooling/local-development/hubspot-cli/project-commands#start-a-local-development-server'),
1017
1088
  profileProjectAccountExplanation: (accountId, profileName) => `Using account ${uiAccountDescription(accountId)} from profile ${chalk.bold(profileName)} for project upload`,
1018
1089
  defaultProjectAccountExplanation: (accountId) => `Using default account ${uiAccountDescription(accountId)} for project upload`,
1019
1090
  projectAccountFlagExplanation: (accountId) => `Using account ${uiAccountDescription(accountId)} provided by the --project-account flag for project upload`,
@@ -1024,7 +1095,7 @@ export const commands = {
1024
1095
  errors: {
1025
1096
  noProjectConfig: 'No project detected. Please run this command again from a project directory.',
1026
1097
  noAccount: (accountId) => `An error occurred while reading account ${uiAccountDescription(accountId)} from your config. Run ${uiCommandReference('hs auth')} to re-auth this account.`,
1027
- noAccountsInConfig: (authCommand) => `No accounts found in your config. Run ${chalk.bold(authCommand)} to configure a HubSpot account with the CLI.`,
1098
+ noAccountsInConfig: `No accounts found in your config. Run ${uiCommandReference('hs auth')} to configure a HubSpot account with the CLI.`,
1028
1099
  invalidProjectComponents: 'Projects cannot contain both private and public apps. Move your apps to separate projects before attempting local development.',
1029
1100
  noRunnableComponents: `No supported components were found in this project. Run ${uiCommandReference('hs project add')} to see a list of available components and add one to your project.`,
1030
1101
  accountNotCombined: `\nLocal development of unified apps is currently only compatible with accounts that are opted into the unified apps beta. Make sure that this account is opted in or switch accounts using ${uiCommandReference('hs account use')}.`,
@@ -1036,8 +1107,9 @@ export const commands = {
1036
1107
  },
1037
1108
  options: {
1038
1109
  profile: 'The profile to target during local dev',
1039
- projectAccount: 'The id of the account to upload your project to. Only compatible with platform versions 2025.2 and above.',
1040
- testingAccount: 'The id of the account to install apps and test on. Only compatible with platform versions 2025.2 and above.',
1110
+ projectAccount: 'The id of the account to upload your project to. Must be used with --testing-account. Supported on platform versions 2025.2 and newer.',
1111
+ testingAccount: 'The id of the account to install apps and test on. Must be used with --project-account. Supported on platform versions 2025.2 and newer.',
1112
+ account: 'The id of the account to upload your project to. Unsupported on platform versions 2025.2 and newer.',
1041
1113
  },
1042
1114
  },
1043
1115
  create: {
@@ -1069,7 +1141,7 @@ export const commands = {
1069
1141
  describe: 'Project name (cannot be changed)',
1070
1142
  },
1071
1143
  template: {
1072
- describe: 'The starting template',
1144
+ describe: 'The starting template. Only applies when platform version is less than 2025.2.',
1073
1145
  },
1074
1146
  templateSource: {
1075
1147
  describe: 'Path to custom GitHub repository from which to create project template',
@@ -1107,34 +1179,40 @@ export const commands = {
1107
1179
  describe: 'Project name (cannot be changed)',
1108
1180
  },
1109
1181
  },
1110
- header: {
1111
- text: 'This command will migrate an app to the projects framework. It will walk you through the fields required to complete the migration and download the project source code into a directory of your choosing.',
1112
- link: 'Learn more about migrating apps to the projects framework',
1113
- },
1114
- deprecationWarning: (oldCommand, newCommand) => `The ${oldCommand} command is deprecated and will be removed. Use ${newCommand} going forward.`,
1182
+ header: `This command will migrate an app to the projects framework. It will walk you through the fields required to complete the migration and download the project source code into a directory of your choosing.\n${uiLink('Learn more about migrating apps to the projects framework', 'https://developers.hubspot.com/docs/platform/migrate-a-public-app-to-projects')}`,
1183
+ deprecationWarning: (platformVersion) => `The ${uiCommandReference('hs project migrate-app')} command is deprecated and will be removed. Use ${uiCommandReference(`hs app migrate --platform-version=${platformVersion}`)} going forward.`,
1115
1184
  migrationStatus: {
1116
- inProgress: () => `Converting app configuration to ${chalk.bold('public-app.json')} component definition ...`,
1185
+ inProgress: () => `Converting app configuration to ${chalk.bold(LEGACY_PUBLIC_APP_FILE)} component definition ...`,
1117
1186
  success: () => `${chalk.bold('Your app was converted and build #1 is deployed')}`,
1118
- done: () => 'Converting app configuration to public-app.json component definition ... DONE',
1119
- failure: () => 'Converting app configuration to public-app.json component definition ... FAILED',
1187
+ done: () => `Converting app configuration to ${LEGACY_PUBLIC_APP_FILE} component definition ... DONE`,
1188
+ failure: () => `Converting app configuration to ${LEGACY_PUBLIC_APP_FILE} component definition ... FAILED`,
1120
1189
  },
1121
1190
  warning: {
1122
- title: () => `${chalk.bold('You are about to migrate an app to the projects framework')}`,
1123
- projectConversion: () => `${chalk.bold('The selected app will be converted to a project component.')}`,
1124
- appConfig: () => `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.`,
1125
- buildAndDeploy: 'This will create a new project with a single app component and immediately build and deploy it to your developer account (build #1).',
1126
- existingApps: () => `${chalk.bold('This will not affect existing app users or installs.')}`,
1191
+ title: `${chalk.bold('You are about to migrate an app to the projects framework')}\n`,
1192
+ projectConversion: `${chalk.bold('The selected app will be converted to a project component.')}\n`,
1193
+ appConfig: `All supported app configuration will be moved to the ${chalk.bold(LEGACY_PUBLIC_APP_FILE)} component definition file. Future updates to those features must be made through the project build and deploy pipeline, not the developer account UI.\n`,
1194
+ buildAndDeploy: 'This will create a new project with a single app component and immediately build and deploy it to your developer account (build #1).\n',
1195
+ existingApps: `${chalk.bold('This will not affect existing app users or installs.')}`,
1127
1196
  copyApp: 'We strongly recommend making a copy of your app to test this process in a development app before replacing production.',
1128
1197
  },
1129
1198
  migrationInterrupted: '\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.',
1130
1199
  createAppPrompt: "Proceed with migrating this app to a project component (this process can't be aborted)?",
1131
1200
  projectDetailsLink: 'View project details in your developer account',
1201
+ errors: {
1202
+ noAppsForProject: (projectName) => `No apps associated with project ${projectName}`,
1203
+ noAccountConfig: 'No account configuration found. Please check your account settings.',
1204
+ projectAlreadyExists: (projectName) => `A project with name ${projectName} already exists. Please choose another name.`,
1205
+ invalidApp: (appId) => `Could not migrate appId ${appId}. This app cannot be migrated at this time. Please choose another public app.`,
1206
+ migrationFailed: 'Migration Failed',
1207
+ notAllowedWithinProject: `This command cannot be run from within a project directory. Run the command again from outside a project directory. If you are trying to migrate a project, run ${uiCommandReference('hs project migrate')}`,
1208
+ },
1132
1209
  },
1133
1210
  migrate: {
1134
1211
  preamble: (platformVersion) => `This command will migrate an existing project to platformVersion ${platformVersion}. It will walk you through the fields required to complete the migration and download the new project source code into the project source directory. It will also copy all of your existing files to a new directory (archive) in case you need access to your old files later.`,
1135
1212
  describe: 'Migrate an existing project to the new version of the projects framework.',
1136
1213
  errors: {
1137
1214
  noProjectConfig: (command) => `No project detected. Please run this command again from a project directory. If you are trying to migrate an app, run ${command}`,
1215
+ noThemeMigrationAccess: (accountId) => `This project contains a CMS theme. You must opt in to theme migration beta to continue updating it on ${uiAccountDescription(accountId)}. Try again with a different account or ${uiLink('join the beta now', getProductUpdatesUrl('253920', accountId))}`,
1138
1216
  },
1139
1217
  examples: {
1140
1218
  default: 'Migrate an existing project to the new version of the projects framework.',
@@ -1154,15 +1232,16 @@ export const commands = {
1154
1232
  },
1155
1233
  },
1156
1234
  cloneStatus: {
1157
- inProgress: () => `Cloning app configuration to ${chalk.bold('public-app.json')} component definition ...`,
1158
- done: 'Cloning app configuration to public-app.json component definition ... DONE',
1235
+ inProgress: `Cloning app configuration to ${chalk.bold(LEGACY_PUBLIC_APP_FILE)} component definition ...`,
1236
+ done: `Cloning app configuration to ${LEGACY_PUBLIC_APP_FILE} component definition ... DONE`,
1159
1237
  success: (dest) => `Your cloned project was created in ${dest}`,
1160
- failure: 'Cloning app configuration to public-app.json component definition ... FAILED',
1238
+ failure: `Cloning app configuration to ${LEGACY_PUBLIC_APP_FILE} component definition ... FAILED`,
1161
1239
  },
1162
1240
  errors: {
1163
1241
  invalidAccountTypeTitle: () => `${chalk.bold('Developer account not targeted')}`,
1164
1242
  invalidAccountTypeDescription: (useCommand, authCommand) => `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.`,
1165
1243
  couldNotWriteConfigPath: (configPath) => `Failed to write project config at ${configPath}`,
1244
+ noAccountConfig: (accountId) => `No account config found for ${uiAccountDescription(accountId)}`,
1166
1245
  },
1167
1246
  },
1168
1247
  add: {
@@ -1192,7 +1271,7 @@ export const commands = {
1192
1271
  maxExceeded: (maxCount) => `This project has the maximum allowed(${maxCount})`,
1193
1272
  authTypeNotAllowed: (authType) => `Auth type '${authType}' not allowed.`,
1194
1273
  distributionNotAllowed: (dist) => `Distribution '${dist}' not allowed.`,
1195
- portalDoesNotHaveAccessToThisFeature: (accountId) => `The account ${uiAccountDescription(accountId)} does not have access to this feature`,
1274
+ portalDoesNotHaveAccessToThisFeature: (accountId) => `The account ${uiAccountDescription(accountId)} does not have access to this feature.`,
1196
1275
  locationInProject: 'This command must be run from within a project directory.',
1197
1276
  failedToFetchComponentList: 'Failed to fetch the list of available features. Please try again later.',
1198
1277
  projectContainsPublicApp: 'This project contains a public app. This command is currently only compatible with projects that contain private apps.',
@@ -1269,7 +1348,7 @@ export const commands = {
1269
1348
  },
1270
1349
  logs: {
1271
1350
  showingLogs: 'Showing logs for:',
1272
- hubspotLogsDirectLink: 'View function logs in HubSpot',
1351
+ hubspotLogsDirectLink: (url) => `${uiLink('View function logs in HubSpot', url)}`,
1273
1352
  noLogsFound: (name) => `No logs were found for "${name}"`,
1274
1353
  },
1275
1354
  table: {
@@ -1310,11 +1389,11 @@ export const commands = {
1310
1389
  logs: {
1311
1390
  buildSucceeded: (buildId) => `Build #${buildId} succeeded\n`,
1312
1391
  readyToGoLive: '🚀 Ready to take your project live?',
1313
- runCommand: (command) => `Run \`${command}\``,
1314
- autoDeployDisabled: (deployCommand) => `Automatic deploys are disabled for this project. Run ${deployCommand} to deploy this build.`,
1392
+ runCommand: (command) => `Run \`${uiCommandReference(command)}\``,
1393
+ autoDeployDisabled: (deployCommand) => `Automatic deploys are disabled for this project. Run ${uiCommandReference(deployCommand)} to deploy this build.`,
1315
1394
  },
1316
1395
  errors: {
1317
- projectLockedError: () => `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.`,
1396
+ projectLockedError: `Your project is locked. This may mean that another user is running the ${uiCommandReference('hs project dev')} command for this project. If this is you, unlock the project in Projects UI.`,
1318
1397
  },
1319
1398
  options: {
1320
1399
  forceCreate: {
@@ -1323,6 +1402,9 @@ export const commands = {
1323
1402
  message: {
1324
1403
  describe: 'Add a message when you upload your project and create a build',
1325
1404
  },
1405
+ profile: {
1406
+ describe: 'Profile to target for this upload',
1407
+ },
1326
1408
  },
1327
1409
  },
1328
1410
  watch: {
@@ -1360,6 +1442,7 @@ export const commands = {
1360
1442
  uploadFailed: (remotePath, filePath) => `Failed to upload file "${filePath}" to "${remotePath}"`,
1361
1443
  deleteFileFailed: (remotePath) => `Failed to delete file "${remotePath}"`,
1362
1444
  deleteFolderFailed: (remotePath) => `Failed to delete folder "${remotePath}"`,
1445
+ v3ApiError: (platformVersion) => `${uiCommandReference('hs project watch')} is not supported for platform version '${platformVersion}' use ${uiCommandReference('hs project dev')} instead to develop locally. ${uiLink('How to develop locally', 'https://developers.hubspot.com/docs/guides/crm/ui-extensions/local-development')}`,
1363
1446
  },
1364
1447
  },
1365
1448
  download: {
@@ -1374,6 +1457,7 @@ export const commands = {
1374
1457
  errors: {
1375
1458
  downloadFailed: 'Something went wrong downloading the project',
1376
1459
  projectNotFound: (projectName, accountId) => `Your project ${chalk.bold(projectName)} could not be found in ${accountId}`,
1460
+ noBuildIdToDownload: 'No build ID available for download',
1377
1461
  },
1378
1462
  warnings: {
1379
1463
  cannotDownloadWithinProject: 'Cancelling project download. Please run the command again outside the context of an existing project.',
@@ -1421,8 +1505,8 @@ export const commands = {
1421
1505
  addingDependenciesToLocation: (dependencies, directory) => `Installing ${dependencies} in ${directory}`,
1422
1506
  installingDependenciesFailed: (directory) => `Installing dependencies for ${directory} failed`,
1423
1507
  noProjectConfig: 'No project detected. Run this command from a project directory.',
1424
- noPackageJsonInProject: (projectName, link) => `No dependencies to install. The project ${projectName} folder might be missing component or subcomponent files. ${link}`,
1425
- packageManagerNotInstalled: (packageManager, link) => `This command depends on ${packageManager}, install ${chalk.bold(link)}`,
1508
+ noPackageJsonInProject: (projectName) => `No dependencies to install. The project ${projectName} folder might be missing component or subcomponent files. ${uiLink('Learn how to create a project from scratch', 'https://developers.hubspot.com/docs/apps/developer-platform/build-apps/create-an-app#customize-a-new-project-using-the-cli')}`,
1509
+ packageManagerNotInstalled: (packageManager) => `This command depends on ${packageManager}, install ${uiLink(packageManager, 'https://docs.npmjs.com/downloading-and-installing-node-js-and-npm')}`,
1426
1510
  },
1427
1511
  validate: {
1428
1512
  describe: 'Validate the project before uploading',
@@ -1454,6 +1538,30 @@ export const commands = {
1454
1538
  describe: 'Commands for managing sandboxes.',
1455
1539
  subcommands: {
1456
1540
  create: {
1541
+ describe: 'Create a sandbox account.',
1542
+ failure: {
1543
+ noAccountConfig: (accountId) => `No account config found for ${uiAccountDescription(accountId)}. Run ${uiCommandReference('hs auth')} to add it.`,
1544
+ invalidAccountType: (accountType, accountName) => `Sandboxes must be created from a production account. Your current default account ${chalk.bold(accountName)} is a ${chalk.bold(accountType)}. \n- Run ${uiCommandReference('hs accounts use')} to switch to your default account to your production account. \n- Run ${uiCommandReference('hs auth')} to connect a production account to the HubSpot CLI.\n`,
1545
+ noSandboxAccountConfig: (accountId) => `No account config found for ${uiAccountDescription(accountId)}. Run ${uiCommandReference('hs auth')} to add the sandbox account.`,
1546
+ optionMissing: {
1547
+ type: 'Type is required when using --force. Use --type=developer or --type=standard.',
1548
+ name: 'Name is required when using --force. Use --name=YourSandboxName.',
1549
+ },
1550
+ },
1551
+ options: {
1552
+ force: {
1553
+ describe: 'Skips all prompts and uses provided options.',
1554
+ },
1555
+ name: {
1556
+ describe: 'Name of the sandbox account to create',
1557
+ },
1558
+ type: {
1559
+ describe: 'Type of sandbox to create (developer or standard)',
1560
+ },
1561
+ },
1562
+ examples: {
1563
+ default: 'Creates a standard sandbox named MySandboxAccount.',
1564
+ },
1457
1565
  developer: {
1458
1566
  loading: {
1459
1567
  add: (accountName) => `Creating developer sandbox ${chalk.bold(accountName)}`,
@@ -1496,28 +1604,28 @@ export const commands = {
1496
1604
  delete: {
1497
1605
  describe: 'Delete a sandbox account.',
1498
1606
  debug: {
1499
- deleting: (account) => `Deleting sandbox account "${account}"`,
1607
+ deleting: (account) => `Deleting sandbox account "${uiAccountDescription(account)}"`,
1500
1608
  error: 'Error deleting sandbox account:',
1501
1609
  },
1502
1610
  examples: {
1503
1611
  default: 'Deletes the sandbox account named MySandboxAccount.',
1504
1612
  },
1505
- confirm: (account) => `Delete sandbox ${chalk.bold(account)}? All data for this sandbox will be permanently deleted.`,
1506
- defaultAccountWarning: (account) => `The sandbox ${chalk.bold(account)} is currently set as the default account.`,
1613
+ confirm: (account) => `Delete sandbox ${uiAccountDescription(account)}? All data for this sandbox will be permanently deleted.`,
1614
+ defaultAccountWarning: (account) => `The sandbox ${uiAccountDescription(account)} is currently set as the default account.`,
1507
1615
  success: {
1508
1616
  delete: (account, sandboxHubId) => `Sandbox "${account}" with portalId "${sandboxHubId}" was deleted successfully.`,
1509
1617
  deleteDefault: (account, sandboxHubId) => `Sandbox "${account}" with portalId "${sandboxHubId}" was deleted successfully and removed as the default account.`,
1510
1618
  configFileUpdated: (account, configFilename) => `Removed account ${account} from ${configFilename}.`,
1511
1619
  },
1512
1620
  failure: {
1513
- invalidUser: (accountName, parentAccountName) => `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}.`,
1621
+ invalidUser: (account, parentAccount) => `Couldn't delete ${uiAccountDescription(account)} because your account has been removed from ${uiAccountDescription(parentAccount)} or your permission set doesn't allow you to delete the sandbox. To update your permissions, contact a super admin in ${uiAccountDescription(parentAccount)}.`,
1514
1622
  noAccount: 'No account specified. Specify an account by using the --account flag.',
1515
- noSandboxAccounts: (authCommand) => `There are no sandboxes connected to the CLI. To add a sandbox, run ${authCommand}.`,
1623
+ noSandboxAccounts: `There are no sandboxes connected to the CLI. To add a sandbox, run ${uiCommandReference('hs auth')}.`,
1516
1624
  noSandboxAccountId: "This sandbox can't be deleted from the CLI because we could not find the associated sandbox account.",
1517
- noParentAccount: (authCommand) => `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.`,
1518
- objectNotFound: (account) => `Sandbox ${chalk.bold(account)} may have been deleted through the UI. The account has been removed from the config.`,
1519
- noParentPortalAvailable: (command, url) => `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)}.`,
1520
- invalidKey: (account, authCommand) => `Your personal access key for account ${chalk.bold(account)} is inactive. To re-authenticate, please run ${authCommand}.`,
1625
+ noParentAccount: `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 ${uiCommandReference('hs auth')} and add the parent account.`,
1626
+ objectNotFound: (account) => `Sandbox ${uiAccountDescription(account)} may have been deleted through the UI. The account has been removed from the config.`,
1627
+ noParentPortalAvailable: (command, url) => `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 ${uiCommandReference(command)}. You can also delete the sandbox from the HubSpot management tool: ${chalk.bold(url)}.`,
1628
+ invalidKey: (account) => `Your personal access key for account ${uiAccountDescription(account)} is inactive. To re-authenticate, please run ${uiCommandReference('hs auth')}.`,
1521
1629
  },
1522
1630
  options: {
1523
1631
  force: {
@@ -1545,33 +1653,17 @@ export const commands = {
1545
1653
  instructions: (accountName, url) => `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`,
1546
1654
  },
1547
1655
  },
1656
+ confirm: {
1657
+ syncContactRecords: {
1658
+ standard: 'Copy up to 5000 most recently updated contacts? This includes up to 100 of each of the following: associated deals, tickets, and companies.',
1659
+ developer: 'Include up to 100 most recently updated contacts? This includes up to 100 of each of the following: associated deals, tickets, and companies. This can be done once per sandbox.',
1660
+ },
1661
+ },
1548
1662
  },
1549
1663
  },
1550
1664
  app: {
1551
1665
  describe: 'Commands for managing apps.',
1552
1666
  subcommands: {
1553
- install: {
1554
- describe: 'Install an OAuth app into a test account.',
1555
- options: {
1556
- appUid: 'The uid of the app to install',
1557
- projectName: 'The name of the project that contains the app',
1558
- },
1559
- positionals: {
1560
- testAccountId: 'The id of the test account to install the app into',
1561
- },
1562
- errors: {
1563
- mustSpecifyProjectName: `You must specify a project name. Use the ${uiCommandReference('--project-name')} flag to specify the project name or run this command from within a project directory.`,
1564
- noAppUidFound: `No app uid found. Please specify the app uid with the ${uiCommandReference('--app-uid')} flag or run this command from within a project that contains an app.`,
1565
- appMustBeOauth: 'This command only supports installing oauth apps. Please specify an app with oauth auth type.',
1566
- },
1567
- polling: {
1568
- start: 'Installing app...',
1569
- success: 'App installed successfully',
1570
- failure: 'App installation failed',
1571
- error: 'Error installing app',
1572
- },
1573
- example: 'Install the app with uid my-app-uid from the project named "my-project" into the target account with id 1234567890',
1574
- },
1575
1667
  secret: {
1576
1668
  describe: 'Commands for managing secrets.',
1577
1669
  subcommands: {
@@ -1644,7 +1736,7 @@ export const commands = {
1644
1736
  describe: 'Create a new secret.',
1645
1737
  errors: {
1646
1738
  add: (secretName) => `The secret "${secretName}" was not added`,
1647
- alreadyExists: (secretName, command) => `The secret "${secretName}" already exists, it's value can be modified with ${command}`,
1739
+ alreadyExists: (secretName) => `The secret "${secretName}" already exists, it's value can be modified with ${uiCommandReference('hs secret update')}`,
1648
1740
  },
1649
1741
  positionals: {
1650
1742
  name: {
@@ -1652,7 +1744,7 @@ export const commands = {
1652
1744
  },
1653
1745
  },
1654
1746
  success: {
1655
- add: (secretName, accountIdentifier) => `The secret "${secretName}" was added to the HubSpot account: ${accountIdentifier}`,
1747
+ add: (secretName, accountId) => `The secret "${secretName}" was added to the HubSpot account: ${uiAccountDescription(accountId)}`,
1656
1748
  },
1657
1749
  },
1658
1750
  delete: {
@@ -1670,7 +1762,7 @@ export const commands = {
1670
1762
  },
1671
1763
  },
1672
1764
  success: {
1673
- delete: (secretName, accountIdentifier) => `The secret "${secretName}" was deleted from the HubSpot account: ${accountIdentifier}`,
1765
+ delete: (secretName, accountId) => `The secret "${secretName}" was deleted from the HubSpot account: ${uiAccountDescription(accountId)}`,
1674
1766
  },
1675
1767
  },
1676
1768
  list: {
@@ -1693,7 +1785,7 @@ export const commands = {
1693
1785
  },
1694
1786
  },
1695
1787
  success: {
1696
- update: (secretName, accountIdentifier) => `The secret "${secretName}" was updated in the HubSpot account: ${accountIdentifier}`,
1788
+ update: (secretName, accountId) => `The secret "${secretName}" was updated in the HubSpot account: ${accountId}`,
1697
1789
  updateExplanation: 'Existing serverless functions will start using this new value within 10 seconds.',
1698
1790
  },
1699
1791
  },
@@ -1922,18 +2014,41 @@ export const commands = {
1922
2014
  example: (name) => `Create a test account config file with the name "${name}"`,
1923
2015
  },
1924
2016
  delete: {
1925
- describe: 'Delete a test account config file.',
2017
+ describe: 'Delete a test account from your HubSpot account and CLI config',
1926
2018
  pathPrompt: '[--path] What is the path to the test account config?',
2019
+ info: {
2020
+ deletionCanceled: 'Deletion canceled by user',
2021
+ accountNotFoundWithId: (id) => `No account was found with ID ${id}`,
2022
+ replaceDefaultAccount: (testAccountId, parentAccountName) => `The removed test account ${chalk.bold(testAccountId)} was the default account. Replaced default account to parent account: ${chalk.bold(parentAccountName)}`,
2023
+ },
2024
+ prompts: {
2025
+ selectTestAccounts: 'Select test account(s) to delete',
2026
+ confirmDeletion: 'All data for the account will be permanently deleted. Any connected apps will have their access tokens revoked. Do you wish to proceed?',
2027
+ },
1927
2028
  errors: {
1928
- failedToDelete: 'Failed to delete test account',
2029
+ failedToDelete: (testAccountToDelete) => `Failed to delete test account with ID ${testAccountToDelete}`,
2030
+ failedToSelectAccount: 'Failed to select a test account to delete',
2031
+ noAccountsToDelete: (accountId) => `There are no test accounts associated with ${uiAccountDescription(accountId)} to delete. Try running ${uiCommandReference('hs account use')} to change your default account`,
2032
+ failedToDeleteFromConfig: (testAccountToDelete) => `Failed to delete test account with ID ${testAccountToDelete} from the CLI config`,
2033
+ failedToFetchTestAccounts: 'Failed to fetch developer test accounts',
2034
+ testAccountNotFound: (nameOrId) => `Test account${nameOrId ? ` ${chalk.bold(nameOrId)}` : ''} not found in config. \nTry running ${uiCommandReference('hs account auth')} to add the account to config or visit ${uiLink('developer test accounts', 'https://app.hubspot.com/l/developer-test-accounts/')} to delete the test account.`,
2035
+ parentAccountNotFound: (testAccountId) => `Parent account of test account ${chalk.bold(testAccountId)} not found in config. \nTry running ${uiCommandReference('hs account auth')} to add the parent account to config or visit ${uiLink('developer test accounts', 'https://app.hubspot.com/l/developer-test-accounts/')} to delete the test account.`,
1929
2036
  },
1930
2037
  success: {
1931
- testAccountDeleted: (testAccountId) => `Test account with id ${testAccountId} successfully deleted`,
2038
+ testAccountDeletedFromHubSpot: (testAccountToDelete) => `Successfully deleted test account with ID ${testAccountToDelete}`,
2039
+ testAccountDeletedFromConfig: (accountId) => `Successfully deleted test account with ID ${accountId} from the CLI config`,
1932
2040
  },
1933
- positionals: {
1934
- testAccountId: 'The id of the test account',
2041
+ options: {
2042
+ name: 'The name of the test account (in your CLI config) to delete',
2043
+ id: 'The id of the test account',
2044
+ },
2045
+ examples: {
2046
+ withPositionalID: (testAccountToDelete) => `Delete a test account with id "${testAccountToDelete}" using positional argument`,
2047
+ withPositionalName: (testAccountToDelete) => `Delete a test account with name "${testAccountToDelete}" using positional argument`,
2048
+ withID: (testAccountToDelete) => `Delete a test account with the id "${testAccountToDelete}"`,
2049
+ withName: (testAccountToDelete) => `Delete a test account with the name "${testAccountToDelete}"`,
2050
+ withoutId: 'Delete a test account via a prompt',
1935
2051
  },
1936
- example: (testAccountId) => `Delete a test account with the id "${testAccountId}"`,
1937
2052
  },
1938
2053
  },
1939
2054
  secrets: {
@@ -2610,8 +2725,13 @@ export const lib = {
2610
2725
  LocalDevProcess: {
2611
2726
  projectConfigMismatch: `Unable to upload project. The project config has been modified since starting ${uiCommandReference('hs project dev')}.`,
2612
2727
  uploadInitiated: 'Project upload initiated from Local Dev UI.',
2728
+ deployInitiated: 'Project deploy initiated from Local Dev UI.',
2613
2729
  uploadFailed: 'Project upload failed. To proceed with local development, fix any necessary errors, then re-upload your project.',
2730
+ deployFailed: 'Project deploy failed. To proceed with local development, fix any necessary errors, then re-deploy your project.',
2614
2731
  uploadSuccess: 'Project upload completed successfully. Resuming local dev...',
2732
+ uploadSuccessAutoDeployDisabled: 'Project upload completed successfully, but auto-deploy is disabled for this project. Deploy your latest build to proceed with local development.',
2733
+ deploySuccess: 'Project deploy completed successfully. Resuming local dev...',
2734
+ noBuildToDeploy: 'Error deploying project. No build was found to deploy.',
2615
2735
  },
2616
2736
  localDevHelpers: {
2617
2737
  project: {
@@ -2620,7 +2740,7 @@ export const lib = {
2620
2740
  checking: 'Checking if your deployed build is up to date...',
2621
2741
  upToDate: 'Deployed build is up to date.',
2622
2742
  notUpToDate: `Your project contains undeployed local changes.`,
2623
- notUpToDateExplanation: (profile) => `Run ${uiCommandReference(`hs project upload ${profile ? `--profile ${profile}` : ''}`)} to upload these changes to HubSpot, then re-run ${uiCommandReference(`hs project dev ${profile ? `--profile ${profile}` : ''}`)} to continue local development.`,
2743
+ notUpToDateExplanation: (profile) => `Run ${uiCommandReference(`hs project upload${profile ? ` --profile ${profile}` : ''}`)} to upload these changes to HubSpot, then re-run ${uiCommandReference(`hs project dev${profile ? ` --profile ${profile}` : ''}`)} to continue local development.`,
2624
2744
  },
2625
2745
  createNewProjectForLocalDev: {
2626
2746
  projectMustExistExplanation: (projectName, accountId) => `The project ${projectName} does not exist in the target account ${uiAccountDescription(accountId)}. This command requires the project to exist in the target account.`,
@@ -2636,6 +2756,11 @@ export const lib = {
2636
2756
  projectLockedError: '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.',
2637
2757
  genericError: `An error occurred while creating the initial build for this project. Run ${uiCommandReference('hs project upload')} to try again.`,
2638
2758
  },
2759
+ checkAndInstallDependencies: {
2760
+ checkingDependencies: 'Checking for missing or updated dependencies...',
2761
+ dependenciesUpToDate: 'All dependencies are up to date',
2762
+ dependenciesFailure: 'Failed to check or install dependencies',
2763
+ },
2639
2764
  },
2640
2765
  account: {
2641
2766
  checkIfDefaultAccountIsSupported: {
@@ -2652,7 +2777,7 @@ export const lib = {
2652
2777
  notAuthedError: (parentAccountId, accountIdentifier) => `To develop this project locally, run ${uiCommandReference(`hs auth --account=${parentAccountId}`)} to authenticate the App Developer Account ${parentAccountId} associated with ${accountIdentifier}.`,
2653
2778
  },
2654
2779
  selectAccountTypePrompt: {
2655
- message: '[--testing-account] Choose the type of account to test on',
2780
+ message: 'Choose the type of account to test on',
2656
2781
  developerTestAccountOption: 'Test on a developer test account (recommended)',
2657
2782
  sandboxAccountOption: 'Test on a sandbox account',
2658
2783
  sandboxAccountOptionDisabled: 'Disabled - requires access to sandbox accounts',
@@ -2777,6 +2902,7 @@ export const lib = {
2777
2902
  compressed: (byteCount) => `Project files compressed: ${byteCount} bytes`,
2778
2903
  compressing: (path) => `Compressing build files to "${path}"`,
2779
2904
  fileFiltered: (filename) => `Ignore rule triggered for "${filename}"`,
2905
+ legacyFileDetected: (filename, platformVersion) => `The ${chalk.bold(filename)} file is not supported on platform version ${chalk.bold(platformVersion)} and will be ignored.`,
2780
2906
  },
2781
2907
  },
2782
2908
  boxen: {
@@ -2793,13 +2919,15 @@ export const lib = {
2793
2919
  viewImportLink: (baseUrl, accountId, importId) => `Data import currently processing. You can view the status of your import ${uiLink('here', `${baseUrl}/import/${accountId}/post/${importId}`)}`,
2794
2920
  },
2795
2921
  ui: {
2796
- betaTag: chalk.bold('[BETA]'),
2922
+ betaTag: '[BETA]',
2923
+ betaTagWithStyle: chalk.bold('[BETA]'),
2797
2924
  betaWarning: {
2798
2925
  header: chalk.yellow('***************************** WARNING ****************************'),
2799
2926
  footer: chalk.yellow('******************************************************************'),
2800
2927
  },
2801
2928
  infoTag: chalk.bold('[INFO]'),
2802
- deprecatedTag: chalk.bold('[DEPRECATED]'),
2929
+ deprecatedTag: '[DEPRECATED]',
2930
+ deprecatedTagWithStyle: chalk.bold('[DEPRECATED]'),
2803
2931
  errorTag: chalk.bold('[ERROR]'),
2804
2932
  deprecatedMessage: (command, url) => `The ${command} command is deprecated and will be disabled soon. ${url}`,
2805
2933
  deprecatedDescription: (message, command, url) => `${message}. The ${command} command is deprecated and will be disabled soon. ${url}`,
@@ -2857,6 +2985,9 @@ export const lib = {
2857
2985
  command: 'hs project install-deps',
2858
2986
  message: (command) => `${command} - Install all project dependencies`,
2859
2987
  },
2988
+ projectCommandTip: {
2989
+ message: 'Tip: All project commands must be run from within a project directory',
2990
+ },
2860
2991
  sampleProjects: {
2861
2992
  linkText: "HubSpot's sample projects",
2862
2993
  url: 'https://developers.hubspot.com/docs/platform/sample-projects?utm_source=cli&utm_content=project_create_whats_next',
@@ -2895,25 +3026,26 @@ export const lib = {
2895
3026
  },
2896
3027
  setAllowUsageTracking: {
2897
3028
  fieldName: 'usage tracking',
2898
- success: (isEnabled) => `Allow usage tracking set to: "${isEnabled}"`,
3029
+ success: (isEnabled) => `Successfully updated ${chalk.bold('allow usage tracking')} to ${chalk.bold(isEnabled)}`,
2899
3030
  },
2900
3031
  setAllowAutoUpdates: {
2901
3032
  fieldName: 'auto updates',
2902
- success: (isEnabled) => `Allow auto updates set to: "${isEnabled}"`,
3033
+ success: (isEnabled) => `Successfully updated ${chalk.bold('allow auto updates')} to ${chalk.bold(isEnabled)}`,
2903
3034
  },
2904
3035
  setDefaultCmsPublishMode: {
2905
3036
  promptMessage: 'Select CMS publish mode to be used as the default',
2906
3037
  error: (validModes) => `The provided CMS publish mode is invalid. Valid values are ${validModes}.`,
2907
- success: (mode) => `Default mode updated to: ${mode}`,
3038
+ success: (mode) => `Successfully updated ${chalk.bold('default CMS publish mode')} to ${chalk.bold(mode)}`,
2908
3039
  },
2909
3040
  setHttpTimeout: {
2910
3041
  promptMessage: 'Enter http timeout duration',
2911
- success: (timeout) => `HTTP timeout set to: ${timeout}`,
3042
+ success: (timeout) => `Successfully updated ${chalk.bold('HTTP timeout')} to ${chalk.bold(timeout)}`,
3043
+ error: (timeout) => `Invalid HTTP timeout value "${timeout}". Must be a number greater than 3000.`,
2912
3044
  },
2913
3045
  setAutoOpenBrowser: {
2914
3046
  fieldName: 'auto open browser',
2915
- enabled: 'Auto opening your browser has been enabled',
2916
- disabled: 'Auto opening your browser has been disabled',
3047
+ enabled: `Successfully updated ${chalk.bold('auto open browser')} to ${chalk.bold('enabled')}`,
3048
+ disabled: `Successfully updated ${chalk.bold('auto open browser')} to ${chalk.bold('disabled')}`,
2917
3049
  },
2918
3050
  },
2919
3051
  commonOpts: {
@@ -2951,6 +3083,11 @@ export const lib = {
2951
3083
  },
2952
3084
  },
2953
3085
  prompts: {
3086
+ promptUtils: {
3087
+ errors: {
3088
+ noSelectableChoices: 'Exiting prompt because no selectable choices are available',
3089
+ },
3090
+ },
2954
3091
  importDataFilePathPrompt: {
2955
3092
  promptContext: `To view the JSON schema for data imports, visit ${uiLink('the docs', 'https://developers.hubspot.com/docs/guides/api/crm/imports')}`,
2956
3093
  promptMessage: '[--file-path] Select the JSON file that will be used to import your data.',
@@ -2967,10 +3104,10 @@ export const lib = {
2967
3104
  projectDevTargetAccountPrompt: {
2968
3105
  createNewSandboxOption: '<Test on a new development sandbox>',
2969
3106
  createNewDeveloperTestAccountOption: '<Test on a new developer test account>',
2970
- chooseDefaultAccountOption: () => `<${chalk.bold('❗')} Test on this production account ${chalk.bold('❗')}>`,
2971
- promptMessage: (accountType, accountIdentifier) => `[--account] Choose a ${accountType} under ${accountIdentifier} to test with:`,
3107
+ chooseDefaultAccountOption: `<${chalk.bold('❗')} Test on this production account ${chalk.bold('❗')}>`,
3108
+ promptMessage: (accountType, accountIdentifier) => `Choose a ${accountType} under ${accountIdentifier} to test with:`,
2972
3109
  sandboxLimit: (limit) => `Your account reached the limit of ${limit} development sandboxes`,
2973
- sandboxLimitWithSuggestion: (limit, authCommand) => `Your account reached the limit of ${limit} development sandboxes. Run ${authCommand} to add an existing one to the config.`,
3110
+ sandboxLimitWithSuggestion: (limit, authCommand) => `Your account reached the limit of ${limit} development sandboxes. Run ${uiCommandReference(authCommand)} to add an existing one to the config.`,
2974
3111
  developerTestAccountLimit: (limit) => `Your account reached the limit of ${limit} developer test accounts.`,
2975
3112
  confirmDefaultAccount: (accountName, accountType) => `Continue testing on ${chalk.bold(`${accountName} (${accountType})`)}? (Y/n)`,
2976
3113
  confirmUseExistingDeveloperTestAccount: (accountName) => `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.`,
@@ -3110,8 +3247,8 @@ export const lib = {
3110
3247
  selectAppIdClone: (accountName) => `[--appId] Choose an app under ${accountName} to clone:`,
3111
3248
  errors: {
3112
3249
  noAccountId: 'An account ID is required to select an app.',
3113
- noAppsMigration: () => `${chalk.bold('No apps to migrate')}`,
3114
- noAppsClone: () => `${chalk.bold('No apps to clone')}`,
3250
+ noAppsMigration: `${chalk.bold('No apps to migrate')}`,
3251
+ noAppsClone: `${chalk.bold('No apps to clone')}`,
3115
3252
  noAppsMigrationMessage: (accountName) => `The selected developer account ${chalk.bold(accountName)} doesn't have any apps that can be migrated to the projects framework.`,
3116
3253
  noAppsCloneMessage: (accountName) => `The selected developer account ${chalk.bold(accountName)} doesn't have any apps that can be cloned to the projects framework.`,
3117
3254
  errorFetchingApps: 'There was an error fetching public apps.',
@@ -3127,10 +3264,12 @@ export const lib = {
3127
3264
  },
3128
3265
  projectAddPrompt: {
3129
3266
  selectType: '[--type] Select an app feature to add: ',
3267
+ selectFeatures: '[--features] Select an app feature to add: ',
3130
3268
  enterName: '[--name] Give your component a name: ',
3131
3269
  errors: {
3132
3270
  nameRequired: 'A component name is required',
3133
3271
  componentRequired: 'Must select a feature to add',
3272
+ noSelectableChoices: 'There are no available features that can be added to this project',
3134
3273
  invalidType: (type) => `[--type] Could not find type "${type}". Please choose an available type:`,
3135
3274
  cannotAddFeature: (feature, reasons) => `Cannot Add feature '${feature}' to project for the following reasons: ${reasons}`,
3136
3275
  },
@@ -3166,7 +3305,7 @@ export const lib = {
3166
3305
  enterName: '[--project] Enter project name:',
3167
3306
  errors: {
3168
3307
  invalidName: 'You entered an invalid name. Please try again.',
3169
- projectDoesNotExist: (projectName, accountIdentifier) => `Project ${chalk.bold(projectName)} could not be found in "${accountIdentifier}"`,
3308
+ projectDoesNotExist: (projectName, accountId) => `Project ${chalk.bold(projectName)} could not be found in "${uiAccountDescription(accountId)}"`,
3170
3309
  },
3171
3310
  },
3172
3311
  previewPrompt: {
@@ -3226,11 +3365,11 @@ export const lib = {
3226
3365
  },
3227
3366
  failure: {
3228
3367
  invalidUser: (accountName, parentAccountName) => `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)}.`,
3229
- limit: (accountName, limit) => `${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.`,
3230
- alreadyInConfig: (accountName, limit) => `${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')}.`,
3368
+ limit: (accountName, limit) => `${chalk.bold(accountName)} reached the limit of ${limit} developer test accounts. \n- To connect a developer test account to your HubSpot CLI, run ${uiCommandReference('hs auth')} and follow the prompts.`,
3369
+ alreadyInConfig: (accountName, limit) => `${chalk.bold(accountName)} reached the limit of ${limit} developer test accounts. \n- To use an existing developer test account, run ${uiCommandReference('hs accounts use')}.`,
3231
3370
  scopes: {
3232
3371
  message: "The personal access key you provided doesn't include developer test account permissions.",
3233
- instructions: (accountName, url) => `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`,
3372
+ instructions: (accountName, url) => `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 ${uiCommandReference('hs auth')} and entering the new key.\n`,
3234
3373
  },
3235
3374
  },
3236
3375
  },
@@ -3247,14 +3386,13 @@ export const lib = {
3247
3386
  configFileUpdated: (accountName, authType) => `Account "${accountName}" updated using "${authType}"`,
3248
3387
  },
3249
3388
  failure: {
3250
- invalidUser: (accountName, parentAccountName) => `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)}.`,
3251
- limit: (accountName, limit) => `${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.`,
3252
- alreadyInConfig: (accountName, limit) => `${chalk.bold(accountName)} reached the limit of ${limit} developer sandboxes. \n- To use an existing developer sandbox, run ${chalk.bold('hs accounts use')}.`,
3389
+ limit: (accountId, limit, link) => `${uiAccountDescription(accountId)} reached the limit of ${limit} developer sandboxes. \n- View sandbox details at ${uiLink('View sandbox details at', link)} \n- To connect a developer sandbox to your HubSpot CLI, run ${uiCommandReference('hs auth')} and follow the prompts.`,
3390
+ alreadyInConfig: (accountId, limit) => `${uiAccountDescription(accountId)} reached the limit of ${limit} developer sandboxes. \n- To use an existing developer sandbox, run ${uiCommandReference('hs accounts use')}. \n- To delete an existing sandbox, run ${uiCommandReference('hs sandbox delete')}.`,
3391
+ generic: 'An error occurred while creating a developer sandbox',
3253
3392
  scopes: {
3254
3393
  message: "The personal access key you provided doesn't include developer sandbox permissions.",
3255
- instructions: (accountName, url) => `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`,
3394
+ instructions: (account, url) => `To update CLI permissions for "${chalk.bold(account)}": \n- ${uiLink('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 ${uiCommandReference('hs auth')} and entering the new key.\n`,
3256
3395
  },
3257
- generic: 'An error occurred while creating a developer sandbox',
3258
3396
  },
3259
3397
  },
3260
3398
  standard: {
@@ -3267,30 +3405,54 @@ export const lib = {
3267
3405
  configFileUpdated: (accountName, authType) => `Account "${accountName}" updated using "${authType}"`,
3268
3406
  },
3269
3407
  failure: {
3270
- invalidUser: (accountName, parentAccountName) => `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)}.`,
3271
- limit: (accountName, limit) => `${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.`,
3272
- alreadyInConfig: (accountName, limit) => `${chalk.bold(accountName)} reached the limit of ${limit} standard sandboxes. \n- To use an existing standard sandbox, run ${chalk.bold('hs accounts use')}.`,
3408
+ limit: (accountId, limit, link) => `${uiAccountDescription(accountId)} reached the limit of ${limit} standard sandboxes.\n- View sandbox details at ${uiLink('View sandbox details at', link)} \n- To connect a standard sandbox to your HubSpot CLI, run ${uiCommandReference('hs auth')} and follow the prompts.`,
3409
+ alreadyInConfig: (accountId, limit) => `${uiAccountDescription(accountId)} reached the limit of ${limit} standard sandboxes. \n- To use an existing standard sandbox, run ${uiCommandReference('hs accounts use')}. \n- To delete an existing sandbox, run ${uiCommandReference('hs sandbox delete')}.`,
3273
3410
  scopes: {
3274
3411
  message: "The personal access key you provided doesn't include standard sandbox permissions.",
3275
- instructions: (accountName, url) => `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`,
3412
+ instructions: (account, url) => `To update CLI permissions for "${chalk.bold(account)}": \n- ${uiLink('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 ${uiCommandReference('hs auth')} and entering the new key.\n`,
3276
3413
  },
3277
3414
  },
3278
3415
  },
3416
+ failure: {
3417
+ usageLimitsFetch: 'Unable to fetch sandbox usage limits. Please try again.',
3418
+ scopes: {
3419
+ message: "The personal access key you provided doesn't include sandbox permissions.",
3420
+ instructions: (account, url) => `To update CLI permissions for "${chalk.bold(account)}": \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes Sandbox permissions. \n- Update the CLI config for this account by running ${uiCommandReference('hs auth')} and entering the new key.\n`,
3421
+ },
3422
+ invalidUser: (accountName, parentAccountId) => `Couldn't create ${chalk.bold(accountName)} because your account has been removed from ${uiAccountDescription(parentAccountId)} or your permission set doesn't allow you to create the sandbox. To update your permissions, contact a super admin in ${uiAccountDescription(parentAccountId)}.`,
3423
+ '403Gating': (accountName, parentAccountId) => `We couldn't create ${chalk.bold(accountName)} because ${uiAccountDescription(parentAccountId)} is a developer account and does not have access to development sandboxes. To gain access to developer sandboxes, you can ${uiLink('convert your account', 'https://developers.hubspot.com/docs/getting-started/convert-your-account-into-a-developer-crm-account')}.`,
3424
+ },
3279
3425
  },
3280
3426
  sync: {
3427
+ info: {
3428
+ syncMessage: (url) => `Asset sync from production to the sandbox is in progress and is running in the background. It may take some time. ${uiLink('View sync status details here', url)}`,
3429
+ syncMessageDevSb: (url) => `Sync of object definitions from production to the sandbox is in progress and is running in the background. It may take some time. ${url}`,
3430
+ },
3431
+ confirm: {
3432
+ syncContactRecords: {
3433
+ standard: 'Do you want to sync contact records from your production account?',
3434
+ },
3435
+ },
3281
3436
  loading: {
3282
3437
  add: (accountName) => `Syncing sandbox ${chalk.bold(accountName)}`,
3283
- fail: (accountName) => `Failed to sync sandbox ${chalk.bold(accountName)}.`,
3284
- succeed: (accountName) => `Successfully synced sandbox ${chalk.bold(accountName)}.`,
3438
+ fail: (accountId) => `Failed to sync sandbox ${uiAccountDescription(accountId)}.`,
3439
+ succeed: (accountId) => `Successfully synced sandbox ${uiAccountDescription(accountId)}.`,
3440
+ startSync: 'Initiating sync...',
3441
+ succeedDevSb: (accountId) => `Initiated sync of object definitions from production to ${uiAccountDescription(accountId)}`,
3442
+ successDevSbInfo: (accountId, url) => `Initiated sync of object definitions from production to ${uiAccountDescription(accountId)}. It may take some time. ${url}`,
3285
3443
  },
3286
3444
  success: {
3287
3445
  configFileUpdated: (accountName, authType) => `Account "${accountName}" updated using "${authType}"`,
3288
3446
  },
3289
3447
  failure: {
3448
+ syncTypeFetch: 'Unable to fetch available sandbox sync types. Please try again.',
3290
3449
  invalidUser: (accountName, parentAccountName) => `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)}.`,
3450
+ syncInProgress: (url) => `Couldn't run the sync because there's another sync in progress. Wait for the current sync to finish and then try again. To check the sync status, visit the sync activity log: ${url}.`,
3451
+ notSuperAdmin: (accountId) => `Couldn't run the sync because you are not a super admin in ${uiAccountDescription(accountId)}. Ask the account owner for super admin access to the sandbox.`,
3452
+ objectNotFound: (accountId) => `Couldn't sync the sandbox because ${uiAccountDescription(accountId)} may have been deleted through the UI. Run ${uiCommandReference('hs sandbox delete')} to remove this account from the config.`,
3291
3453
  scopes: {
3292
3454
  message: "The personal access key you provided doesn't include sandbox sync permissions.",
3293
- instructions: (accountName, url) => `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`,
3455
+ instructions: (accountName, url) => `To update CLI permissions for "${accountName}": \n- ${uiLink('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 ${uiCommandReference('hs auth')} and entering the new key.\n`,
3294
3456
  },
3295
3457
  },
3296
3458
  },
@@ -3301,6 +3463,8 @@ export const lib = {
3301
3463
  errorContext: (context) => `Context: ${context}`,
3302
3464
  errorCause: (cause) => `Cause: ${cause}`,
3303
3465
  unknownErrorOccurred: 'An unknown error has occurred.',
3466
+ configTimeoutErrorOccurred: (timeout, configSetCommand) => `This error occurred because a request exceeded the default HTTP timeout of ${timeout}ms. To increase the default HTTP timeout, run ${uiCommandReference(configSetCommand)}.`,
3467
+ genericTimeoutErrorOccurred: 'This error occurred because an HTTP request timed out. Re-running the command may resolve this issue.',
3304
3468
  },
3305
3469
  suppressErrors: {
3306
3470
  platformVersionErrors: {
@@ -3329,13 +3493,13 @@ export const lib = {
3329
3493
  accountChecks: {
3330
3494
  active: 'Default account active',
3331
3495
  inactive: "Default account isn't active",
3332
- inactiveSecondary: (command) => `Run ${command} to remove inactive accounts from your CLI config`,
3496
+ inactiveSecondary: (command) => `Run ${uiCommandReference(command)} to remove inactive accounts from your CLI config`,
3333
3497
  unableToDetermine: 'Unable to determine if the portal is active',
3334
3498
  pak: {
3335
3499
  incomplete: 'Personal access key is valid, but there are more scopes available to your user that are not included in your key.',
3336
- incompleteSecondary: (command, link) => `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}`,
3500
+ incompleteSecondary: (command, link) => `To add the available scopes, run ${uiCommandReference(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}`,
3337
3501
  invalid: 'Personal access key is invalid',
3338
- invalidSecondary: (command) => `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.`,
3502
+ invalidSecondary: (command) => `To get a new key, run ${uiCommandReference(command)}, deactivate your access key, and generate a new one. Then use that new key to authenticate your account.`,
3339
3503
  valid: (link) => `Personal Access Key is valid. ${link}`,
3340
3504
  viewScopes: 'View selected scopes',
3341
3505
  },
@@ -3352,25 +3516,24 @@ export const lib = {
3352
3516
  },
3353
3517
  hsChecks: {
3354
3518
  notLatest: (hsVersion) => `Version ${hsVersion} outdated`,
3355
- notLatestSecondary: (command, hsVersion) => `Run ${command} to upgrade to the latest version ${hsVersion}`,
3519
+ notLatestSecondary: (command, hsVersion) => `Run ${uiCommandReference(command)} to upgrade to the latest version ${hsVersion}`,
3356
3520
  latest: (hsVersion) => `HubSpot CLI v${hsVersion} up to date`,
3357
3521
  unableToDetermine: 'Unable to determine if HubSpot CLI is up to date.',
3358
- unableToDetermineSecondary: (command, link) => `Run ${command} to check your installed version; then visit the ${link} to validate whether you have the latest version`,
3359
- unableToDetermineSecondaryLink: 'npm HubSpot CLI version history',
3522
+ unableToDetermineSecondary: (command, link) => `Run ${uiCommandReference(command)} to check your installed version; then visit the ${uiLink('npm HubSpot CLI version history', link)} to validate whether you have the latest version`,
3360
3523
  },
3361
3524
  projectDependenciesChecks: {
3362
3525
  missingDependencies: (dir) => `missing dependencies in ${chalk.bold(dir)}`,
3363
- missingDependenciesSecondary: (command) => `Run ${command} to install all project dependencies locally`,
3526
+ missingDependenciesSecondary: (command) => `Run ${uiCommandReference(command)} to install all project dependencies locally`,
3364
3527
  unableToDetermine: (dir) => `Unable to determine if dependencies are installed ${dir}`,
3365
3528
  success: 'App dependencies are installed and up to date',
3366
3529
  },
3367
3530
  files: {
3368
- invalidJson: (filename) => `invalid JSON in ${chalk.bold(filename)}`,
3531
+ invalidJson: (filename) => `Invalid JSON in ${chalk.bold(filename)}`,
3369
3532
  validJson: 'JSON files valid',
3370
3533
  },
3371
3534
  port: {
3372
3535
  inUse: (port) => `Port ${port} is in use`,
3373
- inUseSecondary: (command) => `Make sure it is available before running ${command}`,
3536
+ inUseSecondary: (command) => `Make sure it is available before running ${uiCommandReference(command)}`,
3374
3537
  available: (port) => `Port ${port} available for local development`,
3375
3538
  },
3376
3539
  diagnosis: {
@@ -3382,28 +3545,59 @@ export const lib = {
3382
3545
  configFileSubHeader: (filename) => `Config File: ${chalk.bold(filename)}`,
3383
3546
  defaultAccountSubHeader: (accountDetails) => `Default Account: ${accountDetails}`,
3384
3547
  noConfigFile: 'CLI configuration not found',
3385
- noConfigFileSecondary: (command) => `Run ${command} and follow the prompts to create your CLI configuration file and connect it to your HubSpot account`,
3548
+ noConfigFileSecondary: (command) => `Run ${uiCommandReference(command)} and follow the prompts to create your CLI configuration file and connect it to your HubSpot account`,
3549
+ settings: {
3550
+ httpUseLocalhost: `The setting ${chalk.bold('httpUseLocalhost')} is enabled`,
3551
+ httpUseLocalhostSecondary: 'This setting causes all CLI requests to route to localhost',
3552
+ },
3386
3553
  },
3387
3554
  projectConfig: {
3388
3555
  header: 'Project configuration',
3389
3556
  projectDirSubHeader: (projectDir) => `Project dir: ${chalk.bold(projectDir)}`,
3390
3557
  projectNameSubHeader: (projectName) => `Project name: ${chalk.bold(projectName)}`,
3391
3558
  },
3559
+ defaultAccountOverrideFile: {
3560
+ header: 'Default account override file path:',
3561
+ },
3392
3562
  counts: {
3393
3563
  errors: (count) => `${chalk.bold('Errors:')} ${count}`,
3394
3564
  warnings: (count) => `${chalk.bold('Warning:')} ${count}`,
3395
3565
  },
3396
3566
  },
3567
+ defaultAccountOverrideFileChecks: {
3568
+ overrideActive: (defaultAccountOverrideFile) => `Default account override file is active: ${defaultAccountOverrideFile}`,
3569
+ overrideAccountId: (overrideAccountId) => `Active account ID: ${overrideAccountId}`,
3570
+ },
3397
3571
  },
3398
3572
  oauth: {
3399
3573
  missingClientId: 'Error building oauth URL: missing client ID.',
3400
3574
  },
3575
+ validation: {
3576
+ accountNotFoundInConfig: (userProvidedAccount) => `The account "${userProvidedAccount}" could not be found in the config`,
3577
+ accountRequired: 'An account needs to be supplied either via "--account" or through setting a "defaultPortal"',
3578
+ userProvidedAccount: 'Cannot specify an account when environment variables are supplied. Please unset the environment variables or do not use the "--account" flag.',
3579
+ accountNotConfigured: (accountId) => `The account ${uiAccountDescription(accountId)} has not been configured`,
3580
+ invalidAuthType: (authType, accountId, configPath, validValues) => `Invalid "authType" value "${authType}" for account "${uiAccountDescription(accountId)}" in config file: ${configPath}. Valid values are ${validValues}.`,
3581
+ oauth2ConfigMissing: (accountId) => `The OAuth2 auth configuration for account ${uiAccountDescription(accountId)} is missing`,
3582
+ oauth2ConfigIncorrect: (accountId) => `The OAuth2 configuration for account ${uiAccountDescription(accountId)} is incorrect \n Run ${uiCommandReference('hs auth --type=oauth2')} to reauthenticate`,
3583
+ oauth2AccessTokenNotFound: (accountId) => `The OAuth2 access token could not be found for accountId ${uiAccountDescription(accountId)}`,
3584
+ personalAccessKeyMissing: (accountId) => `The account "${uiAccountDescription(accountId)}" is configured to use a access key for authentication and is missing a "personalAccessKey" in the configuration file`,
3585
+ personalAccessKeyTokenRetrievalFailed: (accountId) => `An OAuth2 access token for account "${uiAccountDescription(accountId)} could not be retrieved using the "personalAccessKey" provided`,
3586
+ authConfigurationMissing: (accountId) => `The accountId ${uiAccountDescription(accountId)} is missing authentication configuration`,
3587
+ availableCMSModes: (modes) => `Available CMS publish modes are: ${modes}`,
3588
+ invalidCmsPublishMode: (cmsPublishMode, modesMessage) => `The CMS publish mode "${cmsPublishMode}" is invalid. ${modesMessage}`,
3589
+ missingCmsPublishMode: (modesMessage) => `The CMS publish mode option is missing. ${modesMessage}`,
3590
+ pathNotFile: (path) => `The path "${path}" is not a path to a file`,
3591
+ fileNotJson: (path) => `The file "${path}" must be a valid JSON file`,
3592
+ fileInvalidJson: (path) => `The file "${path}" contains invalid JSON`,
3593
+ },
3401
3594
  migrate: {
3402
3595
  componentsToBeMigrated: (components) => `The following features will be migrated: ${components}`,
3403
3596
  componentsThatWillNotBeMigrated: (components) => `[NOTE] These features are not yet supported for migration but will be available later: ${components}`,
3404
3597
  sourceContentsMoved: (newLocation) => `The contents of your old source directory have been moved to ${newLocation}, move any required files to the new source directory.`,
3405
3598
  projectMigrationWarningTitle: 'Important: Migrating to platformVersion 2025.2 is irreversible',
3406
3599
  projectMigrationWarning: uiBetaTag(`Running the ${uiCommandReference('hs project migrate')} command will permanently upgrade your project to platformVersion 2025.2. This action cannot be undone. To ensure you have access to your original files, they will be copied to a new directory (archive) for safekeeping.\n\nThis command will guide you through the process, prompting you to enter the required fields and will download the new project source code into your project source directory.`, false),
3600
+ exitWithoutMigrating: 'Exiting without migrating',
3407
3601
  success: {
3408
3602
  downloadedProject: (projectName, projectDest) => `Saved ${projectName} to ${projectDest}`,
3409
3603
  themesMigrationSuccess: (platformVersion) => `Successfully migrated project to platformVersion ${chalk.bold(platformVersion)}. Upload your project using ${uiCommandReference('hs project upload')}`,