koatty_store 1.6.2 → 1.7.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/.rollup.config.js CHANGED
@@ -1,63 +1,60 @@
1
- /*
2
- * @Description:
3
- * @Usage:
4
- * @Author: richen
5
- * @Date: 2021-12-17 10:20:44
6
- * @LastEditTime: 2023-02-18 23:21:06
7
- */
8
- import json from "@rollup/plugin-json";
9
- import typescript from 'rollup-plugin-typescript2';
10
- // import babel from '@rollup/plugin-babel';
11
-
12
- export default [
13
- {
14
- input: './src/index.ts',
15
- output: [{
16
- format: 'cjs',
17
- file: './dist/index.js',
18
- banner: require('./scripts/copyright')
19
- }],
20
- plugins: [
21
- // babel({
22
- // babelHelpers: "runtime",
23
- // configFile: './babel.config.js',
24
- // exclude: 'node_modules/**',
25
- // }),
26
- json(),
27
- typescript({
28
- tsconfigOverride: {
29
- compilerOptions: {
30
- declaration: false,
31
- declarationMap: false,
32
- module: "ESNext"
33
- }
34
- }
35
- })
36
- ]
37
- },
38
- {
39
- input: './src/index.ts',
40
- output: [{
41
- format: 'es',
42
- file: './dist/index.mjs',
43
- banner: require('./scripts/copyright')
44
- }],
45
- plugins: [
46
- // babel({
47
- // babelHelpers: "runtime",
48
- // configFile: './babel.config.js',
49
- // exclude: 'node_modules/**',
50
- // }),
51
- json(),
52
- typescript({
53
- tsconfigOverride: {
54
- compilerOptions: {
55
- declaration: false,
56
- declarationMap: false,
57
- module: "ESNext"
58
- }
59
- }
60
- })
61
- ]
62
- }
1
+ /*
2
+ * @Description:
3
+ * @Usage:
4
+ * @Author: richen
5
+ * @Date: 2021-12-17 10:20:44
6
+ * @LastEditTime: 2024-11-04 22:04:45
7
+ */
8
+ import commonjs from '@rollup/plugin-commonjs';
9
+ import json from "@rollup/plugin-json";
10
+ import resolve from '@rollup/plugin-node-resolve';
11
+ import { builtinModules } from 'module';
12
+ import del from "rollup-plugin-delete";
13
+ import typescript from 'rollup-plugin-typescript2';
14
+ // import babel from '@rollup/plugin-babel';
15
+ const pkg = require('./package.json');
16
+
17
+ export default [
18
+ {
19
+ input: './src/index.ts',
20
+ output: [
21
+ {
22
+ format: 'cjs',
23
+ file: './dist/index.js',
24
+ banner: require('./scripts/copyright'),
25
+ },
26
+ {
27
+ format: 'es',
28
+ file: './dist/index.mjs',
29
+ banner: require('./scripts/copyright'),
30
+ },
31
+ ],
32
+ plugins: [
33
+ del({ targets: ["dist/*", "temp/*", "docs/api"] }),
34
+ // babel({
35
+ // babelHelpers: "runtime",
36
+ // configFile: './babel.config.js',
37
+ // exclude: 'node_modules/**',
38
+ // }),
39
+ json(),
40
+ resolve({
41
+ preferBuiltins: true, // 优先选择内置模块
42
+ }),
43
+ commonjs(),
44
+ typescript({
45
+ tsconfigOverride: {
46
+ compilerOptions: {
47
+ declaration: false,
48
+ declarationMap: false,
49
+ module: "ESNext"
50
+ }
51
+ }
52
+ })
53
+ ],
54
+ external: [
55
+ ...builtinModules, // 排除 Node.js 内置模块
56
+ ...Object.keys(pkg.dependencies || {}), // 排除 package.json 中的外部依赖
57
+ ],
58
+ },
59
+
63
60
  ]
package/CHANGELOG.md CHANGED
@@ -2,30 +2,32 @@
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.2](https://github.com/koatty/koatty_store/compare/v1.6.1...v1.6.2) (2023-12-20)
6
-
7
- ### [1.6.1](https://github.com/koatty/koatty_store/compare/v1.6.0...v1.6.1) (2023-07-28)
8
-
9
-
10
- ### Bug Fixes
11
-
12
- * remove words ([604d31d](https://github.com/koatty/koatty_store/commit/604d31df38814a530b32605668542821b608cb7d))
13
-
14
- ## [1.6.0](https://github.com/koatty/koatty_store/compare/v1.5.8...v1.6.0) (2023-02-18)
15
-
16
- ### [1.5.8](https://github.com/koatty/koatty_store/compare/v1.5.6...v1.5.8) (2023-01-13)
17
-
18
- ### [1.5.6](https://github.com/koatty/koatty_store/compare/v1.5.5...v1.5.6) (2022-11-03)
19
-
20
-
21
- ### Bug Fixes
22
-
23
- * upgrade deps ([cf54da2](https://github.com/koatty/koatty_store/commit/cf54da2c9e13ba843efa44b4631f3144946ebdff))
24
-
25
- ### [1.5.5](https://github.com/koatty/koatty_store/compare/v1.5.4...v1.5.5) (2022-05-27)
26
-
27
- ### [1.5.4](https://github.com/koatty/koatty_store/compare/v1.5.2...v1.5.4) (2021-12-02)
28
-
29
- ### [1.5.2](https://github.com/koatty/koatty_store/compare/v1.4.10...v1.5.2) (2021-12-02)
30
-
31
- ### [1.4.10](https://github.com/koatty/koatty_store/compare/v1.4.8...v1.4.10) (2021-11-20)
5
+ ## [1.7.0](https://github.com/koatty/koatty_store/compare/v1.6.2...v1.7.0) (2024-11-07)
6
+
7
+ ### [1.6.2](https://github.com/koatty/koatty_store/compare/v1.6.1...v1.6.2) (2023-12-20)
8
+
9
+ ### [1.6.1](https://github.com/koatty/koatty_store/compare/v1.6.0...v1.6.1) (2023-07-28)
10
+
11
+
12
+ ### Bug Fixes
13
+
14
+ * remove words ([604d31d](https://github.com/koatty/koatty_store/commit/604d31df38814a530b32605668542821b608cb7d))
15
+
16
+ ## [1.6.0](https://github.com/koatty/koatty_store/compare/v1.5.8...v1.6.0) (2023-02-18)
17
+
18
+ ### [1.5.8](https://github.com/koatty/koatty_store/compare/v1.5.6...v1.5.8) (2023-01-13)
19
+
20
+ ### [1.5.6](https://github.com/koatty/koatty_store/compare/v1.5.5...v1.5.6) (2022-11-03)
21
+
22
+
23
+ ### Bug Fixes
24
+
25
+ * upgrade deps ([cf54da2](https://github.com/koatty/koatty_store/commit/cf54da2c9e13ba843efa44b4631f3144946ebdff))
26
+
27
+ ### [1.5.5](https://github.com/koatty/koatty_store/compare/v1.5.4...v1.5.5) (2022-05-27)
28
+
29
+ ### [1.5.4](https://github.com/koatty/koatty_store/compare/v1.5.2...v1.5.4) (2021-12-02)
30
+
31
+ ### [1.5.2](https://github.com/koatty/koatty_store/compare/v1.4.10...v1.5.2) (2021-12-02)
32
+
33
+ ### [1.4.10](https://github.com/koatty/koatty_store/compare/v1.4.8...v1.4.10) (2021-11-20)
package/LICENSE CHANGED
@@ -1,29 +1,29 @@
1
- BSD 3-Clause License
2
-
3
- Copyright (c) 2020, Koatty
4
- All rights reserved.
5
-
6
- Redistribution and use in source and binary forms, with or without
7
- modification, are permitted provided that the following conditions are met:
8
-
9
- 1. Redistributions of source code must retain the above copyright notice, this
10
- list of conditions and the following disclaimer.
11
-
12
- 2. Redistributions in binary form must reproduce the above copyright notice,
13
- this list of conditions and the following disclaimer in the documentation
14
- and/or other materials provided with the distribution.
15
-
16
- 3. Neither the name of the copyright holder nor the names of its
17
- contributors may be used to endorse or promote products derived from
18
- this software without specific prior written permission.
19
-
20
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23
- DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
24
- FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25
- DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
26
- SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
27
- CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
28
- OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29
- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1
+ BSD 3-Clause License
2
+
3
+ Copyright (c) 2020, Koatty
4
+ All rights reserved.
5
+
6
+ Redistribution and use in source and binary forms, with or without
7
+ modification, are permitted provided that the following conditions are met:
8
+
9
+ 1. Redistributions of source code must retain the above copyright notice, this
10
+ list of conditions and the following disclaimer.
11
+
12
+ 2. Redistributions in binary form must reproduce the above copyright notice,
13
+ this list of conditions and the following disclaimer in the documentation
14
+ and/or other materials provided with the distribution.
15
+
16
+ 3. Neither the name of the copyright holder nor the names of its
17
+ contributors may be used to endorse or promote products derived from
18
+ this software without specific prior written permission.
19
+
20
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
24
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
26
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
27
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
28
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
package/README.md CHANGED
@@ -1,2 +1,2 @@
1
- # koatty_store
2
- Cache store (memory or reids) for koatty.
1
+ # koatty_store
2
+ Cache store (memory or reids) for koatty.
package/dist/LICENSE CHANGED
@@ -1,29 +1,29 @@
1
- BSD 3-Clause License
2
-
3
- Copyright (c) 2020, Koatty
4
- All rights reserved.
5
-
6
- Redistribution and use in source and binary forms, with or without
7
- modification, are permitted provided that the following conditions are met:
8
-
9
- 1. Redistributions of source code must retain the above copyright notice, this
10
- list of conditions and the following disclaimer.
11
-
12
- 2. Redistributions in binary form must reproduce the above copyright notice,
13
- this list of conditions and the following disclaimer in the documentation
14
- and/or other materials provided with the distribution.
15
-
16
- 3. Neither the name of the copyright holder nor the names of its
17
- contributors may be used to endorse or promote products derived from
18
- this software without specific prior written permission.
19
-
20
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23
- DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
24
- FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25
- DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
26
- SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
27
- CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
28
- OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29
- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1
+ BSD 3-Clause License
2
+
3
+ Copyright (c) 2020, Koatty
4
+ All rights reserved.
5
+
6
+ Redistribution and use in source and binary forms, with or without
7
+ modification, are permitted provided that the following conditions are met:
8
+
9
+ 1. Redistributions of source code must retain the above copyright notice, this
10
+ list of conditions and the following disclaimer.
11
+
12
+ 2. Redistributions in binary form must reproduce the above copyright notice,
13
+ this list of conditions and the following disclaimer in the documentation
14
+ and/or other materials provided with the distribution.
15
+
16
+ 3. Neither the name of the copyright holder nor the names of its
17
+ contributors may be used to endorse or promote products derived from
18
+ this software without specific prior written permission.
19
+
20
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
24
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
26
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
27
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
28
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
package/dist/README.md CHANGED
@@ -1,2 +1,2 @@
1
- # koatty_store
2
- Cache store (memory or reids) for koatty.
1
+ # koatty_store
2
+ Cache store (memory or reids) for koatty.
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * @Author: richen
3
- * @Date: 2023-12-20 19:12:12
3
+ * @Date: 2024-11-07 14:39:13
4
4
  * @License: BSD (3-Clause)
5
5
  * @Copyright (c) - <richenlin(at)gmail.com>
6
6
  * @HomePage: https://koatty.org/
@@ -30,14 +30,14 @@ export declare class CacheStore {
30
30
  * @param {StoreOptions} options
31
31
  * @memberof CacheStore
32
32
  */
33
- constructor(options: StoreOptions);
33
+ constructor(options?: StoreOptions);
34
34
  /**
35
35
  *
36
36
  *
37
37
  * @static
38
38
  * @returns
39
39
  */
40
- static getInstance(options: StoreOptions): CacheStore;
40
+ static getInstance(options?: StoreOptions): CacheStore;
41
41
  getConnection(): MemoryCache | Promise<default_2 | default_3>;
42
42
  close(): Promise<void>;
43
43
  release(conn: any): Promise<void>;
@@ -813,19 +813,19 @@ declare class MemoryStore implements CacheStoreInterface {
813
813
  /**
814
814
  * release
815
815
  *
816
- * @param {*} conn
816
+ * @param {*} _conn
817
817
  * @returns {*} {Promise<void>}
818
818
  * @memberof MemoryStore
819
819
  */
820
- release(conn: any): Promise<void>;
820
+ release(_conn: any): Promise<void>;
821
821
  /**
822
822
  * defineCommand
823
823
  *
824
- * @param {string} name
825
- * @param {*} scripts
824
+ * @param {string} _name
825
+ * @param {*} _scripts
826
826
  * @memberof MemoryStore
827
827
  */
828
- defineCommand(name: string, scripts: any): Promise<void>;
828
+ defineCommand(_name: string, _scripts: any): Promise<void>;
829
829
  /**
830
830
  * get and compare value
831
831
  *