{"_id":"@codebolt/codeparser","_rev":"5-46f05888336f40bee2c58f6456d097f3","name":"@codebolt/codeparser","dist-tags":{"latest":"1.2.1"},"versions":{"1.0.0":{"name":"@codebolt/codeparser","version":"1.0.0","keywords":["parser","tree-sitter","ast","code-analysis","typescript","javascript","python","rust","go","java","cpp","c","csharp","ruby","php","swift"],"author":{"name":"Codebolt"},"license":"MIT","_id":"@codebolt/codeparser@1.0.0","maintainers":[{"name":"utkarshx","email":"utk.shukla@gmail.com"}],"homepage":"https://codeboltai.github.io","bugs":{"url":"https://github.com/codeboltai/codeboltjs/issues"},"dist":{"shasum":"1ef607bbb19bde9e6add184df505fd8b72d7a0e4","tarball":"https://registry.npmjs.org/@codebolt/codeparser/-/codeparser-1.0.0.tgz","fileCount":67,"integrity":"sha512-AGslznaWTIpJ61CzUJ0ZQbkbhQAc7eiaE1JoOrMpATTSUUamDH0wU2WKfnYNIb68wNqiCk/dhI7tmgszl4CYgQ==","signatures":[{"sig":"MEUCIQDStadfFm8DlIkiZt9dah/p27WW085fAFoJHCrhFOiHUwIgbVBgszVvVotZOdrOfF+YSkGO8b3F4dTJzq71dMd+dNE=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":23112832},"main":"dist/index.js","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"gitHead":"65f6706159a1f8ea1962e56b61a8630e1822fd85","scripts":{"dev":"tsc --watch","test":"jest","build":"tsc && node scripts/copy-wasm.js","clean":"rm -rf dist","prepublishOnly":"npm run clean && npm run build"},"_npmUser":{"name":"utkarshx","email":"utk.shukla@gmail.com"},"repository":{"url":"git+https://github.com/codeboltai/codeboltjs.git","type":"git","directory":"codeparser"},"_npmVersion":"11.5.1","description":"Code parsing utilities with tree-sitter support for multiple programming languages","directories":{},"_nodeVersion":"20.18.3","dependencies":{"web-tree-sitter":"^0.24.1","@codebolt/globby":"^1.0.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","typescript":"^5.4.5","@types/node":"^20.14.2"},"_npmOperationalInternal":{"tmp":"tmp/codeparser_1.0.0_1754972708749_0.23703665880550462","host":"s3://npm-registry-packages-npm-production"}},"1.1.0":{"name":"@codebolt/codeparser","version":"1.1.0","keywords":["parser","tree-sitter","ast","code-analysis","typescript","javascript","python","rust","go","java","cpp","c","csharp","ruby","php","swift"],"author":{"name":"Codebolt"},"license":"MIT","_id":"@codebolt/codeparser@1.1.0","maintainers":[{"name":"utkarshx","email":"utk.shukla@gmail.com"}],"homepage":"https://codeboltai.github.io","bugs":{"url":"https://github.com/codeboltai/codeboltjs/issues"},"dist":{"shasum":"84f9326cd07c253060a729225911dd4d678728eb","tarball":"https://registry.npmjs.org/@codebolt/codeparser/-/codeparser-1.1.0.tgz","fileCount":67,"integrity":"sha512-6H4M88COMdbDmzIZqwk3nzqSfm+U5Om7StrTmiwkNqyLKh5SPt1EXyrXPBg9X91AU9cKVxxm6/JZO3Q0c0ZzsQ==","signatures":[{"sig":"MEYCIQDOx1YCfzOv94gwxTN/ApJJhCrTAZRqARhde2qFRS9lpAIhAJcKfPOwtJ7JeUV3XJP7bVHbuS1G4c8ButrdQ8/CoO3K","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":23112830},"main":"dist/index.js","_from":"file:codebolt-codeparser-1.1.0.tgz","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"scripts":{"dev":"tsc --watch","lint":"tsc --noEmit","test":"jest --passWithNoTests","build":"tsc && node scripts/copy-wasm.js","clean":"rm -rf dist"},"_npmUser":{"name":"utkarshx","email":"utk.shukla@gmail.com"},"_resolved":"/private/var/folders/rx/lntsxpxx7h9b79h0j7mv34gc0000gn/T/981aaed433e2bb16020c3174d49b3730/codebolt-codeparser-1.1.0.tgz","_integrity":"sha512-6H4M88COMdbDmzIZqwk3nzqSfm+U5Om7StrTmiwkNqyLKh5SPt1EXyrXPBg9X91AU9cKVxxm6/JZO3Q0c0ZzsQ==","repository":{"url":"git+https://github.com/codeboltai/codeboltjs.git","type":"git","directory":"packages/codeparser"},"_npmVersion":"11.5.1","description":"Code parsing utilities with tree-sitter support for multiple programming languages","directories":{},"_nodeVersion":"20.18.3","dependencies":{"web-tree-sitter":"^0.24.1","@codebolt/globby":"^1.0.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","typescript":"^5.4.5","@types/node":"^20.14.2"},"_npmOperationalInternal":{"tmp":"tmp/codeparser_1.1.0_1754976728437_0.04126835266615658","host":"s3://npm-registry-packages-npm-production"}},"1.2.0":{"name":"@codebolt/codeparser","version":"1.2.0","keywords":["parser","tree-sitter","ast","code-analysis","typescript","javascript","python","rust","go","java","cpp","c","csharp","ruby","php","swift"],"author":{"name":"Codebolt"},"license":"MIT","_id":"@codebolt/codeparser@1.2.0","maintainers":[{"name":"utkarshx","email":"utk.shukla@gmail.com"}],"homepage":"https://codeboltai.github.io","bugs":{"url":"https://github.com/codeboltai/codeboltjs/issues"},"dist":{"shasum":"3ec98fac106654167fbaf4d38f31553668872bec","tarball":"https://registry.npmjs.org/@codebolt/codeparser/-/codeparser-1.2.0.tgz","fileCount":67,"integrity":"sha512-99576VXUQSARMVJo8QD94UUXpGndtbsmNxbG74+Jus9GKdxan2vsGMzuQIKI0J2/AjYdfZcfmt7w4l7Hxb9AUw==","signatures":[{"sig":"MEUCIQDXkvN9JSjcdRCiLyks4wbogDKWTiVGflP6e9juXZUlDgIgI/n8+KLakMcU9y6wKNZI4+s/xdBUvNlftazEv0q8wdM=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":23112830},"main":"dist/index.js","_from":"file:codebolt-codeparser-1.2.0.tgz","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"scripts":{"dev":"tsc --watch","lint":"tsc --noEmit","test":"jest --passWithNoTests","build":"tsc && node scripts/copy-wasm.js","clean":"rm -rf dist"},"_npmUser":{"name":"utkarshx","email":"utk.shukla@gmail.com"},"_resolved":"/private/var/folders/rx/lntsxpxx7h9b79h0j7mv34gc0000gn/T/e11b60c69d16a981d5efba98f06af68c/codebolt-codeparser-1.2.0.tgz","_integrity":"sha512-99576VXUQSARMVJo8QD94UUXpGndtbsmNxbG74+Jus9GKdxan2vsGMzuQIKI0J2/AjYdfZcfmt7w4l7Hxb9AUw==","repository":{"url":"git+https://github.com/codeboltai/codeboltjs.git","type":"git","directory":"packages/codeparser"},"_npmVersion":"11.5.1","description":"Code parsing utilities with tree-sitter support for multiple programming languages","directories":{},"_nodeVersion":"20.18.3","dependencies":{"web-tree-sitter":"^0.24.1","@codebolt/globby":"^1.0.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","typescript":"^5.4.5","@types/node":"^20.14.2"},"_npmOperationalInternal":{"tmp":"tmp/codeparser_1.2.0_1754977730710_0.12476508802694442","host":"s3://npm-registry-packages-npm-production"}},"1.2.1":{"name":"@codebolt/codeparser","version":"1.2.1","keywords":["parser","tree-sitter","ast","code-analysis","typescript","javascript","python","rust","go","java","cpp","c","csharp","ruby","php","swift"],"author":{"name":"Codebolt"},"license":"MIT","_id":"@codebolt/codeparser@1.2.1","maintainers":[{"name":"utkarshx","email":"utk.shukla@gmail.com"}],"homepage":"https://codeboltai.github.io","bugs":{"url":"https://github.com/codeboltai/codeboltjs/issues"},"dist":{"shasum":"e4b9f30cb6d292aff72bf857fa17970094ce7788","tarball":"https://registry.npmjs.org/@codebolt/codeparser/-/codeparser-1.2.1.tgz","fileCount":67,"integrity":"sha512-x67gUOqNVIeXMXBPVyQhAnQyqz4IMnZ4ke2jE1SC5AXk62E1A7TrbOW5tLcln1ZlSG5JgN5llC/FD4gmhJaabw==","signatures":[{"sig":"MEUCIQDuwVdz5puk6RfikGhd6o4uUNzIHHWT5LF9FtVtBYFD7gIgAPR9Ha1xyMcmhjcqDQ8sfv9mIzM8+2cuCaMhPpJGcA0=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":23112830},"main":"dist/index.js","_from":"file:codebolt-codeparser-1.2.1.tgz","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"scripts":{"dev":"tsc --watch","lint":"tsc --noEmit","test":"jest --passWithNoTests","build":"tsc && node scripts/copy-wasm.js","clean":"rm -rf dist"},"_npmUser":{"name":"utkarshx","email":"utk.shukla@gmail.com"},"_resolved":"/private/var/folders/rx/lntsxpxx7h9b79h0j7mv34gc0000gn/T/89294506759961c033a71f3df00a8fb7/codebolt-codeparser-1.2.1.tgz","_integrity":"sha512-x67gUOqNVIeXMXBPVyQhAnQyqz4IMnZ4ke2jE1SC5AXk62E1A7TrbOW5tLcln1ZlSG5JgN5llC/FD4gmhJaabw==","repository":{"url":"git+https://github.com/codeboltai/codeboltjs.git","type":"git","directory":"packages/codeparser"},"_npmVersion":"11.5.1","description":"Code parsing utilities with tree-sitter support for multiple programming languages","directories":{},"_nodeVersion":"20.18.3","dependencies":{"web-tree-sitter":"^0.24.1","@codebolt/globby":"^1.0.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","typescript":"^5.4.5","@types/node":"^20.14.2"},"_npmOperationalInternal":{"tmp":"tmp/codeparser_1.2.1_1754978098003_0.29244580632833994","host":"s3://npm-registry-packages-npm-production"}}},"time":{"created":"2025-08-12T04:25:08.638Z","modified":"2025-10-29T13:31:58.333Z","1.0.0":"2025-08-12T04:25:08.957Z","1.1.0":"2025-08-12T05:32:08.664Z","1.2.0":"2025-08-12T05:48:50.916Z","1.2.1":"2025-08-12T05:54:58.198Z"},"bugs":{"url":"https://github.com/codeboltai/codeboltjs/issues"},"author":{"name":"Codebolt"},"license":"MIT","homepage":"https://codeboltai.github.io","keywords":["parser","tree-sitter","ast","code-analysis","typescript","javascript","python","rust","go","java","cpp","c","csharp","ruby","php","swift"],"repository":{"url":"git+https://github.com/codeboltai/codeboltjs.git","type":"git","directory":"packages/codeparser"},"description":"Code parsing utilities with tree-sitter support for multiple programming languages","maintainers":[{"email":"ravi@arrowai.com","name":"ravirawatsingh"},{"email":"utk.shukla@gmail.com","name":"utkarshx"}],"readme":"# @codebolt/codeparser\n\nCode parsing utilities with tree-sitter support for multiple programming languages.\n\n## Features\n\n- Parse source code files across multiple programming languages\n- Extract definitions and code structure using tree-sitter parsers\n- Support for JavaScript, TypeScript, Python, Rust, Go, Java, C/C++, C#, Ruby, PHP, and Swift\n- Tree-sitter WASM binaries for cross-platform compatibility\n\n## Installation\n\n```bash\nnpm install @codebolt/codeparser\n```\n\n## Usage\n\n```typescript\nimport { parseSourceCodeForDefinitionsTopLevel, parseFile, loadRequiredLanguageParsers } from '@codebolt/codeparser';\n\n// Parse a directory for source code definitions\nconst definitions = await parseSourceCodeForDefinitionsTopLevel('./src');\n\n// Parse a specific file\nconst languageParsers = await loadRequiredLanguageParsers(['./src/example.ts']);\nconst fileDefinitions = await parseFile('./src/example.ts', languageParsers);\n```\n\n## Supported Languages\n\n- JavaScript (.js, .jsx)\n- TypeScript (.ts, .tsx)\n- Python (.py)\n- Rust (.rs)\n- Go (.go)\n- Java (.java)\n- C (.c, .h)\n- C++ (.cpp, .hpp)\n- C# (.cs)\n- Ruby (.rb)\n- PHP (.php)\n- Swift (.swift)\n\n## API\n\n### Functions\n\n- `parseSourceCodeForDefinitionsTopLevel(dirPath: string)` - Parse a directory for source code definitions\n- `parseFile(filePath: string, languageParsers: LanguageParser)` - Parse a specific file\n- `loadRequiredLanguageParsers(filesToParse: string[])` - Load language parsers for specific files\n- `listFiles(dirPath: string, recursive: boolean)` - List files in a directory\n- `separateFiles(allFiles: string[])` - Separate files into parseable and remaining files\n\n### Types\n\n- `LanguageParser` - Language parser interface\n- `ASTNode` - Abstract syntax tree node interface\n- `ParserConfig` - Parser configuration interface\n","readmeFilename":"README.md"}