@hubspot/cli 7.6.0-experimental.0 → 7.6.1-beta.0

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