Skip to content

Commit 9bcab19

Browse files
@jotadevelopersergiohgz
authored andcommitted
feat: update secret to async
1 parent 92132c7 commit 9bcab19

File tree

3 files changed

+11
-8
lines changed

3 files changed

+11
-8
lines changed

plugins/memory/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"@commitlint/cli": "6.0.2",
2424
"@commitlint/config-conventional": "6.0.4",
2525
"@commitlint/travis-cli": "6.0.2",
26-
"@verdaccio/types": "2.1.0",
26+
"@verdaccio/types": "2.2.0",
2727
"babel-cli": "6.26.0",
2828
"babel-core": "6.26.0",
2929
"babel-eslint": "8.2.3",

plugins/memory/src/local-memory.js

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,15 @@ class LocalMemory implements ILocalData {
2323
this.data = this._createEmtpyDatabase();
2424
}
2525

26-
getSecret(): string {
27-
return this.data.secret;
26+
getSecret(): Promise<any> {
27+
return Promise.resolve(this.data.secret);
2828
}
2929

30-
setSecret(secret: string) {
31-
this.data.secret = secret;
30+
setSecret(secret: string): Promise<any> {
31+
return new Promise((resolve, reject) => {
32+
this.data.secret = secret;
33+
resolve(null);
34+
});
3235
}
3336

3437
add(name: string, cb: Callback) {

plugins/memory/yarn.lock

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -218,9 +218,9 @@
218218
version "1.0.0"
219219
resolved "https://registry.npmjs.org/@verdaccio/streams/-/streams-1.0.0.tgz#d5d24c6747208728b9fd16b908e3932c3fb1f864"
220220

221-
"@verdaccio/types@2.1.0":
222-
version "2.1.0"
223-
resolved "https://registry.npmjs.org/@verdaccio/types/-/types-2.1.0.tgz#1a0b330f96bc63fbc87391c2b5c625fd3be5da84"
221+
"@verdaccio/types@2.2.0":
222+
version "2.2.0"
223+
resolved "https://registry.npmjs.org/@verdaccio/types/-/types-2.2.0.tgz#4d931867b0f02e2e939beedcb8a44a60d02e62ce"
224224

225225
JSONStream@^1.0.4:
226226
version "1.3.2"

0 commit comments

Comments
 (0)