diff --git a/js-simulation/package-lock.json b/js-simulation/package-lock.json index eb134f9..404ff1e 100644 --- a/js-simulation/package-lock.json +++ b/js-simulation/package-lock.json @@ -37,11 +37,11 @@ "devDependencies": { "@types/archiver": "6.0.2", "@types/decompress": "4.2.7", - "@types/node": "18.19.49", + "@types/node": "18.19.50", "@types/readline-sync": "1.4.8", "prettier": "3.3.3", "rimraf": "6.0.1", - "typescript": "5.5.4" + "typescript": "5.6.2" } }, "../tmp/cli/package/node_modules/@esbuild/darwin-arm64": { @@ -1190,13 +1190,13 @@ "@gatling.io/jvm-types": "0.0.0" }, "devDependencies": { - "@types/jest": "29.5.12", + "@types/jest": "29.5.13", "jest": "29.7.0", "prettier": "3.3.3", "rimraf": "6.0.1", "ts-jest": "29.2.5", "ts-node": "10.9.2", - "typescript": "5.5.4" + "typescript": "5.6.2" } }, "../tmp/core/package/node_modules/@ampproject/remapping": { @@ -4988,13 +4988,13 @@ "@gatling.io/jvm-types": "0.0.0" }, "devDependencies": { - "@types/jest": "29.5.12", + "@types/jest": "29.5.13", "jest": "29.7.0", "prettier": "3.3.3", "rimraf": "6.0.1", "ts-jest": "29.2.5", "ts-node": "10.9.2", - "typescript": "5.5.4" + "typescript": "5.6.2" } }, "../tmp/http/package/node_modules/@ampproject/remapping": { @@ -8786,7 +8786,7 @@ "version": "0.0.0", "license": "Apache-2.0", "devDependencies": { - "typescript": "5.5.4" + "typescript": "5.6.2" } }, "../tmp/jvm-types/package/node_modules/typescript": { diff --git a/js/cli/src/commands/enterpriseDeploy.ts b/js/cli/src/commands/enterpriseDeploy.ts index 3e84108..ac1a541 100644 --- a/js/cli/src/commands/enterpriseDeploy.ts +++ b/js/cli/src/commands/enterpriseDeploy.ts @@ -23,8 +23,10 @@ import { sourcesFolderOptionValue, typescriptOption, typescriptOptionValueWithDefaults, - urlOption, - urlOptionValue + apiUrlOption, + apiUrlOptionValue, + webAppUrlOption, + webAppUrlOptionValue } from "./options"; import { findSimulations } from "../simulations"; import { installGatlingJs } from "../dependencies"; @@ -42,7 +44,8 @@ export default (program: Command): void => { .addOption(typescriptOption) .addOption(gatlingHomeOption) // Base - .addOption(urlOption) + .addOption(apiUrlOption) + .addOption(webAppUrlOption) .addOption(apiTokenOption) // Plugin configuration .addOption(controlPlaneUrlOption) @@ -61,7 +64,8 @@ export default (program: Command): void => { const bundleFile = bundleFileOptionValue(options); const resultsFolder: string = resultsFolderOptionValue(options); const gatlingHome = gatlingHomeOptionValueWithDefaults(options); - const url = urlOptionValue(options); + const apiUrl = apiUrlOptionValue(options); + const webAppUrl = webAppUrlOptionValue(options); const apiToken = apiTokenOptionValue(options); const controlPlaneUrl = controlPlaneUrlOptionValue(options); const nonInteractive = nonInteractiveOptionValue(options); @@ -77,7 +81,8 @@ export default (program: Command): void => { bundleFile, resourcesFolder, resultsFolder, - url, + apiUrl, + webAppUrl, apiToken, controlPlaneUrl, nonInteractive, diff --git a/js/cli/src/commands/enterpriseStart.ts b/js/cli/src/commands/enterpriseStart.ts index 7f5d331..40f929e 100644 --- a/js/cli/src/commands/enterpriseStart.ts +++ b/js/cli/src/commands/enterpriseStart.ts @@ -29,8 +29,10 @@ import { sourcesFolderOptionValue, typescriptOption, typescriptOptionValueWithDefaults, - urlOption, - urlOptionValue, + apiUrlOption, + apiUrlOptionValue, + webAppUrlOption, + webAppUrlOptionValue, waitForRunEndOption, waitForRunEndOptionValue } from "./options"; @@ -50,7 +52,8 @@ export default (program: Command): void => { .addOption(typescriptOption) .addOption(gatlingHomeOption) // Base - .addOption(urlOption) + .addOption(apiUrlOption) + .addOption(webAppUrlOption) .addOption(apiTokenOption) // Plugin configuration .addOption(controlPlaneUrlOption) @@ -74,7 +77,8 @@ export default (program: Command): void => { const bundleFile = bundleFileOptionValue(options); const resultsFolder: string = resultsFolderOptionValue(options); const gatlingHome = gatlingHomeOptionValueWithDefaults(options); - const url = urlOptionValue(options); + const apiUrl = apiUrlOptionValue(options); + const webAppUrl = webAppUrlOptionValue(options); const apiToken = apiTokenOptionValue(options); const controlPlaneUrl = controlPlaneUrlOptionValue(options); const nonInteractive = nonInteractiveOptionValue(options); @@ -98,7 +102,8 @@ export default (program: Command): void => { bundleFile, resourcesFolder, resultsFolder, - url, + apiUrl, + webAppUrl, apiToken, controlPlaneUrl, nonInteractive, diff --git a/js/cli/src/commands/options.ts b/js/cli/src/commands/options.ts index b87fa34..23134d0 100644 --- a/js/cli/src/commands/options.ts +++ b/js/cli/src/commands/options.ts @@ -213,10 +213,15 @@ export const parseRunParametersArgument = (args: string[]): Record", "URL of Gatling Enterprise") +export const apiUrlOption = new Option("--apiUrl ", "URL of the Gatling Enterprise API") + .default("https://api.gatling.io") + .hideHelp(); +export const apiUrlOptionValue = getStringValueMandatory(apiUrlOption); + +export const webAppUrlOption = new Option("--webAppUrl ", "URL of the Gatling Enterprise web app") .default("https://cloud.gatling.io") .hideHelp(); -export const urlOptionValue = getStringValueMandatory(urlOption); +export const webAppUrlOptionValue = getStringValueMandatory(webAppUrlOption); export const apiTokenOption = new Option( "--api-token ", diff --git a/js/cli/src/enterprise.ts b/js/cli/src/enterprise.ts index 4e55aa5..3ec6b2a 100644 --- a/js/cli/src/enterprise.ts +++ b/js/cli/src/enterprise.ts @@ -124,7 +124,8 @@ export interface EnterprisePluginOptions extends RunJavaProcessOptions { resourcesFolder: string; resultsFolder: string; // Base - url: string; + apiUrl: string; + webAppUrl: string; apiToken?: string; // Plugin configuration controlPlaneUrl?: string; @@ -135,7 +136,8 @@ const javaArgsFromPluginOptions = (options: EnterprisePluginOptions) => { const javaArgs: string[] = []; // Base - javaArgs.push(`-Dgatling.enterprise.url=${options.url}`); + javaArgs.push(`-Dgatling.enterprise.apiUrl=${options.apiUrl}`); + javaArgs.push(`-Dgatling.enterprise.webAppUrl=${options.webAppUrl}`); if (options.apiToken !== undefined) { javaArgs.push(`-Dgatling.enterprise.apiToken=${options.apiToken}`); } diff --git a/jvm/build.sbt b/jvm/build.sbt index 82e87f9..a43a0ec 100644 --- a/jvm/build.sbt +++ b/jvm/build.sbt @@ -19,7 +19,7 @@ val coursierVersion = "2.1.12" val gatlingVersion = "3.12.0" // bit weird cause this is not a dependency of this project -val gatlingEnterpriseComponentPluginVersion = "1.9.6" +val gatlingEnterpriseComponentPluginVersion = "1.9.7-SNAPSHOT" lazy val root = (project in file(".")) .aggregate(adapter, java2ts) diff --git a/ts-simulation/package-lock.json b/ts-simulation/package-lock.json index fa720c3..643fb4a 100644 --- a/ts-simulation/package-lock.json +++ b/ts-simulation/package-lock.json @@ -38,11 +38,11 @@ "devDependencies": { "@types/archiver": "6.0.2", "@types/decompress": "4.2.7", - "@types/node": "18.19.49", + "@types/node": "18.19.50", "@types/readline-sync": "1.4.8", "prettier": "3.3.3", "rimraf": "6.0.1", - "typescript": "5.5.4" + "typescript": "5.6.2" } }, "../tmp/cli/package/node_modules/@esbuild/darwin-arm64": { @@ -1191,13 +1191,13 @@ "@gatling.io/jvm-types": "0.0.0" }, "devDependencies": { - "@types/jest": "29.5.12", + "@types/jest": "29.5.13", "jest": "29.7.0", "prettier": "3.3.3", "rimraf": "6.0.1", "ts-jest": "29.2.5", "ts-node": "10.9.2", - "typescript": "5.5.4" + "typescript": "5.6.2" } }, "../tmp/core/package/node_modules/@ampproject/remapping": { @@ -4989,13 +4989,13 @@ "@gatling.io/jvm-types": "0.0.0" }, "devDependencies": { - "@types/jest": "29.5.12", + "@types/jest": "29.5.13", "jest": "29.7.0", "prettier": "3.3.3", "rimraf": "6.0.1", "ts-jest": "29.2.5", "ts-node": "10.9.2", - "typescript": "5.5.4" + "typescript": "5.6.2" } }, "../tmp/http/package/node_modules/@ampproject/remapping": { @@ -8787,7 +8787,7 @@ "version": "0.0.0", "license": "Apache-2.0", "devDependencies": { - "typescript": "5.5.4" + "typescript": "5.6.2" } }, "../tmp/jvm-types/package/node_modules/typescript": {