{"ref":"artifact:miyasuta-cap-cds-typer","page":"/artifacts/miyasuta-cap-cds-typer","json":"/artifacts/miyasuta-cap-cds-typer.json","generated":"2026-10-26","drafted_with_ai":true,"entity":{"id":"miyasuta-cap-cds-typer","name":"cap-cds-typer","artifact_type":"sample","ecosystem":"cap","domain":"developer-experience","origin_ring":"independent","description":{"one_line":"A CAP service in TypeScript whose handlers import `Books` and `Order` from `#cds-models/CatalogService`, the types [@cap-js/cds-typer](artifact:cap-js-cds-typer) generates from the model.","short":"CAP service in TypeScript using types from @cap-js/cds-typer","what_it_solves":"Three files make that import resolve: [@cap-js/cds-typer](artifact:cap-js-cds-typer) as a devDependency, an `imports` map for `#cds-models/*` in package.json, and the same path under `compilerOptions.paths` in tsconfig.json. The service itself is short: `Books` read-only, `Orders` draft-enabled with `amount` annotated `FieldControl: #ReadOnly`, and a before-CREATE handler that reads a book's price through the generated entity and multiplies it by the quantity. `build:cf` chains `cds build --production`, a rimraf of the generated `.ts` under `gen/srv/srv`, then `tsc`. The README is the CAP scaffold's own getting-started text, so the wiring and that one handler are the whole of it."},"links":{"repo":"https://github.com/miyasuta/cap-cds-typer"},"identity":{"license":"UNLICENSED"},"compat":{"runtimes":["node"],"cds_range":"^7","deployment":["cf"]},"demonstrates":["capability:typing"],"requires":[{"ref":"artifact:cap-js-cds-typer","for":"The generated model the handlers import from: the project declares the generator and maps `#cds-models/*` to its output in package.json and again in tsconfig.json.","requirement":"required","sources":[{"url":"https://raw.githubusercontent.com/miyasuta/cap-cds-typer/main/package.json","title":"miyasuta/cap-cds-typer — package.json, devDependencies","checked":"2026-10-08","quote":"\"@cap-js/cds-typer\": \">=0.1\","},{"url":"https://raw.githubusercontent.com/miyasuta/cap-cds-typer/main/package.json","title":"miyasuta/cap-cds-typer — package.json, imports","checked":"2026-10-08","quote":"\"imports\": {\n    \"#cds-models/*\": \"./@cds-models/*/index.js\"\n  }"},{"url":"https://raw.githubusercontent.com/miyasuta/cap-cds-typer/main/srv/cat-service.ts","title":"miyasuta/cap-cds-typer — srv/cat-service.ts","checked":"2026-10-08","quote":"const { Book, Books, Order } = await import('#cds-models/CatalogService')"}]}],"maintainers":["actor:mio-yasutake"],"provenance":{"discovered_via":[{"source":"source:github","channel":"miyasuta"}],"first_seen":"2026-10-08"},"use_as":"reference","contributors":["actor:mio-yasutake"],"drafted_with_ai":true},"effective_normative_relations":[],"readings":{"liveness":[{"label":"Maintenance","tier":"unknown","evidence":"no release data"},{"label":"Continuity","tier":"fair","evidence":"one contributor, personally owned"},{"label":"Repository","tier":"poor","evidence":"pushed 2023-12, not archived"}],"compatibility":[{"label":"Declared for","tier":"poor","evidence":"^7 — stops before cds 9"},{"label":"Survived majors","tier":"unknown","evidence":"no release dates"},{"label":"Maintainer's CI","tier":"fair","evidence":"no CI configured"}],"practice":[{"label":"Tests","tier":"fair","evidence":"none found in the tree"},{"label":"Docs","tier":"poor","evidence":"README 1 KB"},{"label":"Changelog","tier":"fair","evidence":"none in the repo"}],"reach":[{"value":null,"unit":"installs/week"},{"value":0,"unit":"watching"}]},"signals":{"crawled_at":"2026-10-25","npm":"not published under this name","stars":0,"forks":0,"open_issues":1,"archived":false,"pushed_at":"2023-12-26","license_spdx":null,"org_owned":false,"default_branch":"main","created_at":"2023-12-14T21:02:05Z","open_prs":0,"tree_truncated":false,"test_files":0,"workflows":0,"other_ci":false,"readme_bytes":675,"docs_files":0,"changelog":false,"license_file":false,"dts_files":0,"first_commit":"2023-12-14","last_commit":"2023-12-22","commits":5,"contributors":1,"readme_path":"README.md","readme_sha":"d18474235339ae351787f5d911596633cb257612","repo_read":"2026-10-25"},"edges":{"maintainers":[{"ref":"actor:mio-yasutake","name":"Mio Yasutake","json":"/actors/mio-yasutake.json"}],"contributors":[{"ref":"actor:mio-yasutake","name":"Mio Yasutake","json":"/actors/mio-yasutake.json"}],"explained_by":[],"alternative_to_this":[],"needed_by":[],"available_via":[],"parts":[],"add_ons":[],"answered_through_parts":[]}}