create-mastra 1.34.3-alpha.4 → 1.35.0-alpha.11

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();
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  #! /usr/bin/env node
2
- import { _ as __require, a as setCurrentOrgId, c as log, d as password, f as select, g as __commonJSMin, h as isCancel, l as note, m as text, n as getCurrentOrgId, p as spinner, r as getToken, s as cancel, t as LoginCancelledError, u as outro, v as __toESM } from "./credentials-DSp55v-D-MNcatpqE.js";
3
- import { i as platformFetch, n as authHeaders, t as MASTRA_PLATFORM_API_URL } from "./client-CjwEyp8q-CmXqEtbF.js";
4
- import { t as fetchOrgs } from "./api-C943QZP2-BYQPfDc3.js";
2
+ import { _ as __require, a as setCurrentOrgId, c as log, d as password, f as select, g as __commonJSMin, h as isCancel, l as note, m as text, n as getCurrentOrgId, p as spinner, r as getToken, s as cancel, t as LoginCancelledError, u as outro, v as __toESM } from "./credentials-C-Kp-Gxe-CEyxPrUh.js";
3
+ import { i as platformFetch, n as authHeaders, t as MASTRA_PLATFORM_API_URL } from "./client-BBiHf0j_-ClpQ8lIZ.js";
4
+ import { t as fetchOrgs } from "./api--fBIKSk--9iyRzavU.js";
5
5
  import { EventEmitter, addAbortListener, on, once, setMaxListeners } from "node:events";
6
6
  import { ChildProcess, execFile, spawn, spawnSync } from "node:child_process";
7
7
  import path, { basename, delimiter, dirname, isAbsolute, normalize, resolve } from "node:path";
@@ -96,7 +96,6 @@ var require_argument = /* @__PURE__ */ __commonJSMin(((exports) => {
96
96
  default:
97
97
  this.required = true;
98
98
  this._name = name;
99
- break;
100
99
  }
101
100
  if (this._name.endsWith("...")) {
102
101
  this.variadic = true;
@@ -1040,17 +1039,17 @@ var require_suggestSimilar = /* @__PURE__ */ __commonJSMin(((exports) => {
1040
1039
  //#endregion
1041
1040
  //#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/commander/14.0.3/13f2f2916c21d1b190a75e502cfb70e9f9ebe8cac818a9d1a363f5a5f7d59023/node_modules/commander/lib/command.js
1042
1041
  var require_command = /* @__PURE__ */ __commonJSMin(((exports) => {
1043
- const EventEmitter$1 = __require("node:events").EventEmitter;
1042
+ const EventEmitter = __require("node:events").EventEmitter;
1044
1043
  const childProcess = __require("node:child_process");
1045
- const path$5 = __require("node:path");
1046
- const fs$4 = __require("node:fs");
1047
- const process$3 = __require("node:process");
1044
+ const path = __require("node:path");
1045
+ const fs = __require("node:fs");
1046
+ const process = __require("node:process");
1048
1047
  const { Argument, humanReadableArgName } = require_argument();
1049
1048
  const { CommanderError } = require_error();
1050
1049
  const { Help, stripColor } = require_help();
1051
1050
  const { Option, DualOptions } = require_option();
1052
1051
  const { suggestSimilar } = require_suggestSimilar();
1053
- var Command = class Command extends EventEmitter$1 {
1052
+ var Command = class Command extends EventEmitter {
1054
1053
  /**
1055
1054
  * Initialize a new `Command`.
1056
1055
  *
@@ -1096,13 +1095,13 @@ var require_command = /* @__PURE__ */ __commonJSMin(((exports) => {
1096
1095
  this._showSuggestionAfterError = true;
1097
1096
  this._savedState = null;
1098
1097
  this._outputConfiguration = {
1099
- writeOut: (str) => process$3.stdout.write(str),
1100
- writeErr: (str) => process$3.stderr.write(str),
1098
+ writeOut: (str) => process.stdout.write(str),
1099
+ writeErr: (str) => process.stderr.write(str),
1101
1100
  outputError: (str, write) => write(str),
1102
- getOutHelpWidth: () => process$3.stdout.isTTY ? process$3.stdout.columns : void 0,
1103
- getErrHelpWidth: () => process$3.stderr.isTTY ? process$3.stderr.columns : void 0,
1104
- getOutHasColors: () => useColor() ?? (process$3.stdout.isTTY && process$3.stdout.hasColors?.()),
1105
- getErrHasColors: () => useColor() ?? (process$3.stderr.isTTY && process$3.stderr.hasColors?.()),
1101
+ getOutHelpWidth: () => process.stdout.isTTY ? process.stdout.columns : void 0,
1102
+ getErrHelpWidth: () => process.stderr.isTTY ? process.stderr.columns : void 0,
1103
+ getOutHasColors: () => useColor() ?? (process.stdout.isTTY && process.stdout.hasColors?.()),
1104
+ getErrHasColors: () => useColor() ?? (process.stderr.isTTY && process.stderr.hasColors?.()),
1106
1105
  stripColor: (str) => stripColor(str)
1107
1106
  };
1108
1107
  this._hidden = false;
@@ -1471,7 +1470,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
1471
1470
  */
1472
1471
  _exit(exitCode, code, message) {
1473
1472
  if (this._exitCallback) this._exitCallback(new CommanderError(exitCode, code, message));
1474
- process$3.exit(exitCode);
1473
+ process.exit(exitCode);
1475
1474
  }
1476
1475
  /**
1477
1476
  * Register callback `fn` for the command.
@@ -1591,9 +1590,11 @@ Expecting one of '${allowedValues.join("', '")}'`);
1591
1590
  const oldValue = this.getOptionValue(name);
1592
1591
  if (val !== null && option.parseArg) val = this._callParseArg(option, val, oldValue, invalidValueMessage);
1593
1592
  else if (val !== null && option.variadic) val = option._collectValue(val, oldValue);
1594
- if (val == null) if (option.negate) val = false;
1595
- else if (option.isBoolean() || option.optional) val = true;
1596
- else val = "";
1593
+ if (val == null) {
1594
+ if (option.negate) val = false;
1595
+ else if (option.isBoolean() || option.optional) val = true;
1596
+ else val = "";
1597
+ }
1597
1598
  this.setOptionValueWithSource(name, val, valueSource);
1598
1599
  };
1599
1600
  this.on("option:" + oname, (val) => {
@@ -1814,11 +1815,11 @@ Expecting one of '${allowedValues.join("', '")}'`);
1814
1815
  if (argv !== void 0 && !Array.isArray(argv)) throw new Error("first parameter to parse must be array or undefined");
1815
1816
  parseOptions = parseOptions || {};
1816
1817
  if (argv === void 0 && parseOptions.from === void 0) {
1817
- if (process$3.versions?.electron) parseOptions.from = "electron";
1818
- const execArgv = process$3.execArgv ?? [];
1818
+ if (process.versions?.electron) parseOptions.from = "electron";
1819
+ const execArgv = process.execArgv ?? [];
1819
1820
  if (execArgv.includes("-e") || execArgv.includes("--eval") || execArgv.includes("-p") || execArgv.includes("--print")) parseOptions.from = "eval";
1820
1821
  }
1821
- if (argv === void 0) argv = process$3.argv;
1822
+ if (argv === void 0) argv = process.argv;
1822
1823
  this.rawArgs = argv.slice();
1823
1824
  let userArgs;
1824
1825
  switch (parseOptions.from) {
@@ -1828,7 +1829,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
1828
1829
  userArgs = argv.slice(2);
1829
1830
  break;
1830
1831
  case "electron":
1831
- if (process$3.defaultApp) {
1832
+ if (process.defaultApp) {
1832
1833
  this._scriptPath = argv[1];
1833
1834
  userArgs = argv.slice(2);
1834
1835
  } else userArgs = argv.slice(1);
@@ -1941,7 +1942,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
1941
1942
  * @param {string} subcommandName
1942
1943
  */
1943
1944
  _checkForMissingExecutable(executableFile, executableDir, subcommandName) {
1944
- if (fs$4.existsSync(executableFile)) return;
1945
+ if (fs.existsSync(executableFile)) return;
1945
1946
  const executableMissing = `'${executableFile}' does not exist
1946
1947
  - if '${subcommandName}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead
1947
1948
  - if the default executable name is not suitable, use the executableFile option to supply a custom name or path
@@ -1964,10 +1965,10 @@ Expecting one of '${allowedValues.join("', '")}'`);
1964
1965
  ".cjs"
1965
1966
  ];
1966
1967
  function findFile(baseDir, baseName) {
1967
- const localBin = path$5.resolve(baseDir, baseName);
1968
- if (fs$4.existsSync(localBin)) return localBin;
1969
- if (sourceExt.includes(path$5.extname(baseName))) return void 0;
1970
- const foundExt = sourceExt.find((ext) => fs$4.existsSync(`${localBin}${ext}`));
1968
+ const localBin = path.resolve(baseDir, baseName);
1969
+ if (fs.existsSync(localBin)) return localBin;
1970
+ if (sourceExt.includes(path.extname(baseName))) return void 0;
1971
+ const foundExt = sourceExt.find((ext) => fs.existsSync(`${localBin}${ext}`));
1971
1972
  if (foundExt) return `${localBin}${foundExt}`;
1972
1973
  }
1973
1974
  this._checkForMissingMandatoryOptions();
@@ -1977,32 +1978,33 @@ Expecting one of '${allowedValues.join("', '")}'`);
1977
1978
  if (this._scriptPath) {
1978
1979
  let resolvedScriptPath;
1979
1980
  try {
1980
- resolvedScriptPath = fs$4.realpathSync(this._scriptPath);
1981
+ resolvedScriptPath = fs.realpathSync(this._scriptPath);
1981
1982
  } catch {
1982
1983
  resolvedScriptPath = this._scriptPath;
1983
1984
  }
1984
- executableDir = path$5.resolve(path$5.dirname(resolvedScriptPath), executableDir);
1985
+ executableDir = path.resolve(path.dirname(resolvedScriptPath), executableDir);
1985
1986
  }
1986
1987
  if (executableDir) {
1987
1988
  let localFile = findFile(executableDir, executableFile);
1988
1989
  if (!localFile && !subcommand._executableFile && this._scriptPath) {
1989
- const legacyName = path$5.basename(this._scriptPath, path$5.extname(this._scriptPath));
1990
+ const legacyName = path.basename(this._scriptPath, path.extname(this._scriptPath));
1990
1991
  if (legacyName !== this._name) localFile = findFile(executableDir, `${legacyName}-${subcommand._name}`);
1991
1992
  }
1992
1993
  executableFile = localFile || executableFile;
1993
1994
  }
1994
- launchWithNode = sourceExt.includes(path$5.extname(executableFile));
1995
+ launchWithNode = sourceExt.includes(path.extname(executableFile));
1995
1996
  let proc;
1996
- if (process$3.platform !== "win32") if (launchWithNode) {
1997
- args.unshift(executableFile);
1998
- args = incrementNodeInspectorPort(process$3.execArgv).concat(args);
1999
- proc = childProcess.spawn(process$3.argv[0], args, { stdio: "inherit" });
2000
- } else proc = childProcess.spawn(executableFile, args, { stdio: "inherit" });
2001
- else {
1997
+ if (process.platform !== "win32") {
1998
+ if (launchWithNode) {
1999
+ args.unshift(executableFile);
2000
+ args = incrementNodeInspectorPort(process.execArgv).concat(args);
2001
+ proc = childProcess.spawn(process.argv[0], args, { stdio: "inherit" });
2002
+ } else proc = childProcess.spawn(executableFile, args, { stdio: "inherit" });
2003
+ } else {
2002
2004
  this._checkForMissingExecutable(executableFile, executableDir, subcommand._name);
2003
2005
  args.unshift(executableFile);
2004
- args = incrementNodeInspectorPort(process$3.execArgv).concat(args);
2005
- proc = childProcess.spawn(process$3.execPath, args, { stdio: "inherit" });
2006
+ args = incrementNodeInspectorPort(process.execArgv).concat(args);
2007
+ proc = childProcess.spawn(process.execPath, args, { stdio: "inherit" });
2006
2008
  }
2007
2009
  if (!proc.killed) [
2008
2010
  "SIGUSR1",
@@ -2011,20 +2013,20 @@ Expecting one of '${allowedValues.join("', '")}'`);
2011
2013
  "SIGINT",
2012
2014
  "SIGHUP"
2013
2015
  ].forEach((signal) => {
2014
- process$3.on(signal, () => {
2016
+ process.on(signal, () => {
2015
2017
  if (proc.killed === false && proc.exitCode === null) proc.kill(signal);
2016
2018
  });
2017
2019
  });
2018
2020
  const exitCallback = this._exitCallback;
2019
2021
  proc.on("close", (code) => {
2020
2022
  code = code ?? 1;
2021
- if (!exitCallback) process$3.exit(code);
2023
+ if (!exitCallback) process.exit(code);
2022
2024
  else exitCallback(new CommanderError(code, "commander.executeSubCommandAsync", "(close)"));
2023
2025
  });
2024
2026
  proc.on("error", (err) => {
2025
2027
  if (err.code === "ENOENT") this._checkForMissingExecutable(executableFile, executableDir, subcommand._name);
2026
2028
  else if (err.code === "EACCES") throw new Error(`'${executableFile}' not executable`);
2027
- if (!exitCallback) process$3.exit(1);
2029
+ if (!exitCallback) process.exit(1);
2028
2030
  else {
2029
2031
  const wrappedError = new CommanderError(1, "commander.executeSubCommandAsync", "(error)");
2030
2032
  wrappedError.nestedError = err;
@@ -2436,14 +2438,16 @@ Expecting one of '${allowedValues.join("', '")}'`);
2436
2438
  */
2437
2439
  _parseOptionsEnv() {
2438
2440
  this.options.forEach((option) => {
2439
- if (option.envVar && option.envVar in process$3.env) {
2441
+ if (option.envVar && option.envVar in process.env) {
2440
2442
  const optionKey = option.attributeName();
2441
2443
  if (this.getOptionValue(optionKey) === void 0 || [
2442
2444
  "default",
2443
2445
  "config",
2444
2446
  "env"
2445
- ].includes(this.getOptionValueSource(optionKey))) if (option.required || option.optional) this.emit(`optionEnv:${option.name()}`, process$3.env[option.envVar]);
2446
- else this.emit(`optionEnv:${option.name()}`);
2447
+ ].includes(this.getOptionValueSource(optionKey))) {
2448
+ if (option.required || option.optional) this.emit(`optionEnv:${option.name()}`, process.env[option.envVar]);
2449
+ else this.emit(`optionEnv:${option.name()}`);
2450
+ }
2447
2451
  }
2448
2452
  });
2449
2453
  }
@@ -2759,7 +2763,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
2759
2763
  * @return {Command}
2760
2764
  */
2761
2765
  nameFromFilename(filename) {
2762
- this._name = path$5.basename(filename, path$5.extname(filename));
2766
+ this._name = path.basename(filename, path.extname(filename));
2763
2767
  return this;
2764
2768
  }
2765
2769
  /**
@@ -2921,7 +2925,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
2921
2925
  */
2922
2926
  help(contextOptions) {
2923
2927
  this.outputHelp(contextOptions);
2924
- let exitCode = Number(process$3.exitCode ?? 0);
2928
+ let exitCode = Number(process.exitCode ?? 0);
2925
2929
  if (exitCode === 0 && contextOptions && typeof contextOptions !== "function" && contextOptions.error) exitCode = 1;
2926
2930
  this._exit(exitCode, "commander.help", "(outputHelp)");
2927
2931
  }
@@ -3011,8 +3015,8 @@ Expecting one of '${allowedValues.join("', '")}'`);
3011
3015
  * @package
3012
3016
  */
3013
3017
  function useColor() {
3014
- if (process$3.env.NO_COLOR || process$3.env.FORCE_COLOR === "0" || process$3.env.FORCE_COLOR === "false") return false;
3015
- if (process$3.env.FORCE_COLOR || process$3.env.CLICOLOR_FORCE !== void 0) return true;
3018
+ if (process.env.NO_COLOR || process.env.FORCE_COLOR === "0" || process.env.FORCE_COLOR === "false") return false;
3019
+ if (process.env.FORCE_COLOR || process.env.CLICOLOR_FORCE !== void 0) return true;
3016
3020
  }
3017
3021
  exports.Command = Command;
3018
3022
  exports.useColor = useColor;
@@ -3039,7 +3043,7 @@ const { program: program$1, createCommand, createArgument, createOption, Command
3039
3043
  exports.InvalidOptionArgumentError = InvalidArgumentError;
3040
3044
  })))(), 1)).default;
3041
3045
  //#endregion
3042
- //#region ../cli/dist/orgs-CmpPEv7u.js
3046
+ //#region ../cli/dist/orgs-u_BmcWwy.js
3043
3047
  var OrgSelectionCancelledError = class extends Error {
3044
3048
  constructor() {
3045
3049
  super("Organization selection cancelled");
@@ -3518,10 +3522,7 @@ var UUID = class UUID {
3518
3522
  case 38:
3519
3523
  hex = /^\{([0-9a-f]{8})-([0-9a-f]{4})-([0-9a-f]{4})-([0-9a-f]{4})-([0-9a-f]{12})\}$/i.exec(uuid)?.slice(1, 6).join("");
3520
3524
  break;
3521
- case 45:
3522
- hex = /^urn:uuid:([0-9a-f]{8})-([0-9a-f]{4})-([0-9a-f]{4})-([0-9a-f]{4})-([0-9a-f]{12})$/i.exec(uuid)?.slice(1, 6).join("");
3523
- break;
3524
- default: break;
3525
+ case 45: hex = /^urn:uuid:([0-9a-f]{8})-([0-9a-f]{4})-([0-9a-f]{4})-([0-9a-f]{4})-([0-9a-f]{12})$/i.exec(uuid)?.slice(1, 6).join("");
3525
3526
  }
3526
3527
  if (hex) {
3527
3528
  const inner = /* @__PURE__ */ new Uint8Array(16);
@@ -6295,7 +6296,7 @@ var FlushTimer = class {
6295
6296
  const MAX_FLUSH_BACKOFF_MS = 3e4;
6296
6297
  const JITTER = .25;
6297
6298
  function drawJitter() {
6298
- return 1 - JITTER + Math.random() * JITTER * 2;
6299
+ return .75 + Math.random() * JITTER * 2;
6299
6300
  }
6300
6301
  function backoffDelayMs(baseMs, failures, jitter, maxMs) {
6301
6302
  const delay = baseMs * 2 ** Math.min(Math.max(0, failures - 1), 6);
@@ -6647,15 +6648,13 @@ var PostHogMetrics = class {
6647
6648
  current.total = (current.total ?? 0) + (old.total ?? 0);
6648
6649
  break;
6649
6650
  case "gauge": break;
6650
- case "histogram":
6651
- if (old.hist) if (current.hist) {
6652
- current.hist.count += old.hist.count;
6653
- current.hist.sum += old.hist.sum;
6654
- current.hist.min = Math.min(current.hist.min, old.hist.min);
6655
- current.hist.max = Math.max(current.hist.max, old.hist.max);
6656
- for (let i = 0; i < current.hist.bucketCounts.length; i++) current.hist.bucketCounts[i] += old.hist.bucketCounts[i];
6657
- } else current.hist = old.hist;
6658
- break;
6651
+ case "histogram": if (old.hist) if (current.hist) {
6652
+ current.hist.count += old.hist.count;
6653
+ current.hist.sum += old.hist.sum;
6654
+ current.hist.min = Math.min(current.hist.min, old.hist.min);
6655
+ current.hist.max = Math.max(current.hist.max, old.hist.max);
6656
+ for (let i = 0; i < current.hist.bucketCounts.length; i++) current.hist.bucketCounts[i] += old.hist.bucketCounts[i];
6657
+ } else current.hist = old.hist;
6659
6658
  }
6660
6659
  }
6661
6660
  }
@@ -6664,8 +6663,8 @@ var PostHogMetrics = class {
6664
6663
  //#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@posthog/core/1.54.0/242953b95000e69b4ad39e3f75e7ccd0706462e3b9fef964c362ba8c2239318f/node_modules/@posthog/core/dist/traces/ids.mjs
6665
6664
  const TRACE_ID_BYTES = 16;
6666
6665
  const SPAN_ID_BYTES = 8;
6667
- const TRACE_ID_HEX = 2 * TRACE_ID_BYTES;
6668
- const SPAN_ID_HEX = 2 * SPAN_ID_BYTES;
6666
+ const TRACE_ID_HEX = 32;
6667
+ const SPAN_ID_HEX = 16;
6669
6668
  const INVALID_TRACE_ID = "0".repeat(TRACE_ID_HEX);
6670
6669
  const INVALID_SPAN_ID = "0".repeat(SPAN_ID_HEX);
6671
6670
  const HEX_RE = /^[0-9a-f]+$/;
@@ -7725,7 +7724,7 @@ var PostHogTraces = class {
7725
7724
  const scopeVersion = this._instance.getLibraryVersion();
7726
7725
  let remaining = this._queue.length;
7727
7726
  let removed = 0;
7728
- let localCap = Infinity;
7727
+ let localCap = 1 / 0;
7729
7728
  const generation = this._generation;
7730
7729
  try {
7731
7730
  while (remaining > 0 && this._queue.length > 0) {
@@ -7977,7 +7976,7 @@ async function getContextLinesFromFile(path, ranges, output, cacheKey, openSourc
7977
7976
  stream = openedFileHandle.createReadStream({
7978
7977
  autoClose: false,
7979
7978
  start: 0,
7980
- end: MAX_CONTEXTLINES_FILE_SIZE - 1
7979
+ end: 10485759
7981
7980
  });
7982
7981
  } catch {
7983
7982
  LRU_FILE_CONTENTS_FS_READ_FAILED.set(cacheKey, 1);
@@ -10876,7 +10875,7 @@ const addDefaultValue$1 = (optionArray, optionName) => optionArray.map((optionVa
10876
10875
  const DEFAULT_OPTIONS = {
10877
10876
  lines: false,
10878
10877
  buffer: true,
10879
- maxBuffer: 1e3 * 1e3 * 100,
10878
+ maxBuffer: 1e8,
10880
10879
  verbose: debuglog("execa").enabled ? "full" : "none",
10881
10880
  stripFinalNewline: true
10882
10881
  };
@@ -10948,12 +10947,12 @@ const NO_ESCAPE_REGEXP = /^[\w./-]+$/;
10948
10947
  //#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/figures/6.1.0/28dbe621b4400147df60f4768d440d7ab65ee4faaf1d13b5ce6e0ce2aa2c91e4/node_modules/figures/index.js
10949
10948
  var import_is_unicode_supported = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((exports, module) => {
10950
10949
  let _process;
10951
- function getProcess$1() {
10950
+ function getProcess() {
10952
10951
  if (_process === void 0) _process = __require("process");
10953
10952
  return _process;
10954
10953
  }
10955
10954
  module.exports = function isUnicodeSupported() {
10956
- const process = getProcess$1();
10955
+ const process = getProcess();
10957
10956
  if (process.platform !== "win32") return process.env.TERM !== "linux";
10958
10957
  const { env } = process;
10959
10958
  if (env.WT_SESSION || env.TERMINUS_SUBLIME || env.ConEmuTask === "{cmd::Cmder}") return true;
@@ -11241,9 +11240,9 @@ const figures = (0, import_is_unicode_supported.default)() ? mainSymbols : fallb
11241
11240
  Object.entries(specialMainSymbols);
11242
11241
  //#endregion
11243
11242
  //#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/yoctocolors/2.1.2/ab4a4674bf349f41c4d35529731a767e935d5fe25cfdf262e50eb2ae899daddf/node_modules/yoctocolors/base.js
11244
- const hasColors$1 = tty?.WriteStream?.prototype?.hasColors?.() ?? false;
11243
+ const hasColors = tty?.WriteStream?.prototype?.hasColors?.() ?? false;
11245
11244
  const format = (open, close) => {
11246
- if (!hasColors$1) return (input) => input;
11245
+ if (!hasColors) return (input) => input;
11247
11246
  const openCode = `\u001B[${open}m`;
11248
11247
  const closeCode = `\u001B[${close}m`;
11249
11248
  return (input) => {
@@ -11356,7 +11355,8 @@ const verboseLog = ({ type, verboseMessage, fdNumber, verboseInfo, result }) =>
11356
11355
  result,
11357
11356
  verboseInfo
11358
11357
  });
11359
- const finalLines = applyVerboseOnLines(getPrintedLines(verboseMessage, verboseObject), verboseInfo, fdNumber);
11358
+ const printedLines = getPrintedLines(verboseMessage, verboseObject);
11359
+ const finalLines = applyVerboseOnLines(printedLines, verboseInfo, fdNumber);
11360
11360
  if (finalLines !== "") console.warn(finalLines.slice(0, -1));
11361
11361
  };
11362
11362
  const getVerboseObject = ({ type, result, verboseInfo: { escapedCommand, commandId, rawOptions: { piped = false, ...options } } }) => ({
@@ -11379,7 +11379,8 @@ const getPrintedLine = (verboseObject) => {
11379
11379
  };
11380
11380
  };
11381
11381
  const serializeVerboseMessage = (message) => {
11382
- return escapeLines(typeof message === "string" ? message : inspect(message)).replaceAll(" ", " ".repeat(TAB_SIZE));
11382
+ const messageString = typeof message === "string" ? message : inspect(message);
11383
+ return escapeLines(messageString).replaceAll(" ", " ".repeat(TAB_SIZE));
11383
11384
  };
11384
11385
  const TAB_SIZE = 2;
11385
11386
  //#endregion
@@ -11424,7 +11425,8 @@ const getDurationMs = (startTime) => Number(hrtime.bigint() - startTime) / 1e6;
11424
11425
  const handleCommand = (filePath, rawArguments, rawOptions) => {
11425
11426
  const startTime = getStartTime();
11426
11427
  const { command, escapedCommand } = joinCommand(filePath, rawArguments);
11427
- const verboseInfo = getVerboseInfo(normalizeFdSpecificOption(rawOptions, "verbose"), escapedCommand, { ...rawOptions });
11428
+ const verbose = normalizeFdSpecificOption(rawOptions, "verbose");
11429
+ const verboseInfo = getVerboseInfo(verbose, escapedCommand, { ...rawOptions });
11428
11430
  logCommand(escapedCommand, verboseInfo);
11429
11431
  return {
11430
11432
  command,
@@ -11438,7 +11440,7 @@ const handleCommand = (filePath, rawArguments, rawOptions) => {
11438
11440
  var require_windows = /* @__PURE__ */ __commonJSMin(((exports, module) => {
11439
11441
  module.exports = isexe;
11440
11442
  isexe.sync = sync;
11441
- var fs$3 = __require("fs");
11443
+ var fs = __require("fs");
11442
11444
  function checkPathExt(path, options) {
11443
11445
  var pathext = options.pathExt !== void 0 ? options.pathExt : process.env.PATHEXT;
11444
11446
  if (!pathext) return true;
@@ -11455,12 +11457,12 @@ var require_windows = /* @__PURE__ */ __commonJSMin(((exports, module) => {
11455
11457
  return checkPathExt(path, options);
11456
11458
  }
11457
11459
  function isexe(path, options, cb) {
11458
- fs$3.stat(path, function(er, stat) {
11460
+ fs.stat(path, function(er, stat) {
11459
11461
  cb(er, er ? false : checkStat(stat, path, options));
11460
11462
  });
11461
11463
  }
11462
11464
  function sync(path, options) {
11463
- return checkStat(fs$3.statSync(path), path, options);
11465
+ return checkStat(fs.statSync(path), path, options);
11464
11466
  }
11465
11467
  }));
11466
11468
  //#endregion
@@ -11468,14 +11470,14 @@ var require_windows = /* @__PURE__ */ __commonJSMin(((exports, module) => {
11468
11470
  var require_mode = /* @__PURE__ */ __commonJSMin(((exports, module) => {
11469
11471
  module.exports = isexe;
11470
11472
  isexe.sync = sync;
11471
- var fs$2 = __require("fs");
11473
+ var fs = __require("fs");
11472
11474
  function isexe(path, options, cb) {
11473
- fs$2.stat(path, function(er, stat) {
11475
+ fs.stat(path, function(er, stat) {
11474
11476
  cb(er, er ? false : checkStat(stat, options));
11475
11477
  });
11476
11478
  }
11477
11479
  function sync(path, options) {
11478
- return checkStat(fs$2.statSync(path), options);
11480
+ return checkStat(fs.statSync(path), options);
11479
11481
  }
11480
11482
  function checkStat(stat, options) {
11481
11483
  return stat.isFile() && checkMode(stat, options);
@@ -11539,13 +11541,14 @@ var require_isexe = /* @__PURE__ */ __commonJSMin(((exports, module) => {
11539
11541
  //#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/which/2.0.2/552539f3776c3e1eb0a529e767aae6852f3518bf73e532a9552c4d0550928726/node_modules/which/which.js
11540
11542
  var require_which = /* @__PURE__ */ __commonJSMin(((exports, module) => {
11541
11543
  const isWindows = process.platform === "win32" || process.env.OSTYPE === "cygwin" || process.env.OSTYPE === "msys";
11542
- const path$4 = __require("path");
11544
+ const path = __require("path");
11543
11545
  const COLON = isWindows ? ";" : ":";
11544
11546
  const isexe = require_isexe();
11545
11547
  const getNotFoundError = (cmd) => Object.assign(/* @__PURE__ */ new Error(`not found: ${cmd}`), { code: "ENOENT" });
11546
11548
  const getPathInfo = (cmd, opt) => {
11547
11549
  const colon = opt.colon || COLON;
11548
- const pathEnv = cmd.match(/\//) || isWindows && cmd.match(/\\/) ? [""] : [...isWindows ? [process.cwd()] : [], ...(opt.path || process.env.PATH || "").split(colon)];
11550
+ const pathEnv = cmd.match(/\//) || isWindows && cmd.match(/\\/) ? [""] : [...isWindows ? [process.cwd()] : [], ...(opt.path || process.env.PATH ||
11551
+ /* istanbul ignore next: very unusual */ "").split(colon)];
11549
11552
  const pathExtExe = isWindows ? opt.pathExt || process.env.PATHEXT || ".EXE;.CMD;.BAT;.COM" : "";
11550
11553
  const pathExt = isWindows ? pathExtExe.split(colon) : [""];
11551
11554
  if (isWindows) {
@@ -11569,7 +11572,7 @@ var require_which = /* @__PURE__ */ __commonJSMin(((exports, module) => {
11569
11572
  if (i === pathEnv.length) return opt.all && found.length ? resolve(found) : reject(getNotFoundError(cmd));
11570
11573
  const ppRaw = pathEnv[i];
11571
11574
  const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
11572
- const pCmd = path$4.join(pathPart, cmd);
11575
+ const pCmd = path.join(pathPart, cmd);
11573
11576
  const p = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd;
11574
11577
  resolve(subStep(p, i, 0));
11575
11578
  });
@@ -11577,8 +11580,10 @@ var require_which = /* @__PURE__ */ __commonJSMin(((exports, module) => {
11577
11580
  if (ii === pathExt.length) return resolve(step(i + 1));
11578
11581
  const ext = pathExt[ii];
11579
11582
  isexe(p + ext, { pathExt: pathExtExe }, (er, is) => {
11580
- if (!er && is) if (opt.all) found.push(p + ext);
11581
- else return resolve(p + ext);
11583
+ if (!er && is) {
11584
+ if (opt.all) found.push(p + ext);
11585
+ else return resolve(p + ext);
11586
+ }
11582
11587
  return resolve(subStep(p, i, ii + 1));
11583
11588
  });
11584
11589
  });
@@ -11591,13 +11596,15 @@ var require_which = /* @__PURE__ */ __commonJSMin(((exports, module) => {
11591
11596
  for (let i = 0; i < pathEnv.length; i++) {
11592
11597
  const ppRaw = pathEnv[i];
11593
11598
  const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
11594
- const pCmd = path$4.join(pathPart, cmd);
11599
+ const pCmd = path.join(pathPart, cmd);
11595
11600
  const p = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd;
11596
11601
  for (let j = 0; j < pathExt.length; j++) {
11597
11602
  const cur = p + pathExt[j];
11598
11603
  try {
11599
- if (isexe.sync(cur, { pathExt: pathExtExe })) if (opt.all) found.push(cur);
11600
- else return cur;
11604
+ if (isexe.sync(cur, { pathExt: pathExtExe })) {
11605
+ if (opt.all) found.push(cur);
11606
+ else return cur;
11607
+ }
11601
11608
  } catch (ex) {}
11602
11609
  }
11603
11610
  }
@@ -11622,7 +11629,7 @@ var require_path_key = /* @__PURE__ */ __commonJSMin(((exports, module) => {
11622
11629
  //#endregion
11623
11630
  //#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/cross-spawn/7.0.6/a0a7b60251bf98d42302e5b6167c5496ce00c1a1aae367d1dcd3d4eca3396349/node_modules/cross-spawn/lib/util/resolveCommand.js
11624
11631
  var require_resolveCommand = /* @__PURE__ */ __commonJSMin(((exports, module) => {
11625
- const path$3 = __require("path");
11632
+ const path = __require("path");
11626
11633
  const which = require_which();
11627
11634
  const getPathKey = require_path_key();
11628
11635
  function resolveCommandAttempt(parsed, withoutPathExt) {
@@ -11637,12 +11644,12 @@ var require_resolveCommand = /* @__PURE__ */ __commonJSMin(((exports, module) =>
11637
11644
  try {
11638
11645
  resolved = which.sync(parsed.command, {
11639
11646
  path: env[getPathKey({ env })],
11640
- pathExt: withoutPathExt ? path$3.delimiter : void 0
11647
+ pathExt: withoutPathExt ? path.delimiter : void 0
11641
11648
  });
11642
11649
  } catch (e) {} finally {
11643
11650
  if (shouldSwitchCwd) process.chdir(cwd);
11644
11651
  }
11645
- if (resolved) resolved = path$3.resolve(hasCustomCwd ? parsed.options.cwd : "", resolved);
11652
+ if (resolved) resolved = path.resolve(hasCustomCwd ? parsed.options.cwd : "", resolved);
11646
11653
  return resolved;
11647
11654
  }
11648
11655
  function resolveCommand(parsed) {
@@ -11691,16 +11698,16 @@ var require_shebang_command = /* @__PURE__ */ __commonJSMin(((exports, module) =
11691
11698
  //#endregion
11692
11699
  //#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/cross-spawn/7.0.6/a0a7b60251bf98d42302e5b6167c5496ce00c1a1aae367d1dcd3d4eca3396349/node_modules/cross-spawn/lib/util/readShebang.js
11693
11700
  var require_readShebang = /* @__PURE__ */ __commonJSMin(((exports, module) => {
11694
- const fs$1 = __require("fs");
11701
+ const fs = __require("fs");
11695
11702
  const shebangCommand = require_shebang_command();
11696
11703
  function readShebang(command) {
11697
11704
  const size = 150;
11698
11705
  const buffer = Buffer.alloc(size);
11699
11706
  let fd;
11700
11707
  try {
11701
- fd = fs$1.openSync(command, "r");
11702
- fs$1.readSync(fd, buffer, 0, size, 0);
11703
- fs$1.closeSync(fd);
11708
+ fd = fs.openSync(command, "r");
11709
+ fs.readSync(fd, buffer, 0, size, 0);
11710
+ fs.closeSync(fd);
11704
11711
  } catch (e) {}
11705
11712
  return shebangCommand(buffer.toString());
11706
11713
  }
@@ -11709,7 +11716,7 @@ var require_readShebang = /* @__PURE__ */ __commonJSMin(((exports, module) => {
11709
11716
  //#endregion
11710
11717
  //#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/cross-spawn/7.0.6/a0a7b60251bf98d42302e5b6167c5496ce00c1a1aae367d1dcd3d4eca3396349/node_modules/cross-spawn/lib/parse.js
11711
11718
  var require_parse$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
11712
- const path$2 = __require("path");
11719
+ const path = __require("path");
11713
11720
  const resolveCommand = require_resolveCommand();
11714
11721
  const escape = require_escape();
11715
11722
  const readShebang = require_readShebang();
@@ -11732,7 +11739,7 @@ var require_parse$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
11732
11739
  const needsShell = !isExecutableRegExp.test(commandFile);
11733
11740
  if (parsed.options.forceShell || needsShell) {
11734
11741
  const needsDoubleEscapeMetaChars = isCmdShimRegExp.test(commandFile);
11735
- parsed.command = path$2.normalize(parsed.command);
11742
+ parsed.command = path.normalize(parsed.command);
11736
11743
  parsed.command = escape.command(parsed.command);
11737
11744
  parsed.args = parsed.args.map((arg) => escape.argument(arg, needsDoubleEscapeMetaChars));
11738
11745
  parsed.args = [
@@ -12288,7 +12295,7 @@ const normalizeForceKillAfterDelay = (forceKillAfterDelay) => {
12288
12295
  if (!Number.isFinite(forceKillAfterDelay) || forceKillAfterDelay < 0) throw new TypeError(`Expected the \`forceKillAfterDelay\` option to be a non-negative integer, got \`${forceKillAfterDelay}\` (${typeof forceKillAfterDelay})`);
12289
12296
  return forceKillAfterDelay;
12290
12297
  };
12291
- const DEFAULT_FORCE_KILL_TIMEOUT = 1e3 * 5;
12298
+ const DEFAULT_FORCE_KILL_TIMEOUT = 5e3;
12292
12299
  const subprocessKill = ({ kill, options: { forceKillAfterDelay, killSignal }, onInternalError, context, controller }, signalOrError, errorArgument) => {
12293
12300
  const { signal, error } = parseKillArguments(signalOrError, errorArgument, killSignal);
12294
12301
  emitKillError(error, onInternalError);
@@ -12600,7 +12607,8 @@ const isConnected = (anyProcess) => {
12600
12607
  //#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/execa/9.6.1/139b3ebfc5d596c0d185bc77ec551c9d6d2f34aa9585df944f9f754628991886/node_modules/execa/lib/ipc/strict.js
12601
12608
  const handleSendStrict = ({ anyProcess, channel, isSubprocess, message, strict }) => {
12602
12609
  if (!strict) return message;
12603
- const hasListeners = hasMessageListeners(anyProcess, getIpcEmitter(anyProcess, channel, isSubprocess));
12610
+ const ipcEmitter = getIpcEmitter(anyProcess, channel, isSubprocess);
12611
+ const hasListeners = hasMessageListeners(anyProcess, ipcEmitter);
12604
12612
  return {
12605
12613
  id: count++,
12606
12614
  type: REQUEST_TYPE,
@@ -12832,7 +12840,8 @@ const throwOnGracefulCancel = ({ subprocess, cancelSignal, gracefulCancel, force
12832
12840
  })] : [];
12833
12841
  const sendOnAbort = async ({ subprocess, cancelSignal, forceKillAfterDelay, context, controller: { signal } }) => {
12834
12842
  await onAbortedSignal(cancelSignal, signal);
12835
- await sendAbort(subprocess, getReason(cancelSignal));
12843
+ const reason = getReason(cancelSignal);
12844
+ await sendAbort(subprocess, reason);
12836
12845
  killOnTimeout({
12837
12846
  kill: subprocess.kill,
12838
12847
  forceKillAfterDelay,
@@ -13509,7 +13518,8 @@ const getErrorPrefix = ({ originalError, timedOut, timeout, isMaxBuffer, maxBuff
13509
13518
  const getForcefulSuffix = (isForcefullyTerminated, forceKillAfterDelay) => isForcefullyTerminated ? ` and was forcefully terminated after ${forceKillAfterDelay} milliseconds` : "";
13510
13519
  const getOriginalMessage = (originalError, cwd) => {
13511
13520
  if (originalError instanceof DiscardedError) return;
13512
- const escapedOriginalMessage = escapeLines(fixCwdError(isExecaError(originalError) ? originalError.originalMessage : String(originalError?.message ?? originalError), cwd));
13521
+ const originalMessage = isExecaError(originalError) ? originalError.originalMessage : String(originalError?.message ?? originalError);
13522
+ const escapedOriginalMessage = escapeLines(fixCwdError(originalMessage, cwd));
13513
13523
  return escapedOriginalMessage === "" ? void 0 : escapedOriginalMessage;
13514
13524
  };
13515
13525
  const serializeIpcMessage = (ipcMessage) => typeof ipcMessage === "string" ? ipcMessage : inspect(ipcMessage);
@@ -13720,26 +13730,28 @@ function prettyMilliseconds(milliseconds, options) {
13720
13730
  add(Number(parsed.hours), "hour", "h");
13721
13731
  }
13722
13732
  add(Number(parsed.minutes), "minute", "m");
13723
- if (!options.hideSeconds) if (options.separateMilliseconds || options.formatSubMilliseconds || !options.colonNotation && milliseconds < 1e3 && !options.subSecondsAsDecimals) {
13724
- const seconds = Number(parsed.seconds);
13725
- const milliseconds = Number(parsed.milliseconds);
13726
- const microseconds = Number(parsed.microseconds);
13727
- const nanoseconds = Number(parsed.nanoseconds);
13728
- add(seconds, "second", "s");
13729
- if (options.formatSubMilliseconds) {
13730
- add(milliseconds, "millisecond", "ms");
13731
- add(microseconds, "microsecond", "µs");
13732
- add(nanoseconds, "nanosecond", "ns");
13733
+ if (!options.hideSeconds) {
13734
+ if (options.separateMilliseconds || options.formatSubMilliseconds || !options.colonNotation && milliseconds < 1e3 && !options.subSecondsAsDecimals) {
13735
+ const seconds = Number(parsed.seconds);
13736
+ const milliseconds = Number(parsed.milliseconds);
13737
+ const microseconds = Number(parsed.microseconds);
13738
+ const nanoseconds = Number(parsed.nanoseconds);
13739
+ add(seconds, "second", "s");
13740
+ if (options.formatSubMilliseconds) {
13741
+ add(milliseconds, "millisecond", "ms");
13742
+ add(microseconds, "microsecond", "µs");
13743
+ add(nanoseconds, "nanosecond", "ns");
13744
+ } else {
13745
+ const millisecondsAndBelow = milliseconds + microseconds / 1e3 + nanoseconds / 1e6;
13746
+ const millisecondsDecimalDigits = typeof options.millisecondsDecimalDigits === "number" ? options.millisecondsDecimalDigits : 0;
13747
+ const millisecondsString = millisecondsDecimalDigits ? millisecondsAndBelow.toFixed(millisecondsDecimalDigits) : millisecondsAndBelow >= 1 ? Math.round(millisecondsAndBelow) : Math.ceil(millisecondsAndBelow);
13748
+ add(Number.parseFloat(millisecondsString), "millisecond", "ms", millisecondsString);
13749
+ }
13733
13750
  } else {
13734
- const millisecondsAndBelow = milliseconds + microseconds / 1e3 + nanoseconds / 1e6;
13735
- const millisecondsDecimalDigits = typeof options.millisecondsDecimalDigits === "number" ? options.millisecondsDecimalDigits : 0;
13736
- const millisecondsString = millisecondsDecimalDigits ? millisecondsAndBelow.toFixed(millisecondsDecimalDigits) : millisecondsAndBelow >= 1 ? Math.round(millisecondsAndBelow) : Math.ceil(millisecondsAndBelow);
13737
- add(Number.parseFloat(millisecondsString), "millisecond", "ms", millisecondsString);
13751
+ const secondsFixed = floorDecimals((isBigInt ? Number(milliseconds % ONE_DAY_IN_MILLISECONDS) : milliseconds) / 1e3 % 60, typeof options.secondsDecimalDigits === "number" ? options.secondsDecimalDigits : 1);
13752
+ const secondsString = options.keepDecimalsOnWholeSeconds ? secondsFixed : secondsFixed.replace(/\.0+$/, "");
13753
+ add(Number.parseFloat(secondsString), "second", "s", secondsString);
13738
13754
  }
13739
- } else {
13740
- const secondsFixed = floorDecimals((isBigInt ? Number(milliseconds % ONE_DAY_IN_MILLISECONDS) : milliseconds) / 1e3 % 60, typeof options.secondsDecimalDigits === "number" ? options.secondsDecimalDigits : 1);
13741
- const secondsString = options.keepDecimalsOnWholeSeconds ? secondsFixed : secondsFixed.replace(/\.0+$/, "");
13742
- add(Number.parseFloat(secondsString), "second", "s", secondsString);
13743
13755
  }
13744
13756
  if (result.length === 0) return sign + "0" + (options.verbose ? " milliseconds" : "ms");
13745
13757
  const separator = options.colonNotation ? ":" : " ";
@@ -13764,9 +13776,10 @@ const logResult = (result, verboseInfo) => {
13764
13776
  logDuration(result, verboseInfo);
13765
13777
  };
13766
13778
  const logDuration = (result, verboseInfo) => {
13779
+ const verboseMessage = `(done in ${prettyMilliseconds(result.durationMs)})`;
13767
13780
  verboseLog({
13768
13781
  type: "duration",
13769
- verboseMessage: `(done in ${prettyMilliseconds(result.durationMs)})`,
13782
+ verboseMessage,
13770
13783
  verboseInfo,
13771
13784
  result
13772
13785
  });
@@ -14244,13 +14257,14 @@ const getFileDescriptor = ({ stdioOption, fdNumber, options, isSync }) => {
14244
14257
  optionName
14245
14258
  });
14246
14259
  const direction = getStreamDirection(initialStdioItems, fdNumber, optionName);
14247
- const normalizedStdioItems = normalizeTransforms(initialStdioItems.map((stdioItem) => handleNativeStream({
14260
+ const stdioItems = initialStdioItems.map((stdioItem) => handleNativeStream({
14248
14261
  stdioItem,
14249
14262
  isStdioArray,
14250
14263
  fdNumber,
14251
14264
  direction,
14252
14265
  isSync
14253
- })), optionName, direction, options);
14266
+ }));
14267
+ const normalizedStdioItems = normalizeTransforms(stdioItems, optionName, direction, options);
14254
14268
  const objectMode = getFdObjectMode(normalizedStdioItems, direction);
14255
14269
  validateFileObjectMode(normalizedStdioItems, objectMode);
14256
14270
  return {
@@ -14260,7 +14274,8 @@ const getFileDescriptor = ({ stdioOption, fdNumber, options, isSync }) => {
14260
14274
  };
14261
14275
  };
14262
14276
  const initializeStdioItems = ({ stdioOption, fdNumber, options, optionName }) => {
14263
- const stdioItems = filterDuplicates([...(Array.isArray(stdioOption) ? stdioOption : [stdioOption]).map((value) => initializeStdioItem(value, optionName)), ...handleInputOptions(options, fdNumber)]);
14277
+ const initialStdioItems = [...(Array.isArray(stdioOption) ? stdioOption : [stdioOption]).map((value) => initializeStdioItem(value, optionName)), ...handleInputOptions(options, fdNumber)];
14278
+ const stdioItems = filterDuplicates(initialStdioItems);
14264
14279
  const isStdioArray = stdioItems.length > 1;
14265
14280
  validateStdioArray(stdioItems, isStdioArray, optionName);
14266
14281
  validateStreams(stdioItems);
@@ -14608,7 +14623,10 @@ const generatorToStream = ({ value, value: { transform, final, writableObjectMod
14608
14623
  const runGeneratorsSync = (chunks, stdioItems, encoding, isInput) => {
14609
14624
  const generators = stdioItems.filter(({ type }) => type === "generator");
14610
14625
  const reversedGenerators = isInput ? generators.reverse() : generators;
14611
- for (const { value, optionName } of reversedGenerators) chunks = runTransformSync(addInternalGenerators(value, encoding, optionName), chunks);
14626
+ for (const { value, optionName } of reversedGenerators) {
14627
+ const generators = addInternalGenerators(value, encoding, optionName);
14628
+ chunks = runTransformSync(generators, chunks);
14629
+ }
14612
14630
  return chunks;
14613
14631
  };
14614
14632
  const addInternalGenerators = ({ transform, final, binary, writableObjectMode, readableObjectMode, preserveNewlines }, encoding, optionName) => {
@@ -14644,7 +14662,8 @@ const addInputOptionSync = (fileDescriptors, fdNumber, options) => {
14644
14662
  const [{ type, optionName }] = allStdioItems;
14645
14663
  throw new TypeError(`Only the \`stdin\` option, not \`${optionName}\`, can be ${TYPE_TO_MESSAGE[type]} with synchronous methods.`);
14646
14664
  }
14647
- options.input = joinToUint8Array(allStdioItems.map(({ contents }) => contents).map((contents) => applySingleInputGeneratorsSync(contents, stdioItems)));
14665
+ const transformedContents = allStdioItems.map(({ contents }) => contents).map((contents) => applySingleInputGeneratorsSync(contents, stdioItems));
14666
+ options.input = joinToUint8Array(transformedContents);
14648
14667
  };
14649
14668
  const applySingleInputGeneratorsSync = (contents, stdioItems) => {
14650
14669
  const newContents = runGeneratorsSync(contents, stdioItems, "utf8", true);
@@ -14668,9 +14687,10 @@ const logLinesSync = (linesArray, fdNumber, verboseInfo) => {
14668
14687
  };
14669
14688
  const isPipingStream = (stream) => stream._readableState.pipes.length > 0;
14670
14689
  const logLine = (line, fdNumber, verboseInfo) => {
14690
+ const verboseMessage = serializeVerboseMessage(line);
14671
14691
  verboseLog({
14672
14692
  type: "output",
14673
- verboseMessage: serializeVerboseMessage(line),
14693
+ verboseMessage,
14674
14694
  fdNumber,
14675
14695
  verboseInfo
14676
14696
  });
@@ -14696,7 +14716,8 @@ const transformOutputSync = ({ fileDescriptors, syncResult: { output }, options,
14696
14716
  };
14697
14717
  const transformOutputResultSync = ({ result, fileDescriptors, fdNumber, state, outputFiles, isMaxBuffer, verboseInfo }, { buffer, encoding, lines, stripFinalNewline, maxBuffer }) => {
14698
14718
  if (result === null) return;
14699
- const uint8ArrayResult = bufferToUint8Array(truncateMaxBufferSync(result, isMaxBuffer, maxBuffer));
14719
+ const truncatedResult = truncateMaxBufferSync(result, isMaxBuffer, maxBuffer);
14720
+ const uint8ArrayResult = bufferToUint8Array(truncatedResult);
14700
14721
  const { stdioItems, objectMode } = fileDescriptors[fdNumber];
14701
14722
  const chunks = runOutputGeneratorsSync([uint8ArrayResult], stdioItems, encoding, state);
14702
14723
  const { serializedResult, finalResult = serializedResult } = serializeChunks({
@@ -14824,7 +14845,7 @@ const getResultError = (error, exitCode, signal) => {
14824
14845
  //#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/execa/9.6.1/139b3ebfc5d596c0d185bc77ec551c9d6d2f34aa9585df944f9f754628991886/node_modules/execa/lib/methods/main-sync.js
14825
14846
  const execaCoreSync = (rawFile, rawArguments, rawOptions) => {
14826
14847
  const { file, commandArguments, command, escapedCommand, startTime, verboseInfo, options, fileDescriptors } = handleSyncArguments(rawFile, rawArguments, rawOptions);
14827
- return handleResult(spawnSubprocessSync({
14848
+ const result = spawnSubprocessSync({
14828
14849
  file,
14829
14850
  commandArguments,
14830
14851
  options,
@@ -14833,11 +14854,13 @@ const execaCoreSync = (rawFile, rawArguments, rawOptions) => {
14833
14854
  verboseInfo,
14834
14855
  fileDescriptors,
14835
14856
  startTime
14836
- }), verboseInfo, options);
14857
+ });
14858
+ return handleResult(result, verboseInfo, options);
14837
14859
  };
14838
14860
  const handleSyncArguments = (rawFile, rawArguments, rawOptions) => {
14839
14861
  const { command, escapedCommand, startTime, verboseInfo } = handleCommand(rawFile, rawArguments, rawOptions);
14840
- const { file, commandArguments, options } = normalizeOptions(rawFile, rawArguments, normalizeSyncOptions(rawOptions));
14862
+ const syncOptions = normalizeSyncOptions(rawOptions);
14863
+ const { file, commandArguments, options } = normalizeOptions(rawFile, rawArguments, syncOptions);
14841
14864
  validateSyncOptions(options);
14842
14865
  return {
14843
14866
  file,
@@ -14901,7 +14924,8 @@ const spawnSubprocessSync = ({ file, commandArguments, options, command, escaped
14901
14924
  const runSubprocessSync = ({ file, commandArguments, options, command, escapedCommand, fileDescriptors, startTime }) => {
14902
14925
  try {
14903
14926
  addInputOptionsSync(fileDescriptors, options);
14904
- return spawnSync(...concatenateShell(file, commandArguments, normalizeSpawnSyncOptions(options)));
14927
+ const normalizedOptions = normalizeSpawnSyncOptions(options);
14928
+ return spawnSync(...concatenateShell(file, commandArguments, normalizedOptions));
14905
14929
  } catch (error) {
14906
14930
  return makeEarlyError({
14907
14931
  error,
@@ -15310,8 +15334,10 @@ const endWhenStreamsDone = async ({ passThroughStream, stream, streams, ended, a
15310
15334
  controller.abort();
15311
15335
  updateMaxListeners(passThroughStream, -PASSTHROUGH_LISTENERS_PER_STREAM);
15312
15336
  }
15313
- if (streams.size > 0 && streams.size === ended.size + aborted.size) if (ended.size === 0 && aborted.size > 0) abortStream(passThroughStream);
15314
- else endStream(passThroughStream);
15337
+ if (streams.size > 0 && streams.size === ended.size + aborted.size) {
15338
+ if (ended.size === 0 && aborted.size > 0) abortStream(passThroughStream);
15339
+ else endStream(passThroughStream);
15340
+ }
15315
15341
  };
15316
15342
  const afterMergedStreamFinished = async (onFinished, stream, { signal }) => {
15317
15343
  try {
@@ -15417,7 +15443,10 @@ const pipeOutputAsync = (subprocess, fileDescriptors, controller) => {
15417
15443
  controller
15418
15444
  });
15419
15445
  }
15420
- for (const [outputStream, inputStreams] of pipeGroups.entries()) pipeStreams(inputStreams.length === 1 ? inputStreams[0] : mergeStreams(inputStreams), outputStream);
15446
+ for (const [outputStream, inputStreams] of pipeGroups.entries()) {
15447
+ const inputStream = inputStreams.length === 1 ? inputStreams[0] : mergeStreams(inputStreams);
15448
+ pipeStreams(inputStream, outputStream);
15449
+ }
15421
15450
  };
15422
15451
  const pipeTransform = (subprocess, stream, direction, fdNumber) => {
15423
15452
  if (direction === "output") pipeStreams(subprocess.stdio[fdNumber], stream);
@@ -15956,12 +15985,13 @@ const getStreamOutput = async ({ stream, onStreamEnd, fdNumber, encoding, buffer
15956
15985
  await Promise.all([resumeStream(stream), logPromise]);
15957
15986
  return;
15958
15987
  }
15988
+ const stripFinalNewlineValue = getStripFinalNewline(stripFinalNewline, fdNumber);
15959
15989
  const iterable = iterateForResult({
15960
15990
  stream,
15961
15991
  onStreamEnd,
15962
15992
  lines,
15963
15993
  encoding,
15964
- stripFinalNewline: getStripFinalNewline(stripFinalNewline, fdNumber),
15994
+ stripFinalNewline: stripFinalNewlineValue,
15965
15995
  allMixed
15966
15996
  });
15967
15997
  const [output] = await Promise.all([getStreamContents({
@@ -15981,14 +16011,15 @@ const logOutputAsync = async ({ stream, onStreamEnd, fdNumber, encoding, allMixe
15981
16011
  verboseInfo,
15982
16012
  fdNumber
15983
16013
  })) return;
15984
- await logLines(iterateForResult({
16014
+ const linesIterable = iterateForResult({
15985
16015
  stream,
15986
16016
  onStreamEnd,
15987
16017
  lines: true,
15988
16018
  encoding,
15989
16019
  stripFinalNewline: true,
15990
16020
  allMixed
15991
- }), stream, fdNumber, verboseInfo);
16021
+ });
16022
+ await logLines(linesIterable, stream, fdNumber, verboseInfo);
15992
16023
  };
15993
16024
  const resumeStream = async (stream) => {
15994
16025
  await setImmediate();
@@ -16134,9 +16165,10 @@ const getAllMixed = ({ all, stdout, stderr }) => all && stdout && stderr && stdo
16134
16165
  //#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/execa/9.6.1/139b3ebfc5d596c0d185bc77ec551c9d6d2f34aa9585df944f9f754628991886/node_modules/execa/lib/verbose/ipc.js
16135
16166
  const shouldLogIpc = (verboseInfo) => isFullVerbose(verboseInfo, "ipc");
16136
16167
  const logIpcOutput = (message, verboseInfo) => {
16168
+ const verboseMessage = serializeVerboseMessage(message);
16137
16169
  verboseLog({
16138
16170
  type: "ipc",
16139
- verboseMessage: serializeVerboseMessage(message),
16171
+ verboseMessage,
16140
16172
  fdNumber: "ipc",
16141
16173
  verboseInfo
16142
16174
  });
@@ -16702,7 +16734,7 @@ const handlePromise = async ({ subprocess, options, startTime, verboseInfo, file
16702
16734
  onInternalError.resolve();
16703
16735
  const stdio = stdioResults.map((stdioResult, fdNumber) => stripNewline(stdioResult, options, fdNumber));
16704
16736
  const all = stripNewline(allResult, options, "all");
16705
- return handleResult(getAsyncResult({
16737
+ const result = getAsyncResult({
16706
16738
  errorInfo,
16707
16739
  exitCode,
16708
16740
  signal,
@@ -16714,7 +16746,8 @@ const handlePromise = async ({ subprocess, options, startTime, verboseInfo, file
16714
16746
  command,
16715
16747
  escapedCommand,
16716
16748
  startTime
16717
- }), verboseInfo, options);
16749
+ });
16750
+ return handleResult(result, verboseInfo, options);
16718
16751
  };
16719
16752
  const getAsyncResult = ({ errorInfo, exitCode, signal, stdio, all, ipcOutput, context, options, command, escapedCommand, startTime }) => "error" in errorInfo ? makeError({
16720
16753
  error: errorInfo.error,
@@ -16785,7 +16818,8 @@ const callBoundExeca = ({ mapArguments, deepOptions = {}, boundOptions = {}, set
16785
16818
  return isSync ? execaCoreSync(file, commandArguments, options) : execaCoreAsync(file, commandArguments, options, createNested);
16786
16819
  };
16787
16820
  const parseArguments = ({ mapArguments, firstArgument, nextArguments, deepOptions, boundOptions }) => {
16788
- const [initialFile, initialArguments, initialOptions] = normalizeParameters(...isTemplateString(firstArgument) ? parseTemplates(firstArgument, nextArguments) : [firstArgument, ...nextArguments]);
16821
+ const callArguments = isTemplateString(firstArgument) ? parseTemplates(firstArgument, nextArguments) : [firstArgument, ...nextArguments];
16822
+ const [initialFile, initialArguments, initialOptions] = normalizeParameters(...callArguments);
16789
16823
  const mergedOptions = mergeOptions(mergeOptions(deepOptions, boundOptions), initialOptions);
16790
16824
  const { file = initialFile, commandArguments = initialArguments, options = mergedOptions, isSync = false } = mapArguments({
16791
16825
  file: initialFile,
@@ -17002,7 +17036,7 @@ var require_yocto_spinner = /* @__PURE__ */ __commonJSMin(((exports, module) =>
17002
17036
  return _unicodeSupported;
17003
17037
  }
17004
17038
  let _stripVTControlCharacters;
17005
- function stripVTControlCharacters$1(string) {
17039
+ function stripVTControlCharacters(string) {
17006
17040
  if (_stripVTControlCharacters === void 0) _stripVTControlCharacters = (/* @__PURE__ */ __require("node:util")).stripVTControlCharacters;
17007
17041
  return _stripVTControlCharacters(string);
17008
17042
  }
@@ -17080,7 +17114,7 @@ var require_yocto_spinner = /* @__PURE__ */ __commonJSMin(((exports, module) =>
17080
17114
  }
17081
17115
  #lineCount(text) {
17082
17116
  const width = this.#stream.columns ?? defaultTtyColumns;
17083
- const lines = stripVTControlCharacters$1(text).split("\n");
17117
+ const lines = stripVTControlCharacters(text).split("\n");
17084
17118
  let lineCount = 0;
17085
17119
  for (const line of lines) lineCount += Math.max(1, Math.ceil(line.length / width));
17086
17120
  return lineCount;
@@ -17233,7 +17267,7 @@ var require_yocto_spinner = /* @__PURE__ */ __commonJSMin(((exports, module) =>
17233
17267
  };
17234
17268
  }));
17235
17269
  //#endregion
17236
- //#region ../cli/dist/analytics-CymFkXqr.js
17270
+ //#region ../cli/dist/analytics-BRXRrY-W.js
17237
17271
  const CREATE_LLM_PROVIDERS = [
17238
17272
  {
17239
17273
  value: "openai",
@@ -17610,14 +17644,12 @@ var PosthogAnalytics = class PosthogAnalytics {
17610
17644
  //#endregion
17611
17645
  //#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/semver/7.8.5/50b76942b76b1567bb275b07b36d4efd1f7bc678ee222317e6ec7ff2c047c60d/node_modules/semver/internal/constants.js
17612
17646
  var require_constants = /* @__PURE__ */ __commonJSMin(((exports, module) => {
17613
- const SEMVER_SPEC_VERSION = "2.0.0";
17614
- const MAX_LENGTH = 256;
17615
- const MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || 9007199254740991;
17616
17647
  module.exports = {
17617
- MAX_LENGTH,
17648
+ MAX_LENGTH: 256,
17618
17649
  MAX_SAFE_COMPONENT_LENGTH: 16,
17619
- MAX_SAFE_BUILD_LENGTH: MAX_LENGTH - 6,
17620
- MAX_SAFE_INTEGER,
17650
+ MAX_SAFE_BUILD_LENGTH: 250,
17651
+ MAX_SAFE_INTEGER: Number.MAX_SAFE_INTEGER ||
17652
+ /* istanbul ignore next */ 9007199254740991,
17621
17653
  RELEASE_TYPES: [
17622
17654
  "major",
17623
17655
  "premajor",
@@ -17627,7 +17659,7 @@ var require_constants = /* @__PURE__ */ __commonJSMin(((exports, module) => {
17627
17659
  "prepatch",
17628
17660
  "prerelease"
17629
17661
  ],
17630
- SEMVER_SPEC_VERSION,
17662
+ SEMVER_SPEC_VERSION: "2.0.0",
17631
17663
  FLAG_INCLUDE_PRERELEASE: 1,
17632
17664
  FLAG_LOOSE: 2
17633
17665
  };
@@ -17765,9 +17797,10 @@ var require_semver$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
17765
17797
  module.exports = class SemVer {
17766
17798
  constructor(version, options) {
17767
17799
  options = parseOptions(options);
17768
- if (version instanceof SemVer) if (version.loose === !!options.loose && version.includePrerelease === !!options.includePrerelease) return version;
17769
- else version = version.version;
17770
- else if (typeof version !== "string") throw new TypeError(`Invalid version. Must be a string. Got type "${typeof version}".`);
17800
+ if (version instanceof SemVer) {
17801
+ if (version.loose === !!options.loose && version.includePrerelease === !!options.includePrerelease) return version;
17802
+ else version = version.version;
17803
+ } else if (typeof version !== "string") throw new TypeError(`Invalid version. Must be a string. Got type "${typeof version}".`);
17771
17804
  if (version.length > MAX_LENGTH) throw new TypeError(`version is longer than ${MAX_LENGTH} characters`);
17772
17805
  debug("SemVer", version, options);
17773
17806
  this.options = options;
@@ -18220,9 +18253,7 @@ var require_truncate = /* @__PURE__ */ __commonJSMin(((exports, module) => {
18220
18253
  version.minor = 0;
18221
18254
  version.patch = 0;
18222
18255
  break;
18223
- case "minor":
18224
- version.patch = 0;
18225
- break;
18256
+ case "minor": version.patch = 0;
18226
18257
  }
18227
18258
  return version.format();
18228
18259
  };
@@ -18271,8 +18302,10 @@ var require_range = /* @__PURE__ */ __commonJSMin(((exports, module) => {
18271
18302
  module.exports = class Range {
18272
18303
  constructor(range, options) {
18273
18304
  options = parseOptions(options);
18274
- if (range instanceof Range) if (range.loose === !!options.loose && range.includePrerelease === !!options.includePrerelease) return range;
18275
- else return new Range(range.raw, options);
18305
+ if (range instanceof Range) {
18306
+ if (range.loose === !!options.loose && range.includePrerelease === !!options.includePrerelease) return range;
18307
+ else return new Range(range.raw, options);
18308
+ }
18276
18309
  if (range instanceof Comparator) {
18277
18310
  this.raw = range.value;
18278
18311
  this.set = [[range]];
@@ -18442,18 +18475,21 @@ var require_range = /* @__PURE__ */ __commonJSMin(((exports, module) => {
18442
18475
  let ret;
18443
18476
  if (isX(M)) ret = "";
18444
18477
  else if (isX(m)) ret = `>=${M}.0.0${z} <${+M + 1}.0.0-0`;
18445
- else if (isX(p)) if (M === "0") ret = `>=${M}.${m}.0${z} <${M}.${+m + 1}.0-0`;
18446
- else ret = `>=${M}.${m}.0${z} <${+M + 1}.0.0-0`;
18447
- else if (pr) {
18478
+ else if (isX(p)) {
18479
+ if (M === "0") ret = `>=${M}.${m}.0${z} <${M}.${+m + 1}.0-0`;
18480
+ else ret = `>=${M}.${m}.0${z} <${+M + 1}.0.0-0`;
18481
+ } else if (pr) {
18448
18482
  debug("replaceCaret pr", pr);
18449
- if (M === "0") if (m === "0") ret = `>=${M}.${m}.${p}-${pr} <${M}.${m}.${+p + 1}-0`;
18450
- else ret = `>=${M}.${m}.${p}-${pr} <${M}.${+m + 1}.0-0`;
18451
- else ret = `>=${M}.${m}.${p}-${pr} <${+M + 1}.0.0-0`;
18483
+ if (M === "0") {
18484
+ if (m === "0") ret = `>=${M}.${m}.${p}-${pr} <${M}.${m}.${+p + 1}-0`;
18485
+ else ret = `>=${M}.${m}.${p}-${pr} <${M}.${+m + 1}.0-0`;
18486
+ } else ret = `>=${M}.${m}.${p}-${pr} <${+M + 1}.0.0-0`;
18452
18487
  } else {
18453
18488
  debug("no pr");
18454
- if (M === "0") if (m === "0") ret = `>=${M}.${m}.${p} <${M}.${m}.${+p + 1}-0`;
18455
- else ret = `>=${M}.${m}.${p} <${M}.${+m + 1}.0-0`;
18456
- else ret = `>=${M}.${m}.${p} <${+M + 1}.0.0-0`;
18489
+ if (M === "0") {
18490
+ if (m === "0") ret = `>=${M}.${m}.${p} <${M}.${m}.${+p + 1}-0`;
18491
+ else ret = `>=${M}.${m}.${p} <${M}.${+m + 1}.0-0`;
18492
+ } else ret = `>=${M}.${m}.${p} <${+M + 1}.0.0-0`;
18457
18493
  }
18458
18494
  debug("caret return", ret);
18459
18495
  return ret;
@@ -18475,9 +18511,10 @@ var require_range = /* @__PURE__ */ __commonJSMin(((exports, module) => {
18475
18511
  const anyX = xp;
18476
18512
  if (gtlt === "=" && anyX) gtlt = "";
18477
18513
  pr = options.includePrerelease ? "-0" : "";
18478
- if (xM) if (gtlt === ">" || gtlt === "<") ret = "<0.0.0-0";
18479
- else ret = "*";
18480
- else if (gtlt && anyX) {
18514
+ if (xM) {
18515
+ if (gtlt === ">" || gtlt === "<") ret = "<0.0.0-0";
18516
+ else ret = "*";
18517
+ } else if (gtlt && anyX) {
18481
18518
  if (xm) m = 0;
18482
18519
  p = 0;
18483
18520
  if (gtlt === ">") {
@@ -18551,8 +18588,10 @@ var require_comparator = /* @__PURE__ */ __commonJSMin(((exports, module) => {
18551
18588
  }
18552
18589
  constructor(comp, options) {
18553
18590
  options = parseOptions(options);
18554
- if (comp instanceof Comparator) if (comp.loose === !!options.loose) return comp;
18555
- else comp = comp.value;
18591
+ if (comp instanceof Comparator) {
18592
+ if (comp.loose === !!options.loose) return comp;
18593
+ else comp = comp.value;
18594
+ }
18556
18595
  comp = comp.trim().split(/\s+/).join(" ");
18557
18596
  debug("comparator", comp, options);
18558
18597
  this.options = options;
@@ -18872,11 +18911,15 @@ var require_subset = /* @__PURE__ */ __commonJSMin(((exports, module) => {
18872
18911
  const minimumVersion = [new Comparator(">=0.0.0")];
18873
18912
  const simpleSubset = (sub, dom, options) => {
18874
18913
  if (sub === dom) return true;
18875
- if (sub.length === 1 && sub[0].semver === ANY) if (dom.length === 1 && dom[0].semver === ANY) return true;
18876
- else if (options.includePrerelease) sub = minimumVersionWithPreRelease;
18877
- else sub = minimumVersion;
18878
- if (dom.length === 1 && dom[0].semver === ANY) if (options.includePrerelease) return true;
18879
- else dom = minimumVersion;
18914
+ if (sub.length === 1 && sub[0].semver === ANY) {
18915
+ if (dom.length === 1 && dom[0].semver === ANY) return true;
18916
+ else if (options.includePrerelease) sub = minimumVersionWithPreRelease;
18917
+ else sub = minimumVersion;
18918
+ }
18919
+ if (dom.length === 1 && dom[0].semver === ANY) {
18920
+ if (options.includePrerelease) return true;
18921
+ else dom = minimumVersion;
18922
+ }
18880
18923
  const eqSet = /* @__PURE__ */ new Set();
18881
18924
  let gt, lt;
18882
18925
  for (const c of sub) if (c.operator === ">" || c.operator === ">=") gt = higherGT(gt, c, options);
@@ -18997,7 +19040,7 @@ var require_semver = /* @__PURE__ */ __commonJSMin(((exports, module) => {
18997
19040
  };
18998
19041
  }));
18999
19042
  //#endregion
19000
- //#region ../cli/dist/create-DfNx2en7.js
19043
+ //#region ../cli/dist/create-BosFY7Vw.js
19001
19044
  var import_picocolors = /* @__PURE__ */ __toESM(require_picocolors(), 1);
19002
19045
  var import_yocto_spinner = /* @__PURE__ */ __toESM(require_yocto_spinner(), 1);
19003
19046
  var import_semver = /* @__PURE__ */ __toESM(require_semver(), 1);
@@ -19045,9 +19088,10 @@ async function cloneRepositoryWithoutGit(repoUrl, targetPath, branch, signal) {
19045
19088
  signal?.throwIfAborted();
19046
19089
  try {
19047
19090
  const degitRepo = repoUrl.replace("https://github.com/", "");
19091
+ const degitRepoWithBranch = branch ? `${degitRepo}#${branch}` : degitRepo;
19048
19092
  await execa("npx", [
19049
19093
  "degit",
19050
- branch ? `${degitRepo}#${branch}` : degitRepo,
19094
+ degitRepoWithBranch,
19051
19095
  targetPath
19052
19096
  ], {
19053
19097
  cwd: process.cwd(),
@@ -19095,7 +19139,8 @@ async function updatePackageJson(projectPath, projectName) {
19095
19139
  async function installDependencies(projectPath, packageManager, timeout, signal, silent = false) {
19096
19140
  const spinner = startSpinner("Installing dependencies...", signal, silent);
19097
19141
  try {
19098
- await execa(packageManager || getPackageManager(), ["install"], {
19142
+ const pm = packageManager || getPackageManager();
19143
+ await execa(pm, ["install"], {
19099
19144
  cwd: projectPath,
19100
19145
  timeout,
19101
19146
  killSignal: "SIGTERM",
@@ -19122,21 +19167,22 @@ function pluralize(count, singular, plural) {
19122
19167
  return count === 1 ? singular : plural || `${singular}s`;
19123
19168
  }
19124
19169
  async function selectTemplate(templates, options = {}) {
19170
+ const choices = templates.map((template) => {
19171
+ const parts = [];
19172
+ if (template.agents?.length) parts.push(`${template.agents.length} ${pluralize(template.agents.length, "agent")}`);
19173
+ if (template.tools?.length) parts.push(`${template.tools.length} ${pluralize(template.tools.length, "tool")}`);
19174
+ if (template.workflows?.length) parts.push(`${template.workflows.length} ${pluralize(template.workflows.length, "workflow")}`);
19175
+ if (template.mcp?.length) parts.push(`${template.mcp.length} ${pluralize(template.mcp.length, "MCP server")}`);
19176
+ if (template.networks?.length) parts.push(`${template.networks.length} ${pluralize(template.networks.length, "agent network")}`);
19177
+ return {
19178
+ value: template,
19179
+ label: template.title,
19180
+ hint: parts.join(", ") || "Template components"
19181
+ };
19182
+ });
19125
19183
  const selected = await select({
19126
19184
  message: "Select a template:",
19127
- options: templates.map((template) => {
19128
- const parts = [];
19129
- if (template.agents?.length) parts.push(`${template.agents.length} ${pluralize(template.agents.length, "agent")}`);
19130
- if (template.tools?.length) parts.push(`${template.tools.length} ${pluralize(template.tools.length, "tool")}`);
19131
- if (template.workflows?.length) parts.push(`${template.workflows.length} ${pluralize(template.workflows.length, "workflow")}`);
19132
- if (template.mcp?.length) parts.push(`${template.mcp.length} ${pluralize(template.mcp.length, "MCP server")}`);
19133
- if (template.networks?.length) parts.push(`${template.networks.length} ${pluralize(template.networks.length, "agent network")}`);
19134
- return {
19135
- value: template,
19136
- label: template.title,
19137
- hint: parts.join(", ") || "Template components"
19138
- };
19139
- }),
19185
+ options: choices,
19140
19186
  ...options.signal ? { signal: options.signal } : {}
19141
19187
  });
19142
19188
  if (isCancel(selected)) return null;
@@ -19283,14 +19329,15 @@ function deriveTracesEndpoint(platformUrl, projectId) {
19283
19329
  }
19284
19330
  async function installMastraSkills({ directory, agents }) {
19285
19331
  try {
19286
- await execa("npx", [
19332
+ const args = [
19287
19333
  "skills",
19288
19334
  "add",
19289
19335
  "mastra-ai/skills",
19290
19336
  "--agent",
19291
19337
  ...agents,
19292
19338
  "-y"
19293
- ], {
19339
+ ];
19340
+ await execa("npx", args, {
19294
19341
  cwd: directory,
19295
19342
  stdio: "pipe"
19296
19343
  });
@@ -19983,8 +20030,10 @@ const create = async (args) => {
19983
20030
  materializationController.signal.throwIfAborted();
19984
20031
  }
19985
20032
  }
19986
- if (options.install) if (observabilityEnabled) await installDependencies(staging.projectPath, packageManager, options.timeout, materializationController.signal, true);
19987
- else await installDependencies(staging.projectPath, packageManager, options.timeout, materializationController.signal);
20033
+ if (options.install) {
20034
+ if (observabilityEnabled) await installDependencies(staging.projectPath, packageManager, options.timeout, materializationController.signal, true);
20035
+ else await installDependencies(staging.projectPath, packageManager, options.timeout, materializationController.signal);
20036
+ }
19988
20037
  materializationController.signal.throwIfAborted();
19989
20038
  await publishStagedProject({
19990
20039
  projectPath: staging.projectPath,
@@ -20590,7 +20639,8 @@ const z = R;
20590
20639
  //#region src/utils.ts
20591
20640
  const NUMERIC_IDENTIFIER_PATTERN = /^\d+$/;
20592
20641
  async function getPackageVersion() {
20593
- const __dirname = dirname(fileURLToPath(import.meta.url));
20642
+ const __filename = fileURLToPath(import.meta.url);
20643
+ const __dirname = dirname(__filename);
20594
20644
  const pkgJsonPath = path.join(__dirname, "..", "package.json");
20595
20645
  return (await fsPromises$1.readFile(pkgJsonPath, "utf8").then(JSON.parse)).version;
20596
20646
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-mastra",
3
- "version": "1.34.3-alpha.4",
3
+ "version": "1.35.0-alpha.11",
4
4
  "description": "Create Mastra apps with one command",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
@@ -37,7 +37,7 @@
37
37
  "typescript": "^7.0.2",
38
38
  "vitest": "4.1.11",
39
39
  "@internal/lint": "0.0.144",
40
- "mastra": "^1.34.3-alpha.4"
40
+ "mastra": "^1.35.0-alpha.11"
41
41
  },
42
42
  "engines": {
43
43
  "node": ">=22.13.0"
@@ -1,2 +0,0 @@
1
- import { t as fetchOrgs } from "./api-C943QZP2-BYQPfDc3.js";
2
- export { fetchOrgs };
@@ -1,2 +0,0 @@
1
- import { i as loadCredentials, o as tryRefreshToken } from "./credentials-DSp55v-D-MNcatpqE.js";
2
- export { loadCredentials, tryRefreshToken };