@dereekb/dbx-cli 13.18.0 → 13.20.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.esm.js CHANGED
@@ -57225,17 +57225,38 @@ function _array_like_to_array$3(arr, len) {
57225
57225
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
57226
57226
  return arr2;
57227
57227
  }
57228
- function _array_without_holes$1(arr) {
57229
- if (Array.isArray(arr)) return _array_like_to_array$3(arr);
57228
+ function _array_with_holes$1(arr) {
57229
+ if (Array.isArray(arr)) return arr;
57230
57230
  }
57231
- function _iterable_to_array$1(iter) {
57232
- if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
57231
+ function _iterable_to_array_limit$1(arr, i) {
57232
+ var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
57233
+ if (_i == null) return;
57234
+ var _arr = [];
57235
+ var _n = true;
57236
+ var _d = false;
57237
+ var _s, _e;
57238
+ try {
57239
+ for(_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true){
57240
+ _arr.push(_s.value);
57241
+ if (i && _arr.length === i) break;
57242
+ }
57243
+ } catch (err) {
57244
+ _d = true;
57245
+ _e = err;
57246
+ } finally{
57247
+ try {
57248
+ if (!_n && _i["return"] != null) _i["return"]();
57249
+ } finally{
57250
+ if (_d) throw _e;
57251
+ }
57252
+ }
57253
+ return _arr;
57233
57254
  }
57234
- function _non_iterable_spread$1() {
57235
- throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
57255
+ function _non_iterable_rest$1() {
57256
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
57236
57257
  }
57237
- function _to_consumable_array$1(arr) {
57238
- return _array_without_holes$1(arr) || _iterable_to_array$1(arr) || _unsupported_iterable_to_array$3(arr) || _non_iterable_spread$1();
57258
+ function _sliced_to_array$1(arr, i) {
57259
+ return _array_with_holes$1(arr) || _iterable_to_array_limit$1(arr, i) || _unsupported_iterable_to_array$3(arr, i) || _non_iterable_rest$1();
57239
57260
  }
57240
57261
  function _unsupported_iterable_to_array$3(o, minLen) {
57241
57262
  if (!o) return;
@@ -57246,74 +57267,93 @@ function _unsupported_iterable_to_array$3(o, minLen) {
57246
57267
  if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$3(o, minLen);
57247
57268
  }
57248
57269
  /**
57249
- * Builds a parent-linked {@link RouteTree} from a flat list of {@link RouteNode}s.
57250
- *
57251
- * Linkage strategy:
57270
+ * Pure URL route matcher, shared by the dev-server `dbx_route_resolve_url`
57271
+ * tool and (mirrored, not imported) by the firebase-server/mcp `url-models`
57272
+ * runtime tool.
57252
57273
  *
57253
- * 1. Use the explicit `parent` field if present.
57254
- * 2. Otherwise derive parent from the dot-prefix of `name`. State `a.b.c`
57255
- * becomes a child of `a.b`. Trailing `.**` is stripped before lookup.
57256
- * 3. Nodes whose parent doesn't resolve are reported as orphan warnings and
57257
- * placed at the tree root.
57274
+ * No ts-morph, no node:fs operates on a flat list of candidates each carrying
57275
+ * a composed `fullUrl` and an opaque `value`. Matching mirrors UIRouter's
57276
+ * literal-then-param preference: a literal segment-for-segment match wins over a
57277
+ * parameterised one, and ties at either tier collapse to an `ambiguous` result.
57278
+ */ /**
57279
+ * Collapses an empty pathname to `/` and strips a single trailing slash so
57280
+ * `/a/b/` and `/a/b` compare equal.
57258
57281
  *
57259
- * Issues surfaced:
57282
+ * @param pathname - The raw pathname to normalize.
57283
+ * @returns The normalized pathname.
57284
+ */ function normalizePathname(pathname) {
57285
+ var result;
57286
+ if (pathname.length === 0) {
57287
+ result = '/';
57288
+ } else if (pathname.length > 1 && pathname.endsWith('/')) {
57289
+ result = pathname.slice(0, -1);
57290
+ } else {
57291
+ result = pathname;
57292
+ }
57293
+ return result;
57294
+ }
57295
+ /**
57296
+ * Strips a UIRouter query string (`?…`) and/or hash (`#…`) suffix off a URL or
57297
+ * URL pattern, keeping only the path portion. Mirrors the runtime
57298
+ * `parseUrlModelsPathname` normalization (`firebase-server/mcp`) so build-time
57299
+ * param extraction and runtime matching agree: a state url like
57300
+ * `/:schoolJob?slotIndex` reduces to `/:schoolJob` rather than leaking the
57301
+ * `?slotIndex` query param into the last path segment.
57260
57302
  *
57261
- * - `DUPLICATE_STATE_NAME` error; second declaration is dropped.
57262
- * - `CYCLE_DETECTED` error; the cycle is broken by reverting the tail to
57263
- * the root list.
57264
- * - `ORPHAN_STATE` warning.
57265
- */ /**
57266
- * Builds the parent-child UIRouter tree from a flat node list, computing each
57267
- * state's full URL while preserving any extraction issues so callers see one
57268
- * combined diagnostics view.
57303
+ * @param url - The URL or composed URL pattern to normalize.
57304
+ * @returns The url with any `?…` / `#…` suffix removed.
57305
+ */ function stripUrlQueryAndHash(url) {
57306
+ var hashStripped = url.split('#', 1)[0];
57307
+ return hashStripped.split('?', 1)[0];
57308
+ }
57309
+ /**
57310
+ * Splits a path into its non-empty segments (the leading slash is dropped).
57269
57311
  *
57270
- * @param nodes - The flat route nodes extracted from sources.
57271
- * @param extractIssues - Issues already discovered during extraction to forward.
57272
- * @returns The constructed tree alongside the merged issue list.
57312
+ * @param path - The path or URL pattern to split.
57313
+ * @returns The ordered segment list, empty for `/`.
57314
+ */ function splitSegments(path) {
57315
+ var normalized = path.startsWith('/') ? path.slice(1) : path;
57316
+ return normalized.length === 0 ? [] : normalized.split('/');
57317
+ }
57318
+ /**
57319
+ * Whether a composed URL contains at least one `:param` or `{param}` segment.
57273
57320
  *
57274
- * @__NO_SIDE_EFFECTS__
57275
- */ function buildRouteTree(nodes, extractIssues) {
57276
- var issues = _to_consumable_array$1(extractIssues);
57277
- var byName = new Map();
57278
- insertNodes(nodes, byName, issues);
57279
- wireParentLinks(byName, issues);
57280
- detectCycles(byName, issues);
57281
- composeFullUrls(byName);
57282
- var roots = collectRoots(byName);
57283
- sortChildren(byName, roots);
57284
- var _freezeTree = freezeTree(roots), frozen = _freezeTree.frozen, frozenRoots = _freezeTree.frozenRoots;
57285
- var result = {
57286
- roots: frozenRoots,
57287
- byName: frozen,
57288
- issues: issues,
57289
- filesChecked: 0,
57290
- nodeCount: byName.size
57291
- };
57292
- return result;
57321
+ * @param path - The composed URL pattern.
57322
+ * @returns `true` when the pattern declares a parameter.
57323
+ */ function hasParamSegment(path) {
57324
+ return path.includes(':') || path.includes('{');
57293
57325
  }
57294
- // (1) Insert nodes; report duplicates
57295
- function insertNodes(nodes, byName, issues) {
57326
+ /**
57327
+ * Attempts a segment-for-segment match of a route pattern against concrete
57328
+ * input segments. `:name` and `{name}` / `{name:type}` segments capture the
57329
+ * input value (URL-decoded); literal segments must match exactly.
57330
+ *
57331
+ * @param route - The route pattern's segments.
57332
+ * @param input - The concrete URL's segments.
57333
+ * @returns The captured params when every segment matches, else `undefined`.
57334
+ */ function tryMatchSegments(route, input) {
57335
+ if (route.length !== input.length) {
57336
+ return undefined;
57337
+ }
57338
+ var params = {};
57339
+ var result = params;
57296
57340
  var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
57297
57341
  try {
57298
- for(var _iterator = nodes[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
57299
- var node = _step.value;
57300
- if (byName.has(node.name)) {
57301
- issues.push({
57302
- code: 'DUPLICATE_STATE_NAME',
57303
- severity: 'error',
57304
- message: "State `".concat(node.name, "` is declared in multiple places. Keeping the first declaration."),
57305
- file: node.file,
57306
- line: node.line,
57307
- stateName: node.name
57308
- });
57309
- continue;
57342
+ for(var _iterator = route.entries()[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
57343
+ var _step_value = _sliced_to_array$1(_step.value, 2), i = _step_value[0], r = _step_value[1];
57344
+ var v = input[i];
57345
+ if (r.startsWith(':')) {
57346
+ var key = r.slice(1);
57347
+ params[key] = decodeURIComponent(v);
57348
+ } else if (r.startsWith('{') && r.endsWith('}')) {
57349
+ var inner = r.slice(1, -1);
57350
+ var colonIdx = inner.indexOf(':');
57351
+ var key1 = colonIdx >= 0 ? inner.slice(0, colonIdx) : inner;
57352
+ params[key1] = decodeURIComponent(v);
57353
+ } else if (r !== v) {
57354
+ result = undefined;
57355
+ break;
57310
57356
  }
57311
- byName.set(node.name, {
57312
- data: node,
57313
- fullUrl: undefined,
57314
- parent: undefined,
57315
- children: []
57316
- });
57317
57357
  }
57318
57358
  } catch (err) {
57319
57359
  _didIteratorError = true;
@@ -57329,29 +57369,32 @@ function insertNodes(nodes, byName, issues) {
57329
57369
  }
57330
57370
  }
57331
57371
  }
57372
+ return result;
57332
57373
  }
57333
- // (2) Wire parent links
57334
- function wireParentLinks(byName, issues) {
57374
+ /**
57375
+ * Extracts param-name segments from a composed UIRouter URL. Recognises:
57376
+ * - `:name` (Express-style)
57377
+ * - `{name}` (UIRouter type-less)
57378
+ * - `{name:type}` and `{name:regex}` (UIRouter typed / regex)
57379
+ * Order is preserved; duplicates are de-duplicated by first occurrence.
57380
+ *
57381
+ * @param fullUrl - Composed URL (e.g. `/{orgId}/users/:userId`) or undefined.
57382
+ * @returns The param key list in declaration order, or an empty array.
57383
+ */ function extractUrlParamKeys(fullUrl) {
57384
+ if (fullUrl === undefined || fullUrl.length === 0) {
57385
+ return [];
57386
+ }
57387
+ var seen = new Set();
57388
+ var keys = [];
57335
57389
  var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
57336
57390
  try {
57337
- for(var _iterator = byName.values()[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
57338
- var treeNode = _step.value;
57339
- var parentName = resolveParentName(treeNode.data, byName);
57340
- if (!parentName) continue;
57341
- var parent = byName.get(parentName);
57342
- if (!parent) {
57343
- issues.push({
57344
- code: 'ORPHAN_STATE',
57345
- severity: 'warning',
57346
- message: "State `".concat(treeNode.data.name, "` references parent `").concat(parentName, "` which is not declared in the analyzed sources."),
57347
- file: treeNode.data.file,
57348
- line: treeNode.data.line,
57349
- stateName: treeNode.data.name
57350
- });
57351
- continue;
57391
+ for(var _iterator = fullUrl.split('/')[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
57392
+ var segment = _step.value;
57393
+ var key = extractParamKeyFromSegment(segment);
57394
+ if (key !== undefined && !seen.has(key)) {
57395
+ seen.add(key);
57396
+ keys.push(key);
57352
57397
  }
57353
- treeNode.parent = parent;
57354
- parent.children.push(treeNode);
57355
57398
  }
57356
57399
  } catch (err) {
57357
57400
  _didIteratorError = true;
@@ -57367,17 +57410,67 @@ function wireParentLinks(byName, issues) {
57367
57410
  }
57368
57411
  }
57369
57412
  }
57413
+ return keys;
57370
57414
  }
57371
- // (3) Detect cycles. A cycle is impossible via dot-prefix linkage but the
57372
- // explicit `parent` field can introduce one (`a.parent = 'b'`,
57373
- // `b.parent = 'a'`). Walk from each node and break the chain on revisits.
57374
- function detectCycles(byName, issues) {
57415
+ function extractParamKeyFromSegment(rawSegment) {
57416
+ // Defense-in-depth: a `:param?query` / `:param#hash` segment that slips past
57417
+ // `composeFullUrl` normalization must not leak its suffix into the param key.
57418
+ var segment = stripUrlQueryAndHash(rawSegment);
57419
+ if (segment.startsWith(':')) {
57420
+ var key = segment.slice(1);
57421
+ return key.length > 0 ? key : undefined;
57422
+ }
57423
+ if (segment.startsWith('{') && segment.endsWith('}')) {
57424
+ var inner = segment.slice(1, -1);
57425
+ var colonIdx = inner.indexOf(':');
57426
+ var rawKey = colonIdx >= 0 ? inner.slice(0, colonIdx) : inner;
57427
+ var key1 = rawKey.trim();
57428
+ return key1.length > 0 ? key1 : undefined;
57429
+ }
57430
+ return undefined;
57431
+ }
57432
+ /**
57433
+ * Matches a pathname against a flat candidate list, preferring a literal
57434
+ * (exact composed-URL) match over a parameterised one. A tie at either tier
57435
+ * collapses to `ambiguous`; otherwise the closest near-misses are scored and
57436
+ * returned in a `none` result.
57437
+ *
57438
+ * @param input - The candidate entries and the pathname to resolve.
57439
+ * @returns A discriminated match / ambiguous / none result.
57440
+ */ function matchUrlAgainstEntries(input) {
57441
+ var pathname = normalizePathname(input.pathname);
57442
+ var literal = matchLiteral(input.entries, pathname);
57443
+ var result;
57444
+ if (literal.length === 1) {
57445
+ var _literal__fullUrl;
57446
+ result = {
57447
+ kind: 'match',
57448
+ via: 'literal',
57449
+ value: literal[0].value,
57450
+ matchedFullUrl: normalizePathname((_literal__fullUrl = literal[0].fullUrl) !== null && _literal__fullUrl !== void 0 ? _literal__fullUrl : pathname),
57451
+ params: {}
57452
+ };
57453
+ } else if (literal.length > 1) {
57454
+ result = {
57455
+ kind: 'ambiguous',
57456
+ values: literal.map(function(e) {
57457
+ return e.value;
57458
+ })
57459
+ };
57460
+ } else {
57461
+ result = matchParamOrNone(input.entries, pathname);
57462
+ }
57463
+ return result;
57464
+ }
57465
+ function matchLiteral(entries, pathname) {
57466
+ var out = [];
57375
57467
  var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
57376
57468
  try {
57377
- for(var _iterator = byName.values()[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
57378
- var treeNode = _step.value;
57379
- if (!treeNode.parent) continue;
57380
- detectCycleFor(treeNode, issues);
57469
+ for(var _iterator = entries[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
57470
+ var entry = _step.value;
57471
+ if (entry.fullUrl !== undefined && normalizePathname(entry.fullUrl) === pathname) {
57472
+ out.push(entry);
57473
+ }
57381
57474
  }
57382
57475
  } catch (err) {
57383
57476
  _didIteratorError = true;
@@ -57393,45 +57486,25 @@ function detectCycles(byName, issues) {
57393
57486
  }
57394
57487
  }
57395
57488
  }
57489
+ return out;
57396
57490
  }
57397
- function detectCycleFor(treeNode, issues) {
57398
- var seen = new Set();
57399
- seen.add(treeNode.data.name);
57400
- var cursor = treeNode.parent;
57401
- while(cursor){
57402
- if (seen.has(cursor.data.name)) {
57403
- issues.push({
57404
- code: 'CYCLE_DETECTED',
57405
- severity: 'error',
57406
- message: "Cycle detected involving `".concat(treeNode.data.name, "` and `").concat(cursor.data.name, "`. Severing the parent link."),
57407
- file: treeNode.data.file,
57408
- line: treeNode.data.line,
57409
- stateName: treeNode.data.name
57410
- });
57411
- detachFromParent(treeNode);
57412
- return;
57413
- }
57414
- seen.add(cursor.data.name);
57415
- cursor = cursor.parent;
57416
- }
57417
- }
57418
- function detachFromParent(treeNode) {
57419
- if (!treeNode.parent) return;
57420
- var idx = treeNode.parent.children.indexOf(treeNode);
57421
- if (idx >= 0) {
57422
- treeNode.parent.children.splice(idx, 1);
57423
- }
57424
- treeNode.parent = undefined;
57425
- }
57426
- // (4) Compose full URLs (parent walk; root url is not prefixed). UIRouter's
57427
- // own logic is more nuanced (some states overwrite their parent's URL with
57428
- // a leading `^`), but this gives a useful approximation for the common case.
57429
- function composeFullUrls(byName) {
57491
+ function matchParamOrNone(entries, pathname) {
57492
+ var inputSegments = splitSegments(pathname);
57493
+ var hits = [];
57430
57494
  var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
57431
57495
  try {
57432
- for(var _iterator = byName.values()[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
57433
- var treeNode = _step.value;
57434
- treeNode.fullUrl = composeFullUrl(treeNode);
57496
+ for(var _iterator = entries[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
57497
+ var entry = _step.value;
57498
+ if (entry.fullUrl === undefined || !hasParamSegment(entry.fullUrl)) {
57499
+ continue;
57500
+ }
57501
+ var params = tryMatchSegments(splitSegments(entry.fullUrl), inputSegments);
57502
+ if (params) {
57503
+ hits.push({
57504
+ entry: entry,
57505
+ params: params
57506
+ });
57507
+ }
57435
57508
  }
57436
57509
  } catch (err) {
57437
57510
  _didIteratorError = true;
@@ -57447,42 +57520,67 @@ function composeFullUrls(byName) {
57447
57520
  }
57448
57521
  }
57449
57522
  }
57523
+ var result;
57524
+ if (hits.length === 1) {
57525
+ var _hits__entry_fullUrl;
57526
+ result = {
57527
+ kind: 'match',
57528
+ via: 'param',
57529
+ value: hits[0].entry.value,
57530
+ matchedFullUrl: normalizePathname((_hits__entry_fullUrl = hits[0].entry.fullUrl) !== null && _hits__entry_fullUrl !== void 0 ? _hits__entry_fullUrl : pathname),
57531
+ params: hits[0].params
57532
+ };
57533
+ } else if (hits.length > 1) {
57534
+ result = {
57535
+ kind: 'ambiguous',
57536
+ values: hits.map(function(h) {
57537
+ return h.entry.value;
57538
+ })
57539
+ };
57540
+ } else {
57541
+ result = {
57542
+ kind: 'none',
57543
+ candidates: scoreCandidates(entries, pathname)
57544
+ };
57545
+ }
57546
+ return result;
57450
57547
  }
57451
- // (5) Identify roots
57452
- function collectRoots(byName) {
57453
- var roots = [];
57548
+ /**
57549
+ * Scores every candidate by shared leading segments (literal segment = 2,
57550
+ * param segment = 1, mismatch stops scoring) and returns the top 5 values.
57551
+ *
57552
+ * @param entries - The candidate entries to score.
57553
+ * @param pathname - The pathname being resolved.
57554
+ * @returns Up to five closest candidate values, best first.
57555
+ */ function scoreCandidates(entries, pathname) {
57556
+ var segments = splitSegments(normalizePathname(pathname));
57557
+ var scored = [];
57454
57558
  var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
57455
57559
  try {
57456
- for(var _iterator = byName.values()[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
57457
- var treeNode = _step.value;
57458
- if (!treeNode.parent) {
57459
- roots.push(treeNode);
57560
+ for(var _iterator = entries[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
57561
+ var entry = _step.value;
57562
+ if (entry.fullUrl === undefined) {
57563
+ continue;
57460
57564
  }
57461
- }
57462
- } catch (err) {
57463
- _didIteratorError = true;
57464
- _iteratorError = err;
57465
- } finally{
57466
- try {
57467
- if (!_iteratorNormalCompletion && _iterator.return != null) {
57468
- _iterator.return();
57565
+ var candidateSegments = splitSegments(entry.fullUrl);
57566
+ var score = 0;
57567
+ var maxIndex = Math.min(segments.length, candidateSegments.length);
57568
+ for(var i = 0; i < maxIndex; i += 1){
57569
+ if (segments[i] === candidateSegments[i]) {
57570
+ score += 2;
57571
+ } else if (candidateSegments[i].startsWith(':') || candidateSegments[i].startsWith('{')) {
57572
+ score += 1;
57573
+ } else {
57574
+ break;
57575
+ }
57469
57576
  }
57470
- } finally{
57471
- if (_didIteratorError) {
57472
- throw _iteratorError;
57577
+ if (score > 0) {
57578
+ scored.push({
57579
+ value: entry.value,
57580
+ score: score
57581
+ });
57473
57582
  }
57474
57583
  }
57475
- }
57476
- return roots;
57477
- }
57478
- // (6) Sort children deterministically by name
57479
- function sortChildren(byName, roots) {
57480
- var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
57481
- try {
57482
- for(var _iterator = byName.values()[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
57483
- var treeNode = _step.value;
57484
- treeNode.children.sort(compareByName);
57485
- }
57486
57584
  } catch (err) {
57487
57585
  _didIteratorError = true;
57488
57586
  _iteratorError = err;
@@ -57497,133 +57595,91 @@ function sortChildren(byName, roots) {
57497
57595
  }
57498
57596
  }
57499
57597
  }
57500
- roots.sort(compareByName);
57598
+ scored.sort(function(a, b) {
57599
+ return b.score - a.score;
57600
+ });
57601
+ return scored.slice(0, 5).map(function(s) {
57602
+ return s.value;
57603
+ });
57501
57604
  }
57502
- // (7) Freeze: convert MutableTreeNode → RouteTreeNode (children: readonly).
57503
- function freezeTree(roots) {
57504
- var frozen = new Map();
57505
- var freeze = function freeze1(mut) {
57506
- var existing = frozen.get(mut.data.name);
57507
- if (existing) return existing;
57508
- var placeholder = {
57509
- data: mut.data,
57510
- fullUrl: mut.fullUrl,
57511
- parent: undefined,
57512
- children: []
57513
- };
57514
- frozen.set(mut.data.name, placeholder);
57515
- placeholder.parent = mut.parent ? freeze(mut.parent) : undefined;
57516
- placeholder.children = mut.children.map(freeze);
57517
- return placeholder;
57518
- };
57519
- var frozenRoots = roots.map(freeze);
57520
- return {
57521
- frozen: frozen,
57522
- frozenRoots: frozenRoots
57523
- };
57605
+
57606
+ function _array_like_to_array$2(arr, len) {
57607
+ if (len == null || len > arr.length) len = arr.length;
57608
+ for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
57609
+ return arr2;
57524
57610
  }
57525
- function resolveParentName(node, byName) {
57526
- if (node.explicitParent) {
57527
- return node.explicitParent;
57528
- }
57529
- var lookupName = node.name.endsWith('.**') ? node.name.slice(0, -3) : node.name;
57530
- var lastDot = lookupName.lastIndexOf('.');
57531
- if (lastDot < 0) {
57532
- return undefined;
57533
- }
57534
- var candidate = lookupName.slice(0, lastDot);
57535
- // Confirm the candidate exists; otherwise fall back to undefined so the
57536
- // orphan check fires.
57537
- if (byName.has(candidate)) {
57538
- return candidate;
57539
- }
57540
- // Even if the candidate doesn't exist, return it so the orphan logic can
57541
- // surface an informative message.
57542
- return candidate;
57611
+ function _array_without_holes$1(arr) {
57612
+ if (Array.isArray(arr)) return _array_like_to_array$2(arr);
57543
57613
  }
57544
- function composeFullUrl(node) {
57545
- var segments = [];
57546
- var cursor = node;
57547
- while(cursor){
57548
- if (cursor.data.url !== undefined) {
57549
- segments.unshift(cursor.data.url);
57550
- }
57551
- cursor = cursor.parent;
57552
- }
57553
- if (segments.length === 0) {
57554
- return undefined;
57555
- }
57556
- // Join segments and collapse double slashes (root url '/' followed by
57557
- // child '/foo' would otherwise yield '//foo').
57558
- var joined = segments.join('');
57559
- var collapsed = joined.replaceAll(/\/{2,}/g, '/');
57560
- return collapsed.length === 0 ? '/' : collapsed;
57614
+ function _iterable_to_array$1(iter) {
57615
+ if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
57561
57616
  }
57562
- function compareByName(a, b) {
57563
- if (a.data.name < b.data.name) {
57564
- return -1;
57565
- }
57566
- if (a.data.name > b.data.name) {
57567
- return 1;
57568
- }
57569
- return 0;
57617
+ function _non_iterable_spread$1() {
57618
+ throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
57619
+ }
57620
+ function _to_consumable_array$1(arr) {
57621
+ return _array_without_holes$1(arr) || _iterable_to_array$1(arr) || _unsupported_iterable_to_array$2(arr) || _non_iterable_spread$1();
57622
+ }
57623
+ function _unsupported_iterable_to_array$2(o, minLen) {
57624
+ if (!o) return;
57625
+ if (typeof o === "string") return _array_like_to_array$2(o, minLen);
57626
+ var n = Object.prototype.toString.call(o).slice(8, -1);
57627
+ if (n === "Object" && o.constructor) n = o.constructor.name;
57628
+ if (n === "Map" || n === "Set") return Array.from(n);
57629
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$2(o, minLen);
57570
57630
  }
57571
-
57572
57631
  /**
57573
- * Walks every supplied source through the extractor and emits a flat node and
57574
- * issue list, used when the caller has already gathered a complete glob/file
57575
- * set in memory.
57632
+ * Builds the parent-child UIRouter tree from a flat node list, computing each
57633
+ * state's full URL while preserving any extraction issues so callers see one
57634
+ * combined diagnostics view.
57576
57635
  *
57577
- * @param sources - The in-memory sources to extract from.
57578
- * @returns The merged extraction nodes, issues, and processed file count.
57579
- */ function resolveRouteSources(sources) {
57580
- var nodes = [];
57581
- var issues = [];
57636
+ * @param nodes - The flat route nodes extracted from sources.
57637
+ * @param extractIssues - Issues already discovered during extraction to forward.
57638
+ * @returns The constructed tree alongside the merged issue list.
57639
+ *
57640
+ * @__NO_SIDE_EFFECTS__
57641
+ */ function buildRouteTree(nodes, extractIssues) {
57642
+ var issues = _to_consumable_array$1(extractIssues);
57643
+ var byName = new Map();
57644
+ insertNodes(nodes, byName, issues);
57645
+ wireParentLinks(byName, issues);
57646
+ detectCycles(byName, issues);
57647
+ composeFullUrls(byName);
57648
+ var roots = collectRoots(byName);
57649
+ sortChildren(byName, roots);
57650
+ var _freezeTree = freezeTree(roots), frozen = _freezeTree.frozen, frozenRoots = _freezeTree.frozenRoots;
57651
+ var result = {
57652
+ roots: frozenRoots,
57653
+ byName: frozen,
57654
+ issues: issues,
57655
+ filesChecked: 0,
57656
+ nodeCount: byName.size
57657
+ };
57658
+ return result;
57659
+ }
57660
+ // (1) Insert nodes; report duplicates
57661
+ function insertNodes(nodes, byName, issues) {
57582
57662
  var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
57583
57663
  try {
57584
- for(var _iterator = sources[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
57585
- var source = _step.value;
57586
- var extracted = extractFile(source);
57587
- var _iteratorNormalCompletion1 = true, _didIteratorError1 = false, _iteratorError1 = undefined;
57588
- try {
57589
- for(var _iterator1 = extracted.nodes[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true){
57590
- var node = _step1.value;
57591
- nodes.push(node);
57592
- }
57593
- } catch (err) {
57594
- _didIteratorError1 = true;
57595
- _iteratorError1 = err;
57596
- } finally{
57597
- try {
57598
- if (!_iteratorNormalCompletion1 && _iterator1.return != null) {
57599
- _iterator1.return();
57600
- }
57601
- } finally{
57602
- if (_didIteratorError1) {
57603
- throw _iteratorError1;
57604
- }
57605
- }
57606
- }
57607
- var _iteratorNormalCompletion2 = true, _didIteratorError2 = false, _iteratorError2 = undefined;
57608
- try {
57609
- for(var _iterator2 = extracted.issues[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true){
57610
- var issue = _step2.value;
57611
- issues.push(issue);
57612
- }
57613
- } catch (err) {
57614
- _didIteratorError2 = true;
57615
- _iteratorError2 = err;
57616
- } finally{
57617
- try {
57618
- if (!_iteratorNormalCompletion2 && _iterator2.return != null) {
57619
- _iterator2.return();
57620
- }
57621
- } finally{
57622
- if (_didIteratorError2) {
57623
- throw _iteratorError2;
57624
- }
57625
- }
57664
+ for(var _iterator = nodes[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
57665
+ var node = _step.value;
57666
+ if (byName.has(node.name)) {
57667
+ issues.push({
57668
+ code: 'DUPLICATE_STATE_NAME',
57669
+ severity: 'error',
57670
+ message: "State `".concat(node.name, "` is declared in multiple places. Keeping the first declaration."),
57671
+ file: node.file,
57672
+ line: node.line,
57673
+ stateName: node.name
57674
+ });
57675
+ continue;
57626
57676
  }
57677
+ byName.set(node.name, {
57678
+ data: node,
57679
+ fullUrl: undefined,
57680
+ parent: undefined,
57681
+ children: []
57682
+ });
57627
57683
  }
57628
57684
  } catch (err) {
57629
57685
  _didIteratorError = true;
@@ -57639,28 +57695,29 @@ function compareByName(a, b) {
57639
57695
  }
57640
57696
  }
57641
57697
  }
57642
- var result = {
57643
- nodes: nodes,
57644
- issues: issues,
57645
- filesChecked: sources.length
57646
- };
57647
- return result;
57648
57698
  }
57649
- /**
57650
- * Returns the relative module specifiers imported by `source` — used to plan
57651
- * the next round of file reads in transitive walking. Specifiers are
57652
- * left untouched (no `.ts` resolution); the caller normalizes them.
57653
- *
57654
- * @param source - The in-memory source to inspect.
57655
- * @returns The relative specifiers in original-source order.
57656
- */ function computeRelativeSpecifiers(source) {
57657
- var extracted = extractFile(source);
57658
- var out = [];
57699
+ // (2) Wire parent links
57700
+ function wireParentLinks(byName, issues) {
57659
57701
  var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
57660
57702
  try {
57661
- for(var _iterator = extracted.importedFromRelative[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
57662
- var imp = _step.value;
57663
- out.push(imp.moduleSpecifier);
57703
+ for(var _iterator = byName.values()[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
57704
+ var treeNode = _step.value;
57705
+ var parentName = resolveParentName(treeNode.data, byName);
57706
+ if (!parentName) continue;
57707
+ var parent = byName.get(parentName);
57708
+ if (!parent) {
57709
+ issues.push({
57710
+ code: 'ORPHAN_STATE',
57711
+ severity: 'warning',
57712
+ message: "State `".concat(treeNode.data.name, "` references parent `").concat(parentName, "` which is not declared in the analyzed sources."),
57713
+ file: treeNode.data.file,
57714
+ line: treeNode.data.line,
57715
+ stateName: treeNode.data.name
57716
+ });
57717
+ continue;
57718
+ }
57719
+ treeNode.parent = parent;
57720
+ parent.children.push(treeNode);
57664
57721
  }
57665
57722
  } catch (err) {
57666
57723
  _didIteratorError = true;
@@ -57676,148 +57733,71 @@ function compareByName(a, b) {
57676
57733
  }
57677
57734
  }
57678
57735
  }
57679
- return out;
57680
- }
57681
-
57682
- /**
57683
- * Pure tree-loading entry point. Resolves the supplied source list and builds
57684
- * the parent/child tree in one step so callers can stay thin.
57685
- *
57686
- * @param args - The in-memory sources to process.
57687
- * @returns The constructed route tree with extraction issues attached.
57688
- */ function loadRouteTree(args) {
57689
- var resolved = resolveRouteSources(args.sources);
57690
- var tree = buildRouteTree(resolved.nodes, resolved.issues);
57691
- var result = {
57692
- roots: tree.roots,
57693
- byName: tree.byName,
57694
- issues: tree.issues,
57695
- filesChecked: resolved.filesChecked,
57696
- nodeCount: tree.nodeCount
57697
- };
57698
- return result;
57699
- }
57700
-
57701
- function _array_like_to_array$2(arr, len) {
57702
- if (len == null || len > arr.length) len = arr.length;
57703
- for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
57704
- return arr2;
57705
- }
57706
- function _array_with_holes$1(arr) {
57707
- if (Array.isArray(arr)) return arr;
57708
57736
  }
57709
- function _iterable_to_array_limit$1(arr, i) {
57710
- var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
57711
- if (_i == null) return;
57712
- var _arr = [];
57713
- var _n = true;
57714
- var _d = false;
57715
- var _s, _e;
57737
+ // (3) Detect cycles. A cycle is impossible via dot-prefix linkage but the
57738
+ // explicit `parent` field can introduce one (`a.parent = 'b'`,
57739
+ // `b.parent = 'a'`). Walk from each node and break the chain on revisits.
57740
+ function detectCycles(byName, issues) {
57741
+ var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
57716
57742
  try {
57717
- for(_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true){
57718
- _arr.push(_s.value);
57719
- if (i && _arr.length === i) break;
57743
+ for(var _iterator = byName.values()[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
57744
+ var treeNode = _step.value;
57745
+ if (!treeNode.parent) continue;
57746
+ detectCycleFor(treeNode, issues);
57720
57747
  }
57721
57748
  } catch (err) {
57722
- _d = true;
57723
- _e = err;
57749
+ _didIteratorError = true;
57750
+ _iteratorError = err;
57724
57751
  } finally{
57725
57752
  try {
57726
- if (!_n && _i["return"] != null) _i["return"]();
57753
+ if (!_iteratorNormalCompletion && _iterator.return != null) {
57754
+ _iterator.return();
57755
+ }
57727
57756
  } finally{
57728
- if (_d) throw _e;
57757
+ if (_didIteratorError) {
57758
+ throw _iteratorError;
57759
+ }
57729
57760
  }
57730
57761
  }
57731
- return _arr;
57732
- }
57733
- function _non_iterable_rest$1() {
57734
- throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
57735
57762
  }
57736
- function _sliced_to_array$1(arr, i) {
57737
- return _array_with_holes$1(arr) || _iterable_to_array_limit$1(arr, i) || _unsupported_iterable_to_array$2(arr, i) || _non_iterable_rest$1();
57738
- }
57739
- function _unsupported_iterable_to_array$2(o, minLen) {
57740
- if (!o) return;
57741
- if (typeof o === "string") return _array_like_to_array$2(o, minLen);
57742
- var n = Object.prototype.toString.call(o).slice(8, -1);
57743
- if (n === "Object" && o.constructor) n = o.constructor.name;
57744
- if (n === "Map" || n === "Set") return Array.from(n);
57745
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$2(o, minLen);
57746
- }
57747
- /**
57748
- * Pure URL ↔ route matcher, shared by the dev-server `dbx_route_resolve_url`
57749
- * tool and (mirrored, not imported) by the firebase-server/mcp `url-models`
57750
- * runtime tool.
57751
- *
57752
- * No ts-morph, no node:fs — operates on a flat list of candidates each carrying
57753
- * a composed `fullUrl` and an opaque `value`. Matching mirrors UIRouter's
57754
- * literal-then-param preference: a literal segment-for-segment match wins over a
57755
- * parameterised one, and ties at either tier collapse to an `ambiguous` result.
57756
- */ /**
57757
- * Collapses an empty pathname to `/` and strips a single trailing slash so
57758
- * `/a/b/` and `/a/b` compare equal.
57759
- *
57760
- * @param pathname - The raw pathname to normalize.
57761
- * @returns The normalized pathname.
57762
- */ function normalizePathname(pathname) {
57763
- var result;
57764
- if (pathname.length === 0) {
57765
- result = '/';
57766
- } else if (pathname.length > 1 && pathname.endsWith('/')) {
57767
- result = pathname.slice(0, -1);
57768
- } else {
57769
- result = pathname;
57763
+ function detectCycleFor(treeNode, issues) {
57764
+ var seen = new Set();
57765
+ seen.add(treeNode.data.name);
57766
+ var cursor = treeNode.parent;
57767
+ while(cursor){
57768
+ if (seen.has(cursor.data.name)) {
57769
+ issues.push({
57770
+ code: 'CYCLE_DETECTED',
57771
+ severity: 'error',
57772
+ message: "Cycle detected involving `".concat(treeNode.data.name, "` and `").concat(cursor.data.name, "`. Severing the parent link."),
57773
+ file: treeNode.data.file,
57774
+ line: treeNode.data.line,
57775
+ stateName: treeNode.data.name
57776
+ });
57777
+ detachFromParent(treeNode);
57778
+ return;
57779
+ }
57780
+ seen.add(cursor.data.name);
57781
+ cursor = cursor.parent;
57770
57782
  }
57771
- return result;
57772
- }
57773
- /**
57774
- * Splits a path into its non-empty segments (the leading slash is dropped).
57775
- *
57776
- * @param path - The path or URL pattern to split.
57777
- * @returns The ordered segment list, empty for `/`.
57778
- */ function splitSegments(path) {
57779
- var normalized = path.startsWith('/') ? path.slice(1) : path;
57780
- return normalized.length === 0 ? [] : normalized.split('/');
57781
- }
57782
- /**
57783
- * Whether a composed URL contains at least one `:param` or `{param}` segment.
57784
- *
57785
- * @param path - The composed URL pattern.
57786
- * @returns `true` when the pattern declares a parameter.
57787
- */ function hasParamSegment(path) {
57788
- return path.includes(':') || path.includes('{');
57789
57783
  }
57790
- /**
57791
- * Attempts a segment-for-segment match of a route pattern against concrete
57792
- * input segments. `:name` and `{name}` / `{name:type}` segments capture the
57793
- * input value (URL-decoded); literal segments must match exactly.
57794
- *
57795
- * @param route - The route pattern's segments.
57796
- * @param input - The concrete URL's segments.
57797
- * @returns The captured params when every segment matches, else `undefined`.
57798
- */ function tryMatchSegments(route, input) {
57799
- if (route.length !== input.length) {
57800
- return undefined;
57784
+ function detachFromParent(treeNode) {
57785
+ if (!treeNode.parent) return;
57786
+ var idx = treeNode.parent.children.indexOf(treeNode);
57787
+ if (idx >= 0) {
57788
+ treeNode.parent.children.splice(idx, 1);
57801
57789
  }
57802
- var params = {};
57803
- var result = params;
57790
+ treeNode.parent = undefined;
57791
+ }
57792
+ // (4) Compose full URLs (parent walk; root url is not prefixed). UIRouter's
57793
+ // own logic is more nuanced (some states overwrite their parent's URL with
57794
+ // a leading `^`), but this gives a useful approximation for the common case.
57795
+ function composeFullUrls(byName) {
57804
57796
  var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
57805
57797
  try {
57806
- for(var _iterator = route.entries()[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
57807
- var _step_value = _sliced_to_array$1(_step.value, 2), i = _step_value[0], r = _step_value[1];
57808
- var v = input[i];
57809
- if (r.startsWith(':')) {
57810
- var key = r.slice(1);
57811
- params[key] = decodeURIComponent(v);
57812
- } else if (r.startsWith('{') && r.endsWith('}')) {
57813
- var inner = r.slice(1, -1);
57814
- var colonIdx = inner.indexOf(':');
57815
- var key1 = colonIdx >= 0 ? inner.slice(0, colonIdx) : inner;
57816
- params[key1] = decodeURIComponent(v);
57817
- } else if (r !== v) {
57818
- result = undefined;
57819
- break;
57820
- }
57798
+ for(var _iterator = byName.values()[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
57799
+ var treeNode = _step.value;
57800
+ treeNode.fullUrl = composeFullUrl(treeNode);
57821
57801
  }
57822
57802
  } catch (err) {
57823
57803
  _didIteratorError = true;
@@ -57833,31 +57813,16 @@ function _unsupported_iterable_to_array$2(o, minLen) {
57833
57813
  }
57834
57814
  }
57835
57815
  }
57836
- return result;
57837
57816
  }
57838
- /**
57839
- * Extracts param-name segments from a composed UIRouter URL. Recognises:
57840
- * - `:name` (Express-style)
57841
- * - `{name}` (UIRouter type-less)
57842
- * - `{name:type}` and `{name:regex}` (UIRouter typed / regex)
57843
- * Order is preserved; duplicates are de-duplicated by first occurrence.
57844
- *
57845
- * @param fullUrl - Composed URL (e.g. `/{orgId}/users/:userId`) or undefined.
57846
- * @returns The param key list in declaration order, or an empty array.
57847
- */ function extractUrlParamKeys(fullUrl) {
57848
- if (fullUrl === undefined || fullUrl.length === 0) {
57849
- return [];
57850
- }
57851
- var seen = new Set();
57852
- var keys = [];
57817
+ // (5) Identify roots
57818
+ function collectRoots(byName) {
57819
+ var roots = [];
57853
57820
  var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
57854
57821
  try {
57855
- for(var _iterator = fullUrl.split('/')[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
57856
- var segment = _step.value;
57857
- var key = extractParamKeyFromSegment(segment);
57858
- if (key !== undefined && !seen.has(key)) {
57859
- seen.add(key);
57860
- keys.push(key);
57822
+ for(var _iterator = byName.values()[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
57823
+ var treeNode = _step.value;
57824
+ if (!treeNode.parent) {
57825
+ roots.push(treeNode);
57861
57826
  }
57862
57827
  }
57863
57828
  } catch (err) {
@@ -57874,64 +57839,15 @@ function _unsupported_iterable_to_array$2(o, minLen) {
57874
57839
  }
57875
57840
  }
57876
57841
  }
57877
- return keys;
57878
- }
57879
- function extractParamKeyFromSegment(segment) {
57880
- if (segment.startsWith(':')) {
57881
- var key = segment.slice(1);
57882
- return key.length > 0 ? key : undefined;
57883
- }
57884
- if (segment.startsWith('{') && segment.endsWith('}')) {
57885
- var inner = segment.slice(1, -1);
57886
- var colonIdx = inner.indexOf(':');
57887
- var rawKey = colonIdx >= 0 ? inner.slice(0, colonIdx) : inner;
57888
- var key1 = rawKey.trim();
57889
- return key1.length > 0 ? key1 : undefined;
57890
- }
57891
- return undefined;
57892
- }
57893
- /**
57894
- * Matches a pathname against a flat candidate list, preferring a literal
57895
- * (exact composed-URL) match over a parameterised one. A tie at either tier
57896
- * collapses to `ambiguous`; otherwise the closest near-misses are scored and
57897
- * returned in a `none` result.
57898
- *
57899
- * @param input - The candidate entries and the pathname to resolve.
57900
- * @returns A discriminated match / ambiguous / none result.
57901
- */ function matchUrlAgainstEntries(input) {
57902
- var pathname = normalizePathname(input.pathname);
57903
- var literal = matchLiteral(input.entries, pathname);
57904
- var result;
57905
- if (literal.length === 1) {
57906
- var _literal__fullUrl;
57907
- result = {
57908
- kind: 'match',
57909
- via: 'literal',
57910
- value: literal[0].value,
57911
- matchedFullUrl: normalizePathname((_literal__fullUrl = literal[0].fullUrl) !== null && _literal__fullUrl !== void 0 ? _literal__fullUrl : pathname),
57912
- params: {}
57913
- };
57914
- } else if (literal.length > 1) {
57915
- result = {
57916
- kind: 'ambiguous',
57917
- values: literal.map(function(e) {
57918
- return e.value;
57919
- })
57920
- };
57921
- } else {
57922
- result = matchParamOrNone(input.entries, pathname);
57923
- }
57924
- return result;
57842
+ return roots;
57925
57843
  }
57926
- function matchLiteral(entries, pathname) {
57927
- var out = [];
57844
+ // (6) Sort children deterministically by name
57845
+ function sortChildren(byName, roots) {
57928
57846
  var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
57929
57847
  try {
57930
- for(var _iterator = entries[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
57931
- var entry = _step.value;
57932
- if (entry.fullUrl !== undefined && normalizePathname(entry.fullUrl) === pathname) {
57933
- out.push(entry);
57934
- }
57848
+ for(var _iterator = byName.values()[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
57849
+ var treeNode = _step.value;
57850
+ treeNode.children.sort(compareByName);
57935
57851
  }
57936
57852
  } catch (err) {
57937
57853
  _didIteratorError = true;
@@ -57947,24 +57863,135 @@ function matchLiteral(entries, pathname) {
57947
57863
  }
57948
57864
  }
57949
57865
  }
57950
- return out;
57866
+ roots.sort(compareByName);
57951
57867
  }
57952
- function matchParamOrNone(entries, pathname) {
57953
- var inputSegments = splitSegments(pathname);
57954
- var hits = [];
57868
+ // (7) Freeze: convert MutableTreeNode → RouteTreeNode (children: readonly).
57869
+ function freezeTree(roots) {
57870
+ var frozen = new Map();
57871
+ var freeze = function freeze1(mut) {
57872
+ var existing = frozen.get(mut.data.name);
57873
+ if (existing) return existing;
57874
+ var placeholder = {
57875
+ data: mut.data,
57876
+ fullUrl: mut.fullUrl,
57877
+ parent: undefined,
57878
+ children: []
57879
+ };
57880
+ frozen.set(mut.data.name, placeholder);
57881
+ placeholder.parent = mut.parent ? freeze(mut.parent) : undefined;
57882
+ placeholder.children = mut.children.map(freeze);
57883
+ return placeholder;
57884
+ };
57885
+ var frozenRoots = roots.map(freeze);
57886
+ return {
57887
+ frozen: frozen,
57888
+ frozenRoots: frozenRoots
57889
+ };
57890
+ }
57891
+ function resolveParentName(node, byName) {
57892
+ if (node.explicitParent) {
57893
+ return node.explicitParent;
57894
+ }
57895
+ var lookupName = node.name.endsWith('.**') ? node.name.slice(0, -3) : node.name;
57896
+ var lastDot = lookupName.lastIndexOf('.');
57897
+ if (lastDot < 0) {
57898
+ return undefined;
57899
+ }
57900
+ var candidate = lookupName.slice(0, lastDot);
57901
+ // Confirm the candidate exists; otherwise fall back to undefined so the
57902
+ // orphan check fires.
57903
+ if (byName.has(candidate)) {
57904
+ return candidate;
57905
+ }
57906
+ // Even if the candidate doesn't exist, return it so the orphan logic can
57907
+ // surface an informative message.
57908
+ return candidate;
57909
+ }
57910
+ function composeFullUrl(node) {
57911
+ var segments = [];
57912
+ var cursor = node;
57913
+ while(cursor){
57914
+ if (cursor.data.url !== undefined) {
57915
+ segments.unshift(cursor.data.url);
57916
+ }
57917
+ cursor = cursor.parent;
57918
+ }
57919
+ if (segments.length === 0) {
57920
+ return undefined;
57921
+ }
57922
+ // Join segments and collapse double slashes (root url '/' followed by
57923
+ // child '/foo' would otherwise yield '//foo').
57924
+ var joined = segments.join('');
57925
+ // Strip any UIRouter query/hash suffix (e.g. `/:schoolJob?slotIndex`) so the
57926
+ // stored `fullUrl` is path-only — keeping build-time param extraction and the
57927
+ // runtime pathname matcher in agreement.
57928
+ var collapsed = stripUrlQueryAndHash(joined).replaceAll(/\/{2,}/g, '/');
57929
+ return collapsed.length === 0 ? '/' : collapsed;
57930
+ }
57931
+ function compareByName(a, b) {
57932
+ if (a.data.name < b.data.name) {
57933
+ return -1;
57934
+ }
57935
+ if (a.data.name > b.data.name) {
57936
+ return 1;
57937
+ }
57938
+ return 0;
57939
+ }
57940
+
57941
+ /**
57942
+ * Walks every supplied source through the extractor and emits a flat node and
57943
+ * issue list, used when the caller has already gathered a complete glob/file
57944
+ * set in memory.
57945
+ *
57946
+ * @param sources - The in-memory sources to extract from.
57947
+ * @returns The merged extraction nodes, issues, and processed file count.
57948
+ */ function resolveRouteSources(sources) {
57949
+ var nodes = [];
57950
+ var issues = [];
57955
57951
  var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
57956
57952
  try {
57957
- for(var _iterator = entries[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
57958
- var entry = _step.value;
57959
- if (entry.fullUrl === undefined || !hasParamSegment(entry.fullUrl)) {
57960
- continue;
57953
+ for(var _iterator = sources[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
57954
+ var source = _step.value;
57955
+ var extracted = extractFile(source);
57956
+ var _iteratorNormalCompletion1 = true, _didIteratorError1 = false, _iteratorError1 = undefined;
57957
+ try {
57958
+ for(var _iterator1 = extracted.nodes[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true){
57959
+ var node = _step1.value;
57960
+ nodes.push(node);
57961
+ }
57962
+ } catch (err) {
57963
+ _didIteratorError1 = true;
57964
+ _iteratorError1 = err;
57965
+ } finally{
57966
+ try {
57967
+ if (!_iteratorNormalCompletion1 && _iterator1.return != null) {
57968
+ _iterator1.return();
57969
+ }
57970
+ } finally{
57971
+ if (_didIteratorError1) {
57972
+ throw _iteratorError1;
57973
+ }
57974
+ }
57961
57975
  }
57962
- var params = tryMatchSegments(splitSegments(entry.fullUrl), inputSegments);
57963
- if (params) {
57964
- hits.push({
57965
- entry: entry,
57966
- params: params
57967
- });
57976
+ var _iteratorNormalCompletion2 = true, _didIteratorError2 = false, _iteratorError2 = undefined;
57977
+ try {
57978
+ for(var _iterator2 = extracted.issues[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true){
57979
+ var issue = _step2.value;
57980
+ issues.push(issue);
57981
+ }
57982
+ } catch (err) {
57983
+ _didIteratorError2 = true;
57984
+ _iteratorError2 = err;
57985
+ } finally{
57986
+ try {
57987
+ if (!_iteratorNormalCompletion2 && _iterator2.return != null) {
57988
+ _iterator2.return();
57989
+ }
57990
+ } finally{
57991
+ if (_didIteratorError2) {
57992
+ throw _iteratorError2;
57993
+ }
57994
+ }
57968
57995
  }
57969
57996
  }
57970
57997
  } catch (err) {
@@ -57981,66 +58008,28 @@ function matchParamOrNone(entries, pathname) {
57981
58008
  }
57982
58009
  }
57983
58010
  }
57984
- var result;
57985
- if (hits.length === 1) {
57986
- var _hits__entry_fullUrl;
57987
- result = {
57988
- kind: 'match',
57989
- via: 'param',
57990
- value: hits[0].entry.value,
57991
- matchedFullUrl: normalizePathname((_hits__entry_fullUrl = hits[0].entry.fullUrl) !== null && _hits__entry_fullUrl !== void 0 ? _hits__entry_fullUrl : pathname),
57992
- params: hits[0].params
57993
- };
57994
- } else if (hits.length > 1) {
57995
- result = {
57996
- kind: 'ambiguous',
57997
- values: hits.map(function(h) {
57998
- return h.entry.value;
57999
- })
58000
- };
58001
- } else {
58002
- result = {
58003
- kind: 'none',
58004
- candidates: scoreCandidates(entries, pathname)
58005
- };
58006
- }
58011
+ var result = {
58012
+ nodes: nodes,
58013
+ issues: issues,
58014
+ filesChecked: sources.length
58015
+ };
58007
58016
  return result;
58008
58017
  }
58009
58018
  /**
58010
- * Scores every candidate by shared leading segments (literal segment = 2,
58011
- * param segment = 1, mismatch stops scoring) and returns the top 5 values.
58019
+ * Returns the relative module specifiers imported by `source` used to plan
58020
+ * the next round of file reads in transitive walking. Specifiers are
58021
+ * left untouched (no `.ts` resolution); the caller normalizes them.
58012
58022
  *
58013
- * @param entries - The candidate entries to score.
58014
- * @param pathname - The pathname being resolved.
58015
- * @returns Up to five closest candidate values, best first.
58016
- */ function scoreCandidates(entries, pathname) {
58017
- var segments = splitSegments(normalizePathname(pathname));
58018
- var scored = [];
58023
+ * @param source - The in-memory source to inspect.
58024
+ * @returns The relative specifiers in original-source order.
58025
+ */ function computeRelativeSpecifiers(source) {
58026
+ var extracted = extractFile(source);
58027
+ var out = [];
58019
58028
  var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
58020
58029
  try {
58021
- for(var _iterator = entries[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
58022
- var entry = _step.value;
58023
- if (entry.fullUrl === undefined) {
58024
- continue;
58025
- }
58026
- var candidateSegments = splitSegments(entry.fullUrl);
58027
- var score = 0;
58028
- var maxIndex = Math.min(segments.length, candidateSegments.length);
58029
- for(var i = 0; i < maxIndex; i += 1){
58030
- if (segments[i] === candidateSegments[i]) {
58031
- score += 2;
58032
- } else if (candidateSegments[i].startsWith(':') || candidateSegments[i].startsWith('{')) {
58033
- score += 1;
58034
- } else {
58035
- break;
58036
- }
58037
- }
58038
- if (score > 0) {
58039
- scored.push({
58040
- value: entry.value,
58041
- score: score
58042
- });
58043
- }
58030
+ for(var _iterator = extracted.importedFromRelative[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
58031
+ var imp = _step.value;
58032
+ out.push(imp.moduleSpecifier);
58044
58033
  }
58045
58034
  } catch (err) {
58046
58035
  _didIteratorError = true;
@@ -58056,12 +58045,26 @@ function matchParamOrNone(entries, pathname) {
58056
58045
  }
58057
58046
  }
58058
58047
  }
58059
- scored.sort(function(a, b) {
58060
- return b.score - a.score;
58061
- });
58062
- return scored.slice(0, 5).map(function(s) {
58063
- return s.value;
58064
- });
58048
+ return out;
58049
+ }
58050
+
58051
+ /**
58052
+ * Pure tree-loading entry point. Resolves the supplied source list and builds
58053
+ * the parent/child tree in one step so callers can stay thin.
58054
+ *
58055
+ * @param args - The in-memory sources to process.
58056
+ * @returns The constructed route tree with extraction issues attached.
58057
+ */ function loadRouteTree(args) {
58058
+ var resolved = resolveRouteSources(args.sources);
58059
+ var tree = buildRouteTree(resolved.nodes, resolved.issues);
58060
+ var result = {
58061
+ roots: tree.roots,
58062
+ byName: tree.byName,
58063
+ issues: tree.issues,
58064
+ filesChecked: resolved.filesChecked,
58065
+ nodeCount: tree.nodeCount
58066
+ };
58067
+ return result;
58065
58068
  }
58066
58069
 
58067
58070
  function _tagged_template_literal(strings, raw) {
@@ -58288,6 +58291,13 @@ function _unsupported_iterable_to_array$1(o, minLen) {
58288
58291
  * promoted to `<collectionName>/<id>` at runtime via the model identity).
58289
58292
  * - `gb/:id/gbe/{authUid}` — alternating literal / placeholder segments (even
58290
58293
  * count) → `kind: 'key'` (a full FirestoreModelKey for a subcollection model).
58294
+ * An odd (id) segment may also be a `{const:<id>}` token for a fixed/singleton
58295
+ * id (e.g. `wk/:uid/wkn/{const:0}`); it is normalized to the bare literal in
58296
+ * the parsed `keyTemplate` so the runtime emits it verbatim, while a forgotten
58297
+ * `:` (a bare `note`) still fails as malformed.
58298
+ * - `{flatKey:<param>}` — single token → `kind: 'flatKey'`: the `<param>` URL
58299
+ * value IS a whole two-way-flat FirestoreModelKey (`r_<id>_cs_<id>_d_<id>`),
58300
+ * un-flattened at runtime. For pages that pack a full key into one URL segment.
58291
58301
  * - (absent, list tag) → `kind: 'list'`.
58292
58302
  *
58293
58303
  * This module is deliberately runtime-dependency-free (no ts-morph): the same
@@ -58298,6 +58308,14 @@ function _unsupported_iterable_to_array$1(o, minLen) {
58298
58308
  */ var MODEL_TYPE_RE = RegExp("^[a-zA-Z][a-zA-Z0-9]*$", "u");
58299
58309
  var LITERAL_SEGMENT_RE = RegExp("^[a-zA-Z0-9][a-zA-Z0-9_-]*$", "u");
58300
58310
  var AUTH_UID_PLACEHOLDER = '{authUid}';
58311
+ /**
58312
+ * Matches a `{const:<id>}` fixed-id token (e.g. `{const:0}`), capturing the
58313
+ * literal id. The id obeys the same shape as a literal collection segment.
58314
+ */ var CONST_TOKEN_RE = RegExp("^\\{const:([a-zA-Z0-9][a-zA-Z0-9_-]*)\\}$", "u");
58315
+ /**
58316
+ * Matches a `{flatKey:<param>}` token (e.g. `{flatKey:region}`), capturing the
58317
+ * route param name whose URL value holds a whole two-way-flat FirestoreModelKey.
58318
+ */ var FLAT_KEY_TOKEN_RE = RegExp("^\\{flatKey:([a-zA-Z_][a-zA-Z0-9_]*)\\}$", "u");
58301
58319
  /**
58302
58320
  * The bare `@dbxRouteModel` tag name (without the leading `@`).
58303
58321
  */ var ROUTE_MODEL_TAG = 'dbxRouteModel';
@@ -58377,7 +58395,7 @@ function parseModelTag(tokens, description) {
58377
58395
  model: {
58378
58396
  modelType: tokens[0],
58379
58397
  kind: parsedKey.kind,
58380
- keyTemplate: tokens[1],
58398
+ keyTemplate: parsedKey.keyTemplate,
58381
58399
  description: description,
58382
58400
  routeParams: parsedKey.routeParams
58383
58401
  }
@@ -58412,17 +58430,29 @@ function parseKeyTemplate(keyTemplate) {
58412
58430
  return result;
58413
58431
  }
58414
58432
  function parseSingleSegmentKey(segment, keyTemplate) {
58433
+ var flatKeyParam = flatKeyTokenParam(segment);
58415
58434
  var placeholder = placeholderParam(segment);
58416
58435
  var result;
58417
- if (placeholder === undefined) {
58436
+ if (flatKeyParam !== undefined) {
58437
+ // The whole key lives in one URL param; the runtime un-flattens it.
58438
+ result = {
58439
+ ok: true,
58440
+ kind: 'flatKey',
58441
+ keyTemplate: keyTemplate,
58442
+ routeParams: [
58443
+ flatKeyParam
58444
+ ]
58445
+ };
58446
+ } else if (placeholder === undefined) {
58418
58447
  result = {
58419
58448
  ok: false,
58420
- message: "Single-segment key template `".concat(keyTemplate, "` must be a placeholder (`:param` or `").concat(AUTH_UID_PLACEHOLDER, "`).")
58449
+ message: "Single-segment key template `".concat(keyTemplate, "` must be a placeholder (`:param` or `").concat(AUTH_UID_PLACEHOLDER, "`) or a flattened-key token (`{flatKey:<param>}`).")
58421
58450
  };
58422
58451
  } else {
58423
58452
  result = {
58424
58453
  ok: true,
58425
58454
  kind: 'id',
58455
+ keyTemplate: keyTemplate,
58426
58456
  routeParams: placeholder.routeParam === undefined ? [] : [
58427
58457
  placeholder.routeParam
58428
58458
  ]
@@ -58432,6 +58462,10 @@ function parseSingleSegmentKey(segment, keyTemplate) {
58432
58462
  }
58433
58463
  function parseAlternatingKey(segments, keyTemplate) {
58434
58464
  var routeParams = [];
58465
+ // The normalized template substitutes any `{const:<id>}` token back to its
58466
+ // bare literal so the runtime `resolveFullKey` (which emits non-placeholder
58467
+ // segments verbatim) round-trips without needing to understand the token.
58468
+ var normalizedSegments = [];
58435
58469
  var message;
58436
58470
  var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
58437
58471
  try {
@@ -58442,14 +58476,20 @@ function parseAlternatingKey(segments, keyTemplate) {
58442
58476
  message = "Key template `".concat(keyTemplate, "` segment `").concat(segment, "` must be a literal collection name.");
58443
58477
  break;
58444
58478
  }
58479
+ normalizedSegments.push(segment);
58445
58480
  } else {
58446
58481
  var placeholder = placeholderParam(segment);
58447
- if (placeholder === undefined) {
58448
- message = "Key template `".concat(keyTemplate, "` segment `").concat(segment, "` must be a placeholder (`:param` or `").concat(AUTH_UID_PLACEHOLDER, "`).");
58482
+ var constId = constTokenId(segment);
58483
+ if (placeholder !== undefined) {
58484
+ if (placeholder.routeParam !== undefined) {
58485
+ routeParams.push(placeholder.routeParam);
58486
+ }
58487
+ normalizedSegments.push(segment);
58488
+ } else if (constId === undefined) {
58489
+ message = "Key template `".concat(keyTemplate, "` segment `").concat(segment, "` must be a placeholder (`:param` or `").concat(AUTH_UID_PLACEHOLDER, "`) or a fixed id (`{const:<id>}`).");
58449
58490
  break;
58450
- }
58451
- if (placeholder.routeParam !== undefined) {
58452
- routeParams.push(placeholder.routeParam);
58491
+ } else {
58492
+ normalizedSegments.push(constId);
58453
58493
  }
58454
58494
  }
58455
58495
  }
@@ -58470,6 +58510,7 @@ function parseAlternatingKey(segments, keyTemplate) {
58470
58510
  return message === undefined ? {
58471
58511
  ok: true,
58472
58512
  kind: 'key',
58513
+ keyTemplate: normalizedSegments.join('/'),
58473
58514
  routeParams: routeParams
58474
58515
  } : {
58475
58516
  ok: false,
@@ -58499,6 +58540,28 @@ function parseAlternatingKey(segments, keyTemplate) {
58499
58540
  }
58500
58541
  return result;
58501
58542
  }
58543
+ /**
58544
+ * Extracts the literal id from a `{const:<id>}` fixed-id token, used for a
58545
+ * fixed/singleton subcollection id at an odd key-template position. Returns
58546
+ * `undefined` for any non-`{const:…}` segment.
58547
+ *
58548
+ * @param segment - The single key-template segment to classify.
58549
+ * @returns The captured literal id, or `undefined` when not a const token.
58550
+ */ function constTokenId(segment) {
58551
+ var match = CONST_TOKEN_RE.exec(segment);
58552
+ return match === null ? undefined : match[1];
58553
+ }
58554
+ /**
58555
+ * Extracts the route param name from a `{flatKey:<param>}` token, whose URL
58556
+ * value is a whole two-way-flat FirestoreModelKey un-flattened at runtime.
58557
+ * Returns `undefined` for any non-`{flatKey:…}` segment.
58558
+ *
58559
+ * @param segment - The single key-template segment to classify.
58560
+ * @returns The captured route param name, or `undefined` when not a flatKey token.
58561
+ */ function flatKeyTokenParam(segment) {
58562
+ var match = FLAT_KEY_TOKEN_RE.exec(segment);
58563
+ return match === null ? undefined : match[1];
58564
+ }
58502
58565
 
58503
58566
  // MARK: Component extraction
58504
58567
  /**
@@ -58641,7 +58704,7 @@ function _unsupported_iterable_to_array(o, minLen) {
58641
58704
  * Version stamp embedded in `route.manifest.json`. Runtime loaders refuse
58642
58705
  * manifests whose `version` does not match. Mirror in firebase-server/mcp's
58643
58706
  * `ROUTE_MANIFEST_VERSION` — bump both together.
58644
- */ var ROUTE_MANIFEST_VERSION = 1;
58707
+ */ var ROUTE_MANIFEST_VERSION = 2;
58645
58708
  /**
58646
58709
  * Builds the route manifest from a set of app sources.
58647
58710
  *
@@ -59775,4 +59838,4 @@ function printPaginatedOutput(input) {
59775
59838
  })();
59776
59839
  }
59777
59840
 
59778
- export { ACTIONS_SCAN_CONFIG_FILENAME, ACTION_ENTRY_ROLES, ACTION_ROLE_ORDER, ActionDirectiveEntry, ActionEntry, ActionInputEntry, ActionManifest, ActionOutputEntry, ActionStateEntry, ActionStoreEntry, ActionStoreMethodEntry, ActionStoreObservableEntry, ActionsScanConfig, ActionsScanSection, BUILTIN_AUTH_CLAIMS, BUILTIN_AUTH_ROLES, BUILTIN_AUTH_SCOPES, CALL_MODEL_API_PATH, CALL_PASSTHROUGH_COMMAND, CLI_EXIT_CODE_AUTH, CLI_EXIT_CODE_HANDLER, CORE_TOPICS, CORE_TOPICS_SET, CSS_UTILITIES_SCAN_CONFIG_FILENAME, CSS_UTILITY_ROLES, CSS_UTILITY_SCOPES, CliError, CssUtilitiesScanConfig, CssUtilitiesScanSection, CssUtilityDeclaration, CssUtilityEntry, CssUtilityManifest, DBX_ACTION_STATE_VALUES, DBX_DOCS_UI_EXAMPLES_SCAN_CONFIG_FILENAME, DBX_DOCS_UI_EXAMPLE_USE_KINDS, DEFAULT_ACTIONS_SCAN_OUT_PATH, DEFAULT_ACTION_COMMAND_NAME, DEFAULT_CLI_HTTP_TIMEOUT_MS, DEFAULT_CLI_OIDC_SCOPES, DEFAULT_CLI_REDIRECT_URI, DEFAULT_CLI_SECRET_PATTERNS, DEFAULT_CSS_UTILITIES_SCAN_OUT_PATH, DEFAULT_DBX_DOCS_UI_EXAMPLES_SCAN_OUT_PATH, DEFAULT_FILTERS_SCAN_OUT_PATH, DEFAULT_FORGE_FIELDS_SCAN_OUT_PATH, DEFAULT_MANIFEST_HELP_DATA_FORMAT, DEFAULT_MANIFEST_HELP_MODE, DEFAULT_MANIFEST_MODEL_COMMAND_NAME, DEFAULT_MODEL_DECODE_COMMAND_NAME, DEFAULT_MODEL_INFO_COMMAND_NAME, DEFAULT_MODEL_SNAPSHOT_FIELDS_SCAN_OUT_PATH, DEFAULT_PIPES_SCAN_OUT_PATH, DEFAULT_SCAN_OUT_PATH, DEFAULT_SPECIFIER_KEY, DEFAULT_UI_COMPONENTS_SCAN_OUT_PATH, DEFAULT_UTILS_SCAN_OUT_PATH, DOWNSTREAM_CLUSTERS, DUMP_MERGE_MODES, DUMP_OUTPUT_MODES, DbxDocsUiExampleEntry, DbxDocsUiExampleManifest, DbxDocsUiExampleUseEntry, DbxDocsUiExamplesScanConfig, DbxDocsUiExamplesScanSection, DbxMcpConfig, EMPTY_ACTION_REGISTRY, EMPTY_AUTH_REGISTRY, EMPTY_CSS_UTILITY_REGISTRY, EMPTY_DBX_DOCS_UI_EXAMPLES_REGISTRY, EMPTY_FILTER_REGISTRY, EMPTY_FORGE_FIELD_REGISTRY, EMPTY_MODEL_SNAPSHOT_FIELD_REGISTRY, EMPTY_PIPE_REGISTRY, EMPTY_SEMANTIC_TYPE_REGISTRY, EMPTY_TOKEN_REGISTRY, EMPTY_UI_COMPONENT_REGISTRY, EMPTY_UTIL_REGISTRY, ExtractedDbxDocsUiExampleEntrySchema, ExtractedEntrySchema, ExtractedForgeFieldEntrySchema, ExtractedUiEntrySchema, FILTERS_SCAN_CONFIG_FILENAME, FILTER_KINDS, FILTER_KIND_ORDER, FIREBASE_MODELS, FIREBASE_MODEL_GROUPS, FORGE_FIELDS_SCAN_CONFIG_FILENAME, FORGE_FIELD_ARRAY_OUTPUTS, FORGE_FIELD_COMPOSITE_SUFFIXES, FORGE_FIELD_TIERS, FORGE_FIELD_WRAPPER_PATTERNS, FORM_FIELDS, FORM_TIER_ORDER, FilterDirectiveEntry, FilterEntry, FilterInputEntry, FilterManifest, FilterPatternEntry, FiltersScanConfig, FiltersScanSection, ForgeFieldEntry, ForgeFieldManifest, ForgeFieldPropertyEntry, ForgeFieldsScanConfig, ForgeFieldsScanSection, GET_COMMAND, GET_MANY_COMMAND, MAX_MODEL_ACCESS_MULTI_READ_KEYS, MCP_CALL_TYPE_ABBREVIATIONS, MCP_MANIFEST_VERSION, MCP_TOOL_NAME_MAX_LENGTH, MCP_TOOL_NAME_WARN_LENGTH, MODEL_ARCHETYPES, MODEL_ARCHETYPE_ADDON_SLUGS, MODEL_ARCHETYPE_SYNC_MODES, MODEL_SNAPSHOT_FIELDS_SCAN_CONFIG_FILENAME, MODEL_SNAPSHOT_FIELD_KINDS, MODEL_WRITE_OIDC_SCOPES, MULTIPLE_PAGES_OUTPUT_MODES, ModelSnapshotFieldEntry, ModelSnapshotFieldManifest, ModelSnapshotFieldParamEntry, ModelSnapshotFieldsScanConfig, ModelSnapshotFieldsScanSection, PIPES_SCAN_CONFIG_FILENAME, PIPE_CATEGORIES, PIPE_CATEGORY_ORDER, PIPE_PURITIES, PROMPT_CANCELLED_ERROR_CODE, PipeArgEntry, PipeEntry, PipeManifest, PipesScanConfig, PipesScanSection, RESERVED_MODEL_FOLDERS, ROUTE_MANIFEST_VERSION, ROUTE_MODEL_LIST_TAG, ROUTE_MODEL_TAG, SCAN_CONFIG_FILENAME$1 as SCAN_CONFIG_FILENAME, SERVICE_TOKEN_REQUIRED_OIDC_SCOPES, STANDARD_GLOBAL_OPTION_NAMES, SemanticTypeEntry, SemanticTypeManifest, SemanticTypeScanConfig, TOKEN_ROLES, TOKEN_SOURCES, TokenDefaults, TokenEntry, TokenManifest, UI_COMPONENTS_SCAN_CONFIG_FILENAME, UI_COMPONENT_CATEGORIES, UI_COMPONENT_KINDS, UTILS_SCAN_CONFIG_FILENAME, UTIL_KINDS, UiComponentEntry, UiComponentInputEntry, UiComponentManifest, UiComponentOutputEntry, UiComponentsScanConfig, UiComponentsScanSection, UtilEntry, UtilManifest, UtilParamEntry, UtilsScanConfig, UtilsScanSection, WORKSPACE_AUTH_APPS, WORKSPACE_AUTH_CLAIMS, WORKSPACE_FACTORY_SCAN_EXCLUDE, WORKSPACE_FACTORY_SCAN_INCLUDE, abbreviateMcpCallType, applyEnvVarOverrides, buildActionCommands, buildActionsManifest, buildAuthorizationUrl, buildCliPaths, buildCssUtilitiesManifest, buildDbxDocsUiExamplesManifest, buildDisambiguatedMcpToolName, buildDispatcherCreditByName, buildDumpFilePath, buildErrorOutput, buildFiltersManifest, buildForgeFieldsManifest, buildManifest, buildManifestCommands, buildMcpToolName, buildModelDecodeCommand, buildModelInfoCommand, buildModelSnapshotFieldsManifest, buildOidcDiscoveryCandidates, buildPipesManifest, buildRouteManifest, buildRouteTree, buildScanProject, buildUiComponentsManifest, buildUtilsManifest, callModelOverHttp, clearDownstreamCatalogCache, collectClassPropertiesWithInheritance, computeRelativeSpecifiers, configureCliErrorMapper, configureCliSecretPatterns, configureOutputOptions, createActionCommand, createActionRegistry, createActionRegistryFromEntries, createAuthCommand, createAuthMiddleware, createAuthRegistryFromEntries, createCallModelCommand, createCli, createCliContext, createCliTokenCacheStore, createContextSlot, createCssUtilityRegistry, createCssUtilityRegistryFromEntries, createDbxDocsUiExamplesRegistry, createDbxDocsUiExamplesRegistryFromEntries, createDoctorCommand, createEnvCommand, createFilterRegistry, createFilterRegistryFromEntries, createForgeFieldRegistry, createForgeFieldRegistryFromEntries, createModelSnapshotFieldRegistry, createModelSnapshotFieldRegistryFromEntries, createOutputCommand, createOutputMiddleware, createPassthroughAuthMiddleware, createPipeRegistry, createPipeRegistryFromEntries, createSemanticTypeRegistry, createSemanticTypeRegistryFromEntries, createTokenRegistry, createTokenRegistryFromEntries, createUiComponentRegistry, createUiComponentRegistryFromEntries, createUtilRegistry, createUtilRegistryFromEntries, decodeFirestoreModelKey, defaultDoctorChecks, defaultGlobber, defaultReadFile, deriveOptionalFromName, detectDataHelpFormat, detectHelpMode, discoverDownstreamFirebasePackages, discoverDownstreamPackages, discoverOidcMetadata, dumpTimestamp, exchangeAuthorizationCode, expandModelKeys, extractActionEntries, extractAngularInputs, extractAngularOutputs, extractAuthEntries, extractComponentRouteModelTags, extractCssUtilityEntries, extractDbxDocsUiExampleEntries, extractEntries, extractFile, extractFilterEntries, extractForgeFieldEntries, extractModelSnapshotFieldEntries, extractModels, extractPipeEntries, extractUiEntries, extractUrlParamKeys, extractUtilEntries, fetchSessionInfo, fetchUserInfo, filterReadOnlyModelScopes, findAndLoadConfig, findCliEnvDefault, findCliModelManifestEntry, flattenList, generateOAuthState, generatePkceMaterial, getBundledManifestsDirectory, getCliContext, getCliEnvVarName, getCliTimeoutMs, getDefaultBundledActionManifestPaths, getDefaultBundledCssUtilityManifestPaths, getDefaultBundledDbxDocsUiExamplesManifestPaths, getDefaultBundledFilterManifestPaths, getDefaultBundledForgeFieldManifestPaths, getDefaultBundledManifestPaths, getDefaultBundledModelFirebaseIndexManifestPaths, getDefaultBundledModelSnapshotFieldManifestPaths, getDefaultBundledPipeManifestPaths, getDefaultBundledTokenManifestPaths, getDefaultBundledUiManifestPaths, getDefaultBundledUtilManifestPaths, getDownstreamCatalog, getFirebaseBucketKeyedByIdModels, getFirebaseDistrictKeyedByIdModels, getFirebaseExternalIdKeyedByIdModels, getFirebaseModel, getFirebaseModelByPrefix, getFirebaseModelGroup, getFirebaseModelGroups, getFirebaseModels, getFirebaseModelsByArchetype, getFirebasePrefixCatalog, getFirebaseRegionKeyedByIdModels, getFirebaseSubcollectionsOf, getFirebaseUserKeyedByIdModels, getFirebaseUserRelatedModels, getModelArchetypeBySlug, getModelArchetypesByAxisValue, getModelArchetypesByCollectionKind, getModelArchetypesBySyncMode, getModelOverHttp, getMultipleModelsOverHttp, getMultipleModelsOverHttpChunked, getOutputOptions, globToRegex, hasParamSegment, isCliEnvConfigComplete, isCliVerbose, isCoreTopic, isStdinSentinel, isTokenExpired, isVisibleProperty, iterateDbxCliCallModel, loadActionManifests, loadActionRegistry, loadAuthRegistry, loadCliConfig, loadCssUtilityRegistry, loadDbxDocsUiExamplesManifests, loadDbxDocsUiExamplesRegistry, loadFilterManifests, loadFilterRegistry, loadForgeFieldManifests, loadForgeFieldRegistry, loadModelFirebaseIndexManifests, loadModelFirebaseIndexRegistry, loadModelSnapshotFieldManifests, loadModelSnapshotFieldRegistry, loadPackageName, loadPipeManifests, loadPipeRegistry, loadRouteTree, loadScanSection, loadSemanticTypeManifests, loadSemanticTypeRegistry, loadTokenManifests, loadTokenRegistry, loadUiComponentManifests, loadUiComponentRegistry, loadUtilManifests, loadUtilRegistry, maskEnv, maskSecret, matchUrlAgainstEntries, mcpManifestKey, mergeCliConfig, mergeCliEnvWithDefault, mergeOutputConfig, normalizePathname, openStreamingDump, outputError, outputResult, packageNameToSlug, parseAnnotation, parseDeclarations$1 as parseDeclarations, parseFirestoreModelIdentityArgs, parseGetArgs, parseGetManyArgs, parsePastedRedirect, parseRouteModelTag, parseScanArgs, pickFields, promptLine, readAllStdin, readDirectiveDecorator, readEnvTokenEntry, readPropertyDescription, readSelector, readStdinTokens, readStringProperty, refreshAccessToken, renderDecodedKey, renderModelManifestEntry, renderModelManifestFields, renderModelManifestList, requireCliContext, resolveActiveEnvName, resolveCliEnv, resolveCliEnvOrThrow, resolveCliModel, resolveComponentSourceFromSources, resolveDemoClaimsPath, resolveExplicitFirebasePackages, resolveExtendsName, resolveModelArchetype, resolveOutputConfig, resolvePerModelGetKey, resolveRouteSources, revokeToken, runActionsScanCli, runCli, runCssUtilitiesScanCli, runDbxDocsUiExamplesScanCli, runFiltersScanCli, runForgeFieldsScanCli, runModelFirebaseIndexScanCli, runModelSnapshotFieldsScanCli, runPaginatedList, runPipesScanCli, runScanCli, runScanCliBase, runUiComponentsScanCli, runUtilsScanCli, sanitizeString, saveCliConfig, scanFactoryReferences, scoreCandidates, serializeActionManifest, serializeCssUtilityManifest, serializeDbxDocsUiExamplesManifest, serializeFilterManifest, serializeForgeFieldManifest, serializeManifest, serializeModelSnapshotFieldsManifest, serializePipeManifest, serializeUiComponentManifest, serializeUtilManifest, setCliContext, setCliTimeoutMs, setCliVerbose, splitListTagText$1 as splitListTagText, splitSegments, toActionEntryInfo, toFilterEntryInfo, toFormFieldInfo, tracedFetch, tryMatchSegments, unwrapFenced, validateMcpToolName, verboseLog, withCallModelArgs, withEnv, withMultiplePages, withOutput, withServiceTokenScopes, wrapCommandHandler, wrapSyncCommandHandler };
59841
+ export { ACTIONS_SCAN_CONFIG_FILENAME, ACTION_ENTRY_ROLES, ACTION_ROLE_ORDER, ActionDirectiveEntry, ActionEntry, ActionInputEntry, ActionManifest, ActionOutputEntry, ActionStateEntry, ActionStoreEntry, ActionStoreMethodEntry, ActionStoreObservableEntry, ActionsScanConfig, ActionsScanSection, BUILTIN_AUTH_CLAIMS, BUILTIN_AUTH_ROLES, BUILTIN_AUTH_SCOPES, CALL_MODEL_API_PATH, CALL_PASSTHROUGH_COMMAND, CLI_EXIT_CODE_AUTH, CLI_EXIT_CODE_HANDLER, CORE_TOPICS, CORE_TOPICS_SET, CSS_UTILITIES_SCAN_CONFIG_FILENAME, CSS_UTILITY_ROLES, CSS_UTILITY_SCOPES, CliError, CssUtilitiesScanConfig, CssUtilitiesScanSection, CssUtilityDeclaration, CssUtilityEntry, CssUtilityManifest, DBX_ACTION_STATE_VALUES, DBX_DOCS_UI_EXAMPLES_SCAN_CONFIG_FILENAME, DBX_DOCS_UI_EXAMPLE_USE_KINDS, DEFAULT_ACTIONS_SCAN_OUT_PATH, DEFAULT_ACTION_COMMAND_NAME, DEFAULT_CLI_HTTP_TIMEOUT_MS, DEFAULT_CLI_OIDC_SCOPES, DEFAULT_CLI_REDIRECT_URI, DEFAULT_CLI_SECRET_PATTERNS, DEFAULT_CSS_UTILITIES_SCAN_OUT_PATH, DEFAULT_DBX_DOCS_UI_EXAMPLES_SCAN_OUT_PATH, DEFAULT_FILTERS_SCAN_OUT_PATH, DEFAULT_FORGE_FIELDS_SCAN_OUT_PATH, DEFAULT_MANIFEST_HELP_DATA_FORMAT, DEFAULT_MANIFEST_HELP_MODE, DEFAULT_MANIFEST_MODEL_COMMAND_NAME, DEFAULT_MODEL_DECODE_COMMAND_NAME, DEFAULT_MODEL_INFO_COMMAND_NAME, DEFAULT_MODEL_SNAPSHOT_FIELDS_SCAN_OUT_PATH, DEFAULT_PIPES_SCAN_OUT_PATH, DEFAULT_SCAN_OUT_PATH, DEFAULT_SPECIFIER_KEY, DEFAULT_UI_COMPONENTS_SCAN_OUT_PATH, DEFAULT_UTILS_SCAN_OUT_PATH, DOWNSTREAM_CLUSTERS, DUMP_MERGE_MODES, DUMP_OUTPUT_MODES, DbxDocsUiExampleEntry, DbxDocsUiExampleManifest, DbxDocsUiExampleUseEntry, DbxDocsUiExamplesScanConfig, DbxDocsUiExamplesScanSection, DbxMcpConfig, EMPTY_ACTION_REGISTRY, EMPTY_AUTH_REGISTRY, EMPTY_CSS_UTILITY_REGISTRY, EMPTY_DBX_DOCS_UI_EXAMPLES_REGISTRY, EMPTY_FILTER_REGISTRY, EMPTY_FORGE_FIELD_REGISTRY, EMPTY_MODEL_SNAPSHOT_FIELD_REGISTRY, EMPTY_PIPE_REGISTRY, EMPTY_SEMANTIC_TYPE_REGISTRY, EMPTY_TOKEN_REGISTRY, EMPTY_UI_COMPONENT_REGISTRY, EMPTY_UTIL_REGISTRY, ExtractedDbxDocsUiExampleEntrySchema, ExtractedEntrySchema, ExtractedForgeFieldEntrySchema, ExtractedUiEntrySchema, FILTERS_SCAN_CONFIG_FILENAME, FILTER_KINDS, FILTER_KIND_ORDER, FIREBASE_MODELS, FIREBASE_MODEL_GROUPS, FORGE_FIELDS_SCAN_CONFIG_FILENAME, FORGE_FIELD_ARRAY_OUTPUTS, FORGE_FIELD_COMPOSITE_SUFFIXES, FORGE_FIELD_TIERS, FORGE_FIELD_WRAPPER_PATTERNS, FORM_FIELDS, FORM_TIER_ORDER, FilterDirectiveEntry, FilterEntry, FilterInputEntry, FilterManifest, FilterPatternEntry, FiltersScanConfig, FiltersScanSection, ForgeFieldEntry, ForgeFieldManifest, ForgeFieldPropertyEntry, ForgeFieldsScanConfig, ForgeFieldsScanSection, GET_COMMAND, GET_MANY_COMMAND, MAX_MODEL_ACCESS_MULTI_READ_KEYS, MCP_CALL_TYPE_ABBREVIATIONS, MCP_MANIFEST_VERSION, MCP_TOOL_NAME_MAX_LENGTH, MCP_TOOL_NAME_WARN_LENGTH, MODEL_ARCHETYPES, MODEL_ARCHETYPE_ADDON_SLUGS, MODEL_ARCHETYPE_SYNC_MODES, MODEL_SNAPSHOT_FIELDS_SCAN_CONFIG_FILENAME, MODEL_SNAPSHOT_FIELD_KINDS, MODEL_WRITE_OIDC_SCOPES, MULTIPLE_PAGES_OUTPUT_MODES, ModelSnapshotFieldEntry, ModelSnapshotFieldManifest, ModelSnapshotFieldParamEntry, ModelSnapshotFieldsScanConfig, ModelSnapshotFieldsScanSection, PIPES_SCAN_CONFIG_FILENAME, PIPE_CATEGORIES, PIPE_CATEGORY_ORDER, PIPE_PURITIES, PROMPT_CANCELLED_ERROR_CODE, PipeArgEntry, PipeEntry, PipeManifest, PipesScanConfig, PipesScanSection, RESERVED_MODEL_FOLDERS, ROUTE_MANIFEST_VERSION, ROUTE_MODEL_LIST_TAG, ROUTE_MODEL_TAG, SCAN_CONFIG_FILENAME$1 as SCAN_CONFIG_FILENAME, SERVICE_TOKEN_REQUIRED_OIDC_SCOPES, STANDARD_GLOBAL_OPTION_NAMES, SemanticTypeEntry, SemanticTypeManifest, SemanticTypeScanConfig, TOKEN_ROLES, TOKEN_SOURCES, TokenDefaults, TokenEntry, TokenManifest, UI_COMPONENTS_SCAN_CONFIG_FILENAME, UI_COMPONENT_CATEGORIES, UI_COMPONENT_KINDS, UTILS_SCAN_CONFIG_FILENAME, UTIL_KINDS, UiComponentEntry, UiComponentInputEntry, UiComponentManifest, UiComponentOutputEntry, UiComponentsScanConfig, UiComponentsScanSection, UtilEntry, UtilManifest, UtilParamEntry, UtilsScanConfig, UtilsScanSection, WORKSPACE_AUTH_APPS, WORKSPACE_AUTH_CLAIMS, WORKSPACE_FACTORY_SCAN_EXCLUDE, WORKSPACE_FACTORY_SCAN_INCLUDE, abbreviateMcpCallType, applyEnvVarOverrides, buildActionCommands, buildActionsManifest, buildAuthorizationUrl, buildCliPaths, buildCssUtilitiesManifest, buildDbxDocsUiExamplesManifest, buildDisambiguatedMcpToolName, buildDispatcherCreditByName, buildDumpFilePath, buildErrorOutput, buildFiltersManifest, buildForgeFieldsManifest, buildManifest, buildManifestCommands, buildMcpToolName, buildModelDecodeCommand, buildModelInfoCommand, buildModelSnapshotFieldsManifest, buildOidcDiscoveryCandidates, buildPipesManifest, buildRouteManifest, buildRouteTree, buildScanProject, buildUiComponentsManifest, buildUtilsManifest, callModelOverHttp, clearDownstreamCatalogCache, collectClassPropertiesWithInheritance, computeRelativeSpecifiers, configureCliErrorMapper, configureCliSecretPatterns, configureOutputOptions, createActionCommand, createActionRegistry, createActionRegistryFromEntries, createAuthCommand, createAuthMiddleware, createAuthRegistryFromEntries, createCallModelCommand, createCli, createCliContext, createCliTokenCacheStore, createContextSlot, createCssUtilityRegistry, createCssUtilityRegistryFromEntries, createDbxDocsUiExamplesRegistry, createDbxDocsUiExamplesRegistryFromEntries, createDoctorCommand, createEnvCommand, createFilterRegistry, createFilterRegistryFromEntries, createForgeFieldRegistry, createForgeFieldRegistryFromEntries, createModelSnapshotFieldRegistry, createModelSnapshotFieldRegistryFromEntries, createOutputCommand, createOutputMiddleware, createPassthroughAuthMiddleware, createPipeRegistry, createPipeRegistryFromEntries, createSemanticTypeRegistry, createSemanticTypeRegistryFromEntries, createTokenRegistry, createTokenRegistryFromEntries, createUiComponentRegistry, createUiComponentRegistryFromEntries, createUtilRegistry, createUtilRegistryFromEntries, decodeFirestoreModelKey, defaultDoctorChecks, defaultGlobber, defaultReadFile, deriveOptionalFromName, detectDataHelpFormat, detectHelpMode, discoverDownstreamFirebasePackages, discoverDownstreamPackages, discoverOidcMetadata, dumpTimestamp, exchangeAuthorizationCode, expandModelKeys, extractActionEntries, extractAngularInputs, extractAngularOutputs, extractAuthEntries, extractComponentRouteModelTags, extractCssUtilityEntries, extractDbxDocsUiExampleEntries, extractEntries, extractFile, extractFilterEntries, extractForgeFieldEntries, extractModelSnapshotFieldEntries, extractModels, extractPipeEntries, extractUiEntries, extractUrlParamKeys, extractUtilEntries, fetchSessionInfo, fetchUserInfo, filterReadOnlyModelScopes, findAndLoadConfig, findCliEnvDefault, findCliModelManifestEntry, flattenList, generateOAuthState, generatePkceMaterial, getBundledManifestsDirectory, getCliContext, getCliEnvVarName, getCliTimeoutMs, getDefaultBundledActionManifestPaths, getDefaultBundledCssUtilityManifestPaths, getDefaultBundledDbxDocsUiExamplesManifestPaths, getDefaultBundledFilterManifestPaths, getDefaultBundledForgeFieldManifestPaths, getDefaultBundledManifestPaths, getDefaultBundledModelFirebaseIndexManifestPaths, getDefaultBundledModelSnapshotFieldManifestPaths, getDefaultBundledPipeManifestPaths, getDefaultBundledTokenManifestPaths, getDefaultBundledUiManifestPaths, getDefaultBundledUtilManifestPaths, getDownstreamCatalog, getFirebaseBucketKeyedByIdModels, getFirebaseDistrictKeyedByIdModels, getFirebaseExternalIdKeyedByIdModels, getFirebaseModel, getFirebaseModelByPrefix, getFirebaseModelGroup, getFirebaseModelGroups, getFirebaseModels, getFirebaseModelsByArchetype, getFirebasePrefixCatalog, getFirebaseRegionKeyedByIdModels, getFirebaseSubcollectionsOf, getFirebaseUserKeyedByIdModels, getFirebaseUserRelatedModels, getModelArchetypeBySlug, getModelArchetypesByAxisValue, getModelArchetypesByCollectionKind, getModelArchetypesBySyncMode, getModelOverHttp, getMultipleModelsOverHttp, getMultipleModelsOverHttpChunked, getOutputOptions, globToRegex, hasParamSegment, isCliEnvConfigComplete, isCliVerbose, isCoreTopic, isStdinSentinel, isTokenExpired, isVisibleProperty, iterateDbxCliCallModel, loadActionManifests, loadActionRegistry, loadAuthRegistry, loadCliConfig, loadCssUtilityRegistry, loadDbxDocsUiExamplesManifests, loadDbxDocsUiExamplesRegistry, loadFilterManifests, loadFilterRegistry, loadForgeFieldManifests, loadForgeFieldRegistry, loadModelFirebaseIndexManifests, loadModelFirebaseIndexRegistry, loadModelSnapshotFieldManifests, loadModelSnapshotFieldRegistry, loadPackageName, loadPipeManifests, loadPipeRegistry, loadRouteTree, loadScanSection, loadSemanticTypeManifests, loadSemanticTypeRegistry, loadTokenManifests, loadTokenRegistry, loadUiComponentManifests, loadUiComponentRegistry, loadUtilManifests, loadUtilRegistry, maskEnv, maskSecret, matchUrlAgainstEntries, mcpManifestKey, mergeCliConfig, mergeCliEnvWithDefault, mergeOutputConfig, normalizePathname, openStreamingDump, outputError, outputResult, packageNameToSlug, parseAnnotation, parseDeclarations$1 as parseDeclarations, parseFirestoreModelIdentityArgs, parseGetArgs, parseGetManyArgs, parsePastedRedirect, parseRouteModelTag, parseScanArgs, pickFields, promptLine, readAllStdin, readDirectiveDecorator, readEnvTokenEntry, readPropertyDescription, readSelector, readStdinTokens, readStringProperty, refreshAccessToken, renderDecodedKey, renderModelManifestEntry, renderModelManifestFields, renderModelManifestList, requireCliContext, resolveActiveEnvName, resolveCliEnv, resolveCliEnvOrThrow, resolveCliModel, resolveComponentSourceFromSources, resolveDemoClaimsPath, resolveExplicitFirebasePackages, resolveExtendsName, resolveModelArchetype, resolveOutputConfig, resolvePerModelGetKey, resolveRouteSources, revokeToken, runActionsScanCli, runCli, runCssUtilitiesScanCli, runDbxDocsUiExamplesScanCli, runFiltersScanCli, runForgeFieldsScanCli, runModelFirebaseIndexScanCli, runModelSnapshotFieldsScanCli, runPaginatedList, runPipesScanCli, runScanCli, runScanCliBase, runUiComponentsScanCli, runUtilsScanCli, sanitizeString, saveCliConfig, scanFactoryReferences, scoreCandidates, serializeActionManifest, serializeCssUtilityManifest, serializeDbxDocsUiExamplesManifest, serializeFilterManifest, serializeForgeFieldManifest, serializeManifest, serializeModelSnapshotFieldsManifest, serializePipeManifest, serializeUiComponentManifest, serializeUtilManifest, setCliContext, setCliTimeoutMs, setCliVerbose, splitListTagText$1 as splitListTagText, splitSegments, stripUrlQueryAndHash, toActionEntryInfo, toFilterEntryInfo, toFormFieldInfo, tracedFetch, tryMatchSegments, unwrapFenced, validateMcpToolName, verboseLog, withCallModelArgs, withEnv, withMultiplePages, withOutput, withServiceTokenScopes, wrapCommandHandler, wrapSyncCommandHandler };