Files
factorio-clusterio/packages/lib/src/api.ts
T
Hornwitser 90a88f7e01 Fix /api/plugins leaking filesystem paths
Replace PluginWebApi's requirePath member with npmPackage which is only
populated if the package is not marked as private and the requirePath
matches the name. This prevents the public /api/plugins endpoint from
leaking filesystem paths into the controller.
2023-12-02 01:43:28 +01:00

17 lines
338 B
TypeScript

export type PluginWebApi = {
name: string;
version: string;
enabled: boolean;
loaded: boolean;
web: {
main: string;
error?: string;
};
/**
* NPM package this plugin is published as. Not present if the package
* is private or the path used to load it does not match the name of the
* package.
*/
npmPackage?: string;
}