Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export function fetchNewDevice(auth: AuthState): Promise {
device = new Farmbot({ token: auth.token.encoded, secure });
set(window, "current_bot", device);
return device
.connect()
.then(() => device, () => bail("NO CONNECT"));
}