@hubspot/cli 7.0.1 → 7.0.2-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/bin/cli.js +7 -2
- package/commands/account/info.d.ts +7 -0
- package/commands/account/info.js +28 -25
- package/commands/account/remove.js +4 -4
- package/commands/account/use.js +3 -3
- package/commands/auth.js +3 -3
- package/commands/function/deploy.js +1 -1
- package/commands/init.js +1 -1
- package/commands/logs.js +1 -7
- package/commands/project/cloneApp.js +1 -1
- package/commands/project/create.js +6 -0
- package/commands/project/dev.js +4 -3
- package/commands/project/installDeps.js +2 -4
- package/commands/project/migrateApp.js +1 -1
- package/commands/project/upload.js +4 -4
- package/commands/project/watch.js +4 -4
- package/commands/sandbox/create.js +7 -18
- package/commands/sandbox/delete.js +6 -10
- package/commands/theme/preview.js +3 -2
- package/lang/en.lyaml +11 -4
- package/lib/DevServerManager.d.ts +40 -1
- package/lib/DevServerManager.js +39 -30
- package/lib/LocalDevManager.d.ts +58 -1
- package/lib/LocalDevManager.js +162 -121
- package/lib/buildAccount.d.ts +12 -0
- package/lib/buildAccount.js +110 -95
- package/lib/commonOpts.d.ts +4 -8
- package/lib/commonOpts.js +2 -14
- package/lib/constants.d.ts +1 -7
- package/lib/constants.js +2 -8
- package/lib/dependencyManagement.d.ts +9 -4
- package/lib/dependencyManagement.js +45 -49
- package/lib/developerTestAccounts.d.ts +1 -0
- package/lib/developerTestAccounts.js +1 -0
- package/lib/errorHandlers/index.js +5 -2
- package/lib/localDev.d.ts +17 -1
- package/lib/localDev.js +203 -203
- package/lib/polling.d.ts +13 -5
- package/lib/polling.js +21 -7
- package/lib/projects/buildAndDeploy.d.ts +1 -7
- package/lib/projects/buildAndDeploy.js +3 -3
- package/lib/projects/index.js +9 -4
- package/lib/projects/structure.d.ts +5 -71
- package/lib/projects/structure.js +27 -10
- package/lib/projects/upload.d.ts +4 -3
- package/lib/projects/upload.js +3 -5
- package/lib/prompts/createProjectPrompt.js +8 -1
- package/lib/prompts/installPublicAppPrompt.d.ts +1 -1
- package/lib/prompts/personalAccessKeyPrompt.d.ts +1 -1
- package/lib/prompts/projectDevTargetAccountPrompt.d.ts +2 -2
- package/lib/sandboxSync.d.ts +4 -1
- package/lib/sandboxSync.js +67 -68
- package/lib/sandboxes.d.ts +20 -1
- package/lib/sandboxes.js +77 -175
- package/lib/serverlessLogs.d.ts +4 -1
- package/lib/serverlessLogs.js +64 -60
- package/lib/ui/serverlessFunctionLogs.d.ts +8 -0
- package/lib/ui/serverlessFunctionLogs.js +1 -3
- package/lib/validation.d.ts +2 -0
- package/lib/validation.js +5 -8
- package/package.json +8 -7
- package/types/Projects.d.ts +74 -0
- package/types/Projects.js +7 -0
- package/types/Sandboxes.d.ts +3 -0
- package/types/Sandboxes.js +2 -0
- package/types/Yargs.d.ts +14 -0
- package/types/Yargs.js +2 -0
package/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hubspot/cli",
|
|
3
|
-
"version": "7.0.
|
|
3
|
+
"version": "7.0.2-beta.0",
|
|
4
4
|
"description": "The official CLI for developing on HubSpot",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": "https://github.com/HubSpot/hubspot-cli",
|
|
7
7
|
"dependencies": {
|
|
8
|
-
"@hubspot/local-dev-lib": "3.1.
|
|
8
|
+
"@hubspot/local-dev-lib": "3.1.3",
|
|
9
9
|
"@hubspot/serverless-dev-runtime": "7.0.1",
|
|
10
10
|
"@hubspot/theme-preview-dev-server": "0.0.10",
|
|
11
|
-
"@hubspot/ui-extensions-dev-server": "0.8.
|
|
11
|
+
"@hubspot/ui-extensions-dev-server": "0.8.42",
|
|
12
12
|
"archiver": "^7.0.1",
|
|
13
13
|
"chalk": "^4.1.2",
|
|
14
14
|
"chokidar": "^3.0.1",
|
|
@@ -64,14 +64,15 @@
|
|
|
64
64
|
"list-all-commands": "yarn ts-node ./scripts/get-all-commands.ts",
|
|
65
65
|
"prettier:write": "prettier --write ./**/*.{ts,js,json}",
|
|
66
66
|
"test": "jest",
|
|
67
|
-
"test-cli": "yarn --cwd 'acceptance-tests' test-ci",
|
|
68
|
-
"test-cli-debug": "yarn --cwd 'acceptance-tests' test-debug",
|
|
69
|
-
"test-cli-qa": "yarn --cwd 'acceptance-tests' test-qa",
|
|
70
|
-
"test-cli-latest": "yarn build-docker && docker container run -it --rm --name=hs-cli-container hs-cli-image yarn --cwd 'acceptance-tests' test-latest",
|
|
67
|
+
"test-cli": "yarn build && yarn --cwd 'acceptance-tests' test-ci",
|
|
68
|
+
"test-cli-debug": "yarn build && yarn --cwd 'acceptance-tests' test-debug",
|
|
69
|
+
"test-cli-qa": "yarn build && yarn --cwd 'acceptance-tests' test-qa",
|
|
70
|
+
"test-cli-latest": "yarn build && yarn build-docker && docker container run -it --rm --name=hs-cli-container hs-cli-image yarn --cwd 'acceptance-tests' test-latest",
|
|
71
71
|
"build-docker": "docker image build --tag hs-cli-image . && docker image prune -f",
|
|
72
72
|
"circular-deps": "yarn madge --circular .",
|
|
73
73
|
"release": "yarn ts-node ./scripts/release.ts release",
|
|
74
74
|
"hs": "yarn build && node ./dist/bin/hs",
|
|
75
|
+
"hs-debug": "yarn build && NODE_DEBUG=http* node --inspect-brk ./dist/bin/hs",
|
|
75
76
|
"update-ldl": "yarn add --exact @hubspot/local-dev-lib@latest"
|
|
76
77
|
},
|
|
77
78
|
"lint-staged": {
|
package/types/Projects.d.ts
CHANGED
|
@@ -41,3 +41,77 @@ export type ProjectTemplateRepoConfig = {
|
|
|
41
41
|
projects?: ProjectTemplate[];
|
|
42
42
|
components?: ComponentTemplate[];
|
|
43
43
|
};
|
|
44
|
+
export type ProjectPollResult = {
|
|
45
|
+
succeeded: boolean;
|
|
46
|
+
buildId: number;
|
|
47
|
+
buildResult: Build;
|
|
48
|
+
deployResult: Deploy | null;
|
|
49
|
+
};
|
|
50
|
+
export type PrivateAppComponentConfig = {
|
|
51
|
+
name: string;
|
|
52
|
+
description: string;
|
|
53
|
+
uid: string;
|
|
54
|
+
scopes: Array<string>;
|
|
55
|
+
public: boolean;
|
|
56
|
+
extensions?: {
|
|
57
|
+
crm: {
|
|
58
|
+
cards: Array<{
|
|
59
|
+
file: string;
|
|
60
|
+
}>;
|
|
61
|
+
};
|
|
62
|
+
};
|
|
63
|
+
};
|
|
64
|
+
export type PublicAppComponentConfig = {
|
|
65
|
+
name: string;
|
|
66
|
+
uid: string;
|
|
67
|
+
description: string;
|
|
68
|
+
allowedUrls: Array<string>;
|
|
69
|
+
auth: {
|
|
70
|
+
redirectUrls: Array<string>;
|
|
71
|
+
requiredScopes: Array<string>;
|
|
72
|
+
optionalScopes: Array<string>;
|
|
73
|
+
conditionallyRequiredScopes: Array<string>;
|
|
74
|
+
};
|
|
75
|
+
support: {
|
|
76
|
+
supportEmail: string;
|
|
77
|
+
documentationUrl: string;
|
|
78
|
+
supportUrl: string;
|
|
79
|
+
supportPhone: string;
|
|
80
|
+
};
|
|
81
|
+
extensions?: {
|
|
82
|
+
crm: {
|
|
83
|
+
cards: Array<{
|
|
84
|
+
file: string;
|
|
85
|
+
}>;
|
|
86
|
+
};
|
|
87
|
+
};
|
|
88
|
+
webhooks?: {
|
|
89
|
+
file: string;
|
|
90
|
+
};
|
|
91
|
+
};
|
|
92
|
+
export type AppCardComponentConfig = {
|
|
93
|
+
type: 'crm-card';
|
|
94
|
+
data: {
|
|
95
|
+
title: string;
|
|
96
|
+
uid: string;
|
|
97
|
+
location: string;
|
|
98
|
+
module: {
|
|
99
|
+
file: string;
|
|
100
|
+
};
|
|
101
|
+
objectTypes: Array<{
|
|
102
|
+
name: string;
|
|
103
|
+
}>;
|
|
104
|
+
};
|
|
105
|
+
};
|
|
106
|
+
export type GenericComponentConfig = PublicAppComponentConfig | PrivateAppComponentConfig | AppCardComponentConfig;
|
|
107
|
+
export declare enum ComponentTypes {
|
|
108
|
+
PrivateApp = "private-app",
|
|
109
|
+
PublicApp = "public-app",
|
|
110
|
+
HublTheme = "hubl-theme"
|
|
111
|
+
}
|
|
112
|
+
export type Component<T = GenericComponentConfig> = {
|
|
113
|
+
type: ComponentTypes;
|
|
114
|
+
config: T;
|
|
115
|
+
runnable: boolean;
|
|
116
|
+
path: string;
|
|
117
|
+
};
|
package/types/Projects.js
CHANGED
|
@@ -1,2 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ComponentTypes = void 0;
|
|
4
|
+
var ComponentTypes;
|
|
5
|
+
(function (ComponentTypes) {
|
|
6
|
+
ComponentTypes["PrivateApp"] = "private-app";
|
|
7
|
+
ComponentTypes["PublicApp"] = "public-app";
|
|
8
|
+
ComponentTypes["HublTheme"] = "hubl-theme";
|
|
9
|
+
})(ComponentTypes || (exports.ComponentTypes = ComponentTypes = {}));
|
package/types/Yargs.d.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Options } from 'yargs';
|
|
2
|
+
export type CommonArgs = {
|
|
3
|
+
derivedAccountId: number;
|
|
4
|
+
providedAccountId?: number;
|
|
5
|
+
d: boolean;
|
|
6
|
+
debug: boolean;
|
|
7
|
+
};
|
|
8
|
+
export type ConfigArgs = {
|
|
9
|
+
c?: string;
|
|
10
|
+
config?: string;
|
|
11
|
+
};
|
|
12
|
+
export type StringArgType = Options & {
|
|
13
|
+
type: 'string';
|
|
14
|
+
};
|
package/types/Yargs.js
ADDED