flipper-frontend-core 0.212.0 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of flipper-frontend-core might be problematic. Click here for more details.

Files changed (67) hide show
  1. package/index.js +47 -0
  2. package/package.json +7 -33
  3. package/README.md +0 -3
  4. package/lib/AbstractClient.d.ts +0 -75
  5. package/lib/AbstractClient.d.ts.map +0 -1
  6. package/lib/AbstractClient.js +0 -376
  7. package/lib/AbstractClient.js.map +0 -1
  8. package/lib/RenderHost.d.ts +0 -138
  9. package/lib/RenderHost.d.ts.map +0 -1
  10. package/lib/RenderHost.js +0 -19
  11. package/lib/RenderHost.js.map +0 -1
  12. package/lib/devices/ArchivedDevice.d.ts +0 -35
  13. package/lib/devices/ArchivedDevice.d.ts.map +0 -1
  14. package/lib/devices/ArchivedDevice.js +0 -65
  15. package/lib/devices/ArchivedDevice.js.map +0 -1
  16. package/lib/devices/BaseDevice.d.ts +0 -79
  17. package/lib/devices/BaseDevice.d.ts.map +0 -1
  18. package/lib/devices/BaseDevice.js +0 -267
  19. package/lib/devices/BaseDevice.js.map +0 -1
  20. package/lib/devices/TestDevice.d.ts +0 -16
  21. package/lib/devices/TestDevice.d.ts.map +0 -1
  22. package/lib/devices/TestDevice.js +0 -36
  23. package/lib/devices/TestDevice.js.map +0 -1
  24. package/lib/fb-stubs/constants.d.ts +0 -13
  25. package/lib/fb-stubs/constants.d.ts.map +0 -1
  26. package/lib/fb-stubs/constants.js +0 -14
  27. package/lib/fb-stubs/constants.js.map +0 -1
  28. package/lib/flipperLibImplementation/downloadFile.d.ts +0 -12
  29. package/lib/flipperLibImplementation/downloadFile.d.ts.map +0 -1
  30. package/lib/flipperLibImplementation/downloadFile.js +0 -49
  31. package/lib/flipperLibImplementation/downloadFile.js.map +0 -1
  32. package/lib/flipperLibImplementation/index.d.ts +0 -15
  33. package/lib/flipperLibImplementation/index.d.ts.map +0 -1
  34. package/lib/flipperLibImplementation/index.js +0 -72
  35. package/lib/flipperLibImplementation/index.js.map +0 -1
  36. package/lib/globalObject.d.ts +0 -24
  37. package/lib/globalObject.d.ts.map +0 -1
  38. package/lib/globalObject.js +0 -18
  39. package/lib/globalObject.js.map +0 -1
  40. package/lib/index.d.ts +0 -19
  41. package/lib/index.d.ts.map +0 -1
  42. package/lib/index.js +0 -46
  43. package/lib/index.js.map +0 -1
  44. package/lib/plugins.d.ts +0 -39
  45. package/lib/plugins.d.ts.map +0 -1
  46. package/lib/plugins.js +0 -189
  47. package/lib/plugins.js.map +0 -1
  48. package/lib/utils/createServerAddOnControls.d.ts +0 -11
  49. package/lib/utils/createServerAddOnControls.d.ts.map +0 -1
  50. package/lib/utils/createServerAddOnControls.js +0 -69
  51. package/lib/utils/createServerAddOnControls.js.map +0 -1
  52. package/lib/utils/isPluginCompatible.d.ts +0 -12
  53. package/lib/utils/isPluginCompatible.d.ts.map +0 -1
  54. package/lib/utils/isPluginCompatible.js +0 -26
  55. package/lib/utils/isPluginCompatible.js.map +0 -1
  56. package/lib/utils/isPluginVersionMoreRecent.d.ts +0 -12
  57. package/lib/utils/isPluginVersionMoreRecent.d.ts.map +0 -1
  58. package/lib/utils/isPluginVersionMoreRecent.js +0 -39
  59. package/lib/utils/isPluginVersionMoreRecent.js.map +0 -1
  60. package/lib/utils/isProduction.d.ts +0 -10
  61. package/lib/utils/isProduction.d.ts.map +0 -1
  62. package/lib/utils/isProduction.js +0 -16
  63. package/lib/utils/isProduction.js.map +0 -1
  64. package/lib/utils/pluginKey.d.ts +0 -13
  65. package/lib/utils/pluginKey.d.ts.map +0 -1
  66. package/lib/utils/pluginKey.js +0 -27
  67. package/lib/utils/pluginKey.js.map +0 -1
@@ -1,138 +0,0 @@
1
- /**
2
- * Copyright (c) Meta Platforms, Inc. and affiliates.
3
- *
4
- * This source code is licensed under the MIT license found in the
5
- * LICENSE file in the root directory of this source tree.
6
- *
7
- * @format
8
- */
9
- import { FlipperLib, Notification } from 'flipper-plugin-core';
10
- import { FlipperServer, FlipperServerConfig } from 'flipper-common';
11
- type NotificationEvents = 'show' | 'click' | 'close' | 'reply' | 'action';
12
- type PluginNotification = {
13
- notification: Notification;
14
- pluginId: string;
15
- client: null | string;
16
- };
17
- type Icon = {
18
- name: string;
19
- variant: 'outline' | 'filled';
20
- size: number;
21
- density: number;
22
- };
23
- interface NotificationAction {
24
- /**
25
- * The label for the given action.
26
- */
27
- text?: string;
28
- /**
29
- * The type of action, can be `button`.
30
- */
31
- type: 'button';
32
- }
33
- interface NotificationConstructorOptions {
34
- /**
35
- * A title for the notification, which will be shown at the top of the notification
36
- * window when it is shown.
37
- */
38
- title: string;
39
- /**
40
- * The body text of the notification, which will be displayed below the title or
41
- * subtitle.
42
- */
43
- body: string;
44
- /**
45
- * Actions to add to the notification. Please read the available actions and
46
- * limitations in the `NotificationAction` documentation.
47
- *
48
- * @platform darwin
49
- */
50
- actions?: NotificationAction[];
51
- /**
52
- * A custom title for the close button of an alert. An empty string will cause the
53
- * default localized text to be used.
54
- *
55
- * @platform darwin
56
- */
57
- closeButtonText?: string;
58
- }
59
- type MainProcessEvents = {
60
- 'flipper-protocol-handler': [query: string];
61
- 'open-flipper-file': [name: string, data: string];
62
- notificationEvent: [
63
- eventName: NotificationEvents,
64
- pluginNotification: PluginNotification,
65
- arg: null | string | number
66
- ];
67
- trackUsage: any[];
68
- getLaunchTime: [launchStartTime: number];
69
- };
70
- type ChildProcessEvents = {
71
- setTheme: [theme: 'dark' | 'light' | 'system'];
72
- sendNotification: [
73
- {
74
- payload: NotificationConstructorOptions;
75
- pluginNotification: PluginNotification;
76
- closeAfter?: number;
77
- }
78
- ];
79
- getLaunchTime: [];
80
- storeRehydrated: [];
81
- };
82
- /**
83
- * Utilities provided by the render host, e.g. Electron, the Browser, etc
84
- */
85
- export interface RenderHost {
86
- readTextFromClipboard(): Promise<string> | undefined;
87
- writeTextToClipboard(text: string): void;
88
- /**
89
- * @deprecated
90
- * WARNING!
91
- * It is a low-level API call that might be removed in the future.
92
- * It is not really deprecated yet, but we'll try to make it so.
93
- * TODO: Remove in favor of "exportFile"
94
- */
95
- showSaveDialog?(options: {
96
- defaultPath?: string;
97
- message?: string;
98
- title?: string;
99
- }): Promise<string | undefined>;
100
- /**
101
- * @deprecated
102
- * WARNING!
103
- * It is a low-level API call that might be removed in the future.
104
- * It is not really deprecated yet, but we'll try to make it so.
105
- * TODO: Remove in favor of "importFile"
106
- */
107
- showOpenDialog?(options: {
108
- defaultPath?: string;
109
- filter?: {
110
- extensions: string[];
111
- name: string;
112
- };
113
- }): Promise<string | undefined>;
114
- showSelectDirectoryDialog?(defaultPath?: string): Promise<string | undefined>;
115
- importFile: FlipperLib['importFile'];
116
- exportFile: FlipperLib['exportFile'];
117
- exportFileBinary: FlipperLib['exportFileBinary'];
118
- hasFocus(): boolean;
119
- onIpcEvent<Event extends keyof MainProcessEvents>(event: Event, callback: (...arg: MainProcessEvents[Event]) => void): void;
120
- sendIpcEvent<Event extends keyof ChildProcessEvents>(event: Event, ...args: ChildProcessEvents[Event]): void;
121
- shouldUseDarkColors(): boolean;
122
- restartFlipper(update?: boolean): void;
123
- openLink(url: string): void;
124
- GK(gatekeeper: string): boolean;
125
- flipperServer: FlipperServer;
126
- serverConfig: FlipperServerConfig;
127
- requirePlugin(path: string): Promise<{
128
- plugin: any;
129
- css?: string;
130
- }>;
131
- getStaticResourceUrl(relativePath: string): string;
132
- getLocalIconUrl?(icon: Icon, publicUrl: string): string;
133
- unloadModule?(path: string): void;
134
- getPercentCPUUsage?(): number;
135
- }
136
- export declare function getRenderHostInstance(): RenderHost;
137
- export {};
138
- //# sourceMappingURL=RenderHost.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"RenderHost.d.ts","sourceRoot":"","sources":["../src/RenderHost.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAC,UAAU,EAAE,YAAY,EAAC,MAAM,qBAAqB,CAAC;AAC7D,OAAO,EAAC,aAAa,EAAE,mBAAmB,EAAC,MAAM,gBAAgB,CAAC;AAElE,KAA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AE,iBAAiB,CAAC,KAAK,CAAC,KAAK,IAAI,GACnD,IAAI,CAAC;IACR,YAAY,CAAC,KAAK,SAAS,MAAM,kBAAkB,EACjD,KAAK,EAAE,KAAK,EACZ,GAAG,IAAI,EAAE,kBAAkB,CAAC,KAAK,CAAC,GACjC,IAAI,CAAC;IACR,mBAAmB,IAAI,OAAO,CAAC;IAC/B,cAAc,CAAC,MAAM,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;IACvC,QAAQ,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,EAAE,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC;IAChC,aAAa,EAAE,aAAa,CAAC;IAC7B,YAAY,EAAE,mBAAmB,CAAC;IAClC,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC;QAAC,MAAM,EAAE,GAAG,CAAC;QAAC,GAAG,CAAC,EAAE,MAAM,CAAA;KAAC,CAAC,CAAC;IAClE,oBAAoB,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,CAAC;IAEnD,eAAe,CAAC,CAAC,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CAAC;IACxD,YAAY,CAAC,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,kBAAkB,CAAC,IAAI,MAAM,CAAC;CAC/B;AAED,wBAAgB,qBAAqB,IAAI,UAAU,CAKlD"}
package/lib/RenderHost.js DELETED
@@ -1,19 +0,0 @@
1
- "use strict";
2
- /**
3
- * Copyright (c) Meta Platforms, Inc. and affiliates.
4
- *
5
- * This source code is licensed under the MIT license found in the
6
- * LICENSE file in the root directory of this source tree.
7
- *
8
- * @format
9
- */
10
- Object.defineProperty(exports, "__esModule", { value: true });
11
- exports.getRenderHostInstance = void 0;
12
- function getRenderHostInstance() {
13
- if (!FlipperRenderHostInstance) {
14
- throw new Error('global FlipperRenderHostInstance was never set');
15
- }
16
- return FlipperRenderHostInstance;
17
- }
18
- exports.getRenderHostInstance = getRenderHostInstance;
19
- //# sourceMappingURL=RenderHost.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"RenderHost.js","sourceRoot":"","sources":["../src/RenderHost.tsx"],"names":[],"mappings":";AAAA;;;;;;;GAOG;;;AAiJH,SAAgB,qBAAqB;IACnC,IAAI,CAAC,yBAAyB,EAAE;QAC9B,MAAM,IAAI,KAAK,CAAC,gDAAgD,CAAC,CAAC;KACnE;IACD,OAAO,yBAAyB,CAAC;AACnC,CAAC;AALD,sDAKC"}
@@ -1,35 +0,0 @@
1
- /**
2
- * Copyright (c) Meta Platforms, Inc. and affiliates.
3
- *
4
- * This source code is licensed under the MIT license found in the
5
- * LICENSE file in the root directory of this source tree.
6
- *
7
- * @format
8
- */
9
- import BaseDevice from './BaseDevice';
10
- import type { DeviceOS, DeviceType } from 'flipper-plugin-core';
11
- export default class ArchivedDevice extends BaseDevice {
12
- isArchived: boolean;
13
- constructor(options: {
14
- serial: string;
15
- deviceType: DeviceType;
16
- title: string;
17
- os: DeviceOS;
18
- screenshotHandle?: string | null;
19
- source?: string;
20
- supportRequestDetails?: object;
21
- });
22
- archivedScreenshotHandle: string | null;
23
- displayTitle(): string;
24
- supportRequestDetails?: object;
25
- getArchivedScreenshotHandle(): string | null;
26
- /**
27
- * @override
28
- */
29
- startLogging(): Promise<void>;
30
- /**
31
- * @override
32
- */
33
- stopLogging(): Promise<void>;
34
- }
35
- //# sourceMappingURL=ArchivedDevice.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ArchivedDevice.d.ts","sourceRoot":"","sources":["../../src/devices/ArchivedDevice.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,UAAU,MAAM,cAAc,CAAC;AACtC,OAAO,KAAK,EAAC,QAAQ,EAAE,UAAU,EAAC,MAAM,qBAAqB,CAAC;AAE9D,MAAM,CAAC,OAAO,OAAO,cAAe,SAAQ,UAAU;IACpD,UAAU,UAAQ;gBAEN,OAAO,EAAE;QACnB,MAAM,EAAE,MAAM,CAAC;QACf,UAAU,EAAE,UAAU,CAAC;QACvB,KAAK,EAAE,MAAM,CAAC;QACd,EAAE,EAAE,QAAQ,CAAC;QACb,gBAAgB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QACjC,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,qBAAqB,CAAC,EAAE,MAAM,CAAC;KAChC;IAmCD,wBAAwB,EAAE,MAAM,GAAG,IAAI,CAAC;IAExC,YAAY,IAAI,MAAM;IAItB,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAE/B,2BAA2B,IAAI,MAAM,GAAG,IAAI;IAI5C;;OAEG;IACG,YAAY;IAIlB;;OAEG;IACG,WAAW;CAGlB"}
@@ -1,65 +0,0 @@
1
- "use strict";
2
- /**
3
- * Copyright (c) Meta Platforms, Inc. and affiliates.
4
- *
5
- * This source code is licensed under the MIT license found in the
6
- * LICENSE file in the root directory of this source tree.
7
- *
8
- * @format
9
- */
10
- var __importDefault = (this && this.__importDefault) || function (mod) {
11
- return (mod && mod.__esModule) ? mod : { "default": mod };
12
- };
13
- Object.defineProperty(exports, "__esModule", { value: true });
14
- const BaseDevice_1 = __importDefault(require("./BaseDevice"));
15
- class ArchivedDevice extends BaseDevice_1.default {
16
- constructor(options) {
17
- var _a;
18
- super({
19
- async connect() { },
20
- close() { },
21
- exec(command, ..._args) {
22
- throw new Error(`[Archived device] Cannot invoke command ${command} on an archived device`);
23
- },
24
- on(event) {
25
- console.warn(`Cannot subscribe to server events from an Archived device: ${event}`);
26
- },
27
- off() { },
28
- }, {
29
- deviceType: options.deviceType,
30
- title: options.title,
31
- os: options.os,
32
- serial: options.serial,
33
- icon: 'box',
34
- features: {
35
- screenCaptureAvailable: false,
36
- screenshotAvailable: false,
37
- },
38
- });
39
- this.isArchived = true;
40
- this.connected.set(false);
41
- this.source = options.source || '';
42
- this.supportRequestDetails = options.supportRequestDetails;
43
- this.archivedScreenshotHandle = (_a = options.screenshotHandle) !== null && _a !== void 0 ? _a : null;
44
- }
45
- displayTitle() {
46
- return `${this.title} ${this.source ? '(Imported)' : '(Offline)'}`;
47
- }
48
- getArchivedScreenshotHandle() {
49
- return this.archivedScreenshotHandle;
50
- }
51
- /**
52
- * @override
53
- */
54
- async startLogging() {
55
- // No-op
56
- }
57
- /**
58
- * @override
59
- */
60
- async stopLogging() {
61
- // No-op
62
- }
63
- }
64
- exports.default = ArchivedDevice;
65
- //# sourceMappingURL=ArchivedDevice.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ArchivedDevice.js","sourceRoot":"","sources":["../../src/devices/ArchivedDevice.tsx"],"names":[],"mappings":";AAAA;;;;;;;GAOG;;;;;AAEH,8DAAsC;AAGtC,MAAqB,cAAe,SAAQ,oBAAU;IAGpD,YAAY,OAQX;;QACC,KAAK,CACH;YACE,KAAK,CAAC,OAAO,KAAI,CAAC;YAClB,KAAK,KAAI,CAAC;YACV,IAAI,CAAC,OAAO,EAAE,GAAG,KAAY;gBAC3B,MAAM,IAAI,KAAK,CACb,2CAA2C,OAAO,wBAAwB,CAC3E,CAAC;YACJ,CAAC;YACD,EAAE,CAAC,KAAK;gBACN,OAAO,CAAC,IAAI,CACV,8DAA8D,KAAK,EAAE,CACtE,CAAC;YACJ,CAAC;YACD,GAAG,KAAI,CAAC;SACT,EACD;YACE,UAAU,EAAE,OAAO,CAAC,UAAU;YAC9B,KAAK,EAAE,OAAO,CAAC,KAAK;YACpB,EAAE,EAAE,OAAO,CAAC,EAAE;YACd,MAAM,EAAE,OAAO,CAAC,MAAM;YACtB,IAAI,EAAE,KAAK;YACX,QAAQ,EAAE;gBACR,sBAAsB,EAAE,KAAK;gBAC7B,mBAAmB,EAAE,KAAK;aAC3B;SACF,CACF,CAAC;QAtCJ,eAAU,GAAG,IAAI,CAAC;QAuChB,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;QAC1B,IAAI,CAAC,MAAM,GAAG,OAAO,CAAC,MAAM,IAAI,EAAE,CAAC;QACnC,IAAI,CAAC,qBAAqB,GAAG,OAAO,CAAC,qBAAqB,CAAC;QAC3D,IAAI,CAAC,wBAAwB,GAAG,MAAA,OAAO,CAAC,gBAAgB,mCAAI,IAAI,CAAC;IACnE,CAAC;IAID,YAAY;QACV,OAAO,GAAG,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC;IACrE,CAAC;IAID,2BAA2B;QACzB,OAAO,IAAI,CAAC,wBAAwB,CAAC;IACvC,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,YAAY;QAChB,QAAQ;IACV,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,WAAW;QACf,QAAQ;IACV,CAAC;CACF;AAvED,iCAuEC"}
@@ -1,79 +0,0 @@
1
- /**
2
- * Copyright (c) Meta Platforms, Inc. and affiliates.
3
- *
4
- * This source code is licensed under the MIT license found in the
5
- * LICENSE file in the root directory of this source tree.
6
- *
7
- * @format
8
- */
9
- import { Device, _SandyDevicePluginInstance, _SandyPluginDefinition, DeviceLogListener, Idler, CrashLogListener } from 'flipper-plugin-core';
10
- import { DeviceLogEntry, DeviceOS, DeviceType, DeviceDescription, FlipperServer, CrashLog } from 'flipper-common';
11
- import { DeviceSpec, PluginDetails } from 'flipper-common';
12
- type PluginDefinition = _SandyPluginDefinition;
13
- type PluginMap = Map<string, PluginDefinition>;
14
- export type DeviceExport = {
15
- os: DeviceOS;
16
- title: string;
17
- deviceType: DeviceType;
18
- serial: string;
19
- pluginStates: Record<string, any>;
20
- };
21
- export default class BaseDevice implements Device {
22
- private pluginErrorHandler?;
23
- description: DeviceDescription;
24
- flipperServer: FlipperServer;
25
- isArchived: boolean;
26
- hasDevicePlugins: boolean;
27
- private readonly serverAddOnControls;
28
- constructor(flipperServer: FlipperServer, description: DeviceDescription, pluginErrorHandler?: ((msg: string) => void) | undefined);
29
- get isConnected(): boolean;
30
- get os(): import("flipper-common").OS;
31
- get title(): string;
32
- get deviceType(): DeviceType;
33
- get serial(): string;
34
- get specs(): DeviceSpec[];
35
- get icon(): string | undefined;
36
- logListeners: Map<Symbol, DeviceLogListener>;
37
- crashListeners: Map<Symbol, CrashLogListener>;
38
- readonly connected: import("flipper-plugin-core").Atom<boolean>;
39
- source: string;
40
- sandyPluginStates: Map<string, _SandyDevicePluginInstance>;
41
- supportsOS(os: DeviceOS): boolean;
42
- displayTitle(): string;
43
- exportState(idler: Idler, onStatusMessage: (msg: string) => void, selectedPlugins: string[]): Promise<Record<string, any>>;
44
- toJSON(): {
45
- os: import("flipper-common").OS;
46
- title: string;
47
- deviceType: DeviceType;
48
- serial: string;
49
- };
50
- private deviceLogEventHandler;
51
- addLogEntry(entry: DeviceLogEntry): void;
52
- startLogging(): Promise<void>;
53
- stopLogging(): void;
54
- addLogListener(callback: DeviceLogListener): Symbol;
55
- removeLogListener(id: Symbol): void;
56
- private crashLogEventHandler;
57
- addCrashEntry(entry: CrashLog): void;
58
- startCrashWatcher(): Promise<void>;
59
- stopCrashWatcher(): void;
60
- addCrashListener(callback: CrashLogListener): Symbol;
61
- removeCrashListener(id: Symbol): void;
62
- navigateToLocation(location: string): Promise<void>;
63
- installApp(appBundlePath: string, timeout?: number): Promise<void>;
64
- screenshot(): Promise<Uint8Array | undefined>;
65
- startScreenCapture(destination: string): Promise<void>;
66
- stopScreenCapture(): Promise<string | null>;
67
- executeShell(command: string): Promise<string>;
68
- sendMetroCommand(command: string): Promise<void>;
69
- forwardPort(local: string, remote: string): Promise<boolean>;
70
- clearLogs(): Promise<void>;
71
- supportsPlugin(plugin: PluginDefinition | PluginDetails): any;
72
- loadDevicePlugins(devicePlugins: PluginMap, enabledDevicePlugins: Set<string>, pluginStates?: Record<string, any>): void;
73
- loadDevicePlugin(plugin: PluginDefinition, initialState?: any): void;
74
- unloadDevicePlugin(pluginId: string): void;
75
- disconnect(): void;
76
- destroy(): void;
77
- }
78
- export {};
79
- //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AC,IAAI,CAAC;IAQtD,iBAAiB,IAAI,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;IAI3C,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAI9C,gBAAgB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAIhD,WAAW,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAS5D,SAAS;IAIf,cAAc,CAAC,MAAM,EAAE,gBAAgB,GAAG,aAAa;IAiCvD,iBAAiB,CACf,aAAa,EAAE,SAAS,EACxB,oBAAoB,EAAE,GAAG,CAAC,MAAM,CAAC,EACjC,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;IAapC,gBAAgB,CAAC,MAAM,EAAE,gBAAgB,EAAE,YAAY,CAAC,EAAE,GAAG;IA0B7D,kBAAkB,CAAC,QAAQ,EAAE,MAAM;IAQnC,UAAU;IAQV,OAAO;CAQR"}
@@ -1,267 +0,0 @@
1
- "use strict";
2
- /**
3
- * Copyright (c) Meta Platforms, Inc. and affiliates.
4
- *
5
- * This source code is licensed under the MIT license found in the
6
- * LICENSE file in the root directory of this source tree.
7
- *
8
- * @format
9
- */
10
- Object.defineProperty(exports, "__esModule", { value: true });
11
- const flipper_plugin_core_1 = require("flipper-plugin-core");
12
- const pluginKey_1 = require("../utils/pluginKey");
13
- const js_base64_1 = require("js-base64");
14
- const createServerAddOnControls_1 = require("../utils/createServerAddOnControls");
15
- class BaseDevice {
16
- constructor(flipperServer, description, pluginErrorHandler) {
17
- this.pluginErrorHandler = pluginErrorHandler;
18
- this.isArchived = false;
19
- this.hasDevicePlugins = false; // true if there are device plugins for this device (not necessarily enabled)
20
- this.logListeners = new Map();
21
- this.crashListeners = new Map();
22
- this.connected = (0, flipper_plugin_core_1.createState)(true);
23
- // if imported, stores the original source location
24
- this.source = '';
25
- // TODO: ideally we don't want BasePlugin to know about the concept of plugins
26
- this.sandyPluginStates = new Map();
27
- this.deviceLogEventHandler = (payload) => {
28
- if (payload.serial === this.serial && this.logListeners.size > 0) {
29
- this.addLogEntry(payload.entry);
30
- }
31
- };
32
- this.crashLogEventHandler = (payload) => {
33
- if (payload.serial === this.serial && this.crashListeners.size > 0) {
34
- this.addCrashEntry(payload.crash);
35
- }
36
- };
37
- this.flipperServer = flipperServer;
38
- this.description = description;
39
- this.serverAddOnControls = (0, createServerAddOnControls_1.createServerAddOnControls)(this.flipperServer);
40
- }
41
- get isConnected() {
42
- return this.connected.get();
43
- }
44
- // operating system of this device
45
- get os() {
46
- return this.description.os;
47
- }
48
- // human readable name for this device
49
- get title() {
50
- return this.description.title;
51
- }
52
- // type of this device
53
- get deviceType() {
54
- return this.description.deviceType;
55
- }
56
- // serial number for this device
57
- get serial() {
58
- return this.description.serial;
59
- }
60
- // additional device specs used for plugin compatibility checks
61
- get specs() {
62
- var _a;
63
- return (_a = this.description.specs) !== null && _a !== void 0 ? _a : [];
64
- }
65
- // possible src of icon to display next to the device title
66
- get icon() {
67
- return this.description.icon;
68
- }
69
- supportsOS(os) {
70
- return os.toLowerCase() === this.os.toLowerCase();
71
- }
72
- displayTitle() {
73
- return this.connected.get() ? this.title : `${this.title} (Offline)`;
74
- }
75
- async exportState(idler, onStatusMessage, selectedPlugins) {
76
- const pluginStates = {};
77
- for (const instance of this.sandyPluginStates.values()) {
78
- if (selectedPlugins.includes(instance.definition.id) &&
79
- instance.isPersistable()) {
80
- pluginStates[instance.definition.id] = await instance.exportState(idler, onStatusMessage);
81
- }
82
- }
83
- return pluginStates;
84
- }
85
- toJSON() {
86
- return {
87
- os: this.os,
88
- title: this.title,
89
- deviceType: this.deviceType,
90
- serial: this.serial,
91
- };
92
- }
93
- addLogEntry(entry) {
94
- this.logListeners.forEach((listener) => {
95
- // prevent breaking other listeners, if one listener doesn't work.
96
- try {
97
- listener(entry);
98
- }
99
- catch (e) {
100
- console.error(`Log listener exception:`, e);
101
- }
102
- });
103
- }
104
- async startLogging() {
105
- this.flipperServer.on('device-log', this.deviceLogEventHandler);
106
- }
107
- stopLogging() {
108
- this.flipperServer.off('device-log', this.deviceLogEventHandler);
109
- }
110
- addLogListener(callback) {
111
- if (this.logListeners.size === 0) {
112
- this.startLogging();
113
- }
114
- const id = Symbol();
115
- this.logListeners.set(id, callback);
116
- return id;
117
- }
118
- removeLogListener(id) {
119
- this.logListeners.delete(id);
120
- if (this.logListeners.size === 0) {
121
- this.stopLogging();
122
- }
123
- }
124
- addCrashEntry(entry) {
125
- this.crashListeners.forEach((listener) => {
126
- // prevent breaking other listeners, if one listener doesn't work.
127
- try {
128
- listener(entry);
129
- }
130
- catch (e) {
131
- console.error(`Crash listener exception:`, e);
132
- }
133
- });
134
- }
135
- async startCrashWatcher() {
136
- this.flipperServer.on('device-crash', this.crashLogEventHandler);
137
- }
138
- stopCrashWatcher() {
139
- this.flipperServer.off('device-crash', this.crashLogEventHandler);
140
- }
141
- addCrashListener(callback) {
142
- if (this.crashListeners.size === 0) {
143
- this.startCrashWatcher();
144
- }
145
- const id = Symbol();
146
- this.crashListeners.set(id, callback);
147
- return id;
148
- }
149
- removeCrashListener(id) {
150
- this.crashListeners.delete(id);
151
- if (this.crashListeners.size === 0) {
152
- this.stopCrashWatcher();
153
- }
154
- }
155
- async navigateToLocation(location) {
156
- return this.flipperServer.exec('device-navigate', this.serial, location);
157
- }
158
- async installApp(appBundlePath, timeout) {
159
- return timeout
160
- ? this.flipperServer.exec({ timeout }, 'device-install-app', this.serial, appBundlePath)
161
- : this.flipperServer.exec('device-install-app', this.serial, appBundlePath);
162
- }
163
- async screenshot() {
164
- if (!this.description.features.screenshotAvailable || this.isArchived) {
165
- return;
166
- }
167
- return js_base64_1.Base64.toUint8Array(await this.flipperServer.exec('device-take-screenshot', this.serial));
168
- }
169
- async startScreenCapture(destination) {
170
- return this.flipperServer.exec('device-start-screencapture', this.serial, destination);
171
- }
172
- async stopScreenCapture() {
173
- return this.flipperServer.exec('device-stop-screencapture', this.serial);
174
- }
175
- async executeShell(command) {
176
- return this.flipperServer.exec('device-shell-exec', this.serial, command);
177
- }
178
- async sendMetroCommand(command) {
179
- return this.flipperServer.exec('metro-command', this.serial, command);
180
- }
181
- async forwardPort(local, remote) {
182
- return this.flipperServer.exec('device-forward-port', this.serial, local, remote);
183
- }
184
- async clearLogs() {
185
- return this.flipperServer.exec('device-clear-logs', this.serial);
186
- }
187
- supportsPlugin(plugin) {
188
- var _a, _b, _c, _d;
189
- let pluginDetails;
190
- if (plugin instanceof flipper_plugin_core_1._SandyPluginDefinition) {
191
- pluginDetails = plugin.details;
192
- if (!pluginDetails.pluginType && !pluginDetails.supportedDevices) {
193
- // TODO T84453692: this branch is to support plugins defined with the legacy approach. Need to remove this branch after some transition period when
194
- // all the plugins will be migrated to the new approach with static compatibility metadata in package.json.
195
- if (plugin instanceof flipper_plugin_core_1._SandyPluginDefinition) {
196
- return (plugin.isDevicePlugin &&
197
- ((_c = (_b = (_a = plugin.asDevicePluginModule()).supportsDevice) === null || _b === void 0 ? void 0 : _b.call(_a, this)) !== null && _c !== void 0 ? _c : false));
198
- }
199
- else {
200
- return plugin.supportsDevice(this);
201
- }
202
- }
203
- }
204
- else {
205
- pluginDetails = plugin;
206
- }
207
- return (pluginDetails.pluginType === 'device' &&
208
- (!pluginDetails.supportedDevices ||
209
- ((_d = pluginDetails.supportedDevices) === null || _d === void 0 ? void 0 : _d.some((d) => (!d.os || d.os === this.os) &&
210
- (!d.type || d.type === this.deviceType) &&
211
- (d.archived === undefined || d.archived === this.isArchived) &&
212
- (!d.specs || d.specs.every((spec) => this.specs.includes(spec)))))));
213
- }
214
- loadDevicePlugins(devicePlugins, enabledDevicePlugins, pluginStates) {
215
- if (!devicePlugins) {
216
- return;
217
- }
218
- const plugins = Array.from(devicePlugins.values()).filter((p) => enabledDevicePlugins === null || enabledDevicePlugins === void 0 ? void 0 : enabledDevicePlugins.has(p.id));
219
- for (const plugin of plugins) {
220
- this.loadDevicePlugin(plugin, pluginStates === null || pluginStates === void 0 ? void 0 : pluginStates[plugin.id]);
221
- }
222
- }
223
- loadDevicePlugin(plugin, initialState) {
224
- if (!this.supportsPlugin(plugin)) {
225
- return;
226
- }
227
- this.hasDevicePlugins = true;
228
- if (plugin instanceof flipper_plugin_core_1._SandyPluginDefinition) {
229
- try {
230
- const pluginInstance = new flipper_plugin_core_1._SandyDevicePluginInstance(this.serverAddOnControls, (0, flipper_plugin_core_1.getFlipperLib)(), plugin, this,
231
- // break circular dep, one of those days again...
232
- (0, pluginKey_1.getPluginKey)(undefined, { serial: this.serial }, plugin.id), initialState);
233
- if (this.pluginErrorHandler) {
234
- pluginInstance.events.on('error', this.pluginErrorHandler);
235
- }
236
- this.sandyPluginStates.set(plugin.id, pluginInstance);
237
- }
238
- catch (e) {
239
- console.error(`Failed to start device plugin '${plugin.id}': `, e);
240
- }
241
- }
242
- }
243
- unloadDevicePlugin(pluginId) {
244
- const instance = this.sandyPluginStates.get(pluginId);
245
- if (instance) {
246
- instance.destroy();
247
- this.sandyPluginStates.delete(pluginId);
248
- }
249
- }
250
- disconnect() {
251
- this.logListeners.clear();
252
- this.stopLogging();
253
- this.crashListeners.clear();
254
- this.stopCrashWatcher();
255
- this.connected.set(false);
256
- }
257
- destroy() {
258
- this.disconnect();
259
- this.sandyPluginStates.forEach((instance) => {
260
- instance.destroy();
261
- });
262
- this.sandyPluginStates.clear();
263
- this.serverAddOnControls.unsubscribe();
264
- }
265
- }
266
- exports.default = BaseDevice;
267
- //# sourceMappingURL=BaseDevice.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"BaseDevice.js","sourceRoot":"","sources":["../../src/devices/BaseDevice.tsx"],"names":[],"mappings":";AAAA;;;;;;;GAOG;;AAEH,6DAS6B;AAW7B,kDAAgD;AAChD,yCAAiC;AACjC,kFAA6E;AAa7E,MAAqB,UAAU;IAO7B,YACE,aAA4B,EAC5B,WAA8B,EACtB,kBAA0C;QAA1C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AG,CAAC,MAAM,CAAC,EAAE,EAAE,cAAc,CAAC,CAAC;aACvD;YAAC,OAAO,CAAC,EAAE;gBACV,OAAO,CAAC,KAAK,CAAC,kCAAkC,MAAM,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC;aACpE;SACF;IACH,CAAC;IAED,kBAAkB,CAAC,QAAgB;QACjC,MAAM,QAAQ,GAAG,IAAI,CAAC,iBAAiB,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;QACtD,IAAI,QAAQ,EAAE;YACZ,QAAQ,CAAC,OAAO,EAAE,CAAC;YACnB,IAAI,CAAC,iBAAiB,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;SACzC;IACH,CAAC;IAED,UAAU;QACR,IAAI,CAAC,YAAY,CAAC,KAAK,EAAE,CAAC;QAC1B,IAAI,CAAC,WAAW,EAAE,CAAC;QACnB,IAAI,CAAC,cAAc,CAAC,KAAK,EAAE,CAAC;QAC5B,IAAI,CAAC,gBAAgB,EAAE,CAAC;QACxB,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IAC5B,CAAC;IAED,OAAO;QACL,IAAI,CAAC,UAAU,EAAE,CAAC;QAClB,IAAI,CAAC,iBAAiB,CAAC,OAAO,CAAC,CAAC,QAAQ,EAAE,EAAE;YAC1C,QAAQ,CAAC,OAAO,EAAE,CAAC;QACrB,CAAC,CAAC,CAAC;QACH,IAAI,CAAC,iBAAiB,CAAC,KAAK,EAAE,CAAC;QAC/B,IAAI,CAAC,mBAAmB,CAAC,WAAW,EAAE,CAAC;IACzC,CAAC;CACF;AAjWD,6BAiWC"}
@@ -1,16 +0,0 @@
1
- /**
2
- * Copyright (c) Meta Platforms, Inc. and affiliates.
3
- *
4
- * This source code is licensed under the MIT license found in the
5
- * LICENSE file in the root directory of this source tree.
6
- *
7
- * @format
8
- */
9
- import type { DeviceOS, DeviceType } from 'flipper-plugin-core';
10
- import { DeviceSpec } from 'flipper-common';
11
- import BaseDevice from './BaseDevice';
12
- export declare class TestDevice extends BaseDevice {
13
- constructor(serial: string, deviceType: DeviceType, title: string, os: DeviceOS, specs?: DeviceSpec[]);
14
- startLogging(): Promise<void>;
15
- }
16
- //# sourceMappingURL=TestDevice.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TestDevice.d.ts","sourceRoot":"","sources":["../../src/devices/TestDevice.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAC,QAAQ,EAAE,UAAU,EAAC,MAAM,qBAAqB,CAAC;AAC9D,OAAO,EAAC,UAAU,EAAC,MAAM,gBAAgB,CAAC;AAC1C,OAAO,UAAU,MAAM,cAAc,CAAC;AAGtC,qBAAa,UAAW,SAAQ,UAAU;gBAEtC,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,UAAU,EACtB,KAAK,EAAE,MAAM,EACb,EAAE,EAAE,QAAQ,EACZ,KAAK,CAAC,EAAE,UAAU,EAAE;IAehB,YAAY;CAGnB"}