contains a list of transformation handlers that will be used for matching contents returned by the plugins' onLoad hooks,
in order to transfer them to the registered SuperPluginBuild.onTransform hooks.
contains a list of onEmit handlers that will be called once the file contents of the bundle has been finalized by esbuild,
but additional actions (such as linking, and re-incorporating imports for generic loaders) still need to be taken care of by the user's plugins.
the callbacks accumulated here are registered by SuperPluginBuild.onEmit.
contains a list of onEnd handlers that will be called at the end of the build,
after we have modified the contents of the resulting in-memory files.
the callbacks accumulated here are registered by SuperPluginBuild.onEnd.
holds all loaded resources, using ${namespace}:${resolved_path} for the key.
this registry is needed in order to trace back the loaded input file(s) from which an emitted file originates from,
in order to make the functionality of SuperPluginBuild.onEmit possible.
the controller used for commanding the state of the "long build" plugin.
indicates the original write option specified by the user when instantiating the build.
indicates if the original allowOverwrite option was enabled when the build was started.
a logging function for internal debugging. it gets called only when DEBUG.LOG is enabled.
this method wraps a SuperPlugin on top of each of the user's base plugin, in addition to injecting two essential plugins at their correct position to make the new plugin apis work.
the two internal plugins that get injected are:
build.onEnd callbacks.
once this plugin has determined that all files in the current scope have been processed, it gathers all imports from the OnTransformResults,
and compiles/bundles them in a new recursive scope (hence the name "long-build").creates the the metafile object from esbuild's EsbuildBuildResult,
and registers all output files onto it for the emissionsDriverPlugin to initiate the next step (onEmit stage).
concludes the build after the all registered onEmitHandlers and onEndHandlers
have been executed by the emissionsDriverPlugin when it enters its onEnd stage (registered to the "true" build object).
you must pass the mutated Metafile that you receive from calling the createMetafile
method at the beginning of the emissionsDriverPlugin's onEnd stage,
so that if there's anything that should get written onto your filesystem, it will take place before the build concludes.
a centralized context is created for each individual SuperBuild.build call.