From 6b6ff0756661a03ce630d333cf0948b0c8c68e24 Mon Sep 17 00:00:00 2001 From: Bernardo Guerreiro <39738771+bernardobridge@users.noreply.github.com> Date: Fri, 1 Mar 2024 17:32:33 +0000 Subject: [PATCH] fix(schema): add missing typescript information in schema (#2525) * feat(schema): add ts and esm descriptions to processor * fix(schema): add missing config.bundling.external option --- packages/types/schema/config.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/packages/types/schema/config.js b/packages/types/schema/config.js index 17a46072ad..7f275828f6 100644 --- a/packages/types/schema/config.js +++ b/packages/types/schema/config.js @@ -99,7 +99,7 @@ const ConfigSchemaWithoutEnvironments = Joi.object({ socketio: SocketIoConfigSchema.meta({ title: 'SocketIo Configuration' }), processor: Joi.string() .meta({ title: 'Processor Function Path' }) - .description('Path to a CommonJS module to load for this test run.'), + .description('Path to a CommonJS (.js), ESM (.mjs) or Typescript (.ts) module to load for this test run.\nhttps://www.artillery.io/docs/reference/test-script#processor---custom-js-code'), variables: Joi.object() .meta({ title: 'Variables' }) .description('Map of variables to expose to the test run.'), @@ -109,6 +109,13 @@ const ConfigSchemaWithoutEnvironments = Joi.object({ 'Load data from CSV to be used during the test run:\nhttps://www.artillery.io/docs/reference/test-script#payload---loading-data-from-csv-files' ), tls: TlsConfig.meta({ title: 'TLS Settings' }), + bundling: Joi.object({ + external: Joi.array().items(Joi.string()) + .meta({ title: 'External Packages' }) + .description('Can be used when using Typescript (.ts) processors. List npm modules to prevent them from being bundled. Use in case there are issues with bundling certain packages.\nhttps://www.artillery.io/docs/reference/test-script#preventing-bundling-of-typescript-packages'), + }) + .meta({ title: 'Bundling'}) + .description('Configuration for bundling the test script and its dependencies'), plugins: Joi.object({ ...ArtilleryBuiltInPlugins }) .meta({ title: 'Plugins' }) .description(