vlocode-project - v2.4.3
    Preparing search index...

    Represents a Datapack Expander that expand an exported datapack into a list of files that can be written to the file system or a zip archive. The expander can be used to expand a single datapack or a list of datapacks.

    const expander = container.create(DatapackExpander);
    const result = expander.expandDatapack(datapack);

    for (const [fileName, fileData] of Object.entries(result.files)) {
    await fs.writeFile(fileName, fileData);
    }
    Index

    Constructors

    Properties

    datapackStandardFields: string[] = ...

    Configuration for the Datapack Exporter instance.

    fieldTypeExtension: { array: string; binary: string; json: string } = ...
    logger: Logger
    datapackFileName: string = 'DataPack.json'

    Methods

    • Parameters

      • format: string | string[]
      • Optionaloptions: { context?: object; defaultExt?: string; fallback?: string }

      Returns any

    • Sort record arrays at the expansion boundary, after their source keys have been finalized. Configured sort fields take precedence. Without configuration, a source key is preferred and Name is used when a source key is not available on every record. Other arrays retain their original order because their values may be intentionally positional.

      Parameters

      • ref: FieldRef
      • value: unknown

      Returns unknown