@flowcore/cli-plugin-types
v1.1.3
Published
A plugin for generating types/interfaces from sampling an existing event stream
Downloads
22
Readme
Flowcore CLI Plugin - Types
A plugin for generating types/interfaces from sampling an existing event stream
Usage
$ npm install -g @flowcore/cli-plugin-types
$ types COMMAND
running command...
$ types (--version)
@flowcore/cli-plugin-types/2.13.0 darwin-arm64 node-v20.15.0
$ types --help [COMMAND]
USAGE
$ types COMMAND
...
Commands
types types STREAM
Get json schema from event type
USAGE
$ types types STREAM --directory <value> [--profile <value>] [--first <value>] [--last <value>] [--random
<value>] [--all]
ARGUMENTS
STREAM stream url to connect to
FLAGS
--all Sample all events
--directory=<value> (required) Directory to write the types to
--first=<value> Sample from the first messages
--last=<value> Sample from the latest messages
--profile=<value> Specify the configuration profile to use
--random=<value> Sample a number of random events
DESCRIPTION
Get json schema from event type
EXAMPLES
$ types types "https://flowcore.io/<org>/<data core>/*" --last 10
$ types types "https://flowcore.io/<org>/<data core>/*" --first 10
$ types types "https://flowcore.io/<org>/<data core>/*" --random 10
$ types types "https://flowcore.io/<org>/<data core>/*" --all
See code: src/commands/types.ts
types types typescript STREAM
Get typescript types from event type
USAGE
$ types types typescript STREAM --directory <value> [--profile <value>] [--first <value>] [--last <value>] [--random
<value>] [--all]
ARGUMENTS
STREAM stream url to connect to
FLAGS
--all Sample all events
--directory=<value> (required) Directory to write the types to
--first=<value> Sample from the first messages
--last=<value> Sample from the latest messages
--profile=<value> Specify the configuration profile to use
--random=<value> Sample a number of random events
DESCRIPTION
Get typescript types from event type
EXAMPLES
$ types types typescript "https://flowcore.io/<org>/<data core>/*" --last 10
$ types types typescript "https://flowcore.io/<org>/<data core>/*" --first 10
$ types types typescript "https://flowcore.io/<org>/<data core>/*" --random 10
$ types types typescript "https://flowcore.io/<org>/<data core>/*" --all
See code: src/commands/types/typescript.ts