@hubspot/cli 8.3.1-experimental.0 → 8.3.1-experimental.2
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/api/feedback.d.ts +10 -0
- package/api/feedback.js +9 -0
- package/bin/cli.js +19 -1
- package/commands/account/auth.js +2 -2
- package/commands/account/createOverride.js +2 -0
- package/commands/account/removeOverride.js +2 -0
- package/commands/app/secret/add.js +1 -1
- package/commands/app/secret/delete.js +1 -1
- package/commands/app/secret/list.js +1 -1
- package/commands/app/secret/update.js +1 -1
- package/commands/app/secret.js +1 -1
- package/commands/auth.js +3 -2
- package/commands/cms/function/create.js +5 -37
- package/commands/cms/function/deploy.js +8 -1
- package/commands/cms/function/list.js +4 -0
- package/commands/cms/function/logs.js +2 -0
- package/commands/cms/function/server.js +6 -0
- package/commands/cms/lighthouseScore.js +1 -1
- package/commands/cms/upload.js +6 -0
- package/commands/cms/watch.js +2 -0
- package/commands/cms/webpack/create.js +5 -32
- package/commands/customObject.js +2 -2
- package/commands/feedback.d.ts +6 -2
- package/commands/feedback.js +82 -8
- package/commands/getStarted.js +4 -4
- package/commands/hubdb/list.js +2 -2
- package/commands/init.js +3 -2
- package/commands/mcp/setup.d.ts +1 -0
- package/commands/mcp/setup.js +11 -3
- package/commands/project/dev/index.js +2 -2
- package/commands/project/download.d.ts +2 -0
- package/commands/project/download.js +56 -16
- package/commands/project/logs.js +2 -2
- package/commands/project/upload.js +6 -2
- package/commands/project/watch.js +2 -2
- package/commands/sandbox/create.js +3 -3
- package/commands/sandbox/delete.js +1 -1
- package/commands/sandbox.js +1 -1
- package/lang/en.d.ts +111 -6
- package/lang/en.js +275 -51
- package/lib/accountAuth.js +12 -0
- package/lib/accountCredentials.d.ts +1 -0
- package/lib/accountCredentials.js +25 -0
- package/lib/agentHelp.d.ts +17 -0
- package/lib/agentHelp.js +90 -0
- package/lib/app/logSystemTypes.d.ts +4 -0
- package/lib/app/logSystemTypes.js +17 -0
- package/lib/app/logs.d.ts +2 -4
- package/lib/app/logs.js +2 -17
- package/lib/app/migrate.js +5 -8
- package/lib/commonOpts.js +4 -0
- package/lib/constants.d.ts +4 -0
- package/lib/constants.js +6 -0
- package/lib/crossPlatformSpawn/escape.d.ts +2 -0
- package/lib/crossPlatformSpawn/escape.js +38 -0
- package/lib/crossPlatformSpawn/index.d.ts +7 -0
- package/lib/crossPlatformSpawn/index.js +43 -0
- package/lib/crossPlatformSpawn/resolveCommand.d.ts +1 -0
- package/lib/crossPlatformSpawn/resolveCommand.js +69 -0
- package/lib/errorHandlers/suppressError.js +3 -3
- package/lib/feedback.d.ts +3 -0
- package/lib/feedback.js +13 -0
- package/lib/jsonOutput/projectDownload.d.ts +1 -0
- package/lib/jsonOutput/projectDownload.js +1 -0
- package/lib/jsonOutput/projectUpload.d.ts +1 -0
- package/lib/jsonOutput/projectUpload.js +1 -0
- package/lib/mcp/clients.d.ts +2 -1
- package/lib/mcp/clients.js +7 -7
- package/lib/mcp/setup.d.ts +7 -2
- package/lib/mcp/setup.js +22 -37
- package/lib/mcp/skills.d.ts +8 -0
- package/lib/mcp/skills.js +64 -0
- package/lib/projects/archive.d.ts +8 -0
- package/lib/projects/archive.js +104 -0
- package/lib/projects/archiveDiff.d.ts +12 -0
- package/lib/projects/archiveDiff.js +68 -0
- package/lib/projects/config.js +1 -1
- package/lib/projects/download.d.ts +37 -0
- package/lib/projects/download.js +123 -0
- package/lib/projects/localDev/AppDevModeInterface.js +3 -3
- package/lib/projects/localDev/LocalDevLogger.js +5 -5
- package/lib/projects/localDev/LocalDevWatcher.js +2 -1
- package/lib/projects/localDev/helpers/project.js +3 -3
- package/lib/projects/pollProjectBuildAndDeploy.js +4 -4
- package/lib/projects/projectInfo.js +4 -4
- package/lib/projects/projectProfiles.js +3 -3
- package/lib/projects/ui.js +3 -3
- package/lib/projects/upload.d.ts +3 -1
- package/lib/projects/upload.js +23 -6
- package/lib/projects/watch.js +4 -2
- package/lib/projects/workspaces.js +4 -4
- package/lib/prompts/importDataTestAccountSelectPrompt.js +1 -1
- package/lib/prompts/personalAccessKeyPrompt.js +2 -2
- package/lib/prompts/selectPublicAppForMigrationPrompt.js +3 -3
- package/lib/serverlessSunset.d.ts +6 -0
- package/lib/serverlessSunset.js +32 -0
- package/lib/testUtils.d.ts +5 -1
- package/lib/testUtils.js +2 -2
- package/lib/ui/appLogs.js +4 -4
- package/lib/ui/formatting.d.ts +13 -0
- package/lib/ui/formatting.js +39 -0
- package/lib/ui/git.js +3 -3
- package/lib/ui/index.d.ts +9 -23
- package/lib/ui/index.js +36 -69
- package/lib/ui/uiMessages.js +1 -1
- package/lib/validation.js +16 -1
- package/lib/yargs/makeWrappedYargsHandler.d.ts +1 -0
- package/lib/yargs/makeWrappedYargsHandler.js +7 -0
- package/mcp-server/Tool.d.ts +1 -0
- package/mcp-server/Tool.js +4 -1
- package/mcp-server/server.js +16 -5
- package/mcp-server/skills/hubspot-fix-build/SKILL.md +61 -0
- package/mcp-server/skills/hubspot-new-app/SKILL.md +84 -0
- package/mcp-server/tools/cms/HsFunctionLogsTool.js +2 -2
- package/mcp-server/tools/cms/HsListFunctionsTool.js +1 -1
- package/mcp-server/tools/cms/HsListTool.js +4 -1
- package/mcp-server/tools/index.js +2 -2
- package/mcp-server/tools/project/DocFetchTool.d.ts +4 -1
- package/mcp-server/tools/project/DocFetchTool.js +53 -12
- package/mcp-server/tools/project/DocsSearchTool.js +2 -7
- package/mcp-server/tools/project/FindProjectsTool.js +4 -1
- package/mcp-server/tools/project/GetApiUsagePatternsByAppIdTool.js +2 -7
- package/mcp-server/tools/project/GetApplicationInfoTool.js +2 -7
- package/mcp-server/tools/project/GetBuildLogsTool.d.ts +1 -1
- package/mcp-server/tools/project/GetBuildLogsTool.js +2 -12
- package/mcp-server/tools/project/GetBuildStatusTool.js +2 -12
- package/mcp-server/tools/project/KnowledgeSearchTool.js +2 -5
- package/mcp-server/tools/project/SubmitFeedbackTool.d.ts +25 -0
- package/mcp-server/tools/project/SubmitFeedbackTool.js +73 -0
- package/mcp-server/utils/command.js +16 -5
- package/mcp-server/utils/errors.d.ts +1 -0
- package/mcp-server/utils/errors.js +9 -0
- package/mcp-server/utils/feedbackTracking.js +3 -1
- package/package.json +12 -14
- package/mcp-server/tools/cms/HsCreateFunctionTool.d.ts +0 -26
- package/mcp-server/tools/cms/HsCreateFunctionTool.js +0 -100
package/commands/init.js
CHANGED
|
@@ -19,7 +19,7 @@ import { OAUTH_FLOW, legacyPersonalAccessKeyPrompt as personalAccessKeyPrompt, }
|
|
|
19
19
|
import { cliAccountNamePrompt } from '../lib/prompts/accountNamePrompt.js';
|
|
20
20
|
import { authenticateWithOauth } from '../lib/oauth.js';
|
|
21
21
|
import { EXIT_CODES } from '../lib/enums/exitCodes.js';
|
|
22
|
-
import { uiCommandReference,
|
|
22
|
+
import { uiCommandReference, uiDeprecatedTag, logUiFeatureHighlight, } from '../lib/ui/index.js';
|
|
23
23
|
import { makeWrappedYargsHandler } from '../lib/yargs/makeWrappedYargsHandler.js';
|
|
24
24
|
import { uiLogger } from '../lib/ui/logger.js';
|
|
25
25
|
import { commands } from '../lang/en.js';
|
|
@@ -103,6 +103,7 @@ async function handler(args) {
|
|
|
103
103
|
uiLogger.error(commands.init.errors.globalConfigFileExists);
|
|
104
104
|
return exit(EXIT_CODES.ERROR);
|
|
105
105
|
}
|
|
106
|
+
uiLogger.log(uiDeprecatedTag(commands.init.logs.deprecated));
|
|
106
107
|
// Check if the specific config file path already exists
|
|
107
108
|
if (existingConfigPath && existsSync(existingConfigPath)) {
|
|
108
109
|
uiLogger.error(commands.init.errors.configFileExists(existingConfigPath));
|
|
@@ -137,7 +138,7 @@ async function handler(args) {
|
|
|
137
138
|
uiLogger.log('');
|
|
138
139
|
uiLogger.success(commands.init.success.configFileCreated(configPath));
|
|
139
140
|
uiLogger.success(commands.init.success.configFileUpdated(AUTH_TYPE_NAMES[authType], name || accountId));
|
|
140
|
-
|
|
141
|
+
logUiFeatureHighlight([
|
|
141
142
|
'getStartedCommand',
|
|
142
143
|
'helpCommand',
|
|
143
144
|
'authCommand',
|
package/commands/mcp/setup.d.ts
CHANGED
package/commands/mcp/setup.js
CHANGED
|
@@ -3,16 +3,19 @@ import { makeYargsBuilder } from '../../lib/yargsUtils.js';
|
|
|
3
3
|
import { commands } from '../../lang/en.js';
|
|
4
4
|
import { makeWrappedYargsHandler } from '../../lib/yargs/makeWrappedYargsHandler.js';
|
|
5
5
|
import { configureMcpServer, supportedTools } from '../../lib/mcp/setup.js';
|
|
6
|
+
import { MCP_SKILL_NAMES } from '../../lib/mcp/skills.js';
|
|
6
7
|
const command = ['setup'];
|
|
7
8
|
const describe = commands.mcp.setup.describe;
|
|
8
9
|
async function handler(args) {
|
|
9
|
-
const { exit } = args;
|
|
10
|
+
const { exit, addUsageMetadata } = args;
|
|
10
11
|
try {
|
|
11
|
-
await configureMcpServer({
|
|
12
|
+
const { selectedSkills } = await configureMcpServer({
|
|
12
13
|
targets: args.client,
|
|
13
14
|
standalone: args.standalone,
|
|
14
15
|
cliVersion: args.cliVersion,
|
|
16
|
+
skills: args.skills,
|
|
15
17
|
});
|
|
18
|
+
addUsageMetadata({ assetType: selectedSkills.join(',') });
|
|
16
19
|
}
|
|
17
20
|
catch (e) {
|
|
18
21
|
return exit(EXIT_CODES.ERROR);
|
|
@@ -33,6 +36,11 @@ function setupBuilder(yargs) {
|
|
|
33
36
|
describe: commands.mcp.setup.args.cliVersion,
|
|
34
37
|
type: 'string',
|
|
35
38
|
});
|
|
39
|
+
yargs.option('skills', {
|
|
40
|
+
describe: commands.mcp.setup.args.skills,
|
|
41
|
+
type: 'array',
|
|
42
|
+
choices: MCP_SKILL_NAMES,
|
|
43
|
+
});
|
|
36
44
|
yargs.check(argv => {
|
|
37
45
|
if (argv.cliVersion !== undefined && argv.standalone !== true) {
|
|
38
46
|
throw new Error(commands.mcp.setup.errors.cliVersionRequiresStandalone);
|
|
@@ -41,7 +49,7 @@ function setupBuilder(yargs) {
|
|
|
41
49
|
});
|
|
42
50
|
yargs.example([
|
|
43
51
|
[
|
|
44
|
-
'$0 mcp setup --client claude --no-standalone',
|
|
52
|
+
'$0 mcp setup --client claude --no-standalone --skills hubspot-new-app hubspot-fix-build',
|
|
45
53
|
commands.mcp.setup.examples.nonInteractive,
|
|
46
54
|
],
|
|
47
55
|
[
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { getConfigAccountIfExists } from '@hubspot/local-dev-lib/config';
|
|
2
2
|
import { getProjectConfig } from '../../../lib/projects/config.js';
|
|
3
3
|
import { EXIT_CODES } from '../../../lib/enums/exitCodes.js';
|
|
4
|
-
import {
|
|
4
|
+
import { logUiLine } from '../../../lib/ui/index.js';
|
|
5
5
|
import { makeWrappedYargsHandler } from '../../../lib/yargs/makeWrappedYargsHandler.js';
|
|
6
6
|
import { unifiedProjectDevFlow } from './unifiedFlow.js';
|
|
7
7
|
import { isLegacyProject } from '@hubspot/project-parsing-lib/projects';
|
|
@@ -53,7 +53,7 @@ async function handler(args) {
|
|
|
53
53
|
}
|
|
54
54
|
catch (error) {
|
|
55
55
|
logError(error);
|
|
56
|
-
|
|
56
|
+
logUiLine();
|
|
57
57
|
return exit(EXIT_CODES.ERROR);
|
|
58
58
|
}
|
|
59
59
|
}
|
|
@@ -4,6 +4,8 @@ export type ProjectDownloadArgs = CommonArgs & ConfigArgs & AccountArgs & Enviro
|
|
|
4
4
|
project?: string;
|
|
5
5
|
dest?: string;
|
|
6
6
|
build?: number;
|
|
7
|
+
force?: boolean;
|
|
8
|
+
keepLocalFiles?: boolean;
|
|
7
9
|
};
|
|
8
10
|
declare const projectDownloadCommand: YargsCommandModule<unknown, ProjectDownloadArgs>;
|
|
9
11
|
export default projectDownloadCommand;
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import path from 'path';
|
|
2
|
-
import { getCwd, sanitizeFileName } from '@hubspot/local-dev-lib/path';
|
|
3
|
-
import { extractZipArchive } from '@hubspot/local-dev-lib/archive';
|
|
4
1
|
import { downloadProject, fetchProjectBuilds, } from '@hubspot/local-dev-lib/api/projects';
|
|
5
2
|
import { logError, ApiErrorContext } from '../../lib/errorHandlers/index.js';
|
|
6
3
|
import { isPromptExitError } from '../../lib/errors/PromptExitError.js';
|
|
7
|
-
import {
|
|
4
|
+
import { confirmPrompt } from '../../lib/prompts/promptUtils.js';
|
|
5
|
+
import { archiveDestExists, moveSourceToProjectArchive, } from '../../lib/projects/archive.js';
|
|
6
|
+
import { describeArchiveLocation, extractBuild, getDisplayPath, getLocalProject, handleArchivedSource, resolveDownloadDestination, } from '../../lib/projects/download.js';
|
|
8
7
|
import { downloadProjectPrompt } from '../../lib/prompts/downloadProjectPrompt.js';
|
|
9
8
|
import { commands } from '../../lang/en.js';
|
|
10
9
|
import { uiLogger } from '../../lib/ui/logger.js';
|
|
@@ -15,15 +14,14 @@ import { ProjectDownloadSchema, } from '../../lib/jsonOutput/projectDownload.js'
|
|
|
15
14
|
const command = 'download';
|
|
16
15
|
const describe = commands.project.download.describe;
|
|
17
16
|
async function handler(args) {
|
|
18
|
-
const { dest, build, derivedAccountId, exit, addJsonOutput } = args;
|
|
19
|
-
const isInProjectDir = getIsInProject();
|
|
20
|
-
if (isInProjectDir) {
|
|
21
|
-
uiLogger.error(commands.project.download.warnings.cannotDownloadWithinProject);
|
|
22
|
-
return exit(EXIT_CODES.ERROR);
|
|
23
|
-
}
|
|
17
|
+
const { project: projectArg, dest, build, force, keepLocalFiles, derivedAccountId, formatOutputAsJson, exit, addJsonOutput, } = args;
|
|
24
18
|
let buildNumberToDownload = build;
|
|
25
19
|
try {
|
|
26
|
-
const
|
|
20
|
+
const localProject = getLocalProject();
|
|
21
|
+
const { project: projectName } = await downloadProjectPrompt({
|
|
22
|
+
...args,
|
|
23
|
+
project: projectArg || localProject?.projectName,
|
|
24
|
+
});
|
|
27
25
|
if (!buildNumberToDownload) {
|
|
28
26
|
const { data: projectBuildsResult } = await fetchProjectBuilds(derivedAccountId, projectName);
|
|
29
27
|
const { results: projectBuilds } = projectBuildsResult;
|
|
@@ -36,16 +34,46 @@ async function handler(args) {
|
|
|
36
34
|
uiLogger.error(commands.project.download.errors.noBuildIdToDownload);
|
|
37
35
|
return exit(EXIT_CODES.ERROR);
|
|
38
36
|
}
|
|
39
|
-
const
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
37
|
+
const { absoluteDestPath, archivePlan } = resolveDownloadDestination({
|
|
38
|
+
projectName,
|
|
39
|
+
dest,
|
|
40
|
+
localProject,
|
|
41
|
+
});
|
|
42
|
+
if (archivePlan && archiveDestExists(archivePlan.archiveDest)) {
|
|
43
|
+
uiLogger.error(commands.project.download.errors.archiveAlreadyExists(getDisplayPath(archivePlan.archiveDest)));
|
|
44
|
+
return exit(EXIT_CODES.ERROR);
|
|
45
|
+
}
|
|
46
|
+
if (archivePlan && !force && !formatOutputAsJson) {
|
|
47
|
+
uiLogger.warn(commands.project.download.warnings.sourceWillBeArchived(describeArchiveLocation(archivePlan)));
|
|
48
|
+
uiLogger.log('');
|
|
49
|
+
const confirmed = await confirmPrompt(commands.project.download.prompts.confirmDownload(buildNumberToDownload, projectName), { defaultAnswer: false });
|
|
50
|
+
if (!confirmed) {
|
|
51
|
+
uiLogger.log(commands.project.download.logs.downloadCancelled);
|
|
52
|
+
return exit(EXIT_CODES.SUCCESS);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
43
55
|
const { data: zippedProject } = await downloadProject(derivedAccountId, projectName, buildNumberToDownload);
|
|
44
|
-
|
|
56
|
+
if (archivePlan) {
|
|
57
|
+
moveSourceToProjectArchive(archivePlan.projectDir, archivePlan.srcDir);
|
|
58
|
+
}
|
|
59
|
+
await extractBuild({
|
|
60
|
+
zippedProject,
|
|
61
|
+
projectName,
|
|
62
|
+
absoluteDestPath,
|
|
63
|
+
archivePlan,
|
|
64
|
+
});
|
|
65
|
+
if (archivePlan) {
|
|
66
|
+
await handleArchivedSource({
|
|
67
|
+
archivePlan,
|
|
68
|
+
keepLocalFiles,
|
|
69
|
+
canPrompt: !force && !formatOutputAsJson,
|
|
70
|
+
});
|
|
71
|
+
}
|
|
45
72
|
addJsonOutput({
|
|
46
73
|
projectName,
|
|
47
74
|
buildId: buildNumberToDownload,
|
|
48
75
|
dest: absoluteDestPath,
|
|
76
|
+
archiveDest: archivePlan?.archiveDest,
|
|
49
77
|
});
|
|
50
78
|
uiLogger.log(commands.project.download.logs.downloadSucceeded(buildNumberToDownload, projectName));
|
|
51
79
|
return exit(EXIT_CODES.SUCCESS);
|
|
@@ -76,12 +104,24 @@ function projectDownloadBuilder(yargs) {
|
|
|
76
104
|
alias: ['build-id'],
|
|
77
105
|
type: 'number',
|
|
78
106
|
},
|
|
107
|
+
force: {
|
|
108
|
+
describe: commands.project.download.options.force.describe,
|
|
109
|
+
type: 'boolean',
|
|
110
|
+
},
|
|
111
|
+
'keep-local-files': {
|
|
112
|
+
describe: commands.project.download.options.keepLocalFiles.describe,
|
|
113
|
+
type: 'boolean',
|
|
114
|
+
},
|
|
79
115
|
});
|
|
80
116
|
yargs.example([
|
|
81
117
|
[
|
|
82
118
|
'$0 project download --project=myProject --dest=myProjectFolder',
|
|
83
119
|
commands.project.download.examples.default,
|
|
84
120
|
],
|
|
121
|
+
[
|
|
122
|
+
'$0 project download --build=3',
|
|
123
|
+
commands.project.download.examples.currentProject,
|
|
124
|
+
],
|
|
85
125
|
[
|
|
86
126
|
'$0 project download --project=myProject --json',
|
|
87
127
|
commands.project.download.examples.json,
|
package/commands/project/logs.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { getHubSpotWebsiteOriginByAccountId } from '@hubspot/local-dev-lib/urls';
|
|
2
2
|
import { logError } from '../../lib/errorHandlers/index.js';
|
|
3
|
-
import {
|
|
3
|
+
import { logUiLine } from '../../lib/ui/index.js';
|
|
4
4
|
import { projectLogsPrompt } from '../../lib/prompts/projectsLogsPrompt.js';
|
|
5
5
|
import { commands } from '../../lang/en.js';
|
|
6
6
|
import { uiLogger } from '../../lib/ui/logger.js';
|
|
@@ -44,7 +44,7 @@ function logPreamble() {
|
|
|
44
44
|
uiLogger.log(commands.project.logs.logs.hubspotLogsDirectLink(`${getPrivateAppsUrl(ProjectLogsManager.accountId)}/${ProjectLogsManager.appId}/logs/crm?serverlessFunction=${ProjectLogsManager.functionName}`));
|
|
45
45
|
}
|
|
46
46
|
uiLogger.log('');
|
|
47
|
-
|
|
47
|
+
logUiLine();
|
|
48
48
|
}
|
|
49
49
|
const command = 'logs';
|
|
50
50
|
const describe = commands.project.logs.describe;
|
|
@@ -39,7 +39,7 @@ async function handlePreview(accountId, projectId, buildId, targetPortalId) {
|
|
|
39
39
|
async function handler(args) {
|
|
40
40
|
const { force = false, forceCreate = false, message, derivedAccountId, skipValidation, skipNpmAudit, skipAutoDeploy, formatOutputAsJson, profile: profileOption, useEnv: useEnvOption, preview, target: targetPortalId, exit, addUsageMetadata, addJsonOutput, } = args;
|
|
41
41
|
if (forceCreate) {
|
|
42
|
-
uiDeprecatedTag(commands.project.upload.logs.forceCreateDeprecated);
|
|
42
|
+
uiLogger.log(uiDeprecatedTag(commands.project.upload.logs.forceCreateDeprecated));
|
|
43
43
|
}
|
|
44
44
|
let projectConfig;
|
|
45
45
|
let projectDir;
|
|
@@ -82,7 +82,7 @@ async function handler(args) {
|
|
|
82
82
|
uiLogger.log('');
|
|
83
83
|
}
|
|
84
84
|
try {
|
|
85
|
-
const { result, uploadError, projectId, userDeclined } = await handleProjectUpload({
|
|
85
|
+
const { result, uploadError, projectId, userDeclined, skippedHsMetaFiles } = await handleProjectUpload({
|
|
86
86
|
accountId: targetAccountId,
|
|
87
87
|
projectConfig,
|
|
88
88
|
projectDir,
|
|
@@ -98,10 +98,14 @@ async function handler(args) {
|
|
|
98
98
|
skipAutoDeploy,
|
|
99
99
|
profile: profileName,
|
|
100
100
|
force,
|
|
101
|
+
formatOutputAsJson,
|
|
101
102
|
});
|
|
102
103
|
if (userDeclined) {
|
|
103
104
|
return exit(EXIT_CODES.SUCCESS);
|
|
104
105
|
}
|
|
106
|
+
if (skippedHsMetaFiles) {
|
|
107
|
+
addJsonOutput({ skippedHsMetaFiles });
|
|
108
|
+
}
|
|
105
109
|
if (uploadError) {
|
|
106
110
|
if (isSpecifiedError(uploadError, {
|
|
107
111
|
subCategory: PROJECT_ERROR_TYPES.PROJECT_LOCKED,
|
|
@@ -14,7 +14,7 @@ import { EXIT_CODES } from '../../lib/enums/exitCodes.js';
|
|
|
14
14
|
import { handleKeypress, handleExit } from '../../lib/process.js';
|
|
15
15
|
import { makeWrappedYargsHandler } from '../../lib/yargs/makeWrappedYargsHandler.js';
|
|
16
16
|
import { makeYargsBuilder } from '../../lib/yargsUtils.js';
|
|
17
|
-
import {
|
|
17
|
+
import { logUiCommandRelocatedMessage, uiCommandRenamedDescription, } from '../../lib/ui/index.js';
|
|
18
18
|
const command = 'watch';
|
|
19
19
|
const describe = uiCommandRenamedDescription(commands.project.watch.describe, 'hs project dev');
|
|
20
20
|
async function handleBuildStatus(accountId, projectName, buildId) {
|
|
@@ -57,7 +57,7 @@ function handleUserInput(accountId, projectName, currentBuildId, exit) {
|
|
|
57
57
|
}
|
|
58
58
|
async function handler(args) {
|
|
59
59
|
const { initialUpload, derivedAccountId, exit } = args;
|
|
60
|
-
|
|
60
|
+
logUiCommandRelocatedMessage('hs project dev');
|
|
61
61
|
let projectConfig;
|
|
62
62
|
let projectDir;
|
|
63
63
|
try {
|
|
@@ -5,7 +5,7 @@ import { getHubSpotWebsiteOrigin } from '@hubspot/local-dev-lib/urls';
|
|
|
5
5
|
import { HUBSPOT_ACCOUNT_TYPES, HUBSPOT_ACCOUNT_TYPE_STRINGS, } from '@hubspot/local-dev-lib/constants/config';
|
|
6
6
|
import { commands, lib } from '../../lang/en.js';
|
|
7
7
|
import { EXIT_CODES } from '../../lib/enums/exitCodes.js';
|
|
8
|
-
import {
|
|
8
|
+
import { logUiFeatureHighlight, uiBetaTag } from '../../lib/ui/index.js';
|
|
9
9
|
import { SANDBOX_TYPE_MAP, validateSandboxUsageLimits, } from '../../lib/sandboxes.js';
|
|
10
10
|
import { sandboxTypePrompt } from '../../lib/prompts/sandboxesPrompt.js';
|
|
11
11
|
import { promptUser } from '../../lib/prompts/promptUtils.js';
|
|
@@ -15,7 +15,7 @@ import { hubspotAccountNamePrompt } from '../../lib/prompts/accountNamePrompt.js
|
|
|
15
15
|
import { makeWrappedYargsHandler } from '../../lib/yargs/makeWrappedYargsHandler.js';
|
|
16
16
|
import { makeYargsBuilder } from '../../lib/yargsUtils.js';
|
|
17
17
|
const command = 'create';
|
|
18
|
-
const describe = uiBetaTag(commands.sandbox.subcommands.create.describe
|
|
18
|
+
const describe = uiBetaTag(commands.sandbox.subcommands.create.describe);
|
|
19
19
|
async function handler(args) {
|
|
20
20
|
const { name, type, force, derivedAccountId, exit } = args;
|
|
21
21
|
const accountConfig = getConfigAccountById(derivedAccountId);
|
|
@@ -110,7 +110,7 @@ async function handler(args) {
|
|
|
110
110
|
else {
|
|
111
111
|
highlightItems.push('projectUploadCommand');
|
|
112
112
|
}
|
|
113
|
-
|
|
113
|
+
logUiFeatureHighlight(highlightItems);
|
|
114
114
|
return exit(EXIT_CODES.SUCCESS);
|
|
115
115
|
}
|
|
116
116
|
catch (error) {
|
|
@@ -13,7 +13,7 @@ import { uiAuthCommandReference, uiBetaTag } from '../../lib/ui/index.js';
|
|
|
13
13
|
import { makeWrappedYargsHandler } from '../../lib/yargs/makeWrappedYargsHandler.js';
|
|
14
14
|
import { makeYargsBuilder } from '../../lib/yargsUtils.js';
|
|
15
15
|
const command = 'delete';
|
|
16
|
-
const describe = uiBetaTag(commands.sandbox.subcommands.delete.describe
|
|
16
|
+
const describe = uiBetaTag(commands.sandbox.subcommands.delete.describe);
|
|
17
17
|
async function handler(args) {
|
|
18
18
|
const { userProvidedAccount, force, exit } = args;
|
|
19
19
|
let accountPrompt;
|
package/commands/sandbox.js
CHANGED
|
@@ -4,7 +4,7 @@ import create from './sandbox/create.js';
|
|
|
4
4
|
import del from './sandbox/delete.js';
|
|
5
5
|
import { makeYargsBuilder } from '../lib/yargsUtils.js';
|
|
6
6
|
const command = ['sandbox', 'sandboxes'];
|
|
7
|
-
const describe = uiBetaTag(commands.sandbox.describe
|
|
7
|
+
const describe = uiBetaTag(commands.sandbox.describe);
|
|
8
8
|
function sandboxBuilder(yargs) {
|
|
9
9
|
yargs.command(create).command(del).demandCommand(1, '');
|
|
10
10
|
return yargs;
|
package/lang/en.d.ts
CHANGED
|
@@ -122,6 +122,7 @@ export declare const commands: {
|
|
|
122
122
|
};
|
|
123
123
|
errors: {
|
|
124
124
|
invalidAccountIdProvided: string;
|
|
125
|
+
accountNameContainsSpaces: (accountName: string, suggestedName?: string) => string;
|
|
125
126
|
failedToUpdateConfig: string;
|
|
126
127
|
migrationNotConfirmed: string;
|
|
127
128
|
mergeNotConfirmed: string;
|
|
@@ -278,6 +279,9 @@ export declare const commands: {
|
|
|
278
279
|
};
|
|
279
280
|
removeOverride: {
|
|
280
281
|
describe: (overrideFile: string) => string;
|
|
282
|
+
logs: {
|
|
283
|
+
deprecated: string;
|
|
284
|
+
};
|
|
281
285
|
accountOverride: (overrideFilePath: string, accountOverride: string) => string;
|
|
282
286
|
prompts: {
|
|
283
287
|
deleteOverrideFile: string;
|
|
@@ -341,6 +345,9 @@ export declare const commands: {
|
|
|
341
345
|
};
|
|
342
346
|
createOverride: {
|
|
343
347
|
describe: (hsAccountFileName: string) => string;
|
|
348
|
+
logs: {
|
|
349
|
+
deprecated: string;
|
|
350
|
+
};
|
|
344
351
|
success: (overrideFilePath: string) => string;
|
|
345
352
|
accountOverride: (overrideFilePath: string, accountOverride: string) => string;
|
|
346
353
|
prompts: {
|
|
@@ -366,6 +373,9 @@ export declare const commands: {
|
|
|
366
373
|
auth: {
|
|
367
374
|
describe: string;
|
|
368
375
|
verboseDescribe: (configName: string, authMethod: string) => string;
|
|
376
|
+
logs: {
|
|
377
|
+
deprecated: string;
|
|
378
|
+
};
|
|
369
379
|
errors: {
|
|
370
380
|
invalidAccountIdProvided: string;
|
|
371
381
|
globalConfigFileExists: (accountAuthCommand: string) => string;
|
|
@@ -1305,6 +1315,7 @@ export declare const commands: {
|
|
|
1305
1315
|
configFileUpdated: (authType: string, account: string | number) => string;
|
|
1306
1316
|
};
|
|
1307
1317
|
logs: {
|
|
1318
|
+
deprecated: string;
|
|
1308
1319
|
updateConfig: string;
|
|
1309
1320
|
};
|
|
1310
1321
|
errors: {
|
|
@@ -1326,7 +1337,6 @@ export declare const commands: {
|
|
|
1326
1337
|
claudeCode: string;
|
|
1327
1338
|
cursor: string;
|
|
1328
1339
|
devin: string;
|
|
1329
|
-
gemini: string;
|
|
1330
1340
|
opencode: string;
|
|
1331
1341
|
vsCode: string;
|
|
1332
1342
|
other: string;
|
|
@@ -1334,6 +1344,7 @@ export declare const commands: {
|
|
|
1334
1344
|
client: string;
|
|
1335
1345
|
standalone: string;
|
|
1336
1346
|
cliVersion: string;
|
|
1347
|
+
skills: string;
|
|
1337
1348
|
docsSearch: string;
|
|
1338
1349
|
};
|
|
1339
1350
|
examples: {
|
|
@@ -1359,10 +1370,6 @@ export declare const commands: {
|
|
|
1359
1370
|
cursorNotFound: string;
|
|
1360
1371
|
failedToConfigureCursor: string;
|
|
1361
1372
|
configuredCursor: string;
|
|
1362
|
-
configuringGemini: string;
|
|
1363
|
-
configuredGemini: string;
|
|
1364
|
-
geminiNotFound: string;
|
|
1365
|
-
geminiInstallFailed: string;
|
|
1366
1373
|
alreadyInstalled: string;
|
|
1367
1374
|
configuringDevin: string;
|
|
1368
1375
|
devinNotFound: string;
|
|
@@ -1377,18 +1384,27 @@ export declare const commands: {
|
|
|
1377
1384
|
configuredVsCode: string;
|
|
1378
1385
|
vsCodeNotFound: string;
|
|
1379
1386
|
vsCodeVersionUnsupported: string;
|
|
1387
|
+
installingSkills: string;
|
|
1388
|
+
installedSkills: (skillNames: string[], targetDirs: string[]) => string;
|
|
1389
|
+
failedToInstallSkills: string;
|
|
1380
1390
|
};
|
|
1381
1391
|
otherInstructions: {
|
|
1382
1392
|
header: string;
|
|
1383
1393
|
docsNote: string;
|
|
1384
1394
|
commandLabel: string;
|
|
1385
1395
|
jsonLabel: string;
|
|
1396
|
+
skillsNote: (skillsDir: string) => string;
|
|
1386
1397
|
};
|
|
1387
1398
|
prompts: {
|
|
1388
1399
|
targets: string;
|
|
1389
1400
|
targetsRequired: string;
|
|
1390
1401
|
standaloneMode: string;
|
|
1391
1402
|
cliVersion: string;
|
|
1403
|
+
selectSkills: string;
|
|
1404
|
+
};
|
|
1405
|
+
skillDescriptions: {
|
|
1406
|
+
newApp: string;
|
|
1407
|
+
fixBuild: string;
|
|
1392
1408
|
};
|
|
1393
1409
|
};
|
|
1394
1410
|
start: {
|
|
@@ -2007,24 +2023,43 @@ export declare const commands: {
|
|
|
2007
2023
|
describe: string;
|
|
2008
2024
|
examples: {
|
|
2009
2025
|
default: string;
|
|
2026
|
+
currentProject: string;
|
|
2010
2027
|
json: string;
|
|
2011
2028
|
};
|
|
2012
2029
|
logs: {
|
|
2013
2030
|
downloadCancelled: string;
|
|
2014
2031
|
downloadSucceeded: (buildId: number, projectName: string) => string;
|
|
2032
|
+
filesOnlyInArchive: (files: string[], hiddenCount: number, diffFilePath?: string) => string;
|
|
2033
|
+
filesCopiedBack: (copiedCount: number, srcPath: string) => string;
|
|
2034
|
+
sourceContentsArchived: (archiveLocation: string) => string;
|
|
2015
2035
|
};
|
|
2016
2036
|
errors: {
|
|
2017
2037
|
downloadFailed: string;
|
|
2018
2038
|
projectNotFound: (projectName: string, accountId: string) => string;
|
|
2019
2039
|
noBuildIdToDownload: string;
|
|
2040
|
+
restoreFailed: (archiveDest: string) => string;
|
|
2041
|
+
archiveAlreadyExists: (archiveDest: string) => string;
|
|
2020
2042
|
};
|
|
2021
2043
|
warnings: {
|
|
2022
|
-
|
|
2044
|
+
filesNotCopiedBack: (failedCount: number) => string;
|
|
2045
|
+
sourceWillBeArchived: (archiveLocation: string) => string;
|
|
2046
|
+
sourceRestored: string;
|
|
2047
|
+
};
|
|
2048
|
+
archiveLocation: (archivePath: string) => string;
|
|
2049
|
+
prompts: {
|
|
2050
|
+
confirmCopyFilesBack: (fileCount: number) => string;
|
|
2051
|
+
confirmDownload: (buildId: number, projectName: string) => string;
|
|
2023
2052
|
};
|
|
2024
2053
|
options: {
|
|
2025
2054
|
build: {
|
|
2026
2055
|
describe: string;
|
|
2027
2056
|
};
|
|
2057
|
+
force: {
|
|
2058
|
+
describe: string;
|
|
2059
|
+
};
|
|
2060
|
+
keepLocalFiles: {
|
|
2061
|
+
describe: string;
|
|
2062
|
+
};
|
|
2028
2063
|
project: {
|
|
2029
2064
|
describe: string;
|
|
2030
2065
|
};
|
|
@@ -2047,9 +2082,33 @@ export declare const commands: {
|
|
|
2047
2082
|
};
|
|
2048
2083
|
feedback: {
|
|
2049
2084
|
describe: string;
|
|
2085
|
+
verboseDescribe: string;
|
|
2086
|
+
options: {
|
|
2087
|
+
message: {
|
|
2088
|
+
describe: string;
|
|
2089
|
+
};
|
|
2090
|
+
source: {
|
|
2091
|
+
describe: string;
|
|
2092
|
+
};
|
|
2093
|
+
};
|
|
2094
|
+
examples: {
|
|
2095
|
+
openForm: string;
|
|
2096
|
+
submit: string;
|
|
2097
|
+
submitAsAgent: string;
|
|
2098
|
+
};
|
|
2050
2099
|
openPrompt: string;
|
|
2051
2100
|
success: (url: string) => string;
|
|
2052
2101
|
error: (url: string) => string;
|
|
2102
|
+
nonInteractive: (url: string) => string;
|
|
2103
|
+
submitSuccess: string;
|
|
2104
|
+
errors: {
|
|
2105
|
+
blankMessage: string;
|
|
2106
|
+
messageTooLong: (length: number) => string;
|
|
2107
|
+
containsCredentials: string;
|
|
2108
|
+
sourceRequired: string;
|
|
2109
|
+
noAccount: string;
|
|
2110
|
+
submitFailed: string;
|
|
2111
|
+
};
|
|
2053
2112
|
};
|
|
2054
2113
|
installDeps: {
|
|
2055
2114
|
help: {
|
|
@@ -3378,6 +3437,12 @@ export declare const lib: {
|
|
|
3378
3437
|
process: {
|
|
3379
3438
|
exitDebug: (signal: string) => string;
|
|
3380
3439
|
};
|
|
3440
|
+
hubSpotCommand: {
|
|
3441
|
+
argStartsWithDash: (arg: string) => string;
|
|
3442
|
+
};
|
|
3443
|
+
crossPlatformSpawn: {
|
|
3444
|
+
unsafeArg: (arg: string) => string;
|
|
3445
|
+
};
|
|
3381
3446
|
handlerLogFile: {
|
|
3382
3447
|
saved: (filePath: string) => string;
|
|
3383
3448
|
};
|
|
@@ -3385,6 +3450,28 @@ export declare const lib: {
|
|
|
3385
3450
|
noSchemaForCommand: string;
|
|
3386
3451
|
validationFailed: string;
|
|
3387
3452
|
};
|
|
3453
|
+
agentHelp: {
|
|
3454
|
+
headings: {
|
|
3455
|
+
conventions: string;
|
|
3456
|
+
jsonOutput: string;
|
|
3457
|
+
workflows: string;
|
|
3458
|
+
exitCodes: string;
|
|
3459
|
+
commands: string;
|
|
3460
|
+
};
|
|
3461
|
+
conventions: string[];
|
|
3462
|
+
jsonOutput: {
|
|
3463
|
+
schema: string;
|
|
3464
|
+
noSchema: string;
|
|
3465
|
+
};
|
|
3466
|
+
workflows: {
|
|
3467
|
+
title: string;
|
|
3468
|
+
steps: {
|
|
3469
|
+
command: string;
|
|
3470
|
+
description: string;
|
|
3471
|
+
}[];
|
|
3472
|
+
}[];
|
|
3473
|
+
exitCodes: string;
|
|
3474
|
+
};
|
|
3388
3475
|
DevServerManager: {
|
|
3389
3476
|
portConflict: (port: string) => string;
|
|
3390
3477
|
notInitialized: string;
|
|
@@ -3545,6 +3632,13 @@ export declare const lib: {
|
|
|
3545
3632
|
declineDefaultAccountExplanation: string;
|
|
3546
3633
|
};
|
|
3547
3634
|
};
|
|
3635
|
+
serverlessSunset: {
|
|
3636
|
+
deprecationNotice: (command: string) => string;
|
|
3637
|
+
creationBlocked: (command: string) => string;
|
|
3638
|
+
editingDisabled: (command: string) => string;
|
|
3639
|
+
uploadEditingBlockedHint: string;
|
|
3640
|
+
uploadBlockedHint: string;
|
|
3641
|
+
};
|
|
3548
3642
|
middleware: {
|
|
3549
3643
|
updateNotification: {
|
|
3550
3644
|
notifyTitle: string;
|
|
@@ -3612,6 +3706,12 @@ export declare const lib: {
|
|
|
3612
3706
|
generateSafeFilenameDifferentiator: {
|
|
3613
3707
|
failedToCheckFiles: string;
|
|
3614
3708
|
};
|
|
3709
|
+
archive: {
|
|
3710
|
+
errors: {
|
|
3711
|
+
archiveNotFound: (archiveDest: string) => string;
|
|
3712
|
+
srcDirInsideArchive: (srcDir: string) => string;
|
|
3713
|
+
};
|
|
3714
|
+
};
|
|
3615
3715
|
validateProjectConfig: {
|
|
3616
3716
|
configNotFound: string;
|
|
3617
3717
|
};
|
|
@@ -3635,6 +3735,7 @@ export declare const lib: {
|
|
|
3635
3735
|
warning: (files: string[]) => string;
|
|
3636
3736
|
uploadWarning: (files: string[]) => string;
|
|
3637
3737
|
prompt: string;
|
|
3738
|
+
jsonRequiresForce: (files: string[]) => string;
|
|
3638
3739
|
};
|
|
3639
3740
|
components: {
|
|
3640
3741
|
unableToGetUidFromHsmeta: string;
|
|
@@ -3676,6 +3777,7 @@ export declare const lib: {
|
|
|
3676
3777
|
};
|
|
3677
3778
|
handleProjectUpload: {
|
|
3678
3779
|
emptySource: (srcDir: string) => string;
|
|
3780
|
+
noFilesToUpload: (srcDir: string) => string;
|
|
3679
3781
|
compressed: (byteCount: number) => string;
|
|
3680
3782
|
compressing: (path: string) => string;
|
|
3681
3783
|
fileFiltered: (filename: string) => string;
|
|
@@ -3865,6 +3967,7 @@ export declare const lib: {
|
|
|
3865
3967
|
useEnv: string;
|
|
3866
3968
|
jsonOutput: string;
|
|
3867
3969
|
jsonSchema: string;
|
|
3970
|
+
agentHelp: string;
|
|
3868
3971
|
debug: string;
|
|
3869
3972
|
color: string;
|
|
3870
3973
|
};
|
|
@@ -3925,6 +4028,7 @@ export declare const lib: {
|
|
|
3925
4028
|
message: (dataFileNames: string[], cliAccount: HubSpotConfigAccount | null) => string;
|
|
3926
4029
|
};
|
|
3927
4030
|
importDataTestAccountSelectPrompt: {
|
|
4031
|
+
message: string;
|
|
3928
4032
|
errors: {
|
|
3929
4033
|
noAccountsFound: string;
|
|
3930
4034
|
noChildTestAccountsFound: (parentAccountId: number) => string;
|
|
@@ -4452,6 +4556,7 @@ export declare const lib: {
|
|
|
4452
4556
|
oauth2AccessTokenNotFound: (accountId: number) => string;
|
|
4453
4557
|
personalAccessKeyMissing: (accountId: number) => string;
|
|
4454
4558
|
personalAccessKeyTokenRetrievalFailed: (accountId: number) => string;
|
|
4559
|
+
accessTokenMissing: (accountId: number) => string;
|
|
4455
4560
|
authConfigurationMissing: (accountId: number) => string;
|
|
4456
4561
|
availableCMSModes: (modes: string) => string;
|
|
4457
4562
|
invalidCmsPublishMode: (cmsPublishMode: string, modesMessage: string) => string;
|