@mastra/client-js 0.1.12 → 0.1.13-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.
@@ -1,5 +1,5 @@
1
1
 
2
- > @mastra/client-js@0.1.12-alpha.1 build /home/runner/work/mastra/mastra/client-sdks/client-js
2
+ > @mastra/client-js@0.1.13-alpha.1 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.01 KB
13
- ESM ⚡️ Build success in 1008ms
14
- CJS dist/index.cjs 21.19 KB
15
- CJS ⚡️ Build success in 1014ms
12
+ CJS dist/index.cjs 21.09 KB
13
+ CJS ⚡️ Build success in 859ms
14
+ ESM dist/index.js 20.92 KB
15
+ ESM ⚡️ Build success in 859ms
16
16
  DTS Build start
17
- DTS ⚡️ Build success in 11507ms
17
+ DTS ⚡️ Build success in 11889ms
18
18
  DTS dist/index.d.ts 18.78 KB
19
19
  DTS dist/index.d.cts 18.78 KB
package/CHANGELOG.md CHANGED
@@ -1,5 +1,23 @@
1
1
  # @mastra/client-js
2
2
 
3
+ ## 0.1.13-alpha.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [0b54522]
8
+ - Updated dependencies [1af25d5]
9
+ - Updated dependencies [27439ad]
10
+ - @mastra/core@0.7.0-alpha.1
11
+
12
+ ## 0.1.13-alpha.0
13
+
14
+ ### Patch Changes
15
+
16
+ - 0206617: Fix mastaClient cors error, remove default req headers
17
+ - 3811029: Add identifying header
18
+ - Updated dependencies [b4fbc59]
19
+ - @mastra/core@0.6.5-alpha.0
20
+
3
21
  ## 0.1.12
4
22
 
5
23
  ### 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.12",
3
+ "version": "0.1.13-alpha.1",
4
4
  "description": "The official TypeScript library for the Mastra Client API",
5
5
  "author": "",
6
6
  "type": "module",
@@ -25,17 +25,17 @@
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.4"
28
+ "@mastra/core": "^0.7.0-alpha.1"
29
29
  },
30
30
  "devDependencies": {
31
31
  "@babel/preset-env": "^7.26.9",
32
32
  "@babel/preset-typescript": "^7.26.0",
33
33
  "@tsconfig/recommended": "^1.0.8",
34
34
  "@types/json-schema": "^7.0.15",
35
- "@types/node": "^22.13.10",
35
+ "@types/node": "^20.17.27",
36
36
  "tsup": "^8.4.0",
37
37
  "typescript": "^5.8.2",
38
- "vitest": "^3.0.8",
38
+ "vitest": "^3.0.9",
39
39
  "@internal/lint": "0.0.1"
40
40
  },
41
41
  "scripts": {
@@ -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,