@mastra/cloudflare 0.1.5-alpha.0 → 0.2.0-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.
package/dist/index.cjs CHANGED
@@ -866,7 +866,7 @@ var CloudflareStore = class extends storage.MastraStorage {
866
866
  }
867
867
  }
868
868
  validateWorkflowState(state) {
869
- if (!state?.runId || !state?.value || !state?.context?.steps || !state?.context?.triggerData || !state?.context?.attempts || !state?.activePaths) {
869
+ if (!state?.runId || !state?.value || !state?.context?.input || !state?.activePaths) {
870
870
  throw new Error("Invalid workflow state structure");
871
871
  }
872
872
  }
@@ -882,15 +882,10 @@ var CloudflareStore = class extends storage.MastraStorage {
882
882
  return normalizedSteps;
883
883
  }
884
884
  normalizeWorkflowState(data) {
885
- const steps = data.context?.stepResults || data.context?.steps || {};
886
885
  return {
887
886
  runId: data.runId,
888
887
  value: data.value,
889
- context: {
890
- steps: this.normalizeSteps(steps),
891
- triggerData: data.context?.triggerData || {},
892
- attempts: data.context?.attempts || {}
893
- },
888
+ context: data.context,
894
889
  suspendedPaths: data.suspendedPaths || {},
895
890
  activePaths: data.activePaths || [],
896
891
  timestamp: data.timestamp || Date.now()
package/dist/index.js CHANGED
@@ -860,7 +860,7 @@ var CloudflareStore = class extends MastraStorage {
860
860
  }
861
861
  }
862
862
  validateWorkflowState(state) {
863
- if (!state?.runId || !state?.value || !state?.context?.steps || !state?.context?.triggerData || !state?.context?.attempts || !state?.activePaths) {
863
+ if (!state?.runId || !state?.value || !state?.context?.input || !state?.activePaths) {
864
864
  throw new Error("Invalid workflow state structure");
865
865
  }
866
866
  }
@@ -876,15 +876,10 @@ var CloudflareStore = class extends MastraStorage {
876
876
  return normalizedSteps;
877
877
  }
878
878
  normalizeWorkflowState(data) {
879
- const steps = data.context?.stepResults || data.context?.steps || {};
880
879
  return {
881
880
  runId: data.runId,
882
881
  value: data.value,
883
- context: {
884
- steps: this.normalizeSteps(steps),
885
- triggerData: data.context?.triggerData || {},
886
- attempts: data.context?.attempts || {}
887
- },
882
+ context: data.context,
888
883
  suspendedPaths: data.suspendedPaths || {},
889
884
  activePaths: data.activePaths || [],
890
885
  timestamp: data.timestamp || Date.now()
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mastra/cloudflare",
3
- "version": "0.1.5-alpha.0",
3
+ "version": "0.2.0-alpha.1",
4
4
  "description": "Cloudflare provider for Mastra - includes db storage capabilities",
5
5
  "type": "module",
6
6
  "files": [
@@ -23,8 +23,7 @@
23
23
  },
24
24
  "license": "MIT",
25
25
  "dependencies": {
26
- "cloudflare": "^4.1.0",
27
- "@mastra/core": "^0.9.5-alpha.0"
26
+ "cloudflare": "^4.1.0"
28
27
  },
29
28
  "devDependencies": {
30
29
  "@cloudflare/workers-types": "^4.20250313.0",
@@ -36,7 +35,11 @@
36
35
  "tsup": "^8.4.0",
37
36
  "typescript": "^5.8.2",
38
37
  "vitest": "^3.1.2",
39
- "@internal/lint": "0.0.5"
38
+ "@internal/lint": "0.0.5",
39
+ "@mastra/core": "0.10.0-alpha.1"
40
+ },
41
+ "peerDependencies": {
42
+ "@mastra/core": "^0.9.4"
40
43
  },
41
44
  "scripts": {
42
45
  "build": "tsup src/index.ts --format esm,cjs --experimental-dts --clean --treeshake=smallest --splitting",