smf_hooks 1.1.0
smf_hooks: ^1.1.0 copied to clipboard
Lightweight typed hook SDK for SMF release automation.
smf_hooks #
The lightweight, typed hook SDK for SMF. Add this package to a Flutter application's development dependencies when its release workflow needs custom hooks:
dart pub add --dev smf_hooks
import 'package:smf_hooks/smf_hooks.dart';
final class CheckPlan extends SmfHook {
@override
Future<void> run(SmfBeforeCreatePrContext context) async {
final ios = context.release.ios;
if (ios != null) {
ios.storeReleaseNotes.write(
locale: 'en-US',
message: ios.changes
.map((change) => '- ${change.description}')
.join('\n'),
);
}
}
}
Future<void> main() => runSmfHook(CheckPlan());
Applications that only use the standard SMF workflow do not need this package.
See the hook guide for
the supported phases, data contract, verification, and recovery. A complete
implementation is available in
example/smf_hooks_example.dart.
This package exposes a Dart library and no terminal executable.