Commit 97ff0ad
fix: convert Buffer to Uint8Array for browser hydration compatibility
The workflow web inspect now performs client-side hydration using
hydrateData() from @workflow/core/serialization-format. This function
checks for Uint8Array using instanceof, which fails for Buffer in the
browser since Buffer doesn't exist in browser environments.
This fix ensures that MongoDB Binary data is converted to true Uint8Array
before being returned, enabling proper data hydration in workflow web inspect.
Changes:
- Add bufferToUint8Array() helper function
- Update stripUndefined() to convert Buffer/Binary to Uint8Array
- Update cleanMongoDoc() to convert Buffer/Binary to Uint8Array
- Update dependencies to latest workflow versions
Signed-off-by: Assistant <assistant@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>1 parent 4c2fed0 commit 97ff0ad
2 files changed
Lines changed: 25 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
33 | | - | |
| 32 | + | |
| 33 | + | |
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
| 42 | + | |
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
84 | 90 | | |
85 | 91 | | |
86 | 92 | | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
87 | 101 | | |
88 | | - | |
89 | 102 | | |
90 | 103 | | |
91 | 104 | | |
| |||
103 | 116 | | |
104 | 117 | | |
105 | 118 | | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
106 | 127 | | |
107 | | - | |
108 | 128 | | |
109 | 129 | | |
110 | 130 | | |
| |||
0 commit comments