mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-13 07:04:53 +09:00
Replace invokeHook and the per plugin on* methods with AsyncHook collections on the controller, host, instance, clusterioctl and web control objects. Plugin entrypoints export a default function that receives a load context and attaches handlers to the hooks it needs. Class exports still load through fromContext with a deprecation warning. The create templates and docs use the entrypoint function. This is clusterio/clusterio#921 recreated on top of master after the ESM migration and the PluginDeclaration permissions change. Closes #730 Co-Authored-By: Cooldude2606 <25043174+Cooldude2606@users.noreply.github.com> Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
28 lines
623 B
TypeScript
28 lines
623 B
TypeScript
declare module "*.png" {
|
|
const value: string;
|
|
export default value;
|
|
}
|
|
|
|
declare module "*.css" {
|
|
const value: string;
|
|
export default value;
|
|
}
|
|
|
|
declare module "*.svg" {
|
|
const value: string;
|
|
export default value;
|
|
}
|
|
|
|
declare module "*.md" {
|
|
const value: string;
|
|
export default value;
|
|
}
|
|
|
|
/** Path the web interface is served under, ends with a slash. */
|
|
declare const webRoot: string;
|
|
/** Path static assets are served under, ends with a slash. */
|
|
declare const staticRoot: string;
|
|
|
|
declare const __webpack_init_sharing__: (shareScope: string) => Promise<void>;
|
|
declare const __webpack_share_scopes__: { default: any };
|