hooks library

Opt-in helpers for using Patchwork from Dart build hooks.

This library intentionally does not define a hook/build.dart entrypoint. User projects should call these helpers from their own build(args, callback) body so Patchwork can compose with any other hook work in that package.

Classes

AppliedPatch
A committed patch materialized into generated pub override output.

Functions

apply(BuildInput input, BuildOutputBuilder output, {required String package}) Future<List<AppliedPatch>>
Applies the committed Patchwork patch for package from a build hook.
applyAll(BuildInput input, BuildOutputBuilder output) Future<List<AppliedPatch>>
Applies every committed Patchwork patch from a build hook callback.