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