@settlemint/dalp-cli 2.1.7-main.23400903660 → 2.1.7-main.23402758615

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.
Files changed (2) hide show
  1. package/dist/dalp.js +592 -375
  2. package/package.json +2 -2
package/dist/dalp.js CHANGED
@@ -47834,16 +47834,22 @@ var init_dist = __esm(() => {
47834
47834
  init_string2();
47835
47835
  });
47836
47836
 
47837
- // ../../node_modules/.bun/incur@0.3.5+ea8cb298c1911149/node_modules/incur/dist/index.js
47837
+ // ../../node_modules/.bun/incur@0.3.6+ea8cb298c1911149/node_modules/incur/dist/index.js
47838
47838
  init_zod();
47839
47839
 
47840
- // ../../node_modules/.bun/incur@0.3.5+ea8cb298c1911149/node_modules/incur/dist/Cli.js
47840
+ // ../../node_modules/.bun/incur@0.3.6+ea8cb298c1911149/node_modules/incur/dist/Cli.js
47841
47841
  var exports_Cli = {};
47842
47842
  __export(exports_Cli, {
47843
+ toRootOptions: () => toRootOptions,
47844
+ toRootDefinition: () => toRootDefinition,
47845
+ toConfigEnabled: () => toConfigEnabled,
47843
47846
  toCommands: () => toCommands,
47844
47847
  formatExamples: () => formatExamples,
47845
47848
  create: () => create
47846
47849
  });
47850
+ import * as fs3 from "node:fs/promises";
47851
+ import * as os3 from "node:os";
47852
+ import * as path3 from "node:path";
47847
47853
 
47848
47854
  // ../../node_modules/.bun/tokenx@1.3.0/node_modules/tokenx/dist/index.mjs
47849
47855
  var PATTERNS = {
@@ -47946,7 +47952,7 @@ function extractSegmentPart(segment, segmentTokenStart, segmentTokenCount, targe
47946
47952
  return segment.slice(charStart, charEnd);
47947
47953
  }
47948
47954
 
47949
- // ../../node_modules/.bun/incur@0.3.5+ea8cb298c1911149/node_modules/incur/dist/Completions.js
47955
+ // ../../node_modules/.bun/incur@0.3.6+ea8cb298c1911149/node_modules/incur/dist/Completions.js
47950
47956
  function register(shell, name) {
47951
47957
  switch (shell) {
47952
47958
  case "bash":
@@ -48171,7 +48177,7 @@ let _incur_complete_${id} = {|spans|
48171
48177
  }`;
48172
48178
  }
48173
48179
 
48174
- // ../../node_modules/.bun/incur@0.3.5+ea8cb298c1911149/node_modules/incur/dist/Errors.js
48180
+ // ../../node_modules/.bun/incur@0.3.6+ea8cb298c1911149/node_modules/incur/dist/Errors.js
48175
48181
  class BaseError extends Error {
48176
48182
  name = "Incur.BaseError";
48177
48183
  shortMessage;
@@ -48236,7 +48242,7 @@ function walk(error48, fn) {
48236
48242
  return current;
48237
48243
  }
48238
48244
 
48239
- // ../../node_modules/.bun/incur@0.3.5+ea8cb298c1911149/node_modules/incur/dist/Fetch.js
48245
+ // ../../node_modules/.bun/incur@0.3.6+ea8cb298c1911149/node_modules/incur/dist/Fetch.js
48240
48246
  var reservedFlags = new Set(["method", "body", "data", "header"]);
48241
48247
  var reservedShort = { X: "method", d: "data", H: "header" };
48242
48248
  function parseArgv(argv) {
@@ -48371,7 +48377,7 @@ async function parseResponse(response) {
48371
48377
  };
48372
48378
  }
48373
48379
 
48374
- // ../../node_modules/.bun/incur@0.3.5+ea8cb298c1911149/node_modules/incur/dist/Filter.js
48380
+ // ../../node_modules/.bun/incur@0.3.6+ea8cb298c1911149/node_modules/incur/dist/Filter.js
48375
48381
  function parse5(expression) {
48376
48382
  const paths = [];
48377
48383
  const tokens = [];
@@ -49004,7 +49010,7 @@ var $stringify = publicApi.stringify;
49004
49010
  var $visit = visit.visit;
49005
49011
  var $visitAsync = visit.visitAsync;
49006
49012
 
49007
- // ../../node_modules/.bun/incur@0.3.5+ea8cb298c1911149/node_modules/incur/dist/Formatter.js
49013
+ // ../../node_modules/.bun/incur@0.3.6+ea8cb298c1911149/node_modules/incur/dist/Formatter.js
49008
49014
  function format2(value, fmt = "toon") {
49009
49015
  if (value == null)
49010
49016
  return "";
@@ -49100,63 +49106,59 @@ ${String(val)}`;
49100
49106
  return kvTable(obj);
49101
49107
  }
49102
49108
 
49103
- // ../../node_modules/.bun/incur@0.3.5+ea8cb298c1911149/node_modules/incur/dist/Help.js
49109
+ // ../../node_modules/.bun/incur@0.3.6+ea8cb298c1911149/node_modules/incur/dist/Help.js
49104
49110
  init_zod();
49105
49111
 
49106
- // ../../node_modules/.bun/incur@0.3.5+ea8cb298c1911149/node_modules/incur/dist/internal/command.js
49112
+ // ../../node_modules/.bun/incur@0.3.6+ea8cb298c1911149/node_modules/incur/dist/internal/command.js
49107
49113
  init_zod();
49108
49114
 
49109
- // ../../node_modules/.bun/incur@0.3.5+ea8cb298c1911149/node_modules/incur/dist/Parser.js
49115
+ // ../../node_modules/.bun/incur@0.3.6+ea8cb298c1911149/node_modules/incur/dist/internal/helpers.js
49116
+ function isRecord(value) {
49117
+ return typeof value === "object" && value !== null && !Array.isArray(value);
49118
+ }
49119
+ function toKebab(value) {
49120
+ return value.replace(/[A-Z]/g, (c) => `-${c.toLowerCase()}`);
49121
+ }
49122
+
49123
+ // ../../node_modules/.bun/incur@0.3.6+ea8cb298c1911149/node_modules/incur/dist/Parser.js
49110
49124
  function parse6(argv, options = {}) {
49111
- const { args: argsSchema, options: optionsSchema, alias } = options;
49112
- const aliasToName = new Map;
49113
- if (alias)
49114
- for (const [name, short] of Object.entries(alias))
49115
- aliasToName.set(short, name);
49116
- const knownOptions = new Set(optionsSchema ? Object.keys(optionsSchema.shape) : []);
49117
- const kebabToCamel = new Map;
49118
- for (const name of knownOptions) {
49119
- const kebab = name.replace(/[A-Z]/g, (c) => `-${c.toLowerCase()}`);
49120
- if (kebab !== name)
49121
- kebabToCamel.set(kebab, name);
49122
- }
49125
+ const { args: argsSchema, options: optionsSchema, alias, defaults } = options;
49126
+ const optionNames = createOptionNames(optionsSchema, alias);
49123
49127
  const positionals = [];
49124
- const rawOptions = {};
49128
+ const rawArgvOptions = {};
49125
49129
  let i = 0;
49126
49130
  while (i < argv.length) {
49127
49131
  const token = argv[i];
49128
49132
  if (token.startsWith("--no-") && token.length > 5) {
49129
- const raw = token.slice(5);
49130
- const name = kebabToCamel.get(raw) ?? raw;
49131
- if (!knownOptions.has(name))
49133
+ const name = normalizeOptionName(token.slice(5), optionNames);
49134
+ if (!name)
49132
49135
  throw new ParseError({ message: `Unknown flag: ${token}` });
49133
- rawOptions[name] = false;
49136
+ rawArgvOptions[name] = false;
49134
49137
  i++;
49135
49138
  } else if (token.startsWith("--")) {
49136
49139
  const eqIdx = token.indexOf("=");
49137
49140
  if (eqIdx !== -1) {
49138
49141
  const raw = token.slice(2, eqIdx);
49139
- const name = kebabToCamel.get(raw) ?? raw;
49140
- if (!knownOptions.has(name))
49142
+ const name = normalizeOptionName(raw, optionNames);
49143
+ if (!name)
49141
49144
  throw new ParseError({ message: `Unknown flag: --${raw}` });
49142
- setOption(rawOptions, name, token.slice(eqIdx + 1), optionsSchema);
49145
+ setOption(rawArgvOptions, name, token.slice(eqIdx + 1), optionsSchema);
49143
49146
  i++;
49144
49147
  } else {
49145
- const raw = token.slice(2);
49146
- const name = kebabToCamel.get(raw) ?? raw;
49147
- if (!knownOptions.has(name))
49148
+ const name = normalizeOptionName(token.slice(2), optionNames);
49149
+ if (!name)
49148
49150
  throw new ParseError({ message: `Unknown flag: ${token}` });
49149
49151
  if (isCountOption(name, optionsSchema)) {
49150
- rawOptions[name] = (rawOptions[name] ?? 0) + 1;
49152
+ rawArgvOptions[name] = (rawArgvOptions[name] ?? 0) + 1;
49151
49153
  i++;
49152
49154
  } else if (isBooleanOption2(name, optionsSchema)) {
49153
- rawOptions[name] = true;
49155
+ rawArgvOptions[name] = true;
49154
49156
  i++;
49155
49157
  } else {
49156
49158
  const value = argv[i + 1];
49157
49159
  if (value === undefined)
49158
49160
  throw new ParseError({ message: `Missing value for flag: ${token}` });
49159
- setOption(rawOptions, name, value, optionsSchema);
49161
+ setOption(rawArgvOptions, name, value, optionsSchema);
49160
49162
  i += 2;
49161
49163
  }
49162
49164
  }
@@ -49164,29 +49166,29 @@ function parse6(argv, options = {}) {
49164
49166
  const chars = token.slice(1);
49165
49167
  for (let j = 0;j < chars.length; j++) {
49166
49168
  const short = chars[j];
49167
- const name = aliasToName.get(short);
49169
+ const name = optionNames.aliasToName.get(short);
49168
49170
  if (!name)
49169
49171
  throw new ParseError({ message: `Unknown flag: -${short}` });
49170
49172
  const isLast = j === chars.length - 1;
49171
49173
  if (!isLast) {
49172
49174
  if (isCountOption(name, optionsSchema)) {
49173
- rawOptions[name] = (rawOptions[name] ?? 0) + 1;
49175
+ rawArgvOptions[name] = (rawArgvOptions[name] ?? 0) + 1;
49174
49176
  } else if (isBooleanOption2(name, optionsSchema)) {
49175
- rawOptions[name] = true;
49177
+ rawArgvOptions[name] = true;
49176
49178
  } else {
49177
49179
  throw new ParseError({
49178
49180
  message: `Non-boolean flag -${short} must be last in a stacked alias`
49179
49181
  });
49180
49182
  }
49181
49183
  } else if (isCountOption(name, optionsSchema)) {
49182
- rawOptions[name] = (rawOptions[name] ?? 0) + 1;
49184
+ rawArgvOptions[name] = (rawArgvOptions[name] ?? 0) + 1;
49183
49185
  } else if (isBooleanOption2(name, optionsSchema)) {
49184
- rawOptions[name] = true;
49186
+ rawArgvOptions[name] = true;
49185
49187
  } else {
49186
49188
  const value = argv[i + 1];
49187
49189
  if (value === undefined)
49188
49190
  throw new ParseError({ message: `Missing value for flag: -${short}` });
49189
- setOption(rawOptions, name, value, optionsSchema);
49191
+ setOption(rawArgvOptions, name, value, optionsSchema);
49190
49192
  i++;
49191
49193
  }
49192
49194
  }
@@ -49207,14 +49209,56 @@ function parse6(argv, options = {}) {
49207
49209
  }
49208
49210
  }
49209
49211
  const args = argsSchema ? zodParse(argsSchema, rawArgs) : {};
49212
+ const rawDefaults = normalizeOptionDefaults(defaults, optionsSchema, optionNames);
49210
49213
  if (optionsSchema) {
49211
- for (const [name, value] of Object.entries(rawOptions)) {
49212
- rawOptions[name] = coerce(value, name, optionsSchema);
49214
+ for (const [name, value] of Object.entries(rawArgvOptions)) {
49215
+ rawArgvOptions[name] = coerce(value, name, optionsSchema);
49213
49216
  }
49214
49217
  }
49215
- const parsedOptions = optionsSchema ? zodParse(optionsSchema, rawOptions) : {};
49218
+ const mergedOptions = { ...rawDefaults, ...rawArgvOptions };
49219
+ const parsedOptions = optionsSchema ? zodParse(optionsSchema, mergedOptions) : {};
49216
49220
  return { args, options: parsedOptions };
49217
49221
  }
49222
+ function createOptionNames(schema, alias) {
49223
+ const aliasToName = new Map;
49224
+ if (alias)
49225
+ for (const [name, short] of Object.entries(alias))
49226
+ aliasToName.set(short, name);
49227
+ const knownOptions = new Set(schema ? Object.keys(schema.shape) : []);
49228
+ const kebabToCamel = new Map;
49229
+ for (const name of knownOptions) {
49230
+ const kebab = toKebab(name);
49231
+ if (kebab !== name)
49232
+ kebabToCamel.set(kebab, name);
49233
+ }
49234
+ return { aliasToName, kebabToCamel, knownOptions };
49235
+ }
49236
+ function normalizeOptionName(raw, options) {
49237
+ const name = options.kebabToCamel.get(raw) ?? raw;
49238
+ return options.knownOptions.has(name) ? name : undefined;
49239
+ }
49240
+ function normalizeOptionDefaults(defaults, schema, optionNames) {
49241
+ if (defaults === undefined)
49242
+ return {};
49243
+ if (!isRecord(defaults))
49244
+ throw new ParseError({
49245
+ message: "Invalid config section: expected an object of option defaults"
49246
+ });
49247
+ if (!schema) {
49248
+ const [first] = Object.keys(defaults);
49249
+ if (first)
49250
+ throw new ParseError({ message: `Unknown config option: ${first}` });
49251
+ return {};
49252
+ }
49253
+ const normalized = {};
49254
+ for (const [rawName, value] of Object.entries(defaults)) {
49255
+ const name = normalizeOptionName(rawName, optionNames);
49256
+ if (!name)
49257
+ throw new ParseError({ message: `Unknown config option: ${rawName}` });
49258
+ normalized[name] = value;
49259
+ }
49260
+ return normalized;
49261
+ }
49218
49262
  function unwrap2(schema) {
49219
49263
  let s = schema;
49220
49264
  while (s.def?.innerType)
@@ -49318,7 +49362,7 @@ function defaultEnvSource() {
49318
49362
  return {};
49319
49363
  }
49320
49364
 
49321
- // ../../node_modules/.bun/incur@0.3.5+ea8cb298c1911149/node_modules/incur/dist/internal/command.js
49365
+ // ../../node_modules/.bun/incur@0.3.6+ea8cb298c1911149/node_modules/incur/dist/internal/command.js
49322
49366
  var sentinel = Symbol.for("incur.sentinel");
49323
49367
  async function execute(command, options) {
49324
49368
  const { argv, inputOptions, agent, format: format3, formatExplicit, name, path, version: version2, envSource = process.env, env: envSchema, vars: varsSchema, middlewares = [] } = options;
@@ -49338,6 +49382,7 @@ async function execute(command, options) {
49338
49382
  const parsed = parse6(argv, {
49339
49383
  alias: command.alias,
49340
49384
  args: command.args,
49385
+ defaults: options.defaults,
49341
49386
  options: command.options
49342
49387
  });
49343
49388
  args = parsed.args;
@@ -49546,9 +49591,9 @@ var builtinCommands = [
49546
49591
  }
49547
49592
  ];
49548
49593
 
49549
- // ../../node_modules/.bun/incur@0.3.5+ea8cb298c1911149/node_modules/incur/dist/Help.js
49594
+ // ../../node_modules/.bun/incur@0.3.6+ea8cb298c1911149/node_modules/incur/dist/Help.js
49550
49595
  function formatRoot(name, options = {}) {
49551
- const { aliases, description, version: version2, commands = [], root = false } = options;
49596
+ const { aliases, configFlag, description, version: version2, commands = [], root = false } = options;
49552
49597
  const lines = [];
49553
49598
  const title = version2 ? `${name}@${version2}` : name;
49554
49599
  lines.push(description ? `${title} — ${description}` : title);
@@ -49568,12 +49613,12 @@ function formatRoot(name, options = {}) {
49568
49613
  lines.push(` ${cmd.name}`);
49569
49614
  }
49570
49615
  }
49571
- lines.push(...globalOptionsLines(root));
49616
+ lines.push(...globalOptionsLines(root, configFlag));
49572
49617
  return lines.join(`
49573
49618
  `);
49574
49619
  }
49575
49620
  function formatCommand(name, options = {}) {
49576
- const { alias, aliases, description, version: version2, args, env, envSource, hint, root = false, options: opts, examples } = options;
49621
+ const { alias, aliases, configFlag, description, version: version2, args, env, envSource, hint, root = false, options: opts, examples } = options;
49577
49622
  const lines = [];
49578
49623
  const title = version2 ? `${name}@${version2}` : name;
49579
49624
  lines.push(description ? `${title} — ${description}` : title);
@@ -49660,7 +49705,7 @@ function formatCommand(name, options = {}) {
49660
49705
  }
49661
49706
  }
49662
49707
  if (!options.hideGlobalOptions)
49663
- lines.push(...globalOptionsLines(root));
49708
+ lines.push(...globalOptionsLines(root, configFlag));
49664
49709
  if (env) {
49665
49710
  const entries = envEntries(env);
49666
49711
  if (entries.length > 0) {
@@ -49775,10 +49820,7 @@ function extractDeprecated(schema) {
49775
49820
  const meta3 = schema?.meta?.();
49776
49821
  return meta3?.deprecated === true ? true : undefined;
49777
49822
  }
49778
- function toKebab(str) {
49779
- return str.replace(/[A-Z]/g, (c) => `-${c.toLowerCase()}`);
49780
- }
49781
- function globalOptionsLines(root = false) {
49823
+ function globalOptionsLines(root = false, configFlag) {
49782
49824
  const lines = [];
49783
49825
  if (root) {
49784
49826
  const builtins = builtinCommands.flatMap((b) => {
@@ -49795,6 +49837,7 @@ function globalOptionsLines(root = false) {
49795
49837
  lines.push("", "Integrations:", ...builtins.map((b) => ` ${b.name}${" ".repeat(maxCmd - b.name.length)} ${b.desc}`));
49796
49838
  }
49797
49839
  const flags = [
49840
+ ...configFlag ? [{ flag: `--${configFlag} <path>`, desc: "Load JSON option defaults from a file" }] : [],
49798
49841
  {
49799
49842
  flag: "--filter-output <keys>",
49800
49843
  desc: "Filter output by key paths (e.g. foo,bar.baz,a[0,3])"
@@ -49803,24 +49846,25 @@ function globalOptionsLines(root = false) {
49803
49846
  { flag: "--help", desc: "Show help" },
49804
49847
  { flag: "--llms, --llms-full", desc: "Print LLM-readable manifest" },
49805
49848
  ...root ? [{ flag: "--mcp", desc: "Start as MCP stdio server" }] : [],
49849
+ ...configFlag ? [{ flag: `--no-${configFlag}`, desc: "Disable JSON option defaults for this run" }] : [],
49806
49850
  { flag: "--schema", desc: "Show JSON Schema for command" },
49807
49851
  { flag: "--token-count", desc: "Print token count of output (instead of output)" },
49808
49852
  { flag: "--token-limit <n>", desc: "Limit output to n tokens" },
49809
49853
  { flag: "--token-offset <n>", desc: "Skip first n tokens of output" },
49810
49854
  { flag: "--verbose", desc: "Show full output envelope" },
49811
49855
  ...root ? [{ flag: "--version", desc: "Show version" }] : []
49812
- ];
49856
+ ].sort((a, b) => a.flag.localeCompare(b.flag));
49813
49857
  const maxLen = Math.max(...flags.map((f) => f.flag.length));
49814
49858
  lines.push("", "Global Options:", ...flags.map((f) => ` ${f.flag}${" ".repeat(maxLen - f.flag.length)} ${f.desc}`));
49815
49859
  return lines;
49816
49860
  }
49817
49861
  function redact(value) {
49818
- if (value.length <= 3)
49819
- return "••••";
49820
- return `••••${value.slice(-3)}`;
49862
+ if (value.length <= 4)
49863
+ return "****";
49864
+ return `****${value.slice(-4)}`;
49821
49865
  }
49822
49866
 
49823
- // ../../node_modules/.bun/incur@0.3.5+ea8cb298c1911149/node_modules/incur/dist/internal/pm.js
49867
+ // ../../node_modules/.bun/incur@0.3.6+ea8cb298c1911149/node_modules/incur/dist/internal/pm.js
49824
49868
  function detectRunner() {
49825
49869
  const userAgent = process.env.npm_config_user_agent ?? "";
49826
49870
  const execPath = process.env.npm_execpath ?? "";
@@ -49831,7 +49875,7 @@ function detectRunner() {
49831
49875
  return "npx";
49832
49876
  }
49833
49877
 
49834
- // ../../node_modules/.bun/incur@0.3.5+ea8cb298c1911149/node_modules/incur/dist/Mcp.js
49878
+ // ../../node_modules/.bun/incur@0.3.6+ea8cb298c1911149/node_modules/incur/dist/Mcp.js
49835
49879
  init_mcp();
49836
49880
 
49837
49881
  // ../../node_modules/.bun/@modelcontextprotocol+sdk@1.27.1/node_modules/@modelcontextprotocol/sdk/dist/esm/server/stdio.js
@@ -49927,7 +49971,7 @@ class StdioServerTransport {
49927
49971
  }
49928
49972
  }
49929
49973
 
49930
- // ../../node_modules/.bun/incur@0.3.5+ea8cb298c1911149/node_modules/incur/dist/Schema.js
49974
+ // ../../node_modules/.bun/incur@0.3.6+ea8cb298c1911149/node_modules/incur/dist/Schema.js
49931
49975
  init_zod();
49932
49976
  function toJsonSchema(schema) {
49933
49977
  const result = exports_external.toJSONSchema(schema);
@@ -49935,7 +49979,7 @@ function toJsonSchema(schema) {
49935
49979
  return result;
49936
49980
  }
49937
49981
 
49938
- // ../../node_modules/.bun/incur@0.3.5+ea8cb298c1911149/node_modules/incur/dist/Mcp.js
49982
+ // ../../node_modules/.bun/incur@0.3.6+ea8cb298c1911149/node_modules/incur/dist/Mcp.js
49939
49983
  async function serve(name, version2, commands, options = {}) {
49940
49984
  const server = new McpServer({ name, version: version2 });
49941
49985
  for (const tool of collectTools(commands, [])) {
@@ -50151,7 +50195,7 @@ async function dereference(api2, options) {
50151
50195
  return parser2.schema;
50152
50196
  }
50153
50197
 
50154
- // ../../node_modules/.bun/incur@0.3.5+ea8cb298c1911149/node_modules/incur/dist/Openapi.js
50198
+ // ../../node_modules/.bun/incur@0.3.6+ea8cb298c1911149/node_modules/incur/dist/Openapi.js
50155
50199
  init_zod();
50156
50200
  async function generateCommands(spec, fetch2, options = {}) {
50157
50201
  const resolved = await dereference(structuredClone(spec));
@@ -50279,7 +50323,7 @@ function coerceIfNeeded(schema) {
50279
50323
  return schema;
50280
50324
  }
50281
50325
 
50282
- // ../../node_modules/.bun/incur@0.3.5+ea8cb298c1911149/node_modules/incur/dist/Skill.js
50326
+ // ../../node_modules/.bun/incur@0.3.6+ea8cb298c1911149/node_modules/incur/dist/Skill.js
50283
50327
  import { createHash } from "node:crypto";
50284
50328
  function index(name, commands, description) {
50285
50329
  const lines = [`# ${name}`];
@@ -50533,7 +50577,7 @@ function resolveTypeName2(prop) {
50533
50577
  return "unknown";
50534
50578
  }
50535
50579
 
50536
- // ../../node_modules/.bun/incur@0.3.5+ea8cb298c1911149/node_modules/incur/dist/SyncMcp.js
50580
+ // ../../node_modules/.bun/incur@0.3.6+ea8cb298c1911149/node_modules/incur/dist/SyncMcp.js
50537
50581
  import { execFile } from "node:child_process";
50538
50582
  import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
50539
50583
  import { homedir } from "node:os";
@@ -50617,13 +50661,13 @@ function exec(cmd, args) {
50617
50661
  });
50618
50662
  }
50619
50663
 
50620
- // ../../node_modules/.bun/incur@0.3.5+ea8cb298c1911149/node_modules/incur/dist/SyncSkills.js
50664
+ // ../../node_modules/.bun/incur@0.3.6+ea8cb298c1911149/node_modules/incur/dist/SyncSkills.js
50621
50665
  import fsSync from "node:fs";
50622
50666
  import fs2 from "node:fs/promises";
50623
50667
  import os2 from "node:os";
50624
50668
  import path2 from "node:path";
50625
50669
 
50626
- // ../../node_modules/.bun/incur@0.3.5+ea8cb298c1911149/node_modules/incur/dist/internal/agents.js
50670
+ // ../../node_modules/.bun/incur@0.3.6+ea8cb298c1911149/node_modules/incur/dist/internal/agents.js
50627
50671
  import * as fs from "node:fs";
50628
50672
  import * as os from "node:os";
50629
50673
  import * as path from "node:path";
@@ -50899,7 +50943,7 @@ function resolveParent(dir) {
50899
50943
  }
50900
50944
  }
50901
50945
 
50902
- // ../../node_modules/.bun/incur@0.3.5+ea8cb298c1911149/node_modules/incur/dist/SyncSkills.js
50946
+ // ../../node_modules/.bun/incur@0.3.6+ea8cb298c1911149/node_modules/incur/dist/SyncSkills.js
50903
50947
  async function sync(name, commands, options = {}) {
50904
50948
  const { depth = 1, description, global = true } = options;
50905
50949
  const cwd = options.cwd ?? (global ? resolvePackageRoot() : process.cwd());
@@ -51034,7 +51078,7 @@ function readHash(name) {
51034
51078
  return readMeta(name)?.hash;
51035
51079
  }
51036
51080
 
51037
- // ../../node_modules/.bun/incur@0.3.5+ea8cb298c1911149/node_modules/incur/dist/Cli.js
51081
+ // ../../node_modules/.bun/incur@0.3.6+ea8cb298c1911149/node_modules/incur/dist/Cli.js
51038
51082
  function create(nameOrDefinition, definition) {
51039
51083
  const name = typeof nameOrDefinition === "string" ? nameOrDefinition : nameOrDefinition.name;
51040
51084
  const def = typeof nameOrDefinition === "string" ? definition ?? {} : nameOrDefinition;
@@ -51112,6 +51156,7 @@ function create(nameOrDefinition, definition) {
51112
51156
  return serveImpl(name, commands, argv, {
51113
51157
  ...serveOptions,
51114
51158
  aliases: def.aliases,
51159
+ config: def.config,
51115
51160
  description: def.description,
51116
51161
  envSchema: def.env,
51117
51162
  format: def.format,
@@ -51132,6 +51177,10 @@ function create(nameOrDefinition, definition) {
51132
51177
  };
51133
51178
  if (rootDef)
51134
51179
  toRootDefinition.set(cli, rootDef);
51180
+ if (def.options)
51181
+ toRootOptions.set(cli, def.options);
51182
+ if (def.config !== undefined)
51183
+ toConfigEnabled.set(cli, true);
51135
51184
  if (def.outputPolicy)
51136
51185
  toOutputPolicy.set(cli, def.outputPolicy);
51137
51186
  toMiddlewares.set(cli, middlewares);
@@ -51141,7 +51190,27 @@ function create(nameOrDefinition, definition) {
51141
51190
  async function serveImpl(name, commands, argv, options = {}) {
51142
51191
  const stdout = options.stdout ?? ((s) => process.stdout.write(s));
51143
51192
  const exit = options.exit ?? ((code) => process.exit(code));
51144
- const { verbose, format: formatFlag, formatExplicit, filterOutput, tokenLimit, tokenOffset, tokenCount, llms, llmsFull, mcp: mcpFlag, help, version: version2, schema, rest: filtered } = extractBuiltinFlags(argv);
51193
+ const human = process.stdout.isTTY === true;
51194
+ const configEnabled = options.config !== undefined;
51195
+ const configFlag = options.config?.flag;
51196
+ function writeln(s) {
51197
+ stdout(s.endsWith(`
51198
+ `) ? s : `${s}
51199
+ `);
51200
+ }
51201
+ let builtinFlags;
51202
+ try {
51203
+ builtinFlags = extractBuiltinFlags(argv, { configFlag });
51204
+ } catch (error48) {
51205
+ const message = error48 instanceof Error ? error48.message : String(error48);
51206
+ if (human)
51207
+ writeln(formatHumanError({ code: "UNKNOWN", message }));
51208
+ else
51209
+ writeln(format2({ code: "UNKNOWN", message }, "toon"));
51210
+ exit(1);
51211
+ return;
51212
+ }
51213
+ const { verbose, format: formatFlag, formatExplicit, filterOutput, tokenLimit, tokenOffset, tokenCount, llms, llmsFull, mcp: mcpFlag, help, version: version2, schema, configPath, configDisabled, rest: filtered } = builtinFlags;
51145
51214
  if (mcpFlag) {
51146
51215
  await serve(name, options.version ?? "0.0.0", commands, {
51147
51216
  middlewares: options.middlewares,
@@ -51188,12 +51257,6 @@ async function serveImpl(name, commands, argv, options = {}) {
51188
51257
  }
51189
51258
  return;
51190
51259
  }
51191
- const human = process.stdout.isTTY === true;
51192
- function writeln(s) {
51193
- stdout(s.endsWith(`
51194
- `) ? s : `${s}
51195
- `);
51196
- }
51197
51260
  if (!llms && !llmsFull && !schema && !help && !version2) {
51198
51261
  const isSkillsAdd = filtered[0] === "skills" || filtered[0] === name && filtered[1] === "skills";
51199
51262
  const isMcpAdd = filtered[0] === "mcp" || filtered[0] === name && filtered[1] === "mcp";
@@ -51405,6 +51468,7 @@ async function serveImpl(name, commands, argv, options = {}) {
51405
51468
  writeln(formatCommand(name, {
51406
51469
  alias: cmd.alias,
51407
51470
  aliases: options.aliases,
51471
+ configFlag,
51408
51472
  description: cmd.description ?? options.description,
51409
51473
  version: options.version,
51410
51474
  args: cmd.args,
@@ -51422,6 +51486,7 @@ async function serveImpl(name, commands, argv, options = {}) {
51422
51486
  if (options.rootCommand || options.rootFetch) {} else {
51423
51487
  writeln(formatRoot(name, {
51424
51488
  aliases: options.aliases,
51489
+ configFlag,
51425
51490
  description: options.description,
51426
51491
  version: options.version,
51427
51492
  commands: collectHelpCommands(commands),
@@ -51456,6 +51521,7 @@ async function serveImpl(name, commands, argv, options = {}) {
51456
51521
  writeln(formatCommand(name, {
51457
51522
  alias: cmd.alias,
51458
51523
  aliases: options.aliases,
51524
+ configFlag,
51459
51525
  description: cmd.description ?? options.description,
51460
51526
  version: options.version,
51461
51527
  args: cmd.args,
@@ -51471,6 +51537,7 @@ async function serveImpl(name, commands, argv, options = {}) {
51471
51537
  } else {
51472
51538
  writeln(formatRoot(helpName, {
51473
51539
  aliases: isRoot ? options.aliases : undefined,
51540
+ configFlag,
51474
51541
  description: helpDesc,
51475
51542
  version: isRoot ? options.version : undefined,
51476
51543
  commands: collectHelpCommands(helpCmds),
@@ -51485,6 +51552,7 @@ async function serveImpl(name, commands, argv, options = {}) {
51485
51552
  writeln(formatCommand(commandName, {
51486
51553
  alias: cmd.alias,
51487
51554
  aliases: isRootCmd ? options.aliases : undefined,
51555
+ configFlag,
51488
51556
  description: cmd.description,
51489
51557
  version: isRootCmd ? options.version : undefined,
51490
51558
  args: cmd.args,
@@ -51503,6 +51571,7 @@ async function serveImpl(name, commands, argv, options = {}) {
51503
51571
  if (schema) {
51504
51572
  if ("help" in resolved) {
51505
51573
  writeln(formatRoot(`${name} ${resolved.path}`, {
51574
+ configFlag,
51506
51575
  description: resolved.description,
51507
51576
  commands: collectHelpCommands(resolved.commands)
51508
51577
  }));
@@ -51535,6 +51604,7 @@ async function serveImpl(name, commands, argv, options = {}) {
51535
51604
  }
51536
51605
  if ("help" in resolved) {
51537
51606
  writeln(formatRoot(`${name} ${resolved.path}`, {
51607
+ configFlag,
51538
51608
  description: resolved.description,
51539
51609
  commands: collectHelpCommands(resolved.commands)
51540
51610
  }));
@@ -51645,7 +51715,7 @@ async function serveImpl(name, commands, argv, options = {}) {
51645
51715
  return;
51646
51716
  }
51647
51717
  if ("fetchGateway" in effective) {
51648
- const { fetchGateway, path: path4, rest: fetchRest } = effective;
51718
+ const { fetchGateway, path: path5, rest: fetchRest } = effective;
51649
51719
  const fetchMiddleware = [
51650
51720
  ...options.middlewares ?? [],
51651
51721
  ...effective.middlewares ?? []
@@ -51660,7 +51730,7 @@ async function serveImpl(name, commands, argv, options = {}) {
51660
51730
  const generator = parseStreamingResponse(response);
51661
51731
  await handleStreaming(generator, {
51662
51732
  name,
51663
- path: path4,
51733
+ path: path5,
51664
51734
  start,
51665
51735
  format: format3,
51666
51736
  formatExplicit,
@@ -51680,7 +51750,7 @@ async function serveImpl(name, commands, argv, options = {}) {
51680
51750
  ok: true,
51681
51751
  data: output.data,
51682
51752
  meta: {
51683
- command: path4,
51753
+ command: path5,
51684
51754
  duration: `${Math.round(performance.now() - start)}ms`
51685
51755
  }
51686
51756
  });
@@ -51692,7 +51762,7 @@ async function serveImpl(name, commands, argv, options = {}) {
51692
51762
  message: typeof output.data === "object" && output.data !== null && "message" in output.data ? String(output.data.message) : typeof output.data === "string" ? output.data : `HTTP ${output.status}`
51693
51763
  },
51694
51764
  meta: {
51695
- command: path4,
51765
+ command: path5,
51696
51766
  duration: `${Math.round(performance.now() - start)}ms`
51697
51767
  }
51698
51768
  });
@@ -51706,7 +51776,7 @@ async function serveImpl(name, commands, argv, options = {}) {
51706
51776
  const errorFn = (opts) => ({ [sentinel2]: "error", ...opts });
51707
51777
  const mwCtx = {
51708
51778
  agent: !human,
51709
- command: path4,
51779
+ command: path5,
51710
51780
  env: cliEnv,
51711
51781
  error: errorFn,
51712
51782
  format: format3,
@@ -51731,7 +51801,7 @@ async function serveImpl(name, commands, argv, options = {}) {
51731
51801
  ...err.retryable !== undefined ? { retryable: err.retryable } : undefined
51732
51802
  },
51733
51803
  meta: {
51734
- command: path4,
51804
+ command: path5,
51735
51805
  duration: `${Math.round(performance.now() - start)}ms`,
51736
51806
  ...cta ? { cta } : undefined
51737
51807
  }
@@ -51752,13 +51822,13 @@ async function serveImpl(name, commands, argv, options = {}) {
51752
51822
  code: error48 instanceof IncurError ? error48.code : "UNKNOWN",
51753
51823
  message: error48 instanceof Error ? error48.message : String(error48)
51754
51824
  },
51755
- meta: { command: path4, duration: `${Math.round(performance.now() - start)}ms` }
51825
+ meta: { command: path5, duration: `${Math.round(performance.now() - start)}ms` }
51756
51826
  });
51757
51827
  exit(error48 instanceof IncurError ? error48.exitCode ?? 1 : 1);
51758
51828
  }
51759
51829
  return;
51760
51830
  }
51761
- const { command, path: path3, rest } = effective;
51831
+ const { command, path: path4, rest } = effective;
51762
51832
  const allMiddleware = [
51763
51833
  ...options.middlewares ?? [],
51764
51834
  ..."middlewares" in resolved ? resolved.middlewares ?? [] : [],
@@ -51766,9 +51836,32 @@ async function serveImpl(name, commands, argv, options = {}) {
51766
51836
  ];
51767
51837
  if (human)
51768
51838
  emitDeprecationWarnings(rest, command.options, command.alias);
51839
+ let defaults;
51840
+ if (configEnabled) {
51841
+ try {
51842
+ defaults = await loadCommandOptionDefaults(name, path4, {
51843
+ configDisabled,
51844
+ configPath,
51845
+ files: options.config?.files,
51846
+ loader: options.config?.loader
51847
+ });
51848
+ } catch (error48) {
51849
+ write({
51850
+ ok: false,
51851
+ error: {
51852
+ code: error48 instanceof IncurError ? error48.code : "UNKNOWN",
51853
+ message: error48 instanceof Error ? error48.message : String(error48)
51854
+ },
51855
+ meta: { command: path4, duration: `${Math.round(performance.now() - start)}ms` }
51856
+ });
51857
+ exit(error48 instanceof IncurError ? error48.exitCode ?? 1 : 1);
51858
+ return;
51859
+ }
51860
+ }
51769
51861
  const result = await execute(command, {
51770
51862
  agent: !human,
51771
51863
  argv: rest,
51864
+ defaults,
51772
51865
  env: options.envSchema,
51773
51866
  envSource: options.env,
51774
51867
  format: format3,
@@ -51776,7 +51869,7 @@ async function serveImpl(name, commands, argv, options = {}) {
51776
51869
  inputOptions: {},
51777
51870
  middlewares: allMiddleware,
51778
51871
  name,
51779
- path: path3,
51872
+ path: path4,
51780
51873
  vars: options.vars,
51781
51874
  version: options.version
51782
51875
  });
@@ -51784,7 +51877,7 @@ async function serveImpl(name, commands, argv, options = {}) {
51784
51877
  if ("stream" in result) {
51785
51878
  await handleStreaming(result.stream, {
51786
51879
  name,
51787
- path: path3,
51880
+ path: path4,
51788
51881
  start,
51789
51882
  format: format3,
51790
51883
  formatExplicit,
@@ -51804,7 +51897,7 @@ async function serveImpl(name, commands, argv, options = {}) {
51804
51897
  ok: true,
51805
51898
  data: result.data,
51806
51899
  meta: {
51807
- command: path3,
51900
+ command: path4,
51808
51901
  duration: duration3,
51809
51902
  ...cta ? { cta } : undefined
51810
51903
  }
@@ -51812,10 +51905,10 @@ async function serveImpl(name, commands, argv, options = {}) {
51812
51905
  } else {
51813
51906
  const cta = formatCtaBlock(name, result.cta);
51814
51907
  if (human && !formatExplicit && result.error.fieldErrors) {
51815
- writeln(formatHumanValidationError(name, path3, command, new ValidationError({
51908
+ writeln(formatHumanValidationError(name, path4, command, new ValidationError({
51816
51909
  message: result.error.message,
51817
51910
  fieldErrors: result.error.fieldErrors
51818
- }), options.env));
51911
+ }), options.env, configFlag));
51819
51912
  exit(1);
51820
51913
  return;
51821
51914
  }
@@ -51828,7 +51921,7 @@ async function serveImpl(name, commands, argv, options = {}) {
51828
51921
  ...result.error.fieldErrors ? { fieldErrors: result.error.fieldErrors } : undefined
51829
51922
  },
51830
51923
  meta: {
51831
- command: path3,
51924
+ command: path4,
51832
51925
  duration: duration3,
51833
51926
  ...cta ? { cta } : undefined
51834
51927
  }
@@ -51960,14 +52053,14 @@ async function fetchImpl(name, commands, req, options = {}) {
51960
52053
  }, 404);
51961
52054
  if ("fetchGateway" in resolved)
51962
52055
  return resolved.fetchGateway.fetch(req);
51963
- const { command, path: path3, rest } = resolved;
52056
+ const { command, path: path4, rest } = resolved;
51964
52057
  const groupMiddlewares = "middlewares" in resolved ? resolved.middlewares : [];
51965
- return executeCommand(path3, command, rest, inputOptions, start, {
52058
+ return executeCommand(path4, command, rest, inputOptions, start, {
51966
52059
  ...options,
51967
52060
  groupMiddlewares
51968
52061
  });
51969
52062
  }
51970
- async function executeCommand(path3, command, rest, inputOptions, start, options) {
52063
+ async function executeCommand(path4, command, rest, inputOptions, start, options) {
51971
52064
  function jsonResponse(body, status) {
51972
52065
  return new Response(JSON.stringify(body), {
51973
52066
  status,
@@ -51987,9 +52080,9 @@ async function executeCommand(path3, command, rest, inputOptions, start, options
51987
52080
  formatExplicit: true,
51988
52081
  inputOptions,
51989
52082
  middlewares: allMiddleware,
51990
- name: options.name ?? path3,
52083
+ name: options.name ?? path4,
51991
52084
  parseMode: "split",
51992
- path: path3,
52085
+ path: path4,
51993
52086
  vars: options.vars,
51994
52087
  version: options.version
51995
52088
  });
@@ -52006,7 +52099,7 @@ async function executeCommand(path3, command, rest, inputOptions, start, options
52006
52099
  controller.enqueue(encoder.encode(JSON.stringify({
52007
52100
  type: "done",
52008
52101
  ok: true,
52009
- meta: { command: path3 }
52102
+ meta: { command: path4 }
52010
52103
  }) + `
52011
52104
  `));
52012
52105
  } catch (error48) {
@@ -52029,7 +52122,7 @@ async function executeCommand(path3, command, rest, inputOptions, start, options
52029
52122
  });
52030
52123
  }
52031
52124
  if (!result.ok) {
52032
- const cta2 = formatCtaBlock(options.name ?? path3, result.cta);
52125
+ const cta2 = formatCtaBlock(options.name ?? path4, result.cta);
52033
52126
  return jsonResponse({
52034
52127
  ok: false,
52035
52128
  error: {
@@ -52038,31 +52131,32 @@ async function executeCommand(path3, command, rest, inputOptions, start, options
52038
52131
  ...result.error.retryable !== undefined ? { retryable: result.error.retryable } : undefined
52039
52132
  },
52040
52133
  meta: {
52041
- command: path3,
52134
+ command: path4,
52042
52135
  duration: duration3,
52043
52136
  ...cta2 ? { cta: cta2 } : undefined
52044
52137
  }
52045
52138
  }, result.error.code === "VALIDATION_ERROR" ? 400 : 500);
52046
52139
  }
52047
- const cta = formatCtaBlock(options.name ?? path3, result.cta);
52140
+ const cta = formatCtaBlock(options.name ?? path4, result.cta);
52048
52141
  return jsonResponse({
52049
52142
  ok: true,
52050
52143
  data: result.data,
52051
52144
  meta: {
52052
- command: path3,
52145
+ command: path4,
52053
52146
  duration: duration3,
52054
52147
  ...cta ? { cta } : undefined
52055
52148
  }
52056
52149
  }, 200);
52057
52150
  }
52058
- function formatHumanValidationError(cli, path3, command, error48, envSource) {
52151
+ function formatHumanValidationError(cli, path4, command, error48, envSource, configFlag) {
52059
52152
  const lines = [];
52060
52153
  for (const fe of error48.fieldErrors)
52061
52154
  lines.push(`Error: missing required argument <${fe.path}>`);
52062
52155
  lines.push("See below for usage.");
52063
52156
  lines.push("");
52064
- lines.push(formatCommand(path3 === cli ? cli : `${cli} ${path3}`, {
52157
+ lines.push(formatCommand(path4 === cli ? cli : `${cli} ${path4}`, {
52065
52158
  alias: command.alias,
52159
+ configFlag,
52066
52160
  description: command.description,
52067
52161
  args: command.args,
52068
52162
  env: command.env,
@@ -52080,7 +52174,7 @@ function resolveCommand(commands, tokens) {
52080
52174
  if (!first || !commands.has(first))
52081
52175
  return { error: first ?? "(none)", path: "" };
52082
52176
  let entry = commands.get(first);
52083
- const path3 = [first];
52177
+ const path4 = [first];
52084
52178
  let remaining = rest;
52085
52179
  let inheritedOutputPolicy;
52086
52180
  const collectedMiddlewares = [];
@@ -52089,7 +52183,7 @@ function resolveCommand(commands, tokens) {
52089
52183
  return {
52090
52184
  fetchGateway: entry,
52091
52185
  middlewares: collectedMiddlewares,
52092
- path: path3.join(" "),
52186
+ path: path4.join(" "),
52093
52187
  rest: remaining,
52094
52188
  ...outputPolicy2 ? { outputPolicy: outputPolicy2 } : undefined
52095
52189
  };
@@ -52103,15 +52197,15 @@ function resolveCommand(commands, tokens) {
52103
52197
  if (!next)
52104
52198
  return {
52105
52199
  help: true,
52106
- path: path3.join(" "),
52200
+ path: path4.join(" "),
52107
52201
  description: entry.description,
52108
52202
  commands: entry.commands
52109
52203
  };
52110
52204
  const child = entry.commands.get(next);
52111
52205
  if (!child) {
52112
- return { error: next, path: path3.join(" ") };
52206
+ return { error: next, path: path4.join(" ") };
52113
52207
  }
52114
- path3.push(next);
52208
+ path4.push(next);
52115
52209
  remaining = remaining.slice(1);
52116
52210
  entry = child;
52117
52211
  if (isFetchGateway(entry)) {
@@ -52119,7 +52213,7 @@ function resolveCommand(commands, tokens) {
52119
52213
  return {
52120
52214
  fetchGateway: entry,
52121
52215
  middlewares: collectedMiddlewares,
52122
- path: path3.join(" "),
52216
+ path: path4.join(" "),
52123
52217
  rest: remaining,
52124
52218
  ...outputPolicy2 ? { outputPolicy: outputPolicy2 } : undefined
52125
52219
  };
@@ -52129,12 +52223,12 @@ function resolveCommand(commands, tokens) {
52129
52223
  return {
52130
52224
  command: entry,
52131
52225
  middlewares: collectedMiddlewares,
52132
- path: path3.join(" "),
52226
+ path: path4.join(" "),
52133
52227
  rest: remaining,
52134
52228
  ...outputPolicy ? { outputPolicy } : undefined
52135
52229
  };
52136
52230
  }
52137
- function extractBuiltinFlags(argv) {
52231
+ function extractBuiltinFlags(argv, options = {}) {
52138
52232
  let verbose = false;
52139
52233
  let llms = false;
52140
52234
  let llmsFull = false;
@@ -52144,11 +52238,16 @@ function extractBuiltinFlags(argv) {
52144
52238
  let schema = false;
52145
52239
  let format3 = "toon";
52146
52240
  let formatExplicit = false;
52241
+ let configPath;
52242
+ let configDisabled = false;
52147
52243
  let filterOutput;
52148
52244
  let tokenLimit;
52149
52245
  let tokenOffset;
52150
52246
  let tokenCount = false;
52151
52247
  const rest = [];
52248
+ const cfgFlag = options.configFlag ? `--${options.configFlag}` : undefined;
52249
+ const cfgFlagEq = options.configFlag ? `--${options.configFlag}=` : undefined;
52250
+ const noCfgFlag = options.configFlag ? `--no-${options.configFlag}` : undefined;
52152
52251
  for (let i = 0;i < argv.length; i++) {
52153
52252
  const token = argv[i];
52154
52253
  if (token === "--verbose")
@@ -52172,6 +52271,22 @@ function extractBuiltinFlags(argv) {
52172
52271
  format3 = argv[i + 1];
52173
52272
  formatExplicit = true;
52174
52273
  i++;
52274
+ } else if (cfgFlag && token === cfgFlag) {
52275
+ const value = argv[i + 1];
52276
+ if (value === undefined)
52277
+ throw new ParseError({ message: `Missing value for flag: ${cfgFlag}` });
52278
+ configPath = value;
52279
+ configDisabled = false;
52280
+ i++;
52281
+ } else if (cfgFlagEq && token.startsWith(cfgFlagEq)) {
52282
+ const value = token.slice(cfgFlagEq.length);
52283
+ if (value.length === 0)
52284
+ throw new ParseError({ message: `Missing value for flag: ${cfgFlag}` });
52285
+ configPath = value;
52286
+ configDisabled = false;
52287
+ } else if (noCfgFlag && token === noCfgFlag) {
52288
+ configPath = undefined;
52289
+ configDisabled = true;
52175
52290
  } else if (token === "--filter-output" && argv[i + 1]) {
52176
52291
  filterOutput = argv[i + 1];
52177
52292
  i++;
@@ -52190,6 +52305,8 @@ function extractBuiltinFlags(argv) {
52190
52305
  verbose,
52191
52306
  format: format3,
52192
52307
  formatExplicit,
52308
+ configPath,
52309
+ configDisabled,
52193
52310
  filterOutput,
52194
52311
  tokenLimit,
52195
52312
  tokenOffset,
@@ -52203,6 +52320,104 @@ function extractBuiltinFlags(argv) {
52203
52320
  rest
52204
52321
  };
52205
52322
  }
52323
+ async function loadCommandOptionDefaults(cli, path4, options = {}) {
52324
+ if (options.configDisabled)
52325
+ return;
52326
+ const { loader } = options;
52327
+ let targetPath;
52328
+ if (options.configPath) {
52329
+ targetPath = resolveConfigPath(options.configPath);
52330
+ } else {
52331
+ const searchPaths = options.files ?? [`${cli}.json`];
52332
+ targetPath = await findFirstExisting(searchPaths);
52333
+ }
52334
+ let parsed;
52335
+ if (loader) {
52336
+ const result = await loader(targetPath);
52337
+ if (result === undefined)
52338
+ return;
52339
+ if (!isRecord(result))
52340
+ throw new ParseError({ message: "Config loader must return a plain object or undefined" });
52341
+ parsed = result;
52342
+ } else {
52343
+ if (!targetPath)
52344
+ return;
52345
+ const result = await readJsonConfig(targetPath, !!options.configPath);
52346
+ if (!result)
52347
+ return;
52348
+ parsed = result;
52349
+ }
52350
+ return extractCommandSection(parsed, cli, path4);
52351
+ }
52352
+ function resolveConfigPath(filePath) {
52353
+ if (filePath.startsWith("~/") || filePath === "~") {
52354
+ return path3.join(os3.homedir(), filePath.slice(1));
52355
+ }
52356
+ return path3.resolve(process.cwd(), filePath);
52357
+ }
52358
+ async function findFirstExisting(paths) {
52359
+ for (const p of paths) {
52360
+ const resolved = resolveConfigPath(p);
52361
+ try {
52362
+ await fs3.access(resolved, fs3.constants.R_OK);
52363
+ return resolved;
52364
+ } catch {}
52365
+ }
52366
+ return;
52367
+ }
52368
+ async function readJsonConfig(targetPath, explicit) {
52369
+ let raw;
52370
+ try {
52371
+ raw = await fs3.readFile(targetPath, "utf8");
52372
+ } catch (error48) {
52373
+ if (error48.code === "ENOENT") {
52374
+ if (explicit)
52375
+ throw new ParseError({ message: `Config file not found: ${targetPath}` });
52376
+ return;
52377
+ }
52378
+ throw error48;
52379
+ }
52380
+ let parsed;
52381
+ try {
52382
+ parsed = JSON.parse(raw);
52383
+ } catch (error48) {
52384
+ throw new ParseError({
52385
+ message: `Invalid JSON config file: ${targetPath}`,
52386
+ cause: error48 instanceof Error ? error48 : undefined
52387
+ });
52388
+ }
52389
+ if (!isRecord(parsed))
52390
+ throw new ParseError({
52391
+ message: `Invalid config file: expected a top-level object in ${targetPath}`
52392
+ });
52393
+ return parsed;
52394
+ }
52395
+ function extractCommandSection(parsed, cli, path4) {
52396
+ const segments = path4 === cli ? [] : path4.split(" ");
52397
+ let node = parsed;
52398
+ for (const seg of segments) {
52399
+ if (!isRecord(node))
52400
+ return;
52401
+ const commands = node.commands;
52402
+ if (!isRecord(commands))
52403
+ return;
52404
+ node = commands[seg];
52405
+ if (node === undefined)
52406
+ return;
52407
+ }
52408
+ if (!isRecord(node))
52409
+ throw new ParseError({
52410
+ message: `Invalid config section for '${path4}': expected an object`
52411
+ });
52412
+ const options = node.options;
52413
+ if (options === undefined)
52414
+ return;
52415
+ if (!isRecord(options))
52416
+ throw new ParseError({
52417
+ message: `Invalid config 'options' for '${path4}': expected an object`
52418
+ });
52419
+ return Object.keys(options).length > 0 ? options : undefined;
52420
+ }
52206
52421
  function collectHelpCommands(commands) {
52207
52422
  const result = [];
52208
52423
  for (const [name, entry] of commands) {
@@ -52254,6 +52469,8 @@ function isFetchGateway(entry) {
52254
52469
  var toCommands = new WeakMap;
52255
52470
  var toMiddlewares = new WeakMap;
52256
52471
  var toRootDefinition = new WeakMap;
52472
+ var toRootOptions = new WeakMap;
52473
+ var toConfigEnabled = new WeakMap;
52257
52474
  var toOutputPolicy = new WeakMap;
52258
52475
  var sentinel2 = Symbol.for("incur.sentinel");
52259
52476
  function formatHumanError(error48) {
@@ -52468,11 +52685,11 @@ function buildIndexManifest(commands, prefix = []) {
52468
52685
  function collectIndexCommands(commands, prefix) {
52469
52686
  const result = [];
52470
52687
  for (const [name, entry] of commands) {
52471
- const path3 = [...prefix, name];
52688
+ const path4 = [...prefix, name];
52472
52689
  if (isGroup(entry)) {
52473
- result.push(...collectIndexCommands(entry.commands, path3));
52690
+ result.push(...collectIndexCommands(entry.commands, path4));
52474
52691
  } else {
52475
- const cmd = { name: path3.join(" ") };
52692
+ const cmd = { name: path4.join(" ") };
52476
52693
  if (isFetchGateway(entry)) {
52477
52694
  if (entry.description)
52478
52695
  cmd.description = entry.description;
@@ -52492,16 +52709,16 @@ function buildManifest(commands, prefix = []) {
52492
52709
  function collectCommands(commands, prefix) {
52493
52710
  const result = [];
52494
52711
  for (const [name, entry] of commands) {
52495
- const path3 = [...prefix, name];
52712
+ const path4 = [...prefix, name];
52496
52713
  if (isFetchGateway(entry)) {
52497
- const cmd = { name: path3.join(" ") };
52714
+ const cmd = { name: path4.join(" ") };
52498
52715
  if (entry.description)
52499
52716
  cmd.description = entry.description;
52500
52717
  result.push(cmd);
52501
52718
  } else if (isGroup(entry)) {
52502
- result.push(...collectCommands(entry.commands, path3));
52719
+ result.push(...collectCommands(entry.commands, path4));
52503
52720
  } else {
52504
- const cmd = { name: path3.join(" ") };
52721
+ const cmd = { name: path4.join(" ") };
52505
52722
  if (entry.description)
52506
52723
  cmd.description = entry.description;
52507
52724
  const inputSchema = buildInputSchema(entry.args, entry.env, entry.options);
@@ -52519,7 +52736,7 @@ function collectCommands(commands, prefix) {
52519
52736
  }
52520
52737
  const examples = formatExamples(entry.examples);
52521
52738
  if (examples) {
52522
- const cmdName = path3.join(" ");
52739
+ const cmdName = path4.join(" ");
52523
52740
  cmd.examples = examples.map((e) => ({
52524
52741
  ...e,
52525
52742
  command: e.command ? `${cmdName} ${e.command}` : cmdName
@@ -52533,19 +52750,19 @@ function collectCommands(commands, prefix) {
52533
52750
  function collectSkillCommands(commands, prefix, groups) {
52534
52751
  const result = [];
52535
52752
  for (const [name, entry] of commands) {
52536
- const path3 = [...prefix, name];
52753
+ const path4 = [...prefix, name];
52537
52754
  if (isFetchGateway(entry)) {
52538
- const cmd = { name: path3.join(" ") };
52755
+ const cmd = { name: path4.join(" ") };
52539
52756
  if (entry.description)
52540
52757
  cmd.description = entry.description;
52541
52758
  cmd.hint = "Fetch gateway. Pass path segments and curl-style flags (-X, -H, -d, --key value).";
52542
52759
  result.push(cmd);
52543
52760
  } else if (isGroup(entry)) {
52544
52761
  if (entry.description)
52545
- groups.set(path3.join(" "), entry.description);
52546
- result.push(...collectSkillCommands(entry.commands, path3, groups));
52762
+ groups.set(path4.join(" "), entry.description);
52763
+ result.push(...collectSkillCommands(entry.commands, path4, groups));
52547
52764
  } else {
52548
- const cmd = { name: path3.join(" ") };
52765
+ const cmd = { name: path4.join(" ") };
52549
52766
  if (entry.description)
52550
52767
  cmd.description = entry.description;
52551
52768
  if (entry.args)
@@ -52560,7 +52777,7 @@ function collectSkillCommands(commands, prefix, groups) {
52560
52777
  cmd.output = entry.output;
52561
52778
  const examples = formatExamples(entry.examples);
52562
52779
  if (examples) {
52563
- const cmdName = path3.join(" ");
52780
+ const cmdName = path4.join(" ");
52564
52781
  cmd.examples = examples.map((e) => ({
52565
52782
  ...e,
52566
52783
  command: e.command ? `${cmdName} ${e.command}` : cmdName
@@ -52888,8 +53105,8 @@ class EventPublisher {
52888
53105
  if (bufferedEvents.length > 0) {
52889
53106
  return { done: false, value: bufferedEvents.shift() };
52890
53107
  }
52891
- return new Promise((resolve, reject) => {
52892
- pullResolvers.push([resolve, reject]);
53108
+ return new Promise((resolve2, reject) => {
53109
+ pullResolvers.push([resolve2, reject]);
52893
53110
  });
52894
53111
  }, async () => {
52895
53112
  unsubscribe();
@@ -52947,9 +53164,9 @@ function isObject2(value) {
52947
53164
  function isTypescriptObject(value) {
52948
53165
  return !!value && (typeof value === "object" || typeof value === "function");
52949
53166
  }
52950
- function get(object4, path3) {
53167
+ function get(object4, path4) {
52951
53168
  let current = object4;
52952
- for (const key of path3) {
53169
+ for (const key of path4) {
52953
53170
  if (!isTypescriptObject(current)) {
52954
53171
  return;
52955
53172
  }
@@ -53399,9 +53616,9 @@ function resolveFriendlyClientOptions(options) {
53399
53616
  };
53400
53617
  }
53401
53618
  function createORPCClient(link, options = {}) {
53402
- const path3 = options.path ?? [];
53619
+ const path4 = options.path ?? [];
53403
53620
  const procedureClient = async (...[input, options2 = {}]) => {
53404
- return await link.call(path3, input, resolveFriendlyClientOptions(options2));
53621
+ return await link.call(path4, input, resolveFriendlyClientOptions(options2));
53405
53622
  };
53406
53623
  const recursive = new Proxy(procedureClient, {
53407
53624
  get(target, key) {
@@ -53410,7 +53627,7 @@ function createORPCClient(link, options = {}) {
53410
53627
  }
53411
53628
  return createORPCClient(link, {
53412
53629
  ...options,
53413
- path: [...path3, key]
53630
+ path: [...path4, key]
53414
53631
  });
53415
53632
  }
53416
53633
  });
@@ -53475,10 +53692,10 @@ class RequestValidationPlugin {
53475
53692
  }
53476
53693
  init(options) {
53477
53694
  options.interceptors ??= [];
53478
- options.interceptors.push(async ({ next, path: path3, input }) => {
53479
- const procedure = get(this.contract, path3);
53695
+ options.interceptors.push(async ({ next, path: path4, input }) => {
53696
+ const procedure = get(this.contract, path4);
53480
53697
  if (!isContractProcedure(procedure)) {
53481
- throw new RequestValidationPluginError(`No valid procedure found at path "${path3.join(".")}", this may happen when the contract router is not properly configured.`);
53698
+ throw new RequestValidationPluginError(`No valid procedure found at path "${path4.join(".")}", this may happen when the contract router is not properly configured.`);
53482
53699
  }
53483
53700
  const inputSchema = procedure["~orpc"].inputSchema;
53484
53701
  if (inputSchema) {
@@ -53509,10 +53726,10 @@ class ResponseValidationPlugin {
53509
53726
  order = 1200000;
53510
53727
  init(options) {
53511
53728
  options.interceptors ??= [];
53512
- options.interceptors.push(async ({ next, path: path3 }) => {
53513
- const procedure = get(this.contract, path3);
53729
+ options.interceptors.push(async ({ next, path: path4 }) => {
53730
+ const procedure = get(this.contract, path4);
53514
53731
  if (!isContractProcedure(procedure)) {
53515
- throw new Error(`[ResponseValidationPlugin] no valid procedure found at path "${path3.join(".")}", this may happen when the contract router is not properly configured.`);
53732
+ throw new Error(`[ResponseValidationPlugin] no valid procedure found at path "${path4.join(".")}", this may happen when the contract router is not properly configured.`);
53516
53733
  }
53517
53734
  try {
53518
53735
  const output = await next();
@@ -53826,14 +54043,14 @@ class StandardLink {
53826
54043
  }
53827
54044
  interceptors;
53828
54045
  clientInterceptors;
53829
- call(path3, input, options) {
53830
- return runWithSpan({ name: `${ORPC_NAME}.${path3.join("/")}`, signal: options.signal }, (span) => {
54046
+ call(path4, input, options) {
54047
+ return runWithSpan({ name: `${ORPC_NAME}.${path4.join("/")}`, signal: options.signal }, (span) => {
53831
54048
  span?.setAttribute("rpc.system", ORPC_NAME);
53832
- span?.setAttribute("rpc.method", path3.join("."));
54049
+ span?.setAttribute("rpc.method", path4.join("."));
53833
54050
  if (isAsyncIteratorObject(input)) {
53834
54051
  input = asyncIteratorWithSpan({ name: "consume_event_iterator_input", signal: options.signal }, input);
53835
54052
  }
53836
- return intercept(this.interceptors, { ...options, path: path3, input }, async ({ path: path22, input: input2, ...options2 }) => {
54053
+ return intercept(this.interceptors, { ...options, path: path4, input }, async ({ path: path22, input: input2, ...options2 }) => {
53837
54054
  const otelConfig = getGlobalOtelConfig();
53838
54055
  let otelContext;
53839
54056
  const currentSpan = otelConfig?.trace.getActiveSpan() ?? span;
@@ -53853,8 +54070,8 @@ class StandardLink {
53853
54070
  });
53854
54071
  }
53855
54072
  }
53856
- function toHttpPath(path3) {
53857
- return `/${path3.map(encodeURIComponent).join("/")}`;
54073
+ function toHttpPath(path4) {
54074
+ return `/${path4.map(encodeURIComponent).join("/")}`;
53858
54075
  }
53859
54076
  function toStandardHeaders2(headers) {
53860
54077
  if (typeof headers.forEach === "function") {
@@ -53952,9 +54169,9 @@ class LinkFetchClient {
53952
54169
  this.toFetchRequestOptions = options;
53953
54170
  this.adapterInterceptors = toArray(options.adapterInterceptors);
53954
54171
  }
53955
- async call(standardRequest, options, path3, input) {
54172
+ async call(standardRequest, options, path4, input) {
53956
54173
  const request = toFetchRequest(standardRequest, this.toFetchRequestOptions);
53957
- const fetchResponse = await intercept(this.adapterInterceptors, { ...options, request, path: path3, input, init: { redirect: "manual" } }, ({ request: request2, path: path22, input: input2, init, ...options2 }) => this.fetch(request2, init, options2, path22, input2));
54174
+ const fetchResponse = await intercept(this.adapterInterceptors, { ...options, request, path: path4, input, init: { redirect: "manual" } }, ({ request: request2, path: path22, input: input2, init, ...options2 }) => this.fetch(request2, init, options2, path22, input2));
53958
54175
  const lazyResponse = toStandardLazyResponse(fetchResponse, { signal: request.signal });
53959
54176
  return lazyResponse;
53960
54177
  }
@@ -57572,8 +57789,8 @@ class EventPublisher2 {
57572
57789
  if (bufferedEvents.length > 0) {
57573
57790
  return { done: false, value: bufferedEvents.shift() };
57574
57791
  }
57575
- return new Promise((resolve, reject) => {
57576
- pullResolvers.push([resolve, reject]);
57792
+ return new Promise((resolve2, reject) => {
57793
+ pullResolvers.push([resolve2, reject]);
57577
57794
  });
57578
57795
  }, async () => {
57579
57796
  unsubscribe();
@@ -57650,9 +57867,9 @@ function clone2(value2) {
57650
57867
  }
57651
57868
  return value2;
57652
57869
  }
57653
- function get2(object4, path3) {
57870
+ function get2(object4, path4) {
57654
57871
  let current = object4;
57655
- for (const key of path3) {
57872
+ for (const key of path4) {
57656
57873
  if (!isTypescriptObject2(current)) {
57657
57874
  return;
57658
57875
  }
@@ -57711,8 +57928,8 @@ class StandardBracketNotationSerializer {
57711
57928
  }
57712
57929
  const arrayPushStyles = /* @__PURE__ */ new WeakSet;
57713
57930
  const ref = { value: [] };
57714
- for (const [path3, value22] of serialized) {
57715
- const segments = this.parsePath(path3);
57931
+ for (const [path4, value22] of serialized) {
57932
+ const segments = this.parsePath(path4);
57716
57933
  let currentRef = ref;
57717
57934
  let nextSegment = "value";
57718
57935
  segments.forEach((segment, i) => {
@@ -57783,14 +58000,14 @@ class StandardBracketNotationSerializer {
57783
58000
  return `${result}[${segment}]`;
57784
58001
  }, "");
57785
58002
  }
57786
- parsePath(path3) {
58003
+ parsePath(path4) {
57787
58004
  const segments = [];
57788
58005
  let inBrackets = false;
57789
58006
  let currentSegment = "";
57790
58007
  let backslashCount = 0;
57791
- for (let i = 0;i < path3.length; i++) {
57792
- const char = path3[i];
57793
- const nextChar = path3[i + 1];
58008
+ for (let i = 0;i < path4.length; i++) {
58009
+ const char = path4[i];
58010
+ const nextChar = path4[i + 1];
57794
58011
  if (inBrackets && char === "]" && (nextChar === undefined || nextChar === "[") && backslashCount % 2 === 0) {
57795
58012
  if (nextChar === undefined) {
57796
58013
  inBrackets = false;
@@ -57809,7 +58026,7 @@ class StandardBracketNotationSerializer {
57809
58026
  backslashCount = 0;
57810
58027
  }
57811
58028
  }
57812
- return inBrackets || segments.length === 0 ? [path3] : segments;
58029
+ return inBrackets || segments.length === 0 ? [path4] : segments;
57813
58030
  }
57814
58031
  }
57815
58032
  function isValidArrayIndex(value22, maxIndex) {
@@ -58004,11 +58221,11 @@ class StandardOpenAPIJsonSerializer {
58004
58221
  return [data2, hasBlobRef.value];
58005
58222
  }
58006
58223
  }
58007
- function standardizeHTTPPath(path3) {
58008
- return `/${path3.replace(/\/{2,}/g, "/").replace(/^\/|\/$/g, "")}`;
58224
+ function standardizeHTTPPath(path4) {
58225
+ return `/${path4.replace(/\/{2,}/g, "/").replace(/^\/|\/$/g, "")}`;
58009
58226
  }
58010
- function getDynamicParams(path3) {
58011
- return path3 ? standardizeHTTPPath(path3).match(/\/\{[^}]+\}/g)?.map((v) => ({
58227
+ function getDynamicParams(path4) {
58228
+ return path4 ? standardizeHTTPPath(path4).match(/\/\{[^}]+\}/g)?.map((v) => ({
58012
58229
  raw: v,
58013
58230
  name: v.match(/\{\+?([^}]+)\}/)[1]
58014
58231
  })) : undefined;
@@ -58025,26 +58242,26 @@ class StandardOpenapiLinkCodec {
58025
58242
  baseUrl;
58026
58243
  headers;
58027
58244
  customErrorResponseBodyDecoder;
58028
- async encode(path3, input, options) {
58029
- let headers = toStandardHeaders2(await value2(this.headers, options, path3, input));
58245
+ async encode(path4, input, options) {
58246
+ let headers = toStandardHeaders2(await value2(this.headers, options, path4, input));
58030
58247
  if (options.lastEventId !== undefined) {
58031
58248
  headers = mergeStandardHeaders2(headers, { "last-event-id": options.lastEventId });
58032
58249
  }
58033
- const baseUrl = await value2(this.baseUrl, options, path3, input);
58034
- const procedure = get2(this.contract, path3);
58250
+ const baseUrl = await value2(this.baseUrl, options, path4, input);
58251
+ const procedure = get2(this.contract, path4);
58035
58252
  if (!isContractProcedure(procedure)) {
58036
- throw new Error(`[StandardOpenapiLinkCodec] expect a contract procedure at ${path3.join(".")}`);
58253
+ throw new Error(`[StandardOpenapiLinkCodec] expect a contract procedure at ${path4.join(".")}`);
58037
58254
  }
58038
58255
  const inputStructure = fallbackContractConfig("defaultInputStructure", procedure["~orpc"].route.inputStructure);
58039
- return inputStructure === "compact" ? this.#encodeCompact(procedure, path3, input, options, baseUrl, headers) : this.#encodeDetailed(procedure, path3, input, options, baseUrl, headers);
58256
+ return inputStructure === "compact" ? this.#encodeCompact(procedure, path4, input, options, baseUrl, headers) : this.#encodeDetailed(procedure, path4, input, options, baseUrl, headers);
58040
58257
  }
58041
- #encodeCompact(procedure, path3, input, options, baseUrl, headers) {
58042
- let httpPath = standardizeHTTPPath(procedure["~orpc"].route.path ?? toHttpPath(path3));
58258
+ #encodeCompact(procedure, path4, input, options, baseUrl, headers) {
58259
+ let httpPath = standardizeHTTPPath(procedure["~orpc"].route.path ?? toHttpPath(path4));
58043
58260
  let httpBody = input;
58044
58261
  const dynamicParams = getDynamicParams(httpPath);
58045
58262
  if (dynamicParams?.length) {
58046
58263
  if (!isObject3(input)) {
58047
- throw new TypeError(`[StandardOpenapiLinkCodec] Invalid input shape for "compact" structure when has dynamic params at ${path3.join(".")}.`);
58264
+ throw new TypeError(`[StandardOpenapiLinkCodec] Invalid input shape for "compact" structure when has dynamic params at ${path4.join(".")}.`);
58048
58265
  }
58049
58266
  const body = { ...input };
58050
58267
  for (const param of dynamicParams) {
@@ -58078,15 +58295,15 @@ class StandardOpenapiLinkCodec {
58078
58295
  signal: options.signal
58079
58296
  };
58080
58297
  }
58081
- #encodeDetailed(procedure, path3, input, options, baseUrl, headers) {
58082
- let httpPath = standardizeHTTPPath(procedure["~orpc"].route.path ?? toHttpPath(path3));
58298
+ #encodeDetailed(procedure, path4, input, options, baseUrl, headers) {
58299
+ let httpPath = standardizeHTTPPath(procedure["~orpc"].route.path ?? toHttpPath(path4));
58083
58300
  const dynamicParams = getDynamicParams(httpPath);
58084
58301
  if (!isObject3(input) && input !== undefined) {
58085
- throw new TypeError(`[StandardOpenapiLinkCodec] Invalid input shape for "detailed" structure at ${path3.join(".")}.`);
58302
+ throw new TypeError(`[StandardOpenapiLinkCodec] Invalid input shape for "detailed" structure at ${path4.join(".")}.`);
58086
58303
  }
58087
58304
  if (dynamicParams?.length) {
58088
58305
  if (!isObject3(input?.params)) {
58089
- throw new TypeError(`[StandardOpenapiLinkCodec] Invalid input.params shape for "detailed" structure when has dynamic params at ${path3.join(".")}.`);
58306
+ throw new TypeError(`[StandardOpenapiLinkCodec] Invalid input.params shape for "detailed" structure when has dynamic params at ${path4.join(".")}.`);
58090
58307
  }
58091
58308
  for (const param of dynamicParams) {
58092
58309
  const value22 = input.params[param.name];
@@ -58096,7 +58313,7 @@ class StandardOpenapiLinkCodec {
58096
58313
  let mergedHeaders = headers;
58097
58314
  if (input?.headers !== undefined) {
58098
58315
  if (!isObject3(input.headers)) {
58099
- throw new TypeError(`[StandardOpenapiLinkCodec] Invalid input.headers shape for "detailed" structure at ${path3.join(".")}.`);
58316
+ throw new TypeError(`[StandardOpenapiLinkCodec] Invalid input.headers shape for "detailed" structure at ${path4.join(".")}.`);
58100
58317
  }
58101
58318
  mergedHeaders = mergeStandardHeaders2(input.headers, headers);
58102
58319
  }
@@ -58126,7 +58343,7 @@ class StandardOpenapiLinkCodec {
58126
58343
  signal: options.signal
58127
58344
  };
58128
58345
  }
58129
- async decode(response, _options, path3) {
58346
+ async decode(response, _options, path4) {
58130
58347
  const isOk = !isORPCErrorStatus(response.status);
58131
58348
  const deserialized = await (async () => {
58132
58349
  let isBodyOk = false;
@@ -58158,9 +58375,9 @@ class StandardOpenapiLinkCodec {
58158
58375
  data: { ...response, body: deserialized }
58159
58376
  });
58160
58377
  }
58161
- const procedure = get2(this.contract, path3);
58378
+ const procedure = get2(this.contract, path4);
58162
58379
  if (!isContractProcedure(procedure)) {
58163
- throw new Error(`[StandardOpenapiLinkCodec] expect a contract procedure at ${path3.join(".")}`);
58380
+ throw new Error(`[StandardOpenapiLinkCodec] expect a contract procedure at ${path4.join(".")}`);
58164
58381
  }
58165
58382
  const outputStructure = fallbackContractConfig("defaultOutputStructure", procedure["~orpc"].route.outputStructure);
58166
58383
  if (outputStructure === "compact") {
@@ -58200,9 +58417,9 @@ class StandardOpenAPISerializer {
58200
58417
  }
58201
58418
  if (options.outputFormat === "URLSearchParams") {
58202
58419
  const params = new URLSearchParams;
58203
- for (const [path3, value22] of this.bracketNotation.serialize(json2)) {
58420
+ for (const [path4, value22] of this.bracketNotation.serialize(json2)) {
58204
58421
  if (typeof value22 === "string" || typeof value22 === "number" || typeof value22 === "boolean") {
58205
- params.append(path3, value22.toString());
58422
+ params.append(path4, value22.toString());
58206
58423
  }
58207
58424
  }
58208
58425
  return params;
@@ -58211,11 +58428,11 @@ class StandardOpenAPISerializer {
58211
58428
  return json2;
58212
58429
  }
58213
58430
  const form = new FormData;
58214
- for (const [path3, value22] of this.bracketNotation.serialize(json2)) {
58431
+ for (const [path4, value22] of this.bracketNotation.serialize(json2)) {
58215
58432
  if (typeof value22 === "string" || typeof value22 === "number" || typeof value22 === "boolean") {
58216
- form.append(path3, value22.toString());
58433
+ form.append(path4, value22.toString());
58217
58434
  } else if (value22 instanceof Blob) {
58218
- form.append(path3, value22);
58435
+ form.append(path4, value22);
58219
58436
  }
58220
58437
  }
58221
58438
  return form;
@@ -58374,7 +58591,7 @@ function middlewareOutputFn(output) {
58374
58591
  function createProcedureClient(lazyableProcedure, ...rest) {
58375
58592
  const options = resolveMaybeOptionalOptions2(rest);
58376
58593
  return async (...[input, callerOptions]) => {
58377
- const path3 = toArray2(options.path);
58594
+ const path4 = toArray2(options.path);
58378
58595
  const { default: procedure } = await unlazy(lazyableProcedure);
58379
58596
  const clientContext = callerOptions?.context ?? {};
58380
58597
  const context = await value2(options.context ?? {}, clientContext);
@@ -58387,12 +58604,12 @@ function createProcedureClient(lazyableProcedure, ...rest) {
58387
58604
  };
58388
58605
  try {
58389
58606
  const output = await runWithSpan2({ name: "call_procedure", signal: callerOptions?.signal }, (span) => {
58390
- span?.setAttribute("procedure.path", [...path3]);
58607
+ span?.setAttribute("procedure.path", [...path4]);
58391
58608
  return intercept2(toArray2(options.interceptors), {
58392
58609
  context,
58393
58610
  input,
58394
58611
  errors: errors5,
58395
- path: path3,
58612
+ path: path4,
58396
58613
  procedure,
58397
58614
  signal: callerOptions?.signal,
58398
58615
  lastEventId: callerOptions?.lastEventId
@@ -58493,10 +58710,10 @@ var HIDDEN_ROUTER_CONTRACT_SYMBOL = Symbol("ORPC_HIDDEN_ROUTER_CONTRACT");
58493
58710
  function getHiddenRouterContract(router) {
58494
58711
  return router[HIDDEN_ROUTER_CONTRACT_SYMBOL];
58495
58712
  }
58496
- function getRouter(router, path3) {
58713
+ function getRouter(router, path4) {
58497
58714
  let current = router;
58498
- for (let i = 0;i < path3.length; i++) {
58499
- const segment = path3[i];
58715
+ for (let i = 0;i < path4.length; i++) {
58716
+ const segment = path4[i];
58500
58717
  if (!current) {
58501
58718
  return;
58502
58719
  }
@@ -58508,7 +58725,7 @@ function getRouter(router, path3) {
58508
58725
  continue;
58509
58726
  }
58510
58727
  const lazied = current;
58511
- const rest = path3.slice(i);
58728
+ const rest = path4.slice(i);
58512
58729
  return lazy2(async () => {
58513
58730
  const unwrapped = await unlazy(lazied);
58514
58731
  const next = getRouter(unwrapped.default, rest);
@@ -58812,7 +59029,7 @@ class Builder {
58812
59029
  return enhanceRouter(lazy2(loader), this["~orpc"]);
58813
59030
  }
58814
59031
  }
58815
- var os3 = new Builder({
59032
+ var os4 = new Builder({
58816
59033
  config: {},
58817
59034
  route: {},
58818
59035
  meta: {},
@@ -59089,8 +59306,8 @@ function isPrimitiveSchema(schema) {
59089
59306
  return false;
59090
59307
  });
59091
59308
  }
59092
- function toOpenAPIPath(path3) {
59093
- return standardizeHTTPPath(path3).replace(/\/\{\+([^}]+)\}/g, "/{$1}");
59309
+ function toOpenAPIPath(path4) {
59310
+ return standardizeHTTPPath(path4).replace(/\/\{\+([^}]+)\}/g, "/{$1}");
59094
59311
  }
59095
59312
  function toOpenAPIMethod(method) {
59096
59313
  return method.toLocaleLowerCase();
@@ -59335,8 +59552,8 @@ class OpenAPIGenerator {
59335
59552
  this.converter = new CompositeSchemaConverter(toArray2(options.schemaConverters));
59336
59553
  }
59337
59554
  async generate(router, { customErrorResponseBodySchema, commonSchemas, filter: baseFilter, exclude, ...baseDoc } = {}) {
59338
- const filter = baseFilter ?? (({ contract, path: path3 }) => {
59339
- return !(exclude?.(contract, path3) ?? false);
59555
+ const filter = baseFilter ?? (({ contract, path: path4 }) => {
59556
+ return !(exclude?.(contract, path4) ?? false);
59340
59557
  });
59341
59558
  const doc2 = {
59342
59559
  ...clone2(baseDoc),
@@ -59352,12 +59569,12 @@ class OpenAPIGenerator {
59352
59569
  contracts.push(traverseOptions);
59353
59570
  });
59354
59571
  const errors5 = [];
59355
- for (const { contract, path: path3 } of contracts) {
59356
- const stringPath = path3.join(".");
59572
+ for (const { contract, path: path4 } of contracts) {
59573
+ const stringPath = path4.join(".");
59357
59574
  try {
59358
59575
  const def = contract["~orpc"];
59359
59576
  const method = toOpenAPIMethod(fallbackContractConfig("defaultMethod", def.route.method));
59360
- const httpPath = toOpenAPIPath(def.route.path ?? toHttpPath(path3));
59577
+ const httpPath = toOpenAPIPath(def.route.path ?? toHttpPath(path4));
59361
59578
  let operationObjectRef;
59362
59579
  if (def.route.spec !== undefined && typeof def.route.spec !== "function") {
59363
59580
  operationObjectRef = def.route.spec;
@@ -64312,7 +64529,7 @@ var list8 = v1Contract.route({
64312
64529
  successDescription: "Paginated list of feeds with latest values",
64313
64530
  tags: TAGS12
64314
64531
  }).input(FeedListInputSchema).output(FeedListOutputSchema);
64315
- var resolve = v1Contract.route({
64532
+ var resolve2 = v1Contract.route({
64316
64533
  method: "GET",
64317
64534
  path: "/system/feeds/resolve",
64318
64535
  description: "Resolve the feed registered for a (subject, topic) pair via direct chain read with optional subgraph enrichment. Accepts topicName, topicId, or both.",
@@ -71117,7 +71334,7 @@ var list29 = v2Contract.route({
71117
71334
  successDescription: "Paginated list of feeds with latest values",
71118
71335
  tags: [...TAGS27]
71119
71336
  }).input(v2Input.query(FeedListInputSchema)).output(createSingleResponse(FeedListOutputSchema));
71120
- var resolve2 = v2Contract.route({
71337
+ var resolve22 = v2Contract.route({
71121
71338
  method: "GET",
71122
71339
  path: "/system/feeds/resolve",
71123
71340
  description: "Resolve the feed registered for a (subject, topic) pair via direct chain read with optional subgraph enrichment",
@@ -71228,7 +71445,7 @@ var adapterList2 = v2Contract.route({
71228
71445
  var feedsV2Contract = {
71229
71446
  capabilities: capabilities2,
71230
71447
  list: list29,
71231
- resolve: resolve2,
71448
+ resolve: resolve22,
71232
71449
  read: read23,
71233
71450
  registerExternal: registerExternal2,
71234
71451
  replace: replace2,
@@ -78998,7 +79215,7 @@ var timestampSerializer = {
78998
79215
  };
78999
79216
  var package_default = {
79000
79217
  name: "@settlemint/dalp-sdk",
79001
- version: "2.1.7-main.23400903660",
79218
+ version: "2.1.7-main.23402758615",
79002
79219
  private: false,
79003
79220
  description: "Fully typed SDK for the DALP tokenization platform API",
79004
79221
  homepage: "https://settlemint.com",
@@ -79141,7 +79358,7 @@ function createDalpClient(config3) {
79141
79358
  // package.json
79142
79359
  var package_default2 = {
79143
79360
  name: "@settlemint/dalp-cli",
79144
- version: "2.1.7-main.23400903660",
79361
+ version: "2.1.7-main.23402758615",
79145
79362
  private: false,
79146
79363
  description: "CLI for the Digital Asset Lifecycle Platform — manage tokens, identities, compliance, and more from the command line.",
79147
79364
  homepage: "https://settlemint.com",
@@ -79184,7 +79401,7 @@ var package_default2 = {
79184
79401
  "@core/validation": "workspace:*",
79185
79402
  "@dalp/auth": "workspace:*",
79186
79403
  "@settlemint/dalp-sdk": "workspace:*",
79187
- incur: "0.3.5"
79404
+ incur: "0.3.6"
79188
79405
  },
79189
79406
  devDependencies: {
79190
79407
  "@arethetypeswrong/cli": "0.18.2",
@@ -79226,10 +79443,10 @@ function createOrpcClient(apiUrl, credentials) {
79226
79443
 
79227
79444
  // src/lib/config.ts
79228
79445
  import { readFileSync as readFileSync3, writeFileSync as writeFileSync2, mkdirSync as mkdirSync3 } from "node:fs";
79229
- import { homedir as homedir3 } from "node:os";
79230
- import { join as join3 } from "node:path";
79231
- var CONFIG_DIR = join3(homedir3(), ".config", "dalp");
79232
- var GLOBAL_CONFIG_FILE = join3(CONFIG_DIR, "config.json");
79446
+ import { homedir as homedir4 } from "node:os";
79447
+ import { join as join4 } from "node:path";
79448
+ var CONFIG_DIR = join4(homedir4(), ".config", "dalp");
79449
+ var GLOBAL_CONFIG_FILE = join4(CONFIG_DIR, "config.json");
79233
79450
  var PROJECT_CONFIG_FILE = ".dalprc.json";
79234
79451
  var dalpConfigSchema = exports_external.object({
79235
79452
  apiUrl: exports_external.string().optional(),
@@ -79239,9 +79456,9 @@ var dalpConfigSchema = exports_external.object({
79239
79456
  function ensureConfigDir() {
79240
79457
  mkdirSync3(CONFIG_DIR, { recursive: true, mode: 448 });
79241
79458
  }
79242
- function loadJsonFile(path3) {
79459
+ function loadJsonFile(path4) {
79243
79460
  try {
79244
- return dalpConfigSchema.parse(JSON.parse(readFileSync3(path3, "utf8")));
79461
+ return dalpConfigSchema.parse(JSON.parse(readFileSync3(path4, "utf8")));
79245
79462
  } catch {
79246
79463
  return {};
79247
79464
  }
@@ -79250,7 +79467,7 @@ function loadGlobalConfig() {
79250
79467
  return loadJsonFile(GLOBAL_CONFIG_FILE);
79251
79468
  }
79252
79469
  function loadProjectConfig() {
79253
- return loadJsonFile(join3(process.cwd(), PROJECT_CONFIG_FILE));
79470
+ return loadJsonFile(join4(process.cwd(), PROJECT_CONFIG_FILE));
79254
79471
  }
79255
79472
  function resolveConfig(overrides = {}) {
79256
79473
  const globalConfig2 = loadGlobalConfig();
@@ -79276,9 +79493,9 @@ function saveGlobalConfig(updates) {
79276
79493
  // src/lib/credential-store.ts
79277
79494
  import { execFileSync } from "node:child_process";
79278
79495
  import { readFileSync as readFileSync4, writeFileSync as writeFileSync3, unlinkSync as unlinkSync2, statSync } from "node:fs";
79279
- import { join as join4 } from "node:path";
79496
+ import { join as join5 } from "node:path";
79280
79497
  var SERVICE_NAME = "dalp-cli";
79281
- var CREDENTIALS_FILE = join4(CONFIG_DIR, "credentials.json");
79498
+ var CREDENTIALS_FILE = join5(CONFIG_DIR, "credentials.json");
79282
79499
  var storedCredentialsSchema = exports_external.object({
79283
79500
  apiKey: exports_external.string(),
79284
79501
  apiKeyId: exports_external.string(),
@@ -80440,7 +80657,7 @@ Open this URL in your browser:
80440
80657
  });
80441
80658
  }
80442
80659
  const session = sessionResponseSchema.parse(await sessionResponse.json());
80443
- const hostname3 = await import("node:os").then((os4) => os4.hostname());
80660
+ const hostname3 = await import("node:os").then((os5) => os5.hostname());
80444
80661
  const apiKeyResponse = await fetch(`${apiUrl}/api/auth/api-key/create`, {
80445
80662
  method: "POST",
80446
80663
  headers: {
@@ -83066,7 +83283,7 @@ var whoamiCommand = exports_Cli.create("whoami", {
83066
83283
  }
83067
83284
  });
83068
83285
 
83069
- // ../../node_modules/.bun/@better-auth+api-key@1.5.5+3d9e5b39184acf8d/node_modules/@better-auth/api-key/dist/error-codes-vwTWW2ez.mjs
83286
+ // ../../node_modules/.bun/@better-auth+api-key@1.5.5+428b2a4c7223dcf4/node_modules/@better-auth/api-key/dist/error-codes-vwTWW2ez.mjs
83070
83287
  init_error_codes();
83071
83288
  var API_KEY_ERROR_CODES = defineErrorCodes({
83072
83289
  INVALID_METADATA_TYPE: "metadata must be an object or undefined",
@@ -83102,7 +83319,7 @@ var API_KEY_ERROR_CODES = defineErrorCodes({
83102
83319
  ORGANIZATION_PLUGIN_REQUIRED: "Organization plugin is required for organization-owned API keys. Please install and configure the organization plugin."
83103
83320
  });
83104
83321
 
83105
- // ../../node_modules/.bun/@better-auth+api-key@1.5.5+3d9e5b39184acf8d/node_modules/@better-auth/api-key/dist/client.mjs
83322
+ // ../../node_modules/.bun/@better-auth+api-key@1.5.5+428b2a4c7223dcf4/node_modules/@better-auth/api-key/dist/client.mjs
83106
83323
  var apiKeyClient = () => {
83107
83324
  return {
83108
83325
  id: "api-key",
@@ -83116,7 +83333,7 @@ var apiKeyClient = () => {
83116
83333
  };
83117
83334
  };
83118
83335
 
83119
- // ../../node_modules/.bun/@better-auth+passkey@1.5.5+3d9e5b39184acf8d/node_modules/@better-auth/passkey/dist/error-codes-Dvu2mv33.mjs
83336
+ // ../../node_modules/.bun/@better-auth+passkey@1.5.5+428b2a4c7223dcf4/node_modules/@better-auth/passkey/dist/error-codes-Dvu2mv33.mjs
83120
83337
  init_error_codes();
83121
83338
  var PASSKEY_ERROR_CODES = defineErrorCodes({
83122
83339
  CHALLENGE_NOT_FOUND: "Challenge not found",
@@ -83534,7 +83751,7 @@ async function startAuthentication(options) {
83534
83751
  authenticatorAttachment: toAuthenticatorAttachment(credential.authenticatorAttachment)
83535
83752
  };
83536
83753
  }
83537
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/client/broadcast-channel.mjs
83754
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/client/broadcast-channel.mjs
83538
83755
  var kBroadcastChannel = Symbol.for("better-auth:broadcast-channel");
83539
83756
  var now = () => Math.floor(Date.now() / 1000);
83540
83757
  var WindowBroadcastChannel = class {
@@ -83582,7 +83799,7 @@ function getGlobalBroadcastChannel(name = "better-auth.message") {
83582
83799
  return globalThis[kBroadcastChannel];
83583
83800
  }
83584
83801
 
83585
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/client/focus-manager.mjs
83802
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/client/focus-manager.mjs
83586
83803
  var kFocusManager = Symbol.for("better-auth:focus-manager");
83587
83804
  var WindowFocusManager = class {
83588
83805
  listeners = /* @__PURE__ */ new Set;
@@ -83614,7 +83831,7 @@ function getGlobalFocusManager() {
83614
83831
  return globalThis[kFocusManager];
83615
83832
  }
83616
83833
 
83617
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/client/online-manager.mjs
83834
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/client/online-manager.mjs
83618
83835
  var kOnlineManager = Symbol.for("better-auth:online-manager");
83619
83836
  var WindowOnlineManager = class {
83620
83837
  listeners = /* @__PURE__ */ new Set;
@@ -83648,7 +83865,7 @@ function getGlobalOnlineManager() {
83648
83865
  return globalThis[kOnlineManager];
83649
83866
  }
83650
83867
 
83651
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/client/parser.mjs
83868
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/client/parser.mjs
83652
83869
  var PROTO_POLLUTION_PATTERNS = {
83653
83870
  proto: /"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/,
83654
83871
  constructor: /"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/,
@@ -83874,9 +84091,9 @@ var onMount = ($store, initialize) => {
83874
84091
  };
83875
84092
  });
83876
84093
  };
83877
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/client/query.mjs
84094
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/client/query.mjs
83878
84095
  var isServer = () => typeof window === "undefined";
83879
- var useAuthQuery = (initializedAtom, path3, $fetch, options) => {
84096
+ var useAuthQuery = (initializedAtom, path4, $fetch, options) => {
83880
84097
  const value3 = atom({
83881
84098
  data: null,
83882
84099
  error: null,
@@ -83891,7 +84108,7 @@ var useAuthQuery = (initializedAtom, path3, $fetch, options) => {
83891
84108
  error: value3.get().error,
83892
84109
  isPending: value3.get().isPending
83893
84110
  }) : options;
83894
- $fetch(path3, {
84111
+ $fetch(path4, {
83895
84112
  ...opts,
83896
84113
  query: {
83897
84114
  ...opts?.query,
@@ -83973,7 +84190,7 @@ var useAuthQuery = (initializedAtom, path3, $fetch, options) => {
83973
84190
  return value3;
83974
84191
  };
83975
84192
 
83976
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/client/session-refresh.mjs
84193
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/client/session-refresh.mjs
83977
84194
  var now2 = () => Math.floor(Date.now() / 1000);
83978
84195
  var FOCUS_REFETCH_RATE_LIMIT_SECONDS = 5;
83979
84196
  function createSessionRefreshManager(opts) {
@@ -84107,7 +84324,7 @@ function createSessionRefreshManager(opts) {
84107
84324
  };
84108
84325
  }
84109
84326
 
84110
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/utils/wildcard.mjs
84327
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/utils/wildcard.mjs
84111
84328
  function escapeRegExpChar(char) {
84112
84329
  if (char === "-" || char === "^" || char === "$" || char === "+" || char === "." || char === "(" || char === ")" || char === "|" || char === "[" || char === "]" || char === "{" || char === "}" || char === "*" || char === "?" || char === "\\")
84113
84330
  return `\\${char}`;
@@ -84205,7 +84422,7 @@ function wildcardMatch(pattern, options) {
84205
84422
  return fn;
84206
84423
  }
84207
84424
 
84208
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/utils/url.mjs
84425
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/utils/url.mjs
84209
84426
  init_env();
84210
84427
  init_error2();
84211
84428
  function checkHasPath(url2) {
@@ -84226,15 +84443,15 @@ function assertHasProtocol(url2) {
84226
84443
  throw new BetterAuthError(`Invalid base URL: ${url2}. Please provide a valid base URL.`, { cause: error48 });
84227
84444
  }
84228
84445
  }
84229
- function withPath(url2, path3 = "/api/auth") {
84446
+ function withPath(url2, path4 = "/api/auth") {
84230
84447
  assertHasProtocol(url2);
84231
84448
  if (checkHasPath(url2))
84232
84449
  return url2;
84233
84450
  const trimmedUrl = url2.replace(/\/+$/, "");
84234
- if (!path3 || path3 === "/")
84451
+ if (!path4 || path4 === "/")
84235
84452
  return trimmedUrl;
84236
- path3 = path3.startsWith("/") ? path3 : `/${path3}`;
84237
- return `${trimmedUrl}${path3}`;
84453
+ path4 = path4.startsWith("/") ? path4 : `/${path4}`;
84454
+ return `${trimmedUrl}${path4}`;
84238
84455
  }
84239
84456
  function validateProxyHeader(header, type2) {
84240
84457
  if (!header || header.trim() === "")
@@ -84257,30 +84474,30 @@ function validateProxyHeader(header, type2) {
84257
84474
  }
84258
84475
  return false;
84259
84476
  }
84260
- function getBaseURL(url2, path3, request, loadEnv, trustedProxyHeaders) {
84477
+ function getBaseURL(url2, path4, request, loadEnv, trustedProxyHeaders) {
84261
84478
  if (url2)
84262
- return withPath(url2, path3);
84479
+ return withPath(url2, path4);
84263
84480
  if (loadEnv !== false) {
84264
84481
  const fromEnv = env.BETTER_AUTH_URL || env.NEXT_PUBLIC_BETTER_AUTH_URL || env.PUBLIC_BETTER_AUTH_URL || env.NUXT_PUBLIC_BETTER_AUTH_URL || env.NUXT_PUBLIC_AUTH_URL || (env.BASE_URL !== "/" ? env.BASE_URL : undefined);
84265
84482
  if (fromEnv)
84266
- return withPath(fromEnv, path3);
84483
+ return withPath(fromEnv, path4);
84267
84484
  }
84268
84485
  const fromRequest = request?.headers.get("x-forwarded-host");
84269
84486
  const fromRequestProto = request?.headers.get("x-forwarded-proto");
84270
84487
  if (fromRequest && fromRequestProto && trustedProxyHeaders) {
84271
84488
  if (validateProxyHeader(fromRequestProto, "proto") && validateProxyHeader(fromRequest, "host"))
84272
84489
  try {
84273
- return withPath(`${fromRequestProto}://${fromRequest}`, path3);
84490
+ return withPath(`${fromRequestProto}://${fromRequest}`, path4);
84274
84491
  } catch (_error) {}
84275
84492
  }
84276
84493
  if (request) {
84277
84494
  const url3 = getOrigin(request.url);
84278
84495
  if (!url3)
84279
84496
  throw new BetterAuthError("Could not get origin from request. Please provide a valid base URL.");
84280
- return withPath(url3, path3);
84497
+ return withPath(url3, path4);
84281
84498
  }
84282
84499
  if (typeof window !== "undefined" && window.location)
84283
- return withPath(window.location.origin, path3);
84500
+ return withPath(window.location.origin, path4);
84284
84501
  }
84285
84502
  function getOrigin(url2) {
84286
84503
  try {
@@ -84305,7 +84522,7 @@ function getHost(url2) {
84305
84522
  }
84306
84523
  }
84307
84524
 
84308
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/client/fetch-plugins.mjs
84525
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/client/fetch-plugins.mjs
84309
84526
  var redirectPlugin = {
84310
84527
  id: "redirect",
84311
84528
  name: "Redirect",
@@ -84321,7 +84538,7 @@ var redirectPlugin = {
84321
84538
  } }
84322
84539
  };
84323
84540
 
84324
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/client/session-atom.mjs
84541
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/client/session-atom.mjs
84325
84542
  function getSessionAtom($fetch, options) {
84326
84543
  const $signal = atom(false);
84327
84544
  const session = useAuthQuery($signal, "/get-session", $fetch, { method: "GET" });
@@ -84793,7 +85010,7 @@ function getURL2(url2, option) {
84793
85010
  }
84794
85011
  if (!basePath.endsWith("/"))
84795
85012
  basePath += "/";
84796
- let [path3, urlQuery] = url2.replace(basePath, "").split("?");
85013
+ let [path4, urlQuery] = url2.replace(basePath, "").split("?");
84797
85014
  const queryParams = new URLSearchParams(urlQuery);
84798
85015
  for (const [key, value3] of Object.entries(query || {})) {
84799
85016
  if (value3 == null)
@@ -84813,26 +85030,26 @@ function getURL2(url2, option) {
84813
85030
  }
84814
85031
  if (params) {
84815
85032
  if (Array.isArray(params)) {
84816
- const paramPaths = path3.split("/").filter((p) => p.startsWith(":"));
85033
+ const paramPaths = path4.split("/").filter((p) => p.startsWith(":"));
84817
85034
  for (const [index2, key] of paramPaths.entries()) {
84818
85035
  const value3 = params[index2];
84819
- path3 = path3.replace(key, value3);
85036
+ path4 = path4.replace(key, value3);
84820
85037
  }
84821
85038
  } else {
84822
85039
  for (const [key, value3] of Object.entries(params)) {
84823
- path3 = path3.replace(`:${key}`, String(value3));
85040
+ path4 = path4.replace(`:${key}`, String(value3));
84824
85041
  }
84825
85042
  }
84826
85043
  }
84827
- path3 = path3.split("/").map(encodeURIComponent).join("/");
84828
- if (path3.startsWith("/"))
84829
- path3 = path3.slice(1);
85044
+ path4 = path4.split("/").map(encodeURIComponent).join("/");
85045
+ if (path4.startsWith("/"))
85046
+ path4 = path4.slice(1);
84830
85047
  let queryParamString = queryParams.toString();
84831
85048
  queryParamString = queryParamString.length > 0 ? `?${queryParamString}`.replace(/\+/g, "%20") : "";
84832
85049
  if (!basePath.startsWith("http")) {
84833
- return `${basePath}${path3}${queryParamString}`;
85050
+ return `${basePath}${path4}${queryParamString}`;
84834
85051
  }
84835
- const _url2 = new URL(`${path3}${queryParamString}`, basePath);
85052
+ const _url2 = new URL(`${path4}${queryParamString}`, basePath);
84836
85053
  return _url2;
84837
85054
  }
84838
85055
  var betterFetch = async (url2, options) => {
@@ -84977,11 +85194,11 @@ var betterFetch = async (url2, options) => {
84977
85194
  };
84978
85195
  };
84979
85196
 
84980
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/client/config.mjs
85197
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/client/config.mjs
84981
85198
  var resolvePublicAuthUrl = (basePath) => {
84982
85199
  if (typeof process === "undefined")
84983
85200
  return;
84984
- const path3 = basePath ?? "/api/auth";
85201
+ const path4 = basePath ?? "/api/auth";
84985
85202
  if (process.env.NEXT_PUBLIC_AUTH_URL)
84986
85203
  return process.env.NEXT_PUBLIC_AUTH_URL;
84987
85204
  if (typeof window === "undefined") {
@@ -84992,7 +85209,7 @@ var resolvePublicAuthUrl = (basePath) => {
84992
85209
  if (process.env.VERCEL_URL)
84993
85210
  try {
84994
85211
  const protocol = process.env.VERCEL_URL.startsWith("http") ? "" : "https://";
84995
- return `${new URL(`${protocol}${process.env.VERCEL_URL}`).origin}${path3}`;
85212
+ return `${new URL(`${protocol}${process.env.VERCEL_URL}`).origin}${path4}`;
84996
85213
  } catch {}
84997
85214
  }
84998
85215
  };
@@ -85044,13 +85261,13 @@ var getClientConfig = (options, loadEnv) => {
85044
85261
  };
85045
85262
  const atomListeners = [{
85046
85263
  signal: "$sessionSignal",
85047
- matcher(path3) {
85048
- return path3 === "/sign-out" || path3 === "/update-user" || path3 === "/update-session" || path3 === "/sign-up/email" || path3 === "/sign-in/email" || path3 === "/delete-user" || path3 === "/verify-email" || path3 === "/revoke-sessions" || path3 === "/revoke-session" || path3 === "/change-email";
85264
+ matcher(path4) {
85265
+ return path4 === "/sign-out" || path4 === "/update-user" || path4 === "/update-session" || path4 === "/sign-up/email" || path4 === "/sign-in/email" || path4 === "/delete-user" || path4 === "/verify-email" || path4 === "/revoke-sessions" || path4 === "/revoke-session" || path4 === "/change-email";
85049
85266
  },
85050
- callback(path3) {
85051
- if (path3 === "/sign-out")
85267
+ callback(path4) {
85268
+ if (path4 === "/sign-out")
85052
85269
  broadcastSessionUpdate("signout");
85053
- else if (path3 === "/update-user" || path3 === "/update-session")
85270
+ else if (path4 === "/update-user" || path4 === "/update-session")
85054
85271
  broadcastSessionUpdate("updateUser");
85055
85272
  }
85056
85273
  }];
@@ -85087,14 +85304,14 @@ var getClientConfig = (options, loadEnv) => {
85087
85304
  };
85088
85305
  };
85089
85306
 
85090
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/utils/is-atom.mjs
85307
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/utils/is-atom.mjs
85091
85308
  function isAtom(value3) {
85092
85309
  return typeof value3 === "object" && value3 !== null && "get" in value3 && typeof value3.get === "function" && "lc" in value3 && typeof value3.lc === "number";
85093
85310
  }
85094
85311
 
85095
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/client/proxy.mjs
85096
- function getMethod2(path3, knownPathMethods, args) {
85097
- const method = knownPathMethods[path3];
85312
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/client/proxy.mjs
85313
+ function getMethod2(path4, knownPathMethods, args) {
85314
+ const method = knownPathMethods[path4];
85098
85315
  const { fetchOptions, query: _query, ...body } = args || {};
85099
85316
  if (method)
85100
85317
  return method;
@@ -85105,14 +85322,14 @@ function getMethod2(path3, knownPathMethods, args) {
85105
85322
  return "GET";
85106
85323
  }
85107
85324
  function createDynamicPathProxy(routes, client, knownPathMethods, atoms, atomListeners) {
85108
- function createProxy(path3 = []) {
85325
+ function createProxy(path4 = []) {
85109
85326
  return new Proxy(function() {}, {
85110
85327
  get(_, prop) {
85111
85328
  if (typeof prop !== "string")
85112
85329
  return;
85113
85330
  if (prop === "then" || prop === "catch" || prop === "finally")
85114
85331
  return;
85115
- const fullPath = [...path3, prop];
85332
+ const fullPath = [...path4, prop];
85116
85333
  let current = routes;
85117
85334
  for (const segment of fullPath)
85118
85335
  if (current && typeof current === "object" && segment in current)
@@ -85128,7 +85345,7 @@ function createDynamicPathProxy(routes, client, knownPathMethods, atoms, atomLis
85128
85345
  return createProxy(fullPath);
85129
85346
  },
85130
85347
  apply: async (_, __, args) => {
85131
- const routePath = "/" + path3.map((segment) => segment.replace(/[A-Z]/g, (letter) => `-${letter.toLowerCase()}`)).join("/");
85348
+ const routePath = "/" + path4.map((segment) => segment.replace(/[A-Z]/g, (letter) => `-${letter.toLowerCase()}`)).join("/");
85132
85349
  const arg = args[0] || {};
85133
85350
  const fetchOptions = args[1] || {};
85134
85351
  const { query, fetchOptions: argFetchOptions, ...body } = arg;
@@ -85174,7 +85391,7 @@ function createDynamicPathProxy(routes, client, knownPathMethods, atoms, atomLis
85174
85391
  return createProxy();
85175
85392
  }
85176
85393
 
85177
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/client/vanilla.mjs
85394
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/client/vanilla.mjs
85178
85395
  init_string2();
85179
85396
  function createAuthClient(options) {
85180
85397
  const { pluginPathMethods, pluginsActions, pluginsAtoms, $fetch, atomListeners, $store } = getClientConfig(options);
@@ -85189,7 +85406,7 @@ function createAuthClient(options) {
85189
85406
  }, $fetch, pluginPathMethods, pluginsAtoms, atomListeners);
85190
85407
  }
85191
85408
 
85192
- // ../../node_modules/.bun/@better-auth+passkey@1.5.5+3d9e5b39184acf8d/node_modules/@better-auth/passkey/dist/client.mjs
85409
+ // ../../node_modules/.bun/@better-auth+passkey@1.5.5+428b2a4c7223dcf4/node_modules/@better-auth/passkey/dist/client.mjs
85193
85410
  var getPasskeyActions = ($fetch, { $listPasskeys, $store }) => {
85194
85411
  const signInPasskey = async (opts, options) => {
85195
85412
  const response = await $fetch("/passkey/generate-authenticate-options", {
@@ -85324,19 +85541,19 @@ var passkeyClient = () => {
85324
85541
  "/passkey/authenticate": "POST"
85325
85542
  },
85326
85543
  atomListeners: [{
85327
- matcher(path3) {
85328
- return path3 === "/passkey/verify-registration" || path3 === "/passkey/delete-passkey" || path3 === "/passkey/update-passkey" || path3 === "/sign-out";
85544
+ matcher(path4) {
85545
+ return path4 === "/passkey/verify-registration" || path4 === "/passkey/delete-passkey" || path4 === "/passkey/update-passkey" || path4 === "/sign-out";
85329
85546
  },
85330
85547
  signal: "$listPasskeys"
85331
85548
  }, {
85332
- matcher: (path3) => path3 === "/passkey/verify-authentication",
85549
+ matcher: (path4) => path4 === "/passkey/verify-authentication",
85333
85550
  signal: "$sessionSignal"
85334
85551
  }],
85335
85552
  $ERROR_CODES: PASSKEY_ERROR_CODES
85336
85553
  };
85337
85554
  };
85338
85555
 
85339
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/plugins/additional-fields/client.mjs
85556
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/plugins/additional-fields/client.mjs
85340
85557
  var inferAdditionalFields = (schema) => {
85341
85558
  return {
85342
85559
  id: "additional-fields-client",
@@ -85344,7 +85561,7 @@ var inferAdditionalFields = (schema) => {
85344
85561
  };
85345
85562
  };
85346
85563
 
85347
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/plugins/admin/error-codes.mjs
85564
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/plugins/admin/error-codes.mjs
85348
85565
  init_error_codes();
85349
85566
  var ADMIN_ERROR_CODES = defineErrorCodes({
85350
85567
  FAILED_TO_CREATE_USER: "Failed to create user",
@@ -85370,7 +85587,7 @@ var ADMIN_ERROR_CODES = defineErrorCodes({
85370
85587
  INVALID_ROLE_TYPE: "Invalid role type"
85371
85588
  });
85372
85589
 
85373
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/plugins/access/access.mjs
85590
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/plugins/access/access.mjs
85374
85591
  init_error2();
85375
85592
  function role(statements) {
85376
85593
  return {
@@ -85420,7 +85637,7 @@ function createAccessControl(s) {
85420
85637
  };
85421
85638
  }
85422
85639
 
85423
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/plugins/admin/access/statement.mjs
85640
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/plugins/admin/access/statement.mjs
85424
85641
  var defaultStatements = {
85425
85642
  user: [
85426
85643
  "create",
@@ -85468,7 +85685,7 @@ var defaultRoles = {
85468
85685
  user: userAc
85469
85686
  };
85470
85687
 
85471
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/plugins/admin/has-permission.mjs
85688
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/plugins/admin/has-permission.mjs
85472
85689
  var hasPermission = (input) => {
85473
85690
  if (input.userId && input.options?.adminUserIds?.includes(input.userId))
85474
85691
  return true;
@@ -85482,7 +85699,7 @@ var hasPermission = (input) => {
85482
85699
  return false;
85483
85700
  };
85484
85701
 
85485
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/plugins/admin/client.mjs
85702
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/plugins/admin/client.mjs
85486
85703
  var adminClient = (options) => {
85487
85704
  const roles3 = {
85488
85705
  admin: adminAc,
@@ -85510,7 +85727,7 @@ var adminClient = (options) => {
85510
85727
  };
85511
85728
  };
85512
85729
 
85513
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/plugins/anonymous/error-codes.mjs
85730
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/plugins/anonymous/error-codes.mjs
85514
85731
  init_error_codes();
85515
85732
  var ANONYMOUS_ERROR_CODES = defineErrorCodes({
85516
85733
  INVALID_EMAIL_FORMAT: "Email was not generated in a valid format",
@@ -85522,7 +85739,7 @@ var ANONYMOUS_ERROR_CODES = defineErrorCodes({
85522
85739
  DELETE_ANONYMOUS_USER_DISABLED: "Deleting anonymous users is disabled"
85523
85740
  });
85524
85741
 
85525
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/client/plugins/infer-plugin.mjs
85742
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/client/plugins/infer-plugin.mjs
85526
85743
  var InferServerPlugin = () => {
85527
85744
  return {
85528
85745
  id: "infer-server-plugin",
@@ -85530,12 +85747,12 @@ var InferServerPlugin = () => {
85530
85747
  };
85531
85748
  };
85532
85749
 
85533
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/plugins/custom-session/client.mjs
85750
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/plugins/custom-session/client.mjs
85534
85751
  var customSessionClient = () => {
85535
85752
  return InferServerPlugin();
85536
85753
  };
85537
85754
 
85538
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/plugins/device-authorization/client.mjs
85755
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/plugins/device-authorization/client.mjs
85539
85756
  var deviceAuthorizationClient = () => {
85540
85757
  return {
85541
85758
  id: "device-authorization",
@@ -85550,7 +85767,7 @@ var deviceAuthorizationClient = () => {
85550
85767
  };
85551
85768
  };
85552
85769
 
85553
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/plugins/email-otp/error-codes.mjs
85770
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/plugins/email-otp/error-codes.mjs
85554
85771
  init_error_codes();
85555
85772
  var EMAIL_OTP_ERROR_CODES = defineErrorCodes({
85556
85773
  OTP_EXPIRED: "OTP expired",
@@ -85558,7 +85775,7 @@ var EMAIL_OTP_ERROR_CODES = defineErrorCodes({
85558
85775
  TOO_MANY_ATTEMPTS: "Too many attempts"
85559
85776
  });
85560
85777
 
85561
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/plugins/generic-oauth/error-codes.mjs
85778
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/plugins/generic-oauth/error-codes.mjs
85562
85779
  init_error_codes();
85563
85780
  var GENERIC_OAUTH_ERROR_CODES = defineErrorCodes({
85564
85781
  INVALID_OAUTH_CONFIGURATION: "Invalid OAuth configuration",
@@ -85571,11 +85788,11 @@ var GENERIC_OAUTH_ERROR_CODES = defineErrorCodes({
85571
85788
  ISSUER_MISSING: "OAuth issuer parameter missing. The authorization server did not include the required iss parameter (RFC 9207)."
85572
85789
  });
85573
85790
 
85574
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/plugins/multi-session/error-codes.mjs
85791
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/plugins/multi-session/error-codes.mjs
85575
85792
  init_error_codes();
85576
85793
  var MULTI_SESSION_ERROR_CODES = defineErrorCodes({ INVALID_SESSION_TOKEN: "Invalid session token" });
85577
85794
 
85578
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/plugins/organization/error-codes.mjs
85795
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/plugins/organization/error-codes.mjs
85579
85796
  init_error_codes();
85580
85797
  var ORGANIZATION_ERROR_CODES = defineErrorCodes({
85581
85798
  YOU_ARE_NOT_ALLOWED_TO_CREATE_A_NEW_ORGANIZATION: "You are not allowed to create a new organization",
@@ -85637,7 +85854,7 @@ var ORGANIZATION_ERROR_CODES = defineErrorCodes({
85637
85854
  ROLE_IS_ASSIGNED_TO_MEMBERS: "Cannot delete a role that is assigned to members. Please reassign the members to a different role first"
85638
85855
  });
85639
85856
 
85640
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/plugins/organization/access/statement.mjs
85857
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/plugins/organization/access/statement.mjs
85641
85858
  var defaultStatements2 = {
85642
85859
  organization: ["update", "delete"],
85643
85860
  member: [
@@ -85712,7 +85929,7 @@ var defaultRoles2 = {
85712
85929
  member: memberAc
85713
85930
  };
85714
85931
 
85715
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/plugins/organization/permission.mjs
85932
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/plugins/organization/permission.mjs
85716
85933
  var hasPermissionFn = (input, acRoles) => {
85717
85934
  if (!input.permissions)
85718
85935
  return false;
@@ -85728,7 +85945,7 @@ var hasPermissionFn = (input, acRoles) => {
85728
85945
  return false;
85729
85946
  };
85730
85947
 
85731
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/plugins/organization/client.mjs
85948
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/plugins/organization/client.mjs
85732
85949
  var clientSideHasPermission = (input) => {
85733
85950
  return hasPermissionFn(input, input.options.roles || defaultRoles2);
85734
85951
  };
@@ -85784,32 +86001,32 @@ var organizationClient = (options) => {
85784
86001
  },
85785
86002
  atomListeners: [
85786
86003
  {
85787
- matcher(path3) {
85788
- return path3 === "/organization/create" || path3 === "/organization/delete" || path3 === "/organization/update";
86004
+ matcher(path4) {
86005
+ return path4 === "/organization/create" || path4 === "/organization/delete" || path4 === "/organization/update";
85789
86006
  },
85790
86007
  signal: "$listOrg"
85791
86008
  },
85792
86009
  {
85793
- matcher(path3) {
85794
- return path3.startsWith("/organization");
86010
+ matcher(path4) {
86011
+ return path4.startsWith("/organization");
85795
86012
  },
85796
86013
  signal: "$activeOrgSignal"
85797
86014
  },
85798
86015
  {
85799
- matcher(path3) {
85800
- return path3.startsWith("/organization/set-active") || path3 === "/organization/create" || path3 === "/organization/delete" || path3 === "/organization/remove-member" || path3 === "/organization/leave" || path3 === "/organization/accept-invitation";
86016
+ matcher(path4) {
86017
+ return path4.startsWith("/organization/set-active") || path4 === "/organization/create" || path4 === "/organization/delete" || path4 === "/organization/remove-member" || path4 === "/organization/leave" || path4 === "/organization/accept-invitation";
85801
86018
  },
85802
86019
  signal: "$sessionSignal"
85803
86020
  },
85804
86021
  {
85805
- matcher(path3) {
85806
- return path3.includes("/organization/update-member-role") || path3.startsWith("/organization/set-active");
86022
+ matcher(path4) {
86023
+ return path4.includes("/organization/update-member-role") || path4.startsWith("/organization/set-active");
85807
86024
  },
85808
86025
  signal: "$activeMemberSignal"
85809
86026
  },
85810
86027
  {
85811
- matcher(path3) {
85812
- return path3.includes("/organization/update-member-role") || path3.startsWith("/organization/set-active");
86028
+ matcher(path4) {
86029
+ return path4.includes("/organization/update-member-role") || path4.startsWith("/organization/set-active");
85813
86030
  },
85814
86031
  signal: "$activeMemberRoleSignal"
85815
86032
  }
@@ -85818,7 +86035,7 @@ var organizationClient = (options) => {
85818
86035
  };
85819
86036
  };
85820
86037
 
85821
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/plugins/phone-number/error-codes.mjs
86038
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/plugins/phone-number/error-codes.mjs
85822
86039
  init_error_codes();
85823
86040
  var PHONE_NUMBER_ERROR_CODES = defineErrorCodes({
85824
86041
  INVALID_PHONE_NUMBER: "Invalid phone number",
@@ -85835,7 +86052,7 @@ var PHONE_NUMBER_ERROR_CODES = defineErrorCodes({
85835
86052
  TOO_MANY_ATTEMPTS: "Too many attempts"
85836
86053
  });
85837
86054
 
85838
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/plugins/two-factor/error-code.mjs
86055
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/plugins/two-factor/error-code.mjs
85839
86056
  init_error_codes();
85840
86057
  var TWO_FACTOR_ERROR_CODES = defineErrorCodes({
85841
86058
  OTP_NOT_ENABLED: "OTP not enabled",
@@ -85849,13 +86066,13 @@ var TWO_FACTOR_ERROR_CODES = defineErrorCodes({
85849
86066
  INVALID_TWO_FACTOR_COOKIE: "Invalid two factor cookie"
85850
86067
  });
85851
86068
 
85852
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/plugins/two-factor/client.mjs
86069
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/plugins/two-factor/client.mjs
85853
86070
  var twoFactorClient = (options) => {
85854
86071
  return {
85855
86072
  id: "two-factor",
85856
86073
  $InferServerPlugin: {},
85857
86074
  atomListeners: [{
85858
- matcher: (path3) => path3.startsWith("/two-factor/"),
86075
+ matcher: (path4) => path4.startsWith("/two-factor/"),
85859
86076
  signal: "$sessionSignal"
85860
86077
  }],
85861
86078
  pathMethods: {
@@ -85882,7 +86099,7 @@ var twoFactorClient = (options) => {
85882
86099
  };
85883
86100
  };
85884
86101
 
85885
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/plugins/username/error-codes.mjs
86102
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/plugins/username/error-codes.mjs
85886
86103
  init_error_codes();
85887
86104
  var USERNAME_ERROR_CODES = defineErrorCodes({
85888
86105
  INVALID_USERNAME_OR_PASSWORD: "Invalid username or password",
@@ -85895,7 +86112,7 @@ var USERNAME_ERROR_CODES = defineErrorCodes({
85895
86112
  INVALID_DISPLAY_USERNAME: "Display username is invalid"
85896
86113
  });
85897
86114
 
85898
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/crypto/random.mjs
86115
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/crypto/random.mjs
85899
86116
  init_random();
85900
86117
  var generateRandomString = createRandomStringGenerator("a-z", "0-9", "A-Z", "-_");
85901
86118
 
@@ -89673,7 +89890,7 @@ function decodeJwt(jwt2) {
89673
89890
  throw new JWTInvalid("Invalid JWT Claims Set");
89674
89891
  return result;
89675
89892
  }
89676
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/crypto/jwt.mjs
89893
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/crypto/jwt.mjs
89677
89894
  async function signJWT(payload, secret, expiresIn = 3600) {
89678
89895
  return await new SignJWT(payload).setProtectedHeader({ alg: "HS256" }).setIssuedAt().setExpirationTime(Math.floor(Date.now() / 1000) + expiresIn).sign(new TextEncoder().encode(secret));
89679
89896
  }
@@ -89821,7 +90038,7 @@ async function symmetricDecodeJWT(token, secret, salt) {
89821
90038
  }
89822
90039
  }
89823
90040
 
89824
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/crypto/password.mjs
90041
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/crypto/password.mjs
89825
90042
  init_error2();
89826
90043
 
89827
90044
  // ../../node_modules/.bun/@better-auth+utils@0.3.1/node_modules/@better-auth/utils/dist/hex.mjs
@@ -90793,7 +91010,7 @@ var _poly1305_aead = (xorStream) => (key, nonce3, AAD) => {
90793
91010
  var chacha20poly1305 = /* @__PURE__ */ wrapCipher({ blockSize: 64, nonceLength: 12, tagLength: 16 }, _poly1305_aead(chacha20));
90794
91011
  var xchacha20poly1305 = /* @__PURE__ */ wrapCipher({ blockSize: 64, nonceLength: 24, tagLength: 16 }, _poly1305_aead(xchacha20));
90795
91012
 
90796
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/crypto/index.mjs
91013
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/crypto/index.mjs
90797
91014
  var ENVELOPE_PREFIX = "$ba$";
90798
91015
  function parseEnvelope(data2) {
90799
91016
  if (!data2.startsWith(ENVELOPE_PREFIX))
@@ -90848,7 +91065,7 @@ var symmetricDecrypt = async ({ key, data: data2 }) => {
90848
91065
  throw new Error("Cannot decrypt legacy bare-hex payload: no legacy secret available. Set BETTER_AUTH_SECRET for backwards compatibility.");
90849
91066
  };
90850
91067
 
90851
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/utils/date.mjs
91068
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/utils/date.mjs
90852
91069
  var getDate = (span, unit = "ms") => {
90853
91070
  return new Date(Date.now() + (unit === "sec" ? span * 1000 : span));
90854
91071
  };
@@ -90924,7 +91141,7 @@ var verificationSchema = coreSchema.extend({
90924
91141
  identifier: string2()
90925
91142
  });
90926
91143
 
90927
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/db/schema.mjs
91144
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/db/schema.mjs
90928
91145
  init_error2();
90929
91146
 
90930
91147
  // ../../node_modules/.bun/@better-auth+core@1.5.5+9ce0b2c039e580c5/node_modules/@better-auth/core/dist/utils/db.mjs
@@ -90938,7 +91155,7 @@ function filterOutputFields(data2, additionalFields) {
90938
91155
  }), {});
90939
91156
  }
90940
91157
 
90941
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/db/schema.mjs
91158
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/db/schema.mjs
90942
91159
  var cache2 = /* @__PURE__ */ new WeakMap;
90943
91160
  function getFields(options, modelName, mode) {
90944
91161
  const cacheKey = `${modelName}:${mode}`;
@@ -91071,12 +91288,12 @@ function mergeSchema(schema, newSchema) {
91071
91288
  return schema;
91072
91289
  }
91073
91290
 
91074
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/utils/is-promise.mjs
91291
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/utils/is-promise.mjs
91075
91292
  function isPromise(obj) {
91076
91293
  return !!obj && (typeof obj === "object" || typeof obj === "function") && typeof obj.then === "function";
91077
91294
  }
91078
91295
 
91079
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/cookies/session-store.mjs
91296
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/cookies/session-store.mjs
91080
91297
  init_json();
91081
91298
  init_zod();
91082
91299
  var ALLOWED_COOKIE_SIZE = 4096;
@@ -91260,7 +91477,7 @@ var getSessionQuerySchema = optional(object({
91260
91477
  disableRefresh: exports_coerce.boolean().meta({ description: "Disable session refresh. Useful for checking session status, without updating the session" }).optional()
91261
91478
  }));
91262
91479
 
91263
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/utils/time.mjs
91480
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/utils/time.mjs
91264
91481
  var SEC = 1000;
91265
91482
  var MIN = SEC * 60;
91266
91483
  var HOUR = MIN * 60;
@@ -91269,7 +91486,7 @@ var WEEK = DAY * 7;
91269
91486
  var MONTH = DAY * 30;
91270
91487
  var YEAR = DAY * 365.25;
91271
91488
 
91272
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/cookies/index.mjs
91489
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/cookies/index.mjs
91273
91490
  init_env();
91274
91491
  init_error2();
91275
91492
  init_json();
@@ -91325,7 +91542,7 @@ var createHMAC = (algorithm = "SHA-256", encoding = "none") => {
91325
91542
  return hmac2;
91326
91543
  };
91327
91544
 
91328
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/cookies/index.mjs
91545
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/cookies/index.mjs
91329
91546
  async function setCookieCache(ctx, session, dontRememberMe) {
91330
91547
  if (!ctx.context.options.session?.cookieCache?.enabled)
91331
91548
  return;
@@ -91424,7 +91641,7 @@ function deleteSessionCookie(ctx, skipDontRememberMe) {
91424
91641
  expireCookie(ctx, ctx.context.authCookies.dontRememberToken);
91425
91642
  }
91426
91643
 
91427
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/state.mjs
91644
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/state.mjs
91428
91645
  init_error2();
91429
91646
  init_zod();
91430
91647
  var stateDataSchema = looseObject({
@@ -91683,10 +91900,10 @@ var queueAfterTransactionHook = async (hook) => {
91683
91900
  });
91684
91901
  };
91685
91902
 
91686
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/api/state/oauth.mjs
91903
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/api/state/oauth.mjs
91687
91904
  var { get: getOAuthState, set: setOAuthState } = defineRequestState(() => null);
91688
91905
 
91689
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/oauth2/state.mjs
91906
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/oauth2/state.mjs
91690
91907
  init_error2();
91691
91908
  async function generateState(c, link, additionalData) {
91692
91909
  const callbackURL = c.body?.callbackURL || c.context.options.baseURL;
@@ -91733,10 +91950,10 @@ async function parseState(c) {
91733
91950
  return parsedData;
91734
91951
  }
91735
91952
 
91736
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/utils/hide-metadata.mjs
91953
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/utils/hide-metadata.mjs
91737
91954
  var HIDE_METADATA = { scope: "server" };
91738
91955
 
91739
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/utils/is-api-error.mjs
91956
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/utils/is-api-error.mjs
91740
91957
  init_error2();
91741
91958
 
91742
91959
  // ../../node_modules/.bun/better-call@1.3.2+3c5d820c62823f0b/node_modules/better-call/dist/index.mjs
@@ -92066,7 +92283,7 @@ function fromError(error48, validating) {
92066
92283
  }
92067
92284
 
92068
92285
  // ../../node_modules/.bun/better-call@1.3.2+3c5d820c62823f0b/node_modules/better-call/dist/context.mjs
92069
- var createInternalContext = async (context, { options, path: path3 }) => {
92286
+ var createInternalContext = async (context, { options, path: path4 }) => {
92070
92287
  const headers = new Headers;
92071
92288
  let responseStatus = undefined;
92072
92289
  const { data: data2, error: error48 } = await runValidation(options, context);
@@ -92079,7 +92296,7 @@ var createInternalContext = async (context, { options, path: path3 }) => {
92079
92296
  ...context,
92080
92297
  body: data2.body,
92081
92298
  query: data2.query,
92082
- path: context.path || path3 || "virtual:",
92299
+ path: context.path || path4 || "virtual:",
92083
92300
  context: "context" in context && context.context ? context.context : {},
92084
92301
  returned: undefined,
92085
92302
  headers: context?.headers,
@@ -92169,18 +92386,18 @@ var createInternalContext = async (context, { options, path: path3 }) => {
92169
92386
  // ../../node_modules/.bun/better-call@1.3.2+3c5d820c62823f0b/node_modules/better-call/dist/endpoint.mjs
92170
92387
  init_error();
92171
92388
  function createEndpoint(pathOrOptions, handlerOrOptions, handlerOrNever) {
92172
- const path3 = typeof pathOrOptions === "string" ? pathOrOptions : undefined;
92389
+ const path4 = typeof pathOrOptions === "string" ? pathOrOptions : undefined;
92173
92390
  const options = typeof handlerOrOptions === "object" ? handlerOrOptions : pathOrOptions;
92174
92391
  const handler = typeof handlerOrOptions === "function" ? handlerOrOptions : handlerOrNever;
92175
92392
  if ((options.method === "GET" || options.method === "HEAD") && options.body)
92176
92393
  throw new BetterCallError("Body is not allowed with GET or HEAD methods");
92177
- if (path3 && /\/{2,}/.test(path3))
92394
+ if (path4 && /\/{2,}/.test(path4))
92178
92395
  throw new BetterCallError("Path cannot contain consecutive slashes");
92179
92396
  const internalHandler = async (...inputCtx) => {
92180
92397
  const context = inputCtx[0] || {};
92181
92398
  const { data: internalContext, error: validationError } = await tryCatch(createInternalContext(context, {
92182
92399
  options,
92183
- path: path3
92400
+ path: path4
92184
92401
  }));
92185
92402
  if (validationError) {
92186
92403
  if (!(validationError instanceof ValidationError3))
@@ -92223,12 +92440,12 @@ function createEndpoint(pathOrOptions, handlerOrOptions, handlerOrNever) {
92223
92440
  } : response;
92224
92441
  };
92225
92442
  internalHandler.options = options;
92226
- internalHandler.path = path3;
92443
+ internalHandler.path = path4;
92227
92444
  return internalHandler;
92228
92445
  }
92229
92446
  createEndpoint.create = (opts) => {
92230
- return (path3, options, handler) => {
92231
- return createEndpoint(path3, {
92447
+ return (path4, options, handler) => {
92448
+ return createEndpoint(path4, {
92232
92449
  ...options,
92233
92450
  use: [...options?.use || [], ...opts?.use || []]
92234
92451
  }, handler);
@@ -92284,12 +92501,12 @@ createMiddleware.create = (opts) => {
92284
92501
  return fn;
92285
92502
  };
92286
92503
 
92287
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/utils/is-api-error.mjs
92504
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/utils/is-api-error.mjs
92288
92505
  function isAPIError2(error48) {
92289
92506
  return error48 instanceof APIError || error48 instanceof APIError2 || error48?.name === "APIError";
92290
92507
  }
92291
92508
 
92292
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/auth/trusted-origins.mjs
92509
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/auth/trusted-origins.mjs
92293
92510
  var matchesOriginPattern = (url2, pattern, settings) => {
92294
92511
  if (url2.startsWith("/")) {
92295
92512
  if (settings?.allowRelativePaths)
@@ -92308,7 +92525,7 @@ var matchesOriginPattern = (url2, pattern, settings) => {
92308
92525
  return protocol === "http:" || protocol === "https:" || !protocol ? pattern === getOrigin(url2) : url2.startsWith(pattern);
92309
92526
  };
92310
92527
 
92311
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/api/middlewares/origin-check.mjs
92528
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/api/middlewares/origin-check.mjs
92312
92529
  init_error2();
92313
92530
 
92314
92531
  // ../../node_modules/.bun/@better-auth+core@1.5.5+9ce0b2c039e580c5/node_modules/@better-auth/core/dist/utils/url.mjs
@@ -92337,11 +92554,11 @@ var createAuthMiddleware = createMiddleware.create({ use: [optionsMiddleware, cr
92337
92554
  })] });
92338
92555
  var use = [optionsMiddleware];
92339
92556
  function createAuthEndpoint(pathOrOptions, handlerOrOptions, handlerOrNever) {
92340
- const path3 = typeof pathOrOptions === "string" ? pathOrOptions : undefined;
92557
+ const path4 = typeof pathOrOptions === "string" ? pathOrOptions : undefined;
92341
92558
  const options = typeof handlerOrOptions === "object" ? handlerOrOptions : pathOrOptions;
92342
92559
  const handler = typeof handlerOrOptions === "function" ? handlerOrOptions : handlerOrNever;
92343
- if (path3)
92344
- return createEndpoint(path3, {
92560
+ if (path4)
92561
+ return createEndpoint(path4, {
92345
92562
  ...options,
92346
92563
  use: [...options?.use || [], ...use]
92347
92564
  }, async (ctx) => runWithEndpointContext(ctx, () => handler(ctx)));
@@ -92363,7 +92580,7 @@ function deprecate(fn, message2, logger2) {
92363
92580
  };
92364
92581
  }
92365
92582
 
92366
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/api/middlewares/origin-check.mjs
92583
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/api/middlewares/origin-check.mjs
92367
92584
  function shouldSkipCSRFForBackwardCompat(ctx) {
92368
92585
  return ctx.context.skipOriginCheck === true && ctx.context.options.advanced?.disableCSRFCheck === undefined;
92369
92586
  }
@@ -92498,7 +92715,7 @@ async function validateFormCsrf(ctx) {
92498
92715
  }
92499
92716
  }
92500
92717
 
92501
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/utils/get-request-ip.mjs
92718
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/utils/get-request-ip.mjs
92502
92719
  init_env();
92503
92720
 
92504
92721
  // ../../node_modules/.bun/@better-auth+core@1.5.5+9ce0b2c039e580c5/node_modules/@better-auth/core/dist/utils/ip.mjs
@@ -92575,7 +92792,7 @@ function normalizeIP(ip, options = {}) {
92575
92792
  return normalizeIPv6(ip, options.ipv6Subnet || 64);
92576
92793
  }
92577
92794
 
92578
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/utils/get-request-ip.mjs
92795
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/utils/get-request-ip.mjs
92579
92796
  var LOCALHOST_IP = "127.0.0.1";
92580
92797
  function getIp(req, options) {
92581
92798
  if (options.advanced?.ipAddress?.disableIpTracking)
@@ -92595,13 +92812,13 @@ function getIp(req, options) {
92595
92812
  return null;
92596
92813
  }
92597
92814
 
92598
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/api/rate-limiter/index.mjs
92815
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/api/rate-limiter/index.mjs
92599
92816
  init_json();
92600
92817
 
92601
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/api/state/should-session-refresh.mjs
92818
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/api/state/should-session-refresh.mjs
92602
92819
  var { get: getShouldSkipSessionRefresh, set: setShouldSkipSessionRefresh } = defineRequestState(() => false);
92603
92820
 
92604
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/_virtual/_rolldown/runtime.mjs
92821
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/_virtual/_rolldown/runtime.mjs
92605
92822
  var __defProp3 = Object.defineProperty;
92606
92823
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
92607
92824
  var __getOwnPropNames2 = Object.getOwnPropertyNames;
@@ -92635,7 +92852,7 @@ var __copyProps = (to, from2, except, desc) => {
92635
92852
  };
92636
92853
  var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
92637
92854
 
92638
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/db/get-schema.mjs
92855
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/db/get-schema.mjs
92639
92856
  function getSchema(config3) {
92640
92857
  const tables = getAuthTables(config3);
92641
92858
  const schema = {};
@@ -92670,7 +92887,7 @@ function getSchema(config3) {
92670
92887
  return schema;
92671
92888
  }
92672
92889
 
92673
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/db/field-converter.mjs
92890
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/db/field-converter.mjs
92674
92891
  function convertToDB(fields, values) {
92675
92892
  const result = values.id ? { id: values.id } : {};
92676
92893
  for (const key in fields) {
@@ -92691,7 +92908,7 @@ function convertFromDB(fields, values) {
92691
92908
  return result;
92692
92909
  }
92693
92910
 
92694
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/db/with-hooks.mjs
92911
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/db/with-hooks.mjs
92695
92912
  function getWithHooks(adapter, ctx) {
92696
92913
  const hooks = ctx.hooks;
92697
92914
  async function createWithHooks(data2, model, customCreateFn) {
@@ -92864,7 +93081,7 @@ function getWithHooks(adapter, ctx) {
92864
93081
  };
92865
93082
  }
92866
93083
 
92867
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/db/verification-token-storage.mjs
93084
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/db/verification-token-storage.mjs
92868
93085
  var defaultKeyHasher = async (identifier) => {
92869
93086
  const hash4 = await createHash2("SHA-256").digest(new TextEncoder().encode(identifier));
92870
93087
  return base64Url.encode(new Uint8Array(hash4), { padding: false });
@@ -92892,7 +93109,7 @@ function getStorageOption(identifier, config3) {
92892
93109
  return config3;
92893
93110
  }
92894
93111
 
92895
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/db/internal-adapter.mjs
93112
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/db/internal-adapter.mjs
92896
93113
  init_id2();
92897
93114
  init_json();
92898
93115
  function getTTLSeconds(expiresAt, now4 = Date.now()) {
@@ -93569,7 +93786,7 @@ var createInternalAdapter = (adapter, ctx) => {
93569
93786
  };
93570
93787
  };
93571
93788
 
93572
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/db/to-zod.mjs
93789
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/db/to-zod.mjs
93573
93790
  init_zod();
93574
93791
  function toZodSchema({ fields, isClientSide }) {
93575
93792
  const zodFields = Object.keys(fields).reduce((acc, key) => {
@@ -93598,7 +93815,7 @@ function toZodSchema({ fields, isClientSide }) {
93598
93815
  }, {});
93599
93816
  return object(zodFields);
93600
93817
  }
93601
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/db/index.mjs
93818
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/db/index.mjs
93602
93819
  var db_exports = /* @__PURE__ */ __exportAll({
93603
93820
  convertFromDB: () => convertFromDB,
93604
93821
  convertToDB: () => convertToDB,
@@ -93619,7 +93836,7 @@ var db_exports = /* @__PURE__ */ __exportAll({
93619
93836
  });
93620
93837
  __reExport(db_exports, exports_db);
93621
93838
 
93622
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/api/routes/session.mjs
93839
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/api/routes/session.mjs
93623
93840
  init_error2();
93624
93841
  init_json();
93625
93842
  init_zod();
@@ -94038,7 +94255,7 @@ var revokeOtherSessions = createAuthEndpoint("/revoke-other-sessions", {
94038
94255
  return ctx.json({ status: true });
94039
94256
  });
94040
94257
 
94041
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/context/helpers.mjs
94258
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/context/helpers.mjs
94042
94259
  init_env();
94043
94260
  async function getAwaitableValue(arr, item) {
94044
94261
  if (!arr)
@@ -94050,7 +94267,7 @@ async function getAwaitableValue(arr, item) {
94050
94267
  }
94051
94268
  }
94052
94269
 
94053
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/oauth2/utils.mjs
94270
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/oauth2/utils.mjs
94054
94271
  function isLikelyEncrypted(token) {
94055
94272
  if (token.startsWith("$ba$"))
94056
94273
  return true;
@@ -94078,7 +94295,7 @@ function setTokenUtil(token, ctx) {
94078
94295
  return token;
94079
94296
  }
94080
94297
 
94081
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/api/routes/account.mjs
94298
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/api/routes/account.mjs
94082
94299
  init_error2();
94083
94300
 
94084
94301
  // ../../node_modules/.bun/@better-auth+core@1.5.5+9ce0b2c039e580c5/node_modules/@better-auth/core/dist/social-providers/apple.mjs
@@ -97187,7 +97404,7 @@ var socialProviders = {
97187
97404
  var socialProviderList = Object.keys(socialProviders);
97188
97405
  var SocialProviderListEnum = _enum2(socialProviderList).or(string2());
97189
97406
 
97190
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/api/routes/account.mjs
97407
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/api/routes/account.mjs
97191
97408
  init_zod();
97192
97409
  var listUserAccounts = createAuthEndpoint("/list-accounts", {
97193
97410
  method: "GET",
@@ -97703,7 +97920,7 @@ var accountInfo = createAuthEndpoint("/account-info", {
97703
97920
  return ctx.json(info2);
97704
97921
  });
97705
97922
 
97706
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/api/routes/email-verification.mjs
97923
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/api/routes/email-verification.mjs
97707
97924
  init_error2();
97708
97925
  init_zod();
97709
97926
  async function createEmailVerificationToken(secret, email3, updateTo, expiresIn = 3600, extraPayload) {
@@ -98006,7 +98223,7 @@ var verifyEmail = createAuthEndpoint("/verify-email", {
98006
98223
  });
98007
98224
  });
98008
98225
 
98009
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/oauth2/link-account.mjs
98226
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/oauth2/link-account.mjs
98010
98227
  init_env();
98011
98228
  async function handleOAuthUserInfo(c, opts) {
98012
98229
  const { userInfo, account: account3, callbackURL, disableSignUp, overrideUserInfo } = opts;
@@ -98151,7 +98368,7 @@ Error: `, e);
98151
98368
  };
98152
98369
  }
98153
98370
 
98154
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/api/routes/callback.mjs
98371
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/api/routes/callback.mjs
98155
98372
  init_json();
98156
98373
  init_zod();
98157
98374
  var schema = object({
@@ -98330,7 +98547,7 @@ var callbackOAuth = createAuthEndpoint("/callback/:id", {
98330
98547
  throw c.redirect(toRedirectTo);
98331
98548
  });
98332
98549
 
98333
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/api/routes/error.mjs
98550
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/api/routes/error.mjs
98334
98551
  init_env();
98335
98552
  function sanitize(input) {
98336
98553
  return input.replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#39;").replace(/&(?!amp;|lt;|gt;|quot;|#39;|#x[0-9a-fA-F]+;|#[0-9]+;)/g, "&amp;");
@@ -98713,7 +98930,7 @@ var error48 = createAuthEndpoint("/error", {
98713
98930
  return new Response(html(c.context.options, safeCode, safeDescription), { headers: { "Content-Type": "text/html" } });
98714
98931
  });
98715
98932
 
98716
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/api/routes/ok.mjs
98933
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/api/routes/ok.mjs
98717
98934
  var ok = createAuthEndpoint("/ok", {
98718
98935
  method: "GET",
98719
98936
  metadata: {
@@ -98737,7 +98954,7 @@ var ok = createAuthEndpoint("/ok", {
98737
98954
  return ctx.json({ ok: true });
98738
98955
  });
98739
98956
 
98740
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/utils/password.mjs
98957
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/utils/password.mjs
98741
98958
  init_error2();
98742
98959
  async function validatePassword(ctx, data2) {
98743
98960
  const credentialAccount = (await ctx.context.internalAdapter.findAccounts(data2.userId))?.find((account3) => account3.providerId === "credential");
@@ -98750,7 +98967,7 @@ async function validatePassword(ctx, data2) {
98750
98967
  });
98751
98968
  }
98752
98969
 
98753
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/api/routes/password.mjs
98970
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/api/routes/password.mjs
98754
98971
  init_error2();
98755
98972
  init_id2();
98756
98973
  init_zod();
@@ -98948,7 +99165,7 @@ var verifyPassword2 = createAuthEndpoint("/verify-password", {
98948
99165
  return ctx.json({ status: true });
98949
99166
  });
98950
99167
 
98951
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/api/routes/sign-in.mjs
99168
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/api/routes/sign-in.mjs
98952
99169
  init_error2();
98953
99170
  init_zod();
98954
99171
  var socialSignInBodySchema = object({
@@ -98977,7 +99194,7 @@ var socialSignInBodySchema = object({
98977
99194
  additionalData: record(string2(), any()).optional().meta({ description: "Additional data to be passed through the OAuth flow" })
98978
99195
  });
98979
99196
 
98980
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/api/routes/sign-out.mjs
99197
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/api/routes/sign-out.mjs
98981
99198
  var signOut = createAuthEndpoint("/sign-out", {
98982
99199
  method: "POST",
98983
99200
  operationId: "signOut",
@@ -99005,7 +99222,7 @@ var signOut = createAuthEndpoint("/sign-out", {
99005
99222
  return ctx.json({ success: true });
99006
99223
  });
99007
99224
 
99008
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/api/routes/sign-up.mjs
99225
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/api/routes/sign-up.mjs
99009
99226
  init_env();
99010
99227
  init_error2();
99011
99228
  init_id2();
@@ -99019,12 +99236,12 @@ var signUpEmailBodySchema = object({
99019
99236
  rememberMe: boolean2().optional()
99020
99237
  }).and(record(string2(), any()));
99021
99238
 
99022
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/api/routes/update-session.mjs
99239
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/api/routes/update-session.mjs
99023
99240
  init_error2();
99024
99241
  init_zod();
99025
99242
  var updateSessionBodySchema = record(string2().meta({ description: "Field name must be a string" }), any());
99026
99243
 
99027
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/api/routes/update-user.mjs
99244
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/api/routes/update-user.mjs
99028
99245
  init_error2();
99029
99246
  init_zod();
99030
99247
  var updateUserBodySchema = record(string2().meta({ description: "Field name must be a string" }), any());
@@ -99450,7 +99667,7 @@ var changeEmail = createAuthEndpoint("/change-email", {
99450
99667
  return ctx.json({ status: true });
99451
99668
  });
99452
99669
 
99453
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/api/to-auth-endpoints.mjs
99670
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/api/to-auth-endpoints.mjs
99454
99671
  init_env();
99455
99672
  init_error2();
99456
99673
  var defuReplaceArrays = createDefu((obj, key, value3) => {
@@ -99460,25 +99677,25 @@ var defuReplaceArrays = createDefu((obj, key, value3) => {
99460
99677
  }
99461
99678
  });
99462
99679
 
99463
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/api/index.mjs
99680
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/api/index.mjs
99464
99681
  init_env();
99465
99682
  init_error2();
99466
99683
 
99467
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/db/adapter-base.mjs
99684
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/db/adapter-base.mjs
99468
99685
  init_env();
99469
99686
 
99470
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/db/adapter-kysely.mjs
99687
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/db/adapter-kysely.mjs
99471
99688
  init_error2();
99472
99689
 
99473
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/db/get-migration.mjs
99690
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/db/get-migration.mjs
99474
99691
  init_env();
99475
99692
  init_dist();
99476
99693
  init_adapter();
99477
99694
 
99478
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/context/secret-utils.mjs
99695
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/context/secret-utils.mjs
99479
99696
  init_error2();
99480
99697
 
99481
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/context/create-context.mjs
99698
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/context/create-context.mjs
99482
99699
  init_env();
99483
99700
  init_error2();
99484
99701
  init_id2();
@@ -99487,14 +99704,14 @@ init_id2();
99487
99704
  init_env();
99488
99705
  init_random();
99489
99706
 
99490
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/context/init.mjs
99707
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/context/init.mjs
99491
99708
  init_error2();
99492
99709
  init_dist();
99493
99710
 
99494
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/auth/base.mjs
99711
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/auth/base.mjs
99495
99712
  init_error2();
99496
99713
 
99497
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/index.mjs
99714
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/index.mjs
99498
99715
  init_env();
99499
99716
  init_error2();
99500
99717
  init_error_codes();
@@ -99533,7 +99750,7 @@ var walletPasskeyClient = () => ({
99533
99750
  $ERROR_CODES: WALLET_PASSKEY_ERROR_CODES,
99534
99751
  atomListeners: [
99535
99752
  {
99536
- matcher: (path3) => path3.startsWith("/wallet/passkey/"),
99753
+ matcher: (path4) => path4.startsWith("/wallet/passkey/"),
99537
99754
  signal: "$sessionSignal"
99538
99755
  }
99539
99756
  ]
@@ -99546,7 +99763,7 @@ var walletPincodeClient = () => ({
99546
99763
  $ERROR_CODES: WALLET_PINCODE_ERROR_CODES,
99547
99764
  atomListeners: [
99548
99765
  {
99549
- matcher: (path3) => path3.startsWith("/wallet/pincode/"),
99766
+ matcher: (path4) => path4.startsWith("/wallet/pincode/"),
99550
99767
  signal: "$sessionSignal"
99551
99768
  }
99552
99769
  ]
@@ -99559,7 +99776,7 @@ var walletSecretCodesClient = () => ({
99559
99776
  $ERROR_CODES: WALLET_SECRET_CODES_ERROR_CODES,
99560
99777
  atomListeners: [
99561
99778
  {
99562
- matcher: (path3) => path3.startsWith("/wallet/secret-codes/"),
99779
+ matcher: (path4) => path4.startsWith("/wallet/secret-codes/"),
99563
99780
  signal: "$sessionSignal"
99564
99781
  }
99565
99782
  ]
@@ -99572,7 +99789,7 @@ var walletTwoFactorClient = () => ({
99572
99789
  $ERROR_CODES: WALLET_TWO_FACTOR_ERROR_CODES,
99573
99790
  atomListeners: [
99574
99791
  {
99575
- matcher: (path3) => path3.startsWith("/wallet/two-factor/"),
99792
+ matcher: (path4) => path4.startsWith("/wallet/two-factor/"),
99576
99793
  signal: "$sessionSignal"
99577
99794
  }
99578
99795
  ]