-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #104 from Terreii/new-init
New init
- Loading branch information
Showing
28 changed files
with
25,559 additions
and
374 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -57,8 +57,5 @@ typings/ | |
# dotenv environment variables file | ||
.env | ||
|
||
# NPM package-lock | ||
package-lock.json | ||
|
||
# Hoodie | ||
.hoodie |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# Snyk (https://snyk.io) policy file, patches or ignores known vulnerabilities. | ||
version: v1.14.1 | ||
ignore: {} | ||
# patches apply the minimum changes required to fix a vulnerability | ||
patch: | ||
SNYK-JS-LODASH-567746: | ||
- lodash: | ||
patched: '2020-05-01T06:47:06.828Z' | ||
- '@hoodie/store-client > lodash': | ||
patched: '2020-05-01T06:47:06.828Z' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,8 @@ | |
"alex": { | ||
"allow": [ | ||
reject, | ||
rejects | ||
rejects, | ||
special | ||
] | ||
}, | ||
"common-misspellings": true, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,44 @@ | ||
module.exports = require('./hoodie/client') | ||
'use strict' | ||
|
||
module.exports = CryptoStore | ||
|
||
var bindFunctions = require('./lib/bind-functions') | ||
|
||
function CryptoStore (store, options) { | ||
if (!(this instanceof CryptoStore)) return new CryptoStore(store, options) | ||
|
||
var withIdPrefixStore = {} // store prefix APIs from hoodie-store. Workaround for #42 | ||
|
||
var state = { | ||
getWithPrefixAPI: function (prefix) { // get a prefix API. This is a workaround for #42 | ||
if (prefix == null) { | ||
return store | ||
} | ||
|
||
if (prefix in withIdPrefixStore) { | ||
return withIdPrefixStore[prefix] | ||
} | ||
|
||
withIdPrefixStore[prefix] = store.withIdPrefix(prefix) | ||
return withIdPrefixStore[prefix] | ||
}, | ||
noPasswordCheckAutoFix: options != null && Boolean(options.noPasswordCheckAutoFix) | ||
} | ||
|
||
if (state.noPasswordCheckAutoFix) { | ||
console.warn( | ||
'Salt doc without a password check is deprecated!\n\n' + | ||
'Read more at https://github.com/Terreii/hoodie-plugin-store-crypto/' + | ||
'blob/latest/docs/update.md#v3-update-notes' | ||
) | ||
} | ||
|
||
var handler = { | ||
on: store.on, | ||
once: store.one, | ||
removeListener: store.off | ||
} | ||
|
||
const api = bindFunctions(store, state, null, handler, true) | ||
Object.assign(this, api) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.