@settlemint/dalp-cli 2.1.7-main.23401987074 → 2.1.7-main.23402944471

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 +603 -377
  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.",
@@ -64444,12 +64661,21 @@ var ClaimHistoryEventValueSchema = exports_external.object({
64444
64661
  name: exports_external.string().meta({ description: "Parameter name from the event", examples: ["topic", "claimId", "issuer"] }),
64445
64662
  value: exports_external.string().meta({ description: "String representation of the parameter value", examples: ["1", "0x1234...", "true"] })
64446
64663
  });
64447
- var ClaimHistoryEventNameSchema = exports_external.enum(["ClaimAdded", "ClaimChanged", "ClaimRemoved", "ClaimRevoked"]);
64664
+ var ClaimHistoryEventNameSchema = exports_external.enum([
64665
+ "Approved",
64666
+ "ClaimAdded",
64667
+ "ClaimChanged",
64668
+ "ClaimRemoved",
64669
+ "ClaimRevoked",
64670
+ "Executed",
64671
+ "ExecutionFailed",
64672
+ "ExecutionRequested"
64673
+ ]);
64448
64674
  var ClaimHistoryEventSchema = exports_external.object({
64449
64675
  id: exports_external.string().meta({ description: "Unique identifier for the event", examples: ["evt-001", "evt-002"] }),
64450
64676
  eventName: ClaimHistoryEventNameSchema.meta({
64451
64677
  description: "Event name emitted by the identity contract",
64452
- examples: ["ClaimAdded", "ClaimRemoved"]
64678
+ examples: ["ClaimAdded", "ExecutionRequested"]
64453
64679
  }),
64454
64680
  txIndex: exports_external.string().meta({ description: "Transaction index within the block", examples: ["0", "1", "42"] }),
64455
64681
  blockNumber: exports_external.string().meta({ description: "Block number for the event", examples: ["12345678", "98765432"] }),
@@ -71117,7 +71343,7 @@ var list29 = v2Contract.route({
71117
71343
  successDescription: "Paginated list of feeds with latest values",
71118
71344
  tags: [...TAGS27]
71119
71345
  }).input(v2Input.query(FeedListInputSchema)).output(createSingleResponse(FeedListOutputSchema));
71120
- var resolve2 = v2Contract.route({
71346
+ var resolve22 = v2Contract.route({
71121
71347
  method: "GET",
71122
71348
  path: "/system/feeds/resolve",
71123
71349
  description: "Resolve the feed registered for a (subject, topic) pair via direct chain read with optional subgraph enrichment",
@@ -71228,7 +71454,7 @@ var adapterList2 = v2Contract.route({
71228
71454
  var feedsV2Contract = {
71229
71455
  capabilities: capabilities2,
71230
71456
  list: list29,
71231
- resolve: resolve2,
71457
+ resolve: resolve22,
71232
71458
  read: read23,
71233
71459
  registerExternal: registerExternal2,
71234
71460
  replace: replace2,
@@ -78998,7 +79224,7 @@ var timestampSerializer = {
78998
79224
  };
78999
79225
  var package_default = {
79000
79226
  name: "@settlemint/dalp-sdk",
79001
- version: "2.1.7-main.23401987074",
79227
+ version: "2.1.7-main.23402944471",
79002
79228
  private: false,
79003
79229
  description: "Fully typed SDK for the DALP tokenization platform API",
79004
79230
  homepage: "https://settlemint.com",
@@ -79141,7 +79367,7 @@ function createDalpClient(config3) {
79141
79367
  // package.json
79142
79368
  var package_default2 = {
79143
79369
  name: "@settlemint/dalp-cli",
79144
- version: "2.1.7-main.23401987074",
79370
+ version: "2.1.7-main.23402944471",
79145
79371
  private: false,
79146
79372
  description: "CLI for the Digital Asset Lifecycle Platform — manage tokens, identities, compliance, and more from the command line.",
79147
79373
  homepage: "https://settlemint.com",
@@ -79184,7 +79410,7 @@ var package_default2 = {
79184
79410
  "@core/validation": "workspace:*",
79185
79411
  "@dalp/auth": "workspace:*",
79186
79412
  "@settlemint/dalp-sdk": "workspace:*",
79187
- incur: "0.3.5"
79413
+ incur: "0.3.6"
79188
79414
  },
79189
79415
  devDependencies: {
79190
79416
  "@arethetypeswrong/cli": "0.18.2",
@@ -79226,10 +79452,10 @@ function createOrpcClient(apiUrl, credentials) {
79226
79452
 
79227
79453
  // src/lib/config.ts
79228
79454
  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");
79455
+ import { homedir as homedir4 } from "node:os";
79456
+ import { join as join4 } from "node:path";
79457
+ var CONFIG_DIR = join4(homedir4(), ".config", "dalp");
79458
+ var GLOBAL_CONFIG_FILE = join4(CONFIG_DIR, "config.json");
79233
79459
  var PROJECT_CONFIG_FILE = ".dalprc.json";
79234
79460
  var dalpConfigSchema = exports_external.object({
79235
79461
  apiUrl: exports_external.string().optional(),
@@ -79239,9 +79465,9 @@ var dalpConfigSchema = exports_external.object({
79239
79465
  function ensureConfigDir() {
79240
79466
  mkdirSync3(CONFIG_DIR, { recursive: true, mode: 448 });
79241
79467
  }
79242
- function loadJsonFile(path3) {
79468
+ function loadJsonFile(path4) {
79243
79469
  try {
79244
- return dalpConfigSchema.parse(JSON.parse(readFileSync3(path3, "utf8")));
79470
+ return dalpConfigSchema.parse(JSON.parse(readFileSync3(path4, "utf8")));
79245
79471
  } catch {
79246
79472
  return {};
79247
79473
  }
@@ -79250,7 +79476,7 @@ function loadGlobalConfig() {
79250
79476
  return loadJsonFile(GLOBAL_CONFIG_FILE);
79251
79477
  }
79252
79478
  function loadProjectConfig() {
79253
- return loadJsonFile(join3(process.cwd(), PROJECT_CONFIG_FILE));
79479
+ return loadJsonFile(join4(process.cwd(), PROJECT_CONFIG_FILE));
79254
79480
  }
79255
79481
  function resolveConfig(overrides = {}) {
79256
79482
  const globalConfig2 = loadGlobalConfig();
@@ -79276,9 +79502,9 @@ function saveGlobalConfig(updates) {
79276
79502
  // src/lib/credential-store.ts
79277
79503
  import { execFileSync } from "node:child_process";
79278
79504
  import { readFileSync as readFileSync4, writeFileSync as writeFileSync3, unlinkSync as unlinkSync2, statSync } from "node:fs";
79279
- import { join as join4 } from "node:path";
79505
+ import { join as join5 } from "node:path";
79280
79506
  var SERVICE_NAME = "dalp-cli";
79281
- var CREDENTIALS_FILE = join4(CONFIG_DIR, "credentials.json");
79507
+ var CREDENTIALS_FILE = join5(CONFIG_DIR, "credentials.json");
79282
79508
  var storedCredentialsSchema = exports_external.object({
79283
79509
  apiKey: exports_external.string(),
79284
79510
  apiKeyId: exports_external.string(),
@@ -80440,7 +80666,7 @@ Open this URL in your browser:
80440
80666
  });
80441
80667
  }
80442
80668
  const session = sessionResponseSchema.parse(await sessionResponse.json());
80443
- const hostname3 = await import("node:os").then((os4) => os4.hostname());
80669
+ const hostname3 = await import("node:os").then((os5) => os5.hostname());
80444
80670
  const apiKeyResponse = await fetch(`${apiUrl}/api/auth/api-key/create`, {
80445
80671
  method: "POST",
80446
80672
  headers: {
@@ -83066,7 +83292,7 @@ var whoamiCommand = exports_Cli.create("whoami", {
83066
83292
  }
83067
83293
  });
83068
83294
 
83069
- // ../../node_modules/.bun/@better-auth+api-key@1.5.5+3d9e5b39184acf8d/node_modules/@better-auth/api-key/dist/error-codes-vwTWW2ez.mjs
83295
+ // ../../node_modules/.bun/@better-auth+api-key@1.5.5+428b2a4c7223dcf4/node_modules/@better-auth/api-key/dist/error-codes-vwTWW2ez.mjs
83070
83296
  init_error_codes();
83071
83297
  var API_KEY_ERROR_CODES = defineErrorCodes({
83072
83298
  INVALID_METADATA_TYPE: "metadata must be an object or undefined",
@@ -83102,7 +83328,7 @@ var API_KEY_ERROR_CODES = defineErrorCodes({
83102
83328
  ORGANIZATION_PLUGIN_REQUIRED: "Organization plugin is required for organization-owned API keys. Please install and configure the organization plugin."
83103
83329
  });
83104
83330
 
83105
- // ../../node_modules/.bun/@better-auth+api-key@1.5.5+3d9e5b39184acf8d/node_modules/@better-auth/api-key/dist/client.mjs
83331
+ // ../../node_modules/.bun/@better-auth+api-key@1.5.5+428b2a4c7223dcf4/node_modules/@better-auth/api-key/dist/client.mjs
83106
83332
  var apiKeyClient = () => {
83107
83333
  return {
83108
83334
  id: "api-key",
@@ -83116,7 +83342,7 @@ var apiKeyClient = () => {
83116
83342
  };
83117
83343
  };
83118
83344
 
83119
- // ../../node_modules/.bun/@better-auth+passkey@1.5.5+3d9e5b39184acf8d/node_modules/@better-auth/passkey/dist/error-codes-Dvu2mv33.mjs
83345
+ // ../../node_modules/.bun/@better-auth+passkey@1.5.5+428b2a4c7223dcf4/node_modules/@better-auth/passkey/dist/error-codes-Dvu2mv33.mjs
83120
83346
  init_error_codes();
83121
83347
  var PASSKEY_ERROR_CODES = defineErrorCodes({
83122
83348
  CHALLENGE_NOT_FOUND: "Challenge not found",
@@ -83534,7 +83760,7 @@ async function startAuthentication(options) {
83534
83760
  authenticatorAttachment: toAuthenticatorAttachment(credential.authenticatorAttachment)
83535
83761
  };
83536
83762
  }
83537
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/client/broadcast-channel.mjs
83763
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/client/broadcast-channel.mjs
83538
83764
  var kBroadcastChannel = Symbol.for("better-auth:broadcast-channel");
83539
83765
  var now = () => Math.floor(Date.now() / 1000);
83540
83766
  var WindowBroadcastChannel = class {
@@ -83582,7 +83808,7 @@ function getGlobalBroadcastChannel(name = "better-auth.message") {
83582
83808
  return globalThis[kBroadcastChannel];
83583
83809
  }
83584
83810
 
83585
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/client/focus-manager.mjs
83811
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/client/focus-manager.mjs
83586
83812
  var kFocusManager = Symbol.for("better-auth:focus-manager");
83587
83813
  var WindowFocusManager = class {
83588
83814
  listeners = /* @__PURE__ */ new Set;
@@ -83614,7 +83840,7 @@ function getGlobalFocusManager() {
83614
83840
  return globalThis[kFocusManager];
83615
83841
  }
83616
83842
 
83617
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/client/online-manager.mjs
83843
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/client/online-manager.mjs
83618
83844
  var kOnlineManager = Symbol.for("better-auth:online-manager");
83619
83845
  var WindowOnlineManager = class {
83620
83846
  listeners = /* @__PURE__ */ new Set;
@@ -83648,7 +83874,7 @@ function getGlobalOnlineManager() {
83648
83874
  return globalThis[kOnlineManager];
83649
83875
  }
83650
83876
 
83651
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/client/parser.mjs
83877
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/client/parser.mjs
83652
83878
  var PROTO_POLLUTION_PATTERNS = {
83653
83879
  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
83880
  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 +84100,9 @@ var onMount = ($store, initialize) => {
83874
84100
  };
83875
84101
  });
83876
84102
  };
83877
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/client/query.mjs
84103
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/client/query.mjs
83878
84104
  var isServer = () => typeof window === "undefined";
83879
- var useAuthQuery = (initializedAtom, path3, $fetch, options) => {
84105
+ var useAuthQuery = (initializedAtom, path4, $fetch, options) => {
83880
84106
  const value3 = atom({
83881
84107
  data: null,
83882
84108
  error: null,
@@ -83891,7 +84117,7 @@ var useAuthQuery = (initializedAtom, path3, $fetch, options) => {
83891
84117
  error: value3.get().error,
83892
84118
  isPending: value3.get().isPending
83893
84119
  }) : options;
83894
- $fetch(path3, {
84120
+ $fetch(path4, {
83895
84121
  ...opts,
83896
84122
  query: {
83897
84123
  ...opts?.query,
@@ -83973,7 +84199,7 @@ var useAuthQuery = (initializedAtom, path3, $fetch, options) => {
83973
84199
  return value3;
83974
84200
  };
83975
84201
 
83976
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/client/session-refresh.mjs
84202
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/client/session-refresh.mjs
83977
84203
  var now2 = () => Math.floor(Date.now() / 1000);
83978
84204
  var FOCUS_REFETCH_RATE_LIMIT_SECONDS = 5;
83979
84205
  function createSessionRefreshManager(opts) {
@@ -84107,7 +84333,7 @@ function createSessionRefreshManager(opts) {
84107
84333
  };
84108
84334
  }
84109
84335
 
84110
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/utils/wildcard.mjs
84336
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/utils/wildcard.mjs
84111
84337
  function escapeRegExpChar(char) {
84112
84338
  if (char === "-" || char === "^" || char === "$" || char === "+" || char === "." || char === "(" || char === ")" || char === "|" || char === "[" || char === "]" || char === "{" || char === "}" || char === "*" || char === "?" || char === "\\")
84113
84339
  return `\\${char}`;
@@ -84205,7 +84431,7 @@ function wildcardMatch(pattern, options) {
84205
84431
  return fn;
84206
84432
  }
84207
84433
 
84208
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/utils/url.mjs
84434
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/utils/url.mjs
84209
84435
  init_env();
84210
84436
  init_error2();
84211
84437
  function checkHasPath(url2) {
@@ -84226,15 +84452,15 @@ function assertHasProtocol(url2) {
84226
84452
  throw new BetterAuthError(`Invalid base URL: ${url2}. Please provide a valid base URL.`, { cause: error48 });
84227
84453
  }
84228
84454
  }
84229
- function withPath(url2, path3 = "/api/auth") {
84455
+ function withPath(url2, path4 = "/api/auth") {
84230
84456
  assertHasProtocol(url2);
84231
84457
  if (checkHasPath(url2))
84232
84458
  return url2;
84233
84459
  const trimmedUrl = url2.replace(/\/+$/, "");
84234
- if (!path3 || path3 === "/")
84460
+ if (!path4 || path4 === "/")
84235
84461
  return trimmedUrl;
84236
- path3 = path3.startsWith("/") ? path3 : `/${path3}`;
84237
- return `${trimmedUrl}${path3}`;
84462
+ path4 = path4.startsWith("/") ? path4 : `/${path4}`;
84463
+ return `${trimmedUrl}${path4}`;
84238
84464
  }
84239
84465
  function validateProxyHeader(header, type2) {
84240
84466
  if (!header || header.trim() === "")
@@ -84257,30 +84483,30 @@ function validateProxyHeader(header, type2) {
84257
84483
  }
84258
84484
  return false;
84259
84485
  }
84260
- function getBaseURL(url2, path3, request, loadEnv, trustedProxyHeaders) {
84486
+ function getBaseURL(url2, path4, request, loadEnv, trustedProxyHeaders) {
84261
84487
  if (url2)
84262
- return withPath(url2, path3);
84488
+ return withPath(url2, path4);
84263
84489
  if (loadEnv !== false) {
84264
84490
  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
84491
  if (fromEnv)
84266
- return withPath(fromEnv, path3);
84492
+ return withPath(fromEnv, path4);
84267
84493
  }
84268
84494
  const fromRequest = request?.headers.get("x-forwarded-host");
84269
84495
  const fromRequestProto = request?.headers.get("x-forwarded-proto");
84270
84496
  if (fromRequest && fromRequestProto && trustedProxyHeaders) {
84271
84497
  if (validateProxyHeader(fromRequestProto, "proto") && validateProxyHeader(fromRequest, "host"))
84272
84498
  try {
84273
- return withPath(`${fromRequestProto}://${fromRequest}`, path3);
84499
+ return withPath(`${fromRequestProto}://${fromRequest}`, path4);
84274
84500
  } catch (_error) {}
84275
84501
  }
84276
84502
  if (request) {
84277
84503
  const url3 = getOrigin(request.url);
84278
84504
  if (!url3)
84279
84505
  throw new BetterAuthError("Could not get origin from request. Please provide a valid base URL.");
84280
- return withPath(url3, path3);
84506
+ return withPath(url3, path4);
84281
84507
  }
84282
84508
  if (typeof window !== "undefined" && window.location)
84283
- return withPath(window.location.origin, path3);
84509
+ return withPath(window.location.origin, path4);
84284
84510
  }
84285
84511
  function getOrigin(url2) {
84286
84512
  try {
@@ -84305,7 +84531,7 @@ function getHost(url2) {
84305
84531
  }
84306
84532
  }
84307
84533
 
84308
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/client/fetch-plugins.mjs
84534
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/client/fetch-plugins.mjs
84309
84535
  var redirectPlugin = {
84310
84536
  id: "redirect",
84311
84537
  name: "Redirect",
@@ -84321,7 +84547,7 @@ var redirectPlugin = {
84321
84547
  } }
84322
84548
  };
84323
84549
 
84324
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/client/session-atom.mjs
84550
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/client/session-atom.mjs
84325
84551
  function getSessionAtom($fetch, options) {
84326
84552
  const $signal = atom(false);
84327
84553
  const session = useAuthQuery($signal, "/get-session", $fetch, { method: "GET" });
@@ -84793,7 +85019,7 @@ function getURL2(url2, option) {
84793
85019
  }
84794
85020
  if (!basePath.endsWith("/"))
84795
85021
  basePath += "/";
84796
- let [path3, urlQuery] = url2.replace(basePath, "").split("?");
85022
+ let [path4, urlQuery] = url2.replace(basePath, "").split("?");
84797
85023
  const queryParams = new URLSearchParams(urlQuery);
84798
85024
  for (const [key, value3] of Object.entries(query || {})) {
84799
85025
  if (value3 == null)
@@ -84813,26 +85039,26 @@ function getURL2(url2, option) {
84813
85039
  }
84814
85040
  if (params) {
84815
85041
  if (Array.isArray(params)) {
84816
- const paramPaths = path3.split("/").filter((p) => p.startsWith(":"));
85042
+ const paramPaths = path4.split("/").filter((p) => p.startsWith(":"));
84817
85043
  for (const [index2, key] of paramPaths.entries()) {
84818
85044
  const value3 = params[index2];
84819
- path3 = path3.replace(key, value3);
85045
+ path4 = path4.replace(key, value3);
84820
85046
  }
84821
85047
  } else {
84822
85048
  for (const [key, value3] of Object.entries(params)) {
84823
- path3 = path3.replace(`:${key}`, String(value3));
85049
+ path4 = path4.replace(`:${key}`, String(value3));
84824
85050
  }
84825
85051
  }
84826
85052
  }
84827
- path3 = path3.split("/").map(encodeURIComponent).join("/");
84828
- if (path3.startsWith("/"))
84829
- path3 = path3.slice(1);
85053
+ path4 = path4.split("/").map(encodeURIComponent).join("/");
85054
+ if (path4.startsWith("/"))
85055
+ path4 = path4.slice(1);
84830
85056
  let queryParamString = queryParams.toString();
84831
85057
  queryParamString = queryParamString.length > 0 ? `?${queryParamString}`.replace(/\+/g, "%20") : "";
84832
85058
  if (!basePath.startsWith("http")) {
84833
- return `${basePath}${path3}${queryParamString}`;
85059
+ return `${basePath}${path4}${queryParamString}`;
84834
85060
  }
84835
- const _url2 = new URL(`${path3}${queryParamString}`, basePath);
85061
+ const _url2 = new URL(`${path4}${queryParamString}`, basePath);
84836
85062
  return _url2;
84837
85063
  }
84838
85064
  var betterFetch = async (url2, options) => {
@@ -84977,11 +85203,11 @@ var betterFetch = async (url2, options) => {
84977
85203
  };
84978
85204
  };
84979
85205
 
84980
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/client/config.mjs
85206
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/client/config.mjs
84981
85207
  var resolvePublicAuthUrl = (basePath) => {
84982
85208
  if (typeof process === "undefined")
84983
85209
  return;
84984
- const path3 = basePath ?? "/api/auth";
85210
+ const path4 = basePath ?? "/api/auth";
84985
85211
  if (process.env.NEXT_PUBLIC_AUTH_URL)
84986
85212
  return process.env.NEXT_PUBLIC_AUTH_URL;
84987
85213
  if (typeof window === "undefined") {
@@ -84992,7 +85218,7 @@ var resolvePublicAuthUrl = (basePath) => {
84992
85218
  if (process.env.VERCEL_URL)
84993
85219
  try {
84994
85220
  const protocol = process.env.VERCEL_URL.startsWith("http") ? "" : "https://";
84995
- return `${new URL(`${protocol}${process.env.VERCEL_URL}`).origin}${path3}`;
85221
+ return `${new URL(`${protocol}${process.env.VERCEL_URL}`).origin}${path4}`;
84996
85222
  } catch {}
84997
85223
  }
84998
85224
  };
@@ -85044,13 +85270,13 @@ var getClientConfig = (options, loadEnv) => {
85044
85270
  };
85045
85271
  const atomListeners = [{
85046
85272
  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";
85273
+ matcher(path4) {
85274
+ 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
85275
  },
85050
- callback(path3) {
85051
- if (path3 === "/sign-out")
85276
+ callback(path4) {
85277
+ if (path4 === "/sign-out")
85052
85278
  broadcastSessionUpdate("signout");
85053
- else if (path3 === "/update-user" || path3 === "/update-session")
85279
+ else if (path4 === "/update-user" || path4 === "/update-session")
85054
85280
  broadcastSessionUpdate("updateUser");
85055
85281
  }
85056
85282
  }];
@@ -85087,14 +85313,14 @@ var getClientConfig = (options, loadEnv) => {
85087
85313
  };
85088
85314
  };
85089
85315
 
85090
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/utils/is-atom.mjs
85316
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/utils/is-atom.mjs
85091
85317
  function isAtom(value3) {
85092
85318
  return typeof value3 === "object" && value3 !== null && "get" in value3 && typeof value3.get === "function" && "lc" in value3 && typeof value3.lc === "number";
85093
85319
  }
85094
85320
 
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];
85321
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/client/proxy.mjs
85322
+ function getMethod2(path4, knownPathMethods, args) {
85323
+ const method = knownPathMethods[path4];
85098
85324
  const { fetchOptions, query: _query, ...body } = args || {};
85099
85325
  if (method)
85100
85326
  return method;
@@ -85105,14 +85331,14 @@ function getMethod2(path3, knownPathMethods, args) {
85105
85331
  return "GET";
85106
85332
  }
85107
85333
  function createDynamicPathProxy(routes, client, knownPathMethods, atoms, atomListeners) {
85108
- function createProxy(path3 = []) {
85334
+ function createProxy(path4 = []) {
85109
85335
  return new Proxy(function() {}, {
85110
85336
  get(_, prop) {
85111
85337
  if (typeof prop !== "string")
85112
85338
  return;
85113
85339
  if (prop === "then" || prop === "catch" || prop === "finally")
85114
85340
  return;
85115
- const fullPath = [...path3, prop];
85341
+ const fullPath = [...path4, prop];
85116
85342
  let current = routes;
85117
85343
  for (const segment of fullPath)
85118
85344
  if (current && typeof current === "object" && segment in current)
@@ -85128,7 +85354,7 @@ function createDynamicPathProxy(routes, client, knownPathMethods, atoms, atomLis
85128
85354
  return createProxy(fullPath);
85129
85355
  },
85130
85356
  apply: async (_, __, args) => {
85131
- const routePath = "/" + path3.map((segment) => segment.replace(/[A-Z]/g, (letter) => `-${letter.toLowerCase()}`)).join("/");
85357
+ const routePath = "/" + path4.map((segment) => segment.replace(/[A-Z]/g, (letter) => `-${letter.toLowerCase()}`)).join("/");
85132
85358
  const arg = args[0] || {};
85133
85359
  const fetchOptions = args[1] || {};
85134
85360
  const { query, fetchOptions: argFetchOptions, ...body } = arg;
@@ -85174,7 +85400,7 @@ function createDynamicPathProxy(routes, client, knownPathMethods, atoms, atomLis
85174
85400
  return createProxy();
85175
85401
  }
85176
85402
 
85177
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/client/vanilla.mjs
85403
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/client/vanilla.mjs
85178
85404
  init_string2();
85179
85405
  function createAuthClient(options) {
85180
85406
  const { pluginPathMethods, pluginsActions, pluginsAtoms, $fetch, atomListeners, $store } = getClientConfig(options);
@@ -85189,7 +85415,7 @@ function createAuthClient(options) {
85189
85415
  }, $fetch, pluginPathMethods, pluginsAtoms, atomListeners);
85190
85416
  }
85191
85417
 
85192
- // ../../node_modules/.bun/@better-auth+passkey@1.5.5+3d9e5b39184acf8d/node_modules/@better-auth/passkey/dist/client.mjs
85418
+ // ../../node_modules/.bun/@better-auth+passkey@1.5.5+428b2a4c7223dcf4/node_modules/@better-auth/passkey/dist/client.mjs
85193
85419
  var getPasskeyActions = ($fetch, { $listPasskeys, $store }) => {
85194
85420
  const signInPasskey = async (opts, options) => {
85195
85421
  const response = await $fetch("/passkey/generate-authenticate-options", {
@@ -85324,19 +85550,19 @@ var passkeyClient = () => {
85324
85550
  "/passkey/authenticate": "POST"
85325
85551
  },
85326
85552
  atomListeners: [{
85327
- matcher(path3) {
85328
- return path3 === "/passkey/verify-registration" || path3 === "/passkey/delete-passkey" || path3 === "/passkey/update-passkey" || path3 === "/sign-out";
85553
+ matcher(path4) {
85554
+ return path4 === "/passkey/verify-registration" || path4 === "/passkey/delete-passkey" || path4 === "/passkey/update-passkey" || path4 === "/sign-out";
85329
85555
  },
85330
85556
  signal: "$listPasskeys"
85331
85557
  }, {
85332
- matcher: (path3) => path3 === "/passkey/verify-authentication",
85558
+ matcher: (path4) => path4 === "/passkey/verify-authentication",
85333
85559
  signal: "$sessionSignal"
85334
85560
  }],
85335
85561
  $ERROR_CODES: PASSKEY_ERROR_CODES
85336
85562
  };
85337
85563
  };
85338
85564
 
85339
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/plugins/additional-fields/client.mjs
85565
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/plugins/additional-fields/client.mjs
85340
85566
  var inferAdditionalFields = (schema) => {
85341
85567
  return {
85342
85568
  id: "additional-fields-client",
@@ -85344,7 +85570,7 @@ var inferAdditionalFields = (schema) => {
85344
85570
  };
85345
85571
  };
85346
85572
 
85347
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/plugins/admin/error-codes.mjs
85573
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/plugins/admin/error-codes.mjs
85348
85574
  init_error_codes();
85349
85575
  var ADMIN_ERROR_CODES = defineErrorCodes({
85350
85576
  FAILED_TO_CREATE_USER: "Failed to create user",
@@ -85370,7 +85596,7 @@ var ADMIN_ERROR_CODES = defineErrorCodes({
85370
85596
  INVALID_ROLE_TYPE: "Invalid role type"
85371
85597
  });
85372
85598
 
85373
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/plugins/access/access.mjs
85599
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/plugins/access/access.mjs
85374
85600
  init_error2();
85375
85601
  function role(statements) {
85376
85602
  return {
@@ -85420,7 +85646,7 @@ function createAccessControl(s) {
85420
85646
  };
85421
85647
  }
85422
85648
 
85423
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/plugins/admin/access/statement.mjs
85649
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/plugins/admin/access/statement.mjs
85424
85650
  var defaultStatements = {
85425
85651
  user: [
85426
85652
  "create",
@@ -85468,7 +85694,7 @@ var defaultRoles = {
85468
85694
  user: userAc
85469
85695
  };
85470
85696
 
85471
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/plugins/admin/has-permission.mjs
85697
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/plugins/admin/has-permission.mjs
85472
85698
  var hasPermission = (input) => {
85473
85699
  if (input.userId && input.options?.adminUserIds?.includes(input.userId))
85474
85700
  return true;
@@ -85482,7 +85708,7 @@ var hasPermission = (input) => {
85482
85708
  return false;
85483
85709
  };
85484
85710
 
85485
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/plugins/admin/client.mjs
85711
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/plugins/admin/client.mjs
85486
85712
  var adminClient = (options) => {
85487
85713
  const roles3 = {
85488
85714
  admin: adminAc,
@@ -85510,7 +85736,7 @@ var adminClient = (options) => {
85510
85736
  };
85511
85737
  };
85512
85738
 
85513
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/plugins/anonymous/error-codes.mjs
85739
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/plugins/anonymous/error-codes.mjs
85514
85740
  init_error_codes();
85515
85741
  var ANONYMOUS_ERROR_CODES = defineErrorCodes({
85516
85742
  INVALID_EMAIL_FORMAT: "Email was not generated in a valid format",
@@ -85522,7 +85748,7 @@ var ANONYMOUS_ERROR_CODES = defineErrorCodes({
85522
85748
  DELETE_ANONYMOUS_USER_DISABLED: "Deleting anonymous users is disabled"
85523
85749
  });
85524
85750
 
85525
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/client/plugins/infer-plugin.mjs
85751
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/client/plugins/infer-plugin.mjs
85526
85752
  var InferServerPlugin = () => {
85527
85753
  return {
85528
85754
  id: "infer-server-plugin",
@@ -85530,12 +85756,12 @@ var InferServerPlugin = () => {
85530
85756
  };
85531
85757
  };
85532
85758
 
85533
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/plugins/custom-session/client.mjs
85759
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/plugins/custom-session/client.mjs
85534
85760
  var customSessionClient = () => {
85535
85761
  return InferServerPlugin();
85536
85762
  };
85537
85763
 
85538
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/plugins/device-authorization/client.mjs
85764
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/plugins/device-authorization/client.mjs
85539
85765
  var deviceAuthorizationClient = () => {
85540
85766
  return {
85541
85767
  id: "device-authorization",
@@ -85550,7 +85776,7 @@ var deviceAuthorizationClient = () => {
85550
85776
  };
85551
85777
  };
85552
85778
 
85553
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/plugins/email-otp/error-codes.mjs
85779
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/plugins/email-otp/error-codes.mjs
85554
85780
  init_error_codes();
85555
85781
  var EMAIL_OTP_ERROR_CODES = defineErrorCodes({
85556
85782
  OTP_EXPIRED: "OTP expired",
@@ -85558,7 +85784,7 @@ var EMAIL_OTP_ERROR_CODES = defineErrorCodes({
85558
85784
  TOO_MANY_ATTEMPTS: "Too many attempts"
85559
85785
  });
85560
85786
 
85561
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/plugins/generic-oauth/error-codes.mjs
85787
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/plugins/generic-oauth/error-codes.mjs
85562
85788
  init_error_codes();
85563
85789
  var GENERIC_OAUTH_ERROR_CODES = defineErrorCodes({
85564
85790
  INVALID_OAUTH_CONFIGURATION: "Invalid OAuth configuration",
@@ -85571,11 +85797,11 @@ var GENERIC_OAUTH_ERROR_CODES = defineErrorCodes({
85571
85797
  ISSUER_MISSING: "OAuth issuer parameter missing. The authorization server did not include the required iss parameter (RFC 9207)."
85572
85798
  });
85573
85799
 
85574
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/plugins/multi-session/error-codes.mjs
85800
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/plugins/multi-session/error-codes.mjs
85575
85801
  init_error_codes();
85576
85802
  var MULTI_SESSION_ERROR_CODES = defineErrorCodes({ INVALID_SESSION_TOKEN: "Invalid session token" });
85577
85803
 
85578
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/plugins/organization/error-codes.mjs
85804
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/plugins/organization/error-codes.mjs
85579
85805
  init_error_codes();
85580
85806
  var ORGANIZATION_ERROR_CODES = defineErrorCodes({
85581
85807
  YOU_ARE_NOT_ALLOWED_TO_CREATE_A_NEW_ORGANIZATION: "You are not allowed to create a new organization",
@@ -85637,7 +85863,7 @@ var ORGANIZATION_ERROR_CODES = defineErrorCodes({
85637
85863
  ROLE_IS_ASSIGNED_TO_MEMBERS: "Cannot delete a role that is assigned to members. Please reassign the members to a different role first"
85638
85864
  });
85639
85865
 
85640
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/plugins/organization/access/statement.mjs
85866
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/plugins/organization/access/statement.mjs
85641
85867
  var defaultStatements2 = {
85642
85868
  organization: ["update", "delete"],
85643
85869
  member: [
@@ -85712,7 +85938,7 @@ var defaultRoles2 = {
85712
85938
  member: memberAc
85713
85939
  };
85714
85940
 
85715
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/plugins/organization/permission.mjs
85941
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/plugins/organization/permission.mjs
85716
85942
  var hasPermissionFn = (input, acRoles) => {
85717
85943
  if (!input.permissions)
85718
85944
  return false;
@@ -85728,7 +85954,7 @@ var hasPermissionFn = (input, acRoles) => {
85728
85954
  return false;
85729
85955
  };
85730
85956
 
85731
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/plugins/organization/client.mjs
85957
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/plugins/organization/client.mjs
85732
85958
  var clientSideHasPermission = (input) => {
85733
85959
  return hasPermissionFn(input, input.options.roles || defaultRoles2);
85734
85960
  };
@@ -85784,32 +86010,32 @@ var organizationClient = (options) => {
85784
86010
  },
85785
86011
  atomListeners: [
85786
86012
  {
85787
- matcher(path3) {
85788
- return path3 === "/organization/create" || path3 === "/organization/delete" || path3 === "/organization/update";
86013
+ matcher(path4) {
86014
+ return path4 === "/organization/create" || path4 === "/organization/delete" || path4 === "/organization/update";
85789
86015
  },
85790
86016
  signal: "$listOrg"
85791
86017
  },
85792
86018
  {
85793
- matcher(path3) {
85794
- return path3.startsWith("/organization");
86019
+ matcher(path4) {
86020
+ return path4.startsWith("/organization");
85795
86021
  },
85796
86022
  signal: "$activeOrgSignal"
85797
86023
  },
85798
86024
  {
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";
86025
+ matcher(path4) {
86026
+ return path4.startsWith("/organization/set-active") || path4 === "/organization/create" || path4 === "/organization/delete" || path4 === "/organization/remove-member" || path4 === "/organization/leave" || path4 === "/organization/accept-invitation";
85801
86027
  },
85802
86028
  signal: "$sessionSignal"
85803
86029
  },
85804
86030
  {
85805
- matcher(path3) {
85806
- return path3.includes("/organization/update-member-role") || path3.startsWith("/organization/set-active");
86031
+ matcher(path4) {
86032
+ return path4.includes("/organization/update-member-role") || path4.startsWith("/organization/set-active");
85807
86033
  },
85808
86034
  signal: "$activeMemberSignal"
85809
86035
  },
85810
86036
  {
85811
- matcher(path3) {
85812
- return path3.includes("/organization/update-member-role") || path3.startsWith("/organization/set-active");
86037
+ matcher(path4) {
86038
+ return path4.includes("/organization/update-member-role") || path4.startsWith("/organization/set-active");
85813
86039
  },
85814
86040
  signal: "$activeMemberRoleSignal"
85815
86041
  }
@@ -85818,7 +86044,7 @@ var organizationClient = (options) => {
85818
86044
  };
85819
86045
  };
85820
86046
 
85821
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/plugins/phone-number/error-codes.mjs
86047
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/plugins/phone-number/error-codes.mjs
85822
86048
  init_error_codes();
85823
86049
  var PHONE_NUMBER_ERROR_CODES = defineErrorCodes({
85824
86050
  INVALID_PHONE_NUMBER: "Invalid phone number",
@@ -85835,7 +86061,7 @@ var PHONE_NUMBER_ERROR_CODES = defineErrorCodes({
85835
86061
  TOO_MANY_ATTEMPTS: "Too many attempts"
85836
86062
  });
85837
86063
 
85838
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/plugins/two-factor/error-code.mjs
86064
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/plugins/two-factor/error-code.mjs
85839
86065
  init_error_codes();
85840
86066
  var TWO_FACTOR_ERROR_CODES = defineErrorCodes({
85841
86067
  OTP_NOT_ENABLED: "OTP not enabled",
@@ -85849,13 +86075,13 @@ var TWO_FACTOR_ERROR_CODES = defineErrorCodes({
85849
86075
  INVALID_TWO_FACTOR_COOKIE: "Invalid two factor cookie"
85850
86076
  });
85851
86077
 
85852
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/plugins/two-factor/client.mjs
86078
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/plugins/two-factor/client.mjs
85853
86079
  var twoFactorClient = (options) => {
85854
86080
  return {
85855
86081
  id: "two-factor",
85856
86082
  $InferServerPlugin: {},
85857
86083
  atomListeners: [{
85858
- matcher: (path3) => path3.startsWith("/two-factor/"),
86084
+ matcher: (path4) => path4.startsWith("/two-factor/"),
85859
86085
  signal: "$sessionSignal"
85860
86086
  }],
85861
86087
  pathMethods: {
@@ -85882,7 +86108,7 @@ var twoFactorClient = (options) => {
85882
86108
  };
85883
86109
  };
85884
86110
 
85885
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/plugins/username/error-codes.mjs
86111
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/plugins/username/error-codes.mjs
85886
86112
  init_error_codes();
85887
86113
  var USERNAME_ERROR_CODES = defineErrorCodes({
85888
86114
  INVALID_USERNAME_OR_PASSWORD: "Invalid username or password",
@@ -85895,7 +86121,7 @@ var USERNAME_ERROR_CODES = defineErrorCodes({
85895
86121
  INVALID_DISPLAY_USERNAME: "Display username is invalid"
85896
86122
  });
85897
86123
 
85898
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/crypto/random.mjs
86124
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/crypto/random.mjs
85899
86125
  init_random();
85900
86126
  var generateRandomString = createRandomStringGenerator("a-z", "0-9", "A-Z", "-_");
85901
86127
 
@@ -89673,7 +89899,7 @@ function decodeJwt(jwt2) {
89673
89899
  throw new JWTInvalid("Invalid JWT Claims Set");
89674
89900
  return result;
89675
89901
  }
89676
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/crypto/jwt.mjs
89902
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/crypto/jwt.mjs
89677
89903
  async function signJWT(payload, secret, expiresIn = 3600) {
89678
89904
  return await new SignJWT(payload).setProtectedHeader({ alg: "HS256" }).setIssuedAt().setExpirationTime(Math.floor(Date.now() / 1000) + expiresIn).sign(new TextEncoder().encode(secret));
89679
89905
  }
@@ -89821,7 +90047,7 @@ async function symmetricDecodeJWT(token, secret, salt) {
89821
90047
  }
89822
90048
  }
89823
90049
 
89824
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/crypto/password.mjs
90050
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/crypto/password.mjs
89825
90051
  init_error2();
89826
90052
 
89827
90053
  // ../../node_modules/.bun/@better-auth+utils@0.3.1/node_modules/@better-auth/utils/dist/hex.mjs
@@ -90793,7 +91019,7 @@ var _poly1305_aead = (xorStream) => (key, nonce3, AAD) => {
90793
91019
  var chacha20poly1305 = /* @__PURE__ */ wrapCipher({ blockSize: 64, nonceLength: 12, tagLength: 16 }, _poly1305_aead(chacha20));
90794
91020
  var xchacha20poly1305 = /* @__PURE__ */ wrapCipher({ blockSize: 64, nonceLength: 24, tagLength: 16 }, _poly1305_aead(xchacha20));
90795
91021
 
90796
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/crypto/index.mjs
91022
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/crypto/index.mjs
90797
91023
  var ENVELOPE_PREFIX = "$ba$";
90798
91024
  function parseEnvelope(data2) {
90799
91025
  if (!data2.startsWith(ENVELOPE_PREFIX))
@@ -90848,7 +91074,7 @@ var symmetricDecrypt = async ({ key, data: data2 }) => {
90848
91074
  throw new Error("Cannot decrypt legacy bare-hex payload: no legacy secret available. Set BETTER_AUTH_SECRET for backwards compatibility.");
90849
91075
  };
90850
91076
 
90851
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/utils/date.mjs
91077
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/utils/date.mjs
90852
91078
  var getDate = (span, unit = "ms") => {
90853
91079
  return new Date(Date.now() + (unit === "sec" ? span * 1000 : span));
90854
91080
  };
@@ -90924,7 +91150,7 @@ var verificationSchema = coreSchema.extend({
90924
91150
  identifier: string2()
90925
91151
  });
90926
91152
 
90927
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/db/schema.mjs
91153
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/db/schema.mjs
90928
91154
  init_error2();
90929
91155
 
90930
91156
  // ../../node_modules/.bun/@better-auth+core@1.5.5+9ce0b2c039e580c5/node_modules/@better-auth/core/dist/utils/db.mjs
@@ -90938,7 +91164,7 @@ function filterOutputFields(data2, additionalFields) {
90938
91164
  }), {});
90939
91165
  }
90940
91166
 
90941
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/db/schema.mjs
91167
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/db/schema.mjs
90942
91168
  var cache2 = /* @__PURE__ */ new WeakMap;
90943
91169
  function getFields(options, modelName, mode) {
90944
91170
  const cacheKey = `${modelName}:${mode}`;
@@ -91071,12 +91297,12 @@ function mergeSchema(schema, newSchema) {
91071
91297
  return schema;
91072
91298
  }
91073
91299
 
91074
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/utils/is-promise.mjs
91300
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/utils/is-promise.mjs
91075
91301
  function isPromise(obj) {
91076
91302
  return !!obj && (typeof obj === "object" || typeof obj === "function") && typeof obj.then === "function";
91077
91303
  }
91078
91304
 
91079
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/cookies/session-store.mjs
91305
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/cookies/session-store.mjs
91080
91306
  init_json();
91081
91307
  init_zod();
91082
91308
  var ALLOWED_COOKIE_SIZE = 4096;
@@ -91260,7 +91486,7 @@ var getSessionQuerySchema = optional(object({
91260
91486
  disableRefresh: exports_coerce.boolean().meta({ description: "Disable session refresh. Useful for checking session status, without updating the session" }).optional()
91261
91487
  }));
91262
91488
 
91263
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/utils/time.mjs
91489
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/utils/time.mjs
91264
91490
  var SEC = 1000;
91265
91491
  var MIN = SEC * 60;
91266
91492
  var HOUR = MIN * 60;
@@ -91269,7 +91495,7 @@ var WEEK = DAY * 7;
91269
91495
  var MONTH = DAY * 30;
91270
91496
  var YEAR = DAY * 365.25;
91271
91497
 
91272
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/cookies/index.mjs
91498
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/cookies/index.mjs
91273
91499
  init_env();
91274
91500
  init_error2();
91275
91501
  init_json();
@@ -91325,7 +91551,7 @@ var createHMAC = (algorithm = "SHA-256", encoding = "none") => {
91325
91551
  return hmac2;
91326
91552
  };
91327
91553
 
91328
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/cookies/index.mjs
91554
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/cookies/index.mjs
91329
91555
  async function setCookieCache(ctx, session, dontRememberMe) {
91330
91556
  if (!ctx.context.options.session?.cookieCache?.enabled)
91331
91557
  return;
@@ -91424,7 +91650,7 @@ function deleteSessionCookie(ctx, skipDontRememberMe) {
91424
91650
  expireCookie(ctx, ctx.context.authCookies.dontRememberToken);
91425
91651
  }
91426
91652
 
91427
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/state.mjs
91653
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/state.mjs
91428
91654
  init_error2();
91429
91655
  init_zod();
91430
91656
  var stateDataSchema = looseObject({
@@ -91683,10 +91909,10 @@ var queueAfterTransactionHook = async (hook) => {
91683
91909
  });
91684
91910
  };
91685
91911
 
91686
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/api/state/oauth.mjs
91912
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/api/state/oauth.mjs
91687
91913
  var { get: getOAuthState, set: setOAuthState } = defineRequestState(() => null);
91688
91914
 
91689
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/oauth2/state.mjs
91915
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/oauth2/state.mjs
91690
91916
  init_error2();
91691
91917
  async function generateState(c, link, additionalData) {
91692
91918
  const callbackURL = c.body?.callbackURL || c.context.options.baseURL;
@@ -91733,10 +91959,10 @@ async function parseState(c) {
91733
91959
  return parsedData;
91734
91960
  }
91735
91961
 
91736
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/utils/hide-metadata.mjs
91962
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/utils/hide-metadata.mjs
91737
91963
  var HIDE_METADATA = { scope: "server" };
91738
91964
 
91739
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/utils/is-api-error.mjs
91965
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/utils/is-api-error.mjs
91740
91966
  init_error2();
91741
91967
 
91742
91968
  // ../../node_modules/.bun/better-call@1.3.2+3c5d820c62823f0b/node_modules/better-call/dist/index.mjs
@@ -92066,7 +92292,7 @@ function fromError(error48, validating) {
92066
92292
  }
92067
92293
 
92068
92294
  // ../../node_modules/.bun/better-call@1.3.2+3c5d820c62823f0b/node_modules/better-call/dist/context.mjs
92069
- var createInternalContext = async (context, { options, path: path3 }) => {
92295
+ var createInternalContext = async (context, { options, path: path4 }) => {
92070
92296
  const headers = new Headers;
92071
92297
  let responseStatus = undefined;
92072
92298
  const { data: data2, error: error48 } = await runValidation(options, context);
@@ -92079,7 +92305,7 @@ var createInternalContext = async (context, { options, path: path3 }) => {
92079
92305
  ...context,
92080
92306
  body: data2.body,
92081
92307
  query: data2.query,
92082
- path: context.path || path3 || "virtual:",
92308
+ path: context.path || path4 || "virtual:",
92083
92309
  context: "context" in context && context.context ? context.context : {},
92084
92310
  returned: undefined,
92085
92311
  headers: context?.headers,
@@ -92169,18 +92395,18 @@ var createInternalContext = async (context, { options, path: path3 }) => {
92169
92395
  // ../../node_modules/.bun/better-call@1.3.2+3c5d820c62823f0b/node_modules/better-call/dist/endpoint.mjs
92170
92396
  init_error();
92171
92397
  function createEndpoint(pathOrOptions, handlerOrOptions, handlerOrNever) {
92172
- const path3 = typeof pathOrOptions === "string" ? pathOrOptions : undefined;
92398
+ const path4 = typeof pathOrOptions === "string" ? pathOrOptions : undefined;
92173
92399
  const options = typeof handlerOrOptions === "object" ? handlerOrOptions : pathOrOptions;
92174
92400
  const handler = typeof handlerOrOptions === "function" ? handlerOrOptions : handlerOrNever;
92175
92401
  if ((options.method === "GET" || options.method === "HEAD") && options.body)
92176
92402
  throw new BetterCallError("Body is not allowed with GET or HEAD methods");
92177
- if (path3 && /\/{2,}/.test(path3))
92403
+ if (path4 && /\/{2,}/.test(path4))
92178
92404
  throw new BetterCallError("Path cannot contain consecutive slashes");
92179
92405
  const internalHandler = async (...inputCtx) => {
92180
92406
  const context = inputCtx[0] || {};
92181
92407
  const { data: internalContext, error: validationError } = await tryCatch(createInternalContext(context, {
92182
92408
  options,
92183
- path: path3
92409
+ path: path4
92184
92410
  }));
92185
92411
  if (validationError) {
92186
92412
  if (!(validationError instanceof ValidationError3))
@@ -92223,12 +92449,12 @@ function createEndpoint(pathOrOptions, handlerOrOptions, handlerOrNever) {
92223
92449
  } : response;
92224
92450
  };
92225
92451
  internalHandler.options = options;
92226
- internalHandler.path = path3;
92452
+ internalHandler.path = path4;
92227
92453
  return internalHandler;
92228
92454
  }
92229
92455
  createEndpoint.create = (opts) => {
92230
- return (path3, options, handler) => {
92231
- return createEndpoint(path3, {
92456
+ return (path4, options, handler) => {
92457
+ return createEndpoint(path4, {
92232
92458
  ...options,
92233
92459
  use: [...options?.use || [], ...opts?.use || []]
92234
92460
  }, handler);
@@ -92284,12 +92510,12 @@ createMiddleware.create = (opts) => {
92284
92510
  return fn;
92285
92511
  };
92286
92512
 
92287
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/utils/is-api-error.mjs
92513
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/utils/is-api-error.mjs
92288
92514
  function isAPIError2(error48) {
92289
92515
  return error48 instanceof APIError || error48 instanceof APIError2 || error48?.name === "APIError";
92290
92516
  }
92291
92517
 
92292
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/auth/trusted-origins.mjs
92518
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/auth/trusted-origins.mjs
92293
92519
  var matchesOriginPattern = (url2, pattern, settings) => {
92294
92520
  if (url2.startsWith("/")) {
92295
92521
  if (settings?.allowRelativePaths)
@@ -92308,7 +92534,7 @@ var matchesOriginPattern = (url2, pattern, settings) => {
92308
92534
  return protocol === "http:" || protocol === "https:" || !protocol ? pattern === getOrigin(url2) : url2.startsWith(pattern);
92309
92535
  };
92310
92536
 
92311
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/api/middlewares/origin-check.mjs
92537
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/api/middlewares/origin-check.mjs
92312
92538
  init_error2();
92313
92539
 
92314
92540
  // ../../node_modules/.bun/@better-auth+core@1.5.5+9ce0b2c039e580c5/node_modules/@better-auth/core/dist/utils/url.mjs
@@ -92337,11 +92563,11 @@ var createAuthMiddleware = createMiddleware.create({ use: [optionsMiddleware, cr
92337
92563
  })] });
92338
92564
  var use = [optionsMiddleware];
92339
92565
  function createAuthEndpoint(pathOrOptions, handlerOrOptions, handlerOrNever) {
92340
- const path3 = typeof pathOrOptions === "string" ? pathOrOptions : undefined;
92566
+ const path4 = typeof pathOrOptions === "string" ? pathOrOptions : undefined;
92341
92567
  const options = typeof handlerOrOptions === "object" ? handlerOrOptions : pathOrOptions;
92342
92568
  const handler = typeof handlerOrOptions === "function" ? handlerOrOptions : handlerOrNever;
92343
- if (path3)
92344
- return createEndpoint(path3, {
92569
+ if (path4)
92570
+ return createEndpoint(path4, {
92345
92571
  ...options,
92346
92572
  use: [...options?.use || [], ...use]
92347
92573
  }, async (ctx) => runWithEndpointContext(ctx, () => handler(ctx)));
@@ -92363,7 +92589,7 @@ function deprecate(fn, message2, logger2) {
92363
92589
  };
92364
92590
  }
92365
92591
 
92366
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/api/middlewares/origin-check.mjs
92592
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/api/middlewares/origin-check.mjs
92367
92593
  function shouldSkipCSRFForBackwardCompat(ctx) {
92368
92594
  return ctx.context.skipOriginCheck === true && ctx.context.options.advanced?.disableCSRFCheck === undefined;
92369
92595
  }
@@ -92498,7 +92724,7 @@ async function validateFormCsrf(ctx) {
92498
92724
  }
92499
92725
  }
92500
92726
 
92501
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/utils/get-request-ip.mjs
92727
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/utils/get-request-ip.mjs
92502
92728
  init_env();
92503
92729
 
92504
92730
  // ../../node_modules/.bun/@better-auth+core@1.5.5+9ce0b2c039e580c5/node_modules/@better-auth/core/dist/utils/ip.mjs
@@ -92575,7 +92801,7 @@ function normalizeIP(ip, options = {}) {
92575
92801
  return normalizeIPv6(ip, options.ipv6Subnet || 64);
92576
92802
  }
92577
92803
 
92578
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/utils/get-request-ip.mjs
92804
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/utils/get-request-ip.mjs
92579
92805
  var LOCALHOST_IP = "127.0.0.1";
92580
92806
  function getIp(req, options) {
92581
92807
  if (options.advanced?.ipAddress?.disableIpTracking)
@@ -92595,13 +92821,13 @@ function getIp(req, options) {
92595
92821
  return null;
92596
92822
  }
92597
92823
 
92598
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/api/rate-limiter/index.mjs
92824
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/api/rate-limiter/index.mjs
92599
92825
  init_json();
92600
92826
 
92601
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/api/state/should-session-refresh.mjs
92827
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/api/state/should-session-refresh.mjs
92602
92828
  var { get: getShouldSkipSessionRefresh, set: setShouldSkipSessionRefresh } = defineRequestState(() => false);
92603
92829
 
92604
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/_virtual/_rolldown/runtime.mjs
92830
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/_virtual/_rolldown/runtime.mjs
92605
92831
  var __defProp3 = Object.defineProperty;
92606
92832
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
92607
92833
  var __getOwnPropNames2 = Object.getOwnPropertyNames;
@@ -92635,7 +92861,7 @@ var __copyProps = (to, from2, except, desc) => {
92635
92861
  };
92636
92862
  var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
92637
92863
 
92638
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/db/get-schema.mjs
92864
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/db/get-schema.mjs
92639
92865
  function getSchema(config3) {
92640
92866
  const tables = getAuthTables(config3);
92641
92867
  const schema = {};
@@ -92670,7 +92896,7 @@ function getSchema(config3) {
92670
92896
  return schema;
92671
92897
  }
92672
92898
 
92673
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/db/field-converter.mjs
92899
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/db/field-converter.mjs
92674
92900
  function convertToDB(fields, values) {
92675
92901
  const result = values.id ? { id: values.id } : {};
92676
92902
  for (const key in fields) {
@@ -92691,7 +92917,7 @@ function convertFromDB(fields, values) {
92691
92917
  return result;
92692
92918
  }
92693
92919
 
92694
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/db/with-hooks.mjs
92920
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/db/with-hooks.mjs
92695
92921
  function getWithHooks(adapter, ctx) {
92696
92922
  const hooks = ctx.hooks;
92697
92923
  async function createWithHooks(data2, model, customCreateFn) {
@@ -92864,7 +93090,7 @@ function getWithHooks(adapter, ctx) {
92864
93090
  };
92865
93091
  }
92866
93092
 
92867
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/db/verification-token-storage.mjs
93093
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/db/verification-token-storage.mjs
92868
93094
  var defaultKeyHasher = async (identifier) => {
92869
93095
  const hash4 = await createHash2("SHA-256").digest(new TextEncoder().encode(identifier));
92870
93096
  return base64Url.encode(new Uint8Array(hash4), { padding: false });
@@ -92892,7 +93118,7 @@ function getStorageOption(identifier, config3) {
92892
93118
  return config3;
92893
93119
  }
92894
93120
 
92895
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/db/internal-adapter.mjs
93121
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/db/internal-adapter.mjs
92896
93122
  init_id2();
92897
93123
  init_json();
92898
93124
  function getTTLSeconds(expiresAt, now4 = Date.now()) {
@@ -93569,7 +93795,7 @@ var createInternalAdapter = (adapter, ctx) => {
93569
93795
  };
93570
93796
  };
93571
93797
 
93572
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/db/to-zod.mjs
93798
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/db/to-zod.mjs
93573
93799
  init_zod();
93574
93800
  function toZodSchema({ fields, isClientSide }) {
93575
93801
  const zodFields = Object.keys(fields).reduce((acc, key) => {
@@ -93598,7 +93824,7 @@ function toZodSchema({ fields, isClientSide }) {
93598
93824
  }, {});
93599
93825
  return object(zodFields);
93600
93826
  }
93601
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/db/index.mjs
93827
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/db/index.mjs
93602
93828
  var db_exports = /* @__PURE__ */ __exportAll({
93603
93829
  convertFromDB: () => convertFromDB,
93604
93830
  convertToDB: () => convertToDB,
@@ -93619,7 +93845,7 @@ var db_exports = /* @__PURE__ */ __exportAll({
93619
93845
  });
93620
93846
  __reExport(db_exports, exports_db);
93621
93847
 
93622
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/api/routes/session.mjs
93848
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/api/routes/session.mjs
93623
93849
  init_error2();
93624
93850
  init_json();
93625
93851
  init_zod();
@@ -94038,7 +94264,7 @@ var revokeOtherSessions = createAuthEndpoint("/revoke-other-sessions", {
94038
94264
  return ctx.json({ status: true });
94039
94265
  });
94040
94266
 
94041
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/context/helpers.mjs
94267
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/context/helpers.mjs
94042
94268
  init_env();
94043
94269
  async function getAwaitableValue(arr, item) {
94044
94270
  if (!arr)
@@ -94050,7 +94276,7 @@ async function getAwaitableValue(arr, item) {
94050
94276
  }
94051
94277
  }
94052
94278
 
94053
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/oauth2/utils.mjs
94279
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/oauth2/utils.mjs
94054
94280
  function isLikelyEncrypted(token) {
94055
94281
  if (token.startsWith("$ba$"))
94056
94282
  return true;
@@ -94078,7 +94304,7 @@ function setTokenUtil(token, ctx) {
94078
94304
  return token;
94079
94305
  }
94080
94306
 
94081
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/api/routes/account.mjs
94307
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/api/routes/account.mjs
94082
94308
  init_error2();
94083
94309
 
94084
94310
  // ../../node_modules/.bun/@better-auth+core@1.5.5+9ce0b2c039e580c5/node_modules/@better-auth/core/dist/social-providers/apple.mjs
@@ -97187,7 +97413,7 @@ var socialProviders = {
97187
97413
  var socialProviderList = Object.keys(socialProviders);
97188
97414
  var SocialProviderListEnum = _enum2(socialProviderList).or(string2());
97189
97415
 
97190
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/api/routes/account.mjs
97416
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/api/routes/account.mjs
97191
97417
  init_zod();
97192
97418
  var listUserAccounts = createAuthEndpoint("/list-accounts", {
97193
97419
  method: "GET",
@@ -97703,7 +97929,7 @@ var accountInfo = createAuthEndpoint("/account-info", {
97703
97929
  return ctx.json(info2);
97704
97930
  });
97705
97931
 
97706
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/api/routes/email-verification.mjs
97932
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/api/routes/email-verification.mjs
97707
97933
  init_error2();
97708
97934
  init_zod();
97709
97935
  async function createEmailVerificationToken(secret, email3, updateTo, expiresIn = 3600, extraPayload) {
@@ -98006,7 +98232,7 @@ var verifyEmail = createAuthEndpoint("/verify-email", {
98006
98232
  });
98007
98233
  });
98008
98234
 
98009
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/oauth2/link-account.mjs
98235
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/oauth2/link-account.mjs
98010
98236
  init_env();
98011
98237
  async function handleOAuthUserInfo(c, opts) {
98012
98238
  const { userInfo, account: account3, callbackURL, disableSignUp, overrideUserInfo } = opts;
@@ -98151,7 +98377,7 @@ Error: `, e);
98151
98377
  };
98152
98378
  }
98153
98379
 
98154
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/api/routes/callback.mjs
98380
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/api/routes/callback.mjs
98155
98381
  init_json();
98156
98382
  init_zod();
98157
98383
  var schema = object({
@@ -98330,7 +98556,7 @@ var callbackOAuth = createAuthEndpoint("/callback/:id", {
98330
98556
  throw c.redirect(toRedirectTo);
98331
98557
  });
98332
98558
 
98333
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/api/routes/error.mjs
98559
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/api/routes/error.mjs
98334
98560
  init_env();
98335
98561
  function sanitize(input) {
98336
98562
  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 +98939,7 @@ var error48 = createAuthEndpoint("/error", {
98713
98939
  return new Response(html(c.context.options, safeCode, safeDescription), { headers: { "Content-Type": "text/html" } });
98714
98940
  });
98715
98941
 
98716
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/api/routes/ok.mjs
98942
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/api/routes/ok.mjs
98717
98943
  var ok = createAuthEndpoint("/ok", {
98718
98944
  method: "GET",
98719
98945
  metadata: {
@@ -98737,7 +98963,7 @@ var ok = createAuthEndpoint("/ok", {
98737
98963
  return ctx.json({ ok: true });
98738
98964
  });
98739
98965
 
98740
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/utils/password.mjs
98966
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/utils/password.mjs
98741
98967
  init_error2();
98742
98968
  async function validatePassword(ctx, data2) {
98743
98969
  const credentialAccount = (await ctx.context.internalAdapter.findAccounts(data2.userId))?.find((account3) => account3.providerId === "credential");
@@ -98750,7 +98976,7 @@ async function validatePassword(ctx, data2) {
98750
98976
  });
98751
98977
  }
98752
98978
 
98753
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/api/routes/password.mjs
98979
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/api/routes/password.mjs
98754
98980
  init_error2();
98755
98981
  init_id2();
98756
98982
  init_zod();
@@ -98948,7 +99174,7 @@ var verifyPassword2 = createAuthEndpoint("/verify-password", {
98948
99174
  return ctx.json({ status: true });
98949
99175
  });
98950
99176
 
98951
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/api/routes/sign-in.mjs
99177
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/api/routes/sign-in.mjs
98952
99178
  init_error2();
98953
99179
  init_zod();
98954
99180
  var socialSignInBodySchema = object({
@@ -98977,7 +99203,7 @@ var socialSignInBodySchema = object({
98977
99203
  additionalData: record(string2(), any()).optional().meta({ description: "Additional data to be passed through the OAuth flow" })
98978
99204
  });
98979
99205
 
98980
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/api/routes/sign-out.mjs
99206
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/api/routes/sign-out.mjs
98981
99207
  var signOut = createAuthEndpoint("/sign-out", {
98982
99208
  method: "POST",
98983
99209
  operationId: "signOut",
@@ -99005,7 +99231,7 @@ var signOut = createAuthEndpoint("/sign-out", {
99005
99231
  return ctx.json({ success: true });
99006
99232
  });
99007
99233
 
99008
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/api/routes/sign-up.mjs
99234
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/api/routes/sign-up.mjs
99009
99235
  init_env();
99010
99236
  init_error2();
99011
99237
  init_id2();
@@ -99019,12 +99245,12 @@ var signUpEmailBodySchema = object({
99019
99245
  rememberMe: boolean2().optional()
99020
99246
  }).and(record(string2(), any()));
99021
99247
 
99022
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/api/routes/update-session.mjs
99248
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/api/routes/update-session.mjs
99023
99249
  init_error2();
99024
99250
  init_zod();
99025
99251
  var updateSessionBodySchema = record(string2().meta({ description: "Field name must be a string" }), any());
99026
99252
 
99027
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/api/routes/update-user.mjs
99253
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/api/routes/update-user.mjs
99028
99254
  init_error2();
99029
99255
  init_zod();
99030
99256
  var updateUserBodySchema = record(string2().meta({ description: "Field name must be a string" }), any());
@@ -99450,7 +99676,7 @@ var changeEmail = createAuthEndpoint("/change-email", {
99450
99676
  return ctx.json({ status: true });
99451
99677
  });
99452
99678
 
99453
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/api/to-auth-endpoints.mjs
99679
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/api/to-auth-endpoints.mjs
99454
99680
  init_env();
99455
99681
  init_error2();
99456
99682
  var defuReplaceArrays = createDefu((obj, key, value3) => {
@@ -99460,25 +99686,25 @@ var defuReplaceArrays = createDefu((obj, key, value3) => {
99460
99686
  }
99461
99687
  });
99462
99688
 
99463
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/api/index.mjs
99689
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/api/index.mjs
99464
99690
  init_env();
99465
99691
  init_error2();
99466
99692
 
99467
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/db/adapter-base.mjs
99693
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/db/adapter-base.mjs
99468
99694
  init_env();
99469
99695
 
99470
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/db/adapter-kysely.mjs
99696
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/db/adapter-kysely.mjs
99471
99697
  init_error2();
99472
99698
 
99473
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/db/get-migration.mjs
99699
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/db/get-migration.mjs
99474
99700
  init_env();
99475
99701
  init_dist();
99476
99702
  init_adapter();
99477
99703
 
99478
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/context/secret-utils.mjs
99704
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/context/secret-utils.mjs
99479
99705
  init_error2();
99480
99706
 
99481
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/context/create-context.mjs
99707
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/context/create-context.mjs
99482
99708
  init_env();
99483
99709
  init_error2();
99484
99710
  init_id2();
@@ -99487,14 +99713,14 @@ init_id2();
99487
99713
  init_env();
99488
99714
  init_random();
99489
99715
 
99490
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/context/init.mjs
99716
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/context/init.mjs
99491
99717
  init_error2();
99492
99718
  init_dist();
99493
99719
 
99494
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/auth/base.mjs
99720
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/auth/base.mjs
99495
99721
  init_error2();
99496
99722
 
99497
- // ../../node_modules/.bun/better-auth@1.5.5+ecc9a47ca304ff9f/node_modules/better-auth/dist/index.mjs
99723
+ // ../../node_modules/.bun/better-auth@1.5.5+8ccc988c8366c7fc/node_modules/better-auth/dist/index.mjs
99498
99724
  init_env();
99499
99725
  init_error2();
99500
99726
  init_error_codes();
@@ -99533,7 +99759,7 @@ var walletPasskeyClient = () => ({
99533
99759
  $ERROR_CODES: WALLET_PASSKEY_ERROR_CODES,
99534
99760
  atomListeners: [
99535
99761
  {
99536
- matcher: (path3) => path3.startsWith("/wallet/passkey/"),
99762
+ matcher: (path4) => path4.startsWith("/wallet/passkey/"),
99537
99763
  signal: "$sessionSignal"
99538
99764
  }
99539
99765
  ]
@@ -99546,7 +99772,7 @@ var walletPincodeClient = () => ({
99546
99772
  $ERROR_CODES: WALLET_PINCODE_ERROR_CODES,
99547
99773
  atomListeners: [
99548
99774
  {
99549
- matcher: (path3) => path3.startsWith("/wallet/pincode/"),
99775
+ matcher: (path4) => path4.startsWith("/wallet/pincode/"),
99550
99776
  signal: "$sessionSignal"
99551
99777
  }
99552
99778
  ]
@@ -99559,7 +99785,7 @@ var walletSecretCodesClient = () => ({
99559
99785
  $ERROR_CODES: WALLET_SECRET_CODES_ERROR_CODES,
99560
99786
  atomListeners: [
99561
99787
  {
99562
- matcher: (path3) => path3.startsWith("/wallet/secret-codes/"),
99788
+ matcher: (path4) => path4.startsWith("/wallet/secret-codes/"),
99563
99789
  signal: "$sessionSignal"
99564
99790
  }
99565
99791
  ]
@@ -99572,7 +99798,7 @@ var walletTwoFactorClient = () => ({
99572
99798
  $ERROR_CODES: WALLET_TWO_FACTOR_ERROR_CODES,
99573
99799
  atomListeners: [
99574
99800
  {
99575
- matcher: (path3) => path3.startsWith("/wallet/two-factor/"),
99801
+ matcher: (path4) => path4.startsWith("/wallet/two-factor/"),
99576
99802
  signal: "$sessionSignal"
99577
99803
  }
99578
99804
  ]