@tsed/platform-cache 7.0.0-beta.2 → 7.0.0-beta.20
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/jest.config.js +14 -0
- package/lib/cjs/decorators/useCache.js +1 -2
- package/lib/cjs/decorators/useCache.js.map +1 -1
- package/lib/cjs/index.js +9 -3
- package/lib/cjs/index.js.map +1 -1
- package/lib/cjs/interceptors/PlatformCacheInterceptor.js +77 -50
- package/lib/cjs/interceptors/PlatformCacheInterceptor.js.map +1 -1
- package/lib/cjs/interfaces/PlatformCacheOptions.js.map +1 -1
- package/lib/cjs/interfaces/interfaces.js +3 -0
- package/lib/cjs/interfaces/interfaces.js.map +1 -0
- package/lib/cjs/package.json +3 -0
- package/lib/cjs/services/PlatformCache.js +69 -24
- package/lib/cjs/services/PlatformCache.js.map +1 -1
- package/lib/esm/decorators/useCache.js +2 -3
- package/lib/esm/decorators/useCache.js.map +1 -1
- package/lib/esm/index.js +9 -3
- package/lib/esm/index.js.map +1 -1
- package/lib/esm/interceptors/PlatformCacheInterceptor.js +75 -48
- package/lib/esm/interceptors/PlatformCacheInterceptor.js.map +1 -1
- package/lib/esm/interfaces/PlatformCacheOptions.js.map +1 -1
- package/lib/esm/interfaces/interfaces.js +2 -0
- package/lib/esm/interfaces/interfaces.js.map +1 -0
- package/lib/esm/package.json +3 -0
- package/lib/esm/services/PlatformCache.js +65 -20
- package/lib/esm/services/PlatformCache.js.map +1 -1
- package/lib/types/index.d.ts +8 -2
- package/lib/types/interceptors/PlatformCacheInterceptor.d.ts +12 -2
- package/lib/types/interfaces/PlatformCacheOptions.d.ts +1 -0
- package/lib/types/interfaces/{index.d.ts → interfaces.d.ts} +4 -1
- package/lib/types/services/PlatformCache.d.ts +18 -10
- package/package.json +37 -20
- package/readme.md +5 -5
- package/tsconfig.compile.esm.json +1 -12
- package/lib/cjs/interfaces/index.js +0 -5
- package/lib/cjs/interfaces/index.js.map +0 -1
- package/lib/esm/interfaces/index.js +0 -2
- package/lib/esm/interfaces/index.js.map +0 -1
package/readme.md
CHANGED
|
@@ -11,7 +11,8 @@
|
|
|
11
11
|
[](https://badge.fury.io/js/%40tsed%2Fcommon)
|
|
12
12
|
[](https://github.com/semantic-release/semantic-release)
|
|
13
13
|
[](https://github.com/prettier/prettier)
|
|
14
|
-
[](https://github.com/sponsors/romakita)
|
|
15
|
+
[](https://opencollective.com/tsed)
|
|
15
16
|
|
|
16
17
|
</div>
|
|
17
18
|
|
|
@@ -27,7 +28,7 @@
|
|
|
27
28
|
|
|
28
29
|
<hr />
|
|
29
30
|
|
|
30
|
-
A package of Ts.ED framework. See website: https://tsed.io/
|
|
31
|
+
A package of Ts.ED framework. See website: https://tsed.io/docs/cache.html
|
|
31
32
|
|
|
32
33
|
# Installation
|
|
33
34
|
|
|
@@ -36,18 +37,17 @@ npm install --save @tsed/platform-cache
|
|
|
36
37
|
```
|
|
37
38
|
|
|
38
39
|
## Contributors
|
|
40
|
+
|
|
39
41
|
Please read [contributing guidelines here](https://tsed.io/CONTRIBUTING.html).
|
|
40
42
|
|
|
41
43
|
<a href="https://github.com/tsedio/ts-express-decorators/graphs/contributors"><img src="https://opencollective.com/tsed/contributors.svg?width=890" /></a>
|
|
42
44
|
|
|
43
|
-
|
|
44
45
|
## Backers
|
|
45
46
|
|
|
46
47
|
Thank you to all our backers! 🙏 [[Become a backer](https://opencollective.com/tsed#backer)]
|
|
47
48
|
|
|
48
49
|
<a href="https://opencollective.com/tsed#backers" target="_blank"><img src="https://opencollective.com/tsed/tiers/backer.svg?width=890"></a>
|
|
49
50
|
|
|
50
|
-
|
|
51
51
|
## Sponsors
|
|
52
52
|
|
|
53
53
|
Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [[Become a sponsor](https://opencollective.com/tsed#sponsor)]
|
|
@@ -56,7 +56,7 @@ Support this project by becoming a sponsor. Your logo will show up here with a l
|
|
|
56
56
|
|
|
57
57
|
The MIT License (MIT)
|
|
58
58
|
|
|
59
|
-
Copyright (c) 2016 -
|
|
59
|
+
Copyright (c) 2016 - 2022 Romain Lenzotti
|
|
60
60
|
|
|
61
61
|
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
62
62
|
|
|
@@ -8,16 +8,5 @@
|
|
|
8
8
|
"declaration": true,
|
|
9
9
|
"declarationDir": "./lib/types"
|
|
10
10
|
},
|
|
11
|
-
"exclude": [
|
|
12
|
-
"node_modules",
|
|
13
|
-
"test",
|
|
14
|
-
"lib",
|
|
15
|
-
"benchmark",
|
|
16
|
-
"coverage",
|
|
17
|
-
"spec",
|
|
18
|
-
"**/*.benchmark.ts",
|
|
19
|
-
"**/*.spec.ts",
|
|
20
|
-
"keys",
|
|
21
|
-
"jest.config.js"
|
|
22
|
-
]
|
|
11
|
+
"exclude": ["node_modules", "test", "lib", "benchmark", "coverage", "spec", "**/*.benchmark.ts", "**/*.spec.ts", "keys", "jest.config.js"]
|
|
23
12
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/interfaces/index.ts"],"names":[],"mappings":";;;AAGA,sEAAuC","sourcesContent":["import type {BaseContext} from \"@tsed/di\";\nimport type {Cache, CacheOptions, CachingConfig, Store} from \"cache-manager\";\n\nexport * from \"./PlatformCachedObject\";\n\nexport interface PlatformCacheSettings extends CacheOptions, CachingConfig {\n caches?: Cache[];\n store?:\n | \"memory\"\n | \"none\"\n | Store\n | {\n create(...args: any[]): Store;\n }\n | (() => any);\n max?: number;\n keyResolver?: (args: any[], ctx: BaseContext) => string;\n\n /**\n * You may pass in any other arguments these will be passed on to the `create` method of your store,\n * otherwise they will be ignored.\n */\n [key: string]: any;\n}\n\ndeclare global {\n // eslint-disable-next-line @typescript-eslint/no-namespace\n namespace TsED {\n interface Configuration {\n cache?: PlatformCacheSettings | false;\n }\n }\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/interfaces/index.ts"],"names":[],"mappings":"AAGA,cAAc,wBAAwB,CAAC","sourcesContent":["import type {BaseContext} from \"@tsed/di\";\nimport type {Cache, CacheOptions, CachingConfig, Store} from \"cache-manager\";\n\nexport * from \"./PlatformCachedObject\";\n\nexport interface PlatformCacheSettings extends CacheOptions, CachingConfig {\n caches?: Cache[];\n store?:\n | \"memory\"\n | \"none\"\n | Store\n | {\n create(...args: any[]): Store;\n }\n | (() => any);\n max?: number;\n keyResolver?: (args: any[], ctx: BaseContext) => string;\n\n /**\n * You may pass in any other arguments these will be passed on to the `create` method of your store,\n * otherwise they will be ignored.\n */\n [key: string]: any;\n}\n\ndeclare global {\n // eslint-disable-next-line @typescript-eslint/no-namespace\n namespace TsED {\n interface Configuration {\n cache?: PlatformCacheSettings | false;\n }\n }\n}\n"]}
|