agent-intel 0.1.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/README.md +78 -0
- package/dist/cli.d.ts +3 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +49 -0
- package/dist/cli.js.map +1 -0
- package/dist/index.d.ts +45 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +121 -0
- package/dist/index.js.map +1 -0
- package/package.json +52 -0
package/README.md
ADDED
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
# agent-intel
|
|
2
|
+
|
|
3
|
+
TypeScript/JavaScript IDE intelligence for AI coding agents. Provides the same information developers see in their IDE: hover info, go-to-definition, find references, diagnostics, and completions.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install agent-intel
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Or run directly with npx:
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
npx agent-intel hover src/index.ts 10 5
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## CLI Usage
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
agent-intel <command> <file> [line] [col]
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
| Command | Description |
|
|
24
|
+
|---------|-------------|
|
|
25
|
+
| `hover <file> <line> <col>` | Type info and documentation |
|
|
26
|
+
| `definition <file> <line> <col>` | Go to definition with preview |
|
|
27
|
+
| `references <file> <line> <col>` | Find all usages |
|
|
28
|
+
| `diagnostics <file>` | Get type errors and warnings |
|
|
29
|
+
| `completions <file> <line> <col>` | Get available members |
|
|
30
|
+
|
|
31
|
+
All output is JSON. File paths can be relative or absolute. `tsconfig.json` is auto-detected.
|
|
32
|
+
|
|
33
|
+
### Examples
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
# Get type info at line 10, column 5
|
|
37
|
+
npx agent-intel hover src/utils.ts 10 5
|
|
38
|
+
# {"type": "function greet(name: string): string", "docs": "Greets a user"}
|
|
39
|
+
|
|
40
|
+
# Find where a function is defined
|
|
41
|
+
npx agent-intel definition src/app.ts 25 12
|
|
42
|
+
# [{"file": "/src/utils.ts", "line": 10, "col": 1, "preview": "export function greet..."}]
|
|
43
|
+
|
|
44
|
+
# Find all usages before refactoring
|
|
45
|
+
npx agent-intel references src/utils.ts 10 5
|
|
46
|
+
# [{"file": "/src/app.ts", "line": 25, "col": 12, "isWriteAccess": false}, ...]
|
|
47
|
+
|
|
48
|
+
# Check for type errors
|
|
49
|
+
npx agent-intel diagnostics src/app.ts
|
|
50
|
+
# [{"line": 15, "col": 3, "message": "Type 'string' is not assignable...", "code": 2322}]
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## Programmatic API
|
|
54
|
+
|
|
55
|
+
```typescript
|
|
56
|
+
import { TypeScriptService } from "agent-intel";
|
|
57
|
+
|
|
58
|
+
// Auto-detect tsconfig from file path
|
|
59
|
+
const service = TypeScriptService.fromFile("/path/to/file.ts");
|
|
60
|
+
|
|
61
|
+
// Or specify tsconfig directly
|
|
62
|
+
const service = new TypeScriptService("/path/to/tsconfig.json");
|
|
63
|
+
|
|
64
|
+
service.hover("/path/to/file.ts", 10, 5);
|
|
65
|
+
service.definition("/path/to/file.ts", 10, 5);
|
|
66
|
+
service.references("/path/to/file.ts", 10, 5);
|
|
67
|
+
service.diagnostics("/path/to/file.ts");
|
|
68
|
+
service.completions("/path/to/file.ts", 10, 5);
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
## Requirements
|
|
72
|
+
|
|
73
|
+
- Node.js 18+
|
|
74
|
+
- `tsconfig.json` in the project
|
|
75
|
+
|
|
76
|
+
## License
|
|
77
|
+
|
|
78
|
+
MIT
|
package/dist/cli.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":""}
|
package/dist/cli.js
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { TypeScriptService } from "./index.js";
|
|
3
|
+
import path from "path";
|
|
4
|
+
const [, , command, file, line, col] = process.argv;
|
|
5
|
+
if (!command) {
|
|
6
|
+
console.log(`Usage: agent-intel <command> <file> [line] [col]
|
|
7
|
+
|
|
8
|
+
Commands:
|
|
9
|
+
hover <file> <line> <col> - Type info and docs (like IDE hover)
|
|
10
|
+
definition <file> <line> <col> - Go to definition
|
|
11
|
+
references <file> <line> <col> - Find all references
|
|
12
|
+
diagnostics <file> - Get errors/warnings
|
|
13
|
+
completions <file> <line> <col> - Get completions at position
|
|
14
|
+
|
|
15
|
+
The file path can be relative or absolute. tsconfig.json is auto-detected
|
|
16
|
+
by walking up from the file location.
|
|
17
|
+
`);
|
|
18
|
+
process.exit(0);
|
|
19
|
+
}
|
|
20
|
+
if (!file) {
|
|
21
|
+
console.log(JSON.stringify({ error: "File path required" }));
|
|
22
|
+
process.exit(1);
|
|
23
|
+
}
|
|
24
|
+
const absoluteFile = path.resolve(file);
|
|
25
|
+
try {
|
|
26
|
+
const service = TypeScriptService.fromFile(absoluteFile);
|
|
27
|
+
const result = (() => {
|
|
28
|
+
switch (command) {
|
|
29
|
+
case "hover":
|
|
30
|
+
return service.hover(absoluteFile, +line, +col);
|
|
31
|
+
case "definition":
|
|
32
|
+
return service.definition(absoluteFile, +line, +col);
|
|
33
|
+
case "references":
|
|
34
|
+
return service.references(absoluteFile, +line, +col);
|
|
35
|
+
case "diagnostics":
|
|
36
|
+
return service.diagnostics(absoluteFile);
|
|
37
|
+
case "completions":
|
|
38
|
+
return service.completions(absoluteFile, +line, +col);
|
|
39
|
+
default:
|
|
40
|
+
return { error: `Unknown command: ${command}` };
|
|
41
|
+
}
|
|
42
|
+
})();
|
|
43
|
+
console.log(JSON.stringify(result, null, 2));
|
|
44
|
+
}
|
|
45
|
+
catch (e) {
|
|
46
|
+
console.log(JSON.stringify({ error: e.message }));
|
|
47
|
+
process.exit(1);
|
|
48
|
+
}
|
|
49
|
+
//# sourceMappingURL=cli.js.map
|
package/dist/cli.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAC/C,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,MAAM,CAAC,EAAE,AAAD,EAAG,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;AAEpD,IAAI,CAAC,OAAO,EAAE,CAAC;IACb,OAAO,CAAC,GAAG,CAAC;;;;;;;;;;;CAWb,CAAC,CAAC;IACD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC;AAED,IAAI,CAAC,IAAI,EAAE,CAAC;IACV,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,KAAK,EAAE,oBAAoB,EAAE,CAAC,CAAC,CAAC;IAC7D,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC;AAED,MAAM,YAAY,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;AAExC,IAAI,CAAC;IACH,MAAM,OAAO,GAAG,iBAAiB,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC;IAEzD,MAAM,MAAM,GAAG,CAAC,GAAG,EAAE;QACnB,QAAQ,OAAO,EAAE,CAAC;YAChB,KAAK,OAAO;gBACV,OAAO,OAAO,CAAC,KAAK,CAAC,YAAY,EAAE,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC;YAClD,KAAK,YAAY;gBACf,OAAO,OAAO,CAAC,UAAU,CAAC,YAAY,EAAE,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC;YACvD,KAAK,YAAY;gBACf,OAAO,OAAO,CAAC,UAAU,CAAC,YAAY,EAAE,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC;YACvD,KAAK,aAAa;gBAChB,OAAO,OAAO,CAAC,WAAW,CAAC,YAAY,CAAC,CAAC;YAC3C,KAAK,aAAa;gBAChB,OAAO,OAAO,CAAC,WAAW,CAAC,YAAY,EAAE,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC;YACxD;gBACE,OAAO,EAAE,KAAK,EAAE,oBAAoB,OAAO,EAAE,EAAE,CAAC;QACpD,CAAC;IACH,CAAC,CAAC,EAAE,CAAC;IAEL,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;AAC/C,CAAC;AAAC,OAAO,CAAC,EAAE,CAAC;IACX,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,KAAK,EAAG,CAAW,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC;IAC7D,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import ts from "typescript";
|
|
2
|
+
/**
|
|
3
|
+
* Find tsconfig.json by walking up from a file path
|
|
4
|
+
*/
|
|
5
|
+
export declare function findTsConfig(fromPath: string): string;
|
|
6
|
+
export declare class TypeScriptService {
|
|
7
|
+
private service;
|
|
8
|
+
private projectRoot;
|
|
9
|
+
constructor(configPath: string);
|
|
10
|
+
/**
|
|
11
|
+
* Create a service by auto-detecting tsconfig.json from a file path
|
|
12
|
+
*/
|
|
13
|
+
static fromFile(filePath: string): TypeScriptService;
|
|
14
|
+
private getSourceFile;
|
|
15
|
+
private toOffset;
|
|
16
|
+
private toLineCol;
|
|
17
|
+
hover(file: string, line: number, col: number): {
|
|
18
|
+
type: string;
|
|
19
|
+
docs: string | null;
|
|
20
|
+
} | null;
|
|
21
|
+
definition(file: string, line: number, col: number): {
|
|
22
|
+
preview: string | undefined;
|
|
23
|
+
line?: number | undefined;
|
|
24
|
+
col?: number | undefined;
|
|
25
|
+
file: string;
|
|
26
|
+
}[] | null;
|
|
27
|
+
references(file: string, line: number, col: number): {
|
|
28
|
+
isWriteAccess: boolean;
|
|
29
|
+
line?: number | undefined;
|
|
30
|
+
col?: number | undefined;
|
|
31
|
+
file: string;
|
|
32
|
+
}[] | null;
|
|
33
|
+
diagnostics(file: string): {
|
|
34
|
+
message: string;
|
|
35
|
+
code: number;
|
|
36
|
+
line?: number | undefined;
|
|
37
|
+
col?: number | undefined;
|
|
38
|
+
}[];
|
|
39
|
+
completions(file: string, line: number, col: number): {
|
|
40
|
+
name: string;
|
|
41
|
+
kind: ts.ScriptElementKind;
|
|
42
|
+
}[] | null;
|
|
43
|
+
}
|
|
44
|
+
export { ts };
|
|
45
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,YAAY,CAAC;AAI5B;;GAEG;AACH,wBAAgB,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAYrD;AAED,qBAAa,iBAAiB;IAC5B,OAAO,CAAC,OAAO,CAAqB;IACpC,OAAO,CAAC,WAAW,CAAS;gBAEhB,UAAU,EAAE,MAAM;IA4B9B;;OAEG;IACH,MAAM,CAAC,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,iBAAiB;IAKpD,OAAO,CAAC,aAAa;IAIrB,OAAO,CAAC,QAAQ;IAMhB,OAAO,CAAC,SAAS;IAOjB,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM;;;;IAW7C,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM;;;;;;IAiBlD,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM;;;;;;IAYlD,WAAW,CAAC,IAAI,EAAE,MAAM;;;;;;IAWxB,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM;;;;CAUpD;AAED,OAAO,EAAE,EAAE,EAAE,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import ts from "typescript";
|
|
2
|
+
import path from "path";
|
|
3
|
+
import fs from "fs";
|
|
4
|
+
/**
|
|
5
|
+
* Find tsconfig.json by walking up from a file path
|
|
6
|
+
*/
|
|
7
|
+
export function findTsConfig(fromPath) {
|
|
8
|
+
let dir = fs.statSync(fromPath).isDirectory() ? fromPath : path.dirname(fromPath);
|
|
9
|
+
while (dir !== path.dirname(dir)) {
|
|
10
|
+
const configPath = path.join(dir, "tsconfig.json");
|
|
11
|
+
if (fs.existsSync(configPath)) {
|
|
12
|
+
return configPath;
|
|
13
|
+
}
|
|
14
|
+
dir = path.dirname(dir);
|
|
15
|
+
}
|
|
16
|
+
throw new Error(`Could not find tsconfig.json starting from ${fromPath}`);
|
|
17
|
+
}
|
|
18
|
+
export class TypeScriptService {
|
|
19
|
+
constructor(configPath) {
|
|
20
|
+
const absoluteConfigPath = path.resolve(configPath);
|
|
21
|
+
this.projectRoot = path.dirname(absoluteConfigPath);
|
|
22
|
+
const configFile = ts.readConfigFile(absoluteConfigPath, ts.sys.readFile);
|
|
23
|
+
const parsed = ts.parseJsonConfigFileContent(configFile.config, ts.sys, this.projectRoot);
|
|
24
|
+
const host = {
|
|
25
|
+
getScriptFileNames: () => parsed.fileNames,
|
|
26
|
+
getScriptVersion: () => "1",
|
|
27
|
+
getScriptSnapshot: (fileName) => {
|
|
28
|
+
if (!fs.existsSync(fileName))
|
|
29
|
+
return undefined;
|
|
30
|
+
return ts.ScriptSnapshot.fromString(fs.readFileSync(fileName, "utf-8"));
|
|
31
|
+
},
|
|
32
|
+
getCurrentDirectory: () => this.projectRoot,
|
|
33
|
+
getCompilationSettings: () => parsed.options,
|
|
34
|
+
getDefaultLibFileName: ts.getDefaultLibFilePath,
|
|
35
|
+
fileExists: ts.sys.fileExists,
|
|
36
|
+
readFile: ts.sys.readFile,
|
|
37
|
+
};
|
|
38
|
+
this.service = ts.createLanguageService(host, ts.createDocumentRegistry());
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Create a service by auto-detecting tsconfig.json from a file path
|
|
42
|
+
*/
|
|
43
|
+
static fromFile(filePath) {
|
|
44
|
+
const configPath = findTsConfig(filePath);
|
|
45
|
+
return new TypeScriptService(configPath);
|
|
46
|
+
}
|
|
47
|
+
getSourceFile(file) {
|
|
48
|
+
return this.service.getProgram()?.getSourceFile(file);
|
|
49
|
+
}
|
|
50
|
+
toOffset(file, line, col) {
|
|
51
|
+
const sf = this.getSourceFile(file);
|
|
52
|
+
if (!sf)
|
|
53
|
+
throw new Error(`File not found: ${file}`);
|
|
54
|
+
return sf.getPositionOfLineAndCharacter(line - 1, col - 1);
|
|
55
|
+
}
|
|
56
|
+
toLineCol(file, offset) {
|
|
57
|
+
const sf = this.getSourceFile(file);
|
|
58
|
+
if (!sf)
|
|
59
|
+
return null;
|
|
60
|
+
const { line, character } = sf.getLineAndCharacterOfPosition(offset);
|
|
61
|
+
return { line: line + 1, col: character + 1 };
|
|
62
|
+
}
|
|
63
|
+
hover(file, line, col) {
|
|
64
|
+
const pos = this.toOffset(file, line, col);
|
|
65
|
+
const info = this.service.getQuickInfoAtPosition(file, pos);
|
|
66
|
+
if (!info)
|
|
67
|
+
return null;
|
|
68
|
+
return {
|
|
69
|
+
type: ts.displayPartsToString(info.displayParts),
|
|
70
|
+
docs: info.documentation ? ts.displayPartsToString(info.documentation) : null,
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
definition(file, line, col) {
|
|
74
|
+
const pos = this.toOffset(file, line, col);
|
|
75
|
+
const defs = this.service.getDefinitionAtPosition(file, pos);
|
|
76
|
+
if (!defs?.length)
|
|
77
|
+
return null;
|
|
78
|
+
return defs.map((d) => {
|
|
79
|
+
const sf = this.getSourceFile(d.fileName);
|
|
80
|
+
const loc = this.toLineCol(d.fileName, d.textSpan.start);
|
|
81
|
+
const preview = sf?.text
|
|
82
|
+
.slice(d.textSpan.start, d.textSpan.start + 200)
|
|
83
|
+
.split("\n")
|
|
84
|
+
.slice(0, 5)
|
|
85
|
+
.join("\n");
|
|
86
|
+
return { file: d.fileName, ...loc, preview };
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
references(file, line, col) {
|
|
90
|
+
const pos = this.toOffset(file, line, col);
|
|
91
|
+
const refs = this.service.getReferencesAtPosition(file, pos);
|
|
92
|
+
if (!refs?.length)
|
|
93
|
+
return null;
|
|
94
|
+
return refs.map((r) => ({
|
|
95
|
+
file: r.fileName,
|
|
96
|
+
...this.toLineCol(r.fileName, r.textSpan.start),
|
|
97
|
+
isWriteAccess: r.isWriteAccess,
|
|
98
|
+
}));
|
|
99
|
+
}
|
|
100
|
+
diagnostics(file) {
|
|
101
|
+
const semantic = this.service.getSemanticDiagnostics(file);
|
|
102
|
+
const syntactic = this.service.getSyntacticDiagnostics(file);
|
|
103
|
+
return [...syntactic, ...semantic].map((d) => ({
|
|
104
|
+
...this.toLineCol(file, d.start ?? 0),
|
|
105
|
+
message: ts.flattenDiagnosticMessageText(d.messageText, "\n"),
|
|
106
|
+
code: d.code,
|
|
107
|
+
}));
|
|
108
|
+
}
|
|
109
|
+
completions(file, line, col) {
|
|
110
|
+
const pos = this.toOffset(file, line, col);
|
|
111
|
+
const completions = this.service.getCompletionsAtPosition(file, pos, undefined);
|
|
112
|
+
if (!completions)
|
|
113
|
+
return null;
|
|
114
|
+
return completions.entries.slice(0, 50).map((e) => ({
|
|
115
|
+
name: e.name,
|
|
116
|
+
kind: e.kind,
|
|
117
|
+
}));
|
|
118
|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AAE,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "agent-intel",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"description": "IDE intelligence for AI coding agents. Hover, go-to-definition, find references, diagnostics, and completions.",
|
|
6
|
+
"main": "./dist/index.js",
|
|
7
|
+
"types": "./dist/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./dist/index.d.ts",
|
|
11
|
+
"import": "./dist/index.js",
|
|
12
|
+
"require": "./dist/index.js"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"bin": {
|
|
16
|
+
"agent-intel": "./dist/cli.js"
|
|
17
|
+
},
|
|
18
|
+
"files": [
|
|
19
|
+
"dist"
|
|
20
|
+
],
|
|
21
|
+
"scripts": {
|
|
22
|
+
"build": "tsc",
|
|
23
|
+
"dev": "tsc --watch",
|
|
24
|
+
"test": "tsc -p tsconfig.test.json && node --test dist-test/test/**/*.test.js",
|
|
25
|
+
"prepublishOnly": "npm run build"
|
|
26
|
+
},
|
|
27
|
+
"keywords": [
|
|
28
|
+
"typescript",
|
|
29
|
+
"intellisense",
|
|
30
|
+
"language-server",
|
|
31
|
+
"ai",
|
|
32
|
+
"agent",
|
|
33
|
+
"ide",
|
|
34
|
+
"intelligence",
|
|
35
|
+
"hover",
|
|
36
|
+
"definition",
|
|
37
|
+
"references",
|
|
38
|
+
"diagnostics",
|
|
39
|
+
"completions"
|
|
40
|
+
],
|
|
41
|
+
"license": "MIT",
|
|
42
|
+
"engines": {
|
|
43
|
+
"node": ">=18"
|
|
44
|
+
},
|
|
45
|
+
"devDependencies": {
|
|
46
|
+
"@types/node": "^20.19.30",
|
|
47
|
+
"typescript": "^5.0.0"
|
|
48
|
+
},
|
|
49
|
+
"dependencies": {
|
|
50
|
+
"typescript": "^5.0.0"
|
|
51
|
+
}
|
|
52
|
+
}
|