From cafd0cf3ecc3b20c8d38440c9bc47a7795d40cb1 Mon Sep 17 00:00:00 2001 From: Austin Sullivan Date: Thu, 2 Mar 2023 14:12:16 -0500 Subject: [PATCH] feat(docs-framework): add legacy ssl cli option --- packages/documentation-framework/scripts/cli/build.js | 6 ++++++ packages/documentation-framework/scripts/cli/cli.js | 1 + 2 files changed, 7 insertions(+) diff --git a/packages/documentation-framework/scripts/cli/build.js b/packages/documentation-framework/scripts/cli/build.js index 960a2d7fd4..ba694a5709 100644 --- a/packages/documentation-framework/scripts/cli/build.js +++ b/packages/documentation-framework/scripts/cli/build.js @@ -50,6 +50,11 @@ async function execFile(file, args) { const child_execArgv = [ '--max-old-space-size=4096' ]; + + if (args.legacySSL) { + child_execArgv.push('--openssl-legacy-provider') + } + const child = fork(path.join(__dirname, file), child_argv, { execArgv: child_execArgv }); function errorHandler(err) { console.error(err); @@ -78,6 +83,7 @@ async function build(cmd, options) { const config = getConfig(options); config.analyze = options.analyze; config.output = options.output; + config.legacySSL = options.legacySSL // These get passed to `fork`ed builds process.env.pathPrefix = config.pathPrefix; diff --git a/packages/documentation-framework/scripts/cli/cli.js b/packages/documentation-framework/scripts/cli/cli.js index 6e560de12b..5a21c1b006 100755 --- a/packages/documentation-framework/scripts/cli/cli.js +++ b/packages/documentation-framework/scripts/cli/cli.js @@ -26,6 +26,7 @@ program .command('build ') .option('-a, --analyze', 'use webpack-bundle-analyzer', false) .option('-o, --output ', 'output folder', 'public') + .option('--legacySSL', 'use legacy version of openssl, needed to support Node 18 until we upgrade webpack to v5', false) .description('generates source files and runs webpack') .action((cmd, options) => { const { build } = require('./build');