@hubspot/cli 7.2.0-experimental.0 → 7.2.2-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/bin/cli.js +52 -3
- package/commands/account/auth.d.ts +10 -0
- package/commands/account/auth.js +154 -0
- package/commands/account/createOverride.d.ts +10 -0
- package/commands/account/createOverride.js +62 -0
- package/commands/account/list.js +4 -0
- package/commands/account.js +4 -0
- package/commands/auth.js +9 -5
- package/commands/config/migrate.d.ts +10 -0
- package/commands/config/migrate.js +86 -0
- package/commands/config/set.d.ts +12 -0
- package/commands/config/set.js +30 -29
- package/commands/config.d.ts +4 -1
- package/commands/config.js +45 -10
- package/commands/create/api-sample.js +4 -14
- package/commands/customObject/create.d.ts +0 -11
- package/commands/customObject/create.js +28 -37
- package/commands/customObject/schema/create.d.ts +0 -10
- package/commands/customObject/schema/create.js +42 -40
- package/commands/customObject/schema/delete.d.ts +0 -11
- package/commands/customObject/schema/delete.js +27 -34
- package/commands/customObject/schema/fetch-all.d.ts +0 -10
- package/commands/customObject/schema/fetch-all.js +24 -31
- package/commands/customObject/schema/fetch.d.ts +0 -11
- package/commands/customObject/schema/fetch.js +42 -34
- package/commands/customObject/schema/list.d.ts +0 -7
- package/commands/customObject/schema/list.js +14 -23
- package/commands/customObject/schema/update.d.ts +0 -11
- package/commands/customObject/schema/update.js +46 -44
- package/commands/customObject/schema.d.ts +1 -5
- package/commands/customObject/schema.js +11 -49
- package/commands/customObject.d.ts +1 -4
- package/commands/customObject.js +21 -54
- package/commands/filemanager/fetch.d.ts +0 -12
- package/commands/filemanager/fetch.js +30 -33
- package/commands/filemanager/upload.d.ts +0 -11
- package/commands/filemanager/upload.js +47 -53
- package/commands/filemanager.d.ts +1 -4
- package/commands/filemanager.js +7 -41
- package/commands/init.js +15 -26
- package/commands/project/add.js +16 -62
- package/commands/project/cloneApp.js +3 -3
- package/commands/project/create.js +15 -70
- package/commands/project/dev.d.ts +0 -7
- package/commands/project/dev.js +75 -96
- package/commands/project/migrateApp.js +3 -3
- package/commands/project/upload.js +2 -7
- package/commands/sandbox/create.d.ts +0 -12
- package/commands/sandbox/create.js +72 -90
- package/commands/sandbox/delete.d.ts +0 -11
- package/commands/sandbox/delete.js +95 -112
- package/commands/sandbox.d.ts +1 -4
- package/commands/sandbox.js +10 -44
- package/commands/theme/generate-selectors.d.ts +0 -9
- package/commands/theme/generate-selectors.js +43 -61
- package/commands/theme/marketplace-validate.d.ts +0 -10
- package/commands/theme/marketplace-validate.js +26 -32
- package/commands/theme/preview.d.ts +0 -16
- package/commands/theme/preview.js +97 -104
- package/commands/theme.d.ts +1 -4
- package/commands/theme.js +10 -44
- package/lang/en.lyaml +67 -39
- package/lib/LocalDevManager.d.ts +2 -2
- package/lib/buildAccount.d.ts +3 -2
- package/lib/configMigrate.d.ts +2 -0
- package/lib/configMigrate.js +83 -0
- package/lib/constants.d.ts +3 -0
- package/lib/constants.js +4 -1
- package/lib/doctor/Diagnosis.d.ts +1 -0
- package/lib/doctor/Diagnosis.js +7 -0
- package/lib/doctor/DiagnosticInfoBuilder.d.ts +1 -6
- package/lib/doctor/DiagnosticInfoBuilder.js +1 -5
- package/lib/doctor/Doctor.d.ts +1 -1
- package/lib/doctor/Doctor.js +14 -6
- package/lib/localDev.d.ts +1 -2
- package/lib/marketplaceValidate.d.ts +2 -2
- package/lib/projects/buildAndDeploy.js +1 -4
- package/lib/projects/index.d.ts +5 -1
- package/lib/projects/index.js +62 -1
- package/lib/projects/upload.d.ts +1 -1
- package/lib/projects/upload.js +2 -2
- package/lib/prompts/accountNamePrompt.d.ts +1 -1
- package/lib/prompts/createProjectPrompt.d.ts +8 -6
- package/lib/prompts/createProjectPrompt.js +54 -26
- package/lib/prompts/projectAddPrompt.d.ts +3 -3
- package/lib/prompts/projectAddPrompt.js +6 -16
- package/lib/prompts/projectDevTargetAccountPrompt.d.ts +2 -3
- package/lib/prompts/sandboxesPrompt.d.ts +2 -3
- package/lib/prompts/sandboxesPrompt.js +1 -1
- package/lib/sandboxSync.js +2 -6
- package/lib/sandboxes.d.ts +5 -2
- package/lib/ui/index.d.ts +1 -1
- package/lib/ui/index.js +0 -1
- package/lib/upload.d.ts +1 -1
- package/lib/upload.js +20 -20
- package/lib/usageTracking.d.ts +1 -1
- package/lib/validation.d.ts +1 -1
- package/package.json +3 -4
- package/types/Projects.d.ts +6 -1
- package/types/Prompts.d.ts +0 -7
- package/types/Sandboxes.d.ts +0 -2
- package/types/Yargs.d.ts +0 -7
- package/lib/customObject.d.ts +0 -3
- package/lib/customObject.js +0 -15
- package/lib/projects/create.d.ts +0 -5
- package/lib/projects/create.js +0 -51
- package/lib/testUtils.d.ts +0 -12
- package/lib/testUtils.js +0 -10
package/lib/projects/create.js
DELETED
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.EMPTY_PROJECT_TEMPLATE_NAME = void 0;
|
|
4
|
-
exports.getProjectComponentListFromRepo = getProjectComponentListFromRepo;
|
|
5
|
-
exports.getProjectTemplateListFromRepo = getProjectTemplateListFromRepo;
|
|
6
|
-
const logger_1 = require("@hubspot/local-dev-lib/logger");
|
|
7
|
-
const github_1 = require("@hubspot/local-dev-lib/api/github");
|
|
8
|
-
const constants_1 = require("../constants");
|
|
9
|
-
const exitCodes_1 = require("../enums/exitCodes");
|
|
10
|
-
const lang_1 = require("../lang");
|
|
11
|
-
const index_1 = require("../errorHandlers/index");
|
|
12
|
-
const i18nKey = 'lib.projects.create';
|
|
13
|
-
exports.EMPTY_PROJECT_TEMPLATE_NAME = 'no-template';
|
|
14
|
-
const PROJECT_TEMPLATE_PROPERTIES = ['name', 'label', 'path', 'insertPath'];
|
|
15
|
-
async function getProjectComponentListFromRepo(githubRef) {
|
|
16
|
-
let config;
|
|
17
|
-
try {
|
|
18
|
-
const { data } = await (0, github_1.fetchRepoFile)(constants_1.HUBSPOT_PROJECT_COMPONENTS_GITHUB_PATH, 'config.json', githubRef);
|
|
19
|
-
config = data;
|
|
20
|
-
}
|
|
21
|
-
catch (err) {
|
|
22
|
-
(0, index_1.debugError)(err);
|
|
23
|
-
}
|
|
24
|
-
if (config) {
|
|
25
|
-
return config[constants_1.PROJECT_COMPONENT_TYPES.COMPONENTS] || [];
|
|
26
|
-
}
|
|
27
|
-
return [];
|
|
28
|
-
}
|
|
29
|
-
async function getProjectTemplateListFromRepo(templateSource, githubRef) {
|
|
30
|
-
let config;
|
|
31
|
-
try {
|
|
32
|
-
const { data } = await (0, github_1.fetchRepoFile)(templateSource, 'config.json', githubRef);
|
|
33
|
-
config = data;
|
|
34
|
-
}
|
|
35
|
-
catch (e) {
|
|
36
|
-
(0, index_1.debugError)(e);
|
|
37
|
-
logger_1.logger.error((0, lang_1.i18n)(`${i18nKey}.errors.missingConfigFileTemplateSource`));
|
|
38
|
-
return process.exit(exitCodes_1.EXIT_CODES.ERROR);
|
|
39
|
-
}
|
|
40
|
-
if (!config || !config[constants_1.PROJECT_COMPONENT_TYPES.PROJECTS]) {
|
|
41
|
-
logger_1.logger.error((0, lang_1.i18n)(`${i18nKey}.errors.noProjectsInConfig`));
|
|
42
|
-
return process.exit(exitCodes_1.EXIT_CODES.ERROR);
|
|
43
|
-
}
|
|
44
|
-
const templates = config[constants_1.PROJECT_COMPONENT_TYPES.PROJECTS];
|
|
45
|
-
const templatesContainAllProperties = templates.every(config => PROJECT_TEMPLATE_PROPERTIES.every(p => Object.prototype.hasOwnProperty.call(config, p)));
|
|
46
|
-
if (!templatesContainAllProperties) {
|
|
47
|
-
logger_1.logger.error((0, lang_1.i18n)(`${i18nKey}.errors.missingPropertiesInConfig`));
|
|
48
|
-
return process.exit(exitCodes_1.EXIT_CODES.ERROR);
|
|
49
|
-
}
|
|
50
|
-
return templates;
|
|
51
|
-
}
|
package/lib/testUtils.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { HubSpotHttpError } from '@hubspot/local-dev-lib/models/HubSpotHttpError';
|
|
2
|
-
type MockResponse = {
|
|
3
|
-
status: number;
|
|
4
|
-
data: {
|
|
5
|
-
message?: string;
|
|
6
|
-
errorType?: string;
|
|
7
|
-
category?: string;
|
|
8
|
-
subCategory?: string;
|
|
9
|
-
};
|
|
10
|
-
};
|
|
11
|
-
export declare const makeHubSpotHttpError: (message: string, response: MockResponse) => HubSpotHttpError;
|
|
12
|
-
export {};
|
package/lib/testUtils.js
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.makeHubSpotHttpError = void 0;
|
|
4
|
-
const HubSpotHttpError_1 = require("@hubspot/local-dev-lib/models/HubSpotHttpError");
|
|
5
|
-
const makeHubSpotHttpError = (message, response) => {
|
|
6
|
-
return new HubSpotHttpError_1.HubSpotHttpError(message, {
|
|
7
|
-
cause: { isAxiosError: true, response },
|
|
8
|
-
});
|
|
9
|
-
};
|
|
10
|
-
exports.makeHubSpotHttpError = makeHubSpotHttpError;
|