@mastra/cloudflare-d1 0.12.3 → 0.12.4-alpha.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.
@@ -124,6 +124,7 @@ declare class D1Store extends MastraStorage {
124
124
  resourceWorkingMemory: boolean;
125
125
  hasColumn: boolean;
126
126
  createTable: boolean;
127
+ deleteMessages: boolean;
127
128
  };
128
129
  createTable({ tableName, schema, }: {
129
130
  tableName: TABLE_NAMES;
@@ -124,6 +124,7 @@ declare class D1Store extends MastraStorage {
124
124
  resourceWorkingMemory: boolean;
125
125
  hasColumn: boolean;
126
126
  createTable: boolean;
127
+ deleteMessages: boolean;
127
128
  };
128
129
  createTable({ tableName, schema, }: {
129
130
  tableName: TABLE_NAMES;
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
  {
@@ -2151,7 +2150,8 @@ var D1Store = class extends storage.MastraStorage {
2151
2150
  selectByIncludeResourceScope: true,
2152
2151
  resourceWorkingMemory: true,
2153
2152
  hasColumn: true,
2154
- createTable: true
2153
+ createTable: true,
2154
+ deleteMessages: false
2155
2155
  };
2156
2156
  }
2157
2157
  async createTable({
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
  {
@@ -2145,7 +2144,8 @@ var D1Store = class extends MastraStorage {
2145
2144
  selectByIncludeResourceScope: true,
2146
2145
  resourceWorkingMemory: true,
2147
2146
  hasColumn: true,
2148
- createTable: true
2147
+ createTable: true,
2148
+ deleteMessages: false
2149
2149
  };
2150
2150
  }
2151
2151
  async createTable({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mastra/cloudflare-d1",
3
- "version": "0.12.3",
3
+ "version": "0.12.4-alpha.1",
4
4
  "description": "D1 provider for Mastra - includes db storage capabilities",
5
5
  "type": "module",
6
6
  "files": [
@@ -22,21 +22,21 @@
22
22
  "./package.json": "./package.json"
23
23
  },
24
24
  "dependencies": {
25
- "cloudflare": "^4.4.1"
25
+ "cloudflare": "^4.5.0"
26
26
  },
27
27
  "devDependencies": {
28
- "@cloudflare/workers-types": "^4.20250705.0",
28
+ "@cloudflare/workers-types": "^4.20250725.0",
29
29
  "@microsoft/api-extractor": "^7.52.8",
30
30
  "@types/node": "^20.19.0",
31
31
  "dotenv": "^17.0.0",
32
32
  "eslint": "^9.30.1",
33
- "miniflare": "^4.20250617.5",
33
+ "miniflare": "^4.20250712.2",
34
34
  "tsup": "^8.5.0",
35
35
  "typescript": "^5.8.3",
36
36
  "vitest": "^3.2.4",
37
- "@internal/lint": "0.0.22",
38
- "@internal/storage-test-utils": "0.0.18",
39
- "@mastra/core": "0.11.1"
37
+ "@internal/lint": "0.0.23",
38
+ "@internal/storage-test-utils": "0.0.19",
39
+ "@mastra/core": "0.12.0-alpha.2"
40
40
  },
41
41
  "peerDependencies": {
42
42
  "@mastra/core": ">=0.10.7-0 <0.12.0-0"