@hubspot/cli 7.7.1-experimental.0 → 7.7.2-experimental.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. package/commands/account/auth.js +51 -82
  2. package/commands/auth.js +2 -15
  3. package/commands/config/migrate.js +17 -36
  4. package/commands/init.js +1 -2
  5. package/commands/module/marketplace-validate.js +6 -8
  6. package/commands/module.js +2 -1
  7. package/commands/project/add.d.ts +5 -2
  8. package/commands/project/add.js +43 -80
  9. package/commands/project/create.d.ts +2 -8
  10. package/commands/project/create.js +84 -55
  11. package/commands/project/dev/unifiedFlow.js +1 -0
  12. package/commands/remove.js +6 -12
  13. package/commands/theme/generate-selectors.js +7 -10
  14. package/commands/theme/marketplace-validate.js +6 -8
  15. package/commands/theme/preview.js +17 -18
  16. package/commands/theme.js +2 -2
  17. package/commands/upload.js +26 -63
  18. package/commands/watch.js +20 -32
  19. package/lang/en.d.ts +140 -92
  20. package/lang/en.js +143 -98
  21. package/lang/en.lyaml +3 -186
  22. package/lib/configMigrate.d.ts +2 -2
  23. package/lib/configMigrate.js +34 -69
  24. package/lib/constants.d.ts +23 -5
  25. package/lib/constants.js +24 -6
  26. package/lib/generateSelectors.js +3 -5
  27. package/lib/marketplaceValidate.d.ts +12 -2
  28. package/lib/marketplaceValidate.js +22 -29
  29. package/lib/middleware/configMiddleware.js +1 -0
  30. package/lib/projects/add/legacyAddComponent.d.ts +5 -0
  31. package/lib/projects/add/legacyAddComponent.js +48 -0
  32. package/lib/projects/add/v3AddComponent.d.ts +8 -0
  33. package/lib/projects/add/v3AddComponent.js +85 -0
  34. package/lib/projects/components.d.ts +2 -0
  35. package/lib/projects/components.js +82 -0
  36. package/lib/projects/create/index.d.ts +23 -0
  37. package/lib/projects/create/index.js +33 -0
  38. package/lib/projects/create/legacy.d.ts +6 -0
  39. package/lib/projects/{create.js → create/legacy.js} +20 -11
  40. package/lib/projects/create/v3.d.ts +27 -0
  41. package/lib/projects/create/v3.js +158 -0
  42. package/lib/projects/localDev/AppDevModeInterface.d.ts +3 -2
  43. package/lib/projects/localDev/AppDevModeInterface.js +38 -2
  44. package/lib/projects/localDev/LocalDevProcess.d.ts +12 -5
  45. package/lib/projects/localDev/LocalDevProcess.js +47 -17
  46. package/lib/projects/localDev/LocalDevState.d.ts +16 -3
  47. package/lib/projects/localDev/LocalDevState.js +43 -2
  48. package/lib/projects/localDev/LocalDevWatcher.js +3 -6
  49. package/lib/projects/localDev/LocalDevWebsocketServer.d.ts +3 -0
  50. package/lib/projects/localDev/LocalDevWebsocketServer.js +48 -9
  51. package/lib/prompts/createProjectPrompt.d.ts +14 -5
  52. package/lib/prompts/createProjectPrompt.js +36 -13
  53. package/lib/prompts/projectAddPrompt.d.ts +5 -1
  54. package/lib/prompts/projectAddPrompt.js +35 -7
  55. package/lib/prompts/setAsDefaultAccountPrompt.js +10 -0
  56. package/package.json +6 -5
  57. package/types/LocalDev.d.ts +11 -1
  58. package/types/Projects.d.ts +19 -2
  59. package/lib/projects/create.d.ts +0 -5
package/lang/en.js CHANGED
@@ -5,11 +5,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.lib = exports.commands = void 0;
7
7
  const chalk_1 = __importDefault(require("chalk"));
8
+ const projects_1 = require("@hubspot/local-dev-lib/constants/projects");
9
+ const auth_1 = require("@hubspot/local-dev-lib/constants/auth");
10
+ const config_1 = require("@hubspot/local-dev-lib/constants/config");
8
11
  const ui_1 = require("../lib/ui");
9
12
  const urls_1 = require("../lib/projects/urls");
10
- const ui_2 = require("../lib/ui");
11
- const projects_1 = require("@hubspot/local-dev-lib/constants/projects");
12
13
  const constants_1 = require("../lib/constants");
14
+ const v3_1 = require("../lib/projects/create/v3");
13
15
  exports.commands = {
14
16
  generalErrors: {
15
17
  srcIsProject: (src, command) => `"${src}" is in a project folder. Did you mean "hs project ${command}"?`,
@@ -29,6 +31,22 @@ exports.commands = {
29
31
  account: {
30
32
  describe: 'Commands for managing configured accounts.',
31
33
  subcommands: {
34
+ auth: {
35
+ describe: 'Configure authentication for your HubSpot account.',
36
+ verboseDescribe: `Configure authentication for a HubSpot account. This will create or update the global config file at ${config_1.GLOBAL_CONFIG_PATH} that stores your account information.\n\nThe authentication method is ${chalk_1.default.bold(auth_1.PERSONAL_ACCESS_KEY_AUTH_METHOD.value)}, which is an access token tied to a specific user account.\n\nGlobal configuration replaces ${config_1.DEFAULT_HUBSPOT_CONFIG_YAML_FILE_NAME}, and you will be prompted to migrate your existing config if one exists.`,
37
+ options: {
38
+ account: 'HubSpot account to authenticate',
39
+ },
40
+ errors: {
41
+ failedToUpdateConfig: 'Failed to update the configuration file. Please try again.',
42
+ migrationNotConfirmed: `Did not migrate your configuration file. Run ${(0, ui_1.uiCommandReference)('hs auth')} to update your existing config, or use ${(0, ui_1.uiCommandReference)('hs config migrate')} to switch to the new global configuration.`,
43
+ mergeNotConfirmed: `Did not merge configuration files. When you are ready to merge the deprecated config file with the global config file, run ${(0, ui_1.uiCommandReference)('hs config migrate')}.`,
44
+ },
45
+ success: {
46
+ configFileCreated: (configPath) => `Created config file "${configPath}"`,
47
+ configFileUpdated: (accountId) => `Connected account ${(0, ui_1.uiAccountDescription)(accountId)} and set it as the default account`,
48
+ },
49
+ },
32
50
  list: {
33
51
  accounts: `${chalk_1.default.bold('Accounts')}:`,
34
52
  defaultAccount: (account) => `${chalk_1.default.bold('Default account')}: ${account}`,
@@ -153,6 +171,21 @@ exports.commands = {
153
171
  config: {
154
172
  describe: 'Commands for managing the CLI config file.',
155
173
  subcommands: {
174
+ migrate: {
175
+ describe: `Migrate from the deprecated ${config_1.DEFAULT_HUBSPOT_CONFIG_YAML_FILE_NAME} file to the new global config file at ${config_1.GLOBAL_CONFIG_PATH}.`,
176
+ verboseDescribe: `This command will create or update the global configuration file in your root directory. It will archive the current config as ${config_1.ARCHIVED_HUBSPOT_CONFIG_YAML_FILE_NAME}.`,
177
+ errors: {
178
+ noConfigToMigrate: `No ${config_1.DEFAULT_HUBSPOT_CONFIG_YAML_FILE_NAME} was found. There is nothing to migrate.`,
179
+ configNotFound: (configPath) => `A configuration file at ${configPath} could not be found. Please try again with a valid file path.`,
180
+ },
181
+ options: {
182
+ force: 'Bypass prompts and overwrite any conflicting values in the global config with the deprecated config values.',
183
+ },
184
+ examples: {
185
+ default: `Migrate from the deprecated ${config_1.DEFAULT_HUBSPOT_CONFIG_YAML_FILE_NAME} file to the new global config file at ${config_1.GLOBAL_CONFIG_PATH}`,
186
+ configFlag: `Migrate a specific config file (specified with the config flag) to the new global config file at ${config_1.GLOBAL_CONFIG_PATH}`,
187
+ },
188
+ },
156
189
  set: {
157
190
  describe: 'Set various configuration options within the hubspot CLI config file.',
158
191
  promptMessage: 'Select a config option to update',
@@ -846,8 +879,13 @@ exports.commands = {
846
879
  cannotNestProjects: (projectDir) => `A project already exists at ${projectDir}. Projects cannot be nested within other projects. Please choose a different destination and try again.`,
847
880
  },
848
881
  logs: {
849
- success: (projectName, projectDest) => `Project ${chalk_1.default.bold(projectName)} was successfully created in ${projectDest}`,
850
- welcomeMessage: 'Welcome to HubSpot Developer Projects!',
882
+ success: (projectName, projectDest) => `\nProject ${chalk_1.default.bold(projectName)} was successfully created in ${projectDest}`,
883
+ welcomeMessage: `\n${chalk_1.default.bold('Welcome to HubSpot Developer Projects!')}`,
884
+ },
885
+ prompts: {
886
+ parentComponents: '[--project-base] What would you like in your project?',
887
+ emptyProject: 'Empty Project',
888
+ app: 'App',
851
889
  },
852
890
  examples: {
853
891
  default: 'Create a new project',
@@ -866,6 +904,21 @@ exports.commands = {
866
904
  templateSource: {
867
905
  describe: 'Path to custom GitHub repository from which to create project template',
868
906
  },
907
+ platformVersion: {
908
+ describe: 'The target platform version for the new project.',
909
+ },
910
+ projectBase: {
911
+ describe: 'The top level component to include in the project.',
912
+ },
913
+ distribution: {
914
+ describe: 'How the app will be distributed.',
915
+ },
916
+ auth: {
917
+ describe: 'Authentication model for the application.',
918
+ },
919
+ features: {
920
+ describe: `Features to include in the project. Only valid if project-base is ${v3_1.PROJECT_WITH_APP}`,
921
+ },
869
922
  },
870
923
  },
871
924
  migrateApp: {
@@ -951,11 +1004,23 @@ exports.commands = {
951
1004
  type: {
952
1005
  describe: "The path to the component type's location within the hubspot-project-components Github repo: https://github.com/HubSpot/hubspot-project-components",
953
1006
  },
1007
+ distribution: {
1008
+ describe: 'The distribution method for the application.',
1009
+ },
1010
+ auth: {
1011
+ describe: 'The authentication type for the application.',
1012
+ },
1013
+ features: {
1014
+ describe: 'Which features to include with the application.',
1015
+ },
954
1016
  },
955
- creatingComponent: (projectName) => `Adding a new component to ${chalk_1.default.bold(projectName)}`,
956
- success: (componentName) => `${componentName} was successfully added to your project.`,
1017
+ creatingComponent: (projectName) => `\nAdding a new component to ${chalk_1.default.bold(projectName)}\n`,
1018
+ success: (componentName, multiple = false) => `${componentName} ${multiple ? 'were' : 'was'} successfully added to your app.`,
957
1019
  error: {
958
1020
  failedToDownloadComponent: 'Failed to download project component. Please try again later.',
1021
+ maxExceeded: (maxCount) => `This project has the maximum allowed(${maxCount})`,
1022
+ authTypeNotAllowed: (authType) => `Auth type '${authType}' not allowed.`,
1023
+ distributionNotAllowed: (dist) => `Distribution '${dist}' not allowed.`,
959
1024
  locationInProject: 'This command must be run from within a project directory.',
960
1025
  failedToFetchComponentList: 'Failed to fetch the list of available components. Please try again later.',
961
1026
  projectContainsPublicApp: 'This project contains a public app. This command is currently only compatible with projects that contain private apps.',
@@ -1186,15 +1251,13 @@ exports.commands = {
1186
1251
  },
1187
1252
  },
1188
1253
  remove: {
1189
- describe: 'Delete a file or folder from HubSpot.',
1190
- deleted: (path, accountId) => `Deleted "${path}" from account ${accountId}`,
1254
+ describe: 'Delete a file or folder from the HubSpot CMS.',
1255
+ deleted: (path, accountId) => `Deleted "${path}" from account ${(0, ui_1.uiAccountDescription)(accountId)}`,
1191
1256
  errors: {
1192
- deleteFailed: (path, accountId) => `Deleting "${path}" from account ${accountId} failed`,
1257
+ deleteFailed: (path, accountId) => `Deleting "${path}" from account ${(0, ui_1.uiAccountDescription)(accountId)} failed`,
1193
1258
  },
1194
1259
  positionals: {
1195
- path: {
1196
- describe: 'Remote hubspot path',
1197
- },
1260
+ path: 'Remote hubspot path',
1198
1261
  },
1199
1262
  },
1200
1263
  sandbox: {
@@ -1436,9 +1499,7 @@ exports.commands = {
1436
1499
  },
1437
1500
  success: (themePath, selectorsPath) => `Selectors generated for ${themePath}, please double check the selectors generated at ${selectorsPath} before uploading the theme.`,
1438
1501
  positionals: {
1439
- path: {
1440
- describe: "The path of the theme you'd like to generate an editor-preview.json for.",
1441
- },
1502
+ path: "The path of the theme you'd like to generate an editor-preview.json for.",
1442
1503
  },
1443
1504
  },
1444
1505
  marketplaceValidate: {
@@ -1469,25 +1530,16 @@ exports.commands = {
1469
1530
  errors: {
1470
1531
  invalidPath: (path) => `The path "${path}" is not a path to a directory`,
1471
1532
  noThemeComponents: 'Your project has no theme components available to preview.',
1533
+ uploadFailed: (src, dest) => `Uploading file "${src}" to "${dest}" failed`,
1472
1534
  },
1473
1535
  positionals: {
1474
- src: {
1475
- describe: 'Path to the local directory your theme is in, relative to your current working directory',
1476
- },
1477
- dest: {
1478
- describe: 'Path in HubSpot Design Tools. Can be a net new path. If you wish to preview a site page using your theme changes it must match the path of the theme used by the site.',
1479
- },
1536
+ src: 'Path to the local directory your theme is in, relative to your current working directory',
1537
+ dest: 'Path in HubSpot Design Tools. Can be a net new path. If you wish to preview a site page using your theme changes it must match the path of the theme used by the site.',
1480
1538
  },
1481
1539
  options: {
1482
- notify: {
1483
- describe: 'Log to specified file when a watch task is triggered and after workers have gone idle. Ex. --notify path/to/file',
1484
- },
1485
- noSsl: {
1486
- describe: 'Disable HTTPS',
1487
- },
1488
- port: {
1489
- describe: 'The port on which to start the local server',
1490
- },
1540
+ notify: 'Log to specified file when a watch task is triggered and after workers have gone idle. Ex. --notify path/to/file',
1541
+ noSsl: 'Disable HTTPS',
1542
+ port: 'The port on which to start the local server',
1491
1543
  },
1492
1544
  initialUploadProgressBar: {
1493
1545
  start: 'Starting...',
@@ -1511,11 +1563,6 @@ exports.commands = {
1511
1563
  logs: {
1512
1564
  validatingModule: (path) => `Validating module "${path}" \n`,
1513
1565
  },
1514
- options: {
1515
- json: {
1516
- describe: 'Output raw json data',
1517
- },
1518
- },
1519
1566
  results: {
1520
1567
  required: 'Required validation results:',
1521
1568
  recommended: 'Recommended validation results:',
@@ -1526,9 +1573,7 @@ exports.commands = {
1526
1573
  noErrors: 'No errors',
1527
1574
  },
1528
1575
  positionals: {
1529
- src: {
1530
- describe: 'Path to the module within the Design Manager.',
1531
- },
1576
+ src: 'Path to the module within the Design Manager.',
1532
1577
  },
1533
1578
  },
1534
1579
  },
@@ -1541,86 +1586,54 @@ exports.commands = {
1541
1586
  invalidPath: (path) => `The path "${path}" is not a path to a file or folder`,
1542
1587
  uploadFailed: (src, dest) => `Uploading file "${src}" to "${dest}" failed`,
1543
1588
  someFilesFailed: (dest) => `One or more files failed to upload to "${dest}" in the Design Manager`,
1544
- deleteFailed: (path, accountId) => `Deleting "${path}" from account ${accountId} failed`,
1589
+ deleteFailed: (path, accountId) => `Deleting "${path}" from account ${(0, ui_1.uiAccountDescription)(accountId)} failed`,
1545
1590
  },
1546
1591
  options: {
1547
- options: {
1548
- describe: 'Options to pass to javascript fields files',
1549
- },
1550
- saveOutput: {
1551
- describe: "If true, saves all output from javascript fields files as 'fields.output.json'.",
1552
- },
1553
- convertFields: {
1554
- describe: 'If true, converts any javascript fields files contained in module folder or project root.',
1555
- },
1556
- clean: {
1557
- describe: 'Will delete the destination directory and its contents before uploading. This will also clear the global content associated with any global partial templates and modules.',
1558
- },
1559
- force: {
1560
- describe: 'Skips confirmation prompts when doing a clean upload.',
1561
- },
1592
+ options: 'Options to pass to javascript fields files',
1593
+ saveOutput: "If true, saves all output from javascript fields files as 'fields.output.json'.",
1594
+ convertFields: 'If true, converts any javascript fields files contained in module folder or project root.',
1595
+ clean: 'Will delete the destination directory and its contents before uploading. This will also clear the global content associated with any global partial templates and modules.',
1596
+ force: 'Skips confirmation prompts when doing a clean upload.',
1562
1597
  },
1563
1598
  previewUrl: (previewUrl) => `To preview this theme, visit: ${previewUrl}`,
1564
1599
  positionals: {
1565
- src: {
1566
- describe: 'Path to the local file, relative to your current working directory.',
1567
- },
1568
- dest: {
1569
- describe: 'Path in HubSpot Design Tools, can be a net new path.',
1570
- },
1600
+ src: 'Path to the local file, relative to your current working directory.',
1601
+ dest: 'Path in HubSpot Design Tools, can be a net new path.',
1571
1602
  },
1572
1603
  success: {
1573
- fileUploaded: (src, dest, accountId) => `Uploaded file from "${src}" to "${dest}" in the Design Manager of account ${accountId}`,
1604
+ fileUploaded: (src, dest, accountId) => `Uploaded file from "${src}" to "${dest}" in the Design Manager of account ${(0, ui_1.uiAccountDescription)(accountId)}`,
1574
1605
  uploadComplete: (dest) => `Uploading files to "${dest}" in the Design Manager is complete`,
1575
1606
  },
1576
- uploading: (src, dest, accountId) => `Uploading files from "${src}" to "${dest}" in the Design Manager of account ${accountId}`,
1607
+ uploading: (src, dest, accountId) => `Uploading files from "${src}" to "${dest}" in the Design Manager of account ${(0, ui_1.uiAccountDescription)(accountId)}`,
1577
1608
  notUploaded: (src) => `There was an error processing "${src}". The file has not been uploaded.`,
1578
- cleaning: (filePath, accountId) => `Removing "${filePath}" from account ${accountId} and uploading local...`,
1579
- confirmCleanUpload: (filePath, accountId) => `You are about to delete the directory "${filePath}" and its contents on HubSpot account ${accountId} before uploading. This will also clear the global content associated with any global partial templates and modules. Are you sure you want to do this?`,
1609
+ cleaning: (filePath, accountId) => `Removing "${filePath}" from account ${(0, ui_1.uiAccountDescription)(accountId)} and uploading local...`,
1610
+ confirmCleanUpload: (filePath, accountId) => `You are about to delete the directory "${filePath}" and its contents on HubSpot account ${(0, ui_1.uiAccountDescription)(accountId)} before uploading. This will also clear the global content associated with any global partial templates and modules. Are you sure you want to do this?`,
1580
1611
  },
1581
1612
  watch: {
1582
1613
  describe: 'Watch a directory on your computer for changes and upload the changed files to the HubSpot CMS.',
1583
1614
  errors: {
1584
- folderFailed: (src, dest, accountId) => `Initial uploading of folder "${src}" to "${dest}" in account ${accountId} had failures`,
1585
- fileFailed: (file, dest, accountId) => `Upload of file "${file}" to "${dest}" in account ${accountId} failed`,
1615
+ folderFailed: (src, dest, accountId) => `Initial uploading of folder "${src}" to "${dest}" in account ${(0, ui_1.uiAccountDescription)(accountId)} had failures`,
1616
+ fileFailed: (file, dest, accountId) => `Upload of file "${file}" to "${dest}" in account ${(0, ui_1.uiAccountDescription)(accountId)} failed`,
1586
1617
  destinationRequired: 'A destination directory needs to be passed',
1587
1618
  invalidPath: (path) => `The "${path}" is not a path to a directory`,
1588
1619
  },
1589
1620
  options: {
1590
- disableInitial: {
1591
- describe: 'Disable the initial upload when watching a directory (default)',
1592
- },
1593
- initialUpload: {
1594
- describe: 'Upload directory before watching for updates',
1595
- },
1596
- notify: {
1597
- describe: 'Log to specified file when a watch task is triggered and after workers have gone idle. Ex. --notify path/to/file',
1598
- },
1599
- remove: {
1600
- describe: 'Will cause watch to delete files in your HubSpot account that are not found locally.',
1601
- },
1602
- convertFields: {
1603
- describe: 'If true, converts any javascript fields files contained in module folder or project root.',
1604
- },
1605
- saveOutput: {
1606
- describe: "If true, saves all output from javascript fields files as 'fields.output.json'.",
1607
- },
1608
- options: {
1609
- describe: 'Options to pass to javascript fields files',
1610
- },
1621
+ disableInitial: 'Disable the initial upload when watching a directory (default)',
1622
+ initialUpload: 'Upload directory before watching for updates',
1623
+ notify: 'Log to specified file when a watch task is triggered and after workers have gone idle. Ex. --notify path/to/file',
1624
+ remove: 'Will cause watch to delete files in your HubSpot account that are not found locally.',
1625
+ convertFields: 'If true, converts any javascript fields files contained in module folder or project root.',
1626
+ saveOutput: "If true, saves all output from javascript fields files as 'fields.output.json'.",
1627
+ options: 'Options to pass to javascript fields files',
1611
1628
  },
1612
1629
  positionals: {
1613
- src: {
1614
- describe: 'Path to the local directory your files are in, relative to your current working directory',
1615
- },
1616
- dest: {
1617
- describe: 'Path in HubSpot Design Tools. Can be a net new path',
1618
- },
1630
+ src: 'Path to the local directory your files are in, relative to your current working directory',
1631
+ dest: 'Path in HubSpot Design Tools. Can be a net new path',
1619
1632
  },
1620
1633
  warnings: {
1621
- disableInitial: () => `Passing the "${chalk_1.default.bold('--disable-initial')}" option is no longer necessary. Running "${chalk_1.default.bold('hs watch')}" no longer uploads the watched directory by default.`,
1622
- initialUpload: () => `To upload the directory run "${chalk_1.default.bold('hs upload')}" beforehand or add the "${chalk_1.default.bold('--initial-upload')}" option when running "${chalk_1.default.bold('hs watch')}".`,
1623
- notUploaded: (path) => `The "${chalk_1.default.bold('hs watch')}" command no longer uploads the watched directory when started. The directory "${path}" was not uploaded.`,
1634
+ disableInitial: `Passing the "${chalk_1.default.bold('--disable-initial')}" option is no longer necessary. Running "${(0, ui_1.uiCommandReference)('hs watch')}" no longer uploads the watched directory by default.`,
1635
+ initialUpload: `To upload the directory run "${(0, ui_1.uiCommandReference)('hs upload')}" beforehand or add the "${chalk_1.default.bold('--initial-upload')}" option when running "${(0, ui_1.uiCommandReference)('hs watch')}".`,
1636
+ notUploaded: (path) => `The "${(0, ui_1.uiCommandReference)('hs watch')}" command no longer uploads the watched directory when started. The directory "${path}" was not uploaded.`,
1624
1637
  },
1625
1638
  },
1626
1639
  convertFields: {
@@ -2241,7 +2254,7 @@ exports.lib = {
2241
2254
  noComponents: 'There are no components in this project.',
2242
2255
  betaMessage: 'HubSpot projects local development',
2243
2256
  learnMoreLocalDevServer: (0, ui_1.uiLink)('Learn more about the projects local dev server', 'https://developers.hubspot.com/docs/platform/project-cli-commands#start-a-local-development-server'),
2244
- running: (projectName, accountIdentifier) => chalk_1.default.hex(ui_2.UI_COLORS.SORBET)(`Running ${chalk_1.default.bold(projectName)} locally on ${accountIdentifier}, waiting for changes ...`),
2257
+ running: (projectName, accountIdentifier) => chalk_1.default.hex(ui_1.UI_COLORS.SORBET)(`Running ${chalk_1.default.bold(projectName)} locally on ${accountIdentifier}, waiting for changes ...`),
2245
2258
  quitHelper: `Press ${chalk_1.default.bold('q')} to stop the local dev server`,
2246
2259
  viewProjectLink: (name, accountId) => (0, ui_1.uiLink)('View project in HubSpot', (0, urls_1.getProjectDetailUrl)(name, accountId) || ''),
2247
2260
  viewTestAccountLink: 'View developer test account in HubSpot',
@@ -2286,6 +2299,7 @@ exports.lib = {
2286
2299
  unknownMessageType: (type) => `Unsupported message received. Unknown message type: ${type}`,
2287
2300
  invalidJSON: (data) => `Unsupported message received. Invalid JSON: ${data}`,
2288
2301
  portManagerNotRunning: (prefix) => `${prefix}Error: PortManagerServing must be running before starting LocalDevWebsocketServer.`,
2302
+ originNotAllowed: (origin) => `Connections from ${origin ? `origin ${origin}` : 'this origin'} are not allowed.`,
2289
2303
  },
2290
2304
  logs: {
2291
2305
  startup: (port) => `LocalDevWebsocketServer running on port ${port}`,
@@ -2372,10 +2386,21 @@ exports.lib = {
2372
2386
  },
2373
2387
  projects: {
2374
2388
  create: {
2389
+ prompt: {
2390
+ marketPlaceDistribution: 'On the HubSpot marketplace',
2391
+ privateDistribution: 'Privately',
2392
+ distribution: '[--distribution] How would you like to distribute your application?',
2393
+ auth: '[--auth] What type of authentication would you like your application to use',
2394
+ staticAuth: 'Static Auth',
2395
+ oauth: 'OAuth',
2396
+ },
2375
2397
  errors: {
2376
2398
  noProjectsInConfig: 'Unable to find any projects in the target repository\'s config.json file. Please ensure that there is a "projects" array in the config file.',
2377
2399
  missingConfigFileTemplateSource: 'Failed to fetch the config.json file from the target repository. Please ensure that there is a valid config.json file at the root of the repository and try again.',
2378
- missingPropertiesInConfig: 'Found misconfigured projects in the target repository\'s config.json file. Please ensure that each project in the target repository\'s config.json file contains the following properties: ["name", "label", "path", "insertPath"].',
2400
+ missingPropertiesInConfig: 'Found misconfigured projects in the target repository\'s config.json file. Please ensure that each project in the target repository\'s config.json file contains the following properties: ["name", "label", "path"].',
2401
+ exceededMaxNumberOfApps: (max) => `This project currently has the maximum number of apps: ${max}`,
2402
+ unableToParseAppConfig: (file) => `Unable to parse app file: ${file}`,
2403
+ invalidAuthDistCombo: (authType, distribution) => `Invalid distribution and auth combination. Apps with distribution '${distribution}' must have auth '${authType}'`,
2379
2404
  },
2380
2405
  },
2381
2406
  validateProjectConfig: {
@@ -2578,6 +2603,24 @@ exports.lib = {
2578
2603
  },
2579
2604
  },
2580
2605
  },
2606
+ configMigrate: {
2607
+ deprecatedConfigWarning: (deprecatedConfigPath) => `This command applies to global configuration, but we detected a deprecated config at ${deprecatedConfigPath}.`,
2608
+ handleMigration: {
2609
+ description: (archivedConfigName) => `We will migrate your deprecated config file to the new global configuration file location. This will create a new global configuration file in your root directory. Then it will archive the deprecated config as ${archivedConfigName} for you to manually cleanup at your convenience.`,
2610
+ confirmPrompt: 'Migrate the deprecated config to the global location?',
2611
+ success: 'Your deprecated config file has been successfully migrated.',
2612
+ },
2613
+ handleMergeConfigProperties: {
2614
+ mergeConflictMessage: (count, propertyList) => `Conflict${count > 1 ? 's' : ''} detected for ${chalk_1.default.bold(propertyList)}.`,
2615
+ mergeConfigConflictPrompt: (property, newValue, oldValue) => `Change ${property} from ${newValue} to ${oldValue}?`,
2616
+ },
2617
+ handleMerge: {
2618
+ 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.`,
2619
+ confirmPrompt: 'Merge the deprecated config into your global config?',
2620
+ skippedExistingAccounts: (accountIds) => `The following accounts were not merged because they already exist in the global config:${accountIds.map(id => `\n- ${(0, ui_1.uiAccountDescription)(Number(id))}`).join('')}`,
2621
+ success: 'Your deprecated config file has been successfully merged with the global config file.',
2622
+ },
2623
+ },
2581
2624
  prompts: {
2582
2625
  projectDevTargetAccountPrompt: {
2583
2626
  createNewSandboxOption: '<Test on a new development sandbox>',
@@ -2715,7 +2758,9 @@ exports.lib = {
2715
2758
  enterName: '[--name] Give your component a name: ',
2716
2759
  errors: {
2717
2760
  nameRequired: 'A component name is required',
2761
+ componentRequired: 'Must select a feature to add',
2718
2762
  invalidType: (type) => `[--type] Could not find type "${type}". Please choose an available type:`,
2763
+ cannotAddFeature: (feature, reasons) => `Cannot Add feature '${feature}' to project for the following reasons: ${reasons}`,
2719
2764
  },
2720
2765
  },
2721
2766
  secretPrompt: {