Skip to content

Commit

Permalink
feat: update secret to async
Browse files Browse the repository at this point in the history
  • Loading branch information
@jotadeveloper authored and sergiohgz committed Jul 31, 2019
1 parent 92132c7 commit 9bcab19
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 8 deletions.
2 changes: 1 addition & 1 deletion plugins/memory/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"@commitlint/cli": "6.0.2",
"@commitlint/config-conventional": "6.0.4",
"@commitlint/travis-cli": "6.0.2",
"@verdaccio/types": "2.1.0",
"@verdaccio/types": "2.2.0",
"babel-cli": "6.26.0",
"babel-core": "6.26.0",
"babel-eslint": "8.2.3",
Expand Down
11 changes: 7 additions & 4 deletions plugins/memory/src/local-memory.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,15 @@ class LocalMemory implements ILocalData {
this.data = this._createEmtpyDatabase();
}

getSecret(): string {
return this.data.secret;
getSecret(): Promise<any> {
return Promise.resolve(this.data.secret);
}

setSecret(secret: string) {
this.data.secret = secret;
setSecret(secret: string): Promise<any> {
return new Promise((resolve, reject) => {
this.data.secret = secret;
resolve(null);
});
}

add(name: string, cb: Callback) {
Expand Down
6 changes: 3 additions & 3 deletions plugins/memory/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -218,9 +218,9 @@
version "1.0.0"
resolved "https://registry.npmjs.org/@verdaccio/streams/-/streams-1.0.0.tgz#d5d24c6747208728b9fd16b908e3932c3fb1f864"

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

JSONStream@^1.0.4:
version "1.3.2"
Expand Down

0 comments on commit 9bcab19

Please sign in to comment.