cgraphx 1.2.0 → 1.3.1
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 +100 -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 +72 -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 +139 -0
- package/dist/.claude-template/skills/write-api/references/collection-layout.md +90 -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,89 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Self-contained tree-sitter Java parser for the api-test subsystem.
|
|
3
|
+
*
|
|
4
|
+
* Spec contract (T-11): this module is SELF-CONTAINED — it does NOT import
|
|
5
|
+
* from `src/extraction/` or `src/resolution/`. It reuses only the
|
|
6
|
+
* `tree-sitter-java.wasm` grammar file from the `tree-sitter-wasms` npm
|
|
7
|
+
* dependency (the same one the main indexer uses), loaded at runtime via
|
|
8
|
+
* `require.resolve`. No calls to `codegraph_explore` MCP or `CodeGraph` API.
|
|
9
|
+
*
|
|
10
|
+
* Public surface:
|
|
11
|
+
* - `initJavaParser()` — async one-time WASM bootstrap
|
|
12
|
+
* - `parseJavaFile(filePath)` — parse a .java file into ClassInfo[]
|
|
13
|
+
* - `findClassesByAnnotation(classes, fqn)` — filter by annotation (simple-name match)
|
|
14
|
+
* - `findImplementationsOf(classes, interfaceFqn)` — filter by implemented interface
|
|
15
|
+
* - `findVoClass(classes, simpleName)` — locate a VO/DTO by simple class name
|
|
16
|
+
*
|
|
17
|
+
* The parser instance is a singleton (one Parser per process, matching the
|
|
18
|
+
* main indexer's pattern in `src/extraction/grammars.ts`). Trees are deleted
|
|
19
|
+
* after extraction to release WASM heap memory.
|
|
20
|
+
*/
|
|
21
|
+
/**
|
|
22
|
+
* One-time async bootstrap of the tree-sitter WASM runtime + Java grammar.
|
|
23
|
+
* Idempotent — concurrent callers share the same init promise; repeat calls
|
|
24
|
+
* after success are a no-op. Must be awaited before `getJavaParser()` is
|
|
25
|
+
* usable (it is called automatically by `parseJavaFile`).
|
|
26
|
+
*/
|
|
27
|
+
export declare function initJavaParser(): Promise<void>;
|
|
28
|
+
export interface Annotation {
|
|
29
|
+
/** Annotation name as written in source — simple (`Center`) or FQN (`org...Center`). */
|
|
30
|
+
fqn: string;
|
|
31
|
+
/** Attribute key→value pairs. `@Center("x")` → `{ value: "x" }`. */
|
|
32
|
+
attributes: Record<string, string>;
|
|
33
|
+
}
|
|
34
|
+
export interface MethodSignature {
|
|
35
|
+
name: string;
|
|
36
|
+
returnType: string;
|
|
37
|
+
parameters: {
|
|
38
|
+
type: string;
|
|
39
|
+
name: string;
|
|
40
|
+
}[];
|
|
41
|
+
modifiers: string[];
|
|
42
|
+
javadoc: string | null;
|
|
43
|
+
/** Method body source text, or `''` for abstract/interface methods. */
|
|
44
|
+
bodyText: string;
|
|
45
|
+
/** Annotations on the method declaration (e.g. `@MethodAttr`, `@Override`). */
|
|
46
|
+
annotations: Annotation[];
|
|
47
|
+
}
|
|
48
|
+
export interface ClassInfo {
|
|
49
|
+
fqn: string;
|
|
50
|
+
isInterface: boolean;
|
|
51
|
+
annotations: Annotation[];
|
|
52
|
+
methods: MethodSignature[];
|
|
53
|
+
/** Simple names as written in `implements` clause (resolved to FQN when imports allow). */
|
|
54
|
+
implementedInterfaces: string[];
|
|
55
|
+
fields: {
|
|
56
|
+
type: string;
|
|
57
|
+
name: string;
|
|
58
|
+
annotations: Annotation[];
|
|
59
|
+
}[];
|
|
60
|
+
filePath: string;
|
|
61
|
+
packageName: string;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Parse a `.java` file into one ClassInfo per top-level class/interface/enum.
|
|
65
|
+
* Top-level package + imports are resolved for annotation/interface FQN
|
|
66
|
+
* resolution. The tree is deleted after extraction to release WASM heap.
|
|
67
|
+
*
|
|
68
|
+
* Auto-initializes the parser on first call (idempotent).
|
|
69
|
+
*/
|
|
70
|
+
export declare function parseJavaFile(filePath: string): Promise<ClassInfo[]>;
|
|
71
|
+
/**
|
|
72
|
+
* Filter `classes` to those carrying an annotation matching `annotationFqn`.
|
|
73
|
+
* Match is by simple name (last segment) so `@Center` in source matches a
|
|
74
|
+
* query for `org.springframework.httpservice.annotation.Center`.
|
|
75
|
+
*/
|
|
76
|
+
export declare function findClassesByAnnotation(classes: ClassInfo[], annotationFqn: string): Promise<ClassInfo[]>;
|
|
77
|
+
/**
|
|
78
|
+
* Filter `classes` to those declaring they implement/extend `interfaceFqn`.
|
|
79
|
+
* Match is by simple name (last segment) so `implements IOrderQueryApi` in
|
|
80
|
+
* source matches a query for the interface's FQN.
|
|
81
|
+
*/
|
|
82
|
+
export declare function findImplementationsOf(classes: ClassInfo[], interfaceFqn: string): Promise<ClassInfo[]>;
|
|
83
|
+
/**
|
|
84
|
+
* Locate a VO/DTO class by its simple name (e.g. `QryCustomerOrderItemListByCondVo`).
|
|
85
|
+
* Returns the first match or `null`. Used by the analyzer to resolve method
|
|
86
|
+
* parameter types to their VO class for field extraction.
|
|
87
|
+
*/
|
|
88
|
+
export declare function findVoClass(classes: ClassInfo[], simpleName: string): Promise<ClassInfo | null>;
|
|
89
|
+
//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,GAAG,OAAO,CAAC,SAAS,EAAE,CAAC,CAgD1E;AAED;;;;GAIG;AACH,wBAAsB,uBAAuB,CAC3C,OAAO,EAAE,SAAS,EAAE,EACpB,aAAa,EAAE,MAAM,GACpB,OAAO,CAAC,SAAS,EAAE,CAAC,CAKtB;AAED;;;;GAIG;AACH,wBAAsB,qBAAqB,CACzC,OAAO,EAAE,SAAS,EAAE,EACpB,YAAY,EAAE,MAAM,GACnB,OAAO,CAAC,SAAS,EAAE,CAAC,CAKtB;AAED;;;;GAIG;AACH,wBAAsB,WAAW,CAC/B,OAAO,EAAE,SAAS,EAAE,EACpB,UAAU,EAAE,MAAM,GACjB,OAAO,CAAC,SAAS,GAAG,IAAI,CAAC,CAK3B"}
|
|
@@ -0,0 +1,508 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Self-contained tree-sitter Java parser for the api-test subsystem.
|
|
4
|
+
*
|
|
5
|
+
* Spec contract (T-11): this module is SELF-CONTAINED — it does NOT import
|
|
6
|
+
* from `src/extraction/` or `src/resolution/`. It reuses only the
|
|
7
|
+
* `tree-sitter-java.wasm` grammar file from the `tree-sitter-wasms` npm
|
|
8
|
+
* dependency (the same one the main indexer uses), loaded at runtime via
|
|
9
|
+
* `require.resolve`. No calls to `codegraph_explore` MCP or `CodeGraph` API.
|
|
10
|
+
*
|
|
11
|
+
* Public surface:
|
|
12
|
+
* - `initJavaParser()` — async one-time WASM bootstrap
|
|
13
|
+
* - `parseJavaFile(filePath)` — parse a .java file into ClassInfo[]
|
|
14
|
+
* - `findClassesByAnnotation(classes, fqn)` — filter by annotation (simple-name match)
|
|
15
|
+
* - `findImplementationsOf(classes, interfaceFqn)` — filter by implemented interface
|
|
16
|
+
* - `findVoClass(classes, simpleName)` — locate a VO/DTO by simple class name
|
|
17
|
+
*
|
|
18
|
+
* The parser instance is a singleton (one Parser per process, matching the
|
|
19
|
+
* main indexer's pattern in `src/extraction/grammars.ts`). Trees are deleted
|
|
20
|
+
* after extraction to release WASM heap memory.
|
|
21
|
+
*/
|
|
22
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
23
|
+
if (k2 === undefined) k2 = k;
|
|
24
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
25
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
26
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
27
|
+
}
|
|
28
|
+
Object.defineProperty(o, k2, desc);
|
|
29
|
+
}) : (function(o, m, k, k2) {
|
|
30
|
+
if (k2 === undefined) k2 = k;
|
|
31
|
+
o[k2] = m[k];
|
|
32
|
+
}));
|
|
33
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
34
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
35
|
+
}) : function(o, v) {
|
|
36
|
+
o["default"] = v;
|
|
37
|
+
});
|
|
38
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
39
|
+
var ownKeys = function(o) {
|
|
40
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
41
|
+
var ar = [];
|
|
42
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
43
|
+
return ar;
|
|
44
|
+
};
|
|
45
|
+
return ownKeys(o);
|
|
46
|
+
};
|
|
47
|
+
return function (mod) {
|
|
48
|
+
if (mod && mod.__esModule) return mod;
|
|
49
|
+
var result = {};
|
|
50
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
51
|
+
__setModuleDefault(result, mod);
|
|
52
|
+
return result;
|
|
53
|
+
};
|
|
54
|
+
})();
|
|
55
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
56
|
+
exports.initJavaParser = initJavaParser;
|
|
57
|
+
exports.parseJavaFile = parseJavaFile;
|
|
58
|
+
exports.findClassesByAnnotation = findClassesByAnnotation;
|
|
59
|
+
exports.findImplementationsOf = findImplementationsOf;
|
|
60
|
+
exports.findVoClass = findVoClass;
|
|
61
|
+
const fs = __importStar(require("node:fs"));
|
|
62
|
+
const web_tree_sitter_1 = require("web-tree-sitter");
|
|
63
|
+
const errors_1 = require("./errors");
|
|
64
|
+
// ---------------------------------------------------------------------------
|
|
65
|
+
// Singleton parser state
|
|
66
|
+
// ---------------------------------------------------------------------------
|
|
67
|
+
let parserInstance = null;
|
|
68
|
+
let javaLanguage = null;
|
|
69
|
+
let initPromise = null;
|
|
70
|
+
/**
|
|
71
|
+
* One-time async bootstrap of the tree-sitter WASM runtime + Java grammar.
|
|
72
|
+
* Idempotent — concurrent callers share the same init promise; repeat calls
|
|
73
|
+
* after success are a no-op. Must be awaited before `getJavaParser()` is
|
|
74
|
+
* usable (it is called automatically by `parseJavaFile`).
|
|
75
|
+
*/
|
|
76
|
+
async function initJavaParser() {
|
|
77
|
+
if (parserInstance)
|
|
78
|
+
return;
|
|
79
|
+
if (initPromise)
|
|
80
|
+
return initPromise;
|
|
81
|
+
initPromise = (async () => {
|
|
82
|
+
await web_tree_sitter_1.Parser.init();
|
|
83
|
+
const wasmPath = require.resolve('tree-sitter-wasms/out/tree-sitter-java.wasm');
|
|
84
|
+
javaLanguage = await web_tree_sitter_1.Language.load(wasmPath);
|
|
85
|
+
parserInstance = new web_tree_sitter_1.Parser();
|
|
86
|
+
parserInstance.setLanguage(javaLanguage);
|
|
87
|
+
})();
|
|
88
|
+
try {
|
|
89
|
+
await initPromise;
|
|
90
|
+
}
|
|
91
|
+
catch (err) {
|
|
92
|
+
// Reset so a retry can re-attempt init rather than permanently stuck.
|
|
93
|
+
initPromise = null;
|
|
94
|
+
parserInstance = null;
|
|
95
|
+
javaLanguage = null;
|
|
96
|
+
throw new errors_1.ParseError(`Failed to initialize Java tree-sitter parser: ${err instanceof Error ? err.message : String(err)}`);
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
/** Internal: get the initialized parser, auto-initializing if needed. */
|
|
100
|
+
async function getParser() {
|
|
101
|
+
if (!parserInstance)
|
|
102
|
+
await initJavaParser();
|
|
103
|
+
if (!parserInstance) {
|
|
104
|
+
throw new errors_1.ParseError('Java parser not initialized after initJavaParser()');
|
|
105
|
+
}
|
|
106
|
+
return parserInstance;
|
|
107
|
+
}
|
|
108
|
+
// ---------------------------------------------------------------------------
|
|
109
|
+
// AST traversal helpers (local — no import from src/extraction/)
|
|
110
|
+
// ---------------------------------------------------------------------------
|
|
111
|
+
function childForFieldName(node, fieldName) {
|
|
112
|
+
return node.childForFieldName(fieldName);
|
|
113
|
+
}
|
|
114
|
+
function nodeText(node, source) {
|
|
115
|
+
return source.substring(node.startIndex, node.endIndex);
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* Walk a node's direct named children, yielding those matching a predicate.
|
|
119
|
+
* Falls back to iterating `node.children` (which includes anonymous tokens)
|
|
120
|
+
* when `namedChildren` is empty — defensive against grammar quirks.
|
|
121
|
+
*/
|
|
122
|
+
function* namedChildrenOf(node) {
|
|
123
|
+
for (let i = 0; i < node.childCount; i++) {
|
|
124
|
+
const child = node.child(i);
|
|
125
|
+
if (child && child.isNamed)
|
|
126
|
+
yield child;
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
/** Parse `import a.b.C;` and `import a.b.C.*;` lines into a simple→FQN map. */
|
|
130
|
+
function buildImportMap(root, source) {
|
|
131
|
+
const simpleToFqn = new Map();
|
|
132
|
+
for (const child of namedChildrenOf(root)) {
|
|
133
|
+
if (child.type !== 'import_declaration')
|
|
134
|
+
continue;
|
|
135
|
+
// import_declaration → scoped_identifier | identifier | scoped_type_identifier | ...
|
|
136
|
+
const declText = nodeText(child, source).trim();
|
|
137
|
+
// Strip `import ` prefix and `;` suffix and optional `static `.
|
|
138
|
+
let body = declText.replace(/^import\s+(?:static\s+)?/, '').replace(/;\s*$/, '');
|
|
139
|
+
const isWildcard = body.endsWith('.*');
|
|
140
|
+
if (isWildcard)
|
|
141
|
+
continue; // wildcard imports can't resolve a simple name to one FQN
|
|
142
|
+
const simple = body.split('.').pop();
|
|
143
|
+
if (simple && /^[A-Za-z_]\w*$/.test(simple)) {
|
|
144
|
+
simpleToFqn.set(simple, body);
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
return { simpleToFqn };
|
|
148
|
+
}
|
|
149
|
+
/** Resolve a type/annotation name as-written to its FQN, using imports. */
|
|
150
|
+
function resolveNameToFqn(nameAsWritten, imports) {
|
|
151
|
+
if (nameAsWritten.includes('.'))
|
|
152
|
+
return nameAsWritten; // already qualified
|
|
153
|
+
return imports.simpleToFqn.get(nameAsWritten) ?? nameAsWritten;
|
|
154
|
+
}
|
|
155
|
+
/** Get the simple (last segment) name from a possibly-qualified identifier. */
|
|
156
|
+
function simpleNameOf(fqnOrSimple) {
|
|
157
|
+
const last = fqnOrSimple.split('.').pop();
|
|
158
|
+
return last;
|
|
159
|
+
}
|
|
160
|
+
// ---------------------------------------------------------------------------
|
|
161
|
+
// Annotation extraction
|
|
162
|
+
// ---------------------------------------------------------------------------
|
|
163
|
+
/**
|
|
164
|
+
* Extract an `annotation` or `marker_annotation` node into the public shape.
|
|
165
|
+
* `@Center("sopub_api")` → `{ fqn: 'Center' (or resolved), attributes: { value: 'sopub_api' } }`.
|
|
166
|
+
* `@Foo(a = "x", b = 1)` → `{ fqn: 'Foo', attributes: { a: 'x', b: '1' } }`.
|
|
167
|
+
*/
|
|
168
|
+
function extractAnnotation(node, source, imports) {
|
|
169
|
+
const nameNode = childForFieldName(node, 'name');
|
|
170
|
+
const rawName = nameNode ? nodeText(nameNode, source).trim() : '';
|
|
171
|
+
const fqn = resolveNameToFqn(rawName, imports);
|
|
172
|
+
const attributes = {};
|
|
173
|
+
const argsNode = childForFieldName(node, 'arguments');
|
|
174
|
+
if (argsNode) {
|
|
175
|
+
// `annotation_argument_list` children: `element_value_pair` (named `key = val`)
|
|
176
|
+
// or bare values (default `value`).
|
|
177
|
+
for (const arg of namedChildrenOf(argsNode)) {
|
|
178
|
+
if (arg.type === 'element_value_pair') {
|
|
179
|
+
const keyNode = childForFieldName(arg, 'key');
|
|
180
|
+
const valueNode = childForFieldName(arg, 'value');
|
|
181
|
+
const key = keyNode ? nodeText(keyNode, source).trim() : '';
|
|
182
|
+
const value = valueNode ? stripLiteralQuotes(nodeText(valueNode, source).trim()) : '';
|
|
183
|
+
if (key)
|
|
184
|
+
attributes[key] = value;
|
|
185
|
+
}
|
|
186
|
+
else {
|
|
187
|
+
// Bare positional argument. tree-sitter-java sometimes parses a single
|
|
188
|
+
// `key = value` form as an `assignment_expression` (not an
|
|
189
|
+
// `element_value_pair`), so the whole `open = false` text lands here.
|
|
190
|
+
// Split on `=` to recover the key/value pair; if no `=`, treat as the
|
|
191
|
+
// default `value` slot.
|
|
192
|
+
const text = nodeText(arg, source).trim();
|
|
193
|
+
const eqMatch = /^([A-Za-z_]\w*)\s*=\s*(.+)$/.exec(text);
|
|
194
|
+
if (eqMatch) {
|
|
195
|
+
const key = eqMatch[1] ?? '';
|
|
196
|
+
const value = stripLiteralQuotes((eqMatch[2] ?? '').trim());
|
|
197
|
+
if (key)
|
|
198
|
+
attributes[key] = value;
|
|
199
|
+
}
|
|
200
|
+
else {
|
|
201
|
+
const value = stripLiteralQuotes(text);
|
|
202
|
+
attributes['value'] = value;
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
return { fqn, attributes };
|
|
208
|
+
}
|
|
209
|
+
/** Strip surrounding quotes from a string literal, leave non-strings as-is. */
|
|
210
|
+
function stripLiteralQuotes(s) {
|
|
211
|
+
if (s.startsWith('"') && s.endsWith('"') && s.length >= 2) {
|
|
212
|
+
return s.slice(1, -1).replace(/\\"/g, '"');
|
|
213
|
+
}
|
|
214
|
+
return s;
|
|
215
|
+
}
|
|
216
|
+
/**
|
|
217
|
+
* Read a declaration's `modifiers` child (if present) and split it into
|
|
218
|
+
* keyword modifiers (`public`, `static`, `final`, `abstract`, …) and
|
|
219
|
+
* annotations. Matches the pattern in `src/extraction/languages/java.ts`
|
|
220
|
+
* but reimplemented locally to stay self-contained.
|
|
221
|
+
*/
|
|
222
|
+
function extractModifiers(node, source, imports) {
|
|
223
|
+
const out = { modifierKeywords: [], annotations: [] };
|
|
224
|
+
// `modifiers` is a repeated/list child in tree-sitter-java — NOT accessible
|
|
225
|
+
// via `childForFieldName('modifiers')` (returns null). Match the main
|
|
226
|
+
// extractor's pattern: find it via `namedChildren`.
|
|
227
|
+
const modifiers = [...namedChildrenOf(node)].find((c) => c.type === 'modifiers');
|
|
228
|
+
if (!modifiers)
|
|
229
|
+
return out;
|
|
230
|
+
for (const child of namedChildrenOf(modifiers)) {
|
|
231
|
+
if (child.type === 'annotation' || child.type === 'marker_annotation') {
|
|
232
|
+
out.annotations.push(extractAnnotation(child, source, imports));
|
|
233
|
+
}
|
|
234
|
+
// Keyword modifiers (public/static/final/…) are anonymous tokens in
|
|
235
|
+
// tree-sitter-java, filtered out of `namedChildren`. We capture them
|
|
236
|
+
// below from the modifiers block's raw text.
|
|
237
|
+
}
|
|
238
|
+
const modsText = nodeText(modifiers, source);
|
|
239
|
+
out.modifierKeywords = parseModifierKeywords(modsText);
|
|
240
|
+
return out;
|
|
241
|
+
}
|
|
242
|
+
/** Pull keyword modifiers out of a modifiers block's raw text. */
|
|
243
|
+
const JAVA_KEYWORD_MODIFIERS = new Set([
|
|
244
|
+
'public', 'private', 'protected', 'static', 'final', 'abstract',
|
|
245
|
+
'synchronized', 'volatile', 'transient', 'native', 'strictfp', 'default',
|
|
246
|
+
]);
|
|
247
|
+
function parseModifierKeywords(modsText) {
|
|
248
|
+
// Strip annotation substrings (`@Foo(...)` or `@Foo`) so keyword parsing
|
|
249
|
+
// doesn't trip over annotation arguments containing keywords.
|
|
250
|
+
const stripped = modsText.replace(/@\w[\w.]*\s*(\([^)]*\))?/g, ' ');
|
|
251
|
+
const tokens = stripped.split(/\s+/).filter(Boolean);
|
|
252
|
+
return tokens.filter((t) => JAVA_KEYWORD_MODIFIERS.has(t));
|
|
253
|
+
}
|
|
254
|
+
// ---------------------------------------------------------------------------
|
|
255
|
+
// Javadoc extraction
|
|
256
|
+
// ---------------------------------------------------------------------------
|
|
257
|
+
/**
|
|
258
|
+
* Extract the javadoc comment immediately preceding a declaration node.
|
|
259
|
+
* Returns the cleaned prose (markers stripped), or `null` if none.
|
|
260
|
+
*
|
|
261
|
+
* In tree-sitter-java, a `block_comment` starting with `/**` is a sibling
|
|
262
|
+
* of the method/class declaration (not a child of `modifiers`). We walk
|
|
263
|
+
* `previousNamedSibling` until we hit a non-comment.
|
|
264
|
+
*/
|
|
265
|
+
function extractJavadoc(node, source) {
|
|
266
|
+
let sibling = node.previousNamedSibling;
|
|
267
|
+
const comments = [];
|
|
268
|
+
while (sibling) {
|
|
269
|
+
if (sibling.type === 'block_comment' ||
|
|
270
|
+
sibling.type === 'comment' ||
|
|
271
|
+
sibling.type === 'documentation_comment') {
|
|
272
|
+
comments.unshift(nodeText(sibling, source));
|
|
273
|
+
sibling = sibling.previousNamedSibling;
|
|
274
|
+
}
|
|
275
|
+
else {
|
|
276
|
+
break;
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
if (comments.length === 0)
|
|
280
|
+
return null;
|
|
281
|
+
return comments.map(cleanJavadocMarkers).join('\n').trim() || null;
|
|
282
|
+
}
|
|
283
|
+
function cleanJavadocMarkers(raw) {
|
|
284
|
+
let c = raw.trim();
|
|
285
|
+
if (c.startsWith('/**'))
|
|
286
|
+
c = c.replace(/^\/\*\*+/, '').replace(/\*+\/$/, '');
|
|
287
|
+
else if (c.startsWith('/*'))
|
|
288
|
+
c = c.replace(/^\/\*+/, '').replace(/\*+\/$/, '');
|
|
289
|
+
else if (c.startsWith('//'))
|
|
290
|
+
c = c.replace(/^\/\/+/, '');
|
|
291
|
+
return c.replace(/^\s*\*\s?/gm, '').trim();
|
|
292
|
+
}
|
|
293
|
+
// ---------------------------------------------------------------------------
|
|
294
|
+
// Method + field extraction
|
|
295
|
+
// ---------------------------------------------------------------------------
|
|
296
|
+
function extractMethod(node, source, imports) {
|
|
297
|
+
const nameNode = childForFieldName(node, 'name');
|
|
298
|
+
const name = nameNode ? nodeText(nameNode, source).trim() : '';
|
|
299
|
+
const typeNode = childForFieldName(node, 'type');
|
|
300
|
+
const returnType = typeNode ? nodeText(typeNode, source).trim() : 'void';
|
|
301
|
+
const parameters = [];
|
|
302
|
+
const paramsNode = childForFieldName(node, 'parameters');
|
|
303
|
+
if (paramsNode) {
|
|
304
|
+
for (const p of namedChildrenOf(paramsNode)) {
|
|
305
|
+
if (p.type !== 'formal_parameter' && p.type !== 'spread_parameter')
|
|
306
|
+
continue;
|
|
307
|
+
const pType = childForFieldName(p, 'type');
|
|
308
|
+
const pName = childForFieldName(p, 'name');
|
|
309
|
+
if (pType && pName) {
|
|
310
|
+
parameters.push({
|
|
311
|
+
type: nodeText(pType, source).trim(),
|
|
312
|
+
name: nodeText(pName, source).trim(),
|
|
313
|
+
});
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
const { modifierKeywords, annotations } = extractModifiers(node, source, imports);
|
|
318
|
+
const javadoc = extractJavadoc(node, source);
|
|
319
|
+
// Body source text — captured before tree.delete() so it stays valid after
|
|
320
|
+
// extraction. The AST node itself is NOT surfaced on MethodSignature (it
|
|
321
|
+
// would be invalid after `tree.delete()` in parseJavaFile — see Fix-4).
|
|
322
|
+
const bodyAstNode = childForFieldName(node, 'body');
|
|
323
|
+
const bodyText = bodyAstNode ? nodeText(bodyAstNode, source) : '';
|
|
324
|
+
return {
|
|
325
|
+
name,
|
|
326
|
+
returnType,
|
|
327
|
+
parameters,
|
|
328
|
+
modifiers: modifierKeywords,
|
|
329
|
+
javadoc,
|
|
330
|
+
bodyText,
|
|
331
|
+
annotations,
|
|
332
|
+
};
|
|
333
|
+
}
|
|
334
|
+
function extractField(node, source, imports) {
|
|
335
|
+
const typeNode = childForFieldName(node, 'type');
|
|
336
|
+
const type = typeNode ? nodeText(typeNode, source).trim() : 'Object';
|
|
337
|
+
const { annotations } = extractModifiers(node, source, imports);
|
|
338
|
+
const out = [];
|
|
339
|
+
// field_declaration → one or more variable_declarator children.
|
|
340
|
+
for (const child of namedChildrenOf(node)) {
|
|
341
|
+
if (child.type !== 'variable_declarator')
|
|
342
|
+
continue;
|
|
343
|
+
const nameNode = childForFieldName(child, 'name');
|
|
344
|
+
if (!nameNode)
|
|
345
|
+
continue;
|
|
346
|
+
out.push({
|
|
347
|
+
type,
|
|
348
|
+
name: nodeText(nameNode, source).trim(),
|
|
349
|
+
annotations,
|
|
350
|
+
});
|
|
351
|
+
}
|
|
352
|
+
return out;
|
|
353
|
+
}
|
|
354
|
+
// ---------------------------------------------------------------------------
|
|
355
|
+
// Class / interface extraction
|
|
356
|
+
// ---------------------------------------------------------------------------
|
|
357
|
+
/**
|
|
358
|
+
* Extract one `class_declaration` / `interface_declaration` / `enum_declaration`
|
|
359
|
+
* / `annotation_type_declaration` node into a ClassInfo.
|
|
360
|
+
*/
|
|
361
|
+
function extractClassInfo(declNode, source, filePath, packageName, imports) {
|
|
362
|
+
const nameNode = childForFieldName(declNode, 'name');
|
|
363
|
+
const className = nameNode ? nodeText(nameNode, source).trim() : '';
|
|
364
|
+
const fqn = packageName ? `${packageName}.${className}` : className;
|
|
365
|
+
const isInterface = declNode.type === 'interface_declaration';
|
|
366
|
+
const isAnnotationType = declNode.type === 'annotation_type_declaration';
|
|
367
|
+
const { annotations } = extractModifiers(declNode, source, imports);
|
|
368
|
+
// Implemented interfaces / extended interfaces.
|
|
369
|
+
//
|
|
370
|
+
// tree-sitter-java represents these as named children (NOT field-accessible):
|
|
371
|
+
// - class `implements Foo, Bar` → `super_interfaces` (also reachable via
|
|
372
|
+
// `childForFieldName('interfaces')`) → `type_list` → type identifiers
|
|
373
|
+
// - interface `extends Foo, Bar` → `extends_interfaces` (no field name)
|
|
374
|
+
// → `type_list` → type identifiers
|
|
375
|
+
//
|
|
376
|
+
// We surface both as `implementedInterfaces` so callers asking "who
|
|
377
|
+
// implements/extends IOrderQueryApi" find both classes and sub-interfaces.
|
|
378
|
+
const implementedInterfaces = [];
|
|
379
|
+
const collectTypeList = (container) => {
|
|
380
|
+
if (!container)
|
|
381
|
+
return;
|
|
382
|
+
// The container may itself be a `type_list` (rare) or wrap one.
|
|
383
|
+
const typeList = container.type === 'type_list'
|
|
384
|
+
? container
|
|
385
|
+
: [...namedChildrenOf(container)].find((c) => c.type === 'type_list') ?? container;
|
|
386
|
+
for (const it of namedChildrenOf(typeList)) {
|
|
387
|
+
const text = nodeText(it, source).trim();
|
|
388
|
+
if (text) {
|
|
389
|
+
implementedInterfaces.push(resolveNameToFqn(text, imports));
|
|
390
|
+
}
|
|
391
|
+
}
|
|
392
|
+
};
|
|
393
|
+
collectTypeList(childForFieldName(declNode, 'interfaces'));
|
|
394
|
+
// Also check `extends_interfaces` (interface-to-interface) via namedChildren.
|
|
395
|
+
const extendsInterfaces = [...namedChildrenOf(declNode)].find((c) => c.type === 'extends_interfaces');
|
|
396
|
+
collectTypeList(extendsInterfaces ?? null);
|
|
397
|
+
const methods = [];
|
|
398
|
+
const fields = [];
|
|
399
|
+
const body = childForFieldName(declNode, 'body');
|
|
400
|
+
if (body) {
|
|
401
|
+
for (const child of namedChildrenOf(body)) {
|
|
402
|
+
if (child.type === 'method_declaration' || child.type === 'constructor_declaration') {
|
|
403
|
+
methods.push(extractMethod(child, source, imports));
|
|
404
|
+
}
|
|
405
|
+
else if (child.type === 'field_declaration') {
|
|
406
|
+
fields.push(...extractField(child, source, imports));
|
|
407
|
+
}
|
|
408
|
+
else if (child.type === 'interface_declaration' || child.type === 'class_declaration' || child.type === 'enum_declaration') {
|
|
409
|
+
// Nested types — not surfaced in T-11 scope. (A future task can add
|
|
410
|
+
// them as nested ClassInfo entries if the analyzer needs it.)
|
|
411
|
+
}
|
|
412
|
+
// annotation_type_declaration members (annotation methods) — out of scope.
|
|
413
|
+
}
|
|
414
|
+
}
|
|
415
|
+
return {
|
|
416
|
+
fqn,
|
|
417
|
+
isInterface: isInterface || isAnnotationType,
|
|
418
|
+
annotations,
|
|
419
|
+
methods,
|
|
420
|
+
implementedInterfaces,
|
|
421
|
+
fields,
|
|
422
|
+
filePath,
|
|
423
|
+
packageName,
|
|
424
|
+
};
|
|
425
|
+
}
|
|
426
|
+
// ---------------------------------------------------------------------------
|
|
427
|
+
// Public API
|
|
428
|
+
// ---------------------------------------------------------------------------
|
|
429
|
+
/**
|
|
430
|
+
* Parse a `.java` file into one ClassInfo per top-level class/interface/enum.
|
|
431
|
+
* Top-level package + imports are resolved for annotation/interface FQN
|
|
432
|
+
* resolution. The tree is deleted after extraction to release WASM heap.
|
|
433
|
+
*
|
|
434
|
+
* Auto-initializes the parser on first call (idempotent).
|
|
435
|
+
*/
|
|
436
|
+
async function parseJavaFile(filePath) {
|
|
437
|
+
const parser = await getParser();
|
|
438
|
+
let source;
|
|
439
|
+
try {
|
|
440
|
+
source = fs.readFileSync(filePath, 'utf8');
|
|
441
|
+
}
|
|
442
|
+
catch (err) {
|
|
443
|
+
throw new errors_1.ParseError(`Failed to read Java file ${filePath}: ${err instanceof Error ? err.message : String(err)}`);
|
|
444
|
+
}
|
|
445
|
+
const tree = parser.parse(source);
|
|
446
|
+
if (!tree) {
|
|
447
|
+
throw new errors_1.ParseError(`tree-sitter returned null tree for ${filePath}`);
|
|
448
|
+
}
|
|
449
|
+
let classes = [];
|
|
450
|
+
try {
|
|
451
|
+
const root = tree.rootNode;
|
|
452
|
+
// Package
|
|
453
|
+
let packageName = '';
|
|
454
|
+
for (const child of namedChildrenOf(root)) {
|
|
455
|
+
if (child.type === 'package_declaration') {
|
|
456
|
+
const id = [...namedChildrenOf(child)].find((c) => c.type === 'scoped_identifier' || c.type === 'identifier');
|
|
457
|
+
if (id)
|
|
458
|
+
packageName = nodeText(id, source).trim();
|
|
459
|
+
break;
|
|
460
|
+
}
|
|
461
|
+
}
|
|
462
|
+
const imports = buildImportMap(root, source);
|
|
463
|
+
// Top-level class/interface/enum/annotation-type declarations
|
|
464
|
+
for (const child of namedChildrenOf(root)) {
|
|
465
|
+
if (child.type === 'class_declaration' ||
|
|
466
|
+
child.type === 'interface_declaration' ||
|
|
467
|
+
child.type === 'enum_declaration' ||
|
|
468
|
+
child.type === 'annotation_type_declaration') {
|
|
469
|
+
classes.push(extractClassInfo(child, source, filePath, packageName, imports));
|
|
470
|
+
}
|
|
471
|
+
}
|
|
472
|
+
}
|
|
473
|
+
finally {
|
|
474
|
+
tree.delete();
|
|
475
|
+
}
|
|
476
|
+
return classes;
|
|
477
|
+
}
|
|
478
|
+
/**
|
|
479
|
+
* Filter `classes` to those carrying an annotation matching `annotationFqn`.
|
|
480
|
+
* Match is by simple name (last segment) so `@Center` in source matches a
|
|
481
|
+
* query for `org.springframework.httpservice.annotation.Center`.
|
|
482
|
+
*/
|
|
483
|
+
async function findClassesByAnnotation(classes, annotationFqn) {
|
|
484
|
+
const targetSimple = simpleNameOf(annotationFqn);
|
|
485
|
+
return classes.filter((c) => c.annotations.some((a) => simpleNameOf(a.fqn) === targetSimple));
|
|
486
|
+
}
|
|
487
|
+
/**
|
|
488
|
+
* Filter `classes` to those declaring they implement/extend `interfaceFqn`.
|
|
489
|
+
* Match is by simple name (last segment) so `implements IOrderQueryApi` in
|
|
490
|
+
* source matches a query for the interface's FQN.
|
|
491
|
+
*/
|
|
492
|
+
async function findImplementationsOf(classes, interfaceFqn) {
|
|
493
|
+
const targetSimple = simpleNameOf(interfaceFqn);
|
|
494
|
+
return classes.filter((c) => !c.isInterface && c.implementedInterfaces.some((i) => simpleNameOf(i) === targetSimple));
|
|
495
|
+
}
|
|
496
|
+
/**
|
|
497
|
+
* Locate a VO/DTO class by its simple name (e.g. `QryCustomerOrderItemListByCondVo`).
|
|
498
|
+
* Returns the first match or `null`. Used by the analyzer to resolve method
|
|
499
|
+
* parameter types to their VO class for field extraction.
|
|
500
|
+
*/
|
|
501
|
+
async function findVoClass(classes, simpleName) {
|
|
502
|
+
for (const c of classes) {
|
|
503
|
+
if (simpleNameOf(c.fqn) === simpleName)
|
|
504
|
+
return c;
|
|
505
|
+
}
|
|
506
|
+
return null;
|
|
507
|
+
}
|
|
508
|
+
//# sourceMappingURL=java-parser.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"java-parser.js","sourceRoot":"","sources":["../../src/api-test/java-parser.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqBH,wCAuBC;AA2aD,sCAgDC;AAOD,0DAQC;AAOD,sDAQC;AAOD,kCAQC;AAljBD,4CAA8B;AAC9B,qDAA4F;AAE5F,qCAAsC;AAEtC,8EAA8E;AAC9E,yBAAyB;AACzB,8EAA8E;AAE9E,IAAI,cAAc,GAAkB,IAAI,CAAC;AACzC,IAAI,YAAY,GAAwB,IAAI,CAAC;AAC7C,IAAI,WAAW,GAAyB,IAAI,CAAC;AAE7C;;;;;GAKG;AACI,KAAK,UAAU,cAAc;IAClC,IAAI,cAAc;QAAE,OAAO;IAC3B,IAAI,WAAW;QAAE,OAAO,WAAW,CAAC;IAEpC,WAAW,GAAG,CAAC,KAAK,IAAI,EAAE;QACxB,MAAM,wBAAM,CAAC,IAAI,EAAE,CAAC;QACpB,MAAM,QAAQ,GAAG,OAAO,CAAC,OAAO,CAAC,6CAA6C,CAAC,CAAC;QAChF,YAAY,GAAG,MAAM,0BAAY,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QACjD,cAAc,GAAG,IAAI,wBAAM,EAAE,CAAC;QAC9B,cAAc,CAAC,WAAW,CAAC,YAAY,CAAC,CAAC;IAC3C,CAAC,CAAC,EAAE,CAAC;IAEL,IAAI,CAAC;QACH,MAAM,WAAW,CAAC;IACpB,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,sEAAsE;QACt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