13 lines
355 B
TypeScript
13 lines
355 B
TypeScript
import { canonicalEncode, underlying } from '@preserves/core';
|
|
import fs from 'fs';
|
|
import { readSchema } from '../reader';
|
|
|
|
export function run(): void {
|
|
const src = fs.readFileSync('/dev/stdin', 'utf-8');
|
|
fs.writeFileSync('/dev/stdout', underlying(canonicalEncode(readSchema(src))));
|
|
}
|
|
|
|
export function main(_argv: Array<string>) {
|
|
run();
|
|
}
|