Fix preserves-schemac

This commit is contained in:
Tony Garnock-Jones 2021-03-23 16:37:35 +01:00
parent c23cbcc60c
commit d64bb82c22
1 changed files with 2 additions and 1 deletions

View File

@ -1,10 +1,11 @@
import { canonicalEncode, underlying } from '@preserves/core';
import fs from 'fs';
import { readSchema } from '../reader';
import { fromSchema } from '../meta';
export function run(): void {
const src = fs.readFileSync('/dev/stdin', 'utf-8');
fs.writeSync(1, underlying(canonicalEncode(readSchema(src))));
fs.writeSync(1, underlying(canonicalEncode(fromSchema(readSchema(src)))))
}
export function main(_argv: Array<string>) {