@salesforce/core 3.19.3 → 3.19.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/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [3.19.4](https://github.com/forcedotcom/sfdx-core/compare/v3.19.3...v3.19.4) (2022-06-06)
|
|
6
|
+
|
|
7
|
+
### Bug Fixes
|
|
8
|
+
|
|
9
|
+
- add stat method to OrgAccessor ([f4e297c](https://github.com/forcedotcom/sfdx-core/commit/f4e297c576647b32be62621377d6e3fc5c8dc5f1))
|
|
10
|
+
|
|
5
11
|
### [3.19.3](https://github.com/forcedotcom/sfdx-core/compare/v3.19.2...v3.19.3) (2022-06-06)
|
|
6
12
|
|
|
7
13
|
### [3.19.2](https://github.com/forcedotcom/sfdx-core/compare/v3.19.1...v3.19.2) (2022-06-02)
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import * as fs from 'fs';
|
|
1
3
|
import { JsonMap, Nullable, Optional } from '@salesforce/ts-types';
|
|
2
4
|
import { AsyncOptionalCreatable } from '@salesforce/kit';
|
|
3
5
|
import { AuthInfoConfig } from '../../config/authInfoConfig';
|
|
@@ -29,6 +31,7 @@ export declare abstract class BaseOrgAccessor<T extends ConfigFile, P extends Co
|
|
|
29
31
|
getAll(decrypt?: boolean): P[];
|
|
30
32
|
has(username: string): boolean;
|
|
31
33
|
exists(username: string): Promise<boolean>;
|
|
34
|
+
stat(username: string): Promise<Nullable<fs.Stats>>;
|
|
32
35
|
hasFile(username: string): Promise<boolean>;
|
|
33
36
|
list(): Promise<string[]>;
|
|
34
37
|
set(username: string, org: P): void;
|
|
@@ -105,6 +105,10 @@ class BaseOrgAccessor extends kit_1.AsyncOptionalCreatable {
|
|
|
105
105
|
const config = this.configs.get(username);
|
|
106
106
|
return config ? await config.exists() : false;
|
|
107
107
|
}
|
|
108
|
+
async stat(username) {
|
|
109
|
+
const config = this.configs.get(username);
|
|
110
|
+
return config ? await config.stat() : null;
|
|
111
|
+
}
|
|
108
112
|
async hasFile(username) {
|
|
109
113
|
try {
|
|
110
114
|
await fs.promises.access(this.parseFilename(username));
|