@hubspot/cli 7.7.19-experimental.3 → 7.7.20-experimental.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/api/__tests__/migrate.test.d.ts +1 -0
- package/api/__tests__/migrate.test.js +183 -0
- package/commands/__tests__/account.test.d.ts +1 -0
- package/commands/__tests__/account.test.js +74 -0
- package/commands/__tests__/auth.test.d.ts +1 -0
- package/commands/__tests__/auth.test.js +43 -0
- package/commands/__tests__/cms.test.d.ts +1 -0
- package/commands/__tests__/cms.test.js +49 -0
- package/commands/__tests__/config.test.d.ts +1 -0
- package/commands/__tests__/config.test.js +49 -0
- package/commands/__tests__/create.test.d.ts +1 -0
- package/commands/__tests__/create.test.js +38 -0
- package/commands/__tests__/customObject.test.d.ts +1 -0
- package/commands/__tests__/customObject.test.js +54 -0
- package/commands/__tests__/doctor.test.d.ts +1 -0
- package/commands/__tests__/doctor.test.js +139 -0
- package/commands/__tests__/feedback.test.d.ts +1 -0
- package/commands/__tests__/feedback.test.js +62 -0
- package/commands/__tests__/fetch.test.d.ts +1 -0
- package/commands/__tests__/fetch.test.js +56 -0
- package/commands/__tests__/filemanager.test.d.ts +1 -0
- package/commands/__tests__/filemanager.test.js +50 -0
- package/commands/__tests__/function.test.d.ts +1 -0
- package/commands/__tests__/function.test.js +51 -0
- package/commands/__tests__/getStarted.test.d.ts +1 -0
- package/commands/__tests__/getStarted.test.js +170 -0
- package/commands/__tests__/hubdb.test.d.ts +1 -0
- package/commands/__tests__/hubdb.test.js +55 -0
- package/commands/__tests__/init.test.d.ts +1 -0
- package/commands/__tests__/init.test.js +47 -0
- package/commands/__tests__/lint.test.d.ts +1 -0
- package/commands/__tests__/lint.test.js +38 -0
- package/commands/__tests__/list.test.d.ts +1 -0
- package/commands/__tests__/list.test.js +47 -0
- package/commands/__tests__/logs.test.d.ts +1 -0
- package/commands/__tests__/logs.test.js +70 -0
- package/commands/__tests__/mcp.test.d.ts +1 -0
- package/commands/__tests__/mcp.test.js +51 -0
- package/commands/__tests__/mv.test.d.ts +1 -0
- package/commands/__tests__/mv.test.js +84 -0
- package/commands/__tests__/open.test.d.ts +1 -0
- package/commands/__tests__/open.test.js +96 -0
- package/commands/__tests__/project.test.d.ts +1 -0
- package/commands/__tests__/project.test.js +100 -0
- package/commands/__tests__/remove.test.d.ts +1 -0
- package/commands/__tests__/remove.test.js +77 -0
- package/commands/__tests__/sandbox.test.d.ts +1 -0
- package/commands/__tests__/sandbox.test.js +49 -0
- package/commands/__tests__/secret.test.d.ts +1 -0
- package/commands/__tests__/secret.test.js +54 -0
- package/commands/__tests__/testAccount.test.d.ts +1 -0
- package/commands/__tests__/testAccount.test.js +60 -0
- package/commands/__tests__/theme.test.d.ts +1 -0
- package/commands/__tests__/theme.test.js +52 -0
- package/commands/account/__tests__/auth.test.d.ts +1 -0
- package/commands/account/__tests__/auth.test.js +31 -0
- package/commands/account/__tests__/clean.test.d.ts +1 -0
- package/commands/account/__tests__/clean.test.js +33 -0
- package/commands/account/__tests__/createOverride.test.d.ts +1 -0
- package/commands/account/__tests__/createOverride.test.js +37 -0
- package/commands/account/__tests__/info.test.d.ts +1 -0
- package/commands/account/__tests__/info.test.js +33 -0
- package/commands/account/__tests__/list.test.d.ts +1 -0
- package/commands/account/__tests__/list.test.js +33 -0
- package/commands/account/__tests__/remove.test.d.ts +1 -0
- package/commands/account/__tests__/remove.test.js +41 -0
- package/commands/account/__tests__/removeOverride.d.ts +1 -0
- package/commands/account/__tests__/removeOverride.js +30 -0
- package/commands/account/__tests__/rename.test.d.ts +1 -0
- package/commands/account/__tests__/rename.test.js +47 -0
- package/commands/account/__tests__/use.test.d.ts +1 -0
- package/commands/account/__tests__/use.test.js +37 -0
- package/commands/app/__tests__/migrate.test.d.ts +1 -0
- package/commands/app/__tests__/migrate.test.js +129 -0
- package/commands/app/secret/__tests__/add.test.d.ts +1 -0
- package/commands/app/secret/__tests__/add.test.js +33 -0
- package/commands/app/secret/__tests__/delete.test.d.ts +1 -0
- package/commands/app/secret/__tests__/delete.test.js +33 -0
- package/commands/app/secret/__tests__/list.test.d.ts +1 -0
- package/commands/app/secret/__tests__/list.test.js +30 -0
- package/commands/app/secret/__tests__/update.test.d.ts +1 -0
- package/commands/app/secret/__tests__/update.test.js +33 -0
- package/commands/app.js +1 -6
- package/commands/customObject/__tests__/create.test.d.ts +1 -0
- package/commands/customObject/__tests__/create.test.js +45 -0
- package/commands/customObject/__tests__/schema.test.d.ts +1 -0
- package/commands/customObject/__tests__/schema.test.js +58 -0
- package/commands/customObject/schema/__tests__/create.test.d.ts +1 -0
- package/commands/customObject/schema/__tests__/create.test.js +33 -0
- package/commands/customObject/schema/__tests__/delete.test.d.ts +1 -0
- package/commands/customObject/schema/__tests__/delete.test.js +47 -0
- package/commands/customObject/schema/__tests__/fetch-all.test.d.ts +1 -0
- package/commands/customObject/schema/__tests__/fetch-all.test.js +46 -0
- package/commands/customObject/schema/__tests__/fetch.test.d.ts +1 -0
- package/commands/customObject/schema/__tests__/fetch.test.js +50 -0
- package/commands/customObject/schema/__tests__/list.test.d.ts +1 -0
- package/commands/customObject/schema/__tests__/list.test.js +34 -0
- package/commands/customObject/schema/__tests__/update.test.d.ts +1 -0
- package/commands/customObject/schema/__tests__/update.test.js +45 -0
- package/commands/fetch.js +0 -1
- package/commands/filemanager/__tests__/fetch.test.d.ts +1 -0
- package/commands/filemanager/__tests__/fetch.test.js +37 -0
- package/commands/filemanager/__tests__/upload.test.d.ts +1 -0
- package/commands/filemanager/__tests__/upload.test.js +35 -0
- package/commands/hubdb/__tests__/clear.test.d.ts +1 -0
- package/commands/hubdb/__tests__/clear.test.js +33 -0
- package/commands/hubdb/__tests__/create.test.d.ts +1 -0
- package/commands/hubdb/__tests__/create.test.js +33 -0
- package/commands/hubdb/__tests__/delete.test.d.ts +1 -0
- package/commands/hubdb/__tests__/delete.test.js +33 -0
- package/commands/hubdb/__tests__/fetch.test.d.ts +1 -0
- package/commands/hubdb/__tests__/fetch.test.js +33 -0
- package/commands/hubdb/__tests__/list.test.d.ts +1 -0
- package/commands/hubdb/__tests__/list.test.js +101 -0
- package/commands/logs.js +0 -1
- package/commands/mcp/__tests__/setup.test.d.ts +1 -0
- package/commands/mcp/__tests__/setup.test.js +31 -0
- package/commands/mcp/__tests__/start.test.d.ts +1 -0
- package/commands/mcp/__tests__/start.test.js +32 -0
- package/commands/project/__tests__/add.test.d.ts +1 -0
- package/commands/project/__tests__/add.test.js +48 -0
- package/commands/project/__tests__/create.test.d.ts +1 -0
- package/commands/project/__tests__/create.test.js +45 -0
- package/commands/project/__tests__/deploy.test.d.ts +1 -0
- package/commands/project/__tests__/deploy.test.js +344 -0
- package/commands/project/__tests__/devUnifiedFlow.test.d.ts +1 -0
- package/commands/project/__tests__/devUnifiedFlow.test.js +419 -0
- package/commands/project/__tests__/download.test.d.ts +1 -0
- package/commands/project/__tests__/download.test.js +44 -0
- package/commands/project/__tests__/fixtures/exampleProject.json +33 -0
- package/commands/project/__tests__/installDeps.test.d.ts +1 -0
- package/commands/project/__tests__/installDeps.test.js +180 -0
- package/commands/project/__tests__/listBuilds.test.d.ts +1 -0
- package/commands/project/__tests__/listBuilds.test.js +43 -0
- package/commands/project/__tests__/logs.test.d.ts +1 -0
- package/commands/project/__tests__/logs.test.js +246 -0
- package/commands/project/__tests__/migrate.test.d.ts +1 -0
- package/commands/project/__tests__/migrate.test.js +116 -0
- package/commands/project/__tests__/migrateApp.test.d.ts +1 -0
- package/commands/project/__tests__/migrateApp.test.js +87 -0
- package/commands/project/__tests__/open.test.d.ts +1 -0
- package/commands/project/__tests__/open.test.js +44 -0
- package/commands/project/__tests__/profile.test.d.ts +1 -0
- package/commands/project/__tests__/profile.test.js +47 -0
- package/commands/project/__tests__/upload.test.d.ts +1 -0
- package/commands/project/__tests__/upload.test.js +48 -0
- package/commands/project/__tests__/watch.test.d.ts +1 -0
- package/commands/project/__tests__/watch.test.js +40 -0
- package/commands/project/dev/unifiedFlow.js +1 -1
- package/commands/sandbox/__tests__/create.test.d.ts +1 -0
- package/commands/sandbox/__tests__/create.test.js +36 -0
- package/commands/sandbox/__tests__/delete.test.d.ts +1 -0
- package/commands/sandbox/__tests__/delete.test.js +36 -0
- package/commands/secret/__tests__/addSecret.test.d.ts +1 -0
- package/commands/secret/__tests__/addSecret.test.js +34 -0
- package/commands/secret/__tests__/deleteSecret.test.d.ts +1 -0
- package/commands/secret/__tests__/deleteSecret.test.js +46 -0
- package/commands/secret/__tests__/listSecret.test.d.ts +1 -0
- package/commands/secret/__tests__/listSecret.test.js +34 -0
- package/commands/secret/__tests__/updateSecret.test.d.ts +1 -0
- package/commands/secret/__tests__/updateSecret.test.js +34 -0
- package/commands/testAccount/__tests__/create.test.d.ts +1 -0
- package/commands/testAccount/__tests__/create.test.js +38 -0
- package/commands/testAccount/__tests__/createConfig.test.d.ts +1 -0
- package/commands/testAccount/__tests__/createConfig.test.js +40 -0
- package/commands/testAccount/__tests__/delete.test.d.ts +1 -0
- package/commands/testAccount/__tests__/delete.test.js +36 -0
- package/commands/testAccount/create.js +24 -14
- package/commands/theme/__tests__/generate-selectors.test.d.ts +1 -0
- package/commands/theme/__tests__/generate-selectors.test.js +33 -0
- package/commands/theme/__tests__/marketplace-validate.test.d.ts +1 -0
- package/commands/theme/__tests__/marketplace-validate.test.js +41 -0
- package/commands/theme/__tests__/preview.test.d.ts +1 -0
- package/commands/theme/__tests__/preview.test.js +65 -0
- package/lang/en.d.ts +6 -65
- package/lang/en.js +6 -65
- package/lib/__tests__/accountTypes.test.d.ts +1 -0
- package/lib/__tests__/accountTypes.test.js +100 -0
- package/lib/__tests__/buildAccount.test.d.ts +1 -0
- package/lib/__tests__/buildAccount.test.js +231 -0
- package/lib/__tests__/commonOpts.test.d.ts +1 -0
- package/lib/__tests__/commonOpts.test.js +87 -0
- package/lib/__tests__/dependencyManagement.test.d.ts +1 -0
- package/lib/__tests__/dependencyManagement.test.js +180 -0
- package/lib/__tests__/developerTestAccounts.test.d.ts +1 -0
- package/lib/__tests__/developerTestAccounts.test.js +180 -0
- package/lib/__tests__/hasFeature.test.d.ts +1 -0
- package/lib/__tests__/hasFeature.test.js +37 -0
- package/lib/__tests__/npm.test.d.ts +1 -0
- package/lib/__tests__/npm.test.js +62 -0
- package/lib/__tests__/oauth.test.d.ts +1 -0
- package/lib/__tests__/oauth.test.js +113 -0
- package/lib/__tests__/parsing.test.d.ts +1 -0
- package/lib/__tests__/parsing.test.js +36 -0
- package/lib/__tests__/polling.test.d.ts +1 -0
- package/lib/__tests__/polling.test.js +78 -0
- package/lib/__tests__/process.test.d.ts +1 -0
- package/lib/__tests__/process.test.js +90 -0
- package/lib/__tests__/projectProfiles.test.d.ts +1 -0
- package/lib/__tests__/projectProfiles.test.js +134 -0
- package/lib/__tests__/sandboxSync.test.d.ts +1 -0
- package/lib/__tests__/sandboxSync.test.js +131 -0
- package/lib/__tests__/sandboxes.test.d.ts +1 -0
- package/lib/__tests__/sandboxes.test.js +148 -0
- package/lib/__tests__/serverlessLogs.test.d.ts +1 -0
- package/lib/__tests__/serverlessLogs.test.js +154 -0
- package/lib/__tests__/usageTracking.test.d.ts +1 -0
- package/lib/__tests__/usageTracking.test.js +171 -0
- package/lib/__tests__/validation.test.d.ts +1 -0
- package/lib/__tests__/validation.test.js +145 -0
- package/lib/__tests__/yargsUtils.test.d.ts +1 -0
- package/lib/__tests__/yargsUtils.test.js +74 -0
- package/lib/app/__tests__/migrate.test.d.ts +1 -0
- package/lib/app/__tests__/migrate.test.js +495 -0
- package/lib/app/__tests__/migrate_legacy.test.d.ts +1 -0
- package/lib/app/__tests__/migrate_legacy.test.js +136 -0
- package/lib/buildAccount.d.ts +1 -7
- package/lib/buildAccount.js +4 -54
- package/lib/doctor/Diagnosis.js +11 -11
- package/lib/doctor/Doctor.js +42 -42
- package/lib/doctor/__tests__/Diagnosis.test.d.ts +1 -0
- package/lib/doctor/__tests__/Diagnosis.test.js +87 -0
- package/lib/doctor/__tests__/DiagnosticInfoBuilder.test.d.ts +1 -0
- package/lib/doctor/__tests__/DiagnosticInfoBuilder.test.js +172 -0
- package/lib/doctor/__tests__/Doctor.test.d.ts +1 -0
- package/lib/doctor/__tests__/Doctor.test.js +398 -0
- package/lib/mcp/setup.js +18 -2
- package/lib/middleware/__test__/configMiddleware.test.js +12 -12
- package/lib/middleware/__test__/gitMiddleware.test.js +4 -4
- package/lib/middleware/__test__/notificationsMiddleware.test.js +2 -2
- package/lib/middleware/__test__/requestMiddleware.test.js +2 -2
- package/lib/middleware/__test__/yargsChecksMiddleware.test.js +7 -7
- package/lib/middleware/notificationsMiddleware.js +16 -13
- package/lib/projects/__tests__/AppDevModeInterface.test.d.ts +1 -0
- package/lib/projects/__tests__/AppDevModeInterface.test.js +517 -0
- package/lib/projects/__tests__/LocalDevProcess.test.d.ts +1 -0
- package/lib/projects/__tests__/LocalDevProcess.test.js +314 -0
- package/lib/projects/__tests__/LocalDevWebsocketServer.test.d.ts +1 -0
- package/lib/projects/__tests__/LocalDevWebsocketServer.test.js +175 -0
- package/lib/projects/__tests__/ProjectLogsManager.test.d.ts +1 -0
- package/lib/projects/__tests__/ProjectLogsManager.test.js +191 -0
- package/lib/projects/__tests__/buildAndDeploy.test.d.ts +1 -0
- package/lib/projects/__tests__/buildAndDeploy.test.js +25 -0
- package/lib/projects/__tests__/components.test.d.ts +1 -0
- package/lib/projects/__tests__/components.test.js +186 -0
- package/lib/projects/__tests__/projects.test.d.ts +1 -0
- package/lib/projects/__tests__/projects.test.js +89 -0
- package/lib/projects/__tests__/structure.test.d.ts +1 -0
- package/lib/projects/__tests__/structure.test.js +249 -0
- package/lib/projects/add/__tests__/legacyAddComponent.test.d.ts +1 -0
- package/lib/projects/add/__tests__/legacyAddComponent.test.js +206 -0
- package/lib/projects/add/__tests__/v3AddComponent.test.d.ts +1 -0
- package/lib/projects/add/__tests__/v3AddComponent.test.js +190 -0
- package/lib/projects/create/__tests__/legacy.test.d.ts +1 -0
- package/lib/projects/create/__tests__/legacy.test.js +126 -0
- package/lib/projects/create/__tests__/v3.test.d.ts +1 -0
- package/lib/projects/create/__tests__/v3.test.js +80 -0
- package/lib/projects/localDev/DevServerManager.js +0 -1
- package/lib/projects/localDev/helpers.d.ts +1 -1
- package/lib/projects/localDev/helpers.js +2 -2
- package/lib/projects/structure.d.ts +2 -2
- package/lib/projects/upload.d.ts +1 -2
- package/lib/projects/upload.js +0 -1
- package/lib/prompts/__tests__/downloadProjectPrompt.test.d.ts +1 -0
- package/lib/prompts/__tests__/downloadProjectPrompt.test.js +30 -0
- package/lib/prompts/__tests__/projectsLogsPrompt.test.d.ts +1 -0
- package/lib/prompts/__tests__/projectsLogsPrompt.test.js +42 -0
- package/lib/prompts/createDeveloperTestAccountConfigPrompt.d.ts +10 -9
- package/lib/prompts/createDeveloperTestAccountConfigPrompt.js +43 -81
- package/lib/schema.js +5 -1
- package/lib/ui/SpinniesManager.js +0 -1
- package/lib/ui/supportHyperlinks.js +2 -2
- package/lib/ui/supportsColor.js +2 -2
- package/lib/utils/hasFlag.d.ts +1 -0
- package/lib/utils/hasFlag.js +15 -0
- package/lib/yargsUtils.d.ts +2 -1
- package/lib/yargsUtils.js +3 -13
- package/mcp-server/tools/project/__tests__/AddFeatureToProject.test.d.ts +1 -0
- package/mcp-server/tools/project/__tests__/AddFeatureToProject.test.js +152 -0
- package/mcp-server/tools/project/__tests__/CreateProjectTool.test.d.ts +1 -0
- package/mcp-server/tools/project/__tests__/CreateProjectTool.test.js +129 -0
- package/mcp-server/tools/project/__tests__/DeployProject.test.d.ts +1 -0
- package/mcp-server/tools/project/__tests__/DeployProject.test.js +120 -0
- package/mcp-server/tools/project/__tests__/GuidedWalkthroughTool.test.d.ts +1 -0
- package/mcp-server/tools/project/__tests__/GuidedWalkthroughTool.test.js +127 -0
- package/mcp-server/tools/project/__tests__/UploadProjectTools.test.d.ts +1 -0
- package/mcp-server/tools/project/__tests__/UploadProjectTools.test.js +108 -0
- package/mcp-server/tools/project/__tests__/ValidateProjectTool.test.d.ts +1 -0
- package/mcp-server/tools/project/__tests__/ValidateProjectTool.test.js +111 -0
- package/mcp-server/utils/__tests__/command.test.d.ts +1 -0
- package/mcp-server/utils/__tests__/command.test.js +47 -0
- package/mcp-server/utils/__tests__/project.test.d.ts +1 -0
- package/mcp-server/utils/__tests__/project.test.js +81 -0
- package/package.json +8 -8
- package/commands/app/install.d.ts +0 -8
- package/commands/app/install.js +0 -127
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const yargs_1 = __importDefault(require("yargs"));
|
|
7
|
+
const commonOpts_1 = require("../../../lib/commonOpts");
|
|
8
|
+
const delete_1 = __importDefault(require("../delete"));
|
|
9
|
+
vi.mock('../../../lib/commonOpts');
|
|
10
|
+
describe('commands/testAccount/delete', () => {
|
|
11
|
+
const yargsMock = yargs_1.default;
|
|
12
|
+
describe('command', () => {
|
|
13
|
+
it('should have the correct command structure', () => {
|
|
14
|
+
expect(delete_1.default.command).toEqual('delete <test-account-id>');
|
|
15
|
+
});
|
|
16
|
+
});
|
|
17
|
+
describe('describe', () => {
|
|
18
|
+
it('should provide a description', () => {
|
|
19
|
+
expect(delete_1.default.describe).toBeDefined();
|
|
20
|
+
});
|
|
21
|
+
});
|
|
22
|
+
describe('builder', () => {
|
|
23
|
+
it('should support the correct options', () => {
|
|
24
|
+
delete_1.default.builder(yargsMock);
|
|
25
|
+
expect(yargsMock.example).toHaveBeenCalledTimes(1);
|
|
26
|
+
expect(commonOpts_1.addTestingOptions).toHaveBeenCalledTimes(1);
|
|
27
|
+
expect(commonOpts_1.addTestingOptions).toHaveBeenCalledWith(yargsMock);
|
|
28
|
+
expect(commonOpts_1.addAccountOptions).toHaveBeenCalledTimes(1);
|
|
29
|
+
expect(commonOpts_1.addAccountOptions).toHaveBeenCalledWith(yargsMock);
|
|
30
|
+
expect(commonOpts_1.addConfigOptions).toHaveBeenCalledTimes(1);
|
|
31
|
+
expect(commonOpts_1.addConfigOptions).toHaveBeenCalledWith(yargsMock);
|
|
32
|
+
expect(commonOpts_1.addUseEnvironmentOptions).toHaveBeenCalledTimes(1);
|
|
33
|
+
expect(commonOpts_1.addUseEnvironmentOptions).toHaveBeenCalledWith(yargsMock);
|
|
34
|
+
});
|
|
35
|
+
});
|
|
36
|
+
});
|
|
@@ -5,6 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const fs_extra_1 = __importDefault(require("fs-extra"));
|
|
7
7
|
const path_1 = __importDefault(require("path"));
|
|
8
|
+
const developerTestAccounts_1 = require("@hubspot/local-dev-lib/api/developerTestAccounts");
|
|
8
9
|
const path_2 = require("@hubspot/local-dev-lib/path");
|
|
9
10
|
const yargsUtils_1 = require("../../lib/yargsUtils");
|
|
10
11
|
const promptUtils_1 = require("../../lib/prompts/promptUtils");
|
|
@@ -15,8 +16,8 @@ const validation_1 = require("../../lib/validation");
|
|
|
15
16
|
const en_1 = require("../../lang/en");
|
|
16
17
|
const createDeveloperTestAccountConfigPrompt_1 = require("../../lib/prompts/createDeveloperTestAccountConfigPrompt");
|
|
17
18
|
const errorHandlers_1 = require("../../lib/errorHandlers");
|
|
19
|
+
const polling_1 = require("../../lib/polling");
|
|
18
20
|
const SpinniesManager_1 = __importDefault(require("../../lib/ui/SpinniesManager"));
|
|
19
|
-
const buildAccount_1 = require("../../lib/buildAccount");
|
|
20
21
|
const command = 'create';
|
|
21
22
|
const describe = en_1.commands.testAccount.create.describe;
|
|
22
23
|
async function handler(args) {
|
|
@@ -72,27 +73,36 @@ async function handler(args) {
|
|
|
72
73
|
text: en_1.commands.testAccount.create.polling.start(testAccountConfig.accountName),
|
|
73
74
|
});
|
|
74
75
|
try {
|
|
75
|
-
const
|
|
76
|
+
const { data } = await (0, developerTestAccounts_1.createDeveloperTestAccount)(derivedAccountId, testAccountConfig);
|
|
76
77
|
if (formatOutputAsJson) {
|
|
77
|
-
jsonOutput.accountName =
|
|
78
|
-
jsonOutput.accountId =
|
|
79
|
-
jsonOutput.personalAccessKey =
|
|
78
|
+
jsonOutput.accountName = data.accountName;
|
|
79
|
+
jsonOutput.accountId = data.id;
|
|
80
|
+
jsonOutput.personalAccessKey = data.personalAccessKey;
|
|
80
81
|
}
|
|
81
|
-
testAccountId =
|
|
82
|
+
testAccountId = data.id;
|
|
82
83
|
}
|
|
83
84
|
catch (err) {
|
|
84
|
-
SpinniesManager_1.default.fail('createTestAccount', {
|
|
85
|
-
text: en_1.commands.testAccount.create.polling.createFailure,
|
|
86
|
-
});
|
|
87
85
|
(0, errorHandlers_1.logError)(err);
|
|
88
|
-
SpinniesManager_1.default.fail('createTestAccount', {
|
|
89
|
-
text: en_1.commands.testAccount.create.polling.createFailure,
|
|
90
|
-
});
|
|
91
86
|
process.exit(exitCodes_1.EXIT_CODES.ERROR);
|
|
92
87
|
}
|
|
93
|
-
SpinniesManager_1.default.
|
|
94
|
-
text: en_1.commands.testAccount.create.polling.
|
|
88
|
+
SpinniesManager_1.default.update('createTestAccount', {
|
|
89
|
+
text: en_1.commands.testAccount.create.polling.syncing,
|
|
95
90
|
});
|
|
91
|
+
try {
|
|
92
|
+
await (0, polling_1.poll)(() => (0, developerTestAccounts_1.fetchDeveloperTestAccountGateSyncStatus)(derivedAccountId, testAccountId), {
|
|
93
|
+
successStates: ['SUCCESS'],
|
|
94
|
+
errorStates: [],
|
|
95
|
+
});
|
|
96
|
+
SpinniesManager_1.default.succeed('createTestAccount', {
|
|
97
|
+
text: en_1.commands.testAccount.create.polling.success(testAccountConfig.accountName, testAccountId),
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
catch (err) {
|
|
101
|
+
(0, errorHandlers_1.debugError)(err);
|
|
102
|
+
SpinniesManager_1.default.fail('createTestAccount', {
|
|
103
|
+
text: en_1.commands.testAccount.create.polling.failure,
|
|
104
|
+
});
|
|
105
|
+
}
|
|
96
106
|
if (formatOutputAsJson) {
|
|
97
107
|
logger_1.uiLogger.json(jsonOutput);
|
|
98
108
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const yargs_1 = __importDefault(require("yargs"));
|
|
7
|
+
const generate_selectors_1 = __importDefault(require("../generate-selectors"));
|
|
8
|
+
const positionalSpy = vi
|
|
9
|
+
.spyOn(yargs_1.default, 'positional')
|
|
10
|
+
.mockReturnValue(yargs_1.default);
|
|
11
|
+
describe('commands/theme/generate-selectors', () => {
|
|
12
|
+
describe('command', () => {
|
|
13
|
+
it('should have the correct command structure', () => {
|
|
14
|
+
expect(generate_selectors_1.default.command).toEqual('generate-selectors <path>');
|
|
15
|
+
});
|
|
16
|
+
});
|
|
17
|
+
describe('describe', () => {
|
|
18
|
+
it('should provide a description', () => {
|
|
19
|
+
expect(generate_selectors_1.default.describe).toBeDefined();
|
|
20
|
+
});
|
|
21
|
+
});
|
|
22
|
+
describe('builder', () => {
|
|
23
|
+
it('should support the correct options', () => {
|
|
24
|
+
generate_selectors_1.default.builder(yargs_1.default);
|
|
25
|
+
expect(positionalSpy).toHaveBeenCalledTimes(1);
|
|
26
|
+
expect(positionalSpy).toHaveBeenCalledWith('path', {
|
|
27
|
+
describe: expect.any(String),
|
|
28
|
+
required: true,
|
|
29
|
+
type: 'string',
|
|
30
|
+
});
|
|
31
|
+
});
|
|
32
|
+
});
|
|
33
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const yargs_1 = __importDefault(require("yargs"));
|
|
7
|
+
const commonOpts_1 = require("../../../lib/commonOpts");
|
|
8
|
+
const marketplace_validate_1 = __importDefault(require("../marketplace-validate"));
|
|
9
|
+
vi.mock('../../../lib/commonOpts');
|
|
10
|
+
const positionalSpy = vi
|
|
11
|
+
.spyOn(yargs_1.default, 'positional')
|
|
12
|
+
.mockReturnValue(yargs_1.default);
|
|
13
|
+
describe('commands/theme/marketplace-validate', () => {
|
|
14
|
+
describe('command', () => {
|
|
15
|
+
it('should have the correct command structure', () => {
|
|
16
|
+
expect(marketplace_validate_1.default.command).toEqual('marketplace-validate <path>');
|
|
17
|
+
});
|
|
18
|
+
});
|
|
19
|
+
describe('describe', () => {
|
|
20
|
+
it('should provide a description', () => {
|
|
21
|
+
expect(marketplace_validate_1.default.describe).toBeDefined();
|
|
22
|
+
});
|
|
23
|
+
});
|
|
24
|
+
describe('builder', () => {
|
|
25
|
+
it('should support the correct options', () => {
|
|
26
|
+
marketplace_validate_1.default.builder(yargs_1.default);
|
|
27
|
+
expect(positionalSpy).toHaveBeenCalledTimes(1);
|
|
28
|
+
expect(positionalSpy).toHaveBeenCalledWith('path', {
|
|
29
|
+
describe: expect.any(String),
|
|
30
|
+
required: true,
|
|
31
|
+
type: 'string',
|
|
32
|
+
});
|
|
33
|
+
expect(commonOpts_1.addAccountOptions).toHaveBeenCalledTimes(1);
|
|
34
|
+
expect(commonOpts_1.addAccountOptions).toHaveBeenCalledWith(yargs_1.default);
|
|
35
|
+
expect(commonOpts_1.addConfigOptions).toHaveBeenCalledTimes(1);
|
|
36
|
+
expect(commonOpts_1.addConfigOptions).toHaveBeenCalledWith(yargs_1.default);
|
|
37
|
+
expect(commonOpts_1.addUseEnvironmentOptions).toHaveBeenCalledTimes(1);
|
|
38
|
+
expect(commonOpts_1.addUseEnvironmentOptions).toHaveBeenCalledWith(yargs_1.default);
|
|
39
|
+
});
|
|
40
|
+
});
|
|
41
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const yargs_1 = __importDefault(require("yargs"));
|
|
7
|
+
const commonOpts_1 = require("../../../lib/commonOpts");
|
|
8
|
+
const preview_1 = __importDefault(require("../preview"));
|
|
9
|
+
vi.mock('../../../lib/commonOpts');
|
|
10
|
+
const optionSpy = vi
|
|
11
|
+
.spyOn(yargs_1.default, 'option')
|
|
12
|
+
.mockReturnValue(yargs_1.default);
|
|
13
|
+
describe('commands/theme/preview', () => {
|
|
14
|
+
describe('command', () => {
|
|
15
|
+
it('should have the correct command structure', () => {
|
|
16
|
+
expect(preview_1.default.command).toEqual('preview [--src] [--dest]');
|
|
17
|
+
});
|
|
18
|
+
});
|
|
19
|
+
describe('describe', () => {
|
|
20
|
+
it('should provide a description', () => {
|
|
21
|
+
expect(preview_1.default.describe).toBeDefined();
|
|
22
|
+
});
|
|
23
|
+
});
|
|
24
|
+
describe('builder', () => {
|
|
25
|
+
it('should support the correct options', () => {
|
|
26
|
+
preview_1.default.builder(yargs_1.default);
|
|
27
|
+
expect(optionSpy).toHaveBeenCalledWith('src', {
|
|
28
|
+
describe: expect.any(String),
|
|
29
|
+
type: 'string',
|
|
30
|
+
requiresArg: true,
|
|
31
|
+
});
|
|
32
|
+
expect(optionSpy).toHaveBeenCalledWith('dest', {
|
|
33
|
+
describe: expect.any(String),
|
|
34
|
+
type: 'string',
|
|
35
|
+
requiresArg: true,
|
|
36
|
+
});
|
|
37
|
+
expect(optionSpy).toHaveBeenCalledWith('notify', {
|
|
38
|
+
describe: expect.any(String),
|
|
39
|
+
alias: 'n',
|
|
40
|
+
type: 'string',
|
|
41
|
+
requiresArg: true,
|
|
42
|
+
});
|
|
43
|
+
expect(optionSpy).toHaveBeenCalledWith('no-ssl', {
|
|
44
|
+
describe: expect.any(String),
|
|
45
|
+
type: 'boolean',
|
|
46
|
+
});
|
|
47
|
+
expect(optionSpy).toHaveBeenCalledWith('port', {
|
|
48
|
+
describe: expect.any(String),
|
|
49
|
+
type: 'number',
|
|
50
|
+
});
|
|
51
|
+
expect(optionSpy).toHaveBeenCalledWith('resetSession', {
|
|
52
|
+
hidden: true,
|
|
53
|
+
type: 'boolean',
|
|
54
|
+
});
|
|
55
|
+
expect(optionSpy).toHaveBeenCalledWith('generateFieldsTypes', {
|
|
56
|
+
hidden: true,
|
|
57
|
+
type: 'boolean',
|
|
58
|
+
});
|
|
59
|
+
expect(commonOpts_1.addAccountOptions).toHaveBeenCalledTimes(1);
|
|
60
|
+
expect(commonOpts_1.addAccountOptions).toHaveBeenCalledWith(yargs_1.default);
|
|
61
|
+
expect(commonOpts_1.addConfigOptions).toHaveBeenCalledTimes(1);
|
|
62
|
+
expect(commonOpts_1.addConfigOptions).toHaveBeenCalledWith(yargs_1.default);
|
|
63
|
+
});
|
|
64
|
+
});
|
|
65
|
+
});
|
package/lang/en.d.ts
CHANGED
|
@@ -837,6 +837,7 @@ Global configuration replaces hubspot.config.yml, and you will be prompted to mi
|
|
|
837
837
|
readonly success: (derivedTargets: string[]) => string;
|
|
838
838
|
readonly errors: {
|
|
839
839
|
readonly needsNode20: "This feature requires node >=20";
|
|
840
|
+
readonly errorParsingJsonFIle: (filename: string, errorMessage: string) => string;
|
|
840
841
|
};
|
|
841
842
|
readonly spinners: {
|
|
842
843
|
readonly failedToConfigure: "Failed to configure the HubSpot mcp server.";
|
|
@@ -1502,28 +1503,6 @@ ${string}`;
|
|
|
1502
1503
|
readonly app: {
|
|
1503
1504
|
readonly describe: "Commands for managing apps.";
|
|
1504
1505
|
readonly subcommands: {
|
|
1505
|
-
readonly install: {
|
|
1506
|
-
readonly describe: "Install an OAuth app into a test account.";
|
|
1507
|
-
readonly options: {
|
|
1508
|
-
readonly appUid: "The uid of the app to install";
|
|
1509
|
-
readonly projectName: "The name of the project that contains the app";
|
|
1510
|
-
};
|
|
1511
|
-
readonly positionals: {
|
|
1512
|
-
readonly testAccountId: "The id of the test account to install the app into";
|
|
1513
|
-
};
|
|
1514
|
-
readonly errors: {
|
|
1515
|
-
readonly mustSpecifyProjectName: `You must specify a project name. Use the ${string} flag to specify the project name or run this command from within a project directory.`;
|
|
1516
|
-
readonly noAppUidFound: `No app uid found. Please specify the app uid with the ${string} flag or run this command from within a project that contains an app.`;
|
|
1517
|
-
readonly appMustBeOauth: "This command only supports installing oauth apps. Please specify an app with oauth auth type.";
|
|
1518
|
-
};
|
|
1519
|
-
readonly polling: {
|
|
1520
|
-
readonly start: "Installing app...";
|
|
1521
|
-
readonly success: "App installed successfully";
|
|
1522
|
-
readonly failure: "App installation failed";
|
|
1523
|
-
readonly error: "Error installing app";
|
|
1524
|
-
};
|
|
1525
|
-
readonly example: "Install the app with uid my-app-uid from the project named \"my-project\" into the target account with id 1234567890";
|
|
1526
|
-
};
|
|
1527
1506
|
readonly secret: {
|
|
1528
1507
|
readonly describe: "Commands for managing secrets.";
|
|
1529
1508
|
readonly subcommands: {
|
|
@@ -1833,7 +1812,7 @@ ${string}`;
|
|
|
1833
1812
|
readonly start: (testAccountName: string) => string;
|
|
1834
1813
|
readonly syncing: "Test account created! Syncing account data... (may take a few minutes - you can exit and the sync will continue)";
|
|
1835
1814
|
readonly success: (testAccountName: string, testAccountId: number) => string;
|
|
1836
|
-
readonly
|
|
1815
|
+
readonly failure: "Failed to sync data into test account. The account may not be ready to use.";
|
|
1837
1816
|
};
|
|
1838
1817
|
readonly options: {
|
|
1839
1818
|
readonly configPath: "The path to the test account config";
|
|
@@ -1842,7 +1821,7 @@ ${string}`;
|
|
|
1842
1821
|
};
|
|
1843
1822
|
readonly createConfig: {
|
|
1844
1823
|
readonly describe: "Create a test account config file.";
|
|
1845
|
-
readonly pathPrompt: "[--path]
|
|
1824
|
+
readonly pathPrompt: "[--path] What is the path to the test account config?";
|
|
1846
1825
|
readonly errors: {
|
|
1847
1826
|
readonly pathError: "Path is required";
|
|
1848
1827
|
readonly pathFormatError: "Path must end with .json";
|
|
@@ -2785,12 +2764,6 @@ Run ${string} to upgrade to version ${string}`;
|
|
|
2785
2764
|
readonly noLogsFound: "No logs found.";
|
|
2786
2765
|
};
|
|
2787
2766
|
};
|
|
2788
|
-
readonly buildAccount: {
|
|
2789
|
-
readonly createDeveloperTestAccountV3: {
|
|
2790
|
-
readonly syncFailure: "Failed to sync developer test account";
|
|
2791
|
-
readonly pakFailure: "Failed to generate personal access key for developer test account";
|
|
2792
|
-
};
|
|
2793
|
-
};
|
|
2794
2767
|
readonly configOptions: {
|
|
2795
2768
|
readonly enableOrDisableBooleanFieldPrompt: {
|
|
2796
2769
|
readonly message: (fieldName: string) => string;
|
|
@@ -2873,41 +2846,9 @@ Run ${string} to upgrade to version ${string}`;
|
|
|
2873
2846
|
readonly keepingCurrentDefault: (accountName: string) => string;
|
|
2874
2847
|
};
|
|
2875
2848
|
readonly createDeveloperTestAccountConfigPrompt: {
|
|
2876
|
-
readonly namePrompt:
|
|
2877
|
-
readonly descriptionPrompt:
|
|
2878
|
-
readonly
|
|
2879
|
-
readonly message: "Would you like to create a default Test Account, or customize your own?";
|
|
2880
|
-
readonly default: "Default (All Hubs, ENTERPRISE)";
|
|
2881
|
-
readonly manual: "Customize my own";
|
|
2882
|
-
};
|
|
2883
|
-
readonly tiersPrompt: (withFlag?: boolean) => string;
|
|
2884
|
-
readonly tiers: {
|
|
2885
|
-
readonly marketing: {
|
|
2886
|
-
readonly free: "Marketing [FREE]";
|
|
2887
|
-
readonly starter: "Marketing [STARTER]";
|
|
2888
|
-
readonly professional: "Marketing [PROFESSIONAL]";
|
|
2889
|
-
};
|
|
2890
|
-
readonly ops: {
|
|
2891
|
-
readonly free: "Ops [FREE]";
|
|
2892
|
-
readonly starter: "Ops [STARTER]";
|
|
2893
|
-
readonly professional: "Ops [PROFESSIONAL]";
|
|
2894
|
-
};
|
|
2895
|
-
readonly service: {
|
|
2896
|
-
readonly free: "Service [FREE]";
|
|
2897
|
-
readonly starter: "Service [STARTER]";
|
|
2898
|
-
readonly professional: "Service [PROFESSIONAL]";
|
|
2899
|
-
};
|
|
2900
|
-
readonly sales: {
|
|
2901
|
-
readonly free: "Sales [FREE]";
|
|
2902
|
-
readonly starter: "Sales [STARTER]";
|
|
2903
|
-
readonly professional: "Sales [PROFESSIONAL]";
|
|
2904
|
-
};
|
|
2905
|
-
readonly content: {
|
|
2906
|
-
readonly free: "Content [FREE]";
|
|
2907
|
-
readonly starter: "Content [STARTER]";
|
|
2908
|
-
readonly professional: "Content [PROFESSIONAL]";
|
|
2909
|
-
};
|
|
2910
|
-
};
|
|
2849
|
+
readonly namePrompt: "[--name] What is the name of the test account?";
|
|
2850
|
+
readonly descriptionPrompt: "[--description] What is the description of the test account?";
|
|
2851
|
+
readonly tiersPrompt: "[--tiers] Which product tiers should the test account have?";
|
|
2911
2852
|
readonly errors: {
|
|
2912
2853
|
readonly tiersError: "Cannot have more than one tier per hub";
|
|
2913
2854
|
};
|
package/lang/en.js
CHANGED
|
@@ -846,6 +846,7 @@ exports.commands = {
|
|
|
846
846
|
success: (derivedTargets) => `You can now use the HubSpot CLI MCP Server in ${derivedTargets.join(', ')}. ${chalk_1.default.bold('You may need to restart these tools to apply the changes')}.`,
|
|
847
847
|
errors: {
|
|
848
848
|
needsNode20: `This feature requires node >=20`,
|
|
849
|
+
errorParsingJsonFIle: (filename, errorMessage) => `Unable to update ${chalk_1.default.bold(filename)} due to invalid JSON: ${errorMessage}`,
|
|
849
850
|
},
|
|
850
851
|
spinners: {
|
|
851
852
|
failedToConfigure: 'Failed to configure the HubSpot mcp server.',
|
|
@@ -1500,28 +1501,6 @@ exports.commands = {
|
|
|
1500
1501
|
app: {
|
|
1501
1502
|
describe: 'Commands for managing apps.',
|
|
1502
1503
|
subcommands: {
|
|
1503
|
-
install: {
|
|
1504
|
-
describe: 'Install an OAuth app into a test account.',
|
|
1505
|
-
options: {
|
|
1506
|
-
appUid: 'The uid of the app to install',
|
|
1507
|
-
projectName: 'The name of the project that contains the app',
|
|
1508
|
-
},
|
|
1509
|
-
positionals: {
|
|
1510
|
-
testAccountId: 'The id of the test account to install the app into',
|
|
1511
|
-
},
|
|
1512
|
-
errors: {
|
|
1513
|
-
mustSpecifyProjectName: `You must specify a project name. Use the ${(0, ui_1.uiCommandReference)('--project-name')} flag to specify the project name or run this command from within a project directory.`,
|
|
1514
|
-
noAppUidFound: `No app uid found. Please specify the app uid with the ${(0, ui_1.uiCommandReference)('--app-uid')} flag or run this command from within a project that contains an app.`,
|
|
1515
|
-
appMustBeOauth: 'This command only supports installing oauth apps. Please specify an app with oauth auth type.',
|
|
1516
|
-
},
|
|
1517
|
-
polling: {
|
|
1518
|
-
start: 'Installing app...',
|
|
1519
|
-
success: 'App installed successfully',
|
|
1520
|
-
failure: 'App installation failed',
|
|
1521
|
-
error: 'Error installing app',
|
|
1522
|
-
},
|
|
1523
|
-
example: 'Install the app with uid my-app-uid from the project named "my-project" into the target account with id 1234567890',
|
|
1524
|
-
},
|
|
1525
1504
|
secret: {
|
|
1526
1505
|
describe: 'Commands for managing secrets.',
|
|
1527
1506
|
subcommands: {
|
|
@@ -1831,7 +1810,7 @@ exports.commands = {
|
|
|
1831
1810
|
start: (testAccountName) => `Creating test account "${chalk_1.default.bold(testAccountName)}"...`,
|
|
1832
1811
|
syncing: 'Test account created! Syncing account data... (may take a few minutes - you can exit and the sync will continue)',
|
|
1833
1812
|
success: (testAccountName, testAccountId) => `Test account "${chalk_1.default.bold(testAccountName)}" successfully created with id: ${chalk_1.default.bold(testAccountId)}`,
|
|
1834
|
-
|
|
1813
|
+
failure: 'Failed to sync data into test account. The account may not be ready to use.',
|
|
1835
1814
|
},
|
|
1836
1815
|
options: {
|
|
1837
1816
|
configPath: 'The path to the test account config',
|
|
@@ -1840,7 +1819,7 @@ exports.commands = {
|
|
|
1840
1819
|
},
|
|
1841
1820
|
createConfig: {
|
|
1842
1821
|
describe: 'Create a test account config file.',
|
|
1843
|
-
pathPrompt: '[--path]
|
|
1822
|
+
pathPrompt: '[--path] What is the path to the test account config?',
|
|
1844
1823
|
errors: {
|
|
1845
1824
|
pathError: 'Path is required',
|
|
1846
1825
|
pathFormatError: 'Path must end with .json',
|
|
@@ -2780,12 +2759,6 @@ exports.lib = {
|
|
|
2780
2759
|
noLogsFound: 'No logs found.',
|
|
2781
2760
|
},
|
|
2782
2761
|
},
|
|
2783
|
-
buildAccount: {
|
|
2784
|
-
createDeveloperTestAccountV3: {
|
|
2785
|
-
syncFailure: 'Failed to sync developer test account',
|
|
2786
|
-
pakFailure: 'Failed to generate personal access key for developer test account',
|
|
2787
|
-
},
|
|
2788
|
-
},
|
|
2789
2762
|
configOptions: {
|
|
2790
2763
|
enableOrDisableBooleanFieldPrompt: {
|
|
2791
2764
|
message: (fieldName) => `Choose to enable or disable ${fieldName}`,
|
|
@@ -2868,41 +2841,9 @@ exports.lib = {
|
|
|
2868
2841
|
keepingCurrentDefault: (accountName) => `Account "${accountName}" will continue to be the default account`,
|
|
2869
2842
|
},
|
|
2870
2843
|
createDeveloperTestAccountConfigPrompt: {
|
|
2871
|
-
namePrompt:
|
|
2872
|
-
descriptionPrompt:
|
|
2873
|
-
|
|
2874
|
-
message: 'Would you like to create a default Test Account, or customize your own?',
|
|
2875
|
-
default: 'Default (All Hubs, ENTERPRISE)',
|
|
2876
|
-
manual: 'Customize my own',
|
|
2877
|
-
},
|
|
2878
|
-
tiersPrompt: (withFlag = true) => `${withFlag ? '[--tiers] ' : ''}Select an option per hub to customize tiers. If left blank, default is ENTERPRISE`,
|
|
2879
|
-
tiers: {
|
|
2880
|
-
marketing: {
|
|
2881
|
-
free: 'Marketing [FREE]',
|
|
2882
|
-
starter: 'Marketing [STARTER]',
|
|
2883
|
-
professional: 'Marketing [PROFESSIONAL]',
|
|
2884
|
-
},
|
|
2885
|
-
ops: {
|
|
2886
|
-
free: 'Ops [FREE]',
|
|
2887
|
-
starter: 'Ops [STARTER]',
|
|
2888
|
-
professional: 'Ops [PROFESSIONAL]',
|
|
2889
|
-
},
|
|
2890
|
-
service: {
|
|
2891
|
-
free: 'Service [FREE]',
|
|
2892
|
-
starter: 'Service [STARTER]',
|
|
2893
|
-
professional: 'Service [PROFESSIONAL]',
|
|
2894
|
-
},
|
|
2895
|
-
sales: {
|
|
2896
|
-
free: 'Sales [FREE]',
|
|
2897
|
-
starter: 'Sales [STARTER]',
|
|
2898
|
-
professional: 'Sales [PROFESSIONAL]',
|
|
2899
|
-
},
|
|
2900
|
-
content: {
|
|
2901
|
-
free: 'Content [FREE]',
|
|
2902
|
-
starter: 'Content [STARTER]',
|
|
2903
|
-
professional: 'Content [PROFESSIONAL]',
|
|
2904
|
-
},
|
|
2905
|
-
},
|
|
2844
|
+
namePrompt: '[--name] What is the name of the test account?',
|
|
2845
|
+
descriptionPrompt: '[--description] What is the description of the test account?',
|
|
2846
|
+
tiersPrompt: '[--tiers] Which product tiers should the test account have?',
|
|
2906
2847
|
errors: {
|
|
2907
2848
|
tiersError: 'Cannot have more than one tier per hub',
|
|
2908
2849
|
},
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const config_1 = require("@hubspot/local-dev-lib/constants/config");
|
|
4
|
+
const accountTypes_1 = require("../accountTypes");
|
|
5
|
+
const STANDARD_ACCOUNT = {
|
|
6
|
+
name: 'standard-account',
|
|
7
|
+
accountId: 123,
|
|
8
|
+
accountType: config_1.HUBSPOT_ACCOUNT_TYPES.STANDARD,
|
|
9
|
+
env: 'prod',
|
|
10
|
+
};
|
|
11
|
+
const DEVELOPMENT_SANDBOX_ACCOUNT = {
|
|
12
|
+
name: 'development-sandbox-account',
|
|
13
|
+
accountId: 456,
|
|
14
|
+
accountType: config_1.HUBSPOT_ACCOUNT_TYPES.DEVELOPMENT_SANDBOX,
|
|
15
|
+
env: 'prod',
|
|
16
|
+
};
|
|
17
|
+
const STANDARD_SANDBOX_ACCOUNT = {
|
|
18
|
+
name: 'sandbox-account',
|
|
19
|
+
accountId: 456,
|
|
20
|
+
accountType: config_1.HUBSPOT_ACCOUNT_TYPES.STANDARD_SANDBOX,
|
|
21
|
+
env: 'prod',
|
|
22
|
+
};
|
|
23
|
+
const DEVELOPER_TEST_ACCOUNT = {
|
|
24
|
+
name: 'developer-test-account',
|
|
25
|
+
accountId: 789,
|
|
26
|
+
accountType: config_1.HUBSPOT_ACCOUNT_TYPES.DEVELOPER_TEST,
|
|
27
|
+
env: 'prod',
|
|
28
|
+
};
|
|
29
|
+
const APP_DEVELOPER_ACCOUNT = {
|
|
30
|
+
name: 'app-developer-account',
|
|
31
|
+
accountId: 1011,
|
|
32
|
+
accountType: config_1.HUBSPOT_ACCOUNT_TYPES.APP_DEVELOPER,
|
|
33
|
+
env: 'prod',
|
|
34
|
+
};
|
|
35
|
+
describe('lib/accountTypes', () => {
|
|
36
|
+
describe('isStandardAccount()', () => {
|
|
37
|
+
it('should return true if the account is a standard account', () => {
|
|
38
|
+
const result = (0, accountTypes_1.isStandardAccount)(STANDARD_ACCOUNT);
|
|
39
|
+
expect(result).toBe(true);
|
|
40
|
+
});
|
|
41
|
+
it('should return false if the account is not a standard account', () => {
|
|
42
|
+
const result = (0, accountTypes_1.isStandardAccount)(DEVELOPER_TEST_ACCOUNT);
|
|
43
|
+
expect(result).toBe(false);
|
|
44
|
+
});
|
|
45
|
+
});
|
|
46
|
+
describe('isSandbox()', () => {
|
|
47
|
+
it('should return true if the account is a standard sandbox account', () => {
|
|
48
|
+
const result = (0, accountTypes_1.isSandbox)(STANDARD_SANDBOX_ACCOUNT);
|
|
49
|
+
expect(result).toBe(true);
|
|
50
|
+
});
|
|
51
|
+
it('should return true if the account is a development sandbox account', () => {
|
|
52
|
+
const result = (0, accountTypes_1.isSandbox)(DEVELOPMENT_SANDBOX_ACCOUNT);
|
|
53
|
+
expect(result).toBe(true);
|
|
54
|
+
});
|
|
55
|
+
it('should return false if the account is not a sandbox account', () => {
|
|
56
|
+
const result = (0, accountTypes_1.isSandbox)(STANDARD_ACCOUNT);
|
|
57
|
+
expect(result).toBe(false);
|
|
58
|
+
});
|
|
59
|
+
});
|
|
60
|
+
describe('isStandardSandbox()', () => {
|
|
61
|
+
it('should return true if the account is a standard sandbox account', () => {
|
|
62
|
+
const result = (0, accountTypes_1.isStandardSandbox)(STANDARD_SANDBOX_ACCOUNT);
|
|
63
|
+
expect(result).toBe(true);
|
|
64
|
+
});
|
|
65
|
+
it('should return false if the account is not a standard sandbox account', () => {
|
|
66
|
+
const result = (0, accountTypes_1.isStandardSandbox)(DEVELOPMENT_SANDBOX_ACCOUNT);
|
|
67
|
+
expect(result).toBe(false);
|
|
68
|
+
});
|
|
69
|
+
});
|
|
70
|
+
describe('isDevelopmentSandbox()', () => {
|
|
71
|
+
it('should return true if the account is a development sandbox account', () => {
|
|
72
|
+
const result = (0, accountTypes_1.isDevelopmentSandbox)(DEVELOPMENT_SANDBOX_ACCOUNT);
|
|
73
|
+
expect(result).toBe(true);
|
|
74
|
+
});
|
|
75
|
+
it('should return false if the account is not a development sandbox account', () => {
|
|
76
|
+
const result = (0, accountTypes_1.isDevelopmentSandbox)(STANDARD_ACCOUNT);
|
|
77
|
+
expect(result).toBe(false);
|
|
78
|
+
});
|
|
79
|
+
});
|
|
80
|
+
describe('isDeveloperTestAccount()', () => {
|
|
81
|
+
it('should return true if the account is a developer test account', () => {
|
|
82
|
+
const result = (0, accountTypes_1.isDeveloperTestAccount)(DEVELOPER_TEST_ACCOUNT);
|
|
83
|
+
expect(result).toBe(true);
|
|
84
|
+
});
|
|
85
|
+
it('should return false if the account is not a developer test account', () => {
|
|
86
|
+
const result = (0, accountTypes_1.isDeveloperTestAccount)(STANDARD_ACCOUNT);
|
|
87
|
+
expect(result).toBe(false);
|
|
88
|
+
});
|
|
89
|
+
});
|
|
90
|
+
describe('isAppDeveloperAccount()', () => {
|
|
91
|
+
it('should return true if the account is an app developer account', () => {
|
|
92
|
+
const result = (0, accountTypes_1.isAppDeveloperAccount)(APP_DEVELOPER_ACCOUNT);
|
|
93
|
+
expect(result).toBe(true);
|
|
94
|
+
});
|
|
95
|
+
it('should return false if the account is not an app developer account', () => {
|
|
96
|
+
const result = (0, accountTypes_1.isAppDeveloperAccount)(STANDARD_ACCOUNT);
|
|
97
|
+
expect(result).toBe(false);
|
|
98
|
+
});
|
|
99
|
+
});
|
|
100
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|