@hubspot/cli 7.4.0-experimental.0 → 7.4.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 (93) hide show
  1. package/api/migrate.d.ts +61 -0
  2. package/api/migrate.js +44 -0
  3. package/bin/cli.js +8 -183
  4. package/commands/account/auth.d.ts +10 -0
  5. package/commands/account/auth.js +168 -0
  6. package/commands/account/clean.js +38 -5
  7. package/commands/account/createOverride.d.ts +10 -0
  8. package/commands/account/createOverride.js +104 -0
  9. package/commands/account/info.js +38 -4
  10. package/commands/account/list.js +23 -5
  11. package/commands/account/remove.js +36 -2
  12. package/commands/account/removeOverride.d.ts +10 -0
  13. package/commands/account/removeOverride.js +76 -0
  14. package/commands/account/use.js +25 -3
  15. package/commands/account.js +7 -2
  16. package/commands/app/migrate.js +5 -4
  17. package/commands/auth.js +6 -2
  18. package/commands/cms/lighthouseScore.js +6 -2
  19. package/commands/config/migrate.d.ts +10 -0
  20. package/commands/config/migrate.js +84 -0
  21. package/commands/config/set.d.ts +10 -0
  22. package/commands/config/set.js +34 -29
  23. package/commands/config.d.ts +4 -1
  24. package/commands/config.js +45 -11
  25. package/commands/create/api-sample.js +3 -1
  26. package/commands/customObject/schema/delete.js +4 -1
  27. package/commands/customObject/schema/fetch-all.js +2 -1
  28. package/commands/customObject/schema/fetch.js +2 -1
  29. package/commands/init.js +9 -10
  30. package/commands/project/create.js +1 -0
  31. package/commands/project/dev/index.js +1 -1
  32. package/commands/project/installDeps.d.ts +9 -1
  33. package/commands/project/installDeps.js +43 -30
  34. package/commands/project/logs.d.ts +13 -1
  35. package/commands/project/logs.js +69 -62
  36. package/commands/project/upload.d.ts +12 -0
  37. package/commands/project/upload.js +62 -49
  38. package/commands/project/watch.js +12 -0
  39. package/lang/en.js +11 -3
  40. package/lang/en.lyaml +95 -12
  41. package/lib/DevServerManagerV2.d.ts +1 -2
  42. package/lib/DevServerManagerV2.js +1 -2
  43. package/lib/LocalDevManagerV2.js +10 -15
  44. package/lib/app/migrate.d.ts +0 -2
  45. package/lib/app/migrate.js +62 -165
  46. package/lib/app/migrate_legacy.d.ts +4 -0
  47. package/lib/app/migrate_legacy.js +129 -0
  48. package/lib/configMigrate.d.ts +2 -0
  49. package/lib/configMigrate.js +104 -0
  50. package/lib/doctor/Diagnosis.d.ts +1 -2
  51. package/lib/doctor/Diagnosis.js +10 -6
  52. package/lib/doctor/DiagnosticInfoBuilder.d.ts +1 -0
  53. package/lib/doctor/DiagnosticInfoBuilder.js +1 -0
  54. package/lib/doctor/Doctor.d.ts +1 -0
  55. package/lib/doctor/Doctor.js +18 -0
  56. package/lib/middleware/__test__/configMiddleware.test.d.ts +1 -0
  57. package/lib/middleware/__test__/configMiddleware.test.js +194 -0
  58. package/lib/middleware/__test__/gitMiddleware.test.d.ts +1 -0
  59. package/lib/middleware/__test__/gitMiddleware.test.js +76 -0
  60. package/lib/middleware/__test__/notificationsMiddleware.test.d.ts +1 -0
  61. package/lib/middleware/__test__/notificationsMiddleware.test.js +10 -0
  62. package/lib/middleware/__test__/requestMiddleware.test.d.ts +1 -0
  63. package/lib/middleware/__test__/requestMiddleware.test.js +20 -0
  64. package/lib/middleware/__test__/utils.test.d.ts +1 -0
  65. package/lib/middleware/__test__/utils.test.js +53 -0
  66. package/lib/middleware/__test__/yargsChecksMiddleware.test.d.ts +1 -0
  67. package/lib/middleware/__test__/yargsChecksMiddleware.test.js +81 -0
  68. package/lib/middleware/configMiddleware.d.ts +13 -0
  69. package/lib/middleware/configMiddleware.js +109 -0
  70. package/lib/middleware/fireAlarmMiddleware.d.ts +4 -0
  71. package/lib/middleware/fireAlarmMiddleware.js +137 -0
  72. package/lib/middleware/gitMiddleware.d.ts +2 -0
  73. package/lib/middleware/gitMiddleware.js +14 -0
  74. package/lib/middleware/notificationsMiddleware.d.ts +1 -0
  75. package/lib/middleware/notificationsMiddleware.js +38 -0
  76. package/lib/middleware/requestMiddleware.d.ts +1 -0
  77. package/lib/middleware/requestMiddleware.js +11 -0
  78. package/lib/middleware/utils.d.ts +8 -0
  79. package/lib/middleware/utils.js +17 -0
  80. package/lib/middleware/yargsChecksMiddleware.d.ts +4 -0
  81. package/lib/middleware/yargsChecksMiddleware.js +24 -0
  82. package/lib/projects/ProjectLogsManager.d.ts +1 -1
  83. package/lib/projects/ProjectLogsManager.js +1 -1
  84. package/lib/projects/index.d.ts +1 -1
  85. package/lib/projects/structure.d.ts +1 -2
  86. package/lib/projects/structure.js +0 -4
  87. package/lib/projects/upload.d.ts +1 -1
  88. package/lib/ui/SpinniesManager.d.ts +1 -1
  89. package/lib/ui/index.d.ts +1 -0
  90. package/lib/ui/index.js +5 -0
  91. package/lib/ui/spinniesUtils.d.ts +5 -5
  92. package/package.json +7 -6
  93. package/types/ProjectComponents.d.ts +0 -15
@@ -0,0 +1,137 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.checkFireAlarms = checkFireAlarms;
7
+ const chalk_1 = __importDefault(require("chalk"));
8
+ const fireAlarm_1 = require("@hubspot/local-dev-lib/api/fireAlarm");
9
+ const logger_1 = require("@hubspot/local-dev-lib/logger");
10
+ const errorHandlers_1 = require("../errorHandlers");
11
+ const package_json_1 = __importDefault(require("../../package.json"));
12
+ const ui_1 = require("../ui");
13
+ const lang_1 = require("../lang");
14
+ /*
15
+ * Versions can be formatted like this:
16
+ * =7.2.2 -> targets the exact version 7.2.2
17
+ * =7.2.* -> targets all versions with a major of 7 and a minor of 2
18
+ * =7.* -> targets all versions with a major of 7
19
+ * =* -> targets all versions
20
+ * <=7.2.2 -> targets all versions equal to or less than 7.2.2
21
+ * <=7.2.* -> targets all versions equal to or less than 7.2
22
+ */
23
+ const WILDCARD = '*';
24
+ function isVersionTargeted(version, targetVersionString) {
25
+ // Assume we're targeting no versions if no version string is found
26
+ // Target all versions using the * wildcard
27
+ if (!targetVersionString) {
28
+ return false;
29
+ }
30
+ // Only support version targeting for the <= or = operator
31
+ if (!targetVersionString.startsWith('<=') &&
32
+ !targetVersionString.startsWith('=')) {
33
+ return false;
34
+ }
35
+ const targetVersion = targetVersionString.substring(targetVersionString.indexOf('=') + 1);
36
+ // Only allow exact version matching for tagged CLI releases (like -beta)
37
+ if (version.includes('-') || targetVersionString.includes('-')) {
38
+ if (!targetVersionString.startsWith('=')) {
39
+ return false;
40
+ }
41
+ return version === targetVersion;
42
+ }
43
+ const targetVersionParts = targetVersion.split('.');
44
+ const versionParts = version.split('.');
45
+ // Require the wildcard to be explicitly set to target all versions
46
+ if (versionParts.length < 3 &&
47
+ versionParts[versionParts.length - 1] !== WILDCARD) {
48
+ return false;
49
+ }
50
+ // Don't allow the less than or equal to operator to be used with the wildcard
51
+ // in the major version part (e.g. <=*)
52
+ if (targetVersionString.startsWith('<=') && versionParts[0] === WILDCARD) {
53
+ return false;
54
+ }
55
+ let targetAnyVersion = false;
56
+ return targetVersionParts.every((targetPart, i) => {
57
+ const versionPart = versionParts[i];
58
+ // Support generic version targeting (like 1.2.*)
59
+ if (targetPart === WILDCARD || targetAnyVersion) {
60
+ targetAnyVersion = true;
61
+ return true;
62
+ }
63
+ // Double check that the target part is a number
64
+ if (isNaN(Number(targetPart))) {
65
+ return false;
66
+ }
67
+ return targetVersionString.startsWith('<=')
68
+ ? Number(versionPart) <= Number(targetPart)
69
+ : Number(versionPart) === Number(targetPart);
70
+ });
71
+ }
72
+ function isCommandTargeted(command, targetCommandsString) {
73
+ // Require the wildcard to be explicitly set to target all commands
74
+ if (!targetCommandsString) {
75
+ return false;
76
+ }
77
+ if (targetCommandsString === WILDCARD) {
78
+ return true;
79
+ }
80
+ const targetCommands = targetCommandsString.split(',');
81
+ return targetCommands.some(cmd => command.startsWith(cmd));
82
+ }
83
+ function filterFireAlarm(fireAlarm, command, version) {
84
+ const commandIsTargeted = isCommandTargeted(command, fireAlarm.querySelector);
85
+ const versionIsTargeted = isVersionTargeted(version, fireAlarm.urlRegexPattern);
86
+ return commandIsTargeted && versionIsTargeted;
87
+ }
88
+ async function getFireAlarms(accountId, command, version) {
89
+ let relevantAlarms = [];
90
+ try {
91
+ const { data: fireAlarms } = await (0, fireAlarm_1.fetchFireAlarms)(accountId);
92
+ relevantAlarms = fireAlarms.filter(fireAlarm => filterFireAlarm(fireAlarm, command, version));
93
+ }
94
+ catch (error) {
95
+ (0, errorHandlers_1.debugError)(error);
96
+ }
97
+ return relevantAlarms;
98
+ }
99
+ async function logFireAlarms(accountId, command, version) {
100
+ const alarms = await getFireAlarms(accountId, command, version);
101
+ if (alarms.length > 0) {
102
+ const notifications = alarms.reduce((acc, alarm) => {
103
+ if (alarm.title && alarm.message) {
104
+ return (acc +
105
+ `${acc.length > 0 ? '\n\n' : ''}${chalk_1.default.bold(alarm.title)}\n${alarm.message}`);
106
+ }
107
+ return acc;
108
+ }, '');
109
+ let boxen;
110
+ try {
111
+ // The boxen package is exported as a module, so we have to use a dynamic import
112
+ boxen = (await import('boxen')).default;
113
+ }
114
+ catch (error) {
115
+ logger_1.logger.debug(`${(0, lang_1.i18n)('lib.middleware.fireAlarm.failedToLoadBoxen')}`);
116
+ return;
117
+ }
118
+ logger_1.logger.log(boxen(notifications, {
119
+ title: 'Notifications',
120
+ titleAlignment: 'left',
121
+ borderColor: ui_1.UI_COLORS.MARIGOLD,
122
+ margin: 1,
123
+ padding: 1,
124
+ textAlignment: 'left',
125
+ borderStyle: 'round',
126
+ }));
127
+ }
128
+ }
129
+ async function checkFireAlarms(args) {
130
+ const { derivedAccountId } = args;
131
+ try {
132
+ await logFireAlarms(derivedAccountId, args._.join(' '), package_json_1.default.version);
133
+ }
134
+ catch (error) {
135
+ (0, errorHandlers_1.debugError)(error);
136
+ }
137
+ }
@@ -0,0 +1,2 @@
1
+ import { Arguments } from 'yargs';
2
+ export declare function checkAndWarnGitInclusionMiddleware(argv: Arguments): void;
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.checkAndWarnGitInclusionMiddleware = checkAndWarnGitInclusionMiddleware;
4
+ const config_1 = require("@hubspot/local-dev-lib/config");
5
+ const git_1 = require("../ui/git");
6
+ function checkAndWarnGitInclusionMiddleware(argv) {
7
+ // Skip this when no command is provided
8
+ if (argv._.length) {
9
+ const configPath = (0, config_1.getConfigPath)();
10
+ if (configPath) {
11
+ (0, git_1.checkAndWarnGitInclusion)(configPath);
12
+ }
13
+ }
14
+ }
@@ -0,0 +1 @@
1
+ export declare function notifyAboutUpdates(): void;
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.notifyAboutUpdates = notifyAboutUpdates;
4
+ // Update-notifier is CommonJS, so we need to use require
5
+ const updateNotifier = require('update-notifier');
6
+ const chalk = require('chalk');
7
+ const pkg = require('../../package.json');
8
+ const { UI_COLORS, uiCommandReference } = require('../ui');
9
+ const { i18n } = require('../lang');
10
+ const notifier = updateNotifier({
11
+ pkg: { ...pkg, name: '@hubspot/cli' },
12
+ distTag: 'latest',
13
+ shouldNotifyInNpmScript: true,
14
+ });
15
+ const CMS_CLI_PACKAGE_NAME = '@hubspot/cms-cli';
16
+ function notifyAboutUpdates() {
17
+ notifier.notify({
18
+ message: pkg.name === CMS_CLI_PACKAGE_NAME
19
+ ? i18n(`commands.generalErrors.updateNotify.cmsUpdateNotification`, {
20
+ packageName: CMS_CLI_PACKAGE_NAME,
21
+ updateCommand: uiCommandReference('{updateCommand}'),
22
+ })
23
+ : i18n(`commands.generalErrors.updateNotify.cliUpdateNotification`, {
24
+ updateCommand: uiCommandReference('{updateCommand}'),
25
+ }),
26
+ defer: false,
27
+ boxenOptions: {
28
+ borderColor: UI_COLORS.MARIGOLD_DARK,
29
+ margin: 1,
30
+ padding: 1,
31
+ textAlignment: 'center',
32
+ borderStyle: 'round',
33
+ title: pkg.name === CMS_CLI_PACKAGE_NAME
34
+ ? null
35
+ : chalk.bold(i18n(`commands.generalErrors.updateNotify.notifyTitle`)),
36
+ },
37
+ });
38
+ }
@@ -0,0 +1 @@
1
+ export declare function setRequestHeaders(): void;
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.setRequestHeaders = setRequestHeaders;
7
+ const http_1 = require("@hubspot/local-dev-lib/http");
8
+ const package_json_1 = __importDefault(require("../../package.json"));
9
+ function setRequestHeaders() {
10
+ (0, http_1.addUserAgentHeader)('HubSpot CLI', package_json_1.default.version);
11
+ }
@@ -0,0 +1,8 @@
1
+ type TargetCommandMap = {
2
+ [key: string]: {
3
+ target?: boolean;
4
+ subCommands?: TargetCommandMap;
5
+ };
6
+ };
7
+ export declare function isTargetedCommand(commandParts: (string | number)[], targetCommandMap: TargetCommandMap): boolean;
8
+ export {};
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.isTargetedCommand = isTargetedCommand;
4
+ function isTargetedCommand(commandParts, targetCommandMap) {
5
+ const currentCommand = commandParts[0];
6
+ if (!targetCommandMap[currentCommand]) {
7
+ return false;
8
+ }
9
+ if (targetCommandMap[currentCommand].target) {
10
+ return true;
11
+ }
12
+ const subCommands = targetCommandMap[currentCommand].subCommands || {};
13
+ if (commandParts.length > 1) {
14
+ return isTargetedCommand(commandParts.slice(1), subCommands);
15
+ }
16
+ return false;
17
+ }
@@ -0,0 +1,4 @@
1
+ import { Arguments } from 'yargs';
2
+ export declare function performChecks(argv: Arguments<{
3
+ src?: string;
4
+ }>): boolean;
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.performChecks = performChecks;
4
+ const logger_1 = require("@hubspot/local-dev-lib/logger");
5
+ const exitCodes_1 = require("../enums/exitCodes");
6
+ const lang_1 = require("../lang");
7
+ const projects_1 = require("../projects");
8
+ const utils_1 = require("./utils");
9
+ const UPLOAD_AND_WATCH_COMMANDS = {
10
+ upload: { target: true },
11
+ watch: { target: true },
12
+ };
13
+ function performChecks(argv) {
14
+ // Require "project" command when running upload/watch inside of a project
15
+ if ((0, utils_1.isTargetedCommand)(argv._, UPLOAD_AND_WATCH_COMMANDS) &&
16
+ (0, projects_1.getIsInProject)(argv.src)) {
17
+ logger_1.logger.error((0, lang_1.i18n)(`commands.generalErrors.srcIsProject`, {
18
+ src: argv.src || './',
19
+ command: argv._.join(' '),
20
+ }));
21
+ process.exit(exitCodes_1.EXIT_CODES.ERROR);
22
+ }
23
+ return true;
24
+ }
@@ -14,7 +14,7 @@ declare class _ProjectLogsManager {
14
14
  init(accountId: number): Promise<void>;
15
15
  fetchFunctionDetails(): Promise<void>;
16
16
  getFunctionNames(): string[];
17
- setFunction(functionName: string): void;
17
+ setFunction(functionName?: string): void;
18
18
  }
19
19
  export declare const ProjectLogsManager: _ProjectLogsManager;
20
20
  export {};
@@ -79,7 +79,7 @@ class _ProjectLogsManager {
79
79
  return this.functions.map(serverlessFunction => serverlessFunction.componentName);
80
80
  }
81
81
  setFunction(functionName) {
82
- if (!(this.functions.length > 0)) {
82
+ if (!functionName || this.functions.length === 0) {
83
83
  throw new Error((0, lang_1.i18n)(`${i18nKey}.errors.noFunctionsInProject`, {
84
84
  link: (0, ui_1.uiLink)((0, lang_1.i18n)(`${i18nKey}.errors.noFunctionsLinkText`), 'https://developers.hubspot.com/docs/platform/serverless-functions'),
85
85
  }));
@@ -6,7 +6,7 @@ export declare function getProjectConfig(dir?: string): Promise<{
6
6
  projectDir: string | null;
7
7
  projectConfig: ProjectConfig | null;
8
8
  }>;
9
- export declare function validateProjectConfig(projectConfig: ProjectConfig | null, projectDir: string | null): void;
9
+ export declare function validateProjectConfig(projectConfig: ProjectConfig | null, projectDir: string | null): asserts projectConfig is ProjectConfig;
10
10
  export declare function ensureProjectExists(accountId: number, projectName: string, { forceCreate, allowCreate, noLogs, withPolling, uploadCommand, }?: {
11
11
  forceCreate?: boolean | undefined;
12
12
  allowCreate?: boolean | undefined;
@@ -1,6 +1,6 @@
1
1
  import { ComponentTypes, Component, GenericComponentConfig, PublicAppComponentConfig, PrivateAppComponentConfig, AppCardComponentConfig } from '../../types/Projects';
2
2
  import { IntermediateRepresentationNodeLocalDev } from '@hubspot/project-parsing-lib/src/lib/types';
3
- import { AppIRNode, CardIRNode } from '../../types/ProjectComponents';
3
+ import { AppIRNode } from '../../types/ProjectComponents';
4
4
  export declare const CONFIG_FILES: {
5
5
  [k in ComponentTypes]: string;
6
6
  };
@@ -16,4 +16,3 @@ export declare function getComponentUid(component?: Component | null): string |
16
16
  export declare function componentIsApp(component?: Component | null): component is Component<PublicAppComponentConfig | PrivateAppComponentConfig>;
17
17
  export declare function componentIsPublicApp(component?: Component | null): component is Component<PublicAppComponentConfig>;
18
18
  export declare function isAppIRNode(component: IntermediateRepresentationNodeLocalDev): component is AppIRNode;
19
- export declare function isCardIRNode(component: IntermediateRepresentationNodeLocalDev): component is CardIRNode;
@@ -44,7 +44,6 @@ exports.getComponentUid = getComponentUid;
44
44
  exports.componentIsApp = componentIsApp;
45
45
  exports.componentIsPublicApp = componentIsPublicApp;
46
46
  exports.isAppIRNode = isAppIRNode;
47
- exports.isCardIRNode = isCardIRNode;
48
47
  const fs = __importStar(require("fs"));
49
48
  const path = __importStar(require("path"));
50
49
  const fs_1 = require("@hubspot/local-dev-lib/fs");
@@ -175,6 +174,3 @@ function componentIsPublicApp(component) {
175
174
  function isAppIRNode(component) {
176
175
  return component.componentType === constants_1.IR_COMPONENT_TYPES.APPLICATION;
177
176
  }
178
- function isCardIRNode(component) {
179
- return component.componentType === constants_1.IR_COMPONENT_TYPES.CARD;
180
- }
@@ -1,6 +1,6 @@
1
1
  import { FileResult } from 'tmp';
2
2
  import { ProjectConfig } from '../../types/Projects';
3
- type ProjectUploadCallbackFunction<T> = (accountId: number, projectConfig: ProjectConfig, tempFile: FileResult, buildId?: number) => Promise<T>;
3
+ type ProjectUploadCallbackFunction<T> = (accountId: number, projectConfig: ProjectConfig, tempFile: FileResult, buildId: number) => Promise<T>;
4
4
  type ProjectUploadResult<T> = {
5
5
  result?: T;
6
6
  uploadError?: unknown;
@@ -22,7 +22,7 @@ declare class SpinniesManager {
22
22
  succeed(name: string, options?: Partial<SpinnerState>): SpinnerState;
23
23
  fail(name: string, options?: Partial<SpinnerState>): SpinnerState;
24
24
  remove(name: string): SpinnerState;
25
- stopAll(newStatus?: typeof VALID_STATUSES[number]): {
25
+ stopAll(newStatus?: (typeof VALID_STATUSES)[number]): {
26
26
  [key: string]: SpinnerState;
27
27
  };
28
28
  private hasAnySpinners;
package/lib/ui/index.d.ts CHANGED
@@ -15,3 +15,4 @@ export declare function uiDeprecatedTag(message: string, log?: boolean): string
15
15
  export declare function uiCommandDisabledBanner(command: string, url?: string, message?: string): void;
16
16
  export declare function uiDeprecatedDescription(message: string, command: string, url?: string): string | undefined;
17
17
  export declare function uiDeprecatedMessage(command: string, url?: string, message?: string): void;
18
+ export declare function indent(level: number): string;
package/lib/ui/index.js CHANGED
@@ -15,6 +15,7 @@ exports.uiDeprecatedTag = uiDeprecatedTag;
15
15
  exports.uiCommandDisabledBanner = uiCommandDisabledBanner;
16
16
  exports.uiDeprecatedDescription = uiDeprecatedDescription;
17
17
  exports.uiDeprecatedMessage = uiDeprecatedMessage;
18
+ exports.indent = indent;
18
19
  const chalk_1 = __importDefault(require("chalk"));
19
20
  const config_1 = require("@hubspot/local-dev-lib/config");
20
21
  const logger_1 = require("@hubspot/local-dev-lib/logger");
@@ -148,3 +149,7 @@ function uiDeprecatedMessage(command, url, message) {
148
149
  uiDeprecatedTag(tag);
149
150
  logger_1.logger.log();
150
151
  }
152
+ function indent(level) {
153
+ const indentation = ' ';
154
+ return indentation.repeat(level);
155
+ }
@@ -6,14 +6,14 @@ export type Spinner = {
6
6
  };
7
7
  export type SpinnerOptions = {
8
8
  text?: string;
9
- status?: typeof VALID_STATUSES[number];
9
+ status?: (typeof VALID_STATUSES)[number];
10
10
  indent?: number;
11
11
  spinner?: Partial<Spinner>;
12
12
  disableSpins?: boolean;
13
- color?: typeof VALID_COLORS[number];
14
- spinnerColor?: typeof VALID_COLORS[number];
15
- succeedColor?: typeof VALID_COLORS[number];
16
- failColor?: typeof VALID_COLORS[number];
13
+ color?: (typeof VALID_COLORS)[number];
14
+ spinnerColor?: (typeof VALID_COLORS)[number];
15
+ succeedColor?: (typeof VALID_COLORS)[number];
16
+ failColor?: (typeof VALID_COLORS)[number];
17
17
  succeedPrefix?: string;
18
18
  failPrefix?: string;
19
19
  };
package/package.json CHANGED
@@ -1,16 +1,17 @@
1
1
  {
2
2
  "name": "@hubspot/cli",
3
- "version": "7.4.0-experimental.0",
3
+ "version": "7.4.0",
4
4
  "description": "The official CLI for developing on HubSpot",
5
5
  "license": "Apache-2.0",
6
6
  "repository": "https://github.com/HubSpot/hubspot-cli",
7
7
  "dependencies": {
8
- "@hubspot/local-dev-lib": "0.3.0-experimental.0",
9
- "@hubspot/project-parsing-lib": "0.1.4",
8
+ "@hubspot/local-dev-lib": "3.5.2",
9
+ "@hubspot/project-parsing-lib": "0.1.7",
10
10
  "@hubspot/serverless-dev-runtime": "7.0.2",
11
11
  "@hubspot/theme-preview-dev-server": "0.0.10",
12
12
  "@hubspot/ui-extensions-dev-server": "0.8.52",
13
13
  "archiver": "7.0.1",
14
+ "boxen": "8.0.1",
14
15
  "chalk": "4.1.2",
15
16
  "chokidar": "3.6.0",
16
17
  "cli-cursor": "3.1.0",
@@ -41,7 +42,7 @@
41
42
  "@types/semver": "^7.5.8",
42
43
  "@types/tmp": "^0.2.6",
43
44
  "@types/yargs": "^17.0.33",
44
- "@typescript-eslint/eslint-plugin": "^8.11.0",
45
+ "@typescript-eslint/eslint-plugin": "8.29.0",
45
46
  "@typescript-eslint/parser": "^8.11.0",
46
47
  "axios": "^1.7.2",
47
48
  "eslint": "^8.56.0",
@@ -62,9 +63,9 @@
62
63
  },
63
64
  "scripts": {
64
65
  "build": "ts-node ./scripts/build.ts",
65
- "lint": "eslint . && prettier --list-different ./**/*.{js,json}",
66
+ "lint": "eslint . && prettier --list-different './**/*.{ts,js,json}'",
66
67
  "list-all-commands": "yarn ts-node ./scripts/get-all-commands.ts",
67
- "prettier:write": "prettier --write ./**/*.{ts,js,json}",
68
+ "prettier:write": "prettier --write './**/*.{ts,js,json}'",
68
69
  "test": "yarn node --experimental-vm-modules $(yarn bin jest)",
69
70
  "test-cli": "yarn build && yarn --cwd 'acceptance-tests' test-ci",
70
71
  "test-cli-debug": "yarn build && yarn --cwd 'acceptance-tests' test-debug",
@@ -16,23 +16,8 @@ type AppConfig = {
16
16
  conditionallyRequiredScopes: string[];
17
17
  };
18
18
  };
19
- type CardConfig = {
20
- name: string;
21
- description: string;
22
- previewImage: {
23
- file: string;
24
- altText: string;
25
- };
26
- entrypoint: string;
27
- location: string;
28
- objectTypes: string[];
29
- };
30
19
  export interface AppIRNode extends IntermediateRepresentationNodeLocalDev {
31
20
  componentType: typeof IR_COMPONENT_TYPES.APPLICATION;
32
21
  config: AppConfig;
33
22
  }
34
- export interface CardIRNode extends IntermediateRepresentationNodeLocalDev {
35
- componentType: typeof IR_COMPONENT_TYPES.CARD;
36
- config: CardConfig;
37
- }
38
23
  export {};