Skip to content

Commit

Permalink
Configure File pref store in local mode
Browse files Browse the repository at this point in the history
  • Loading branch information
cdupuis committed Jan 15, 2019
1 parent 12f6f6d commit b380681
Show file tree
Hide file tree
Showing 5 changed files with 520 additions and 146 deletions.
2 changes: 1 addition & 1 deletion lib/cli/invocation/command/addBootstrapCommands.ts
Expand Up @@ -60,7 +60,7 @@ function addExtensionPackGenerator(yargs: YargBuilder) {
description: "Repo name. Must begin 'sdm-pack'",
validInput: "Must begin with 'sdm-pack'",
},
},
} as any,
transform: [
UpdatePackageJsonIdentification,
],
Expand Down
Expand Up @@ -38,7 +38,7 @@ export interface NodeProjectCreationParameters extends SeedDrivenGeneratorParame
/**
* Corresponding parameter definitions
*/
export const NodeProjectCreationParametersDefinition: ParametersObject = {
export const NodeProjectCreationParametersDefinition: ParametersObject<any, any> = {

version: {
...SemVerRegExp,
Expand Down
Expand Up @@ -26,6 +26,7 @@ import {
} from "@atomist/sdm";
import {
EphemeralLocalArtifactStore,
FilePreferenceStoreFactory,
LocalSoftwareDeliveryMachineConfiguration,
LocalSoftwareDeliveryMachineOptions,
} from "@atomist/sdm-core";
Expand Down Expand Up @@ -64,7 +65,6 @@ export function defaultLocalSoftwareDeliveryMachineConfiguration(

const localSdmConfiguration = _.merge(defaultLocalSdmConfiguration, configuration.local);

const repoRefResolver = new ExpandedTreeRepoRefResolver(localSdmConfiguration);
const sdmConfiguration: SoftwareDeliveryMachineOptions = {
artifactStore: new EphemeralLocalArtifactStore(),
projectLoader: new FileSystemProjectLoader(
Expand All @@ -73,7 +73,8 @@ export function defaultLocalSoftwareDeliveryMachineConfiguration(
logFactory: async (context, goal) =>
new SimpleNodeLoggerProgressLog(configuration.name, goal.name, path.join(os.homedir(), ".atomist", "log")),
credentialsResolver: new EnvironmentTokenCredentialsResolver(),
repoRefResolver,
preferenceStoreFactory: FilePreferenceStoreFactory,
repoRefResolver: new ExpandedTreeRepoRefResolver(localSdmConfiguration),
repoFinder: expandedTreeRepoFinder(localSdmConfiguration),
projectPersister: fileSystemProjectPersister(workspaceContext, localSdmConfiguration, automationClientFinder),
targets: () => new LocalRepoTargets(localSdmConfiguration),
Expand Down

0 comments on commit b380681

Please sign in to comment.