@salesforce/core-bundle 6.7.1 → 7.3.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/lib/index.d.ts +164 -166
- package/lib/index.js +116416 -125485
- package/lib/pino-file.js +1 -1
- package/lib/pino-worker.js +1 -1
- package/lib/transformStream.js +3 -3
- package/package.json +23 -9
package/lib/index.d.ts
CHANGED
@@ -28,7 +28,7 @@ declare module '@salesforce/core-bundle/config/config' {
|
|
28
28
|
/**
|
29
29
|
* Interface for meta information about config properties
|
30
30
|
*/
|
31
|
-
export
|
31
|
+
export type ConfigPropertyMeta = {
|
32
32
|
/**
|
33
33
|
* The config property name.
|
34
34
|
*/
|
@@ -58,11 +58,11 @@ declare module '@salesforce/core-bundle/config/config' {
|
|
58
58
|
* Is only used if deprecated is set to true.
|
59
59
|
*/
|
60
60
|
newKey?: string;
|
61
|
-
}
|
61
|
+
};
|
62
62
|
/**
|
63
63
|
* Config property input validation
|
64
64
|
*/
|
65
|
-
export
|
65
|
+
export type ConfigPropertyMetaInput = {
|
66
66
|
/**
|
67
67
|
* Tests if the input value is valid and returns true if the input data is valid.
|
68
68
|
*
|
@@ -73,7 +73,7 @@ declare module '@salesforce/core-bundle/config/config' {
|
|
73
73
|
* The message to return in the error if the validation fails.
|
74
74
|
*/
|
75
75
|
failedMessage: string | ((value: ConfigValue) => string);
|
76
|
-
}
|
76
|
+
};
|
77
77
|
export enum SfConfigProperties {
|
78
78
|
/**
|
79
79
|
* Disables telemetry reporting
|
@@ -318,7 +318,7 @@ declare module '@salesforce/core-bundle/config/configAggregator' {
|
|
318
318
|
/**
|
319
319
|
* Information about a config property.
|
320
320
|
*/
|
321
|
-
export
|
321
|
+
export type ConfigInfo = {
|
322
322
|
/**
|
323
323
|
* key The config key.
|
324
324
|
*/
|
@@ -351,7 +351,7 @@ declare module '@salesforce/core-bundle/config/configAggregator' {
|
|
351
351
|
* True if the config property is deprecated.
|
352
352
|
*/
|
353
353
|
deprecated?: boolean;
|
354
|
-
}
|
354
|
+
};
|
355
355
|
/**
|
356
356
|
* Aggregate global and local project config files, as well as environment variables for
|
357
357
|
* `config.json`. The resolution happens in the following bottom-up order:
|
@@ -704,7 +704,7 @@ declare module '@salesforce/core-bundle/config/configFile' {
|
|
704
704
|
/**
|
705
705
|
* The interface for Config options.
|
706
706
|
*/
|
707
|
-
|
707
|
+
type Options = {
|
708
708
|
/**
|
709
709
|
* The root folder where the config file is stored.
|
710
710
|
*/
|
@@ -733,7 +733,7 @@ declare module '@salesforce/core-bundle/config/configFile' {
|
|
733
733
|
* Indicates if init should throw if the corresponding config file is not found.
|
734
734
|
*/
|
735
735
|
throwOnNotFound?: boolean;
|
736
|
-
}
|
736
|
+
} & BaseConfigStore.Options;
|
737
737
|
}
|
738
738
|
|
739
739
|
}
|
@@ -763,7 +763,7 @@ declare module '@salesforce/core-bundle/config/configStore' {
|
|
763
763
|
/**
|
764
764
|
* An interface for a config object with a persistent store.
|
765
765
|
*/
|
766
|
-
export
|
766
|
+
export type ConfigStore<P extends ConfigContents = ConfigContents> = {
|
767
767
|
entries(): ConfigEntry[];
|
768
768
|
get<K extends Key<P>>(key: K, decrypt: boolean): P[K];
|
769
769
|
get<T extends ConfigValue>(key: string, decrypt: boolean): T;
|
@@ -780,7 +780,7 @@ declare module '@salesforce/core-bundle/config/configStore' {
|
|
780
780
|
values(): ConfigValue[];
|
781
781
|
forEach(actionFn: (key: string, value: ConfigValue) => void): void;
|
782
782
|
getContents(): P;
|
783
|
-
}
|
783
|
+
};
|
784
784
|
/**
|
785
785
|
* An abstract class that implements all the config management functions but
|
786
786
|
* none of the storage functions.
|
@@ -964,7 +964,7 @@ declare module '@salesforce/core-bundle/config/configStore' {
|
|
964
964
|
/**
|
965
965
|
* Options for the config store.
|
966
966
|
*/
|
967
|
-
|
967
|
+
type Options = {
|
968
968
|
/**
|
969
969
|
* Keys to encrypt.
|
970
970
|
*
|
@@ -974,7 +974,7 @@ declare module '@salesforce/core-bundle/config/configStore' {
|
|
974
974
|
* defining a new class.
|
975
975
|
*/
|
976
976
|
encryptedKeys?: Array<string | RegExp>;
|
977
|
-
}
|
977
|
+
};
|
978
978
|
}
|
979
979
|
|
980
980
|
}
|
@@ -1158,12 +1158,12 @@ declare module '@salesforce/core-bundle/config/orgUsersConfig' {
|
|
1158
1158
|
/**
|
1159
1159
|
* The config file options.
|
1160
1160
|
*/
|
1161
|
-
|
1161
|
+
type Options = {
|
1162
1162
|
/**
|
1163
1163
|
* The org id associated with this user.
|
1164
1164
|
*/
|
1165
1165
|
orgId: string;
|
1166
|
-
}
|
1166
|
+
} & ConfigFile.Options;
|
1167
1167
|
}
|
1168
1168
|
export {};
|
1169
1169
|
|
@@ -1193,12 +1193,12 @@ declare module '@salesforce/core-bundle/config/sandboxOrgConfig' {
|
|
1193
1193
|
/**
|
1194
1194
|
* The config file options.
|
1195
1195
|
*/
|
1196
|
-
|
1196
|
+
type Options = {
|
1197
1197
|
/**
|
1198
1198
|
* The org id associated with this sandbox.
|
1199
1199
|
*/
|
1200
1200
|
orgId: string;
|
1201
|
-
}
|
1201
|
+
} & ConfigFile.Options;
|
1202
1202
|
enum Fields {
|
1203
1203
|
/**
|
1204
1204
|
* The username of the user who created the sandbox.
|
@@ -1268,12 +1268,12 @@ declare module '@salesforce/core-bundle/config/ttlConfig' {
|
|
1268
1268
|
declare module '@salesforce/core-bundle/crypto/crypto' {
|
1269
1269
|
import { AsyncOptionalCreatable } from '@salesforce/kit';
|
1270
1270
|
import { KeyChain } from '@salesforce/core-bundle/crypto/keyChainImpl';
|
1271
|
-
|
1271
|
+
type CryptoOptions = {
|
1272
1272
|
keychain?: KeyChain;
|
1273
1273
|
platform?: string;
|
1274
1274
|
retryStatus?: string;
|
1275
1275
|
noResetOnClose?: boolean;
|
1276
|
-
}
|
1276
|
+
};
|
1277
1277
|
/**
|
1278
1278
|
* Class for managing encrypting and decrypting private auth information.
|
1279
1279
|
*/
|
@@ -1350,7 +1350,7 @@ declare module '@salesforce/core-bundle/crypto/keyChainImpl' {
|
|
1350
1350
|
/**
|
1351
1351
|
* Basic keychain interface.
|
1352
1352
|
*/
|
1353
|
-
export
|
1353
|
+
export type PasswordStore = {
|
1354
1354
|
/**
|
1355
1355
|
* Gets a password
|
1356
1356
|
*
|
@@ -1366,7 +1366,7 @@ declare module '@salesforce/core-bundle/crypto/keyChainImpl' {
|
|
1366
1366
|
* @param fn function callback for password.
|
1367
1367
|
*/
|
1368
1368
|
setPassword(opts: ProgramOpts, fn: (error: Nullable<Error>, contents?: SecretContents) => void): Promise<void>;
|
1369
|
-
}
|
1369
|
+
};
|
1370
1370
|
/**
|
1371
1371
|
* @private
|
1372
1372
|
*/
|
@@ -1400,12 +1400,12 @@ declare module '@salesforce/core-bundle/crypto/keyChainImpl' {
|
|
1400
1400
|
*/
|
1401
1401
|
setPassword(opts: ProgramOpts, fn: (error: Nullable<Error>, contents?: SecretContents) => void): Promise<void>;
|
1402
1402
|
}
|
1403
|
-
|
1403
|
+
type ProgramOpts = {
|
1404
1404
|
account: string;
|
1405
1405
|
service: string;
|
1406
1406
|
password?: string;
|
1407
|
-
}
|
1408
|
-
|
1407
|
+
};
|
1408
|
+
type OsImpl = {
|
1409
1409
|
getProgram(): string;
|
1410
1410
|
getProgramOptions(opts: ProgramOpts): string[];
|
1411
1411
|
getCommandFunc(opts: ProgramOpts, fn: (program: string, opts: string[]) => childProcess.ChildProcess): childProcess.ChildProcess;
|
@@ -1413,7 +1413,7 @@ declare module '@salesforce/core-bundle/crypto/keyChainImpl' {
|
|
1413
1413
|
setProgramOptions(opts: ProgramOpts): string[];
|
1414
1414
|
setCommandFunc(opts: ProgramOpts, fn: (program: string, opts: string[]) => childProcess.ChildProcess): childProcess.ChildProcess;
|
1415
1415
|
onSetCommandClose(code: number, stdout: string, stderr: string, opts: ProgramOpts, fn: (err: Nullable<Error>) => void): Promise<void>;
|
1416
|
-
}
|
1416
|
+
};
|
1417
1417
|
enum SecretField {
|
1418
1418
|
SERVICE = "service",
|
1419
1419
|
ACCOUNT = "account",
|
@@ -1509,16 +1509,16 @@ declare module '@salesforce/core-bundle/crypto/secureBuffer' {
|
|
1509
1509
|
}
|
1510
1510
|
declare module '@salesforce/core-bundle/deviceOauthService' {
|
1511
1511
|
import { AsyncCreatable } from '@salesforce/kit';
|
1512
|
-
import { OAuth2Config } from 'jsforce';
|
1512
|
+
import { OAuth2Config } from '@jsforce/jsforce-node';
|
1513
1513
|
import { JsonMap, Nullable } from '@salesforce/ts-types';
|
1514
1514
|
import { AuthInfo } from '@salesforce/core-bundle/org/authInfo';
|
1515
|
-
export
|
1515
|
+
export type DeviceCodeResponse = {
|
1516
1516
|
device_code: string;
|
1517
1517
|
interval: number;
|
1518
1518
|
user_code: string;
|
1519
1519
|
verification_uri: string;
|
1520
|
-
}
|
1521
|
-
export
|
1520
|
+
} & JsonMap;
|
1521
|
+
export type DeviceCodePollingResponse = {
|
1522
1522
|
access_token: string;
|
1523
1523
|
refresh_token: string;
|
1524
1524
|
signature: string;
|
@@ -1527,7 +1527,7 @@ declare module '@salesforce/core-bundle/deviceOauthService' {
|
|
1527
1527
|
id: string;
|
1528
1528
|
token_type: string;
|
1529
1529
|
issued_at: string;
|
1530
|
-
}
|
1530
|
+
} & JsonMap;
|
1531
1531
|
/**
|
1532
1532
|
* Handles device based login flows
|
1533
1533
|
*
|
@@ -1651,7 +1651,7 @@ declare module '@salesforce/core-bundle/global' {
|
|
1651
1651
|
|
1652
1652
|
}
|
1653
1653
|
declare module '@salesforce/core-bundle/index' {
|
1654
|
-
export { OAuth2Config } from 'jsforce';
|
1654
|
+
export { OAuth2Config } from '@jsforce/jsforce-node';
|
1655
1655
|
export { ConfigFile } from '@salesforce/core-bundle/config/configFile';
|
1656
1656
|
export { TTLConfig } from '@salesforce/core-bundle/config/ttlConfig';
|
1657
1657
|
export { envVars, EnvironmentVariable, SUPPORTED_ENV_VARS, EnvVars } from '@salesforce/core-bundle/config/envVars';
|
@@ -1688,6 +1688,7 @@ declare module '@salesforce/core-bundle/index' {
|
|
1688
1688
|
export { ScratchOrgInfo } from '@salesforce/core-bundle/org/scratchOrgTypes';
|
1689
1689
|
export { ScratchOrgLifecycleEvent, scratchOrgLifecycleEventName, scratchOrgLifecycleStages, } from '@salesforce/core-bundle/org/scratchOrgLifecycleEvents';
|
1690
1690
|
export { ScratchOrgCache } from '@salesforce/core-bundle/org/scratchOrgCache';
|
1691
|
+
export { default as ScratchOrgSettingsGenerator } from '@salesforce/core-bundle/org/scratchOrgSettingsGenerator';
|
1691
1692
|
export * from '@salesforce/core-bundle/util/sfdc';
|
1692
1693
|
export * from '@salesforce/core-bundle/testSetup';
|
1693
1694
|
|
@@ -1819,7 +1820,7 @@ declare module '@salesforce/core-bundle/logger/logger' {
|
|
1819
1820
|
/**
|
1820
1821
|
* The common set of `Logger` options.
|
1821
1822
|
*/
|
1822
|
-
export
|
1823
|
+
export type LoggerOptions = {
|
1823
1824
|
/**
|
1824
1825
|
* The logger name.
|
1825
1826
|
*/
|
@@ -1834,7 +1835,7 @@ declare module '@salesforce/core-bundle/logger/logger' {
|
|
1834
1835
|
fields?: Fields;
|
1835
1836
|
/** log to memory instead of to a file. Intended for Unit Testing */
|
1836
1837
|
useMemoryLogger?: boolean;
|
1837
|
-
}
|
1838
|
+
};
|
1838
1839
|
/**
|
1839
1840
|
* Standard `Logger` levels.
|
1840
1841
|
*
|
@@ -1863,7 +1864,7 @@ declare module '@salesforce/core-bundle/logger/logger' {
|
|
1863
1864
|
/**
|
1864
1865
|
* Log line interface
|
1865
1866
|
*/
|
1866
|
-
export
|
1867
|
+
export type LogLine = {
|
1867
1868
|
name: string;
|
1868
1869
|
hostname: string;
|
1869
1870
|
pid: string;
|
@@ -1872,7 +1873,7 @@ declare module '@salesforce/core-bundle/logger/logger' {
|
|
1872
1873
|
msg: string;
|
1873
1874
|
time: string;
|
1874
1875
|
v: number;
|
1875
|
-
}
|
1876
|
+
};
|
1876
1877
|
/**
|
1877
1878
|
* A logging abstraction powered by {@link https://github.com/pinojs/pino | Pino} that provides both a default
|
1878
1879
|
* logger configuration that will log to the default path, and a way to create custom loggers based on the same foundation.
|
@@ -2098,7 +2099,7 @@ declare module '@salesforce/core-bundle/logger/transformStream' {
|
|
2098
2099
|
|
2099
2100
|
}
|
2100
2101
|
declare module '@salesforce/core-bundle/messageTransformer' {
|
2101
|
-
import
|
2102
|
+
import ts from 'typescript';
|
2102
2103
|
/**
|
2103
2104
|
*
|
2104
2105
|
* @experimental
|
@@ -2395,7 +2396,7 @@ declare module '@salesforce/core-bundle/messages' {
|
|
2395
2396
|
declare module '@salesforce/core-bundle/org/authInfo' {
|
2396
2397
|
import { AsyncOptionalCreatable } from '@salesforce/kit';
|
2397
2398
|
import { Nullable } from '@salesforce/ts-types';
|
2398
|
-
import { OAuth2Config, OAuth2 } from 'jsforce';
|
2399
|
+
import { OAuth2Config, OAuth2 } from '@jsforce/jsforce-node';
|
2399
2400
|
import { Connection } from '@salesforce/core-bundle/org/connection';
|
2400
2401
|
import { Org } from '@salesforce/core-bundle/org/org';
|
2401
2402
|
/**
|
@@ -2451,11 +2452,11 @@ declare module '@salesforce/core-bundle/org/authInfo' {
|
|
2451
2452
|
/**
|
2452
2453
|
* Options for access token flow.
|
2453
2454
|
*/
|
2454
|
-
export
|
2455
|
+
export type AccessTokenOptions = {
|
2455
2456
|
accessToken?: string;
|
2456
2457
|
loginUrl?: string;
|
2457
2458
|
instanceUrl?: string;
|
2458
|
-
}
|
2459
|
+
};
|
2459
2460
|
export type AuthSideEffects = {
|
2460
2461
|
alias?: string;
|
2461
2462
|
setDefault: boolean;
|
@@ -2729,7 +2730,7 @@ declare module '@salesforce/core-bundle/org/authInfo' {
|
|
2729
2730
|
/**
|
2730
2731
|
* Constructor options for AuthInfo.
|
2731
2732
|
*/
|
2732
|
-
|
2733
|
+
type Options = {
|
2733
2734
|
/**
|
2734
2735
|
* Org signup username.
|
2735
2736
|
*/
|
@@ -2750,7 +2751,7 @@ declare module '@salesforce/core-bundle/org/authInfo' {
|
|
2750
2751
|
*/
|
2751
2752
|
parentUsername?: string;
|
2752
2753
|
isDevHub?: boolean;
|
2753
|
-
}
|
2754
|
+
};
|
2754
2755
|
}
|
2755
2756
|
|
2756
2757
|
}
|
@@ -2846,11 +2847,11 @@ declare module '@salesforce/core-bundle/org/authRemover' {
|
|
2846
2847
|
}
|
2847
2848
|
declare module '@salesforce/core-bundle/org/connection' {
|
2848
2849
|
/// <reference types="node" />
|
2849
|
-
import { AsyncResult, DeployOptions, DeployResultLocator } from 'jsforce/api/metadata';
|
2850
|
+
import { AsyncResult, DeployOptions, DeployResultLocator } from '@jsforce/jsforce-node/lib/api/metadata';
|
2850
2851
|
import { JsonMap, Optional } from '@salesforce/ts-types';
|
2851
|
-
import { Connection as JSForceConnection, ConnectionConfig, HttpRequest, QueryOptions, QueryResult, Record, Schema } from 'jsforce';
|
2852
|
-
import { Tooling as JSForceTooling } from 'jsforce/lib/api/tooling';
|
2853
|
-
import { StreamPromise } from 'jsforce/lib/util/promise';
|
2852
|
+
import { Connection as JSForceConnection, ConnectionConfig, HttpRequest, QueryOptions, QueryResult, Record, Schema } from '@jsforce/jsforce-node';
|
2853
|
+
import { Tooling as JSForceTooling } from '@jsforce/jsforce-node/lib/api/tooling';
|
2854
|
+
import { StreamPromise } from '@jsforce/jsforce-node/lib/util/promise';
|
2854
2855
|
import { ConfigAggregator } from '@salesforce/core-bundle/config/configAggregator';
|
2855
2856
|
import { AuthFields, AuthInfo } from '@salesforce/core-bundle/org/authInfo';
|
2856
2857
|
export const SFDX_HTTP_HEADERS: {
|
@@ -3006,16 +3007,16 @@ declare module '@salesforce/core-bundle/org/connection' {
|
|
3006
3007
|
NoRecords: string;
|
3007
3008
|
MultipleRecords: string;
|
3008
3009
|
};
|
3009
|
-
export
|
3010
|
+
export type SingleRecordQueryOptions = {
|
3010
3011
|
tooling?: boolean;
|
3011
3012
|
returnChoicesOnMultiple?: boolean;
|
3012
3013
|
choiceField?: string;
|
3013
|
-
}
|
3014
|
+
};
|
3014
3015
|
export namespace Connection {
|
3015
3016
|
/**
|
3016
3017
|
* Connection Options.
|
3017
3018
|
*/
|
3018
|
-
|
3019
|
+
type Options<S extends Schema> = {
|
3019
3020
|
/**
|
3020
3021
|
* AuthInfo instance.
|
3021
3022
|
*/
|
@@ -3028,7 +3029,7 @@ declare module '@salesforce/core-bundle/org/connection' {
|
|
3028
3029
|
* Additional connection parameters.
|
3029
3030
|
*/
|
3030
3031
|
connectionOptions?: ConnectionConfig<S>;
|
3031
|
-
}
|
3032
|
+
};
|
3032
3033
|
}
|
3033
3034
|
|
3034
3035
|
}
|
@@ -3051,21 +3052,21 @@ declare module '@salesforce/core-bundle/org/org' {
|
|
3051
3052
|
Scratch = "scratch",
|
3052
3053
|
Sandbox = "sandbox"
|
3053
3054
|
}
|
3054
|
-
export
|
3055
|
+
export type StatusEvent = {
|
3055
3056
|
sandboxProcessObj: SandboxProcessObject;
|
3056
3057
|
interval: number;
|
3057
3058
|
remainingWait: number;
|
3058
3059
|
waitingOnAuth: boolean;
|
3059
|
-
}
|
3060
|
-
export
|
3060
|
+
};
|
3061
|
+
export type ResultEvent = {
|
3061
3062
|
sandboxProcessObj: SandboxProcessObject;
|
3062
3063
|
sandboxRes: SandboxUserAuthResponse;
|
3063
|
-
}
|
3064
|
-
export
|
3064
|
+
};
|
3065
|
+
export type SandboxUserAuthRequest = {
|
3065
3066
|
sandboxName: string;
|
3066
3067
|
clientId: string;
|
3067
3068
|
callbackUrl: string;
|
3068
|
-
}
|
3069
|
+
};
|
3069
3070
|
export enum SandboxEvents {
|
3070
3071
|
EVENT_STATUS = "status",
|
3071
3072
|
EVENT_ASYNC_RESULT = "asyncResult",
|
@@ -3074,12 +3075,12 @@ declare module '@salesforce/core-bundle/org/org' {
|
|
3074
3075
|
EVENT_RESUME = "resume",
|
3075
3076
|
EVENT_MULTIPLE_SBX_PROCESSES = "multipleMatchingSbxProcesses"
|
3076
3077
|
}
|
3077
|
-
export
|
3078
|
+
export type SandboxUserAuthResponse = {
|
3078
3079
|
authUserName: string;
|
3079
3080
|
authCode: string;
|
3080
3081
|
instanceUrl: string;
|
3081
3082
|
loginUrl: string;
|
3082
|
-
}
|
3083
|
+
};
|
3083
3084
|
export function sandboxIsResumable(value: string): boolean;
|
3084
3085
|
export type SandboxProcessObject = {
|
3085
3086
|
Id: string;
|
@@ -3550,12 +3551,12 @@ declare module '@salesforce/core-bundle/org/org' {
|
|
3550
3551
|
/**
|
3551
3552
|
* Constructor Options for and Org.
|
3552
3553
|
*/
|
3553
|
-
|
3554
|
+
type Options = {
|
3554
3555
|
aliasOrUsername?: string;
|
3555
3556
|
connection?: Connection;
|
3556
3557
|
aggregator?: ConfigAggregator;
|
3557
3558
|
isDevHub?: boolean;
|
3558
|
-
}
|
3559
|
+
};
|
3559
3560
|
/**
|
3560
3561
|
* Scratch Org status.
|
3561
3562
|
*/
|
@@ -3720,10 +3721,10 @@ declare module '@salesforce/core-bundle/org/permissionSetAssignment' {
|
|
3720
3721
|
/**
|
3721
3722
|
* Map of fields name for a permission set assignment
|
3722
3723
|
*/
|
3723
|
-
export
|
3724
|
+
export type PermissionSetAssignmentFields = {
|
3724
3725
|
assigneeId: string;
|
3725
3726
|
permissionSetId: string;
|
3726
|
-
}
|
3727
|
+
};
|
3727
3728
|
/**
|
3728
3729
|
* A class for assigning a Salesforce User to one or more permission sets.
|
3729
3730
|
*/
|
@@ -3782,14 +3783,14 @@ declare module '@salesforce/core-bundle/org/scratchOrgCreate' {
|
|
3782
3783
|
import { ScratchOrgInfo } from '@salesforce/core-bundle/org/scratchOrgTypes';
|
3783
3784
|
import { AuthFields, AuthInfo } from '@salesforce/core-bundle/org/authInfo';
|
3784
3785
|
export const DEFAULT_STREAM_TIMEOUT_MINUTES = 6;
|
3785
|
-
export
|
3786
|
+
export type ScratchOrgCreateResult = {
|
3786
3787
|
username?: string;
|
3787
3788
|
scratchOrgInfo?: ScratchOrgInfo;
|
3788
3789
|
authInfo?: AuthInfo;
|
3789
3790
|
authFields?: AuthFields;
|
3790
3791
|
warnings: string[];
|
3791
|
-
}
|
3792
|
-
export
|
3792
|
+
};
|
3793
|
+
export type ScratchOrgCreateOptions = {
|
3793
3794
|
/** the environment hub org */
|
3794
3795
|
hubOrg: Org;
|
3795
3796
|
/** The connected app consumer key. */
|
@@ -3828,7 +3829,7 @@ declare module '@salesforce/core-bundle/org/scratchOrgCreate' {
|
|
3828
3829
|
setDefault?: boolean;
|
3829
3830
|
/** if false, do not use source tracking for this scratch org */
|
3830
3831
|
tracksSource?: boolean;
|
3831
|
-
}
|
3832
|
+
};
|
3832
3833
|
export const scratchOrgResume: (jobId: string) => Promise<ScratchOrgCreateResult>;
|
3833
3834
|
export const scratchOrgCreate: (options: ScratchOrgCreateOptions) => Promise<ScratchOrgCreateResult>;
|
3834
3835
|
|
@@ -3847,13 +3848,13 @@ declare module '@salesforce/core-bundle/org/scratchOrgErrorCodes' {
|
|
3847
3848
|
|
3848
3849
|
}
|
3849
3850
|
declare module '@salesforce/core-bundle/org/scratchOrgFeatureDeprecation' {
|
3850
|
-
|
3851
|
+
type FeatureTypes = {
|
3851
3852
|
simpleFeatureMapping: {
|
3852
3853
|
[key: string]: string[];
|
3853
3854
|
};
|
3854
3855
|
quantifiedFeatureMapping: Record<string, string | number | boolean | null | undefined>;
|
3855
3856
|
deprecatedFeatures: string[];
|
3856
|
-
}
|
3857
|
+
};
|
3857
3858
|
export class ScratchOrgFeatureDeprecation {
|
3858
3859
|
private featureTypes;
|
3859
3860
|
constructor(options?: FeatureTypes);
|
@@ -3877,7 +3878,7 @@ declare module '@salesforce/core-bundle/org/scratchOrgFeatureDeprecation' {
|
|
3877
3878
|
}
|
3878
3879
|
declare module '@salesforce/core-bundle/org/scratchOrgInfoApi' {
|
3879
3880
|
import { Duration } from '@salesforce/kit';
|
3880
|
-
import { SaveResult } from 'jsforce';
|
3881
|
+
import { SaveResult } from '@jsforce/jsforce-node';
|
3881
3882
|
import { AuthInfo } from '@salesforce/core-bundle/org/authInfo';
|
3882
3883
|
import { Org } from '@salesforce/core-bundle/org/org';
|
3883
3884
|
import SettingsGenerator from '@salesforce/core-bundle/org/scratchOrgSettingsGenerator';
|
@@ -3951,7 +3952,7 @@ declare module '@salesforce/core-bundle/org/scratchOrgInfoGenerator' {
|
|
3951
3952
|
import { Org } from '@salesforce/core-bundle/org/org';
|
3952
3953
|
import { ScratchOrgInfo } from '@salesforce/core-bundle/org/scratchOrgTypes';
|
3953
3954
|
type PartialScratchOrgInfo = Pick<ScratchOrgInfo, 'ConnectedAppConsumerKey' | 'AuthCode' | 'Snapshot' | 'Status' | 'LoginUrl' | 'SignupEmail' | 'SignupUsername' | 'SignupInstance' | 'Username'>;
|
3954
|
-
export
|
3955
|
+
export type ScratchOrgInfoPayload = {
|
3955
3956
|
orgName: string;
|
3956
3957
|
package2AncestorIds: string;
|
3957
3958
|
features: string | string[];
|
@@ -3959,7 +3960,7 @@ declare module '@salesforce/core-bundle/org/scratchOrgInfoGenerator' {
|
|
3959
3960
|
namespace: string;
|
3960
3961
|
connectedAppCallbackUrl: string;
|
3961
3962
|
durationDays: number;
|
3962
|
-
}
|
3963
|
+
} & PartialScratchOrgInfo;
|
3963
3964
|
/**
|
3964
3965
|
* Generates the package2AncestorIds scratch org property
|
3965
3966
|
*
|
@@ -3979,8 +3980,8 @@ declare module '@salesforce/core-bundle/org/scratchOrgInfoGenerator' {
|
|
3979
3980
|
export const generateScratchOrgInfo: ({ hubOrg, scratchOrgInfoPayload, nonamespace, ignoreAncestorIds, }: {
|
3980
3981
|
hubOrg: Org;
|
3981
3982
|
scratchOrgInfoPayload: ScratchOrgInfoPayload;
|
3982
|
-
nonamespace?: boolean
|
3983
|
-
ignoreAncestorIds?: boolean
|
3983
|
+
nonamespace?: boolean;
|
3984
|
+
ignoreAncestorIds?: boolean;
|
3984
3985
|
}) => Promise<ScratchOrgInfoPayload>;
|
3985
3986
|
/**
|
3986
3987
|
* Returns a valid signup json
|
@@ -4018,10 +4019,10 @@ declare module '@salesforce/core-bundle/org/scratchOrgLifecycleEvents' {
|
|
4018
4019
|
import { ScratchOrgInfo } from '@salesforce/core-bundle/org/scratchOrgTypes';
|
4019
4020
|
export const scratchOrgLifecycleEventName = "scratchOrgLifecycleEvent";
|
4020
4021
|
export const scratchOrgLifecycleStages: readonly ["prepare request", "send request", "wait for org", "available", "authenticate", "deploy settings", "done"];
|
4021
|
-
export
|
4022
|
+
export type ScratchOrgLifecycleEvent = {
|
4022
4023
|
stage: (typeof scratchOrgLifecycleStages)[number];
|
4023
4024
|
scratchOrgInfo?: ScratchOrgInfo;
|
4024
|
-
}
|
4025
|
+
};
|
4025
4026
|
export const emit: (event: ScratchOrgLifecycleEvent) => Promise<void>;
|
4026
4027
|
export const emitPostOrgCreate: (authFields: AuthFields) => Promise<void>;
|
4027
4028
|
|
@@ -4040,25 +4041,25 @@ declare module '@salesforce/core-bundle/org/scratchOrgSettingsGenerator' {
|
|
4040
4041
|
Canceling = "Canceling",
|
4041
4042
|
Canceled = "Canceled"
|
4042
4043
|
}
|
4043
|
-
export
|
4044
|
+
export type SettingType = {
|
4044
4045
|
members: string[];
|
4045
4046
|
name: 'CustomObject' | 'RecordType' | 'BusinessProcess' | 'Settings';
|
4046
|
-
}
|
4047
|
-
export
|
4047
|
+
};
|
4048
|
+
export type PackageFile = {
|
4048
4049
|
'@': {
|
4049
4050
|
xmlns: string;
|
4050
4051
|
};
|
4051
4052
|
types: SettingType[];
|
4052
4053
|
version: string;
|
4053
|
-
}
|
4054
|
+
};
|
4054
4055
|
export const createObjectFileContent: ({ allRecordTypes, allBusinessProcesses, apiVersion, settingData, objectSettingsData, }: {
|
4055
|
-
allRecordTypes?: string[]
|
4056
|
-
allBusinessProcesses?: string[]
|
4056
|
+
allRecordTypes?: string[];
|
4057
|
+
allBusinessProcesses?: string[];
|
4057
4058
|
apiVersion: string;
|
4058
|
-
settingData?: Record<string, unknown
|
4059
|
+
settingData?: Record<string, unknown>;
|
4059
4060
|
objectSettingsData?: {
|
4060
4061
|
[objectName: string]: ObjectSetting;
|
4061
|
-
}
|
4062
|
+
};
|
4062
4063
|
}) => PackageFile;
|
4063
4064
|
export const createRecordTypeAndBusinessProcessFileContent: (objectName: string, json: Record<string, unknown>, allRecordTypes: string[], allBusinessProcesses: string[], capitalizeRecordTypes: boolean) => JsonMap;
|
4064
4065
|
/**
|
@@ -4112,7 +4113,7 @@ declare module '@salesforce/core-bundle/org/scratchOrgSettingsGenerator' {
|
|
4112
4113
|
}
|
4113
4114
|
declare module '@salesforce/core-bundle/org/scratchOrgTypes' {
|
4114
4115
|
import { JsonMap } from '@salesforce/ts-types';
|
4115
|
-
export
|
4116
|
+
export type ScratchOrgInfo = {
|
4116
4117
|
AdminEmail?: string;
|
4117
4118
|
readonly CreatedDate?: string;
|
4118
4119
|
ConnectedAppCallbackUrl?: string;
|
@@ -4149,11 +4150,11 @@ declare module '@salesforce/core-bundle/org/scratchOrgTypes' {
|
|
4149
4150
|
enabled: string[];
|
4150
4151
|
disabled: string[];
|
4151
4152
|
};
|
4152
|
-
}
|
4153
|
-
export
|
4153
|
+
};
|
4154
|
+
export type ObjectSetting = {
|
4154
4155
|
sharingModel?: string;
|
4155
4156
|
defaultRecordType?: string;
|
4156
|
-
}
|
4157
|
+
} & JsonMap;
|
4157
4158
|
|
4158
4159
|
}
|
4159
4160
|
declare module '@salesforce/core-bundle/org/user' {
|
@@ -4221,15 +4222,15 @@ declare module '@salesforce/core-bundle/org/user' {
|
|
4221
4222
|
* Used to initialize default values for fields based on a templateUser user. This user will be part of the
|
4222
4223
|
* Standard User profile.
|
4223
4224
|
*/
|
4224
|
-
|
4225
|
+
type Options = {
|
4225
4226
|
templateUser: string;
|
4226
4227
|
newUserName?: string;
|
4227
|
-
}
|
4228
|
+
};
|
4228
4229
|
}
|
4229
|
-
export
|
4230
|
+
export type PasswordConditions = {
|
4230
4231
|
length: number;
|
4231
4232
|
complexity: number;
|
4232
|
-
}
|
4233
|
+
};
|
4233
4234
|
/**
|
4234
4235
|
* A class for creating a User, generating a password for a user, and assigning a user to one or more permission sets.
|
4235
4236
|
* See methods for examples.
|
@@ -4340,9 +4341,9 @@ declare module '@salesforce/core-bundle/org/user' {
|
|
4340
4341
|
* Used to initialize default values for fields based on a templateUser user. This user will be part of the
|
4341
4342
|
* Standard User profile.
|
4342
4343
|
*/
|
4343
|
-
|
4344
|
+
type Options = {
|
4344
4345
|
org: Org;
|
4345
|
-
}
|
4346
|
+
};
|
4346
4347
|
}
|
4347
4348
|
|
4348
4349
|
}
|
@@ -4420,8 +4421,26 @@ declare module '@salesforce/core-bundle/schema/validator' {
|
|
4420
4421
|
|
4421
4422
|
}
|
4422
4423
|
declare module '@salesforce/core-bundle/sfError' {
|
4423
|
-
import {
|
4424
|
-
|
4424
|
+
import { AnyJson } from '@salesforce/ts-types';
|
4425
|
+
export type SfErrorOptions<T extends ErrorDataProperties = ErrorDataProperties> = {
|
4426
|
+
message: string;
|
4427
|
+
exitCode?: number;
|
4428
|
+
name?: string;
|
4429
|
+
data?: T;
|
4430
|
+
/** pass an Error. For convenience in catch blocks, code will check that it is, in fact, an Error */
|
4431
|
+
cause?: unknown;
|
4432
|
+
context?: string;
|
4433
|
+
actions?: string[];
|
4434
|
+
};
|
4435
|
+
type ErrorDataProperties = AnyJson;
|
4436
|
+
type SfErrorToObjectResult = {
|
4437
|
+
name: string;
|
4438
|
+
message: string;
|
4439
|
+
exitCode: number;
|
4440
|
+
actions?: string[];
|
4441
|
+
context?: string;
|
4442
|
+
data?: ErrorDataProperties;
|
4443
|
+
};
|
4425
4444
|
/**
|
4426
4445
|
* A generalized sfdx error which also contains an action. The action is used in the
|
4427
4446
|
* CLI to help guide users past the error.
|
@@ -4438,8 +4457,9 @@ declare module '@salesforce/core-bundle/sfError' {
|
|
4438
4457
|
* throw new SfError(message.getMessage('myError'), 'MyErrorName');
|
4439
4458
|
* ```
|
4440
4459
|
*/
|
4441
|
-
export class SfError<T =
|
4460
|
+
export class SfError<T extends ErrorDataProperties = ErrorDataProperties> extends Error {
|
4442
4461
|
#private;
|
4462
|
+
readonly name: string;
|
4443
4463
|
/**
|
4444
4464
|
* Action messages. Hints to the users regarding what can be done to fix related issues.
|
4445
4465
|
*/
|
@@ -4462,15 +4482,17 @@ declare module '@salesforce/core-bundle/sfError' {
|
|
4462
4482
|
* @param exitCodeOrCause The exit code which will be used by SfdxCommand or he underlying error that caused this error to be raised.
|
4463
4483
|
* @param cause The underlying error that caused this error to be raised.
|
4464
4484
|
*/
|
4465
|
-
constructor(message: string, name?: string, actions?: string[], exitCodeOrCause?: number | Error, cause?:
|
4466
|
-
get code():
|
4485
|
+
constructor(message: string, name?: string, actions?: string[], exitCodeOrCause?: number | Error, cause?: unknown);
|
4486
|
+
get code(): string;
|
4467
4487
|
set code(code: string);
|
4488
|
+
/** like the constructor, but takes an typed object and let you also set context and data properties */
|
4489
|
+
static create<T extends ErrorDataProperties = ErrorDataProperties>(inputs: SfErrorOptions<T>): SfError<T>;
|
4468
4490
|
/**
|
4469
4491
|
* Convert an Error to an SfError.
|
4470
4492
|
*
|
4471
4493
|
* @param err The error to convert.
|
4472
4494
|
*/
|
4473
|
-
static wrap(err:
|
4495
|
+
static wrap<T extends ErrorDataProperties = ErrorDataProperties>(err: unknown): SfError<T>;
|
4474
4496
|
/**
|
4475
4497
|
* Sets the context of the error. For convenience `this` object is returned.
|
4476
4498
|
*
|
@@ -4486,8 +4508,9 @@ declare module '@salesforce/core-bundle/sfError' {
|
|
4486
4508
|
/**
|
4487
4509
|
* Convert an {@link SfError} state to an object. Returns a plain object representing the state of this error.
|
4488
4510
|
*/
|
4489
|
-
toObject():
|
4511
|
+
toObject(): SfErrorToObjectResult;
|
4490
4512
|
}
|
4513
|
+
export {};
|
4491
4514
|
|
4492
4515
|
}
|
4493
4516
|
declare module '@salesforce/core-bundle/sfProject' {
|
@@ -4507,6 +4530,10 @@ declare module '@salesforce/core-bundle/sfProject' {
|
|
4507
4530
|
dependencies?: PackageDirDependency[];
|
4508
4531
|
includeProfileUserLicenses?: boolean;
|
4509
4532
|
package?: string;
|
4533
|
+
packageMetadataAccess?: {
|
4534
|
+
permissionSets: string | string[];
|
4535
|
+
permissionSetLicenses: string | string[];
|
4536
|
+
};
|
4510
4537
|
path: string;
|
4511
4538
|
postInstallScript?: string;
|
4512
4539
|
postInstallUrl?: string;
|
@@ -4718,6 +4745,9 @@ declare module '@salesforce/core-bundle/sfProject' {
|
|
4718
4745
|
* **See** [process.cwd()](https://nodejs.org/api/process.html#process_process_cwd)
|
4719
4746
|
*/
|
4720
4747
|
static resolveProjectPathSync(dir?: string): string;
|
4748
|
+
/** shared method for resolve and getInstance.
|
4749
|
+
* Cannot be a module-level function because instances is private */
|
4750
|
+
private static getMemoizedInstance;
|
4721
4751
|
/**
|
4722
4752
|
* Returns the project path.
|
4723
4753
|
*/
|
@@ -4907,14 +4937,6 @@ declare module '@salesforce/core-bundle/stateAggregator/accessors/aliasAccessor'
|
|
4907
4937
|
* @param usernameOrAlias a string that might be a username or might be an alias
|
4908
4938
|
*/
|
4909
4939
|
resolveAlias(usernameOrAlias: string): string | undefined;
|
4910
|
-
/**
|
4911
|
-
* Set an alias for the given aliasable entity. Writes to the file
|
4912
|
-
*
|
4913
|
-
* @deprecated use setAndSave
|
4914
|
-
* @param alias the alias you want to set
|
4915
|
-
* @param entity the aliasable entity that's being aliased
|
4916
|
-
*/
|
4917
|
-
set(alias: string, entity: Aliasable): void;
|
4918
4940
|
/**
|
4919
4941
|
* Set an alias for the given aliasable entity. Writes to the file
|
4920
4942
|
*
|
@@ -4922,36 +4944,17 @@ declare module '@salesforce/core-bundle/stateAggregator/accessors/aliasAccessor'
|
|
4922
4944
|
* @param entity the aliasable entity that's being aliased
|
4923
4945
|
*/
|
4924
4946
|
setAndSave(alias: string, entity: Aliasable): Promise<void>;
|
4925
|
-
/**
|
4926
|
-
* Unset the given alias. Writes to the file
|
4927
|
-
*
|
4928
|
-
* @deprecated use unsetAndSave
|
4929
|
-
*
|
4930
|
-
*/
|
4931
|
-
unset(alias: string): void;
|
4932
4947
|
/**
|
4933
4948
|
* Unset the given alias(es). Writes to the file
|
4934
4949
|
*
|
4935
4950
|
*/
|
4936
4951
|
unsetAndSave(alias: string): Promise<void>;
|
4937
|
-
/**
|
4938
|
-
* Unsets all the aliases for the given entity.
|
4939
|
-
*
|
4940
|
-
* @deprecated use unsetValuesAndSave
|
4941
|
-
*
|
4942
|
-
* @param entity the aliasable entity for which you want to unset all aliases
|
4943
|
-
*/
|
4944
|
-
unsetAll(entity: Aliasable): void;
|
4945
4952
|
/**
|
4946
4953
|
* Unset all the aliases for the given array of entity.
|
4947
4954
|
*
|
4948
4955
|
* @param entity the aliasable entity for which you want to unset all aliases
|
4949
4956
|
*/
|
4950
4957
|
unsetValuesAndSave(aliasees: Aliasable[]): Promise<void>;
|
4951
|
-
/**
|
4952
|
-
* @deprecated the set/unset methods now write to the file when called. Use (un)setAndSave instead of calling (un)set and then calling write()
|
4953
|
-
*/
|
4954
|
-
write(): Promise<ConfigContents<string>>;
|
4955
4958
|
/**
|
4956
4959
|
* Returns true if the provided alias exists
|
4957
4960
|
*
|
@@ -4965,14 +4968,6 @@ declare module '@salesforce/core-bundle/stateAggregator/accessors/aliasAccessor'
|
|
4965
4968
|
*/
|
4966
4969
|
private readFileToAliasStore;
|
4967
4970
|
private saveAliasStoreToFile;
|
4968
|
-
/**
|
4969
|
-
* @deprecated use the async version of this method instead
|
4970
|
-
* provided for the legacy sync set/unset methods. */
|
4971
|
-
private readFileToAliasStoreSync;
|
4972
|
-
/**
|
4973
|
-
* @deprecated use the async version of this method instead
|
4974
|
-
* provided for the legacy sync set/unset methods */
|
4975
|
-
private saveAliasStoreToFileSync;
|
4976
4971
|
}
|
4977
4972
|
export const getFileLocation: () => string;
|
4978
4973
|
|
@@ -5171,7 +5166,7 @@ declare module '@salesforce/core-bundle/status/myDomainResolver' {
|
|
5171
5166
|
/**
|
5172
5167
|
* Options for the MyDomain DNS resolver.
|
5173
5168
|
*/
|
5174
|
-
|
5169
|
+
type Options = {
|
5175
5170
|
/**
|
5176
5171
|
* The host to resolve.
|
5177
5172
|
*/
|
@@ -5184,7 +5179,7 @@ declare module '@salesforce/core-bundle/status/myDomainResolver' {
|
|
5184
5179
|
* The retry timeout.
|
5185
5180
|
*/
|
5186
5181
|
frequency?: Duration;
|
5187
|
-
}
|
5182
|
+
};
|
5188
5183
|
}
|
5189
5184
|
|
5190
5185
|
}
|
@@ -5235,7 +5230,7 @@ declare module '@salesforce/core-bundle/status/pollingClient' {
|
|
5235
5230
|
/**
|
5236
5231
|
* Options for the polling client.
|
5237
5232
|
*/
|
5238
|
-
|
5233
|
+
type Options = {
|
5239
5234
|
/**
|
5240
5235
|
* Polling function.
|
5241
5236
|
*/
|
@@ -5256,7 +5251,7 @@ declare module '@salesforce/core-bundle/status/pollingClient' {
|
|
5256
5251
|
* ```
|
5257
5252
|
*/
|
5258
5253
|
timeoutErrorName?: string;
|
5259
|
-
}
|
5254
|
+
};
|
5260
5255
|
/**
|
5261
5256
|
* Default options set for polling. The default options specify a timeout of 3 minutes and polling frequency of 15
|
5262
5257
|
* seconds;
|
@@ -5286,7 +5281,7 @@ declare module '@salesforce/core-bundle/status/streamingClient' {
|
|
5286
5281
|
* Inner streaming client interface. This implements the Cometd behavior.
|
5287
5282
|
* Also allows for mocking the functional behavior.
|
5288
5283
|
*/
|
5289
|
-
export
|
5284
|
+
export type StreamingClientIfc = {
|
5290
5285
|
/**
|
5291
5286
|
* Returns a comet client implementation.
|
5292
5287
|
*
|
@@ -5299,7 +5294,7 @@ declare module '@salesforce/core-bundle/status/streamingClient' {
|
|
5299
5294
|
* @param logLine A log message passed to the the assigned function.
|
5300
5295
|
*/
|
5301
5296
|
setLogger: (logLine: (message: string) => void) => void;
|
5302
|
-
}
|
5297
|
+
};
|
5303
5298
|
/**
|
5304
5299
|
* Api wrapper to support Salesforce streaming. The client contains an internal implementation of a cometd specification.
|
5305
5300
|
*
|
@@ -5421,7 +5416,7 @@ declare module '@salesforce/core-bundle/status/streamingClient' {
|
|
5421
5416
|
*
|
5422
5417
|
* @interface
|
5423
5418
|
*/
|
5424
|
-
|
5419
|
+
type Options = {
|
5425
5420
|
/**
|
5426
5421
|
* The org streaming target.
|
5427
5422
|
*/
|
@@ -5450,7 +5445,7 @@ declare module '@salesforce/core-bundle/status/streamingClient' {
|
|
5450
5445
|
* The function for build the inner client impl. Allows for mocking.
|
5451
5446
|
*/
|
5452
5447
|
streamingImpl: StreamingClientIfc;
|
5453
|
-
}
|
5448
|
+
};
|
5454
5449
|
/**
|
5455
5450
|
* Default Streaming Options. Uses Faye as the cometd impl.
|
5456
5451
|
*/
|
@@ -5529,7 +5524,7 @@ declare module '@salesforce/core-bundle/status/types' {
|
|
5529
5524
|
import { AnyFunction, AnyJson, JsonMap } from '@salesforce/ts-types';
|
5530
5525
|
export type Message = JsonMap;
|
5531
5526
|
export type Callback<T = unknown> = (...args: any[]) => T;
|
5532
|
-
export
|
5527
|
+
export type StatusResult = {
|
5533
5528
|
/**
|
5534
5529
|
* If the result of the streaming or polling client is expected to return a result
|
5535
5530
|
*/
|
@@ -5539,18 +5534,18 @@ declare module '@salesforce/core-bundle/status/types' {
|
|
5539
5534
|
* the messaging exchanges with the endpoint.
|
5540
5535
|
*/
|
5541
5536
|
completed: boolean;
|
5542
|
-
}
|
5537
|
+
};
|
5543
5538
|
/**
|
5544
5539
|
* The subscription object returned from the cometd subscribe object.
|
5545
5540
|
*/
|
5546
|
-
export
|
5541
|
+
export type CometSubscription = {
|
5547
5542
|
callback(callback: () => void): void;
|
5548
5543
|
errback(callback: (error: Error) => void): void;
|
5549
|
-
}
|
5544
|
+
};
|
5550
5545
|
/**
|
5551
5546
|
* Types for defining extensions.
|
5552
5547
|
*/
|
5553
|
-
export
|
5548
|
+
export type StreamingExtension = {
|
5554
5549
|
/**
|
5555
5550
|
* Extension for outgoing message.
|
5556
5551
|
*
|
@@ -5565,7 +5560,7 @@ declare module '@salesforce/core-bundle/status/types' {
|
|
5565
5560
|
* @param callback The callback to invoke after the message is processed.
|
5566
5561
|
*/
|
5567
5562
|
incoming?: (message: JsonMap, callback: AnyFunction) => void;
|
5568
|
-
}
|
5563
|
+
};
|
5569
5564
|
/**
|
5570
5565
|
* Function type for processing messages
|
5571
5566
|
*/
|
@@ -5629,12 +5624,13 @@ declare module '@salesforce/core-bundle/testSetup' {
|
|
5629
5624
|
import { AuthFields } from '@salesforce/core-bundle/org/authInfo';
|
5630
5625
|
import { uniqid } from '@salesforce/core-bundle/util/uniqid';
|
5631
5626
|
export { uniqid };
|
5627
|
+
export { SecureBuffer } from '@salesforce/core-bundle/crypto/secureBuffer';
|
5632
5628
|
/**
|
5633
5629
|
* Different parts of the system that are mocked out. They can be restored for
|
5634
5630
|
* individual tests. Test's stubs should always go on the DEFAULT which is exposed
|
5635
5631
|
* on the TestContext.
|
5636
5632
|
*/
|
5637
|
-
export
|
5633
|
+
export type SandboxTypes = {
|
5638
5634
|
DEFAULT: SinonSandbox;
|
5639
5635
|
CRYPTO: SinonSandbox;
|
5640
5636
|
CONFIG: SinonSandbox;
|
@@ -5642,11 +5638,11 @@ declare module '@salesforce/core-bundle/testSetup' {
|
|
5642
5638
|
CONNECTION: SinonSandbox;
|
5643
5639
|
FS: SinonSandbox;
|
5644
5640
|
ORGS: SinonSandbox;
|
5645
|
-
}
|
5641
|
+
};
|
5646
5642
|
/**
|
5647
5643
|
* Different hooks into {@link ConfigFile} used for testing instead of doing file IO.
|
5648
5644
|
*/
|
5649
|
-
export
|
5645
|
+
export type ConfigStub = {
|
5650
5646
|
/**
|
5651
5647
|
* readFn A function that controls all aspect of {@link ConfigFile.read}. For example, it won't set the contents
|
5652
5648
|
* unless explicitly done. Only use this if you know what you are doing. Use retrieveContents
|
@@ -5669,7 +5665,7 @@ declare module '@salesforce/core-bundle/testSetup' {
|
|
5669
5665
|
* A function to conditionally read based on the config instance. The `this` value will be the config instance.
|
5670
5666
|
*/
|
5671
5667
|
retrieveContents?: () => Promise<JsonMap>;
|
5672
|
-
}
|
5668
|
+
};
|
5673
5669
|
/**
|
5674
5670
|
* Instantiate a @salesforce/core test context.
|
5675
5671
|
*/
|
@@ -5813,7 +5809,6 @@ declare module '@salesforce/core-bundle/testSetup' {
|
|
5813
5809
|
* This is called automatically when the class is instantiated unless the setup option is set to false.
|
5814
5810
|
*/
|
5815
5811
|
setup(): void;
|
5816
|
-
private requireSinon;
|
5817
5812
|
}
|
5818
5813
|
/**
|
5819
5814
|
* Instantiate a @salesforce/core test context. This is automatically created by `const $$ = testSetup()`
|
@@ -5887,7 +5882,7 @@ declare module '@salesforce/core-bundle/testSetup' {
|
|
5887
5882
|
*
|
5888
5883
|
* **See** {@link shouldThrow}
|
5889
5884
|
*/
|
5890
|
-
export const unexpectedResult: SfError<
|
5885
|
+
export const unexpectedResult: SfError<AnyJson>;
|
5891
5886
|
/**
|
5892
5887
|
* Use for this testing pattern:
|
5893
5888
|
* ```
|
@@ -5943,7 +5938,7 @@ declare module '@salesforce/core-bundle/testSetup' {
|
|
5943
5938
|
/**
|
5944
5939
|
* Additional subscription options for the StreamingMock.
|
5945
5940
|
*/
|
5946
|
-
export
|
5941
|
+
export type StreamingMockCometSubscriptionOptions = {
|
5947
5942
|
/**
|
5948
5943
|
* Target URL.
|
5949
5944
|
*/
|
@@ -5964,7 +5959,7 @@ declare module '@salesforce/core-bundle/testSetup' {
|
|
5964
5959
|
* A list of messages to playback for the client. One message per process tick.
|
5965
5960
|
*/
|
5966
5961
|
messagePlaylist?: Message[];
|
5967
|
-
}
|
5962
|
+
};
|
5968
5963
|
/**
|
5969
5964
|
* Simulates a comet subscription to a streaming channel.
|
5970
5965
|
*/
|
@@ -6141,10 +6136,6 @@ declare module '@salesforce/core-bundle/util/cache' {
|
|
6141
6136
|
static enable(): void;
|
6142
6137
|
}
|
6143
6138
|
|
6144
|
-
}
|
6145
|
-
declare module '@salesforce/core-bundle/util/checkLightningDomain' {
|
6146
|
-
export default function checkLightningDomain(url: string): Promise<boolean>;
|
6147
|
-
|
6148
6139
|
}
|
6149
6140
|
declare module '@salesforce/core-bundle/util/directoryWriter' {
|
6150
6141
|
/// <reference types="node" />
|
@@ -6194,7 +6185,7 @@ declare module '@salesforce/core-bundle/util/findUppercaseKeys' {
|
|
6194
6185
|
|
6195
6186
|
}
|
6196
6187
|
declare module '@salesforce/core-bundle/util/getJwtAudienceUrl' {
|
6197
|
-
import { OAuth2Config } from 'jsforce';
|
6188
|
+
import { OAuth2Config } from '@jsforce/jsforce-node';
|
6198
6189
|
export function getJwtAudienceUrl(options: OAuth2Config & {
|
6199
6190
|
createdOrgInstance?: string;
|
6200
6191
|
}): Promise<string>;
|
@@ -6406,12 +6397,12 @@ declare module '@salesforce/core-bundle/util/structuredWriter' {
|
|
6406
6397
|
/// <reference types="node" />
|
6407
6398
|
/// <reference types="node" />
|
6408
6399
|
import { Readable } from 'node:stream';
|
6409
|
-
export
|
6400
|
+
export type StructuredWriter = {
|
6410
6401
|
addToStore(contents: string | Readable | Buffer, path: string): Promise<void>;
|
6411
6402
|
finalize(): Promise<void>;
|
6412
6403
|
getDestinationPath(): string | undefined;
|
6413
6404
|
get buffer(): Buffer;
|
6414
|
-
}
|
6405
|
+
};
|
6415
6406
|
|
6416
6407
|
}
|
6417
6408
|
declare module '@salesforce/core-bundle/util/time' {
|
@@ -6540,9 +6531,9 @@ declare module '@salesforce/core-bundle/webOAuthServer' {
|
|
6540
6531
|
private validateState;
|
6541
6532
|
}
|
6542
6533
|
export namespace WebOAuthServer {
|
6543
|
-
|
6534
|
+
type Options = {
|
6544
6535
|
oauthConfig: JwtOAuth2Config;
|
6545
|
-
}
|
6536
|
+
};
|
6546
6537
|
type Request = http.IncomingMessage & {
|
6547
6538
|
query: {
|
6548
6539
|
code: string;
|
@@ -6601,6 +6592,13 @@ declare module '@salesforce/core-bundle/webOAuthServer' {
|
|
6601
6592
|
* @param response the HTTP response.
|
6602
6593
|
*/
|
6603
6594
|
reportSuccess(response: http.ServerResponse): void;
|
6595
|
+
/**
|
6596
|
+
* Preflight request:
|
6597
|
+
*
|
6598
|
+
* https://developer.mozilla.org/en-US/docs/Glossary/Preflight_request
|
6599
|
+
* https://www.w3.org/TR/2020/SPSD-cors-20200602/#resource-preflight-requests
|
6600
|
+
*/
|
6601
|
+
handlePreflightRequest(response: http.ServerResponse): void;
|
6604
6602
|
handleSuccess(response: http.ServerResponse): Promise<void>;
|
6605
6603
|
handleError(response: http.ServerResponse): Promise<void>;
|
6606
6604
|
protected init(): Promise<void>;
|
@@ -6621,10 +6619,10 @@ declare module '@salesforce/core-bundle/webOAuthServer' {
|
|
6621
6619
|
private getSocketTimeout;
|
6622
6620
|
}
|
6623
6621
|
namespace WebServer {
|
6624
|
-
|
6622
|
+
type Options = {
|
6625
6623
|
port?: number;
|
6626
6624
|
host?: string;
|
6627
|
-
}
|
6625
|
+
};
|
6628
6626
|
}
|
6629
6627
|
export {};
|
6630
6628
|
|