Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
SyncTask.livesync = function() {
var localkit, nwError = false, projectDir;
try {
localkit = new Localkit(monaca, false);
} catch (error) {
return monaca
.reportFail(report, 'Unable to start debug: ' + util.parseError(error))
.catch(util.fail);
}
if (Object.keys(localkit.pairingKeys).length == 0) {
util.print('');
util.print('Welcome to Monaca debug - Live-reload and debug in the real device');
util.print('');
util.print('To get started, you need to install Monaca Debugger on your phone.')
util.print('');
util.print(' For Android Devices: Search and install "Monaca" in Google Play');
util.print(' For iOS Devices: Search and install "Monaca" in App Store');
util.print('')
util.print('After installation, connect your device to the same WiFi network');
AuthTask.logout = function() {
util.print('Signing out from Monaca Cloud...\n');
var localkit = new Localkit(monaca);
return monaca.logout()
.then(
function() {
util.print('You have been signed out.');
return localkit.clearPairing();
},
util.fail.bind(null, 'Unable to sign out: ')
)
.then(
util.print.bind(null, 'Removed Monaca Debugger pairing information.'),
util.fail.bind(null, 'Unable to remove Monaca Debugger pairing information: ')
)
};