node_modules ignore

This commit is contained in:
2025-05-08 23:43:47 +02:00
parent e19d52f172
commit 4574544c9f
65041 changed files with 10593536 additions and 0 deletions

50
server/node_modules/purest/lib/auth.js generated vendored Normal file
View File

@@ -0,0 +1,50 @@
var cache = []
var replacer = () => {
return (key, value) => {
if (typeof value === 'object' && value.constructor.name !== 'Object') {
cache.push(value)
return '$token'
}
else {
return value
}
}
}
var reviver = () => {
var index = 0
return (key, value) => {
if (value === '$token') {
return cache[index++]
}
else {
return value
}
}
}
module.exports = (options) => {
cache = []
if (typeof options.auth === 'string' || options.auth instanceof Array) {
var index = 0
var auth = [].concat(options.auth)
options = JSON.parse(
JSON.stringify(options, replacer())
.replace(/{auth}/g, (match, offset, string) => auth[index++]),
reviver())
if (options._auth) {
options.auth = options._auth
}
else {
// conflicts with request-compose auth
delete options.auth
}
}
return options
}