@salesforce/core 9.1.9 → 9.1.11
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/config/envVars.d.ts +2 -1
- package/lib/config/envVars.js +6 -1
- package/lib/crypto/crypto.js +17 -7
- package/lib/crypto/keyChainImpl.js +17 -7
- package/lib/crypto/secureBuffer.js +17 -7
- package/lib/fs/fs.js +17 -7
- package/lib/global.js +17 -7
- package/lib/lifecycleEvents.js +17 -7
- package/lib/logger/logger.js +17 -7
- package/lib/messages.js +17 -7
- package/lib/org/authInfo.js +95 -24
- package/lib/org/org.js +17 -7
- package/lib/org/scratchOrgSettingsGenerator.js +17 -7
- package/lib/schema/sfdx-project/sfdxProjectJson.d.ts +2 -2
- package/lib/schema/validator.js +17 -7
- package/lib/stateAggregator/accessors/orgAccessor.js +17 -7
- package/lib/testSetup.js +17 -7
- package/lib/util/directoryWriter.js +17 -7
- package/lib/util/uniqid.js +17 -7
- package/lib/webOAuthServer.js +17 -7
- package/messages/envVars.md +4 -0
- package/package.json +6 -6
package/lib/config/envVars.d.ts
CHANGED
|
@@ -77,7 +77,8 @@ export declare enum EnvironmentVariable {
|
|
|
77
77
|
'SF_UPDATE_INSTRUCTIONS' = "SF_UPDATE_INSTRUCTIONS",
|
|
78
78
|
'SF_INSTALLER' = "SF_INSTALLER",
|
|
79
79
|
'SF_ENV' = "SF_ENV",
|
|
80
|
-
'SF_CAPITALIZE_RECORD_TYPES' = "SF_CAPITALIZE_RECORD_TYPES"
|
|
80
|
+
'SF_CAPITALIZE_RECORD_TYPES' = "SF_CAPITALIZE_RECORD_TYPES",
|
|
81
|
+
'SF_SKIP_SCRATCH_ORG_CHECK' = "SF_SKIP_SCRATCH_ORG_CHECK"
|
|
81
82
|
}
|
|
82
83
|
type EnvMetaData = {
|
|
83
84
|
description: string;
|
package/lib/config/envVars.js
CHANGED
|
@@ -22,7 +22,7 @@ const kit_1 = require("@salesforce/kit");
|
|
|
22
22
|
const messages_1 = require("../messages");
|
|
23
23
|
const lifecycleEvents_1 = require("../lifecycleEvents");
|
|
24
24
|
;
|
|
25
|
-
const messages = new messages_1.Messages('@salesforce/core', 'envVars', new Map([["forceOpenUrl", "Web page that opens in your browser when you connect to an org. For example, to open Lightning Experience, set to \"lightning\"."], ["forceShowSpinner", "Set to true to show a spinner animation on the command line when running asynchronous CLI commands. Default is false."], ["forceSpinnerDelay", "Speed of the spinner in milliseconds. Default is 60."], ["httpProxy", "HTTP URL and port of the proxy server when using Salesforce CLI behind a corporate firewall or web proxy."], ["httpsProxy", "HTTPS URL and port of the proxy server when using Salesforce CLI behind a corporate firewall or web proxy."], ["nodeExtraCaCerts", "Fully qualified path to your self-signed certificate. Will be installed after you run \"sfdx update\"."], ["nodeTlsRejectUnauthorized", "Set to 0 to allow Node.js to use the self-signed certificate in the certificate chain."], ["sfdxAccessToken", "Specifies an access token when using the auth:accesstoken:store command."], ["sfdxApiVersion", "The API version for a specific project or all projects. Default value is the API version of your Dev Hub. Overrides the apiVersion config value."], ["sfdxAudienceUrl", "URL that overrides the aud (audience) field used for JWT authentication so that it matches the expected value of the authorization server URL for the org you\u2019re logging into."], ["sfdxCodeCoverageRequirement", "Code coverage percentages that are displayed in green when you run force:apex:test:\\* with the --codecoverage parameter."], ["sfdxContentType", "Set to JSON so that all CLI commands output results in JSON format."], ["sfdxDefaultdevhubusername", "Username or alias of your default Dev Hub org. Overrides the defaultdevhubusername configuration value."], ["sfdxDefaultusername", "Username or alias of your default org. Overrides the defaultusername configuration value."], ["sfdxDisableAutoupdate", "Set to true to disable the auto-update feature of Salesforce CLI. Default value is false."], ["sfdxAutoupdateDisable", "Set to true to disable the auto-update feature of Salesforce CLI. Default value is false."], ["sfdxDisableSourceMemberPolling", "Set to true to disable polling of your org\u2019s SourceMember object when you run the force:source:push|pull commands. Default value is false."], ["sfdxSourceTrackingBatchSize", "Number of source-tracked file updates to batch after a deploy or retrieve. The default value is 8,000 (Windows) or 15,000 (Linux/macOS)."], ["sfdxDisableTelemetry", "Set to true to disable Salesforce CLI from collecting usage information, user environment information, and crash reports. Default value is false. Overrides the disableTelemetry configration variable."], ["sfdxDnsTimeout", "Number of seconds that the force:org:\\* commands wait for a response when checking whether an org is connected. Default value is 3."], ["sfdxDomainRetry", "Time, in seconds, that Salesforce CLI waits for the Lightning Experience custom domain to resolve and become available in a scratch org. Default value is 240."], ["sfdxImprovedCodeCoverage", "Set to true to scope Apex test results to the classes entered during a test run when running force:apex:test:\\*."], ["sfdxInstanceUrl", "URL of the Salesforce instance that is hosting your org. Default value is https://login.salesforce.com. Overrides the instanceUrl configuration value."], ["sfdxJsonToStdout", "Set to true to send messages resulting from failed Salesforce CLI commands to stdout instead of stderr."], ["sfdxDisableLogFile", "Set to true to disable log file writing"], ["sfdxLogLevel", "Level of messages that the CLI writes to the log file. Valid values are trace, debug, info, warn, error, fatal. Default value is warn."], ["sfdxLogRotationCount", "The default rotation period for logs. Example '1d' will rotate logs daily (at midnight)."], ["sfdxLogRotationPeriod", "The number of backup rotated log files to keep. Example: '3' will have the base sf.log file, and the past 3 (period) log files."], ["sfdxMaxQueryLimit", "Maximum number of Salesforce records returned by a CLI command. Default value is 10,000. Overrides the maxQueryLimit configuration value."], ["sfdxMdapiTempDir", "Directory that contains files (in metadata format) when running certain Salesforce CLI commands, such as force:source:\\*."], ["sfdxNpmRegistry", "URL to a private npm server, where all packages that you publish are private."], ["sfdxPrecompileEnable", "Set to true to enable Apex pre-compile before the tests are run with the force:apex:test:run command. Default is false."], ["sfdxProjectAutoupdateDisableForPackageCreate", "Set to true to disable automatic updates to sfdx-project.json when running force:package:create."], ["sfdxProjectAutoupdateDisableForPackageVersionCreate", "Set to true to disable automatic updates to sfdx-project.json when running force:package:version:create."], ["sfdxRestDeploy", "Set to true to make Salesforce CLI use the Metadata REST API for deployments. By default, the CLI uses SOAP."], ["sfdxSourceMemberPollingTimeout", "Number of seconds you want the force:source:push command to keep polling the SourceMember object before the command times out."], ["sfdxUseGenericUnixKeychain", "(Linux and macOS only) Set to true if you want to use the generic UNIX keychain instead of the Linux libsecret library or macOS keychain."], ["sfdxUseProgressBar", "Set to false to disable the progress bar when running force:mdapi:deploy, force:source:deploy, or force:source:push."], ["sfdxLazyLoadModules", "Set to true to enable lazy loading of sfdx modules"], ["sfdxS3Host", "URL to S3 host"], ["sfdxUpdateInstructions", "Text that describes how to update sfdx"], ["sfdxInstaller", "Boolean indicating that the installer is running"], ["sfdxEnv", "Describes if sfdx is in \"demo\" mode"], ["sfTargetOrg", "Username or alias of your default org. Overrides the target-org configuration variable."], ["sfTargetDevHub", "Username or alias of your default Dev Hub org. Overrides the target-dev-hub configuration variable."], ["sfAccessToken", "Specifies an access token when using a login command that uses access tokens."], ["sfOrgApiVersion", "API version for a specific project or all projects. Default value is the API version of your Dev Hub. Overrides the apiVersion configuration variable."], ["sfAudienceUrl", "URL that overrides the aud (audience) field used for JWT authentication so that it matches the expected value of the authorization server URL for the org you\u2019re logging into."], ["sfCodeCoverageRequirement", "Code coverage percentages that are displayed in green when you run the Apex test CLIcommands with the --code-coverage flag."], ["sfContentType", "Set to JSON so that all CLI commands output results in JSON format."], ["sfDisableAutoupdate", "Set to true to disable the auto-update feature of Salesforce CLI. Default value is false."], ["sfAutoupdateDisable", "Set to true to disable the auto-update feature of Salesforce CLI. Default value is false."], ["sfDisableSourceMemberPolling", "Set to true to disable polling of your org\u2019s SourceMember object when you run the commands to push and pull source. Default value is false."], ["sfDisableTelemetry", "Set to true to disable Salesforce CLI from collecting usage information, user environment information, and crash reports. Default value is false. Overrides the disableTelemetry configration variable."], ["sfDnsTimeout", "Number of seconds that the env commands wait for a response when checking whether an org is connected. Default value is 3."], ["sfDomainRetry", "Time, in seconds, that Salesforce CLI waits for the Lightning Experience custom domain to resolve and become available in a scratch org. Default value is 240."], ["sfImprovedCodeCoverage", "Set to true to scope Apex test results to the classes entered during a test run when running the Apex test commands."], ["sfOrgInstanceUrl", "URL of the Salesforce instance that is hosting your org. Default value is https://login.salesforce.com. Overrides the instanceUrl configuration variable."], ["sfJsonToStdout", "Set to true to send messages resulting from failed Salesforce CLI commands to stdout instead of stderr."], ["sfDisableLogFile", "Set to true to disable log file writing"], ["sfLogLevel", "Level of messages that the CLI writes to the log file. Valid values are trace, debug, info, warn, error, fatal. Default value is warn."], ["sfLogRotationCount", "The default rotation period for logs. Example '1d' will rotate logs daily (at midnight)."], ["sfLogRotationPeriod", "The number of backup rotated log files to keep. Example: '3' will have the base sf.log file, and the past 3 (period) log files."], ["sfOrgMaxQueryLimit", "Maximum number of Salesforce records returned by a CLI command. Default value is 10,000. Overrides the maxQueryLimit configuration variable."], ["sfMdapiTempDir", "Directory that contains files (in metadata format) when running certain Salesforce CLI commands."], ["sfNpmRegistry", "URL to a private npm server, where all packages that you publish are private."], ["sfPrecompileEnable", "Set to true to enable Apex pre-compile before the tests are run with the Apex test run command. Default is false."], ["sfProjectAutoupdateDisableForPackageCreate", "Set to true to disable automatic updates to sfdx-project.json when running the package create command."], ["sfProjectAutoupdateDisableForPackageVersionCreate", "Set to true to disable automatic updates to sfdx-project.json when running the package version create command."], ["sfSourceMemberPollingTimeout", "Number of seconds you want the source push command to keep polling the SourceMember object before the command times out."], ["sfUseGenericUnixKeychain", "(Linux and macOS only) Set to true if you want to use the generic UNIX keychain instead of the Linux libsecret library or macOS keychain."], ["sfUseProgressBar", "Set to false to disable the progress bar when running the metadata deploy command."], ["sfLazyLoadModules", "Set to true to enable lazy loading of sf modules"], ["sfS3Host", "URL to S3 host"], ["sfUpdateInstructions", "Text that describes how to update sf"], ["sfInstaller", "Boolean indicating that the installer is running"], ["sfEnv", "Describes if sf is in \"demo\" mode"], ["deprecatedEnv", "Deprecated environment variable: %s. Please use %s instead."], ["deprecatedEnvDisagreement", "Deprecated environment variable: %s. Please use %s instead.\n\nYour environment has both variables populated, and with different values. The value from %s will be used."], ["sfCapitalizeRecordTypes", "Whether record types are capitalized on scratch org creation."]]));
|
|
25
|
+
const messages = new messages_1.Messages('@salesforce/core', 'envVars', new Map([["forceOpenUrl", "Web page that opens in your browser when you connect to an org. For example, to open Lightning Experience, set to \"lightning\"."], ["forceShowSpinner", "Set to true to show a spinner animation on the command line when running asynchronous CLI commands. Default is false."], ["forceSpinnerDelay", "Speed of the spinner in milliseconds. Default is 60."], ["httpProxy", "HTTP URL and port of the proxy server when using Salesforce CLI behind a corporate firewall or web proxy."], ["httpsProxy", "HTTPS URL and port of the proxy server when using Salesforce CLI behind a corporate firewall or web proxy."], ["nodeExtraCaCerts", "Fully qualified path to your self-signed certificate. Will be installed after you run \"sfdx update\"."], ["nodeTlsRejectUnauthorized", "Set to 0 to allow Node.js to use the self-signed certificate in the certificate chain."], ["sfdxAccessToken", "Specifies an access token when using the auth:accesstoken:store command."], ["sfdxApiVersion", "The API version for a specific project or all projects. Default value is the API version of your Dev Hub. Overrides the apiVersion config value."], ["sfdxAudienceUrl", "URL that overrides the aud (audience) field used for JWT authentication so that it matches the expected value of the authorization server URL for the org you\u2019re logging into."], ["sfdxCodeCoverageRequirement", "Code coverage percentages that are displayed in green when you run force:apex:test:\\* with the --codecoverage parameter."], ["sfdxContentType", "Set to JSON so that all CLI commands output results in JSON format."], ["sfdxDefaultdevhubusername", "Username or alias of your default Dev Hub org. Overrides the defaultdevhubusername configuration value."], ["sfdxDefaultusername", "Username or alias of your default org. Overrides the defaultusername configuration value."], ["sfdxDisableAutoupdate", "Set to true to disable the auto-update feature of Salesforce CLI. Default value is false."], ["sfdxAutoupdateDisable", "Set to true to disable the auto-update feature of Salesforce CLI. Default value is false."], ["sfdxDisableSourceMemberPolling", "Set to true to disable polling of your org\u2019s SourceMember object when you run the force:source:push|pull commands. Default value is false."], ["sfdxSourceTrackingBatchSize", "Number of source-tracked file updates to batch after a deploy or retrieve. The default value is 8,000 (Windows) or 15,000 (Linux/macOS)."], ["sfdxDisableTelemetry", "Set to true to disable Salesforce CLI from collecting usage information, user environment information, and crash reports. Default value is false. Overrides the disableTelemetry configration variable."], ["sfdxDnsTimeout", "Number of seconds that the force:org:\\* commands wait for a response when checking whether an org is connected. Default value is 3."], ["sfdxDomainRetry", "Time, in seconds, that Salesforce CLI waits for the Lightning Experience custom domain to resolve and become available in a scratch org. Default value is 240."], ["sfdxImprovedCodeCoverage", "Set to true to scope Apex test results to the classes entered during a test run when running force:apex:test:\\*."], ["sfdxInstanceUrl", "URL of the Salesforce instance that is hosting your org. Default value is https://login.salesforce.com. Overrides the instanceUrl configuration value."], ["sfdxJsonToStdout", "Set to true to send messages resulting from failed Salesforce CLI commands to stdout instead of stderr."], ["sfdxDisableLogFile", "Set to true to disable log file writing"], ["sfdxLogLevel", "Level of messages that the CLI writes to the log file. Valid values are trace, debug, info, warn, error, fatal. Default value is warn."], ["sfdxLogRotationCount", "The default rotation period for logs. Example '1d' will rotate logs daily (at midnight)."], ["sfdxLogRotationPeriod", "The number of backup rotated log files to keep. Example: '3' will have the base sf.log file, and the past 3 (period) log files."], ["sfdxMaxQueryLimit", "Maximum number of Salesforce records returned by a CLI command. Default value is 10,000. Overrides the maxQueryLimit configuration value."], ["sfdxMdapiTempDir", "Directory that contains files (in metadata format) when running certain Salesforce CLI commands, such as force:source:\\*."], ["sfdxNpmRegistry", "URL to a private npm server, where all packages that you publish are private."], ["sfdxPrecompileEnable", "Set to true to enable Apex pre-compile before the tests are run with the force:apex:test:run command. Default is false."], ["sfdxProjectAutoupdateDisableForPackageCreate", "Set to true to disable automatic updates to sfdx-project.json when running force:package:create."], ["sfdxProjectAutoupdateDisableForPackageVersionCreate", "Set to true to disable automatic updates to sfdx-project.json when running force:package:version:create."], ["sfdxRestDeploy", "Set to true to make Salesforce CLI use the Metadata REST API for deployments. By default, the CLI uses SOAP."], ["sfdxSourceMemberPollingTimeout", "Number of seconds you want the force:source:push command to keep polling the SourceMember object before the command times out."], ["sfdxUseGenericUnixKeychain", "(Linux and macOS only) Set to true if you want to use the generic UNIX keychain instead of the Linux libsecret library or macOS keychain."], ["sfdxUseProgressBar", "Set to false to disable the progress bar when running force:mdapi:deploy, force:source:deploy, or force:source:push."], ["sfdxLazyLoadModules", "Set to true to enable lazy loading of sfdx modules"], ["sfdxS3Host", "URL to S3 host"], ["sfdxUpdateInstructions", "Text that describes how to update sfdx"], ["sfdxInstaller", "Boolean indicating that the installer is running"], ["sfdxEnv", "Describes if sfdx is in \"demo\" mode"], ["sfTargetOrg", "Username or alias of your default org. Overrides the target-org configuration variable."], ["sfTargetDevHub", "Username or alias of your default Dev Hub org. Overrides the target-dev-hub configuration variable."], ["sfAccessToken", "Specifies an access token when using a login command that uses access tokens."], ["sfOrgApiVersion", "API version for a specific project or all projects. Default value is the API version of your Dev Hub. Overrides the apiVersion configuration variable."], ["sfAudienceUrl", "URL that overrides the aud (audience) field used for JWT authentication so that it matches the expected value of the authorization server URL for the org you\u2019re logging into."], ["sfCodeCoverageRequirement", "Code coverage percentages that are displayed in green when you run the Apex test CLIcommands with the --code-coverage flag."], ["sfContentType", "Set to JSON so that all CLI commands output results in JSON format."], ["sfDisableAutoupdate", "Set to true to disable the auto-update feature of Salesforce CLI. Default value is false."], ["sfAutoupdateDisable", "Set to true to disable the auto-update feature of Salesforce CLI. Default value is false."], ["sfDisableSourceMemberPolling", "Set to true to disable polling of your org\u2019s SourceMember object when you run the commands to push and pull source. Default value is false."], ["sfDisableTelemetry", "Set to true to disable Salesforce CLI from collecting usage information, user environment information, and crash reports. Default value is false. Overrides the disableTelemetry configration variable."], ["sfDnsTimeout", "Number of seconds that the env commands wait for a response when checking whether an org is connected. Default value is 3."], ["sfDomainRetry", "Time, in seconds, that Salesforce CLI waits for the Lightning Experience custom domain to resolve and become available in a scratch org. Default value is 240."], ["sfImprovedCodeCoverage", "Set to true to scope Apex test results to the classes entered during a test run when running the Apex test commands."], ["sfOrgInstanceUrl", "URL of the Salesforce instance that is hosting your org. Default value is https://login.salesforce.com. Overrides the instanceUrl configuration variable."], ["sfJsonToStdout", "Set to true to send messages resulting from failed Salesforce CLI commands to stdout instead of stderr."], ["sfDisableLogFile", "Set to true to disable log file writing"], ["sfLogLevel", "Level of messages that the CLI writes to the log file. Valid values are trace, debug, info, warn, error, fatal. Default value is warn."], ["sfLogRotationCount", "The default rotation period for logs. Example '1d' will rotate logs daily (at midnight)."], ["sfLogRotationPeriod", "The number of backup rotated log files to keep. Example: '3' will have the base sf.log file, and the past 3 (period) log files."], ["sfOrgMaxQueryLimit", "Maximum number of Salesforce records returned by a CLI command. Default value is 10,000. Overrides the maxQueryLimit configuration variable."], ["sfMdapiTempDir", "Directory that contains files (in metadata format) when running certain Salesforce CLI commands."], ["sfNpmRegistry", "URL to a private npm server, where all packages that you publish are private."], ["sfPrecompileEnable", "Set to true to enable Apex pre-compile before the tests are run with the Apex test run command. Default is false."], ["sfProjectAutoupdateDisableForPackageCreate", "Set to true to disable automatic updates to sfdx-project.json when running the package create command."], ["sfProjectAutoupdateDisableForPackageVersionCreate", "Set to true to disable automatic updates to sfdx-project.json when running the package version create command."], ["sfSourceMemberPollingTimeout", "Number of seconds you want the source push command to keep polling the SourceMember object before the command times out."], ["sfUseGenericUnixKeychain", "(Linux and macOS only) Set to true if you want to use the generic UNIX keychain instead of the Linux libsecret library or macOS keychain."], ["sfUseProgressBar", "Set to false to disable the progress bar when running the metadata deploy command."], ["sfLazyLoadModules", "Set to true to enable lazy loading of sf modules"], ["sfS3Host", "URL to S3 host"], ["sfUpdateInstructions", "Text that describes how to update sf"], ["sfInstaller", "Boolean indicating that the installer is running"], ["sfEnv", "Describes if sf is in \"demo\" mode"], ["deprecatedEnv", "Deprecated environment variable: %s. Please use %s instead."], ["deprecatedEnvDisagreement", "Deprecated environment variable: %s. Please use %s instead.\n\nYour environment has both variables populated, and with different values. The value from %s will be used."], ["sfCapitalizeRecordTypes", "Whether record types are capitalized on scratch org creation."], ["sfSkipScratchOrgCheck", "Set to \"true\" to skip the scratch org and sandbox identification check that runs after authenticating an org. When enabled, `sf org login jwt` (and other login commands) will not query existing cached orgs to determine whether the newly authenticated org is a scratch org or sandbox. This can significantly speed up authentication in CI/CD environments with many cached org authorizations."]]));
|
|
26
26
|
var EnvironmentVariable;
|
|
27
27
|
(function (EnvironmentVariable) {
|
|
28
28
|
EnvironmentVariable["FORCE_OPEN_URL"] = "FORCE_OPEN_URL";
|
|
@@ -102,6 +102,7 @@ var EnvironmentVariable;
|
|
|
102
102
|
EnvironmentVariable["SF_INSTALLER"] = "SF_INSTALLER";
|
|
103
103
|
EnvironmentVariable["SF_ENV"] = "SF_ENV";
|
|
104
104
|
EnvironmentVariable["SF_CAPITALIZE_RECORD_TYPES"] = "SF_CAPITALIZE_RECORD_TYPES";
|
|
105
|
+
EnvironmentVariable["SF_SKIP_SCRATCH_ORG_CHECK"] = "SF_SKIP_SCRATCH_ORG_CHECK";
|
|
105
106
|
})(EnvironmentVariable || (exports.EnvironmentVariable = EnvironmentVariable = {}));
|
|
106
107
|
const getMessage = (environmentVariable) => messages.getMessage((0, change_case_1.camelCase)(environmentVariable));
|
|
107
108
|
exports.SUPPORTED_ENV_VARS = {
|
|
@@ -416,6 +417,10 @@ exports.SUPPORTED_ENV_VARS = {
|
|
|
416
417
|
description: getMessage(EnvironmentVariable.SF_CAPITALIZE_RECORD_TYPES),
|
|
417
418
|
synonymOf: null,
|
|
418
419
|
},
|
|
420
|
+
[EnvironmentVariable.SF_SKIP_SCRATCH_ORG_CHECK]: {
|
|
421
|
+
description: getMessage(EnvironmentVariable.SF_SKIP_SCRATCH_ORG_CHECK),
|
|
422
|
+
synonymOf: null,
|
|
423
|
+
},
|
|
419
424
|
};
|
|
420
425
|
class EnvVars extends kit_1.Env {
|
|
421
426
|
constructor(env = process.env) {
|
package/lib/crypto/crypto.js
CHANGED
|
@@ -31,13 +31,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
31
31
|
}) : function(o, v) {
|
|
32
32
|
o["default"] = v;
|
|
33
33
|
});
|
|
34
|
-
var __importStar = (this && this.__importStar) || function (
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
};
|
|
34
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
35
|
+
var ownKeys = function(o) {
|
|
36
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
37
|
+
var ar = [];
|
|
38
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
39
|
+
return ar;
|
|
40
|
+
};
|
|
41
|
+
return ownKeys(o);
|
|
42
|
+
};
|
|
43
|
+
return function (mod) {
|
|
44
|
+
if (mod && mod.__esModule) return mod;
|
|
45
|
+
var result = {};
|
|
46
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
47
|
+
__setModuleDefault(result, mod);
|
|
48
|
+
return result;
|
|
49
|
+
};
|
|
50
|
+
})();
|
|
41
51
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
42
52
|
exports.Crypto = void 0;
|
|
43
53
|
const crypto = __importStar(require("node:crypto"));
|
|
@@ -30,13 +30,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
30
30
|
}) : function(o, v) {
|
|
31
31
|
o["default"] = v;
|
|
32
32
|
});
|
|
33
|
-
var __importStar = (this && this.__importStar) || function (
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
};
|
|
33
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
34
|
+
var ownKeys = function(o) {
|
|
35
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
36
|
+
var ar = [];
|
|
37
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
38
|
+
return ar;
|
|
39
|
+
};
|
|
40
|
+
return ownKeys(o);
|
|
41
|
+
};
|
|
42
|
+
return function (mod) {
|
|
43
|
+
if (mod && mod.__esModule) return mod;
|
|
44
|
+
var result = {};
|
|
45
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
46
|
+
__setModuleDefault(result, mod);
|
|
47
|
+
return result;
|
|
48
|
+
};
|
|
49
|
+
})();
|
|
40
50
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
41
51
|
exports.keyChainImpl = exports.GenericWindowsKeychainAccess = exports.GenericUnixKeychainAccess = exports.GenericKeychainAccess = exports.KeychainAccess = void 0;
|
|
42
52
|
const childProcess = __importStar(require("node:child_process"));
|
|
@@ -30,13 +30,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
30
30
|
}) : function(o, v) {
|
|
31
31
|
o["default"] = v;
|
|
32
32
|
});
|
|
33
|
-
var __importStar = (this && this.__importStar) || function (
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
};
|
|
33
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
34
|
+
var ownKeys = function(o) {
|
|
35
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
36
|
+
var ar = [];
|
|
37
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
38
|
+
return ar;
|
|
39
|
+
};
|
|
40
|
+
return ownKeys(o);
|
|
41
|
+
};
|
|
42
|
+
return function (mod) {
|
|
43
|
+
if (mod && mod.__esModule) return mod;
|
|
44
|
+
var result = {};
|
|
45
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
46
|
+
__setModuleDefault(result, mod);
|
|
47
|
+
return result;
|
|
48
|
+
};
|
|
49
|
+
})();
|
|
40
50
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
41
51
|
exports.SecureBuffer = void 0;
|
|
42
52
|
const crypto = __importStar(require("node:crypto"));
|
package/lib/fs/fs.js
CHANGED
|
@@ -30,13 +30,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
30
30
|
}) : function(o, v) {
|
|
31
31
|
o["default"] = v;
|
|
32
32
|
});
|
|
33
|
-
var __importStar = (this && this.__importStar) || function (
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
};
|
|
33
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
34
|
+
var ownKeys = function(o) {
|
|
35
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
36
|
+
var ar = [];
|
|
37
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
38
|
+
return ar;
|
|
39
|
+
};
|
|
40
|
+
return ownKeys(o);
|
|
41
|
+
};
|
|
42
|
+
return function (mod) {
|
|
43
|
+
if (mod && mod.__esModule) return mod;
|
|
44
|
+
var result = {};
|
|
45
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
46
|
+
__setModuleDefault(result, mod);
|
|
47
|
+
return result;
|
|
48
|
+
};
|
|
49
|
+
})();
|
|
40
50
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
41
51
|
exports.resetFs = exports.setFs = exports.getVirtualFs = exports.fs = void 0;
|
|
42
52
|
const nodeFs = __importStar(require("node:fs"));
|
package/lib/global.js
CHANGED
|
@@ -30,13 +30,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
30
30
|
}) : function(o, v) {
|
|
31
31
|
o["default"] = v;
|
|
32
32
|
});
|
|
33
|
-
var __importStar = (this && this.__importStar) || function (
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
};
|
|
33
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
34
|
+
var ownKeys = function(o) {
|
|
35
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
36
|
+
var ar = [];
|
|
37
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
38
|
+
return ar;
|
|
39
|
+
};
|
|
40
|
+
return ownKeys(o);
|
|
41
|
+
};
|
|
42
|
+
return function (mod) {
|
|
43
|
+
if (mod && mod.__esModule) return mod;
|
|
44
|
+
var result = {};
|
|
45
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
46
|
+
__setModuleDefault(result, mod);
|
|
47
|
+
return result;
|
|
48
|
+
};
|
|
49
|
+
})();
|
|
40
50
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
41
51
|
exports.Global = exports.Mode = void 0;
|
|
42
52
|
const os = __importStar(require("node:os"));
|
package/lib/lifecycleEvents.js
CHANGED
|
@@ -30,13 +30,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
30
30
|
}) : function(o, v) {
|
|
31
31
|
o["default"] = v;
|
|
32
32
|
});
|
|
33
|
-
var __importStar = (this && this.__importStar) || function (
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
};
|
|
33
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
34
|
+
var ownKeys = function(o) {
|
|
35
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
36
|
+
var ar = [];
|
|
37
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
38
|
+
return ar;
|
|
39
|
+
};
|
|
40
|
+
return ownKeys(o);
|
|
41
|
+
};
|
|
42
|
+
return function (mod) {
|
|
43
|
+
if (mod && mod.__esModule) return mod;
|
|
44
|
+
var result = {};
|
|
45
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
46
|
+
__setModuleDefault(result, mod);
|
|
47
|
+
return result;
|
|
48
|
+
};
|
|
49
|
+
})();
|
|
40
50
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
41
51
|
exports.cloneUniqueListeners = exports.Lifecycle = void 0;
|
|
42
52
|
const semver_1 = require("semver");
|
package/lib/logger/logger.js
CHANGED
|
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
25
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
36
|
exports.computeLevel = exports.getWriteStream = exports.Logger = exports.LoggerLevel = void 0;
|
|
27
37
|
/*
|
package/lib/messages.js
CHANGED
|
@@ -30,13 +30,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
30
30
|
}) : function(o, v) {
|
|
31
31
|
o["default"] = v;
|
|
32
32
|
});
|
|
33
|
-
var __importStar = (this && this.__importStar) || function (
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
};
|
|
33
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
34
|
+
var ownKeys = function(o) {
|
|
35
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
36
|
+
var ar = [];
|
|
37
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
38
|
+
return ar;
|
|
39
|
+
};
|
|
40
|
+
return ownKeys(o);
|
|
41
|
+
};
|
|
42
|
+
return function (mod) {
|
|
43
|
+
if (mod && mod.__esModule) return mod;
|
|
44
|
+
var result = {};
|
|
45
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
46
|
+
__setModuleDefault(result, mod);
|
|
47
|
+
return result;
|
|
48
|
+
};
|
|
49
|
+
})();
|
|
40
50
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
41
51
|
exports.Messages = void 0;
|
|
42
52
|
const os = __importStar(require("node:os"));
|
package/lib/org/authInfo.js
CHANGED
|
@@ -31,13 +31,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
31
31
|
}) : function(o, v) {
|
|
32
32
|
o["default"] = v;
|
|
33
33
|
});
|
|
34
|
-
var __importStar = (this && this.__importStar) || function (
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
};
|
|
34
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
35
|
+
var ownKeys = function(o) {
|
|
36
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
37
|
+
var ar = [];
|
|
38
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
39
|
+
return ar;
|
|
40
|
+
};
|
|
41
|
+
return ownKeys(o);
|
|
42
|
+
};
|
|
43
|
+
return function (mod) {
|
|
44
|
+
if (mod && mod.__esModule) return mod;
|
|
45
|
+
var result = {};
|
|
46
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
47
|
+
__setModuleDefault(result, mod);
|
|
48
|
+
return result;
|
|
49
|
+
};
|
|
50
|
+
})();
|
|
41
51
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
42
52
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
43
53
|
};
|
|
@@ -175,22 +185,25 @@ class AuthInfo extends kit_1.AsyncOptionalCreatable {
|
|
|
175
185
|
// prevent ConfigFile collision bug
|
|
176
186
|
// eslint-disable-next-line no-await-in-loop
|
|
177
187
|
const authInfo = await AuthInfo.create({ username });
|
|
178
|
-
const
|
|
188
|
+
const authFields = authInfo.getFields();
|
|
189
|
+
const { orgId, instanceUrl, devHubUsername, expirationDate, isDevHub } = authFields;
|
|
190
|
+
const isScratchOrg = Boolean(devHubUsername) || Boolean(authFields[org_1.Org.Fields.IS_SCRATCH]);
|
|
191
|
+
const expDate = expirationDate ?? authFields[org_1.Org.Fields.TRIAL_EXPIRATION_DATE];
|
|
192
|
+
// eslint-disable-next-line no-await-in-loop
|
|
193
|
+
const hasSandboxFile = await stateAggregator.sandboxes.hasFile(orgId);
|
|
194
|
+
const isSandbox = Boolean(authFields[org_1.Org.Fields.IS_SANDBOX]) || hasSandboxFile;
|
|
179
195
|
final.push({
|
|
180
196
|
aliases,
|
|
181
197
|
configs,
|
|
182
198
|
username,
|
|
183
199
|
instanceUrl,
|
|
184
|
-
isScratchOrg
|
|
200
|
+
isScratchOrg,
|
|
185
201
|
isDevHub: isDevHub ?? false,
|
|
186
|
-
|
|
187
|
-
isSandbox: await stateAggregator.sandboxes.hasFile(orgId),
|
|
202
|
+
isSandbox,
|
|
188
203
|
orgId: orgId,
|
|
189
204
|
accessToken: authInfo.getConnectionOptions().accessToken,
|
|
190
205
|
oauthMethod: authInfo.isJwt() ? 'jwt' : authInfo.isOauth() ? 'web' : 'token',
|
|
191
|
-
isExpired:
|
|
192
|
-
? new Date((0, ts_types_1.ensureString)(expirationDate)).getTime() < new Date().getTime()
|
|
193
|
-
: 'unknown',
|
|
206
|
+
isExpired: isScratchOrg && expDate ? new Date((0, ts_types_1.ensureString)(expDate)).getTime() < new Date().getTime() : 'unknown',
|
|
194
207
|
});
|
|
195
208
|
}
|
|
196
209
|
catch (err) {
|
|
@@ -273,31 +286,83 @@ class AuthInfo extends kit_1.AsyncOptionalCreatable {
|
|
|
273
286
|
* @param orgAuthInfo
|
|
274
287
|
*/
|
|
275
288
|
static async identifyPossibleScratchOrgs(fields, orgAuthInfo) {
|
|
289
|
+
if (kit_1.env.getBoolean('SF_SKIP_SCRATCH_ORG_CHECK')) {
|
|
290
|
+
(await logger_1.Logger.child('Common', { tag: 'identifyPossibleScratchOrgs' })).debug('Skipping scratch org identification due to SF_SKIP_SCRATCH_ORG_CHECK');
|
|
291
|
+
return;
|
|
292
|
+
}
|
|
276
293
|
// fields property is passed in because the consumers of this method have performed the decrypt.
|
|
277
294
|
// This is so we don't have to call authInfo.getFields(true) and decrypt again OR accidentally save an
|
|
278
295
|
// authInfo before it is necessary.
|
|
279
296
|
const logger = await logger_1.Logger.child('Common', { tag: 'identifyPossibleScratchOrgs' });
|
|
280
297
|
await (0, determineOrg_1.determineOrg)(orgAuthInfo);
|
|
298
|
+
// re-read fields after determineOrg may have updated them
|
|
299
|
+
const updatedFields = orgAuthInfo.getFields();
|
|
281
300
|
// return if we already know the hub org, we know it is a devhub or prod-like, or no orgId present
|
|
282
|
-
if (Boolean(
|
|
301
|
+
if (Boolean(updatedFields.isDevHub) || Boolean(updatedFields.devHubUsername) || !updatedFields.orgId)
|
|
283
302
|
return;
|
|
303
|
+
if (updatedFields.isSandbox) {
|
|
304
|
+
logger.debug('determineOrg already identified org as sandbox, skipping expensive org scan');
|
|
305
|
+
return;
|
|
306
|
+
}
|
|
307
|
+
// for scratch orgs, skip the full listAllAuthorizations + sandbox identification and
|
|
308
|
+
// instead do a lightweight DevHub lookup using raw configs (no AuthInfo creation/decryption)
|
|
309
|
+
if (updatedFields.isScratch) {
|
|
310
|
+
logger.debug('determineOrg identified org as scratch, doing lightweight DevHub lookup');
|
|
311
|
+
const stateAggregator = await stateAggregator_1.StateAggregator.getInstance();
|
|
312
|
+
const allConfigs = await stateAggregator.orgs.readAll();
|
|
313
|
+
const devHubUsernames = allConfigs.filter((c) => c.isDevHub).map((c) => (0, ts_types_1.ensureString)(c.username));
|
|
314
|
+
for (const hubUsername of devHubUsernames) {
|
|
315
|
+
try {
|
|
316
|
+
// eslint-disable-next-line no-await-in-loop
|
|
317
|
+
const soi = await AuthInfo.queryScratchOrg(hubUsername, updatedFields.orgId);
|
|
318
|
+
// eslint-disable-next-line no-await-in-loop
|
|
319
|
+
await orgAuthInfo.save({
|
|
320
|
+
...fields,
|
|
321
|
+
devHubUsername: hubUsername,
|
|
322
|
+
expirationDate: soi.ExpirationDate,
|
|
323
|
+
isScratch: true,
|
|
324
|
+
});
|
|
325
|
+
logger.debug(`set ${hubUsername} as devhub for scratch org ${orgAuthInfo.getUsername()}`);
|
|
326
|
+
return;
|
|
327
|
+
}
|
|
328
|
+
catch (error) {
|
|
329
|
+
if (error instanceof Error && error.name === 'NoActiveScratchOrgFound') {
|
|
330
|
+
logger.debug(`devhub ${hubUsername} does not own this scratch org`);
|
|
331
|
+
}
|
|
332
|
+
else {
|
|
333
|
+
logger.debug(`Error connecting to devhub ${hubUsername}`, error);
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
return;
|
|
338
|
+
}
|
|
284
339
|
logger.debug('getting devHubs and prod orgs to identify scratch orgs and sandboxes');
|
|
285
|
-
// TODO: return if url is not sandbox-like to avoid constantly asking about production orgs
|
|
286
340
|
// TODO: someday we make this easier by asking the org if it is a scratch org
|
|
287
|
-
const
|
|
288
|
-
|
|
289
|
-
|
|
341
|
+
const allOrgs = await AuthInfo.listAllAuthorizations();
|
|
342
|
+
const hubAuthInfos = allOrgs.filter((org) => org.isDevHub);
|
|
343
|
+
// skip sandbox identification if the instance URL is not sandbox-like
|
|
344
|
+
// enhanced domains: *.sandbox.my.salesforce.com; pre-enhanced My Domain: company--sbxname.my.salesforce.com
|
|
345
|
+
const isSandboxLikeUrl = fields.instanceUrl != null && (fields.instanceUrl.includes('.sandbox.') || fields.instanceUrl.includes('--'));
|
|
346
|
+
const possibleProdOrgs = isSandboxLikeUrl ? allOrgs.filter((org) => !org.isScratchOrg && !org.isSandbox) : [];
|
|
347
|
+
if (!isSandboxLikeUrl) {
|
|
348
|
+
logger.debug('instance URL is not sandbox-like, skipping sandbox identification');
|
|
349
|
+
}
|
|
290
350
|
logger.debug(`found ${hubAuthInfos.length} DevHubs`);
|
|
291
351
|
logger.debug(`found ${possibleProdOrgs.length} possible prod orgs`);
|
|
292
352
|
if (hubAuthInfos.length === 0 && possibleProdOrgs.length === 0) {
|
|
293
353
|
return;
|
|
294
354
|
}
|
|
295
|
-
|
|
355
|
+
let identified = false;
|
|
356
|
+
// ask all those orgs if they know this orgId, but stop once one claims it
|
|
296
357
|
await Promise.all([
|
|
297
358
|
...hubAuthInfos.map(async (hubAuthInfo) => {
|
|
359
|
+
if (identified)
|
|
360
|
+
return;
|
|
298
361
|
try {
|
|
299
362
|
const soi = await AuthInfo.queryScratchOrg(hubAuthInfo.username, fields.orgId);
|
|
300
|
-
|
|
363
|
+
if (identified)
|
|
364
|
+
return;
|
|
365
|
+
identified = true;
|
|
301
366
|
logger.debug(`found orgId ${fields.orgId ?? '<undefined>'} in devhub ${hubAuthInfo.username}`);
|
|
302
367
|
try {
|
|
303
368
|
await orgAuthInfo.save({
|
|
@@ -322,7 +387,11 @@ class AuthInfo extends kit_1.AsyncOptionalCreatable {
|
|
|
322
387
|
}
|
|
323
388
|
}),
|
|
324
389
|
...possibleProdOrgs.map(async (pOrgAuthInfo) => {
|
|
325
|
-
|
|
390
|
+
if (identified)
|
|
391
|
+
return;
|
|
392
|
+
const found = await AuthInfo.identifyPossibleSandbox(pOrgAuthInfo, fields, orgAuthInfo, logger);
|
|
393
|
+
if (found)
|
|
394
|
+
identified = true;
|
|
326
395
|
}),
|
|
327
396
|
]);
|
|
328
397
|
}
|
|
@@ -334,13 +403,13 @@ class AuthInfo extends kit_1.AsyncOptionalCreatable {
|
|
|
334
403
|
}
|
|
335
404
|
static async identifyPossibleSandbox(possibleProdOrg, fields, orgAuthInfo, logger) {
|
|
336
405
|
if (!fields.orgId) {
|
|
337
|
-
return;
|
|
406
|
+
return false;
|
|
338
407
|
}
|
|
339
408
|
try {
|
|
340
409
|
const prodOrg = await org_1.Org.create({ aliasOrUsername: possibleProdOrg.username });
|
|
341
410
|
const sbxProcess = await prodOrg.querySandboxProcessByOrgId(fields.orgId);
|
|
342
411
|
if (!sbxProcess?.SandboxInfoId) {
|
|
343
|
-
return;
|
|
412
|
+
return false;
|
|
344
413
|
}
|
|
345
414
|
logger.debug(`${fields.orgId} is a sandbox of ${possibleProdOrg.username}`);
|
|
346
415
|
try {
|
|
@@ -373,9 +442,11 @@ class AuthInfo extends kit_1.AsyncOptionalCreatable {
|
|
|
373
442
|
catch (e) {
|
|
374
443
|
logger.debug(`error writing sandbox auth file for: ${orgAuthInfo.getUsername()}`, e);
|
|
375
444
|
}
|
|
445
|
+
return true;
|
|
376
446
|
}
|
|
377
447
|
catch (err) {
|
|
378
448
|
logger.debug(`${fields.orgId} is not a sandbox of ${possibleProdOrg.username}`);
|
|
449
|
+
return false;
|
|
379
450
|
}
|
|
380
451
|
}
|
|
381
452
|
/**
|
package/lib/org/org.js
CHANGED
|
@@ -31,13 +31,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
31
31
|
}) : function(o, v) {
|
|
32
32
|
o["default"] = v;
|
|
33
33
|
});
|
|
34
|
-
var __importStar = (this && this.__importStar) || function (
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
};
|
|
34
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
35
|
+
var ownKeys = function(o) {
|
|
36
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
37
|
+
var ar = [];
|
|
38
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
39
|
+
return ar;
|
|
40
|
+
};
|
|
41
|
+
return ownKeys(o);
|
|
42
|
+
};
|
|
43
|
+
return function (mod) {
|
|
44
|
+
if (mod && mod.__esModule) return mod;
|
|
45
|
+
var result = {};
|
|
46
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
47
|
+
__setModuleDefault(result, mod);
|
|
48
|
+
return result;
|
|
49
|
+
};
|
|
50
|
+
})();
|
|
41
51
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
42
52
|
exports.Org = exports.SandboxEvents = exports.OrgTypes = void 0;
|
|
43
53
|
exports.sandboxIsResumable = sandboxIsResumable;
|
|
@@ -30,13 +30,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
30
30
|
}) : function(o, v) {
|
|
31
31
|
o["default"] = v;
|
|
32
32
|
});
|
|
33
|
-
var __importStar = (this && this.__importStar) || function (
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
};
|
|
33
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
34
|
+
var ownKeys = function(o) {
|
|
35
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
36
|
+
var ar = [];
|
|
37
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
38
|
+
return ar;
|
|
39
|
+
};
|
|
40
|
+
return ownKeys(o);
|
|
41
|
+
};
|
|
42
|
+
return function (mod) {
|
|
43
|
+
if (mod && mod.__esModule) return mod;
|
|
44
|
+
var result = {};
|
|
45
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
46
|
+
__setModuleDefault(result, mod);
|
|
47
|
+
return result;
|
|
48
|
+
};
|
|
49
|
+
})();
|
|
40
50
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
41
51
|
exports.createRecordTypeAndBusinessProcessFileContent = exports.createObjectFileContent = exports.RequestStatus = void 0;
|
|
42
52
|
const path = __importStar(require("node:path"));
|
|
@@ -85,7 +85,7 @@ export declare const ProjectJsonSchema: z.ZodObject<{
|
|
|
85
85
|
aliasFor?: string;
|
|
86
86
|
children?: {
|
|
87
87
|
types: {
|
|
88
|
-
[typeId: string]: any;
|
|
88
|
+
[typeId: string]: /*elided*/ any;
|
|
89
89
|
};
|
|
90
90
|
suffixes: Record<string, string>;
|
|
91
91
|
directories?: Record<string, string>;
|
|
@@ -115,7 +115,7 @@ export declare const ProjectJsonSchema: z.ZodObject<{
|
|
|
115
115
|
aliasFor?: string;
|
|
116
116
|
children?: {
|
|
117
117
|
types: {
|
|
118
|
-
[typeId: string]: any;
|
|
118
|
+
[typeId: string]: /*elided*/ any;
|
|
119
119
|
};
|
|
120
120
|
suffixes: Record<string, string>;
|
|
121
121
|
directories?: Record<string, string>;
|
package/lib/schema/validator.js
CHANGED
|
@@ -30,13 +30,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
30
30
|
}) : function(o, v) {
|
|
31
31
|
o["default"] = v;
|
|
32
32
|
});
|
|
33
|
-
var __importStar = (this && this.__importStar) || function (
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
};
|
|
33
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
34
|
+
var ownKeys = function(o) {
|
|
35
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
36
|
+
var ar = [];
|
|
37
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
38
|
+
return ar;
|
|
39
|
+
};
|
|
40
|
+
return ownKeys(o);
|
|
41
|
+
};
|
|
42
|
+
return function (mod) {
|
|
43
|
+
if (mod && mod.__esModule) return mod;
|
|
44
|
+
var result = {};
|
|
45
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
46
|
+
__setModuleDefault(result, mod);
|
|
47
|
+
return result;
|
|
48
|
+
};
|
|
49
|
+
})();
|
|
40
50
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
41
51
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
42
52
|
};
|
|
@@ -30,13 +30,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
30
30
|
}) : function(o, v) {
|
|
31
31
|
o["default"] = v;
|
|
32
32
|
});
|
|
33
|
-
var __importStar = (this && this.__importStar) || function (
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
};
|
|
33
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
34
|
+
var ownKeys = function(o) {
|
|
35
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
36
|
+
var ar = [];
|
|
37
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
38
|
+
return ar;
|
|
39
|
+
};
|
|
40
|
+
return ownKeys(o);
|
|
41
|
+
};
|
|
42
|
+
return function (mod) {
|
|
43
|
+
if (mod && mod.__esModule) return mod;
|
|
44
|
+
var result = {};
|
|
45
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
46
|
+
__setModuleDefault(result, mod);
|
|
47
|
+
return result;
|
|
48
|
+
};
|
|
49
|
+
})();
|
|
40
50
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
41
51
|
exports.OrgAccessor = exports.BaseOrgAccessor = void 0;
|
|
42
52
|
const path = __importStar(require("node:path"));
|
package/lib/testSetup.js
CHANGED
|
@@ -35,13 +35,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
35
35
|
}) : function(o, v) {
|
|
36
36
|
o["default"] = v;
|
|
37
37
|
});
|
|
38
|
-
var __importStar = (this && this.__importStar) || function (
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
};
|
|
38
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
39
|
+
var ownKeys = function(o) {
|
|
40
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
41
|
+
var ar = [];
|
|
42
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
43
|
+
return ar;
|
|
44
|
+
};
|
|
45
|
+
return ownKeys(o);
|
|
46
|
+
};
|
|
47
|
+
return function (mod) {
|
|
48
|
+
if (mod && mod.__esModule) return mod;
|
|
49
|
+
var result = {};
|
|
50
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
51
|
+
__setModuleDefault(result, mod);
|
|
52
|
+
return result;
|
|
53
|
+
};
|
|
54
|
+
})();
|
|
45
55
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
46
56
|
exports.MockTestSandboxData = exports.MockTestOrgData = exports.StreamingMockCometClient = exports.StreamingMockCometSubscription = exports.StreamingMockSubscriptionCall = exports.unexpectedResult = exports.restoreContext = exports.stubContext = exports.instantiateContext = exports.TestContext = exports.SecureBuffer = exports.uniqid = void 0;
|
|
47
57
|
exports.shouldThrow = shouldThrow;
|
|
@@ -30,13 +30,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
30
30
|
}) : function(o, v) {
|
|
31
31
|
o["default"] = v;
|
|
32
32
|
});
|
|
33
|
-
var __importStar = (this && this.__importStar) || function (
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
};
|
|
33
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
34
|
+
var ownKeys = function(o) {
|
|
35
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
36
|
+
var ar = [];
|
|
37
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
38
|
+
return ar;
|
|
39
|
+
};
|
|
40
|
+
return ownKeys(o);
|
|
41
|
+
};
|
|
42
|
+
return function (mod) {
|
|
43
|
+
if (mod && mod.__esModule) return mod;
|
|
44
|
+
var result = {};
|
|
45
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
46
|
+
__setModuleDefault(result, mod);
|
|
47
|
+
return result;
|
|
48
|
+
};
|
|
49
|
+
})();
|
|
40
50
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
41
51
|
exports.DirectoryWriter = void 0;
|
|
42
52
|
const node_stream_1 = require("node:stream");
|
package/lib/util/uniqid.js
CHANGED
|
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
25
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
36
|
exports.uniqid = uniqid;
|
|
27
37
|
/*
|
package/lib/webOAuthServer.js
CHANGED
|
@@ -31,13 +31,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
31
31
|
}) : function(o, v) {
|
|
32
32
|
o["default"] = v;
|
|
33
33
|
});
|
|
34
|
-
var __importStar = (this && this.__importStar) || function (
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
};
|
|
34
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
35
|
+
var ownKeys = function(o) {
|
|
36
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
37
|
+
var ar = [];
|
|
38
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
39
|
+
return ar;
|
|
40
|
+
};
|
|
41
|
+
return ownKeys(o);
|
|
42
|
+
};
|
|
43
|
+
return function (mod) {
|
|
44
|
+
if (mod && mod.__esModule) return mod;
|
|
45
|
+
var result = {};
|
|
46
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
47
|
+
__setModuleDefault(result, mod);
|
|
48
|
+
return result;
|
|
49
|
+
};
|
|
50
|
+
})();
|
|
41
51
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
42
52
|
exports.WebServer = exports.WebOAuthServer = exports.DEFAULT_CODE_BUILDER_REDIRECT_URI = void 0;
|
|
43
53
|
const http = __importStar(require("node:http"));
|
package/messages/envVars.md
CHANGED
|
@@ -319,3 +319,7 @@ Your environment has both variables populated, and with different values. The va
|
|
|
319
319
|
# sfCapitalizeRecordTypes
|
|
320
320
|
|
|
321
321
|
Whether record types are capitalized on scratch org creation.
|
|
322
|
+
|
|
323
|
+
# sfSkipScratchOrgCheck
|
|
324
|
+
|
|
325
|
+
Set to "true" to skip the scratch org and sandbox identification check that runs after authenticating an org. When enabled, `sf org login jwt` (and other login commands) will not query existing cached orgs to determine whether the newly authenticated org is a scratch org or sandbox. This can significantly speed up authentication in CI/CD environments with many cached org authorizations.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/core",
|
|
3
|
-
"version": "9.1.
|
|
3
|
+
"version": "9.1.11",
|
|
4
4
|
"description": "Core libraries to interact with SFDX projects, orgs, and APIs.",
|
|
5
5
|
"main": "lib/index",
|
|
6
6
|
"types": "lib/index.d.ts",
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
"dependencies": {
|
|
65
65
|
"@jsforce/jsforce-node": "^3.10.24",
|
|
66
66
|
"@salesforce/kit": "^4.0.0",
|
|
67
|
-
"@salesforce/ts-types": "^3.
|
|
67
|
+
"@salesforce/ts-types": "^3.2.0",
|
|
68
68
|
"ajv": "^8.18.0",
|
|
69
69
|
"change-case": "^4.1.2",
|
|
70
70
|
"fast-levenshtein": "^3.0.0",
|
|
@@ -83,14 +83,14 @@
|
|
|
83
83
|
"zod": "^4.1.12"
|
|
84
84
|
},
|
|
85
85
|
"devDependencies": {
|
|
86
|
-
"@salesforce/dev-scripts": "^
|
|
87
|
-
"@salesforce/ts-sinon": "^1.4.
|
|
86
|
+
"@salesforce/dev-scripts": "^14.0.0",
|
|
87
|
+
"@salesforce/ts-sinon": "^1.4.36",
|
|
88
88
|
"@types/benchmark": "^2.1.5",
|
|
89
89
|
"@types/chai": "^4.3.17",
|
|
90
90
|
"@types/fast-levenshtein": "^0.0.4",
|
|
91
91
|
"@types/jsonwebtoken": "9.0.10",
|
|
92
92
|
"@types/mocha": "^10.0.10",
|
|
93
|
-
"@types/node": "^
|
|
93
|
+
"@types/node": "^26.4.0",
|
|
94
94
|
"@types/proper-lockfile": "^4.1.4",
|
|
95
95
|
"@types/semver": "^7.7.1",
|
|
96
96
|
"@types/sinon": "^10.0.20",
|
|
@@ -101,7 +101,7 @@
|
|
|
101
101
|
"mocha": "^11.7.5",
|
|
102
102
|
"ts-node": "^10.9.2",
|
|
103
103
|
"ts-patch": "^3.3.0",
|
|
104
|
-
"typescript": "^
|
|
104
|
+
"typescript": "^6.0.3"
|
|
105
105
|
},
|
|
106
106
|
"resolutions": {
|
|
107
107
|
"@jsforce/jsforce-node/node-fetch/whatwg-url": "^14.0.0"
|