UNPKG

@flxbl-io/sfp

Version:

sfp is a CLI tool to help you manage your Salesforce projects in an artifact centric model

56 lines (55 loc) 1.94 kB
import { Logger } from '@flxbl-io/sfp-logger'; export default class ArtifactFetcher { /** * Decider for which artifact retrieval method to use * Returns empty array if no artifacts are found * @param artifactDirectory * @param sfdx_package */ static fetchArtifacts(artifactDirectory: string, sfdx_package?: string, logger?: Logger): Artifact[]; /** * Helper method for retrieving the ArtifactFilePaths of an artifact folder * @param packageMetadataFilePath */ private static fetchArtifactFilePathsFromFolder; /** * Helper method for retrieving ArtifactFilePaths of an artifact zip * @param artifact */ private static fetchArtifactFilePathsFromZipFile; /** * Helper method for retrieving ArtifactFilePaths of a tarball * @param artifact */ private static fetchArtifactFilePathsFromTarball; /** * Find zip and tarball artifacts * Artifact format/s: * sfpowerscripts_artifact_<version>.zip, * [sfdx_package]_sfpowerscripts_artifact_[version].zip, * [sfdx_package]_sfpowerscripts_artifact_[version].tgz */ static findArtifacts(artifactDirectory: string, sfdx_package?: string): string[]; /** * Get the artifact with the latest semantic version * @param artifacts */ private static getLatestArtifact; /** * Verify that artifact filepaths exist on the file system * @param artifactFilePaths */ private static existsArtifactFilepaths; /** * Decider for task outcome if the artifact cannot be found * @param artifacts_filepaths * @param isToSkipOnMissingArtifact */ static missingArtifactDecider(artifacts: Artifact[], isToSkipOnMissingArtifact: boolean): boolean; private static makefolderid; } export interface Artifact { packageMetadataFilePath: string; sourceDirectoryPath?: string; changelogFilePath?: string; }