create-mastra 1.35.0-alpha.9 → 1.35.1-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.
@@ -1,5 +1,5 @@
1
- import { a as throwApiError, r as createApiClient } from "./client-CjwEyp8q-CmXqEtbF.js";
2
- //#region ../cli/dist/api-C943QZP2.js
1
+ import { a as throwApiError, r as createApiClient } from "./client-BBiHf0j_-ClpQ8lIZ.js";
2
+ //#region ../cli/dist/api--fBIKSk-.js
3
3
  async function fetchOrgs(token) {
4
4
  const { data, error, response } = await createApiClient(token).GET("/v1/auth/orgs");
5
5
  if (error) throwApiError("Failed to fetch orgs", response.status, error.detail);
@@ -0,0 +1 @@
1
+ export { t as fetchOrgs } from "./api--fBIKSk--9iyRzavU.js";
@@ -59,11 +59,13 @@ function createClient(clientOptions) {
59
59
  options,
60
60
  id
61
61
  });
62
- if (result) if (result instanceof Request) request = result;
63
- else if (result instanceof Response) {
64
- response = result;
65
- break;
66
- } else throw new Error("onRequest: must return new Request() or Response() when modifying the request");
62
+ if (result) {
63
+ if (result instanceof Request) request = result;
64
+ else if (result instanceof Response) {
65
+ response = result;
66
+ break;
67
+ } else throw new Error("onRequest: must return new Request() or Response() when modifying the request");
68
+ }
67
69
  }
68
70
  }
69
71
  if (!response) {
@@ -385,7 +387,7 @@ function removeTrailingSlash(url) {
385
387
  return url;
386
388
  }
387
389
  //#endregion
388
- //#region ../cli/dist/client-CjwEyp8q.js
390
+ //#region ../cli/dist/client-BBiHf0j_.js
389
391
  const MASTRA_PLATFORM_API_URL = process.env.MASTRA_PLATFORM_API_URL || "https://platform.mastra.ai";
390
392
  process.env.MASTRA_PROJECTS_URL;
391
393
  /**
@@ -443,7 +445,7 @@ async function authenticatedFetch(input, init) {
443
445
  if (response.status !== 401 || !_currentToken) return response;
444
446
  if (!_refreshInFlight) _refreshInFlight = (async () => {
445
447
  try {
446
- const { tryRefreshToken, loadCredentials } = await import("./credentials-DOGNs6Oq-CNi90c5S.js");
448
+ const { tryRefreshToken, loadCredentials } = await import("./credentials-BCQACj4r-D3siDkCR.js");
447
449
  const creds = await loadCredentials();
448
450
  if (!creds) throw new Error("No credentials");
449
451
  const newToken = await tryRefreshToken(creds);
@@ -0,0 +1 @@
1
+ export { i as loadCredentials, o as tryRefreshToken } from "./credentials-C-Kp-Gxe-CEyxPrUh.js";
@@ -1,4 +1,4 @@
1
- import { t as MASTRA_PLATFORM_API_URL } from "./client-CjwEyp8q-CmXqEtbF.js";
1
+ import { t as MASTRA_PLATFORM_API_URL } from "./client-BBiHf0j_-ClpQ8lIZ.js";
2
2
  import { createRequire } from "node:module";
3
3
  import "node:path";
4
4
  import process$1, { stdin, stdout } from "node:process";
@@ -7,8 +7,7 @@ import { homedir, release } from "os";
7
7
  import { join } from "path";
8
8
  import { chmod, mkdir, readFile, writeFile } from "fs/promises";
9
9
  import { styleText } from "node:util";
10
- import * as l from "node:readline";
11
- import l__default from "node:readline";
10
+ import l__default, * as l from "node:readline";
12
11
  import { ReadStream } from "node:tty";
13
12
  import { execFileSync } from "child_process";
14
13
  import { createServer } from "http";
@@ -19,7 +18,7 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
19
18
  var __getOwnPropNames = Object.getOwnPropertyNames;
20
19
  var __getProtoOf = Object.getPrototypeOf;
21
20
  var __hasOwnProp = Object.prototype.hasOwnProperty;
22
- var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports);
21
+ var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod, mod.exports), cb = null), mod.exports);
23
22
  var __copyProps = (to, from, except, desc) => {
24
23
  if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
25
24
  key = keys[i];
@@ -30,7 +29,7 @@ var __copyProps = (to, from, except, desc) => {
30
29
  }
31
30
  return to;
32
31
  };
33
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
32
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule || !__hasOwnProp.call(mod, "default") ? __defProp(target, "default", {
34
33
  value: mod,
35
34
  enumerable: true
36
35
  }) : target, mod));
@@ -735,9 +734,7 @@ let n$1 = class n extends y {
735
734
  this.cursor = findCursor(this.cursor, -1, this.options);
736
735
  break;
737
736
  case "down":
738
- case "right":
739
- this.cursor = findCursor(this.cursor, 1, this.options);
740
- break;
737
+ case "right": this.cursor = findCursor(this.cursor, 1, this.options);
741
738
  }
742
739
  this.changeValue();
743
740
  });
@@ -1154,7 +1151,7 @@ ${r ? styleText("cyan", S_BAR_END) : ""}
1154
1151
  }
1155
1152
  }).prompt();
1156
1153
  //#endregion
1157
- //#region ../cli/dist/credentials-DSp55v-D.js
1154
+ //#region ../cli/dist/credentials-C-Kp-Gxe.js
1158
1155
  const CREDENTIALS_DIR = join(homedir(), ".mastra");
1159
1156
  const CREDENTIALS_FILE = join(CREDENTIALS_DIR, "credentials.json");
1160
1157
  var LoginCancelledError = class extends Error {
@@ -1363,7 +1360,7 @@ async function loginAttempt(signal, options = {}) {
1363
1360
  };
1364
1361
  const timeout = setTimeout(() => {
1365
1362
  finish(() => reject(new LoginTimedOutError()));
1366
- }, options.timeoutMs ?? 300 * 1e3);
1363
+ }, options.timeoutMs ?? 3e5);
1367
1364
  signal?.addEventListener("abort", handleAbort, { once: true });
1368
1365
  if (signal?.aborted) {
1369
1366
  handleAbort();