@hubspot/local-dev-lib 0.1.1 → 0.1.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/LICENSE +12 -0
- package/README.md +17 -0
- package/api/appsDev.d.ts +6 -0
- package/api/appsDev.js +29 -0
- package/api/customObjects.d.ts +8 -7
- package/api/customObjects.js +13 -16
- package/api/designManager.d.ts +4 -13
- package/api/designManager.js +6 -9
- package/api/developerTestAccounts.d.ts +7 -0
- package/api/developerTestAccounts.js +48 -0
- package/api/fileManager.d.ts +5 -4
- package/api/fileManager.js +11 -11
- package/api/fileMapper.d.ts +8 -7
- package/api/fileMapper.js +17 -17
- package/api/fileTransport.d.ts +4 -0
- package/api/fileTransport.js +39 -0
- package/api/functions.d.ts +7 -4
- package/api/functions.js +22 -11
- package/api/github.d.ts +7 -9
- package/api/github.js +31 -13
- package/api/hubdb.d.ts +11 -10
- package/api/hubdb.js +28 -22
- package/api/lighthouseScore.d.ts +4 -4
- package/api/lighthouseScore.js +9 -12
- package/api/localDevAuth.d.ts +7 -15
- package/api/localDevAuth.js +28 -13
- package/api/marketplaceValidation.d.ts +4 -4
- package/api/marketplaceValidation.js +8 -11
- package/api/projects.d.ts +31 -24
- package/api/projects.js +154 -44
- package/api/sandboxHubs.d.ts +6 -4
- package/api/sandboxHubs.js +10 -11
- package/api/sandboxSync.d.ts +4 -4
- package/api/sandboxSync.js +4 -13
- package/api/secrets.d.ts +6 -8
- package/api/secrets.js +9 -12
- package/api/validateHubl.d.ts +2 -1
- package/api/validateHubl.js +3 -6
- package/config/CLIConfiguration.d.ts +15 -11
- package/config/CLIConfiguration.js +179 -90
- package/config/configFile.js +12 -18
- package/config/configUtils.d.ts +2 -21
- package/config/configUtils.js +5 -4
- package/config/config_DEPRECATED.d.ts +6 -8
- package/config/config_DEPRECATED.js +79 -25
- package/config/environment.js +5 -4
- package/config/getAccountIdentifier.d.ts +2 -0
- package/config/getAccountIdentifier.js +15 -0
- package/config/index.d.ts +12 -7
- package/config/index.js +95 -55
- package/constants/config.d.ts +18 -1
- package/constants/config.js +20 -3
- package/constants/environments.d.ts +1 -0
- package/constants/environments.js +1 -0
- package/constants/extensions.d.ts +2 -0
- package/constants/extensions.js +3 -1
- package/constants/files.d.ts +2 -2
- package/constants/files.js +3 -3
- package/errors/errors_DEPRECATED.d.ts +1 -5
- package/errors/errors_DEPRECATED.js +2 -2
- package/errors/index.d.ts +18 -0
- package/errors/index.js +63 -0
- package/http/addQueryParams.d.ts +2 -0
- package/http/addQueryParams.js +14 -0
- package/http/getAxiosConfig.d.ts +6 -3
- package/http/getAxiosConfig.js +51 -7
- package/http/index.d.ts +11 -12
- package/http/index.js +35 -41
- package/http/unauthed.d.ts +14 -0
- package/http/unauthed.js +38 -0
- package/lang/en.json +378 -383
- package/lib/archive.d.ts +2 -8
- package/lib/archive.js +34 -30
- package/lib/cms/functions.d.ts +7 -12
- package/lib/cms/functions.js +47 -50
- package/lib/cms/handleFieldsJS.js +16 -14
- package/lib/cms/modules.d.ts +5 -15
- package/lib/cms/modules.js +100 -39
- package/lib/cms/processFieldsJs.js +10 -33
- package/lib/cms/templates.d.ts +43 -3
- package/lib/cms/templates.js +51 -11
- package/lib/cms/uploadFolder.d.ts +3 -14
- package/lib/cms/uploadFolder.js +58 -42
- package/lib/cms/validate.js +1 -1
- package/lib/cms/watch.d.ts +2 -18
- package/lib/cms/watch.js +63 -68
- package/lib/customObjects.js +4 -15
- package/lib/fileManager.d.ts +2 -6
- package/lib/fileManager.js +54 -65
- package/lib/fileMapper.d.ts +4 -15
- package/lib/fileMapper.js +67 -88
- package/lib/fs.d.ts +1 -1
- package/lib/fs.js +10 -6
- package/lib/github.d.ts +5 -14
- package/lib/github.js +57 -28
- package/lib/gitignore.d.ts +2 -0
- package/lib/gitignore.js +21 -4
- package/lib/hubdb.d.ts +3 -2
- package/lib/hubdb.js +11 -9
- package/lib/{logging/logger.d.ts → logger.d.ts} +20 -8
- package/{utils → lib}/notify.js +2 -2
- package/lib/oauth.d.ts +2 -5
- package/lib/oauth.js +14 -25
- package/lib/path.d.ts +3 -0
- package/lib/path.js +46 -1
- package/lib/personalAccessKey.d.ts +7 -10
- package/lib/personalAccessKey.js +74 -47
- package/lib/portManager.d.ts +3 -5
- package/lib/portManager.js +18 -6
- package/lib/text.d.ts +1 -0
- package/lib/text.js +9 -1
- package/lib/trackUsage.js +18 -11
- package/lib/urls.js +5 -1
- package/models/FileSystemError.d.ts +6 -0
- package/models/FileSystemError.js +47 -0
- package/models/HubSpotHttpError.d.ts +24 -0
- package/models/HubSpotHttpError.js +197 -0
- package/models/OAuth2Manager.d.ts +5 -27
- package/models/OAuth2Manager.js +41 -64
- package/package.json +19 -18
- package/types/Accounts.d.ts +90 -3
- package/types/Apps.d.ts +77 -0
- package/types/Archive.d.ts +9 -0
- package/types/Archive.js +2 -0
- package/types/Build.d.ts +4 -2
- package/types/ComponentStructure.d.ts +30 -10
- package/types/Config.d.ts +19 -2
- package/types/Deploy.d.ts +3 -2
- package/types/DesignManager.d.ts +10 -0
- package/types/DesignManager.js +2 -0
- package/types/Error.d.ts +9 -5
- package/types/FieldsJS.d.ts +1 -0
- package/types/FieldsJS.js +2 -0
- package/types/FileManager.d.ts +1 -1
- package/types/Files.d.ts +43 -4
- package/types/Functions.d.ts +52 -0
- package/types/Github.d.ts +12 -0
- package/types/Http.d.ts +12 -11
- package/types/Hubdb.d.ts +9 -0
- package/types/MarketplaceValidation.d.ts +7 -3
- package/types/Migration.d.ts +28 -0
- package/types/Migration.js +10 -0
- package/types/Modules.d.ts +11 -0
- package/types/PortManager.d.ts +7 -0
- package/types/Project.d.ts +30 -0
- package/types/ProjectLog.d.ts +9 -0
- package/types/ProjectLog.js +2 -0
- package/types/Sandbox.d.ts +37 -47
- package/types/Schemas.d.ts +12 -0
- package/types/Secrets.d.ts +3 -0
- package/types/Secrets.js +2 -0
- package/types/developerTestAccounts.d.ts +13 -0
- package/types/developerTestAccounts.js +2 -0
- package/utils/PortManagerServer.d.ts +6 -7
- package/utils/PortManagerServer.js +22 -16
- package/utils/{getAccountIdentifier.d.ts → accounts.d.ts} +0 -6
- package/utils/{getAccountIdentifier.js → accounts.js} +1 -13
- package/utils/cms/fieldsJS.d.ts +1 -2
- package/utils/cms/modules.js +2 -2
- package/utils/detectPort.js +3 -3
- package/utils/git.d.ts +1 -7
- package/utils/git.js +2 -18
- package/errors/apiErrors.d.ts +0 -19
- package/errors/apiErrors.js +0 -179
- package/errors/fileSystemErrors.d.ts +0 -5
- package/errors/fileSystemErrors.js +0 -31
- package/errors/standardErrors.d.ts +0 -27
- package/errors/standardErrors.js +0 -59
- package/lang/lang/en.json +0 -398
- package/lib/logging/git.d.ts +0 -2
- package/lib/logging/git.js +0 -54
- package/lib/logging/logs.d.ts +0 -22
- package/lib/logging/logs.js +0 -86
- package/lib/logging/table.d.ts +0 -3
- package/lib/logging/table.js +0 -47
- package/lib/sandboxes.d.ts +0 -14
- package/lib/sandboxes.js +0 -71
- package/models/HubSpotAuthError.d.ts +0 -12
- package/models/HubSpotAuthError.js +0 -20
- package/types/LogCallbacks.d.ts +0 -7
- package/utils/logger.d.ts +0 -5
- package/utils/logger.js +0 -23
- package/utils/objectUtils.d.ts +0 -8
- package/utils/objectUtils.js +0 -33
- /package/{utils → lib}/escapeRegExp.d.ts +0 -0
- /package/{utils → lib}/escapeRegExp.js +0 -0
- /package/lib/{logging/logger.js → logger.js} +0 -0
- /package/{utils → lib}/notify.d.ts +0 -0
- /package/types/{LogCallbacks.js → Apps.js} +0 -0
|
@@ -1,7 +1,13 @@
|
|
|
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
|
-
|
|
4
|
-
const
|
|
6
|
+
exports.CLIConfiguration = void 0;
|
|
7
|
+
const fs_1 = __importDefault(require("fs"));
|
|
8
|
+
const findup_sync_1 = __importDefault(require("findup-sync"));
|
|
9
|
+
const path_1 = require("../lib/path");
|
|
10
|
+
const logger_1 = require("../lib/logger");
|
|
5
11
|
const environment_1 = require("./environment");
|
|
6
12
|
const environment_2 = require("../lib/environment");
|
|
7
13
|
const configFile_1 = require("./configFile");
|
|
@@ -10,17 +16,9 @@ const environments_1 = require("../constants/environments");
|
|
|
10
16
|
const auth_1 = require("../constants/auth");
|
|
11
17
|
const config_1 = require("../constants/config");
|
|
12
18
|
const files_1 = require("../constants/files");
|
|
19
|
+
const lang_1 = require("../utils/lang");
|
|
13
20
|
const i18nKey = 'config.cliConfiguration';
|
|
14
|
-
|
|
15
|
-
'noConfig',
|
|
16
|
-
'noConfigAccounts',
|
|
17
|
-
'emptyAccountConfig',
|
|
18
|
-
'noAccountId',
|
|
19
|
-
'duplicateAccountIds',
|
|
20
|
-
'duplicateAccountNames',
|
|
21
|
-
'nameContainsSpaces',
|
|
22
|
-
];
|
|
23
|
-
class CLIConfiguration {
|
|
21
|
+
class _CLIConfiguration {
|
|
24
22
|
options;
|
|
25
23
|
useEnvConfig;
|
|
26
24
|
config;
|
|
@@ -47,22 +45,22 @@ class CLIConfiguration {
|
|
|
47
45
|
if (this.options.useEnv) {
|
|
48
46
|
const configFromEnv = (0, environment_1.loadConfigFromEnvironment)();
|
|
49
47
|
if (configFromEnv) {
|
|
50
|
-
(0,
|
|
48
|
+
logger_1.logger.debug((0, lang_1.i18n)(`${i18nKey}.load.configFromEnv`, {
|
|
51
49
|
accountId: configFromEnv.accounts[0].accountId,
|
|
52
|
-
});
|
|
50
|
+
}));
|
|
53
51
|
this.useEnvConfig = true;
|
|
54
|
-
this.config = configFromEnv;
|
|
52
|
+
this.config = this.handleLegacyCmsPublishMode(configFromEnv);
|
|
55
53
|
}
|
|
56
54
|
}
|
|
57
55
|
else {
|
|
58
56
|
const configFromFile = (0, configFile_1.loadConfigFromFile)();
|
|
59
|
-
(0,
|
|
57
|
+
logger_1.logger.debug((0, lang_1.i18n)(`${i18nKey}.load.configFromFile`));
|
|
60
58
|
if (!configFromFile) {
|
|
61
|
-
(0,
|
|
59
|
+
logger_1.logger.debug((0, lang_1.i18n)(`${i18nKey}.load.empty`));
|
|
62
60
|
this.config = { accounts: [] };
|
|
63
61
|
}
|
|
64
62
|
this.useEnvConfig = false;
|
|
65
|
-
this.config = configFromFile;
|
|
63
|
+
this.config = this.handleLegacyCmsPublishMode(configFromFile);
|
|
66
64
|
}
|
|
67
65
|
return this.config;
|
|
68
66
|
}
|
|
@@ -97,48 +95,54 @@ class CLIConfiguration {
|
|
|
97
95
|
}
|
|
98
96
|
return this.config;
|
|
99
97
|
}
|
|
100
|
-
validate(
|
|
101
|
-
const validateLogger = (0, logger_1.makeTypedLogger)(logCallbacks);
|
|
98
|
+
validate() {
|
|
102
99
|
if (!this.config) {
|
|
103
|
-
|
|
100
|
+
logger_1.logger.log((0, lang_1.i18n)(`${i18nKey}.validate.noConfig`));
|
|
104
101
|
return false;
|
|
105
102
|
}
|
|
106
103
|
if (!Array.isArray(this.config.accounts)) {
|
|
107
|
-
|
|
104
|
+
logger_1.logger.log((0, lang_1.i18n)(`${i18nKey}.validate.noConfigAccounts`));
|
|
108
105
|
return false;
|
|
109
106
|
}
|
|
110
107
|
const accountIdsMap = {};
|
|
111
108
|
const accountNamesMap = {};
|
|
112
109
|
return this.config.accounts.every(accountConfig => {
|
|
113
110
|
if (!accountConfig) {
|
|
114
|
-
|
|
111
|
+
logger_1.logger.log((0, lang_1.i18n)(`${i18nKey}.validate.emptyAccountConfig`));
|
|
115
112
|
return false;
|
|
116
113
|
}
|
|
117
114
|
if (!accountConfig.accountId) {
|
|
118
|
-
|
|
115
|
+
logger_1.logger.log((0, lang_1.i18n)(`${i18nKey}.validate.noAccountId`));
|
|
119
116
|
return false;
|
|
120
117
|
}
|
|
121
118
|
if (accountIdsMap[accountConfig.accountId]) {
|
|
122
|
-
|
|
119
|
+
logger_1.logger.log((0, lang_1.i18n)(`${i18nKey}.validate.duplicateAccountIds`, {
|
|
123
120
|
accountId: accountConfig.accountId,
|
|
124
|
-
});
|
|
121
|
+
}));
|
|
125
122
|
return false;
|
|
126
123
|
}
|
|
127
124
|
if (accountConfig.name) {
|
|
128
|
-
if (accountNamesMap[accountConfig.name]) {
|
|
129
|
-
|
|
125
|
+
if (accountNamesMap[accountConfig.name.toLowerCase()]) {
|
|
126
|
+
logger_1.logger.log((0, lang_1.i18n)(`${i18nKey}.validate.duplicateAccountNames`, {
|
|
130
127
|
accountName: accountConfig.name,
|
|
131
|
-
});
|
|
128
|
+
}));
|
|
132
129
|
return false;
|
|
133
130
|
}
|
|
134
131
|
if (/\s+/.test(accountConfig.name)) {
|
|
135
|
-
|
|
132
|
+
logger_1.logger.log((0, lang_1.i18n)(`${i18nKey}.validate.nameContainsSpaces`, {
|
|
136
133
|
accountName: accountConfig.name,
|
|
137
|
-
});
|
|
134
|
+
}));
|
|
138
135
|
return false;
|
|
139
136
|
}
|
|
140
137
|
accountNamesMap[accountConfig.name] = true;
|
|
141
138
|
}
|
|
139
|
+
if (!accountConfig.accountType) {
|
|
140
|
+
this.addOrUpdateAccount({
|
|
141
|
+
...accountConfig,
|
|
142
|
+
accountId: accountConfig.accountId,
|
|
143
|
+
accountType: this.getAccountType(undefined, accountConfig.sandboxAccountType),
|
|
144
|
+
});
|
|
145
|
+
}
|
|
142
146
|
accountIdsMap[accountConfig.accountId] = true;
|
|
143
147
|
return true;
|
|
144
148
|
});
|
|
@@ -181,34 +185,76 @@ class CLIConfiguration {
|
|
|
181
185
|
return account ? account.accountId : null;
|
|
182
186
|
}
|
|
183
187
|
getDefaultAccount() {
|
|
184
|
-
return this.
|
|
185
|
-
? this.config.defaultAccount
|
|
186
|
-
: null;
|
|
188
|
+
return this.getCWDAccountOverride() || this.config?.defaultAccount || null;
|
|
187
189
|
}
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
190
|
+
getDefaultAccountOverrideFilePath() {
|
|
191
|
+
return (0, findup_sync_1.default)([config_1.DEFAULT_ACCOUNT_OVERRIDE_FILE_NAME], {
|
|
192
|
+
cwd: (0, path_1.getCwd)(),
|
|
193
|
+
});
|
|
194
|
+
}
|
|
195
|
+
getCWDAccountOverride() {
|
|
196
|
+
const defaultOverrideFile = this.getDefaultAccountOverrideFilePath();
|
|
197
|
+
if (!defaultOverrideFile) {
|
|
198
|
+
return null;
|
|
199
|
+
}
|
|
200
|
+
try {
|
|
201
|
+
const source = fs_1.default.readFileSync(defaultOverrideFile, 'utf8');
|
|
202
|
+
const accountId = Number(source);
|
|
203
|
+
if (isNaN(accountId)) {
|
|
204
|
+
throw new Error((0, lang_1.i18n)(`${i18nKey}.getCWDAccountOverride.errorHeader`, {
|
|
205
|
+
hsAccountFile: defaultOverrideFile,
|
|
206
|
+
}), {
|
|
207
|
+
cause: config_1.DEFAULT_ACCOUNT_OVERRIDE_ERROR_INVALID_ID,
|
|
208
|
+
});
|
|
209
|
+
}
|
|
210
|
+
const account = this.config?.accounts?.find(account => account.accountId === accountId);
|
|
211
|
+
if (!account) {
|
|
212
|
+
throw new Error((0, lang_1.i18n)(`${i18nKey}.getCWDAccountOverride.errorHeader`, {
|
|
213
|
+
hsAccountFile: defaultOverrideFile,
|
|
214
|
+
}), {
|
|
215
|
+
cause: config_1.DEFAULT_ACCOUNT_OVERRIDE_ERROR_ACCOUNT_NOT_FOUND,
|
|
216
|
+
});
|
|
217
|
+
}
|
|
218
|
+
return account.name || account.accountId;
|
|
219
|
+
}
|
|
220
|
+
catch (e) {
|
|
221
|
+
if (e instanceof Error) {
|
|
222
|
+
logger_1.logger.error((0, lang_1.i18n)(`${i18nKey}.getCWDAccountOverride.readFileError`, {
|
|
223
|
+
error: e.message,
|
|
224
|
+
}));
|
|
225
|
+
}
|
|
226
|
+
else {
|
|
227
|
+
logger_1.logger.error((0, lang_1.i18n)(`${i18nKey}.getCWDAccountOverride.readFileError`, {
|
|
228
|
+
error: String(e),
|
|
229
|
+
}));
|
|
230
|
+
}
|
|
231
|
+
return null;
|
|
232
|
+
}
|
|
198
233
|
}
|
|
199
|
-
|
|
234
|
+
getAccountIndex(accountId) {
|
|
200
235
|
return this.config
|
|
201
236
|
? this.config.accounts.findIndex(account => account.accountId === accountId)
|
|
202
237
|
: -1;
|
|
203
238
|
}
|
|
204
239
|
getConfigForAccount(accountId) {
|
|
205
240
|
if (this.config) {
|
|
206
|
-
this.config.accounts.find(account => account.accountId === accountId) ||
|
|
207
|
-
null;
|
|
241
|
+
return (this.config.accounts.find(account => account.accountId === accountId) ||
|
|
242
|
+
null);
|
|
243
|
+
}
|
|
244
|
+
return null;
|
|
245
|
+
}
|
|
246
|
+
getConfigAccounts() {
|
|
247
|
+
if (this.config) {
|
|
248
|
+
return this.config.accounts || null;
|
|
208
249
|
}
|
|
209
250
|
return null;
|
|
210
251
|
}
|
|
211
252
|
isAccountInConfig(nameOrId) {
|
|
253
|
+
if (typeof nameOrId === 'string') {
|
|
254
|
+
return (!!this.config &&
|
|
255
|
+
this.config.accounts &&
|
|
256
|
+
!!this.getAccountId(nameOrId.toLowerCase()));
|
|
257
|
+
}
|
|
212
258
|
return (!!this.config && this.config.accounts && !!this.getAccountId(nameOrId));
|
|
213
259
|
}
|
|
214
260
|
getAndLoadConfigIfNeeded(options) {
|
|
@@ -227,23 +273,41 @@ class CLIConfiguration {
|
|
|
227
273
|
}
|
|
228
274
|
return environments_1.ENVIRONMENTS.PROD;
|
|
229
275
|
}
|
|
276
|
+
// Deprecating sandboxAccountType in favor of accountType
|
|
277
|
+
getAccountType(accountType, sandboxAccountType) {
|
|
278
|
+
if (accountType) {
|
|
279
|
+
return accountType;
|
|
280
|
+
}
|
|
281
|
+
if (typeof sandboxAccountType === 'string') {
|
|
282
|
+
if (sandboxAccountType.toUpperCase() === 'DEVELOPER') {
|
|
283
|
+
return config_1.HUBSPOT_ACCOUNT_TYPES.DEVELOPMENT_SANDBOX;
|
|
284
|
+
}
|
|
285
|
+
if (sandboxAccountType.toUpperCase() === 'STANDARD') {
|
|
286
|
+
return config_1.HUBSPOT_ACCOUNT_TYPES.STANDARD_SANDBOX;
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
return config_1.HUBSPOT_ACCOUNT_TYPES.STANDARD;
|
|
290
|
+
}
|
|
230
291
|
/*
|
|
231
292
|
* Config Update Utils
|
|
232
293
|
*/
|
|
233
294
|
/**
|
|
234
295
|
* @throws {Error}
|
|
235
296
|
*/
|
|
236
|
-
|
|
237
|
-
const { accountId, apiKey, authType, clientId, clientSecret,
|
|
297
|
+
addOrUpdateAccount(updatedAccountFields, writeUpdate = true) {
|
|
298
|
+
const { accountId, accountType, apiKey, authType, clientId, clientSecret, defaultCmsPublishMode, env, name, parentAccountId, personalAccessKey, sandboxAccountType, scopes, tokenInfo, } = updatedAccountFields;
|
|
238
299
|
if (!accountId) {
|
|
239
|
-
(0,
|
|
300
|
+
throw new Error((0, lang_1.i18n)(`${i18nKey}.updateAccount.errors.accountIdRequired`));
|
|
240
301
|
}
|
|
241
302
|
if (!this.config) {
|
|
242
|
-
(0,
|
|
303
|
+
logger_1.logger.debug((0, lang_1.i18n)(`${i18nKey}.updateAccount.noConfigToUpdate`));
|
|
243
304
|
return null;
|
|
244
305
|
}
|
|
306
|
+
// Check whether the account is already listed in the config.yml file.
|
|
245
307
|
const currentAccountConfig = this.getAccount(accountId);
|
|
246
|
-
|
|
308
|
+
// For accounts that are already in the config.yml file, sets the auth property.
|
|
309
|
+
let auth = (currentAccountConfig && currentAccountConfig.auth) || {};
|
|
310
|
+
// For accounts not already in the config.yml file, sets the auth property.
|
|
247
311
|
if (clientId || clientSecret || scopes || tokenInfo) {
|
|
248
312
|
auth = {
|
|
249
313
|
...(currentAccountConfig ? currentAccountConfig.auth : {}),
|
|
@@ -265,7 +329,9 @@ class CLIConfiguration {
|
|
|
265
329
|
}
|
|
266
330
|
}
|
|
267
331
|
const updatedEnv = (0, environment_2.getValidEnv)(env || (currentAccountConfig && currentAccountConfig.env));
|
|
268
|
-
const
|
|
332
|
+
const updatedDefaultCmsPublishMode = defaultCmsPublishMode &&
|
|
333
|
+
defaultCmsPublishMode.toLowerCase();
|
|
334
|
+
const updatedAccountType = accountType || (currentAccountConfig && currentAccountConfig.accountType);
|
|
269
335
|
safelyApplyUpdates('name', name);
|
|
270
336
|
safelyApplyUpdates('env', updatedEnv);
|
|
271
337
|
safelyApplyUpdates('accountId', accountId);
|
|
@@ -274,29 +340,36 @@ class CLIConfiguration {
|
|
|
274
340
|
if (nextAccountConfig.authType === auth_1.API_KEY_AUTH_METHOD.value) {
|
|
275
341
|
safelyApplyUpdates('apiKey', apiKey);
|
|
276
342
|
}
|
|
277
|
-
if (typeof
|
|
343
|
+
if (typeof updatedDefaultCmsPublishMode !== 'undefined') {
|
|
278
344
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
279
|
-
safelyApplyUpdates('
|
|
345
|
+
safelyApplyUpdates('defaultCmsPublishMode', files_1.CMS_PUBLISH_MODE[updatedDefaultCmsPublishMode]);
|
|
280
346
|
}
|
|
281
347
|
safelyApplyUpdates('personalAccessKey', personalAccessKey);
|
|
348
|
+
// Deprecating sandboxAccountType in favor of the more generic accountType
|
|
282
349
|
safelyApplyUpdates('sandboxAccountType', sandboxAccountType);
|
|
350
|
+
safelyApplyUpdates('accountType', this.getAccountType(updatedAccountType, sandboxAccountType));
|
|
283
351
|
safelyApplyUpdates('parentAccountId', parentAccountId);
|
|
284
352
|
const completedAccountConfig = nextAccountConfig;
|
|
353
|
+
if (!Object.hasOwn(this.config, 'accounts')) {
|
|
354
|
+
this.config.accounts = [];
|
|
355
|
+
}
|
|
285
356
|
if (currentAccountConfig) {
|
|
286
|
-
(0,
|
|
287
|
-
accountId,
|
|
288
|
-
});
|
|
289
|
-
const index = this.getConfigAccountIndex(accountId);
|
|
290
|
-
this.config.accounts[index] = completedAccountConfig;
|
|
291
|
-
(0, logger_1.debug)(`${i18nKey}.updateAccount.addingConfigEntry`, {
|
|
357
|
+
logger_1.logger.debug((0, lang_1.i18n)(`${i18nKey}.updateAccount.updating`, {
|
|
292
358
|
accountId,
|
|
293
|
-
});
|
|
294
|
-
|
|
359
|
+
}));
|
|
360
|
+
const index = this.getAccountIndex(accountId);
|
|
361
|
+
if (index < 0) {
|
|
295
362
|
this.config.accounts.push(completedAccountConfig);
|
|
296
363
|
}
|
|
297
364
|
else {
|
|
298
|
-
this.config.accounts =
|
|
365
|
+
this.config.accounts[index] = completedAccountConfig;
|
|
299
366
|
}
|
|
367
|
+
logger_1.logger.debug((0, lang_1.i18n)(`${i18nKey}.updateAccount.addingConfigEntry`, {
|
|
368
|
+
accountId,
|
|
369
|
+
}));
|
|
370
|
+
}
|
|
371
|
+
else {
|
|
372
|
+
this.config.accounts.push(completedAccountConfig);
|
|
300
373
|
}
|
|
301
374
|
if (writeUpdate) {
|
|
302
375
|
this.write();
|
|
@@ -308,11 +381,11 @@ class CLIConfiguration {
|
|
|
308
381
|
*/
|
|
309
382
|
updateDefaultAccount(defaultAccount) {
|
|
310
383
|
if (!this.config) {
|
|
311
|
-
(0,
|
|
384
|
+
throw new Error((0, lang_1.i18n)(`${i18nKey}.errors.noConfigLoaded`));
|
|
312
385
|
}
|
|
313
386
|
if (!defaultAccount ||
|
|
314
387
|
(typeof defaultAccount !== 'number' && typeof defaultAccount !== 'string')) {
|
|
315
|
-
(0,
|
|
388
|
+
throw new Error((0, lang_1.i18n)(`${i18nKey}.updateDefaultAccount.errors.invalidInput`));
|
|
316
389
|
}
|
|
317
390
|
this.config.defaultAccount = defaultAccount;
|
|
318
391
|
return this.write();
|
|
@@ -322,7 +395,7 @@ class CLIConfiguration {
|
|
|
322
395
|
*/
|
|
323
396
|
renameAccount(currentName, newName) {
|
|
324
397
|
if (!this.config) {
|
|
325
|
-
(0,
|
|
398
|
+
throw new Error((0, lang_1.i18n)(`${i18nKey}.errors.noConfigLoaded`));
|
|
326
399
|
}
|
|
327
400
|
const accountId = this.getAccountId(currentName);
|
|
328
401
|
let accountConfigToRename = null;
|
|
@@ -330,12 +403,17 @@ class CLIConfiguration {
|
|
|
330
403
|
accountConfigToRename = this.getAccount(accountId);
|
|
331
404
|
}
|
|
332
405
|
if (!accountConfigToRename) {
|
|
333
|
-
(0,
|
|
406
|
+
throw new Error((0, lang_1.i18n)(`${i18nKey}.renameAccount.errors.invalidName`, {
|
|
334
407
|
currentName,
|
|
335
|
-
});
|
|
408
|
+
}));
|
|
336
409
|
}
|
|
337
410
|
if (accountId) {
|
|
338
|
-
this.
|
|
411
|
+
this.addOrUpdateAccount({
|
|
412
|
+
accountId,
|
|
413
|
+
name: newName,
|
|
414
|
+
env: this.getEnv(),
|
|
415
|
+
accountType: accountConfigToRename.accountType,
|
|
416
|
+
});
|
|
339
417
|
}
|
|
340
418
|
if (accountConfigToRename.name === this.getDefaultAccount()) {
|
|
341
419
|
this.updateDefaultAccount(newName);
|
|
@@ -343,20 +421,23 @@ class CLIConfiguration {
|
|
|
343
421
|
}
|
|
344
422
|
/**
|
|
345
423
|
* @throws {Error}
|
|
424
|
+
* TODO: this does not account for the special handling of sandbox account deletes
|
|
346
425
|
*/
|
|
347
426
|
removeAccountFromConfig(nameOrId) {
|
|
348
427
|
if (!this.config) {
|
|
349
|
-
(0,
|
|
428
|
+
throw new Error((0, lang_1.i18n)(`${i18nKey}.errors.noConfigLoaded`));
|
|
350
429
|
}
|
|
351
430
|
const accountId = this.getAccountId(nameOrId);
|
|
352
431
|
if (!accountId) {
|
|
353
|
-
(0,
|
|
432
|
+
throw new Error((0, lang_1.i18n)(`${i18nKey}.removeAccountFromConfig.errors.invalidId`, {
|
|
433
|
+
nameOrId,
|
|
434
|
+
}));
|
|
354
435
|
}
|
|
355
436
|
let removedAccountIsDefault = false;
|
|
356
437
|
const accountConfig = this.getAccount(accountId);
|
|
357
438
|
if (accountConfig) {
|
|
358
|
-
(0,
|
|
359
|
-
const index = this.
|
|
439
|
+
logger_1.logger.debug((0, lang_1.i18n)(`${i18nKey}.removeAccountFromConfig.deleting`, { accountId }));
|
|
440
|
+
const index = this.getAccountIndex(accountId);
|
|
360
441
|
this.config.accounts.splice(index, 1);
|
|
361
442
|
if (this.getDefaultAccount() === accountConfig.name) {
|
|
362
443
|
removedAccountIsDefault = true;
|
|
@@ -368,18 +449,19 @@ class CLIConfiguration {
|
|
|
368
449
|
/**
|
|
369
450
|
* @throws {Error}
|
|
370
451
|
*/
|
|
371
|
-
|
|
452
|
+
updateDefaultCmsPublishMode(defaultCmsPublishMode) {
|
|
372
453
|
if (!this.config) {
|
|
373
|
-
(0,
|
|
454
|
+
throw new Error((0, lang_1.i18n)(`${i18nKey}.errors.noConfigLoaded`));
|
|
374
455
|
}
|
|
375
|
-
const
|
|
376
|
-
if (!
|
|
377
|
-
(
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
456
|
+
const ALL_CMS_PUBLISH_MODES = Object.values(files_1.CMS_PUBLISH_MODE);
|
|
457
|
+
if (!defaultCmsPublishMode ||
|
|
458
|
+
!ALL_CMS_PUBLISH_MODES.find(m => m === defaultCmsPublishMode)) {
|
|
459
|
+
throw new Error((0, lang_1.i18n)(`${i18nKey}.updateDefaultCmsPublishMode.errors.invalidCmsPublishMode`, {
|
|
460
|
+
defaultCmsPublishMode,
|
|
461
|
+
validCmsPublishModes: (0, text_1.commaSeparatedValues)(ALL_CMS_PUBLISH_MODES),
|
|
462
|
+
}));
|
|
381
463
|
}
|
|
382
|
-
this.config.
|
|
464
|
+
this.config.defaultCmsPublishMode = defaultCmsPublishMode;
|
|
383
465
|
return this.write();
|
|
384
466
|
}
|
|
385
467
|
/**
|
|
@@ -387,14 +469,14 @@ class CLIConfiguration {
|
|
|
387
469
|
*/
|
|
388
470
|
updateHttpTimeout(timeout) {
|
|
389
471
|
if (!this.config) {
|
|
390
|
-
(0,
|
|
472
|
+
throw new Error((0, lang_1.i18n)(`${i18nKey}.errors.noConfigLoaded`));
|
|
391
473
|
}
|
|
392
474
|
const parsedTimeout = parseInt(timeout);
|
|
393
475
|
if (isNaN(parsedTimeout) || parsedTimeout < config_1.MIN_HTTP_TIMEOUT) {
|
|
394
|
-
(0,
|
|
476
|
+
throw new Error((0, lang_1.i18n)(`${i18nKey}.updateHttpTimeout.errors.invalidTimeout`, {
|
|
395
477
|
timeout,
|
|
396
478
|
minTimeout: config_1.MIN_HTTP_TIMEOUT,
|
|
397
|
-
});
|
|
479
|
+
}));
|
|
398
480
|
}
|
|
399
481
|
this.config.httpTimeout = parsedTimeout;
|
|
400
482
|
return this.write();
|
|
@@ -404,12 +486,12 @@ class CLIConfiguration {
|
|
|
404
486
|
*/
|
|
405
487
|
updateAllowUsageTracking(isEnabled) {
|
|
406
488
|
if (!this.config) {
|
|
407
|
-
(0,
|
|
489
|
+
throw new Error((0, lang_1.i18n)(`${i18nKey}.errors.noConfigLoaded`));
|
|
408
490
|
}
|
|
409
491
|
if (typeof isEnabled !== 'boolean') {
|
|
410
|
-
(0,
|
|
492
|
+
throw new Error((0, lang_1.i18n)(`${i18nKey}.updateAllowUsageTracking.errors.invalidInput`, {
|
|
411
493
|
isEnabled: `${isEnabled}`,
|
|
412
|
-
});
|
|
494
|
+
}));
|
|
413
495
|
}
|
|
414
496
|
this.config.allowUsageTracking = isEnabled;
|
|
415
497
|
return this.write();
|
|
@@ -420,5 +502,12 @@ class CLIConfiguration {
|
|
|
420
502
|
}
|
|
421
503
|
return this.config.allowUsageTracking !== false;
|
|
422
504
|
}
|
|
505
|
+
handleLegacyCmsPublishMode(config) {
|
|
506
|
+
if (config?.defaultMode) {
|
|
507
|
+
config.defaultCmsPublishMode = config.defaultMode;
|
|
508
|
+
delete config.defaultMode;
|
|
509
|
+
}
|
|
510
|
+
return config;
|
|
511
|
+
}
|
|
423
512
|
}
|
|
424
|
-
exports.
|
|
513
|
+
exports.CLIConfiguration = new _CLIConfiguration();
|
package/config/configFile.js
CHANGED
|
@@ -8,11 +8,11 @@ const fs_extra_1 = __importDefault(require("fs-extra"));
|
|
|
8
8
|
const path_1 = __importDefault(require("path"));
|
|
9
9
|
const os_1 = __importDefault(require("os"));
|
|
10
10
|
const js_yaml_1 = __importDefault(require("js-yaml"));
|
|
11
|
-
const logger_1 = require("../
|
|
12
|
-
const fileSystemErrors_1 = require("../errors/fileSystemErrors");
|
|
13
|
-
const standardErrors_1 = require("../errors/standardErrors");
|
|
11
|
+
const logger_1 = require("../lib/logger");
|
|
14
12
|
const config_1 = require("../constants/config");
|
|
15
13
|
const configUtils_1 = require("./configUtils");
|
|
14
|
+
const lang_1 = require("../utils/lang");
|
|
15
|
+
const FileSystemError_1 = require("../models/FileSystemError");
|
|
16
16
|
const i18nKey = 'config.configFile';
|
|
17
17
|
function getConfigFilePath() {
|
|
18
18
|
return path_1.default.join(os_1.default.homedir(), config_1.HUBSPOT_CONFIGURATION_FOLDER, config_1.HUBSPOT_CONFIGURATION_FILE);
|
|
@@ -42,10 +42,10 @@ function readConfigFile(configPath) {
|
|
|
42
42
|
source = fs_extra_1.default.readFileSync(configPath).toString();
|
|
43
43
|
}
|
|
44
44
|
catch (err) {
|
|
45
|
-
(0,
|
|
46
|
-
|
|
45
|
+
logger_1.logger.debug((0, lang_1.i18n)(`${i18nKey}.errorReading`, { configPath }));
|
|
46
|
+
throw new FileSystemError_1.FileSystemError({ cause: err }, {
|
|
47
47
|
filepath: configPath,
|
|
48
|
-
|
|
48
|
+
operation: 'read',
|
|
49
49
|
});
|
|
50
50
|
}
|
|
51
51
|
return source;
|
|
@@ -60,7 +60,7 @@ function parseConfig(configSource) {
|
|
|
60
60
|
parsed = js_yaml_1.default.load(configSource);
|
|
61
61
|
}
|
|
62
62
|
catch (err) {
|
|
63
|
-
(0,
|
|
63
|
+
throw new Error((0, lang_1.i18n)(`${i18nKey}.errors.parsing`), { cause: err });
|
|
64
64
|
}
|
|
65
65
|
return parsed;
|
|
66
66
|
}
|
|
@@ -77,7 +77,7 @@ function loadConfigFromFile() {
|
|
|
77
77
|
}
|
|
78
78
|
return parseConfig(source);
|
|
79
79
|
}
|
|
80
|
-
(0,
|
|
80
|
+
logger_1.logger.debug((0, lang_1.i18n)(`${i18nKey}.errorLoading`, { configPath }));
|
|
81
81
|
return null;
|
|
82
82
|
}
|
|
83
83
|
exports.loadConfigFromFile = loadConfigFromFile;
|
|
@@ -85,23 +85,17 @@ exports.loadConfigFromFile = loadConfigFromFile;
|
|
|
85
85
|
* @throws {Error}
|
|
86
86
|
*/
|
|
87
87
|
function writeConfigToFile(config) {
|
|
88
|
-
|
|
89
|
-
try {
|
|
90
|
-
source = js_yaml_1.default.dump(JSON.parse(JSON.stringify((0, configUtils_1.getOrderedConfig)(config), null, 2)));
|
|
91
|
-
}
|
|
92
|
-
catch (err) {
|
|
93
|
-
(0, standardErrors_1.throwError)(err);
|
|
94
|
-
}
|
|
88
|
+
const source = js_yaml_1.default.dump(JSON.parse(JSON.stringify((0, configUtils_1.getOrderedConfig)(config), null, 2)));
|
|
95
89
|
const configPath = getConfigFilePath();
|
|
96
90
|
try {
|
|
97
91
|
fs_extra_1.default.ensureFileSync(configPath);
|
|
98
92
|
fs_extra_1.default.writeFileSync(configPath, source);
|
|
99
|
-
(0,
|
|
93
|
+
logger_1.logger.debug((0, lang_1.i18n)(`${i18nKey}.writeSuccess`, { configPath }));
|
|
100
94
|
}
|
|
101
95
|
catch (err) {
|
|
102
|
-
|
|
96
|
+
throw new FileSystemError_1.FileSystemError({ cause: err }, {
|
|
103
97
|
filepath: configPath,
|
|
104
|
-
|
|
98
|
+
operation: 'write',
|
|
105
99
|
});
|
|
106
100
|
}
|
|
107
101
|
}
|
package/config/configUtils.d.ts
CHANGED
|
@@ -1,24 +1,5 @@
|
|
|
1
|
-
import { CLIConfig_NEW
|
|
2
|
-
import { AuthType, CLIAccount_NEW } from '../types/Accounts';
|
|
1
|
+
import { CLIConfig_NEW } from '../types/Config';
|
|
2
|
+
import { AuthType, CLIAccount_NEW, PersonalAccessKeyOptions, OAuthOptions, APIKeyOptions } from '../types/Accounts';
|
|
3
3
|
export declare function getOrderedAccount(unorderedAccount: CLIAccount_NEW): CLIAccount_NEW;
|
|
4
4
|
export declare function getOrderedConfig(unorderedConfig: CLIConfig_NEW): CLIConfig_NEW;
|
|
5
|
-
type PersonalAccessKeyOptions = {
|
|
6
|
-
accountId: number;
|
|
7
|
-
personalAccessKey: string;
|
|
8
|
-
env: Environment;
|
|
9
|
-
};
|
|
10
|
-
type OAuthOptions = {
|
|
11
|
-
accountId: number;
|
|
12
|
-
clientId: string;
|
|
13
|
-
clientSecret: string;
|
|
14
|
-
refreshToken: string;
|
|
15
|
-
scopes: Array<string>;
|
|
16
|
-
env: Environment;
|
|
17
|
-
};
|
|
18
|
-
type APIKeyOptions = {
|
|
19
|
-
accountId: number;
|
|
20
|
-
apiKey: string;
|
|
21
|
-
env: Environment;
|
|
22
|
-
};
|
|
23
5
|
export declare function generateConfig(type: AuthType, options: PersonalAccessKeyOptions | OAuthOptions | APIKeyOptions): CLIConfig_NEW | null;
|
|
24
|
-
export {};
|
package/config/configUtils.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.generateConfig = exports.getOrderedConfig = exports.getOrderedAccount = void 0;
|
|
4
|
-
const logger_1 = require("../
|
|
4
|
+
const logger_1 = require("../lib/logger");
|
|
5
5
|
const auth_1 = require("../constants/auth");
|
|
6
|
+
const lang_1 = require("../utils/lang");
|
|
6
7
|
const i18nKey = 'config.configUtils';
|
|
7
8
|
function getOrderedAccount(unorderedAccount) {
|
|
8
9
|
const { name, accountId, env, authType, ...rest } = unorderedAccount;
|
|
@@ -16,10 +17,10 @@ function getOrderedAccount(unorderedAccount) {
|
|
|
16
17
|
}
|
|
17
18
|
exports.getOrderedAccount = getOrderedAccount;
|
|
18
19
|
function getOrderedConfig(unorderedConfig) {
|
|
19
|
-
const { defaultAccount,
|
|
20
|
+
const { defaultAccount, defaultCmsPublishMode, httpTimeout, allowUsageTracking, accounts, ...rest } = unorderedConfig;
|
|
20
21
|
return {
|
|
21
22
|
...(defaultAccount && { defaultAccount }),
|
|
22
|
-
|
|
23
|
+
defaultCmsPublishMode,
|
|
23
24
|
httpTimeout,
|
|
24
25
|
allowUsageTracking,
|
|
25
26
|
...rest,
|
|
@@ -75,7 +76,7 @@ function generateConfig(type, options) {
|
|
|
75
76
|
configAccount = generateOauthAccountConfig(options);
|
|
76
77
|
break;
|
|
77
78
|
default:
|
|
78
|
-
(0,
|
|
79
|
+
logger_1.logger.debug((0, lang_1.i18n)(`${i18nKey}.unknownType`, { type }));
|
|
79
80
|
return null;
|
|
80
81
|
}
|
|
81
82
|
if (configAccount) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { CLIConfig_DEPRECATED, Environment } from '../types/Config';
|
|
2
|
-
import { CLIAccount_DEPRECATED, FlatAccountFields_DEPRECATED } from '../types/Accounts';
|
|
3
|
-
import {
|
|
2
|
+
import { AccountType, CLIAccount_DEPRECATED, FlatAccountFields_DEPRECATED, UpdateAccountConfigOptions } from '../types/Accounts';
|
|
3
|
+
import { CmsPublishMode } from '../types/Files';
|
|
4
4
|
import { CLIOptions, WriteConfigOptions } from '../types/CLIOptions';
|
|
5
5
|
export declare const getConfig: () => CLIConfig_DEPRECATED | null;
|
|
6
6
|
export declare function setConfig(updatedConfig?: CLIConfig_DEPRECATED): CLIConfig_DEPRECATED | null;
|
|
@@ -14,9 +14,10 @@ export declare function accountNameExistsInConfig(name: string): boolean;
|
|
|
14
14
|
export declare function getOrderedAccount(unorderedAccount: CLIAccount_DEPRECATED): CLIAccount_DEPRECATED;
|
|
15
15
|
export declare function getOrderedConfig(unorderedConfig: CLIConfig_DEPRECATED): {
|
|
16
16
|
portals: CLIAccount_DEPRECATED[];
|
|
17
|
+
defaultMode?: CmsPublishMode | undefined;
|
|
17
18
|
env?: Environment | undefined;
|
|
18
19
|
httpUseLocalhost?: boolean | undefined;
|
|
19
|
-
|
|
20
|
+
defaultCmsPublishMode: CmsPublishMode | undefined;
|
|
20
21
|
httpTimeout: number | undefined;
|
|
21
22
|
allowUsageTracking: boolean | undefined;
|
|
22
23
|
defaultPortal?: string | number | undefined;
|
|
@@ -27,15 +28,13 @@ export declare function isTrackingAllowed(): boolean;
|
|
|
27
28
|
export declare function getAndLoadConfigIfNeeded(options?: {}): Partial<CLIConfig_DEPRECATED>;
|
|
28
29
|
export declare function findConfig(directory: string): string | null;
|
|
29
30
|
export declare function getEnv(nameOrId?: string | number): Environment;
|
|
31
|
+
export declare function getAccountType(accountType?: AccountType, sandboxAccountType?: string | null): AccountType;
|
|
30
32
|
export declare function getAccountConfig(accountId: number | undefined): CLIAccount_DEPRECATED | undefined;
|
|
31
33
|
export declare function getAccountId(nameOrId?: string | number): number | undefined;
|
|
32
34
|
/**
|
|
33
35
|
* @throws {Error}
|
|
34
36
|
*/
|
|
35
37
|
export declare function removeSandboxAccountFromConfig(nameOrId: string | number): boolean;
|
|
36
|
-
type UpdateAccountConfigOptions = Partial<FlatAccountFields_DEPRECATED> & {
|
|
37
|
-
environment?: Environment;
|
|
38
|
-
};
|
|
39
38
|
/**
|
|
40
39
|
* @throws {Error}
|
|
41
40
|
*/
|
|
@@ -47,7 +46,7 @@ export declare function updateDefaultAccount(defaultAccount: string | number): v
|
|
|
47
46
|
/**
|
|
48
47
|
* @throws {Error}
|
|
49
48
|
*/
|
|
50
|
-
export declare function
|
|
49
|
+
export declare function updateDefaultCmsPublishMode(defaultCmsPublishMode: CmsPublishMode): void;
|
|
51
50
|
/**
|
|
52
51
|
* @throws {Error}
|
|
53
52
|
*/
|
|
@@ -75,4 +74,3 @@ export declare function loadConfigFromEnvironment({ useEnv, }?: {
|
|
|
75
74
|
portals: Array<CLIAccount_DEPRECATED>;
|
|
76
75
|
} | undefined;
|
|
77
76
|
export declare function isConfigFlagEnabled(flag: keyof CLIConfig_DEPRECATED): boolean;
|
|
78
|
-
export {};
|