create-mastra 1.31.0-alpha.0 → 1.31.0-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.
@@ -0,0 +1,2 @@
1
+ import { t as fetchOrgs } from "./api-Vd0HHWaC-BDpYSpW6.js";
2
+ export { fetchOrgs };
@@ -1,5 +1,5 @@
1
- import { a as throwApiError, r as createApiClient } from "./client-Bdk2AMV6-BY9vpw2e.js";
2
- //#region ../cli/dist/api-GOhAsGMy.js
1
+ import { a as throwApiError, r as createApiClient } from "./client-BvPBTBfU-iDnfdt1u.js";
2
+ //#region ../cli/dist/api-Vd0HHWaC.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);
@@ -385,8 +385,9 @@ function removeTrailingSlash(url) {
385
385
  return url;
386
386
  }
387
387
  //#endregion
388
- //#region ../cli/dist/client-Bdk2AMV6.js
388
+ //#region ../cli/dist/client-BvPBTBfU.js
389
389
  const MASTRA_PLATFORM_API_URL = process.env.MASTRA_PLATFORM_API_URL || "https://platform.mastra.ai";
390
+ process.env.MASTRA_PROJECTS_URL;
390
391
  /**
391
392
  * Derive the gateway URL from the platform URL when not explicitly set.
392
393
  * If the platform points at staging, the gateway defaults to staging too.
@@ -442,7 +443,7 @@ async function authenticatedFetch(input, init) {
442
443
  if (response.status !== 401 || !_currentToken) return response;
443
444
  if (!_refreshInFlight) _refreshInFlight = (async () => {
444
445
  try {
445
- const { tryRefreshToken, loadCredentials } = await import("./credentials-B4M5VuZS-BRW9qqvO.js");
446
+ const { tryRefreshToken, loadCredentials } = await import("./credentials-buGMq-RX-B10rWZbQ.js");
446
447
  const creds = await loadCredentials();
447
448
  if (!creds) throw new Error("No credentials");
448
449
  const newToken = await tryRefreshToken(creds);
@@ -1,4 +1,4 @@
1
- import { t as MASTRA_PLATFORM_API_URL } from "./client-Bdk2AMV6-BY9vpw2e.js";
1
+ import { t as MASTRA_PLATFORM_API_URL } from "./client-BvPBTBfU-iDnfdt1u.js";
2
2
  import { randomBytes } from "crypto";
3
3
  import { readFileSync } from "fs";
4
4
  import { homedir, release } from "os";
@@ -6,7 +6,7 @@ import { join } from "path";
6
6
  import { chmod, mkdir, readFile, writeFile } from "fs/promises";
7
7
  import { execFileSync } from "child_process";
8
8
  import { createServer } from "http";
9
- //#region ../cli/dist/credentials-CdxijtI9.js
9
+ //#region ../cli/dist/credentials-DwRjV-mn.js
10
10
  const CREDENTIALS_DIR = join(homedir(), ".mastra");
11
11
  const CREDENTIALS_FILE = join(CREDENTIALS_DIR, "credentials.json");
12
12
  var LoginCancelledError = class extends Error {
@@ -1,2 +1,2 @@
1
- import { i as loadCredentials, o as tryRefreshToken } from "./credentials-CdxijtI9-DfSUvZVu.js";
1
+ import { i as loadCredentials, o as tryRefreshToken } from "./credentials-DwRjV-mn-CZpuCZh4.js";
2
2
  export { loadCredentials, tryRefreshToken };
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  #! /usr/bin/env node
2
- import { i as platformFetch, n as authHeaders, t as MASTRA_PLATFORM_API_URL } from "./client-Bdk2AMV6-BY9vpw2e.js";
3
- import { a as setCurrentOrgId, n as getCurrentOrgId, r as getToken, t as LoginCancelledError } from "./credentials-CdxijtI9-DfSUvZVu.js";
4
- import { t as fetchOrgs } from "./api-GOhAsGMy-C0KZztSZ.js";
2
+ import { i as platformFetch, n as authHeaders, t as MASTRA_PLATFORM_API_URL } from "./client-BvPBTBfU-iDnfdt1u.js";
3
+ import { a as setCurrentOrgId, n as getCurrentOrgId, r as getToken, t as LoginCancelledError } from "./credentials-DwRjV-mn-CZpuCZh4.js";
4
+ import { t as fetchOrgs } from "./api-Vd0HHWaC-BDpYSpW6.js";
5
5
  import { createRequire } from "node:module";
6
6
  import { EventEmitter, addAbortListener, on, once, setMaxListeners } from "node:events";
7
7
  import { ChildProcess, execFile, spawn, spawnSync } from "node:child_process";
@@ -4159,7 +4159,7 @@ ${i ? styleText("cyan", S_BAR_END) : ""}
4159
4159
  }
4160
4160
  }).prompt();
4161
4161
  //#endregion
4162
- //#region ../cli/dist/orgs-Dj0nij3E.js
4162
+ //#region ../cli/dist/orgs-DguR8KhI.js
4163
4163
  var OrgSelectionCancelledError = class extends Error {
4164
4164
  constructor() {
4165
4165
  super("Organization selection cancelled");
@@ -16262,7 +16262,7 @@ var require_yocto_spinner = /* @__PURE__ */ __commonJSMin(((exports, module) =>
16262
16262
  };
16263
16263
  }));
16264
16264
  //#endregion
16265
- //#region ../cli/dist/analytics-BRONrmu7.js
16265
+ //#region ../cli/dist/analytics-CswEqEHp.js
16266
16266
  const CREATE_LLM_PROVIDERS = [
16267
16267
  {
16268
16268
  value: "openai",
@@ -18026,7 +18026,7 @@ var require_semver = /* @__PURE__ */ __commonJSMin(((exports, module) => {
18026
18026
  };
18027
18027
  }));
18028
18028
  //#endregion
18029
- //#region ../cli/dist/create-BW8-SEwm.js
18029
+ //#region ../cli/dist/create-a3sq5U77.js
18030
18030
  var import_picocolors = /* @__PURE__ */ __toESM(require_picocolors(), 1);
18031
18031
  var import_yocto_spinner = /* @__PURE__ */ __toESM(require_yocto_spinner(), 1);
18032
18032
  var import_semver = /* @__PURE__ */ __toESM(require_semver(), 1);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-mastra",
3
- "version": "1.31.0-alpha.0",
3
+ "version": "1.31.0-alpha.6",
4
4
  "description": "Create Mastra apps with one command",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
@@ -36,9 +36,9 @@
36
36
  "tinyexec": "^1.1.1",
37
37
  "tsdown": "0.22.9",
38
38
  "typescript": "^7.0.2",
39
- "vitest": "4.1.10",
40
- "mastra": "^1.31.0-alpha.0",
41
- "@internal/lint": "0.0.133"
39
+ "vitest": "4.1.11",
40
+ "@internal/lint": "0.0.133",
41
+ "mastra": "^1.31.0-alpha.6"
42
42
  },
43
43
  "engines": {
44
44
  "node": ">=22.13.0"
@@ -1,2 +0,0 @@
1
- import { t as fetchOrgs } from "./api-GOhAsGMy-C0KZztSZ.js";
2
- export { fetchOrgs };