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.07 kB
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.osArch = exports.osType = void 0; const os_1 = __importDefault(require("os")); const resolveOsType = () => { const t = os_1.default.type(); if (t !== "Darwin" && t !== "Linux" && t !== "Windows_NT") { throw Error(`Gatling JS does not support the Operating System '${t}'`); } return t; }; exports.osType = resolveOsType(); const resolveOsArch = () => { const a = os_1.default.arch(); if (a !== "x64" && a !== "arm64") { throw Error(`Gatling JS does not support the architecture '${a}'`); } if (exports.osType === "Windows_NT" && a === "arm64") { // GraalVM distribution not available for Windows on ARM // TODO see if we can recommend a solution throw Error(`Gatling JS does not support Windows on the ARM architecture`); } return a; }; exports.osArch = resolveOsArch();