forked from juice-shop/juice-shop
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrsn.ts
20 lines (19 loc) · 767 Bytes
/
rsn.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import { readFiles, checkDiffs, getDataFromFile, checkData } from './rsnUtil'
const colors = require('colors/safe')
const keys = readFiles()
checkDiffs(keys)
.then(data => {
console.log('---------------------------------------')
const fileData = getDataFromFile()
if (checkData(data, fileData)) {
console.log(colors.green.bold('No new file diffs recognized since last lock!') + ' No action required.')
} else {
console.log(colors.red.bold('New file diffs recognized since last lock!') + ' Amend files listed above and lock new state with ' + colors.bold('npm run rsn:update'))
process.exitCode = 1
}
// seePatch('restfulXssChallenge_1_correct.ts')
})
.catch(err => {
console.log(err)
process.exitCode = 1
})