UNPKG

@gatling.io/cli

Version:

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

46 lines (45 loc) 2.27 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"); const dependencies_1 = require("../dependencies"); exports.default = (program) => { program .command("enterprise-package") .description("Build Gatling simulations and package them for Gatling Enterprise") .addOption(options_1.sourcesFolderOption) .addOption(options_1.protoFolderOption) .addOption(options_1.resourcesFolderOption) .addOption(options_1.bundleFileOption) .addOption(options_1.protoTargetFolderOption) .addOption(options_1.packageFileOption) .addOption(options_1.postmanOption) .addOption(options_1.typescriptOption) .addOption(options_1.gatlingHomeOption) .action(async (options) => { const sourcesFolder = (0, options_1.sourcesFolderOptionValue)(options); const protoFolder = (0, options_1.protoFolderOptionValue)(options); const resourcesFolder = (0, options_1.resourcesFolderOptionValue)(options); const bundleFile = (0, options_1.bundleFileOptionValue)(options); const protoTargetFolder = (0, options_1.protoTargetFolderOptionValue)(options); const packageFile = (0, options_1.packageFileOptionValue)(options); const gatlingHome = (0, options_1.gatlingHomeOptionValueWithDefaults)(options); const simulations = await (0, simulations_1.findSimulations)(sourcesFolder); const postman = (0, options_1.postmanOptionValueWithDefaults)(options); const typescript = (0, options_1.typescriptOptionValueWithDefaults)(options, simulations); const { protocPath } = await (0, dependencies_1.resolveBundle)({ gatlingHome }); await (0, bundle_1.bundle)({ sourcesFolder, protoFolder, bundleFile, protoTargetFolder, postman, typescript, simulations, protocPath }); await (0, enterprise_1.enterprisePackage)({ bundleFile, resourcesFolder, protoTargetFolder, packageFile, postman, simulations }); }); };