npm package diff
Package: @forge/cli-shared
Versions: 8.3.0-next.0-experimental-8a53773 - 8.3.0-next.2
File: package/out/auth/personal/credential-store.js
Index: package/out/auth/personal/credential-store.js
===================================================================
--- package/out/auth/personal/credential-store.js
+++ package/out/auth/personal/credential-store.js
@@ -60,9 +60,8 @@
keytar;
cachedConfig;
userRepository;
keytarAccount;
- cached = null;
constructor(logger, instructionsURL, keytar, cachedConfig, userRepository) {
this.logger = logger;
this.instructionsURL = instructionsURL;
this.keytar = keytar;
@@ -130,11 +129,8 @@
deleteInsecurePlaintextCredentials() {
this.cachedConfig.delete(CACHE_CREDENTIALS_KEY);
}
async getCredentials() {
- if (this.cached) {
- return this.cached;
- }
const plaintextCredentials = this.popInsecurePlaintextCredentials();
if (plaintextCredentials) {
if (this.keytar) {
await this.setCredentials(plaintextCredentials);
@@ -154,16 +150,14 @@
}
if (this.keytar) {
const result = await this.getCredentialsKeytar(this.keytar);
if (result) {
- this.cached = result;
return result;
}
}
throw new NoTokenInStoreError();
}
async setCredentials(credentials) {
- this.cached = null;
if (this.keytar) {
try {
await this.keytar.setPassword(KEYTAR_SERVICE, this.keytarAccount, JSON.stringify(credentials));
}
@@ -175,9 +169,8 @@
throw new NoKeytarError();
}
}
async deleteCredentials() {
- this.cached = null;
if (this.keytar) {
try {
await this.keytar.deletePassword(KEYTAR_SERVICE, this.keytarAccount);
}