mirror of
https://forge.chapril.org/tykayn/caisse-bliss
synced 2025-06-20 01:44:42 +02:00
add deps for js angular1.8
This commit is contained in:
parent
8e2da4f159
commit
b373892ddc
3800 changed files with 125627 additions and 40 deletions
39
.yarn/unplugged/node-gyp-npm-11.1.0-bd7044e197/node_modules/node-gyp/lib/download.js
generated
vendored
Normal file
39
.yarn/unplugged/node-gyp-npm-11.1.0-bd7044e197/node_modules/node-gyp/lib/download.js
generated
vendored
Normal file
|
@ -0,0 +1,39 @@
|
|||
const fetch = require('make-fetch-happen')
|
||||
const { promises: fs } = require('graceful-fs')
|
||||
const log = require('./log')
|
||||
|
||||
async function download (gyp, url) {
|
||||
log.http('GET', url)
|
||||
|
||||
const requestOpts = {
|
||||
headers: {
|
||||
'User-Agent': `node-gyp v${gyp.version} (node ${process.version})`,
|
||||
Connection: 'keep-alive'
|
||||
},
|
||||
proxy: gyp.opts.proxy,
|
||||
noProxy: gyp.opts.noproxy
|
||||
}
|
||||
|
||||
const cafile = gyp.opts.cafile
|
||||
if (cafile) {
|
||||
requestOpts.ca = await readCAFile(cafile)
|
||||
}
|
||||
|
||||
const res = await fetch(url, requestOpts)
|
||||
log.http(res.status, res.url)
|
||||
|
||||
return res
|
||||
}
|
||||
|
||||
async function readCAFile (filename) {
|
||||
// The CA file can contain multiple certificates so split on certificate
|
||||
// boundaries. [\S\s]*? is used to match everything including newlines.
|
||||
const ca = await fs.readFile(filename, 'utf8')
|
||||
const re = /(-----BEGIN CERTIFICATE-----[\S\s]*?-----END CERTIFICATE-----)/g
|
||||
return ca.match(re)
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
download,
|
||||
readCAFile
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue