@t0.labs/daxta 0.4.20 → 0.4.21
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/README.md +11 -4
- package/assets/viewer.html +13 -1
- package/dist/build/build-spec.js +2 -8
- package/dist/catalog/index.d.ts +2 -1
- package/dist/catalog/index.js +21 -11
- package/dist/catalog/it-case.d.ts +5 -0
- package/dist/catalog/it-case.js +35 -8
- package/dist/cli/titles.js +3 -1
- package/dist/cli/tree.js +3 -3
- package/dist/config.d.ts +4 -3
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -1
- package/dist/titles/scan.js +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -12,7 +12,7 @@ DAxTA docs — recorded request, response, Try-it
|
|
|
12
12
|
| After tests | On the app |
|
|
13
13
|
| ------------------------------------- | -------------------------------------------------------- |
|
|
14
14
|
| OpenAPI + HTML from real hits | `/docs` on the same port as Nest |
|
|
15
|
-
|
|
|
15
|
+
| POSITIVE / INVALID / SEMANTIC / AUTH scenarios | Example picker uses the `when` clause only |
|
|
16
16
|
| DTO field map (required vs optional) | `DAXTA_DOCS=true|false` gate (like Swagger’s prod check) |
|
|
17
17
|
|
|
18
18
|
|
|
@@ -192,9 +192,16 @@ Suggested titles (method + path, never `:id` as a name):
|
|
|
192
192
|
|
|
193
193
|
Old `{path} [METHOD] (integration)` still parses. `daxta titles --yes` rewrites to the new form.
|
|
194
194
|
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
195
|
+
`it()` keeps a unique sentence; `/docs` examples take the part after `when` (groups match describe: POSITIVE CASES, SEMANTIC ERROR CASES, …):
|
|
196
|
+
|
|
197
|
+
| Layer | Rule | Example |
|
|
198
|
+
| --- | --- | --- |
|
|
199
|
+
| Positive `it()` | `{creates\|returns\|updates\|…} … when {diff}` | `creates mock tbs TRNC record when cyprus payload shape` |
|
|
200
|
+
| Error `it()` | `returns error when {diff}` | `returns error when tax id already exists in mock TBS` |
|
|
201
|
+
| Invalid fields | leave interpolated | `` `${property} - should not be ${description}` `` |
|
|
202
|
+
| Docs / Postman | `{status} — {after when}` | `201 — cyprus payload shape` |
|
|
203
|
+
|
|
204
|
+
`--yes` / `a` rewrite **this case’s own text**, not one shared template. Interpolated `it(\`${…}\`)` is never rewritten.
|
|
198
205
|
|
|
199
206
|
```bash
|
|
200
207
|
daxta titles # interactive (y = this recommended, a = all remaining)
|
package/assets/viewer.html
CHANGED
|
@@ -2429,7 +2429,19 @@
|
|
|
2429
2429
|
|
|
2430
2430
|
const HTTP = ["get", "post", "put", "patch", "delete"];
|
|
2431
2431
|
const STATUS = { 200: "OK", 201: "Created", 204: "No Content", 400: "Bad Request", 401: "Unauthorized", 404: "Not Found", 409: "Conflict", 422: "Unprocessable Entity" };
|
|
2432
|
-
const GROUP_ORDER = [
|
|
2432
|
+
const GROUP_ORDER = [
|
|
2433
|
+
"POSITIVE CASES",
|
|
2434
|
+
"SEMANTIC ERROR CASES",
|
|
2435
|
+
"INVALID CASES",
|
|
2436
|
+
"OMITTED CASES",
|
|
2437
|
+
"SEMANTIC ERROR CASES - AUTH",
|
|
2438
|
+
"Success",
|
|
2439
|
+
"Business errors",
|
|
2440
|
+
"Invalid input",
|
|
2441
|
+
"Missing fields",
|
|
2442
|
+
"Auth",
|
|
2443
|
+
"Other",
|
|
2444
|
+
];
|
|
2433
2445
|
const METHOD_ORDER = { get: 0, post: 1, put: 2, patch: 3, delete: 4 };
|
|
2434
2446
|
|
|
2435
2447
|
const ops = [];
|
package/dist/build/build-spec.js
CHANGED
|
@@ -349,13 +349,7 @@ function securityForHits(opHits) {
|
|
|
349
349
|
return [requirement];
|
|
350
350
|
}
|
|
351
351
|
function scenarioDisplayName(hit) {
|
|
352
|
-
|
|
353
|
-
const title = (0, catalog_1.apiTitle)(hit.test);
|
|
354
|
-
const style = (0, config_1.getConfig)().exampleLabelStyle ?? 'status-title-case';
|
|
355
|
-
if ((style === 'status-title-case' || style === 'full') && title) {
|
|
356
|
-
return `${title} — ${cas}`;
|
|
357
|
-
}
|
|
358
|
-
return cas;
|
|
352
|
+
return (0, catalog_1.docsScenarioClause)((0, catalog_1.caseName)(hit.test));
|
|
359
353
|
}
|
|
360
354
|
function toScenario(hit) {
|
|
361
355
|
return {
|
|
@@ -371,7 +365,7 @@ function toScenario(hit) {
|
|
|
371
365
|
}
|
|
372
366
|
function sortScenarios(scenarios) {
|
|
373
367
|
const groupRank = (group) => {
|
|
374
|
-
const order = [
|
|
368
|
+
const order = [...catalog_1.CASE_GROUP_ORDER];
|
|
375
369
|
const index = order.indexOf(group);
|
|
376
370
|
return index === -1 ? order.length : index;
|
|
377
371
|
};
|
package/dist/catalog/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type TreeLayout } from '../config';
|
|
2
2
|
export { parseOperationLabel, suggestOperationTitles, suggestOperationTitleResult, formatTestTitle } from './test-title';
|
|
3
|
-
export { isValidItCase, suggestItCases, parseCaseSection, type CaseSection } from './it-case';
|
|
3
|
+
export { isValidItCase, suggestItCases, docsScenarioClause, parseCaseSection, type CaseSection } from './it-case';
|
|
4
4
|
export type { TreeLayout };
|
|
5
5
|
export type FieldDoc = {
|
|
6
6
|
name: string;
|
|
@@ -32,6 +32,7 @@ export declare function viewerTreeConfig(): {
|
|
|
32
32
|
};
|
|
33
33
|
export declare function operationTag(pathTemplate: string, method: string): string;
|
|
34
34
|
export declare function defaultTitle(method: string, pathTemplate: string): string;
|
|
35
|
+
export declare const CASE_GROUP_ORDER: string[];
|
|
35
36
|
export declare function caseGroup(test?: string): string;
|
|
36
37
|
export declare function caseSectionLabel(test?: string): string;
|
|
37
38
|
/**
|
package/dist/catalog/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.STATUS_TEXT = exports.parseCaseSection = exports.suggestItCases = exports.isValidItCase = exports.formatTestTitle = exports.suggestOperationTitleResult = exports.suggestOperationTitles = exports.parseOperationLabel = void 0;
|
|
3
|
+
exports.CASE_GROUP_ORDER = exports.STATUS_TEXT = exports.parseCaseSection = exports.docsScenarioClause = exports.suggestItCases = exports.isValidItCase = exports.formatTestTitle = exports.suggestOperationTitleResult = exports.suggestOperationTitles = exports.parseOperationLabel = void 0;
|
|
4
4
|
exports.declaredMethods = declaredMethods;
|
|
5
5
|
exports.pathSegments = pathSegments;
|
|
6
6
|
exports.treePathSegments = treePathSegments;
|
|
@@ -15,15 +15,17 @@ exports.exampleLabel = exampleLabel;
|
|
|
15
15
|
exports.operationSummary = operationSummary;
|
|
16
16
|
const config_1 = require("../config");
|
|
17
17
|
const test_title_1 = require("./test-title");
|
|
18
|
+
const it_case_1 = require("./it-case");
|
|
18
19
|
var test_title_2 = require("./test-title");
|
|
19
20
|
Object.defineProperty(exports, "parseOperationLabel", { enumerable: true, get: function () { return test_title_2.parseOperationLabel; } });
|
|
20
21
|
Object.defineProperty(exports, "suggestOperationTitles", { enumerable: true, get: function () { return test_title_2.suggestOperationTitles; } });
|
|
21
22
|
Object.defineProperty(exports, "suggestOperationTitleResult", { enumerable: true, get: function () { return test_title_2.suggestOperationTitleResult; } });
|
|
22
23
|
Object.defineProperty(exports, "formatTestTitle", { enumerable: true, get: function () { return test_title_2.formatTestTitle; } });
|
|
23
|
-
var
|
|
24
|
-
Object.defineProperty(exports, "isValidItCase", { enumerable: true, get: function () { return
|
|
25
|
-
Object.defineProperty(exports, "suggestItCases", { enumerable: true, get: function () { return
|
|
26
|
-
Object.defineProperty(exports, "
|
|
24
|
+
var it_case_2 = require("./it-case");
|
|
25
|
+
Object.defineProperty(exports, "isValidItCase", { enumerable: true, get: function () { return it_case_2.isValidItCase; } });
|
|
26
|
+
Object.defineProperty(exports, "suggestItCases", { enumerable: true, get: function () { return it_case_2.suggestItCases; } });
|
|
27
|
+
Object.defineProperty(exports, "docsScenarioClause", { enumerable: true, get: function () { return it_case_2.docsScenarioClause; } });
|
|
28
|
+
Object.defineProperty(exports, "parseCaseSection", { enumerable: true, get: function () { return it_case_2.parseCaseSection; } });
|
|
27
29
|
exports.STATUS_TEXT = {
|
|
28
30
|
'200': 'OK',
|
|
29
31
|
'201': 'Created',
|
|
@@ -128,19 +130,27 @@ function defaultTitle(method, pathTemplate) {
|
|
|
128
130
|
return custom;
|
|
129
131
|
return pathTemplate;
|
|
130
132
|
}
|
|
133
|
+
exports.CASE_GROUP_ORDER = [
|
|
134
|
+
'POSITIVE CASES',
|
|
135
|
+
'SEMANTIC ERROR CASES',
|
|
136
|
+
'INVALID CASES',
|
|
137
|
+
'OMITTED CASES',
|
|
138
|
+
'SEMANTIC ERROR CASES - AUTH',
|
|
139
|
+
'Other',
|
|
140
|
+
];
|
|
131
141
|
function caseGroup(test) {
|
|
132
142
|
if (!test)
|
|
133
143
|
return 'Other';
|
|
134
144
|
if (/SEMANTIC ERROR CASES\s*-\s*AUTH/i.test(test))
|
|
135
|
-
return '
|
|
145
|
+
return 'SEMANTIC ERROR CASES - AUTH';
|
|
136
146
|
if (/POSITIVE CASES/i.test(test))
|
|
137
|
-
return '
|
|
147
|
+
return 'POSITIVE CASES';
|
|
138
148
|
if (/SEMANTIC ERROR CASES/i.test(test))
|
|
139
|
-
return '
|
|
149
|
+
return 'SEMANTIC ERROR CASES';
|
|
140
150
|
if (/INVALID CASES/i.test(test))
|
|
141
|
-
return '
|
|
151
|
+
return 'INVALID CASES';
|
|
142
152
|
if (/OMITTED/i.test(test))
|
|
143
|
-
return '
|
|
153
|
+
return 'OMITTED CASES';
|
|
144
154
|
return 'Other';
|
|
145
155
|
}
|
|
146
156
|
function caseSectionLabel(test) {
|
|
@@ -196,7 +206,7 @@ function caseName(test) {
|
|
|
196
206
|
/** OpenAPI example summary / scenario display name. */
|
|
197
207
|
function exampleLabel(hit) {
|
|
198
208
|
const style = (0, config_1.getConfig)().exampleLabelStyle ?? 'status-title-case';
|
|
199
|
-
const cas = caseName(hit.test);
|
|
209
|
+
const cas = (0, it_case_1.docsScenarioClause)(caseName(hit.test));
|
|
200
210
|
const title = apiTitle(hit.test);
|
|
201
211
|
const method = (hit.method || 'get').toUpperCase();
|
|
202
212
|
const section = caseSectionLabel(hit.test);
|
|
@@ -8,6 +8,11 @@ export declare function isValidItCase(name?: string): boolean;
|
|
|
8
8
|
* Never collapse many cases into one generic sentence.
|
|
9
9
|
*/
|
|
10
10
|
export declare function rewriteItFromOriginal(raw: string, section?: CaseSection, method?: string, pathTemplate?: string): string | undefined;
|
|
11
|
+
/**
|
|
12
|
+
* Docs / Postman example line: the unique condition only.
|
|
13
|
+
* Test keeps `creates mock tbs when cyprus payload shape` → docs `cyprus payload shape`.
|
|
14
|
+
*/
|
|
15
|
+
export declare function docsScenarioClause(raw?: string): string;
|
|
11
16
|
export type ItSuggestion = {
|
|
12
17
|
names: string[];
|
|
13
18
|
/** Safe for --yes / `a` — rewritten from this case's own text. */
|
package/dist/catalog/it-case.js
CHANGED
|
@@ -5,6 +5,7 @@ exports.isDynamicItName = isDynamicItName;
|
|
|
5
5
|
exports.isGenericItName = isGenericItName;
|
|
6
6
|
exports.isValidItCase = isValidItCase;
|
|
7
7
|
exports.rewriteItFromOriginal = rewriteItFromOriginal;
|
|
8
|
+
exports.docsScenarioClause = docsScenarioClause;
|
|
8
9
|
exports.suggestItCases = suggestItCases;
|
|
9
10
|
exports.suggestItCaseResult = suggestItCaseResult;
|
|
10
11
|
const test_title_1 = require("./test-title");
|
|
@@ -17,6 +18,10 @@ const GENERIC_IT = new Set([
|
|
|
17
18
|
'rejects when payload is invalid',
|
|
18
19
|
'rejects when a required field is omitted',
|
|
19
20
|
'rejects when unauthorized',
|
|
21
|
+
'returns error when resource already exists',
|
|
22
|
+
'returns error when payload is invalid',
|
|
23
|
+
'returns error when a required field is omitted',
|
|
24
|
+
'returns error when unauthorized',
|
|
20
25
|
]);
|
|
21
26
|
function parseCaseSection(raw) {
|
|
22
27
|
if (!raw)
|
|
@@ -42,9 +47,11 @@ function isGenericItName(name) {
|
|
|
42
47
|
return true;
|
|
43
48
|
if (/^rejects when (resource|payload) (already exists|is invalid)$/i.test(value))
|
|
44
49
|
return true;
|
|
50
|
+
if (/^returns error when (resource|payload) (already exists|is invalid)$/i.test(value))
|
|
51
|
+
return true;
|
|
45
52
|
if (/^returns [\w\s]+ list when query is valid$/i.test(value))
|
|
46
53
|
return true;
|
|
47
|
-
if (/^
|
|
54
|
+
if (/^returns resource\b/i.test(value))
|
|
48
55
|
return true;
|
|
49
56
|
return false;
|
|
50
57
|
}
|
|
@@ -89,8 +96,9 @@ function stemVerb(raw) {
|
|
|
89
96
|
return `${v}s`;
|
|
90
97
|
}
|
|
91
98
|
function outcomeVerb(section, method) {
|
|
92
|
-
if (section === 'auth' || section === 'invalid' || section === 'omitted' || section === 'semantic')
|
|
93
|
-
return '
|
|
99
|
+
if (section === 'auth' || section === 'invalid' || section === 'omitted' || section === 'semantic') {
|
|
100
|
+
return 'returns error';
|
|
101
|
+
}
|
|
94
102
|
const m = (method || 'get').toLowerCase();
|
|
95
103
|
if (m === 'post')
|
|
96
104
|
return 'creates';
|
|
@@ -131,11 +139,12 @@ function rewriteItFromOriginal(raw, section, method, pathTemplate) {
|
|
|
131
139
|
const res = pathTemplate ? (0, test_title_1.resourceLabel)(pathTemplate).toLowerCase() : 'resource';
|
|
132
140
|
const outcome = outcomeVerb(section, method);
|
|
133
141
|
s = s
|
|
134
|
-
.replace(/^
|
|
135
|
-
.replace(/^returns?\s+
|
|
136
|
-
.replace(/^returns?\s+
|
|
137
|
-
.replace(/^returns?\s+
|
|
138
|
-
.replace(/^returns?\s+
|
|
142
|
+
.replace(/^rejects\s+/i, 'returns error ')
|
|
143
|
+
.replace(/^returns?\s+unauthorized\s+/i, 'returns error ')
|
|
144
|
+
.replace(/^returns?\s+conflict\s+/i, 'returns error ')
|
|
145
|
+
.replace(/^returns?\s+error\s+/i, 'returns error ')
|
|
146
|
+
.replace(/^returns?\s+bad request\s+/i, 'returns error ')
|
|
147
|
+
.replace(/^returns?\s+not found\s+/i, 'returns error ');
|
|
139
148
|
if (/^not\s+/i.test(s)) {
|
|
140
149
|
const beforeWhen = s.replace(/^not\s+/i, '').split(/\bwhen\b/i)[0].trim();
|
|
141
150
|
return fitItName(`${outcome} ${res} when not ${beforeWhen}`);
|
|
@@ -163,6 +172,24 @@ function rewriteItFromOriginal(raw, section, method, pathTemplate) {
|
|
|
163
172
|
}
|
|
164
173
|
return fitItName(`${outcome} when ${s}`);
|
|
165
174
|
}
|
|
175
|
+
const OUTCOME_PREFIX = /^(returns|creates|updates|upserts|inserts|merges|replaces|deletes|lists|rejects|conflicts)\s+/i;
|
|
176
|
+
/**
|
|
177
|
+
* Docs / Postman example line: the unique condition only.
|
|
178
|
+
* Test keeps `creates mock tbs when cyprus payload shape` → docs `cyprus payload shape`.
|
|
179
|
+
*/
|
|
180
|
+
function docsScenarioClause(raw) {
|
|
181
|
+
if (!raw)
|
|
182
|
+
return 'example';
|
|
183
|
+
let s = raw.trim().replace(/\s+/g, ' ');
|
|
184
|
+
const field = s.match(/^([A-Za-z0-9_.]+)\s+-\s+(should not be\s+.+)$/i);
|
|
185
|
+
if (field)
|
|
186
|
+
return `${field[1]} ${field[2]}`.trim();
|
|
187
|
+
const when = s.match(/\bwhen\s+(.+)$/i);
|
|
188
|
+
if (when?.[1])
|
|
189
|
+
return when[1].trim();
|
|
190
|
+
s = s.replace(OUTCOME_PREFIX, '').replace(/^resource\s+/i, '').trim();
|
|
191
|
+
return s || 'example';
|
|
192
|
+
}
|
|
166
193
|
/**
|
|
167
194
|
* Prefer a unique rewrite of the current it() name.
|
|
168
195
|
* Generic section templates are never auto-applied.
|
package/dist/cli/titles.js
CHANGED
|
@@ -130,7 +130,9 @@ async function runTitleCheck(options) {
|
|
|
130
130
|
}
|
|
131
131
|
(0, ui_1.banner)('Test naming', 'runs before Jest — docs / Postman labels');
|
|
132
132
|
console.log(` ${ui_1.c.dim('Title')} Create Mock Tbs — POST /v1/admin/mock-tbs`);
|
|
133
|
-
console.log(` ${ui_1.c.dim('it()')}
|
|
133
|
+
console.log(` ${ui_1.c.dim('it()+')} creates mock tbs when cyprus payload shape`);
|
|
134
|
+
console.log(` ${ui_1.c.dim('it()-')} returns error when tax id already exists`);
|
|
135
|
+
console.log(` ${ui_1.c.dim('docs')} 201 — cyprus payload shape`);
|
|
134
136
|
console.log(` ${ui_1.c.gold(String(total))} to review — ${ui_1.c.ice('y')} one recommended, ${ui_1.c.ice('a')} all remaining, ${ui_1.c.ice('s')} skip.`);
|
|
135
137
|
let written = 0;
|
|
136
138
|
let skipped = 0;
|
package/dist/cli/tree.js
CHANGED
|
@@ -119,11 +119,11 @@ async function pickExampleStyle(current) {
|
|
|
119
119
|
console.log('');
|
|
120
120
|
console.log(` ${ui_1.c.bold('Example / scenario labels')}`);
|
|
121
121
|
console.log(` ${ui_1.c.ice('1')} status-title-case`);
|
|
122
|
-
console.log(` ${ui_1.c.dim('
|
|
122
|
+
console.log(` ${ui_1.c.dim('201 — cyprus payload shape')}`);
|
|
123
123
|
console.log(` ${ui_1.c.ice('2')} status-case`);
|
|
124
|
-
console.log(` ${ui_1.c.dim('
|
|
124
|
+
console.log(` ${ui_1.c.dim('201 — cyprus payload shape')}`);
|
|
125
125
|
console.log(` ${ui_1.c.ice('3')} full`);
|
|
126
|
-
console.log(` ${ui_1.c.dim('
|
|
126
|
+
console.log(` ${ui_1.c.dim('201 — Create Mock Tbs - POST /v1/admin/mock-tbs POSITIVE CASES cyprus payload shape')}`);
|
|
127
127
|
console.log(` ${ui_1.c.ice('4')} keep ${ui_1.c.dim(`(${current})`)}`);
|
|
128
128
|
const answer = await (0, ui_1.readlineAsk)(` ${ui_1.c.gold('?')} Choose\n ${ui_1.c.ice('›')} `);
|
|
129
129
|
if (!answer || answer === '4' || /^k(eep)?$/i.test(answer))
|
package/dist/config.d.ts
CHANGED
|
@@ -39,9 +39,10 @@ export type DaxtaConfig = {
|
|
|
39
39
|
treePathOverrides?: Record<string, string[]>;
|
|
40
40
|
/**
|
|
41
41
|
* OpenAPI example + scenario labels:
|
|
42
|
-
* - status-case → `
|
|
43
|
-
* - status-title-case → `
|
|
44
|
-
* - full →
|
|
42
|
+
* - status-case → `201 — cyprus payload shape`
|
|
43
|
+
* - status-title-case → `201 — Create Mock Tbs — cyprus payload shape`
|
|
44
|
+
* - full → includes path + POSITIVE CASES + clause
|
|
45
|
+
* Test it() stays `creates mock tbs when cyprus payload shape`; docs take the `when` clause.
|
|
45
46
|
*/
|
|
46
47
|
exampleLabelStyle?: ExampleLabelStyle;
|
|
47
48
|
port?: number;
|
package/dist/index.d.ts
CHANGED
|
@@ -6,5 +6,5 @@ export { dtoRequired, type FieldLocation } from './fields/dto-fields';
|
|
|
6
6
|
export { buildFieldsFile, writeFieldsFile, readFieldsFile, type FieldsFile } from './fields/export-fields';
|
|
7
7
|
export { apiDocs, apiDocsHandler, serveApiDocs, getDocsBasePath, getHtmlPath, getOutDir, getSpecJsonPath, type ApiDocsHandler, type ApiDocsOptions, } from './serve';
|
|
8
8
|
export { runInteractiveCall, runFileCall, executeCall, type CallValues } from './call';
|
|
9
|
-
export { apiTitle, parseOperationLabel, suggestOperationTitles, suggestOperationTitleResult, formatTestTitle, isValidItCase, suggestItCases, type FieldDoc, type OperationDoc, } from './catalog';
|
|
9
|
+
export { apiTitle, parseOperationLabel, suggestOperationTitles, suggestOperationTitleResult, formatTestTitle, isValidItCase, suggestItCases, docsScenarioClause, type FieldDoc, type OperationDoc, } from './catalog';
|
|
10
10
|
export { installDaxta, type InstallOptions } from './cli/install';
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.installDaxta = exports.suggestItCases = exports.isValidItCase = exports.formatTestTitle = exports.suggestOperationTitleResult = exports.suggestOperationTitles = exports.parseOperationLabel = exports.apiTitle = exports.executeCall = exports.runFileCall = exports.runInteractiveCall = exports.getSpecJsonPath = exports.getOutDir = exports.getHtmlPath = exports.getDocsBasePath = exports.serveApiDocs = exports.apiDocsHandler = exports.apiDocs = exports.readFieldsFile = exports.writeFieldsFile = exports.buildFieldsFile = exports.dtoRequired = exports.getHits = exports.clearWorkerHits = exports.flush = exports.install = exports.touchPartialMarker = exports.clearPartialMarker = exports.flushAndRebuild = exports.rebuildFromDisk = exports.loadHits = exports.buildOpenApi = exports.buildDaxtaSpec = exports.normalizeTreeLayout = exports.resolveConfig = exports.getConfig = exports.defineConfig = void 0;
|
|
3
|
+
exports.installDaxta = exports.docsScenarioClause = exports.suggestItCases = exports.isValidItCase = exports.formatTestTitle = exports.suggestOperationTitleResult = exports.suggestOperationTitles = exports.parseOperationLabel = exports.apiTitle = exports.executeCall = exports.runFileCall = exports.runInteractiveCall = exports.getSpecJsonPath = exports.getOutDir = exports.getHtmlPath = exports.getDocsBasePath = exports.serveApiDocs = exports.apiDocsHandler = exports.apiDocs = exports.readFieldsFile = exports.writeFieldsFile = exports.buildFieldsFile = exports.dtoRequired = exports.getHits = exports.clearWorkerHits = exports.flush = exports.install = exports.touchPartialMarker = exports.clearPartialMarker = exports.flushAndRebuild = exports.rebuildFromDisk = exports.loadHits = exports.buildOpenApi = exports.buildDaxtaSpec = exports.normalizeTreeLayout = exports.resolveConfig = exports.getConfig = exports.defineConfig = void 0;
|
|
4
4
|
var config_1 = require("./config");
|
|
5
5
|
Object.defineProperty(exports, "defineConfig", { enumerable: true, get: function () { return config_1.defineConfig; } });
|
|
6
6
|
Object.defineProperty(exports, "getConfig", { enumerable: true, get: function () { return config_1.getConfig; } });
|
|
@@ -46,5 +46,6 @@ Object.defineProperty(exports, "suggestOperationTitleResult", { enumerable: true
|
|
|
46
46
|
Object.defineProperty(exports, "formatTestTitle", { enumerable: true, get: function () { return catalog_1.formatTestTitle; } });
|
|
47
47
|
Object.defineProperty(exports, "isValidItCase", { enumerable: true, get: function () { return catalog_1.isValidItCase; } });
|
|
48
48
|
Object.defineProperty(exports, "suggestItCases", { enumerable: true, get: function () { return catalog_1.suggestItCases; } });
|
|
49
|
+
Object.defineProperty(exports, "docsScenarioClause", { enumerable: true, get: function () { return catalog_1.docsScenarioClause; } });
|
|
49
50
|
var install_1 = require("./cli/install");
|
|
50
51
|
Object.defineProperty(exports, "installDaxta", { enumerable: true, get: function () { return install_1.installDaxta; } });
|
package/dist/titles/scan.js
CHANGED
|
@@ -283,8 +283,8 @@ function printNamingFindings(report, paint) {
|
|
|
283
283
|
// spacer already from titles
|
|
284
284
|
}
|
|
285
285
|
console.log('');
|
|
286
|
-
console.log(` ${paint.yellow('!')} ${paint.bold(`${report.cases.length} it() case(s)
|
|
287
|
-
console.log(` ${paint.dim('
|
|
286
|
+
console.log(` ${paint.yellow('!')} ${paint.bold(`${report.cases.length} it() case(s) to rewrite`)} ${paint.dim('keep unique when-clause')}`);
|
|
287
|
+
console.log(` ${paint.dim('Positive')} ${paint.cyan('creates … when …')} ${paint.dim('errors')} ${paint.cyan('returns error when …')} ${paint.dim('docs = after when')}`);
|
|
288
288
|
for (const item of report.cases) {
|
|
289
289
|
console.log('');
|
|
290
290
|
console.log(` ${paint.cyan(item.file)}${paint.dim(`:${item.line}:${item.column}`)}`);
|