Protected
Readonly
ctxThe linked full project context, allowing plugins to modify and access it.
Readonly
nameA human-readable name of the context. Try to make it unique to avoid confusion in the logs.
Protected
Readonly
pluginsThe plugins registered for this context. These build the foundation for applyPlugins.
Add a guess for the loading order. This is mostly for plugins to use.
In case you have a certain order, use the certain
flag to indicate this -- but please take care of really being certain!
Optional
certain: booleanAdd a single request to the context. This is considered unordered (i.e., ordered implicitly by the order of addition) until a plugin provides either a guess or a known order.
If you want to add multiple requests, consider using addRequests instead for efficiency.
Add one or multiple requests to the context. These are considered unordered (i.e., ordered implicitly by the order of addition) until a plugin provides either a guess or a known order.
This is a batched version of addRequest.
Protected
applyRun all registered plugins on the given args, please be aware that if they are async, it is up to you to await them.
Get the current guesses for the loading order, if any. These are populated by FlowrAnalyzerLoadingOrderPlugins.
Get the current known loading order, if any. This is populated by FlowrAnalyzerLoadingOrderPlugins if they have a source of identifying the order definitively.
Returns the project context this sub-context is attached to
Get the current loading order of requests, potentially triggering a re-computation if new requests have been added since the last computation.
Get all requests that have been added to this context, but for which no loading order is known or guessed.
Peek whether we have a loading order known or guessed, this does not trigger any plugin runs. If you want to get the current loading order, including potential recompoutations, use getLoadingOrder instead.
This context is responsible for managing the loading order of script files in a project, including guesses and known orders provided by FlowrAnalyzerLoadingOrderPlugins.
If you are interested in inspecting these orders, refer to ReadOnlyFlowrAnalyzerLoadingOrderContext. Plugins, however, can use this context directly to modify order guesses.