@pjts/schema
v0.0.139
Published
Generators for pjts applications: pjts-wiring manifest, client config and client types
Readme
Domain-Driven Design TypeScript Utilities / Schema
Module generating API json schema based on annotations generated by @pjts/core to be used by @pjts/client
Command line
Three binaries, run from the project root (npm run … does that) or with --project <dir>:
npx pjts-wiring # writes the wiring manifest (pjts.config.js → wiringPath)
npx pjts-wiring --check # exit 1 when the committed manifest is out of date; never writes
npx pjts-config # one <Module>.json client config per @HttpModule
npx pjts-types ./my.config # client types; the first positional argument is the config moduleThe scripts run through ts-node with tsconfig-paths (both are dependencies of this package), resolved
from the project first, so a project can pin its own versions.
pjts-wiring rejects a constructor parameter whose type is not a class, an adapter of a port, a provider
or one of the names the runtime supplies: @pjts/server's ApplicationContext provides
PostgresDbClient, NatsJetStreamClient, RedisClient, JetStreamMessagePublisher,
MessageSubscriberPort, MessageDeduplicatorPort and MessageRepeater; anything your own instances /
factories add goes under externals in pjts.config.js:
module.exports = { rootPath: './', outputPath: './out', externals: ['Clock', 'S3Client'] }