@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.
Files changed (37) hide show
  1. package/jest.config.js +14 -0
  2. package/lib/cjs/decorators/useCache.js +1 -2
  3. package/lib/cjs/decorators/useCache.js.map +1 -1
  4. package/lib/cjs/index.js +9 -3
  5. package/lib/cjs/index.js.map +1 -1
  6. package/lib/cjs/interceptors/PlatformCacheInterceptor.js +77 -50
  7. package/lib/cjs/interceptors/PlatformCacheInterceptor.js.map +1 -1
  8. package/lib/cjs/interfaces/PlatformCacheOptions.js.map +1 -1
  9. package/lib/cjs/interfaces/interfaces.js +3 -0
  10. package/lib/cjs/interfaces/interfaces.js.map +1 -0
  11. package/lib/cjs/package.json +3 -0
  12. package/lib/cjs/services/PlatformCache.js +69 -24
  13. package/lib/cjs/services/PlatformCache.js.map +1 -1
  14. package/lib/esm/decorators/useCache.js +2 -3
  15. package/lib/esm/decorators/useCache.js.map +1 -1
  16. package/lib/esm/index.js +9 -3
  17. package/lib/esm/index.js.map +1 -1
  18. package/lib/esm/interceptors/PlatformCacheInterceptor.js +75 -48
  19. package/lib/esm/interceptors/PlatformCacheInterceptor.js.map +1 -1
  20. package/lib/esm/interfaces/PlatformCacheOptions.js.map +1 -1
  21. package/lib/esm/interfaces/interfaces.js +2 -0
  22. package/lib/esm/interfaces/interfaces.js.map +1 -0
  23. package/lib/esm/package.json +3 -0
  24. package/lib/esm/services/PlatformCache.js +65 -20
  25. package/lib/esm/services/PlatformCache.js.map +1 -1
  26. package/lib/types/index.d.ts +8 -2
  27. package/lib/types/interceptors/PlatformCacheInterceptor.d.ts +12 -2
  28. package/lib/types/interfaces/PlatformCacheOptions.d.ts +1 -0
  29. package/lib/types/interfaces/{index.d.ts → interfaces.d.ts} +4 -1
  30. package/lib/types/services/PlatformCache.d.ts +18 -10
  31. package/package.json +37 -20
  32. package/readme.md +5 -5
  33. package/tsconfig.compile.esm.json +1 -12
  34. package/lib/cjs/interfaces/index.js +0 -5
  35. package/lib/cjs/interfaces/index.js.map +0 -1
  36. package/lib/esm/interfaces/index.js +0 -2
  37. package/lib/esm/interfaces/index.js.map +0 -1
package/readme.md CHANGED
@@ -11,7 +11,8 @@
11
11
  [![npm version](https://badge.fury.io/js/%40tsed%2Fcommon.svg)](https://badge.fury.io/js/%40tsed%2Fcommon)
12
12
  [![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)
13
13
  [![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettier)
14
- [![backers](https://opencollective.com/tsed/tiers/badge.svg)](https://opencollective.com/tsed)
14
+ [![github](https://img.shields.io/static/v1?label=Github%20sponsor&message=%E2%9D%A4&logo=GitHub&color=%23fe8e86)](https://github.com/sponsors/romakita)
15
+ [![opencollective](https://img.shields.io/static/v1?label=OpenCollective%20sponsor&message=%E2%9D%A4&logo=OpenCollective&color=%23fe8e86)](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 - 2018 Romain Lenzotti
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,5 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const tslib_1 = require("tslib");
4
- (0, tslib_1.__exportStar)(require("./PlatformCachedObject"), exports);
5
- //# sourceMappingURL=index.js.map
@@ -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,2 +0,0 @@
1
- export * from "./PlatformCachedObject";
2
- //# sourceMappingURL=index.js.map
@@ -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"]}