Rename ClientDevice to DummyDevice
Summary: Rename ClientDevice to DummyDevice. It is being currently used in the case when we do cert exchange through WWW/Distillery. In this mode we are not able to figure out the exact device id(instead we create a fake one) and thus we would not like to use Android or IOSDevice for such cases. Reviewed By: mweststrate Differential Revision: D26944415 fbshipit-source-id: f9f76e8997cf5402ba5627ae1959f5a11e078bb1
This commit is contained in:
committed by
Facebook GitHub Bot
parent
d12501677d
commit
60994bd41f
@@ -1,17 +0,0 @@
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @format
|
||||
*/
|
||||
|
||||
import BaseDevice, {OS} from './BaseDevice';
|
||||
|
||||
export default class ClientDevice extends BaseDevice {
|
||||
constructor(serial: string, title: string, os: OS) {
|
||||
super(serial, 'emulator', title, os);
|
||||
this.devicePlugins = [];
|
||||
}
|
||||
}
|
||||
20
desktop/app/src/devices/DummyDevice.tsx
Normal file
20
desktop/app/src/devices/DummyDevice.tsx
Normal file
@@ -0,0 +1,20 @@
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @format
|
||||
*/
|
||||
|
||||
import BaseDevice, {OS} from './BaseDevice';
|
||||
|
||||
/**
|
||||
* Use this device when you do not have the actual uuid of the device. For example, it is currently used in the case when, we do certificate exchange through WWW mode. In this mode we do not know the device id of the app and we generate a fake one.
|
||||
*/
|
||||
export default class DummyDevice extends BaseDevice {
|
||||
constructor(serial: string, title: string, os: OS) {
|
||||
super(serial, 'dummy', title, os);
|
||||
this.devicePlugins = [];
|
||||
}
|
||||
}
|
||||
@@ -38,7 +38,7 @@ import querystring from 'querystring';
|
||||
import {IncomingMessage} from 'http';
|
||||
import ws from 'ws';
|
||||
import {initSelfInpector} from './utils/self-inspection/selfInspectionUtils';
|
||||
import ClientDevice from './devices/ClientDevice';
|
||||
import DummyDevice from './devices/DummyDevice';
|
||||
import BaseDevice from './devices/BaseDevice';
|
||||
import {sideEffect} from './utils/sideEffect';
|
||||
import {destroyDevice} from './reducers/connections';
|
||||
@@ -306,7 +306,7 @@ class Server extends EventEmitter {
|
||||
if (transformedMedium === 'WWW') {
|
||||
this.store.dispatch({
|
||||
type: 'REGISTER_DEVICE',
|
||||
payload: new ClientDevice(device_id, app, os),
|
||||
payload: new DummyDevice(device_id, app, os),
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -58,9 +58,9 @@
|
||||
"enum": ["iOS", "Android", "Metro"]
|
||||
},
|
||||
"type": {
|
||||
"description": "Device type: physical or emulator. Lack of this property means both physical and emulator devices supported.",
|
||||
"description": "Device type: physical or emulator or dummy. Lack of this property means it supports physical, emulator and dummy devices.",
|
||||
"type": "string",
|
||||
"enum": ["physical", "emulator"]
|
||||
"enum": ["physical", "emulator", "dummy"]
|
||||
},
|
||||
"archived": {
|
||||
"description": "Specifies support for archived devices. Lack of this property means that both live and archived devices supported. False means only live devices supported. True means only archived devices supported.",
|
||||
|
||||
@@ -40,7 +40,7 @@ export interface SupportedDevice {
|
||||
|
||||
export type OS = 'iOS' | 'Android' | 'Metro';
|
||||
|
||||
export type DeviceType = 'emulator' | 'physical';
|
||||
export type DeviceType = 'emulator' | 'physical' | 'dummy';
|
||||
|
||||
export type PluginType = 'client' | 'device';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user