UNPKG

@flxbl-io/sfp

Version:

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

67 lines (66 loc) 2.09 kB
import { Org } from '@salesforce/core'; import { Logger } from '@flxbl-io/sfp-logger'; import Package2Detail from '../package/Package2Detail'; import SfpPackage from '../package/SfpPackage'; export default class SFPOrg extends Org { /** * Get list of all artifacts in an org */ getInstalledArtifacts(orderBy?: string, logger?: Logger): Promise<any[]>; /** * Check whether an artifact is installed in a Org * @param {Logger} logger * @param {SfpPackage} sfpPackage */ isArtifactInstalledInOrg(logger: Logger, sfpPackage: SfpPackage): Promise<{ isInstalled: boolean; versionNumber?: string; }>; /** * Updates or Create information about an artifact in the org * @param {Logger} logger * @param {SfpPackage} sfpPackage */ updateArtifactInOrg(logger: Logger, sfpPackage: SfpPackage): Promise<string>; private getArtifactRecordId; /** * Retrieves all packages(recognized by Salesforce) installed in the org */ getAllInstalled2GPPackages(): Promise<Package2Detail[]>; /** * Retrives all managed packages in the org */ getAllInstalledManagedPackages(): Promise<Package2Detail[]>; /** * List all the packages created in DevHub, will throw an error, if its not a DevHub */ listAllPackages(): Promise<PackageTypeInfo[]>; getAlias(): Promise<string>; /** * Return all artifacts including sfp as well as external unlocked/managed */ getAllInstalledArtifacts(): Promise<InstalledArtifact[]>; } export interface InstalledArtifact { name: string; version: string; commitId?: string; subscriberVersion?: string; type?: string; isInstalledBysfp?: boolean; } export interface SfpowerscriptsArtifact2__c { Id?: string; Name: string; Tag__c: string; Version__c: string; CommitId__c: string; } export interface PackageTypeInfo { Id: string; Name: string; Description: string; NamespacePrefix: string; ContainerOptions: string; IsOrgDependent: boolean | string; }