@hubspot/cli 8.2.1-experimental.0 → 8.2.1-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.
Files changed (75) hide show
  1. package/commands/cms/function/server.js +14 -7
  2. package/commands/cms/theme/preview.js +8 -1
  3. package/commands/getStarted.js +15 -20
  4. package/commands/project/add.js +7 -6
  5. package/commands/project/appInstallStatus.js +7 -3
  6. package/commands/project/create.js +9 -6
  7. package/commands/project/deploy.js +13 -11
  8. package/commands/project/dev/index.js +9 -7
  9. package/commands/project/dev/unifiedFlow.js +8 -0
  10. package/commands/project/download.js +3 -3
  11. package/commands/project/info.js +7 -4
  12. package/commands/project/installApp.js +8 -3
  13. package/commands/project/installDeps.js +6 -5
  14. package/commands/project/lint.js +16 -9
  15. package/commands/project/listBuilds.d.ts +3 -2
  16. package/commands/project/listBuilds.js +40 -13
  17. package/commands/project/migrate.js +14 -12
  18. package/commands/project/open.js +15 -7
  19. package/commands/project/profile/add.js +8 -4
  20. package/commands/project/profile/delete.js +8 -4
  21. package/commands/project/release/create.js +4 -6
  22. package/commands/project/release/info.js +3 -3
  23. package/commands/project/release/list.js +3 -3
  24. package/commands/project/updateDeps.js +6 -5
  25. package/commands/project/upload.js +26 -15
  26. package/commands/project/validate.js +14 -97
  27. package/commands/project/watch.js +8 -11
  28. package/commands/project.js +1 -1
  29. package/lang/en.d.ts +19 -18
  30. package/lang/en.js +23 -20
  31. package/lib/app/migrate.js +5 -7
  32. package/lib/cms/serverlessDevRuntime.d.ts +1 -0
  33. package/lib/cms/serverlessDevRuntime.js +72 -0
  34. package/lib/constants.d.ts +2 -0
  35. package/lib/constants.js +2 -0
  36. package/lib/dependencyManagement.js +3 -10
  37. package/lib/doctor/DiagnosticInfoBuilder.d.ts +2 -2
  38. package/lib/doctor/DiagnosticInfoBuilder.js +8 -8
  39. package/lib/doctor/Doctor.js +7 -9
  40. package/lib/errors/ProjectErrors.d.ts +0 -6
  41. package/lib/errors/ProjectErrors.js +0 -12
  42. package/lib/errors/ProjectValidationError.d.ts +2 -1
  43. package/lib/errors/ProjectValidationError.js +3 -1
  44. package/lib/getStartedV2Actions.js +14 -18
  45. package/lib/jsonOutput.d.ts +86 -0
  46. package/lib/jsonOutput.js +77 -0
  47. package/lib/npm/packageJson.js +1 -1
  48. package/lib/projects/ProjectLogsManager.js +1 -4
  49. package/lib/projects/config.d.ts +6 -5
  50. package/lib/projects/config.js +7 -38
  51. package/lib/projects/localDev/LocalDevLogger.d.ts +4 -0
  52. package/lib/projects/localDev/LocalDevLogger.js +18 -0
  53. package/lib/projects/localDev/LocalDevProcess.d.ts +11 -1
  54. package/lib/projects/localDev/LocalDevProcess.js +91 -9
  55. package/lib/projects/localDev/LocalDevState.d.ts +7 -1
  56. package/lib/projects/localDev/LocalDevState.js +19 -1
  57. package/lib/projects/localDev/LocalDevWatcher.js +1 -1
  58. package/lib/projects/localDev/LocalDevWebsocketServer.d.ts +1 -0
  59. package/lib/projects/localDev/LocalDevWebsocketServer.js +23 -1
  60. package/lib/projects/localDev/localDevWebsocketServerUtils.d.ts +2 -1
  61. package/lib/projects/localDev/localDevWebsocketServerUtils.js +3 -0
  62. package/lib/projects/projectProfiles.d.ts +2 -2
  63. package/lib/projects/projectProfiles.js +0 -3
  64. package/lib/projects/release.js +1 -1
  65. package/lib/projects/uieLinting.js +0 -3
  66. package/lib/projects/validate.d.ts +9 -0
  67. package/lib/projects/validate.js +96 -0
  68. package/lib/theme/migrate.js +1 -4
  69. package/mcp-server/tools/project/GetBuildLogsTool.js +2 -3
  70. package/mcp-server/tools/project/GetBuildStatusTool.js +2 -3
  71. package/mcp-server/tools/project/UploadProjectTools.js +3 -5
  72. package/package.json +11 -10
  73. package/types/LocalDev.d.ts +7 -0
  74. package/types/Projects.d.ts +1 -5
  75. package/types/Yargs.d.ts +1 -0
@@ -16,8 +16,10 @@ class LocalDevState {
16
16
  _devServerMessage;
17
17
  _uploadWarnings;
18
18
  _devServersStarted;
19
+ _autoUploadEnabled;
20
+ _uploadInProgress;
19
21
  actions;
20
- constructor({ targetProjectAccountId, targetTestingAccountId, projectConfig, projectDir, projectData, debug, initialProjectNodes, initialProjectProfileData, profile, env, actions, }) {
22
+ constructor({ targetProjectAccountId, targetTestingAccountId, projectConfig, projectDir, projectData, debug, initialProjectNodes, initialProjectProfileData, profile, env, actions, autoUploadEnabled, }) {
21
23
  this._targetProjectAccountId = targetProjectAccountId;
22
24
  this._targetTestingAccountId = targetTestingAccountId;
23
25
  this._profile = profile;
@@ -33,6 +35,8 @@ class LocalDevState {
33
35
  this._devServerMessage = LOCAL_DEV_SERVER_MESSAGE_TYPES.INITIAL;
34
36
  this._uploadWarnings = new Set();
35
37
  this._devServersStarted = false;
38
+ this._autoUploadEnabled = autoUploadEnabled || false;
39
+ this._uploadInProgress = false;
36
40
  this.actions = actions;
37
41
  this._listeners = {};
38
42
  }
@@ -117,6 +121,20 @@ class LocalDevState {
117
121
  this._devServersStarted = started;
118
122
  this.runListeners('devServersStarted');
119
123
  }
124
+ get autoUploadEnabled() {
125
+ return this._autoUploadEnabled;
126
+ }
127
+ set autoUploadEnabled(autoUploadEnabled) {
128
+ this._autoUploadEnabled = autoUploadEnabled;
129
+ this.runListeners('autoUploadEnabled');
130
+ }
131
+ get uploadInProgress() {
132
+ return this._uploadInProgress;
133
+ }
134
+ set uploadInProgress(inProgress) {
135
+ this._uploadInProgress = inProgress;
136
+ this.runListeners('uploadInProgress');
137
+ }
120
138
  addUploadWarning(warning) {
121
139
  this.uploadWarnings.add(warning);
122
140
  this.runListeners('uploadWarnings');
@@ -16,7 +16,7 @@ class LocalDevWatcher {
16
16
  }
17
17
  handleWatchEvent(filePath, event, configPaths) {
18
18
  if (configPaths.includes(filePath)) {
19
- return this.localDevProcess.handleConfigFileChange();
19
+ return this.localDevProcess.handleConfigFileChange(filePath);
20
20
  }
21
21
  return this.localDevProcess.handleFileChange(filePath, event);
22
22
  }
@@ -14,6 +14,7 @@ declare class LocalDevWebsocketServer {
14
14
  private setupAppDataListener;
15
15
  private setupUploadWarningsListener;
16
16
  private setupDevServersStartedListener;
17
+ private setupUploadInProgressListener;
17
18
  private setupStateListeners;
18
19
  start(): Promise<void>;
19
20
  shutdown(): void;
@@ -1,7 +1,7 @@
1
1
  import { addLocalStateFlag } from '@hubspot/local-dev-lib/config';
2
2
  import { LOCAL_DEV_UI_MESSAGE_SEND_TYPES, LOCAL_DEV_SERVER_MESSAGE_TYPES, CONFIG_LOCAL_STATE_FLAGS, LOCAL_DEV_WEBSOCKET_SERVER_INSTANCE_ID, } from '../../constants.js';
3
3
  import { removeAnsiCodes } from '../../ui/removeAnsiCodes.js';
4
- import { isDeployWebsocketMessage, isViewedWelcomeScreenWebsocketMessage, isUploadWebsocketMessage, isAppInstallFailureWebsocketMessage, isAppInstallSuccessWebsocketMessage, isAppInstallInitiatedWebsocketMessage, } from './localDevWebsocketServerUtils.js';
4
+ import { isDeployWebsocketMessage, isViewedWelcomeScreenWebsocketMessage, isUploadWebsocketMessage, isAppInstallFailureWebsocketMessage, isAppInstallSuccessWebsocketMessage, isAppInstallInitiatedWebsocketMessage, isSetAutoUploadWebsocketMessage, } from './localDevWebsocketServerUtils.js';
5
5
  import CLIWebSocketServer from '../../CLIWebSocketServer.js';
6
6
  const LOCAL_DEV_WEBSOCKET_SERVER_VERSION = 2;
7
7
  const LOG_PREFIX = '[LocalDevWebsocketServer]';
@@ -78,6 +78,12 @@ class LocalDevWebsocketServer {
78
78
  this.handleAppInstallInitiated();
79
79
  return true;
80
80
  }
81
+ else if (isSetAutoUploadWebsocketMessage(message)) {
82
+ if (this.localDevProcess.autoUploadAvailable) {
83
+ this.localDevProcess.setAutoUploadEnabled(message.data.enabled);
84
+ }
85
+ return true;
86
+ }
81
87
  return false;
82
88
  }
83
89
  sendProjectData(websocket) {
@@ -90,6 +96,9 @@ class LocalDevWebsocketServer {
90
96
  deployedBuild: this.localDevProcess.projectData.deployedBuild,
91
97
  targetProjectAccountId: this.localDevProcess.targetProjectAccountId,
92
98
  targetTestingAccountId: this.localDevProcess.targetTestingAccountId,
99
+ autoUploadEnabled: this.localDevProcess.autoUploadAvailable
100
+ ? this.localDevProcess.autoUploadEnabled
101
+ : undefined,
93
102
  },
94
103
  });
95
104
  }
@@ -143,11 +152,24 @@ class LocalDevWebsocketServer {
143
152
  this.localDevProcess.removeStateListener('devServersStarted', listener);
144
153
  });
145
154
  }
155
+ setupUploadInProgressListener(websocket) {
156
+ const listener = (uploadInProgress) => {
157
+ this.cliWebSocketServer.sendMessage(websocket, {
158
+ type: LOCAL_DEV_UI_MESSAGE_SEND_TYPES.UPLOAD_IN_PROGRESS,
159
+ data: { uploadInProgress },
160
+ });
161
+ };
162
+ this.localDevProcess.addStateListener('uploadInProgress', listener);
163
+ websocket.on('close', () => {
164
+ this.localDevProcess.removeStateListener('uploadInProgress', listener);
165
+ });
166
+ }
146
167
  setupStateListeners(websocket) {
147
168
  this.setupProjectNodesListener(websocket);
148
169
  this.setupAppDataListener(websocket);
149
170
  this.setupUploadWarningsListener(websocket);
150
171
  this.setupDevServersStartedListener(websocket);
172
+ this.setupUploadInProgressListener(websocket);
151
173
  }
152
174
  async start() {
153
175
  await this.cliWebSocketServer.start({
@@ -1,7 +1,8 @@
1
- import { LocalDevDeployWebsocketMessage } from '../../../types/LocalDev.js';
1
+ import { LocalDevDeployWebsocketMessage, LocalDevSetAutoUploadWebsocketMessage } from '../../../types/LocalDev.js';
2
2
  import { CLIWebSocketMessage } from '../../CLIWebSocketServer.js';
3
3
  export declare function isUploadWebsocketMessage(message: CLIWebSocketMessage): boolean;
4
4
  export declare function isDeployWebsocketMessage(message: CLIWebSocketMessage): message is LocalDevDeployWebsocketMessage;
5
+ export declare function isSetAutoUploadWebsocketMessage(message: CLIWebSocketMessage): message is LocalDevSetAutoUploadWebsocketMessage;
5
6
  export declare function isViewedWelcomeScreenWebsocketMessage(message: CLIWebSocketMessage): boolean;
6
7
  export declare function isAppInstallSuccessWebsocketMessage(message: CLIWebSocketMessage): boolean;
7
8
  export declare function isAppInstallInitiatedWebsocketMessage(message: CLIWebSocketMessage): boolean;
@@ -5,6 +5,9 @@ export function isUploadWebsocketMessage(message) {
5
5
  export function isDeployWebsocketMessage(message) {
6
6
  return message.type === LOCAL_DEV_UI_MESSAGE_RECEIVE_TYPES.DEPLOY;
7
7
  }
8
+ export function isSetAutoUploadWebsocketMessage(message) {
9
+ return message.type === LOCAL_DEV_UI_MESSAGE_RECEIVE_TYPES.SET_AUTO_UPLOAD;
10
+ }
8
11
  export function isViewedWelcomeScreenWebsocketMessage(message) {
9
12
  return (message.type === LOCAL_DEV_UI_MESSAGE_RECEIVE_TYPES.VIEWED_WELCOME_SCREEN);
10
13
  }
@@ -2,8 +2,8 @@ import { type HsProfileFile } from '@hubspot/project-parsing-lib/profiles';
2
2
  import { ProjectConfig } from '../../types/Projects.js';
3
3
  export declare function logProfileHeader(profileName: string): void;
4
4
  export declare function logProfileFooter(profile: HsProfileFile, includeVariables?: boolean): void;
5
- export declare function loadProfile(projectConfig: ProjectConfig | null, projectDir: string | null, profileName: string): HsProfileFile | never;
6
- export declare function loadAndValidateProfile(projectConfig: ProjectConfig | null, projectDir: string | null, profileName: string, silent?: boolean): Promise<HsProfileFile | never>;
5
+ export declare function loadProfile(projectConfig: ProjectConfig, projectDir: string, profileName: string): HsProfileFile | never;
6
+ export declare function loadAndValidateProfile(projectConfig: ProjectConfig, projectDir: string, profileName: string, silent?: boolean): Promise<HsProfileFile | never>;
7
7
  type ValidateProjectForProfileOptions = {
8
8
  projectConfig: ProjectConfig;
9
9
  projectDir: string;
@@ -25,9 +25,6 @@ export function logProfileFooter(profile, includeVariables = false) {
25
25
  uiLogger.log('');
26
26
  }
27
27
  export function loadProfile(projectConfig, projectDir, profileName) {
28
- if (!projectConfig || !projectDir) {
29
- throw new Error(lib.projectProfiles.loadProfile.errors.noProjectConfig);
30
- }
31
28
  const projectSourceDir = path.join(projectDir, projectConfig.srcDir);
32
29
  const profileFilename = getHsProfileFilename(profileName);
33
30
  let profile;
@@ -60,7 +60,7 @@ export async function resolveBuildId(accountId, projectName, buildOption, force)
60
60
  export async function validateBuildForRelease(accountId, projectName, buildId) {
61
61
  try {
62
62
  const { data: build } = await getBuildStatus(accountId, projectName, buildId);
63
- return meetsMinimumPlatformVersion(build.platformVersion, PLATFORM_VERSIONS.v2026_09_BETA);
63
+ return meetsMinimumPlatformVersion(build.platformVersion, PLATFORM_VERSIONS.v2027_03_BETA);
64
64
  }
65
65
  catch (e) {
66
66
  if (isSpecifiedError(e, { statusCode: 404 })) {
@@ -170,9 +170,6 @@ export async function createEslintConfig(directory, platformVersion) {
170
170
  }
171
171
  }
172
172
  export async function getUieLintablePackageJsonLocations(projectConfig) {
173
- if (!projectConfig.projectDir || !projectConfig.projectConfig?.srcDir) {
174
- return [];
175
- }
176
173
  const srcDirAbsolute = path.resolve(projectConfig.projectDir, projectConfig.projectConfig.srcDir);
177
174
  const uiePackageDirPrefixes = UIE_COMPONENTS.map(component => path.join(srcDirAbsolute, component.parentComponent
178
175
  ? Components[component.parentComponent].dir
@@ -0,0 +1,9 @@
1
+ import { ProjectConfig } from '../../types/Projects.js';
2
+ type ValidateProjectArgs = {
3
+ projectConfig: ProjectConfig;
4
+ projectDir: string;
5
+ derivedAccountId: number;
6
+ profile?: string;
7
+ };
8
+ export declare function validateProject({ projectConfig, projectDir, derivedAccountId, profile, }: ValidateProjectArgs): Promise<boolean>;
9
+ export {};
@@ -0,0 +1,96 @@
1
+ import path from 'path';
2
+ import { getAllHsProfiles } from '@hubspot/project-parsing-lib/profiles';
3
+ import { uiLogger } from '../ui/logger.js';
4
+ import SpinniesManager from '../ui/SpinniesManager.js';
5
+ import { logError } from '../errorHandlers/index.js';
6
+ import { commands } from '../../lang/en.js';
7
+ import { validateProjectForProfile } from './projectProfiles.js';
8
+ import { handleTranslate, validateSourceDirectory } from './upload.js';
9
+ function logValidationErrors(validationErrors) {
10
+ uiLogger.log('');
11
+ validationErrors.forEach(error => {
12
+ if (error instanceof Error) {
13
+ logError(error);
14
+ }
15
+ else {
16
+ uiLogger.log(error);
17
+ }
18
+ });
19
+ }
20
+ export async function validateProject({ projectConfig, projectDir, derivedAccountId, profile, }) {
21
+ let valid = true;
22
+ const srcDir = path.resolve(projectDir, projectConfig.srcDir);
23
+ const profiles = await getAllHsProfiles(path.join(projectDir, projectConfig.srcDir));
24
+ // If a profile is specified, only validate that profile
25
+ if (profile) {
26
+ const validationErrors = await validateProjectForProfile({
27
+ projectConfig,
28
+ projectDir,
29
+ profileName: profile,
30
+ derivedAccountId,
31
+ });
32
+ if (validationErrors.length) {
33
+ logValidationErrors(validationErrors);
34
+ valid = false;
35
+ }
36
+ }
37
+ else if (profiles.length > 0) {
38
+ // If no profile was specified and the project has profiles, validate all of them
39
+ SpinniesManager.add('validatingAllProfiles', {
40
+ text: commands.project.validate.spinners.validatingAllProfiles,
41
+ });
42
+ const errors = [];
43
+ for (const profileName of profiles) {
44
+ const validationErrors = await validateProjectForProfile({
45
+ projectConfig,
46
+ projectDir,
47
+ profileName,
48
+ derivedAccountId,
49
+ indentSpinners: true,
50
+ });
51
+ if (validationErrors.length) {
52
+ errors.push(...validationErrors);
53
+ valid = false;
54
+ }
55
+ }
56
+ if (valid) {
57
+ SpinniesManager.succeed('validatingAllProfiles', {
58
+ text: commands.project.validate.spinners.allProfilesValidationSucceeded,
59
+ });
60
+ }
61
+ else {
62
+ SpinniesManager.fail('validatingAllProfiles', {
63
+ text: commands.project.validate.spinners.allProfilesValidationFailed,
64
+ });
65
+ }
66
+ logValidationErrors(errors);
67
+ }
68
+ else {
69
+ // If the project has no profiles, validate the project without a profile
70
+ try {
71
+ await handleTranslate({
72
+ projectDir,
73
+ projectConfig,
74
+ accountId: derivedAccountId,
75
+ skipValidation: false,
76
+ });
77
+ }
78
+ catch (e) {
79
+ uiLogger.error(commands.project.validate.failure(projectConfig.name));
80
+ logError(e);
81
+ valid = false;
82
+ uiLogger.log('');
83
+ }
84
+ }
85
+ if (!valid) {
86
+ return false;
87
+ }
88
+ try {
89
+ await validateSourceDirectory(srcDir, projectConfig, projectDir);
90
+ }
91
+ catch (e) {
92
+ logError(e);
93
+ return false;
94
+ }
95
+ return true;
96
+ }
@@ -10,7 +10,7 @@ import { debugError } from '../errorHandlers/index.js';
10
10
  import { confirmPrompt } from '../prompts/promptUtils.js';
11
11
  import { fetchMigrationApps } from '../app/migrate.js';
12
12
  export async function getHasMigratableThemes(projectConfig) {
13
- if (!projectConfig?.projectConfig?.name || !projectConfig?.projectDir) {
13
+ if (!projectConfig) {
14
14
  return { hasMigratableThemes: false, migratableThemesCount: 0 };
15
15
  }
16
16
  const projectSrcDir = path.resolve(projectConfig.projectDir, projectConfig.projectConfig.srcDir);
@@ -29,9 +29,6 @@ export async function validateMigrationAppsAndThemes(hasApps, projectConfig) {
29
29
  }
30
30
  }
31
31
  export async function handleThemesMigration(projectConfig, platformVersion) {
32
- if (!projectConfig?.projectDir || !projectConfig?.projectConfig?.srcDir) {
33
- throw new Error(lib.migrate.errors.project.invalidConfig);
34
- }
35
32
  const projectSrcDir = path.resolve(projectConfig.projectDir, projectConfig.projectConfig.srcDir);
36
33
  let migrated = false;
37
34
  let failureReason;
@@ -3,7 +3,7 @@ import { z } from 'zod';
3
3
  import { formatTextContents } from '../../utils/content.js';
4
4
  import { isHubSpotHttpError } from '@hubspot/local-dev-lib/errors/index';
5
5
  import { http } from '@hubspot/local-dev-lib/http';
6
- import { getProjectConfig, validateProjectConfig, } from '../../../lib/projects/config.js';
6
+ import { getProjectConfig } from '../../../lib/projects/config.js';
7
7
  import { absoluteCurrentWorkingDirectory, absoluteProjectPath, } from './constants.js';
8
8
  import { setupHubSpotConfig } from '../../utils/config.js';
9
9
  import { discoverAccountTargets } from '../../../lib/accountTargetDiscovery.js';
@@ -64,8 +64,7 @@ export class GetBuildLogsTool extends Tool {
64
64
  async handler({ absoluteProjectPath, absoluteCurrentWorkingDirectory, buildId, logLevel, }) {
65
65
  setupHubSpotConfig(absoluteProjectPath);
66
66
  try {
67
- const { projectConfig, projectDir } = await getProjectConfig(absoluteProjectPath);
68
- validateProjectConfig(projectConfig, projectDir);
67
+ const { projectConfig, projectDir } = getProjectConfig(absoluteProjectPath);
69
68
  const { recommended } = await discoverAccountTargets({
70
69
  projectDir,
71
70
  projectConfig,
@@ -3,7 +3,7 @@ import { z } from 'zod';
3
3
  import { formatTextContents } from '../../utils/content.js';
4
4
  import { isHubSpotHttpError } from '@hubspot/local-dev-lib/errors/index';
5
5
  import { fetchProjectBuilds, getBuildStatus, } from '@hubspot/local-dev-lib/api/projects';
6
- import { getProjectConfig, validateProjectConfig, } from '../../../lib/projects/config.js';
6
+ import { getProjectConfig } from '../../../lib/projects/config.js';
7
7
  import moment from 'moment';
8
8
  import { absoluteCurrentWorkingDirectory, absoluteProjectPath, } from './constants.js';
9
9
  import { setupHubSpotConfig } from '../../utils/config.js';
@@ -109,8 +109,7 @@ export class GetBuildStatusTool extends Tool {
109
109
  async handler({ absoluteProjectPath, absoluteCurrentWorkingDirectory, buildId, limit, }) {
110
110
  setupHubSpotConfig(absoluteProjectPath);
111
111
  try {
112
- const { projectConfig, projectDir } = await getProjectConfig(absoluteProjectPath);
113
- validateProjectConfig(projectConfig, projectDir);
112
+ const { projectConfig, projectDir } = getProjectConfig(absoluteProjectPath);
114
113
  const { recommended } = await discoverAccountTargets({
115
114
  projectDir,
116
115
  projectConfig,
@@ -41,11 +41,9 @@ export class UploadProjectTools extends Tool {
41
41
  else {
42
42
  let hasProfiles = false;
43
43
  try {
44
- const { projectConfig } = await getProjectConfig(absoluteProjectPath);
45
- if (projectConfig) {
46
- const profiles = await getAllHsProfiles(path.join(absoluteProjectPath, projectConfig.srcDir));
47
- hasProfiles = profiles.length > 0;
48
- }
44
+ const { projectConfig } = getProjectConfig(absoluteProjectPath);
45
+ const profiles = await getAllHsProfiles(path.join(absoluteProjectPath, projectConfig.srcDir));
46
+ hasProfiles = profiles.length > 0;
49
47
  }
50
48
  catch (e) {
51
49
  this.logger.debug(toolName, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hubspot/cli",
3
- "version": "8.2.1-experimental.0",
3
+ "version": "8.2.1-experimental.1",
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",
@@ -10,9 +10,8 @@
10
10
  "!**/__tests__/**"
11
11
  ],
12
12
  "dependencies": {
13
- "@hubspot/local-dev-lib": "5.10.2",
14
- "@hubspot/project-parsing-lib": "0.4.0-experimental.0",
15
- "@hubspot/serverless-dev-runtime": "7.0.7",
13
+ "@hubspot/local-dev-lib": "5.10.3",
14
+ "@hubspot/project-parsing-lib": "0.23.2",
16
15
  "@hubspot/ui-extensions-dev-server": "2.1.2",
17
16
  "@inquirer/prompts": "7.1.0",
18
17
  "@modelcontextprotocol/sdk": "1.29.0",
@@ -21,13 +20,13 @@
21
20
  "chokidar": "3.6.0",
22
21
  "cli-cursor": "3.1.0",
23
22
  "cli-progress": "3.12.0",
24
- "express": "4.22.1",
23
+ "express": "4.22.2",
25
24
  "findup-sync": "4.0.0",
26
25
  "fs-extra": "8.1.0",
27
26
  "ink": "6.6.0",
28
27
  "ink-spinner": "5.0.0",
29
28
  "ink-text-input": "6.0.0",
30
- "js-yaml": "4.1.1",
29
+ "js-yaml": "4.3.1",
31
30
  "minimatch": "10.2.5",
32
31
  "moment": "2.30.1",
33
32
  "open": "7.4.2",
@@ -36,9 +35,9 @@
36
35
  "semver": "7.6.3",
37
36
  "strip-ansi": "7.1.0",
38
37
  "table": "6.9.0",
39
- "tmp": "0.2.4",
38
+ "tmp": "0.2.7",
40
39
  "update-notifier": "7.3.1",
41
- "ws": "8.20.0",
40
+ "ws": "8.21.0",
42
41
  "yargs": "17.7.2",
43
42
  "yargs-parser": "21.1.1",
44
43
  "zod": "^4.4.3"
@@ -61,7 +60,7 @@
61
60
  "@typescript-eslint/eslint-plugin": "^8.30.1",
62
61
  "@typescript-eslint/parser": "^8.11.0",
63
62
  "@vitest/coverage-v8": "^2.1.9",
64
- "axios": "1.18.1",
63
+ "axios": "1.19.0",
65
64
  "eslint": "^8.56.0",
66
65
  "eslint-plugin-import": "^2.31.0",
67
66
  "husky": "^4.3.8",
@@ -125,6 +124,8 @@
125
124
  },
126
125
  "resolutions": {
127
126
  "eslint-visitor-keys": "4.2.0",
128
- "@eslint-community/eslint-utils": "4.9.0"
127
+ "@eslint-community/eslint-utils": "4.9.0",
128
+ "@opentelemetry/core": "2.10.0",
129
+ "axios": "1.19.0"
129
130
  }
130
131
  }
@@ -25,6 +25,7 @@ export type LocalDevStateConstructorOptions = {
25
25
  initialProjectProfileData: HSProfileVariables;
26
26
  env: Environment;
27
27
  actions: LocalDevActions;
28
+ autoUploadEnabled?: boolean;
28
29
  };
29
30
  export type LocalDevDeployWebsocketMessage = {
30
31
  type: typeof LOCAL_DEV_UI_MESSAGE_RECEIVE_TYPES.DEPLOY;
@@ -32,6 +33,12 @@ export type LocalDevDeployWebsocketMessage = {
32
33
  force: boolean;
33
34
  };
34
35
  };
36
+ export type LocalDevSetAutoUploadWebsocketMessage = {
37
+ type: typeof LOCAL_DEV_UI_MESSAGE_RECEIVE_TYPES.SET_AUTO_UPLOAD;
38
+ data: {
39
+ enabled: boolean;
40
+ };
41
+ };
35
42
  export type LocalDevStateListener<K extends keyof LocalDevState> = (value: LocalDevState[K]) => void;
36
43
  export type AppLocalDevData = {
37
44
  id: number;
@@ -1,6 +1,7 @@
1
1
  import { Build, SubbuildStatus } from '@hubspot/local-dev-lib/types/Build';
2
2
  import { Deploy, SubdeployStatus } from '@hubspot/local-dev-lib/types/Deploy';
3
3
  import { appComponent, marketplaceDistribution, oAuth, privateDistribution, staticAuth } from '../lib/constants.js';
4
+ export type { ProjectConfig } from '@hubspot/project-parsing-lib/projects';
4
5
  export type ProjectTemplate = {
5
6
  name: string;
6
7
  label: string;
@@ -20,11 +21,6 @@ export type ComponentTemplateChoice = {
20
21
  value: ComponentTemplate;
21
22
  disabled?: string | boolean;
22
23
  };
23
- export type ProjectConfig = {
24
- name: string;
25
- srcDir: string;
26
- platformVersion: string;
27
- };
28
24
  export type ProjectTaskStates = {
29
25
  BUILDING?: string;
30
26
  ENQUEUED?: string;
package/types/Yargs.d.ts CHANGED
@@ -49,6 +49,7 @@ export type ProjectDevArgs = CommonArgs & ConfigArgs & EnvironmentArgs & {
49
49
  testingAccount?: string | number;
50
50
  projectAccount?: string | number;
51
51
  port?: number;
52
+ autoUpload?: boolean;
52
53
  };
53
54
  export type TestingArgs = {
54
55
  qa?: boolean;