@hubspot/cli 7.0.22-experimental.0 → 7.0.23-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/lang/en.lyaml
CHANGED
|
@@ -1575,6 +1575,9 @@ en:
|
|
|
1575
1575
|
defaultAccountSubHeader: "Default Account: {{accountDetails}}"
|
|
1576
1576
|
noConfigFile: "CLI configuration not found"
|
|
1577
1577
|
noConfigFileSecondary: "Run {{command}} and follow the prompts to create your CLI configuration file and connect it to your HubSpot account"
|
|
1578
|
+
settings:
|
|
1579
|
+
httpUseLocalhost: "The setting {{#bold}}httpUseLocalhost{{/bold}} is enabled"
|
|
1580
|
+
httpUseLocalhostSecondary: "This setting causes all CLI requests to route to localhost"
|
|
1578
1581
|
projectConfig:
|
|
1579
1582
|
header: "Project configuration"
|
|
1580
1583
|
projectDirSubHeader: "Project dir: {{#bold}}{{ projectDir }}{{/bold}}"
|
|
@@ -21,6 +21,9 @@ export interface DiagnosticInfo extends FilesInfo {
|
|
|
21
21
|
npm: string | null;
|
|
22
22
|
};
|
|
23
23
|
config: string | null;
|
|
24
|
+
configSettings: {
|
|
25
|
+
[key: string]: unknown;
|
|
26
|
+
};
|
|
24
27
|
project: {
|
|
25
28
|
details?: Project;
|
|
26
29
|
config?: ProjectConfig;
|
|
@@ -41,6 +44,9 @@ export interface DiagnosticInfo extends FilesInfo {
|
|
|
41
44
|
}
|
|
42
45
|
export declare class DiagnosticInfoBuilder {
|
|
43
46
|
accountId: number | null;
|
|
47
|
+
readonly configSettings: {
|
|
48
|
+
[key: string]: unknown;
|
|
49
|
+
};
|
|
44
50
|
readonly env?: Environment;
|
|
45
51
|
readonly authType?: AuthType;
|
|
46
52
|
readonly accountType?: AccountType;
|
|
@@ -27,6 +27,7 @@ const configFiles = [
|
|
|
27
27
|
];
|
|
28
28
|
class DiagnosticInfoBuilder {
|
|
29
29
|
accountId;
|
|
30
|
+
configSettings;
|
|
30
31
|
env;
|
|
31
32
|
authType;
|
|
32
33
|
accountType;
|
|
@@ -39,6 +40,9 @@ class DiagnosticInfoBuilder {
|
|
|
39
40
|
constructor(processInfo) {
|
|
40
41
|
this.accountId = (0, config_1.getAccountId)();
|
|
41
42
|
const accountConfig = (0, config_2.getAccountConfig)(this.accountId);
|
|
43
|
+
this.configSettings = {
|
|
44
|
+
httpUseLocalhost: (0, config_1.isConfigFlagEnabled)('httpUseLocalhost'),
|
|
45
|
+
};
|
|
42
46
|
this.env = accountConfig?.env;
|
|
43
47
|
this.authType = accountConfig?.authType;
|
|
44
48
|
this.accountType = accountConfig?.accountType;
|
|
@@ -60,6 +64,7 @@ class DiagnosticInfoBuilder {
|
|
|
60
64
|
arch,
|
|
61
65
|
path: mainModule?.path,
|
|
62
66
|
config: (0, config_2.getConfigPath)(),
|
|
67
|
+
configSettings: this.configSettings,
|
|
63
68
|
versions: {
|
|
64
69
|
[hubspotCli]: package_json_1.default.version,
|
|
65
70
|
node,
|
package/lib/doctor/Doctor.d.ts
CHANGED
|
@@ -10,6 +10,7 @@ export declare class Doctor {
|
|
|
10
10
|
private performCliChecks;
|
|
11
11
|
private performProjectChecks;
|
|
12
12
|
private performCliConfigChecks;
|
|
13
|
+
private performCliConfigSettingsChecks;
|
|
13
14
|
private checkIfAccessTokenValid;
|
|
14
15
|
private checkIfNodeIsInstalled;
|
|
15
16
|
private checkIfNpmIsInstalled;
|
package/lib/doctor/Doctor.js
CHANGED
|
@@ -51,6 +51,7 @@ class Doctor {
|
|
|
51
51
|
...this.performCliConfigChecks(),
|
|
52
52
|
...(this.projectConfig?.projectConfig ? this.performProjectChecks() : []),
|
|
53
53
|
]);
|
|
54
|
+
this.performCliConfigSettingsChecks();
|
|
54
55
|
SpinniesManager_1.default.succeed('runningDiagnostics', {
|
|
55
56
|
text: i18n(`${i18nKey}.diagnosticsComplete`),
|
|
56
57
|
succeedColor: 'white',
|
|
@@ -87,6 +88,15 @@ class Doctor {
|
|
|
87
88
|
}
|
|
88
89
|
return [this.checkIfAccessTokenValid()];
|
|
89
90
|
}
|
|
91
|
+
performCliConfigSettingsChecks() {
|
|
92
|
+
if (this.diagnosticInfo?.configSettings.httpUseLocalhost) {
|
|
93
|
+
this.diagnosis?.addCLIConfigSection({
|
|
94
|
+
type: 'warning',
|
|
95
|
+
message: i18n(`${i18nKey}.diagnosis.cliConfig.settings.httpUseLocalhost`),
|
|
96
|
+
secondaryMessaging: i18n(`${i18nKey}.diagnosis.cliConfig.settings.httpUseLocalhostSecondary`),
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
}
|
|
90
100
|
async checkIfAccessTokenValid() {
|
|
91
101
|
const localI18nKey = `${i18nKey}.accountChecks`;
|
|
92
102
|
try {
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hubspot/cli",
|
|
3
|
-
"version": "7.0.
|
|
3
|
+
"version": "7.0.23-experimental.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
8
|
"@hubspot/local-dev-lib": "3.3.2",
|
|
9
|
-
"@hubspot/project-parsing-lib": "0.0.
|
|
9
|
+
"@hubspot/project-parsing-lib": "0.0.8-experimental.0",
|
|
10
10
|
"@hubspot/serverless-dev-runtime": "7.0.2",
|
|
11
11
|
"@hubspot/theme-preview-dev-server": "0.0.10",
|
|
12
12
|
"@hubspot/ui-extensions-dev-server": "0.8.42",
|