Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const chromium = require('./lib/chromium');
const sandbox = require('./lib/sandbox');
const log = require('lambda-log');
const apiHandler = require('./lib/api-handler');
if (process.env.DEBUG_ENV || process.env.SAM_LOCAL) {
log.config.debug = true;
log.config.dev = true;
}
log.info('Loading function');
// Create new reusable session (spawns chromium and webdriver)
if (!process.env.CLEAN_SESSIONS) {
$browser = chromium.createSession();
}
// Handler for POST events from API gateway
// curl -v -F "script=@examples/visitgoogle.js" <>
exports.postApiGatewayHandler = apiHandler;
// Default function event handler
// Accepts events:
// * {"Base64Script": "<>"}
const chromium = require('./lib/chromium');
const sandbox = require('./lib/sandbox');
const log = require('lambda-log');
const apiHandler = require('./lib/api-handler');
if (process.env.DEBUG_ENV || process.env.SAM_LOCAL) {
log.config.debug = true;
log.config.dev = true;
}
log.info('Loading function');
// Create new reusable session (spawns chromium and webdriver)
if (!process.env.CLEAN_SESSIONS) {
$browser = chromium.createSession();
}
// Handler for POST events from API gateway
// curl -v -F "script=@examples/visitgoogle.js" <>
exports.postApiGatewayHandler = apiHandler;
// Default function event handler
// Accepts events: