2021-03-14 21:53:13 +00:00
|
|
|
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');
|
2021-03-16 20:30:44 +00:00
|
|
|
fs.writeSync(1, underlying(canonicalEncode(readSchema(src))));
|
2021-03-14 21:53:13 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
export function main(_argv: Array<string>) {
|
2021-03-18 10:14:31 +00:00
|
|
|
Error.stackTraceLimit = Infinity;
|
2021-03-14 21:53:13 +00:00
|
|
|
run();
|
|
|
|
}
|