UNPKG

salesforce-alm

Version:

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

31 lines (29 loc) 1.38 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.CustomObjectTranslationMetadataType = void 0; const path = require("path"); const fs = require("fs-extra"); const defaultMetadataType_1 = require("./defaultMetadataType"); const PathUtil = require("../sourcePathUtil"); class CustomObjectTranslationMetadataType extends defaultMetadataType_1.DefaultMetadataType { getAggregateMetadataFilePathFromWorkspacePath(filePath) { return PathUtil.removeParentDirFromPath(filePath); } entityExistsInWorkspace(metadataFilePath) { const aggregateFullName = this.getAggregateFullNameFromFilePath(metadataFilePath); return fs.existsSync(path.join(path.dirname(metadataFilePath), aggregateFullName)); } // CustomObjectTranslations are only coarsely tracked so we only want to report // that a COT has generally changed rather than reporting each associated filePath displayAggregateRemoteChangesOnly() { return true; } } exports.CustomObjectTranslationMetadataType = CustomObjectTranslationMetadataType; //# sourceMappingURL=customObjectTranslationMetadataType.js.map