-
Buildpack/BuildBus
-
~Target ⇐
Trackable- .call([...args]) ⇒
\* - .callAsync(...args) ⇒
undefined - .intercept(options) ⇒
void - .promise([...args]) ⇒
Promise - .tap([name], interceptor) ⇒
undefined - .tapAsync(name, interceptor) ⇒
undefined - .tapPromise(name, interceptor) ⇒
undefined - .toJSON() ⇒
object
- .call([...args]) ⇒
-
Represents an edge on the graph, or a "route" between stops, created between two extensions when one of them references the target(s) of another. When extension Foo requests targets of extension Bar, the BuildBus provides an Target instead of the literal Tapable instance. This enables better logging, error checking, and validation.
Extends: Trackable
See: Tapable docs
-
~Target ⇐
Trackable- .call([...args]) ⇒
\* - .callAsync(...args) ⇒
undefined - .intercept(options) ⇒
void - .promise([...args]) ⇒
Promise - .tap([name], interceptor) ⇒
undefined - .tapAsync(name, interceptor) ⇒
undefined - .tapPromise(name, interceptor) ⇒
undefined - .toJSON() ⇒
object
- .call([...args]) ⇒
Run .call(...args) on the underlying Tapable Hook. Calls interceptors synchronously and in subscription order with the provided arguments. Returns the final value if it's a Waterfall target, or the value returned by the first interceptor that returns a value if it's a Bail target.
Returns: \* — Returns whatever the underlying Tapable Hook returns.
Parameters
\*Run .callAsync(...args) on the underlying Tapable Hook. Calls interceptors asynchronously with the provided arguments. Depending on the Target type, calls interceptors in parallel or in subscription order. Last argument must be a callback. It will be invoked when all interceptors have run, or when the first returning interceptor has run if it's a Bail target.
Returns: undefined — callAsync returns nothing, instead passing any output of the interceptors as the first argument of the callback.
Parameters
\*Run .intercept(options) on the underlying Tapable Hook. Can register meta-interceptors for other activity on this target. Use only for logging and debugging.
Returns: Parameters
Run .promise(...args) on the underlying Tapable hook. Calls interceptors asynchronously with the provided arguments. Depending on the Target type, calls interceptors in parallel or in series. Returns a promise. It will be fulfilled when all interceptors have run, or when the first returning interceptor has run if it's a Bail target.
Returns: Promise — A Promise for any output of the target's interceptors.
Parameters
\*Adds a synchronous interceptor to the target. If you just supply a function, it will use your extension's package name as the name of the tap.
Returns: Parameters
string | objectfunctionAdds a callback-style asynchronous interceptor to the Target. The interceptor will receive a callback function as its last argument. Only supported on Async targets.
Returns: Parameters
string | objectfunctionAdds a Promise-returning async interceptor to the Target. The interceptor may return a Promise, which the Target will resolve. Only supported on Async targets.
Returns: Parameters
string | objectfunctionProvides the JSON object representation of this target
Returns: object — JSON object
Source Code: pwa-studio/packages/pwa-buildpack/lib/BuildBus/Target.js