Use the single type representing plugins
Summary: Use interface PluginDetails everywhere where plugins are handled and removed PluginDefinition type which was effectively a subset of PluginDetails Reviewed By: mweststrate Differential Revision: D21927456 fbshipit-source-id: 434ebeef955b922cc11757e78fbba8dec05f1060
This commit is contained in:
committed by
Facebook GitHub Bot
parent
907cb9e3cc
commit
db3f04a2d7
@@ -10,6 +10,7 @@
|
||||
import fs from 'fs-extra';
|
||||
import path from 'path';
|
||||
import PluginDetails from './PluginDetails';
|
||||
import {pluginCacheDir} from './pluginPaths';
|
||||
|
||||
export default async function (
|
||||
pluginDir: string,
|
||||
@@ -44,8 +45,13 @@ async function getPluginDetailsV1(
|
||||
name: packageJson.name,
|
||||
version: packageJson.version,
|
||||
main: 'dist/bundle.js',
|
||||
entry: path.join(
|
||||
pluginCacheDir,
|
||||
`${packageJson.name}@${packageJson.version || '0.0.0'}.js`,
|
||||
),
|
||||
source: packageJson.main,
|
||||
id: packageJson.name,
|
||||
isDefault: false,
|
||||
gatekeeper: packageJson.gatekeeper,
|
||||
icon: packageJson.icon,
|
||||
title: packageJson.title || packageJson.name,
|
||||
@@ -66,7 +72,9 @@ async function getPluginDetailsV2(
|
||||
name: packageJson.name,
|
||||
version: packageJson.version,
|
||||
main: packageJson.main,
|
||||
entry: path.resolve(pluginDir, packageJson.main),
|
||||
source: packageJson.flipperBundlerEntry,
|
||||
isDefault: false,
|
||||
id: packageJson.id || packageJson.name,
|
||||
gatekeeper: packageJson.gatekeeper,
|
||||
icon: packageJson.icon,
|
||||
|
||||
Reference in New Issue
Block a user