@hubspot/local-dev-lib 0.0.11 → 0.1.0-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 +5 -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 +6 -5
- package/api/fileManager.js +13 -12
- package/api/fileMapper.d.ts +8 -8
- package/api/fileMapper.js +19 -18
- package/api/fileTransport.d.ts +4 -0
- package/api/fileTransport.js +39 -0
- package/api/functions.d.ts +7 -3
- package/api/functions.js +22 -11
- package/api/github.d.ts +11 -0
- package/api/github.js +71 -0
- package/api/hubdb.d.ts +11 -9
- package/api/hubdb.js +28 -22
- package/api/lighthouseScore.d.ts +4 -3
- 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 -3
- package/api/marketplaceValidation.js +8 -11
- package/api/projects.d.ts +34 -21
- package/api/projects.js +135 -45
- package/api/sandboxHubs.d.ts +5 -4
- package/api/sandboxHubs.js +10 -11
- package/api/sandboxSync.d.ts +4 -4
- package/api/sandboxSync.js +5 -14
- 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 +13 -10
- package/config/CLIConfiguration.js +129 -77
- 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 +73 -24
- package/config/environment.js +5 -4
- package/config/getAccountIdentifier.d.ts +2 -0
- package/config/getAccountIdentifier.js +15 -0
- package/config/index.d.ts +10 -7
- package/config/index.js +83 -55
- package/constants/api.d.ts +10 -12
- package/constants/api.js +10 -12
- package/constants/config.d.ts +15 -1
- package/constants/config.js +17 -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 +3 -16
- 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 +10 -11
- package/http/index.js +35 -41
- package/http/unauthed.d.ts +15 -0
- package/http/unauthed.js +38 -0
- package/lang/en.json +374 -368
- 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/{validate.d.ts → cms/validate.d.ts} +1 -1
- package/lib/{validate.js → cms/validate.js} +5 -5
- 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 -0
- package/lib/fileManager.js +184 -0
- package/lib/fileMapper.d.ts +4 -15
- package/lib/fileMapper.js +68 -89
- package/lib/fs.js +2 -2
- package/lib/github.d.ts +6 -18
- package/lib/github.js +97 -76
- 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 +75 -48
- 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 +86 -3
- package/types/Apps.d.ts +77 -0
- package/types/Archive.d.ts +9 -0
- package/types/Archive.js +2 -0
- package/types/ComponentStructure.d.ts +30 -10
- package/types/Config.d.ts +19 -2
- package/types/DesignManager.d.ts +10 -0
- package/types/DesignManager.js +2 -0
- package/types/Error.d.ts +12 -34
- package/types/FieldsJS.d.ts +1 -0
- package/types/FieldsJS.js +2 -0
- package/types/FileManager.d.ts +12 -7
- package/types/Files.d.ts +43 -4
- package/types/Functions.d.ts +26 -0
- package/types/Github.d.ts +12 -0
- package/types/Http.d.ts +11 -12
- package/types/Hubdb.d.ts +9 -0
- package/types/Lang.d.ts +3 -0
- 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 +4 -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 +12 -0
- package/types/developerTestAccounts.js +2 -0
- package/utils/PortManagerServer.d.ts +6 -7
- package/utils/PortManagerServer.js +24 -18
- 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/utils/lang.d.ts +1 -5
- package/constants/github.d.ts +0 -4
- package/constants/github.js +0 -7
- package/errors/apiErrors.d.ts +0 -23
- package/errors/apiErrors.js +0 -197
- package/errors/fileSystemErrors.d.ts +0 -5
- package/errors/fileSystemErrors.js +0 -31
- package/errors/standardErrors.d.ts +0 -26
- package/errors/standardErrors.js +0 -64
- package/lang/lang/en.json +0 -383
- 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 -9
- package/models/HubSpotAuthError.js +0 -20
- package/types/LogCallbacks.d.ts +0 -6
- package/utils/logger.d.ts +0 -11
- 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
package/api/sandboxHubs.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { AxiosPromise } from 'axios';
|
|
1
2
|
import { Environment } from '../types/Config';
|
|
2
3
|
import { SandboxHubData, SandboxResponse, SandboxUsageLimitsResponse } from '../types/Sandbox';
|
|
3
|
-
export declare function createSandbox(accountId: number, name: string, type:
|
|
4
|
-
export declare function deleteSandbox(parentAccountId: number, sandboxAccountId: number):
|
|
5
|
-
export declare function getSandboxUsageLimits(parentAccountId: number):
|
|
6
|
-
export declare function fetchSandboxHubData(accessToken: string,
|
|
4
|
+
export declare function createSandbox(accountId: number, name: string, type: 1 | 2): AxiosPromise<SandboxResponse>;
|
|
5
|
+
export declare function deleteSandbox(parentAccountId: number, sandboxAccountId: number): AxiosPromise<void>;
|
|
6
|
+
export declare function getSandboxUsageLimits(parentAccountId: number): AxiosPromise<SandboxUsageLimitsResponse>;
|
|
7
|
+
export declare function fetchSandboxHubData(accessToken: string, accountId: number, env?: Environment): AxiosPromise<SandboxHubData>;
|
package/api/sandboxHubs.js
CHANGED
|
@@ -5,37 +5,37 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.fetchSandboxHubData = exports.getSandboxUsageLimits = exports.deleteSandbox = exports.createSandbox = void 0;
|
|
7
7
|
const axios_1 = __importDefault(require("axios"));
|
|
8
|
-
const http_1 =
|
|
8
|
+
const http_1 = require("../http");
|
|
9
9
|
const getAxiosConfig_1 = require("../http/getAxiosConfig");
|
|
10
10
|
const environments_1 = require("../constants/environments");
|
|
11
11
|
const api_1 = require("../constants/api");
|
|
12
12
|
const SANDBOX_API_PATH = 'sandbox-hubs/v1';
|
|
13
13
|
const SANDBOX_API_PATH_V2 = 'sandbox-hubs/v2';
|
|
14
|
-
|
|
15
|
-
return http_1.
|
|
14
|
+
function createSandbox(accountId, name, type) {
|
|
15
|
+
return http_1.http.post(accountId, {
|
|
16
16
|
data: { name, type, generatePersonalAccessKey: true },
|
|
17
17
|
timeout: api_1.SANDBOX_TIMEOUT,
|
|
18
18
|
url: SANDBOX_API_PATH_V2, // Create uses v2 for sandbox type and PAK generation support
|
|
19
19
|
});
|
|
20
20
|
}
|
|
21
21
|
exports.createSandbox = createSandbox;
|
|
22
|
-
|
|
23
|
-
return http_1.
|
|
22
|
+
function deleteSandbox(parentAccountId, sandboxAccountId) {
|
|
23
|
+
return http_1.http.delete(parentAccountId, {
|
|
24
24
|
url: `${SANDBOX_API_PATH}/${sandboxAccountId}`,
|
|
25
25
|
});
|
|
26
26
|
}
|
|
27
27
|
exports.deleteSandbox = deleteSandbox;
|
|
28
|
-
|
|
29
|
-
return http_1.
|
|
28
|
+
function getSandboxUsageLimits(parentAccountId) {
|
|
29
|
+
return http_1.http.get(parentAccountId, {
|
|
30
30
|
url: `${SANDBOX_API_PATH}/parent/${parentAccountId}/usage`,
|
|
31
31
|
});
|
|
32
32
|
}
|
|
33
33
|
exports.getSandboxUsageLimits = getSandboxUsageLimits;
|
|
34
|
-
|
|
34
|
+
function fetchSandboxHubData(accessToken, accountId, env = environments_1.ENVIRONMENTS.PROD) {
|
|
35
35
|
const axiosConfig = (0, getAxiosConfig_1.getAxiosConfig)({
|
|
36
36
|
env,
|
|
37
37
|
url: `${SANDBOX_API_PATH}/self`,
|
|
38
|
-
params: { portalId },
|
|
38
|
+
params: { portalId: accountId },
|
|
39
39
|
});
|
|
40
40
|
const reqWithToken = {
|
|
41
41
|
...axiosConfig,
|
|
@@ -44,7 +44,6 @@ async function fetchSandboxHubData(accessToken, portalId, env = environments_1.E
|
|
|
44
44
|
Authorization: `Bearer ${accessToken}`,
|
|
45
45
|
},
|
|
46
46
|
};
|
|
47
|
-
|
|
48
|
-
return data;
|
|
47
|
+
return (0, axios_1.default)(reqWithToken);
|
|
49
48
|
}
|
|
50
49
|
exports.fetchSandboxHubData = fetchSandboxHubData;
|
package/api/sandboxSync.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
export declare function
|
|
4
|
-
export declare function fetchTypes(accountId: number, toHubId: number):
|
|
1
|
+
import { AxiosPromise } from 'axios';
|
|
2
|
+
import { InitiateSyncResponse, FetchTypesResponse, TaskRequestData } from '../types/Sandbox';
|
|
3
|
+
export declare function initiateSync(fromHubId: number, toHubId: number, tasks: Array<TaskRequestData>, sandboxHubId: number): AxiosPromise<InitiateSyncResponse>;
|
|
4
|
+
export declare function fetchTypes(accountId: number, toHubId: number): AxiosPromise<FetchTypesResponse>;
|
package/api/sandboxSync.js
CHANGED
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.fetchTypes = exports.
|
|
7
|
-
const http_1 =
|
|
3
|
+
exports.fetchTypes = exports.initiateSync = void 0;
|
|
4
|
+
const http_1 = require("../http");
|
|
8
5
|
const api_1 = require("../constants/api");
|
|
9
6
|
const SANDBOXES_SYNC_API_PATH = 'sandboxes-sync/v1';
|
|
10
|
-
|
|
11
|
-
return http_1.
|
|
7
|
+
function initiateSync(fromHubId, toHubId, tasks, sandboxHubId) {
|
|
8
|
+
return http_1.http.post(fromHubId, {
|
|
12
9
|
data: {
|
|
13
10
|
command: 'SYNC',
|
|
14
11
|
fromHubId,
|
|
@@ -21,14 +18,8 @@ async function initiateSync(fromHubId, toHubId, tasks, sandboxHubId) {
|
|
|
21
18
|
});
|
|
22
19
|
}
|
|
23
20
|
exports.initiateSync = initiateSync;
|
|
24
|
-
async function fetchTaskStatus(accountId, taskId) {
|
|
25
|
-
return http_1.default.get(accountId, {
|
|
26
|
-
url: `${SANDBOXES_SYNC_API_PATH}/tasks/${taskId}`,
|
|
27
|
-
});
|
|
28
|
-
}
|
|
29
|
-
exports.fetchTaskStatus = fetchTaskStatus;
|
|
30
21
|
async function fetchTypes(accountId, toHubId) {
|
|
31
|
-
return http_1.
|
|
22
|
+
return http_1.http.get(accountId, {
|
|
32
23
|
url: `${SANDBOXES_SYNC_API_PATH}/types${toHubId ? `?toHubId=${toHubId}` : ''}`,
|
|
33
24
|
});
|
|
34
25
|
}
|
package/api/secrets.d.ts
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export declare function
|
|
5
|
-
export declare function
|
|
6
|
-
export declare function
|
|
7
|
-
export declare function fetchSecrets(accountId: number): Promise<FetchSecretsResponse>;
|
|
8
|
-
export {};
|
|
1
|
+
import { AxiosPromise } from 'axios';
|
|
2
|
+
import { FetchSecretsResponse } from '../types/Secrets';
|
|
3
|
+
export declare function addSecret(accountId: number, key: string, value: string): AxiosPromise<void>;
|
|
4
|
+
export declare function updateSecret(accountId: number, key: string, value: string): AxiosPromise<void>;
|
|
5
|
+
export declare function deleteSecret(accountId: number, key: string): AxiosPromise<void>;
|
|
6
|
+
export declare function fetchSecrets(accountId: number): AxiosPromise<FetchSecretsResponse>;
|
package/api/secrets.js
CHANGED
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
3
|
exports.fetchSecrets = exports.deleteSecret = exports.updateSecret = exports.addSecret = void 0;
|
|
7
|
-
const http_1 =
|
|
4
|
+
const http_1 = require("../http");
|
|
8
5
|
const SECRETS_API_PATH = 'cms/v3/functions/secrets';
|
|
9
|
-
|
|
10
|
-
return http_1.
|
|
6
|
+
function addSecret(accountId, key, value) {
|
|
7
|
+
return http_1.http.post(accountId, {
|
|
11
8
|
url: SECRETS_API_PATH,
|
|
12
9
|
data: {
|
|
13
10
|
key,
|
|
@@ -16,8 +13,8 @@ async function addSecret(accountId, key, value) {
|
|
|
16
13
|
});
|
|
17
14
|
}
|
|
18
15
|
exports.addSecret = addSecret;
|
|
19
|
-
|
|
20
|
-
return http_1.
|
|
16
|
+
function updateSecret(accountId, key, value) {
|
|
17
|
+
return http_1.http.put(accountId, {
|
|
21
18
|
url: SECRETS_API_PATH,
|
|
22
19
|
data: {
|
|
23
20
|
key,
|
|
@@ -26,14 +23,14 @@ async function updateSecret(accountId, key, value) {
|
|
|
26
23
|
});
|
|
27
24
|
}
|
|
28
25
|
exports.updateSecret = updateSecret;
|
|
29
|
-
|
|
30
|
-
return http_1.
|
|
26
|
+
function deleteSecret(accountId, key) {
|
|
27
|
+
return http_1.http.delete(accountId, {
|
|
31
28
|
url: `${SECRETS_API_PATH}/${key}`,
|
|
32
29
|
});
|
|
33
30
|
}
|
|
34
31
|
exports.deleteSecret = deleteSecret;
|
|
35
|
-
|
|
36
|
-
return http_1.
|
|
32
|
+
function fetchSecrets(accountId) {
|
|
33
|
+
return http_1.http.get(accountId, {
|
|
37
34
|
url: `${SECRETS_API_PATH}`,
|
|
38
35
|
});
|
|
39
36
|
}
|
package/api/validateHubl.d.ts
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
|
+
import { AxiosPromise } from 'axios';
|
|
1
2
|
import { Validation, HublValidationOptions } from '../types/HublValidation';
|
|
2
|
-
export declare function validateHubl(accountId: number, sourceCode: string, hublValidationOptions?: HublValidationOptions):
|
|
3
|
+
export declare function validateHubl(accountId: number, sourceCode: string, hublValidationOptions?: HublValidationOptions): AxiosPromise<Validation>;
|
package/api/validateHubl.js
CHANGED
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
3
|
exports.validateHubl = void 0;
|
|
7
|
-
const http_1 =
|
|
4
|
+
const http_1 = require("../http");
|
|
8
5
|
const HUBL_VALIDATE_API_PATH = 'cos-rendering/v1/internal/validate';
|
|
9
|
-
|
|
10
|
-
return http_1.
|
|
6
|
+
function validateHubl(accountId, sourceCode, hublValidationOptions) {
|
|
7
|
+
return http_1.http.post(accountId, {
|
|
11
8
|
url: HUBL_VALIDATE_API_PATH,
|
|
12
9
|
data: {
|
|
13
10
|
template_source: sourceCode,
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { CLIConfig_NEW, Environment } from '../types/Config';
|
|
2
|
-
import { CLIAccount_NEW, FlatAccountFields_NEW } from '../types/Accounts';
|
|
2
|
+
import { CLIAccount_NEW, FlatAccountFields_NEW, AccountType } from '../types/Accounts';
|
|
3
3
|
import { CLIOptions } from '../types/CLIOptions';
|
|
4
|
-
import {
|
|
5
|
-
declare
|
|
6
|
-
declare class CLIConfiguration {
|
|
4
|
+
import { CmsPublishMode } from '../types/Files';
|
|
5
|
+
declare class _CLIConfiguration {
|
|
7
6
|
options: CLIOptions;
|
|
8
7
|
useEnvConfig: boolean;
|
|
9
8
|
config: CLIConfig_NEW | null;
|
|
@@ -16,21 +15,23 @@ declare class CLIConfiguration {
|
|
|
16
15
|
configIsEmpty(): boolean;
|
|
17
16
|
delete(): void;
|
|
18
17
|
write(updatedConfig?: CLIConfig_NEW): CLIConfig_NEW | null;
|
|
19
|
-
validate(
|
|
18
|
+
validate(): boolean;
|
|
20
19
|
getAccount(nameOrId: string | number | undefined): CLIAccount_NEW | null;
|
|
21
20
|
isConfigFlagEnabled(flag: keyof CLIConfig_NEW, defaultValue?: boolean): boolean;
|
|
22
21
|
getAccountId(nameOrId?: string | number): number | null;
|
|
23
22
|
getDefaultAccount(): string | number | null;
|
|
24
23
|
getResolvedDefaultAccountForCWD(nameOrId: string | number): CLIAccount_NEW | null;
|
|
25
|
-
|
|
24
|
+
getAccountIndex(accountId: number): number;
|
|
26
25
|
getConfigForAccount(accountId?: number): CLIAccount_NEW | null;
|
|
26
|
+
getConfigAccounts(): Array<CLIAccount_NEW> | null;
|
|
27
27
|
isAccountInConfig(nameOrId: string | number): boolean;
|
|
28
28
|
getAndLoadConfigIfNeeded(options?: CLIOptions): CLIConfig_NEW;
|
|
29
29
|
getEnv(nameOrId?: string | number): Environment;
|
|
30
|
+
getAccountType(accountType?: AccountType | null, sandboxAccountType?: string | null): AccountType;
|
|
30
31
|
/**
|
|
31
32
|
* @throws {Error}
|
|
32
33
|
*/
|
|
33
|
-
|
|
34
|
+
addOrUpdateAccount(updatedAccountFields: Partial<FlatAccountFields_NEW>, writeUpdate?: boolean): FlatAccountFields_NEW | null;
|
|
34
35
|
/**
|
|
35
36
|
* @throws {Error}
|
|
36
37
|
*/
|
|
@@ -41,12 +42,13 @@ declare class CLIConfiguration {
|
|
|
41
42
|
renameAccount(currentName: string, newName: string): void;
|
|
42
43
|
/**
|
|
43
44
|
* @throws {Error}
|
|
45
|
+
* TODO: this does not account for the special handling of sandbox account deletes
|
|
44
46
|
*/
|
|
45
47
|
removeAccountFromConfig(nameOrId: string | number): boolean;
|
|
46
48
|
/**
|
|
47
49
|
* @throws {Error}
|
|
48
50
|
*/
|
|
49
|
-
|
|
51
|
+
updateDefaultCmsPublishMode(defaultCmsPublishMode: CmsPublishMode): CLIConfig_NEW | null;
|
|
50
52
|
/**
|
|
51
53
|
* @throws {Error}
|
|
52
54
|
*/
|
|
@@ -56,6 +58,7 @@ declare class CLIConfiguration {
|
|
|
56
58
|
*/
|
|
57
59
|
updateAllowUsageTracking(isEnabled: boolean): CLIConfig_NEW | null;
|
|
58
60
|
isTrackingAllowed(): boolean;
|
|
61
|
+
handleLegacyCmsPublishMode(config: CLIConfig_NEW | null): CLIConfig_NEW | null;
|
|
59
62
|
}
|
|
60
|
-
declare const
|
|
61
|
-
export
|
|
63
|
+
export declare const CLIConfiguration: _CLIConfiguration;
|
|
64
|
+
export {};
|