@hubspot/cli 7.4.4-experimental.0 → 7.4.5-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 (176) 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 +104 -0
  9. package/commands/account/info.js +38 -4
  10. package/commands/account/list.js +23 -5
  11. package/commands/account/remove.js +36 -2
  12. package/commands/account/removeOverride.d.ts +10 -0
  13. package/commands/account/removeOverride.js +76 -0
  14. package/commands/account/use.js +25 -3
  15. package/commands/account.js +7 -2
  16. package/commands/app/migrate.d.ts +4 -5
  17. package/commands/app/migrate.js +19 -8
  18. package/commands/auth.js +14 -11
  19. package/commands/cms/lighthouseScore.js +6 -2
  20. package/commands/cms.js +1 -2
  21. package/commands/completion.js +2 -3
  22. package/commands/config/migrate.d.ts +10 -0
  23. package/commands/config/migrate.js +84 -0
  24. package/commands/config/set.d.ts +10 -0
  25. package/commands/config/set.js +34 -29
  26. package/commands/config.d.ts +4 -1
  27. package/commands/config.js +45 -11
  28. package/commands/create/api-sample.js +3 -1
  29. package/commands/create/website-theme.js +1 -1
  30. package/commands/create.js +7 -8
  31. package/commands/customObject/schema/delete.js +4 -1
  32. package/commands/customObject/schema/fetch-all.js +2 -1
  33. package/commands/customObject/schema/fetch.js +2 -1
  34. package/commands/customObject.js +3 -4
  35. package/commands/doctor.js +5 -6
  36. package/commands/feedback.js +7 -8
  37. package/commands/fetch.js +6 -7
  38. package/commands/filemanager.js +1 -2
  39. package/commands/function.js +1 -2
  40. package/commands/hubdb/clear.js +5 -6
  41. package/commands/hubdb/create.js +7 -8
  42. package/commands/hubdb/delete.js +8 -7
  43. package/commands/hubdb/fetch.js +4 -5
  44. package/commands/hubdb.js +1 -2
  45. package/commands/init.js +18 -20
  46. package/commands/lint.js +3 -4
  47. package/commands/list.js +5 -6
  48. package/commands/logs.js +12 -13
  49. package/commands/module/marketplace-validate.js +5 -6
  50. package/commands/module.js +1 -3
  51. package/commands/mv.js +4 -5
  52. package/commands/open.js +4 -5
  53. package/commands/project/add.js +19 -15
  54. package/commands/project/cloneApp.d.ts +5 -1
  55. package/commands/project/cloneApp.js +25 -20
  56. package/commands/project/create.js +19 -15
  57. package/commands/project/deploy.js +19 -17
  58. package/commands/project/dev/deprecatedFlow.js +32 -25
  59. package/commands/project/dev/index.js +15 -11
  60. package/commands/project/dev/unifiedFlow.js +10 -11
  61. package/commands/project/download.js +10 -11
  62. package/commands/project/installDeps.d.ts +9 -1
  63. package/commands/project/installDeps.js +46 -31
  64. package/commands/project/listBuilds.js +18 -14
  65. package/commands/project/logs.d.ts +13 -1
  66. package/commands/project/logs.js +72 -63
  67. package/commands/project/migrate.d.ts +11 -0
  68. package/commands/project/migrate.js +67 -0
  69. package/commands/project/migrateApp.d.ts +4 -4
  70. package/commands/project/migrateApp.js +7 -5
  71. package/commands/project/open.js +15 -8
  72. package/commands/project/upload.d.ts +12 -0
  73. package/commands/project/upload.js +69 -50
  74. package/commands/project/watch.js +25 -7
  75. package/commands/project.js +3 -2
  76. package/commands/remove.js +7 -5
  77. package/commands/sandbox/create.js +10 -11
  78. package/commands/sandbox/delete.js +18 -19
  79. package/commands/sandbox.js +1 -2
  80. package/commands/secret/addSecret.js +5 -6
  81. package/commands/secret/deleteSecret.js +12 -9
  82. package/commands/secret/listSecret.js +3 -4
  83. package/commands/secret/updateSecret.js +9 -8
  84. package/commands/secret.js +1 -2
  85. package/commands/theme/generate-selectors.js +5 -6
  86. package/commands/theme/marketplace-validate.js +5 -6
  87. package/commands/theme/preview.js +16 -16
  88. package/commands/theme.js +1 -2
  89. package/commands/upload.js +23 -24
  90. package/commands/watch.js +18 -19
  91. package/lang/en.d.ts +2797 -0
  92. package/lang/en.js +2652 -3300
  93. package/lang/en.lyaml +97 -43
  94. package/lib/accountTypes.d.ts +1 -0
  95. package/lib/accountTypes.js +12 -0
  96. package/lib/app/migrate.d.ts +10 -4
  97. package/lib/app/migrate.js +188 -92
  98. package/lib/app/migrate_legacy.d.ts +2 -2
  99. package/lib/app/migrate_legacy.js +10 -7
  100. package/lib/buildAccount.d.ts +1 -2
  101. package/lib/buildAccount.js +7 -5
  102. package/lib/commonOpts.d.ts +2 -3
  103. package/lib/commonOpts.js +12 -2
  104. package/lib/configMigrate.d.ts +2 -0
  105. package/lib/configMigrate.js +104 -0
  106. package/lib/constants.d.ts +4 -0
  107. package/lib/constants.js +5 -1
  108. package/lib/dependencyManagement.js +2 -2
  109. package/lib/doctor/Diagnosis.d.ts +1 -2
  110. package/lib/doctor/Diagnosis.js +10 -6
  111. package/lib/doctor/DiagnosticInfoBuilder.d.ts +2 -1
  112. package/lib/doctor/DiagnosticInfoBuilder.js +10 -9
  113. package/lib/doctor/Doctor.d.ts +1 -0
  114. package/lib/doctor/Doctor.js +18 -0
  115. package/lib/hasFeature.d.ts +3 -1
  116. package/lib/middleware/__test__/configMiddleware.test.d.ts +1 -0
  117. package/lib/middleware/__test__/configMiddleware.test.js +194 -0
  118. package/lib/middleware/__test__/gitMiddleware.test.d.ts +1 -0
  119. package/lib/middleware/__test__/gitMiddleware.test.js +76 -0
  120. package/lib/middleware/__test__/notificationsMiddleware.test.d.ts +1 -0
  121. package/lib/middleware/__test__/notificationsMiddleware.test.js +10 -0
  122. package/lib/middleware/__test__/requestMiddleware.test.d.ts +1 -0
  123. package/lib/middleware/__test__/requestMiddleware.test.js +20 -0
  124. package/lib/middleware/__test__/utils.test.d.ts +1 -0
  125. package/lib/middleware/__test__/utils.test.js +53 -0
  126. package/lib/middleware/__test__/yargsChecksMiddleware.test.d.ts +1 -0
  127. package/lib/middleware/__test__/yargsChecksMiddleware.test.js +81 -0
  128. package/lib/middleware/configMiddleware.d.ts +13 -0
  129. package/lib/middleware/configMiddleware.js +116 -0
  130. package/lib/middleware/fireAlarmMiddleware.d.ts +4 -0
  131. package/lib/middleware/fireAlarmMiddleware.js +137 -0
  132. package/lib/middleware/gitMiddleware.d.ts +2 -0
  133. package/lib/middleware/gitMiddleware.js +14 -0
  134. package/lib/middleware/notificationsMiddleware.d.ts +1 -0
  135. package/lib/middleware/notificationsMiddleware.js +38 -0
  136. package/lib/middleware/requestMiddleware.d.ts +1 -0
  137. package/lib/middleware/requestMiddleware.js +11 -0
  138. package/lib/middleware/utils.d.ts +8 -0
  139. package/lib/middleware/utils.js +17 -0
  140. package/lib/middleware/yargsChecksMiddleware.d.ts +4 -0
  141. package/lib/middleware/yargsChecksMiddleware.js +24 -0
  142. package/lib/projects/ProjectLogsManager.d.ts +1 -1
  143. package/lib/projects/ProjectLogsManager.js +15 -20
  144. package/lib/projects/buildAndDeploy.js +15 -26
  145. package/lib/projects/config.d.ts +9 -0
  146. package/lib/projects/config.js +79 -0
  147. package/lib/projects/create.js +4 -5
  148. package/lib/projects/ensureProjectExists.d.ts +11 -0
  149. package/lib/projects/ensureProjectExists.js +97 -0
  150. package/lib/{DevServerManager.d.ts → projects/localDev/DevServerManager.d.ts} +1 -1
  151. package/lib/{DevServerManager.js → projects/localDev/DevServerManager.js} +5 -6
  152. package/lib/{DevServerManagerV2.d.ts → projects/localDev/DevServerManagerV2.d.ts} +1 -1
  153. package/lib/{DevServerManagerV2.js → projects/localDev/DevServerManagerV2.js} +3 -4
  154. package/lib/{LocalDevManager.d.ts → projects/localDev/LocalDevManager.d.ts} +1 -1
  155. package/lib/{LocalDevManager.js → projects/localDev/LocalDevManager.js} +42 -76
  156. package/lib/{LocalDevManagerV2.d.ts → projects/localDev/LocalDevManagerV2.d.ts} +2 -2
  157. package/lib/{LocalDevManagerV2.js → projects/localDev/LocalDevManagerV2.js} +37 -70
  158. package/lib/{localDev.d.ts → projects/localDev/helpers.d.ts} +4 -3
  159. package/lib/{localDev.js → projects/localDev/helpers.js} +72 -99
  160. package/lib/projects/ui.d.ts +1 -0
  161. package/lib/projects/ui.js +15 -0
  162. package/lib/projects/upload.d.ts +1 -1
  163. package/lib/projects/upload.js +9 -30
  164. package/lib/projects/urls.d.ts +1 -0
  165. package/lib/projects/urls.js +6 -0
  166. package/lib/projects/watch.js +18 -15
  167. package/lib/prompts/projectNamePrompt.js +2 -2
  168. package/lib/prompts/promptUtils.d.ts +1 -1
  169. package/lib/ui/SpinniesManager.d.ts +1 -1
  170. package/lib/ui/index.d.ts +1 -0
  171. package/lib/ui/index.js +5 -0
  172. package/lib/ui/spinniesUtils.d.ts +5 -5
  173. package/package.json +7 -6
  174. package/types/Yargs.d.ts +0 -10
  175. package/lib/projects/index.d.ts +0 -20
  176. 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,52 @@ 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
+ accountNotFound: "The specified account could not be found in the config file {{ configPath }}"
43
+ options:
44
+ account:
45
+ describe: "Name or ID of the account to create an override file for."
46
+ examples:
47
+ default: "Create a new default account override file ({{ hsAccountFileName }}) in the current working directory"
48
+ idBased: "Create a new default account override file ({{ hsAccountFileName }}) in the current working directory, using the account with accountId \"1234567\""
49
+ nameBased: "Create a new default account override file ({{ hsAccountFileName }}) in the current working directory, using the account with name \"MyAccount\""
50
+ removeOverride:
51
+ describe: "Remove the default account override file ({{ overrideFile }}) from the current working directory."
52
+ accountOverride: "There is an account override file at {{ overrideFilePath }} associated with account \"{{ accountOverride }}\"."
53
+ prompts:
54
+ deleteOverrideFile: "Delete account override file?"
55
+ success: "Removed the default account override file."
56
+ noOverrideFile: "No default account override file found in the current working directory. No action required."
57
+ options:
58
+ force:
59
+ describe: "Skip confirmation prompt when removing the override file"
21
60
  list:
22
- accounts: "{{#bold}}Accounts{{/bold}}:"
23
- defaultAccount: "{{#bold}}Default account{{/bold}}: {{ account }}"
24
61
  describe: "List names of accounts defined in config."
25
- configPath: "{{#bold}}Config path{{/bold}}: {{ configPath }}"
62
+ accounts: "{{#bold}}Accounts{{/bold}}:"
63
+ defaultAccountTitle: "{{#bold}}Default Account{{/bold}}"
64
+ defaultAccount: "Account: {{ account }}"
65
+ configPath: "Source: {{ configPath }}"
66
+ overrideFilePathTitle: "{{#bold}}Default Account Override{{/bold}}"
67
+ overrideFilePath: "Source: {{ overrideFilePath }}"
68
+ overrideAccount: "Account: {{ account }}"
26
69
  labels:
27
70
  accountId: "Account ID"
28
71
  authType: "Auth Type"
@@ -40,6 +83,8 @@ en:
40
83
  describe: "Set the Hubspot account to use as the default account. The default account can be overridden with the \"--account\" option."
41
84
  errors:
42
85
  accountNotFound: "The account \"{{ specifiedAccount }}\" could not be found in {{ configPath }}"
86
+ accountOverride: "This project currently has an account override set: \"{{ accountOverride }}\". Account \"{{accountOverride}}\" will continue to act as the default account for this project."
87
+ accountOverrideCommands: "Use {{ createOverrideCommand }} to change override accounts, or {{ removeOverrideCommand }} to remove the override and use your default account."
43
88
  examples:
44
89
  default: "Select a HubSpot account to use as the default account"
45
90
  idBased: "Set the default account to the account in the config with accountId equal to \"1234567\""
@@ -55,6 +100,7 @@ en:
55
100
  logs:
56
101
  replaceDefaultAccount: "The removed account was the default account."
57
102
  prompts:
103
+ deleteOverrideFile: "Delete the override file ({{ overrideFilePath }}) associated with {{ accountName }}?"
58
104
  selectAccountToRemove: "Select an account to remove from the config"
59
105
  errors:
60
106
  accountNotFound: "The account \"{{ specifiedAccount }}\" could not be found in {{ configPath }}"
@@ -70,6 +116,12 @@ en:
70
116
  info:
71
117
  accountId: "{{#bold}}Account ID{{/bold}}: {{ accountId }}"
72
118
  describe: "Print information about the default account, or about the account specified with the \"account\" option."
119
+ defaultAccountTitle: "{{#bold}}Default Account{{/bold}}"
120
+ defaultAccount: "Account: {{ account }}"
121
+ configPath: "Source: {{ configPath }}"
122
+ overrideFilePathTitle: "{{#bold}}Default Account Override{{/bold}}"
123
+ overrideFilePath: "Source: {{ overrideFilePath }}"
124
+ overrideAccount: "Account: {{ account }}"
73
125
  errors:
74
126
  notUsingPersonalAccessKey: "This command currently only supports fetching scopes for the personal access key auth type."
75
127
  options:
@@ -92,13 +144,15 @@ en:
92
144
  confirm:
93
145
  one: "Remove 1 inactive account from the CLI config?"
94
146
  other: "Remove {{ count }} inactive accounts from the CLI config?"
147
+ defaultAccountOverride: "\n(This will also delete the default account override file at {{ overrideFilePath }})"
148
+ replaceDefaultAccount: "The default account was removed."
95
149
  removeSuccess: "Removed {{ accountName }} from the CLI config."
96
150
  auth:
97
151
  describe: "Configure authentication for your HubSpot account."
98
152
  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
153
  errors:
100
- noConfigFileFound: "No config file was found. To create a new config file, use the \"hs init\" command."
101
154
  unsupportedAuthType: "Unsupported auth type: {{ type }}. The only supported authentication protocols are {{ supportedProtocols }}."
155
+ globalConfigFileExists: "A global config file exists at {{ configPath }}. To authorize an account, please use {{ authCommand }}."
102
156
  options:
103
157
  authType:
104
158
  describe: "Authentication method"
@@ -109,6 +163,16 @@ en:
109
163
  config:
110
164
  describe: "Commands for managing the CLI config file."
111
165
  subcommands:
166
+ migrate:
167
+ describe: "Migrate from the deprecated {{ deprecatedConfigPath }} file to the new global config file at {{ globalConfigPath }}."
168
+ migrationAlreadyCompleted: "No {{ deprecatedConfigPath }} deprecated configuration file found. No migration necessary."
169
+ errors:
170
+ configNotFound: "A configuration file at {{ configPath }} could not be found. Please try again with a valid file path."
171
+ options:
172
+ 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."
173
+ examples:
174
+ default: "Migrate from the deprecated {{ deprecatedConfigPath }} file to the new global config file at {{ globalConfigPath }}"
175
+ configFlag: "Migrate a specific config file (specified with the config flag) to the new global config file at {{ globalConfigPath }}"
112
176
  set:
113
177
  describe: "Set various configuration options within the hubspot.config.yml file."
114
178
  promptMessage: "Select a config option to update"
@@ -456,8 +520,6 @@ en:
456
520
  describe: "Authentication method"
457
521
  account:
458
522
  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
523
  success:
462
524
  configFileCreated: "Created config file \"{{ configPath }}\""
463
525
  configFileUpdated: "Connected account \"{{ account }}\" using \"{{ authType }}\" and set it as the default account"
@@ -465,7 +527,7 @@ en:
465
527
  updateConfig: "To update an existing config file, use the \"hs auth\" command."
466
528
  errors:
467
529
  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."
530
+ globalConfigFileExists: "A global config file already exists at {{ configPath }}. To specify a new local config file, delete the existing one and try again."
469
531
  lint:
470
532
  issuesFound: "{{ count }} issues found."
471
533
  groupName: "Linting {{ path }}"
@@ -568,7 +630,7 @@ en:
568
630
  name:
569
631
  describe: "Project name (cannot be changed)"
570
632
  header:
571
- text: "Migrate an app to the projects framework"
633
+ 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
634
  link: "Learn more about migrating apps to the projects framework"
573
635
  deprecationWarning: "The {{ oldCommand }} command is deprecated and will be removed. Use {{ newCommand }} going forward."
574
636
  migrationStatus:
@@ -586,42 +648,15 @@ en:
586
648
  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
649
  createAppPrompt: "Proceed with migrating this app to a project component (this process can't be aborted)?"
588
650
  projectDetailsLink: "View project details in your developer account"
589
- componentsToBeMigrated: "The following component types will be migrated: {{ components }}"
651
+ componentsToBeMigrated: "The following features will be migrated: {{ components }}"
590
652
  componentsThatWillNotBeMigrated: "[NOTE] These component types are not yet supported for migration but will be available later: {{ components }}"
591
653
  errors:
592
- noApps: "No apps found in account {{ accountId }}"
593
- noAppsEligible: "No apps in account {{ accountId }} are currently migratable"
654
+ noAppsForProject: "No apps associated with project {{ projectName }}"
594
655
  noAccountConfig: "There is no account associated with {{ accountId }} in the config file. Please choose another account and try again, or authenticate {{ accountId }} using {{ authCommand }}."
595
- invalidAccountTypeTitle: "{{#bold}}Developer account not targeted{{/bold}}"
596
- 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."
597
656
  projectAlreadyExists: "A project with name {{ projectName }} already exists. Please choose another name."
598
657
  invalidApp: "Could not migrate appId {{ appId }}. This app cannot be migrated at this time. Please choose another public app."
599
- appWithAppIdNotFound: "Could not find an app with the id {{ appId }} "
600
658
  migrationFailed: 'Migration Failed'
601
- prompt:
602
- chooseApp: 'Which app would you like to migrate?'
603
- inputName: '[--name] What would you like to name the project?'
604
- inputDest: '[--dest] Where would you like to save the project?'
605
- uidForComponent: 'What UID would you like to use for {{ componentName }}?'
606
- proceed: 'Would you like to proceed?'
607
- spinners:
608
- beginningMigration: "Beginning migration"
609
- migrationStarted: "Migration started"
610
- unableToStartMigration: "Unable to begin migration"
611
- finishingMigration: "Wrapping up migration"
612
- migrationComplete: "Migration completed"
613
- migrationFailed: "Migration failed"
614
- downloadingProjectContents: "Downloading migrated project files"
615
- downloadingProjectContentsComplete: "Migrated project files downloaded"
616
- downloadingProjectContentsFailed: "Unable to download migrated project files"
617
- copyingProjectFiles: "Copying migrated project files"
618
- copyingProjectFilesComplete: "Migrated project files copied"
619
- copyingProjectFilesFailed: "Unable to copy migrated project files"
620
- unmigratableReasons:
621
- upToDate: 'App is already up to date'
622
- isPrivateApp: 'Private apps are not currently migratable'
623
- listedInMarketplace: 'Listed apps are not currently migratable'
624
- generic: "Unable to migrate app: {{ reasonCode }}"
659
+ 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 }}'
625
660
  cloneApp:
626
661
  describe: "Clone a public app using the projects framework."
627
662
  examples:
@@ -774,6 +809,7 @@ en:
774
809
  uploadFailed: "Failed to upload file \"{{ filePath }}\" to \"{{ remotePath }}\""
775
810
  deleteFileFailed: "Failed to delete file \"{{ remotePath }}\""
776
811
  deleteFolderFailed: "Failed to delete folder \"{{ remotePath }}\""
812
+ v3ApiError: "{{ command }} is not supported for platform version '{{ platformVersion}}', use {{ newCommand }} instead to develop locally. {{ linkToDocs }}"
777
813
  download:
778
814
  describe: "Download your project files from HubSpot."
779
815
  examples:
@@ -1160,7 +1196,7 @@ en:
1160
1196
  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\"]."
1161
1197
  validateProjectConfig:
1162
1198
  configNotFound: "Unable to locate a project configuration file. Try running again from a project directory, or run {{ createCommand }} to create a new project."
1163
- configMissingFields: "The project configuruation file is missing required fields."
1199
+ configMissingFields: "The project configuration file is missing required fields."
1164
1200
  srcDirNotFound: "Project source directory {{#bold}}{{ srcDir }}{{/bold}} could not be found in {{#bold}}{{ projectDir }}{{/bold}}."
1165
1201
  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\""
1166
1202
  ensureProjectExists:
@@ -1197,6 +1233,9 @@ en:
1197
1233
  compressed: "Project files compressed: {{ byteCount }} bytes"
1198
1234
  compressing: "Compressing build files to \"{{ path }}\""
1199
1235
  fileFiltered: "Ignore rule triggered for \"{{ filename }}\""
1236
+ middleware:
1237
+ fireAlarm:
1238
+ failedToLoadBoxen: "Failed to load boxen util."
1200
1239
  ui:
1201
1240
  betaTag: "{{#bold}}[BETA]{{/bold}}"
1202
1241
  betaWarning:
@@ -1217,11 +1256,14 @@ en:
1217
1256
  command: "--account"
1218
1257
  message: "Use the {{ command }} option with any command to override the default account"
1219
1258
  accountsListCommand:
1220
- command: hs accounts list
1259
+ command: "hs account list"
1221
1260
  message: "Run {{ command }} to see a list of configured HubSpot accounts"
1222
1261
  accountsUseCommand:
1223
- command: "hs accounts use"
1262
+ command: "hs account use"
1224
1263
  message: "Run {{ command }} to set the Hubspot account that the CLI will target by default"
1264
+ accountAuthCommand:
1265
+ command: "hs account auth"
1266
+ message: "Run {{ command }} to connect the CLI to additional HubSpot accounts"
1225
1267
  authCommand:
1226
1268
  command: "hs auth"
1227
1269
  message: "Run {{ command }} to connect the CLI to additional HubSpot accounts"
@@ -1286,6 +1328,13 @@ en:
1286
1328
  describe: "Use environment variable config"
1287
1329
  debug:
1288
1330
  describe: "Set log level to debug"
1331
+ 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"
1333
+ 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"
1335
+ migrationSuccess: "The deprecated config file has been migrated to the new global config file at {{ globalConfigPath }}."
1336
+ mergeSuccess: "The deprecated config file has been merged with the global config file at {{ globalConfigPath }}."
1337
+ skippedExistingAccounts: "\nThe following accounts were not merged, because they already exist in the global config: {{ skippedAccountIds }}.\n"
1289
1338
  prompts:
1290
1339
  projectDevTargetAccountPrompt:
1291
1340
  createNewSandboxOption: "<Test on a new development sandbox>"
@@ -1295,7 +1344,7 @@ en:
1295
1344
  sandboxLimit: "Your account reached the limit of {{ limit }} development sandboxes"
1296
1345
  sandboxLimitWithSuggestion: "Your account reached the limit of {{ limit }} development sandboxes. Run {{ authCommand }} to add an existing one to the config."
1297
1346
  developerTestAccountLimit: "Your account reached the limit of {{ limit }} developer test accounts."
1298
- confirmDefaultAccount: "Continue testing on {{#bold}}{{ accountName }} ({{ accountType }}){{/bold}}? (Y/n)"
1347
+ confirmDefaultAccount: "Proceed with local development on {{#bold}}{{ accountName }} [{{ accountType }}]{{/bold}}? (Y/n)"
1299
1348
  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."
1300
1349
  noAccountId: "No account ID found for the selected account. Please try again."
1301
1350
  projectLogsPrompt:
@@ -1572,6 +1621,9 @@ en:
1572
1621
  doctor:
1573
1622
  runningDiagnostics: "Running diagnostics..."
1574
1623
  diagnosticsComplete: "Diagnostics complete"
1624
+ defaultAccountOverrideFileChecks:
1625
+ overrideActive: "Default account override file active: {{ defaultAccountOverrideFile }}"
1626
+ overrideAccountId: "Active account ID: {{ overrideAccountId }}"
1575
1627
  accountChecks:
1576
1628
  active: "Default account active"
1577
1629
  inactive: "Default account isn't active"
@@ -1623,6 +1675,8 @@ en:
1623
1675
  settings:
1624
1676
  httpUseLocalhost: "The setting {{#bold}}httpUseLocalhost{{/bold}} is enabled"
1625
1677
  httpUseLocalhostSecondary: "This setting causes all CLI requests to route to localhost"
1678
+ defaultAccountOverrideFile:
1679
+ header: "Default account override file path:"
1626
1680
  projectConfig:
1627
1681
  header: "Project configuration"
1628
1682
  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;