monoidentity 0.16.1 → 0.16.2

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.
Files changed (2) hide show
  1. package/dist/storage.js +4 -1
  2. package/package.json +1 -1
package/dist/storage.js CHANGED
@@ -43,5 +43,8 @@ export const setVerification = (jwt) => {
43
43
  const client = storageClient();
44
44
  client[VERIFICATION_PATH] = jwt;
45
45
  };
46
- export const getStorage = (realm) => storageClient((key) => `.${realm}/${app}/${key}.devalue`, undefined, stringify, parse);
46
+ export const getStorage = (realm) => {
47
+ const prefix = `.${realm}/${app}/`;
48
+ return storageClient((key) => `${prefix}${key}.devalue`, (key) => (key.startsWith(prefix) ? key.slice(prefix.length, -".devalue".length) : undefined), stringify, parse);
49
+ };
47
50
  export const getScopedFS = (dir) => storageClient((key) => `${dir}/${key}`, (key) => (key.startsWith(dir + "/") ? key.slice(dir.length + 1) : undefined));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "monoidentity",
3
- "version": "0.16.1",
3
+ "version": "0.16.2",
4
4
  "license": "ISC",
5
5
  "repository": "KTibow/monoidentity",
6
6
  "author": {