#!/usr/bin/env node import { getSolidpkg, ISolidSimple, Product, verifyProductName } from 'ssn'; import parseArguments from './funcs/parseArguments'; const { args, fail } = parseArguments({ product: { short: 'p', description: 'Name of the product we want to get the solidpkg on', verify: verifyProductName }, from: { short: 'f', description: 'Number of the from release', verify: (str) => str.match(/^(-1|0|[1-9][0-9]{0,2})$/) !== null }, to: { short: 't', description: 'Number of the to release', verify: (str) => str.match(/^(0|[1-9][0-9]{0,2})$/) !== null }, }); //Get solidpkg and write output to stdout getSolidpkg(args.product as Product, Number(args.from), Number(args.to)).then((output: ISolidSimple) => { process.stdout.write(JSON.stringify(output)); }).catch((error) => { fail(error); });