Innovenergy_trunk/frontend/node_modules/testcafe/lib/cli/index.js

20 lines
2.0 KiB
JavaScript

"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const resolve_cwd_1 = __importDefault(require("resolve-cwd"));
const log_1 = __importDefault(require("./log"));
function getLocalInstallation() {
const local = (0, resolve_cwd_1.default)('testcafe/lib/cli');
if (local && local !== __filename) {
log_1.default.write('Using locally installed version of TestCafe.');
return local;
}
return '';
}
(function loader() {
const cliPath = getLocalInstallation() || require.resolve('./cli');
require(cliPath);
})();
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvY2xpL2luZGV4LmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7O0FBQUEsOERBQXFDO0FBQ3JDLGdEQUF3QjtBQUd4QixTQUFTLG9CQUFvQjtJQUN6QixNQUFNLEtBQUssR0FBRyxJQUFBLHFCQUFVLEVBQUMsa0JBQWtCLENBQUMsQ0FBQztJQUU3QyxJQUFJLEtBQUssSUFBSSxLQUFLLEtBQUssVUFBVSxFQUFFO1FBQy9CLGFBQUcsQ0FBQyxLQUFLLENBQUMsOENBQThDLENBQUMsQ0FBQztRQUMxRCxPQUFPLEtBQUssQ0FBQztLQUNoQjtJQUVELE9BQU8sRUFBRSxDQUFDO0FBQ2QsQ0FBQztBQUVELENBQUMsU0FBUyxNQUFNO0lBQ1osTUFBTSxPQUFPLEdBQUcsb0JBQW9CLEVBQUUsSUFBSSxPQUFPLENBQUMsT0FBTyxDQUFDLE9BQU8sQ0FBQyxDQUFDO0lBRW5FLE9BQU8sQ0FBQyxPQUFPLENBQUMsQ0FBQztBQUNyQixDQUFDLENBQUMsRUFBRSxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHJl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