mirror of
https://github.com/TheBinaryNinja/tvapp2.git
synced 2026-06-05 17:35:41 -04:00
build(deps): bump playwright from 1.49.1 to 1.50.1
This commit is contained in:
26
node_modules/playwright/lib/plugins/webServerPlugin.js
generated
vendored
26
node_modules/playwright/lib/plugins/webServerPlugin.js
generated
vendored
@@ -78,7 +78,7 @@ class WebServerPlugin {
|
||||
debugWebServer(`Starting WebServer process ${this._options.command}...`);
|
||||
const {
|
||||
launchedProcess,
|
||||
kill
|
||||
gracefullyClose
|
||||
} = await (0, _utils.launchProcess)({
|
||||
command: this._options.command,
|
||||
env: {
|
||||
@@ -89,14 +89,30 @@ class WebServerPlugin {
|
||||
cwd: this._options.cwd,
|
||||
stdio: 'stdin',
|
||||
shell: true,
|
||||
// Reject to indicate that we cannot close the web server gracefully
|
||||
// and should fallback to non-graceful shutdown.
|
||||
attemptToGracefullyClose: () => Promise.reject(),
|
||||
attemptToGracefullyClose: async () => {
|
||||
if (process.platform === 'win32') throw new Error('Graceful shutdown is not supported on Windows');
|
||||
if (!this._options.gracefulShutdown) throw new Error('skip graceful shutdown');
|
||||
const {
|
||||
signal,
|
||||
timeout = 0
|
||||
} = this._options.gracefulShutdown;
|
||||
|
||||
// proper usage of SIGINT is to send it to the entire process group, see https://www.cons.org/cracauer/sigint.html
|
||||
// there's no such convention for SIGTERM, so we decide what we want. signaling the process group for consistency.
|
||||
process.kill(-launchedProcess.pid, signal);
|
||||
return new Promise((resolve, reject) => {
|
||||
const timer = timeout !== 0 ? setTimeout(() => reject(new Error(`process didn't close gracefully within timeout`)), timeout) : undefined;
|
||||
launchedProcess.once('close', (...args) => {
|
||||
clearTimeout(timer);
|
||||
resolve();
|
||||
});
|
||||
});
|
||||
},
|
||||
log: () => {},
|
||||
onExit: code => processExitedReject(new Error(code ? `Process from config.webServer was not able to start. Exit code: ${code}` : 'Process from config.webServer exited early.')),
|
||||
tempDirectories: []
|
||||
});
|
||||
this._killProcess = kill;
|
||||
this._killProcess = gracefullyClose;
|
||||
debugWebServer(`Process started`);
|
||||
launchedProcess.stderr.on('data', data => {
|
||||
var _onStdErr, _ref;
|
||||
|
||||
Reference in New Issue
Block a user