@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.
- package/.turbo/turbo-build.log +6 -6
- package/CHANGELOG.md +15 -0
- package/dist/index.cjs +7 -1
- package/dist/index.js +7 -1
- package/package.json +2 -2
- package/src/resources/workflow.ts +9 -1
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> @mastra/client-js@0.1.14-alpha.
|
|
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
|
[34mCLI[39m Building entry: src/index.ts
|
|
@@ -9,11 +9,11 @@
|
|
|
9
9
|
[34mCLI[39m Cleaning output folder
|
|
10
10
|
[34mESM[39m Build start
|
|
11
11
|
[34mCJS[39m Build start
|
|
12
|
-
[
|
|
13
|
-
[
|
|
14
|
-
[
|
|
15
|
-
[
|
|
12
|
+
[32mCJS[39m [1mdist/index.cjs [22m[32m21.66 KB[39m
|
|
13
|
+
[32mCJS[39m ⚡️ Build success in 839ms
|
|
14
|
+
[32mESM[39m [1mdist/index.js [22m[32m21.48 KB[39m
|
|
15
|
+
[32mESM[39m ⚡️ Build success in 842ms
|
|
16
16
|
[34mDTS[39m Build start
|
|
17
|
-
[32mDTS[39m ⚡️ Build success in
|
|
17
|
+
[32mDTS[39m ⚡️ Build success in 13190ms
|
|
18
18
|
[32mDTS[39m [1mdist/index.d.ts [22m[32m18.97 KB[39m
|
|
19
19
|
[32mDTS[39m [1mdist/index.d.cts [22m[32m18.97 KB[39m
|
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
|
-
|
|
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
|
-
|
|
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.
|
|
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.
|
|
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
|
-
|
|
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) {
|