{"_id":"@adhd/apigen-core","name":"@adhd/apigen-core","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"@adhd/apigen-core","version":"0.1.0","dependencies":{"ts-morph":"^23.0.0","ts-json-schema-generator":"^2.3.0","pino":"10.3.1"},"main":"./index.js","module":"./index.mjs","typings":"./index.d.ts","publishConfig":{"access":"public"},"gitHead":"70af56163bc48ddfa898e1202c9bd768e7372a33","_id":"@adhd/apigen-core@0.1.0","description":"Schema **extraction** and **composition** for apigen, plus the shared types and the `OutputPlugin` contract every target plugin implements. Pure TypeScript — safe in Node and the browser (**platform: shared**).","_nodeVersion":"24.11.1","_npmVersion":"11.6.2","dist":{"integrity":"sha512-vwPhb30kYGdBZ0V8X7P2Oqwn1fqhPTTqIkcpM+Du2C7x21ksPKnVQYQ+wboC8m2L1868Ml6lT+4A6bj2pCT41A==","shasum":"915a8daccb0392f07ccd6d7e1045550c8d71bd03","tarball":"https://registry.npmjs.org/@adhd/apigen-core/-/apigen-core-0.1.0.tgz","fileCount":18,"unpackedSize":24744769,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIDdML8M1lTvh/y2/AijYW4wW0W25ewbUnSdWX1dLOjLfAiBO35oDDD24xE3g3K10HJuHcmmP4FmLBbt7XQEbrvJgaw=="}]},"_npmUser":{"name":"pseudosky","email":"skywinston.sk@gmail.com"},"directories":{},"maintainers":[{"name":"pseudosky","email":"skywinston.sk@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/apigen-core_0.1.0_1782256648846_0.14271337205158585"},"_hasShrinkwrap":false}},"time":{"created":"2026-06-23T23:17:28.668Z","0.1.0":"2026-06-23T23:17:29.087Z","modified":"2026-06-23T23:17:29.283Z"},"maintainers":[{"name":"pseudosky","email":"skywinston.sk@gmail.com"}],"description":"Schema **extraction** and **composition** for apigen, plus the shared types and the `OutputPlugin` contract every target plugin implements. Pure TypeScript — safe in Node and the browser (**platform: shared**).","readme":"# @adhd/apigen-core\n\nSchema **extraction** and **composition** for apigen, plus the shared types and the\n`OutputPlugin` contract every target plugin implements. Pure TypeScript — safe in Node and\nthe browser (**platform: shared**).\n\nPart of [apigen](../README.md). For end-to-end usage see [`../cli`](../cli).\n\n## What it does\n\nReads a TypeScript source with [ts-morph](https://ts-morph.com/), derives JSON Schemas for\neach exported function's parameters and return type (via `ts-json-schema-generator`), and\ncomposes them with any middleware-contributed envelope fields. The first parameter named\n`ctx` is excluded from the schema by convention (name-only).\n\n## Public API\n\n```ts\nimport { generateSchemas, composeSchemas } from '@adhd/apigen-core'\nimport type {\n  GeneratedSchemas, ComposedSchemas, ExportMode, GenerateSchemasOptions,\n  PluginInput, PluginOutput, RunInput, OutputPlugin, Logger,\n} from '@adhd/apigen-core'\n```\n\n- **`generateSchemas(opts)`** — source file → per-export input/output JSON Schemas.\n- **`composeSchemas(...)`** — fold middleware envelope fields into the composed `input`\n  (always with a `data: {}` wrapper, even for zero-param functions).\n- **`OutputPlugin`** — `{ id, generate(input): PluginOutput, run?(input): Promise<void> }`.\n  `PluginOutput.files` is language-agnostic (`{ path, content }[]`), so plugins may emit any\n  file type.\n\n## Develop\n\n```bash\nnpx nx build apigen-core\nnpx nx test  apigen-core\n```\n","readmeFilename":"README.md","_rev":"1-6eb6465942f6f826bcd67270a2252e6a"}