{"_id":"@axiomdb/ts-plugin","_rev":"3-4bcf302f5587ea5eaa46f0400745b91c","name":"@axiomdb/ts-plugin","dist-tags":{"latest":"0.1.1"},"versions":{"0.0.1":{"name":"@axiomdb/ts-plugin","version":"0.0.1","license":"MIT","_id":"@axiomdb/ts-plugin@0.0.1","maintainers":[{"name":"aidanmorris810","email":"aidanmorris810@gmail.com"}],"dist":{"shasum":"f34b04ef658a3d5b251e0c4b7bf2a065cd70a4e3","tarball":"https://registry.npmjs.org/@axiomdb/ts-plugin/-/ts-plugin-0.0.1.tgz","fileCount":5,"integrity":"sha512-2N6ZkrMHUzq25JpdBS7Y7aJKMvNbooQklQVVKM3IgaWUah0/10IYgsLYvAgLZhPJt/tmDZoPqt2l1fQaPZbl+A==","signatures":[{"sig":"MEUCIGVMvdQBi7MVNVU5Mryt9tYrPVRWkn58jHYBdGtuF+hkAiEA+G1cGm1ntKfCyj/oJxbjhqPIKKeu9Y+4+OCsPjyJ47U=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":659835},"main":"./dist/index.js","_from":"file:axiomdb-ts-plugin-0.0.1.tgz","exports":{".":{"require":"./dist/index.js"}},"scripts":{"test":"vitest run","build":"esbuild src/index.ts --bundle --outfile=dist/index.js --format=cjs --platform=node --sourcemap","clean":"rm -rf dist","typecheck":"tsc --noEmit"},"_npmUser":{"name":"aidanmorris810","email":"aidanmorris810@gmail.com"},"_resolved":"/private/var/folders/mv/006n9_8j0sv_j_khgp5txcbc0000gn/T/8bcc8982335883c4f73dc88044fae686/axiomdb-ts-plugin-0.0.1.tgz","_integrity":"sha512-2N6ZkrMHUzq25JpdBS7Y7aJKMvNbooQklQVVKM3IgaWUah0/10IYgsLYvAgLZhPJt/tmDZoPqt2l1fQaPZbl+A==","_npmVersion":"11.6.2","description":"TypeScript language service plugin for AxiomDB — validates SQL templates and provides type info","directories":{},"_nodeVersion":"25.2.1","dependencies":{"@axiomdb/sql-parser":"0.0.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^2.1.9","esbuild":"^0.24.0","typescript":"^5.7.0","@types/node":"^25.6.0"},"_npmOperationalInternal":{"tmp":"tmp/ts-plugin_0.0.1_1780024320640_0.12130233381066757","host":"s3://npm-registry-packages-npm-production"}},"0.1.0":{"name":"@axiomdb/ts-plugin","version":"0.1.0","license":"MIT","_id":"@axiomdb/ts-plugin@0.1.0","maintainers":[{"name":"aidanmorris810","email":"aidanmorris810@gmail.com"}],"dist":{"shasum":"40e165340c877148039be0be46a7d49947109c0d","tarball":"https://registry.npmjs.org/@axiomdb/ts-plugin/-/ts-plugin-0.1.0.tgz","fileCount":5,"integrity":"sha512-ixn+SN35sDMKUvAbQxuLs0h/iuGVg2diyAmN7amZf1R4vyfcDdUweZnA0SkRggfb/26XP9oHGlIR7xPGJ3Rt8w==","signatures":[{"sig":"MEUCIGTyIE4bP9OC12CL5e4zE5JV1fifwjnL3sI6wlmnLX2CAiEArLBIlIATZWUv48JSn9SNkVzt1eEWtRQ/9LXQMQmVmCA=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":660098},"main":"./dist/index.js","_from":"file:axiomdb-ts-plugin-0.1.0.tgz","exports":{".":{"require":"./dist/index.js"}},"scripts":{"test":"vitest run","build":"esbuild src/index.ts --bundle --outfile=dist/index.js --format=cjs --platform=node --sourcemap","clean":"rm -rf dist","typecheck":"tsc --noEmit"},"_npmUser":{"name":"aidanmorris810","email":"aidanmorris810@gmail.com"},"_resolved":"/private/var/folders/mv/006n9_8j0sv_j_khgp5txcbc0000gn/T/be3024c1f62d6e8ba2cc81e94a21aa1d/axiomdb-ts-plugin-0.1.0.tgz","_integrity":"sha512-ixn+SN35sDMKUvAbQxuLs0h/iuGVg2diyAmN7amZf1R4vyfcDdUweZnA0SkRggfb/26XP9oHGlIR7xPGJ3Rt8w==","_npmVersion":"11.6.2","description":"TypeScript language service plugin for AxiomDB — validates SQL templates and provides type info","directories":{},"_nodeVersion":"25.2.1","dependencies":{"@axiomdb/sql-parser":"0.1.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^2.1.9","esbuild":"^0.24.0","typescript":"^5.7.0","@types/node":"^25.6.0"},"_npmOperationalInternal":{"tmp":"tmp/ts-plugin_0.1.0_1780158775294_0.3541225664799226","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@axiomdb/ts-plugin","version":"0.1.1","description":"TypeScript language service plugin for AxiomDB — validates SQL templates and provides type info","license":"MIT","main":"./dist/index.js","exports":{".":{"require":"./dist/index.js"}},"dependencies":{"@axiomdb/sql-parser":"0.1.1"},"devDependencies":{"@types/node":"^25.6.0","esbuild":"^0.24.0","typescript":"^5.7.0","vitest":"^2.1.9"},"publishConfig":{"access":"public"},"scripts":{"build":"esbuild src/index.ts --bundle --outfile=dist/index.js --format=cjs --platform=node --sourcemap","typecheck":"tsc --noEmit","clean":"rm -rf dist","test":"vitest run"},"_id":"@axiomdb/ts-plugin@0.1.1","_integrity":"sha512-8qHoQmbJi2JMgxu6rn7AI0uUdb9dC9ocouImrjGmMdCPGrHjsSne++4TLs1Z0GR8BhhbZReMsdiQ4tWs2JZl5g==","_resolved":"/private/var/folders/mv/006n9_8j0sv_j_khgp5txcbc0000gn/T/e7c70be758107008cd637724acb31f65/axiomdb-ts-plugin-0.1.1.tgz","_from":"file:axiomdb-ts-plugin-0.1.1.tgz","_nodeVersion":"25.2.1","_npmVersion":"11.6.2","dist":{"integrity":"sha512-8qHoQmbJi2JMgxu6rn7AI0uUdb9dC9ocouImrjGmMdCPGrHjsSne++4TLs1Z0GR8BhhbZReMsdiQ4tWs2JZl5g==","shasum":"cb9edaaa59d192e7aa330c351bd24d9d95a2eaea","tarball":"https://registry.npmjs.org/@axiomdb/ts-plugin/-/ts-plugin-0.1.1.tgz","fileCount":5,"unpackedSize":672410,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIBmARLFIc6zvhfZRrvx3/jjo8InyKRhvM0qZ3Peu4NRtAiBCFrPlIIrb79dcttwF9cjQgneVQDkLrErQnGVCoKkZJw=="}]},"_npmUser":{"name":"aidanmorris810","email":"aidanmorris810@gmail.com"},"directories":{},"maintainers":[{"name":"aidanmorris810","email":"aidanmorris810@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/ts-plugin_0.1.1_1780853494509_0.6671383471595005"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-29T03:12:00.424Z","modified":"2026-06-07T17:31:34.793Z","0.0.1":"2026-05-29T03:12:00.790Z","0.1.0":"2026-05-30T16:32:55.438Z","0.1.1":"2026-06-07T17:31:34.688Z"},"license":"MIT","description":"TypeScript language service plugin for AxiomDB — validates SQL templates and provides type info","maintainers":[{"name":"aidanmorris810","email":"aidanmorris810@gmail.com"}],"readme":"# @axiomdb/ts-plugin\n\nTypeScript language service plugin for AxiomDB.\n\n## Installation\n\n```bash\nnpm install @axiomdb/ts-plugin\n```\n\n## Overview\n\nProvides inline SQL validation and type information for `sql` tagged templates directly in your editor. Validates SQL syntax, reports errors, and infers result types from your database schema.\n\n## Setup\n\nAdd to your `tsconfig.json`:\n\n```json\n{\n  \"compilerOptions\": {\n    \"plugins\": [{ \"name\": \"@axiomdb/ts-plugin\" }]\n  }\n}\n```\n\nOr use the [AxiomDB VS Code extension](https://marketplace.visualstudio.com/items?itemName=axiomdb.axiomdb-vscode) which configures this automatically.\n\n## Features\n\n### Semantic diagnostics\n\nValidates SQL syntax inside `sql`, `client.psql`, `client.mysql`, and `client.mssql` tagged templates. Syntax errors appear as inline diagnostics in your editor.\n\n### Hover information\n\nHover over a query to see the inferred result type. Hover over SQL keywords to see documentation for the keyword, specific to the dialect in use (PostgreSQL, MySQL, or MSSQL).\n\n### Completions\n\nTable and column name completions inside SQL templates, powered by your schema file.\n\n### Go to definition\n\nCtrl/Cmd+click on table or column names to jump to their definition in the schema.\n\n### Semantic coloring\n\nSQL keywords, identifiers, and literals are semantically classified for syntax coloring within tagged templates.\n\n### Document highlights and outlining\n\nMatching references are highlighted, and SQL template regions support code folding.\n\n## Schema file\n\nThe plugin loads `axiomdb-schema.json` to provide type inference and table/column completions. It searches these locations in order:\n\n1. `<project root>/axiomdb-schema.json`\n2. `<project root>/src/axiomdb-schema.json`\n3. `<project root>/generated/axiomdb-schema.json`\n\nGenerate this file using `@axiomdb/schema`:\n\n```bash\nnpx axiomdb-schema generate --adapter postgres --connection-string $DATABASE_URL\n```\n\nThe plugin watches for file changes and reloads automatically. Without a schema file, SQL syntax validation still works but type inference and table/column completions are unavailable.\n\n## Usage with VS Code\n\nFor VS Code users, the [AxiomDB extension](https://marketplace.visualstudio.com/items?itemName=axiomdb.axiomdb-vscode) bundles this plugin and adds SQL syntax highlighting. The extension configures the TypeScript server plugin automatically — no `tsconfig.json` change needed.\n\nFor other editors that support TypeScript language service plugins, use the `tsconfig.json` setup above.\n\n## License\n\nMIT\n","readmeFilename":"README.md"}