UNPKG

salesforce-alm

Version:

This package contains tools, and APIs, for an improved salesforce.com developer experience.

34 lines (32 loc) 1.52 kB
"use strict"; /* * Copyright (c) 2020, salesforce.com, inc. * All rights reserved. * Licensed under the BSD 3-Clause license. * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause */ Object.defineProperty(exports, "__esModule", { value: true }); exports.CustomLabelsMetadataType = void 0; const nondecomposedTypesWithChildrenMetadataType_1 = require("./nondecomposedTypesWithChildrenMetadataType"); const sourceLocations_1 = require("../sourceLocations"); class CustomLabelsMetadataType extends nondecomposedTypesWithChildrenMetadataType_1.NondecomposedTypesWithChildrenMetadataType { parseSourceMemberForMetadataRetrieve(sourceMemberName, sourceMemberType, isNameObsolete) { return { fullName: sourceMemberName, type: sourceMemberType, isNameObsolete, }; } // if name is singular 'CustomLabel' and there are no other entries in the nonDecomposedElementsIndex then we should delete the file // e.g. we're deleting the last CustomLabel entry in the CustomLabels file shouldDeleteWorkspaceAggregate(metadataType) { if (metadataType === 'CustomLabel') { return sourceLocations_1.SourceLocations.nonDecomposedElementsIndex.values().length === 1; } else { return metadataType === this.getAggregateMetadataName(); } } } exports.CustomLabelsMetadataType = CustomLabelsMetadataType; //# sourceMappingURL=customLabelsMetadataType.js.map