@prismakit/cli 4.0.0 → 4.0.2
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prismakit/cli",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.2",
|
|
4
4
|
"description": "CLI for PrismaKit — generate modules, validate compose, install agent skills",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"engines": {
|
|
@@ -29,10 +29,10 @@
|
|
|
29
29
|
"README.md"
|
|
30
30
|
],
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@prismakit/core": "4.0.
|
|
32
|
+
"@prismakit/core": "4.0.2"
|
|
33
33
|
},
|
|
34
34
|
"peerDependencies": {
|
|
35
|
-
"@prismakit/core": ">=4.0.
|
|
35
|
+
"@prismakit/core": ">=4.0.2 <5"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"typescript": "^5.9.2",
|
|
@@ -122,6 +122,7 @@ await repo.invalidateCache({ id?: string; tags?: string[] });
|
|
|
122
122
|
| `defaultSetCache` | `false` | Reads cache unless caller passes `setCache: false`. |
|
|
123
123
|
| `stampede` | see below | Per-repo stampede overrides. |
|
|
124
124
|
| `strictInvalidation` | `false` | When true, invalidation failures rethrow. |
|
|
125
|
+
| `writeGateTtlSeconds` | `5` | Block cache SET after invalidate (stale in-flight GET race). `false` / `0` disables. |
|
|
125
126
|
|
|
126
127
|
### `InvalidateMode`
|
|
127
128
|
|
|
@@ -143,7 +144,7 @@ await repo.invalidateCache({ id?: string; tags?: string[] });
|
|
|
143
144
|
{prefix}:v2:repo:{model}:t:{tag}:__idx
|
|
144
145
|
```
|
|
145
146
|
|
|
146
|
-
Redis payloads use tagged JSON for `Date`, `BigInt`, `Bytes`, and `Decimal`.
|
|
147
|
+
Redis payloads use tagged JSON for `Date`, `BigInt`, `Bytes`, and `Decimal`. Pass `decimalFactory: (s) => new Prisma.Decimal(s)` on `RedisCacheAdapter` (and/or Nest `PrismaKitModule.forRoot`) so compose clone and cache hits return native Prisma scalars — `JSON.stringify` otherwise turns `Date`/`Decimal` into strings via `toJSON`.
|
|
147
148
|
|
|
148
149
|
### Debug
|
|
149
150
|
|
|
@@ -175,6 +176,7 @@ new RedisCacheAdapter({
|
|
|
175
176
|
prefix: 'myapp', // default 'prismakit'
|
|
176
177
|
compression: 'gzip', // 'none' | 'gzip'
|
|
177
178
|
compressionThresholdBytes: 1024,
|
|
179
|
+
decimalFactory: (s) => new Prisma.Decimal(s),
|
|
178
180
|
});
|
|
179
181
|
```
|
|
180
182
|
|
|
@@ -30,7 +30,10 @@ import { RedisCacheAdapter } from '@prismakit/redis';
|
|
|
30
30
|
imports: [
|
|
31
31
|
PrismaKitModule.forRoot({
|
|
32
32
|
prisma: prismaClient,
|
|
33
|
-
cache: new RedisCacheAdapter({
|
|
33
|
+
cache: new RedisCacheAdapter({
|
|
34
|
+
prefix: 'myapp',
|
|
35
|
+
decimalFactory: (s) => new Prisma.Decimal(s),
|
|
36
|
+
}),
|
|
34
37
|
schemaPath: 'prisma/schema.prisma', // default; Prisma 5/6: dmmf: Prisma.dmmf
|
|
35
38
|
validateCompose: true,
|
|
36
39
|
compose: { maxDepth: 6, parallel: true, setCache: true },
|