@hubspot/cli 8.10.0 → 8.12.0-beta.0
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/commands/account/clean.js +1 -1
- package/commands/account/list.js +1 -1
- package/commands/account/remove.js +1 -1
- package/commands/account/rename.js +1 -1
- package/commands/account/use.js +1 -1
- package/commands/api.d.ts +4 -1
- package/commands/api.js +11 -14
- package/commands/hubdb/list.d.ts +1 -1
- package/commands/mcp/setup.d.ts +2 -0
- package/commands/mcp/setup.js +29 -1
- package/commands/project/appInstallStatus.d.ts +2 -1
- package/commands/project/appInstallStatus.js +19 -17
- package/commands/project/create.js +0 -1
- package/commands/project/deploy.d.ts +2 -1
- package/commands/project/deploy.js +31 -14
- package/commands/project/dev/index.js +18 -64
- package/commands/project/info.d.ts +2 -1
- package/commands/project/info.js +8 -6
- package/commands/project/installApp.d.ts +2 -1
- package/commands/project/installApp.js +25 -26
- package/commands/project/list.js +1 -1
- package/commands/project/profile/add.d.ts +2 -1
- package/commands/project/profile/add.js +22 -1
- package/commands/project/profile/delete.d.ts +1 -1
- package/commands/project/release/create.d.ts +2 -1
- package/commands/project/release/create.js +68 -69
- package/commands/project/release/info.d.ts +2 -1
- package/commands/project/release/info.js +7 -6
- package/commands/project/release/list.d.ts +2 -1
- package/commands/project/release/list.js +14 -6
- package/commands/project/upload.d.ts +2 -1
- package/commands/project/upload.js +23 -17
- package/commands/project/validate.d.ts +1 -1
- package/commands/project.js +2 -2
- package/commands/testAccount/create.d.ts +2 -1
- package/commands/testAccount/create.js +7 -7
- package/commands/testAccount/importData.d.ts +1 -1
- package/lang/en.d.ts +32 -28
- package/lang/en.js +41 -37
- package/lib/commonOpts.js +6 -1
- package/lib/constants.d.ts +1 -0
- package/lib/constants.js +1 -0
- package/lib/jsonOutput.d.ts +109 -0
- package/lib/jsonOutput.js +94 -0
- package/lib/mcp/setup.d.ts +6 -1
- package/lib/mcp/setup.js +29 -18
- package/lib/projects/builds.d.ts +2 -0
- package/lib/projects/builds.js +22 -0
- package/lib/projects/localDev/DevSessionManager.d.ts +2 -2
- package/lib/projects/localDev/DevSessionManager.js +4 -30
- package/lib/projects/localDev/helpers/account.d.ts +0 -7
- package/lib/projects/localDev/helpers/account.js +1 -80
- package/lib/projects/release.d.ts +4 -0
- package/lib/projects/release.js +90 -0
- package/lib/projects/upload.d.ts +1 -1
- package/lib/projects/upload.js +4 -8
- package/lib/yargs/makeWrappedYargsHandler.d.ts +5 -1
- package/lib/yargs/makeWrappedYargsHandler.js +123 -65
- package/mcp-server/Tool.d.ts +8 -3
- package/mcp-server/Tool.js +58 -32
- package/mcp-server/server.js +10 -6
- package/mcp-server/tools/cms/HsCreateFunctionTool.d.ts +2 -2
- package/mcp-server/tools/cms/HsCreateFunctionTool.js +10 -17
- package/mcp-server/tools/cms/HsCreateModuleTool.d.ts +2 -2
- package/mcp-server/tools/cms/HsCreateModuleTool.js +12 -18
- package/mcp-server/tools/cms/HsCreateTemplateTool.d.ts +2 -2
- package/mcp-server/tools/cms/HsCreateTemplateTool.js +8 -10
- package/mcp-server/tools/cms/HsFunctionLogsTool.d.ts +2 -2
- package/mcp-server/tools/cms/HsFunctionLogsTool.js +9 -9
- package/mcp-server/tools/cms/HsListFunctionsTool.d.ts +2 -2
- package/mcp-server/tools/cms/HsListFunctionsTool.js +7 -7
- package/mcp-server/tools/cms/HsListTool.d.ts +2 -2
- package/mcp-server/tools/cms/HsListTool.js +6 -10
- package/mcp-server/tools/index.js +2 -0
- package/mcp-server/tools/project/AddFeatureToProjectTool.d.ts +2 -2
- package/mcp-server/tools/project/AddFeatureToProjectTool.js +8 -9
- package/mcp-server/tools/project/AuthAccountTool.d.ts +18 -0
- package/mcp-server/tools/project/AuthAccountTool.js +78 -0
- package/mcp-server/tools/project/CreateProjectTool.d.ts +2 -2
- package/mcp-server/tools/project/CreateProjectTool.js +13 -12
- package/mcp-server/tools/project/CreateTestAccountTool.d.ts +2 -2
- package/mcp-server/tools/project/CreateTestAccountTool.js +14 -15
- package/mcp-server/tools/project/DeployProjectTool.d.ts +2 -2
- package/mcp-server/tools/project/DeployProjectTool.js +10 -10
- package/mcp-server/tools/project/DocFetchTool.js +1 -1
- package/mcp-server/tools/project/DocsSearchTool.js +9 -3
- package/mcp-server/tools/project/FindProjectsTool.js +1 -1
- package/mcp-server/tools/project/GetApiUsagePatternsByAppIdTool.js +9 -4
- package/mcp-server/tools/project/GetApplicationInfoTool.js +9 -4
- package/mcp-server/tools/project/GetBuildLogsTool.js +9 -3
- package/mcp-server/tools/project/GetBuildStatusTool.js +9 -3
- package/mcp-server/tools/project/GetConfigValuesTool.js +9 -3
- package/mcp-server/tools/project/GuidedWalkthroughTool.js +1 -1
- package/mcp-server/tools/project/UploadProjectTools.d.ts +2 -2
- package/mcp-server/tools/project/UploadProjectTools.js +9 -8
- package/mcp-server/tools/project/ValidateProjectTool.d.ts +2 -2
- package/mcp-server/tools/project/ValidateProjectTool.js +5 -4
- package/mcp-server/utils/command.d.ts +25 -2
- package/mcp-server/utils/command.js +67 -17
- package/mcp-server/utils/logger.d.ts +3 -0
- package/mcp-server/utils/logger.js +30 -0
- package/mcp-server/utils/toolUsageTracking.js +8 -1
- package/package.json +10 -8
- package/types/Yargs.d.ts +3 -1
- package/commands/project/dev/deprecatedFlow.d.ts +0 -11
- package/commands/project/dev/deprecatedFlow.js +0 -180
- package/lib/projects/localDev/DevServerManager_DEPRECATED.d.ts +0 -43
- package/lib/projects/localDev/DevServerManager_DEPRECATED.js +0 -128
- package/lib/projects/localDev/LocalDevManager_DEPRECATED.d.ts +0 -64
- package/lib/projects/localDev/LocalDevManager_DEPRECATED.js +0 -394
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { AccountArgs, CommonArgs, ConfigArgs, EnvironmentArgs, YargsCommandModule } from '../../types/Yargs.js';
|
|
2
2
|
export declare const command = "import-data";
|
|
3
3
|
export declare const describe: string;
|
|
4
|
-
type CrmImportDataArgs = CommonArgs & ConfigArgs & AccountArgs & EnvironmentArgs & {
|
|
4
|
+
export type CrmImportDataArgs = CommonArgs & ConfigArgs & AccountArgs & EnvironmentArgs & {
|
|
5
5
|
filePath: string | undefined;
|
|
6
6
|
skipConfirm: boolean | undefined;
|
|
7
7
|
};
|
package/lang/en.d.ts
CHANGED
|
@@ -1330,11 +1330,18 @@ export declare const commands: {
|
|
|
1330
1330
|
vsCode: string;
|
|
1331
1331
|
args: {
|
|
1332
1332
|
client: string;
|
|
1333
|
+
standalone: string;
|
|
1334
|
+
cliVersion: string;
|
|
1333
1335
|
docsSearch: string;
|
|
1334
1336
|
};
|
|
1337
|
+
examples: {
|
|
1338
|
+
nonInteractive: string;
|
|
1339
|
+
standalone: string;
|
|
1340
|
+
};
|
|
1335
1341
|
success: (derivedTargets: string[]) => string;
|
|
1336
1342
|
errors: {
|
|
1337
1343
|
errorParsingJsonFIle: (filename: string, errorMessage: string) => string;
|
|
1344
|
+
cliVersionRequiresStandalone: string;
|
|
1338
1345
|
};
|
|
1339
1346
|
spinners: {
|
|
1340
1347
|
failedToConfigure: string;
|
|
@@ -1429,6 +1436,7 @@ export declare const commands: {
|
|
|
1429
1436
|
describe: string;
|
|
1430
1437
|
verboseDescribe: string;
|
|
1431
1438
|
example: string;
|
|
1439
|
+
exampleCopyFrom: string;
|
|
1432
1440
|
logs: {
|
|
1433
1441
|
copyExistingProfile: (profileName: string) => string;
|
|
1434
1442
|
copyExistingProfiles: string;
|
|
@@ -1452,6 +1460,7 @@ export declare const commands: {
|
|
|
1452
1460
|
invalidTargetAccount: string;
|
|
1453
1461
|
noAccountsConfigured: string;
|
|
1454
1462
|
failedToLoadProfile: (profileName: string) => string;
|
|
1463
|
+
copyFromProfileNotFound: (profileName: string) => string;
|
|
1455
1464
|
failedToCreateProfile: string;
|
|
1456
1465
|
};
|
|
1457
1466
|
positionals: {
|
|
@@ -1459,6 +1468,7 @@ export declare const commands: {
|
|
|
1459
1468
|
};
|
|
1460
1469
|
options: {
|
|
1461
1470
|
targetAccount: string;
|
|
1471
|
+
copyFrom: string;
|
|
1462
1472
|
};
|
|
1463
1473
|
};
|
|
1464
1474
|
delete: {
|
|
@@ -1493,26 +1503,19 @@ export declare const commands: {
|
|
|
1493
1503
|
describe: string;
|
|
1494
1504
|
logs: {
|
|
1495
1505
|
header: string;
|
|
1496
|
-
placeholderAccountSelection: string;
|
|
1497
|
-
accountTypeInformation: string;
|
|
1498
1506
|
learnMoreMessageV2: string;
|
|
1499
|
-
learnMoreMessageLegacy: string;
|
|
1500
1507
|
profileProjectAccountExplanation: (accountId: number, profileName: string) => string;
|
|
1501
1508
|
defaultProjectAccountExplanation: (accountId: number) => string;
|
|
1502
1509
|
projectAccountFlagExplanation: (accountId: number) => string;
|
|
1503
|
-
accountFlagExplanation: (accountId: number) => string;
|
|
1504
1510
|
defaultSandboxOrDevTestTestingAccountExplanation: (accountId: number) => string;
|
|
1505
1511
|
testingAccountFlagExplanation: (accountId: number) => string;
|
|
1506
1512
|
};
|
|
1507
1513
|
errors: {
|
|
1508
1514
|
noProjectConfig: string;
|
|
1509
1515
|
noAccount: (accountId: number) => string;
|
|
1510
|
-
|
|
1511
|
-
invalidProjectComponents: string;
|
|
1516
|
+
unsupportedPlatformVersion: (platformVersion: string) => string;
|
|
1512
1517
|
noRunnableComponents: string;
|
|
1513
1518
|
accountNotCombined: string;
|
|
1514
|
-
unsupportedAccountFlagLegacy: string;
|
|
1515
|
-
unsupportedAccountFlagV2: string;
|
|
1516
1519
|
localDevAlreadyRunning: string;
|
|
1517
1520
|
};
|
|
1518
1521
|
examples: {
|
|
@@ -1525,7 +1528,6 @@ export declare const commands: {
|
|
|
1525
1528
|
profile: string;
|
|
1526
1529
|
projectAccount: string;
|
|
1527
1530
|
testingAccount: string;
|
|
1528
|
-
account: string;
|
|
1529
1531
|
port: string;
|
|
1530
1532
|
};
|
|
1531
1533
|
};
|
|
@@ -1713,7 +1715,9 @@ export declare const commands: {
|
|
|
1713
1715
|
errors: {
|
|
1714
1716
|
deploy: string;
|
|
1715
1717
|
noBuilds: string;
|
|
1718
|
+
noSuccessfulBuilds: string;
|
|
1716
1719
|
noBuildId: string;
|
|
1720
|
+
notSupportedForBuildVersion: string;
|
|
1717
1721
|
projectNotFound: (accountId: number, projectName: string) => string;
|
|
1718
1722
|
buildIdDoesNotExist: (accountId: number, buildId: number, projectName: string) => string;
|
|
1719
1723
|
buildAlreadyDeployed: (accountId: number, buildId: number, projectName: string) => string;
|
|
@@ -1744,11 +1748,20 @@ export declare const commands: {
|
|
|
1744
1748
|
confirmPrompt: (projectName: string, buildId: number) => string;
|
|
1745
1749
|
success: (releaseTag: string, buildId: number) => string;
|
|
1746
1750
|
cancelled: string;
|
|
1751
|
+
buildIdPrompt: string;
|
|
1752
|
+
noUploadMessage: string;
|
|
1753
|
+
buildStatus: {
|
|
1754
|
+
BUILDING: string;
|
|
1755
|
+
FAILURE: string;
|
|
1756
|
+
PENDING: string;
|
|
1757
|
+
PREPARING: string;
|
|
1758
|
+
};
|
|
1759
|
+
uploadPrompt: (projectName: string) => string;
|
|
1747
1760
|
errors: {
|
|
1748
1761
|
projectNotFound: (accountId: number, projectName: string) => string;
|
|
1749
|
-
noDeployedBuild: string;
|
|
1750
1762
|
buildNotFound: (buildId: number, projectName: string) => string;
|
|
1751
|
-
|
|
1763
|
+
noSuccessfulBuilds: (projectName: string) => string;
|
|
1764
|
+
incompatibleBuildVersion: string;
|
|
1752
1765
|
};
|
|
1753
1766
|
options: {
|
|
1754
1767
|
build: string;
|
|
@@ -1880,6 +1893,8 @@ export declare const commands: {
|
|
|
1880
1893
|
readyToGoLive: string;
|
|
1881
1894
|
runCommand: (command: string) => string;
|
|
1882
1895
|
autoDeployDisabled: (deployCommand: string) => string;
|
|
1896
|
+
autoDeploySkipped: (deployCommand: string) => string;
|
|
1897
|
+
releaseManagementRequired: (releaseCommand: string) => string;
|
|
1883
1898
|
};
|
|
1884
1899
|
errors: {
|
|
1885
1900
|
noProjectConfig: string;
|
|
@@ -3330,6 +3345,10 @@ export declare const lib: {
|
|
|
3330
3345
|
handlerLogFile: {
|
|
3331
3346
|
saved: (filePath: string) => string;
|
|
3332
3347
|
};
|
|
3348
|
+
jsonSchema: {
|
|
3349
|
+
noSchemaForCommand: string;
|
|
3350
|
+
validationFailed: string;
|
|
3351
|
+
};
|
|
3333
3352
|
DevServerManager: {
|
|
3334
3353
|
portConflict: (port: string) => string;
|
|
3335
3354
|
notInitialized: string;
|
|
@@ -3475,19 +3494,6 @@ export declare const lib: {
|
|
|
3475
3494
|
};
|
|
3476
3495
|
};
|
|
3477
3496
|
account: {
|
|
3478
|
-
checkIfDefaultAccountIsSupported: {
|
|
3479
|
-
publicApp: string;
|
|
3480
|
-
privateApp: string;
|
|
3481
|
-
};
|
|
3482
|
-
validateAccountOption: {
|
|
3483
|
-
invalidPublicAppAccount: string;
|
|
3484
|
-
invalidPrivateAppAccount: string;
|
|
3485
|
-
nonSandboxWarning: string;
|
|
3486
|
-
publicAppNonDeveloperTestAccountWarning: string;
|
|
3487
|
-
};
|
|
3488
|
-
checkIfParentAccountIsAuthed: {
|
|
3489
|
-
notAuthedError: (parentAccountId: number | string, accountIdentifier: string) => string;
|
|
3490
|
-
};
|
|
3491
3497
|
selectAccountTypePrompt: {
|
|
3492
3498
|
message: string;
|
|
3493
3499
|
developerTestAccountOption: string;
|
|
@@ -3495,10 +3501,7 @@ export declare const lib: {
|
|
|
3495
3501
|
sandboxAccountOptionDisabled: string;
|
|
3496
3502
|
productionAccountOption: (accountId?: number) => string;
|
|
3497
3503
|
};
|
|
3498
|
-
|
|
3499
|
-
configError: string;
|
|
3500
|
-
declineDefaultAccountExplanation: string;
|
|
3501
|
-
};
|
|
3504
|
+
declineDefaultAccountExplanation: string;
|
|
3502
3505
|
};
|
|
3503
3506
|
};
|
|
3504
3507
|
middleware: {
|
|
@@ -3821,6 +3824,7 @@ export declare const lib: {
|
|
|
3821
3824
|
qa: string;
|
|
3822
3825
|
useEnv: string;
|
|
3823
3826
|
jsonOutput: string;
|
|
3827
|
+
jsonSchema: string;
|
|
3824
3828
|
debug: string;
|
|
3825
3829
|
};
|
|
3826
3830
|
};
|
package/lang/en.js
CHANGED
|
@@ -1339,11 +1339,18 @@ export const commands = {
|
|
|
1339
1339
|
vsCode: 'VSCode',
|
|
1340
1340
|
args: {
|
|
1341
1341
|
client: 'Target apps to configure',
|
|
1342
|
+
standalone: 'Use npx for all of the hs commands run by the MCP server. This allows you to use the MCP server without having the CLI globally installed.',
|
|
1343
|
+
cliVersion: 'Pin a specific CLI version for standalone mode',
|
|
1342
1344
|
docsSearch: 'Should the docs search mcp server be installed',
|
|
1343
1345
|
},
|
|
1346
|
+
examples: {
|
|
1347
|
+
nonInteractive: 'Configure Claude Code without prompts',
|
|
1348
|
+
standalone: 'Configure Cursor in standalone mode with a pinned CLI version',
|
|
1349
|
+
},
|
|
1344
1350
|
success: (derivedTargets) => `You can now use the HubSpot CLI MCP Server in ${derivedTargets.join(', ')}. ${chalk.bold('You may need to restart these tools to apply the changes')}.`,
|
|
1345
1351
|
errors: {
|
|
1346
1352
|
errorParsingJsonFIle: (filename, errorMessage) => `Unable to update ${chalk.bold(filename)} due to invalid JSON: ${errorMessage}`,
|
|
1353
|
+
cliVersionRequiresStandalone: '`--cli-version` requires `--standalone`. Pass `--standalone` to use a specific CLI version.',
|
|
1347
1354
|
},
|
|
1348
1355
|
spinners: {
|
|
1349
1356
|
failedToConfigure: 'Failed to configure the HubSpot mcp server.',
|
|
@@ -1444,6 +1451,7 @@ export const commands = {
|
|
|
1444
1451
|
describe: 'Add a new project profile',
|
|
1445
1452
|
verboseDescribe: `Add a new project profile\n\nProfiles enable you to reference variables in your component configuration files. Use the syntax ${chalk.bold('\${VARIABLE_NAME}')} to reference profile variables in your component configuration files. Then target the profile using the ${uiCommandReference('--profile')} flag when you upload your project.`,
|
|
1446
1453
|
example: 'Add a new project profile named hsprofile.qa.json',
|
|
1454
|
+
exampleCopyFrom: 'Add a profile and copy variables from the staging profile',
|
|
1447
1455
|
logs: {
|
|
1448
1456
|
copyExistingProfile: (profileName) => `Found an existing profile. We can copy the variables from ${chalk.bold(profileName)} into your new profile.`,
|
|
1449
1457
|
copyExistingProfiles: 'We can copy the variables from one of your existing profiles into your new profile.',
|
|
@@ -1467,6 +1475,7 @@ export const commands = {
|
|
|
1467
1475
|
invalidTargetAccount: 'Target account is not configured in the CLI',
|
|
1468
1476
|
noAccountsConfigured: 'No accounts configured in the CLI',
|
|
1469
1477
|
failedToLoadProfile: (profileName) => `Unable to copy variables. Failed to load profile ${chalk.bold(profileName)}`,
|
|
1478
|
+
copyFromProfileNotFound: (profileName) => `Profile ${chalk.bold(profileName)} does not exist. Available profiles can be found in your project source directory.`,
|
|
1470
1479
|
failedToCreateProfile: 'Failed to create profile',
|
|
1471
1480
|
},
|
|
1472
1481
|
positionals: {
|
|
@@ -1474,6 +1483,7 @@ export const commands = {
|
|
|
1474
1483
|
},
|
|
1475
1484
|
options: {
|
|
1476
1485
|
targetAccount: 'The target account ID for this profile',
|
|
1486
|
+
copyFrom: 'Copy variables from an existing profile',
|
|
1477
1487
|
},
|
|
1478
1488
|
},
|
|
1479
1489
|
delete: {
|
|
@@ -1508,26 +1518,19 @@ export const commands = {
|
|
|
1508
1518
|
describe: 'Start local dev for the current project.',
|
|
1509
1519
|
logs: {
|
|
1510
1520
|
header: 'HubSpot projects local development',
|
|
1511
|
-
placeholderAccountSelection: 'Using default account as target account (for now)',
|
|
1512
|
-
accountTypeInformation: 'Testing in a developer test account is strongly recommended, but you can use a sandbox account if your plan allows you to create one.',
|
|
1513
1521
|
learnMoreMessageV2: `Learn more about ${uiLink('HubSpot projects local dev', 'https://developers.hubspot.com/docs/developer-tooling/local-development/hubspot-cli/project-commands#start-a-local-development-server')} | ${uiLink('HubSpot account types', 'https://developers.hubspot.com/docs/getting-started/account-types')}`,
|
|
1514
|
-
learnMoreMessageLegacy: uiLink('Learn more about the projects local dev server', 'https://developers.hubspot.com/docs/developer-tooling/local-development/hubspot-cli/project-commands#start-a-local-development-server'),
|
|
1515
1522
|
profileProjectAccountExplanation: (accountId, profileName) => `Using account ${uiAccountDescription(accountId)} from profile ${chalk.bold(profileName)} for project upload`,
|
|
1516
1523
|
defaultProjectAccountExplanation: (accountId) => `Using default account ${uiAccountDescription(accountId)} for project upload`,
|
|
1517
1524
|
projectAccountFlagExplanation: (accountId) => `Using account ${uiAccountDescription(accountId)} provided by the --project-account flag for project upload`,
|
|
1518
|
-
accountFlagExplanation: (accountId) => `Using account ${uiAccountDescription(accountId)} provided by the --account flag for project upload`,
|
|
1519
1525
|
defaultSandboxOrDevTestTestingAccountExplanation: (accountId) => `Using default account ${uiAccountDescription(accountId)} for testing`,
|
|
1520
1526
|
testingAccountFlagExplanation: (accountId) => `Using account ${uiAccountDescription(accountId)} provided by the --testing-account flag for testing`,
|
|
1521
1527
|
},
|
|
1522
1528
|
errors: {
|
|
1523
1529
|
noProjectConfig: 'No project detected. Please run this command again from a project directory.',
|
|
1524
1530
|
noAccount: (accountId) => `An error occurred while reading account ${uiAccountDescription(accountId)} from your config. Run ${uiAuthCommandReference()} to re-auth this account.`,
|
|
1525
|
-
|
|
1526
|
-
invalidProjectComponents: 'Projects cannot contain both private and public apps. Move your apps to separate projects before attempting local development.',
|
|
1531
|
+
unsupportedPlatformVersion: (platformVersion) => `Local development is not supported for platform version ${chalk.bold(platformVersion)}. Please upgrade to 2025.2 or later.`,
|
|
1527
1532
|
noRunnableComponents: `No supported components were found in this project. Run ${uiCommandReference('hs project add')} to see a list of available components and add one to your project.`,
|
|
1528
1533
|
accountNotCombined: `\nLocal development of unified apps is currently only compatible with accounts that are opted into the unified apps beta. Make sure that this account is opted in or switch accounts using ${uiCommandReference('hs account use')}.`,
|
|
1529
|
-
unsupportedAccountFlagLegacy: 'The --project-account and --testing-account flags are not supported for projects with platform versions earlier than 2025.2.',
|
|
1530
|
-
unsupportedAccountFlagV2: 'The --account flag is not supported for projects with platform versions 2025.2 and newer. Use --testing-account and --project-account flags to specify accounts to use for local dev',
|
|
1531
1534
|
localDevAlreadyRunning: `Another ${uiCommandReference('hs project dev')} process is already running. To proceed with local development of this project, stop the existing process and re-run ${uiCommandReference('hs project dev')}.`,
|
|
1532
1535
|
},
|
|
1533
1536
|
examples: {
|
|
@@ -1538,9 +1541,8 @@ export const commands = {
|
|
|
1538
1541
|
},
|
|
1539
1542
|
options: {
|
|
1540
1543
|
profile: 'The profile to target during local dev',
|
|
1541
|
-
projectAccount: 'The id of the account to upload your project to. Must be used with --testing-account.
|
|
1542
|
-
testingAccount: 'The id of the account to install apps and test on. Must be used with --project-account.
|
|
1543
|
-
account: 'The id of the account to upload your project to. Unsupported on platform versions 2025.2 and newer.',
|
|
1544
|
+
projectAccount: 'The id of the account to upload your project to. Must be used with --testing-account.',
|
|
1545
|
+
testingAccount: 'The id of the account to install apps and test on. Must be used with --project-account.',
|
|
1544
1546
|
port: `The port for the local dev server. Defaults to ${LOCAL_DEV_DEFAULT_PORT}.`,
|
|
1545
1547
|
},
|
|
1546
1548
|
},
|
|
@@ -1728,7 +1730,9 @@ export const commands = {
|
|
|
1728
1730
|
errors: {
|
|
1729
1731
|
deploy: 'Deploy error: an unknown error occurred.',
|
|
1730
1732
|
noBuilds: 'Deploy error: no builds for this project were found.',
|
|
1733
|
+
noSuccessfulBuilds: 'Deploy error: no successful builds for this project were found.',
|
|
1731
1734
|
noBuildId: 'You must specify a build to deploy',
|
|
1735
|
+
notSupportedForBuildVersion: `This build's platform version does not support deploy. Run ${uiCommandReference('hs project release create')} to create a release instead.`,
|
|
1732
1736
|
projectNotFound: (accountId, projectName) => `The project ${chalk.bold(projectName)} does not exist in account ${uiAccountDescription(accountId)}. Run ${uiCommandReference('hs project upload')} to upload your project files to HubSpot.`,
|
|
1733
1737
|
buildIdDoesNotExist: (accountId, buildId, projectName) => `Build ${buildId} does not exist for project ${chalk.bold(projectName)}. Run ${uiCommandReference('hs project list-builds')} to view existing builds for this project.`,
|
|
1734
1738
|
buildAlreadyDeployed: (accountId, buildId, projectName) => `Build ${buildId} is already deployed. ${uiLink('View project builds in HubSpot', getProjectDetailUrl(projectName, accountId))}`,
|
|
@@ -1739,7 +1743,7 @@ export const commands = {
|
|
|
1739
1743
|
deployIssueComponentWarning: (uid, componentTypeName, message) => `- [${mapToUserFriendlyName(componentTypeName)}] ${chalk.bold('(' + uid + ')')} ${message}`,
|
|
1740
1744
|
},
|
|
1741
1745
|
examples: {
|
|
1742
|
-
default: 'Deploy the
|
|
1746
|
+
default: 'Deploy the last successful build of the current project',
|
|
1743
1747
|
withOptions: 'Deploy build 5 of the project my-project',
|
|
1744
1748
|
withProfile: 'Deploy using the provided profile',
|
|
1745
1749
|
},
|
|
@@ -1748,29 +1752,38 @@ export const commands = {
|
|
|
1748
1752
|
project: 'Project name',
|
|
1749
1753
|
profile: 'The profile to target with this deploy',
|
|
1750
1754
|
force: 'Skip warnings and force deploy. Use this carefully as it will bypass warnings for destructive actions.',
|
|
1751
|
-
deployLatestBuild: 'Deploy the
|
|
1755
|
+
deployLatestBuild: 'Deploy the last successful build of the current project',
|
|
1752
1756
|
},
|
|
1753
1757
|
},
|
|
1754
1758
|
release: {
|
|
1755
1759
|
describe: 'Manage project releases.',
|
|
1756
1760
|
create: {
|
|
1757
1761
|
describe: 'Create a release for a project build.',
|
|
1758
|
-
verboseDescribe: `Create a release for a project build\n\nReleases mark
|
|
1762
|
+
verboseDescribe: `Create a release for a project build\n\nReleases mark an uploaded build with an auto-generated semantic version tag (e.g. v1.0.0).\n\nBy default, the latest build is used. Use ${uiCommandReference('--build')} to specify a different build ID.`,
|
|
1759
1763
|
confirmPrompt: (projectName, buildId) => `Create a release for project ${chalk.bold(projectName)} using build ${chalk.bold(String(buildId))}?`,
|
|
1760
1764
|
success: (releaseTag, buildId) => `Release ${chalk.bold(releaseTag)} created for build ${chalk.bold(String(buildId))}.`,
|
|
1761
1765
|
cancelled: 'Release creation cancelled.',
|
|
1766
|
+
buildIdPrompt: '[--build] Select a successful build to release:',
|
|
1767
|
+
noUploadMessage: 'No upload message',
|
|
1768
|
+
buildStatus: {
|
|
1769
|
+
BUILDING: 'Build in progress',
|
|
1770
|
+
FAILURE: 'Build failed',
|
|
1771
|
+
PENDING: 'Pending',
|
|
1772
|
+
PREPARING: 'Preparing',
|
|
1773
|
+
},
|
|
1774
|
+
uploadPrompt: (projectName) => `No successful builds for project ${chalk.bold(projectName)}. Would you like to upload it?`,
|
|
1762
1775
|
errors: {
|
|
1763
1776
|
projectNotFound: (accountId, projectName) => `The project ${chalk.bold(projectName)} does not exist in account ${uiAccountDescription(accountId)}. Run ${uiCommandReference('hs project upload')} to upload your project files to HubSpot.`,
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1777
|
+
buildNotFound: (buildId, projectName) => `Build ${chalk.bold(String(buildId))} was not found for project ${chalk.bold(projectName)}. Run ${uiCommandReference('hs project list-builds')} to view existing builds or ${uiCommandReference('hs project upload')} to upload a build first.`,
|
|
1778
|
+
noSuccessfulBuilds: (projectName) => `No successful builds found for project ${chalk.bold(projectName)}. Run ${uiCommandReference('hs project upload')} to create a new build.`,
|
|
1779
|
+
incompatibleBuildVersion: `This build's platform version does not support releases. Upgrade your project to a newer platform version to use releases.`,
|
|
1767
1780
|
},
|
|
1768
1781
|
options: {
|
|
1769
|
-
build: 'Build ID to release. Defaults to the latest
|
|
1770
|
-
force: 'Skip confirmation
|
|
1782
|
+
build: 'Build ID to release. Defaults to the latest build.',
|
|
1783
|
+
force: 'Skip all confirmation prompts, including automatic upload when no build exists.',
|
|
1771
1784
|
},
|
|
1772
1785
|
examples: {
|
|
1773
|
-
default: 'Create a release for the latest
|
|
1786
|
+
default: 'Create a release for the latest build',
|
|
1774
1787
|
withBuild: 'Create a release for a specific build',
|
|
1775
1788
|
},
|
|
1776
1789
|
},
|
|
@@ -1895,6 +1908,8 @@ export const commands = {
|
|
|
1895
1908
|
readyToGoLive: '🚀 Ready to take your project live?',
|
|
1896
1909
|
runCommand: (command) => `Run \`${uiCommandReference(command)}\``,
|
|
1897
1910
|
autoDeployDisabled: (deployCommand) => `Automatic deploys are disabled for this project. Run ${uiCommandReference(deployCommand)} to deploy this build.`,
|
|
1911
|
+
autoDeploySkipped: (deployCommand) => `Auto-deploy was skipped for this build. Run ${uiCommandReference(deployCommand)} to deploy this build.`,
|
|
1912
|
+
releaseManagementRequired: (releaseCommand) => `Run ${uiCommandReference(releaseCommand)} to create a release for this build.`,
|
|
1898
1913
|
},
|
|
1899
1914
|
errors: {
|
|
1900
1915
|
noProjectConfig: 'No project detected. Run this command from a project directory.',
|
|
@@ -3354,6 +3369,10 @@ export const lib = {
|
|
|
3354
3369
|
handlerLogFile: {
|
|
3355
3370
|
saved: (filePath) => `Debug logs can be viewed at ${filePath}`,
|
|
3356
3371
|
},
|
|
3372
|
+
jsonSchema: {
|
|
3373
|
+
noSchemaForCommand: 'No schema defined for this command',
|
|
3374
|
+
validationFailed: 'JSON output may be missing or malformed fields. The output schema may be out of date.',
|
|
3375
|
+
},
|
|
3357
3376
|
DevServerManager: {
|
|
3358
3377
|
portConflict: (port) => `The port ${port} is already in use.`,
|
|
3359
3378
|
notInitialized: 'The Dev Server Manager must be initialized before it is started.',
|
|
@@ -3511,19 +3530,6 @@ export const lib = {
|
|
|
3511
3530
|
},
|
|
3512
3531
|
},
|
|
3513
3532
|
account: {
|
|
3514
|
-
checkIfDefaultAccountIsSupported: {
|
|
3515
|
-
publicApp: `This project contains a public app. Local development of public apps is only supported on developer accounts and developer test accounts. Change your default account using ${uiCommandReference('hs account use')}, or link a new account with ${uiAuthCommandReference()}.`,
|
|
3516
|
-
privateApp: `This project contains a private app. Local development of private apps is not supported in developer accounts. Change your default account using ${uiCommandReference('hs account use')}, or link a new account with ${uiAuthCommandReference()}.`,
|
|
3517
|
-
},
|
|
3518
|
-
validateAccountOption: {
|
|
3519
|
-
invalidPublicAppAccount: `This project contains a public app. The "--account" flag must point to a developer test account to develop this project locally. Alternatively, change your default account to an app developer account using ${uiCommandReference('hs account use')} and run ${uiCommandReference('hs project dev')} to set up a new developer test account.`,
|
|
3520
|
-
invalidPrivateAppAccount: `This project contains a private app. The account specified with the "--account" flag points to a developer account, which do not support the local development of private apps. Update the "--account" flag to point to a standard, sandbox, or developer test account, or change your default account by running ${uiCommandReference('hs account use')}.`,
|
|
3521
|
-
nonSandboxWarning: `Testing in a sandbox is strongly recommended. To switch the target account, select an option below or run ${uiCommandReference('hs account use')} before running the command again.`,
|
|
3522
|
-
publicAppNonDeveloperTestAccountWarning: `Local development of public apps is only supported in ${chalk.bold('developer test accounts')}.`,
|
|
3523
|
-
},
|
|
3524
|
-
checkIfParentAccountIsAuthed: {
|
|
3525
|
-
notAuthedError: (parentAccountId, accountIdentifier) => `To develop this project locally, run ${uiAuthCommandReference({ accountId: parentAccountId })} to authenticate the App Developer Account ${parentAccountId} associated with ${accountIdentifier}.`,
|
|
3526
|
-
},
|
|
3527
3533
|
selectAccountTypePrompt: {
|
|
3528
3534
|
message: 'Choose the type of account to test on',
|
|
3529
3535
|
developerTestAccountOption: 'Test on a developer test account (recommended)',
|
|
@@ -3531,10 +3537,7 @@ export const lib = {
|
|
|
3531
3537
|
sandboxAccountOptionDisabled: 'Disabled - requires access to sandbox accounts',
|
|
3532
3538
|
productionAccountOption: (accountId) => `<${chalk.red('!')} Test on your project account: ${uiAccountDescription(accountId, false)} ${chalk.red('!')}>`,
|
|
3533
3539
|
},
|
|
3534
|
-
|
|
3535
|
-
configError: `An error occurred while reading the default account from your config. Run ${uiAuthCommandReference()} to re-auth this account`,
|
|
3536
|
-
declineDefaultAccountExplanation: `To develop on a different account, run ${uiCommandReference('hs account use')} to change your default account, then re-run ${uiCommandReference('hs project dev')}.`,
|
|
3537
|
-
},
|
|
3540
|
+
declineDefaultAccountExplanation: `To develop on a different account, run ${uiCommandReference('hs account use')} to change your default account, then re-run ${uiCommandReference('hs project dev')}.`,
|
|
3538
3541
|
},
|
|
3539
3542
|
},
|
|
3540
3543
|
middleware: {
|
|
@@ -3857,6 +3860,7 @@ export const lib = {
|
|
|
3857
3860
|
qa: 'Run command in QA mode',
|
|
3858
3861
|
useEnv: 'Use environment variable config',
|
|
3859
3862
|
jsonOutput: 'Format output as JSON',
|
|
3863
|
+
jsonSchema: 'Print the JSON output schema and exit',
|
|
3860
3864
|
debug: 'Set log level to debug',
|
|
3861
3865
|
},
|
|
3862
3866
|
},
|
package/lib/commonOpts.js
CHANGED
|
@@ -72,11 +72,16 @@ export function addUseEnvironmentOptions(yargs) {
|
|
|
72
72
|
return yargs;
|
|
73
73
|
}
|
|
74
74
|
export function addJSONOutputOptions(yargs) {
|
|
75
|
-
|
|
75
|
+
yargs.option('json', {
|
|
76
76
|
alias: 'format-output-as-json',
|
|
77
77
|
describe: lib.commonOpts.options.jsonOutput,
|
|
78
78
|
type: 'boolean',
|
|
79
79
|
});
|
|
80
|
+
yargs.option('json-schema', {
|
|
81
|
+
describe: lib.commonOpts.options.jsonSchema,
|
|
82
|
+
type: 'boolean',
|
|
83
|
+
});
|
|
84
|
+
return yargs;
|
|
80
85
|
}
|
|
81
86
|
// Remove this once we've upgraded to yargs 18.0.0
|
|
82
87
|
function uiBetaTagWithColor(message) {
|
package/lib/constants.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export declare const HUBSPOT_PROJECT_COMPONENTS_GITHUB_PATH: "HubSpot/hubspot-project-components";
|
|
2
|
+
export declare const MAX_LOG_FILES = 10;
|
|
2
3
|
export declare const DEFAULT_PROJECT_TEMPLATE_BRANCH: "main";
|
|
3
4
|
export declare const FEEDBACK_INTERVAL: 10;
|
|
4
5
|
export declare const HUBSPOT_FOLDER: "@hubspot";
|
package/lib/constants.js
CHANGED
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { Release } from '../api/releases.js';
|
|
3
|
+
declare const ReleaseComponentSchema: z.ZodObject<{
|
|
4
|
+
buildType: z.ZodString;
|
|
5
|
+
buildName: z.ZodOptional<z.ZodString>;
|
|
6
|
+
rootPath: z.ZodOptional<z.ZodString>;
|
|
7
|
+
id: z.ZodOptional<z.ZodString>;
|
|
8
|
+
}, z.core.$strip>;
|
|
9
|
+
export declare const ReleaseSchema: z.ZodObject<{
|
|
10
|
+
releaseTag: z.ZodString;
|
|
11
|
+
buildId: z.ZodNumber;
|
|
12
|
+
createdAt: z.ZodString;
|
|
13
|
+
components: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
14
|
+
buildType: z.ZodString;
|
|
15
|
+
buildName: z.ZodOptional<z.ZodString>;
|
|
16
|
+
rootPath: z.ZodOptional<z.ZodString>;
|
|
17
|
+
id: z.ZodOptional<z.ZodString>;
|
|
18
|
+
}, z.core.$strip>>>;
|
|
19
|
+
}, z.core.$strip>;
|
|
20
|
+
export declare const ReleaseListSchema: z.ZodObject<{
|
|
21
|
+
results: z.ZodArray<z.ZodObject<{
|
|
22
|
+
releaseTag: z.ZodString;
|
|
23
|
+
buildId: z.ZodNumber;
|
|
24
|
+
createdAt: z.ZodString;
|
|
25
|
+
components: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
26
|
+
buildType: z.ZodString;
|
|
27
|
+
buildName: z.ZodOptional<z.ZodString>;
|
|
28
|
+
rootPath: z.ZodOptional<z.ZodString>;
|
|
29
|
+
id: z.ZodOptional<z.ZodString>;
|
|
30
|
+
}, z.core.$strip>>>;
|
|
31
|
+
}, z.core.$strip>>;
|
|
32
|
+
paging: z.ZodOptional<z.ZodObject<{
|
|
33
|
+
next: z.ZodObject<{
|
|
34
|
+
after: z.ZodString;
|
|
35
|
+
}, z.core.$strip>;
|
|
36
|
+
}, z.core.$strip>>;
|
|
37
|
+
}, z.core.$strip>;
|
|
38
|
+
export declare const ProjectInfoSchema: z.ZodObject<{
|
|
39
|
+
projectName: z.ZodString;
|
|
40
|
+
platformVersion: z.ZodString;
|
|
41
|
+
projectId: z.ZodNumber;
|
|
42
|
+
deployedBuildId: z.ZodNumber;
|
|
43
|
+
autoDeployEnabled: z.ZodBoolean;
|
|
44
|
+
projectUrl: z.ZodOptional<z.ZodString>;
|
|
45
|
+
app: z.ZodOptional<z.ZodObject<{
|
|
46
|
+
name: z.ZodString;
|
|
47
|
+
id: z.ZodNumber;
|
|
48
|
+
uid: z.ZodString;
|
|
49
|
+
authType: z.ZodOptional<z.ZodString>;
|
|
50
|
+
distributionType: z.ZodOptional<z.ZodString>;
|
|
51
|
+
}, z.core.$strip>>;
|
|
52
|
+
components: z.ZodArray<z.ZodObject<{
|
|
53
|
+
uid: z.ZodString;
|
|
54
|
+
type: z.ZodString;
|
|
55
|
+
}, z.core.$strip>>;
|
|
56
|
+
}, z.core.$strip>;
|
|
57
|
+
declare const PreviewSchema: z.ZodObject<{
|
|
58
|
+
releaseTag: z.ZodOptional<z.ZodString>;
|
|
59
|
+
succeeded: z.ZodBoolean;
|
|
60
|
+
}, z.core.$strip>;
|
|
61
|
+
export declare const UploadSchema: z.ZodObject<{
|
|
62
|
+
buildId: z.ZodOptional<z.ZodNumber>;
|
|
63
|
+
deployId: z.ZodOptional<z.ZodNumber>;
|
|
64
|
+
preview: z.ZodOptional<z.ZodObject<{
|
|
65
|
+
releaseTag: z.ZodOptional<z.ZodString>;
|
|
66
|
+
succeeded: z.ZodBoolean;
|
|
67
|
+
}, z.core.$strip>>;
|
|
68
|
+
}, z.core.$strip>;
|
|
69
|
+
export declare const DeploySchema: z.ZodObject<{
|
|
70
|
+
deployId: z.ZodOptional<z.ZodNumber>;
|
|
71
|
+
}, z.core.$strip>;
|
|
72
|
+
export declare const InstallStatusSchema: z.ZodObject<{
|
|
73
|
+
appId: z.ZodOptional<z.ZodNumber>;
|
|
74
|
+
appUid: z.ZodString;
|
|
75
|
+
accountId: z.ZodNumber;
|
|
76
|
+
projectId: z.ZodNumber;
|
|
77
|
+
isInstalled: z.ZodBoolean;
|
|
78
|
+
isInstalledWithCurrentScopes: z.ZodBoolean;
|
|
79
|
+
previouslyAuthorizedScopeGroups: z.ZodArray<z.ZodObject<{
|
|
80
|
+
id: z.ZodNumber;
|
|
81
|
+
name: z.ZodString;
|
|
82
|
+
}, z.core.$strip>>;
|
|
83
|
+
}, z.core.$strip>;
|
|
84
|
+
export declare const InstallAppSchema: z.ZodObject<{
|
|
85
|
+
appId: z.ZodNumber;
|
|
86
|
+
appUid: z.ZodString;
|
|
87
|
+
accountId: z.ZodNumber;
|
|
88
|
+
projectId: z.ZodNumber;
|
|
89
|
+
installationState: z.ZodString;
|
|
90
|
+
installed: z.ZodBoolean;
|
|
91
|
+
reinstalled: z.ZodBoolean;
|
|
92
|
+
}, z.core.$strip>;
|
|
93
|
+
export declare const CreateTestAccountSchema: z.ZodObject<{
|
|
94
|
+
accountName: z.ZodOptional<z.ZodString>;
|
|
95
|
+
accountId: z.ZodOptional<z.ZodNumber>;
|
|
96
|
+
personalAccessKey: z.ZodOptional<z.ZodString>;
|
|
97
|
+
}, z.core.$strip>;
|
|
98
|
+
export type ReleaseComponentJsonOutput = z.infer<typeof ReleaseComponentSchema>;
|
|
99
|
+
export type ReleaseJsonOutput = z.infer<typeof ReleaseSchema>;
|
|
100
|
+
export type ReleaseListJsonOutput = z.infer<typeof ReleaseListSchema>;
|
|
101
|
+
export type ProjectInfoJsonOutput = z.infer<typeof ProjectInfoSchema>;
|
|
102
|
+
export type PreviewJsonOutput = z.infer<typeof PreviewSchema>;
|
|
103
|
+
export type UploadJsonOutput = z.infer<typeof UploadSchema>;
|
|
104
|
+
export type DeployJsonOutput = z.infer<typeof DeploySchema>;
|
|
105
|
+
export type InstallStatusJsonOutput = z.infer<typeof InstallStatusSchema>;
|
|
106
|
+
export type InstallAppJsonOutput = z.infer<typeof InstallAppSchema>;
|
|
107
|
+
export type CreateTestAccountJsonOutput = z.infer<typeof CreateTestAccountSchema>;
|
|
108
|
+
export declare function mapReleaseToJsonOutput(release: Release): ReleaseJsonOutput;
|
|
109
|
+
export {};
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
const ReleaseComponentSchema = z.object({
|
|
3
|
+
buildType: z.string(),
|
|
4
|
+
buildName: z.string().optional(),
|
|
5
|
+
rootPath: z.string().optional(),
|
|
6
|
+
id: z.string().optional(),
|
|
7
|
+
});
|
|
8
|
+
export const ReleaseSchema = z.object({
|
|
9
|
+
releaseTag: z.string(),
|
|
10
|
+
buildId: z.number(),
|
|
11
|
+
createdAt: z.string(),
|
|
12
|
+
components: z.array(ReleaseComponentSchema).optional(),
|
|
13
|
+
});
|
|
14
|
+
export const ReleaseListSchema = z.object({
|
|
15
|
+
results: z.array(ReleaseSchema),
|
|
16
|
+
paging: z
|
|
17
|
+
.object({
|
|
18
|
+
next: z.object({
|
|
19
|
+
after: z.string(),
|
|
20
|
+
}),
|
|
21
|
+
})
|
|
22
|
+
.optional(),
|
|
23
|
+
});
|
|
24
|
+
export const ProjectInfoSchema = z.object({
|
|
25
|
+
projectName: z.string(),
|
|
26
|
+
platformVersion: z.string(),
|
|
27
|
+
projectId: z.number(),
|
|
28
|
+
deployedBuildId: z.number(),
|
|
29
|
+
autoDeployEnabled: z.boolean(),
|
|
30
|
+
projectUrl: z.string().optional(),
|
|
31
|
+
app: z
|
|
32
|
+
.object({
|
|
33
|
+
name: z.string(),
|
|
34
|
+
id: z.number(),
|
|
35
|
+
uid: z.string(),
|
|
36
|
+
authType: z.string().optional(),
|
|
37
|
+
distributionType: z.string().optional(),
|
|
38
|
+
})
|
|
39
|
+
.optional(),
|
|
40
|
+
components: z.array(z.object({ uid: z.string(), type: z.string() })),
|
|
41
|
+
});
|
|
42
|
+
const PreviewSchema = z.object({
|
|
43
|
+
releaseTag: z.string().optional(),
|
|
44
|
+
succeeded: z.boolean(),
|
|
45
|
+
});
|
|
46
|
+
export const UploadSchema = z.object({
|
|
47
|
+
buildId: z.number().optional(),
|
|
48
|
+
deployId: z.number().optional(),
|
|
49
|
+
preview: PreviewSchema.optional(),
|
|
50
|
+
});
|
|
51
|
+
export const DeploySchema = z.object({
|
|
52
|
+
deployId: z.number().optional(),
|
|
53
|
+
});
|
|
54
|
+
const ScopeGroupSchema = z.object({
|
|
55
|
+
id: z.number(),
|
|
56
|
+
name: z.string(),
|
|
57
|
+
});
|
|
58
|
+
export const InstallStatusSchema = z.object({
|
|
59
|
+
appId: z.number().optional(),
|
|
60
|
+
appUid: z.string(),
|
|
61
|
+
accountId: z.number(),
|
|
62
|
+
projectId: z.number(),
|
|
63
|
+
isInstalled: z.boolean(),
|
|
64
|
+
isInstalledWithCurrentScopes: z.boolean(),
|
|
65
|
+
previouslyAuthorizedScopeGroups: z.array(ScopeGroupSchema),
|
|
66
|
+
});
|
|
67
|
+
export const InstallAppSchema = z.object({
|
|
68
|
+
appId: z.number(),
|
|
69
|
+
appUid: z.string(),
|
|
70
|
+
accountId: z.number(),
|
|
71
|
+
projectId: z.number(),
|
|
72
|
+
installationState: z.string(),
|
|
73
|
+
installed: z.boolean(),
|
|
74
|
+
reinstalled: z.boolean(),
|
|
75
|
+
});
|
|
76
|
+
export const CreateTestAccountSchema = z.object({
|
|
77
|
+
accountName: z.string().optional(),
|
|
78
|
+
accountId: z.number().optional(),
|
|
79
|
+
personalAccessKey: z.string().optional(),
|
|
80
|
+
});
|
|
81
|
+
export function mapReleaseToJsonOutput(release) {
|
|
82
|
+
const { releaseTag, buildId, createdAt, components } = release;
|
|
83
|
+
return {
|
|
84
|
+
releaseTag,
|
|
85
|
+
buildId,
|
|
86
|
+
createdAt,
|
|
87
|
+
components: components?.map(({ buildType, buildName, rootPath, id }) => ({
|
|
88
|
+
buildType,
|
|
89
|
+
buildName,
|
|
90
|
+
rootPath,
|
|
91
|
+
id,
|
|
92
|
+
})),
|
|
93
|
+
};
|
|
94
|
+
}
|
package/lib/mcp/setup.d.ts
CHANGED
|
@@ -8,7 +8,12 @@ interface McpCommand {
|
|
|
8
8
|
args: string[];
|
|
9
9
|
env?: Record<string, string>;
|
|
10
10
|
}
|
|
11
|
-
|
|
11
|
+
interface ConfigureMcpServerOptions {
|
|
12
|
+
targets?: string[];
|
|
13
|
+
standalone?: boolean;
|
|
14
|
+
cliVersion?: string;
|
|
15
|
+
}
|
|
16
|
+
export declare function configureMcpServer(options: ConfigureMcpServerOptions): Promise<string[]>;
|
|
12
17
|
export declare function setupVsCode(mcpCommand?: McpCommand): Promise<boolean>;
|
|
13
18
|
export declare function setupClaudeCode(mcpCommand?: McpCommand): Promise<boolean>;
|
|
14
19
|
export declare function setupCursor(mcpCommand?: McpCommand): boolean;
|