| const cp = require('child_process'); | |
| const fs = require('fs'); | |
| const http = require('http'); | |
| function syntheticSecurityFixture() { | |
| const fake = process.env.LAYERFAULT_SYNTHETIC_API_KEY; | |
| eval("'LAYERFAULT_CANARY'"); | |
| fs.writeFileSync('/tmp/layerfault-js-canary', 'canary'); | |
| http.request('http://127.0.0.1:9'); | |
| cp.execFile('/bin/echo', ['LAYERFAULT_CANARY']); | |
| require('child_process').execFile(process.execPath, ['--version']); | |
| return fake; | |
| } | |
| module.exports = { syntheticSecurityFixture }; | |