Fix generation of bundled.json, make source maps work in prod builds
Summary: This diff fixes several issues around loading plugin, such as: * make suresource maps work in the flipper-server production build * make sure default plugins are no symlinked, which wouldn't work anywhere else but on the the system where it was build * support release channel param for flipper-server Bundled flipper-server is now 42MB (with icons (see later diffs) and plugins ``` ll flipper-server-v0.0.0.tgz -rw-r--r-- 1 mweststrate staff 42M 23 Dec 15:29 flipper-server-v0.0.0.tgz ``` Reviewed By: nikoant Differential Revision: D33294677 fbshipit-source-id: 63538dc8127f883fee6a3608673ad11ce239b350
This commit is contained in:
committed by
Facebook GitHub Bot
parent
b1d960e4c4
commit
72fa481d27
@@ -45,6 +45,11 @@ export async function loadDynamicPlugins(): Promise<InstalledPluginDetails[]> {
|
||||
)
|
||||
).map((p: any) => p.name) as string[],
|
||||
);
|
||||
console.log(
|
||||
`✅ Detected ${bundledPlugins.size} bundled plugins: ${Array.from(
|
||||
bundledPlugins,
|
||||
).join(', ')}.`,
|
||||
);
|
||||
const [installedPlugins, unfilteredSourcePlugins] = await Promise.all([
|
||||
process.env.FLIPPER_NO_PLUGIN_MARKETPLACE
|
||||
? Promise.resolve([])
|
||||
@@ -60,23 +65,23 @@ export async function loadDynamicPlugins(): Promise<InstalledPluginDetails[]> {
|
||||
const defaultPlugins = await getAllInstalledPluginsInDir(defaultPluginsDir);
|
||||
if (defaultPlugins.length > 0) {
|
||||
console.log(
|
||||
`✅ Loaded ${defaultPlugins.length} default plugins: ${defaultPlugins
|
||||
.map((x) => x.title)
|
||||
.join(', ')}.`,
|
||||
`✅ Loaded ${defaultPlugins.length} default plugins:\n${defaultPlugins
|
||||
.map((x) => `${x.title}@${x.version}`)
|
||||
.join('\n')}.`,
|
||||
);
|
||||
}
|
||||
if (installedPlugins.length > 0) {
|
||||
console.log(
|
||||
`✅ Loaded ${installedPlugins.length} installed plugins: ${Array.from(
|
||||
new Set(installedPlugins.map((x) => x.title)),
|
||||
).join(', ')}.`,
|
||||
`✅ Loaded ${installedPlugins.length} installed plugins:\n${Array.from(
|
||||
new Set(installedPlugins.map((x) => `${x.title}@${x.version}`)),
|
||||
).join('\n')}.`,
|
||||
);
|
||||
}
|
||||
if (sourcePlugins.length > 0) {
|
||||
console.log(
|
||||
`✅ Loaded ${sourcePlugins.length} source plugins: ${sourcePlugins
|
||||
.map((x) => x.title)
|
||||
.join(', ')}.`,
|
||||
`✅ Loaded ${sourcePlugins.length} source plugins:\n${sourcePlugins
|
||||
.map((x) => `${x.title} - ${x.dir}`)
|
||||
.join('\n')}.`,
|
||||
);
|
||||
}
|
||||
return [...defaultPlugins, ...installedPlugins, ...sourcePlugins];
|
||||
|
||||
Reference in New Issue
Block a user