@mastra/client-js 0.1.12 → 0.1.13-alpha.0
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 +9 -0
- package/dist/index.cjs +2 -3
- package/dist/index.js +2 -3
- package/package.json +2 -2
- package/src/resources/base.ts +1 -5
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> @mastra/client-js@0.1.
|
|
2
|
+
> @mastra/client-js@0.1.13-alpha.0 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.09 KB[39m
|
|
13
|
+
[32mCJS[39m ⚡️ Build success in 817ms
|
|
14
|
+
[32mESM[39m [1mdist/index.js [22m[32m20.92 KB[39m
|
|
15
|
+
[32mESM[39m ⚡️ Build success in 821ms
|
|
16
16
|
[34mDTS[39m Build start
|
|
17
|
-
[32mDTS[39m ⚡️ Build success in
|
|
17
|
+
[32mDTS[39m ⚡️ Build success in 10056ms
|
|
18
18
|
[32mDTS[39m [1mdist/index.d.ts [22m[32m18.78 KB[39m
|
|
19
19
|
[32mDTS[39m [1mdist/index.d.cts [22m[32m18.78 KB[39m
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# @mastra/client-js
|
|
2
2
|
|
|
3
|
+
## 0.1.13-alpha.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 0206617: Fix mastaClient cors error, remove default req headers
|
|
8
|
+
- 3811029: Add identifying header
|
|
9
|
+
- Updated dependencies [b4fbc59]
|
|
10
|
+
- @mastra/core@0.6.5-alpha.0
|
|
11
|
+
|
|
3
12
|
## 0.1.12
|
|
4
13
|
|
|
5
14
|
### Patch Changes
|
package/dist/index.cjs
CHANGED
|
@@ -23,13 +23,12 @@ var BaseResource = class {
|
|
|
23
23
|
let delay = backoffMs;
|
|
24
24
|
for (let attempt = 0; attempt <= retries; attempt++) {
|
|
25
25
|
try {
|
|
26
|
-
const defaultHeaders = options.body instanceof FormData ? {} : { "Content-Type": "application/json" };
|
|
27
26
|
const response = await fetch(`${baseUrl}${path}`, {
|
|
28
27
|
...options,
|
|
29
28
|
headers: {
|
|
30
|
-
...defaultHeaders,
|
|
31
29
|
...headers,
|
|
32
|
-
...options.headers
|
|
30
|
+
...options.headers,
|
|
31
|
+
"x-mastra-client-type": "js"
|
|
33
32
|
},
|
|
34
33
|
body: options.body instanceof FormData ? options.body : options.body ? JSON.stringify(options.body) : void 0
|
|
35
34
|
});
|
package/dist/index.js
CHANGED
|
@@ -21,13 +21,12 @@ var BaseResource = class {
|
|
|
21
21
|
let delay = backoffMs;
|
|
22
22
|
for (let attempt = 0; attempt <= retries; attempt++) {
|
|
23
23
|
try {
|
|
24
|
-
const defaultHeaders = options.body instanceof FormData ? {} : { "Content-Type": "application/json" };
|
|
25
24
|
const response = await fetch(`${baseUrl}${path}`, {
|
|
26
25
|
...options,
|
|
27
26
|
headers: {
|
|
28
|
-
...defaultHeaders,
|
|
29
27
|
...headers,
|
|
30
|
-
...options.headers
|
|
28
|
+
...options.headers,
|
|
29
|
+
"x-mastra-client-type": "js"
|
|
31
30
|
},
|
|
32
31
|
body: options.body instanceof FormData ? options.body : options.body ? JSON.stringify(options.body) : void 0
|
|
33
32
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mastra/client-js",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.13-alpha.0",
|
|
4
4
|
"description": "The official TypeScript library for the Mastra Client API",
|
|
5
5
|
"author": "",
|
|
6
6
|
"type": "module",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"json-schema": "^0.4.0",
|
|
26
26
|
"zod": "^3.24.2",
|
|
27
27
|
"zod-to-json-schema": "^3.24.3",
|
|
28
|
-
"@mastra/core": "^0.6.
|
|
28
|
+
"@mastra/core": "^0.6.5-alpha.0"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"@babel/preset-env": "^7.26.9",
|
package/src/resources/base.ts
CHANGED
|
@@ -21,16 +21,12 @@ export class BaseResource {
|
|
|
21
21
|
|
|
22
22
|
for (let attempt = 0; attempt <= retries; attempt++) {
|
|
23
23
|
try {
|
|
24
|
-
const defaultHeaders: Record<string, string> =
|
|
25
|
-
options.body instanceof FormData
|
|
26
|
-
? {} // Let browser set correct Content-Type for FormData which is required for audio
|
|
27
|
-
: { 'Content-Type': 'application/json' };
|
|
28
24
|
const response = await fetch(`${baseUrl}${path}`, {
|
|
29
25
|
...options,
|
|
30
26
|
headers: {
|
|
31
|
-
...defaultHeaders,
|
|
32
27
|
...headers,
|
|
33
28
|
...options.headers,
|
|
29
|
+
'x-mastra-client-type': 'js',
|
|
34
30
|
},
|
|
35
31
|
body:
|
|
36
32
|
options.body instanceof FormData ? options.body : options.body ? JSON.stringify(options.body) : undefined,
|