cgraphx 1.2.0 → 1.3.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/dist/.claude-template/hooks/precommit-check/precommit-check.cjs +90 -0
- package/dist/.claude-template/skills/cgraphx-guide/how-to-use.html +99 -78
- package/dist/.claude-template/skills/precommit-review/SKILL.md +50 -0
- package/dist/.claude-template/skills/run-api-test/SKILL.md +187 -0
- package/dist/.claude-template/skills/run-api-test/assets/template-test-report.md +103 -0
- package/dist/.claude-template/skills/run-api-test/assets/template-test-verify.jsonl +5 -0
- package/dist/.claude-template/skills/run-api-test/references/bru-run.md +60 -0
- package/dist/.claude-template/skills/run-api-test/references/db-verification.md +81 -0
- package/dist/.claude-template/skills/run-api-test/references/report-format.md +104 -0
- package/dist/.claude-template/skills/run-api-test/references/service-readiness.md +61 -0
- package/dist/.claude-template/skills/run-api-test/references/test-scope.md +64 -0
- package/dist/.claude-template/skills/write-api/SKILL.md +150 -0
- package/dist/.claude-template/skills/write-api/assets/template-api-spec.md +112 -0
- package/dist/.claude-template/skills/write-api/assets/template-request.bru +75 -0
- package/dist/.claude-template/skills/write-api/references/ai-prompts.md +133 -0
- package/dist/.claude-template/skills/write-api/references/api-spec-format.md +108 -0
- package/dist/.claude-template/skills/write-api/references/bru-format.md +144 -0
- package/dist/.claude-template/skills/write-api/references/collection-layout.md +81 -0
- package/dist/.claude-template/skills/write-api/references/environment-setup.md +105 -0
- package/dist/.claude-template/skills/write-api/references/interface-scope.md +74 -0
- package/dist/api-test/ai-fields.d.ts +37 -0
- package/dist/api-test/ai-fields.d.ts.map +1 -0
- package/dist/api-test/ai-fields.js +114 -0
- package/dist/api-test/ai-fields.js.map +1 -0
- package/dist/api-test/assemble.d.ts +76 -0
- package/dist/api-test/assemble.d.ts.map +1 -0
- package/dist/api-test/assemble.js +185 -0
- package/dist/api-test/assemble.js.map +1 -0
- package/dist/api-test/bru-cli-invoker.d.ts +72 -0
- package/dist/api-test/bru-cli-invoker.d.ts.map +1 -0
- package/dist/api-test/bru-cli-invoker.js +169 -0
- package/dist/api-test/bru-cli-invoker.js.map +1 -0
- package/dist/api-test/bru-report-parser.d.ts +24 -0
- package/dist/api-test/bru-report-parser.d.ts.map +1 -0
- package/dist/api-test/bru-report-parser.js +110 -0
- package/dist/api-test/bru-report-parser.js.map +1 -0
- package/dist/api-test/bru-runner.d.ts +101 -0
- package/dist/api-test/bru-runner.d.ts.map +1 -0
- package/dist/api-test/bru-runner.js +316 -0
- package/dist/api-test/bru-runner.js.map +1 -0
- package/dist/api-test/bru-writer.d.ts +52 -0
- package/dist/api-test/bru-writer.d.ts.map +1 -0
- package/dist/api-test/bru-writer.js +159 -0
- package/dist/api-test/bru-writer.js.map +1 -0
- package/dist/api-test/call-chain-extractor.d.ts +80 -0
- package/dist/api-test/call-chain-extractor.d.ts.map +1 -0
- package/dist/api-test/call-chain-extractor.js +179 -0
- package/dist/api-test/call-chain-extractor.js.map +1 -0
- package/dist/api-test/cli.d.ts +133 -0
- package/dist/api-test/cli.d.ts.map +1 -0
- package/dist/api-test/cli.js +1009 -0
- package/dist/api-test/cli.js.map +1 -0
- package/dist/api-test/config.d.ts +75 -0
- package/dist/api-test/config.d.ts.map +1 -0
- package/dist/api-test/config.js +406 -0
- package/dist/api-test/config.js.map +1 -0
- package/dist/api-test/db-query-cli.d.ts +51 -0
- package/dist/api-test/db-query-cli.d.ts.map +1 -0
- package/dist/api-test/db-query-cli.js +119 -0
- package/dist/api-test/db-query-cli.js.map +1 -0
- package/dist/api-test/enhance-prepare.d.ts +111 -0
- package/dist/api-test/enhance-prepare.d.ts.map +1 -0
- package/dist/api-test/enhance-prepare.js +425 -0
- package/dist/api-test/enhance-prepare.js.map +1 -0
- package/dist/api-test/enhance-write.d.ts +28 -0
- package/dist/api-test/enhance-write.d.ts.map +1 -0
- package/dist/api-test/enhance-write.js +145 -0
- package/dist/api-test/enhance-write.js.map +1 -0
- package/dist/api-test/errors.d.ts +48 -0
- package/dist/api-test/errors.d.ts.map +1 -0
- package/dist/api-test/errors.js +76 -0
- package/dist/api-test/errors.js.map +1 -0
- package/dist/api-test/field-extractor.d.ts +98 -0
- package/dist/api-test/field-extractor.d.ts.map +1 -0
- package/dist/api-test/field-extractor.js +327 -0
- package/dist/api-test/field-extractor.js.map +1 -0
- package/dist/api-test/impl-finder.d.ts +37 -0
- package/dist/api-test/impl-finder.d.ts.map +1 -0
- package/dist/api-test/impl-finder.js +54 -0
- package/dist/api-test/impl-finder.js.map +1 -0
- package/dist/api-test/index.d.ts +41 -0
- package/dist/api-test/index.d.ts.map +1 -0
- package/dist/api-test/index.js +124 -0
- package/dist/api-test/index.js.map +1 -0
- package/dist/api-test/java-parser.d.ts +89 -0
- package/dist/api-test/java-parser.d.ts.map +1 -0
- package/dist/api-test/java-parser.js +508 -0
- package/dist/api-test/java-parser.js.map +1 -0
- package/dist/api-test/md-writer.d.ts +49 -0
- package/dist/api-test/md-writer.d.ts.map +1 -0
- package/dist/api-test/md-writer.js +202 -0
- package/dist/api-test/md-writer.js.map +1 -0
- package/dist/api-test/parser-httpservice.d.ts +91 -0
- package/dist/api-test/parser-httpservice.d.ts.map +1 -0
- package/dist/api-test/parser-httpservice.js +271 -0
- package/dist/api-test/parser-httpservice.js.map +1 -0
- package/dist/api-test/report.d.ts +188 -0
- package/dist/api-test/report.d.ts.map +1 -0
- package/dist/api-test/report.js +522 -0
- package/dist/api-test/report.js.map +1 -0
- package/dist/api-test/snapshot.d.ts +26 -0
- package/dist/api-test/snapshot.d.ts.map +1 -0
- package/dist/api-test/snapshot.js +150 -0
- package/dist/api-test/snapshot.js.map +1 -0
- package/dist/api-test/test-history.d.ts +48 -0
- package/dist/api-test/test-history.d.ts.map +1 -0
- package/dist/api-test/test-history.js +122 -0
- package/dist/api-test/test-history.js.map +1 -0
- package/dist/api-test/types.d.ts +174 -0
- package/dist/api-test/types.d.ts.map +1 -0
- package/dist/api-test/types.js +13 -0
- package/dist/api-test/types.js.map +1 -0
- package/dist/api-test/verify-prepare.d.ts +30 -0
- package/dist/api-test/verify-prepare.d.ts.map +1 -0
- package/dist/api-test/verify-prepare.js +150 -0
- package/dist/api-test/verify-prepare.js.map +1 -0
- package/dist/api-test/verify-write.d.ts +31 -0
- package/dist/api-test/verify-write.d.ts.map +1 -0
- package/dist/api-test/verify-write.js +159 -0
- package/dist/api-test/verify-write.js.map +1 -0
- package/dist/dbquery/dump-schema.d.ts +46 -0
- package/dist/dbquery/dump-schema.d.ts.map +1 -0
- package/dist/dbquery/dump-schema.js +379 -0
- package/dist/dbquery/dump-schema.js.map +1 -0
- package/dist/installer/targets/claude.d.ts +15 -0
- package/dist/installer/targets/claude.d.ts.map +1 -1
- package/dist/installer/targets/claude.js +53 -0
- package/dist/installer/targets/claude.js.map +1 -1
- package/package.json +1 -1
- package/scripts/agent-eval/block-cgraphx-and-gitnexus-cli-hook.sh +0 -43
- package/scripts/agent-eval/block-cgraphx-cli-hook.sh +0 -32
- package/scripts/agent-eval/block-cgraphx-cli-settings.json +0 -16
- package/scripts/agent-eval/cli-vs-mcp-3arm.sh +0 -121
- package/scripts/agent-eval/multi-tool-eval.sh +0 -171
- package/scripts/agent-eval/parse-cli-vs-mcp.mjs +0 -232
- package/scripts/agent-eval/parse-multi-tool.mjs +0 -242
|
@@ -0,0 +1,327 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Analyze phase — reverse-engineer request fields from a method parameter.
|
|
4
|
+
*
|
|
5
|
+
* Spec contract (T-30): supports 4 parameter forms:
|
|
6
|
+
* a. Strong-typed VO (concrete class, not Object/Map/String/primitive)
|
|
7
|
+
* → locate VO via `findVoClass(allClasses, simpleName)`, read its fields.
|
|
8
|
+
* b. `Object` param → scan impl method body text for `reqVo.getXxx()` and
|
|
9
|
+
* `((XxxVo) reqVo).getXxx()`, reverse-engineer field names.
|
|
10
|
+
* c. `Map<K,V>` param → scan body text for `param.get("xxx")`,
|
|
11
|
+
* reverse-engineer field names.
|
|
12
|
+
* d. `String jsonString` param → scan body text for
|
|
13
|
+
* `JSON.parseObject(str, XxxVo.class)` (fastjson/fastjson2) or
|
|
14
|
+
* `objectMapper.readValue(str, XxxVo.class)` (Jackson), then walk case a
|
|
15
|
+
* for the discovered VO.
|
|
16
|
+
*
|
|
17
|
+
* Implementation note: extraction uses `method.bodyText` (regex) rather than
|
|
18
|
+
* the AST `body` node. The T-11 parser deletes the tree after extraction to
|
|
19
|
+
* release WASM heap, which would invalidate any retained AST node reference;
|
|
20
|
+
* `bodyText` is captured before the delete and stays valid. The task's
|
|
21
|
+
* "允许局部适配" clause permits this regex-based approach.
|
|
22
|
+
*
|
|
23
|
+
* Failure mode: when a param requires reverse-engineering (b/c/d) but the
|
|
24
|
+
* body yields zero fields, `extractFields` returns `[]` for the WHOLE method
|
|
25
|
+
* — the caller marks the endpoint `status: skip` with
|
|
26
|
+
* `skip_reason: param_no_strong_type`.
|
|
27
|
+
*
|
|
28
|
+
* Self-contained: depends only on `./java-parser` (ClassInfo, MethodSignature,
|
|
29
|
+
* findVoClass) + `./types` (Endpoint, Field). No imports from
|
|
30
|
+
* `src/extraction/` / `src/resolution/` / `src/db/`.
|
|
31
|
+
*
|
|
32
|
+
* Public surface:
|
|
33
|
+
* - `extractFields(endpoint, implInfo, method, allClasses)` — Promise<Field[]>
|
|
34
|
+
*/
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.__INTERNAL_FIELD_EXTRACTOR = void 0;
|
|
37
|
+
exports.extractFields = extractFields;
|
|
38
|
+
const java_parser_1 = require("./java-parser");
|
|
39
|
+
// ---------------------------------------------------------------------------
|
|
40
|
+
// Type classification
|
|
41
|
+
// ---------------------------------------------------------------------------
|
|
42
|
+
const PRIMITIVE_TYPES = new Set([
|
|
43
|
+
'int', 'long', 'short', 'byte', 'float', 'double', 'boolean', 'char',
|
|
44
|
+
'void',
|
|
45
|
+
'Integer', 'Long', 'Short', 'Byte', 'Float', 'Double', 'Boolean',
|
|
46
|
+
'Character', 'String', 'BigDecimal', 'BigInteger',
|
|
47
|
+
]);
|
|
48
|
+
function classifyParamType(type) {
|
|
49
|
+
const t = type.trim();
|
|
50
|
+
if (t === 'Object')
|
|
51
|
+
return 'object';
|
|
52
|
+
if (t === 'String')
|
|
53
|
+
return 'string';
|
|
54
|
+
if (t === 'Map' || t.startsWith('Map<') || t.startsWith('Map '))
|
|
55
|
+
return 'map';
|
|
56
|
+
if (PRIMITIVE_TYPES.has(t))
|
|
57
|
+
return 'other';
|
|
58
|
+
if (t.endsWith('[]'))
|
|
59
|
+
return 'other';
|
|
60
|
+
if (t.startsWith('List<') || t.startsWith('Set<') || t.startsWith('Collection<'))
|
|
61
|
+
return 'other';
|
|
62
|
+
return 'vo';
|
|
63
|
+
}
|
|
64
|
+
// ---------------------------------------------------------------------------
|
|
65
|
+
// Case a: strong-typed VO — read fields from the VO class
|
|
66
|
+
// ---------------------------------------------------------------------------
|
|
67
|
+
/**
|
|
68
|
+
* Build Field[] from a VO class's declared fields. Each field becomes a
|
|
69
|
+
* Field with `paramIndex` set, `javaType` from the VO, and `fixtureOnly=true`
|
|
70
|
+
* (the assemble phase will source actual values).
|
|
71
|
+
*
|
|
72
|
+
* Skips `serialVersionUID` (the conventional `static final long` field —
|
|
73
|
+
* T-11's ClassInfo.fields shape doesn't carry modifier info, so we filter
|
|
74
|
+
* by name).
|
|
75
|
+
*/
|
|
76
|
+
function fieldsFromVoClass(voClass, paramIndex) {
|
|
77
|
+
const out = [];
|
|
78
|
+
for (const f of voClass.fields) {
|
|
79
|
+
if (f.name === 'serialVersionUID')
|
|
80
|
+
continue;
|
|
81
|
+
out.push({
|
|
82
|
+
paramIndex,
|
|
83
|
+
name: f.name,
|
|
84
|
+
javaType: f.type,
|
|
85
|
+
sourceTable: null,
|
|
86
|
+
sourceColumn: null,
|
|
87
|
+
sourceFilter: null,
|
|
88
|
+
literal: null,
|
|
89
|
+
fixtureOnly: true,
|
|
90
|
+
required: true,
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
return out;
|
|
94
|
+
}
|
|
95
|
+
// ---------------------------------------------------------------------------
|
|
96
|
+
// Case b: Object param — scan bodyText for `reqVo.getXxx()` / `((Vo) reqVo).getXxx()`
|
|
97
|
+
// ---------------------------------------------------------------------------
|
|
98
|
+
/**
|
|
99
|
+
* Match `paramName.getXxx()` calls in the body text. Captures the `Xxx` part
|
|
100
|
+
* (camelCase, at least one char after `get`). Handles:
|
|
101
|
+
* - Direct: `reqVo.getCustId()`
|
|
102
|
+
* - Cast: `((XxxVo) reqVo).getRegionId()` or `(XxxVo) reqVo).getRegionId()`
|
|
103
|
+
*
|
|
104
|
+
* The cast form's leading `(` may or may not be doubled depending on whether
|
|
105
|
+
* the cast is wrapped in parens for method-call disambiguation.
|
|
106
|
+
*/
|
|
107
|
+
function extractFieldsFromObjectParam(bodyText, paramName, paramIndex) {
|
|
108
|
+
const out = [];
|
|
109
|
+
const seen = new Set();
|
|
110
|
+
// Pattern 1: direct `paramName.getXxx()` — word-boundary on paramName.
|
|
111
|
+
// Pattern 2: cast `((Type) paramName).getXxx()` — the `.getXxx` is on the
|
|
112
|
+
// closing paren of the cast, so we see `).getXxx` preceded by
|
|
113
|
+
// `paramName)`.
|
|
114
|
+
const directRe = new RegExp(`\\b${escapeRegExp(paramName)}\\.get([A-Z]\\w*)\\s*\\(`, 'g');
|
|
115
|
+
const castRe = new RegExp(`\\b${escapeRegExp(paramName)}\\)\\.get([A-Z]\\w*)\\s*\\(`, 'g');
|
|
116
|
+
for (const re of [directRe, castRe]) {
|
|
117
|
+
re.lastIndex = 0;
|
|
118
|
+
let m;
|
|
119
|
+
while ((m = re.exec(bodyText)) !== null) {
|
|
120
|
+
const fieldName = lowercaseFirst(m[1] ?? '');
|
|
121
|
+
if (!fieldName || seen.has(fieldName))
|
|
122
|
+
continue;
|
|
123
|
+
seen.add(fieldName);
|
|
124
|
+
out.push({
|
|
125
|
+
paramIndex,
|
|
126
|
+
name: fieldName,
|
|
127
|
+
javaType: 'String',
|
|
128
|
+
sourceTable: null,
|
|
129
|
+
sourceColumn: null,
|
|
130
|
+
sourceFilter: null,
|
|
131
|
+
literal: null,
|
|
132
|
+
fixtureOnly: true,
|
|
133
|
+
required: true,
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
return out;
|
|
138
|
+
}
|
|
139
|
+
// ---------------------------------------------------------------------------
|
|
140
|
+
// Case c: Map param — scan bodyText for `param.get("xxx")`
|
|
141
|
+
// ---------------------------------------------------------------------------
|
|
142
|
+
/**
|
|
143
|
+
* Match `paramName.get("xxx")` calls. The first argument must be a string
|
|
144
|
+
* literal. Returns deduped field names in document order.
|
|
145
|
+
*/
|
|
146
|
+
function extractFieldsFromMapParam(bodyText, paramName, paramIndex) {
|
|
147
|
+
const out = [];
|
|
148
|
+
const seen = new Set();
|
|
149
|
+
const re = new RegExp(`\\b${escapeRegExp(paramName)}\\.get\\(\\s*"([^"]+)"\\s*\\)`, 'g');
|
|
150
|
+
let m;
|
|
151
|
+
while ((m = re.exec(bodyText)) !== null) {
|
|
152
|
+
const fieldName = m[1] ?? '';
|
|
153
|
+
if (!fieldName || seen.has(fieldName))
|
|
154
|
+
continue;
|
|
155
|
+
seen.add(fieldName);
|
|
156
|
+
out.push({
|
|
157
|
+
paramIndex,
|
|
158
|
+
name: fieldName,
|
|
159
|
+
javaType: 'String',
|
|
160
|
+
sourceTable: null,
|
|
161
|
+
sourceColumn: null,
|
|
162
|
+
sourceFilter: null,
|
|
163
|
+
literal: null,
|
|
164
|
+
fixtureOnly: true,
|
|
165
|
+
required: true,
|
|
166
|
+
});
|
|
167
|
+
}
|
|
168
|
+
return out;
|
|
169
|
+
}
|
|
170
|
+
// ---------------------------------------------------------------------------
|
|
171
|
+
// Case d: String param — scan bodyText for JSON.parseObject / readValue
|
|
172
|
+
// ---------------------------------------------------------------------------
|
|
173
|
+
/** Regex for fastjson/fastjson2 `JSON.parseObject(str, XxxVo.class)`. */
|
|
174
|
+
const FASTJSON_PARSE_OBJECT_RE = /JSON\.parseObject\s*\(\s*\w+\s*,\s*([A-Za-z_]\w*(?:\.[A-Za-z_]\w*)*)\.class\s*\)/g;
|
|
175
|
+
/** Regex for Jackson `objectMapper.readValue(str, XxxVo.class)`. */
|
|
176
|
+
const JACKSON_READ_VALUE_RE = /\w+\.readValue\s*\(\s*\w+\s*,\s*([A-Za-z_]\w*(?:\.[A-Za-z_]\w*)*)\.class\s*\)/g;
|
|
177
|
+
/**
|
|
178
|
+
* Scan `bodyText` for fastjson/Jackson calls that target a `.class` arg.
|
|
179
|
+
* Returns the simple names of the discovered VO classes (deduped, in order).
|
|
180
|
+
*/
|
|
181
|
+
function discoverVoClassesFromJsonParse(bodyText) {
|
|
182
|
+
const out = [];
|
|
183
|
+
const seen = new Set();
|
|
184
|
+
for (const re of [FASTJSON_PARSE_OBJECT_RE, JACKSON_READ_VALUE_RE]) {
|
|
185
|
+
re.lastIndex = 0;
|
|
186
|
+
let m;
|
|
187
|
+
while ((m = re.exec(bodyText)) !== null) {
|
|
188
|
+
const fqnOrSimple = m[1] ?? '';
|
|
189
|
+
const simple = simpleNameOf(fqnOrSimple);
|
|
190
|
+
if (!seen.has(simple)) {
|
|
191
|
+
seen.add(simple);
|
|
192
|
+
out.push(simple);
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
return out;
|
|
197
|
+
}
|
|
198
|
+
// ---------------------------------------------------------------------------
|
|
199
|
+
// Public API
|
|
200
|
+
// ---------------------------------------------------------------------------
|
|
201
|
+
/**
|
|
202
|
+
* Extract Field[] for every parameter on `method`, using `implInfo` and
|
|
203
|
+
* `allClasses` to resolve VO classes. Returns `[]` (signaling failure) when
|
|
204
|
+
* any param requires reverse-engineering (Object/Map/String) but yields zero
|
|
205
|
+
* fields — the caller then marks the endpoint `skip` with
|
|
206
|
+
* `param_no_strong_type`.
|
|
207
|
+
*
|
|
208
|
+
* `endpoint` is taken in the signature per spec; it's not mutated.
|
|
209
|
+
*/
|
|
210
|
+
async function extractFields(endpoint, implInfo, method, allClasses) {
|
|
211
|
+
void endpoint;
|
|
212
|
+
void implInfo;
|
|
213
|
+
if (!method.parameters || method.parameters.length === 0) {
|
|
214
|
+
return [];
|
|
215
|
+
}
|
|
216
|
+
const collected = [];
|
|
217
|
+
let reverseEngineerFailed = false;
|
|
218
|
+
for (let i = 0; i < method.parameters.length; i++) {
|
|
219
|
+
const p = method.parameters[i];
|
|
220
|
+
if (!p)
|
|
221
|
+
continue;
|
|
222
|
+
const form = classifyParamType(p.type);
|
|
223
|
+
if (form === 'object') {
|
|
224
|
+
// Case b — scan bodyText for getXxx.
|
|
225
|
+
const fields = extractFieldsFromObjectParam(method.bodyText, p.name, i);
|
|
226
|
+
if (fields.length === 0) {
|
|
227
|
+
reverseEngineerFailed = true;
|
|
228
|
+
continue;
|
|
229
|
+
}
|
|
230
|
+
collected.push(...fields);
|
|
231
|
+
}
|
|
232
|
+
else if (form === 'map') {
|
|
233
|
+
// Case c — scan bodyText for get("xxx").
|
|
234
|
+
const fields = extractFieldsFromMapParam(method.bodyText, p.name, i);
|
|
235
|
+
if (fields.length === 0) {
|
|
236
|
+
reverseEngineerFailed = true;
|
|
237
|
+
continue;
|
|
238
|
+
}
|
|
239
|
+
collected.push(...fields);
|
|
240
|
+
}
|
|
241
|
+
else if (form === 'string') {
|
|
242
|
+
// Case d — scan bodyText for JSON.parseObject / readValue targeting .class.
|
|
243
|
+
const voNames = discoverVoClassesFromJsonParse(method.bodyText);
|
|
244
|
+
if (voNames.length === 0) {
|
|
245
|
+
reverseEngineerFailed = true;
|
|
246
|
+
continue;
|
|
247
|
+
}
|
|
248
|
+
let foundAny = false;
|
|
249
|
+
for (const voName of voNames) {
|
|
250
|
+
const voClass = await (0, java_parser_1.findVoClass)(allClasses, voName);
|
|
251
|
+
if (!voClass)
|
|
252
|
+
continue;
|
|
253
|
+
const fields = fieldsFromVoClass(voClass, i);
|
|
254
|
+
if (fields.length > 0) {
|
|
255
|
+
foundAny = true;
|
|
256
|
+
collected.push(...fields);
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
if (!foundAny) {
|
|
260
|
+
reverseEngineerFailed = true;
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
else if (form === 'vo') {
|
|
264
|
+
// Case a — strong-typed VO.
|
|
265
|
+
const voClass = await (0, java_parser_1.findVoClass)(allClasses, simpleNameOf(p.type));
|
|
266
|
+
if (!voClass) {
|
|
267
|
+
// VO class not in cache — treat as 'other' (single field, fixtureOnly).
|
|
268
|
+
collected.push(makePlaceholderField(i, p.name, p.type));
|
|
269
|
+
}
|
|
270
|
+
else {
|
|
271
|
+
const fields = fieldsFromVoClass(voClass, i);
|
|
272
|
+
if (fields.length === 0) {
|
|
273
|
+
collected.push(makePlaceholderField(i, p.name, p.type));
|
|
274
|
+
}
|
|
275
|
+
else {
|
|
276
|
+
collected.push(...fields);
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
else {
|
|
281
|
+
// 'other' — primitive / List / array. Single field, fixtureOnly.
|
|
282
|
+
collected.push(makePlaceholderField(i, p.name, p.type));
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
if (reverseEngineerFailed) {
|
|
286
|
+
return [];
|
|
287
|
+
}
|
|
288
|
+
return collected;
|
|
289
|
+
}
|
|
290
|
+
// ---------------------------------------------------------------------------
|
|
291
|
+
// Small string helpers
|
|
292
|
+
// ---------------------------------------------------------------------------
|
|
293
|
+
function lowercaseFirst(s) {
|
|
294
|
+
if (!s)
|
|
295
|
+
return s;
|
|
296
|
+
return s.charAt(0).toLowerCase() + s.slice(1);
|
|
297
|
+
}
|
|
298
|
+
function simpleNameOf(fqnOrSimple) {
|
|
299
|
+
return fqnOrSimple.split('.').pop() ?? fqnOrSimple;
|
|
300
|
+
}
|
|
301
|
+
function escapeRegExp(s) {
|
|
302
|
+
return s.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
|
303
|
+
}
|
|
304
|
+
function makePlaceholderField(paramIndex, name, javaType) {
|
|
305
|
+
return {
|
|
306
|
+
paramIndex,
|
|
307
|
+
name,
|
|
308
|
+
javaType,
|
|
309
|
+
sourceTable: null,
|
|
310
|
+
sourceColumn: null,
|
|
311
|
+
sourceFilter: null,
|
|
312
|
+
literal: null,
|
|
313
|
+
fixtureOnly: true,
|
|
314
|
+
required: true,
|
|
315
|
+
};
|
|
316
|
+
}
|
|
317
|
+
// Internal helpers re-exported for tests.
|
|
318
|
+
exports.__INTERNAL_FIELD_EXTRACTOR = {
|
|
319
|
+
classifyParamType,
|
|
320
|
+
extractFieldsFromObjectParam,
|
|
321
|
+
extractFieldsFromMapParam,
|
|
322
|
+
discoverVoClassesFromJsonParse,
|
|
323
|
+
fieldsFromVoClass,
|
|
324
|
+
lowercaseFirst,
|
|
325
|
+
escapeRegExp,
|
|
326
|
+
};
|
|
327
|
+
//# sourceMappingURL=field-extractor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"field-extractor.js","sourceRoot":"","sources":["../../src/api-test/field-extractor.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;;;AA0NH,sCAiFC;AAxSD,+CAA4C;AAG5C,8EAA8E;AAC9E,sBAAsB;AACtB,8EAA8E;AAE9E,MAAM,eAAe,GAAG,IAAI,GAAG,CAAC;IAC9B,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM;IACpE,MAAM;IACN,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS;IAChE,WAAW,EAAE,QAAQ,EAAE,YAAY,EAAE,YAAY;CAClD,CAAC,CAAC;AAYH,SAAS,iBAAiB,CAAC,IAAY;IACrC,MAAM,CAAC,GAAG,IAAI,CAAC,IAAI,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8EAA8E;AAC9E,uBAAuB;AACvB,8EAA8E;AAE9E,SAAS,cAAc,CAAC,CAAS;IAC/B,IAAI,CAAC,CAAC;QAAE,OAAO,CAAC,CAAC;IACjB,OAAO,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;AAChD,CAAC;AAED,SAAS,YAAY,CAAC,WAAmB;IACvC,OAAO,WAAW,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,IAAI,WAAW,CAAC;AACrD,CAAC;AAED,SAAS,YAAY,CAAC,CAAS;IAC7B,OAAO,CAAC,CAAC,OAAO,CAAC,qBAAqB,EAAE,MAAM,CAAC,CAAC;AAClD,CAAC;AAED,SAAS,oBAAoB,CAAC,UAAkB,EAAE,IAAY,EAAE,QAAgB;IAC9E,OAAO;QACL,UAAU;QACV,IAAI;QACJ,QAAQ;QACR,WAAW,EAAE,IAAI;QACjB,YAAY,EAAE,IAAI;QAClB,YAAY,EAAE,IAAI;QAClB,OAAO,EAAE,IAAI;QACb,WAAW,EAAE,IAAI;QACjB,QAAQ,EAAE,IAAI;KACf,CAAC;AACJ,CAAC;AAED,0CAA0C;AAC7B,QAAA,0BAA0B,GAAG;IACxC,iBAAiB;IACjB,4BAA4B;IAC5B,yBAAyB;IACzB,8BAA8B;IAC9B,iBAAiB;IACjB,cAAc;IACd,YAAY;CACb,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Analyze phase — locate the impl class for a `@Center` interface.
|
|
3
|
+
*
|
|
4
|
+
* Spec contract (T-30): given an interface FQN and the project-wide
|
|
5
|
+
* `allClasses` cache, return the `@Service`-annotated class that declares
|
|
6
|
+
* `implements <interfaceFqn>` (simple-name match). Returns `null` when no
|
|
7
|
+
* implementation exists — the caller (cli `analyze` action) then marks the
|
|
8
|
+
* endpoint `status: skip` with `skip_reason: impl_not_found`.
|
|
9
|
+
*
|
|
10
|
+
* Self-contained: depends only on `./java-parser` (ClassInfo). No imports
|
|
11
|
+
* from `src/extraction/` / `src/resolution/` / `src/db/`.
|
|
12
|
+
*
|
|
13
|
+
* Public surface:
|
|
14
|
+
* - `findImplFor(interfaceFqn, allClasses)` — Promise<ClassInfo | null>
|
|
15
|
+
*/
|
|
16
|
+
import type { ClassInfo } from './java-parser';
|
|
17
|
+
/** Simple (last segment) name of a possibly-qualified identifier. */
|
|
18
|
+
declare function simpleNameOf(fqnOrSimple: string): string;
|
|
19
|
+
/**
|
|
20
|
+
* Find the impl class for `interfaceFqn` in `allClasses`.
|
|
21
|
+
*
|
|
22
|
+
* Match rule: a non-interface class whose `implementedInterfaces` list
|
|
23
|
+
* contains an entry whose simple name matches the simple name of
|
|
24
|
+
* `interfaceFqn`. (Imports were already resolved at parse time, but a
|
|
25
|
+
* simple-name match is robust to unresolved FQNs too.)
|
|
26
|
+
*
|
|
27
|
+
* Returns the first match, or `null` if none. When multiple impls exist
|
|
28
|
+
* (rare in hx — one `@Service` per interface), the first one wins; a future
|
|
29
|
+
* task can disambiguate by `@Service` value if needed.
|
|
30
|
+
*/
|
|
31
|
+
export declare function findImplFor(interfaceFqn: string, allClasses: ClassInfo[]): Promise<ClassInfo | null>;
|
|
32
|
+
/** Internal helpers re-exported for tests. */
|
|
33
|
+
export declare const __INTERNAL_IMPL_FINDER: {
|
|
34
|
+
simpleNameOf: typeof simpleNameOf;
|
|
35
|
+
};
|
|
36
|
+
export {};
|
|
37
|
+
//# sourceMappingURL=impl-finder.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"impl-finder.d.ts","sourceRoot":"","sources":["../../src/api-test/impl-finder.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE/C,qEAAqE;AACrE,iBAAS,YAAY,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAGjD;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,WAAW,CAC/B,YAAY,EAAE,MAAM,EACpB,UAAU,EAAE,SAAS,EAAE,GACtB,OAAO,CAAC,SAAS,GAAG,IAAI,CAAC,CAW3B;AAED,8CAA8C;AAC9C,eAAO,MAAM,sBAAsB;;CAElC,CAAC"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Analyze phase — locate the impl class for a `@Center` interface.
|
|
4
|
+
*
|
|
5
|
+
* Spec contract (T-30): given an interface FQN and the project-wide
|
|
6
|
+
* `allClasses` cache, return the `@Service`-annotated class that declares
|
|
7
|
+
* `implements <interfaceFqn>` (simple-name match). Returns `null` when no
|
|
8
|
+
* implementation exists — the caller (cli `analyze` action) then marks the
|
|
9
|
+
* endpoint `status: skip` with `skip_reason: impl_not_found`.
|
|
10
|
+
*
|
|
11
|
+
* Self-contained: depends only on `./java-parser` (ClassInfo). No imports
|
|
12
|
+
* from `src/extraction/` / `src/resolution/` / `src/db/`.
|
|
13
|
+
*
|
|
14
|
+
* Public surface:
|
|
15
|
+
* - `findImplFor(interfaceFqn, allClasses)` — Promise<ClassInfo | null>
|
|
16
|
+
*/
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.__INTERNAL_IMPL_FINDER = void 0;
|
|
19
|
+
exports.findImplFor = findImplFor;
|
|
20
|
+
/** Simple (last segment) name of a possibly-qualified identifier. */
|
|
21
|
+
function simpleNameOf(fqnOrSimple) {
|
|
22
|
+
const last = fqnOrSimple.split('.').pop();
|
|
23
|
+
return last;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Find the impl class for `interfaceFqn` in `allClasses`.
|
|
27
|
+
*
|
|
28
|
+
* Match rule: a non-interface class whose `implementedInterfaces` list
|
|
29
|
+
* contains an entry whose simple name matches the simple name of
|
|
30
|
+
* `interfaceFqn`. (Imports were already resolved at parse time, but a
|
|
31
|
+
* simple-name match is robust to unresolved FQNs too.)
|
|
32
|
+
*
|
|
33
|
+
* Returns the first match, or `null` if none. When multiple impls exist
|
|
34
|
+
* (rare in hx — one `@Service` per interface), the first one wins; a future
|
|
35
|
+
* task can disambiguate by `@Service` value if needed.
|
|
36
|
+
*/
|
|
37
|
+
async function findImplFor(interfaceFqn, allClasses) {
|
|
38
|
+
const targetSimple = simpleNameOf(interfaceFqn);
|
|
39
|
+
for (const cls of allClasses) {
|
|
40
|
+
if (cls.isInterface)
|
|
41
|
+
continue;
|
|
42
|
+
for (const impl of cls.implementedInterfaces) {
|
|
43
|
+
if (simpleNameOf(impl) === targetSimple) {
|
|
44
|
+
return cls;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
return null;
|
|
49
|
+
}
|
|
50
|
+
/** Internal helpers re-exported for tests. */
|
|
51
|
+
exports.__INTERNAL_IMPL_FINDER = {
|
|
52
|
+
simpleNameOf,
|
|
53
|
+
};
|
|
54
|
+
//# sourceMappingURL=impl-finder.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"impl-finder.js","sourceRoot":"","sources":["../../src/api-test/impl-finder.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAsBH,kCAcC;AAhCD,qEAAqE;AACrE,SAAS,YAAY,CAAC,WAAmB;IACvC,MAAM,IAAI,GAAG,WAAW,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,EAAG,CAAC;IAC3C,OAAO,IAAI,CAAC;AACd,CAAC;AAED;;;;;;;;;;;GAWG;AACI,KAAK,UAAU,WAAW,CAC/B,YAAoB,EACpB,UAAuB;IAEvB,MAAM,YAAY,GAAG,YAAY,CAAC,YAAY,CAAC,CAAC;IAChD,KAAK,MAAM,GAAG,IAAI,UAAU,EAAE,CAAC;QAC7B,IAAI,GAAG,CAAC,WAAW;YAAE,SAAS;QAC9B,KAAK,MAAM,IAAI,IAAI,GAAG,CAAC,qBAAqB,EAAE,CAAC;YAC7C,IAAI,YAAY,CAAC,IAAI,CAAC,KAAK,YAAY,EAAE,CAAC;gBACxC,OAAO,GAAG,CAAC;YACb,CAAC;QACH,CAAC;IACH,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAED,8CAA8C;AACjC,QAAA,sBAAsB,GAAG;IACpC,YAAY;CACb,CAAC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Public facade for the api-test subsystem.
|
|
3
|
+
*
|
|
4
|
+
* External callers (the CLI in T-20, optionally MCP tools later) MUST go
|
|
5
|
+
* through this module — never reach into `config.ts` / `types.ts` directly.
|
|
6
|
+
* Spec §12 contract: self-contained, no imports from `src/extraction/` /
|
|
7
|
+
* `src/resolution/` / `src/db/`.
|
|
8
|
+
*
|
|
9
|
+
* Only the config layer is wired up in T-10. Subsequent tasks (T-11 parser,
|
|
10
|
+
* T-30 analyzer, T-50 runner, T-60 report) will re-export their public
|
|
11
|
+
* surfaces from here as they land.
|
|
12
|
+
*/
|
|
13
|
+
export { loadConfig, loadProfile, loadFixtures, DEFAULT_CONFIG, resolveApiTestDirPath, __INTERNAL, } from './config';
|
|
14
|
+
export type { Endpoint, Field, TestRun, ApiTestConfig, ApiTestProfile, FixtureEntry, Fixtures, } from './types';
|
|
15
|
+
export { ConfigError, ParseError, BrunoCliError, ImplNotFoundError, } from './errors';
|
|
16
|
+
export { initJavaParser, parseJavaFile, findClassesByAnnotation, findImplementationsOf, findVoClass, } from './java-parser';
|
|
17
|
+
export type { Annotation, MethodSignature, ClassInfo, } from './java-parser';
|
|
18
|
+
export { scanEndpoints } from './parser-httpservice';
|
|
19
|
+
export { renderBru, writeBru, bruFileName, serviceDirName as bruServiceDirName } from './bru-writer';
|
|
20
|
+
export { renderMd, writeMd, mdFileName, camelToSnake } from './md-writer';
|
|
21
|
+
export { registerApiTestCommands } from './cli';
|
|
22
|
+
export { findImplFor } from './impl-finder';
|
|
23
|
+
export { extractFields } from './field-extractor';
|
|
24
|
+
export { extractCallChain } from './call-chain-extractor';
|
|
25
|
+
export { assembleEndpoint, runDbQueryCli, writeBruBody, replaceBodyJsonBlock, type AssembleResult, type DbQueryResult, } from './assemble';
|
|
26
|
+
export { __INTERNAL_DB_QUERY_CLI } from './db-query-cli';
|
|
27
|
+
export { runBrunoCollection, type BrunoRunResult, } from './bru-runner';
|
|
28
|
+
export { invokeBrunoCli, detectBrunoCli, resolveCollectionDir, type BrunoCliInvocation, type InvokeBrunoCliOptions, } from './bru-cli-invoker';
|
|
29
|
+
export { __INTERNAL_BRU_CLI_INVOKER } from './bru-cli-invoker';
|
|
30
|
+
export { __INTERNAL_BRU_RUNNER } from './bru-runner';
|
|
31
|
+
export { appendTestRun, appendTestRunSync, runsDirPath, __INTERNAL_TEST_HISTORY, } from './test-history';
|
|
32
|
+
export { generateReport, reportFilePath, listEndpoints, renderListTable, parseFrontmatter, parseJsonl, readRunsForDate, readAllEndpoints, readLatestRunByEndpoint, aggregateReport, percentile, renderReport, renderTable, __INTERNAL_REPORT, type EndpointMd, type ReportData, type ListFilters, type ListRow, } from './report';
|
|
33
|
+
export { ReportError } from './errors';
|
|
34
|
+
export { enhancePrepare, __INTERNAL_ENHANCE_PREPARE, } from './enhance-prepare';
|
|
35
|
+
export { AI_FIELDS_SUBDIR, aiFieldsFilePath, readAiFields, writeAiFields, __INTERNAL_AI_FIELDS, } from './ai-fields';
|
|
36
|
+
export { enhanceWrite, __INTERNAL_ENHANCE_WRITE, } from './enhance-write';
|
|
37
|
+
export { snapshot, __INTERNAL_SNAPSHOT, } from './snapshot';
|
|
38
|
+
export { verifyPrepare, __INTERNAL_VERIFY_PREPARE, } from './verify-prepare';
|
|
39
|
+
export { verifyWrite, __INTERNAL_VERIFY_WRITE, } from './verify-write';
|
|
40
|
+
export { parseBruReport, type BruReportEntry, } from './bru-report-parser';
|
|
41
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|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.
|
|
4
|
+
*
|
|
5
|
+
* External callers (the CLI in T-20, optionally MCP tools later) MUST go
|
|
6
|
+
* through this module — never reach into `config.ts` / `types.ts` directly.
|
|
7
|
+
* Spec §12 contract: self-contained, no imports from `src/extraction/` /
|
|
8
|
+
* `src/resolution/` / `src/db/`.
|
|
9
|
+
*
|
|
10
|
+
* Only the config layer is wired up in T-10. Subsequent tasks (T-11 parser,
|
|
11
|
+
* T-30 analyzer, T-50 runner, T-60 report) will re-export their public
|
|
12
|
+
* surfaces from here as they land.
|
|
13
|
+
*/
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.readRunsForDate = exports.parseJsonl = exports.parseFrontmatter = exports.renderListTable = exports.listEndpoints = exports.reportFilePath = exports.generateReport = exports.__INTERNAL_TEST_HISTORY = exports.runsDirPath = exports.appendTestRunSync = exports.appendTestRun = exports.__INTERNAL_BRU_RUNNER = exports.__INTERNAL_BRU_CLI_INVOKER = exports.resolveCollectionDir = exports.detectBrunoCli = exports.invokeBrunoCli = exports.runBrunoCollection = exports.__INTERNAL_DB_QUERY_CLI = exports.replaceBodyJsonBlock = exports.writeBruBody = exports.runDbQueryCli = exports.assembleEndpoint = exports.extractCallChain = exports.extractFields = exports.findImplFor = exports.registerApiTestCommands = exports.camelToSnake = exports.mdFileName = exports.writeMd = exports.renderMd = exports.bruServiceDirName = exports.bruFileName = exports.writeBru = exports.renderBru = exports.scanEndpoints = exports.findVoClass = exports.findImplementationsOf = exports.findClassesByAnnotation = exports.parseJavaFile = exports.initJavaParser = exports.ImplNotFoundError = exports.BrunoCliError = exports.ParseError = exports.ConfigError = exports.__INTERNAL = exports.resolveApiTestDirPath = exports.DEFAULT_CONFIG = exports.loadFixtures = exports.loadProfile = exports.loadConfig = void 0;
|
|
16
|
+
exports.parseBruReport = exports.__INTERNAL_VERIFY_WRITE = exports.verifyWrite = exports.__INTERNAL_VERIFY_PREPARE = exports.verifyPrepare = exports.__INTERNAL_SNAPSHOT = exports.snapshot = exports.__INTERNAL_ENHANCE_WRITE = exports.enhanceWrite = exports.__INTERNAL_AI_FIELDS = exports.writeAiFields = exports.readAiFields = exports.aiFieldsFilePath = exports.AI_FIELDS_SUBDIR = exports.__INTERNAL_ENHANCE_PREPARE = exports.enhancePrepare = exports.ReportError = exports.__INTERNAL_REPORT = exports.renderTable = exports.renderReport = exports.percentile = exports.aggregateReport = exports.readLatestRunByEndpoint = exports.readAllEndpoints = void 0;
|
|
17
|
+
var config_1 = require("./config");
|
|
18
|
+
Object.defineProperty(exports, "loadConfig", { enumerable: true, get: function () { return config_1.loadConfig; } });
|
|
19
|
+
Object.defineProperty(exports, "loadProfile", { enumerable: true, get: function () { return config_1.loadProfile; } });
|
|
20
|
+
Object.defineProperty(exports, "loadFixtures", { enumerable: true, get: function () { return config_1.loadFixtures; } });
|
|
21
|
+
Object.defineProperty(exports, "DEFAULT_CONFIG", { enumerable: true, get: function () { return config_1.DEFAULT_CONFIG; } });
|
|
22
|
+
Object.defineProperty(exports, "resolveApiTestDirPath", { enumerable: true, get: function () { return config_1.resolveApiTestDirPath; } });
|
|
23
|
+
Object.defineProperty(exports, "__INTERNAL", { enumerable: true, get: function () { return config_1.__INTERNAL; } });
|
|
24
|
+
var errors_1 = require("./errors");
|
|
25
|
+
Object.defineProperty(exports, "ConfigError", { enumerable: true, get: function () { return errors_1.ConfigError; } });
|
|
26
|
+
Object.defineProperty(exports, "ParseError", { enumerable: true, get: function () { return errors_1.ParseError; } });
|
|
27
|
+
Object.defineProperty(exports, "BrunoCliError", { enumerable: true, get: function () { return errors_1.BrunoCliError; } });
|
|
28
|
+
Object.defineProperty(exports, "ImplNotFoundError", { enumerable: true, get: function () { return errors_1.ImplNotFoundError; } });
|
|
29
|
+
// T-11: self-contained tree-sitter Java parser
|
|
30
|
+
var java_parser_1 = require("./java-parser");
|
|
31
|
+
Object.defineProperty(exports, "initJavaParser", { enumerable: true, get: function () { return java_parser_1.initJavaParser; } });
|
|
32
|
+
Object.defineProperty(exports, "parseJavaFile", { enumerable: true, get: function () { return java_parser_1.parseJavaFile; } });
|
|
33
|
+
Object.defineProperty(exports, "findClassesByAnnotation", { enumerable: true, get: function () { return java_parser_1.findClassesByAnnotation; } });
|
|
34
|
+
Object.defineProperty(exports, "findImplementationsOf", { enumerable: true, get: function () { return java_parser_1.findImplementationsOf; } });
|
|
35
|
+
Object.defineProperty(exports, "findVoClass", { enumerable: true, get: function () { return java_parser_1.findVoClass; } });
|
|
36
|
+
// T-20: scan phase
|
|
37
|
+
var parser_httpservice_1 = require("./parser-httpservice");
|
|
38
|
+
Object.defineProperty(exports, "scanEndpoints", { enumerable: true, get: function () { return parser_httpservice_1.scanEndpoints; } });
|
|
39
|
+
var bru_writer_1 = require("./bru-writer");
|
|
40
|
+
Object.defineProperty(exports, "renderBru", { enumerable: true, get: function () { return bru_writer_1.renderBru; } });
|
|
41
|
+
Object.defineProperty(exports, "writeBru", { enumerable: true, get: function () { return bru_writer_1.writeBru; } });
|
|
42
|
+
Object.defineProperty(exports, "bruFileName", { enumerable: true, get: function () { return bru_writer_1.bruFileName; } });
|
|
43
|
+
Object.defineProperty(exports, "bruServiceDirName", { enumerable: true, get: function () { return bru_writer_1.serviceDirName; } });
|
|
44
|
+
var md_writer_1 = require("./md-writer");
|
|
45
|
+
Object.defineProperty(exports, "renderMd", { enumerable: true, get: function () { return md_writer_1.renderMd; } });
|
|
46
|
+
Object.defineProperty(exports, "writeMd", { enumerable: true, get: function () { return md_writer_1.writeMd; } });
|
|
47
|
+
Object.defineProperty(exports, "mdFileName", { enumerable: true, get: function () { return md_writer_1.mdFileName; } });
|
|
48
|
+
Object.defineProperty(exports, "camelToSnake", { enumerable: true, get: function () { return md_writer_1.camelToSnake; } });
|
|
49
|
+
var cli_1 = require("./cli");
|
|
50
|
+
Object.defineProperty(exports, "registerApiTestCommands", { enumerable: true, get: function () { return cli_1.registerApiTestCommands; } });
|
|
51
|
+
// T-30: analyze phase
|
|
52
|
+
var impl_finder_1 = require("./impl-finder");
|
|
53
|
+
Object.defineProperty(exports, "findImplFor", { enumerable: true, get: function () { return impl_finder_1.findImplFor; } });
|
|
54
|
+
var field_extractor_1 = require("./field-extractor");
|
|
55
|
+
Object.defineProperty(exports, "extractFields", { enumerable: true, get: function () { return field_extractor_1.extractFields; } });
|
|
56
|
+
var call_chain_extractor_1 = require("./call-chain-extractor");
|
|
57
|
+
Object.defineProperty(exports, "extractCallChain", { enumerable: true, get: function () { return call_chain_extractor_1.extractCallChain; } });
|
|
58
|
+
// T-40: assemble phase
|
|
59
|
+
var assemble_1 = require("./assemble");
|
|
60
|
+
Object.defineProperty(exports, "assembleEndpoint", { enumerable: true, get: function () { return assemble_1.assembleEndpoint; } });
|
|
61
|
+
Object.defineProperty(exports, "runDbQueryCli", { enumerable: true, get: function () { return assemble_1.runDbQueryCli; } });
|
|
62
|
+
Object.defineProperty(exports, "writeBruBody", { enumerable: true, get: function () { return assemble_1.writeBruBody; } });
|
|
63
|
+
Object.defineProperty(exports, "replaceBodyJsonBlock", { enumerable: true, get: function () { return assemble_1.replaceBodyJsonBlock; } });
|
|
64
|
+
var db_query_cli_1 = require("./db-query-cli");
|
|
65
|
+
Object.defineProperty(exports, "__INTERNAL_DB_QUERY_CLI", { enumerable: true, get: function () { return db_query_cli_1.__INTERNAL_DB_QUERY_CLI; } });
|
|
66
|
+
// T-50: run phase
|
|
67
|
+
var bru_runner_1 = require("./bru-runner");
|
|
68
|
+
Object.defineProperty(exports, "runBrunoCollection", { enumerable: true, get: function () { return bru_runner_1.runBrunoCollection; } });
|
|
69
|
+
var bru_cli_invoker_1 = require("./bru-cli-invoker");
|
|
70
|
+
Object.defineProperty(exports, "invokeBrunoCli", { enumerable: true, get: function () { return bru_cli_invoker_1.invokeBrunoCli; } });
|
|
71
|
+
Object.defineProperty(exports, "detectBrunoCli", { enumerable: true, get: function () { return bru_cli_invoker_1.detectBrunoCli; } });
|
|
72
|
+
Object.defineProperty(exports, "resolveCollectionDir", { enumerable: true, get: function () { return bru_cli_invoker_1.resolveCollectionDir; } });
|
|
73
|
+
var bru_cli_invoker_2 = require("./bru-cli-invoker");
|
|
74
|
+
Object.defineProperty(exports, "__INTERNAL_BRU_CLI_INVOKER", { enumerable: true, get: function () { return bru_cli_invoker_2.__INTERNAL_BRU_CLI_INVOKER; } });
|
|
75
|
+
var bru_runner_2 = require("./bru-runner");
|
|
76
|
+
Object.defineProperty(exports, "__INTERNAL_BRU_RUNNER", { enumerable: true, get: function () { return bru_runner_2.__INTERNAL_BRU_RUNNER; } });
|
|
77
|
+
var test_history_1 = require("./test-history");
|
|
78
|
+
Object.defineProperty(exports, "appendTestRun", { enumerable: true, get: function () { return test_history_1.appendTestRun; } });
|
|
79
|
+
Object.defineProperty(exports, "appendTestRunSync", { enumerable: true, get: function () { return test_history_1.appendTestRunSync; } });
|
|
80
|
+
Object.defineProperty(exports, "runsDirPath", { enumerable: true, get: function () { return test_history_1.runsDirPath; } });
|
|
81
|
+
Object.defineProperty(exports, "__INTERNAL_TEST_HISTORY", { enumerable: true, get: function () { return test_history_1.__INTERNAL_TEST_HISTORY; } });
|
|
82
|
+
// T-60: report + list phase
|
|
83
|
+
var report_1 = require("./report");
|
|
84
|
+
Object.defineProperty(exports, "generateReport", { enumerable: true, get: function () { return report_1.generateReport; } });
|
|
85
|
+
Object.defineProperty(exports, "reportFilePath", { enumerable: true, get: function () { return report_1.reportFilePath; } });
|
|
86
|
+
Object.defineProperty(exports, "listEndpoints", { enumerable: true, get: function () { return report_1.listEndpoints; } });
|
|
87
|
+
Object.defineProperty(exports, "renderListTable", { enumerable: true, get: function () { return report_1.renderListTable; } });
|
|
88
|
+
Object.defineProperty(exports, "parseFrontmatter", { enumerable: true, get: function () { return report_1.parseFrontmatter; } });
|
|
89
|
+
Object.defineProperty(exports, "parseJsonl", { enumerable: true, get: function () { return report_1.parseJsonl; } });
|
|
90
|
+
Object.defineProperty(exports, "readRunsForDate", { enumerable: true, get: function () { return report_1.readRunsForDate; } });
|
|
91
|
+
Object.defineProperty(exports, "readAllEndpoints", { enumerable: true, get: function () { return report_1.readAllEndpoints; } });
|
|
92
|
+
Object.defineProperty(exports, "readLatestRunByEndpoint", { enumerable: true, get: function () { return report_1.readLatestRunByEndpoint; } });
|
|
93
|
+
Object.defineProperty(exports, "aggregateReport", { enumerable: true, get: function () { return report_1.aggregateReport; } });
|
|
94
|
+
Object.defineProperty(exports, "percentile", { enumerable: true, get: function () { return report_1.percentile; } });
|
|
95
|
+
Object.defineProperty(exports, "renderReport", { enumerable: true, get: function () { return report_1.renderReport; } });
|
|
96
|
+
Object.defineProperty(exports, "renderTable", { enumerable: true, get: function () { return report_1.renderTable; } });
|
|
97
|
+
Object.defineProperty(exports, "__INTERNAL_REPORT", { enumerable: true, get: function () { return report_1.__INTERNAL_REPORT; } });
|
|
98
|
+
var errors_2 = require("./errors");
|
|
99
|
+
Object.defineProperty(exports, "ReportError", { enumerable: true, get: function () { return errors_2.ReportError; } });
|
|
100
|
+
// Layer 2 (AI enhance) — L-T-10
|
|
101
|
+
var enhance_prepare_1 = require("./enhance-prepare");
|
|
102
|
+
Object.defineProperty(exports, "enhancePrepare", { enumerable: true, get: function () { return enhance_prepare_1.enhancePrepare; } });
|
|
103
|
+
Object.defineProperty(exports, "__INTERNAL_ENHANCE_PREPARE", { enumerable: true, get: function () { return enhance_prepare_1.__INTERNAL_ENHANCE_PREPARE; } });
|
|
104
|
+
var ai_fields_1 = require("./ai-fields");
|
|
105
|
+
Object.defineProperty(exports, "AI_FIELDS_SUBDIR", { enumerable: true, get: function () { return ai_fields_1.AI_FIELDS_SUBDIR; } });
|
|
106
|
+
Object.defineProperty(exports, "aiFieldsFilePath", { enumerable: true, get: function () { return ai_fields_1.aiFieldsFilePath; } });
|
|
107
|
+
Object.defineProperty(exports, "readAiFields", { enumerable: true, get: function () { return ai_fields_1.readAiFields; } });
|
|
108
|
+
Object.defineProperty(exports, "writeAiFields", { enumerable: true, get: function () { return ai_fields_1.writeAiFields; } });
|
|
109
|
+
Object.defineProperty(exports, "__INTERNAL_AI_FIELDS", { enumerable: true, get: function () { return ai_fields_1.__INTERNAL_AI_FIELDS; } });
|
|
110
|
+
var enhance_write_1 = require("./enhance-write");
|
|
111
|
+
Object.defineProperty(exports, "enhanceWrite", { enumerable: true, get: function () { return enhance_write_1.enhanceWrite; } });
|
|
112
|
+
Object.defineProperty(exports, "__INTERNAL_ENHANCE_WRITE", { enumerable: true, get: function () { return enhance_write_1.__INTERNAL_ENHANCE_WRITE; } });
|
|
113
|
+
var snapshot_1 = require("./snapshot");
|
|
114
|
+
Object.defineProperty(exports, "snapshot", { enumerable: true, get: function () { return snapshot_1.snapshot; } });
|
|
115
|
+
Object.defineProperty(exports, "__INTERNAL_SNAPSHOT", { enumerable: true, get: function () { return snapshot_1.__INTERNAL_SNAPSHOT; } });
|
|
116
|
+
var verify_prepare_1 = require("./verify-prepare");
|
|
117
|
+
Object.defineProperty(exports, "verifyPrepare", { enumerable: true, get: function () { return verify_prepare_1.verifyPrepare; } });
|
|
118
|
+
Object.defineProperty(exports, "__INTERNAL_VERIFY_PREPARE", { enumerable: true, get: function () { return verify_prepare_1.__INTERNAL_VERIFY_PREPARE; } });
|
|
119
|
+
var verify_write_1 = require("./verify-write");
|
|
120
|
+
Object.defineProperty(exports, "verifyWrite", { enumerable: true, get: function () { return verify_write_1.verifyWrite; } });
|
|
121
|
+
Object.defineProperty(exports, "__INTERNAL_VERIFY_WRITE", { enumerable: true, get: function () { return verify_write_1.__INTERNAL_VERIFY_WRITE; } });
|
|
122
|
+
var bru_report_parser_1 = require("./bru-report-parser");
|
|
123
|
+
Object.defineProperty(exports, "parseBruReport", { enumerable: true, get: function () { return bru_report_parser_1.parseBruReport; } });
|
|
124
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/api-test/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;GAWG;;;;AAEH,mCAOk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