@kvs/memorystorage 1.1.0 → 2.1.0
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.
- package/README.md +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.js +7 -12
- package/lib/index.js.map +1 -1
- package/module/index.d.ts +1 -1
- package/module/index.js +6 -12
- package/module/index.js.map +1 -1
- package/package.json +8 -9
- package/CHANGELOG.md +0 -58
package/README.md
CHANGED
package/lib/index.d.ts
CHANGED
|
@@ -7,4 +7,4 @@ export declare type KvsMemoryStorage<Schema extends KvsMemoryStorageSchema> = KV
|
|
|
7
7
|
export declare type KvsMemoryStorageOptions<Schema extends KvsMemoryStorageSchema> = KVSOptions<Schema> & {
|
|
8
8
|
kvsVersionKey?: string;
|
|
9
9
|
};
|
|
10
|
-
export declare const kvsMemoryStorage: <Schema extends KvsMemoryStorageSchema>(options: KvsMemoryStorageOptions<Schema>) => Promise<
|
|
10
|
+
export declare const kvsMemoryStorage: <Schema extends KvsMemoryStorageSchema>(options: KvsMemoryStorageOptions<Schema>) => Promise<KvsStorage<Schema>>;
|
package/lib/index.js
CHANGED
|
@@ -1,13 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
2
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
4
|
};
|
|
@@ -17,7 +8,11 @@ const storage_1 = require("@kvs/storage");
|
|
|
17
8
|
// @ts-ignore
|
|
18
9
|
// import localstorage from "localstorage-memory";
|
|
19
10
|
const localstorage_memory_1 = __importDefault(require("./localstorage-memory"));
|
|
20
|
-
|
|
21
|
-
return storage_1.kvsStorage(
|
|
22
|
-
|
|
11
|
+
const kvsMemoryStorage = async (options) => {
|
|
12
|
+
return (0, storage_1.kvsStorage)({
|
|
13
|
+
...options,
|
|
14
|
+
storage: localstorage_memory_1.default
|
|
15
|
+
});
|
|
16
|
+
};
|
|
17
|
+
exports.kvsMemoryStorage = kvsMemoryStorage;
|
|
23
18
|
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;AAAA,0CAAiE;AAEjE,aAAa;AACb,kDAAkD;AAClD,gFAAiD;AAS1C,MAAM,gBAAgB,GAAG,KAAK,EACjC,OAAwC,EACb,EAAE;IAC7B,OAAO,IAAA,oBAAU,EAAC;QACd,GAAG,OAAO;QACV,OAAO,EAAE,6BAAY;KACxB,CAAC,CAAC;AACP,CAAC,CAAC;AAPW,QAAA,gBAAgB,oBAO3B"}
|
package/module/index.d.ts
CHANGED
|
@@ -7,4 +7,4 @@ export declare type KvsMemoryStorage<Schema extends KvsMemoryStorageSchema> = KV
|
|
|
7
7
|
export declare type KvsMemoryStorageOptions<Schema extends KvsMemoryStorageSchema> = KVSOptions<Schema> & {
|
|
8
8
|
kvsVersionKey?: string;
|
|
9
9
|
};
|
|
10
|
-
export declare const kvsMemoryStorage: <Schema extends KvsMemoryStorageSchema>(options: KvsMemoryStorageOptions<Schema>) => Promise<
|
|
10
|
+
export declare const kvsMemoryStorage: <Schema extends KvsMemoryStorageSchema>(options: KvsMemoryStorageOptions<Schema>) => Promise<KvsStorage<Schema>>;
|
package/module/index.js
CHANGED
|
@@ -1,17 +1,11 @@
|
|
|
1
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
-
});
|
|
9
|
-
};
|
|
10
1
|
import { kvsStorage } from "@kvs/storage";
|
|
11
2
|
// @ts-ignore
|
|
12
3
|
// import localstorage from "localstorage-memory";
|
|
13
4
|
import localstorage from "./localstorage-memory";
|
|
14
|
-
export const kvsMemoryStorage = (options) =>
|
|
15
|
-
return kvsStorage(
|
|
16
|
-
|
|
5
|
+
export const kvsMemoryStorage = async (options) => {
|
|
6
|
+
return kvsStorage({
|
|
7
|
+
...options,
|
|
8
|
+
storage: localstorage
|
|
9
|
+
});
|
|
10
|
+
};
|
|
17
11
|
//# sourceMappingURL=index.js.map
|
package/module/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAyB,UAAU,EAAE,MAAM,cAAc,CAAC;AAEjE,aAAa;AACb,kDAAkD;AAClD,OAAO,YAAY,MAAM,uBAAuB,CAAC;AASjD,MAAM,CAAC,MAAM,gBAAgB,GAAG,KAAK,EACjC,OAAwC,EACb,EAAE;IAC7B,OAAO,UAAU,CAAC;QACd,GAAG,OAAO;QACV,OAAO,EAAE,YAAY;KACxB,CAAC,CAAC;AACP,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kvs/memorystorage",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.1.0",
|
|
4
4
|
"description": "Node.js localstorage for KVS.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"kvs",
|
|
@@ -46,18 +46,17 @@
|
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"@jsdevtools/karma-config": "^3.1.7",
|
|
49
|
-
"@kvs/common-test-case": "^
|
|
50
|
-
"@types/mocha": "^
|
|
51
|
-
"@types/node": "^
|
|
52
|
-
"
|
|
53
|
-
"mocha": "^8.1.1",
|
|
49
|
+
"@kvs/common-test-case": "^2.1.0",
|
|
50
|
+
"@types/mocha": "^9.0.0",
|
|
51
|
+
"@types/node": "^16.9.1",
|
|
52
|
+
"mocha": "^9.1.1",
|
|
54
53
|
"prettier": "^2.0.5",
|
|
55
54
|
"rimraf": "^3.0.2",
|
|
56
|
-
"ts-loader": "^8.0
|
|
57
|
-
"typescript": "^
|
|
55
|
+
"ts-loader": "^8.2.0",
|
|
56
|
+
"typescript": "^4.2.4"
|
|
58
57
|
},
|
|
59
58
|
"publishConfig": {
|
|
60
59
|
"access": "public"
|
|
61
60
|
},
|
|
62
|
-
"gitHead": "
|
|
61
|
+
"gitHead": "ac9e606e7952f1fd69b2bbf27671d068cb71ade8"
|
|
63
62
|
}
|
package/CHANGELOG.md
DELETED
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
# Change Log
|
|
2
|
-
|
|
3
|
-
All notable changes to this project will be documented in this file.
|
|
4
|
-
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
|
-
|
|
6
|
-
# [1.1.0](https://github.com/azu/kvs/compare/v1.0.0...v1.1.0) (2020-10-29)
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
### Features
|
|
10
|
-
|
|
11
|
-
* drop localstorage-memory ([#15](https://github.com/azu/kvs/issues/15)) ([75c66a8](https://github.com/azu/kvs/commit/75c66a866260bd337f7a3146557fea0356fda2d2))
|
|
12
|
-
* **examples:** add basic example ([#14](https://github.com/azu/kvs/issues/14)) ([351215d](https://github.com/azu/kvs/commit/351215d6c04158201768036caaa6e792c72717ea))
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
# [1.0.0](https://github.com/azu/kvs/compare/v0.3.1...v1.0.0) (2020-08-22)
|
|
19
|
-
|
|
20
|
-
**Note:** Version bump only for package @kvs/memorystorage
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
# [0.3.0](https://github.com/azu/kvs/compare/v0.2.1...v0.3.0) (2020-08-22)
|
|
27
|
-
|
|
28
|
-
**Note:** Version bump only for package @kvs/memorystorage
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
## [0.2.1](https://github.com/azu/kvs/compare/v0.2.0...v0.2.1) (2020-08-22)
|
|
35
|
-
|
|
36
|
-
**Note:** Version bump only for package @kvs/memorystorage
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
# [0.2.0](https://github.com/azu/kvs/compare/v0.1.0...v0.2.0) (2020-08-08)
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
### Features
|
|
46
|
-
|
|
47
|
-
* **@kvs/memorystorage:** migrate to Schema type ([84d75f4](https://github.com/azu/kvs/commit/84d75f4407b33119da6d4745adea611f2b80404e))
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
# 0.1.0 (2020-08-08)
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
### Features
|
|
57
|
-
|
|
58
|
-
* **@kvs/memorystorage:** add in memory implementation ([553247b](https://github.com/azu/kvs/commit/553247b76a8bbacb03deaee4cfd3b787d74ecd65))
|