@mastra/cloudflare 1.0.0-beta.5 → 1.0.0-beta.6
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 +13 -0
- package/dist/index.cjs +25 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +25 -0
- package/dist/index.js.map +1 -1
- package/dist/storage/domains/workflows/index.d.ts +4 -0
- package/dist/storage/domains/workflows/index.d.ts.map +1 -1
- package/dist/storage/index.d.ts +5 -0
- package/dist/storage/index.d.ts.map +1 -1
- package/dist/storage/types.d.ts +2 -1
- package/dist/storage/types.d.ts.map +1 -1
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -2046,6 +2046,28 @@ var WorkflowsStorageCloudflare = class extends WorkflowsStorage {
|
|
|
2046
2046
|
return null;
|
|
2047
2047
|
}
|
|
2048
2048
|
}
|
|
2049
|
+
async deleteWorkflowRunById({ runId, workflowName }) {
|
|
2050
|
+
try {
|
|
2051
|
+
if (!runId || !workflowName) {
|
|
2052
|
+
throw new Error("runId and workflowName are required");
|
|
2053
|
+
}
|
|
2054
|
+
const key = this.operations.getKey(TABLE_WORKFLOW_SNAPSHOT, { workflow_name: workflowName, run_id: runId });
|
|
2055
|
+
await this.operations.deleteKV(TABLE_WORKFLOW_SNAPSHOT, key);
|
|
2056
|
+
} catch (error) {
|
|
2057
|
+
throw new MastraError(
|
|
2058
|
+
{
|
|
2059
|
+
id: createStorageErrorId("CLOUDFLARE", "DELETE_WORKFLOW_RUN_BY_ID", "FAILED"),
|
|
2060
|
+
domain: ErrorDomain.STORAGE,
|
|
2061
|
+
category: ErrorCategory.THIRD_PARTY,
|
|
2062
|
+
details: {
|
|
2063
|
+
workflowName,
|
|
2064
|
+
runId
|
|
2065
|
+
}
|
|
2066
|
+
},
|
|
2067
|
+
error
|
|
2068
|
+
);
|
|
2069
|
+
}
|
|
2070
|
+
}
|
|
2049
2071
|
};
|
|
2050
2072
|
|
|
2051
2073
|
// src/storage/types.ts
|
|
@@ -2237,6 +2259,9 @@ var CloudflareStore = class extends MastraStorage {
|
|
|
2237
2259
|
}) {
|
|
2238
2260
|
return this.stores.workflows.getWorkflowRunById({ runId, workflowName });
|
|
2239
2261
|
}
|
|
2262
|
+
async deleteWorkflowRunById({ runId, workflowName }) {
|
|
2263
|
+
return this.stores.workflows.deleteWorkflowRunById({ runId, workflowName });
|
|
2264
|
+
}
|
|
2240
2265
|
async updateMessages(args) {
|
|
2241
2266
|
return this.stores.memory.updateMessages(args);
|
|
2242
2267
|
}
|