@hubspot/cli 8.3.1-experimental.0 → 8.3.1-experimental.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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 +105 -6
- package/lang/en.js +269 -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/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/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 +3 -3
- package/lib/ui/git.js +3 -3
- package/lib/ui/index.d.ts +8 -10
- package/lib/ui/index.js +34 -31
- 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 +1 -1
- package/mcp-server/tools/cms/HsListFunctionsTool.js +1 -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 +23 -4
- 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 +14 -14
- package/mcp-server/tools/cms/HsCreateFunctionTool.d.ts +0 -26
- package/mcp-server/tools/cms/HsCreateFunctionTool.js +0 -100
package/lib/accountAuth.js
CHANGED
|
@@ -10,6 +10,13 @@ import { setAsDefaultAccountPrompt } from './prompts/setAsDefaultAccountPrompt.j
|
|
|
10
10
|
import { awaitPersonalAccessKeyOverWebsocket } from './auth/awaitPersonalAccessKeyOverWebsocket.js';
|
|
11
11
|
import { commands } from '../lang/en.js';
|
|
12
12
|
import { uiLogger } from './ui/logger.js';
|
|
13
|
+
const WHITESPACE_PATTERN = /\s/;
|
|
14
|
+
function getAccountNameError(accountName) {
|
|
15
|
+
if (!accountName || !WHITESPACE_PATTERN.test(accountName)) {
|
|
16
|
+
return undefined;
|
|
17
|
+
}
|
|
18
|
+
return commands.account.subcommands.auth.errors.accountNameContainsSpaces(accountName, toKebabCase(accountName) || undefined);
|
|
19
|
+
}
|
|
13
20
|
async function getPersonalAccessKey(env, accountId) {
|
|
14
21
|
if (process.env.BROWSER !== 'none') {
|
|
15
22
|
try {
|
|
@@ -109,6 +116,11 @@ export function getCurrentDefaultAccount() {
|
|
|
109
116
|
}
|
|
110
117
|
}
|
|
111
118
|
export async function authenticateNewAccount({ env, providedPersonalAccessKey, accountId, setAsDefaultAccount, accountName: providedAccountName, useDefaultAccountName, }) {
|
|
119
|
+
const accountNameError = getAccountNameError(providedAccountName);
|
|
120
|
+
if (accountNameError) {
|
|
121
|
+
uiLogger.error(accountNameError);
|
|
122
|
+
return null;
|
|
123
|
+
}
|
|
112
124
|
const configMigrationSuccess = await handleConfigMigration();
|
|
113
125
|
if (!configMigrationSuccess) {
|
|
114
126
|
return null;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function getConfigCredentials(): string[];
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { getAllConfigAccounts } from '@hubspot/local-dev-lib/config';
|
|
2
|
+
import { API_KEY_AUTH_METHOD, OAUTH_AUTH_METHOD, PERSONAL_ACCESS_KEY_AUTH_METHOD, } from '@hubspot/local-dev-lib/constants/auth';
|
|
3
|
+
function getAccountCredentials(account) {
|
|
4
|
+
if (account.authType === API_KEY_AUTH_METHOD.value) {
|
|
5
|
+
return [account.apiKey];
|
|
6
|
+
}
|
|
7
|
+
const { accessToken, refreshToken } = account.auth?.tokenInfo ?? {};
|
|
8
|
+
if (account.authType === PERSONAL_ACCESS_KEY_AUTH_METHOD.value) {
|
|
9
|
+
return [account.personalAccessKey, accessToken, refreshToken];
|
|
10
|
+
}
|
|
11
|
+
if (account.authType === OAUTH_AUTH_METHOD.value) {
|
|
12
|
+
return [account.auth.clientSecret, accessToken, refreshToken];
|
|
13
|
+
}
|
|
14
|
+
return [accessToken, refreshToken];
|
|
15
|
+
}
|
|
16
|
+
export function getConfigCredentials() {
|
|
17
|
+
try {
|
|
18
|
+
return getAllConfigAccounts()
|
|
19
|
+
.flatMap(getAccountCredentials)
|
|
20
|
+
.filter((credential) => Boolean(credential));
|
|
21
|
+
}
|
|
22
|
+
catch {
|
|
23
|
+
return [];
|
|
24
|
+
}
|
|
25
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Argv } from 'yargs';
|
|
2
|
+
type CommandModule = {
|
|
3
|
+
command?: string | readonly string[];
|
|
4
|
+
describe?: string | false;
|
|
5
|
+
builder?: unknown;
|
|
6
|
+
handler?: unknown;
|
|
7
|
+
};
|
|
8
|
+
export declare function recordCommands(instance: Argv): CommandModule[];
|
|
9
|
+
type VisitedCommand = {
|
|
10
|
+
module: CommandModule;
|
|
11
|
+
commandPath: string[];
|
|
12
|
+
usage: string;
|
|
13
|
+
};
|
|
14
|
+
export declare function walkCommands(modules: CommandModule[], visit: (command: VisitedCommand) => void, parentPath?: string[]): Promise<void>;
|
|
15
|
+
export declare function getRootAgentHelp(rootCommands: CommandModule[]): Promise<string>;
|
|
16
|
+
export declare function getCommandAgentHelp(command: string, helpText: string): string;
|
|
17
|
+
export {};
|
package/lib/agentHelp.js
ADDED
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import yargs from 'yargs';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
import { lib } from '../lang/en.js';
|
|
4
|
+
import { indent } from './ui/index.js';
|
|
5
|
+
import { debugError } from './errorHandlers/index.js';
|
|
6
|
+
import { getJsonOutputSchema } from './yargs/makeWrappedYargsHandler.js';
|
|
7
|
+
const { agentHelp } = lib;
|
|
8
|
+
function formatSection(heading, lines) {
|
|
9
|
+
return [heading, ...lines.map(line => `${indent(1)}${line}`)].join('\n');
|
|
10
|
+
}
|
|
11
|
+
function formatWorkflows(workflows) {
|
|
12
|
+
return formatSection(agentHelp.headings.workflows, workflows.flatMap(({ title, steps }) => [
|
|
13
|
+
title,
|
|
14
|
+
...steps.flatMap(({ command, description }, index) => [
|
|
15
|
+
`${indent(1)}${index + 1}. ${command}`,
|
|
16
|
+
`${indent(2)} ${description}`,
|
|
17
|
+
]),
|
|
18
|
+
]));
|
|
19
|
+
}
|
|
20
|
+
export function recordCommands(instance) {
|
|
21
|
+
const commands = [];
|
|
22
|
+
const { command } = instance;
|
|
23
|
+
Object.assign(instance, {
|
|
24
|
+
command(...args) {
|
|
25
|
+
const [module] = args;
|
|
26
|
+
if (typeof module === 'object' && module !== null) {
|
|
27
|
+
commands.push(module);
|
|
28
|
+
}
|
|
29
|
+
return Reflect.apply(command, instance, args);
|
|
30
|
+
},
|
|
31
|
+
});
|
|
32
|
+
return commands;
|
|
33
|
+
}
|
|
34
|
+
export async function walkCommands(modules, visit, parentPath = []) {
|
|
35
|
+
for (const module of modules) {
|
|
36
|
+
const [commandString = ''] = [module.command ?? []].flat();
|
|
37
|
+
const commandPath = [...parentPath, commandString.split(' ')[0]];
|
|
38
|
+
visit({
|
|
39
|
+
module,
|
|
40
|
+
commandPath,
|
|
41
|
+
usage: ['hs', ...parentPath, commandString].join(' '),
|
|
42
|
+
});
|
|
43
|
+
const instance = yargs([]);
|
|
44
|
+
const subcommands = recordCommands(instance);
|
|
45
|
+
try {
|
|
46
|
+
if (typeof module.builder === 'function') {
|
|
47
|
+
await module.builder(instance);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
catch (e) {
|
|
51
|
+
debugError(e);
|
|
52
|
+
}
|
|
53
|
+
await walkCommands(subcommands, visit, commandPath);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
function joinSections(sections) {
|
|
57
|
+
return sections.filter(Boolean).join('\n\n');
|
|
58
|
+
}
|
|
59
|
+
function formatExitCodes() {
|
|
60
|
+
return formatSection(agentHelp.headings.exitCodes, [agentHelp.exitCodes]);
|
|
61
|
+
}
|
|
62
|
+
export async function getRootAgentHelp(rootCommands) {
|
|
63
|
+
const commandLines = [];
|
|
64
|
+
await walkCommands(rootCommands, ({ module, usage }) => {
|
|
65
|
+
if (typeof module.describe === 'string') {
|
|
66
|
+
commandLines.push(`- ${usage}: ${module.describe.replace(/\s*\n\s*/g, ' ')}`);
|
|
67
|
+
}
|
|
68
|
+
});
|
|
69
|
+
return joinSections([
|
|
70
|
+
formatSection(agentHelp.headings.conventions, agentHelp.conventions.map(convention => `- ${convention}`)),
|
|
71
|
+
formatWorkflows(agentHelp.workflows),
|
|
72
|
+
formatSection(agentHelp.headings.commands, commandLines),
|
|
73
|
+
formatExitCodes(),
|
|
74
|
+
]);
|
|
75
|
+
}
|
|
76
|
+
export function getCommandAgentHelp(command, helpText) {
|
|
77
|
+
const jsonOutputSchema = getJsonOutputSchema(command.replace(/^hs /, '').replaceAll(' ', '-'));
|
|
78
|
+
const workflows = agentHelp.workflows.filter(({ steps }) => steps.some(step => `${step.command} `.startsWith(`${command} `)));
|
|
79
|
+
return joinSections([
|
|
80
|
+
helpText.includes('--json') &&
|
|
81
|
+
formatSection(agentHelp.headings.jsonOutput, jsonOutputSchema
|
|
82
|
+
? [
|
|
83
|
+
agentHelp.jsonOutput.schema,
|
|
84
|
+
...JSON.stringify(z.toJSONSchema(jsonOutputSchema), null, 2).split('\n'),
|
|
85
|
+
]
|
|
86
|
+
: [agentHelp.jsonOutput.noSchema]),
|
|
87
|
+
workflows.length > 0 && formatWorkflows(workflows),
|
|
88
|
+
formatExitCodes(),
|
|
89
|
+
]);
|
|
90
|
+
}
|
package/lib/app/migrate.js
CHANGED
|
@@ -10,12 +10,12 @@ import { MIGRATION_STATUS } from '@hubspot/local-dev-lib/types/Migration';
|
|
|
10
10
|
import { downloadProject, fetchProjectComponentsMetadata, } from '@hubspot/local-dev-lib/api/projects';
|
|
11
11
|
import { Separator } from '@inquirer/prompts';
|
|
12
12
|
import { confirmPrompt, inputPrompt, listPrompt, } from '../prompts/promptUtils.js';
|
|
13
|
-
import { uiAccountDescription, uiCommandReference,
|
|
13
|
+
import { uiAccountDescription, uiCommandReference, logUiLine, uiLink, } from '../ui/index.js';
|
|
14
|
+
import { archiveProjectSource } from '../projects/archive.js';
|
|
14
15
|
import { ensureProjectExists } from '../projects/ensureProjectExists.js';
|
|
15
16
|
import SpinniesManager from '../ui/SpinniesManager.js';
|
|
16
17
|
import { DEFAULT_POLLING_STATUS_LOOKUP, poll } from '../polling.js';
|
|
17
18
|
import { checkMigrationStatusV2, CLI_UNMIGRATABLE_REASONS, continueAppMigration, initializeAppMigration, isMigrationStatus, listAppsForMigration, } from '../../api/migrate.js';
|
|
18
|
-
import fs from 'fs';
|
|
19
19
|
import { lib } from '../../lang/en.js';
|
|
20
20
|
import { hasUnfiedAppsAccess } from '../hasFeature.js';
|
|
21
21
|
import { getProjectBuildDetailUrl, getProjectDetailUrl, } from '../projects/urls.js';
|
|
@@ -311,11 +311,8 @@ export async function downloadProjectFiles(derivedAccountId, projectName, buildI
|
|
|
311
311
|
const { projectDir } = projectConfig;
|
|
312
312
|
absoluteDestPath = projectDir;
|
|
313
313
|
const { srcDir } = projectConfig.projectConfig;
|
|
314
|
-
const archiveDest = srcDir === '.'
|
|
315
|
-
? path.join(path.dirname(projectDir), `${path.basename(projectDir)}-archive`)
|
|
316
|
-
: path.join(projectDir, 'archive');
|
|
317
314
|
// Move the existing source directory to archive
|
|
318
|
-
|
|
315
|
+
const archiveDest = archiveProjectSource(projectDir, srcDir);
|
|
319
316
|
uiLogger.info(lib.migrate.sourceContentsMoved(archiveDest));
|
|
320
317
|
}
|
|
321
318
|
else {
|
|
@@ -388,8 +385,8 @@ export async function migrateApp(derivedAccountId, options, projectConfig) {
|
|
|
388
385
|
uiLogger.log(uiLink('Build Details', getProjectBuildDetailUrl(projectName, buildId, derivedAccountId)));
|
|
389
386
|
}
|
|
390
387
|
export function logInvalidAccountError() {
|
|
391
|
-
|
|
388
|
+
logUiLine();
|
|
392
389
|
uiLogger.error(lib.migrate.errors.invalidAccountTypeTitle);
|
|
393
390
|
uiLogger.log(lib.migrate.errors.invalidAccountTypeDescription(uiCommandReference('hs account use')));
|
|
394
|
-
|
|
391
|
+
logUiLine();
|
|
395
392
|
}
|
package/lib/commonOpts.js
CHANGED
|
@@ -10,6 +10,7 @@ import { uiCommandReference } from './ui/index.js';
|
|
|
10
10
|
import { lib } from '../lang/en.js';
|
|
11
11
|
import { getTerminalUISupport, UI_COLORS } from './ui/index.js';
|
|
12
12
|
import SpinniesManager from './ui/SpinniesManager.js';
|
|
13
|
+
import { getCommandAgentHelp } from './agentHelp.js';
|
|
13
14
|
export function addGlobalOptions(yargs) {
|
|
14
15
|
yargs.version(false);
|
|
15
16
|
yargs.option('debug', {
|
|
@@ -129,6 +130,9 @@ export async function addCustomHelpOutput(yargs, command, describe) {
|
|
|
129
130
|
const fullCommand = `${commandBase.trim()} ${commandString}`;
|
|
130
131
|
// Format the original help output to be more readable
|
|
131
132
|
let commandHelp = await yargs.getHelp();
|
|
133
|
+
if (parsedArgv.agentHelp) {
|
|
134
|
+
commandHelp = `${commandHelp}\n\n${getCommandAgentHelp(`${commandBase.trim()} ${commandString.split(' ')[0]}`, commandHelp)}`;
|
|
135
|
+
}
|
|
132
136
|
['Options:', 'Commands:', 'Examples:', 'Positionals:'].forEach(header => {
|
|
133
137
|
commandHelp = commandHelp.replace(header, chalk.bold(header));
|
|
134
138
|
});
|
package/lib/constants.d.ts
CHANGED
|
@@ -8,6 +8,8 @@ export declare const ONE_DAY_IN_MILLISECONDS: number;
|
|
|
8
8
|
export declare const CLI_DEPRECATED_MAJOR_VERSION = 7;
|
|
9
9
|
export declare const CLI_DEPRECATED_MAJOR_VERSION_DEPRECATION_DATE = "2026-09-02";
|
|
10
10
|
export declare const CLI_DEPRECATED_MAJOR_VERSION_EOL_DATE = "2027-03-01";
|
|
11
|
+
export declare const SERVERLESS_SUNSET_EDITING_DISABLED_DATE = "2026-11-17";
|
|
12
|
+
export declare const SERVERLESS_SUNSET_CHANGELOG_URL: "https://developers.hubspot.com/changelog/sunsetting-design-manager-serverless-functions-and-older-node.js-runtimes-for-custom-code-actions";
|
|
11
13
|
export declare const CLI_SUPPORT_GUIDELINES_URL: "https://developers.hubspot.com/docs/developer-tooling/local-development/hubspot-cli/version-support";
|
|
12
14
|
export declare const DEFAULT_POLLING_DELAY = 2000;
|
|
13
15
|
export declare const PREVIEW_POLL_TIMEOUT: number;
|
|
@@ -160,4 +162,6 @@ export declare const ACCOUNT_LEVELS: {
|
|
|
160
162
|
};
|
|
161
163
|
export declare const ACCOUNT_LEVEL_CHOICES: readonly ["FREE", "STARTER", "PROFESSIONAL", "ENTERPRISE"];
|
|
162
164
|
export declare const FEEDBACK_URL = "https://developers.hubspot.com/feedback";
|
|
165
|
+
export declare const FEEDBACK_SOURCE_ENV_VAR = "HUBSPOT_FEEDBACK_SOURCE";
|
|
166
|
+
export declare const MAX_FEEDBACK_LENGTH = 5000;
|
|
163
167
|
export declare const LOCAL_DEV_DEFAULT_PORT = 4828;
|
package/lib/constants.js
CHANGED
|
@@ -12,6 +12,10 @@ export const CLI_DEPRECATED_MAJOR_VERSION = 7;
|
|
|
12
12
|
export const CLI_DEPRECATED_MAJOR_VERSION_DEPRECATION_DATE = '2026-09-02';
|
|
13
13
|
// The date CLI_DEPRECATED_MAJOR_VERSION reaches end of life
|
|
14
14
|
export const CLI_DEPRECATED_MAJOR_VERSION_EOL_DATE = '2027-03-01';
|
|
15
|
+
// The date, in UTC, that editing CMS serverless functions stops. The commands
|
|
16
|
+
// that deploy or serve functions are disabled on and after this date.
|
|
17
|
+
export const SERVERLESS_SUNSET_EDITING_DISABLED_DATE = '2026-11-17';
|
|
18
|
+
export const SERVERLESS_SUNSET_CHANGELOG_URL = 'https://developers.hubspot.com/changelog/sunsetting-design-manager-serverless-functions-and-older-node.js-runtimes-for-custom-code-actions';
|
|
15
19
|
export const CLI_SUPPORT_GUIDELINES_URL = 'https://developers.hubspot.com/docs/developer-tooling/local-development/hubspot-cli/version-support';
|
|
16
20
|
export const DEFAULT_POLLING_DELAY = 2000;
|
|
17
21
|
export const PREVIEW_POLL_TIMEOUT = 5 * 60 * 1000;
|
|
@@ -166,6 +170,8 @@ export const ACCOUNT_LEVEL_CHOICES = [
|
|
|
166
170
|
ACCOUNT_LEVELS.ENTERPRISE,
|
|
167
171
|
];
|
|
168
172
|
export const FEEDBACK_URL = 'https://developers.hubspot.com/feedback';
|
|
173
|
+
export const FEEDBACK_SOURCE_ENV_VAR = 'HUBSPOT_FEEDBACK_SOURCE';
|
|
174
|
+
export const MAX_FEEDBACK_LENGTH = 5000;
|
|
169
175
|
// TODO: remove this constant and use PORT_MANAGER_SERVER_PORT from
|
|
170
176
|
// @hubspot/local-dev-lib once LDL changes its default to 4828.
|
|
171
177
|
export const LOCAL_DEV_DEFAULT_PORT = 4828;
|
|
@@ -2,7 +2,7 @@ import { isSpecifiedError, isMissingScopeError, } from '@hubspot/local-dev-lib/e
|
|
|
2
2
|
import { uiLogger } from '../ui/logger.js';
|
|
3
3
|
import { PLATFORM_VERSION_ERROR_TYPES } from '../constants.js';
|
|
4
4
|
import { lib } from '../../lang/en.js';
|
|
5
|
-
import { uiAccountDescription,
|
|
5
|
+
import { uiAccountDescription, logUiLine, uiLink } from '../ui/index.js';
|
|
6
6
|
import { isPromptExitError } from '../errors/PromptExitError.js';
|
|
7
7
|
function createPlatformVersionError(err, subCategory) {
|
|
8
8
|
let translationKey = 'unspecifiedPlatformVersion';
|
|
@@ -17,7 +17,7 @@ function createPlatformVersionError(err, subCategory) {
|
|
|
17
17
|
platformVersion = errorContext?.PLATFORM_VERSION ?? platformVersion;
|
|
18
18
|
translationKey = 'nonExistentPlatformVersion';
|
|
19
19
|
}
|
|
20
|
-
|
|
20
|
+
logUiLine();
|
|
21
21
|
uiLogger.error(lib.errorHandlers.suppressErrors.platformVersionErrors.header);
|
|
22
22
|
const errorMessage = lib.errorHandlers.suppressErrors.platformVersionErrors[translationKey];
|
|
23
23
|
uiLogger.log(typeof errorMessage === 'function'
|
|
@@ -25,7 +25,7 @@ function createPlatformVersionError(err, subCategory) {
|
|
|
25
25
|
: errorMessage);
|
|
26
26
|
uiLogger.log(lib.errorHandlers.suppressErrors.platformVersionErrors.updateProject);
|
|
27
27
|
uiLogger.log(lib.errorHandlers.suppressErrors.platformVersionErrors.betaLink(uiLink(lib.errorHandlers.suppressErrors.platformVersionErrors.docsLink, 'https://developers.hubspot.com/docs/developer-tooling/platform/versioning')));
|
|
28
|
-
|
|
28
|
+
logUiLine();
|
|
29
29
|
}
|
|
30
30
|
export function shouldSuppressError(err, context) {
|
|
31
31
|
if (isPromptExitError(err)) {
|
package/lib/feedback.js
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { sendFeedback } from '../api/feedback.js';
|
|
2
|
+
import { getConfigCredentials } from './accountCredentials.js';
|
|
3
|
+
import { pkg } from './jsonLoader.js';
|
|
4
|
+
export function containsAccountCredentials(feedback) {
|
|
5
|
+
return getConfigCredentials().some(credential => feedback.includes(credential));
|
|
6
|
+
}
|
|
7
|
+
export async function submitFeedback(accountId, feedback, source) {
|
|
8
|
+
await sendFeedback(accountId, {
|
|
9
|
+
feedback,
|
|
10
|
+
source,
|
|
11
|
+
cliVersion: pkg.version,
|
|
12
|
+
});
|
|
13
|
+
}
|
|
@@ -3,5 +3,6 @@ export declare const ProjectDownloadSchema: z.ZodObject<{
|
|
|
3
3
|
projectName: z.ZodString;
|
|
4
4
|
buildId: z.ZodNumber;
|
|
5
5
|
dest: z.ZodString;
|
|
6
|
+
archiveDest: z.ZodOptional<z.ZodString>;
|
|
6
7
|
}, z.core.$strip>;
|
|
7
8
|
export type ProjectDownloadJsonOutput = z.infer<typeof ProjectDownloadSchema>;
|
|
@@ -21,6 +21,7 @@ export declare const ProjectUploadSchema: z.ZodObject<{
|
|
|
21
21
|
releaseTag: z.ZodOptional<z.ZodString>;
|
|
22
22
|
succeeded: z.ZodBoolean;
|
|
23
23
|
}, z.core.$strip>>;
|
|
24
|
+
skippedHsMetaFiles: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
24
25
|
}, z.core.$strip>;
|
|
25
26
|
export type PreviewJsonOutput = z.infer<typeof PreviewSchema>;
|
|
26
27
|
export type TargetAccountJsonOutput = z.infer<typeof TargetAccountSchema>;
|
|
@@ -13,6 +13,7 @@ export const ProjectUploadSchema = z.object({
|
|
|
13
13
|
buildId: z.number().optional(),
|
|
14
14
|
deployId: z.number().optional(),
|
|
15
15
|
preview: PreviewSchema.optional(),
|
|
16
|
+
skippedHsMetaFiles: z.array(z.string()).optional(),
|
|
16
17
|
});
|
|
17
18
|
export function mapAccountToTargetAccount(accountId, account) {
|
|
18
19
|
return {
|
package/lib/mcp/clients.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare const MCP_SERVER_NAME = "HubSpotDev";
|
|
2
|
-
export type McpClientId = 'codex' | 'claude' | 'cursor' | 'devin' | '
|
|
2
|
+
export type McpClientId = 'codex' | 'claude' | 'cursor' | 'devin' | 'opencode' | 'vscode';
|
|
3
3
|
type McpClientDetection = {
|
|
4
4
|
type: 'json' | 'text';
|
|
5
5
|
pathSegments: string[];
|
|
@@ -7,6 +7,7 @@ type McpClientDetection = {
|
|
|
7
7
|
export type McpClient = {
|
|
8
8
|
id: McpClientId;
|
|
9
9
|
detection: McpClientDetection;
|
|
10
|
+
skillsPathSegments: string[];
|
|
10
11
|
};
|
|
11
12
|
export declare const MCP_CLIENTS: McpClient[];
|
|
12
13
|
export declare function getMcpClientPathSegments(id: McpClientId): string[];
|
package/lib/mcp/clients.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export const MCP_SERVER_NAME = 'HubSpotDev';
|
|
2
|
+
const SHARED_SKILLS_PATH_SEGMENTS = ['.agents', 'skills'];
|
|
2
3
|
function getVsCodeMcpConfigPathSegments() {
|
|
3
4
|
if (process.platform === 'darwin') {
|
|
4
5
|
return ['Library', 'Application Support', 'Code', 'User', 'mcp.json'];
|
|
@@ -15,21 +16,17 @@ export const MCP_CLIENTS = [
|
|
|
15
16
|
type: 'text',
|
|
16
17
|
pathSegments: ['.codex', 'config.toml'],
|
|
17
18
|
},
|
|
19
|
+
skillsPathSegments: SHARED_SKILLS_PATH_SEGMENTS,
|
|
18
20
|
},
|
|
19
21
|
{
|
|
20
22
|
id: 'claude',
|
|
21
23
|
detection: { type: 'json', pathSegments: ['.claude.json'] },
|
|
24
|
+
skillsPathSegments: ['.claude', 'skills'],
|
|
22
25
|
},
|
|
23
26
|
{
|
|
24
27
|
id: 'cursor',
|
|
25
28
|
detection: { type: 'json', pathSegments: ['.cursor', 'mcp.json'] },
|
|
26
|
-
|
|
27
|
-
{
|
|
28
|
-
id: 'gemini',
|
|
29
|
-
detection: {
|
|
30
|
-
type: 'json',
|
|
31
|
-
pathSegments: ['.gemini', 'settings.json'],
|
|
32
|
-
},
|
|
29
|
+
skillsPathSegments: SHARED_SKILLS_PATH_SEGMENTS,
|
|
33
30
|
},
|
|
34
31
|
{
|
|
35
32
|
id: 'vscode',
|
|
@@ -37,6 +34,7 @@ export const MCP_CLIENTS = [
|
|
|
37
34
|
type: 'json',
|
|
38
35
|
pathSegments: getVsCodeMcpConfigPathSegments(),
|
|
39
36
|
},
|
|
37
|
+
skillsPathSegments: SHARED_SKILLS_PATH_SEGMENTS,
|
|
40
38
|
},
|
|
41
39
|
{
|
|
42
40
|
id: 'devin',
|
|
@@ -44,6 +42,7 @@ export const MCP_CLIENTS = [
|
|
|
44
42
|
type: 'json',
|
|
45
43
|
pathSegments: ['.codeium', 'windsurf', 'mcp_config.json'],
|
|
46
44
|
},
|
|
45
|
+
skillsPathSegments: SHARED_SKILLS_PATH_SEGMENTS,
|
|
47
46
|
},
|
|
48
47
|
{
|
|
49
48
|
id: 'opencode',
|
|
@@ -51,6 +50,7 @@ export const MCP_CLIENTS = [
|
|
|
51
50
|
type: 'json',
|
|
52
51
|
pathSegments: ['.config', 'opencode', 'config.json'],
|
|
53
52
|
},
|
|
53
|
+
skillsPathSegments: SHARED_SKILLS_PATH_SEGMENTS,
|
|
54
54
|
},
|
|
55
55
|
];
|
|
56
56
|
export function getMcpClientPathSegments(id) {
|
package/lib/mcp/setup.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { McpClientId } from './clients.js';
|
|
1
2
|
export declare const supportedTools: {
|
|
2
3
|
name: string;
|
|
3
4
|
value: string;
|
|
@@ -11,13 +12,17 @@ interface ConfigureMcpServerOptions {
|
|
|
11
12
|
targets?: string[];
|
|
12
13
|
standalone?: boolean;
|
|
13
14
|
cliVersion?: string;
|
|
15
|
+
skills?: string[];
|
|
14
16
|
}
|
|
15
|
-
|
|
17
|
+
interface ConfigureMcpServerResult {
|
|
18
|
+
configuredTargets: McpClientId[];
|
|
19
|
+
selectedSkills: string[];
|
|
20
|
+
}
|
|
21
|
+
export declare function configureMcpServer(options: ConfigureMcpServerOptions): Promise<ConfigureMcpServerResult>;
|
|
16
22
|
export declare function setupVsCode(mcpCommand?: McpCommand): Promise<boolean>;
|
|
17
23
|
export declare function setupClaudeCode(mcpCommand?: McpCommand): Promise<boolean>;
|
|
18
24
|
export declare function setupCursor(mcpCommand?: McpCommand): boolean;
|
|
19
25
|
export declare function setupDevin(mcpCommand?: McpCommand): boolean;
|
|
20
26
|
export declare function setupCodex(mcpCommand?: McpCommand): Promise<boolean>;
|
|
21
|
-
export declare function setupGemini(mcpCommand?: McpCommand): Promise<boolean>;
|
|
22
27
|
export declare function setupOpenCode(mcpCommand?: McpCommand): Promise<boolean>;
|
|
23
28
|
export {};
|
package/lib/mcp/setup.js
CHANGED
|
@@ -5,6 +5,7 @@ import SpinniesManager from '../ui/SpinniesManager.js';
|
|
|
5
5
|
import { logError, getErrorMessage } from '../errorHandlers/index.js';
|
|
6
6
|
import { execAsync } from '../../mcp-server/utils/command.js';
|
|
7
7
|
import { MCP_CLIENTS, MCP_SERVER_NAME, getMcpClientPathSegments, } from './clients.js';
|
|
8
|
+
import { MCP_SKILLS, SKILLS_SOURCE_DIR, installSkills } from './skills.js';
|
|
8
9
|
import path from 'path';
|
|
9
10
|
import os from 'os';
|
|
10
11
|
import fs from 'fs-extra';
|
|
@@ -16,7 +17,6 @@ const cursor = 'cursor';
|
|
|
16
17
|
const devin = 'devin';
|
|
17
18
|
const vscode = 'vscode';
|
|
18
19
|
const codex = 'codex';
|
|
19
|
-
const gemini = 'gemini';
|
|
20
20
|
const opencode = 'opencode';
|
|
21
21
|
const OTHER_TOOL = 'other';
|
|
22
22
|
const MINIMUM_VSCODE_VERSION = '1.99.0';
|
|
@@ -25,7 +25,6 @@ const clientLabels = {
|
|
|
25
25
|
claude: commands.mcp.setup.claudeCode,
|
|
26
26
|
cursor: commands.mcp.setup.cursor,
|
|
27
27
|
devin: commands.mcp.setup.devin,
|
|
28
|
-
gemini: commands.mcp.setup.gemini,
|
|
29
28
|
opencode: commands.mcp.setup.opencode,
|
|
30
29
|
vscode: commands.mcp.setup.vsCode,
|
|
31
30
|
};
|
|
@@ -42,7 +41,7 @@ const defaultMcpCommand = {
|
|
|
42
41
|
};
|
|
43
42
|
export async function configureMcpServer(options) {
|
|
44
43
|
try {
|
|
45
|
-
const { targets, standalone, cliVersion: cliVersionFlag } = options;
|
|
44
|
+
const { targets, standalone, cliVersion: cliVersionFlag, skills } = options;
|
|
46
45
|
let derivedTargets = [];
|
|
47
46
|
if (!targets || targets.length === 0) {
|
|
48
47
|
const { selectedTargets } = await promptUser({
|
|
@@ -90,6 +89,20 @@ export async function configureMcpServer(options) {
|
|
|
90
89
|
cliVersion = response.cliVersion;
|
|
91
90
|
}
|
|
92
91
|
}
|
|
92
|
+
const configuredTargets = derivedTargets.filter((target) => target !== OTHER_TOOL);
|
|
93
|
+
let selectedSkills = configuredTargets.length > 0 ? skills : [];
|
|
94
|
+
if (selectedSkills === undefined) {
|
|
95
|
+
const response = await promptUser({
|
|
96
|
+
name: 'selectedSkills',
|
|
97
|
+
type: 'checkbox',
|
|
98
|
+
message: commands.mcp.setup.prompts.selectSkills,
|
|
99
|
+
choices: MCP_SKILLS.map(skill => ({
|
|
100
|
+
name: `${skill.name} - ${skill.description}`,
|
|
101
|
+
value: skill.name,
|
|
102
|
+
})),
|
|
103
|
+
});
|
|
104
|
+
selectedSkills = response.selectedSkills;
|
|
105
|
+
}
|
|
93
106
|
const cliPackage = cliVersion
|
|
94
107
|
? `@hubspot/cli@${cliVersion}`
|
|
95
108
|
: '@hubspot/cli';
|
|
@@ -121,20 +134,19 @@ export async function configureMcpServer(options) {
|
|
|
121
134
|
if (derivedTargets.includes(codex)) {
|
|
122
135
|
await runSetupFunction(() => setupCodex(mcpCommand));
|
|
123
136
|
}
|
|
124
|
-
if (derivedTargets.includes(gemini)) {
|
|
125
|
-
await runSetupFunction(() => setupGemini(mcpCommand));
|
|
126
|
-
}
|
|
127
137
|
if (derivedTargets.includes(opencode)) {
|
|
128
138
|
await runSetupFunction(() => setupOpenCode(mcpCommand));
|
|
129
139
|
}
|
|
140
|
+
if (selectedSkills.length > 0) {
|
|
141
|
+
await runSetupFunction(() => installSkills(configuredTargets, selectedSkills));
|
|
142
|
+
}
|
|
130
143
|
if (derivedTargets.includes(OTHER_TOOL)) {
|
|
131
144
|
logOtherToolInstructions(mcpCommand);
|
|
132
145
|
}
|
|
133
|
-
const configuredTargets = derivedTargets.filter(t => t !== OTHER_TOOL);
|
|
134
146
|
if (configuredTargets.length > 0) {
|
|
135
147
|
uiLogger.info(commands.mcp.setup.success(configuredTargets));
|
|
136
148
|
}
|
|
137
|
-
return configuredTargets;
|
|
149
|
+
return { configuredTargets, selectedSkills };
|
|
138
150
|
}
|
|
139
151
|
catch (error) {
|
|
140
152
|
SpinniesManager.fail('mcpSetup', {
|
|
@@ -339,35 +351,6 @@ export async function setupCodex(mcpCommand = defaultMcpCommand) {
|
|
|
339
351
|
return false;
|
|
340
352
|
}
|
|
341
353
|
}
|
|
342
|
-
export async function setupGemini(mcpCommand = defaultMcpCommand) {
|
|
343
|
-
try {
|
|
344
|
-
SpinniesManager.add('geminiSpinner', {
|
|
345
|
-
text: commands.mcp.setup.spinners.configuringGemini,
|
|
346
|
-
});
|
|
347
|
-
try {
|
|
348
|
-
await execAsync('gemini --version');
|
|
349
|
-
}
|
|
350
|
-
catch (e) {
|
|
351
|
-
SpinniesManager.fail('geminiSpinner', {
|
|
352
|
-
text: commands.mcp.setup.spinners.geminiNotFound,
|
|
353
|
-
});
|
|
354
|
-
return false;
|
|
355
|
-
}
|
|
356
|
-
const mcpCommandWithAgent = buildCommandWithAgentString(mcpCommand, gemini);
|
|
357
|
-
await execAsync(`gemini mcp add -s user${buildEnvFlagString(mcpCommand)} "${mcpServerName}" ${mcpCommandWithAgent.command} ${mcpCommandWithAgent.args.join(' ')}`);
|
|
358
|
-
SpinniesManager.succeed('geminiSpinner', {
|
|
359
|
-
text: commands.mcp.setup.spinners.configuredGemini,
|
|
360
|
-
});
|
|
361
|
-
return true;
|
|
362
|
-
}
|
|
363
|
-
catch (error) {
|
|
364
|
-
SpinniesManager.fail('geminiSpinner', {
|
|
365
|
-
text: commands.mcp.setup.spinners.geminiInstallFailed,
|
|
366
|
-
});
|
|
367
|
-
logError(error);
|
|
368
|
-
return false;
|
|
369
|
-
}
|
|
370
|
-
}
|
|
371
354
|
export async function setupOpenCode(mcpCommand = defaultMcpCommand) {
|
|
372
355
|
try {
|
|
373
356
|
SpinniesManager.add('openCodeSpinner', {
|
|
@@ -419,6 +402,8 @@ function logOtherToolInstructions(mcpCommand) {
|
|
|
419
402
|
.join('\n');
|
|
420
403
|
uiLogger.log(indented);
|
|
421
404
|
uiLogger.log('');
|
|
405
|
+
uiLogger.log(otherInstructions.skillsNote(SKILLS_SOURCE_DIR));
|
|
406
|
+
uiLogger.log('');
|
|
422
407
|
}
|
|
423
408
|
function buildCommandWithAgentString(mcpCommand, agent) {
|
|
424
409
|
const mcpCommandCopy = structuredClone(mcpCommand);
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { McpClientId } from './clients.js';
|
|
2
|
+
export declare const SKILLS_SOURCE_DIR: string;
|
|
3
|
+
export declare const MCP_SKILLS: {
|
|
4
|
+
name: string;
|
|
5
|
+
description: string;
|
|
6
|
+
}[];
|
|
7
|
+
export declare const MCP_SKILL_NAMES: string[];
|
|
8
|
+
export declare function installSkills(targets: McpClientId[], skillNames: string[]): boolean;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import path from 'path';
|
|
2
|
+
import os from 'os';
|
|
3
|
+
import fs from 'fs-extra';
|
|
4
|
+
import { fileURLToPath } from 'url';
|
|
5
|
+
import { commands } from '../../lang/en.js';
|
|
6
|
+
import SpinniesManager from '../ui/SpinniesManager.js';
|
|
7
|
+
import { logError } from '../errorHandlers/index.js';
|
|
8
|
+
import { MCP_CLIENTS } from './clients.js';
|
|
9
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
10
|
+
const __dirname = path.dirname(__filename);
|
|
11
|
+
export const SKILLS_SOURCE_DIR = path.join(__dirname, '..', '..', 'mcp-server', 'skills');
|
|
12
|
+
export const MCP_SKILLS = [
|
|
13
|
+
{
|
|
14
|
+
name: 'hubspot-new-app',
|
|
15
|
+
description: commands.mcp.setup.skillDescriptions.newApp,
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
name: 'hubspot-fix-build',
|
|
19
|
+
description: commands.mcp.setup.skillDescriptions.fixBuild,
|
|
20
|
+
},
|
|
21
|
+
];
|
|
22
|
+
export const MCP_SKILL_NAMES = MCP_SKILLS.map(skill => skill.name);
|
|
23
|
+
const INSTALLED_SKILL_MARKER = '.installed-by-hubspot-cli';
|
|
24
|
+
function getInstalledSkillNames(targetDir) {
|
|
25
|
+
if (!fs.existsSync(targetDir)) {
|
|
26
|
+
return [];
|
|
27
|
+
}
|
|
28
|
+
return fs
|
|
29
|
+
.readdirSync(targetDir, { withFileTypes: true })
|
|
30
|
+
.filter(entry => entry.isDirectory())
|
|
31
|
+
.map(entry => entry.name)
|
|
32
|
+
.filter(name => fs.existsSync(path.join(targetDir, name, INSTALLED_SKILL_MARKER)));
|
|
33
|
+
}
|
|
34
|
+
function installSkillsInDir(targetDir, skillNames) {
|
|
35
|
+
new Set([...getInstalledSkillNames(targetDir), ...skillNames]).forEach(name => fs.rmSync(path.join(targetDir, name), { recursive: true, force: true }));
|
|
36
|
+
skillNames.forEach(skillName => {
|
|
37
|
+
const destination = path.join(targetDir, skillName);
|
|
38
|
+
fs.copySync(path.join(SKILLS_SOURCE_DIR, skillName), destination);
|
|
39
|
+
fs.writeFileSync(path.join(destination, INSTALLED_SKILL_MARKER), '');
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
export function installSkills(targets, skillNames) {
|
|
43
|
+
const skillsToInstall = MCP_SKILL_NAMES.filter(skillName => skillNames.includes(skillName));
|
|
44
|
+
const targetDirs = [
|
|
45
|
+
...new Set(MCP_CLIENTS.filter(client => targets.includes(client.id)).map(client => path.join(os.homedir(), ...client.skillsPathSegments))),
|
|
46
|
+
];
|
|
47
|
+
SpinniesManager.add('mcpSkills', {
|
|
48
|
+
text: commands.mcp.setup.spinners.installingSkills,
|
|
49
|
+
});
|
|
50
|
+
try {
|
|
51
|
+
targetDirs.forEach(targetDir => installSkillsInDir(targetDir, skillsToInstall));
|
|
52
|
+
SpinniesManager.succeed('mcpSkills', {
|
|
53
|
+
text: commands.mcp.setup.spinners.installedSkills(skillsToInstall, targetDirs),
|
|
54
|
+
});
|
|
55
|
+
return true;
|
|
56
|
+
}
|
|
57
|
+
catch (error) {
|
|
58
|
+
SpinniesManager.fail('mcpSkills', {
|
|
59
|
+
text: commands.mcp.setup.spinners.failedToInstallSkills,
|
|
60
|
+
});
|
|
61
|
+
logError(error);
|
|
62
|
+
return false;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const ARCHIVE_DIR_NAME = "archive";
|
|
2
|
+
export declare const ROOT_SRC_DIR = ".";
|
|
3
|
+
export declare function getArchiveDest(projectDir: string, srcDir: string): string;
|
|
4
|
+
export declare function archiveDestExists(archiveDest: string): boolean;
|
|
5
|
+
export declare function archiveProjectSource(projectDir: string, srcDir: string): string;
|
|
6
|
+
export declare function getProjectArchiveDest(projectDir: string): string;
|
|
7
|
+
export declare function moveSourceToProjectArchive(projectDir: string, srcDir: string): string;
|
|
8
|
+
export declare function restoreSourceFromProjectArchive(projectDir: string, srcDir: string): void;
|