@t0.labs/daxta 1.2.1 → 1.2.2
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/dist/catalog/index.js +5 -4
- package/package.json +1 -1
package/dist/catalog/index.js
CHANGED
|
@@ -45,7 +45,7 @@ const METHOD_ALIASES = {
|
|
|
45
45
|
merge: ['post', 'put', 'patch'],
|
|
46
46
|
replace: ['put'],
|
|
47
47
|
};
|
|
48
|
-
const CASE_SECTION_RE = /^((?:FALSE\s+)?POSITIVE CASES|SEMANTIC ERROR CASES(?:\s*-\s*AUTH)?|INVALID CASES|OMITTED(?: FIELD)? CASES)\s+/i;
|
|
48
|
+
const CASE_SECTION_RE = /^((?:FALSE\s+)?POSITIVE CASES|SEMANTIC ERROR CASES(?:\s*-\s*AUTH)?|INVALID CASES|OMITTED(?: FIELD)? CASES|AUTHENTICATION CASES|AUTHORIZATION CASES|SECURITY CASES|VALIDATION CASES)\s+/i;
|
|
49
49
|
function declaredMethods(test) {
|
|
50
50
|
if (!test)
|
|
51
51
|
return null;
|
|
@@ -165,7 +165,7 @@ function defaultTitle(method, pathTemplate) {
|
|
|
165
165
|
const custom = (0, config_1.getConfig)().operationTitle?.(method, pathTemplate);
|
|
166
166
|
if (custom)
|
|
167
167
|
return custom;
|
|
168
|
-
return pathTemplate;
|
|
168
|
+
return (0, test_title_1.suggestOperationTitles)(method, pathTemplate)[0] ?? pathTemplate;
|
|
169
169
|
}
|
|
170
170
|
exports.CASE_GROUP_ORDER = [
|
|
171
171
|
'POSITIVE CASES',
|
|
@@ -240,8 +240,9 @@ function caseName(test) {
|
|
|
240
240
|
if (!test)
|
|
241
241
|
return 'example';
|
|
242
242
|
let rest = test
|
|
243
|
-
.replace(new RegExp(`^.+?\\s+[—–-]\\s+(?:${test_title_1.HTTP_VERBS})\\s+\\S+\\s*`, 'i'), '')
|
|
244
|
-
.replace(new RegExp(
|
|
243
|
+
.replace(new RegExp(`^.+?\\s+[—–-]\\s+(?:${test_title_1.HTTP_VERBS})\\s+\\S+(?:\\s+\\([^)]*\\))*\\s*`, 'i'), '')
|
|
244
|
+
.replace(new RegExp(`^(?:${test_title_1.HTTP_VERBS})\\s+\\/\\S+(?:\\s+\\([^)]*\\))*\\s*`, 'i'), '')
|
|
245
|
+
.replace(new RegExp(`^.*?\\[(?:${test_title_1.HTTP_VERBS})\\](?:\\s+\\([^)]*\\))*\\s*`, 'i'), '');
|
|
245
246
|
rest = stripSectionPrefix(rest.trim());
|
|
246
247
|
// "Admin Find One Basket By Id API - GET /path POSITIVE CASES returns…"
|
|
247
248
|
rest = stripSectionPrefix(rest.replace(/^.+?\bAPI\s*[-–—]\s*(?:GET|POST|PUT|PATCH|DELETE)\s+\S+\s+/i, ''));
|