Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
options.connect = {
host: 'localhost',
port: 9222,
remote: true
}
} else {
if (options.connect.port === undefined) {
options.connect.port = 9222
}
if (options.connect.host === undefined) {
options.connect.host = 'localhost'
}
options.connect.remote = true
}
await Launcher.launchNoConnect(options)
return CRI.Protocol(options.connect)
}
}
static Protocol (...args) {
return CDP.Protocol(...args)
}
static Protocol (...args) {
return CDP.Protocol(...args)
}
connect() {
const t = this;
Protocol(t.options).then((data) => {
data.descriptor.domains.forEach((domain) => {
if (t._domainProxies[domain.domain] !== undefined)
return;
var cmdEnable = null;
var cmdDisable = null;
domain.commands.forEach((command) => {
if (command.name === "enable")
cmdEnable = command;
else if (command.name === "disable")
cmdDisable = command;
});
if (cmdEnable || cmdDisable) {
LOG.debug("Creating default domain for " + domain.domain);
t._domainProxies[domain.domain] = new DefaultProxyDomain(this);
}
});
value: function connect() {
var _this6 = this;
var t = this;
Protocol(t.options).then(function (data) {
data.descriptor.domains.forEach(function (domain) {
if (t._domainProxies[domain.domain] !== undefined) return;
var cmdEnable = null;
var cmdDisable = null;
domain.commands.forEach(function (command) {
if (command.name === "enable") cmdEnable = command;else if (command.name === "disable") cmdDisable = command;
});
if (cmdEnable || cmdDisable) {
LOG.debug("Creating default domain for " + domain.domain);
t._domainProxies[domain.domain] = new DefaultProxyDomain(_this6);
}
});
});
return new Promise(function (resolve, reject) {
var url = t.target.originalWebSocketDebuggerUrl;
url = url.replace(/localhost\:/g, t.multiplexServer.options.remoteClientHostname + ":");
static async getProtocolDef (options = {}) {
options = ensureOptions(options)
return CRI.Protocol(options)
}
}