UNPKG

@atomist/sdm-core

Version:

Atomist Software Delivery Machine - Implementation

49 lines 2.67 kB
"use strict"; /* * Copyright © 2019 Atomist, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ Object.defineProperty(exports, "__esModule", { value: true }); const remoteGitProjectPersister_1 = require("@atomist/automation-client/lib/operations/generate/remoteGitProjectPersister"); const sdm_1 = require("@atomist/sdm"); const _ = require("lodash"); const DefaultRepoRefResolver_1 = require("../handlers/common/DefaultRepoRefResolver"); const GitHubCredentialsResolver_1 = require("../handlers/common/GitHubCredentialsResolver"); // tslint:disable-next-line:deprecation const EphemeralLocalArtifactStore_1 = require("../internal/artifact/local/EphemeralLocalArtifactStore"); const TeamConfigurationPreferenceStore_1 = require("../internal/preferences/TeamConfigurationPreferenceStore"); const rolarAndDashboardLogFactory_1 = require("../log/rolarAndDashboardLogFactory"); function defaultSoftwareDeliveryMachineConfiguration(configuration) { const repoRefResolver = new DefaultRepoRefResolver_1.DefaultRepoRefResolver(); return { sdm: { // tslint:disable-next-line:deprecation artifactStore: new EphemeralLocalArtifactStore_1.EphemeralLocalArtifactStore(), projectLoader: _.get(configuration, "sdm.projectLoader") || new sdm_1.CachingProjectLoader(), logFactory: rolarAndDashboardLogFactory_1.rolarAndDashboardLogFactory(configuration), credentialsResolver: new GitHubCredentialsResolver_1.GitHubCredentialsResolver(), repoRefResolver, repoFinder: sdm_1.allReposInTeam(repoRefResolver), projectPersister: remoteGitProjectPersister_1.RemoteGitProjectPersister, goalScheduler: [], preferenceStoreFactory: TeamConfigurationPreferenceStore_1.TeamConfigurationPreferenceStoreFactory, parameterPromptFactory: sdm_1.commandRequestParameterPromptFactory, }, local: { preferLocalSeeds: true, }, }; } exports.defaultSoftwareDeliveryMachineConfiguration = defaultSoftwareDeliveryMachineConfiguration; //# sourceMappingURL=defaultSoftwareDeliveryMachineConfiguration.js.map