Files
factorio-clusterio/packages/lib/index.ts
T
bbassieandClaude Opus 5.5 c8e52e7bde Add waitForPlugin and load plugins concurrently
Plugins can wait for another plugin on the same controller, host or
instance with waitForPlugin(waiter, name, timeoutMs). It resolves to what
the other plugin's entrypoint returned, or to undefined with a warning
naming both plugins if it is not loaded once loading finishes or the
timeout runs out.

Plugin entrypoints now run concurrently so a plugin can await a plugin
later in the list from its entrypoint. loadedPlugins is still filled in
plugin list order, as the instance builds its Lua module list from it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 14:24:56 +00:00

53 lines
1.9 KiB
TypeScript

/**
* Shared library for Clusterio
* @module lib
*/
export * from "./build_mod.js";
export * from "./src/api.js";
export * from "./src/bootstrap.js";
export * from "./src/command.js";
export * from "./src/config/index.js";
export * from "./src/data/index.js";
export * from "./src/database.js";
export * from "./src/errors.js";
export * from "./src/export.js";
export * from "./src/external/index.js";
export * from "./src/factorio/index.js";
export * from "./src/file_ops.js";
export * from "./src/hash.js";
export * from "./src/helpers.js";
export * from "./src/ini.js";
export * from "./src/link/index.js";
export * from "./src/logging.js";
export * from "./src/logging_utils.js";
export * from "./src/lua_tools.js";
export * from "./src/permissions.js";
export * from "./src/plugin.js";
export * from "./src/plugin_loader.js";
export * from "./src/PluginLoader.js";
export * from "./src/loadPlugin.js";
export * from "./src/prometheus.js";
export * from "./src/schema.js";
export * from "./src/shared_commands.js";
export * from "./src/stream.js";
export * from "./src/system_collectors.js";
export * from "./src/zip_ops.js";
export * from "./src/subscriptions.js";
export * from "./src/datastore.js";
export * from "./src/load_plugin_list.js";
export * from "./src/rce_ops.js";
export * from "./src/npm_registry.js";
export * from "./src/LockFile.js";
export * from "./src/AsyncHook.js";
export * from "./src/SyncHook.js";
export * from "./src/migrations.js";
export { default as ExponentialBackoff } from "./src/ExponentialBackoff.js";
export { default as ModStore } from "./src/ModStore.js";
export { default as RateLimiter } from "./src/RateLimiter.js";
export { default as ValueCache } from "./src/ValueCache.js";
export { default as isDeepStrictEqual } from "#is_deep_strict_equal";
import { checkSingletonImport } from "./src/check_singleton_import.js";
checkSingletonImport(import.meta.filename);