@dereekb/util 13.11.17 → 13.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/eslint/index.cjs.js +250 -754
- package/eslint/index.esm.js +243 -754
- package/eslint/package.json +1 -1
- package/eslint/src/lib/dbx-tag-families.d.ts +1 -1
- package/eslint/src/lib/index.d.ts +3 -1
- package/eslint/src/lib/plugin.d.ts +0 -2
- package/eslint/src/lib/require-constant-naming.rule.d.ts +17 -0
- package/eslint/src/lib/require-dbx-action-companion-tags.rule.d.ts +1 -1
- package/eslint/src/lib/require-dbx-auth-companion-tags.rule.d.ts +1 -1
- package/eslint/src/lib/require-dbx-docs-ui-example-companion-tags.rule.d.ts +1 -1
- package/eslint/src/lib/require-dbx-filter-companion-tags.rule.d.ts +1 -1
- package/eslint/src/lib/require-dbx-form-field-companion-tags.rule.d.ts +1 -1
- package/eslint/src/lib/require-dbx-model-snapshot-field-companion-tags.rule.d.ts +1 -1
- package/eslint/src/lib/require-dbx-pipe-companion-tags.rule.d.ts +1 -1
- package/eslint/src/lib/require-dbx-util-companion-tags.rule.d.ts +1 -1
- package/eslint/src/lib/require-dbx-web-companion-tags.rule.d.ts +1 -1
- package/fetch/package.json +2 -2
- package/package.json +1 -1
- package/test/index.cjs.js +64 -0
- package/test/index.esm.js +64 -1
- package/test/package.json +2 -2
- package/test/src/lib/shared/shared.fail.d.ts +20 -0
- package/eslint/src/lib/require-dbx-model-companion-tags.rule.d.ts +0 -46
package/eslint/index.esm.js
CHANGED
|
@@ -268,21 +268,21 @@
|
|
|
268
268
|
return result;
|
|
269
269
|
}
|
|
270
270
|
|
|
271
|
-
function _array_like_to_array$
|
|
271
|
+
function _array_like_to_array$c(arr, len) {
|
|
272
272
|
if (len == null || len > arr.length) len = arr.length;
|
|
273
273
|
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
274
274
|
return arr2;
|
|
275
275
|
}
|
|
276
|
-
function _array_with_holes$
|
|
276
|
+
function _array_with_holes$a(arr) {
|
|
277
277
|
if (Array.isArray(arr)) return arr;
|
|
278
278
|
}
|
|
279
279
|
function _array_without_holes$4(arr) {
|
|
280
|
-
if (Array.isArray(arr)) return _array_like_to_array$
|
|
280
|
+
if (Array.isArray(arr)) return _array_like_to_array$c(arr);
|
|
281
281
|
}
|
|
282
282
|
function _iterable_to_array$4(iter) {
|
|
283
283
|
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
284
284
|
}
|
|
285
|
-
function _iterable_to_array_limit$
|
|
285
|
+
function _iterable_to_array_limit$a(arr, i) {
|
|
286
286
|
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
287
287
|
if (_i == null) return;
|
|
288
288
|
var _arr = [];
|
|
@@ -306,25 +306,25 @@ function _iterable_to_array_limit$b(arr, i) {
|
|
|
306
306
|
}
|
|
307
307
|
return _arr;
|
|
308
308
|
}
|
|
309
|
-
function _non_iterable_rest$
|
|
309
|
+
function _non_iterable_rest$a() {
|
|
310
310
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
311
311
|
}
|
|
312
312
|
function _non_iterable_spread$4() {
|
|
313
313
|
throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
314
314
|
}
|
|
315
|
-
function _sliced_to_array$
|
|
316
|
-
return _array_with_holes$
|
|
315
|
+
function _sliced_to_array$a(arr, i) {
|
|
316
|
+
return _array_with_holes$a(arr) || _iterable_to_array_limit$a(arr, i) || _unsupported_iterable_to_array$c(arr, i) || _non_iterable_rest$a();
|
|
317
317
|
}
|
|
318
318
|
function _to_consumable_array$4(arr) {
|
|
319
|
-
return _array_without_holes$4(arr) || _iterable_to_array$4(arr) || _unsupported_iterable_to_array$
|
|
319
|
+
return _array_without_holes$4(arr) || _iterable_to_array$4(arr) || _unsupported_iterable_to_array$c(arr) || _non_iterable_spread$4();
|
|
320
320
|
}
|
|
321
|
-
function _unsupported_iterable_to_array$
|
|
321
|
+
function _unsupported_iterable_to_array$c(o, minLen) {
|
|
322
322
|
if (!o) return;
|
|
323
|
-
if (typeof o === "string") return _array_like_to_array$
|
|
323
|
+
if (typeof o === "string") return _array_like_to_array$c(o, minLen);
|
|
324
324
|
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
325
325
|
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
326
326
|
if (n === "Map" || n === "Set") return Array.from(n);
|
|
327
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$
|
|
327
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$c(o, minLen);
|
|
328
328
|
}
|
|
329
329
|
/**
|
|
330
330
|
* The JSDoc tag identifying a function as a factory in the @dereekb conventions.
|
|
@@ -457,7 +457,7 @@ function pickMessageId(hasOverloads, jsdoc) {
|
|
|
457
457
|
], "// ".concat(NO_SIDE_EFFECTS_TAG, "\n").concat(indent));
|
|
458
458
|
}
|
|
459
459
|
function buildRedundantRemovalFix(fixer, redundant) {
|
|
460
|
-
var _redundant_range = _sliced_to_array$
|
|
460
|
+
var _redundant_range = _sliced_to_array$a(redundant.range, 2), start = _redundant_range[0], end = _redundant_range[1];
|
|
461
461
|
var removeEnd = end;
|
|
462
462
|
while(removeEnd < sourceText.length && (sourceText.charAt(removeEnd) === ' ' || sourceText.charAt(removeEnd) === '\t'))removeEnd += 1;
|
|
463
463
|
if (sourceText.charAt(removeEnd) === '\n') removeEnd += 1;
|
|
@@ -525,15 +525,15 @@ function pickMessageId(hasOverloads, jsdoc) {
|
|
|
525
525
|
}
|
|
526
526
|
};
|
|
527
527
|
|
|
528
|
-
function _array_like_to_array$
|
|
528
|
+
function _array_like_to_array$b(arr, len) {
|
|
529
529
|
if (len == null || len > arr.length) len = arr.length;
|
|
530
530
|
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
531
531
|
return arr2;
|
|
532
532
|
}
|
|
533
|
-
function _array_with_holes$
|
|
533
|
+
function _array_with_holes$9(arr) {
|
|
534
534
|
if (Array.isArray(arr)) return arr;
|
|
535
535
|
}
|
|
536
|
-
function _iterable_to_array_limit$
|
|
536
|
+
function _iterable_to_array_limit$9(arr, i) {
|
|
537
537
|
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
538
538
|
if (_i == null) return;
|
|
539
539
|
var _arr = [];
|
|
@@ -557,19 +557,19 @@ function _iterable_to_array_limit$a(arr, i) {
|
|
|
557
557
|
}
|
|
558
558
|
return _arr;
|
|
559
559
|
}
|
|
560
|
-
function _non_iterable_rest$
|
|
560
|
+
function _non_iterable_rest$9() {
|
|
561
561
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
562
562
|
}
|
|
563
|
-
function _sliced_to_array$
|
|
564
|
-
return _array_with_holes$
|
|
563
|
+
function _sliced_to_array$9(arr, i) {
|
|
564
|
+
return _array_with_holes$9(arr) || _iterable_to_array_limit$9(arr, i) || _unsupported_iterable_to_array$b(arr, i) || _non_iterable_rest$9();
|
|
565
565
|
}
|
|
566
|
-
function _unsupported_iterable_to_array$
|
|
566
|
+
function _unsupported_iterable_to_array$b(o, minLen) {
|
|
567
567
|
if (!o) return;
|
|
568
|
-
if (typeof o === "string") return _array_like_to_array$
|
|
568
|
+
if (typeof o === "string") return _array_like_to_array$b(o, minLen);
|
|
569
569
|
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
570
570
|
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
571
571
|
if (n === "Map" || n === "Set") return Array.from(n);
|
|
572
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$
|
|
572
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$b(o, minLen);
|
|
573
573
|
}
|
|
574
574
|
var UTIL_PREFER_NO_SIDE_EFFECTS_IN_JSDOC_RULE = {
|
|
575
575
|
meta: {
|
|
@@ -663,7 +663,7 @@ function _unsupported_iterable_to_array$c(o, minLen) {
|
|
|
663
663
|
// Remove the orphan line/block comment annotations.
|
|
664
664
|
for(var _iterator = orphanLineComments[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
|
|
665
665
|
var orphan = _step.value;
|
|
666
|
-
var _orphan_range = _sliced_to_array$
|
|
666
|
+
var _orphan_range = _sliced_to_array$9(orphan.range, 2), start = _orphan_range[0], end = _orphan_range[1];
|
|
667
667
|
var removeEnd = end;
|
|
668
668
|
while(removeEnd < sourceText.length && (sourceText.charAt(removeEnd) === ' ' || sourceText.charAt(removeEnd) === '\t')){
|
|
669
669
|
removeEnd += 1;
|
|
@@ -869,15 +869,15 @@ function _templateObject() {
|
|
|
869
869
|
}
|
|
870
870
|
};
|
|
871
871
|
|
|
872
|
-
function _array_like_to_array$
|
|
872
|
+
function _array_like_to_array$a(arr, len) {
|
|
873
873
|
if (len == null || len > arr.length) len = arr.length;
|
|
874
874
|
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
875
875
|
return arr2;
|
|
876
876
|
}
|
|
877
|
-
function _array_with_holes$
|
|
877
|
+
function _array_with_holes$8(arr) {
|
|
878
878
|
if (Array.isArray(arr)) return arr;
|
|
879
879
|
}
|
|
880
|
-
function _iterable_to_array_limit$
|
|
880
|
+
function _iterable_to_array_limit$8(arr, i) {
|
|
881
881
|
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
882
882
|
if (_i == null) return;
|
|
883
883
|
var _arr = [];
|
|
@@ -901,23 +901,23 @@ function _iterable_to_array_limit$9(arr, i) {
|
|
|
901
901
|
}
|
|
902
902
|
return _arr;
|
|
903
903
|
}
|
|
904
|
-
function _non_iterable_rest$
|
|
904
|
+
function _non_iterable_rest$8() {
|
|
905
905
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
906
906
|
}
|
|
907
|
-
function _sliced_to_array$
|
|
908
|
-
return _array_with_holes$
|
|
907
|
+
function _sliced_to_array$8(arr, i) {
|
|
908
|
+
return _array_with_holes$8(arr) || _iterable_to_array_limit$8(arr, i) || _unsupported_iterable_to_array$a(arr, i) || _non_iterable_rest$8();
|
|
909
909
|
}
|
|
910
910
|
function _type_of(obj) {
|
|
911
911
|
"@swc/helpers - typeof";
|
|
912
912
|
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
913
913
|
}
|
|
914
|
-
function _unsupported_iterable_to_array$
|
|
914
|
+
function _unsupported_iterable_to_array$a(o, minLen) {
|
|
915
915
|
if (!o) return;
|
|
916
|
-
if (typeof o === "string") return _array_like_to_array$
|
|
916
|
+
if (typeof o === "string") return _array_like_to_array$a(o, minLen);
|
|
917
917
|
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
918
918
|
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
919
919
|
if (n === "Map" || n === "Set") return Array.from(n);
|
|
920
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$
|
|
920
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$a(o, minLen);
|
|
921
921
|
}
|
|
922
922
|
/**
|
|
923
923
|
* AST node types whose bodies represent a *new* function scope and must be skipped during return-counting.
|
|
@@ -967,7 +967,7 @@ function collectFromGuardConsequent(consequent, out) {
|
|
|
967
967
|
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
968
968
|
try {
|
|
969
969
|
for(var _iterator = body.entries()[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
|
|
970
|
-
var _step_value = _sliced_to_array$
|
|
970
|
+
var _step_value = _sliced_to_array$8(_step.value, 2), i = _step_value[0], stmt = _step_value[1];
|
|
971
971
|
var isLastReturn = i === lastIndex && (stmt === null || stmt === void 0 ? void 0 : stmt.type) === 'ReturnStatement';
|
|
972
972
|
if (!isLastReturn) collectCountedReturns(stmt, out);
|
|
973
973
|
}
|
|
@@ -1114,13 +1114,13 @@ function walkChildren(node, out) {
|
|
|
1114
1114
|
}
|
|
1115
1115
|
};
|
|
1116
1116
|
|
|
1117
|
-
function _array_like_to_array$
|
|
1117
|
+
function _array_like_to_array$9(arr, len) {
|
|
1118
1118
|
if (len == null || len > arr.length) len = arr.length;
|
|
1119
1119
|
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
1120
1120
|
return arr2;
|
|
1121
1121
|
}
|
|
1122
1122
|
function _array_without_holes$3(arr) {
|
|
1123
|
-
if (Array.isArray(arr)) return _array_like_to_array$
|
|
1123
|
+
if (Array.isArray(arr)) return _array_like_to_array$9(arr);
|
|
1124
1124
|
}
|
|
1125
1125
|
function _iterable_to_array$3(iter) {
|
|
1126
1126
|
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
@@ -1129,15 +1129,15 @@ function _non_iterable_spread$3() {
|
|
|
1129
1129
|
throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
1130
1130
|
}
|
|
1131
1131
|
function _to_consumable_array$3(arr) {
|
|
1132
|
-
return _array_without_holes$3(arr) || _iterable_to_array$3(arr) || _unsupported_iterable_to_array$
|
|
1132
|
+
return _array_without_holes$3(arr) || _iterable_to_array$3(arr) || _unsupported_iterable_to_array$9(arr) || _non_iterable_spread$3();
|
|
1133
1133
|
}
|
|
1134
|
-
function _unsupported_iterable_to_array$
|
|
1134
|
+
function _unsupported_iterable_to_array$9(o, minLen) {
|
|
1135
1135
|
if (!o) return;
|
|
1136
|
-
if (typeof o === "string") return _array_like_to_array$
|
|
1136
|
+
if (typeof o === "string") return _array_like_to_array$9(o, minLen);
|
|
1137
1137
|
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
1138
1138
|
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
1139
1139
|
if (n === "Map" || n === "Set") return Array.from(n);
|
|
1140
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$
|
|
1140
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$9(o, minLen);
|
|
1141
1141
|
}
|
|
1142
1142
|
/**
|
|
1143
1143
|
* Default name suffixes that mark an interface as config-shaped (its properties should be readonly).
|
|
@@ -1858,13 +1858,13 @@ function statementBringsMaybeIntoScope(stmt) {
|
|
|
1858
1858
|
}
|
|
1859
1859
|
};
|
|
1860
1860
|
|
|
1861
|
-
function _array_like_to_array$
|
|
1861
|
+
function _array_like_to_array$8(arr, len) {
|
|
1862
1862
|
if (len == null || len > arr.length) len = arr.length;
|
|
1863
1863
|
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
1864
1864
|
return arr2;
|
|
1865
1865
|
}
|
|
1866
1866
|
function _array_without_holes$2(arr) {
|
|
1867
|
-
if (Array.isArray(arr)) return _array_like_to_array$
|
|
1867
|
+
if (Array.isArray(arr)) return _array_like_to_array$8(arr);
|
|
1868
1868
|
}
|
|
1869
1869
|
function _iterable_to_array$2(iter) {
|
|
1870
1870
|
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
@@ -1873,15 +1873,15 @@ function _non_iterable_spread$2() {
|
|
|
1873
1873
|
throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
1874
1874
|
}
|
|
1875
1875
|
function _to_consumable_array$2(arr) {
|
|
1876
|
-
return _array_without_holes$2(arr) || _iterable_to_array$2(arr) || _unsupported_iterable_to_array$
|
|
1876
|
+
return _array_without_holes$2(arr) || _iterable_to_array$2(arr) || _unsupported_iterable_to_array$8(arr) || _non_iterable_spread$2();
|
|
1877
1877
|
}
|
|
1878
|
-
function _unsupported_iterable_to_array$
|
|
1878
|
+
function _unsupported_iterable_to_array$8(o, minLen) {
|
|
1879
1879
|
if (!o) return;
|
|
1880
|
-
if (typeof o === "string") return _array_like_to_array$
|
|
1880
|
+
if (typeof o === "string") return _array_like_to_array$8(o, minLen);
|
|
1881
1881
|
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
1882
1882
|
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
1883
1883
|
if (n === "Map" || n === "Set") return Array.from(n);
|
|
1884
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$
|
|
1884
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$8(o, minLen);
|
|
1885
1885
|
}
|
|
1886
1886
|
/**
|
|
1887
1887
|
* The required marker line comment that opens the deprecated-aliases section at the bottom of a file.
|
|
@@ -2412,15 +2412,15 @@ function _unsupported_iterable_to_array$9(o, minLen) {
|
|
|
2412
2412
|
}
|
|
2413
2413
|
};
|
|
2414
2414
|
|
|
2415
|
-
function _array_like_to_array$
|
|
2415
|
+
function _array_like_to_array$7(arr, len) {
|
|
2416
2416
|
if (len == null || len > arr.length) len = arr.length;
|
|
2417
2417
|
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
2418
2418
|
return arr2;
|
|
2419
2419
|
}
|
|
2420
|
-
function _array_with_holes$
|
|
2420
|
+
function _array_with_holes$7(arr) {
|
|
2421
2421
|
if (Array.isArray(arr)) return arr;
|
|
2422
2422
|
}
|
|
2423
|
-
function _iterable_to_array_limit$
|
|
2423
|
+
function _iterable_to_array_limit$7(arr, i) {
|
|
2424
2424
|
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
2425
2425
|
if (_i == null) return;
|
|
2426
2426
|
var _arr = [];
|
|
@@ -2444,19 +2444,19 @@ function _iterable_to_array_limit$8(arr, i) {
|
|
|
2444
2444
|
}
|
|
2445
2445
|
return _arr;
|
|
2446
2446
|
}
|
|
2447
|
-
function _non_iterable_rest$
|
|
2447
|
+
function _non_iterable_rest$7() {
|
|
2448
2448
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
2449
2449
|
}
|
|
2450
|
-
function _sliced_to_array$
|
|
2451
|
-
return _array_with_holes$
|
|
2450
|
+
function _sliced_to_array$7(arr, i) {
|
|
2451
|
+
return _array_with_holes$7(arr) || _iterable_to_array_limit$7(arr, i) || _unsupported_iterable_to_array$7(arr, i) || _non_iterable_rest$7();
|
|
2452
2452
|
}
|
|
2453
|
-
function _unsupported_iterable_to_array$
|
|
2453
|
+
function _unsupported_iterable_to_array$7(o, minLen) {
|
|
2454
2454
|
if (!o) return;
|
|
2455
|
-
if (typeof o === "string") return _array_like_to_array$
|
|
2455
|
+
if (typeof o === "string") return _array_like_to_array$7(o, minLen);
|
|
2456
2456
|
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
2457
2457
|
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
2458
2458
|
if (n === "Map" || n === "Set") return Array.from(n);
|
|
2459
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$
|
|
2459
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$7(o, minLen);
|
|
2460
2460
|
}
|
|
2461
2461
|
var TAG_LINE_REGEX$1 = /^@([A-Za-z_]\w*)\s*(.*)$/;
|
|
2462
2462
|
var TYPE_ANNOTATION_REGEX = /^\{([^}]*)\}\s*(.*)$/;
|
|
@@ -2521,7 +2521,7 @@ var LINE_PREFIX_REGEX = /^(\s*\*?\s?)(.*)$/;
|
|
|
2521
2521
|
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
2522
2522
|
try {
|
|
2523
2523
|
for(var _iterator = lines.entries()[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
|
|
2524
|
-
var _step_value = _sliced_to_array$
|
|
2524
|
+
var _step_value = _sliced_to_array$7(_step.value, 2), i = _step_value[0], line = _step_value[1];
|
|
2525
2525
|
if (TAG_LINE_REGEX$1.test(line.text)) {
|
|
2526
2526
|
firstTagIndex = i;
|
|
2527
2527
|
break;
|
|
@@ -2757,21 +2757,21 @@ var LINE_PREFIX_REGEX = /^(\s*\*?\s?)(.*)$/;
|
|
|
2757
2757
|
};
|
|
2758
2758
|
}
|
|
2759
2759
|
|
|
2760
|
-
function _array_like_to_array$
|
|
2760
|
+
function _array_like_to_array$6(arr, len) {
|
|
2761
2761
|
if (len == null || len > arr.length) len = arr.length;
|
|
2762
2762
|
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
2763
2763
|
return arr2;
|
|
2764
2764
|
}
|
|
2765
|
-
function _array_with_holes$
|
|
2765
|
+
function _array_with_holes$6(arr) {
|
|
2766
2766
|
if (Array.isArray(arr)) return arr;
|
|
2767
2767
|
}
|
|
2768
2768
|
function _array_without_holes$1(arr) {
|
|
2769
|
-
if (Array.isArray(arr)) return _array_like_to_array$
|
|
2769
|
+
if (Array.isArray(arr)) return _array_like_to_array$6(arr);
|
|
2770
2770
|
}
|
|
2771
2771
|
function _iterable_to_array$1(iter) {
|
|
2772
2772
|
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
2773
2773
|
}
|
|
2774
|
-
function _iterable_to_array_limit$
|
|
2774
|
+
function _iterable_to_array_limit$6(arr, i) {
|
|
2775
2775
|
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
2776
2776
|
if (_i == null) return;
|
|
2777
2777
|
var _arr = [];
|
|
@@ -2795,25 +2795,25 @@ function _iterable_to_array_limit$7(arr, i) {
|
|
|
2795
2795
|
}
|
|
2796
2796
|
return _arr;
|
|
2797
2797
|
}
|
|
2798
|
-
function _non_iterable_rest$
|
|
2798
|
+
function _non_iterable_rest$6() {
|
|
2799
2799
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
2800
2800
|
}
|
|
2801
2801
|
function _non_iterable_spread$1() {
|
|
2802
2802
|
throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
2803
2803
|
}
|
|
2804
|
-
function _sliced_to_array$
|
|
2805
|
-
return _array_with_holes$
|
|
2804
|
+
function _sliced_to_array$6(arr, i) {
|
|
2805
|
+
return _array_with_holes$6(arr) || _iterable_to_array_limit$6(arr, i) || _unsupported_iterable_to_array$6(arr, i) || _non_iterable_rest$6();
|
|
2806
2806
|
}
|
|
2807
2807
|
function _to_consumable_array$1(arr) {
|
|
2808
|
-
return _array_without_holes$1(arr) || _iterable_to_array$1(arr) || _unsupported_iterable_to_array$
|
|
2808
|
+
return _array_without_holes$1(arr) || _iterable_to_array$1(arr) || _unsupported_iterable_to_array$6(arr) || _non_iterable_spread$1();
|
|
2809
2809
|
}
|
|
2810
|
-
function _unsupported_iterable_to_array$
|
|
2810
|
+
function _unsupported_iterable_to_array$6(o, minLen) {
|
|
2811
2811
|
if (!o) return;
|
|
2812
|
-
if (typeof o === "string") return _array_like_to_array$
|
|
2812
|
+
if (typeof o === "string") return _array_like_to_array$6(o, minLen);
|
|
2813
2813
|
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
2814
2814
|
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
2815
2815
|
if (n === "Map" || n === "Set") return Array.from(n);
|
|
2816
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$
|
|
2816
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$6(o, minLen);
|
|
2817
2817
|
}
|
|
2818
2818
|
var TAG_LINE_REGEX = /^@([A-Za-z_]\w*)\s*(.*)$/;
|
|
2819
2819
|
var DEFAULT_WORKSPACE_TAG_PREFIXES = [
|
|
@@ -3185,7 +3185,7 @@ var TYPE_RESTATING_PATTERNS = [
|
|
|
3185
3185
|
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
3186
3186
|
try {
|
|
3187
3187
|
for(var _iterator = sections.entries()[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
|
|
3188
|
-
var _step_value = _sliced_to_array$
|
|
3188
|
+
var _step_value = _sliced_to_array$6(_step.value, 2), i = _step_value[0], section = _step_value[1];
|
|
3189
3189
|
var _allLines;
|
|
3190
3190
|
if (i > 0) allLines.push('');
|
|
3191
3191
|
(_allLines = allLines).push.apply(_allLines, _to_consumable_array$1(section));
|
|
@@ -3485,7 +3485,7 @@ var LOWER_LETTER_PATTERN = /[a-z]/;
|
|
|
3485
3485
|
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
3486
3486
|
try {
|
|
3487
3487
|
for(var _iterator = indexed.entries()[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
|
|
3488
|
-
var _step_value = _sliced_to_array$
|
|
3488
|
+
var _step_value = _sliced_to_array$6(_step.value, 2), i = _step_value[0], element = _step_value[1];
|
|
3489
3489
|
if (element.tag.tag === 'param') {
|
|
3490
3490
|
paramSlots.push(i);
|
|
3491
3491
|
paramEntries.push(element);
|
|
@@ -3515,7 +3515,7 @@ var LOWER_LETTER_PATTERN = /[a-z]/;
|
|
|
3515
3515
|
var _iteratorNormalCompletion1 = true, _didIteratorError1 = false, _iteratorError1 = undefined;
|
|
3516
3516
|
try {
|
|
3517
3517
|
for(var _iterator1 = paramSlots.entries()[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true){
|
|
3518
|
-
var _step_value1 = _sliced_to_array$
|
|
3518
|
+
var _step_value1 = _sliced_to_array$6(_step1.value, 2), i1 = _step_value1[0], paramSlot = _step_value1[1];
|
|
3519
3519
|
indexed[paramSlot] = paramEntries[i1];
|
|
3520
3520
|
}
|
|
3521
3521
|
} catch (err) {
|
|
@@ -4305,15 +4305,15 @@ var LOWER_LETTER_PATTERN = /[a-z]/;
|
|
|
4305
4305
|
return name;
|
|
4306
4306
|
}
|
|
4307
4307
|
|
|
4308
|
-
function _array_like_to_array$
|
|
4308
|
+
function _array_like_to_array$5(arr, len) {
|
|
4309
4309
|
if (len == null || len > arr.length) len = arr.length;
|
|
4310
4310
|
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
4311
4311
|
return arr2;
|
|
4312
4312
|
}
|
|
4313
|
-
function _array_with_holes$
|
|
4313
|
+
function _array_with_holes$5(arr) {
|
|
4314
4314
|
if (Array.isArray(arr)) return arr;
|
|
4315
4315
|
}
|
|
4316
|
-
function _iterable_to_array_limit$
|
|
4316
|
+
function _iterable_to_array_limit$5(arr, i) {
|
|
4317
4317
|
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
4318
4318
|
if (_i == null) return;
|
|
4319
4319
|
var _arr = [];
|
|
@@ -4337,23 +4337,23 @@ function _iterable_to_array_limit$6(arr, i) {
|
|
|
4337
4337
|
}
|
|
4338
4338
|
return _arr;
|
|
4339
4339
|
}
|
|
4340
|
-
function _non_iterable_rest$
|
|
4340
|
+
function _non_iterable_rest$5() {
|
|
4341
4341
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
4342
4342
|
}
|
|
4343
|
-
function _sliced_to_array$
|
|
4344
|
-
return _array_with_holes$
|
|
4343
|
+
function _sliced_to_array$5(arr, i) {
|
|
4344
|
+
return _array_with_holes$5(arr) || _iterable_to_array_limit$5(arr, i) || _unsupported_iterable_to_array$5(arr, i) || _non_iterable_rest$5();
|
|
4345
4345
|
}
|
|
4346
|
-
function _unsupported_iterable_to_array$
|
|
4346
|
+
function _unsupported_iterable_to_array$5(o, minLen) {
|
|
4347
4347
|
if (!o) return;
|
|
4348
|
-
if (typeof o === "string") return _array_like_to_array$
|
|
4348
|
+
if (typeof o === "string") return _array_like_to_array$5(o, minLen);
|
|
4349
4349
|
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
4350
4350
|
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
4351
4351
|
if (n === "Map" || n === "Set") return Array.from(n);
|
|
4352
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$
|
|
4352
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$5(o, minLen);
|
|
4353
4353
|
}
|
|
4354
4354
|
/**
|
|
4355
4355
|
* Shared helpers for the `@dbx<Family>` companion-tag ESLint rules. Mirrors the
|
|
4356
|
-
* scanner schemas in `packages/dbx-
|
|
4356
|
+
* scanner schemas in `packages/dbx-cli/src/lib/mcp-scan/scan/*-extract.ts` so
|
|
4357
4357
|
* violations surface at lint time instead of at manifest-regeneration time.
|
|
4358
4358
|
*
|
|
4359
4359
|
* Each per-family rule supplies a {@link DbxTagFamilySpec} describing which
|
|
@@ -4632,7 +4632,7 @@ function emitUnknownCompanions(groups, knownSuffixes, emit) {
|
|
|
4632
4632
|
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
4633
4633
|
try {
|
|
4634
4634
|
for(var _iterator = groups.entries()[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
|
|
4635
|
-
var _step_value = _sliced_to_array$
|
|
4635
|
+
var _step_value = _sliced_to_array$5(_step.value, 2), suffix = _step_value[0], instances = _step_value[1];
|
|
4636
4636
|
if (knownSuffixes.has(suffix)) continue;
|
|
4637
4637
|
var _iteratorNormalCompletion1 = true, _didIteratorError1 = false, _iteratorError1 = undefined;
|
|
4638
4638
|
try {
|
|
@@ -5010,7 +5010,7 @@ function reportUtilAllowedCategory(ctx, familyTags, allowedCategories) {
|
|
|
5010
5010
|
];
|
|
5011
5011
|
/**
|
|
5012
5012
|
* Allowed values for `@dbxUtilKind`. Mirrors the enum in
|
|
5013
|
-
* `packages/dbx-
|
|
5013
|
+
* `packages/dbx-cli/src/lib/mcp-scan/scan/utils-extract.ts`.
|
|
5014
5014
|
*/ var DEFAULT_ALLOWED_KINDS$2 = [
|
|
5015
5015
|
'function',
|
|
5016
5016
|
'class',
|
|
@@ -5020,7 +5020,7 @@ function reportUtilAllowedCategory(ctx, familyTags, allowedCategories) {
|
|
|
5020
5020
|
/**
|
|
5021
5021
|
* ESLint rule enforcing that exports tagged `@dbxUtil` carry the registry-required companion tags
|
|
5022
5022
|
* with valid value formats. Mirrors the scanner schema at
|
|
5023
|
-
* `packages/dbx-
|
|
5023
|
+
* `packages/dbx-cli/src/lib/mcp-scan/scan/utils-extract.ts` so violations surface at lint time
|
|
5024
5024
|
* instead of at manifest-regeneration time.
|
|
5025
5025
|
*
|
|
5026
5026
|
* Checks:
|
|
@@ -5201,7 +5201,7 @@ var DEFAULT_KNOWN_COMPANIONS$8 = [
|
|
|
5201
5201
|
];
|
|
5202
5202
|
/**
|
|
5203
5203
|
* ESLint rule enforcing `@dbxPipe` companion tags. Mirrors the scanner schema
|
|
5204
|
-
* at `packages/dbx-
|
|
5204
|
+
* at `packages/dbx-cli/src/lib/mcp-scan/scan/pipes-extract.ts` so violations
|
|
5205
5205
|
* surface at lint time instead of at manifest-regeneration time.
|
|
5206
5206
|
*/ var UTIL_REQUIRE_DBX_PIPE_COMPANION_TAGS_RULE = {
|
|
5207
5207
|
meta: {
|
|
@@ -5429,7 +5429,7 @@ var DEFAULT_KNOWN_COMPANIONS$7 = [
|
|
|
5429
5429
|
];
|
|
5430
5430
|
/**
|
|
5431
5431
|
* ESLint rule enforcing `@dbxFilter` companion tags. Mirrors the scanner
|
|
5432
|
-
* schema at `packages/dbx-
|
|
5432
|
+
* schema at `packages/dbx-cli/src/lib/mcp-scan/scan/filters-extract.ts`.
|
|
5433
5433
|
* Applies to classes (filter directives) and exported interfaces (filter
|
|
5434
5434
|
* patterns); the scanner reads both as filter entries.
|
|
5435
5435
|
*/ var UTIL_REQUIRE_DBX_FILTER_COMPANION_TAGS_RULE = {
|
|
@@ -5635,7 +5635,7 @@ var DEFAULT_KNOWN_COMPANIONS$6 = [
|
|
|
5635
5635
|
];
|
|
5636
5636
|
/**
|
|
5637
5637
|
* ESLint rule enforcing `@dbxWebComponent` companion tags. Mirrors the scanner
|
|
5638
|
-
* schema at `packages/dbx-
|
|
5638
|
+
* schema at `packages/dbx-cli/src/lib/mcp-scan/scan/ui-components-extract.ts`.
|
|
5639
5639
|
*/ var UTIL_REQUIRE_DBX_WEB_COMPANION_TAGS_RULE = {
|
|
5640
5640
|
meta: {
|
|
5641
5641
|
type: 'suggestion',
|
|
@@ -5923,7 +5923,7 @@ var DEFAULT_KNOWN_COMPANIONS$5 = [
|
|
|
5923
5923
|
];
|
|
5924
5924
|
/**
|
|
5925
5925
|
* ESLint rule enforcing `@dbxDocsUiExample` companion tags. Mirrors the
|
|
5926
|
-
* scanner schema at `packages/dbx-
|
|
5926
|
+
* scanner schema at `packages/dbx-cli/src/lib/mcp-scan/scan/dbx-docs-ui-examples-extract.ts`.
|
|
5927
5927
|
*/ var UTIL_REQUIRE_DBX_DOCS_UI_EXAMPLE_COMPANION_TAGS_RULE = {
|
|
5928
5928
|
meta: {
|
|
5929
5929
|
type: 'suggestion',
|
|
@@ -6175,7 +6175,7 @@ var DEFAULT_KNOWN_COMPANIONS$4 = [
|
|
|
6175
6175
|
];
|
|
6176
6176
|
/**
|
|
6177
6177
|
* ESLint rule enforcing `@dbxModelSnapshotField` companion tags. Mirrors the
|
|
6178
|
-
* scanner schema at `packages/dbx-
|
|
6178
|
+
* scanner schema at `packages/dbx-cli/src/lib/mcp-scan/scan/model-snapshot-fields-extract.ts`.
|
|
6179
6179
|
*/ var UTIL_REQUIRE_DBX_MODEL_SNAPSHOT_FIELD_COMPANION_TAGS_RULE = {
|
|
6180
6180
|
meta: {
|
|
6181
6181
|
type: 'suggestion',
|
|
@@ -6427,21 +6427,21 @@ var DEFAULT_KNOWN_COMPANIONS$4 = [
|
|
|
6427
6427
|
}
|
|
6428
6428
|
};
|
|
6429
6429
|
|
|
6430
|
-
function _array_like_to_array$
|
|
6430
|
+
function _array_like_to_array$4(arr, len) {
|
|
6431
6431
|
if (len == null || len > arr.length) len = arr.length;
|
|
6432
6432
|
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
6433
6433
|
return arr2;
|
|
6434
6434
|
}
|
|
6435
|
-
function _array_with_holes$
|
|
6435
|
+
function _array_with_holes$4(arr) {
|
|
6436
6436
|
if (Array.isArray(arr)) return arr;
|
|
6437
6437
|
}
|
|
6438
6438
|
function _array_without_holes(arr) {
|
|
6439
|
-
if (Array.isArray(arr)) return _array_like_to_array$
|
|
6439
|
+
if (Array.isArray(arr)) return _array_like_to_array$4(arr);
|
|
6440
6440
|
}
|
|
6441
6441
|
function _iterable_to_array(iter) {
|
|
6442
6442
|
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
6443
6443
|
}
|
|
6444
|
-
function _iterable_to_array_limit$
|
|
6444
|
+
function _iterable_to_array_limit$4(arr, i) {
|
|
6445
6445
|
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
6446
6446
|
if (_i == null) return;
|
|
6447
6447
|
var _arr = [];
|
|
@@ -6465,25 +6465,25 @@ function _iterable_to_array_limit$5(arr, i) {
|
|
|
6465
6465
|
}
|
|
6466
6466
|
return _arr;
|
|
6467
6467
|
}
|
|
6468
|
-
function _non_iterable_rest$
|
|
6468
|
+
function _non_iterable_rest$4() {
|
|
6469
6469
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
6470
6470
|
}
|
|
6471
6471
|
function _non_iterable_spread() {
|
|
6472
6472
|
throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
6473
6473
|
}
|
|
6474
|
-
function _sliced_to_array$
|
|
6475
|
-
return _array_with_holes$
|
|
6474
|
+
function _sliced_to_array$4(arr, i) {
|
|
6475
|
+
return _array_with_holes$4(arr) || _iterable_to_array_limit$4(arr, i) || _unsupported_iterable_to_array$4(arr, i) || _non_iterable_rest$4();
|
|
6476
6476
|
}
|
|
6477
6477
|
function _to_consumable_array(arr) {
|
|
6478
|
-
return _array_without_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array$
|
|
6478
|
+
return _array_without_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array$4(arr) || _non_iterable_spread();
|
|
6479
6479
|
}
|
|
6480
|
-
function _unsupported_iterable_to_array$
|
|
6480
|
+
function _unsupported_iterable_to_array$4(o, minLen) {
|
|
6481
6481
|
if (!o) return;
|
|
6482
|
-
if (typeof o === "string") return _array_like_to_array$
|
|
6482
|
+
if (typeof o === "string") return _array_like_to_array$4(o, minLen);
|
|
6483
6483
|
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
6484
6484
|
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
6485
6485
|
if (n === "Map" || n === "Set") return Array.from(n);
|
|
6486
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$
|
|
6486
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$4(o, minLen);
|
|
6487
6487
|
}
|
|
6488
6488
|
var DEFAULT_ALLOWED_ROLES = [
|
|
6489
6489
|
'directive',
|
|
@@ -6518,7 +6518,7 @@ function reportClassUnknownAndMisplaced(ctx, companions, knownCompanions) {
|
|
|
6518
6518
|
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
6519
6519
|
try {
|
|
6520
6520
|
for(var _iterator = companions.entries()[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
|
|
6521
|
-
var _step_value = _sliced_to_array$
|
|
6521
|
+
var _step_value = _sliced_to_array$4(_step.value, 2), suffix = _step_value[0], instances = _step_value[1];
|
|
6522
6522
|
if (!knownCompanions.includes(suffix)) {
|
|
6523
6523
|
var _iteratorNormalCompletion1 = true, _didIteratorError1 = false, _iteratorError1 = undefined;
|
|
6524
6524
|
try {
|
|
@@ -6604,7 +6604,7 @@ function reportClassDuplicates(ctx, companions) {
|
|
|
6604
6604
|
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
6605
6605
|
try {
|
|
6606
6606
|
for(var _iterator = companions.entries()[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
|
|
6607
|
-
var _step_value = _sliced_to_array$
|
|
6607
|
+
var _step_value = _sliced_to_array$4(_step.value, 2), suffix = _step_value[0], instances = _step_value[1];
|
|
6608
6608
|
if (instances.length <= 1) continue;
|
|
6609
6609
|
for(var i = 1; i < instances.length; i += 1){
|
|
6610
6610
|
reportOnJsdocLine({
|
|
@@ -6857,7 +6857,7 @@ function reportClassSkillRefs(ctx, skillRefsTags) {
|
|
|
6857
6857
|
}
|
|
6858
6858
|
/**
|
|
6859
6859
|
* ESLint rule enforcing `@dbxAction` companion tags. Mirrors the scanner
|
|
6860
|
-
* schema at `packages/dbx-
|
|
6860
|
+
* schema at `packages/dbx-cli/src/lib/mcp-scan/scan/actions-extract.ts`. Class
|
|
6861
6861
|
* declarations carry the `@dbxAction` marker; enum declarations carry the
|
|
6862
6862
|
* `@dbxActionStateEnum` marker, and `@dbxActionStateTransitionsFrom/To` are
|
|
6863
6863
|
* valid on enum-member JSDocs.
|
|
@@ -7012,15 +7012,15 @@ function reportClassSkillRefs(ctx, skillRefsTags) {
|
|
|
7012
7012
|
}
|
|
7013
7013
|
};
|
|
7014
7014
|
|
|
7015
|
-
function _array_like_to_array$
|
|
7015
|
+
function _array_like_to_array$3(arr, len) {
|
|
7016
7016
|
if (len == null || len > arr.length) len = arr.length;
|
|
7017
7017
|
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
7018
7018
|
return arr2;
|
|
7019
7019
|
}
|
|
7020
|
-
function _array_with_holes$
|
|
7020
|
+
function _array_with_holes$3(arr) {
|
|
7021
7021
|
if (Array.isArray(arr)) return arr;
|
|
7022
7022
|
}
|
|
7023
|
-
function _iterable_to_array_limit$
|
|
7023
|
+
function _iterable_to_array_limit$3(arr, i) {
|
|
7024
7024
|
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
7025
7025
|
if (_i == null) return;
|
|
7026
7026
|
var _arr = [];
|
|
@@ -7044,19 +7044,19 @@ function _iterable_to_array_limit$4(arr, i) {
|
|
|
7044
7044
|
}
|
|
7045
7045
|
return _arr;
|
|
7046
7046
|
}
|
|
7047
|
-
function _non_iterable_rest$
|
|
7047
|
+
function _non_iterable_rest$3() {
|
|
7048
7048
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
7049
7049
|
}
|
|
7050
|
-
function _sliced_to_array$
|
|
7051
|
-
return _array_with_holes$
|
|
7050
|
+
function _sliced_to_array$3(arr, i) {
|
|
7051
|
+
return _array_with_holes$3(arr) || _iterable_to_array_limit$3(arr, i) || _unsupported_iterable_to_array$3(arr, i) || _non_iterable_rest$3();
|
|
7052
7052
|
}
|
|
7053
|
-
function _unsupported_iterable_to_array$
|
|
7053
|
+
function _unsupported_iterable_to_array$3(o, minLen) {
|
|
7054
7054
|
if (!o) return;
|
|
7055
|
-
if (typeof o === "string") return _array_like_to_array$
|
|
7055
|
+
if (typeof o === "string") return _array_like_to_array$3(o, minLen);
|
|
7056
7056
|
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
7057
7057
|
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
7058
7058
|
if (n === "Map" || n === "Set") return Array.from(n);
|
|
7059
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$
|
|
7059
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$3(o, minLen);
|
|
7060
7060
|
}
|
|
7061
7061
|
var FORM_MARKERS = new Set([
|
|
7062
7062
|
'dbxFormField',
|
|
@@ -7203,7 +7203,7 @@ function reportFormUnknownCompanions(ctx, companions, knownCompanions) {
|
|
|
7203
7203
|
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
7204
7204
|
try {
|
|
7205
7205
|
for(var _iterator = companions.entries()[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
|
|
7206
|
-
var _step_value = _sliced_to_array$
|
|
7206
|
+
var _step_value = _sliced_to_array$3(_step.value, 2), suffix = _step_value[0], instances = _step_value[1];
|
|
7207
7207
|
if (knownCompanions.includes(suffix)) continue;
|
|
7208
7208
|
var _iteratorNormalCompletion1 = true, _didIteratorError1 = false, _iteratorError1 = undefined;
|
|
7209
7209
|
try {
|
|
@@ -7256,7 +7256,7 @@ function reportFormDuplicateCompanions(ctx, companions) {
|
|
|
7256
7256
|
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
7257
7257
|
try {
|
|
7258
7258
|
for(var _iterator = companions.entries()[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
|
|
7259
|
-
var _step_value = _sliced_to_array$
|
|
7259
|
+
var _step_value = _sliced_to_array$3(_step.value, 2), suffix = _step_value[0], instances = _step_value[1];
|
|
7260
7260
|
if (instances.length <= 1) continue;
|
|
7261
7261
|
for(var i = 1; i < instances.length; i += 1){
|
|
7262
7262
|
reportOnJsdocLine({
|
|
@@ -7597,7 +7597,7 @@ function reportFormComposesFromKebab(ctx, composesFromTags, markers) {
|
|
|
7597
7597
|
}
|
|
7598
7598
|
/**
|
|
7599
7599
|
* ESLint rule enforcing `@dbxFormField` companion tags. Mirrors the scanner
|
|
7600
|
-
* schema at `packages/dbx-
|
|
7600
|
+
* schema at `packages/dbx-cli/src/lib/mcp-scan/scan/forge-fields-extract.ts`,
|
|
7601
7601
|
* including the tier-conditional required-tag matrix.
|
|
7602
7602
|
*/ var UTIL_REQUIRE_DBX_FORM_FIELD_COMPANION_TAGS_RULE = {
|
|
7603
7603
|
meta: {
|
|
@@ -7754,15 +7754,15 @@ function reportFormComposesFromKebab(ctx, composesFromTags, markers) {
|
|
|
7754
7754
|
}
|
|
7755
7755
|
};
|
|
7756
7756
|
|
|
7757
|
-
function _array_like_to_array$
|
|
7757
|
+
function _array_like_to_array$2(arr, len) {
|
|
7758
7758
|
if (len == null || len > arr.length) len = arr.length;
|
|
7759
7759
|
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
7760
7760
|
return arr2;
|
|
7761
7761
|
}
|
|
7762
|
-
function _array_with_holes$
|
|
7762
|
+
function _array_with_holes$2(arr) {
|
|
7763
7763
|
if (Array.isArray(arr)) return arr;
|
|
7764
7764
|
}
|
|
7765
|
-
function _iterable_to_array_limit$
|
|
7765
|
+
function _iterable_to_array_limit$2(arr, i) {
|
|
7766
7766
|
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
7767
7767
|
if (_i == null) return;
|
|
7768
7768
|
var _arr = [];
|
|
@@ -7786,651 +7786,66 @@ function _iterable_to_array_limit$3(arr, i) {
|
|
|
7786
7786
|
}
|
|
7787
7787
|
return _arr;
|
|
7788
7788
|
}
|
|
7789
|
-
function _non_iterable_rest$
|
|
7789
|
+
function _non_iterable_rest$2() {
|
|
7790
7790
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
7791
7791
|
}
|
|
7792
|
-
function _sliced_to_array$
|
|
7793
|
-
return _array_with_holes$
|
|
7792
|
+
function _sliced_to_array$2(arr, i) {
|
|
7793
|
+
return _array_with_holes$2(arr) || _iterable_to_array_limit$2(arr, i) || _unsupported_iterable_to_array$2(arr, i) || _non_iterable_rest$2();
|
|
7794
7794
|
}
|
|
7795
|
-
function _unsupported_iterable_to_array$
|
|
7795
|
+
function _unsupported_iterable_to_array$2(o, minLen) {
|
|
7796
7796
|
if (!o) return;
|
|
7797
|
-
if (typeof o === "string") return _array_like_to_array$
|
|
7797
|
+
if (typeof o === "string") return _array_like_to_array$2(o, minLen);
|
|
7798
7798
|
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
7799
7799
|
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
7800
7800
|
if (n === "Map" || n === "Set") return Array.from(n);
|
|
7801
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$
|
|
7801
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$2(o, minLen);
|
|
7802
7802
|
}
|
|
7803
|
-
var
|
|
7804
|
-
'
|
|
7805
|
-
'
|
|
7806
|
-
'
|
|
7807
|
-
'
|
|
7808
|
-
|
|
7809
|
-
var EXCLUSIVE_MODEL_MARKERS = new Set([
|
|
7810
|
-
'dbxModel',
|
|
7811
|
-
'dbxModelSubObject',
|
|
7812
|
-
'dbxModelOrganizationalGroupRoot'
|
|
7813
|
-
]);
|
|
7814
|
-
var MODEL_COMPANIONS = [
|
|
7815
|
-
'Archetype',
|
|
7816
|
-
'AggregatesFrom',
|
|
7817
|
-
'CompositeKey'
|
|
7818
|
-
];
|
|
7819
|
-
var PROPERTY_COMPANIONS = [
|
|
7820
|
-
'Variable',
|
|
7821
|
-
'VariableSyncFlag'
|
|
7822
|
-
];
|
|
7823
|
-
var DEFAULT_ALLOWED_ENCODINGS = [
|
|
7824
|
-
'two-way',
|
|
7825
|
-
'one-way'
|
|
7803
|
+
var DEFAULT_KNOWN_COMPANIONS$1 = [
|
|
7804
|
+
'ClaimsApp',
|
|
7805
|
+
'Claim',
|
|
7806
|
+
'ClaimsService',
|
|
7807
|
+
'Role',
|
|
7808
|
+
'RoleTag'
|
|
7826
7809
|
];
|
|
7827
|
-
|
|
7828
|
-
|
|
7829
|
-
|
|
7830
|
-
|
|
7831
|
-
|
|
7832
|
-
|
|
7833
|
-
|
|
7834
|
-
|
|
7835
|
-
|
|
7836
|
-
|
|
7837
|
-
|
|
7838
|
-
|
|
7839
|
-
|
|
7840
|
-
|
|
7841
|
-
|
|
7842
|
-
|
|
7843
|
-
|
|
7844
|
-
}
|
|
7845
|
-
|
|
7846
|
-
|
|
7847
|
-
|
|
7848
|
-
|
|
7849
|
-
|
|
7850
|
-
|
|
7851
|
-
|
|
7852
|
-
|
|
7853
|
-
|
|
7854
|
-
|
|
7855
|
-
|
|
7856
|
-
|
|
7857
|
-
|
|
7858
|
-
|
|
7859
|
-
|
|
7860
|
-
|
|
7861
|
-
|
|
7862
|
-
|
|
7863
|
-
|
|
7864
|
-
|
|
7865
|
-
}
|
|
7866
|
-
}
|
|
7867
|
-
} catch (err) {
|
|
7868
|
-
_didIteratorError1 = true;
|
|
7869
|
-
_iteratorError1 = err;
|
|
7870
|
-
} finally{
|
|
7871
|
-
try {
|
|
7872
|
-
if (!_iteratorNormalCompletion1 && _iterator1.return != null) {
|
|
7873
|
-
_iterator1.return();
|
|
7874
|
-
}
|
|
7875
|
-
} finally{
|
|
7876
|
-
if (_didIteratorError1) {
|
|
7877
|
-
throw _iteratorError1;
|
|
7878
|
-
}
|
|
7879
|
-
}
|
|
7880
|
-
}
|
|
7881
|
-
}
|
|
7882
|
-
} catch (err) {
|
|
7883
|
-
_didIteratorError = true;
|
|
7884
|
-
_iteratorError = err;
|
|
7885
|
-
} finally{
|
|
7886
|
-
try {
|
|
7887
|
-
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
7888
|
-
_iterator.return();
|
|
7889
|
-
}
|
|
7890
|
-
} finally{
|
|
7891
|
-
if (_didIteratorError) {
|
|
7892
|
-
throw _iteratorError;
|
|
7893
|
-
}
|
|
7894
|
-
}
|
|
7895
|
-
}
|
|
7896
|
-
}
|
|
7897
|
-
function reportUnknownModelCompanions(ctx, companions, knownCompanions) {
|
|
7898
|
-
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
7899
|
-
try {
|
|
7900
|
-
for(var _iterator = companions.entries()[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
|
|
7901
|
-
var _step_value = _sliced_to_array$3(_step.value, 2), suffix = _step_value[0], instances = _step_value[1];
|
|
7902
|
-
if (PROPERTY_COMPANIONS.includes(suffix)) continue;
|
|
7903
|
-
if (knownCompanions.includes(suffix)) continue;
|
|
7904
|
-
var _iteratorNormalCompletion1 = true, _didIteratorError1 = false, _iteratorError1 = undefined;
|
|
7905
|
-
try {
|
|
7906
|
-
for(var _iterator1 = instances[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true){
|
|
7907
|
-
var tag = _step1.value;
|
|
7908
|
-
reportOnJsdocLine({
|
|
7909
|
-
commentNode: ctx.commentNode,
|
|
7910
|
-
parsed: ctx.parsed,
|
|
7911
|
-
sourceCode: ctx.sourceCode,
|
|
7912
|
-
lineIndex: tag.startLineIndex,
|
|
7913
|
-
messageId: 'unknownDbxModelTag',
|
|
7914
|
-
data: {
|
|
7915
|
-
name: suffix,
|
|
7916
|
-
known: knownCompanions.join(', ')
|
|
7917
|
-
},
|
|
7918
|
-
report: ctx.report
|
|
7919
|
-
});
|
|
7920
|
-
}
|
|
7921
|
-
} catch (err) {
|
|
7922
|
-
_didIteratorError1 = true;
|
|
7923
|
-
_iteratorError1 = err;
|
|
7924
|
-
} finally{
|
|
7925
|
-
try {
|
|
7926
|
-
if (!_iteratorNormalCompletion1 && _iterator1.return != null) {
|
|
7927
|
-
_iterator1.return();
|
|
7928
|
-
}
|
|
7929
|
-
} finally{
|
|
7930
|
-
if (_didIteratorError1) {
|
|
7931
|
-
throw _iteratorError1;
|
|
7932
|
-
}
|
|
7933
|
-
}
|
|
7934
|
-
}
|
|
7935
|
-
}
|
|
7936
|
-
} catch (err) {
|
|
7937
|
-
_didIteratorError = true;
|
|
7938
|
-
_iteratorError = err;
|
|
7939
|
-
} finally{
|
|
7940
|
-
try {
|
|
7941
|
-
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
7942
|
-
_iterator.return();
|
|
7943
|
-
}
|
|
7944
|
-
} finally{
|
|
7945
|
-
if (_didIteratorError) {
|
|
7946
|
-
throw _iteratorError;
|
|
7947
|
-
}
|
|
7948
|
-
}
|
|
7949
|
-
}
|
|
7950
|
-
}
|
|
7951
|
-
function reportModelDuplicates(ctx, companions, knownCompanions) {
|
|
7952
|
-
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
7953
|
-
try {
|
|
7954
|
-
for(var _iterator = knownCompanions[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
|
|
7955
|
-
var suffix = _step.value;
|
|
7956
|
-
var _companions_get;
|
|
7957
|
-
if (suffix === 'Archetype') continue; // archetypes are repeatable.
|
|
7958
|
-
var instances = (_companions_get = companions.get(suffix)) !== null && _companions_get !== void 0 ? _companions_get : [];
|
|
7959
|
-
if (instances.length <= 1) continue;
|
|
7960
|
-
for(var i = 1; i < instances.length; i += 1){
|
|
7961
|
-
reportOnJsdocLine({
|
|
7962
|
-
commentNode: ctx.commentNode,
|
|
7963
|
-
parsed: ctx.parsed,
|
|
7964
|
-
sourceCode: ctx.sourceCode,
|
|
7965
|
-
lineIndex: instances[i].startLineIndex,
|
|
7966
|
-
messageId: 'duplicateCompanionTag',
|
|
7967
|
-
data: {
|
|
7968
|
-
name: suffix
|
|
7969
|
-
},
|
|
7970
|
-
report: ctx.report
|
|
7971
|
-
});
|
|
7972
|
-
}
|
|
7973
|
-
}
|
|
7974
|
-
} catch (err) {
|
|
7975
|
-
_didIteratorError = true;
|
|
7976
|
-
_iteratorError = err;
|
|
7977
|
-
} finally{
|
|
7978
|
-
try {
|
|
7979
|
-
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
7980
|
-
_iterator.return();
|
|
7981
|
-
}
|
|
7982
|
-
} finally{
|
|
7983
|
-
if (_didIteratorError) {
|
|
7984
|
-
throw _iteratorError;
|
|
7985
|
-
}
|
|
7986
|
-
}
|
|
7987
|
-
}
|
|
7988
|
-
}
|
|
7989
|
-
function reportArchetypeTag(ctx, tag) {
|
|
7990
|
-
var text = tag.description.trim();
|
|
7991
|
-
if (text.length === 0) return;
|
|
7992
|
-
var spaceIdx = text.indexOf(' ');
|
|
7993
|
-
var slug = spaceIdx >= 0 ? text.slice(0, spaceIdx).trim() : text;
|
|
7994
|
-
if (!ARCHETYPE_SLUG_PATTERN.test(slug)) {
|
|
7995
|
-
reportOnJsdocLine({
|
|
7996
|
-
commentNode: ctx.commentNode,
|
|
7997
|
-
parsed: ctx.parsed,
|
|
7998
|
-
sourceCode: ctx.sourceCode,
|
|
7999
|
-
lineIndex: tag.startLineIndex,
|
|
8000
|
-
messageId: 'archetypeBadSlug',
|
|
8001
|
-
data: {
|
|
8002
|
-
value: slug
|
|
8003
|
-
},
|
|
8004
|
-
report: ctx.report
|
|
8005
|
-
});
|
|
8006
|
-
return;
|
|
8007
|
-
}
|
|
8008
|
-
if (spaceIdx < 0) return;
|
|
8009
|
-
var rest = text.slice(spaceIdx + 1).trim();
|
|
8010
|
-
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
8011
|
-
try {
|
|
8012
|
-
for(var _iterator = rest.split(',')[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
|
|
8013
|
-
var pair = _step.value;
|
|
8014
|
-
var trimmed = pair.trim();
|
|
8015
|
-
if (trimmed.length === 0) continue;
|
|
8016
|
-
if (!ARCHETYPE_AXIS_PATTERN.test(trimmed)) {
|
|
8017
|
-
reportOnJsdocLine({
|
|
8018
|
-
commentNode: ctx.commentNode,
|
|
8019
|
-
parsed: ctx.parsed,
|
|
8020
|
-
sourceCode: ctx.sourceCode,
|
|
8021
|
-
lineIndex: tag.startLineIndex,
|
|
8022
|
-
messageId: 'archetypeBadAxisPair',
|
|
8023
|
-
data: {
|
|
8024
|
-
value: trimmed
|
|
8025
|
-
},
|
|
8026
|
-
report: ctx.report
|
|
8027
|
-
});
|
|
8028
|
-
}
|
|
8029
|
-
}
|
|
8030
|
-
} catch (err) {
|
|
8031
|
-
_didIteratorError = true;
|
|
8032
|
-
_iteratorError = err;
|
|
8033
|
-
} finally{
|
|
8034
|
-
try {
|
|
8035
|
-
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
8036
|
-
_iterator.return();
|
|
8037
|
-
}
|
|
8038
|
-
} finally{
|
|
8039
|
-
if (_didIteratorError) {
|
|
8040
|
-
throw _iteratorError;
|
|
8041
|
-
}
|
|
8042
|
-
}
|
|
8043
|
-
}
|
|
8044
|
-
}
|
|
8045
|
-
function reportCompositeKeyTag(ctx, tag, allowedEncodings) {
|
|
8046
|
-
var text = tag.description.trim();
|
|
8047
|
-
if (text.length === 0) {
|
|
8048
|
-
reportOnJsdocLine({
|
|
8049
|
-
commentNode: ctx.commentNode,
|
|
8050
|
-
parsed: ctx.parsed,
|
|
8051
|
-
sourceCode: ctx.sourceCode,
|
|
8052
|
-
lineIndex: tag.startLineIndex,
|
|
8053
|
-
messageId: 'compositeKeyMissingFrom',
|
|
8054
|
-
report: ctx.report
|
|
8055
|
-
});
|
|
8056
|
-
reportOnJsdocLine({
|
|
8057
|
-
commentNode: ctx.commentNode,
|
|
8058
|
-
parsed: ctx.parsed,
|
|
8059
|
-
sourceCode: ctx.sourceCode,
|
|
8060
|
-
lineIndex: tag.startLineIndex,
|
|
8061
|
-
messageId: 'compositeKeyMissingEncoding',
|
|
8062
|
-
report: ctx.report
|
|
8063
|
-
});
|
|
8064
|
-
return;
|
|
8065
|
-
}
|
|
8066
|
-
var hasFrom = false;
|
|
8067
|
-
var encoding;
|
|
8068
|
-
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
8069
|
-
try {
|
|
8070
|
-
for(var _iterator = text.split(/\s+/)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
|
|
8071
|
-
var token = _step.value;
|
|
8072
|
-
var eq = token.indexOf('=');
|
|
8073
|
-
if (eq <= 0) continue;
|
|
8074
|
-
var key = token.slice(0, eq).trim();
|
|
8075
|
-
var value = token.slice(eq + 1).trim();
|
|
8076
|
-
if (key === 'from' && value.length > 0) hasFrom = true;
|
|
8077
|
-
else if (key === 'encoding') encoding = value;
|
|
8078
|
-
}
|
|
8079
|
-
} catch (err) {
|
|
8080
|
-
_didIteratorError = true;
|
|
8081
|
-
_iteratorError = err;
|
|
8082
|
-
} finally{
|
|
8083
|
-
try {
|
|
8084
|
-
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
8085
|
-
_iterator.return();
|
|
8086
|
-
}
|
|
8087
|
-
} finally{
|
|
8088
|
-
if (_didIteratorError) {
|
|
8089
|
-
throw _iteratorError;
|
|
8090
|
-
}
|
|
8091
|
-
}
|
|
8092
|
-
}
|
|
8093
|
-
if (!hasFrom) {
|
|
8094
|
-
reportOnJsdocLine({
|
|
8095
|
-
commentNode: ctx.commentNode,
|
|
8096
|
-
parsed: ctx.parsed,
|
|
8097
|
-
sourceCode: ctx.sourceCode,
|
|
8098
|
-
lineIndex: tag.startLineIndex,
|
|
8099
|
-
messageId: 'compositeKeyMissingFrom',
|
|
8100
|
-
report: ctx.report
|
|
8101
|
-
});
|
|
8102
|
-
}
|
|
8103
|
-
if (encoding == null) {
|
|
8104
|
-
reportOnJsdocLine({
|
|
8105
|
-
commentNode: ctx.commentNode,
|
|
8106
|
-
parsed: ctx.parsed,
|
|
8107
|
-
sourceCode: ctx.sourceCode,
|
|
8108
|
-
lineIndex: tag.startLineIndex,
|
|
8109
|
-
messageId: 'compositeKeyMissingEncoding',
|
|
8110
|
-
report: ctx.report
|
|
8111
|
-
});
|
|
8112
|
-
} else if (!allowedEncodings.includes(encoding)) {
|
|
8113
|
-
reportOnJsdocLine({
|
|
8114
|
-
commentNode: ctx.commentNode,
|
|
8115
|
-
parsed: ctx.parsed,
|
|
8116
|
-
sourceCode: ctx.sourceCode,
|
|
8117
|
-
lineIndex: tag.startLineIndex,
|
|
8118
|
-
messageId: 'compositeKeyInvalidEncoding',
|
|
8119
|
-
data: {
|
|
8120
|
-
value: encoding,
|
|
8121
|
-
allowed: allowedEncodings.join(', ')
|
|
8122
|
-
},
|
|
8123
|
-
report: ctx.report
|
|
8124
|
-
});
|
|
8125
|
-
}
|
|
8126
|
-
}
|
|
8127
|
-
/**
|
|
8128
|
-
* Splits an interface JSDoc into the marker tags from `MODEL_MARKERS` and the
|
|
8129
|
-
* map of `@dbxModel*` companion tags keyed by suffix. Property-only companions
|
|
8130
|
-
* (`Variable`, `VariableSyncFlag`) are still surfaced so the caller can flag them
|
|
8131
|
-
* as misplaced when found on an interface JSDoc.
|
|
8132
|
-
*
|
|
8133
|
-
* @param parsed - The parsed JSDoc to inspect.
|
|
8134
|
-
* @returns The list of marker tags and the map of companion suffix to tag instances.
|
|
8135
|
-
*/ function collectInterfaceTags(parsed) {
|
|
8136
|
-
var markers = [];
|
|
8137
|
-
var companions = new Map();
|
|
8138
|
-
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
8139
|
-
try {
|
|
8140
|
-
for(var _iterator = parsed.tags[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
|
|
8141
|
-
var tag = _step.value;
|
|
8142
|
-
var _companions_get;
|
|
8143
|
-
if (MODEL_MARKERS.has(tag.tag)) {
|
|
8144
|
-
markers.push(tag);
|
|
8145
|
-
continue;
|
|
8146
|
-
}
|
|
8147
|
-
// Property-level tags (Variable / VariableSyncFlag) on an interface JSDoc → misplaced.
|
|
8148
|
-
if (tag.tag === 'dbxModelVariable' || tag.tag === 'dbxModelVariableSyncFlag') {
|
|
8149
|
-
var _companions_get1;
|
|
8150
|
-
var suffix = tag.tag.slice('dbxModel'.length);
|
|
8151
|
-
var list = (_companions_get1 = companions.get(suffix)) !== null && _companions_get1 !== void 0 ? _companions_get1 : [];
|
|
8152
|
-
list.push(tag);
|
|
8153
|
-
companions.set(suffix, list);
|
|
8154
|
-
continue;
|
|
8155
|
-
}
|
|
8156
|
-
if (!tag.tag.startsWith('dbxModel')) continue;
|
|
8157
|
-
// Exclude tag prefixes that belong to sibling families (handled by their own rules).
|
|
8158
|
-
if (tag.tag.startsWith('dbxModelSnapshotField') || tag.tag.startsWith('dbxModelFirebaseIndex')) continue;
|
|
8159
|
-
var suffix1 = tag.tag.slice('dbxModel'.length);
|
|
8160
|
-
var list1 = (_companions_get = companions.get(suffix1)) !== null && _companions_get !== void 0 ? _companions_get : [];
|
|
8161
|
-
list1.push(tag);
|
|
8162
|
-
companions.set(suffix1, list1);
|
|
8163
|
-
}
|
|
8164
|
-
} catch (err) {
|
|
8165
|
-
_didIteratorError = true;
|
|
8166
|
-
_iteratorError = err;
|
|
8167
|
-
} finally{
|
|
8168
|
-
try {
|
|
8169
|
-
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
8170
|
-
_iterator.return();
|
|
8171
|
-
}
|
|
8172
|
-
} finally{
|
|
8173
|
-
if (_didIteratorError) {
|
|
8174
|
-
throw _iteratorError;
|
|
8175
|
-
}
|
|
8176
|
-
}
|
|
8177
|
-
}
|
|
8178
|
-
return {
|
|
8179
|
-
markers: markers,
|
|
8180
|
-
companions: companions
|
|
8181
|
-
};
|
|
8182
|
-
}
|
|
8183
|
-
/**
|
|
8184
|
-
* ESLint rule enforcing `@dbxModel` / `@dbxModelSubObject` / `@dbxModelOrganizationalGroupRoot`
|
|
8185
|
-
* companion tags. Mirrors the scanner schema at
|
|
8186
|
-
* `packages/dbx-components-mcp/src/scan/extract-models/find-interfaces.ts`.
|
|
8187
|
-
*
|
|
8188
|
-
* Does NOT enforce a Slug / Category / Tags shape because the scanner does
|
|
8189
|
-
* not consume those for this family.
|
|
8190
|
-
*/ var UTIL_REQUIRE_DBX_MODEL_COMPANION_TAGS_RULE = {
|
|
8191
|
-
meta: {
|
|
8192
|
-
type: 'suggestion',
|
|
8193
|
-
fixable: 'code',
|
|
8194
|
-
docs: {
|
|
8195
|
-
description: 'Require the canonical `@dbxModel*` companion tags on `@dbxModel`-tagged interfaces.',
|
|
8196
|
-
recommended: true
|
|
8197
|
-
},
|
|
8198
|
-
messages: {
|
|
8199
|
-
archetypeBadSlug: '`@dbxModelArchetype` slug `{{value}}` is not a valid kebab-case slug.',
|
|
8200
|
-
archetypeBadAxisPair: '`@dbxModelArchetype` axis pair `{{value}}` is malformed; use `key=value` with non-empty key and value.',
|
|
8201
|
-
aggregatesFromNotPascalCase: '`@dbxModelAggregatesFrom` value `{{value}}` is not a PascalCase identifier.',
|
|
8202
|
-
compositeKeyMissingFrom: '`@dbxModelCompositeKey` is missing required `from=...` segment.',
|
|
8203
|
-
compositeKeyMissingEncoding: '`@dbxModelCompositeKey` is missing required `encoding=<two-way|one-way>` segment.',
|
|
8204
|
-
compositeKeyInvalidEncoding: '`@dbxModelCompositeKey` encoding `{{value}}` is invalid. Use one of: {{allowed}}.',
|
|
8205
|
-
mutuallyExclusiveMarkers: '`@dbxModel`, `@dbxModelSubObject`, and `@dbxModelOrganizationalGroupRoot` are mutually exclusive markers; only one is allowed.',
|
|
8206
|
-
variableTagOutsideProperty: '`@dbxModel{{name}}` is only valid on interface property declarations.',
|
|
8207
|
-
unknownDbxModelTag: '`@dbxModel{{name}}` is not a recognized companion tag. Known companions: {{known}}.',
|
|
8208
|
-
duplicateCompanionTag: '`@dbxModel{{name}}` is declared more than once.'
|
|
8209
|
-
},
|
|
8210
|
-
schema: [
|
|
8211
|
-
{
|
|
8212
|
-
type: 'object',
|
|
8213
|
-
additionalProperties: false,
|
|
8214
|
-
properties: {
|
|
8215
|
-
allowedEncodings: {
|
|
8216
|
-
type: 'array',
|
|
8217
|
-
items: {
|
|
8218
|
-
type: 'string'
|
|
8219
|
-
}
|
|
8220
|
-
},
|
|
8221
|
-
knownCompanions: {
|
|
8222
|
-
type: 'array',
|
|
8223
|
-
items: {
|
|
8224
|
-
type: 'string'
|
|
8225
|
-
}
|
|
8226
|
-
},
|
|
8227
|
-
requireBareMarker: {
|
|
8228
|
-
type: 'boolean'
|
|
8229
|
-
}
|
|
8230
|
-
}
|
|
8231
|
-
}
|
|
8232
|
-
]
|
|
8233
|
-
},
|
|
8234
|
-
create: function create(context) {
|
|
8235
|
-
var _context_options_, _options_allowedEncodings, _options_knownCompanions;
|
|
8236
|
-
var options = (_context_options_ = context.options[0]) !== null && _context_options_ !== void 0 ? _context_options_ : {};
|
|
8237
|
-
var sourceCode = context.sourceCode;
|
|
8238
|
-
var allowedEncodings = (_options_allowedEncodings = options.allowedEncodings) !== null && _options_allowedEncodings !== void 0 ? _options_allowedEncodings : DEFAULT_ALLOWED_ENCODINGS;
|
|
8239
|
-
var knownCompanions = (_options_knownCompanions = options.knownCompanions) !== null && _options_knownCompanions !== void 0 ? _options_knownCompanions : MODEL_COMPANIONS;
|
|
8240
|
-
var requireBareMarker = options.requireBareMarker !== false;
|
|
8241
|
-
function checkInterfaceJsdoc(commentNode) {
|
|
8242
|
-
var _companions_get, _companions_get1, _companions_get2;
|
|
8243
|
-
var parsed = parseJsdocComment(commentNode.value);
|
|
8244
|
-
var _collectInterfaceTags = collectInterfaceTags(parsed), markers = _collectInterfaceTags.markers, companions = _collectInterfaceTags.companions;
|
|
8245
|
-
if (markers.length === 0 && companions.size === 0 || requireBareMarker && markers.length === 0) return;
|
|
8246
|
-
var ctx = {
|
|
8247
|
-
commentNode: commentNode,
|
|
8248
|
-
parsed: parsed,
|
|
8249
|
-
sourceCode: sourceCode,
|
|
8250
|
-
report: context.report
|
|
8251
|
-
};
|
|
8252
|
-
reportMutuallyExclusiveMarkers(ctx, markers);
|
|
8253
|
-
reportPropertyOnlyTags(ctx, companions);
|
|
8254
|
-
reportUnknownModelCompanions(ctx, companions, knownCompanions);
|
|
8255
|
-
reportModelDuplicates(ctx, companions, knownCompanions);
|
|
8256
|
-
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
8257
|
-
try {
|
|
8258
|
-
for(var _iterator = ((_companions_get = companions.get('Archetype')) !== null && _companions_get !== void 0 ? _companions_get : [])[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
|
|
8259
|
-
var tag = _step.value;
|
|
8260
|
-
reportArchetypeTag(ctx, tag);
|
|
8261
|
-
}
|
|
8262
|
-
} catch (err) {
|
|
8263
|
-
_didIteratorError = true;
|
|
8264
|
-
_iteratorError = err;
|
|
8265
|
-
} finally{
|
|
8266
|
-
try {
|
|
8267
|
-
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
8268
|
-
_iterator.return();
|
|
8269
|
-
}
|
|
8270
|
-
} finally{
|
|
8271
|
-
if (_didIteratorError) {
|
|
8272
|
-
throw _iteratorError;
|
|
8273
|
-
}
|
|
8274
|
-
}
|
|
8275
|
-
}
|
|
8276
|
-
var _iteratorNormalCompletion1 = true, _didIteratorError1 = false, _iteratorError1 = undefined;
|
|
8277
|
-
try {
|
|
8278
|
-
for(var _iterator1 = ((_companions_get1 = companions.get('AggregatesFrom')) !== null && _companions_get1 !== void 0 ? _companions_get1 : [])[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true){
|
|
8279
|
-
var tag1 = _step1.value;
|
|
8280
|
-
var _tag_description_trim_split_;
|
|
8281
|
-
var value = (_tag_description_trim_split_ = tag1.description.trim().split(/\s+/)[0]) !== null && _tag_description_trim_split_ !== void 0 ? _tag_description_trim_split_ : '';
|
|
8282
|
-
if (value.length > 0 && !PASCAL_IDENTIFIER_PATTERN.test(value)) {
|
|
8283
|
-
reportOnJsdocLine({
|
|
8284
|
-
commentNode: commentNode,
|
|
8285
|
-
parsed: parsed,
|
|
8286
|
-
sourceCode: sourceCode,
|
|
8287
|
-
lineIndex: tag1.startLineIndex,
|
|
8288
|
-
messageId: 'aggregatesFromNotPascalCase',
|
|
8289
|
-
data: {
|
|
8290
|
-
value: value
|
|
8291
|
-
},
|
|
8292
|
-
report: context.report
|
|
8293
|
-
});
|
|
8294
|
-
}
|
|
8295
|
-
}
|
|
8296
|
-
} catch (err) {
|
|
8297
|
-
_didIteratorError1 = true;
|
|
8298
|
-
_iteratorError1 = err;
|
|
8299
|
-
} finally{
|
|
8300
|
-
try {
|
|
8301
|
-
if (!_iteratorNormalCompletion1 && _iterator1.return != null) {
|
|
8302
|
-
_iterator1.return();
|
|
8303
|
-
}
|
|
8304
|
-
} finally{
|
|
8305
|
-
if (_didIteratorError1) {
|
|
8306
|
-
throw _iteratorError1;
|
|
8307
|
-
}
|
|
8308
|
-
}
|
|
8309
|
-
}
|
|
8310
|
-
var _iteratorNormalCompletion2 = true, _didIteratorError2 = false, _iteratorError2 = undefined;
|
|
8311
|
-
try {
|
|
8312
|
-
for(var _iterator2 = ((_companions_get2 = companions.get('CompositeKey')) !== null && _companions_get2 !== void 0 ? _companions_get2 : [])[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true){
|
|
8313
|
-
var tag2 = _step2.value;
|
|
8314
|
-
reportCompositeKeyTag(ctx, tag2, allowedEncodings);
|
|
8315
|
-
}
|
|
8316
|
-
} catch (err) {
|
|
8317
|
-
_didIteratorError2 = true;
|
|
8318
|
-
_iteratorError2 = err;
|
|
8319
|
-
} finally{
|
|
8320
|
-
try {
|
|
8321
|
-
if (!_iteratorNormalCompletion2 && _iterator2.return != null) {
|
|
8322
|
-
_iterator2.return();
|
|
8323
|
-
}
|
|
8324
|
-
} finally{
|
|
8325
|
-
if (_didIteratorError2) {
|
|
8326
|
-
throw _iteratorError2;
|
|
8327
|
-
}
|
|
8328
|
-
}
|
|
8329
|
-
}
|
|
8330
|
-
}
|
|
8331
|
-
function visitInterface(node) {
|
|
8332
|
-
var anchor = node.parent && (node.parent.type === 'ExportNamedDeclaration' || node.parent.type === 'ExportDefaultDeclaration') ? node.parent : node;
|
|
8333
|
-
var jsdoc = leadingJsdocFor(sourceCode, anchor);
|
|
8334
|
-
if (jsdoc) checkInterfaceJsdoc(jsdoc);
|
|
8335
|
-
}
|
|
8336
|
-
return {
|
|
8337
|
-
TSInterfaceDeclaration: visitInterface
|
|
8338
|
-
};
|
|
8339
|
-
}
|
|
8340
|
-
};
|
|
8341
|
-
|
|
8342
|
-
function _array_like_to_array$2(arr, len) {
|
|
8343
|
-
if (len == null || len > arr.length) len = arr.length;
|
|
8344
|
-
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
8345
|
-
return arr2;
|
|
8346
|
-
}
|
|
8347
|
-
function _array_with_holes$2(arr) {
|
|
8348
|
-
if (Array.isArray(arr)) return arr;
|
|
8349
|
-
}
|
|
8350
|
-
function _iterable_to_array_limit$2(arr, i) {
|
|
8351
|
-
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
8352
|
-
if (_i == null) return;
|
|
8353
|
-
var _arr = [];
|
|
8354
|
-
var _n = true;
|
|
8355
|
-
var _d = false;
|
|
8356
|
-
var _s, _e;
|
|
8357
|
-
try {
|
|
8358
|
-
for(_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true){
|
|
8359
|
-
_arr.push(_s.value);
|
|
8360
|
-
if (i && _arr.length === i) break;
|
|
8361
|
-
}
|
|
8362
|
-
} catch (err) {
|
|
8363
|
-
_d = true;
|
|
8364
|
-
_e = err;
|
|
8365
|
-
} finally{
|
|
8366
|
-
try {
|
|
8367
|
-
if (!_n && _i["return"] != null) _i["return"]();
|
|
8368
|
-
} finally{
|
|
8369
|
-
if (_d) throw _e;
|
|
8370
|
-
}
|
|
8371
|
-
}
|
|
8372
|
-
return _arr;
|
|
8373
|
-
}
|
|
8374
|
-
function _non_iterable_rest$2() {
|
|
8375
|
-
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
8376
|
-
}
|
|
8377
|
-
function _sliced_to_array$2(arr, i) {
|
|
8378
|
-
return _array_with_holes$2(arr) || _iterable_to_array_limit$2(arr, i) || _unsupported_iterable_to_array$2(arr, i) || _non_iterable_rest$2();
|
|
8379
|
-
}
|
|
8380
|
-
function _unsupported_iterable_to_array$2(o, minLen) {
|
|
8381
|
-
if (!o) return;
|
|
8382
|
-
if (typeof o === "string") return _array_like_to_array$2(o, minLen);
|
|
8383
|
-
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
8384
|
-
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
8385
|
-
if (n === "Map" || n === "Set") return Array.from(n);
|
|
8386
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$2(o, minLen);
|
|
8387
|
-
}
|
|
8388
|
-
var DEFAULT_KNOWN_COMPANIONS$1 = [
|
|
8389
|
-
'ClaimsApp',
|
|
8390
|
-
'Claim',
|
|
8391
|
-
'ClaimsService',
|
|
8392
|
-
'Role',
|
|
8393
|
-
'RoleTag'
|
|
8394
|
-
];
|
|
8395
|
-
/**
|
|
8396
|
-
* ESLint rule enforcing the three `@dbxAuth*` marker families. Mirrors the
|
|
8397
|
-
* scanner schema at `packages/dbx-components-mcp/src/scan/auth-extract.ts`.
|
|
8398
|
-
*
|
|
8399
|
-
* - `@dbxAuthClaimsApp <slug>` on an interface / type alias.
|
|
8400
|
-
* - `@dbxAuthClaim` (bare) on a `PropertySignature` inside an interface.
|
|
8401
|
-
* - `@dbxAuthClaimsService <slug>` on an exported `VariableDeclaration`.
|
|
8402
|
-
*/ var UTIL_REQUIRE_DBX_AUTH_COMPANION_TAGS_RULE = {
|
|
8403
|
-
meta: {
|
|
8404
|
-
type: 'suggestion',
|
|
8405
|
-
fixable: 'code',
|
|
8406
|
-
docs: {
|
|
8407
|
-
description: 'Require the canonical `@dbxAuth*` companion tags on auth claims declarations.',
|
|
8408
|
-
recommended: true
|
|
8409
|
-
},
|
|
8410
|
-
messages: {
|
|
8411
|
-
appKeyMissing: '`@dbxAuthClaimsApp` requires a non-empty kebab-case app key value.',
|
|
8412
|
-
appKeyNotKebab: '`@dbxAuthClaimsApp` value `{{value}}` is not a valid kebab-case slug.',
|
|
8413
|
-
claimMarkerOutsideProperty: '`@dbxAuthClaim` is only valid on interface property declarations.',
|
|
8414
|
-
roleTagNotKebab: '`@dbxAuthRoleTag` item `{{value}}` is not a kebab-case slug.',
|
|
8415
|
-
serviceKeyMissing: '`@dbxAuthClaimsService` requires a non-empty kebab-case slug value.',
|
|
8416
|
-
serviceKeyNotKebab: '`@dbxAuthClaimsService` value `{{value}}` is not a valid kebab-case slug.',
|
|
8417
|
-
unknownDbxAuthTag: '`@dbxAuth{{name}}` is not a recognized companion tag. Known companions: {{known}}.',
|
|
8418
|
-
duplicateCompanionTag: '`@dbxAuth{{name}}` is declared more than once.'
|
|
8419
|
-
},
|
|
8420
|
-
schema: [
|
|
8421
|
-
{
|
|
8422
|
-
type: 'object',
|
|
8423
|
-
additionalProperties: false,
|
|
8424
|
-
properties: {
|
|
8425
|
-
knownCompanions: {
|
|
8426
|
-
type: 'array',
|
|
8427
|
-
items: {
|
|
8428
|
-
type: 'string'
|
|
8429
|
-
}
|
|
8430
|
-
},
|
|
8431
|
-
requireBareMarker: {
|
|
8432
|
-
type: 'boolean'
|
|
8433
|
-
}
|
|
7810
|
+
/**
|
|
7811
|
+
* ESLint rule enforcing the three `@dbxAuth*` marker families. Mirrors the
|
|
7812
|
+
* scanner schema at `packages/dbx-cli/src/lib/mcp-scan/scan/auth-extract.ts`.
|
|
7813
|
+
*
|
|
7814
|
+
* - `@dbxAuthClaimsApp <slug>` on an interface / type alias.
|
|
7815
|
+
* - `@dbxAuthClaim` (bare) on a `PropertySignature` inside an interface.
|
|
7816
|
+
* - `@dbxAuthClaimsService <slug>` on an exported `VariableDeclaration`.
|
|
7817
|
+
*/ var UTIL_REQUIRE_DBX_AUTH_COMPANION_TAGS_RULE = {
|
|
7818
|
+
meta: {
|
|
7819
|
+
type: 'suggestion',
|
|
7820
|
+
fixable: 'code',
|
|
7821
|
+
docs: {
|
|
7822
|
+
description: 'Require the canonical `@dbxAuth*` companion tags on auth claims declarations.',
|
|
7823
|
+
recommended: true
|
|
7824
|
+
},
|
|
7825
|
+
messages: {
|
|
7826
|
+
appKeyMissing: '`@dbxAuthClaimsApp` requires a non-empty kebab-case app key value.',
|
|
7827
|
+
appKeyNotKebab: '`@dbxAuthClaimsApp` value `{{value}}` is not a valid kebab-case slug.',
|
|
7828
|
+
claimMarkerOutsideProperty: '`@dbxAuthClaim` is only valid on interface property declarations.',
|
|
7829
|
+
roleTagNotKebab: '`@dbxAuthRoleTag` item `{{value}}` is not a kebab-case slug.',
|
|
7830
|
+
serviceKeyMissing: '`@dbxAuthClaimsService` requires a non-empty kebab-case slug value.',
|
|
7831
|
+
serviceKeyNotKebab: '`@dbxAuthClaimsService` value `{{value}}` is not a valid kebab-case slug.',
|
|
7832
|
+
unknownDbxAuthTag: '`@dbxAuth{{name}}` is not a recognized companion tag. Known companions: {{known}}.',
|
|
7833
|
+
duplicateCompanionTag: '`@dbxAuth{{name}}` is declared more than once.'
|
|
7834
|
+
},
|
|
7835
|
+
schema: [
|
|
7836
|
+
{
|
|
7837
|
+
type: 'object',
|
|
7838
|
+
additionalProperties: false,
|
|
7839
|
+
properties: {
|
|
7840
|
+
knownCompanions: {
|
|
7841
|
+
type: 'array',
|
|
7842
|
+
items: {
|
|
7843
|
+
type: 'string'
|
|
7844
|
+
}
|
|
7845
|
+
},
|
|
7846
|
+
requireBareMarker: {
|
|
7847
|
+
type: 'boolean'
|
|
7848
|
+
}
|
|
8434
7849
|
}
|
|
8435
7850
|
}
|
|
8436
7851
|
]
|
|
@@ -9138,6 +8553,29 @@ function collectRuleCompanions(parsed) {
|
|
|
9138
8553
|
* Used for cases where the rule's heuristics are wrong or the convention legitimately doesn't
|
|
9139
8554
|
* apply (e.g. branded singleton instances exported via PascalCase).
|
|
9140
8555
|
*/ var DEFAULT_EXEMPT_JSDOC_TAG$2 = '@dbxAllowConstantName';
|
|
8556
|
+
/**
|
|
8557
|
+
* Default set of type annotation identifier names whose `export const X: T = {...}` declarations
|
|
8558
|
+
* are exempt from the rule.
|
|
8559
|
+
*
|
|
8560
|
+
* These are framework-prescribed singleton types whose author-facing convention is camelCase, so
|
|
8561
|
+
* enforcing UPPER_SNAKE_CASE would diverge from upstream documentation and break import sites.
|
|
8562
|
+
*
|
|
8563
|
+
* - `Ng2StateDeclaration` / `StateDeclaration` — UIRouter state config objects.
|
|
8564
|
+
* - `ApplicationConfig` — Angular standalone bootstrap config.
|
|
8565
|
+
* - `Routes` / `Route` — Angular Router config arrays/entries.
|
|
8566
|
+
* - `ModelFirebaseCrudFunctionConfigMap` — @dereekb/firebase CRUD function declaration map exported per model group.
|
|
8567
|
+
* - `FirebaseFunctionTypeConfigMap` — @dereekb/firebase function-type configuration map exported per model group.
|
|
8568
|
+
*/ var DEFAULT_EXEMPT_TYPE_ANNOTATIONS = [
|
|
8569
|
+
'Ng2StateDeclaration',
|
|
8570
|
+
'StateDeclaration',
|
|
8571
|
+
'ApplicationConfig',
|
|
8572
|
+
'Routes',
|
|
8573
|
+
'Route',
|
|
8574
|
+
'ModelFirebaseCrudFunctionConfigMap',
|
|
8575
|
+
'FirebaseFunctionTypeConfigMap',
|
|
8576
|
+
'DevelopmentFirebaseFunctionConfigMap',
|
|
8577
|
+
'SystemStateStoredDataConverterMap'
|
|
8578
|
+
];
|
|
9141
8579
|
/**
|
|
9142
8580
|
* camelCase pattern accepted for function-typed constants.
|
|
9143
8581
|
*/ var CAMEL_CASE = /^[a-z][a-zA-Z0-9]*$/;
|
|
@@ -9200,6 +8638,40 @@ function collectRuleCompanions(parsed) {
|
|
|
9200
8638
|
}
|
|
9201
8639
|
return exempt;
|
|
9202
8640
|
}
|
|
8641
|
+
/**
|
|
8642
|
+
* Returns the identifier text of a declarator's type annotation when the annotation is a simple
|
|
8643
|
+
* `TSTypeReference` to a named type.
|
|
8644
|
+
*
|
|
8645
|
+
* For `TSQualifiedName` (e.g. `Ng.Routes`) the leftmost segment is returned, which is the form
|
|
8646
|
+
* users would typically allowlist (the imported namespace).
|
|
8647
|
+
*
|
|
8648
|
+
* Returns `undefined` for shapes the allowlist can't meaningfully match: missing annotation,
|
|
8649
|
+
* `TSFunctionType`, `TSTypeLiteral`, intersections/unions, etc.
|
|
8650
|
+
*
|
|
8651
|
+
* @param declarator - The VariableDeclarator AST node.
|
|
8652
|
+
* @returns The identifier name of the type annotation, or `undefined` when the annotation has no
|
|
8653
|
+
* single matchable identifier.
|
|
8654
|
+
*/ function getTypeAnnotationIdentifierName(declarator) {
|
|
8655
|
+
var _declarator_id_typeAnnotation, _declarator_id;
|
|
8656
|
+
var typeAnnotation = (_declarator_id = declarator.id) === null || _declarator_id === void 0 ? void 0 : (_declarator_id_typeAnnotation = _declarator_id.typeAnnotation) === null || _declarator_id_typeAnnotation === void 0 ? void 0 : _declarator_id_typeAnnotation.typeAnnotation;
|
|
8657
|
+
var result;
|
|
8658
|
+
if ((typeAnnotation === null || typeAnnotation === void 0 ? void 0 : typeAnnotation.type) === 'TSTypeReference') {
|
|
8659
|
+
var typeName = typeAnnotation.typeName;
|
|
8660
|
+
if ((typeName === null || typeName === void 0 ? void 0 : typeName.type) === 'Identifier') {
|
|
8661
|
+
result = typeName.name;
|
|
8662
|
+
} else if ((typeName === null || typeName === void 0 ? void 0 : typeName.type) === 'TSQualifiedName') {
|
|
8663
|
+
var _leftmost_left, _leftmost_left1;
|
|
8664
|
+
var leftmost = typeName;
|
|
8665
|
+
while(((_leftmost_left = leftmost.left) === null || _leftmost_left === void 0 ? void 0 : _leftmost_left.type) === 'TSQualifiedName'){
|
|
8666
|
+
leftmost = leftmost.left;
|
|
8667
|
+
}
|
|
8668
|
+
if (((_leftmost_left1 = leftmost.left) === null || _leftmost_left1 === void 0 ? void 0 : _leftmost_left1.type) === 'Identifier') {
|
|
8669
|
+
result = leftmost.left.name;
|
|
8670
|
+
}
|
|
8671
|
+
}
|
|
8672
|
+
}
|
|
8673
|
+
return result;
|
|
8674
|
+
}
|
|
9203
8675
|
/**
|
|
9204
8676
|
* Classifies a const variable declarator as function-typed, value-typed, or ambiguous, using only
|
|
9205
8677
|
* syntactic signals. Ambiguous cases are skipped by the rule to avoid false positives.
|
|
@@ -9251,6 +8723,12 @@ function collectRuleCompanions(parsed) {
|
|
|
9251
8723
|
* Use the exempt JSDoc tag (default `@dbxAllowConstantName`) to silence the rule on a specific
|
|
9252
8724
|
* declaration when the heuristics get it wrong.
|
|
9253
8725
|
*
|
|
8726
|
+
* Framework-prescribed singleton types (UIRouter's `Ng2StateDeclaration`, Angular's
|
|
8727
|
+
* `ApplicationConfig`, `Routes`, etc.) are exempt by default via the `exemptTypeAnnotations` option:
|
|
8728
|
+
* any `export const X: T = {...}` whose type annotation is a `TSTypeReference` to one of those
|
|
8729
|
+
* names is skipped regardless of casing. Pass `exemptTypeAnnotations: []` to opt out of the
|
|
8730
|
+
* defaults, or pass a non-empty array to replace the default allowlist with a project-specific set.
|
|
8731
|
+
*
|
|
9254
8732
|
* Not auto-fixable: renaming an exported binding has cross-file impact that an autofix can't safely
|
|
9255
8733
|
* propagate.
|
|
9256
8734
|
*
|
|
@@ -9274,6 +8752,13 @@ function collectRuleCompanions(parsed) {
|
|
|
9274
8752
|
exemptJsdocTag: {
|
|
9275
8753
|
type: 'string',
|
|
9276
8754
|
description: 'JSDoc tag that opts a const declaration out of the rule.'
|
|
8755
|
+
},
|
|
8756
|
+
exemptTypeAnnotations: {
|
|
8757
|
+
type: 'array',
|
|
8758
|
+
items: {
|
|
8759
|
+
type: 'string'
|
|
8760
|
+
},
|
|
8761
|
+
description: 'Type annotation identifier names whose `export const X: T = {...}` declarations are exempt. Pass an empty array to opt out of the defaults; pass a non-empty array to replace the defaults.'
|
|
9277
8762
|
}
|
|
9278
8763
|
},
|
|
9279
8764
|
additionalProperties: false
|
|
@@ -9281,9 +8766,10 @@ function collectRuleCompanions(parsed) {
|
|
|
9281
8766
|
]
|
|
9282
8767
|
},
|
|
9283
8768
|
create: function create(context) {
|
|
9284
|
-
var _context_options_, _options_exemptJsdocTag;
|
|
8769
|
+
var _context_options_, _options_exemptJsdocTag, _options_exemptTypeAnnotations;
|
|
9285
8770
|
var options = (_context_options_ = context.options[0]) !== null && _context_options_ !== void 0 ? _context_options_ : {};
|
|
9286
8771
|
var exemptTag = (_options_exemptJsdocTag = options.exemptJsdocTag) !== null && _options_exemptJsdocTag !== void 0 ? _options_exemptJsdocTag : DEFAULT_EXEMPT_JSDOC_TAG$2;
|
|
8772
|
+
var exemptTypeAnnotations = new Set((_options_exemptTypeAnnotations = options.exemptTypeAnnotations) !== null && _options_exemptTypeAnnotations !== void 0 ? _options_exemptTypeAnnotations : DEFAULT_EXEMPT_TYPE_ANNOTATIONS);
|
|
9287
8773
|
var sourceCode = context.sourceCode;
|
|
9288
8774
|
function checkExportNamedDeclaration(node) {
|
|
9289
8775
|
var _decl_declarations;
|
|
@@ -9306,6 +8792,10 @@ function collectRuleCompanions(parsed) {
|
|
|
9306
8792
|
if (name.startsWith('_')) {
|
|
9307
8793
|
continue;
|
|
9308
8794
|
}
|
|
8795
|
+
var typeAnnotationName = getTypeAnnotationIdentifierName(declarator);
|
|
8796
|
+
if (typeAnnotationName !== undefined && exemptTypeAnnotations.has(typeAnnotationName)) {
|
|
8797
|
+
continue;
|
|
8798
|
+
}
|
|
9309
8799
|
var kind = classifyConstant(declarator);
|
|
9310
8800
|
if (kind === 'function') {
|
|
9311
8801
|
if (!CAMEL_CASE.test(name) && !UPPER_SNAKE_CASE$1.test(name)) {
|
|
@@ -9910,7 +9400,6 @@ function _unsupported_iterable_to_array(o, minLen) {
|
|
|
9910
9400
|
'require-dbx-model-snapshot-field-companion-tags': UTIL_REQUIRE_DBX_MODEL_SNAPSHOT_FIELD_COMPANION_TAGS_RULE,
|
|
9911
9401
|
'require-dbx-action-companion-tags': UTIL_REQUIRE_DBX_ACTION_COMPANION_TAGS_RULE,
|
|
9912
9402
|
'require-dbx-form-field-companion-tags': UTIL_REQUIRE_DBX_FORM_FIELD_COMPANION_TAGS_RULE,
|
|
9913
|
-
'require-dbx-model-companion-tags': UTIL_REQUIRE_DBX_MODEL_COMPANION_TAGS_RULE,
|
|
9914
9403
|
'require-dbx-auth-companion-tags': UTIL_REQUIRE_DBX_AUTH_COMPANION_TAGS_RULE,
|
|
9915
9404
|
'require-dbx-rule-companion-tags': UTIL_REQUIRE_DBX_RULE_COMPANION_TAGS_RULE,
|
|
9916
9405
|
'require-constant-naming': UTIL_REQUIRE_CONSTANT_NAMING_RULE,
|
|
@@ -9926,4 +9415,4 @@ function _unsupported_iterable_to_array(o, minLen) {
|
|
|
9926
9415
|
* @dbxAllowConstantName
|
|
9927
9416
|
*/ var utilESLintPlugin = UTIL_ESLINT_PLUGIN;
|
|
9928
9417
|
|
|
9929
|
-
export { UTIL_ESLINT_PLUGIN, UTIL_NO_INLINE_TYPE_IMPORT_RULE, UTIL_NO_SISTER_RE_EXPORT_RULE, UTIL_PREFER_CANONICAL_JSDOC_RULE, UTIL_PREFER_CONFIG_OBJECT_HARD_RULE, UTIL_PREFER_CONFIG_OBJECT_RULE, UTIL_PREFER_MAYBE_TYPE_RULE, UTIL_PREFER_NO_SIDE_EFFECTS_IN_JSDOC_RULE, UTIL_REQUIRE_CONSTANT_NAMING_RULE, UTIL_REQUIRE_DBX_ACTION_COMPANION_TAGS_RULE, UTIL_REQUIRE_DBX_AUTH_COMPANION_TAGS_RULE, UTIL_REQUIRE_DBX_DOCS_UI_EXAMPLE_COMPANION_TAGS_RULE, UTIL_REQUIRE_DBX_FILTER_COMPANION_TAGS_RULE, UTIL_REQUIRE_DBX_FORM_FIELD_COMPANION_TAGS_RULE,
|
|
9418
|
+
export { UTIL_ESLINT_PLUGIN, UTIL_NO_INLINE_TYPE_IMPORT_RULE, UTIL_NO_SISTER_RE_EXPORT_RULE, UTIL_PREFER_CANONICAL_JSDOC_RULE, UTIL_PREFER_CONFIG_OBJECT_HARD_RULE, UTIL_PREFER_CONFIG_OBJECT_RULE, UTIL_PREFER_MAYBE_TYPE_RULE, UTIL_PREFER_NO_SIDE_EFFECTS_IN_JSDOC_RULE, UTIL_REQUIRE_CONSTANT_NAMING_RULE, UTIL_REQUIRE_DBX_ACTION_COMPANION_TAGS_RULE, UTIL_REQUIRE_DBX_AUTH_COMPANION_TAGS_RULE, UTIL_REQUIRE_DBX_DOCS_UI_EXAMPLE_COMPANION_TAGS_RULE, UTIL_REQUIRE_DBX_FILTER_COMPANION_TAGS_RULE, UTIL_REQUIRE_DBX_FORM_FIELD_COMPANION_TAGS_RULE, UTIL_REQUIRE_DBX_MODEL_SNAPSHOT_FIELD_COMPANION_TAGS_RULE, UTIL_REQUIRE_DBX_PIPE_COMPANION_TAGS_RULE, UTIL_REQUIRE_DBX_RULE_COMPANION_TAGS_RULE, UTIL_REQUIRE_DBX_UTIL_COMPANION_TAGS_RULE, UTIL_REQUIRE_DBX_WEB_COMPANION_TAGS_RULE, UTIL_REQUIRE_DEFAULT_PREFIX_NAMING_RULE, UTIL_REQUIRE_DEPRECATED_ALIAS_PLACEMENT_RULE, UTIL_REQUIRE_EXPORTED_JSDOC_EXAMPLE_RULE, UTIL_REQUIRE_NO_SIDE_EFFECTS_RULE, UTIL_REQUIRE_READONLY_CONFIG_PARAMS_RULE, UTIL_REQUIRE_SINGLE_RETURN_RULE, buildLowercaseTagsFix, checkDbxTagFamily, findFamilyTags, getStatementAnchor, leadingJsdocFor, parseBooleanTagValue, parseJsdocComment, reportOnJsdocLine, utilESLintPlugin };
|