@hubspot/cli 7.11.0-experimental.0 → 7.11.1-beta.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 (32) hide show
  1. package/commands/cms/__tests__/module.test.d.ts +1 -0
  2. package/commands/cms/__tests__/module.test.js +45 -0
  3. package/commands/cms/module.js +5 -1
  4. package/commands/project/__tests__/deploy.test.js +1 -1
  5. package/lang/en.d.ts +1 -0
  6. package/lang/en.js +1 -0
  7. package/lib/app/migrate.js +3 -1
  8. package/lib/errorHandlers/index.js +2 -4
  9. package/mcp-server/server.js +0 -4
  10. package/mcp-server/tools/cms/HsCreateFunctionTool.d.ts +8 -16
  11. package/mcp-server/tools/cms/HsCreateModuleTool.d.ts +2 -20
  12. package/mcp-server/tools/cms/HsCreateTemplateTool.d.ts +11 -12
  13. package/mcp-server/tools/cms/HsFunctionLogsTool.d.ts +1 -15
  14. package/mcp-server/tools/cms/HsListFunctionsTool.d.ts +1 -9
  15. package/mcp-server/tools/cms/HsListTool.d.ts +1 -9
  16. package/mcp-server/tools/project/AddFeatureToProjectTool.d.ts +4 -18
  17. package/mcp-server/tools/project/CreateProjectTool.d.ts +5 -21
  18. package/mcp-server/tools/project/CreateTestAccountTool.d.ts +31 -26
  19. package/mcp-server/tools/project/DeployProjectTool.d.ts +1 -9
  20. package/mcp-server/tools/project/DocFetchTool.d.ts +1 -7
  21. package/mcp-server/tools/project/DocsSearchTool.d.ts +1 -7
  22. package/mcp-server/tools/project/GetApiUsagePatternsByAppIdTool.d.ts +1 -11
  23. package/mcp-server/tools/project/GetApplicationInfoTool.d.ts +1 -5
  24. package/mcp-server/tools/project/GetBuildLogsTool.d.ts +7 -12
  25. package/mcp-server/tools/project/GetBuildStatusTool.d.ts +1 -11
  26. package/mcp-server/tools/project/GetConfigValuesTool.d.ts +1 -9
  27. package/mcp-server/tools/project/GuidedWalkthroughTool.d.ts +2 -8
  28. package/mcp-server/tools/project/UploadProjectTools.d.ts +1 -11
  29. package/mcp-server/tools/project/ValidateProjectTool.d.ts +1 -7
  30. package/mcp-server/tools/project/__tests__/CreateTestAccountTool.test.js +0 -11
  31. package/mcp-server/tools/project/constants.d.ts +1 -1
  32. package/package.json +3 -3
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,45 @@
1
+ import yargs from 'yargs';
2
+ import createCommand from '../module/create.js';
3
+ import marketplaceValidateCommand from '../module/marketplace-validate.js';
4
+ import moduleCommands from '../module.js';
5
+ vi.mock('../module/create');
6
+ vi.mock('../module/marketplace-validate');
7
+ vi.mock('../../lib/commonOpts');
8
+ const commandSpy = vi
9
+ .spyOn(yargs, 'command')
10
+ .mockReturnValue(yargs);
11
+ const demandCommandSpy = vi
12
+ .spyOn(yargs, 'demandCommand')
13
+ .mockReturnValue(yargs);
14
+ describe('commands/cms/module', () => {
15
+ describe('command', () => {
16
+ it('should have the correct command structure', () => {
17
+ expect(moduleCommands.command).toEqual('module');
18
+ });
19
+ });
20
+ describe('describe', () => {
21
+ it('should provide a description', () => {
22
+ expect(moduleCommands.describe).toBeDefined();
23
+ });
24
+ });
25
+ describe('builder', () => {
26
+ beforeEach(() => {
27
+ commandSpy.mockClear();
28
+ demandCommandSpy.mockClear();
29
+ });
30
+ const subcommands = [createCommand, marketplaceValidateCommand];
31
+ it('should demand the command takes one positional argument', () => {
32
+ moduleCommands.builder(yargs);
33
+ expect(demandCommandSpy).toHaveBeenCalledTimes(1);
34
+ expect(demandCommandSpy).toHaveBeenCalledWith(1, '');
35
+ });
36
+ it('should add the correct number of sub commands', () => {
37
+ moduleCommands.builder(yargs);
38
+ expect(commandSpy).toHaveBeenCalledTimes(subcommands.length);
39
+ });
40
+ it.each(subcommands)('should attach the %s subcommand', module => {
41
+ moduleCommands.builder(yargs);
42
+ expect(commandSpy).toHaveBeenCalledWith(module);
43
+ });
44
+ });
45
+ });
@@ -1,10 +1,14 @@
1
1
  import createCommand from './module/create.js';
2
+ import marketplaceValidateCommand from './module/marketplace-validate.js';
2
3
  import { commands } from '../../lang/en.js';
3
4
  import { makeYargsBuilder } from '../../lib/yargsUtils.js';
4
5
  const command = 'module';
5
6
  const describe = commands.cms.subcommands.module.describe;
6
7
  function moduleBuilder(yargs) {
7
- yargs.command(createCommand).demandCommand(1, '');
8
+ yargs
9
+ .command(createCommand)
10
+ .command(marketplaceValidateCommand)
11
+ .demandCommand(1, '');
8
12
  return yargs;
9
13
  }
10
14
  const builder = makeYargsBuilder(moduleBuilder, command, describe);
@@ -303,7 +303,7 @@ describe('commands/project/deploy', () => {
303
303
  });
304
304
  await projectDeployCommand.handler(args);
305
305
  expect(uiLogger.error).toHaveBeenCalledTimes(1);
306
- expect(uiLogger.error).toHaveBeenCalledWith(`The request for 'project deploy' in account ${args.derivedAccountId} failed due to a client error.`);
306
+ expect(uiLogger.error).toHaveBeenCalledWith(expect.stringContaining(`The request for 'project deploy' in account ${args.derivedAccountId} failed due to a client error.`));
307
307
  expect(processExitSpy).toHaveBeenCalledTimes(1);
308
308
  expect(processExitSpy).toHaveBeenCalledWith(EXIT_CODES.ERROR);
309
309
  });
package/lang/en.d.ts CHANGED
@@ -3661,6 +3661,7 @@ export declare const lib: {
3661
3661
  unknownErrorOccurred: string;
3662
3662
  configTimeoutErrorOccurred: (timeout: number, configSetCommand: string) => string;
3663
3663
  genericTimeoutErrorOccurred: string;
3664
+ additionalDebugContext: string;
3664
3665
  };
3665
3666
  suppressErrors: {
3666
3667
  platformVersionErrors: {
package/lang/en.js CHANGED
@@ -3683,6 +3683,7 @@ export const lib = {
3683
3683
  unknownErrorOccurred: 'An unknown error has occurred.',
3684
3684
  configTimeoutErrorOccurred: (timeout, configSetCommand) => `This error occurred because a request exceeded the default HTTP timeout of ${timeout}ms. To increase the default HTTP timeout, run ${uiCommandReference(configSetCommand)}.`,
3685
3685
  genericTimeoutErrorOccurred: 'This error occurred because an HTTP request timed out. Re-running the command may resolve this issue.',
3686
+ additionalDebugContext: chalk.bold(`For more information, run the command again with the ${uiCommandReference('--debug')} flag.`),
3686
3687
  },
3687
3688
  suppressErrors: {
3688
3689
  platformVersionErrors: {
@@ -300,7 +300,9 @@ export async function downloadProjectFiles(derivedAccountId, projectName, buildI
300
300
  const { projectDir } = projectConfig;
301
301
  absoluteDestPath = projectDir;
302
302
  const { srcDir } = projectConfig.projectConfig;
303
- const archiveDest = path.join(projectDir, 'archive');
303
+ const archiveDest = srcDir === '.'
304
+ ? path.join(path.dirname(projectDir), `${path.basename(projectDir)}-archive`)
305
+ : path.join(projectDir, 'archive');
304
306
  // Move the existing source directory to archive
305
307
  fs.renameSync(path.join(projectDir, srcDir), archiveDest);
306
308
  uiLogger.info(lib.migrate.sourceContentsMoved(archiveDest));
@@ -14,13 +14,11 @@ export function logError(error, context) {
14
14
  if (shouldSuppressError(error, context)) {
15
15
  return;
16
16
  }
17
- if (isHubSpotHttpError(error) && 'context' in error) {
17
+ if (isHubSpotHttpError(error)) {
18
18
  if (shouldSuppressError(error, error.context)) {
19
19
  return;
20
20
  }
21
- }
22
- if (isHubSpotHttpError(error) && context) {
23
- error.updateContext(context);
21
+ error.updateContext(context || {}, lib.errorHandlers.index.additionalDebugContext);
24
22
  }
25
23
  if (isHubSpotHttpError(error) && isValidationError(error)) {
26
24
  uiLogger.error(error.formattedValidationErrors());
@@ -5,10 +5,6 @@ const server = new McpServer({
5
5
  name: 'HubSpot CLI MCP Server',
6
6
  version: '0.0.1',
7
7
  description: 'Helps perform tasks for local development of HubSpot projects.',
8
- capabilities: {
9
- tools: {},
10
- prompts: {},
11
- },
12
8
  });
13
9
  registerProjectTools(server);
14
10
  registerCmsTools(server);
@@ -6,23 +6,15 @@ declare const inputSchemaZodObject: z.ZodObject<{
6
6
  dest: z.ZodOptional<z.ZodString>;
7
7
  functionsFolder: z.ZodOptional<z.ZodString>;
8
8
  filename: z.ZodOptional<z.ZodString>;
9
- endpointMethod: z.ZodOptional<z.ZodEnum<["DELETE", "GET", "PATCH", "POST", "PUT"]>>;
9
+ endpointMethod: z.ZodOptional<z.ZodEnum<{
10
+ DELETE: "DELETE";
11
+ GET: "GET";
12
+ PATCH: "PATCH";
13
+ POST: "POST";
14
+ PUT: "PUT";
15
+ }>>;
10
16
  endpointPath: z.ZodOptional<z.ZodString>;
11
- }, "strip", z.ZodTypeAny, {
12
- absoluteCurrentWorkingDirectory: string;
13
- dest?: string | undefined;
14
- functionsFolder?: string | undefined;
15
- filename?: string | undefined;
16
- endpointMethod?: "DELETE" | "GET" | "PATCH" | "POST" | "PUT" | undefined;
17
- endpointPath?: string | undefined;
18
- }, {
19
- absoluteCurrentWorkingDirectory: string;
20
- dest?: string | undefined;
21
- functionsFolder?: string | undefined;
22
- filename?: string | undefined;
23
- endpointMethod?: "DELETE" | "GET" | "PATCH" | "POST" | "PUT" | undefined;
24
- endpointPath?: string | undefined;
25
- }>;
17
+ }, z.core.$strip>;
26
18
  export type HsCreateFunctionInputSchema = z.infer<typeof inputSchemaZodObject>;
27
19
  export declare class HsCreateFunctionTool extends Tool<HsCreateFunctionInputSchema> {
28
20
  constructor(mcpServer: McpServer);
@@ -7,28 +7,10 @@ declare const inputSchemaZodObject: z.ZodObject<{
7
7
  dest: z.ZodOptional<z.ZodString>;
8
8
  moduleLabel: z.ZodOptional<z.ZodString>;
9
9
  reactType: z.ZodOptional<z.ZodBoolean>;
10
- contentTypes: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
10
+ contentTypes: z.ZodOptional<z.ZodString>;
11
11
  global: z.ZodOptional<z.ZodBoolean>;
12
12
  availableForNewContent: z.ZodOptional<z.ZodBoolean>;
13
- }, "strip", z.ZodTypeAny, {
14
- absoluteCurrentWorkingDirectory: string;
15
- dest?: string | undefined;
16
- global?: boolean | undefined;
17
- moduleLabel?: string | undefined;
18
- reactType?: boolean | undefined;
19
- contentTypes?: string | undefined;
20
- availableForNewContent?: boolean | undefined;
21
- userSuppliedName?: string | undefined;
22
- }, {
23
- absoluteCurrentWorkingDirectory: string;
24
- dest?: string | undefined;
25
- global?: boolean | undefined;
26
- moduleLabel?: string | undefined;
27
- reactType?: boolean | undefined;
28
- contentTypes?: string | undefined;
29
- availableForNewContent?: boolean | undefined;
30
- userSuppliedName?: string | undefined;
31
- }>;
13
+ }, z.core.$strip>;
32
14
  export type HsCreateModuleInputSchema = z.infer<typeof inputSchemaZodObject>;
33
15
  export declare class HsCreateModuleTool extends Tool<HsCreateModuleInputSchema> {
34
16
  constructor(mcpServer: McpServer);
@@ -5,18 +5,17 @@ declare const inputSchemaZodObject: z.ZodObject<{
5
5
  absoluteCurrentWorkingDirectory: z.ZodString;
6
6
  userSuppliedName: z.ZodOptional<z.ZodString>;
7
7
  dest: z.ZodOptional<z.ZodString>;
8
- templateType: z.ZodOptional<z.ZodEnum<["page-template", "email-template", "partial", "global-partial", "blog-listing-template", "blog-post-template", "search-template", "section"]>>;
9
- }, "strip", z.ZodTypeAny, {
10
- absoluteCurrentWorkingDirectory: string;
11
- dest?: string | undefined;
12
- templateType?: "page-template" | "email-template" | "partial" | "global-partial" | "blog-listing-template" | "blog-post-template" | "search-template" | "section" | undefined;
13
- userSuppliedName?: string | undefined;
14
- }, {
15
- absoluteCurrentWorkingDirectory: string;
16
- dest?: string | undefined;
17
- templateType?: "page-template" | "email-template" | "partial" | "global-partial" | "blog-listing-template" | "blog-post-template" | "search-template" | "section" | undefined;
18
- userSuppliedName?: string | undefined;
19
- }>;
8
+ templateType: z.ZodOptional<z.ZodEnum<{
9
+ "page-template": "page-template";
10
+ "email-template": "email-template";
11
+ partial: "partial";
12
+ "global-partial": "global-partial";
13
+ "blog-listing-template": "blog-listing-template";
14
+ "blog-post-template": "blog-post-template";
15
+ "search-template": "search-template";
16
+ section: "section";
17
+ }>>;
18
+ }, z.core.$strip>;
20
19
  export type HsCreateTemplateInputSchema = z.infer<typeof inputSchemaZodObject>;
21
20
  export declare class HsCreateTemplateTool extends Tool<HsCreateTemplateInputSchema> {
22
21
  constructor(mcpServer: McpServer);
@@ -8,21 +8,7 @@ declare const inputSchemaZodObject: z.ZodObject<{
8
8
  latest: z.ZodOptional<z.ZodBoolean>;
9
9
  compact: z.ZodOptional<z.ZodBoolean>;
10
10
  limit: z.ZodOptional<z.ZodNumber>;
11
- }, "strip", z.ZodTypeAny, {
12
- endpoint: string;
13
- absoluteCurrentWorkingDirectory: string;
14
- account?: string | undefined;
15
- latest?: boolean | undefined;
16
- compact?: boolean | undefined;
17
- limit?: number | undefined;
18
- }, {
19
- endpoint: string;
20
- absoluteCurrentWorkingDirectory: string;
21
- account?: string | undefined;
22
- latest?: boolean | undefined;
23
- compact?: boolean | undefined;
24
- limit?: number | undefined;
25
- }>;
11
+ }, z.core.$strip>;
26
12
  export type HsFunctionLogsInputSchema = z.infer<typeof inputSchemaZodObject>;
27
13
  export declare class HsFunctionLogsTool extends Tool<HsFunctionLogsInputSchema> {
28
14
  constructor(mcpServer: McpServer);
@@ -5,15 +5,7 @@ declare const inputSchemaZodObject: z.ZodObject<{
5
5
  absoluteCurrentWorkingDirectory: z.ZodString;
6
6
  account: z.ZodOptional<z.ZodString>;
7
7
  json: z.ZodOptional<z.ZodBoolean>;
8
- }, "strip", z.ZodTypeAny, {
9
- absoluteCurrentWorkingDirectory: string;
10
- account?: string | undefined;
11
- json?: boolean | undefined;
12
- }, {
13
- absoluteCurrentWorkingDirectory: string;
14
- account?: string | undefined;
15
- json?: boolean | undefined;
16
- }>;
8
+ }, z.core.$strip>;
17
9
  export type HsListFunctionsInputSchema = z.infer<typeof inputSchemaZodObject>;
18
10
  export declare class HsListFunctionsTool extends Tool<HsListFunctionsInputSchema> {
19
11
  constructor(mcpServer: McpServer);
@@ -5,15 +5,7 @@ declare const inputSchemaZodObject: z.ZodObject<{
5
5
  absoluteCurrentWorkingDirectory: z.ZodString;
6
6
  path: z.ZodOptional<z.ZodString>;
7
7
  account: z.ZodOptional<z.ZodString>;
8
- }, "strip", z.ZodTypeAny, {
9
- absoluteCurrentWorkingDirectory: string;
10
- account?: string | undefined;
11
- path?: string | undefined;
12
- }, {
13
- absoluteCurrentWorkingDirectory: string;
14
- account?: string | undefined;
15
- path?: string | undefined;
16
- }>;
8
+ }, z.core.$strip>;
17
9
  export type HsListInputSchema = z.infer<typeof inputSchemaZodObject>;
18
10
  export declare class HsListTool extends Tool<HsListInputSchema> {
19
11
  constructor(mcpServer: McpServer);
@@ -5,24 +5,10 @@ declare const inputSchemaZodObject: z.ZodObject<{
5
5
  absoluteProjectPath: z.ZodString;
6
6
  absoluteCurrentWorkingDirectory: z.ZodString;
7
7
  addApp: z.ZodBoolean;
8
- distribution: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"marketplace">, z.ZodLiteral<"private">]>>;
9
- auth: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"static">, z.ZodLiteral<"oauth">]>>;
10
- features: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodLiteral<"card">, z.ZodLiteral<"settings">, z.ZodLiteral<"app-function">, z.ZodLiteral<"webhooks">, z.ZodLiteral<"workflow-action">, z.ZodLiteral<"workflow-action-tool">, z.ZodLiteral<"app-object">, z.ZodLiteral<"app-event">, z.ZodLiteral<"scim">, z.ZodLiteral<"page">]>, "many">>;
11
- }, "strip", z.ZodTypeAny, {
12
- absoluteProjectPath: string;
13
- absoluteCurrentWorkingDirectory: string;
14
- addApp: boolean;
15
- auth?: "oauth" | "static" | undefined;
16
- distribution?: "marketplace" | "private" | undefined;
17
- features?: ("card" | "settings" | "page" | "app-event" | "workflow-action-tool" | "workflow-action" | "app-function" | "webhooks" | "app-object" | "scim")[] | undefined;
18
- }, {
19
- absoluteProjectPath: string;
20
- absoluteCurrentWorkingDirectory: string;
21
- addApp: boolean;
22
- auth?: "oauth" | "static" | undefined;
23
- distribution?: "marketplace" | "private" | undefined;
24
- features?: ("card" | "settings" | "page" | "app-event" | "workflow-action-tool" | "workflow-action" | "app-function" | "webhooks" | "app-object" | "scim")[] | undefined;
25
- }>;
8
+ distribution: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"marketplace">, z.ZodLiteral<"private">]>>;
9
+ auth: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"static">, z.ZodLiteral<"oauth">]>>;
10
+ features: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodLiteral<"card">, z.ZodLiteral<"settings">, z.ZodLiteral<"app-function">, z.ZodLiteral<"webhooks">, z.ZodLiteral<"workflow-action">, z.ZodLiteral<"workflow-action-tool">, z.ZodLiteral<"app-object">, z.ZodLiteral<"app-event">, z.ZodLiteral<"scim">, z.ZodLiteral<"page">]>>>;
11
+ }, z.core.$strip>;
26
12
  export type AddFeatureInputSchema = z.infer<typeof inputSchemaZodObject>;
27
13
  export declare class AddFeatureToProjectTool extends Tool<AddFeatureInputSchema> {
28
14
  constructor(mcpServer: McpServer);
@@ -5,27 +5,11 @@ declare const inputSchemaZodObject: z.ZodObject<{
5
5
  absoluteCurrentWorkingDirectory: z.ZodString;
6
6
  name: z.ZodOptional<z.ZodString>;
7
7
  destination: z.ZodString;
8
- projectBase: z.ZodUnion<[z.ZodLiteral<"empty">, z.ZodLiteral<"app">]>;
9
- distribution: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"marketplace">, z.ZodLiteral<"private">]>>;
10
- auth: z.ZodOptional<z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"static">, z.ZodLiteral<"oauth">]>>>;
11
- features: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodLiteral<"card">, z.ZodLiteral<"settings">, z.ZodLiteral<"app-function">, z.ZodLiteral<"webhooks">, z.ZodLiteral<"workflow-action">, z.ZodLiteral<"workflow-action-tool">, z.ZodLiteral<"app-object">, z.ZodLiteral<"app-event">, z.ZodLiteral<"scim">, z.ZodLiteral<"page">]>, "many">>;
12
- }, "strip", z.ZodTypeAny, {
13
- projectBase: "app" | "empty";
14
- absoluteCurrentWorkingDirectory: string;
15
- destination: string;
16
- name?: string | undefined;
17
- auth?: "oauth" | "static" | undefined;
18
- distribution?: "marketplace" | "private" | undefined;
19
- features?: ("card" | "settings" | "page" | "app-event" | "workflow-action-tool" | "workflow-action" | "app-function" | "webhooks" | "app-object" | "scim")[] | undefined;
20
- }, {
21
- projectBase: "app" | "empty";
22
- absoluteCurrentWorkingDirectory: string;
23
- destination: string;
24
- name?: string | undefined;
25
- auth?: "oauth" | "static" | undefined;
26
- distribution?: "marketplace" | "private" | undefined;
27
- features?: ("card" | "settings" | "page" | "app-event" | "workflow-action-tool" | "workflow-action" | "app-function" | "webhooks" | "app-object" | "scim")[] | undefined;
28
- }>;
8
+ projectBase: z.ZodUnion<readonly [z.ZodLiteral<"empty">, z.ZodLiteral<"app">]>;
9
+ distribution: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"marketplace">, z.ZodLiteral<"private">]>>;
10
+ auth: z.ZodOptional<z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"static">, z.ZodLiteral<"oauth">]>>>;
11
+ features: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodLiteral<"card">, z.ZodLiteral<"settings">, z.ZodLiteral<"app-function">, z.ZodLiteral<"webhooks">, z.ZodLiteral<"workflow-action">, z.ZodLiteral<"workflow-action-tool">, z.ZodLiteral<"app-object">, z.ZodLiteral<"app-event">, z.ZodLiteral<"scim">, z.ZodLiteral<"page">]>>>;
12
+ }, z.core.$strip>;
29
13
  export type CreateProjectInputSchema = z.infer<typeof inputSchemaZodObject>;
30
14
  export declare class CreateProjectTool extends Tool<CreateProjectInputSchema> {
31
15
  constructor(mcpServer: McpServer);
@@ -6,32 +6,37 @@ declare const createTestAccountInputSchema: z.ZodObject<{
6
6
  configPath: z.ZodOptional<z.ZodString>;
7
7
  name: z.ZodOptional<z.ZodString>;
8
8
  description: z.ZodOptional<z.ZodString>;
9
- marketingLevel: z.ZodOptional<z.ZodEnum<["FREE", "STARTER", "PROFESSIONAL", "ENTERPRISE"]>>;
10
- opsLevel: z.ZodOptional<z.ZodEnum<["FREE", "STARTER", "PROFESSIONAL", "ENTERPRISE"]>>;
11
- serviceLevel: z.ZodOptional<z.ZodEnum<["FREE", "STARTER", "PROFESSIONAL", "ENTERPRISE"]>>;
12
- salesLevel: z.ZodOptional<z.ZodEnum<["FREE", "STARTER", "PROFESSIONAL", "ENTERPRISE"]>>;
13
- contentLevel: z.ZodOptional<z.ZodEnum<["FREE", "STARTER", "PROFESSIONAL", "ENTERPRISE"]>>;
14
- }, "strip", z.ZodTypeAny, {
15
- absoluteCurrentWorkingDirectory: string;
16
- name?: string | undefined;
17
- description?: string | undefined;
18
- marketingLevel?: "FREE" | "STARTER" | "PROFESSIONAL" | "ENTERPRISE" | undefined;
19
- opsLevel?: "FREE" | "STARTER" | "PROFESSIONAL" | "ENTERPRISE" | undefined;
20
- serviceLevel?: "FREE" | "STARTER" | "PROFESSIONAL" | "ENTERPRISE" | undefined;
21
- salesLevel?: "FREE" | "STARTER" | "PROFESSIONAL" | "ENTERPRISE" | undefined;
22
- contentLevel?: "FREE" | "STARTER" | "PROFESSIONAL" | "ENTERPRISE" | undefined;
23
- configPath?: string | undefined;
24
- }, {
25
- absoluteCurrentWorkingDirectory: string;
26
- name?: string | undefined;
27
- description?: string | undefined;
28
- marketingLevel?: "FREE" | "STARTER" | "PROFESSIONAL" | "ENTERPRISE" | undefined;
29
- opsLevel?: "FREE" | "STARTER" | "PROFESSIONAL" | "ENTERPRISE" | undefined;
30
- serviceLevel?: "FREE" | "STARTER" | "PROFESSIONAL" | "ENTERPRISE" | undefined;
31
- salesLevel?: "FREE" | "STARTER" | "PROFESSIONAL" | "ENTERPRISE" | undefined;
32
- contentLevel?: "FREE" | "STARTER" | "PROFESSIONAL" | "ENTERPRISE" | undefined;
33
- configPath?: string | undefined;
34
- }>;
9
+ marketingLevel: z.ZodOptional<z.ZodEnum<{
10
+ FREE: "FREE";
11
+ STARTER: "STARTER";
12
+ PROFESSIONAL: "PROFESSIONAL";
13
+ ENTERPRISE: "ENTERPRISE";
14
+ }>>;
15
+ opsLevel: z.ZodOptional<z.ZodEnum<{
16
+ FREE: "FREE";
17
+ STARTER: "STARTER";
18
+ PROFESSIONAL: "PROFESSIONAL";
19
+ ENTERPRISE: "ENTERPRISE";
20
+ }>>;
21
+ serviceLevel: z.ZodOptional<z.ZodEnum<{
22
+ FREE: "FREE";
23
+ STARTER: "STARTER";
24
+ PROFESSIONAL: "PROFESSIONAL";
25
+ ENTERPRISE: "ENTERPRISE";
26
+ }>>;
27
+ salesLevel: z.ZodOptional<z.ZodEnum<{
28
+ FREE: "FREE";
29
+ STARTER: "STARTER";
30
+ PROFESSIONAL: "PROFESSIONAL";
31
+ ENTERPRISE: "ENTERPRISE";
32
+ }>>;
33
+ contentLevel: z.ZodOptional<z.ZodEnum<{
34
+ FREE: "FREE";
35
+ STARTER: "STARTER";
36
+ PROFESSIONAL: "PROFESSIONAL";
37
+ ENTERPRISE: "ENTERPRISE";
38
+ }>>;
39
+ }, z.core.$strip>;
35
40
  export type CreateTestAccountInputSchema = z.infer<typeof createTestAccountInputSchema>;
36
41
  export declare class CreateTestAccountTool extends Tool<CreateTestAccountInputSchema> {
37
42
  constructor(mcpServer: McpServer);
@@ -5,15 +5,7 @@ declare const inputSchemaZodObject: z.ZodObject<{
5
5
  absoluteProjectPath: z.ZodString;
6
6
  absoluteCurrentWorkingDirectory: z.ZodString;
7
7
  buildNumber: z.ZodOptional<z.ZodNumber>;
8
- }, "strip", z.ZodTypeAny, {
9
- absoluteProjectPath: string;
10
- absoluteCurrentWorkingDirectory: string;
11
- buildNumber?: number | undefined;
12
- }, {
13
- absoluteProjectPath: string;
14
- absoluteCurrentWorkingDirectory: string;
15
- buildNumber?: number | undefined;
16
- }>;
8
+ }, z.core.$strip>;
17
9
  type InputSchemaType = z.infer<typeof inputSchemaZodObject>;
18
10
  export declare class DeployProjectTool extends Tool<InputSchemaType> {
19
11
  constructor(mcpServer: McpServer);
@@ -4,13 +4,7 @@ import { TextContentResponse, Tool } from '../../types.js';
4
4
  declare const inputSchemaZodObject: z.ZodObject<{
5
5
  docUrl: z.ZodString;
6
6
  absoluteCurrentWorkingDirectory: z.ZodString;
7
- }, "strip", z.ZodTypeAny, {
8
- absoluteCurrentWorkingDirectory: string;
9
- docUrl: string;
10
- }, {
11
- absoluteCurrentWorkingDirectory: string;
12
- docUrl: string;
13
- }>;
7
+ }, z.z.core.$strip>;
14
8
  type InputSchemaType = z.infer<typeof inputSchemaZodObject>;
15
9
  export declare class DocFetchTool extends Tool<InputSchemaType> {
16
10
  constructor(mcpServer: McpServer);
@@ -4,13 +4,7 @@ import { TextContentResponse, Tool } from '../../types.js';
4
4
  declare const inputSchemaZodObject: z.ZodObject<{
5
5
  absoluteCurrentWorkingDirectory: z.ZodString;
6
6
  docsSearchQuery: z.ZodString;
7
- }, "strip", z.ZodTypeAny, {
8
- absoluteCurrentWorkingDirectory: string;
9
- docsSearchQuery: string;
10
- }, {
11
- absoluteCurrentWorkingDirectory: string;
12
- docsSearchQuery: string;
13
- }>;
7
+ }, z.z.core.$strip>;
14
8
  export interface DocsSearchResponse {
15
9
  results: {
16
10
  title: string;
@@ -6,17 +6,7 @@ declare const inputSchemaZodObject: z.ZodObject<{
6
6
  appId: z.ZodString;
7
7
  startDate: z.ZodOptional<z.ZodString>;
8
8
  endDate: z.ZodOptional<z.ZodString>;
9
- }, "strip", z.ZodTypeAny, {
10
- appId: string;
11
- absoluteCurrentWorkingDirectory: string;
12
- startDate?: string | undefined;
13
- endDate?: string | undefined;
14
- }, {
15
- appId: string;
16
- absoluteCurrentWorkingDirectory: string;
17
- startDate?: string | undefined;
18
- endDate?: string | undefined;
19
- }>;
9
+ }, z.core.$strip>;
20
10
  export type GetApiUsagePatternsByAppIdInputSchema = z.infer<typeof inputSchemaZodObject>;
21
11
  export declare class GetApiUsagePatternsByAppIdTool extends Tool<GetApiUsagePatternsByAppIdInputSchema> {
22
12
  constructor(mcpServer: McpServer);
@@ -3,11 +3,7 @@ import { McpServer, RegisteredTool } from '@modelcontextprotocol/sdk/server/mcp.
3
3
  import { z } from 'zod';
4
4
  declare const inputSchemaZodObject: z.ZodObject<{
5
5
  absoluteCurrentWorkingDirectory: z.ZodString;
6
- }, "strip", z.ZodTypeAny, {
7
- absoluteCurrentWorkingDirectory: string;
8
- }, {
9
- absoluteCurrentWorkingDirectory: string;
10
- }>;
6
+ }, z.core.$strip>;
11
7
  export type GetApplicationInfoInputSchema = z.infer<typeof inputSchemaZodObject>;
12
8
  export declare class GetApplicationInfoTool extends Tool<GetApplicationInfoInputSchema> {
13
9
  constructor(mcpServer: McpServer);
@@ -5,18 +5,13 @@ declare const inputSchemaZodObject: z.ZodObject<{
5
5
  absoluteProjectPath: z.ZodString;
6
6
  absoluteCurrentWorkingDirectory: z.ZodString;
7
7
  buildId: z.ZodNumber;
8
- logLevel: z.ZodDefault<z.ZodOptional<z.ZodEnum<["ERROR", "WARN", "INFO", "ALL"]>>>;
9
- }, "strip", z.ZodTypeAny, {
10
- buildId: number;
11
- absoluteProjectPath: string;
12
- absoluteCurrentWorkingDirectory: string;
13
- logLevel: "ERROR" | "WARN" | "INFO" | "ALL";
14
- }, {
15
- buildId: number;
16
- absoluteProjectPath: string;
17
- absoluteCurrentWorkingDirectory: string;
18
- logLevel?: "ERROR" | "WARN" | "INFO" | "ALL" | undefined;
19
- }>;
8
+ logLevel: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
9
+ ERROR: "ERROR";
10
+ WARN: "WARN";
11
+ INFO: "INFO";
12
+ ALL: "ALL";
13
+ }>>>;
14
+ }, z.core.$strip>;
20
15
  export type GetBuildLogsInputSchema = z.infer<typeof inputSchemaZodObject>;
21
16
  export declare class GetBuildLogsTool extends Tool<GetBuildLogsInputSchema> {
22
17
  constructor(mcpServer: McpServer);
@@ -6,17 +6,7 @@ declare const inputSchemaZodObject: z.ZodObject<{
6
6
  absoluteCurrentWorkingDirectory: z.ZodString;
7
7
  buildId: z.ZodOptional<z.ZodNumber>;
8
8
  limit: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
9
- }, "strip", z.ZodTypeAny, {
10
- limit: number;
11
- absoluteProjectPath: string;
12
- absoluteCurrentWorkingDirectory: string;
13
- buildId?: number | undefined;
14
- }, {
15
- absoluteProjectPath: string;
16
- absoluteCurrentWorkingDirectory: string;
17
- limit?: number | undefined;
18
- buildId?: number | undefined;
19
- }>;
9
+ }, z.core.$strip>;
20
10
  export type GetBuildStatusInputSchema = z.infer<typeof inputSchemaZodObject>;
21
11
  export declare class GetBuildStatusTool extends Tool<GetBuildStatusInputSchema> {
22
12
  constructor(mcpServer: McpServer);
@@ -5,15 +5,7 @@ declare const inputSchemaZodObject: z.ZodObject<{
5
5
  absoluteCurrentWorkingDirectory: z.ZodString;
6
6
  platformVersion: z.ZodString;
7
7
  featureType: z.ZodString;
8
- }, "strip", z.ZodTypeAny, {
9
- platformVersion: string;
10
- absoluteCurrentWorkingDirectory: string;
11
- featureType: string;
12
- }, {
13
- platformVersion: string;
14
- absoluteCurrentWorkingDirectory: string;
15
- featureType: string;
16
- }>;
8
+ }, z.core.$strip>;
17
9
  type InputSchemaType = z.infer<typeof inputSchemaZodObject>;
18
10
  export declare class GetConfigValuesTool extends Tool<InputSchemaType> {
19
11
  constructor(mcpServer: McpServer);
@@ -3,14 +3,8 @@ import { McpServer, RegisteredTool } from '@modelcontextprotocol/sdk/server/mcp.
3
3
  import { z } from 'zod';
4
4
  declare const inputSchemaZodObject: z.ZodObject<{
5
5
  absoluteCurrentWorkingDirectory: z.ZodString;
6
- command: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"hs init">, z.ZodLiteral<"hs auth">, z.ZodLiteral<"hs project create">, z.ZodLiteral<"hs project upload">]>>;
7
- }, "strip", z.ZodTypeAny, {
8
- absoluteCurrentWorkingDirectory: string;
9
- command?: "hs auth" | "hs project create" | "hs project upload" | "hs init" | undefined;
10
- }, {
11
- absoluteCurrentWorkingDirectory: string;
12
- command?: "hs auth" | "hs project create" | "hs project upload" | "hs init" | undefined;
13
- }>;
6
+ command: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"hs init">, z.ZodLiteral<"hs auth">, z.ZodLiteral<"hs project create">, z.ZodLiteral<"hs project upload">]>>;
7
+ }, z.core.$strip>;
14
8
  type InputSchemaType = z.infer<typeof inputSchemaZodObject>;
15
9
  export declare class GuidedWalkthroughTool extends Tool<InputSchemaType> {
16
10
  constructor(mcpServer: McpServer);
@@ -6,17 +6,7 @@ declare const inputSchemaZodObject: z.ZodObject<{
6
6
  absoluteCurrentWorkingDirectory: z.ZodString;
7
7
  uploadMessage: z.ZodString;
8
8
  profile: z.ZodOptional<z.ZodString>;
9
- }, "strip", z.ZodTypeAny, {
10
- uploadMessage: string;
11
- absoluteProjectPath: string;
12
- absoluteCurrentWorkingDirectory: string;
13
- profile?: string | undefined;
14
- }, {
15
- uploadMessage: string;
16
- absoluteProjectPath: string;
17
- absoluteCurrentWorkingDirectory: string;
18
- profile?: string | undefined;
19
- }>;
9
+ }, z.z.core.$strip>;
20
10
  type InputSchemaType = z.infer<typeof inputSchemaZodObject>;
21
11
  export declare class UploadProjectTools extends Tool<InputSchemaType> {
22
12
  constructor(mcpServer: McpServer);
@@ -4,13 +4,7 @@ import { z } from 'zod';
4
4
  declare const inputSchemaZodObject: z.ZodObject<{
5
5
  absoluteProjectPath: z.ZodString;
6
6
  absoluteCurrentWorkingDirectory: z.ZodString;
7
- }, "strip", z.ZodTypeAny, {
8
- absoluteProjectPath: string;
9
- absoluteCurrentWorkingDirectory: string;
10
- }, {
11
- absoluteProjectPath: string;
12
- absoluteCurrentWorkingDirectory: string;
13
- }>;
7
+ }, z.core.$strip>;
14
8
  export type CreateProjectInputSchema = z.infer<typeof inputSchemaZodObject>;
15
9
  export declare class ValidateProjectTool extends Tool<CreateProjectInputSchema> {
16
10
  constructor(mcpServer: McpServer);
@@ -51,17 +51,6 @@ describe('mcp-server/tools/project/CreateTestAccountTool', () => {
51
51
  }), expect.any(Function));
52
52
  expect(result).toBe(mockRegisteredTool);
53
53
  });
54
- it('should include all key information in description', () => {
55
- tool.register();
56
- const registerCall = mockMcpServer.registerTool.mock.calls[0];
57
- const config = registerCall[1];
58
- expect(config.description).toContain('test account');
59
- expect(config.description).toContain('WORKFLOW');
60
- expect(config.description).toContain('config file');
61
- expect(config.description).toContain('ALL account details');
62
- expect(config.description).toContain('non-interactive execution');
63
- expect(config.description).toContain('FREE, STARTER, PROFESSIONAL, ENTERPRISE');
64
- });
65
54
  });
66
55
  describe('handler', () => {
67
56
  describe('config file approach', () => {
@@ -1,6 +1,6 @@
1
1
  import z from 'zod';
2
2
  export declare const absoluteProjectPath: z.ZodString;
3
3
  export declare const absoluteCurrentWorkingDirectory: z.ZodString;
4
- export declare const features: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodLiteral<"card">, z.ZodLiteral<"settings">, z.ZodLiteral<"app-function">, z.ZodLiteral<"webhooks">, z.ZodLiteral<"workflow-action">, z.ZodLiteral<"workflow-action-tool">, z.ZodLiteral<"app-object">, z.ZodLiteral<"app-event">, z.ZodLiteral<"scim">, z.ZodLiteral<"page">]>, "many">>;
4
+ export declare const features: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodLiteral<"card">, z.ZodLiteral<"settings">, z.ZodLiteral<"app-function">, z.ZodLiteral<"webhooks">, z.ZodLiteral<"workflow-action">, z.ZodLiteral<"workflow-action-tool">, z.ZodLiteral<"app-object">, z.ZodLiteral<"app-event">, z.ZodLiteral<"scim">, z.ZodLiteral<"page">]>>>;
5
5
  export declare const docsSearchQuery: z.ZodString;
6
6
  export declare const docUrl: z.ZodString;
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@hubspot/cli",
3
- "version": "7.11.0-experimental.0",
3
+ "version": "7.11.1-beta.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",
7
7
  "type": "module",
8
8
  "dependencies": {
9
- "@hubspot/local-dev-lib": "4.0.1",
9
+ "@hubspot/local-dev-lib": "4.0.3",
10
10
  "@hubspot/project-parsing-lib": "0.10.2",
11
11
  "@hubspot/serverless-dev-runtime": "7.0.7",
12
12
  "@hubspot/theme-preview-dev-server": "0.0.12",
@@ -68,7 +68,7 @@
68
68
  },
69
69
  "optionalDependencies": {
70
70
  "@hubspot/cms-dev-server": "^1.2.1",
71
- "@modelcontextprotocol/sdk": "1.13.3"
71
+ "@modelcontextprotocol/sdk": "1.25.0"
72
72
  },
73
73
  "scripts": {
74
74
  "build": "tsx ./scripts/build.ts",