@hubspot/cli 7.7.16-experimental.0 → 7.7.16-experimental.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.
- package/bin/cli.js +4 -0
- package/bin/hs +1 -1
- package/commands/getStarted.d.ts +9 -0
- package/commands/getStarted.js +227 -0
- package/commands/init.js +6 -1
- package/commands/mcp/setup.d.ts +2 -2
- package/commands/mcp/setup.js +2 -0
- package/commands/mcp/start.d.ts +2 -2
- package/commands/mcp/start.js +3 -1
- package/commands/project/deploy.d.ts +1 -0
- package/commands/project/deploy.js +29 -3
- package/commands/project/upload.d.ts +2 -2
- package/commands/project/upload.js +18 -23
- package/commands/project/validate.d.ts +6 -0
- package/commands/project/validate.js +82 -0
- package/commands/project.js +2 -0
- package/commands/testAccount/create.d.ts +6 -0
- package/commands/testAccount/create.js +110 -0
- package/commands/testAccount/createConfig.d.ts +10 -0
- package/commands/testAccount/createConfig.js +98 -0
- package/commands/testAccount/delete.d.ts +6 -0
- package/commands/testAccount/delete.js +48 -0
- package/commands/testAccount.d.ts +3 -0
- package/commands/testAccount.js +28 -0
- package/lang/en.d.ts +143 -29
- package/lang/en.js +143 -32
- package/lang/en.lyaml +9 -14
- package/lib/app/migrate.js +15 -3
- package/lib/commonOpts.d.ts +2 -0
- package/lib/commonOpts.js +21 -9
- package/lib/constants.d.ts +5 -0
- package/lib/constants.js +6 -1
- package/lib/doctor/Doctor.js +1 -1
- package/lib/errorHandlers/index.js +7 -0
- package/lib/mcp/setup.d.ts +9 -0
- package/lib/mcp/setup.js +23 -21
- package/lib/projectProfiles.d.ts +1 -0
- package/lib/projectProfiles.js +18 -0
- package/lib/projects/buildAndDeploy.js +1 -1
- package/lib/projects/localDev/AppDevModeInterface.d.ts +3 -0
- package/lib/projects/localDev/AppDevModeInterface.js +45 -16
- package/lib/projects/localDev/LocalDevManager.js +1 -1
- package/lib/projects/upload.d.ts +3 -0
- package/lib/projects/upload.js +56 -22
- package/lib/projects/urls.d.ts +2 -0
- package/lib/projects/urls.js +10 -0
- package/lib/prompts/createDeveloperTestAccountConfigPrompt.d.ts +17 -0
- package/lib/prompts/createDeveloperTestAccountConfigPrompt.js +96 -0
- package/lib/prompts/installAppPrompt.d.ts +2 -1
- package/lib/prompts/installAppPrompt.js +12 -2
- package/lib/prompts/promptUtils.d.ts +1 -0
- package/lib/prompts/promptUtils.js +2 -0
- package/lib/ui/logger.d.ts +1 -0
- package/lib/ui/logger.js +1 -0
- package/lib/yargsUtils.d.ts +1 -0
- package/lib/yargsUtils.js +3 -0
- package/mcp-server/tools/index.js +2 -0
- package/mcp-server/tools/project/CreateProjectTool.d.ts +3 -3
- package/mcp-server/tools/project/CreateProjectTool.js +5 -1
- package/mcp-server/tools/project/DeployProject.js +1 -1
- package/mcp-server/tools/project/UploadProjectTools.js +1 -1
- package/mcp-server/tools/project/ValidateProjectTool.d.ts +17 -0
- package/mcp-server/tools/project/ValidateProjectTool.js +35 -0
- package/package.json +10 -9
- package/types/LocalDev.d.ts +1 -0
- package/types/Yargs.d.ts +4 -0
package/lang/en.js
CHANGED
|
@@ -22,6 +22,51 @@ exports.commands = {
|
|
|
22
22
|
configFileExists: (configPath) => `A configuration file already exists at ${configPath}. To specify a new configuration file, delete the existing one and try again.`,
|
|
23
23
|
},
|
|
24
24
|
},
|
|
25
|
+
getStarted: {
|
|
26
|
+
options: {
|
|
27
|
+
dest: {
|
|
28
|
+
describe: 'Directory where the project should be created',
|
|
29
|
+
},
|
|
30
|
+
name: {
|
|
31
|
+
describe: 'Project name (cannot be changed)',
|
|
32
|
+
},
|
|
33
|
+
templateSource: {
|
|
34
|
+
describe: 'Path to custom GitHub repository from which to create project template',
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
startTitle: 'Welcome to HubSpot Development!',
|
|
38
|
+
verboseDescribe: 'A step-by-step command to get you started with a HubSpot project.',
|
|
39
|
+
startDescription: 'You can use the HubSpot CLI to build apps, CMS themes, and more.',
|
|
40
|
+
designManager: 'To onboard with CMS, please visit the HubSpot Design Manager in your account and follow the checklist items.',
|
|
41
|
+
openDesignManager: 'Click here to go to the HubSpot Design Manager',
|
|
42
|
+
openDesignManagerPrompt: 'Open Design Manager in your browser?',
|
|
43
|
+
openedDesignManager: 'Redirected to Design Manager!',
|
|
44
|
+
developerOverviewBrowserOpenPrep: "We'll take you to your HubSpot account and walk you through installing and previewing your new app.",
|
|
45
|
+
openDeveloperOverviewPrompt: 'Open HubSpot to go to your account?',
|
|
46
|
+
openedDeveloperOverview: 'HubSpot opened!',
|
|
47
|
+
prompts: {
|
|
48
|
+
selectOption: 'Are you looking to build apps or CMS?',
|
|
49
|
+
options: {
|
|
50
|
+
app: 'App',
|
|
51
|
+
cms: 'CMS',
|
|
52
|
+
},
|
|
53
|
+
uploadProject: 'Would you like to upload your project to HubSpot now?',
|
|
54
|
+
appSelected: `We'll create a new project with a sample app for you.\nProjects are what you can use to create apps, themes, and more at HubSpot.\nUsually you'll use the ${(0, ui_1.uiCommandReference)('hs project create')} command, but we'll go ahead and make one now.`,
|
|
55
|
+
projectCreated: {
|
|
56
|
+
title: chalk_1.default.bold('Next steps:'),
|
|
57
|
+
description: `Upload your project to HubSpot - typically, you'll use the command ${(0, ui_1.uiCommandReference)('hs project upload')} for this.\nWe'll start the process now.`,
|
|
58
|
+
},
|
|
59
|
+
},
|
|
60
|
+
logs: {
|
|
61
|
+
uploadingProject: 'Uploading your project to HubSpot...',
|
|
62
|
+
uploadSuccess: 'Project uploaded successfully!',
|
|
63
|
+
developerOverviewLink: 'Open this link to navigate to your HubSpot developer portal',
|
|
64
|
+
},
|
|
65
|
+
errors: {
|
|
66
|
+
uploadFailed: 'Failed to upload project to HubSpot.',
|
|
67
|
+
configFileNotFound: 'Could not find project configuration for upload.',
|
|
68
|
+
},
|
|
69
|
+
},
|
|
25
70
|
completion: {
|
|
26
71
|
describe: 'Enable bash completion shortcuts for commands. Concat the generated script to your .bashrc, .bash_profile, or .zshrc file.',
|
|
27
72
|
examples: {
|
|
@@ -788,7 +833,7 @@ exports.commands = {
|
|
|
788
833
|
client: 'Target applications to configure',
|
|
789
834
|
docsSearch: 'Should the docs search mcp server be installed',
|
|
790
835
|
},
|
|
791
|
-
success: (derivedTargets) => `You can now use the HubSpot CLI
|
|
836
|
+
success: (derivedTargets) => `You can now use the HubSpot CLI MCP Server in ${derivedTargets.join(', ')}. ${chalk_1.default.bold('You may need to restart these tools to apply the changes')}.`,
|
|
792
837
|
errors: {
|
|
793
838
|
needsNode20: `This feature requires node >=20`,
|
|
794
839
|
},
|
|
@@ -802,13 +847,11 @@ exports.commands = {
|
|
|
802
847
|
claudeCodeInstallFailed: 'Claude Code CLI not working - skipping configuration',
|
|
803
848
|
failedToConfigureClaudeDesktop: 'Failed to configure Claude Desktop',
|
|
804
849
|
configuringCursor: 'Configuring Cursor...',
|
|
805
|
-
noCursorMcpFile: (configFile) => `No ${configFile} file found - skipping Cursor configuration`,
|
|
806
850
|
failedToConfigureCursor: 'Failed to configure Cursor',
|
|
807
851
|
configuredCursor: 'Configured Cursor',
|
|
808
852
|
alreadyInstalled: 'HubSpot CLI mcp server already installed, reinstalling',
|
|
809
|
-
configuringWindsurf: 'Configuring
|
|
810
|
-
|
|
811
|
-
failedToConfigureWindsurf: 'Failed to configure Cursor',
|
|
853
|
+
configuringWindsurf: 'Configuring Windsurf...',
|
|
854
|
+
failedToConfigureWindsurf: 'Failed to configure Windsurf',
|
|
812
855
|
configuredWindsurf: 'Configured Windsurf',
|
|
813
856
|
},
|
|
814
857
|
prompts: {
|
|
@@ -1322,6 +1365,20 @@ exports.commands = {
|
|
|
1322
1365
|
noPackageJsonInProject: (projectName, link) => `No dependencies to install. The project ${projectName} folder might be missing component or subcomponent files. ${link}`,
|
|
1323
1366
|
packageManagerNotInstalled: (packageManager, link) => `This command depends on ${packageManager}, install ${chalk_1.default.bold(link)}`,
|
|
1324
1367
|
},
|
|
1368
|
+
validate: {
|
|
1369
|
+
describe: 'Validate the project before uploading',
|
|
1370
|
+
mustBeRanWithinAProject: 'This command must be run from within a project directory.',
|
|
1371
|
+
badVersion: 'This command is only available for projects 2025.2 and later.',
|
|
1372
|
+
examples: {
|
|
1373
|
+
default: 'Validate the project before uploading',
|
|
1374
|
+
},
|
|
1375
|
+
success: (projectName) => `Project ${projectName} is valid and ready to upload`,
|
|
1376
|
+
options: {
|
|
1377
|
+
profile: {
|
|
1378
|
+
describe: 'The profile to target for this validation',
|
|
1379
|
+
},
|
|
1380
|
+
},
|
|
1381
|
+
},
|
|
1325
1382
|
},
|
|
1326
1383
|
remove: {
|
|
1327
1384
|
describe: 'Delete a file or folder from the HubSpot CMS.',
|
|
@@ -1726,6 +1783,62 @@ exports.commands = {
|
|
|
1726
1783
|
missingSrc: 'Please specify the path to your javascript fields file or directory with the --src flag.',
|
|
1727
1784
|
},
|
|
1728
1785
|
},
|
|
1786
|
+
testAccount: {
|
|
1787
|
+
describe: 'Commands for working with test accounts.',
|
|
1788
|
+
create: {
|
|
1789
|
+
describe: 'Create a test account from a config file',
|
|
1790
|
+
configPathPrompt: '[--config-path] Enter the path to the test account config: ',
|
|
1791
|
+
createTestAccountFromConfigPrompt: 'How would you like to create your test account?',
|
|
1792
|
+
createFromConfigOption: 'Create test account from config file',
|
|
1793
|
+
createFromScratchOption: 'Create test account from scratch',
|
|
1794
|
+
errors: {
|
|
1795
|
+
configFileNotFound: (configPath) => `No test account config file exists at ${configPath}. Create a test account config file with the ${(0, ui_1.uiCommandReference)('hs test-account create-config')} command.`,
|
|
1796
|
+
configFileParseFailed: (configPath) => `Failed to parse test account config file at ${configPath}`,
|
|
1797
|
+
failedToCreate: 'Failed to create test account',
|
|
1798
|
+
},
|
|
1799
|
+
success: {
|
|
1800
|
+
configFileUpdated: (testAccountName, testAccountId) => `Test account "${testAccountName}" successfully created with id ${testAccountId}`,
|
|
1801
|
+
},
|
|
1802
|
+
options: {
|
|
1803
|
+
configPath: 'The path to the test account config',
|
|
1804
|
+
},
|
|
1805
|
+
example: (configPath) => `Create a test account from the config file at ${configPath}`,
|
|
1806
|
+
},
|
|
1807
|
+
createConfig: {
|
|
1808
|
+
describe: 'Create a test account config file.',
|
|
1809
|
+
pathPrompt: '[--path] What is the path to the test account config?',
|
|
1810
|
+
errors: {
|
|
1811
|
+
pathError: 'Path is required',
|
|
1812
|
+
pathFormatError: 'Path must end with .json',
|
|
1813
|
+
failedToCreate: 'Failed to create test account config',
|
|
1814
|
+
pathExistsError: 'A file already exists at this path. Please try again with a different path.',
|
|
1815
|
+
},
|
|
1816
|
+
success: {
|
|
1817
|
+
configFileCreated: (path) => `Test account config successfully created at ${path}`,
|
|
1818
|
+
},
|
|
1819
|
+
options: {
|
|
1820
|
+
name: 'The name of the test account',
|
|
1821
|
+
description: 'The description of the test account',
|
|
1822
|
+
tiers: 'The tiers of the test account',
|
|
1823
|
+
path: 'The path to the test account config',
|
|
1824
|
+
},
|
|
1825
|
+
example: (name) => `Create a test account config file with the name "${name}"`,
|
|
1826
|
+
},
|
|
1827
|
+
delete: {
|
|
1828
|
+
describe: 'Delete a test account config file.',
|
|
1829
|
+
pathPrompt: '[--path] What is the path to the test account config?',
|
|
1830
|
+
errors: {
|
|
1831
|
+
failedToDelete: 'Failed to delete test account',
|
|
1832
|
+
},
|
|
1833
|
+
success: {
|
|
1834
|
+
testAccountDeleted: (testAccountId) => `Test account with id ${testAccountId} successfully deleted`,
|
|
1835
|
+
},
|
|
1836
|
+
positionals: {
|
|
1837
|
+
testAccountId: 'The id of the test account',
|
|
1838
|
+
},
|
|
1839
|
+
example: (testAccountId) => `Delete a test account with the id "${testAccountId}"`,
|
|
1840
|
+
},
|
|
1841
|
+
},
|
|
1729
1842
|
secrets: {
|
|
1730
1843
|
add: {
|
|
1731
1844
|
loading: {
|
|
@@ -2320,7 +2433,6 @@ exports.lib = {
|
|
|
2320
2433
|
noCompatibleComponents: (serverKey) => `Skipping call to ${serverKey} because there are no compatible components in the project.`,
|
|
2321
2434
|
},
|
|
2322
2435
|
LocalDevManager: {
|
|
2323
|
-
staticAuthAccountsMustMatch: 'You must test static auth apps in the account the project exists in',
|
|
2324
2436
|
appNotFound: (accountId, appUid) => `Unable to find app with uid ${appUid} in account ${(0, ui_1.uiAccountDescription)(accountId)}`,
|
|
2325
2437
|
failedToInitialize: 'Missing required arguments to initialize Local Dev',
|
|
2326
2438
|
noDeployedBuild: (projectName, accountIdentifier, uploadCommand) => `Your project ${chalk_1.default.bold(projectName)} exists in ${accountIdentifier}, but has no deployed build. Projects must be successfully deployed to be developed locally. Address any build and deploy errors your project may have, then run ${uploadCommand} to upload and deploy your project.`,
|
|
@@ -2365,6 +2477,9 @@ exports.lib = {
|
|
|
2365
2477
|
},
|
|
2366
2478
|
AppDevModeInterface: {
|
|
2367
2479
|
defaultMarketplaceAppWarning: (installCount) => `\n\nYour marketplace app is currently installed in ${chalk_1.default.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 proceding.`,
|
|
2480
|
+
autoInstallDeclined: 'You must install your app on your target test account to proceed with local development.',
|
|
2481
|
+
autoInstallSuccess: (appName, targetTestAccountId) => `Successfully installed app ${appName} on account ${(0, ui_1.uiAccountDescription)(targetTestAccountId)}\n`,
|
|
2482
|
+
autoInstallError: (appName, targetTestAccountId) => `Error installing app ${appName} on account ${(0, ui_1.uiAccountDescription)(targetTestAccountId)}. You may still be able to install your app in your browser.`,
|
|
2368
2483
|
},
|
|
2369
2484
|
LocalDevWebsocketServer: {
|
|
2370
2485
|
errors: {
|
|
@@ -2513,8 +2628,8 @@ exports.lib = {
|
|
|
2513
2628
|
pollProjectBuildAndDeploy: {
|
|
2514
2629
|
buildSucceededAutomaticallyDeploying: (buildId, accountIdentifier) => `Build #${buildId} succeeded. ${chalk_1.default.bold('Automatically deploying')} to ${accountIdentifier}\n`,
|
|
2515
2630
|
cleanedUpTempFile: (path) => `Cleaned up temporary file ${path}`,
|
|
2516
|
-
viewDeploys: '
|
|
2517
|
-
unableToFindAutodeployStatus: (buildId, viewDeploysLink) => `Unable to find the auto deploy for build #${buildId}. This deploy may have been skipped. ${viewDeploysLink}.`,
|
|
2631
|
+
viewDeploys: 'view all deploys for this project in HubSpot',
|
|
2632
|
+
unableToFindAutodeployStatus: (buildId, viewDeploysLink) => `Unable to find the auto deploy for build #${buildId}. This deploy may have been skipped or blocked due to components being removed. Manually deploy with ${(0, ui_1.uiCommandReference)('hs project deploy')} or ${viewDeploysLink}.`,
|
|
2518
2633
|
},
|
|
2519
2634
|
},
|
|
2520
2635
|
projectUpload: {
|
|
@@ -2594,7 +2709,7 @@ exports.lib = {
|
|
|
2594
2709
|
},
|
|
2595
2710
|
projectDevCommand: {
|
|
2596
2711
|
command: 'hs project dev',
|
|
2597
|
-
message: (command) => `Run ${command} to set up your test environment and start local development`,
|
|
2712
|
+
message: (command) => `Run ${command} from within your project directory to set up your test environment and start local development`,
|
|
2598
2713
|
},
|
|
2599
2714
|
projectInstallDepsCommand: {
|
|
2600
2715
|
command: 'hs project install-deps',
|
|
@@ -2650,31 +2765,18 @@ exports.lib = {
|
|
|
2650
2765
|
},
|
|
2651
2766
|
commonOpts: {
|
|
2652
2767
|
options: {
|
|
2653
|
-
account:
|
|
2654
|
-
|
|
2655
|
-
|
|
2656
|
-
config: {
|
|
2657
|
-
describe: 'Path to a config file',
|
|
2658
|
-
},
|
|
2659
|
-
overwrite: {
|
|
2660
|
-
describe: 'Overwrite existing files',
|
|
2661
|
-
},
|
|
2768
|
+
account: 'HubSpot account id or name from config',
|
|
2769
|
+
config: 'Path to a config file',
|
|
2770
|
+
overwrite: 'Overwrite existing files',
|
|
2662
2771
|
modes: {
|
|
2663
|
-
|
|
2664
|
-
|
|
2665
|
-
|
|
2666
|
-
write: (modes) => `Write to ${modes}`,
|
|
2667
|
-
},
|
|
2668
|
-
},
|
|
2669
|
-
qa: {
|
|
2670
|
-
describe: 'Run command in QA mode',
|
|
2671
|
-
},
|
|
2672
|
-
useEnv: {
|
|
2673
|
-
describe: 'Use environment variable config',
|
|
2674
|
-
},
|
|
2675
|
-
debug: {
|
|
2676
|
-
describe: 'Set log level to debug',
|
|
2772
|
+
default: (modes) => `${modes}`,
|
|
2773
|
+
read: (modes) => `Read from ${modes}`,
|
|
2774
|
+
write: (modes) => `Write to ${modes}`,
|
|
2677
2775
|
},
|
|
2776
|
+
qa: 'Run command in QA mode',
|
|
2777
|
+
useEnv: 'Use environment variable config',
|
|
2778
|
+
jsonOutput: 'Format output as JSON',
|
|
2779
|
+
debug: 'Set log level to debug',
|
|
2678
2780
|
},
|
|
2679
2781
|
},
|
|
2680
2782
|
configMigrate: {
|
|
@@ -2716,6 +2818,14 @@ exports.lib = {
|
|
|
2716
2818
|
setAsDefaultAccount: (accountName) => `Account "${accountName}" set as the default account`,
|
|
2717
2819
|
keepingCurrentDefault: (accountName) => `Account "${accountName}" will continue to be the default account`,
|
|
2718
2820
|
},
|
|
2821
|
+
createDeveloperTestAccountConfigPrompt: {
|
|
2822
|
+
namePrompt: '[--name] What is the name of the test account?',
|
|
2823
|
+
descriptionPrompt: '[--description] What is the description of the test account?',
|
|
2824
|
+
tiersPrompt: '[--tiers] Which product tiers should the test account have?',
|
|
2825
|
+
errors: {
|
|
2826
|
+
tiersError: 'Cannot have more than one tier per hub',
|
|
2827
|
+
},
|
|
2828
|
+
},
|
|
2719
2829
|
accountNamePrompt: {
|
|
2720
2830
|
enterAccountName: 'Enter a unique name to reference this account in the CLI:',
|
|
2721
2831
|
enterDeveloperTestAccountName: 'Name your developer test account:',
|
|
@@ -2888,6 +2998,7 @@ exports.lib = {
|
|
|
2888
2998
|
explanation: 'Local development requires this app to be installed in the target test account',
|
|
2889
2999
|
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.",
|
|
2890
3000
|
prompt: 'Open HubSpot to install this app?',
|
|
3001
|
+
autoPrompt: 'Install this app in your target test account?',
|
|
2891
3002
|
reinstallPrompt: 'Open HubSpot to reinstall this app?',
|
|
2892
3003
|
decline: `To continue local development of this app, install it in your target test account and re-run ${chalk_1.default.bold('`hs project dev`')}`,
|
|
2893
3004
|
},
|
package/lang/en.lyaml
CHANGED
|
@@ -694,6 +694,7 @@ en:
|
|
|
694
694
|
buildIdDoesNotExist: "Build {{ buildId }} does not exist for project {{ projectName }}. {{ linkToProject }}"
|
|
695
695
|
buildAlreadyDeployed: "Build {{ buildId }} is already deployed. {{ linkToProject}}"
|
|
696
696
|
viewProjectsBuilds: 'View project builds in HubSpot'
|
|
697
|
+
deployContainsRemovals: "- This deploy would remove the {{#bold}}{{ componentName }}{{/bold}} component. To proceed, run the deploy command with the {{ forceFlag }} flag"
|
|
697
698
|
examples:
|
|
698
699
|
default: "Deploy the latest build of the current project"
|
|
699
700
|
withOptions: "Deploy build 5 of the project my-project"
|
|
@@ -704,6 +705,8 @@ en:
|
|
|
704
705
|
describe: "Project name"
|
|
705
706
|
profile:
|
|
706
707
|
describe: "The profile to target with this deploy"
|
|
708
|
+
force:
|
|
709
|
+
describe: "Skip warnings and force deploy. Use this carefully as it will bypass warnings for destructive actions."
|
|
707
710
|
listBuilds:
|
|
708
711
|
describe: "List the project's builds."
|
|
709
712
|
continueOrExitPrompt: "Press <enter> to load more, or ctrl+c to exit"
|
|
@@ -1049,19 +1052,6 @@ en:
|
|
|
1049
1052
|
logFeedbackMessage:
|
|
1050
1053
|
feedbackHeader: "We'd love to hear your feedback!"
|
|
1051
1054
|
feedbackMessage: "How are you liking the new projects and developer tools? \n > Run `{{#yellow}}hs feedback{{/yellow}}` to let us know what you think!\n"
|
|
1052
|
-
projectBuildAndDeploy:
|
|
1053
|
-
makePollTaskStatusFunc:
|
|
1054
|
-
componentCountSingular: "Found 1 component in this project"
|
|
1055
|
-
componentCount: "Found {{ numComponents }} components in this project"
|
|
1056
|
-
successStatusText: "DONE"
|
|
1057
|
-
failedStatusText: "FAILED"
|
|
1058
|
-
errorFetchingTaskStatus: "An error occurred while fetching the status of the current {{ taskType }}. For more information, view this project in HubSpot by running {{ openCommand }}."
|
|
1059
|
-
pollBuildAutodeployStatusError: "Error fetching autodeploy status for build #{{ buildId }}"
|
|
1060
|
-
pollProjectBuildAndDeploy:
|
|
1061
|
-
buildSucceededAutomaticallyDeploying: "Build #{{ buildId }} succeeded. {{#bold}}Automatically deploying{{/bold}} to {{ accountIdentifier }}\n"
|
|
1062
|
-
cleanedUpTempFile: "Cleaned up temporary file {{ path }}"
|
|
1063
|
-
viewDeploys: "View all deploys for this project in HubSpot"
|
|
1064
|
-
unableToFindAutodeployStatus: "Unable to find the auto deploy for build #{{ buildId }}. This deploy may have been skipped. {{ viewDeploysLink }}."
|
|
1065
1055
|
projectUpload:
|
|
1066
1056
|
uploadProjectFiles:
|
|
1067
1057
|
add: "Uploading {{#bold}}{{ projectName }}{{/bold}} project files to {{ accountIdentifier }}"
|
|
@@ -1107,6 +1097,9 @@ en:
|
|
|
1107
1097
|
feedbackCommand:
|
|
1108
1098
|
command: "hs feedback"
|
|
1109
1099
|
message: "Run {{ command }} to report a bug or leave feedback"
|
|
1100
|
+
getStartedCommand:
|
|
1101
|
+
command: "hs get-started"
|
|
1102
|
+
message: "Run {{ command }} to get started with HubSpot development"
|
|
1110
1103
|
helpCommand:
|
|
1111
1104
|
command: "hs help"
|
|
1112
1105
|
message: "Run {{ command }} to see a list of available commands"
|
|
@@ -1124,7 +1117,7 @@ en:
|
|
|
1124
1117
|
message: "Run {{ command }} to upload your project to your HubSpot account"
|
|
1125
1118
|
projectDevCommand:
|
|
1126
1119
|
command: "hs project dev"
|
|
1127
|
-
message: "Run {{ command }} to set up your test environment and start local development"
|
|
1120
|
+
message: "Run {{ command }} from within your project directory to set up your test environment and start local development"
|
|
1128
1121
|
projectInstallDepsCommand:
|
|
1129
1122
|
command: "hs project install-deps"
|
|
1130
1123
|
message: "Run {{ command }} to install dependencies for your project components"
|
|
@@ -1165,6 +1158,8 @@ en:
|
|
|
1165
1158
|
describe: "Use environment variable config"
|
|
1166
1159
|
debug:
|
|
1167
1160
|
describe: "Set log level to debug"
|
|
1161
|
+
jsonOutput:
|
|
1162
|
+
describe: "Format output as JSON"
|
|
1168
1163
|
prompts:
|
|
1169
1164
|
projectDevTargetAccountPrompt:
|
|
1170
1165
|
createNewSandboxOption: "<Test on a new development sandbox>"
|
package/lib/app/migrate.js
CHANGED
|
@@ -236,9 +236,21 @@ async function beginMigration(derivedAccountId, appId, platformVersion) {
|
|
|
236
236
|
if (Object.values(componentsRequiringUids).length !== 0) {
|
|
237
237
|
for (const [componentId, component] of Object.entries(componentsRequiringUids)) {
|
|
238
238
|
const { componentHint, componentType } = component;
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
239
|
+
// Extract the internal ID from the base64-encoded ComponentExternalId
|
|
240
|
+
let internalId;
|
|
241
|
+
try {
|
|
242
|
+
const decoded = Buffer.from(componentId, 'base64').toString('utf8');
|
|
243
|
+
const parts = decoded.split('$$');
|
|
244
|
+
internalId = parts[1] || componentId;
|
|
245
|
+
}
|
|
246
|
+
catch {
|
|
247
|
+
// If decoding fails, use the componentId as the internalId
|
|
248
|
+
internalId = componentId;
|
|
249
|
+
}
|
|
250
|
+
const promptText = componentHint
|
|
251
|
+
? `${(0, transform_1.mapToUserFacingType)(componentType)} '${componentHint}' (ID: ${internalId})`
|
|
252
|
+
: `${(0, transform_1.mapToUserFacingType)(componentType)} (ID: ${internalId})`;
|
|
253
|
+
uidMap[componentId] = await (0, promptUtils_1.inputPrompt)(en_1.lib.migrate.prompt.uidForComponent(promptText), {
|
|
242
254
|
validate: (uid) => {
|
|
243
255
|
const result = (0, project_parsing_lib_1.validateUid)(uid);
|
|
244
256
|
return result === undefined ? true : result;
|
package/lib/commonOpts.d.ts
CHANGED
|
@@ -11,10 +11,12 @@ export declare function addCmsPublishModeOptions(yargs: Argv, { read, write }: {
|
|
|
11
11
|
}): Argv;
|
|
12
12
|
export declare function addTestingOptions(yargs: Argv): Argv;
|
|
13
13
|
export declare function addUseEnvironmentOptions(yargs: Argv): Argv;
|
|
14
|
+
export declare function addJSONOutputOptions(yargs: Argv): Argv;
|
|
14
15
|
export declare function addCustomHelpOutput(yargs: Argv, command: string | string[], describe?: string): Promise<void>;
|
|
15
16
|
export declare function setLogLevel(options: Arguments<{
|
|
16
17
|
debug?: boolean;
|
|
17
18
|
networkDebug?: boolean;
|
|
19
|
+
json?: boolean;
|
|
18
20
|
}>): void;
|
|
19
21
|
export declare function getCommandName(argv: Arguments): string;
|
|
20
22
|
export declare function getCmsPublishMode(options: Arguments<{
|
package/lib/commonOpts.js
CHANGED
|
@@ -10,6 +10,7 @@ exports.addOverwriteOptions = addOverwriteOptions;
|
|
|
10
10
|
exports.addCmsPublishModeOptions = addCmsPublishModeOptions;
|
|
11
11
|
exports.addTestingOptions = addTestingOptions;
|
|
12
12
|
exports.addUseEnvironmentOptions = addUseEnvironmentOptions;
|
|
13
|
+
exports.addJSONOutputOptions = addJSONOutputOptions;
|
|
13
14
|
exports.addCustomHelpOutput = addCustomHelpOutput;
|
|
14
15
|
exports.setLogLevel = setLogLevel;
|
|
15
16
|
exports.getCommandName = getCommandName;
|
|
@@ -19,16 +20,16 @@ const yargs_parser_1 = __importDefault(require("yargs-parser"));
|
|
|
19
20
|
const logger_1 = require("@hubspot/local-dev-lib/logger");
|
|
20
21
|
const files_1 = require("@hubspot/local-dev-lib/constants/files");
|
|
21
22
|
const config_1 = require("@hubspot/local-dev-lib/config");
|
|
22
|
-
const lang_1 = require("./lang");
|
|
23
23
|
const errorHandlers_1 = require("./errorHandlers");
|
|
24
24
|
const exitCodes_1 = require("./enums/exitCodes");
|
|
25
25
|
const ui_1 = require("./ui");
|
|
26
|
+
const lang_1 = require("./lang");
|
|
26
27
|
function addGlobalOptions(yargs) {
|
|
27
28
|
yargs.version(false);
|
|
28
29
|
yargs.option('debug', {
|
|
29
30
|
alias: 'd',
|
|
30
31
|
default: false,
|
|
31
|
-
describe: (0, lang_1.i18n)(
|
|
32
|
+
describe: (0, lang_1.i18n)('lib.commonOpts.options.debug.describe'),
|
|
32
33
|
type: 'boolean',
|
|
33
34
|
});
|
|
34
35
|
yargs.option('network-debug', {
|
|
@@ -41,21 +42,21 @@ function addGlobalOptions(yargs) {
|
|
|
41
42
|
function addAccountOptions(yargs) {
|
|
42
43
|
return yargs.option('account', {
|
|
43
44
|
alias: 'a',
|
|
44
|
-
describe: (0, lang_1.i18n)(
|
|
45
|
+
describe: (0, lang_1.i18n)('lib.commonOpts.options.account.describe'),
|
|
45
46
|
type: 'string',
|
|
46
47
|
});
|
|
47
48
|
}
|
|
48
49
|
function addConfigOptions(yargs) {
|
|
49
50
|
return yargs.option('config', {
|
|
50
51
|
alias: 'c',
|
|
51
|
-
describe: (0, lang_1.i18n)(
|
|
52
|
+
describe: (0, lang_1.i18n)('lib.commonOpts.options.config.describe'),
|
|
52
53
|
type: 'string',
|
|
53
54
|
});
|
|
54
55
|
}
|
|
55
56
|
function addOverwriteOptions(yargs) {
|
|
56
57
|
return yargs.option('overwrite', {
|
|
57
58
|
alias: 'o',
|
|
58
|
-
describe: (0, lang_1.i18n)(
|
|
59
|
+
describe: (0, lang_1.i18n)('lib.commonOpts.options.overwrite.describe'),
|
|
59
60
|
type: 'boolean',
|
|
60
61
|
default: false,
|
|
61
62
|
});
|
|
@@ -70,7 +71,7 @@ function addCmsPublishModeOptions(yargs, { read, write }) {
|
|
|
70
71
|
}
|
|
71
72
|
function addTestingOptions(yargs) {
|
|
72
73
|
return yargs.option('qa', {
|
|
73
|
-
describe: (0, lang_1.i18n)(
|
|
74
|
+
describe: (0, lang_1.i18n)('lib.commonOpts.options.qa.describe'),
|
|
74
75
|
type: 'boolean',
|
|
75
76
|
default: false,
|
|
76
77
|
hidden: true,
|
|
@@ -78,12 +79,20 @@ function addTestingOptions(yargs) {
|
|
|
78
79
|
}
|
|
79
80
|
function addUseEnvironmentOptions(yargs) {
|
|
80
81
|
yargs.option('use-env', {
|
|
81
|
-
describe: (0, lang_1.i18n)(
|
|
82
|
+
describe: (0, lang_1.i18n)('lib.commonOpts.options.useEnv.describe'),
|
|
82
83
|
type: 'boolean',
|
|
83
84
|
});
|
|
84
85
|
yargs.conflicts('use-env', 'account');
|
|
85
86
|
return yargs;
|
|
86
87
|
}
|
|
88
|
+
function addJSONOutputOptions(yargs) {
|
|
89
|
+
return yargs.option('json', {
|
|
90
|
+
alias: 'format-output-as-json',
|
|
91
|
+
describe: (0, lang_1.i18n)('lib.commonOpts.options.jsonOutput.describe'),
|
|
92
|
+
type: 'boolean',
|
|
93
|
+
hidden: true,
|
|
94
|
+
});
|
|
95
|
+
}
|
|
87
96
|
async function addCustomHelpOutput(yargs, command, describe) {
|
|
88
97
|
try {
|
|
89
98
|
const parsedArgv = (0, yargs_parser_1.default)(process.argv.slice(2));
|
|
@@ -125,8 +134,11 @@ async function addCustomHelpOutput(yargs, command, describe) {
|
|
|
125
134
|
}
|
|
126
135
|
}
|
|
127
136
|
function setLogLevel(options) {
|
|
128
|
-
const { debug, networkDebug } = options;
|
|
129
|
-
if (
|
|
137
|
+
const { debug, networkDebug, json } = options;
|
|
138
|
+
if (json) {
|
|
139
|
+
(0, logger_1.setLogLevel)(logger_1.LOG_LEVEL.NONE);
|
|
140
|
+
}
|
|
141
|
+
else if (debug) {
|
|
130
142
|
(0, logger_1.setLogLevel)(logger_1.LOG_LEVEL.DEBUG);
|
|
131
143
|
}
|
|
132
144
|
else {
|
package/lib/constants.d.ts
CHANGED
|
@@ -49,6 +49,7 @@ export declare const PROJECT_ERROR_TYPES: {
|
|
|
49
49
|
readonly BUILD_NOT_IN_PROGRESS: "BuildPipelineErrorType.BUILD_NOT_IN_PROGRESS";
|
|
50
50
|
readonly SUBBUILD_FAILED: "BuildPipelineErrorType.DEPENDENT_SUBBUILD_FAILED";
|
|
51
51
|
readonly SUBDEPLOY_FAILED: "DeployPipelineErrorType.DEPENDENT_SUBDEPLOY_FAILED";
|
|
52
|
+
readonly DEPLOY_CONTAINS_REMOVALS: "DeployPipelineErrorType.WARNING_DEPLOY_CONTAINS_REMOVALS";
|
|
52
53
|
};
|
|
53
54
|
export declare const PROJECT_TASK_TYPES: {
|
|
54
55
|
[key: string]: string;
|
|
@@ -98,6 +99,10 @@ export declare const oAuth = "oauth";
|
|
|
98
99
|
export declare const privateDistribution = "private";
|
|
99
100
|
export declare const marketplaceDistribution = "marketplace";
|
|
100
101
|
export declare const appComponent = "app";
|
|
102
|
+
export declare const GET_STARTED_OPTIONS: {
|
|
103
|
+
readonly APP: "APP";
|
|
104
|
+
readonly CMS: "CMS";
|
|
105
|
+
};
|
|
101
106
|
export declare const LOCAL_DEV_SERVER_MESSAGE_TYPES: {
|
|
102
107
|
readonly INITIAL: "INITIAL";
|
|
103
108
|
readonly WEBSOCKET_SERVER_CONNECTED: "WEBSOCKET_SERVER_CONNECTED";
|
package/lib/constants.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.LOCAL_DEV_SERVER_MESSAGE_TYPES = exports.appComponent = exports.marketplaceDistribution = exports.privateDistribution = exports.oAuth = exports.staticAuth = exports.APP_INSTALLATION_STATES = exports.LOCAL_DEV_UI_MESSAGE_RECEIVE_TYPES = exports.LOCAL_DEV_UI_MESSAGE_SEND_TYPES = exports.FEATURES = exports.APP_AUTH_TYPES = exports.APP_DISTRIBUTION_TYPES = exports.IR_COMPONENT_TYPES = exports.PLATFORM_VERSION_ERROR_TYPES = exports.PROJECT_COMPONENT_TYPES = exports.PROJECT_TASK_TYPES = exports.PROJECT_ERROR_TYPES = exports.PROJECT_DEPLOY_TEXT = exports.PROJECT_BUILD_TEXT = exports.PROJECT_DEPLOY_STATES = exports.PROJECT_BUILD_STATES = exports.PROJECT_CONFIG_FILE = exports.DEFAULT_POLLING_DELAY = exports.MARKETPLACE_FOLDER = exports.HUBSPOT_FOLDER = exports.FEEDBACK_INTERVAL = exports.DEFAULT_PROJECT_TEMPLATE_BRANCH = exports.HUBSPOT_PROJECT_COMPONENTS_GITHUB_PATH = void 0;
|
|
3
|
+
exports.LOCAL_DEV_SERVER_MESSAGE_TYPES = exports.GET_STARTED_OPTIONS = exports.appComponent = exports.marketplaceDistribution = exports.privateDistribution = exports.oAuth = exports.staticAuth = exports.APP_INSTALLATION_STATES = exports.LOCAL_DEV_UI_MESSAGE_RECEIVE_TYPES = exports.LOCAL_DEV_UI_MESSAGE_SEND_TYPES = exports.FEATURES = exports.APP_AUTH_TYPES = exports.APP_DISTRIBUTION_TYPES = exports.IR_COMPONENT_TYPES = exports.PLATFORM_VERSION_ERROR_TYPES = exports.PROJECT_COMPONENT_TYPES = exports.PROJECT_TASK_TYPES = exports.PROJECT_ERROR_TYPES = exports.PROJECT_DEPLOY_TEXT = exports.PROJECT_BUILD_TEXT = exports.PROJECT_DEPLOY_STATES = exports.PROJECT_BUILD_STATES = exports.PROJECT_CONFIG_FILE = exports.DEFAULT_POLLING_DELAY = exports.MARKETPLACE_FOLDER = exports.HUBSPOT_FOLDER = exports.FEEDBACK_INTERVAL = exports.DEFAULT_PROJECT_TEMPLATE_BRANCH = exports.HUBSPOT_PROJECT_COMPONENTS_GITHUB_PATH = void 0;
|
|
4
4
|
exports.HUBSPOT_PROJECT_COMPONENTS_GITHUB_PATH = 'HubSpot/hubspot-project-components';
|
|
5
5
|
exports.DEFAULT_PROJECT_TEMPLATE_BRANCH = 'main';
|
|
6
6
|
exports.FEEDBACK_INTERVAL = 10;
|
|
@@ -41,6 +41,7 @@ exports.PROJECT_ERROR_TYPES = {
|
|
|
41
41
|
BUILD_NOT_IN_PROGRESS: 'BuildPipelineErrorType.BUILD_NOT_IN_PROGRESS',
|
|
42
42
|
SUBBUILD_FAILED: 'BuildPipelineErrorType.DEPENDENT_SUBBUILD_FAILED',
|
|
43
43
|
SUBDEPLOY_FAILED: 'DeployPipelineErrorType.DEPENDENT_SUBDEPLOY_FAILED',
|
|
44
|
+
DEPLOY_CONTAINS_REMOVALS: 'DeployPipelineErrorType.WARNING_DEPLOY_CONTAINS_REMOVALS',
|
|
44
45
|
};
|
|
45
46
|
exports.PROJECT_TASK_TYPES = {
|
|
46
47
|
PRIVATE_APP: 'private app',
|
|
@@ -93,6 +94,10 @@ exports.oAuth = 'oauth';
|
|
|
93
94
|
exports.privateDistribution = 'private';
|
|
94
95
|
exports.marketplaceDistribution = 'marketplace';
|
|
95
96
|
exports.appComponent = 'app';
|
|
97
|
+
exports.GET_STARTED_OPTIONS = {
|
|
98
|
+
APP: 'APP',
|
|
99
|
+
CMS: 'CMS',
|
|
100
|
+
};
|
|
96
101
|
exports.LOCAL_DEV_SERVER_MESSAGE_TYPES = {
|
|
97
102
|
INITIAL: 'INITIAL',
|
|
98
103
|
WEBSOCKET_SERVER_CONNECTED: 'WEBSOCKET_SERVER_CONNECTED',
|
package/lib/doctor/Doctor.js
CHANGED
|
@@ -15,6 +15,10 @@ const util_1 = __importDefault(require("util"));
|
|
|
15
15
|
const ui_1 = require("../ui");
|
|
16
16
|
function logError(error, context) {
|
|
17
17
|
debugError(error, context);
|
|
18
|
+
if (isProjectValidationError(error)) {
|
|
19
|
+
logger_1.logger.error(error.message);
|
|
20
|
+
return;
|
|
21
|
+
}
|
|
18
22
|
if ((0, suppressError_1.shouldSuppressError)(error, context)) {
|
|
19
23
|
return;
|
|
20
24
|
}
|
|
@@ -89,6 +93,9 @@ class ApiErrorContext {
|
|
|
89
93
|
}
|
|
90
94
|
}
|
|
91
95
|
exports.ApiErrorContext = ApiErrorContext;
|
|
96
|
+
function isProjectValidationError(error) {
|
|
97
|
+
return error instanceof Error && error.name === 'ProjectValidationError';
|
|
98
|
+
}
|
|
92
99
|
function isErrorWithMessageOrReason(error) {
|
|
93
100
|
return (typeof error === 'object' &&
|
|
94
101
|
error !== null &&
|
package/lib/mcp/setup.d.ts
CHANGED
|
@@ -8,5 +8,14 @@ export declare const supportedTools: ({
|
|
|
8
8
|
name: "Windsurf";
|
|
9
9
|
value: string;
|
|
10
10
|
})[];
|
|
11
|
+
interface McpCommand {
|
|
12
|
+
command: string;
|
|
13
|
+
args: string[];
|
|
14
|
+
}
|
|
11
15
|
export declare function addMintlifyMcpServer(installTargets: string[]): Promise<void>;
|
|
16
|
+
export declare function setupMintlify(derivedTargets?: string[]): Promise<boolean>;
|
|
12
17
|
export declare function addMcpServerToConfig(targets: string[] | undefined): Promise<string[]>;
|
|
18
|
+
export declare function setupClaudeCode(mcpCommand?: McpCommand): Promise<boolean>;
|
|
19
|
+
export declare function setupCursor(mcpCommand?: McpCommand): boolean;
|
|
20
|
+
export declare function setupWindsurf(mcpCommand?: McpCommand): boolean;
|
|
21
|
+
export {};
|