1 | "use strict";
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 |
|
12 |
|
13 |
|
14 |
|
15 |
|
16 |
|
17 | Object.defineProperty(exports, "__esModule", { value: true });
|
18 | const remoteGitProjectPersister_1 = require("@atomist/automation-client/lib/operations/generate/remoteGitProjectPersister");
|
19 | const sdm_1 = require("@atomist/sdm");
|
20 | const _ = require("lodash");
|
21 | const FileSystemGoalCache_1 = require("../goal/cache/FileSystemGoalCache");
|
22 | const DefaultRepoRefResolver_1 = require("../handlers/common/DefaultRepoRefResolver");
|
23 | const GitHubCredentialsResolver_1 = require("../handlers/common/GitHubCredentialsResolver");
|
24 | const EphemeralLocalArtifactStore_1 = require("../internal/artifact/local/EphemeralLocalArtifactStore");
|
25 | const GraphQLPreferenceStore_1 = require("../internal/preferences/GraphQLPreferenceStore");
|
26 | const rolarAndDashboardLogFactory_1 = require("../log/rolarAndDashboardLogFactory");
|
27 | const path = require("path");
|
28 | function defaultSoftwareDeliveryMachineConfiguration(configuration) {
|
29 | const repoRefResolver = new DefaultRepoRefResolver_1.DefaultRepoRefResolver();
|
30 | return {
|
31 | sdm: {
|
32 | artifactStore: new EphemeralLocalArtifactStore_1.EphemeralLocalArtifactStore(),
|
33 | projectLoader: new sdm_1.CachingProjectLoader(),
|
34 | logFactory: rolarAndDashboardLogFactory_1.rolarAndDashboardLogFactory(_.get(configuration, "sdm.rolar.url", "https://rolar.atomist.com"), _.get(configuration, "sdm.dashboard.url", "https://app.atomist.com"), _.get(configuration, "sdm.rolar.bufferSize", 1000), _.get(configuration, "sdm.rolar.flushInterval", 1000), configuration.http.client.factory),
|
35 | credentialsResolver: new GitHubCredentialsResolver_1.GitHubCredentialsResolver(),
|
36 | repoRefResolver,
|
37 | repoFinder: sdm_1.allReposInTeam(repoRefResolver),
|
38 | projectPersister: remoteGitProjectPersister_1.RemoteGitProjectPersister,
|
39 | goalScheduler: [],
|
40 | preferenceStoreFactory: GraphQLPreferenceStore_1.GraphQLPreferenceStoreFactory,
|
41 | parameterPromptFactory: sdm_1.commandRequestParameterPromptFactory,
|
42 | goalCache: new FileSystemGoalCache_1.FileSystemGoalCache(path.join(_.get(configuration, "sdm.cache.path"), "goalcache")),
|
43 | },
|
44 | local: {
|
45 | preferLocalSeeds: true,
|
46 | },
|
47 | };
|
48 | }
|
49 | exports.defaultSoftwareDeliveryMachineConfiguration = defaultSoftwareDeliveryMachineConfiguration;
|
50 |
|
\ | No newline at end of file |