@hubspot/local-dev-lib 3.3.2 → 3.4.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/config/configFile.js +1 -3
- package/config/index.d.ts +1 -0
- package/config/index.js +8 -1
- package/config/migrate.d.ts +22 -0
- package/config/migrate.js +166 -0
- package/constants/config.d.ts +8 -0
- package/constants/config.js +14 -1
- package/lang/en.json +6 -0
- package/package.json +4 -3
package/config/configFile.js
CHANGED
|
@@ -5,8 +5,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.writeConfigToFile = exports.loadConfigFromFile = exports.parseConfig = exports.readConfigFile = exports.deleteConfigFile = exports.configFileIsBlank = exports.configFileExists = exports.getConfigFilePath = void 0;
|
|
7
7
|
const fs_extra_1 = __importDefault(require("fs-extra"));
|
|
8
|
-
const path_1 = __importDefault(require("path"));
|
|
9
|
-
const os_1 = __importDefault(require("os"));
|
|
10
8
|
const js_yaml_1 = __importDefault(require("js-yaml"));
|
|
11
9
|
const logger_1 = require("../lib/logger");
|
|
12
10
|
const config_1 = require("../constants/config");
|
|
@@ -15,7 +13,7 @@ const lang_1 = require("../utils/lang");
|
|
|
15
13
|
const FileSystemError_1 = require("../models/FileSystemError");
|
|
16
14
|
const i18nKey = 'config.configFile';
|
|
17
15
|
function getConfigFilePath() {
|
|
18
|
-
return
|
|
16
|
+
return config_1.GLOBAL_CONFIG_PATH;
|
|
19
17
|
}
|
|
20
18
|
exports.getConfigFilePath = getConfigFilePath;
|
|
21
19
|
function configFileExists() {
|
package/config/index.d.ts
CHANGED
|
@@ -31,6 +31,7 @@ export declare function isTrackingAllowed(): boolean;
|
|
|
31
31
|
export declare function getEnv(nameOrId?: string | number): import("../types/Config").Environment;
|
|
32
32
|
export declare function getAccountType(accountType?: AccountType, sandboxAccountType?: string | null): AccountType;
|
|
33
33
|
export declare function getConfigDefaultAccount(): string | number | null | undefined;
|
|
34
|
+
export declare function getDisplayDefaultAccount(): string | number | null | undefined;
|
|
34
35
|
export declare function getConfigAccounts(): Array<CLIAccount_NEW> | Array<CLIAccount_DEPRECATED> | null | undefined;
|
|
35
36
|
export declare function updateDefaultCmsPublishMode(cmsPublishMode: CmsPublishMode): void | CLIConfig_NEW | null;
|
|
36
37
|
export declare function getCWDAccountOverride(): string | number | null | undefined;
|
package/config/index.js
CHANGED
|
@@ -23,7 +23,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.findConfig = exports.setConfigPath = exports.setConfig = exports.getOrderedConfig = exports.getOrderedAccount = exports.getConfigAccountId = exports.getDefaultAccountOverrideFilePath = exports.getCWDAccountOverride = exports.updateDefaultCmsPublishMode = exports.getConfigAccounts = exports.getConfigDefaultAccount = exports.getAccountType = exports.getEnv = exports.isTrackingAllowed = exports.isConfigFlagEnabled = exports.deleteConfigFile = exports.updateAllowUsageTracking = exports.updateHttpTimeout = exports.deleteAccount = exports.removeSandboxAccountFromConfig = exports.getAccountId = exports.renameAccount = exports.updateDefaultAccount = exports.updateAccountConfig = exports.accountNameExistsInConfig = exports.getAccountConfig = exports.configFileExists = exports.getConfigPath = exports.writeConfig = exports.getConfig = exports.deleteEmptyConfigFile = exports.createEmptyConfigFile = exports.loadConfigFromEnvironment = exports.validateConfig = exports.getAndLoadConfigIfNeeded = exports.loadConfig = void 0;
|
|
26
|
+
exports.findConfig = exports.setConfigPath = exports.setConfig = exports.getOrderedConfig = exports.getOrderedAccount = exports.getConfigAccountId = exports.getDefaultAccountOverrideFilePath = exports.getCWDAccountOverride = exports.updateDefaultCmsPublishMode = exports.getConfigAccounts = exports.getDisplayDefaultAccount = exports.getConfigDefaultAccount = exports.getAccountType = exports.getEnv = exports.isTrackingAllowed = exports.isConfigFlagEnabled = exports.deleteConfigFile = exports.updateAllowUsageTracking = exports.updateHttpTimeout = exports.deleteAccount = exports.removeSandboxAccountFromConfig = exports.getAccountId = exports.renameAccount = exports.updateDefaultAccount = exports.updateAccountConfig = exports.accountNameExistsInConfig = exports.getAccountConfig = exports.configFileExists = exports.getConfigPath = exports.writeConfig = exports.getConfig = exports.deleteEmptyConfigFile = exports.createEmptyConfigFile = exports.loadConfigFromEnvironment = exports.validateConfig = exports.getAndLoadConfigIfNeeded = exports.loadConfig = void 0;
|
|
27
27
|
const config_DEPRECATED = __importStar(require("./config_DEPRECATED"));
|
|
28
28
|
const CLIConfiguration_1 = require("./CLIConfiguration");
|
|
29
29
|
const configFile_1 = require("./configFile");
|
|
@@ -237,6 +237,13 @@ function getConfigDefaultAccount() {
|
|
|
237
237
|
return config_DEPRECATED.getConfigDefaultAccount();
|
|
238
238
|
}
|
|
239
239
|
exports.getConfigDefaultAccount = getConfigDefaultAccount;
|
|
240
|
+
function getDisplayDefaultAccount() {
|
|
241
|
+
if (CLIConfiguration_1.CLIConfiguration.isActive()) {
|
|
242
|
+
return CLIConfiguration_1.CLIConfiguration.config?.defaultAccount;
|
|
243
|
+
}
|
|
244
|
+
return config_DEPRECATED.getConfigDefaultAccount();
|
|
245
|
+
}
|
|
246
|
+
exports.getDisplayDefaultAccount = getDisplayDefaultAccount;
|
|
240
247
|
function getConfigAccounts() {
|
|
241
248
|
if (CLIConfiguration_1.CLIConfiguration.isActive()) {
|
|
242
249
|
return CLIConfiguration_1.CLIConfiguration.getConfigAccounts();
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { CLIConfig_DEPRECATED, CLIConfig_NEW, Environment } from '../types/Config';
|
|
2
|
+
import { CmsPublishMode } from '../types/Files';
|
|
3
|
+
export declare function getDeprecatedConfig(configPath?: string): CLIConfig_DEPRECATED | null;
|
|
4
|
+
export declare function getGlobalConfig(): CLIConfig_NEW | null;
|
|
5
|
+
export declare function configFileExists(useHiddenConfig?: boolean, configPath?: string): boolean;
|
|
6
|
+
export declare function getConfigPath(configPath?: string, useHiddenConfig?: boolean): string | null;
|
|
7
|
+
export declare function migrateConfig(deprecatedConfig: CLIConfig_DEPRECATED | null): void;
|
|
8
|
+
type ConflictValue = boolean | string | number | CmsPublishMode | Environment;
|
|
9
|
+
export type ConflictProperty = {
|
|
10
|
+
property: keyof CLIConfig_NEW;
|
|
11
|
+
oldValue: ConflictValue;
|
|
12
|
+
newValue: ConflictValue;
|
|
13
|
+
};
|
|
14
|
+
export declare function mergeConfigProperties(globalConfig: CLIConfig_NEW, deprecatedConfig: CLIConfig_DEPRECATED, force?: boolean): {
|
|
15
|
+
initialConfig: CLIConfig_NEW;
|
|
16
|
+
conflicts: Array<ConflictProperty>;
|
|
17
|
+
};
|
|
18
|
+
export declare function mergeExistingConfigs(globalConfig: CLIConfig_NEW, deprecatedConfig: CLIConfig_DEPRECATED): {
|
|
19
|
+
finalConfig: CLIConfig_NEW;
|
|
20
|
+
skippedAccountIds: Array<string | number>;
|
|
21
|
+
};
|
|
22
|
+
export {};
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
|
+
};
|
|
28
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
+
exports.mergeExistingConfigs = exports.mergeConfigProperties = exports.migrateConfig = exports.getConfigPath = exports.configFileExists = exports.getGlobalConfig = exports.getDeprecatedConfig = void 0;
|
|
30
|
+
const fs_1 = __importDefault(require("fs"));
|
|
31
|
+
const config_DEPRECATED = __importStar(require("./config_DEPRECATED"));
|
|
32
|
+
const CLIConfiguration_1 = require("./CLIConfiguration");
|
|
33
|
+
const index_1 = require("./index");
|
|
34
|
+
const configFile_1 = require("./configFile");
|
|
35
|
+
const config_1 = require("../constants/config");
|
|
36
|
+
const lang_1 = require("../utils/lang");
|
|
37
|
+
const i18nKey = 'config.migrate';
|
|
38
|
+
function getDeprecatedConfig(configPath) {
|
|
39
|
+
return config_DEPRECATED.loadConfig(configPath);
|
|
40
|
+
}
|
|
41
|
+
exports.getDeprecatedConfig = getDeprecatedConfig;
|
|
42
|
+
function getGlobalConfig() {
|
|
43
|
+
if (CLIConfiguration_1.CLIConfiguration.isActive()) {
|
|
44
|
+
return CLIConfiguration_1.CLIConfiguration.config;
|
|
45
|
+
}
|
|
46
|
+
return null;
|
|
47
|
+
}
|
|
48
|
+
exports.getGlobalConfig = getGlobalConfig;
|
|
49
|
+
function configFileExists(useHiddenConfig = false, configPath) {
|
|
50
|
+
return useHiddenConfig
|
|
51
|
+
? (0, configFile_1.configFileExists)()
|
|
52
|
+
: Boolean(configPath && fs_1.default.existsSync(configPath)) ||
|
|
53
|
+
Boolean(config_DEPRECATED.loadConfig(configPath));
|
|
54
|
+
}
|
|
55
|
+
exports.configFileExists = configFileExists;
|
|
56
|
+
function getConfigPath(configPath, useHiddenConfig = false) {
|
|
57
|
+
if (useHiddenConfig) {
|
|
58
|
+
return (0, configFile_1.getConfigFilePath)();
|
|
59
|
+
}
|
|
60
|
+
return config_DEPRECATED.getConfigPath(configPath);
|
|
61
|
+
}
|
|
62
|
+
exports.getConfigPath = getConfigPath;
|
|
63
|
+
function writeGlobalConfigFile(updatedConfig, isMigrating = false) {
|
|
64
|
+
const updatedConfigJson = JSON.stringify(updatedConfig);
|
|
65
|
+
if (isMigrating) {
|
|
66
|
+
(0, index_1.createEmptyConfigFile)({}, true);
|
|
67
|
+
}
|
|
68
|
+
(0, index_1.loadConfig)('');
|
|
69
|
+
try {
|
|
70
|
+
(0, index_1.writeConfig)({ source: updatedConfigJson });
|
|
71
|
+
config_DEPRECATED.deleteConfigFile();
|
|
72
|
+
}
|
|
73
|
+
catch (error) {
|
|
74
|
+
(0, index_1.deleteEmptyConfigFile)();
|
|
75
|
+
throw new Error((0, lang_1.i18n)(`${i18nKey}.errors.writeConfig`, { configPath: config_1.GLOBAL_CONFIG_PATH }), { cause: error });
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
function migrateConfig(deprecatedConfig) {
|
|
79
|
+
if (!deprecatedConfig) {
|
|
80
|
+
throw new Error((0, lang_1.i18n)(`${i18nKey}.errors.noDeprecatedConfig`));
|
|
81
|
+
}
|
|
82
|
+
const { defaultPortal, portals, ...rest } = deprecatedConfig;
|
|
83
|
+
const updatedConfig = {
|
|
84
|
+
...rest,
|
|
85
|
+
defaultAccount: defaultPortal,
|
|
86
|
+
accounts: portals
|
|
87
|
+
.filter(({ portalId }) => portalId !== undefined)
|
|
88
|
+
.map(({ portalId, ...rest }) => ({
|
|
89
|
+
...rest,
|
|
90
|
+
accountId: portalId,
|
|
91
|
+
})),
|
|
92
|
+
};
|
|
93
|
+
writeGlobalConfigFile(updatedConfig, true);
|
|
94
|
+
}
|
|
95
|
+
exports.migrateConfig = migrateConfig;
|
|
96
|
+
function mergeConfigProperties(globalConfig, deprecatedConfig, force) {
|
|
97
|
+
const propertiesToCheck = [
|
|
98
|
+
config_1.DEFAULT_CMS_PUBLISH_MODE,
|
|
99
|
+
config_1.HTTP_TIMEOUT,
|
|
100
|
+
config_1.ENV,
|
|
101
|
+
config_1.HTTP_USE_LOCALHOST,
|
|
102
|
+
config_1.ALLOW_USAGE_TRACKING,
|
|
103
|
+
];
|
|
104
|
+
const conflicts = [];
|
|
105
|
+
propertiesToCheck.forEach(prop => {
|
|
106
|
+
if (prop in globalConfig && prop in deprecatedConfig) {
|
|
107
|
+
if (force || globalConfig[prop] === deprecatedConfig[prop]) {
|
|
108
|
+
// @ts-expect-error Cannot reconcile CLIConfig_NEW and CLIConfig_DEPRECATED types
|
|
109
|
+
globalConfig[prop] = deprecatedConfig[prop];
|
|
110
|
+
}
|
|
111
|
+
else {
|
|
112
|
+
conflicts.push({
|
|
113
|
+
property: prop,
|
|
114
|
+
oldValue: deprecatedConfig[prop],
|
|
115
|
+
newValue: globalConfig[prop],
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
});
|
|
120
|
+
if (config_1.DEFAULT_ACCOUNT in globalConfig &&
|
|
121
|
+
config_1.DEFAULT_PORTAL in deprecatedConfig &&
|
|
122
|
+
globalConfig.defaultAccount !== deprecatedConfig.defaultPortal) {
|
|
123
|
+
conflicts.push({
|
|
124
|
+
property: config_1.DEFAULT_ACCOUNT,
|
|
125
|
+
oldValue: deprecatedConfig.defaultPortal,
|
|
126
|
+
newValue: globalConfig.defaultAccount,
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
else if (config_1.DEFAULT_PORTAL in deprecatedConfig) {
|
|
130
|
+
globalConfig.defaultAccount = deprecatedConfig.defaultPortal;
|
|
131
|
+
}
|
|
132
|
+
return { initialConfig: globalConfig, conflicts };
|
|
133
|
+
}
|
|
134
|
+
exports.mergeConfigProperties = mergeConfigProperties;
|
|
135
|
+
function mergeAccounts(globalConfig, deprecatedConfig) {
|
|
136
|
+
let existingAccountIds = [];
|
|
137
|
+
const skippedAccountIds = [];
|
|
138
|
+
if (globalConfig.accounts && deprecatedConfig.portals) {
|
|
139
|
+
existingAccountIds = globalConfig.accounts.map(account => account.accountId);
|
|
140
|
+
const newAccounts = deprecatedConfig.portals
|
|
141
|
+
.filter(portal => {
|
|
142
|
+
const isExisting = existingAccountIds.includes(portal.portalId);
|
|
143
|
+
if (isExisting) {
|
|
144
|
+
skippedAccountIds.push(portal.portalId);
|
|
145
|
+
}
|
|
146
|
+
return !isExisting;
|
|
147
|
+
})
|
|
148
|
+
.map(({ portalId, ...rest }) => ({
|
|
149
|
+
...rest,
|
|
150
|
+
accountId: portalId,
|
|
151
|
+
}));
|
|
152
|
+
if (newAccounts.length > 0) {
|
|
153
|
+
globalConfig.accounts.push(...newAccounts);
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
return {
|
|
157
|
+
finalConfig: globalConfig,
|
|
158
|
+
skippedAccountIds,
|
|
159
|
+
};
|
|
160
|
+
}
|
|
161
|
+
function mergeExistingConfigs(globalConfig, deprecatedConfig) {
|
|
162
|
+
const { finalConfig, skippedAccountIds } = mergeAccounts(globalConfig, deprecatedConfig);
|
|
163
|
+
writeGlobalConfigFile(finalConfig);
|
|
164
|
+
return { finalConfig, skippedAccountIds };
|
|
165
|
+
}
|
|
166
|
+
exports.mergeExistingConfigs = mergeExistingConfigs;
|
package/constants/config.d.ts
CHANGED
|
@@ -1,9 +1,17 @@
|
|
|
1
1
|
export declare const DEFAULT_HUBSPOT_CONFIG_YAML_FILE_NAME = "hubspot.config.yml";
|
|
2
2
|
export declare const HUBSPOT_CONFIGURATION_FOLDER = ".hscli";
|
|
3
3
|
export declare const HUBSPOT_CONFIGURATION_FILE = "config.yml";
|
|
4
|
+
export declare const GLOBAL_CONFIG_PATH: string;
|
|
4
5
|
export declare const DEFAULT_ACCOUNT_OVERRIDE_FILE_NAME = ".hsaccount";
|
|
5
6
|
export declare const DEFAULT_ACCOUNT_OVERRIDE_ERROR_INVALID_ID = "DEFAULT_ACCOUNT_OVERRIDE_ERROR_INVALID_ID";
|
|
6
7
|
export declare const DEFAULT_ACCOUNT_OVERRIDE_ERROR_ACCOUNT_NOT_FOUND = "DEFAULT_ACCOUNT_OVERRIDE_ERROR_ACCOUNT_NOT_FOUND";
|
|
8
|
+
export declare const DEFAULT_CMS_PUBLISH_MODE = "defaultCmsPublishMode";
|
|
9
|
+
export declare const HTTP_TIMEOUT = "httpTimeout";
|
|
10
|
+
export declare const ENV = "env";
|
|
11
|
+
export declare const HTTP_USE_LOCALHOST = "httpUseLocalhost";
|
|
12
|
+
export declare const ALLOW_USAGE_TRACKING = "allowUsageTracking";
|
|
13
|
+
export declare const DEFAULT_ACCOUNT = "defaultAccount";
|
|
14
|
+
export declare const DEFAULT_PORTAL = "defaultPortal";
|
|
7
15
|
export declare const MIN_HTTP_TIMEOUT = 3000;
|
|
8
16
|
export declare const HUBSPOT_ACCOUNT_TYPES: {
|
|
9
17
|
readonly DEVELOPMENT_SANDBOX: "DEVELOPMENT_SANDBOX";
|
package/constants/config.js
CHANGED
|
@@ -1,13 +1,26 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.HUBSPOT_ACCOUNT_TYPE_STRINGS = exports.HUBSPOT_ACCOUNT_TYPES = exports.MIN_HTTP_TIMEOUT = exports.DEFAULT_ACCOUNT_OVERRIDE_ERROR_ACCOUNT_NOT_FOUND = exports.DEFAULT_ACCOUNT_OVERRIDE_ERROR_INVALID_ID = exports.DEFAULT_ACCOUNT_OVERRIDE_FILE_NAME = exports.HUBSPOT_CONFIGURATION_FILE = exports.HUBSPOT_CONFIGURATION_FOLDER = exports.DEFAULT_HUBSPOT_CONFIG_YAML_FILE_NAME = void 0;
|
|
6
|
+
exports.HUBSPOT_ACCOUNT_TYPE_STRINGS = exports.HUBSPOT_ACCOUNT_TYPES = exports.MIN_HTTP_TIMEOUT = exports.DEFAULT_PORTAL = exports.DEFAULT_ACCOUNT = exports.ALLOW_USAGE_TRACKING = exports.HTTP_USE_LOCALHOST = exports.ENV = exports.HTTP_TIMEOUT = exports.DEFAULT_CMS_PUBLISH_MODE = exports.DEFAULT_ACCOUNT_OVERRIDE_ERROR_ACCOUNT_NOT_FOUND = exports.DEFAULT_ACCOUNT_OVERRIDE_ERROR_INVALID_ID = exports.DEFAULT_ACCOUNT_OVERRIDE_FILE_NAME = exports.GLOBAL_CONFIG_PATH = exports.HUBSPOT_CONFIGURATION_FILE = exports.HUBSPOT_CONFIGURATION_FOLDER = exports.DEFAULT_HUBSPOT_CONFIG_YAML_FILE_NAME = void 0;
|
|
4
7
|
const lang_1 = require("../utils/lang");
|
|
8
|
+
const path_1 = __importDefault(require("path"));
|
|
9
|
+
const os_1 = __importDefault(require("os"));
|
|
5
10
|
exports.DEFAULT_HUBSPOT_CONFIG_YAML_FILE_NAME = 'hubspot.config.yml';
|
|
6
11
|
exports.HUBSPOT_CONFIGURATION_FOLDER = '.hscli';
|
|
7
12
|
exports.HUBSPOT_CONFIGURATION_FILE = 'config.yml';
|
|
13
|
+
exports.GLOBAL_CONFIG_PATH = path_1.default.join(os_1.default.homedir(), exports.HUBSPOT_CONFIGURATION_FOLDER, exports.HUBSPOT_CONFIGURATION_FILE);
|
|
8
14
|
exports.DEFAULT_ACCOUNT_OVERRIDE_FILE_NAME = '.hsaccount';
|
|
9
15
|
exports.DEFAULT_ACCOUNT_OVERRIDE_ERROR_INVALID_ID = 'DEFAULT_ACCOUNT_OVERRIDE_ERROR_INVALID_ID';
|
|
10
16
|
exports.DEFAULT_ACCOUNT_OVERRIDE_ERROR_ACCOUNT_NOT_FOUND = 'DEFAULT_ACCOUNT_OVERRIDE_ERROR_ACCOUNT_NOT_FOUND';
|
|
17
|
+
exports.DEFAULT_CMS_PUBLISH_MODE = 'defaultCmsPublishMode';
|
|
18
|
+
exports.HTTP_TIMEOUT = 'httpTimeout';
|
|
19
|
+
exports.ENV = 'env';
|
|
20
|
+
exports.HTTP_USE_LOCALHOST = 'httpUseLocalhost';
|
|
21
|
+
exports.ALLOW_USAGE_TRACKING = 'allowUsageTracking';
|
|
22
|
+
exports.DEFAULT_ACCOUNT = 'defaultAccount';
|
|
23
|
+
exports.DEFAULT_PORTAL = 'defaultPortal';
|
|
11
24
|
exports.MIN_HTTP_TIMEOUT = 3000;
|
|
12
25
|
exports.HUBSPOT_ACCOUNT_TYPES = {
|
|
13
26
|
DEVELOPMENT_SANDBOX: 'DEVELOPMENT_SANDBOX',
|
package/lang/en.json
CHANGED
|
@@ -311,6 +311,12 @@
|
|
|
311
311
|
"missingEnv": "Unable to load config from environment variables: Missing env",
|
|
312
312
|
"unknownAuthType": "Unable to load config from environment variables: Unknown auth type"
|
|
313
313
|
}
|
|
314
|
+
},
|
|
315
|
+
"migrate": {
|
|
316
|
+
"errors": {
|
|
317
|
+
"writeConfig": "Unable to write global configuration file at {{ configPath }}.",
|
|
318
|
+
"noDeprecatedConfig": "No deprecated configuration file found. Skipping migration to global config."
|
|
319
|
+
}
|
|
314
320
|
}
|
|
315
321
|
},
|
|
316
322
|
"models": {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hubspot/local-dev-lib",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.4.0-beta.0",
|
|
4
4
|
"description": "Provides library functionality for HubSpot local development tooling, including the HubSpot CLI",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -50,6 +50,7 @@
|
|
|
50
50
|
"./http": "./http/index.js",
|
|
51
51
|
"./http/*": "./http/*.js",
|
|
52
52
|
"./config/getAccountIdentifier": "./config/getAccountIdentifier.js",
|
|
53
|
+
"./config/migrate": "./config/migrate.js",
|
|
53
54
|
"./config": "./config/index.js",
|
|
54
55
|
"./constants/*": "./constants/*.js",
|
|
55
56
|
"./models/*": "./models/*.js",
|
|
@@ -57,13 +58,13 @@
|
|
|
57
58
|
},
|
|
58
59
|
"dependencies": {
|
|
59
60
|
"address": "2.0.2",
|
|
60
|
-
"axios": "1.
|
|
61
|
+
"axios": "1.8.3",
|
|
61
62
|
"chalk": "2.4.2",
|
|
62
63
|
"chokidar": "3.6.0",
|
|
63
64
|
"content-disposition": "0.5.4",
|
|
64
65
|
"cors": "2.8.5",
|
|
65
66
|
"debounce": "1.2.1",
|
|
66
|
-
"express": "4.
|
|
67
|
+
"express": "4.21.2",
|
|
67
68
|
"extract-zip": "2.0.1",
|
|
68
69
|
"findup-sync": "5.0.0",
|
|
69
70
|
"fs-extra": "11.2.0",
|