@salesforce/core 6.4.6 → 6.4.7
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/authInfoConfig.js +1 -1
- package/lib/config/configStore.js +2 -2
- package/lib/global.js +4 -1
- package/lib/logger/logger.js +1 -5
- package/lib/org/authInfo.js +1 -1
- package/lib/org/user.js +1 -1
- package/lib/schema/validator.js +1 -1
- package/package.json +3 -3
|
@@ -45,7 +45,7 @@ class BaseConfigStore extends kit_1.AsyncOptionalCreatable {
|
|
|
45
45
|
const rawValue = this.contents.get(key);
|
|
46
46
|
if (this.hasEncryption() && decrypt) {
|
|
47
47
|
if ((0, ts_types_2.isJsonMap)(rawValue)) {
|
|
48
|
-
return this.recursiveDecrypt((
|
|
48
|
+
return this.recursiveDecrypt(structuredClone(rawValue), key);
|
|
49
49
|
}
|
|
50
50
|
else if (this.isCryptoKey(key)) {
|
|
51
51
|
return this.decrypt(rawValue);
|
|
@@ -163,7 +163,7 @@ class BaseConfigStore extends kit_1.AsyncOptionalCreatable {
|
|
|
163
163
|
*/
|
|
164
164
|
getContents(decrypt = false) {
|
|
165
165
|
if (this.hasEncryption() && decrypt) {
|
|
166
|
-
return this.recursiveDecrypt((
|
|
166
|
+
return this.recursiveDecrypt(structuredClone(this.contents?.value ?? {}));
|
|
167
167
|
}
|
|
168
168
|
return this.contents?.value ?? {};
|
|
169
169
|
}
|
package/lib/global.js
CHANGED
|
@@ -59,7 +59,10 @@ class Global {
|
|
|
59
59
|
* ```
|
|
60
60
|
*/
|
|
61
61
|
static getEnvironmentMode() {
|
|
62
|
-
|
|
62
|
+
const envValue = kit_1.env.getString('SF_ENV') ?? kit_1.env.getString('SFDX_ENV', Mode.PRODUCTION);
|
|
63
|
+
return envValue in Mode || envValue.toUpperCase() in Mode
|
|
64
|
+
? Mode[envValue.toUpperCase()]
|
|
65
|
+
: Mode.PRODUCTION;
|
|
63
66
|
}
|
|
64
67
|
/**
|
|
65
68
|
* Creates a directory within {@link Global.SFDX_DIR}, or {@link Global.SFDX_DIR} itself if the `dirPath` param
|
package/lib/logger/logger.js
CHANGED
|
@@ -94,10 +94,7 @@ class Logger {
|
|
|
94
94
|
};
|
|
95
95
|
if (Boolean(options.useMemoryLogger) || global_1.Global.getEnvironmentMode() === global_1.Mode.TEST || !enabled) {
|
|
96
96
|
this.memoryLogger = new memoryLogger_1.MemoryLogger();
|
|
97
|
-
this.pinoLogger = (0, pino_1.pino)(
|
|
98
|
-
...commonOptions,
|
|
99
|
-
sync: true,
|
|
100
|
-
}, this.memoryLogger);
|
|
97
|
+
this.pinoLogger = (0, pino_1.pino)(commonOptions, this.memoryLogger);
|
|
101
98
|
}
|
|
102
99
|
else {
|
|
103
100
|
this.pinoLogger = (0, pino_1.pino)({
|
|
@@ -110,7 +107,6 @@ class Logger {
|
|
|
110
107
|
getWriteStream(level),
|
|
111
108
|
],
|
|
112
109
|
},
|
|
113
|
-
sync: false,
|
|
114
110
|
});
|
|
115
111
|
// when a new file logger root is instantiated, we check for old log files.
|
|
116
112
|
// but we don't want to wait for it
|
package/lib/org/authInfo.js
CHANGED
|
@@ -623,7 +623,7 @@ class AuthInfo extends kit_1.AsyncOptionalCreatable {
|
|
|
623
623
|
// If options were passed, use those before checking cache and reading an auth file.
|
|
624
624
|
let authConfig;
|
|
625
625
|
if (options) {
|
|
626
|
-
options = (
|
|
626
|
+
options = structuredClone(options);
|
|
627
627
|
if (this.isTokenOptions(options)) {
|
|
628
628
|
authConfig = options;
|
|
629
629
|
const userInfo = await this.retrieveUserInfo((0, ts_types_1.ensureString)(options.instanceUrl), (0, ts_types_1.ensureString)(options.accessToken));
|
package/lib/org/user.js
CHANGED
|
@@ -362,7 +362,7 @@ class User extends kit_1.AsyncCreatable {
|
|
|
362
362
|
name: {
|
|
363
363
|
familyName: fields.lastName,
|
|
364
364
|
},
|
|
365
|
-
nickName: fields.username.substring(0, 40),
|
|
365
|
+
nickName: fields.username.substring(0, 40), // nickName has a max length of 40
|
|
366
366
|
entitlements: [
|
|
367
367
|
{
|
|
368
368
|
value: fields.profileId,
|
package/lib/schema/validator.js
CHANGED
|
@@ -97,7 +97,7 @@ class SchemaValidator {
|
|
|
97
97
|
const validate = ajv.compile(schema);
|
|
98
98
|
// AJV will modify the original json object. We need to make a clone of the
|
|
99
99
|
// json to keep this backwards compatible with JSEN functionality
|
|
100
|
-
const jsonClone =
|
|
100
|
+
const jsonClone = structuredClone(json);
|
|
101
101
|
const valid = validate(jsonClone);
|
|
102
102
|
if (!valid) {
|
|
103
103
|
if (validate.errors) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/core",
|
|
3
|
-
"version": "6.4.
|
|
3
|
+
"version": "6.4.7",
|
|
4
4
|
"description": "Core libraries to interact with SFDX projects, orgs, and APIs.",
|
|
5
5
|
"main": "lib/exported",
|
|
6
6
|
"types": "lib/exported.d.ts",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"jsforce": "^2.0.0-beta.29",
|
|
51
51
|
"jsonwebtoken": "9.0.2",
|
|
52
52
|
"jszip": "3.10.1",
|
|
53
|
-
"pino": "^8.
|
|
53
|
+
"pino": "^8.17.2",
|
|
54
54
|
"pino-abstract-transport": "^1.1.0",
|
|
55
55
|
"pino-pretty": "^10.3.1",
|
|
56
56
|
"proper-lockfile": "^4.1.2",
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
"chai-string": "^1.5.0",
|
|
69
69
|
"ts-node": "^10.9.2",
|
|
70
70
|
"ts-patch": "^3.1.1",
|
|
71
|
-
"typescript": "^5.
|
|
71
|
+
"typescript": "^5.3.3"
|
|
72
72
|
},
|
|
73
73
|
"repository": {
|
|
74
74
|
"type": "git",
|