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

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 +7 -6
  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.d.ts CHANGED
@@ -864,7 +864,7 @@ Global configuration replaces hubspot.config.yml, and you will be prompted to mi
864
864
  readonly configFileUpdated: (authType: string, account: string | number) => string;
865
865
  };
866
866
  readonly logs: {
867
- readonly updateConfig: "To update an existing config file, use the \"hs auth\" command.";
867
+ readonly updateConfig: `To update an existing config file, use the ${string} command.`;
868
868
  };
869
869
  readonly errors: {
870
870
  readonly invalidAccountIdProvided: "--account must be a number.";
@@ -1081,7 +1081,7 @@ Profiles enable you to reference variables in your component configuration files
1081
1081
  readonly header: "HubSpot projects local development";
1082
1082
  readonly placeholderAccountSelection: "Using default account as target account (for now)";
1083
1083
  readonly 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.";
1084
- readonly learnMoreMessageV3: `Learn more about ${string} | ${string}`;
1084
+ readonly learnMoreMessageV2: `Learn more about ${string} | ${string}`;
1085
1085
  readonly learnMoreMessageLegacy: string;
1086
1086
  readonly profileProjectAccountExplanation: (accountId: number, profileName: string) => string;
1087
1087
  readonly defaultProjectAccountExplanation: (accountId: number) => string;
@@ -1099,7 +1099,7 @@ Profiles enable you to reference variables in your component configuration files
1099
1099
  readonly accountNotCombined: `
1100
1100
  Local development of unified apps is currently only compatible with accounts that are opted into the unified apps beta. Make sure that this account is opted in or switch accounts using ${string}.`;
1101
1101
  readonly unsupportedAccountFlagLegacy: "The --project-account and --testing-account flags are not supported for projects with platform versions earlier than 2025.2.";
1102
- readonly 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";
1102
+ readonly 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";
1103
1103
  };
1104
1104
  readonly examples: {
1105
1105
  readonly default: "Start local dev for the current project";
@@ -1448,7 +1448,7 @@ ${string}`;
1448
1448
  readonly uploadFailed: (remotePath: string, filePath: string) => string;
1449
1449
  readonly deleteFileFailed: (remotePath: string) => string;
1450
1450
  readonly deleteFolderFailed: (remotePath: string) => string;
1451
- readonly v3ApiError: (platformVersion: string) => string;
1451
+ readonly v2ApiError: (platformVersion: string) => string;
1452
1452
  };
1453
1453
  };
1454
1454
  readonly download: {
@@ -1529,6 +1529,17 @@ ${string}`;
1529
1529
  };
1530
1530
  };
1531
1531
  };
1532
+ readonly list: {
1533
+ readonly describe: "List uploaded projects that exist in the current target account";
1534
+ readonly projects: `${string}:`;
1535
+ readonly labels: {
1536
+ readonly name: "Name";
1537
+ readonly platformVersion: "Platform Version";
1538
+ };
1539
+ readonly errors: {
1540
+ readonly noProjectsFound: (accountId: number) => string;
1541
+ };
1542
+ };
1532
1543
  };
1533
1544
  readonly remove: {
1534
1545
  readonly describe: "Delete a file or folder from the HubSpot CMS.";
@@ -2701,10 +2712,14 @@ export declare const lib: {
2701
2712
  };
2702
2713
  };
2703
2714
  readonly AppDevModeInterface: {
2715
+ readonly autoInstallStaticAuthApp: {
2716
+ readonly installing: (appName: string, targetTestAccountId: number) => string;
2717
+ readonly success: (appName: string, targetTestAccountId: number) => string;
2718
+ readonly error: (appName: string, targetTestAccountId: number) => string;
2719
+ };
2704
2720
  readonly defaultMarketplaceAppWarning: (installCount: number) => string;
2705
2721
  readonly autoInstallDeclined: "You must install your app on your target test account to proceed with local development.";
2706
2722
  readonly autoInstallSuccess: (appName: string, targetTestAccountId: number) => string;
2707
- readonly autoInstallError: (appName: string, targetTestAccountId: number) => string;
2708
2723
  readonly fetchAppData: {
2709
2724
  readonly checking: (appName: string) => string;
2710
2725
  readonly success: (appName: string, accountId: number) => string;
@@ -2714,6 +2729,12 @@ export declare const lib: {
2714
2729
  };
2715
2730
  readonly distributionChanged: `Your app's distribution type has been changed from private to marketplace. Once uploaded, this change cannot be reversed. Before uploading your project, confirm that you want to ${string} change your app's distribution type. This will uninstall your app from all accounts.`;
2716
2731
  readonly authTypeChanged: `Your app's auth type has been changed from static to oauth. Once uploaded, this change cannot be reversed. Before uploading your project, confirm that you want to ${string} change your app's auth type. This will uninstall your app from all accounts.`;
2732
+ readonly installationFailed: "An error occured while installing your app. Your app must be installed in your target test account to proceed with local development.";
2733
+ readonly waitUntilAppIsInstalled: {
2734
+ readonly link: (installUrl: string) => string;
2735
+ readonly waiting: "Waiting for your app to be installed...";
2736
+ readonly success: (appName: string, accountId: number) => string;
2737
+ };
2717
2738
  };
2718
2739
  readonly LocalDevWebsocketServer: {
2719
2740
  readonly errors: {
@@ -2955,7 +2976,7 @@ Run ${string} to upgrade to version ${string}`;
2955
2976
  readonly message: (command: string) => string;
2956
2977
  };
2957
2978
  readonly accountsUseCommand: {
2958
- readonly command: "hs accounts use";
2979
+ readonly command: "hs account use";
2959
2980
  readonly message: (command: string) => string;
2960
2981
  };
2961
2982
  readonly authCommand: {
@@ -3020,7 +3041,7 @@ Run ${string} to upgrade to version ${string}`;
3020
3041
  };
3021
3042
  };
3022
3043
  readonly buildAccount: {
3023
- readonly createDeveloperTestAccountV3: {
3044
+ readonly createDeveloperTestAccountV2: {
3024
3045
  readonly syncFailure: "Failed to sync developer test account";
3025
3046
  readonly pakFailure: "Failed to generate personal access key for developer test account";
3026
3047
  };
@@ -3084,6 +3105,21 @@ Run ${string} to upgrade to version ${string}`;
3084
3105
  readonly mergeConflictMessage: (count: number, propertyList: string) => string;
3085
3106
  readonly mergeConfigConflictPrompt: (property: string, newValue: string, oldValue: string) => string;
3086
3107
  };
3108
+ readonly handleAccountNameConflicts: {
3109
+ readonly warnings: {
3110
+ readonly accountNameConflictMessage: (count: number) => string;
3111
+ readonly forceFlagDetected: (count: number, renameDetails: string) => string;
3112
+ };
3113
+ readonly prompts: {
3114
+ readonly renameOrOmitAccountPrompt: (accountName: string, accountId: number) => string;
3115
+ readonly newAccountNamePrompt: (accountName: string, portalId: number) => string;
3116
+ };
3117
+ readonly errors: {
3118
+ readonly nameRequired: "The name may not be blank. Please add a name for the config.";
3119
+ readonly sameName: "The new account name must be different from the current name.";
3120
+ readonly nameAlreadyInConfig: (name: string) => string;
3121
+ };
3122
+ };
3087
3123
  readonly handleMerge: {
3088
3124
  readonly description: (archivedConfigName: string) => string;
3089
3125
  readonly confirmPrompt: "Merge the deprecated config into your global config?";
@@ -3116,7 +3152,7 @@ Run ${string} to upgrade to version ${string}`;
3116
3152
  readonly chooseDefaultAccountOption: `<${string} Test on this production account ${string}>`;
3117
3153
  readonly promptMessage: (accountType: string, accountIdentifier: string) => string;
3118
3154
  readonly sandboxLimit: (limit: number) => string;
3119
- readonly sandboxLimitWithSuggestion: (limit: number, authCommand: string) => string;
3155
+ readonly sandboxLimitWithSuggestion: (limit: number) => string;
3120
3156
  readonly developerTestAccountLimit: (limit: number) => string;
3121
3157
  readonly confirmDefaultAccount: (accountName: string, accountType: string) => string;
3122
3158
  readonly confirmUseExistingDeveloperTestAccount: (accountName: string) => string;
@@ -3329,7 +3365,6 @@ Run ${string} to upgrade to version ${string}`;
3329
3365
  readonly installAppPrompt: {
3330
3366
  readonly explanation: "Local development requires this app to be installed in the target test account.";
3331
3367
  readonly 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.";
3332
- readonly staticAuthExplanation: (projectAccountId: number, testingAccountId: number, projectName: string, appUid: string) => string;
3333
3368
  readonly prompt: "Open HubSpot to install this app?";
3334
3369
  readonly autoPrompt: "Install this app in your target test account?";
3335
3370
  readonly reinstallPrompt: "Open HubSpot to reinstall this app?";
@@ -3485,7 +3520,7 @@ Run ${string} to upgrade to version ${string}`;
3485
3520
  readonly docsLink: "Projects platform versioning (BETA)";
3486
3521
  readonly betaLink: (docsLink: string) => string;
3487
3522
  };
3488
- readonly missingScopeError: (request: string, accountName: string, authCommand: string) => string;
3523
+ readonly missingScopeError: (request: string, accountName: string) => string;
3489
3524
  };
3490
3525
  };
3491
3526
  readonly serverless: {
@@ -3493,7 +3528,7 @@ Run ${string} to upgrade to version ${string}`;
3493
3528
  readonly fetchScopeDataError: (scopeGroup: string) => string;
3494
3529
  readonly portalMissingScope: "Your account does not have access to this action. Talk to an account admin to request it.";
3495
3530
  readonly userMissingScope: "You don't have access to this action. Ask an account admin to change your permissions in Users & Teams settings.";
3496
- readonly genericMissingScope: "Your access key does not allow this action. Please generate a new access key by running `hs auth personalaccesskey`.";
3531
+ readonly genericMissingScope: `Your access key does not allow this action. Please generate a new access key by running ${string}.`;
3497
3532
  };
3498
3533
  };
3499
3534
  readonly doctor: {
@@ -3506,9 +3541,9 @@ Run ${string} to upgrade to version ${string}`;
3506
3541
  readonly unableToDetermine: "Unable to determine if the portal is active";
3507
3542
  readonly pak: {
3508
3543
  readonly incomplete: "Personal access key is valid, but there are more scopes available to your user that are not included in your key.";
3509
- readonly incompleteSecondary: (command: string, link: string) => string;
3544
+ readonly incompleteSecondary: (link: string) => string;
3510
3545
  readonly invalid: "Personal access key is invalid";
3511
- readonly invalidSecondary: (command: string) => string;
3546
+ readonly invalidSecondary: `To get a new key, run ${string}, deactivate your access key, and generate a new one. Then use that new key to authenticate your account.`;
3512
3547
  readonly valid: (link: string) => string;
3513
3548
  readonly viewScopes: "View selected scopes";
3514
3549
  };
@@ -3633,7 +3668,7 @@ Run ${string} to upgrade to version ${string}`;
3633
3668
  };
3634
3669
  readonly noAppsEligible: (accountId: string, reasons: string[]) => string;
3635
3670
  readonly invalidAccountTypeTitle: string;
3636
- readonly invalidAccountTypeDescription: (useCommand: string, authCommand: string) => string;
3671
+ readonly invalidAccountTypeDescription: (useCommand: string) => string;
3637
3672
  readonly appWithAppIdNotFound: (appId: number) => string;
3638
3673
  readonly noAppsForProject: (projectName: string) => string;
3639
3674
  readonly migrationFailed: "Migration Failed";