@salesforce/core 4.0.0 → 4.0.1
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.txt +1 -1
- package/README.md +93 -44
- package/lib/config/aliasesConfig.d.ts +12 -0
- package/lib/config/aliasesConfig.js +28 -0
- package/lib/config/authInfoConfig.d.ts +19 -0
- package/lib/config/authInfoConfig.js +35 -0
- package/lib/config/config.d.ts +87 -22
- package/lib/config/config.js +117 -65
- package/lib/config/configAggregator.d.ts +41 -35
- package/lib/config/configAggregator.js +102 -73
- package/lib/config/configFile.d.ts +2 -2
- package/lib/config/configFile.js +38 -29
- package/lib/config/configGroup.d.ts +141 -0
- package/lib/config/configGroup.js +225 -0
- package/lib/config/configStore.d.ts +9 -9
- package/lib/config/configStore.js +17 -15
- package/lib/config/envVars.d.ts +15 -9
- package/lib/config/envVars.js +71 -47
- package/lib/config/orgUsersConfig.js +2 -0
- package/lib/config/sandboxOrgConfig.js +2 -0
- package/lib/config/sandboxProcessCache.d.ts +16 -0
- package/lib/config/sandboxProcessCache.js +38 -0
- package/lib/config/tokensConfig.d.ts +10 -0
- package/lib/config/tokensConfig.js +29 -0
- package/lib/config/ttlConfig.d.ts +34 -0
- package/lib/config/ttlConfig.js +50 -0
- package/lib/crypto/crypto.js +15 -22
- package/lib/crypto/keyChain.js +2 -3
- package/lib/crypto/keyChainImpl.d.ts +5 -3
- package/lib/crypto/keyChainImpl.js +58 -61
- package/lib/crypto/secureBuffer.d.ts +1 -1
- package/lib/deviceOauthService.d.ts +3 -3
- package/lib/deviceOauthService.js +27 -25
- package/lib/exported.d.ts +15 -12
- package/lib/exported.js +28 -16
- package/lib/global.d.ts +11 -3
- package/lib/global.js +39 -12
- package/lib/lifecycleEvents.d.ts +1 -1
- package/lib/lifecycleEvents.js +3 -0
- package/lib/logger.d.ts +19 -9
- package/lib/logger.js +112 -86
- package/lib/messages.d.ts +53 -36
- package/lib/messages.js +81 -91
- package/lib/org/authInfo.d.ts +56 -20
- package/lib/org/authInfo.js +232 -131
- package/lib/org/authRemover.d.ts +8 -7
- package/lib/org/authRemover.js +32 -28
- package/lib/org/connection.d.ts +13 -37
- package/lib/org/connection.js +78 -124
- package/lib/org/index.js +5 -1
- package/lib/org/org.d.ts +151 -48
- package/lib/org/org.js +466 -220
- package/lib/org/orgConfigProperties.d.ts +64 -3
- package/lib/org/orgConfigProperties.js +96 -4
- package/lib/org/permissionSetAssignment.js +4 -13
- package/lib/org/scratchOrgCache.d.ts +20 -0
- package/lib/org/scratchOrgCache.js +33 -0
- package/lib/org/scratchOrgCreate.d.ts +28 -17
- package/lib/org/scratchOrgCreate.js +125 -53
- package/lib/org/scratchOrgErrorCodes.d.ts +9 -3
- package/lib/org/scratchOrgErrorCodes.js +34 -17
- package/lib/org/scratchOrgFeatureDeprecation.js +1 -6
- package/lib/org/scratchOrgInfoApi.d.ts +21 -47
- package/lib/org/scratchOrgInfoApi.js +129 -63
- package/lib/org/scratchOrgInfoGenerator.d.ts +6 -5
- package/lib/org/scratchOrgInfoGenerator.js +76 -62
- package/lib/org/scratchOrgLifecycleEvents.d.ts +10 -0
- package/lib/org/scratchOrgLifecycleEvents.js +41 -0
- package/lib/org/scratchOrgSettingsGenerator.d.ts +44 -21
- package/lib/org/scratchOrgSettingsGenerator.js +165 -98
- package/lib/org/scratchOrgTypes.d.ts +43 -0
- package/lib/org/scratchOrgTypes.js +9 -0
- package/lib/org/user.d.ts +1 -1
- package/lib/org/user.js +25 -34
- package/lib/schema/printer.d.ts +6 -0
- package/lib/schema/printer.js +34 -31
- package/lib/schema/validator.d.ts +12 -10
- package/lib/schema/validator.js +56 -76
- package/lib/{sfdxError.d.ts → sfError.d.ts} +12 -20
- package/lib/{sfdxError.js → sfError.js} +40 -30
- package/lib/{sfdxProject.d.ts → sfProject.d.ts} +75 -35
- package/lib/sfProject.js +651 -0
- package/lib/{globalInfo → stateAggregator}/accessors/aliasAccessor.d.ts +27 -12
- package/lib/{globalInfo → stateAggregator}/accessors/aliasAccessor.js +47 -31
- package/lib/stateAggregator/accessors/orgAccessor.d.ts +101 -0
- package/lib/stateAggregator/accessors/orgAccessor.js +240 -0
- package/lib/stateAggregator/accessors/sandboxAccessor.d.ts +8 -0
- package/lib/stateAggregator/accessors/sandboxAccessor.js +28 -0
- package/lib/stateAggregator/accessors/tokenAccessor.d.ts +63 -0
- package/lib/stateAggregator/accessors/tokenAccessor.js +80 -0
- package/lib/stateAggregator/index.d.ts +4 -0
- package/lib/stateAggregator/index.js +27 -0
- package/lib/stateAggregator/stateAggregator.d.ts +25 -0
- package/lib/stateAggregator/stateAggregator.js +46 -0
- package/lib/status/myDomainResolver.d.ts +1 -1
- package/lib/status/myDomainResolver.js +4 -4
- package/lib/status/pollingClient.js +4 -4
- package/lib/status/streamingClient.d.ts +2 -2
- package/lib/status/streamingClient.js +58 -63
- package/lib/status/types.d.ts +2 -2
- package/lib/testSetup.d.ts +206 -75
- package/lib/testSetup.js +463 -165
- package/lib/util/cache.d.ts +2 -2
- package/lib/util/cache.js +6 -6
- package/lib/util/checkLightningDomain.js +3 -4
- package/lib/util/directoryWriter.d.ts +12 -0
- package/lib/util/directoryWriter.js +54 -0
- package/lib/util/getJwtAudienceUrl.js +1 -1
- package/lib/util/internal.d.ts +28 -2
- package/lib/util/internal.js +65 -8
- package/lib/util/jsonXmlTools.js +2 -4
- package/lib/util/mapKeys.d.ts +9 -9
- package/lib/util/mapKeys.js +13 -9
- package/lib/util/sfdc.d.ts +51 -51
- package/lib/util/sfdc.js +74 -79
- package/lib/util/sfdcUrl.d.ts +5 -19
- package/lib/util/sfdcUrl.js +40 -49
- package/lib/util/structuredWriter.d.ts +9 -0
- package/lib/util/structuredWriter.js +3 -0
- package/lib/util/zipWriter.d.ts +8 -6
- package/lib/util/zipWriter.js +13 -13
- package/lib/webOAuthServer.d.ts +20 -6
- package/lib/webOAuthServer.js +102 -56
- package/messageTransformer/messageTransformer.ts +93 -0
- package/messages/auth.md +9 -1
- package/messages/config.md +42 -6
- package/messages/connection.md +8 -0
- package/messages/core.md +10 -0
- package/messages/envVars.md +37 -3
- package/messages/org.md +21 -1
- package/messages/scratchOrgCreate.md +2 -6
- package/messages/scratchOrgErrorCodes.md +17 -1
- package/messages/scratchOrgInfoApi.md +9 -0
- package/messages/scratchOrgInfoGenerator.md +9 -1
- package/package.json +121 -46
- package/CHANGELOG.md +0 -1244
- package/lib/config/keychainConfig.d.ts +0 -19
- package/lib/config/keychainConfig.js +0 -43
- package/lib/globalInfo/accessors/orgAccessor.d.ts +0 -13
- package/lib/globalInfo/accessors/orgAccessor.js +0 -45
- package/lib/globalInfo/accessors/tokenAccessor.d.ts +0 -13
- package/lib/globalInfo/accessors/tokenAccessor.js +0 -35
- package/lib/globalInfo/globalInfoConfig.d.ts +0 -36
- package/lib/globalInfo/globalInfoConfig.js +0 -105
- package/lib/globalInfo/index.d.ts +0 -6
- package/lib/globalInfo/index.js +0 -29
- package/lib/globalInfo/sfdxDataHandler.d.ts +0 -43
- package/lib/globalInfo/sfdxDataHandler.js +0 -217
- package/lib/globalInfo/types.d.ts +0 -39
- package/lib/globalInfo/types.js +0 -10
- package/lib/sfdxProject.js +0 -557
- package/lib/util/fs.d.ts +0 -201
- package/lib/util/fs.js +0 -378
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { ConfigFile } from './configFile';
|
|
2
|
-
import { ConfigContents } from './configStore';
|
|
3
|
-
/**
|
|
4
|
-
* Represent a key chain config backed by a json file.
|
|
5
|
-
*/
|
|
6
|
-
export declare class KeychainConfig extends ConfigFile<ConfigFile.Options> {
|
|
7
|
-
static getFileName(): string;
|
|
8
|
-
/**
|
|
9
|
-
* Gets default options for the KeychainConfig
|
|
10
|
-
*/
|
|
11
|
-
static getDefaultOptions(): ConfigFile.Options;
|
|
12
|
-
/**
|
|
13
|
-
* Write the config file with new contents. If no new contents are passed in
|
|
14
|
-
* it will write this.contents that was set from read(). Returns the written contents.
|
|
15
|
-
*
|
|
16
|
-
* @param newContents the new contents of the file
|
|
17
|
-
*/
|
|
18
|
-
write(newContents?: ConfigContents): Promise<ConfigContents>;
|
|
19
|
-
}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* Copyright (c) 2020, salesforce.com, inc.
|
|
4
|
-
* All rights reserved.
|
|
5
|
-
* Licensed under the BSD 3-Clause license.
|
|
6
|
-
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
7
|
-
*/
|
|
8
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.KeychainConfig = void 0;
|
|
10
|
-
const path_1 = require("path");
|
|
11
|
-
const fs_1 = require("../util/fs");
|
|
12
|
-
const configFile_1 = require("./configFile");
|
|
13
|
-
/**
|
|
14
|
-
* Represent a key chain config backed by a json file.
|
|
15
|
-
*/
|
|
16
|
-
// istanbul ignore next - getPassword/setPassword is always mocked out
|
|
17
|
-
class KeychainConfig extends configFile_1.ConfigFile {
|
|
18
|
-
static getFileName() {
|
|
19
|
-
return 'key.json';
|
|
20
|
-
}
|
|
21
|
-
/**
|
|
22
|
-
* Gets default options for the KeychainConfig
|
|
23
|
-
*/
|
|
24
|
-
static getDefaultOptions() {
|
|
25
|
-
return configFile_1.ConfigFile.getDefaultOptions(true, KeychainConfig.getFileName());
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* Write the config file with new contents. If no new contents are passed in
|
|
29
|
-
* it will write this.contents that was set from read(). Returns the written contents.
|
|
30
|
-
*
|
|
31
|
-
* @param newContents the new contents of the file
|
|
32
|
-
*/
|
|
33
|
-
async write(newContents) {
|
|
34
|
-
if (newContents != null) {
|
|
35
|
-
this.setContents(newContents);
|
|
36
|
-
}
|
|
37
|
-
await fs_1.fs.mkdirp((0, path_1.dirname)(this.getPath()));
|
|
38
|
-
await fs_1.fs.writeFile(this.getPath(), JSON.stringify(this.getContents(), null, 4), { mode: '600' });
|
|
39
|
-
return this.getContents();
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
exports.KeychainConfig = KeychainConfig;
|
|
43
|
-
//# sourceMappingURL=keychainConfig.js.map
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { Optional } from '@salesforce/ts-types';
|
|
2
|
-
import { GlobalInfo } from '../globalInfoConfig';
|
|
3
|
-
import { SfOrgs, SfOrg } from '../types';
|
|
4
|
-
export declare class OrgAccessor {
|
|
5
|
-
private globalInfo;
|
|
6
|
-
constructor(globalInfo: GlobalInfo);
|
|
7
|
-
getAll(decrypt?: boolean): SfOrgs;
|
|
8
|
-
get(username: string, decrypt?: boolean): Optional<SfOrg>;
|
|
9
|
-
has(username: string): boolean;
|
|
10
|
-
set(username: string, org: SfOrg): void;
|
|
11
|
-
update(username: string, org: Partial<SfOrg>): void;
|
|
12
|
-
unset(username: string): void;
|
|
13
|
-
}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* Copyright (c) 2021, salesforce.com, inc.
|
|
4
|
-
* All rights reserved.
|
|
5
|
-
* Licensed under the BSD 3-Clause license.
|
|
6
|
-
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
7
|
-
*/
|
|
8
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.OrgAccessor = void 0;
|
|
10
|
-
const types_1 = require("../types");
|
|
11
|
-
class OrgAccessor {
|
|
12
|
-
constructor(globalInfo) {
|
|
13
|
-
this.globalInfo = globalInfo;
|
|
14
|
-
}
|
|
15
|
-
getAll(decrypt = false) {
|
|
16
|
-
return this.globalInfo.get(types_1.SfInfoKeys.ORGS, decrypt);
|
|
17
|
-
}
|
|
18
|
-
get(username, decrypt = false) {
|
|
19
|
-
const auth = this.globalInfo.get(`${types_1.SfInfoKeys.ORGS}["${username}"]`, decrypt);
|
|
20
|
-
// For legacy, some things wants the username in the returned auth info.
|
|
21
|
-
if (auth && !auth.username)
|
|
22
|
-
auth.username = username;
|
|
23
|
-
return auth;
|
|
24
|
-
}
|
|
25
|
-
has(username) {
|
|
26
|
-
return !!this.getAll()[username];
|
|
27
|
-
}
|
|
28
|
-
set(username, org) {
|
|
29
|
-
// For legacy, and to keep things standard, some things wants the username in auth info.
|
|
30
|
-
if (!org.username)
|
|
31
|
-
org.username = username;
|
|
32
|
-
this.globalInfo.set(`${types_1.SfInfoKeys.ORGS}["${username}"]`, org);
|
|
33
|
-
}
|
|
34
|
-
update(username, org) {
|
|
35
|
-
// For legacy, and to keep things standard, some things wants the username in auth info.
|
|
36
|
-
if (!org.username)
|
|
37
|
-
org.username = username;
|
|
38
|
-
this.globalInfo.update(`${types_1.SfInfoKeys.ORGS}["${username}"]`, org);
|
|
39
|
-
}
|
|
40
|
-
unset(username) {
|
|
41
|
-
delete this.globalInfo.get(types_1.SfInfoKeys.ORGS)[username];
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
exports.OrgAccessor = OrgAccessor;
|
|
45
|
-
//# sourceMappingURL=orgAccessor.js.map
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { Optional } from '@salesforce/ts-types';
|
|
2
|
-
import { GlobalInfo } from '../globalInfoConfig';
|
|
3
|
-
import { SfTokens, SfToken, Timestamp } from '../types';
|
|
4
|
-
export declare class TokenAccessor {
|
|
5
|
-
private globalInfo;
|
|
6
|
-
constructor(globalInfo: GlobalInfo);
|
|
7
|
-
getAll(decrypt?: boolean): SfTokens;
|
|
8
|
-
get(name: string, decrypt?: boolean): Optional<SfToken & Timestamp>;
|
|
9
|
-
has(name: string): boolean;
|
|
10
|
-
set(name: string, token: SfToken): void;
|
|
11
|
-
update(name: string, token: Partial<SfToken>): void;
|
|
12
|
-
unset(name: string): void;
|
|
13
|
-
}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* Copyright (c) 2021, salesforce.com, inc.
|
|
4
|
-
* All rights reserved.
|
|
5
|
-
* Licensed under the BSD 3-Clause license.
|
|
6
|
-
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
7
|
-
*/
|
|
8
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.TokenAccessor = void 0;
|
|
10
|
-
const types_1 = require("../types");
|
|
11
|
-
class TokenAccessor {
|
|
12
|
-
constructor(globalInfo) {
|
|
13
|
-
this.globalInfo = globalInfo;
|
|
14
|
-
}
|
|
15
|
-
getAll(decrypt = false) {
|
|
16
|
-
return this.globalInfo.get(types_1.SfInfoKeys.TOKENS, decrypt) || {};
|
|
17
|
-
}
|
|
18
|
-
get(name, decrypt = false) {
|
|
19
|
-
return this.globalInfo.get(`${types_1.SfInfoKeys.TOKENS}["${name}"]`, decrypt);
|
|
20
|
-
}
|
|
21
|
-
has(name) {
|
|
22
|
-
return !!this.getAll()[name];
|
|
23
|
-
}
|
|
24
|
-
set(name, token) {
|
|
25
|
-
this.globalInfo.set(`${types_1.SfInfoKeys.TOKENS}["${name}"]`, token);
|
|
26
|
-
}
|
|
27
|
-
update(name, token) {
|
|
28
|
-
this.globalInfo.update(`${types_1.SfInfoKeys.TOKENS}["${name}"]`, token);
|
|
29
|
-
}
|
|
30
|
-
unset(name) {
|
|
31
|
-
delete this.globalInfo.get(types_1.SfInfoKeys.TOKENS)[name];
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
exports.TokenAccessor = TokenAccessor;
|
|
35
|
-
//# sourceMappingURL=tokenAccessor.js.map
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { AnyJson } from '@salesforce/ts-types';
|
|
2
|
-
import { ConfigFile } from '../config/configFile';
|
|
3
|
-
import { ConfigValue } from '../config/configStore';
|
|
4
|
-
import { OrgAccessor } from './accessors/orgAccessor';
|
|
5
|
-
import { TokenAccessor } from './accessors/tokenAccessor';
|
|
6
|
-
import { AliasAccessor } from './accessors/aliasAccessor';
|
|
7
|
-
import { SfInfo } from './types';
|
|
8
|
-
export declare function deepCopy<T extends AnyJson>(data: T): T;
|
|
9
|
-
export declare class GlobalInfo extends ConfigFile<ConfigFile.Options, SfInfo> {
|
|
10
|
-
protected static encryptedKeys: RegExp[];
|
|
11
|
-
private static EMPTY_DATA_MODEL;
|
|
12
|
-
private static instance;
|
|
13
|
-
private sfdxHandler;
|
|
14
|
-
static get emptyDataModel(): SfInfo;
|
|
15
|
-
static getInstance(): Promise<GlobalInfo>;
|
|
16
|
-
/**
|
|
17
|
-
* Clear the cache to force reading from disk.
|
|
18
|
-
*
|
|
19
|
-
* *NOTE: Only call this method if you must and you know what you are doing.*
|
|
20
|
-
*/
|
|
21
|
-
static clearInstance(): void;
|
|
22
|
-
static getFileName(): string;
|
|
23
|
-
/**
|
|
24
|
-
* Gets default options for the SfConfig
|
|
25
|
-
*/
|
|
26
|
-
static getDefaultOptions(): ConfigFile.Options;
|
|
27
|
-
get orgs(): OrgAccessor;
|
|
28
|
-
get tokens(): TokenAccessor;
|
|
29
|
-
get aliases(): AliasAccessor;
|
|
30
|
-
set(key: string, value: ConfigValue): void;
|
|
31
|
-
write(newContents?: SfInfo): Promise<SfInfo>;
|
|
32
|
-
protected init(): Promise<void>;
|
|
33
|
-
private timestamp;
|
|
34
|
-
private loadSfData;
|
|
35
|
-
private mergeWithSfdxData;
|
|
36
|
-
}
|
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.GlobalInfo = exports.deepCopy = void 0;
|
|
4
|
-
/*
|
|
5
|
-
* Copyright (c) 2020, salesforce.com, inc.
|
|
6
|
-
* All rights reserved.
|
|
7
|
-
* Licensed under the BSD 3-Clause license.
|
|
8
|
-
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
9
|
-
*/
|
|
10
|
-
const ts_types_1 = require("@salesforce/ts-types");
|
|
11
|
-
const global_1 = require("../global");
|
|
12
|
-
const configFile_1 = require("../config/configFile");
|
|
13
|
-
const sfdxDataHandler_1 = require("./sfdxDataHandler");
|
|
14
|
-
const orgAccessor_1 = require("./accessors/orgAccessor");
|
|
15
|
-
const tokenAccessor_1 = require("./accessors/tokenAccessor");
|
|
16
|
-
const aliasAccessor_1 = require("./accessors/aliasAccessor");
|
|
17
|
-
const types_1 = require("./types");
|
|
18
|
-
function deepCopy(data) {
|
|
19
|
-
return JSON.parse(JSON.stringify(data));
|
|
20
|
-
}
|
|
21
|
-
exports.deepCopy = deepCopy;
|
|
22
|
-
class GlobalInfo extends configFile_1.ConfigFile {
|
|
23
|
-
constructor() {
|
|
24
|
-
super(...arguments);
|
|
25
|
-
this.sfdxHandler = new sfdxDataHandler_1.SfdxDataHandler();
|
|
26
|
-
}
|
|
27
|
-
static get emptyDataModel() {
|
|
28
|
-
return deepCopy(GlobalInfo.EMPTY_DATA_MODEL);
|
|
29
|
-
}
|
|
30
|
-
static async getInstance() {
|
|
31
|
-
if (!GlobalInfo.instance) {
|
|
32
|
-
GlobalInfo.instance = await GlobalInfo.create();
|
|
33
|
-
}
|
|
34
|
-
return GlobalInfo.instance;
|
|
35
|
-
}
|
|
36
|
-
/**
|
|
37
|
-
* Clear the cache to force reading from disk.
|
|
38
|
-
*
|
|
39
|
-
* *NOTE: Only call this method if you must and you know what you are doing.*
|
|
40
|
-
*/
|
|
41
|
-
static clearInstance() {
|
|
42
|
-
delete GlobalInfo.instance;
|
|
43
|
-
}
|
|
44
|
-
static getFileName() {
|
|
45
|
-
return 'sf.json';
|
|
46
|
-
}
|
|
47
|
-
/**
|
|
48
|
-
* Gets default options for the SfConfig
|
|
49
|
-
*/
|
|
50
|
-
static getDefaultOptions() {
|
|
51
|
-
return {
|
|
52
|
-
isGlobal: true,
|
|
53
|
-
isState: true,
|
|
54
|
-
filename: GlobalInfo.getFileName(),
|
|
55
|
-
stateFolder: global_1.Global.SF_STATE_FOLDER,
|
|
56
|
-
};
|
|
57
|
-
}
|
|
58
|
-
get orgs() {
|
|
59
|
-
return new orgAccessor_1.OrgAccessor(this);
|
|
60
|
-
}
|
|
61
|
-
get tokens() {
|
|
62
|
-
return new tokenAccessor_1.TokenAccessor(this);
|
|
63
|
-
}
|
|
64
|
-
get aliases() {
|
|
65
|
-
return new aliasAccessor_1.AliasAccessor(this);
|
|
66
|
-
}
|
|
67
|
-
set(key, value) {
|
|
68
|
-
if ((0, ts_types_1.isPlainObject)(value)) {
|
|
69
|
-
value = this.timestamp(value);
|
|
70
|
-
}
|
|
71
|
-
super.set(key, value);
|
|
72
|
-
}
|
|
73
|
-
async write(newContents) {
|
|
74
|
-
const result = await super.write(newContents);
|
|
75
|
-
if (global_1.Global.SFDX_INTEROPERABILITY)
|
|
76
|
-
await this.sfdxHandler.write(result);
|
|
77
|
-
return result;
|
|
78
|
-
}
|
|
79
|
-
async init() {
|
|
80
|
-
await this.initCrypto();
|
|
81
|
-
const contents = global_1.Global.SFDX_INTEROPERABILITY ? await this.mergeWithSfdxData() : await this.loadSfData();
|
|
82
|
-
this.setContents(contents);
|
|
83
|
-
}
|
|
84
|
-
timestamp(data) {
|
|
85
|
-
return { ...data, timestamp: new Date() };
|
|
86
|
-
}
|
|
87
|
-
async loadSfData() {
|
|
88
|
-
const data = await this.read();
|
|
89
|
-
return { ...GlobalInfo.emptyDataModel, ...data };
|
|
90
|
-
}
|
|
91
|
-
async mergeWithSfdxData() {
|
|
92
|
-
const sfData = await this.loadSfData();
|
|
93
|
-
const merged = await this.sfdxHandler.merge(sfData);
|
|
94
|
-
await this.write(merged);
|
|
95
|
-
return merged;
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
exports.GlobalInfo = GlobalInfo;
|
|
99
|
-
GlobalInfo.encryptedKeys = [/token/gi, /password/gi, /secret/gi];
|
|
100
|
-
GlobalInfo.EMPTY_DATA_MODEL = {
|
|
101
|
-
[types_1.SfInfoKeys.ORGS]: {},
|
|
102
|
-
[types_1.SfInfoKeys.TOKENS]: {},
|
|
103
|
-
[types_1.SfInfoKeys.ALIASES]: {},
|
|
104
|
-
};
|
|
105
|
-
//# sourceMappingURL=globalInfoConfig.js.map
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export * from './globalInfoConfig';
|
|
2
|
-
export * from './sfdxDataHandler';
|
|
3
|
-
export * from './types';
|
|
4
|
-
export { OrgAccessor } from './accessors/orgAccessor';
|
|
5
|
-
export { AliasAccessor } from './accessors/aliasAccessor';
|
|
6
|
-
export { TokenAccessor } from './accessors/tokenAccessor';
|
package/lib/globalInfo/index.js
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* Copyright (c) 2021, salesforce.com, inc.
|
|
4
|
-
* All rights reserved.
|
|
5
|
-
* Licensed under the BSD 3-Clause license.
|
|
6
|
-
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
7
|
-
*/
|
|
8
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
9
|
-
if (k2 === undefined) k2 = k;
|
|
10
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
11
|
-
}) : (function(o, m, k, k2) {
|
|
12
|
-
if (k2 === undefined) k2 = k;
|
|
13
|
-
o[k2] = m[k];
|
|
14
|
-
}));
|
|
15
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
16
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
17
|
-
};
|
|
18
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
|
-
exports.TokenAccessor = exports.AliasAccessor = exports.OrgAccessor = void 0;
|
|
20
|
-
__exportStar(require("./globalInfoConfig"), exports);
|
|
21
|
-
__exportStar(require("./sfdxDataHandler"), exports);
|
|
22
|
-
__exportStar(require("./types"), exports);
|
|
23
|
-
var orgAccessor_1 = require("./accessors/orgAccessor");
|
|
24
|
-
Object.defineProperty(exports, "OrgAccessor", { enumerable: true, get: function () { return orgAccessor_1.OrgAccessor; } });
|
|
25
|
-
var aliasAccessor_1 = require("./accessors/aliasAccessor");
|
|
26
|
-
Object.defineProperty(exports, "AliasAccessor", { enumerable: true, get: function () { return aliasAccessor_1.AliasAccessor; } });
|
|
27
|
-
var tokenAccessor_1 = require("./accessors/tokenAccessor");
|
|
28
|
-
Object.defineProperty(exports, "TokenAccessor", { enumerable: true, get: function () { return tokenAccessor_1.TokenAccessor; } });
|
|
29
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { ConfigFile } from '../config/configFile';
|
|
2
|
-
import { SfOrgs, SfOrg, SfInfo, SfInfoKeys } from './types';
|
|
3
|
-
interface Handler<T extends SfInfoKeys> {
|
|
4
|
-
sfKey: T;
|
|
5
|
-
merge: (sfData: SfInfo) => Promise<Partial<SfInfo>>;
|
|
6
|
-
migrate: () => Promise<Pick<SfInfo, T>>;
|
|
7
|
-
write: (latest: SfInfo, original: SfInfo) => Promise<void>;
|
|
8
|
-
}
|
|
9
|
-
interface Changes<T> {
|
|
10
|
-
changed: T;
|
|
11
|
-
deleted: string[];
|
|
12
|
-
}
|
|
13
|
-
export declare class SfdxDataHandler {
|
|
14
|
-
handlers: (AuthHandler | AliasesHandler)[];
|
|
15
|
-
private original;
|
|
16
|
-
write(latest?: SfInfo): Promise<void>;
|
|
17
|
-
merge(sfData?: SfInfo): Promise<SfInfo>;
|
|
18
|
-
private setOriginal;
|
|
19
|
-
}
|
|
20
|
-
declare abstract class BaseHandler<T extends SfInfoKeys> implements Handler<T> {
|
|
21
|
-
abstract sfKey: T;
|
|
22
|
-
merge(sfData?: SfInfo): Promise<Partial<SfInfo>>;
|
|
23
|
-
abstract migrate(): Promise<Pick<SfInfo, T>>;
|
|
24
|
-
abstract write(latest: SfInfo, original: SfInfo): Promise<void>;
|
|
25
|
-
}
|
|
26
|
-
export declare class AuthHandler extends BaseHandler<SfInfoKeys.ORGS> {
|
|
27
|
-
private static authFilenameFilterRegEx;
|
|
28
|
-
sfKey: typeof SfInfoKeys.ORGS;
|
|
29
|
-
migrate(): Promise<Pick<SfInfo, SfInfoKeys.ORGS>>;
|
|
30
|
-
write(latest: SfInfo, original: SfInfo): Promise<void>;
|
|
31
|
-
findChanges(latest: SfInfo, original: SfInfo): Promise<Changes<SfOrgs>>;
|
|
32
|
-
createAuthFileConfig(username: string): Promise<ConfigFile<ConfigFile.Options>>;
|
|
33
|
-
listAllAuthFiles(): Promise<string[]>;
|
|
34
|
-
listAllAuthorizations(): Promise<SfOrg[]>;
|
|
35
|
-
}
|
|
36
|
-
export declare class AliasesHandler extends BaseHandler<SfInfoKeys.ALIASES> {
|
|
37
|
-
private static SFDX_ALIASES_FILENAME;
|
|
38
|
-
sfKey: typeof SfInfoKeys.ALIASES;
|
|
39
|
-
migrate(): Promise<Pick<SfInfo, SfInfoKeys.ALIASES>>;
|
|
40
|
-
merge(sfData?: SfInfo): Promise<Partial<SfInfo>>;
|
|
41
|
-
write(latest: SfInfo): Promise<void>;
|
|
42
|
-
}
|
|
43
|
-
export {};
|
|
@@ -1,217 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* Copyright (c) 2020, salesforce.com, inc.
|
|
4
|
-
* All rights reserved.
|
|
5
|
-
* Licensed under the BSD 3-Clause license.
|
|
6
|
-
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
7
|
-
*/
|
|
8
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.AliasesHandler = exports.AuthHandler = exports.SfdxDataHandler = void 0;
|
|
10
|
-
const path_1 = require("path");
|
|
11
|
-
const kit_1 = require("@salesforce/kit");
|
|
12
|
-
const ts_types_1 = require("@salesforce/ts-types");
|
|
13
|
-
const global_1 = require("../global");
|
|
14
|
-
const fs_1 = require("../util/fs");
|
|
15
|
-
const configFile_1 = require("../config/configFile");
|
|
16
|
-
const globalInfoConfig_1 = require("./globalInfoConfig");
|
|
17
|
-
const types_1 = require("./types");
|
|
18
|
-
function isEqual(object1, object2) {
|
|
19
|
-
const keys1 = Object.keys(object1).filter((k) => k !== 'timestamp');
|
|
20
|
-
const keys2 = Object.keys(object2).filter((k) => k !== 'timestamp');
|
|
21
|
-
if (keys1.length !== keys2.length)
|
|
22
|
-
return false;
|
|
23
|
-
for (const key of keys1) {
|
|
24
|
-
if (object1[key] !== object2[key])
|
|
25
|
-
return false;
|
|
26
|
-
}
|
|
27
|
-
return true;
|
|
28
|
-
}
|
|
29
|
-
class SfdxDataHandler {
|
|
30
|
-
constructor() {
|
|
31
|
-
this.handlers = [new AuthHandler(), new AliasesHandler()];
|
|
32
|
-
}
|
|
33
|
-
async write(latest = globalInfoConfig_1.GlobalInfo.emptyDataModel) {
|
|
34
|
-
for (const handler of this.handlers) {
|
|
35
|
-
await handler.write(latest, this.original);
|
|
36
|
-
this.setOriginal(latest);
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
async merge(sfData = globalInfoConfig_1.GlobalInfo.emptyDataModel) {
|
|
40
|
-
let merged = (0, globalInfoConfig_1.deepCopy)(sfData);
|
|
41
|
-
for (const handler of this.handlers) {
|
|
42
|
-
merged = Object.assign(merged, await handler.merge(merged));
|
|
43
|
-
}
|
|
44
|
-
this.setOriginal(merged);
|
|
45
|
-
return merged;
|
|
46
|
-
}
|
|
47
|
-
setOriginal(data) {
|
|
48
|
-
this.original = (0, globalInfoConfig_1.deepCopy)(data);
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
exports.SfdxDataHandler = SfdxDataHandler;
|
|
52
|
-
class BaseHandler {
|
|
53
|
-
async merge(sfData = globalInfoConfig_1.GlobalInfo.emptyDataModel) {
|
|
54
|
-
var _a, _b;
|
|
55
|
-
const sfdxData = await this.migrate();
|
|
56
|
-
const merged = (0, globalInfoConfig_1.deepCopy)(sfData);
|
|
57
|
-
// Only merge the key this handler is responsible for.
|
|
58
|
-
const key = this.sfKey;
|
|
59
|
-
const sfKeys = Object.keys((_a = sfData[key]) !== null && _a !== void 0 ? _a : {});
|
|
60
|
-
const sfdxKeys = Object.keys((_b = sfdxData[key]) !== null && _b !== void 0 ? _b : {});
|
|
61
|
-
const commonKeys = sfKeys.filter((k) => sfdxKeys.includes(k));
|
|
62
|
-
for (const k of commonKeys) {
|
|
63
|
-
const [newer, older] = [sfData[key][k], sfdxData[key][k]].sort((a, b) => {
|
|
64
|
-
if ((0, ts_types_1.isPlainObject)(a) && (0, ts_types_1.isPlainObject)(b))
|
|
65
|
-
return new Date(a.timestamp) < new Date(b.timestamp) ? 1 : -1;
|
|
66
|
-
return 0;
|
|
67
|
-
});
|
|
68
|
-
(0, kit_1.set)(merged, `${key}["${k}"]`, Object.assign({}, older, newer));
|
|
69
|
-
}
|
|
70
|
-
// Keys that exist in .sfdx but not .sf are added becase we assume
|
|
71
|
-
// that this means the key was created using sfdx.
|
|
72
|
-
// However, this is not always a valid assumption because it could
|
|
73
|
-
// also mean that the key was deleted using sf, in which case we
|
|
74
|
-
// do not want to migrate the sfdx key to sf.
|
|
75
|
-
// Programmatically differentiating between a new key and a deleted key
|
|
76
|
-
// would be nearly impossible. Instead we should ensure that whenever
|
|
77
|
-
// sf deletes a key it also deletes it in sfdx. This way, we can safely
|
|
78
|
-
// assume that we should migrate any keys that exist in in .sfdx
|
|
79
|
-
const unhandledSfdxKeys = sfdxKeys.filter((k) => !sfKeys.includes(k));
|
|
80
|
-
for (const k of unhandledSfdxKeys) {
|
|
81
|
-
(0, kit_1.set)(merged, `${key}["${k}"]`, sfdxData[key][k]);
|
|
82
|
-
}
|
|
83
|
-
// Keys that exist in .sf but not .sfdx are deleted because we assume
|
|
84
|
-
// that this means the key was deleted while using sfdx.
|
|
85
|
-
// We can make this assumption because keys that are created by sf will
|
|
86
|
-
// always be migrated back to sfdx
|
|
87
|
-
const unhandledSfKeys = sfKeys.filter((k) => !sfdxKeys.includes(k));
|
|
88
|
-
for (const k of unhandledSfKeys) {
|
|
89
|
-
delete merged[key][k];
|
|
90
|
-
}
|
|
91
|
-
return merged;
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
class AuthHandler extends BaseHandler {
|
|
95
|
-
constructor() {
|
|
96
|
-
super(...arguments);
|
|
97
|
-
this.sfKey = types_1.SfInfoKeys.ORGS;
|
|
98
|
-
}
|
|
99
|
-
async migrate() {
|
|
100
|
-
const oldAuths = await this.listAllAuthorizations();
|
|
101
|
-
const newAuths = oldAuths.reduce((x, y) => Object.assign(x, { [(0, ts_types_1.ensureString)(y.username)]: y }), {});
|
|
102
|
-
return { [this.sfKey]: newAuths };
|
|
103
|
-
}
|
|
104
|
-
async write(latest, original) {
|
|
105
|
-
const { changed, deleted } = await this.findChanges(latest, original);
|
|
106
|
-
for (const [username, authData] of Object.entries(changed)) {
|
|
107
|
-
if (authData) {
|
|
108
|
-
const config = await this.createAuthFileConfig(username);
|
|
109
|
-
config.setContentsFromObject(authData);
|
|
110
|
-
await config.write();
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
for (const username of deleted) {
|
|
114
|
-
const config = await this.createAuthFileConfig(username);
|
|
115
|
-
await config.unlink();
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
async findChanges(latest, original) {
|
|
119
|
-
var _a;
|
|
120
|
-
const latestAuths = latest.orgs;
|
|
121
|
-
const originalAuths = original.orgs;
|
|
122
|
-
const changed = {};
|
|
123
|
-
for (const [username, auth] of Object.entries(latestAuths)) {
|
|
124
|
-
const originalAuth = (_a = originalAuths[username]) !== null && _a !== void 0 ? _a : {};
|
|
125
|
-
if (!isEqual(auth, originalAuth)) {
|
|
126
|
-
changed[username] = auth;
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
const deleted = Object.keys(originalAuths).filter((username) => !latestAuths[username]);
|
|
130
|
-
return { changed, deleted };
|
|
131
|
-
}
|
|
132
|
-
async createAuthFileConfig(username) {
|
|
133
|
-
const config = await configFile_1.ConfigFile.create({
|
|
134
|
-
filename: `${username}.json`,
|
|
135
|
-
isGlobal: true,
|
|
136
|
-
isState: true,
|
|
137
|
-
stateFolder: global_1.Global.SFDX_STATE_FOLDER,
|
|
138
|
-
throwOnNotFound: false,
|
|
139
|
-
encryptedKeys: ['accessToken', 'refreshToken', 'password', 'clientSecret'],
|
|
140
|
-
});
|
|
141
|
-
return config;
|
|
142
|
-
}
|
|
143
|
-
async listAllAuthFiles() {
|
|
144
|
-
const globalFiles = await fs_1.fs.readdir(global_1.Global.SFDX_DIR);
|
|
145
|
-
return globalFiles.filter((file) => file.match(AuthHandler.authFilenameFilterRegEx));
|
|
146
|
-
}
|
|
147
|
-
async listAllAuthorizations() {
|
|
148
|
-
const filenames = await this.listAllAuthFiles();
|
|
149
|
-
const auths = [];
|
|
150
|
-
for (const filename of filenames) {
|
|
151
|
-
const username = (0, path_1.basename)(filename, (0, path_1.extname)(filename));
|
|
152
|
-
const configFile = await this.createAuthFileConfig(username);
|
|
153
|
-
const contents = configFile.getContents();
|
|
154
|
-
const stat = await configFile.stat();
|
|
155
|
-
const auth = Object.assign(contents, { timestamp: stat.mtime.toISOString() });
|
|
156
|
-
auths.push(auth);
|
|
157
|
-
}
|
|
158
|
-
return auths;
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
exports.AuthHandler = AuthHandler;
|
|
162
|
-
// The regular expression that filters files stored in $HOME/.sfdx
|
|
163
|
-
AuthHandler.authFilenameFilterRegEx = /^[^.][^@]*@[^.]+(\.[^.\s]+)+\.json$/;
|
|
164
|
-
class AliasesHandler extends BaseHandler {
|
|
165
|
-
constructor() {
|
|
166
|
-
super(...arguments);
|
|
167
|
-
this.sfKey = types_1.SfInfoKeys.ALIASES;
|
|
168
|
-
}
|
|
169
|
-
async migrate() {
|
|
170
|
-
const aliasesFilePath = (0, path_1.join)(global_1.Global.SFDX_DIR, AliasesHandler.SFDX_ALIASES_FILENAME);
|
|
171
|
-
try {
|
|
172
|
-
const sfdxAliases = (await fs_1.fs.readJson(aliasesFilePath)).orgs;
|
|
173
|
-
return { [this.sfKey]: { ...sfdxAliases } };
|
|
174
|
-
}
|
|
175
|
-
catch (e) {
|
|
176
|
-
return { [this.sfKey]: {} };
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
// AliasesHandler implements its own merge method because the structure of aliases is flat instead of nested by SfInfoKey types.
|
|
180
|
-
async merge(sfData = globalInfoConfig_1.GlobalInfo.emptyDataModel) {
|
|
181
|
-
const sfdxAliases = (await this.migrate())[types_1.SfInfoKeys.ALIASES];
|
|
182
|
-
const merged = (0, globalInfoConfig_1.deepCopy)(sfData);
|
|
183
|
-
/* Overwrite `sf` aliases with `sfdx` aliases
|
|
184
|
-
* `sf` will always modify `sfdx` files but `sfdx` won't modify `sf` files
|
|
185
|
-
* because of this we can assume that any changes in `sfdx` files that aren't
|
|
186
|
-
* in `sf` are the latest data
|
|
187
|
-
*
|
|
188
|
-
* This breaks down if a user of `sf` manually modifies the `~/.sf/sf.json` file
|
|
189
|
-
* but we don't support that use case out-of-the-box (yet?)
|
|
190
|
-
*
|
|
191
|
-
* Note: See also the explanation on the merge method in the BaseHandler class
|
|
192
|
-
*/
|
|
193
|
-
Object.keys(sfdxAliases).forEach((alias) => {
|
|
194
|
-
merged[types_1.SfInfoKeys.ALIASES][alias] = sfdxAliases[alias];
|
|
195
|
-
});
|
|
196
|
-
/* Delete any aliases that don't exist in sfdx config files
|
|
197
|
-
* Aliases that exist in .sf but not .sfdx are deleted because we assume
|
|
198
|
-
* that this means the alias was deleted while using sfdx. We can make
|
|
199
|
-
* this assumption because keys that are created by sf will always be
|
|
200
|
-
* migrated back to sfdx.
|
|
201
|
-
*
|
|
202
|
-
* Note: See also the explanation on the merge method in the BaseHandler class
|
|
203
|
-
*/
|
|
204
|
-
for (const alias in merged[types_1.SfInfoKeys.ALIASES]) {
|
|
205
|
-
if (!sfdxAliases[alias])
|
|
206
|
-
delete merged[types_1.SfInfoKeys.ALIASES][alias];
|
|
207
|
-
}
|
|
208
|
-
return merged;
|
|
209
|
-
}
|
|
210
|
-
async write(latest) {
|
|
211
|
-
const aliasesFilePath = (0, path_1.join)(global_1.Global.SFDX_DIR, AliasesHandler.SFDX_ALIASES_FILENAME);
|
|
212
|
-
fs_1.fs.writeJson(aliasesFilePath, { orgs: latest[types_1.SfInfoKeys.ALIASES] });
|
|
213
|
-
}
|
|
214
|
-
}
|
|
215
|
-
exports.AliasesHandler = AliasesHandler;
|
|
216
|
-
AliasesHandler.SFDX_ALIASES_FILENAME = 'alias.json';
|
|
217
|
-
//# sourceMappingURL=sfdxDataHandler.js.map
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { JsonMap } from '@salesforce/ts-types';
|
|
2
|
-
export declare enum SfInfoKeys {
|
|
3
|
-
ORGS = "orgs",
|
|
4
|
-
TOKENS = "tokens",
|
|
5
|
-
ALIASES = "aliases"
|
|
6
|
-
}
|
|
7
|
-
export declare type Timestamp = {
|
|
8
|
-
timestamp: string;
|
|
9
|
-
};
|
|
10
|
-
export declare type SfEntry = JsonMap;
|
|
11
|
-
export declare type SfOrg = {
|
|
12
|
-
username: string;
|
|
13
|
-
orgId: string;
|
|
14
|
-
instanceUrl: string;
|
|
15
|
-
accessToken?: string;
|
|
16
|
-
} & SfEntry;
|
|
17
|
-
export interface SfOrgs {
|
|
18
|
-
[key: string]: SfOrg & Timestamp;
|
|
19
|
-
}
|
|
20
|
-
export declare type SfToken = {
|
|
21
|
-
token: string;
|
|
22
|
-
url: string;
|
|
23
|
-
user?: string;
|
|
24
|
-
} & SfEntry;
|
|
25
|
-
export interface SfTokens {
|
|
26
|
-
[key: string]: SfToken & Timestamp;
|
|
27
|
-
}
|
|
28
|
-
/**
|
|
29
|
-
* The key will always be the alias and the value will always be the username, e.g.
|
|
30
|
-
* { "MyAlias": "user@salesforce.com" }
|
|
31
|
-
*/
|
|
32
|
-
export interface SfAliases {
|
|
33
|
-
[alias: string]: string;
|
|
34
|
-
}
|
|
35
|
-
export declare type SfInfo = {
|
|
36
|
-
[SfInfoKeys.ORGS]: SfOrgs;
|
|
37
|
-
[SfInfoKeys.TOKENS]: SfTokens;
|
|
38
|
-
[SfInfoKeys.ALIASES]: SfAliases;
|
|
39
|
-
};
|
package/lib/globalInfo/types.js
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SfInfoKeys = void 0;
|
|
4
|
-
var SfInfoKeys;
|
|
5
|
-
(function (SfInfoKeys) {
|
|
6
|
-
SfInfoKeys["ORGS"] = "orgs";
|
|
7
|
-
SfInfoKeys["TOKENS"] = "tokens";
|
|
8
|
-
SfInfoKeys["ALIASES"] = "aliases";
|
|
9
|
-
})(SfInfoKeys = exports.SfInfoKeys || (exports.SfInfoKeys = {}));
|
|
10
|
-
//# sourceMappingURL=types.js.map
|