@hubspot/cli 7.7.0-experimental.2 → 7.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (858) hide show
  1. package/README.md +0 -4
  2. package/api/__tests__/migrate.test.js +181 -0
  3. package/api/migrate.d.ts +10 -4
  4. package/api/migrate.js +14 -22
  5. package/bin/cli.js +60 -53
  6. package/bin/hs +2 -2
  7. package/bin/hscms +2 -2
  8. package/bin/silenceErrors.js +1 -2
  9. package/commands/__tests__/account.test.d.ts +1 -0
  10. package/commands/__tests__/account.test.js +69 -0
  11. package/commands/__tests__/auth.test.d.ts +1 -0
  12. package/commands/__tests__/auth.test.js +38 -0
  13. package/commands/__tests__/cms.test.d.ts +1 -0
  14. package/commands/__tests__/cms.test.js +44 -0
  15. package/commands/__tests__/config.test.d.ts +1 -0
  16. package/commands/__tests__/config.test.js +44 -0
  17. package/commands/__tests__/create.test.d.ts +1 -0
  18. package/commands/__tests__/create.test.js +53 -0
  19. package/commands/__tests__/customObject.test.d.ts +1 -0
  20. package/commands/__tests__/customObject.test.js +49 -0
  21. package/commands/__tests__/doctor.test.d.ts +1 -0
  22. package/commands/__tests__/doctor.test.js +134 -0
  23. package/commands/__tests__/feedback.test.d.ts +1 -0
  24. package/commands/__tests__/feedback.test.js +24 -0
  25. package/commands/__tests__/fetch.test.d.ts +1 -0
  26. package/commands/__tests__/fetch.test.js +57 -0
  27. package/commands/__tests__/filemanager.test.d.ts +1 -0
  28. package/commands/__tests__/filemanager.test.js +45 -0
  29. package/commands/__tests__/function.test.d.ts +1 -0
  30. package/commands/__tests__/function.test.js +46 -0
  31. package/commands/__tests__/getStarted.test.d.ts +1 -0
  32. package/commands/__tests__/getStarted.test.js +155 -0
  33. package/commands/__tests__/hubdb.test.d.ts +1 -0
  34. package/commands/__tests__/hubdb.test.js +50 -0
  35. package/commands/__tests__/init.test.d.ts +1 -0
  36. package/commands/__tests__/init.test.js +42 -0
  37. package/commands/__tests__/lint.test.d.ts +1 -0
  38. package/commands/__tests__/lint.test.js +33 -0
  39. package/commands/__tests__/list.test.d.ts +1 -0
  40. package/commands/__tests__/list.test.js +42 -0
  41. package/commands/__tests__/logs.test.d.ts +1 -0
  42. package/commands/__tests__/logs.test.js +71 -0
  43. package/commands/__tests__/mcp.test.d.ts +1 -0
  44. package/commands/__tests__/mcp.test.js +46 -0
  45. package/commands/__tests__/mv.test.d.ts +1 -0
  46. package/commands/__tests__/mv.test.js +46 -0
  47. package/commands/__tests__/open.test.d.ts +1 -0
  48. package/commands/__tests__/open.test.js +58 -0
  49. package/commands/__tests__/project.test.d.ts +1 -0
  50. package/commands/__tests__/project.test.js +92 -0
  51. package/commands/__tests__/remove.test.d.ts +1 -0
  52. package/commands/__tests__/remove.test.js +39 -0
  53. package/commands/__tests__/sandbox.test.d.ts +1 -0
  54. package/commands/__tests__/sandbox.test.js +44 -0
  55. package/commands/__tests__/secret.test.d.ts +1 -0
  56. package/commands/__tests__/secret.test.js +49 -0
  57. package/commands/__tests__/testAccount.test.d.ts +1 -0
  58. package/commands/__tests__/testAccount.test.js +57 -0
  59. package/commands/__tests__/theme.test.d.ts +1 -0
  60. package/commands/__tests__/theme.test.js +47 -0
  61. package/commands/account/__tests__/auth.test.d.ts +1 -0
  62. package/commands/account/__tests__/auth.test.js +26 -0
  63. package/commands/account/__tests__/clean.test.d.ts +1 -0
  64. package/commands/account/__tests__/clean.test.js +28 -0
  65. package/commands/account/__tests__/createOverride.test.d.ts +1 -0
  66. package/commands/account/__tests__/createOverride.test.js +32 -0
  67. package/commands/account/__tests__/info.test.d.ts +1 -0
  68. package/commands/account/__tests__/info.test.js +28 -0
  69. package/commands/account/__tests__/list.test.d.ts +1 -0
  70. package/commands/account/__tests__/list.test.js +28 -0
  71. package/commands/account/__tests__/remove.test.d.ts +1 -0
  72. package/commands/account/__tests__/remove.test.js +36 -0
  73. package/commands/account/__tests__/removeOverride.d.ts +1 -0
  74. package/commands/account/__tests__/removeOverride.js +25 -0
  75. package/commands/account/__tests__/rename.test.d.ts +1 -0
  76. package/commands/account/__tests__/rename.test.js +42 -0
  77. package/commands/account/__tests__/use.test.d.ts +1 -0
  78. package/commands/account/__tests__/use.test.js +32 -0
  79. package/commands/account/auth.d.ts +3 -1
  80. package/commands/account/auth.js +109 -123
  81. package/commands/account/clean.d.ts +1 -1
  82. package/commands/account/clean.js +55 -60
  83. package/commands/account/createOverride.d.ts +1 -1
  84. package/commands/account/createOverride.js +52 -57
  85. package/commands/account/info.d.ts +1 -1
  86. package/commands/account/info.js +33 -35
  87. package/commands/account/list.d.ts +1 -1
  88. package/commands/account/list.js +43 -45
  89. package/commands/account/remove.d.ts +1 -1
  90. package/commands/account/remove.js +37 -42
  91. package/commands/account/removeOverride.d.ts +1 -1
  92. package/commands/account/removeOverride.js +38 -43
  93. package/commands/account/rename.d.ts +1 -1
  94. package/commands/account/rename.js +18 -20
  95. package/commands/account/use.d.ts +1 -1
  96. package/commands/account/use.js +29 -31
  97. package/commands/account.d.ts +1 -1
  98. package/commands/account.js +23 -30
  99. package/commands/app/__tests__/migrate.test.d.ts +1 -0
  100. package/commands/app/__tests__/migrate.test.js +124 -0
  101. package/commands/app/migrate.d.ts +2 -2
  102. package/commands/app/migrate.js +41 -45
  103. package/commands/app/secret/__tests__/add.test.d.ts +1 -0
  104. package/commands/app/secret/__tests__/add.test.js +28 -0
  105. package/commands/app/secret/__tests__/delete.test.d.ts +1 -0
  106. package/commands/app/secret/__tests__/delete.test.js +28 -0
  107. package/commands/app/secret/__tests__/list.test.d.ts +1 -0
  108. package/commands/app/secret/__tests__/list.test.js +25 -0
  109. package/commands/app/secret/__tests__/update.test.d.ts +1 -0
  110. package/commands/app/secret/__tests__/update.test.js +28 -0
  111. package/commands/app/secret/add.d.ts +1 -1
  112. package/commands/app/secret/add.js +29 -30
  113. package/commands/app/secret/delete.d.ts +1 -1
  114. package/commands/app/secret/delete.js +35 -36
  115. package/commands/app/secret/list.d.ts +1 -1
  116. package/commands/app/secret/list.js +26 -27
  117. package/commands/app/secret/update.d.ts +1 -1
  118. package/commands/app/secret/update.js +33 -34
  119. package/commands/app/secret.d.ts +1 -1
  120. package/commands/app/secret.js +14 -18
  121. package/commands/app.d.ts +1 -1
  122. package/commands/app.js +8 -15
  123. package/commands/auth.d.ts +3 -1
  124. package/commands/auth.js +89 -99
  125. package/commands/cms/convertFields.d.ts +1 -1
  126. package/commands/cms/convertFields.js +34 -39
  127. package/commands/cms/getReactModule.d.ts +1 -1
  128. package/commands/cms/getReactModule.js +32 -37
  129. package/commands/cms/lighthouseScore.d.ts +1 -1
  130. package/commands/cms/lighthouseScore.js +67 -72
  131. package/commands/cms.d.ts +1 -1
  132. package/commands/cms.js +11 -18
  133. package/commands/completion.d.ts +1 -1
  134. package/commands/completion.js +10 -17
  135. package/commands/config/migrate.d.ts +1 -1
  136. package/commands/config/migrate.js +29 -53
  137. package/commands/config/set.d.ts +3 -2
  138. package/commands/config/set.js +88 -49
  139. package/commands/config.d.ts +1 -1
  140. package/commands/config.js +8 -15
  141. package/commands/create/api-sample.d.ts +1 -1
  142. package/commands/create/api-sample.js +28 -33
  143. package/commands/create/app.d.ts +1 -1
  144. package/commands/create/app.js +3 -5
  145. package/commands/create/function.d.ts +1 -1
  146. package/commands/create/function.js +10 -12
  147. package/commands/create/index.d.ts +1 -1
  148. package/commands/create/index.js +19 -24
  149. package/commands/create/module.d.ts +1 -1
  150. package/commands/create/module.js +13 -15
  151. package/commands/create/react-app.d.ts +1 -1
  152. package/commands/create/react-app.js +3 -5
  153. package/commands/create/template.d.ts +1 -1
  154. package/commands/create/template.js +13 -15
  155. package/commands/create/vue-app.d.ts +1 -1
  156. package/commands/create/vue-app.js +3 -5
  157. package/commands/create/webpack-serverless.d.ts +1 -1
  158. package/commands/create/webpack-serverless.js +3 -5
  159. package/commands/create/website-theme.d.ts +1 -1
  160. package/commands/create/website-theme.js +5 -7
  161. package/commands/create.d.ts +2 -2
  162. package/commands/create.js +77 -37
  163. package/commands/customObject/__tests__/create.test.d.ts +1 -0
  164. package/commands/customObject/__tests__/create.test.js +40 -0
  165. package/commands/customObject/__tests__/schema.test.d.ts +1 -0
  166. package/commands/customObject/__tests__/schema.test.js +53 -0
  167. package/commands/customObject/create.d.ts +1 -1
  168. package/commands/customObject/create.js +28 -30
  169. package/commands/customObject/schema/__tests__/create.test.d.ts +1 -0
  170. package/commands/customObject/schema/__tests__/create.test.js +28 -0
  171. package/commands/customObject/schema/__tests__/delete.test.d.ts +1 -0
  172. package/commands/customObject/schema/__tests__/delete.test.js +42 -0
  173. package/commands/customObject/schema/__tests__/fetch-all.test.d.ts +1 -0
  174. package/commands/customObject/schema/__tests__/fetch-all.test.js +41 -0
  175. package/commands/customObject/schema/__tests__/fetch.test.d.ts +1 -0
  176. package/commands/customObject/schema/__tests__/fetch.test.js +45 -0
  177. package/commands/customObject/schema/__tests__/list.test.d.ts +1 -0
  178. package/commands/customObject/schema/__tests__/list.test.js +29 -0
  179. package/commands/customObject/schema/__tests__/update.test.d.ts +1 -0
  180. package/commands/customObject/schema/__tests__/update.test.js +40 -0
  181. package/commands/customObject/schema/create.d.ts +1 -1
  182. package/commands/customObject/schema/create.js +28 -30
  183. package/commands/customObject/schema/delete.d.ts +1 -1
  184. package/commands/customObject/schema/delete.js +24 -26
  185. package/commands/customObject/schema/fetch-all.d.ts +1 -1
  186. package/commands/customObject/schema/fetch-all.js +22 -24
  187. package/commands/customObject/schema/fetch.d.ts +1 -1
  188. package/commands/customObject/schema/fetch.js +24 -26
  189. package/commands/customObject/schema/list.d.ts +1 -1
  190. package/commands/customObject/schema/list.js +13 -15
  191. package/commands/customObject/schema/update.d.ts +1 -1
  192. package/commands/customObject/schema/update.js +32 -34
  193. package/commands/customObject/schema.d.ts +1 -1
  194. package/commands/customObject/schema.js +17 -22
  195. package/commands/customObject.d.ts +1 -1
  196. package/commands/customObject.js +13 -20
  197. package/commands/doctor.d.ts +1 -1
  198. package/commands/doctor.js +28 -35
  199. package/commands/feedback.d.ts +1 -1
  200. package/commands/feedback.js +18 -25
  201. package/commands/fetch.d.ts +1 -1
  202. package/commands/fetch.js +28 -31
  203. package/commands/filemanager/__tests__/fetch.test.d.ts +1 -0
  204. package/commands/filemanager/__tests__/fetch.test.js +32 -0
  205. package/commands/filemanager/__tests__/upload.test.d.ts +1 -0
  206. package/commands/filemanager/__tests__/upload.test.js +30 -0
  207. package/commands/filemanager/fetch.d.ts +1 -1
  208. package/commands/filemanager/fetch.js +23 -25
  209. package/commands/filemanager/upload.d.ts +1 -1
  210. package/commands/filemanager/upload.js +39 -44
  211. package/commands/filemanager.d.ts +1 -1
  212. package/commands/filemanager.js +8 -15
  213. package/commands/function/deploy.d.ts +1 -1
  214. package/commands/function/deploy.js +35 -40
  215. package/commands/function/list.d.ts +1 -1
  216. package/commands/function/list.js +24 -29
  217. package/commands/function/server.d.ts +1 -1
  218. package/commands/function/server.js +15 -17
  219. package/commands/function.d.ts +1 -1
  220. package/commands/function.js +12 -20
  221. package/commands/getStarted.d.ts +7 -0
  222. package/commands/getStarted.js +296 -0
  223. package/commands/hubdb/__tests__/clear.test.d.ts +1 -0
  224. package/commands/hubdb/__tests__/clear.test.js +28 -0
  225. package/commands/hubdb/__tests__/create.test.d.ts +1 -0
  226. package/commands/hubdb/__tests__/create.test.js +28 -0
  227. package/commands/hubdb/__tests__/delete.test.d.ts +1 -0
  228. package/commands/hubdb/__tests__/delete.test.js +28 -0
  229. package/commands/hubdb/__tests__/fetch.test.d.ts +1 -0
  230. package/commands/hubdb/__tests__/fetch.test.js +28 -0
  231. package/commands/hubdb/__tests__/list.test.d.ts +1 -0
  232. package/commands/hubdb/__tests__/list.test.js +96 -0
  233. package/commands/hubdb/clear.d.ts +1 -1
  234. package/commands/hubdb/clear.js +20 -22
  235. package/commands/hubdb/create.d.ts +1 -1
  236. package/commands/hubdb/create.js +30 -35
  237. package/commands/hubdb/delete.d.ts +1 -1
  238. package/commands/hubdb/delete.js +24 -26
  239. package/commands/hubdb/fetch.d.ts +1 -1
  240. package/commands/hubdb/fetch.js +17 -19
  241. package/commands/hubdb/list.d.ts +4 -0
  242. package/commands/hubdb/list.js +81 -0
  243. package/commands/hubdb.d.ts +1 -1
  244. package/commands/hubdb.js +18 -24
  245. package/commands/init.d.ts +1 -1
  246. package/commands/init.js +96 -102
  247. package/commands/lint.d.ts +1 -1
  248. package/commands/lint.js +24 -28
  249. package/commands/list.d.ts +1 -1
  250. package/commands/list.js +32 -39
  251. package/commands/logs.d.ts +1 -1
  252. package/commands/logs.js +35 -38
  253. package/commands/mcp/__tests__/setup.test.d.ts +1 -0
  254. package/commands/mcp/__tests__/setup.test.js +26 -0
  255. package/commands/mcp/__tests__/start.test.d.ts +1 -0
  256. package/commands/mcp/__tests__/start.test.js +27 -0
  257. package/commands/mcp/setup.d.ts +6 -0
  258. package/commands/mcp/setup.js +52 -0
  259. package/commands/mcp/start.d.ts +6 -0
  260. package/commands/mcp/start.js +80 -0
  261. package/commands/mcp.d.ts +3 -0
  262. package/commands/mcp.js +21 -0
  263. package/commands/module/marketplace-validate.d.ts +1 -1
  264. package/commands/module/marketplace-validate.js +21 -28
  265. package/commands/module.d.ts +1 -1
  266. package/commands/module.js +7 -12
  267. package/commands/mv.d.ts +1 -1
  268. package/commands/mv.js +20 -24
  269. package/commands/open.d.ts +1 -1
  270. package/commands/open.js +29 -31
  271. package/commands/project/__tests__/add.test.d.ts +1 -0
  272. package/commands/project/__tests__/add.test.js +107 -0
  273. package/commands/project/__tests__/create.test.d.ts +1 -0
  274. package/commands/project/__tests__/create.test.js +97 -0
  275. package/commands/project/__tests__/deploy.test.d.ts +1 -0
  276. package/commands/project/__tests__/deploy.test.js +306 -0
  277. package/commands/project/__tests__/devUnifiedFlow.test.d.ts +1 -0
  278. package/commands/project/__tests__/devUnifiedFlow.test.js +403 -0
  279. package/commands/project/__tests__/download.test.d.ts +1 -0
  280. package/commands/project/__tests__/download.test.js +39 -0
  281. package/commands/project/__tests__/fixtures/exampleProject.json +33 -0
  282. package/commands/project/__tests__/installDeps.test.d.ts +1 -0
  283. package/commands/project/__tests__/installDeps.test.js +142 -0
  284. package/commands/project/__tests__/listBuilds.test.d.ts +1 -0
  285. package/commands/project/__tests__/listBuilds.test.js +38 -0
  286. package/commands/project/__tests__/logs.test.d.ts +1 -0
  287. package/commands/project/__tests__/logs.test.js +205 -0
  288. package/commands/project/__tests__/migrate.test.d.ts +1 -0
  289. package/commands/project/__tests__/migrate.test.js +110 -0
  290. package/commands/project/__tests__/migrateApp.test.d.ts +1 -0
  291. package/commands/project/__tests__/migrateApp.test.js +81 -0
  292. package/commands/project/__tests__/open.test.d.ts +1 -0
  293. package/commands/project/__tests__/open.test.js +39 -0
  294. package/commands/project/__tests__/profile.test.d.ts +1 -0
  295. package/commands/project/__tests__/profile.test.js +42 -0
  296. package/commands/project/__tests__/upload.test.d.ts +1 -0
  297. package/commands/project/__tests__/upload.test.js +43 -0
  298. package/commands/project/__tests__/validate.test.d.ts +1 -0
  299. package/commands/project/__tests__/validate.test.js +98 -0
  300. package/commands/project/__tests__/watch.test.d.ts +1 -0
  301. package/commands/project/__tests__/watch.test.js +35 -0
  302. package/commands/project/add.d.ts +7 -4
  303. package/commands/project/add.js +47 -92
  304. package/commands/project/cloneApp.d.ts +1 -1
  305. package/commands/project/cloneApp.js +69 -74
  306. package/commands/project/create.d.ts +2 -8
  307. package/commands/project/create.js +109 -86
  308. package/commands/project/deploy.d.ts +4 -2
  309. package/commands/project/deploy.js +103 -95
  310. package/commands/project/dev/deprecatedFlow.d.ts +10 -4
  311. package/commands/project/dev/deprecatedFlow.js +61 -58
  312. package/commands/project/dev/index.d.ts +1 -1
  313. package/commands/project/dev/index.js +103 -60
  314. package/commands/project/dev/unifiedFlow.d.ts +13 -5
  315. package/commands/project/dev/unifiedFlow.js +90 -103
  316. package/commands/project/download.d.ts +1 -1
  317. package/commands/project/download.js +34 -40
  318. package/commands/project/installDeps.d.ts +1 -1
  319. package/commands/project/installDeps.js +28 -34
  320. package/commands/project/listBuilds.d.ts +1 -1
  321. package/commands/project/listBuilds.js +40 -48
  322. package/commands/project/logs.d.ts +1 -1
  323. package/commands/project/logs.js +52 -54
  324. package/commands/project/migrate.d.ts +1 -1
  325. package/commands/project/migrate.js +60 -34
  326. package/commands/project/migrateApp.d.ts +2 -2
  327. package/commands/project/migrateApp.js +19 -22
  328. package/commands/project/open.d.ts +1 -1
  329. package/commands/project/open.js +24 -30
  330. package/commands/project/profile/add.d.ts +1 -1
  331. package/commands/project/profile/add.js +68 -73
  332. package/commands/project/profile/delete.d.ts +1 -1
  333. package/commands/project/profile/delete.js +67 -61
  334. package/commands/project/profile.d.ts +1 -1
  335. package/commands/project/profile.js +9 -15
  336. package/commands/project/upload.d.ts +2 -2
  337. package/commands/project/upload.js +63 -73
  338. package/commands/project/validate.d.ts +4 -2
  339. package/commands/project/validate.js +60 -35
  340. package/commands/project/watch.d.ts +1 -1
  341. package/commands/project/watch.js +59 -61
  342. package/commands/project.d.ts +1 -1
  343. package/commands/project.js +37 -45
  344. package/commands/remove.d.ts +1 -1
  345. package/commands/remove.js +15 -25
  346. package/commands/sandbox/__tests__/create.test.d.ts +1 -0
  347. package/commands/sandbox/__tests__/create.test.js +238 -0
  348. package/commands/sandbox/__tests__/delete.test.d.ts +1 -0
  349. package/commands/sandbox/__tests__/delete.test.js +31 -0
  350. package/commands/sandbox/create.d.ts +2 -2
  351. package/commands/sandbox/create.js +92 -79
  352. package/commands/sandbox/delete.d.ts +1 -1
  353. package/commands/sandbox/delete.js +98 -100
  354. package/commands/sandbox.d.ts +1 -1
  355. package/commands/sandbox.js +9 -16
  356. package/commands/secret/__tests__/addSecret.test.d.ts +1 -0
  357. package/commands/secret/__tests__/addSecret.test.js +29 -0
  358. package/commands/secret/__tests__/deleteSecret.test.d.ts +1 -0
  359. package/commands/secret/__tests__/deleteSecret.test.js +41 -0
  360. package/commands/secret/__tests__/listSecret.test.d.ts +1 -0
  361. package/commands/secret/__tests__/listSecret.test.js +29 -0
  362. package/commands/secret/__tests__/updateSecret.test.d.ts +1 -0
  363. package/commands/secret/__tests__/updateSecret.test.js +29 -0
  364. package/commands/secret/addSecret.d.ts +1 -1
  365. package/commands/secret/addSecret.js +26 -28
  366. package/commands/secret/deleteSecret.d.ts +1 -1
  367. package/commands/secret/deleteSecret.js +27 -29
  368. package/commands/secret/listSecret.d.ts +1 -1
  369. package/commands/secret/listSecret.js +19 -21
  370. package/commands/secret/updateSecret.d.ts +1 -1
  371. package/commands/secret/updateSecret.js +25 -27
  372. package/commands/secret.d.ts +1 -1
  373. package/commands/secret.js +13 -20
  374. package/commands/testAccount/__tests__/create.test.d.ts +1 -0
  375. package/commands/testAccount/__tests__/create.test.js +33 -0
  376. package/commands/testAccount/__tests__/createConfig.test.d.ts +1 -0
  377. package/commands/testAccount/__tests__/createConfig.test.js +32 -0
  378. package/commands/testAccount/__tests__/delete.test.d.ts +1 -0
  379. package/commands/testAccount/__tests__/delete.test.js +29 -0
  380. package/commands/testAccount/__tests__/importData.test.d.ts +1 -0
  381. package/commands/testAccount/__tests__/importData.test.js +93 -0
  382. package/commands/testAccount/create.d.ts +6 -0
  383. package/commands/testAccount/create.js +130 -0
  384. package/commands/testAccount/createConfig.d.ts +8 -0
  385. package/commands/testAccount/createConfig.js +92 -0
  386. package/commands/testAccount/delete.d.ts +7 -0
  387. package/commands/testAccount/delete.js +187 -0
  388. package/commands/testAccount/importData.d.ts +9 -0
  389. package/commands/testAccount/importData.js +61 -0
  390. package/commands/testAccount.d.ts +3 -0
  391. package/commands/testAccount.js +25 -0
  392. package/commands/theme/__tests__/generate-selectors.test.d.ts +1 -0
  393. package/commands/theme/__tests__/generate-selectors.test.js +28 -0
  394. package/commands/theme/__tests__/marketplace-validate.test.d.ts +1 -0
  395. package/commands/theme/__tests__/marketplace-validate.test.js +36 -0
  396. package/commands/theme/__tests__/preview.test.d.ts +1 -0
  397. package/commands/theme/__tests__/preview.test.js +60 -0
  398. package/commands/theme/generate-selectors.d.ts +1 -1
  399. package/commands/theme/generate-selectors.js +23 -31
  400. package/commands/theme/marketplace-validate.d.ts +1 -1
  401. package/commands/theme/marketplace-validate.js +19 -26
  402. package/commands/theme/preview.d.ts +1 -1
  403. package/commands/theme/preview.js +61 -67
  404. package/commands/theme.d.ts +1 -1
  405. package/commands/theme.js +11 -18
  406. package/commands/upload.d.ts +1 -1
  407. package/commands/upload.js +77 -121
  408. package/commands/watch.d.ts +1 -1
  409. package/commands/watch.js +45 -63
  410. package/lang/en.d.ts +653 -237
  411. package/lang/en.js +976 -564
  412. package/lang/en.lyaml +46 -237
  413. package/lib/__tests__/accountTypes.test.d.ts +1 -0
  414. package/lib/__tests__/accountTypes.test.js +98 -0
  415. package/lib/__tests__/buildAccount.test.d.ts +1 -0
  416. package/lib/__tests__/buildAccount.test.js +282 -0
  417. package/lib/__tests__/commonOpts.test.d.ts +1 -0
  418. package/lib/__tests__/commonOpts.test.js +85 -0
  419. package/lib/__tests__/dependencyManagement.test.d.ts +1 -0
  420. package/lib/__tests__/dependencyManagement.test.js +175 -0
  421. package/lib/__tests__/developerTestAccounts.test.d.ts +1 -0
  422. package/lib/__tests__/developerTestAccounts.test.js +145 -0
  423. package/lib/__tests__/hasFeature.test.d.ts +1 -0
  424. package/lib/__tests__/hasFeature.test.js +173 -0
  425. package/lib/__tests__/importData.test.d.ts +1 -0
  426. package/lib/__tests__/importData.test.js +89 -0
  427. package/lib/__tests__/npm.test.d.ts +1 -0
  428. package/lib/__tests__/npm.test.js +57 -0
  429. package/lib/__tests__/oauth.test.d.ts +1 -0
  430. package/lib/__tests__/oauth.test.js +108 -0
  431. package/lib/__tests__/parsing.test.d.ts +1 -0
  432. package/lib/__tests__/parsing.test.js +34 -0
  433. package/lib/__tests__/polling.test.d.ts +1 -0
  434. package/lib/__tests__/polling.test.js +76 -0
  435. package/lib/__tests__/process.test.d.ts +1 -0
  436. package/lib/__tests__/process.test.js +85 -0
  437. package/lib/__tests__/projectProfiles.test.d.ts +1 -0
  438. package/lib/__tests__/projectProfiles.test.js +129 -0
  439. package/lib/__tests__/sandboxSync.test.d.ts +1 -0
  440. package/lib/__tests__/sandboxSync.test.js +126 -0
  441. package/lib/__tests__/sandboxes.test.d.ts +1 -0
  442. package/lib/__tests__/sandboxes.test.js +146 -0
  443. package/lib/__tests__/serverlessLogs.test.d.ts +1 -0
  444. package/lib/__tests__/serverlessLogs.test.js +149 -0
  445. package/lib/__tests__/usageTracking.test.d.ts +1 -0
  446. package/lib/__tests__/usageTracking.test.js +164 -0
  447. package/lib/__tests__/validation.test.d.ts +1 -0
  448. package/lib/__tests__/validation.test.js +143 -0
  449. package/lib/__tests__/yargsUtils.test.d.ts +1 -0
  450. package/lib/__tests__/yargsUtils.test.js +124 -0
  451. package/lib/accountTypes.d.ts +1 -0
  452. package/lib/accountTypes.js +31 -33
  453. package/lib/app/__tests__/migrate.test.d.ts +1 -0
  454. package/lib/app/__tests__/migrate.test.js +498 -0
  455. package/lib/app/__tests__/migrate_legacy.test.d.ts +1 -0
  456. package/lib/app/__tests__/migrate_legacy.test.js +134 -0
  457. package/lib/app/migrate.d.ts +13 -6
  458. package/lib/app/migrate.js +154 -154
  459. package/lib/app/migrate_legacy.d.ts +1 -1
  460. package/lib/app/migrate_legacy.js +72 -79
  461. package/lib/app/urls.d.ts +1 -1
  462. package/lib/app/urls.js +5 -9
  463. package/lib/buildAccount.d.ts +12 -3
  464. package/lib/buildAccount.js +165 -69
  465. package/lib/commonOpts.d.ts +4 -4
  466. package/lib/commonOpts.js +78 -58
  467. package/lib/configMigrate.d.ts +2 -2
  468. package/lib/configMigrate.js +44 -83
  469. package/lib/configOptions.d.ts +5 -0
  470. package/lib/configOptions.js +51 -40
  471. package/lib/constants.d.ts +52 -5
  472. package/lib/constants.js +77 -29
  473. package/lib/customObject.js +2 -6
  474. package/lib/dependencyManagement.d.ts +1 -1
  475. package/lib/dependencyManagement.js +37 -45
  476. package/lib/developerTestAccounts.d.ts +1 -1
  477. package/lib/developerTestAccounts.js +34 -39
  478. package/lib/doctor/Diagnosis.d.ts +1 -1
  479. package/lib/doctor/Diagnosis.js +15 -19
  480. package/lib/doctor/DiagnosticInfoBuilder.d.ts +1 -1
  481. package/lib/doctor/DiagnosticInfoBuilder.js +37 -43
  482. package/lib/doctor/Doctor.d.ts +1 -1
  483. package/lib/doctor/Doctor.js +56 -63
  484. package/lib/doctor/__tests__/Diagnosis.test.d.ts +1 -0
  485. package/lib/doctor/__tests__/Diagnosis.test.js +82 -0
  486. package/lib/doctor/__tests__/DiagnosticInfoBuilder.test.d.ts +1 -0
  487. package/lib/doctor/__tests__/DiagnosticInfoBuilder.test.js +167 -0
  488. package/lib/doctor/__tests__/Doctor.test.d.ts +1 -0
  489. package/lib/doctor/__tests__/Doctor.test.js +396 -0
  490. package/lib/enums/exitCodes.js +1 -4
  491. package/lib/errorHandlers/index.d.ts +4 -0
  492. package/lib/errorHandlers/index.js +37 -41
  493. package/lib/errorHandlers/suppressError.d.ts +1 -1
  494. package/lib/errorHandlers/suppressError.js +28 -31
  495. package/lib/errors/ProjectValidationError.d.ts +4 -0
  496. package/lib/errors/ProjectValidationError.js +9 -0
  497. package/lib/filesystem.js +8 -15
  498. package/lib/generateSelectors.js +18 -31
  499. package/lib/hasFeature.d.ts +2 -1
  500. package/lib/hasFeature.js +16 -6
  501. package/lib/importData.d.ts +3 -0
  502. package/lib/importData.js +50 -0
  503. package/lib/interpolation.js +11 -18
  504. package/lib/lang.d.ts +1 -1
  505. package/lib/lang.js +22 -27
  506. package/lib/links.d.ts +1 -0
  507. package/lib/links.js +26 -27
  508. package/lib/marketplaceValidate.d.ts +12 -2
  509. package/lib/marketplaceValidate.js +35 -52
  510. package/lib/mcp/setup.d.ts +23 -0
  511. package/lib/mcp/setup.js +238 -0
  512. package/lib/middleware/__test__/configMiddleware.test.js +34 -69
  513. package/lib/middleware/__test__/gitMiddleware.test.js +11 -46
  514. package/lib/middleware/__test__/notificationsMiddleware.test.js +1 -3
  515. package/lib/middleware/__test__/requestMiddleware.test.js +8 -13
  516. package/lib/middleware/__test__/utils.test.js +9 -11
  517. package/lib/middleware/__test__/yargsChecksMiddleware.test.js +16 -51
  518. package/lib/middleware/autoUpdateMiddleware.js +33 -40
  519. package/lib/middleware/configMiddleware.js +56 -39
  520. package/lib/middleware/fireAlarmMiddleware.d.ts +2 -2
  521. package/lib/middleware/fireAlarmMiddleware.js +29 -23
  522. package/lib/middleware/gitMiddleware.js +5 -8
  523. package/lib/middleware/notificationsMiddleware.js +7 -11
  524. package/lib/middleware/requestMiddleware.js +4 -10
  525. package/lib/middleware/utils.js +1 -4
  526. package/lib/middleware/yargsChecksMiddleware.js +10 -13
  527. package/lib/npm.js +14 -23
  528. package/lib/oauth.js +29 -35
  529. package/lib/parsing.d.ts +1 -0
  530. package/lib/parsing.js +8 -0
  531. package/lib/polling.d.ts +1 -1
  532. package/lib/polling.js +19 -13
  533. package/lib/process.js +26 -23
  534. package/lib/projectProfiles.d.ts +3 -2
  535. package/lib/projectProfiles.js +46 -38
  536. package/lib/projects/ProjectLogsManager.js +18 -21
  537. package/lib/projects/__tests__/AppDevModeInterface.test.d.ts +1 -0
  538. package/lib/projects/__tests__/AppDevModeInterface.test.js +541 -0
  539. package/lib/projects/__tests__/LocalDevProcess.test.d.ts +1 -0
  540. package/lib/projects/__tests__/LocalDevProcess.test.js +466 -0
  541. package/lib/projects/__tests__/LocalDevWebsocketServer.test.d.ts +1 -0
  542. package/lib/projects/__tests__/LocalDevWebsocketServer.test.js +365 -0
  543. package/lib/projects/__tests__/ProjectLogsManager.test.d.ts +1 -0
  544. package/lib/projects/__tests__/ProjectLogsManager.test.js +189 -0
  545. package/lib/projects/__tests__/components.test.d.ts +1 -0
  546. package/lib/projects/__tests__/components.test.js +338 -0
  547. package/lib/projects/__tests__/deploy.test.d.ts +1 -0
  548. package/lib/projects/__tests__/deploy.test.js +229 -0
  549. package/lib/projects/__tests__/localDevProjectHelpers.test.d.ts +1 -0
  550. package/lib/projects/__tests__/localDevProjectHelpers.test.js +122 -0
  551. package/lib/projects/__tests__/platformVersion.test.d.ts +1 -0
  552. package/lib/projects/__tests__/platformVersion.test.js +23 -0
  553. package/lib/projects/__tests__/projects.test.d.ts +1 -0
  554. package/lib/projects/__tests__/projects.test.js +84 -0
  555. package/lib/projects/__tests__/structure.test.d.ts +1 -0
  556. package/lib/projects/__tests__/structure.test.js +211 -0
  557. package/lib/projects/__tests__/upload.test.d.ts +1 -0
  558. package/lib/projects/__tests__/upload.test.js +82 -0
  559. package/lib/projects/add/__tests__/legacyAddComponent.test.d.ts +1 -0
  560. package/lib/projects/add/__tests__/legacyAddComponent.test.js +247 -0
  561. package/lib/projects/add/__tests__/v3AddComponent.test.d.ts +1 -0
  562. package/lib/projects/add/__tests__/v3AddComponent.test.js +319 -0
  563. package/lib/projects/add/legacyAddComponent.d.ts +5 -0
  564. package/lib/projects/add/legacyAddComponent.js +46 -0
  565. package/lib/projects/add/v3AddComponent.d.ts +9 -0
  566. package/lib/projects/add/v3AddComponent.js +101 -0
  567. package/lib/projects/components.d.ts +3 -0
  568. package/lib/projects/components.js +102 -0
  569. package/lib/projects/config.d.ts +1 -1
  570. package/lib/projects/config.js +32 -41
  571. package/lib/projects/create/__tests__/legacy.test.d.ts +1 -0
  572. package/lib/projects/create/__tests__/legacy.test.js +91 -0
  573. package/lib/projects/create/__tests__/v3.test.d.ts +1 -0
  574. package/lib/projects/create/__tests__/v3.test.js +241 -0
  575. package/lib/projects/create/index.d.ts +24 -0
  576. package/lib/projects/create/index.js +36 -0
  577. package/lib/projects/create/legacy.d.ts +6 -0
  578. package/lib/projects/create/legacy.js +53 -0
  579. package/lib/projects/create/v3.d.ts +26 -0
  580. package/lib/projects/create/v3.js +171 -0
  581. package/lib/projects/deploy.d.ts +13 -0
  582. package/lib/projects/deploy.js +63 -0
  583. package/lib/projects/ensureProjectExists.js +31 -37
  584. package/lib/projects/localDev/AppDevModeInterface.d.ts +13 -5
  585. package/lib/projects/localDev/AppDevModeInterface.js +218 -68
  586. package/lib/projects/localDev/DevServerManager.d.ts +1 -1
  587. package/lib/projects/localDev/DevServerManager.js +22 -27
  588. package/lib/projects/localDev/DevServerManagerV2.d.ts +2 -2
  589. package/lib/projects/localDev/DevServerManagerV2.js +16 -22
  590. package/lib/projects/localDev/LocalDevLogger.d.ts +5 -5
  591. package/lib/projects/localDev/LocalDevLogger.js +88 -78
  592. package/lib/projects/localDev/LocalDevManager.d.ts +1 -1
  593. package/lib/projects/localDev/LocalDevManager.js +106 -111
  594. package/lib/projects/localDev/LocalDevProcess.d.ts +19 -8
  595. package/lib/projects/localDev/LocalDevProcess.js +155 -61
  596. package/lib/projects/localDev/LocalDevState.d.ts +33 -11
  597. package/lib/projects/localDev/LocalDevState.js +77 -25
  598. package/lib/projects/localDev/LocalDevWatcher.d.ts +1 -1
  599. package/lib/projects/localDev/LocalDevWatcher.js +9 -17
  600. package/lib/projects/localDev/LocalDevWebsocketServer.d.ts +8 -3
  601. package/lib/projects/localDev/LocalDevWebsocketServer.js +138 -47
  602. package/lib/projects/localDev/{helpers.d.ts → helpers/account.d.ts} +3 -9
  603. package/lib/projects/localDev/helpers/account.js +233 -0
  604. package/lib/projects/localDev/helpers/project.d.ts +12 -0
  605. package/lib/projects/localDev/helpers/project.js +176 -0
  606. package/lib/projects/localDev/localDevWebsocketServerUtils.d.ts +4 -0
  607. package/lib/projects/localDev/localDevWebsocketServerUtils.js +10 -0
  608. package/lib/projects/platformVersion.d.ts +1 -0
  609. package/lib/projects/platformVersion.js +10 -0
  610. package/lib/projects/{buildAndDeploy.d.ts → pollProjectBuildAndDeploy.d.ts} +1 -2
  611. package/lib/projects/{buildAndDeploy.js → pollProjectBuildAndDeploy.js} +90 -109
  612. package/lib/projects/structure.d.ts +3 -3
  613. package/lib/projects/structure.js +32 -78
  614. package/lib/projects/ui.js +10 -13
  615. package/lib/projects/upload.d.ts +4 -1
  616. package/lib/projects/upload.js +91 -58
  617. package/lib/projects/urls.d.ts +5 -0
  618. package/lib/projects/urls.js +30 -17
  619. package/lib/projects/watch.d.ts +1 -1
  620. package/lib/projects/watch.js +48 -54
  621. package/lib/prompts/__tests__/createFunctionPrompt.test.d.ts +1 -0
  622. package/lib/prompts/__tests__/createFunctionPrompt.test.js +129 -0
  623. package/lib/prompts/__tests__/createModulePrompt.test.d.ts +1 -0
  624. package/lib/prompts/__tests__/createModulePrompt.test.js +187 -0
  625. package/lib/prompts/__tests__/createTemplatePrompt.test.d.ts +1 -0
  626. package/lib/prompts/__tests__/createTemplatePrompt.test.js +102 -0
  627. package/lib/prompts/__tests__/downloadProjectPrompt.test.d.ts +1 -0
  628. package/lib/prompts/__tests__/downloadProjectPrompt.test.js +28 -0
  629. package/lib/prompts/__tests__/projectAddPrompt.test.d.ts +1 -0
  630. package/lib/prompts/__tests__/projectAddPrompt.test.js +143 -0
  631. package/lib/prompts/__tests__/projectsLogsPrompt.test.d.ts +1 -0
  632. package/lib/prompts/__tests__/projectsLogsPrompt.test.js +37 -0
  633. package/lib/prompts/__tests__/selectProjectTemplatePrompt.test.d.ts +1 -0
  634. package/lib/prompts/__tests__/selectProjectTemplatePrompt.test.js +160 -0
  635. package/lib/prompts/accountNamePrompt.d.ts +1 -1
  636. package/lib/prompts/accountNamePrompt.js +26 -31
  637. package/lib/prompts/accountsPrompt.js +12 -15
  638. package/lib/prompts/cmsFieldPrompt.js +13 -19
  639. package/lib/prompts/confirmImportDataPrompt.d.ts +1 -0
  640. package/lib/prompts/confirmImportDataPrompt.js +12 -0
  641. package/lib/prompts/createApiSamplePrompt.d.ts +1 -1
  642. package/lib/prompts/createApiSamplePrompt.js +9 -12
  643. package/lib/prompts/createDeveloperTestAccountConfigPrompt.d.ts +18 -0
  644. package/lib/prompts/createDeveloperTestAccountConfigPrompt.js +146 -0
  645. package/lib/prompts/createFunctionPrompt.d.ts +2 -1
  646. package/lib/prompts/createFunctionPrompt.js +51 -25
  647. package/lib/prompts/createModulePrompt.d.ts +2 -1
  648. package/lib/prompts/createModulePrompt.js +60 -17
  649. package/lib/prompts/createTemplatePrompt.d.ts +3 -24
  650. package/lib/prompts/createTemplatePrompt.js +13 -8
  651. package/lib/prompts/downloadProjectPrompt.js +17 -20
  652. package/lib/prompts/importDataFilePathPrompt.d.ts +1 -0
  653. package/lib/prompts/importDataFilePathPrompt.js +26 -0
  654. package/lib/prompts/importDataTestAccountSelectPrompt.d.ts +3 -0
  655. package/lib/prompts/importDataTestAccountSelectPrompt.js +29 -0
  656. package/lib/prompts/installAppPrompt.d.ts +7 -1
  657. package/lib/prompts/installAppPrompt.js +29 -21
  658. package/lib/prompts/personalAccessKeyPrompt.d.ts +2 -2
  659. package/lib/prompts/personalAccessKeyPrompt.js +53 -49
  660. package/lib/prompts/previewPrompt.js +15 -22
  661. package/lib/prompts/projectAddPrompt.d.ts +6 -1
  662. package/lib/prompts/projectAddPrompt.js +39 -13
  663. package/lib/prompts/projectDevTargetAccountPrompt.d.ts +1 -1
  664. package/lib/prompts/projectDevTargetAccountPrompt.js +49 -54
  665. package/lib/prompts/projectNameAndDestPrompt.d.ts +3 -0
  666. package/lib/prompts/projectNameAndDestPrompt.js +53 -0
  667. package/lib/prompts/projectNamePrompt.js +11 -14
  668. package/lib/prompts/projectsLogsPrompt.js +5 -8
  669. package/lib/prompts/promptUtils.d.ts +11 -3
  670. package/lib/prompts/promptUtils.js +195 -44
  671. package/lib/prompts/sandboxesPrompt.d.ts +1 -1
  672. package/lib/prompts/sandboxesPrompt.js +26 -30
  673. package/lib/prompts/secretPrompt.js +10 -15
  674. package/lib/prompts/selectAppPrompt.js +11 -14
  675. package/lib/prompts/selectHubDBTablePrompt.js +24 -30
  676. package/lib/prompts/selectProjectTemplatePrompt.d.ts +27 -0
  677. package/lib/prompts/selectProjectTemplatePrompt.js +71 -0
  678. package/lib/prompts/selectPublicAppForMigrationPrompt.js +22 -25
  679. package/lib/prompts/setAsDefaultAccountPrompt.js +18 -11
  680. package/lib/prompts/uploadPrompt.js +11 -17
  681. package/lib/sandboxSync.d.ts +1 -1
  682. package/lib/sandboxSync.js +58 -65
  683. package/lib/sandboxes.d.ts +5 -1
  684. package/lib/sandboxes.js +72 -76
  685. package/lib/schema.js +16 -19
  686. package/lib/serverlessLogs.js +45 -52
  687. package/lib/testUtils.js +5 -10
  688. package/lib/theme/__tests__/migrate.test.d.ts +1 -0
  689. package/lib/theme/__tests__/migrate.test.js +233 -0
  690. package/lib/theme/migrate.d.ts +13 -0
  691. package/lib/theme/migrate.js +90 -0
  692. package/lib/ui/SpinniesManager.d.ts +1 -1
  693. package/lib/ui/SpinniesManager.js +29 -35
  694. package/lib/ui/__tests__/removeAnsiCodes.test.d.ts +1 -0
  695. package/lib/ui/__tests__/removeAnsiCodes.test.js +84 -0
  696. package/lib/ui/boxen.js +11 -14
  697. package/lib/ui/git.js +14 -20
  698. package/lib/ui/index.d.ts +6 -0
  699. package/lib/ui/index.js +58 -81
  700. package/lib/ui/logger.d.ts +1 -0
  701. package/lib/ui/logger.js +11 -13
  702. package/lib/ui/removeAnsiCodes.d.ts +1 -0
  703. package/lib/ui/removeAnsiCodes.js +4 -0
  704. package/lib/ui/serverlessFunctionLogs.js +14 -20
  705. package/lib/ui/spinniesUtils.js +24 -39
  706. package/lib/ui/supportHyperlinks.js +3 -6
  707. package/lib/ui/supportsColor.js +11 -17
  708. package/lib/ui/table.js +6 -13
  709. package/lib/upload.js +15 -21
  710. package/lib/usageTracking.d.ts +11 -0
  711. package/lib/usageTracking.js +88 -103
  712. package/lib/utils/hasFlag.d.ts +1 -0
  713. package/lib/utils/hasFlag.js +9 -0
  714. package/lib/validation.d.ts +1 -1
  715. package/lib/validation.js +50 -89
  716. package/lib/yargsUtils.d.ts +4 -1
  717. package/lib/yargsUtils.js +28 -25
  718. package/mcp-server/server.d.ts +1 -0
  719. package/mcp-server/server.js +17 -0
  720. package/mcp-server/tools/cms/HsCreateFunctionTool.d.ts +32 -0
  721. package/mcp-server/tools/cms/HsCreateFunctionTool.js +96 -0
  722. package/mcp-server/tools/cms/HsCreateModuleTool.d.ts +38 -0
  723. package/mcp-server/tools/cms/HsCreateModuleTool.js +118 -0
  724. package/mcp-server/tools/cms/HsCreateTemplateTool.d.ts +26 -0
  725. package/mcp-server/tools/cms/HsCreateTemplateTool.js +75 -0
  726. package/mcp-server/tools/cms/HsFunctionLogsTool.d.ts +32 -0
  727. package/mcp-server/tools/cms/HsFunctionLogsTool.js +76 -0
  728. package/mcp-server/tools/cms/HsListFunctionsTool.d.ts +23 -0
  729. package/mcp-server/tools/cms/HsListFunctionsTool.js +58 -0
  730. package/mcp-server/tools/cms/HsListTool.d.ts +23 -0
  731. package/mcp-server/tools/cms/HsListTool.js +58 -0
  732. package/mcp-server/tools/cms/__tests__/HsCreateFunctionTool.test.d.ts +1 -0
  733. package/mcp-server/tools/cms/__tests__/HsCreateFunctionTool.test.js +251 -0
  734. package/mcp-server/tools/cms/__tests__/HsCreateModuleTool.test.d.ts +1 -0
  735. package/mcp-server/tools/cms/__tests__/HsCreateModuleTool.test.js +224 -0
  736. package/mcp-server/tools/cms/__tests__/HsCreateTemplateTool.test.d.ts +1 -0
  737. package/mcp-server/tools/cms/__tests__/HsCreateTemplateTool.test.js +206 -0
  738. package/mcp-server/tools/cms/__tests__/HsFunctionLogsTool.test.d.ts +1 -0
  739. package/mcp-server/tools/cms/__tests__/HsFunctionLogsTool.test.js +183 -0
  740. package/mcp-server/tools/cms/__tests__/HsListFunctionsTool.test.d.ts +1 -0
  741. package/mcp-server/tools/cms/__tests__/HsListFunctionsTool.test.js +120 -0
  742. package/mcp-server/tools/cms/__tests__/HsListTool.test.d.ts +1 -0
  743. package/mcp-server/tools/cms/__tests__/HsListTool.test.js +120 -0
  744. package/mcp-server/tools/index.d.ts +3 -0
  745. package/mcp-server/tools/index.js +38 -0
  746. package/mcp-server/tools/project/AddFeatureToProjectTool.d.ts +29 -0
  747. package/mcp-server/tools/project/AddFeatureToProjectTool.js +76 -0
  748. package/mcp-server/tools/project/CreateProjectTool.d.ts +35 -0
  749. package/mcp-server/tools/project/CreateProjectTool.js +93 -0
  750. package/mcp-server/tools/project/DeployProjectTool.d.ts +20 -0
  751. package/mcp-server/tools/project/DeployProjectTool.js +49 -0
  752. package/mcp-server/tools/project/DocFetchTool.d.ts +17 -0
  753. package/mcp-server/tools/project/DocFetchTool.js +49 -0
  754. package/mcp-server/tools/project/DocsSearchTool.d.ts +29 -0
  755. package/mcp-server/tools/project/DocsSearchTool.js +62 -0
  756. package/mcp-server/tools/project/GetConfigValuesTool.d.ts +23 -0
  757. package/mcp-server/tools/project/GetConfigValuesTool.js +58 -0
  758. package/mcp-server/tools/project/GuidedWalkthroughTool.d.ts +17 -0
  759. package/mcp-server/tools/project/GuidedWalkthroughTool.js +57 -0
  760. package/mcp-server/tools/project/UploadProjectTools.d.ts +17 -0
  761. package/mcp-server/tools/project/UploadProjectTools.js +31 -0
  762. package/mcp-server/tools/project/ValidateProjectTool.d.ts +17 -0
  763. package/mcp-server/tools/project/ValidateProjectTool.js +34 -0
  764. package/mcp-server/tools/project/__tests__/AddFeatureToProjectTool.test.d.ts +1 -0
  765. package/mcp-server/tools/project/__tests__/AddFeatureToProjectTool.test.js +151 -0
  766. package/mcp-server/tools/project/__tests__/CreateProjectTool.test.d.ts +1 -0
  767. package/mcp-server/tools/project/__tests__/CreateProjectTool.test.js +127 -0
  768. package/mcp-server/tools/project/__tests__/DeployProjectTool.test.d.ts +1 -0
  769. package/mcp-server/tools/project/__tests__/DeployProjectTool.test.js +119 -0
  770. package/mcp-server/tools/project/__tests__/DocFetchTool.test.d.ts +1 -0
  771. package/mcp-server/tools/project/__tests__/DocFetchTool.test.js +117 -0
  772. package/mcp-server/tools/project/__tests__/DocsSearchTool.test.d.ts +1 -0
  773. package/mcp-server/tools/project/__tests__/DocsSearchTool.test.js +192 -0
  774. package/mcp-server/tools/project/__tests__/GetConfigValuesTool.test.d.ts +1 -0
  775. package/mcp-server/tools/project/__tests__/GetConfigValuesTool.test.js +199 -0
  776. package/mcp-server/tools/project/__tests__/GuidedWalkthroughTool.test.d.ts +1 -0
  777. package/mcp-server/tools/project/__tests__/GuidedWalkthroughTool.test.js +126 -0
  778. package/mcp-server/tools/project/__tests__/UploadProjectTools.test.d.ts +1 -0
  779. package/mcp-server/tools/project/__tests__/UploadProjectTools.test.js +107 -0
  780. package/mcp-server/tools/project/__tests__/ValidateProjectTool.test.d.ts +1 -0
  781. package/mcp-server/tools/project/__tests__/ValidateProjectTool.test.js +110 -0
  782. package/mcp-server/tools/project/constants.d.ts +6 -0
  783. package/mcp-server/tools/project/constants.js +32 -0
  784. package/mcp-server/types.d.ts +14 -0
  785. package/mcp-server/types.js +13 -0
  786. package/mcp-server/utils/__tests__/cliConfig.test.d.ts +1 -0
  787. package/mcp-server/utils/__tests__/cliConfig.test.js +110 -0
  788. package/mcp-server/utils/__tests__/command.test.d.ts +1 -0
  789. package/mcp-server/utils/__tests__/command.test.js +45 -0
  790. package/mcp-server/utils/__tests__/project.test.d.ts +1 -0
  791. package/mcp-server/utils/__tests__/project.test.js +79 -0
  792. package/mcp-server/utils/cliConfig.d.ts +1 -0
  793. package/mcp-server/utils/cliConfig.js +12 -0
  794. package/mcp-server/utils/command.d.ts +3 -0
  795. package/mcp-server/utils/command.js +9 -0
  796. package/mcp-server/utils/content.d.ts +3 -0
  797. package/mcp-server/utils/content.js +17 -0
  798. package/mcp-server/utils/project.d.ts +5 -0
  799. package/mcp-server/utils/project.js +14 -0
  800. package/mcp-server/utils/toolUsageTracking.d.ts +3 -0
  801. package/mcp-server/utils/toolUsageTracking.js +23 -0
  802. package/package.json +42 -33
  803. package/types/Cms.d.ts +17 -1
  804. package/types/Cms.js +25 -2
  805. package/types/LocalDev.d.ts +34 -8
  806. package/types/LocalDev.js +1 -2
  807. package/types/ProjectComponents.d.ts +2 -2
  808. package/types/ProjectComponents.js +1 -2
  809. package/types/Projects.d.ts +20 -2
  810. package/types/Projects.js +2 -5
  811. package/types/Prompts.d.ts +5 -2
  812. package/types/Prompts.js +1 -2
  813. package/types/Sandboxes.js +1 -2
  814. package/types/Yargs.d.ts +7 -1
  815. package/types/Yargs.js +1 -2
  816. package/ui/components/BoxWithTitle.d.ts +8 -0
  817. package/ui/components/BoxWithTitle.js +9 -0
  818. package/ui/components/HorizontalSelectPrompt.d.ts +8 -0
  819. package/ui/components/HorizontalSelectPrompt.js +30 -0
  820. package/ui/components/StatusMessageBoxes.d.ts +12 -0
  821. package/ui/components/StatusMessageBoxes.js +31 -0
  822. package/ui/index.d.ts +1 -0
  823. package/ui/index.js +6 -0
  824. package/ui/lib/ui-testing-utils.d.ts +9 -0
  825. package/ui/lib/ui-testing-utils.js +47 -0
  826. package/ui/lib/useTerminalSize.d.ts +13 -0
  827. package/ui/lib/useTerminalSize.js +31 -0
  828. package/ui/styles.d.ts +18 -0
  829. package/ui/styles.js +18 -0
  830. package/ui/views/UiSandbox.d.ts +5 -0
  831. package/ui/views/UiSandbox.js +25 -0
  832. package/bin/hsmcp.d.ts +0 -2
  833. package/bin/hsmcp.js +0 -13
  834. package/commands/setupMcp.d.ts +0 -8
  835. package/commands/setupMcp.js +0 -229
  836. package/lib/projects/create.d.ts +0 -5
  837. package/lib/projects/create.js +0 -50
  838. package/lib/projects/localDev/helpers.js +0 -351
  839. package/lib/prompts/createProjectPrompt.d.ts +0 -19
  840. package/lib/prompts/createProjectPrompt.js +0 -95
  841. package/mcp-server/index.js +0 -17
  842. package/mcp-server/mcpLoader.d.ts +0 -5
  843. package/mcp-server/mcpLoader.js +0 -24
  844. package/mcp-server/tools/ExplainProjectStructureTool.d.ts +0 -33
  845. package/mcp-server/tools/ExplainProjectStructureTool.js +0 -266
  846. package/mcp-server/tools/GenerateAppComponentTool.d.ts +0 -99
  847. package/mcp-server/tools/GenerateAppComponentTool.js +0 -193
  848. package/mcp-server/tools/GenerateCardComponentTool.d.ts +0 -74
  849. package/mcp-server/tools/GenerateCardComponentTool.js +0 -146
  850. package/mcp-server/tools/GenerateProjectConfigTool.d.ts +0 -32
  851. package/mcp-server/tools/GenerateProjectConfigTool.js +0 -40
  852. package/mcp-server/tools/HubSpotCLIHelper.d.ts +0 -24
  853. package/mcp-server/tools/HubSpotCLIHelper.js +0 -110
  854. package/mcp-server/tools/UploadProjectTool.d.ts +0 -44
  855. package/mcp-server/tools/UploadProjectTool.js +0 -166
  856. package/mcp-server/tools/ValidateProjectTool.d.ts +0 -62
  857. package/mcp-server/tools/ValidateProjectTool.js +0 -336
  858. /package/{mcp-server/index.d.ts → api/__tests__/migrate.test.d.ts} +0 -0
package/lang/en.js CHANGED
@@ -1,14 +1,14 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.lib = exports.commands = void 0;
7
- const chalk_1 = __importDefault(require("chalk"));
8
- const ui_1 = require("../lib/ui");
9
- const urls_1 = require("../lib/projects/urls");
10
- const ui_2 = require("../lib/ui");
11
- exports.commands = {
1
+ import chalk from 'chalk';
2
+ import { mapToUserFriendlyName } from '@hubspot/project-parsing-lib';
3
+ import { PLATFORM_VERSIONS } from '@hubspot/local-dev-lib/constants/projects';
4
+ import { PERSONAL_ACCESS_KEY_AUTH_METHOD } from '@hubspot/local-dev-lib/constants/auth';
5
+ import { ARCHIVED_HUBSPOT_CONFIG_YAML_FILE_NAME, GLOBAL_CONFIG_PATH, DEFAULT_HUBSPOT_CONFIG_YAML_FILE_NAME, } from '@hubspot/local-dev-lib/constants/config';
6
+ import { uiAccountDescription, uiBetaTag, uiCommandReference, uiLink, UI_COLORS, } from '../lib/ui/index.js';
7
+ import { getProjectDetailUrl, getProjectSettingsUrl, getLocalDevUiUrl, getAppAllowlistUrl, } from '../lib/projects/urls.js';
8
+ import { getProductUpdatesUrl } from '../lib/links.js';
9
+ import { APP_DISTRIBUTION_TYPES, APP_AUTH_TYPES, PROJECT_CONFIG_FILE, PROJECT_WITH_APP, LEGACY_PUBLIC_APP_FILE, } from '../lib/constants.js';
10
+ import { getAccountIdentifier } from '@hubspot/local-dev-lib/config/getAccountIdentifier';
11
+ export const commands = {
12
12
  generalErrors: {
13
13
  srcIsProject: (src, command) => `"${src}" is in a project folder. Did you mean "hs project ${command}"?`,
14
14
  handleDeprecatedEnvVariables: {
@@ -18,6 +18,55 @@ exports.commands = {
18
18
  configFileExists: (configPath) => `A configuration file already exists at ${configPath}. To specify a new configuration file, delete the existing one and try again.`,
19
19
  },
20
20
  },
21
+ getStarted: {
22
+ describe: 'A step-by-step command to get you started with a HubSpot project.',
23
+ options: {
24
+ dest: {
25
+ describe: 'Directory where the project should be created',
26
+ },
27
+ name: {
28
+ describe: 'Project name (cannot be changed)',
29
+ },
30
+ templateSource: {
31
+ describe: 'Path to custom GitHub repository from which to create project template',
32
+ },
33
+ },
34
+ startTitle: 'Welcome to HubSpot Development!',
35
+ verboseDescribe: 'A step-by-step command to get you started with a HubSpot project.',
36
+ startDescription: 'You can use the HubSpot CLI to build apps, CMS themes, and more.\n',
37
+ guideOverview: (accountName) => `This guide will walk you through deploying your first project to ${chalk.bold(accountName)}.\nTo target a different account, exit this guide ${chalk.bold('(ctrl + c)')} and run ${uiCommandReference('hs account use')} before trying again.`,
38
+ designManager: 'To onboard with CMS, please visit the HubSpot Design Manager in your account and follow the checklist items.',
39
+ openDesignManager: 'Click here to go to the HubSpot Design Manager',
40
+ openDesignManagerPrompt: 'Open Design Manager in your browser?',
41
+ openedDesignManager: 'Redirected to Design Manager!',
42
+ developerOverviewBrowserOpenPrep: "We'll take you to your HubSpot account and walk you through installing and previewing your new app.",
43
+ openInstallUrl: 'Open HubSpot to install your app in your account?',
44
+ openedDeveloperOverview: 'HubSpot opened!',
45
+ prompts: {
46
+ selectOption: 'Are you looking to build apps or CMS assets?',
47
+ options: {
48
+ app: 'App',
49
+ cms: 'CMS assets',
50
+ },
51
+ uploadProject: (accountName) => `Would you like to upload this project to account "${accountName}" now?`,
52
+ projectCreated: {
53
+ title: chalk.bold('Next steps:'),
54
+ description: `Let's prepare and upload your project to HubSpot.\nYou can use ${uiCommandReference('hs project install-deps')} to ${chalk.bold('install dependencies')} and ${uiCommandReference('hs project upload')} to ${chalk.bold('upload')} your project.`,
55
+ },
56
+ },
57
+ logs: {
58
+ appSelected: `We'll create a new project with a sample app for you.\nProjects are what you can use to create apps with HubSpot.\nUsually you'll use the ${uiCommandReference('hs project create')} command, but we'll go ahead and make one now.`,
59
+ dependenciesInstalled: 'Dependencies installed successfully.',
60
+ uploadingProject: 'Uploading your project to HubSpot...',
61
+ uploadSuccess: 'Project uploaded successfully!',
62
+ developerOverviewLink: 'Open this link to navigate to your HubSpot developer portal',
63
+ },
64
+ errors: {
65
+ uploadFailed: 'Failed to upload project to HubSpot.',
66
+ configFileNotFound: 'Could not find project configuration for upload.',
67
+ installDepsFailed: 'Failed to install dependencies.',
68
+ },
69
+ },
21
70
  completion: {
22
71
  describe: 'Enable bash completion shortcuts for commands. Concat the generated script to your .bashrc, .bash_profile, or .zshrc file.',
23
72
  examples: {
@@ -27,11 +76,29 @@ exports.commands = {
27
76
  account: {
28
77
  describe: 'Commands for managing configured accounts.',
29
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 ${GLOBAL_CONFIG_PATH} that stores your account information.\n\nThe authentication method is ${chalk.bold(PERSONAL_ACCESS_KEY_AUTH_METHOD.value)}, which is an access token tied to a specific user account.\n\nGlobal configuration replaces ${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
+ invalidAccountIdProvided: `--account must be a number.`,
88
+ failedToUpdateConfig: 'Failed to update the configuration file. Please try again.',
89
+ migrationNotConfirmed: `Did not migrate your configuration file. Run ${uiCommandReference('hs auth')} to update your existing config, or use ${uiCommandReference('hs config migrate')} to switch to the new global configuration.`,
90
+ mergeNotConfirmed: `Did not merge configuration files. When you are ready to merge the deprecated config file with the global config file, run ${uiCommandReference('hs config migrate')}.`,
91
+ },
92
+ success: {
93
+ configFileCreated: (configPath) => `Created config file "${configPath}"`,
94
+ configFileUpdated: (accountId) => `Connected account ${uiAccountDescription(accountId)} and set it as the default account`,
95
+ },
96
+ },
30
97
  list: {
31
- accounts: `${chalk_1.default.bold('Accounts')}:`,
32
- defaultAccount: (account) => `${chalk_1.default.bold('Default account')}: ${account}`,
98
+ accounts: `${chalk.bold('Accounts')}:`,
99
+ defaultAccount: (account) => `${chalk.bold('Default account')}: ${account}`,
33
100
  describe: 'List names of accounts defined in config.',
34
- configPath: (configPath) => `${chalk_1.default.bold('Config path')}: ${configPath}`,
101
+ configPath: (configPath) => `${chalk.bold('Config path')}: ${configPath}`,
35
102
  labels: {
36
103
  accountId: 'Account ID',
37
104
  authType: 'Auth Type',
@@ -98,7 +165,7 @@ exports.commands = {
98
165
  },
99
166
  },
100
167
  info: {
101
- accountId: (accountId) => `${chalk_1.default.bold('Account ID')}: ${accountId}`,
168
+ accountId: (accountId) => `${chalk.bold('Account ID')}: ${accountId}`,
102
169
  describe: 'Print information about the default account, or about the account specified with the "account" option.',
103
170
  errors: {
104
171
  notUsingPersonalAccessKey: 'This command currently only supports fetching scopes for the personal access key auth type.',
@@ -108,8 +175,8 @@ exports.commands = {
108
175
  idBased: 'Print information for the account with accountId equal to "1234567"',
109
176
  nameBased: 'Print information for the account in the config with name equal to "MyAccount"',
110
177
  },
111
- name: (name) => `${chalk_1.default.bold('Account name')}: ${name}`,
112
- scopeGroups: `${chalk_1.default.bold('Scopes available')}:`,
178
+ name: (name) => `${chalk.bold('Account name')}: ${name}`,
179
+ scopeGroups: `${chalk.bold('Scopes available')}:`,
113
180
  },
114
181
  clean: {
115
182
  describe: 'Check for inactive accounts and removes them from the CLI config.',
@@ -130,8 +197,11 @@ exports.commands = {
130
197
  },
131
198
  },
132
199
  auth: {
133
- describe: (configName) => `Configure authentication for your HubSpot account. This will update the ${configName} file that stores your account information.`,
200
+ describe: 'Configure authentication for your HubSpot account.',
201
+ verboseDescribe: (configName, authMethod) => `Configure authentication for a HubSpot account. This will update the ${configName} file that stores your account information.\n\nThe recommended authentication method is ${chalk.bold(authMethod)}, which uses an access token tied to a specific user account.`,
134
202
  errors: {
203
+ invalidAccountIdProvided: `--account must be a number.`,
204
+ globalConfigFileExists: (accountAuthCommand) => `You are using our new global configuration for account management, which is not compatible with this command. Please use ${uiCommandReference(accountAuthCommand)} instead.`,
135
205
  noConfigFileFound: 'No config file was found. To create a new config file, use the "hs init" command.',
136
206
  unsupportedAuthType: (type, supportedProtocols) => `Unsupported auth type: ${type}. The only supported authentication protocols are ${supportedProtocols}.`,
137
207
  },
@@ -143,6 +213,9 @@ exports.commands = {
143
213
  account: {
144
214
  describe: 'HubSpot account to authenticate',
145
215
  },
216
+ personalAccessKey: {
217
+ describe: 'Enter existing personal access key',
218
+ },
146
219
  },
147
220
  success: {
148
221
  configFileUpdated: (accountName, configFilename, authType) => `Account "${accountName}" updated in ${configFilename} using "${authType}"`,
@@ -151,6 +224,21 @@ exports.commands = {
151
224
  config: {
152
225
  describe: 'Commands for managing the CLI config file.',
153
226
  subcommands: {
227
+ migrate: {
228
+ describe: `Migrate from the deprecated ${DEFAULT_HUBSPOT_CONFIG_YAML_FILE_NAME} file to the new global config file at ${GLOBAL_CONFIG_PATH}.`,
229
+ verboseDescribe: `This command will create or update the global configuration file in your root directory. It will archive the current config as ${ARCHIVED_HUBSPOT_CONFIG_YAML_FILE_NAME}.`,
230
+ errors: {
231
+ noConfigToMigrate: `No ${DEFAULT_HUBSPOT_CONFIG_YAML_FILE_NAME} was found. There is nothing to migrate.`,
232
+ configNotFound: (configPath) => `A configuration file at ${configPath} could not be found. Please try again with a valid file path.`,
233
+ },
234
+ options: {
235
+ force: 'Bypass prompts and overwrite any conflicting values in the global config with the deprecated config values.',
236
+ },
237
+ examples: {
238
+ default: `Migrate from the deprecated ${DEFAULT_HUBSPOT_CONFIG_YAML_FILE_NAME} file to the new global config file at ${GLOBAL_CONFIG_PATH}`,
239
+ configFlag: `Migrate a specific config file (specified with the config flag) to the new global config file at ${GLOBAL_CONFIG_PATH}`,
240
+ },
241
+ },
154
242
  set: {
155
243
  describe: 'Set various configuration options within the hubspot CLI config file.',
156
244
  promptMessage: 'Select a config option to update',
@@ -170,6 +258,13 @@ exports.commands = {
170
258
  allowAutoUpdates: {
171
259
  describe: 'Enable or disable auto updates',
172
260
  },
261
+ autoOpenBrowser: {
262
+ describe: 'Enable or disable automatic opening of the browser',
263
+ },
264
+ },
265
+ errors: {
266
+ invalidBoolean: (commandName, value) => `Invalid boolean value "${value}" for --${commandName}. Valid values are: true, false`,
267
+ invalidHTTPTimeout: `Invalid HTTP timeout value. Must be a number greater than 3000.`,
173
268
  },
174
269
  },
175
270
  },
@@ -235,7 +330,7 @@ exports.commands = {
235
330
  create: {
236
331
  describe: (supportedAssetTypes) => `Create HubSpot sample apps and CMS assets. Supported assets are ${supportedAssetTypes}.`,
237
332
  errors: {
238
- 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}".`,
333
+ 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 ${uiCommandReference(newCommand)}" command instead. Then when prompted select "${type}".`,
239
334
  unsupportedAssetType: (assetType, supportedAssetTypes) => `The asset type ${assetType} is not supported. Supported asset types are ${supportedAssetTypes}.`,
240
335
  unusablePath: (path) => `The "${path}" is not a usable path to a directory.`,
241
336
  },
@@ -250,6 +345,38 @@ exports.commands = {
250
345
  describe: 'Type of asset',
251
346
  },
252
347
  },
348
+ flags: {
349
+ templateType: {
350
+ describe: 'Template type for template creation - only used when type is template',
351
+ },
352
+ moduleLabel: {
353
+ describe: 'Label for module creation - only used when type is module',
354
+ },
355
+ reactType: {
356
+ describe: 'Whether to create a React module - only used when type is module',
357
+ },
358
+ contentTypes: {
359
+ describe: (contentTypes) => `Content types where the module can be used (comma-separated list: ${contentTypes.join(', ')}) - only used when type is module`,
360
+ },
361
+ global: {
362
+ describe: 'Whether to create a global module - only used when type is module',
363
+ },
364
+ availableForNewContent: {
365
+ describe: 'Whether the template is available for new content - only used when type is template',
366
+ },
367
+ functionsFolder: {
368
+ describe: 'Folder to create functions in - only used when type is function',
369
+ },
370
+ filename: {
371
+ describe: 'Filename for the function - only used when type is function',
372
+ },
373
+ endpointMethod: {
374
+ describe: 'HTTP method for the function endpoint - only used when type is function',
375
+ },
376
+ endpointPath: {
377
+ describe: 'API endpoint path for the function - only used when type is function',
378
+ },
379
+ },
253
380
  subcommands: {
254
381
  apiSample: {
255
382
  folderOverwritePrompt: (folderName) => `The folder with name "${folderName}" already exists. Overwrite?`,
@@ -277,7 +404,7 @@ exports.commands = {
277
404
  },
278
405
  },
279
406
  customObject: {
280
- betaMessage: `${chalk_1.default.bold('[BETA]')} The Custom Object CLI is currently in beta and is subject to change.`,
407
+ betaMessage: `${chalk.bold('[BETA]')} The Custom Object CLI is currently in beta and is subject to change.`,
281
408
  describe: 'Commands for managing custom objects.',
282
409
  seeMoreLink: 'View our docs to find out more.',
283
410
  subcommands: {
@@ -429,9 +556,9 @@ exports.commands = {
429
556
  },
430
557
  errors: {
431
558
  generatingDiagnosis: 'Error generating diagnosis',
432
- unableToWriteOutputFile: (file, errorMessage) => `Unable to write output to ${chalk_1.default.bold(file)}, ${errorMessage}`,
559
+ unableToWriteOutputFile: (file, errorMessage) => `Unable to write output to ${chalk.bold(file)}, ${errorMessage}`,
433
560
  },
434
- outputWritten: (filename) => `Output written to ${chalk_1.default.bold(filename)}`,
561
+ outputWritten: (filename) => `Output written to ${chalk.bold(filename)}`,
435
562
  },
436
563
  fetch: {
437
564
  describe: 'Fetch a file, directory or module from HubSpot and write to a path on your computer.',
@@ -640,10 +767,28 @@ exports.commands = {
640
767
  fetch: (tableId, path) => `Downloaded HubDB table ${tableId} to ${path}`,
641
768
  },
642
769
  },
770
+ list: {
771
+ tables: `${chalk.bold('Tables')}:`,
772
+ describe: 'List HubDB tables.',
773
+ labels: {
774
+ label: 'Label',
775
+ id: 'ID',
776
+ name: 'Name',
777
+ columns: 'Columns',
778
+ rows: 'Rows',
779
+ },
780
+ success: (accountId) => `Showing tables for account ${accountId}:`,
781
+ noTables: (accountId) => `No tables found for account ${accountId}.`,
782
+ tablesDisplayed: (displayed, total, truncated) => `Displaying ${displayed} of ${total} tables${truncated
783
+ ? `, the remaining ${truncated} tables were not displayed.`
784
+ : '.'}`,
785
+ viewTablesLink: (baseUrl, accountId) => uiLink('Manage tables in HubSpot', `${baseUrl}/hubdb/${accountId}`),
786
+ },
643
787
  },
644
788
  },
645
789
  init: {
646
- describe: (configName) => `Configure authentication for your HubSpot account. This will create a ${configName} file to store your account information.`,
790
+ describe: 'Create a CLI config file and configure authentication for your HubSpot account.',
791
+ verboseDescribe: (configName, command, authMethod) => `Configure authentication for a HubSpot account. This will create a ${configName} file to store your account information. To configure authentication for additional accounts, run ${command}.\n\nThe recommended authentication method is ${chalk.bold(authMethod)}, which uses an access token tied to a specific user account.`,
647
792
  options: {
648
793
  authType: {
649
794
  describe: 'Authentication mechanism',
@@ -658,14 +803,16 @@ exports.commands = {
658
803
  },
659
804
  success: {
660
805
  configFileCreated: (configPath) => `Created config file "${configPath}"`,
661
- configFileUpdated: (account, authType) => `Connected account "${account}" using "${authType}" and set it as the default account`,
806
+ configFileUpdated: (authType, account) => `Connected account "${account}" using "${authType}" and set it as the default account`,
662
807
  },
663
808
  logs: {
664
809
  updateConfig: 'To update an existing config file, use the "hs auth" command.',
665
810
  },
666
811
  errors: {
812
+ invalidAccountIdProvided: `--account must be a number.`,
667
813
  configFileExists: (configPath) => `The config file ${configPath} already exists.`,
668
814
  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.`,
815
+ globalConfigFileExists: `You are using our new global configuration for account management, which is not compatible with this command. Please use ${uiCommandReference('hs account auth')} instead.`,
669
816
  },
670
817
  },
671
818
  lint: {
@@ -720,6 +867,65 @@ exports.commands = {
720
867
  },
721
868
  tailLogs: (functionPath, accountId) => `Waiting for log entries for "${functionPath}" on account "${accountId}".\n`,
722
869
  },
870
+ mcp: {
871
+ describe: 'Commands for managing HubSpot MCP servers.',
872
+ setup: {
873
+ describe: 'Setup the HubSpot development MCP servers.',
874
+ installingDocSearch: 'Adding the docs-search mcp server',
875
+ claudeCode: 'Claude Code',
876
+ cursor: 'Cursor',
877
+ windsurf: 'Windsurf',
878
+ vsCode: 'VSCode',
879
+ args: {
880
+ client: 'Target applications to configure',
881
+ docsSearch: 'Should the docs search mcp server be installed',
882
+ },
883
+ success: (derivedTargets) => `You can now use the HubSpot CLI MCP Server in ${derivedTargets.join(', ')}. ${chalk.bold('You may need to restart these tools to apply the changes')}.`,
884
+ errors: {
885
+ needsMcpAccess: (accountId) => `You must opt in to the developer MCP beta to use this feature on ${uiAccountDescription(accountId)}. Try again with a different account or ${uiLink('join the beta now', getProductUpdatesUrl('239890', accountId))}`,
886
+ needsNode20: `This feature requires node >=20`,
887
+ errorParsingJsonFIle: (filename, errorMessage) => `Unable to update ${chalk.bold(filename)} due to invalid JSON: ${errorMessage}`,
888
+ },
889
+ spinners: {
890
+ failedToConfigure: 'Failed to configure the HubSpot mcp server.',
891
+ // Claude
892
+ configuringClaudeCode: 'Configuring Claude Code...',
893
+ configuredClaudeCode: 'Configured Claude Code',
894
+ claudeCodeNotFound: 'Claude Code not found - skipping configuration',
895
+ claudeCodeInstallFailed: 'Claude Code CLI not working - skipping configuration',
896
+ failedToConfigureClaudeDesktop: 'Failed to configure Claude Desktop',
897
+ // Cursor
898
+ configuringCursor: 'Configuring Cursor...',
899
+ failedToConfigureCursor: 'Failed to configure Cursor',
900
+ configuredCursor: 'Configured Cursor',
901
+ alreadyInstalled: 'HubSpot CLI mcp server already installed, reinstalling',
902
+ // Windsurf
903
+ configuringWindsurf: 'Configuring Windsurf...',
904
+ failedToConfigureWindsurf: 'Failed to configure Windsurf',
905
+ configuredWindsurf: 'Configured Windsurf',
906
+ // VS Code
907
+ configuringVsCode: 'Configuring VSCode...',
908
+ failedToConfigureVsCode: 'Failed to configure VSCode',
909
+ configuredVsCode: 'Configured VSCode',
910
+ vsCodeNotFound: 'VSCode not found - skipping configuration',
911
+ },
912
+ prompts: {
913
+ targets: '[--client] Which tools would you like to add the HubSpot CLI MCP server to?',
914
+ targetsRequired: 'Must choose at least one application to configure.',
915
+ },
916
+ },
917
+ start: {
918
+ errors: {
919
+ needsNode20: `This feature requires node >=20`,
920
+ serverFileNotFound: (serverPath) => `MCP server file not found at ${serverPath}`,
921
+ failedToStart: 'Failed to start MCP server',
922
+ },
923
+ startingServer: 'Starting HubSpot CLI MCP server...',
924
+ stopInstructions: 'Press Ctrl+C to stop the server',
925
+ stoppedSuccessfully: 'Stopped successfully.',
926
+ shuttingDown: 'Shutting down MCP server...',
927
+ },
928
+ },
723
929
  mv: {
724
930
  describe: 'Move a remote file or folder in HubSpot. This feature is currently in beta and the CLI contract is subject to change.',
725
931
  errors: {
@@ -745,15 +951,15 @@ exports.commands = {
745
951
  project: {
746
952
  profile: {
747
953
  describe: 'Commands for managing project profiles',
748
- 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!`,
954
+ verboseDescribe: `Commands for managing project profiles\n\nProfiles are stored at the root of your project's source directory and they make configuration dynamic. Use them to couple specialized configurations of your project to specific HubSpot accounts.\n\nRun ${uiCommandReference('hs project profile add')} to get started!`,
749
955
  add: {
750
956
  describe: 'Add a new project profile',
751
- 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.`,
957
+ verboseDescribe: `Add a new project profile\n\nProfiles enable you to reference variables in your component configuration files. Use the syntax ${chalk.bold('\${VARIABLE_NAME}')} to reference profile variables in your component configuration files. Then target the profile using the ${uiCommandReference('--profile')} flag when you upload your project.`,
752
958
  example: 'Add a new project profile named hsprofile.qa.json',
753
959
  logs: {
754
- copyExistingProfile: (profileName) => `Found an existing profile. We can copy the variables from ${chalk_1.default.bold(profileName)} into your new profile.`,
960
+ copyExistingProfile: (profileName) => `Found an existing profile. We can copy the variables from ${chalk.bold(profileName)} into your new profile.`,
755
961
  copyExistingProfiles: 'We can copy the variables from one of your existing profiles into your new profile.',
756
- profileAdded: (profileName) => `Project profile ${chalk_1.default.bold(profileName)} was successfully added`,
962
+ profileAdded: (profileName) => `Project profile ${chalk.bold(profileName)} was successfully added`,
757
963
  },
758
964
  prompts: {
759
965
  namePrompt: 'Enter a name for the new project profile: ',
@@ -764,14 +970,14 @@ exports.commands = {
764
970
  invalidProfileName: 'Profile name cannot contain special characters or spaces',
765
971
  },
766
972
  warnings: {
767
- 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.`,
973
+ duplicateTargetAccount: (targetAccountId) => `The account ${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.`,
768
974
  },
769
975
  errors: {
770
976
  noProjectConfig: 'No project config found. Please run this command from a project directory.',
771
- profileExists: (profileName) => `Profile ${chalk_1.default.bold(profileName)} already exists. Please choose a different name.`,
977
+ profileExists: (profileName) => `Profile ${chalk.bold(profileName)} already exists. Please choose a different name.`,
772
978
  invalidTargetAccount: 'Target account is not configured in the CLI',
773
979
  noAccountsConfigured: 'No accounts configured in the CLI',
774
- failedToLoadProfile: (profileName) => `Unable to copy variables. Failed to load profile ${chalk_1.default.bold(profileName)}`,
980
+ failedToLoadProfile: (profileName) => `Unable to copy variables. Failed to load profile ${chalk.bold(profileName)}`,
775
981
  failedToCreateProfile: 'Failed to create profile',
776
982
  },
777
983
  positionals: {
@@ -785,22 +991,23 @@ exports.commands = {
785
991
  describe: 'Delete an existing project profile',
786
992
  example: 'Delete a project profile named hsprofile.qa.json',
787
993
  logs: {
788
- profileDeleted: (profileName) => `Project profile ${chalk_1.default.bold(profileName)} was successfully deleted`,
789
- deletedProject: (accountId) => `Successfully deleted the project from ${(0, ui_1.uiAccountDescription)(accountId)}`,
790
- didNotDeleteProject: (accountId) => `Did not delete the project from ${(0, ui_1.uiAccountDescription)(accountId)}`,
994
+ profileDeleted: (profileName) => `Project profile ${chalk.bold(profileName)} was successfully deleted`,
995
+ deletedProject: (accountId) => `Successfully deleted the project from ${uiAccountDescription(accountId)}`,
996
+ didNotDeleteProject: (accountId) => `Did not delete the project from ${uiAccountDescription(accountId)}`,
791
997
  },
792
998
  debug: {
793
- failedToLoadProfile: (profileName) => `Failed to load profile ${chalk_1.default.bold(profileName)}`,
999
+ failedToLoadProfile: (profileName) => `Failed to load profile ${chalk.bold(profileName)}`,
794
1000
  },
795
1001
  prompts: {
796
1002
  deleteProfilePrompt: 'Select a profile to delete from your project',
797
- deleteProjectPrompt: (accountId) => `Would you like to delete this project from ${(0, ui_1.uiAccountDescription)(accountId)}?`,
1003
+ deleteProjectPrompt: (accountId) => `Would you like to delete this project from ${uiAccountDescription(accountId)}?`,
798
1004
  },
799
1005
  errors: {
800
1006
  noProjectConfig: 'No project config found. Please run this command from a project directory.',
801
- noProfileFound: (profileName) => `No profile with filename ${chalk_1.default.bold(profileName)} found in your project.`,
1007
+ noProfileFound: (profileName) => `No profile with filename ${chalk.bold(profileName)} found in your project.`,
802
1008
  noProfilesFound: 'No profiles found in your project.',
803
- failedToDeleteProfile: (profileName) => `Unable to delete profile ${chalk_1.default.bold(profileName)}. Please try again.`,
1009
+ failedToDeleteProfile: (profileName) => `Unable to delete profile ${chalk.bold(profileName)}. Please try again.`,
1010
+ failedToDeleteProject: (accountId) => `Failed to delete the project from ${uiAccountDescription(accountId)}`,
804
1011
  },
805
1012
  positionals: {
806
1013
  name: 'The name of the project profile',
@@ -810,22 +1017,36 @@ exports.commands = {
810
1017
  dev: {
811
1018
  describe: 'Start local dev for the current project.',
812
1019
  logs: {
813
- betaMessage: 'HubSpot projects local development',
1020
+ header: 'HubSpot projects local development',
814
1021
  placeholderAccountSelection: 'Using default account as target account (for now)',
815
- learnMoreLocalDevServer: 'Learn more about the projects local dev server',
816
1022
  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.',
817
- learnMoreMessage: `Visit our ${(0, ui_1.uiLink)('docs on Developer Test and Sandbox accounts', 'https://developers.hubspot.com/docs/getting-started/account-types')} to learn more.`,
1023
+ learnMoreMessageV3: `Learn more about ${uiLink('HubSpot projects local dev', 'https://developers.hubspot.com/docs/developer-tooling/local-development/hubspot-cli/project-commands#start-a-local-development-server')} | ${uiLink('HubSpot account types', 'https://developers.hubspot.com/docs/getting-started/account-types')}`,
1024
+ learnMoreMessageLegacy: uiLink('Learn more about the projects local dev server', 'https://developers.hubspot.com/docs/platform/project-cli-commands#start-a-local-development-server'),
1025
+ profileProjectAccountExplanation: (accountId, profileName) => `Using account ${uiAccountDescription(accountId)} from profile ${chalk.bold(profileName)} for project upload`,
1026
+ defaultProjectAccountExplanation: (accountId) => `Using default account ${uiAccountDescription(accountId)} for project upload`,
1027
+ projectAccountFlagExplanation: (accountId) => `Using account ${uiAccountDescription(accountId)} provided by the --project-account flag for project upload`,
1028
+ accountFlagExplanation: (accountId) => `Using account ${uiAccountDescription(accountId)} provided by the --account flag for project upload`,
1029
+ defaultSandboxOrDevTestTestingAccountExplanation: (accountId) => `Using default account ${uiAccountDescription(accountId)} for testing`,
1030
+ testingAccountFlagExplanation: (accountId) => `Using account ${uiAccountDescription(accountId)} provided by the --testing-account flag for testing`,
818
1031
  },
819
1032
  errors: {
820
1033
  noProjectConfig: 'No project detected. Please run this command again from a project directory.',
821
- noAccount: (accountId, authCommand) => `An error occurred while reading account ${accountId} from your config. Run ${chalk_1.default.bold(authCommand)} to re-auth this account.`,
822
- noAccountsInConfig: (authCommand) => `No accounts found in your config. Run ${chalk_1.default.bold(authCommand)} to configure a HubSpot account with the CLI.`,
1034
+ noAccount: (accountId) => `An error occurred while reading account ${uiAccountDescription(accountId)} from your config. Run ${uiCommandReference('hs auth')} to re-auth this account.`,
1035
+ noAccountsInConfig: (authCommand) => `No accounts found in your config. Run ${chalk.bold(authCommand)} to configure a HubSpot account with the CLI.`,
823
1036
  invalidProjectComponents: 'Projects cannot contain both private and public apps. Move your apps to separate projects before attempting local development.',
824
- 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.`,
1037
+ noRunnableComponents: `No supported components were found in this project. Run ${uiCommandReference('hs project add')} to see a list of available components and add one to your project.`,
1038
+ accountNotCombined: `\nLocal development of unified apps is currently only compatible with accounts that are opted into the unified apps beta. Make sure that this account is opted in or switch accounts using ${uiCommandReference('hs account use')}.`,
1039
+ unsupportedAccountFlagLegacy: 'The --project-account and --testing-account flags are not supported for projects with platform versions earlier than 2025.2.',
1040
+ unsupportedAccountFlagV3: 'The --account flag is is not supported supported for projects with platform versions 2025.2 and newer. Use --testing-account and --project-account flags to specify accounts to use for local dev',
825
1041
  },
826
1042
  examples: {
827
1043
  default: 'Start local dev for the current project',
828
1044
  },
1045
+ options: {
1046
+ profile: 'The profile to target during local dev',
1047
+ projectAccount: 'The id of the account to upload your project to. Only compatible with platform versions 2025.2 and above.',
1048
+ testingAccount: 'The id of the account to install apps and test on. Only compatible with platform versions 2025.2 and above.',
1049
+ },
829
1050
  },
830
1051
  create: {
831
1052
  describe: 'Create a new project.',
@@ -836,8 +1057,13 @@ exports.commands = {
836
1057
  cannotNestProjects: (projectDir) => `A project already exists at ${projectDir}. Projects cannot be nested within other projects. Please choose a different destination and try again.`,
837
1058
  },
838
1059
  logs: {
839
- success: (projectName, projectDest) => `Project ${chalk_1.default.bold(projectName)} was successfully created in ${projectDest}`,
840
- welcomeMessage: 'Welcome to HubSpot Developer Projects!',
1060
+ success: (projectName, projectDest) => `Project ${chalk.bold(projectName)} was successfully created in ${projectDest}`,
1061
+ welcomeMessage: `\n${chalk.bold('Welcome to HubSpot Developer Projects!')}`,
1062
+ },
1063
+ prompts: {
1064
+ parentComponents: '[--project-base] What would you like in your project?',
1065
+ emptyProject: 'Empty Project',
1066
+ app: 'App',
841
1067
  },
842
1068
  examples: {
843
1069
  default: 'Create a new project',
@@ -851,11 +1077,26 @@ exports.commands = {
851
1077
  describe: 'Project name (cannot be changed)',
852
1078
  },
853
1079
  template: {
854
- describe: 'The starting template',
1080
+ describe: 'The starting template. Only applies when platform version is less than 2025.2.',
855
1081
  },
856
1082
  templateSource: {
857
1083
  describe: 'Path to custom GitHub repository from which to create project template',
858
1084
  },
1085
+ platformVersion: {
1086
+ describe: 'The target platform version for the new project.',
1087
+ },
1088
+ projectBase: {
1089
+ describe: 'The top level component to include in the project.',
1090
+ },
1091
+ distribution: {
1092
+ describe: 'How the app will be distributed.',
1093
+ },
1094
+ auth: {
1095
+ describe: 'Authentication model for the application.',
1096
+ },
1097
+ features: {
1098
+ describe: `Features to include in the project. Only valid if project-base is ${PROJECT_WITH_APP}`,
1099
+ },
859
1100
  },
860
1101
  },
861
1102
  migrateApp: {
@@ -880,17 +1121,17 @@ exports.commands = {
880
1121
  },
881
1122
  deprecationWarning: (oldCommand, newCommand) => `The ${oldCommand} command is deprecated and will be removed. Use ${newCommand} going forward.`,
882
1123
  migrationStatus: {
883
- inProgress: () => `Converting app configuration to ${chalk_1.default.bold('public-app.json')} component definition ...`,
884
- success: () => `${chalk_1.default.bold('Your app was converted and build #1 is deployed')}`,
885
- done: () => 'Converting app configuration to public-app.json component definition ... DONE',
886
- failure: () => 'Converting app configuration to public-app.json component definition ... FAILED',
1124
+ inProgress: () => `Converting app configuration to ${chalk.bold(LEGACY_PUBLIC_APP_FILE)} component definition ...`,
1125
+ success: () => `${chalk.bold('Your app was converted and build #1 is deployed')}`,
1126
+ done: () => `Converting app configuration to ${LEGACY_PUBLIC_APP_FILE} component definition ... DONE`,
1127
+ failure: () => `Converting app configuration to ${LEGACY_PUBLIC_APP_FILE} component definition ... FAILED`,
887
1128
  },
888
1129
  warning: {
889
- title: () => `${chalk_1.default.bold('You are about to migrate an app to the projects framework')}`,
890
- projectConversion: () => `${chalk_1.default.bold('The selected app will be converted to a project component.')}`,
891
- appConfig: () => `All supported app configuration will be moved to the ${chalk_1.default.bold('public-app.json')} component definition file. Future updates to those features must be made through the project build and deploy pipeline, not the developer account UI.`,
1130
+ title: () => `${chalk.bold('You are about to migrate an app to the projects framework')}`,
1131
+ projectConversion: () => `${chalk.bold('The selected app will be converted to a project component.')}`,
1132
+ appConfig: () => `All supported app configuration will be moved to the ${chalk.bold(LEGACY_PUBLIC_APP_FILE)} component definition file. Future updates to those features must be made through the project build and deploy pipeline, not the developer account UI.`,
892
1133
  buildAndDeploy: 'This will create a new project with a single app component and immediately build and deploy it to your developer account (build #1).',
893
- existingApps: () => `${chalk_1.default.bold('This will not affect existing app users or installs.')}`,
1134
+ existingApps: () => `${chalk.bold('This will not affect existing app users or installs.')}`,
894
1135
  copyApp: 'We strongly recommend making a copy of your app to test this process in a development app before replacing production.',
895
1136
  },
896
1137
  migrationInterrupted: '\nThe command is terminated, but app migration is still in progress. Please check your account to ensure that the project and associated app have been created successfully.',
@@ -902,6 +1143,7 @@ exports.commands = {
902
1143
  describe: 'Migrate an existing project to the new version of the projects framework.',
903
1144
  errors: {
904
1145
  noProjectConfig: (command) => `No project detected. Please run this command again from a project directory. If you are trying to migrate an app, run ${command}`,
1146
+ noThemeMigrationAccess: (accountId) => `This project contains a CMS theme. You must opt in to theme migration beta to continue updating it on ${uiAccountDescription(accountId)}. Try again with a different account or ${uiLink('join the beta now', getProductUpdatesUrl('253920', accountId))}`,
905
1147
  },
906
1148
  examples: {
907
1149
  default: 'Migrate an existing project to the new version of the projects framework.',
@@ -921,13 +1163,13 @@ exports.commands = {
921
1163
  },
922
1164
  },
923
1165
  cloneStatus: {
924
- inProgress: () => `Cloning app configuration to ${chalk_1.default.bold('public-app.json')} component definition ...`,
925
- done: 'Cloning app configuration to public-app.json component definition ... DONE',
1166
+ inProgress: () => `Cloning app configuration to ${chalk.bold(LEGACY_PUBLIC_APP_FILE)} component definition ...`,
1167
+ done: `Cloning app configuration to ${LEGACY_PUBLIC_APP_FILE} component definition ... DONE`,
926
1168
  success: (dest) => `Your cloned project was created in ${dest}`,
927
- failure: 'Cloning app configuration to public-app.json component definition ... FAILED',
1169
+ failure: `Cloning app configuration to ${LEGACY_PUBLIC_APP_FILE} component definition ... FAILED`,
928
1170
  },
929
1171
  errors: {
930
- invalidAccountTypeTitle: () => `${chalk_1.default.bold('Developer account not targeted')}`,
1172
+ invalidAccountTypeTitle: () => `${chalk.bold('Developer account not targeted')}`,
931
1173
  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.`,
932
1174
  couldNotWriteConfigPath: (configPath) => `Failed to write project config at ${configPath}`,
933
1175
  },
@@ -941,17 +1183,31 @@ exports.commands = {
941
1183
  type: {
942
1184
  describe: "The path to the component type's location within the hubspot-project-components Github repo: https://github.com/HubSpot/hubspot-project-components",
943
1185
  },
1186
+ distribution: {
1187
+ describe: 'The distribution method for the application.',
1188
+ },
1189
+ auth: {
1190
+ describe: 'The authentication type for the application.',
1191
+ },
1192
+ features: {
1193
+ describe: 'Which features to include with the application.',
1194
+ },
944
1195
  },
945
- creatingComponent: (projectName) => `Adding a new component to ${chalk_1.default.bold(projectName)}`,
946
- success: (componentName) => `${componentName} was successfully added to your project.`,
1196
+ creatingComponent: (projectName) => `\nAdding a new app feature to ${chalk.bold(projectName)}\n`,
1197
+ success: (componentName, multiple = false) => `${componentName || 'An app'} ${multiple ? 'were' : 'was'} successfully added to your ${componentName ? 'app' : 'project'}.`,
947
1198
  error: {
948
- failedToDownloadComponent: 'Failed to download project component. Please try again later.',
1199
+ failedToDownloadComponent: 'Failed to download project. Please try again later.',
1200
+ invalidComponentType: (componentType) => `'${componentType}' is not a valid project component type.`,
1201
+ maxExceeded: (maxCount) => `This project has the maximum allowed(${maxCount})`,
1202
+ authTypeNotAllowed: (authType) => `Auth type '${authType}' not allowed.`,
1203
+ distributionNotAllowed: (dist) => `Distribution '${dist}' not allowed.`,
1204
+ portalDoesNotHaveAccessToThisFeature: (accountId) => `The account ${uiAccountDescription(accountId)} does not have access to this feature.`,
949
1205
  locationInProject: 'This command must be run from within a project directory.',
950
- failedToFetchComponentList: 'Failed to fetch the list of available components. Please try again later.',
1206
+ failedToFetchComponentList: 'Failed to fetch the list of available features. Please try again later.',
951
1207
  projectContainsPublicApp: 'This project contains a public app. This command is currently only compatible with projects that contain private apps.',
952
1208
  },
953
1209
  examples: {
954
- default: 'Create a component within your project',
1210
+ default: 'Create an app feature within your project',
955
1211
  withFlags: 'Use --name and --type flags to bypass the prompt.',
956
1212
  },
957
1213
  },
@@ -962,25 +1218,28 @@ exports.commands = {
962
1218
  deploying: (path) => `Deploying project at path: ${path}`,
963
1219
  },
964
1220
  errors: {
965
- deploy: (details) => `Deploy error: ${details}`,
1221
+ deploy: 'Deploy error: an unknown error occurred.',
966
1222
  noBuilds: 'Deploy error: no builds for this project were found.',
967
1223
  noBuildId: 'You must specify a build to deploy',
968
- 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.`,
969
- buildIdDoesNotExist: (buildId, projectName, linkToProject) => `Build ${buildId} does not exist for project ${chalk_1.default.bold(projectName)}. ${linkToProject}`,
970
- buildAlreadyDeployed: (buildId, linkToProject) => `Build ${buildId} is already deployed. ${linkToProject}`,
971
- viewProjectsBuilds: 'View project builds in HubSpot',
1224
+ projectNotFound: (accountId, projectName) => `The project ${chalk.bold(projectName)} does not exist in account ${uiAccountDescription(accountId)}. Run ${uiCommandReference('hs project upload')} to upload your project files to HubSpot.`,
1225
+ buildIdDoesNotExist: (accountId, buildId, projectName) => `Build ${buildId} does not exist for project ${chalk.bold(projectName)}. ${uiLink('View project builds in HubSpot', getProjectDetailUrl(projectName, accountId))}`,
1226
+ buildAlreadyDeployed: (accountId, buildId, projectName) => `Build ${buildId} is already deployed. ${uiLink('View project builds in HubSpot', getProjectDetailUrl(projectName, accountId))}`,
1227
+ deployContainsRemovals: (componentName) => `- This deploy would remove the ${chalk.bold(componentName)} component. To proceed, run the deploy command with the ${uiCommandReference('--force')} flag`,
1228
+ deployBlockedHeader: "This build couldn't be deployed because it will be too disruptive for existing users. Fix the following issues and try again:",
1229
+ deployWarningsHeader: `Deploying this build might have unintended consequences for users. Review the following issues and run ${uiCommandReference('hs project deploy --force')} to try again:`,
1230
+ deployIssueComponentGeneric: (uid, componentTypeName) => `- [${mapToUserFriendlyName(componentTypeName)}] ${chalk.bold('(' + uid + ')')} reported issues with the deploy`,
1231
+ deployIssueComponentWarning: (uid, componentTypeName, message) => `- [${mapToUserFriendlyName(componentTypeName)}] ${chalk.bold('(' + uid + ')')} ${message}`,
972
1232
  },
973
1233
  examples: {
974
1234
  default: 'Deploy the latest build of the current project',
975
1235
  withOptions: 'Deploy build 5 of the project my-project',
976
1236
  },
977
1237
  options: {
978
- build: {
979
- describe: 'Project build ID to be deployed',
980
- },
981
- project: {
982
- describe: 'Project name',
983
- },
1238
+ build: 'Project build ID to be deployed',
1239
+ project: 'Project name',
1240
+ profile: 'The profile to target with this deploy',
1241
+ force: 'Skip warnings and force deploy. Use this carefully as it will bypass warnings for destructive actions.',
1242
+ deployLatestBuild: 'Deploy the latest build of the current project',
984
1243
  },
985
1244
  },
986
1245
  listBuilds: {
@@ -1011,7 +1270,7 @@ exports.commands = {
1011
1270
  noProjectConfig: 'No project detected. Run this command again from a project directory.',
1012
1271
  failedToFetchProjectDetails: 'There was an error fetching project details',
1013
1272
  noFunctionsLinkText: 'Visit developer docs',
1014
- 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`,
1273
+ noFunctionsInProject: `There aren't any functions in this project\n\t- Run ${uiCommandReference('hs project logs --help')} to learn more about logs\n\t- ${uiLink('Visit developer docs', 'https://developers.hubspot.com/docs/platform/serverless-functions')} to learn more about serverless functions`,
1015
1274
  noFunctionWithName: (name) => `No function with name "${name}"`,
1016
1275
  functionNotDeployed: (name) => `The function with name "${name}" is not deployed`,
1017
1276
  projectLogsManagerNotInitialized: 'Function called on ProjectLogsManager before initialization',
@@ -1064,7 +1323,7 @@ exports.commands = {
1064
1323
  autoDeployDisabled: (deployCommand) => `Automatic deploys are disabled for this project. Run ${deployCommand} to deploy this build.`,
1065
1324
  },
1066
1325
  errors: {
1067
- 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.`,
1326
+ projectLockedError: () => `Your project is locked. This may mean that another user is running the ${chalk.bold('`hs project dev`')} command for this project. If this is you, unlock the project in Projects UI.`,
1068
1327
  },
1069
1328
  options: {
1070
1329
  forceCreate: {
@@ -1082,7 +1341,7 @@ exports.commands = {
1082
1341
  },
1083
1342
  logs: {
1084
1343
  processExited: 'Stopping watcher...',
1085
- 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')}.`,
1344
+ watchCancelledFromUi: `The watch process has been cancelled from the UI. Any changes made since cancelling have not been uploaded. To resume watching, rerun ${uiCommandReference('hs project watch')}.`,
1086
1345
  resuming: 'Resuming watcher...',
1087
1346
  uploadSucceeded: (remotePath, filePath) => `Uploaded file "${filePath}" to "${remotePath}"`,
1088
1347
  deleteFileSucceeded: (remotePath) => `Deleted file "${remotePath}"`,
@@ -1106,7 +1365,7 @@ exports.commands = {
1106
1365
  },
1107
1366
  errors: {
1108
1367
  projectConfigNotFound: 'No project config found. Please ensure that you are in a project directory.',
1109
- 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.`,
1368
+ projectLockedError: `Your project is locked. This may mean that another user is running the ${chalk.bold(`hs project dev`)} command for this project. If this is you, unlock the project in Projects UI.`,
1110
1369
  uploadFailed: (remotePath, filePath) => `Failed to upload file "${filePath}" to "${remotePath}"`,
1111
1370
  deleteFileFailed: (remotePath) => `Failed to delete file "${remotePath}"`,
1112
1371
  deleteFolderFailed: (remotePath) => `Failed to delete folder "${remotePath}"`,
@@ -1123,7 +1382,7 @@ exports.commands = {
1123
1382
  },
1124
1383
  errors: {
1125
1384
  downloadFailed: 'Something went wrong downloading the project',
1126
- projectNotFound: (projectName, accountId) => `Your project ${chalk_1.default.bold(projectName)} could not be found in ${accountId}`,
1385
+ projectNotFound: (projectName, accountId) => `Your project ${chalk.bold(projectName)} could not be found in ${accountId}`,
1127
1386
  },
1128
1387
  warnings: {
1129
1388
  cannotDownloadWithinProject: 'Cancelling project download. Please run the command again outside the context of an existing project.',
@@ -1155,8 +1414,8 @@ exports.commands = {
1155
1414
  feedback: {
1156
1415
  describe: 'Leave feedback or file a bug report.',
1157
1416
  openPrompt: 'Open the feedback form in your browser?',
1158
- success: (url) => `We opened ${(0, ui_1.uiLink)('the developer feedback form', url)} in your browser.`,
1159
- error: (url) => `Navigate to ${(0, ui_1.uiLink)('the developer feedback form', url)} to leave feedback.`,
1417
+ success: (url) => `We opened ${uiLink('the developer feedback form', url)} in your browser.`,
1418
+ error: (url) => `Navigate to ${uiLink('the developer feedback form', url)} to leave feedback.`,
1160
1419
  },
1161
1420
  installDeps: {
1162
1421
  help: {
@@ -1172,19 +1431,32 @@ exports.commands = {
1172
1431
  installingDependenciesFailed: (directory) => `Installing dependencies for ${directory} failed`,
1173
1432
  noProjectConfig: 'No project detected. Run this command from a project directory.',
1174
1433
  noPackageJsonInProject: (projectName, link) => `No dependencies to install. The project ${projectName} folder might be missing component or subcomponent files. ${link}`,
1175
- packageManagerNotInstalled: (packageManager, link) => `This command depends on ${packageManager}, install ${chalk_1.default.bold(link)}`,
1434
+ packageManagerNotInstalled: (packageManager, link) => `This command depends on ${packageManager}, install ${chalk.bold(link)}`,
1435
+ },
1436
+ validate: {
1437
+ describe: 'Validate the project before uploading',
1438
+ mustBeRanWithinAProject: 'This command must be run from within a project directory.',
1439
+ badVersion: 'This command is only available for projects 2025.2 and later.',
1440
+ examples: {
1441
+ default: 'Validate the project before uploading',
1442
+ },
1443
+ success: (projectName) => `Project ${projectName} is valid and ready to upload`,
1444
+ failure: (projectName) => `Project ${projectName} is invalid`,
1445
+ options: {
1446
+ profile: {
1447
+ describe: 'The profile to target for this validation',
1448
+ },
1449
+ },
1176
1450
  },
1177
1451
  },
1178
1452
  remove: {
1179
- describe: 'Delete a file or folder from HubSpot.',
1180
- deleted: (path, accountId) => `Deleted "${path}" from account ${accountId}`,
1453
+ describe: 'Delete a file or folder from the HubSpot CMS.',
1454
+ deleted: (path, accountId) => `Deleted "${path}" from account ${uiAccountDescription(accountId)}`,
1181
1455
  errors: {
1182
- deleteFailed: (path, accountId) => `Deleting "${path}" from account ${accountId} failed`,
1456
+ deleteFailed: (path, accountId) => `Deleting "${path}" from account ${uiAccountDescription(accountId)} failed`,
1183
1457
  },
1184
1458
  positionals: {
1185
- path: {
1186
- describe: 'Remote hubspot path',
1187
- },
1459
+ path: 'Remote hubspot path',
1188
1460
  },
1189
1461
  },
1190
1462
  sandbox: {
@@ -1193,39 +1465,39 @@ exports.commands = {
1193
1465
  create: {
1194
1466
  developer: {
1195
1467
  loading: {
1196
- add: (accountName) => `Creating developer sandbox ${chalk_1.default.bold(accountName)}`,
1197
- fail: (accountName) => `Failed to create a developer sandbox ${chalk_1.default.bold(accountName)}.`,
1198
- succeed: (accountName, accountId) => `Successfully created a developer sandbox ${chalk_1.default.bold(accountName)} with portalId ${chalk_1.default.bold(accountId)}.`,
1468
+ add: (accountName) => `Creating developer sandbox ${chalk.bold(accountName)}`,
1469
+ fail: (accountName) => `Failed to create a developer sandbox ${chalk.bold(accountName)}.`,
1470
+ succeed: (accountName, accountId) => `Successfully created a developer sandbox ${chalk.bold(accountName)} with portalId ${chalk.bold(accountId)}.`,
1199
1471
  },
1200
1472
  success: {
1201
1473
  configFileUpdated: (accountName, authType) => `Account "${accountName}" updated using "${authType}"`,
1202
1474
  },
1203
1475
  failure: {
1204
- invalidUser: (accountName, parentAccountName) => `Couldn't create ${chalk_1.default.bold(accountName)} because your account has been removed from ${chalk_1.default.bold(parentAccountName)} or your permission set doesn't allow you to create the sandbox. To update your permissions, contact a super admin in ${chalk_1.default.bold(parentAccountName)}.`,
1205
- limit: (accountName, limit) => `${chalk_1.default.bold(accountName)} reached the limit of ${limit} developer sandboxes. \n- To connect a developer sandbox to your HubSpot CLI, run ${chalk_1.default.bold('hs auth')} and follow the prompts.`,
1206
- alreadyInConfig: (accountName, limit) => `${chalk_1.default.bold(accountName)} reached the limit of ${limit} developer sandboxes. \n- To use an existing developer sandbox, run ${chalk_1.default.bold('hs accounts use')}.`,
1476
+ invalidUser: (accountName, parentAccountName) => `Couldn't create ${chalk.bold(accountName)} because your account has been removed from ${chalk.bold(parentAccountName)} or your permission set doesn't allow you to create the sandbox. To update your permissions, contact a super admin in ${chalk.bold(parentAccountName)}.`,
1477
+ limit: (accountName, limit) => `${chalk.bold(accountName)} reached the limit of ${limit} developer sandboxes. \n- To connect a developer sandbox to your HubSpot CLI, run ${chalk.bold('hs auth')} and follow the prompts.`,
1478
+ alreadyInConfig: (accountName, limit) => `${chalk.bold(accountName)} reached the limit of ${limit} developer sandboxes. \n- To use an existing developer sandbox, run ${chalk.bold('hs accounts use')}.`,
1207
1479
  scopes: {
1208
1480
  message: "The personal access key you provided doesn't include developer sandbox permissions.",
1209
- instructions: (accountName, url) => `To update CLI permissions for "${accountName}": \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes developer sandbox permissions. \n- Update the CLI config for this account by running ${chalk_1.default.bold('hs auth')} and entering the new key.\n`,
1481
+ instructions: (accountName, url) => `To update CLI permissions for "${accountName}": \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes developer sandbox permissions. \n- Update the CLI config for this account by running ${chalk.bold('hs auth')} and entering the new key.\n`,
1210
1482
  },
1211
1483
  },
1212
1484
  },
1213
1485
  standard: {
1214
1486
  loading: {
1215
- add: (accountName) => `Creating standard sandbox ${chalk_1.default.bold(accountName)}`,
1216
- fail: (accountName) => `Failed to create a standard sandbox ${chalk_1.default.bold(accountName)}.`,
1217
- succeed: (accountName, accountId) => `Successfully created a standard sandbox ${chalk_1.default.bold(accountName)} with portalId ${chalk_1.default.bold(accountId)}.`,
1487
+ add: (accountName) => `Creating standard sandbox ${chalk.bold(accountName)}`,
1488
+ fail: (accountName) => `Failed to create a standard sandbox ${chalk.bold(accountName)}.`,
1489
+ succeed: (accountName, accountId) => `Successfully created a standard sandbox ${chalk.bold(accountName)} with portalId ${chalk.bold(accountId)}.`,
1218
1490
  },
1219
1491
  success: {
1220
1492
  configFileUpdated: (accountName, authType) => `Account "${accountName}" updated using "${authType}"`,
1221
1493
  },
1222
1494
  failure: {
1223
- invalidUser: (accountName, parentAccountName) => `Couldn't create ${chalk_1.default.bold(accountName)} because your account has been removed from ${chalk_1.default.bold(parentAccountName)} or your permission set doesn't allow you to create the sandbox. To update your permissions, contact a super admin in ${chalk_1.default.bold(parentAccountName)}.`,
1224
- limit: (accountName, limit) => `${chalk_1.default.bold(accountName)} reached the limit of ${limit} standard sandboxes. \n- To connect a standard sandbox to your HubSpot CLI, run ${chalk_1.default.bold('hs auth')} and follow the prompts.`,
1225
- alreadyInConfig: (accountName, limit) => `${chalk_1.default.bold(accountName)} reached the limit of ${limit} standard sandboxes. \n- To use an existing standard sandbox, run ${chalk_1.default.bold('hs accounts use')}.`,
1495
+ invalidUser: (accountName, parentAccountName) => `Couldn't create ${chalk.bold(accountName)} because your account has been removed from ${chalk.bold(parentAccountName)} or your permission set doesn't allow you to create the sandbox. To update your permissions, contact a super admin in ${chalk.bold(parentAccountName)}.`,
1496
+ limit: (accountName, limit) => `${chalk.bold(accountName)} reached the limit of ${limit} standard sandboxes. \n- To connect a standard sandbox to your HubSpot CLI, run ${chalk.bold('hs auth')} and follow the prompts.`,
1497
+ alreadyInConfig: (accountName, limit) => `${chalk.bold(accountName)} reached the limit of ${limit} standard sandboxes. \n- To use an existing standard sandbox, run ${chalk.bold('hs accounts use')}.`,
1226
1498
  scopes: {
1227
1499
  message: "The personal access key you provided doesn't include standard sandbox permissions.",
1228
- instructions: (accountName, url) => `To update CLI permissions for "${accountName}": \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes standard sandbox permissions. \n- Update the CLI config for this account by running ${chalk_1.default.bold('hs auth')} and entering the new key.\n`,
1500
+ instructions: (accountName, url) => `To update CLI permissions for "${accountName}": \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes standard sandbox permissions. \n- Update the CLI config for this account by running ${chalk.bold('hs auth')} and entering the new key.\n`,
1229
1501
  },
1230
1502
  },
1231
1503
  },
@@ -1239,8 +1511,8 @@ exports.commands = {
1239
1511
  examples: {
1240
1512
  default: 'Deletes the sandbox account named MySandboxAccount.',
1241
1513
  },
1242
- confirm: (account) => `Delete sandbox ${chalk_1.default.bold(account)}? All data for this sandbox will be permanently deleted.`,
1243
- defaultAccountWarning: (account) => `The sandbox ${chalk_1.default.bold(account)} is currently set as the default account.`,
1514
+ confirm: (account) => `Delete sandbox ${chalk.bold(account)}? All data for this sandbox will be permanently deleted.`,
1515
+ defaultAccountWarning: (account) => `The sandbox ${chalk.bold(account)} is currently set as the default account.`,
1244
1516
  success: {
1245
1517
  delete: (account, sandboxHubId) => `Sandbox "${account}" with portalId "${sandboxHubId}" was deleted successfully.`,
1246
1518
  deleteDefault: (account, sandboxHubId) => `Sandbox "${account}" with portalId "${sandboxHubId}" was deleted successfully and removed as the default account.`,
@@ -1252,9 +1524,9 @@ exports.commands = {
1252
1524
  noSandboxAccounts: (authCommand) => `There are no sandboxes connected to the CLI. To add a sandbox, run ${authCommand}.`,
1253
1525
  noSandboxAccountId: "This sandbox can't be deleted from the CLI because we could not find the associated sandbox account.",
1254
1526
  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.`,
1255
- objectNotFound: (account) => `Sandbox ${chalk_1.default.bold(account)} may have been deleted through the UI. The account has been removed from the config.`,
1256
- 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)}.`,
1257
- invalidKey: (account, authCommand) => `Your personal access key for account ${chalk_1.default.bold(account)} is inactive. To re-authenticate, please run ${authCommand}.`,
1527
+ objectNotFound: (account) => `Sandbox ${chalk.bold(account)} may have been deleted through the UI. The account has been removed from the config.`,
1528
+ noParentPortalAvailable: (command, url) => `This sandbox can't be deleted from the CLI because you haven't given the CLI access to its parent account. To do this, run ${command}. You can also delete the sandbox from the HubSpot management tool: ${chalk.bold(url)}.`,
1529
+ invalidKey: (account, authCommand) => `Your personal access key for account ${chalk.bold(account)} is inactive. To re-authenticate, please run ${authCommand}.`,
1258
1530
  },
1259
1531
  options: {
1260
1532
  force: {
@@ -1268,18 +1540,18 @@ exports.commands = {
1268
1540
  },
1269
1541
  sync: {
1270
1542
  loading: {
1271
- add: (accountName) => `Syncing sandbox ${chalk_1.default.bold(accountName)}`,
1272
- fail: (accountName) => `Failed to sync sandbox ${chalk_1.default.bold(accountName)}.`,
1273
- succeed: (accountName) => `Successfully synced sandbox ${chalk_1.default.bold(accountName)}.`,
1543
+ add: (accountName) => `Syncing sandbox ${chalk.bold(accountName)}`,
1544
+ fail: (accountName) => `Failed to sync sandbox ${chalk.bold(accountName)}.`,
1545
+ succeed: (accountName) => `Successfully synced sandbox ${chalk.bold(accountName)}.`,
1274
1546
  },
1275
1547
  success: {
1276
1548
  configFileUpdated: (accountName, authType) => `Account "${accountName}" updated using "${authType}"`,
1277
1549
  },
1278
1550
  failure: {
1279
- invalidUser: (accountName, parentAccountName) => `Couldn't sync ${chalk_1.default.bold(accountName)} because your account has been removed from ${chalk_1.default.bold(parentAccountName)} or your permission set doesn't allow you to sync the sandbox. To update your permissions, contact a super admin in ${chalk_1.default.bold(parentAccountName)}.`,
1551
+ invalidUser: (accountName, parentAccountName) => `Couldn't sync ${chalk.bold(accountName)} because your account has been removed from ${chalk.bold(parentAccountName)} or your permission set doesn't allow you to sync the sandbox. To update your permissions, contact a super admin in ${chalk.bold(parentAccountName)}.`,
1280
1552
  scopes: {
1281
1553
  message: "The personal access key you provided doesn't include sandbox sync permissions.",
1282
- instructions: (accountName, url) => `To update CLI permissions for "${accountName}": \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes sandbox sync permissions. \n- Update the CLI config for this account by running ${chalk_1.default.bold('hs auth')} and entering the new key.\n`,
1554
+ instructions: (accountName, url) => `To update CLI permissions for "${accountName}": \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes sandbox sync permissions. \n- Update the CLI config for this account by running ${chalk.bold('hs auth')} and entering the new key.\n`,
1283
1555
  },
1284
1556
  },
1285
1557
  },
@@ -1296,7 +1568,7 @@ exports.commands = {
1296
1568
  name: 'Name of the secret',
1297
1569
  },
1298
1570
  errors: {
1299
- 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.`,
1571
+ noApps: `Please create a new app to add an app secret. Use ${uiCommandReference('hs project create')} to create a new project and begin the app creation process.`,
1300
1572
  },
1301
1573
  options: {
1302
1574
  app: 'The app id to set the secret for',
@@ -1426,9 +1698,7 @@ exports.commands = {
1426
1698
  },
1427
1699
  success: (themePath, selectorsPath) => `Selectors generated for ${themePath}, please double check the selectors generated at ${selectorsPath} before uploading the theme.`,
1428
1700
  positionals: {
1429
- path: {
1430
- describe: "The path of the theme you'd like to generate an editor-preview.json for.",
1431
- },
1701
+ path: "The path of the theme you'd like to generate an editor-preview.json for.",
1432
1702
  },
1433
1703
  },
1434
1704
  marketplaceValidate: {
@@ -1459,25 +1729,16 @@ exports.commands = {
1459
1729
  errors: {
1460
1730
  invalidPath: (path) => `The path "${path}" is not a path to a directory`,
1461
1731
  noThemeComponents: 'Your project has no theme components available to preview.',
1732
+ uploadFailed: (src, dest) => `Uploading file "${src}" to "${dest}" failed`,
1462
1733
  },
1463
1734
  positionals: {
1464
- src: {
1465
- describe: 'Path to the local directory your theme is in, relative to your current working directory',
1466
- },
1467
- dest: {
1468
- 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.',
1469
- },
1735
+ src: 'Path to the local directory your theme is in, relative to your current working directory',
1736
+ 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.',
1470
1737
  },
1471
1738
  options: {
1472
- notify: {
1473
- describe: 'Log to specified file when a watch task is triggered and after workers have gone idle. Ex. --notify path/to/file',
1474
- },
1475
- noSsl: {
1476
- describe: 'Disable HTTPS',
1477
- },
1478
- port: {
1479
- describe: 'The port on which to start the local server',
1480
- },
1739
+ notify: 'Log to specified file when a watch task is triggered and after workers have gone idle. Ex. --notify path/to/file',
1740
+ noSsl: 'Disable HTTPS',
1741
+ port: 'The port on which to start the local server',
1481
1742
  },
1482
1743
  initialUploadProgressBar: {
1483
1744
  start: 'Starting...',
@@ -1501,11 +1762,6 @@ exports.commands = {
1501
1762
  logs: {
1502
1763
  validatingModule: (path) => `Validating module "${path}" \n`,
1503
1764
  },
1504
- options: {
1505
- json: {
1506
- describe: 'Output raw json data',
1507
- },
1508
- },
1509
1765
  results: {
1510
1766
  required: 'Required validation results:',
1511
1767
  recommended: 'Recommended validation results:',
@@ -1516,9 +1772,7 @@ exports.commands = {
1516
1772
  noErrors: 'No errors',
1517
1773
  },
1518
1774
  positionals: {
1519
- src: {
1520
- describe: 'Path to the module within the Design Manager.',
1521
- },
1775
+ src: 'Path to the module within the Design Manager.',
1522
1776
  },
1523
1777
  },
1524
1778
  },
@@ -1531,86 +1785,54 @@ exports.commands = {
1531
1785
  invalidPath: (path) => `The path "${path}" is not a path to a file or folder`,
1532
1786
  uploadFailed: (src, dest) => `Uploading file "${src}" to "${dest}" failed`,
1533
1787
  someFilesFailed: (dest) => `One or more files failed to upload to "${dest}" in the Design Manager`,
1534
- deleteFailed: (path, accountId) => `Deleting "${path}" from account ${accountId} failed`,
1788
+ deleteFailed: (path, accountId) => `Deleting "${path}" from account ${uiAccountDescription(accountId)} failed`,
1535
1789
  },
1536
1790
  options: {
1537
- options: {
1538
- describe: 'Options to pass to javascript fields files',
1539
- },
1540
- saveOutput: {
1541
- describe: "If true, saves all output from javascript fields files as 'fields.output.json'.",
1542
- },
1543
- convertFields: {
1544
- describe: 'If true, converts any javascript fields files contained in module folder or project root.',
1545
- },
1546
- clean: {
1547
- 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.',
1548
- },
1549
- force: {
1550
- describe: 'Skips confirmation prompts when doing a clean upload.',
1551
- },
1791
+ options: 'Options to pass to javascript fields files',
1792
+ saveOutput: "If true, saves all output from javascript fields files as 'fields.output.json'.",
1793
+ convertFields: 'If true, converts any javascript fields files contained in module folder or project root.',
1794
+ 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.',
1795
+ force: 'Skips confirmation prompts when doing a clean upload.',
1552
1796
  },
1553
1797
  previewUrl: (previewUrl) => `To preview this theme, visit: ${previewUrl}`,
1554
1798
  positionals: {
1555
- src: {
1556
- describe: 'Path to the local file, relative to your current working directory.',
1557
- },
1558
- dest: {
1559
- describe: 'Path in HubSpot Design Tools, can be a net new path.',
1560
- },
1799
+ src: 'Path to the local file, relative to your current working directory.',
1800
+ dest: 'Path in HubSpot Design Tools, can be a net new path.',
1561
1801
  },
1562
1802
  success: {
1563
- fileUploaded: (src, dest, accountId) => `Uploaded file from "${src}" to "${dest}" in the Design Manager of account ${accountId}`,
1803
+ fileUploaded: (src, dest, accountId) => `Uploaded file from "${src}" to "${dest}" in the Design Manager of account ${uiAccountDescription(accountId)}`,
1564
1804
  uploadComplete: (dest) => `Uploading files to "${dest}" in the Design Manager is complete`,
1565
1805
  },
1566
- uploading: (src, dest, accountId) => `Uploading files from "${src}" to "${dest}" in the Design Manager of account ${accountId}`,
1806
+ uploading: (src, dest, accountId) => `Uploading files from "${src}" to "${dest}" in the Design Manager of account ${uiAccountDescription(accountId)}`,
1567
1807
  notUploaded: (src) => `There was an error processing "${src}". The file has not been uploaded.`,
1568
- cleaning: (filePath, accountId) => `Removing "${filePath}" from account ${accountId} and uploading local...`,
1569
- 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?`,
1808
+ cleaning: (filePath, accountId) => `Removing "${filePath}" from account ${uiAccountDescription(accountId)} and uploading local...`,
1809
+ confirmCleanUpload: (filePath, accountId) => `You are about to delete the directory "${filePath}" and its contents on HubSpot account ${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?`,
1570
1810
  },
1571
1811
  watch: {
1572
1812
  describe: 'Watch a directory on your computer for changes and upload the changed files to the HubSpot CMS.',
1573
1813
  errors: {
1574
- folderFailed: (src, dest, accountId) => `Initial uploading of folder "${src}" to "${dest}" in account ${accountId} had failures`,
1575
- fileFailed: (file, dest, accountId) => `Upload of file "${file}" to "${dest}" in account ${accountId} failed`,
1814
+ folderFailed: (src, dest, accountId) => `Initial uploading of folder "${src}" to "${dest}" in account ${uiAccountDescription(accountId)} had failures`,
1815
+ fileFailed: (file, dest, accountId) => `Upload of file "${file}" to "${dest}" in account ${uiAccountDescription(accountId)} failed`,
1576
1816
  destinationRequired: 'A destination directory needs to be passed',
1577
1817
  invalidPath: (path) => `The "${path}" is not a path to a directory`,
1578
1818
  },
1579
1819
  options: {
1580
- disableInitial: {
1581
- describe: 'Disable the initial upload when watching a directory (default)',
1582
- },
1583
- initialUpload: {
1584
- describe: 'Upload directory before watching for updates',
1585
- },
1586
- notify: {
1587
- describe: 'Log to specified file when a watch task is triggered and after workers have gone idle. Ex. --notify path/to/file',
1588
- },
1589
- remove: {
1590
- describe: 'Will cause watch to delete files in your HubSpot account that are not found locally.',
1591
- },
1592
- convertFields: {
1593
- describe: 'If true, converts any javascript fields files contained in module folder or project root.',
1594
- },
1595
- saveOutput: {
1596
- describe: "If true, saves all output from javascript fields files as 'fields.output.json'.",
1597
- },
1598
- options: {
1599
- describe: 'Options to pass to javascript fields files',
1600
- },
1820
+ disableInitial: 'Disable the initial upload when watching a directory (default)',
1821
+ initialUpload: 'Upload directory before watching for updates',
1822
+ notify: 'Log to specified file when a watch task is triggered and after workers have gone idle. Ex. --notify path/to/file',
1823
+ remove: 'Will cause watch to delete files in your HubSpot account that are not found locally.',
1824
+ convertFields: 'If true, converts any javascript fields files contained in module folder or project root.',
1825
+ saveOutput: "If true, saves all output from javascript fields files as 'fields.output.json'.",
1826
+ options: 'Options to pass to javascript fields files',
1601
1827
  },
1602
1828
  positionals: {
1603
- src: {
1604
- describe: 'Path to the local directory your files are in, relative to your current working directory',
1605
- },
1606
- dest: {
1607
- describe: 'Path in HubSpot Design Tools. Can be a net new path',
1608
- },
1829
+ src: 'Path to the local directory your files are in, relative to your current working directory',
1830
+ dest: 'Path in HubSpot Design Tools. Can be a net new path',
1609
1831
  },
1610
1832
  warnings: {
1611
- 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.`,
1612
- 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')}".`,
1613
- notUploaded: (path) => `The "${chalk_1.default.bold('hs watch')}" command no longer uploads the watched directory when started. The directory "${path}" was not uploaded.`,
1833
+ disableInitial: `Passing the "${chalk.bold('--disable-initial')}" option is no longer necessary. Running "${uiCommandReference('hs watch')}" no longer uploads the watched directory by default.`,
1834
+ initialUpload: `To upload the directory run "${uiCommandReference('hs upload')}" beforehand or add the "${chalk.bold('--initial-upload')}" option when running "${uiCommandReference('hs watch')}".`,
1835
+ notUploaded: (path) => `The "${uiCommandReference('hs watch')}" command no longer uploads the watched directory when started. The directory "${path}" was not uploaded.`,
1614
1836
  },
1615
1837
  },
1616
1838
  convertFields: {
@@ -1630,38 +1852,132 @@ exports.commands = {
1630
1852
  missingSrc: 'Please specify the path to your javascript fields file or directory with the --src flag.',
1631
1853
  },
1632
1854
  },
1855
+ testAccount: {
1856
+ describe: 'Commands for working with test accounts.',
1857
+ subcommands: {
1858
+ importData: {
1859
+ describe: 'Import data into the CRM',
1860
+ options: {
1861
+ skipConfirm: {
1862
+ describe: 'Skip the confirmation prompt',
1863
+ },
1864
+ filePath: {
1865
+ describe: 'The path to the JSON file containing the import schema',
1866
+ },
1867
+ },
1868
+ },
1869
+ },
1870
+ create: {
1871
+ describe: 'Create a test account from a config file',
1872
+ configPathPrompt: '[--config-path] Enter the path to the test account config: ',
1873
+ createTestAccountFromConfigPrompt: 'How would you like to create your test account?',
1874
+ createFromConfigOption: 'Create test account from config file',
1875
+ createFromScratchOption: 'Create test account from scratch',
1876
+ errors: {
1877
+ configFileNotFound: (configPath) => `No test account config file exists at ${configPath}. Create a test account config file with the ${uiCommandReference('hs test-account create-config')} command.`,
1878
+ configFileParseFailed: (configPath) => `Failed to parse test account config file at ${configPath}`,
1879
+ saveAccountToConfigFailure: (accountName) => `Failed to save test account config file to config at ${accountName}`,
1880
+ },
1881
+ polling: {
1882
+ start: (testAccountName) => `Creating test account "${chalk.bold(testAccountName)}"...`,
1883
+ syncing: 'Test account created! Syncing account data... (may take a few minutes - you can exit and the sync will continue)',
1884
+ success: (testAccountName, testAccountId) => `Test account "${chalk.bold(testAccountName)}" successfully created with id: ${chalk.bold(testAccountId)}`,
1885
+ createFailure: 'Failed to create test account.',
1886
+ },
1887
+ options: {
1888
+ configPath: 'The path to the test account config',
1889
+ },
1890
+ example: (configPath) => `Create a test account from the config file at ${configPath}`,
1891
+ },
1892
+ createConfig: {
1893
+ describe: 'Create a test account config file.',
1894
+ pathPrompt: '[--path] Enter the name of the Test Account config file: ',
1895
+ errors: {
1896
+ pathError: 'Path is required',
1897
+ pathFormatError: 'Path must end with .json',
1898
+ failedToCreate: 'Failed to create test account config',
1899
+ pathExistsError: 'A file already exists at this path. Please try again with a different path.',
1900
+ },
1901
+ success: {
1902
+ configFileCreated: (path) => `Test account config successfully created at ${path}`,
1903
+ },
1904
+ options: {
1905
+ name: 'The name of the test account',
1906
+ description: 'The description of the test account',
1907
+ path: 'The path to the test account config',
1908
+ },
1909
+ example: (name) => `Create a test account config file with the name "${name}"`,
1910
+ },
1911
+ delete: {
1912
+ describe: 'Delete a test account from your HubSpot account and CLI config',
1913
+ pathPrompt: '[--path] What is the path to the test account config?',
1914
+ info: {
1915
+ deletionCanceled: 'Deletion canceled by user',
1916
+ accountNotFoundWithId: (id) => `No account was found with ID ${id}`,
1917
+ replaceDefaultAccount: (testAccountId, parentAccountName) => `The removed test account ${chalk.bold(testAccountId)} was the default account. Replaced default account to parent account: ${chalk.bold(parentAccountName)}`,
1918
+ },
1919
+ prompts: {
1920
+ selectTestAccounts: 'Select test account(s) to delete',
1921
+ confirmDeletion: 'All data for the account will be permanently deleted. Any connected apps will have their access tokens revoked. Do you wish to proceed?',
1922
+ },
1923
+ errors: {
1924
+ failedToDelete: (testAccountToDelete) => `Failed to delete test account with ID ${testAccountToDelete}`,
1925
+ failedToSelectAccount: 'Failed to select a test account to delete',
1926
+ noAccountsToDelete: (accountId) => `There are no test accounts associated with ${uiAccountDescription(accountId)} to delete. Try running ${uiCommandReference('hs account use')} to change your default account`,
1927
+ failedToDeleteFromConfig: (testAccountToDelete) => `Failed to delete test account with ID ${testAccountToDelete} from the CLI config`,
1928
+ failedToFetchTestAccounts: 'Failed to fetch developer test accounts',
1929
+ testAccountNotFound: (nameOrId) => `Test account${nameOrId ? ` ${chalk.bold(nameOrId)}` : ''} not found in config. \nTry running ${uiCommandReference('hs account auth')} to add the account to config or visit ${uiLink('developer test accounts', 'https://app.hubspot.com/l/developer-test-accounts/')} to delete the test account.`,
1930
+ parentAccountNotFound: (testAccountId) => `Parent account of test account ${chalk.bold(testAccountId)} not found in config. \nTry running ${uiCommandReference('hs account auth')} to add the parent account to config or visit ${uiLink('developer test accounts', 'https://app.hubspot.com/l/developer-test-accounts/')} to delete the test account.`,
1931
+ },
1932
+ success: {
1933
+ testAccountDeletedFromHubSpot: (testAccountToDelete) => `Successfully deleted test account with ID ${testAccountToDelete}`,
1934
+ testAccountDeletedFromConfig: (accountId) => `Successfully deleted test account with ID ${accountId} from the CLI config`,
1935
+ },
1936
+ options: {
1937
+ name: 'The name of the test account (in your CLI config) to delete',
1938
+ id: 'The id of the test account',
1939
+ },
1940
+ examples: {
1941
+ withPositionalID: (testAccountToDelete) => `Delete a test account with id "${testAccountToDelete}" using positional argument`,
1942
+ withPositionalName: (testAccountToDelete) => `Delete a test account with name "${testAccountToDelete}" using positional argument`,
1943
+ withID: (testAccountToDelete) => `Delete a test account with the id "${testAccountToDelete}"`,
1944
+ withName: (testAccountToDelete) => `Delete a test account with the name "${testAccountToDelete}"`,
1945
+ withoutId: 'Delete a test account via a prompt',
1946
+ },
1947
+ },
1948
+ },
1633
1949
  secrets: {
1634
1950
  add: {
1635
1951
  loading: {
1636
- add: (secretName) => `Adding secret ${chalk_1.default.bold(secretName)}`,
1637
- fail: (secretName) => `Failed to add secret ${chalk_1.default.bold(secretName)}.`,
1638
- succeed: (secretName) => `Successfully added secret ${chalk_1.default.bold(secretName)}.`,
1952
+ add: (secretName) => `Adding secret ${chalk.bold(secretName)}`,
1953
+ fail: (secretName) => `Failed to add secret ${chalk.bold(secretName)}.`,
1954
+ succeed: (secretName) => `Successfully added secret ${chalk.bold(secretName)}.`,
1639
1955
  },
1640
1956
  success: {
1641
1957
  configFileUpdated: (secretName, authType) => `Secret "${secretName}" updated using "${authType}"`,
1642
1958
  },
1643
1959
  failure: {
1644
- invalidUser: (secretName, parentAccountName) => `Couldn't add ${chalk_1.default.bold(secretName)} because your account has been removed from ${chalk_1.default.bold(parentAccountName)} or your permission set doesn't allow you to add secrets. To update your permissions, contact a super admin in ${chalk_1.default.bold(parentAccountName)}.`,
1960
+ invalidUser: (secretName, parentAccountName) => `Couldn't add ${chalk.bold(secretName)} because your account has been removed from ${chalk.bold(parentAccountName)} or your permission set doesn't allow you to add secrets. To update your permissions, contact a super admin in ${chalk.bold(parentAccountName)}.`,
1645
1961
  scopes: {
1646
1962
  message: "The personal access key you provided doesn't include secrets permissions.",
1647
- instructions: (secretName, url) => `To update CLI permissions for "${secretName}": \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes secrets permissions. \n- Update the CLI config for this account by running ${chalk_1.default.bold('hs auth')} and entering the new key.\n`,
1963
+ instructions: (secretName, url) => `To update CLI permissions for "${secretName}": \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes secrets permissions. \n- Update the CLI config for this account by running ${chalk.bold('hs auth')} and entering the new key.\n`,
1648
1964
  },
1649
1965
  },
1650
1966
  },
1651
1967
  delete: {
1652
1968
  loading: {
1653
- add: (secretName) => `Deleting secret ${chalk_1.default.bold(secretName)}`,
1654
- fail: (secretName) => `Failed to delete secret ${chalk_1.default.bold(secretName)}.`,
1655
- succeed: (secretName) => `Successfully deleted secret ${chalk_1.default.bold(secretName)}.`,
1969
+ add: (secretName) => `Deleting secret ${chalk.bold(secretName)}`,
1970
+ fail: (secretName) => `Failed to delete secret ${chalk.bold(secretName)}.`,
1971
+ succeed: (secretName) => `Successfully deleted secret ${chalk.bold(secretName)}.`,
1656
1972
  },
1657
1973
  success: {
1658
1974
  configFileUpdated: (secretName, authType) => `Secret "${secretName}" updated using "${authType}"`,
1659
1975
  },
1660
1976
  failure: {
1661
- invalidUser: (secretName, parentAccountName) => `Couldn't delete ${chalk_1.default.bold(secretName)} because your account has been removed from ${chalk_1.default.bold(parentAccountName)} or your permission set doesn't allow you to delete secrets. To update your permissions, contact a super admin in ${chalk_1.default.bold(parentAccountName)}.`,
1977
+ invalidUser: (secretName, parentAccountName) => `Couldn't delete ${chalk.bold(secretName)} because your account has been removed from ${chalk.bold(parentAccountName)} or your permission set doesn't allow you to delete secrets. To update your permissions, contact a super admin in ${chalk.bold(parentAccountName)}.`,
1662
1978
  scopes: {
1663
1979
  message: "The personal access key you provided doesn't include secrets permissions.",
1664
- instructions: (secretName, url) => `To update CLI permissions for "${secretName}": \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes secrets permissions. \n- Update the CLI config for this account by running ${chalk_1.default.bold('hs auth')} and entering the new key.\n`,
1980
+ instructions: (secretName, url) => `To update CLI permissions for "${secretName}": \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes secrets permissions. \n- Update the CLI config for this account by running ${chalk.bold('hs auth')} and entering the new key.\n`,
1665
1981
  },
1666
1982
  },
1667
1983
  },
@@ -1675,10 +1991,10 @@ exports.commands = {
1675
1991
  configFileUpdated: (authType) => `Secrets updated using "${authType}"`,
1676
1992
  },
1677
1993
  failure: {
1678
- 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)}.`,
1994
+ invalidUser: (parentAccountName) => `Couldn't list secrets because your account has been removed from ${chalk.bold(parentAccountName)} or your permission set doesn't allow you to list secrets. To update your permissions, contact a super admin in ${chalk.bold(parentAccountName)}.`,
1679
1995
  scopes: {
1680
1996
  message: "The personal access key you provided doesn't include secrets permissions.",
1681
- 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`,
1997
+ 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.bold('hs auth')} and entering the new key.\n`,
1682
1998
  },
1683
1999
  },
1684
2000
  },
@@ -1686,35 +2002,35 @@ exports.commands = {
1686
2002
  serverless: {
1687
2003
  add: {
1688
2004
  loading: {
1689
- add: (functionName) => `Adding serverless function ${chalk_1.default.bold(functionName)}`,
1690
- fail: (functionName) => `Failed to add serverless function ${chalk_1.default.bold(functionName)}.`,
1691
- succeed: (functionName) => `Successfully added serverless function ${chalk_1.default.bold(functionName)}.`,
2005
+ add: (functionName) => `Adding serverless function ${chalk.bold(functionName)}`,
2006
+ fail: (functionName) => `Failed to add serverless function ${chalk.bold(functionName)}.`,
2007
+ succeed: (functionName) => `Successfully added serverless function ${chalk.bold(functionName)}.`,
1692
2008
  },
1693
2009
  success: {
1694
2010
  configFileUpdated: (functionName, authType) => `Serverless function "${functionName}" updated using "${authType}"`,
1695
2011
  },
1696
2012
  failure: {
1697
- invalidUser: (functionName, parentAccountName) => `Couldn't add ${chalk_1.default.bold(functionName)} because your account has been removed from ${chalk_1.default.bold(parentAccountName)} or your permission set doesn't allow you to add serverless functions. To update your permissions, contact a super admin in ${chalk_1.default.bold(parentAccountName)}.`,
2013
+ invalidUser: (functionName, parentAccountName) => `Couldn't add ${chalk.bold(functionName)} because your account has been removed from ${chalk.bold(parentAccountName)} or your permission set doesn't allow you to add serverless functions. To update your permissions, contact a super admin in ${chalk.bold(parentAccountName)}.`,
1698
2014
  scopes: {
1699
2015
  message: "The personal access key you provided doesn't include serverless function permissions.",
1700
- instructions: (functionName, url) => `To update CLI permissions for "${functionName}": \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes serverless function permissions. \n- Update the CLI config for this account by running ${chalk_1.default.bold('hs auth')} and entering the new key.\n`,
2016
+ instructions: (functionName, url) => `To update CLI permissions for "${functionName}": \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes serverless function permissions. \n- Update the CLI config for this account by running ${chalk.bold('hs auth')} and entering the new key.\n`,
1701
2017
  },
1702
2018
  },
1703
2019
  },
1704
2020
  delete: {
1705
2021
  loading: {
1706
- add: (functionName) => `Deleting serverless function ${chalk_1.default.bold(functionName)}`,
1707
- fail: (functionName) => `Failed to delete serverless function ${chalk_1.default.bold(functionName)}.`,
1708
- succeed: (functionName) => `Successfully deleted serverless function ${chalk_1.default.bold(functionName)}.`,
2022
+ add: (functionName) => `Deleting serverless function ${chalk.bold(functionName)}`,
2023
+ fail: (functionName) => `Failed to delete serverless function ${chalk.bold(functionName)}.`,
2024
+ succeed: (functionName) => `Successfully deleted serverless function ${chalk.bold(functionName)}.`,
1709
2025
  },
1710
2026
  success: {
1711
2027
  configFileUpdated: (functionName, authType) => `Serverless function "${functionName}" updated using "${authType}"`,
1712
2028
  },
1713
2029
  failure: {
1714
- invalidUser: (functionName, parentAccountName) => `Couldn't delete ${chalk_1.default.bold(functionName)} because your account has been removed from ${chalk_1.default.bold(parentAccountName)} or your permission set doesn't allow you to delete serverless functions. To update your permissions, contact a super admin in ${chalk_1.default.bold(parentAccountName)}.`,
2030
+ invalidUser: (functionName, parentAccountName) => `Couldn't delete ${chalk.bold(functionName)} because your account has been removed from ${chalk.bold(parentAccountName)} or your permission set doesn't allow you to delete serverless functions. To update your permissions, contact a super admin in ${chalk.bold(parentAccountName)}.`,
1715
2031
  scopes: {
1716
2032
  message: "The personal access key you provided doesn't include serverless function permissions.",
1717
- instructions: (functionName, url) => `To update CLI permissions for "${functionName}": \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes serverless function permissions. \n- Update the CLI config for this account by running ${chalk_1.default.bold('hs auth')} and entering the new key.\n`,
2033
+ instructions: (functionName, url) => `To update CLI permissions for "${functionName}": \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes serverless function permissions. \n- Update the CLI config for this account by running ${chalk.bold('hs auth')} and entering the new key.\n`,
1718
2034
  },
1719
2035
  },
1720
2036
  },
@@ -1728,10 +2044,10 @@ exports.commands = {
1728
2044
  configFileUpdated: (authType) => `Serverless functions updated using "${authType}"`,
1729
2045
  },
1730
2046
  failure: {
1731
- 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)}.`,
2047
+ invalidUser: (parentAccountName) => `Couldn't list serverless functions because your account has been removed from ${chalk.bold(parentAccountName)} or your permission set doesn't allow you to list serverless functions. To update your permissions, contact a super admin in ${chalk.bold(parentAccountName)}.`,
1732
2048
  scopes: {
1733
2049
  message: "The personal access key you provided doesn't include serverless function permissions.",
1734
- 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`,
2050
+ 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.bold('hs auth')} and entering the new key.\n`,
1735
2051
  },
1736
2052
  },
1737
2053
  },
@@ -1739,35 +2055,35 @@ exports.commands = {
1739
2055
  serverlessFunctionLogs: {
1740
2056
  add: {
1741
2057
  loading: {
1742
- add: (functionName) => `Adding serverless function logs ${chalk_1.default.bold(functionName)}`,
1743
- fail: (functionName) => `Failed to add serverless function logs ${chalk_1.default.bold(functionName)}.`,
1744
- succeed: (functionName) => `Successfully added serverless function logs ${chalk_1.default.bold(functionName)}.`,
2058
+ add: (functionName) => `Adding serverless function logs ${chalk.bold(functionName)}`,
2059
+ fail: (functionName) => `Failed to add serverless function logs ${chalk.bold(functionName)}.`,
2060
+ succeed: (functionName) => `Successfully added serverless function logs ${chalk.bold(functionName)}.`,
1745
2061
  },
1746
2062
  success: {
1747
2063
  configFileUpdated: (functionName, authType) => `Serverless function logs "${functionName}" updated using "${authType}"`,
1748
2064
  },
1749
2065
  failure: {
1750
- invalidUser: (functionName, parentAccountName) => `Couldn't add ${chalk_1.default.bold(functionName)} because your account has been removed from ${chalk_1.default.bold(parentAccountName)} or your permission set doesn't allow you to add serverless function logs. To update your permissions, contact a super admin in ${chalk_1.default.bold(parentAccountName)}.`,
2066
+ invalidUser: (functionName, parentAccountName) => `Couldn't add ${chalk.bold(functionName)} because your account has been removed from ${chalk.bold(parentAccountName)} or your permission set doesn't allow you to add serverless function logs. To update your permissions, contact a super admin in ${chalk.bold(parentAccountName)}.`,
1751
2067
  scopes: {
1752
2068
  message: "The personal access key you provided doesn't include serverless function log permissions.",
1753
- instructions: (functionName, url) => `To update CLI permissions for "${functionName}": \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes serverless function log permissions. \n- Update the CLI config for this account by running ${chalk_1.default.bold('hs auth')} and entering the new key.\n`,
2069
+ instructions: (functionName, url) => `To update CLI permissions for "${functionName}": \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes serverless function log permissions. \n- Update the CLI config for this account by running ${chalk.bold('hs auth')} and entering the new key.\n`,
1754
2070
  },
1755
2071
  },
1756
2072
  },
1757
2073
  delete: {
1758
2074
  loading: {
1759
- add: (functionName) => `Deleting serverless function logs ${chalk_1.default.bold(functionName)}`,
1760
- fail: (functionName) => `Failed to delete serverless function logs ${chalk_1.default.bold(functionName)}.`,
1761
- succeed: (functionName) => `Successfully deleted serverless function logs ${chalk_1.default.bold(functionName)}.`,
2075
+ add: (functionName) => `Deleting serverless function logs ${chalk.bold(functionName)}`,
2076
+ fail: (functionName) => `Failed to delete serverless function logs ${chalk.bold(functionName)}.`,
2077
+ succeed: (functionName) => `Successfully deleted serverless function logs ${chalk.bold(functionName)}.`,
1762
2078
  },
1763
2079
  success: {
1764
2080
  configFileUpdated: (functionName, authType) => `Serverless function logs "${functionName}" updated using "${authType}"`,
1765
2081
  },
1766
2082
  failure: {
1767
- invalidUser: (functionName, parentAccountName) => `Couldn't delete ${chalk_1.default.bold(functionName)} because your account has been removed from ${chalk_1.default.bold(parentAccountName)} or your permission set doesn't allow you to delete serverless function logs. To update your permissions, contact a super admin in ${chalk_1.default.bold(parentAccountName)}.`,
2083
+ invalidUser: (functionName, parentAccountName) => `Couldn't delete ${chalk.bold(functionName)} because your account has been removed from ${chalk.bold(parentAccountName)} or your permission set doesn't allow you to delete serverless function logs. To update your permissions, contact a super admin in ${chalk.bold(parentAccountName)}.`,
1768
2084
  scopes: {
1769
2085
  message: "The personal access key you provided doesn't include serverless function log permissions.",
1770
- instructions: (functionName, url) => `To update CLI permissions for "${functionName}": \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes serverless function log permissions. \n- Update the CLI config for this account by running ${chalk_1.default.bold('hs auth')} and entering the new key.\n`,
2086
+ instructions: (functionName, url) => `To update CLI permissions for "${functionName}": \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes serverless function log permissions. \n- Update the CLI config for this account by running ${chalk.bold('hs auth')} and entering the new key.\n`,
1771
2087
  },
1772
2088
  },
1773
2089
  },
@@ -1781,10 +2097,10 @@ exports.commands = {
1781
2097
  configFileUpdated: (authType) => `Serverless function logs updated using "${authType}"`,
1782
2098
  },
1783
2099
  failure: {
1784
- 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)}.`,
2100
+ invalidUser: (parentAccountName) => `Couldn't list serverless function logs because your account has been removed from ${chalk.bold(parentAccountName)} or your permission set doesn't allow you to list serverless function logs. To update your permissions, contact a super admin in ${chalk.bold(parentAccountName)}.`,
1785
2101
  scopes: {
1786
2102
  message: "The personal access key you provided doesn't include serverless function log permissions.",
1787
- 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`,
2103
+ 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.bold('hs auth')} and entering the new key.\n`,
1788
2104
  },
1789
2105
  },
1790
2106
  },
@@ -1792,35 +2108,35 @@ exports.commands = {
1792
2108
  serverlessFunctionMetrics: {
1793
2109
  add: {
1794
2110
  loading: {
1795
- add: (functionName) => `Adding serverless function metrics ${chalk_1.default.bold(functionName)}`,
1796
- fail: (functionName) => `Failed to add serverless function metrics ${chalk_1.default.bold(functionName)}.`,
1797
- succeed: (functionName) => `Successfully added serverless function metrics ${chalk_1.default.bold(functionName)}.`,
2111
+ add: (functionName) => `Adding serverless function metrics ${chalk.bold(functionName)}`,
2112
+ fail: (functionName) => `Failed to add serverless function metrics ${chalk.bold(functionName)}.`,
2113
+ succeed: (functionName) => `Successfully added serverless function metrics ${chalk.bold(functionName)}.`,
1798
2114
  },
1799
2115
  success: {
1800
2116
  configFileUpdated: (functionName, authType) => `Serverless function metrics "${functionName}" updated using "${authType}"`,
1801
2117
  },
1802
2118
  failure: {
1803
- invalidUser: (functionName, parentAccountName) => `Couldn't add ${chalk_1.default.bold(functionName)} because your account has been removed from ${chalk_1.default.bold(parentAccountName)} or your permission set doesn't allow you to add serverless function metrics. To update your permissions, contact a super admin in ${chalk_1.default.bold(parentAccountName)}.`,
2119
+ invalidUser: (functionName, parentAccountName) => `Couldn't add ${chalk.bold(functionName)} because your account has been removed from ${chalk.bold(parentAccountName)} or your permission set doesn't allow you to add serverless function metrics. To update your permissions, contact a super admin in ${chalk.bold(parentAccountName)}.`,
1804
2120
  scopes: {
1805
2121
  message: "The personal access key you provided doesn't include serverless function metric permissions.",
1806
- instructions: (functionName, url) => `To update CLI permissions for "${functionName}": \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes serverless function metric permissions. \n- Update the CLI config for this account by running ${chalk_1.default.bold('hs auth')} and entering the new key.\n`,
2122
+ instructions: (functionName, url) => `To update CLI permissions for "${functionName}": \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes serverless function metric permissions. \n- Update the CLI config for this account by running ${chalk.bold('hs auth')} and entering the new key.\n`,
1807
2123
  },
1808
2124
  },
1809
2125
  },
1810
2126
  delete: {
1811
2127
  loading: {
1812
- add: (functionName) => `Deleting serverless function metrics ${chalk_1.default.bold(functionName)}`,
1813
- fail: (functionName) => `Failed to delete serverless function metrics ${chalk_1.default.bold(functionName)}.`,
1814
- succeed: (functionName) => `Successfully deleted serverless function metrics ${chalk_1.default.bold(functionName)}.`,
2128
+ add: (functionName) => `Deleting serverless function metrics ${chalk.bold(functionName)}`,
2129
+ fail: (functionName) => `Failed to delete serverless function metrics ${chalk.bold(functionName)}.`,
2130
+ succeed: (functionName) => `Successfully deleted serverless function metrics ${chalk.bold(functionName)}.`,
1815
2131
  },
1816
2132
  success: {
1817
2133
  configFileUpdated: (functionName, authType) => `Serverless function metrics "${functionName}" updated using "${authType}"`,
1818
2134
  },
1819
2135
  failure: {
1820
- invalidUser: (functionName, parentAccountName) => `Couldn't delete ${chalk_1.default.bold(functionName)} because your account has been removed from ${chalk_1.default.bold(parentAccountName)} or your permission set doesn't allow you to delete serverless function metrics. To update your permissions, contact a super admin in ${chalk_1.default.bold(parentAccountName)}.`,
2136
+ invalidUser: (functionName, parentAccountName) => `Couldn't delete ${chalk.bold(functionName)} because your account has been removed from ${chalk.bold(parentAccountName)} or your permission set doesn't allow you to delete serverless function metrics. To update your permissions, contact a super admin in ${chalk.bold(parentAccountName)}.`,
1821
2137
  scopes: {
1822
2138
  message: "The personal access key you provided doesn't include serverless function metric permissions.",
1823
- instructions: (functionName, url) => `To update CLI permissions for "${functionName}": \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes serverless function metric permissions. \n- Update the CLI config for this account by running ${chalk_1.default.bold('hs auth')} and entering the new key.\n`,
2139
+ instructions: (functionName, url) => `To update CLI permissions for "${functionName}": \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes serverless function metric permissions. \n- Update the CLI config for this account by running ${chalk.bold('hs auth')} and entering the new key.\n`,
1824
2140
  },
1825
2141
  },
1826
2142
  },
@@ -1834,10 +2150,10 @@ exports.commands = {
1834
2150
  configFileUpdated: (authType) => `Serverless function metrics updated using "${authType}"`,
1835
2151
  },
1836
2152
  failure: {
1837
- 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)}.`,
2153
+ invalidUser: (parentAccountName) => `Couldn't list serverless function metrics because your account has been removed from ${chalk.bold(parentAccountName)} or your permission set doesn't allow you to list serverless function metrics. To update your permissions, contact a super admin in ${chalk.bold(parentAccountName)}.`,
1838
2154
  scopes: {
1839
2155
  message: "The personal access key you provided doesn't include serverless function metric permissions.",
1840
- 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`,
2156
+ 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.bold('hs auth')} and entering the new key.\n`,
1841
2157
  },
1842
2158
  },
1843
2159
  },
@@ -1845,35 +2161,35 @@ exports.commands = {
1845
2161
  serverlessFunctionSettings: {
1846
2162
  add: {
1847
2163
  loading: {
1848
- add: (functionName) => `Adding serverless function settings ${chalk_1.default.bold(functionName)}`,
1849
- fail: (functionName) => `Failed to add serverless function settings ${chalk_1.default.bold(functionName)}.`,
1850
- succeed: (functionName) => `Successfully added serverless function settings ${chalk_1.default.bold(functionName)}.`,
2164
+ add: (functionName) => `Adding serverless function settings ${chalk.bold(functionName)}`,
2165
+ fail: (functionName) => `Failed to add serverless function settings ${chalk.bold(functionName)}.`,
2166
+ succeed: (functionName) => `Successfully added serverless function settings ${chalk.bold(functionName)}.`,
1851
2167
  },
1852
2168
  success: {
1853
2169
  configFileUpdated: (functionName, authType) => `Serverless function settings "${functionName}" updated using "${authType}"`,
1854
2170
  },
1855
2171
  failure: {
1856
- invalidUser: (functionName, parentAccountName) => `Couldn't add ${chalk_1.default.bold(functionName)} because your account has been removed from ${chalk_1.default.bold(parentAccountName)} or your permission set doesn't allow you to add serverless function settings. To update your permissions, contact a super admin in ${chalk_1.default.bold(parentAccountName)}.`,
2172
+ invalidUser: (functionName, parentAccountName) => `Couldn't add ${chalk.bold(functionName)} because your account has been removed from ${chalk.bold(parentAccountName)} or your permission set doesn't allow you to add serverless function settings. To update your permissions, contact a super admin in ${chalk.bold(parentAccountName)}.`,
1857
2173
  scopes: {
1858
2174
  message: "The personal access key you provided doesn't include serverless function setting permissions.",
1859
- instructions: (functionName, url) => `To update CLI permissions for "${functionName}": \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes serverless function setting permissions. \n- Update the CLI config for this account by running ${chalk_1.default.bold('hs auth')} and entering the new key.\n`,
2175
+ instructions: (functionName, url) => `To update CLI permissions for "${functionName}": \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes serverless function setting permissions. \n- Update the CLI config for this account by running ${chalk.bold('hs auth')} and entering the new key.\n`,
1860
2176
  },
1861
2177
  },
1862
2178
  },
1863
2179
  delete: {
1864
2180
  loading: {
1865
- add: (functionName) => `Deleting serverless function settings ${chalk_1.default.bold(functionName)}`,
1866
- fail: (functionName) => `Failed to delete serverless function settings ${chalk_1.default.bold(functionName)}.`,
1867
- succeed: (functionName) => `Successfully deleted serverless function settings ${chalk_1.default.bold(functionName)}.`,
2181
+ add: (functionName) => `Deleting serverless function settings ${chalk.bold(functionName)}`,
2182
+ fail: (functionName) => `Failed to delete serverless function settings ${chalk.bold(functionName)}.`,
2183
+ succeed: (functionName) => `Successfully deleted serverless function settings ${chalk.bold(functionName)}.`,
1868
2184
  },
1869
2185
  success: {
1870
2186
  configFileUpdated: (functionName, authType) => `Serverless function settings "${functionName}" updated using "${authType}"`,
1871
2187
  },
1872
2188
  failure: {
1873
- invalidUser: (functionName, parentAccountName) => `Couldn't delete ${chalk_1.default.bold(functionName)} because your account has been removed from ${chalk_1.default.bold(parentAccountName)} or your permission set doesn't allow you to delete serverless function settings. To update your permissions, contact a super admin in ${chalk_1.default.bold(parentAccountName)}.`,
2189
+ invalidUser: (functionName, parentAccountName) => `Couldn't delete ${chalk.bold(functionName)} because your account has been removed from ${chalk.bold(parentAccountName)} or your permission set doesn't allow you to delete serverless function settings. To update your permissions, contact a super admin in ${chalk.bold(parentAccountName)}.`,
1874
2190
  scopes: {
1875
2191
  message: "The personal access key you provided doesn't include serverless function setting permissions.",
1876
- instructions: (functionName, url) => `To update CLI permissions for "${functionName}": \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes serverless function setting permissions. \n- Update the CLI config for this account by running ${chalk_1.default.bold('hs auth')} and entering the new key.\n`,
2192
+ instructions: (functionName, url) => `To update CLI permissions for "${functionName}": \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes serverless function setting permissions. \n- Update the CLI config for this account by running ${chalk.bold('hs auth')} and entering the new key.\n`,
1877
2193
  },
1878
2194
  },
1879
2195
  },
@@ -1887,10 +2203,10 @@ exports.commands = {
1887
2203
  configFileUpdated: (authType) => `Serverless function settings updated using "${authType}"`,
1888
2204
  },
1889
2205
  failure: {
1890
- 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)}.`,
2206
+ invalidUser: (parentAccountName) => `Couldn't list serverless function settings because your account has been removed from ${chalk.bold(parentAccountName)} or your permission set doesn't allow you to list serverless function settings. To update your permissions, contact a super admin in ${chalk.bold(parentAccountName)}.`,
1891
2207
  scopes: {
1892
2208
  message: "The personal access key you provided doesn't include serverless function setting permissions.",
1893
- 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`,
2209
+ 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.bold('hs auth')} and entering the new key.\n`,
1894
2210
  },
1895
2211
  },
1896
2212
  },
@@ -1898,35 +2214,35 @@ exports.commands = {
1898
2214
  serverlessFunctionVersions: {
1899
2215
  add: {
1900
2216
  loading: {
1901
- add: (functionName) => `Adding serverless function versions ${chalk_1.default.bold(functionName)}`,
1902
- fail: (functionName) => `Failed to add serverless function versions ${chalk_1.default.bold(functionName)}.`,
1903
- succeed: (functionName) => `Successfully added serverless function versions ${chalk_1.default.bold(functionName)}.`,
2217
+ add: (functionName) => `Adding serverless function versions ${chalk.bold(functionName)}`,
2218
+ fail: (functionName) => `Failed to add serverless function versions ${chalk.bold(functionName)}.`,
2219
+ succeed: (functionName) => `Successfully added serverless function versions ${chalk.bold(functionName)}.`,
1904
2220
  },
1905
2221
  success: {
1906
2222
  configFileUpdated: (functionName, authType) => `Serverless function versions "${functionName}" updated using "${authType}"`,
1907
2223
  },
1908
2224
  failure: {
1909
- invalidUser: (functionName, parentAccountName) => `Couldn't add ${chalk_1.default.bold(functionName)} because your account has been removed from ${chalk_1.default.bold(parentAccountName)} or your permission set doesn't allow you to add serverless function versions. To update your permissions, contact a super admin in ${chalk_1.default.bold(parentAccountName)}.`,
2225
+ invalidUser: (functionName, parentAccountName) => `Couldn't add ${chalk.bold(functionName)} because your account has been removed from ${chalk.bold(parentAccountName)} or your permission set doesn't allow you to add serverless function versions. To update your permissions, contact a super admin in ${chalk.bold(parentAccountName)}.`,
1910
2226
  scopes: {
1911
2227
  message: "The personal access key you provided doesn't include serverless function version permissions.",
1912
- instructions: (functionName, url) => `To update CLI permissions for "${functionName}": \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes serverless function version permissions. \n- Update the CLI config for this account by running ${chalk_1.default.bold('hs auth')} and entering the new key.\n`,
2228
+ instructions: (functionName, url) => `To update CLI permissions for "${functionName}": \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes serverless function version permissions. \n- Update the CLI config for this account by running ${chalk.bold('hs auth')} and entering the new key.\n`,
1913
2229
  },
1914
2230
  },
1915
2231
  },
1916
2232
  delete: {
1917
2233
  loading: {
1918
- add: (functionName) => `Deleting serverless function versions ${chalk_1.default.bold(functionName)}`,
1919
- fail: (functionName) => `Failed to delete serverless function versions ${chalk_1.default.bold(functionName)}.`,
1920
- succeed: (functionName) => `Successfully deleted serverless function versions ${chalk_1.default.bold(functionName)}.`,
2234
+ add: (functionName) => `Deleting serverless function versions ${chalk.bold(functionName)}`,
2235
+ fail: (functionName) => `Failed to delete serverless function versions ${chalk.bold(functionName)}.`,
2236
+ succeed: (functionName) => `Successfully deleted serverless function versions ${chalk.bold(functionName)}.`,
1921
2237
  },
1922
2238
  success: {
1923
2239
  configFileUpdated: (functionName, authType) => `Serverless function versions "${functionName}" updated using "${authType}"`,
1924
2240
  },
1925
2241
  failure: {
1926
- invalidUser: (functionName, parentAccountName) => `Couldn't delete ${chalk_1.default.bold(functionName)} because your account has been removed from ${chalk_1.default.bold(parentAccountName)} or your permission set doesn't allow you to delete serverless function versions. To update your permissions, contact a super admin in ${chalk_1.default.bold(parentAccountName)}.`,
2242
+ invalidUser: (functionName, parentAccountName) => `Couldn't delete ${chalk.bold(functionName)} because your account has been removed from ${chalk.bold(parentAccountName)} or your permission set doesn't allow you to delete serverless function versions. To update your permissions, contact a super admin in ${chalk.bold(parentAccountName)}.`,
1927
2243
  scopes: {
1928
2244
  message: "The personal access key you provided doesn't include serverless function version permissions.",
1929
- instructions: (functionName, url) => `To update CLI permissions for "${functionName}": \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes serverless function version permissions. \n- Update the CLI config for this account by running ${chalk_1.default.bold('hs auth')} and entering the new key.\n`,
2245
+ instructions: (functionName, url) => `To update CLI permissions for "${functionName}": \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes serverless function version permissions. \n- Update the CLI config for this account by running ${chalk.bold('hs auth')} and entering the new key.\n`,
1930
2246
  },
1931
2247
  },
1932
2248
  },
@@ -1940,10 +2256,10 @@ exports.commands = {
1940
2256
  configFileUpdated: (authType) => `Serverless function versions updated using "${authType}"`,
1941
2257
  },
1942
2258
  failure: {
1943
- 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)}.`,
2259
+ invalidUser: (parentAccountName) => `Couldn't list serverless function versions because your account has been removed from ${chalk.bold(parentAccountName)} or your permission set doesn't allow you to list serverless function versions. To update your permissions, contact a super admin in ${chalk.bold(parentAccountName)}.`,
1944
2260
  scopes: {
1945
2261
  message: "The personal access key you provided doesn't include serverless function version permissions.",
1946
- 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`,
2262
+ 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.bold('hs auth')} and entering the new key.\n`,
1947
2263
  },
1948
2264
  },
1949
2265
  },
@@ -1951,35 +2267,35 @@ exports.commands = {
1951
2267
  serverlessFunctionWebhooks: {
1952
2268
  add: {
1953
2269
  loading: {
1954
- add: (functionName) => `Adding serverless function webhooks ${chalk_1.default.bold(functionName)}`,
1955
- fail: (functionName) => `Failed to add serverless function webhooks ${chalk_1.default.bold(functionName)}.`,
1956
- succeed: (functionName) => `Successfully added serverless function webhooks ${chalk_1.default.bold(functionName)}.`,
2270
+ add: (functionName) => `Adding serverless function webhooks ${chalk.bold(functionName)}`,
2271
+ fail: (functionName) => `Failed to add serverless function webhooks ${chalk.bold(functionName)}.`,
2272
+ succeed: (functionName) => `Successfully added serverless function webhooks ${chalk.bold(functionName)}.`,
1957
2273
  },
1958
2274
  success: {
1959
2275
  configFileUpdated: (functionName, authType) => `Serverless function webhooks "${functionName}" updated using "${authType}"`,
1960
2276
  },
1961
2277
  failure: {
1962
- invalidUser: (functionName, parentAccountName) => `Couldn't add ${chalk_1.default.bold(functionName)} because your account has been removed from ${chalk_1.default.bold(parentAccountName)} or your permission set doesn't allow you to add serverless function webhooks. To update your permissions, contact a super admin in ${chalk_1.default.bold(parentAccountName)}.`,
2278
+ invalidUser: (functionName, parentAccountName) => `Couldn't add ${chalk.bold(functionName)} because your account has been removed from ${chalk.bold(parentAccountName)} or your permission set doesn't allow you to add serverless function webhooks. To update your permissions, contact a super admin in ${chalk.bold(parentAccountName)}.`,
1963
2279
  scopes: {
1964
2280
  message: "The personal access key you provided doesn't include serverless function webhook permissions.",
1965
- instructions: (functionName, url) => `To update CLI permissions for "${functionName}": \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes serverless function webhook permissions. \n- Update the CLI config for this account by running ${chalk_1.default.bold('hs auth')} and entering the new key.\n`,
2281
+ instructions: (functionName, url) => `To update CLI permissions for "${functionName}": \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes serverless function webhook permissions. \n- Update the CLI config for this account by running ${chalk.bold('hs auth')} and entering the new key.\n`,
1966
2282
  },
1967
2283
  },
1968
2284
  },
1969
2285
  delete: {
1970
2286
  loading: {
1971
- add: (functionName) => `Deleting serverless function webhooks ${chalk_1.default.bold(functionName)}`,
1972
- fail: (functionName) => `Failed to delete serverless function webhooks ${chalk_1.default.bold(functionName)}.`,
1973
- succeed: (functionName) => `Successfully deleted serverless function webhooks ${chalk_1.default.bold(functionName)}.`,
2287
+ add: (functionName) => `Deleting serverless function webhooks ${chalk.bold(functionName)}`,
2288
+ fail: (functionName) => `Failed to delete serverless function webhooks ${chalk.bold(functionName)}.`,
2289
+ succeed: (functionName) => `Successfully deleted serverless function webhooks ${chalk.bold(functionName)}.`,
1974
2290
  },
1975
2291
  success: {
1976
2292
  configFileUpdated: (functionName, authType) => `Serverless function webhooks "${functionName}" updated using "${authType}"`,
1977
2293
  },
1978
2294
  failure: {
1979
- invalidUser: (functionName, parentAccountName) => `Couldn't delete ${chalk_1.default.bold(functionName)} because your account has been removed from ${chalk_1.default.bold(parentAccountName)} or your permission set doesn't allow you to delete serverless function webhooks. To update your permissions, contact a super admin in ${chalk_1.default.bold(parentAccountName)}.`,
2295
+ invalidUser: (functionName, parentAccountName) => `Couldn't delete ${chalk.bold(functionName)} because your account has been removed from ${chalk.bold(parentAccountName)} or your permission set doesn't allow you to delete serverless function webhooks. To update your permissions, contact a super admin in ${chalk.bold(parentAccountName)}.`,
1980
2296
  scopes: {
1981
2297
  message: "The personal access key you provided doesn't include serverless function webhook permissions.",
1982
- instructions: (functionName, url) => `To update CLI permissions for "${functionName}": \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes serverless function webhook permissions. \n- Update the CLI config for this account by running ${chalk_1.default.bold('hs auth')} and entering the new key.\n`,
2298
+ instructions: (functionName, url) => `To update CLI permissions for "${functionName}": \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes serverless function webhook permissions. \n- Update the CLI config for this account by running ${chalk.bold('hs auth')} and entering the new key.\n`,
1983
2299
  },
1984
2300
  },
1985
2301
  },
@@ -1993,10 +2309,10 @@ exports.commands = {
1993
2309
  configFileUpdated: (authType) => `Serverless function webhooks updated using "${authType}"`,
1994
2310
  },
1995
2311
  failure: {
1996
- 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)}.`,
2312
+ invalidUser: (parentAccountName) => `Couldn't list serverless function webhooks because your account has been removed from ${chalk.bold(parentAccountName)} or your permission set doesn't allow you to list serverless function webhooks. To update your permissions, contact a super admin in ${chalk.bold(parentAccountName)}.`,
1997
2313
  scopes: {
1998
2314
  message: "The personal access key you provided doesn't include serverless function webhook permissions.",
1999
- 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`,
2315
+ 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.bold('hs auth')} and entering the new key.\n`,
2000
2316
  },
2001
2317
  },
2002
2318
  },
@@ -2004,35 +2320,35 @@ exports.commands = {
2004
2320
  serverlessFunctionWebhookSubscriptions: {
2005
2321
  add: {
2006
2322
  loading: {
2007
- add: (functionName) => `Adding serverless function webhook subscriptions ${chalk_1.default.bold(functionName)}`,
2008
- fail: (functionName) => `Failed to add serverless function webhook subscriptions ${chalk_1.default.bold(functionName)}.`,
2009
- succeed: (functionName) => `Successfully added serverless function webhook subscriptions ${chalk_1.default.bold(functionName)}.`,
2323
+ add: (functionName) => `Adding serverless function webhook subscriptions ${chalk.bold(functionName)}`,
2324
+ fail: (functionName) => `Failed to add serverless function webhook subscriptions ${chalk.bold(functionName)}.`,
2325
+ succeed: (functionName) => `Successfully added serverless function webhook subscriptions ${chalk.bold(functionName)}.`,
2010
2326
  },
2011
2327
  success: {
2012
2328
  configFileUpdated: (functionName, authType) => `Serverless function webhook subscriptions "${functionName}" updated using "${authType}"`,
2013
2329
  },
2014
2330
  failure: {
2015
- invalidUser: (functionName, parentAccountName) => `Couldn't add ${chalk_1.default.bold(functionName)} because your account has been removed from ${chalk_1.default.bold(parentAccountName)} or your permission set doesn't allow you to add serverless function webhook subscriptions. To update your permissions, contact a super admin in ${chalk_1.default.bold(parentAccountName)}.`,
2331
+ invalidUser: (functionName, parentAccountName) => `Couldn't add ${chalk.bold(functionName)} because your account has been removed from ${chalk.bold(parentAccountName)} or your permission set doesn't allow you to add serverless function webhook subscriptions. To update your permissions, contact a super admin in ${chalk.bold(parentAccountName)}.`,
2016
2332
  scopes: {
2017
2333
  message: "The personal access key you provided doesn't include serverless function webhook subscription permissions.",
2018
- instructions: (functionName, url) => `To update CLI permissions for "${functionName}": \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes serverless function webhook subscription permissions. \n- Update the CLI config for this account by running ${chalk_1.default.bold('hs auth')} and entering the new key.\n`,
2334
+ instructions: (functionName, url) => `To update CLI permissions for "${functionName}": \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes serverless function webhook subscription permissions. \n- Update the CLI config for this account by running ${chalk.bold('hs auth')} and entering the new key.\n`,
2019
2335
  },
2020
2336
  },
2021
2337
  },
2022
2338
  delete: {
2023
2339
  loading: {
2024
- add: (functionName) => `Deleting serverless function webhook subscriptions ${chalk_1.default.bold(functionName)}`,
2025
- fail: (functionName) => `Failed to delete serverless function webhook subscriptions ${chalk_1.default.bold(functionName)}.`,
2026
- succeed: (functionName) => `Successfully deleted serverless function webhook subscriptions ${chalk_1.default.bold(functionName)}.`,
2340
+ add: (functionName) => `Deleting serverless function webhook subscriptions ${chalk.bold(functionName)}`,
2341
+ fail: (functionName) => `Failed to delete serverless function webhook subscriptions ${chalk.bold(functionName)}.`,
2342
+ succeed: (functionName) => `Successfully deleted serverless function webhook subscriptions ${chalk.bold(functionName)}.`,
2027
2343
  },
2028
2344
  success: {
2029
2345
  configFileUpdated: (functionName, authType) => `Serverless function webhook subscriptions "${functionName}" updated using "${authType}"`,
2030
2346
  },
2031
2347
  failure: {
2032
- invalidUser: (functionName, parentAccountName) => `Couldn't delete ${chalk_1.default.bold(functionName)} because your account has been removed from ${chalk_1.default.bold(parentAccountName)} or your permission set doesn't allow you to delete serverless function webhook subscriptions. To update your permissions, contact a super admin in ${chalk_1.default.bold(parentAccountName)}.`,
2348
+ invalidUser: (functionName, parentAccountName) => `Couldn't delete ${chalk.bold(functionName)} because your account has been removed from ${chalk.bold(parentAccountName)} or your permission set doesn't allow you to delete serverless function webhook subscriptions. To update your permissions, contact a super admin in ${chalk.bold(parentAccountName)}.`,
2033
2349
  scopes: {
2034
2350
  message: "The personal access key you provided doesn't include serverless function webhook subscription permissions.",
2035
- instructions: (functionName, url) => `To update CLI permissions for "${functionName}": \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes serverless function webhook subscription permissions. \n- Update the CLI config for this account by running ${chalk_1.default.bold('hs auth')} and entering the new key.\n`,
2351
+ instructions: (functionName, url) => `To update CLI permissions for "${functionName}": \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes serverless function webhook subscription permissions. \n- Update the CLI config for this account by running ${chalk.bold('hs auth')} and entering the new key.\n`,
2036
2352
  },
2037
2353
  },
2038
2354
  },
@@ -2046,10 +2362,10 @@ exports.commands = {
2046
2362
  configFileUpdated: (authType) => `Serverless function webhook subscriptions updated using "${authType}"`,
2047
2363
  },
2048
2364
  failure: {
2049
- 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)}.`,
2365
+ invalidUser: (parentAccountName) => `Couldn't list serverless function webhook subscriptions because your account has been removed from ${chalk.bold(parentAccountName)} or your permission set doesn't allow you to list serverless function webhook subscriptions. To update your permissions, contact a super admin in ${chalk.bold(parentAccountName)}.`,
2050
2366
  scopes: {
2051
2367
  message: "The personal access key you provided doesn't include serverless function webhook subscription permissions.",
2052
- 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`,
2368
+ 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.bold('hs auth')} and entering the new key.\n`,
2053
2369
  },
2054
2370
  },
2055
2371
  },
@@ -2057,35 +2373,35 @@ exports.commands = {
2057
2373
  serverlessFunctionWebhookSubscriptionEvents: {
2058
2374
  add: {
2059
2375
  loading: {
2060
- add: (functionName) => `Adding serverless function webhook subscription events ${chalk_1.default.bold(functionName)}`,
2061
- fail: (functionName) => `Failed to add serverless function webhook subscription events ${chalk_1.default.bold(functionName)}.`,
2062
- succeed: (functionName) => `Successfully added serverless function webhook subscription events ${chalk_1.default.bold(functionName)}.`,
2376
+ add: (functionName) => `Adding serverless function webhook subscription events ${chalk.bold(functionName)}`,
2377
+ fail: (functionName) => `Failed to add serverless function webhook subscription events ${chalk.bold(functionName)}.`,
2378
+ succeed: (functionName) => `Successfully added serverless function webhook subscription events ${chalk.bold(functionName)}.`,
2063
2379
  },
2064
2380
  success: {
2065
2381
  configFileUpdated: (functionName, authType) => `Serverless function webhook subscription events "${functionName}" updated using "${authType}"`,
2066
2382
  },
2067
2383
  failure: {
2068
- invalidUser: (functionName, parentAccountName) => `Couldn't add ${chalk_1.default.bold(functionName)} because your account has been removed from ${chalk_1.default.bold(parentAccountName)} or your permission set doesn't allow you to add serverless function webhook subscription events. To update your permissions, contact a super admin in ${chalk_1.default.bold(parentAccountName)}.`,
2384
+ invalidUser: (functionName, parentAccountName) => `Couldn't add ${chalk.bold(functionName)} because your account has been removed from ${chalk.bold(parentAccountName)} or your permission set doesn't allow you to add serverless function webhook subscription events. To update your permissions, contact a super admin in ${chalk.bold(parentAccountName)}.`,
2069
2385
  scopes: {
2070
2386
  message: "The personal access key you provided doesn't include serverless function webhook subscription event permissions.",
2071
- instructions: (functionName, url) => `To update CLI permissions for "${functionName}": \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes serverless function webhook subscription event permissions. \n- Update the CLI config for this account by running ${chalk_1.default.bold('hs auth')} and entering the new key.\n`,
2387
+ instructions: (functionName, url) => `To update CLI permissions for "${functionName}": \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes serverless function webhook subscription event permissions. \n- Update the CLI config for this account by running ${chalk.bold('hs auth')} and entering the new key.\n`,
2072
2388
  },
2073
2389
  },
2074
2390
  },
2075
2391
  delete: {
2076
2392
  loading: {
2077
- add: (functionName) => `Deleting serverless function webhook subscription events ${chalk_1.default.bold(functionName)}`,
2078
- fail: (functionName) => `Failed to delete serverless function webhook subscription events ${chalk_1.default.bold(functionName)}.`,
2079
- succeed: (functionName) => `Successfully deleted serverless function webhook subscription events ${chalk_1.default.bold(functionName)}.`,
2393
+ add: (functionName) => `Deleting serverless function webhook subscription events ${chalk.bold(functionName)}`,
2394
+ fail: (functionName) => `Failed to delete serverless function webhook subscription events ${chalk.bold(functionName)}.`,
2395
+ succeed: (functionName) => `Successfully deleted serverless function webhook subscription events ${chalk.bold(functionName)}.`,
2080
2396
  },
2081
2397
  success: {
2082
2398
  configFileUpdated: (functionName, authType) => `Serverless function webhook subscription events "${functionName}" updated using "${authType}"`,
2083
2399
  },
2084
2400
  failure: {
2085
- invalidUser: (functionName, parentAccountName) => `Couldn't delete ${chalk_1.default.bold(functionName)} because your account has been removed from ${chalk_1.default.bold(parentAccountName)} or your permission set doesn't allow you to delete serverless function webhook subscription events. To update your permissions, contact a super admin in ${chalk_1.default.bold(parentAccountName)}.`,
2401
+ invalidUser: (functionName, parentAccountName) => `Couldn't delete ${chalk.bold(functionName)} because your account has been removed from ${chalk.bold(parentAccountName)} or your permission set doesn't allow you to delete serverless function webhook subscription events. To update your permissions, contact a super admin in ${chalk.bold(parentAccountName)}.`,
2086
2402
  scopes: {
2087
2403
  message: "The personal access key you provided doesn't include serverless function webhook subscription event permissions.",
2088
- instructions: (functionName, url) => `To update CLI permissions for "${functionName}": \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes serverless function webhook subscription event permissions. \n- Update the CLI config for this account by running ${chalk_1.default.bold('hs auth')} and entering the new key.\n`,
2404
+ instructions: (functionName, url) => `To update CLI permissions for "${functionName}": \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes serverless function webhook subscription event permissions. \n- Update the CLI config for this account by running ${chalk.bold('hs auth')} and entering the new key.\n`,
2089
2405
  },
2090
2406
  },
2091
2407
  },
@@ -2099,10 +2415,10 @@ exports.commands = {
2099
2415
  configFileUpdated: (authType) => `Serverless function webhook subscription events updated using "${authType}"`,
2100
2416
  },
2101
2417
  failure: {
2102
- 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)}.`,
2418
+ invalidUser: (parentAccountName) => `Couldn't list serverless function webhook subscription events because your account has been removed from ${chalk.bold(parentAccountName)} or your permission set doesn't allow you to list serverless function webhook subscription events. To update your permissions, contact a super admin in ${chalk.bold(parentAccountName)}.`,
2103
2419
  scopes: {
2104
2420
  message: "The personal access key you provided doesn't include serverless function webhook subscription event permissions.",
2105
- 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`,
2421
+ 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.bold('hs auth')} and entering the new key.\n`,
2106
2422
  },
2107
2423
  },
2108
2424
  },
@@ -2110,35 +2426,35 @@ exports.commands = {
2110
2426
  serverlessFunctionWebhookSubscriptionEventTypes: {
2111
2427
  add: {
2112
2428
  loading: {
2113
- add: (functionName) => `Adding serverless function webhook subscription event types ${chalk_1.default.bold(functionName)}`,
2114
- fail: (functionName) => `Failed to add serverless function webhook subscription event types ${chalk_1.default.bold(functionName)}.`,
2115
- succeed: (functionName) => `Successfully added serverless function webhook subscription event types ${chalk_1.default.bold(functionName)}.`,
2429
+ add: (functionName) => `Adding serverless function webhook subscription event types ${chalk.bold(functionName)}`,
2430
+ fail: (functionName) => `Failed to add serverless function webhook subscription event types ${chalk.bold(functionName)}.`,
2431
+ succeed: (functionName) => `Successfully added serverless function webhook subscription event types ${chalk.bold(functionName)}.`,
2116
2432
  },
2117
2433
  success: {
2118
2434
  configFileUpdated: (functionName, authType) => `Serverless function webhook subscription event types "${functionName}" updated using "${authType}"`,
2119
2435
  },
2120
2436
  failure: {
2121
- invalidUser: (functionName, parentAccountName) => `Couldn't add ${chalk_1.default.bold(functionName)} because your account has been removed from ${chalk_1.default.bold(parentAccountName)} or your permission set doesn't allow you to add serverless function webhook subscription event types. To update your permissions, contact a super admin in ${chalk_1.default.bold(parentAccountName)}.`,
2437
+ invalidUser: (functionName, parentAccountName) => `Couldn't add ${chalk.bold(functionName)} because your account has been removed from ${chalk.bold(parentAccountName)} or your permission set doesn't allow you to add serverless function webhook subscription event types. To update your permissions, contact a super admin in ${chalk.bold(parentAccountName)}.`,
2122
2438
  scopes: {
2123
2439
  message: "The personal access key you provided doesn't include serverless function webhook subscription event type permissions.",
2124
- instructions: (functionName, url) => `To update CLI permissions for "${functionName}": \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes serverless function webhook subscription event type permissions. \n- Update the CLI config for this account by running ${chalk_1.default.bold('hs auth')} and entering the new key.\n`,
2440
+ instructions: (functionName, url) => `To update CLI permissions for "${functionName}": \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes serverless function webhook subscription event type permissions. \n- Update the CLI config for this account by running ${chalk.bold('hs auth')} and entering the new key.\n`,
2125
2441
  },
2126
2442
  },
2127
2443
  },
2128
2444
  delete: {
2129
2445
  loading: {
2130
- add: (functionName) => `Deleting serverless function webhook subscription event types ${chalk_1.default.bold(functionName)}`,
2131
- fail: (functionName) => `Failed to delete serverless function webhook subscription event types ${chalk_1.default.bold(functionName)}.`,
2132
- succeed: (functionName) => `Successfully deleted serverless function webhook subscription event types ${chalk_1.default.bold(functionName)}.`,
2446
+ add: (functionName) => `Deleting serverless function webhook subscription event types ${chalk.bold(functionName)}`,
2447
+ fail: (functionName) => `Failed to delete serverless function webhook subscription event types ${chalk.bold(functionName)}.`,
2448
+ succeed: (functionName) => `Successfully deleted serverless function webhook subscription event types ${chalk.bold(functionName)}.`,
2133
2449
  },
2134
2450
  success: {
2135
2451
  configFileUpdated: (functionName, authType) => `Serverless function webhook subscription event types "${functionName}" updated using "${authType}"`,
2136
2452
  },
2137
2453
  failure: {
2138
- invalidUser: (functionName, parentAccountName) => `Couldn't delete ${chalk_1.default.bold(functionName)} because your account has been removed from ${chalk_1.default.bold(parentAccountName)} or your permission set doesn't allow you to delete serverless function webhook subscription event types. To update your permissions, contact a super admin in ${chalk_1.default.bold(parentAccountName)}.`,
2454
+ invalidUser: (functionName, parentAccountName) => `Couldn't delete ${chalk.bold(functionName)} because your account has been removed from ${chalk.bold(parentAccountName)} or your permission set doesn't allow you to delete serverless function webhook subscription event types. To update your permissions, contact a super admin in ${chalk.bold(parentAccountName)}.`,
2139
2455
  scopes: {
2140
2456
  message: "The personal access key you provided doesn't include serverless function webhook subscription event type permissions.",
2141
- instructions: (functionName, url) => `To update CLI permissions for "${functionName}": \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes serverless function webhook subscription event type permissions. \n- Update the CLI config for this account by running ${chalk_1.default.bold('hs auth')} and entering the new key.\n`,
2457
+ instructions: (functionName, url) => `To update CLI permissions for "${functionName}": \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes serverless function webhook subscription event type permissions. \n- Update the CLI config for this account by running ${chalk.bold('hs auth')} and entering the new key.\n`,
2142
2458
  },
2143
2459
  },
2144
2460
  },
@@ -2152,10 +2468,10 @@ exports.commands = {
2152
2468
  configFileUpdated: (authType) => `Serverless function webhook subscription event types updated using "${authType}"`,
2153
2469
  },
2154
2470
  failure: {
2155
- 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)}.`,
2471
+ invalidUser: (parentAccountName) => `Couldn't list serverless function webhook subscription event types because your account has been removed from ${chalk.bold(parentAccountName)} or your permission set doesn't allow you to list serverless function webhook subscription event types. To update your permissions, contact a super admin in ${chalk.bold(parentAccountName)}.`,
2156
2472
  scopes: {
2157
2473
  message: "The personal access key you provided doesn't include serverless function webhook subscription event type permissions.",
2158
- 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`,
2474
+ 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.bold('hs auth')} and entering the new key.\n`,
2159
2475
  },
2160
2476
  },
2161
2477
  },
@@ -2163,35 +2479,35 @@ exports.commands = {
2163
2479
  serverlessFunctionWebhookSubscriptionEventTypeOptions: {
2164
2480
  add: {
2165
2481
  loading: {
2166
- add: (functionName) => `Adding serverless function webhook subscription event type options ${chalk_1.default.bold(functionName)}`,
2167
- fail: (functionName) => `Failed to add serverless function webhook subscription event type options ${chalk_1.default.bold(functionName)}.`,
2168
- succeed: (functionName) => `Successfully added serverless function webhook subscription event type options ${chalk_1.default.bold(functionName)}.`,
2482
+ add: (functionName) => `Adding serverless function webhook subscription event type options ${chalk.bold(functionName)}`,
2483
+ fail: (functionName) => `Failed to add serverless function webhook subscription event type options ${chalk.bold(functionName)}.`,
2484
+ succeed: (functionName) => `Successfully added serverless function webhook subscription event type options ${chalk.bold(functionName)}.`,
2169
2485
  },
2170
2486
  success: {
2171
2487
  configFileUpdated: (functionName, authType) => `Serverless function webhook subscription event type options "${functionName}" updated using "${authType}"`,
2172
2488
  },
2173
2489
  failure: {
2174
- invalidUser: (functionName, parentAccountName) => `Couldn't add ${chalk_1.default.bold(functionName)} because your account has been removed from ${chalk_1.default.bold(parentAccountName)} or your permission set doesn't allow you to add serverless function webhook subscription event type options. To update your permissions, contact a super admin in ${chalk_1.default.bold(parentAccountName)}.`,
2490
+ invalidUser: (functionName, parentAccountName) => `Couldn't add ${chalk.bold(functionName)} because your account has been removed from ${chalk.bold(parentAccountName)} or your permission set doesn't allow you to add serverless function webhook subscription event type options. To update your permissions, contact a super admin in ${chalk.bold(parentAccountName)}.`,
2175
2491
  scopes: {
2176
2492
  message: "The personal access key you provided doesn't include serverless function webhook subscription event type option permissions.",
2177
- instructions: (functionName, url) => `To update CLI permissions for "${functionName}": \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes serverless function webhook subscription event type option permissions. \n- Update the CLI config for this account by running ${chalk_1.default.bold('hs auth')} and entering the new key.\n`,
2493
+ instructions: (functionName, url) => `To update CLI permissions for "${functionName}": \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes serverless function webhook subscription event type option permissions. \n- Update the CLI config for this account by running ${chalk.bold('hs auth')} and entering the new key.\n`,
2178
2494
  },
2179
2495
  },
2180
2496
  },
2181
2497
  delete: {
2182
2498
  loading: {
2183
- add: (functionName) => `Deleting serverless function webhook subscription event type options ${chalk_1.default.bold(functionName)}`,
2184
- fail: (functionName) => `Failed to delete serverless function webhook subscription event type options ${chalk_1.default.bold(functionName)}.`,
2185
- succeed: (functionName) => `Successfully deleted serverless function webhook subscription event type options ${chalk_1.default.bold(functionName)}.`,
2499
+ add: (functionName) => `Deleting serverless function webhook subscription event type options ${chalk.bold(functionName)}`,
2500
+ fail: (functionName) => `Failed to delete serverless function webhook subscription event type options ${chalk.bold(functionName)}.`,
2501
+ succeed: (functionName) => `Successfully deleted serverless function webhook subscription event type options ${chalk.bold(functionName)}.`,
2186
2502
  },
2187
2503
  success: {
2188
2504
  configFileUpdated: (functionName, authType) => `Serverless function webhook subscription event type options "${functionName}" updated using "${authType}"`,
2189
2505
  },
2190
2506
  failure: {
2191
- invalidUser: (functionName, parentAccountName) => `Couldn't delete ${chalk_1.default.bold(functionName)} because your account has been removed from ${chalk_1.default.bold(parentAccountName)} or your permission set doesn't allow you to delete serverless function webhook subscription event type options. To update your permissions, contact a super admin in ${chalk_1.default.bold(parentAccountName)}.`,
2507
+ invalidUser: (functionName, parentAccountName) => `Couldn't delete ${chalk.bold(functionName)} because your account has been removed from ${chalk.bold(parentAccountName)} or your permission set doesn't allow you to delete serverless function webhook subscription event type options. To update your permissions, contact a super admin in ${chalk.bold(parentAccountName)}.`,
2192
2508
  scopes: {
2193
2509
  message: "The personal access key you provided doesn't include serverless function webhook subscription event type option permissions.",
2194
- instructions: (functionName, url) => `To update CLI permissions for "${functionName}": \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes serverless function webhook subscription event type option permissions. \n- Update the CLI config for this account by running ${chalk_1.default.bold('hs auth')} and entering the new key.\n`,
2510
+ instructions: (functionName, url) => `To update CLI permissions for "${functionName}": \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes serverless function webhook subscription event type option permissions. \n- Update the CLI config for this account by running ${chalk.bold('hs auth')} and entering the new key.\n`,
2195
2511
  },
2196
2512
  },
2197
2513
  },
@@ -2205,67 +2521,22 @@ exports.commands = {
2205
2521
  configFileUpdated: (authType) => `Serverless function webhook subscription event type options updated using "${authType}"`,
2206
2522
  },
2207
2523
  failure: {
2208
- 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)}.`,
2524
+ invalidUser: (parentAccountName) => `Couldn't list serverless function webhook subscription event type options because your account has been removed from ${chalk.bold(parentAccountName)} or your permission set doesn't allow you to list serverless function webhook subscription event type options. To update your permissions, contact a super admin in ${chalk.bold(parentAccountName)}.`,
2209
2525
  scopes: {
2210
2526
  message: "The personal access key you provided doesn't include serverless function webhook subscription event type option permissions.",
2211
- 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`,
2527
+ 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.bold('hs auth')} and entering the new key.\n`,
2212
2528
  },
2213
2529
  },
2214
2530
  },
2215
2531
  },
2216
- setupMcp: {
2217
- describe: 'Configure the HubSpot CLI MCP (Model Context Protocol) server for use with Cursor.',
2218
- errors: {
2219
- serverNotFound: 'hsmcp command not found. Please ensure the HubSpot CLI is properly installed and available in your PATH.',
2220
- installHint: 'If you installed the CLI locally, make sure to install it globally with: npm install -g @hubspot/cli',
2221
- configurationFailed: 'Failed to configure MCP server',
2222
- },
2223
- warnings: {
2224
- alreadyConfigured: 'MCP server is already configured.',
2225
- },
2226
- success: {
2227
- configured: 'MCP server successfully configured for Cursor.',
2228
- restartCursor: 'Please restart Cursor to apply the changes.',
2229
- },
2230
- instructions: {
2231
- title: 'Manual MCP Server Configuration Instructions:',
2232
- step1: '1. Open or create the Cursor configuration file at:',
2233
- step2: '2. Add the following configuration to the file:',
2234
- step3: '3. Restart Cursor to apply the changes.',
2235
- documentation: 'For more information, visit: https://docs.cursor.com/context/model-context-protocol',
2236
- },
2237
- options: {
2238
- autoSetup: {
2239
- describe: 'Automatically configure the MCP server in Cursor configuration',
2240
- },
2241
- showInstructions: {
2242
- describe: 'Display manual configuration instructions instead of auto-setup',
2243
- },
2244
- global: {
2245
- describe: 'Configure globally for all Cursor workspaces (default: true)',
2246
- },
2247
- },
2248
- prompts: {
2249
- selectAction: 'How would you like to configure the MCP server?',
2250
- selectScope: 'Configure MCP server for:',
2251
- overwrite: 'MCP server is already configured. Overwrite existing configuration?',
2252
- },
2253
- choices: {
2254
- autoSetup: 'Automatically configure (recommended)',
2255
- showInstructions: 'Show manual configuration instructions',
2256
- global: 'Global (all Cursor workspaces)',
2257
- project: 'Current project only',
2258
- },
2259
- examples: {
2260
- default: 'Configure the MCP server interactively',
2261
- autoSetup: 'Automatically configure the MCP server',
2262
- autoSetupGlobal: 'Automatically configure the MCP server globally',
2263
- autoSetupProject: 'Automatically configure for current project only',
2264
- showInstructions: 'Display manual configuration instructions',
2265
- },
2266
- },
2267
2532
  };
2268
- exports.lib = {
2533
+ export const lib = {
2534
+ parsing: {
2535
+ unableToParseStringToNumber: 'Unable to parse string to number',
2536
+ },
2537
+ configMiddleWare: {
2538
+ invalidAccountIdEnvironmentVariable: 'Unable to parse `HUBSPOT_ACCOUNT_ID` environment variable into a number',
2539
+ },
2269
2540
  process: {
2270
2541
  exitDebug: (signal) => `Attempting to gracefully exit. Triggered by ${signal}`,
2271
2542
  },
@@ -2275,40 +2546,41 @@ exports.lib = {
2275
2546
  noCompatibleComponents: (serverKey) => `Skipping call to ${serverKey} because there are no compatible components in the project.`,
2276
2547
  },
2277
2548
  LocalDevManager: {
2278
- staticAuthAccountsMustMatch: 'You must test static auth apps in the account the project exists in',
2279
- appNotFound: (accountId, appUid) => `Unable to find app with uid ${appUid} in account ${(0, ui_1.uiAccountDescription)(accountId)}`,
2549
+ appNotFound: (accountId, appUid) => `Unable to find app with uid ${appUid} in account ${uiAccountDescription(accountId)}`,
2280
2550
  failedToInitialize: 'Missing required arguments to initialize Local Dev',
2281
- 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.`,
2551
+ noDeployedBuild: (projectName, accountIdentifier, uploadCommand) => `Your project ${chalk.bold(projectName)} exists in ${accountIdentifier}, but has no deployed build. Projects must be successfully deployed to be developed locally. Address any build and deploy errors your project may have, then run ${uploadCommand} to upload and deploy your project.`,
2282
2552
  noComponents: 'There are no components in this project.',
2283
2553
  betaMessage: 'HubSpot projects local development',
2284
- 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'),
2285
- running: (projectName, accountIdentifier) => chalk_1.default.hex(ui_2.UI_COLORS.SORBET)(`Running ${chalk_1.default.bold(projectName)} locally on ${accountIdentifier}, waiting for changes ...`),
2286
- quitHelper: `Press ${chalk_1.default.bold('q')} to stop the local dev server`,
2287
- viewProjectLink: (name, accountId) => (0, ui_1.uiLink)('View project in HubSpot', (0, urls_1.getProjectDetailUrl)(name, accountId) || ''),
2554
+ learnMoreLocalDevServer: uiLink('Learn more about the projects local dev server', 'https://developers.hubspot.com/docs/platform/project-cli-commands#start-a-local-development-server'),
2555
+ running: (projectName, accountIdentifier) => chalk.hex(UI_COLORS.SORBET)(`Running ${chalk.bold(projectName)} locally on ${accountIdentifier}, waiting for changes ...`),
2556
+ quitHelper: `Press ${chalk.bold('q')} to stop the local dev server`,
2557
+ viewProjectLink: (name, accountId) => uiLink('View project in HubSpot', getProjectDetailUrl(name, accountId) || ''),
2558
+ viewLocalDevUILink: (accountId, showWelcomeScreen) => uiLink('View local dev session in HubSpot', getLocalDevUiUrl(accountId, showWelcomeScreen)),
2559
+ localDevUIAutoMessage: (accountId, showWelcomeScreen) => `Opening your ${uiLink('local dev session in HubSpot', getLocalDevUiUrl(accountId, showWelcomeScreen))}...`,
2288
2560
  viewTestAccountLink: 'View developer test account in HubSpot',
2289
2561
  exitingStart: 'Stopping local dev server ...',
2290
2562
  exitingSucceed: 'Successfully exited',
2291
2563
  exitingFail: 'Failed to cleanup before exiting',
2292
- missingUid: `Could not find a uid for the selected app. Confirm that the app config file contains the uid field and re-run ${(0, ui_1.uiCommandReference)('hs project dev')}.`,
2564
+ missingUid: `Could not find a uid for the selected app. Confirm that the app config file contains the uid field and re-run ${uiCommandReference('hs project dev')}.`,
2293
2565
  uploadWarning: {
2294
2566
  appLabel: '[App]',
2295
2567
  uiExtensionLabel: '[UI Extension]',
2296
- 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.`,
2297
- defaultWarning: chalk_1.default.bold('Changing project configuration requires a new project build.'),
2298
- 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.`,
2568
+ missingComponents: (missingComponents) => `Couldn't find the following components in the deployed build for this project: ${chalk.bold(missingComponents)}. This may cause issues in local development.`,
2569
+ defaultWarning: chalk.bold('Changing project configuration requires a new project build.'),
2570
+ defaultPublicAppWarning: (installCount, installText) => `${chalk.bold('Changing project configuration requires a new project build.')}\n\nThis will affect your public app's ${chalk.bold(`${installCount} existing ${installText}`)}. If your app has users in production, we strongly recommend creating a copy of this app to test your changes before proceeding.`,
2299
2571
  header: (warning) => `${warning} To reflect these changes and continue testing:`,
2300
2572
  instructionsHeader: 'To reflect these changes and continue testing:',
2301
- stopDev: ` * Stop ${(0, ui_1.uiCommandReference)('hs project dev')}`,
2573
+ stopDev: ` * Stop ${uiCommandReference('hs project dev')}`,
2302
2574
  runUpload: (command) => ` * Run ${command}`,
2303
- restartDev: ` * Re-run ${(0, ui_1.uiCommandReference)('hs project dev')}`,
2575
+ restartDev: ` * Re-run ${uiCommandReference('hs project dev')}`,
2304
2576
  pushToGithub: ' * Commit and push your changes to GitHub',
2305
- 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.`,
2577
+ defaultMarketplaceAppWarning: (installCount, accountText) => `${chalk.bold('Changing project configuration requires creating a new project build.')}\n\nYour marketplace app is currently installed in ${chalk.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 proceeding.`,
2306
2578
  },
2307
2579
  activeInstallWarning: {
2308
- installCount: (appName, installCount) => `${chalk_1.default.bold(`The app ${appName} is installed in ${installCount} production ${installCount === 1 ? 'account' : 'accounts'}`)}`,
2580
+ installCount: (appName, installCount) => `${chalk.bold(`The app ${appName} is installed in ${installCount} production ${installCount === 1 ? 'account' : 'accounts'}`)}`,
2309
2581
  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.',
2310
2582
  confirmation: `You will always be asked to confirm any permanent changes to your app's configuration before uploading them.`,
2311
- confirmationPrompt: `Proceed with local development of this ${chalk_1.default.bold('production')} app?`,
2583
+ confirmationPrompt: `Proceed with local development of this ${chalk.bold('production')} app?`,
2312
2584
  },
2313
2585
  devServer: {
2314
2586
  cleanupError: (message) => `Failed to cleanup local dev server: ${message}`,
@@ -2318,7 +2590,19 @@ exports.lib = {
2318
2590
  },
2319
2591
  },
2320
2592
  AppDevModeInterface: {
2321
- 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.`,
2593
+ defaultMarketplaceAppWarning: (installCount) => `Your marketplace app is currently installed in ${chalk.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 proceeding.`,
2594
+ autoInstallDeclined: 'You must install your app on your target test account to proceed with local development.',
2595
+ autoInstallSuccess: (appName, targetTestAccountId) => `Successfully installed app ${appName} on account ${uiAccountDescription(targetTestAccountId)}\n`,
2596
+ autoInstallError: (appName, targetTestAccountId) => `Error installing app ${appName} on account ${uiAccountDescription(targetTestAccountId)}. You may still be able to install your app in your browser.`,
2597
+ fetchAppData: {
2598
+ checking: (appName) => `Checking installations for your app ${chalk.bold(appName)}...`,
2599
+ success: (appName, accountId) => `Your app ${chalk.bold(appName)} is installed on account ${uiAccountDescription(accountId, false)}`,
2600
+ notInstalled: (appName, accountId) => `Your app ${chalk.bold(appName)} is not currently installed on account ${uiAccountDescription(accountId, false)}`,
2601
+ activeInstallations: (appName, installCount) => `[WARNING] Your app ${chalk.bold(appName)} is installed in ${chalk.bold(`${installCount} ${installCount === 1 ? 'account' : 'accounts'}`)}`,
2602
+ error: 'An error occurred while checking installations for your app',
2603
+ },
2604
+ distributionChanged: `Your app's distribution type has been changed from ${APP_DISTRIBUTION_TYPES.PRIVATE} to ${APP_DISTRIBUTION_TYPES.MARKETPLACE}. Once uploaded, this change cannot be reversed. Before uploading your project, confirm that you want to ${chalk.bold('permanantly')} change your app's distribution type. This will uninstall your app from all accounts.`,
2605
+ authTypeChanged: `Your app's auth type has been changed from ${APP_AUTH_TYPES.STATIC} to ${APP_AUTH_TYPES.OAUTH}. Once uploaded, this change cannot be reversed. Before uploading your project, confirm that you want to ${chalk.bold('permanantly')} change your app's auth type. This will uninstall your app from all accounts.`,
2322
2606
  },
2323
2607
  LocalDevWebsocketServer: {
2324
2608
  errors: {
@@ -2327,103 +2611,139 @@ exports.lib = {
2327
2611
  unknownMessageType: (type) => `Unsupported message received. Unknown message type: ${type}`,
2328
2612
  invalidJSON: (data) => `Unsupported message received. Invalid JSON: ${data}`,
2329
2613
  portManagerNotRunning: (prefix) => `${prefix}Error: PortManagerServing must be running before starting LocalDevWebsocketServer.`,
2614
+ originNotAllowed: (origin) => `Connections from ${origin ? `origin ${origin}` : 'this origin'} are not allowed.`,
2330
2615
  },
2331
2616
  logs: {
2332
2617
  startup: (port) => `LocalDevWebsocketServer running on port ${port}`,
2333
2618
  },
2334
2619
  },
2335
2620
  LocalDevProcess: {
2336
- projectConfigMismatch: `Unable to upload project. The project config has been modified since starting ${(0, ui_1.uiCommandReference)('hs project dev')}.`,
2621
+ projectConfigMismatch: `Unable to upload project. The project config has been modified since starting ${uiCommandReference('hs project dev')}.`,
2337
2622
  uploadInitiated: 'Project upload initiated from Local Dev UI.',
2623
+ deployInitiated: 'Project deploy initiated from Local Dev UI.',
2338
2624
  uploadFailed: 'Project upload failed. To proceed with local development, fix any necessary errors, then re-upload your project.',
2625
+ deployFailed: 'Project deploy failed. To proceed with local development, fix any necessary errors, then re-deploy your project.',
2339
2626
  uploadSuccess: 'Project upload completed successfully. Resuming local dev...',
2627
+ uploadSuccessAutoDeployDisabled: 'Project upload completed successfully, but auto-deploy is disabled for this project. Deploy your latest build to proceed with local development.',
2628
+ deploySuccess: 'Project deploy completed successfully. Resuming local dev...',
2629
+ noBuildToDeploy: 'Error deploying project. No build was found to deploy.',
2340
2630
  },
2341
2631
  localDevHelpers: {
2342
- confirmDefaultAccountIsTarget: {
2343
- configError: `An error occurred while reading the default account from your config. Run ${(0, ui_1.uiCommandReference)('hs auth')} to re-auth this account`,
2344
- declineDefaultAccountExplanation: `To develop on a different account, run ${(0, ui_1.uiCommandReference)('hs accounts use')} to change your default account, then re-run ${(0, ui_1.uiCommandReference)('hs project dev')}.`,
2345
- },
2346
- checkIfDefaultAccountIsSupported: {
2347
- publicApp: `This project contains a public app. Local development of public apps is only supported on developer accounts and developer test accounts. Change your default account using ${(0, ui_1.uiCommandReference)('hs accounts use')}, or link a new account with ${(0, ui_1.uiCommandReference)('hs auth')}.`,
2348
- privateApp: `This project contains a private app. Local development of private apps is not supported in developer accounts. Change your default account using ${(0, ui_1.uiCommandReference)('hs accounts use')}, or link a new account with ${(0, ui_1.uiCommandReference)('hs auth')}.`,
2349
- },
2350
- validateAccountOption: {
2351
- invalidPublicAppAccount: `This project contains a public app. The "--account" flag must point to a developer test account to develop this project locally. Alternatively, change your default account to an App Developer Account using ${(0, ui_1.uiCommandReference)('hs accounts use')} and run ${(0, ui_1.uiCommandReference)('hs project dev')} to set up a new Developer Test Account.`,
2352
- invalidPrivateAppAccount: `This project contains a private app. The account specified with the "--account" flag points to a developer account, which do not support the local development of private apps. Update the "--account" flag to point to a standard, sandbox, or developer test account, or change your default account by running ${(0, ui_1.uiCommandReference)('hs accounts use')}.`,
2353
- nonSandboxWarning: `Testing in a sandbox is strongly recommended. To switch the target account, select an option below or run ${(0, ui_1.uiCommandReference)('hs accounts use')} before running the command again.`,
2354
- publicAppNonDeveloperTestAccountWarning: `Local development of public apps is only supported in ${chalk_1.default.bold('developer test accounts')}.`,
2355
- },
2356
- createNewProjectForLocalDev: {
2357
- 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.`,
2358
- 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.`,
2359
- createProject: (projectName, accountIdentifier) => `Create new project ${projectName} in ${accountIdentifier}?`,
2360
- choseNotToCreateProject: 'Exiting because this command requires the project to exist in the target account.',
2361
- creatingProject: (projectName, accountIdentifier) => `Creating project ${projectName} in ${accountIdentifier}`,
2362
- createdProject: (projectName, accountIdentifier) => `Created project ${projectName} in ${accountIdentifier}`,
2363
- failedToCreateProject: 'Failed to create project in the target account.',
2364
- },
2365
- createInitialBuildForNewProject: {
2366
- initialUploadMessage: 'HubSpot Local Dev Server Startup',
2367
- projectLockedError: 'Your project is locked. This may mean that another user is running the `hs project watch` command for this project. If this is you, unlock the project in Projects UI.',
2368
- genericError: `An error occurred while creating the initial build for this project. Run ${(0, ui_1.uiCommandReference)('hs project upload')} to try again.`,
2369
- },
2370
- checkIfParentAccountIsAuthed: {
2371
- 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}.`,
2372
- },
2373
- selectAccountTypePrompt: {
2374
- message: '[--account] Choose the type of account to test on',
2375
- developerTestAccountOption: 'Test on a developer test account',
2376
- sandboxAccountOption: 'Test on a sandbox account',
2377
- sandboxAccountOptionDisabled: 'Disabled - requires access to sandbox accounts',
2378
- productionAccountOption: `<${chalk_1.default.red('!')} Test on this account ${chalk_1.default.red('!')}>`,
2632
+ project: {
2633
+ compareLocalProjectToDeployed: {
2634
+ noDeployedBuild: (projectName, accountIdentifier) => `Your project ${chalk.bold(projectName)} exists in ${accountIdentifier}, but has no deployed build. Projects must be successfully deployed to be developed locally. Address any build and deploy errors your project may have, then run ${uiCommandReference('hs project upload')} to upload and deploy your project.`,
2635
+ checking: 'Checking if your deployed build is up to date...',
2636
+ upToDate: 'Deployed build is up to date.',
2637
+ notUpToDate: `Your project contains undeployed local changes.`,
2638
+ notUpToDateExplanation: (profile) => `Run ${uiCommandReference(`hs project upload ${profile ? `--profile ${profile}` : ''}`)} to upload these changes to HubSpot, then re-run ${uiCommandReference(`hs project dev ${profile ? `--profile ${profile}` : ''}`)} to continue local development.`,
2639
+ },
2640
+ createNewProjectForLocalDev: {
2641
+ projectMustExistExplanation: (projectName, accountId) => `The project ${projectName} does not exist in the target account ${uiAccountDescription(accountId)}. This command requires the project to exist in the target account.`,
2642
+ publicAppProjectMustExistExplanation: (projectName, accountId) => `The project ${projectName} does not exist in ${uiAccountDescription(accountId)}, the app developer account associated with your target account. This command requires the project to exist in this app developer account.`,
2643
+ createProject: (projectName, accountIdentifier) => `Create new project ${projectName} in ${accountIdentifier}?`,
2644
+ choseNotToCreateProject: 'Exiting because this command requires the project to exist in the target account.',
2645
+ creatingProject: (projectName, accountIdentifier) => `Creating project ${projectName} in ${accountIdentifier}`,
2646
+ createdProject: (projectName, accountIdentifier) => `Created project ${projectName} in ${accountIdentifier}`,
2647
+ failedToCreateProject: 'Failed to create project in the target account.',
2648
+ },
2649
+ createInitialBuildForNewProject: {
2650
+ initialUploadMessage: 'HubSpot Local Dev Server Startup',
2651
+ projectLockedError: 'Your project is locked. This may mean that another user is running the `hs project watch` command for this project. If this is you, unlock the project in Projects UI.',
2652
+ genericError: `An error occurred while creating the initial build for this project. Run ${uiCommandReference('hs project upload')} to try again.`,
2653
+ },
2654
+ },
2655
+ account: {
2656
+ checkIfDefaultAccountIsSupported: {
2657
+ publicApp: `This project contains a public app. Local development of public apps is only supported on developer accounts and developer test accounts. Change your default account using ${uiCommandReference('hs accounts use')}, or link a new account with ${uiCommandReference('hs auth')}.`,
2658
+ privateApp: `This project contains a private app. Local development of private apps is not supported in developer accounts. Change your default account using ${uiCommandReference('hs accounts use')}, or link a new account with ${uiCommandReference('hs auth')}.`,
2659
+ },
2660
+ validateAccountOption: {
2661
+ invalidPublicAppAccount: `This project contains a public app. The "--account" flag must point to a developer test account to develop this project locally. Alternatively, change your default account to an App Developer Account using ${uiCommandReference('hs accounts use')} and run ${uiCommandReference('hs project dev')} to set up a new Developer Test Account.`,
2662
+ invalidPrivateAppAccount: `This project contains a private app. The account specified with the "--account" flag points to a developer account, which do not support the local development of private apps. Update the "--account" flag to point to a standard, sandbox, or developer test account, or change your default account by running ${uiCommandReference('hs accounts use')}.`,
2663
+ nonSandboxWarning: `Testing in a sandbox is strongly recommended. To switch the target account, select an option below or run ${uiCommandReference('hs accounts use')} before running the command again.`,
2664
+ publicAppNonDeveloperTestAccountWarning: `Local development of public apps is only supported in ${chalk.bold('developer test accounts')}.`,
2665
+ },
2666
+ checkIfParentAccountIsAuthed: {
2667
+ notAuthedError: (parentAccountId, accountIdentifier) => `To develop this project locally, run ${uiCommandReference(`hs auth --account=${parentAccountId}`)} to authenticate the App Developer Account ${parentAccountId} associated with ${accountIdentifier}.`,
2668
+ },
2669
+ selectAccountTypePrompt: {
2670
+ message: '[--testing-account] Choose the type of account to test on',
2671
+ developerTestAccountOption: 'Test on a developer test account (recommended)',
2672
+ sandboxAccountOption: 'Test on a sandbox account',
2673
+ sandboxAccountOptionDisabled: 'Disabled - requires access to sandbox accounts',
2674
+ productionAccountOption: (accountId) => `<${chalk.red('!')} Test on your project account: ${uiAccountDescription(accountId, false)} ${chalk.red('!')}>`,
2675
+ },
2676
+ confirmDefaultAccountIsTarget: {
2677
+ configError: `An error occurred while reading the default account from your config. Run ${uiCommandReference('hs auth')} to re-auth this account`,
2678
+ declineDefaultAccountExplanation: `To develop on a different account, run ${uiCommandReference('hs accounts use')} to change your default account, then re-run ${uiCommandReference('hs project dev')}.`,
2679
+ },
2379
2680
  },
2380
2681
  },
2381
2682
  middleware: {
2382
2683
  updateNotification: {
2383
- notifyTitle: chalk_1.default.bold('Update available'),
2384
- 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}')}`,
2385
- 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}'))}`,
2684
+ notifyTitle: chalk.bold('Update available'),
2685
+ cmsUpdateNotification: (packageName) => `${chalk.bold('The CMS CLI is now the HubSpot CLI')}\n\nTo upgrade, uninstall ${chalk.bold(packageName)}\nand then run ${uiCommandReference('{updateCommand}')}`,
2686
+ cliUpdateNotification: `HubSpot CLI version ${chalk.cyan(chalk.bold('{currentVersion}'))} is outdated.\nRun ${uiCommandReference('{updateCommand}')} to upgrade to version ${chalk.cyan(chalk.bold('{latestVersion}'))}`,
2386
2687
  },
2387
2688
  autoUpdateCLI: {
2388
- updateAvailable: (latestVersion) => `There's a new HubSpot CLI version available! Updating to version ${chalk_1.default.bold(latestVersion)}`,
2389
- updateSucceeded: (latestVersion) => `Successfully updated HubSpot CLI to version ${chalk_1.default.bold(latestVersion)}`,
2689
+ updateAvailable: (latestVersion) => `There's a new HubSpot CLI version available! Updating to version ${chalk.bold(latestVersion)}`,
2690
+ updateSucceeded: (latestVersion) => `Successfully updated HubSpot CLI to version ${chalk.bold(latestVersion)}`,
2390
2691
  notInstalledGlobally: 'Cannot auto-update the HubSpot CLI because NPM is not installed globally',
2391
- updateFailed: (latestVersion) => `Failed to update HubSpot CLI to version ${chalk_1.default.bold(latestVersion)}`,
2692
+ updateFailed: (latestVersion) => `Failed to update HubSpot CLI to version ${chalk.bold(latestVersion)}`,
2392
2693
  },
2393
2694
  },
2394
2695
  projectProfiles: {
2395
2696
  logs: {
2396
- usingProfile: (profileName) => `Using profile from ${chalk_1.default.bold(profileName)}`,
2397
- profileTargetAccount: (accountId) => `Targeting ${(0, ui_1.uiAccountDescription)(accountId)}`,
2697
+ usingProfile: (profileName) => `Using profile from ${chalk.bold(profileName)}`,
2698
+ profileTargetAccount: (accountId) => `Targeting ${uiAccountDescription(accountId)}`,
2398
2699
  profileVariables: 'Profile variables',
2399
2700
  },
2400
2701
  exitIfUsingProfiles: {
2401
2702
  errors: {
2402
- noProfileSpecified: `This project is configured to use profiles, but no profile was specified. Target a profile using the ${(0, ui_1.uiCommandReference)('--profile')} flag.`,
2703
+ noProfileSpecified: `This project is configured to use profiles, but no profile was specified. Target a profile using the ${uiCommandReference('--profile')} flag.`,
2403
2704
  },
2404
2705
  },
2405
2706
  loadProfile: {
2406
2707
  errors: {
2407
2708
  noProjectConfig: 'No project config found. Please run this command from a project directory.',
2408
- profileNotFound: (profileName) => `Profile ${chalk_1.default.bold(profileName)} not found.`,
2409
- missingAccountId: (profileName) => `Profile ${chalk_1.default.bold(profileName)} is missing an account id.`,
2410
- failedToLoadProfile: (profileName) => `Failed to load profile ${chalk_1.default.bold(profileName)}.`,
2709
+ profileNotFound: (profileName) => `Profile ${chalk.bold(profileName)} not found.`,
2710
+ missingAccountId: (profileName) => `Profile ${chalk.bold(profileName)} is missing an account id.`,
2711
+ failedToLoadProfile: (profileName) => `Failed to load profile ${chalk.bold(profileName)}.`,
2411
2712
  },
2412
2713
  },
2413
2714
  },
2414
2715
  projects: {
2415
2716
  create: {
2717
+ prompt: {
2718
+ marketPlaceDistribution: 'On the HubSpot marketplace',
2719
+ privateDistribution: 'Privately',
2720
+ distribution: '[--distribution] How would you like to distribute your application?',
2721
+ auth: '[--auth] What type of authentication would you like your application to use',
2722
+ staticAuth: 'Static Auth',
2723
+ oauth: 'OAuth',
2724
+ },
2416
2725
  errors: {
2417
2726
  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.',
2418
2727
  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.',
2419
- 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"].',
2728
+ 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"].',
2729
+ exceededMaxNumberOfApps: (max) => `This project currently has the maximum number of apps: ${max}`,
2730
+ unableToParseAppConfig: (file) => `Unable to parse app file: ${file}`,
2731
+ invalidAuthDistCombo: (authType, distribution) => `Invalid distribution and auth combination. Apps with distribution '${distribution}' must have auth '${authType}'`,
2420
2732
  },
2421
2733
  },
2734
+ add: {
2735
+ nothingAdded: 'No features added.',
2736
+ },
2737
+ updateHsMetaFilesWithAutoGeneratedFields: {
2738
+ header: 'Created the following components and features:',
2739
+ applicationLog: (componentType, uid, name) => ` - Created ${chalk.bold(componentType)} with uid ${chalk.bold(uid)} and name ${chalk.bold(name)}`,
2740
+ componentLog: (componentType, uid) => ` - Created ${chalk.bold(componentType)} feature with uid ${chalk.bold(uid)}`,
2741
+ },
2422
2742
  validateProjectConfig: {
2423
- configNotFound: `Unable to locate a project configuration file. Try running again from a project directory, or run ${(0, ui_1.uiCommandReference)('hs project create')} to create a new project.`,
2743
+ configNotFound: `Unable to locate a project configuration file. Try running again from a project directory, or run ${uiCommandReference('hs project create')} to create a new project.`,
2424
2744
  configMissingFields: 'The project configuration file is missing required fields.',
2425
- srcDirNotFound: (srcDir, projectDir) => `Project source directory ${chalk_1.default.bold(srcDir)} could not be found in ${chalk_1.default.bold(projectDir)}.`,
2426
- srcOutsideProjectDir: (projectConfig, srcDir) => `Invalid value for 'srcDir' in ${projectConfig}: ${chalk_1.default.bold(`srcDir: "${srcDir}"`)}\n\t'srcDir' must be a relative path to a folder under the project root, such as "." or "./src"`,
2745
+ srcDirNotFound: (srcDir, projectDir) => `Project source directory ${chalk.bold(srcDir)} could not be found in ${chalk.bold(projectDir)}.`,
2746
+ srcOutsideProjectDir: (projectConfig, srcDir) => `Invalid value for 'srcDir' in ${projectConfig}: ${chalk.bold(`srcDir: "${srcDir}"`)}\n\t'srcDir' must be a relative path to a folder under the project root, such as "." or "./src"`,
2427
2747
  },
2428
2748
  getProjectConfig: {
2429
2749
  error: 'Could not read from project config',
@@ -2431,15 +2751,15 @@ exports.lib = {
2431
2751
  ensureProjectExists: {
2432
2752
  createPrompt: (projectName, accountIdentifier) => `The project ${projectName} does not exist in ${accountIdentifier}. Would you like to create it?`,
2433
2753
  createPromptUpload: (projectName, accountIdentifier) => `[--forceCreate] The project ${projectName} does not exist in ${accountIdentifier}. Would you like to create it?`,
2434
- createSuccess: (projectName, accountIdentifier) => `New project ${chalk_1.default.bold(projectName)} successfully created in ${chalk_1.default.bold(accountIdentifier)}.`,
2435
- notFound: (projectName, accountIdentifier) => `Your project ${chalk_1.default.bold(projectName)} could not be found in ${chalk_1.default.bold(accountIdentifier)}.`,
2754
+ createSuccess: (projectName, accountIdentifier) => `New project ${chalk.bold(projectName)} successfully created in ${chalk.bold(accountIdentifier)}.`,
2755
+ notFound: (projectName, accountIdentifier) => `Your project ${chalk.bold(projectName)} could not be found in ${chalk.bold(accountIdentifier)}.`,
2436
2756
  },
2437
2757
  pollFetchProject: {
2438
2758
  checkingProject: (accountIdentifier) => `Checking if project exists in ${accountIdentifier}`,
2439
2759
  },
2440
2760
  logFeedbackMessage: {
2441
2761
  feedbackHeader: "We'd love to hear your feedback!",
2442
- feedbackMessage: `How are you liking the new projects and developer tools? \n > Run ${(0, ui_1.uiCommandReference)('hs feedback')} to let us know what you think!\n`,
2762
+ feedbackMessage: `How are you liking the new projects and developer tools? \n > Run ${uiCommandReference('hs feedback')} to let us know what you think!\n`,
2443
2763
  },
2444
2764
  },
2445
2765
  projectBuildAndDeploy: {
@@ -2453,38 +2773,50 @@ exports.lib = {
2453
2773
  },
2454
2774
  pollBuildAutodeployStatusError: (buildId) => `Error fetching autodeploy status for build #${buildId}`,
2455
2775
  pollProjectBuildAndDeploy: {
2456
- buildSucceededAutomaticallyDeploying: (buildId, accountIdentifier) => `Build #${buildId} succeeded. ${chalk_1.default.bold('Automatically deploying')} to ${accountIdentifier}\n`,
2776
+ buildSucceededAutomaticallyDeploying: (buildId, accountIdentifier) => `Build #${buildId} succeeded. ${chalk.bold('Automatically deploying')} to ${accountIdentifier}\n`,
2457
2777
  cleanedUpTempFile: (path) => `Cleaned up temporary file ${path}`,
2458
- viewDeploys: 'View all deploys for this project in HubSpot',
2459
- unableToFindAutodeployStatus: (buildId, viewDeploysLink) => `Unable to find the auto deploy for build #${buildId}. This deploy may have been skipped. ${viewDeploysLink}.`,
2778
+ viewDeploys: 'view all deploys for this project in HubSpot',
2779
+ 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 ${uiCommandReference('hs project deploy')} or ${viewDeploysLink}.`,
2460
2780
  },
2461
2781
  },
2462
2782
  projectUpload: {
2783
+ wrongPlatformVersionMetaFiles: `Detected components that require a minimum platform version of ${PLATFORM_VERSIONS.v2025_2}. You need to update your platform version in your ${PROJECT_CONFIG_FILE} and run ${uiCommandReference('hs project upload')}`,
2463
2784
  uploadProjectFiles: {
2464
- add: (projectName, accountIdentifier) => `Uploading ${chalk_1.default.bold(projectName)} project files to ${accountIdentifier}`,
2465
- fail: (projectName, accountIdentifier) => `Failed to upload ${chalk_1.default.bold(projectName)} project files to ${accountIdentifier}`,
2466
- succeed: (projectName, accountIdentifier) => `Uploaded ${chalk_1.default.bold(projectName)} project files to ${accountIdentifier}`,
2785
+ add: (projectName, accountIdentifier) => `Uploading ${chalk.bold(projectName)} project files to ${accountIdentifier}`,
2786
+ fail: (projectName, accountIdentifier) => `Failed to upload ${chalk.bold(projectName)} project files to ${accountIdentifier}`,
2787
+ succeed: (projectName, accountIdentifier) => `Uploaded ${chalk.bold(projectName)} project files to ${accountIdentifier}`,
2467
2788
  buildCreated: (projectName, buildId) => `Project "${projectName}" uploaded and build #${buildId} created`,
2468
2789
  },
2469
2790
  handleProjectUpload: {
2470
- 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.`,
2791
+ emptySource: (srcDir) => `Source directory "${srcDir}" is empty. Add files to your project and rerun ${uiCommandReference('hs project upload')} to upload them to HubSpot.`,
2471
2792
  compressed: (byteCount) => `Project files compressed: ${byteCount} bytes`,
2472
2793
  compressing: (path) => `Compressing build files to "${path}"`,
2473
2794
  fileFiltered: (filename) => `Ignore rule triggered for "${filename}"`,
2795
+ legacyFileDetected: (filename, platformVersion) => `The ${chalk.bold(filename)} file is not supported on platform version ${chalk.bold(platformVersion)} and will be ignored.`,
2474
2796
  },
2475
2797
  },
2476
2798
  boxen: {
2477
2799
  failedToLoad: 'Failed to load boxen util.',
2478
2800
  },
2801
+ importData: {
2802
+ errors: {
2803
+ incorrectAccountType: (derivedAccountId) => `The account ${uiAccountDescription(derivedAccountId)} is not a standard account, developer test account, or app developer account.`,
2804
+ failedToImportData: 'Failed to import data into portal.',
2805
+ notDeveloperTestAccount: 'The account is not a developer test account.',
2806
+ noAccountConfig: (accountId) => `No account config found for ${uiAccountDescription(accountId)}`,
2807
+ },
2808
+ inProgress: (portalId, fileNames) => `Importing data into ${uiAccountDescription(portalId)} from [${fileNames.join(', ')}]`,
2809
+ viewImportLink: (baseUrl, accountId, importId) => `Data import currently processing. You can view the status of your import ${uiLink('here', `${baseUrl}/import/${accountId}/post/${importId}`)}`,
2810
+ },
2479
2811
  ui: {
2480
- betaTag: chalk_1.default.bold('[BETA]'),
2812
+ betaTag: chalk.bold('[BETA]'),
2481
2813
  betaWarning: {
2482
- header: chalk_1.default.yellow('***************************** WARNING ****************************'),
2483
- footer: chalk_1.default.yellow('******************************************************************'),
2814
+ header: chalk.yellow('***************************** WARNING ****************************'),
2815
+ footer: chalk.yellow('******************************************************************'),
2484
2816
  },
2485
- infoTag: chalk_1.default.bold('[INFO]'),
2486
- deprecatedTag: chalk_1.default.bold('[DEPRECATED]'),
2487
- errorTag: chalk_1.default.bold('[ERROR]'),
2817
+ infoTag: chalk.bold('[INFO]'),
2818
+ deprecatedTag: chalk.bold('[DEPRECATED]'),
2819
+ errorTag: chalk.bold('[ERROR]'),
2488
2820
  deprecatedMessage: (command, url) => `The ${command} command is deprecated and will be disabled soon. ${url}`,
2489
2821
  deprecatedDescription: (message, command, url) => `${message}. The ${command} command is deprecated and will be disabled soon. ${url}`,
2490
2822
  deprecatedUrlText: 'Learn more.',
@@ -2499,27 +2831,27 @@ exports.lib = {
2499
2831
  },
2500
2832
  accountsListCommand: {
2501
2833
  command: 'hs accounts list',
2502
- message: (command) => `Run ${command} to see a list of configured HubSpot accounts`,
2834
+ message: (command) => `${command} - See a list of configured HubSpot accounts`,
2503
2835
  },
2504
2836
  accountsUseCommand: {
2505
2837
  command: 'hs accounts use',
2506
- message: (command) => `Run ${command} to set the Hubspot account that the CLI will target by default`,
2838
+ message: (command) => `${command} - Set the Hubspot account that the CLI will target by default`,
2507
2839
  },
2508
2840
  authCommand: {
2509
2841
  command: 'hs auth',
2510
- message: (command) => `Run ${command} to connect the CLI to additional HubSpot accounts`,
2842
+ message: (command) => `${command} - Connect the CLI to additional HubSpot accounts`,
2511
2843
  },
2512
2844
  feedbackCommand: {
2513
2845
  command: 'hs feedback',
2514
- message: (command) => `Run ${command} to report a bug or leave feedback`,
2846
+ message: (command) => `${command} - Report a bug or leave feedback`,
2515
2847
  },
2516
2848
  helpCommand: {
2517
2849
  command: 'hs help',
2518
- message: (command) => `Run ${command} to see a list of available commands`,
2850
+ message: (command) => `${command} - See a list of available commands`,
2519
2851
  },
2520
2852
  projectCreateCommand: {
2521
2853
  command: 'hs project create',
2522
- message: (command) => `Run ${command} to create a new project`,
2854
+ message: (command) => `${command} - Create a new project`,
2523
2855
  },
2524
2856
  projectDeployCommand: {
2525
2857
  command: 'hs project deploy',
@@ -2527,19 +2859,19 @@ exports.lib = {
2527
2859
  },
2528
2860
  projectHelpCommand: {
2529
2861
  command: 'hs project --help',
2530
- message: (command) => `Run ${command} to learn more about available project commands`,
2862
+ message: (command) => `${command} - Learn more about available project commands`,
2531
2863
  },
2532
2864
  projectUploadCommand: {
2533
2865
  command: 'hs project upload',
2534
- message: (command) => `Run ${command} to upload your project to HubSpot and trigger builds`,
2866
+ message: (command) => `${command} - Upload your project to HubSpot and trigger builds`,
2535
2867
  },
2536
2868
  projectDevCommand: {
2537
2869
  command: 'hs project dev',
2538
- message: (command) => `Run ${command} to set up your test environment and start local development`,
2870
+ message: (command) => `${command} - Set up a test environment and start local development`,
2539
2871
  },
2540
2872
  projectInstallDepsCommand: {
2541
2873
  command: 'hs project install-deps',
2542
- message: (command) => `Run ${command} to install dependencies for your project components`,
2874
+ message: (command) => `${command} - Install all project dependencies`,
2543
2875
  },
2544
2876
  sampleProjects: {
2545
2877
  linkText: "HubSpot's sample projects",
@@ -2563,6 +2895,12 @@ exports.lib = {
2563
2895
  noLogsFound: 'No logs found.',
2564
2896
  },
2565
2897
  },
2898
+ buildAccount: {
2899
+ createDeveloperTestAccountV3: {
2900
+ syncFailure: 'Failed to sync developer test account',
2901
+ pakFailure: 'Failed to generate personal access key for developer test account',
2902
+ },
2903
+ },
2566
2904
  configOptions: {
2567
2905
  enableOrDisableBooleanFieldPrompt: {
2568
2906
  message: (fieldName) => `Choose to enable or disable ${fieldName}`,
@@ -2573,72 +2911,118 @@ exports.lib = {
2573
2911
  },
2574
2912
  setAllowUsageTracking: {
2575
2913
  fieldName: 'usage tracking',
2576
- success: (isEnabled) => `Allow usage tracking set to: "${isEnabled}"`,
2914
+ success: (isEnabled) => `Successfully updated ${chalk.bold('allow usage tracking')} to ${chalk.bold(isEnabled)}`,
2577
2915
  },
2578
2916
  setAllowAutoUpdates: {
2579
2917
  fieldName: 'auto updates',
2580
- success: (isEnabled) => `Allow auto updates set to: "${isEnabled}"`,
2918
+ success: (isEnabled) => `Successfully updated ${chalk.bold('allow auto updates')} to ${chalk.bold(isEnabled)}`,
2581
2919
  },
2582
2920
  setDefaultCmsPublishMode: {
2583
2921
  promptMessage: 'Select CMS publish mode to be used as the default',
2584
2922
  error: (validModes) => `The provided CMS publish mode is invalid. Valid values are ${validModes}.`,
2585
- success: (mode) => `Default mode updated to: ${mode}`,
2923
+ success: (mode) => `Successfully updated ${chalk.bold('default CMS publish mode')} to ${chalk.bold(mode)}`,
2586
2924
  },
2587
2925
  setHttpTimeout: {
2588
2926
  promptMessage: 'Enter http timeout duration',
2589
- success: (timeout) => `HTTP timeout set to: ${timeout}`,
2927
+ success: (timeout) => `Successfully updated ${chalk.bold('HTTP timeout')} to ${chalk.bold(timeout)}`,
2928
+ error: (timeout) => `Invalid HTTP timeout value "${timeout}". Must be a number greater than 3000.`,
2929
+ },
2930
+ setAutoOpenBrowser: {
2931
+ fieldName: 'auto open browser',
2932
+ enabled: `Successfully updated ${chalk.bold('auto open browser')} to ${chalk.bold('enabled')}`,
2933
+ disabled: `Successfully updated ${chalk.bold('auto open browser')} to ${chalk.bold('disabled')}`,
2590
2934
  },
2591
2935
  },
2592
2936
  commonOpts: {
2593
2937
  options: {
2594
- account: {
2595
- describe: 'HubSpot account id or name from config',
2596
- },
2597
- config: {
2598
- describe: 'Path to a config file',
2599
- },
2600
- overwrite: {
2601
- describe: 'Overwrite existing files',
2602
- },
2938
+ account: 'HubSpot account id or name from config',
2939
+ config: 'Path to a config file',
2940
+ overwrite: 'Overwrite existing files',
2603
2941
  modes: {
2604
- describe: {
2605
- default: (modes) => `${modes}`,
2606
- read: (modes) => `Read from ${modes}`,
2607
- write: (modes) => `Write to ${modes}`,
2608
- },
2609
- },
2610
- qa: {
2611
- describe: 'Run command in QA mode',
2612
- },
2613
- useEnv: {
2614
- describe: 'Use environment variable config',
2615
- },
2616
- debug: {
2617
- describe: 'Set log level to debug',
2942
+ default: (modes) => `${modes}`,
2943
+ read: (modes) => `Read from ${modes}`,
2944
+ write: (modes) => `Write to ${modes}`,
2618
2945
  },
2946
+ qa: 'Run command in QA mode',
2947
+ useEnv: 'Use environment variable config',
2948
+ jsonOutput: 'Format output as JSON',
2949
+ debug: 'Set log level to debug',
2950
+ },
2951
+ },
2952
+ configMigrate: {
2953
+ deprecatedConfigWarning: (deprecatedConfigPath) => `This command applies to global configuration, but we detected a deprecated config at ${deprecatedConfigPath}.`,
2954
+ handleMigration: {
2955
+ 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.`,
2956
+ confirmPrompt: 'Migrate the deprecated config to the global location?',
2957
+ success: 'Your deprecated config file has been successfully migrated.',
2958
+ },
2959
+ handleMergeConfigProperties: {
2960
+ mergeConflictMessage: (count, propertyList) => `Conflict${count > 1 ? 's' : ''} detected for ${chalk.bold(propertyList)}.`,
2961
+ mergeConfigConflictPrompt: (property, newValue, oldValue) => `Change ${property} from ${newValue} to ${oldValue}?`,
2962
+ },
2963
+ handleMerge: {
2964
+ 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.`,
2965
+ confirmPrompt: 'Merge the deprecated config into your global config?',
2966
+ skippedExistingAccounts: (accountIds) => `The following accounts were not merged because they already exist in the global config:${accountIds.map(id => `\n- ${uiAccountDescription(Number(id))}`).join('')}`,
2967
+ success: 'Your deprecated config file has been successfully merged with the global config file.',
2619
2968
  },
2620
2969
  },
2621
2970
  prompts: {
2971
+ importDataFilePathPrompt: {
2972
+ promptContext: `To view the JSON schema for data imports, visit ${uiLink('the docs', 'https://developers.hubspot.com/docs/guides/api/crm/imports')}`,
2973
+ promptMessage: '[--file-path] Select the JSON file that will be used to import your data.',
2974
+ },
2975
+ confirmImportDataPrompt: {
2976
+ message: (dataFileNames, cliAccount) => `You are importing [${dataFileNames.join(', ')}] into ${uiAccountDescription(getAccountIdentifier(cliAccount))}. Continue?`,
2977
+ },
2978
+ importDataTestAccountSelectPrompt: {
2979
+ errors: {
2980
+ noAccountsFound: 'No accounts found.',
2981
+ noChildTestAccountsFound: (parentAccountId) => `No developer test accounts found under the parent account ${uiAccountDescription(parentAccountId)}`,
2982
+ },
2983
+ },
2622
2984
  projectDevTargetAccountPrompt: {
2623
2985
  createNewSandboxOption: '<Test on a new development sandbox>',
2624
2986
  createNewDeveloperTestAccountOption: '<Test on a new developer test account>',
2625
- chooseDefaultAccountOption: () => `<${chalk_1.default.bold('❗')} Test on this production account ${chalk_1.default.bold('❗')}>`,
2987
+ chooseDefaultAccountOption: () => `<${chalk.bold('❗')} Test on this production account ${chalk.bold('❗')}>`,
2626
2988
  promptMessage: (accountType, accountIdentifier) => `[--account] Choose a ${accountType} under ${accountIdentifier} to test with:`,
2627
2989
  sandboxLimit: (limit) => `Your account reached the limit of ${limit} development sandboxes`,
2628
2990
  sandboxLimitWithSuggestion: (limit, authCommand) => `Your account reached the limit of ${limit} development sandboxes. Run ${authCommand} to add an existing one to the config.`,
2629
2991
  developerTestAccountLimit: (limit) => `Your account reached the limit of ${limit} developer test accounts.`,
2630
- confirmDefaultAccount: (accountName, accountType) => `Continue testing on ${chalk_1.default.bold(`${accountName} (${accountType})`)}? (Y/n)`,
2992
+ confirmDefaultAccount: (accountName, accountType) => `Continue testing on ${chalk.bold(`${accountName} (${accountType})`)}? (Y/n)`,
2631
2993
  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.`,
2632
2994
  noAccountId: 'No account ID found for the selected account. Please try again.',
2633
2995
  },
2634
2996
  projectLogsPrompt: {
2635
- functionName: (projectName) => `[--function] Select function in ${chalk_1.default.bold(projectName)} project`,
2997
+ functionName: (projectName) => `[--function] Select function in ${chalk.bold(projectName)} project`,
2636
2998
  },
2637
2999
  setAsDefaultAccountPrompt: {
2638
3000
  setAsDefaultAccountMessage: 'Set this account as the default?',
2639
3001
  setAsDefaultAccount: (accountName) => `Account "${accountName}" set as the default account`,
2640
3002
  keepingCurrentDefault: (accountName) => `Account "${accountName}" will continue to be the default account`,
2641
3003
  },
3004
+ createDeveloperTestAccountConfigPrompt: {
3005
+ namePrompt: (withFlag = true) => `${withFlag ? '[--name] ' : ''}Enter the name of the Test Account:`,
3006
+ descriptionPrompt: (withFlag = true) => `${withFlag ? '[--description] ' : ''}Enter the description of the Test Account:`,
3007
+ useDefaultAccountLevelsPrompt: {
3008
+ message: 'Would you like to create a default Test Account, or customize your own?',
3009
+ default: 'Default (All Hubs, ENTERPRISE)',
3010
+ manual: 'Customize my own',
3011
+ },
3012
+ tiersPrompt: 'Select an option per hub to customize tiers. If left blank, default is ENTERPRISE',
3013
+ hubTypes: {
3014
+ marketing: 'Marketing',
3015
+ ops: 'Ops',
3016
+ service: 'Service',
3017
+ sales: 'Sales',
3018
+ content: 'Content',
3019
+ },
3020
+ errors: {
3021
+ allHubsRequired: 'Select a tier for each hub',
3022
+ tiersError: 'Cannot have more than one tier per hub',
3023
+ nameRequired: 'The name may not be blank. Please add a name for the Test Account.',
3024
+ },
3025
+ },
2642
3026
  accountNamePrompt: {
2643
3027
  enterAccountName: 'Enter a unique name to reference this account in the CLI:',
2644
3028
  enterDeveloperTestAccountName: 'Name your developer test account:',
@@ -2657,11 +3041,14 @@ exports.lib = {
2657
3041
  enterAccountId: 'Enter the account ID for your account (the number under the DOMAIN column at https://app.hubspot.com/myaccounts-beta ): ',
2658
3042
  enterClientId: 'Enter your OAuth2 client ID: ',
2659
3043
  enterClientSecret: 'Enter your OAuth2 client secret: ',
2660
- enterPersonalAccessKey: 'Enter your personal access key: ',
3044
+ enterPersonalAccessKey: '[--personal-access-key] Enter your personal access key: ',
2661
3045
  selectScopes: 'Select access scopes (see https://developers.hubspot.com/docs/methods/oauth2/initiate-oauth-integration#scopes)',
2662
3046
  personalAccessKeySetupTitle: 'HubSpot Personal Access Key Setup',
2663
- 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.",
2664
- personalAccessKeyBrowserOpenPrompt: 'Open HubSpot to copy your personal access key?',
3047
+ personalAccessKeyBrowserOpenPrep: 'A personal access key is required to authenticate the CLI to interact with your HubSpot account.',
3048
+ personalAccessKeyPromptChoices: {
3049
+ OPEN_BROWSER: 'Open HubSpot to copy your personal access key',
3050
+ PASTE_EXISTING: 'Enter existing personal access key',
3051
+ },
2665
3052
  logs: {
2666
3053
  openingWebBrowser: (url) => `Opening ${url} in your web browser`,
2667
3054
  },
@@ -2710,15 +3097,20 @@ exports.lib = {
2710
3097
  languageRequired: "Please select API sample app's language",
2711
3098
  },
2712
3099
  },
2713
- createProjectPrompt: {
3100
+ projectNameAndDestPrompt: {
2714
3101
  enterName: '[--name] Give your project a name: ',
2715
3102
  enterDest: '[--dest] Enter the folder to create the project in:',
2716
- selectTemplate: '[--template] Choose a project template: ',
2717
3103
  errors: {
2718
3104
  nameRequired: 'A project name is required',
2719
3105
  destRequired: 'A project dest is required',
2720
3106
  invalidDest: 'There is an existing project at this destination. Please provide a new path for this project.',
2721
3107
  invalidCharacters: 'The selected destination contains invalid characters. Please provide a new path and try again.',
3108
+ },
3109
+ },
3110
+ selectProjectTemplatePrompt: {
3111
+ selectTemplate: '[--template] Choose a project template: ',
3112
+ features: '[--features] Which features would you like your app to include?',
3113
+ errors: {
2722
3114
  invalidTemplate: (template) => `[--template] Could not find template "${template}". Please choose an available template:`,
2723
3115
  projectTemplateRequired: 'Project template is required when projectTemplates is provided',
2724
3116
  },
@@ -2735,10 +3127,10 @@ exports.lib = {
2735
3127
  selectAppIdClone: (accountName) => `[--appId] Choose an app under ${accountName} to clone:`,
2736
3128
  errors: {
2737
3129
  noAccountId: 'An account ID is required to select an app.',
2738
- noAppsMigration: () => `${chalk_1.default.bold('No apps to migrate')}`,
2739
- noAppsClone: () => `${chalk_1.default.bold('No apps to clone')}`,
2740
- noAppsMigrationMessage: (accountName) => `The selected developer account ${chalk_1.default.bold(accountName)} doesn't have any apps that can be migrated to the projects framework.`,
2741
- noAppsCloneMessage: (accountName) => `The selected developer account ${chalk_1.default.bold(accountName)} doesn't have any apps that can be cloned to the projects framework.`,
3130
+ noAppsMigration: () => `${chalk.bold('No apps to migrate')}`,
3131
+ noAppsClone: () => `${chalk.bold('No apps to clone')}`,
3132
+ noAppsMigrationMessage: (accountName) => `The selected developer account ${chalk.bold(accountName)} doesn't have any apps that can be migrated to the projects framework.`,
3133
+ noAppsCloneMessage: (accountName) => `The selected developer account ${chalk.bold(accountName)} doesn't have any apps that can be cloned to the projects framework.`,
2742
3134
  errorFetchingApps: 'There was an error fetching public apps.',
2743
3135
  cannotBeMigrated: 'Cannot be migrated',
2744
3136
  },
@@ -2751,11 +3143,14 @@ exports.lib = {
2751
3143
  },
2752
3144
  },
2753
3145
  projectAddPrompt: {
2754
- selectType: '[--type] Select a component to add: ',
3146
+ selectType: '[--type] Select an app feature to add: ',
3147
+ selectFeatures: '[--features] Select an app feature to add: ',
2755
3148
  enterName: '[--name] Give your component a name: ',
2756
3149
  errors: {
2757
3150
  nameRequired: 'A component name is required',
3151
+ componentRequired: 'Must select a feature to add',
2758
3152
  invalidType: (type) => `[--type] Could not find type "${type}". Please choose an available type:`,
3153
+ cannotAddFeature: (feature, reasons) => `Cannot Add feature '${feature}' to project for the following reasons: ${reasons}`,
2759
3154
  },
2760
3155
  },
2761
3156
  secretPrompt: {
@@ -2789,7 +3184,7 @@ exports.lib = {
2789
3184
  enterName: '[--project] Enter project name:',
2790
3185
  errors: {
2791
3186
  invalidName: 'You entered an invalid name. Please try again.',
2792
- projectDoesNotExist: (projectName, accountIdentifier) => `Project ${chalk_1.default.bold(projectName)} could not be found in "${accountIdentifier}"`,
3187
+ projectDoesNotExist: (projectName, accountIdentifier) => `Project ${chalk.bold(projectName)} could not be found in "${accountIdentifier}"`,
2793
3188
  },
2794
3189
  },
2795
3190
  previewPrompt: {
@@ -2802,11 +3197,13 @@ exports.lib = {
2802
3197
  },
2803
3198
  },
2804
3199
  installAppPrompt: {
2805
- explanation: 'Local development requires this app to be installed in the target test account',
3200
+ explanation: 'Local development requires this app to be installed in the target test account.',
2806
3201
  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.",
3202
+ staticAuthExplanation: (projectAccountId, testingAccountId, projectName, appUid) => `To install this static auth app, your testing account ${uiAccountDescription(testingAccountId)} must be on ${uiLink("this app's allowlist", getAppAllowlistUrl(projectAccountId, projectName, appUid))}.`,
2807
3203
  prompt: 'Open HubSpot to install this app?',
3204
+ autoPrompt: 'Install this app in your target test account?',
2808
3205
  reinstallPrompt: 'Open HubSpot to reinstall this app?',
2809
- 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`')}`,
3206
+ decline: `To continue local development of this app, install it in your target test account and re-run ${chalk.bold('`hs project dev`')}`,
2810
3207
  },
2811
3208
  selectHubDBTablePrompt: {
2812
3209
  selectTable: 'Select a HubDB table:',
@@ -2820,6 +3217,9 @@ exports.lib = {
2820
3217
  },
2821
3218
  },
2822
3219
  },
3220
+ polling: {
3221
+ timeoutError: (timeoutMs) => `Polling timed out after ${timeoutMs}ms.`,
3222
+ },
2823
3223
  convertFields: {
2824
3224
  positionals: {
2825
3225
  src: {
@@ -2835,20 +3235,20 @@ exports.lib = {
2835
3235
  developerTestAccount: {
2836
3236
  create: {
2837
3237
  loading: {
2838
- add: (accountName) => `Creating developer test account ${chalk_1.default.bold(accountName)}`,
2839
- fail: (accountName) => `Failed to create a developer test account ${chalk_1.default.bold(accountName)}.`,
2840
- succeed: (accountName, accountId) => `Successfully created a developer test account ${chalk_1.default.bold(accountName)} with portalId ${chalk_1.default.bold(accountId)}.`,
3238
+ add: (accountName) => `Creating developer test account ${chalk.bold(accountName)}`,
3239
+ fail: (accountName) => `Failed to create a developer test account ${chalk.bold(accountName)}.`,
3240
+ succeed: (accountName, accountId) => `Successfully created a developer test account ${chalk.bold(accountName)} with portalId ${chalk.bold(accountId)}.`,
2841
3241
  },
2842
3242
  success: {
2843
3243
  configFileUpdated: (accountName, authType) => `Account "${accountName}" updated using "${authType}"`,
2844
3244
  },
2845
3245
  failure: {
2846
- invalidUser: (accountName, parentAccountName) => `Couldn't create ${chalk_1.default.bold(accountName)} because your account has been removed from ${chalk_1.default.bold(parentAccountName)} or your permission set doesn't allow you to create the sandbox. To update your permissions, contact a super admin in ${chalk_1.default.bold(parentAccountName)}.`,
2847
- limit: (accountName, limit) => `${chalk_1.default.bold(accountName)} reached the limit of ${limit} developer test accounts. \n- To connect a developer test account to your HubSpot CLI, run ${chalk_1.default.bold('hs auth')} and follow the prompts.`,
2848
- alreadyInConfig: (accountName, limit) => `${chalk_1.default.bold(accountName)} reached the limit of ${limit} developer test accounts. \n- To use an existing developer test account, run ${chalk_1.default.bold('hs accounts use')}.`,
3246
+ invalidUser: (accountName, parentAccountName) => `Couldn't create ${chalk.bold(accountName)} because your account has been removed from ${chalk.bold(parentAccountName)} or your permission set doesn't allow you to create the sandbox. To update your permissions, contact a super admin in ${chalk.bold(parentAccountName)}.`,
3247
+ limit: (accountName, limit) => `${chalk.bold(accountName)} reached the limit of ${limit} developer test accounts. \n- To connect a developer test account to your HubSpot CLI, run ${chalk.bold('hs auth')} and follow the prompts.`,
3248
+ alreadyInConfig: (accountName, limit) => `${chalk.bold(accountName)} reached the limit of ${limit} developer test accounts. \n- To use an existing developer test account, run ${chalk.bold('hs accounts use')}.`,
2849
3249
  scopes: {
2850
3250
  message: "The personal access key you provided doesn't include developer test account permissions.",
2851
- instructions: (accountName, url) => `To update CLI permissions for "${accountName}": \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes developer test account permissions. \n- Update the CLI config for this account by running ${chalk_1.default.bold('hs auth')} and entering the new key.\n`,
3251
+ instructions: (accountName, url) => `To update CLI permissions for "${accountName}": \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes developer test account permissions. \n- Update the CLI config for this account by running ${chalk.bold('hs auth')} and entering the new key.\n`,
2852
3252
  },
2853
3253
  },
2854
3254
  },
@@ -2857,58 +3257,58 @@ exports.lib = {
2857
3257
  create: {
2858
3258
  developer: {
2859
3259
  loading: {
2860
- add: (accountName) => `Creating developer sandbox ${chalk_1.default.bold(accountName)}`,
2861
- fail: (accountName) => `Failed to create a developer sandbox ${chalk_1.default.bold(accountName)}.`,
2862
- succeed: (accountName, accountId) => `Successfully created a developer sandbox ${chalk_1.default.bold(accountName)} with portalId ${chalk_1.default.bold(accountId)}.`,
3260
+ add: (accountName) => `Creating developer sandbox ${chalk.bold(accountName)}`,
3261
+ fail: (accountName) => `Failed to create a developer sandbox ${chalk.bold(accountName)}.`,
3262
+ succeed: (accountName, accountId) => `Successfully created a developer sandbox ${chalk.bold(accountName)} with portalId ${chalk.bold(accountId)}.`,
2863
3263
  },
2864
3264
  success: {
2865
3265
  configFileUpdated: (accountName, authType) => `Account "${accountName}" updated using "${authType}"`,
2866
3266
  },
2867
3267
  failure: {
2868
- invalidUser: (accountName, parentAccountName) => `Couldn't create ${chalk_1.default.bold(accountName)} because your account has been removed from ${chalk_1.default.bold(parentAccountName)} or your permission set doesn't allow you to create the sandbox. To update your permissions, contact a super admin in ${chalk_1.default.bold(parentAccountName)}.`,
2869
- limit: (accountName, limit) => `${chalk_1.default.bold(accountName)} reached the limit of ${limit} developer sandboxes. \n- To connect a developer sandbox to your HubSpot CLI, run ${chalk_1.default.bold('hs auth')} and follow the prompts.`,
2870
- alreadyInConfig: (accountName, limit) => `${chalk_1.default.bold(accountName)} reached the limit of ${limit} developer sandboxes. \n- To use an existing developer sandbox, run ${chalk_1.default.bold('hs accounts use')}.`,
3268
+ invalidUser: (accountName, parentAccountName) => `Couldn't create ${chalk.bold(accountName)} because your account has been removed from ${chalk.bold(parentAccountName)} or your permission set doesn't allow you to create the sandbox. To update your permissions, contact a super admin in ${chalk.bold(parentAccountName)}.`,
3269
+ limit: (accountName, limit) => `${chalk.bold(accountName)} reached the limit of ${limit} developer sandboxes. \n- To connect a developer sandbox to your HubSpot CLI, run ${chalk.bold('hs auth')} and follow the prompts.`,
3270
+ alreadyInConfig: (accountName, limit) => `${chalk.bold(accountName)} reached the limit of ${limit} developer sandboxes. \n- To use an existing developer sandbox, run ${chalk.bold('hs accounts use')}.`,
2871
3271
  scopes: {
2872
3272
  message: "The personal access key you provided doesn't include developer sandbox permissions.",
2873
- instructions: (accountName, url) => `To update CLI permissions for "${accountName}": \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes developer sandbox permissions. \n- Update the CLI config for this account by running ${chalk_1.default.bold('hs auth')} and entering the new key.\n`,
3273
+ instructions: (accountName, url) => `To update CLI permissions for "${accountName}": \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes developer sandbox permissions. \n- Update the CLI config for this account by running ${chalk.bold('hs auth')} and entering the new key.\n`,
2874
3274
  },
2875
3275
  generic: 'An error occurred while creating a developer sandbox',
2876
3276
  },
2877
3277
  },
2878
3278
  standard: {
2879
3279
  loading: {
2880
- add: (accountName) => `Creating standard sandbox ${chalk_1.default.bold(accountName)}`,
2881
- fail: (accountName) => `Failed to create a standard sandbox ${chalk_1.default.bold(accountName)}.`,
2882
- succeed: (accountName, accountId) => `Successfully created a standard sandbox ${chalk_1.default.bold(accountName)} with portalId ${chalk_1.default.bold(accountId)}.`,
3280
+ add: (accountName) => `Creating standard sandbox ${chalk.bold(accountName)}`,
3281
+ fail: (accountName) => `Failed to create a standard sandbox ${chalk.bold(accountName)}.`,
3282
+ succeed: (accountName, accountId) => `Successfully created a standard sandbox ${chalk.bold(accountName)} with portalId ${chalk.bold(accountId)}.`,
2883
3283
  },
2884
3284
  success: {
2885
3285
  configFileUpdated: (accountName, authType) => `Account "${accountName}" updated using "${authType}"`,
2886
3286
  },
2887
3287
  failure: {
2888
- invalidUser: (accountName, parentAccountName) => `Couldn't create ${chalk_1.default.bold(accountName)} because your account has been removed from ${chalk_1.default.bold(parentAccountName)} or your permission set doesn't allow you to create the sandbox. To update your permissions, contact a super admin in ${chalk_1.default.bold(parentAccountName)}.`,
2889
- limit: (accountName, limit) => `${chalk_1.default.bold(accountName)} reached the limit of ${limit} standard sandboxes. \n- To connect a standard sandbox to your HubSpot CLI, run ${chalk_1.default.bold('hs auth')} and follow the prompts.`,
2890
- alreadyInConfig: (accountName, limit) => `${chalk_1.default.bold(accountName)} reached the limit of ${limit} standard sandboxes. \n- To use an existing standard sandbox, run ${chalk_1.default.bold('hs accounts use')}.`,
3288
+ invalidUser: (accountName, parentAccountName) => `Couldn't create ${chalk.bold(accountName)} because your account has been removed from ${chalk.bold(parentAccountName)} or your permission set doesn't allow you to create the sandbox. To update your permissions, contact a super admin in ${chalk.bold(parentAccountName)}.`,
3289
+ limit: (accountName, limit) => `${chalk.bold(accountName)} reached the limit of ${limit} standard sandboxes. \n- To connect a standard sandbox to your HubSpot CLI, run ${chalk.bold('hs auth')} and follow the prompts.`,
3290
+ alreadyInConfig: (accountName, limit) => `${chalk.bold(accountName)} reached the limit of ${limit} standard sandboxes. \n- To use an existing standard sandbox, run ${chalk.bold('hs accounts use')}.`,
2891
3291
  scopes: {
2892
3292
  message: "The personal access key you provided doesn't include standard sandbox permissions.",
2893
- instructions: (accountName, url) => `To update CLI permissions for "${accountName}": \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes standard sandbox permissions. \n- Update the CLI config for this account by running ${chalk_1.default.bold('hs auth')} and entering the new key.\n`,
3293
+ instructions: (accountName, url) => `To update CLI permissions for "${accountName}": \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes standard sandbox permissions. \n- Update the CLI config for this account by running ${chalk.bold('hs auth')} and entering the new key.\n`,
2894
3294
  },
2895
3295
  },
2896
3296
  },
2897
3297
  },
2898
3298
  sync: {
2899
3299
  loading: {
2900
- add: (accountName) => `Syncing sandbox ${chalk_1.default.bold(accountName)}`,
2901
- fail: (accountName) => `Failed to sync sandbox ${chalk_1.default.bold(accountName)}.`,
2902
- succeed: (accountName) => `Successfully synced sandbox ${chalk_1.default.bold(accountName)}.`,
3300
+ add: (accountName) => `Syncing sandbox ${chalk.bold(accountName)}`,
3301
+ fail: (accountName) => `Failed to sync sandbox ${chalk.bold(accountName)}.`,
3302
+ succeed: (accountName) => `Successfully synced sandbox ${chalk.bold(accountName)}.`,
2903
3303
  },
2904
3304
  success: {
2905
3305
  configFileUpdated: (accountName, authType) => `Account "${accountName}" updated using "${authType}"`,
2906
3306
  },
2907
3307
  failure: {
2908
- invalidUser: (accountName, parentAccountName) => `Couldn't sync ${chalk_1.default.bold(accountName)} because your account has been removed from ${chalk_1.default.bold(parentAccountName)} or your permission set doesn't allow you to sync the sandbox. To update your permissions, contact a super admin in ${chalk_1.default.bold(parentAccountName)}.`,
3308
+ invalidUser: (accountName, parentAccountName) => `Couldn't sync ${chalk.bold(accountName)} because your account has been removed from ${chalk.bold(parentAccountName)} or your permission set doesn't allow you to sync the sandbox. To update your permissions, contact a super admin in ${chalk.bold(parentAccountName)}.`,
2909
3309
  scopes: {
2910
3310
  message: "The personal access key you provided doesn't include sandbox sync permissions.",
2911
- instructions: (accountName, url) => `To update CLI permissions for "${accountName}": \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes sandbox sync permissions. \n- Update the CLI config for this account by running ${chalk_1.default.bold('hs auth')} and entering the new key.\n`,
3311
+ instructions: (accountName, url) => `To update CLI permissions for "${accountName}": \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes sandbox sync permissions. \n- Update the CLI config for this account by running ${chalk.bold('hs auth')} and entering the new key.\n`,
2912
3312
  },
2913
3313
  },
2914
3314
  },
@@ -2923,9 +3323,9 @@ exports.lib = {
2923
3323
  suppressErrors: {
2924
3324
  platformVersionErrors: {
2925
3325
  header: 'Platform version update required',
2926
- unspecifiedPlatformVersion: (platformVersion) => `Projects with an ${chalk_1.default.bold(platformVersion)} are no longer supported.`,
2927
- platformVersionRetired: (platformVersion) => `Projects with ${chalk_1.default.bold(`platformVersion ${platformVersion}`)} are no longer supported.`,
2928
- nonExistentPlatformVersion: (platformVersion) => `Projects with ${chalk_1.default.bold(`platformVersion ${platformVersion}`)} are not supported.`,
3326
+ unspecifiedPlatformVersion: (platformVersion) => `Projects with an ${chalk.bold(platformVersion)} are no longer supported.`,
3327
+ platformVersionRetired: (platformVersion) => `Projects with ${chalk.bold(`platformVersion ${platformVersion}`)} are no longer supported.`,
3328
+ nonExistentPlatformVersion: (platformVersion) => `Projects with ${chalk.bold(`platformVersion ${platformVersion}`)} are not supported.`,
2929
3329
  updateProject: 'Please update your project to the latest version and try again.',
2930
3330
  docsLink: 'Projects platform versioning (BETA)',
2931
3331
  betaLink: (docsLink) => `For more info, see ${docsLink}.`,
@@ -2977,13 +3377,13 @@ exports.lib = {
2977
3377
  unableToDetermineSecondaryLink: 'npm HubSpot CLI version history',
2978
3378
  },
2979
3379
  projectDependenciesChecks: {
2980
- missingDependencies: (dir) => `missing dependencies in ${chalk_1.default.bold(dir)}`,
3380
+ missingDependencies: (dir) => `missing dependencies in ${chalk.bold(dir)}`,
2981
3381
  missingDependenciesSecondary: (command) => `Run ${command} to install all project dependencies locally`,
2982
3382
  unableToDetermine: (dir) => `Unable to determine if dependencies are installed ${dir}`,
2983
3383
  success: 'App dependencies are installed and up to date',
2984
3384
  },
2985
3385
  files: {
2986
- invalidJson: (filename) => `invalid JSON in ${chalk_1.default.bold(filename)}`,
3386
+ invalidJson: (filename) => `invalid JSON in ${chalk.bold(filename)}`,
2987
3387
  validJson: 'JSON files valid',
2988
3388
  },
2989
3389
  port: {
@@ -2997,19 +3397,19 @@ exports.lib = {
2997
3397
  },
2998
3398
  cliConfig: {
2999
3399
  header: 'CLI configuration',
3000
- configFileSubHeader: (filename) => `Config File: ${chalk_1.default.bold(filename)}`,
3400
+ configFileSubHeader: (filename) => `Config File: ${chalk.bold(filename)}`,
3001
3401
  defaultAccountSubHeader: (accountDetails) => `Default Account: ${accountDetails}`,
3002
3402
  noConfigFile: 'CLI configuration not found',
3003
3403
  noConfigFileSecondary: (command) => `Run ${command} and follow the prompts to create your CLI configuration file and connect it to your HubSpot account`,
3004
3404
  },
3005
3405
  projectConfig: {
3006
3406
  header: 'Project configuration',
3007
- projectDirSubHeader: (projectDir) => `Project dir: ${chalk_1.default.bold(projectDir)}`,
3008
- projectNameSubHeader: (projectName) => `Project name: ${chalk_1.default.bold(projectName)}`,
3407
+ projectDirSubHeader: (projectDir) => `Project dir: ${chalk.bold(projectDir)}`,
3408
+ projectNameSubHeader: (projectName) => `Project name: ${chalk.bold(projectName)}`,
3009
3409
  },
3010
3410
  counts: {
3011
- errors: (count) => `${chalk_1.default.bold('Errors:')} ${count}`,
3012
- warnings: (count) => `${chalk_1.default.bold('Warning:')} ${count}`,
3411
+ errors: (count) => `${chalk.bold('Errors:')} ${count}`,
3412
+ warnings: (count) => `${chalk.bold('Warning:')} ${count}`,
3013
3413
  },
3014
3414
  },
3015
3415
  },
@@ -3020,25 +3420,35 @@ exports.lib = {
3020
3420
  componentsToBeMigrated: (components) => `The following features will be migrated: ${components}`,
3021
3421
  componentsThatWillNotBeMigrated: (components) => `[NOTE] These features are not yet supported for migration but will be available later: ${components}`,
3022
3422
  sourceContentsMoved: (newLocation) => `The contents of your old source directory have been moved to ${newLocation}, move any required files to the new source directory.`,
3023
- projectMigrationWarningTitle: '⚠️ Important: Migrating to platformVersion 2025.2 is irreversible ⚠️',
3024
- 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),
3423
+ projectMigrationWarningTitle: 'Important: Migrating to platformVersion 2025.2 is irreversible',
3424
+ projectMigrationWarning: uiBetaTag(`Running the ${uiCommandReference('hs project migrate')} command will permanently upgrade your project to platformVersion 2025.2. This action cannot be undone. To ensure you have access to your original files, they will be copied to a new directory (archive) for safekeeping.\n\nThis command will guide you through the process, prompting you to enter the required fields and will download the new project source code into your project source directory.`, false),
3425
+ exitWithoutMigrating: 'Exiting without migrating',
3426
+ success: {
3427
+ downloadedProject: (projectName, projectDest) => `Saved ${projectName} to ${projectDest}`,
3428
+ themesMigrationSuccess: (platformVersion) => `Successfully migrated project to platformVersion ${chalk.bold(platformVersion)}. Upload your project using ${uiCommandReference('hs project upload')}`,
3429
+ },
3025
3430
  errors: {
3026
3431
  project: {
3027
3432
  invalidConfig: 'The project configuration file is invalid. Please check the config file and try again.',
3028
- doesNotExist: (account) => `Project does not exist in ${(0, ui_1.uiAccountDescription)(account)}. Migrations are only supported for existing projects.`,
3433
+ doesNotExist: (account) => `Project does not exist in ${uiAccountDescription(account)}. Migrations are only supported for existing projects.`,
3434
+ themesAlreadyMigrated: 'This project has already been migrated to the latest platform version.',
3435
+ noProjectForThemesMigration: 'Theme migrations are only supported for projects. Please try again from a project directory.',
3436
+ themesAndAppsNotAllowed: 'Support for migrating projects containing both themes and apps to the latest platform version is coming soon. Try again later.',
3029
3437
  multipleApps: 'Multiple apps found in project, this is not allowed in 2025.2',
3030
3438
  alreadyExists: (projectName) => `A project with name ${projectName} already exists. Please choose another name.`,
3439
+ failedToMigrateThemes: 'Failed to migrate project themes. Please verify that your themes are properly formatted before trying again.',
3440
+ failedToUpdateProjectConfig: 'Failed to update project config file. Please update the platformVersion in the project config file manually.',
3031
3441
  },
3032
3442
  unmigratableReasons: {
3033
3443
  upToDate: 'App is already up to date',
3034
3444
  isPrivateApp: 'Private apps are not currently migratable',
3035
3445
  listedInMarketplace: 'Listed apps are not currently migratable',
3036
- 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))}`,
3037
- partOfProjectAlready: `This app is part of a project, run ${(0, ui_1.uiCommandReference)('hs project migrate')} from the project directory to migrate it`,
3446
+ projectConnectedToGitHub: (projectName, accountId) => `The project is linked to a GitHub repository. ${uiLink('Visit the project settings page to unlink it', getProjectSettingsUrl(projectName, accountId))}`,
3447
+ partOfProjectAlready: `This app is part of a project, run ${uiCommandReference('hs project migrate')} from the project directory to migrate it`,
3038
3448
  generic: (reasonCode) => `Unable to migrate app: ${reasonCode}`,
3039
3449
  },
3040
3450
  noAppsEligible: (accountId, reasons) => `No apps in account ${accountId} are currently migratable${reasons.length ? `\n - ${reasons.join('\n - ')}` : ''}`,
3041
- invalidAccountTypeTitle: `${chalk_1.default.bold('Developer account not targeted')}`,
3451
+ invalidAccountTypeTitle: `${chalk.bold('Developer account not targeted')}`,
3042
3452
  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.`,
3043
3453
  appWithAppIdNotFound: (appId) => `Could not find an app with the id ${appId} `,
3044
3454
  noAppsForProject: (projectName) => `No apps associated with project ${projectName}`,
@@ -3046,6 +3456,7 @@ exports.lib = {
3046
3456
  notUngatedForUnifiedApps: (account) => `Your account ${account} isn't enrolled in the required product beta to access this command.`,
3047
3457
  },
3048
3458
  prompt: {
3459
+ themesMigration: (count) => `Identified ${count} theme${count === 1 ? '' : 's'} to migrate. This will migrate all themes in the project.`,
3049
3460
  chooseApp: 'Which app would you like to migrate?',
3050
3461
  inputName: '[--name] What would you like to name the project?',
3051
3462
  inputDest: '[--dest] Where would you like to save the project?',
@@ -3053,6 +3464,7 @@ exports.lib = {
3053
3464
  proceed: 'Would you like to proceed?',
3054
3465
  },
3055
3466
  spinners: {
3467
+ checkingForMigratableComponents: 'Checking project for migratable components...',
3056
3468
  beginningMigration: 'Beginning migration',
3057
3469
  unableToStartMigration: 'Unable to begin migration',
3058
3470
  finishingMigration: 'Wrapping up migration',