@flowcore/cli-plugin-types
v1.3.0
Published
A plugin for generating types/interfaces from sampling an existing event stream
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/1.3.0 linux-x64 node-v22.22.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>] [--all] [--first <value>] [--last <value>]
[--random <value>]
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>/*" --allSee code: src/commands/types.ts
types types typescript STREAM
Get typescript types from event type
USAGE
$ types types typescript STREAM --directory <value> [--profile <value>] [--all] [--first <value>] [--last <value>]
[--random <value>]
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>/*" --allSee code: src/commands/types/typescript.ts
