@mastra/cloudflare-d1 0.12.2 → 0.12.4-alpha.0

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/dist/index.cjs CHANGED
@@ -1223,13 +1223,12 @@ var StoreOperationsD1 = class extends storage.StoreOperations {
1223
1223
  sql,
1224
1224
  params: formattedParams
1225
1225
  });
1226
- if (!response.result) {
1227
- return first ? null : [];
1228
- }
1226
+ const result = response.result || [];
1227
+ const results = result.flatMap((r) => r.results || []);
1229
1228
  if (first) {
1230
- return response.result[0] || null;
1229
+ return results[0] || null;
1231
1230
  }
1232
- return response.result;
1231
+ return results;
1233
1232
  } catch (error$1) {
1234
1233
  throw new error.MastraError(
1235
1234
  {
package/dist/index.js CHANGED
@@ -1217,13 +1217,12 @@ var StoreOperationsD1 = class extends StoreOperations {
1217
1217
  sql,
1218
1218
  params: formattedParams
1219
1219
  });
1220
- if (!response.result) {
1221
- return first ? null : [];
1222
- }
1220
+ const result = response.result || [];
1221
+ const results = result.flatMap((r) => r.results || []);
1223
1222
  if (first) {
1224
- return response.result[0] || null;
1223
+ return results[0] || null;
1225
1224
  }
1226
- return response.result;
1225
+ return results;
1227
1226
  } catch (error) {
1228
1227
  throw new MastraError(
1229
1228
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mastra/cloudflare-d1",
3
- "version": "0.12.2",
3
+ "version": "0.12.4-alpha.0",
4
4
  "description": "D1 provider for Mastra - includes db storage capabilities",
5
5
  "type": "module",
6
6
  "files": [
@@ -25,7 +25,7 @@
25
25
  "cloudflare": "^4.4.1"
26
26
  },
27
27
  "devDependencies": {
28
- "@cloudflare/workers-types": "^4.20250705.0",
28
+ "@cloudflare/workers-types": "^4.20250722.0",
29
29
  "@microsoft/api-extractor": "^7.52.8",
30
30
  "@types/node": "^20.19.0",
31
31
  "dotenv": "^17.0.0",
@@ -34,12 +34,12 @@
34
34
  "tsup": "^8.5.0",
35
35
  "typescript": "^5.8.3",
36
36
  "vitest": "^3.2.4",
37
- "@internal/lint": "0.0.21",
38
- "@internal/storage-test-utils": "0.0.17",
39
- "@mastra/core": "0.11.0"
37
+ "@internal/storage-test-utils": "0.0.19",
38
+ "@internal/lint": "0.0.23",
39
+ "@mastra/core": "0.12.0-alpha.0"
40
40
  },
41
41
  "peerDependencies": {
42
- "@mastra/core": ">=0.10.7-0 <0.11.0-0"
42
+ "@mastra/core": ">=0.10.7-0 <0.12.0-0"
43
43
  },
44
44
  "scripts": {
45
45
  "build": "tsup src/index.ts --format esm,cjs --experimental-dts --clean --treeshake=smallest --splitting",