kratoon3/salesforce-metadata


Read and write Salesforce Metadata files.

License: Apache-2.0

Language: TypeScript

Keywords: metadata, salesforce, salesforce-metadata, salesforcedx, types, typescript


salesforce-metadata

npm version

Read and write Salesforce Metadata files in TypeScript.

WARNING: this project is not stable yet and any API can change.

Types

All the metadata types were generated from salesforce-wsdl-consumer.

Every property is optional and explicitArray for reading an XML file is set to true (always put child nodes in an array).

Usage

Currently, this version can only read and write XML Metadata files, i.e. even though the Profile type extends Metadata type, the "fullName" property from Metadata type won't be processed while reading and writing a file.

Exported functions:

  • readMetadataXML(file: string): Promise<MetadataFile>
  • writeMetadataXML(file: string, metadata: MetadataFile, options?: OptionsV2): Promise<void>
readMetadataXML(profilePath)
    .then((profile: {Profile: Profile}) => {
        profile.Profile.userPermissions?.forEach((perm: ProfileUserPermission) => {
            // ...
        });
        return writeMetadataXML(profilePath, profile);
    });

Project Statistics

Sourcerank 2
Repository Size 322 KB
Stars 0
Forks 0
Watchers 1
Open issues 0
Dependencies 441
Contributors 1
Tags 0
Created
Last updated
Last pushed

Top Contributors See all

Ondrej Kratochvil

Packages Referencing this Repo

salesforce-metadata
Read and write Salesforce Metadata files.
Latest release 0.0.9 - Updated

Something wrong with this page? Make a suggestion

Last synced: 2020-01-25 16:32:58 UTC

Login to resync this repository