diff --git a/Sources/NodesGenerator/Resources/Stencils/PluginListInterface.stencil b/Sources/NodesGenerator/Resources/Stencils/PluginListInterface.stencil new file mode 100644 index 000000000..0e8cd6962 --- /dev/null +++ b/Sources/NodesGenerator/Resources/Stencils/PluginListInterface.stencil @@ -0,0 +1,28 @@ +//{{ file_header }} +{% if plugin_list_interface_imports %} + +{% for import in plugin_list_interface_imports %} +import {{ import }} +{% endfor %} +{% endif %} + +// This file defines the protocols and types in the Plugin List interface requiring public ACL for use in another module. + +/// Declares the type of key used to identify plugins within the collection. +/// - NOTE: May be any ``Hashable`` type such as ``String`` or an enumeration. +internal typealias {{ plugin_list_name }}PluginListKeyType = String + +/// Dynamic state from the caller provided to the plugins to use in determining whether they are enabled. +/// - NOTE: An alias to a tuple is supported. +internal typealias {{ plugin_list_name }}PluginListStateType = Void + +{% if is_periphery_comment_enabled %} +// periphery:ignore +{% endif %} +/// @mockable +@MainActor +internal protocol {{ plugin_list_name }}PluginList { + func createAll() -> [{{ plugin_list_name }}Builder] + func create() -> {{ plugin_list_name }}Builder? + func create(key: {{ plugin_list_name }}PluginListKeyType) -> {{ plugin_list_name }}Builder? +}