{"_id":"@bpmn-io/moddle-types-generator","_rev":"5-adb62ccd6f6fb640f0730679e0b36bd9","name":"@bpmn-io/moddle-types-generator","dist-tags":{"latest":"0.2.1"},"versions":{"0.1.0":{"name":"@bpmn-io/moddle-types-generator","version":"0.1.0","license":"MIT","_id":"@bpmn-io/moddle-types-generator@0.1.0","maintainers":[{"name":"bpmn-io-admin","email":"bpmnio@camunda.com"},{"name":"nikku","email":"git_nikku@nixis.de"},{"name":"barmac","email":"maciejbarel@gmail.com"},{"name":"philippfromme","email":"philippfromme@outlook.com"},{"name":"maxtru","email":"maximilian.trumpf@camunda.com"},{"name":"skaiir-camunda","email":"valentin.serra@camunda.com"},{"name":"vsgoulart","email":"vinicius@vsgoulart.com"},{"name":"barinali","email":"ali.barin53@gmail.com"},{"name":"jarekdanielak","email":"jarek.danielak@camunda.com"},{"name":"ev-camunda","email":"ev.bilske@camunda.com"},{"name":"alekseymanetov","email":"alekseyManetov@gmail.com"}],"homepage":"https://github.com/bpmn-io/moddle-types-generator#readme","bugs":{"url":"https://github.com/bpmn-io/moddle-types-generator/issues"},"bin":{"moddle-generate-types":"bin/generate-types.js"},"dist":{"shasum":"54ec4f8963f4b114be62bd1836025a374527d43c","tarball":"https://registry.npmjs.org/@bpmn-io/moddle-types-generator/-/moddle-types-generator-0.1.0.tgz","fileCount":5,"integrity":"sha512-/RqVhAuBq4gyJNfBoOhB4w0iH+DopVqMAWT2fI5wYYKHpDkAWm11lVhuMY0ZH2dShCZwy+NqdBSqa9qTGt7UVQ==","signatures":[{"sig":"MEQCIHC1SWq5JjXNtQY9sseRhxxx+aNwBxMQEWSVq3kom1SgAiBgEhpv9h05muK/cNfvvHVgyMqIm5gTYzGoHBb/3TBJAA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":15819},"type":"module","engines":{"node":">=22"},"gitHead":"c89de4646a5696373d021603f31e72d54b2c553c","scripts":{"all":"run-s lint test","dev":"npm test -- --watch","lint":"eslint .","test":"mocha --reporter=spec --recursive test"},"_npmUser":{"name":"alekseymanetov","email":"alekseyManetov@gmail.com"},"repository":{"url":"git+https://github.com/bpmn-io/moddle-types-generator.git","type":"git"},"_npmVersion":"11.13.0","description":"Generate TypeScript type definitions for moddle elements from moddle descriptors.","directories":{},"_nodeVersion":"26.2.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"chai":"^6.2.2","mocha":"^11.7.5","eslint":"^9.39.2","npm-run-all2":"^8.0.4","eslint-plugin-bpmn-io":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/moddle-types-generator_0.1.0_1783425401701_0.39489452449191575","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@bpmn-io/moddle-types-generator","version":"0.2.0","license":"MIT","_id":"@bpmn-io/moddle-types-generator@0.2.0","maintainers":[{"name":"bpmn-io-admin","email":"bpmnio@camunda.com"},{"name":"nikku","email":"git_nikku@nixis.de"},{"name":"barmac","email":"maciejbarel@gmail.com"},{"name":"philippfromme","email":"philippfromme@outlook.com"},{"name":"maxtru","email":"maximilian.trumpf@camunda.com"},{"name":"skaiir-camunda","email":"valentin.serra@camunda.com"},{"name":"vsgoulart","email":"vinicius@vsgoulart.com"},{"name":"barinali","email":"ali.barin53@gmail.com"},{"name":"ev-camunda","email":"ev.bilske@camunda.com"},{"name":"jarekdanielak","email":"jarek.danielak@camunda.com"},{"name":"alekseymanetov","email":"alekseyManetov@gmail.com"}],"homepage":"https://github.com/bpmn-io/moddle-types-generator#readme","bugs":{"url":"https://github.com/bpmn-io/moddle-types-generator/issues"},"bin":{"moddle-generate-types":"bin/generate-types.js"},"dist":{"shasum":"d7894b4ba795f5c663131e089794a29dd90194c3","tarball":"https://registry.npmjs.org/@bpmn-io/moddle-types-generator/-/moddle-types-generator-0.2.0.tgz","fileCount":5,"integrity":"sha512-atKeiFXATK6vgr3n1G/oxWRd31wT1j7Kz22rnMKaR89IUwpjdu73ef+EHl89unpPdAtZ26LjI2zQ98UbCoJl5g==","signatures":[{"sig":"MEYCIQDX683bWbctWk+ZzDZBlYf8JNhQqO6O66wnWdFMD8pFWgIhAJADdCqSGWIVRYumvQSoana1p4b3leNGS79PEjfA1B5b","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":18379},"type":"module","engines":{"node":">=20.12"},"gitHead":"b80e4dc04999d7b5f16396b2f89c022a1f5dfb85","scripts":{"all":"run-s lint test","dev":"npm test -- --watch","lint":"eslint .","test":"mocha --reporter=spec --recursive test"},"_npmUser":{"name":"alekseymanetov","email":"alekseyManetov@gmail.com"},"repository":{"url":"git+https://github.com/bpmn-io/moddle-types-generator.git","type":"git"},"_npmVersion":"11.13.0","description":"Generate TypeScript type definitions for moddle elements from moddle descriptors.","directories":{},"_nodeVersion":"26.2.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"chai":"^6.2.2","mocha":"^11.7.5","eslint":"^9.39.2","npm-run-all2":"^8.0.4","eslint-plugin-bpmn-io":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/moddle-types-generator_0.2.0_1784216938150_0.1625562995455434","host":"s3://npm-registry-packages-npm-production"}},"0.2.1":{"name":"@bpmn-io/moddle-types-generator","version":"0.2.1","license":"MIT","description":"Generate TypeScript type definitions for moddle elements from moddle descriptors.","type":"module","bin":{"moddle-generate-types":"bin/generate-types.js"},"scripts":{"all":"run-s lint test test:types","lint":"eslint .","test":"mocha --reporter=spec --recursive test","test:types":"tsc -p test/types/tsconfig.json","dev":"npm test -- --watch"},"repository":{"type":"git","url":"git+https://github.com/bpmn-io/moddle-types-generator.git"},"publishConfig":{"access":"public"},"engines":{"node":">=20.12"},"devDependencies":{"chai":"^6.2.2","eslint":"^9.39.2","eslint-plugin-bpmn-io":"^2.2.0","mocha":"^11.7.5","moddle":"^8.2.1","npm-run-all2":"^9.0.3","ts-expect":"^1.3.0","typescript":"^5.9.3"},"gitHead":"4a084a9505db1181c1f0d3474572443b1b219489","_id":"@bpmn-io/moddle-types-generator@0.2.1","bugs":{"url":"https://github.com/bpmn-io/moddle-types-generator/issues"},"homepage":"https://github.com/bpmn-io/moddle-types-generator#readme","_nodeVersion":"24.16.0","_npmVersion":"11.17.0","dist":{"integrity":"sha512-UDujhTOl9Wr5frc0mzMIi9hN4FnE2/rLH3oUWu0YS9+NY/nR18pnAGhWb5DU1ciYYRtqTuA5xeS+rV/cknMqXQ==","shasum":"4bc9729e351ca8078d0f729f980a8171ee5e4e53","tarball":"https://registry.npmjs.org/@bpmn-io/moddle-types-generator/-/moddle-types-generator-0.2.1.tgz","fileCount":5,"unpackedSize":19222,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIHPbpaqmKe/lI4NxGxu3+f4kOOA7mVk4ttICPUlT9TeiAiEAoNWw7bPFCANi34WzcjSFeKCA3x24vHJ7+2ghyUJzfj0="}]},"_npmUser":{"name":"nikku","email":"git_nikku@nixis.de"},"directories":{},"maintainers":[{"name":"bpmn-io-admin","email":"bpmnio@camunda.com"},{"name":"nikku","email":"git_nikku@nixis.de"},{"name":"barmac","email":"maciejbarel@gmail.com"},{"name":"philippfromme","email":"philippfromme@outlook.com"},{"name":"maxtru","email":"maximilian.trumpf@camunda.com"},{"name":"skaiir-camunda","email":"valentin.serra@camunda.com"},{"name":"vsgoulart","email":"vinicius@vsgoulart.com"},{"name":"barinali","email":"ali.barin53@gmail.com"},{"name":"ev-camunda","email":"ev.bilske@camunda.com"},{"name":"jarekdanielak","email":"jarek.danielak@camunda.com"},{"name":"alekseymanetov","email":"alekseyManetov@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/moddle-types-generator_0.2.1_1786390824774_0.9221996557166392"},"_hasShrinkwrap":false}},"time":{"created":"2026-07-07T11:56:41.527Z","modified":"2026-08-10T19:40:25.254Z","0.1.0":"2026-07-07T11:56:41.886Z","0.2.0":"2026-07-16T15:48:58.293Z","0.2.1":"2026-08-10T19:40:24.908Z"},"bugs":{"url":"https://github.com/bpmn-io/moddle-types-generator/issues"},"license":"MIT","homepage":"https://github.com/bpmn-io/moddle-types-generator#readme","repository":{"type":"git","url":"git+https://github.com/bpmn-io/moddle-types-generator.git"},"description":"Generate TypeScript type definitions for moddle elements from moddle descriptors.","maintainers":[{"name":"bpmn-io-admin","email":"bpmnio@camunda.com"},{"name":"nikku","email":"git_nikku@nixis.de"},{"name":"barmac","email":"maciejbarel@gmail.com"},{"name":"philippfromme","email":"philippfromme@outlook.com"},{"name":"maxtru","email":"maximilian.trumpf@camunda.com"},{"name":"skaiir-camunda","email":"valentin.serra@camunda.com"},{"name":"vsgoulart","email":"vinicius@vsgoulart.com"},{"name":"barinali","email":"ali.barin53@gmail.com"},{"name":"ev-camunda","email":"ev.bilske@camunda.com"},{"name":"jarekdanielak","email":"jarek.danielak@camunda.com"},{"name":"alekseymanetov","email":"alekseyManetov@gmail.com"}],"readme":"# @bpmn-io/moddle-types-generator\n\n[![CI](https://github.com/bpmn-io/moddle-types-generator/actions/workflows/CI.yml/badge.svg)](https://github.com/bpmn-io/moddle-types-generator/actions/workflows/CI.yml)\n\nGenerate TypeScript type definitions for [moddle](https://github.com/bpmn-io/moddle) elements from moddle descriptors.\n\nFor each descriptor it emits, per type, an interface describing the element's properties, plus a per-namespace type map. The generated types can be used directly — in TypeScript or in plain JavaScript via JSDoc — without any library migration.\n\n## Usage\n\n```sh\nnpx @bpmn-io/moddle-types-generator <descriptor.json> <output.d.ts> [<descriptor.json> <output.d.ts> ...]\n```\n\nMultiple descriptor/output pairs are pre-scanned so cross-namespace references between them (e.g. `bpmndi:BPMNShape` → `di:LabeledShape`) resolve to the sibling output modules:\n\n```sh\nnpx @bpmn-io/moddle-types-generator \\\n  resources/bpmn.json   dist/types/bpmn.d.ts \\\n  resources/bpmndi.json dist/types/bpmndi.d.ts\n```\n\nPass `--augment` to additionally emit a `declare module 'moddle'` block that augments the shared `ModdleTypeMap` registry (off by default):\n\n```sh\nnpx @bpmn-io/moddle-types-generator --augment resources/zeebe.json dist/types/zeebe.d.ts\n```\n\nPass `--index <path>` to additionally write an index module that re-exports every generated namespace module — a single `types` entry point for the package:\n\n```sh\nnpx @bpmn-io/moddle-types-generator \\\n  --index dist/types/index.d.ts \\\n  resources/bpmn.json   dist/types/bpmn.d.ts \\\n  resources/bpmndi.json dist/types/bpmndi.d.ts\n```\n\nPass `--external <prefix>=<package>` (repeatable) to resolve references to a namespace defined in another package. References to that namespace are emitted as `<Prefix><Type>` imported from the given package, instead of falling back to the `ModdleElement` base:\n\n```sh\nnpx @bpmn-io/moddle-types-generator \\\n  --external bpmn=bpmn-moddle/types \\\n  resources/camunda.json types/camunda.d.ts\n```\n\n## Build and Run\n\n```sh\n# install once\nnpm install\n\n# build the library and run all tests\nnpm run all\n```\n\n### Test strategy\n\nWe have two kinds of tests: [Generator output snapshots](#output-snapshots) and a [real world type harness](#type-harness).\n\nBoth suites run as part of `npm run all`.\n\n#### Output Snapshots\n\nGenerator output is validated against [golden fixtures](./test/fixtures) — a `<name>.json` descriptor paired with its expected `<name>.d.ts`. After an intentional change to the output, refresh them:\n\n```sh\nUPDATE_FIXTURES=true npm test\n```\n\nReview the resulting `.d.ts` diff before committing.\n\n#### Type harness\n\nThe [`test/types`](./test/types) harness asserts the generated types are actually _usable as intended_. It regenerates `.d.ts` modules from real descriptors and type-checks. Verify the harness via:\n\n```sh\nnpm run test:types\n```\n\n## License\n\nMIT\n","readmeFilename":"README.md"}