handle device / client absence for deeplinks
Summary: This diff makes the new deeplink format feature complete, make sure VPN connection, plugin installation, client & device selection are now all handled. See the test plan for examples. Changelog: Flipper now supports a richer protocol for opening deeplinks: https://fbflipper.com/docs/extending/deeplinks#open-plugin Reviewed By: timur-valiev Differential Revision: D30423809 fbshipit-source-id: e6cf4bf852b2c64e9a79a33ef0842eb27f68f840
This commit is contained in:
committed by
Facebook GitHub Bot
parent
846246ffae
commit
a2644b4a2e
@@ -8,7 +8,7 @@
|
||||
*/
|
||||
|
||||
import {createStore} from 'redux';
|
||||
import BaseDevice from '../server/devices/BaseDevice';
|
||||
import BaseDevice, {OS} from '../server/devices/BaseDevice';
|
||||
import {createRootReducer} from '../reducers';
|
||||
import {Store} from '../reducers/index';
|
||||
import Client, {ClientQuery} from '../Client';
|
||||
@@ -43,6 +43,7 @@ export interface DeviceOptions {
|
||||
serial?: string;
|
||||
isSupportedByPlugin?: (p: PluginDetails) => boolean;
|
||||
archived?: boolean;
|
||||
os?: OS;
|
||||
}
|
||||
|
||||
export default class MockFlipper {
|
||||
@@ -117,6 +118,7 @@ export default class MockFlipper {
|
||||
serial,
|
||||
isSupportedByPlugin,
|
||||
archived,
|
||||
os,
|
||||
}: DeviceOptions = {}): BaseDevice {
|
||||
const s = serial ?? `serial_${++this._deviceCounter}`;
|
||||
const device = archived
|
||||
@@ -126,7 +128,7 @@ export default class MockFlipper {
|
||||
title: 'archived device',
|
||||
os: 'Android',
|
||||
})
|
||||
: new BaseDevice(s, 'physical', 'MockAndroidDevice', 'Android');
|
||||
: new BaseDevice(s, 'physical', 'MockAndroidDevice', os ?? 'Android');
|
||||
device.supportsPlugin = !isSupportedByPlugin
|
||||
? () => true
|
||||
: isSupportedByPlugin;
|
||||
|
||||
Reference in New Issue
Block a user