mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-12 23:04:52 +09:00
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.
17 lines
338 B
TypeScript
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;
|
|
}
|