@gatling.io/cli 3.13.104 → 3.13.105
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/target/commands/enterpriseDeploy.js +1 -1
- package/target/commands/enterprisePackage.js +1 -1
- package/target/commands/enterpriseStart.js +1 -1
- package/target/commands/options.js +2 -2
- package/target/dependencies/index.js +1 -1
- package/target/dependencies/versions.js +1 -1
- package/target/enterprise.d.ts +1 -0
- package/target/enterprise.js +6 -2
package/package.json
CHANGED
|
@@ -45,7 +45,7 @@ exports.default = (program) => {
|
|
|
45
45
|
const packageFile = (0, options_1.packageFileOptionValue)(options);
|
|
46
46
|
const { graalvmHome, jvmClasspath } = await (0, dependencies_1.resolveBundle)({ gatlingHome });
|
|
47
47
|
await (0, bundle_1.bundle)({ sourcesFolder, bundleFile, postman, typescript, simulations });
|
|
48
|
-
await (0, enterprise_1.enterprisePackage)({ bundleFile, resourcesFolder, packageFile, simulations });
|
|
48
|
+
await (0, enterprise_1.enterprisePackage)({ bundleFile, resourcesFolder, packageFile, postman, simulations });
|
|
49
49
|
await (0, enterprise_1.enterpriseDeploy)({
|
|
50
50
|
graalvmHome,
|
|
51
51
|
jvmClasspath,
|
|
@@ -23,6 +23,6 @@ exports.default = (program) => {
|
|
|
23
23
|
const postman = (0, options_1.postmanOptionValueWithDefaults)(options);
|
|
24
24
|
const typescript = (0, options_1.typescriptOptionValueWithDefaults)(options, simulations);
|
|
25
25
|
await (0, bundle_1.bundle)({ sourcesFolder, bundleFile, postman, typescript, simulations });
|
|
26
|
-
await (0, enterprise_1.enterprisePackage)({ bundleFile, resourcesFolder, packageFile, simulations });
|
|
26
|
+
await (0, enterprise_1.enterprisePackage)({ bundleFile, resourcesFolder, packageFile, postman, simulations });
|
|
27
27
|
});
|
|
28
28
|
};
|
|
@@ -57,7 +57,7 @@ exports.default = (program) => {
|
|
|
57
57
|
}
|
|
58
58
|
const { graalvmHome, jvmClasspath } = await (0, dependencies_1.resolveBundle)({ gatlingHome });
|
|
59
59
|
await (0, bundle_1.bundle)({ sourcesFolder, bundleFile, postman, typescript, simulations });
|
|
60
|
-
await (0, enterprise_1.enterprisePackage)({ bundleFile, resourcesFolder, packageFile, simulations });
|
|
60
|
+
await (0, enterprise_1.enterprisePackage)({ bundleFile, resourcesFolder, packageFile, postman, simulations });
|
|
61
61
|
await (0, enterprise_1.enterpriseStart)({
|
|
62
62
|
graalvmHome,
|
|
63
63
|
jvmClasspath,
|
|
@@ -188,11 +188,11 @@ const parseRunParametersArgument = (args) => {
|
|
|
188
188
|
};
|
|
189
189
|
exports.parseRunParametersArgument = parseRunParametersArgument;
|
|
190
190
|
exports.bundleFileArgument = new commander_1.Argument("[bundleFile]", "Specify the path to a Gatling JS bundle file to install; if not specified, bundle will be downloaded automatically");
|
|
191
|
-
exports.apiUrlOption = new commander_1.Option("--
|
|
191
|
+
exports.apiUrlOption = new commander_1.Option("--api-url <value>", "URL of the Gatling Enterprise API")
|
|
192
192
|
.default("https://api.gatling.io")
|
|
193
193
|
.hideHelp();
|
|
194
194
|
exports.apiUrlOptionValue = getStringValueMandatory(exports.apiUrlOption);
|
|
195
|
-
exports.webAppUrlOption = new commander_1.Option("--
|
|
195
|
+
exports.webAppUrlOption = new commander_1.Option("--web-app-url <value>", "URL of the Gatling Enterprise web app")
|
|
196
196
|
.default("https://cloud.gatling.io")
|
|
197
197
|
.hideHelp();
|
|
198
198
|
exports.webAppUrlOptionValue = getStringValueMandatory(exports.webAppUrlOption);
|
|
@@ -137,7 +137,7 @@ const downloadAndInstallBundle = async (options) => {
|
|
|
137
137
|
return resolvedBundle;
|
|
138
138
|
}
|
|
139
139
|
catch (e) {
|
|
140
|
-
log_1.logger.error(`Failed to automatically download and install the Gatling
|
|
140
|
+
log_1.logger.error(`Failed to automatically download and install the Gatling runtime bundle. You can try to:
|
|
141
141
|
1. Make sure you have access to https://github.com/gatling/gatling-js/releases/; and if you connect to the Internet through a proxy, make sure it is configured in your NPM configuration file (.npmrc).
|
|
142
142
|
2. Alternatively, you can try manually downloading the file from ${url}, and install it with the command 'npx gatling install <path-to-downloaded-file.zip>'.`);
|
|
143
143
|
throw e;
|
package/target/enterprise.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ export interface EnterprisePackageOptions {
|
|
|
4
4
|
bundleFile: string;
|
|
5
5
|
resourcesFolder: string;
|
|
6
6
|
packageFile: string;
|
|
7
|
+
postman: string | undefined;
|
|
7
8
|
simulations: SimulationFile[];
|
|
8
9
|
}
|
|
9
10
|
export declare const enterprisePackage: (options: EnterprisePackageOptions) => Promise<void>;
|
package/target/enterprise.js
CHANGED
|
@@ -15,7 +15,7 @@ const enterprisePackage = async (options) => {
|
|
|
15
15
|
log_1.logger.info(`Packaging a Gatling simulation with options:
|
|
16
16
|
- bundleFile: ${options.bundleFile}
|
|
17
17
|
- packageFile: ${options.packageFile}`);
|
|
18
|
-
const manifest = generateManifest(options
|
|
18
|
+
const manifest = generateManifest(options);
|
|
19
19
|
const output = fs_1.default.createWriteStream(options.packageFile);
|
|
20
20
|
const archive = (0, archiver_1.default)("zip", {
|
|
21
21
|
zlib: { level: zlib_1.constants.Z_MAX_LEVEL }
|
|
@@ -33,7 +33,8 @@ const enterprisePackage = async (options) => {
|
|
|
33
33
|
log_1.logger.info(`Package for Gatling Enterprise created at ${options.packageFile}`);
|
|
34
34
|
};
|
|
35
35
|
exports.enterprisePackage = enterprisePackage;
|
|
36
|
-
const generateManifest = (
|
|
36
|
+
const generateManifest = (options) => {
|
|
37
|
+
const simulationNames = options.simulations.map((s) => s.name);
|
|
37
38
|
const utf8Encoder = new TextEncoder();
|
|
38
39
|
const eol = utf8Encoder.encode("\n");
|
|
39
40
|
const continuation = utf8Encoder.encode("\n ");
|
|
@@ -47,6 +48,9 @@ const generateManifest = (simulationNames) => {
|
|
|
47
48
|
`Gatling-Simulations: ${simulationNames.join(",")}`,
|
|
48
49
|
`Java-Version: ${dependencies_1.versions.java.compilerRelease}`
|
|
49
50
|
];
|
|
51
|
+
if (options.postman !== undefined) {
|
|
52
|
+
lines.push("Gatling-Extra-Protocols: postman");
|
|
53
|
+
}
|
|
50
54
|
const pkg = getPackageNameAndVersion();
|
|
51
55
|
lines.push(`Implementation-Title: ${pkg.name}`);
|
|
52
56
|
if (pkg.version !== undefined) {
|