create-mastra 1.26.1-alpha.9 → 1.26.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # create-mastra
2
2
 
3
+ ## 1.26.1
4
+
5
+ ## 1.26.1-alpha.13
6
+
7
+ ## 1.26.1-alpha.12
8
+
9
+ ## 1.26.1-alpha.11
10
+
11
+ ## 1.26.1-alpha.10
12
+
3
13
  ## 1.26.1-alpha.9
4
14
 
5
15
  ## 1.26.1-alpha.8
@@ -25,4 +25,4 @@ import 'tinyexec';
25
25
 
26
26
 
27
27
  export { loadCredentials, tryRefreshToken };
28
- //# sourceMappingURL=credentials-BwBqBx2B-BDWk6njZ.js.map
28
+ //# sourceMappingURL=credentials-B4M5VuZS-BDWk6njZ.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"credentials-B4M5VuZS-BDWk6njZ.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;"}
package/dist/index.js CHANGED
@@ -533,7 +533,7 @@ async function authenticatedFetch(input, init) {
533
533
  if (response.status !== 401 || !_currentToken) return response;
534
534
  if (!_refreshInFlight) _refreshInFlight = (async () => {
535
535
  try {
536
- const { tryRefreshToken, loadCredentials } = await import('./credentials-BwBqBx2B-BDWk6njZ.js');
536
+ const { tryRefreshToken, loadCredentials } = await import('./credentials-B4M5VuZS-BDWk6njZ.js');
537
537
  const creds = await loadCredentials();
538
538
  if (!creds) throw new Error("No credentials");
539
539
  const newToken2 = await tryRefreshToken(creds);
@@ -847,7 +847,7 @@ async function getToken(signal, options = {}) {
847
847
  const creds = await loadCredentials();
848
848
  signal?.throwIfAborted();
849
849
  if (!creds) {
850
- if (!isInteractive$1()) throw new Error("Not logged in. Run `mastra auth login` interactively or set MASTRA_API_TOKEN.");
850
+ if (options.allowLogin === false || !isInteractive$1()) throw new Error("Not logged in. Run `mastra auth login` interactively or set MASTRA_API_TOKEN.");
851
851
  return (await login(signal, options)).token;
852
852
  }
853
853
  if (await verifyToken(creds.token, signal)) return creds.token;
@@ -855,7 +855,7 @@ async function getToken(signal, options = {}) {
855
855
  const refreshed = await tryRefreshToken(creds, signal);
856
856
  if (refreshed) return refreshed;
857
857
  signal?.throwIfAborted();
858
- if (!isInteractive$1()) throw new Error("Session expired. Run `mastra auth login` interactively or set MASTRA_API_TOKEN.");
858
+ if (options.allowLogin === false || !isInteractive$1()) throw new Error("Session expired. Run `mastra auth login` interactively or set MASTRA_API_TOKEN.");
859
859
  return (await login(signal, options)).token;
860
860
  }
861
861