@hubspot/cli 7.6.0-beta.2 → 7.6.0-beta.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/api/__tests__/migrate.test.d.ts +1 -0
- package/api/__tests__/migrate.test.js +183 -0
- package/bin/cli.js +6 -2
- 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/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/getStarted.js +8 -14
- 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/mcp/setup.js +1 -0
- package/commands/mcp/start.d.ts +4 -1
- package/commands/mcp/start.js +8 -3
- package/commands/open.js +14 -12
- 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 +350 -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/deploy.d.ts +1 -0
- package/commands/project/deploy.js +21 -10
- 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 +37 -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 +16 -3
- package/commands/testAccount/createConfig.d.ts +0 -2
- package/commands/testAccount/createConfig.js +7 -8
- 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 +15 -2
- package/lang/en.js +15 -2
- 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 +165 -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/app/migrate.js +2 -6
- package/lib/dependencyManagement.d.ts +1 -1
- package/lib/dependencyManagement.js +2 -2
- 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/errorHandlers/index.js +8 -0
- package/lib/mcp/setup.js +26 -5
- 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/create/v3.d.ts +3 -2
- package/lib/projects/create/v3.js +2 -2
- package/lib/projects/localDev/DevServerManager.js +0 -1
- package/lib/projects/upload.js +1 -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 +75 -31
- package/lib/prompts/createModulePrompt.js +1 -2
- package/lib/prompts/projectAddPrompt.d.ts +2 -1
- package/lib/prompts/projectAddPrompt.js +2 -1
- package/lib/prompts/promptUtils.d.ts +2 -2
- package/lib/prompts/promptUtils.js +161 -35
- package/lib/prompts/selectProjectTemplatePrompt.d.ts +2 -1
- package/lib/prompts/selectProjectTemplatePrompt.js +2 -1
- package/lib/schema.js +5 -1
- package/lib/testUtils.js +1 -2
- package/lib/ui/SpinniesManager.js +0 -1
- package/lib/ui/index.js +1 -1
- package/lib/ui/supportHyperlinks.js +2 -2
- package/lib/ui/supportsColor.js +2 -2
- package/lib/usageTracking.d.ts +11 -0
- package/lib/usageTracking.js +67 -73
- 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/AddFeatureToProject.js +4 -1
- package/mcp-server/tools/project/CreateProjectTool.d.ts +2 -2
- package/mcp-server/tools/project/CreateProjectTool.js +4 -1
- package/mcp-server/tools/project/DeployProject.js +4 -1
- package/mcp-server/tools/project/GuidedWalkthroughTool.js +4 -1
- package/mcp-server/tools/project/UploadProjectTools.js +4 -1
- package/mcp-server/tools/project/ValidateProjectTool.js +4 -1
- package/mcp-server/tools/project/__tests__/AddFeatureToProject.test.d.ts +1 -0
- package/mcp-server/tools/project/__tests__/AddFeatureToProject.test.js +153 -0
- package/mcp-server/tools/project/__tests__/CreateProjectTool.test.d.ts +1 -0
- package/mcp-server/tools/project/__tests__/CreateProjectTool.test.js +130 -0
- package/mcp-server/tools/project/__tests__/DeployProject.test.d.ts +1 -0
- package/mcp-server/tools/project/__tests__/DeployProject.test.js +121 -0
- package/mcp-server/tools/project/__tests__/GuidedWalkthroughTool.test.d.ts +1 -0
- package/mcp-server/tools/project/__tests__/GuidedWalkthroughTool.test.js +128 -0
- package/mcp-server/tools/project/__tests__/UploadProjectTools.test.d.ts +1 -0
- package/mcp-server/tools/project/__tests__/UploadProjectTools.test.js +109 -0
- package/mcp-server/tools/project/__tests__/ValidateProjectTool.test.d.ts +1 -0
- package/mcp-server/tools/project/__tests__/ValidateProjectTool.test.js +112 -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 +84 -0
- package/mcp-server/utils/project.js +3 -0
- package/mcp-server/utils/toolUsageTracking.d.ts +1 -0
- package/mcp-server/utils/toolUsageTracking.js +25 -0
- package/package.json +9 -9
- package/types/Prompts.d.ts +4 -2
|
@@ -0,0 +1,37 @@
|
|
|
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 createConfig_1 = __importDefault(require("../createConfig"));
|
|
8
|
+
vi.mock('../../../lib/commonOpts');
|
|
9
|
+
describe('commands/testAccount/createConfig', () => {
|
|
10
|
+
const yargsMock = yargs_1.default;
|
|
11
|
+
describe('command', () => {
|
|
12
|
+
it('should have the correct command structure', () => {
|
|
13
|
+
expect(createConfig_1.default.command).toEqual('create-config');
|
|
14
|
+
});
|
|
15
|
+
});
|
|
16
|
+
describe('describe', () => {
|
|
17
|
+
it('should provide a description', () => {
|
|
18
|
+
expect(createConfig_1.default.describe).toBeDefined();
|
|
19
|
+
});
|
|
20
|
+
});
|
|
21
|
+
describe('builder', () => {
|
|
22
|
+
it('should support the correct options', () => {
|
|
23
|
+
const optionSpy = vi.spyOn(yargsMock, 'option');
|
|
24
|
+
createConfig_1.default.builder(yargsMock);
|
|
25
|
+
expect(yargsMock.example).toHaveBeenCalledTimes(1);
|
|
26
|
+
expect(optionSpy).toHaveBeenCalledWith('name', expect.objectContaining({
|
|
27
|
+
type: 'string',
|
|
28
|
+
}));
|
|
29
|
+
expect(optionSpy).toHaveBeenCalledWith('description', expect.objectContaining({
|
|
30
|
+
type: 'string',
|
|
31
|
+
}));
|
|
32
|
+
expect(optionSpy).toHaveBeenCalledWith('path', expect.objectContaining({
|
|
33
|
+
type: 'string',
|
|
34
|
+
}));
|
|
35
|
+
});
|
|
36
|
+
});
|
|
37
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -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
|
+
});
|
|
@@ -77,7 +77,6 @@ async function handler(args) {
|
|
|
77
77
|
if (formatOutputAsJson) {
|
|
78
78
|
jsonOutput.accountName = data.accountName;
|
|
79
79
|
jsonOutput.accountId = data.id;
|
|
80
|
-
jsonOutput.personalAccessKey = data.personalAccessKey;
|
|
81
80
|
}
|
|
82
81
|
testAccountId = data.id;
|
|
83
82
|
}
|
|
@@ -93,16 +92,30 @@ async function handler(args) {
|
|
|
93
92
|
successStates: ['SUCCESS'],
|
|
94
93
|
errorStates: [],
|
|
95
94
|
});
|
|
96
|
-
|
|
97
|
-
|
|
95
|
+
}
|
|
96
|
+
catch (err) {
|
|
97
|
+
(0, errorHandlers_1.debugError)(err);
|
|
98
|
+
SpinniesManager_1.default.fail('createTestAccount', {
|
|
99
|
+
text: en_1.commands.testAccount.create.polling.failure,
|
|
98
100
|
});
|
|
99
101
|
}
|
|
102
|
+
// HACK: The status endpoint sometimes returns an early success status.
|
|
103
|
+
// Sleep for an extra 5 seconds to make sure the sync is actually complete.
|
|
104
|
+
await new Promise(resolve => setTimeout(resolve, 5000));
|
|
105
|
+
try {
|
|
106
|
+
// Attempt to generate a new personal access key for the test account now that gate sync is complete.
|
|
107
|
+
const { data } = await (0, developerTestAccounts_1.generateDeveloperTestAccountPersonalAccessKey)(derivedAccountId, testAccountId);
|
|
108
|
+
jsonOutput.personalAccessKey = data.personalAccessKey;
|
|
109
|
+
}
|
|
100
110
|
catch (err) {
|
|
101
111
|
(0, errorHandlers_1.debugError)(err);
|
|
102
112
|
SpinniesManager_1.default.fail('createTestAccount', {
|
|
103
113
|
text: en_1.commands.testAccount.create.polling.failure,
|
|
104
114
|
});
|
|
105
115
|
}
|
|
116
|
+
SpinniesManager_1.default.succeed('createTestAccount', {
|
|
117
|
+
text: en_1.commands.testAccount.create.polling.success(testAccountConfig.accountName, testAccountId),
|
|
118
|
+
});
|
|
106
119
|
if (formatOutputAsJson) {
|
|
107
120
|
logger_1.uiLogger.json(jsonOutput);
|
|
108
121
|
}
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import { CommonArgs, YargsCommandModule } from '../../types/Yargs';
|
|
2
|
-
import { HubConfig } from '../../lib/prompts/createDeveloperTestAccountConfigPrompt';
|
|
3
2
|
type CreateTestAccountConfigArgs = CommonArgs & {
|
|
4
3
|
name?: string;
|
|
5
4
|
description?: string;
|
|
6
|
-
tiers?: HubConfig[];
|
|
7
5
|
path?: string;
|
|
8
6
|
};
|
|
9
7
|
declare const createTestAccountConfigCommand: YargsCommandModule<unknown, CreateTestAccountConfigArgs>;
|
|
@@ -17,20 +17,20 @@ const validation_1 = require("../../lib/validation");
|
|
|
17
17
|
const command = 'create-config';
|
|
18
18
|
const describe = en_1.commands.testAccount.createConfig.describe;
|
|
19
19
|
async function handler(args) {
|
|
20
|
-
const { derivedAccountId, name,
|
|
20
|
+
const { derivedAccountId, name, description, path: configPath } = args;
|
|
21
21
|
(0, usageTracking_1.trackCommandUsage)('test-account-create-config', {}, derivedAccountId);
|
|
22
22
|
let accountConfigPath = configPath;
|
|
23
23
|
const testAccountConfig = await (0, createDeveloperTestAccountConfigPrompt_1.createDeveloperTestAccountConfigPrompt)({
|
|
24
24
|
name,
|
|
25
25
|
description,
|
|
26
|
-
tiers,
|
|
27
26
|
});
|
|
28
27
|
if (!accountConfigPath) {
|
|
29
28
|
const pathPromptResult = await (0, promptUtils_1.promptUser)({
|
|
30
29
|
name: 'path',
|
|
31
30
|
message: en_1.commands.testAccount.createConfig.pathPrompt,
|
|
32
31
|
type: 'input',
|
|
33
|
-
default: '
|
|
32
|
+
default: testAccountConfig.accountName.toLowerCase().replace(/\s+/g, '-') +
|
|
33
|
+
'.json',
|
|
34
34
|
validate: path => {
|
|
35
35
|
if (!path) {
|
|
36
36
|
return en_1.commands.testAccount.createConfig.errors.pathError;
|
|
@@ -38,6 +38,9 @@ async function handler(args) {
|
|
|
38
38
|
else if (!path.endsWith('.json')) {
|
|
39
39
|
return en_1.commands.testAccount.createConfig.errors.pathFormatError;
|
|
40
40
|
}
|
|
41
|
+
else if ((0, validation_1.fileExists)(path)) {
|
|
42
|
+
return en_1.commands.testAccount.createConfig.errors.pathExistsError;
|
|
43
|
+
}
|
|
41
44
|
return true;
|
|
42
45
|
},
|
|
43
46
|
});
|
|
@@ -70,17 +73,13 @@ function createTestAccountConfigBuilder(yargs) {
|
|
|
70
73
|
type: 'string',
|
|
71
74
|
description: en_1.commands.testAccount.createConfig.options.description,
|
|
72
75
|
});
|
|
73
|
-
yargs.option('tiers', {
|
|
74
|
-
type: 'array',
|
|
75
|
-
description: en_1.commands.testAccount.createConfig.options.tiers,
|
|
76
|
-
});
|
|
77
76
|
yargs.option('path', {
|
|
78
77
|
type: 'string',
|
|
79
78
|
description: en_1.commands.testAccount.createConfig.options.path,
|
|
80
79
|
});
|
|
81
80
|
yargs.example([
|
|
82
81
|
[
|
|
83
|
-
'$0 create-config --name my-account',
|
|
82
|
+
'$0 test-account create-config --name my-account',
|
|
84
83
|
en_1.commands.testAccount.createConfig.example('my-account'),
|
|
85
84
|
],
|
|
86
85
|
]);
|
|
@@ -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.";
|
|
@@ -1833,7 +1834,6 @@ ${string}`;
|
|
|
1833
1834
|
readonly options: {
|
|
1834
1835
|
readonly name: "The name of the test account";
|
|
1835
1836
|
readonly description: "The description of the test account";
|
|
1836
|
-
readonly tiers: "The tiers of the test account";
|
|
1837
1837
|
readonly path: "The path to the test account config";
|
|
1838
1838
|
};
|
|
1839
1839
|
readonly example: (name: string) => string;
|
|
@@ -2847,9 +2847,22 @@ Run ${string} to upgrade to version ${string}`;
|
|
|
2847
2847
|
readonly createDeveloperTestAccountConfigPrompt: {
|
|
2848
2848
|
readonly namePrompt: "[--name] What is the name of the test account?";
|
|
2849
2849
|
readonly descriptionPrompt: "[--description] What is the description of the test account?";
|
|
2850
|
-
readonly
|
|
2850
|
+
readonly useDefaultAccountLevelsPrompt: {
|
|
2851
|
+
readonly message: "Would you like to create a default Test Account, or customize your own?";
|
|
2852
|
+
readonly default: "Default (All Hubs, ENTERPRISE)";
|
|
2853
|
+
readonly manual: "Customize my own";
|
|
2854
|
+
};
|
|
2855
|
+
readonly tiersPrompt: "Select an option per hub to customize tiers. If left blank, default is ENTERPRISE";
|
|
2856
|
+
readonly hubTypes: {
|
|
2857
|
+
readonly marketing: "Marketing";
|
|
2858
|
+
readonly ops: "Ops";
|
|
2859
|
+
readonly service: "Service";
|
|
2860
|
+
readonly sales: "Sales";
|
|
2861
|
+
readonly content: "Content";
|
|
2862
|
+
};
|
|
2851
2863
|
readonly errors: {
|
|
2852
2864
|
readonly tiersError: "Cannot have more than one tier per hub";
|
|
2865
|
+
readonly nameRequired: "The name may not be blank. Please add a name for the Test Account.";
|
|
2853
2866
|
};
|
|
2854
2867
|
};
|
|
2855
2868
|
readonly accountNamePrompt: {
|
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.',
|
|
@@ -1831,7 +1832,6 @@ exports.commands = {
|
|
|
1831
1832
|
options: {
|
|
1832
1833
|
name: 'The name of the test account',
|
|
1833
1834
|
description: 'The description of the test account',
|
|
1834
|
-
tiers: 'The tiers of the test account',
|
|
1835
1835
|
path: 'The path to the test account config',
|
|
1836
1836
|
},
|
|
1837
1837
|
example: (name) => `Create a test account config file with the name "${name}"`,
|
|
@@ -2842,9 +2842,22 @@ exports.lib = {
|
|
|
2842
2842
|
createDeveloperTestAccountConfigPrompt: {
|
|
2843
2843
|
namePrompt: '[--name] What is the name of the test account?',
|
|
2844
2844
|
descriptionPrompt: '[--description] What is the description of the test account?',
|
|
2845
|
-
|
|
2845
|
+
useDefaultAccountLevelsPrompt: {
|
|
2846
|
+
message: 'Would you like to create a default Test Account, or customize your own?',
|
|
2847
|
+
default: 'Default (All Hubs, ENTERPRISE)',
|
|
2848
|
+
manual: 'Customize my own',
|
|
2849
|
+
},
|
|
2850
|
+
tiersPrompt: 'Select an option per hub to customize tiers. If left blank, default is ENTERPRISE',
|
|
2851
|
+
hubTypes: {
|
|
2852
|
+
marketing: 'Marketing',
|
|
2853
|
+
ops: 'Ops',
|
|
2854
|
+
service: 'Service',
|
|
2855
|
+
sales: 'Sales',
|
|
2856
|
+
content: 'Content',
|
|
2857
|
+
},
|
|
2846
2858
|
errors: {
|
|
2847
2859
|
tiersError: 'Cannot have more than one tier per hub',
|
|
2860
|
+
nameRequired: 'The name may not be blank. Please add a name for the Test Account.',
|
|
2848
2861
|
},
|
|
2849
2862
|
},
|
|
2850
2863
|
accountNamePrompt: {
|
|
@@ -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 {};
|