1.1.1 • Published 1 year ago

@huolala-tech/nad-cli v1.1.1

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

nad-cli · LICENSE codecov

A CLI tool, can generate client code from an API service that has installed and enabled the nad-java-sdk.

Include

yarn add @huolala-tech/nad-cli -D

or

npm install @huolala-tech/nad-cli --save-dev

Usage

Usage: nad [Options] <URL>
       nad --config <Path>
       nad -c <Path>

Example: nad http://localhost:8080
         nad -t oc http://localhost:8080

Options:
  -t, --target <target>     Specify the output file format ("ts", "oc", "raw"), defaults to "ts".
  -o, --output <path>       Specify the output file path, defaults to stdout.
  -c, --config <path>       Path to configuration file. If specified, all other arguments will be ignored.
  -h, --help                Display this help message.

Config File

type Target = 'ts' | 'oc' | 'raw';

export interface ConfigFile {
  /**
   * Specify the output file format.
   * @default ts
   */
  target?: Target;

  /**
   * Specify the API definition file URL.
   * @required
   */
  url: string;

  /**
   * Specify the output file path.
   * @default stdout
   */
  output?: string;

  /**
   * Specify which APIs should be generated.
   * @default All
   */
  apis?: string[];

  /**
   * Define some special types to map to other types.
   */
  typeMapping?: Record<string, string>;
}
1.1.1

1 year ago

1.1.0

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

2 years ago

1.0.0

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago