@hubspot/cli 7.11.4-experimental.0 → 7.11.4
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 -0
- package/bin/hs.d.ts +2 -0
- package/bin/hscms.d.ts +2 -0
- package/commands/cms/__tests__/module.test.d.ts +1 -0
- package/commands/cms/__tests__/module.test.js +45 -0
- package/commands/cms/module.js +5 -1
- package/lang/en.d.ts +5 -0
- package/lang/en.js +16 -1
- package/lib/app/migrate.js +3 -1
- package/lib/constants.d.ts +5 -0
- package/lib/constants.js +9 -0
- package/lib/middleware/__tests__/deprecationWarningMiddleware.test.d.ts +1 -0
- package/lib/middleware/__tests__/deprecationWarningMiddleware.test.js +95 -0
- package/lib/middleware/autoUpdateMiddleware.js +1 -1
- package/lib/middleware/configMiddleware.js +4 -2
- package/lib/middleware/deprecationWarningMiddleware.d.ts +1 -0
- package/lib/middleware/deprecationWarningMiddleware.js +78 -0
- package/lib/middleware/gitMiddleware.js +4 -2
- package/lib/projects/upload.js +6 -1
- package/mcp-server/tools/cms/HsCreateFunctionTool.d.ts +8 -16
- package/mcp-server/tools/cms/HsCreateModuleTool.d.ts +2 -20
- package/mcp-server/tools/cms/HsCreateTemplateTool.d.ts +11 -12
- package/mcp-server/tools/cms/HsFunctionLogsTool.d.ts +1 -15
- package/mcp-server/tools/cms/HsListFunctionsTool.d.ts +1 -9
- package/mcp-server/tools/cms/HsListTool.d.ts +1 -9
- package/mcp-server/tools/project/AddFeatureToProjectTool.d.ts +4 -18
- package/mcp-server/tools/project/CreateProjectTool.d.ts +5 -21
- package/mcp-server/tools/project/CreateTestAccountTool.d.ts +31 -26
- package/mcp-server/tools/project/DeployProjectTool.d.ts +1 -9
- package/mcp-server/tools/project/DocFetchTool.d.ts +1 -7
- package/mcp-server/tools/project/DocsSearchTool.d.ts +1 -7
- package/mcp-server/tools/project/GetApiUsagePatternsByAppIdTool.d.ts +1 -11
- package/mcp-server/tools/project/GetApplicationInfoTool.d.ts +1 -5
- package/mcp-server/tools/project/GetBuildLogsTool.d.ts +7 -12
- package/mcp-server/tools/project/GetBuildStatusTool.d.ts +1 -11
- package/mcp-server/tools/project/GetConfigValuesTool.d.ts +1 -9
- package/mcp-server/tools/project/GuidedWalkthroughTool.d.ts +2 -8
- package/mcp-server/tools/project/UploadProjectTools.d.ts +1 -11
- package/mcp-server/tools/project/ValidateProjectTool.d.ts +1 -7
- package/mcp-server/tools/project/constants.d.ts +1 -1
- package/package.json +10 -6
- package/ui/components/BoxWithTitle.js +1 -1
- /package/bin/{hs → hs.js} +0 -0
- /package/bin/{hscms → hscms.js} +0 -0
package/bin/cli.js
CHANGED
|
@@ -10,6 +10,7 @@ import { checkAndWarnGitInclusionMiddleware } from '../lib/middleware/gitMiddlew
|
|
|
10
10
|
import { performChecks } from '../lib/middleware/yargsChecksMiddleware.js';
|
|
11
11
|
import { setRequestHeaders } from '../lib/middleware/requestMiddleware.js';
|
|
12
12
|
import { checkFireAlarms } from '../lib/middleware/fireAlarmMiddleware.js';
|
|
13
|
+
import { checkDeprecationWarning } from '../lib/middleware/deprecationWarningMiddleware.js';
|
|
13
14
|
import removeCommand from '../commands/remove.js';
|
|
14
15
|
import initCommand from '../commands/init.js';
|
|
15
16
|
import logsCommand from '../commands/logs.js';
|
|
@@ -74,6 +75,7 @@ const argv = yargs(process.argv.slice(2))
|
|
|
74
75
|
injectAccountIdMiddleware,
|
|
75
76
|
validateConfigMiddleware,
|
|
76
77
|
autoUpdateCLI,
|
|
78
|
+
checkDeprecationWarning,
|
|
77
79
|
checkAndWarnGitInclusionMiddleware,
|
|
78
80
|
validateAccountOptions,
|
|
79
81
|
checkFireAlarms,
|
package/bin/hs.d.ts
ADDED
package/bin/hscms.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import yargs from 'yargs';
|
|
2
|
+
import createCommand from '../module/create.js';
|
|
3
|
+
import marketplaceValidateCommand from '../module/marketplace-validate.js';
|
|
4
|
+
import moduleCommands from '../module.js';
|
|
5
|
+
vi.mock('../module/create');
|
|
6
|
+
vi.mock('../module/marketplace-validate');
|
|
7
|
+
vi.mock('../../lib/commonOpts');
|
|
8
|
+
const commandSpy = vi
|
|
9
|
+
.spyOn(yargs, 'command')
|
|
10
|
+
.mockReturnValue(yargs);
|
|
11
|
+
const demandCommandSpy = vi
|
|
12
|
+
.spyOn(yargs, 'demandCommand')
|
|
13
|
+
.mockReturnValue(yargs);
|
|
14
|
+
describe('commands/cms/module', () => {
|
|
15
|
+
describe('command', () => {
|
|
16
|
+
it('should have the correct command structure', () => {
|
|
17
|
+
expect(moduleCommands.command).toEqual('module');
|
|
18
|
+
});
|
|
19
|
+
});
|
|
20
|
+
describe('describe', () => {
|
|
21
|
+
it('should provide a description', () => {
|
|
22
|
+
expect(moduleCommands.describe).toBeDefined();
|
|
23
|
+
});
|
|
24
|
+
});
|
|
25
|
+
describe('builder', () => {
|
|
26
|
+
beforeEach(() => {
|
|
27
|
+
commandSpy.mockClear();
|
|
28
|
+
demandCommandSpy.mockClear();
|
|
29
|
+
});
|
|
30
|
+
const subcommands = [createCommand, marketplaceValidateCommand];
|
|
31
|
+
it('should demand the command takes one positional argument', () => {
|
|
32
|
+
moduleCommands.builder(yargs);
|
|
33
|
+
expect(demandCommandSpy).toHaveBeenCalledTimes(1);
|
|
34
|
+
expect(demandCommandSpy).toHaveBeenCalledWith(1, '');
|
|
35
|
+
});
|
|
36
|
+
it('should add the correct number of sub commands', () => {
|
|
37
|
+
moduleCommands.builder(yargs);
|
|
38
|
+
expect(commandSpy).toHaveBeenCalledTimes(subcommands.length);
|
|
39
|
+
});
|
|
40
|
+
it.each(subcommands)('should attach the %s subcommand', module => {
|
|
41
|
+
moduleCommands.builder(yargs);
|
|
42
|
+
expect(commandSpy).toHaveBeenCalledWith(module);
|
|
43
|
+
});
|
|
44
|
+
});
|
|
45
|
+
});
|
package/commands/cms/module.js
CHANGED
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
import createCommand from './module/create.js';
|
|
2
|
+
import marketplaceValidateCommand from './module/marketplace-validate.js';
|
|
2
3
|
import { commands } from '../../lang/en.js';
|
|
3
4
|
import { makeYargsBuilder } from '../../lib/yargsUtils.js';
|
|
4
5
|
const command = 'module';
|
|
5
6
|
const describe = commands.cms.subcommands.module.describe;
|
|
6
7
|
function moduleBuilder(yargs) {
|
|
7
|
-
yargs
|
|
8
|
+
yargs
|
|
9
|
+
.command(createCommand)
|
|
10
|
+
.command(marketplaceValidateCommand)
|
|
11
|
+
.demandCommand(1, '');
|
|
8
12
|
return yargs;
|
|
9
13
|
}
|
|
10
14
|
const builder = makeYargsBuilder(moduleBuilder, command, describe);
|
package/lang/en.d.ts
CHANGED
|
@@ -2967,6 +2967,10 @@ export declare const lib: {
|
|
|
2967
2967
|
notInstalledGlobally: string;
|
|
2968
2968
|
updateFailed: (latestVersion: string) => string;
|
|
2969
2969
|
};
|
|
2970
|
+
deprecationWarning: {
|
|
2971
|
+
deprecatedMessage: (currentVersion: string, eolDate: string) => string;
|
|
2972
|
+
endOfLifeMessage: (currentVersion: string, eolDate: string) => string;
|
|
2973
|
+
};
|
|
2970
2974
|
};
|
|
2971
2975
|
projectProfiles: {
|
|
2972
2976
|
logs: {
|
|
@@ -3085,6 +3089,7 @@ export declare const lib: {
|
|
|
3085
3089
|
compressing: (path: string) => string;
|
|
3086
3090
|
fileFiltered: (filename: string) => string;
|
|
3087
3091
|
legacyFileDetected: (filename: string, platformVersion: string) => string;
|
|
3092
|
+
projectDoesNotExist: (accountId: number) => string;
|
|
3088
3093
|
};
|
|
3089
3094
|
};
|
|
3090
3095
|
importData: {
|
package/lang/en.js
CHANGED
|
@@ -6,7 +6,7 @@ import { ARCHIVED_HUBSPOT_CONFIG_YAML_FILE_NAME, GLOBAL_CONFIG_PATH, DEFAULT_HUB
|
|
|
6
6
|
import { uiAccountDescription, uiBetaTag, uiCommandReference, uiLink, UI_COLORS, uiAuthCommandReference, } from '../lib/ui/index.js';
|
|
7
7
|
import { getProjectDetailUrl, getProjectSettingsUrl, getLocalDevUiUrl, } from '../lib/projects/urls.js';
|
|
8
8
|
import { getProductUpdatesUrl } from '../lib/links.js';
|
|
9
|
-
import { APP_DISTRIBUTION_TYPES, APP_AUTH_TYPES, PROJECT_CONFIG_FILE, PROJECT_WITH_APP, LEGACY_PUBLIC_APP_FILE, } from '../lib/constants.js';
|
|
9
|
+
import { APP_DISTRIBUTION_TYPES, APP_AUTH_TYPES, PROJECT_CONFIG_FILE, PROJECT_WITH_APP, LEGACY_PUBLIC_APP_FILE, CLI_SUPPORT_GUIDELINES_URL, } from '../lib/constants.js';
|
|
10
10
|
export const commands = {
|
|
11
11
|
generalErrors: {
|
|
12
12
|
srcIsProject: (src, command) => `"${src}" is in a project folder. Did you mean "hs project ${command}"?`,
|
|
@@ -2989,6 +2989,20 @@ export const lib = {
|
|
|
2989
2989
|
notInstalledGlobally: 'Cannot auto-update the HubSpot CLI because NPM is not installed globally',
|
|
2990
2990
|
updateFailed: (latestVersion) => `Failed to update HubSpot CLI to version ${chalk.bold(latestVersion)}`,
|
|
2991
2991
|
},
|
|
2992
|
+
deprecationWarning: {
|
|
2993
|
+
deprecatedMessage: (currentVersion, eolDate) => chalk.yellow(`${chalk.bold('DEPRECATION WARNING:')}\n\n` +
|
|
2994
|
+
`Version: HubSpot CLI v${currentVersion}\n\n` +
|
|
2995
|
+
`Status: Deprecated (End of Life: ${eolDate})\n\n` +
|
|
2996
|
+
`Action Required: Upgrade to the latest major version to continue receiving new features\n\n` +
|
|
2997
|
+
`Replacement: Run ${uiCommandReference('npm install -g @hubspot/cli@latest')} to upgrade\n\n` +
|
|
2998
|
+
`${uiLink('CLI Support Guidelines', CLI_SUPPORT_GUIDELINES_URL)}\n`),
|
|
2999
|
+
endOfLifeMessage: (currentVersion, eolDate) => chalk.yellow(`${chalk.bold('END OF LIFE WARNING:')}\n\n` +
|
|
3000
|
+
`Version: HubSpot CLI v${currentVersion}\n\n` +
|
|
3001
|
+
`Status: End of Life (as of ${eolDate})\n\n` +
|
|
3002
|
+
`Action Required: This version is no longer supported. Upgrade immediately to continue receiving updates\n\n` +
|
|
3003
|
+
`Replacement: Run ${uiCommandReference('npm install -g @hubspot/cli@latest')} to upgrade\n\n` +
|
|
3004
|
+
`${uiLink('CLI Support Guidelines', CLI_SUPPORT_GUIDELINES_URL)}\n`),
|
|
3005
|
+
},
|
|
2992
3006
|
},
|
|
2993
3007
|
projectProfiles: {
|
|
2994
3008
|
logs: {
|
|
@@ -3107,6 +3121,7 @@ export const lib = {
|
|
|
3107
3121
|
compressing: (path) => `Compressing build files to "${path}"`,
|
|
3108
3122
|
fileFiltered: (filename) => `Ignore rule triggered for "${filename}"`,
|
|
3109
3123
|
legacyFileDetected: (filename, platformVersion) => `The ${chalk.bold(filename)} file is not supported on platform version ${chalk.bold(platformVersion)} and will be ignored.`,
|
|
3124
|
+
projectDoesNotExist: (accountId) => `Upload cancelled. Run ${uiCommandReference('hs project upload')} again to create the project in ${uiAccountDescription(accountId)}.`,
|
|
3110
3125
|
},
|
|
3111
3126
|
},
|
|
3112
3127
|
importData: {
|
package/lib/app/migrate.js
CHANGED
|
@@ -300,7 +300,9 @@ export async function downloadProjectFiles(derivedAccountId, projectName, buildI
|
|
|
300
300
|
const { projectDir } = projectConfig;
|
|
301
301
|
absoluteDestPath = projectDir;
|
|
302
302
|
const { srcDir } = projectConfig.projectConfig;
|
|
303
|
-
const archiveDest =
|
|
303
|
+
const archiveDest = srcDir === '.'
|
|
304
|
+
? path.join(path.dirname(projectDir), `${path.basename(projectDir)}-archive`)
|
|
305
|
+
: path.join(projectDir, 'archive');
|
|
304
306
|
// Move the existing source directory to archive
|
|
305
307
|
fs.renameSync(path.join(projectDir, srcDir), archiveDest);
|
|
306
308
|
uiLogger.info(lib.migrate.sourceContentsMoved(archiveDest));
|
package/lib/constants.d.ts
CHANGED
|
@@ -3,6 +3,11 @@ export declare const DEFAULT_PROJECT_TEMPLATE_BRANCH: "main";
|
|
|
3
3
|
export declare const FEEDBACK_INTERVAL: 10;
|
|
4
4
|
export declare const HUBSPOT_FOLDER: "@hubspot";
|
|
5
5
|
export declare const MARKETPLACE_FOLDER: "@marketplace";
|
|
6
|
+
export declare const ONE_DAY_IN_MILLISECONDS: number;
|
|
7
|
+
export declare const CLI_DEPRECATED_MAJOR_VERSION = 7;
|
|
8
|
+
export declare const CLI_DEPRECATED_MAJOR_VERSION_DEPRECATION_DATE = "2026-09-02";
|
|
9
|
+
export declare const CLI_DEPRECATED_MAJOR_VERSION_EOL_DATE = "2027-03-01";
|
|
10
|
+
export declare const CLI_SUPPORT_GUIDELINES_URL: "https://developers.hubspot.com/docs/developer-tooling/local-development/hubspot-cli/version-support";
|
|
6
11
|
export declare const DEFAULT_POLLING_DELAY = 2000;
|
|
7
12
|
export declare const PROJECT_CONFIG_FILE: "hsproject.json";
|
|
8
13
|
export declare const PROJECT_BUILD_STATES: {
|
package/lib/constants.js
CHANGED
|
@@ -3,6 +3,15 @@ export const DEFAULT_PROJECT_TEMPLATE_BRANCH = 'main';
|
|
|
3
3
|
export const FEEDBACK_INTERVAL = 10;
|
|
4
4
|
export const HUBSPOT_FOLDER = '@hubspot';
|
|
5
5
|
export const MARKETPLACE_FOLDER = '@marketplace';
|
|
6
|
+
export const ONE_DAY_IN_MILLISECONDS = 24 * 60 * 60 * 1000;
|
|
7
|
+
// The previous major CLI version, per the CLI Version Support & Deprecation
|
|
8
|
+
// Policy. Only 1 previous major version is supported at a time.
|
|
9
|
+
export const CLI_DEPRECATED_MAJOR_VERSION = 7;
|
|
10
|
+
// The date CLI_DEPRECATED_MAJOR_VERSION enters its Deprecation Phase
|
|
11
|
+
export const CLI_DEPRECATED_MAJOR_VERSION_DEPRECATION_DATE = '2026-09-02';
|
|
12
|
+
// The date CLI_DEPRECATED_MAJOR_VERSION reaches end of life
|
|
13
|
+
export const CLI_DEPRECATED_MAJOR_VERSION_EOL_DATE = '2027-03-01';
|
|
14
|
+
export const CLI_SUPPORT_GUIDELINES_URL = 'https://developers.hubspot.com/docs/developer-tooling/local-development/hubspot-cli/version-support';
|
|
6
15
|
export const DEFAULT_POLLING_DELAY = 2000;
|
|
7
16
|
export const PROJECT_CONFIG_FILE = 'hsproject.json';
|
|
8
17
|
export const PROJECT_BUILD_STATES = {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import fs from 'fs';
|
|
2
|
+
import { checkDeprecationWarning } from '../deprecationWarningMiddleware.js';
|
|
3
|
+
import { uiLogger } from '../../ui/logger.js';
|
|
4
|
+
import { debugError } from '../../errorHandlers/index.js';
|
|
5
|
+
import { pkg } from '../../jsonLoader.js';
|
|
6
|
+
vi.mock('fs');
|
|
7
|
+
vi.mock('../../jsonLoader.js', () => ({
|
|
8
|
+
pkg: { name: '@hubspot/cli', version: '7.11.3' },
|
|
9
|
+
}));
|
|
10
|
+
vi.mock('../../ui/logger.js', () => ({
|
|
11
|
+
uiLogger: { log: vi.fn() },
|
|
12
|
+
}));
|
|
13
|
+
vi.mock('../../errorHandlers/index.js', () => ({
|
|
14
|
+
debugError: vi.fn(),
|
|
15
|
+
}));
|
|
16
|
+
const mockedReadFileSync = vi.mocked(fs.readFileSync);
|
|
17
|
+
const mockedWriteFileSync = vi.mocked(fs.writeFileSync);
|
|
18
|
+
const mockedMkdirSync = vi.mocked(fs.mkdirSync);
|
|
19
|
+
describe('lib/middleware/deprecationWarningMiddleware', () => {
|
|
20
|
+
describe('checkDeprecationWarning()', () => {
|
|
21
|
+
beforeEach(() => {
|
|
22
|
+
pkg.version = '7.11.3';
|
|
23
|
+
mockedReadFileSync.mockImplementation(() => {
|
|
24
|
+
throw new Error('ENOENT');
|
|
25
|
+
});
|
|
26
|
+
mockedWriteFileSync.mockImplementation(() => undefined);
|
|
27
|
+
mockedMkdirSync.mockImplementation(() => undefined);
|
|
28
|
+
// CLI_DEPRECATED_MAJOR_VERSION_DEPRECATION_DATE is 2026-09-02, EOL is 2027-03-01
|
|
29
|
+
vi.setSystemTime(new Date('2026-09-03T00:00:00Z'));
|
|
30
|
+
});
|
|
31
|
+
afterEach(() => {
|
|
32
|
+
vi.useRealTimers();
|
|
33
|
+
});
|
|
34
|
+
it('should log a deprecation warning when past the deprecation date but before the EOL date', () => {
|
|
35
|
+
checkDeprecationWarning();
|
|
36
|
+
expect(uiLogger.log).toHaveBeenCalledWith(expect.stringContaining('DEPRECATION WARNING'));
|
|
37
|
+
expect(mockedWriteFileSync).toHaveBeenCalledWith(expect.stringContaining('state.json'), expect.stringContaining('"lastDeprecationWarningShown": "2026-09-03'), 'utf-8');
|
|
38
|
+
});
|
|
39
|
+
it('should log an end-of-life warning when past the EOL date', () => {
|
|
40
|
+
vi.setSystemTime(new Date('2027-04-01T00:00:00Z'));
|
|
41
|
+
checkDeprecationWarning();
|
|
42
|
+
expect(uiLogger.log).toHaveBeenCalledWith(expect.stringContaining('END OF LIFE WARNING'));
|
|
43
|
+
expect(mockedWriteFileSync).toHaveBeenCalledWith(expect.stringContaining('state.json'), expect.stringContaining('"lastEndOfLifeWarningShown": "2027-04-01'), 'utf-8');
|
|
44
|
+
});
|
|
45
|
+
it('should not log a warning when the current major version is not the deprecated major version', () => {
|
|
46
|
+
pkg.version = '8.0.0';
|
|
47
|
+
checkDeprecationWarning();
|
|
48
|
+
expect(uiLogger.log).not.toHaveBeenCalled();
|
|
49
|
+
expect(mockedWriteFileSync).not.toHaveBeenCalled();
|
|
50
|
+
});
|
|
51
|
+
it('should not log a warning when before the deprecation date', () => {
|
|
52
|
+
vi.setSystemTime(new Date('2026-01-01T00:00:00Z'));
|
|
53
|
+
checkDeprecationWarning();
|
|
54
|
+
expect(uiLogger.log).not.toHaveBeenCalled();
|
|
55
|
+
expect(mockedWriteFileSync).not.toHaveBeenCalled();
|
|
56
|
+
});
|
|
57
|
+
it('should not log the deprecation warning when it has already been shown within the last day', () => {
|
|
58
|
+
mockedReadFileSync.mockReturnValue(JSON.stringify({
|
|
59
|
+
lastDeprecationWarningShown: new Date(Date.now() - 1000).toISOString(),
|
|
60
|
+
}));
|
|
61
|
+
checkDeprecationWarning();
|
|
62
|
+
expect(uiLogger.log).not.toHaveBeenCalled();
|
|
63
|
+
expect(mockedWriteFileSync).not.toHaveBeenCalled();
|
|
64
|
+
});
|
|
65
|
+
it('should not log the end-of-life warning when it has already been shown within the last day', () => {
|
|
66
|
+
vi.setSystemTime(new Date('2027-04-01T00:00:00Z'));
|
|
67
|
+
mockedReadFileSync.mockReturnValue(JSON.stringify({
|
|
68
|
+
lastEndOfLifeWarningShown: new Date(Date.now() - 1000).toISOString(),
|
|
69
|
+
}));
|
|
70
|
+
checkDeprecationWarning();
|
|
71
|
+
expect(uiLogger.log).not.toHaveBeenCalled();
|
|
72
|
+
expect(mockedWriteFileSync).not.toHaveBeenCalled();
|
|
73
|
+
});
|
|
74
|
+
it('should log the end-of-life warning even when the deprecation warning was already shown today', () => {
|
|
75
|
+
vi.setSystemTime(new Date('2027-04-01T00:00:00Z'));
|
|
76
|
+
mockedReadFileSync.mockReturnValue(JSON.stringify({
|
|
77
|
+
lastDeprecationWarningShown: new Date(Date.now() - 1000).toISOString(),
|
|
78
|
+
}));
|
|
79
|
+
checkDeprecationWarning();
|
|
80
|
+
expect(uiLogger.log).toHaveBeenCalledWith(expect.stringContaining('END OF LIFE WARNING'));
|
|
81
|
+
});
|
|
82
|
+
it('should preserve unrelated existing fields in state.json when writing', () => {
|
|
83
|
+
mockedReadFileSync.mockReturnValue(JSON.stringify({ mcpTotalToolCalls: 42 }));
|
|
84
|
+
checkDeprecationWarning();
|
|
85
|
+
expect(mockedWriteFileSync).toHaveBeenCalledWith(expect.stringContaining('state.json'), expect.stringContaining('"mcpTotalToolCalls": 42'), 'utf-8');
|
|
86
|
+
});
|
|
87
|
+
it('should not throw when writing the stored state fails', () => {
|
|
88
|
+
mockedWriteFileSync.mockImplementation(() => {
|
|
89
|
+
throw new Error('boom');
|
|
90
|
+
});
|
|
91
|
+
expect(() => checkDeprecationWarning()).not.toThrow();
|
|
92
|
+
expect(debugError).toHaveBeenCalled();
|
|
93
|
+
});
|
|
94
|
+
});
|
|
95
|
+
});
|
|
@@ -58,7 +58,7 @@ export async function autoUpdateCLI(argv) {
|
|
|
58
58
|
notifier.update &&
|
|
59
59
|
!argv.useEnv &&
|
|
60
60
|
!process.env.SKIP_HUBSPOT_CLI_AUTO_UPDATES &&
|
|
61
|
-
config?.allowAutoUpdates
|
|
61
|
+
config?.allowAutoUpdates === true &&
|
|
62
62
|
!preventAutoUpdateForCommand(argv._)) {
|
|
63
63
|
// Ignore all update notifications if the current version is a pre-release
|
|
64
64
|
if (!notifier.update.current.includes('-')) {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import path from 'path';
|
|
2
2
|
import { getConfigAccountIfExists, validateConfig, getConfigDefaultAccountIfExists, configFileExists, } from '@hubspot/local-dev-lib/config';
|
|
3
|
+
import { ENVIRONMENT_VARIABLES } from '@hubspot/local-dev-lib/constants/config';
|
|
3
4
|
import { getCwd } from '@hubspot/local-dev-lib/path';
|
|
4
5
|
import { validateAccount } from '../validation.js';
|
|
5
6
|
import { EXIT_CODES } from '../enums/exitCodes.js';
|
|
@@ -22,7 +23,7 @@ export function handleDeprecatedEnvVariables(argv) {
|
|
|
22
23
|
export function handleCustomConfigLocationMiddleware(argv) {
|
|
23
24
|
const { useEnv, config } = argv;
|
|
24
25
|
if (useEnv) {
|
|
25
|
-
process.env.USE_ENVIRONMENT_HUBSPOT_CONFIG = 'true';
|
|
26
|
+
process.env[ENVIRONMENT_VARIABLES.USE_ENVIRONMENT_HUBSPOT_CONFIG] = 'true';
|
|
26
27
|
}
|
|
27
28
|
else if (config && typeof config === 'string') {
|
|
28
29
|
const absoluteConfigPath = path.isAbsolute(config)
|
|
@@ -74,7 +75,8 @@ export async function validateConfigMiddleware(argv) {
|
|
|
74
75
|
}
|
|
75
76
|
// We don't run validation for auth because users should be able to run it when
|
|
76
77
|
// no accounts are configured, but we still want to exit if the config file is not found
|
|
77
|
-
if (!process.env.USE_ENVIRONMENT_HUBSPOT_CONFIG &&
|
|
78
|
+
if (!process.env[ENVIRONMENT_VARIABLES.USE_ENVIRONMENT_HUBSPOT_CONFIG] &&
|
|
79
|
+
!configFileExists()) {
|
|
78
80
|
console.error('Config file not found, run hs account auth to configure your account');
|
|
79
81
|
process.exit(EXIT_CODES.ERROR);
|
|
80
82
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function checkDeprecationWarning(): void;
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import fs from 'fs';
|
|
2
|
+
import path from 'path';
|
|
3
|
+
import moment from 'moment';
|
|
4
|
+
import semver from 'semver';
|
|
5
|
+
import { STATE_FILE_PATH } from '@hubspot/local-dev-lib/constants/config';
|
|
6
|
+
import { pkg } from '../jsonLoader.js';
|
|
7
|
+
import { lib } from '../../lang/en.js';
|
|
8
|
+
import { uiLogger } from '../ui/logger.js';
|
|
9
|
+
import { debugError } from '../errorHandlers/index.js';
|
|
10
|
+
import { CLI_DEPRECATED_MAJOR_VERSION, CLI_DEPRECATED_MAJOR_VERSION_DEPRECATION_DATE, CLI_DEPRECATED_MAJOR_VERSION_EOL_DATE, ONE_DAY_IN_MILLISECONDS, } from '../constants.js';
|
|
11
|
+
const STATE_FLAGS_LAST_SHOWN = {
|
|
12
|
+
deprecated: 'lastDeprecationWarningShown',
|
|
13
|
+
endOfLife: 'lastEndOfLifeWarningShown',
|
|
14
|
+
};
|
|
15
|
+
// Reads state.json directly, bypassing local-dev-lib's getStateValue, whose
|
|
16
|
+
// typed HubSpotState shape doesn't include this field and would strip it out
|
|
17
|
+
function readStateFile() {
|
|
18
|
+
try {
|
|
19
|
+
const contents = fs.readFileSync(STATE_FILE_PATH, 'utf-8');
|
|
20
|
+
const parsed = JSON.parse(contents);
|
|
21
|
+
if (parsed && typeof parsed === 'object' && !Array.isArray(parsed)) {
|
|
22
|
+
return parsed;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
catch (error) {
|
|
26
|
+
// state.json doesn't exist yet or contains invalid JSON
|
|
27
|
+
}
|
|
28
|
+
return {};
|
|
29
|
+
}
|
|
30
|
+
function loadLastShownTimestamp(status) {
|
|
31
|
+
const lastShown = readStateFile()[STATE_FLAGS_LAST_SHOWN[status]];
|
|
32
|
+
return typeof lastShown === 'string' ? moment(lastShown).valueOf() : 0;
|
|
33
|
+
}
|
|
34
|
+
function writeLastShownTimestamp(status, timestamp) {
|
|
35
|
+
fs.mkdirSync(path.dirname(STATE_FILE_PATH), { recursive: true });
|
|
36
|
+
const state = {
|
|
37
|
+
...readStateFile(),
|
|
38
|
+
[STATE_FLAGS_LAST_SHOWN[status]]: moment(timestamp).toISOString(),
|
|
39
|
+
};
|
|
40
|
+
fs.writeFileSync(STATE_FILE_PATH, JSON.stringify(state, null, 2), 'utf-8');
|
|
41
|
+
}
|
|
42
|
+
function getDeprecationStatusForCurrentMajorVersion() {
|
|
43
|
+
const majorVersion = semver.major(pkg.version);
|
|
44
|
+
if (majorVersion !== CLI_DEPRECATED_MAJOR_VERSION) {
|
|
45
|
+
return null;
|
|
46
|
+
}
|
|
47
|
+
const now = moment();
|
|
48
|
+
if (now.isSameOrAfter(moment(CLI_DEPRECATED_MAJOR_VERSION_EOL_DATE))) {
|
|
49
|
+
return 'endOfLife';
|
|
50
|
+
}
|
|
51
|
+
if (now.isSameOrAfter(moment(CLI_DEPRECATED_MAJOR_VERSION_DEPRECATION_DATE))) {
|
|
52
|
+
return 'deprecated';
|
|
53
|
+
}
|
|
54
|
+
return null;
|
|
55
|
+
}
|
|
56
|
+
function hasShownWarningToday(status) {
|
|
57
|
+
return Date.now() - loadLastShownTimestamp(status) < ONE_DAY_IN_MILLISECONDS;
|
|
58
|
+
}
|
|
59
|
+
function logDeprecationStatusWarning(status) {
|
|
60
|
+
const eolDate = moment(CLI_DEPRECATED_MAJOR_VERSION_EOL_DATE).format('MMMM D, YYYY');
|
|
61
|
+
const message = status === 'endOfLife'
|
|
62
|
+
? lib.middleware.deprecationWarning.endOfLifeMessage(pkg.version, eolDate)
|
|
63
|
+
: lib.middleware.deprecationWarning.deprecatedMessage(pkg.version, eolDate);
|
|
64
|
+
uiLogger.log(message);
|
|
65
|
+
writeLastShownTimestamp(status, Date.now());
|
|
66
|
+
}
|
|
67
|
+
export function checkDeprecationWarning() {
|
|
68
|
+
try {
|
|
69
|
+
const status = getDeprecationStatusForCurrentMajorVersion();
|
|
70
|
+
if (!status || hasShownWarningToday(status)) {
|
|
71
|
+
return;
|
|
72
|
+
}
|
|
73
|
+
logDeprecationStatusWarning(status);
|
|
74
|
+
}
|
|
75
|
+
catch (error) {
|
|
76
|
+
debugError(error);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { getConfigFilePath, globalConfigFileExists, } from '@hubspot/local-dev-lib/config';
|
|
2
|
+
import { ENVIRONMENT_VARIABLES } from '@hubspot/local-dev-lib/constants/config';
|
|
2
3
|
import { checkAndWarnGitInclusion } from '../ui/git.js';
|
|
3
4
|
import { debugError } from '../errorHandlers/index.js';
|
|
4
5
|
export function checkAndWarnGitInclusionMiddleware(argv) {
|
|
5
|
-
// Skip this when no command is provided
|
|
6
|
-
if (argv._.length
|
|
6
|
+
// Skip this when no command is provided or if using environment config
|
|
7
|
+
if (argv._.length &&
|
|
8
|
+
!process.env[ENVIRONMENT_VARIABLES.USE_ENVIRONMENT_HUBSPOT_CONFIG]) {
|
|
7
9
|
// Skip if using global config
|
|
8
10
|
if (globalConfigFileExists()) {
|
|
9
11
|
return;
|
package/lib/projects/upload.js
CHANGED
|
@@ -75,10 +75,15 @@ export async function handleProjectUpload({ accountId, projectConfig, projectDir
|
|
|
75
75
|
resolve({ uploadError: e });
|
|
76
76
|
}
|
|
77
77
|
}
|
|
78
|
-
await ensureProjectExists(accountId, projectConfig.name, {
|
|
78
|
+
const { projectExists } = await ensureProjectExists(accountId, projectConfig.name, {
|
|
79
79
|
forceCreate,
|
|
80
80
|
uploadCommand: isUploadCommand,
|
|
81
|
+
noLogs: true,
|
|
81
82
|
});
|
|
83
|
+
if (!projectExists) {
|
|
84
|
+
uiLogger.log(lib.projectUpload.handleProjectUpload.projectDoesNotExist(accountId));
|
|
85
|
+
process.exit(EXIT_CODES.SUCCESS);
|
|
86
|
+
}
|
|
82
87
|
const { buildId, error } = await uploadProjectFiles(accountId, projectConfig.name, tempFile.name, uploadMessage, projectConfig.platformVersion, intermediateRepresentation);
|
|
83
88
|
if (error) {
|
|
84
89
|
resolve({ uploadError: error });
|
|
@@ -6,23 +6,15 @@ declare const inputSchemaZodObject: z.ZodObject<{
|
|
|
6
6
|
dest: z.ZodOptional<z.ZodString>;
|
|
7
7
|
functionsFolder: z.ZodOptional<z.ZodString>;
|
|
8
8
|
filename: z.ZodOptional<z.ZodString>;
|
|
9
|
-
endpointMethod: z.ZodOptional<z.ZodEnum<
|
|
9
|
+
endpointMethod: z.ZodOptional<z.ZodEnum<{
|
|
10
|
+
DELETE: "DELETE";
|
|
11
|
+
GET: "GET";
|
|
12
|
+
PATCH: "PATCH";
|
|
13
|
+
POST: "POST";
|
|
14
|
+
PUT: "PUT";
|
|
15
|
+
}>>;
|
|
10
16
|
endpointPath: z.ZodOptional<z.ZodString>;
|
|
11
|
-
},
|
|
12
|
-
absoluteCurrentWorkingDirectory: string;
|
|
13
|
-
dest?: string | undefined;
|
|
14
|
-
functionsFolder?: string | undefined;
|
|
15
|
-
filename?: string | undefined;
|
|
16
|
-
endpointMethod?: "DELETE" | "GET" | "PATCH" | "POST" | "PUT" | undefined;
|
|
17
|
-
endpointPath?: string | undefined;
|
|
18
|
-
}, {
|
|
19
|
-
absoluteCurrentWorkingDirectory: string;
|
|
20
|
-
dest?: string | undefined;
|
|
21
|
-
functionsFolder?: string | undefined;
|
|
22
|
-
filename?: string | undefined;
|
|
23
|
-
endpointMethod?: "DELETE" | "GET" | "PATCH" | "POST" | "PUT" | undefined;
|
|
24
|
-
endpointPath?: string | undefined;
|
|
25
|
-
}>;
|
|
17
|
+
}, z.core.$strip>;
|
|
26
18
|
export type HsCreateFunctionInputSchema = z.infer<typeof inputSchemaZodObject>;
|
|
27
19
|
export declare class HsCreateFunctionTool extends Tool<HsCreateFunctionInputSchema> {
|
|
28
20
|
constructor(mcpServer: McpServer);
|
|
@@ -7,28 +7,10 @@ declare const inputSchemaZodObject: z.ZodObject<{
|
|
|
7
7
|
dest: z.ZodOptional<z.ZodString>;
|
|
8
8
|
moduleLabel: z.ZodOptional<z.ZodString>;
|
|
9
9
|
reactType: z.ZodOptional<z.ZodBoolean>;
|
|
10
|
-
contentTypes: z.ZodOptional<z.
|
|
10
|
+
contentTypes: z.ZodOptional<z.ZodString>;
|
|
11
11
|
global: z.ZodOptional<z.ZodBoolean>;
|
|
12
12
|
availableForNewContent: z.ZodOptional<z.ZodBoolean>;
|
|
13
|
-
},
|
|
14
|
-
absoluteCurrentWorkingDirectory: string;
|
|
15
|
-
dest?: string | undefined;
|
|
16
|
-
global?: boolean | undefined;
|
|
17
|
-
moduleLabel?: string | undefined;
|
|
18
|
-
reactType?: boolean | undefined;
|
|
19
|
-
contentTypes?: string | undefined;
|
|
20
|
-
availableForNewContent?: boolean | undefined;
|
|
21
|
-
userSuppliedName?: string | undefined;
|
|
22
|
-
}, {
|
|
23
|
-
absoluteCurrentWorkingDirectory: string;
|
|
24
|
-
dest?: string | undefined;
|
|
25
|
-
global?: boolean | undefined;
|
|
26
|
-
moduleLabel?: string | undefined;
|
|
27
|
-
reactType?: boolean | undefined;
|
|
28
|
-
contentTypes?: string | undefined;
|
|
29
|
-
availableForNewContent?: boolean | undefined;
|
|
30
|
-
userSuppliedName?: string | undefined;
|
|
31
|
-
}>;
|
|
13
|
+
}, z.core.$strip>;
|
|
32
14
|
export type HsCreateModuleInputSchema = z.infer<typeof inputSchemaZodObject>;
|
|
33
15
|
export declare class HsCreateModuleTool extends Tool<HsCreateModuleInputSchema> {
|
|
34
16
|
constructor(mcpServer: McpServer);
|
|
@@ -5,18 +5,17 @@ declare const inputSchemaZodObject: z.ZodObject<{
|
|
|
5
5
|
absoluteCurrentWorkingDirectory: z.ZodString;
|
|
6
6
|
userSuppliedName: z.ZodOptional<z.ZodString>;
|
|
7
7
|
dest: z.ZodOptional<z.ZodString>;
|
|
8
|
-
templateType: z.ZodOptional<z.ZodEnum<
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}>;
|
|
8
|
+
templateType: z.ZodOptional<z.ZodEnum<{
|
|
9
|
+
"page-template": "page-template";
|
|
10
|
+
"email-template": "email-template";
|
|
11
|
+
partial: "partial";
|
|
12
|
+
"global-partial": "global-partial";
|
|
13
|
+
"blog-listing-template": "blog-listing-template";
|
|
14
|
+
"blog-post-template": "blog-post-template";
|
|
15
|
+
"search-template": "search-template";
|
|
16
|
+
section: "section";
|
|
17
|
+
}>>;
|
|
18
|
+
}, z.core.$strip>;
|
|
20
19
|
export type HsCreateTemplateInputSchema = z.infer<typeof inputSchemaZodObject>;
|
|
21
20
|
export declare class HsCreateTemplateTool extends Tool<HsCreateTemplateInputSchema> {
|
|
22
21
|
constructor(mcpServer: McpServer);
|
|
@@ -8,21 +8,7 @@ declare const inputSchemaZodObject: z.ZodObject<{
|
|
|
8
8
|
latest: z.ZodOptional<z.ZodBoolean>;
|
|
9
9
|
compact: z.ZodOptional<z.ZodBoolean>;
|
|
10
10
|
limit: z.ZodOptional<z.ZodNumber>;
|
|
11
|
-
},
|
|
12
|
-
endpoint: string;
|
|
13
|
-
absoluteCurrentWorkingDirectory: string;
|
|
14
|
-
account?: string | undefined;
|
|
15
|
-
latest?: boolean | undefined;
|
|
16
|
-
compact?: boolean | undefined;
|
|
17
|
-
limit?: number | undefined;
|
|
18
|
-
}, {
|
|
19
|
-
endpoint: string;
|
|
20
|
-
absoluteCurrentWorkingDirectory: string;
|
|
21
|
-
account?: string | undefined;
|
|
22
|
-
latest?: boolean | undefined;
|
|
23
|
-
compact?: boolean | undefined;
|
|
24
|
-
limit?: number | undefined;
|
|
25
|
-
}>;
|
|
11
|
+
}, z.core.$strip>;
|
|
26
12
|
export type HsFunctionLogsInputSchema = z.infer<typeof inputSchemaZodObject>;
|
|
27
13
|
export declare class HsFunctionLogsTool extends Tool<HsFunctionLogsInputSchema> {
|
|
28
14
|
constructor(mcpServer: McpServer);
|
|
@@ -5,15 +5,7 @@ declare const inputSchemaZodObject: z.ZodObject<{
|
|
|
5
5
|
absoluteCurrentWorkingDirectory: z.ZodString;
|
|
6
6
|
account: z.ZodOptional<z.ZodString>;
|
|
7
7
|
json: z.ZodOptional<z.ZodBoolean>;
|
|
8
|
-
},
|
|
9
|
-
absoluteCurrentWorkingDirectory: string;
|
|
10
|
-
account?: string | undefined;
|
|
11
|
-
json?: boolean | undefined;
|
|
12
|
-
}, {
|
|
13
|
-
absoluteCurrentWorkingDirectory: string;
|
|
14
|
-
account?: string | undefined;
|
|
15
|
-
json?: boolean | undefined;
|
|
16
|
-
}>;
|
|
8
|
+
}, z.core.$strip>;
|
|
17
9
|
export type HsListFunctionsInputSchema = z.infer<typeof inputSchemaZodObject>;
|
|
18
10
|
export declare class HsListFunctionsTool extends Tool<HsListFunctionsInputSchema> {
|
|
19
11
|
constructor(mcpServer: McpServer);
|
|
@@ -5,15 +5,7 @@ declare const inputSchemaZodObject: z.ZodObject<{
|
|
|
5
5
|
absoluteCurrentWorkingDirectory: z.ZodString;
|
|
6
6
|
path: z.ZodOptional<z.ZodString>;
|
|
7
7
|
account: z.ZodOptional<z.ZodString>;
|
|
8
|
-
},
|
|
9
|
-
absoluteCurrentWorkingDirectory: string;
|
|
10
|
-
account?: string | undefined;
|
|
11
|
-
path?: string | undefined;
|
|
12
|
-
}, {
|
|
13
|
-
absoluteCurrentWorkingDirectory: string;
|
|
14
|
-
account?: string | undefined;
|
|
15
|
-
path?: string | undefined;
|
|
16
|
-
}>;
|
|
8
|
+
}, z.core.$strip>;
|
|
17
9
|
export type HsListInputSchema = z.infer<typeof inputSchemaZodObject>;
|
|
18
10
|
export declare class HsListTool extends Tool<HsListInputSchema> {
|
|
19
11
|
constructor(mcpServer: McpServer);
|
|
@@ -5,24 +5,10 @@ declare const inputSchemaZodObject: z.ZodObject<{
|
|
|
5
5
|
absoluteProjectPath: z.ZodString;
|
|
6
6
|
absoluteCurrentWorkingDirectory: z.ZodString;
|
|
7
7
|
addApp: z.ZodBoolean;
|
|
8
|
-
distribution: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"marketplace">, z.ZodLiteral<"private">]>>;
|
|
9
|
-
auth: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"static">, z.ZodLiteral<"oauth">]>>;
|
|
10
|
-
features: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodLiteral<"card">, z.ZodLiteral<"settings">, z.ZodLiteral<"app-function">, z.ZodLiteral<"webhooks">, z.ZodLiteral<"workflow-action">, z.ZodLiteral<"workflow-action-tool">, z.ZodLiteral<"app-object">, z.ZodLiteral<"app-event">, z.ZodLiteral<"scim">, z.ZodLiteral<"page">]
|
|
11
|
-
},
|
|
12
|
-
absoluteProjectPath: string;
|
|
13
|
-
absoluteCurrentWorkingDirectory: string;
|
|
14
|
-
addApp: boolean;
|
|
15
|
-
auth?: "oauth" | "static" | undefined;
|
|
16
|
-
distribution?: "marketplace" | "private" | undefined;
|
|
17
|
-
features?: ("card" | "settings" | "page" | "app-event" | "workflow-action-tool" | "workflow-action" | "app-function" | "webhooks" | "app-object" | "scim")[] | undefined;
|
|
18
|
-
}, {
|
|
19
|
-
absoluteProjectPath: string;
|
|
20
|
-
absoluteCurrentWorkingDirectory: string;
|
|
21
|
-
addApp: boolean;
|
|
22
|
-
auth?: "oauth" | "static" | undefined;
|
|
23
|
-
distribution?: "marketplace" | "private" | undefined;
|
|
24
|
-
features?: ("card" | "settings" | "page" | "app-event" | "workflow-action-tool" | "workflow-action" | "app-function" | "webhooks" | "app-object" | "scim")[] | undefined;
|
|
25
|
-
}>;
|
|
8
|
+
distribution: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"marketplace">, z.ZodLiteral<"private">]>>;
|
|
9
|
+
auth: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"static">, z.ZodLiteral<"oauth">]>>;
|
|
10
|
+
features: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodLiteral<"card">, z.ZodLiteral<"settings">, z.ZodLiteral<"app-function">, z.ZodLiteral<"webhooks">, z.ZodLiteral<"workflow-action">, z.ZodLiteral<"workflow-action-tool">, z.ZodLiteral<"app-object">, z.ZodLiteral<"app-event">, z.ZodLiteral<"scim">, z.ZodLiteral<"page">]>>>;
|
|
11
|
+
}, z.core.$strip>;
|
|
26
12
|
export type AddFeatureInputSchema = z.infer<typeof inputSchemaZodObject>;
|
|
27
13
|
export declare class AddFeatureToProjectTool extends Tool<AddFeatureInputSchema> {
|
|
28
14
|
constructor(mcpServer: McpServer);
|
|
@@ -5,27 +5,11 @@ declare const inputSchemaZodObject: z.ZodObject<{
|
|
|
5
5
|
absoluteCurrentWorkingDirectory: z.ZodString;
|
|
6
6
|
name: z.ZodOptional<z.ZodString>;
|
|
7
7
|
destination: z.ZodString;
|
|
8
|
-
projectBase: z.ZodUnion<[z.ZodLiteral<"empty">, z.ZodLiteral<"app">]>;
|
|
9
|
-
distribution: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"marketplace">, z.ZodLiteral<"private">]>>;
|
|
10
|
-
auth: z.ZodOptional<z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"static">, z.ZodLiteral<"oauth">]>>>;
|
|
11
|
-
features: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodLiteral<"card">, z.ZodLiteral<"settings">, z.ZodLiteral<"app-function">, z.ZodLiteral<"webhooks">, z.ZodLiteral<"workflow-action">, z.ZodLiteral<"workflow-action-tool">, z.ZodLiteral<"app-object">, z.ZodLiteral<"app-event">, z.ZodLiteral<"scim">, z.ZodLiteral<"page">]
|
|
12
|
-
},
|
|
13
|
-
projectBase: "app" | "empty";
|
|
14
|
-
absoluteCurrentWorkingDirectory: string;
|
|
15
|
-
destination: string;
|
|
16
|
-
name?: string | undefined;
|
|
17
|
-
auth?: "oauth" | "static" | undefined;
|
|
18
|
-
distribution?: "marketplace" | "private" | undefined;
|
|
19
|
-
features?: ("card" | "settings" | "page" | "app-event" | "workflow-action-tool" | "workflow-action" | "app-function" | "webhooks" | "app-object" | "scim")[] | undefined;
|
|
20
|
-
}, {
|
|
21
|
-
projectBase: "app" | "empty";
|
|
22
|
-
absoluteCurrentWorkingDirectory: string;
|
|
23
|
-
destination: string;
|
|
24
|
-
name?: string | undefined;
|
|
25
|
-
auth?: "oauth" | "static" | undefined;
|
|
26
|
-
distribution?: "marketplace" | "private" | undefined;
|
|
27
|
-
features?: ("card" | "settings" | "page" | "app-event" | "workflow-action-tool" | "workflow-action" | "app-function" | "webhooks" | "app-object" | "scim")[] | undefined;
|
|
28
|
-
}>;
|
|
8
|
+
projectBase: z.ZodUnion<readonly [z.ZodLiteral<"empty">, z.ZodLiteral<"app">]>;
|
|
9
|
+
distribution: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"marketplace">, z.ZodLiteral<"private">]>>;
|
|
10
|
+
auth: z.ZodOptional<z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"static">, z.ZodLiteral<"oauth">]>>>;
|
|
11
|
+
features: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodLiteral<"card">, z.ZodLiteral<"settings">, z.ZodLiteral<"app-function">, z.ZodLiteral<"webhooks">, z.ZodLiteral<"workflow-action">, z.ZodLiteral<"workflow-action-tool">, z.ZodLiteral<"app-object">, z.ZodLiteral<"app-event">, z.ZodLiteral<"scim">, z.ZodLiteral<"page">]>>>;
|
|
12
|
+
}, z.core.$strip>;
|
|
29
13
|
export type CreateProjectInputSchema = z.infer<typeof inputSchemaZodObject>;
|
|
30
14
|
export declare class CreateProjectTool extends Tool<CreateProjectInputSchema> {
|
|
31
15
|
constructor(mcpServer: McpServer);
|
|
@@ -6,32 +6,37 @@ declare const createTestAccountInputSchema: z.ZodObject<{
|
|
|
6
6
|
configPath: z.ZodOptional<z.ZodString>;
|
|
7
7
|
name: z.ZodOptional<z.ZodString>;
|
|
8
8
|
description: z.ZodOptional<z.ZodString>;
|
|
9
|
-
marketingLevel: z.ZodOptional<z.ZodEnum<
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
9
|
+
marketingLevel: z.ZodOptional<z.ZodEnum<{
|
|
10
|
+
FREE: "FREE";
|
|
11
|
+
STARTER: "STARTER";
|
|
12
|
+
PROFESSIONAL: "PROFESSIONAL";
|
|
13
|
+
ENTERPRISE: "ENTERPRISE";
|
|
14
|
+
}>>;
|
|
15
|
+
opsLevel: z.ZodOptional<z.ZodEnum<{
|
|
16
|
+
FREE: "FREE";
|
|
17
|
+
STARTER: "STARTER";
|
|
18
|
+
PROFESSIONAL: "PROFESSIONAL";
|
|
19
|
+
ENTERPRISE: "ENTERPRISE";
|
|
20
|
+
}>>;
|
|
21
|
+
serviceLevel: z.ZodOptional<z.ZodEnum<{
|
|
22
|
+
FREE: "FREE";
|
|
23
|
+
STARTER: "STARTER";
|
|
24
|
+
PROFESSIONAL: "PROFESSIONAL";
|
|
25
|
+
ENTERPRISE: "ENTERPRISE";
|
|
26
|
+
}>>;
|
|
27
|
+
salesLevel: z.ZodOptional<z.ZodEnum<{
|
|
28
|
+
FREE: "FREE";
|
|
29
|
+
STARTER: "STARTER";
|
|
30
|
+
PROFESSIONAL: "PROFESSIONAL";
|
|
31
|
+
ENTERPRISE: "ENTERPRISE";
|
|
32
|
+
}>>;
|
|
33
|
+
contentLevel: z.ZodOptional<z.ZodEnum<{
|
|
34
|
+
FREE: "FREE";
|
|
35
|
+
STARTER: "STARTER";
|
|
36
|
+
PROFESSIONAL: "PROFESSIONAL";
|
|
37
|
+
ENTERPRISE: "ENTERPRISE";
|
|
38
|
+
}>>;
|
|
39
|
+
}, z.core.$strip>;
|
|
35
40
|
export type CreateTestAccountInputSchema = z.infer<typeof createTestAccountInputSchema>;
|
|
36
41
|
export declare class CreateTestAccountTool extends Tool<CreateTestAccountInputSchema> {
|
|
37
42
|
constructor(mcpServer: McpServer);
|
|
@@ -5,15 +5,7 @@ declare const inputSchemaZodObject: z.ZodObject<{
|
|
|
5
5
|
absoluteProjectPath: z.ZodString;
|
|
6
6
|
absoluteCurrentWorkingDirectory: z.ZodString;
|
|
7
7
|
buildNumber: z.ZodOptional<z.ZodNumber>;
|
|
8
|
-
},
|
|
9
|
-
absoluteProjectPath: string;
|
|
10
|
-
absoluteCurrentWorkingDirectory: string;
|
|
11
|
-
buildNumber?: number | undefined;
|
|
12
|
-
}, {
|
|
13
|
-
absoluteProjectPath: string;
|
|
14
|
-
absoluteCurrentWorkingDirectory: string;
|
|
15
|
-
buildNumber?: number | undefined;
|
|
16
|
-
}>;
|
|
8
|
+
}, z.core.$strip>;
|
|
17
9
|
type InputSchemaType = z.infer<typeof inputSchemaZodObject>;
|
|
18
10
|
export declare class DeployProjectTool extends Tool<InputSchemaType> {
|
|
19
11
|
constructor(mcpServer: McpServer);
|
|
@@ -4,13 +4,7 @@ import { TextContentResponse, Tool } from '../../types.js';
|
|
|
4
4
|
declare const inputSchemaZodObject: z.ZodObject<{
|
|
5
5
|
docUrl: z.ZodString;
|
|
6
6
|
absoluteCurrentWorkingDirectory: z.ZodString;
|
|
7
|
-
},
|
|
8
|
-
absoluteCurrentWorkingDirectory: string;
|
|
9
|
-
docUrl: string;
|
|
10
|
-
}, {
|
|
11
|
-
absoluteCurrentWorkingDirectory: string;
|
|
12
|
-
docUrl: string;
|
|
13
|
-
}>;
|
|
7
|
+
}, z.z.core.$strip>;
|
|
14
8
|
type InputSchemaType = z.infer<typeof inputSchemaZodObject>;
|
|
15
9
|
export declare class DocFetchTool extends Tool<InputSchemaType> {
|
|
16
10
|
constructor(mcpServer: McpServer);
|
|
@@ -4,13 +4,7 @@ import { TextContentResponse, Tool } from '../../types.js';
|
|
|
4
4
|
declare const inputSchemaZodObject: z.ZodObject<{
|
|
5
5
|
absoluteCurrentWorkingDirectory: z.ZodString;
|
|
6
6
|
docsSearchQuery: z.ZodString;
|
|
7
|
-
},
|
|
8
|
-
absoluteCurrentWorkingDirectory: string;
|
|
9
|
-
docsSearchQuery: string;
|
|
10
|
-
}, {
|
|
11
|
-
absoluteCurrentWorkingDirectory: string;
|
|
12
|
-
docsSearchQuery: string;
|
|
13
|
-
}>;
|
|
7
|
+
}, z.z.core.$strip>;
|
|
14
8
|
export interface DocsSearchResponse {
|
|
15
9
|
results: {
|
|
16
10
|
title: string;
|
|
@@ -6,17 +6,7 @@ declare const inputSchemaZodObject: z.ZodObject<{
|
|
|
6
6
|
appId: z.ZodString;
|
|
7
7
|
startDate: z.ZodOptional<z.ZodString>;
|
|
8
8
|
endDate: z.ZodOptional<z.ZodString>;
|
|
9
|
-
},
|
|
10
|
-
appId: string;
|
|
11
|
-
absoluteCurrentWorkingDirectory: string;
|
|
12
|
-
startDate?: string | undefined;
|
|
13
|
-
endDate?: string | undefined;
|
|
14
|
-
}, {
|
|
15
|
-
appId: string;
|
|
16
|
-
absoluteCurrentWorkingDirectory: string;
|
|
17
|
-
startDate?: string | undefined;
|
|
18
|
-
endDate?: string | undefined;
|
|
19
|
-
}>;
|
|
9
|
+
}, z.core.$strip>;
|
|
20
10
|
export type GetApiUsagePatternsByAppIdInputSchema = z.infer<typeof inputSchemaZodObject>;
|
|
21
11
|
export declare class GetApiUsagePatternsByAppIdTool extends Tool<GetApiUsagePatternsByAppIdInputSchema> {
|
|
22
12
|
constructor(mcpServer: McpServer);
|
|
@@ -3,11 +3,7 @@ import { McpServer, RegisteredTool } from '@modelcontextprotocol/sdk/server/mcp.
|
|
|
3
3
|
import { z } from 'zod';
|
|
4
4
|
declare const inputSchemaZodObject: z.ZodObject<{
|
|
5
5
|
absoluteCurrentWorkingDirectory: z.ZodString;
|
|
6
|
-
},
|
|
7
|
-
absoluteCurrentWorkingDirectory: string;
|
|
8
|
-
}, {
|
|
9
|
-
absoluteCurrentWorkingDirectory: string;
|
|
10
|
-
}>;
|
|
6
|
+
}, z.core.$strip>;
|
|
11
7
|
export type GetApplicationInfoInputSchema = z.infer<typeof inputSchemaZodObject>;
|
|
12
8
|
export declare class GetApplicationInfoTool extends Tool<GetApplicationInfoInputSchema> {
|
|
13
9
|
constructor(mcpServer: McpServer);
|
|
@@ -5,18 +5,13 @@ declare const inputSchemaZodObject: z.ZodObject<{
|
|
|
5
5
|
absoluteProjectPath: z.ZodString;
|
|
6
6
|
absoluteCurrentWorkingDirectory: z.ZodString;
|
|
7
7
|
buildId: z.ZodNumber;
|
|
8
|
-
logLevel: z.ZodDefault<z.ZodOptional<z.ZodEnum<
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
},
|
|
15
|
-
buildId: number;
|
|
16
|
-
absoluteProjectPath: string;
|
|
17
|
-
absoluteCurrentWorkingDirectory: string;
|
|
18
|
-
logLevel?: "ERROR" | "WARN" | "INFO" | "ALL" | undefined;
|
|
19
|
-
}>;
|
|
8
|
+
logLevel: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
|
9
|
+
ERROR: "ERROR";
|
|
10
|
+
WARN: "WARN";
|
|
11
|
+
INFO: "INFO";
|
|
12
|
+
ALL: "ALL";
|
|
13
|
+
}>>>;
|
|
14
|
+
}, z.core.$strip>;
|
|
20
15
|
export type GetBuildLogsInputSchema = z.infer<typeof inputSchemaZodObject>;
|
|
21
16
|
export declare class GetBuildLogsTool extends Tool<GetBuildLogsInputSchema> {
|
|
22
17
|
constructor(mcpServer: McpServer);
|
|
@@ -6,17 +6,7 @@ declare const inputSchemaZodObject: z.ZodObject<{
|
|
|
6
6
|
absoluteCurrentWorkingDirectory: z.ZodString;
|
|
7
7
|
buildId: z.ZodOptional<z.ZodNumber>;
|
|
8
8
|
limit: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
9
|
-
},
|
|
10
|
-
limit: number;
|
|
11
|
-
absoluteProjectPath: string;
|
|
12
|
-
absoluteCurrentWorkingDirectory: string;
|
|
13
|
-
buildId?: number | undefined;
|
|
14
|
-
}, {
|
|
15
|
-
absoluteProjectPath: string;
|
|
16
|
-
absoluteCurrentWorkingDirectory: string;
|
|
17
|
-
limit?: number | undefined;
|
|
18
|
-
buildId?: number | undefined;
|
|
19
|
-
}>;
|
|
9
|
+
}, z.core.$strip>;
|
|
20
10
|
export type GetBuildStatusInputSchema = z.infer<typeof inputSchemaZodObject>;
|
|
21
11
|
export declare class GetBuildStatusTool extends Tool<GetBuildStatusInputSchema> {
|
|
22
12
|
constructor(mcpServer: McpServer);
|
|
@@ -5,15 +5,7 @@ declare const inputSchemaZodObject: z.ZodObject<{
|
|
|
5
5
|
absoluteCurrentWorkingDirectory: z.ZodString;
|
|
6
6
|
platformVersion: z.ZodString;
|
|
7
7
|
featureType: z.ZodString;
|
|
8
|
-
},
|
|
9
|
-
platformVersion: string;
|
|
10
|
-
absoluteCurrentWorkingDirectory: string;
|
|
11
|
-
featureType: string;
|
|
12
|
-
}, {
|
|
13
|
-
platformVersion: string;
|
|
14
|
-
absoluteCurrentWorkingDirectory: string;
|
|
15
|
-
featureType: string;
|
|
16
|
-
}>;
|
|
8
|
+
}, z.core.$strip>;
|
|
17
9
|
type InputSchemaType = z.infer<typeof inputSchemaZodObject>;
|
|
18
10
|
export declare class GetConfigValuesTool extends Tool<InputSchemaType> {
|
|
19
11
|
constructor(mcpServer: McpServer);
|
|
@@ -3,14 +3,8 @@ import { McpServer, RegisteredTool } from '@modelcontextprotocol/sdk/server/mcp.
|
|
|
3
3
|
import { z } from 'zod';
|
|
4
4
|
declare const inputSchemaZodObject: z.ZodObject<{
|
|
5
5
|
absoluteCurrentWorkingDirectory: z.ZodString;
|
|
6
|
-
command: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"hs init">, z.ZodLiteral<"hs auth">, z.ZodLiteral<"hs project create">, z.ZodLiteral<"hs project upload">]>>;
|
|
7
|
-
},
|
|
8
|
-
absoluteCurrentWorkingDirectory: string;
|
|
9
|
-
command?: "hs auth" | "hs project create" | "hs project upload" | "hs init" | undefined;
|
|
10
|
-
}, {
|
|
11
|
-
absoluteCurrentWorkingDirectory: string;
|
|
12
|
-
command?: "hs auth" | "hs project create" | "hs project upload" | "hs init" | undefined;
|
|
13
|
-
}>;
|
|
6
|
+
command: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"hs init">, z.ZodLiteral<"hs auth">, z.ZodLiteral<"hs project create">, z.ZodLiteral<"hs project upload">]>>;
|
|
7
|
+
}, z.core.$strip>;
|
|
14
8
|
type InputSchemaType = z.infer<typeof inputSchemaZodObject>;
|
|
15
9
|
export declare class GuidedWalkthroughTool extends Tool<InputSchemaType> {
|
|
16
10
|
constructor(mcpServer: McpServer);
|
|
@@ -6,17 +6,7 @@ declare const inputSchemaZodObject: z.ZodObject<{
|
|
|
6
6
|
absoluteCurrentWorkingDirectory: z.ZodString;
|
|
7
7
|
uploadMessage: z.ZodString;
|
|
8
8
|
profile: z.ZodOptional<z.ZodString>;
|
|
9
|
-
},
|
|
10
|
-
uploadMessage: string;
|
|
11
|
-
absoluteProjectPath: string;
|
|
12
|
-
absoluteCurrentWorkingDirectory: string;
|
|
13
|
-
profile?: string | undefined;
|
|
14
|
-
}, {
|
|
15
|
-
uploadMessage: string;
|
|
16
|
-
absoluteProjectPath: string;
|
|
17
|
-
absoluteCurrentWorkingDirectory: string;
|
|
18
|
-
profile?: string | undefined;
|
|
19
|
-
}>;
|
|
9
|
+
}, z.z.core.$strip>;
|
|
20
10
|
type InputSchemaType = z.infer<typeof inputSchemaZodObject>;
|
|
21
11
|
export declare class UploadProjectTools extends Tool<InputSchemaType> {
|
|
22
12
|
constructor(mcpServer: McpServer);
|
|
@@ -4,13 +4,7 @@ import { z } from 'zod';
|
|
|
4
4
|
declare const inputSchemaZodObject: z.ZodObject<{
|
|
5
5
|
absoluteProjectPath: z.ZodString;
|
|
6
6
|
absoluteCurrentWorkingDirectory: z.ZodString;
|
|
7
|
-
},
|
|
8
|
-
absoluteProjectPath: string;
|
|
9
|
-
absoluteCurrentWorkingDirectory: string;
|
|
10
|
-
}, {
|
|
11
|
-
absoluteProjectPath: string;
|
|
12
|
-
absoluteCurrentWorkingDirectory: string;
|
|
13
|
-
}>;
|
|
7
|
+
}, z.core.$strip>;
|
|
14
8
|
export type CreateProjectInputSchema = z.infer<typeof inputSchemaZodObject>;
|
|
15
9
|
export declare class ValidateProjectTool extends Tool<CreateProjectInputSchema> {
|
|
16
10
|
constructor(mcpServer: McpServer);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import z from 'zod';
|
|
2
2
|
export declare const absoluteProjectPath: z.ZodString;
|
|
3
3
|
export declare const absoluteCurrentWorkingDirectory: z.ZodString;
|
|
4
|
-
export declare const features: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodLiteral<"card">, z.ZodLiteral<"settings">, z.ZodLiteral<"app-function">, z.ZodLiteral<"webhooks">, z.ZodLiteral<"workflow-action">, z.ZodLiteral<"workflow-action-tool">, z.ZodLiteral<"app-object">, z.ZodLiteral<"app-event">, z.ZodLiteral<"scim">, z.ZodLiteral<"page">]
|
|
4
|
+
export declare const features: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodLiteral<"card">, z.ZodLiteral<"settings">, z.ZodLiteral<"app-function">, z.ZodLiteral<"webhooks">, z.ZodLiteral<"workflow-action">, z.ZodLiteral<"workflow-action-tool">, z.ZodLiteral<"app-object">, z.ZodLiteral<"app-event">, z.ZodLiteral<"scim">, z.ZodLiteral<"page">]>>>;
|
|
5
5
|
export declare const docsSearchQuery: z.ZodString;
|
|
6
6
|
export declare const docUrl: z.ZodString;
|
package/package.json
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hubspot/cli",
|
|
3
|
-
"version": "7.11.4
|
|
3
|
+
"version": "7.11.4",
|
|
4
4
|
"description": "The official CLI for developing on HubSpot",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": "https://github.com/HubSpot/hubspot-cli",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"dependencies": {
|
|
9
|
-
"@hubspot/local-dev-lib": "4.0.
|
|
9
|
+
"@hubspot/local-dev-lib": "4.0.4",
|
|
10
10
|
"@hubspot/project-parsing-lib": "0.10.2",
|
|
11
11
|
"@hubspot/serverless-dev-runtime": "7.0.7",
|
|
12
12
|
"@hubspot/theme-preview-dev-server": "0.0.12",
|
|
13
|
-
"@hubspot/ui-extensions-dev-server": "1.
|
|
13
|
+
"@hubspot/ui-extensions-dev-server": "1.1.3",
|
|
14
14
|
"archiver": "7.0.1",
|
|
15
15
|
"chalk": "5.4.1",
|
|
16
16
|
"chokidar": "3.6.0",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"yargs-parser": "21.1.1"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
|
-
"@hubspot/npm-scripts": "0.
|
|
38
|
+
"@hubspot/npm-scripts": "0.2.1",
|
|
39
39
|
"@types/archiver": "^6.0.3",
|
|
40
40
|
"@types/cli-progress": "^3.11.6",
|
|
41
41
|
"@types/express": "^5.0.0",
|
|
@@ -70,6 +70,9 @@
|
|
|
70
70
|
"@hubspot/cms-dev-server": "^1.2.1",
|
|
71
71
|
"@modelcontextprotocol/sdk": "1.25.0"
|
|
72
72
|
},
|
|
73
|
+
"resolutions": {
|
|
74
|
+
"eslint-visitor-keys": "4.2.0"
|
|
75
|
+
},
|
|
73
76
|
"scripts": {
|
|
74
77
|
"build": "tsx ./scripts/build.ts",
|
|
75
78
|
"build-docker": "docker image build --tag hs-cli-image . && docker image prune -f",
|
|
@@ -84,6 +87,7 @@
|
|
|
84
87
|
"mcp-local": "yarn tsx ./scripts/mcp-local.ts",
|
|
85
88
|
"prettier:write": "prettier --write './**/*.{ts,js,json}'",
|
|
86
89
|
"release": "yarn tsx ./scripts/release.ts release",
|
|
90
|
+
"sync-to-public": "yarn tsx ./scripts/sync-to-public.ts repo-sync",
|
|
87
91
|
"view-ui": "yarn build && yarn tsx ./scripts/view-ui.ts",
|
|
88
92
|
"test": "vitest run",
|
|
89
93
|
"test-dev": "vitest",
|
|
@@ -110,8 +114,8 @@
|
|
|
110
114
|
"node": ">=18"
|
|
111
115
|
},
|
|
112
116
|
"bin": {
|
|
113
|
-
"hs": "./bin/hs",
|
|
114
|
-
"hscms": "./bin/hscms"
|
|
117
|
+
"hs": "./bin/hs.js",
|
|
118
|
+
"hscms": "./bin/hscms.js"
|
|
115
119
|
},
|
|
116
120
|
"publishConfig": {
|
|
117
121
|
"access": "public",
|
|
@@ -5,5 +5,5 @@ export function getBoxWithTitle(props) {
|
|
|
5
5
|
return _jsx(BoxWithTitle, { ...props });
|
|
6
6
|
}
|
|
7
7
|
export function BoxWithTitle({ title, message, titleBackgroundColor, borderColor, textCentered, }) {
|
|
8
|
-
return (_jsxs(Box, { ...CONTAINER_STYLES, borderStyle: "round", borderColor: borderColor, alignSelf: "flex-start", children: [_jsx(Box, { position: "absolute", marginTop: -2, paddingX: 0, alignSelf: "flex-start", justifyContent: "center", alignItems: "center", children: _jsx(Text, { backgroundColor: titleBackgroundColor, bold: true, children: ` ${title} ` }) }), _jsx(Box, { flexDirection: "column", width: "100%", rowGap: 1, children: message
|
|
8
|
+
return (_jsxs(Box, { ...CONTAINER_STYLES, borderStyle: "round", borderColor: borderColor, alignSelf: "flex-start", children: [_jsx(Box, { position: "absolute", marginTop: -2, paddingX: 0, alignSelf: "flex-start", justifyContent: "center", alignItems: "center", children: _jsx(Text, { backgroundColor: titleBackgroundColor, bold: true, children: ` ${title} ` }) }), _jsx(Box, { flexDirection: "column", width: "100%", rowGap: 1, children: message?.split('\n\n').map((section, sectionIndex) => (_jsx(Box, { flexDirection: "column", alignItems: textCentered ? 'center' : 'flex-start', children: section.split('\n').map((line, lineIndex) => (_jsx(Text, { children: line }, `${sectionIndex}-${lineIndex}`))) }, sectionIndex))) })] }));
|
|
9
9
|
}
|
/package/bin/{hs → hs.js}
RENAMED
|
File without changes
|
/package/bin/{hscms → hscms.js}
RENAMED
|
File without changes
|