prisma-cursorstream 0.3.0 → 0.4.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/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2023 Hasan Arous (EtaBits)
3
+ Copyright (c) 2025 Hasan Arous (EtaBits)
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/dist/index.d.ts CHANGED
@@ -6,7 +6,7 @@ declare const _default: (client: any) => PrismaClientExtends<import("@prisma/cli
6
6
  batchSize?: number | undefined;
7
7
  prefill?: number | undefined;
8
8
  batchTransformer?: C | undefined;
9
- }): Iterable<C extends Function ? Awaited<ReturnType<C>>[number] extends object ? Awaited<ReturnType<C>>[number] : R : R>;
9
+ }): AsyncIterable<C extends Function ? Awaited<ReturnType<C>>[number] extends object ? Awaited<ReturnType<C>>[number] : R : R>;
10
10
  };
11
11
  }, {}, {}> & DefaultArgs>;
12
12
  export default _default;
package/dist/index.js CHANGED
@@ -25,11 +25,9 @@ exports.default = extension_1.Prisma.defineExtension((client) => {
25
25
  ...findManyArgs,
26
26
  take,
27
27
  skip: cursorValue ? 1 : 0,
28
- cursor: cursorValue
29
- ? {
30
- [cursorField]: cursorValue,
31
- }
32
- : undefined,
28
+ ...(typeof cursorValue !== "undefined"
29
+ ? { cursor: { [cursorField]: cursorValue } }
30
+ : {}),
33
31
  });
34
32
  const transformedResults = batchTransformer
35
33
  ? await batchTransformer(results)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "prisma-cursorstream",
3
- "version": "0.3.0",
3
+ "version": "0.4.1",
4
4
  "description": "Prisma Stream Client Extension (Cursor-based Implementation)",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -19,7 +19,7 @@
19
19
  "typescript": "^5.1.6"
20
20
  },
21
21
  "peerDependencies": {
22
- "@prisma/client": "^5.1.1"
22
+ "@prisma/client": ">= 5.1.1 < 7"
23
23
  },
24
24
  "scripts": {}
25
25
  }