0.0.26 • Published 9 months ago

@intellegens/cornerstone-cli v0.0.26

Weekly downloads
-
License
MIT
Repository
-
Last release
9 months ago

Cornerstone TypeScript CLI Tool(s)

A command-line interface (CLI) with various utilities. The CLI is built using yargs and supports the following commands:

Getting started

  1. Install dependencies:
npm install

Available scripts

  1. build: Compiles the TypeScript code
npm run build
  1. cli: Runs the CLI in development mode using tsx
npm run cli <command> [options]

Install and run

npm install -g @intellegens/cornerstone-cli
cornerstone-ts <command> [options]

API reference

Zod Schema Generator

Generates Zod schemas from JSON schema files, preserving namespace structure.

# Development
npm run cli zod-gen --input <input-dir> --output <output-dir>

# After building
./dist/utils/cli/index.js zod-gen --input <input-dir> --output <output-dir>

Options:

  • --input, -i: Path to the folder containing JSON schemas
  • --output, -o: Path to the folder where Zod schemas will be saved

The command will:

  1. Read JSON schema files from the input directory
  2. Create a folder structure matching the type's namespace
  3. Generate Zod schemas with proper type names
  4. Save the generated schemas in their respective namespace folders

For example, if you have a JSON schema file named MyCompany.ModuleA.Models.User.json, it will:

  • Create directories: output-dir/MyCompany/ModuleA/Models/
  • Generate and save User.ts in that directory with the Zod schema
0.0.26

9 months ago

0.0.25

9 months ago

0.0.24

10 months ago

0.0.23

10 months ago

0.0.22

10 months ago

0.0.21

11 months ago

0.0.20

11 months ago

0.0.19

11 months ago

0.0.18

11 months ago

0.0.17

12 months ago

0.0.16

12 months ago

0.0.15

12 months ago

0.0.14

12 months ago

0.0.13

12 months ago

0.0.12

1 year ago

0.0.11

1 year ago

0.0.10

1 year ago

0.0.9

1 year ago

0.0.8

1 year ago

0.0.7

1 year ago

0.0.6

1 year ago