@mastra/client-js 0.1.14-alpha.4 → 0.1.14-alpha.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.
@@ -1,5 +1,5 @@
1
1
 
2
- > @mastra/client-js@0.1.14-alpha.4 build /home/runner/work/mastra/mastra/client-sdks/client-js
2
+ > @mastra/client-js@0.1.14-alpha.6 build /home/runner/work/mastra/mastra/client-sdks/client-js
3
3
  > tsup src/index.ts --format esm,cjs --dts --clean --treeshake=smallest --splitting
4
4
 
5
5
  CLI Building entry: src/index.ts
@@ -9,11 +9,11 @@
9
9
  CLI Cleaning output folder
10
10
  ESM Build start
11
11
  CJS Build start
12
- ESM dist/index.js 21.30 KB
13
- ESM ⚡️ Build success in 923ms
14
- CJS dist/index.cjs 21.48 KB
15
- CJS ⚡️ Build success in 932ms
12
+ CJS dist/index.cjs 21.66 KB
13
+ CJS ⚡️ Build success in 839ms
14
+ ESM dist/index.js 21.48 KB
15
+ ESM ⚡️ Build success in 842ms
16
16
  DTS Build start
17
- DTS ⚡️ Build success in 12862ms
17
+ DTS ⚡️ Build success in 13190ms
18
18
  DTS dist/index.d.ts 18.97 KB
19
19
  DTS dist/index.d.cts 18.97 KB
package/CHANGELOG.md CHANGED
@@ -1,5 +1,20 @@
1
1
  # @mastra/client-js
2
2
 
3
+ ## 0.1.14-alpha.6
4
+
5
+ ### Patch Changes
6
+
7
+ - 5646a01: Fix parsing chunk in client-js workflow watch method sometimes failing, disrupting the stream process
8
+ - Updated dependencies [a3f0e90]
9
+ - @mastra/core@0.8.0-alpha.6
10
+
11
+ ## 0.1.14-alpha.5
12
+
13
+ ### Patch Changes
14
+
15
+ - Updated dependencies [93875ed]
16
+ - @mastra/core@0.8.0-alpha.5
17
+
3
18
  ## 0.1.14-alpha.4
4
19
 
5
20
  ### Patch Changes
package/dist/index.cjs CHANGED
@@ -479,7 +479,13 @@ var Workflow = class extends BaseResource {
479
479
  buffer = chunks.pop() || "";
480
480
  for (const chunk of chunks) {
481
481
  if (chunk) {
482
- yield JSON.parse(chunk);
482
+ if (typeof chunk === "string") {
483
+ try {
484
+ const parsedChunk = JSON.parse(chunk);
485
+ yield parsedChunk;
486
+ } catch {
487
+ }
488
+ }
483
489
  }
484
490
  }
485
491
  } catch (error) {
package/dist/index.js CHANGED
@@ -477,7 +477,13 @@ var Workflow = class extends BaseResource {
477
477
  buffer = chunks.pop() || "";
478
478
  for (const chunk of chunks) {
479
479
  if (chunk) {
480
- yield JSON.parse(chunk);
480
+ if (typeof chunk === "string") {
481
+ try {
482
+ const parsedChunk = JSON.parse(chunk);
483
+ yield parsedChunk;
484
+ } catch {
485
+ }
486
+ }
481
487
  }
482
488
  }
483
489
  } catch (error) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mastra/client-js",
3
- "version": "0.1.14-alpha.4",
3
+ "version": "0.1.14-alpha.6",
4
4
  "description": "The official TypeScript library for the Mastra Client API",
5
5
  "author": "",
6
6
  "type": "module",
@@ -26,7 +26,7 @@
26
26
  "json-schema": "^0.4.0",
27
27
  "zod": "^3.24.2",
28
28
  "zod-to-json-schema": "^3.24.3",
29
- "@mastra/core": "^0.8.0-alpha.4"
29
+ "@mastra/core": "^0.8.0-alpha.6"
30
30
  },
31
31
  "devDependencies": {
32
32
  "@babel/preset-env": "^7.26.9",
@@ -157,7 +157,15 @@ export class Workflow extends BaseResource {
157
157
  for (const chunk of chunks) {
158
158
  if (chunk) {
159
159
  // Only process non-empty chunks
160
- yield JSON.parse(chunk);
160
+ if (typeof chunk === 'string') {
161
+ try {
162
+ const parsedChunk = JSON.parse(chunk);
163
+ yield parsedChunk;
164
+ } catch {
165
+ // Silently ignore parsing errors to maintain stream processing
166
+ // This allows the stream to continue even if one record is malformed
167
+ }
168
+ }
161
169
  }
162
170
  }
163
171
  } catch (error) {