Object that describe the salesforce package XML, can be converted into a package.xml file body or JSON structure

Hierarchy

  • PackageManifest

Constructors

Properties

metadataMembers: Map<string, Set<string>> = ...

Accessors

Methods

  • Add a new member(s) to the package XML manifest

    Parameters

    • type: string

      Type of component to add

    • member: string | Iterable<string>

      Name of the component(s) to add

    Returns void

  • Get all types that are mentioned in this package.

    Returns Generator<{
        componentName: string;
        componentType: string;
    }, void, undefined>

  • Gets a new package manifest with just the specified metadata types. If no metadata types are specified a copy of the current manifest is returned.

    Parameters

    • metadataTypes: string | string[] | ((type, name) => any)

      Filter expression or metadata types to include in the new manifest

    Returns PackageManifest

  • Get a list of all components of the specified type in this package

    Parameters

    • Optional type: string

      The XML type to list the components from

    Returns string[]

  • Removes one or more members from the manifest, if no member is specified all members of the specified type are removed.

    Parameters

    • type: string

      Type of component to remove

    • Optional member: string | Iterable<string>

      If specified, the name of the component to remove. If not specified, all components of the specified type are removed.

    Returns void

  • Converts the contents of the package to a JSON structure that can be use for retrieval

    Parameters

    • apiVersion: string

    Returns {
        $?: Record<string, undefined | string>;
        types: {
            members: string[];
            name: string;
        }[];
        version: string;
    }

    • Optional $?: Record<string, undefined | string>
    • types: {
          members: string[];
          name: string;
      }[]
    • version: string
  • Creates a new package XML structure object from a JSON structure or a package.xml file

    Parameters

    • data: PackageXml | {
          $?: Record<string, undefined | string>;
          types: {
              members: string[];
              name: string;
          }[];
          version: string;
      }

      Deserialized JSON structure or package.xml file

    Returns PackageManifest

    New PackageManifest object