UNPKG

@spec2ts/cli

Version:

Utility to convert specifications (Open API, JSON Schemas) to TypeScript using TypeScript native compiler

15 lines (14 loc) 755 B
#!/usr/bin/env node "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const yargs = require("yargs"); const jsonschema = require("@spec2ts/jsonschema/cli/command"); const openapi = require("@spec2ts/openapi/cli/command"); const openapiClient = require("@spec2ts/openapi-client/cli/command"); yargs .command(jsonschema.usage.replace("$0", "jsonschema"), jsonschema.describe, jsonschema.builder, jsonschema.handler) .command(openapi.usage.replace("$0", "openapi"), openapi.describe, openapi.builder, openapi.handler) .command(openapiClient.usage.replace("$0", "openapi-client"), openapiClient.describe, openapiClient.builder, openapiClient.handler) .help("help", "Show help usage") .demandCommand() .argv;