Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export const runDump = (argv: yargs.Arguments) => {
let raw: string;
let config: any = CONFIG;
if (argv.config) {
raw = fs.readFileSync(argv.config).toString('utf-8');
config = JSON.parse(raw);
}
raw = fs.readFileSync(argv.pack).toString('utf-8');
const data = JSON.parse(raw);
const schema = ({} as any) as Schema;
const origin = new CodeBuilder(config).origin();
const ck = checksumIndices(VERSION, origin.indices);
console.log(`Checksum ${ck}`);
const builder = new SchemaBuilder(false);
builder.construct(schema, origin);
const opts = { verbose: false };
Object.keys(data.scripts).forEach(name => {
const strings = data.scripts[name].strings.split('_');
const entries = scan(schema, 1, opts);
display(entries, strings);
});
};