Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
if (availableDevices.length > 0) {
// just select the first device
let device = new ADB(CONNECTION_TYPES.USB, availableDevices[0]);
await device.connect();
console.log("connected");
let command = {
type: "reboot"
};
await device.runCommand(command);
await device.closeConnection();
console.log("closed");
}
}
console.log("starting");
asyncify(start);
});
await proc.start();
return prom;
}
async function main () {
const udid = _.last(process.argv);
const s = await getSocket(udid);
console.log('Simulator web inspector socket:', s);
// await moveSocket(s);
await startSoCat(s);
}
asyncify(main);
this.publicKeyAccepted();
}
},
ontimeout: function () {
console.log("timeout occured, returning to start");
}
}
});
async function start() {
await fsm.start();
console.log(fsm.current);
fsm.open();
}
asyncify(start);
, ".."
, ".."
, "largeFile");
let command = {
type: "pull"
, source: "sdcard/largeFile"
, destination: destinationFile
};
await device.runCommand(command);
await device.closeConnection();
console.log("closed");
}
}
console.log("Starting!");
asyncify(start);
import * as driver from './lib/driver';
const { MacDriver } = driver;
const DEFAULT_HOST = 'localhost';
const DEFAULT_PORT = 4723;
async function main () {
let port = yargs.argv.port || DEFAULT_PORT;
let address = yargs.argv.address || DEFAULT_HOST;
return await startServer(port, address);
}
if (require.main === module) {
asyncify(main);
}
export { MacDriver };
export default MacDriver;
const { AndroidUiautomator2Driver } = driver;
const { startServer } = server;
export const DEFAULT_HOST = 'localhost';
export const DEFAULT_PORT = 4884;
async function main () {
let port = yargs.argv.port || DEFAULT_PORT;
let host = yargs.argv.host || yargs.argv.address || DEFAULT_HOST;
return await startServer(port, host);
}
if (require.main === module) {
asyncify(main);
}
export { AndroidUiautomator2Driver, startServer };
export default AndroidUiautomator2Driver;
const packageJson = require('../../package.json');
const log = new logger.getLogger('Create Release Branch:');
async function setPackageJsonVersion (version = `${process.env.MINOR_BRANCH_NAME}.0-rc.0`) {
packageJson.version = version;
log.info(`Setting version to: ${version}`);
await fs.writeFile(
path.resolve(__dirname, '..', '..', 'package.json'),
JSON.stringify(packageJson, null, 2),
'utf8',
);
}
if (require.main === module) {
asyncify(setPackageJsonVersion);
}
module.exports = setPackageJsonVersion;
const shrinkwrapPath = path.resolve('npm-shrinkwrap.json');
if (!(await fs.exists(shrinkwrapPath))) {
log.info('No shrinkwrap found. Skipping shrinkwrap check');
return;
}
const shrinkwrap = JSON.parse(await fs.readFile(shrinkwrapPath));
const backupShrinkwrap = JSON.parse(await fs.readFile(path.resolve('npm-shrinkwrap-backup.json')));
log.info('Checking that pruned shrinkwrap is a subset of primary shrinkwrap');
if (!_.isMatch(backupShrinkwrap, shrinkwrap)) {
log.errorAndThrow('Pruned shrinkwrap (shrinkwrap with dev dependencies removed) is not a subset of the original npm-shrinkwrap.json');
}
log.info('Shrinkwrap check passed');
}
if (require.main === module) {
asyncify(main);
}
import yargs from 'yargs';
import { asyncify } from 'asyncbox';
import * as server from './lib/server';
const DEFAULT_HOST = 'localhost';
const DEFAULT_PORT = 4723;
async function main () {
let port = yargs.argv.port || DEFAULT_PORT;
let host = yargs.argv.host || DEFAULT_HOST;
return await server.startServer(port, host);
}
if (require.main === module) {
asyncify(main);
}
import * as driver from './lib/driver';
import * as caps from './lib/desired-caps';
import * as commandIndex from './lib/commands/index';
import * as settings from './lib/settings';
import * as device from './lib/device';
import * as utils from './lib/utils';
import * as iwdp from './lib/iwdp';
import * as uiauto from './lib/uiauto/uiauto';
import * as instruments from './lib/instruments/index';
import * as context from './lib/commands/context';
const startHttpsServer = server.startHttpsServer;
const { IosDriver, defaultServerCaps } = driver;
import * as server from './lib/server';
const { startServer } = server;
const DEFAULT_HOST = 'localhost';
const DEFAULT_PORT = 4723;
async function main () {
let port = yargs.argv.port || DEFAULT_PORT;
let host = yargs.argv.host || DEFAULT_HOST;
return await startServer(port, host);
}
if (require.main === module) {
asyncify(main);
}
import * as driver from './lib/driver';
import * as androidHelperIndex from './lib/android-helpers';
import * as commandIndex from './lib/commands/index';
import * as webview from './lib/webview-helpers';
import * as caps from './lib/desired-caps';
const { AndroidDriver } = driver;
const { helpers: webviewHelpers, NATIVE_WIN, WEBVIEW_WIN, WEBVIEW_BASE,
CHROMIUM_WIN } = webview;
const { commonCapConstraints } = caps;
const { commands: androidCommands } = commandIndex;
const { helpers: androidHelpers, SETTINGS_HELPER_PKG_ID } = androidHelperIndex;