Fixed a bunch of prettier errors after upgrading
Summary: prettier upgrade uncovered more errors Reviewed By: passy Differential Revision: D18474908 fbshipit-source-id: b1553000fb3386f2bbd9defdd3332618e4b9c867
This commit is contained in:
committed by
Facebook Github Bot
parent
677f7b5b5f
commit
f2d12f1025
@@ -7,3 +7,4 @@ flow-typed
|
|||||||
lib
|
lib
|
||||||
!.eslintrc.js
|
!.eslintrc.js
|
||||||
dist
|
dist
|
||||||
|
website/build
|
||||||
|
|||||||
@@ -274,9 +274,9 @@ async function startFlipper(userArguments: UserArguments) {
|
|||||||
);
|
);
|
||||||
const logger = initLogger(store, {isHeadless: true});
|
const logger = initLogger(store, {isHeadless: true});
|
||||||
|
|
||||||
const earlyExitClosures: Array<
|
const earlyExitClosures: Array<(
|
||||||
(userArguments: UserArguments) => Promise<Action>
|
userArguments: UserArguments,
|
||||||
> = [
|
) => Promise<Action>> = [
|
||||||
async (userArguments: UserArguments) => {
|
async (userArguments: UserArguments) => {
|
||||||
if (userArguments.listDevices) {
|
if (userArguments.listDevices) {
|
||||||
const devices = await listDevices(store);
|
const devices = await listDevices(store);
|
||||||
@@ -298,9 +298,10 @@ async function startFlipper(userArguments: UserArguments) {
|
|||||||
|
|
||||||
const cleanupDispatchers = dispatcher(store, logger);
|
const cleanupDispatchers = dispatcher(store, logger);
|
||||||
|
|
||||||
const storeModifyingClosures: Array<
|
const storeModifyingClosures: Array<(
|
||||||
(userArguments: UserArguments, store: Store) => Promise<Action>
|
userArguments: UserArguments,
|
||||||
> = [
|
store: Store,
|
||||||
|
) => Promise<Action>> = [
|
||||||
async (userArguments: UserArguments, store: Store) => {
|
async (userArguments: UserArguments, store: Store) => {
|
||||||
const {device: selectedDeviceID} = userArguments;
|
const {device: selectedDeviceID} = userArguments;
|
||||||
if (selectedDeviceID) {
|
if (selectedDeviceID) {
|
||||||
@@ -346,9 +347,10 @@ async function startFlipper(userArguments: UserArguments) {
|
|||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
const exitActionClosures: Array<
|
const exitActionClosures: Array<(
|
||||||
(userArguments: UserArguments, store: Store) => Promise<Action>
|
userArguments: UserArguments,
|
||||||
> = [
|
store: Store,
|
||||||
|
) => Promise<Action>> = [
|
||||||
async (userArguments: UserArguments, store: Store) => {
|
async (userArguments: UserArguments, store: Store) => {
|
||||||
const {listPlugins} = userArguments;
|
const {listPlugins} = userArguments;
|
||||||
if (listPlugins) {
|
if (listPlugins) {
|
||||||
|
|||||||
@@ -66,7 +66,10 @@ test('persistedStateReducer is adding data', () => {
|
|||||||
const tablePlugin = createTablePlugin({...PROPS, method});
|
const tablePlugin = createTablePlugin({...PROPS, method});
|
||||||
const id = '1';
|
const id = '1';
|
||||||
|
|
||||||
const {rows, datas} = tablePlugin.persistedStateReducer(
|
const {
|
||||||
|
rows,
|
||||||
|
datas,
|
||||||
|
} = tablePlugin.persistedStateReducer(
|
||||||
tablePlugin.defaultPersistedState,
|
tablePlugin.defaultPersistedState,
|
||||||
method,
|
method,
|
||||||
{id},
|
{id},
|
||||||
|
|||||||
@@ -81,8 +81,7 @@ class ExportDataPluginSheet extends Component<Props> {
|
|||||||
selectedElements={getActivePersistentPlugins(
|
selectedElements={getActivePersistentPlugins(
|
||||||
pluginStates,
|
pluginStates,
|
||||||
plugins,
|
plugins,
|
||||||
).reduce(
|
).reduce((acc, plugin) => {
|
||||||
(acc, plugin) => {
|
|
||||||
if (
|
if (
|
||||||
plugins.selectedPlugins.length <= 0 ||
|
plugins.selectedPlugins.length <= 0 ||
|
||||||
plugins.selectedPlugins.includes(plugin)
|
plugins.selectedPlugins.includes(plugin)
|
||||||
@@ -90,9 +89,7 @@ class ExportDataPluginSheet extends Component<Props> {
|
|||||||
acc.add(plugin);
|
acc.add(plugin);
|
||||||
}
|
}
|
||||||
return acc;
|
return acc;
|
||||||
},
|
}, new Set([]) as Set<string>)}
|
||||||
new Set([]) as Set<string>,
|
|
||||||
)}
|
|
||||||
onHide={onHide}
|
onHide={onHide}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ import {BackgroundColorProperty} from 'csstype';
|
|||||||
import {StyledOtherComponent} from 'create-emotion-styled';
|
import {StyledOtherComponent} from 'create-emotion-styled';
|
||||||
import SupportRequestFormManager from '../fb-stubs/SupportRequestFormManager';
|
import SupportRequestFormManager from '../fb-stubs/SupportRequestFormManager';
|
||||||
|
|
||||||
type FlipperPlugins = (typeof FlipperPlugin)[];
|
type FlipperPlugins = typeof FlipperPlugin[];
|
||||||
type PluginsByCategory = [string, FlipperPlugins][];
|
type PluginsByCategory = [string, FlipperPlugins][];
|
||||||
|
|
||||||
const ListItem = styled('div')(({active}: {active?: boolean}) => ({
|
const ListItem = styled('div')(({active}: {active?: boolean}) => ({
|
||||||
|
|||||||
@@ -108,7 +108,10 @@ test('checkGK for failing plugin', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
test('requirePlugin returns null for invalid requires', () => {
|
test('requirePlugin returns null for invalid requires', () => {
|
||||||
const plugin = requirePlugin([], require)({
|
const plugin = requirePlugin(
|
||||||
|
[],
|
||||||
|
require,
|
||||||
|
)({
|
||||||
name: 'pluginID',
|
name: 'pluginID',
|
||||||
out: 'this/path/does not/exist',
|
out: 'this/path/does not/exist',
|
||||||
});
|
});
|
||||||
@@ -119,7 +122,10 @@ test('requirePlugin returns null for invalid requires', () => {
|
|||||||
test('requirePlugin loads plugin', () => {
|
test('requirePlugin loads plugin', () => {
|
||||||
const name = 'pluginID';
|
const name = 'pluginID';
|
||||||
const homepage = 'https://fb.workplace.com/groups/flippersupport/';
|
const homepage = 'https://fb.workplace.com/groups/flippersupport/';
|
||||||
const plugin = requirePlugin([], require)({
|
const plugin = requirePlugin(
|
||||||
|
[],
|
||||||
|
require,
|
||||||
|
)({
|
||||||
name,
|
name,
|
||||||
homepage,
|
homepage,
|
||||||
out: path.join(__dirname, 'TestPlugin.js'),
|
out: path.join(__dirname, 'TestPlugin.js'),
|
||||||
|
|||||||
@@ -115,9 +115,7 @@ export default (store: Store, logger: Logger) => {
|
|||||||
if (err.message === 'Connection closed') {
|
if (err.message === 'Connection closed') {
|
||||||
// adb server has shutdown, remove all android devices
|
// adb server has shutdown, remove all android devices
|
||||||
const {connections} = store.getState();
|
const {connections} = store.getState();
|
||||||
const deviceIDsToRemove: Array<
|
const deviceIDsToRemove: Array<string> = connections.devices
|
||||||
string
|
|
||||||
> = connections.devices
|
|
||||||
.filter(
|
.filter(
|
||||||
(device: BaseDevice) => device instanceof AndroidDevice,
|
(device: BaseDevice) => device instanceof AndroidDevice,
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -24,9 +24,7 @@ export {PluginClient, Props} from './plugin';
|
|||||||
export {default as Client} from './Client';
|
export {default as Client} from './Client';
|
||||||
export {MetricType} from './utils/exportMetrics';
|
export {MetricType} from './utils/exportMetrics';
|
||||||
export {clipboard} from 'electron';
|
export {clipboard} from 'electron';
|
||||||
export {
|
export {default as SupportRequestFormManager} from './fb-stubs/SupportRequestFormManager';
|
||||||
default as SupportRequestFormManager,
|
|
||||||
} from './fb-stubs/SupportRequestFormManager';
|
|
||||||
export {default as constants} from './fb-stubs/constants';
|
export {default as constants} from './fb-stubs/constants';
|
||||||
export {connect} from 'react-redux';
|
export {connect} from 'react-redux';
|
||||||
export {selectPlugin, StaticView} from './reducers/connections';
|
export {selectPlugin, StaticView} from './reducers/connections';
|
||||||
@@ -35,9 +33,7 @@ export {getPluginKey, getPersistedState} from './utils/pluginUtils';
|
|||||||
export {Idler} from './utils/Idler';
|
export {Idler} from './utils/Idler';
|
||||||
export {Store, MiddlewareAPI} from './reducers/index';
|
export {Store, MiddlewareAPI} from './reducers/index';
|
||||||
export {default as BaseDevice} from './devices/BaseDevice';
|
export {default as BaseDevice} from './devices/BaseDevice';
|
||||||
export {
|
export {default as SidebarExtensions} from './fb-stubs/LayoutInspectorSidebarExtensions';
|
||||||
default as SidebarExtensions,
|
|
||||||
} from './fb-stubs/LayoutInspectorSidebarExtensions';
|
|
||||||
export {
|
export {
|
||||||
DeviceLogListener,
|
DeviceLogListener,
|
||||||
DeviceLogEntry,
|
DeviceLogEntry,
|
||||||
@@ -55,9 +51,7 @@ export {default as KaiOSDevice} from './devices/KaiOSDevice';
|
|||||||
export {OS} from './devices/BaseDevice';
|
export {OS} from './devices/BaseDevice';
|
||||||
export {default as Button} from './ui/components/Button';
|
export {default as Button} from './ui/components/Button';
|
||||||
export {default as ToggleButton} from './ui/components/ToggleSwitch';
|
export {default as ToggleButton} from './ui/components/ToggleSwitch';
|
||||||
export {
|
export {default as ButtonNavigationGroup} from './ui/components/ButtonNavigationGroup';
|
||||||
default as ButtonNavigationGroup,
|
|
||||||
} from './ui/components/ButtonNavigationGroup';
|
|
||||||
export {default as ButtonGroup} from './ui/components/ButtonGroup';
|
export {default as ButtonGroup} from './ui/components/ButtonGroup';
|
||||||
export {default as ButtonGroupChain} from './ui/components/ButtonGroupChain';
|
export {default as ButtonGroupChain} from './ui/components/ButtonGroupChain';
|
||||||
export {colors, darkColors, brandColors} from './ui/components/colors';
|
export {colors, darkColors, brandColors} from './ui/components/colors';
|
||||||
@@ -90,15 +84,9 @@ export {
|
|||||||
DataValueExtractor,
|
DataValueExtractor,
|
||||||
DataInspectorExpanded,
|
DataInspectorExpanded,
|
||||||
} from './ui/components/data-inspector/DataInspector';
|
} from './ui/components/data-inspector/DataInspector';
|
||||||
export {
|
export {default as DataInspector} from './ui/components/data-inspector/DataInspector';
|
||||||
default as DataInspector,
|
export {default as ManagedDataInspector} from './ui/components/data-inspector/ManagedDataInspector';
|
||||||
} from './ui/components/data-inspector/DataInspector';
|
export {default as DataDescription} from './ui/components/data-inspector/DataDescription';
|
||||||
export {
|
|
||||||
default as ManagedDataInspector,
|
|
||||||
} from './ui/components/data-inspector/ManagedDataInspector';
|
|
||||||
export {
|
|
||||||
default as DataDescription,
|
|
||||||
} from './ui/components/data-inspector/DataDescription';
|
|
||||||
export {default as Tabs} from './ui/components/Tabs';
|
export {default as Tabs} from './ui/components/Tabs';
|
||||||
export {default as Tab} from './ui/components/Tab';
|
export {default as Tab} from './ui/components/Tab';
|
||||||
export {default as Input} from './ui/components/Input';
|
export {default as Input} from './ui/components/Input';
|
||||||
@@ -114,9 +102,7 @@ export {default as Interactive} from './ui/components/Interactive';
|
|||||||
export {default as Orderable} from './ui/components/Orderable';
|
export {default as Orderable} from './ui/components/Orderable';
|
||||||
export {default as VirtualList} from './ui/components/VirtualList';
|
export {default as VirtualList} from './ui/components/VirtualList';
|
||||||
export {Component, PureComponent} from 'react';
|
export {Component, PureComponent} from 'react';
|
||||||
export {
|
export {default as ContextMenuProvider} from './ui/components/ContextMenuProvider';
|
||||||
default as ContextMenuProvider,
|
|
||||||
} from './ui/components/ContextMenuProvider';
|
|
||||||
export {default as ContextMenu} from './ui/components/ContextMenu';
|
export {default as ContextMenu} from './ui/components/ContextMenu';
|
||||||
export {FileListFile, FileListFiles} from './ui/components/FileList';
|
export {FileListFile, FileListFiles} from './ui/components/FileList';
|
||||||
export {default as FileList} from './ui/components/FileList';
|
export {default as FileList} from './ui/components/FileList';
|
||||||
@@ -162,12 +148,8 @@ export {
|
|||||||
SearchableProps,
|
SearchableProps,
|
||||||
default as Searchable,
|
default as Searchable,
|
||||||
} from './ui/components/searchable/Searchable';
|
} from './ui/components/searchable/Searchable';
|
||||||
export {
|
export {default as SearchableTable} from './ui/components/searchable/SearchableTable';
|
||||||
default as SearchableTable,
|
export {default as SearchableTable_immutable} from './ui/components/searchable/SearchableTable_immutable';
|
||||||
} from './ui/components/searchable/SearchableTable';
|
|
||||||
export {
|
|
||||||
default as SearchableTable_immutable,
|
|
||||||
} from './ui/components/searchable/SearchableTable_immutable';
|
|
||||||
export {
|
export {
|
||||||
ElementID,
|
ElementID,
|
||||||
ElementData,
|
ElementData,
|
||||||
@@ -176,12 +158,8 @@ export {
|
|||||||
ElementSearchResultSet,
|
ElementSearchResultSet,
|
||||||
} from './ui/components/elements-inspector/ElementsInspector';
|
} from './ui/components/elements-inspector/ElementsInspector';
|
||||||
export {Elements} from './ui/components/elements-inspector/elements';
|
export {Elements} from './ui/components/elements-inspector/elements';
|
||||||
export {
|
export {ContextMenuExtension} from './ui/components/elements-inspector/elements';
|
||||||
ContextMenuExtension,
|
export {default as ElementsInspector} from './ui/components/elements-inspector/ElementsInspector';
|
||||||
} from './ui/components/elements-inspector/elements';
|
|
||||||
export {
|
|
||||||
default as ElementsInspector,
|
|
||||||
} from './ui/components/elements-inspector/ElementsInspector';
|
|
||||||
export {InspectorSidebar} from './ui/components/elements-inspector/sidebar';
|
export {InspectorSidebar} from './ui/components/elements-inspector/sidebar';
|
||||||
export {Console} from './ui/components/console';
|
export {Console} from './ui/components/console';
|
||||||
export {default as Sheet} from './ui/components/Sheet';
|
export {default as Sheet} from './ui/components/Sheet';
|
||||||
|
|||||||
@@ -82,12 +82,10 @@ export abstract class FlipperBasePlugin<
|
|||||||
static icon: string | null = null;
|
static icon: string | null = null;
|
||||||
static gatekeeper: string | null = null;
|
static gatekeeper: string | null = null;
|
||||||
static entry: string | null = null;
|
static entry: string | null = null;
|
||||||
static bugs:
|
static bugs: {
|
||||||
| ({
|
|
||||||
email?: string;
|
email?: string;
|
||||||
url?: string;
|
url?: string;
|
||||||
})
|
} | null = null;
|
||||||
| null = null;
|
|
||||||
static keyboardActions: KeyboardActions | null;
|
static keyboardActions: KeyboardActions | null;
|
||||||
static screenshot: string | null;
|
static screenshot: string | null;
|
||||||
static defaultPersistedState: any;
|
static defaultPersistedState: any;
|
||||||
|
|||||||
@@ -41,8 +41,7 @@ function mockPersistedState(
|
|||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
const imagesMap = imageSizes.reduce(
|
const imagesMap = imageSizes.reduce((acc, val, index) => {
|
||||||
(acc, val, index) => {
|
|
||||||
acc[index] = {
|
acc[index] = {
|
||||||
imageId: String(index),
|
imageId: String(index),
|
||||||
width: val.width,
|
width: val.width,
|
||||||
@@ -51,9 +50,7 @@ function mockPersistedState(
|
|||||||
data: 'undefined',
|
data: 'undefined',
|
||||||
};
|
};
|
||||||
return acc;
|
return acc;
|
||||||
},
|
}, {} as ImagesMap);
|
||||||
{} as ImagesMap,
|
|
||||||
);
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
surfaceList: new Set(),
|
surfaceList: new Set(),
|
||||||
@@ -233,8 +230,7 @@ test('the metric reducer with the multiple events', () => {
|
|||||||
height: 300,
|
height: 300,
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
const imagesMap = imageSizes.reduce(
|
const imagesMap = imageSizes.reduce((acc, val, index) => {
|
||||||
(acc, val, index) => {
|
|
||||||
acc[index] = {
|
acc[index] = {
|
||||||
imageId: String(index),
|
imageId: String(index),
|
||||||
width: val.width,
|
width: val.width,
|
||||||
@@ -243,9 +239,7 @@ test('the metric reducer with the multiple events', () => {
|
|||||||
data: 'undefined',
|
data: 'undefined',
|
||||||
};
|
};
|
||||||
return acc;
|
return acc;
|
||||||
},
|
}, {} as ImagesMap);
|
||||||
{} as ImagesMap,
|
|
||||||
);
|
|
||||||
const persistedState = {
|
const persistedState = {
|
||||||
surfaceList: new Set<string>(),
|
surfaceList: new Set<string>(),
|
||||||
images: [],
|
images: [],
|
||||||
|
|||||||
@@ -110,7 +110,6 @@ export default class FlipperImagesPlugin extends FlipperPlugin<
|
|||||||
if (!store) {
|
if (!store) {
|
||||||
return defaultPromise;
|
return defaultPromise;
|
||||||
}
|
}
|
||||||
const selectedDevice = store.getState().connections.selectedDevice;
|
|
||||||
return Promise.all([
|
return Promise.all([
|
||||||
callClient('listImages'),
|
callClient('listImages'),
|
||||||
callClient('getAllImageEventsInfo'),
|
callClient('getAllImageEventsInfo'),
|
||||||
@@ -244,7 +243,7 @@ export default class FlipperImagesPlugin extends FlipperPlugin<
|
|||||||
}: PersistedState): Array<Notification> =>
|
}: PersistedState): Array<Notification> =>
|
||||||
closeableReferenceLeaks
|
closeableReferenceLeaks
|
||||||
.filter(_ => isLeakTrackingEnabled)
|
.filter(_ => isLeakTrackingEnabled)
|
||||||
.map((event: AndroidCloseableReferenceLeakEvent, index) => ({
|
.map((event: AndroidCloseableReferenceLeakEvent) => ({
|
||||||
id: event.identityHashCode,
|
id: event.identityHashCode,
|
||||||
title: `Leaked CloseableReference: ${event.className}`,
|
title: `Leaked CloseableReference: ${event.className}`,
|
||||||
message: (
|
message: (
|
||||||
|
|||||||
@@ -19,7 +19,6 @@ import {DeviceLogEntry} from '../../devices/BaseDevice';
|
|||||||
|
|
||||||
import {
|
import {
|
||||||
Text,
|
Text,
|
||||||
ManagedTable,
|
|
||||||
ManagedTableClass,
|
ManagedTableClass,
|
||||||
Button,
|
Button,
|
||||||
colors,
|
colors,
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ export default class extends FlipperPlugin<State, any, PersistedState> {
|
|||||||
|
|
||||||
state = {
|
state = {
|
||||||
shouldShowSaveBookmarkDialog: false,
|
shouldShowSaveBookmarkDialog: false,
|
||||||
saveBookmarkURI: null as (string | null),
|
saveBookmarkURI: null as string | null,
|
||||||
shouldShowURIErrorDialog: false,
|
shouldShowURIErrorDialog: false,
|
||||||
requiredParameters: [],
|
requiredParameters: [],
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -9,15 +9,7 @@
|
|||||||
|
|
||||||
import type {SectionComponentHierarchy} from './Models';
|
import type {SectionComponentHierarchy} from './Models';
|
||||||
|
|
||||||
import {
|
import {Glyph, PureComponent, styled, Toolbar, Spacer, colors} from 'flipper';
|
||||||
Button,
|
|
||||||
Glyph,
|
|
||||||
PureComponent,
|
|
||||||
styled,
|
|
||||||
Toolbar,
|
|
||||||
Spacer,
|
|
||||||
colors,
|
|
||||||
} from 'flipper';
|
|
||||||
import {Tree} from 'react-d3-tree';
|
import {Tree} from 'react-d3-tree';
|
||||||
import {Fragment} from 'react';
|
import {Fragment} from 'react';
|
||||||
|
|
||||||
|
|||||||
@@ -12,12 +12,7 @@ import {
|
|||||||
registerPlugins,
|
registerPlugins,
|
||||||
addGatekeepedPlugins,
|
addGatekeepedPlugins,
|
||||||
} from '../plugins';
|
} from '../plugins';
|
||||||
import {
|
import {FlipperPlugin, FlipperDevicePlugin, BaseAction} from '../../plugin';
|
||||||
FlipperBasePlugin,
|
|
||||||
FlipperPlugin,
|
|
||||||
FlipperDevicePlugin,
|
|
||||||
BaseAction,
|
|
||||||
} from '../../plugin';
|
|
||||||
|
|
||||||
const testPlugin = class extends FlipperPlugin<any, BaseAction, any> {
|
const testPlugin = class extends FlipperPlugin<any, BaseAction, any> {
|
||||||
static id = 'TestPlugin';
|
static id = 'TestPlugin';
|
||||||
|
|||||||
@@ -260,7 +260,10 @@ const diffMetadataExtractor: DiffMetadataExtractor = (
|
|||||||
// Check if there's a difference between the original value and
|
// Check if there's a difference between the original value and
|
||||||
// the value from the diff prop
|
// the value from the diff prop
|
||||||
// The property name still exists, but the values may be different.
|
// The property name still exists, but the values may be different.
|
||||||
return [{data: val, status: 'added'}, {data: diffVal, status: 'removed'}];
|
return [
|
||||||
|
{data: val, status: 'added'},
|
||||||
|
{data: diffVal, status: 'removed'},
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
return Object.prototype.hasOwnProperty.call(data, key) ? [{data: val}] : [];
|
return Object.prototype.hasOwnProperty.call(data, key) ? [{data: val}] : [];
|
||||||
|
|||||||
@@ -105,8 +105,8 @@ export default class FilterToken extends PureComponent<Props> {
|
|||||||
onMouseDown = () => {
|
onMouseDown = () => {
|
||||||
if (
|
if (
|
||||||
this.props.filter.type !== 'enum' ||
|
this.props.filter.type !== 'enum' ||
|
||||||
(this.props.filter.persistent == null ||
|
this.props.filter.persistent == null ||
|
||||||
this.props.filter.persistent === false)
|
this.props.filter.persistent === false
|
||||||
) {
|
) {
|
||||||
this.props.onFocus(this.props.index);
|
this.props.onFocus(this.props.index);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,9 +10,7 @@
|
|||||||
export {default as styled} from 'react-emotion';
|
export {default as styled} from 'react-emotion';
|
||||||
export {default as Button} from './components/Button';
|
export {default as Button} from './components/Button';
|
||||||
export {default as ToggleButton} from './components/ToggleSwitch';
|
export {default as ToggleButton} from './components/ToggleSwitch';
|
||||||
export {
|
export {default as ButtonNavigationGroup} from './components/ButtonNavigationGroup';
|
||||||
default as ButtonNavigationGroup,
|
|
||||||
} from './components/ButtonNavigationGroup';
|
|
||||||
export {default as ButtonGroup} from './components/ButtonGroup';
|
export {default as ButtonGroup} from './components/ButtonGroup';
|
||||||
export {default as ButtonGroupChain} from './components/ButtonGroupChain';
|
export {default as ButtonGroupChain} from './components/ButtonGroupChain';
|
||||||
|
|
||||||
@@ -39,12 +37,8 @@ export {
|
|||||||
} from './components/table/types';
|
} from './components/table/types';
|
||||||
export {default as ManagedTable} from './components/table/ManagedTable';
|
export {default as ManagedTable} from './components/table/ManagedTable';
|
||||||
export {ManagedTableProps} from './components/table/ManagedTable';
|
export {ManagedTableProps} from './components/table/ManagedTable';
|
||||||
export {
|
export {default as ManagedTable_immutable} from './components/table/ManagedTable_immutable';
|
||||||
default as ManagedTable_immutable,
|
export {ManagedTableProps_immutable} from './components/table/ManagedTable_immutable';
|
||||||
} from './components/table/ManagedTable_immutable';
|
|
||||||
export {
|
|
||||||
ManagedTableProps_immutable,
|
|
||||||
} from './components/table/ManagedTable_immutable';
|
|
||||||
|
|
||||||
export {Value} from './components/table/TypeBasedValueRenderer';
|
export {Value} from './components/table/TypeBasedValueRenderer';
|
||||||
export {renderValue} from './components/table/TypeBasedValueRenderer';
|
export {renderValue} from './components/table/TypeBasedValueRenderer';
|
||||||
@@ -53,15 +47,9 @@ export {
|
|||||||
DataValueExtractor,
|
DataValueExtractor,
|
||||||
DataInspectorExpanded,
|
DataInspectorExpanded,
|
||||||
} from './components/data-inspector/DataInspector';
|
} from './components/data-inspector/DataInspector';
|
||||||
export {
|
export {default as DataInspector} from './components/data-inspector/DataInspector';
|
||||||
default as DataInspector,
|
export {default as ManagedDataInspector} from './components/data-inspector/ManagedDataInspector';
|
||||||
} from './components/data-inspector/DataInspector';
|
export {default as DataDescription} from './components/data-inspector/DataDescription';
|
||||||
export {
|
|
||||||
default as ManagedDataInspector,
|
|
||||||
} from './components/data-inspector/ManagedDataInspector';
|
|
||||||
export {
|
|
||||||
default as DataDescription,
|
|
||||||
} from './components/data-inspector/DataDescription';
|
|
||||||
|
|
||||||
// tabs
|
// tabs
|
||||||
export {default as Tabs} from './components/Tabs';
|
export {default as Tabs} from './components/Tabs';
|
||||||
@@ -151,12 +139,8 @@ export {
|
|||||||
SearchIcon,
|
SearchIcon,
|
||||||
default as Searchable,
|
default as Searchable,
|
||||||
} from './components/searchable/Searchable';
|
} from './components/searchable/Searchable';
|
||||||
export {
|
export {default as SearchableTable} from './components/searchable/SearchableTable';
|
||||||
default as SearchableTable,
|
export {default as SearchableTable_immutable} from './components/searchable/SearchableTable_immutable';
|
||||||
} from './components/searchable/SearchableTable';
|
|
||||||
export {
|
|
||||||
default as SearchableTable_immutable,
|
|
||||||
} from './components/searchable/SearchableTable_immutable';
|
|
||||||
export {SearchableProps} from './components/searchable/Searchable';
|
export {SearchableProps} from './components/searchable/Searchable';
|
||||||
|
|
||||||
export {
|
export {
|
||||||
@@ -168,9 +152,7 @@ export {
|
|||||||
} from './components/elements-inspector/ElementsInspector';
|
} from './components/elements-inspector/ElementsInspector';
|
||||||
export {Elements} from './components/elements-inspector/elements';
|
export {Elements} from './components/elements-inspector/elements';
|
||||||
export {ContextMenuExtension} from './components/elements-inspector/elements';
|
export {ContextMenuExtension} from './components/elements-inspector/elements';
|
||||||
export {
|
export {default as ElementsInspector} from './components/elements-inspector/ElementsInspector';
|
||||||
default as ElementsInspector,
|
|
||||||
} from './components/elements-inspector/ElementsInspector';
|
|
||||||
export {InspectorSidebar} from './components/elements-inspector/sidebar';
|
export {InspectorSidebar} from './components/elements-inspector/sidebar';
|
||||||
|
|
||||||
export {Console} from './components/console';
|
export {Console} from './components/console';
|
||||||
|
|||||||
@@ -203,8 +203,11 @@ export default class CertificateProvider {
|
|||||||
const deviceIdPromise = appNamePromise.then(app =>
|
const deviceIdPromise = appNamePromise.then(app =>
|
||||||
this.getTargetAndroidDeviceId(app, destination, csr),
|
this.getTargetAndroidDeviceId(app, destination, csr),
|
||||||
);
|
);
|
||||||
return Promise.all([deviceIdPromise, appNamePromise, this.adb]).then(
|
return Promise.all([
|
||||||
([deviceId, appName, adbClient]) =>
|
deviceIdPromise,
|
||||||
|
appNamePromise,
|
||||||
|
this.adb,
|
||||||
|
]).then(([deviceId, appName, adbClient]) =>
|
||||||
androidUtil.push(
|
androidUtil.push(
|
||||||
adbClient,
|
adbClient,
|
||||||
deviceId,
|
deviceId,
|
||||||
|
|||||||
@@ -65,11 +65,17 @@ test('test makeObjectSerializable and deserializeObject function for nested obje
|
|||||||
});
|
});
|
||||||
|
|
||||||
test('test makeObjectSerializable and deserializeObject function for Map and Set with no nesting', async () => {
|
test('test makeObjectSerializable and deserializeObject function for Map and Set with no nesting', async () => {
|
||||||
const map = new Map([['k1', 'v1'], ['k2', 'v2']]);
|
const map = new Map([
|
||||||
|
['k1', 'v1'],
|
||||||
|
['k2', 'v2'],
|
||||||
|
]);
|
||||||
const output = await makeObjectSerializable(map);
|
const output = await makeObjectSerializable(map);
|
||||||
const expected = {
|
const expected = {
|
||||||
__flipper_object_type__: 'Map',
|
__flipper_object_type__: 'Map',
|
||||||
data: [['k1', 'v1'], ['k2', 'v2']],
|
data: [
|
||||||
|
['k1', 'v1'],
|
||||||
|
['k2', 'v2'],
|
||||||
|
],
|
||||||
};
|
};
|
||||||
expect(output).toEqual(expected);
|
expect(output).toEqual(expected);
|
||||||
expect(deserializeObject(output)).toEqual(map);
|
expect(deserializeObject(output)).toEqual(map);
|
||||||
@@ -92,7 +98,10 @@ test('test makeObjectSerializable and deserializeObject function for Map and Set
|
|||||||
const output = await makeObjectSerializable(map);
|
const output = await makeObjectSerializable(map);
|
||||||
const expected = {
|
const expected = {
|
||||||
__flipper_object_type__: 'Map',
|
__flipper_object_type__: 'Map',
|
||||||
data: [[{title: 'k1'}, {title: 'v1'}], [{title: 'k2'}, {title: 'v2'}]],
|
data: [
|
||||||
|
[{title: 'k1'}, {title: 'v1'}],
|
||||||
|
[{title: 'k2'}, {title: 'v2'}],
|
||||||
|
],
|
||||||
};
|
};
|
||||||
expect(output).toEqual(expected);
|
expect(output).toEqual(expected);
|
||||||
expect(deserializeObject(output)).toEqual(map);
|
expect(deserializeObject(output)).toEqual(map);
|
||||||
@@ -134,14 +143,20 @@ test('test makeObjectSerializable and deserializeObject function for custom Obje
|
|||||||
|
|
||||||
const nestedObjWithMap = new TestObject(
|
const nestedObjWithMap = new TestObject(
|
||||||
{title: 'nestedTitle'},
|
{title: 'nestedTitle'},
|
||||||
new Map([['k1', 'v1'], ['k2', 'v2']]),
|
new Map([
|
||||||
|
['k1', 'v1'],
|
||||||
|
['k2', 'v2'],
|
||||||
|
]),
|
||||||
);
|
);
|
||||||
const nestedObjWithMapOutput = await makeObjectSerializable(nestedObjWithMap);
|
const nestedObjWithMapOutput = await makeObjectSerializable(nestedObjWithMap);
|
||||||
const expectedNestedObjWithMapOutput = {
|
const expectedNestedObjWithMapOutput = {
|
||||||
title: {title: 'nestedTitle'},
|
title: {title: 'nestedTitle'},
|
||||||
map: {
|
map: {
|
||||||
__flipper_object_type__: 'Map',
|
__flipper_object_type__: 'Map',
|
||||||
data: [['k1', 'v1'], ['k2', 'v2']],
|
data: [
|
||||||
|
['k1', 'v1'],
|
||||||
|
['k2', 'v2'],
|
||||||
|
],
|
||||||
},
|
},
|
||||||
set: undefined,
|
set: undefined,
|
||||||
};
|
};
|
||||||
@@ -150,7 +165,10 @@ test('test makeObjectSerializable and deserializeObject function for custom Obje
|
|||||||
|
|
||||||
const nestedObjWithMapSet = new TestObject(
|
const nestedObjWithMapSet = new TestObject(
|
||||||
{title: 'nestedTitle'},
|
{title: 'nestedTitle'},
|
||||||
new Map([['k1', 'v1'], ['k2', 'v2']]),
|
new Map([
|
||||||
|
['k1', 'v1'],
|
||||||
|
['k2', 'v2'],
|
||||||
|
]),
|
||||||
new Set([
|
new Set([
|
||||||
{title: '1'},
|
{title: '1'},
|
||||||
{title: '2'},
|
{title: '2'},
|
||||||
@@ -167,7 +185,10 @@ test('test makeObjectSerializable and deserializeObject function for custom Obje
|
|||||||
title: {title: 'nestedTitle'},
|
title: {title: 'nestedTitle'},
|
||||||
map: {
|
map: {
|
||||||
__flipper_object_type__: 'Map',
|
__flipper_object_type__: 'Map',
|
||||||
data: [['k1', 'v1'], ['k2', 'v2']],
|
data: [
|
||||||
|
['k1', 'v1'],
|
||||||
|
['k2', 'v2'],
|
||||||
|
],
|
||||||
},
|
},
|
||||||
set: {
|
set: {
|
||||||
__flipper_object_type__: 'Set',
|
__flipper_object_type__: 'Set',
|
||||||
@@ -194,28 +215,52 @@ test('test makeObjectSerializable and deserializeObject function for Array as in
|
|||||||
expect(deserializeObject(output)).toEqual(arr);
|
expect(deserializeObject(output)).toEqual(arr);
|
||||||
|
|
||||||
const arrMap = [
|
const arrMap = [
|
||||||
new Map([['a1', 'v1'], ['a2', 'v2']]),
|
new Map([
|
||||||
new Map([['b1', 'v1'], ['b2', 'v2']]),
|
['a1', 'v1'],
|
||||||
new Map([['c1', 'v1'], ['c2', 'v2']]),
|
['a2', 'v2'],
|
||||||
new Map([['d1', 'v1'], ['d2', 'v2']]),
|
]),
|
||||||
|
new Map([
|
||||||
|
['b1', 'v1'],
|
||||||
|
['b2', 'v2'],
|
||||||
|
]),
|
||||||
|
new Map([
|
||||||
|
['c1', 'v1'],
|
||||||
|
['c2', 'v2'],
|
||||||
|
]),
|
||||||
|
new Map([
|
||||||
|
['d1', 'v1'],
|
||||||
|
['d2', 'v2'],
|
||||||
|
]),
|
||||||
];
|
];
|
||||||
|
|
||||||
const expectedArr = [
|
const expectedArr = [
|
||||||
{
|
{
|
||||||
__flipper_object_type__: 'Map',
|
__flipper_object_type__: 'Map',
|
||||||
data: [['a1', 'v1'], ['a2', 'v2']],
|
data: [
|
||||||
|
['a1', 'v1'],
|
||||||
|
['a2', 'v2'],
|
||||||
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
__flipper_object_type__: 'Map',
|
__flipper_object_type__: 'Map',
|
||||||
data: [['b1', 'v1'], ['b2', 'v2']],
|
data: [
|
||||||
|
['b1', 'v1'],
|
||||||
|
['b2', 'v2'],
|
||||||
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
__flipper_object_type__: 'Map',
|
__flipper_object_type__: 'Map',
|
||||||
data: [['c1', 'v1'], ['c2', 'v2']],
|
data: [
|
||||||
|
['c1', 'v1'],
|
||||||
|
['c2', 'v2'],
|
||||||
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
__flipper_object_type__: 'Map',
|
__flipper_object_type__: 'Map',
|
||||||
data: [['d1', 'v1'], ['d2', 'v2']],
|
data: [
|
||||||
|
['d1', 'v1'],
|
||||||
|
['d2', 'v2'],
|
||||||
|
],
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
const outputMap = await makeObjectSerializable(arrMap);
|
const outputMap = await makeObjectSerializable(arrMap);
|
||||||
@@ -269,7 +314,10 @@ test('test makeObjectSerializable and deserializeObject function for Map of Sets
|
|||||||
test('test makeObjectSerializable and deserializeObject function for Map, Dates and Set with complex nesting', async () => {
|
test('test makeObjectSerializable and deserializeObject function for Map, Dates and Set with complex nesting', async () => {
|
||||||
const date1 = new Date('2019-02-15');
|
const date1 = new Date('2019-02-15');
|
||||||
const date2 = new Date('2019-02-16');
|
const date2 = new Date('2019-02-16');
|
||||||
const map = new Map([['k1', date1], ['k2', new Set([date2])]]);
|
const map = new Map([
|
||||||
|
['k1', date1],
|
||||||
|
['k2', new Set([date2])],
|
||||||
|
]);
|
||||||
const expectedOutput = {
|
const expectedOutput = {
|
||||||
__flipper_object_type__: 'Map',
|
__flipper_object_type__: 'Map',
|
||||||
data: [
|
data: [
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ export function _push(
|
|||||||
deviceId,
|
deviceId,
|
||||||
app,
|
app,
|
||||||
`echo "${contents}" > '${filename}' && chmod 644 '${filename}'`,
|
`echo "${contents}" > '${filename}' && chmod 644 '${filename}'`,
|
||||||
).then(output => undefined);
|
).then(_ => undefined);
|
||||||
}
|
}
|
||||||
|
|
||||||
export function _pull(
|
export function _pull(
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ declare global {
|
|||||||
|
|
||||||
__REDUX_DEVTOOLS_EXTENSION__:
|
__REDUX_DEVTOOLS_EXTENSION__:
|
||||||
| undefined
|
| undefined
|
||||||
| StoreEnhancerStoreCreator & StoreEnhancerStateSanitizer;
|
| (StoreEnhancerStoreCreator & StoreEnhancerStateSanitizer);
|
||||||
|
|
||||||
Flipper: {
|
Flipper: {
|
||||||
init: () => void;
|
init: () => void;
|
||||||
|
|||||||
Reference in New Issue
Block a user