@hubspot/cli 7.1.1 → 7.2.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/create/api-sample.js +14 -4
- package/commands/customObject/create.d.ts +11 -0
- package/commands/customObject/create.js +37 -28
- package/commands/customObject/schema/create.d.ts +10 -0
- package/commands/customObject/schema/create.js +40 -42
- package/commands/customObject/schema/delete.d.ts +11 -0
- package/commands/customObject/schema/delete.js +34 -27
- package/commands/customObject/schema/fetch-all.d.ts +10 -0
- package/commands/customObject/schema/fetch-all.js +31 -24
- package/commands/customObject/schema/fetch.d.ts +11 -0
- package/commands/customObject/schema/fetch.js +34 -42
- package/commands/customObject/schema/list.d.ts +7 -0
- package/commands/customObject/schema/list.js +23 -14
- package/commands/customObject/schema/update.d.ts +11 -0
- package/commands/customObject/schema/update.js +44 -46
- package/commands/customObject/schema.d.ts +5 -1
- package/commands/customObject/schema.js +49 -11
- package/commands/customObject.d.ts +4 -1
- package/commands/customObject.js +54 -21
- package/commands/filemanager/fetch.d.ts +12 -0
- package/commands/filemanager/fetch.js +33 -30
- package/commands/filemanager/upload.d.ts +11 -0
- package/commands/filemanager/upload.js +53 -47
- package/commands/filemanager.d.ts +4 -1
- package/commands/filemanager.js +41 -7
- package/commands/hubdb/clear.d.ts +11 -0
- package/commands/hubdb/clear.js +33 -30
- package/commands/hubdb/create.d.ts +10 -0
- package/commands/hubdb/create.js +46 -40
- package/commands/hubdb/delete.d.ts +10 -0
- package/commands/hubdb/delete.js +38 -35
- package/commands/hubdb/fetch.d.ts +11 -0
- package/commands/hubdb/fetch.js +30 -27
- package/commands/hubdb.d.ts +4 -1
- package/commands/hubdb.js +45 -11
- package/commands/project/add.js +62 -16
- package/commands/project/cloneApp.js +3 -3
- package/commands/project/create.js +70 -15
- package/commands/project/dev/deprecatedFlow.d.ts +5 -0
- package/commands/project/dev/deprecatedFlow.js +137 -0
- package/commands/project/dev/index.d.ts +6 -0
- package/commands/project/dev/index.js +52 -0
- package/commands/project/dev/unifiedFlow.d.ts +5 -0
- package/commands/project/dev/unifiedFlow.js +112 -0
- package/commands/project/migrateApp.js +3 -3
- package/commands/project/upload.js +7 -2
- package/commands/sandbox/create.d.ts +12 -0
- package/commands/sandbox/create.js +90 -72
- package/commands/sandbox/delete.d.ts +11 -0
- package/commands/sandbox/delete.js +112 -95
- package/commands/sandbox.d.ts +4 -1
- package/commands/sandbox.js +44 -10
- package/commands/secret/addSecret.d.ts +10 -0
- package/commands/secret/addSecret.js +32 -31
- package/commands/secret/deleteSecret.d.ts +11 -0
- package/commands/secret/deleteSecret.js +31 -29
- package/commands/secret/listSecret.d.ts +9 -0
- package/commands/secret/listSecret.js +41 -0
- package/commands/secret/updateSecret.d.ts +10 -0
- package/commands/secret/updateSecret.js +33 -31
- package/commands/secret.d.ts +4 -1
- package/commands/secret.js +46 -12
- package/commands/theme/generate-selectors.d.ts +9 -0
- package/commands/theme/generate-selectors.js +61 -43
- package/commands/theme/marketplace-validate.d.ts +10 -0
- package/commands/theme/marketplace-validate.js +32 -26
- package/commands/theme/preview.d.ts +16 -0
- package/commands/theme/preview.js +104 -97
- package/commands/theme.d.ts +4 -1
- package/commands/theme.js +44 -10
- package/lang/en.lyaml +36 -16
- package/lib/DevServerManagerV2.d.ts +34 -0
- package/lib/DevServerManagerV2.js +85 -0
- package/lib/LocalDevManager.d.ts +2 -2
- package/lib/LocalDevManagerV2.d.ts +64 -0
- package/lib/LocalDevManagerV2.js +382 -0
- package/lib/buildAccount.d.ts +2 -3
- package/lib/constants.d.ts +12 -3
- package/lib/constants.js +13 -4
- package/lib/customObject.d.ts +3 -0
- package/lib/customObject.js +15 -0
- package/lib/doctor/DiagnosticInfoBuilder.d.ts +6 -0
- package/lib/doctor/DiagnosticInfoBuilder.js +5 -0
- package/lib/doctor/Doctor.d.ts +1 -0
- package/lib/doctor/Doctor.js +10 -0
- package/lib/localDev.d.ts +3 -2
- package/lib/localDev.js +2 -2
- package/lib/marketplaceValidate.d.ts +2 -2
- package/lib/process.d.ts +1 -0
- package/lib/process.js +11 -10
- package/lib/projects/buildAndDeploy.js +4 -1
- package/lib/projects/create.d.ts +5 -0
- package/lib/projects/create.js +51 -0
- package/lib/projects/index.d.ts +1 -5
- package/lib/projects/index.js +1 -62
- package/lib/projects/structure.d.ts +4 -0
- package/lib/projects/structure.js +9 -0
- package/lib/projects/upload.d.ts +1 -1
- package/lib/projects/upload.js +2 -2
- package/lib/prompts/createProjectPrompt.d.ts +6 -8
- package/lib/prompts/createProjectPrompt.js +26 -54
- package/lib/prompts/projectAddPrompt.d.ts +3 -3
- package/lib/prompts/projectAddPrompt.js +16 -6
- package/lib/prompts/projectDevTargetAccountPrompt.d.ts +3 -2
- package/lib/prompts/sandboxesPrompt.d.ts +3 -2
- package/lib/prompts/sandboxesPrompt.js +1 -1
- package/lib/sandboxSync.js +6 -2
- package/lib/sandboxes.d.ts +2 -5
- package/lib/testUtils.d.ts +12 -0
- package/lib/testUtils.js +10 -0
- package/lib/ui/index.d.ts +2 -2
- package/lib/ui/index.js +1 -0
- package/lib/upload.d.ts +1 -1
- package/lib/upload.js +20 -20
- package/lib/validation.d.ts +1 -1
- package/package.json +6 -5
- package/types/ProjectComponents.d.ts +38 -0
- package/types/ProjectComponents.js +3 -0
- package/types/Projects.d.ts +1 -6
- package/types/Prompts.d.ts +7 -0
- package/types/Sandboxes.d.ts +2 -0
- package/types/Yargs.d.ts +15 -0
- package/commands/project/dev.d.ts +0 -1
- package/commands/project/dev.js +0 -146
- package/commands/secret/listSecrets.d.ts +0 -1
- package/commands/secret/listSecrets.js +0 -39
package/commands/project/add.js
CHANGED
|
@@ -1,42 +1,88 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
// @ts-nocheck
|
|
4
|
+
const path = require('path');
|
|
4
5
|
const { logger } = require('@hubspot/local-dev-lib/logger');
|
|
5
|
-
const {
|
|
6
|
-
const {
|
|
6
|
+
const { cloneGithubRepo, fetchReleaseData, } = require('@hubspot/local-dev-lib/github');
|
|
7
|
+
const { debugError } = require('../../lib/errorHandlers');
|
|
7
8
|
const { trackCommandUsage } = require('../../lib/usageTracking');
|
|
8
9
|
const { i18n } = require('../../lib/lang');
|
|
9
10
|
const { projectAddPrompt } = require('../../lib/prompts/projectAddPrompt');
|
|
10
|
-
const {
|
|
11
|
+
const { getProjectConfig } = require('../../lib/projects');
|
|
12
|
+
const { getProjectComponentListFromRepo, } = require('../../lib/projects/create');
|
|
13
|
+
const { findProjectComponents } = require('../../lib/projects/structure');
|
|
14
|
+
const { ComponentTypes } = require('../../types/Projects');
|
|
11
15
|
const { uiBetaTag } = require('../../lib/ui');
|
|
12
16
|
const { HUBSPOT_PROJECT_COMPONENTS_GITHUB_PATH, } = require('../../lib/constants');
|
|
17
|
+
const { EXIT_CODES } = require('../../lib/enums/exitCodes');
|
|
13
18
|
const i18nKey = 'commands.project.subcommands.add';
|
|
14
19
|
exports.command = 'add';
|
|
15
20
|
exports.describe = uiBetaTag(i18n(`${i18nKey}.describe`), false);
|
|
16
21
|
exports.handler = async (options) => {
|
|
17
22
|
const { derivedAccountId } = options;
|
|
23
|
+
trackCommandUsage('project-add', null, derivedAccountId);
|
|
24
|
+
const { projectConfig, projectDir } = await getProjectConfig();
|
|
25
|
+
if (!projectDir || !projectConfig) {
|
|
26
|
+
logger.error(i18n(`${i18nKey}.error.locationInProject`));
|
|
27
|
+
process.exit(EXIT_CODES.ERROR);
|
|
28
|
+
}
|
|
29
|
+
// We currently only support adding private apps to projects
|
|
30
|
+
let projectContainsPublicApp = false;
|
|
31
|
+
try {
|
|
32
|
+
const components = await findProjectComponents(projectDir);
|
|
33
|
+
projectContainsPublicApp = components.some(c => c.type === ComponentTypes.PublicApp);
|
|
34
|
+
}
|
|
35
|
+
catch (err) {
|
|
36
|
+
debugError(err);
|
|
37
|
+
}
|
|
38
|
+
if (projectContainsPublicApp) {
|
|
39
|
+
logger.error(i18n(`${i18nKey}.error.projectContainsPublicApp`));
|
|
40
|
+
process.exit(EXIT_CODES.ERROR);
|
|
41
|
+
}
|
|
18
42
|
logger.log('');
|
|
19
|
-
logger.log(i18n(`${i18nKey}.creatingComponent
|
|
43
|
+
logger.log(i18n(`${i18nKey}.creatingComponent`, {
|
|
44
|
+
projectName: projectConfig.name,
|
|
45
|
+
}));
|
|
20
46
|
logger.log('');
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
47
|
+
let latestRepoReleaseTag;
|
|
48
|
+
try {
|
|
49
|
+
// We want the tag_name from the latest release of the components repo
|
|
50
|
+
const repoReleaseData = await fetchReleaseData(HUBSPOT_PROJECT_COMPONENTS_GITHUB_PATH);
|
|
51
|
+
if (repoReleaseData) {
|
|
52
|
+
latestRepoReleaseTag = repoReleaseData.tag_name;
|
|
53
|
+
}
|
|
28
54
|
}
|
|
29
|
-
|
|
55
|
+
catch (err) {
|
|
56
|
+
debugError(err);
|
|
57
|
+
}
|
|
58
|
+
if (!latestRepoReleaseTag) {
|
|
59
|
+
logger.error(i18n(`${i18nKey}.error.failedToFetchComponentList`));
|
|
60
|
+
process.exit(EXIT_CODES.ERROR);
|
|
61
|
+
}
|
|
62
|
+
const components = await getProjectComponentListFromRepo(latestRepoReleaseTag);
|
|
63
|
+
if (!components.length) {
|
|
64
|
+
logger.error(i18n(`${i18nKey}.error.failedToFetchComponentList`));
|
|
65
|
+
process.exit(EXIT_CODES.ERROR);
|
|
66
|
+
}
|
|
67
|
+
const projectAddPromptResponse = await projectAddPrompt(components, options);
|
|
30
68
|
try {
|
|
31
|
-
|
|
69
|
+
const componentPath = path.join(projectDir, projectConfig.srcDir, projectAddPromptResponse.componentTemplate.insertPath, projectAddPromptResponse.name);
|
|
70
|
+
await cloneGithubRepo(HUBSPOT_PROJECT_COMPONENTS_GITHUB_PATH, componentPath, {
|
|
71
|
+
sourceDir: projectAddPromptResponse.componentTemplate.path,
|
|
72
|
+
tag: latestRepoReleaseTag,
|
|
73
|
+
hideLogs: true,
|
|
74
|
+
});
|
|
32
75
|
logger.log('');
|
|
33
|
-
logger.
|
|
34
|
-
componentName: name,
|
|
76
|
+
logger.success(i18n(`${i18nKey}.success`, {
|
|
77
|
+
componentName: projectAddPromptResponse.name,
|
|
35
78
|
}));
|
|
36
79
|
}
|
|
37
80
|
catch (error) {
|
|
38
|
-
|
|
81
|
+
debugError(error);
|
|
82
|
+
logger.error(i18n(`${i18nKey}.error.failedToDownloadComponent`));
|
|
83
|
+
process.exit(EXIT_CODES.ERROR);
|
|
39
84
|
}
|
|
85
|
+
process.exit(EXIT_CODES.SUCCESS);
|
|
40
86
|
};
|
|
41
87
|
exports.builder = yargs => {
|
|
42
88
|
yargs.options({
|
|
@@ -53,9 +53,9 @@ exports.handler = async (options) => {
|
|
|
53
53
|
});
|
|
54
54
|
appId = appIdResponse.appId;
|
|
55
55
|
}
|
|
56
|
-
const
|
|
57
|
-
projectName = name;
|
|
58
|
-
projectDest =
|
|
56
|
+
const createProjectPromptResponse = await createProjectPrompt(options);
|
|
57
|
+
projectName = createProjectPromptResponse.name;
|
|
58
|
+
projectDest = createProjectPromptResponse.dest;
|
|
59
59
|
}
|
|
60
60
|
catch (error) {
|
|
61
61
|
logError(error, new ApiErrorContext({ accountId: derivedAccountId }));
|
|
@@ -1,32 +1,86 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
// @ts-nocheck
|
|
4
|
-
const { addAccountOptions, addConfigOptions, addUseEnvironmentOptions, } = require('../../lib/commonOpts');
|
|
5
|
-
const { trackCommandUsage } = require('../../lib/usageTracking');
|
|
6
|
-
const { getCwd } = require('@hubspot/local-dev-lib/path');
|
|
7
4
|
const path = require('path');
|
|
5
|
+
const fs = require('fs-extra');
|
|
8
6
|
const chalk = require('chalk');
|
|
7
|
+
const { logger } = require('@hubspot/local-dev-lib/logger');
|
|
8
|
+
const { fetchReleaseData, cloneGithubRepo, } = require('@hubspot/local-dev-lib/github');
|
|
9
|
+
const { getCwd } = require('@hubspot/local-dev-lib/path');
|
|
10
|
+
const { addAccountOptions, addConfigOptions, addUseEnvironmentOptions, } = require('../../lib/commonOpts');
|
|
11
|
+
const { trackCommandUsage } = require('../../lib/usageTracking');
|
|
9
12
|
const { createProjectPrompt, } = require('../../lib/prompts/createProjectPrompt');
|
|
10
|
-
const {
|
|
13
|
+
const { writeProjectConfig, getProjectConfig } = require('../../lib/projects');
|
|
14
|
+
const { getProjectTemplateListFromRepo, EMPTY_PROJECT_TEMPLATE_NAME, } = require('../../lib/projects/create');
|
|
11
15
|
const { i18n } = require('../../lib/lang');
|
|
12
16
|
const { uiBetaTag, uiFeatureHighlight } = require('../../lib/ui');
|
|
13
|
-
const {
|
|
14
|
-
const {
|
|
15
|
-
const {
|
|
17
|
+
const { debugError } = require('../../lib/errorHandlers');
|
|
18
|
+
const { EXIT_CODES } = require('../../lib/enums/exitCodes');
|
|
19
|
+
const { PROJECT_CONFIG_FILE, HUBSPOT_PROJECT_COMPONENTS_GITHUB_PATH, DEFAULT_PROJECT_TEMPLATE_BRANCH, } = require('../../lib/constants');
|
|
16
20
|
const i18nKey = 'commands.project.subcommands.create';
|
|
17
21
|
exports.command = 'create';
|
|
18
22
|
exports.describe = uiBetaTag(i18n(`${i18nKey}.describe`), false);
|
|
19
23
|
exports.handler = async (options) => {
|
|
20
24
|
const { derivedAccountId } = options;
|
|
21
|
-
|
|
22
|
-
let
|
|
23
|
-
if (!
|
|
24
|
-
|
|
25
|
-
|
|
25
|
+
let latestRepoReleaseTag;
|
|
26
|
+
let templateSource = options.templateSource;
|
|
27
|
+
if (!templateSource) {
|
|
28
|
+
templateSource = HUBSPOT_PROJECT_COMPONENTS_GITHUB_PATH;
|
|
29
|
+
try {
|
|
30
|
+
const releaseData = await fetchReleaseData(HUBSPOT_PROJECT_COMPONENTS_GITHUB_PATH);
|
|
31
|
+
if (releaseData) {
|
|
32
|
+
latestRepoReleaseTag = releaseData.tag_name;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
catch (err) {
|
|
36
|
+
logger.error(i18n(`${i18nKey}.error.failedToFetchProjectList`));
|
|
37
|
+
process.exit(EXIT_CODES.ERROR);
|
|
38
|
+
}
|
|
26
39
|
}
|
|
27
|
-
const
|
|
28
|
-
|
|
29
|
-
|
|
40
|
+
const projectTemplates = await getProjectTemplateListFromRepo(templateSource, latestRepoReleaseTag || DEFAULT_PROJECT_TEMPLATE_BRANCH);
|
|
41
|
+
if (!projectTemplates.length) {
|
|
42
|
+
logger.error(i18n(`${i18nKey}.error.failedToFetchProjectList`));
|
|
43
|
+
process.exit(EXIT_CODES.ERROR);
|
|
44
|
+
}
|
|
45
|
+
const createProjectPromptResponse = await createProjectPrompt(options, projectTemplates);
|
|
46
|
+
const projectDest = path.resolve(getCwd(), createProjectPromptResponse.dest);
|
|
47
|
+
trackCommandUsage('project-create', { type: createProjectPromptResponse.projectTemplate.name }, derivedAccountId);
|
|
48
|
+
const { projectConfig: existingProjectConfig, projectDir: existingProjectDir, } = await getProjectConfig(projectDest);
|
|
49
|
+
// Exit if the target destination is within an existing project
|
|
50
|
+
if (existingProjectConfig && projectDest.startsWith(existingProjectDir)) {
|
|
51
|
+
logger.error(i18n(`${i18nKey}.errors.cannotNestProjects`, {
|
|
52
|
+
projectDir: existingProjectDir,
|
|
53
|
+
}));
|
|
54
|
+
process.exit(EXIT_CODES.ERROR);
|
|
55
|
+
}
|
|
56
|
+
try {
|
|
57
|
+
await cloneGithubRepo(templateSource, projectDest, {
|
|
58
|
+
sourceDir: createProjectPromptResponse.projectTemplate.path,
|
|
59
|
+
tag: latestRepoReleaseTag,
|
|
60
|
+
hideLogs: true,
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
catch (err) {
|
|
64
|
+
debugError(err);
|
|
65
|
+
logger.error(i18n(`${i18nKey}.errors.failedToDownloadProject`));
|
|
66
|
+
process.exit(EXIT_CODES.ERROR);
|
|
67
|
+
}
|
|
68
|
+
const projectConfigPath = path.join(projectDest, PROJECT_CONFIG_FILE);
|
|
69
|
+
const parsedConfigFile = JSON.parse(fs.readFileSync(projectConfigPath).toString());
|
|
70
|
+
writeProjectConfig(projectConfigPath, {
|
|
71
|
+
...parsedConfigFile,
|
|
72
|
+
name: createProjectPromptResponse.name,
|
|
73
|
+
});
|
|
74
|
+
// If the template is 'no-template', we need to manually create a src directory
|
|
75
|
+
if (createProjectPromptResponse.projectTemplate.name ===
|
|
76
|
+
EMPTY_PROJECT_TEMPLATE_NAME) {
|
|
77
|
+
fs.ensureDirSync(path.join(projectDest, 'src'));
|
|
78
|
+
}
|
|
79
|
+
logger.log('');
|
|
80
|
+
logger.success(i18n(`${i18nKey}.logs.success`, {
|
|
81
|
+
projectName: createProjectPromptResponse.name,
|
|
82
|
+
projectDest,
|
|
83
|
+
}));
|
|
30
84
|
logger.log('');
|
|
31
85
|
logger.log(chalk.bold(i18n(`${i18nKey}.logs.welcomeMessage`)));
|
|
32
86
|
uiFeatureHighlight([
|
|
@@ -35,6 +89,7 @@ exports.handler = async (options) => {
|
|
|
35
89
|
'feedbackCommand',
|
|
36
90
|
'sampleProjects',
|
|
37
91
|
]);
|
|
92
|
+
process.exit(EXIT_CODES.SUCCESS);
|
|
38
93
|
};
|
|
39
94
|
exports.builder = yargs => {
|
|
40
95
|
yargs.options({
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { ArgumentsCamelCase } from 'yargs';
|
|
2
|
+
import { CLIAccount } from '@hubspot/local-dev-lib/types/Accounts';
|
|
3
|
+
import { ProjectConfig } from '../../../types/Projects';
|
|
4
|
+
import { ProjectDevArgs } from '../../../types/Yargs';
|
|
5
|
+
export declare function deprecatedProjectDevFlow(args: ArgumentsCamelCase<ProjectDevArgs>, accountConfig: CLIAccount, projectConfig: ProjectConfig, projectDir: string): Promise<void>;
|
|
@@ -0,0 +1,137 @@
|
|
|
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
|
+
exports.deprecatedProjectDevFlow = deprecatedProjectDevFlow;
|
|
7
|
+
const logger_1 = require("@hubspot/local-dev-lib/logger");
|
|
8
|
+
const config_1 = require("@hubspot/local-dev-lib/config");
|
|
9
|
+
const environment_1 = require("@hubspot/local-dev-lib/environment");
|
|
10
|
+
const structure_1 = require("../../../lib/projects/structure");
|
|
11
|
+
const Projects_1 = require("../../../types/Projects");
|
|
12
|
+
const lang_1 = require("../../../lib/lang");
|
|
13
|
+
const exitCodes_1 = require("../../../lib/enums/exitCodes");
|
|
14
|
+
const ui_1 = require("../../../lib/ui");
|
|
15
|
+
const SpinniesManager_1 = __importDefault(require("../../../lib/ui/SpinniesManager"));
|
|
16
|
+
const LocalDevManager_1 = __importDefault(require("../../../lib/LocalDevManager"));
|
|
17
|
+
const localDev_1 = require("../../../lib/localDev");
|
|
18
|
+
const process_1 = require("../../../lib/process");
|
|
19
|
+
const accountTypes_1 = require("../../../lib/accountTypes");
|
|
20
|
+
const projects_1 = require("../../../lib/projects");
|
|
21
|
+
const i18nKey = 'commands.project.subcommands.dev';
|
|
22
|
+
async function deprecatedProjectDevFlow(args, accountConfig, projectConfig, projectDir) {
|
|
23
|
+
const { providedAccountId, derivedAccountId } = args;
|
|
24
|
+
const env = (0, environment_1.getValidEnv)((0, config_1.getEnv)(derivedAccountId));
|
|
25
|
+
const components = await (0, structure_1.findProjectComponents)(projectDir);
|
|
26
|
+
const runnableComponents = components.filter(component => component.runnable);
|
|
27
|
+
const componentTypes = (0, structure_1.getProjectComponentTypes)(runnableComponents);
|
|
28
|
+
const hasPrivateApps = !!componentTypes[Projects_1.ComponentTypes.PrivateApp];
|
|
29
|
+
const hasPublicApps = !!componentTypes[Projects_1.ComponentTypes.PublicApp];
|
|
30
|
+
if (runnableComponents.length === 0) {
|
|
31
|
+
logger_1.logger.error((0, lang_1.i18n)(`${i18nKey}.errors.noRunnableComponents`, {
|
|
32
|
+
projectDir,
|
|
33
|
+
command: (0, ui_1.uiCommandReference)('hs project add'),
|
|
34
|
+
}));
|
|
35
|
+
process.exit(exitCodes_1.EXIT_CODES.SUCCESS);
|
|
36
|
+
}
|
|
37
|
+
else if (hasPrivateApps && hasPublicApps) {
|
|
38
|
+
logger_1.logger.error((0, lang_1.i18n)(`${i18nKey}.errors.invalidProjectComponents`));
|
|
39
|
+
process.exit(exitCodes_1.EXIT_CODES.SUCCESS);
|
|
40
|
+
}
|
|
41
|
+
const accounts = (0, config_1.getConfigAccounts)();
|
|
42
|
+
if (!accounts) {
|
|
43
|
+
logger_1.logger.error((0, lang_1.i18n)(`${i18nKey}.errors.noAccountsInConfig`, {
|
|
44
|
+
authCommand: (0, ui_1.uiCommandReference)('hs auth'),
|
|
45
|
+
}));
|
|
46
|
+
process.exit(exitCodes_1.EXIT_CODES.ERROR);
|
|
47
|
+
}
|
|
48
|
+
const defaultAccountIsRecommendedType = (0, accountTypes_1.isDeveloperTestAccount)(accountConfig) ||
|
|
49
|
+
(!hasPublicApps && (0, accountTypes_1.isSandbox)(accountConfig));
|
|
50
|
+
// targetProjectAccountId and targetTestingAccountId are set to null if --account flag is not provided.
|
|
51
|
+
// By setting them to null, we can later check if they need to be assigned based on the default account configuration and the type of app.
|
|
52
|
+
let targetProjectAccountId = providedAccountId ? derivedAccountId : null;
|
|
53
|
+
// The account that we are locally testing against
|
|
54
|
+
let targetTestingAccountId = providedAccountId ? derivedAccountId : null;
|
|
55
|
+
// Check that the default account or flag option is valid for the type of app in this project
|
|
56
|
+
if (providedAccountId) {
|
|
57
|
+
(0, localDev_1.checkIfAccountFlagIsSupported)(accountConfig, hasPublicApps);
|
|
58
|
+
if (hasPublicApps) {
|
|
59
|
+
targetProjectAccountId = accountConfig.parentAccountId || null;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
else {
|
|
63
|
+
(0, localDev_1.checkIfDefaultAccountIsSupported)(accountConfig, hasPublicApps);
|
|
64
|
+
}
|
|
65
|
+
// The user is targeting an account type that we recommend developing on
|
|
66
|
+
if (!targetProjectAccountId && defaultAccountIsRecommendedType) {
|
|
67
|
+
targetTestingAccountId = derivedAccountId;
|
|
68
|
+
await (0, localDev_1.confirmDefaultAccountIsTarget)(accountConfig);
|
|
69
|
+
if (hasPublicApps) {
|
|
70
|
+
(0, localDev_1.checkIfParentAccountIsAuthed)(accountConfig);
|
|
71
|
+
targetProjectAccountId = accountConfig.parentAccountId || null;
|
|
72
|
+
}
|
|
73
|
+
else {
|
|
74
|
+
targetProjectAccountId = derivedAccountId;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
let createNewSandbox = false;
|
|
78
|
+
let createNewDeveloperTestAccount = false;
|
|
79
|
+
if (!targetProjectAccountId) {
|
|
80
|
+
const { targetAccountId, parentAccountId, createNestedAccount, notInConfigAccount, } = await (0, localDev_1.suggestRecommendedNestedAccount)(accounts, accountConfig, hasPublicApps);
|
|
81
|
+
targetProjectAccountId = hasPublicApps
|
|
82
|
+
? parentAccountId || null
|
|
83
|
+
: targetAccountId;
|
|
84
|
+
targetTestingAccountId = targetAccountId;
|
|
85
|
+
// Only used for developer test accounts that are not yet in the config
|
|
86
|
+
if (notInConfigAccount) {
|
|
87
|
+
await (0, localDev_1.useExistingDevTestAccount)(env, notInConfigAccount);
|
|
88
|
+
}
|
|
89
|
+
createNewSandbox = (0, accountTypes_1.isStandardAccount)(accountConfig) && createNestedAccount;
|
|
90
|
+
createNewDeveloperTestAccount =
|
|
91
|
+
(0, accountTypes_1.isAppDeveloperAccount)(accountConfig) && createNestedAccount;
|
|
92
|
+
}
|
|
93
|
+
if (createNewSandbox) {
|
|
94
|
+
targetProjectAccountId = await (0, localDev_1.createSandboxForLocalDev)(derivedAccountId, accountConfig, env);
|
|
95
|
+
// We will be running our tests against this new sandbox account
|
|
96
|
+
targetTestingAccountId = targetProjectAccountId;
|
|
97
|
+
}
|
|
98
|
+
if (createNewDeveloperTestAccount) {
|
|
99
|
+
targetTestingAccountId = await (0, localDev_1.createDeveloperTestAccountForLocalDev)(derivedAccountId, accountConfig, env);
|
|
100
|
+
targetProjectAccountId = derivedAccountId;
|
|
101
|
+
}
|
|
102
|
+
if (!targetProjectAccountId || !targetTestingAccountId) {
|
|
103
|
+
logger_1.logger.error((0, lang_1.i18n)(`${i18nKey}.errors.noAccount`));
|
|
104
|
+
process.exit(exitCodes_1.EXIT_CODES.ERROR);
|
|
105
|
+
}
|
|
106
|
+
// eslint-disable-next-line prefer-const
|
|
107
|
+
let { projectExists, project } = await (0, projects_1.ensureProjectExists)(targetProjectAccountId, projectConfig.name, {
|
|
108
|
+
allowCreate: false,
|
|
109
|
+
noLogs: true,
|
|
110
|
+
withPolling: createNewSandbox,
|
|
111
|
+
});
|
|
112
|
+
let deployedBuild;
|
|
113
|
+
let isGithubLinked = false;
|
|
114
|
+
SpinniesManager_1.default.init();
|
|
115
|
+
if (projectExists && project) {
|
|
116
|
+
deployedBuild = project.deployedBuild;
|
|
117
|
+
isGithubLinked = Boolean(project.sourceIntegration && project.sourceIntegration.source === 'GITHUB');
|
|
118
|
+
}
|
|
119
|
+
else {
|
|
120
|
+
project = await (0, localDev_1.createNewProjectForLocalDev)(projectConfig, targetProjectAccountId, createNewSandbox, hasPublicApps);
|
|
121
|
+
deployedBuild = await (0, localDev_1.createInitialBuildForNewProject)(projectConfig, projectDir, targetProjectAccountId);
|
|
122
|
+
}
|
|
123
|
+
const LocalDev = new LocalDevManager_1.default({
|
|
124
|
+
runnableComponents,
|
|
125
|
+
debug: args.debug,
|
|
126
|
+
deployedBuild,
|
|
127
|
+
isGithubLinked,
|
|
128
|
+
parentAccountId: targetProjectAccountId,
|
|
129
|
+
projectConfig,
|
|
130
|
+
projectDir,
|
|
131
|
+
projectId: project.id,
|
|
132
|
+
targetAccountId: targetTestingAccountId,
|
|
133
|
+
env,
|
|
134
|
+
});
|
|
135
|
+
await LocalDev.start();
|
|
136
|
+
(0, process_1.handleExit)(({ isSIGHUP }) => LocalDev.stop(!isSIGHUP));
|
|
137
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ArgumentsCamelCase, Argv } from 'yargs';
|
|
2
|
+
import { ProjectDevArgs } from '../../../types/Yargs';
|
|
3
|
+
export declare const command = "dev";
|
|
4
|
+
export declare const describe: string | undefined;
|
|
5
|
+
export declare function handler(args: ArgumentsCamelCase<ProjectDevArgs>): Promise<void>;
|
|
6
|
+
export declare function builder(yargs: Argv): Argv<ProjectDevArgs>;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.describe = exports.command = void 0;
|
|
4
|
+
exports.handler = handler;
|
|
5
|
+
exports.builder = builder;
|
|
6
|
+
const commonOpts_1 = require("../../../lib/commonOpts");
|
|
7
|
+
const usageTracking_1 = require("../../../lib/usageTracking");
|
|
8
|
+
const lang_1 = require("../../../lib/lang");
|
|
9
|
+
const logger_1 = require("@hubspot/local-dev-lib/logger");
|
|
10
|
+
const config_1 = require("@hubspot/local-dev-lib/config");
|
|
11
|
+
const projects_1 = require("../../../lib/projects");
|
|
12
|
+
const exitCodes_1 = require("../../../lib/enums/exitCodes");
|
|
13
|
+
const ui_1 = require("../../../lib/ui");
|
|
14
|
+
const deprecatedFlow_1 = require("./deprecatedFlow");
|
|
15
|
+
const unifiedFlow_1 = require("./unifiedFlow");
|
|
16
|
+
const buildAndDeploy_1 = require("../../../lib/projects/buildAndDeploy");
|
|
17
|
+
const i18nKey = 'commands.project.subcommands.dev';
|
|
18
|
+
exports.command = 'dev';
|
|
19
|
+
exports.describe = (0, ui_1.uiBetaTag)((0, lang_1.i18n)(`${i18nKey}.describe`), false);
|
|
20
|
+
async function handler(args) {
|
|
21
|
+
const { derivedAccountId } = args;
|
|
22
|
+
const accountConfig = (0, config_1.getAccountConfig)(derivedAccountId);
|
|
23
|
+
(0, usageTracking_1.trackCommandUsage)('project-dev', {}, derivedAccountId);
|
|
24
|
+
const { projectConfig, projectDir } = await (0, projects_1.getProjectConfig)();
|
|
25
|
+
(0, ui_1.uiBetaTag)((0, lang_1.i18n)(`${i18nKey}.logs.betaMessage`));
|
|
26
|
+
logger_1.logger.log((0, ui_1.uiLink)((0, lang_1.i18n)(`${i18nKey}.logs.learnMoreLocalDevServer`), 'https://developers.hubspot.com/docs/platform/project-cli-commands#start-a-local-development-server'));
|
|
27
|
+
if (!projectConfig || !projectDir) {
|
|
28
|
+
logger_1.logger.error((0, lang_1.i18n)(`${i18nKey}.errors.noProjectConfig`, {
|
|
29
|
+
accountId: derivedAccountId,
|
|
30
|
+
authCommand: (0, ui_1.uiCommandReference)('hs auth'),
|
|
31
|
+
}));
|
|
32
|
+
process.exit(exitCodes_1.EXIT_CODES.ERROR);
|
|
33
|
+
}
|
|
34
|
+
if (!accountConfig) {
|
|
35
|
+
logger_1.logger.error((0, lang_1.i18n)(`${i18nKey}.errors.noAccount`));
|
|
36
|
+
process.exit(exitCodes_1.EXIT_CODES.ERROR);
|
|
37
|
+
}
|
|
38
|
+
(0, projects_1.validateProjectConfig)(projectConfig, projectDir);
|
|
39
|
+
if ((0, buildAndDeploy_1.useV3Api)(projectConfig?.platformVersion)) {
|
|
40
|
+
await (0, unifiedFlow_1.unifiedProjectDevFlow)(args, accountConfig, projectConfig, projectDir);
|
|
41
|
+
}
|
|
42
|
+
else {
|
|
43
|
+
await (0, deprecatedFlow_1.deprecatedProjectDevFlow)(args, accountConfig, projectConfig, projectDir);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
function builder(yargs) {
|
|
47
|
+
(0, commonOpts_1.addConfigOptions)(yargs);
|
|
48
|
+
(0, commonOpts_1.addAccountOptions)(yargs);
|
|
49
|
+
(0, commonOpts_1.addUseEnvironmentOptions)(yargs);
|
|
50
|
+
yargs.example([['$0 project dev', (0, lang_1.i18n)(`${i18nKey}.examples.default`)]]);
|
|
51
|
+
return yargs;
|
|
52
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { ArgumentsCamelCase } from 'yargs';
|
|
2
|
+
import { CLIAccount } from '@hubspot/local-dev-lib/types/Accounts';
|
|
3
|
+
import { ProjectDevArgs } from '../../../types/Yargs';
|
|
4
|
+
import { ProjectConfig } from '../../../types/Projects';
|
|
5
|
+
export declare function unifiedProjectDevFlow(args: ArgumentsCamelCase<ProjectDevArgs>, accountConfig: CLIAccount, projectConfig: ProjectConfig, projectDir: string): Promise<void>;
|
|
@@ -0,0 +1,112 @@
|
|
|
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
|
+
exports.unifiedProjectDevFlow = unifiedProjectDevFlow;
|
|
7
|
+
const path_1 = __importDefault(require("path"));
|
|
8
|
+
const util_1 = __importDefault(require("util"));
|
|
9
|
+
const logger_1 = require("@hubspot/local-dev-lib/logger");
|
|
10
|
+
const errors_1 = require("@hubspot/project-parsing-lib/src/lib/errors");
|
|
11
|
+
const project_parsing_lib_1 = require("@hubspot/project-parsing-lib");
|
|
12
|
+
const config_1 = require("@hubspot/local-dev-lib/config");
|
|
13
|
+
const environment_1 = require("@hubspot/local-dev-lib/environment");
|
|
14
|
+
const errorHandlers_1 = require("../../../lib/errorHandlers");
|
|
15
|
+
const exitCodes_1 = require("../../../lib/enums/exitCodes");
|
|
16
|
+
const projects_1 = require("../../../lib/projects");
|
|
17
|
+
const localDev_1 = require("../../../lib/localDev");
|
|
18
|
+
const projectDevTargetAccountPrompt_1 = require("../../../lib/prompts/projectDevTargetAccountPrompt");
|
|
19
|
+
const SpinniesManager_1 = __importDefault(require("../../../lib/ui/SpinniesManager"));
|
|
20
|
+
const LocalDevManagerV2_1 = __importDefault(require("../../../lib/LocalDevManagerV2"));
|
|
21
|
+
const process_1 = require("../../../lib/process");
|
|
22
|
+
const accountTypes_1 = require("../../../lib/accountTypes");
|
|
23
|
+
const ui_1 = require("../../../lib/ui");
|
|
24
|
+
const lang_1 = require("../../../lib/lang");
|
|
25
|
+
const i18nKey = 'commands.project.subcommands.dev';
|
|
26
|
+
async function unifiedProjectDevFlow(args, accountConfig, projectConfig, projectDir) {
|
|
27
|
+
logger_1.logger.log('Unified Apps Local Dev');
|
|
28
|
+
const targetProjectAccountId = args.derivedAccountId;
|
|
29
|
+
const env = (0, environment_1.getValidEnv)((0, config_1.getEnv)(targetProjectAccountId));
|
|
30
|
+
let projectNodes;
|
|
31
|
+
// Get IR
|
|
32
|
+
try {
|
|
33
|
+
const intermediateRepresentation = await (0, project_parsing_lib_1.translateForLocalDev)({
|
|
34
|
+
projectSourceDir: path_1.default.join(projectDir, projectConfig.srcDir),
|
|
35
|
+
platformVersion: projectConfig.platformVersion,
|
|
36
|
+
accountId: targetProjectAccountId,
|
|
37
|
+
});
|
|
38
|
+
projectNodes = intermediateRepresentation.intermediateNodesIndexedByUid;
|
|
39
|
+
logger_1.logger.debug(util_1.default.inspect(projectNodes, false, null, true));
|
|
40
|
+
}
|
|
41
|
+
catch (e) {
|
|
42
|
+
if ((0, errors_1.isTranslationError)(e)) {
|
|
43
|
+
logger_1.logger.error(e.toString());
|
|
44
|
+
}
|
|
45
|
+
else {
|
|
46
|
+
(0, errorHandlers_1.logError)(e);
|
|
47
|
+
}
|
|
48
|
+
return process.exit(exitCodes_1.EXIT_CODES.ERROR);
|
|
49
|
+
}
|
|
50
|
+
// @TODO Do we need to do more than this or leave it to the dev servers?
|
|
51
|
+
if (!Object.keys(projectNodes).length) {
|
|
52
|
+
logger_1.logger.error((0, lang_1.i18n)(`${i18nKey}.errors.noRunnableComponents`, {
|
|
53
|
+
projectDir,
|
|
54
|
+
command: (0, ui_1.uiCommandReference)('hs project add'),
|
|
55
|
+
}));
|
|
56
|
+
process.exit(exitCodes_1.EXIT_CODES.SUCCESS);
|
|
57
|
+
}
|
|
58
|
+
// @TODO Validate component types (i.e. previously you could not have both private and public apps)
|
|
59
|
+
const accounts = (0, config_1.getConfigAccounts)();
|
|
60
|
+
// TODO Ideally this should require the user to target a Combined account
|
|
61
|
+
// For now, check if the account is either developer or standard
|
|
62
|
+
const derivedAccountIsRecommendedType = (0, accountTypes_1.isAppDeveloperAccount)(accountConfig) || (0, accountTypes_1.isStandardAccount)(accountConfig);
|
|
63
|
+
if (!derivedAccountIsRecommendedType) {
|
|
64
|
+
logger_1.logger.error((0, lang_1.i18n)(`${i18nKey}.errors.invalidUnifiedAppsAccount`), {
|
|
65
|
+
authCommand: (0, ui_1.uiCommandReference)('hs auth'),
|
|
66
|
+
});
|
|
67
|
+
process.exit(exitCodes_1.EXIT_CODES.SUCCESS);
|
|
68
|
+
}
|
|
69
|
+
let targetTestingAccountId = null;
|
|
70
|
+
const devAccountPromptResponse = await (0, projectDevTargetAccountPrompt_1.selectDeveloperTestTargetAccountPrompt)(accounts, accountConfig);
|
|
71
|
+
targetTestingAccountId = devAccountPromptResponse.targetAccountId;
|
|
72
|
+
if (!!devAccountPromptResponse.notInConfigAccount) {
|
|
73
|
+
// When the developer test account isn't configured in the CLI config yet
|
|
74
|
+
// Walk the user through adding the account's PAK to the config
|
|
75
|
+
await (0, localDev_1.useExistingDevTestAccount)(env, devAccountPromptResponse.notInConfigAccount);
|
|
76
|
+
}
|
|
77
|
+
else if (devAccountPromptResponse.createNestedAccount) {
|
|
78
|
+
// Create a new developer test account and automatically add it to the CLI config
|
|
79
|
+
targetTestingAccountId = await (0, localDev_1.createDeveloperTestAccountForLocalDev)(targetProjectAccountId, accountConfig, env);
|
|
80
|
+
}
|
|
81
|
+
// Check if project exists in HubSpot
|
|
82
|
+
const { projectExists, project: uploadedProject } = await (0, projects_1.ensureProjectExists)(targetProjectAccountId, projectConfig.name, {
|
|
83
|
+
allowCreate: false,
|
|
84
|
+
noLogs: true,
|
|
85
|
+
});
|
|
86
|
+
let deployedBuild;
|
|
87
|
+
let isGithubLinked = false;
|
|
88
|
+
let project = uploadedProject;
|
|
89
|
+
SpinniesManager_1.default.init();
|
|
90
|
+
if (projectExists && project) {
|
|
91
|
+
deployedBuild = project.deployedBuild;
|
|
92
|
+
isGithubLinked = Boolean(project.sourceIntegration && project.sourceIntegration.source === 'GITHUB');
|
|
93
|
+
}
|
|
94
|
+
else {
|
|
95
|
+
project = await (0, localDev_1.createNewProjectForLocalDev)(projectConfig, targetProjectAccountId, false, false);
|
|
96
|
+
deployedBuild = await (0, localDev_1.createInitialBuildForNewProject)(projectConfig, projectDir, targetProjectAccountId, true);
|
|
97
|
+
}
|
|
98
|
+
const LocalDev = new LocalDevManagerV2_1.default({
|
|
99
|
+
projectNodes,
|
|
100
|
+
debug: args.debug,
|
|
101
|
+
deployedBuild,
|
|
102
|
+
isGithubLinked,
|
|
103
|
+
targetProjectAccountId,
|
|
104
|
+
targetTestingAccountId: targetTestingAccountId,
|
|
105
|
+
projectConfig,
|
|
106
|
+
projectDir,
|
|
107
|
+
projectId: project.id,
|
|
108
|
+
env,
|
|
109
|
+
});
|
|
110
|
+
await LocalDev.start();
|
|
111
|
+
(0, process_1.handleExit)(({ isSIGHUP }) => LocalDev.stop(!isSIGHUP));
|
|
112
|
+
}
|
|
@@ -71,9 +71,9 @@ exports.handler = async (options) => {
|
|
|
71
71
|
let projectName;
|
|
72
72
|
let projectDest;
|
|
73
73
|
try {
|
|
74
|
-
const
|
|
75
|
-
projectName =
|
|
76
|
-
projectDest =
|
|
74
|
+
const createProjectPromptResponse = await createProjectPrompt(options);
|
|
75
|
+
projectName = createProjectPromptResponse.name;
|
|
76
|
+
projectDest = createProjectPromptResponse.dest;
|
|
77
77
|
const { projectExists } = await ensureProjectExists(derivedAccountId, projectName, {
|
|
78
78
|
allowCreate: false,
|
|
79
79
|
noLogs: true,
|
|
@@ -20,7 +20,7 @@ const i18nKey = 'commands.project.subcommands.upload';
|
|
|
20
20
|
exports.command = 'upload';
|
|
21
21
|
exports.describe = uiBetaTag(i18n(`${i18nKey}.describe`), false);
|
|
22
22
|
exports.handler = async (options) => {
|
|
23
|
-
const { forceCreate, message, derivedAccountId } = options;
|
|
23
|
+
const { forceCreate, message, derivedAccountId, skipValidation } = options;
|
|
24
24
|
const accountConfig = getAccountConfig(derivedAccountId);
|
|
25
25
|
const accountType = accountConfig && accountConfig.accountType;
|
|
26
26
|
const { projectConfig, projectDir } = await getProjectConfig();
|
|
@@ -31,7 +31,7 @@ exports.handler = async (options) => {
|
|
|
31
31
|
uploadCommand: true,
|
|
32
32
|
});
|
|
33
33
|
try {
|
|
34
|
-
const { result, uploadError } = await handleProjectUpload(derivedAccountId, projectConfig, projectDir, pollProjectBuildAndDeploy, message, useV3Api(projectConfig?.platformVersion));
|
|
34
|
+
const { result, uploadError } = await handleProjectUpload(derivedAccountId, projectConfig, projectDir, pollProjectBuildAndDeploy, message, useV3Api(projectConfig?.platformVersion), skipValidation);
|
|
35
35
|
if (uploadError) {
|
|
36
36
|
if (isSpecifiedError(uploadError, {
|
|
37
37
|
subCategory: PROJECT_ERROR_TYPES.PROJECT_LOCKED,
|
|
@@ -81,6 +81,11 @@ exports.builder = yargs => {
|
|
|
81
81
|
type: 'string',
|
|
82
82
|
default: '',
|
|
83
83
|
},
|
|
84
|
+
'skip-validation': {
|
|
85
|
+
type: 'boolean',
|
|
86
|
+
hidden: true,
|
|
87
|
+
default: false,
|
|
88
|
+
},
|
|
84
89
|
});
|
|
85
90
|
yargs.example([['$0 project upload', i18n(`${i18nKey}.examples.default`)]]);
|
|
86
91
|
addConfigOptions(yargs);
|
|
@@ -1 +1,13 @@
|
|
|
1
|
+
import { Argv, ArgumentsCamelCase } from 'yargs';
|
|
2
|
+
import { CommonArgs, ConfigArgs, AccountArgs, EnvironmentArgs, TestingArgs } from '../../types/Yargs';
|
|
3
|
+
export declare const command = "create";
|
|
4
|
+
export declare const describe: string | undefined;
|
|
5
|
+
type CombinedArgs = ConfigArgs & AccountArgs & EnvironmentArgs & TestingArgs;
|
|
6
|
+
type SandboxCreateArgs = CommonArgs & CombinedArgs & {
|
|
7
|
+
name?: string;
|
|
8
|
+
force?: boolean;
|
|
9
|
+
type?: string;
|
|
10
|
+
};
|
|
11
|
+
export declare function handler(args: ArgumentsCamelCase<SandboxCreateArgs>): Promise<void>;
|
|
12
|
+
export declare function builder(yargs: Argv): Argv<SandboxCreateArgs>;
|
|
1
13
|
export {};
|