@mastra/cloudflare-d1 0.13.9 → 0.13.10
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 +20 -0
- package/dist/index.cjs +8 -10
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +8 -10
- package/dist/index.js.map +1 -1
- package/dist/storage/domains/workflows/index.d.ts +2 -9
- package/dist/storage/domains/workflows/index.d.ts.map +1 -1
- package/dist/storage/index.d.ts +2 -9
- package/dist/storage/index.d.ts.map +1 -1
- package/package.json +5 -5
package/dist/index.js
CHANGED
|
@@ -2105,13 +2105,18 @@ var WorkflowsStorageD1 = class extends WorkflowsStorage {
|
|
|
2105
2105
|
toDate,
|
|
2106
2106
|
limit,
|
|
2107
2107
|
offset,
|
|
2108
|
-
resourceId
|
|
2108
|
+
resourceId,
|
|
2109
|
+
status
|
|
2109
2110
|
} = {}) {
|
|
2110
2111
|
const fullTableName = this.operations.getTableName(TABLE_WORKFLOW_SNAPSHOT);
|
|
2111
2112
|
try {
|
|
2112
2113
|
const builder = createSqlBuilder().select().from(fullTableName);
|
|
2113
2114
|
const countBuilder = createSqlBuilder().count().from(fullTableName);
|
|
2114
2115
|
if (workflowName) builder.whereAnd("workflow_name = ?", workflowName);
|
|
2116
|
+
if (status) {
|
|
2117
|
+
builder.whereAnd("json_extract(snapshot, '$.status') = ?", status);
|
|
2118
|
+
countBuilder.whereAnd("json_extract(snapshot, '$.status') = ?", status);
|
|
2119
|
+
}
|
|
2115
2120
|
if (resourceId) {
|
|
2116
2121
|
const hasResourceId = await this.operations.hasColumn(fullTableName, "resourceId");
|
|
2117
2122
|
if (hasResourceId) {
|
|
@@ -2405,15 +2410,8 @@ var D1Store = class extends MastraStorage {
|
|
|
2405
2410
|
async loadWorkflowSnapshot(params) {
|
|
2406
2411
|
return this.stores.workflows.loadWorkflowSnapshot(params);
|
|
2407
2412
|
}
|
|
2408
|
-
async getWorkflowRuns({
|
|
2409
|
-
|
|
2410
|
-
fromDate,
|
|
2411
|
-
toDate,
|
|
2412
|
-
limit,
|
|
2413
|
-
offset,
|
|
2414
|
-
resourceId
|
|
2415
|
-
} = {}) {
|
|
2416
|
-
return this.stores.workflows.getWorkflowRuns({ workflowName, fromDate, toDate, limit, offset, resourceId });
|
|
2413
|
+
async getWorkflowRuns(args = {}) {
|
|
2414
|
+
return this.stores.workflows.getWorkflowRuns(args);
|
|
2417
2415
|
}
|
|
2418
2416
|
async getWorkflowRunById({
|
|
2419
2417
|
runId,
|