@prismakit/cli 4.0.0 → 4.0.1

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.0",
3
+ "version": "4.0.1",
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.0"
32
+ "@prismakit/core": "4.0.1"
33
33
  },
34
34
  "peerDependencies": {
35
- "@prismakit/core": ">=4.0.0 <5"
35
+ "@prismakit/core": ">=4.0.1 <5"
36
36
  },
37
37
  "devDependencies": {
38
38
  "typescript": "^5.9.2",
@@ -143,7 +143,7 @@ await repo.invalidateCache({ id?: string; tags?: string[] });
143
143
  {prefix}:v2:repo:{model}:t:{tag}:__idx
144
144
  ```
145
145
 
146
- Redis payloads use tagged JSON for `Date`, `BigInt`, `Bytes`, and `Decimal`. Custom revive: `createRedisJsonReviver` from `@prismakit/redis`.
146
+ 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
147
 
148
148
  ### Debug
149
149
 
@@ -175,6 +175,7 @@ new RedisCacheAdapter({
175
175
  prefix: 'myapp', // default 'prismakit'
176
176
  compression: 'gzip', // 'none' | 'gzip'
177
177
  compressionThresholdBytes: 1024,
178
+ decimalFactory: (s) => new Prisma.Decimal(s),
178
179
  });
179
180
  ```
180
181
 
@@ -30,7 +30,10 @@ import { RedisCacheAdapter } from '@prismakit/redis';
30
30
  imports: [
31
31
  PrismaKitModule.forRoot({
32
32
  prisma: prismaClient,
33
- cache: new RedisCacheAdapter({ prefix: 'myapp' }),
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 },