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

    Class DatapackExportDefinitionStore

    Class that stores and manages the configuration for exporting and expanding datapacks. Used by both the DatapackExporter and DatapackExpander to determine how to export and expand datapacks. Configurations can be loaded from a disk or added programmatically to the definition store.

    Index

    Constructors

    Properties

    config: Record<string | symbol, DatapackExportDefinitionMap> = ...

    Scoped configuration for specific contexts such as Datapack types or other custom scopes. Definitions are indexed by scope, Datapack type, and normalized SObject type. The SObject dimension allows standard and managed runtime definitions for the same Datapack type to coexist in one scope.

    Methods

    • Iterate definitions matching an SObject type. A selected datapack definition is yielded first, followed by other object definitions in the selected scope and then global fallbacks. Without an explicit scope all definitions retain their existing global-first lookup order.

      Parameters

      Returns Generator<DatapackExportDefinitionStoreEntry>

    • List all available scopes for a given datapack type and optionally SObject type.

      Parameters

      • context: { datapackType: string; objectType?: string }

        The context for which to retrieve the available scopes, containing the datapack type and optionally the SObject type.

      Returns string[]

      An array of available scopes for the specified datapack type and SObject type. If no scopes are found, an empty array is returned.

    • Get the datapack types matching the specified context. The context is usually the SObject type and optionally a scope.

      Parameters

      • context: { objectType: string; scope?: string }

      Returns { datapackType: string; scope?: string }[]

      An array of matching datapack types with their associated scope if applicable. If no matching datapack type is found, an empty array is returned.

    • Parameters

      • scope: string | symbol
      • datapackType: string
      • objectType: string

      Returns DatapackExportDefinitionStoreEntry

    • Get the matching key fields configured for an SObject in the loaded export definitions. When a datapack type or scope is provided its definition is considered first, so two datapack definitions backed by the same SObject can use different matching keys.

      Parameters

      • item: string | ObjectRef

        SObject type, or the full datapack export context

      Returns string[] | undefined

      The configured matching key fields, an empty array for objects marked with an auto-generated matching key, or undefined when no loaded definition configures a key

    • Loads the provided configuration into the datapack exporter.

      • The specified config is keyed by datapack type.
      • When a scope is provided, the configuration is stored in the config object under that scope, otherwise it is stored as a global configuration.

      Parameters

      • definitions: { [datapackType: string]: DatapackExportDefinition }

        The configuration object containing datapack export definitions.

      • Optionaloptions: { scope?: string }

      Returns void

    • Returns all export definitions available in the store, including both global and scoped configurations. Scoped configurations are merged with the global configuration, with scoped settings taking precedence over global settings in case of conflicts.

      Returns readonly DatapackExportDefinitionStoreEntry[]

      An array of export definitions with their associated scope if applicable.