@maestro-js/cache 1.0.0-alpha.23 → 1.0.0-alpha.4

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 (2) hide show
  1. package/dist/index.d.ts +3 -4
  2. package/package.json +4 -4
package/dist/index.d.ts CHANGED
@@ -1,6 +1,8 @@
1
1
  import { Log } from '@maestro-js/log';
2
2
  import Redis$1, { Redis } from 'ioredis';
3
3
 
4
+ type DurationString = `${number} ${'day' | 'days' | 'hour' | 'hours' | 'minute' | 'minutes' | 'second' | 'seconds'}`;
5
+
4
6
  /** Contract that every cache backend (Redis, MockRedis, etc.) must implement */
5
7
  interface CacheDriver {
6
8
  /** Checks whether `key` exists in the store */
@@ -60,9 +62,6 @@ declare function redisCacheDriver({ url, port, operationTimeout, connectTimeout,
60
62
  connection: Redis$1;
61
63
  };
62
64
 
63
- type DurationString = `${number} ${'day' | 'days' | 'hour' | 'hours' | 'minute' | 'minutes' | 'second' | 'seconds'}`;
64
-
65
- type CacheDurationString = DurationString;
66
65
  /**
67
66
  * Creates a new Cache service instance with the provided driver configuration.
68
67
  */
@@ -164,7 +163,7 @@ declare namespace Cache {
164
163
  /** Pluggable backend implementation — see `Cache.drivers` for built-in options */
165
164
  type Driver = CacheDriver;
166
165
  /** Duration string like `'5 minutes'` or `'1 hour'` */
167
- type DurationString = CacheDurationString;
166
+ type DurationString = DurationString;
168
167
  /** TTL options for `remember` — a number (seconds), `null` (forever), a duration string, or an object with `ttl` and `swr` */
169
168
  type RememberOptions = number | null | DurationString | {
170
169
  ttl: number | DurationString | null;
package/package.json CHANGED
@@ -13,16 +13,16 @@
13
13
  "ioredis-timeout": "^1.5.0",
14
14
  "ioredis-mock": "^8.2.0",
15
15
  "@types/ioredis-mock": "^8.2.6",
16
- "@maestro-js/service-registry": "1.0.0-alpha.23"
16
+ "@maestro-js/service-registry": "1.0.0-alpha.4"
17
17
  },
18
18
  "peerDependencies": {
19
- "@maestro-js/log": "1.0.0-alpha.23"
19
+ "@maestro-js/log": "1.0.0-alpha.4"
20
20
  },
21
21
  "devDependencies": {
22
22
  "@types/node": "^22.19.11",
23
- "@maestro-js/log": "1.0.0-alpha.23"
23
+ "@maestro-js/log": "1.0.0-alpha.4"
24
24
  },
25
- "version": "1.0.0-alpha.23",
25
+ "version": "1.0.0-alpha.4",
26
26
  "publishConfig": {
27
27
  "access": "restricted"
28
28
  },