@hubspot/cli 8.0.10-experimental.6 → 8.0.11-experimental.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 (1025) hide show
  1. package/api/__tests__/migrate.test.d.ts +1 -0
  2. package/api/__tests__/migrate.test.js +199 -0
  3. package/api/migrate.d.ts +77 -0
  4. package/api/migrate.js +55 -0
  5. package/bin/cli.d.ts +2 -0
  6. package/bin/cli.js +136 -0
  7. package/bin/hs.d.ts +2 -0
  8. package/bin/hscms.d.ts +2 -0
  9. package/bin/silenceErrors.d.ts +2 -0
  10. package/bin/silenceErrors.js +11 -0
  11. package/commands/__tests__/account.test.d.ts +1 -0
  12. package/commands/__tests__/account.test.js +69 -0
  13. package/commands/__tests__/auth.test.d.ts +1 -0
  14. package/commands/__tests__/auth.test.js +43 -0
  15. package/commands/__tests__/cms.test.d.ts +1 -0
  16. package/commands/__tests__/cms.test.js +87 -0
  17. package/commands/__tests__/config.test.d.ts +1 -0
  18. package/commands/__tests__/config.test.js +44 -0
  19. package/commands/__tests__/customObject.test.d.ts +1 -0
  20. package/commands/__tests__/customObject.test.js +68 -0
  21. package/commands/__tests__/doctor.test.d.ts +1 -0
  22. package/commands/__tests__/doctor.test.js +132 -0
  23. package/commands/__tests__/feedback.test.d.ts +1 -0
  24. package/commands/__tests__/feedback.test.js +24 -0
  25. package/commands/__tests__/filemanager.test.d.ts +1 -0
  26. package/commands/__tests__/filemanager.test.js +45 -0
  27. package/commands/__tests__/getStarted.test.d.ts +1 -0
  28. package/commands/__tests__/getStarted.test.js +173 -0
  29. package/commands/__tests__/hubdb.test.d.ts +1 -0
  30. package/commands/__tests__/hubdb.test.js +50 -0
  31. package/commands/__tests__/init.test.d.ts +1 -0
  32. package/commands/__tests__/init.test.js +42 -0
  33. package/commands/__tests__/mcp.test.d.ts +1 -0
  34. package/commands/__tests__/mcp.test.js +46 -0
  35. package/commands/__tests__/open.test.d.ts +1 -0
  36. package/commands/__tests__/open.test.js +58 -0
  37. package/commands/__tests__/project.test.d.ts +1 -0
  38. package/commands/__tests__/project.test.js +125 -0
  39. package/commands/__tests__/sandbox.test.d.ts +1 -0
  40. package/commands/__tests__/sandbox.test.js +44 -0
  41. package/commands/__tests__/secret.test.d.ts +1 -0
  42. package/commands/__tests__/secret.test.js +49 -0
  43. package/commands/__tests__/testAccount.test.d.ts +1 -0
  44. package/commands/__tests__/testAccount.test.js +57 -0
  45. package/commands/__tests__/upgrade.test.d.ts +1 -0
  46. package/commands/__tests__/upgrade.test.js +309 -0
  47. package/commands/account/__tests__/auth.test.d.ts +1 -0
  48. package/commands/account/__tests__/auth.test.js +206 -0
  49. package/commands/account/__tests__/clean.test.d.ts +1 -0
  50. package/commands/account/__tests__/clean.test.js +28 -0
  51. package/commands/account/__tests__/createOverride.test.d.ts +1 -0
  52. package/commands/account/__tests__/createOverride.test.js +32 -0
  53. package/commands/account/__tests__/info.test.d.ts +1 -0
  54. package/commands/account/__tests__/info.test.js +28 -0
  55. package/commands/account/__tests__/list.test.d.ts +1 -0
  56. package/commands/account/__tests__/list.test.js +153 -0
  57. package/commands/account/__tests__/remove.test.d.ts +1 -0
  58. package/commands/account/__tests__/remove.test.js +36 -0
  59. package/commands/account/__tests__/removeOverride.d.ts +1 -0
  60. package/commands/account/__tests__/removeOverride.js +25 -0
  61. package/commands/account/__tests__/rename.test.d.ts +1 -0
  62. package/commands/account/__tests__/rename.test.js +82 -0
  63. package/commands/account/__tests__/use.test.d.ts +1 -0
  64. package/commands/account/__tests__/use.test.js +170 -0
  65. package/commands/account/auth.d.ts +8 -0
  66. package/commands/account/auth.js +102 -0
  67. package/commands/account/clean.d.ts +6 -0
  68. package/commands/account/clean.js +125 -0
  69. package/commands/account/createOverride.d.ts +6 -0
  70. package/commands/account/createOverride.js +93 -0
  71. package/commands/account/info.d.ts +4 -0
  72. package/commands/account/info.js +75 -0
  73. package/commands/account/list.d.ts +4 -0
  74. package/commands/account/list.js +107 -0
  75. package/commands/account/remove.d.ts +6 -0
  76. package/commands/account/remove.js +87 -0
  77. package/commands/account/removeOverride.d.ts +6 -0
  78. package/commands/account/removeOverride.js +71 -0
  79. package/commands/account/rename.d.ts +7 -0
  80. package/commands/account/rename.js +51 -0
  81. package/commands/account/use.d.ts +6 -0
  82. package/commands/account/use.js +93 -0
  83. package/commands/account.d.ts +3 -0
  84. package/commands/account.js +35 -0
  85. package/commands/app/__tests__/migrate.test.d.ts +1 -0
  86. package/commands/app/__tests__/migrate.test.js +111 -0
  87. package/commands/app/migrate.d.ts +6 -0
  88. package/commands/app/migrate.js +96 -0
  89. package/commands/app/secret/__tests__/add.test.d.ts +1 -0
  90. package/commands/app/secret/__tests__/add.test.js +140 -0
  91. package/commands/app/secret/__tests__/delete.test.d.ts +1 -0
  92. package/commands/app/secret/__tests__/delete.test.js +28 -0
  93. package/commands/app/secret/__tests__/list.test.d.ts +1 -0
  94. package/commands/app/secret/__tests__/list.test.js +25 -0
  95. package/commands/app/secret/__tests__/update.test.d.ts +1 -0
  96. package/commands/app/secret/__tests__/update.test.js +28 -0
  97. package/commands/app/secret/add.d.ts +7 -0
  98. package/commands/app/secret/add.js +63 -0
  99. package/commands/app/secret/delete.d.ts +8 -0
  100. package/commands/app/secret/delete.js +86 -0
  101. package/commands/app/secret/list.d.ts +6 -0
  102. package/commands/app/secret/list.js +63 -0
  103. package/commands/app/secret/update.d.ts +7 -0
  104. package/commands/app/secret/update.js +76 -0
  105. package/commands/app/secret.d.ts +3 -0
  106. package/commands/app/secret.js +26 -0
  107. package/commands/app.d.ts +3 -0
  108. package/commands/app.js +18 -0
  109. package/commands/auth.d.ts +9 -0
  110. package/commands/auth.js +190 -0
  111. package/commands/cms/__tests__/delete.test.d.ts +1 -0
  112. package/commands/cms/__tests__/delete.test.js +39 -0
  113. package/commands/cms/__tests__/fetch.test.d.ts +1 -0
  114. package/commands/cms/__tests__/fetch.test.js +156 -0
  115. package/commands/cms/__tests__/function.test.d.ts +1 -0
  116. package/commands/cms/__tests__/function.test.js +50 -0
  117. package/commands/cms/__tests__/lint.test.d.ts +1 -0
  118. package/commands/cms/__tests__/lint.test.js +33 -0
  119. package/commands/cms/__tests__/list.test.d.ts +1 -0
  120. package/commands/cms/__tests__/list.test.js +42 -0
  121. package/commands/cms/__tests__/module.test.d.ts +1 -0
  122. package/commands/cms/__tests__/module.test.js +45 -0
  123. package/commands/cms/__tests__/mv.test.d.ts +1 -0
  124. package/commands/cms/__tests__/mv.test.js +46 -0
  125. package/commands/cms/__tests__/theme.test.d.ts +1 -0
  126. package/commands/cms/__tests__/theme.test.js +54 -0
  127. package/commands/cms/__tests__/upload.test.d.ts +1 -0
  128. package/commands/cms/__tests__/upload.test.js +312 -0
  129. package/commands/cms/__tests__/watch.test.d.ts +1 -0
  130. package/commands/cms/__tests__/watch.test.js +204 -0
  131. package/commands/cms/app/create.d.ts +9 -0
  132. package/commands/cms/app/create.js +81 -0
  133. package/commands/cms/app.d.ts +3 -0
  134. package/commands/cms/app.js +17 -0
  135. package/commands/cms/convertFields.d.ts +7 -0
  136. package/commands/cms/convertFields.js +97 -0
  137. package/commands/cms/delete.d.ts +6 -0
  138. package/commands/cms/delete.js +43 -0
  139. package/commands/cms/fetch.d.ts +12 -0
  140. package/commands/cms/fetch.js +80 -0
  141. package/commands/cms/function/__tests__/logs.test.d.ts +1 -0
  142. package/commands/cms/function/__tests__/logs.test.js +70 -0
  143. package/commands/cms/function/create.d.ts +12 -0
  144. package/commands/cms/function/create.js +84 -0
  145. package/commands/cms/function/deploy.d.ts +6 -0
  146. package/commands/cms/function/deploy.js +89 -0
  147. package/commands/cms/function/list.d.ts +6 -0
  148. package/commands/cms/function/list.js +59 -0
  149. package/commands/cms/function/logs.d.ts +10 -0
  150. package/commands/cms/function/logs.js +136 -0
  151. package/commands/cms/function/server.d.ts +10 -0
  152. package/commands/cms/function/server.js +69 -0
  153. package/commands/cms/function.d.ts +3 -0
  154. package/commands/cms/function.js +27 -0
  155. package/commands/cms/getReactModule.d.ts +7 -0
  156. package/commands/cms/getReactModule.js +77 -0
  157. package/commands/cms/lighthouseScore.d.ts +8 -0
  158. package/commands/cms/lighthouseScore.js +281 -0
  159. package/commands/cms/lint.d.ts +6 -0
  160. package/commands/cms/lint.js +83 -0
  161. package/commands/cms/list.d.ts +6 -0
  162. package/commands/cms/list.js +96 -0
  163. package/commands/cms/module/create.d.ts +11 -0
  164. package/commands/cms/module/create.js +84 -0
  165. package/commands/cms/module/marketplace-validate.d.ts +6 -0
  166. package/commands/cms/module/marketplace-validate.js +62 -0
  167. package/commands/cms/module.d.ts +3 -0
  168. package/commands/cms/module.js +21 -0
  169. package/commands/cms/mv.d.ts +7 -0
  170. package/commands/cms/mv.js +60 -0
  171. package/commands/cms/template/create.d.ts +9 -0
  172. package/commands/cms/template/create.js +72 -0
  173. package/commands/cms/template.d.ts +3 -0
  174. package/commands/cms/template.js +17 -0
  175. package/commands/cms/theme/__tests__/generate-selectors.test.d.ts +1 -0
  176. package/commands/cms/theme/__tests__/generate-selectors.test.js +28 -0
  177. package/commands/cms/theme/__tests__/marketplace-validate.test.d.ts +1 -0
  178. package/commands/cms/theme/__tests__/marketplace-validate.test.js +36 -0
  179. package/commands/cms/theme/__tests__/preview.test.d.ts +1 -0
  180. package/commands/cms/theme/__tests__/preview.test.js +54 -0
  181. package/commands/cms/theme/create.d.ts +6 -0
  182. package/commands/cms/theme/create.js +58 -0
  183. package/commands/cms/theme/generate-selectors.d.ts +6 -0
  184. package/commands/cms/theme/generate-selectors.js +171 -0
  185. package/commands/cms/theme/marketplace-validate.d.ts +6 -0
  186. package/commands/cms/theme/marketplace-validate.js +64 -0
  187. package/commands/cms/theme/preview.d.ts +11 -0
  188. package/commands/cms/theme/preview.js +126 -0
  189. package/commands/cms/theme.d.ts +3 -0
  190. package/commands/cms/theme.js +25 -0
  191. package/commands/cms/upload.d.ts +12 -0
  192. package/commands/cms/upload.js +212 -0
  193. package/commands/cms/watch.d.ts +13 -0
  194. package/commands/cms/watch.js +132 -0
  195. package/commands/cms/webpack/create.d.ts +6 -0
  196. package/commands/cms/webpack/create.js +58 -0
  197. package/commands/cms/webpack.d.ts +3 -0
  198. package/commands/cms/webpack.js +17 -0
  199. package/commands/cms.d.ts +3 -0
  200. package/commands/cms.js +49 -0
  201. package/commands/completion.d.ts +3 -0
  202. package/commands/completion.js +27 -0
  203. package/commands/config/migrate.d.ts +6 -0
  204. package/commands/config/migrate.js +70 -0
  205. package/commands/config/set.d.ts +11 -0
  206. package/commands/config/set.js +141 -0
  207. package/commands/config.d.ts +3 -0
  208. package/commands/config.js +18 -0
  209. package/commands/customObject/__tests__/create.test.d.ts +1 -0
  210. package/commands/customObject/__tests__/create.test.js +40 -0
  211. package/commands/customObject/__tests__/createSchema.test.d.ts +1 -0
  212. package/commands/customObject/__tests__/createSchema.test.js +28 -0
  213. package/commands/customObject/__tests__/deleteSchema.test.d.ts +1 -0
  214. package/commands/customObject/__tests__/deleteSchema.test.js +42 -0
  215. package/commands/customObject/__tests__/fetch-all-schemas.test.d.ts +1 -0
  216. package/commands/customObject/__tests__/fetch-all-schemas.test.js +41 -0
  217. package/commands/customObject/__tests__/fetchSchema.test.d.ts +1 -0
  218. package/commands/customObject/__tests__/fetchSchema.test.js +45 -0
  219. package/commands/customObject/__tests__/listSchemas.test.d.ts +1 -0
  220. package/commands/customObject/__tests__/listSchemas.test.js +29 -0
  221. package/commands/customObject/__tests__/updateSchema.test.d.ts +1 -0
  222. package/commands/customObject/__tests__/updateSchema.test.js +40 -0
  223. package/commands/customObject/create.d.ts +7 -0
  224. package/commands/customObject/create.js +64 -0
  225. package/commands/customObject/createSchema.d.ts +6 -0
  226. package/commands/customObject/createSchema.js +55 -0
  227. package/commands/customObject/deleteSchema.d.ts +7 -0
  228. package/commands/customObject/deleteSchema.js +69 -0
  229. package/commands/customObject/fetchAllSchemas.d.ts +6 -0
  230. package/commands/customObject/fetchAllSchemas.js +57 -0
  231. package/commands/customObject/fetchSchema.d.ts +7 -0
  232. package/commands/customObject/fetchSchema.js +67 -0
  233. package/commands/customObject/listSchemas.d.ts +4 -0
  234. package/commands/customObject/listSchemas.js +35 -0
  235. package/commands/customObject/updateSchema.d.ts +7 -0
  236. package/commands/customObject/updateSchema.js +70 -0
  237. package/commands/customObject.d.ts +3 -0
  238. package/commands/customObject.js +38 -0
  239. package/commands/doctor.d.ts +6 -0
  240. package/commands/doctor.js +70 -0
  241. package/commands/feedback.d.ts +4 -0
  242. package/commands/feedback.js +32 -0
  243. package/commands/filemanager/__tests__/fetch.test.d.ts +1 -0
  244. package/commands/filemanager/__tests__/fetch.test.js +32 -0
  245. package/commands/filemanager/__tests__/upload.test.d.ts +1 -0
  246. package/commands/filemanager/__tests__/upload.test.js +191 -0
  247. package/commands/filemanager/fetch.d.ts +8 -0
  248. package/commands/filemanager/fetch.js +58 -0
  249. package/commands/filemanager/upload.d.ts +7 -0
  250. package/commands/filemanager/upload.js +97 -0
  251. package/commands/filemanager.d.ts +3 -0
  252. package/commands/filemanager.js +18 -0
  253. package/commands/getStarted.d.ts +8 -0
  254. package/commands/getStarted.js +322 -0
  255. package/commands/hubdb/__tests__/clear.test.d.ts +1 -0
  256. package/commands/hubdb/__tests__/clear.test.js +28 -0
  257. package/commands/hubdb/__tests__/create.test.d.ts +1 -0
  258. package/commands/hubdb/__tests__/create.test.js +28 -0
  259. package/commands/hubdb/__tests__/delete.test.d.ts +1 -0
  260. package/commands/hubdb/__tests__/delete.test.js +28 -0
  261. package/commands/hubdb/__tests__/fetch.test.d.ts +1 -0
  262. package/commands/hubdb/__tests__/fetch.test.js +28 -0
  263. package/commands/hubdb/__tests__/list.test.d.ts +1 -0
  264. package/commands/hubdb/__tests__/list.test.js +88 -0
  265. package/commands/hubdb/clear.d.ts +7 -0
  266. package/commands/hubdb/clear.js +58 -0
  267. package/commands/hubdb/create.d.ts +6 -0
  268. package/commands/hubdb/create.js +74 -0
  269. package/commands/hubdb/delete.d.ts +6 -0
  270. package/commands/hubdb/delete.js +68 -0
  271. package/commands/hubdb/fetch.d.ts +7 -0
  272. package/commands/hubdb/fetch.js +55 -0
  273. package/commands/hubdb/list.d.ts +4 -0
  274. package/commands/hubdb/list.js +79 -0
  275. package/commands/hubdb.d.ts +5 -0
  276. package/commands/hubdb.js +27 -0
  277. package/commands/init.d.ts +8 -0
  278. package/commands/init.js +200 -0
  279. package/commands/mcp/__tests__/setup.test.d.ts +1 -0
  280. package/commands/mcp/__tests__/setup.test.js +26 -0
  281. package/commands/mcp/__tests__/start.test.d.ts +1 -0
  282. package/commands/mcp/__tests__/start.test.js +144 -0
  283. package/commands/mcp/setup.d.ts +6 -0
  284. package/commands/mcp/setup.js +36 -0
  285. package/commands/mcp/start.d.ts +6 -0
  286. package/commands/mcp/start.js +72 -0
  287. package/commands/mcp.d.ts +3 -0
  288. package/commands/mcp.js +20 -0
  289. package/commands/open.d.ts +7 -0
  290. package/commands/open.js +70 -0
  291. package/commands/project/__tests__/add.test.d.ts +1 -0
  292. package/commands/project/__tests__/add.test.js +107 -0
  293. package/commands/project/__tests__/create.test.d.ts +1 -0
  294. package/commands/project/__tests__/create.test.js +97 -0
  295. package/commands/project/__tests__/deploy.test.d.ts +1 -0
  296. package/commands/project/__tests__/deploy.test.js +307 -0
  297. package/commands/project/__tests__/dev.test.d.ts +1 -0
  298. package/commands/project/__tests__/dev.test.js +273 -0
  299. package/commands/project/__tests__/devUnifiedFlow.test.d.ts +1 -0
  300. package/commands/project/__tests__/devUnifiedFlow.test.js +434 -0
  301. package/commands/project/__tests__/download.test.d.ts +1 -0
  302. package/commands/project/__tests__/download.test.js +39 -0
  303. package/commands/project/__tests__/info.test.d.ts +1 -0
  304. package/commands/project/__tests__/info.test.js +145 -0
  305. package/commands/project/__tests__/installDeps.test.d.ts +1 -0
  306. package/commands/project/__tests__/installDeps.test.js +140 -0
  307. package/commands/project/__tests__/lint.test.d.ts +1 -0
  308. package/commands/project/__tests__/lint.test.js +704 -0
  309. package/commands/project/__tests__/list.test.d.ts +1 -0
  310. package/commands/project/__tests__/list.test.js +31 -0
  311. package/commands/project/__tests__/listBuilds.test.d.ts +1 -0
  312. package/commands/project/__tests__/listBuilds.test.js +38 -0
  313. package/commands/project/__tests__/logs.test.d.ts +1 -0
  314. package/commands/project/__tests__/logs.test.js +202 -0
  315. package/commands/project/__tests__/migrate.test.d.ts +1 -0
  316. package/commands/project/__tests__/migrate.test.js +106 -0
  317. package/commands/project/__tests__/open.test.d.ts +1 -0
  318. package/commands/project/__tests__/open.test.js +39 -0
  319. package/commands/project/__tests__/profile.test.d.ts +1 -0
  320. package/commands/project/__tests__/profile.test.js +42 -0
  321. package/commands/project/__tests__/updateDeps.test.d.ts +1 -0
  322. package/commands/project/__tests__/updateDeps.test.js +140 -0
  323. package/commands/project/__tests__/upload.test.d.ts +1 -0
  324. package/commands/project/__tests__/upload.test.js +234 -0
  325. package/commands/project/__tests__/validate.test.d.ts +1 -0
  326. package/commands/project/__tests__/validate.test.js +381 -0
  327. package/commands/project/__tests__/watch.test.d.ts +1 -0
  328. package/commands/project/__tests__/watch.test.js +35 -0
  329. package/commands/project/add.d.ts +10 -0
  330. package/commands/project/add.js +79 -0
  331. package/commands/project/cloneApp.d.ts +1 -0
  332. package/commands/project/cloneApp.js +1 -0
  333. package/commands/project/create.d.ts +4 -0
  334. package/commands/project/create.js +175 -0
  335. package/commands/project/deploy.d.ts +11 -0
  336. package/commands/project/deploy.js +196 -0
  337. package/commands/project/dev/deprecatedFlow.d.ts +11 -0
  338. package/commands/project/dev/deprecatedFlow.js +135 -0
  339. package/commands/project/dev/index.d.ts +5 -0
  340. package/commands/project/dev/index.js +174 -0
  341. package/commands/project/dev/unifiedFlow.d.ts +14 -0
  342. package/commands/project/dev/unifiedFlow.js +162 -0
  343. package/commands/project/download.d.ts +8 -0
  344. package/commands/project/download.js +95 -0
  345. package/commands/project/info.d.ts +4 -0
  346. package/commands/project/info.js +67 -0
  347. package/commands/project/installDeps.d.ts +6 -0
  348. package/commands/project/installDeps.js +80 -0
  349. package/commands/project/lint.d.ts +6 -0
  350. package/commands/project/lint.js +178 -0
  351. package/commands/project/list.d.ts +4 -0
  352. package/commands/project/list.js +62 -0
  353. package/commands/project/listBuilds.d.ts +7 -0
  354. package/commands/project/listBuilds.js +120 -0
  355. package/commands/project/logs.d.ts +10 -0
  356. package/commands/project/logs.js +119 -0
  357. package/commands/project/migrate.d.ts +7 -0
  358. package/commands/project/migrate.js +91 -0
  359. package/commands/project/open.d.ts +6 -0
  360. package/commands/project/open.js +61 -0
  361. package/commands/project/profile/add.d.ts +7 -0
  362. package/commands/project/profile/add.js +203 -0
  363. package/commands/project/profile/delete.d.ts +6 -0
  364. package/commands/project/profile/delete.js +129 -0
  365. package/commands/project/profile.d.ts +3 -0
  366. package/commands/project/profile.js +19 -0
  367. package/commands/project/updateDeps.d.ts +6 -0
  368. package/commands/project/updateDeps.js +80 -0
  369. package/commands/project/upload.d.ts +10 -0
  370. package/commands/project/upload.js +145 -0
  371. package/commands/project/validate.d.ts +6 -0
  372. package/commands/project/validate.js +156 -0
  373. package/commands/project/watch.d.ts +6 -0
  374. package/commands/project/watch.js +152 -0
  375. package/commands/project.d.ts +3 -0
  376. package/commands/project.js +74 -0
  377. package/commands/sandbox/__tests__/create.test.d.ts +1 -0
  378. package/commands/sandbox/__tests__/create.test.js +198 -0
  379. package/commands/sandbox/__tests__/delete.test.d.ts +1 -0
  380. package/commands/sandbox/__tests__/delete.test.js +31 -0
  381. package/commands/sandbox/create.d.ts +8 -0
  382. package/commands/sandbox/create.js +156 -0
  383. package/commands/sandbox/delete.d.ts +7 -0
  384. package/commands/sandbox/delete.js +189 -0
  385. package/commands/sandbox.d.ts +3 -0
  386. package/commands/sandbox.js +19 -0
  387. package/commands/secret/__tests__/addSecret.test.d.ts +1 -0
  388. package/commands/secret/__tests__/addSecret.test.js +162 -0
  389. package/commands/secret/__tests__/deleteSecret.test.d.ts +1 -0
  390. package/commands/secret/__tests__/deleteSecret.test.js +41 -0
  391. package/commands/secret/__tests__/listSecret.test.d.ts +1 -0
  392. package/commands/secret/__tests__/listSecret.test.js +29 -0
  393. package/commands/secret/__tests__/updateSecret.test.d.ts +1 -0
  394. package/commands/secret/__tests__/updateSecret.test.js +29 -0
  395. package/commands/secret/addSecret.d.ts +6 -0
  396. package/commands/secret/addSecret.js +58 -0
  397. package/commands/secret/deleteSecret.d.ts +7 -0
  398. package/commands/secret/deleteSecret.js +71 -0
  399. package/commands/secret/listSecret.d.ts +4 -0
  400. package/commands/secret/listSecret.js +43 -0
  401. package/commands/secret/updateSecret.d.ts +6 -0
  402. package/commands/secret/updateSecret.js +57 -0
  403. package/commands/secret.d.ts +3 -0
  404. package/commands/secret.js +25 -0
  405. package/commands/testAccount/__tests__/create.test.d.ts +1 -0
  406. package/commands/testAccount/__tests__/create.test.js +106 -0
  407. package/commands/testAccount/__tests__/createConfig.test.d.ts +1 -0
  408. package/commands/testAccount/__tests__/createConfig.test.js +32 -0
  409. package/commands/testAccount/__tests__/delete.test.d.ts +1 -0
  410. package/commands/testAccount/__tests__/delete.test.js +29 -0
  411. package/commands/testAccount/__tests__/importData.test.d.ts +1 -0
  412. package/commands/testAccount/__tests__/importData.test.js +92 -0
  413. package/commands/testAccount/create.d.ts +15 -0
  414. package/commands/testAccount/create.js +232 -0
  415. package/commands/testAccount/createConfig.d.ts +8 -0
  416. package/commands/testAccount/createConfig.js +92 -0
  417. package/commands/testAccount/delete.d.ts +7 -0
  418. package/commands/testAccount/delete.js +188 -0
  419. package/commands/testAccount/importData.d.ts +9 -0
  420. package/commands/testAccount/importData.js +61 -0
  421. package/commands/testAccount.d.ts +3 -0
  422. package/commands/testAccount.js +25 -0
  423. package/commands/upgrade.d.ts +8 -0
  424. package/commands/upgrade.js +119 -0
  425. package/lang/en.d.ts +4021 -0
  426. package/lang/en.js +4044 -0
  427. package/lib/CLIWebSocketServer.d.ts +28 -0
  428. package/lib/CLIWebSocketServer.js +91 -0
  429. package/lib/__tests__/CLIWebSocketServer.test.d.ts +1 -0
  430. package/lib/__tests__/CLIWebSocketServer.test.js +252 -0
  431. package/lib/__tests__/accountAuth.test.d.ts +1 -0
  432. package/lib/__tests__/accountAuth.test.js +258 -0
  433. package/lib/__tests__/accountTypes.test.d.ts +1 -0
  434. package/lib/__tests__/accountTypes.test.js +98 -0
  435. package/lib/__tests__/buildAccount.test.d.ts +1 -0
  436. package/lib/__tests__/buildAccount.test.js +211 -0
  437. package/lib/__tests__/cliUpgradeUtils.test.d.ts +1 -0
  438. package/lib/__tests__/cliUpgradeUtils.test.js +131 -0
  439. package/lib/__tests__/commandSuggestion.test.d.ts +1 -0
  440. package/lib/__tests__/commandSuggestion.test.js +121 -0
  441. package/lib/__tests__/commonOpts.test.d.ts +1 -0
  442. package/lib/__tests__/commonOpts.test.js +80 -0
  443. package/lib/__tests__/dependencyManagement.test.d.ts +1 -0
  444. package/lib/__tests__/dependencyManagement.test.js +1067 -0
  445. package/lib/__tests__/developerTestAccounts.test.d.ts +1 -0
  446. package/lib/__tests__/developerTestAccounts.test.js +156 -0
  447. package/lib/__tests__/hasFeature.test.d.ts +1 -0
  448. package/lib/__tests__/hasFeature.test.js +167 -0
  449. package/lib/__tests__/http.test.d.ts +1 -0
  450. package/lib/__tests__/http.test.js +40 -0
  451. package/lib/__tests__/importData.test.d.ts +1 -0
  452. package/lib/__tests__/importData.test.js +98 -0
  453. package/lib/__tests__/npmCli.test.d.ts +1 -0
  454. package/lib/__tests__/npmCli.test.js +84 -0
  455. package/lib/__tests__/oauth.test.d.ts +1 -0
  456. package/lib/__tests__/oauth.test.js +109 -0
  457. package/lib/__tests__/parsing.test.d.ts +1 -0
  458. package/lib/__tests__/parsing.test.js +34 -0
  459. package/lib/__tests__/polling.test.d.ts +1 -0
  460. package/lib/__tests__/polling.test.js +76 -0
  461. package/lib/__tests__/process.test.d.ts +1 -0
  462. package/lib/__tests__/process.test.js +89 -0
  463. package/lib/__tests__/sandboxes.test.d.ts +1 -0
  464. package/lib/__tests__/sandboxes.test.js +128 -0
  465. package/lib/__tests__/serverlessLogs.test.d.ts +1 -0
  466. package/lib/__tests__/serverlessLogs.test.js +163 -0
  467. package/lib/__tests__/usageTracking.test.d.ts +1 -0
  468. package/lib/__tests__/usageTracking.test.js +197 -0
  469. package/lib/__tests__/validation.test.d.ts +1 -0
  470. package/lib/__tests__/validation.test.js +143 -0
  471. package/lib/__tests__/yargsUtils.test.d.ts +1 -0
  472. package/lib/__tests__/yargsUtils.test.js +124 -0
  473. package/lib/accountAuth.d.ts +10 -0
  474. package/lib/accountAuth.js +109 -0
  475. package/lib/accountTypes.d.ts +9 -0
  476. package/lib/accountTypes.js +41 -0
  477. package/lib/app/__tests__/migrate.test.d.ts +1 -0
  478. package/lib/app/__tests__/migrate.test.js +638 -0
  479. package/lib/app/migrate.d.ts +44 -0
  480. package/lib/app/migrate.js +389 -0
  481. package/lib/app/urls.d.ts +17 -0
  482. package/lib/app/urls.js +16 -0
  483. package/lib/buildAccount.d.ts +15 -0
  484. package/lib/buildAccount.js +184 -0
  485. package/lib/cliUpgradeUtils.d.ts +22 -0
  486. package/lib/cliUpgradeUtils.js +62 -0
  487. package/lib/cmsAssets/api-sample.d.ts +3 -0
  488. package/lib/cmsAssets/api-sample.js +60 -0
  489. package/lib/cmsAssets/app.d.ts +3 -0
  490. package/lib/cmsAssets/app.js +12 -0
  491. package/lib/cmsAssets/function.d.ts +3 -0
  492. package/lib/cmsAssets/function.js +11 -0
  493. package/lib/cmsAssets/index.d.ts +5 -0
  494. package/lib/cmsAssets/index.js +21 -0
  495. package/lib/cmsAssets/module.d.ts +3 -0
  496. package/lib/cmsAssets/module.js +20 -0
  497. package/lib/cmsAssets/react-app.d.ts +3 -0
  498. package/lib/cmsAssets/react-app.js +12 -0
  499. package/lib/cmsAssets/template.d.ts +3 -0
  500. package/lib/cmsAssets/template.js +20 -0
  501. package/lib/cmsAssets/vue-app.d.ts +3 -0
  502. package/lib/cmsAssets/vue-app.js +12 -0
  503. package/lib/cmsAssets/webpack-serverless.d.ts +3 -0
  504. package/lib/cmsAssets/webpack-serverless.js +12 -0
  505. package/lib/cmsAssets/website-theme.d.ts +3 -0
  506. package/lib/cmsAssets/website-theme.js +19 -0
  507. package/lib/commandSuggestion.d.ts +3 -0
  508. package/lib/commandSuggestion.js +39 -0
  509. package/lib/commonOpts.d.ts +25 -0
  510. package/lib/commonOpts.js +181 -0
  511. package/lib/configMigrate.d.ts +2 -0
  512. package/lib/configMigrate.js +182 -0
  513. package/lib/configOptions.d.ts +21 -0
  514. package/lib/configOptions.js +111 -0
  515. package/lib/constants.d.ts +145 -0
  516. package/lib/constants.js +146 -0
  517. package/lib/customObject.d.ts +3 -0
  518. package/lib/customObject.js +11 -0
  519. package/lib/dependencyManagement.d.ts +21 -0
  520. package/lib/dependencyManagement.js +243 -0
  521. package/lib/developerTestAccounts.d.ts +6 -0
  522. package/lib/developerTestAccounts.js +66 -0
  523. package/lib/doctor/Diagnosis.d.ts +27 -0
  524. package/lib/doctor/Diagnosis.js +113 -0
  525. package/lib/doctor/DiagnosticInfoBuilder.d.ts +69 -0
  526. package/lib/doctor/DiagnosticInfoBuilder.js +169 -0
  527. package/lib/doctor/Doctor.d.ts +35 -0
  528. package/lib/doctor/Doctor.js +566 -0
  529. package/lib/doctor/__tests__/Diagnosis.test.d.ts +1 -0
  530. package/lib/doctor/__tests__/Diagnosis.test.js +84 -0
  531. package/lib/doctor/__tests__/DiagnosticInfoBuilder.test.d.ts +1 -0
  532. package/lib/doctor/__tests__/DiagnosticInfoBuilder.test.js +177 -0
  533. package/lib/doctor/__tests__/Doctor.test.d.ts +1 -0
  534. package/lib/doctor/__tests__/Doctor.test.js +560 -0
  535. package/lib/enums/exitCodes.d.ts +5 -0
  536. package/lib/enums/exitCodes.js +10 -0
  537. package/lib/errorHandlers/__tests__/index.test.d.ts +1 -0
  538. package/lib/errorHandlers/__tests__/index.test.js +278 -0
  539. package/lib/errorHandlers/index.d.ts +19 -0
  540. package/lib/errorHandlers/index.js +99 -0
  541. package/lib/errorHandlers/suppressError.d.ts +2 -0
  542. package/lib/errorHandlers/suppressError.js +53 -0
  543. package/lib/errors/ProjectErrors.d.ts +15 -0
  544. package/lib/errors/ProjectErrors.js +30 -0
  545. package/lib/errors/ProjectValidationError.d.ts +4 -0
  546. package/lib/errors/ProjectValidationError.js +9 -0
  547. package/lib/errors/PromptExitError.d.ts +4 -0
  548. package/lib/errors/PromptExitError.js +8 -0
  549. package/lib/filesystem.d.ts +2 -0
  550. package/lib/filesystem.js +19 -0
  551. package/lib/generateSelectors.d.ts +20 -0
  552. package/lib/generateSelectors.js +110 -0
  553. package/lib/getStarted/getStartedV2.d.ts +7 -0
  554. package/lib/getStarted/getStartedV2.js +18 -0
  555. package/lib/getStartedV2Actions.d.ts +50 -0
  556. package/lib/getStartedV2Actions.js +199 -0
  557. package/lib/hasFeature.d.ts +4 -0
  558. package/lib/hasFeature.js +18 -0
  559. package/lib/http.d.ts +1 -0
  560. package/lib/http.js +28 -0
  561. package/lib/importData.d.ts +3 -0
  562. package/lib/importData.js +51 -0
  563. package/lib/interpolation.d.ts +7 -0
  564. package/lib/interpolation.js +84 -0
  565. package/lib/jsonLoader.d.ts +14 -0
  566. package/lib/jsonLoader.js +60 -0
  567. package/lib/links.d.ts +11 -0
  568. package/lib/links.js +107 -0
  569. package/lib/marketplaceValidate.d.ts +16 -0
  570. package/lib/marketplaceValidate.js +88 -0
  571. package/lib/mcp/__tests__/setup.test.d.ts +1 -0
  572. package/lib/mcp/__tests__/setup.test.js +523 -0
  573. package/lib/mcp/setup.d.ts +17 -0
  574. package/lib/mcp/setup.js +345 -0
  575. package/lib/middleware/__tests__/commandTargetingUtils.test.d.ts +1 -0
  576. package/lib/middleware/__tests__/commandTargetingUtils.test.js +99 -0
  577. package/lib/middleware/__tests__/configMiddleware.test.d.ts +1 -0
  578. package/lib/middleware/__tests__/configMiddleware.test.js +118 -0
  579. package/lib/middleware/__tests__/gitMiddleware.test.d.ts +1 -0
  580. package/lib/middleware/__tests__/gitMiddleware.test.js +43 -0
  581. package/lib/middleware/__tests__/requestMiddleware.test.d.ts +1 -0
  582. package/lib/middleware/__tests__/requestMiddleware.test.js +15 -0
  583. package/lib/middleware/__tests__/usageTrackingMiddleware.test.d.ts +1 -0
  584. package/lib/middleware/__tests__/usageTrackingMiddleware.test.js +44 -0
  585. package/lib/middleware/__tests__/yargsChecksMiddleware.test.d.ts +1 -0
  586. package/lib/middleware/__tests__/yargsChecksMiddleware.test.js +39 -0
  587. package/lib/middleware/autoUpdateMiddleware.d.ts +4 -0
  588. package/lib/middleware/autoUpdateMiddleware.js +105 -0
  589. package/lib/middleware/commandTargetingUtils.d.ts +8 -0
  590. package/lib/middleware/commandTargetingUtils.js +76 -0
  591. package/lib/middleware/configMiddleware.d.ts +15 -0
  592. package/lib/middleware/configMiddleware.js +93 -0
  593. package/lib/middleware/fireAlarmMiddleware.d.ts +4 -0
  594. package/lib/middleware/fireAlarmMiddleware.js +118 -0
  595. package/lib/middleware/gitMiddleware.d.ts +2 -0
  596. package/lib/middleware/gitMiddleware.js +21 -0
  597. package/lib/middleware/requestMiddleware.d.ts +1 -0
  598. package/lib/middleware/requestMiddleware.js +5 -0
  599. package/lib/middleware/spinniesMiddleware.d.ts +1 -0
  600. package/lib/middleware/spinniesMiddleware.js +4 -0
  601. package/lib/middleware/usageTrackingMiddleware.d.ts +13 -0
  602. package/lib/middleware/usageTrackingMiddleware.js +16 -0
  603. package/lib/middleware/yargsChecksMiddleware.d.ts +4 -0
  604. package/lib/middleware/yargsChecksMiddleware.js +18 -0
  605. package/lib/npm/npmCli.d.ts +17 -0
  606. package/lib/npm/npmCli.js +59 -0
  607. package/lib/npm/packageJson.d.ts +24 -0
  608. package/lib/npm/packageJson.js +102 -0
  609. package/lib/npm/workspaces.d.ts +12 -0
  610. package/lib/npm/workspaces.js +48 -0
  611. package/lib/oauth.d.ts +2 -0
  612. package/lib/oauth.js +93 -0
  613. package/lib/parsing.d.ts +1 -0
  614. package/lib/parsing.js +8 -0
  615. package/lib/polling.d.ts +21 -0
  616. package/lib/polling.js +48 -0
  617. package/lib/process.d.ts +13 -0
  618. package/lib/process.js +56 -0
  619. package/lib/projects/ProjectLogsManager.d.ts +29 -0
  620. package/lib/projects/ProjectLogsManager.js +155 -0
  621. package/lib/projects/__tests__/AppDevModeInterface.test.d.ts +1 -0
  622. package/lib/projects/__tests__/AppDevModeInterface.test.js +541 -0
  623. package/lib/projects/__tests__/DevServerManager.test.d.ts +1 -0
  624. package/lib/projects/__tests__/DevServerManager.test.js +185 -0
  625. package/lib/projects/__tests__/DevSessionManager.test.d.ts +1 -0
  626. package/lib/projects/__tests__/DevSessionManager.test.js +250 -0
  627. package/lib/projects/__tests__/LocalDevProcess.test.d.ts +1 -0
  628. package/lib/projects/__tests__/LocalDevProcess.test.js +481 -0
  629. package/lib/projects/__tests__/LocalDevWebsocketServer.test.d.ts +1 -0
  630. package/lib/projects/__tests__/LocalDevWebsocketServer.test.js +231 -0
  631. package/lib/projects/__tests__/ProjectLogsManager.test.d.ts +1 -0
  632. package/lib/projects/__tests__/ProjectLogsManager.test.js +302 -0
  633. package/lib/projects/__tests__/UIExtensionsDevModeInterface.test.d.ts +1 -0
  634. package/lib/projects/__tests__/UIExtensionsDevModeInterface.test.js +160 -0
  635. package/lib/projects/__tests__/components.test.d.ts +1 -0
  636. package/lib/projects/__tests__/components.test.js +440 -0
  637. package/lib/projects/__tests__/deploy.test.d.ts +1 -0
  638. package/lib/projects/__tests__/deploy.test.js +231 -0
  639. package/lib/projects/__tests__/localDevProjectHelpers.test.d.ts +1 -0
  640. package/lib/projects/__tests__/localDevProjectHelpers.test.js +120 -0
  641. package/lib/projects/__tests__/platformVersion.test.d.ts +1 -0
  642. package/lib/projects/__tests__/platformVersion.test.js +63 -0
  643. package/lib/projects/__tests__/pollProjectBuildAndDeploy.test.d.ts +1 -0
  644. package/lib/projects/__tests__/pollProjectBuildAndDeploy.test.js +328 -0
  645. package/lib/projects/__tests__/projectInfo.test.d.ts +1 -0
  646. package/lib/projects/__tests__/projectInfo.test.js +114 -0
  647. package/lib/projects/__tests__/projectProfiles.test.d.ts +1 -0
  648. package/lib/projects/__tests__/projectProfiles.test.js +441 -0
  649. package/lib/projects/__tests__/projects.test.d.ts +1 -0
  650. package/lib/projects/__tests__/projects.test.js +58 -0
  651. package/lib/projects/__tests__/structure.test.d.ts +1 -0
  652. package/lib/projects/__tests__/structure.test.js +210 -0
  653. package/lib/projects/__tests__/uieLinting.test.d.ts +1 -0
  654. package/lib/projects/__tests__/uieLinting.test.js +631 -0
  655. package/lib/projects/__tests__/upload.test.d.ts +1 -0
  656. package/lib/projects/__tests__/upload.test.js +183 -0
  657. package/lib/projects/add/__tests__/legacyAddComponent.test.d.ts +1 -0
  658. package/lib/projects/add/__tests__/legacyAddComponent.test.js +245 -0
  659. package/lib/projects/add/__tests__/v2AddComponent.test.d.ts +1 -0
  660. package/lib/projects/add/__tests__/v2AddComponent.test.js +343 -0
  661. package/lib/projects/add/legacyAddComponent.d.ts +5 -0
  662. package/lib/projects/add/legacyAddComponent.js +46 -0
  663. package/lib/projects/add/v2AddComponent.d.ts +9 -0
  664. package/lib/projects/add/v2AddComponent.js +111 -0
  665. package/lib/projects/components.d.ts +16 -0
  666. package/lib/projects/components.js +252 -0
  667. package/lib/projects/config.d.ts +9 -0
  668. package/lib/projects/config.js +73 -0
  669. package/lib/projects/create/__tests__/legacy.test.d.ts +1 -0
  670. package/lib/projects/create/__tests__/legacy.test.js +72 -0
  671. package/lib/projects/create/__tests__/v2.test.d.ts +1 -0
  672. package/lib/projects/create/__tests__/v2.test.js +257 -0
  673. package/lib/projects/create/index.d.ts +24 -0
  674. package/lib/projects/create/index.js +33 -0
  675. package/lib/projects/create/legacy.d.ts +6 -0
  676. package/lib/projects/create/legacy.js +48 -0
  677. package/lib/projects/create/v2.d.ts +26 -0
  678. package/lib/projects/create/v2.js +158 -0
  679. package/lib/projects/deploy.d.ts +13 -0
  680. package/lib/projects/deploy.js +76 -0
  681. package/lib/projects/ensureProjectExists.d.ts +11 -0
  682. package/lib/projects/ensureProjectExists.js +89 -0
  683. package/lib/projects/localDev/AppDevModeInterface.d.ts +41 -0
  684. package/lib/projects/localDev/AppDevModeInterface.js +337 -0
  685. package/lib/projects/localDev/DevServerManager.d.ts +21 -0
  686. package/lib/projects/localDev/DevServerManager.js +64 -0
  687. package/lib/projects/localDev/DevServerManager_DEPRECATED.d.ts +40 -0
  688. package/lib/projects/localDev/DevServerManager_DEPRECATED.js +128 -0
  689. package/lib/projects/localDev/DevSessionManager.d.ts +18 -0
  690. package/lib/projects/localDev/DevSessionManager.js +95 -0
  691. package/lib/projects/localDev/LocalDevLogger.d.ts +34 -0
  692. package/lib/projects/localDev/LocalDevLogger.js +178 -0
  693. package/lib/projects/localDev/LocalDevManager_DEPRECATED.d.ts +59 -0
  694. package/lib/projects/localDev/LocalDevManager_DEPRECATED.js +387 -0
  695. package/lib/projects/localDev/LocalDevProcess.d.ts +39 -0
  696. package/lib/projects/localDev/LocalDevProcess.js +277 -0
  697. package/lib/projects/localDev/LocalDevState.d.ts +63 -0
  698. package/lib/projects/localDev/LocalDevState.js +139 -0
  699. package/lib/projects/localDev/LocalDevWatcher.d.ts +10 -0
  700. package/lib/projects/localDev/LocalDevWatcher.js +48 -0
  701. package/lib/projects/localDev/LocalDevWebsocketServer.d.ts +21 -0
  702. package/lib/projects/localDev/LocalDevWebsocketServer.js +169 -0
  703. package/lib/projects/localDev/UIExtensionsDevModeInterface.d.ts +13 -0
  704. package/lib/projects/localDev/UIExtensionsDevModeInterface.js +37 -0
  705. package/lib/projects/localDev/helpers/account.d.ts +14 -0
  706. package/lib/projects/localDev/helpers/account.js +222 -0
  707. package/lib/projects/localDev/helpers/devSessionsApi.d.ts +9 -0
  708. package/lib/projects/localDev/helpers/devSessionsApi.js +19 -0
  709. package/lib/projects/localDev/helpers/process.d.ts +1 -0
  710. package/lib/projects/localDev/helpers/process.js +17 -0
  711. package/lib/projects/localDev/helpers/project.d.ts +16 -0
  712. package/lib/projects/localDev/helpers/project.js +216 -0
  713. package/lib/projects/localDev/localDevWebsocketServerUtils.d.ts +8 -0
  714. package/lib/projects/localDev/localDevWebsocketServerUtils.js +19 -0
  715. package/lib/projects/platformVersion.d.ts +9 -0
  716. package/lib/projects/platformVersion.js +39 -0
  717. package/lib/projects/pollProjectBuildAndDeploy.d.ts +10 -0
  718. package/lib/projects/pollProjectBuildAndDeploy.js +344 -0
  719. package/lib/projects/projectInfo.d.ts +22 -0
  720. package/lib/projects/projectInfo.js +104 -0
  721. package/lib/projects/projectProfiles.d.ts +17 -0
  722. package/lib/projects/projectProfiles.js +140 -0
  723. package/lib/projects/structure.d.ts +18 -0
  724. package/lib/projects/structure.js +130 -0
  725. package/lib/projects/ui.d.ts +1 -0
  726. package/lib/projects/ui.js +12 -0
  727. package/lib/projects/uieLinting.d.ts +33 -0
  728. package/lib/projects/uieLinting.js +220 -0
  729. package/lib/projects/upload.d.ts +33 -0
  730. package/lib/projects/upload.js +147 -0
  731. package/lib/projects/urls.d.ts +10 -0
  732. package/lib/projects/urls.js +42 -0
  733. package/lib/projects/watch.d.ts +5 -0
  734. package/lib/projects/watch.js +168 -0
  735. package/lib/prompts/__tests__/createDeveloperTestAccountConfigPrompt.test.d.ts +1 -0
  736. package/lib/prompts/__tests__/createDeveloperTestAccountConfigPrompt.test.js +157 -0
  737. package/lib/prompts/__tests__/createFunctionPrompt.test.d.ts +1 -0
  738. package/lib/prompts/__tests__/createFunctionPrompt.test.js +129 -0
  739. package/lib/prompts/__tests__/createModulePrompt.test.d.ts +1 -0
  740. package/lib/prompts/__tests__/createModulePrompt.test.js +187 -0
  741. package/lib/prompts/__tests__/createTemplatePrompt.test.d.ts +1 -0
  742. package/lib/prompts/__tests__/createTemplatePrompt.test.js +102 -0
  743. package/lib/prompts/__tests__/downloadProjectPrompt.test.d.ts +1 -0
  744. package/lib/prompts/__tests__/downloadProjectPrompt.test.js +31 -0
  745. package/lib/prompts/__tests__/projectAddPrompt.test.d.ts +1 -0
  746. package/lib/prompts/__tests__/projectAddPrompt.test.js +143 -0
  747. package/lib/prompts/__tests__/projectsLogsPrompt.test.d.ts +1 -0
  748. package/lib/prompts/__tests__/projectsLogsPrompt.test.js +37 -0
  749. package/lib/prompts/__tests__/selectProjectTemplatePrompt.test.d.ts +1 -0
  750. package/lib/prompts/__tests__/selectProjectTemplatePrompt.test.js +160 -0
  751. package/lib/prompts/accountNamePrompt.d.ts +11 -0
  752. package/lib/prompts/accountNamePrompt.js +64 -0
  753. package/lib/prompts/accountsPrompt.d.ts +2 -0
  754. package/lib/prompts/accountsPrompt.js +33 -0
  755. package/lib/prompts/cmsFieldPrompt.d.ts +1 -0
  756. package/lib/prompts/cmsFieldPrompt.js +40 -0
  757. package/lib/prompts/confirmImportDataPrompt.d.ts +1 -0
  758. package/lib/prompts/confirmImportDataPrompt.js +12 -0
  759. package/lib/prompts/createApiSamplePrompt.d.ts +10 -0
  760. package/lib/prompts/createApiSamplePrompt.js +58 -0
  761. package/lib/prompts/createDeveloperTestAccountConfigPrompt.d.ts +25 -0
  762. package/lib/prompts/createDeveloperTestAccountConfigPrompt.js +162 -0
  763. package/lib/prompts/createFunctionPrompt.d.ts +9 -0
  764. package/lib/prompts/createFunctionPrompt.js +94 -0
  765. package/lib/prompts/createModulePrompt.d.ts +10 -0
  766. package/lib/prompts/createModulePrompt.js +116 -0
  767. package/lib/prompts/createTemplatePrompt.d.ts +6 -0
  768. package/lib/prompts/createTemplatePrompt.js +29 -0
  769. package/lib/prompts/downloadProjectPrompt.d.ts +10 -0
  770. package/lib/prompts/downloadProjectPrompt.js +53 -0
  771. package/lib/prompts/importDataFilePathPrompt.d.ts +1 -0
  772. package/lib/prompts/importDataFilePathPrompt.js +26 -0
  773. package/lib/prompts/importDataTestAccountSelectPrompt.d.ts +3 -0
  774. package/lib/prompts/importDataTestAccountSelectPrompt.js +28 -0
  775. package/lib/prompts/installAppPrompt.d.ts +2 -0
  776. package/lib/prompts/installAppPrompt.js +39 -0
  777. package/lib/prompts/personalAccessKeyPrompt.d.ts +29 -0
  778. package/lib/prompts/personalAccessKeyPrompt.js +135 -0
  779. package/lib/prompts/previewPrompt.d.ts +15 -0
  780. package/lib/prompts/previewPrompt.js +48 -0
  781. package/lib/prompts/projectAddPrompt.d.ts +15 -0
  782. package/lib/prompts/projectAddPrompt.js +82 -0
  783. package/lib/prompts/projectDevTargetAccountPrompt.d.ts +12 -0
  784. package/lib/prompts/projectDevTargetAccountPrompt.js +166 -0
  785. package/lib/prompts/projectNameAndDestPrompt.d.ts +3 -0
  786. package/lib/prompts/projectNameAndDestPrompt.js +53 -0
  787. package/lib/prompts/projectNamePrompt.d.ts +6 -0
  788. package/lib/prompts/projectNamePrompt.js +27 -0
  789. package/lib/prompts/projectsLogsPrompt.d.ts +12 -0
  790. package/lib/prompts/projectsLogsPrompt.js +20 -0
  791. package/lib/prompts/promptUtils.d.ts +32 -0
  792. package/lib/prompts/promptUtils.js +222 -0
  793. package/lib/prompts/sandboxesPrompt.d.ts +10 -0
  794. package/lib/prompts/sandboxesPrompt.js +63 -0
  795. package/lib/prompts/secretPrompt.d.ts +13 -0
  796. package/lib/prompts/secretPrompt.js +31 -0
  797. package/lib/prompts/selectAppPrompt.d.ts +2 -0
  798. package/lib/prompts/selectAppPrompt.js +37 -0
  799. package/lib/prompts/selectHubDBTablePrompt.d.ts +12 -0
  800. package/lib/prompts/selectHubDBTablePrompt.js +66 -0
  801. package/lib/prompts/selectProjectTemplatePrompt.d.ts +27 -0
  802. package/lib/prompts/selectProjectTemplatePrompt.js +75 -0
  803. package/lib/prompts/selectPublicAppForMigrationPrompt.d.ts +9 -0
  804. package/lib/prompts/selectPublicAppForMigrationPrompt.js +68 -0
  805. package/lib/prompts/setAsDefaultAccountPrompt.d.ts +1 -0
  806. package/lib/prompts/setAsDefaultAccountPrompt.js +26 -0
  807. package/lib/prompts/uploadPrompt.d.ts +9 -0
  808. package/lib/prompts/uploadPrompt.js +32 -0
  809. package/lib/sandboxes.d.ts +14 -0
  810. package/lib/sandboxes.js +105 -0
  811. package/lib/schema.d.ts +3 -0
  812. package/lib/schema.js +27 -0
  813. package/lib/serverlessLogs.d.ts +4 -0
  814. package/lib/serverlessLogs.js +154 -0
  815. package/lib/testUtils.d.ts +14 -0
  816. package/lib/testUtils.js +18 -0
  817. package/lib/theme/__tests__/migrate.test.d.ts +1 -0
  818. package/lib/theme/__tests__/migrate.test.js +247 -0
  819. package/lib/theme/cmsDevServerProcess.d.ts +12 -0
  820. package/lib/theme/cmsDevServerProcess.js +148 -0
  821. package/lib/theme/cmsDevServerRunner.d.ts +14 -0
  822. package/lib/theme/cmsDevServerRunner.js +90 -0
  823. package/lib/theme/migrate.d.ts +13 -0
  824. package/lib/theme/migrate.js +85 -0
  825. package/lib/ui/SpinniesManager.d.ts +39 -0
  826. package/lib/ui/SpinniesManager.js +259 -0
  827. package/lib/ui/__tests__/SpinniesManager.test.d.ts +1 -0
  828. package/lib/ui/__tests__/SpinniesManager.test.js +488 -0
  829. package/lib/ui/__tests__/removeAnsiCodes.test.d.ts +1 -0
  830. package/lib/ui/__tests__/removeAnsiCodes.test.js +84 -0
  831. package/lib/ui/git.d.ts +1 -0
  832. package/lib/ui/git.js +25 -0
  833. package/lib/ui/index.d.ts +31 -0
  834. package/lib/ui/index.js +150 -0
  835. package/lib/ui/logger.d.ts +11 -0
  836. package/lib/ui/logger.js +13 -0
  837. package/lib/ui/removeAnsiCodes.d.ts +1 -0
  838. package/lib/ui/removeAnsiCodes.js +4 -0
  839. package/lib/ui/serverlessFunctionLogs.d.ts +9 -0
  840. package/lib/ui/serverlessFunctionLogs.js +88 -0
  841. package/lib/ui/spinniesUtils.d.ts +32 -0
  842. package/lib/ui/spinniesUtils.js +151 -0
  843. package/lib/ui/supportHyperlinks.d.ts +7 -0
  844. package/lib/ui/supportHyperlinks.js +59 -0
  845. package/lib/ui/supportsColor.d.ts +17 -0
  846. package/lib/ui/supportsColor.js +97 -0
  847. package/lib/ui/uiMessages.d.ts +73 -0
  848. package/lib/ui/uiMessages.js +76 -0
  849. package/lib/upload.d.ts +1 -0
  850. package/lib/upload.js +49 -0
  851. package/lib/usageTracking.d.ts +32 -0
  852. package/lib/usageTracking.js +174 -0
  853. package/lib/utils/hasFlag.d.ts +1 -0
  854. package/lib/utils/hasFlag.js +9 -0
  855. package/lib/validation.d.ts +13 -0
  856. package/lib/validation.js +142 -0
  857. package/lib/yargsUtils.d.ts +16 -0
  858. package/lib/yargsUtils.js +49 -0
  859. package/mcp-server/server.d.ts +1 -0
  860. package/mcp-server/server.js +13 -0
  861. package/mcp-server/tools/cms/HsCreateFunctionTool.d.ts +24 -0
  862. package/mcp-server/tools/cms/HsCreateFunctionTool.js +105 -0
  863. package/mcp-server/tools/cms/HsCreateModuleTool.d.ts +20 -0
  864. package/mcp-server/tools/cms/HsCreateModuleTool.js +127 -0
  865. package/mcp-server/tools/cms/HsCreateTemplateTool.d.ts +25 -0
  866. package/mcp-server/tools/cms/HsCreateTemplateTool.js +84 -0
  867. package/mcp-server/tools/cms/HsFunctionLogsTool.d.ts +18 -0
  868. package/mcp-server/tools/cms/HsFunctionLogsTool.js +75 -0
  869. package/mcp-server/tools/cms/HsListFunctionsTool.d.ts +15 -0
  870. package/mcp-server/tools/cms/HsListFunctionsTool.js +64 -0
  871. package/mcp-server/tools/cms/HsListTool.d.ts +15 -0
  872. package/mcp-server/tools/cms/HsListTool.js +64 -0
  873. package/mcp-server/tools/cms/__tests__/HsCreateFunctionTool.test.d.ts +1 -0
  874. package/mcp-server/tools/cms/__tests__/HsCreateFunctionTool.test.js +254 -0
  875. package/mcp-server/tools/cms/__tests__/HsCreateModuleTool.test.d.ts +1 -0
  876. package/mcp-server/tools/cms/__tests__/HsCreateModuleTool.test.js +227 -0
  877. package/mcp-server/tools/cms/__tests__/HsCreateTemplateTool.test.d.ts +1 -0
  878. package/mcp-server/tools/cms/__tests__/HsCreateTemplateTool.test.js +208 -0
  879. package/mcp-server/tools/cms/__tests__/HsFunctionLogsTool.test.d.ts +1 -0
  880. package/mcp-server/tools/cms/__tests__/HsFunctionLogsTool.test.js +186 -0
  881. package/mcp-server/tools/cms/__tests__/HsListFunctionsTool.test.d.ts +1 -0
  882. package/mcp-server/tools/cms/__tests__/HsListFunctionsTool.test.js +124 -0
  883. package/mcp-server/tools/cms/__tests__/HsListTool.test.d.ts +1 -0
  884. package/mcp-server/tools/cms/__tests__/HsListTool.test.js +124 -0
  885. package/mcp-server/tools/index.d.ts +3 -0
  886. package/mcp-server/tools/index.js +48 -0
  887. package/mcp-server/tools/project/AddFeatureToProjectTool.d.ts +36 -0
  888. package/mcp-server/tools/project/AddFeatureToProjectTool.js +82 -0
  889. package/mcp-server/tools/project/CreateProjectTool.d.ts +40 -0
  890. package/mcp-server/tools/project/CreateProjectTool.js +98 -0
  891. package/mcp-server/tools/project/CreateTestAccountTool.d.ts +51 -0
  892. package/mcp-server/tools/project/CreateTestAccountTool.js +170 -0
  893. package/mcp-server/tools/project/DeployProjectTool.d.ts +15 -0
  894. package/mcp-server/tools/project/DeployProjectTool.js +58 -0
  895. package/mcp-server/tools/project/DocFetchTool.d.ts +14 -0
  896. package/mcp-server/tools/project/DocFetchTool.js +57 -0
  897. package/mcp-server/tools/project/DocsSearchTool.d.ts +23 -0
  898. package/mcp-server/tools/project/DocsSearchTool.js +69 -0
  899. package/mcp-server/tools/project/GetApiUsagePatternsByAppIdTool.d.ts +16 -0
  900. package/mcp-server/tools/project/GetApiUsagePatternsByAppIdTool.js +73 -0
  901. package/mcp-server/tools/project/GetApplicationInfoTool.d.ts +13 -0
  902. package/mcp-server/tools/project/GetApplicationInfoTool.js +56 -0
  903. package/mcp-server/tools/project/GetBuildLogsTool.d.ts +21 -0
  904. package/mcp-server/tools/project/GetBuildLogsTool.js +124 -0
  905. package/mcp-server/tools/project/GetBuildStatusTool.d.ts +16 -0
  906. package/mcp-server/tools/project/GetBuildStatusTool.js +165 -0
  907. package/mcp-server/tools/project/GetConfigValuesTool.d.ts +15 -0
  908. package/mcp-server/tools/project/GetConfigValuesTool.js +65 -0
  909. package/mcp-server/tools/project/GuidedWalkthroughTool.d.ts +19 -0
  910. package/mcp-server/tools/project/GuidedWalkthroughTool.js +50 -0
  911. package/mcp-server/tools/project/UploadProjectTools.d.ts +16 -0
  912. package/mcp-server/tools/project/UploadProjectTools.js +83 -0
  913. package/mcp-server/tools/project/ValidateProjectTool.d.ts +14 -0
  914. package/mcp-server/tools/project/ValidateProjectTool.js +42 -0
  915. package/mcp-server/tools/project/__tests__/AddFeatureToProjectTool.test.d.ts +1 -0
  916. package/mcp-server/tools/project/__tests__/AddFeatureToProjectTool.test.js +157 -0
  917. package/mcp-server/tools/project/__tests__/CreateProjectTool.test.d.ts +1 -0
  918. package/mcp-server/tools/project/__tests__/CreateProjectTool.test.js +131 -0
  919. package/mcp-server/tools/project/__tests__/CreateTestAccountTool.test.d.ts +1 -0
  920. package/mcp-server/tools/project/__tests__/CreateTestAccountTool.test.js +461 -0
  921. package/mcp-server/tools/project/__tests__/DeployProjectTool.test.d.ts +1 -0
  922. package/mcp-server/tools/project/__tests__/DeployProjectTool.test.js +125 -0
  923. package/mcp-server/tools/project/__tests__/DocFetchTool.test.d.ts +1 -0
  924. package/mcp-server/tools/project/__tests__/DocFetchTool.test.js +125 -0
  925. package/mcp-server/tools/project/__tests__/DocsSearchTool.test.d.ts +1 -0
  926. package/mcp-server/tools/project/__tests__/DocsSearchTool.test.js +210 -0
  927. package/mcp-server/tools/project/__tests__/GetApiUsagePatternsByAppIdTool.test.d.ts +1 -0
  928. package/mcp-server/tools/project/__tests__/GetApiUsagePatternsByAppIdTool.test.js +146 -0
  929. package/mcp-server/tools/project/__tests__/GetApplicationInfoTool.test.d.ts +1 -0
  930. package/mcp-server/tools/project/__tests__/GetApplicationInfoTool.test.js +124 -0
  931. package/mcp-server/tools/project/__tests__/GetBuildLogsTool.test.d.ts +1 -0
  932. package/mcp-server/tools/project/__tests__/GetBuildLogsTool.test.js +307 -0
  933. package/mcp-server/tools/project/__tests__/GetBuildStatusTool.test.d.ts +1 -0
  934. package/mcp-server/tools/project/__tests__/GetBuildStatusTool.test.js +242 -0
  935. package/mcp-server/tools/project/__tests__/GetConfigValuesTool.test.d.ts +1 -0
  936. package/mcp-server/tools/project/__tests__/GetConfigValuesTool.test.js +209 -0
  937. package/mcp-server/tools/project/__tests__/GuidedWalkthroughTool.test.d.ts +1 -0
  938. package/mcp-server/tools/project/__tests__/GuidedWalkthroughTool.test.js +158 -0
  939. package/mcp-server/tools/project/__tests__/UploadProjectTools.test.d.ts +1 -0
  940. package/mcp-server/tools/project/__tests__/UploadProjectTools.test.js +187 -0
  941. package/mcp-server/tools/project/__tests__/ValidateProjectTool.test.d.ts +1 -0
  942. package/mcp-server/tools/project/__tests__/ValidateProjectTool.test.js +118 -0
  943. package/mcp-server/tools/project/constants.d.ts +18 -0
  944. package/mcp-server/tools/project/constants.js +29 -0
  945. package/mcp-server/types.d.ts +14 -0
  946. package/mcp-server/types.js +13 -0
  947. package/mcp-server/utils/__tests__/command.test.d.ts +1 -0
  948. package/mcp-server/utils/__tests__/command.test.js +275 -0
  949. package/mcp-server/utils/__tests__/content.test.d.ts +1 -0
  950. package/mcp-server/utils/__tests__/content.test.js +164 -0
  951. package/mcp-server/utils/__tests__/feedbackTracking.test.d.ts +1 -0
  952. package/mcp-server/utils/__tests__/feedbackTracking.test.js +69 -0
  953. package/mcp-server/utils/command.d.ts +8 -0
  954. package/mcp-server/utils/command.js +33 -0
  955. package/mcp-server/utils/config.d.ts +1 -0
  956. package/mcp-server/utils/config.js +10 -0
  957. package/mcp-server/utils/content.d.ts +3 -0
  958. package/mcp-server/utils/content.js +24 -0
  959. package/mcp-server/utils/feedbackTracking.d.ts +1 -0
  960. package/mcp-server/utils/feedbackTracking.js +26 -0
  961. package/mcp-server/utils/toolUsageTracking.d.ts +3 -0
  962. package/mcp-server/utils/toolUsageTracking.js +24 -0
  963. package/package.json +2 -5
  964. package/types/Cms.d.ts +46 -0
  965. package/types/Cms.js +27 -0
  966. package/types/LocalDev.d.ts +47 -0
  967. package/types/LocalDev.js +1 -0
  968. package/types/PackageJson.d.ts +10 -0
  969. package/types/PackageJson.js +1 -0
  970. package/types/ProjectComponents.d.ts +23 -0
  971. package/types/ProjectComponents.js +2 -0
  972. package/types/Projects.d.ts +130 -0
  973. package/types/Projects.js +6 -0
  974. package/types/Prompts.d.ts +28 -0
  975. package/types/Prompts.js +1 -0
  976. package/types/Sandboxes.d.ts +5 -0
  977. package/types/Sandboxes.js +1 -0
  978. package/types/Yargs.d.ts +46 -0
  979. package/types/Yargs.js +1 -0
  980. package/ui/components/ActionSection.d.ts +12 -0
  981. package/ui/components/ActionSection.js +25 -0
  982. package/ui/components/BoxWithTitle.d.ts +11 -0
  983. package/ui/components/BoxWithTitle.js +9 -0
  984. package/ui/components/FullScreen.d.ts +6 -0
  985. package/ui/components/FullScreen.js +13 -0
  986. package/ui/components/HorizontalSelectPrompt.d.ts +8 -0
  987. package/ui/components/HorizontalSelectPrompt.js +30 -0
  988. package/ui/components/InputField.d.ts +10 -0
  989. package/ui/components/InputField.js +10 -0
  990. package/ui/components/SelectInput.d.ts +11 -0
  991. package/ui/components/SelectInput.js +59 -0
  992. package/ui/components/StatusIcon.d.ts +9 -0
  993. package/ui/components/StatusIcon.js +17 -0
  994. package/ui/components/StatusMessageBoxes.d.ts +13 -0
  995. package/ui/components/StatusMessageBoxes.js +31 -0
  996. package/ui/components/Table.d.ts +89 -0
  997. package/ui/components/Table.js +246 -0
  998. package/ui/components/getStarted/GetStartedFlow.d.ts +8 -0
  999. package/ui/components/getStarted/GetStartedFlow.js +213 -0
  1000. package/ui/components/getStarted/reducer.d.ts +79 -0
  1001. package/ui/components/getStarted/reducer.js +108 -0
  1002. package/ui/components/getStarted/screens/InstallationScreen.d.ts +7 -0
  1003. package/ui/components/getStarted/screens/InstallationScreen.js +16 -0
  1004. package/ui/components/getStarted/screens/ProjectSetupScreen.d.ts +16 -0
  1005. package/ui/components/getStarted/screens/ProjectSetupScreen.js +40 -0
  1006. package/ui/components/getStarted/screens/UploadScreen.d.ts +7 -0
  1007. package/ui/components/getStarted/screens/UploadScreen.js +43 -0
  1008. package/ui/components/getStarted/selectors.d.ts +2 -0
  1009. package/ui/components/getStarted/selectors.js +1 -0
  1010. package/ui/constants.d.ts +6 -0
  1011. package/ui/constants.js +6 -0
  1012. package/ui/lib/constants.d.ts +17 -0
  1013. package/ui/lib/constants.js +17 -0
  1014. package/ui/lib/table.d.ts +2 -0
  1015. package/ui/lib/table.js +11 -0
  1016. package/ui/lib/useTerminalSize.d.ts +13 -0
  1017. package/ui/lib/useTerminalSize.js +31 -0
  1018. package/ui/playground/Playground.d.ts +5 -0
  1019. package/ui/playground/Playground.js +25 -0
  1020. package/ui/playground/fixtures.d.ts +9 -0
  1021. package/ui/playground/fixtures.js +126 -0
  1022. package/ui/render.d.ts +23 -0
  1023. package/ui/render.js +75 -0
  1024. package/ui/styles.d.ts +21 -0
  1025. package/ui/styles.js +21 -0
package/lang/en.js ADDED
@@ -0,0 +1,4044 @@
1
+ import chalk from 'chalk';
2
+ import { mapToUserFriendlyName } from '@hubspot/project-parsing-lib/transform';
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, uiAuthCommandReference, } from '../lib/ui/index.js';
7
+ import { getProjectDetailUrl, getProjectSettingsUrl, getLocalDevUiUrl, } from '../lib/projects/urls.js';
8
+ import { getProductUpdatesUrl } from '../lib/links.js';
9
+ import { APP_DISTRIBUTION_TYPES, APP_AUTH_TYPES, PROJECT_CONFIG_FILE, PROJECT_WITH_APP, LEGACY_PUBLIC_APP_FILE, } from '../lib/constants.js';
10
+ export const commands = {
11
+ generalErrors: {
12
+ srcIsProject: (src, command) => `"${src}" is in a project folder. Did you mean "hs project ${command}"?`,
13
+ validateConfigMiddleware: {
14
+ missingConfigFile: `A HubSpot config file is required to run this command, but none was found. To create a new config file and authenticate a HubSpot account, run ${uiCommandReference('hs account auth')}`,
15
+ configValidationFailed: (errors) => `Your HubSpot config file is invalid. Please fix the following errors:\n - ${errors.join('\n- ')}`,
16
+ },
17
+ },
18
+ getStarted: {
19
+ describe: 'A step-by-step command to get you started with a HubSpot project.',
20
+ options: {
21
+ dest: {
22
+ describe: 'Directory where the project should be created',
23
+ },
24
+ name: {
25
+ describe: 'Project name (cannot be changed)',
26
+ },
27
+ v2: {
28
+ describe: 'Use the new v2 get-started experience',
29
+ },
30
+ templateSource: {
31
+ describe: 'Path to custom GitHub repository from which to create project template',
32
+ },
33
+ },
34
+ v2: {
35
+ unknownError: 'An unknown error occurred',
36
+ startTitle: 'Welcome to the HubSpot Developer Platform!',
37
+ guideOverview: (accountName) => `This guide will walk you through deploying your first project to ${chalk.bold(accountName)}. To target a different account, exit this guide ${chalk.bold('(ctrl + c)')} and run ${uiCommandReference('hs account use')} before trying again.`,
38
+ projects: 'Projects are used to build a variety of components.',
39
+ runningProjectCreate: `Running \`${uiCommandReference('hs project create', false)}\` ...`,
40
+ templateSourceFlag: '--template-source=',
41
+ runningInstallDeps: `Running \`${uiCommandReference('hs project install-deps', false)}\` to initialize dependencies ...`,
42
+ installingDependenciesIn: (installPath) => `Installing dependencies in ${installPath}`,
43
+ createdProjectSuccess: (projectName, projectDest) => `[SUCCESS] Project ${chalk.bold(projectName)} was successfully created in ${projectDest}`,
44
+ pressEnterToContinueDeploy: (accountName) => `Press ${chalk.bold('<enter>')} to deploy this project to ${chalk.bold(accountName)} ...`,
45
+ uploadingProject: `Running \`${uiCommandReference('hs project upload', false)}\` to upload and deploy your project...`,
46
+ uploadSuccess: '✓ Upload and deploy complete!',
47
+ appDeployedReady: '🚀 Your new app is now deployed on HubSpot and ready to install!',
48
+ appConfigDetails: 'App configuration details:',
49
+ distribution: 'distribution',
50
+ authType: 'auth type',
51
+ checkOutConfig: (configPath) => `Check out ${chalk.cyan(configPath)} for the full configuration.`,
52
+ pressEnterToInstall: (accountName) => `? Press ${chalk.bold('<enter>')} to continue installing and previewing this app in ${chalk.bold(accountName)}`,
53
+ pressKeyToExit: `Press any key to exit...`,
54
+ installingApp: (appName, accountName) => `Installing ${chalk.bold(appName)} in ${chalk.bold(accountName)}...`,
55
+ installInstructions: `We'll take you to your HubSpot account and walk you through installing your app.`,
56
+ browserFailedToOpen: (url) => `⚠️ Failed to open browser automatically. Please open this URL manually:\n${chalk.cyan(url)}`,
57
+ pollingTimeout: (minutes) => `⚠️ Installation polling timed out after ${minutes} minutes. The app may still be installing in the background.`,
58
+ pressEnterToContinueSetup: `Press ${chalk.bold('<enter>')} to continue with card setup...`,
59
+ prompts: {
60
+ selectOptionV2: 'Choose a component type to get started',
61
+ options: {
62
+ app: 'App',
63
+ cms: 'CMS assets',
64
+ cmsTheme: 'CMS theme (coming soon)',
65
+ cmsReactModule: 'CMS React module (coming soon)',
66
+ },
67
+ },
68
+ },
69
+ startTitle: 'Welcome to HubSpot Development!',
70
+ verboseDescribe: 'A step-by-step command to get you started with a HubSpot project.',
71
+ startDescription: 'You can use the HubSpot CLI to build apps, CMS themes, and more.\n',
72
+ 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.`,
73
+ designManager: 'To onboard with CMS, please visit the HubSpot Design Manager in your account and follow the checklist items.',
74
+ openDesignManager: 'Click here to go to the HubSpot Design Manager',
75
+ openDesignManagerPrompt: 'Open Design Manager in your browser?',
76
+ openedDesignManager: 'Redirected to Design Manager!',
77
+ developerOverviewBrowserOpenPrep: "We'll take you to your HubSpot account and walk you through installing and previewing your new app.",
78
+ openInstallUrl: 'Open HubSpot to install your app in your account?',
79
+ openedDeveloperOverview: 'HubSpot opened!',
80
+ prompts: {
81
+ selectOption: 'Are you looking to build apps or CMS assets?',
82
+ selectOptionV2: 'Choose a component type to get started',
83
+ options: {
84
+ app: 'App',
85
+ cms: 'CMS assets',
86
+ cmsTheme: 'CMS theme (coming soon)',
87
+ cmsReactModule: 'CMS React module (coming soon)',
88
+ },
89
+ uploadProject: (accountName) => `Would you like to upload this project to account "${accountName}" now?`,
90
+ projectCreated: {
91
+ title: chalk.bold('Next steps:'),
92
+ description: `Let's prepare and upload your project to HubSpot.\nYou can use ${uiCommandReference('hs project upload')} to ${chalk.bold('upload')} your project.`,
93
+ },
94
+ },
95
+ logs: {
96
+ 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.`,
97
+ uploadingProject: 'Uploading your project to HubSpot...',
98
+ uploadSuccess: 'Project uploaded successfully!',
99
+ developerOverviewLink: 'Open this link to navigate to your HubSpot developer portal',
100
+ initialUploadMessage: 'Initial upload from get-started command',
101
+ },
102
+ errors: {
103
+ uploadFailed: 'Failed to upload project to HubSpot.',
104
+ configFileNotFound: 'Could not find project configuration for upload.',
105
+ noAppsFound: 'No apps found after deployment.',
106
+ uploadActionFailed: 'Upload failed',
107
+ buildOrDeployFailed: 'Build or deploy failed',
108
+ failedToUploadAndDeploy: 'Failed to upload and deploy project',
109
+ },
110
+ },
111
+ completion: {
112
+ describe: 'Enable bash completion shortcuts for commands. Concat the generated script to your .bashrc, .bash_profile, or .zshrc file.',
113
+ examples: {
114
+ default: 'Generate shell completion scripts for the zsh shell',
115
+ },
116
+ },
117
+ account: {
118
+ describe: 'Commands for managing configured accounts.',
119
+ subcommands: {
120
+ auth: {
121
+ describe: 'Configure authentication for your HubSpot account.',
122
+ 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.`,
123
+ options: {
124
+ account: 'HubSpot account to authenticate',
125
+ personalAccessKey: 'Enter existing personal access key',
126
+ },
127
+ errors: {
128
+ invalidAccountIdProvided: `--account must be a number.`,
129
+ failedToUpdateConfig: 'Failed to update the configuration file. Please try again.',
130
+ migrationNotConfirmed: `Did not migrate your configuration file. Run ${uiAuthCommandReference()} to update your existing config, or use ${uiCommandReference('hs config migrate')} to switch to the new global configuration.`,
131
+ 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')}.`,
132
+ },
133
+ success: {
134
+ configFileCreated: (configPath) => `Created config file "${configPath}"`,
135
+ configFileUpdated: (accountId) => `Connected account ${uiAccountDescription(accountId)} and set it as the default account`,
136
+ },
137
+ },
138
+ list: {
139
+ accounts: `${chalk.bold('Accounts')}:`,
140
+ defaultAccountTitle: `${chalk.bold('Default Account')}`,
141
+ currentResolvedDefaultAccount: (accountId) => `Account: ${uiAccountDescription(accountId)}`,
142
+ describe: 'List names of accounts defined in config.',
143
+ configPath: (configPath) => `Source: ${configPath}`,
144
+ overrideFilePathTitle: `${chalk.bold('Default Account Override')}`,
145
+ overrideFilePath: (overrideFilePath) => `Source: ${overrideFilePath}`,
146
+ labels: {
147
+ accountId: 'Account ID',
148
+ authType: 'Auth Type',
149
+ name: 'Name',
150
+ },
151
+ },
152
+ rename: {
153
+ describe: 'Rename an account in the config.',
154
+ positionals: {
155
+ accountName: {
156
+ describe: 'Name of account to be renamed.',
157
+ },
158
+ newName: {
159
+ describe: 'New name for account.',
160
+ },
161
+ },
162
+ success: {
163
+ renamed: (name, newName, nameWasSanitized) => `Account "${chalk.bold(name)}" successfully renamed to "${chalk.bold(newName)}"${nameWasSanitized ? ' (Sanitized to remove invalid characters)' : ''}.`,
164
+ },
165
+ },
166
+ use: {
167
+ describe: 'Set the Hubspot account to use as the default account. The default account can be overridden with the "--account" option.',
168
+ errors: {
169
+ accountNotFound: (specifiedAccount, configPath) => `The account "${specifiedAccount}" could not be found in ${configPath}`,
170
+ },
171
+ accountOverride: (accountOverride) => `This project currently has an account override set: "${accountOverride}". Account "${accountOverride}" will continue to act as the default account for this project.`,
172
+ accountOverrideCommands: `Use ${uiCommandReference('hs account create-override')} to change override accounts, or ${uiCommandReference('hs account remove-override')} to remove the override and use your default account.`,
173
+ examples: {
174
+ default: 'Select a HubSpot account to use as the default account',
175
+ idBased: 'Set the default account to the account in the config with accountId equal to "1234567"',
176
+ nameBased: 'Set the default account to the account in the config with name equal to "MyAccount"',
177
+ },
178
+ options: {
179
+ account: {
180
+ describe: 'Account name or id to use as the default',
181
+ },
182
+ },
183
+ promptMessage: 'Select an account to use as the default',
184
+ authenticateNewAccount: '<Authenticate a new account>',
185
+ success: {
186
+ defaultAccountUpdated: (accountName) => `Default account updated to "${accountName}"`,
187
+ },
188
+ },
189
+ remove: {
190
+ describe: 'Remove an account from the config.',
191
+ logs: {
192
+ replaceDefaultAccount: 'The removed account was the default account.',
193
+ },
194
+ prompts: {
195
+ deleteOverrideFile: (overrideFilePath, accountName) => `Delete the override file (${overrideFilePath}) associated with ${accountName}?`,
196
+ selectAccountToRemove: 'Select an account to remove from the config',
197
+ },
198
+ errors: {
199
+ accountNotFound: (specifiedAccount, configPath) => `The account "${specifiedAccount}" could not be found in ${configPath}`,
200
+ },
201
+ examples: {
202
+ default: 'Select a HubSpot account to remove from the config',
203
+ byName: 'Remove the account "MyAccount" from the config',
204
+ },
205
+ options: {
206
+ account: {
207
+ describe: 'Account name or id to remove',
208
+ },
209
+ },
210
+ promptMessage: 'Select an account to remove',
211
+ success: {
212
+ accountRemoved: (accountName) => `Account "${accountName}" removed from the config`,
213
+ },
214
+ },
215
+ removeOverride: {
216
+ describe: (overrideFile) => `Remove the default account override file (${overrideFile}) from the current working directory.`,
217
+ accountOverride: (overrideFilePath, accountOverride) => `There is an account override file at ${overrideFilePath} associated with account "${accountOverride}".`,
218
+ prompts: {
219
+ deleteOverrideFile: 'Delete account override file?',
220
+ },
221
+ success: 'Removed the default account override file.',
222
+ noOverrideFile: 'No default account override file found in the current working directory. No action required.',
223
+ errors: {
224
+ globalConfigNotFound: `This command is only compatible with our new global config. Run ${uiCommandReference('hs account auth')} to get started.`,
225
+ },
226
+ options: {
227
+ force: {
228
+ describe: 'Skip confirmation prompt when removing the override file',
229
+ },
230
+ },
231
+ },
232
+ info: {
233
+ accountId: (accountId) => `${chalk.bold('Account ID')}: ${accountId}`,
234
+ defaultAccountTitle: `${chalk.bold('Default Account')}`,
235
+ configPath: (configPath) => `Source: ${configPath}`,
236
+ defaultAccount: (accountName) => `Account: ${accountName}`,
237
+ overrideFilePathTitle: `${chalk.bold('Default Account Override')}`,
238
+ overrideFilePath: (overrideFilePath) => `Source: ${overrideFilePath}`,
239
+ overrideAccount: (accountName) => `Account: ${accountName}`,
240
+ describe: 'Print information about the default account, or about the account specified with the "account" option.',
241
+ errors: {
242
+ notUsingPersonalAccessKey: 'This command currently only supports fetching scopes for the personal access key auth type.',
243
+ },
244
+ options: {
245
+ account: {
246
+ describe: 'Account name or id to show info for',
247
+ },
248
+ },
249
+ examples: {
250
+ default: 'Print information for the default account',
251
+ idBased: 'Print information for the account with accountId equal to "1234567"',
252
+ nameBased: 'Print information for the account in the config with name equal to "MyAccount"',
253
+ },
254
+ name: (name) => `${chalk.bold('Account name')}: ${name}`,
255
+ scopeGroups: `${chalk.bold('Scopes available')}:`,
256
+ },
257
+ clean: {
258
+ describe: 'Check for inactive accounts and removes them from the CLI config.',
259
+ noResults: 'No inactive accounts found to remove.',
260
+ loading: {
261
+ add: 'Looking for inactive accounts…',
262
+ },
263
+ inactiveAccountsFound: {
264
+ one: '1 inactive account found:',
265
+ other: (count) => `${count} inactive accounts found:`,
266
+ },
267
+ confirm: {
268
+ one: 'Remove 1 inactive account from the CLI config?',
269
+ other: (count) => `Remove ${count} inactive accounts from the CLI config?`,
270
+ },
271
+ removeSuccess: (accountName) => `Removed ${accountName} from the CLI config.`,
272
+ replaceDefaultAccount: 'The default account was removed.',
273
+ defaultAccountOverride: (overrideFilePath) => `\n(This will also delete the default account override file at ${overrideFilePath})`,
274
+ },
275
+ createOverride: {
276
+ describe: (hsAccountFileName) => `Create a new default account override file (${hsAccountFileName}) in the current working directory.`,
277
+ success: (overrideFilePath) => `Default account override file created at ${overrideFilePath}`,
278
+ accountOverride: (overrideFilePath, accountOverride) => `An account override file already exists at ${overrideFilePath} associated with account "${accountOverride}".`,
279
+ prompts: {
280
+ replaceOverrideFile: 'Replace existing account override file?',
281
+ },
282
+ errors: {
283
+ globalConfigNotFound: `This command is only compatible with our new global config. Run ${uiCommandReference('hs account auth')} to get started.`,
284
+ accountNotFound: (configPath) => `The specified account could not be found in the config file ${configPath}`,
285
+ },
286
+ options: {
287
+ account: {
288
+ describe: 'Name or ID of the account to create an override file for.',
289
+ },
290
+ },
291
+ examples: {
292
+ default: (hsAccountFileName) => `Create a new default account override file (${hsAccountFileName}) in the current working directory`,
293
+ idBased: (hsAccountFileName) => `Create a new default account override file (${hsAccountFileName}) in the current working directory, using the account with accountId "1234567"`,
294
+ nameBased: (hsAccountFileName) => `Create a new default account override file (${hsAccountFileName}) in the current working directory, using the account with name "MyAccount"`,
295
+ },
296
+ },
297
+ },
298
+ },
299
+ auth: {
300
+ describe: 'Configure authentication for your HubSpot account.',
301
+ 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.`,
302
+ errors: {
303
+ invalidAccountIdProvided: `--account must be a number.`,
304
+ globalConfigFileExists: (accountAuthCommand) => `You are using our new global configuration for account management, which is not compatible with this command. Please use ${uiCommandReference(accountAuthCommand)} instead.`,
305
+ noConfigFileFound: 'No config file was found. To create a new config file, use the "hs init" command.',
306
+ unsupportedAuthType: (type, supportedProtocols) => `Unsupported auth type: ${type}. The only supported authentication protocols are ${supportedProtocols}.`,
307
+ },
308
+ options: {
309
+ authType: {
310
+ describe: 'Authentication mechanism',
311
+ defaultDescription: (authMethod) => `"${authMethod}": An access token tied to a specific user account. This is the recommended way of authenticating with local development tools.`,
312
+ },
313
+ account: {
314
+ describe: 'HubSpot account to authenticate',
315
+ },
316
+ personalAccessKey: {
317
+ describe: 'Enter existing personal access key',
318
+ },
319
+ },
320
+ success: {
321
+ configFileUpdated: (accountName, configFilename, authType) => `Account "${accountName}" updated in ${configFilename} using "${authType}"`,
322
+ },
323
+ },
324
+ config: {
325
+ describe: 'Commands for managing the CLI config file.',
326
+ subcommands: {
327
+ migrate: {
328
+ describe: `Migrate from the deprecated ${DEFAULT_HUBSPOT_CONFIG_YAML_FILE_NAME} file to the new global config file at ${GLOBAL_CONFIG_PATH}.`,
329
+ 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}.`,
330
+ errors: {
331
+ noConfigToMigrate: `No ${DEFAULT_HUBSPOT_CONFIG_YAML_FILE_NAME} was found. There is nothing to migrate.`,
332
+ configNotFound: (configPath) => `A configuration file at ${configPath} could not be found. Please try again with a valid file path.`,
333
+ },
334
+ options: {
335
+ force: 'Bypass prompts and overwrite any conflicting values in the global config with the deprecated config values.',
336
+ },
337
+ examples: {
338
+ default: `Migrate from the deprecated ${DEFAULT_HUBSPOT_CONFIG_YAML_FILE_NAME} file to the new global config file at ${GLOBAL_CONFIG_PATH}`,
339
+ configFlag: `Migrate a specific config file (specified with the config flag) to the new global config file at ${GLOBAL_CONFIG_PATH}`,
340
+ },
341
+ },
342
+ set: {
343
+ describe: 'Set various configuration options within the hubspot CLI config file.',
344
+ promptMessage: 'Select a config option to update',
345
+ examples: {
346
+ default: 'Opens a prompt to select a config item to modify',
347
+ },
348
+ options: {
349
+ defaultMode: {
350
+ describe: 'Set the default CMS publish mode',
351
+ },
352
+ allowUsageTracking: {
353
+ describe: 'Enable or disable usage tracking',
354
+ },
355
+ httpTimeout: {
356
+ describe: 'Set the http timeout duration',
357
+ },
358
+ allowAutoUpdates: {
359
+ describe: 'Enable or disable auto updates',
360
+ },
361
+ autoOpenBrowser: {
362
+ describe: 'Enable or disable automatic opening of the browser',
363
+ },
364
+ },
365
+ errors: {
366
+ invalidBoolean: (commandName, value) => `Invalid boolean value "${value}" for --${commandName}. Valid values are: true, false`,
367
+ invalidHTTPTimeout: `Invalid HTTP timeout value. Must be a number greater than 3000.`,
368
+ },
369
+ },
370
+ },
371
+ },
372
+ cms: {
373
+ describe: 'Commands for managing CMS assets.',
374
+ subcommands: {
375
+ template: {
376
+ describe: 'Commands for managing templates.',
377
+ subcommands: {
378
+ create: {
379
+ describe: 'Create a new CMS template.',
380
+ errors: {
381
+ unusablePath: (path) => `The "${path}" is not a usable path to a directory.`,
382
+ },
383
+ positionals: {
384
+ name: 'Name of the new template.',
385
+ dest: 'Destination folder for the new template.',
386
+ },
387
+ options: {
388
+ templateType: 'Template type for template creation.',
389
+ },
390
+ },
391
+ },
392
+ },
393
+ webpack: {
394
+ describe: 'Commands for managing webpack.',
395
+ subcommands: {
396
+ create: {
397
+ describe: 'Create a new webpack bundle.',
398
+ errors: {
399
+ unusablePath: (path) => `The "${path}" is not a usable path to a directory.`,
400
+ },
401
+ positionals: {
402
+ dest: 'Destination folder for the new webpack bundle.',
403
+ },
404
+ },
405
+ },
406
+ },
407
+ theme: {
408
+ describe: 'Commands for managing themes.',
409
+ subcommands: {
410
+ create: {
411
+ describe: 'Create a new theme.',
412
+ errors: {
413
+ unusablePath: (path) => `The "${path}" is not a usable path to a directory.`,
414
+ },
415
+ positionals: {
416
+ dest: 'Destination folder for the new theme.',
417
+ },
418
+ },
419
+ generateSelectors: {
420
+ describe: 'Automatically generates an editor-preview.json file for the given theme. The selectors this command generates are not perfect, so please edit editor-preview.json after running.',
421
+ errors: {
422
+ invalidPath: (themePath) => `Could not find directory "${themePath}"`,
423
+ fieldsNotFound: "Unable to find theme's fields.json.",
424
+ noSelectorsFound: 'No selectors found.',
425
+ },
426
+ success: (themePath, selectorsPath) => `Selectors generated for ${themePath}, please double check the selectors generated at ${selectorsPath} before uploading the theme.`,
427
+ positionals: {
428
+ path: "The path of the theme you'd like to generate an editor-preview.json for.",
429
+ },
430
+ },
431
+ marketplaceValidate: {
432
+ describe: 'Validate a theme for the marketplace.',
433
+ errors: {
434
+ invalidPath: (path) => `The path "${path}" is not a path to a folder in the Design Manager`,
435
+ },
436
+ logs: {
437
+ validatingTheme: (path) => `Validating theme "${path}" \n`,
438
+ },
439
+ results: {
440
+ required: 'Required validation results:',
441
+ recommended: 'Recommended validation results:',
442
+ warnings: {
443
+ file: (file) => `File: ${file}`,
444
+ lineNumber: (line) => `Line number: ${line}`,
445
+ },
446
+ noErrors: 'No errors',
447
+ },
448
+ positionals: {
449
+ path: {
450
+ describe: 'Path to the theme within the Design Manager.',
451
+ },
452
+ },
453
+ },
454
+ preview: {
455
+ describe: 'Upload and watch a theme directory on your computer for changes and start a local development server to preview theme changes on a site.',
456
+ errors: {
457
+ invalidPath: (path) => `The path "${path}" is not a path to a directory`,
458
+ noThemeComponents: 'Your project has no theme components available to preview.',
459
+ uploadFailed: (src, dest) => `Uploading file "${src}" to "${dest}" failed`,
460
+ },
461
+ positionals: {
462
+ src: 'Path to the local directory your theme is in, relative to your current working directory',
463
+ 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.',
464
+ },
465
+ options: {
466
+ noSsl: 'Disable HTTPS',
467
+ port: 'The port on which to start the local server',
468
+ },
469
+ initialUploadProgressBar: {
470
+ start: 'Starting...',
471
+ uploading: 'Uploading...',
472
+ finish: 'Complete!',
473
+ },
474
+ logs: {
475
+ processExited: 'Stopping dev server...',
476
+ },
477
+ },
478
+ },
479
+ },
480
+ app: {
481
+ describe: 'Commands for managing CMS apps.',
482
+ subcommands: {
483
+ create: {
484
+ describe: 'Create a new CMS app.',
485
+ errors: {
486
+ unsupportedAssetType: (assetType, supportedAssetTypes) => `The asset type ${assetType} is not supported. Supported asset types are ${supportedAssetTypes}.`,
487
+ unusablePath: (path) => `The "${path}" is not a usable path to a directory.`,
488
+ },
489
+ positionals: {
490
+ type: 'Type of the new app.',
491
+ name: 'Name of the new app.',
492
+ dest: 'Destination folder for the new app.',
493
+ },
494
+ },
495
+ },
496
+ },
497
+ list: {
498
+ describe: 'List remote contents of a directory in the HubSpot CMS.',
499
+ gettingPathContents: (path) => `Getting contents of ${path}.`,
500
+ noFilesFoundAtPath: (path) => `No files found in ${path}.`,
501
+ positionals: {
502
+ path: {
503
+ describe: 'Remote directory to list contents',
504
+ },
505
+ },
506
+ },
507
+ module: {
508
+ describe: 'Commands for working with modules, including marketplace validation with the marketplace-validate subcommand.',
509
+ subcommands: {
510
+ create: {
511
+ describe: 'Create a new CMS module.',
512
+ errors: {
513
+ unusablePath: (path) => `The "${path}" is not a usable path to a directory.`,
514
+ },
515
+ positionals: {
516
+ name: 'Name of the new module.',
517
+ dest: 'Destination folder for the new module.',
518
+ },
519
+ options: {
520
+ moduleLabel: 'Label for the new module.',
521
+ reactType: 'Whether to create a React module.',
522
+ contentTypes: (contentTypes) => `Content types where the module can be used (${contentTypes.join(', ')}).`,
523
+ global: 'Whether to create a global module.',
524
+ availableForNewContent: 'Whether to create a module available for new content.',
525
+ },
526
+ },
527
+ marketplaceValidate: {
528
+ describe: 'Validate a module for the marketplace. Make sure to include the suffix .module in the path to the module within the Design Manager.',
529
+ errors: {
530
+ invalidPath: (path) => `The path "${path}" is not a path to a module within the Design Manager.`,
531
+ },
532
+ logs: {
533
+ validatingModule: (path) => `Validating module "${path}" \n`,
534
+ },
535
+ results: {
536
+ required: 'Required validation results:',
537
+ recommended: 'Recommended validation results:',
538
+ warnings: {
539
+ file: (file) => `File: ${file}`,
540
+ lineNumber: (line) => `Line number: ${line}`,
541
+ },
542
+ noErrors: 'No errors',
543
+ },
544
+ positionals: {
545
+ src: 'Path to the module within the Design Manager.',
546
+ },
547
+ },
548
+ },
549
+ },
550
+ upload: {
551
+ describe: 'Upload a folder or file from your computer to the HubSpot CMS.',
552
+ errors: {
553
+ destinationRequired: 'A destination path needs to be passed',
554
+ fileIgnored: (path) => `The file "${path}" is being ignored via an .hsignore rule`,
555
+ invalidPath: (path) => `The path "${path}" is not a path to a file or folder`,
556
+ uploadFailed: (src, dest) => `Uploading file "${src}" to "${dest}" failed`,
557
+ someFilesFailed: (dest) => `One or more files failed to upload to "${dest}" in the Design Manager`,
558
+ deleteFailed: (path, accountId) => `Deleting "${path}" from account ${uiAccountDescription(accountId)} failed`,
559
+ },
560
+ options: {
561
+ options: 'Options to pass to javascript fields files',
562
+ saveOutput: "If true, saves all output from javascript fields files as 'fields.output.json'.",
563
+ convertFields: 'If true, converts any javascript fields files contained in module folder or project root.',
564
+ 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.',
565
+ force: 'Skips confirmation prompts when doing a clean upload.',
566
+ },
567
+ previewUrl: (previewUrl) => `To preview this theme, visit: ${previewUrl}`,
568
+ positionals: {
569
+ src: 'Path to the local file, relative to your current working directory.',
570
+ dest: 'Path in HubSpot Design Tools, can be a net new path.',
571
+ },
572
+ success: {
573
+ fileUploaded: (src, dest, accountId) => `Uploaded file from "${src}" to "${dest}" in the Design Manager of account ${uiAccountDescription(accountId)}`,
574
+ uploadComplete: (dest) => `Uploading files to "${dest}" in the Design Manager is complete`,
575
+ },
576
+ uploading: (src, dest, accountId) => `Uploading files from "${src}" to "${dest}" in the Design Manager of account ${uiAccountDescription(accountId)}`,
577
+ notUploaded: (src) => `There was an error processing "${src}". The file has not been uploaded.`,
578
+ cleaning: (filePath, accountId) => `Removing "${filePath}" from account ${uiAccountDescription(accountId)} and uploading local...`,
579
+ 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?`,
580
+ },
581
+ delete: {
582
+ describe: 'Delete a file or folder from the HubSpot CMS.',
583
+ deleted: (path, accountId) => `Deleted "${path}" from account ${uiAccountDescription(accountId)}`,
584
+ errors: {
585
+ deleteFailed: (path, accountId) => `Deleting "${path}" from account ${uiAccountDescription(accountId)} failed`,
586
+ },
587
+ positionals: {
588
+ path: 'Remote hubspot path',
589
+ },
590
+ },
591
+ watch: {
592
+ describe: 'Watch a directory on your computer for changes and upload the changed files to the HubSpot CMS.',
593
+ errors: {
594
+ folderFailed: (src, dest, accountId) => `Initial uploading of folder "${src}" to "${dest}" in account ${uiAccountDescription(accountId)} had failures`,
595
+ fileFailed: (file, dest, accountId) => `Upload of file "${file}" to "${dest}" in account ${uiAccountDescription(accountId)} failed`,
596
+ destinationRequired: 'A destination directory needs to be passed',
597
+ invalidPath: (path) => `The "${path}" is not a path to a directory`,
598
+ },
599
+ options: {
600
+ disableInitial: 'Disable the initial upload when watching a directory (default)',
601
+ initialUpload: 'Upload directory before watching for updates',
602
+ notify: 'Log to specified file when a watch task is triggered and after workers have gone idle. Ex. --notify path/to/file',
603
+ remove: 'Will cause watch to delete files in your HubSpot account that are not found locally.',
604
+ convertFields: 'If true, converts any javascript fields files contained in module folder or project root.',
605
+ saveOutput: "If true, saves all output from javascript fields files as 'fields.output.json'.",
606
+ options: 'Options to pass to javascript fields files',
607
+ },
608
+ positionals: {
609
+ src: 'Path to the local directory your files are in, relative to your current working directory',
610
+ dest: 'Path in HubSpot Design Tools. Can be a net new path',
611
+ },
612
+ },
613
+ fetch: {
614
+ describe: 'Fetch a file, directory or module from HubSpot and write to a path on your computer.',
615
+ errors: {
616
+ sourceRequired: 'A source to fetch is required.',
617
+ },
618
+ options: {
619
+ staging: {
620
+ describe: 'Retrieve staged changes for project',
621
+ },
622
+ assetVersion: {
623
+ describe: 'Specify what version of a default asset to fetch',
624
+ },
625
+ },
626
+ positionals: {
627
+ dest: {
628
+ describe: 'Local directory you would like the files to be placed in, relative to your current working directory',
629
+ },
630
+ src: {
631
+ describe: 'Path in HubSpot Design Tools',
632
+ },
633
+ },
634
+ },
635
+ lint: {
636
+ issuesFound: (count) => `${count} issues found.`,
637
+ groupName: (path) => `Linting ${path}`,
638
+ positionals: {
639
+ path: {
640
+ describe: 'Local folder to lint',
641
+ },
642
+ },
643
+ },
644
+ mv: {
645
+ describe: 'Move a remote file or folder in HubSpot. This feature is currently in beta and the CLI contract is subject to change.',
646
+ errors: {
647
+ sourcePathExists: (srcPath, destPath) => `The folder "${srcPath}" already exists in "${destPath}".`,
648
+ moveFailed: (srcPath, destPath, accountId) => `Moving "${srcPath}" to "${destPath}" in account ${accountId} failed`,
649
+ },
650
+ move: (srcPath, destPath, accountId) => `Moved "${srcPath}" to "${destPath}" in account ${accountId}`,
651
+ positionals: {
652
+ srcPath: {
653
+ describe: 'Remote hubspot path',
654
+ },
655
+ destPath: {
656
+ describe: 'Remote hubspot path',
657
+ },
658
+ },
659
+ },
660
+ lighthouseScore: {
661
+ describe: 'Score a theme using Google lighthouse.',
662
+ examples: {
663
+ default: 'Get the lighthouse score for the my-theme theme',
664
+ },
665
+ info: {
666
+ promptMessage: 'Select a theme to score',
667
+ fetchingThemes: 'Fetching available themes',
668
+ generatingScore: (theme) => `Generating Google Lighthouse score for ${theme}`,
669
+ targetDeviceNote: (target) => `Scores are being shown for ${target} only.`,
670
+ verboseOptionNote: 'Theme scores are averages of all theme templates. Use the [--verbose] option to include individual template scores.',
671
+ pageTemplateScoreTitle: 'Page template scores',
672
+ lighthouseLinksTitle: 'Lighthouse links',
673
+ failedTemplatePathsTitle: 'The following templates could not be scored',
674
+ themeToCheckTitle: (themeToCheck, target) => `${themeToCheck} ${target} scores`,
675
+ themeTitle: (themeToCheck) => `Theme: ${themeToCheck}`,
676
+ poweredByLink: `Powered by ${uiLink('Google Lighthouse', 'https://developer.chrome.com/docs/lighthouse/overview/')}`,
677
+ },
678
+ errors: {
679
+ targetOptionRequired: '[--target] is required for detailed view',
680
+ invalidTargetOption: '[--target] can only be used for detailed view',
681
+ themeNotFound: (theme) => `Theme "${theme}" not found. Please rerun using a valid theme path.`,
682
+ failedToFetchThemes: 'Failed to fetch available themes. Try running again with the [--theme] option',
683
+ failedToGetLighthouseScore: 'Failed to generate a Google Lighthouse score',
684
+ },
685
+ options: {
686
+ theme: {
687
+ describe: 'Path to the theme in the Design Manager',
688
+ },
689
+ target: {
690
+ describe: 'Medium to test against',
691
+ },
692
+ verbose: {
693
+ describe: 'View a detailed output of the lighthouse scores',
694
+ },
695
+ },
696
+ },
697
+ getReactModule: {
698
+ describe: 'Get a specified default React module.',
699
+ selectModulePrompt: 'Select a React module to download',
700
+ positionals: {
701
+ name: {
702
+ describe: 'Name of the react modules to be fetched',
703
+ },
704
+ dest: {
705
+ describe: 'Destination to download the react module to',
706
+ },
707
+ },
708
+ success: {
709
+ moduleDownloaded: (moduleName, path) => `"${moduleName}" successfully downloaded to "${path}"`,
710
+ },
711
+ errors: {
712
+ pathExists: (path) => `Folder already exists at "${path}"`,
713
+ invalidName: 'Module not found with that name, please check the spelling of the module you are trying to download.',
714
+ },
715
+ },
716
+ function: {
717
+ describe: 'Commands for managing CMS serverless functions.',
718
+ subcommands: {
719
+ create: {
720
+ describe: 'Create a new CMS serverless function.',
721
+ errors: {
722
+ unusablePath: (path) => `The "${path}" is not a usable path to a directory.`,
723
+ },
724
+ positionals: {
725
+ name: 'Name of the function',
726
+ dest: 'Destination folder for the function',
727
+ },
728
+ options: {
729
+ functionsFolder: 'Folder to create functions in',
730
+ filename: 'Filename for the function',
731
+ endpointMethod: 'HTTP method for the function endpoint',
732
+ endpointPath: 'API endpoint path for the function',
733
+ },
734
+ },
735
+ logs: {
736
+ describe: 'View logs for a CMS serverless function.',
737
+ errors: {
738
+ noLogsFound: (functionPath, accountId) => `No logs were found for the function path "${functionPath}" in account "${accountId}".`,
739
+ },
740
+ examples: {
741
+ default: 'Get 5 most recent logs for function residing at /_hcms/api/my-endpoint',
742
+ follow: 'Poll for and output logs for function residing at /_hcms/api/my-endpoint immediately upon new execution',
743
+ limit: 'Get 10 most recent logs for function residing at /_hcms/api/my-endpoint',
744
+ },
745
+ endpointPrompt: 'Enter a serverless function endpoint:',
746
+ gettingLogs: (latest, functionPath) => `Getting ${latest ? 'latest ' : ''}logs for function with path: ${functionPath}.`,
747
+ options: {
748
+ compact: {
749
+ describe: 'output compact logs',
750
+ },
751
+ follow: {
752
+ describe: 'follow logs',
753
+ },
754
+ latest: {
755
+ describe: 'retrieve most recent log only',
756
+ },
757
+ limit: {
758
+ describe: 'limit the number of logs to output',
759
+ },
760
+ },
761
+ positionals: {
762
+ endpoint: {
763
+ describe: 'Serverless function endpoint',
764
+ },
765
+ },
766
+ tailLogs: (functionPath, accountId) => `Waiting for log entries for "${functionPath}" on account "${accountId}".\n`,
767
+ },
768
+ deploy: {
769
+ debug: {
770
+ startingBuildAndDeploy: (functionPath) => `Starting build and deploy for .functions folder with path: ${functionPath}`,
771
+ },
772
+ errors: {
773
+ buildError: (details) => `Build error: ${details}`,
774
+ noPackageJson: (functionPath) => `Unable to find package.json for function ${functionPath}.`,
775
+ notFunctionsFolder: (functionPath) => `Specified path ${functionPath} is not a .functions folder.`,
776
+ },
777
+ examples: {
778
+ default: 'Build and deploy a new bundle for all functions within the myFunctionFolder.functions folder',
779
+ },
780
+ loading: (functionPath, account) => `Building and deploying bundle for "${functionPath}" on ${account}`,
781
+ loadingFailed: (functionPath, account) => `Failed to build and deploy bundle for "${functionPath}" on ${account}`,
782
+ positionals: {
783
+ path: {
784
+ describe: 'Path to the ".functions" folder',
785
+ },
786
+ },
787
+ success: {
788
+ deployed: (functionPath, accountId, buildTimeSeconds) => `Built and deployed bundle from package.json for ${functionPath} on account ${accountId} in ${buildTimeSeconds}s.`,
789
+ },
790
+ },
791
+ list: {
792
+ debug: {
793
+ gettingFunctions: 'Getting currently deployed functions',
794
+ },
795
+ describe: 'List the currently deployed CMS serverless functions.',
796
+ info: {
797
+ noFunctions: 'No functions found',
798
+ },
799
+ options: {
800
+ json: {
801
+ describe: 'output raw json data',
802
+ },
803
+ },
804
+ },
805
+ server: {
806
+ debug: {
807
+ startingServer: (functionPath) => `Starting local test server for .functions folder with path: ${functionPath}`,
808
+ },
809
+ examples: {
810
+ default: 'Run a local function test server.',
811
+ },
812
+ options: {
813
+ contact: {
814
+ describe: 'Pass contact data to the test function',
815
+ },
816
+ logOutput: {
817
+ describe: 'Output the response body from the serverless function execution (It is suggested not to use this in production environments as it can reveal any secure data returned by the function in logs)',
818
+ },
819
+ port: {
820
+ describe: 'Port to run the test server on',
821
+ },
822
+ watch: {
823
+ describe: 'Watch the specified .functions folder for changes and restart the server',
824
+ },
825
+ },
826
+ positionals: {
827
+ path: {
828
+ describe: 'Path to local .functions folder',
829
+ },
830
+ },
831
+ },
832
+ },
833
+ },
834
+ },
835
+ },
836
+ create: {
837
+ describe: (supportedAssetTypes) => `Create HubSpot sample apps and CMS assets. Supported assets are ${supportedAssetTypes}.`,
838
+ errors: {
839
+ 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}".`,
840
+ unsupportedAssetType: (assetType, supportedAssetTypes) => `The asset type ${assetType} is not supported. Supported asset types are ${supportedAssetTypes}.`,
841
+ unusablePath: (path) => `The "${path}" is not a usable path to a directory.`,
842
+ },
843
+ positionals: {
844
+ dest: {
845
+ describe: 'Destination folder for the new asset, relative to your current working directory. If omitted, this argument will default to your current working directory',
846
+ },
847
+ name: {
848
+ describe: 'Name of new asset',
849
+ },
850
+ type: {
851
+ describe: 'Type of asset',
852
+ },
853
+ },
854
+ flags: {
855
+ templateType: {
856
+ describe: 'Template type for template creation - only used when type is template',
857
+ },
858
+ moduleLabel: {
859
+ describe: 'Label for module creation - only used when type is module',
860
+ },
861
+ reactType: {
862
+ describe: 'Whether to create a React module - only used when type is module',
863
+ },
864
+ contentTypes: {
865
+ describe: (contentTypes) => `Content types where the module can be used (comma-separated list: ${contentTypes.join(', ')}) - only used when type is module`,
866
+ },
867
+ global: {
868
+ describe: 'Whether to create a global module - only used when type is module',
869
+ },
870
+ availableForNewContent: {
871
+ describe: 'Whether the template is available for new content - only used when type is template',
872
+ },
873
+ functionsFolder: {
874
+ describe: 'Folder to create functions in - only used when type is function',
875
+ },
876
+ filename: {
877
+ describe: 'Filename for the function - only used when type is function',
878
+ },
879
+ endpointMethod: {
880
+ describe: 'HTTP method for the function endpoint - only used when type is function',
881
+ },
882
+ endpointPath: {
883
+ describe: 'API endpoint path for the function - only used when type is function',
884
+ },
885
+ },
886
+ subcommands: {
887
+ apiSample: {
888
+ folderOverwritePrompt: (folderName) => `The folder with name "${folderName}" already exists. Overwrite?`,
889
+ errors: {
890
+ nameRequired: 'The "name" argument is required when creating an API Sample.',
891
+ noSamples: 'Currently there are no samples available. Please try again later.',
892
+ },
893
+ info: {
894
+ sampleChosen: (sampleType, sampleLanguage) => `You've chosen ${sampleType} sample written on ${sampleLanguage} language`,
895
+ },
896
+ success: {
897
+ sampleCreated: (filePath) => `Please follow ${filePath}/README.md to find out how to run the sample`,
898
+ },
899
+ },
900
+ module: {
901
+ errors: {
902
+ nameRequired: 'The "name" argument is required when creating a Custom Module.',
903
+ },
904
+ },
905
+ template: {
906
+ errors: {
907
+ nameRequired: 'The "name" argument is required when creating a Template.',
908
+ },
909
+ },
910
+ },
911
+ },
912
+ customObject: {
913
+ betaMessage: `The Custom Object CLI is currently in beta and is subject to change.`,
914
+ describe: 'Commands for managing custom objects.',
915
+ seeMoreLink: `${uiLink('View our docs to find out more', 'https://developers.hubspot.com/docs/api-reference/crm-custom-objects-v3/guide#custom-objects-api-guide')}`,
916
+ subcommands: {
917
+ schema: {
918
+ describe: 'Commands for managing custom object schemas.',
919
+ },
920
+ create: {
921
+ describe: 'Create custom object instances.',
922
+ errors: {
923
+ invalidObjectDefinition: 'The object definition is invalid. Please check the schema and try again.',
924
+ creationFailed: (definition) => `Object creation from ${definition} failed`,
925
+ },
926
+ options: {
927
+ path: {
928
+ describe: 'Local path to the JSON file containing an array of object definitions',
929
+ },
930
+ },
931
+ positionals: {
932
+ name: {
933
+ describe: 'Schema name to add the object instance to',
934
+ },
935
+ },
936
+ success: {
937
+ objectsCreated: 'Objects created',
938
+ },
939
+ inputName: "[--name] Enter the name of the schema for the custom object(s) you'd like to create:",
940
+ inputPath: '[--path] Enter the path to the JSON file containing the object definitions:',
941
+ },
942
+ createSchema: {
943
+ describe: 'Create a custom object schema.',
944
+ errors: {
945
+ invalidSchema: 'The schema definition is invalid. Please check the schema and try again.',
946
+ creationFailed: (definition) => `Schema creation from ${definition} failed`,
947
+ },
948
+ options: {
949
+ definition: {
950
+ describe: 'Local path to the JSON file containing the schema definition',
951
+ },
952
+ },
953
+ success: {
954
+ schemaCreated: (accountId) => `Your schema has been created in account "${accountId}"`,
955
+ schemaViewable: (url) => `Schema can be viewed at ${url}`,
956
+ },
957
+ },
958
+ deleteSchema: {
959
+ describe: 'Delete a custom object schema.',
960
+ errors: {
961
+ delete: (name) => `Unable to delete ${name}`,
962
+ },
963
+ examples: {
964
+ default: 'Delete "schemaName" schema',
965
+ },
966
+ positionals: {
967
+ name: {
968
+ describe: 'Name of the target schema',
969
+ },
970
+ },
971
+ options: {
972
+ force: {
973
+ describe: 'Force the deletion of the schema.',
974
+ },
975
+ },
976
+ success: {
977
+ delete: (name) => `Successfully initiated deletion of ${name}`,
978
+ },
979
+ confirmDelete: (name) => `Are you sure you want to delete the schema "${name}"?`,
980
+ deleteCancelled: (name) => `Deletion of schema "${name}" cancelled.`,
981
+ selectSchema: 'Which schema would you like to delete?',
982
+ },
983
+ fetchAllSchemas: {
984
+ describe: 'Fetch all custom object schemas for an account.',
985
+ errors: {
986
+ fetch: 'Unable to fetch schemas',
987
+ },
988
+ examples: {
989
+ default: 'Fetch all schemas for an account and put them in the current working directory',
990
+ specifyPath: 'Fetch all schemas for an account and put them in a directory named my/folder',
991
+ },
992
+ positionals: {
993
+ dest: {
994
+ describe: 'Local folder where schemas will be written',
995
+ },
996
+ },
997
+ success: {
998
+ fetch: (path) => `Saved schemas to ${path}`,
999
+ },
1000
+ inputDest: 'Where would you like to save the schemas?',
1001
+ },
1002
+ fetchSchema: {
1003
+ describe: 'Fetch a custom object schema.',
1004
+ errors: {
1005
+ fetch: (name) => `Unable to fetch ${name}`,
1006
+ },
1007
+ examples: {
1008
+ default: 'Fetch "schemaId" schema and put it in the current working directory',
1009
+ specifyPath: 'Fetch "schemaId" schema and put it in a directory named my/folder',
1010
+ },
1011
+ positionals: {
1012
+ dest: {
1013
+ describe: 'Local folder where schema will be written',
1014
+ },
1015
+ name: {
1016
+ describe: 'Name of the target schema',
1017
+ },
1018
+ },
1019
+ selectSchema: 'Which schema would you like to fetch?',
1020
+ inputDest: 'What would you like to name the destination file?',
1021
+ success: {
1022
+ save: (name, path) => `The schema "${name}" has been saved to "${path}"`,
1023
+ savedToPath: (path) => `Saved schema to ${path}`,
1024
+ },
1025
+ },
1026
+ listSchemas: {
1027
+ describe: 'List custom object schemas.',
1028
+ errors: {
1029
+ list: 'Unable to list schemas',
1030
+ },
1031
+ },
1032
+ updateSchema: {
1033
+ describe: 'Update an existing custom object schema.',
1034
+ errors: {
1035
+ invalidSchema: 'The schema definition is invalid. Please check the schema and try again.',
1036
+ update: (definition) => `Schema update from ${definition} failed`,
1037
+ },
1038
+ options: {
1039
+ path: {
1040
+ describe: 'Local path to the JSON file containing the schema definition',
1041
+ },
1042
+ },
1043
+ positionals: {
1044
+ name: {
1045
+ describe: 'Name of the target schema',
1046
+ },
1047
+ },
1048
+ success: {
1049
+ update: (accountId) => `Your schema has been updated in account "${accountId}"`,
1050
+ viewAtUrl: (url) => `Schema can be viewed at ${url}`,
1051
+ },
1052
+ selectSchema: 'Which schema would you like to update?',
1053
+ },
1054
+ },
1055
+ },
1056
+ doctor: {
1057
+ describe: 'Retrieve diagnostic information about your local HubSpot configurations.',
1058
+ options: {
1059
+ outputDir: 'Directory to save a detailed diagnosis JSON file in',
1060
+ },
1061
+ errors: {
1062
+ generatingDiagnosis: 'Error generating diagnosis',
1063
+ unableToWriteOutputFile: (file, errorMessage) => `Unable to write output to ${chalk.bold(file)}, ${errorMessage}`,
1064
+ },
1065
+ outputWritten: (filename) => `Output written to ${chalk.bold(filename)}`,
1066
+ },
1067
+ upgrade: {
1068
+ describe: 'Install the latest version of the HubSpot CLI, or a specific version.',
1069
+ options: {
1070
+ version: 'Specific version to install (defaults to latest)',
1071
+ force: 'Skip confirmation prompt and install immediately',
1072
+ beta: 'Install the next version of the HubSpot CLI (beta)',
1073
+ },
1074
+ alreadyLatest: (version, beta) => `You are already running the latest ${beta ? 'beta ' : ''}version (${chalk.bold(version)}).`,
1075
+ alreadyOnVersion: (current) => `You are already running version ${chalk.bold(current)}`,
1076
+ autoUpgradeNotAvailable: (version) => `Unable to auto-upgrade the HubSpot CLI. You can manually install ${chalk.bold(`@hubspot/cli@${version}`)}`,
1077
+ confirmPrompt: (current, version) => `Upgrade from ${current} to version ${version}?`,
1078
+ cancelled: 'Upgrade cancelled.',
1079
+ installing: (version) => `Installing @hubspot/cli@${version}...`,
1080
+ success: (version) => `Successfully installed @hubspot/cli@${version}`,
1081
+ autoUpgradeMessage: `The HubSpot CLI supports automatic updates as an optional feature.\n\nWhen enabled, the CLI will automatically install non-breaking updates within the current major version. Major releases will always require manual upgrades.\n\nRun ${uiCommandReference('hs config set --allow-auto-updates=true')}\n\nYou can change this later at any time with ${uiCommandReference('hs config set')}`,
1082
+ errors: {
1083
+ unableToDetermineLatestVersion: 'Unable to determine the latest version of the HubSpot CLI. Please try again later.',
1084
+ installFailed: 'Failed to install the CLI. Verify that the target version is available and try again.',
1085
+ generic: 'An error occurred while upgrading the CLI.',
1086
+ },
1087
+ },
1088
+ filemanager: {
1089
+ describe: 'Commands for managing files in the File Manager.',
1090
+ subcommands: {
1091
+ fetch: {
1092
+ describe: 'Fetch a folder or file from the File Manager.',
1093
+ errors: {
1094
+ sourceRequired: 'A source to fetch is required.',
1095
+ },
1096
+ options: {
1097
+ includeArchived: {
1098
+ describe: 'Include files that have been marked as "archived"',
1099
+ },
1100
+ },
1101
+ positionals: {
1102
+ dest: {
1103
+ describe: 'Path in HubSpot Design Tools',
1104
+ },
1105
+ src: {
1106
+ describe: 'Path to the local directory you would like the files to be placed, relative to your current working directory. If omitted, this argument will default to your current working directory',
1107
+ },
1108
+ },
1109
+ },
1110
+ upload: {
1111
+ describe: 'Upload a folder or file to the File Manager.',
1112
+ errors: {
1113
+ destinationRequired: 'A destination path needs to be passed',
1114
+ fileIgnored: (path) => `The file "${path}" is being ignored via an .hsignore rule`,
1115
+ invalidPath: (path) => `The path "${path}" is not a path to a file or folder`,
1116
+ upload: (src, dest) => `Uploading file "${src}" to "${dest}" failed`,
1117
+ uploadingFailed: 'Uploading failed',
1118
+ },
1119
+ logs: {
1120
+ uploading: (src, dest, accountId) => `Uploading files from "${src}" to "${dest}" in the File Manager of account ${accountId}`,
1121
+ },
1122
+ positionals: {
1123
+ dest: {
1124
+ describe: 'Path in HubSpot Design Tools, can be a net new path',
1125
+ },
1126
+ src: {
1127
+ describe: 'Path to the local file, relative to your current working directory',
1128
+ },
1129
+ },
1130
+ success: {
1131
+ upload: (src, dest, accountId) => `Uploaded file from "${src}" to "${dest}" in the File Manager of account ${accountId}`,
1132
+ uploadComplete: (dest) => `Uploading files to "${dest}" in the File Manager is complete`,
1133
+ },
1134
+ },
1135
+ },
1136
+ },
1137
+ hubdb: {
1138
+ describe: 'Commands for managing HubDB tables.',
1139
+ subcommands: {
1140
+ clear: {
1141
+ describe: 'Clear all rows in a HubDB table.',
1142
+ logs: {
1143
+ removedRows: (deletedRowCount, tableId) => `Removed ${deletedRowCount} rows from HubDB table ${tableId}`,
1144
+ rowCount: (tableId, rowCount) => `HubDB table ${tableId} now contains ${rowCount} rows`,
1145
+ tableEmpty: (tableId) => `HubDB table ${tableId} is already empty`,
1146
+ },
1147
+ positionals: {
1148
+ tableId: {
1149
+ describe: 'HubDB Table ID',
1150
+ },
1151
+ },
1152
+ },
1153
+ create: {
1154
+ describe: 'Create a HubDB table.',
1155
+ enterPath: '[--path] Enter the local path to the file used for import:',
1156
+ errors: {
1157
+ create: (filePath) => `Creating the table at "${filePath}" failed`,
1158
+ pathRequired: 'A path to a local file with a HubDB schema is required to create a HubDB table',
1159
+ invalidCharacters: 'The selected file path contains invalid characters. Please provide a new path and try again.',
1160
+ },
1161
+ options: {
1162
+ path: {
1163
+ describe: 'Local path to file used for import',
1164
+ },
1165
+ },
1166
+ success: {
1167
+ create: (tableId, accountId, rowCount) => `The table ${tableId} was created in ${accountId} with ${rowCount} rows`,
1168
+ },
1169
+ },
1170
+ delete: {
1171
+ describe: 'Delete a HubDB table.',
1172
+ shouldDeleteTable: (tableId) => `Proceed with deleting HubDB table ${tableId}?`,
1173
+ errors: {
1174
+ delete: (tableId) => `Deleting the table ${tableId} failed`,
1175
+ },
1176
+ positionals: {
1177
+ tableId: {
1178
+ describe: 'HubDB Table ID',
1179
+ },
1180
+ },
1181
+ options: {
1182
+ force: {
1183
+ describe: 'Skips confirmation prompt when deleting a HubDB table',
1184
+ },
1185
+ },
1186
+ success: {
1187
+ delete: (tableId, accountId) => `The table ${tableId} was deleted from ${accountId}`,
1188
+ },
1189
+ },
1190
+ fetch: {
1191
+ describe: 'Fetch the schema for a HubDB table.',
1192
+ positionals: {
1193
+ dest: {
1194
+ describe: 'Local destination folder to fetch table to',
1195
+ },
1196
+ tableId: {
1197
+ describe: 'HubDB Table ID',
1198
+ },
1199
+ },
1200
+ success: {
1201
+ fetch: (tableId, path) => `Downloaded HubDB table ${tableId} to ${path}`,
1202
+ },
1203
+ },
1204
+ list: {
1205
+ tables: `${chalk.bold('Tables')}:`,
1206
+ describe: 'List HubDB tables.',
1207
+ labels: {
1208
+ label: 'Label',
1209
+ id: 'ID',
1210
+ name: 'Name',
1211
+ columns: 'Columns',
1212
+ rows: 'Rows',
1213
+ },
1214
+ success: (accountId) => `Showing tables for account ${accountId}:`,
1215
+ noTables: (accountId) => `No tables found for account ${accountId}.`,
1216
+ tablesDisplayed: (displayed, total, truncated) => `Displaying ${displayed} of ${total} tables${truncated
1217
+ ? `, the remaining ${truncated} tables were not displayed.`
1218
+ : '.'}`,
1219
+ viewTablesLink: (baseUrl, accountId) => uiLink('Manage tables in HubSpot', `${baseUrl}/hubdb/${accountId}`),
1220
+ },
1221
+ },
1222
+ },
1223
+ init: {
1224
+ describe: 'Create a CLI config file and configure authentication for your HubSpot account.',
1225
+ 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.`,
1226
+ options: {
1227
+ authType: {
1228
+ describe: 'Authentication mechanism',
1229
+ defaultDescription: (authMethod) => `"${authMethod}": An access token tied to a specific user account. This is the recommended way of authenticating with local development tools.`,
1230
+ },
1231
+ account: {
1232
+ describe: 'HubSpot account to authenticate',
1233
+ },
1234
+ useHiddenConfig: {
1235
+ describe: "Use the new HubSpot configuration file located in a hidden file in the user's home directory",
1236
+ },
1237
+ },
1238
+ success: {
1239
+ configFileCreated: (configPath) => `Created config file "${configPath}"`,
1240
+ configFileUpdated: (authType, account) => `Connected account "${account}" using "${authType}" and set it as the default account`,
1241
+ },
1242
+ logs: {
1243
+ updateConfig: `To update an existing config file, use the ${uiAuthCommandReference()} command.`,
1244
+ },
1245
+ errors: {
1246
+ invalidAccountIdProvided: `--account must be a number.`,
1247
+ configFileExists: (configPath) => `The config file ${configPath} already exists.`,
1248
+ 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.`,
1249
+ 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.`,
1250
+ },
1251
+ },
1252
+ mcp: {
1253
+ describe: 'Commands for managing HubSpot MCP servers.',
1254
+ setup: {
1255
+ describe: 'Setup the HubSpot development MCP servers.',
1256
+ installingDocSearch: 'Adding the docs-search mcp server',
1257
+ codex: 'Codex CLI',
1258
+ claudeCode: 'Claude Code',
1259
+ cursor: 'Cursor',
1260
+ gemini: 'Gemini CLI',
1261
+ windsurf: 'Windsurf',
1262
+ vsCode: 'VSCode',
1263
+ args: {
1264
+ client: 'Target apps to configure',
1265
+ docsSearch: 'Should the docs search mcp server be installed',
1266
+ },
1267
+ 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')}.`,
1268
+ errors: {
1269
+ errorParsingJsonFIle: (filename, errorMessage) => `Unable to update ${chalk.bold(filename)} due to invalid JSON: ${errorMessage}`,
1270
+ },
1271
+ spinners: {
1272
+ failedToConfigure: 'Failed to configure the HubSpot mcp server.',
1273
+ // Claude
1274
+ configuringClaudeCode: 'Configuring Claude Code...',
1275
+ configuredClaudeCode: 'Configured Claude Code',
1276
+ claudeCodeNotFound: "Claude Code is not installed (missing 'claude' command). Install it and re-run hs mcp setup.",
1277
+ claudeCodeInstallFailed: 'Claude Code CLI not working - skipping configuration',
1278
+ // Codex
1279
+ configuringCodex: 'Configuring Codex...',
1280
+ configuredCodex: 'Configured Codex',
1281
+ codexNotFound: "Codex CLI is not installed (missing 'codex' command). Install it and re-run hs mcp setup.",
1282
+ codexInstallFailed: 'Failed to configure Codex',
1283
+ // Cursor
1284
+ configuringCursor: 'Configuring Cursor...',
1285
+ cursorNotFound: 'Cursor is not installed. Install it and re-run hs mcp setup.',
1286
+ failedToConfigureCursor: 'Failed to configure Cursor',
1287
+ configuredCursor: 'Configured Cursor',
1288
+ // Gemini
1289
+ configuringGemini: 'Configuring Gemini CLI...',
1290
+ configuredGemini: 'Configured Gemini CLI',
1291
+ geminiNotFound: "Gemini CLI is not installed (missing 'gemini' command). Install it and re-run hs mcp setup.",
1292
+ geminiInstallFailed: 'Failed to configure Gemini CLI',
1293
+ alreadyInstalled: 'HubSpot CLI mcp server already installed, reinstalling',
1294
+ // Windsurf
1295
+ configuringWindsurf: 'Configuring Windsurf...',
1296
+ windsurfNotFound: 'Windsurf is not installed. Install it and re-run hs mcp setup.',
1297
+ failedToConfigureWindsurf: 'Failed to configure Windsurf',
1298
+ configuredWindsurf: 'Configured Windsurf',
1299
+ // VS Code
1300
+ configuringVsCode: 'Configuring VSCode...',
1301
+ failedToConfigureVsCode: 'Failed to configure VSCode',
1302
+ configuredVsCode: 'Configured VSCode',
1303
+ vsCodeNotFound: "VSCode CLI is not installed (missing 'code' command). Install it and re-run hs mcp setup.",
1304
+ },
1305
+ prompts: {
1306
+ targets: '[--client] Which tools would you like to add the HubSpot CLI MCP server to?',
1307
+ targetsRequired: 'Must choose at least one app to configure.',
1308
+ standaloneMode: 'Do you want to run in standalone mode? (This will use npx @hubspot/cli instead of the installed hs command)',
1309
+ cliVersion: 'Specify a CLI version to pin (leave blank for latest):',
1310
+ },
1311
+ },
1312
+ start: {
1313
+ errors: {
1314
+ serverFileNotFound: (serverPath) => `MCP server file not found at ${serverPath}`,
1315
+ failedToStart: 'Failed to start MCP server',
1316
+ },
1317
+ startingServer: 'Starting HubSpot CLI MCP server...',
1318
+ stopInstructions: 'Press Ctrl+C to stop the server',
1319
+ stoppedSuccessfully: 'Stopped successfully.',
1320
+ shuttingDown: 'Shutting down MCP server...',
1321
+ },
1322
+ },
1323
+ open: {
1324
+ describe: 'Open a HubSpot page in your browser.',
1325
+ options: {
1326
+ list: {
1327
+ describe: 'List all supported shortcuts',
1328
+ },
1329
+ },
1330
+ positionals: {
1331
+ shortcut: {
1332
+ describe: "Shortcut of the link you'd like to open",
1333
+ },
1334
+ },
1335
+ selectLink: 'Select a link to open',
1336
+ },
1337
+ project: {
1338
+ describe: `Commands for managing projects. For more information visit our documentation https://developers.hubspot.com/docs/getting-started/quickstart`,
1339
+ profile: {
1340
+ describe: 'Commands for managing project profiles',
1341
+ 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!`,
1342
+ add: {
1343
+ describe: 'Add a new project profile',
1344
+ 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.`,
1345
+ example: 'Add a new project profile named hsprofile.qa.json',
1346
+ logs: {
1347
+ copyExistingProfile: (profileName) => `Found an existing profile. We can copy the variables from ${chalk.bold(profileName)} into your new profile.`,
1348
+ copyExistingProfiles: 'We can copy the variables from one of your existing profiles into your new profile.',
1349
+ profileAdded: (profileName) => `Project profile ${chalk.bold(profileName)} was successfully added`,
1350
+ },
1351
+ prompts: {
1352
+ namePrompt: 'Enter a name for the new project profile: ',
1353
+ emptyName: 'Profile name cannot be empty',
1354
+ targetAccountPrompt: '[target-account] Select a target account for this profile',
1355
+ copyExistingProfilePrompt: 'Select a profile to copy variables from',
1356
+ copyExistingProfilePromptEmpty: "Skip (don't copy any variables)",
1357
+ invalidProfileName: 'Profile name cannot contain special characters or spaces',
1358
+ },
1359
+ warnings: {
1360
+ 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.`,
1361
+ },
1362
+ errors: {
1363
+ noProjectConfig: 'No project config found. Please run this command from a project directory.',
1364
+ profileExists: (profileName) => `Profile ${chalk.bold(profileName)} already exists. Please choose a different name.`,
1365
+ invalidTargetAccount: 'Target account is not configured in the CLI',
1366
+ noAccountsConfigured: 'No accounts configured in the CLI',
1367
+ failedToLoadProfile: (profileName) => `Unable to copy variables. Failed to load profile ${chalk.bold(profileName)}`,
1368
+ failedToCreateProfile: 'Failed to create profile',
1369
+ },
1370
+ positionals: {
1371
+ name: 'The name of the project profile',
1372
+ },
1373
+ options: {
1374
+ targetAccount: 'The target account ID for this profile',
1375
+ },
1376
+ },
1377
+ delete: {
1378
+ describe: 'Delete an existing project profile',
1379
+ example: 'Delete a project profile named hsprofile.qa.json',
1380
+ logs: {
1381
+ profileDeleted: (profileName) => `Project profile ${chalk.bold(profileName)} was successfully deleted`,
1382
+ deletedProject: (accountId) => `Successfully deleted the project from ${uiAccountDescription(accountId)}`,
1383
+ didNotDeleteProject: (accountId) => `Did not delete the project from ${uiAccountDescription(accountId)}`,
1384
+ },
1385
+ debug: {
1386
+ failedToLoadProfile: (profileName) => `Failed to load profile ${chalk.bold(profileName)}`,
1387
+ },
1388
+ prompts: {
1389
+ deleteProfilePrompt: 'Select a profile to delete from your project',
1390
+ deleteProjectPrompt: (accountId) => `Would you like to delete this project from ${uiAccountDescription(accountId)}?`,
1391
+ },
1392
+ errors: {
1393
+ noProjectConfig: 'No project config found. Please run this command from a project directory.',
1394
+ noProfileFound: (profileName) => `No profile with filename ${chalk.bold(profileName)} found in your project.`,
1395
+ noProfilesFound: 'No profiles found in your project.',
1396
+ failedToDeleteProfile: (profileName) => `Unable to delete profile ${chalk.bold(profileName)}. Please try again.`,
1397
+ failedToDeleteProject: (accountId) => `Failed to delete the project from ${uiAccountDescription(accountId)}`,
1398
+ },
1399
+ positionals: {
1400
+ name: 'The name of the project profile',
1401
+ },
1402
+ },
1403
+ },
1404
+ dev: {
1405
+ describe: 'Start local dev for the current project.',
1406
+ logs: {
1407
+ header: 'HubSpot projects local development',
1408
+ placeholderAccountSelection: 'Using default account as target account (for now)',
1409
+ 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.',
1410
+ learnMoreMessageV2: `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')}`,
1411
+ learnMoreMessageLegacy: uiLink('Learn more about the projects local dev server', 'https://developers.hubspot.com/docs/developer-tooling/local-development/hubspot-cli/project-commands#start-a-local-development-server'),
1412
+ profileProjectAccountExplanation: (accountId, profileName) => `Using account ${uiAccountDescription(accountId)} from profile ${chalk.bold(profileName)} for project upload`,
1413
+ defaultProjectAccountExplanation: (accountId) => `Using default account ${uiAccountDescription(accountId)} for project upload`,
1414
+ projectAccountFlagExplanation: (accountId) => `Using account ${uiAccountDescription(accountId)} provided by the --project-account flag for project upload`,
1415
+ accountFlagExplanation: (accountId) => `Using account ${uiAccountDescription(accountId)} provided by the --account flag for project upload`,
1416
+ defaultSandboxOrDevTestTestingAccountExplanation: (accountId) => `Using default account ${uiAccountDescription(accountId)} for testing`,
1417
+ testingAccountFlagExplanation: (accountId) => `Using account ${uiAccountDescription(accountId)} provided by the --testing-account flag for testing`,
1418
+ },
1419
+ errors: {
1420
+ noProjectConfig: 'No project detected. Please run this command again from a project directory.',
1421
+ noAccount: (accountId) => `An error occurred while reading account ${uiAccountDescription(accountId)} from your config. Run ${uiAuthCommandReference()} to re-auth this account.`,
1422
+ noAccountsInConfig: `No accounts found in your config. Run ${uiAuthCommandReference()} to configure a HubSpot account with the CLI.`,
1423
+ invalidProjectComponents: 'Projects cannot contain both private and public apps. Move your apps to separate projects before attempting local development.',
1424
+ 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.`,
1425
+ 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')}.`,
1426
+ unsupportedAccountFlagLegacy: 'The --project-account and --testing-account flags are not supported for projects with platform versions earlier than 2025.2.',
1427
+ unsupportedAccountFlagV2: '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',
1428
+ localDevAlreadyRunning: `Another ${uiCommandReference('hs project dev')} process is already running. To proceed with local development of this project, stop the existing process and re-run ${uiCommandReference('hs project dev')}.`,
1429
+ },
1430
+ examples: {
1431
+ default: 'Start local dev for the current project',
1432
+ },
1433
+ prompts: {
1434
+ selectProfile: '[--profile] Select a profile to use for local development',
1435
+ },
1436
+ options: {
1437
+ profile: 'The profile to target during local dev',
1438
+ projectAccount: 'The id of the account to upload your project to. Must be used with --testing-account. Supported on platform versions 2025.2 and newer.',
1439
+ testingAccount: 'The id of the account to install apps and test on. Must be used with --project-account. Supported on platform versions 2025.2 and newer.',
1440
+ account: 'The id of the account to upload your project to. Unsupported on platform versions 2025.2 and newer.',
1441
+ },
1442
+ },
1443
+ create: {
1444
+ describe: 'Create a new project.',
1445
+ errors: {
1446
+ failedToDownloadProject: 'Failed to download project. Please try again later.',
1447
+ invalidTemplateSource: 'Invalid template source provided. Use the format <Owner>/<Repo> and try again.',
1448
+ failedToFetchProjectList: 'Failed to fetch the list of available project templates. Please try again later.',
1449
+ cannotNestProjects: (projectDir) => `A project already exists at ${projectDir}. Projects cannot be nested within other projects. Please choose a different destination and try again.`,
1450
+ },
1451
+ logs: {
1452
+ success: (projectName, projectDest) => `Project ${chalk.bold(projectName)} was successfully created in ${projectDest}`,
1453
+ },
1454
+ creatingComponent: (isProjectEmpty, projectName) => `${isProjectEmpty ? `Creating empty project [${chalk.bold(projectName)}]` : `Adding feature(s) to app [${chalk.bold(projectName)}]`}\n`,
1455
+ success: (isProjectEmpty, projectName) => `${isProjectEmpty ? `Created empty project [${chalk.bold(projectName)}]` : `Added feature(s) to app [${chalk.bold(projectName)}]`}\n`,
1456
+ failure: (isProjectEmpty, projectName) => `${isProjectEmpty ? `Failed to create project [${chalk.bold(projectName)}]` : `Failed to add feature(s) to app [${chalk.bold(projectName)}]`}\n`,
1457
+ prompts: {
1458
+ parentComponents: '[--project-base] Choose what to include in your project:',
1459
+ emptyProject: 'Empty Project',
1460
+ app: 'App',
1461
+ },
1462
+ examples: {
1463
+ default: 'Create a new project',
1464
+ templateSource: 'Create a new project from a custom GitHub repository. The repository must contain a valid project template and a config.json file defining the available templates',
1465
+ },
1466
+ options: {
1467
+ dest: {
1468
+ describe: 'Directory where the project should be created',
1469
+ },
1470
+ name: {
1471
+ describe: 'Project name (cannot be changed)',
1472
+ },
1473
+ template: {
1474
+ describe: 'The starting template. Only applies when platform version is less than 2025.2.',
1475
+ },
1476
+ templateSource: {
1477
+ describe: 'Path to custom GitHub repository from which to create project template. Only applies when platform version is less than 2025.2.',
1478
+ },
1479
+ platformVersion: {
1480
+ describe: 'The target platform version for the new project.',
1481
+ },
1482
+ projectBase: {
1483
+ describe: 'The top level component to include in the project.',
1484
+ },
1485
+ distribution: {
1486
+ describe: 'How the app will be distributed.',
1487
+ },
1488
+ auth: {
1489
+ describe: 'Authentication model for the app.',
1490
+ },
1491
+ features: {
1492
+ describe: `Features to include in the project. Only valid if project-base is ${PROJECT_WITH_APP}`,
1493
+ },
1494
+ },
1495
+ },
1496
+ migrateApp: {
1497
+ describe: 'Migrate a public app to the projects framework.',
1498
+ examples: {
1499
+ default: 'Migrate a public app to the projects framework',
1500
+ },
1501
+ options: {
1502
+ appId: {
1503
+ describe: 'The ID for the public app being migrated to the projects framework',
1504
+ },
1505
+ dest: {
1506
+ describe: 'Directory where the project should be created',
1507
+ },
1508
+ name: {
1509
+ describe: 'Project name (cannot be changed)',
1510
+ },
1511
+ },
1512
+ header: `This command will migrate an app to the projects framework. It will walk you through the fields required to complete the migration and download the project source code into a directory of your choosing.\n${uiLink('Learn more about migrating apps to the projects framework', 'https://developers.hubspot.com/docs/platform/migrate-a-public-app-to-projects')}`,
1513
+ migrationStatus: {
1514
+ inProgress: () => `Converting app configuration to ${chalk.bold(LEGACY_PUBLIC_APP_FILE)} component definition ...`,
1515
+ success: () => `${chalk.bold('Your app was converted and build #1 is deployed')}`,
1516
+ done: () => `Converting app configuration to ${LEGACY_PUBLIC_APP_FILE} component definition ... DONE`,
1517
+ failure: () => `Converting app configuration to ${LEGACY_PUBLIC_APP_FILE} component definition ... FAILED`,
1518
+ },
1519
+ warning: {
1520
+ title: `${chalk.bold('You are about to migrate an app to the projects framework')}\n`,
1521
+ projectConversion: `${chalk.bold('The selected app will be converted to a project component.')}\n`,
1522
+ appConfig: `All supported app configuration will be moved to the ${chalk.bold(LEGACY_PUBLIC_APP_FILE)} component definition file. Future updates to those features must be made through the project build and deploy pipeline, not the developer account UI.\n`,
1523
+ buildAndDeploy: 'This will create a new project with a single app component and immediately build and deploy it to your developer account (build #1).\n',
1524
+ existingApps: `${chalk.bold('This will not affect existing app users or installs.')}`,
1525
+ copyApp: 'We strongly recommend making a copy of your app to test this process in a development app before replacing production.',
1526
+ },
1527
+ 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.',
1528
+ createAppPrompt: "Proceed with migrating this app to a project component (this process can't be aborted)?",
1529
+ projectDetailsLink: 'View project details in your developer account',
1530
+ errors: {
1531
+ noAppsForProject: (projectName) => `No apps associated with project ${projectName}`,
1532
+ noAccountConfig: 'No account configuration found. Please check your account settings.',
1533
+ projectAlreadyExists: (projectName) => `A project with name ${projectName} already exists. Please choose another name.`,
1534
+ invalidApp: (appId) => `Could not migrate appId ${appId}. This app cannot be migrated at this time. Please choose another public app.`,
1535
+ migrationFailed: 'Migration Failed',
1536
+ notAllowedWithinProject: `This command cannot be run from within a project directory. Run the command again from outside a project directory. If you are trying to migrate a project, run ${uiCommandReference('hs project migrate')}`,
1537
+ },
1538
+ },
1539
+ migrate: {
1540
+ preamble: (platformVersion) => `This command will migrate an existing project to platformVersion ${platformVersion}. It will walk you through the fields required to complete the migration and download the new project source code into the project source directory. It will also copy all of your existing files to a new directory (archive) in case you need access to your old files later.`,
1541
+ describe: 'Migrate an existing project to the new version of the projects framework.',
1542
+ errors: {
1543
+ noProjectConfig: (command) => `No project detected. Please run this command again from a project directory. If you are trying to migrate an app, run ${command}`,
1544
+ 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))}`,
1545
+ },
1546
+ examples: {
1547
+ default: 'Migrate an existing project to the new version of the projects framework.',
1548
+ },
1549
+ },
1550
+ cloneApp: {
1551
+ describe: 'Clone a public app using the projects framework.',
1552
+ examples: {
1553
+ default: 'Clone a public app using the projects framework',
1554
+ },
1555
+ options: {
1556
+ appId: {
1557
+ describe: 'The ID for the public app being cloned',
1558
+ },
1559
+ dest: {
1560
+ describe: 'Directory where the project should be created',
1561
+ },
1562
+ },
1563
+ cloneStatus: {
1564
+ inProgress: `Cloning app configuration to ${chalk.bold(LEGACY_PUBLIC_APP_FILE)} component definition ...`,
1565
+ done: `Cloning app configuration to ${LEGACY_PUBLIC_APP_FILE} component definition ... DONE`,
1566
+ success: (dest) => `Your cloned project was created in ${dest}`,
1567
+ failure: `Cloning app configuration to ${LEGACY_PUBLIC_APP_FILE} component definition ... FAILED`,
1568
+ },
1569
+ errors: {
1570
+ invalidAccountTypeTitle: () => `${chalk.bold('Developer account not targeted')}`,
1571
+ 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.`,
1572
+ couldNotWriteConfigPath: (configPath) => `Failed to write project config at ${configPath}`,
1573
+ noAccountConfig: (accountId) => `No account config found for ${uiAccountDescription(accountId)}`,
1574
+ },
1575
+ },
1576
+ add: {
1577
+ describe: 'Create a new component within a project.',
1578
+ options: {
1579
+ name: {
1580
+ describe: 'The name for your newly created component',
1581
+ },
1582
+ type: {
1583
+ describe: "The path to the component type's location within the hubspot-project-components Github repo: https://github.com/HubSpot/hubspot-project-components",
1584
+ },
1585
+ distribution: {
1586
+ describe: 'The distribution method for the app.',
1587
+ },
1588
+ auth: {
1589
+ describe: 'The authentication type for the app.',
1590
+ },
1591
+ features: {
1592
+ describe: 'Which features to include with the app.',
1593
+ },
1594
+ },
1595
+ creatingComponent: (projectName) => `Adding feature(s) to app [${chalk.bold(projectName)}]\n`,
1596
+ success: (projectName) => `Added feature(s) to app [${chalk.bold(projectName)}]\n`,
1597
+ failure: (projectName) => `Failed to add feature(s) to app [${chalk.bold(projectName)}]\n`,
1598
+ error: {
1599
+ failedToDownloadComponent: 'Failed to download project. Please try again later.',
1600
+ invalidComponentType: (componentType) => `'${componentType}' is not a valid project component type.`,
1601
+ maxExceeded: (maxCount) => `This project has the maximum allowed(${maxCount})`,
1602
+ authTypeNotAllowed: (authType) => `Requires auth type '${authType}'.`,
1603
+ distributionNotAllowed: (dist) => `Requires distribution '${dist}'.`,
1604
+ portalDoesNotHaveAccessToThisFeature: () => "This account doesn't have access to this feature.",
1605
+ locationInProject: 'This command must be run from within a project directory.',
1606
+ failedToFetchComponentList: 'Failed to fetch the list of available features. Please try again later.',
1607
+ projectContainsPublicApp: 'This project contains a public app. This command is currently only compatible with projects that contain private apps.',
1608
+ },
1609
+ examples: {
1610
+ default: 'Create an app feature within your project',
1611
+ withFlags: 'Use --name and --type flags to bypass the prompt.',
1612
+ },
1613
+ },
1614
+ deploy: {
1615
+ describe: 'Deploy a project build.',
1616
+ deployBuildIdPrompt: '[--build] Deploy which build?',
1617
+ debug: {
1618
+ deploying: (path) => `Deploying project at path: ${path}`,
1619
+ },
1620
+ errors: {
1621
+ deploy: 'Deploy error: an unknown error occurred.',
1622
+ noBuilds: 'Deploy error: no builds for this project were found.',
1623
+ noBuildId: 'You must specify a build to deploy',
1624
+ 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.`,
1625
+ buildIdDoesNotExist: (accountId, buildId, projectName) => `Build ${buildId} does not exist for project ${chalk.bold(projectName)}. Run ${uiCommandReference('hs project list-builds')} to view existing builds for this project.`,
1626
+ buildAlreadyDeployed: (accountId, buildId, projectName) => `Build ${buildId} is already deployed. ${uiLink('View project builds in HubSpot', getProjectDetailUrl(projectName, accountId))}`,
1627
+ deployContainsRemovals: (componentName) => `- This deploy would remove the ${chalk.bold(componentName)} component. To proceed, run the deploy command with the ${uiCommandReference('--force')} flag`,
1628
+ deployBlockedHeader: "This build couldn't be deployed because it will be too disruptive for existing users. Fix the following issues and try again:",
1629
+ deployWarningsHeader: `Deploying this build might have unintended consequences for users. Review the following issues and run ${uiCommandReference('hs project deploy --force')} to try again:`,
1630
+ deployIssueComponentGeneric: (uid, componentTypeName) => `- [${mapToUserFriendlyName(componentTypeName)}] ${chalk.bold('(' + uid + ')')} reported issues with the deploy`,
1631
+ deployIssueComponentWarning: (uid, componentTypeName, message) => `- [${mapToUserFriendlyName(componentTypeName)}] ${chalk.bold('(' + uid + ')')} ${message}`,
1632
+ },
1633
+ examples: {
1634
+ default: 'Deploy the latest build of the current project',
1635
+ withOptions: 'Deploy build 5 of the project my-project',
1636
+ withProfile: 'Deploy using the provided profile',
1637
+ },
1638
+ options: {
1639
+ build: 'Project build ID to be deployed',
1640
+ project: 'Project name',
1641
+ profile: 'The profile to target with this deploy',
1642
+ force: 'Skip warnings and force deploy. Use this carefully as it will bypass warnings for destructive actions.',
1643
+ deployLatestBuild: 'Deploy the latest build of the current project',
1644
+ },
1645
+ },
1646
+ listBuilds: {
1647
+ describe: "List the project's builds.",
1648
+ continueOrExitPrompt: 'Press <enter> to load more, or ctrl+c to exit',
1649
+ viewAllBuildsLink: 'View all builds',
1650
+ showingNextBuilds: (count, projectName) => `Showing the next ${count} builds for ${projectName}`,
1651
+ showingRecentBuilds: (count, projectName, viewAllBuildsLink) => `Showing the most ${count} recent builds for ${projectName}. ${viewAllBuildsLink}.`,
1652
+ errors: {
1653
+ noBuilds: 'No builds for this project were found.',
1654
+ projectNotFound: (projectName) => `Project ${projectName} not found.`,
1655
+ },
1656
+ options: {
1657
+ project: {
1658
+ describe: 'Project name',
1659
+ },
1660
+ limit: {
1661
+ describe: 'Limit the number of builds to output',
1662
+ },
1663
+ },
1664
+ examples: {
1665
+ default: 'List the builds for the current project',
1666
+ },
1667
+ },
1668
+ logs: {
1669
+ describe: 'Get execution logs for a serverless function within a project.',
1670
+ errors: {
1671
+ noProjectConfig: 'No project detected. Run this command again from a project directory.',
1672
+ failedToFetchProjectDetails: 'There was an error fetching project details',
1673
+ noFunctionsLinkText: 'Visit developer docs',
1674
+ 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`,
1675
+ noFunctionWithName: (name) => `No function with name "${name}"`,
1676
+ functionNotDeployed: (name) => `The function with name "${name}" is not deployed`,
1677
+ projectLogsManagerNotInitialized: 'Function called on ProjectLogsManager before initialization',
1678
+ noDeployedBuild: 'This project has not been deployed yet. Deploy the project first, then try again.',
1679
+ generic: 'Error fetching logs',
1680
+ },
1681
+ logs: {
1682
+ showingLogs: 'Showing logs for:',
1683
+ hubspotLogsDirectLink: (url) => `${uiLink('View function logs in HubSpot', url)}`,
1684
+ noLogsFound: (name) => `No logs were found for "${name}"`,
1685
+ },
1686
+ table: {
1687
+ accountHeader: 'Account',
1688
+ functionHeader: 'Function',
1689
+ endpointHeader: 'Endpoint',
1690
+ },
1691
+ examples: {
1692
+ default: 'Open the project logs prompt to get logs for a serverless function',
1693
+ withOptions: 'Get logs for function named "my-function" within the app named "app" within the project named "my-project"',
1694
+ },
1695
+ options: {
1696
+ app: {
1697
+ describe: 'App name',
1698
+ },
1699
+ compact: {
1700
+ describe: 'Output compact logs',
1701
+ },
1702
+ tail: {
1703
+ describe: 'Tail logs',
1704
+ },
1705
+ latest: {
1706
+ describe: 'Retrieve most recent log only',
1707
+ },
1708
+ limit: {
1709
+ describe: 'Limit the number of logs to output',
1710
+ },
1711
+ function: {
1712
+ describe: 'App function name',
1713
+ },
1714
+ },
1715
+ },
1716
+ upload: {
1717
+ describe: 'Upload your project files and create a new build.',
1718
+ examples: {
1719
+ default: 'Upload a project into your HubSpot account',
1720
+ withProfile: 'Upload a project into your HubSpot account when using profiles',
1721
+ },
1722
+ logs: {
1723
+ buildSucceeded: (buildId) => `Build #${buildId} succeeded\n`,
1724
+ readyToGoLive: '🚀 Ready to take your project live?',
1725
+ runCommand: (command) => `Run \`${uiCommandReference(command)}\``,
1726
+ autoDeployDisabled: (deployCommand) => `Automatic deploys are disabled for this project. Run ${uiCommandReference(deployCommand)} to deploy this build.`,
1727
+ },
1728
+ errors: {
1729
+ projectLockedError: `Your project is locked. This may mean that another user is running the ${uiCommandReference('hs project dev')} command for this project. If this is you, unlock the project in Projects UI.`,
1730
+ },
1731
+ options: {
1732
+ forceCreate: {
1733
+ describe: 'Automatically create project if it does not exist',
1734
+ },
1735
+ message: {
1736
+ describe: 'Add a message when you upload your project and create a build',
1737
+ },
1738
+ profile: {
1739
+ describe: 'Profile to target for this upload',
1740
+ },
1741
+ },
1742
+ },
1743
+ watch: {
1744
+ describe: 'Watch your local project for changes and automatically upload changed files to a new build in HubSpot.',
1745
+ examples: {
1746
+ default: 'Start watching the current project',
1747
+ },
1748
+ logs: {
1749
+ processExited: 'Stopping watcher...',
1750
+ 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')}.`,
1751
+ resuming: 'Resuming watcher...',
1752
+ uploadSucceeded: (remotePath, filePath) => `Uploaded file "${filePath}" to "${remotePath}"`,
1753
+ deleteFileSucceeded: (remotePath) => `Deleted file "${remotePath}"`,
1754
+ deleteFolderSucceeded: (remotePath) => `Deleted folder "${remotePath}"`,
1755
+ watching: (projectDir) => `Watcher is ready and watching "${projectDir}". Any changes detected will be automatically uploaded.`,
1756
+ previousStagingBuildCancelled: 'Killed the previous watch process. Please try running `hs project watch` again',
1757
+ },
1758
+ options: {
1759
+ initialUpload: {
1760
+ describe: 'Upload directory before watching for updates',
1761
+ },
1762
+ },
1763
+ debug: {
1764
+ pause: 'Pausing watcher, attempting to queue build',
1765
+ buildStarted: 'Build queued.',
1766
+ extensionNotAllowed: (filePath) => `Skipping "${filePath}" due to unsupported extension`,
1767
+ ignored: (filePath) => `Skipping "${filePath}" due to an ignore rule`,
1768
+ uploading: (filePath, remotePath) => `Attempting to upload file "${filePath}" to "${remotePath}"`,
1769
+ attemptNewBuild: 'Attempting to create a new build',
1770
+ fileAlreadyQueued: (filePath) => `File "${filePath}" is already queued for upload`,
1771
+ },
1772
+ errors: {
1773
+ projectConfigNotFound: 'No project config found. Please ensure that you are in a project directory.',
1774
+ 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.`,
1775
+ uploadFailed: (remotePath, filePath) => `Failed to upload file "${filePath}" to "${remotePath}"`,
1776
+ deleteFileFailed: (remotePath) => `Failed to delete file "${remotePath}"`,
1777
+ deleteFolderFailed: (remotePath) => `Failed to delete folder "${remotePath}"`,
1778
+ v2ApiError: (platformVersion) => `${uiCommandReference('hs project watch')} is not supported for platform version '${platformVersion}' use ${uiCommandReference('hs project dev')} instead to develop locally. ${uiLink('How to develop locally', 'https://developers.hubspot.com/docs/guides/crm/ui-extensions/local-development')}`,
1779
+ },
1780
+ },
1781
+ download: {
1782
+ describe: 'Download your project files from HubSpot.',
1783
+ examples: {
1784
+ default: 'Download the project myProject into myProjectFolder folder',
1785
+ },
1786
+ logs: {
1787
+ downloadCancelled: 'Cancelling project download',
1788
+ downloadSucceeded: (buildId, projectName) => `Downloaded build "${buildId}" from project "${projectName}"`,
1789
+ },
1790
+ errors: {
1791
+ downloadFailed: 'Something went wrong downloading the project',
1792
+ projectNotFound: (projectName, accountId) => `Your project ${chalk.bold(projectName)} could not be found in ${accountId}`,
1793
+ noBuildIdToDownload: 'No build ID available for download',
1794
+ },
1795
+ warnings: {
1796
+ cannotDownloadWithinProject: 'Cancelling project download. Please run the command again outside the context of an existing project.',
1797
+ },
1798
+ options: {
1799
+ build: {
1800
+ describe: 'The build to download',
1801
+ },
1802
+ project: {
1803
+ describe: 'The name of the project to download',
1804
+ },
1805
+ dest: {
1806
+ describe: 'Destination folder for the project',
1807
+ },
1808
+ },
1809
+ },
1810
+ open: {
1811
+ describe: "Open the project's details page in the browser.",
1812
+ options: {
1813
+ project: {
1814
+ describe: 'Name of project to open',
1815
+ },
1816
+ },
1817
+ examples: {
1818
+ default: 'Opens the projects page for the specified account',
1819
+ },
1820
+ success: (projectName) => `Successfully opened "${projectName}"`,
1821
+ },
1822
+ feedback: {
1823
+ describe: 'Leave feedback or file a bug report.',
1824
+ openPrompt: 'Open the feedback form in your browser?',
1825
+ success: (url) => `We opened ${uiLink('the developer feedback form', url)} in your browser.`,
1826
+ error: (url) => `Navigate to ${uiLink('the developer feedback form', url)} to leave feedback.`,
1827
+ },
1828
+ installDeps: {
1829
+ help: {
1830
+ describe: 'Install the dependencies for your project, or add a dependency to a subcomponent of a project.',
1831
+ installAppDepsExample: 'Install the dependencies for the project',
1832
+ addDepToSubComponentExample: 'Install the dependencies to one or more project subcomponents',
1833
+ },
1834
+ installLocationPrompt: 'Choose the project components to install the dependencies:',
1835
+ installLocationPromptRequired: 'You must choose at least one subcomponent',
1836
+ installingDependencies: (directory) => `Installing dependencies in ${directory}`,
1837
+ installationSuccessful: (directory) => `Installed dependencies in ${directory}`,
1838
+ addingDependenciesToLocation: (dependencies, directory) => `Installing ${dependencies} in ${directory}`,
1839
+ installingDependenciesFailed: (directory) => `Installing dependencies for ${directory} failed`,
1840
+ noProjectConfig: 'No project detected. Run this command from a project directory.',
1841
+ noPackageJsonInProject: (projectName) => `No dependencies to install. The project ${projectName} folder might be missing component or subcomponent files. ${uiLink('Learn how to create a project from scratch', 'https://developers.hubspot.com/docs/apps/developer-platform/build-apps/create-an-app#customize-a-new-project-using-the-cli')}`,
1842
+ packageManagerNotInstalled: (packageManager) => `This command depends on ${packageManager}, install ${uiLink(packageManager, 'https://docs.npmjs.com/downloading-and-installing-node-js-and-npm')}`,
1843
+ },
1844
+ lint: {
1845
+ help: {
1846
+ describe: 'Lint the UI Extensions components in your project.',
1847
+ lintProjectExample: 'Lint the UI Extensions components in your project.',
1848
+ lintProjectWithInstallExample: 'Lint the UI Extensions components in the project and automatically install missing dependencies.',
1849
+ lintProjectWithoutInstallExample: 'Lint the UI Extensions components in the project without installing missing dependencies.',
1850
+ installMissingDeps: 'Automatically install missing linting dependencies for the UI Extensions components in the project without prompting.',
1851
+ },
1852
+ loading: {
1853
+ checking: 'Checking lint packages and configuration…',
1854
+ creatingConfig: 'Creating ESLint configuration files…',
1855
+ linting: 'Linting…',
1856
+ },
1857
+ noProjectConfig: 'No project detected. Run this command from a project directory.',
1858
+ failedToReadPackageJson: (packageJsonPath) => `Failed to read package.json at ${packageJsonPath}`,
1859
+ installLintPackagesPrompt: (directories, missingPackages) => {
1860
+ const uniquePackages = Array.from(new Set(missingPackages)).sort();
1861
+ return `The dependencies required for linting are missing or outdated.\n\nDependencies:\n${uniquePackages.map(p => ` - ${p}`).join('\n')}\n\n${directories.length === 1 ? 'Directory' : 'Directories'}:\n${directories.map(d => ` - ${d}`).join('\n')}\n\nWould you like to install the required dependencies?`;
1862
+ },
1863
+ skippingDirectoriesWarning: (directories) => `Skipping linting for the following ${directories.length === 1 ? 'directory' : 'directories'}:\n${directories.map(d => ` - ${d}`).join('\n')}`,
1864
+ deprecatedEslintConfigWarning: (details) => {
1865
+ const dirCount = details.length;
1866
+ const header = `Deprecated ESLint configuration file${dirCount === 1 ? '' : 's'} detected in the following ${dirCount === 1 ? 'directory' : 'directories'}:`;
1867
+ const dirList = details
1868
+ .map(d => ` - ${d.path}: ${d.files.join(', ')}`)
1869
+ .join('\n');
1870
+ return `${header}\n${dirList}\n`;
1871
+ },
1872
+ createEslintConfigPrompt: (directories) => `ESLint configuration file not found in the following ${directories.length === 1 ? 'directory' : 'directories'}:\n${directories.map(d => ` - ${d}`).join('\n')}\n\nWould you like to set up the required ESLint configuration?`,
1873
+ eslintConfigCreated: (configPath) => `ESLint configuration created at ${configPath}`,
1874
+ failedToCreateEslintConfig: (configPath) => `Failed to create ESLint configuration at ${configPath}`,
1875
+ eslintConfigRequired: 'ESLint configuration is required to run the lint command. Run the command again to create the configuration.',
1876
+ },
1877
+ updateDeps: {
1878
+ help: {
1879
+ describe: 'Update the npm dependencies for your project, or update specific dependencies in a subcomponent of a project.',
1880
+ updateAppDepsExample: 'Update the dependencies for the project',
1881
+ updateDepToSubComponentExample: 'Update the npm dependencies in one or more project subcomponents',
1882
+ },
1883
+ installLocationPrompt: 'Choose which project components you would like to update the dependencies for:',
1884
+ installLocationPromptRequired: 'You must choose at least one subcomponent',
1885
+ updatingDependencies: (directory) => `Updating dependencies in ${directory}`,
1886
+ updateSuccessful: (directory) => `Updated dependencies in ${directory}`,
1887
+ updatingDependenciesToLocation: (dependencies, directory) => `Updating ${dependencies} in ${directory}`,
1888
+ updatingDependenciesFailed: (directory) => `Updating dependencies for ${directory} failed`,
1889
+ noProjectConfig: 'No project detected. Run this command from a project directory.',
1890
+ noPackageJsonInProject: (projectName) => `No dependencies to update. The project ${projectName} folder might be missing component or subcomponent files. ${uiLink('Learn how to create a project from scratch', 'https://developers.hubspot.com/docs/apps/developer-platform/build-apps/create-an-app#customize-a-new-project-using-the-cli')}`,
1891
+ packageManagerNotInstalled: (packageManager) => `This command depends on ${packageManager}, install ${uiLink(packageManager, 'https://docs.npmjs.com/downloading-and-installing-node-js-and-npm')}`,
1892
+ },
1893
+ validate: {
1894
+ describe: 'Validate the project before uploading',
1895
+ mustBeRanWithinAProject: 'This command must be run from within a project directory.',
1896
+ badVersion: 'This command is only available for projects 2025.2 and later.',
1897
+ examples: {
1898
+ default: 'Validate the project before uploading',
1899
+ withProfile: 'Validate the project with a profile before uploading.',
1900
+ },
1901
+ success: (projectName) => `Project ${projectName} is valid and ready to upload`,
1902
+ failure: (projectName, profileName) => `Project ${projectName} is invalid${profileName ? ` with profile "${profileName}" applied` : ''}`,
1903
+ failureWithProfile: (profileName) => chalk.bold(`With profile "${profileName}":`),
1904
+ spinners: {
1905
+ validatingProfile: (profileName) => `Validating project with profile "${profileName}"`,
1906
+ profileValidationFailed: (profileName) => `Profile "${profileName}" failed validation`,
1907
+ profileValidationSucceeded: (profileName) => `Project valid with profile "${profileName}" applied`,
1908
+ invalidWithProfile: (profileName) => `Project is invalid with profile "${profileName}" applied`,
1909
+ validatingAllProfiles: 'Validating the project with all profiles',
1910
+ allProfilesValidationSucceeded: 'Project profile validation succeeded',
1911
+ allProfilesValidationFailed: 'Project profile validation failed',
1912
+ },
1913
+ options: {
1914
+ profile: {
1915
+ describe: 'The profile to target for this validation. If no profile is provided, all profiles will be validated.',
1916
+ },
1917
+ },
1918
+ },
1919
+ list: {
1920
+ describe: 'List uploaded projects that exist in the current target account',
1921
+ projects: `${chalk.bold('Projects')}:`,
1922
+ labels: {
1923
+ name: 'Name',
1924
+ platformVersion: 'Platform Version',
1925
+ },
1926
+ errors: {
1927
+ noProjectsFound: (accountId) => `No projects found for account ${uiAccountDescription(accountId)}`,
1928
+ },
1929
+ },
1930
+ info: {
1931
+ describe: 'Display information about a project, its app, and its components',
1932
+ project: {
1933
+ title: 'Project',
1934
+ name: (name) => `Name: ${name}`,
1935
+ platformVersion: (version) => `Platform Version: ${version}`,
1936
+ id: (id) => `Project ID: ${id}`,
1937
+ deployedBuild: (buildId) => `Deployed Build: #${buildId}`,
1938
+ autoDeploy: (enabled) => `Auto-deploy: ${enabled ? 'Enabled' : 'Disabled'}`,
1939
+ },
1940
+ app: {
1941
+ title: 'App',
1942
+ name: (name) => `Name: ${name}`,
1943
+ id: (id) => `App ID: ${id}`,
1944
+ uid: (uid) => `UID: ${uid}`,
1945
+ authType: (authType) => `Auth Type: ${authType}`,
1946
+ distributionType: (distributionType) => `Distribution: ${distributionType}`,
1947
+ },
1948
+ viewProjectLink: 'View project in HubSpot',
1949
+ componentsHeader: 'Components',
1950
+ labels: {
1951
+ type: 'Type',
1952
+ uid: 'UID',
1953
+ },
1954
+ errors: {
1955
+ noProjectConfig: 'No project found. Run this command from a project directory.',
1956
+ projectNotFound: (projectName, accountId) => `Project "${projectName}" was not found in account ${uiAccountDescription(accountId)}. Make sure the project has been uploaded at least once.`,
1957
+ noDeployedBuild: 'This project has not been deployed yet. Deploy your project to see component information.',
1958
+ unsupportedPlatformVersion: (platformVersion) => `This command is not supported for platform version ${chalk.bold(platformVersion)}. Please upgrade to 2025.2 or later.`,
1959
+ },
1960
+ },
1961
+ },
1962
+ sandbox: {
1963
+ describe: 'Commands for managing sandboxes.',
1964
+ subcommands: {
1965
+ create: {
1966
+ describe: 'Create a sandbox account.',
1967
+ failure: {
1968
+ noAccountConfig: (accountId) => `No account config found for ${uiAccountDescription(accountId)}. Run ${uiAuthCommandReference()} to add it.`,
1969
+ invalidAccountType: (accountType, accountName) => `Sandboxes must be created from a production account. Your current default account ${chalk.bold(accountName)} is a ${chalk.bold(accountType)}. \n- Run ${uiCommandReference('hs account use')} to switch to your default account to your production account. \n- Run ${uiAuthCommandReference()} to connect a production account to the HubSpot CLI.\n`,
1970
+ noSandboxAccountConfig: (accountId) => `No account config found for ${uiAccountDescription(accountId)}. Run ${uiAuthCommandReference()} to add the sandbox account.`,
1971
+ optionMissing: {
1972
+ type: 'Type is required when using --force. Use --type=developer or --type=standard.',
1973
+ name: 'Name is required when using --force. Use --name=YourSandboxName.',
1974
+ },
1975
+ },
1976
+ options: {
1977
+ force: {
1978
+ describe: 'Skips all prompts and uses provided options.',
1979
+ },
1980
+ name: {
1981
+ describe: 'Name of the sandbox account to create',
1982
+ },
1983
+ type: {
1984
+ describe: 'Type of sandbox to create (developer or standard)',
1985
+ },
1986
+ },
1987
+ examples: {
1988
+ default: 'Creates a standard sandbox named MySandboxAccount.',
1989
+ },
1990
+ developer: {
1991
+ loading: {
1992
+ add: (accountName) => `Creating developer sandbox ${chalk.bold(accountName)}`,
1993
+ fail: (accountName) => `Failed to create a developer sandbox ${chalk.bold(accountName)}.`,
1994
+ succeed: (accountName, accountId) => `Successfully created a developer sandbox ${chalk.bold(accountName)} with portalId ${chalk.bold(accountId)}.`,
1995
+ },
1996
+ success: {
1997
+ configFileUpdated: (accountName, authType) => `Account "${accountName}" updated using "${authType}"`,
1998
+ },
1999
+ failure: {
2000
+ 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)}.`,
2001
+ limit: (accountName, limit) => `${chalk.bold(accountName)} reached the limit of ${limit} developer sandboxes. \n- To connect a developer sandbox to your HubSpot CLI, run ${uiAuthCommandReference()} and follow the prompts.`,
2002
+ alreadyInConfig: (accountName, limit) => `${chalk.bold(accountName)} reached the limit of ${limit} developer sandboxes. \n- To use an existing developer sandbox, run ${chalk.bold('hs account use')}.`,
2003
+ scopes: {
2004
+ message: "The personal access key you provided doesn't include developer sandbox permissions.",
2005
+ 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 ${uiAuthCommandReference()} and entering the new key.\n`,
2006
+ },
2007
+ },
2008
+ },
2009
+ standard: {
2010
+ loading: {
2011
+ add: (accountName) => `Creating standard sandbox ${chalk.bold(accountName)}`,
2012
+ fail: (accountName) => `Failed to create a standard sandbox ${chalk.bold(accountName)}.`,
2013
+ succeed: (accountName, accountId) => `Successfully created a standard sandbox ${chalk.bold(accountName)} with portalId ${chalk.bold(accountId)}.`,
2014
+ },
2015
+ success: {
2016
+ configFileUpdated: (accountName, authType) => `Account "${accountName}" updated using "${authType}"`,
2017
+ },
2018
+ failure: {
2019
+ 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)}.`,
2020
+ limit: (accountName, limit) => `${chalk.bold(accountName)} reached the limit of ${limit} standard sandboxes. \n- To connect a standard sandbox to your HubSpot CLI, run ${uiAuthCommandReference()} and follow the prompts.`,
2021
+ alreadyInConfig: (accountName, limit) => `${chalk.bold(accountName)} reached the limit of ${limit} standard sandboxes. \n- To use an existing standard sandbox, run ${chalk.bold('hs account use')}.`,
2022
+ scopes: {
2023
+ message: "The personal access key you provided doesn't include standard sandbox permissions.",
2024
+ 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 ${uiAuthCommandReference()} and entering the new key.\n`,
2025
+ },
2026
+ },
2027
+ },
2028
+ },
2029
+ delete: {
2030
+ describe: 'Delete a sandbox account.',
2031
+ debug: {
2032
+ deleting: (account) => `Deleting sandbox account "${uiAccountDescription(account)}"`,
2033
+ error: 'Error deleting sandbox account:',
2034
+ },
2035
+ examples: {
2036
+ default: 'Deletes the sandbox account named MySandboxAccount.',
2037
+ },
2038
+ confirm: (account) => `Delete sandbox ${uiAccountDescription(account)}? All data for this sandbox will be permanently deleted.`,
2039
+ defaultAccountWarning: (account) => `The sandbox ${uiAccountDescription(account)} is currently set as the default account.`,
2040
+ success: {
2041
+ delete: (account, sandboxHubId) => `Sandbox "${account}" with portalId "${sandboxHubId}" was deleted successfully.`,
2042
+ deleteDefault: (account, sandboxHubId) => `Sandbox "${account}" with portalId "${sandboxHubId}" was deleted successfully and removed as the default account.`,
2043
+ configFileUpdated: (account, configFilename) => `Removed account ${account} from ${configFilename}.`,
2044
+ },
2045
+ failure: {
2046
+ invalidUser: (account, parentAccount) => `Couldn't delete ${uiAccountDescription(account)} because your account has been removed from ${uiAccountDescription(parentAccount)} or your permission set doesn't allow you to delete the sandbox. To update your permissions, contact a super admin in ${uiAccountDescription(parentAccount)}.`,
2047
+ noAccount: 'No account specified. Specify an account by using the --account flag.',
2048
+ noSandboxAccounts: `There are no sandboxes connected to the CLI. To add a sandbox, run ${uiAuthCommandReference()}.`,
2049
+ noSandboxAccountId: "This sandbox can't be deleted from the CLI because we could not find the associated sandbox account.",
2050
+ noParentAccount: `This sandbox can't be deleted from the CLI because you haven't given the CLI access to its parent account. To do this, run ${uiAuthCommandReference()} and add the parent account.`,
2051
+ objectNotFound: (account) => `Sandbox ${uiAccountDescription(account)} may have been deleted through the UI. The account has been removed from the config.`,
2052
+ noParentPortalAvailable: (command, url) => `This sandbox can't be deleted from the CLI because you haven't given the CLI access to its parent account. To do this, run ${uiCommandReference(command)}. You can also delete the sandbox from the HubSpot management tool: ${chalk.bold(url)}.`,
2053
+ invalidKey: (account) => `Your personal access key for account ${uiAccountDescription(account)} is inactive. To re-authenticate, please run ${uiAuthCommandReference()}.`,
2054
+ },
2055
+ options: {
2056
+ force: {
2057
+ describe: 'Skips all confirmation prompts when deleting a sandbox account.',
2058
+ },
2059
+ account: {
2060
+ describe: 'Account name or id to delete',
2061
+ },
2062
+ },
2063
+ },
2064
+ },
2065
+ sync: {
2066
+ loading: {
2067
+ add: (accountName) => `Syncing sandbox ${chalk.bold(accountName)}`,
2068
+ fail: (accountName) => `Failed to sync sandbox ${chalk.bold(accountName)}.`,
2069
+ succeed: (accountName) => `Successfully synced sandbox ${chalk.bold(accountName)}.`,
2070
+ },
2071
+ success: {
2072
+ configFileUpdated: (accountName, authType) => `Account "${accountName}" updated using "${authType}"`,
2073
+ },
2074
+ failure: {
2075
+ 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)}.`,
2076
+ scopes: {
2077
+ message: "The personal access key you provided doesn't include sandbox sync permissions.",
2078
+ 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 ${uiAuthCommandReference()} and entering the new key.\n`,
2079
+ },
2080
+ },
2081
+ confirm: {
2082
+ syncContactRecords: {
2083
+ standard: 'Copy up to 5000 most recently updated contacts? This includes up to 100 of each of the following: associated deals, tickets, and companies.',
2084
+ developer: 'Include up to 100 most recently updated contacts? This includes up to 100 of each of the following: associated deals, tickets, and companies. This can be done once per sandbox.',
2085
+ },
2086
+ },
2087
+ },
2088
+ },
2089
+ app: {
2090
+ describe: 'Commands for managing apps.',
2091
+ subcommands: {
2092
+ secret: {
2093
+ describe: 'Commands for managing secrets.',
2094
+ subcommands: {
2095
+ add: {
2096
+ describe: 'Create a new app secret.',
2097
+ positionals: {
2098
+ name: 'Name of the secret',
2099
+ },
2100
+ errors: {
2101
+ 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.`,
2102
+ },
2103
+ options: {
2104
+ app: 'The app id to set the secret for',
2105
+ },
2106
+ example: 'Add a secret named "my-secret" to the app with ID 1234567890',
2107
+ success: (appName, secretName) => `App secret "${secretName}" was added to "${appName}"`,
2108
+ },
2109
+ delete: {
2110
+ describe: 'Delete an app secret.',
2111
+ confirmDelete: (appName, secretName) => `Are you sure you want to delete the secret "${secretName}" from "${appName}"?`,
2112
+ deleteCanceled: 'Delete canceled',
2113
+ selectSecret: 'Select the secret you want to delete',
2114
+ errors: {
2115
+ noSecrets: 'No secrets found for the given app',
2116
+ },
2117
+ positionals: {
2118
+ name: 'Name of the secret',
2119
+ },
2120
+ options: {
2121
+ app: 'The app id to delete the secret for',
2122
+ force: 'Force the deletion without confirmation',
2123
+ },
2124
+ example: 'Delete a secret named "my-secret" from the app with ID 1234567890',
2125
+ success: (appName, secretName) => `App secret "${secretName}" was removed from "${appName}"`,
2126
+ },
2127
+ list: {
2128
+ describe: 'List all app secrets.',
2129
+ example: 'List all secrets for the app with ID 1234567890',
2130
+ options: {
2131
+ app: 'The app id to list the secrets for',
2132
+ },
2133
+ errors: {
2134
+ noSecrets: 'No secrets found for the given app',
2135
+ },
2136
+ success: (appName) => `Showing secrets for "${appName}":`,
2137
+ },
2138
+ update: {
2139
+ describe: 'Update an app secret.',
2140
+ selectSecret: 'Select the secret you want to update',
2141
+ errors: {
2142
+ noSecrets: 'No secrets found for the given app',
2143
+ },
2144
+ positionals: {
2145
+ name: 'Name of the secret',
2146
+ },
2147
+ options: {
2148
+ app: 'The app id to update the secret for',
2149
+ },
2150
+ example: 'Update a secret named "my-secret" for the app with ID 1234567890',
2151
+ success: (appName, secretName) => `App secret "${secretName}" was updated in "${appName}"`,
2152
+ },
2153
+ },
2154
+ },
2155
+ },
2156
+ },
2157
+ secret: {
2158
+ describe: 'Commands for managing secrets.',
2159
+ subcommands: {
2160
+ add: {
2161
+ describe: 'Create a new secret.',
2162
+ errors: {
2163
+ add: (secretName) => `The secret "${secretName}" was not added`,
2164
+ alreadyExists: (secretName) => `The secret "${secretName}" already exists, it's value can be modified with ${uiCommandReference('hs secret update')}`,
2165
+ },
2166
+ positionals: {
2167
+ name: {
2168
+ describe: 'Name of the secret',
2169
+ },
2170
+ },
2171
+ success: {
2172
+ add: (secretName, accountId) => `The secret "${secretName}" was added to the HubSpot account: ${uiAccountDescription(accountId)}`,
2173
+ },
2174
+ },
2175
+ delete: {
2176
+ describe: 'Delete a secret.',
2177
+ selectSecret: 'Select the secret you want to delete',
2178
+ deleteCanceled: 'Delete canceled',
2179
+ confirmDelete: (secretName) => `Are you sure you want to delete the secret "${secretName}"?`,
2180
+ errors: {
2181
+ delete: (secretName) => `The secret "${secretName}" was not deleted`,
2182
+ noSecret: (secretName) => `Unable to delete secret with name "${secretName}", it does not exist`,
2183
+ },
2184
+ positionals: {
2185
+ name: {
2186
+ describe: 'Name of the secret',
2187
+ },
2188
+ },
2189
+ success: {
2190
+ delete: (secretName, accountId) => `The secret "${secretName}" was deleted from the HubSpot account: ${uiAccountDescription(accountId)}`,
2191
+ },
2192
+ },
2193
+ list: {
2194
+ describe: 'List all secrets.',
2195
+ errors: {
2196
+ list: 'The secrets could not be listed',
2197
+ },
2198
+ groupLabel: (accountIdentifier) => `Secrets for account ${accountIdentifier}:`,
2199
+ },
2200
+ update: {
2201
+ describe: 'Update an existing secret.',
2202
+ selectSecret: 'Select the secret you want to update',
2203
+ errors: {
2204
+ update: (secretName) => `The secret "${secretName}" was not updated`,
2205
+ noSecret: (secretName) => `Unable to update secret with name "${secretName}", it does not exist`,
2206
+ },
2207
+ positionals: {
2208
+ name: {
2209
+ describe: 'Name of the secret to be updated',
2210
+ },
2211
+ },
2212
+ success: {
2213
+ update: (secretName, accountId) => `The secret "${secretName}" was updated in the HubSpot account: ${accountId}`,
2214
+ updateExplanation: 'Existing serverless functions will start using this new value within 10 seconds.',
2215
+ },
2216
+ },
2217
+ },
2218
+ },
2219
+ convertFields: {
2220
+ describe: 'Converts a specific JavaScript fields file of a module or theme to JSON.',
2221
+ positionals: {
2222
+ src: {
2223
+ describe: 'Path to JS Fields file or directory containing javascript fields files.',
2224
+ },
2225
+ },
2226
+ options: {
2227
+ options: {
2228
+ describe: 'Options to pass to javascript fields files',
2229
+ },
2230
+ },
2231
+ errors: {
2232
+ invalidPath: (path) => `The path "${path}" specified in the "--src" flag is not a path to a file or directory`,
2233
+ missingSrc: 'Please specify the path to your javascript fields file or directory with the --src flag.',
2234
+ },
2235
+ },
2236
+ testAccount: {
2237
+ describe: 'Commands for working with test accounts.',
2238
+ subcommands: {
2239
+ importData: {
2240
+ describe: 'Import data into the CRM',
2241
+ options: {
2242
+ skipConfirm: {
2243
+ describe: 'Skip the confirmation prompt',
2244
+ },
2245
+ filePath: {
2246
+ describe: 'The path to the JSON file containing the import schema',
2247
+ },
2248
+ },
2249
+ },
2250
+ },
2251
+ create: {
2252
+ describe: `Create a test account from scratch or from a config file. Use ${uiCommandReference('hs test-account create-config')} to generate a config file. \n${uiLink('Learn more', 'https://developers.hubspot.com/docs/developer-tooling/local-development/configurable-test-accounts')}`,
2253
+ configPathPrompt: '[--config-path] Enter the path to the test account config: ',
2254
+ createTestAccountFromConfigPrompt: 'How would you like to create your test account?',
2255
+ createFromConfigOption: 'Create test account from config file',
2256
+ createFromScratchOption: 'Create test account from scratch',
2257
+ errors: {
2258
+ 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.`,
2259
+ configFileParseFailed: (configPath) => `Failed to parse test account config file at ${configPath}`,
2260
+ saveAccountToConfigFailure: (accountName) => `Failed to save test account config file to config at ${accountName}`,
2261
+ },
2262
+ polling: {
2263
+ start: (testAccountName) => `Creating test account "${chalk.bold(testAccountName)}"...`,
2264
+ syncing: 'Test account created! Syncing account data... (may take a few minutes - you can exit and the sync will continue)',
2265
+ success: (testAccountName, testAccountId, parentAccountId) => `Test account "${chalk.bold(testAccountName)}" successfully created with id ${chalk.bold(testAccountId)} under parent account ${uiAccountDescription(parentAccountId)}`,
2266
+ createFailure: 'Failed to create test account.',
2267
+ },
2268
+ options: {
2269
+ configPath: 'Path to config file (mutually exclusive with other flags)',
2270
+ accountName: 'Name for the test account',
2271
+ description: 'Description for the test account',
2272
+ marketingLevel: 'Marketing Hub tier. Options: FREE, STARTER, PROFESSIONAL, ENTERPRISE',
2273
+ opsLevel: 'Operations Hub tier. Options: FREE, STARTER, PROFESSIONAL, ENTERPRISE',
2274
+ serviceLevel: 'Service Hub tier. Options: FREE, STARTER, PROFESSIONAL, ENTERPRISE',
2275
+ salesLevel: 'Sales Hub tier. Options: FREE, STARTER, PROFESSIONAL, ENTERPRISE',
2276
+ contentLevel: 'CMS Hub tier. Options: FREE, STARTER, PROFESSIONAL, ENTERPRISE',
2277
+ commerceLevel: 'Commerce Hub tier. Options: FREE, PROFESSIONAL, ENTERPRISE',
2278
+ },
2279
+ example: (configPath) => `Create a test account from the config file at ${configPath}`,
2280
+ examples: {
2281
+ withAllHubsEnterprise: 'Create a test account with all hubs at ENTERPRISE level',
2282
+ withSpecificHubLevels: 'Create a test account with specific hub levels',
2283
+ },
2284
+ savedAccountNameDiffers: (originalName, savedName) => `Account name "${chalk.bold(originalName)}" was saved as "${chalk.bold(savedName)}" in config.`,
2285
+ },
2286
+ createConfig: {
2287
+ describe: 'Create a test account config file.',
2288
+ pathPrompt: '[--path] Enter the name of the test account config file: ',
2289
+ errors: {
2290
+ pathError: 'Path is required',
2291
+ pathFormatError: 'Path must end with .json',
2292
+ failedToCreate: 'Failed to create test account config',
2293
+ pathExistsError: 'A file already exists at this path. Please try again with a different path.',
2294
+ },
2295
+ success: {
2296
+ configFileCreated: (path) => `Test account config successfully created at ${path}`,
2297
+ },
2298
+ options: {
2299
+ name: 'The name of the test account',
2300
+ description: 'The description of the test account',
2301
+ path: 'The path to the test account config',
2302
+ },
2303
+ example: (name) => `Create a test account config file with the name "${name}"`,
2304
+ },
2305
+ delete: {
2306
+ describe: 'Delete a test account from your HubSpot account and CLI config',
2307
+ pathPrompt: '[--path] What is the path to the test account config?',
2308
+ info: {
2309
+ deletionCanceled: 'Deletion canceled by user',
2310
+ accountNotFoundWithId: (id) => `No account was found with ID ${id}`,
2311
+ replaceDefaultAccount: (testAccountId, parentAccountName) => `The removed test account ${chalk.bold(testAccountId)} was the default account. Replaced default account to parent account: ${chalk.bold(parentAccountName)}`,
2312
+ },
2313
+ prompts: {
2314
+ selectTestAccounts: 'Select test account(s) to delete',
2315
+ confirmDeletion: 'All data for the account will be permanently deleted. Any connected apps will have their access tokens revoked. Do you wish to proceed?',
2316
+ },
2317
+ errors: {
2318
+ failedToDelete: (testAccountToDelete) => `Failed to delete test account with ID ${testAccountToDelete}`,
2319
+ failedToSelectAccount: 'Failed to select a test account to delete',
2320
+ noAccountsToDelete: (accountId) => `There are no test accounts associated with ${uiAccountDescription(accountId)} to delete. Try running ${uiCommandReference('hs account use')} to change your default account`,
2321
+ failedToDeleteFromConfig: (testAccountToDelete) => `Failed to delete test account with ID ${testAccountToDelete} from the CLI config`,
2322
+ failedToFetchTestAccounts: 'Failed to fetch developer test accounts',
2323
+ testAccountNotFound: (nameOrId) => `Test account${nameOrId ? ` ${chalk.bold(nameOrId)}` : ''} not found in config. \nTry running ${uiCommandReference('hs account auth')} to add the account to config or visit ${uiLink('developer test accounts', 'https://app.hubspot.com/l/developer-test-accounts/')} to delete the test account.`,
2324
+ parentAccountNotFound: (testAccountId) => `Parent account of test account ${chalk.bold(testAccountId)} not found in config. \nTry running ${uiCommandReference('hs account auth')} to add the parent account to config or visit ${uiLink('developer test accounts', 'https://app.hubspot.com/l/developer-test-accounts/')} to delete the test account.`,
2325
+ },
2326
+ success: {
2327
+ testAccountDeletedFromHubSpot: (testAccountToDelete) => `Successfully deleted test account with ID ${testAccountToDelete}`,
2328
+ testAccountDeletedFromConfig: (accountId) => `Successfully deleted test account with ID ${accountId} from the CLI config`,
2329
+ },
2330
+ options: {
2331
+ name: 'The name of the test account (in your CLI config) to delete',
2332
+ id: 'The id of the test account',
2333
+ force: 'Skips all confirmation prompts when deleting a test account.',
2334
+ },
2335
+ examples: {
2336
+ withPositionalID: (testAccountToDelete) => `Delete a test account with id "${testAccountToDelete}" using positional argument`,
2337
+ withPositionalName: (testAccountToDelete) => `Delete a test account with name "${testAccountToDelete}" using positional argument`,
2338
+ withID: (testAccountToDelete) => `Delete a test account with the id "${testAccountToDelete}"`,
2339
+ withName: (testAccountToDelete) => `Delete a test account with the name "${testAccountToDelete}"`,
2340
+ withoutId: 'Delete a test account via a prompt',
2341
+ },
2342
+ },
2343
+ },
2344
+ secrets: {
2345
+ add: {
2346
+ loading: {
2347
+ add: (secretName) => `Adding secret ${chalk.bold(secretName)}`,
2348
+ fail: (secretName) => `Failed to add secret ${chalk.bold(secretName)}.`,
2349
+ succeed: (secretName) => `Successfully added secret ${chalk.bold(secretName)}.`,
2350
+ },
2351
+ success: {
2352
+ configFileUpdated: (secretName, authType) => `Secret "${secretName}" updated using "${authType}"`,
2353
+ },
2354
+ failure: {
2355
+ 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)}.`,
2356
+ scopes: {
2357
+ message: "The personal access key you provided doesn't include secrets permissions.",
2358
+ 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 ${uiAuthCommandReference()} and entering the new key.\n`,
2359
+ },
2360
+ },
2361
+ },
2362
+ delete: {
2363
+ loading: {
2364
+ add: (secretName) => `Deleting secret ${chalk.bold(secretName)}`,
2365
+ fail: (secretName) => `Failed to delete secret ${chalk.bold(secretName)}.`,
2366
+ succeed: (secretName) => `Successfully deleted secret ${chalk.bold(secretName)}.`,
2367
+ },
2368
+ success: {
2369
+ configFileUpdated: (secretName, authType) => `Secret "${secretName}" updated using "${authType}"`,
2370
+ },
2371
+ failure: {
2372
+ 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)}.`,
2373
+ scopes: {
2374
+ message: "The personal access key you provided doesn't include secrets permissions.",
2375
+ 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 ${uiAuthCommandReference()} and entering the new key.\n`,
2376
+ },
2377
+ },
2378
+ },
2379
+ list: {
2380
+ loading: {
2381
+ add: () => `Listing secrets`,
2382
+ fail: () => `Failed to list secrets.`,
2383
+ succeed: () => `Successfully listed secrets.`,
2384
+ },
2385
+ success: {
2386
+ configFileUpdated: (authType) => `Secrets updated using "${authType}"`,
2387
+ },
2388
+ failure: {
2389
+ 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)}.`,
2390
+ scopes: {
2391
+ message: "The personal access key you provided doesn't include secrets permissions.",
2392
+ 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 ${uiAuthCommandReference()} and entering the new key.\n`,
2393
+ },
2394
+ },
2395
+ },
2396
+ },
2397
+ serverless: {
2398
+ add: {
2399
+ loading: {
2400
+ add: (functionName) => `Adding serverless function ${chalk.bold(functionName)}`,
2401
+ fail: (functionName) => `Failed to add serverless function ${chalk.bold(functionName)}.`,
2402
+ succeed: (functionName) => `Successfully added serverless function ${chalk.bold(functionName)}.`,
2403
+ },
2404
+ success: {
2405
+ configFileUpdated: (functionName, authType) => `Serverless function "${functionName}" updated using "${authType}"`,
2406
+ },
2407
+ failure: {
2408
+ 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)}.`,
2409
+ scopes: {
2410
+ message: "The personal access key you provided doesn't include serverless function permissions.",
2411
+ 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 ${uiAuthCommandReference()} and entering the new key.\n`,
2412
+ },
2413
+ },
2414
+ },
2415
+ delete: {
2416
+ loading: {
2417
+ add: (functionName) => `Deleting serverless function ${chalk.bold(functionName)}`,
2418
+ fail: (functionName) => `Failed to delete serverless function ${chalk.bold(functionName)}.`,
2419
+ succeed: (functionName) => `Successfully deleted serverless function ${chalk.bold(functionName)}.`,
2420
+ },
2421
+ success: {
2422
+ configFileUpdated: (functionName, authType) => `Serverless function "${functionName}" updated using "${authType}"`,
2423
+ },
2424
+ failure: {
2425
+ 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)}.`,
2426
+ scopes: {
2427
+ message: "The personal access key you provided doesn't include serverless function permissions.",
2428
+ 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 ${uiAuthCommandReference()} and entering the new key.\n`,
2429
+ },
2430
+ },
2431
+ },
2432
+ list: {
2433
+ loading: {
2434
+ add: () => `Listing serverless functions`,
2435
+ fail: () => `Failed to list serverless functions.`,
2436
+ succeed: () => `Successfully listed serverless functions.`,
2437
+ },
2438
+ success: {
2439
+ configFileUpdated: (authType) => `Serverless functions updated using "${authType}"`,
2440
+ },
2441
+ failure: {
2442
+ 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)}.`,
2443
+ scopes: {
2444
+ message: "The personal access key you provided doesn't include serverless function permissions.",
2445
+ 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 ${uiAuthCommandReference()} and entering the new key.\n`,
2446
+ },
2447
+ },
2448
+ },
2449
+ },
2450
+ serverlessFunctionLogs: {
2451
+ add: {
2452
+ loading: {
2453
+ add: (functionName) => `Adding serverless function logs ${chalk.bold(functionName)}`,
2454
+ fail: (functionName) => `Failed to add serverless function logs ${chalk.bold(functionName)}.`,
2455
+ succeed: (functionName) => `Successfully added serverless function logs ${chalk.bold(functionName)}.`,
2456
+ },
2457
+ success: {
2458
+ configFileUpdated: (functionName, authType) => `Serverless function logs "${functionName}" updated using "${authType}"`,
2459
+ },
2460
+ failure: {
2461
+ 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)}.`,
2462
+ scopes: {
2463
+ message: "The personal access key you provided doesn't include serverless function log permissions.",
2464
+ 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 ${uiAuthCommandReference()} and entering the new key.\n`,
2465
+ },
2466
+ },
2467
+ },
2468
+ delete: {
2469
+ loading: {
2470
+ add: (functionName) => `Deleting serverless function logs ${chalk.bold(functionName)}`,
2471
+ fail: (functionName) => `Failed to delete serverless function logs ${chalk.bold(functionName)}.`,
2472
+ succeed: (functionName) => `Successfully deleted serverless function logs ${chalk.bold(functionName)}.`,
2473
+ },
2474
+ success: {
2475
+ configFileUpdated: (functionName, authType) => `Serverless function logs "${functionName}" updated using "${authType}"`,
2476
+ },
2477
+ failure: {
2478
+ 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)}.`,
2479
+ scopes: {
2480
+ message: "The personal access key you provided doesn't include serverless function log permissions.",
2481
+ 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 ${uiAuthCommandReference()} and entering the new key.\n`,
2482
+ },
2483
+ },
2484
+ },
2485
+ list: {
2486
+ loading: {
2487
+ add: () => `Listing serverless function logs`,
2488
+ fail: () => `Failed to list serverless function logs.`,
2489
+ succeed: () => `Successfully listed serverless function logs.`,
2490
+ },
2491
+ success: {
2492
+ configFileUpdated: (authType) => `Serverless function logs updated using "${authType}"`,
2493
+ },
2494
+ failure: {
2495
+ 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)}.`,
2496
+ scopes: {
2497
+ message: "The personal access key you provided doesn't include serverless function log permissions.",
2498
+ 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 ${uiAuthCommandReference()} and entering the new key.\n`,
2499
+ },
2500
+ },
2501
+ },
2502
+ },
2503
+ serverlessFunctionMetrics: {
2504
+ add: {
2505
+ loading: {
2506
+ add: (functionName) => `Adding serverless function metrics ${chalk.bold(functionName)}`,
2507
+ fail: (functionName) => `Failed to add serverless function metrics ${chalk.bold(functionName)}.`,
2508
+ succeed: (functionName) => `Successfully added serverless function metrics ${chalk.bold(functionName)}.`,
2509
+ },
2510
+ success: {
2511
+ configFileUpdated: (functionName, authType) => `Serverless function metrics "${functionName}" updated using "${authType}"`,
2512
+ },
2513
+ failure: {
2514
+ 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)}.`,
2515
+ scopes: {
2516
+ message: "The personal access key you provided doesn't include serverless function metric permissions.",
2517
+ 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 ${uiAuthCommandReference()} and entering the new key.\n`,
2518
+ },
2519
+ },
2520
+ },
2521
+ delete: {
2522
+ loading: {
2523
+ add: (functionName) => `Deleting serverless function metrics ${chalk.bold(functionName)}`,
2524
+ fail: (functionName) => `Failed to delete serverless function metrics ${chalk.bold(functionName)}.`,
2525
+ succeed: (functionName) => `Successfully deleted serverless function metrics ${chalk.bold(functionName)}.`,
2526
+ },
2527
+ success: {
2528
+ configFileUpdated: (functionName, authType) => `Serverless function metrics "${functionName}" updated using "${authType}"`,
2529
+ },
2530
+ failure: {
2531
+ 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)}.`,
2532
+ scopes: {
2533
+ message: "The personal access key you provided doesn't include serverless function metric permissions.",
2534
+ 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 ${uiAuthCommandReference()} and entering the new key.\n`,
2535
+ },
2536
+ },
2537
+ },
2538
+ list: {
2539
+ loading: {
2540
+ add: () => `Listing serverless function metrics`,
2541
+ fail: () => `Failed to list serverless function metrics.`,
2542
+ succeed: () => `Successfully listed serverless function metrics.`,
2543
+ },
2544
+ success: {
2545
+ configFileUpdated: (authType) => `Serverless function metrics updated using "${authType}"`,
2546
+ },
2547
+ failure: {
2548
+ 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)}.`,
2549
+ scopes: {
2550
+ message: "The personal access key you provided doesn't include serverless function metric permissions.",
2551
+ 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 ${uiAuthCommandReference()} and entering the new key.\n`,
2552
+ },
2553
+ },
2554
+ },
2555
+ },
2556
+ serverlessFunctionSettings: {
2557
+ add: {
2558
+ loading: {
2559
+ add: (functionName) => `Adding serverless function settings ${chalk.bold(functionName)}`,
2560
+ fail: (functionName) => `Failed to add serverless function settings ${chalk.bold(functionName)}.`,
2561
+ succeed: (functionName) => `Successfully added serverless function settings ${chalk.bold(functionName)}.`,
2562
+ },
2563
+ success: {
2564
+ configFileUpdated: (functionName, authType) => `Serverless function settings "${functionName}" updated using "${authType}"`,
2565
+ },
2566
+ failure: {
2567
+ 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)}.`,
2568
+ scopes: {
2569
+ message: "The personal access key you provided doesn't include serverless function setting permissions.",
2570
+ 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 ${uiAuthCommandReference()} and entering the new key.\n`,
2571
+ },
2572
+ },
2573
+ },
2574
+ delete: {
2575
+ loading: {
2576
+ add: (functionName) => `Deleting serverless function settings ${chalk.bold(functionName)}`,
2577
+ fail: (functionName) => `Failed to delete serverless function settings ${chalk.bold(functionName)}.`,
2578
+ succeed: (functionName) => `Successfully deleted serverless function settings ${chalk.bold(functionName)}.`,
2579
+ },
2580
+ success: {
2581
+ configFileUpdated: (functionName, authType) => `Serverless function settings "${functionName}" updated using "${authType}"`,
2582
+ },
2583
+ failure: {
2584
+ 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)}.`,
2585
+ scopes: {
2586
+ message: "The personal access key you provided doesn't include serverless function setting permissions.",
2587
+ 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 ${uiAuthCommandReference()} and entering the new key.\n`,
2588
+ },
2589
+ },
2590
+ },
2591
+ list: {
2592
+ loading: {
2593
+ add: () => `Listing serverless function settings`,
2594
+ fail: () => `Failed to list serverless function settings.`,
2595
+ succeed: () => `Successfully listed serverless function settings.`,
2596
+ },
2597
+ success: {
2598
+ configFileUpdated: (authType) => `Serverless function settings updated using "${authType}"`,
2599
+ },
2600
+ failure: {
2601
+ 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)}.`,
2602
+ scopes: {
2603
+ message: "The personal access key you provided doesn't include serverless function setting permissions.",
2604
+ 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 ${uiAuthCommandReference()} and entering the new key.\n`,
2605
+ },
2606
+ },
2607
+ },
2608
+ },
2609
+ serverlessFunctionVersions: {
2610
+ add: {
2611
+ loading: {
2612
+ add: (functionName) => `Adding serverless function versions ${chalk.bold(functionName)}`,
2613
+ fail: (functionName) => `Failed to add serverless function versions ${chalk.bold(functionName)}.`,
2614
+ succeed: (functionName) => `Successfully added serverless function versions ${chalk.bold(functionName)}.`,
2615
+ },
2616
+ success: {
2617
+ configFileUpdated: (functionName, authType) => `Serverless function versions "${functionName}" updated using "${authType}"`,
2618
+ },
2619
+ failure: {
2620
+ 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)}.`,
2621
+ scopes: {
2622
+ message: "The personal access key you provided doesn't include serverless function version permissions.",
2623
+ 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 ${uiAuthCommandReference()} and entering the new key.\n`,
2624
+ },
2625
+ },
2626
+ },
2627
+ delete: {
2628
+ loading: {
2629
+ add: (functionName) => `Deleting serverless function versions ${chalk.bold(functionName)}`,
2630
+ fail: (functionName) => `Failed to delete serverless function versions ${chalk.bold(functionName)}.`,
2631
+ succeed: (functionName) => `Successfully deleted serverless function versions ${chalk.bold(functionName)}.`,
2632
+ },
2633
+ success: {
2634
+ configFileUpdated: (functionName, authType) => `Serverless function versions "${functionName}" updated using "${authType}"`,
2635
+ },
2636
+ failure: {
2637
+ 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)}.`,
2638
+ scopes: {
2639
+ message: "The personal access key you provided doesn't include serverless function version permissions.",
2640
+ 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 ${uiAuthCommandReference()} and entering the new key.\n`,
2641
+ },
2642
+ },
2643
+ },
2644
+ list: {
2645
+ loading: {
2646
+ add: () => `Listing serverless function versions`,
2647
+ fail: () => `Failed to list serverless function versions.`,
2648
+ succeed: () => `Successfully listed serverless function versions.`,
2649
+ },
2650
+ success: {
2651
+ configFileUpdated: (authType) => `Serverless function versions updated using "${authType}"`,
2652
+ },
2653
+ failure: {
2654
+ 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)}.`,
2655
+ scopes: {
2656
+ message: "The personal access key you provided doesn't include serverless function version permissions.",
2657
+ 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 ${uiAuthCommandReference()} and entering the new key.\n`,
2658
+ },
2659
+ },
2660
+ },
2661
+ },
2662
+ serverlessFunctionWebhooks: {
2663
+ add: {
2664
+ loading: {
2665
+ add: (functionName) => `Adding serverless function webhooks ${chalk.bold(functionName)}`,
2666
+ fail: (functionName) => `Failed to add serverless function webhooks ${chalk.bold(functionName)}.`,
2667
+ succeed: (functionName) => `Successfully added serverless function webhooks ${chalk.bold(functionName)}.`,
2668
+ },
2669
+ success: {
2670
+ configFileUpdated: (functionName, authType) => `Serverless function webhooks "${functionName}" updated using "${authType}"`,
2671
+ },
2672
+ failure: {
2673
+ 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)}.`,
2674
+ scopes: {
2675
+ message: "The personal access key you provided doesn't include serverless function webhook permissions.",
2676
+ 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 ${uiAuthCommandReference()} and entering the new key.\n`,
2677
+ },
2678
+ },
2679
+ },
2680
+ delete: {
2681
+ loading: {
2682
+ add: (functionName) => `Deleting serverless function webhooks ${chalk.bold(functionName)}`,
2683
+ fail: (functionName) => `Failed to delete serverless function webhooks ${chalk.bold(functionName)}.`,
2684
+ succeed: (functionName) => `Successfully deleted serverless function webhooks ${chalk.bold(functionName)}.`,
2685
+ },
2686
+ success: {
2687
+ configFileUpdated: (functionName, authType) => `Serverless function webhooks "${functionName}" updated using "${authType}"`,
2688
+ },
2689
+ failure: {
2690
+ 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)}.`,
2691
+ scopes: {
2692
+ message: "The personal access key you provided doesn't include serverless function webhook permissions.",
2693
+ 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 ${uiAuthCommandReference()} and entering the new key.\n`,
2694
+ },
2695
+ },
2696
+ },
2697
+ list: {
2698
+ loading: {
2699
+ add: () => `Listing serverless function webhooks`,
2700
+ fail: () => `Failed to list serverless function webhooks.`,
2701
+ succeed: () => `Successfully listed serverless function webhooks.`,
2702
+ },
2703
+ success: {
2704
+ configFileUpdated: (authType) => `Serverless function webhooks updated using "${authType}"`,
2705
+ },
2706
+ failure: {
2707
+ 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)}.`,
2708
+ scopes: {
2709
+ message: "The personal access key you provided doesn't include serverless function webhook permissions.",
2710
+ 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 ${uiAuthCommandReference()} and entering the new key.\n`,
2711
+ },
2712
+ },
2713
+ },
2714
+ },
2715
+ serverlessFunctionWebhookSubscriptions: {
2716
+ add: {
2717
+ loading: {
2718
+ add: (functionName) => `Adding serverless function webhook subscriptions ${chalk.bold(functionName)}`,
2719
+ fail: (functionName) => `Failed to add serverless function webhook subscriptions ${chalk.bold(functionName)}.`,
2720
+ succeed: (functionName) => `Successfully added serverless function webhook subscriptions ${chalk.bold(functionName)}.`,
2721
+ },
2722
+ success: {
2723
+ configFileUpdated: (functionName, authType) => `Serverless function webhook subscriptions "${functionName}" updated using "${authType}"`,
2724
+ },
2725
+ failure: {
2726
+ 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)}.`,
2727
+ scopes: {
2728
+ message: "The personal access key you provided doesn't include serverless function webhook subscription permissions.",
2729
+ 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 ${uiAuthCommandReference()} and entering the new key.\n`,
2730
+ },
2731
+ },
2732
+ },
2733
+ delete: {
2734
+ loading: {
2735
+ add: (functionName) => `Deleting serverless function webhook subscriptions ${chalk.bold(functionName)}`,
2736
+ fail: (functionName) => `Failed to delete serverless function webhook subscriptions ${chalk.bold(functionName)}.`,
2737
+ succeed: (functionName) => `Successfully deleted serverless function webhook subscriptions ${chalk.bold(functionName)}.`,
2738
+ },
2739
+ success: {
2740
+ configFileUpdated: (functionName, authType) => `Serverless function webhook subscriptions "${functionName}" updated using "${authType}"`,
2741
+ },
2742
+ failure: {
2743
+ 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)}.`,
2744
+ scopes: {
2745
+ message: "The personal access key you provided doesn't include serverless function webhook subscription permissions.",
2746
+ 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 ${uiAuthCommandReference()} and entering the new key.\n`,
2747
+ },
2748
+ },
2749
+ },
2750
+ list: {
2751
+ loading: {
2752
+ add: () => `Listing serverless function webhook subscriptions`,
2753
+ fail: () => `Failed to list serverless function webhook subscriptions.`,
2754
+ succeed: () => `Successfully listed serverless function webhook subscriptions.`,
2755
+ },
2756
+ success: {
2757
+ configFileUpdated: (authType) => `Serverless function webhook subscriptions updated using "${authType}"`,
2758
+ },
2759
+ failure: {
2760
+ 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)}.`,
2761
+ scopes: {
2762
+ message: "The personal access key you provided doesn't include serverless function webhook subscription permissions.",
2763
+ 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 ${uiAuthCommandReference()} and entering the new key.\n`,
2764
+ },
2765
+ },
2766
+ },
2767
+ },
2768
+ serverlessFunctionWebhookSubscriptionEvents: {
2769
+ add: {
2770
+ loading: {
2771
+ add: (functionName) => `Adding serverless function webhook subscription events ${chalk.bold(functionName)}`,
2772
+ fail: (functionName) => `Failed to add serverless function webhook subscription events ${chalk.bold(functionName)}.`,
2773
+ succeed: (functionName) => `Successfully added serverless function webhook subscription events ${chalk.bold(functionName)}.`,
2774
+ },
2775
+ success: {
2776
+ configFileUpdated: (functionName, authType) => `Serverless function webhook subscription events "${functionName}" updated using "${authType}"`,
2777
+ },
2778
+ failure: {
2779
+ 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)}.`,
2780
+ scopes: {
2781
+ message: "The personal access key you provided doesn't include serverless function webhook subscription event permissions.",
2782
+ 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 ${uiAuthCommandReference()} and entering the new key.\n`,
2783
+ },
2784
+ },
2785
+ },
2786
+ delete: {
2787
+ loading: {
2788
+ add: (functionName) => `Deleting serverless function webhook subscription events ${chalk.bold(functionName)}`,
2789
+ fail: (functionName) => `Failed to delete serverless function webhook subscription events ${chalk.bold(functionName)}.`,
2790
+ succeed: (functionName) => `Successfully deleted serverless function webhook subscription events ${chalk.bold(functionName)}.`,
2791
+ },
2792
+ success: {
2793
+ configFileUpdated: (functionName, authType) => `Serverless function webhook subscription events "${functionName}" updated using "${authType}"`,
2794
+ },
2795
+ failure: {
2796
+ 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)}.`,
2797
+ scopes: {
2798
+ message: "The personal access key you provided doesn't include serverless function webhook subscription event permissions.",
2799
+ 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 ${uiAuthCommandReference()} and entering the new key.\n`,
2800
+ },
2801
+ },
2802
+ },
2803
+ list: {
2804
+ loading: {
2805
+ add: () => `Listing serverless function webhook subscription events`,
2806
+ fail: () => `Failed to list serverless function webhook subscription events.`,
2807
+ succeed: () => `Successfully listed serverless function webhook subscription events.`,
2808
+ },
2809
+ success: {
2810
+ configFileUpdated: (authType) => `Serverless function webhook subscription events updated using "${authType}"`,
2811
+ },
2812
+ failure: {
2813
+ 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)}.`,
2814
+ scopes: {
2815
+ message: "The personal access key you provided doesn't include serverless function webhook subscription event permissions.",
2816
+ 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 ${uiAuthCommandReference()} and entering the new key.\n`,
2817
+ },
2818
+ },
2819
+ },
2820
+ },
2821
+ serverlessFunctionWebhookSubscriptionEventTypes: {
2822
+ add: {
2823
+ loading: {
2824
+ add: (functionName) => `Adding serverless function webhook subscription event types ${chalk.bold(functionName)}`,
2825
+ fail: (functionName) => `Failed to add serverless function webhook subscription event types ${chalk.bold(functionName)}.`,
2826
+ succeed: (functionName) => `Successfully added serverless function webhook subscription event types ${chalk.bold(functionName)}.`,
2827
+ },
2828
+ success: {
2829
+ configFileUpdated: (functionName, authType) => `Serverless function webhook subscription event types "${functionName}" updated using "${authType}"`,
2830
+ },
2831
+ failure: {
2832
+ 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)}.`,
2833
+ scopes: {
2834
+ message: "The personal access key you provided doesn't include serverless function webhook subscription event type permissions.",
2835
+ 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 ${uiAuthCommandReference()} and entering the new key.\n`,
2836
+ },
2837
+ },
2838
+ },
2839
+ delete: {
2840
+ loading: {
2841
+ add: (functionName) => `Deleting serverless function webhook subscription event types ${chalk.bold(functionName)}`,
2842
+ fail: (functionName) => `Failed to delete serverless function webhook subscription event types ${chalk.bold(functionName)}.`,
2843
+ succeed: (functionName) => `Successfully deleted serverless function webhook subscription event types ${chalk.bold(functionName)}.`,
2844
+ },
2845
+ success: {
2846
+ configFileUpdated: (functionName, authType) => `Serverless function webhook subscription event types "${functionName}" updated using "${authType}"`,
2847
+ },
2848
+ failure: {
2849
+ 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)}.`,
2850
+ scopes: {
2851
+ message: "The personal access key you provided doesn't include serverless function webhook subscription event type permissions.",
2852
+ 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 ${uiAuthCommandReference()} and entering the new key.\n`,
2853
+ },
2854
+ },
2855
+ },
2856
+ list: {
2857
+ loading: {
2858
+ add: () => `Listing serverless function webhook subscription event types`,
2859
+ fail: () => `Failed to list serverless function webhook subscription event types.`,
2860
+ succeed: () => `Successfully listed serverless function webhook subscription event types.`,
2861
+ },
2862
+ success: {
2863
+ configFileUpdated: (authType) => `Serverless function webhook subscription event types updated using "${authType}"`,
2864
+ },
2865
+ failure: {
2866
+ 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)}.`,
2867
+ scopes: {
2868
+ message: "The personal access key you provided doesn't include serverless function webhook subscription event type permissions.",
2869
+ 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 ${uiAuthCommandReference()} and entering the new key.\n`,
2870
+ },
2871
+ },
2872
+ },
2873
+ },
2874
+ serverlessFunctionWebhookSubscriptionEventTypeOptions: {
2875
+ add: {
2876
+ loading: {
2877
+ add: (functionName) => `Adding serverless function webhook subscription event type options ${chalk.bold(functionName)}`,
2878
+ fail: (functionName) => `Failed to add serverless function webhook subscription event type options ${chalk.bold(functionName)}.`,
2879
+ succeed: (functionName) => `Successfully added serverless function webhook subscription event type options ${chalk.bold(functionName)}.`,
2880
+ },
2881
+ success: {
2882
+ configFileUpdated: (functionName, authType) => `Serverless function webhook subscription event type options "${functionName}" updated using "${authType}"`,
2883
+ },
2884
+ failure: {
2885
+ 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)}.`,
2886
+ scopes: {
2887
+ message: "The personal access key you provided doesn't include serverless function webhook subscription event type option permissions.",
2888
+ 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 ${uiAuthCommandReference()} and entering the new key.\n`,
2889
+ },
2890
+ },
2891
+ },
2892
+ delete: {
2893
+ loading: {
2894
+ add: (functionName) => `Deleting serverless function webhook subscription event type options ${chalk.bold(functionName)}`,
2895
+ fail: (functionName) => `Failed to delete serverless function webhook subscription event type options ${chalk.bold(functionName)}.`,
2896
+ succeed: (functionName) => `Successfully deleted serverless function webhook subscription event type options ${chalk.bold(functionName)}.`,
2897
+ },
2898
+ success: {
2899
+ configFileUpdated: (functionName, authType) => `Serverless function webhook subscription event type options "${functionName}" updated using "${authType}"`,
2900
+ },
2901
+ failure: {
2902
+ 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)}.`,
2903
+ scopes: {
2904
+ message: "The personal access key you provided doesn't include serverless function webhook subscription event type option permissions.",
2905
+ 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 ${uiAuthCommandReference()} and entering the new key.\n`,
2906
+ },
2907
+ },
2908
+ },
2909
+ list: {
2910
+ loading: {
2911
+ add: () => `Listing serverless function webhook subscription event type options`,
2912
+ fail: () => `Failed to list serverless function webhook subscription event type options.`,
2913
+ succeed: () => `Successfully listed serverless function webhook subscription event type options.`,
2914
+ },
2915
+ success: {
2916
+ configFileUpdated: (authType) => `Serverless function webhook subscription event type options updated using "${authType}"`,
2917
+ },
2918
+ failure: {
2919
+ 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)}.`,
2920
+ scopes: {
2921
+ message: "The personal access key you provided doesn't include serverless function webhook subscription event type option permissions.",
2922
+ 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 ${uiAuthCommandReference()} and entering the new key.\n`,
2923
+ },
2924
+ },
2925
+ },
2926
+ },
2927
+ };
2928
+ export const lib = {
2929
+ parsing: {
2930
+ unableToParseStringToNumber: 'Unable to parse string to number',
2931
+ },
2932
+ configMiddleWare: {
2933
+ invalidAccountIdEnvironmentVariable: 'Unable to parse `HUBSPOT_ACCOUNT_ID` environment variable into a number',
2934
+ },
2935
+ process: {
2936
+ exitDebug: (signal) => `Attempting to gracefully exit. Triggered by ${signal}`,
2937
+ },
2938
+ DevServerManager: {
2939
+ portConflict: (port) => `The port ${port} is already in use.`,
2940
+ notInitialized: 'The Dev Server Manager must be initialized before it is started.',
2941
+ noCompatibleComponents: (serverKey) => `Skipping call to ${serverKey} because there are no compatible components in the project.`,
2942
+ },
2943
+ LocalDevManager: {
2944
+ appNotFound: (accountId, appUid) => `Unable to find app with uid ${appUid} in account ${uiAccountDescription(accountId)}`,
2945
+ failedToInitialize: 'Missing required arguments to initialize Local Dev',
2946
+ 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.`,
2947
+ noComponents: 'There are no components in this project.',
2948
+ headerMessage: 'HubSpot projects local development',
2949
+ learnMoreLocalDevServer: uiLink('Learn more about the projects local dev server', 'https://developers.hubspot.com/docs/developer-tooling/local-development/hubspot-cli/project-commands'),
2950
+ running: (projectName, accountIdentifier) => chalk.hex(UI_COLORS.SORBET)(`Running ${chalk.bold(projectName)} locally on ${accountIdentifier}, waiting for changes ...`),
2951
+ quitHelper: `Press ${chalk.bold('q')} to stop the local dev server`,
2952
+ viewProjectLink: (name, accountId) => uiLink('View project in HubSpot', getProjectDetailUrl(name, accountId) || ''),
2953
+ viewLocalDevUILink: (accountId, showWelcomeScreen) => uiLink('View local dev session in HubSpot', getLocalDevUiUrl(accountId, showWelcomeScreen)),
2954
+ localDevUIAutoMessage: (accountId, showWelcomeScreen) => `Opening your ${uiLink('local dev session in HubSpot', getLocalDevUiUrl(accountId, showWelcomeScreen))}...`,
2955
+ viewTestAccountLink: 'View developer test account in HubSpot',
2956
+ exitingStart: 'Stopping local dev server ...',
2957
+ exitingSucceed: 'Successfully exited',
2958
+ exitingFail: 'Failed to cleanup before exiting',
2959
+ 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')}.`,
2960
+ uploadWarning: {
2961
+ appLabel: '[App]',
2962
+ uiExtensionLabel: '[UI Extension]',
2963
+ 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.`,
2964
+ defaultWarning: chalk.bold('Changing project configuration requires a new project build.'),
2965
+ 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.`,
2966
+ header: (warning) => `${warning} To reflect these changes and continue testing:`,
2967
+ instructionsHeader: 'To reflect these changes and continue testing:',
2968
+ stopDev: ` * Stop ${uiCommandReference('hs project dev')}`,
2969
+ runUpload: (command) => ` * Run ${command}`,
2970
+ restartDev: ` * Re-run ${uiCommandReference('hs project dev')}`,
2971
+ pushToGithub: ' * Commit and push your changes to GitHub',
2972
+ 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.`,
2973
+ },
2974
+ activeInstallWarning: {
2975
+ installCount: (appName, installCount) => `${chalk.bold(`The app ${appName} is installed in ${installCount} production ${installCount === 1 ? 'account' : 'accounts'}`)}`,
2976
+ 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.',
2977
+ confirmation: `You will always be asked to confirm any permanent changes to your app's configuration before uploading them.`,
2978
+ confirmationPrompt: `Proceed with local development of this ${chalk.bold('production')} app?`,
2979
+ },
2980
+ devServer: {
2981
+ cleanupError: (message) => `Failed to cleanup local dev server: ${message}`,
2982
+ setupError: (message) => `Failed to setup local dev server: ${message}`,
2983
+ startError: (message) => `Failed to start local dev server: ${message}`,
2984
+ fileChangeError: (message) => `Failed to notify local dev server of file change: ${message}`,
2985
+ },
2986
+ devSession: {
2987
+ registrationError: (message) => `Failed to register dev session: ${message}`,
2988
+ missingSessionIdError: 'Failed to connect to dev session: Missing session ID. Please try creating a new dev session.',
2989
+ heartbeatError: (message) => `Failed to send dev session heartbeat: ${message}`,
2990
+ deletionError: (message) => `Failed to delete dev session: ${message}`,
2991
+ },
2992
+ },
2993
+ AppDevModeInterface: {
2994
+ autoInstallStaticAuthApp: {
2995
+ installing: (appName, targetTestAccountId) => `Installing ${chalk.bold(appName)} on account ${uiAccountDescription(targetTestAccountId)}...`,
2996
+ success: (appName, targetTestAccountId) => `Successfully installed ${chalk.bold(appName)} on account ${uiAccountDescription(targetTestAccountId)}\n`,
2997
+ error: (appName, targetTestAccountId) => `Error installing ${chalk.bold(appName)} on account ${uiAccountDescription(targetTestAccountId)}. You may still be able to install your app in your browser.`,
2998
+ },
2999
+ 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.`,
3000
+ autoInstallDeclined: 'You must install your app on your target test account to proceed with local development.',
3001
+ autoInstallSuccess: (appName, targetTestAccountId) => `Successfully installed app ${appName} on account ${uiAccountDescription(targetTestAccountId)}\n`,
3002
+ fetchAppData: {
3003
+ checking: (appName) => `Checking installations for your app ${chalk.bold(appName)}...`,
3004
+ success: (appName, accountId) => `Your app ${chalk.bold(appName)} is installed on account ${uiAccountDescription(accountId, false)}`,
3005
+ notInstalled: (appName, accountId) => `Your app ${chalk.bold(appName)} is not currently installed on account ${uiAccountDescription(accountId, false)}`,
3006
+ activeInstallations: (appName, installCount) => `[WARNING] Your app ${chalk.bold(appName)} is installed in ${chalk.bold(`${installCount} ${installCount === 1 ? 'account' : 'accounts'}`)}`,
3007
+ error: 'An error occurred while checking installations for your app',
3008
+ },
3009
+ 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.`,
3010
+ 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.`,
3011
+ installationFailed: 'An error occured while installing your app. Your app must be installed in your target test account to proceed with local development.',
3012
+ waitUntilAppIsInstalled: {
3013
+ link: (installUrl) => `${uiLink('Install your app', installUrl)} to proceed with local development\n`,
3014
+ waiting: 'Waiting for your app to be installed...',
3015
+ success: (appName, accountId) => `Your app ${chalk.bold(appName)} has been installed successfully on account ${uiAccountDescription(accountId)}\n`,
3016
+ },
3017
+ appDataNotFound: 'An error occurred while fetching data for your app.',
3018
+ oauthAppRedirectUrlError: (redirectUrl) => `${chalk.bold('No reponse from your OAuth service:')} ${redirectUrl}\nYour app needs a valid OAuth2 service to be installed for local dev. ${uiLink('Learn more', 'https://developers.hubspot.com/docs/apps/developer-platform/build-apps/authentication/oauth/working-with-oauth')}`,
3019
+ },
3020
+ CLIWebsocketServer: {
3021
+ errors: {
3022
+ portManagerNotRunning: (prefix) => `${prefix ? `${prefix} ` : ''}PortManagerServing must be running before starting WebsocketServer.`,
3023
+ originNotAllowed: (origin) => `Connections from ${origin ? `origin ${origin}` : 'this origin'} are not allowed.`,
3024
+ missingTypeField: (data) => `Unsupported message received. Missing type field: ${data}`,
3025
+ invalidJSON: (data) => `Unsupported message received. Invalid JSON: ${data}`,
3026
+ unknownMessageType: (type) => `Unsupported message received. Unknown message type: ${type}`,
3027
+ },
3028
+ logs: {
3029
+ startup: (port) => `WebsocketServer running on port ${port}`,
3030
+ },
3031
+ },
3032
+ LocalDevProcess: {
3033
+ projectConfigMismatch: `Unable to upload project. The project config has been modified since starting ${uiCommandReference('hs project dev')}.`,
3034
+ uploadInitiated: 'Project upload initiated from Local Dev UI.',
3035
+ deployInitiated: 'Project deploy initiated from Local Dev UI.',
3036
+ uploadFailed: 'Project upload failed. To proceed with local development, fix any necessary errors, then re-upload your project.',
3037
+ deployFailed: 'Project deploy failed. To proceed with local development, fix any necessary errors, then re-deploy your project.',
3038
+ uploadSuccess: 'Project upload completed successfully. Resuming local dev...',
3039
+ uploadSuccessAutoDeployDisabled: 'Project upload completed successfully, but auto-deploy is disabled for this project. Deploy your latest build to proceed with local development.',
3040
+ deploySuccess: 'Project deploy completed successfully. Resuming local dev...',
3041
+ noBuildToDeploy: 'Error deploying project. No build was found to deploy.',
3042
+ },
3043
+ localDevHelpers: {
3044
+ project: {
3045
+ compareLocalProjectToDeployed: {
3046
+ 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.`,
3047
+ checking: 'Checking if your deployed build is up to date...',
3048
+ upToDate: 'Deployed build is up to date.',
3049
+ notUpToDate: `Your project contains undeployed local changes.`,
3050
+ 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.`,
3051
+ },
3052
+ createNewProjectForLocalDev: {
3053
+ 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.`,
3054
+ 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.`,
3055
+ createProject: (projectName, accountIdentifier) => `Create new project ${projectName} in ${accountIdentifier}?`,
3056
+ choseNotToCreateProject: 'Exiting because this command requires the project to exist in the target account.',
3057
+ creatingProject: (projectName, accountIdentifier) => `Creating project ${projectName} in ${accountIdentifier}`,
3058
+ createdProject: (projectName, accountIdentifier) => `Created project ${projectName} in ${accountIdentifier}`,
3059
+ failedToCreateProject: 'Failed to create project in the target account.',
3060
+ },
3061
+ createInitialBuildForNewProject: {
3062
+ initialUploadMessage: 'HubSpot Local Dev Server Startup',
3063
+ 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.',
3064
+ genericError: `An error occurred while creating the initial build for this project. Run ${uiCommandReference('hs project upload')} to try again.`,
3065
+ },
3066
+ checkAndInstallDependencies: {
3067
+ checkingDependencies: 'Checking for missing or updated dependencies...',
3068
+ dependenciesUpToDate: 'All dependencies are up to date',
3069
+ dependenciesFailure: 'Failed to check or install dependencies',
3070
+ },
3071
+ },
3072
+ account: {
3073
+ checkIfDefaultAccountIsSupported: {
3074
+ 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 account use')}, or link a new account with ${uiAuthCommandReference()}.`,
3075
+ 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 account use')}, or link a new account with ${uiAuthCommandReference()}.`,
3076
+ },
3077
+ validateAccountOption: {
3078
+ 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 account use')} and run ${uiCommandReference('hs project dev')} to set up a new developer test account.`,
3079
+ 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 account use')}.`,
3080
+ nonSandboxWarning: `Testing in a sandbox is strongly recommended. To switch the target account, select an option below or run ${uiCommandReference('hs account use')} before running the command again.`,
3081
+ publicAppNonDeveloperTestAccountWarning: `Local development of public apps is only supported in ${chalk.bold('developer test accounts')}.`,
3082
+ },
3083
+ checkIfParentAccountIsAuthed: {
3084
+ notAuthedError: (parentAccountId, accountIdentifier) => `To develop this project locally, run ${uiAuthCommandReference({ accountId: parentAccountId })} to authenticate the App Developer Account ${parentAccountId} associated with ${accountIdentifier}.`,
3085
+ },
3086
+ selectAccountTypePrompt: {
3087
+ message: 'Choose the type of account to test on',
3088
+ developerTestAccountOption: 'Test on a developer test account (recommended)',
3089
+ sandboxAccountOption: 'Test on a sandbox account',
3090
+ sandboxAccountOptionDisabled: 'Disabled - requires access to sandbox accounts',
3091
+ productionAccountOption: (accountId) => `<${chalk.red('!')} Test on your project account: ${uiAccountDescription(accountId, false)} ${chalk.red('!')}>`,
3092
+ },
3093
+ confirmDefaultAccountIsTarget: {
3094
+ configError: `An error occurred while reading the default account from your config. Run ${uiAuthCommandReference()} to re-auth this account`,
3095
+ declineDefaultAccountExplanation: `To develop on a different account, run ${uiCommandReference('hs account use')} to change your default account, then re-run ${uiCommandReference('hs project dev')}.`,
3096
+ },
3097
+ },
3098
+ },
3099
+ middleware: {
3100
+ updateNotification: {
3101
+ notifyTitle: chalk.bold('Update available'),
3102
+ cmsUpdateNotification: (packageName) => `${chalk.bold('The CMS CLI is now the HubSpot CLI')}\n\nTo upgrade, uninstall ${chalk.bold(packageName)}\nand then run ${uiCommandReference('{updateCommand}')}`,
3103
+ cliUpdateNotification: (currentVersion, updateCommand, latestVersion) => `HubSpot CLI version ${chalk.cyan(chalk.bold(`${currentVersion}`))} is outdated.\nRun ${uiCommandReference(`${updateCommand}`)} to upgrade to version ${chalk.cyan(chalk.bold(`${latestVersion}`))}`,
3104
+ },
3105
+ autoUpdateCLI: {
3106
+ updateAvailable: (latestVersion) => `There's a new HubSpot CLI version available! Updating to version ${chalk.bold(latestVersion)}`,
3107
+ updateSucceeded: (latestVersion) => `Successfully updated HubSpot CLI to version ${chalk.bold(latestVersion)}`,
3108
+ notInstalledGlobally: 'Cannot auto-update the HubSpot CLI because NPM is not installed globally',
3109
+ updateFailed: (latestVersion) => `Failed to update HubSpot CLI to version ${chalk.bold(latestVersion)}`,
3110
+ enableAutoUpdatesMessage: `The HubSpot CLI can automatically keep itself up to date.\n\nThis helps ensure compatibility with the HubSpot platform. You can change this later at any time.\n\nRun ${uiCommandReference('hs config set --allow-auto-updates=true')}`,
3111
+ },
3112
+ },
3113
+ projectProfiles: {
3114
+ logs: {
3115
+ usingProfile: (profileName) => `Using profile from ${chalk.bold(profileName)}`,
3116
+ profileTargetAccount: (accountId) => `Targeting ${uiAccountDescription(accountId)}`,
3117
+ profileVariables: 'Profile variables',
3118
+ },
3119
+ exitIfUsingProfiles: {
3120
+ errors: {
3121
+ noProfileSpecified: `This project is configured to use profiles, but no profile was specified. Target a profile using the ${uiCommandReference('--profile')} flag.`,
3122
+ },
3123
+ },
3124
+ loadProfile: {
3125
+ errors: {
3126
+ noProjectConfig: 'No project config found. Please run this command from a project directory.',
3127
+ profileNotFound: (profileName) => `Profile ${chalk.bold(profileName)} not found.`,
3128
+ missingAccountId: (profileName) => `Profile ${chalk.bold(profileName)} is missing an account id.`,
3129
+ listedAccountNotFound: (accountId, profileName) => `The account ${uiAccountDescription(accountId)} is defined in your profile ${chalk.bold(profileName)}, but is missing in your config file`,
3130
+ failedToLoadProfile: (profileName) => `Failed to load profile ${chalk.bold(profileName)}.`,
3131
+ profileNotValid: (profileName, errors) => `${chalk.bold(`With profile "${profileName}"`)}:\n\t- ${errors.join('\n\t- ')}`,
3132
+ },
3133
+ },
3134
+ },
3135
+ projects: {
3136
+ create: {
3137
+ prompt: {
3138
+ marketPlaceDistribution: 'On the HubSpot marketplace',
3139
+ privateDistribution: 'Privately',
3140
+ distribution: '[--distribution] Choose how to distribute your app:',
3141
+ auth: '[--auth] Choose your authentication type:',
3142
+ staticAuth: 'Static Auth',
3143
+ oauth: 'OAuth',
3144
+ },
3145
+ errors: {
3146
+ 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.',
3147
+ 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.',
3148
+ 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"].',
3149
+ exceededMaxNumberOfApps: (max) => `This project currently has the maximum number of apps: ${max}`,
3150
+ unableToParseAppConfig: (file) => `Unable to parse app file: ${file}`,
3151
+ invalidAuthDistCombo: (authType, distribution) => `Invalid distribution and auth combination. Apps with distribution '${distribution}' must have auth '${authType}'`,
3152
+ },
3153
+ },
3154
+ add: {
3155
+ nothingAdded: 'No features were added to the project. Use the space bar to select features from the list.',
3156
+ },
3157
+ updateHsMetaFilesWithAutoGeneratedFields: {
3158
+ header: 'Created the following components and features:',
3159
+ applicationLog: (componentType, uid, name) => ` - Created ${chalk.bold(componentType)} with uid ${chalk.bold(uid)} and name ${chalk.bold(name)}`,
3160
+ componentLog: (componentType, uid) => ` - Created ${chalk.bold(componentType)} feature with uid ${chalk.bold(uid)}`,
3161
+ failedToUpdate: (hsMetaFile) => `Failed to update the uid in ${chalk.bold(hsMetaFile)}`,
3162
+ },
3163
+ generateSafeFilenameDifferentiator: {
3164
+ failedToCheckFiles: 'Failed to check files for filename differentiator. Falling back to timestamp.',
3165
+ },
3166
+ validateProjectConfig: {
3167
+ 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.`,
3168
+ configMissingFields: (missingFields) => `The project configuration file is missing required field${missingFields.length > 1 ? 's' : ''}: ${missingFields.map(f => chalk.bold(f)).join(', ')}`,
3169
+ srcDirNotFound: (srcDir, projectDir) => `Project source directory ${chalk.bold(srcDir)} could not be found in ${chalk.bold(projectDir)}.`,
3170
+ 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"`,
3171
+ },
3172
+ getProjectConfig: {
3173
+ error: 'Could not read from project config',
3174
+ },
3175
+ platformVersion: {
3176
+ unsupported: (currentCliVersion, latestSupported, platformVersion) => `Platform version${platformVersion ? ' ' + chalk.bold(platformVersion) : ''} is not officially supported by this version of the CLI (${chalk.bold(currentCliVersion)}).\n\nUpdate your CLI to the latest version with ${uiCommandReference('hs upgrade')} or use a compatible platform version (${chalk.bold(latestSupported)} or earlier).`,
3177
+ },
3178
+ ensureProjectExists: {
3179
+ createPrompt: (projectName, accountIdentifier) => `The project ${projectName} does not exist in ${accountIdentifier}. Would you like to create it?`,
3180
+ createPromptUpload: (projectName, accountIdentifier) => `[--forceCreate] The project ${projectName} does not exist in ${accountIdentifier}. Would you like to create it?`,
3181
+ createSuccess: (projectName, accountIdentifier) => `New project ${chalk.bold(projectName)} successfully created in ${chalk.bold(accountIdentifier)}.`,
3182
+ notFound: (projectName, accountIdentifier) => `Your project ${chalk.bold(projectName)} could not be found in ${chalk.bold(accountIdentifier)}.`,
3183
+ },
3184
+ pollFetchProject: {
3185
+ checkingProject: (accountIdentifier) => `Checking if project exists in ${accountIdentifier}`,
3186
+ },
3187
+ logFeedbackMessage: {
3188
+ feedbackHeader: "We'd love to hear your feedback!",
3189
+ feedbackMessage: `How are you liking the new projects and developer tools? \n > Run ${uiCommandReference('hs feedback')} to let us know what you think!\n`,
3190
+ },
3191
+ components: {
3192
+ unableToGetUidFromHsmeta: 'Unable to get UID from hsmeta',
3193
+ buildSuccessMessage: {
3194
+ seeOurDocs: 'See our docs',
3195
+ docsUrl: 'https://developers.hubspot.com/docs/apps/developer-platform/build-apps/overview',
3196
+ headerCreated: (projectName, projectDest) => `${chalk.bold(projectName)} was successfully created in ${projectDest}`,
3197
+ headerAdded: (featureText, uid, plural) => `${featureText} ${plural ? 'were' : 'was'} successfully added to ${uid}:`,
3198
+ docsDetails: (docsLink) => `📖 ${docsLink} for more details about building and testing these features.`,
3199
+ uploadPrompt: `🚀 Run ${uiCommandReference('hs project upload')} when you're ready to deploy.`,
3200
+ devPrompt: `🧪 Run ${uiCommandReference('hs project dev')} to start local development.`,
3201
+ },
3202
+ },
3203
+ },
3204
+ projectBuildAndDeploy: {
3205
+ makePollTaskStatusFunc: {
3206
+ errorSummary: 'See below for a summary of errors.',
3207
+ componentCountSingular: 'Found 1 component in this project\n',
3208
+ componentCount: (numComponents) => `Found ${numComponents} components in this project\n`,
3209
+ successStatusText: 'DONE',
3210
+ failedStatusText: 'FAILED',
3211
+ errorFetchingTaskStatus: (taskType) => `Error fetching ${taskType} status`,
3212
+ },
3213
+ pollBuildAutodeployStatusError: (buildId) => `Error fetching autodeploy status for build #${buildId}`,
3214
+ pollProjectBuildAndDeploy: {
3215
+ buildSucceededAutomaticallyDeploying: (buildId, accountIdentifier) => `Build #${buildId} succeeded. ${chalk.bold('Automatically deploying')} to ${accountIdentifier}\n`,
3216
+ cleanedUpTempFile: (path) => `Cleaned up temporary file ${path}`,
3217
+ viewDeploys: 'view all deploys for this project in HubSpot',
3218
+ 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}.`,
3219
+ },
3220
+ },
3221
+ projectUpload: {
3222
+ 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')}`,
3223
+ uploadProjectFiles: {
3224
+ add: (projectName, accountIdentifier) => `Uploading ${chalk.bold(projectName)} project files to ${accountIdentifier}`,
3225
+ fail: (projectName, accountIdentifier) => `Failed to upload ${chalk.bold(projectName)} project files to ${accountIdentifier}`,
3226
+ succeed: (projectName, accountIdentifier) => `Uploaded ${chalk.bold(projectName)} project files to ${accountIdentifier}`,
3227
+ buildCreated: (projectName, buildId) => `Project "${projectName}" uploaded and build #${buildId} created`,
3228
+ },
3229
+ handleProjectUpload: {
3230
+ emptySource: (srcDir) => `Source directory "${srcDir}" is empty. Add files to your project and rerun ${uiCommandReference('hs project upload')} to upload them to HubSpot.`,
3231
+ compressed: (byteCount) => `Project files compressed: ${byteCount} bytes`,
3232
+ compressing: (path) => `Compressing build files to "${path}"`,
3233
+ fileFiltered: (filename) => `Ignore rule triggered for "${filename}"`,
3234
+ legacyFileDetected: (filename, platformVersion) => `The ${chalk.bold(filename)} file is not supported on platform version ${chalk.bold(platformVersion)} and will be ignored.`,
3235
+ projectDoesNotExist: (accountId) => `Upload cancelled. Run ${uiCommandReference('hs project upload')} again to create the project in ${uiAccountDescription(accountId)}.`,
3236
+ },
3237
+ },
3238
+ importData: {
3239
+ errors: {
3240
+ incorrectAccountType: (derivedAccountId) => `The account ${uiAccountDescription(derivedAccountId)} is not a standard account, developer test account, or app developer account.`,
3241
+ failedToImportData: 'Failed to import data into portal.',
3242
+ notDeveloperTestAccount: 'The account is not a developer test account.',
3243
+ noAccountConfig: (accountId) => `No account config found for ${uiAccountDescription(accountId)}`,
3244
+ },
3245
+ inProgress: (portalId, fileNames) => `Importing data into ${uiAccountDescription(portalId)} from [${fileNames.join(', ')}]`,
3246
+ viewImportLink: (baseUrl, accountId, importId) => `Data import currently processing. You can view the status of your import ${uiLink('here', `${baseUrl}/import/${accountId}/post/${importId}`)}`,
3247
+ },
3248
+ ui: {
3249
+ betaTag: '[BETA]',
3250
+ betaTagWithStyle: chalk.bold('[BETA]'),
3251
+ betaWarning: {
3252
+ header: chalk.yellow('***************************** WARNING ****************************'),
3253
+ footer: chalk.yellow('******************************************************************'),
3254
+ },
3255
+ infoTag: chalk.bold('[INFO]'),
3256
+ deprecatedTag: '[DEPRECATED]',
3257
+ deprecatedTagWithStyle: chalk.bold('[DEPRECATED]'),
3258
+ errorTag: chalk.bold('[ERROR]'),
3259
+ deprecatedMessage: (command, url) => `The ${command} command is deprecated and will be disabled soon. ${url}`,
3260
+ deprecatedDescription: (message, command, url) => `${message}. The ${command} command is deprecated and will be disabled soon. ${url}`,
3261
+ deprecatedUrlText: 'Learn more.',
3262
+ disabledMessage: (command, npmCommand, url) => `The ${command} command is disabled. Run ${npmCommand} to update to the latest HubSpot CLI version. ${url}`,
3263
+ disabledUrlText: 'See all HubSpot CLI commands here.',
3264
+ featureHighlight: {
3265
+ defaultTitle: "What's next?",
3266
+ featureKeys: {
3267
+ accountOption: {
3268
+ command: '--account',
3269
+ message: (command) => `Use the ${command} option with any command to override the default account`,
3270
+ },
3271
+ accountsListCommand: {
3272
+ command: 'hs accounts list',
3273
+ message: (command) => `${command} - See a list of configured HubSpot accounts`,
3274
+ },
3275
+ accountsUseCommand: {
3276
+ command: 'hs account use',
3277
+ message: (command) => `${command} - Set the Hubspot account that the CLI will target by default`,
3278
+ },
3279
+ authCommand: {
3280
+ command: 'hs auth',
3281
+ message: (command) => `${command} - Connect the CLI to additional HubSpot accounts`,
3282
+ },
3283
+ feedbackCommand: {
3284
+ command: 'hs feedback',
3285
+ message: (command) => `${command} - Report a bug or leave feedback`,
3286
+ },
3287
+ helpCommand: {
3288
+ command: 'hs help',
3289
+ message: (command) => `${command} - See a list of available commands`,
3290
+ },
3291
+ projectCreateCommand: {
3292
+ command: 'hs project create',
3293
+ message: (command) => `${command} - Create a new project`,
3294
+ },
3295
+ projectDeployCommand: {
3296
+ command: 'hs project deploy',
3297
+ message: (command) => `Ready to take your project live? Run ${command}`,
3298
+ },
3299
+ projectHelpCommand: {
3300
+ command: 'hs project --help',
3301
+ message: (command) => `${command} - Learn more about available project commands`,
3302
+ },
3303
+ projectUploadCommand: {
3304
+ command: 'hs project upload',
3305
+ message: (command) => `${command} - Upload your project to HubSpot and trigger builds`,
3306
+ },
3307
+ projectDevCommand: {
3308
+ command: 'hs project dev',
3309
+ message: (command) => `${command} - Set up a test environment and start local development`,
3310
+ },
3311
+ projectInstallDepsCommand: {
3312
+ command: 'hs project install-deps',
3313
+ message: (command) => `${command} - Install all project dependencies`,
3314
+ },
3315
+ projectCommandTip: {
3316
+ message: 'Tip: All project commands must be run from within a project directory',
3317
+ },
3318
+ sampleProjects: {
3319
+ linkText: "HubSpot's sample projects",
3320
+ url: 'https://developers.hubspot.com/docs/platform/sample-projects?utm_source=cli&utm_content=project_create_whats_next',
3321
+ message: (link) => `See ${link}`,
3322
+ },
3323
+ },
3324
+ },
3325
+ git: {
3326
+ securityIssue: 'Security Issue Detected',
3327
+ configFileTracked: 'The HubSpot config file can be tracked by git.',
3328
+ fileName: (configPath) => `File: "${configPath}"`,
3329
+ remediate: 'To remediate:',
3330
+ moveConfig: (homeDir) => `- Move the config file to your home directory: '${homeDir}'`,
3331
+ addGitignore: (configPath) => `- Add gitignore pattern '${configPath}' to a .gitignore file in root of your repository.`,
3332
+ noRemote: '- Ensure that the config file has not already been pushed to a remote repository.',
3333
+ checkFailed: 'Unable to determine if config file is properly ignored by git.',
3334
+ },
3335
+ serverlessFunctionLogs: {
3336
+ unableToProcessLog: (log) => `Unable to process log ${log}`,
3337
+ noLogsFound: 'No logs found.',
3338
+ },
3339
+ },
3340
+ buildAccount: {
3341
+ createDeveloperTestAccountV2: {
3342
+ syncFailure: 'Failed to sync developer test account',
3343
+ pakFailure: 'Failed to generate personal access key for developer test account',
3344
+ },
3345
+ },
3346
+ configOptions: {
3347
+ enableOrDisableBooleanFieldPrompt: {
3348
+ message: (fieldName) => `Choose to enable or disable ${fieldName}`,
3349
+ labels: {
3350
+ enabled: 'Enabled',
3351
+ disabled: 'Disabled',
3352
+ },
3353
+ },
3354
+ setAllowUsageTracking: {
3355
+ fieldName: 'usage tracking',
3356
+ success: (isEnabled) => `Successfully updated ${chalk.bold('allow usage tracking')} to ${chalk.bold(isEnabled)}`,
3357
+ },
3358
+ setAllowAutoUpdates: {
3359
+ fieldName: 'auto updates',
3360
+ success: (isEnabled) => `Successfully updated ${chalk.bold('allow auto updates')} to ${chalk.bold(isEnabled)}`,
3361
+ },
3362
+ setDefaultCmsPublishMode: {
3363
+ promptMessage: 'Select CMS publish mode to be used as the default',
3364
+ error: (validModes) => `The provided CMS publish mode is invalid. Valid values are ${validModes}.`,
3365
+ success: (mode) => `Successfully updated ${chalk.bold('default CMS publish mode')} to ${chalk.bold(mode)}`,
3366
+ },
3367
+ setHttpTimeout: {
3368
+ promptMessage: 'Enter http timeout duration',
3369
+ success: (timeout) => `Successfully updated ${chalk.bold('HTTP timeout')} to ${chalk.bold(timeout)}`,
3370
+ error: (timeout) => `Invalid HTTP timeout value "${timeout}". Must be a number greater than 3000.`,
3371
+ },
3372
+ setAutoOpenBrowser: {
3373
+ fieldName: 'auto open browser',
3374
+ enabled: `Successfully updated ${chalk.bold('auto open browser')} to ${chalk.bold('enabled')}`,
3375
+ disabled: `Successfully updated ${chalk.bold('auto open browser')} to ${chalk.bold('disabled')}`,
3376
+ },
3377
+ },
3378
+ commonOpts: {
3379
+ options: {
3380
+ account: 'HubSpot account id or name from config',
3381
+ config: 'Path to a config file',
3382
+ overwrite: 'Overwrite existing files',
3383
+ modes: {
3384
+ default: (modes) => `${modes}`,
3385
+ read: (modes) => `Read from ${modes}`,
3386
+ write: (modes) => `Write to ${modes}`,
3387
+ },
3388
+ qa: 'Run command in QA mode',
3389
+ useEnv: 'Use environment variable config',
3390
+ jsonOutput: 'Format output as JSON',
3391
+ debug: 'Set log level to debug',
3392
+ },
3393
+ },
3394
+ configMigrate: {
3395
+ deprecatedConfigWarning: (deprecatedConfigPath) => `This command applies to global configuration, but we detected a deprecated config at ${deprecatedConfigPath}.`,
3396
+ handleMigration: {
3397
+ 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.`,
3398
+ confirmPrompt: 'Migrate the deprecated config to the global location?',
3399
+ success: 'Your deprecated config file has been successfully migrated.',
3400
+ },
3401
+ handleMergeConfigProperties: {
3402
+ mergeConflictMessage: (count, propertyList) => `Conflict${count > 1 ? 's' : ''} detected for ${chalk.bold(propertyList)}.`,
3403
+ mergeConfigConflictPrompt: (property, newValue, oldValue) => `Change ${property} from ${newValue} to ${oldValue}?`,
3404
+ },
3405
+ handleAccountNameConflicts: {
3406
+ warnings: {
3407
+ accountNameConflictMessage: (count) => `${count} account name conflict${count > 1 ? 's' : ''} detected.`,
3408
+ forceFlagDetected: (count, renameDetails) => `Force flag detected. Automatically renaming ${count} account${count > 1 ? 's' : ''} with duplicate name${count > 1 ? 's' : ''}:\n${renameDetails}`,
3409
+ },
3410
+ prompts: {
3411
+ renameOrOmitAccountPrompt: (accountName, accountId) => `Local account name="${accountName}" (ID: ${accountId}) conflicts with an existing global account.\nRename the local account to include it in the merge? If not, it will be skipped.`,
3412
+ newAccountNamePrompt: (accountName, portalId) => `Enter a new name for the local account [ID: ${portalId}] (currently named "${accountName}"):`,
3413
+ },
3414
+ errors: {
3415
+ nameRequired: 'The name may not be blank. Please add a name for the config.',
3416
+ sameName: 'The new account name must be different from the current name.',
3417
+ nameAlreadyInConfig: (name) => `The name "${name}" is already used by another account.`,
3418
+ },
3419
+ },
3420
+ handleMerge: {
3421
+ 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.`,
3422
+ confirmPrompt: 'Merge the deprecated config into your global config?',
3423
+ skippedExistingAccounts: (accountIds) => `The following accounts were not merged because they already exist in the global config:${accountIds.map(id => `\n- ${uiAccountDescription(Number(id))}`).join('')}`,
3424
+ success: 'Your deprecated config file has been successfully merged with the global config file.',
3425
+ },
3426
+ errors: {
3427
+ archive: (deprecatedConfigPath) => `The config migration was successful, but an error occurred when archiving config file at ${deprecatedConfigPath}. You may need to manually delete or rename this config file.`,
3428
+ },
3429
+ },
3430
+ prompts: {
3431
+ promptUtils: {
3432
+ errors: {
3433
+ noSelectableChoices: 'Exiting prompt because no selectable choices are available',
3434
+ },
3435
+ },
3436
+ importDataFilePathPrompt: {
3437
+ promptContext: `To view the JSON schema for data imports, visit ${uiLink('the docs', 'https://developers.hubspot.com/docs/guides/api/crm/imports')}`,
3438
+ promptMessage: '[--file-path] Select the JSON file that will be used to import your data.',
3439
+ },
3440
+ confirmImportDataPrompt: {
3441
+ message: (dataFileNames, cliAccount) => `You are importing [${dataFileNames.join(', ')}] into ${uiAccountDescription(cliAccount?.accountId)}. Continue?`,
3442
+ },
3443
+ importDataTestAccountSelectPrompt: {
3444
+ errors: {
3445
+ noAccountsFound: 'No accounts found.',
3446
+ noChildTestAccountsFound: (parentAccountId) => `No developer test accounts found under the parent account ${uiAccountDescription(parentAccountId)}`,
3447
+ },
3448
+ },
3449
+ projectDevTargetAccountPrompt: {
3450
+ createNewSandboxOption: '<Test on a new development sandbox>',
3451
+ createNewDeveloperTestAccountOption: '<Test on a new developer test account>',
3452
+ chooseDefaultAccountOption: `<${chalk.bold('❗')} Test on this production account ${chalk.bold('❗')}>`,
3453
+ promptMessage: (accountType, accountIdentifier) => `Choose a ${accountType} under ${accountIdentifier} to test with:`,
3454
+ sandboxLimit: (limit) => `Your account reached the limit of ${limit} development sandboxes`,
3455
+ sandboxLimitWithSuggestion: (limit) => `Your account reached the limit of ${limit} development sandboxes. Run ${uiAuthCommandReference()} to add an existing one to the config.`,
3456
+ developerTestAccountLimit: (limit) => `Your account reached the limit of ${limit} developer test accounts.`,
3457
+ confirmDefaultAccount: (accountName, accountType) => `Continue testing on ${chalk.bold(`${accountName} (${accountType})`)}? (Y/n)`,
3458
+ 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.`,
3459
+ noAccountId: 'No account ID found for the selected account. Please try again.',
3460
+ },
3461
+ projectLogsPrompt: {
3462
+ functionName: (projectName) => `[--function] Select function in ${chalk.bold(projectName)} project`,
3463
+ },
3464
+ setAsDefaultAccountPrompt: {
3465
+ setAsDefaultAccountMessage: 'Set this account as the default?',
3466
+ setAsDefaultAccount: (accountName) => `Account "${accountName}" set as the default account`,
3467
+ keepingCurrentDefault: (accountName) => `Account "${accountName}" will continue to be the default account`,
3468
+ },
3469
+ createDeveloperTestAccountConfigPrompt: {
3470
+ namePrompt: (withFlag = true) => `${withFlag ? '[--name] ' : ''}Enter the name of the test account:`,
3471
+ descriptionPrompt: (withFlag = true) => `${withFlag ? '[--description] ' : ''}Enter the description of the test account:`,
3472
+ useDefaultAccountLevelsPrompt: {
3473
+ message: 'Would you like to create a default test account, or customize your own?',
3474
+ default: 'Default (All Hubs, ENTERPRISE)',
3475
+ manual: 'Customize my own',
3476
+ },
3477
+ tiersPrompt: 'Select an option per hub to customize tiers. If left blank, default is ENTERPRISE',
3478
+ hubTypes: {
3479
+ marketing: 'Marketing',
3480
+ ops: 'Ops',
3481
+ service: 'Service',
3482
+ sales: 'Sales',
3483
+ content: 'Content',
3484
+ commerce: 'Commerce',
3485
+ },
3486
+ errors: {
3487
+ allHubsRequired: 'Select a tier for each hub',
3488
+ tiersError: 'Cannot have more than one tier per hub',
3489
+ nameRequired: 'The name may not be blank. Please add a name for the test account.',
3490
+ },
3491
+ },
3492
+ accountNamePrompt: {
3493
+ enterAccountName: 'Enter a unique name to reference this account in the CLI:',
3494
+ enterDeveloperTestAccountName: 'Name your developer test account:',
3495
+ enterStandardSandboxName: 'Name your standard sandbox:',
3496
+ enterDevelopmentSandboxName: 'Name your development sandbox:',
3497
+ sandboxDefaultName: (sandboxType) => `New ${sandboxType} sandbox`,
3498
+ developerTestAccountDefaultName: (count) => `Developer test account ${count}`,
3499
+ errors: {
3500
+ invalidName: 'You entered an invalid name. Please try again.',
3501
+ nameRequired: 'The name may not be blank. Please try again.',
3502
+ spacesInName: 'The name may not contain spaces. Please try again.',
3503
+ accountNameExists: (name) => `Account with name "${name}" already exists in the CLI config, please enter a different name.`,
3504
+ },
3505
+ },
3506
+ personalAccessKeyPrompt: {
3507
+ enterAccountId: 'Enter the account ID for your account (the number under the DOMAIN column at https://app.hubspot.com/myaccounts-beta ): ',
3508
+ enterClientId: 'Enter your OAuth2 client ID: ',
3509
+ enterClientSecret: 'Enter your OAuth2 client secret: ',
3510
+ enterPersonalAccessKey: '[--personal-access-key] Enter your personal access key: ',
3511
+ selectScopes: 'Select access scopes (see https://developers.hubspot.com/docs/methods/oauth2/initiate-oauth-integration#scopes)',
3512
+ personalAccessKeySetupTitle: 'HubSpot Personal Access Key Setup',
3513
+ personalAccessKeyBrowserOpenPrep: 'A personal access key is required to authenticate the CLI to interact with your HubSpot account.',
3514
+ personalAccessKeyPromptChoices: {
3515
+ OPEN_BROWSER: 'Open HubSpot to copy your personal access key',
3516
+ PASTE_EXISTING: 'Enter existing personal access key',
3517
+ },
3518
+ logs: {
3519
+ openingWebBrowser: (url) => `Opening ${url} in your web browser`,
3520
+ },
3521
+ errors: {
3522
+ invalidAccountId: 'You did not enter a valid account ID. Please try again.',
3523
+ invalidOauthClientId: 'You entered an invalid OAuth2 client ID. Please try again.',
3524
+ invalidOauthClientIdLength: 'The OAuth2 client ID must be 36 characters long. Please try again.',
3525
+ invalidOauthClientSecret: 'You entered an invalid OAuth2 client secret. Please try again.',
3526
+ invalidOauthClientSecretLength: 'The OAuth2 client secret must be 36 characters long. Please try again.',
3527
+ invalidOauthClientSecretCopy: 'Please copy the actual OAuth2 client secret rather than the asterisks that mask it.',
3528
+ invalidPersonalAccessKey: 'You did not enter a valid access key. Please try again.',
3529
+ invalidPersonalAccessKeyCopy: 'Please copy the actual access key rather than the bullets that mask it.',
3530
+ authCancelled: 'Authentication cancelled.',
3531
+ },
3532
+ },
3533
+ createTemplatePrompt: {
3534
+ selectTemplate: 'Select the type of template to create',
3535
+ },
3536
+ createModulePrompt: {
3537
+ enterLabel: 'What should the module label be?',
3538
+ selectReactType: 'Is this a React module?',
3539
+ selectContentType: 'What types of content will this module be used in?',
3540
+ confirmGlobal: 'Is this a global module?',
3541
+ availableForNewContent: 'Make this module available for new content?',
3542
+ errors: {
3543
+ invalidLabel: 'You entered an invalid name. Please try again.',
3544
+ labelRequired: 'The name may not be blank. Please try again.',
3545
+ contentTypeRequired: 'Please select at least one content type for this module.',
3546
+ },
3547
+ },
3548
+ createFunctionPrompt: {
3549
+ enterFolder: 'Name of the folder where your function will be created: ',
3550
+ enterFilename: 'Name of the JavaScript file for your function: ',
3551
+ enterEndpointPath: 'Path portion of the URL created for the function: ',
3552
+ selectEndpointMethod: 'Select the HTTP method for the endpoint',
3553
+ errors: {
3554
+ invalid: 'You entered an invalid name. Please try again.',
3555
+ blank: 'The name may not be blank. Please try again.',
3556
+ space: 'The name may not contain spaces. Please try again.',
3557
+ },
3558
+ },
3559
+ createApiSamplePrompt: {
3560
+ selectApiSampleApp: 'Please select API sample app',
3561
+ selectLanguage: "Please select sample app's language",
3562
+ errors: {
3563
+ apiSampleAppRequired: 'Please select API sample app',
3564
+ languageRequired: "Please select API sample app's language",
3565
+ },
3566
+ },
3567
+ projectNameAndDestPrompt: {
3568
+ enterName: '[--name] Enter your project name:',
3569
+ enterDest: '[--dest] Choose where to create the project:',
3570
+ errors: {
3571
+ nameRequired: 'A project name is required',
3572
+ destRequired: 'A project dest is required',
3573
+ invalidDest: 'There is an existing project at this destination. Please provide a new path for this project.',
3574
+ invalidCharacters: 'The selected destination contains invalid characters. Please provide a new path and try again.',
3575
+ },
3576
+ },
3577
+ selectProjectTemplatePrompt: {
3578
+ selectTemplate: '[--template] Choose a project template: ',
3579
+ features: '[--features] Choose which features to add:',
3580
+ errors: {
3581
+ invalidTemplate: (template) => `[--template] Could not find template "${template}". Please choose an available template:`,
3582
+ projectTemplateRequired: 'Project template is required when projectTemplates is provided',
3583
+ },
3584
+ },
3585
+ selectAppPrompt: {
3586
+ selectAppId: '[--app] Select an app:',
3587
+ errors: {
3588
+ noApps: 'No apps were found for the given account.',
3589
+ invalidAppId: 'Invalid app id',
3590
+ },
3591
+ },
3592
+ selectPublicAppForMigrationPrompt: {
3593
+ selectAppIdMigrate: (accountName) => `[--appId] Choose an app under ${accountName} to migrate:`,
3594
+ selectAppIdClone: (accountName) => `[--appId] Choose an app under ${accountName} to clone:`,
3595
+ errors: {
3596
+ noAccountId: 'An account ID is required to select an app.',
3597
+ noAppsMigration: `${chalk.bold('No apps to migrate')}`,
3598
+ noAppsClone: `${chalk.bold('No apps to clone')}`,
3599
+ noAppsMigrationMessage: (accountName) => `The selected developer account ${chalk.bold(accountName)} doesn't have any apps that can be migrated to the projects framework.`,
3600
+ noAppsCloneMessage: (accountName) => `The selected developer account ${chalk.bold(accountName)} doesn't have any apps that can be cloned to the projects framework.`,
3601
+ errorFetchingApps: 'There was an error fetching public apps.',
3602
+ cannotBeMigrated: 'Cannot be migrated',
3603
+ },
3604
+ },
3605
+ downloadProjectPrompt: {
3606
+ selectProject: 'Select a project to download:',
3607
+ errors: {
3608
+ projectNotFound: (projectName, accountId) => `Your project ${projectName} could not be found in ${accountId}. Please select a valid project:`,
3609
+ accountIdRequired: 'An account ID is required to download a project.',
3610
+ },
3611
+ },
3612
+ projectAddPrompt: {
3613
+ selectType: '[--type] Choose which features to add: ',
3614
+ selectFeatures: '[--features] Choose which features to add: ',
3615
+ enterName: '[--name] Give your component a name: ',
3616
+ errors: {
3617
+ nameRequired: 'A component name is required',
3618
+ componentRequired: 'Must select a feature to add',
3619
+ noSelectableChoices: 'There are no available features that can be added to this project',
3620
+ invalidType: (type) => `[--type] Could not find type "${type}". Please choose an available type:`,
3621
+ cannotAddFeature: (feature, reasons) => `Cannot Add feature '${feature}' to project for the following reasons: ${reasons}`,
3622
+ },
3623
+ },
3624
+ secretPrompt: {
3625
+ enterValue: 'Enter a value for the secret: ',
3626
+ enterName: 'Enter the name of the secret to add: ',
3627
+ selectSecretUpdate: 'Select the secret you want to update',
3628
+ selectSecretDelete: 'Select the secret you want to delete',
3629
+ errors: {
3630
+ invalidValue: 'You entered an invalid value. Please try again.',
3631
+ },
3632
+ },
3633
+ sandboxesPrompt: {
3634
+ selectAccountName: 'Select the sandbox account you want to delete',
3635
+ selectParentAccountName: 'Select the account that the sandbox belongs to',
3636
+ type: {
3637
+ message: 'Choose the type of sandbox you want to create',
3638
+ developer: "Development sandbox (Includes production's object definitions)",
3639
+ standard: "Standard sandbox (Includes partial copy of production's assets)",
3640
+ },
3641
+ },
3642
+ uploadPrompt: {
3643
+ enterDest: 'Enter the destination path: ',
3644
+ enterSrc: 'Enter the source path: ',
3645
+ errors: {
3646
+ srcRequired: 'You must specify a source directory.',
3647
+ destRequired: 'You must specify a destination directory.',
3648
+ },
3649
+ fieldsPrompt: (dir) => `Multiple fields files located in "${dir}". Please choose which to upload: `,
3650
+ },
3651
+ projectNamePrompt: {
3652
+ enterName: '[--project] Enter project name:',
3653
+ errors: {
3654
+ invalidName: 'You entered an invalid name. Please try again.',
3655
+ projectDoesNotExist: (projectName, accountId) => `Project ${chalk.bold(projectName)} could not be found in "${uiAccountDescription(accountId)}"`,
3656
+ },
3657
+ },
3658
+ previewPrompt: {
3659
+ enterSrc: '[--src] Enter a local theme directory to preview.',
3660
+ enterDest: '[--dest] Enter the destination path for the src theme in HubSpot Design Tools.',
3661
+ themeProjectSelect: '[--theme] Select which theme to preview.',
3662
+ errors: {
3663
+ srcRequired: 'You must specify a source directory.',
3664
+ destRequired: 'You must specify a destination directory.',
3665
+ },
3666
+ },
3667
+ installAppPrompt: {
3668
+ explanation: 'Local development requires this app to be installed in the target test account.',
3669
+ 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.",
3670
+ prompt: 'Open HubSpot to install this app?',
3671
+ autoPrompt: 'Install this app in your target test account?',
3672
+ reinstallPrompt: 'Open HubSpot to reinstall this app?',
3673
+ decline: `To continue local development of this app, install it in your target test account and re-run ${chalk.bold('`hs project dev`')}`,
3674
+ },
3675
+ selectHubDBTablePrompt: {
3676
+ selectTable: 'Select a HubDB table:',
3677
+ enterDest: 'Enter the destination path:',
3678
+ errors: {
3679
+ noTables: (accountId) => `No HubDB tables found in account ${accountId}`,
3680
+ errorFetchingTables: (accountId) => `Unable to fetch HubDB tables in account ${accountId}`,
3681
+ destRequired: 'A destination is required',
3682
+ invalidDest: 'The selected destination already exists. Please provide a new path.',
3683
+ invalidCharacters: 'The selected destination contains invalid characters. Please provide a new path and try again.',
3684
+ },
3685
+ },
3686
+ },
3687
+ polling: {
3688
+ timeoutError: (timeoutMs) => `Polling timed out after ${timeoutMs}ms.`,
3689
+ },
3690
+ convertFields: {
3691
+ positionals: {
3692
+ src: {
3693
+ describe: 'Path to JS Fields file or directory containing javascript fields files.',
3694
+ },
3695
+ },
3696
+ options: {
3697
+ options: {
3698
+ describe: 'Options to pass to javascript fields files',
3699
+ },
3700
+ },
3701
+ },
3702
+ developerTestAccount: {
3703
+ create: {
3704
+ loading: {
3705
+ add: (accountName) => `Creating developer test account ${chalk.bold(accountName)}`,
3706
+ fail: (accountName) => `Failed to create a developer test account ${chalk.bold(accountName)}.`,
3707
+ succeed: (accountName, accountId) => `Successfully created a developer test account ${chalk.bold(accountName)} with portalId ${chalk.bold(accountId)}.`,
3708
+ },
3709
+ success: {
3710
+ configFileUpdated: (accountName, authType) => `Account "${accountName}" updated using "${authType}"`,
3711
+ },
3712
+ failure: {
3713
+ 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)}.`,
3714
+ 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 ${uiAuthCommandReference()} and follow the prompts.`,
3715
+ alreadyInConfig: (accountName, limit) => `${chalk.bold(accountName)} reached the limit of ${limit} developer test accounts. \n- To use an existing developer test account, run ${uiCommandReference('hs account use')}.`,
3716
+ scopes: {
3717
+ message: "The personal access key you provided doesn't include developer test account permissions.",
3718
+ 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 ${uiAuthCommandReference()} and entering the new key.\n`,
3719
+ },
3720
+ },
3721
+ },
3722
+ },
3723
+ sandbox: {
3724
+ create: {
3725
+ developer: {
3726
+ loading: {
3727
+ add: (accountName) => `Creating developer sandbox ${chalk.bold(accountName)}`,
3728
+ fail: (accountName) => `Failed to create a developer sandbox ${chalk.bold(accountName)}.`,
3729
+ succeed: (accountName, accountId) => `Successfully created a developer sandbox ${chalk.bold(accountName)} with portalId ${chalk.bold(accountId)}.`,
3730
+ },
3731
+ success: {
3732
+ configFileUpdated: (accountName, authType) => `Account "${accountName}" updated using "${authType}"`,
3733
+ },
3734
+ failure: {
3735
+ limit: (accountId, limit, link) => `${uiAccountDescription(accountId)} reached the limit of ${limit} developer sandboxes. \n- View sandbox details at ${uiLink('View sandbox details at', link)} \n- To connect a developer sandbox to your HubSpot CLI, run ${uiAuthCommandReference()} and follow the prompts.`,
3736
+ alreadyInConfig: (accountId, limit) => `${uiAccountDescription(accountId)} reached the limit of ${limit} developer sandboxes. \n- To use an existing developer sandbox, run ${uiCommandReference('hs account use')}. \n- To delete an existing sandbox, run ${uiCommandReference('hs sandbox delete')}.`,
3737
+ generic: 'An error occurred while creating a developer sandbox',
3738
+ scopes: {
3739
+ message: "The personal access key you provided doesn't include developer sandbox permissions.",
3740
+ instructions: (account, url) => `To update CLI permissions for "${chalk.bold(account)}": \n- ${uiLink('Go to', url)}, deactivate the existing personal access key, and create a new one that includes developer sandbox permissions. \n- Update the CLI config for this account by running ${uiAuthCommandReference()} and entering the new key.\n`,
3741
+ },
3742
+ },
3743
+ },
3744
+ standard: {
3745
+ loading: {
3746
+ add: (accountName) => `Creating standard sandbox ${chalk.bold(accountName)}`,
3747
+ fail: (accountName) => `Failed to create a standard sandbox ${chalk.bold(accountName)}.`,
3748
+ succeed: (accountName, accountId) => `Successfully created a standard sandbox ${chalk.bold(accountName)} with portalId ${chalk.bold(accountId)}.`,
3749
+ },
3750
+ success: {
3751
+ configFileUpdated: (accountName, authType) => `Account "${accountName}" updated using "${authType}"`,
3752
+ },
3753
+ failure: {
3754
+ limit: (accountId, limit, link) => `${uiAccountDescription(accountId)} reached the limit of ${limit} standard sandboxes.\n- View sandbox details at ${uiLink('View sandbox details at', link)} \n- To connect a standard sandbox to your HubSpot CLI, run ${uiAuthCommandReference()} and follow the prompts.`,
3755
+ alreadyInConfig: (accountId, limit) => `${uiAccountDescription(accountId)} reached the limit of ${limit} standard sandboxes. \n- To use an existing standard sandbox, run ${uiCommandReference('hs account use')}. \n- To delete an existing sandbox, run ${uiCommandReference('hs sandbox delete')}.`,
3756
+ scopes: {
3757
+ message: "The personal access key you provided doesn't include standard sandbox permissions.",
3758
+ instructions: (account, url) => `To update CLI permissions for "${chalk.bold(account)}": \n- ${uiLink('Go to', url)}, deactivate the existing personal access key, and create a new one that includes standard sandbox permissions. \n- Update the CLI config for this account by running ${uiAuthCommandReference()} and entering the new key.\n`,
3759
+ },
3760
+ },
3761
+ },
3762
+ failure: {
3763
+ usageLimitsFetch: 'Unable to fetch sandbox usage limits. Please try again.',
3764
+ scopes: {
3765
+ message: "The personal access key you provided doesn't include sandbox permissions.",
3766
+ instructions: (account, url) => `To update CLI permissions for "${chalk.bold(account)}": \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes Sandbox permissions. \n- Update the CLI config for this account by running ${uiAuthCommandReference()} and entering the new key.\n`,
3767
+ },
3768
+ invalidUser: (accountName, parentAccountId) => `Couldn't create ${chalk.bold(accountName)} because your account has been removed from ${uiAccountDescription(parentAccountId)} or your permission set doesn't allow you to create the sandbox. To update your permissions, contact a super admin in ${uiAccountDescription(parentAccountId)}.`,
3769
+ '403Gating': (accountName, parentAccountId) => `We couldn't create ${chalk.bold(accountName)} because ${uiAccountDescription(parentAccountId)} is a developer account and does not have access to development sandboxes. To gain access to developer sandboxes, you can ${uiLink('convert your account', 'https://developers.hubspot.com/docs/getting-started/convert-your-account-into-a-developer-crm-account')}.`,
3770
+ },
3771
+ },
3772
+ sync: {
3773
+ info: {
3774
+ syncMessage: (url) => `Asset sync from production to the sandbox is in progress and is running in the background. It may take some time. ${uiLink('View sync status details here', url)}`,
3775
+ syncMessageDevSb: (url) => `Sync of object definitions from production to the sandbox is in progress and is running in the background. It may take some time. ${url}`,
3776
+ },
3777
+ confirm: {
3778
+ syncContactRecords: {
3779
+ standard: 'Do you want to sync contact records from your production account?',
3780
+ },
3781
+ },
3782
+ loading: {
3783
+ add: (accountName) => `Syncing sandbox ${chalk.bold(accountName)}`,
3784
+ fail: (accountId) => `Failed to sync sandbox ${uiAccountDescription(accountId)}.`,
3785
+ succeed: (accountId) => `Successfully synced sandbox ${uiAccountDescription(accountId)}.`,
3786
+ startSync: 'Initiating sync...',
3787
+ succeedDevSb: (accountId) => `Initiated sync of object definitions from production to ${uiAccountDescription(accountId)}`,
3788
+ successDevSbInfo: (accountId, url) => `Initiated sync of object definitions from production to ${uiAccountDescription(accountId)}. It may take some time. ${url}`,
3789
+ },
3790
+ success: {
3791
+ configFileUpdated: (accountName, authType) => `Account "${accountName}" updated using "${authType}"`,
3792
+ },
3793
+ failure: {
3794
+ syncTypeFetch: 'Unable to fetch available sandbox sync types. Please try again.',
3795
+ invalidUser: (accountName, parentAccountName) => `Couldn't sync sandbox ${chalk.bold(accountName)} because your account has been removed from parent account${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)}.`,
3796
+ syncInProgress: (url) => `Couldn't run the sync because there's another sync in progress. Wait for the current sync to finish and then try again. To check the sync status, visit the sync activity log: ${url}.`,
3797
+ notSuperAdmin: (accountId) => `Couldn't run the sync because you are not a super admin in ${uiAccountDescription(accountId)}. Ask the account owner for super admin access to the sandbox.`,
3798
+ objectNotFound: (accountId) => `Couldn't sync the sandbox because ${uiAccountDescription(accountId)} may have been deleted through the UI. Run ${uiCommandReference('hs sandbox delete')} to remove this account from the config.`,
3799
+ scopes: {
3800
+ message: "The personal access key you provided doesn't include sandbox sync permissions.",
3801
+ instructions: (accountName, url) => `To update CLI permissions for "${accountName}": \n- ${uiLink('Go to', url)}, deactivate the existing personal access key, and create a new one that includes sandbox sync permissions. \n- Update the CLI config for this account by running ${uiAuthCommandReference()} and entering the new key.\n`,
3802
+ },
3803
+ },
3804
+ },
3805
+ },
3806
+ errorHandlers: {
3807
+ index: {
3808
+ errorOccurred: (error) => `Error: ${error}`,
3809
+ errorContext: (context) => `Context: ${context}`,
3810
+ errorCause: (cause) => `Cause: ${cause}`,
3811
+ unknownErrorOccurred: 'An unknown error has occurred.',
3812
+ configTimeoutErrorOccurred: (timeout, configSetCommand) => `This error occurred because a request exceeded the default HTTP timeout of ${timeout}ms. To increase the default HTTP timeout, run ${uiCommandReference(configSetCommand)}.`,
3813
+ genericTimeoutErrorOccurred: 'This error occurred because an HTTP request timed out. Re-running the command may resolve this issue.',
3814
+ additionalDebugContext: chalk.bold(`For more information, run the command again with the ${uiCommandReference('--debug')} flag.`),
3815
+ },
3816
+ suppressErrors: {
3817
+ platformVersionErrors: {
3818
+ header: 'Platform version update required',
3819
+ unspecifiedPlatformVersion: (platformVersion) => `Projects with an ${chalk.bold(platformVersion)} are no longer supported.`,
3820
+ platformVersionRetired: (platformVersion) => `Projects with ${chalk.bold(`platformVersion ${platformVersion}`)} are no longer supported.`,
3821
+ nonExistentPlatformVersion: (platformVersion) => `Projects with ${chalk.bold(`platformVersion ${platformVersion}`)} are not supported.`,
3822
+ updateProject: 'Please update your project to the latest version and try again.',
3823
+ docsLink: 'Projects platform versioning (BETA)',
3824
+ betaLink: (docsLink) => `For more info, see ${docsLink}.`,
3825
+ },
3826
+ missingScopeError: (request, accountName) => `Couldn't execute the ${request} because the access key for ${accountName} is missing required scopes. To update scopes, run ${uiAuthCommandReference()}. Then deactivate the existing key and generate a new one that includes the missing scopes.`,
3827
+ },
3828
+ },
3829
+ serverless: {
3830
+ verifyAccessKeyAndUserAccess: {
3831
+ fetchScopeDataError: (scopeGroup) => `Error verifying access of scopeGroup ${scopeGroup}:`,
3832
+ portalMissingScope: 'Your account does not have access to this action. Talk to an account admin to request it.',
3833
+ userMissingScope: "You don't have access to this action. Ask an account admin to change your permissions in Users & Teams settings.",
3834
+ genericMissingScope: `Your access key does not allow this action. Please generate a new access key by running ${uiAuthCommandReference()}.`,
3835
+ },
3836
+ },
3837
+ doctor: {
3838
+ runningDiagnostics: 'Running diagnostics...',
3839
+ diagnosticsComplete: 'Diagnostics complete',
3840
+ accountChecks: {
3841
+ active: 'Default account active',
3842
+ inactive: "Default account isn't active",
3843
+ inactiveSecondary: (command) => `Run ${uiCommandReference(command)} to remove inactive accounts from your CLI config`,
3844
+ unableToDetermine: 'Unable to determine if the portal is active',
3845
+ pak: {
3846
+ incomplete: 'Personal access key is valid, but there are more scopes available to your user that are not included in your key.',
3847
+ incompleteSecondary: (link) => `To add the available scopes, run ${uiAuthCommandReference()} and re-authenticate your account with a new key that has those scopes. Visit HubSpot to view selected and available scopes for your personal access key. ${link}`,
3848
+ invalid: 'Personal access key is invalid',
3849
+ invalidSecondary: `To get a new key, run ${uiAuthCommandReference()}, deactivate your access key, and generate a new one. Then use that new key to authenticate your account.`,
3850
+ valid: (link) => `Personal Access Key is valid. ${link}`,
3851
+ viewScopes: 'View selected scopes',
3852
+ },
3853
+ },
3854
+ nodeChecks: {
3855
+ unableToDetermine: 'Unable to determine what version of node is installed',
3856
+ minimumNotMet: (nodeVersion) => `Minimum Node version is not met. Upgrade to ${nodeVersion} or higher`,
3857
+ success: (nodeVersion) => `node v${nodeVersion} is installed`,
3858
+ },
3859
+ npmChecks: {
3860
+ notInstalled: 'npm is not installed',
3861
+ installed: (npmVersion) => `npm v${npmVersion} is installed`,
3862
+ unableToDetermine: 'Unable to determine if npm is installed',
3863
+ },
3864
+ hsChecks: {
3865
+ notLatest: (hsVersion) => `Version ${hsVersion} outdated`,
3866
+ notLatestSecondary: (command, hsVersion) => `Run ${uiCommandReference(command)} to upgrade to the latest version ${hsVersion}`,
3867
+ latest: (hsVersion) => `HubSpot CLI v${hsVersion} up to date`,
3868
+ unableToDetermine: 'Unable to determine if HubSpot CLI is up to date.',
3869
+ unableToDetermineSecondary: (link) => `Run ${uiCommandReference('hs --version')} to check your installed version; then visit the ${uiLink('npm HubSpot CLI version history', link)} to validate whether you have the latest version`,
3870
+ },
3871
+ projectDependenciesChecks: {
3872
+ missingDependencies: (dir) => `missing dependencies in ${chalk.bold(dir)}`,
3873
+ missingDependenciesSecondary: (command) => `Run ${uiCommandReference(command)} to install all project dependencies locally`,
3874
+ unableToDetermine: (dir) => `Unable to determine if dependencies are installed ${dir}`,
3875
+ success: 'App dependencies are installed and up to date',
3876
+ },
3877
+ files: {
3878
+ invalidJson: (filename) => `Invalid JSON in ${chalk.bold(filename)}`,
3879
+ validJson: 'JSON files valid',
3880
+ },
3881
+ port: {
3882
+ inUse: (port) => `Port ${port} is in use`,
3883
+ inUseSecondary: `Make sure it is available before running ${uiCommandReference('hs project dev')}`,
3884
+ available: (port) => `Port ${port} available for local development`,
3885
+ },
3886
+ projectValidation: {
3887
+ valid: 'Project configuration and structure is valid',
3888
+ configInvalid: 'Project configuration is invalid',
3889
+ configMissing: 'Project configuration file not found',
3890
+ sourceDirectoryInvalid: 'Project source directory validation failed',
3891
+ translationFailed: 'Project validation failed',
3892
+ profileValidationFailed: (profileName) => `Project validation failed with profile '${profileName}' applied`,
3893
+ validationDetails: `Run ${uiCommandReference('hs project validate')} for more details.`,
3894
+ },
3895
+ diagnosis: {
3896
+ cli: {
3897
+ header: 'HubSpot CLI install',
3898
+ },
3899
+ cliConfig: {
3900
+ header: 'CLI configuration',
3901
+ configFileSubHeader: (filename) => `Config File: ${chalk.bold(filename)}`,
3902
+ defaultAccountSubHeader: (accountDetails) => `Default Account: ${accountDetails}`,
3903
+ noConfigFile: 'CLI configuration not found',
3904
+ noConfigFileSecondary: (command) => `Run ${uiCommandReference(command)} and follow the prompts to create your CLI configuration file and connect it to your HubSpot account`,
3905
+ settings: {
3906
+ httpUseLocalhost: `The setting ${chalk.bold('httpUseLocalhost')} is enabled`,
3907
+ httpUseLocalhostSecondary: 'This setting causes all CLI requests to route to localhost',
3908
+ },
3909
+ },
3910
+ projectConfig: {
3911
+ header: 'Project configuration',
3912
+ projectDirSubHeader: (projectDir) => `Project dir: ${chalk.bold(projectDir)}`,
3913
+ projectNameSubHeader: (projectName) => `Project name: ${chalk.bold(projectName)}`,
3914
+ },
3915
+ defaultAccountOverrideFile: {
3916
+ header: 'Default account override file path:',
3917
+ },
3918
+ counts: {
3919
+ errors: (count) => `${chalk.bold('Errors:')} ${count}`,
3920
+ warnings: (count) => `${chalk.bold('Warning:')} ${count}`,
3921
+ },
3922
+ },
3923
+ networkChecks: {
3924
+ header: 'Network & API connectivity',
3925
+ hubspotApiReachable: 'HubSpot API is reachable',
3926
+ hubspotApiUnreachable: 'Unable to connect to HubSpot API',
3927
+ hubspotApiUnreachableSecondary: 'Check your internet connection and firewall settings',
3928
+ npmRegistryReachable: 'npm registry is reachable',
3929
+ npmRegistryUnreachable: 'Unable to connect to npm registry',
3930
+ npmRegistryUnreachableSecondary: 'Check your internet connection and npm configuration',
3931
+ },
3932
+ webhookChecks: {
3933
+ header: 'Webhook endpoints',
3934
+ endpointReachable: (url) => `Webhook endpoint reachable: ${url}`,
3935
+ endpointUnreachable: (url) => `Webhook endpoint unreachable: ${url}`,
3936
+ endpointUnreachableSecondary: 'Verify the URL is correct and the server is running',
3937
+ checkType: 'Webhook',
3938
+ },
3939
+ appRedirectChecks: {
3940
+ redirectUrlReachable: (url) => `App redirect URL reachable: ${url}`,
3941
+ redirectUrlUnreachable: (url) => `App redirect URL unreachable: ${url}`,
3942
+ redirectUrlUnreachableSecondary: 'Verify the URL is correct and the server is running',
3943
+ checkType: 'App redirect URL',
3944
+ },
3945
+ defaultAccountOverrideFileChecks: {
3946
+ overrideActive: (defaultAccountOverrideFile) => `Default account override file is active: ${defaultAccountOverrideFile}`,
3947
+ overrideAccountId: (overrideAccountId) => `Active account ID: ${overrideAccountId}`,
3948
+ },
3949
+ },
3950
+ oauth: {
3951
+ missingClientId: 'Error building oauth URL: missing client ID.',
3952
+ },
3953
+ validation: {
3954
+ accountNotFoundInConfig: (userProvidedAccount) => `The account "${userProvidedAccount}" could not be found in the config`,
3955
+ accountRequired: 'An account needs to be supplied either via "--account" or through setting a "defaultAccount"',
3956
+ userProvidedAccount: 'Cannot specify an account when environment variables are supplied. Please unset the environment variables or do not use the "--account" flag.',
3957
+ accountNotConfigured: (accountId) => `The account ${uiAccountDescription(accountId)} has not been configured`,
3958
+ invalidAuthType: (authType, accountId, configPath, validValues) => `Invalid "authType" value "${authType}" for account "${uiAccountDescription(accountId)}" in config file: ${configPath}. Valid values are ${validValues}.`,
3959
+ oauth2ConfigMissing: (accountId) => `The OAuth2 auth configuration for account ${uiAccountDescription(accountId)} is missing`,
3960
+ oauth2ConfigIncorrect: (accountId) => `The OAuth2 configuration for account ${uiAccountDescription(accountId)} is incorrect \n Run ${uiCommandReference('hs auth --auth-type=oauth2')} to reauthenticate`,
3961
+ oauth2AccessTokenNotFound: (accountId) => `The OAuth2 access token could not be found for accountId ${uiAccountDescription(accountId)}`,
3962
+ personalAccessKeyMissing: (accountId) => `The account "${uiAccountDescription(accountId)}" is configured to use a access key for authentication and is missing a "personalAccessKey" in the configuration file`,
3963
+ personalAccessKeyTokenRetrievalFailed: (accountId) => `An OAuth2 access token for account "${uiAccountDescription(accountId)} could not be retrieved using the "personalAccessKey" provided`,
3964
+ authConfigurationMissing: (accountId) => `The accountId ${uiAccountDescription(accountId)} is missing authentication configuration`,
3965
+ availableCMSModes: (modes) => `Available CMS publish modes are: ${modes}`,
3966
+ invalidCmsPublishMode: (cmsPublishMode, modesMessage) => `The CMS publish mode "${cmsPublishMode}" is invalid. ${modesMessage}`,
3967
+ missingCmsPublishMode: (modesMessage) => `The CMS publish mode option is missing. ${modesMessage}`,
3968
+ pathNotFile: (path) => `The path "${path}" is not a path to a file`,
3969
+ fileNotJson: (path) => `The file "${path}" must be a valid JSON file`,
3970
+ fileInvalidJson: (path) => `The file "${path}" contains invalid JSON`,
3971
+ },
3972
+ migrate: {
3973
+ componentsToBeMigrated: (components) => `${chalk.bold('The following features will be migrated:')} ${components}`,
3974
+ componentsThatWillNotBeMigrated: (components) => `[NOTE] These features are not yet supported for migration but will be available later: ${components}`,
3975
+ sourceContentsMoved: (newLocation) => `The contents of your old source directory have been moved to ${newLocation}, move any required files to the new source directory.`,
3976
+ projectMigrationWarningTitle: (platformVersion) => `Important: Migrating to platformVersion ${platformVersion} is irreversible`,
3977
+ projectMigrationWarning: (platformVersion) => uiBetaTag(`Running the ${uiCommandReference('hs project migrate')} command will permanently upgrade your project to platformVersion ${platformVersion}. 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),
3978
+ exitWithoutMigrating: 'Exiting without migrating',
3979
+ success: {
3980
+ downloadedProject: (projectName, projectDest) => `Saved ${projectName} to ${projectDest}`,
3981
+ themesMigrationSuccess: (platformVersion) => `Successfully migrated project to platformVersion ${chalk.bold(platformVersion)}. Upload your project using ${uiCommandReference('hs project upload')}`,
3982
+ },
3983
+ errors: {
3984
+ project: {
3985
+ invalidConfig: 'The project configuration file is invalid. Please check the config file and try again.',
3986
+ doesNotExist: (account) => `Project does not exist in ${uiAccountDescription(account)}. Migrations are only supported for existing projects.`,
3987
+ themesAlreadyMigrated: 'This project has already been migrated to the latest platform version.',
3988
+ noProjectForThemesMigration: 'Theme migrations are only supported for projects. Please try again from a project directory.',
3989
+ themesAndAppsNotAllowed: 'Support for migrating projects containing both themes and apps to the latest platform version is coming soon. Try again later.',
3990
+ multipleApps: 'Multiple apps found in project, this is not allowed in 2025.2',
3991
+ alreadyExists: (projectName) => `A project with name ${projectName} already exists. Please choose another name.`,
3992
+ failedToMigrateThemes: 'Failed to migrate project themes. Please verify that your themes are properly formatted before trying again.',
3993
+ failedToUpdateProjectConfig: 'Failed to update project config file. Please update the platformVersion in the project config file manually.',
3994
+ },
3995
+ unmigratableReasons: {
3996
+ upToDate: 'App is already up to date',
3997
+ isPrivateApp: 'Private apps are not currently migratable',
3998
+ listedInMarketplace: 'Listed apps are not currently migratable',
3999
+ projectConnectedToGitHub: (projectName, accountId) => `The project is linked to a GitHub repository. ${uiLink('Visit the project settings page to unlink it', getProjectSettingsUrl(projectName, accountId))}`,
4000
+ partOfProjectAlready: `This app is part of a project, run ${uiCommandReference('hs project migrate')} from the project directory to migrate it`,
4001
+ generic: (reasonCode) => `Unable to migrate app: ${reasonCode}`,
4002
+ },
4003
+ noAppsEligible: (accountId, reasons) => `No apps in account ${accountId} are currently migratable${reasons.length ? `\n - ${reasons.join('\n - ')}` : ''}`,
4004
+ invalidAccountTypeTitle: `${chalk.bold('Developer account not targeted')}`,
4005
+ invalidAccountTypeDescription: (useCommand) => `Only public apps created in a developer account can be converted to a project component. Select a connected developer account with ${useCommand} or ${uiAuthCommandReference()} and try again.`,
4006
+ appWithAppIdNotFound: (appId) => `Could not find an app with the id ${appId} `,
4007
+ noAppsForProject: (projectName) => `No apps associated with project ${projectName}`,
4008
+ migrationFailed: 'Migration Failed',
4009
+ notUngatedForUnifiedApps: (account) => `Your account ${account} isn't enrolled in the required product beta to access this command.`,
4010
+ },
4011
+ prompt: {
4012
+ themesMigration: (count) => `Identified ${count} theme${count === 1 ? '' : 's'} to migrate. This will migrate all themes in the project.`,
4013
+ chooseApp: 'Which app would you like to migrate?',
4014
+ inputName: '[--name] What would you like to name the project?',
4015
+ inputDest: '[--dest] Where would you like to save the project?',
4016
+ uidForComponent: (componentName) => `What UID would you like to use for ${componentName}?`,
4017
+ proceed: 'Would you like to proceed?',
4018
+ },
4019
+ spinners: {
4020
+ checkingForMigratableComponents: 'Checking project for migratable components...',
4021
+ beginningMigration: 'Beginning migration',
4022
+ unableToStartMigration: 'Unable to begin migration',
4023
+ finishingMigration: 'Wrapping up migration',
4024
+ migrationComplete: 'Migration completed',
4025
+ migrationFailed: 'Migration failed',
4026
+ downloadingProjectContents: 'Downloading migrated project files',
4027
+ downloadingProjectContentsComplete: 'Migrated project files downloaded',
4028
+ downloadingProjectContentsFailed: 'Unable to download migrated project files',
4029
+ copyingProjectFiles: 'Copying migrated project files',
4030
+ copyingProjectFilesComplete: 'Migrated project files copied',
4031
+ copyingProjectFilesFailed: 'Unable to copy migrated project files',
4032
+ },
4033
+ },
4034
+ theme: {
4035
+ cmsDevServerProcess: {
4036
+ installStarted: (targetVersion) => `Installing cms-dev-server ${targetVersion}...`,
4037
+ installSucceeded: 'cms-dev-server setup complete',
4038
+ installFailed: 'Failed to install cms-dev-server',
4039
+ serverStartError: (error) => `Failed to start dev server: ${error}`,
4040
+ serverExit: (code) => `Dev server exited with code ${code}`,
4041
+ serverKill: (signal) => `Dev server killed with signal ${signal}`,
4042
+ },
4043
+ },
4044
+ };