@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.
Files changed (67) hide show
  1. package/bin/cli.js +7 -2
  2. package/commands/account/info.d.ts +7 -0
  3. package/commands/account/info.js +28 -25
  4. package/commands/account/remove.js +4 -4
  5. package/commands/account/use.js +3 -3
  6. package/commands/auth.js +3 -3
  7. package/commands/function/deploy.js +1 -1
  8. package/commands/init.js +1 -1
  9. package/commands/logs.js +1 -7
  10. package/commands/project/cloneApp.js +1 -1
  11. package/commands/project/create.js +6 -0
  12. package/commands/project/dev.js +4 -3
  13. package/commands/project/installDeps.js +2 -4
  14. package/commands/project/migrateApp.js +1 -1
  15. package/commands/project/upload.js +4 -4
  16. package/commands/project/watch.js +4 -4
  17. package/commands/sandbox/create.js +7 -18
  18. package/commands/sandbox/delete.js +6 -10
  19. package/commands/theme/preview.js +3 -2
  20. package/lang/en.lyaml +11 -4
  21. package/lib/DevServerManager.d.ts +40 -1
  22. package/lib/DevServerManager.js +39 -30
  23. package/lib/LocalDevManager.d.ts +58 -1
  24. package/lib/LocalDevManager.js +162 -121
  25. package/lib/buildAccount.d.ts +12 -0
  26. package/lib/buildAccount.js +110 -95
  27. package/lib/commonOpts.d.ts +4 -8
  28. package/lib/commonOpts.js +2 -14
  29. package/lib/constants.d.ts +1 -7
  30. package/lib/constants.js +2 -8
  31. package/lib/dependencyManagement.d.ts +9 -4
  32. package/lib/dependencyManagement.js +45 -49
  33. package/lib/developerTestAccounts.d.ts +1 -0
  34. package/lib/developerTestAccounts.js +1 -0
  35. package/lib/errorHandlers/index.js +5 -2
  36. package/lib/localDev.d.ts +17 -1
  37. package/lib/localDev.js +203 -203
  38. package/lib/polling.d.ts +13 -5
  39. package/lib/polling.js +21 -7
  40. package/lib/projects/buildAndDeploy.d.ts +1 -7
  41. package/lib/projects/buildAndDeploy.js +3 -3
  42. package/lib/projects/index.js +9 -4
  43. package/lib/projects/structure.d.ts +5 -71
  44. package/lib/projects/structure.js +27 -10
  45. package/lib/projects/upload.d.ts +4 -3
  46. package/lib/projects/upload.js +3 -5
  47. package/lib/prompts/createProjectPrompt.js +8 -1
  48. package/lib/prompts/installPublicAppPrompt.d.ts +1 -1
  49. package/lib/prompts/personalAccessKeyPrompt.d.ts +1 -1
  50. package/lib/prompts/projectDevTargetAccountPrompt.d.ts +2 -2
  51. package/lib/sandboxSync.d.ts +4 -1
  52. package/lib/sandboxSync.js +67 -68
  53. package/lib/sandboxes.d.ts +20 -1
  54. package/lib/sandboxes.js +77 -175
  55. package/lib/serverlessLogs.d.ts +4 -1
  56. package/lib/serverlessLogs.js +64 -60
  57. package/lib/ui/serverlessFunctionLogs.d.ts +8 -0
  58. package/lib/ui/serverlessFunctionLogs.js +1 -3
  59. package/lib/validation.d.ts +2 -0
  60. package/lib/validation.js +5 -8
  61. package/package.json +8 -7
  62. package/types/Projects.d.ts +74 -0
  63. package/types/Projects.js +7 -0
  64. package/types/Sandboxes.d.ts +3 -0
  65. package/types/Sandboxes.js +2 -0
  66. package/types/Yargs.d.ts +14 -0
  67. 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.1",
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.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.40",
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": {
@@ -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 = {}));
@@ -0,0 +1,3 @@
1
+ export type SandboxSyncTask = {
2
+ type: string;
3
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -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
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });