@dereekb/firebase 13.12.8 → 13.13.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.
@@ -245,7 +245,7 @@ var parser = require('@typescript-eslint/parser');
245
245
  description: 'Reject function signatures with more than four positional parameters; require a single config object.'
246
246
  });
247
247
 
248
- function _array_like_to_array$h(arr, len) {
248
+ function _array_like_to_array$i(arr, len) {
249
249
  if (len == null || len > arr.length) len = arr.length;
250
250
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
251
251
  return arr2;
@@ -281,15 +281,15 @@ function _non_iterable_rest$a() {
281
281
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
282
282
  }
283
283
  function _sliced_to_array$a(arr, i) {
284
- return _array_with_holes$a(arr) || _iterable_to_array_limit$a(arr, i) || _unsupported_iterable_to_array$h(arr, i) || _non_iterable_rest$a();
284
+ return _array_with_holes$a(arr) || _iterable_to_array_limit$a(arr, i) || _unsupported_iterable_to_array$i(arr, i) || _non_iterable_rest$a();
285
285
  }
286
- function _unsupported_iterable_to_array$h(o, minLen) {
286
+ function _unsupported_iterable_to_array$i(o, minLen) {
287
287
  if (!o) return;
288
- if (typeof o === "string") return _array_like_to_array$h(o, minLen);
288
+ if (typeof o === "string") return _array_like_to_array$i(o, minLen);
289
289
  var n = Object.prototype.toString.call(o).slice(8, -1);
290
290
  if (n === "Object" && o.constructor) n = o.constructor.name;
291
291
  if (n === "Map" || n === "Set") return Array.from(n);
292
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$h(o, minLen);
292
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$i(o, minLen);
293
293
  }
294
294
  var TAG_LINE_REGEX = /^@([A-Za-z_]\w*)\s*(.*)$/;
295
295
  var TYPE_ANNOTATION_REGEX = /^\{([^}]*)\}\s*(.*)$/;
@@ -638,7 +638,7 @@ var LINE_PREFIX_REGEX = /^(\s*\*?\s?)(.*)$/;
638
638
  * companions are required/optional, what value format each accepts, and which
639
639
  * messageId to emit when a check fails. The rule body itself only wires the
640
640
  * visitors and message map; all value-format validation lives here.
641
- */ function _array_like_to_array$g(arr, len) {
641
+ */ function _array_like_to_array$h(arr, len) {
642
642
  if (len == null || len > arr.length) len = arr.length;
643
643
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
644
644
  return arr2;
@@ -674,15 +674,15 @@ function _non_iterable_rest$9() {
674
674
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
675
675
  }
676
676
  function _sliced_to_array$9(arr, i) {
677
- return _array_with_holes$9(arr) || _iterable_to_array_limit$9(arr, i) || _unsupported_iterable_to_array$g(arr, i) || _non_iterable_rest$9();
677
+ return _array_with_holes$9(arr) || _iterable_to_array_limit$9(arr, i) || _unsupported_iterable_to_array$h(arr, i) || _non_iterable_rest$9();
678
678
  }
679
- function _unsupported_iterable_to_array$g(o, minLen) {
679
+ function _unsupported_iterable_to_array$h(o, minLen) {
680
680
  if (!o) return;
681
- if (typeof o === "string") return _array_like_to_array$g(o, minLen);
681
+ if (typeof o === "string") return _array_like_to_array$h(o, minLen);
682
682
  var n = Object.prototype.toString.call(o).slice(8, -1);
683
683
  if (n === "Object" && o.constructor) n = o.constructor.name;
684
684
  if (n === "Map" || n === "Set") return Array.from(n);
685
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$g(o, minLen);
685
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$h(o, minLen);
686
686
  }
687
687
  /**
688
688
  * Kebab-case slug pattern: lowercase letters/digits, words separated by single hyphens,
@@ -1130,30 +1130,30 @@ function checkCompanion(input) {
1130
1130
  return result;
1131
1131
  }
1132
1132
 
1133
- function _array_like_to_array$f(arr, len) {
1133
+ function _array_like_to_array$g(arr, len) {
1134
1134
  if (len == null || len > arr.length) len = arr.length;
1135
1135
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
1136
1136
  return arr2;
1137
1137
  }
1138
- function _array_without_holes$a(arr) {
1139
- if (Array.isArray(arr)) return _array_like_to_array$f(arr);
1138
+ function _array_without_holes$b(arr) {
1139
+ if (Array.isArray(arr)) return _array_like_to_array$g(arr);
1140
1140
  }
1141
- function _iterable_to_array$a(iter) {
1141
+ function _iterable_to_array$b(iter) {
1142
1142
  if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
1143
1143
  }
1144
- function _non_iterable_spread$a() {
1144
+ function _non_iterable_spread$b() {
1145
1145
  throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
1146
1146
  }
1147
- function _to_consumable_array$a(arr) {
1148
- return _array_without_holes$a(arr) || _iterable_to_array$a(arr) || _unsupported_iterable_to_array$f(arr) || _non_iterable_spread$a();
1147
+ function _to_consumable_array$b(arr) {
1148
+ return _array_without_holes$b(arr) || _iterable_to_array$b(arr) || _unsupported_iterable_to_array$g(arr) || _non_iterable_spread$b();
1149
1149
  }
1150
- function _unsupported_iterable_to_array$f(o, minLen) {
1150
+ function _unsupported_iterable_to_array$g(o, minLen) {
1151
1151
  if (!o) return;
1152
- if (typeof o === "string") return _array_like_to_array$f(o, minLen);
1152
+ if (typeof o === "string") return _array_like_to_array$g(o, minLen);
1153
1153
  var n = Object.prototype.toString.call(o).slice(8, -1);
1154
1154
  if (n === "Object" && o.constructor) n = o.constructor.name;
1155
1155
  if (n === "Map" || n === "Set") return Array.from(n);
1156
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$f(o, minLen);
1156
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$g(o, minLen);
1157
1157
  }
1158
1158
  /**
1159
1159
  * Module that publishes the `@dereekb/firebase` Firestore constraint factories (`where`, `orderBy`, etc.).
@@ -1302,7 +1302,7 @@ function qualifiedNameTail(node) {
1302
1302
  * Combined list of every Firestore constraint factory exported from `@dereekb/firebase`. Used
1303
1303
  * by the body-coherence rule to ensure a tagged factory body contains at least one constraint
1304
1304
  * call of any kind (index-affecting or pagination) before warning that the marker is orphaned.
1305
- */ var DEFAULT_CONSTRAINT_FACTORY_NAMES = _to_consumable_array$a(DEFAULT_INDEX_AFFECTING_CONSTRAINT_NAMES).concat(_to_consumable_array$a(DEFAULT_PAGINATION_CONSTRAINT_NAMES));
1305
+ */ var DEFAULT_CONSTRAINT_FACTORY_NAMES = _to_consumable_array$b(DEFAULT_INDEX_AFFECTING_CONSTRAINT_NAMES).concat(_to_consumable_array$b(DEFAULT_PAGINATION_CONSTRAINT_NAMES));
1306
1306
  /**
1307
1307
  * Creates an empty {@link ImportRegistry}.
1308
1308
  *
@@ -1763,30 +1763,30 @@ function qualifiedNameTail(node) {
1763
1763
  });
1764
1764
  }
1765
1765
 
1766
- function _array_like_to_array$e(arr, len) {
1766
+ function _array_like_to_array$f(arr, len) {
1767
1767
  if (len == null || len > arr.length) len = arr.length;
1768
1768
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
1769
1769
  return arr2;
1770
1770
  }
1771
- function _array_without_holes$9(arr) {
1772
- if (Array.isArray(arr)) return _array_like_to_array$e(arr);
1771
+ function _array_without_holes$a(arr) {
1772
+ if (Array.isArray(arr)) return _array_like_to_array$f(arr);
1773
1773
  }
1774
- function _iterable_to_array$9(iter) {
1774
+ function _iterable_to_array$a(iter) {
1775
1775
  if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
1776
1776
  }
1777
- function _non_iterable_spread$9() {
1777
+ function _non_iterable_spread$a() {
1778
1778
  throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
1779
1779
  }
1780
- function _to_consumable_array$9(arr) {
1781
- return _array_without_holes$9(arr) || _iterable_to_array$9(arr) || _unsupported_iterable_to_array$e(arr) || _non_iterable_spread$9();
1780
+ function _to_consumable_array$a(arr) {
1781
+ return _array_without_holes$a(arr) || _iterable_to_array$a(arr) || _unsupported_iterable_to_array$f(arr) || _non_iterable_spread$a();
1782
1782
  }
1783
- function _unsupported_iterable_to_array$e(o, minLen) {
1783
+ function _unsupported_iterable_to_array$f(o, minLen) {
1784
1784
  if (!o) return;
1785
- if (typeof o === "string") return _array_like_to_array$e(o, minLen);
1785
+ if (typeof o === "string") return _array_like_to_array$f(o, minLen);
1786
1786
  var n = Object.prototype.toString.call(o).slice(8, -1);
1787
1787
  if (n === "Object" && o.constructor) n = o.constructor.name;
1788
1788
  if (n === "Map" || n === "Set") return Array.from(n);
1789
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$e(o, minLen);
1789
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$f(o, minLen);
1790
1790
  }
1791
1791
  /**
1792
1792
  * ESLint rule that forbids inline `@dereekb/firebase` Firestore constraint factory calls
@@ -1844,7 +1844,7 @@ function _unsupported_iterable_to_array$e(o, minLen) {
1844
1844
  var options = (_context_options_ = context.options[0]) !== null && _context_options_ !== void 0 ? _context_options_ : {};
1845
1845
  var sourceCode = context.sourceCode;
1846
1846
  var baseNames = (_options_constraintNames = options.constraintNames) !== null && _options_constraintNames !== void 0 ? _options_constraintNames : DEFAULT_INDEX_AFFECTING_CONSTRAINT_NAMES;
1847
- var constraintNames = new Set(_to_consumable_array$9(baseNames).concat(_to_consumable_array$9((_options_additionalConstraintNames = options.additionalConstraintNames) !== null && _options_additionalConstraintNames !== void 0 ? _options_additionalConstraintNames : [])));
1847
+ var constraintNames = new Set(_to_consumable_array$a(baseNames).concat(_to_consumable_array$a((_options_additionalConstraintNames = options.additionalConstraintNames) !== null && _options_additionalConstraintNames !== void 0 ? _options_additionalConstraintNames : [])));
1848
1848
  var allowedSources = new Set((_options_allowedImportSources = options.allowedImportSources) !== null && _options_allowedImportSources !== void 0 ? _options_allowedImportSources : [
1849
1849
  FIREBASE_MODULE
1850
1850
  ]);
@@ -1863,10 +1863,10 @@ function _unsupported_iterable_to_array$e(o, minLen) {
1863
1863
  return result;
1864
1864
  }
1865
1865
  function pushFrame(node) {
1866
- var _ref;
1866
+ var _stack_at, _ref;
1867
1867
  var anchor = getFunctionJsdocAnchor(node);
1868
1868
  var tagged = anchor ? jsdocHasMarker(anchor) : false;
1869
- var parent = stack.length > 0 ? stack[stack.length - 1] : null;
1869
+ var parent = (_stack_at = stack.at(-1)) !== null && _stack_at !== void 0 ? _stack_at : null;
1870
1870
  var taggedDeep = tagged || ((_ref = parent === null || parent === void 0 ? void 0 : parent.taggedDeep) !== null && _ref !== void 0 ? _ref : false);
1871
1871
  stack.push({
1872
1872
  node: node,
@@ -1875,7 +1875,8 @@ function _unsupported_iterable_to_array$e(o, minLen) {
1875
1875
  });
1876
1876
  }
1877
1877
  function popFrame(node) {
1878
- if (stack.length > 0 && stack[stack.length - 1].node === node) {
1878
+ var _stack_at;
1879
+ if (((_stack_at = stack.at(-1)) === null || _stack_at === void 0 ? void 0 : _stack_at.node) === node) {
1879
1880
  stack.pop();
1880
1881
  }
1881
1882
  }
@@ -2137,6 +2138,19 @@ var DEFAULT_KNOWN_COMPANIONS = [
2137
2138
  'Path',
2138
2139
  'Helper'
2139
2140
  ];
2141
+ function extractGenericIdentifier(callNode) {
2142
+ var _callNode_typeArguments;
2143
+ var params = (_callNode_typeArguments = callNode.typeArguments) !== null && _callNode_typeArguments !== void 0 ? _callNode_typeArguments : callNode.typeParameters;
2144
+ var result = null;
2145
+ if (params && Array.isArray(params.params) && params.params.length > 0) {
2146
+ var _first_typeName;
2147
+ var first = params.params[0];
2148
+ if ((first === null || first === void 0 ? void 0 : first.type) === 'TSTypeReference' && ((_first_typeName = first.typeName) === null || _first_typeName === void 0 ? void 0 : _first_typeName.type) === 'Identifier') {
2149
+ result = first.typeName.name;
2150
+ }
2151
+ }
2152
+ return result;
2153
+ }
2140
2154
  /**
2141
2155
  * ESLint rule enforcing `@dbxModelFirebaseIndex` companion tags and body coherence.
2142
2156
  * Mirrors the scanner schema at
@@ -2552,19 +2566,6 @@ var DEFAULT_KNOWN_COMPANIONS = [
2552
2566
  }
2553
2567
  }
2554
2568
  }
2555
- function extractGenericIdentifier(callNode) {
2556
- var _callNode_typeArguments;
2557
- var params = (_callNode_typeArguments = callNode.typeArguments) !== null && _callNode_typeArguments !== void 0 ? _callNode_typeArguments : callNode.typeParameters;
2558
- var result = null;
2559
- if (params && Array.isArray(params.params) && params.params.length > 0) {
2560
- var _first_typeName;
2561
- var first = params.params[0];
2562
- if ((first === null || first === void 0 ? void 0 : first.type) === 'TSTypeReference' && ((_first_typeName = first.typeName) === null || _first_typeName === void 0 ? void 0 : _first_typeName.type) === 'Identifier') {
2563
- result = first.typeName.name;
2564
- }
2565
- }
2566
- return result;
2567
- }
2568
2569
  function checkBody(node, parsed) {
2569
2570
  if (!checkBodyCoherence) return;
2570
2571
  var skip = getSkipTagValue(parsed);
@@ -2653,6 +2654,15 @@ function _type_of$8(obj) {
2653
2654
  /**
2654
2655
  * Default suffix used to recognise a presumed-tagged query factory by name (single-file scope).
2655
2656
  */ var DEFAULT_PRESUMED_TAGGED_SUFFIX = 'Query';
2657
+ function recordVariableDeclarator(node, emptyArrayDeclarators) {
2658
+ var _node_id, _node_init;
2659
+ if (((_node_id = node.id) === null || _node_id === void 0 ? void 0 : _node_id.type) === 'Identifier' && ((_node_init = node.init) === null || _node_init === void 0 ? void 0 : _node_init.type) === 'ArrayExpression' && Array.isArray(node.init.elements) && node.init.elements.length === 0) {
2660
+ emptyArrayDeclarators.push({
2661
+ node: node,
2662
+ name: node.id.name
2663
+ });
2664
+ }
2665
+ }
2656
2666
  /**
2657
2667
  * ESLint rule enforcing that `@dbxModelFirebaseIndexDispatcher`-tagged factories delegate to
2658
2668
  * other `@dbxModelFirebaseIndex`-tagged query factories instead of building constraints directly.
@@ -2776,15 +2786,6 @@ function _type_of$8(obj) {
2776
2786
  pushReceivers.add(node.callee.object.name);
2777
2787
  }
2778
2788
  }
2779
- function recordVariableDeclarator(node, emptyArrayDeclarators) {
2780
- var _node_id, _node_init;
2781
- if (((_node_id = node.id) === null || _node_id === void 0 ? void 0 : _node_id.type) === 'Identifier' && ((_node_init = node.init) === null || _node_init === void 0 ? void 0 : _node_init.type) === 'ArrayExpression' && Array.isArray(node.init.elements) && node.init.elements.length === 0) {
2782
- emptyArrayDeclarators.push({
2783
- node: node,
2784
- name: node.id.name
2785
- });
2786
- }
2787
- }
2788
2789
  function scanBody(body) {
2789
2790
  var constraintCalls = [];
2790
2791
  var emptyArrayDeclarators = [];
@@ -2927,30 +2928,35 @@ function _type_of$8(obj) {
2927
2928
  }
2928
2929
  };
2929
2930
 
2930
- function _array_like_to_array$d(arr, len) {
2931
+ function _array_like_to_array$e(arr, len) {
2931
2932
  if (len == null || len > arr.length) len = arr.length;
2932
2933
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
2933
2934
  return arr2;
2934
2935
  }
2935
- function _array_without_holes$8(arr) {
2936
- if (Array.isArray(arr)) return _array_like_to_array$d(arr);
2936
+ function _array_without_holes$9(arr) {
2937
+ if (Array.isArray(arr)) return _array_like_to_array$e(arr);
2937
2938
  }
2938
- function _iterable_to_array$8(iter) {
2939
+ function _iterable_to_array$9(iter) {
2939
2940
  if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
2940
2941
  }
2941
- function _non_iterable_spread$8() {
2942
+ function _non_iterable_spread$9() {
2942
2943
  throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
2943
2944
  }
2944
- function _to_consumable_array$8(arr) {
2945
- return _array_without_holes$8(arr) || _iterable_to_array$8(arr) || _unsupported_iterable_to_array$d(arr) || _non_iterable_spread$8();
2945
+ function _to_consumable_array$9(arr) {
2946
+ return _array_without_holes$9(arr) || _iterable_to_array$9(arr) || _unsupported_iterable_to_array$e(arr) || _non_iterable_spread$9();
2946
2947
  }
2947
- function _unsupported_iterable_to_array$d(o, minLen) {
2948
+ function _unsupported_iterable_to_array$e(o, minLen) {
2948
2949
  if (!o) return;
2949
- if (typeof o === "string") return _array_like_to_array$d(o, minLen);
2950
+ if (typeof o === "string") return _array_like_to_array$e(o, minLen);
2950
2951
  var n = Object.prototype.toString.call(o).slice(8, -1);
2951
2952
  if (n === "Object" && o.constructor) n = o.constructor.name;
2952
2953
  if (n === "Map" || n === "Set") return Array.from(n);
2953
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$d(o, minLen);
2954
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$e(o, minLen);
2955
+ }
2956
+ function hasTypeArgument(node) {
2957
+ var _node_typeArguments;
2958
+ var args = (_node_typeArguments = node.typeArguments) !== null && _node_typeArguments !== void 0 ? _node_typeArguments : node.typeParameters;
2959
+ return Boolean(args && Array.isArray(args.params) && args.params.length > 0);
2954
2960
  }
2955
2961
  /**
2956
2962
  * ESLint rule that warns when an `@dereekb/firebase` field-path-narrowing constraint factory
@@ -3005,7 +3011,7 @@ function _unsupported_iterable_to_array$d(o, minLen) {
3005
3011
  var _context_options_, _options_constraintNames, _options_additionalConstraintNames, _options_allowedImportSources;
3006
3012
  var options = (_context_options_ = context.options[0]) !== null && _context_options_ !== void 0 ? _context_options_ : {};
3007
3013
  var baseNames = (_options_constraintNames = options.constraintNames) !== null && _options_constraintNames !== void 0 ? _options_constraintNames : DEFAULT_INDEX_AFFECTING_CONSTRAINT_NAMES;
3008
- var constraintNames = new Set(_to_consumable_array$8(baseNames).concat(_to_consumable_array$8((_options_additionalConstraintNames = options.additionalConstraintNames) !== null && _options_additionalConstraintNames !== void 0 ? _options_additionalConstraintNames : [])));
3014
+ var constraintNames = new Set(_to_consumable_array$9(baseNames).concat(_to_consumable_array$9((_options_additionalConstraintNames = options.additionalConstraintNames) !== null && _options_additionalConstraintNames !== void 0 ? _options_additionalConstraintNames : [])));
3009
3015
  var allowedSources = new Set((_options_allowedImportSources = options.allowedImportSources) !== null && _options_allowedImportSources !== void 0 ? _options_allowedImportSources : [
3010
3016
  FIREBASE_MODULE
3011
3017
  ]);
@@ -3026,11 +3032,6 @@ function _unsupported_iterable_to_array$d(o, minLen) {
3026
3032
  }
3027
3033
  return result;
3028
3034
  }
3029
- function hasTypeArgument(node) {
3030
- var _node_typeArguments;
3031
- var args = (_node_typeArguments = node.typeArguments) !== null && _node_typeArguments !== void 0 ? _node_typeArguments : node.typeParameters;
3032
- return Boolean(args && Array.isArray(args.params) && args.params.length > 0);
3033
- }
3034
3035
  return {
3035
3036
  ImportDeclaration: function ImportDeclaration(node) {
3036
3037
  return trackImportDeclaration(registry, node);
@@ -3051,7 +3052,7 @@ function _unsupported_iterable_to_array$d(o, minLen) {
3051
3052
  }
3052
3053
  };
3053
3054
 
3054
- function _array_like_to_array$c(arr, len) {
3055
+ function _array_like_to_array$d(arr, len) {
3055
3056
  if (len == null || len > arr.length) len = arr.length;
3056
3057
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
3057
3058
  return arr2;
@@ -3087,15 +3088,15 @@ function _non_iterable_rest$8() {
3087
3088
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
3088
3089
  }
3089
3090
  function _sliced_to_array$8(arr, i) {
3090
- return _array_with_holes$8(arr) || _iterable_to_array_limit$8(arr, i) || _unsupported_iterable_to_array$c(arr, i) || _non_iterable_rest$8();
3091
+ return _array_with_holes$8(arr) || _iterable_to_array_limit$8(arr, i) || _unsupported_iterable_to_array$d(arr, i) || _non_iterable_rest$8();
3091
3092
  }
3092
- function _unsupported_iterable_to_array$c(o, minLen) {
3093
+ function _unsupported_iterable_to_array$d(o, minLen) {
3093
3094
  if (!o) return;
3094
- if (typeof o === "string") return _array_like_to_array$c(o, minLen);
3095
+ if (typeof o === "string") return _array_like_to_array$d(o, minLen);
3095
3096
  var n = Object.prototype.toString.call(o).slice(8, -1);
3096
3097
  if (n === "Object" && o.constructor) n = o.constructor.name;
3097
3098
  if (n === "Map" || n === "Set") return Array.from(n);
3098
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$c(o, minLen);
3099
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$d(o, minLen);
3099
3100
  }
3100
3101
  /**
3101
3102
  * Type-reference name that triggers this rule. Variables whose declared type is
@@ -4663,7 +4664,7 @@ var RESERVED = new Set([
4663
4664
  'prototype'
4664
4665
  ]);
4665
4666
 
4666
- function _array_like_to_array$b(arr, len) {
4667
+ function _array_like_to_array$c(arr, len) {
4667
4668
  if (len == null || len > arr.length) len = arr.length;
4668
4669
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
4669
4670
  return arr2;
@@ -4766,19 +4767,19 @@ function _non_iterable_rest$7() {
4766
4767
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
4767
4768
  }
4768
4769
  function _sliced_to_array$7(arr, i) {
4769
- return _array_with_holes$7(arr) || _iterable_to_array_limit$7(arr, i) || _unsupported_iterable_to_array$b(arr, i) || _non_iterable_rest$7();
4770
+ return _array_with_holes$7(arr) || _iterable_to_array_limit$7(arr, i) || _unsupported_iterable_to_array$c(arr, i) || _non_iterable_rest$7();
4770
4771
  }
4771
4772
  function _type_of$6(obj) {
4772
4773
  "@swc/helpers - typeof";
4773
4774
  return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
4774
4775
  }
4775
- function _unsupported_iterable_to_array$b(o, minLen) {
4776
+ function _unsupported_iterable_to_array$c(o, minLen) {
4776
4777
  if (!o) return;
4777
- if (typeof o === "string") return _array_like_to_array$b(o, minLen);
4778
+ if (typeof o === "string") return _array_like_to_array$c(o, minLen);
4778
4779
  var n = Object.prototype.toString.call(o).slice(8, -1);
4779
4780
  if (n === "Object" && o.constructor) n = o.constructor.name;
4780
4781
  if (n === "Map" || n === "Set") return Array.from(n);
4781
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$b(o, minLen);
4782
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$c(o, minLen);
4782
4783
  }
4783
4784
  var _value = /*#__PURE__*/ new WeakMap();
4784
4785
  var _Symbol_for = Symbol.for('nodejs.util.inspect.custom');
@@ -5433,7 +5434,7 @@ function stringSize(str) {
5433
5434
  return count;
5434
5435
  }
5435
5436
 
5436
- function _array_like_to_array$a(arr, len) {
5437
+ function _array_like_to_array$b(arr, len) {
5437
5438
  if (len == null || len > arr.length) len = arr.length;
5438
5439
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
5439
5440
  return arr2;
@@ -5441,8 +5442,8 @@ function _array_like_to_array$a(arr, len) {
5441
5442
  function _array_with_holes$6(arr) {
5442
5443
  if (Array.isArray(arr)) return arr;
5443
5444
  }
5444
- function _array_without_holes$7(arr) {
5445
- if (Array.isArray(arr)) return _array_like_to_array$a(arr);
5445
+ function _array_without_holes$8(arr) {
5446
+ if (Array.isArray(arr)) return _array_like_to_array$b(arr);
5446
5447
  }
5447
5448
  function _assert_this_initialized$2(self) {
5448
5449
  if (self === void 0) {
@@ -5598,7 +5599,7 @@ function _instanceof$6(left, right) {
5598
5599
  function _is_native_function(fn) {
5599
5600
  return Function.toString.call(fn).indexOf("[native code]") !== -1;
5600
5601
  }
5601
- function _iterable_to_array$7(iter) {
5602
+ function _iterable_to_array$8(iter) {
5602
5603
  if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
5603
5604
  }
5604
5605
  function _iterable_to_array_limit$6(arr, i) {
@@ -5628,7 +5629,7 @@ function _iterable_to_array_limit$6(arr, i) {
5628
5629
  function _non_iterable_rest$6() {
5629
5630
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
5630
5631
  }
5631
- function _non_iterable_spread$7() {
5632
+ function _non_iterable_spread$8() {
5632
5633
  throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
5633
5634
  }
5634
5635
  function _possible_constructor_return$2(self, call) {
@@ -5645,7 +5646,7 @@ function _set_prototype_of$2(o, p) {
5645
5646
  return _set_prototype_of$2(o, p);
5646
5647
  }
5647
5648
  function _sliced_to_array$6(arr, i) {
5648
- return _array_with_holes$6(arr) || _iterable_to_array_limit$6(arr, i) || _unsupported_iterable_to_array$a(arr, i) || _non_iterable_rest$6();
5649
+ return _array_with_holes$6(arr) || _iterable_to_array_limit$6(arr, i) || _unsupported_iterable_to_array$b(arr, i) || _non_iterable_rest$6();
5649
5650
  }
5650
5651
  function _super_prop_base(object, property) {
5651
5652
  while(!Object.prototype.hasOwnProperty.call(object, property)){
@@ -5654,20 +5655,20 @@ function _super_prop_base(object, property) {
5654
5655
  }
5655
5656
  return object;
5656
5657
  }
5657
- function _to_consumable_array$7(arr) {
5658
- return _array_without_holes$7(arr) || _iterable_to_array$7(arr) || _unsupported_iterable_to_array$a(arr) || _non_iterable_spread$7();
5658
+ function _to_consumable_array$8(arr) {
5659
+ return _array_without_holes$8(arr) || _iterable_to_array$8(arr) || _unsupported_iterable_to_array$b(arr) || _non_iterable_spread$8();
5659
5660
  }
5660
5661
  function _type_of$5(obj) {
5661
5662
  "@swc/helpers - typeof";
5662
5663
  return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
5663
5664
  }
5664
- function _unsupported_iterable_to_array$a(o, minLen) {
5665
+ function _unsupported_iterable_to_array$b(o, minLen) {
5665
5666
  if (!o) return;
5666
- if (typeof o === "string") return _array_like_to_array$a(o, minLen);
5667
+ if (typeof o === "string") return _array_like_to_array$b(o, minLen);
5667
5668
  var n = Object.prototype.toString.call(o).slice(8, -1);
5668
5669
  if (n === "Object" && o.constructor) n = o.constructor.name;
5669
5670
  if (n === "Map" || n === "Set") return Array.from(n);
5670
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$a(o, minLen);
5671
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$b(o, minLen);
5671
5672
  }
5672
5673
  function _wrap_native_super(Class) {
5673
5674
  var _cache = typeof Map === "function" ? new Map() : undefined;
@@ -6513,7 +6514,7 @@ var objTypesDecls = [
6513
6514
  TYPES.bytes,
6514
6515
  celTypes.bytes
6515
6516
  ]
6516
- ].concat(_to_consumable_array$7(typeof Buffer !== 'undefined' ? [
6517
+ ].concat(_to_consumable_array$8(typeof Buffer !== 'undefined' ? [
6517
6518
  [
6518
6519
  Buffer,
6519
6520
  'bytes',
@@ -7156,11 +7157,11 @@ function ensureCandiate(c, key) {
7156
7157
  }
7157
7158
  function getOperators() {
7158
7159
  if (_class_private_field_get$2(this, _operators)) return _class_private_field_get$2(this, _operators);
7159
- return _class_private_field_set$2(this, _operators, _to_consumable_array$7(_class_private_field_get$2(this, _others).operators));
7160
+ return _class_private_field_set$2(this, _operators, _to_consumable_array$8(_class_private_field_get$2(this, _others).operators));
7160
7161
  }
7161
7162
  function getFunctions() {
7162
7163
  if (_class_private_field_get$2(this, _functions)) return _class_private_field_get$2(this, _functions);
7163
- return _class_private_field_set$2(this, _functions, _to_consumable_array$7(_class_private_field_get$2(this, _others).functions));
7164
+ return _class_private_field_set$2(this, _functions, _to_consumable_array$8(_class_private_field_get$2(this, _others).functions));
7164
7165
  }
7165
7166
  function functionCandidates(key) {
7166
7167
  if (_class_private_field_get$2(this, _functionsByKey)) return _class_private_method_get$2(this, _ensureCandiate, ensureCandiate).call(this, _class_private_field_get$2(this, _functionsByKey), key);
@@ -7272,7 +7273,7 @@ function createDeclaration(creator, key) {
7272
7273
  for(var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++){
7273
7274
  args[_key - 2] = arguments[_key];
7274
7275
  }
7275
- return _class_private_field_get$2(this, _typeDeclarations).get(key) || _class_private_field_get$2(this, _typeDeclarations).set(key, creator.apply(void 0, _to_consumable_array$7(args))).get(key);
7276
+ return _class_private_field_get$2(this, _typeDeclarations).get(key) || _class_private_field_get$2(this, _typeDeclarations).set(key, creator.apply(void 0, _to_consumable_array$8(args))).get(key);
7276
7277
  }
7277
7278
  function toCelFieldType(field) {
7278
7279
  if (typeof field === 'string') return {
@@ -7725,7 +7726,7 @@ var OverlayContext = /*#__PURE__*/ function() {
7725
7726
  }
7726
7727
  }
7727
7728
 
7728
- function _array_like_to_array$9(arr, len) {
7729
+ function _array_like_to_array$a(arr, len) {
7729
7730
  if (len == null || len > arr.length) len = arr.length;
7730
7731
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
7731
7732
  return arr2;
@@ -7733,8 +7734,8 @@ function _array_like_to_array$9(arr, len) {
7733
7734
  function _array_with_holes$5(arr) {
7734
7735
  if (Array.isArray(arr)) return arr;
7735
7736
  }
7736
- function _array_without_holes$6(arr) {
7737
- if (Array.isArray(arr)) return _array_like_to_array$9(arr);
7737
+ function _array_without_holes$7(arr) {
7738
+ if (Array.isArray(arr)) return _array_like_to_array$a(arr);
7738
7739
  }
7739
7740
  function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
7740
7741
  try {
@@ -7804,7 +7805,7 @@ function _instanceof$5(left, right) {
7804
7805
  return left instanceof right;
7805
7806
  }
7806
7807
  }
7807
- function _iterable_to_array$6(iter) {
7808
+ function _iterable_to_array$7(iter) {
7808
7809
  if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
7809
7810
  }
7810
7811
  function _iterable_to_array_limit$5(arr, i) {
@@ -7834,26 +7835,26 @@ function _iterable_to_array_limit$5(arr, i) {
7834
7835
  function _non_iterable_rest$5() {
7835
7836
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
7836
7837
  }
7837
- function _non_iterable_spread$6() {
7838
+ function _non_iterable_spread$7() {
7838
7839
  throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
7839
7840
  }
7840
7841
  function _sliced_to_array$5(arr, i) {
7841
- return _array_with_holes$5(arr) || _iterable_to_array_limit$5(arr, i) || _unsupported_iterable_to_array$9(arr, i) || _non_iterable_rest$5();
7842
+ return _array_with_holes$5(arr) || _iterable_to_array_limit$5(arr, i) || _unsupported_iterable_to_array$a(arr, i) || _non_iterable_rest$5();
7842
7843
  }
7843
- function _to_consumable_array$6(arr) {
7844
- return _array_without_holes$6(arr) || _iterable_to_array$6(arr) || _unsupported_iterable_to_array$9(arr) || _non_iterable_spread$6();
7844
+ function _to_consumable_array$7(arr) {
7845
+ return _array_without_holes$7(arr) || _iterable_to_array$7(arr) || _unsupported_iterable_to_array$a(arr) || _non_iterable_spread$7();
7845
7846
  }
7846
7847
  function _type_of$4(obj) {
7847
7848
  "@swc/helpers - typeof";
7848
7849
  return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
7849
7850
  }
7850
- function _unsupported_iterable_to_array$9(o, minLen) {
7851
+ function _unsupported_iterable_to_array$a(o, minLen) {
7851
7852
  if (!o) return;
7852
- if (typeof o === "string") return _array_like_to_array$9(o, minLen);
7853
+ if (typeof o === "string") return _array_like_to_array$a(o, minLen);
7853
7854
  var n = Object.prototype.toString.call(o).slice(8, -1);
7854
7855
  if (n === "Object" && o.constructor) n = o.constructor.name;
7855
7856
  if (n === "Map" || n === "Set") return Array.from(n);
7856
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$9(o, minLen);
7857
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$a(o, minLen);
7857
7858
  }
7858
7859
  function _ts_generator(thisArg, body) {
7859
7860
  var f, y, t, _ = {
@@ -8243,8 +8244,8 @@ function comprehensionElementType(chk, iterable, ctx) {
8243
8244
  throw chk.createError('invalid_comprehension_range', "Expression of type '".concat(chk.formatType(iterType), "' cannot be range of a comprehension (must be list, map, or dynamic)."), iterable);
8244
8245
  }
8245
8246
  function toIterable(ev, args, coll) {
8246
- if (_instanceof$5(coll, Set)) return _to_consumable_array$6(coll);
8247
- if (_instanceof$5(coll, Map)) return _to_consumable_array$6(coll.keys());
8247
+ if (_instanceof$5(coll, Set)) return _to_consumable_array$7(coll);
8248
+ if (_instanceof$5(coll, Map)) return _to_consumable_array$7(coll.keys());
8248
8249
  if (coll && (typeof coll === "undefined" ? "undefined" : _type_of$4(coll)) === 'object') return objKeys(coll);
8249
8250
  throw ev.createError('invalid_comprehension_range', "Expression of type '".concat(ev.debugType(coll), "' cannot be range of a comprehension (must be list, map, or dynamic)."), args.iterable);
8250
8251
  }
@@ -8515,7 +8516,7 @@ var OPERATORS = {
8515
8516
  });
8516
8517
  ast.receiverWithArgs = [
8517
8518
  receiver
8518
- ].concat(_to_consumable_array$6(args));
8519
+ ].concat(_to_consumable_array$7(args));
8519
8520
  ast.handle = maybeAsync(ast.receiverWithArgs, false, callRecFn);
8520
8521
  if (receiverType.kind === 'dyn' && candidates.returnType) return candidates.returnType;
8521
8522
  var decl = candidates.findFunction(argTypes, receiverType);
@@ -8768,7 +8769,7 @@ try {
8768
8769
  }
8769
8770
  }
8770
8771
 
8771
- function _array_like_to_array$8(arr, len) {
8772
+ function _array_like_to_array$9(arr, len) {
8772
8773
  if (len == null || len > arr.length) len = arr.length;
8773
8774
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
8774
8775
  return arr2;
@@ -8817,15 +8818,15 @@ function _non_iterable_rest$4() {
8817
8818
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
8818
8819
  }
8819
8820
  function _sliced_to_array$4(arr, i) {
8820
- return _array_with_holes$4(arr) || _iterable_to_array_limit$4(arr, i) || _unsupported_iterable_to_array$8(arr, i) || _non_iterable_rest$4();
8821
+ return _array_with_holes$4(arr) || _iterable_to_array_limit$4(arr, i) || _unsupported_iterable_to_array$9(arr, i) || _non_iterable_rest$4();
8821
8822
  }
8822
- function _unsupported_iterable_to_array$8(o, minLen) {
8823
+ function _unsupported_iterable_to_array$9(o, minLen) {
8823
8824
  if (!o) return;
8824
- if (typeof o === "string") return _array_like_to_array$8(o, minLen);
8825
+ if (typeof o === "string") return _array_like_to_array$9(o, minLen);
8825
8826
  var n = Object.prototype.toString.call(o).slice(8, -1);
8826
8827
  if (n === "Object" && o.constructor) n = o.constructor.name;
8827
8828
  if (n === "Map" || n === "Set") return Array.from(n);
8828
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$8(o, minLen);
8829
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$9(o, minLen);
8829
8830
  }
8830
8831
  var identity = function identity(x) {
8831
8832
  return x;
@@ -9065,7 +9066,7 @@ function registerMacros(registry) {
9065
9066
  });
9066
9067
  }
9067
9068
 
9068
- function _array_like_to_array$7(arr, len) {
9069
+ function _array_like_to_array$8(arr, len) {
9069
9070
  if (len == null || len > arr.length) len = arr.length;
9070
9071
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
9071
9072
  return arr2;
@@ -9073,8 +9074,8 @@ function _array_like_to_array$7(arr, len) {
9073
9074
  function _array_with_holes$3(arr) {
9074
9075
  if (Array.isArray(arr)) return arr;
9075
9076
  }
9076
- function _array_without_holes$5(arr) {
9077
- if (Array.isArray(arr)) return _array_like_to_array$7(arr);
9077
+ function _array_without_holes$6(arr) {
9078
+ if (Array.isArray(arr)) return _array_like_to_array$8(arr);
9078
9079
  }
9079
9080
  function _instanceof$3(left, right) {
9080
9081
  "@swc/helpers - instanceof";
@@ -9084,7 +9085,7 @@ function _instanceof$3(left, right) {
9084
9085
  return left instanceof right;
9085
9086
  }
9086
9087
  }
9087
- function _iterable_to_array$5(iter) {
9088
+ function _iterable_to_array$6(iter) {
9088
9089
  if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
9089
9090
  }
9090
9091
  function _iterable_to_array_limit$3(arr, i) {
@@ -9114,26 +9115,26 @@ function _iterable_to_array_limit$3(arr, i) {
9114
9115
  function _non_iterable_rest$3() {
9115
9116
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
9116
9117
  }
9117
- function _non_iterable_spread$5() {
9118
+ function _non_iterable_spread$6() {
9118
9119
  throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
9119
9120
  }
9120
9121
  function _sliced_to_array$3(arr, i) {
9121
- return _array_with_holes$3(arr) || _iterable_to_array_limit$3(arr, i) || _unsupported_iterable_to_array$7(arr, i) || _non_iterable_rest$3();
9122
+ return _array_with_holes$3(arr) || _iterable_to_array_limit$3(arr, i) || _unsupported_iterable_to_array$8(arr, i) || _non_iterable_rest$3();
9122
9123
  }
9123
- function _to_consumable_array$5(arr) {
9124
- return _array_without_holes$5(arr) || _iterable_to_array$5(arr) || _unsupported_iterable_to_array$7(arr) || _non_iterable_spread$5();
9124
+ function _to_consumable_array$6(arr) {
9125
+ return _array_without_holes$6(arr) || _iterable_to_array$6(arr) || _unsupported_iterable_to_array$8(arr) || _non_iterable_spread$6();
9125
9126
  }
9126
9127
  function _type_of$3(obj) {
9127
9128
  "@swc/helpers - typeof";
9128
9129
  return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
9129
9130
  }
9130
- function _unsupported_iterable_to_array$7(o, minLen) {
9131
+ function _unsupported_iterable_to_array$8(o, minLen) {
9131
9132
  if (!o) return;
9132
- if (typeof o === "string") return _array_like_to_array$7(o, minLen);
9133
+ if (typeof o === "string") return _array_like_to_array$8(o, minLen);
9133
9134
  var n = Object.prototype.toString.call(o).slice(8, -1);
9134
9135
  if (n === "Object" && o.constructor) n = o.constructor.name;
9135
9136
  if (n === "Map" || n === "Set") return Array.from(n);
9136
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$7(o, minLen);
9137
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$8(o, minLen);
9137
9138
  }
9138
9139
  function registerOverloads(registry) {
9139
9140
  var unaryOverload = function unaryOverload(op, t, h, ret) {
@@ -9200,7 +9201,7 @@ function registerOverloads(registry) {
9200
9201
  return a + b;
9201
9202
  });
9202
9203
  binaryOverload('list<V>', '+', 'list<V>', function(a, b) {
9203
- return _to_consumable_array$5(a).concat(_to_consumable_array$5(b));
9204
+ return _to_consumable_array$6(a).concat(_to_consumable_array$6(b));
9204
9205
  });
9205
9206
  binaryOverload('bytes', '+', 'bytes', function(a, b) {
9206
9207
  if (!a.length) return b;
@@ -9673,13 +9674,13 @@ var toDynTypeBinding = new Map().set('A', 'dyn').set('T', 'dyn').set('K', 'dyn')
9673
9674
  return TypeChecker;
9674
9675
  }(Base);
9675
9676
 
9676
- function _array_like_to_array$6(arr, len) {
9677
+ function _array_like_to_array$7(arr, len) {
9677
9678
  if (len == null || len > arr.length) len = arr.length;
9678
9679
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
9679
9680
  return arr2;
9680
9681
  }
9681
- function _array_without_holes$4(arr) {
9682
- if (Array.isArray(arr)) return _array_like_to_array$6(arr);
9682
+ function _array_without_holes$5(arr) {
9683
+ if (Array.isArray(arr)) return _array_like_to_array$7(arr);
9683
9684
  }
9684
9685
  function _check_private_redeclaration$1(obj, privateCollection) {
9685
9686
  if (privateCollection.has(obj)) {
@@ -9770,22 +9771,22 @@ function _instanceof$2(left, right) {
9770
9771
  return left instanceof right;
9771
9772
  }
9772
9773
  }
9773
- function _iterable_to_array$4(iter) {
9774
+ function _iterable_to_array$5(iter) {
9774
9775
  if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
9775
9776
  }
9776
- function _non_iterable_spread$4() {
9777
+ function _non_iterable_spread$5() {
9777
9778
  throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
9778
9779
  }
9779
- function _to_consumable_array$4(arr) {
9780
- return _array_without_holes$4(arr) || _iterable_to_array$4(arr) || _unsupported_iterable_to_array$6(arr) || _non_iterable_spread$4();
9780
+ function _to_consumable_array$5(arr) {
9781
+ return _array_without_holes$5(arr) || _iterable_to_array$5(arr) || _unsupported_iterable_to_array$7(arr) || _non_iterable_spread$5();
9781
9782
  }
9782
- function _unsupported_iterable_to_array$6(o, minLen) {
9783
+ function _unsupported_iterable_to_array$7(o, minLen) {
9783
9784
  if (!o) return;
9784
- if (typeof o === "string") return _array_like_to_array$6(o, minLen);
9785
+ if (typeof o === "string") return _array_like_to_array$7(o, minLen);
9785
9786
  var n = Object.prototype.toString.call(o).slice(8, -1);
9786
9787
  if (n === "Object" && o.constructor) n = o.constructor.name;
9787
9788
  if (n === "Map" || n === "Set") return Array.from(n);
9788
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$6(o, minLen);
9789
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$7(o, minLen);
9789
9790
  }
9790
9791
  var TOKEN = {
9791
9792
  EOF: 0,
@@ -9982,7 +9983,7 @@ var ASTNode = /*#__PURE__*/ function() {
9982
9983
  ];
9983
9984
  return [
9984
9985
  this.op
9985
- ].concat(_to_consumable_array$4(args.map(function(a) {
9986
+ ].concat(_to_consumable_array$5(args.map(function(a) {
9986
9987
  return _instanceof$2(a, ASTNode) ? a.toOldStructure() : a;
9987
9988
  })));
9988
9989
  }
@@ -11327,7 +11328,7 @@ function parse(expression) {
11327
11328
  return globalEnvironment.parse(expression);
11328
11329
  }
11329
11330
 
11330
- function _array_like_to_array$5(arr, len) {
11331
+ function _array_like_to_array$6(arr, len) {
11331
11332
  if (len == null || len > arr.length) len = arr.length;
11332
11333
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
11333
11334
  return arr2;
@@ -11335,8 +11336,8 @@ function _array_like_to_array$5(arr, len) {
11335
11336
  function _array_with_holes$2(arr) {
11336
11337
  if (Array.isArray(arr)) return arr;
11337
11338
  }
11338
- function _array_without_holes$3(arr) {
11339
- if (Array.isArray(arr)) return _array_like_to_array$5(arr);
11339
+ function _array_without_holes$4(arr) {
11340
+ if (Array.isArray(arr)) return _array_like_to_array$6(arr);
11340
11341
  }
11341
11342
  function _instanceof(left, right) {
11342
11343
  "@swc/helpers - instanceof";
@@ -11346,7 +11347,7 @@ function _instanceof(left, right) {
11346
11347
  return left instanceof right;
11347
11348
  }
11348
11349
  }
11349
- function _iterable_to_array$3(iter) {
11350
+ function _iterable_to_array$4(iter) {
11350
11351
  if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
11351
11352
  }
11352
11353
  function _iterable_to_array_limit$2(arr, i) {
@@ -11376,26 +11377,26 @@ function _iterable_to_array_limit$2(arr, i) {
11376
11377
  function _non_iterable_rest$2() {
11377
11378
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
11378
11379
  }
11379
- function _non_iterable_spread$3() {
11380
+ function _non_iterable_spread$4() {
11380
11381
  throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
11381
11382
  }
11382
11383
  function _sliced_to_array$2(arr, i) {
11383
- return _array_with_holes$2(arr) || _iterable_to_array_limit$2(arr, i) || _unsupported_iterable_to_array$5(arr, i) || _non_iterable_rest$2();
11384
+ return _array_with_holes$2(arr) || _iterable_to_array_limit$2(arr, i) || _unsupported_iterable_to_array$6(arr, i) || _non_iterable_rest$2();
11384
11385
  }
11385
- function _to_consumable_array$3(arr) {
11386
- return _array_without_holes$3(arr) || _iterable_to_array$3(arr) || _unsupported_iterable_to_array$5(arr) || _non_iterable_spread$3();
11386
+ function _to_consumable_array$4(arr) {
11387
+ return _array_without_holes$4(arr) || _iterable_to_array$4(arr) || _unsupported_iterable_to_array$6(arr) || _non_iterable_spread$4();
11387
11388
  }
11388
11389
  function _type_of(obj) {
11389
11390
  "@swc/helpers - typeof";
11390
11391
  return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
11391
11392
  }
11392
- function _unsupported_iterable_to_array$5(o, minLen) {
11393
+ function _unsupported_iterable_to_array$6(o, minLen) {
11393
11394
  if (!o) return;
11394
- if (typeof o === "string") return _array_like_to_array$5(o, minLen);
11395
+ if (typeof o === "string") return _array_like_to_array$6(o, minLen);
11395
11396
  var n = Object.prototype.toString.call(o).slice(8, -1);
11396
11397
  if (n === "Object" && o.constructor) n = o.constructor.name;
11397
11398
  if (n === "Map" || n === "Set") return Array.from(n);
11398
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$5(o, minLen);
11399
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$6(o, minLen);
11399
11400
  }
11400
11401
  var REGEX_METACHARS_RE = /[.*+?^${}()|[\]\\]/;
11401
11402
  var HELPER_INLINE_MAX_DEPTH = 8;
@@ -11639,7 +11640,7 @@ function collectUniqueBranches(ast, helpers) {
11639
11640
  var result;
11640
11641
  if (node.op === '||') {
11641
11642
  var _node_args = _sliced_to_array$2(node.args, 2), l = _node_args[0], r = _node_args[1];
11642
- result = _to_consumable_array$3(toDnf(l)).concat(_to_consumable_array$3(toDnf(r)));
11643
+ result = _to_consumable_array$4(toDnf(l)).concat(_to_consumable_array$4(toDnf(r)));
11643
11644
  } else if (node.op === '&&') {
11644
11645
  var _node_args1 = _sliced_to_array$2(node.args, 2), l1 = _node_args1[0], r1 = _node_args1[1];
11645
11646
  var left = toDnf(l1);
@@ -11653,7 +11654,7 @@ function collectUniqueBranches(ast, helpers) {
11653
11654
  try {
11654
11655
  for(var _iterator1 = right[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true){
11655
11656
  var rd = _step1.value;
11656
- result.push(_to_consumable_array$3(ld).concat(_to_consumable_array$3(rd)));
11657
+ result.push(_to_consumable_array$4(ld).concat(_to_consumable_array$4(rd)));
11657
11658
  }
11658
11659
  } catch (err) {
11659
11660
  _didIteratorError1 = true;
@@ -11977,10 +11978,10 @@ function applyNumericBinaryOp(op, left, right) {
11977
11978
  * @param branch - The parsed branch.
11978
11979
  * @returns A signature string usable as a Map/Set key.
11979
11980
  */ function branchSignature(branch) {
11980
- var literals = _to_consumable_array$3(branch.allowedMimeLiterals).sort(function(a, b) {
11981
+ var literals = _to_consumable_array$4(branch.allowedMimeLiterals).sort(function(a, b) {
11981
11982
  return a.localeCompare(b);
11982
11983
  });
11983
- var regexes = _to_consumable_array$3(branch.allowedMimeRegexes).sort(function(a, b) {
11984
+ var regexes = _to_consumable_array$4(branch.allowedMimeRegexes).sort(function(a, b) {
11984
11985
  return a.localeCompare(b);
11985
11986
  });
11986
11987
  return "".concat(branch.maxFileSizeBytes, "|").concat(literals.join(','), "|").concat(regexes.join(','));
@@ -12582,30 +12583,30 @@ var ALLOW_WRITE_RE = /allow\s+(?:write|create|update)(?:\s*,\s*(?:write|create|u
12582
12583
  return ctx.results;
12583
12584
  }
12584
12585
 
12585
- function _array_like_to_array$4(arr, len) {
12586
+ function _array_like_to_array$5(arr, len) {
12586
12587
  if (len == null || len > arr.length) len = arr.length;
12587
12588
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
12588
12589
  return arr2;
12589
12590
  }
12590
- function _array_without_holes$2(arr) {
12591
- if (Array.isArray(arr)) return _array_like_to_array$4(arr);
12591
+ function _array_without_holes$3(arr) {
12592
+ if (Array.isArray(arr)) return _array_like_to_array$5(arr);
12592
12593
  }
12593
- function _iterable_to_array$2(iter) {
12594
+ function _iterable_to_array$3(iter) {
12594
12595
  if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
12595
12596
  }
12596
- function _non_iterable_spread$2() {
12597
+ function _non_iterable_spread$3() {
12597
12598
  throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
12598
12599
  }
12599
- function _to_consumable_array$2(arr) {
12600
- return _array_without_holes$2(arr) || _iterable_to_array$2(arr) || _unsupported_iterable_to_array$4(arr) || _non_iterable_spread$2();
12600
+ function _to_consumable_array$3(arr) {
12601
+ return _array_without_holes$3(arr) || _iterable_to_array$3(arr) || _unsupported_iterable_to_array$5(arr) || _non_iterable_spread$3();
12601
12602
  }
12602
- function _unsupported_iterable_to_array$4(o, minLen) {
12603
+ function _unsupported_iterable_to_array$5(o, minLen) {
12603
12604
  if (!o) return;
12604
- if (typeof o === "string") return _array_like_to_array$4(o, minLen);
12605
+ if (typeof o === "string") return _array_like_to_array$5(o, minLen);
12605
12606
  var n = Object.prototype.toString.call(o).slice(8, -1);
12606
12607
  if (n === "Object" && o.constructor) n = o.constructor.name;
12607
12608
  if (n === "Map" || n === "Set") return Array.from(n);
12608
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$4(o, minLen);
12609
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$5(o, minLen);
12609
12610
  }
12610
12611
  var MAX_FOLD_DEPTH = 24;
12611
12612
  var PATH_SEPARATOR = '/';
@@ -12649,29 +12650,29 @@ var PATH_SEPARATOR = '/';
12649
12650
  var env = new Map();
12650
12651
  bindParamsAsWildcards((_fn_params = fn.params) !== null && _fn_params !== void 0 ? _fn_params : [], env);
12651
12652
  var body = functionBodyExpression(fn);
12652
- if (!body) {
12653
- result = {
12654
- ok: false,
12655
- reason: 'buildUploadPath body is not a single return expression'
12656
- };
12657
- } else {
12653
+ if (body) {
12658
12654
  var frags = foldFrags(body, {
12659
12655
  scope: scope,
12660
12656
  env: env
12661
12657
  }, 0);
12662
- if (!frags) {
12663
- result = {
12664
- ok: false,
12665
- reason: 'buildUploadPath does not fold to a constant path (unknown const, unmodeled call, or runtime value)'
12666
- };
12667
- } else {
12658
+ if (frags) {
12668
12659
  result = {
12669
12660
  ok: true,
12670
12661
  path: {
12671
12662
  segments: fragsToSegments(frags)
12672
12663
  }
12673
12664
  };
12665
+ } else {
12666
+ result = {
12667
+ ok: false,
12668
+ reason: 'buildUploadPath does not fold to a constant path (unknown const, unmodeled call, or runtime value)'
12669
+ };
12674
12670
  }
12671
+ } else {
12672
+ result = {
12673
+ ok: false,
12674
+ reason: 'buildUploadPath body is not a single return expression'
12675
+ };
12675
12676
  }
12676
12677
  }
12677
12678
  return result;
@@ -12820,7 +12821,7 @@ function foldTemplateLiteral(node, frame, depth) {
12820
12821
  var _ref;
12821
12822
  var _quasis_i_value, _quasis_i;
12822
12823
  var cooked = (_ref = (_quasis_i = quasis[i]) === null || _quasis_i === void 0 ? void 0 : (_quasis_i_value = _quasis_i.value) === null || _quasis_i_value === void 0 ? void 0 : _quasis_i_value.cooked) !== null && _ref !== void 0 ? _ref : '';
12823
- var next = _to_consumable_array$2(result).concat([
12824
+ var next = _to_consumable_array$3(result).concat([
12824
12825
  {
12825
12826
  kind: 'literal',
12826
12827
  value: cooked
@@ -12828,7 +12829,7 @@ function foldTemplateLiteral(node, frame, depth) {
12828
12829
  ]);
12829
12830
  if (i < expressions.length) {
12830
12831
  var exprFrags = foldFrags(expressions[i], frame, depth + 1);
12831
- result = exprFrags ? _to_consumable_array$2(next).concat(_to_consumable_array$2(exprFrags)) : null;
12832
+ result = exprFrags ? _to_consumable_array$3(next).concat(_to_consumable_array$3(exprFrags)) : null;
12832
12833
  } else {
12833
12834
  result = next;
12834
12835
  }
@@ -12840,7 +12841,7 @@ function foldStringConcat(node, frame, depth) {
12840
12841
  var left = foldFrags(node.left, frame, depth + 1);
12841
12842
  var right = foldFrags(node.right, frame, depth + 1);
12842
12843
  if (left && right) {
12843
- result = _to_consumable_array$2(left).concat(_to_consumable_array$2(right));
12844
+ result = _to_consumable_array$3(left).concat(_to_consumable_array$3(right));
12844
12845
  }
12845
12846
  return result;
12846
12847
  }
@@ -12933,7 +12934,7 @@ function foldStringConcat(node, frame, depth) {
12933
12934
  value: PATH_SEPARATOR
12934
12935
  });
12935
12936
  }
12936
- (_joined = joined).push.apply(_joined, _to_consumable_array$2(item));
12937
+ (_joined = joined).push.apply(_joined, _to_consumable_array$3(item));
12937
12938
  first = false;
12938
12939
  }
12939
12940
  }
@@ -13061,10 +13062,10 @@ function foldStringConcat(node, frame, depth) {
13061
13062
  }
13062
13063
  if ((arg === null || arg === void 0 ? void 0 : arg.type) === 'SpreadElement') {
13063
13064
  var list = foldSpreadOperand(arg.argument, frame, depth);
13064
- result = list ? _to_consumable_array$2(result).concat(_to_consumable_array$2(list)) : null;
13065
+ result = list ? _to_consumable_array$3(result).concat(_to_consumable_array$3(list)) : null;
13065
13066
  } else {
13066
13067
  var frags = foldFrags(arg, frame, depth + 1);
13067
- result = frags ? _to_consumable_array$2(result).concat([
13068
+ result = frags ? _to_consumable_array$3(result).concat([
13068
13069
  frags
13069
13070
  ]) : null;
13070
13071
  }
@@ -13129,10 +13130,10 @@ function foldStringConcat(node, frame, depth) {
13129
13130
  result = null;
13130
13131
  } else if (element.type === 'SpreadElement') {
13131
13132
  var list = foldSpreadOperand(element.argument, frame, depth);
13132
- result = list ? _to_consumable_array$2(result).concat(_to_consumable_array$2(list)) : null;
13133
+ result = list ? _to_consumable_array$3(result).concat(_to_consumable_array$3(list)) : null;
13133
13134
  } else {
13134
13135
  var frags = foldFrags(element, frame, depth + 1);
13135
- result = frags ? _to_consumable_array$2(result).concat([
13136
+ result = frags ? _to_consumable_array$3(result).concat([
13136
13137
  frags
13137
13138
  ]) : null;
13138
13139
  }
@@ -13519,7 +13520,7 @@ function fragListsToStrings(items) {
13519
13520
  break;
13520
13521
  }
13521
13522
  var str = fragsToConcreteString(item);
13522
- result = str != null ? _to_consumable_array$2(result).concat([
13523
+ result = str != null ? _to_consumable_array$3(result).concat([
13523
13524
  str
13524
13525
  ]) : null;
13525
13526
  }
@@ -13611,9 +13612,7 @@ function applyNumericOperator(operator, left, right) {
13611
13612
  for(var i = 0; result && i < folded.segments.length; i++){
13612
13613
  var a = folded.segments[i];
13613
13614
  var b = ruleSegments[i];
13614
- if (a.kind !== b.kind) {
13615
- result = false;
13616
- } else if (a.kind === 'literal' && a.value !== b.value) {
13615
+ if (a.kind !== b.kind || a.kind === 'literal' && a.value !== b.value) {
13617
13616
  result = false;
13618
13617
  }
13619
13618
  }
@@ -14589,30 +14588,30 @@ function unwrapVariableDeclaration$1(statement) {
14589
14588
  }
14590
14589
  }
14591
14590
 
14592
- function _array_like_to_array$3(arr, len) {
14591
+ function _array_like_to_array$4(arr, len) {
14593
14592
  if (len == null || len > arr.length) len = arr.length;
14594
14593
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
14595
14594
  return arr2;
14596
14595
  }
14597
- function _array_without_holes$1(arr) {
14598
- if (Array.isArray(arr)) return _array_like_to_array$3(arr);
14596
+ function _array_without_holes$2(arr) {
14597
+ if (Array.isArray(arr)) return _array_like_to_array$4(arr);
14599
14598
  }
14600
- function _iterable_to_array$1(iter) {
14599
+ function _iterable_to_array$2(iter) {
14601
14600
  if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
14602
14601
  }
14603
- function _non_iterable_spread$1() {
14602
+ function _non_iterable_spread$2() {
14604
14603
  throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
14605
14604
  }
14606
- function _to_consumable_array$1(arr) {
14607
- return _array_without_holes$1(arr) || _iterable_to_array$1(arr) || _unsupported_iterable_to_array$3(arr) || _non_iterable_spread$1();
14605
+ function _to_consumable_array$2(arr) {
14606
+ return _array_without_holes$2(arr) || _iterable_to_array$2(arr) || _unsupported_iterable_to_array$4(arr) || _non_iterable_spread$2();
14608
14607
  }
14609
- function _unsupported_iterable_to_array$3(o, minLen) {
14608
+ function _unsupported_iterable_to_array$4(o, minLen) {
14610
14609
  if (!o) return;
14611
- if (typeof o === "string") return _array_like_to_array$3(o, minLen);
14610
+ if (typeof o === "string") return _array_like_to_array$4(o, minLen);
14612
14611
  var n = Object.prototype.toString.call(o).slice(8, -1);
14613
14612
  if (n === "Object" && o.constructor) n = o.constructor.name;
14614
14613
  if (n === "Map" || n === "Set") return Array.from(n);
14615
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$3(o, minLen);
14614
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$4(o, minLen);
14616
14615
  }
14617
14616
  var ALLOW_RE = /\ballow\s+([A-Za-z, \t]+?)\s*:\s*if\b/g;
14618
14617
  var COLLECTION_GROUP_PREFIX = /^\/\{[A-Za-z_]\w*=\*\*\}\//;
@@ -14656,7 +14655,7 @@ var BARE_IDENTIFIER_RE = /^[A-Za-z_]\w*$/;
14656
14655
  }
14657
14656
  match = ALLOW_RE.exec(body);
14658
14657
  }
14659
- return _to_consumable_array$1(seen);
14658
+ return _to_consumable_array$2(seen);
14660
14659
  }
14661
14660
  /**
14662
14661
  * Pulls the first bare-identifier collection token from a match path. Skips an optional
@@ -14818,7 +14817,7 @@ var BARE_IDENTIFIER_RE = /^[A-Za-z_]\w*$/;
14818
14817
  return walkBlock(masked, 0, source);
14819
14818
  }
14820
14819
 
14821
- function _array_like_to_array$2(arr, len) {
14820
+ function _array_like_to_array$3(arr, len) {
14822
14821
  if (len == null || len > arr.length) len = arr.length;
14823
14822
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
14824
14823
  return arr2;
@@ -14901,15 +14900,15 @@ function _object_spread_props(target, source) {
14901
14900
  return target;
14902
14901
  }
14903
14902
  function _sliced_to_array$1(arr, i) {
14904
- return _array_with_holes$1(arr) || _iterable_to_array_limit$1(arr, i) || _unsupported_iterable_to_array$2(arr, i) || _non_iterable_rest$1();
14903
+ return _array_with_holes$1(arr) || _iterable_to_array_limit$1(arr, i) || _unsupported_iterable_to_array$3(arr, i) || _non_iterable_rest$1();
14905
14904
  }
14906
- function _unsupported_iterable_to_array$2(o, minLen) {
14905
+ function _unsupported_iterable_to_array$3(o, minLen) {
14907
14906
  if (!o) return;
14908
- if (typeof o === "string") return _array_like_to_array$2(o, minLen);
14907
+ if (typeof o === "string") return _array_like_to_array$3(o, minLen);
14909
14908
  var n = Object.prototype.toString.call(o).slice(8, -1);
14910
14909
  if (n === "Object" && o.constructor) n = o.constructor.name;
14911
14910
  if (n === "Map" || n === "Set") return Array.from(n);
14912
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$2(o, minLen);
14911
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$3(o, minLen);
14913
14912
  }
14914
14913
  /**
14915
14914
  * Default file name searched relative to the lint root when `firestoreRulesPath` is omitted.
@@ -16238,30 +16237,30 @@ function reportModelKey(context, modelKey) {
16238
16237
  }
16239
16238
  };
16240
16239
 
16241
- function _array_like_to_array$1(arr, len) {
16240
+ function _array_like_to_array$2(arr, len) {
16242
16241
  if (len == null || len > arr.length) len = arr.length;
16243
16242
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
16244
16243
  return arr2;
16245
16244
  }
16246
- function _array_without_holes(arr) {
16247
- if (Array.isArray(arr)) return _array_like_to_array$1(arr);
16245
+ function _array_without_holes$1(arr) {
16246
+ if (Array.isArray(arr)) return _array_like_to_array$2(arr);
16248
16247
  }
16249
- function _iterable_to_array(iter) {
16248
+ function _iterable_to_array$1(iter) {
16250
16249
  if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
16251
16250
  }
16252
- function _non_iterable_spread() {
16251
+ function _non_iterable_spread$1() {
16253
16252
  throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
16254
16253
  }
16255
- function _to_consumable_array(arr) {
16256
- return _array_without_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array$1(arr) || _non_iterable_spread();
16254
+ function _to_consumable_array$1(arr) {
16255
+ return _array_without_holes$1(arr) || _iterable_to_array$1(arr) || _unsupported_iterable_to_array$2(arr) || _non_iterable_spread$1();
16257
16256
  }
16258
- function _unsupported_iterable_to_array$1(o, minLen) {
16257
+ function _unsupported_iterable_to_array$2(o, minLen) {
16259
16258
  if (!o) return;
16260
- if (typeof o === "string") return _array_like_to_array$1(o, minLen);
16259
+ if (typeof o === "string") return _array_like_to_array$2(o, minLen);
16261
16260
  var n = Object.prototype.toString.call(o).slice(8, -1);
16262
16261
  if (n === "Object" && o.constructor) n = o.constructor.name;
16263
16262
  if (n === "Map" || n === "Set") return Array.from(n);
16264
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$1(o, minLen);
16263
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$2(o, minLen);
16265
16264
  }
16266
16265
  /**
16267
16266
  * Default glob pattern (relative to ESLint `cwd`) used to locate `@dbxModelServiceFactory` source
@@ -16535,7 +16534,7 @@ function extractFactoryModelTypes(text, factoryTag) {
16535
16534
  for(var _iterator = comments[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
16536
16535
  var comment = _step.value;
16537
16536
  var _out;
16538
- (_out = out).push.apply(_out, _to_consumable_array(modelTypesFromFactoryComment(comment, factoryTag)));
16537
+ (_out = out).push.apply(_out, _to_consumable_array$1(modelTypesFromFactoryComment(comment, factoryTag)));
16539
16538
  }
16540
16539
  } catch (err) {
16541
16540
  _didIteratorError = true;
@@ -16554,7 +16553,7 @@ function extractFactoryModelTypes(text, factoryTag) {
16554
16553
  return out;
16555
16554
  }
16556
16555
 
16557
- function _array_like_to_array(arr, len) {
16556
+ function _array_like_to_array$1(arr, len) {
16558
16557
  if (len == null || len > arr.length) len = arr.length;
16559
16558
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
16560
16559
  return arr2;
@@ -16590,15 +16589,15 @@ function _non_iterable_rest() {
16590
16589
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
16591
16590
  }
16592
16591
  function _sliced_to_array(arr, i) {
16593
- return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array(arr, i) || _non_iterable_rest();
16592
+ return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array$1(arr, i) || _non_iterable_rest();
16594
16593
  }
16595
- function _unsupported_iterable_to_array(o, minLen) {
16594
+ function _unsupported_iterable_to_array$1(o, minLen) {
16596
16595
  if (!o) return;
16597
- if (typeof o === "string") return _array_like_to_array(o, minLen);
16596
+ if (typeof o === "string") return _array_like_to_array$1(o, minLen);
16598
16597
  var n = Object.prototype.toString.call(o).slice(8, -1);
16599
16598
  if (n === "Object" && o.constructor) n = o.constructor.name;
16600
16599
  if (n === "Map" || n === "Set") return Array.from(n);
16601
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
16600
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$1(o, minLen);
16602
16601
  }
16603
16602
  var MODEL_MARKERS = new Set([
16604
16603
  'dbxModel',
@@ -17243,20 +17242,19 @@ var SPEC_SUFFIX = '.spec.ts';
17243
17242
  */ function classifySpecFile(config) {
17244
17243
  var filename = config.filename, parentFolderName = config.parentFolderName;
17245
17244
  var result;
17246
- if (!filename.endsWith(SPEC_SUFFIX)) {
17247
- result = {
17248
- filename: filename,
17249
- group: '',
17250
- kind: 'non-spec',
17251
- subgroups: [],
17252
- isCanonical: false
17253
- };
17254
- } else {
17245
+ if (filename.endsWith(SPEC_SUFFIX)) {
17255
17246
  var _parts_;
17256
17247
  var stem = filename.slice(0, -SPEC_SUFFIX.length);
17257
17248
  var parts = stem.split('.');
17258
17249
  var group = (_parts_ = parts[0]) !== null && _parts_ !== void 0 ? _parts_ : '';
17259
- if (group !== parentFolderName) {
17250
+ if (group === parentFolderName) {
17251
+ var rest = parts.slice(1);
17252
+ result = classifyRemainingSegments({
17253
+ filename: filename,
17254
+ group: group,
17255
+ rest: rest
17256
+ });
17257
+ } else {
17260
17258
  result = {
17261
17259
  filename: filename,
17262
17260
  group: group,
@@ -17264,14 +17262,15 @@ var SPEC_SUFFIX = '.spec.ts';
17264
17262
  subgroups: [],
17265
17263
  isCanonical: false
17266
17264
  };
17267
- } else {
17268
- var rest = parts.slice(1);
17269
- result = classifyRemainingSegments({
17270
- filename: filename,
17271
- group: group,
17272
- rest: rest
17273
- });
17274
17265
  }
17266
+ } else {
17267
+ result = {
17268
+ filename: filename,
17269
+ group: '',
17270
+ kind: 'non-spec',
17271
+ subgroups: [],
17272
+ isCanonical: false
17273
+ };
17275
17274
  }
17276
17275
  return result;
17277
17276
  }
@@ -17638,6 +17637,446 @@ function hasCrudSpec(groupDir, group) {
17638
17637
  }
17639
17638
  };
17640
17639
 
17640
+ /**
17641
+ * JSDoc marker tag that every CRUD params interface should carry so the dbx-components manifest
17642
+ * extractor (`packages/dbx-cli/manifest-extract/src/lib/extract-crud.ts`) records it as an
17643
+ * intentionally-exposed API params type rather than an untagged one.
17644
+ */ var DBX_MODEL_API_PARAMS_MARKER = 'dbxModelApiParams';
17645
+ /**
17646
+ * Suffix on the type alias that declares a model-group CRUD function config (e.g.
17647
+ * `GuestbookModelCrudFunctionsConfig`). Its referenced params interfaces are the ones the marker
17648
+ * tag is required on.
17649
+ */ var DEFAULT_CRUD_FUNCTIONS_CONFIG_SUFFIX = 'ModelCrudFunctionsConfig';
17650
+ /**
17651
+ * Suffix on the type alias that declares a group's standalone function type map (e.g.
17652
+ * `GuestbookFunctionTypeMap`). Each entry's params type is also subject to the marker tag.
17653
+ */ var DEFAULT_FUNCTION_TYPE_MAP_SUFFIX = 'FunctionTypeMap';
17654
+ /**
17655
+ * Returns the first element type node of a `TSTupleType`, normalizing across `@typescript-eslint`
17656
+ * versions (`elementTypes` historically, `elements` in newer releases). CRUD config tuples take the
17657
+ * form `[Params, Result]`, so element 0 is always the params type.
17658
+ *
17659
+ * @param node - A `TSTupleType` node.
17660
+ * @returns The first element type node, or null when the tuple is empty.
17661
+ */ function tupleFirstElement(node) {
17662
+ var _ref, _ref1;
17663
+ var elements = (_ref = node === null || node === void 0 ? void 0 : node.elementTypes) !== null && _ref !== void 0 ? _ref : node === null || node === void 0 ? void 0 : node.elements;
17664
+ return (_ref1 = elements === null || elements === void 0 ? void 0 : elements[0]) !== null && _ref1 !== void 0 ? _ref1 : null;
17665
+ }
17666
+ /**
17667
+ * Recursively collects the params type-reference names declared by a CRUD config / function-type-map
17668
+ * type node into `out`, mirroring the resolution in `extract-crud.ts`. A bare `TSTypeReference`
17669
+ * (`create: CreateGuestbookParams`) contributes its referenced name; a `TSTupleType`
17670
+ * (`query: [QueryGuestbooksParams, OnCallQueryModelResult<...>]`) contributes element 0 only, since
17671
+ * element 1 is the result type; and a `TSTypeLiteral` (model literal, verb literal, or
17672
+ * `{ specifier: ... }` object) is recursed into per property-signature value. Generic type arguments
17673
+ * on a reference are intentionally not descended into — only the params type itself is collected.
17674
+ *
17675
+ * @param node - The type node to inspect.
17676
+ * @param out - The accumulating set of params type-reference names.
17677
+ */ function collectParamsTypeNames(node, out) {
17678
+ if (!node) {
17679
+ return;
17680
+ }
17681
+ if (node.type === 'TSTypeReference') {
17682
+ var name = typeReferenceTypeName$1(node);
17683
+ if (name) {
17684
+ out.add(name);
17685
+ }
17686
+ } else if (node.type === 'TSTupleType') {
17687
+ collectParamsTypeNames(tupleFirstElement(node), out);
17688
+ } else if (node.type === 'TSTypeLiteral' && Array.isArray(node.members)) {
17689
+ var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
17690
+ try {
17691
+ for(var _iterator = node.members[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
17692
+ var member = _step.value;
17693
+ if ((member === null || member === void 0 ? void 0 : member.type) === 'TSPropertySignature') {
17694
+ var _member_typeAnnotation;
17695
+ collectParamsTypeNames((_member_typeAnnotation = member.typeAnnotation) === null || _member_typeAnnotation === void 0 ? void 0 : _member_typeAnnotation.typeAnnotation, out);
17696
+ }
17697
+ }
17698
+ } catch (err) {
17699
+ _didIteratorError = true;
17700
+ _iteratorError = err;
17701
+ } finally{
17702
+ try {
17703
+ if (!_iteratorNormalCompletion && _iterator.return != null) {
17704
+ _iterator.return();
17705
+ }
17706
+ } finally{
17707
+ if (_didIteratorError) {
17708
+ throw _iteratorError;
17709
+ }
17710
+ }
17711
+ }
17712
+ }
17713
+ }
17714
+ /**
17715
+ * Returns the inner declaration node when `statement` is (or wraps) a `TSInterfaceDeclaration`, along
17716
+ * with the statement-level anchor ESLint attaches leading comments to.
17717
+ *
17718
+ * @param statement - A top-level `Program.body` statement.
17719
+ * @returns The interface declaration + its JSDoc anchor, or null when the statement is not an interface.
17720
+ */ function interfaceFromStatement(statement) {
17721
+ var _statement_declaration;
17722
+ var result = null;
17723
+ if ((statement === null || statement === void 0 ? void 0 : statement.type) === 'TSInterfaceDeclaration') {
17724
+ result = {
17725
+ decl: statement,
17726
+ anchor: statement
17727
+ };
17728
+ } else if (((statement === null || statement === void 0 ? void 0 : statement.type) === 'ExportNamedDeclaration' || (statement === null || statement === void 0 ? void 0 : statement.type) === 'ExportDefaultDeclaration') && ((_statement_declaration = statement.declaration) === null || _statement_declaration === void 0 ? void 0 : _statement_declaration.type) === 'TSInterfaceDeclaration') {
17729
+ result = {
17730
+ decl: statement.declaration,
17731
+ anchor: statement
17732
+ };
17733
+ }
17734
+ return result;
17735
+ }
17736
+ /**
17737
+ * Returns true when the interface's leading JSDoc carries the given marker tag.
17738
+ *
17739
+ * @param sourceCode - The ESLint `SourceCode` object.
17740
+ * @param anchor - The interface's JSDoc anchor node.
17741
+ * @param tagName - The marker tag name (without the leading `@`).
17742
+ * @returns True when the marker tag is present on the interface's JSDoc.
17743
+ */ function interfaceHasMarker(sourceCode, anchor, tagName) {
17744
+ var jsdoc = leadingJsdocFor(sourceCode, anchor);
17745
+ var result = false;
17746
+ if (jsdoc) {
17747
+ var parsed = parseJsdocComment(jsdoc.value);
17748
+ result = parsed.tags.some(function(tag) {
17749
+ return tag.tag === tagName;
17750
+ });
17751
+ }
17752
+ return result;
17753
+ }
17754
+ /**
17755
+ * ESLint rule that requires every params interface referenced by a `*ModelCrudFunctionsConfig` (and,
17756
+ * by default, `*FunctionTypeMap`) type alias and declared in the same file to carry the
17757
+ * `@dbxModelApiParams` JSDoc marker tag.
17758
+ *
17759
+ * The marker is the signal the dbx-components manifest extractor
17760
+ * (`packages/dbx-cli/manifest-extract/src/lib/extract-crud.ts`) reads to distinguish an
17761
+ * intentionally-exposed API params type from an untagged one — missing it produces the
17762
+ * `[no-api-params-tag]` build warning and the "Missing `@dbxModelApiParams` marker" hint in the
17763
+ * `dbx_model_api_lookup` MCP tool. This rule surfaces the same gap in-editor at lint time.
17764
+ *
17765
+ * Same-file resolution only — matching the extractor, which itself resolves params interfaces from a
17766
+ * single in-memory source file. Params types declared in another file (e.g. shared base params like
17767
+ * `TargetModelParams`) are skipped, exactly as the extractor reports them as unresolved.
17768
+ *
17769
+ * @example
17770
+ * ```ts
17771
+ * export type GuestbookModelCrudFunctionsConfig = {
17772
+ * guestbook: { create: CreateGuestbookParams };
17773
+ * };
17774
+ *
17775
+ * // OK
17776
+ * /**
17777
+ * * @dbxModelApiParams
17778
+ * *\/
17779
+ * export interface CreateGuestbookParams { readonly name: string; }
17780
+ *
17781
+ * // WARN — missingApiParamsTag
17782
+ * export interface CreateGuestbookParams { readonly name: string; }
17783
+ * ```
17784
+ */ var FIREBASE_REQUIRE_DBX_MODEL_API_PARAMS_TAG_RULE = {
17785
+ meta: {
17786
+ type: 'suggestion',
17787
+ fixable: undefined,
17788
+ docs: {
17789
+ description: 'Require the `@dbxModelApiParams` marker tag on params interfaces referenced by a `*ModelCrudFunctionsConfig` / `*FunctionTypeMap` alias and declared in the same file, mirroring the manifest extractor that reads the tag.',
17790
+ recommended: true
17791
+ },
17792
+ messages: {
17793
+ missingApiParamsTag: 'Params interface "{{name}}" is referenced by the CRUD config "{{configName}}" but is missing the `@{{tag}}` marker. Add `@{{tag}}` to its JSDoc so the manifest extractor records it as an intentionally-exposed API params type.'
17794
+ },
17795
+ schema: [
17796
+ {
17797
+ type: 'object',
17798
+ additionalProperties: false,
17799
+ properties: {
17800
+ configTypeSuffix: {
17801
+ type: 'string'
17802
+ },
17803
+ alsoFunctionTypeMap: {
17804
+ type: 'boolean'
17805
+ },
17806
+ tagName: {
17807
+ type: 'string'
17808
+ }
17809
+ }
17810
+ }
17811
+ ]
17812
+ },
17813
+ create: function create(context) {
17814
+ var _context_options_, _options_configTypeSuffix, _options_tagName;
17815
+ var options = (_context_options_ = context.options[0]) !== null && _context_options_ !== void 0 ? _context_options_ : {};
17816
+ var configTypeSuffix = (_options_configTypeSuffix = options.configTypeSuffix) !== null && _options_configTypeSuffix !== void 0 ? _options_configTypeSuffix : DEFAULT_CRUD_FUNCTIONS_CONFIG_SUFFIX;
17817
+ var alsoFunctionTypeMap = options.alsoFunctionTypeMap !== false;
17818
+ var tagName = (_options_tagName = options.tagName) !== null && _options_tagName !== void 0 ? _options_tagName : DBX_MODEL_API_PARAMS_MARKER;
17819
+ var sourceCode = context.sourceCode;
17820
+ function isConfigAliasName(name) {
17821
+ return name.endsWith(configTypeSuffix) || alsoFunctionTypeMap && name.endsWith(DEFAULT_FUNCTION_TYPE_MAP_SUFFIX);
17822
+ }
17823
+ return {
17824
+ Program: function Program(programNode) {
17825
+ var _ref;
17826
+ var body = (_ref = programNode === null || programNode === void 0 ? void 0 : programNode.body) !== null && _ref !== void 0 ? _ref : [];
17827
+ // Index the interfaces declared in this file by name (same-file resolution, like the extractor).
17828
+ var interfaces = new Map();
17829
+ var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
17830
+ try {
17831
+ for(var _iterator = body[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
17832
+ var statement = _step.value;
17833
+ var _found_decl_id, _found_decl;
17834
+ var found = interfaceFromStatement(statement);
17835
+ if ((found === null || found === void 0 ? void 0 : (_found_decl = found.decl) === null || _found_decl === void 0 ? void 0 : (_found_decl_id = _found_decl.id) === null || _found_decl_id === void 0 ? void 0 : _found_decl_id.type) === 'Identifier') {
17836
+ interfaces.set(found.decl.id.name, found);
17837
+ }
17838
+ }
17839
+ } catch (err) {
17840
+ _didIteratorError = true;
17841
+ _iteratorError = err;
17842
+ } finally{
17843
+ try {
17844
+ if (!_iteratorNormalCompletion && _iterator.return != null) {
17845
+ _iterator.return();
17846
+ }
17847
+ } finally{
17848
+ if (_didIteratorError) {
17849
+ throw _iteratorError;
17850
+ }
17851
+ }
17852
+ }
17853
+ var _iteratorNormalCompletion1 = true, _didIteratorError1 = false, _iteratorError1 = undefined;
17854
+ try {
17855
+ for(var _iterator1 = body[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true){
17856
+ var statement1 = _step1.value;
17857
+ var _statement_declaration, _alias_id;
17858
+ var alias = (statement1 === null || statement1 === void 0 ? void 0 : statement1.type) === 'TSTypeAliasDeclaration' ? statement1 : (statement1 === null || statement1 === void 0 ? void 0 : statement1.type) === 'ExportNamedDeclaration' && ((_statement_declaration = statement1.declaration) === null || _statement_declaration === void 0 ? void 0 : _statement_declaration.type) === 'TSTypeAliasDeclaration' ? statement1.declaration : null;
17859
+ if (!alias || ((_alias_id = alias.id) === null || _alias_id === void 0 ? void 0 : _alias_id.type) !== 'Identifier' || !isConfigAliasName(alias.id.name)) {
17860
+ continue;
17861
+ }
17862
+ var paramsNames = new Set();
17863
+ collectParamsTypeNames(alias.typeAnnotation, paramsNames);
17864
+ var _iteratorNormalCompletion2 = true, _didIteratorError2 = false, _iteratorError2 = undefined;
17865
+ try {
17866
+ for(var _iterator2 = paramsNames[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true){
17867
+ var paramsName = _step2.value;
17868
+ var target = interfaces.get(paramsName);
17869
+ // Skip params types not declared in this file — the extractor cannot resolve them either.
17870
+ if (target && !interfaceHasMarker(sourceCode, target.anchor, tagName)) {
17871
+ context.report({
17872
+ node: target.decl.id,
17873
+ messageId: 'missingApiParamsTag',
17874
+ data: {
17875
+ name: paramsName,
17876
+ configName: alias.id.name,
17877
+ tag: tagName
17878
+ }
17879
+ });
17880
+ }
17881
+ }
17882
+ } catch (err) {
17883
+ _didIteratorError2 = true;
17884
+ _iteratorError2 = err;
17885
+ } finally{
17886
+ try {
17887
+ if (!_iteratorNormalCompletion2 && _iterator2.return != null) {
17888
+ _iterator2.return();
17889
+ }
17890
+ } finally{
17891
+ if (_didIteratorError2) {
17892
+ throw _iteratorError2;
17893
+ }
17894
+ }
17895
+ }
17896
+ }
17897
+ } catch (err) {
17898
+ _didIteratorError1 = true;
17899
+ _iteratorError1 = err;
17900
+ } finally{
17901
+ try {
17902
+ if (!_iteratorNormalCompletion1 && _iterator1.return != null) {
17903
+ _iterator1.return();
17904
+ }
17905
+ } finally{
17906
+ if (_didIteratorError1) {
17907
+ throw _iteratorError1;
17908
+ }
17909
+ }
17910
+ }
17911
+ }
17912
+ };
17913
+ }
17914
+ };
17915
+
17916
+ function _array_like_to_array(arr, len) {
17917
+ if (len == null || len > arr.length) len = arr.length;
17918
+ for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
17919
+ return arr2;
17920
+ }
17921
+ function _array_without_holes(arr) {
17922
+ if (Array.isArray(arr)) return _array_like_to_array(arr);
17923
+ }
17924
+ function _iterable_to_array(iter) {
17925
+ if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
17926
+ }
17927
+ function _non_iterable_spread() {
17928
+ throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
17929
+ }
17930
+ function _to_consumable_array(arr) {
17931
+ return _array_without_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_spread();
17932
+ }
17933
+ function _unsupported_iterable_to_array(o, minLen) {
17934
+ if (!o) return;
17935
+ if (typeof o === "string") return _array_like_to_array(o, minLen);
17936
+ var n = Object.prototype.toString.call(o).slice(8, -1);
17937
+ if (n === "Object" && o.constructor) n = o.constructor.name;
17938
+ if (n === "Map" || n === "Set") return Array.from(n);
17939
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
17940
+ }
17941
+ /**
17942
+ * Default method names this rule inspects for a `roles` selection option.
17943
+ *
17944
+ * Matches `nest.useModel(...)` and the multi-model `nest.useMultipleModels(...)`,
17945
+ * both of which accept an optional `roles` selection option.
17946
+ */ var DEFAULT_USE_MODEL_METHOD_NAMES = [
17947
+ 'useModel',
17948
+ 'useMultipleModels'
17949
+ ];
17950
+ /**
17951
+ * Returns the called method name when the call is a non-computed member-expression call
17952
+ * (e.g. `nest.useModel(...)`, `this._nestContext.useMultipleModels(...)`) whose method is
17953
+ * in the tracked set, otherwise null.
17954
+ */ function trackedMethodName(node, methodNames) {
17955
+ var _callee_property;
17956
+ var result = null;
17957
+ var callee = node.callee;
17958
+ if ((callee === null || callee === void 0 ? void 0 : callee.type) === 'MemberExpression' && !callee.computed && ((_callee_property = callee.property) === null || _callee_property === void 0 ? void 0 : _callee_property.type) === 'Identifier') {
17959
+ var name = callee.property.name;
17960
+ if (methodNames.has(name)) {
17961
+ result = name;
17962
+ }
17963
+ }
17964
+ return result;
17965
+ }
17966
+ /**
17967
+ * Returns true when the object literal explicitly declares a `roles` property, or contains a
17968
+ * spread element (in which case `roles` may originate from the spread and cannot be ruled out).
17969
+ */ function hasRolesPropertyOrSpread(objectNode) {
17970
+ var _objectNode_properties;
17971
+ var result = false;
17972
+ var properties = (_objectNode_properties = objectNode.properties) !== null && _objectNode_properties !== void 0 ? _objectNode_properties : [];
17973
+ var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
17974
+ try {
17975
+ for(var _iterator = properties[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
17976
+ var property = _step.value;
17977
+ if (property.type === 'SpreadElement' || property.type === 'ExperimentalSpreadProperty') {
17978
+ result = true;
17979
+ break;
17980
+ }
17981
+ if (property.type === 'Property' && !property.computed) {
17982
+ var key = property.key;
17983
+ var keyName = (key === null || key === void 0 ? void 0 : key.type) === 'Identifier' ? key.name : (key === null || key === void 0 ? void 0 : key.type) === 'Literal' ? String(key.value) : undefined;
17984
+ if (keyName === 'roles') {
17985
+ result = true;
17986
+ break;
17987
+ }
17988
+ }
17989
+ }
17990
+ } catch (err) {
17991
+ _didIteratorError = true;
17992
+ _iteratorError = err;
17993
+ } finally{
17994
+ try {
17995
+ if (!_iteratorNormalCompletion && _iterator.return != null) {
17996
+ _iterator.return();
17997
+ }
17998
+ } finally{
17999
+ if (_didIteratorError) {
18000
+ throw _iteratorError;
18001
+ }
18002
+ }
18003
+ }
18004
+ return result;
18005
+ }
18006
+ /**
18007
+ * ESLint rule that warns when a `nest.useModel(...)` / `nest.useMultipleModels(...)` selection
18008
+ * does not specify a `roles` option. The `roles` option declares which granted roles the caller
18009
+ * requires for the selected model; omitting it silently runs the selection without an explicit
18010
+ * role assertion.
18011
+ *
18012
+ * Intentionally role-free selections are still allowed: pass `roles: []` to assert "no role
18013
+ * required", or add an inline eslint-disable for this rule. The rule only checks for the presence
18014
+ * of a `roles` property, so an empty array satisfies it.
18015
+ *
18016
+ * The rule matches by AST shape (member-expression method call) rather than receiver name, so it
18017
+ * covers `nest.useModel(...)`, `this._nestContext.useModel(...)`, etc. When the selection argument
18018
+ * is not an inline object literal (an identifier/variable, conditional, call result, or a literal
18019
+ * containing a spread), the rule skips it to avoid false positives.
18020
+ *
18021
+ * Not auto-fixable: the rule cannot infer the correct role(s) for a given selection.
18022
+ */ var FIREBASE_REQUIRE_USE_MODEL_ROLES_RULE = {
18023
+ meta: {
18024
+ type: 'suggestion',
18025
+ fixable: undefined,
18026
+ docs: {
18027
+ description: 'Require an explicit `roles` selection option on `useModel` / `useMultipleModels` calls so model access asserts the roles it requires. Pass `roles: []` to intentionally require no role.',
18028
+ recommended: true
18029
+ },
18030
+ messages: {
18031
+ missingRoles: "`{{name}}(...)` does not specify `roles`. Pass a `roles` value (e.g. `roles: 'read'`), or `roles: []` to intentionally require no role, or add an inline eslint-disable for this rule."
18032
+ },
18033
+ schema: [
18034
+ {
18035
+ type: 'object',
18036
+ additionalProperties: false,
18037
+ properties: {
18038
+ methodNames: {
18039
+ type: 'array',
18040
+ items: {
18041
+ type: 'string'
18042
+ }
18043
+ },
18044
+ additionalMethodNames: {
18045
+ type: 'array',
18046
+ items: {
18047
+ type: 'string'
18048
+ }
18049
+ }
18050
+ }
18051
+ }
18052
+ ]
18053
+ },
18054
+ create: function create(context) {
18055
+ var _context_options_, _options_methodNames, _options_additionalMethodNames;
18056
+ var options = (_context_options_ = context.options[0]) !== null && _context_options_ !== void 0 ? _context_options_ : {};
18057
+ var baseNames = (_options_methodNames = options.methodNames) !== null && _options_methodNames !== void 0 ? _options_methodNames : DEFAULT_USE_MODEL_METHOD_NAMES;
18058
+ var methodNames = new Set(_to_consumable_array(baseNames).concat(_to_consumable_array((_options_additionalMethodNames = options.additionalMethodNames) !== null && _options_additionalMethodNames !== void 0 ? _options_additionalMethodNames : [])));
18059
+ return {
18060
+ CallExpression: function CallExpression(node) {
18061
+ var name = trackedMethodName(node, methodNames);
18062
+ if (name) {
18063
+ var _node_arguments;
18064
+ var selection = (_node_arguments = node.arguments) === null || _node_arguments === void 0 ? void 0 : _node_arguments[1];
18065
+ if ((selection === null || selection === void 0 ? void 0 : selection.type) === 'ObjectExpression' && !hasRolesPropertyOrSpread(selection)) {
18066
+ context.report({
18067
+ node: node.callee,
18068
+ messageId: 'missingRoles',
18069
+ data: {
18070
+ name: name
18071
+ }
18072
+ });
18073
+ }
18074
+ }
18075
+ }
18076
+ };
18077
+ }
18078
+ };
18079
+
17641
18080
  /**
17642
18081
  * ESLint plugin for `@dereekb/firebase` rules.
17643
18082
  *
@@ -17659,7 +18098,9 @@ function hasCrudSpec(groupDir, group) {
17659
18098
  'require-service-factory-for-dbx-model': FIREBASE_REQUIRE_SERVICE_FACTORY_FOR_DBX_MODEL_RULE,
17660
18099
  'require-dbx-model-companion-tags': FIREBASE_REQUIRE_DBX_MODEL_COMPANION_TAGS_RULE,
17661
18100
  'require-canonical-api-spec-filename': FIREBASE_REQUIRE_CANONICAL_API_SPEC_FILENAME_RULE,
17662
- 'require-api-crud-spec-for-group': FIREBASE_REQUIRE_API_CRUD_SPEC_FOR_GROUP_RULE
18101
+ 'require-api-crud-spec-for-group': FIREBASE_REQUIRE_API_CRUD_SPEC_FOR_GROUP_RULE,
18102
+ 'require-dbx-model-api-params-tag': FIREBASE_REQUIRE_DBX_MODEL_API_PARAMS_TAG_RULE,
18103
+ 'require-use-model-roles': FIREBASE_REQUIRE_USE_MODEL_ROLES_RULE
17663
18104
  }
17664
18105
  };
17665
18106
  /**
@@ -17669,10 +18110,12 @@ function hasCrudSpec(groupDir, group) {
17669
18110
  */ var firebaseESLintPlugin = FIREBASE_ESLINT_PLUGIN;
17670
18111
 
17671
18112
  exports.API_DETAILS_IMPORT_MODULE = API_DETAILS_IMPORT_MODULE;
18113
+ exports.DBX_MODEL_API_PARAMS_MARKER = DBX_MODEL_API_PARAMS_MARKER;
17672
18114
  exports.DBX_MODEL_FIREBASE_INDEX_MARKER = DBX_MODEL_FIREBASE_INDEX_MARKER;
17673
18115
  exports.DBX_MODEL_SERVICE_FACTORY_TAG = DBX_MODEL_SERVICE_FACTORY_TAG;
17674
18116
  exports.DEFAULT_API_DETAILS_FACTORY_NAME = DEFAULT_API_DETAILS_FACTORY_NAME;
17675
18117
  exports.DEFAULT_CONSTRAINT_FACTORY_NAMES = DEFAULT_CONSTRAINT_FACTORY_NAMES;
18118
+ exports.DEFAULT_CRUD_FUNCTIONS_CONFIG_SUFFIX = DEFAULT_CRUD_FUNCTIONS_CONFIG_SUFFIX;
17676
18119
  exports.DEFAULT_CRUD_FUNCTION_TYPE_VERBS = DEFAULT_CRUD_FUNCTION_TYPE_VERBS;
17677
18120
  exports.DEFAULT_CRUD_VERB_NAMES = DEFAULT_CRUD_VERB_NAMES;
17678
18121
  exports.DEFAULT_DISCOVERY_EXCLUDED_DIRS = DEFAULT_DISCOVERY_EXCLUDED_DIRS;
@@ -17680,6 +18123,7 @@ exports.DEFAULT_FACTORY_SEARCH_ROOTS = DEFAULT_FACTORY_SEARCH_ROOTS;
17680
18123
  exports.DEFAULT_FACTORY_TAG = DEFAULT_FACTORY_TAG;
17681
18124
  exports.DEFAULT_FIRESTORE_RULES_FILENAME = DEFAULT_FIRESTORE_RULES_FILENAME;
17682
18125
  exports.DEFAULT_FUNCTION_DIR_SEGMENT = DEFAULT_FUNCTION_DIR_SEGMENT;
18126
+ exports.DEFAULT_FUNCTION_TYPE_MAP_SUFFIX = DEFAULT_FUNCTION_TYPE_MAP_SUFFIX;
17683
18127
  exports.DEFAULT_IDENTITY_FACTORY_NAME = DEFAULT_IDENTITY_FACTORY_NAME;
17684
18128
  exports.DEFAULT_INDEX_AFFECTING_CONSTRAINT_NAMES = DEFAULT_INDEX_AFFECTING_CONSTRAINT_NAMES;
17685
18129
  exports.DEFAULT_MODEL_MARKER_TAG = DEFAULT_MODEL_MARKER_TAG;
@@ -17688,6 +18132,7 @@ exports.DEFAULT_PAGINATION_CONSTRAINT_NAMES = DEFAULT_PAGINATION_CONSTRAINT_NAME
17688
18132
  exports.DEFAULT_REGISTRY_FACTORY_CALL_NAME = DEFAULT_REGISTRY_FACTORY_CALL_NAME;
17689
18133
  exports.DEFAULT_STORAGE_FILE_UPLOAD_POLICY_TYPE_NAME = DEFAULT_STORAGE_FILE_UPLOAD_POLICY_TYPE_NAME;
17690
18134
  exports.DEFAULT_STORAGE_RULES_FILENAME = DEFAULT_STORAGE_RULES_FILENAME;
18135
+ exports.DEFAULT_USE_MODEL_METHOD_NAMES = DEFAULT_USE_MODEL_METHOD_NAMES;
17691
18136
  exports.FIREBASE_ESLINT_PLUGIN = FIREBASE_ESLINT_PLUGIN;
17692
18137
  exports.FIREBASE_MODEL_SERVICE_FACTORY_MODULE = FIREBASE_MODEL_SERVICE_FACTORY_MODULE;
17693
18138
  exports.FIREBASE_MODEL_SERVICE_FACTORY_NAME = FIREBASE_MODEL_SERVICE_FACTORY_NAME;
@@ -17696,6 +18141,7 @@ exports.FIREBASE_REQUIRE_API_CRUD_SPEC_FOR_GROUP_RULE = FIREBASE_REQUIRE_API_CRU
17696
18141
  exports.FIREBASE_REQUIRE_API_DETAILS_FOR_CRUD_FUNCTION_RULE = FIREBASE_REQUIRE_API_DETAILS_FOR_CRUD_FUNCTION_RULE;
17697
18142
  exports.FIREBASE_REQUIRE_CANONICAL_API_SPEC_FILENAME_RULE = FIREBASE_REQUIRE_CANONICAL_API_SPEC_FILENAME_RULE;
17698
18143
  exports.FIREBASE_REQUIRE_COMPLETE_CRUD_FUNCTION_CONFIG_MAP_RULE = FIREBASE_REQUIRE_COMPLETE_CRUD_FUNCTION_CONFIG_MAP_RULE;
18144
+ exports.FIREBASE_REQUIRE_DBX_MODEL_API_PARAMS_TAG_RULE = FIREBASE_REQUIRE_DBX_MODEL_API_PARAMS_TAG_RULE;
17699
18145
  exports.FIREBASE_REQUIRE_DBX_MODEL_COMPANION_TAGS_RULE = FIREBASE_REQUIRE_DBX_MODEL_COMPANION_TAGS_RULE;
17700
18146
  exports.FIREBASE_REQUIRE_DBX_MODEL_FIREBASE_INDEX_COMPANION_TAGS_RULE = FIREBASE_REQUIRE_DBX_MODEL_FIREBASE_INDEX_COMPANION_TAGS_RULE;
17701
18147
  exports.FIREBASE_REQUIRE_DBX_MODEL_FIREBASE_INDEX_QUERY_SUFFIX_RULE = FIREBASE_REQUIRE_DBX_MODEL_FIREBASE_INDEX_QUERY_SUFFIX_RULE;
@@ -17707,6 +18153,7 @@ exports.FIREBASE_REQUIRE_INPUT_TYPE_FOR_API_DETAILS_RULE = FIREBASE_REQUIRE_INPU
17707
18153
  exports.FIREBASE_REQUIRE_SERVICE_FACTORY_FOR_DBX_MODEL_RULE = FIREBASE_REQUIRE_SERVICE_FACTORY_FOR_DBX_MODEL_RULE;
17708
18154
  exports.FIREBASE_REQUIRE_STORAGEFILE_POLICY_MATCHES_RULES_RULE = FIREBASE_REQUIRE_STORAGEFILE_POLICY_MATCHES_RULES_RULE;
17709
18155
  exports.FIREBASE_REQUIRE_TAGGED_FIRESTORE_CONSTRAINTS_RULE = FIREBASE_REQUIRE_TAGGED_FIRESTORE_CONSTRAINTS_RULE;
18156
+ exports.FIREBASE_REQUIRE_USE_MODEL_ROLES_RULE = FIREBASE_REQUIRE_USE_MODEL_ROLES_RULE;
17710
18157
  exports.INPUT_TYPE_PROPERTY_NAME = INPUT_TYPE_PROPERTY_NAME;
17711
18158
  exports.MIRRORS_POLICY_KEY_MARKER_REGEX = MIRRORS_POLICY_KEY_MARKER_REGEX;
17712
18159
  exports.MODEL_FIREBASE_CRUD_FUNCTION_CONFIG_MAP_TYPE_NAME = MODEL_FIREBASE_CRUD_FUNCTION_CONFIG_MAP_TYPE_NAME;