@hubspot/cli 7.5.11-experimental.0 → 7.7.0-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 (289) hide show
  1. package/bin/cli.js +5 -6
  2. package/bin/hsmcp.d.ts +2 -0
  3. package/bin/hsmcp.js +13 -0
  4. package/commands/account/auth.d.ts +3 -7
  5. package/commands/account/auth.js +19 -9
  6. package/commands/account/clean.d.ts +3 -7
  7. package/commands/account/clean.js +16 -9
  8. package/commands/account/createOverride.d.ts +3 -7
  9. package/commands/account/createOverride.js +23 -6
  10. package/commands/account/info.d.ts +3 -7
  11. package/commands/account/info.js +13 -5
  12. package/commands/account/list.d.ts +3 -7
  13. package/commands/account/list.js +15 -8
  14. package/commands/account/remove.d.ts +3 -7
  15. package/commands/account/remove.js +21 -9
  16. package/commands/account/removeOverride.d.ts +3 -7
  17. package/commands/account/removeOverride.js +23 -6
  18. package/commands/account/rename.d.ts +3 -7
  19. package/commands/account/rename.js +16 -9
  20. package/commands/account/use.d.ts +5 -9
  21. package/commands/account/use.js +14 -6
  22. package/commands/account.d.ts +3 -4
  23. package/commands/account.js +35 -58
  24. package/commands/app/migrate.d.ts +1 -2
  25. package/commands/app/migrate.js +7 -8
  26. package/commands/app/secret/add.d.ts +7 -0
  27. package/commands/app/secret/add.js +64 -0
  28. package/commands/app/secret/delete.d.ts +8 -0
  29. package/commands/app/secret/delete.js +87 -0
  30. package/commands/app/secret/list.d.ts +6 -0
  31. package/commands/app/secret/list.js +64 -0
  32. package/commands/app/secret/update.d.ts +7 -0
  33. package/commands/app/secret/update.js +77 -0
  34. package/commands/app/secret.d.ts +3 -0
  35. package/commands/app/secret.js +30 -0
  36. package/commands/app.d.ts +2 -5
  37. package/commands/app.js +12 -8
  38. package/commands/auth.d.ts +3 -7
  39. package/commands/auth.js +12 -5
  40. package/commands/cms/convertFields.d.ts +7 -1
  41. package/commands/cms/convertFields.js +57 -41
  42. package/commands/cms/getReactModule.d.ts +7 -1
  43. package/commands/cms/getReactModule.js +52 -34
  44. package/commands/cms/lighthouseScore.d.ts +8 -1
  45. package/commands/cms/lighthouseScore.js +129 -100
  46. package/commands/cms.d.ts +3 -1
  47. package/commands/cms.js +24 -15
  48. package/commands/completion.d.ts +3 -1
  49. package/commands/completion.js +25 -12
  50. package/commands/config/migrate.d.ts +3 -7
  51. package/commands/config/migrate.js +25 -15
  52. package/commands/config/set.d.ts +5 -6
  53. package/commands/config/set.js +38 -14
  54. package/commands/config.d.ts +3 -4
  55. package/commands/config.js +20 -44
  56. package/commands/create/api-sample.d.ts +3 -1
  57. package/commands/create/api-sample.js +34 -38
  58. package/commands/create/app.d.ts +3 -1
  59. package/commands/create/app.js +9 -7
  60. package/commands/create/function.d.ts +3 -1
  61. package/commands/create/function.js +11 -10
  62. package/commands/create/index.d.ts +5 -1
  63. package/commands/create/index.js +23 -11
  64. package/commands/create/module.d.ts +3 -1
  65. package/commands/create/module.js +14 -13
  66. package/commands/create/react-app.d.ts +3 -1
  67. package/commands/create/react-app.js +10 -7
  68. package/commands/create/template.d.ts +3 -1
  69. package/commands/create/template.js +14 -14
  70. package/commands/create/vue-app.d.ts +3 -1
  71. package/commands/create/vue-app.js +10 -7
  72. package/commands/create/webpack-serverless.d.ts +3 -1
  73. package/commands/create/webpack-serverless.js +10 -7
  74. package/commands/create/website-theme.d.ts +3 -1
  75. package/commands/create/website-theme.js +10 -9
  76. package/commands/create.d.ts +4 -24
  77. package/commands/create.js +64 -74
  78. package/commands/customObject/create.d.ts +4 -9
  79. package/commands/customObject/create.js +17 -10
  80. package/commands/customObject/schema/create.d.ts +4 -9
  81. package/commands/customObject/schema/create.js +18 -11
  82. package/commands/customObject/schema/delete.d.ts +4 -9
  83. package/commands/customObject/schema/delete.js +17 -10
  84. package/commands/customObject/schema/fetch-all.d.ts +4 -9
  85. package/commands/customObject/schema/fetch-all.js +17 -10
  86. package/commands/customObject/schema/fetch.d.ts +4 -9
  87. package/commands/customObject/schema/fetch.js +17 -10
  88. package/commands/customObject/schema/list.d.ts +4 -8
  89. package/commands/customObject/schema/list.js +17 -10
  90. package/commands/customObject/schema/update.d.ts +4 -9
  91. package/commands/customObject/schema/update.js +18 -11
  92. package/commands/customObject/schema.d.ts +3 -5
  93. package/commands/customObject/schema.js +27 -54
  94. package/commands/customObject.d.ts +3 -4
  95. package/commands/customObject.js +20 -45
  96. package/commands/doctor.d.ts +6 -8
  97. package/commands/doctor.js +32 -21
  98. package/commands/feedback.d.ts +4 -1
  99. package/commands/feedback.js +40 -47
  100. package/commands/fetch.d.ts +12 -1
  101. package/commands/fetch.js +49 -33
  102. package/commands/filemanager/fetch.d.ts +4 -9
  103. package/commands/filemanager/fetch.js +18 -11
  104. package/commands/filemanager/upload.d.ts +4 -9
  105. package/commands/filemanager/upload.js +17 -11
  106. package/commands/filemanager.d.ts +3 -4
  107. package/commands/filemanager.js +20 -41
  108. package/commands/function/deploy.d.ts +6 -1
  109. package/commands/function/deploy.js +70 -50
  110. package/commands/function/list.d.ts +6 -1
  111. package/commands/function/list.js +44 -32
  112. package/commands/function/server.d.ts +10 -1
  113. package/commands/function/server.js +49 -38
  114. package/commands/function.d.ts +5 -1
  115. package/commands/function.js +24 -10
  116. package/commands/hubdb/clear.d.ts +4 -9
  117. package/commands/hubdb/clear.js +17 -10
  118. package/commands/hubdb/create.d.ts +4 -9
  119. package/commands/hubdb/create.js +17 -10
  120. package/commands/hubdb/delete.d.ts +4 -9
  121. package/commands/hubdb/delete.js +17 -10
  122. package/commands/hubdb/fetch.d.ts +4 -9
  123. package/commands/hubdb/fetch.js +17 -10
  124. package/commands/hubdb.d.ts +3 -2
  125. package/commands/hubdb.js +23 -45
  126. package/commands/init.d.ts +3 -7
  127. package/commands/init.js +12 -5
  128. package/commands/lint.d.ts +6 -4
  129. package/commands/lint.js +44 -43
  130. package/commands/list.d.ts +3 -7
  131. package/commands/list.js +19 -11
  132. package/commands/logs.d.ts +10 -1
  133. package/commands/logs.js +53 -44
  134. package/commands/module/marketplace-validate.d.ts +6 -1
  135. package/commands/module/marketplace-validate.js +39 -27
  136. package/commands/module.d.ts +3 -1
  137. package/commands/module.js +22 -10
  138. package/commands/mv.d.ts +3 -7
  139. package/commands/mv.js +19 -11
  140. package/commands/open.d.ts +3 -7
  141. package/commands/open.js +19 -11
  142. package/commands/project/cloneApp.d.ts +1 -1
  143. package/commands/project/cloneApp.js +2 -2
  144. package/commands/project/create.js +3 -3
  145. package/commands/project/deploy.d.ts +1 -0
  146. package/commands/project/deploy.js +40 -12
  147. package/commands/project/dev/index.d.ts +1 -4
  148. package/commands/project/dev/index.js +48 -16
  149. package/commands/project/dev/unifiedFlow.d.ts +2 -1
  150. package/commands/project/dev/unifiedFlow.js +85 -30
  151. package/commands/project/migrate.d.ts +1 -0
  152. package/commands/project/profile/add.d.ts +7 -0
  153. package/commands/project/profile/add.js +209 -0
  154. package/commands/project/profile/delete.d.ts +6 -0
  155. package/commands/project/profile/delete.js +123 -0
  156. package/commands/project/profile.d.ts +3 -0
  157. package/commands/project/profile.js +25 -0
  158. package/commands/project/upload.d.ts +1 -0
  159. package/commands/project/upload.js +38 -8
  160. package/commands/project/validate.d.ts +4 -0
  161. package/commands/project/validate.js +53 -0
  162. package/commands/project.js +4 -0
  163. package/commands/remove.d.ts +3 -7
  164. package/commands/remove.js +19 -11
  165. package/commands/sandbox/create.d.ts +4 -9
  166. package/commands/sandbox/create.js +18 -11
  167. package/commands/sandbox/delete.d.ts +4 -9
  168. package/commands/sandbox/delete.js +18 -11
  169. package/commands/sandbox.d.ts +3 -4
  170. package/commands/sandbox.js +20 -43
  171. package/commands/secret/addSecret.d.ts +4 -9
  172. package/commands/secret/addSecret.js +17 -10
  173. package/commands/secret/deleteSecret.d.ts +4 -9
  174. package/commands/secret/deleteSecret.js +17 -10
  175. package/commands/secret/listSecret.d.ts +4 -9
  176. package/commands/secret/listSecret.js +17 -10
  177. package/commands/secret/updateSecret.d.ts +4 -9
  178. package/commands/secret/updateSecret.js +17 -10
  179. package/commands/secret.d.ts +3 -4
  180. package/commands/secret.js +25 -48
  181. package/commands/setupMcp.d.ts +8 -0
  182. package/commands/setupMcp.js +229 -0
  183. package/commands/theme/generate-selectors.d.ts +3 -7
  184. package/commands/theme/generate-selectors.js +14 -6
  185. package/commands/theme/marketplace-validate.d.ts +4 -9
  186. package/commands/theme/marketplace-validate.js +17 -10
  187. package/commands/theme/preview.d.ts +4 -9
  188. package/commands/theme/preview.js +16 -9
  189. package/commands/theme.d.ts +3 -4
  190. package/commands/theme.js +23 -46
  191. package/commands/upload.d.ts +12 -1
  192. package/commands/upload.js +118 -97
  193. package/commands/watch.d.ts +14 -1
  194. package/commands/watch.js +76 -65
  195. package/lang/en.d.ts +838 -574
  196. package/lang/en.js +630 -373
  197. package/lang/en.lyaml +30 -23
  198. package/lib/accountTypes.js +2 -1
  199. package/lib/app/migrate.d.ts +23 -0
  200. package/lib/app/migrate.js +14 -3
  201. package/lib/app/migrate_legacy.js +7 -7
  202. package/lib/app/urls.d.ts +16 -0
  203. package/lib/app/urls.js +16 -0
  204. package/lib/configMigrate.js +24 -10
  205. package/lib/configOptions.d.ts +4 -0
  206. package/lib/configOptions.js +41 -46
  207. package/lib/constants.d.ts +6 -0
  208. package/lib/constants.js +7 -1
  209. package/lib/dependencyManagement.d.ts +0 -5
  210. package/lib/dependencyManagement.js +13 -39
  211. package/lib/doctor/Doctor.js +2 -1
  212. package/lib/filesystem.d.ts +1 -1
  213. package/lib/interpolation.d.ts +2 -3
  214. package/lib/lang.d.ts +2 -3
  215. package/lib/middleware/autoUpdateMiddleware.d.ts +1 -0
  216. package/lib/middleware/autoUpdateMiddleware.js +89 -0
  217. package/lib/middleware/configMiddleware.js +8 -0
  218. package/lib/npm.d.ts +9 -0
  219. package/lib/npm.js +36 -0
  220. package/lib/projectProfiles.d.ts +6 -0
  221. package/lib/projectProfiles.js +65 -0
  222. package/lib/projects/buildAndDeploy.js +17 -2
  223. package/lib/projects/localDev/AppDevModeInterface.d.ts +26 -0
  224. package/lib/projects/localDev/AppDevModeInterface.js +156 -0
  225. package/lib/projects/localDev/DevServerManagerV2.d.ts +11 -22
  226. package/lib/projects/localDev/DevServerManagerV2.js +19 -15
  227. package/lib/projects/localDev/LocalDevLogger.d.ts +30 -0
  228. package/lib/projects/localDev/LocalDevLogger.js +158 -0
  229. package/lib/projects/localDev/LocalDevManager.js +12 -5
  230. package/lib/projects/localDev/LocalDevProcess.d.ts +27 -0
  231. package/lib/projects/localDev/LocalDevProcess.js +171 -0
  232. package/lib/projects/localDev/LocalDevState.d.ts +37 -0
  233. package/lib/projects/localDev/LocalDevState.js +78 -0
  234. package/lib/projects/localDev/LocalDevWatcher.d.ts +10 -0
  235. package/lib/projects/localDev/LocalDevWatcher.js +56 -0
  236. package/lib/projects/localDev/LocalDevWebsocketServer.d.ts +17 -0
  237. package/lib/projects/localDev/LocalDevWebsocketServer.js +92 -0
  238. package/lib/projects/localDev/helpers.d.ts +3 -2
  239. package/lib/projects/localDev/helpers.js +32 -2
  240. package/lib/projects/upload.d.ts +2 -1
  241. package/lib/projects/upload.js +2 -2
  242. package/lib/prompts/createApiSamplePrompt.d.ts +2 -10
  243. package/lib/prompts/createTemplatePrompt.d.ts +22 -4
  244. package/lib/prompts/installAppPrompt.d.ts +1 -0
  245. package/lib/prompts/installAppPrompt.js +35 -0
  246. package/lib/prompts/projectDevTargetAccountPrompt.d.ts +6 -1
  247. package/lib/prompts/projectDevTargetAccountPrompt.js +6 -6
  248. package/lib/prompts/promptUtils.d.ts +2 -1
  249. package/lib/prompts/promptUtils.js +2 -1
  250. package/lib/prompts/selectAppPrompt.d.ts +2 -0
  251. package/lib/prompts/selectAppPrompt.js +40 -0
  252. package/lib/prompts/{selectPublicAppPrompt.d.ts → selectPublicAppForMigrationPrompt.d.ts} +1 -1
  253. package/lib/prompts/{selectPublicAppPrompt.js → selectPublicAppForMigrationPrompt.js} +8 -8
  254. package/lib/testUtils.d.ts +3 -3
  255. package/lib/testUtils.js +8 -9
  256. package/lib/ui/index.js +4 -1
  257. package/lib/upload.d.ts +1 -1
  258. package/lib/validation.js +4 -5
  259. package/lib/yargsUtils.d.ts +4 -0
  260. package/lib/yargsUtils.js +6 -0
  261. package/mcp-server/index.d.ts +1 -0
  262. package/mcp-server/index.js +17 -0
  263. package/mcp-server/mcpLoader.d.ts +5 -0
  264. package/mcp-server/mcpLoader.js +24 -0
  265. package/mcp-server/tools/ExplainProjectStructureTool.d.ts +33 -0
  266. package/mcp-server/tools/ExplainProjectStructureTool.js +266 -0
  267. package/mcp-server/tools/GenerateAppComponentTool.d.ts +99 -0
  268. package/mcp-server/tools/GenerateAppComponentTool.js +193 -0
  269. package/mcp-server/tools/GenerateCardComponentTool.d.ts +74 -0
  270. package/mcp-server/tools/GenerateCardComponentTool.js +146 -0
  271. package/mcp-server/tools/GenerateProjectConfigTool.d.ts +32 -0
  272. package/mcp-server/tools/GenerateProjectConfigTool.js +40 -0
  273. package/mcp-server/tools/HubSpotCLIHelper.d.ts +16 -0
  274. package/mcp-server/tools/HubSpotCLIHelper.js +74 -0
  275. package/mcp-server/tools/UploadProjectTool.d.ts +44 -0
  276. package/mcp-server/tools/UploadProjectTool.js +149 -0
  277. package/mcp-server/tools/ValidateProjectTool.d.ts +62 -0
  278. package/mcp-server/tools/ValidateProjectTool.js +315 -0
  279. package/package.json +13 -6
  280. package/types/Cms.d.ts +30 -0
  281. package/types/Cms.js +2 -0
  282. package/types/LocalDev.d.ts +24 -0
  283. package/types/LocalDev.js +2 -0
  284. package/types/Prompts.d.ts +0 -7
  285. package/types/Yargs.d.ts +8 -1
  286. package/lib/projects/localDev/LocalDevManagerV2.d.ts +0 -64
  287. package/lib/projects/localDev/LocalDevManagerV2.js +0 -345
  288. package/lib/prompts/installPublicAppPrompt.d.ts +0 -1
  289. package/lib/prompts/installPublicAppPrompt.js +0 -41
package/lang/en.lyaml CHANGED
@@ -22,6 +22,7 @@ en:
22
22
  subcommands:
23
23
  auth:
24
24
  describe: "Configure authentication for your HubSpot account."
25
+ verboseDescribe: "Configure authentication for a HubSpot account. This will create or update the global config file at {{ globalConfigPath }} 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.\nIf a deprecated config file exists, you will be prompted to migrate it to the new global config file. If both deprecated and global config files exist, you will be prompted to merge them. If any conflicts exist between the two files, you will be prompted to reconcile them."
25
26
  options:
26
27
  account:
27
28
  describe: "HubSpot account to authenticate"
@@ -39,6 +40,7 @@ en:
39
40
  prompts:
40
41
  replaceOverrideFile: "Replace existing account override file?"
41
42
  errors:
43
+ globalConfigNotFound: "This command is only compatible with our new global config. Run {{ authCommand }} to get started."
42
44
  accountNotFound: "The specified account could not be found in the config file {{ configPath }}"
43
45
  options:
44
46
  account:
@@ -54,6 +56,8 @@ en:
54
56
  deleteOverrideFile: "Delete account override file?"
55
57
  success: "Removed the default account override file."
56
58
  noOverrideFile: "No default account override file found in the current working directory. No action required."
59
+ errors:
60
+ globalConfigNotFound: "This command is only compatible with our new global config. Run {{ authCommand }} to get started."
57
61
  options:
58
62
  force:
59
63
  describe: "Skip confirmation prompt when removing the override file"
@@ -165,6 +169,7 @@ en:
165
169
  subcommands:
166
170
  migrate:
167
171
  describe: "Migrate from the deprecated {{ deprecatedConfigPath }} file to the new global config file at {{ globalConfigPath }}."
172
+ verboseDescribe: "This command will create a new global configuration file in your root directory and rename the deprecated config to {{ archivedConfigPath }}. If any conflicting values are detected, we will prompt you to reconcile them unless the \"--force\" flag is supplied."
168
173
  migrationAlreadyCompleted: "No {{ deprecatedConfigPath }} deprecated configuration file found. No migration necessary."
169
174
  errors:
170
175
  configNotFound: "A configuration file at {{ configPath }} could not be found. Please try again with a valid file path."
@@ -588,15 +593,21 @@ en:
588
593
  betaMessage: "HubSpot projects local development"
589
594
  placeholderAccountSelection: "Using default account as target account (for now)"
590
595
  learnMoreLocalDevServer: "Learn more about the projects local dev server"
596
+ 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."
597
+ learnMoreMessage: "Visit our {{ learnMoreLink }} to learn more."
598
+ learnMoreLink: "docs on Developer Test and Sandbox accounts "
591
599
  errors:
592
600
  noProjectConfig: "No project detected. Please run this command again from a project directory."
593
601
  noAccount: "An error occurred while reading account {{ accountId }} from your config. Run {{ authCommand }} to re-auth this account."
594
602
  noAccountsInConfig: "No accounts found in your config. Run {{ authCommand }} to configure a HubSpot account with the CLI."
595
603
  invalidProjectComponents: "Projects cannot contain both private and public apps. Move your apps to separate projects before attempting local development."
596
604
  noRunnableComponents: "No supported components were found in this project. Run {{ command }} to see a list of available components and add one to your project."
597
- invalidUnifiedAppsAccount: "Local development of Unified Apps is currently only supported in standard and developer accounts. Target a standard or developer account with {{ authCommand }} and try again."
605
+ accountNotCombined: "Local 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 {{ accountUseCommand }}."
598
606
  examples:
599
607
  default: "Start local dev for the current project"
608
+ options:
609
+ profile:
610
+ describe: "The profile to target during local dev"
600
611
  create:
601
612
  describe: "Create a new project."
602
613
  errors:
@@ -715,6 +726,8 @@ en:
715
726
  describe: "Project build ID to be deployed"
716
727
  project:
717
728
  describe: "Project name"
729
+ profile:
730
+ describe: "The profile to target with this deploy"
718
731
  listBuilds:
719
732
  describe: "List the project's builds."
720
733
  continueOrExitPrompt: "Press <enter> to load more, or ctrl+c to exit"
@@ -782,6 +795,8 @@ en:
782
795
  describe: "Automatically create project if it does not exist"
783
796
  message:
784
797
  describe: "Add a message when you upload your project and create a build"
798
+ profile:
799
+ describe: "The profile to target with this upload"
785
800
  watch:
786
801
  describe: "Watch your local project for changes and automatically upload changed files to a new build in HubSpot."
787
802
  examples:
@@ -841,18 +856,10 @@ en:
841
856
  default: "Opens the projects page for the specified account"
842
857
  success: "Successfully opened \"{{ projectName }}\""
843
858
  feedback:
844
- describe: "Leave feedback on HubSpot projects or file a bug report."
845
- feedbackType:
846
- prompt: "What type of feedback would you like to leave?"
847
- bug: "[--bug] Report a bug"
848
- general: "[--general] Tell us about your experience with HubSpot's developer tools"
849
- openPrompt: "Create a Github issue in your browser?"
859
+ describe: "Leave feedback or file a bug report."
860
+ openPrompt: "Open the feedback form in your browser?"
850
861
  success: "We opened {{ url }} in your browser."
851
- options:
852
- bug:
853
- describe: "Open Github issues in your browser to report a bug."
854
- general:
855
- describe: "Open Github issues in your browser to give feedback."
862
+ error: "Navigate to {{ url }} to leave feedback."
856
863
  installDeps:
857
864
  help:
858
865
  describe: "Install the dependencies for your project, or add a dependency to a subcomponent of a project."
@@ -1329,9 +1336,15 @@ en:
1329
1336
  debug:
1330
1337
  describe: "Set log level to debug"
1331
1338
  configMigrate:
1332
- 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"
1339
+ migrationHeader: "Migrate your existing configuration file to the new global location?"
1340
+ migrationDescription: "This action will create a new global configuration file in your root directory and rename the deprecated config to {{ archivedConfigPath}}. If any conflicting values are detected, we will prompt you to reconcile them unless the \"--force\" flag is supplied."
1341
+ mergeHeader: "Merge your existing configuration file with the global config?"
1342
+ mergeDescription: "This action will merge your deprecated config file with the global config file located in your root directory. It will also rename the deprecated config to {{ archivedConfigPath }}. If any conflicting values are detected, we will prompt you to reconcile them unless the \"--force\" flag is supplied."
1343
+ migrateConfigPromptDescription: "From deprecated config file: {{ deprecatedConfigPath }}\nTo new global config file: {{ globalConfigPath }}"
1344
+ migrateConfigPrompt: "Migrate to the new config?"
1333
1345
  mergeConfigConflictPrompt: "Change the {{ property }} property in the global config from {{ newValue }} to {{ oldValue }}?"
1334
- 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"
1346
+ mergeConfigsPromptDescription: "Two config files detected. \nDeprecated config file: {{ deprecatedConfigPath }}\nGlobal config: {{ globalConfigPath }}"
1347
+ mergeConfigsPrompt: "Merge configs?"
1335
1348
  migrationSuccess: "The deprecated config file has been migrated to the new global config file at {{ globalConfigPath }}."
1336
1349
  mergeSuccess: "The deprecated config file has been merged with the global config file at {{ globalConfigPath }}."
1337
1350
  skippedExistingAccounts: "\nThe following accounts were not merged, because they already exist in the global config: {{ skippedAccountIds }}.\n"
@@ -1423,7 +1436,7 @@ en:
1423
1436
  invalidCharacters: "The selected destination contains invalid characters. Please provide a new path and try again."
1424
1437
  invalidTemplate: "[--template] Could not find template \"{{ template }}\". Please choose an available template:"
1425
1438
  projectTemplateRequired: "Project template is required when projectTemplates is provided"
1426
- selectPublicAppPrompt:
1439
+ selectPublicAppForMigrationPrompt:
1427
1440
  selectAppIdMigrate: "[--appId] Choose an app under {{ accountName }} to migrate:"
1428
1441
  selectAppIdClone: "[--appId] Choose an app under {{ accountName }} to clone:"
1429
1442
  errors:
@@ -1446,8 +1459,8 @@ en:
1446
1459
  nameRequired: "A component name is required"
1447
1460
  invalidType: "[--type] Could not find type \"{{ type }}\". Please choose an available type:"
1448
1461
  secretPrompt:
1449
- enterValue: "Enter a value for your secret: "
1450
- enterName: "Enter a name for your secret: "
1462
+ enterValue: "Enter a value for the secret: "
1463
+ enterName: "Enter the name of the secret to add: "
1451
1464
  selectSecretUpdate: "Select the secret you want to update"
1452
1465
  selectSecretDelete: "Select the secret you want to delete"
1453
1466
  errors:
@@ -1478,12 +1491,6 @@ en:
1478
1491
  errors:
1479
1492
  srcRequired: "You must specify a source directory."
1480
1493
  destRequired: "You must specify a destination directory."
1481
- installPublicAppPrompt:
1482
- explanation: "Local development requires this app to be installed in the target test account"
1483
- 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."
1484
- prompt: "Open HubSpot to install this app?"
1485
- reinstallPrompt: "Open HubSpot to reinstall this app?"
1486
- decline: "To continue local development of this app, install it in your target test account and re-run {{#bold}}`hs project dev`{{/bold}}"
1487
1494
  selectHubDBTablePrompt:
1488
1495
  selectTable: "Select a HubDB table:"
1489
1496
  enterDest: "Enter the destination path:"
@@ -40,5 +40,6 @@ async function isUnifiedAccount(account) {
40
40
  return false;
41
41
  }
42
42
  const isUngatedForUnifiedApps = await (0, hasFeature_1.hasFeature)(accountId, constants_1.FEATURES.UNIFIED_APPS);
43
- return isStandardAccount(account) && isUngatedForUnifiedApps;
43
+ return ((isStandardAccount(account) || isAppDeveloperAccount(account)) &&
44
+ isUngatedForUnifiedApps);
44
45
  }
@@ -1,11 +1,34 @@
1
1
  import { ArgumentsCamelCase } from 'yargs';
2
2
  import { LoadedProjectConfig } from '../projects/config';
3
+ import { MigrationApp, MigrationFailed, MigrationStatus } from '../../api/migrate';
3
4
  import { AccountArgs, CommonArgs, ConfigArgs, EnvironmentArgs } from '../../types/Yargs';
4
5
  export type MigrateAppArgs = CommonArgs & AccountArgs & EnvironmentArgs & ConfigArgs & {
5
6
  name?: string;
6
7
  dest?: string;
7
8
  appId?: number;
8
9
  platformVersion: string;
10
+ unstable: boolean;
9
11
  };
12
+ export declare function getUnmigratableReason(reasonCode: string, projectName: string | undefined, accountId: number): string;
13
+ export declare function generateFilterAppsByProjectNameFunction(projectConfig?: LoadedProjectConfig): (app: MigrationApp) => boolean;
14
+ export declare function buildErrorMessageFromMigrationStatus(error: MigrationFailed): string;
15
+ export declare function fetchMigrationApps(appId: MigrateAppArgs['appId'], derivedAccountId: number, platformVersion: string, projectConfig?: LoadedProjectConfig): Promise<MigrationApp[]>;
16
+ export declare function promptForAppToMigrate(allApps: MigrationApp[], derivedAccountId: number): Promise<number>;
17
+ export declare function selectAppToMigrate(allApps: MigrationApp[], derivedAccountId: number, appId?: number): Promise<{
18
+ proceed: boolean;
19
+ appIdToMigrate?: number;
20
+ }>;
21
+ export declare function handleMigrationSetup(derivedAccountId: number, options: ArgumentsCamelCase<MigrateAppArgs>, projectConfig?: LoadedProjectConfig): Promise<{
22
+ appIdToMigrate?: number | undefined;
23
+ projectName?: string;
24
+ projectDest?: string;
25
+ }>;
26
+ export declare function beginMigration(derivedAccountId: number, appId: number, platformVersion: string): Promise<{
27
+ migrationId: number;
28
+ uidMap: Record<string, string>;
29
+ } | undefined>;
30
+ export declare function pollMigrationStatus(derivedAccountId: number, migrationId: number, successStates?: string[]): Promise<MigrationStatus>;
31
+ export declare function finalizeMigration(derivedAccountId: number, migrationId: number, uidMap: Record<string, string>, projectName: string): Promise<number>;
32
+ export declare function downloadProjectFiles(derivedAccountId: number, projectName: string, buildId: number, projectDest: string, projectConfig?: LoadedProjectConfig): Promise<void>;
10
33
  export declare function migrateApp2025_2(derivedAccountId: number, options: ArgumentsCamelCase<MigrateAppArgs>, projectConfig?: LoadedProjectConfig): Promise<void>;
11
34
  export declare function logInvalidAccountError(): void;
@@ -3,6 +3,17 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.getUnmigratableReason = getUnmigratableReason;
7
+ exports.generateFilterAppsByProjectNameFunction = generateFilterAppsByProjectNameFunction;
8
+ exports.buildErrorMessageFromMigrationStatus = buildErrorMessageFromMigrationStatus;
9
+ exports.fetchMigrationApps = fetchMigrationApps;
10
+ exports.promptForAppToMigrate = promptForAppToMigrate;
11
+ exports.selectAppToMigrate = selectAppToMigrate;
12
+ exports.handleMigrationSetup = handleMigrationSetup;
13
+ exports.beginMigration = beginMigration;
14
+ exports.pollMigrationStatus = pollMigrationStatus;
15
+ exports.finalizeMigration = finalizeMigration;
16
+ exports.downloadProjectFiles = downloadProjectFiles;
6
17
  exports.migrateApp2025_2 = migrateApp2025_2;
7
18
  exports.logInvalidAccountError = logInvalidAccountError;
8
19
  const path_1 = __importDefault(require("path"));
@@ -43,7 +54,7 @@ function getUnmigratableReason(reasonCode, projectName, accountId) {
43
54
  return en_1.lib.migrate.errors.unmigratableReasons.generic(reasonCode);
44
55
  }
45
56
  }
46
- function filterAppsByProjectName(projectConfig) {
57
+ function generateFilterAppsByProjectNameFunction(projectConfig) {
47
58
  return (app) => {
48
59
  if (projectConfig) {
49
60
  return app.projectName === projectConfig?.projectConfig?.name;
@@ -65,8 +76,8 @@ function buildErrorMessageFromMigrationStatus(error) {
65
76
  }
66
77
  async function fetchMigrationApps(appId, derivedAccountId, platformVersion, projectConfig) {
67
78
  const { data: { migratableApps, unmigratableApps }, } = await (0, migrate_1.listAppsForMigration)(derivedAccountId, platformVersion);
68
- const filteredMigratableApps = migratableApps.filter(filterAppsByProjectName(projectConfig));
69
- const filteredUnmigratableApps = unmigratableApps.filter(filterAppsByProjectName(projectConfig));
79
+ const filteredMigratableApps = migratableApps.filter(generateFilterAppsByProjectNameFunction(projectConfig));
80
+ const filteredUnmigratableApps = unmigratableApps.filter(generateFilterAppsByProjectNameFunction(projectConfig));
70
81
  const allApps = [...filteredMigratableApps, ...filteredUnmigratableApps];
71
82
  if (allApps.length > 1 && projectConfig) {
72
83
  throw new Error(en_1.lib.migrate.errors.project.multipleApps);
@@ -17,7 +17,7 @@ const exitCodes_1 = require("../enums/exitCodes");
17
17
  const ui_1 = require("../ui");
18
18
  const lang_1 = require("../lang");
19
19
  const accountTypes_1 = require("../accountTypes");
20
- const selectPublicAppPrompt_1 = require("../prompts/selectPublicAppPrompt");
20
+ const selectPublicAppForMigrationPrompt_1 = require("../prompts/selectPublicAppForMigrationPrompt");
21
21
  const createProjectPrompt_1 = require("../prompts/createProjectPrompt");
22
22
  const ensureProjectExists_1 = require("../projects/ensureProjectExists");
23
23
  const usageTracking_1 = require("../usageTracking");
@@ -30,11 +30,11 @@ async function migrateApp2023_2(derivedAccountId, options, accountConfig) {
30
30
  const defaultAccountIsUnified = await (0, accountTypes_1.isUnifiedAccount)(accountConfig);
31
31
  if (!(0, accountTypes_1.isAppDeveloperAccount)(accountConfig) && !defaultAccountIsUnified) {
32
32
  (0, migrate_1.logInvalidAccountError)();
33
- process.exit(exitCodes_1.EXIT_CODES.SUCCESS);
33
+ return process.exit(exitCodes_1.EXIT_CODES.SUCCESS);
34
34
  }
35
35
  let appId = options.appId;
36
36
  if (!appId) {
37
- const { appId: selectAppId } = await (0, selectPublicAppPrompt_1.selectPublicAppPrompt)({
37
+ const { appId: selectAppId } = await (0, selectPublicAppForMigrationPrompt_1.selectPublicAppForMigrationPrompt)({
38
38
  accountId: derivedAccountId,
39
39
  accountName,
40
40
  isMigratingApp: true,
@@ -51,12 +51,12 @@ async function migrateApp2023_2(derivedAccountId, options, accountConfig) {
51
51
  logger_1.logger.error((0, lang_1.i18n)(`commands.project.subcommands.migrateApp.errors.invalidApp`, {
52
52
  appId,
53
53
  }));
54
- process.exit(exitCodes_1.EXIT_CODES.ERROR);
54
+ return process.exit(exitCodes_1.EXIT_CODES.ERROR);
55
55
  }
56
56
  }
57
57
  catch (error) {
58
58
  (0, errorHandlers_1.logError)(error, new errorHandlers_1.ApiErrorContext({ accountId: derivedAccountId }));
59
- process.exit(exitCodes_1.EXIT_CODES.ERROR);
59
+ return process.exit(exitCodes_1.EXIT_CODES.ERROR);
60
60
  }
61
61
  const createProjectPromptResponse = await (0, createProjectPrompt_1.createProjectPrompt)(options);
62
62
  const { name: projectName, dest: projectDest } = createProjectPromptResponse;
@@ -86,7 +86,7 @@ async function migrateApp2023_2(derivedAccountId, options, accountConfig) {
86
86
  });
87
87
  process.stdin.resume();
88
88
  if (!shouldCreateApp) {
89
- process.exit(exitCodes_1.EXIT_CODES.SUCCESS);
89
+ return process.exit(exitCodes_1.EXIT_CODES.SUCCESS);
90
90
  }
91
91
  try {
92
92
  SpinniesManager_1.default.init();
@@ -97,7 +97,7 @@ async function migrateApp2023_2(derivedAccountId, options, accountConfig) {
97
97
  if ((key.ctrl && key.name === 'c') || key.name === 'q') {
98
98
  SpinniesManager_1.default.remove('migrateApp');
99
99
  logger_1.logger.log((0, lang_1.i18n)(`commands.project.subcommands.migrateApp.migrationInterrupted`));
100
- process.exit(exitCodes_1.EXIT_CODES.SUCCESS);
100
+ return process.exit(exitCodes_1.EXIT_CODES.SUCCESS);
101
101
  }
102
102
  });
103
103
  const { data: migrateResponse } = await (0, projects_1.migrateApp)(derivedAccountId, appId, projectName);
@@ -0,0 +1,16 @@
1
+ import { Environment } from '@hubspot/local-dev-lib/types/Config';
2
+ type PrivateAppInstallUrlArgs = {
3
+ targetAccountId: number;
4
+ env: Environment;
5
+ appId: string;
6
+ };
7
+ type PublicAppInstallUrlArgs = {
8
+ targetAccountId: number;
9
+ env: Environment;
10
+ clientId: string;
11
+ scopes: string[];
12
+ redirectUrls: string[];
13
+ };
14
+ export declare function getOauthAppInstallUrl({ targetAccountId, env, clientId, scopes, redirectUrls, }: PublicAppInstallUrlArgs): string;
15
+ export declare function getStaticAuthAppInstallUrl({ targetAccountId, env, appId, }: PrivateAppInstallUrlArgs): string;
16
+ export {};
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getOauthAppInstallUrl = getOauthAppInstallUrl;
4
+ exports.getStaticAuthAppInstallUrl = getStaticAuthAppInstallUrl;
5
+ const urls_1 = require("@hubspot/local-dev-lib/urls");
6
+ function getOauthAppInstallUrl({ targetAccountId, env, clientId, scopes, redirectUrls, }) {
7
+ const websiteOrigin = (0, urls_1.getHubSpotWebsiteOrigin)(env);
8
+ return (`${websiteOrigin}/oauth/${targetAccountId}/authorize` +
9
+ `?client_id=${encodeURIComponent(clientId)}` +
10
+ `&scope=${encodeURIComponent(scopes.join(' '))}` +
11
+ `&redirect_uri=${encodeURIComponent(redirectUrls[0])}`);
12
+ }
13
+ function getStaticAuthAppInstallUrl({ targetAccountId, env, appId, }) {
14
+ const websiteOrigin = (0, urls_1.getHubSpotWebsiteOrigin)(env);
15
+ return `${websiteOrigin}/static-token/${targetAccountId}/authorize?appId=${appId}`;
16
+ }
@@ -9,14 +9,21 @@ const promptUtils_1 = require("./prompts/promptUtils");
9
9
  const lang_1 = require("./lang");
10
10
  const usageTracking_1 = require("./usageTracking");
11
11
  async function handleMigration(accountId, configPath) {
12
+ logger_1.logger.log((0, lang_1.i18n)('lib.configMigrate.migrationHeader'));
13
+ logger_1.logger.log('');
14
+ logger_1.logger.log((0, lang_1.i18n)('lib.configMigrate.migrationDescription', {
15
+ archivedConfigPath: config_1.ARCHIVED_HUBSPOT_CONFIG_YAML_FILE_NAME,
16
+ }));
17
+ logger_1.logger.log('');
18
+ logger_1.logger.log((0, lang_1.i18n)('lib.configMigrate.migrateConfigPromptDescription', {
19
+ deprecatedConfigPath: (0, migrate_1.getConfigPath)(configPath, false) ||
20
+ config_1.DEFAULT_HUBSPOT_CONFIG_YAML_FILE_NAME,
21
+ globalConfigPath: config_1.GLOBAL_CONFIG_PATH,
22
+ }));
12
23
  const { shouldMigrateConfig } = await (0, promptUtils_1.promptUser)({
13
24
  name: 'shouldMigrateConfig',
14
25
  type: 'confirm',
15
- message: (0, lang_1.i18n)('lib.configMigrate.migrateConfigPrompt', {
16
- deprecatedConfigPath: (0, migrate_1.getConfigPath)(configPath, false) ||
17
- config_1.DEFAULT_HUBSPOT_CONFIG_YAML_FILE_NAME,
18
- globalConfigPath: config_1.GLOBAL_CONFIG_PATH,
19
- }),
26
+ message: (0, lang_1.i18n)('lib.configMigrate.migrateConfigPrompt'),
20
27
  });
21
28
  if (!shouldMigrateConfig) {
22
29
  (0, usageTracking_1.trackCommandMetadataUsage)('config-migrate', {
@@ -62,14 +69,21 @@ async function mergeConfigProperties(globalConfig, deprecatedConfig, force) {
62
69
  return initialConfig;
63
70
  }
64
71
  async function handleMerge(accountId, configPath, force) {
72
+ logger_1.logger.log((0, lang_1.i18n)('lib.configMigrate.mergeHeader'));
73
+ logger_1.logger.log('');
74
+ logger_1.logger.log((0, lang_1.i18n)('lib.configMigrate.mergeDescription', {
75
+ archivedConfigPath: config_1.ARCHIVED_HUBSPOT_CONFIG_YAML_FILE_NAME,
76
+ }));
77
+ logger_1.logger.log('');
78
+ logger_1.logger.log((0, lang_1.i18n)('lib.configMigrate.mergeConfigsPromptDescription', {
79
+ deprecatedConfigPath: (0, migrate_1.getConfigPath)(configPath, false) ||
80
+ config_1.DEFAULT_HUBSPOT_CONFIG_YAML_FILE_NAME,
81
+ globalConfigPath: config_1.GLOBAL_CONFIG_PATH,
82
+ }));
65
83
  const { shouldMergeConfigs } = await (0, promptUtils_1.promptUser)({
66
84
  name: 'shouldMergeConfigs',
67
85
  type: 'confirm',
68
- message: (0, lang_1.i18n)('lib.configMigrate.mergeConfigsPrompt', {
69
- deprecatedConfigPath: (0, migrate_1.getConfigPath)(configPath, false) ||
70
- config_1.DEFAULT_HUBSPOT_CONFIG_YAML_FILE_NAME,
71
- globalConfigPath: config_1.GLOBAL_CONFIG_PATH,
72
- }),
86
+ message: (0, lang_1.i18n)('lib.configMigrate.mergeConfigsPrompt'),
73
87
  });
74
88
  if (!shouldMergeConfigs) {
75
89
  (0, usageTracking_1.trackCommandMetadataUsage)('config-migrate', {
@@ -3,6 +3,10 @@ export declare function setAllowUsageTracking({ accountId, allowUsageTracking, }
3
3
  accountId: number;
4
4
  allowUsageTracking?: boolean;
5
5
  }): Promise<void>;
6
+ export declare function setAllowAutoUpdates({ accountId, allowAutoUpdates, }: {
7
+ accountId: number;
8
+ allowAutoUpdates?: boolean;
9
+ }): Promise<void>;
6
10
  export declare function setDefaultCmsPublishMode({ accountId, defaultCmsPublishMode, }: {
7
11
  accountId: number;
8
12
  defaultCmsPublishMode?: CmsPublishMode;
@@ -1,35 +1,32 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.setAllowUsageTracking = setAllowUsageTracking;
4
+ exports.setAllowAutoUpdates = setAllowAutoUpdates;
4
5
  exports.setDefaultCmsPublishMode = setDefaultCmsPublishMode;
5
6
  exports.setHttpTimeout = setHttpTimeout;
6
- const logger_1 = require("@hubspot/local-dev-lib/logger");
7
7
  const config_1 = require("@hubspot/local-dev-lib/config");
8
8
  const files_1 = require("@hubspot/local-dev-lib/constants/files");
9
9
  const text_1 = require("@hubspot/local-dev-lib/text");
10
10
  const usageTracking_1 = require("./usageTracking");
11
11
  const promptUtils_1 = require("./prompts/promptUtils");
12
- const lang_1 = require("../lib/lang");
13
- async function enableOrDisableUsageTracking() {
14
- const { isEnabled } = await (0, promptUtils_1.promptUser)([
15
- {
16
- type: 'list',
17
- name: 'isEnabled',
18
- pageSize: 20,
19
- message: (0, lang_1.i18n)(`commands.config.subcommands.set.options.allowUsageTracking.promptMessage`),
20
- choices: [
21
- {
22
- name: (0, lang_1.i18n)(`commands.config.subcommands.set.options.allowUsageTracking.labels.enabled`),
23
- value: true,
24
- },
25
- {
26
- name: (0, lang_1.i18n)(`commands.config.subcommands.set.options.allowUsageTracking.labels.disabled`),
27
- value: false,
28
- },
29
- ],
30
- default: true,
31
- },
32
- ]);
12
+ const en_1 = require("../lang/en");
13
+ const logger_1 = require("./ui/logger");
14
+ async function enableOrDisableBooleanFieldPrompt(fieldName) {
15
+ const isEnabled = await (0, promptUtils_1.listPrompt)(en_1.lib.configOptions.enableOrDisableBooleanFieldPrompt.message(fieldName), {
16
+ choices: [
17
+ {
18
+ name: en_1.lib.configOptions.enableOrDisableBooleanFieldPrompt.labels
19
+ .enabled,
20
+ value: true,
21
+ },
22
+ {
23
+ name: en_1.lib.configOptions.enableOrDisableBooleanFieldPrompt.labels
24
+ .disabled,
25
+ value: false,
26
+ },
27
+ ],
28
+ defaultAnswer: true,
29
+ });
33
30
  return isEnabled;
34
31
  }
35
32
  async function setAllowUsageTracking({ accountId, allowUsageTracking, }) {
@@ -39,25 +36,29 @@ async function setAllowUsageTracking({ accountId, allowUsageTracking, }) {
39
36
  isEnabled = allowUsageTracking;
40
37
  }
41
38
  else {
42
- isEnabled = await enableOrDisableUsageTracking();
39
+ isEnabled = await enableOrDisableBooleanFieldPrompt(en_1.lib.configOptions.setAllowUsageTracking.fieldName);
43
40
  }
44
41
  (0, config_1.updateAllowUsageTracking)(isEnabled);
45
- logger_1.logger.success((0, lang_1.i18n)(`commands.config.subcommands.set.options.allowUsageTracking.success`, {
46
- isEnabled: isEnabled.toString(),
47
- }));
42
+ logger_1.uiLogger.success(en_1.lib.configOptions.setAllowUsageTracking.success(isEnabled.toString()));
43
+ }
44
+ async function setAllowAutoUpdates({ accountId, allowAutoUpdates, }) {
45
+ (0, usageTracking_1.trackCommandUsage)('config-set-allow-auto-updates', undefined, accountId);
46
+ let isEnabled;
47
+ if (typeof allowAutoUpdates === 'boolean') {
48
+ isEnabled = allowAutoUpdates;
49
+ }
50
+ else {
51
+ isEnabled = await enableOrDisableBooleanFieldPrompt(en_1.lib.configOptions.setAllowAutoUpdates.fieldName);
52
+ }
53
+ (0, config_1.updateAllowAutoUpdates)(isEnabled);
54
+ logger_1.uiLogger.success(en_1.lib.configOptions.setAllowAutoUpdates.success(isEnabled.toString()));
48
55
  }
49
56
  const ALL_CMS_PUBLISH_MODES = Object.values(files_1.CMS_PUBLISH_MODE);
50
57
  async function selectCmsPublishMode() {
51
- const { cmsPublishMode } = await (0, promptUtils_1.promptUser)([
52
- {
53
- type: 'list',
54
- name: 'cmsPublishMode',
55
- pageSize: 20,
56
- message: (0, lang_1.i18n)(`commands.config.subcommands.set.options.defaultMode.promptMessage`),
57
- choices: ALL_CMS_PUBLISH_MODES,
58
- default: files_1.CMS_PUBLISH_MODE.publish,
59
- },
60
- ]);
58
+ const cmsPublishMode = await (0, promptUtils_1.listPrompt)(en_1.lib.configOptions.setDefaultCmsPublishMode.promptMessage, {
59
+ choices: ALL_CMS_PUBLISH_MODES,
60
+ defaultAnswer: files_1.CMS_PUBLISH_MODE.publish,
61
+ });
61
62
  return cmsPublishMode;
62
63
  }
63
64
  async function setDefaultCmsPublishMode({ accountId, defaultCmsPublishMode, }) {
@@ -71,21 +72,17 @@ async function setDefaultCmsPublishMode({ accountId, defaultCmsPublishMode, }) {
71
72
  newDefault = defaultCmsPublishMode;
72
73
  }
73
74
  else {
74
- logger_1.logger.error((0, lang_1.i18n)(`commands.config.subcommands.set.options.defaultMode.error`, {
75
- validModes: (0, text_1.commaSeparatedValues)(ALL_CMS_PUBLISH_MODES),
76
- }));
75
+ logger_1.uiLogger.error(en_1.lib.configOptions.setDefaultCmsPublishMode.error((0, text_1.commaSeparatedValues)(ALL_CMS_PUBLISH_MODES)));
77
76
  newDefault = await selectCmsPublishMode();
78
77
  }
79
78
  (0, config_1.updateDefaultCmsPublishMode)(newDefault);
80
- logger_1.logger.success((0, lang_1.i18n)(`commands.config.subcommands.set.options.defaultMode.success`, {
81
- mode: newDefault,
82
- }));
79
+ logger_1.uiLogger.success(en_1.lib.configOptions.setDefaultCmsPublishMode.success(newDefault));
83
80
  }
84
81
  async function enterTimeout() {
85
82
  const { timeout } = await (0, promptUtils_1.promptUser)([
86
83
  {
87
84
  name: 'timeout',
88
- message: (0, lang_1.i18n)(`commands.config.subcommands.set.options.httpTimeout.promptMessage`),
85
+ message: en_1.lib.configOptions.setHttpTimeout.promptMessage,
89
86
  type: 'input',
90
87
  default: 30000,
91
88
  },
@@ -102,7 +99,5 @@ async function setHttpTimeout({ accountId, httpTimeout, }) {
102
99
  newHttpTimeout = httpTimeout;
103
100
  }
104
101
  (0, config_1.updateHttpTimeout)(newHttpTimeout);
105
- logger_1.logger.success((0, lang_1.i18n)(`commands.config.subcommands.set.options.httpTimeout.success`, {
106
- timeout: newHttpTimeout,
107
- }));
102
+ logger_1.uiLogger.success(en_1.lib.configOptions.setHttpTimeout.success(newHttpTimeout));
108
103
  }
@@ -78,3 +78,9 @@ export declare const FEATURES: {
78
78
  readonly UNIFIED_THEME_PREVIEW: "cms:react:unifiedThemePreview";
79
79
  readonly UNIFIED_APPS: "Developers:UnifiedApps:PrivateBeta";
80
80
  };
81
+ export declare const LOCAL_DEV_UI_WEBSOCKET_MESSAGE_TYPES: {
82
+ readonly UPLOAD: "upload";
83
+ readonly INSTALL_DEPS: "installDeps";
84
+ readonly APP_INSTALLED: "appInstalled";
85
+ readonly UPDATE_PROJECT_NODES: "updateProjectNodes";
86
+ };
package/lib/constants.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.FEATURES = exports.APP_AUTH_TYPES = exports.APP_DISTRIBUTION_TYPES = exports.IR_COMPONENT_TYPES = exports.PLATFORM_VERSION_ERROR_TYPES = exports.PROJECT_COMPONENT_TYPES = exports.PROJECT_TASK_TYPES = exports.PROJECT_ERROR_TYPES = exports.PROJECT_DEPLOY_TEXT = exports.PROJECT_BUILD_TEXT = exports.PROJECT_DEPLOY_STATES = exports.PROJECT_BUILD_STATES = exports.PROJECT_CONFIG_FILE = exports.DEFAULT_POLLING_DELAY = exports.MARKETPLACE_FOLDER = exports.HUBSPOT_FOLDER = exports.FEEDBACK_INTERVAL = exports.DEFAULT_PROJECT_TEMPLATE_BRANCH = exports.HUBSPOT_PROJECT_COMPONENTS_GITHUB_PATH = void 0;
3
+ exports.LOCAL_DEV_UI_WEBSOCKET_MESSAGE_TYPES = exports.FEATURES = exports.APP_AUTH_TYPES = exports.APP_DISTRIBUTION_TYPES = exports.IR_COMPONENT_TYPES = exports.PLATFORM_VERSION_ERROR_TYPES = exports.PROJECT_COMPONENT_TYPES = exports.PROJECT_TASK_TYPES = exports.PROJECT_ERROR_TYPES = exports.PROJECT_DEPLOY_TEXT = exports.PROJECT_BUILD_TEXT = exports.PROJECT_DEPLOY_STATES = exports.PROJECT_BUILD_STATES = exports.PROJECT_CONFIG_FILE = exports.DEFAULT_POLLING_DELAY = exports.MARKETPLACE_FOLDER = exports.HUBSPOT_FOLDER = exports.FEEDBACK_INTERVAL = exports.DEFAULT_PROJECT_TEMPLATE_BRANCH = exports.HUBSPOT_PROJECT_COMPONENTS_GITHUB_PATH = void 0;
4
4
  exports.HUBSPOT_PROJECT_COMPONENTS_GITHUB_PATH = 'HubSpot/hubspot-project-components';
5
5
  exports.DEFAULT_PROJECT_TEMPLATE_BRANCH = 'main';
6
6
  exports.FEEDBACK_INTERVAL = 10;
@@ -73,3 +73,9 @@ exports.FEATURES = {
73
73
  UNIFIED_THEME_PREVIEW: 'cms:react:unifiedThemePreview',
74
74
  UNIFIED_APPS: 'Developers:UnifiedApps:PrivateBeta',
75
75
  };
76
+ exports.LOCAL_DEV_UI_WEBSOCKET_MESSAGE_TYPES = {
77
+ UPLOAD: 'upload',
78
+ INSTALL_DEPS: 'installDeps',
79
+ APP_INSTALLED: 'appInstalled',
80
+ UPDATE_PROJECT_NODES: 'updateProjectNodes',
81
+ };
@@ -1,8 +1,3 @@
1
- export declare function isGloballyInstalled(command: string): Promise<boolean>;
2
- export declare function getLatestCliVersion(): Promise<{
3
- latest: string;
4
- next: string;
5
- }>;
6
1
  export declare function installPackages({ packages, installLocations, }: {
7
2
  packages?: string[];
8
3
  installLocations?: string[];