vlocode-project - v1.40.0-beta-4
    Preparing search index...

    Class DatapackDeployment

    A datapack deployment task/job

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    cancelToken?: CancellationToken
    connectionProvider: SalesforceConnectionProvider
    deployed: DatapackDeploymentRecord[] = ...
    errors: DatapackDeploymentRecord[] = ...
    isStarted: boolean = false
    logger: Logger
    lookupService: DatapackLookupService
    options: Readonly<
        DatapackDeploymentOptions & typeof datapackDeploymentDefaultOptions,
    >
    orgDependencyResolver: DatapackDependencyResolver
    recordGroups: Map<string, DatapackDeploymentRecordGroup> = ...
    recordGroupsErrors: Map<string, DatapackDeploymentError[]> = ...
    records: Map<string, DatapackDeploymentRecord> = ...
    salesforceService: SalesforceService
    timer: Timer

    Accessors

    Methods

    • Add a Datapack level error to the deployment. This is used to add errors that are not related to a specific record but to a whole datapack, or to add errors that are related to a datapack for which the records could not added to the deployment.

      Parameters

      • datapackKey: string

        Group key of the datapack to which the error belongs

      • error: string | DatapackDeploymentError

        Error to add to the deployment

      Returns void

    • Gets the deployment status of a Datapack by it's source key.

      • Returns the summary status of all records in the datapack.
      • Returns undefined if the datapack is not part of the deployment.

      Parameters

      • datapackKey: string

        Datapack key to get the deployment status for

      Returns undefined | DeploymentStatus

    • Retrieves the deployment messages for the datapack deployment.

      Parameters

      • Optionaloptions: { includeCascadeFailures?: boolean }

        An optional object that specifies additional options for retrieving the messages.

        • OptionalincludeCascadeFailures?: boolean

          A boolean indicating whether to include cascade failures in the messages. Default is false.

      Returns DatapackDeploymentRecordMessage[]

      An array of DatapackDeploymentRecordMessage objects representing the deployment messages.

    • Checks if there is a circular dependency between two datapacks.

      Parameters

      • datapackKeyA: string

        The key of the first datapack.

      • datapackKeyB: string

        The key of the second datapack.

      • visited: Set<string> = ...

      Returns boolean

      True if there is a circular dependency, false otherwise.

    • Handles the error that occurs when emitting a callback event.

      Parameters

      • err: unknown

        The error that occurred.

      • event: string

        The name of the event.

      • failedCallback: EventReceiver<any>

        The failed callback event receiver.

      Returns void

    • Purge all records that depend on any of the records just deployed through their matching record key. Records that depend on other records from within the same Datapack have a relation to the parent datapack through Matching source key. This function will delete all child records that have a relationship parent record through a Matching source key

      Note this function will only delete records for parents that have been update and are deployed successfully

      Parameters

      Returns Promise<void>

    • Removes all listeners, or those of the specified event.

      It is bad practice to remove listeners added elsewhere in the code, particularly when the EventEmitter instance was created by some other component or module (e.g. sockets or file streams).

      Returns a reference to the EventEmitter, so that calls can be chained.

      Type Parameters

      Parameters

      • Optionalevent: K

        event type to remove listeners for if not specified all listeners are removed

      Returns void

    • Resolve the dependencies either based on the records we are deploying -or- pass them on to the lookup resolver.

      Parameters

      • dependencies: DependencyResolutionRequest[]

        Dependency resolution requests to resolve

      Returns Promise<DependencyResolutionResult[]>