UNPKG

@gatling.io/cli

Version:

Gatling JS is a JavaScript/TypeScript interface for the [Gatling load testing tool](https://gatling.io/).

29 lines (28 loc) 1.56 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const options_1 = require("./options"); const simulations_1 = require("../simulations"); const bundle_1 = require("../bundle"); const enterprise_1 = require("../enterprise"); exports.default = (program) => { program .command("enterprise-package") .description("Build Gatling simulations and package them for Gatling Enterprise") .addOption(options_1.sourcesFolderOption) .addOption(options_1.resourcesFolderOption) .addOption(options_1.bundleFileOption) .addOption(options_1.packageFileOption) .addOption(options_1.postmanOption) .addOption(options_1.typescriptOption) .action(async (options) => { const sourcesFolder = (0, options_1.sourcesFolderOptionValue)(options); const resourcesFolder = (0, options_1.resourcesFolderOptionValue)(options); const bundleFile = (0, options_1.bundleFileOptionValue)(options); const packageFile = (0, options_1.packageFileOptionValue)(options); const simulations = await (0, simulations_1.findSimulations)(sourcesFolder); const postman = (0, options_1.postmanOptionValueWithDefaults)(options); const typescript = (0, options_1.typescriptOptionValueWithDefaults)(options, simulations); await (0, bundle_1.bundle)({ sourcesFolder, bundleFile, postman, typescript, simulations }); await (0, enterprise_1.enterprisePackage)({ bundleFile, resourcesFolder, packageFile, postman, simulations }); }); };