Files
codeql/javascript/ql/test/query-tests/Security/CWE-522-DecompressionBombs/commanderTests2.js
amammad 307187f6c1 V1
2023-06-23 06:06:37 +10:00

17 lines
431 B
JavaScript

const {Command} = require('commander');
const program = new Command();
import {localZipLoad} from "./main-jszip";
program
.command('serve')
.argument('<script>')
.option('-p, --port <number>', 'port number', 80)
.action(function () {
localZipLoad(this.opts().zipPath);
localZipLoad(this.args[0]);
});
program.parse();
// Try the following:
// node action-this.js serve --port 8080 index.js