Remove plugin bundling
Summary: Remove the notion of bundled plugins Reviewed By: lblasa Differential Revision: D39308888 fbshipit-source-id: aa88ddbf2801ad1da95f89e4c761259b697b0d66
This commit is contained in:
committed by
Facebook GitHub Bot
parent
f835e07c46
commit
650ff4bcfb
@@ -37,7 +37,6 @@ test('add clientPlugin', () => {
|
||||
devicePlugins: new Map(),
|
||||
clientPlugins: new Map(),
|
||||
loadedPlugins: new Map(),
|
||||
bundledPlugins: new Map(),
|
||||
gatekeepedPlugins: [],
|
||||
failedPlugins: [],
|
||||
disabledPlugins: [],
|
||||
@@ -58,7 +57,6 @@ test('add devicePlugin', () => {
|
||||
devicePlugins: new Map(),
|
||||
clientPlugins: new Map(),
|
||||
loadedPlugins: new Map(),
|
||||
bundledPlugins: new Map(),
|
||||
gatekeepedPlugins: [],
|
||||
failedPlugins: [],
|
||||
disabledPlugins: [],
|
||||
@@ -79,7 +77,6 @@ test('do not add plugin twice', () => {
|
||||
devicePlugins: new Map(),
|
||||
clientPlugins: new Map(),
|
||||
loadedPlugins: new Map(),
|
||||
bundledPlugins: new Map(),
|
||||
gatekeepedPlugins: [],
|
||||
failedPlugins: [],
|
||||
disabledPlugins: [],
|
||||
@@ -103,7 +100,6 @@ test('add gatekeeped plugin', () => {
|
||||
specVersion: 2,
|
||||
pluginType: 'client',
|
||||
source: 'src/index.ts',
|
||||
isBundled: false,
|
||||
isActivatable: true,
|
||||
main: 'lib/index.js',
|
||||
title: 'test',
|
||||
@@ -116,7 +112,6 @@ test('add gatekeeped plugin', () => {
|
||||
devicePlugins: new Map(),
|
||||
clientPlugins: new Map(),
|
||||
loadedPlugins: new Map(),
|
||||
bundledPlugins: new Map(),
|
||||
gatekeepedPlugins: [],
|
||||
failedPlugins: [],
|
||||
disabledPlugins: [],
|
||||
@@ -143,7 +138,6 @@ const EXAMPLE_PLUGIN = {
|
||||
dir: '/plugins/test',
|
||||
specVersion: 2,
|
||||
source: 'src/index.ts',
|
||||
isBundled: false,
|
||||
isActivatable: true,
|
||||
main: 'lib/index.js',
|
||||
title: 'test',
|
||||
|
||||
@@ -15,7 +15,6 @@ import type {
|
||||
import type {
|
||||
DownloadablePluginDetails,
|
||||
ActivatablePluginDetails,
|
||||
BundledPluginDetails,
|
||||
InstalledPluginDetails,
|
||||
MarketplacePluginDetails,
|
||||
} from 'flipper-common';
|
||||
@@ -30,7 +29,6 @@ type StateV1 = {
|
||||
devicePlugins: DevicePluginMap;
|
||||
clientPlugins: ClientPluginMap;
|
||||
loadedPlugins: Map<string, ActivatablePluginDetails>;
|
||||
bundledPlugins: Map<string, BundledPluginDetails>;
|
||||
gatekeepedPlugins: Array<ActivatablePluginDetails>;
|
||||
disabledPlugins: Array<ActivatablePluginDetails>;
|
||||
failedPlugins: Array<[ActivatablePluginDetails, string]>;
|
||||
@@ -88,10 +86,6 @@ export type Action =
|
||||
type: 'REGISTER_LOADED_PLUGINS';
|
||||
payload: Array<ActivatablePluginDetails>;
|
||||
}
|
||||
| {
|
||||
type: 'REGISTER_BUNDLED_PLUGINS';
|
||||
payload: Array<BundledPluginDetails>;
|
||||
}
|
||||
| {
|
||||
type: 'REGISTER_INSTALLED_PLUGINS';
|
||||
payload: InstalledPluginDetails[];
|
||||
@@ -116,7 +110,6 @@ const INITIAL_STATE: State = {
|
||||
devicePlugins: new Map(),
|
||||
clientPlugins: new Map(),
|
||||
loadedPlugins: new Map(),
|
||||
bundledPlugins: new Map(),
|
||||
gatekeepedPlugins: [],
|
||||
disabledPlugins: [],
|
||||
failedPlugins: [],
|
||||
@@ -175,11 +168,6 @@ export default function reducer(
|
||||
...state,
|
||||
loadedPlugins: new Map(action.payload.map((p) => [p.id, p])),
|
||||
};
|
||||
} else if (action.type === 'REGISTER_BUNDLED_PLUGINS') {
|
||||
return {
|
||||
...state,
|
||||
bundledPlugins: new Map(action.payload.map((p) => [p.id, p])),
|
||||
};
|
||||
} else if (action.type === 'REGISTER_INSTALLED_PLUGINS') {
|
||||
return produce(state, (draft) => {
|
||||
draft.installedPlugins.clear();
|
||||
@@ -270,13 +258,6 @@ export const registerLoadedPlugins = (
|
||||
payload,
|
||||
});
|
||||
|
||||
export const registerBundledPlugins = (
|
||||
payload: Array<BundledPluginDetails>,
|
||||
): Action => ({
|
||||
type: 'REGISTER_BUNDLED_PLUGINS',
|
||||
payload,
|
||||
});
|
||||
|
||||
export const registerInstalledPlugins = (
|
||||
payload: InstalledPluginDetails[],
|
||||
): Action => ({
|
||||
|
||||
Reference in New Issue
Block a user