koatty_schedule 1.5.10 → 1.6.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/CHANGELOG.md CHANGED
@@ -2,6 +2,10 @@
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.6.0](https://github.com/thinkkoa/koatty_schedule/compare/v1.5.11...v1.6.0) (2023-12-20)
6
+
7
+ ### [1.5.11](https://github.com/thinkkoa/koatty_schedule/compare/v1.5.10...v1.5.11) (2023-07-28)
8
+
5
9
  ### [1.5.10](https://github.com/thinkkoa/koatty_schedule/compare/v1.5.8...v1.5.10) (2023-01-13)
6
10
 
7
11
  ### [1.5.8](https://github.com/thinkkoa/koatty_schedule/compare/v1.5.7...v1.5.8) (2022-11-03)
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * @Author: richen
3
- * @Date: 2023-01-13 10:49:59
3
+ * @Date: 2023-12-20 19:48:19
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,6 +1,6 @@
1
1
  /*!
2
2
  * @Author: richen
3
- * @Date: 2023-01-13 10:49:36
3
+ * @Date: 2023-12-20 19:48:07
4
4
  * @License: BSD (3-Clause)
5
5
  * @Copyright (c) - <richenlin(at)gmail.com>
6
6
  * @HomePage: https://koatty.org/
@@ -51,17 +51,6 @@ const delay = function (ms = 1000) {
51
51
  return new Promise((resolve) => setTimeout(() => resolve(), ms));
52
52
  };
53
53
  class Locker {
54
- /**
55
- * Creates an instance of Locker.
56
- * @param {StoreOptions} options
57
- * @memberof Locker
58
- */
59
- constructor(options) {
60
- this.lockMap = new Map();
61
- this.options = options;
62
- this.client = null;
63
- this.cacheStore = koatty_store.Store.getInstance(this.options);
64
- }
65
54
  /**
66
55
  *
67
56
  *
@@ -77,6 +66,17 @@ class Locker {
77
66
  }
78
67
  return this.instance;
79
68
  }
69
+ /**
70
+ * Creates an instance of Locker.
71
+ * @param {StoreOptions} options
72
+ * @memberof Locker
73
+ */
74
+ constructor(options) {
75
+ this.lockMap = new Map();
76
+ this.options = options;
77
+ this.client = null;
78
+ this.cacheStore = koatty_store.CacheStore.getInstance(this.options);
79
+ }
80
80
  /**
81
81
  * instances of cache store
82
82
  *
@@ -299,6 +299,7 @@ function recursiveGetMetadata(metadataKey, target, propertyKey) {
299
299
  * @ license: MIT
300
300
  * @ version: 2020-07-06 10:30:11
301
301
  */
302
+ // tslint:disable-next-line: no-import-side-effect
302
303
  const SCHEDULE_KEY = 'SCHEDULE_KEY';
303
304
  //
304
305
  const ScheduleLocker = {
package/dist/index.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * @Author: richen
3
- * @Date: 2023-01-13 10:49:36
3
+ * @Date: 2023-12-20 19:48:07
4
4
  * @License: BSD (3-Clause)
5
5
  * @Copyright (c) - <richenlin(at)gmail.com>
6
6
  * @HomePage: https://koatty.org/
@@ -11,7 +11,7 @@ import * as helper from 'koatty_lib';
11
11
  import { DefaultLogger } from 'koatty_logger';
12
12
  import { IOCContainer } from 'koatty_container';
13
13
  import * as crypto from 'crypto';
14
- import { Store } from 'koatty_store';
14
+ import { CacheStore } from 'koatty_store';
15
15
 
16
16
  /**
17
17
  * @ author: richen
@@ -29,17 +29,6 @@ const delay = function (ms = 1000) {
29
29
  return new Promise((resolve) => setTimeout(() => resolve(), ms));
30
30
  };
31
31
  class Locker {
32
- /**
33
- * Creates an instance of Locker.
34
- * @param {StoreOptions} options
35
- * @memberof Locker
36
- */
37
- constructor(options) {
38
- this.lockMap = new Map();
39
- this.options = options;
40
- this.client = null;
41
- this.cacheStore = Store.getInstance(this.options);
42
- }
43
32
  /**
44
33
  *
45
34
  *
@@ -55,6 +44,17 @@ class Locker {
55
44
  }
56
45
  return this.instance;
57
46
  }
47
+ /**
48
+ * Creates an instance of Locker.
49
+ * @param {StoreOptions} options
50
+ * @memberof Locker
51
+ */
52
+ constructor(options) {
53
+ this.lockMap = new Map();
54
+ this.options = options;
55
+ this.client = null;
56
+ this.cacheStore = CacheStore.getInstance(this.options);
57
+ }
58
58
  /**
59
59
  * instances of cache store
60
60
  *
@@ -277,6 +277,7 @@ function recursiveGetMetadata(metadataKey, target, propertyKey) {
277
277
  * @ license: MIT
278
278
  * @ version: 2020-07-06 10:30:11
279
279
  */
280
+ // tslint:disable-next-line: no-import-side-effect
280
281
  const SCHEDULE_KEY = 'SCHEDULE_KEY';
281
282
  //
282
283
  const ScheduleLocker = {
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "koatty_schedule",
3
- "version": "1.5.10",
3
+ "version": "1.6.0",
4
4
  "description": "Schedule for koatty.",
5
5
  "scripts": {
6
6
  "build": "npm run build:js && npm run build:dts && npm run build:doc && npm run build:cp",
@@ -9,9 +9,9 @@
9
9
  "build:doc": "del-cli --force docs/api && npx api-documenter markdown --input temp --output docs/api",
10
10
  "build:dts": "del-cli --force temp && npx tsc && npx api-extractor run --local --verbose",
11
11
  "eslint": "eslint --ext .ts,.js ./",
12
- "prepublishOnly": "npm test && npm run build",
12
+ "lock": "npm i --package-lock-only",
13
+ "prepublishOnly": "npm test && npm run build && git push --follow-tags origin master",
13
14
  "prerelease": "npm test && npm run build",
14
- "pub": "git push --follow-tags origin && npm publish",
15
15
  "release": "standard-version",
16
16
  "test": "npm run eslint && jest --passWithNoTests"
17
17
  },
@@ -72,20 +72,19 @@
72
72
  "standard-version": "^9.x.x",
73
73
  "ts-jest": "^29.x.x",
74
74
  "ts-node": "^10.x.x",
75
+ "tslib": "^2.x.x",
75
76
  "typescript": "^4.x.x"
76
77
  },
77
78
  "dependencies": {
78
- "cron": "^2.2.0",
79
+ "cron": "^2.4.3",
79
80
  "koatty_container": "^1.x.x",
80
81
  "koatty_lib": "^1.x.x",
81
82
  "koatty_logger": "^2.x.x",
82
- "koatty_store": "^1.x.x",
83
- "tslib": "^2.4.1"
83
+ "koatty_store": "^1.6.2"
84
84
  },
85
85
  "peerDependencies": {
86
86
  "koatty_container": "^1.x.x",
87
87
  "koatty_lib": "^1.x.x",
88
- "koatty_logger": "^2.x.x",
89
- "koatty_store": "^1.x.x"
88
+ "koatty_logger": "^2.x.x"
90
89
  }
91
- }
90
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "koatty_schedule",
3
- "version": "1.5.10",
3
+ "version": "1.6.0",
4
4
  "description": "Schedule for koatty.",
5
5
  "scripts": {
6
6
  "build": "npm run build:js && npm run build:dts && npm run build:doc && npm run build:cp",
@@ -9,9 +9,9 @@
9
9
  "build:doc": "del-cli --force docs/api && npx api-documenter markdown --input temp --output docs/api",
10
10
  "build:dts": "del-cli --force temp && npx tsc && npx api-extractor run --local --verbose",
11
11
  "eslint": "eslint --ext .ts,.js ./",
12
- "prepublishOnly": "npm test && npm run build",
12
+ "lock": "npm i --package-lock-only",
13
+ "prepublishOnly": "npm test && npm run build && git push --follow-tags origin master",
13
14
  "prerelease": "npm test && npm run build",
14
- "pub": "git push --follow-tags origin && npm publish",
15
15
  "release": "standard-version",
16
16
  "test": "npm run eslint && jest --passWithNoTests"
17
17
  },
@@ -72,20 +72,19 @@
72
72
  "standard-version": "^9.x.x",
73
73
  "ts-jest": "^29.x.x",
74
74
  "ts-node": "^10.x.x",
75
+ "tslib": "^2.x.x",
75
76
  "typescript": "^4.x.x"
76
77
  },
77
78
  "dependencies": {
78
- "cron": "^2.2.0",
79
+ "cron": "^2.4.3",
79
80
  "koatty_container": "^1.x.x",
80
81
  "koatty_lib": "^1.x.x",
81
82
  "koatty_logger": "^2.x.x",
82
- "koatty_store": "^1.x.x",
83
- "tslib": "^2.4.1"
83
+ "koatty_store": "^1.6.2"
84
84
  },
85
85
  "peerDependencies": {
86
86
  "koatty_container": "^1.x.x",
87
87
  "koatty_lib": "^1.x.x",
88
- "koatty_logger": "^2.x.x",
89
- "koatty_store": "^1.x.x"
88
+ "koatty_logger": "^2.x.x"
90
89
  }
91
- }
90
+ }