Skip to content

Commit

Permalink
Update to latest SDM for return value fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Rod Johnson committed Apr 6, 2019
1 parent 36ebf02 commit 56c0b2a
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 11 deletions.
12 changes: 5 additions & 7 deletions lib/machine/machine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import {
SoftwareDeliveryMachineConfiguration,
} from "@atomist/sdm";
import { createSoftwareDeliveryMachine, } from "@atomist/sdm-core";
import { ExposedSecret, SecretDefinition, SnifferOptions, sniffProject } from "./secretSniffing";
import { ExposedSecret, SnifferOptions, sniffProject } from "./secretSniffing";
import { loadSnifferOptions } from "./snifferOptionsLoader";

/**
Expand Down Expand Up @@ -81,14 +81,12 @@ async function renderExposedSecrets(exposedSecrets: ExposedSecret[], sdmc: SdmCo
* On every push, scan for secrets
* @return {PushImpactListener<{}>}
*/
function sniffForSecrets(opts: SnifferOptions): PushImpactListener<{}> {
function sniffForSecrets(opts: SnifferOptions): PushImpactListener {
return async pil => {
const exposedSecrets = await sniffProject(pil.project, opts);
await renderExposedSecrets(exposedSecrets, pil);
return {
response: exposedSecrets.length > 0 ?
PushImpactResponse.failGoals :
PushImpactResponse.proceed
};
return exposedSecrets.length > 0 ?
PushImpactResponse.failGoals :
PushImpactResponse.proceed;
};
}
11 changes: 8 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,9 @@
"types": "./index.d.ts",
"dependencies": {
"@atomist/automation-client": "1.3.1-master.20190326043055",
"@atomist/sdm": "^1.4.2-master.20190404124146",
"@atomist/sdm": "^1.4.2-master.20190405122526",
"@atomist/sdm-core": "1.3.1-master.20190323165808",
"@types/yamljs": "^0.2.30",
"yamljs": "^0.3.0"
},
"devDependencies": {
Expand Down

0 comments on commit 56c0b2a

Please sign in to comment.