@mastra/cloudflare-d1 1.0.0-beta.2 → 1.0.0-beta.3
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/CHANGELOG.md +31 -0
- package/dist/index.cjs +38 -38
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +39 -39
- package/dist/index.js.map +1 -1
- package/dist/storage/domains/memory/index.d.ts.map +1 -1
- package/dist/storage/domains/operations/index.d.ts.map +1 -1
- package/dist/storage/domains/scores/index.d.ts.map +1 -1
- package/dist/storage/domains/workflows/index.d.ts.map +1 -1
- package/dist/storage/index.d.ts +31 -14
- package/dist/storage/index.d.ts.map +1 -1
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,36 @@
|
|
|
1
1
|
# @mastra/cloudflare-d1
|
|
2
2
|
|
|
3
|
+
## 1.0.0-beta.3
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- Add `disableInit` option to all storage adapters ([#10851](https://github.com/mastra-ai/mastra/pull/10851))
|
|
8
|
+
|
|
9
|
+
Adds a new `disableInit` config option to all storage providers that allows users to disable automatic table creation/migrations at runtime. This is useful for CI/CD pipelines where you want to run migrations during deployment with elevated credentials, then run the application with `disableInit: true` so it doesn't attempt schema changes at runtime.
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
// CI/CD script - run migrations
|
|
13
|
+
const storage = new PostgresStore({
|
|
14
|
+
connectionString: DATABASE_URL,
|
|
15
|
+
id: 'pg-storage',
|
|
16
|
+
});
|
|
17
|
+
await storage.init();
|
|
18
|
+
|
|
19
|
+
// Runtime - skip auto-init
|
|
20
|
+
const storage = new PostgresStore({
|
|
21
|
+
connectionString: DATABASE_URL,
|
|
22
|
+
id: 'pg-storage',
|
|
23
|
+
disableInit: true,
|
|
24
|
+
});
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
### Patch Changes
|
|
28
|
+
|
|
29
|
+
- Standardize error IDs across all storage and vector stores using centralized helper functions (`createStorageErrorId` and `createVectorErrorId`). This ensures consistent error ID patterns (`MASTRA_STORAGE_{STORE}_{OPERATION}_{STATUS}` and `MASTRA_VECTOR_{STORE}_{OPERATION}_{STATUS}`) across the codebase for better error tracking and debugging. ([#10913](https://github.com/mastra-ai/mastra/pull/10913))
|
|
30
|
+
|
|
31
|
+
- Updated dependencies [[`3076c67`](https://github.com/mastra-ai/mastra/commit/3076c6778b18988ae7d5c4c5c466366974b2d63f), [`85d7ee1`](https://github.com/mastra-ai/mastra/commit/85d7ee18ff4e14d625a8a30ec6656bb49804989b), [`c6c1092`](https://github.com/mastra-ai/mastra/commit/c6c1092f8fbf76109303f69e000e96fd1960c4ce), [`81dc110`](https://github.com/mastra-ai/mastra/commit/81dc11008d147cf5bdc8996ead1aa61dbdebb6fc), [`7aedb74`](https://github.com/mastra-ai/mastra/commit/7aedb74883adf66af38e270e4068fd42e7a37036), [`8f02d80`](https://github.com/mastra-ai/mastra/commit/8f02d800777397e4b45d7f1ad041988a8b0c6630), [`d7aad50`](https://github.com/mastra-ai/mastra/commit/d7aad501ce61646b76b4b511e558ac4eea9884d0), [`ce0a73a`](https://github.com/mastra-ai/mastra/commit/ce0a73abeaa75b10ca38f9e40a255a645d50ebfb), [`a02e542`](https://github.com/mastra-ai/mastra/commit/a02e542d23179bad250b044b17ff023caa61739f), [`a372c64`](https://github.com/mastra-ai/mastra/commit/a372c640ad1fd12e8f0613cebdc682fc156b4d95), [`8846867`](https://github.com/mastra-ai/mastra/commit/8846867ffa9a3746767618e314bebac08eb77d87), [`42a42cf`](https://github.com/mastra-ai/mastra/commit/42a42cf3132b9786feecbb8c13c583dce5b0e198), [`ae08bf0`](https://github.com/mastra-ai/mastra/commit/ae08bf0ebc6a4e4da992b711c4a389c32ba84cf4), [`21735a7`](https://github.com/mastra-ai/mastra/commit/21735a7ef306963554a69a89b44f06c3bcd85141), [`1d877b8`](https://github.com/mastra-ai/mastra/commit/1d877b8d7b536a251c1a7a18db7ddcf4f68d6f8b)]:
|
|
32
|
+
- @mastra/core@1.0.0-beta.7
|
|
33
|
+
|
|
3
34
|
## 1.0.0-beta.2
|
|
4
35
|
|
|
5
36
|
### Patch Changes
|
package/dist/index.cjs
CHANGED
|
@@ -281,7 +281,7 @@ var MemoryStorageD1 = class extends storage.MemoryStorage {
|
|
|
281
281
|
} catch (error$1) {
|
|
282
282
|
const mastraError = new error.MastraError(
|
|
283
283
|
{
|
|
284
|
-
id: "
|
|
284
|
+
id: storage.createStorageErrorId("CLOUDFLARE_D1", "GET_RESOURCE_BY_ID", "FAILED"),
|
|
285
285
|
domain: error.ErrorDomain.STORAGE,
|
|
286
286
|
category: error.ErrorCategory.THIRD_PARTY,
|
|
287
287
|
text: `Error processing resource ${resourceId}: ${error$1 instanceof Error ? error$1.message : String(error$1)}`,
|
|
@@ -320,7 +320,7 @@ var MemoryStorageD1 = class extends storage.MemoryStorage {
|
|
|
320
320
|
} catch (error$1) {
|
|
321
321
|
throw new error.MastraError(
|
|
322
322
|
{
|
|
323
|
-
id: "
|
|
323
|
+
id: storage.createStorageErrorId("CLOUDFLARE_D1", "SAVE_RESOURCE", "FAILED"),
|
|
324
324
|
domain: error.ErrorDomain.STORAGE,
|
|
325
325
|
category: error.ErrorCategory.THIRD_PARTY,
|
|
326
326
|
text: `Failed to save resource to ${fullTableName}: ${error$1 instanceof Error ? error$1.message : String(error$1)}`,
|
|
@@ -367,7 +367,7 @@ var MemoryStorageD1 = class extends storage.MemoryStorage {
|
|
|
367
367
|
} catch (error$1) {
|
|
368
368
|
throw new error.MastraError(
|
|
369
369
|
{
|
|
370
|
-
id: "
|
|
370
|
+
id: storage.createStorageErrorId("CLOUDFLARE_D1", "UPDATE_RESOURCE", "FAILED"),
|
|
371
371
|
domain: error.ErrorDomain.STORAGE,
|
|
372
372
|
category: error.ErrorCategory.THIRD_PARTY,
|
|
373
373
|
text: `Failed to update resource ${resourceId}: ${error$1 instanceof Error ? error$1.message : String(error$1)}`,
|
|
@@ -393,7 +393,7 @@ var MemoryStorageD1 = class extends storage.MemoryStorage {
|
|
|
393
393
|
} catch (error$1) {
|
|
394
394
|
const mastraError = new error.MastraError(
|
|
395
395
|
{
|
|
396
|
-
id: "
|
|
396
|
+
id: storage.createStorageErrorId("CLOUDFLARE_D1", "GET_THREAD_BY_ID", "FAILED"),
|
|
397
397
|
domain: error.ErrorDomain.STORAGE,
|
|
398
398
|
category: error.ErrorCategory.THIRD_PARTY,
|
|
399
399
|
text: `Error processing thread ${threadId}: ${error$1 instanceof Error ? error$1.message : String(error$1)}`,
|
|
@@ -412,7 +412,7 @@ var MemoryStorageD1 = class extends storage.MemoryStorage {
|
|
|
412
412
|
if (page < 0) {
|
|
413
413
|
throw new error.MastraError(
|
|
414
414
|
{
|
|
415
|
-
id: "
|
|
415
|
+
id: storage.createStorageErrorId("CLOUDFLARE_D1", "LIST_THREADS_BY_RESOURCE_ID", "INVALID_PAGE"),
|
|
416
416
|
domain: error.ErrorDomain.STORAGE,
|
|
417
417
|
category: error.ErrorCategory.USER,
|
|
418
418
|
details: { page }
|
|
@@ -447,7 +447,7 @@ var MemoryStorageD1 = class extends storage.MemoryStorage {
|
|
|
447
447
|
} catch (error$1) {
|
|
448
448
|
const mastraError = new error.MastraError(
|
|
449
449
|
{
|
|
450
|
-
id: "
|
|
450
|
+
id: storage.createStorageErrorId("CLOUDFLARE_D1", "LIST_THREADS_BY_RESOURCE_ID", "FAILED"),
|
|
451
451
|
domain: error.ErrorDomain.STORAGE,
|
|
452
452
|
category: error.ErrorCategory.THIRD_PARTY,
|
|
453
453
|
text: `Error getting threads by resourceId ${resourceId}: ${error$1 instanceof Error ? error$1.message : String(error$1)}`,
|
|
@@ -494,7 +494,7 @@ var MemoryStorageD1 = class extends storage.MemoryStorage {
|
|
|
494
494
|
} catch (error$1) {
|
|
495
495
|
throw new error.MastraError(
|
|
496
496
|
{
|
|
497
|
-
id: "
|
|
497
|
+
id: storage.createStorageErrorId("CLOUDFLARE_D1", "SAVE_THREAD", "FAILED"),
|
|
498
498
|
domain: error.ErrorDomain.STORAGE,
|
|
499
499
|
category: error.ErrorCategory.THIRD_PARTY,
|
|
500
500
|
text: `Failed to save thread to ${fullTableName}: ${error$1 instanceof Error ? error$1.message : String(error$1)}`,
|
|
@@ -537,7 +537,7 @@ var MemoryStorageD1 = class extends storage.MemoryStorage {
|
|
|
537
537
|
} catch (error$1) {
|
|
538
538
|
throw new error.MastraError(
|
|
539
539
|
{
|
|
540
|
-
id: "
|
|
540
|
+
id: storage.createStorageErrorId("CLOUDFLARE_D1", "UPDATE_THREAD", "FAILED"),
|
|
541
541
|
domain: error.ErrorDomain.STORAGE,
|
|
542
542
|
category: error.ErrorCategory.THIRD_PARTY,
|
|
543
543
|
text: `Failed to update thread ${id}: ${error$1 instanceof Error ? error$1.message : String(error$1)}`,
|
|
@@ -560,7 +560,7 @@ var MemoryStorageD1 = class extends storage.MemoryStorage {
|
|
|
560
560
|
} catch (error$1) {
|
|
561
561
|
throw new error.MastraError(
|
|
562
562
|
{
|
|
563
|
-
id: "
|
|
563
|
+
id: storage.createStorageErrorId("CLOUDFLARE_D1", "DELETE_THREAD", "FAILED"),
|
|
564
564
|
domain: error.ErrorDomain.STORAGE,
|
|
565
565
|
category: error.ErrorCategory.THIRD_PARTY,
|
|
566
566
|
text: `Failed to delete thread ${threadId}: ${error$1 instanceof Error ? error$1.message : String(error$1)}`,
|
|
@@ -624,7 +624,7 @@ var MemoryStorageD1 = class extends storage.MemoryStorage {
|
|
|
624
624
|
} catch (error$1) {
|
|
625
625
|
throw new error.MastraError(
|
|
626
626
|
{
|
|
627
|
-
id: "
|
|
627
|
+
id: storage.createStorageErrorId("CLOUDFLARE_D1", "SAVE_MESSAGES", "FAILED"),
|
|
628
628
|
domain: error.ErrorDomain.STORAGE,
|
|
629
629
|
category: error.ErrorCategory.THIRD_PARTY,
|
|
630
630
|
text: `Failed to save messages: ${error$1 instanceof Error ? error$1.message : String(error$1)}`
|
|
@@ -716,7 +716,7 @@ var MemoryStorageD1 = class extends storage.MemoryStorage {
|
|
|
716
716
|
} catch (error$1) {
|
|
717
717
|
const mastraError = new error.MastraError(
|
|
718
718
|
{
|
|
719
|
-
id: "
|
|
719
|
+
id: storage.createStorageErrorId("CLOUDFLARE_D1", "LIST_MESSAGES_BY_ID", "FAILED"),
|
|
720
720
|
domain: error.ErrorDomain.STORAGE,
|
|
721
721
|
category: error.ErrorCategory.THIRD_PARTY,
|
|
722
722
|
text: `Failed to retrieve messages by ID: ${error$1 instanceof Error ? error$1.message : String(error$1)}`,
|
|
@@ -735,7 +735,7 @@ var MemoryStorageD1 = class extends storage.MemoryStorage {
|
|
|
735
735
|
if (threadIds.length === 0 || threadIds.some((id) => !id.trim())) {
|
|
736
736
|
throw new error.MastraError(
|
|
737
737
|
{
|
|
738
|
-
id: "
|
|
738
|
+
id: storage.createStorageErrorId("CLOUDFLARE_D1", "LIST_MESSAGES", "INVALID_THREAD_ID"),
|
|
739
739
|
domain: error.ErrorDomain.STORAGE,
|
|
740
740
|
category: error.ErrorCategory.THIRD_PARTY,
|
|
741
741
|
details: { threadId: Array.isArray(threadId) ? threadId.join(",") : threadId }
|
|
@@ -746,7 +746,7 @@ var MemoryStorageD1 = class extends storage.MemoryStorage {
|
|
|
746
746
|
if (page < 0) {
|
|
747
747
|
throw new error.MastraError(
|
|
748
748
|
{
|
|
749
|
-
id: "
|
|
749
|
+
id: storage.createStorageErrorId("CLOUDFLARE_D1", "LIST_MESSAGES", "INVALID_PAGE"),
|
|
750
750
|
domain: error.ErrorDomain.STORAGE,
|
|
751
751
|
category: error.ErrorCategory.USER,
|
|
752
752
|
details: { page }
|
|
@@ -863,7 +863,7 @@ var MemoryStorageD1 = class extends storage.MemoryStorage {
|
|
|
863
863
|
} catch (error$1) {
|
|
864
864
|
const mastraError = new error.MastraError(
|
|
865
865
|
{
|
|
866
|
-
id: "
|
|
866
|
+
id: storage.createStorageErrorId("CLOUDFLARE_D1", "LIST_MESSAGES", "FAILED"),
|
|
867
867
|
domain: error.ErrorDomain.STORAGE,
|
|
868
868
|
category: error.ErrorCategory.THIRD_PARTY,
|
|
869
869
|
text: `Failed to list messages for thread ${Array.isArray(threadId) ? threadId.join(",") : threadId}: ${error$1 instanceof Error ? error$1.message : String(error$1)}`,
|
|
@@ -976,7 +976,7 @@ var MemoryStorageD1 = class extends storage.MemoryStorage {
|
|
|
976
976
|
} catch (error$1) {
|
|
977
977
|
throw new error.MastraError(
|
|
978
978
|
{
|
|
979
|
-
id: "
|
|
979
|
+
id: storage.createStorageErrorId("CLOUDFLARE_D1", "UPDATE_MESSAGES", "FAILED"),
|
|
980
980
|
domain: error.ErrorDomain.STORAGE,
|
|
981
981
|
category: error.ErrorCategory.THIRD_PARTY,
|
|
982
982
|
details: { count: messages.length }
|
|
@@ -1045,7 +1045,7 @@ var StoreOperationsD1 = class extends storage.StoreOperations {
|
|
|
1045
1045
|
} catch (error$1) {
|
|
1046
1046
|
throw new error.MastraError(
|
|
1047
1047
|
{
|
|
1048
|
-
id: "
|
|
1048
|
+
id: storage.createStorageErrorId("CLOUDFLARE_D1", "WORKERS_BINDING_QUERY", "FAILED"),
|
|
1049
1049
|
domain: error.ErrorDomain.STORAGE,
|
|
1050
1050
|
category: error.ErrorCategory.THIRD_PARTY,
|
|
1051
1051
|
details: { sql }
|
|
@@ -1077,7 +1077,7 @@ var StoreOperationsD1 = class extends storage.StoreOperations {
|
|
|
1077
1077
|
} catch (error$1) {
|
|
1078
1078
|
throw new error.MastraError(
|
|
1079
1079
|
{
|
|
1080
|
-
id: "
|
|
1080
|
+
id: storage.createStorageErrorId("CLOUDFLARE_D1", "REST_QUERY", "FAILED"),
|
|
1081
1081
|
domain: error.ErrorDomain.STORAGE,
|
|
1082
1082
|
category: error.ErrorCategory.THIRD_PARTY,
|
|
1083
1083
|
details: { sql }
|
|
@@ -1158,7 +1158,7 @@ var StoreOperationsD1 = class extends storage.StoreOperations {
|
|
|
1158
1158
|
} catch (error$1) {
|
|
1159
1159
|
throw new error.MastraError(
|
|
1160
1160
|
{
|
|
1161
|
-
id: "
|
|
1161
|
+
id: storage.createStorageErrorId("CLOUDFLARE_D1", "CREATE_TABLE", "FAILED"),
|
|
1162
1162
|
domain: error.ErrorDomain.STORAGE,
|
|
1163
1163
|
category: error.ErrorCategory.THIRD_PARTY,
|
|
1164
1164
|
details: { tableName }
|
|
@@ -1177,7 +1177,7 @@ var StoreOperationsD1 = class extends storage.StoreOperations {
|
|
|
1177
1177
|
} catch (error$1) {
|
|
1178
1178
|
throw new error.MastraError(
|
|
1179
1179
|
{
|
|
1180
|
-
id: "
|
|
1180
|
+
id: storage.createStorageErrorId("CLOUDFLARE_D1", "CLEAR_TABLE", "FAILED"),
|
|
1181
1181
|
domain: error.ErrorDomain.STORAGE,
|
|
1182
1182
|
category: error.ErrorCategory.THIRD_PARTY,
|
|
1183
1183
|
details: { tableName }
|
|
@@ -1195,7 +1195,7 @@ var StoreOperationsD1 = class extends storage.StoreOperations {
|
|
|
1195
1195
|
} catch (error$1) {
|
|
1196
1196
|
throw new error.MastraError(
|
|
1197
1197
|
{
|
|
1198
|
-
id: "
|
|
1198
|
+
id: storage.createStorageErrorId("CLOUDFLARE_D1", "DROP_TABLE", "FAILED"),
|
|
1199
1199
|
domain: error.ErrorDomain.STORAGE,
|
|
1200
1200
|
category: error.ErrorCategory.THIRD_PARTY,
|
|
1201
1201
|
details: { tableName }
|
|
@@ -1221,7 +1221,7 @@ var StoreOperationsD1 = class extends storage.StoreOperations {
|
|
|
1221
1221
|
} catch (error$1) {
|
|
1222
1222
|
throw new error.MastraError(
|
|
1223
1223
|
{
|
|
1224
|
-
id: "
|
|
1224
|
+
id: storage.createStorageErrorId("CLOUDFLARE_D1", "ALTER_TABLE", "FAILED"),
|
|
1225
1225
|
domain: error.ErrorDomain.STORAGE,
|
|
1226
1226
|
category: error.ErrorCategory.THIRD_PARTY,
|
|
1227
1227
|
details: { tableName: args.tableName }
|
|
@@ -1242,7 +1242,7 @@ var StoreOperationsD1 = class extends storage.StoreOperations {
|
|
|
1242
1242
|
} catch (error$1) {
|
|
1243
1243
|
throw new error.MastraError(
|
|
1244
1244
|
{
|
|
1245
|
-
id: "
|
|
1245
|
+
id: storage.createStorageErrorId("CLOUDFLARE_D1", "INSERT", "FAILED"),
|
|
1246
1246
|
domain: error.ErrorDomain.STORAGE,
|
|
1247
1247
|
category: error.ErrorCategory.THIRD_PARTY,
|
|
1248
1248
|
details: { tableName }
|
|
@@ -1266,7 +1266,7 @@ var StoreOperationsD1 = class extends storage.StoreOperations {
|
|
|
1266
1266
|
} catch (error$1) {
|
|
1267
1267
|
throw new error.MastraError(
|
|
1268
1268
|
{
|
|
1269
|
-
id: "
|
|
1269
|
+
id: storage.createStorageErrorId("CLOUDFLARE_D1", "BATCH_INSERT", "FAILED"),
|
|
1270
1270
|
domain: error.ErrorDomain.STORAGE,
|
|
1271
1271
|
category: error.ErrorCategory.THIRD_PARTY,
|
|
1272
1272
|
details: { tableName }
|
|
@@ -1303,7 +1303,7 @@ var StoreOperationsD1 = class extends storage.StoreOperations {
|
|
|
1303
1303
|
} catch (error$1) {
|
|
1304
1304
|
throw new error.MastraError(
|
|
1305
1305
|
{
|
|
1306
|
-
id: "
|
|
1306
|
+
id: storage.createStorageErrorId("CLOUDFLARE_D1", "LOAD", "FAILED"),
|
|
1307
1307
|
domain: error.ErrorDomain.STORAGE,
|
|
1308
1308
|
category: error.ErrorCategory.THIRD_PARTY,
|
|
1309
1309
|
details: { tableName }
|
|
@@ -1361,7 +1361,7 @@ var StoreOperationsD1 = class extends storage.StoreOperations {
|
|
|
1361
1361
|
} catch (error$1) {
|
|
1362
1362
|
throw new error.MastraError(
|
|
1363
1363
|
{
|
|
1364
|
-
id: "
|
|
1364
|
+
id: storage.createStorageErrorId("CLOUDFLARE_D1", "BATCH_UPSERT", "FAILED"),
|
|
1365
1365
|
domain: error.ErrorDomain.STORAGE,
|
|
1366
1366
|
category: error.ErrorCategory.THIRD_PARTY,
|
|
1367
1367
|
text: `Failed to batch upsert into ${tableName}: ${error$1 instanceof Error ? error$1.message : String(error$1)}`,
|
|
@@ -1399,7 +1399,7 @@ var ScoresStorageD1 = class extends storage.ScoresStorage {
|
|
|
1399
1399
|
} catch (error$1) {
|
|
1400
1400
|
throw new error.MastraError(
|
|
1401
1401
|
{
|
|
1402
|
-
id: "
|
|
1402
|
+
id: storage.createStorageErrorId("CLOUDFLARE_D1", "GET_SCORE_BY_ID", "FAILED"),
|
|
1403
1403
|
domain: error.ErrorDomain.STORAGE,
|
|
1404
1404
|
category: error.ErrorCategory.THIRD_PARTY
|
|
1405
1405
|
},
|
|
@@ -1414,7 +1414,7 @@ var ScoresStorageD1 = class extends storage.ScoresStorage {
|
|
|
1414
1414
|
} catch (error$1) {
|
|
1415
1415
|
throw new error.MastraError(
|
|
1416
1416
|
{
|
|
1417
|
-
id: "
|
|
1417
|
+
id: storage.createStorageErrorId("CLOUDFLARE_D1", "SAVE_SCORE", "VALIDATION_FAILED"),
|
|
1418
1418
|
domain: error.ErrorDomain.STORAGE,
|
|
1419
1419
|
category: error.ErrorCategory.USER,
|
|
1420
1420
|
details: { scoreId: score.id }
|
|
@@ -1450,7 +1450,7 @@ var ScoresStorageD1 = class extends storage.ScoresStorage {
|
|
|
1450
1450
|
} catch (error$1) {
|
|
1451
1451
|
throw new error.MastraError(
|
|
1452
1452
|
{
|
|
1453
|
-
id: "
|
|
1453
|
+
id: storage.createStorageErrorId("CLOUDFLARE_D1", "SAVE_SCORE", "FAILED"),
|
|
1454
1454
|
domain: error.ErrorDomain.STORAGE,
|
|
1455
1455
|
category: error.ErrorCategory.THIRD_PARTY
|
|
1456
1456
|
},
|
|
@@ -1521,7 +1521,7 @@ var ScoresStorageD1 = class extends storage.ScoresStorage {
|
|
|
1521
1521
|
} catch (error$1) {
|
|
1522
1522
|
throw new error.MastraError(
|
|
1523
1523
|
{
|
|
1524
|
-
id: "
|
|
1524
|
+
id: storage.createStorageErrorId("CLOUDFLARE_D1", "GET_SCORES_BY_SCORER_ID", "FAILED"),
|
|
1525
1525
|
domain: error.ErrorDomain.STORAGE,
|
|
1526
1526
|
category: error.ErrorCategory.THIRD_PARTY
|
|
1527
1527
|
},
|
|
@@ -1570,7 +1570,7 @@ var ScoresStorageD1 = class extends storage.ScoresStorage {
|
|
|
1570
1570
|
} catch (error$1) {
|
|
1571
1571
|
throw new error.MastraError(
|
|
1572
1572
|
{
|
|
1573
|
-
id: "
|
|
1573
|
+
id: storage.createStorageErrorId("CLOUDFLARE_D1", "GET_SCORES_BY_RUN_ID", "FAILED"),
|
|
1574
1574
|
domain: error.ErrorDomain.STORAGE,
|
|
1575
1575
|
category: error.ErrorCategory.THIRD_PARTY
|
|
1576
1576
|
},
|
|
@@ -1620,7 +1620,7 @@ var ScoresStorageD1 = class extends storage.ScoresStorage {
|
|
|
1620
1620
|
} catch (error$1) {
|
|
1621
1621
|
throw new error.MastraError(
|
|
1622
1622
|
{
|
|
1623
|
-
id: "
|
|
1623
|
+
id: storage.createStorageErrorId("CLOUDFLARE_D1", "GET_SCORES_BY_ENTITY_ID", "FAILED"),
|
|
1624
1624
|
domain: error.ErrorDomain.STORAGE,
|
|
1625
1625
|
category: error.ErrorCategory.THIRD_PARTY
|
|
1626
1626
|
},
|
|
@@ -1670,7 +1670,7 @@ var ScoresStorageD1 = class extends storage.ScoresStorage {
|
|
|
1670
1670
|
} catch (error$1) {
|
|
1671
1671
|
throw new error.MastraError(
|
|
1672
1672
|
{
|
|
1673
|
-
id: "
|
|
1673
|
+
id: storage.createStorageErrorId("CLOUDFLARE_D1", "GET_SCORES_BY_SPAN", "FAILED"),
|
|
1674
1674
|
domain: error.ErrorDomain.STORAGE,
|
|
1675
1675
|
category: error.ErrorCategory.THIRD_PARTY
|
|
1676
1676
|
},
|
|
@@ -1741,7 +1741,7 @@ var WorkflowsStorageD1 = class extends storage.WorkflowsStorage {
|
|
|
1741
1741
|
} catch (error$1) {
|
|
1742
1742
|
throw new error.MastraError(
|
|
1743
1743
|
{
|
|
1744
|
-
id: "
|
|
1744
|
+
id: storage.createStorageErrorId("CLOUDFLARE_D1", "PERSIST_WORKFLOW_SNAPSHOT", "FAILED"),
|
|
1745
1745
|
domain: error.ErrorDomain.STORAGE,
|
|
1746
1746
|
category: error.ErrorCategory.THIRD_PARTY,
|
|
1747
1747
|
text: `Failed to persist workflow snapshot: ${error$1 instanceof Error ? error$1.message : String(error$1)}`,
|
|
@@ -1766,7 +1766,7 @@ var WorkflowsStorageD1 = class extends storage.WorkflowsStorage {
|
|
|
1766
1766
|
} catch (error$1) {
|
|
1767
1767
|
throw new error.MastraError(
|
|
1768
1768
|
{
|
|
1769
|
-
id: "
|
|
1769
|
+
id: storage.createStorageErrorId("CLOUDFLARE_D1", "LOAD_WORKFLOW_SNAPSHOT", "FAILED"),
|
|
1770
1770
|
domain: error.ErrorDomain.STORAGE,
|
|
1771
1771
|
category: error.ErrorCategory.THIRD_PARTY,
|
|
1772
1772
|
text: `Failed to load workflow snapshot: ${error$1 instanceof Error ? error$1.message : String(error$1)}`,
|
|
@@ -1852,7 +1852,7 @@ var WorkflowsStorageD1 = class extends storage.WorkflowsStorage {
|
|
|
1852
1852
|
} catch (error$1) {
|
|
1853
1853
|
throw new error.MastraError(
|
|
1854
1854
|
{
|
|
1855
|
-
id: "
|
|
1855
|
+
id: storage.createStorageErrorId("CLOUDFLARE_D1", "LIST_WORKFLOW_RUNS", "FAILED"),
|
|
1856
1856
|
domain: error.ErrorDomain.STORAGE,
|
|
1857
1857
|
category: error.ErrorCategory.THIRD_PARTY,
|
|
1858
1858
|
text: `Failed to retrieve workflow runs: ${error$1 instanceof Error ? error$1.message : String(error$1)}`,
|
|
@@ -1889,7 +1889,7 @@ var WorkflowsStorageD1 = class extends storage.WorkflowsStorage {
|
|
|
1889
1889
|
} catch (error$1) {
|
|
1890
1890
|
throw new error.MastraError(
|
|
1891
1891
|
{
|
|
1892
|
-
id: "
|
|
1892
|
+
id: storage.createStorageErrorId("CLOUDFLARE_D1", "GET_WORKFLOW_RUN_BY_ID", "FAILED"),
|
|
1893
1893
|
domain: error.ErrorDomain.STORAGE,
|
|
1894
1894
|
category: error.ErrorCategory.THIRD_PARTY,
|
|
1895
1895
|
text: `Failed to retrieve workflow run by ID: ${error$1 instanceof Error ? error$1.message : String(error$1)}`,
|
|
@@ -1914,7 +1914,7 @@ var D1Store = class extends storage.MastraStorage {
|
|
|
1914
1914
|
*/
|
|
1915
1915
|
constructor(config) {
|
|
1916
1916
|
try {
|
|
1917
|
-
super({ id: config.id, name: "D1" });
|
|
1917
|
+
super({ id: config.id, name: "D1", disableInit: config.disableInit });
|
|
1918
1918
|
if (config.tablePrefix && !/^[a-zA-Z0-9_]*$/.test(config.tablePrefix)) {
|
|
1919
1919
|
throw new Error("Invalid tablePrefix: only letters, numbers, and underscores are allowed.");
|
|
1920
1920
|
}
|
|
@@ -1952,7 +1952,7 @@ var D1Store = class extends storage.MastraStorage {
|
|
|
1952
1952
|
} catch (error$1) {
|
|
1953
1953
|
throw new error.MastraError(
|
|
1954
1954
|
{
|
|
1955
|
-
id: "
|
|
1955
|
+
id: storage.createStorageErrorId("CLOUDFLARE_D1", "INITIALIZATION", "FAILED"),
|
|
1956
1956
|
domain: error.ErrorDomain.STORAGE,
|
|
1957
1957
|
category: error.ErrorCategory.SYSTEM,
|
|
1958
1958
|
text: "Error initializing D1Store"
|