@hubspot/cli 7.7.0-experimental.2 → 7.7.0-experimental.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/cli.js +2 -2
- package/commands/project.js +0 -2
- package/commands/testAccount/create.d.ts +7 -0
- package/commands/testAccount/create.js +118 -0
- package/commands/testAccount/delete.d.ts +6 -0
- package/commands/testAccount/delete.js +42 -0
- package/commands/testAccount.d.ts +3 -0
- package/commands/testAccount.js +27 -0
- package/lang/en.d.ts +0 -51
- package/lang/en.js +0 -51
- package/lib/prompts/promptUtils.d.ts +1 -0
- package/lib/prompts/promptUtils.js +2 -0
- package/package.json +3 -6
- package/bin/hsmcp.d.ts +0 -2
- package/bin/hsmcp.js +0 -13
- package/commands/project/validate.d.ts +0 -4
- package/commands/project/validate.js +0 -53
- package/commands/setupMcp.d.ts +0 -8
- package/commands/setupMcp.js +0 -229
- package/mcp-server/index.d.ts +0 -1
- package/mcp-server/index.js +0 -17
- package/mcp-server/mcpLoader.d.ts +0 -5
- package/mcp-server/mcpLoader.js +0 -24
- package/mcp-server/tools/ExplainProjectStructureTool.d.ts +0 -33
- package/mcp-server/tools/ExplainProjectStructureTool.js +0 -266
- package/mcp-server/tools/GenerateAppComponentTool.d.ts +0 -99
- package/mcp-server/tools/GenerateAppComponentTool.js +0 -193
- package/mcp-server/tools/GenerateCardComponentTool.d.ts +0 -74
- package/mcp-server/tools/GenerateCardComponentTool.js +0 -146
- package/mcp-server/tools/GenerateProjectConfigTool.d.ts +0 -32
- package/mcp-server/tools/GenerateProjectConfigTool.js +0 -40
- package/mcp-server/tools/HubSpotCLIHelper.d.ts +0 -24
- package/mcp-server/tools/HubSpotCLIHelper.js +0 -110
- package/mcp-server/tools/UploadProjectTool.d.ts +0 -44
- package/mcp-server/tools/UploadProjectTool.js +0 -166
- package/mcp-server/tools/ValidateProjectTool.d.ts +0 -62
- package/mcp-server/tools/ValidateProjectTool.js +0 -336
package/bin/cli.js
CHANGED
|
@@ -40,7 +40,7 @@ const feedbackCommand = require('../commands/feedback');
|
|
|
40
40
|
const doctorCommand = require('../commands/doctor');
|
|
41
41
|
const completionCommand = require('../commands/completion');
|
|
42
42
|
const appCommand = require('../commands/app');
|
|
43
|
-
const
|
|
43
|
+
const testAccountCommand = require('../commands/testAccount');
|
|
44
44
|
const getTerminalWidth = () => {
|
|
45
45
|
const width = yargs.terminalWidth();
|
|
46
46
|
if (width >= 100)
|
|
@@ -119,7 +119,7 @@ const argv = yargs
|
|
|
119
119
|
.command(doctorCommand)
|
|
120
120
|
.command(completionCommand)
|
|
121
121
|
.command(appCommand)
|
|
122
|
-
.command(
|
|
122
|
+
.command(testAccountCommand)
|
|
123
123
|
.help()
|
|
124
124
|
.alias('h', 'help')
|
|
125
125
|
.recommendCommands()
|
package/commands/project.js
CHANGED
|
@@ -20,7 +20,6 @@ const migrateApp_1 = __importDefault(require("./project/migrateApp"));
|
|
|
20
20
|
const cloneApp_1 = __importDefault(require("./project/cloneApp"));
|
|
21
21
|
const installDeps_1 = __importDefault(require("./project/installDeps"));
|
|
22
22
|
const profile_1 = __importDefault(require("./project/profile"));
|
|
23
|
-
const validate_1 = __importDefault(require("./project/validate"));
|
|
24
23
|
const yargsUtils_1 = require("../lib/yargsUtils");
|
|
25
24
|
const command = ['project', 'projects'];
|
|
26
25
|
const describe = (0, ui_1.uiBetaTag)((0, lang_1.i18n)(`commands.project.describe`), false);
|
|
@@ -41,7 +40,6 @@ function projectBuilder(yargs) {
|
|
|
41
40
|
.command(cloneApp_1.default)
|
|
42
41
|
.command(installDeps_1.default)
|
|
43
42
|
.command(profile_1.default)
|
|
44
|
-
.command(validate_1.default)
|
|
45
43
|
.demandCommand(1, '');
|
|
46
44
|
return yargs;
|
|
47
45
|
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { CommonArgs, YargsCommandModule } from '../../types/Yargs';
|
|
2
|
+
type CreateTestAccountArgs = CommonArgs & {
|
|
3
|
+
name: string;
|
|
4
|
+
tiers: string[];
|
|
5
|
+
};
|
|
6
|
+
declare const createTestAccountCommand: YargsCommandModule<unknown, CreateTestAccountArgs>;
|
|
7
|
+
export default createTestAccountCommand;
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const developerTestAccounts_1 = require("@hubspot/local-dev-lib/api/developerTestAccounts");
|
|
4
|
+
const yargsUtils_1 = require("../../lib/yargsUtils");
|
|
5
|
+
const promptUtils_1 = require("../../lib/prompts/promptUtils");
|
|
6
|
+
const exitCodes_1 = require("../../lib/enums/exitCodes");
|
|
7
|
+
const logger_1 = require("../../lib/ui/logger");
|
|
8
|
+
const command = 'create [name]';
|
|
9
|
+
const describe = 'Create a test account';
|
|
10
|
+
const hubs = {
|
|
11
|
+
MARKETING: 'marketingLevel',
|
|
12
|
+
OPS: 'opsLevel',
|
|
13
|
+
SERVICE: 'serviceLevel',
|
|
14
|
+
SALES: 'salesLevel',
|
|
15
|
+
CONTENT: 'contentLevel',
|
|
16
|
+
};
|
|
17
|
+
const TEST_ACCOUNT_TIERS = [
|
|
18
|
+
{ name: 'Marketing STARTER', value: 'MARKETING:STARTER' },
|
|
19
|
+
{ name: 'Marketing PRO', value: 'MARKETING:PRO' },
|
|
20
|
+
{ name: 'Marketing ENTERPRISE', value: 'MARKETING:ENTERPRISE' },
|
|
21
|
+
promptUtils_1.Separator,
|
|
22
|
+
{ name: 'Ops STARTER', value: 'OPS:STARTER' },
|
|
23
|
+
{ name: 'Ops PRO', value: 'OPS:PRO' },
|
|
24
|
+
{ name: 'Ops ENTERPRISE', value: 'OPS:ENTERPRISE' },
|
|
25
|
+
promptUtils_1.Separator,
|
|
26
|
+
{ name: 'Service STARTER', value: 'SERVICE:STARTER' },
|
|
27
|
+
{ name: 'Service PRO', value: 'SERVICE:PRO' },
|
|
28
|
+
{ name: 'Service ENTERPRISE', value: 'SERVICE:ENTERPRISE' },
|
|
29
|
+
promptUtils_1.Separator,
|
|
30
|
+
{ name: 'Sales STARTER', value: 'SALES:STARTER' },
|
|
31
|
+
{ name: 'Sales PRO', value: 'SALES:PRO' },
|
|
32
|
+
{ name: 'Sales ENTERPRISE', value: 'SALES:ENTERPRISE' },
|
|
33
|
+
promptUtils_1.Separator,
|
|
34
|
+
{ name: 'Content STARTER', value: 'CONTENT:STARTER' },
|
|
35
|
+
{ name: 'Content PRO', value: 'CONTENT:PRO' },
|
|
36
|
+
{ name: 'Content ENTERPRISE', value: 'CONTENT:ENTERPRISE' },
|
|
37
|
+
promptUtils_1.Separator,
|
|
38
|
+
];
|
|
39
|
+
async function handler(args) {
|
|
40
|
+
const { derivedAccountId, name, tiers } = args;
|
|
41
|
+
// trackCommandUsage('test-account-create', {}, derivedAccountId);
|
|
42
|
+
let accountName = name;
|
|
43
|
+
let accountLevelsArray = tiers;
|
|
44
|
+
if (!name) {
|
|
45
|
+
const namePromptResult = await (0, promptUtils_1.promptUser)({
|
|
46
|
+
name: 'accountName',
|
|
47
|
+
message: 'What is the name of the test account?',
|
|
48
|
+
type: 'input',
|
|
49
|
+
});
|
|
50
|
+
accountName = namePromptResult.accountName;
|
|
51
|
+
}
|
|
52
|
+
if (!accountLevelsArray) {
|
|
53
|
+
const accountLevelsPromptResult = await (0, promptUtils_1.promptUser)({
|
|
54
|
+
name: 'testAccountLevels',
|
|
55
|
+
message: '[--tiers] Which tiers should the test account have?',
|
|
56
|
+
type: 'checkbox',
|
|
57
|
+
choices: TEST_ACCOUNT_TIERS,
|
|
58
|
+
validate: choices => {
|
|
59
|
+
if (choices?.length > 1) {
|
|
60
|
+
const hubMap = {};
|
|
61
|
+
for (const choice of choices) {
|
|
62
|
+
const hub = choice.split(':')[0];
|
|
63
|
+
if (hubMap[hub]) {
|
|
64
|
+
return 'Cannot have more than one tier per hub';
|
|
65
|
+
}
|
|
66
|
+
hubMap[hub] = true;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
return true;
|
|
70
|
+
},
|
|
71
|
+
});
|
|
72
|
+
accountLevelsArray = accountLevelsPromptResult.testAccountLevels;
|
|
73
|
+
}
|
|
74
|
+
const accountLevels = accountLevelsArray.reduce((acc, level) => {
|
|
75
|
+
const parts = level.split(':');
|
|
76
|
+
const hubName = hubs[parts[0]];
|
|
77
|
+
const hubTier = parts[1];
|
|
78
|
+
acc[hubName] = hubTier;
|
|
79
|
+
return acc;
|
|
80
|
+
}, {});
|
|
81
|
+
try {
|
|
82
|
+
const { data } = await (0, developerTestAccounts_1.createDeveloperTestAccount)(derivedAccountId, accountName, true, accountLevels);
|
|
83
|
+
// @ts-expect-error - testPortalId is not typed
|
|
84
|
+
logger_1.uiLogger.log(`Test account created: ${data.testPortalId}`);
|
|
85
|
+
}
|
|
86
|
+
catch (err) {
|
|
87
|
+
logger_1.uiLogger.error('Failed to create test account');
|
|
88
|
+
process.exit(exitCodes_1.EXIT_CODES.ERROR);
|
|
89
|
+
}
|
|
90
|
+
process.exit(exitCodes_1.EXIT_CODES.SUCCESS);
|
|
91
|
+
}
|
|
92
|
+
function createTestAccountBuilder(yargs) {
|
|
93
|
+
yargs.positional('name', {
|
|
94
|
+
type: 'string',
|
|
95
|
+
description: 'The name of the test account',
|
|
96
|
+
});
|
|
97
|
+
yargs.option('tiers', {
|
|
98
|
+
type: 'array',
|
|
99
|
+
description: 'The tiers of the test account',
|
|
100
|
+
});
|
|
101
|
+
yargs.example([
|
|
102
|
+
[
|
|
103
|
+
'$0 create my-account --tiers MARKETING:STARTER OPS:PRO',
|
|
104
|
+
'Create a test account with the name "my-account" and the tiers "Marketing - STARTER, OPS - PRO"',
|
|
105
|
+
],
|
|
106
|
+
]);
|
|
107
|
+
return yargs;
|
|
108
|
+
}
|
|
109
|
+
const builder = (0, yargsUtils_1.makeYargsBuilder)(createTestAccountBuilder, command, describe, {
|
|
110
|
+
useGlobalOptions: true,
|
|
111
|
+
});
|
|
112
|
+
const createTestAccountCommand = {
|
|
113
|
+
command,
|
|
114
|
+
describe,
|
|
115
|
+
handler,
|
|
116
|
+
builder,
|
|
117
|
+
};
|
|
118
|
+
exports.default = createTestAccountCommand;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { CommonArgs, YargsCommandModule } from '../../types/Yargs';
|
|
2
|
+
type DeleteTestAccountArgs = CommonArgs & {
|
|
3
|
+
testAccountId: number;
|
|
4
|
+
};
|
|
5
|
+
declare const deleteTestAccountCommand: YargsCommandModule<unknown, DeleteTestAccountArgs>;
|
|
6
|
+
export default deleteTestAccountCommand;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const developerTestAccounts_1 = require("@hubspot/local-dev-lib/api/developerTestAccounts");
|
|
4
|
+
const yargsUtils_1 = require("../../lib/yargsUtils");
|
|
5
|
+
const exitCodes_1 = require("../../lib/enums/exitCodes");
|
|
6
|
+
const logger_1 = require("../../lib/ui/logger");
|
|
7
|
+
const command = 'delete <testAccountId>';
|
|
8
|
+
const describe = 'delete a test account';
|
|
9
|
+
async function handler(args) {
|
|
10
|
+
const { derivedAccountId, testAccountId } = args;
|
|
11
|
+
// trackCommandUsage('test-account-delete', {}, derivedAccountId);
|
|
12
|
+
try {
|
|
13
|
+
await (0, developerTestAccounts_1.deleteDeveloperTestAccount)(derivedAccountId, testAccountId, true);
|
|
14
|
+
logger_1.uiLogger.log(`Test account deleted: ${testAccountId}`);
|
|
15
|
+
}
|
|
16
|
+
catch (err) {
|
|
17
|
+
logger_1.uiLogger.error('Failed to delete test account');
|
|
18
|
+
process.exit(exitCodes_1.EXIT_CODES.ERROR);
|
|
19
|
+
}
|
|
20
|
+
process.exit(exitCodes_1.EXIT_CODES.SUCCESS);
|
|
21
|
+
}
|
|
22
|
+
function deleteTestAccountBuilder(yargs) {
|
|
23
|
+
yargs.positional('testAccountId', {
|
|
24
|
+
type: 'number',
|
|
25
|
+
description: 'The id of the test account',
|
|
26
|
+
required: true,
|
|
27
|
+
});
|
|
28
|
+
yargs.example([
|
|
29
|
+
['$0 delete 1234567890', 'Delete a test account with the id "1234567890"'],
|
|
30
|
+
]);
|
|
31
|
+
return yargs;
|
|
32
|
+
}
|
|
33
|
+
const builder = (0, yargsUtils_1.makeYargsBuilder)(deleteTestAccountBuilder, command, describe, {
|
|
34
|
+
useGlobalOptions: true,
|
|
35
|
+
});
|
|
36
|
+
const deleteTestAccountCommand = {
|
|
37
|
+
command,
|
|
38
|
+
describe,
|
|
39
|
+
handler,
|
|
40
|
+
builder,
|
|
41
|
+
};
|
|
42
|
+
exports.default = deleteTestAccountCommand;
|
|
@@ -0,0 +1,27 @@
|
|
|
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
|
+
const create_1 = __importDefault(require("./testAccount/create"));
|
|
7
|
+
const delete_1 = __importDefault(require("./testAccount/delete"));
|
|
8
|
+
const yargsUtils_1 = require("../lib/yargsUtils");
|
|
9
|
+
const command = ['test-account', 'test-accounts'];
|
|
10
|
+
const describe = 'Test account';
|
|
11
|
+
function secretBuilder(yargs) {
|
|
12
|
+
yargs
|
|
13
|
+
.command(create_1.default)
|
|
14
|
+
.command(delete_1.default)
|
|
15
|
+
.demandCommand(1, '');
|
|
16
|
+
return yargs;
|
|
17
|
+
}
|
|
18
|
+
const builder = (0, yargsUtils_1.makeYargsBuilder)(secretBuilder, command, describe);
|
|
19
|
+
const testAccountCommand = {
|
|
20
|
+
command,
|
|
21
|
+
describe,
|
|
22
|
+
builder,
|
|
23
|
+
handler: () => { },
|
|
24
|
+
};
|
|
25
|
+
exports.default = testAccountCommand;
|
|
26
|
+
// TODO Remove this legacy export once we've migrated all commands to TS
|
|
27
|
+
module.exports = testAccountCommand;
|
package/lang/en.d.ts
CHANGED
|
@@ -2211,57 +2211,6 @@ Profiles enable you to reference variables in your component configuration files
|
|
|
2211
2211
|
};
|
|
2212
2212
|
};
|
|
2213
2213
|
};
|
|
2214
|
-
readonly setupMcp: {
|
|
2215
|
-
readonly describe: "Configure the HubSpot CLI MCP (Model Context Protocol) server for use with Cursor.";
|
|
2216
|
-
readonly errors: {
|
|
2217
|
-
readonly serverNotFound: "hsmcp command not found. Please ensure the HubSpot CLI is properly installed and available in your PATH.";
|
|
2218
|
-
readonly installHint: "If you installed the CLI locally, make sure to install it globally with: npm install -g @hubspot/cli";
|
|
2219
|
-
readonly configurationFailed: "Failed to configure MCP server";
|
|
2220
|
-
};
|
|
2221
|
-
readonly warnings: {
|
|
2222
|
-
readonly alreadyConfigured: "MCP server is already configured.";
|
|
2223
|
-
};
|
|
2224
|
-
readonly success: {
|
|
2225
|
-
readonly configured: "MCP server successfully configured for Cursor.";
|
|
2226
|
-
readonly restartCursor: "Please restart Cursor to apply the changes.";
|
|
2227
|
-
};
|
|
2228
|
-
readonly instructions: {
|
|
2229
|
-
readonly title: "Manual MCP Server Configuration Instructions:";
|
|
2230
|
-
readonly step1: "1. Open or create the Cursor configuration file at:";
|
|
2231
|
-
readonly step2: "2. Add the following configuration to the file:";
|
|
2232
|
-
readonly step3: "3. Restart Cursor to apply the changes.";
|
|
2233
|
-
readonly documentation: "For more information, visit: https://docs.cursor.com/context/model-context-protocol";
|
|
2234
|
-
};
|
|
2235
|
-
readonly options: {
|
|
2236
|
-
readonly autoSetup: {
|
|
2237
|
-
readonly describe: "Automatically configure the MCP server in Cursor configuration";
|
|
2238
|
-
};
|
|
2239
|
-
readonly showInstructions: {
|
|
2240
|
-
readonly describe: "Display manual configuration instructions instead of auto-setup";
|
|
2241
|
-
};
|
|
2242
|
-
readonly global: {
|
|
2243
|
-
readonly describe: "Configure globally for all Cursor workspaces (default: true)";
|
|
2244
|
-
};
|
|
2245
|
-
};
|
|
2246
|
-
readonly prompts: {
|
|
2247
|
-
readonly selectAction: "How would you like to configure the MCP server?";
|
|
2248
|
-
readonly selectScope: "Configure MCP server for:";
|
|
2249
|
-
readonly overwrite: "MCP server is already configured. Overwrite existing configuration?";
|
|
2250
|
-
};
|
|
2251
|
-
readonly choices: {
|
|
2252
|
-
readonly autoSetup: "Automatically configure (recommended)";
|
|
2253
|
-
readonly showInstructions: "Show manual configuration instructions";
|
|
2254
|
-
readonly global: "Global (all Cursor workspaces)";
|
|
2255
|
-
readonly project: "Current project only";
|
|
2256
|
-
};
|
|
2257
|
-
readonly examples: {
|
|
2258
|
-
readonly default: "Configure the MCP server interactively";
|
|
2259
|
-
readonly autoSetup: "Automatically configure the MCP server";
|
|
2260
|
-
readonly autoSetupGlobal: "Automatically configure the MCP server globally";
|
|
2261
|
-
readonly autoSetupProject: "Automatically configure for current project only";
|
|
2262
|
-
readonly showInstructions: "Display manual configuration instructions";
|
|
2263
|
-
};
|
|
2264
|
-
};
|
|
2265
2214
|
};
|
|
2266
2215
|
export declare const lib: {
|
|
2267
2216
|
readonly process: {
|
package/lang/en.js
CHANGED
|
@@ -2213,57 +2213,6 @@ exports.commands = {
|
|
|
2213
2213
|
},
|
|
2214
2214
|
},
|
|
2215
2215
|
},
|
|
2216
|
-
setupMcp: {
|
|
2217
|
-
describe: 'Configure the HubSpot CLI MCP (Model Context Protocol) server for use with Cursor.',
|
|
2218
|
-
errors: {
|
|
2219
|
-
serverNotFound: 'hsmcp command not found. Please ensure the HubSpot CLI is properly installed and available in your PATH.',
|
|
2220
|
-
installHint: 'If you installed the CLI locally, make sure to install it globally with: npm install -g @hubspot/cli',
|
|
2221
|
-
configurationFailed: 'Failed to configure MCP server',
|
|
2222
|
-
},
|
|
2223
|
-
warnings: {
|
|
2224
|
-
alreadyConfigured: 'MCP server is already configured.',
|
|
2225
|
-
},
|
|
2226
|
-
success: {
|
|
2227
|
-
configured: 'MCP server successfully configured for Cursor.',
|
|
2228
|
-
restartCursor: 'Please restart Cursor to apply the changes.',
|
|
2229
|
-
},
|
|
2230
|
-
instructions: {
|
|
2231
|
-
title: 'Manual MCP Server Configuration Instructions:',
|
|
2232
|
-
step1: '1. Open or create the Cursor configuration file at:',
|
|
2233
|
-
step2: '2. Add the following configuration to the file:',
|
|
2234
|
-
step3: '3. Restart Cursor to apply the changes.',
|
|
2235
|
-
documentation: 'For more information, visit: https://docs.cursor.com/context/model-context-protocol',
|
|
2236
|
-
},
|
|
2237
|
-
options: {
|
|
2238
|
-
autoSetup: {
|
|
2239
|
-
describe: 'Automatically configure the MCP server in Cursor configuration',
|
|
2240
|
-
},
|
|
2241
|
-
showInstructions: {
|
|
2242
|
-
describe: 'Display manual configuration instructions instead of auto-setup',
|
|
2243
|
-
},
|
|
2244
|
-
global: {
|
|
2245
|
-
describe: 'Configure globally for all Cursor workspaces (default: true)',
|
|
2246
|
-
},
|
|
2247
|
-
},
|
|
2248
|
-
prompts: {
|
|
2249
|
-
selectAction: 'How would you like to configure the MCP server?',
|
|
2250
|
-
selectScope: 'Configure MCP server for:',
|
|
2251
|
-
overwrite: 'MCP server is already configured. Overwrite existing configuration?',
|
|
2252
|
-
},
|
|
2253
|
-
choices: {
|
|
2254
|
-
autoSetup: 'Automatically configure (recommended)',
|
|
2255
|
-
showInstructions: 'Show manual configuration instructions',
|
|
2256
|
-
global: 'Global (all Cursor workspaces)',
|
|
2257
|
-
project: 'Current project only',
|
|
2258
|
-
},
|
|
2259
|
-
examples: {
|
|
2260
|
-
default: 'Configure the MCP server interactively',
|
|
2261
|
-
autoSetup: 'Automatically configure the MCP server',
|
|
2262
|
-
autoSetupGlobal: 'Automatically configure the MCP server globally',
|
|
2263
|
-
autoSetupProject: 'Automatically configure for current project only',
|
|
2264
|
-
showInstructions: 'Display manual configuration instructions',
|
|
2265
|
-
},
|
|
2266
|
-
},
|
|
2267
2216
|
};
|
|
2268
2217
|
exports.lib = {
|
|
2269
2218
|
process: {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { PromptConfig, GenericPromptResponse, PromptWhen, PromptChoices } from '../../types/Prompts';
|
|
2
|
+
export declare const Separator: any;
|
|
2
3
|
export declare function promptUser<T extends GenericPromptResponse>(config: PromptConfig<T> | PromptConfig<T>[]): Promise<T>;
|
|
3
4
|
export declare function confirmPrompt(message: string, options?: {
|
|
4
5
|
defaultAnswer?: boolean;
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Separator = void 0;
|
|
3
4
|
exports.promptUser = promptUser;
|
|
4
5
|
exports.confirmPrompt = confirmPrompt;
|
|
5
6
|
exports.listPrompt = listPrompt;
|
|
6
7
|
exports.inputPrompt = inputPrompt;
|
|
7
8
|
const inquirer = require('inquirer');
|
|
8
9
|
const promptModule = inquirer.createPromptModule();
|
|
10
|
+
exports.Separator = new inquirer.Separator();
|
|
9
11
|
function promptUser(config) {
|
|
10
12
|
return promptModule(config);
|
|
11
13
|
}
|
package/package.json
CHANGED
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hubspot/cli",
|
|
3
|
-
"version": "7.7.0-experimental.
|
|
3
|
+
"version": "7.7.0-experimental.3",
|
|
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": "
|
|
8
|
+
"@hubspot/local-dev-lib": "0.4.0-experimental.1",
|
|
9
9
|
"@hubspot/project-parsing-lib": "0.2.0",
|
|
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
|
-
"@modelcontextprotocol/sdk": "^1.12.1",
|
|
14
13
|
"archiver": "7.0.1",
|
|
15
14
|
"boxen": "8.0.1",
|
|
16
15
|
"chalk": "4.1.2",
|
|
@@ -22,7 +21,6 @@
|
|
|
22
21
|
"fs-extra": "8.1.0",
|
|
23
22
|
"inquirer": "8.2.0",
|
|
24
23
|
"js-yaml": "4.1.0",
|
|
25
|
-
"mcp-framework": "^0.2.2",
|
|
26
24
|
"moment": "2.30.1",
|
|
27
25
|
"open": "7.4.2",
|
|
28
26
|
"p-queue": "6.6.2",
|
|
@@ -100,8 +98,7 @@
|
|
|
100
98
|
},
|
|
101
99
|
"bin": {
|
|
102
100
|
"hs": "./bin/hs",
|
|
103
|
-
"hscms": "./bin/hscms"
|
|
104
|
-
"hsmcp": "./bin/hsmcp.js"
|
|
101
|
+
"hscms": "./bin/hscms"
|
|
105
102
|
},
|
|
106
103
|
"publishConfig": {
|
|
107
104
|
"access": "public",
|
package/bin/hsmcp.d.ts
DELETED
package/bin/hsmcp.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
"use strict";
|
|
3
|
-
console.log('Starting MCP server...');
|
|
4
|
-
try {
|
|
5
|
-
require('../mcp-server/index');
|
|
6
|
-
}
|
|
7
|
-
catch (error) {
|
|
8
|
-
console.error('Failed to start MCP server:');
|
|
9
|
-
console.error('Error name:', error.name || 'Unknown');
|
|
10
|
-
console.error('Error message:', error.message || 'No message');
|
|
11
|
-
console.error('Full error:', error);
|
|
12
|
-
process.exit(1);
|
|
13
|
-
}
|
|
@@ -1,53 +0,0 @@
|
|
|
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
|
-
const path_1 = __importDefault(require("path"));
|
|
7
|
-
const project_parsing_lib_1 = require("@hubspot/project-parsing-lib");
|
|
8
|
-
const project_parsing_lib_2 = require("@hubspot/project-parsing-lib");
|
|
9
|
-
const ui_1 = require("../../lib/ui");
|
|
10
|
-
const config_1 = require("../../lib/projects/config");
|
|
11
|
-
const lang_1 = require("../../lib/lang");
|
|
12
|
-
const index_1 = require("../../lib/errorHandlers/index");
|
|
13
|
-
const exitCodes_1 = require("../../lib/enums/exitCodes");
|
|
14
|
-
const yargsUtils_1 = require("../../lib/yargsUtils");
|
|
15
|
-
const logger_1 = require("../../lib/ui/logger");
|
|
16
|
-
const command = 'validate';
|
|
17
|
-
const describe = (0, ui_1.uiBetaTag)((0, lang_1.i18n)(`commands.project.subcommands.validate.describe`), false);
|
|
18
|
-
async function handler(args) {
|
|
19
|
-
const { derivedAccountId } = args;
|
|
20
|
-
const { projectConfig, projectDir } = await (0, config_1.getProjectConfig)();
|
|
21
|
-
(0, config_1.validateProjectConfig)(projectConfig, projectDir);
|
|
22
|
-
try {
|
|
23
|
-
await (0, project_parsing_lib_2.translate)({
|
|
24
|
-
projectSourceDir: path_1.default.join(projectDir, projectConfig.srcDir),
|
|
25
|
-
platformVersion: projectConfig.platformVersion,
|
|
26
|
-
accountId: derivedAccountId,
|
|
27
|
-
});
|
|
28
|
-
logger_1.uiLogger.success('Project validated successfully. No Errors');
|
|
29
|
-
}
|
|
30
|
-
catch (e) {
|
|
31
|
-
if ((0, project_parsing_lib_1.isTranslationError)(e)) {
|
|
32
|
-
logger_1.uiLogger.error(e.toString());
|
|
33
|
-
}
|
|
34
|
-
else {
|
|
35
|
-
(0, index_1.logError)(e);
|
|
36
|
-
}
|
|
37
|
-
return process.exit(exitCodes_1.EXIT_CODES.ERROR);
|
|
38
|
-
}
|
|
39
|
-
process.exit(exitCodes_1.EXIT_CODES.SUCCESS);
|
|
40
|
-
}
|
|
41
|
-
function projectValidateBuilder(yargs) {
|
|
42
|
-
return yargs;
|
|
43
|
-
}
|
|
44
|
-
const builder = (0, yargsUtils_1.makeYargsBuilder)(projectValidateBuilder, command, describe, {
|
|
45
|
-
useGlobalOptions: true,
|
|
46
|
-
});
|
|
47
|
-
const projectValidateCommand = {
|
|
48
|
-
command,
|
|
49
|
-
describe,
|
|
50
|
-
handler,
|
|
51
|
-
builder,
|
|
52
|
-
};
|
|
53
|
-
exports.default = projectValidateCommand;
|
package/commands/setupMcp.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { CommonArgs, YargsCommandModule } from '../types/Yargs';
|
|
2
|
-
type SetupMcpArgs = CommonArgs & {
|
|
3
|
-
autoSetup?: boolean;
|
|
4
|
-
showInstructions?: boolean;
|
|
5
|
-
global?: boolean;
|
|
6
|
-
};
|
|
7
|
-
declare const setupMcpCommand: YargsCommandModule<unknown, SetupMcpArgs>;
|
|
8
|
-
export default setupMcpCommand;
|