@hubspot/cli 7.4.8-experimental.0 → 7.4.9-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (315) hide show
  1. package/api/migrate.d.ts +14 -4
  2. package/api/migrate.js +16 -2
  3. package/bin/cli.js +8 -183
  4. package/commands/account/auth.d.ts +10 -0
  5. package/commands/account/auth.js +188 -0
  6. package/commands/account/clean.js +38 -5
  7. package/commands/account/createOverride.d.ts +10 -0
  8. package/commands/account/createOverride.js +113 -0
  9. package/commands/account/info.js +38 -4
  10. package/commands/account/list.js +23 -5
  11. package/commands/account/remove.js +42 -3
  12. package/commands/account/removeOverride.d.ts +10 -0
  13. package/commands/account/removeOverride.js +85 -0
  14. package/commands/account/use.js +25 -3
  15. package/commands/account.js +7 -2
  16. package/commands/app/migrate.d.ts +6 -6
  17. package/commands/app/migrate.js +62 -45
  18. package/commands/app.js +0 -2
  19. package/commands/auth.js +15 -12
  20. package/commands/cms/convertFields.d.ts +7 -1
  21. package/commands/cms/convertFields.js +57 -41
  22. package/commands/cms/getReactModule.d.ts +7 -1
  23. package/commands/cms/getReactModule.js +52 -34
  24. package/commands/cms/lighthouseScore.d.ts +8 -1
  25. package/commands/cms/lighthouseScore.js +133 -100
  26. package/commands/cms.d.ts +3 -1
  27. package/commands/cms.js +24 -16
  28. package/commands/completion.d.ts +3 -1
  29. package/commands/completion.js +25 -13
  30. package/commands/config/migrate.d.ts +10 -0
  31. package/commands/config/migrate.js +84 -0
  32. package/commands/config/set.d.ts +10 -0
  33. package/commands/config/set.js +34 -29
  34. package/commands/config.d.ts +4 -1
  35. package/commands/config.js +45 -11
  36. package/commands/create/api-sample.d.ts +3 -1
  37. package/commands/create/api-sample.js +34 -36
  38. package/commands/create/app.d.ts +3 -1
  39. package/commands/create/app.js +9 -7
  40. package/commands/create/function.d.ts +3 -1
  41. package/commands/create/function.js +11 -10
  42. package/commands/create/index.d.ts +5 -1
  43. package/commands/create/index.js +23 -11
  44. package/commands/create/module.d.ts +3 -1
  45. package/commands/create/module.js +14 -13
  46. package/commands/create/react-app.d.ts +3 -1
  47. package/commands/create/react-app.js +10 -7
  48. package/commands/create/template.d.ts +3 -1
  49. package/commands/create/template.js +14 -14
  50. package/commands/create/vue-app.d.ts +3 -1
  51. package/commands/create/vue-app.js +10 -7
  52. package/commands/create/webpack-serverless.d.ts +3 -1
  53. package/commands/create/webpack-serverless.js +10 -7
  54. package/commands/create/website-theme.d.ts +3 -1
  55. package/commands/create/website-theme.js +10 -9
  56. package/commands/create.d.ts +4 -24
  57. package/commands/create.js +55 -74
  58. package/commands/customObject/create.d.ts +4 -9
  59. package/commands/customObject/create.js +17 -10
  60. package/commands/customObject/schema/create.d.ts +4 -9
  61. package/commands/customObject/schema/create.js +18 -11
  62. package/commands/customObject/schema/delete.d.ts +4 -9
  63. package/commands/customObject/schema/delete.js +21 -11
  64. package/commands/customObject/schema/fetch-all.d.ts +4 -9
  65. package/commands/customObject/schema/fetch-all.js +19 -11
  66. package/commands/customObject/schema/fetch.d.ts +4 -9
  67. package/commands/customObject/schema/fetch.js +19 -11
  68. package/commands/customObject/schema/list.d.ts +4 -8
  69. package/commands/customObject/schema/list.js +17 -10
  70. package/commands/customObject/schema/update.d.ts +4 -9
  71. package/commands/customObject/schema/update.js +18 -11
  72. package/commands/customObject/schema.d.ts +3 -5
  73. package/commands/customObject/schema.js +27 -54
  74. package/commands/customObject.d.ts +3 -4
  75. package/commands/customObject.js +22 -48
  76. package/commands/doctor.js +5 -6
  77. package/commands/feedback.d.ts +7 -1
  78. package/commands/feedback.js +36 -21
  79. package/commands/fetch.d.ts +12 -1
  80. package/commands/fetch.js +49 -34
  81. package/commands/filemanager.js +1 -2
  82. package/commands/function/deploy.d.ts +6 -1
  83. package/commands/function/deploy.js +70 -50
  84. package/commands/function/list.d.ts +6 -1
  85. package/commands/function/list.js +44 -32
  86. package/commands/function/server.d.ts +10 -1
  87. package/commands/function/server.js +49 -38
  88. package/commands/function.d.ts +5 -1
  89. package/commands/function.js +24 -11
  90. package/commands/hubdb/clear.d.ts +4 -9
  91. package/commands/hubdb/clear.js +21 -15
  92. package/commands/hubdb/create.d.ts +4 -9
  93. package/commands/hubdb/create.js +23 -17
  94. package/commands/hubdb/delete.d.ts +4 -9
  95. package/commands/hubdb/delete.js +24 -16
  96. package/commands/hubdb/fetch.d.ts +4 -9
  97. package/commands/hubdb/fetch.js +20 -14
  98. package/commands/hubdb.d.ts +3 -2
  99. package/commands/hubdb.js +24 -47
  100. package/commands/init.js +18 -20
  101. package/commands/lint.d.ts +6 -4
  102. package/commands/lint.js +44 -44
  103. package/commands/list.js +5 -6
  104. package/commands/logs.d.ts +10 -1
  105. package/commands/logs.js +53 -45
  106. package/commands/module/marketplace-validate.d.ts +6 -1
  107. package/commands/module/marketplace-validate.js +39 -28
  108. package/commands/module.d.ts +3 -1
  109. package/commands/module.js +22 -12
  110. package/commands/mv.js +4 -5
  111. package/commands/open.js +4 -5
  112. package/commands/project/add.d.ts +3 -7
  113. package/commands/project/add.js +28 -23
  114. package/commands/project/cloneApp.d.ts +6 -8
  115. package/commands/project/cloneApp.js +49 -45
  116. package/commands/project/create.d.ts +10 -1
  117. package/commands/project/create.js +85 -63
  118. package/commands/project/deploy.d.ts +3 -6
  119. package/commands/project/deploy.js +27 -25
  120. package/commands/project/dev/deprecatedFlow.js +32 -25
  121. package/commands/project/dev/index.d.ts +4 -2
  122. package/commands/project/dev/index.js +31 -18
  123. package/commands/project/dev/unifiedFlow.js +37 -15
  124. package/commands/project/download.d.ts +3 -7
  125. package/commands/project/download.js +18 -19
  126. package/commands/project/installDeps.d.ts +6 -1
  127. package/commands/project/installDeps.js +48 -32
  128. package/commands/project/listBuilds.d.ts +3 -7
  129. package/commands/project/listBuilds.js +32 -27
  130. package/commands/project/logs.d.ts +10 -1
  131. package/commands/project/logs.js +73 -65
  132. package/commands/project/migrate.d.ts +6 -0
  133. package/commands/project/migrate.js +71 -0
  134. package/commands/project/migrateApp.d.ts +3 -8
  135. package/commands/project/migrateApp.js +23 -20
  136. package/commands/project/open.d.ts +3 -7
  137. package/commands/project/open.js +29 -21
  138. package/commands/project/upload.d.ts +9 -1
  139. package/commands/project/upload.js +78 -54
  140. package/commands/project/watch.d.ts +6 -1
  141. package/commands/project/watch.js +95 -61
  142. package/commands/project.d.ts +3 -1
  143. package/commands/project.js +47 -35
  144. package/commands/remove.js +7 -5
  145. package/commands/sandbox/create.d.ts +4 -9
  146. package/commands/sandbox/create.js +27 -21
  147. package/commands/sandbox/delete.d.ts +4 -9
  148. package/commands/sandbox/delete.js +35 -29
  149. package/commands/sandbox.d.ts +3 -4
  150. package/commands/sandbox.js +20 -44
  151. package/commands/secret/addSecret.d.ts +4 -9
  152. package/commands/secret/addSecret.js +21 -15
  153. package/commands/secret/deleteSecret.d.ts +4 -9
  154. package/commands/secret/deleteSecret.js +28 -18
  155. package/commands/secret/listSecret.d.ts +4 -9
  156. package/commands/secret/listSecret.js +19 -13
  157. package/commands/secret/updateSecret.d.ts +4 -9
  158. package/commands/secret/updateSecret.js +25 -17
  159. package/commands/secret.d.ts +3 -4
  160. package/commands/secret.js +25 -49
  161. package/commands/theme/generate-selectors.js +5 -6
  162. package/commands/theme/marketplace-validate.js +5 -6
  163. package/commands/theme/preview.js +16 -16
  164. package/commands/theme.js +1 -2
  165. package/commands/upload.d.ts +12 -1
  166. package/commands/upload.js +118 -98
  167. package/commands/watch.d.ts +14 -1
  168. package/commands/watch.js +76 -66
  169. package/lang/en.d.ts +2828 -0
  170. package/lang/en.js +2681 -3300
  171. package/lang/en.lyaml +101 -41
  172. package/lib/accountTypes.d.ts +1 -0
  173. package/lib/accountTypes.js +12 -0
  174. package/lib/app/migrate.d.ts +10 -4
  175. package/lib/app/migrate.js +208 -94
  176. package/lib/app/migrate_legacy.d.ts +2 -2
  177. package/lib/app/migrate_legacy.js +10 -7
  178. package/lib/buildAccount.d.ts +1 -2
  179. package/lib/buildAccount.js +11 -10
  180. package/lib/commonOpts.d.ts +3 -4
  181. package/lib/commonOpts.js +46 -18
  182. package/lib/configMigrate.d.ts +2 -0
  183. package/lib/configMigrate.js +104 -0
  184. package/lib/configOptions.js +11 -10
  185. package/lib/constants.d.ts +9 -0
  186. package/lib/constants.js +10 -1
  187. package/lib/dependencyManagement.js +2 -2
  188. package/lib/doctor/Diagnosis.d.ts +1 -2
  189. package/lib/doctor/Diagnosis.js +19 -16
  190. package/lib/doctor/DiagnosticInfoBuilder.d.ts +2 -1
  191. package/lib/doctor/DiagnosticInfoBuilder.js +10 -9
  192. package/lib/doctor/Doctor.d.ts +1 -0
  193. package/lib/doctor/Doctor.js +57 -44
  194. package/lib/errorHandlers/index.js +6 -7
  195. package/lib/errorHandlers/suppressError.js +18 -26
  196. package/lib/filesystem.d.ts +1 -1
  197. package/lib/generateSelectors.js +1 -2
  198. package/lib/hasFeature.d.ts +3 -1
  199. package/lib/interpolation.d.ts +2 -3
  200. package/lib/lang.d.ts +2 -3
  201. package/lib/middleware/__test__/configMiddleware.test.d.ts +1 -0
  202. package/lib/middleware/__test__/configMiddleware.test.js +194 -0
  203. package/lib/middleware/__test__/gitMiddleware.test.d.ts +1 -0
  204. package/lib/middleware/__test__/gitMiddleware.test.js +76 -0
  205. package/lib/middleware/__test__/notificationsMiddleware.test.d.ts +1 -0
  206. package/lib/middleware/__test__/notificationsMiddleware.test.js +10 -0
  207. package/lib/middleware/__test__/requestMiddleware.test.d.ts +1 -0
  208. package/lib/middleware/__test__/requestMiddleware.test.js +20 -0
  209. package/lib/middleware/__test__/utils.test.d.ts +1 -0
  210. package/lib/middleware/__test__/utils.test.js +53 -0
  211. package/lib/middleware/__test__/yargsChecksMiddleware.test.d.ts +1 -0
  212. package/lib/middleware/__test__/yargsChecksMiddleware.test.js +81 -0
  213. package/lib/middleware/configMiddleware.d.ts +13 -0
  214. package/lib/middleware/configMiddleware.js +116 -0
  215. package/lib/middleware/fireAlarmMiddleware.d.ts +4 -0
  216. package/lib/middleware/fireAlarmMiddleware.js +123 -0
  217. package/lib/middleware/gitMiddleware.d.ts +2 -0
  218. package/lib/middleware/gitMiddleware.js +14 -0
  219. package/lib/middleware/notificationsMiddleware.d.ts +1 -0
  220. package/lib/middleware/notificationsMiddleware.js +38 -0
  221. package/lib/middleware/requestMiddleware.d.ts +1 -0
  222. package/lib/middleware/requestMiddleware.js +11 -0
  223. package/lib/middleware/utils.d.ts +8 -0
  224. package/lib/middleware/utils.js +17 -0
  225. package/lib/middleware/yargsChecksMiddleware.d.ts +4 -0
  226. package/lib/middleware/yargsChecksMiddleware.js +24 -0
  227. package/lib/oauth.js +1 -2
  228. package/lib/process.js +1 -2
  229. package/lib/projects/ProjectLogsManager.d.ts +1 -1
  230. package/lib/projects/ProjectLogsManager.js +16 -21
  231. package/lib/projects/buildAndDeploy.js +45 -41
  232. package/lib/projects/config.d.ts +9 -0
  233. package/lib/projects/config.js +79 -0
  234. package/lib/projects/create.js +5 -6
  235. package/lib/projects/ensureProjectExists.d.ts +11 -0
  236. package/lib/projects/ensureProjectExists.js +97 -0
  237. package/lib/projects/localDev/AppDevModeInterface.d.ts +25 -0
  238. package/lib/projects/localDev/AppDevModeInterface.js +117 -0
  239. package/lib/{DevServerManager.d.ts → projects/localDev/DevServerManager.d.ts} +1 -1
  240. package/lib/{DevServerManager.js → projects/localDev/DevServerManager.js} +6 -6
  241. package/lib/projects/localDev/DevServerManagerV2.d.ts +22 -0
  242. package/lib/{DevServerManagerV2.js → projects/localDev/DevServerManagerV2.js} +22 -19
  243. package/lib/projects/localDev/LocalDevLogger.d.ts +30 -0
  244. package/lib/projects/localDev/LocalDevLogger.js +158 -0
  245. package/lib/{LocalDevManager.d.ts → projects/localDev/LocalDevManager.d.ts} +1 -1
  246. package/lib/{LocalDevManager.js → projects/localDev/LocalDevManager.js} +48 -82
  247. package/lib/projects/localDev/LocalDevProcess.d.ts +41 -0
  248. package/lib/projects/localDev/LocalDevProcess.js +178 -0
  249. package/lib/projects/localDev/LocalDevWatcher.d.ts +10 -0
  250. package/lib/projects/localDev/LocalDevWatcher.js +55 -0
  251. package/lib/projects/localDev/LocalDevWebsocketServer.d.ts +15 -0
  252. package/lib/projects/localDev/LocalDevWebsocketServer.js +80 -0
  253. package/lib/{localDev.d.ts → projects/localDev/helpers.d.ts} +5 -4
  254. package/lib/{localDev.js → projects/localDev/helpers.js} +97 -114
  255. package/lib/projects/ui.d.ts +1 -0
  256. package/lib/projects/ui.js +15 -0
  257. package/lib/projects/upload.d.ts +13 -2
  258. package/lib/projects/upload.js +18 -34
  259. package/lib/projects/urls.d.ts +1 -0
  260. package/lib/projects/urls.js +6 -0
  261. package/lib/projects/watch.d.ts +1 -1
  262. package/lib/projects/watch.js +21 -18
  263. package/lib/prompts/accountNamePrompt.js +16 -13
  264. package/lib/prompts/accountsPrompt.js +1 -2
  265. package/lib/prompts/cmsFieldPrompt.js +1 -2
  266. package/lib/prompts/createApiSamplePrompt.d.ts +2 -10
  267. package/lib/prompts/createApiSamplePrompt.js +4 -5
  268. package/lib/prompts/createFunctionPrompt.js +13 -14
  269. package/lib/prompts/createModulePrompt.js +8 -9
  270. package/lib/prompts/createProjectPrompt.d.ts +11 -4
  271. package/lib/prompts/createProjectPrompt.js +14 -9
  272. package/lib/prompts/createTemplatePrompt.d.ts +22 -4
  273. package/lib/prompts/createTemplatePrompt.js +1 -2
  274. package/lib/prompts/downloadProjectPrompt.js +3 -4
  275. package/lib/prompts/installPublicAppPrompt.js +6 -5
  276. package/lib/prompts/personalAccessKeyPrompt.js +17 -18
  277. package/lib/prompts/previewPrompt.js +5 -6
  278. package/lib/prompts/projectAddPrompt.js +4 -5
  279. package/lib/prompts/projectDevTargetAccountPrompt.js +11 -12
  280. package/lib/prompts/projectNamePrompt.js +5 -6
  281. package/lib/prompts/projectsLogsPrompt.js +3 -2
  282. package/lib/prompts/promptUtils.d.ts +1 -1
  283. package/lib/prompts/sandboxesPrompt.js +5 -6
  284. package/lib/prompts/secretPrompt.js +2 -3
  285. package/lib/prompts/selectHubDBTablePrompt.js +11 -8
  286. package/lib/prompts/selectPublicAppPrompt.js +6 -7
  287. package/lib/prompts/setAsDefaultAccountPrompt.js +1 -2
  288. package/lib/prompts/uploadPrompt.js +4 -5
  289. package/lib/sandboxSync.js +15 -14
  290. package/lib/sandboxes.js +12 -13
  291. package/lib/serverlessLogs.js +4 -6
  292. package/lib/ui/SpinniesManager.d.ts +1 -1
  293. package/lib/ui/boxen.d.ts +5 -0
  294. package/lib/ui/boxen.js +30 -0
  295. package/lib/ui/git.js +8 -9
  296. package/lib/ui/index.d.ts +4 -2
  297. package/lib/ui/index.js +16 -16
  298. package/lib/ui/logger.d.ts +10 -0
  299. package/lib/ui/logger.js +15 -0
  300. package/lib/ui/serverlessFunctionLogs.js +2 -3
  301. package/lib/ui/spinniesUtils.d.ts +5 -5
  302. package/lib/upload.d.ts +1 -1
  303. package/lib/yargsUtils.d.ts +5 -1
  304. package/lib/yargsUtils.js +6 -0
  305. package/package.json +9 -6
  306. package/types/Cms.d.ts +30 -0
  307. package/types/Cms.js +2 -0
  308. package/types/LocalDev.d.ts +22 -0
  309. package/types/LocalDev.js +2 -0
  310. package/types/Yargs.d.ts +9 -10
  311. package/lib/DevServerManagerV2.d.ts +0 -33
  312. package/lib/LocalDevManagerV2.d.ts +0 -64
  313. package/lib/LocalDevManagerV2.js +0 -377
  314. package/lib/projects/index.d.ts +0 -20
  315. package/lib/projects/index.js +0 -194
package/lang/en.lyaml CHANGED
@@ -6,11 +6,13 @@ en:
6
6
  cmsUpdateNotification: "{{#bold}}The CMS CLI is now the HubSpot CLI{{/bold}}\n\nTo upgrade, uninstall {{#bold}}{{ packageName }}{{/bold}}\nand then run {{ updateCommand }}"
7
7
  cliUpdateNotification: "HubSpot CLI version {{#cyan}}{{#bold}}{currentVersion}{{/bold}}{{/cyan}} is outdated.\nRun {{ updateCommand }} to upgrade to version {{#cyan}}{{#bold}}{latestVersion}{{/bold}}{{/cyan}}"
8
8
  srcIsProject: "\"{{ src }}\" is in a project folder. Did you mean \"hs project {{command}}\"?"
9
- setDefaultAccountMoved: "This command has moved. Try `hs accounts use` instead"
10
9
  handleDeprecatedEnvVariables:
11
10
  portalEnvVarDeprecated: "The HUBSPOT_PORTAL_ID environment variable is deprecated. Please use HUBSPOT_ACCOUNT_ID instead."
12
11
  loadConfigMiddleware:
13
12
  configFileExists: "A configuration file already exists at {{ configPath }}. To specify a new configuration file, delete the existing one and try again."
13
+ injectAccountIdMiddleware:
14
+ invalidAccountId: "In the default override file ({{ hsAccountFileName }}), the account ID must be a number. Please delete the current file and generate a new one using {{ overrideCommand }}."
15
+ accountNotFound: "The account in the default override file ({{ hsAccountFileName }}) wasn't found in your configured accounts. You can authorize this account using {{ authCommand }}."
14
16
  completion:
15
17
  describe: "Enable bash completion shortcuts for commands. Concat the generated script to your .bashrc, .bash_profile, or .zshrc file."
16
18
  examples:
@@ -18,11 +20,55 @@ en:
18
20
  account:
19
21
  describe: "Commands for managing configured accounts."
20
22
  subcommands:
23
+ auth:
24
+ describe: "Configure authentication for your HubSpot account."
25
+ options:
26
+ account:
27
+ describe: "HubSpot account to authenticate"
28
+ errors:
29
+ failedToUpdateConfig: "Failed to update the configuration file. Please try again."
30
+ migrationNotConfirmed: "Did not migrate. Use the {{ authCommand }} command to update the deprecated config at {{ deprecatedConfigPath }}."
31
+ mergeNotConfirmed: "Did not merge. When you are ready to merge the deprecated config file with the global config file, run the {{ authCommand }} or {{ migrateCommand }} command."
32
+ success:
33
+ configFileCreated: "Created config file \"{{ configPath }}\""
34
+ configFileUpdated: "Connected account \"{{ account }}\" and set it as the default account"
35
+ createOverride:
36
+ describe: "Create a new default account override file ({{ hsAccountFileName }}) in the current working directory."
37
+ success: "Default account override file created at {{ overrideFilePath }}"
38
+ accountOverride: "An account override file already exists at {{ overrideFilePath }} associated with account \"{{ accountOverride }}\"."
39
+ prompts:
40
+ replaceOverrideFile: "Replace existing account override file?"
41
+ errors:
42
+ globalConfigNotFound: "This command is only compatible with our new global config. Run {{ authCommand }} to get started."
43
+ accountNotFound: "The specified account could not be found in the config file {{ configPath }}"
44
+ options:
45
+ account:
46
+ describe: "Name or ID of the account to create an override file for."
47
+ examples:
48
+ default: "Create a new default account override file ({{ hsAccountFileName }}) in the current working directory"
49
+ idBased: "Create a new default account override file ({{ hsAccountFileName }}) in the current working directory, using the account with accountId \"1234567\""
50
+ nameBased: "Create a new default account override file ({{ hsAccountFileName }}) in the current working directory, using the account with name \"MyAccount\""
51
+ removeOverride:
52
+ describe: "Remove the default account override file ({{ overrideFile }}) from the current working directory."
53
+ accountOverride: "There is an account override file at {{ overrideFilePath }} associated with account \"{{ accountOverride }}\"."
54
+ prompts:
55
+ deleteOverrideFile: "Delete account override file?"
56
+ success: "Removed the default account override file."
57
+ noOverrideFile: "No default account override file found in the current working directory. No action required."
58
+ errors:
59
+ globalConfigNotFound: "This command is only compatible with our new global config. Run {{ authCommand }} to get started."
60
+ options:
61
+ force:
62
+ describe: "Skip confirmation prompt when removing the override file"
21
63
  list:
22
- accounts: "{{#bold}}Accounts{{/bold}}:"
23
- defaultAccount: "{{#bold}}Default account{{/bold}}: {{ account }}"
24
64
  describe: "List names of accounts defined in config."
25
- configPath: "{{#bold}}Config path{{/bold}}: {{ configPath }}"
65
+ accounts: "{{#bold}}Accounts{{/bold}}:"
66
+ defaultAccountTitle: "{{#bold}}Default Account{{/bold}}"
67
+ defaultAccount: "Account: {{ account }}"
68
+ configPath: "Source: {{ configPath }}"
69
+ overrideFilePathTitle: "{{#bold}}Default Account Override{{/bold}}"
70
+ overrideFilePath: "Source: {{ overrideFilePath }}"
71
+ overrideAccount: "Account: {{ account }}"
26
72
  labels:
27
73
  accountId: "Account ID"
28
74
  authType: "Auth Type"
@@ -40,6 +86,8 @@ en:
40
86
  describe: "Set the Hubspot account to use as the default account. The default account can be overridden with the \"--account\" option."
41
87
  errors:
42
88
  accountNotFound: "The account \"{{ specifiedAccount }}\" could not be found in {{ configPath }}"
89
+ accountOverride: "This project currently has an account override set: \"{{ accountOverride }}\". Account \"{{accountOverride}}\" will continue to act as the default account for this project."
90
+ accountOverrideCommands: "Use {{ createOverrideCommand }} to change override accounts, or {{ removeOverrideCommand }} to remove the override and use your default account."
43
91
  examples:
44
92
  default: "Select a HubSpot account to use as the default account"
45
93
  idBased: "Set the default account to the account in the config with accountId equal to \"1234567\""
@@ -55,6 +103,7 @@ en:
55
103
  logs:
56
104
  replaceDefaultAccount: "The removed account was the default account."
57
105
  prompts:
106
+ deleteOverrideFile: "Delete the override file ({{ overrideFilePath }}) associated with {{ accountName }}?"
58
107
  selectAccountToRemove: "Select an account to remove from the config"
59
108
  errors:
60
109
  accountNotFound: "The account \"{{ specifiedAccount }}\" could not be found in {{ configPath }}"
@@ -70,6 +119,12 @@ en:
70
119
  info:
71
120
  accountId: "{{#bold}}Account ID{{/bold}}: {{ accountId }}"
72
121
  describe: "Print information about the default account, or about the account specified with the \"account\" option."
122
+ defaultAccountTitle: "{{#bold}}Default Account{{/bold}}"
123
+ defaultAccount: "Account: {{ account }}"
124
+ configPath: "Source: {{ configPath }}"
125
+ overrideFilePathTitle: "{{#bold}}Default Account Override{{/bold}}"
126
+ overrideFilePath: "Source: {{ overrideFilePath }}"
127
+ overrideAccount: "Account: {{ account }}"
73
128
  errors:
74
129
  notUsingPersonalAccessKey: "This command currently only supports fetching scopes for the personal access key auth type."
75
130
  options:
@@ -92,13 +147,15 @@ en:
92
147
  confirm:
93
148
  one: "Remove 1 inactive account from the CLI config?"
94
149
  other: "Remove {{ count }} inactive accounts from the CLI config?"
150
+ defaultAccountOverride: "\n(This will also delete the default account override file at {{ overrideFilePath }})"
151
+ replaceDefaultAccount: "The default account was removed."
95
152
  removeSuccess: "Removed {{ accountName }} from the CLI config."
96
153
  auth:
97
154
  describe: "Configure authentication for your HubSpot account."
98
155
  verboseDescribe: "Configure authentication for a HubSpot account. This will update the {{ configName }} file that stores your account information.\n\nThe recommended authentication method is {{#bold}}{{ authMethod }}{{/bold}}, which uses an access token tied to a specific user account."
99
156
  errors:
100
- noConfigFileFound: "No config file was found. To create a new config file, use the \"hs init\" command."
101
157
  unsupportedAuthType: "Unsupported auth type: {{ type }}. The only supported authentication protocols are {{ supportedProtocols }}."
158
+ globalConfigFileExists: "A global config file exists at {{ configPath }}. To authorize an account, please use {{ authCommand }}."
102
159
  options:
103
160
  authType:
104
161
  describe: "Authentication method"
@@ -109,6 +166,16 @@ en:
109
166
  config:
110
167
  describe: "Commands for managing the CLI config file."
111
168
  subcommands:
169
+ migrate:
170
+ describe: "Migrate from the deprecated {{ deprecatedConfigPath }} file to the new global config file at {{ globalConfigPath }}."
171
+ migrationAlreadyCompleted: "No {{ deprecatedConfigPath }} deprecated configuration file found. No migration necessary."
172
+ errors:
173
+ configNotFound: "A configuration file at {{ configPath }} could not be found. Please try again with a valid file path."
174
+ options:
175
+ force: "When merging a deprecated configuration file with an existing global configuration file, overwrite any conflicting values in the global config with the deprecated config values."
176
+ examples:
177
+ default: "Migrate from the deprecated {{ deprecatedConfigPath }} file to the new global config file at {{ globalConfigPath }}"
178
+ configFlag: "Migrate a specific config file (specified with the config flag) to the new global config file at {{ globalConfigPath }}"
112
179
  set:
113
180
  describe: "Set various configuration options within the hubspot.config.yml file."
114
181
  promptMessage: "Select a config option to update"
@@ -456,8 +523,6 @@ en:
456
523
  describe: "Authentication method"
457
524
  account:
458
525
  describe: "HubSpot account to authenticate"
459
- useHiddenConfig:
460
- describe: "Use the new HubSpot configuration file located in a hidden file in the user's home directory"
461
526
  success:
462
527
  configFileCreated: "Created config file \"{{ configPath }}\""
463
528
  configFileUpdated: "Connected account \"{{ account }}\" using \"{{ authType }}\" and set it as the default account"
@@ -465,7 +530,7 @@ en:
465
530
  updateConfig: "To update an existing config file, use the \"hs auth\" command."
466
531
  errors:
467
532
  configFileExists: "The config file {{ configPath }} already exists."
468
- bothConfigFilesNotAllowed: "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."
533
+ globalConfigFileExists: "A global config file already exists at {{ configPath }}. To specify a new local config file, delete the existing one and try again."
469
534
  lint:
470
535
  issuesFound: "{{ count }} issues found."
471
536
  groupName: "Linting {{ path }}"
@@ -539,6 +604,7 @@ en:
539
604
  describe: "Create a new project."
540
605
  errors:
541
606
  failedToDownloadProject: "Failed to download project. Please try again later."
607
+ invalidTemplateSource: "Invalid template source provided. Use the format <Owner>/<Repo> and try again."
542
608
  failedToFetchProjectList: "Failed to fetch the list of available project templates. Please try again later."
543
609
  cannotNestProjects: "A project already exists at {{ projectDir }}. Projects cannot be nested within other projects. Please choose a different destination and try again."
544
610
  logs:
@@ -568,7 +634,7 @@ en:
568
634
  name:
569
635
  describe: "Project name (cannot be changed)"
570
636
  header:
571
- text: "Migrate an app to the projects framework"
637
+ text: "This command will migrate an app to the projects framework. It will walk you through the fields required to complete the migration and download the project source code into a directory of your choosing."
572
638
  link: "Learn more about migrating apps to the projects framework"
573
639
  deprecationWarning: "The {{ oldCommand }} command is deprecated and will be removed. Use {{ newCommand }} going forward."
574
640
  migrationStatus:
@@ -586,40 +652,15 @@ en:
586
652
  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."
587
653
  createAppPrompt: "Proceed with migrating this app to a project component (this process can't be aborted)?"
588
654
  projectDetailsLink: "View project details in your developer account"
589
- componentsToBeMigrated: "The following component types will be migrated: {{ components }}"
655
+ componentsToBeMigrated: "The following features will be migrated: {{ components }}"
590
656
  componentsThatWillNotBeMigrated: "[NOTE] These component types are not yet supported for migration but will be available later: {{ components }}"
591
657
  errors:
592
- noAppsEligible: "No apps in account {{ accountId }} are currently migratable"
658
+ noAppsForProject: "No apps associated with project {{ projectName }}"
593
659
  noAccountConfig: "There is no account associated with {{ accountId }} in the config file. Please choose another account and try again, or authenticate {{ accountId }} using {{ authCommand }}."
594
- invalidAccountTypeTitle: "{{#bold}}Developer account not targeted{{/bold}}"
595
- invalidAccountTypeDescription: "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."
596
660
  projectAlreadyExists: "A project with name {{ projectName }} already exists. Please choose another name."
597
661
  invalidApp: "Could not migrate appId {{ appId }}. This app cannot be migrated at this time. Please choose another public app."
598
- appWithAppIdNotFound: "Could not find an app with the id {{ appId }} "
599
662
  migrationFailed: 'Migration Failed'
600
- prompt:
601
- chooseApp: 'Which app would you like to migrate?'
602
- inputName: '[--name] What would you like to name the project?'
603
- inputDest: '[--dest] Where would you like to save the project?'
604
- uidForComponent: 'What UID would you like to use for {{ componentName }}?'
605
- proceed: 'Would you like to proceed?'
606
- spinners:
607
- beginningMigration: "Beginning migration"
608
- unableToStartMigration: "Unable to begin migration"
609
- finishingMigration: "Wrapping up migration"
610
- migrationComplete: "Migration completed"
611
- migrationFailed: "Migration failed"
612
- downloadingProjectContents: "Downloading migrated project files"
613
- downloadingProjectContentsComplete: "Migrated project files downloaded"
614
- downloadingProjectContentsFailed: "Unable to download migrated project files"
615
- copyingProjectFiles: "Copying migrated project files"
616
- copyingProjectFilesComplete: "Migrated project files copied"
617
- copyingProjectFilesFailed: "Unable to copy migrated project files"
618
- unmigratableReasons:
619
- upToDate: 'App is already up to date'
620
- isPrivateApp: 'Private apps are not currently migratable'
621
- listedInMarketplace: 'Listed apps are not currently migratable'
622
- generic: "Unable to migrate app: {{ reasonCode }}"
663
+ 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 {{ command }}'
623
664
  cloneApp:
624
665
  describe: "Clone a public app using the projects framework."
625
666
  examples:
@@ -769,9 +810,12 @@ en:
769
810
  attemptNewBuild: "Attempting to create a new build"
770
811
  fileAlreadyQueued: "File \"{{ filePath }}\" is already queued for upload"
771
812
  errors:
813
+ projectConfigNotFound: "No project config found. Please ensure that you are in a project directory."
814
+ projectLockedError: "Your project is locked. This may mean that another user is running the {{#bold}}`hs project dev`{{/bold}} command for this project. If this is you, unlock the project in Projects UI."
772
815
  uploadFailed: "Failed to upload file \"{{ filePath }}\" to \"{{ remotePath }}\""
773
816
  deleteFileFailed: "Failed to delete file \"{{ remotePath }}\""
774
817
  deleteFolderFailed: "Failed to delete folder \"{{ remotePath }}\""
818
+ v3ApiError: "{{ command }} is not supported for platform version '{{ platformVersion}}', use {{ newCommand }} instead to develop locally. {{ linkToDocs }}"
775
819
  download:
776
820
  describe: "Download your project files from HubSpot."
777
821
  examples:
@@ -1158,7 +1202,7 @@ en:
1158
1202
  missingPropertiesInConfig: "Found misconfigured projects in the target repository's config.json file. Please ensure that each project in the target repository's config.json file contains the following properties: [\"name\", \"label\", \"path\", \"insertPath\"]."
1159
1203
  validateProjectConfig:
1160
1204
  configNotFound: "Unable to locate a project configuration file. Try running again from a project directory, or run {{ createCommand }} to create a new project."
1161
- configMissingFields: "The project configuruation file is missing required fields."
1205
+ configMissingFields: "The project configuration file is missing required fields."
1162
1206
  srcDirNotFound: "Project source directory {{#bold}}{{ srcDir }}{{/bold}} could not be found in {{#bold}}{{ projectDir }}{{/bold}}."
1163
1207
  srcOutsideProjectDir: "Invalid value for 'srcDir' in {{ projectConfig }}: {{#bold}}srcDir: \"{{ srcDir }}\"{{/bold}}\n\t'srcDir' must be a relative path to a folder under the project root, such as \".\" or \"./src\""
1164
1208
  ensureProjectExists:
@@ -1215,11 +1259,14 @@ en:
1215
1259
  command: "--account"
1216
1260
  message: "Use the {{ command }} option with any command to override the default account"
1217
1261
  accountsListCommand:
1218
- command: hs accounts list
1262
+ command: "hs account list"
1219
1263
  message: "Run {{ command }} to see a list of configured HubSpot accounts"
1220
1264
  accountsUseCommand:
1221
- command: "hs accounts use"
1265
+ command: "hs account use"
1222
1266
  message: "Run {{ command }} to set the Hubspot account that the CLI will target by default"
1267
+ accountAuthCommand:
1268
+ command: "hs account auth"
1269
+ message: "Run {{ command }} to connect the CLI to additional HubSpot accounts"
1223
1270
  authCommand:
1224
1271
  command: "hs auth"
1225
1272
  message: "Run {{ command }} to connect the CLI to additional HubSpot accounts"
@@ -1284,6 +1331,13 @@ en:
1284
1331
  describe: "Use environment variable config"
1285
1332
  debug:
1286
1333
  describe: "Set log level to debug"
1334
+ configMigrate:
1335
+ migrateConfigPrompt: "Migrate config?\n From deprecated config file: {{ deprecatedConfigPath }}\n To new global config file: {{ globalConfigPath }}\n (This action will delete the deprecated config file).\n"
1336
+ mergeConfigConflictPrompt: "Change the {{ property }} property in the global config from {{ newValue }} to {{ oldValue }}?"
1337
+ mergeConfigsPrompt: "Two config files detected. Merge them?\n Deprecated config file: {{ deprecatedConfigPath }}\n Global config: {{ globalConfigPath }}\n (This action will delete the deprecated config file).\n"
1338
+ migrationSuccess: "The deprecated config file has been migrated to the new global config file at {{ globalConfigPath }}."
1339
+ mergeSuccess: "The deprecated config file has been merged with the global config file at {{ globalConfigPath }}."
1340
+ skippedExistingAccounts: "\nThe following accounts were not merged, because they already exist in the global config: {{ skippedAccountIds }}.\n"
1287
1341
  prompts:
1288
1342
  projectDevTargetAccountPrompt:
1289
1343
  createNewSandboxOption: "<Test on a new development sandbox>"
@@ -1293,7 +1347,7 @@ en:
1293
1347
  sandboxLimit: "Your account reached the limit of {{ limit }} development sandboxes"
1294
1348
  sandboxLimitWithSuggestion: "Your account reached the limit of {{ limit }} development sandboxes. Run {{ authCommand }} to add an existing one to the config."
1295
1349
  developerTestAccountLimit: "Your account reached the limit of {{ limit }} developer test accounts."
1296
- confirmDefaultAccount: "Continue testing on {{#bold}}{{ accountName }} ({{ accountType }}){{/bold}}? (Y/n)"
1350
+ confirmDefaultAccount: "Proceed with local development on {{#bold}}{{ accountName }} [{{ accountType }}]{{/bold}}? (Y/n)"
1297
1351
  confirmUseExistingDeveloperTestAccount: "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."
1298
1352
  noAccountId: "No account ID found for the selected account. Please try again."
1299
1353
  projectLogsPrompt:
@@ -1371,6 +1425,7 @@ en:
1371
1425
  invalidDest: "There is an existing project at this destination. Please provide a new path for this project."
1372
1426
  invalidCharacters: "The selected destination contains invalid characters. Please provide a new path and try again."
1373
1427
  invalidTemplate: "[--template] Could not find template \"{{ template }}\". Please choose an available template:"
1428
+ projectTemplateRequired: "Project template is required when projectTemplates is provided"
1374
1429
  selectPublicAppPrompt:
1375
1430
  selectAppIdMigrate: "[--appId] Choose an app under {{ accountName }} to migrate:"
1376
1431
  selectAppIdClone: "[--appId] Choose an app under {{ accountName }} to clone:"
@@ -1570,6 +1625,9 @@ en:
1570
1625
  doctor:
1571
1626
  runningDiagnostics: "Running diagnostics..."
1572
1627
  diagnosticsComplete: "Diagnostics complete"
1628
+ defaultAccountOverrideFileChecks:
1629
+ overrideActive: "Default account override file active: {{ defaultAccountOverrideFile }}"
1630
+ overrideAccountId: "Active account ID: {{ overrideAccountId }}"
1573
1631
  accountChecks:
1574
1632
  active: "Default account active"
1575
1633
  inactive: "Default account isn't active"
@@ -1621,6 +1679,8 @@ en:
1621
1679
  settings:
1622
1680
  httpUseLocalhost: "The setting {{#bold}}httpUseLocalhost{{/bold}} is enabled"
1623
1681
  httpUseLocalhostSecondary: "This setting causes all CLI requests to route to localhost"
1682
+ defaultAccountOverrideFile:
1683
+ header: "Default account override file path:"
1624
1684
  projectConfig:
1625
1685
  header: "Project configuration"
1626
1686
  projectDirSubHeader: "Project dir: {{#bold}}{{ projectDir }}{{/bold}}"
@@ -5,3 +5,4 @@ export declare function isStandardSandbox(accountConfig: CLIAccount): boolean;
5
5
  export declare function isDevelopmentSandbox(accountConfig: CLIAccount): boolean;
6
6
  export declare function isDeveloperTestAccount(accountConfig: CLIAccount): boolean;
7
7
  export declare function isAppDeveloperAccount(accountConfig: CLIAccount): boolean;
8
+ export declare function isUnifiedAccount(account: CLIAccount): Promise<boolean>;
@@ -6,7 +6,11 @@ exports.isStandardSandbox = isStandardSandbox;
6
6
  exports.isDevelopmentSandbox = isDevelopmentSandbox;
7
7
  exports.isDeveloperTestAccount = isDeveloperTestAccount;
8
8
  exports.isAppDeveloperAccount = isAppDeveloperAccount;
9
+ exports.isUnifiedAccount = isUnifiedAccount;
9
10
  const config_1 = require("@hubspot/local-dev-lib/constants/config");
11
+ const hasFeature_1 = require("./hasFeature");
12
+ const constants_1 = require("./constants");
13
+ const getAccountIdentifier_1 = require("@hubspot/local-dev-lib/config/getAccountIdentifier");
10
14
  function isAccountType(accountConfig, accountType) {
11
15
  return (Boolean(accountConfig.accountType) &&
12
16
  accountConfig.accountType === accountType);
@@ -30,3 +34,11 @@ function isDeveloperTestAccount(accountConfig) {
30
34
  function isAppDeveloperAccount(accountConfig) {
31
35
  return isAccountType(accountConfig, config_1.HUBSPOT_ACCOUNT_TYPES.APP_DEVELOPER);
32
36
  }
37
+ async function isUnifiedAccount(account) {
38
+ const accountId = (0, getAccountIdentifier_1.getAccountIdentifier)(account);
39
+ if (!accountId) {
40
+ return false;
41
+ }
42
+ const isUngatedForUnifiedApps = await (0, hasFeature_1.hasFeature)(accountId, constants_1.FEATURES.UNIFIED_APPS);
43
+ return isStandardAccount(account) && isUngatedForUnifiedApps;
44
+ }
@@ -1,5 +1,11 @@
1
1
  import { ArgumentsCamelCase } from 'yargs';
2
- import { MigrateAppOptions } from '../../types/Yargs';
3
- export declare function downloadProjectFiles(derivedAccountId: number, projectName: string, buildId: number, projectDest: string): Promise<void>;
4
- export declare function migrateApp2025_2(derivedAccountId: number, options: ArgumentsCamelCase<MigrateAppOptions>): Promise<void>;
5
- export declare function logInvalidAccountError(i18nKey: string): void;
2
+ import { LoadedProjectConfig } from '../projects/config';
3
+ import { AccountArgs, CommonArgs, ConfigArgs, EnvironmentArgs } from '../../types/Yargs';
4
+ export type MigrateAppArgs = CommonArgs & AccountArgs & EnvironmentArgs & ConfigArgs & {
5
+ name?: string;
6
+ dest?: string;
7
+ appId?: number;
8
+ platformVersion: string;
9
+ };
10
+ export declare function migrateApp2025_2(derivedAccountId: number, options: ArgumentsCamelCase<MigrateAppArgs>, projectConfig?: LoadedProjectConfig): Promise<void>;
11
+ export declare function logInvalidAccountError(): void;