@qawolf/config
Advanced tools
Comparing version 0.7.5 to 0.8.0-alpha.0
export declare const CONFIG: { | ||
chromeExecutablePath: string | undefined; | ||
artifactPath: string | undefined; | ||
attribute: string | null; | ||
chromeOffsetX: number; | ||
chromeOffsetY: number; | ||
dataAttribute: string | null; | ||
debug: boolean; | ||
display: string | undefined; | ||
domPath: string | undefined; | ||
headless: boolean; | ||
logLevel: string | undefined; | ||
logPath: string | undefined; | ||
navigationTimeoutMs: number; | ||
serial: boolean; | ||
sleepMs: number; | ||
testUrl: string; | ||
timeoutMs: number; | ||
videoPath: string | undefined; | ||
}; |
"use strict"; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const dotenv_1 = require("dotenv"); | ||
const path_1 = __importDefault(require("path")); | ||
const dotEnvPath = process.env.QAW_DOTENV_PATH; | ||
@@ -15,20 +19,18 @@ dotenv_1.config(dotEnvPath ? { path: dotEnvPath } : {}); | ||
}; | ||
let artifactPath = process.env.QAW_ARTIFACT_PATH; | ||
if (artifactPath && require.main) { | ||
artifactPath = path_1.default.join(artifactPath, path_1.default.basename(require.main.filename)); | ||
} | ||
exports.CONFIG = { | ||
chromeExecutablePath: process.env.QAW_CHROME_EXECUTABLE_PATH, | ||
artifactPath, | ||
attribute: process.env.QAW_ATTRIBUTE || null, | ||
chromeOffsetX: parseNumber(process.env.QAW_CHROME_OFFSET_X, 0), | ||
chromeOffsetY: parseNumber(process.env.QAW_CHROME_OFFSET_Y, 125), | ||
dataAttribute: process.env.QAW_DATA_ATTRIBUTE || null, | ||
debug: parseBool(process.env.QAW_DEBUG), | ||
display: process.env.DISPLAY, | ||
domPath: process.env.QAW_DOM_PATH, | ||
headless: parseBool(process.env.QAW_HEADLESS), | ||
logLevel: process.env.QAW_LOG_LEVEL, | ||
logPath: process.env.QAW_LOG_PATH, | ||
navigationTimeoutMs: parseNumber(process.env.QAW_NAVIGATION_TIMEOUT_MS, 60000), | ||
serial: parseBool(process.env.QAW_SERIAL), | ||
sleepMs: parseNumber(process.env.QAW_SLEEP_MS, 1000), | ||
testUrl, | ||
timeoutMs: parseNumber(process.env.QAW_TIMEOUT_MS, 30000), | ||
videoPath: process.env.QAW_VIDEO_PATH | ||
timeoutMs: parseNumber(process.env.QAW_TIMEOUT_MS, 30000) | ||
}; | ||
//# sourceMappingURL=config.js.map |
{ | ||
"name": "@qawolf/config", | ||
"description": "qawolf config (node only)", | ||
"version": "0.7.5", | ||
"version": "0.8.0-alpha.0", | ||
"license": "BSD-3.0", | ||
@@ -29,3 +29,3 @@ "main": "./lib/index.js", | ||
}, | ||
"gitHead": "ed7a68fb816e8fa2581dfa3faa7dedf87fb50ac5" | ||
"gitHead": "50293cfb721b5cb470e81532178bfdb78fbda106" | ||
} |
import { config as configDotenv } from "dotenv"; | ||
import path from "path"; | ||
@@ -18,24 +19,23 @@ const dotEnvPath = process.env.QAW_DOTENV_PATH; | ||
let artifactPath = process.env.QAW_ARTIFACT_PATH; | ||
if (artifactPath && require.main) { | ||
// store artifacts under the name of the main module, if there is one | ||
// ex. /artifacts/search.test.js | ||
artifactPath = path.join(artifactPath, path.basename(require.main.filename)); | ||
} | ||
export const CONFIG = { | ||
chromeExecutablePath: process.env.QAW_CHROME_EXECUTABLE_PATH, | ||
artifactPath, | ||
attribute: process.env.QAW_ATTRIBUTE || null, | ||
chromeOffsetX: parseNumber(process.env.QAW_CHROME_OFFSET_X, 0), | ||
chromeOffsetY: parseNumber(process.env.QAW_CHROME_OFFSET_Y, 125), | ||
dataAttribute: process.env.QAW_DATA_ATTRIBUTE || null, | ||
debug: parseBool(process.env.QAW_DEBUG), | ||
display: process.env.DISPLAY, | ||
domPath: process.env.QAW_DOM_PATH, | ||
headless: parseBool(process.env.QAW_HEADLESS), | ||
logLevel: process.env.QAW_LOG_LEVEL, | ||
logPath: process.env.QAW_LOG_PATH, | ||
navigationTimeoutMs: parseNumber( | ||
process.env.QAW_NAVIGATION_TIMEOUT_MS, | ||
60000 | ||
), | ||
serial: parseBool(process.env.QAW_SERIAL), | ||
// slow down each step by 1s to make it watchable | ||
// this also gives sites time to setup their handlers | ||
sleepMs: parseNumber(process.env.QAW_SLEEP_MS, 1000), | ||
// for internal use | ||
testUrl, | ||
timeoutMs: parseNumber(process.env.QAW_TIMEOUT_MS, 30000), | ||
videoPath: process.env.QAW_VIDEO_PATH | ||
timeoutMs: parseNumber(process.env.QAW_TIMEOUT_MS, 30000) | ||
}; |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 2 instances in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 8 instances in 1 package
12
7889
105