@hubspot/cli 7.5.11-experimental.0 → 7.6.0-beta.1

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 (352) hide show
  1. package/bin/cli.js +102 -95
  2. package/commands/account/auth.d.ts +5 -7
  3. package/commands/account/auth.js +74 -87
  4. package/commands/account/clean.d.ts +3 -7
  5. package/commands/account/clean.js +16 -9
  6. package/commands/account/createOverride.d.ts +3 -7
  7. package/commands/account/createOverride.js +23 -6
  8. package/commands/account/info.d.ts +3 -7
  9. package/commands/account/info.js +13 -5
  10. package/commands/account/list.d.ts +3 -7
  11. package/commands/account/list.js +15 -8
  12. package/commands/account/remove.d.ts +3 -7
  13. package/commands/account/remove.js +21 -9
  14. package/commands/account/removeOverride.d.ts +3 -7
  15. package/commands/account/removeOverride.js +23 -6
  16. package/commands/account/rename.d.ts +3 -7
  17. package/commands/account/rename.js +16 -9
  18. package/commands/account/use.d.ts +5 -9
  19. package/commands/account/use.js +14 -6
  20. package/commands/account.d.ts +3 -4
  21. package/commands/account.js +33 -58
  22. package/commands/app/migrate.d.ts +1 -2
  23. package/commands/app/migrate.js +7 -8
  24. package/commands/app/secret/add.d.ts +7 -0
  25. package/commands/app/secret/add.js +64 -0
  26. package/commands/app/secret/delete.d.ts +8 -0
  27. package/commands/app/secret/delete.js +87 -0
  28. package/commands/app/secret/list.d.ts +6 -0
  29. package/commands/app/secret/list.js +64 -0
  30. package/commands/app/secret/update.d.ts +7 -0
  31. package/commands/app/secret/update.js +77 -0
  32. package/commands/app/secret.d.ts +3 -0
  33. package/commands/app/secret.js +30 -0
  34. package/commands/app.d.ts +2 -5
  35. package/commands/app.js +10 -8
  36. package/commands/auth.d.ts +5 -7
  37. package/commands/auth.js +29 -28
  38. package/commands/cms/convertFields.d.ts +7 -1
  39. package/commands/cms/convertFields.js +57 -41
  40. package/commands/cms/getReactModule.d.ts +7 -1
  41. package/commands/cms/getReactModule.js +52 -34
  42. package/commands/cms/lighthouseScore.d.ts +8 -1
  43. package/commands/cms/lighthouseScore.js +129 -100
  44. package/commands/cms.d.ts +3 -1
  45. package/commands/cms.js +22 -15
  46. package/commands/completion.d.ts +3 -1
  47. package/commands/completion.js +23 -12
  48. package/commands/config/migrate.d.ts +3 -7
  49. package/commands/config/migrate.js +37 -46
  50. package/commands/config/set.d.ts +5 -6
  51. package/commands/config/set.js +38 -14
  52. package/commands/config.d.ts +3 -4
  53. package/commands/config.js +18 -44
  54. package/commands/create/api-sample.d.ts +3 -1
  55. package/commands/create/api-sample.js +34 -38
  56. package/commands/create/app.d.ts +3 -1
  57. package/commands/create/app.js +9 -7
  58. package/commands/create/function.d.ts +3 -1
  59. package/commands/create/function.js +11 -10
  60. package/commands/create/index.d.ts +5 -1
  61. package/commands/create/index.js +23 -11
  62. package/commands/create/module.d.ts +3 -1
  63. package/commands/create/module.js +14 -13
  64. package/commands/create/react-app.d.ts +3 -1
  65. package/commands/create/react-app.js +10 -7
  66. package/commands/create/template.d.ts +3 -1
  67. package/commands/create/template.js +14 -14
  68. package/commands/create/vue-app.d.ts +3 -1
  69. package/commands/create/vue-app.js +10 -7
  70. package/commands/create/webpack-serverless.d.ts +3 -1
  71. package/commands/create/webpack-serverless.js +10 -7
  72. package/commands/create/website-theme.d.ts +3 -1
  73. package/commands/create/website-theme.js +10 -9
  74. package/commands/create.d.ts +4 -24
  75. package/commands/create.js +62 -74
  76. package/commands/customObject/create.d.ts +4 -9
  77. package/commands/customObject/create.js +17 -10
  78. package/commands/customObject/schema/create.d.ts +4 -9
  79. package/commands/customObject/schema/create.js +18 -11
  80. package/commands/customObject/schema/delete.d.ts +4 -9
  81. package/commands/customObject/schema/delete.js +17 -10
  82. package/commands/customObject/schema/fetch-all.d.ts +4 -9
  83. package/commands/customObject/schema/fetch-all.js +17 -10
  84. package/commands/customObject/schema/fetch.d.ts +4 -9
  85. package/commands/customObject/schema/fetch.js +17 -10
  86. package/commands/customObject/schema/list.d.ts +4 -8
  87. package/commands/customObject/schema/list.js +17 -10
  88. package/commands/customObject/schema/update.d.ts +4 -9
  89. package/commands/customObject/schema/update.js +18 -11
  90. package/commands/customObject/schema.d.ts +3 -5
  91. package/commands/customObject/schema.js +27 -54
  92. package/commands/customObject.d.ts +3 -4
  93. package/commands/customObject.js +18 -45
  94. package/commands/doctor.d.ts +6 -8
  95. package/commands/doctor.js +30 -21
  96. package/commands/feedback.d.ts +4 -1
  97. package/commands/feedback.js +38 -47
  98. package/commands/fetch.d.ts +12 -1
  99. package/commands/fetch.js +49 -33
  100. package/commands/filemanager/fetch.d.ts +4 -9
  101. package/commands/filemanager/fetch.js +18 -11
  102. package/commands/filemanager/upload.d.ts +4 -9
  103. package/commands/filemanager/upload.js +17 -11
  104. package/commands/filemanager.d.ts +3 -4
  105. package/commands/filemanager.js +18 -41
  106. package/commands/function/deploy.d.ts +6 -1
  107. package/commands/function/deploy.js +70 -50
  108. package/commands/function/list.d.ts +6 -1
  109. package/commands/function/list.js +44 -32
  110. package/commands/function/server.d.ts +10 -1
  111. package/commands/function/server.js +49 -38
  112. package/commands/function.d.ts +5 -1
  113. package/commands/function.js +22 -10
  114. package/commands/getStarted.d.ts +9 -0
  115. package/commands/getStarted.js +227 -0
  116. package/commands/hubdb/clear.d.ts +4 -9
  117. package/commands/hubdb/clear.js +17 -10
  118. package/commands/hubdb/create.d.ts +4 -9
  119. package/commands/hubdb/create.js +17 -10
  120. package/commands/hubdb/delete.d.ts +4 -9
  121. package/commands/hubdb/delete.js +17 -10
  122. package/commands/hubdb/fetch.d.ts +4 -9
  123. package/commands/hubdb/fetch.js +17 -10
  124. package/commands/hubdb/list.d.ts +4 -0
  125. package/commands/hubdb/list.js +83 -0
  126. package/commands/hubdb.d.ts +3 -2
  127. package/commands/hubdb.js +23 -45
  128. package/commands/init.d.ts +3 -7
  129. package/commands/init.js +17 -8
  130. package/commands/lint.d.ts +6 -4
  131. package/commands/lint.js +42 -43
  132. package/commands/list.d.ts +3 -7
  133. package/commands/list.js +17 -11
  134. package/commands/logs.d.ts +10 -1
  135. package/commands/logs.js +53 -44
  136. package/commands/mcp/setup.d.ts +7 -0
  137. package/commands/mcp/setup.js +52 -0
  138. package/commands/mcp/start.d.ts +3 -0
  139. package/commands/mcp/start.js +77 -0
  140. package/commands/mcp.d.ts +3 -0
  141. package/commands/mcp.js +26 -0
  142. package/commands/module/marketplace-validate.d.ts +6 -1
  143. package/commands/module/marketplace-validate.js +39 -29
  144. package/commands/module.d.ts +3 -1
  145. package/commands/module.js +23 -10
  146. package/commands/mv.d.ts +3 -7
  147. package/commands/mv.js +17 -11
  148. package/commands/open.d.ts +3 -7
  149. package/commands/open.js +17 -11
  150. package/commands/project/add.d.ts +5 -2
  151. package/commands/project/add.js +43 -80
  152. package/commands/project/cloneApp.d.ts +1 -1
  153. package/commands/project/cloneApp.js +2 -2
  154. package/commands/project/create.d.ts +2 -8
  155. package/commands/project/create.js +84 -55
  156. package/commands/project/deploy.d.ts +2 -0
  157. package/commands/project/deploy.js +67 -13
  158. package/commands/project/dev/deprecatedFlow.d.ts +8 -2
  159. package/commands/project/dev/deprecatedFlow.js +9 -1
  160. package/commands/project/dev/index.d.ts +1 -4
  161. package/commands/project/dev/index.js +88 -31
  162. package/commands/project/dev/unifiedFlow.d.ts +11 -2
  163. package/commands/project/dev/unifiedFlow.js +81 -41
  164. package/commands/project/listBuilds.js +2 -5
  165. package/commands/project/migrate.d.ts +1 -0
  166. package/commands/project/profile/add.d.ts +7 -0
  167. package/commands/project/profile/add.js +209 -0
  168. package/commands/project/profile/delete.d.ts +6 -0
  169. package/commands/project/profile/delete.js +123 -0
  170. package/commands/project/profile.d.ts +3 -0
  171. package/commands/project/profile.js +25 -0
  172. package/commands/project/upload.d.ts +1 -0
  173. package/commands/project/upload.js +22 -8
  174. package/commands/project/validate.d.ts +6 -0
  175. package/commands/project/validate.js +82 -0
  176. package/commands/project.js +4 -2
  177. package/commands/remove.d.ts +3 -7
  178. package/commands/remove.js +22 -22
  179. package/commands/sandbox/create.d.ts +4 -9
  180. package/commands/sandbox/create.js +18 -11
  181. package/commands/sandbox/delete.d.ts +4 -9
  182. package/commands/sandbox/delete.js +18 -11
  183. package/commands/sandbox.d.ts +3 -4
  184. package/commands/sandbox.js +18 -43
  185. package/commands/secret/addSecret.d.ts +4 -9
  186. package/commands/secret/addSecret.js +17 -10
  187. package/commands/secret/deleteSecret.d.ts +4 -9
  188. package/commands/secret/deleteSecret.js +17 -10
  189. package/commands/secret/listSecret.d.ts +4 -9
  190. package/commands/secret/listSecret.js +17 -10
  191. package/commands/secret/updateSecret.d.ts +4 -9
  192. package/commands/secret/updateSecret.js +17 -10
  193. package/commands/secret.d.ts +3 -4
  194. package/commands/secret.js +23 -48
  195. package/commands/testAccount/create.d.ts +6 -0
  196. package/commands/testAccount/create.js +100 -0
  197. package/commands/testAccount/createConfig.d.ts +10 -0
  198. package/commands/testAccount/createConfig.js +98 -0
  199. package/commands/testAccount/delete.d.ts +6 -0
  200. package/commands/testAccount/delete.js +48 -0
  201. package/commands/testAccount.d.ts +3 -0
  202. package/commands/testAccount.js +28 -0
  203. package/commands/theme/generate-selectors.d.ts +3 -7
  204. package/commands/theme/generate-selectors.js +20 -15
  205. package/commands/theme/marketplace-validate.d.ts +4 -9
  206. package/commands/theme/marketplace-validate.js +22 -17
  207. package/commands/theme/preview.d.ts +4 -9
  208. package/commands/theme/preview.js +32 -26
  209. package/commands/theme.d.ts +3 -4
  210. package/commands/theme.js +22 -47
  211. package/commands/upload.d.ts +12 -1
  212. package/commands/upload.js +116 -134
  213. package/commands/watch.d.ts +14 -1
  214. package/commands/watch.js +74 -75
  215. package/lang/en.d.ts +1135 -660
  216. package/lang/en.js +935 -471
  217. package/lang/en.lyaml +30 -213
  218. package/lib/accountTypes.js +1 -2
  219. package/lib/app/migrate.d.ts +23 -0
  220. package/lib/app/migrate.js +29 -6
  221. package/lib/app/migrate_legacy.js +7 -7
  222. package/lib/app/urls.d.ts +16 -0
  223. package/lib/app/urls.js +16 -0
  224. package/lib/commonOpts.d.ts +1 -3
  225. package/lib/commonOpts.js +1 -1
  226. package/lib/configMigrate.d.ts +2 -2
  227. package/lib/configMigrate.js +34 -55
  228. package/lib/configOptions.d.ts +4 -0
  229. package/lib/configOptions.js +41 -46
  230. package/lib/constants.d.ts +29 -0
  231. package/lib/constants.js +30 -1
  232. package/lib/dependencyManagement.d.ts +0 -5
  233. package/lib/dependencyManagement.js +13 -39
  234. package/lib/doctor/Doctor.js +3 -2
  235. package/lib/errorHandlers/index.js +7 -0
  236. package/lib/filesystem.d.ts +1 -1
  237. package/lib/generateSelectors.js +3 -5
  238. package/lib/interpolation.d.ts +2 -3
  239. package/lib/lang.d.ts +2 -3
  240. package/lib/marketplaceValidate.d.ts +12 -2
  241. package/lib/marketplaceValidate.js +22 -29
  242. package/lib/mcp/setup.d.ts +21 -0
  243. package/lib/mcp/setup.js +218 -0
  244. package/lib/middleware/autoUpdateMiddleware.d.ts +1 -0
  245. package/lib/middleware/autoUpdateMiddleware.js +89 -0
  246. package/lib/middleware/configMiddleware.js +23 -0
  247. package/lib/middleware/fireAlarmMiddleware.d.ts +2 -2
  248. package/lib/middleware/fireAlarmMiddleware.js +5 -3
  249. package/lib/npm.d.ts +9 -0
  250. package/lib/npm.js +36 -0
  251. package/lib/projectProfiles.d.ts +7 -0
  252. package/lib/projectProfiles.js +83 -0
  253. package/lib/projects/add/legacyAddComponent.d.ts +5 -0
  254. package/lib/projects/add/legacyAddComponent.js +48 -0
  255. package/lib/projects/add/v3AddComponent.d.ts +8 -0
  256. package/lib/projects/add/v3AddComponent.js +85 -0
  257. package/lib/projects/buildAndDeploy.js +18 -3
  258. package/lib/projects/components.d.ts +2 -0
  259. package/lib/projects/components.js +82 -0
  260. package/lib/projects/create/index.d.ts +23 -0
  261. package/lib/projects/create/index.js +33 -0
  262. package/lib/projects/create/legacy.d.ts +6 -0
  263. package/lib/projects/{create.js → create/legacy.js} +20 -11
  264. package/lib/projects/create/v3.d.ts +27 -0
  265. package/lib/projects/create/v3.js +158 -0
  266. package/lib/projects/localDev/AppDevModeInterface.d.ts +30 -0
  267. package/lib/projects/localDev/AppDevModeInterface.js +215 -0
  268. package/lib/projects/localDev/DevServerManagerV2.d.ts +11 -22
  269. package/lib/projects/localDev/DevServerManagerV2.js +19 -15
  270. package/lib/projects/localDev/LocalDevLogger.d.ts +30 -0
  271. package/lib/projects/localDev/LocalDevLogger.js +159 -0
  272. package/lib/projects/localDev/LocalDevManager.js +12 -5
  273. package/lib/projects/localDev/LocalDevProcess.d.ts +34 -0
  274. package/lib/projects/localDev/LocalDevProcess.js +201 -0
  275. package/lib/projects/localDev/LocalDevState.d.ts +50 -0
  276. package/lib/projects/localDev/LocalDevState.js +119 -0
  277. package/lib/projects/localDev/LocalDevWatcher.d.ts +10 -0
  278. package/lib/projects/localDev/LocalDevWatcher.js +53 -0
  279. package/lib/projects/localDev/LocalDevWebsocketServer.d.ts +20 -0
  280. package/lib/projects/localDev/LocalDevWebsocketServer.js +131 -0
  281. package/lib/projects/localDev/helpers.d.ts +3 -2
  282. package/lib/projects/localDev/helpers.js +32 -2
  283. package/lib/projects/upload.d.ts +5 -1
  284. package/lib/projects/upload.js +60 -20
  285. package/lib/projects/urls.d.ts +3 -0
  286. package/lib/projects/urls.js +17 -1
  287. package/lib/prompts/createApiSamplePrompt.d.ts +2 -10
  288. package/lib/prompts/createDeveloperTestAccountConfigPrompt.d.ts +17 -0
  289. package/lib/prompts/createDeveloperTestAccountConfigPrompt.js +96 -0
  290. package/lib/prompts/createProjectPrompt.d.ts +14 -5
  291. package/lib/prompts/createProjectPrompt.js +38 -13
  292. package/lib/prompts/createTemplatePrompt.d.ts +22 -4
  293. package/lib/prompts/installAppPrompt.d.ts +2 -0
  294. package/lib/prompts/installAppPrompt.js +45 -0
  295. package/lib/prompts/personalAccessKeyPrompt.js +35 -24
  296. package/lib/prompts/projectAddPrompt.d.ts +5 -1
  297. package/lib/prompts/projectAddPrompt.js +35 -7
  298. package/lib/prompts/projectDevTargetAccountPrompt.d.ts +6 -1
  299. package/lib/prompts/projectDevTargetAccountPrompt.js +6 -6
  300. package/lib/prompts/promptUtils.d.ts +4 -1
  301. package/lib/prompts/promptUtils.js +5 -1
  302. package/lib/prompts/selectAppPrompt.d.ts +2 -0
  303. package/lib/prompts/selectAppPrompt.js +40 -0
  304. package/lib/prompts/{selectPublicAppPrompt.d.ts → selectPublicAppForMigrationPrompt.d.ts} +1 -1
  305. package/lib/prompts/{selectPublicAppPrompt.js → selectPublicAppForMigrationPrompt.js} +8 -8
  306. package/lib/prompts/setAsDefaultAccountPrompt.js +10 -0
  307. package/lib/testUtils.d.ts +3 -3
  308. package/lib/testUtils.js +8 -9
  309. package/lib/ui/index.js +4 -1
  310. package/lib/upload.d.ts +1 -1
  311. package/lib/validation.js +4 -5
  312. package/lib/yargsUtils.d.ts +4 -0
  313. package/lib/yargsUtils.js +6 -0
  314. package/mcp-server/server.d.ts +1 -0
  315. package/mcp-server/server.js +18 -0
  316. package/mcp-server/tools/index.d.ts +2 -0
  317. package/mcp-server/tools/index.js +19 -0
  318. package/mcp-server/tools/project/AddFeatureToProject.d.ts +29 -0
  319. package/mcp-server/tools/project/AddFeatureToProject.js +85 -0
  320. package/mcp-server/tools/project/CreateProjectTool.d.ts +35 -0
  321. package/mcp-server/tools/project/CreateProjectTool.js +104 -0
  322. package/mcp-server/tools/project/DeployProject.d.ts +20 -0
  323. package/mcp-server/tools/project/DeployProject.js +50 -0
  324. package/mcp-server/tools/project/GuidedWalkthroughTool.d.ts +17 -0
  325. package/mcp-server/tools/project/GuidedWalkthroughTool.js +58 -0
  326. package/mcp-server/tools/project/UploadProjectTools.d.ts +17 -0
  327. package/mcp-server/tools/project/UploadProjectTools.js +35 -0
  328. package/mcp-server/tools/project/ValidateProjectTool.d.ts +17 -0
  329. package/mcp-server/tools/project/ValidateProjectTool.js +35 -0
  330. package/mcp-server/tools/project/constants.d.ts +3 -0
  331. package/mcp-server/tools/project/constants.js +13 -0
  332. package/mcp-server/types.d.ts +14 -0
  333. package/mcp-server/types.js +17 -0
  334. package/mcp-server/utils/command.d.ts +3 -0
  335. package/mcp-server/utils/command.js +16 -0
  336. package/mcp-server/utils/content.d.ts +3 -0
  337. package/mcp-server/utils/content.js +21 -0
  338. package/mcp-server/utils/project.d.ts +5 -0
  339. package/mcp-server/utils/project.js +17 -0
  340. package/package.json +24 -16
  341. package/types/Cms.d.ts +30 -0
  342. package/types/Cms.js +2 -0
  343. package/types/LocalDev.d.ts +35 -0
  344. package/types/LocalDev.js +2 -0
  345. package/types/Projects.d.ts +19 -2
  346. package/types/Prompts.d.ts +0 -7
  347. package/types/Yargs.d.ts +10 -1
  348. package/lib/projects/create.d.ts +0 -5
  349. package/lib/projects/localDev/LocalDevManagerV2.d.ts +0 -64
  350. package/lib/projects/localDev/LocalDevManagerV2.js +0 -345
  351. package/lib/prompts/installPublicAppPrompt.d.ts +0 -1
  352. package/lib/prompts/installPublicAppPrompt.js +0 -41
package/lang/en.js CHANGED
@@ -4,23 +4,67 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.lib = exports.commands = void 0;
7
- // @ts-nocheck
8
7
  const chalk_1 = __importDefault(require("chalk"));
8
+ const projects_1 = require("@hubspot/local-dev-lib/constants/projects");
9
+ const auth_1 = require("@hubspot/local-dev-lib/constants/auth");
10
+ const config_1 = require("@hubspot/local-dev-lib/constants/config");
9
11
  const ui_1 = require("../lib/ui");
10
12
  const urls_1 = require("../lib/projects/urls");
13
+ const constants_1 = require("../lib/constants");
14
+ const v3_1 = require("../lib/projects/create/v3");
11
15
  exports.commands = {
12
16
  generalErrors: {
13
- updateNotify: {
14
- notifyTitle: 'Update available',
15
- cmsUpdateNotification: (packageName, updateCommand) => `${chalk_1.default.bold('The CMS CLI is now the HubSpot CLI')}\n\nTo upgrade, uninstall ${chalk_1.default.bold(packageName)}\nand then run ${updateCommand}`,
16
- cliUpdateNotification: (currentVersion, latestVersion, updateCommand) => `HubSpot CLI version ${chalk_1.default.cyan(chalk_1.default.bold(currentVersion))} is outdated.\nRun ${updateCommand} to upgrade to version ${chalk_1.default.cyan(chalk_1.default.bold(latestVersion))}`,
17
- },
18
17
  srcIsProject: (src, command) => `"${src}" is in a project folder. Did you mean "hs project ${command}"?`,
19
18
  handleDeprecatedEnvVariables: {
20
19
  portalEnvVarDeprecated: 'The HUBSPOT_PORTAL_ID environment variable is deprecated. Please use HUBSPOT_ACCOUNT_ID instead.',
21
20
  },
22
21
  loadConfigMiddleware: {
23
- configFileExists: configPath => `A configuration file already exists at ${configPath}. To specify a new configuration file, delete the existing one and try again.`,
22
+ configFileExists: (configPath) => `A configuration file already exists at ${configPath}. To specify a new configuration file, delete the existing one and try again.`,
23
+ },
24
+ },
25
+ getStarted: {
26
+ options: {
27
+ dest: {
28
+ describe: 'Directory where the project should be created',
29
+ },
30
+ name: {
31
+ describe: 'Project name (cannot be changed)',
32
+ },
33
+ templateSource: {
34
+ describe: 'Path to custom GitHub repository from which to create project template',
35
+ },
36
+ },
37
+ startTitle: 'Welcome to HubSpot Development!',
38
+ verboseDescribe: 'A step-by-step command to get you started with a HubSpot project.',
39
+ startDescription: 'You can use the HubSpot CLI to build apps, CMS themes, and more.',
40
+ designManager: 'To onboard with CMS, please visit the HubSpot Design Manager in your account and follow the checklist items.',
41
+ openDesignManager: 'Click here to go to the HubSpot Design Manager',
42
+ openDesignManagerPrompt: 'Open Design Manager in your browser?',
43
+ openedDesignManager: 'Redirected to Design Manager!',
44
+ developerOverviewBrowserOpenPrep: "We'll take you to your HubSpot account and walk you through installing and previewing your new app.",
45
+ openDeveloperOverviewPrompt: 'Open HubSpot to go to your account?',
46
+ openedDeveloperOverview: 'HubSpot opened!',
47
+ prompts: {
48
+ selectOption: 'Are you looking to build apps or CMS?',
49
+ options: {
50
+ app: 'App',
51
+ cms: 'CMS',
52
+ },
53
+ uploadProject: 'Would you like to upload your project to HubSpot now?',
54
+ appSelected: `We'll create a new project with a sample app for you.\nProjects are what you can use to create apps, themes, and more at HubSpot.\nUsually you'll use the ${(0, ui_1.uiCommandReference)('hs project create')} command, but we'll go ahead and make one now.`,
55
+ projectCreated: {
56
+ title: chalk_1.default.bold('Next steps:'),
57
+ description: `Upload your project to HubSpot - typically, you'll use the command ${(0, ui_1.uiCommandReference)('hs project upload')} for this.\nWe'll start the process now.`,
58
+ },
59
+ },
60
+ logs: {
61
+ uploadingProject: 'Uploading your project to HubSpot...',
62
+ uploadSuccess: 'Project uploaded successfully!',
63
+ developerOverviewLink: 'Open this link to navigate to your HubSpot developer portal',
64
+ },
65
+ errors: {
66
+ uploadFailed: 'Failed to upload project to HubSpot.',
67
+ configFileNotFound: 'Could not find project configuration for upload.',
24
68
  },
25
69
  },
26
70
  completion: {
@@ -32,11 +76,28 @@ exports.commands = {
32
76
  account: {
33
77
  describe: 'Commands for managing configured accounts.',
34
78
  subcommands: {
79
+ auth: {
80
+ describe: 'Configure authentication for your HubSpot account.',
81
+ verboseDescribe: `Configure authentication for a HubSpot account. This will create or update the global config file at ${config_1.GLOBAL_CONFIG_PATH} that stores your account information.\n\nThe authentication method is ${chalk_1.default.bold(auth_1.PERSONAL_ACCESS_KEY_AUTH_METHOD.value)}, which is an access token tied to a specific user account.\n\nGlobal configuration replaces ${config_1.DEFAULT_HUBSPOT_CONFIG_YAML_FILE_NAME}, and you will be prompted to migrate your existing config if one exists.`,
82
+ options: {
83
+ account: 'HubSpot account to authenticate',
84
+ personalAccessKey: 'Enter existing personal access key',
85
+ },
86
+ errors: {
87
+ failedToUpdateConfig: 'Failed to update the configuration file. Please try again.',
88
+ migrationNotConfirmed: `Did not migrate your configuration file. Run ${(0, ui_1.uiCommandReference)('hs auth')} to update your existing config, or use ${(0, ui_1.uiCommandReference)('hs config migrate')} to switch to the new global configuration.`,
89
+ mergeNotConfirmed: `Did not merge configuration files. When you are ready to merge the deprecated config file with the global config file, run ${(0, ui_1.uiCommandReference)('hs config migrate')}.`,
90
+ },
91
+ success: {
92
+ configFileCreated: (configPath) => `Created config file "${configPath}"`,
93
+ configFileUpdated: (accountId) => `Connected account ${(0, ui_1.uiAccountDescription)(accountId)} and set it as the default account`,
94
+ },
95
+ },
35
96
  list: {
36
97
  accounts: `${chalk_1.default.bold('Accounts')}:`,
37
- defaultAccount: account => `${chalk_1.default.bold('Default account')}: ${account}`,
98
+ defaultAccount: (account) => `${chalk_1.default.bold('Default account')}: ${account}`,
38
99
  describe: 'List names of accounts defined in config.',
39
- configPath: configPath => `${chalk_1.default.bold('Config path')}: ${configPath}`,
100
+ configPath: (configPath) => `${chalk_1.default.bold('Config path')}: ${configPath}`,
40
101
  labels: {
41
102
  accountId: 'Account ID',
42
103
  authType: 'Auth Type',
@@ -74,7 +135,7 @@ exports.commands = {
74
135
  },
75
136
  promptMessage: 'Select an account to use as the default',
76
137
  success: {
77
- defaultAccountUpdated: accountName => `Default account updated to "${accountName}"`,
138
+ defaultAccountUpdated: (accountName) => `Default account updated to "${accountName}"`,
78
139
  },
79
140
  },
80
141
  remove: {
@@ -99,11 +160,11 @@ exports.commands = {
99
160
  },
100
161
  promptMessage: 'Select an account to remove',
101
162
  success: {
102
- accountRemoved: accountName => `Account "${accountName}" removed from the config`,
163
+ accountRemoved: (accountName) => `Account "${accountName}" removed from the config`,
103
164
  },
104
165
  },
105
166
  info: {
106
- accountId: accountId => `${chalk_1.default.bold('Account ID')}: ${accountId}`,
167
+ accountId: (accountId) => `${chalk_1.default.bold('Account ID')}: ${accountId}`,
107
168
  describe: 'Print information about the default account, or about the account specified with the "account" option.',
108
169
  errors: {
109
170
  notUsingPersonalAccessKey: 'This command currently only supports fetching scopes for the personal access key auth type.',
@@ -113,7 +174,7 @@ exports.commands = {
113
174
  idBased: 'Print information for the account with accountId equal to "1234567"',
114
175
  nameBased: 'Print information for the account in the config with name equal to "MyAccount"',
115
176
  },
116
- name: name => `${chalk_1.default.bold('Account name')}: ${name}`,
177
+ name: (name) => `${chalk_1.default.bold('Account name')}: ${name}`,
117
178
  scopeGroups: `${chalk_1.default.bold('Scopes available')}:`,
118
179
  },
119
180
  clean: {
@@ -124,18 +185,18 @@ exports.commands = {
124
185
  },
125
186
  inactiveAccountsFound: {
126
187
  one: '1 inactive account found:',
127
- other: count => `${count} inactive accounts found:`,
188
+ other: (count) => `${count} inactive accounts found:`,
128
189
  },
129
190
  confirm: {
130
191
  one: 'Remove 1 inactive account from the CLI config?',
131
- other: count => `Remove ${count} inactive accounts from the CLI config?`,
192
+ other: (count) => `Remove ${count} inactive accounts from the CLI config?`,
132
193
  },
133
- removeSuccess: accountName => `Removed ${accountName} from the CLI config.`,
194
+ removeSuccess: (accountName) => `Removed ${accountName} from the CLI config.`,
134
195
  },
135
196
  },
136
197
  },
137
198
  auth: {
138
- describe: configName => `Configure authentication for your HubSpot account. This will update the ${configName} file that stores your account information.`,
199
+ describe: (configName) => `Configure authentication for your HubSpot account. This will update the ${configName} file that stores your account information.`,
139
200
  errors: {
140
201
  noConfigFileFound: 'No config file was found. To create a new config file, use the "hs init" command.',
141
202
  unsupportedAuthType: (type, supportedProtocols) => `Unsupported auth type: ${type}. The only supported authentication protocols are ${supportedProtocols}.`,
@@ -143,11 +204,14 @@ exports.commands = {
143
204
  options: {
144
205
  authType: {
145
206
  describe: 'Authentication mechanism',
146
- defaultDescription: authMethod => `"${authMethod}": An access token tied to a specific user account. This is the recommended way of authenticating with local development tools.`,
207
+ defaultDescription: (authMethod) => `"${authMethod}": An access token tied to a specific user account. This is the recommended way of authenticating with local development tools.`,
147
208
  },
148
209
  account: {
149
210
  describe: 'HubSpot account to authenticate',
150
211
  },
212
+ personalAccessKey: {
213
+ describe: 'Enter existing personal access key',
214
+ },
151
215
  },
152
216
  success: {
153
217
  configFileUpdated: (accountName, configFilename, authType) => `Account "${accountName}" updated in ${configFilename} using "${authType}"`,
@@ -156,8 +220,23 @@ exports.commands = {
156
220
  config: {
157
221
  describe: 'Commands for managing the CLI config file.',
158
222
  subcommands: {
223
+ migrate: {
224
+ describe: `Migrate from the deprecated ${config_1.DEFAULT_HUBSPOT_CONFIG_YAML_FILE_NAME} file to the new global config file at ${config_1.GLOBAL_CONFIG_PATH}.`,
225
+ verboseDescribe: `This command will create or update the global configuration file in your root directory. It will archive the current config as ${config_1.ARCHIVED_HUBSPOT_CONFIG_YAML_FILE_NAME}.`,
226
+ errors: {
227
+ noConfigToMigrate: `No ${config_1.DEFAULT_HUBSPOT_CONFIG_YAML_FILE_NAME} was found. There is nothing to migrate.`,
228
+ configNotFound: (configPath) => `A configuration file at ${configPath} could not be found. Please try again with a valid file path.`,
229
+ },
230
+ options: {
231
+ force: 'Bypass prompts and overwrite any conflicting values in the global config with the deprecated config values.',
232
+ },
233
+ examples: {
234
+ default: `Migrate from the deprecated ${config_1.DEFAULT_HUBSPOT_CONFIG_YAML_FILE_NAME} file to the new global config file at ${config_1.GLOBAL_CONFIG_PATH}`,
235
+ configFlag: `Migrate a specific config file (specified with the config flag) to the new global config file at ${config_1.GLOBAL_CONFIG_PATH}`,
236
+ },
237
+ },
159
238
  set: {
160
- describe: 'Set various configuration options within the hubspot.config.yml file.',
239
+ describe: 'Set various configuration options within the hubspot CLI config file.',
161
240
  promptMessage: 'Select a config option to update',
162
241
  examples: {
163
242
  default: 'Opens a prompt to select a config item to modify',
@@ -165,23 +244,15 @@ exports.commands = {
165
244
  options: {
166
245
  defaultMode: {
167
246
  describe: 'Set the default CMS publish mode',
168
- promptMessage: 'Select CMS publish mode to be used as the default',
169
- error: validModes => `The provided CMS publish mode is invalid. Valid values are ${validModes}.`,
170
- success: mode => `Default mode updated to: ${mode}`,
171
247
  },
172
248
  allowUsageTracking: {
173
249
  describe: 'Enable or disable usage tracking',
174
- promptMessage: 'Choose to enable or disable usage tracking',
175
- success: isEnabled => `Allow usage tracking set to: "${isEnabled}"`,
176
- labels: {
177
- enabled: 'Enabled',
178
- disabled: 'Disabled',
179
- },
180
250
  },
181
251
  httpTimeout: {
182
252
  describe: 'Set the http timeout duration',
183
- promptMessage: 'Enter http timeout duration',
184
- success: timeout => `The http timeout has been set to: ${timeout}`,
253
+ },
254
+ allowAutoUpdates: {
255
+ describe: 'Enable or disable auto updates',
185
256
  },
186
257
  },
187
258
  },
@@ -198,8 +269,8 @@ exports.commands = {
198
269
  info: {
199
270
  promptMessage: 'Select a theme to score',
200
271
  fetchingThemes: 'Fetching available themes',
201
- generatingScore: theme => `Generating Google Lighthouse score for ${theme}`,
202
- targetDeviceNote: target => `Scores are being shown for ${target} only.`,
272
+ generatingScore: (theme) => `Generating Google Lighthouse score for ${theme}`,
273
+ targetDeviceNote: (target) => `Scores are being shown for ${target} only.`,
203
274
  verboseOptionNote: 'Theme scores are averages of all theme templates. Use the [--verbose] option to include individual template scores.',
204
275
  pageTemplateScoreTitle: 'Page template scores',
205
276
  lighthouseLinksTitle: 'Lighthouse links',
@@ -208,7 +279,7 @@ exports.commands = {
208
279
  errors: {
209
280
  targetOptionRequired: '[--target] is required for detailed view',
210
281
  invalidTargetOption: '[--target] can only be used for detailed view',
211
- themeNotFound: theme => `Theme "${theme}" not found. Please rerun using a valid theme path.`,
282
+ themeNotFound: (theme) => `Theme "${theme}" not found. Please rerun using a valid theme path.`,
212
283
  failedToFetchThemes: 'Failed to fetch available themes. Try running again with the [--theme] option',
213
284
  failedToGetLighthouseScore: 'Failed to generate a Google Lighthouse score',
214
285
  },
@@ -239,18 +310,18 @@ exports.commands = {
239
310
  moduleDownloaded: (moduleName, path) => `"${moduleName}" successfully downloaded to "${path}"`,
240
311
  },
241
312
  errors: {
242
- pathExists: path => `Folder already exists at "${path}"`,
313
+ pathExists: (path) => `Folder already exists at "${path}"`,
243
314
  invalidName: 'Module not found with that name, please check the spelling of the module you are trying to download.',
244
315
  },
245
316
  },
246
317
  },
247
318
  },
248
319
  create: {
249
- describe: supportedAssetTypes => `Create HubSpot sample apps and CMS assets. Supported assets are ${supportedAssetTypes}.`,
320
+ describe: (supportedAssetTypes) => `Create HubSpot sample apps and CMS assets. Supported assets are ${supportedAssetTypes}.`,
250
321
  errors: {
251
- deprecatedAssetType: (assetType, newCommand, type) => `The CLI command for asset type ${assetType} has been deprecated in an effort to make it easier to know what asset types can be created. Run the "${newCommand}" command instead. Then when prompted select "${type}".`,
322
+ deprecatedAssetType: (assetType, newCommand, type) => `The CLI command for asset type ${assetType} has been deprecated in an effort to make it easier to know what asset types can be created. Run the ${(0, ui_1.uiCommandReference)(newCommand)}" command instead. Then when prompted select "${type}".`,
252
323
  unsupportedAssetType: (assetType, supportedAssetTypes) => `The asset type ${assetType} is not supported. Supported asset types are ${supportedAssetTypes}.`,
253
- unusablePath: path => `The "${path}" is not a usable path to a directory.`,
324
+ unusablePath: (path) => `The "${path}" is not a usable path to a directory.`,
254
325
  },
255
326
  positionals: {
256
327
  dest: {
@@ -265,7 +336,7 @@ exports.commands = {
265
336
  },
266
337
  subcommands: {
267
338
  apiSample: {
268
- folderOverwritePrompt: folderName => `The folder with name "${folderName}" already exists. Overwrite?`,
339
+ folderOverwritePrompt: (folderName) => `The folder with name "${folderName}" already exists. Overwrite?`,
269
340
  errors: {
270
341
  nameRequired: 'The "name" argument is required when creating an API Sample.',
271
342
  noSamples: 'Currently there are no samples available. Please try again later.',
@@ -274,7 +345,7 @@ exports.commands = {
274
345
  sampleChosen: (sampleType, sampleLanguage) => `You've chosen ${sampleType} sample written on ${sampleLanguage} language`,
275
346
  },
276
347
  success: {
277
- sampleCreated: filePath => `Please follow ${filePath}/README.md to find out how to run the sample`,
348
+ sampleCreated: (filePath) => `Please follow ${filePath}/README.md to find out how to run the sample`,
278
349
  },
279
350
  },
280
351
  module: {
@@ -298,7 +369,7 @@ exports.commands = {
298
369
  describe: 'Create custom object instances.',
299
370
  errors: {
300
371
  invalidObjectDefinition: 'The object definition is invalid. Please check the schema and try again.',
301
- creationFailed: definition => `Object creation from ${definition} failed`,
372
+ creationFailed: (definition) => `Object creation from ${definition} failed`,
302
373
  },
303
374
  options: {
304
375
  path: {
@@ -323,7 +394,7 @@ exports.commands = {
323
394
  describe: 'Create a custom object schema.',
324
395
  errors: {
325
396
  invalidSchema: 'The schema definition is invalid. Please check the schema and try again.',
326
- creationFailed: definition => `Schema creation from ${definition} failed`,
397
+ creationFailed: (definition) => `Schema creation from ${definition} failed`,
327
398
  },
328
399
  options: {
329
400
  definition: {
@@ -331,14 +402,14 @@ exports.commands = {
331
402
  },
332
403
  },
333
404
  success: {
334
- schemaCreated: accountId => `Your schema has been created in account "${accountId}"`,
335
- schemaViewable: url => `Schema can be viewed at ${url}`,
405
+ schemaCreated: (accountId) => `Your schema has been created in account "${accountId}"`,
406
+ schemaViewable: (url) => `Schema can be viewed at ${url}`,
336
407
  },
337
408
  },
338
409
  delete: {
339
410
  describe: 'Delete a custom object schema.',
340
411
  errors: {
341
- delete: name => `Unable to delete ${name}`,
412
+ delete: (name) => `Unable to delete ${name}`,
342
413
  },
343
414
  examples: {
344
415
  default: 'Delete "schemaName" schema',
@@ -354,10 +425,10 @@ exports.commands = {
354
425
  },
355
426
  },
356
427
  success: {
357
- delete: name => `Successfully initiated deletion of ${name}`,
428
+ delete: (name) => `Successfully initiated deletion of ${name}`,
358
429
  },
359
- confirmDelete: name => `Are you sure you want to delete the schema "${name}"?`,
360
- deleteCancelled: name => `Deletion of schema "${name}" cancelled.`,
430
+ confirmDelete: (name) => `Are you sure you want to delete the schema "${name}"?`,
431
+ deleteCancelled: (name) => `Deletion of schema "${name}" cancelled.`,
361
432
  selectSchema: 'Which schema would you like to delete?',
362
433
  },
363
434
  fetchAll: {
@@ -375,14 +446,14 @@ exports.commands = {
375
446
  },
376
447
  },
377
448
  success: {
378
- fetch: path => `Saved schemas to ${path}`,
449
+ fetch: (path) => `Saved schemas to ${path}`,
379
450
  },
380
451
  inputDest: 'Where would you like to save the schemas?',
381
452
  },
382
453
  fetch: {
383
454
  describe: 'Fetch a custom object schema.',
384
455
  errors: {
385
- fetch: name => `Unable to fetch ${name}`,
456
+ fetch: (name) => `Unable to fetch ${name}`,
386
457
  },
387
458
  examples: {
388
459
  default: 'Fetch "schemaId" schema and put it in the current working directory',
@@ -400,7 +471,7 @@ exports.commands = {
400
471
  inputDest: 'What would you like to name the destination file?',
401
472
  success: {
402
473
  save: (name, path) => `The schema "${name}" has been saved to "${path}"`,
403
- savedToPath: path => `Saved schema to ${path}`,
474
+ savedToPath: (path) => `Saved schema to ${path}`,
404
475
  },
405
476
  },
406
477
  list: {
@@ -413,7 +484,7 @@ exports.commands = {
413
484
  describe: 'Update an existing custom object schema.',
414
485
  errors: {
415
486
  invalidSchema: 'The schema definition is invalid. Please check the schema and try again.',
416
- update: definition => `Schema update from ${definition} failed`,
487
+ update: (definition) => `Schema update from ${definition} failed`,
417
488
  },
418
489
  options: {
419
490
  path: {
@@ -426,8 +497,8 @@ exports.commands = {
426
497
  },
427
498
  },
428
499
  success: {
429
- update: accountId => `Your schema has been updated in account "${accountId}"`,
430
- viewAtUrl: url => `Schema can be viewed at ${url}`,
500
+ update: (accountId) => `Your schema has been updated in account "${accountId}"`,
501
+ viewAtUrl: (url) => `Schema can be viewed at ${url}`,
431
502
  },
432
503
  selectSchema: 'Which schema would you like to update?',
433
504
  },
@@ -444,7 +515,7 @@ exports.commands = {
444
515
  generatingDiagnosis: 'Error generating diagnosis',
445
516
  unableToWriteOutputFile: (file, errorMessage) => `Unable to write output to ${chalk_1.default.bold(file)}, ${errorMessage}`,
446
517
  },
447
- outputWritten: filename => `Output written to ${chalk_1.default.bold(filename)}`,
518
+ outputWritten: (filename) => `Output written to ${chalk_1.default.bold(filename)}`,
448
519
  },
449
520
  fetch: {
450
521
  describe: 'Fetch a file, directory or module from HubSpot and write to a path on your computer.',
@@ -494,8 +565,8 @@ exports.commands = {
494
565
  describe: 'Upload a folder or file to the File Manager.',
495
566
  errors: {
496
567
  destinationRequired: 'A destination path needs to be passed',
497
- fileIgnored: path => `The file "${path}" is being ignored via an .hsignore rule`,
498
- invalidPath: path => `The path "${path}" is not a path to a file or folder`,
568
+ fileIgnored: (path) => `The file "${path}" is being ignored via an .hsignore rule`,
569
+ invalidPath: (path) => `The path "${path}" is not a path to a file or folder`,
499
570
  upload: (src, dest) => `Uploading file "${src}" to "${dest}" failed`,
500
571
  uploadingFailed: 'Uploading failed',
501
572
  },
@@ -512,7 +583,7 @@ exports.commands = {
512
583
  },
513
584
  success: {
514
585
  upload: (src, dest, accountId) => `Uploaded file from "${src}" to "${dest}" in the File Manager of account ${accountId}`,
515
- uploadComplete: dest => `Uploading files to "${dest}" in the File Manager is complete`,
586
+ uploadComplete: (dest) => `Uploading files to "${dest}" in the File Manager is complete`,
516
587
  },
517
588
  },
518
589
  },
@@ -522,12 +593,12 @@ exports.commands = {
522
593
  subcommands: {
523
594
  deploy: {
524
595
  debug: {
525
- startingBuildAndDeploy: functionPath => `Starting build and deploy for .functions folder with path: ${functionPath}`,
596
+ startingBuildAndDeploy: (functionPath) => `Starting build and deploy for .functions folder with path: ${functionPath}`,
526
597
  },
527
598
  errors: {
528
- buildError: details => `Build error: ${details}`,
529
- noPackageJson: functionPath => `Unable to find package.json for function ${functionPath}.`,
530
- notFunctionsFolder: functionPath => `Specified path ${functionPath} is not a .functions folder.`,
599
+ buildError: (details) => `Build error: ${details}`,
600
+ noPackageJson: (functionPath) => `Unable to find package.json for function ${functionPath}.`,
601
+ notFunctionsFolder: (functionPath) => `Specified path ${functionPath} is not a .functions folder.`,
531
602
  },
532
603
  examples: {
533
604
  default: 'Build and deploy a new bundle for all functions within the myFunctionFolder.functions folder',
@@ -559,7 +630,7 @@ exports.commands = {
559
630
  },
560
631
  server: {
561
632
  debug: {
562
- startingServer: functionPath => `Starting local test server for .functions folder with path: ${functionPath}`,
633
+ startingServer: (functionPath) => `Starting local test server for .functions folder with path: ${functionPath}`,
563
634
  },
564
635
  examples: {
565
636
  default: 'Run a local function test server.',
@@ -594,7 +665,7 @@ exports.commands = {
594
665
  logs: {
595
666
  removedRows: (deletedRowCount, tableId) => `Removed ${deletedRowCount} rows from HubDB table ${tableId}`,
596
667
  rowCount: (tableId, rowCount) => `HubDB table ${tableId} now contains ${rowCount} rows`,
597
- tableEmpty: tableId => `HubDB table ${tableId} is already empty`,
668
+ tableEmpty: (tableId) => `HubDB table ${tableId} is already empty`,
598
669
  },
599
670
  positionals: {
600
671
  tableId: {
@@ -606,7 +677,7 @@ exports.commands = {
606
677
  describe: 'Create a HubDB table.',
607
678
  enterPath: '[--path] Enter the local path to the file used for import:',
608
679
  errors: {
609
- create: filePath => `Creating the table at "${filePath}" failed`,
680
+ create: (filePath) => `Creating the table at "${filePath}" failed`,
610
681
  pathRequired: 'A path to a local file with a HubDB schema is required to create a HubDB table',
611
682
  invalidCharacters: 'The selected file path contains invalid characters. Please provide a new path and try again.',
612
683
  },
@@ -621,9 +692,9 @@ exports.commands = {
621
692
  },
622
693
  delete: {
623
694
  describe: 'Delete a HubDB table.',
624
- shouldDeleteTable: tableId => `Proceed with deleting HubDB table ${tableId}?`,
695
+ shouldDeleteTable: (tableId) => `Proceed with deleting HubDB table ${tableId}?`,
625
696
  errors: {
626
- delete: tableId => `Deleting the table ${tableId} failed`,
697
+ delete: (tableId) => `Deleting the table ${tableId} failed`,
627
698
  },
628
699
  positionals: {
629
700
  tableId: {
@@ -653,14 +724,31 @@ exports.commands = {
653
724
  fetch: (tableId, path) => `Downloaded HubDB table ${tableId} to ${path}`,
654
725
  },
655
726
  },
727
+ list: {
728
+ tables: `${chalk_1.default.bold('Tables')}:`,
729
+ describe: 'List HubDB tables.',
730
+ labels: {
731
+ label: 'Label',
732
+ id: 'ID',
733
+ name: 'Name',
734
+ columns: 'Columns',
735
+ rows: 'Rows',
736
+ },
737
+ success: (accountId) => `Showing tables for account ${accountId}:`,
738
+ noTables: (accountId) => `No tables found for account ${accountId}.`,
739
+ tablesDisplayed: (displayed, total, truncated) => `Displaying ${displayed} of ${total} tables${truncated
740
+ ? `, the remaining ${truncated} tables were not displayed.`
741
+ : '.'}`,
742
+ viewTablesLink: (baseUrl, accountId) => (0, ui_1.uiLink)('Manage tables in HubSpot', `${baseUrl}/hubdb/${accountId}`),
743
+ },
656
744
  },
657
745
  },
658
746
  init: {
659
- describe: configName => `Configure authentication for your HubSpot account. This will create a ${configName} file to store your account information.`,
747
+ describe: (configName) => `Configure authentication for your HubSpot account. This will create a ${configName} file to store your account information.`,
660
748
  options: {
661
749
  authType: {
662
750
  describe: 'Authentication mechanism',
663
- defaultDescription: authMethod => `"${authMethod}": An access token tied to a specific user account. This is the recommended way of authenticating with local development tools.`,
751
+ defaultDescription: (authMethod) => `"${authMethod}": An access token tied to a specific user account. This is the recommended way of authenticating with local development tools.`,
664
752
  },
665
753
  account: {
666
754
  describe: 'HubSpot account to authenticate',
@@ -670,20 +758,20 @@ exports.commands = {
670
758
  },
671
759
  },
672
760
  success: {
673
- configFileCreated: configPath => `Created config file "${configPath}"`,
761
+ configFileCreated: (configPath) => `Created config file "${configPath}"`,
674
762
  configFileUpdated: (account, authType) => `Connected account "${account}" using "${authType}" and set it as the default account`,
675
763
  },
676
764
  logs: {
677
765
  updateConfig: 'To update an existing config file, use the "hs auth" command.',
678
766
  },
679
767
  errors: {
680
- configFileExists: configPath => `The config file ${configPath} already exists.`,
681
- bothConfigFilesNotAllowed: path => `Unable to create config file, because there is an existing one at "${path}". To create a new config file, delete the existing one and try again.`,
768
+ configFileExists: (configPath) => `The config file ${configPath} already exists.`,
769
+ bothConfigFilesNotAllowed: (path) => `Unable to create config file, because there is an existing one at "${path}". To create a new config file, delete the existing one and try again.`,
682
770
  },
683
771
  },
684
772
  lint: {
685
- issuesFound: count => `${count} issues found.`,
686
- groupName: path => `Linting ${path}`,
773
+ issuesFound: (count) => `${count} issues found.`,
774
+ groupName: (path) => `Linting ${path}`,
687
775
  positionals: {
688
776
  path: {
689
777
  describe: 'Local folder to lint',
@@ -692,8 +780,8 @@ exports.commands = {
692
780
  },
693
781
  list: {
694
782
  describe: 'List remote contents of a directory.',
695
- gettingPathContents: path => `Getting contents of ${path}.`,
696
- noFilesFoundAtPath: path => `No files found in ${path}.`,
783
+ gettingPathContents: (path) => `Getting contents of ${path}.`,
784
+ noFilesFoundAtPath: (path) => `No files found in ${path}.`,
697
785
  positionals: {
698
786
  path: {
699
787
  describe: 'Remote directory to list contents',
@@ -733,6 +821,56 @@ exports.commands = {
733
821
  },
734
822
  tailLogs: (functionPath, accountId) => `Waiting for log entries for "${functionPath}" on account "${accountId}".\n`,
735
823
  },
824
+ mcp: {
825
+ describe: 'Commands for managing HubSpot MCP servers',
826
+ setup: {
827
+ installingDocSearch: 'Adding the docs-search mcp server',
828
+ claudeCode: 'Claude Code',
829
+ claudeDesktop: 'Claude Desktop',
830
+ cursor: 'Cursor',
831
+ windsurf: 'Windsurf',
832
+ args: {
833
+ client: 'Target applications to configure',
834
+ docsSearch: 'Should the docs search mcp server be installed',
835
+ },
836
+ success: (derivedTargets) => `You can now use the HubSpot CLI MCP Server in ${derivedTargets.join(', ')}. ${chalk_1.default.bold('You may need to restart these tools to apply the changes')}.`,
837
+ errors: {
838
+ needsNode20: `This feature requires node >=20`,
839
+ },
840
+ spinners: {
841
+ failedToConfigure: 'Failed to configure the HubSpot mcp server.',
842
+ configuringClaudeDesktop: 'Configuring Claude Desktop...',
843
+ configuredClaudeDesktop: 'Configured Claude Desktop',
844
+ configuringClaudeCode: 'Configuring Claude Code...',
845
+ configuredClaudeCode: 'Configured Claude Code',
846
+ claudeCodeNotFound: 'Claude Code not found - skipping configuration',
847
+ claudeCodeInstallFailed: 'Claude Code CLI not working - skipping configuration',
848
+ failedToConfigureClaudeDesktop: 'Failed to configure Claude Desktop',
849
+ configuringCursor: 'Configuring Cursor...',
850
+ failedToConfigureCursor: 'Failed to configure Cursor',
851
+ configuredCursor: 'Configured Cursor',
852
+ alreadyInstalled: 'HubSpot CLI mcp server already installed, reinstalling',
853
+ configuringWindsurf: 'Configuring Windsurf...',
854
+ failedToConfigureWindsurf: 'Failed to configure Windsurf',
855
+ configuredWindsurf: 'Configured Windsurf',
856
+ },
857
+ prompts: {
858
+ targets: '[--client] Which tools would you like to add the HubSpot CLI MCP server to?',
859
+ targetsRequired: 'Must choose at least one application to configure.',
860
+ },
861
+ },
862
+ start: {
863
+ errors: {
864
+ needsNode20: `This feature requires node >=20`,
865
+ serverFileNotFound: (serverPath) => `MCP server file not found at ${serverPath}`,
866
+ failedToStart: 'Failed to start MCP server',
867
+ },
868
+ startingServer: 'Starting HubSpot CLI MCP server...',
869
+ stopInstructions: 'Press Ctrl+C to stop the server',
870
+ stoppedSuccessfully: 'Stopped successfully.',
871
+ shuttingDown: 'Shutting down MCP server...',
872
+ },
873
+ },
736
874
  mv: {
737
875
  describe: 'Move a remote file or folder in HubSpot. This feature is currently in beta and the CLI contract is subject to change.',
738
876
  errors: {
@@ -756,23 +894,97 @@ exports.commands = {
756
894
  selectLink: 'Select a link to open',
757
895
  },
758
896
  project: {
897
+ profile: {
898
+ describe: 'Commands for managing project profiles',
899
+ 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 ${(0, ui_1.uiCommandReference)('hs project profile add')} to get started!`,
900
+ add: {
901
+ describe: 'Add a new project profile',
902
+ verboseDescribe: `Add a new project profile\n\nProfiles enable you to reference variables in your component configuration files. Use the syntax ${chalk_1.default.bold('\${VARIABLE_NAME}')} to reference profile variables in your component configuration files. Then target the profile using the ${(0, ui_1.uiCommandReference)('--profile')} flag when you upload your project.`,
903
+ example: 'Add a new project profile named hsprofile.qa.json',
904
+ logs: {
905
+ copyExistingProfile: (profileName) => `Found an existing profile. We can copy the variables from ${chalk_1.default.bold(profileName)} into your new profile.`,
906
+ copyExistingProfiles: 'We can copy the variables from one of your existing profiles into your new profile.',
907
+ profileAdded: (profileName) => `Project profile ${chalk_1.default.bold(profileName)} was successfully added`,
908
+ },
909
+ prompts: {
910
+ namePrompt: 'Enter a name for the new project profile: ',
911
+ emptyName: 'Profile name cannot be empty',
912
+ targetAccountPrompt: '[target-account] Select a target account for this profile',
913
+ copyExistingProfilePrompt: 'Select a profile to copy variables from',
914
+ copyExistingProfilePromptEmpty: "Skip (don't copy any variables)",
915
+ invalidProfileName: 'Profile name cannot contain special characters or spaces',
916
+ },
917
+ warnings: {
918
+ duplicateTargetAccount: (targetAccountId) => `The account ${(0, ui_1.uiAccountDescription)(targetAccountId)} is being used in an existing profile. Make sure to edit your project's name between uploads if you do not want to overwrite the existing project in this account.`,
919
+ },
920
+ errors: {
921
+ noProjectConfig: 'No project config found. Please run this command from a project directory.',
922
+ profileExists: (profileName) => `Profile ${chalk_1.default.bold(profileName)} already exists. Please choose a different name.`,
923
+ invalidTargetAccount: 'Target account is not configured in the CLI',
924
+ noAccountsConfigured: 'No accounts configured in the CLI',
925
+ failedToLoadProfile: (profileName) => `Unable to copy variables. Failed to load profile ${chalk_1.default.bold(profileName)}`,
926
+ failedToCreateProfile: 'Failed to create profile',
927
+ },
928
+ positionals: {
929
+ name: 'The name of the project profile',
930
+ },
931
+ options: {
932
+ targetAccount: 'The target account ID for this profile',
933
+ },
934
+ },
935
+ delete: {
936
+ describe: 'Delete an existing project profile',
937
+ example: 'Delete a project profile named hsprofile.qa.json',
938
+ logs: {
939
+ profileDeleted: (profileName) => `Project profile ${chalk_1.default.bold(profileName)} was successfully deleted`,
940
+ deletedProject: (accountId) => `Successfully deleted the project from ${(0, ui_1.uiAccountDescription)(accountId)}`,
941
+ didNotDeleteProject: (accountId) => `Did not delete the project from ${(0, ui_1.uiAccountDescription)(accountId)}`,
942
+ },
943
+ debug: {
944
+ failedToLoadProfile: (profileName) => `Failed to load profile ${chalk_1.default.bold(profileName)}`,
945
+ },
946
+ prompts: {
947
+ deleteProfilePrompt: 'Select a profile to delete from your project',
948
+ deleteProjectPrompt: (accountId) => `Would you like to delete this project from ${(0, ui_1.uiAccountDescription)(accountId)}?`,
949
+ },
950
+ errors: {
951
+ noProjectConfig: 'No project config found. Please run this command from a project directory.',
952
+ noProfileFound: (profileName) => `No profile with filename ${chalk_1.default.bold(profileName)} found in your project.`,
953
+ noProfilesFound: 'No profiles found in your project.',
954
+ failedToDeleteProfile: (profileName) => `Unable to delete profile ${chalk_1.default.bold(profileName)}. Please try again.`,
955
+ },
956
+ positionals: {
957
+ name: 'The name of the project profile',
958
+ },
959
+ },
960
+ },
759
961
  dev: {
760
962
  describe: 'Start local dev for the current project.',
761
963
  logs: {
762
964
  betaMessage: 'HubSpot projects local development',
763
965
  placeholderAccountSelection: 'Using default account as target account (for now)',
764
966
  learnMoreLocalDevServer: 'Learn more about the projects local dev server',
967
+ 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.',
968
+ learnMoreMessage: `\nVisit our ${(0, ui_1.uiLink)('docs on Developer Test and Sandbox accounts', 'https://developers.hubspot.com/docs/getting-started/account-types')} to learn more.`,
765
969
  },
766
970
  errors: {
767
971
  noProjectConfig: 'No project detected. Please run this command again from a project directory.',
768
- noAccount: (accountId, authCommand) => `An error occurred while reading account ${accountId} from your config. Run ${chalk_1.default.bold(authCommand)} to re-auth this account.`,
769
- noAccountsInConfig: authCommand => `No accounts found in your config. Run ${chalk_1.default.bold(authCommand)} to configure a HubSpot account with the CLI.`,
972
+ noAccount: (accountId) => `An error occurred while reading account ${(0, ui_1.uiAccountDescription)(accountId)} from your config. Run ${(0, ui_1.uiCommandReference)('hs auth')} to re-auth this account.`,
973
+ noAccountsInConfig: (authCommand) => `No accounts found in your config. Run ${chalk_1.default.bold(authCommand)} to configure a HubSpot account with the CLI.`,
770
974
  invalidProjectComponents: 'Projects cannot contain both private and public apps. Move your apps to separate projects before attempting local development.',
771
- noRunnableComponents: command => `No supported components were found in this project. Run ${chalk_1.default.bold(command)} to see a list of available components and add one to your project.`,
975
+ noRunnableComponents: `No supported components were found in this project. Run ${(0, ui_1.uiCommandReference)('hs project add')} to see a list of available components and add one to your project.`,
976
+ 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 ${(0, ui_1.uiCommandReference)('hs account use')}.`,
977
+ unsupportedAccountFlagLegacy: 'The --projectAccount and --testingAccount flags are not supported for projects with platform versions earlier than 2025.2.',
978
+ unsupportedAccountFlagV3: 'The --account flag is is not supported supported for projects with platform versions 2025.2 and newer. Use --testingAccount and --projectAccount flags to specify accounts to use for local dev',
772
979
  },
773
980
  examples: {
774
981
  default: 'Start local dev for the current project',
775
982
  },
983
+ options: {
984
+ profile: 'The profile to target during local dev',
985
+ projectAccount: 'The id of the account to upload your project to. Only compatible with platform versions 2025.2 and above.',
986
+ testingAccount: 'The id of the account to install apps and test on. Only compatible with platform versions 2025.2 and above.',
987
+ },
776
988
  },
777
989
  create: {
778
990
  describe: 'Create a new project.',
@@ -780,11 +992,16 @@ exports.commands = {
780
992
  failedToDownloadProject: 'Failed to download project. Please try again later.',
781
993
  invalidTemplateSource: 'Invalid template source provided. Use the format <Owner>/<Repo> and try again.',
782
994
  failedToFetchProjectList: 'Failed to fetch the list of available project templates. Please try again later.',
783
- cannotNestProjects: projectDir => `A project already exists at ${projectDir}. Projects cannot be nested within other projects. Please choose a different destination and try again.`,
995
+ cannotNestProjects: (projectDir) => `A project already exists at ${projectDir}. Projects cannot be nested within other projects. Please choose a different destination and try again.`,
784
996
  },
785
997
  logs: {
786
- success: (projectName, projectDest) => `Project ${chalk_1.default.bold(projectName)} was successfully created in ${projectDest}`,
787
- welcomeMessage: 'Welcome to HubSpot Developer Projects!',
998
+ success: (projectName, projectDest) => `\nProject ${chalk_1.default.bold(projectName)} was successfully created in ${projectDest}`,
999
+ welcomeMessage: `\n${chalk_1.default.bold('Welcome to HubSpot Developer Projects!')}`,
1000
+ },
1001
+ prompts: {
1002
+ parentComponents: '[--project-base] What would you like in your project?',
1003
+ emptyProject: 'Empty Project',
1004
+ app: 'App',
788
1005
  },
789
1006
  examples: {
790
1007
  default: 'Create a new project',
@@ -803,6 +1020,21 @@ exports.commands = {
803
1020
  templateSource: {
804
1021
  describe: 'Path to custom GitHub repository from which to create project template',
805
1022
  },
1023
+ platformVersion: {
1024
+ describe: 'The target platform version for the new project.',
1025
+ },
1026
+ projectBase: {
1027
+ describe: 'The top level component to include in the project.',
1028
+ },
1029
+ distribution: {
1030
+ describe: 'How the app will be distributed.',
1031
+ },
1032
+ auth: {
1033
+ describe: 'Authentication model for the application.',
1034
+ },
1035
+ features: {
1036
+ describe: `Features to include in the project. Only valid if project-base is ${v3_1.PROJECT_WITH_APP}`,
1037
+ },
806
1038
  },
807
1039
  },
808
1040
  migrateApp: {
@@ -848,7 +1080,7 @@ exports.commands = {
848
1080
  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.`,
849
1081
  describe: 'Migrate an existing project to the new version of the projects framework.',
850
1082
  errors: {
851
- noProjectConfig: command => `No project detected. Please run this command again from a project directory. If you are trying to migrate an app, run ${command}`,
1083
+ noProjectConfig: (command) => `No project detected. Please run this command again from a project directory. If you are trying to migrate an app, run ${command}`,
852
1084
  },
853
1085
  examples: {
854
1086
  default: 'Migrate an existing project to the new version of the projects framework.',
@@ -870,13 +1102,13 @@ exports.commands = {
870
1102
  cloneStatus: {
871
1103
  inProgress: () => `Cloning app configuration to ${chalk_1.default.bold('public-app.json')} component definition ...`,
872
1104
  done: 'Cloning app configuration to public-app.json component definition ... DONE',
873
- success: dest => `Your cloned project was created in ${dest}`,
1105
+ success: (dest) => `Your cloned project was created in ${dest}`,
874
1106
  failure: 'Cloning app configuration to public-app.json component definition ... FAILED',
875
1107
  },
876
1108
  errors: {
877
1109
  invalidAccountTypeTitle: () => `${chalk_1.default.bold('Developer account not targeted')}`,
878
1110
  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.`,
879
- couldNotWriteConfigPath: configPath => `Failed to write project config at ${configPath}`,
1111
+ couldNotWriteConfigPath: (configPath) => `Failed to write project config at ${configPath}`,
880
1112
  },
881
1113
  },
882
1114
  add: {
@@ -888,11 +1120,23 @@ exports.commands = {
888
1120
  type: {
889
1121
  describe: "The path to the component type's location within the hubspot-project-components Github repo: https://github.com/HubSpot/hubspot-project-components",
890
1122
  },
1123
+ distribution: {
1124
+ describe: 'The distribution method for the application.',
1125
+ },
1126
+ auth: {
1127
+ describe: 'The authentication type for the application.',
1128
+ },
1129
+ features: {
1130
+ describe: 'Which features to include with the application.',
1131
+ },
891
1132
  },
892
- creatingComponent: projectName => `Adding a new component to ${chalk_1.default.bold(projectName)}`,
893
- success: componentName => `${componentName} was successfully added to your project.`,
1133
+ creatingComponent: (projectName) => `\nAdding a new component to ${chalk_1.default.bold(projectName)}\n`,
1134
+ success: (componentName, multiple = false) => `${componentName || 'An app'} ${multiple ? 'were' : 'was'} successfully added to your ${componentName ? 'app' : 'project'}.`,
894
1135
  error: {
895
1136
  failedToDownloadComponent: 'Failed to download project component. Please try again later.',
1137
+ maxExceeded: (maxCount) => `This project has the maximum allowed(${maxCount})`,
1138
+ authTypeNotAllowed: (authType) => `Auth type '${authType}' not allowed.`,
1139
+ distributionNotAllowed: (dist) => `Distribution '${dist}' not allowed.`,
896
1140
  locationInProject: 'This command must be run from within a project directory.',
897
1141
  failedToFetchComponentList: 'Failed to fetch the list of available components. Please try again later.',
898
1142
  projectContainsPublicApp: 'This project contains a public app. This command is currently only compatible with projects that contain private apps.',
@@ -906,10 +1150,10 @@ exports.commands = {
906
1150
  describe: 'Deploy a project build.',
907
1151
  deployBuildIdPrompt: '[--build] Deploy which build?',
908
1152
  debug: {
909
- deploying: path => `Deploying project at path: ${path}`,
1153
+ deploying: (path) => `Deploying project at path: ${path}`,
910
1154
  },
911
1155
  errors: {
912
- deploy: details => `Deploy error: ${details}`,
1156
+ deploy: (details) => `Deploy error: ${details}`,
913
1157
  noBuilds: 'Deploy error: no builds for this project were found.',
914
1158
  noBuildId: 'You must specify a build to deploy',
915
1159
  projectNotFound: (projectName, accountIdentifier, command) => `The project ${chalk_1.default.bold(projectName)} does not exist in account ${accountIdentifier}. Run ${command} to upload your project files to HubSpot.`,
@@ -938,7 +1182,7 @@ exports.commands = {
938
1182
  showingRecentBuilds: (count, projectName, viewAllBuildsLink) => `Showing the most ${count} recent builds for ${projectName}. ${viewAllBuildsLink}.`,
939
1183
  errors: {
940
1184
  noBuilds: 'No builds for this project were found.',
941
- projectNotFound: projectName => `Project ${projectName} not found.`,
1185
+ projectNotFound: (projectName) => `Project ${projectName} not found.`,
942
1186
  },
943
1187
  options: {
944
1188
  project: {
@@ -959,15 +1203,15 @@ exports.commands = {
959
1203
  failedToFetchProjectDetails: 'There was an error fetching project details',
960
1204
  noFunctionsLinkText: 'Visit developer docs',
961
1205
  noFunctionsInProject: `There aren't any functions in this project\n\t- Run ${(0, ui_1.uiCommandReference)('hs project logs --help')} to learn more about logs\n\t- ${(0, ui_1.uiLink)('Visit developer docs', 'https://developers.hubspot.com/docs/platform/serverless-functions')} to learn more about serverless functions`,
962
- noFunctionWithName: name => `No function with name "${name}"`,
963
- functionNotDeployed: name => `The function with name "${name}" is not deployed`,
1206
+ noFunctionWithName: (name) => `No function with name "${name}"`,
1207
+ functionNotDeployed: (name) => `The function with name "${name}" is not deployed`,
964
1208
  projectLogsManagerNotInitialized: 'Function called on ProjectLogsManager before initialization',
965
1209
  generic: 'Error fetching logs',
966
1210
  },
967
1211
  logs: {
968
1212
  showingLogs: 'Showing logs for:',
969
1213
  hubspotLogsDirectLink: 'View function logs in HubSpot',
970
- noLogsFound: name => `No logs were found for "${name}"`,
1214
+ noLogsFound: (name) => `No logs were found for "${name}"`,
971
1215
  },
972
1216
  table: {
973
1217
  accountHeader: 'Account',
@@ -1005,10 +1249,10 @@ exports.commands = {
1005
1249
  default: 'Upload a project into your HubSpot account',
1006
1250
  },
1007
1251
  logs: {
1008
- buildSucceeded: buildId => `Build #${buildId} succeeded\n`,
1252
+ buildSucceeded: (buildId) => `Build #${buildId} succeeded\n`,
1009
1253
  readyToGoLive: '🚀 Ready to take your project live?',
1010
- runCommand: command => `Run \`${command}\``,
1011
- autoDeployDisabled: deployCommand => `Automatic deploys are disabled for this project. Run ${deployCommand} to deploy this build.`,
1254
+ runCommand: (command) => `Run \`${command}\``,
1255
+ autoDeployDisabled: (deployCommand) => `Automatic deploys are disabled for this project. Run ${deployCommand} to deploy this build.`,
1012
1256
  },
1013
1257
  errors: {
1014
1258
  projectLockedError: () => `Your project is locked. This may mean that another user is running the ${chalk_1.default.bold('`hs project dev`')} command for this project. If this is you, unlock the project in Projects UI.`,
@@ -1032,9 +1276,9 @@ exports.commands = {
1032
1276
  watchCancelledFromUi: `The watch process has been cancelled from the UI. Any changes made since cancelling have not been uploaded. To resume watching, rerun ${(0, ui_1.uiCommandReference)('hs project watch')}.`,
1033
1277
  resuming: 'Resuming watcher...',
1034
1278
  uploadSucceeded: (remotePath, filePath) => `Uploaded file "${filePath}" to "${remotePath}"`,
1035
- deleteFileSucceeded: remotePath => `Deleted file "${remotePath}"`,
1036
- deleteFolderSucceeded: remotePath => `Deleted folder "${remotePath}"`,
1037
- watching: projectDir => `Watcher is ready and watching "${projectDir}". Any changes detected will be automatically uploaded.`,
1279
+ deleteFileSucceeded: (remotePath) => `Deleted file "${remotePath}"`,
1280
+ deleteFolderSucceeded: (remotePath) => `Deleted folder "${remotePath}"`,
1281
+ watching: (projectDir) => `Watcher is ready and watching "${projectDir}". Any changes detected will be automatically uploaded.`,
1038
1282
  previousStagingBuildCancelled: 'Killed the previous watch process. Please try running `hs project watch` again',
1039
1283
  },
1040
1284
  options: {
@@ -1045,18 +1289,18 @@ exports.commands = {
1045
1289
  debug: {
1046
1290
  pause: 'Pausing watcher, attempting to queue build',
1047
1291
  buildStarted: 'Build queued.',
1048
- extensionNotAllowed: filePath => `Skipping "${filePath}" due to unsupported extension`,
1049
- ignored: filePath => `Skipping "${filePath}" due to an ignore rule`,
1292
+ extensionNotAllowed: (filePath) => `Skipping "${filePath}" due to unsupported extension`,
1293
+ ignored: (filePath) => `Skipping "${filePath}" due to an ignore rule`,
1050
1294
  uploading: (filePath, remotePath) => `Attempting to upload file "${filePath}" to "${remotePath}"`,
1051
1295
  attemptNewBuild: 'Attempting to create a new build',
1052
- fileAlreadyQueued: filePath => `File "${filePath}" is already queued for upload`,
1296
+ fileAlreadyQueued: (filePath) => `File "${filePath}" is already queued for upload`,
1053
1297
  },
1054
1298
  errors: {
1055
1299
  projectConfigNotFound: 'No project config found. Please ensure that you are in a project directory.',
1056
1300
  projectLockedError: `Your project is locked. This may mean that another user is running the ${chalk_1.default.bold(`hs project dev`)} command for this project. If this is you, unlock the project in Projects UI.`,
1057
1301
  uploadFailed: (remotePath, filePath) => `Failed to upload file "${filePath}" to "${remotePath}"`,
1058
- deleteFileFailed: remotePath => `Failed to delete file "${remotePath}"`,
1059
- deleteFolderFailed: remotePath => `Failed to delete folder "${remotePath}"`,
1302
+ deleteFileFailed: (remotePath) => `Failed to delete file "${remotePath}"`,
1303
+ deleteFolderFailed: (remotePath) => `Failed to delete folder "${remotePath}"`,
1060
1304
  },
1061
1305
  },
1062
1306
  download: {
@@ -1097,25 +1341,13 @@ exports.commands = {
1097
1341
  examples: {
1098
1342
  default: 'Opens the projects page for the specified account',
1099
1343
  },
1100
- success: projectName => `Successfully opened "${projectName}"`,
1344
+ success: (projectName) => `Successfully opened "${projectName}"`,
1101
1345
  },
1102
1346
  feedback: {
1103
- describe: 'Leave feedback on HubSpot projects or file a bug report.',
1104
- feedbackType: {
1105
- prompt: 'What type of feedback would you like to leave?',
1106
- bug: '[--bug] Report a bug',
1107
- general: "[--general] Tell us about your experience with HubSpot's developer tools",
1108
- },
1109
- openPrompt: 'Create a Github issue in your browser?',
1110
- success: url => `We opened ${url} in your browser.`,
1111
- options: {
1112
- bug: {
1113
- describe: 'Open Github issues in your browser to report a bug.',
1114
- },
1115
- general: {
1116
- describe: 'Open Github issues in your browser to give feedback.',
1117
- },
1118
- },
1347
+ describe: 'Leave feedback or file a bug report.',
1348
+ openPrompt: 'Open the feedback form in your browser?',
1349
+ success: (url) => `We opened ${(0, ui_1.uiLink)('the developer feedback form', url)} in your browser.`,
1350
+ error: (url) => `Navigate to ${(0, ui_1.uiLink)('the developer feedback form', url)} to leave feedback.`,
1119
1351
  },
1120
1352
  installDeps: {
1121
1353
  help: {
@@ -1125,25 +1357,37 @@ exports.commands = {
1125
1357
  },
1126
1358
  installLocationPrompt: 'Choose the project components to install the dependencies:',
1127
1359
  installLocationPromptRequired: 'You must choose at least one subcomponent',
1128
- installingDependencies: directory => `Installing dependencies in ${directory}`,
1129
- installationSuccessful: directory => `Installed dependencies in ${directory}`,
1360
+ installingDependencies: (directory) => `Installing dependencies in ${directory}`,
1361
+ installationSuccessful: (directory) => `Installed dependencies in ${directory}`,
1130
1362
  addingDependenciesToLocation: (dependencies, directory) => `Installing ${dependencies} in ${directory}`,
1131
- installingDependenciesFailed: directory => `Installing dependencies for ${directory} failed`,
1363
+ installingDependenciesFailed: (directory) => `Installing dependencies for ${directory} failed`,
1132
1364
  noProjectConfig: 'No project detected. Run this command from a project directory.',
1133
1365
  noPackageJsonInProject: (projectName, link) => `No dependencies to install. The project ${projectName} folder might be missing component or subcomponent files. ${link}`,
1134
1366
  packageManagerNotInstalled: (packageManager, link) => `This command depends on ${packageManager}, install ${chalk_1.default.bold(link)}`,
1135
1367
  },
1368
+ validate: {
1369
+ describe: 'Validate the project before uploading',
1370
+ mustBeRanWithinAProject: 'This command must be run from within a project directory.',
1371
+ badVersion: 'This command is only available for projects 2025.2 and later.',
1372
+ examples: {
1373
+ default: 'Validate the project before uploading',
1374
+ },
1375
+ success: (projectName) => `Project ${projectName} is valid and ready to upload`,
1376
+ options: {
1377
+ profile: {
1378
+ describe: 'The profile to target for this validation',
1379
+ },
1380
+ },
1381
+ },
1136
1382
  },
1137
1383
  remove: {
1138
- describe: 'Delete a file or folder from HubSpot.',
1139
- deleted: (path, accountId) => `Deleted "${path}" from account ${accountId}`,
1384
+ describe: 'Delete a file or folder from the HubSpot CMS.',
1385
+ deleted: (path, accountId) => `Deleted "${path}" from account ${(0, ui_1.uiAccountDescription)(accountId)}`,
1140
1386
  errors: {
1141
- deleteFailed: (path, accountId) => `Deleting "${path}" from account ${accountId} failed`,
1387
+ deleteFailed: (path, accountId) => `Deleting "${path}" from account ${(0, ui_1.uiAccountDescription)(accountId)} failed`,
1142
1388
  },
1143
1389
  positionals: {
1144
- path: {
1145
- describe: 'Remote hubspot path',
1146
- },
1390
+ path: 'Remote hubspot path',
1147
1391
  },
1148
1392
  },
1149
1393
  sandbox: {
@@ -1152,8 +1396,8 @@ exports.commands = {
1152
1396
  create: {
1153
1397
  developer: {
1154
1398
  loading: {
1155
- add: accountName => `Creating developer sandbox ${chalk_1.default.bold(accountName)}`,
1156
- fail: accountName => `Failed to create a developer sandbox ${chalk_1.default.bold(accountName)}.`,
1399
+ add: (accountName) => `Creating developer sandbox ${chalk_1.default.bold(accountName)}`,
1400
+ fail: (accountName) => `Failed to create a developer sandbox ${chalk_1.default.bold(accountName)}.`,
1157
1401
  succeed: (accountName, accountId) => `Successfully created a developer sandbox ${chalk_1.default.bold(accountName)} with portalId ${chalk_1.default.bold(accountId)}.`,
1158
1402
  },
1159
1403
  success: {
@@ -1171,8 +1415,8 @@ exports.commands = {
1171
1415
  },
1172
1416
  standard: {
1173
1417
  loading: {
1174
- add: accountName => `Creating standard sandbox ${chalk_1.default.bold(accountName)}`,
1175
- fail: accountName => `Failed to create a standard sandbox ${chalk_1.default.bold(accountName)}.`,
1418
+ add: (accountName) => `Creating standard sandbox ${chalk_1.default.bold(accountName)}`,
1419
+ fail: (accountName) => `Failed to create a standard sandbox ${chalk_1.default.bold(accountName)}.`,
1176
1420
  succeed: (accountName, accountId) => `Successfully created a standard sandbox ${chalk_1.default.bold(accountName)} with portalId ${chalk_1.default.bold(accountId)}.`,
1177
1421
  },
1178
1422
  success: {
@@ -1192,14 +1436,14 @@ exports.commands = {
1192
1436
  delete: {
1193
1437
  describe: 'Delete a sandbox account.',
1194
1438
  debug: {
1195
- deleting: account => `Deleting sandbox account "${account}"`,
1439
+ deleting: (account) => `Deleting sandbox account "${account}"`,
1196
1440
  error: 'Error deleting sandbox account:',
1197
1441
  },
1198
1442
  examples: {
1199
1443
  default: 'Deletes the sandbox account named MySandboxAccount.',
1200
1444
  },
1201
- confirm: account => `Delete sandbox ${chalk_1.default.bold(account)}? All data for this sandbox will be permanently deleted.`,
1202
- defaultAccountWarning: account => `The sandbox ${chalk_1.default.bold(account)} is currently set as the default account.`,
1445
+ confirm: (account) => `Delete sandbox ${chalk_1.default.bold(account)}? All data for this sandbox will be permanently deleted.`,
1446
+ defaultAccountWarning: (account) => `The sandbox ${chalk_1.default.bold(account)} is currently set as the default account.`,
1203
1447
  success: {
1204
1448
  delete: (account, sandboxHubId) => `Sandbox "${account}" with portalId "${sandboxHubId}" was deleted successfully.`,
1205
1449
  deleteDefault: (account, sandboxHubId) => `Sandbox "${account}" with portalId "${sandboxHubId}" was deleted successfully and removed as the default account.`,
@@ -1208,10 +1452,10 @@ exports.commands = {
1208
1452
  failure: {
1209
1453
  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}.`,
1210
1454
  noAccount: 'No account specified. Specify an account by using the --account flag.',
1211
- noSandboxAccounts: authCommand => `There are no sandboxes connected to the CLI. To add a sandbox, run ${authCommand}.`,
1455
+ noSandboxAccounts: (authCommand) => `There are no sandboxes connected to the CLI. To add a sandbox, run ${authCommand}.`,
1212
1456
  noSandboxAccountId: "This sandbox can't be deleted from the CLI because we could not find the associated sandbox account.",
1213
- 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.`,
1214
- objectNotFound: account => `Sandbox ${chalk_1.default.bold(account)} may have been deleted through the UI. The account has been removed from the config.`,
1457
+ 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.`,
1458
+ objectNotFound: (account) => `Sandbox ${chalk_1.default.bold(account)} may have been deleted through the UI. The account has been removed from the config.`,
1215
1459
  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_1.default.bold(url)}.`,
1216
1460
  invalidKey: (account, authCommand) => `Your personal access key for account ${chalk_1.default.bold(account)} is inactive. To re-authenticate, please run ${authCommand}.`,
1217
1461
  },
@@ -1227,9 +1471,9 @@ exports.commands = {
1227
1471
  },
1228
1472
  sync: {
1229
1473
  loading: {
1230
- add: accountName => `Syncing sandbox ${chalk_1.default.bold(accountName)}`,
1231
- fail: accountName => `Failed to sync sandbox ${chalk_1.default.bold(accountName)}.`,
1232
- succeed: accountName => `Successfully synced sandbox ${chalk_1.default.bold(accountName)}.`,
1474
+ add: (accountName) => `Syncing sandbox ${chalk_1.default.bold(accountName)}`,
1475
+ fail: (accountName) => `Failed to sync sandbox ${chalk_1.default.bold(accountName)}.`,
1476
+ succeed: (accountName) => `Successfully synced sandbox ${chalk_1.default.bold(accountName)}.`,
1233
1477
  },
1234
1478
  success: {
1235
1479
  configFileUpdated: (accountName, authType) => `Account "${accountName}" updated using "${authType}"`,
@@ -1243,13 +1487,81 @@ exports.commands = {
1243
1487
  },
1244
1488
  },
1245
1489
  },
1490
+ app: {
1491
+ describe: 'Commands for managing apps.',
1492
+ subcommands: {
1493
+ secret: {
1494
+ describe: 'Commands for managing secrets.',
1495
+ subcommands: {
1496
+ add: {
1497
+ describe: 'Create a new app secret.',
1498
+ positionals: {
1499
+ name: 'Name of the secret',
1500
+ },
1501
+ errors: {
1502
+ noApps: `Please create a new app to add an app secret. Use ${(0, ui_1.uiCommandReference)('hs project create')} to create a new project and begin the app creation process.`,
1503
+ },
1504
+ options: {
1505
+ app: 'The app id to set the secret for',
1506
+ },
1507
+ example: 'Add a secret named "my-secret" to the app with ID 1234567890',
1508
+ success: (appName, secretName) => `App secret "${secretName}" was added to "${appName}"`,
1509
+ },
1510
+ delete: {
1511
+ describe: 'Delete an app secret.',
1512
+ confirmDelete: (appName, secretName) => `Are you sure you want to delete the secret "${secretName}" from "${appName}"?`,
1513
+ deleteCanceled: 'Delete canceled',
1514
+ selectSecret: 'Select the secret you want to delete',
1515
+ errors: {
1516
+ noSecrets: 'No secrets found for the given app',
1517
+ },
1518
+ positionals: {
1519
+ name: 'Name of the secret',
1520
+ },
1521
+ options: {
1522
+ app: 'The app id to delete the secret for',
1523
+ force: 'Force the deletion without confirmation',
1524
+ },
1525
+ example: 'Delete a secret named "my-secret" from the app with ID 1234567890',
1526
+ success: (appName, secretName) => `App secret "${secretName}" was removed from "${appName}"`,
1527
+ },
1528
+ list: {
1529
+ describe: 'List all app secrets.',
1530
+ example: 'List all secrets for the app with ID 1234567890',
1531
+ options: {
1532
+ app: 'The app id to list the secrets for',
1533
+ },
1534
+ errors: {
1535
+ noSecrets: 'No secrets found for the given app',
1536
+ },
1537
+ success: (appName) => `Showing secrets for "${appName}":`,
1538
+ },
1539
+ update: {
1540
+ describe: 'Update an app secret.',
1541
+ selectSecret: 'Select the secret you want to update',
1542
+ errors: {
1543
+ noSecrets: 'No secrets found for the given app',
1544
+ },
1545
+ positionals: {
1546
+ name: 'Name of the secret',
1547
+ },
1548
+ options: {
1549
+ app: 'The app id to update the secret for',
1550
+ },
1551
+ example: 'Update a secret named "my-secret" for the app with ID 1234567890',
1552
+ success: (appName, secretName) => `App secret "${secretName}" was updated in "${appName}"`,
1553
+ },
1554
+ },
1555
+ },
1556
+ },
1557
+ },
1246
1558
  secret: {
1247
1559
  describe: 'Commands for managing secrets.',
1248
1560
  subcommands: {
1249
1561
  add: {
1250
1562
  describe: 'Create a new secret.',
1251
1563
  errors: {
1252
- add: secretName => `The secret "${secretName}" was not added`,
1564
+ add: (secretName) => `The secret "${secretName}" was not added`,
1253
1565
  alreadyExists: (secretName, command) => `The secret "${secretName}" already exists, it's value can be modified with ${command}`,
1254
1566
  },
1255
1567
  positionals: {
@@ -1265,10 +1577,10 @@ exports.commands = {
1265
1577
  describe: 'Delete a secret.',
1266
1578
  selectSecret: 'Select the secret you want to delete',
1267
1579
  deleteCanceled: 'Delete canceled',
1268
- confirmDelete: secretName => `Are you sure you want to delete the secret "${secretName}"?`,
1580
+ confirmDelete: (secretName) => `Are you sure you want to delete the secret "${secretName}"?`,
1269
1581
  errors: {
1270
- delete: secretName => `The secret "${secretName}" was not deleted`,
1271
- noSecret: secretName => `Unable to delete secret with name "${secretName}", it does not exist`,
1582
+ delete: (secretName) => `The secret "${secretName}" was not deleted`,
1583
+ noSecret: (secretName) => `Unable to delete secret with name "${secretName}", it does not exist`,
1272
1584
  },
1273
1585
  positionals: {
1274
1586
  name: {
@@ -1284,14 +1596,14 @@ exports.commands = {
1284
1596
  errors: {
1285
1597
  list: 'The secrets could not be listed',
1286
1598
  },
1287
- groupLabel: accountIdentifier => `Secrets for account ${accountIdentifier}:`,
1599
+ groupLabel: (accountIdentifier) => `Secrets for account ${accountIdentifier}:`,
1288
1600
  },
1289
1601
  update: {
1290
1602
  describe: 'Update an existing secret.',
1291
1603
  selectSecret: 'Select the secret you want to update',
1292
1604
  errors: {
1293
- update: secretName => `The secret "${secretName}" was not updated`,
1294
- noSecret: secretName => `Unable to update secret with name "${secretName}", it does not exist`,
1605
+ update: (secretName) => `The secret "${secretName}" was not updated`,
1606
+ noSecret: (secretName) => `Unable to update secret with name "${secretName}", it does not exist`,
1295
1607
  },
1296
1608
  positionals: {
1297
1609
  name: {
@@ -1311,31 +1623,29 @@ exports.commands = {
1311
1623
  generateSelectors: {
1312
1624
  describe: 'Automatically generates an editor-preview.json file for the given theme. The selectors this command generates are not perfect, so please edit editor-preview.json after running.',
1313
1625
  errors: {
1314
- invalidPath: themePath => `Could not find directory "${themePath}"`,
1626
+ invalidPath: (themePath) => `Could not find directory "${themePath}"`,
1315
1627
  fieldsNotFound: "Unable to find theme's fields.json.",
1316
1628
  noSelectorsFound: 'No selectors found.',
1317
1629
  },
1318
1630
  success: (themePath, selectorsPath) => `Selectors generated for ${themePath}, please double check the selectors generated at ${selectorsPath} before uploading the theme.`,
1319
1631
  positionals: {
1320
- path: {
1321
- describe: "The path of the theme you'd like to generate an editor-preview.json for.",
1322
- },
1632
+ path: "The path of the theme you'd like to generate an editor-preview.json for.",
1323
1633
  },
1324
1634
  },
1325
1635
  marketplaceValidate: {
1326
1636
  describe: 'Validate a theme for the marketplace.',
1327
1637
  errors: {
1328
- invalidPath: path => `The path "${path}" is not a path to a folder in the Design Manager`,
1638
+ invalidPath: (path) => `The path "${path}" is not a path to a folder in the Design Manager`,
1329
1639
  },
1330
1640
  logs: {
1331
- validatingTheme: path => `Validating theme "${path}" \n`,
1641
+ validatingTheme: (path) => `Validating theme "${path}" \n`,
1332
1642
  },
1333
1643
  results: {
1334
1644
  required: 'Required validation results:',
1335
1645
  recommended: 'Recommended validation results:',
1336
1646
  warnings: {
1337
- file: file => `File: ${file}`,
1338
- lineNumber: line => `Line number: ${line}`,
1647
+ file: (file) => `File: ${file}`,
1648
+ lineNumber: (line) => `Line number: ${line}`,
1339
1649
  },
1340
1650
  noErrors: 'No errors',
1341
1651
  },
@@ -1348,27 +1658,18 @@ exports.commands = {
1348
1658
  preview: {
1349
1659
  describe: 'Upload and watch a theme directory on your computer for changes and start a local development server to preview theme changes on a site.',
1350
1660
  errors: {
1351
- invalidPath: path => `The path "${path}" is not a path to a directory`,
1661
+ invalidPath: (path) => `The path "${path}" is not a path to a directory`,
1352
1662
  noThemeComponents: 'Your project has no theme components available to preview.',
1663
+ uploadFailed: (src, dest) => `Uploading file "${src}" to "${dest}" failed`,
1353
1664
  },
1354
1665
  positionals: {
1355
- src: {
1356
- describe: 'Path to the local directory your theme is in, relative to your current working directory',
1357
- },
1358
- dest: {
1359
- describe: 'Path in HubSpot Design Tools. Can be a net new path. If you wish to preview a site page using your theme changes it must match the path of the theme used by the site.',
1360
- },
1666
+ src: 'Path to the local directory your theme is in, relative to your current working directory',
1667
+ dest: 'Path in HubSpot Design Tools. Can be a net new path. If you wish to preview a site page using your theme changes it must match the path of the theme used by the site.',
1361
1668
  },
1362
1669
  options: {
1363
- notify: {
1364
- describe: 'Log to specified file when a watch task is triggered and after workers have gone idle. Ex. --notify path/to/file',
1365
- },
1366
- noSsl: {
1367
- describe: 'Disable HTTPS',
1368
- },
1369
- port: {
1370
- describe: 'The port on which to start the local server',
1371
- },
1670
+ notify: 'Log to specified file when a watch task is triggered and after workers have gone idle. Ex. --notify path/to/file',
1671
+ noSsl: 'Disable HTTPS',
1672
+ port: 'The port on which to start the local server',
1372
1673
  },
1373
1674
  initialUploadProgressBar: {
1374
1675
  start: 'Starting...',
@@ -1387,29 +1688,22 @@ exports.commands = {
1387
1688
  marketplaceValidate: {
1388
1689
  describe: 'Validate a module for the marketplace. Make sure to include the suffix .module in the path to the module within the Design Manager.',
1389
1690
  errors: {
1390
- invalidPath: path => `The path "${path}" is not a path to a module within the Design Manager.`,
1691
+ invalidPath: (path) => `The path "${path}" is not a path to a module within the Design Manager.`,
1391
1692
  },
1392
1693
  logs: {
1393
- validatingModule: path => `Validating module "${path}" \n`,
1394
- },
1395
- options: {
1396
- json: {
1397
- describe: 'Output raw json data',
1398
- },
1694
+ validatingModule: (path) => `Validating module "${path}" \n`,
1399
1695
  },
1400
1696
  results: {
1401
1697
  required: 'Required validation results:',
1402
1698
  recommended: 'Recommended validation results:',
1403
1699
  warnings: {
1404
- file: file => `File: ${file}`,
1405
- lineNumber: line => `Line number: ${line}`,
1700
+ file: (file) => `File: ${file}`,
1701
+ lineNumber: (line) => `Line number: ${line}`,
1406
1702
  },
1407
1703
  noErrors: 'No errors',
1408
1704
  },
1409
1705
  positionals: {
1410
- src: {
1411
- describe: 'Path to the module within the Design Manager.',
1412
- },
1706
+ src: 'Path to the module within the Design Manager.',
1413
1707
  },
1414
1708
  },
1415
1709
  },
@@ -1418,90 +1712,58 @@ exports.commands = {
1418
1712
  describe: 'Upload a folder or file from your computer to the HubSpot CMS.',
1419
1713
  errors: {
1420
1714
  destinationRequired: 'A destination path needs to be passed',
1421
- fileIgnored: path => `The file "${path}" is being ignored via an .hsignore rule`,
1422
- invalidPath: path => `The path "${path}" is not a path to a file or folder`,
1715
+ fileIgnored: (path) => `The file "${path}" is being ignored via an .hsignore rule`,
1716
+ invalidPath: (path) => `The path "${path}" is not a path to a file or folder`,
1423
1717
  uploadFailed: (src, dest) => `Uploading file "${src}" to "${dest}" failed`,
1424
- someFilesFailed: dest => `One or more files failed to upload to "${dest}" in the Design Manager`,
1425
- deleteFailed: (path, accountId) => `Deleting "${path}" from account ${accountId} failed`,
1718
+ someFilesFailed: (dest) => `One or more files failed to upload to "${dest}" in the Design Manager`,
1719
+ deleteFailed: (path, accountId) => `Deleting "${path}" from account ${(0, ui_1.uiAccountDescription)(accountId)} failed`,
1426
1720
  },
1427
1721
  options: {
1428
- options: {
1429
- describe: 'Options to pass to javascript fields files',
1430
- },
1431
- saveOutput: {
1432
- describe: "If true, saves all output from javascript fields files as 'fields.output.json'.",
1433
- },
1434
- convertFields: {
1435
- describe: 'If true, converts any javascript fields files contained in module folder or project root.',
1436
- },
1437
- clean: {
1438
- describe: 'Will delete the destination directory and its contents before uploading. This will also clear the global content associated with any global partial templates and modules.',
1439
- },
1440
- force: {
1441
- describe: 'Skips confirmation prompts when doing a clean upload.',
1442
- },
1722
+ options: 'Options to pass to javascript fields files',
1723
+ saveOutput: "If true, saves all output from javascript fields files as 'fields.output.json'.",
1724
+ convertFields: 'If true, converts any javascript fields files contained in module folder or project root.',
1725
+ clean: 'Will delete the destination directory and its contents before uploading. This will also clear the global content associated with any global partial templates and modules.',
1726
+ force: 'Skips confirmation prompts when doing a clean upload.',
1443
1727
  },
1444
- previewUrl: previewUrl => `To preview this theme, visit: ${previewUrl}`,
1728
+ previewUrl: (previewUrl) => `To preview this theme, visit: ${previewUrl}`,
1445
1729
  positionals: {
1446
- src: {
1447
- describe: 'Path to the local file, relative to your current working directory.',
1448
- },
1449
- dest: {
1450
- describe: 'Path in HubSpot Design Tools, can be a net new path.',
1451
- },
1730
+ src: 'Path to the local file, relative to your current working directory.',
1731
+ dest: 'Path in HubSpot Design Tools, can be a net new path.',
1452
1732
  },
1453
1733
  success: {
1454
- fileUploaded: (src, dest, accountId) => `Uploaded file from "${src}" to "${dest}" in the Design Manager of account ${accountId}`,
1455
- uploadComplete: dest => `Uploading files to "${dest}" in the Design Manager is complete`,
1734
+ fileUploaded: (src, dest, accountId) => `Uploaded file from "${src}" to "${dest}" in the Design Manager of account ${(0, ui_1.uiAccountDescription)(accountId)}`,
1735
+ uploadComplete: (dest) => `Uploading files to "${dest}" in the Design Manager is complete`,
1456
1736
  },
1457
- uploading: (src, dest, accountId) => `Uploading files from "${src}" to "${dest}" in the Design Manager of account ${accountId}`,
1458
- notUploaded: src => `There was an error processing "${src}". The file has not been uploaded.`,
1459
- cleaning: (filePath, accountId) => `Removing "${filePath}" from account ${accountId} and uploading local...`,
1460
- confirmCleanUpload: (filePath, accountId) => `You are about to delete the directory "${filePath}" and its contents on HubSpot account ${accountId} before uploading. This will also clear the global content associated with any global partial templates and modules. Are you sure you want to do this?`,
1737
+ uploading: (src, dest, accountId) => `Uploading files from "${src}" to "${dest}" in the Design Manager of account ${(0, ui_1.uiAccountDescription)(accountId)}`,
1738
+ notUploaded: (src) => `There was an error processing "${src}". The file has not been uploaded.`,
1739
+ cleaning: (filePath, accountId) => `Removing "${filePath}" from account ${(0, ui_1.uiAccountDescription)(accountId)} and uploading local...`,
1740
+ confirmCleanUpload: (filePath, accountId) => `You are about to delete the directory "${filePath}" and its contents on HubSpot account ${(0, ui_1.uiAccountDescription)(accountId)} before uploading. This will also clear the global content associated with any global partial templates and modules. Are you sure you want to do this?`,
1461
1741
  },
1462
1742
  watch: {
1463
1743
  describe: 'Watch a directory on your computer for changes and upload the changed files to the HubSpot CMS.',
1464
1744
  errors: {
1465
- folderFailed: (src, dest, accountId) => `Initial uploading of folder "${src}" to "${dest}" in account ${accountId} had failures`,
1466
- fileFailed: (file, dest, accountId) => `Upload of file "${file}" to "${dest}" in account ${accountId} failed`,
1745
+ folderFailed: (src, dest, accountId) => `Initial uploading of folder "${src}" to "${dest}" in account ${(0, ui_1.uiAccountDescription)(accountId)} had failures`,
1746
+ fileFailed: (file, dest, accountId) => `Upload of file "${file}" to "${dest}" in account ${(0, ui_1.uiAccountDescription)(accountId)} failed`,
1467
1747
  destinationRequired: 'A destination directory needs to be passed',
1468
- invalidPath: path => `The "${path}" is not a path to a directory`,
1748
+ invalidPath: (path) => `The "${path}" is not a path to a directory`,
1469
1749
  },
1470
1750
  options: {
1471
- disableInitial: {
1472
- describe: 'Disable the initial upload when watching a directory (default)',
1473
- },
1474
- initialUpload: {
1475
- describe: 'Upload directory before watching for updates',
1476
- },
1477
- notify: {
1478
- describe: 'Log to specified file when a watch task is triggered and after workers have gone idle. Ex. --notify path/to/file',
1479
- },
1480
- remove: {
1481
- describe: 'Will cause watch to delete files in your HubSpot account that are not found locally.',
1482
- },
1483
- convertFields: {
1484
- describe: 'If true, converts any javascript fields files contained in module folder or project root.',
1485
- },
1486
- saveOutput: {
1487
- describe: "If true, saves all output from javascript fields files as 'fields.output.json'.",
1488
- },
1489
- options: {
1490
- describe: 'Options to pass to javascript fields files',
1491
- },
1751
+ disableInitial: 'Disable the initial upload when watching a directory (default)',
1752
+ initialUpload: 'Upload directory before watching for updates',
1753
+ notify: 'Log to specified file when a watch task is triggered and after workers have gone idle. Ex. --notify path/to/file',
1754
+ remove: 'Will cause watch to delete files in your HubSpot account that are not found locally.',
1755
+ convertFields: 'If true, converts any javascript fields files contained in module folder or project root.',
1756
+ saveOutput: "If true, saves all output from javascript fields files as 'fields.output.json'.",
1757
+ options: 'Options to pass to javascript fields files',
1492
1758
  },
1493
1759
  positionals: {
1494
- src: {
1495
- describe: 'Path to the local directory your files are in, relative to your current working directory',
1496
- },
1497
- dest: {
1498
- describe: 'Path in HubSpot Design Tools. Can be a net new path',
1499
- },
1760
+ src: 'Path to the local directory your files are in, relative to your current working directory',
1761
+ dest: 'Path in HubSpot Design Tools. Can be a net new path',
1500
1762
  },
1501
1763
  warnings: {
1502
- disableInitial: () => `Passing the "${chalk_1.default.bold('--disable-initial')}" option is no longer necessary. Running "${chalk_1.default.bold('hs watch')}" no longer uploads the watched directory by default.`,
1503
- initialUpload: () => `To upload the directory run "${chalk_1.default.bold('hs upload')}" beforehand or add the "${chalk_1.default.bold('--initial-upload')}" option when running "${chalk_1.default.bold('hs watch')}".`,
1504
- notUploaded: path => `The "${chalk_1.default.bold('hs watch')}" command no longer uploads the watched directory when started. The directory "${path}" was not uploaded.`,
1764
+ disableInitial: `Passing the "${chalk_1.default.bold('--disable-initial')}" option is no longer necessary. Running "${(0, ui_1.uiCommandReference)('hs watch')}" no longer uploads the watched directory by default.`,
1765
+ initialUpload: `To upload the directory run "${(0, ui_1.uiCommandReference)('hs upload')}" beforehand or add the "${chalk_1.default.bold('--initial-upload')}" option when running "${(0, ui_1.uiCommandReference)('hs watch')}".`,
1766
+ notUploaded: (path) => `The "${(0, ui_1.uiCommandReference)('hs watch')}" command no longer uploads the watched directory when started. The directory "${path}" was not uploaded.`,
1505
1767
  },
1506
1768
  },
1507
1769
  convertFields: {
@@ -1517,16 +1779,72 @@ exports.commands = {
1517
1779
  },
1518
1780
  },
1519
1781
  errors: {
1520
- invalidPath: path => `The path "${path}" specified in the "--src" flag is not a path to a file or directory`,
1782
+ invalidPath: (path) => `The path "${path}" specified in the "--src" flag is not a path to a file or directory`,
1521
1783
  missingSrc: 'Please specify the path to your javascript fields file or directory with the --src flag.',
1522
1784
  },
1523
1785
  },
1786
+ testAccount: {
1787
+ describe: 'Commands for working with test accounts.',
1788
+ create: {
1789
+ describe: 'Create a test account from a config file',
1790
+ configPathPrompt: '[--config-path] Enter the path to the test account config: ',
1791
+ createTestAccountFromConfigPrompt: 'How would you like to create your test account?',
1792
+ createFromConfigOption: 'Create test account from config file',
1793
+ createFromScratchOption: 'Create test account from scratch',
1794
+ errors: {
1795
+ configFileNotFound: (configPath) => `No test account config file exists at ${configPath}. Create a test account config file with the ${(0, ui_1.uiCommandReference)('hs test-account create-config')} command.`,
1796
+ configFileParseFailed: (configPath) => `Failed to parse test account config file at ${configPath}`,
1797
+ failedToCreate: 'Failed to create test account',
1798
+ },
1799
+ success: {
1800
+ configFileUpdated: (testAccountName, testAccountId) => `Test account "${testAccountName}" successfully created with id ${testAccountId}`,
1801
+ },
1802
+ options: {
1803
+ configPath: 'The path to the test account config',
1804
+ },
1805
+ example: (configPath) => `Create a test account from the config file at ${configPath}`,
1806
+ },
1807
+ createConfig: {
1808
+ describe: 'Create a test account config file.',
1809
+ pathPrompt: '[--path] What is the path to the test account config?',
1810
+ errors: {
1811
+ pathError: 'Path is required',
1812
+ pathFormatError: 'Path must end with .json',
1813
+ failedToCreate: 'Failed to create test account config',
1814
+ pathExistsError: 'A file already exists at this path. Please try again with a different path.',
1815
+ },
1816
+ success: {
1817
+ configFileCreated: (path) => `Test account config successfully created at ${path}`,
1818
+ },
1819
+ options: {
1820
+ name: 'The name of the test account',
1821
+ description: 'The description of the test account',
1822
+ tiers: 'The tiers of the test account',
1823
+ path: 'The path to the test account config',
1824
+ },
1825
+ example: (name) => `Create a test account config file with the name "${name}"`,
1826
+ },
1827
+ delete: {
1828
+ describe: 'Delete a test account config file.',
1829
+ pathPrompt: '[--path] What is the path to the test account config?',
1830
+ errors: {
1831
+ failedToDelete: 'Failed to delete test account',
1832
+ },
1833
+ success: {
1834
+ testAccountDeleted: (testAccountId) => `Test account with id ${testAccountId} successfully deleted`,
1835
+ },
1836
+ positionals: {
1837
+ testAccountId: 'The id of the test account',
1838
+ },
1839
+ example: (testAccountId) => `Delete a test account with the id "${testAccountId}"`,
1840
+ },
1841
+ },
1524
1842
  secrets: {
1525
1843
  add: {
1526
1844
  loading: {
1527
- add: secretName => `Adding secret ${chalk_1.default.bold(secretName)}`,
1528
- fail: secretName => `Failed to add secret ${chalk_1.default.bold(secretName)}.`,
1529
- succeed: secretName => `Successfully added secret ${chalk_1.default.bold(secretName)}.`,
1845
+ add: (secretName) => `Adding secret ${chalk_1.default.bold(secretName)}`,
1846
+ fail: (secretName) => `Failed to add secret ${chalk_1.default.bold(secretName)}.`,
1847
+ succeed: (secretName) => `Successfully added secret ${chalk_1.default.bold(secretName)}.`,
1530
1848
  },
1531
1849
  success: {
1532
1850
  configFileUpdated: (secretName, authType) => `Secret "${secretName}" updated using "${authType}"`,
@@ -1541,9 +1859,9 @@ exports.commands = {
1541
1859
  },
1542
1860
  delete: {
1543
1861
  loading: {
1544
- add: secretName => `Deleting secret ${chalk_1.default.bold(secretName)}`,
1545
- fail: secretName => `Failed to delete secret ${chalk_1.default.bold(secretName)}.`,
1546
- succeed: secretName => `Successfully deleted secret ${chalk_1.default.bold(secretName)}.`,
1862
+ add: (secretName) => `Deleting secret ${chalk_1.default.bold(secretName)}`,
1863
+ fail: (secretName) => `Failed to delete secret ${chalk_1.default.bold(secretName)}.`,
1864
+ succeed: (secretName) => `Successfully deleted secret ${chalk_1.default.bold(secretName)}.`,
1547
1865
  },
1548
1866
  success: {
1549
1867
  configFileUpdated: (secretName, authType) => `Secret "${secretName}" updated using "${authType}"`,
@@ -1563,13 +1881,13 @@ exports.commands = {
1563
1881
  succeed: () => `Successfully listed secrets.`,
1564
1882
  },
1565
1883
  success: {
1566
- configFileUpdated: authType => `Secrets updated using "${authType}"`,
1884
+ configFileUpdated: (authType) => `Secrets updated using "${authType}"`,
1567
1885
  },
1568
1886
  failure: {
1569
- invalidUser: parentAccountName => `Couldn't list secrets because your account has been removed from ${chalk_1.default.bold(parentAccountName)} or your permission set doesn't allow you to list secrets. To update your permissions, contact a super admin in ${chalk_1.default.bold(parentAccountName)}.`,
1887
+ invalidUser: (parentAccountName) => `Couldn't list secrets because your account has been removed from ${chalk_1.default.bold(parentAccountName)} or your permission set doesn't allow you to list secrets. To update your permissions, contact a super admin in ${chalk_1.default.bold(parentAccountName)}.`,
1570
1888
  scopes: {
1571
1889
  message: "The personal access key you provided doesn't include secrets permissions.",
1572
- instructions: url => `To update CLI permissions: \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes secrets permissions. \n- Update the CLI config for this account by running ${chalk_1.default.bold('hs auth')} and entering the new key.\n`,
1890
+ instructions: (url) => `To update CLI permissions: \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes secrets permissions. \n- Update the CLI config for this account by running ${chalk_1.default.bold('hs auth')} and entering the new key.\n`,
1573
1891
  },
1574
1892
  },
1575
1893
  },
@@ -1577,9 +1895,9 @@ exports.commands = {
1577
1895
  serverless: {
1578
1896
  add: {
1579
1897
  loading: {
1580
- add: functionName => `Adding serverless function ${chalk_1.default.bold(functionName)}`,
1581
- fail: functionName => `Failed to add serverless function ${chalk_1.default.bold(functionName)}.`,
1582
- succeed: functionName => `Successfully added serverless function ${chalk_1.default.bold(functionName)}.`,
1898
+ add: (functionName) => `Adding serverless function ${chalk_1.default.bold(functionName)}`,
1899
+ fail: (functionName) => `Failed to add serverless function ${chalk_1.default.bold(functionName)}.`,
1900
+ succeed: (functionName) => `Successfully added serverless function ${chalk_1.default.bold(functionName)}.`,
1583
1901
  },
1584
1902
  success: {
1585
1903
  configFileUpdated: (functionName, authType) => `Serverless function "${functionName}" updated using "${authType}"`,
@@ -1594,9 +1912,9 @@ exports.commands = {
1594
1912
  },
1595
1913
  delete: {
1596
1914
  loading: {
1597
- add: functionName => `Deleting serverless function ${chalk_1.default.bold(functionName)}`,
1598
- fail: functionName => `Failed to delete serverless function ${chalk_1.default.bold(functionName)}.`,
1599
- succeed: functionName => `Successfully deleted serverless function ${chalk_1.default.bold(functionName)}.`,
1915
+ add: (functionName) => `Deleting serverless function ${chalk_1.default.bold(functionName)}`,
1916
+ fail: (functionName) => `Failed to delete serverless function ${chalk_1.default.bold(functionName)}.`,
1917
+ succeed: (functionName) => `Successfully deleted serverless function ${chalk_1.default.bold(functionName)}.`,
1600
1918
  },
1601
1919
  success: {
1602
1920
  configFileUpdated: (functionName, authType) => `Serverless function "${functionName}" updated using "${authType}"`,
@@ -1616,13 +1934,13 @@ exports.commands = {
1616
1934
  succeed: () => `Successfully listed serverless functions.`,
1617
1935
  },
1618
1936
  success: {
1619
- configFileUpdated: authType => `Serverless functions updated using "${authType}"`,
1937
+ configFileUpdated: (authType) => `Serverless functions updated using "${authType}"`,
1620
1938
  },
1621
1939
  failure: {
1622
- invalidUser: parentAccountName => `Couldn't list serverless functions because your account has been removed from ${chalk_1.default.bold(parentAccountName)} or your permission set doesn't allow you to list serverless functions. To update your permissions, contact a super admin in ${chalk_1.default.bold(parentAccountName)}.`,
1940
+ invalidUser: (parentAccountName) => `Couldn't list serverless functions because your account has been removed from ${chalk_1.default.bold(parentAccountName)} or your permission set doesn't allow you to list serverless functions. To update your permissions, contact a super admin in ${chalk_1.default.bold(parentAccountName)}.`,
1623
1941
  scopes: {
1624
1942
  message: "The personal access key you provided doesn't include serverless function permissions.",
1625
- instructions: url => `To update CLI permissions: \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes serverless function permissions. \n- Update the CLI config for this account by running ${chalk_1.default.bold('hs auth')} and entering the new key.\n`,
1943
+ instructions: (url) => `To update CLI permissions: \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes serverless function permissions. \n- Update the CLI config for this account by running ${chalk_1.default.bold('hs auth')} and entering the new key.\n`,
1626
1944
  },
1627
1945
  },
1628
1946
  },
@@ -1630,9 +1948,9 @@ exports.commands = {
1630
1948
  serverlessFunctionLogs: {
1631
1949
  add: {
1632
1950
  loading: {
1633
- add: functionName => `Adding serverless function logs ${chalk_1.default.bold(functionName)}`,
1634
- fail: functionName => `Failed to add serverless function logs ${chalk_1.default.bold(functionName)}.`,
1635
- succeed: functionName => `Successfully added serverless function logs ${chalk_1.default.bold(functionName)}.`,
1951
+ add: (functionName) => `Adding serverless function logs ${chalk_1.default.bold(functionName)}`,
1952
+ fail: (functionName) => `Failed to add serverless function logs ${chalk_1.default.bold(functionName)}.`,
1953
+ succeed: (functionName) => `Successfully added serverless function logs ${chalk_1.default.bold(functionName)}.`,
1636
1954
  },
1637
1955
  success: {
1638
1956
  configFileUpdated: (functionName, authType) => `Serverless function logs "${functionName}" updated using "${authType}"`,
@@ -1647,9 +1965,9 @@ exports.commands = {
1647
1965
  },
1648
1966
  delete: {
1649
1967
  loading: {
1650
- add: functionName => `Deleting serverless function logs ${chalk_1.default.bold(functionName)}`,
1651
- fail: functionName => `Failed to delete serverless function logs ${chalk_1.default.bold(functionName)}.`,
1652
- succeed: functionName => `Successfully deleted serverless function logs ${chalk_1.default.bold(functionName)}.`,
1968
+ add: (functionName) => `Deleting serverless function logs ${chalk_1.default.bold(functionName)}`,
1969
+ fail: (functionName) => `Failed to delete serverless function logs ${chalk_1.default.bold(functionName)}.`,
1970
+ succeed: (functionName) => `Successfully deleted serverless function logs ${chalk_1.default.bold(functionName)}.`,
1653
1971
  },
1654
1972
  success: {
1655
1973
  configFileUpdated: (functionName, authType) => `Serverless function logs "${functionName}" updated using "${authType}"`,
@@ -1669,13 +1987,13 @@ exports.commands = {
1669
1987
  succeed: () => `Successfully listed serverless function logs.`,
1670
1988
  },
1671
1989
  success: {
1672
- configFileUpdated: authType => `Serverless function logs updated using "${authType}"`,
1990
+ configFileUpdated: (authType) => `Serverless function logs updated using "${authType}"`,
1673
1991
  },
1674
1992
  failure: {
1675
- invalidUser: parentAccountName => `Couldn't list serverless function logs because your account has been removed from ${chalk_1.default.bold(parentAccountName)} or your permission set doesn't allow you to list serverless function logs. To update your permissions, contact a super admin in ${chalk_1.default.bold(parentAccountName)}.`,
1993
+ invalidUser: (parentAccountName) => `Couldn't list serverless function logs because your account has been removed from ${chalk_1.default.bold(parentAccountName)} or your permission set doesn't allow you to list serverless function logs. To update your permissions, contact a super admin in ${chalk_1.default.bold(parentAccountName)}.`,
1676
1994
  scopes: {
1677
1995
  message: "The personal access key you provided doesn't include serverless function log permissions.",
1678
- instructions: url => `To update CLI permissions: \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes serverless function log permissions. \n- Update the CLI config for this account by running ${chalk_1.default.bold('hs auth')} and entering the new key.\n`,
1996
+ instructions: (url) => `To update CLI permissions: \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes serverless function log permissions. \n- Update the CLI config for this account by running ${chalk_1.default.bold('hs auth')} and entering the new key.\n`,
1679
1997
  },
1680
1998
  },
1681
1999
  },
@@ -1683,9 +2001,9 @@ exports.commands = {
1683
2001
  serverlessFunctionMetrics: {
1684
2002
  add: {
1685
2003
  loading: {
1686
- add: functionName => `Adding serverless function metrics ${chalk_1.default.bold(functionName)}`,
1687
- fail: functionName => `Failed to add serverless function metrics ${chalk_1.default.bold(functionName)}.`,
1688
- succeed: functionName => `Successfully added serverless function metrics ${chalk_1.default.bold(functionName)}.`,
2004
+ add: (functionName) => `Adding serverless function metrics ${chalk_1.default.bold(functionName)}`,
2005
+ fail: (functionName) => `Failed to add serverless function metrics ${chalk_1.default.bold(functionName)}.`,
2006
+ succeed: (functionName) => `Successfully added serverless function metrics ${chalk_1.default.bold(functionName)}.`,
1689
2007
  },
1690
2008
  success: {
1691
2009
  configFileUpdated: (functionName, authType) => `Serverless function metrics "${functionName}" updated using "${authType}"`,
@@ -1700,9 +2018,9 @@ exports.commands = {
1700
2018
  },
1701
2019
  delete: {
1702
2020
  loading: {
1703
- add: functionName => `Deleting serverless function metrics ${chalk_1.default.bold(functionName)}`,
1704
- fail: functionName => `Failed to delete serverless function metrics ${chalk_1.default.bold(functionName)}.`,
1705
- succeed: functionName => `Successfully deleted serverless function metrics ${chalk_1.default.bold(functionName)}.`,
2021
+ add: (functionName) => `Deleting serverless function metrics ${chalk_1.default.bold(functionName)}`,
2022
+ fail: (functionName) => `Failed to delete serverless function metrics ${chalk_1.default.bold(functionName)}.`,
2023
+ succeed: (functionName) => `Successfully deleted serverless function metrics ${chalk_1.default.bold(functionName)}.`,
1706
2024
  },
1707
2025
  success: {
1708
2026
  configFileUpdated: (functionName, authType) => `Serverless function metrics "${functionName}" updated using "${authType}"`,
@@ -1722,13 +2040,13 @@ exports.commands = {
1722
2040
  succeed: () => `Successfully listed serverless function metrics.`,
1723
2041
  },
1724
2042
  success: {
1725
- configFileUpdated: authType => `Serverless function metrics updated using "${authType}"`,
2043
+ configFileUpdated: (authType) => `Serverless function metrics updated using "${authType}"`,
1726
2044
  },
1727
2045
  failure: {
1728
- invalidUser: parentAccountName => `Couldn't list serverless function metrics because your account has been removed from ${chalk_1.default.bold(parentAccountName)} or your permission set doesn't allow you to list serverless function metrics. To update your permissions, contact a super admin in ${chalk_1.default.bold(parentAccountName)}.`,
2046
+ invalidUser: (parentAccountName) => `Couldn't list serverless function metrics because your account has been removed from ${chalk_1.default.bold(parentAccountName)} or your permission set doesn't allow you to list serverless function metrics. To update your permissions, contact a super admin in ${chalk_1.default.bold(parentAccountName)}.`,
1729
2047
  scopes: {
1730
2048
  message: "The personal access key you provided doesn't include serverless function metric permissions.",
1731
- instructions: url => `To update CLI permissions: \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes serverless function metric permissions. \n- Update the CLI config for this account by running ${chalk_1.default.bold('hs auth')} and entering the new key.\n`,
2049
+ instructions: (url) => `To update CLI permissions: \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes serverless function metric permissions. \n- Update the CLI config for this account by running ${chalk_1.default.bold('hs auth')} and entering the new key.\n`,
1732
2050
  },
1733
2051
  },
1734
2052
  },
@@ -1736,9 +2054,9 @@ exports.commands = {
1736
2054
  serverlessFunctionSettings: {
1737
2055
  add: {
1738
2056
  loading: {
1739
- add: functionName => `Adding serverless function settings ${chalk_1.default.bold(functionName)}`,
1740
- fail: functionName => `Failed to add serverless function settings ${chalk_1.default.bold(functionName)}.`,
1741
- succeed: functionName => `Successfully added serverless function settings ${chalk_1.default.bold(functionName)}.`,
2057
+ add: (functionName) => `Adding serverless function settings ${chalk_1.default.bold(functionName)}`,
2058
+ fail: (functionName) => `Failed to add serverless function settings ${chalk_1.default.bold(functionName)}.`,
2059
+ succeed: (functionName) => `Successfully added serverless function settings ${chalk_1.default.bold(functionName)}.`,
1742
2060
  },
1743
2061
  success: {
1744
2062
  configFileUpdated: (functionName, authType) => `Serverless function settings "${functionName}" updated using "${authType}"`,
@@ -1753,9 +2071,9 @@ exports.commands = {
1753
2071
  },
1754
2072
  delete: {
1755
2073
  loading: {
1756
- add: functionName => `Deleting serverless function settings ${chalk_1.default.bold(functionName)}`,
1757
- fail: functionName => `Failed to delete serverless function settings ${chalk_1.default.bold(functionName)}.`,
1758
- succeed: functionName => `Successfully deleted serverless function settings ${chalk_1.default.bold(functionName)}.`,
2074
+ add: (functionName) => `Deleting serverless function settings ${chalk_1.default.bold(functionName)}`,
2075
+ fail: (functionName) => `Failed to delete serverless function settings ${chalk_1.default.bold(functionName)}.`,
2076
+ succeed: (functionName) => `Successfully deleted serverless function settings ${chalk_1.default.bold(functionName)}.`,
1759
2077
  },
1760
2078
  success: {
1761
2079
  configFileUpdated: (functionName, authType) => `Serverless function settings "${functionName}" updated using "${authType}"`,
@@ -1775,13 +2093,13 @@ exports.commands = {
1775
2093
  succeed: () => `Successfully listed serverless function settings.`,
1776
2094
  },
1777
2095
  success: {
1778
- configFileUpdated: authType => `Serverless function settings updated using "${authType}"`,
2096
+ configFileUpdated: (authType) => `Serverless function settings updated using "${authType}"`,
1779
2097
  },
1780
2098
  failure: {
1781
- invalidUser: parentAccountName => `Couldn't list serverless function settings because your account has been removed from ${chalk_1.default.bold(parentAccountName)} or your permission set doesn't allow you to list serverless function settings. To update your permissions, contact a super admin in ${chalk_1.default.bold(parentAccountName)}.`,
2099
+ invalidUser: (parentAccountName) => `Couldn't list serverless function settings because your account has been removed from ${chalk_1.default.bold(parentAccountName)} or your permission set doesn't allow you to list serverless function settings. To update your permissions, contact a super admin in ${chalk_1.default.bold(parentAccountName)}.`,
1782
2100
  scopes: {
1783
2101
  message: "The personal access key you provided doesn't include serverless function setting permissions.",
1784
- instructions: url => `To update CLI permissions: \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes serverless function setting permissions. \n- Update the CLI config for this account by running ${chalk_1.default.bold('hs auth')} and entering the new key.\n`,
2102
+ instructions: (url) => `To update CLI permissions: \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes serverless function setting permissions. \n- Update the CLI config for this account by running ${chalk_1.default.bold('hs auth')} and entering the new key.\n`,
1785
2103
  },
1786
2104
  },
1787
2105
  },
@@ -1789,9 +2107,9 @@ exports.commands = {
1789
2107
  serverlessFunctionVersions: {
1790
2108
  add: {
1791
2109
  loading: {
1792
- add: functionName => `Adding serverless function versions ${chalk_1.default.bold(functionName)}`,
1793
- fail: functionName => `Failed to add serverless function versions ${chalk_1.default.bold(functionName)}.`,
1794
- succeed: functionName => `Successfully added serverless function versions ${chalk_1.default.bold(functionName)}.`,
2110
+ add: (functionName) => `Adding serverless function versions ${chalk_1.default.bold(functionName)}`,
2111
+ fail: (functionName) => `Failed to add serverless function versions ${chalk_1.default.bold(functionName)}.`,
2112
+ succeed: (functionName) => `Successfully added serverless function versions ${chalk_1.default.bold(functionName)}.`,
1795
2113
  },
1796
2114
  success: {
1797
2115
  configFileUpdated: (functionName, authType) => `Serverless function versions "${functionName}" updated using "${authType}"`,
@@ -1806,9 +2124,9 @@ exports.commands = {
1806
2124
  },
1807
2125
  delete: {
1808
2126
  loading: {
1809
- add: functionName => `Deleting serverless function versions ${chalk_1.default.bold(functionName)}`,
1810
- fail: functionName => `Failed to delete serverless function versions ${chalk_1.default.bold(functionName)}.`,
1811
- succeed: functionName => `Successfully deleted serverless function versions ${chalk_1.default.bold(functionName)}.`,
2127
+ add: (functionName) => `Deleting serverless function versions ${chalk_1.default.bold(functionName)}`,
2128
+ fail: (functionName) => `Failed to delete serverless function versions ${chalk_1.default.bold(functionName)}.`,
2129
+ succeed: (functionName) => `Successfully deleted serverless function versions ${chalk_1.default.bold(functionName)}.`,
1812
2130
  },
1813
2131
  success: {
1814
2132
  configFileUpdated: (functionName, authType) => `Serverless function versions "${functionName}" updated using "${authType}"`,
@@ -1828,13 +2146,13 @@ exports.commands = {
1828
2146
  succeed: () => `Successfully listed serverless function versions.`,
1829
2147
  },
1830
2148
  success: {
1831
- configFileUpdated: authType => `Serverless function versions updated using "${authType}"`,
2149
+ configFileUpdated: (authType) => `Serverless function versions updated using "${authType}"`,
1832
2150
  },
1833
2151
  failure: {
1834
- invalidUser: parentAccountName => `Couldn't list serverless function versions because your account has been removed from ${chalk_1.default.bold(parentAccountName)} or your permission set doesn't allow you to list serverless function versions. To update your permissions, contact a super admin in ${chalk_1.default.bold(parentAccountName)}.`,
2152
+ invalidUser: (parentAccountName) => `Couldn't list serverless function versions because your account has been removed from ${chalk_1.default.bold(parentAccountName)} or your permission set doesn't allow you to list serverless function versions. To update your permissions, contact a super admin in ${chalk_1.default.bold(parentAccountName)}.`,
1835
2153
  scopes: {
1836
2154
  message: "The personal access key you provided doesn't include serverless function version permissions.",
1837
- instructions: url => `To update CLI permissions: \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes serverless function version permissions. \n- Update the CLI config for this account by running ${chalk_1.default.bold('hs auth')} and entering the new key.\n`,
2155
+ instructions: (url) => `To update CLI permissions: \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes serverless function version permissions. \n- Update the CLI config for this account by running ${chalk_1.default.bold('hs auth')} and entering the new key.\n`,
1838
2156
  },
1839
2157
  },
1840
2158
  },
@@ -1842,9 +2160,9 @@ exports.commands = {
1842
2160
  serverlessFunctionWebhooks: {
1843
2161
  add: {
1844
2162
  loading: {
1845
- add: functionName => `Adding serverless function webhooks ${chalk_1.default.bold(functionName)}`,
1846
- fail: functionName => `Failed to add serverless function webhooks ${chalk_1.default.bold(functionName)}.`,
1847
- succeed: functionName => `Successfully added serverless function webhooks ${chalk_1.default.bold(functionName)}.`,
2163
+ add: (functionName) => `Adding serverless function webhooks ${chalk_1.default.bold(functionName)}`,
2164
+ fail: (functionName) => `Failed to add serverless function webhooks ${chalk_1.default.bold(functionName)}.`,
2165
+ succeed: (functionName) => `Successfully added serverless function webhooks ${chalk_1.default.bold(functionName)}.`,
1848
2166
  },
1849
2167
  success: {
1850
2168
  configFileUpdated: (functionName, authType) => `Serverless function webhooks "${functionName}" updated using "${authType}"`,
@@ -1859,9 +2177,9 @@ exports.commands = {
1859
2177
  },
1860
2178
  delete: {
1861
2179
  loading: {
1862
- add: functionName => `Deleting serverless function webhooks ${chalk_1.default.bold(functionName)}`,
1863
- fail: functionName => `Failed to delete serverless function webhooks ${chalk_1.default.bold(functionName)}.`,
1864
- succeed: functionName => `Successfully deleted serverless function webhooks ${chalk_1.default.bold(functionName)}.`,
2180
+ add: (functionName) => `Deleting serverless function webhooks ${chalk_1.default.bold(functionName)}`,
2181
+ fail: (functionName) => `Failed to delete serverless function webhooks ${chalk_1.default.bold(functionName)}.`,
2182
+ succeed: (functionName) => `Successfully deleted serverless function webhooks ${chalk_1.default.bold(functionName)}.`,
1865
2183
  },
1866
2184
  success: {
1867
2185
  configFileUpdated: (functionName, authType) => `Serverless function webhooks "${functionName}" updated using "${authType}"`,
@@ -1881,13 +2199,13 @@ exports.commands = {
1881
2199
  succeed: () => `Successfully listed serverless function webhooks.`,
1882
2200
  },
1883
2201
  success: {
1884
- configFileUpdated: authType => `Serverless function webhooks updated using "${authType}"`,
2202
+ configFileUpdated: (authType) => `Serverless function webhooks updated using "${authType}"`,
1885
2203
  },
1886
2204
  failure: {
1887
- invalidUser: parentAccountName => `Couldn't list serverless function webhooks because your account has been removed from ${chalk_1.default.bold(parentAccountName)} or your permission set doesn't allow you to list serverless function webhooks. To update your permissions, contact a super admin in ${chalk_1.default.bold(parentAccountName)}.`,
2205
+ invalidUser: (parentAccountName) => `Couldn't list serverless function webhooks because your account has been removed from ${chalk_1.default.bold(parentAccountName)} or your permission set doesn't allow you to list serverless function webhooks. To update your permissions, contact a super admin in ${chalk_1.default.bold(parentAccountName)}.`,
1888
2206
  scopes: {
1889
2207
  message: "The personal access key you provided doesn't include serverless function webhook permissions.",
1890
- instructions: url => `To update CLI permissions: \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes serverless function webhook permissions. \n- Update the CLI config for this account by running ${chalk_1.default.bold('hs auth')} and entering the new key.\n`,
2208
+ instructions: (url) => `To update CLI permissions: \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes serverless function webhook permissions. \n- Update the CLI config for this account by running ${chalk_1.default.bold('hs auth')} and entering the new key.\n`,
1891
2209
  },
1892
2210
  },
1893
2211
  },
@@ -1895,9 +2213,9 @@ exports.commands = {
1895
2213
  serverlessFunctionWebhookSubscriptions: {
1896
2214
  add: {
1897
2215
  loading: {
1898
- add: functionName => `Adding serverless function webhook subscriptions ${chalk_1.default.bold(functionName)}`,
1899
- fail: functionName => `Failed to add serverless function webhook subscriptions ${chalk_1.default.bold(functionName)}.`,
1900
- succeed: functionName => `Successfully added serverless function webhook subscriptions ${chalk_1.default.bold(functionName)}.`,
2216
+ add: (functionName) => `Adding serverless function webhook subscriptions ${chalk_1.default.bold(functionName)}`,
2217
+ fail: (functionName) => `Failed to add serverless function webhook subscriptions ${chalk_1.default.bold(functionName)}.`,
2218
+ succeed: (functionName) => `Successfully added serverless function webhook subscriptions ${chalk_1.default.bold(functionName)}.`,
1901
2219
  },
1902
2220
  success: {
1903
2221
  configFileUpdated: (functionName, authType) => `Serverless function webhook subscriptions "${functionName}" updated using "${authType}"`,
@@ -1912,9 +2230,9 @@ exports.commands = {
1912
2230
  },
1913
2231
  delete: {
1914
2232
  loading: {
1915
- add: functionName => `Deleting serverless function webhook subscriptions ${chalk_1.default.bold(functionName)}`,
1916
- fail: functionName => `Failed to delete serverless function webhook subscriptions ${chalk_1.default.bold(functionName)}.`,
1917
- succeed: functionName => `Successfully deleted serverless function webhook subscriptions ${chalk_1.default.bold(functionName)}.`,
2233
+ add: (functionName) => `Deleting serverless function webhook subscriptions ${chalk_1.default.bold(functionName)}`,
2234
+ fail: (functionName) => `Failed to delete serverless function webhook subscriptions ${chalk_1.default.bold(functionName)}.`,
2235
+ succeed: (functionName) => `Successfully deleted serverless function webhook subscriptions ${chalk_1.default.bold(functionName)}.`,
1918
2236
  },
1919
2237
  success: {
1920
2238
  configFileUpdated: (functionName, authType) => `Serverless function webhook subscriptions "${functionName}" updated using "${authType}"`,
@@ -1934,13 +2252,13 @@ exports.commands = {
1934
2252
  succeed: () => `Successfully listed serverless function webhook subscriptions.`,
1935
2253
  },
1936
2254
  success: {
1937
- configFileUpdated: authType => `Serverless function webhook subscriptions updated using "${authType}"`,
2255
+ configFileUpdated: (authType) => `Serverless function webhook subscriptions updated using "${authType}"`,
1938
2256
  },
1939
2257
  failure: {
1940
- invalidUser: parentAccountName => `Couldn't list serverless function webhook subscriptions because your account has been removed from ${chalk_1.default.bold(parentAccountName)} or your permission set doesn't allow you to list serverless function webhook subscriptions. To update your permissions, contact a super admin in ${chalk_1.default.bold(parentAccountName)}.`,
2258
+ invalidUser: (parentAccountName) => `Couldn't list serverless function webhook subscriptions because your account has been removed from ${chalk_1.default.bold(parentAccountName)} or your permission set doesn't allow you to list serverless function webhook subscriptions. To update your permissions, contact a super admin in ${chalk_1.default.bold(parentAccountName)}.`,
1941
2259
  scopes: {
1942
2260
  message: "The personal access key you provided doesn't include serverless function webhook subscription permissions.",
1943
- instructions: url => `To update CLI permissions: \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes serverless function webhook subscription permissions. \n- Update the CLI config for this account by running ${chalk_1.default.bold('hs auth')} and entering the new key.\n`,
2261
+ instructions: (url) => `To update CLI permissions: \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes serverless function webhook subscription permissions. \n- Update the CLI config for this account by running ${chalk_1.default.bold('hs auth')} and entering the new key.\n`,
1944
2262
  },
1945
2263
  },
1946
2264
  },
@@ -1948,9 +2266,9 @@ exports.commands = {
1948
2266
  serverlessFunctionWebhookSubscriptionEvents: {
1949
2267
  add: {
1950
2268
  loading: {
1951
- add: functionName => `Adding serverless function webhook subscription events ${chalk_1.default.bold(functionName)}`,
1952
- fail: functionName => `Failed to add serverless function webhook subscription events ${chalk_1.default.bold(functionName)}.`,
1953
- succeed: functionName => `Successfully added serverless function webhook subscription events ${chalk_1.default.bold(functionName)}.`,
2269
+ add: (functionName) => `Adding serverless function webhook subscription events ${chalk_1.default.bold(functionName)}`,
2270
+ fail: (functionName) => `Failed to add serverless function webhook subscription events ${chalk_1.default.bold(functionName)}.`,
2271
+ succeed: (functionName) => `Successfully added serverless function webhook subscription events ${chalk_1.default.bold(functionName)}.`,
1954
2272
  },
1955
2273
  success: {
1956
2274
  configFileUpdated: (functionName, authType) => `Serverless function webhook subscription events "${functionName}" updated using "${authType}"`,
@@ -1965,9 +2283,9 @@ exports.commands = {
1965
2283
  },
1966
2284
  delete: {
1967
2285
  loading: {
1968
- add: functionName => `Deleting serverless function webhook subscription events ${chalk_1.default.bold(functionName)}`,
1969
- fail: functionName => `Failed to delete serverless function webhook subscription events ${chalk_1.default.bold(functionName)}.`,
1970
- succeed: functionName => `Successfully deleted serverless function webhook subscription events ${chalk_1.default.bold(functionName)}.`,
2286
+ add: (functionName) => `Deleting serverless function webhook subscription events ${chalk_1.default.bold(functionName)}`,
2287
+ fail: (functionName) => `Failed to delete serverless function webhook subscription events ${chalk_1.default.bold(functionName)}.`,
2288
+ succeed: (functionName) => `Successfully deleted serverless function webhook subscription events ${chalk_1.default.bold(functionName)}.`,
1971
2289
  },
1972
2290
  success: {
1973
2291
  configFileUpdated: (functionName, authType) => `Serverless function webhook subscription events "${functionName}" updated using "${authType}"`,
@@ -1987,13 +2305,13 @@ exports.commands = {
1987
2305
  succeed: () => `Successfully listed serverless function webhook subscription events.`,
1988
2306
  },
1989
2307
  success: {
1990
- configFileUpdated: authType => `Serverless function webhook subscription events updated using "${authType}"`,
2308
+ configFileUpdated: (authType) => `Serverless function webhook subscription events updated using "${authType}"`,
1991
2309
  },
1992
2310
  failure: {
1993
- invalidUser: parentAccountName => `Couldn't list serverless function webhook subscription events because your account has been removed from ${chalk_1.default.bold(parentAccountName)} or your permission set doesn't allow you to list serverless function webhook subscription events. To update your permissions, contact a super admin in ${chalk_1.default.bold(parentAccountName)}.`,
2311
+ invalidUser: (parentAccountName) => `Couldn't list serverless function webhook subscription events because your account has been removed from ${chalk_1.default.bold(parentAccountName)} or your permission set doesn't allow you to list serverless function webhook subscription events. To update your permissions, contact a super admin in ${chalk_1.default.bold(parentAccountName)}.`,
1994
2312
  scopes: {
1995
2313
  message: "The personal access key you provided doesn't include serverless function webhook subscription event permissions.",
1996
- instructions: url => `To update CLI permissions: \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes serverless function webhook subscription event permissions. \n- Update the CLI config for this account by running ${chalk_1.default.bold('hs auth')} and entering the new key.\n`,
2314
+ instructions: (url) => `To update CLI permissions: \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes serverless function webhook subscription event permissions. \n- Update the CLI config for this account by running ${chalk_1.default.bold('hs auth')} and entering the new key.\n`,
1997
2315
  },
1998
2316
  },
1999
2317
  },
@@ -2001,9 +2319,9 @@ exports.commands = {
2001
2319
  serverlessFunctionWebhookSubscriptionEventTypes: {
2002
2320
  add: {
2003
2321
  loading: {
2004
- add: functionName => `Adding serverless function webhook subscription event types ${chalk_1.default.bold(functionName)}`,
2005
- fail: functionName => `Failed to add serverless function webhook subscription event types ${chalk_1.default.bold(functionName)}.`,
2006
- succeed: functionName => `Successfully added serverless function webhook subscription event types ${chalk_1.default.bold(functionName)}.`,
2322
+ add: (functionName) => `Adding serverless function webhook subscription event types ${chalk_1.default.bold(functionName)}`,
2323
+ fail: (functionName) => `Failed to add serverless function webhook subscription event types ${chalk_1.default.bold(functionName)}.`,
2324
+ succeed: (functionName) => `Successfully added serverless function webhook subscription event types ${chalk_1.default.bold(functionName)}.`,
2007
2325
  },
2008
2326
  success: {
2009
2327
  configFileUpdated: (functionName, authType) => `Serverless function webhook subscription event types "${functionName}" updated using "${authType}"`,
@@ -2018,9 +2336,9 @@ exports.commands = {
2018
2336
  },
2019
2337
  delete: {
2020
2338
  loading: {
2021
- add: functionName => `Deleting serverless function webhook subscription event types ${chalk_1.default.bold(functionName)}`,
2022
- fail: functionName => `Failed to delete serverless function webhook subscription event types ${chalk_1.default.bold(functionName)}.`,
2023
- succeed: functionName => `Successfully deleted serverless function webhook subscription event types ${chalk_1.default.bold(functionName)}.`,
2339
+ add: (functionName) => `Deleting serverless function webhook subscription event types ${chalk_1.default.bold(functionName)}`,
2340
+ fail: (functionName) => `Failed to delete serverless function webhook subscription event types ${chalk_1.default.bold(functionName)}.`,
2341
+ succeed: (functionName) => `Successfully deleted serverless function webhook subscription event types ${chalk_1.default.bold(functionName)}.`,
2024
2342
  },
2025
2343
  success: {
2026
2344
  configFileUpdated: (functionName, authType) => `Serverless function webhook subscription event types "${functionName}" updated using "${authType}"`,
@@ -2040,13 +2358,13 @@ exports.commands = {
2040
2358
  succeed: () => `Successfully listed serverless function webhook subscription event types.`,
2041
2359
  },
2042
2360
  success: {
2043
- configFileUpdated: authType => `Serverless function webhook subscription event types updated using "${authType}"`,
2361
+ configFileUpdated: (authType) => `Serverless function webhook subscription event types updated using "${authType}"`,
2044
2362
  },
2045
2363
  failure: {
2046
- invalidUser: parentAccountName => `Couldn't list serverless function webhook subscription event types because your account has been removed from ${chalk_1.default.bold(parentAccountName)} or your permission set doesn't allow you to list serverless function webhook subscription event types. To update your permissions, contact a super admin in ${chalk_1.default.bold(parentAccountName)}.`,
2364
+ invalidUser: (parentAccountName) => `Couldn't list serverless function webhook subscription event types because your account has been removed from ${chalk_1.default.bold(parentAccountName)} or your permission set doesn't allow you to list serverless function webhook subscription event types. To update your permissions, contact a super admin in ${chalk_1.default.bold(parentAccountName)}.`,
2047
2365
  scopes: {
2048
2366
  message: "The personal access key you provided doesn't include serverless function webhook subscription event type permissions.",
2049
- instructions: url => `To update CLI permissions: \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes serverless function webhook subscription event type permissions. \n- Update the CLI config for this account by running ${chalk_1.default.bold('hs auth')} and entering the new key.\n`,
2367
+ instructions: (url) => `To update CLI permissions: \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes serverless function webhook subscription event type permissions. \n- Update the CLI config for this account by running ${chalk_1.default.bold('hs auth')} and entering the new key.\n`,
2050
2368
  },
2051
2369
  },
2052
2370
  },
@@ -2054,9 +2372,9 @@ exports.commands = {
2054
2372
  serverlessFunctionWebhookSubscriptionEventTypeOptions: {
2055
2373
  add: {
2056
2374
  loading: {
2057
- add: functionName => `Adding serverless function webhook subscription event type options ${chalk_1.default.bold(functionName)}`,
2058
- fail: functionName => `Failed to add serverless function webhook subscription event type options ${chalk_1.default.bold(functionName)}.`,
2059
- succeed: functionName => `Successfully added serverless function webhook subscription event type options ${chalk_1.default.bold(functionName)}.`,
2375
+ add: (functionName) => `Adding serverless function webhook subscription event type options ${chalk_1.default.bold(functionName)}`,
2376
+ fail: (functionName) => `Failed to add serverless function webhook subscription event type options ${chalk_1.default.bold(functionName)}.`,
2377
+ succeed: (functionName) => `Successfully added serverless function webhook subscription event type options ${chalk_1.default.bold(functionName)}.`,
2060
2378
  },
2061
2379
  success: {
2062
2380
  configFileUpdated: (functionName, authType) => `Serverless function webhook subscription event type options "${functionName}" updated using "${authType}"`,
@@ -2071,9 +2389,9 @@ exports.commands = {
2071
2389
  },
2072
2390
  delete: {
2073
2391
  loading: {
2074
- add: functionName => `Deleting serverless function webhook subscription event type options ${chalk_1.default.bold(functionName)}`,
2075
- fail: functionName => `Failed to delete serverless function webhook subscription event type options ${chalk_1.default.bold(functionName)}.`,
2076
- succeed: functionName => `Successfully deleted serverless function webhook subscription event type options ${chalk_1.default.bold(functionName)}.`,
2392
+ add: (functionName) => `Deleting serverless function webhook subscription event type options ${chalk_1.default.bold(functionName)}`,
2393
+ fail: (functionName) => `Failed to delete serverless function webhook subscription event type options ${chalk_1.default.bold(functionName)}.`,
2394
+ succeed: (functionName) => `Successfully deleted serverless function webhook subscription event type options ${chalk_1.default.bold(functionName)}.`,
2077
2395
  },
2078
2396
  success: {
2079
2397
  configFileUpdated: (functionName, authType) => `Serverless function webhook subscription event type options "${functionName}" updated using "${authType}"`,
@@ -2093,13 +2411,13 @@ exports.commands = {
2093
2411
  succeed: () => `Successfully listed serverless function webhook subscription event type options.`,
2094
2412
  },
2095
2413
  success: {
2096
- configFileUpdated: authType => `Serverless function webhook subscription event type options updated using "${authType}"`,
2414
+ configFileUpdated: (authType) => `Serverless function webhook subscription event type options updated using "${authType}"`,
2097
2415
  },
2098
2416
  failure: {
2099
- invalidUser: parentAccountName => `Couldn't list serverless function webhook subscription event type options because your account has been removed from ${chalk_1.default.bold(parentAccountName)} or your permission set doesn't allow you to list serverless function webhook subscription event type options. To update your permissions, contact a super admin in ${chalk_1.default.bold(parentAccountName)}.`,
2417
+ invalidUser: (parentAccountName) => `Couldn't list serverless function webhook subscription event type options because your account has been removed from ${chalk_1.default.bold(parentAccountName)} or your permission set doesn't allow you to list serverless function webhook subscription event type options. To update your permissions, contact a super admin in ${chalk_1.default.bold(parentAccountName)}.`,
2100
2418
  scopes: {
2101
2419
  message: "The personal access key you provided doesn't include serverless function webhook subscription event type option permissions.",
2102
- instructions: url => `To update CLI permissions: \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes serverless function webhook subscription event type option permissions. \n- Update the CLI config for this account by running ${chalk_1.default.bold('hs auth')} and entering the new key.\n`,
2420
+ instructions: (url) => `To update CLI permissions: \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes serverless function webhook subscription event type option permissions. \n- Update the CLI config for this account by running ${chalk_1.default.bold('hs auth')} and entering the new key.\n`,
2103
2421
  },
2104
2422
  },
2105
2423
  },
@@ -2107,22 +2425,24 @@ exports.commands = {
2107
2425
  };
2108
2426
  exports.lib = {
2109
2427
  process: {
2110
- exitDebug: signal => `Attempting to gracefully exit. Triggered by ${signal}`,
2428
+ exitDebug: (signal) => `Attempting to gracefully exit. Triggered by ${signal}`,
2111
2429
  },
2112
2430
  DevServerManager: {
2113
- portConflict: port => `The port ${port} is already in use.`,
2431
+ portConflict: (port) => `The port ${port} is already in use.`,
2114
2432
  notInitialized: 'The Dev Server Manager must be initialized before it is started.',
2115
- noCompatibleComponents: serverKey => `Skipping call to ${serverKey} because there are no compatible components in the project.`,
2433
+ noCompatibleComponents: (serverKey) => `Skipping call to ${serverKey} because there are no compatible components in the project.`,
2116
2434
  },
2117
2435
  LocalDevManager: {
2436
+ appNotFound: (accountId, appUid) => `Unable to find app with uid ${appUid} in account ${(0, ui_1.uiAccountDescription)(accountId)}`,
2118
2437
  failedToInitialize: 'Missing required arguments to initialize Local Dev',
2119
2438
  noDeployedBuild: (projectName, accountIdentifier, uploadCommand) => `Your project ${chalk_1.default.bold(projectName)} exists in ${accountIdentifier}, but has no deployed build. Projects must be successfully deployed to be developed locally. Address any build and deploy errors your project may have, then run ${uploadCommand} to upload and deploy your project.`,
2120
2439
  noComponents: 'There are no components in this project.',
2121
2440
  betaMessage: 'HubSpot projects local development',
2122
- learnMoreLocalDevServer: 'Learn more about the projects local dev server',
2123
- running: (projectName, accountIdentifier) => `Running ${chalk_1.default.bold(projectName)} locally on ${accountIdentifier}, waiting for changes ...`,
2441
+ learnMoreLocalDevServer: (0, ui_1.uiLink)('Learn more about the projects local dev server', 'https://developers.hubspot.com/docs/platform/project-cli-commands#start-a-local-development-server'),
2442
+ running: (projectName, accountIdentifier) => chalk_1.default.hex(ui_1.UI_COLORS.SORBET)(`Running ${chalk_1.default.bold(projectName)} locally on ${accountIdentifier}, waiting for changes ...`),
2124
2443
  quitHelper: `Press ${chalk_1.default.bold('q')} to stop the local dev server`,
2125
- viewProjectLink: 'View project in HubSpot',
2444
+ viewProjectLink: (name, accountId) => (0, ui_1.uiLink)('View project in HubSpot', (0, urls_1.getProjectDetailUrl)(name, accountId) || ''),
2445
+ viewLocalDevUILink: (accountId) => (0, ui_1.uiLink)('View local dev session in HubSpot', (0, urls_1.getLocalDevUiUrl)(accountId)),
2126
2446
  viewTestAccountLink: 'View developer test account in HubSpot',
2127
2447
  exitingStart: 'Stopping local dev server ...',
2128
2448
  exitingSucceed: 'Successfully exited',
@@ -2131,28 +2451,54 @@ exports.lib = {
2131
2451
  uploadWarning: {
2132
2452
  appLabel: '[App]',
2133
2453
  uiExtensionLabel: '[UI Extension]',
2134
- missingComponents: missingComponents => `Couldn't find the following components in the deployed build for this project: ${chalk_1.default.bold(missingComponents)}. This may cause issues in local development.`,
2454
+ missingComponents: (missingComponents) => `Couldn't find the following components in the deployed build for this project: ${chalk_1.default.bold(missingComponents)}. This may cause issues in local development.`,
2135
2455
  defaultWarning: chalk_1.default.bold('Changing project configuration requires a new project build.'),
2136
2456
  defaultPublicAppWarning: (installCount, installText) => `${chalk_1.default.bold('Changing project configuration requires a new project build.')}\n\nThis will affect your public app's ${chalk_1.default.bold(`${installCount} existing ${installText}`)}. If your app has users in production, we strongly recommend creating a copy of this app to test your changes before proceding.`,
2137
- header: warning => `${warning} To reflect these changes and continue testing:`,
2457
+ header: (warning) => `${warning} To reflect these changes and continue testing:`,
2458
+ instructionsHeader: 'To reflect these changes and continue testing:',
2138
2459
  stopDev: ` * Stop ${(0, ui_1.uiCommandReference)('hs project dev')}`,
2139
- runUpload: command => ` * Run ${command}`,
2460
+ runUpload: (command) => ` * Run ${command}`,
2140
2461
  restartDev: ` * Re-run ${(0, ui_1.uiCommandReference)('hs project dev')}`,
2141
2462
  pushToGithub: ' * Commit and push your changes to GitHub',
2142
2463
  defaultMarketplaceAppWarning: (installCount, accountText) => `${chalk_1.default.bold('Changing project configuration requires creating a new project build.')}\n\nYour marketplace app is currently installed in ${chalk_1.default.bold(`${installCount} ${accountText}`)}. Any uploaded changes will impact your app's users. We strongly recommend creating a copy of this app to test your changes before proceding.`,
2143
2464
  },
2144
2465
  activeInstallWarning: {
2145
- installCount: (appName, installCount, installText) => `${chalk_1.default.bold(`The app ${appName} has ${installCount} production ${installText}`)}`,
2466
+ installCount: (appName, installCount) => `${chalk_1.default.bold(`The app ${appName} is installed in ${installCount} production ${installCount === 1 ? 'account' : 'accounts'}`)}`,
2146
2467
  explanation: 'Some changes made during local development may need to be synced to HubSpot, which will impact those existing installs. We strongly recommend creating a copy of this app to use instead.',
2147
2468
  confirmation: `You will always be asked to confirm any permanent changes to your app's configuration before uploading them.`,
2148
2469
  confirmationPrompt: `Proceed with local development of this ${chalk_1.default.bold('production')} app?`,
2149
2470
  },
2150
2471
  devServer: {
2151
- cleanupError: message => `Failed to cleanup local dev server: ${message}`,
2152
- setupError: message => `Failed to setup local dev server: ${message}`,
2153
- startError: message => `Failed to start local dev server: ${message}`,
2154
- fileChangeError: message => `Failed to notify local dev server of file change: ${message}`,
2472
+ cleanupError: (message) => `Failed to cleanup local dev server: ${message}`,
2473
+ setupError: (message) => `Failed to setup local dev server: ${message}`,
2474
+ startError: (message) => `Failed to start local dev server: ${message}`,
2475
+ fileChangeError: (message) => `Failed to notify local dev server of file change: ${message}`,
2476
+ },
2477
+ },
2478
+ AppDevModeInterface: {
2479
+ defaultMarketplaceAppWarning: (installCount) => `\n\nYour marketplace app is currently installed in ${chalk_1.default.bold(`${installCount} ${installCount === 1 ? 'account' : 'accounts'}`)}. Any uploaded changes will impact your app's users. We strongly recommend creating a copy of this app to test your changes before proceding.`,
2480
+ autoInstallDeclined: 'You must install your app on your target test account to proceed with local development.',
2481
+ autoInstallSuccess: (appName, targetTestAccountId) => `Successfully installed app ${appName} on account ${(0, ui_1.uiAccountDescription)(targetTestAccountId)}\n`,
2482
+ autoInstallError: (appName, targetTestAccountId) => `Error installing app ${appName} on account ${(0, ui_1.uiAccountDescription)(targetTestAccountId)}. You may still be able to install your app in your browser.`,
2483
+ },
2484
+ LocalDevWebsocketServer: {
2485
+ errors: {
2486
+ notInitialized: (prefix) => `${prefix}Error: Attempted to access websocket before initialization`,
2487
+ missingTypeField: (data) => `Unsupported message received. Missing type field: ${data}`,
2488
+ unknownMessageType: (type) => `Unsupported message received. Unknown message type: ${type}`,
2489
+ invalidJSON: (data) => `Unsupported message received. Invalid JSON: ${data}`,
2490
+ portManagerNotRunning: (prefix) => `${prefix}Error: PortManagerServing must be running before starting LocalDevWebsocketServer.`,
2491
+ originNotAllowed: (origin) => `Connections from ${origin ? `origin ${origin}` : 'this origin'} are not allowed.`,
2155
2492
  },
2493
+ logs: {
2494
+ startup: (port) => `LocalDevWebsocketServer running on port ${port}`,
2495
+ },
2496
+ },
2497
+ LocalDevProcess: {
2498
+ projectConfigMismatch: `Unable to upload project. The project config has been modified since starting ${(0, ui_1.uiCommandReference)('hs project dev')}.`,
2499
+ uploadInitiated: 'Project upload initiated from Local Dev UI.',
2500
+ uploadFailed: 'Project upload failed. To proceed with local development, fix any necessary errors, then re-upload your project.',
2501
+ uploadSuccess: 'Project upload completed successfully. Resuming local dev...',
2156
2502
  },
2157
2503
  localDevHelpers: {
2158
2504
  confirmDefaultAccountIsTarget: {
@@ -2170,8 +2516,8 @@ exports.lib = {
2170
2516
  publicAppNonDeveloperTestAccountWarning: `Local development of public apps is only supported in ${chalk_1.default.bold('developer test accounts')}.`,
2171
2517
  },
2172
2518
  createNewProjectForLocalDev: {
2173
- projectMustExistExplanation: (projectName, accountIdentifier) => `The project ${projectName} does not exist in the target account ${accountIdentifier}. This command requires the project to exist in the target account.`,
2174
- publicAppProjectMustExistExplanation: (projectName, accountIdentifier) => `The project ${projectName} does not exist in ${accountIdentifier}, the app developer account associated with your target account. This command requires the project to exist in this app developer account.`,
2519
+ projectMustExistExplanation: (projectName, accountId) => `The project ${projectName} does not exist in the target account ${(0, ui_1.uiAccountDescription)(accountId)}. This command requires the project to exist in the target account.`,
2520
+ publicAppProjectMustExistExplanation: (projectName, accountId) => `The project ${projectName} does not exist in ${(0, ui_1.uiAccountDescription)(accountId)}, the app developer account associated with your target account. This command requires the project to exist in this app developer account.`,
2175
2521
  createProject: (projectName, accountIdentifier) => `Create new project ${projectName} in ${accountIdentifier}?`,
2176
2522
  choseNotToCreateProject: 'Exiting because this command requires the project to exist in the target account.',
2177
2523
  creatingProject: (projectName, accountIdentifier) => `Creating project ${projectName} in ${accountIdentifier}`,
@@ -2186,13 +2532,64 @@ exports.lib = {
2186
2532
  checkIfParentAccountIsAuthed: {
2187
2533
  notAuthedError: (parentAccountId, accountIdentifier) => `To develop this project locally, run ${(0, ui_1.uiCommandReference)(`hs auth --account=${parentAccountId}`)} to authenticate the App Developer Account ${parentAccountId} associated with ${accountIdentifier}.`,
2188
2534
  },
2535
+ selectAccountTypePrompt: {
2536
+ message: '[--account] Choose the type of account to test on',
2537
+ developerTestAccountOption: 'Test on a developer test account',
2538
+ sandboxAccountOption: 'Test on a sandbox account',
2539
+ sandboxAccountOptionDisabled: 'Disabled - requires access to sandbox accounts',
2540
+ productionAccountOption: `<${chalk_1.default.red('!')} Test on this account ${chalk_1.default.red('!')}>`,
2541
+ },
2542
+ },
2543
+ middleware: {
2544
+ updateNotification: {
2545
+ notifyTitle: chalk_1.default.bold('Update available'),
2546
+ cmsUpdateNotification: (packageName) => `${chalk_1.default.bold('The CMS CLI is now the HubSpot CLI')}\n\nTo upgrade, uninstall ${chalk_1.default.bold(packageName)}\nand then run ${(0, ui_1.uiCommandReference)('{updateCommand}')}`,
2547
+ cliUpdateNotification: `HubSpot CLI version ${chalk_1.default.cyan(chalk_1.default.bold('{currentVersion}'))} is outdated.\nRun ${(0, ui_1.uiCommandReference)('{updateCommand}')} to upgrade to version ${chalk_1.default.cyan(chalk_1.default.bold('{latestVersion}'))}`,
2548
+ },
2549
+ autoUpdateCLI: {
2550
+ updateAvailable: (latestVersion) => `There's a new HubSpot CLI version available! Updating to version ${chalk_1.default.bold(latestVersion)}`,
2551
+ updateSucceeded: (latestVersion) => `Successfully updated HubSpot CLI to version ${chalk_1.default.bold(latestVersion)}`,
2552
+ notInstalledGlobally: 'Cannot auto-update the HubSpot CLI because NPM is not installed globally',
2553
+ updateFailed: (latestVersion) => `Failed to update HubSpot CLI to version ${chalk_1.default.bold(latestVersion)}`,
2554
+ },
2555
+ },
2556
+ projectProfiles: {
2557
+ logs: {
2558
+ usingProfile: (profileName) => `Using profile from ${chalk_1.default.bold(profileName)}`,
2559
+ profileTargetAccount: (accountId) => `Targeting ${(0, ui_1.uiAccountDescription)(accountId)}`,
2560
+ profileVariables: 'Profile variables',
2561
+ },
2562
+ exitIfUsingProfiles: {
2563
+ errors: {
2564
+ noProfileSpecified: `This project is configured to use profiles, but no profile was specified. Target a profile using the ${(0, ui_1.uiCommandReference)('--profile')} flag.`,
2565
+ },
2566
+ },
2567
+ loadProfile: {
2568
+ errors: {
2569
+ noProjectConfig: 'No project config found. Please run this command from a project directory.',
2570
+ profileNotFound: (profileName) => `Profile ${chalk_1.default.bold(profileName)} not found.`,
2571
+ missingAccountId: (profileName) => `Profile ${chalk_1.default.bold(profileName)} is missing an account id.`,
2572
+ failedToLoadProfile: (profileName) => `Failed to load profile ${chalk_1.default.bold(profileName)}.`,
2573
+ },
2574
+ },
2189
2575
  },
2190
2576
  projects: {
2191
2577
  create: {
2578
+ prompt: {
2579
+ marketPlaceDistribution: 'On the HubSpot marketplace',
2580
+ privateDistribution: 'Privately',
2581
+ distribution: '[--distribution] How would you like to distribute your application?',
2582
+ auth: '[--auth] What type of authentication would you like your application to use',
2583
+ staticAuth: 'Static Auth',
2584
+ oauth: 'OAuth',
2585
+ },
2192
2586
  errors: {
2193
2587
  noProjectsInConfig: 'Unable to find any projects in the target repository\'s config.json file. Please ensure that there is a "projects" array in the config file.',
2194
2588
  missingConfigFileTemplateSource: 'Failed to fetch the config.json file from the target repository. Please ensure that there is a valid config.json file at the root of the repository and try again.',
2195
- missingPropertiesInConfig: 'Found misconfigured projects in the target repository\'s config.json file. Please ensure that each project in the target repository\'s config.json file contains the following properties: ["name", "label", "path", "insertPath"].',
2589
+ missingPropertiesInConfig: 'Found misconfigured projects in the target repository\'s config.json file. Please ensure that each project in the target repository\'s config.json file contains the following properties: ["name", "label", "path"].',
2590
+ exceededMaxNumberOfApps: (max) => `This project currently has the maximum number of apps: ${max}`,
2591
+ unableToParseAppConfig: (file) => `Unable to parse app file: ${file}`,
2592
+ invalidAuthDistCombo: (authType, distribution) => `Invalid distribution and auth combination. Apps with distribution '${distribution}' must have auth '${authType}'`,
2196
2593
  },
2197
2594
  },
2198
2595
  validateProjectConfig: {
@@ -2211,7 +2608,7 @@ exports.lib = {
2211
2608
  notFound: (projectName, accountIdentifier) => `Your project ${chalk_1.default.bold(projectName)} could not be found in ${chalk_1.default.bold(accountIdentifier)}.`,
2212
2609
  },
2213
2610
  pollFetchProject: {
2214
- checkingProject: accountIdentifier => `Checking if project exists in ${accountIdentifier}`,
2611
+ checkingProject: (accountIdentifier) => `Checking if project exists in ${accountIdentifier}`,
2215
2612
  },
2216
2613
  logFeedbackMessage: {
2217
2614
  feedbackHeader: "We'd love to hear your feedback!",
@@ -2222,20 +2619,21 @@ exports.lib = {
2222
2619
  makePollTaskStatusFunc: {
2223
2620
  errorSummary: 'See below for a summary of errors.',
2224
2621
  componentCountSingular: 'Found 1 component in this project\n',
2225
- componentCount: numComponents => `Found ${numComponents} components in this project\n`,
2622
+ componentCount: (numComponents) => `Found ${numComponents} components in this project\n`,
2226
2623
  successStatusText: 'DONE',
2227
2624
  failedStatusText: 'FAILED',
2228
- errorFetchingTaskStatus: taskType => `Error fetching ${taskType} status`,
2625
+ errorFetchingTaskStatus: (taskType) => `Error fetching ${taskType} status`,
2229
2626
  },
2230
- pollBuildAutodeployStatusError: buildId => `Error fetching autodeploy status for build #${buildId}`,
2627
+ pollBuildAutodeployStatusError: (buildId) => `Error fetching autodeploy status for build #${buildId}`,
2231
2628
  pollProjectBuildAndDeploy: {
2232
2629
  buildSucceededAutomaticallyDeploying: (buildId, accountIdentifier) => `Build #${buildId} succeeded. ${chalk_1.default.bold('Automatically deploying')} to ${accountIdentifier}\n`,
2233
- cleanedUpTempFile: path => `Cleaned up temporary file ${path}`,
2234
- viewDeploys: 'View all deploys for this project in HubSpot',
2235
- unableToFindAutodeployStatus: (buildId, viewDeploysLink) => `Unable to find the auto deploy for build #${buildId}. This deploy may have been skipped. ${viewDeploysLink}.`,
2630
+ cleanedUpTempFile: (path) => `Cleaned up temporary file ${path}`,
2631
+ viewDeploys: 'view all deploys for this project in HubSpot',
2632
+ unableToFindAutodeployStatus: (buildId, viewDeploysLink) => `Unable to find the auto deploy for build #${buildId}. This deploy may have been skipped or blocked due to components being removed. Manually deploy with ${(0, ui_1.uiCommandReference)('hs project deploy')} or ${viewDeploysLink}.`,
2236
2633
  },
2237
2634
  },
2238
2635
  projectUpload: {
2636
+ wrongPlatformVersionMetaFiles: `Detected components that require a minimum platform version of ${projects_1.PLATFORM_VERSIONS.v2025_2}. You need to update your platform version in your ${constants_1.PROJECT_CONFIG_FILE} and run ${(0, ui_1.uiCommandReference)('hs project upload')}`,
2239
2637
  uploadProjectFiles: {
2240
2638
  add: (projectName, accountIdentifier) => `Uploading ${chalk_1.default.bold(projectName)} project files to ${accountIdentifier}`,
2241
2639
  fail: (projectName, accountIdentifier) => `Failed to upload ${chalk_1.default.bold(projectName)} project files to ${accountIdentifier}`,
@@ -2243,10 +2641,10 @@ exports.lib = {
2243
2641
  buildCreated: (projectName, buildId) => `Project "${projectName}" uploaded and build #${buildId} created`,
2244
2642
  },
2245
2643
  handleProjectUpload: {
2246
- emptySource: srcDir => `Source directory "${srcDir}" is empty. Add files to your project and rerun ${(0, ui_1.uiCommandReference)('hs project upload')} to upload them to HubSpot.`,
2247
- compressed: byteCount => `Project files compressed: ${byteCount} bytes`,
2248
- compressing: path => `Compressing build files to "${path}"`,
2249
- fileFiltered: filename => `Ignore rule triggered for "${filename}"`,
2644
+ emptySource: (srcDir) => `Source directory "${srcDir}" is empty. Add files to your project and rerun ${(0, ui_1.uiCommandReference)('hs project upload')} to upload them to HubSpot.`,
2645
+ compressed: (byteCount) => `Project files compressed: ${byteCount} bytes`,
2646
+ compressing: (path) => `Compressing build files to "${path}"`,
2647
+ fileFiltered: (filename) => `Ignore rule triggered for "${filename}"`,
2250
2648
  },
2251
2649
  },
2252
2650
  boxen: {
@@ -2271,74 +2669,100 @@ exports.lib = {
2271
2669
  featureKeys: {
2272
2670
  accountOption: {
2273
2671
  command: '--account',
2274
- message: command => `Use the ${command} option with any command to override the default account`,
2672
+ message: (command) => `Use the ${command} option with any command to override the default account`,
2275
2673
  },
2276
2674
  accountsListCommand: {
2277
2675
  command: 'hs accounts list',
2278
- message: command => `Run ${command} to see a list of configured HubSpot accounts`,
2676
+ message: (command) => `Run ${command} to see a list of configured HubSpot accounts`,
2279
2677
  },
2280
2678
  accountsUseCommand: {
2281
2679
  command: 'hs accounts use',
2282
- message: command => `Run ${command} to set the Hubspot account that the CLI will target by default`,
2680
+ message: (command) => `Run ${command} to set the Hubspot account that the CLI will target by default`,
2283
2681
  },
2284
2682
  authCommand: {
2285
2683
  command: 'hs auth',
2286
- message: command => `Run ${command} to connect the CLI to additional HubSpot accounts`,
2684
+ message: (command) => `Run ${command} to connect the CLI to additional HubSpot accounts`,
2287
2685
  },
2288
2686
  feedbackCommand: {
2289
2687
  command: 'hs feedback',
2290
- message: command => `Run ${command} to report a bug or leave feedback`,
2688
+ message: (command) => `Run ${command} to report a bug or leave feedback`,
2291
2689
  },
2292
2690
  helpCommand: {
2293
2691
  command: 'hs help',
2294
- message: command => `Run ${command} to see a list of available commands`,
2692
+ message: (command) => `Run ${command} to see a list of available commands`,
2295
2693
  },
2296
2694
  projectCreateCommand: {
2297
2695
  command: 'hs project create',
2298
- message: command => `Run ${command} to create a new project`,
2696
+ message: (command) => `Run ${command} to create a new project`,
2299
2697
  },
2300
2698
  projectDeployCommand: {
2301
2699
  command: 'hs project deploy',
2302
- message: command => `Ready to take your project live? Run ${command}`,
2700
+ message: (command) => `Ready to take your project live? Run ${command}`,
2303
2701
  },
2304
2702
  projectHelpCommand: {
2305
2703
  command: 'hs project --help',
2306
- message: command => `Run ${command} to learn more about available project commands`,
2704
+ message: (command) => `Run ${command} to learn more about available project commands`,
2307
2705
  },
2308
2706
  projectUploadCommand: {
2309
2707
  command: 'hs project upload',
2310
- message: command => `Run ${command} to upload your project to HubSpot and trigger builds`,
2708
+ message: (command) => `Run ${command} to upload your project to HubSpot and trigger builds`,
2311
2709
  },
2312
2710
  projectDevCommand: {
2313
2711
  command: 'hs project dev',
2314
- message: command => `Run ${command} to set up your test environment and start local development`,
2712
+ message: (command) => `Run ${command} from within your project directory to set up your test environment and start local development`,
2315
2713
  },
2316
2714
  projectInstallDepsCommand: {
2317
2715
  command: 'hs project install-deps',
2318
- message: command => `Run ${command} to install dependencies for your project components`,
2716
+ message: (command) => `Run ${command} to install dependencies for your project components`,
2319
2717
  },
2320
2718
  sampleProjects: {
2321
2719
  linkText: "HubSpot's sample projects",
2322
2720
  url: 'https://developers.hubspot.com/docs/platform/sample-projects?utm_source=cli&utm_content=project_create_whats_next',
2323
- message: link => `See ${link}`,
2721
+ message: (link) => `See ${link}`,
2324
2722
  },
2325
2723
  },
2326
2724
  },
2327
2725
  git: {
2328
2726
  securityIssue: 'Security Issue Detected',
2329
2727
  configFileTracked: 'The HubSpot config file can be tracked by git.',
2330
- fileName: configPath => `File: "${configPath}"`,
2728
+ fileName: (configPath) => `File: "${configPath}"`,
2331
2729
  remediate: 'To remediate:',
2332
- moveConfig: homeDir => `- Move the config file to your home directory: '${homeDir}'`,
2333
- addGitignore: configPath => `- Add gitignore pattern '${configPath}' to a .gitignore file in root of your repository.`,
2730
+ moveConfig: (homeDir) => `- Move the config file to your home directory: '${homeDir}'`,
2731
+ addGitignore: (configPath) => `- Add gitignore pattern '${configPath}' to a .gitignore file in root of your repository.`,
2334
2732
  noRemote: '- Ensure that the config file has not already been pushed to a remote repository.',
2335
2733
  checkFailed: 'Unable to determine if config file is properly ignored by git.',
2336
2734
  },
2337
2735
  serverlessFunctionLogs: {
2338
- unableToProcessLog: log => `Unable to process log ${log}`,
2736
+ unableToProcessLog: (log) => `Unable to process log ${log}`,
2339
2737
  noLogsFound: 'No logs found.',
2340
2738
  },
2341
2739
  },
2740
+ configOptions: {
2741
+ enableOrDisableBooleanFieldPrompt: {
2742
+ message: (fieldName) => `Choose to enable or disable ${fieldName}`,
2743
+ labels: {
2744
+ enabled: 'Enabled',
2745
+ disabled: 'Disabled',
2746
+ },
2747
+ },
2748
+ setAllowUsageTracking: {
2749
+ fieldName: 'usage tracking',
2750
+ success: (isEnabled) => `Allow usage tracking set to: "${isEnabled}"`,
2751
+ },
2752
+ setAllowAutoUpdates: {
2753
+ fieldName: 'auto updates',
2754
+ success: (isEnabled) => `Allow auto updates set to: "${isEnabled}"`,
2755
+ },
2756
+ setDefaultCmsPublishMode: {
2757
+ promptMessage: 'Select CMS publish mode to be used as the default',
2758
+ error: (validModes) => `The provided CMS publish mode is invalid. Valid values are ${validModes}.`,
2759
+ success: (mode) => `Default mode updated to: ${mode}`,
2760
+ },
2761
+ setHttpTimeout: {
2762
+ promptMessage: 'Enter http timeout duration',
2763
+ success: (timeout) => `HTTP timeout set to: ${timeout}`,
2764
+ },
2765
+ },
2342
2766
  commonOpts: {
2343
2767
  options: {
2344
2768
  account: {
@@ -2352,9 +2776,9 @@ exports.lib = {
2352
2776
  },
2353
2777
  modes: {
2354
2778
  describe: {
2355
- default: modes => `${modes}`,
2356
- read: modes => `Read from ${modes}`,
2357
- write: modes => `Write to ${modes}`,
2779
+ default: (modes) => `${modes}`,
2780
+ read: (modes) => `Read from ${modes}`,
2781
+ write: (modes) => `Write to ${modes}`,
2358
2782
  },
2359
2783
  },
2360
2784
  qa: {
@@ -2368,52 +2792,81 @@ exports.lib = {
2368
2792
  },
2369
2793
  },
2370
2794
  },
2795
+ configMigrate: {
2796
+ deprecatedConfigWarning: (deprecatedConfigPath) => `This command applies to global configuration, but we detected a deprecated config at ${deprecatedConfigPath}.`,
2797
+ handleMigration: {
2798
+ description: (archivedConfigName) => `We will migrate your deprecated config file to the new global configuration file location. This will create a new global configuration file in your root directory. Then it will archive the deprecated config as ${archivedConfigName} for you to manually cleanup at your convenience.`,
2799
+ confirmPrompt: 'Migrate the deprecated config to the global location?',
2800
+ success: 'Your deprecated config file has been successfully migrated.',
2801
+ },
2802
+ handleMergeConfigProperties: {
2803
+ mergeConflictMessage: (count, propertyList) => `Conflict${count > 1 ? 's' : ''} detected for ${chalk_1.default.bold(propertyList)}.`,
2804
+ mergeConfigConflictPrompt: (property, newValue, oldValue) => `Change ${property} from ${newValue} to ${oldValue}?`,
2805
+ },
2806
+ handleMerge: {
2807
+ description: (archivedConfigName) => `We will automatically merge the contents of your deprecated config file into your global configuration file. This will merge the configured accounts and settings into the global config. Then it will archive the deprecated config as ${archivedConfigName} for you to manually cleanup at your convenience.`,
2808
+ confirmPrompt: 'Merge the deprecated config into your global config?',
2809
+ skippedExistingAccounts: (accountIds) => `The following accounts were not merged because they already exist in the global config:${accountIds.map(id => `\n- ${(0, ui_1.uiAccountDescription)(Number(id))}`).join('')}`,
2810
+ success: 'Your deprecated config file has been successfully merged with the global config file.',
2811
+ },
2812
+ },
2371
2813
  prompts: {
2372
2814
  projectDevTargetAccountPrompt: {
2373
2815
  createNewSandboxOption: '<Test on a new development sandbox>',
2374
2816
  createNewDeveloperTestAccountOption: '<Test on a new developer test account>',
2375
2817
  chooseDefaultAccountOption: () => `<${chalk_1.default.bold('❗')} Test on this production account ${chalk_1.default.bold('❗')}>`,
2376
2818
  promptMessage: (accountType, accountIdentifier) => `[--account] Choose a ${accountType} under ${accountIdentifier} to test with:`,
2377
- sandboxLimit: limit => `Your account reached the limit of ${limit} development sandboxes`,
2819
+ sandboxLimit: (limit) => `Your account reached the limit of ${limit} development sandboxes`,
2378
2820
  sandboxLimitWithSuggestion: (limit, authCommand) => `Your account reached the limit of ${limit} development sandboxes. Run ${authCommand} to add an existing one to the config.`,
2379
- developerTestAccountLimit: limit => `Your account reached the limit of ${limit} developer test accounts.`,
2821
+ developerTestAccountLimit: (limit) => `Your account reached the limit of ${limit} developer test accounts.`,
2380
2822
  confirmDefaultAccount: (accountName, accountType) => `Continue testing on ${chalk_1.default.bold(`${accountName} (${accountType})`)}? (Y/n)`,
2381
- 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.`,
2823
+ 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.`,
2382
2824
  noAccountId: 'No account ID found for the selected account. Please try again.',
2383
2825
  },
2384
2826
  projectLogsPrompt: {
2385
- functionName: projectName => `[--function] Select function in ${chalk_1.default.bold(projectName)} project`,
2827
+ functionName: (projectName) => `[--function] Select function in ${chalk_1.default.bold(projectName)} project`,
2386
2828
  },
2387
2829
  setAsDefaultAccountPrompt: {
2388
2830
  setAsDefaultAccountMessage: 'Set this account as the default?',
2389
- setAsDefaultAccount: accountName => `Account "${accountName}" set as the default account`,
2390
- keepingCurrentDefault: accountName => `Account "${accountName}" will continue to be the default account`,
2831
+ setAsDefaultAccount: (accountName) => `Account "${accountName}" set as the default account`,
2832
+ keepingCurrentDefault: (accountName) => `Account "${accountName}" will continue to be the default account`,
2833
+ },
2834
+ createDeveloperTestAccountConfigPrompt: {
2835
+ namePrompt: '[--name] What is the name of the test account?',
2836
+ descriptionPrompt: '[--description] What is the description of the test account?',
2837
+ tiersPrompt: '[--tiers] Which product tiers should the test account have?',
2838
+ errors: {
2839
+ tiersError: 'Cannot have more than one tier per hub',
2840
+ },
2391
2841
  },
2392
2842
  accountNamePrompt: {
2393
2843
  enterAccountName: 'Enter a unique name to reference this account in the CLI:',
2394
2844
  enterDeveloperTestAccountName: 'Name your developer test account:',
2395
2845
  enterStandardSandboxName: 'Name your standard sandbox:',
2396
2846
  enterDevelopmentSandboxName: 'Name your development sandbox:',
2397
- sandboxDefaultName: sandboxType => `New ${sandboxType} sandbox`,
2398
- developerTestAccountDefaultName: count => `Developer test account ${count}`,
2847
+ sandboxDefaultName: (sandboxType) => `New ${sandboxType} sandbox`,
2848
+ developerTestAccountDefaultName: (count) => `Developer test account ${count}`,
2399
2849
  errors: {
2400
2850
  invalidName: 'You entered an invalid name. Please try again.',
2401
2851
  nameRequired: 'The name may not be blank. Please try again.',
2402
2852
  spacesInName: 'The name may not contain spaces. Please try again.',
2403
- accountNameExists: name => `Account with name "${name}" already exists in the CLI config, please enter a different name.`,
2853
+ accountNameExists: (name) => `Account with name "${name}" already exists in the CLI config, please enter a different name.`,
2404
2854
  },
2405
2855
  },
2406
2856
  personalAccessKeyPrompt: {
2407
2857
  enterAccountId: 'Enter the account ID for your account (the number under the DOMAIN column at https://app.hubspot.com/myaccounts-beta ): ',
2408
2858
  enterClientId: 'Enter your OAuth2 client ID: ',
2409
2859
  enterClientSecret: 'Enter your OAuth2 client secret: ',
2410
- enterPersonalAccessKey: 'Enter your personal access key: ',
2860
+ enterPersonalAccessKey: '[--personal-access-key] Enter your personal access key: ',
2411
2861
  selectScopes: 'Select access scopes (see https://developers.hubspot.com/docs/methods/oauth2/initiate-oauth-integration#scopes)',
2412
2862
  personalAccessKeySetupTitle: 'HubSpot Personal Access Key Setup',
2413
- personalAccessKeyBrowserOpenPrep: "A personal access key is required to authenticate the CLI to interact with your HubSpot account. We'll open a secure page in your default browser where you can view and copy your personal access key.",
2414
- personalAccessKeyBrowserOpenPrompt: 'Open HubSpot to copy your personal access key?',
2863
+ personalAccessKeyBrowserOpenPrep: 'A personal access key is required to authenticate the CLI to interact with your HubSpot account.',
2864
+ personalAccessKeyPromptChoices: {
2865
+ OPEN_BROWSER: 'Open HubSpot to copy your personal access key',
2866
+ PASTE_EXISTING: 'Enter existing personal access key',
2867
+ },
2415
2868
  logs: {
2416
- openingWebBrowser: url => `Opening ${url} in your web browser`,
2869
+ openingWebBrowser: (url) => `Opening ${url} in your web browser`,
2417
2870
  },
2418
2871
  errors: {
2419
2872
  invalidAccountId: 'You did not enter a valid account ID. Please try again.',
@@ -2464,24 +2917,32 @@ exports.lib = {
2464
2917
  enterName: '[--name] Give your project a name: ',
2465
2918
  enterDest: '[--dest] Enter the folder to create the project in:',
2466
2919
  selectTemplate: '[--template] Choose a project template: ',
2920
+ features: '[--features] Which features would you like your app to include?',
2467
2921
  errors: {
2468
2922
  nameRequired: 'A project name is required',
2469
2923
  destRequired: 'A project dest is required',
2470
2924
  invalidDest: 'There is an existing project at this destination. Please provide a new path for this project.',
2471
2925
  invalidCharacters: 'The selected destination contains invalid characters. Please provide a new path and try again.',
2472
- invalidTemplate: template => `[--template] Could not find template "${template}". Please choose an available template:`,
2926
+ invalidTemplate: (template) => `[--template] Could not find template "${template}". Please choose an available template:`,
2473
2927
  projectTemplateRequired: 'Project template is required when projectTemplates is provided',
2474
2928
  },
2475
2929
  },
2476
- selectPublicAppPrompt: {
2477
- selectAppIdMigrate: accountName => `[--appId] Choose an app under ${accountName} to migrate:`,
2478
- selectAppIdClone: accountName => `[--appId] Choose an app under ${accountName} to clone:`,
2930
+ selectAppPrompt: {
2931
+ selectAppId: '[--app] Select an app:',
2932
+ errors: {
2933
+ noApps: 'No apps were found for the given account.',
2934
+ invalidAppId: 'Invalid app id',
2935
+ },
2936
+ },
2937
+ selectPublicAppForMigrationPrompt: {
2938
+ selectAppIdMigrate: (accountName) => `[--appId] Choose an app under ${accountName} to migrate:`,
2939
+ selectAppIdClone: (accountName) => `[--appId] Choose an app under ${accountName} to clone:`,
2479
2940
  errors: {
2480
2941
  noAccountId: 'An account ID is required to select an app.',
2481
2942
  noAppsMigration: () => `${chalk_1.default.bold('No apps to migrate')}`,
2482
2943
  noAppsClone: () => `${chalk_1.default.bold('No apps to clone')}`,
2483
- noAppsMigrationMessage: accountName => `The selected developer account ${chalk_1.default.bold(accountName)} doesn't have any apps that can be migrated to the projects framework.`,
2484
- noAppsCloneMessage: accountName => `The selected developer account ${chalk_1.default.bold(accountName)} doesn't have any apps that can be cloned to the projects framework.`,
2944
+ noAppsMigrationMessage: (accountName) => `The selected developer account ${chalk_1.default.bold(accountName)} doesn't have any apps that can be migrated to the projects framework.`,
2945
+ noAppsCloneMessage: (accountName) => `The selected developer account ${chalk_1.default.bold(accountName)} doesn't have any apps that can be cloned to the projects framework.`,
2485
2946
  errorFetchingApps: 'There was an error fetching public apps.',
2486
2947
  cannotBeMigrated: 'Cannot be migrated',
2487
2948
  },
@@ -2498,12 +2959,14 @@ exports.lib = {
2498
2959
  enterName: '[--name] Give your component a name: ',
2499
2960
  errors: {
2500
2961
  nameRequired: 'A component name is required',
2501
- invalidType: type => `[--type] Could not find type "${type}". Please choose an available type:`,
2962
+ componentRequired: 'Must select a feature to add',
2963
+ invalidType: (type) => `[--type] Could not find type "${type}". Please choose an available type:`,
2964
+ cannotAddFeature: (feature, reasons) => `Cannot Add feature '${feature}' to project for the following reasons: ${reasons}`,
2502
2965
  },
2503
2966
  },
2504
2967
  secretPrompt: {
2505
- enterValue: 'Enter a value for your secret: ',
2506
- enterName: 'Enter a name for your secret: ',
2968
+ enterValue: 'Enter a value for the secret: ',
2969
+ enterName: 'Enter the name of the secret to add: ',
2507
2970
  selectSecretUpdate: 'Select the secret you want to update',
2508
2971
  selectSecretDelete: 'Select the secret you want to delete',
2509
2972
  errors: {
@@ -2526,7 +2989,7 @@ exports.lib = {
2526
2989
  srcRequired: 'You must specify a source directory.',
2527
2990
  destRequired: 'You must specify a destination directory.',
2528
2991
  },
2529
- fieldsPrompt: dir => `Multiple fields files located in "${dir}". Please choose which to upload: `,
2992
+ fieldsPrompt: (dir) => `Multiple fields files located in "${dir}". Please choose which to upload: `,
2530
2993
  },
2531
2994
  projectNamePrompt: {
2532
2995
  enterName: '[--project] Enter project name:',
@@ -2544,19 +3007,20 @@ exports.lib = {
2544
3007
  destRequired: 'You must specify a destination directory.',
2545
3008
  },
2546
3009
  },
2547
- installPublicAppPrompt: {
3010
+ installAppPrompt: {
2548
3011
  explanation: 'Local development requires this app to be installed in the target test account',
2549
3012
  reinstallExplanation: "This app's required scopes have been updated since it was last installed on the target test account. To avoid issues with local development, we recommend reinstalling the app with the updated scopes.",
2550
3013
  prompt: 'Open HubSpot to install this app?',
3014
+ autoPrompt: 'Install this app in your target test account?',
2551
3015
  reinstallPrompt: 'Open HubSpot to reinstall this app?',
2552
- decline: () => `To continue local development of this app, install it in your target test account and re-run ${chalk_1.default.bold('`hs project dev`')}`,
3016
+ decline: `To continue local development of this app, install it in your target test account and re-run ${chalk_1.default.bold('`hs project dev`')}`,
2553
3017
  },
2554
3018
  selectHubDBTablePrompt: {
2555
3019
  selectTable: 'Select a HubDB table:',
2556
3020
  enterDest: 'Enter the destination path:',
2557
3021
  errors: {
2558
- noTables: accountId => `No HubDB tables found in account ${accountId}`,
2559
- errorFetchingTables: accountId => `Unable to fetch HubDB tables in account ${accountId}`,
3022
+ noTables: (accountId) => `No HubDB tables found in account ${accountId}`,
3023
+ errorFetchingTables: (accountId) => `Unable to fetch HubDB tables in account ${accountId}`,
2560
3024
  destRequired: 'A destination is required',
2561
3025
  invalidDest: 'The selected destination already exists. Please provide a new path.',
2562
3026
  invalidCharacters: 'The selected destination contains invalid characters. Please provide a new path and try again.',
@@ -2578,8 +3042,8 @@ exports.lib = {
2578
3042
  developerTestAccount: {
2579
3043
  create: {
2580
3044
  loading: {
2581
- add: accountName => `Creating developer test account ${chalk_1.default.bold(accountName)}`,
2582
- fail: accountName => `Failed to create a developer test account ${chalk_1.default.bold(accountName)}.`,
3045
+ add: (accountName) => `Creating developer test account ${chalk_1.default.bold(accountName)}`,
3046
+ fail: (accountName) => `Failed to create a developer test account ${chalk_1.default.bold(accountName)}.`,
2583
3047
  succeed: (accountName, accountId) => `Successfully created a developer test account ${chalk_1.default.bold(accountName)} with portalId ${chalk_1.default.bold(accountId)}.`,
2584
3048
  },
2585
3049
  success: {
@@ -2600,8 +3064,8 @@ exports.lib = {
2600
3064
  create: {
2601
3065
  developer: {
2602
3066
  loading: {
2603
- add: accountName => `Creating developer sandbox ${chalk_1.default.bold(accountName)}`,
2604
- fail: accountName => `Failed to create a developer sandbox ${chalk_1.default.bold(accountName)}.`,
3067
+ add: (accountName) => `Creating developer sandbox ${chalk_1.default.bold(accountName)}`,
3068
+ fail: (accountName) => `Failed to create a developer sandbox ${chalk_1.default.bold(accountName)}.`,
2605
3069
  succeed: (accountName, accountId) => `Successfully created a developer sandbox ${chalk_1.default.bold(accountName)} with portalId ${chalk_1.default.bold(accountId)}.`,
2606
3070
  },
2607
3071
  success: {
@@ -2620,8 +3084,8 @@ exports.lib = {
2620
3084
  },
2621
3085
  standard: {
2622
3086
  loading: {
2623
- add: accountName => `Creating standard sandbox ${chalk_1.default.bold(accountName)}`,
2624
- fail: accountName => `Failed to create a standard sandbox ${chalk_1.default.bold(accountName)}.`,
3087
+ add: (accountName) => `Creating standard sandbox ${chalk_1.default.bold(accountName)}`,
3088
+ fail: (accountName) => `Failed to create a standard sandbox ${chalk_1.default.bold(accountName)}.`,
2625
3089
  succeed: (accountName, accountId) => `Successfully created a standard sandbox ${chalk_1.default.bold(accountName)} with portalId ${chalk_1.default.bold(accountId)}.`,
2626
3090
  },
2627
3091
  success: {
@@ -2640,9 +3104,9 @@ exports.lib = {
2640
3104
  },
2641
3105
  sync: {
2642
3106
  loading: {
2643
- add: accountName => `Syncing sandbox ${chalk_1.default.bold(accountName)}`,
2644
- fail: accountName => `Failed to sync sandbox ${chalk_1.default.bold(accountName)}.`,
2645
- succeed: accountName => `Successfully synced sandbox ${chalk_1.default.bold(accountName)}.`,
3107
+ add: (accountName) => `Syncing sandbox ${chalk_1.default.bold(accountName)}`,
3108
+ fail: (accountName) => `Failed to sync sandbox ${chalk_1.default.bold(accountName)}.`,
3109
+ succeed: (accountName) => `Successfully synced sandbox ${chalk_1.default.bold(accountName)}.`,
2646
3110
  },
2647
3111
  success: {
2648
3112
  configFileUpdated: (accountName, authType) => `Account "${accountName}" updated using "${authType}"`,
@@ -2658,27 +3122,27 @@ exports.lib = {
2658
3122
  },
2659
3123
  errorHandlers: {
2660
3124
  index: {
2661
- errorOccurred: error => `Error: ${error}`,
2662
- errorContext: context => `Context: ${context}`,
2663
- errorCause: cause => `Cause: ${cause}`,
3125
+ errorOccurred: (error) => `Error: ${error}`,
3126
+ errorContext: (context) => `Context: ${context}`,
3127
+ errorCause: (cause) => `Cause: ${cause}`,
2664
3128
  unknownErrorOccurred: 'An unknown error has occurred.',
2665
3129
  },
2666
3130
  suppressErrors: {
2667
3131
  platformVersionErrors: {
2668
3132
  header: 'Platform version update required',
2669
- unspecifiedPlatformVersion: platformVersion => `Projects with an ${chalk_1.default.bold(platformVersion)} are no longer supported.`,
2670
- platformVersionRetired: platformVersion => `Projects with ${chalk_1.default.bold(`platformVersion ${platformVersion}`)} are no longer supported.`,
2671
- nonExistentPlatformVersion: platformVersion => `Projects with ${chalk_1.default.bold(`platformVersion ${platformVersion}`)} are not supported.`,
3133
+ unspecifiedPlatformVersion: (platformVersion) => `Projects with an ${chalk_1.default.bold(platformVersion)} are no longer supported.`,
3134
+ platformVersionRetired: (platformVersion) => `Projects with ${chalk_1.default.bold(`platformVersion ${platformVersion}`)} are no longer supported.`,
3135
+ nonExistentPlatformVersion: (platformVersion) => `Projects with ${chalk_1.default.bold(`platformVersion ${platformVersion}`)} are not supported.`,
2672
3136
  updateProject: 'Please update your project to the latest version and try again.',
2673
3137
  docsLink: 'Projects platform versioning (BETA)',
2674
- betaLink: docsLink => `For more info, see ${docsLink}.`,
3138
+ betaLink: (docsLink) => `For more info, see ${docsLink}.`,
2675
3139
  },
2676
3140
  missingScopeError: (request, accountName, authCommand) => `Couldn't execute the ${request} because the access key for ${accountName} is missing required scopes. To update scopes, run ${authCommand}. Then deactivate the existing key and generate a new one that includes the missing scopes.`,
2677
3141
  },
2678
3142
  },
2679
3143
  serverless: {
2680
3144
  verifyAccessKeyAndUserAccess: {
2681
- fetchScopeDataError: scopeGroup => `Error verifying access of scopeGroup ${scopeGroup}:`,
3145
+ fetchScopeDataError: (scopeGroup) => `Error verifying access of scopeGroup ${scopeGroup}:`,
2682
3146
  portalMissingScope: 'Your account does not have access to this action. Talk to an account admin to request it.',
2683
3147
  userMissingScope: "You don't have access to this action. Ask an account admin to change your permissions in Users & Teams settings.",
2684
3148
  genericMissingScope: 'Your access key does not allow this action. Please generate a new access key by running `hs auth personalaccesskey`.',
@@ -2690,49 +3154,49 @@ exports.lib = {
2690
3154
  accountChecks: {
2691
3155
  active: 'Default account active',
2692
3156
  inactive: "Default account isn't active",
2693
- inactiveSecondary: command => `Run ${command} to remove inactive accounts from your CLI config`,
3157
+ inactiveSecondary: (command) => `Run ${command} to remove inactive accounts from your CLI config`,
2694
3158
  unableToDetermine: 'Unable to determine if the portal is active',
2695
3159
  pak: {
2696
3160
  incomplete: 'Personal access key is valid, but there are more scopes available to your user that are not included in your key.',
2697
3161
  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}`,
2698
3162
  invalid: 'Personal access key is invalid',
2699
- 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.`,
2700
- valid: link => `Personal Access Key is valid. ${link}`,
3163
+ 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.`,
3164
+ valid: (link) => `Personal Access Key is valid. ${link}`,
2701
3165
  viewScopes: 'View selected scopes',
2702
3166
  },
2703
3167
  },
2704
3168
  nodeChecks: {
2705
3169
  unableToDetermine: 'Unable to determine what version of node is installed',
2706
- minimumNotMet: nodeVersion => `Minimum Node version is not met. Upgrade to ${nodeVersion} or higher`,
2707
- success: nodeVersion => `node v${nodeVersion} is installed`,
3170
+ minimumNotMet: (nodeVersion) => `Minimum Node version is not met. Upgrade to ${nodeVersion} or higher`,
3171
+ success: (nodeVersion) => `node v${nodeVersion} is installed`,
2708
3172
  },
2709
3173
  npmChecks: {
2710
3174
  notInstalled: 'npm is not installed',
2711
- installed: npmVersion => `npm v${npmVersion} is installed`,
3175
+ installed: (npmVersion) => `npm v${npmVersion} is installed`,
2712
3176
  unableToDetermine: 'Unable to determine if npm is installed',
2713
3177
  },
2714
3178
  hsChecks: {
2715
- notLatest: hsVersion => `Version ${hsVersion} outdated`,
3179
+ notLatest: (hsVersion) => `Version ${hsVersion} outdated`,
2716
3180
  notLatestSecondary: (command, hsVersion) => `Run ${command} to upgrade to the latest version ${hsVersion}`,
2717
- latest: hsVersion => `HubSpot CLI v${hsVersion} up to date`,
3181
+ latest: (hsVersion) => `HubSpot CLI v${hsVersion} up to date`,
2718
3182
  unableToDetermine: 'Unable to determine if HubSpot CLI is up to date.',
2719
3183
  unableToDetermineSecondary: (command, link) => `Run ${command} to check your installed version; then visit the ${link} to validate whether you have the latest version`,
2720
3184
  unableToDetermineSecondaryLink: 'npm HubSpot CLI version history',
2721
3185
  },
2722
3186
  projectDependenciesChecks: {
2723
- missingDependencies: dir => `missing dependencies in ${chalk_1.default.bold(dir)}`,
2724
- missingDependenciesSecondary: command => `Run ${command} to install all project dependencies locally`,
2725
- unableToDetermine: dir => `Unable to determine if dependencies are installed ${dir}`,
3187
+ missingDependencies: (dir) => `missing dependencies in ${chalk_1.default.bold(dir)}`,
3188
+ missingDependenciesSecondary: (command) => `Run ${command} to install all project dependencies locally`,
3189
+ unableToDetermine: (dir) => `Unable to determine if dependencies are installed ${dir}`,
2726
3190
  success: 'App dependencies are installed and up to date',
2727
3191
  },
2728
3192
  files: {
2729
- invalidJson: filename => `invalid JSON in ${chalk_1.default.bold(filename)}`,
3193
+ invalidJson: (filename) => `invalid JSON in ${chalk_1.default.bold(filename)}`,
2730
3194
  validJson: 'JSON files valid',
2731
3195
  },
2732
3196
  port: {
2733
- inUse: port => `Port ${port} is in use`,
2734
- inUseSecondary: command => `Make sure it is available before running ${command}`,
2735
- available: port => `Port ${port} available for local development`,
3197
+ inUse: (port) => `Port ${port} is in use`,
3198
+ inUseSecondary: (command) => `Make sure it is available before running ${command}`,
3199
+ available: (port) => `Port ${port} available for local development`,
2736
3200
  },
2737
3201
  diagnosis: {
2738
3202
  cli: {
@@ -2740,19 +3204,19 @@ exports.lib = {
2740
3204
  },
2741
3205
  cliConfig: {
2742
3206
  header: 'CLI configuration',
2743
- configFileSubHeader: filename => `Config File: ${chalk_1.default.bold(filename)}`,
2744
- defaultAccountSubHeader: accountDetails => `Default Account: ${accountDetails}`,
3207
+ configFileSubHeader: (filename) => `Config File: ${chalk_1.default.bold(filename)}`,
3208
+ defaultAccountSubHeader: (accountDetails) => `Default Account: ${accountDetails}`,
2745
3209
  noConfigFile: 'CLI configuration not found',
2746
- noConfigFileSecondary: command => `Run ${command} and follow the prompts to create your CLI configuration file and connect it to your HubSpot account`,
3210
+ noConfigFileSecondary: (command) => `Run ${command} and follow the prompts to create your CLI configuration file and connect it to your HubSpot account`,
2747
3211
  },
2748
3212
  projectConfig: {
2749
3213
  header: 'Project configuration',
2750
- projectDirSubHeader: projectDir => `Project dir: ${chalk_1.default.bold(projectDir)}`,
2751
- projectNameSubHeader: projectName => `Project name: ${chalk_1.default.bold(projectName)}`,
3214
+ projectDirSubHeader: (projectDir) => `Project dir: ${chalk_1.default.bold(projectDir)}`,
3215
+ projectNameSubHeader: (projectName) => `Project name: ${chalk_1.default.bold(projectName)}`,
2752
3216
  },
2753
3217
  counts: {
2754
- errors: count => `${chalk_1.default.bold('Errors:')} ${count}`,
2755
- warnings: count => `${chalk_1.default.bold('Warning:')} ${count}`,
3218
+ errors: (count) => `${chalk_1.default.bold('Errors:')} ${count}`,
3219
+ warnings: (count) => `${chalk_1.default.bold('Warning:')} ${count}`,
2756
3220
  },
2757
3221
  },
2758
3222
  },
@@ -2760,8 +3224,8 @@ exports.lib = {
2760
3224
  missingClientId: 'Error building oauth URL: missing client ID.',
2761
3225
  },
2762
3226
  migrate: {
2763
- componentsToBeMigrated: components => `The following features will be migrated: ${components}`,
2764
- componentsThatWillNotBeMigrated: components => `[NOTE] These features are not yet supported for migration but will be available later: ${components}`,
3227
+ componentsToBeMigrated: (components) => `The following features will be migrated: ${components}`,
3228
+ componentsThatWillNotBeMigrated: (components) => `[NOTE] These features are not yet supported for migration but will be available later: ${components}`,
2765
3229
  sourceContentsMoved: (newLocation) => `The contents of your old source directory have been moved to ${newLocation}, move any required files to the new source directory.`,
2766
3230
  projectMigrationWarningTitle: '⚠️ Important: Migrating to platformVersion 2025.2 is irreversible ⚠️',
2767
3231
  projectMigrationWarning: (0, ui_1.uiBetaTag)(`Running the ${(0, ui_1.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),
@@ -2770,7 +3234,7 @@ exports.lib = {
2770
3234
  invalidConfig: 'The project configuration file is invalid. Please check the config file and try again.',
2771
3235
  doesNotExist: (account) => `Project does not exist in ${(0, ui_1.uiAccountDescription)(account)}. Migrations are only supported for existing projects.`,
2772
3236
  multipleApps: 'Multiple apps found in project, this is not allowed in 2025.2',
2773
- alreadyExists: projectName => `A project with name ${projectName} already exists. Please choose another name.`,
3237
+ alreadyExists: (projectName) => `A project with name ${projectName} already exists. Please choose another name.`,
2774
3238
  },
2775
3239
  unmigratableReasons: {
2776
3240
  upToDate: 'App is already up to date',
@@ -2778,21 +3242,21 @@ exports.lib = {
2778
3242
  listedInMarketplace: 'Listed apps are not currently migratable',
2779
3243
  projectConnectedToGitHub: (projectName, accountId) => `The project is linked to a GitHub repository. ${(0, ui_1.uiLink)('Visit the project settings page to unlink it', (0, urls_1.getProjectSettingsUrl)(projectName, accountId))}`,
2780
3244
  partOfProjectAlready: `This app is part of a project, run ${(0, ui_1.uiCommandReference)('hs project migrate')} from the project directory to migrate it`,
2781
- generic: reasonCode => `Unable to migrate app: ${reasonCode}`,
3245
+ generic: (reasonCode) => `Unable to migrate app: ${reasonCode}`,
2782
3246
  },
2783
3247
  noAppsEligible: (accountId, reasons) => `No apps in account ${accountId} are currently migratable${reasons.length ? `\n - ${reasons.join('\n - ')}` : ''}`,
2784
3248
  invalidAccountTypeTitle: `${chalk_1.default.bold('Developer account not targeted')}`,
2785
3249
  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.`,
2786
- appWithAppIdNotFound: appId => `Could not find an app with the id ${appId} `,
3250
+ appWithAppIdNotFound: (appId) => `Could not find an app with the id ${appId} `,
2787
3251
  noAppsForProject: (projectName) => `No apps associated with project ${projectName}`,
2788
3252
  migrationFailed: 'Migration Failed',
2789
- notUngatedForUnifiedApps: account => `Your account ${account} isn't enrolled in the required product beta to access this command.`,
3253
+ notUngatedForUnifiedApps: (account) => `Your account ${account} isn't enrolled in the required product beta to access this command.`,
2790
3254
  },
2791
3255
  prompt: {
2792
3256
  chooseApp: 'Which app would you like to migrate?',
2793
3257
  inputName: '[--name] What would you like to name the project?',
2794
3258
  inputDest: '[--dest] Where would you like to save the project?',
2795
- uidForComponent: componentName => `What UID would you like to use for ${componentName}?`,
3259
+ uidForComponent: (componentName) => `What UID would you like to use for ${componentName}?`,
2796
3260
  proceed: 'Would you like to proceed?',
2797
3261
  },
2798
3262
  spinners: {