postman-json-chopper
Version:
Splits up large postman collection json file into folders and smaller files and merges them back together
17 lines (16 loc) • 737 B
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
const split_1 = require("./split");
const inFile = process.argv[2];
const outFile = process.argv[3];
const maxDepthArg = process.argv[4];
// Check if the number of arguments is less than expected
if (process.argv.length < 4) {
console.error("Please specify all command line arguments:");
console.error("split ./path/to/large_postman_collection.json ./path/to/postman_collection_with_refs.json [maxDepth]");
process.exit(1);
}
// If maxDepthArg is provided, parse it as a number. Otherwise, set it to undefined.
const maxDepth = maxDepthArg ? parseInt(maxDepthArg, 10) : undefined;
(0, split_1.split)(inFile, outFile, maxDepth);
;