Class SubfolderResourcesGenerator

Generates all resources found in specific subfolders of the given template folder. In case the same resource is defined in several subfolders, the data of the last subfolder in the list will be used.

The results of all the subfolders will be merged so the end result is still a sorted stream of identifiers.

One of the main use cases for this class is so template resources can be in a separate folder than their corresponding authorization resources, allowing for authorization-independent templates.

Implements

Constructors

Methods

Constructors

Methods

  • Generates resources with the given options, based on the given template folder. The output Iterable should be sorted so that containers always appear before their contents.

    Parameters

    • templateFolder: string

      Folder where the templates are located.

    • location: ResourceIdentifier

      Base identifier.

    • options: Dict<unknown>

      Options that can be used when generating resources.

    Returns AsyncIterable<Resource>

    A map where the keys are the identifiers and the values the corresponding representations to store.