create-mastra 1.36.0-alpha.2 → 1.36.0-alpha.4
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/dist/{api--fBIKSk--9iyRzavU.js → api-CV5-CXEm-Cpd49bi2.js} +2 -3
- package/dist/api-Cdahi7Yf-BbwhMVLL.js +1 -0
- package/dist/{client-BBiHf0j_-ClpQ8lIZ.js → client-JZw8MfpM-zeD5gOhK.js} +3 -5
- package/dist/{credentials-BCQACj4r-D3siDkCR.js → credentials-CdkRA-3T--5O17XQq.js} +1 -1
- package/dist/{credentials-C-Kp-Gxe-CEyxPrUh.js → credentials-HeXP-kY2-jky92lr5.js} +15 -19
- package/dist/esm-Db8i8YTn.js +1411 -0
- package/dist/index.js +1160 -854
- package/package.json +5 -5
- package/dist/api-DiyELZRd-BmHecDdX.js +0 -1
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { a as throwApiError, r as createApiClient } from "./client-
|
|
2
|
-
|
|
1
|
+
import { a as throwApiError, r as createApiClient } from "./client-JZw8MfpM-zeD5gOhK.js";
|
|
2
|
+
// ../cli/dist/api-CV5-CXEm.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);
|
|
6
6
|
return data.organizations;
|
|
7
7
|
}
|
|
8
|
-
//#endregion
|
|
9
8
|
export { fetchOrgs as t };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { t as fetchOrgs } from "./api-CV5-CXEm-Cpd49bi2.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/openapi-fetch/0.17.0/74b9406f656bb94957700cf63ed04c1745023b47201693eac93641318b84ba31/node_modules/openapi-fetch/dist/index.mjs
|
|
2
2
|
const PATH_PARAM_RE = /\{[^{}]+\}/g;
|
|
3
3
|
const supportsRequestInitExt = () => {
|
|
4
4
|
return typeof process === "object" && Number.parseInt(process?.versions?.node?.substring(0, 2)) >= 18 && process.versions.undici;
|
|
@@ -386,8 +386,7 @@ function removeTrailingSlash(url) {
|
|
|
386
386
|
if (url.endsWith("/")) return url.substring(0, url.length - 1);
|
|
387
387
|
return url;
|
|
388
388
|
}
|
|
389
|
-
|
|
390
|
-
//#region ../cli/dist/client-BBiHf0j_.js
|
|
389
|
+
// ../cli/dist/client-JZw8MfpM.js
|
|
391
390
|
const MASTRA_PLATFORM_API_URL = process.env.MASTRA_PLATFORM_API_URL || "https://platform.mastra.ai";
|
|
392
391
|
process.env.MASTRA_PROJECTS_URL;
|
|
393
392
|
/**
|
|
@@ -445,7 +444,7 @@ async function authenticatedFetch(input, init) {
|
|
|
445
444
|
if (response.status !== 401 || !_currentToken) return response;
|
|
446
445
|
if (!_refreshInFlight) _refreshInFlight = (async () => {
|
|
447
446
|
try {
|
|
448
|
-
const { tryRefreshToken, loadCredentials } = await import("./credentials-
|
|
447
|
+
const { tryRefreshToken, loadCredentials } = await import("./credentials-CdkRA-3T--5O17XQq.js");
|
|
449
448
|
const creds = await loadCredentials();
|
|
450
449
|
if (!creds) throw new Error("No credentials");
|
|
451
450
|
const newToken = await tryRefreshToken(creds);
|
|
@@ -503,5 +502,4 @@ function authHeaders(token, orgId) {
|
|
|
503
502
|
function platformFetch(input, init) {
|
|
504
503
|
return authenticatedFetch(input, init);
|
|
505
504
|
}
|
|
506
|
-
//#endregion
|
|
507
505
|
export { throwApiError as a, platformFetch as i, authHeaders as n, createApiClient as r, MASTRA_PLATFORM_API_URL as t };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { i as loadCredentials, o as tryRefreshToken } from "./credentials-
|
|
1
|
+
export { i as loadCredentials, o as tryRefreshToken } from "./credentials-HeXP-kY2-jky92lr5.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as MASTRA_PLATFORM_API_URL } from "./client-
|
|
1
|
+
import { t as MASTRA_PLATFORM_API_URL } from "./client-JZw8MfpM-zeD5gOhK.js";
|
|
2
2
|
import { createRequire } from "node:module";
|
|
3
3
|
import "node:path";
|
|
4
4
|
import process$1, { stdin, stdout } from "node:process";
|
|
@@ -11,7 +11,7 @@ import l__default, * as l from "node:readline";
|
|
|
11
11
|
import { ReadStream } from "node:tty";
|
|
12
12
|
import { execFileSync } from "child_process";
|
|
13
13
|
import { createServer } from "http";
|
|
14
|
-
|
|
14
|
+
// \0rolldown/runtime.js
|
|
15
15
|
var __create = Object.create;
|
|
16
16
|
var __defProp = Object.defineProperty;
|
|
17
17
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
@@ -34,8 +34,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
34
34
|
enumerable: true
|
|
35
35
|
}) : target, mod));
|
|
36
36
|
var __require = /* #__PURE__ */ (() => createRequire(import.meta.url))();
|
|
37
|
-
|
|
38
|
-
//#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/fast-string-truncated-width/3.0.3/5e16650deba0731567b17e8a4a9273e5b04fa18f3f27351a1f8f22294279d082/node_modules/fast-string-truncated-width/dist/utils.js
|
|
37
|
+
// ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/fast-string-truncated-width/3.0.3/5e16650deba0731567b17e8a4a9273e5b04fa18f3f27351a1f8f22294279d082/node_modules/fast-string-truncated-width/dist/utils.js
|
|
39
38
|
const getCodePointsLength = (() => {
|
|
40
39
|
const SURROGATE_PAIR_RE = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g;
|
|
41
40
|
return (input) => {
|
|
@@ -51,8 +50,7 @@ const isFullWidth = (x) => {
|
|
|
51
50
|
const isWideNotCJKTNotEmoji = (x) => {
|
|
52
51
|
return x === 8987 || x === 9001 || x >= 12272 && x <= 12287 || x >= 12289 && x <= 12350 || x >= 12441 && x <= 12543 || x >= 12549 && x <= 12591 || x >= 12593 && x <= 12686 || x >= 12688 && x <= 12771 || x >= 12783 && x <= 12830 || x >= 12832 && x <= 12871 || x >= 12880 && x <= 19903 || x >= 65040 && x <= 65049 || x >= 65072 && x <= 65106 || x >= 65108 && x <= 65126 || x >= 65128 && x <= 65131 || x >= 127488 && x <= 127490 || x >= 127504 && x <= 127547 || x >= 127552 && x <= 127560 || x >= 131072 && x <= 196605 || x >= 196608 && x <= 262141;
|
|
53
52
|
};
|
|
54
|
-
|
|
55
|
-
//#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/fast-string-truncated-width/3.0.3/5e16650deba0731567b17e8a4a9273e5b04fa18f3f27351a1f8f22294279d082/node_modules/fast-string-truncated-width/dist/index.js
|
|
53
|
+
// ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/fast-string-truncated-width/3.0.3/5e16650deba0731567b17e8a4a9273e5b04fa18f3f27351a1f8f22294279d082/node_modules/fast-string-truncated-width/dist/index.js
|
|
56
54
|
const ANSI_RE = /[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]|\u001b\]8;[^;]*;.*?(?:\u0007|\u001b\u005c)/y;
|
|
57
55
|
const CONTROL_RE = /[\x00-\x08\x0A-\x1F\x7F-\x9F]{1,1000}/y;
|
|
58
56
|
const CJKT_WIDE_RE = /(?:(?![\uFF61-\uFF9F\uFF00-\uFFEF])[\p{Script=Han}\p{Script=Hiragana}\p{Script=Katakana}\p{Script=Hangul}\p{Script=Tangut}]){1,1000}/uy;
|
|
@@ -141,8 +139,7 @@ const getStringTruncatedWidth = (input, truncationOptions = {}, widthOptions = {
|
|
|
141
139
|
ellipsed: truncationEnabled && LIMIT >= ELLIPSIS_WIDTH
|
|
142
140
|
};
|
|
143
141
|
};
|
|
144
|
-
|
|
145
|
-
//#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/fast-string-width/3.0.2/378e142101ffa5bddf52b373c8b45b521bca18993a6dcb9848fd99b62a701708/node_modules/fast-string-width/dist/index.js
|
|
142
|
+
// ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/fast-string-width/3.0.2/378e142101ffa5bddf52b373c8b45b521bca18993a6dcb9848fd99b62a701708/node_modules/fast-string-width/dist/index.js
|
|
146
143
|
const NO_TRUNCATION = {
|
|
147
144
|
limit: Infinity,
|
|
148
145
|
ellipsis: "",
|
|
@@ -151,8 +148,7 @@ const NO_TRUNCATION = {
|
|
|
151
148
|
const fastStringWidth = (input, options = {}) => {
|
|
152
149
|
return getStringTruncatedWidth(input, NO_TRUNCATION, options).width;
|
|
153
150
|
};
|
|
154
|
-
|
|
155
|
-
//#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/fast-wrap-ansi/0.2.2/d6d9890ab532acfc4e08e1ab9e00aa00b53ead91b46161e22c2a36be0788426a/node_modules/fast-wrap-ansi/lib/main.js
|
|
151
|
+
// ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/fast-wrap-ansi/0.2.2/d6d9890ab532acfc4e08e1ab9e00aa00b53ead91b46161e22c2a36be0788426a/node_modules/fast-wrap-ansi/lib/main.js
|
|
156
152
|
const ESC = "\x1B";
|
|
157
153
|
const CSI = "";
|
|
158
154
|
const END_CODE = 39;
|
|
@@ -316,8 +312,7 @@ const CRLF_OR_LF = /\r?\n/;
|
|
|
316
312
|
function wrapAnsi(string, columns, options) {
|
|
317
313
|
return String(string).normalize().split(CRLF_OR_LF).map((line) => exec(line, columns, options)).join("\n");
|
|
318
314
|
}
|
|
319
|
-
|
|
320
|
-
//#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@clack/core/1.5.1/24dbef356d54e18db6b3cfab6de4dafdef8f75bd1bd4366d1da0394c51561b99/node_modules/@clack/core/dist/index.mjs
|
|
315
|
+
// ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@clack/core/1.5.1/24dbef356d54e18db6b3cfab6de4dafdef8f75bd1bd4366d1da0394c51561b99/node_modules/@clack/core/dist/index.mjs
|
|
321
316
|
var import_src = (/* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
322
317
|
const ESC = "\x1B";
|
|
323
318
|
const CSI = `${ESC}[`;
|
|
@@ -762,8 +757,7 @@ var n = class extends y {
|
|
|
762
757
|
});
|
|
763
758
|
}
|
|
764
759
|
};
|
|
765
|
-
|
|
766
|
-
//#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@clack/prompts/1.8.1/084b8653d627633f7deced264e8f28e7c2481bb2dde0804f7f5aee6b0184add2/node_modules/@clack/prompts/dist/index.mjs
|
|
760
|
+
// ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@clack/prompts/1.8.1/084b8653d627633f7deced264e8f28e7c2481bb2dde0804f7f5aee6b0184add2/node_modules/@clack/prompts/dist/index.mjs
|
|
767
761
|
function isUnicodeSupported() {
|
|
768
762
|
if (process$1.platform !== "win32") return process$1.env.TERM !== "linux";
|
|
769
763
|
return Boolean(process$1.env.CI) || Boolean(process$1.env.WT_SESSION) || Boolean(process$1.env.TERMINUS_SUBLIME) || process$1.env.ConEmuTask === "{cmd::Cmder}" || process$1.env.TERM_PROGRAM === "Terminus-Sublime" || process$1.env.TERM_PROGRAM === "vscode" || process$1.env.TERM === "xterm-256color" || process$1.env.TERM === "alacritty" || process$1.env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
|
|
@@ -1150,8 +1144,7 @@ ${r ? styleText("cyan", S_BAR_END) : ""}
|
|
|
1150
1144
|
}
|
|
1151
1145
|
}
|
|
1152
1146
|
}).prompt();
|
|
1153
|
-
|
|
1154
|
-
//#region ../cli/dist/credentials-C-Kp-Gxe.js
|
|
1147
|
+
// ../cli/dist/credentials-HeXP-kY2.js
|
|
1155
1148
|
const CREDENTIALS_DIR = join(homedir(), ".mastra");
|
|
1156
1149
|
const CREDENTIALS_FILE = join(CREDENTIALS_DIR, "credentials.json");
|
|
1157
1150
|
var LoginCancelledError = class extends Error {
|
|
@@ -1214,9 +1207,13 @@ function openBrowser(url) {
|
|
|
1214
1207
|
]);
|
|
1215
1208
|
else if (isWSL()) execFileSync("powershell.exe", [
|
|
1216
1209
|
"-NoProfile",
|
|
1210
|
+
"-NonInteractive",
|
|
1217
1211
|
"-Command",
|
|
1218
|
-
|
|
1219
|
-
]
|
|
1212
|
+
"Start-Process -FilePath $env:MASTRA_OPEN_URL"
|
|
1213
|
+
], { env: {
|
|
1214
|
+
...process.env,
|
|
1215
|
+
MASTRA_OPEN_URL: url
|
|
1216
|
+
} });
|
|
1220
1217
|
else execFileSync("xdg-open", [url]);
|
|
1221
1218
|
}
|
|
1222
1219
|
async function verifyToken(token, signal) {
|
|
@@ -1451,5 +1448,4 @@ async function getToken(signal, options = {}) {
|
|
|
1451
1448
|
if (options.allowLogin === false || !isInteractive()) throw new Error("Session expired. Run `mastra auth login` interactively or set MASTRA_API_TOKEN.");
|
|
1452
1449
|
return (await login(signal, options)).token;
|
|
1453
1450
|
}
|
|
1454
|
-
//#endregion
|
|
1455
1451
|
export { __require as _, setCurrentOrgId as a, log as c, password as d, select as f, __commonJSMin as g, isCancel as h, loadCredentials as i, note as l, text as m, getCurrentOrgId as n, tryRefreshToken as o, spinner as p, getToken as r, cancel as s, LoginCancelledError as t, outro as u, __toESM as v };
|