@hubspot/cli 7.8.0-beta.0 → 7.8.0-beta.1

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 (90) hide show
  1. package/commands/__tests__/project.test.js +2 -0
  2. package/commands/account/auth.js +1 -0
  3. package/commands/auth.js +1 -0
  4. package/commands/feedback.js +1 -1
  5. package/commands/project/__tests__/add.test.js +12 -12
  6. package/commands/project/__tests__/list.test.js +31 -0
  7. package/commands/project/__tests__/migrate.test.js +1 -0
  8. package/commands/project/add.d.ts +2 -2
  9. package/commands/project/add.js +3 -2
  10. package/commands/project/create.js +1 -1
  11. package/commands/project/dev/deprecatedFlow.js +2 -2
  12. package/commands/project/dev/index.js +5 -5
  13. package/commands/project/dev/unifiedFlow.js +6 -3
  14. package/commands/project/download.js +5 -2
  15. package/commands/project/installDeps.d.ts +2 -2
  16. package/commands/project/installDeps.js +1 -0
  17. package/commands/project/list.d.ts +4 -0
  18. package/commands/project/list.js +62 -0
  19. package/commands/project/migrate.js +5 -2
  20. package/commands/project.js +2 -0
  21. package/commands/sandbox/delete.js +5 -2
  22. package/commands/testAccount/create.js +2 -2
  23. package/commands/theme/preview.js +1 -4
  24. package/lang/en.d.ts +49 -14
  25. package/lang/en.js +121 -86
  26. package/lang/en.lyaml +2 -2
  27. package/lib/__tests__/buildAccount.test.js +2 -2
  28. package/lib/app/migrate.js +1 -1
  29. package/lib/buildAccount.d.ts +2 -2
  30. package/lib/buildAccount.js +7 -7
  31. package/lib/configMigrate.js +88 -9
  32. package/lib/constants.d.ts +8 -1
  33. package/lib/constants.js +8 -1
  34. package/lib/doctor/Doctor.js +2 -2
  35. package/lib/errorHandlers/suppressError.js +2 -2
  36. package/lib/middleware/commandTargetingUtils.d.ts +1 -1
  37. package/lib/middleware/commandTargetingUtils.js +16 -20
  38. package/lib/projects/__tests__/AppDevModeInterface.test.js +85 -90
  39. package/lib/projects/__tests__/LocalDevProcess.test.js +6 -5
  40. package/lib/projects/__tests__/LocalDevWebsocketServer.test.js +6 -6
  41. package/lib/projects/__tests__/deploy.test.js +9 -9
  42. package/lib/projects/__tests__/upload.test.js +2 -2
  43. package/lib/projects/add/__tests__/{v3AddComponent.test.js → v2AddComponent.test.js} +35 -35
  44. package/lib/projects/add/{v3AddComponent.d.ts → v2AddComponent.d.ts} +1 -1
  45. package/lib/projects/add/{v3AddComponent.js → v2AddComponent.js} +5 -5
  46. package/lib/projects/create/__tests__/v2.test.d.ts +1 -0
  47. package/lib/projects/create/__tests__/{v3.test.js → v2.test.js} +2 -2
  48. package/lib/projects/create/index.js +2 -2
  49. package/lib/projects/create/{v3.d.ts → v2.d.ts} +3 -3
  50. package/lib/projects/create/{v3.js → v2.js} +3 -3
  51. package/lib/projects/deploy.d.ts +1 -1
  52. package/lib/projects/deploy.js +2 -2
  53. package/lib/projects/localDev/AppDevModeInterface.d.ts +8 -1
  54. package/lib/projects/localDev/AppDevModeInterface.js +106 -86
  55. package/lib/projects/localDev/DevServerManager.d.ts +11 -29
  56. package/lib/projects/localDev/DevServerManager.js +19 -61
  57. package/lib/projects/localDev/DevServerManager_DEPRECATED.d.ts +40 -0
  58. package/lib/projects/localDev/DevServerManager_DEPRECATED.js +120 -0
  59. package/lib/projects/localDev/{LocalDevManager.js → LocalDevManager_DEPRECATED.js} +6 -6
  60. package/lib/projects/localDev/LocalDevProcess.js +3 -2
  61. package/lib/projects/localDev/LocalDevState.d.ts +3 -0
  62. package/lib/projects/localDev/LocalDevState.js +9 -0
  63. package/lib/projects/localDev/LocalDevWebsocketServer.d.ts +4 -0
  64. package/lib/projects/localDev/LocalDevWebsocketServer.js +34 -2
  65. package/lib/projects/localDev/helpers/account.d.ts +1 -1
  66. package/lib/projects/localDev/helpers/account.js +2 -2
  67. package/lib/projects/localDev/helpers/project.js +2 -3
  68. package/lib/projects/localDev/localDevWebsocketServerUtils.d.ts +3 -0
  69. package/lib/projects/localDev/localDevWebsocketServerUtils.js +9 -0
  70. package/lib/projects/urls.d.ts +0 -1
  71. package/lib/projects/urls.js +0 -3
  72. package/lib/prompts/__tests__/downloadProjectPrompt.test.js +1 -0
  73. package/lib/prompts/__tests__/projectAddPrompt.test.js +10 -10
  74. package/lib/prompts/installAppPrompt.d.ts +1 -6
  75. package/lib/prompts/installAppPrompt.js +1 -6
  76. package/lib/prompts/projectAddPrompt.d.ts +2 -2
  77. package/lib/prompts/projectAddPrompt.js +1 -1
  78. package/lib/prompts/projectDevTargetAccountPrompt.js +1 -1
  79. package/lib/theme/__tests__/migrate.test.js +4 -4
  80. package/lib/ui/index.d.ts +4 -0
  81. package/lib/ui/index.js +9 -1
  82. package/lib/ui/uiMessages.d.ts +4 -0
  83. package/lib/ui/uiMessages.js +4 -0
  84. package/mcp-server/tools/project/__tests__/CreateProjectTool.test.js +1 -1
  85. package/package.json +6 -5
  86. package/lib/projects/localDev/DevServerManagerV2.d.ts +0 -22
  87. package/lib/projects/localDev/DevServerManagerV2.js +0 -81
  88. /package/{lib/projects/add/__tests__/v3AddComponent.test.d.ts → commands/project/__tests__/list.test.d.ts} +0 -0
  89. /package/lib/projects/{create/__tests__/v3.test.d.ts → add/__tests__/v2AddComponent.test.d.ts} +0 -0
  90. /package/lib/projects/localDev/{LocalDevManager.d.ts → LocalDevManager_DEPRECATED.d.ts} +0 -0
package/lang/en.js CHANGED
@@ -3,8 +3,8 @@ import { mapToUserFriendlyName } from '@hubspot/project-parsing-lib';
3
3
  import { PLATFORM_VERSIONS } from '@hubspot/local-dev-lib/constants/projects';
4
4
  import { PERSONAL_ACCESS_KEY_AUTH_METHOD } from '@hubspot/local-dev-lib/constants/auth';
5
5
  import { ARCHIVED_HUBSPOT_CONFIG_YAML_FILE_NAME, GLOBAL_CONFIG_PATH, DEFAULT_HUBSPOT_CONFIG_YAML_FILE_NAME, } from '@hubspot/local-dev-lib/constants/config';
6
- import { uiAccountDescription, uiBetaTag, uiCommandReference, uiLink, UI_COLORS, } from '../lib/ui/index.js';
7
- import { getProjectDetailUrl, getProjectSettingsUrl, getLocalDevUiUrl, getAppAllowlistUrl, } from '../lib/projects/urls.js';
6
+ import { uiAccountDescription, uiBetaTag, uiCommandReference, uiLink, UI_COLORS, uiAuthCommandReference, } from '../lib/ui/index.js';
7
+ import { getProjectDetailUrl, getProjectSettingsUrl, getLocalDevUiUrl, } from '../lib/projects/urls.js';
8
8
  import { getProductUpdatesUrl } from '../lib/links.js';
9
9
  import { APP_DISTRIBUTION_TYPES, APP_AUTH_TYPES, PROJECT_CONFIG_FILE, PROJECT_WITH_APP, LEGACY_PUBLIC_APP_FILE, } from '../lib/constants.js';
10
10
  import { getAccountIdentifier } from '@hubspot/local-dev-lib/config/getAccountIdentifier';
@@ -86,7 +86,7 @@ export const commands = {
86
86
  errors: {
87
87
  invalidAccountIdProvided: `--account must be a number.`,
88
88
  failedToUpdateConfig: 'Failed to update the configuration file. Please try again.',
89
- migrationNotConfirmed: `Did not migrate your configuration file. Run ${uiCommandReference('hs auth')} to update your existing config, or use ${uiCommandReference('hs config migrate')} to switch to the new global configuration.`,
89
+ migrationNotConfirmed: `Did not migrate your configuration file. Run ${uiAuthCommandReference()} to update your existing config, or use ${uiCommandReference('hs config migrate')} to switch to the new global configuration.`,
90
90
  mergeNotConfirmed: `Did not merge configuration files. When you are ready to merge the deprecated config file with the global config file, run ${uiCommandReference('hs config migrate')}.`,
91
91
  },
92
92
  success: {
@@ -868,7 +868,7 @@ export const commands = {
868
868
  configFileUpdated: (authType, account) => `Connected account "${account}" using "${authType}" and set it as the default account`,
869
869
  },
870
870
  logs: {
871
- updateConfig: 'To update an existing config file, use the "hs auth" command.',
871
+ updateConfig: `To update an existing config file, use the ${uiAuthCommandReference()} command.`,
872
872
  },
873
873
  errors: {
874
874
  invalidAccountIdProvided: `--account must be a number.`,
@@ -1083,7 +1083,7 @@ export const commands = {
1083
1083
  header: 'HubSpot projects local development',
1084
1084
  placeholderAccountSelection: 'Using default account as target account (for now)',
1085
1085
  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.',
1086
- learnMoreMessageV3: `Learn more about ${uiLink('HubSpot projects local dev', 'https://developers.hubspot.com/docs/developer-tooling/local-development/hubspot-cli/project-commands#start-a-local-development-server')} | ${uiLink('HubSpot account types', 'https://developers.hubspot.com/docs/getting-started/account-types')}`,
1086
+ learnMoreMessageV2: `Learn more about ${uiLink('HubSpot projects local dev', 'https://developers.hubspot.com/docs/developer-tooling/local-development/hubspot-cli/project-commands#start-a-local-development-server')} | ${uiLink('HubSpot account types', 'https://developers.hubspot.com/docs/getting-started/account-types')}`,
1087
1087
  learnMoreMessageLegacy: uiLink('Learn more about the projects local dev server', 'https://developers.hubspot.com/docs/developer-tooling/local-development/hubspot-cli/project-commands#start-a-local-development-server'),
1088
1088
  profileProjectAccountExplanation: (accountId, profileName) => `Using account ${uiAccountDescription(accountId)} from profile ${chalk.bold(profileName)} for project upload`,
1089
1089
  defaultProjectAccountExplanation: (accountId) => `Using default account ${uiAccountDescription(accountId)} for project upload`,
@@ -1094,13 +1094,13 @@ export const commands = {
1094
1094
  },
1095
1095
  errors: {
1096
1096
  noProjectConfig: 'No project detected. Please run this command again from a project directory.',
1097
- noAccount: (accountId) => `An error occurred while reading account ${uiAccountDescription(accountId)} from your config. Run ${uiCommandReference('hs auth')} to re-auth this account.`,
1098
- noAccountsInConfig: `No accounts found in your config. Run ${uiCommandReference('hs auth')} to configure a HubSpot account with the CLI.`,
1097
+ noAccount: (accountId) => `An error occurred while reading account ${uiAccountDescription(accountId)} from your config. Run ${uiAuthCommandReference()} to re-auth this account.`,
1098
+ noAccountsInConfig: `No accounts found in your config. Run ${uiAuthCommandReference()} to configure a HubSpot account with the CLI.`,
1099
1099
  invalidProjectComponents: 'Projects cannot contain both private and public apps. Move your apps to separate projects before attempting local development.',
1100
1100
  noRunnableComponents: `No supported components were found in this project. Run ${uiCommandReference('hs project add')} to see a list of available components and add one to your project.`,
1101
1101
  accountNotCombined: `\nLocal development of unified apps is currently only compatible with accounts that are opted into the unified apps beta. Make sure that this account is opted in or switch accounts using ${uiCommandReference('hs account use')}.`,
1102
1102
  unsupportedAccountFlagLegacy: 'The --project-account and --testing-account flags are not supported for projects with platform versions earlier than 2025.2.',
1103
- unsupportedAccountFlagV3: 'The --account flag is is not supported supported for projects with platform versions 2025.2 and newer. Use --testing-account and --project-account flags to specify accounts to use for local dev',
1103
+ unsupportedAccountFlagV2: 'The --account flag is is not supported supported for projects with platform versions 2025.2 and newer. Use --testing-account and --project-account flags to specify accounts to use for local dev',
1104
1104
  },
1105
1105
  examples: {
1106
1106
  default: 'Start local dev for the current project',
@@ -1442,7 +1442,7 @@ export const commands = {
1442
1442
  uploadFailed: (remotePath, filePath) => `Failed to upload file "${filePath}" to "${remotePath}"`,
1443
1443
  deleteFileFailed: (remotePath) => `Failed to delete file "${remotePath}"`,
1444
1444
  deleteFolderFailed: (remotePath) => `Failed to delete folder "${remotePath}"`,
1445
- v3ApiError: (platformVersion) => `${uiCommandReference('hs project watch')} is not supported for platform version '${platformVersion}' use ${uiCommandReference('hs project dev')} instead to develop locally. ${uiLink('How to develop locally', 'https://developers.hubspot.com/docs/guides/crm/ui-extensions/local-development')}`,
1445
+ v2ApiError: (platformVersion) => `${uiCommandReference('hs project watch')} is not supported for platform version '${platformVersion}' use ${uiCommandReference('hs project dev')} instead to develop locally. ${uiLink('How to develop locally', 'https://developers.hubspot.com/docs/guides/crm/ui-extensions/local-development')}`,
1446
1446
  },
1447
1447
  },
1448
1448
  download: {
@@ -1523,6 +1523,17 @@ export const commands = {
1523
1523
  },
1524
1524
  },
1525
1525
  },
1526
+ list: {
1527
+ describe: 'List uploaded projects that exist in the current target account',
1528
+ projects: `${chalk.bold('Projects')}:`,
1529
+ labels: {
1530
+ name: 'Name',
1531
+ platformVersion: 'Platform Version',
1532
+ },
1533
+ errors: {
1534
+ noProjectsFound: (accountId) => `No projects found for account ${uiAccountDescription(accountId)}`,
1535
+ },
1536
+ },
1526
1537
  },
1527
1538
  remove: {
1528
1539
  describe: 'Delete a file or folder from the HubSpot CMS.',
@@ -1540,9 +1551,9 @@ export const commands = {
1540
1551
  create: {
1541
1552
  describe: 'Create a sandbox account.',
1542
1553
  failure: {
1543
- noAccountConfig: (accountId) => `No account config found for ${uiAccountDescription(accountId)}. Run ${uiCommandReference('hs auth')} to add it.`,
1544
- invalidAccountType: (accountType, accountName) => `Sandboxes must be created from a production account. Your current default account ${chalk.bold(accountName)} is a ${chalk.bold(accountType)}. \n- Run ${uiCommandReference('hs accounts use')} to switch to your default account to your production account. \n- Run ${uiCommandReference('hs auth')} to connect a production account to the HubSpot CLI.\n`,
1545
- noSandboxAccountConfig: (accountId) => `No account config found for ${uiAccountDescription(accountId)}. Run ${uiCommandReference('hs auth')} to add the sandbox account.`,
1554
+ noAccountConfig: (accountId) => `No account config found for ${uiAccountDescription(accountId)}. Run ${uiAuthCommandReference()} to add it.`,
1555
+ invalidAccountType: (accountType, accountName) => `Sandboxes must be created from a production account. Your current default account ${chalk.bold(accountName)} is a ${chalk.bold(accountType)}. \n- Run ${uiCommandReference('hs account use')} to switch to your default account to your production account. \n- Run ${uiAuthCommandReference()} to connect a production account to the HubSpot CLI.\n`,
1556
+ noSandboxAccountConfig: (accountId) => `No account config found for ${uiAccountDescription(accountId)}. Run ${uiAuthCommandReference()} to add the sandbox account.`,
1546
1557
  optionMissing: {
1547
1558
  type: 'Type is required when using --force. Use --type=developer or --type=standard.',
1548
1559
  name: 'Name is required when using --force. Use --name=YourSandboxName.',
@@ -1573,11 +1584,11 @@ export const commands = {
1573
1584
  },
1574
1585
  failure: {
1575
1586
  invalidUser: (accountName, parentAccountName) => `Couldn't create ${chalk.bold(accountName)} because your account has been removed from ${chalk.bold(parentAccountName)} or your permission set doesn't allow you to create the sandbox. To update your permissions, contact a super admin in ${chalk.bold(parentAccountName)}.`,
1576
- limit: (accountName, limit) => `${chalk.bold(accountName)} reached the limit of ${limit} developer sandboxes. \n- To connect a developer sandbox to your HubSpot CLI, run ${chalk.bold('hs auth')} and follow the prompts.`,
1577
- alreadyInConfig: (accountName, limit) => `${chalk.bold(accountName)} reached the limit of ${limit} developer sandboxes. \n- To use an existing developer sandbox, run ${chalk.bold('hs accounts use')}.`,
1587
+ limit: (accountName, limit) => `${chalk.bold(accountName)} reached the limit of ${limit} developer sandboxes. \n- To connect a developer sandbox to your HubSpot CLI, run ${uiAuthCommandReference()} and follow the prompts.`,
1588
+ alreadyInConfig: (accountName, limit) => `${chalk.bold(accountName)} reached the limit of ${limit} developer sandboxes. \n- To use an existing developer sandbox, run ${chalk.bold('hs account use')}.`,
1578
1589
  scopes: {
1579
1590
  message: "The personal access key you provided doesn't include developer sandbox permissions.",
1580
- instructions: (accountName, url) => `To update CLI permissions for "${accountName}": \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes developer sandbox permissions. \n- Update the CLI config for this account by running ${chalk.bold('hs auth')} and entering the new key.\n`,
1591
+ instructions: (accountName, url) => `To update CLI permissions for "${accountName}": \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes developer sandbox permissions. \n- Update the CLI config for this account by running ${uiAuthCommandReference()} and entering the new key.\n`,
1581
1592
  },
1582
1593
  },
1583
1594
  },
@@ -1592,11 +1603,11 @@ export const commands = {
1592
1603
  },
1593
1604
  failure: {
1594
1605
  invalidUser: (accountName, parentAccountName) => `Couldn't create ${chalk.bold(accountName)} because your account has been removed from ${chalk.bold(parentAccountName)} or your permission set doesn't allow you to create the sandbox. To update your permissions, contact a super admin in ${chalk.bold(parentAccountName)}.`,
1595
- limit: (accountName, limit) => `${chalk.bold(accountName)} reached the limit of ${limit} standard sandboxes. \n- To connect a standard sandbox to your HubSpot CLI, run ${chalk.bold('hs auth')} and follow the prompts.`,
1596
- alreadyInConfig: (accountName, limit) => `${chalk.bold(accountName)} reached the limit of ${limit} standard sandboxes. \n- To use an existing standard sandbox, run ${chalk.bold('hs accounts use')}.`,
1606
+ limit: (accountName, limit) => `${chalk.bold(accountName)} reached the limit of ${limit} standard sandboxes. \n- To connect a standard sandbox to your HubSpot CLI, run ${uiAuthCommandReference()} and follow the prompts.`,
1607
+ alreadyInConfig: (accountName, limit) => `${chalk.bold(accountName)} reached the limit of ${limit} standard sandboxes. \n- To use an existing standard sandbox, run ${chalk.bold('hs account use')}.`,
1597
1608
  scopes: {
1598
1609
  message: "The personal access key you provided doesn't include standard sandbox permissions.",
1599
- instructions: (accountName, url) => `To update CLI permissions for "${accountName}": \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes standard sandbox permissions. \n- Update the CLI config for this account by running ${chalk.bold('hs auth')} and entering the new key.\n`,
1610
+ instructions: (accountName, url) => `To update CLI permissions for "${accountName}": \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes standard sandbox permissions. \n- Update the CLI config for this account by running ${uiAuthCommandReference()} and entering the new key.\n`,
1600
1611
  },
1601
1612
  },
1602
1613
  },
@@ -1620,12 +1631,12 @@ export const commands = {
1620
1631
  failure: {
1621
1632
  invalidUser: (account, parentAccount) => `Couldn't delete ${uiAccountDescription(account)} because your account has been removed from ${uiAccountDescription(parentAccount)} or your permission set doesn't allow you to delete the sandbox. To update your permissions, contact a super admin in ${uiAccountDescription(parentAccount)}.`,
1622
1633
  noAccount: 'No account specified. Specify an account by using the --account flag.',
1623
- noSandboxAccounts: `There are no sandboxes connected to the CLI. To add a sandbox, run ${uiCommandReference('hs auth')}.`,
1634
+ noSandboxAccounts: `There are no sandboxes connected to the CLI. To add a sandbox, run ${uiAuthCommandReference()}.`,
1624
1635
  noSandboxAccountId: "This sandbox can't be deleted from the CLI because we could not find the associated sandbox account.",
1625
- noParentAccount: `This sandbox can't be deleted from the CLI because you haven't given the CLI access to its parent account. To do this, run ${uiCommandReference('hs auth')} and add the parent account.`,
1636
+ noParentAccount: `This sandbox can't be deleted from the CLI because you haven't given the CLI access to its parent account. To do this, run ${uiAuthCommandReference()} and add the parent account.`,
1626
1637
  objectNotFound: (account) => `Sandbox ${uiAccountDescription(account)} may have been deleted through the UI. The account has been removed from the config.`,
1627
1638
  noParentPortalAvailable: (command, url) => `This sandbox can't be deleted from the CLI because you haven't given the CLI access to its parent account. To do this, run ${uiCommandReference(command)}. You can also delete the sandbox from the HubSpot management tool: ${chalk.bold(url)}.`,
1628
- invalidKey: (account) => `Your personal access key for account ${uiAccountDescription(account)} is inactive. To re-authenticate, please run ${uiCommandReference('hs auth')}.`,
1639
+ invalidKey: (account) => `Your personal access key for account ${uiAccountDescription(account)} is inactive. To re-authenticate, please run ${uiAuthCommandReference()}.`,
1629
1640
  },
1630
1641
  options: {
1631
1642
  force: {
@@ -1650,7 +1661,7 @@ export const commands = {
1650
1661
  invalidUser: (accountName, parentAccountName) => `Couldn't sync ${chalk.bold(accountName)} because your account has been removed from ${chalk.bold(parentAccountName)} or your permission set doesn't allow you to sync the sandbox. To update your permissions, contact a super admin in ${chalk.bold(parentAccountName)}.`,
1651
1662
  scopes: {
1652
1663
  message: "The personal access key you provided doesn't include sandbox sync permissions.",
1653
- instructions: (accountName, url) => `To update CLI permissions for "${accountName}": \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes sandbox sync permissions. \n- Update the CLI config for this account by running ${chalk.bold('hs auth')} and entering the new key.\n`,
1664
+ instructions: (accountName, url) => `To update CLI permissions for "${accountName}": \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes sandbox sync permissions. \n- Update the CLI config for this account by running ${uiAuthCommandReference()} and entering the new key.\n`,
1654
1665
  },
1655
1666
  },
1656
1667
  confirm: {
@@ -2065,7 +2076,7 @@ export const commands = {
2065
2076
  invalidUser: (secretName, parentAccountName) => `Couldn't add ${chalk.bold(secretName)} because your account has been removed from ${chalk.bold(parentAccountName)} or your permission set doesn't allow you to add secrets. To update your permissions, contact a super admin in ${chalk.bold(parentAccountName)}.`,
2066
2077
  scopes: {
2067
2078
  message: "The personal access key you provided doesn't include secrets permissions.",
2068
- instructions: (secretName, url) => `To update CLI permissions for "${secretName}": \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes secrets permissions. \n- Update the CLI config for this account by running ${chalk.bold('hs auth')} and entering the new key.\n`,
2079
+ instructions: (secretName, url) => `To update CLI permissions for "${secretName}": \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes secrets permissions. \n- Update the CLI config for this account by running ${uiAuthCommandReference()} and entering the new key.\n`,
2069
2080
  },
2070
2081
  },
2071
2082
  },
@@ -2082,7 +2093,7 @@ export const commands = {
2082
2093
  invalidUser: (secretName, parentAccountName) => `Couldn't delete ${chalk.bold(secretName)} because your account has been removed from ${chalk.bold(parentAccountName)} or your permission set doesn't allow you to delete secrets. To update your permissions, contact a super admin in ${chalk.bold(parentAccountName)}.`,
2083
2094
  scopes: {
2084
2095
  message: "The personal access key you provided doesn't include secrets permissions.",
2085
- instructions: (secretName, url) => `To update CLI permissions for "${secretName}": \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes secrets permissions. \n- Update the CLI config for this account by running ${chalk.bold('hs auth')} and entering the new key.\n`,
2096
+ instructions: (secretName, url) => `To update CLI permissions for "${secretName}": \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes secrets permissions. \n- Update the CLI config for this account by running ${uiAuthCommandReference()} and entering the new key.\n`,
2086
2097
  },
2087
2098
  },
2088
2099
  },
@@ -2099,7 +2110,7 @@ export const commands = {
2099
2110
  invalidUser: (parentAccountName) => `Couldn't list secrets because your account has been removed from ${chalk.bold(parentAccountName)} or your permission set doesn't allow you to list secrets. To update your permissions, contact a super admin in ${chalk.bold(parentAccountName)}.`,
2100
2111
  scopes: {
2101
2112
  message: "The personal access key you provided doesn't include secrets permissions.",
2102
- instructions: (url) => `To update CLI permissions: \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes secrets permissions. \n- Update the CLI config for this account by running ${chalk.bold('hs auth')} and entering the new key.\n`,
2113
+ instructions: (url) => `To update CLI permissions: \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes secrets permissions. \n- Update the CLI config for this account by running ${uiAuthCommandReference()} and entering the new key.\n`,
2103
2114
  },
2104
2115
  },
2105
2116
  },
@@ -2118,7 +2129,7 @@ export const commands = {
2118
2129
  invalidUser: (functionName, parentAccountName) => `Couldn't add ${chalk.bold(functionName)} because your account has been removed from ${chalk.bold(parentAccountName)} or your permission set doesn't allow you to add serverless functions. To update your permissions, contact a super admin in ${chalk.bold(parentAccountName)}.`,
2119
2130
  scopes: {
2120
2131
  message: "The personal access key you provided doesn't include serverless function permissions.",
2121
- instructions: (functionName, url) => `To update CLI permissions for "${functionName}": \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes serverless function permissions. \n- Update the CLI config for this account by running ${chalk.bold('hs auth')} and entering the new key.\n`,
2132
+ instructions: (functionName, url) => `To update CLI permissions for "${functionName}": \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes serverless function permissions. \n- Update the CLI config for this account by running ${uiAuthCommandReference()} and entering the new key.\n`,
2122
2133
  },
2123
2134
  },
2124
2135
  },
@@ -2135,7 +2146,7 @@ export const commands = {
2135
2146
  invalidUser: (functionName, parentAccountName) => `Couldn't delete ${chalk.bold(functionName)} because your account has been removed from ${chalk.bold(parentAccountName)} or your permission set doesn't allow you to delete serverless functions. To update your permissions, contact a super admin in ${chalk.bold(parentAccountName)}.`,
2136
2147
  scopes: {
2137
2148
  message: "The personal access key you provided doesn't include serverless function permissions.",
2138
- instructions: (functionName, url) => `To update CLI permissions for "${functionName}": \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes serverless function permissions. \n- Update the CLI config for this account by running ${chalk.bold('hs auth')} and entering the new key.\n`,
2149
+ instructions: (functionName, url) => `To update CLI permissions for "${functionName}": \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes serverless function permissions. \n- Update the CLI config for this account by running ${uiAuthCommandReference()} and entering the new key.\n`,
2139
2150
  },
2140
2151
  },
2141
2152
  },
@@ -2152,7 +2163,7 @@ export const commands = {
2152
2163
  invalidUser: (parentAccountName) => `Couldn't list serverless functions because your account has been removed from ${chalk.bold(parentAccountName)} or your permission set doesn't allow you to list serverless functions. To update your permissions, contact a super admin in ${chalk.bold(parentAccountName)}.`,
2153
2164
  scopes: {
2154
2165
  message: "The personal access key you provided doesn't include serverless function permissions.",
2155
- instructions: (url) => `To update CLI permissions: \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes serverless function permissions. \n- Update the CLI config for this account by running ${chalk.bold('hs auth')} and entering the new key.\n`,
2166
+ instructions: (url) => `To update CLI permissions: \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes serverless function permissions. \n- Update the CLI config for this account by running ${uiAuthCommandReference()} and entering the new key.\n`,
2156
2167
  },
2157
2168
  },
2158
2169
  },
@@ -2171,7 +2182,7 @@ export const commands = {
2171
2182
  invalidUser: (functionName, parentAccountName) => `Couldn't add ${chalk.bold(functionName)} because your account has been removed from ${chalk.bold(parentAccountName)} or your permission set doesn't allow you to add serverless function logs. To update your permissions, contact a super admin in ${chalk.bold(parentAccountName)}.`,
2172
2183
  scopes: {
2173
2184
  message: "The personal access key you provided doesn't include serverless function log permissions.",
2174
- instructions: (functionName, url) => `To update CLI permissions for "${functionName}": \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes serverless function log permissions. \n- Update the CLI config for this account by running ${chalk.bold('hs auth')} and entering the new key.\n`,
2185
+ instructions: (functionName, url) => `To update CLI permissions for "${functionName}": \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes serverless function log permissions. \n- Update the CLI config for this account by running ${uiAuthCommandReference()} and entering the new key.\n`,
2175
2186
  },
2176
2187
  },
2177
2188
  },
@@ -2188,7 +2199,7 @@ export const commands = {
2188
2199
  invalidUser: (functionName, parentAccountName) => `Couldn't delete ${chalk.bold(functionName)} because your account has been removed from ${chalk.bold(parentAccountName)} or your permission set doesn't allow you to delete serverless function logs. To update your permissions, contact a super admin in ${chalk.bold(parentAccountName)}.`,
2189
2200
  scopes: {
2190
2201
  message: "The personal access key you provided doesn't include serverless function log permissions.",
2191
- instructions: (functionName, url) => `To update CLI permissions for "${functionName}": \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes serverless function log permissions. \n- Update the CLI config for this account by running ${chalk.bold('hs auth')} and entering the new key.\n`,
2202
+ instructions: (functionName, url) => `To update CLI permissions for "${functionName}": \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes serverless function log permissions. \n- Update the CLI config for this account by running ${uiAuthCommandReference()} and entering the new key.\n`,
2192
2203
  },
2193
2204
  },
2194
2205
  },
@@ -2205,7 +2216,7 @@ export const commands = {
2205
2216
  invalidUser: (parentAccountName) => `Couldn't list serverless function logs because your account has been removed from ${chalk.bold(parentAccountName)} or your permission set doesn't allow you to list serverless function logs. To update your permissions, contact a super admin in ${chalk.bold(parentAccountName)}.`,
2206
2217
  scopes: {
2207
2218
  message: "The personal access key you provided doesn't include serverless function log permissions.",
2208
- instructions: (url) => `To update CLI permissions: \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes serverless function log permissions. \n- Update the CLI config for this account by running ${chalk.bold('hs auth')} and entering the new key.\n`,
2219
+ instructions: (url) => `To update CLI permissions: \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes serverless function log permissions. \n- Update the CLI config for this account by running ${uiAuthCommandReference()} and entering the new key.\n`,
2209
2220
  },
2210
2221
  },
2211
2222
  },
@@ -2224,7 +2235,7 @@ export const commands = {
2224
2235
  invalidUser: (functionName, parentAccountName) => `Couldn't add ${chalk.bold(functionName)} because your account has been removed from ${chalk.bold(parentAccountName)} or your permission set doesn't allow you to add serverless function metrics. To update your permissions, contact a super admin in ${chalk.bold(parentAccountName)}.`,
2225
2236
  scopes: {
2226
2237
  message: "The personal access key you provided doesn't include serverless function metric permissions.",
2227
- instructions: (functionName, url) => `To update CLI permissions for "${functionName}": \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes serverless function metric permissions. \n- Update the CLI config for this account by running ${chalk.bold('hs auth')} and entering the new key.\n`,
2238
+ instructions: (functionName, url) => `To update CLI permissions for "${functionName}": \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes serverless function metric permissions. \n- Update the CLI config for this account by running ${uiAuthCommandReference()} and entering the new key.\n`,
2228
2239
  },
2229
2240
  },
2230
2241
  },
@@ -2241,7 +2252,7 @@ export const commands = {
2241
2252
  invalidUser: (functionName, parentAccountName) => `Couldn't delete ${chalk.bold(functionName)} because your account has been removed from ${chalk.bold(parentAccountName)} or your permission set doesn't allow you to delete serverless function metrics. To update your permissions, contact a super admin in ${chalk.bold(parentAccountName)}.`,
2242
2253
  scopes: {
2243
2254
  message: "The personal access key you provided doesn't include serverless function metric permissions.",
2244
- instructions: (functionName, url) => `To update CLI permissions for "${functionName}": \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes serverless function metric permissions. \n- Update the CLI config for this account by running ${chalk.bold('hs auth')} and entering the new key.\n`,
2255
+ instructions: (functionName, url) => `To update CLI permissions for "${functionName}": \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes serverless function metric permissions. \n- Update the CLI config for this account by running ${uiAuthCommandReference()} and entering the new key.\n`,
2245
2256
  },
2246
2257
  },
2247
2258
  },
@@ -2258,7 +2269,7 @@ export const commands = {
2258
2269
  invalidUser: (parentAccountName) => `Couldn't list serverless function metrics because your account has been removed from ${chalk.bold(parentAccountName)} or your permission set doesn't allow you to list serverless function metrics. To update your permissions, contact a super admin in ${chalk.bold(parentAccountName)}.`,
2259
2270
  scopes: {
2260
2271
  message: "The personal access key you provided doesn't include serverless function metric permissions.",
2261
- instructions: (url) => `To update CLI permissions: \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes serverless function metric permissions. \n- Update the CLI config for this account by running ${chalk.bold('hs auth')} and entering the new key.\n`,
2272
+ instructions: (url) => `To update CLI permissions: \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes serverless function metric permissions. \n- Update the CLI config for this account by running ${uiAuthCommandReference()} and entering the new key.\n`,
2262
2273
  },
2263
2274
  },
2264
2275
  },
@@ -2277,7 +2288,7 @@ export const commands = {
2277
2288
  invalidUser: (functionName, parentAccountName) => `Couldn't add ${chalk.bold(functionName)} because your account has been removed from ${chalk.bold(parentAccountName)} or your permission set doesn't allow you to add serverless function settings. To update your permissions, contact a super admin in ${chalk.bold(parentAccountName)}.`,
2278
2289
  scopes: {
2279
2290
  message: "The personal access key you provided doesn't include serverless function setting permissions.",
2280
- instructions: (functionName, url) => `To update CLI permissions for "${functionName}": \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes serverless function setting permissions. \n- Update the CLI config for this account by running ${chalk.bold('hs auth')} and entering the new key.\n`,
2291
+ instructions: (functionName, url) => `To update CLI permissions for "${functionName}": \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes serverless function setting permissions. \n- Update the CLI config for this account by running ${uiAuthCommandReference()} and entering the new key.\n`,
2281
2292
  },
2282
2293
  },
2283
2294
  },
@@ -2294,7 +2305,7 @@ export const commands = {
2294
2305
  invalidUser: (functionName, parentAccountName) => `Couldn't delete ${chalk.bold(functionName)} because your account has been removed from ${chalk.bold(parentAccountName)} or your permission set doesn't allow you to delete serverless function settings. To update your permissions, contact a super admin in ${chalk.bold(parentAccountName)}.`,
2295
2306
  scopes: {
2296
2307
  message: "The personal access key you provided doesn't include serverless function setting permissions.",
2297
- instructions: (functionName, url) => `To update CLI permissions for "${functionName}": \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes serverless function setting permissions. \n- Update the CLI config for this account by running ${chalk.bold('hs auth')} and entering the new key.\n`,
2308
+ instructions: (functionName, url) => `To update CLI permissions for "${functionName}": \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes serverless function setting permissions. \n- Update the CLI config for this account by running ${uiAuthCommandReference()} and entering the new key.\n`,
2298
2309
  },
2299
2310
  },
2300
2311
  },
@@ -2311,7 +2322,7 @@ export const commands = {
2311
2322
  invalidUser: (parentAccountName) => `Couldn't list serverless function settings because your account has been removed from ${chalk.bold(parentAccountName)} or your permission set doesn't allow you to list serverless function settings. To update your permissions, contact a super admin in ${chalk.bold(parentAccountName)}.`,
2312
2323
  scopes: {
2313
2324
  message: "The personal access key you provided doesn't include serverless function setting permissions.",
2314
- instructions: (url) => `To update CLI permissions: \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes serverless function setting permissions. \n- Update the CLI config for this account by running ${chalk.bold('hs auth')} and entering the new key.\n`,
2325
+ instructions: (url) => `To update CLI permissions: \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes serverless function setting permissions. \n- Update the CLI config for this account by running ${uiAuthCommandReference()} and entering the new key.\n`,
2315
2326
  },
2316
2327
  },
2317
2328
  },
@@ -2330,7 +2341,7 @@ export const commands = {
2330
2341
  invalidUser: (functionName, parentAccountName) => `Couldn't add ${chalk.bold(functionName)} because your account has been removed from ${chalk.bold(parentAccountName)} or your permission set doesn't allow you to add serverless function versions. To update your permissions, contact a super admin in ${chalk.bold(parentAccountName)}.`,
2331
2342
  scopes: {
2332
2343
  message: "The personal access key you provided doesn't include serverless function version permissions.",
2333
- instructions: (functionName, url) => `To update CLI permissions for "${functionName}": \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes serverless function version permissions. \n- Update the CLI config for this account by running ${chalk.bold('hs auth')} and entering the new key.\n`,
2344
+ instructions: (functionName, url) => `To update CLI permissions for "${functionName}": \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes serverless function version permissions. \n- Update the CLI config for this account by running ${uiAuthCommandReference()} and entering the new key.\n`,
2334
2345
  },
2335
2346
  },
2336
2347
  },
@@ -2347,7 +2358,7 @@ export const commands = {
2347
2358
  invalidUser: (functionName, parentAccountName) => `Couldn't delete ${chalk.bold(functionName)} because your account has been removed from ${chalk.bold(parentAccountName)} or your permission set doesn't allow you to delete serverless function versions. To update your permissions, contact a super admin in ${chalk.bold(parentAccountName)}.`,
2348
2359
  scopes: {
2349
2360
  message: "The personal access key you provided doesn't include serverless function version permissions.",
2350
- instructions: (functionName, url) => `To update CLI permissions for "${functionName}": \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes serverless function version permissions. \n- Update the CLI config for this account by running ${chalk.bold('hs auth')} and entering the new key.\n`,
2361
+ instructions: (functionName, url) => `To update CLI permissions for "${functionName}": \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes serverless function version permissions. \n- Update the CLI config for this account by running ${uiAuthCommandReference()} and entering the new key.\n`,
2351
2362
  },
2352
2363
  },
2353
2364
  },
@@ -2364,7 +2375,7 @@ export const commands = {
2364
2375
  invalidUser: (parentAccountName) => `Couldn't list serverless function versions because your account has been removed from ${chalk.bold(parentAccountName)} or your permission set doesn't allow you to list serverless function versions. To update your permissions, contact a super admin in ${chalk.bold(parentAccountName)}.`,
2365
2376
  scopes: {
2366
2377
  message: "The personal access key you provided doesn't include serverless function version permissions.",
2367
- instructions: (url) => `To update CLI permissions: \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes serverless function version permissions. \n- Update the CLI config for this account by running ${chalk.bold('hs auth')} and entering the new key.\n`,
2378
+ instructions: (url) => `To update CLI permissions: \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes serverless function version permissions. \n- Update the CLI config for this account by running ${uiAuthCommandReference()} and entering the new key.\n`,
2368
2379
  },
2369
2380
  },
2370
2381
  },
@@ -2383,7 +2394,7 @@ export const commands = {
2383
2394
  invalidUser: (functionName, parentAccountName) => `Couldn't add ${chalk.bold(functionName)} because your account has been removed from ${chalk.bold(parentAccountName)} or your permission set doesn't allow you to add serverless function webhooks. To update your permissions, contact a super admin in ${chalk.bold(parentAccountName)}.`,
2384
2395
  scopes: {
2385
2396
  message: "The personal access key you provided doesn't include serverless function webhook permissions.",
2386
- instructions: (functionName, url) => `To update CLI permissions for "${functionName}": \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes serverless function webhook permissions. \n- Update the CLI config for this account by running ${chalk.bold('hs auth')} and entering the new key.\n`,
2397
+ instructions: (functionName, url) => `To update CLI permissions for "${functionName}": \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes serverless function webhook permissions. \n- Update the CLI config for this account by running ${uiAuthCommandReference()} and entering the new key.\n`,
2387
2398
  },
2388
2399
  },
2389
2400
  },
@@ -2400,7 +2411,7 @@ export const commands = {
2400
2411
  invalidUser: (functionName, parentAccountName) => `Couldn't delete ${chalk.bold(functionName)} because your account has been removed from ${chalk.bold(parentAccountName)} or your permission set doesn't allow you to delete serverless function webhooks. To update your permissions, contact a super admin in ${chalk.bold(parentAccountName)}.`,
2401
2412
  scopes: {
2402
2413
  message: "The personal access key you provided doesn't include serverless function webhook permissions.",
2403
- instructions: (functionName, url) => `To update CLI permissions for "${functionName}": \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes serverless function webhook permissions. \n- Update the CLI config for this account by running ${chalk.bold('hs auth')} and entering the new key.\n`,
2414
+ instructions: (functionName, url) => `To update CLI permissions for "${functionName}": \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes serverless function webhook permissions. \n- Update the CLI config for this account by running ${uiAuthCommandReference()} and entering the new key.\n`,
2404
2415
  },
2405
2416
  },
2406
2417
  },
@@ -2417,7 +2428,7 @@ export const commands = {
2417
2428
  invalidUser: (parentAccountName) => `Couldn't list serverless function webhooks because your account has been removed from ${chalk.bold(parentAccountName)} or your permission set doesn't allow you to list serverless function webhooks. To update your permissions, contact a super admin in ${chalk.bold(parentAccountName)}.`,
2418
2429
  scopes: {
2419
2430
  message: "The personal access key you provided doesn't include serverless function webhook permissions.",
2420
- instructions: (url) => `To update CLI permissions: \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes serverless function webhook permissions. \n- Update the CLI config for this account by running ${chalk.bold('hs auth')} and entering the new key.\n`,
2431
+ instructions: (url) => `To update CLI permissions: \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes serverless function webhook permissions. \n- Update the CLI config for this account by running ${uiAuthCommandReference()} and entering the new key.\n`,
2421
2432
  },
2422
2433
  },
2423
2434
  },
@@ -2436,7 +2447,7 @@ export const commands = {
2436
2447
  invalidUser: (functionName, parentAccountName) => `Couldn't add ${chalk.bold(functionName)} because your account has been removed from ${chalk.bold(parentAccountName)} or your permission set doesn't allow you to add serverless function webhook subscriptions. To update your permissions, contact a super admin in ${chalk.bold(parentAccountName)}.`,
2437
2448
  scopes: {
2438
2449
  message: "The personal access key you provided doesn't include serverless function webhook subscription permissions.",
2439
- instructions: (functionName, url) => `To update CLI permissions for "${functionName}": \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes serverless function webhook subscription permissions. \n- Update the CLI config for this account by running ${chalk.bold('hs auth')} and entering the new key.\n`,
2450
+ instructions: (functionName, url) => `To update CLI permissions for "${functionName}": \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes serverless function webhook subscription permissions. \n- Update the CLI config for this account by running ${uiAuthCommandReference()} and entering the new key.\n`,
2440
2451
  },
2441
2452
  },
2442
2453
  },
@@ -2453,7 +2464,7 @@ export const commands = {
2453
2464
  invalidUser: (functionName, parentAccountName) => `Couldn't delete ${chalk.bold(functionName)} because your account has been removed from ${chalk.bold(parentAccountName)} or your permission set doesn't allow you to delete serverless function webhook subscriptions. To update your permissions, contact a super admin in ${chalk.bold(parentAccountName)}.`,
2454
2465
  scopes: {
2455
2466
  message: "The personal access key you provided doesn't include serverless function webhook subscription permissions.",
2456
- instructions: (functionName, url) => `To update CLI permissions for "${functionName}": \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes serverless function webhook subscription permissions. \n- Update the CLI config for this account by running ${chalk.bold('hs auth')} and entering the new key.\n`,
2467
+ instructions: (functionName, url) => `To update CLI permissions for "${functionName}": \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes serverless function webhook subscription permissions. \n- Update the CLI config for this account by running ${uiAuthCommandReference()} and entering the new key.\n`,
2457
2468
  },
2458
2469
  },
2459
2470
  },
@@ -2470,7 +2481,7 @@ export const commands = {
2470
2481
  invalidUser: (parentAccountName) => `Couldn't list serverless function webhook subscriptions because your account has been removed from ${chalk.bold(parentAccountName)} or your permission set doesn't allow you to list serverless function webhook subscriptions. To update your permissions, contact a super admin in ${chalk.bold(parentAccountName)}.`,
2471
2482
  scopes: {
2472
2483
  message: "The personal access key you provided doesn't include serverless function webhook subscription permissions.",
2473
- instructions: (url) => `To update CLI permissions: \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes serverless function webhook subscription permissions. \n- Update the CLI config for this account by running ${chalk.bold('hs auth')} and entering the new key.\n`,
2484
+ instructions: (url) => `To update CLI permissions: \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes serverless function webhook subscription permissions. \n- Update the CLI config for this account by running ${uiAuthCommandReference()} and entering the new key.\n`,
2474
2485
  },
2475
2486
  },
2476
2487
  },
@@ -2489,7 +2500,7 @@ export const commands = {
2489
2500
  invalidUser: (functionName, parentAccountName) => `Couldn't add ${chalk.bold(functionName)} because your account has been removed from ${chalk.bold(parentAccountName)} or your permission set doesn't allow you to add serverless function webhook subscription events. To update your permissions, contact a super admin in ${chalk.bold(parentAccountName)}.`,
2490
2501
  scopes: {
2491
2502
  message: "The personal access key you provided doesn't include serverless function webhook subscription event permissions.",
2492
- instructions: (functionName, url) => `To update CLI permissions for "${functionName}": \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes serverless function webhook subscription event permissions. \n- Update the CLI config for this account by running ${chalk.bold('hs auth')} and entering the new key.\n`,
2503
+ instructions: (functionName, url) => `To update CLI permissions for "${functionName}": \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes serverless function webhook subscription event permissions. \n- Update the CLI config for this account by running ${uiAuthCommandReference()} and entering the new key.\n`,
2493
2504
  },
2494
2505
  },
2495
2506
  },
@@ -2506,7 +2517,7 @@ export const commands = {
2506
2517
  invalidUser: (functionName, parentAccountName) => `Couldn't delete ${chalk.bold(functionName)} because your account has been removed from ${chalk.bold(parentAccountName)} or your permission set doesn't allow you to delete serverless function webhook subscription events. To update your permissions, contact a super admin in ${chalk.bold(parentAccountName)}.`,
2507
2518
  scopes: {
2508
2519
  message: "The personal access key you provided doesn't include serverless function webhook subscription event permissions.",
2509
- instructions: (functionName, url) => `To update CLI permissions for "${functionName}": \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes serverless function webhook subscription event permissions. \n- Update the CLI config for this account by running ${chalk.bold('hs auth')} and entering the new key.\n`,
2520
+ instructions: (functionName, url) => `To update CLI permissions for "${functionName}": \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes serverless function webhook subscription event permissions. \n- Update the CLI config for this account by running ${uiAuthCommandReference()} and entering the new key.\n`,
2510
2521
  },
2511
2522
  },
2512
2523
  },
@@ -2523,7 +2534,7 @@ export const commands = {
2523
2534
  invalidUser: (parentAccountName) => `Couldn't list serverless function webhook subscription events because your account has been removed from ${chalk.bold(parentAccountName)} or your permission set doesn't allow you to list serverless function webhook subscription events. To update your permissions, contact a super admin in ${chalk.bold(parentAccountName)}.`,
2524
2535
  scopes: {
2525
2536
  message: "The personal access key you provided doesn't include serverless function webhook subscription event permissions.",
2526
- instructions: (url) => `To update CLI permissions: \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes serverless function webhook subscription event permissions. \n- Update the CLI config for this account by running ${chalk.bold('hs auth')} and entering the new key.\n`,
2537
+ instructions: (url) => `To update CLI permissions: \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes serverless function webhook subscription event permissions. \n- Update the CLI config for this account by running ${uiAuthCommandReference()} and entering the new key.\n`,
2527
2538
  },
2528
2539
  },
2529
2540
  },
@@ -2542,7 +2553,7 @@ export const commands = {
2542
2553
  invalidUser: (functionName, parentAccountName) => `Couldn't add ${chalk.bold(functionName)} because your account has been removed from ${chalk.bold(parentAccountName)} or your permission set doesn't allow you to add serverless function webhook subscription event types. To update your permissions, contact a super admin in ${chalk.bold(parentAccountName)}.`,
2543
2554
  scopes: {
2544
2555
  message: "The personal access key you provided doesn't include serverless function webhook subscription event type permissions.",
2545
- instructions: (functionName, url) => `To update CLI permissions for "${functionName}": \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes serverless function webhook subscription event type permissions. \n- Update the CLI config for this account by running ${chalk.bold('hs auth')} and entering the new key.\n`,
2556
+ instructions: (functionName, url) => `To update CLI permissions for "${functionName}": \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes serverless function webhook subscription event type permissions. \n- Update the CLI config for this account by running ${uiAuthCommandReference()} and entering the new key.\n`,
2546
2557
  },
2547
2558
  },
2548
2559
  },
@@ -2559,7 +2570,7 @@ export const commands = {
2559
2570
  invalidUser: (functionName, parentAccountName) => `Couldn't delete ${chalk.bold(functionName)} because your account has been removed from ${chalk.bold(parentAccountName)} or your permission set doesn't allow you to delete serverless function webhook subscription event types. To update your permissions, contact a super admin in ${chalk.bold(parentAccountName)}.`,
2560
2571
  scopes: {
2561
2572
  message: "The personal access key you provided doesn't include serverless function webhook subscription event type permissions.",
2562
- instructions: (functionName, url) => `To update CLI permissions for "${functionName}": \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes serverless function webhook subscription event type permissions. \n- Update the CLI config for this account by running ${chalk.bold('hs auth')} and entering the new key.\n`,
2573
+ instructions: (functionName, url) => `To update CLI permissions for "${functionName}": \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes serverless function webhook subscription event type permissions. \n- Update the CLI config for this account by running ${uiAuthCommandReference()} and entering the new key.\n`,
2563
2574
  },
2564
2575
  },
2565
2576
  },
@@ -2576,7 +2587,7 @@ export const commands = {
2576
2587
  invalidUser: (parentAccountName) => `Couldn't list serverless function webhook subscription event types because your account has been removed from ${chalk.bold(parentAccountName)} or your permission set doesn't allow you to list serverless function webhook subscription event types. To update your permissions, contact a super admin in ${chalk.bold(parentAccountName)}.`,
2577
2588
  scopes: {
2578
2589
  message: "The personal access key you provided doesn't include serverless function webhook subscription event type permissions.",
2579
- instructions: (url) => `To update CLI permissions: \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes serverless function webhook subscription event type permissions. \n- Update the CLI config for this account by running ${chalk.bold('hs auth')} and entering the new key.\n`,
2590
+ instructions: (url) => `To update CLI permissions: \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes serverless function webhook subscription event type permissions. \n- Update the CLI config for this account by running ${uiAuthCommandReference()} and entering the new key.\n`,
2580
2591
  },
2581
2592
  },
2582
2593
  },
@@ -2595,7 +2606,7 @@ export const commands = {
2595
2606
  invalidUser: (functionName, parentAccountName) => `Couldn't add ${chalk.bold(functionName)} because your account has been removed from ${chalk.bold(parentAccountName)} or your permission set doesn't allow you to add serverless function webhook subscription event type options. To update your permissions, contact a super admin in ${chalk.bold(parentAccountName)}.`,
2596
2607
  scopes: {
2597
2608
  message: "The personal access key you provided doesn't include serverless function webhook subscription event type option permissions.",
2598
- instructions: (functionName, url) => `To update CLI permissions for "${functionName}": \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes serverless function webhook subscription event type option permissions. \n- Update the CLI config for this account by running ${chalk.bold('hs auth')} and entering the new key.\n`,
2609
+ instructions: (functionName, url) => `To update CLI permissions for "${functionName}": \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes serverless function webhook subscription event type option permissions. \n- Update the CLI config for this account by running ${uiAuthCommandReference()} and entering the new key.\n`,
2599
2610
  },
2600
2611
  },
2601
2612
  },
@@ -2612,7 +2623,7 @@ export const commands = {
2612
2623
  invalidUser: (functionName, parentAccountName) => `Couldn't delete ${chalk.bold(functionName)} because your account has been removed from ${chalk.bold(parentAccountName)} or your permission set doesn't allow you to delete serverless function webhook subscription event type options. To update your permissions, contact a super admin in ${chalk.bold(parentAccountName)}.`,
2613
2624
  scopes: {
2614
2625
  message: "The personal access key you provided doesn't include serverless function webhook subscription event type option permissions.",
2615
- instructions: (functionName, url) => `To update CLI permissions for "${functionName}": \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes serverless function webhook subscription event type option permissions. \n- Update the CLI config for this account by running ${chalk.bold('hs auth')} and entering the new key.\n`,
2626
+ instructions: (functionName, url) => `To update CLI permissions for "${functionName}": \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes serverless function webhook subscription event type option permissions. \n- Update the CLI config for this account by running ${uiAuthCommandReference()} and entering the new key.\n`,
2616
2627
  },
2617
2628
  },
2618
2629
  },
@@ -2629,7 +2640,7 @@ export const commands = {
2629
2640
  invalidUser: (parentAccountName) => `Couldn't list serverless function webhook subscription event type options because your account has been removed from ${chalk.bold(parentAccountName)} or your permission set doesn't allow you to list serverless function webhook subscription event type options. To update your permissions, contact a super admin in ${chalk.bold(parentAccountName)}.`,
2630
2641
  scopes: {
2631
2642
  message: "The personal access key you provided doesn't include serverless function webhook subscription event type option permissions.",
2632
- instructions: (url) => `To update CLI permissions: \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes serverless function webhook subscription event type option permissions. \n- Update the CLI config for this account by running ${chalk.bold('hs auth')} and entering the new key.\n`,
2643
+ instructions: (url) => `To update CLI permissions: \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes serverless function webhook subscription event type option permissions. \n- Update the CLI config for this account by running ${uiAuthCommandReference()} and entering the new key.\n`,
2633
2644
  },
2634
2645
  },
2635
2646
  },
@@ -2695,10 +2706,14 @@ export const lib = {
2695
2706
  },
2696
2707
  },
2697
2708
  AppDevModeInterface: {
2709
+ autoInstallStaticAuthApp: {
2710
+ installing: (appName, targetTestAccountId) => `Installing ${chalk.bold(appName)} on account ${uiAccountDescription(targetTestAccountId)}...`,
2711
+ success: (appName, targetTestAccountId) => `Successfully installed ${chalk.bold(appName)} on account ${uiAccountDescription(targetTestAccountId)}\n`,
2712
+ error: (appName, targetTestAccountId) => `Error installing ${chalk.bold(appName)} on account ${uiAccountDescription(targetTestAccountId)}. You may still be able to install your app in your browser.`,
2713
+ },
2698
2714
  defaultMarketplaceAppWarning: (installCount) => `Your marketplace app is currently installed in ${chalk.bold(`${installCount} ${installCount === 1 ? 'account' : 'accounts'}`)}. Any uploaded changes will impact your app's users. We strongly recommend creating a copy of this app to test your changes before proceeding.`,
2699
2715
  autoInstallDeclined: 'You must install your app on your target test account to proceed with local development.',
2700
2716
  autoInstallSuccess: (appName, targetTestAccountId) => `Successfully installed app ${appName} on account ${uiAccountDescription(targetTestAccountId)}\n`,
2701
- autoInstallError: (appName, targetTestAccountId) => `Error installing app ${appName} on account ${uiAccountDescription(targetTestAccountId)}. You may still be able to install your app in your browser.`,
2702
2717
  fetchAppData: {
2703
2718
  checking: (appName) => `Checking installations for your app ${chalk.bold(appName)}...`,
2704
2719
  success: (appName, accountId) => `Your app ${chalk.bold(appName)} is installed on account ${uiAccountDescription(accountId, false)}`,
@@ -2708,6 +2723,12 @@ export const lib = {
2708
2723
  },
2709
2724
  distributionChanged: `Your app's distribution type has been changed from ${APP_DISTRIBUTION_TYPES.PRIVATE} to ${APP_DISTRIBUTION_TYPES.MARKETPLACE}. Once uploaded, this change cannot be reversed. Before uploading your project, confirm that you want to ${chalk.bold('permanantly')} change your app's distribution type. This will uninstall your app from all accounts.`,
2710
2725
  authTypeChanged: `Your app's auth type has been changed from ${APP_AUTH_TYPES.STATIC} to ${APP_AUTH_TYPES.OAUTH}. Once uploaded, this change cannot be reversed. Before uploading your project, confirm that you want to ${chalk.bold('permanantly')} change your app's auth type. This will uninstall your app from all accounts.`,
2726
+ installationFailed: 'An error occured while installing your app. Your app must be installed in your target test account to proceed with local development.',
2727
+ waitUntilAppIsInstalled: {
2728
+ link: (installUrl) => `${uiLink('Install your app', installUrl)} to proceed with local development\n`,
2729
+ waiting: 'Waiting for your app to be installed...',
2730
+ success: (appName, accountId) => `Your app ${chalk.bold(appName)} has been installed successfully on account ${uiAccountDescription(accountId)}\n`,
2731
+ },
2711
2732
  },
2712
2733
  LocalDevWebsocketServer: {
2713
2734
  errors: {
@@ -2764,17 +2785,17 @@ export const lib = {
2764
2785
  },
2765
2786
  account: {
2766
2787
  checkIfDefaultAccountIsSupported: {
2767
- publicApp: `This project contains a public app. Local development of public apps is only supported on developer accounts and developer test accounts. Change your default account using ${uiCommandReference('hs accounts use')}, or link a new account with ${uiCommandReference('hs auth')}.`,
2768
- privateApp: `This project contains a private app. Local development of private apps is not supported in developer accounts. Change your default account using ${uiCommandReference('hs accounts use')}, or link a new account with ${uiCommandReference('hs auth')}.`,
2788
+ publicApp: `This project contains a public app. Local development of public apps is only supported on developer accounts and developer test accounts. Change your default account using ${uiCommandReference('hs account use')}, or link a new account with ${uiAuthCommandReference()}.`,
2789
+ privateApp: `This project contains a private app. Local development of private apps is not supported in developer accounts. Change your default account using ${uiCommandReference('hs account use')}, or link a new account with ${uiAuthCommandReference()}.`,
2769
2790
  },
2770
2791
  validateAccountOption: {
2771
- invalidPublicAppAccount: `This project contains a public app. The "--account" flag must point to a developer test account to develop this project locally. Alternatively, change your default account to an App Developer Account using ${uiCommandReference('hs accounts use')} and run ${uiCommandReference('hs project dev')} to set up a new Developer Test Account.`,
2772
- invalidPrivateAppAccount: `This project contains a private app. The account specified with the "--account" flag points to a developer account, which do not support the local development of private apps. Update the "--account" flag to point to a standard, sandbox, or developer test account, or change your default account by running ${uiCommandReference('hs accounts use')}.`,
2773
- nonSandboxWarning: `Testing in a sandbox is strongly recommended. To switch the target account, select an option below or run ${uiCommandReference('hs accounts use')} before running the command again.`,
2792
+ invalidPublicAppAccount: `This project contains a public app. The "--account" flag must point to a developer test account to develop this project locally. Alternatively, change your default account to an App Developer Account using ${uiCommandReference('hs account use')} and run ${uiCommandReference('hs project dev')} to set up a new Developer Test Account.`,
2793
+ invalidPrivateAppAccount: `This project contains a private app. The account specified with the "--account" flag points to a developer account, which do not support the local development of private apps. Update the "--account" flag to point to a standard, sandbox, or developer test account, or change your default account by running ${uiCommandReference('hs account use')}.`,
2794
+ nonSandboxWarning: `Testing in a sandbox is strongly recommended. To switch the target account, select an option below or run ${uiCommandReference('hs account use')} before running the command again.`,
2774
2795
  publicAppNonDeveloperTestAccountWarning: `Local development of public apps is only supported in ${chalk.bold('developer test accounts')}.`,
2775
2796
  },
2776
2797
  checkIfParentAccountIsAuthed: {
2777
- notAuthedError: (parentAccountId, accountIdentifier) => `To develop this project locally, run ${uiCommandReference(`hs auth --account=${parentAccountId}`)} to authenticate the App Developer Account ${parentAccountId} associated with ${accountIdentifier}.`,
2798
+ notAuthedError: (parentAccountId, accountIdentifier) => `To develop this project locally, run ${uiAuthCommandReference({ accountId: parentAccountId })} to authenticate the App Developer Account ${parentAccountId} associated with ${accountIdentifier}.`,
2778
2799
  },
2779
2800
  selectAccountTypePrompt: {
2780
2801
  message: 'Choose the type of account to test on',
@@ -2784,14 +2805,14 @@ export const lib = {
2784
2805
  productionAccountOption: (accountId) => `<${chalk.red('!')} Test on your project account: ${uiAccountDescription(accountId, false)} ${chalk.red('!')}>`,
2785
2806
  },
2786
2807
  confirmDefaultAccountIsTarget: {
2787
- configError: `An error occurred while reading the default account from your config. Run ${uiCommandReference('hs auth')} to re-auth this account`,
2788
- declineDefaultAccountExplanation: `To develop on a different account, run ${uiCommandReference('hs accounts use')} to change your default account, then re-run ${uiCommandReference('hs project dev')}.`,
2808
+ configError: `An error occurred while reading the default account from your config. Run ${uiAuthCommandReference()} to re-auth this account`,
2809
+ declineDefaultAccountExplanation: `To develop on a different account, run ${uiCommandReference('hs account use')} to change your default account, then re-run ${uiCommandReference('hs project dev')}.`,
2789
2810
  },
2790
2811
  },
2791
2812
  },
2792
2813
  middleware: {
2793
2814
  updateNotification: {
2794
- notifyTitle: chalk.bold('Update available'),
2815
+ notifyTitle: chalk.bold('CLI update available'),
2795
2816
  cmsUpdateNotification: (packageName) => `${chalk.bold('The CMS CLI is now the HubSpot CLI')}\n\nTo upgrade, uninstall ${chalk.bold(packageName)}\nand then run ${uiCommandReference('{updateCommand}')}`,
2796
2817
  cliUpdateNotification: `HubSpot CLI version ${chalk.cyan(chalk.bold('{currentVersion}'))} is outdated.\nRun ${uiCommandReference('{updateCommand}')} to upgrade to version ${chalk.cyan(chalk.bold('{latestVersion}'))}`,
2797
2818
  },
@@ -2946,7 +2967,7 @@ export const lib = {
2946
2967
  message: (command) => `${command} - See a list of configured HubSpot accounts`,
2947
2968
  },
2948
2969
  accountsUseCommand: {
2949
- command: 'hs accounts use',
2970
+ command: 'hs account use',
2950
2971
  message: (command) => `${command} - Set the Hubspot account that the CLI will target by default`,
2951
2972
  },
2952
2973
  authCommand: {
@@ -3011,7 +3032,7 @@ export const lib = {
3011
3032
  },
3012
3033
  },
3013
3034
  buildAccount: {
3014
- createDeveloperTestAccountV3: {
3035
+ createDeveloperTestAccountV2: {
3015
3036
  syncFailure: 'Failed to sync developer test account',
3016
3037
  pakFailure: 'Failed to generate personal access key for developer test account',
3017
3038
  },
@@ -3075,6 +3096,21 @@ export const lib = {
3075
3096
  mergeConflictMessage: (count, propertyList) => `Conflict${count > 1 ? 's' : ''} detected for ${chalk.bold(propertyList)}.`,
3076
3097
  mergeConfigConflictPrompt: (property, newValue, oldValue) => `Change ${property} from ${newValue} to ${oldValue}?`,
3077
3098
  },
3099
+ handleAccountNameConflicts: {
3100
+ warnings: {
3101
+ accountNameConflictMessage: (count) => `${count} account name conflict${count > 1 ? 's' : ''} detected.`,
3102
+ forceFlagDetected: (count, renameDetails) => `Force flag detected. Automatically renaming ${count} account${count > 1 ? 's' : ''} with duplicate name${count > 1 ? 's' : ''}:\n${renameDetails}`,
3103
+ },
3104
+ prompts: {
3105
+ renameOrOmitAccountPrompt: (accountName, accountId) => `Local account name="${accountName}" (ID: ${accountId}) conflicts with an existing global account.\nRename the local account to include it in the merge? If not, it will be skipped.`,
3106
+ newAccountNamePrompt: (accountName, portalId) => `Enter a new name for the local account [ID: ${portalId}] (currently named "${accountName}"):`,
3107
+ },
3108
+ errors: {
3109
+ nameRequired: 'The name may not be blank. Please add a name for the config.',
3110
+ sameName: 'The new account name must be different from the current name.',
3111
+ nameAlreadyInConfig: (name) => `The name "${name}" is already used by another account.`,
3112
+ },
3113
+ },
3078
3114
  handleMerge: {
3079
3115
  description: (archivedConfigName) => `We will automatically merge the contents of your deprecated config file into your global configuration file. This will merge the configured accounts and settings into the global config. Then it will archive the deprecated config as ${archivedConfigName} for you to manually cleanup at your convenience.`,
3080
3116
  confirmPrompt: 'Merge the deprecated config into your global config?',
@@ -3107,7 +3143,7 @@ export const lib = {
3107
3143
  chooseDefaultAccountOption: `<${chalk.bold('❗')} Test on this production account ${chalk.bold('❗')}>`,
3108
3144
  promptMessage: (accountType, accountIdentifier) => `Choose a ${accountType} under ${accountIdentifier} to test with:`,
3109
3145
  sandboxLimit: (limit) => `Your account reached the limit of ${limit} development sandboxes`,
3110
- sandboxLimitWithSuggestion: (limit, authCommand) => `Your account reached the limit of ${limit} development sandboxes. Run ${uiCommandReference(authCommand)} to add an existing one to the config.`,
3146
+ sandboxLimitWithSuggestion: (limit) => `Your account reached the limit of ${limit} development sandboxes. Run ${uiAuthCommandReference()} to add an existing one to the config.`,
3111
3147
  developerTestAccountLimit: (limit) => `Your account reached the limit of ${limit} developer test accounts.`,
3112
3148
  confirmDefaultAccount: (accountName, accountType) => `Continue testing on ${chalk.bold(`${accountName} (${accountType})`)}? (Y/n)`,
3113
3149
  confirmUseExistingDeveloperTestAccount: (accountName) => `Continue with ${accountName}? This account isn't currently connected to the HubSpot CLI. By continuing, you'll be prompted to generate a personal access key and connect it.`,
@@ -3320,7 +3356,6 @@ export const lib = {
3320
3356
  installAppPrompt: {
3321
3357
  explanation: 'Local development requires this app to be installed in the target test account.',
3322
3358
  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.",
3323
- staticAuthExplanation: (projectAccountId, testingAccountId, projectName, appUid) => `To install this static auth app, your testing account ${uiAccountDescription(testingAccountId)} must be on ${uiLink("this app's allowlist", getAppAllowlistUrl(projectAccountId, projectName, appUid))}.`,
3324
3359
  prompt: 'Open HubSpot to install this app?',
3325
3360
  autoPrompt: 'Install this app in your target test account?',
3326
3361
  reinstallPrompt: 'Open HubSpot to reinstall this app?',
@@ -3365,11 +3400,11 @@ export const lib = {
3365
3400
  },
3366
3401
  failure: {
3367
3402
  invalidUser: (accountName, parentAccountName) => `Couldn't create ${chalk.bold(accountName)} because your account has been removed from ${chalk.bold(parentAccountName)} or your permission set doesn't allow you to create the sandbox. To update your permissions, contact a super admin in ${chalk.bold(parentAccountName)}.`,
3368
- limit: (accountName, limit) => `${chalk.bold(accountName)} reached the limit of ${limit} developer test accounts. \n- To connect a developer test account to your HubSpot CLI, run ${uiCommandReference('hs auth')} and follow the prompts.`,
3369
- alreadyInConfig: (accountName, limit) => `${chalk.bold(accountName)} reached the limit of ${limit} developer test accounts. \n- To use an existing developer test account, run ${uiCommandReference('hs accounts use')}.`,
3403
+ limit: (accountName, limit) => `${chalk.bold(accountName)} reached the limit of ${limit} developer test accounts. \n- To connect a developer test account to your HubSpot CLI, run ${uiAuthCommandReference()} and follow the prompts.`,
3404
+ alreadyInConfig: (accountName, limit) => `${chalk.bold(accountName)} reached the limit of ${limit} developer test accounts. \n- To use an existing developer test account, run ${uiCommandReference('hs account use')}.`,
3370
3405
  scopes: {
3371
3406
  message: "The personal access key you provided doesn't include developer test account permissions.",
3372
- instructions: (accountName, url) => `To update CLI permissions for "${accountName}": \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes developer test account permissions. \n- Update the CLI config for this account by running ${uiCommandReference('hs auth')} and entering the new key.\n`,
3407
+ instructions: (accountName, url) => `To update CLI permissions for "${accountName}": \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes developer test account permissions. \n- Update the CLI config for this account by running ${uiAuthCommandReference()} and entering the new key.\n`,
3373
3408
  },
3374
3409
  },
3375
3410
  },
@@ -3386,12 +3421,12 @@ export const lib = {
3386
3421
  configFileUpdated: (accountName, authType) => `Account "${accountName}" updated using "${authType}"`,
3387
3422
  },
3388
3423
  failure: {
3389
- limit: (accountId, limit, link) => `${uiAccountDescription(accountId)} reached the limit of ${limit} developer sandboxes. \n- View sandbox details at ${uiLink('View sandbox details at', link)} \n- To connect a developer sandbox to your HubSpot CLI, run ${uiCommandReference('hs auth')} and follow the prompts.`,
3390
- alreadyInConfig: (accountId, limit) => `${uiAccountDescription(accountId)} reached the limit of ${limit} developer sandboxes. \n- To use an existing developer sandbox, run ${uiCommandReference('hs accounts use')}. \n- To delete an existing sandbox, run ${uiCommandReference('hs sandbox delete')}.`,
3424
+ limit: (accountId, limit, link) => `${uiAccountDescription(accountId)} reached the limit of ${limit} developer sandboxes. \n- View sandbox details at ${uiLink('View sandbox details at', link)} \n- To connect a developer sandbox to your HubSpot CLI, run ${uiAuthCommandReference()} and follow the prompts.`,
3425
+ alreadyInConfig: (accountId, limit) => `${uiAccountDescription(accountId)} reached the limit of ${limit} developer sandboxes. \n- To use an existing developer sandbox, run ${uiCommandReference('hs account use')}. \n- To delete an existing sandbox, run ${uiCommandReference('hs sandbox delete')}.`,
3391
3426
  generic: 'An error occurred while creating a developer sandbox',
3392
3427
  scopes: {
3393
3428
  message: "The personal access key you provided doesn't include developer sandbox permissions.",
3394
- instructions: (account, url) => `To update CLI permissions for "${chalk.bold(account)}": \n- ${uiLink('Go to', url)}, deactivate the existing personal access key, and create a new one that includes developer sandbox permissions. \n- Update the CLI config for this account by running ${uiCommandReference('hs auth')} and entering the new key.\n`,
3429
+ instructions: (account, url) => `To update CLI permissions for "${chalk.bold(account)}": \n- ${uiLink('Go to', url)}, deactivate the existing personal access key, and create a new one that includes developer sandbox permissions. \n- Update the CLI config for this account by running ${uiAuthCommandReference()} and entering the new key.\n`,
3395
3430
  },
3396
3431
  },
3397
3432
  },
@@ -3405,11 +3440,11 @@ export const lib = {
3405
3440
  configFileUpdated: (accountName, authType) => `Account "${accountName}" updated using "${authType}"`,
3406
3441
  },
3407
3442
  failure: {
3408
- limit: (accountId, limit, link) => `${uiAccountDescription(accountId)} reached the limit of ${limit} standard sandboxes.\n- View sandbox details at ${uiLink('View sandbox details at', link)} \n- To connect a standard sandbox to your HubSpot CLI, run ${uiCommandReference('hs auth')} and follow the prompts.`,
3409
- alreadyInConfig: (accountId, limit) => `${uiAccountDescription(accountId)} reached the limit of ${limit} standard sandboxes. \n- To use an existing standard sandbox, run ${uiCommandReference('hs accounts use')}. \n- To delete an existing sandbox, run ${uiCommandReference('hs sandbox delete')}.`,
3443
+ limit: (accountId, limit, link) => `${uiAccountDescription(accountId)} reached the limit of ${limit} standard sandboxes.\n- View sandbox details at ${uiLink('View sandbox details at', link)} \n- To connect a standard sandbox to your HubSpot CLI, run ${uiAuthCommandReference()} and follow the prompts.`,
3444
+ alreadyInConfig: (accountId, limit) => `${uiAccountDescription(accountId)} reached the limit of ${limit} standard sandboxes. \n- To use an existing standard sandbox, run ${uiCommandReference('hs account use')}. \n- To delete an existing sandbox, run ${uiCommandReference('hs sandbox delete')}.`,
3410
3445
  scopes: {
3411
3446
  message: "The personal access key you provided doesn't include standard sandbox permissions.",
3412
- instructions: (account, url) => `To update CLI permissions for "${chalk.bold(account)}": \n- ${uiLink('Go to', url)}, deactivate the existing personal access key, and create a new one that includes standard sandbox permissions. \n- Update the CLI config for this account by running ${uiCommandReference('hs auth')} and entering the new key.\n`,
3447
+ instructions: (account, url) => `To update CLI permissions for "${chalk.bold(account)}": \n- ${uiLink('Go to', url)}, deactivate the existing personal access key, and create a new one that includes standard sandbox permissions. \n- Update the CLI config for this account by running ${uiAuthCommandReference()} and entering the new key.\n`,
3413
3448
  },
3414
3449
  },
3415
3450
  },
@@ -3417,7 +3452,7 @@ export const lib = {
3417
3452
  usageLimitsFetch: 'Unable to fetch sandbox usage limits. Please try again.',
3418
3453
  scopes: {
3419
3454
  message: "The personal access key you provided doesn't include sandbox permissions.",
3420
- instructions: (account, url) => `To update CLI permissions for "${chalk.bold(account)}": \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes Sandbox permissions. \n- Update the CLI config for this account by running ${uiCommandReference('hs auth')} and entering the new key.\n`,
3455
+ instructions: (account, url) => `To update CLI permissions for "${chalk.bold(account)}": \n- Go to ${url}, deactivate the existing personal access key, and create a new one that includes Sandbox permissions. \n- Update the CLI config for this account by running ${uiAuthCommandReference()} and entering the new key.\n`,
3421
3456
  },
3422
3457
  invalidUser: (accountName, parentAccountId) => `Couldn't create ${chalk.bold(accountName)} because your account has been removed from ${uiAccountDescription(parentAccountId)} or your permission set doesn't allow you to create the sandbox. To update your permissions, contact a super admin in ${uiAccountDescription(parentAccountId)}.`,
3423
3458
  '403Gating': (accountName, parentAccountId) => `We couldn't create ${chalk.bold(accountName)} because ${uiAccountDescription(parentAccountId)} is a developer account and does not have access to development sandboxes. To gain access to developer sandboxes, you can ${uiLink('convert your account', 'https://developers.hubspot.com/docs/getting-started/convert-your-account-into-a-developer-crm-account')}.`,
@@ -3452,7 +3487,7 @@ export const lib = {
3452
3487
  objectNotFound: (accountId) => `Couldn't sync the sandbox because ${uiAccountDescription(accountId)} may have been deleted through the UI. Run ${uiCommandReference('hs sandbox delete')} to remove this account from the config.`,
3453
3488
  scopes: {
3454
3489
  message: "The personal access key you provided doesn't include sandbox sync permissions.",
3455
- instructions: (accountName, url) => `To update CLI permissions for "${accountName}": \n- ${uiLink('Go to', url)}, deactivate the existing personal access key, and create a new one that includes sandbox sync permissions. \n- Update the CLI config for this account by running ${uiCommandReference('hs auth')} and entering the new key.\n`,
3490
+ instructions: (accountName, url) => `To update CLI permissions for "${accountName}": \n- ${uiLink('Go to', url)}, deactivate the existing personal access key, and create a new one that includes sandbox sync permissions. \n- Update the CLI config for this account by running ${uiAuthCommandReference()} and entering the new key.\n`,
3456
3491
  },
3457
3492
  },
3458
3493
  },
@@ -3476,7 +3511,7 @@ export const lib = {
3476
3511
  docsLink: 'Projects platform versioning (BETA)',
3477
3512
  betaLink: (docsLink) => `For more info, see ${docsLink}.`,
3478
3513
  },
3479
- missingScopeError: (request, accountName, authCommand) => `Couldn't execute the ${request} because the access key for ${accountName} is missing required scopes. To update scopes, run ${authCommand}. Then deactivate the existing key and generate a new one that includes the missing scopes.`,
3514
+ missingScopeError: (request, accountName) => `Couldn't execute the ${request} because the access key for ${accountName} is missing required scopes. To update scopes, run ${uiAuthCommandReference()}. Then deactivate the existing key and generate a new one that includes the missing scopes.`,
3480
3515
  },
3481
3516
  },
3482
3517
  serverless: {
@@ -3484,7 +3519,7 @@ export const lib = {
3484
3519
  fetchScopeDataError: (scopeGroup) => `Error verifying access of scopeGroup ${scopeGroup}:`,
3485
3520
  portalMissingScope: 'Your account does not have access to this action. Talk to an account admin to request it.',
3486
3521
  userMissingScope: "You don't have access to this action. Ask an account admin to change your permissions in Users & Teams settings.",
3487
- genericMissingScope: 'Your access key does not allow this action. Please generate a new access key by running `hs auth personalaccesskey`.',
3522
+ genericMissingScope: `Your access key does not allow this action. Please generate a new access key by running ${uiAuthCommandReference()}.`,
3488
3523
  },
3489
3524
  },
3490
3525
  doctor: {
@@ -3497,9 +3532,9 @@ export const lib = {
3497
3532
  unableToDetermine: 'Unable to determine if the portal is active',
3498
3533
  pak: {
3499
3534
  incomplete: 'Personal access key is valid, but there are more scopes available to your user that are not included in your key.',
3500
- incompleteSecondary: (command, link) => `To add the available scopes, run ${uiCommandReference(command)} and re-authenticate your account with a new key that has those scopes. Visit HubSpot to view selected and available scopes for your personal access key. ${link}`,
3535
+ incompleteSecondary: (link) => `To add the available scopes, run ${uiAuthCommandReference()} and re-authenticate your account with a new key that has those scopes. Visit HubSpot to view selected and available scopes for your personal access key. ${link}`,
3501
3536
  invalid: 'Personal access key is invalid',
3502
- invalidSecondary: (command) => `To get a new key, run ${uiCommandReference(command)}, deactivate your access key, and generate a new one. Then use that new key to authenticate your account.`,
3537
+ invalidSecondary: `To get a new key, run ${uiAuthCommandReference()}, deactivate your access key, and generate a new one. Then use that new key to authenticate your account.`,
3503
3538
  valid: (link) => `Personal Access Key is valid. ${link}`,
3504
3539
  viewScopes: 'View selected scopes',
3505
3540
  },
@@ -3579,7 +3614,7 @@ export const lib = {
3579
3614
  accountNotConfigured: (accountId) => `The account ${uiAccountDescription(accountId)} has not been configured`,
3580
3615
  invalidAuthType: (authType, accountId, configPath, validValues) => `Invalid "authType" value "${authType}" for account "${uiAccountDescription(accountId)}" in config file: ${configPath}. Valid values are ${validValues}.`,
3581
3616
  oauth2ConfigMissing: (accountId) => `The OAuth2 auth configuration for account ${uiAccountDescription(accountId)} is missing`,
3582
- oauth2ConfigIncorrect: (accountId) => `The OAuth2 configuration for account ${uiAccountDescription(accountId)} is incorrect \n Run ${uiCommandReference('hs auth --type=oauth2')} to reauthenticate`,
3617
+ oauth2ConfigIncorrect: (accountId) => `The OAuth2 configuration for account ${uiAccountDescription(accountId)} is incorrect \n Run ${uiCommandReference('hs auth --auth-type=oauth2')} to reauthenticate`,
3583
3618
  oauth2AccessTokenNotFound: (accountId) => `The OAuth2 access token could not be found for accountId ${uiAccountDescription(accountId)}`,
3584
3619
  personalAccessKeyMissing: (accountId) => `The account "${uiAccountDescription(accountId)}" is configured to use a access key for authentication and is missing a "personalAccessKey" in the configuration file`,
3585
3620
  personalAccessKeyTokenRetrievalFailed: (accountId) => `An OAuth2 access token for account "${uiAccountDescription(accountId)} could not be retrieved using the "personalAccessKey" provided`,
@@ -3624,7 +3659,7 @@ export const lib = {
3624
3659
  },
3625
3660
  noAppsEligible: (accountId, reasons) => `No apps in account ${accountId} are currently migratable${reasons.length ? `\n - ${reasons.join('\n - ')}` : ''}`,
3626
3661
  invalidAccountTypeTitle: `${chalk.bold('Developer account not targeted')}`,
3627
- invalidAccountTypeDescription: (useCommand, authCommand) => `Only public apps created in a developer account can be converted to a project component. Select a connected developer account with ${useCommand} or ${authCommand} and try again.`,
3662
+ invalidAccountTypeDescription: (useCommand) => `Only public apps created in a developer account can be converted to a project component. Select a connected developer account with ${useCommand} or ${uiAuthCommandReference()} and try again.`,
3628
3663
  appWithAppIdNotFound: (appId) => `Could not find an app with the id ${appId} `,
3629
3664
  noAppsForProject: (projectName) => `No apps associated with project ${projectName}`,
3630
3665
  migrationFailed: 'Migration Failed',