@salesforce/core 8.8.3-dev.0 → 8.8.4
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/org/authInfo.js +0 -8
- package/lib/util/fileLocking.js +2 -16
- package/package.json +2 -2
package/lib/org/authInfo.js
CHANGED
|
@@ -774,7 +774,6 @@ class AuthInfo extends kit_1.AsyncOptionalCreatable {
|
|
|
774
774
|
// sequentially, in probabilistic order
|
|
775
775
|
// eslint-disable-next-line no-await-in-loop
|
|
776
776
|
authFieldsBuilder = await this.tryJwtAuth(options.clientId, login, audience, privateKeyContents);
|
|
777
|
-
this.logger.debug(`authFieldsBuilder response for ${login} | ${audience}: ${JSON.stringify(authFieldsBuilder, null, 2)}`);
|
|
778
777
|
break;
|
|
779
778
|
}
|
|
780
779
|
catch (err) {
|
|
@@ -820,13 +819,6 @@ class AuthInfo extends kit_1.AsyncOptionalCreatable {
|
|
|
820
819
|
}, privateKeyContents, {
|
|
821
820
|
algorithm: 'RS256',
|
|
822
821
|
});
|
|
823
|
-
this.logger.debug(`JWT payload: ${JSON.stringify({
|
|
824
|
-
iss: clientId,
|
|
825
|
-
sub: this.getUsername(),
|
|
826
|
-
aud: audienceUrl,
|
|
827
|
-
}, null, 2)}`);
|
|
828
|
-
this.logger.debug(`JWT token: ${os.EOL + jwtToken + os.EOL}`);
|
|
829
|
-
this.logger.debug(`loginUrl: ${loginUrl}`);
|
|
830
822
|
const oauth2 = new jsforce_node_1.OAuth2({ loginUrl });
|
|
831
823
|
return (0, ts_types_1.ensureJsonMap)(await oauth2.requestToken({
|
|
832
824
|
// eslint-disable-next-line camelcase
|
package/lib/util/fileLocking.js
CHANGED
|
@@ -55,14 +55,7 @@ const lockInit = async (filePath) => {
|
|
|
55
55
|
catch (err) {
|
|
56
56
|
throw sfError_1.SfError.wrap(err);
|
|
57
57
|
}
|
|
58
|
-
const
|
|
59
|
-
? // if the file exists, wait for it to be unlocked
|
|
60
|
-
[(0, proper_lockfile_1.lock)(filePath, lockRetryOptions_1.lockRetryOptions)]
|
|
61
|
-
: // lock the entire directory to keep others from trying to create the file while we are
|
|
62
|
-
[
|
|
63
|
-
(0, proper_lockfile_1.lock)((0, node_path_1.dirname)(filePath), lockRetryOptions_1.lockRetryOptions),
|
|
64
|
-
(await logger_1.Logger.child('fileLocking.lockInit')).debug(`No file found at ${filePath}. Write will create it. Locking the entire directory until file is written.`),
|
|
65
|
-
]);
|
|
58
|
+
const unlock = await (0, proper_lockfile_1.lock)(filePath, { ...lockRetryOptions_1.lockRetryOptions, realpath: false });
|
|
66
59
|
return {
|
|
67
60
|
writeAndUnlock: async (data) => {
|
|
68
61
|
const logger = await logger_1.Logger.child('fileLocking.writeAndUnlock');
|
|
@@ -90,14 +83,7 @@ const lockInitSync = (filePath) => {
|
|
|
90
83
|
catch (err) {
|
|
91
84
|
throw sfError_1.SfError.wrap(err);
|
|
92
85
|
}
|
|
93
|
-
const
|
|
94
|
-
? // if the file exists, wait for it to be unlocked
|
|
95
|
-
[(0, proper_lockfile_1.lockSync)(filePath, lockRetryOptions_1.lockOptions)]
|
|
96
|
-
: // lock the entire directory to keep others from trying to create the file while we are
|
|
97
|
-
[
|
|
98
|
-
(0, proper_lockfile_1.lockSync)((0, node_path_1.dirname)(filePath), lockRetryOptions_1.lockOptions),
|
|
99
|
-
logger_1.Logger.childFromRoot('fileLocking.lockInit').debug(`No file found at ${filePath}. Write will create it. Locking the entire directory until file is written.`),
|
|
100
|
-
];
|
|
86
|
+
const unlock = (0, proper_lockfile_1.lockSync)(filePath, { ...lockRetryOptions_1.lockOptions, realpath: false });
|
|
101
87
|
return {
|
|
102
88
|
writeAndUnlock: (data) => {
|
|
103
89
|
const logger = logger_1.Logger.childFromRoot('fileLocking.writeAndUnlock');
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/core",
|
|
3
|
-
"version": "8.8.
|
|
3
|
+
"version": "8.8.4",
|
|
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",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"messageTransformer/messageTransformer.ts"
|
|
54
54
|
],
|
|
55
55
|
"dependencies": {
|
|
56
|
-
"@jsforce/jsforce-node": "^3.6.
|
|
56
|
+
"@jsforce/jsforce-node": "^3.6.5",
|
|
57
57
|
"@salesforce/kit": "^3.2.2",
|
|
58
58
|
"@salesforce/schemas": "^1.9.0",
|
|
59
59
|
"@salesforce/ts-types": "^2.0.10",
|