This commit is contained in:
27
src/index.ts
27
src/index.ts
@@ -1,2 +1,25 @@
|
||||
export * from './core/types';
|
||||
export * from './core/schema-validator';
|
||||
#!/usr/bin/env node
|
||||
|
||||
import { Command } from 'commander';
|
||||
import * as fs from 'fs';
|
||||
import * as path from 'path';
|
||||
|
||||
const packageJsonPath = path.join(__dirname, '..', 'package.json');
|
||||
const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, 'utf-8'));
|
||||
|
||||
const program = new Command();
|
||||
|
||||
program
|
||||
.name('dotenv-types')
|
||||
.description('Validate .env files and generate TypeScript interfaces')
|
||||
.version(packageJson.version);
|
||||
|
||||
import { createValidateCommand } from './commands/validate';
|
||||
import { createGenerateCommand } from './commands/generate';
|
||||
import { createMigrateCommand } from './commands/migrate';
|
||||
|
||||
program.addCommand(createValidateCommand());
|
||||
program.addCommand(createGenerateCommand());
|
||||
program.addCommand(createMigrateCommand());
|
||||
|
||||
program.parse();
|
||||
|
||||
Reference in New Issue
Block a user