This commit is contained in:
Tiệp Sunflower
2023-03-06 14:23:39 +07:00
commit aa9c76c82f
2234 changed files with 449471 additions and 0 deletions

12
node_modules/geckodriver/lib/geckodriver.d.ts generated vendored Normal file
View File

@@ -0,0 +1,12 @@
/// <reference types="node" />
import { ChildProcess } from 'child_process';
export const path: string;
export const version: string;
export function start(args?: ReadonlyArray<string>): ChildProcess;
export function stop(): void;
export const defaultInstance: ChildProcess | undefined;

21
node_modules/geckodriver/lib/geckodriver.js generated vendored Normal file
View File

@@ -0,0 +1,21 @@
var path = require('path');
// add the geckodriver path to process PATH
process.env.PATH += path.delimiter + path.join(__dirname, '..');
// support win32 vs other platforms
exports.path = process.platform === 'win32' ? path.join(__dirname, '..', 'geckodriver.exe') : path.join(__dirname, '..', 'geckodriver');
// specify the version of geckodriver
exports.version = process.env.GECKODRIVER_VERSION || '0.32.0';
exports.start = function(args) {
exports.defaultInstance = require('child_process').execFile(exports.path, args);
return exports.defaultInstance;
}
exports.stop = function () {
if (exports.defaultInstance !== null){
exports.defaultInstance.kill();
}
}