koatty_store 1.5.5 → 1.5.8

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/CHANGELOG.md CHANGED
@@ -2,6 +2,15 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ### [1.5.8](https://github.com/koatty/koatty_store/compare/v1.5.6...v1.5.8) (2023-01-13)
6
+
7
+ ### [1.5.6](https://github.com/koatty/koatty_store/compare/v1.5.5...v1.5.6) (2022-11-03)
8
+
9
+
10
+ ### Bug Fixes
11
+
12
+ * upgrade deps ([cf54da2](https://github.com/koatty/koatty_store/commit/cf54da2c9e13ba843efa44b4631f3144946ebdff))
13
+
5
14
  ### [1.5.5](https://github.com/koatty/koatty_store/compare/v1.5.4...v1.5.5) (2022-05-27)
6
15
 
7
16
  ### [1.5.4](https://github.com/koatty/koatty_store/compare/v1.5.2...v1.5.4) (2021-12-02)
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * @Author: richen
3
- * @Date: 2022-05-27 10:34:41
3
+ * @Date: 2023-01-13 12:11:54
4
4
  * @License: BSD (3-Clause)
5
5
  * @Copyright (c) - <richenlin(at)gmail.com>
6
6
  * @HomePage: https://koatty.org/
package/dist/index.js CHANGED
@@ -1,14 +1,12 @@
1
1
  /*!
2
2
  * @Author: richen
3
- * @Date: 2022-05-27 10:34:28
3
+ * @Date: 2023-01-13 12:11:39
4
4
  * @License: BSD (3-Clause)
5
5
  * @Copyright (c) - <richenlin(at)gmail.com>
6
6
  * @HomePage: https://koatty.org/
7
7
  */
8
8
  'use strict';
9
9
 
10
- Object.defineProperty(exports, '__esModule', { value: true });
11
-
12
10
  var lodash = require('lodash');
13
11
  var helper = require('koatty_lib');
14
12
  var events = require('events');
@@ -16,36 +14,31 @@ var koatty_logger = require('koatty_logger');
16
14
  var IORedis = require('ioredis');
17
15
  var genericPool = require('generic-pool');
18
16
 
19
- function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
20
-
21
- function _interopNamespace(e) {
22
- if (e && e.__esModule) return e;
23
- var n = Object.create(null);
24
- if (e) {
25
- Object.keys(e).forEach(function (k) {
26
- if (k !== 'default') {
27
- var d = Object.getOwnPropertyDescriptor(e, k);
28
- Object.defineProperty(n, k, d.get ? d : {
29
- enumerable: true,
30
- get: function () { return e[k]; }
31
- });
32
- }
17
+ function _interopNamespaceDefault(e) {
18
+ var n = Object.create(null);
19
+ if (e) {
20
+ Object.keys(e).forEach(function (k) {
21
+ if (k !== 'default') {
22
+ var d = Object.getOwnPropertyDescriptor(e, k);
23
+ Object.defineProperty(n, k, d.get ? d : {
24
+ enumerable: true,
25
+ get: function () { return e[k]; }
33
26
  });
34
- }
35
- n["default"] = e;
36
- return Object.freeze(n);
27
+ }
28
+ });
29
+ }
30
+ n.default = e;
31
+ return Object.freeze(n);
37
32
  }
38
33
 
39
- var helper__namespace = /*#__PURE__*/_interopNamespace(helper);
40
- var IORedis__default = /*#__PURE__*/_interopDefaultLegacy(IORedis);
41
- var genericPool__default = /*#__PURE__*/_interopDefaultLegacy(genericPool);
34
+ var helper__namespace = /*#__PURE__*/_interopNamespaceDefault(helper);
42
35
 
43
36
  /*
44
37
  * @Description:
45
38
  * @Usage:
46
39
  * @Author: richen
47
40
  * @Date: 2021-12-02 15:26:55
48
- * @LastEditTime: 2021-12-02 15:33:22
41
+ * @LastEditTime: 2023-01-13 11:25:37
49
42
  */
50
43
  /**
51
44
  *
@@ -424,7 +417,7 @@ class CacheStore {
424
417
  * @Usage:
425
418
  * @Author: richen
426
419
  * @Date: 2021-12-02 11:03:20
427
- * @LastEditTime: 2021-12-02 14:36:11
420
+ * @LastEditTime: 2023-01-13 11:25:09
428
421
  */
429
422
  /**
430
423
  *
@@ -1566,7 +1559,7 @@ class MemoryCache extends events.EventEmitter {
1566
1559
  * @Usage:
1567
1560
  * @Author: richen
1568
1561
  * @Date: 2021-06-29 19:07:57
1569
- * @LastEditTime: 2021-12-02 15:30:12
1562
+ * @LastEditTime: 2023-01-13 11:25:19
1570
1563
  */
1571
1564
  class MemoryStore extends CacheStore {
1572
1565
  /**
@@ -1738,10 +1731,10 @@ class RedisStore extends CacheStore {
1738
1731
  const defer = helper__namespace.getDefer();
1739
1732
  let connection;
1740
1733
  if (!helper__namespace.isEmpty(this.options.clusters)) {
1741
- connection = new IORedis__default["default"].Cluster([...this.options.clusters], { redisOptions: this.options });
1734
+ connection = new IORedis.Cluster([...this.options.clusters], { redisOptions: this.options });
1742
1735
  }
1743
1736
  else {
1744
- connection = new IORedis__default["default"](this.options);
1737
+ connection = new IORedis(this.options);
1745
1738
  }
1746
1739
  connection.on('end', () => {
1747
1740
  if (connNum < 3) {
@@ -1778,7 +1771,7 @@ class RedisStore extends CacheStore {
1778
1771
  return Promise.resolve(resource.status === 'ready');
1779
1772
  }
1780
1773
  };
1781
- this.pool = genericPool__default["default"].createPool(factory, {
1774
+ this.pool = genericPool.createPool(factory, {
1782
1775
  max: this.options.poolSize || 10,
1783
1776
  min: 2 // minimum size of the pool
1784
1777
  });
package/dist/index.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * @Author: richen
3
- * @Date: 2022-05-27 10:34:28
3
+ * @Date: 2023-01-13 12:11:39
4
4
  * @License: BSD (3-Clause)
5
5
  * @Copyright (c) - <richenlin(at)gmail.com>
6
6
  * @HomePage: https://koatty.org/
@@ -17,7 +17,7 @@ import genericPool from 'generic-pool';
17
17
  * @Usage:
18
18
  * @Author: richen
19
19
  * @Date: 2021-12-02 15:26:55
20
- * @LastEditTime: 2021-12-02 15:33:22
20
+ * @LastEditTime: 2023-01-13 11:25:37
21
21
  */
22
22
  /**
23
23
  *
@@ -396,7 +396,7 @@ class CacheStore {
396
396
  * @Usage:
397
397
  * @Author: richen
398
398
  * @Date: 2021-12-02 11:03:20
399
- * @LastEditTime: 2021-12-02 14:36:11
399
+ * @LastEditTime: 2023-01-13 11:25:09
400
400
  */
401
401
  /**
402
402
  *
@@ -1538,7 +1538,7 @@ class MemoryCache extends EventEmitter {
1538
1538
  * @Usage:
1539
1539
  * @Author: richen
1540
1540
  * @Date: 2021-06-29 19:07:57
1541
- * @LastEditTime: 2021-12-02 15:30:12
1541
+ * @LastEditTime: 2023-01-13 11:25:19
1542
1542
  */
1543
1543
  class MemoryStore extends CacheStore {
1544
1544
  /**
package/dist/package.json CHANGED
@@ -1,92 +1,93 @@
1
1
  {
2
- "name": "koatty_store",
3
- "version": "1.5.5",
4
- "description": "Cache store for koatty.",
5
- "scripts": {
6
- "build": "npm run build:js && npm run build:dts && npm run build:doc && npm run build:cp",
7
- "build:cp": "node scripts/postBuild && copyfiles package.json LICENSE README.md dist/",
8
- "build:js": "del-cli --force dist && npx rollup -c .rollup.config.js",
9
- "build:doc": "del-cli --force docs/api && npx api-documenter markdown --input temp --output docs/api",
10
- "build:dts": "del-cli --force temp && npx tsc && npx api-extractor run --local --verbose",
11
- "eslint": "eslint --ext .ts,.js ./",
12
- "prepublishOnly": "npm test && npm run build",
13
- "prerelease": "npm test && npm run build",
14
- "release": "standard-version",
15
- "test": "npm run eslint && jest --passWithNoTests"
16
- },
17
- "main": "./dist/index.js",
18
- "exports": {
19
- "require": "./dist/index.js",
20
- "import": "./dist/index.mjs"
21
- },
22
- "repository": {
23
- "type": "git",
24
- "url": "git+https://github.com/koatty/koatty_store.git"
25
- },
26
- "keywords": [
27
- "web",
28
- "typescript",
29
- "framework",
30
- "mvc",
31
- "koa2",
32
- "restful",
33
- "agile",
34
- "koatty_store",
35
- "koatty"
36
- ],
37
- "engines": {
38
- "node": ">10.0.0"
39
- },
40
- "author": {
41
- "name": "richenlin",
42
- "email": "richenlin@gmail.com"
43
- },
44
- "license": "BSD-3-Clause",
45
- "bugs": {
46
- "url": "https://github.com/koatty/koatty_store/issues"
47
- },
48
- "homepage": "https://github.com/koatty/koatty_store",
49
- "maintainers": [
50
- {
51
- "name": "richenlin",
52
- "email": "richenlin@gmail.com"
53
- }
54
- ],
55
- "devDependencies": {
56
- "@commitlint/cli": "^17.x.x",
57
- "@commitlint/config-conventional": "^17.x.x",
58
- "@microsoft/api-documenter": "^7.x.x",
59
- "@microsoft/api-extractor": "^7.x.x",
60
- "@rollup/plugin-json": "^4.x.x",
61
- "@types/jest": "^27.x.x",
62
- "@types/koa": "^2.x.x",
63
- "@types/node": "^16.x.x",
64
- "@typescript-eslint/eslint-plugin": "^5.x.x",
65
- "@typescript-eslint/parser": "^5.x.x",
66
- "conventional-changelog-cli": "^2.x.x",
67
- "copyfiles": "^2.x.x",
68
- "del-cli": "^4.x.x",
69
- "eslint": "^8.x.x",
70
- "eslint-plugin-jest": "^26.x.x",
71
- "husky": "^4.x.x",
72
- "jest": "^28.x.x",
73
- "jest-html-reporters": "^3.x.x",
74
- "rollup": "^2.x.x",
75
- "rollup-plugin-typescript2": "^0.x.x",
76
- "standard-version": "^9.x.x",
77
- "ts-jest": "^28.x.x",
78
- "ts-node": "^10.x.x",
79
- "typescript": "^4.x.x"
80
- },
81
- "dependencies": {
82
- "@types/ioredis": "^4.x.x",
83
- "generic-pool": "^3.8.2",
84
- "ioredis": "^4.28.5",
85
- "koatty_lib": "^1.x.x",
86
- "koatty_logger": "^1.x.x"
87
- },
88
- "peerDependencies": {
89
- "koatty_lib": "^1.x.x",
90
- "koatty_logger": "^1.x.x"
2
+ "name": "koatty_store",
3
+ "version": "1.5.8",
4
+ "description": "Cache store for koatty.",
5
+ "scripts": {
6
+ "build": "npm run build:js && npm run build:dts && npm run build:doc && npm run build:cp",
7
+ "build:cp": "node scripts/postBuild && copyfiles package.json LICENSE README.md dist/",
8
+ "build:js": "del-cli --force dist && npx rollup --bundleConfigAsCjs -c .rollup.config.js",
9
+ "build:doc": "del-cli --force docs/api && npx api-documenter markdown --input temp --output docs/api",
10
+ "build:dts": "del-cli --force temp && npx tsc && npx api-extractor run --local --verbose",
11
+ "eslint": "eslint --ext .ts,.js ./",
12
+ "prepublishOnly": "npm test && npm run build",
13
+ "prerelease": "npm test && npm run build",
14
+ "pub": "git push --follow-tags origin && npm publish",
15
+ "release": "standard-version",
16
+ "test": "npm run eslint && jest --passWithNoTests"
17
+ },
18
+ "main": "./dist/index.js",
19
+ "exports": {
20
+ "require": "./dist/index.js",
21
+ "import": "./dist/index.mjs"
22
+ },
23
+ "repository": {
24
+ "type": "git",
25
+ "url": "git+https://github.com/koatty/koatty_store.git"
26
+ },
27
+ "keywords": [
28
+ "web",
29
+ "typescript",
30
+ "framework",
31
+ "mvc",
32
+ "koa2",
33
+ "restful",
34
+ "agile",
35
+ "koatty_store",
36
+ "koatty"
37
+ ],
38
+ "engines": {
39
+ "node": ">10.0.0"
40
+ },
41
+ "author": {
42
+ "name": "richenlin",
43
+ "email": "richenlin@gmail.com"
44
+ },
45
+ "license": "BSD-3-Clause",
46
+ "bugs": {
47
+ "url": "https://github.com/koatty/koatty_store/issues"
48
+ },
49
+ "homepage": "https://github.com/koatty/koatty_store",
50
+ "maintainers": [
51
+ {
52
+ "name": "richenlin",
53
+ "email": "richenlin@gmail.com"
91
54
  }
55
+ ],
56
+ "devDependencies": {
57
+ "@commitlint/cli": "^17.x.x",
58
+ "@commitlint/config-conventional": "^17.x.x",
59
+ "@microsoft/api-documenter": "^7.x.x",
60
+ "@microsoft/api-extractor": "^7.x.x",
61
+ "@rollup/plugin-json": "^6.x.x",
62
+ "@types/ioredis": "^4.x.x",
63
+ "@types/jest": "^29.x.x",
64
+ "@types/koa": "^2.x.x",
65
+ "@types/node": "^18.x.x",
66
+ "@typescript-eslint/eslint-plugin": "^5.x.x",
67
+ "@typescript-eslint/parser": "^5.x.x",
68
+ "conventional-changelog-cli": "^2.x.x",
69
+ "copyfiles": "^2.x.x",
70
+ "del-cli": "^4.x.x",
71
+ "eslint": "^8.x.x",
72
+ "eslint-plugin-jest": "^27.x.x",
73
+ "husky": "^4.x.x",
74
+ "jest": "^29.x.x",
75
+ "jest-html-reporters": "^3.x.x",
76
+ "rollup": "^3.x.x",
77
+ "rollup-plugin-typescript2": "^0.x.x",
78
+ "standard-version": "^9.x.x",
79
+ "ts-jest": "^29.x.x",
80
+ "ts-node": "^10.x.x",
81
+ "typescript": "^4.x.x"
82
+ },
83
+ "dependencies": {
84
+ "generic-pool": "^3.9.0",
85
+ "ioredis": "^4.28.5",
86
+ "koatty_lib": "^1.x.x",
87
+ "koatty_logger": "^2.x.x"
88
+ },
89
+ "peerDependencies": {
90
+ "koatty_lib": "^1.x.x",
91
+ "koatty_logger": "^2.x.x"
92
+ }
92
93
  }
package/package.json CHANGED
@@ -1,92 +1,93 @@
1
1
  {
2
- "name": "koatty_store",
3
- "version": "1.5.5",
4
- "description": "Cache store for koatty.",
5
- "scripts": {
6
- "build": "npm run build:js && npm run build:dts && npm run build:doc && npm run build:cp",
7
- "build:cp": "node scripts/postBuild && copyfiles package.json LICENSE README.md dist/",
8
- "build:js": "del-cli --force dist && npx rollup -c .rollup.config.js",
9
- "build:doc": "del-cli --force docs/api && npx api-documenter markdown --input temp --output docs/api",
10
- "build:dts": "del-cli --force temp && npx tsc && npx api-extractor run --local --verbose",
11
- "eslint": "eslint --ext .ts,.js ./",
12
- "prepublishOnly": "npm test && npm run build",
13
- "prerelease": "npm test && npm run build",
14
- "release": "standard-version",
15
- "test": "npm run eslint && jest --passWithNoTests"
16
- },
17
- "main": "./dist/index.js",
18
- "exports": {
19
- "require": "./dist/index.js",
20
- "import": "./dist/index.mjs"
21
- },
22
- "repository": {
23
- "type": "git",
24
- "url": "git+https://github.com/koatty/koatty_store.git"
25
- },
26
- "keywords": [
27
- "web",
28
- "typescript",
29
- "framework",
30
- "mvc",
31
- "koa2",
32
- "restful",
33
- "agile",
34
- "koatty_store",
35
- "koatty"
36
- ],
37
- "engines": {
38
- "node": ">10.0.0"
39
- },
40
- "author": {
41
- "name": "richenlin",
42
- "email": "richenlin@gmail.com"
43
- },
44
- "license": "BSD-3-Clause",
45
- "bugs": {
46
- "url": "https://github.com/koatty/koatty_store/issues"
47
- },
48
- "homepage": "https://github.com/koatty/koatty_store",
49
- "maintainers": [
50
- {
51
- "name": "richenlin",
52
- "email": "richenlin@gmail.com"
53
- }
54
- ],
55
- "devDependencies": {
56
- "@commitlint/cli": "^17.x.x",
57
- "@commitlint/config-conventional": "^17.x.x",
58
- "@microsoft/api-documenter": "^7.x.x",
59
- "@microsoft/api-extractor": "^7.x.x",
60
- "@rollup/plugin-json": "^4.x.x",
61
- "@types/jest": "^27.x.x",
62
- "@types/koa": "^2.x.x",
63
- "@types/node": "^16.x.x",
64
- "@typescript-eslint/eslint-plugin": "^5.x.x",
65
- "@typescript-eslint/parser": "^5.x.x",
66
- "conventional-changelog-cli": "^2.x.x",
67
- "copyfiles": "^2.x.x",
68
- "del-cli": "^4.x.x",
69
- "eslint": "^8.x.x",
70
- "eslint-plugin-jest": "^26.x.x",
71
- "husky": "^4.x.x",
72
- "jest": "^28.x.x",
73
- "jest-html-reporters": "^3.x.x",
74
- "rollup": "^2.x.x",
75
- "rollup-plugin-typescript2": "^0.x.x",
76
- "standard-version": "^9.x.x",
77
- "ts-jest": "^28.x.x",
78
- "ts-node": "^10.x.x",
79
- "typescript": "^4.x.x"
80
- },
81
- "dependencies": {
82
- "@types/ioredis": "^4.x.x",
83
- "generic-pool": "^3.8.2",
84
- "ioredis": "^4.28.5",
85
- "koatty_lib": "^1.x.x",
86
- "koatty_logger": "^1.x.x"
87
- },
88
- "peerDependencies": {
89
- "koatty_lib": "^1.x.x",
90
- "koatty_logger": "^1.x.x"
2
+ "name": "koatty_store",
3
+ "version": "1.5.8",
4
+ "description": "Cache store for koatty.",
5
+ "scripts": {
6
+ "build": "npm run build:js && npm run build:dts && npm run build:doc && npm run build:cp",
7
+ "build:cp": "node scripts/postBuild && copyfiles package.json LICENSE README.md dist/",
8
+ "build:js": "del-cli --force dist && npx rollup --bundleConfigAsCjs -c .rollup.config.js",
9
+ "build:doc": "del-cli --force docs/api && npx api-documenter markdown --input temp --output docs/api",
10
+ "build:dts": "del-cli --force temp && npx tsc && npx api-extractor run --local --verbose",
11
+ "eslint": "eslint --ext .ts,.js ./",
12
+ "prepublishOnly": "npm test && npm run build",
13
+ "prerelease": "npm test && npm run build",
14
+ "pub": "git push --follow-tags origin && npm publish",
15
+ "release": "standard-version",
16
+ "test": "npm run eslint && jest --passWithNoTests"
17
+ },
18
+ "main": "./dist/index.js",
19
+ "exports": {
20
+ "require": "./dist/index.js",
21
+ "import": "./dist/index.mjs"
22
+ },
23
+ "repository": {
24
+ "type": "git",
25
+ "url": "git+https://github.com/koatty/koatty_store.git"
26
+ },
27
+ "keywords": [
28
+ "web",
29
+ "typescript",
30
+ "framework",
31
+ "mvc",
32
+ "koa2",
33
+ "restful",
34
+ "agile",
35
+ "koatty_store",
36
+ "koatty"
37
+ ],
38
+ "engines": {
39
+ "node": ">10.0.0"
40
+ },
41
+ "author": {
42
+ "name": "richenlin",
43
+ "email": "richenlin@gmail.com"
44
+ },
45
+ "license": "BSD-3-Clause",
46
+ "bugs": {
47
+ "url": "https://github.com/koatty/koatty_store/issues"
48
+ },
49
+ "homepage": "https://github.com/koatty/koatty_store",
50
+ "maintainers": [
51
+ {
52
+ "name": "richenlin",
53
+ "email": "richenlin@gmail.com"
91
54
  }
55
+ ],
56
+ "devDependencies": {
57
+ "@commitlint/cli": "^17.x.x",
58
+ "@commitlint/config-conventional": "^17.x.x",
59
+ "@microsoft/api-documenter": "^7.x.x",
60
+ "@microsoft/api-extractor": "^7.x.x",
61
+ "@rollup/plugin-json": "^6.x.x",
62
+ "@types/ioredis": "^4.x.x",
63
+ "@types/jest": "^29.x.x",
64
+ "@types/koa": "^2.x.x",
65
+ "@types/node": "^18.x.x",
66
+ "@typescript-eslint/eslint-plugin": "^5.x.x",
67
+ "@typescript-eslint/parser": "^5.x.x",
68
+ "conventional-changelog-cli": "^2.x.x",
69
+ "copyfiles": "^2.x.x",
70
+ "del-cli": "^4.x.x",
71
+ "eslint": "^8.x.x",
72
+ "eslint-plugin-jest": "^27.x.x",
73
+ "husky": "^4.x.x",
74
+ "jest": "^29.x.x",
75
+ "jest-html-reporters": "^3.x.x",
76
+ "rollup": "^3.x.x",
77
+ "rollup-plugin-typescript2": "^0.x.x",
78
+ "standard-version": "^9.x.x",
79
+ "ts-jest": "^29.x.x",
80
+ "ts-node": "^10.x.x",
81
+ "typescript": "^4.x.x"
82
+ },
83
+ "dependencies": {
84
+ "generic-pool": "^3.9.0",
85
+ "ioredis": "^4.28.5",
86
+ "koatty_lib": "^1.x.x",
87
+ "koatty_logger": "^2.x.x"
88
+ },
89
+ "peerDependencies": {
90
+ "koatty_lib": "^1.x.x",
91
+ "koatty_logger": "^2.x.x"
92
+ }
92
93
  }