Updated the project.

This commit is contained in:
Batuhan Berk Başoğlu 2024-06-03 15:44:25 -04:00
parent 5dfe9f128d
commit 7919556077
1550 changed files with 17063 additions and 40183 deletions

0
my-app/node_modules/npm-registry-fetch/lib/auth.js generated vendored Executable file → Normal file
View file

4
my-app/node_modules/npm-registry-fetch/lib/check-response.js generated vendored Executable file → Normal file
View file

@ -3,8 +3,8 @@
const errors = require('./errors.js')
const { Response } = require('minipass-fetch')
const defaultOpts = require('./default-opts.js')
const log = require('proc-log')
const cleanUrl = require('./clean-url.js')
const { log } = require('proc-log')
const { redact: cleanUrl } = require('@npmcli/redact')
/* eslint-disable-next-line max-len */
const moreInfoUrl = 'https://github.com/npm/cli/wiki/No-auth-for-URI,-but-auth-present-for-scoped-registry'

View file

@ -1,27 +0,0 @@
const { URL } = require('url')
const replace = '***'
const tokenRegex = /\bnpm_[a-zA-Z0-9]{36}\b/g
const guidRegex = /\b[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\b/g
const cleanUrl = (str) => {
if (typeof str !== 'string' || !str) {
return str
}
try {
const url = new URL(str)
if (url.password) {
url.password = replace
str = url.toString()
}
} catch {
// ignore errors
}
return str
.replace(tokenRegex, `npm_${replace}`)
.replace(guidRegex, `npm_${replace}`)
}
module.exports = cleanUrl

0
my-app/node_modules/npm-registry-fetch/lib/default-opts.js generated vendored Executable file → Normal file
View file

0
my-app/node_modules/npm-registry-fetch/lib/errors.js generated vendored Executable file → Normal file
View file

5
my-app/node_modules/npm-registry-fetch/lib/index.js generated vendored Executable file → Normal file
View file

@ -10,6 +10,7 @@ const qs = require('querystring')
const url = require('url')
const zlib = require('minizlib')
const { Minipass } = require('minipass')
const { redact: cleanUrl } = require('@npmcli/redact')
const defaultOpts = require('./default-opts.js')
@ -246,4 +247,6 @@ function getHeaders (uri, auth, opts) {
return headers
}
module.exports.cleanUrl = require('./clean-url.js')
// export cleanUrl to avoid a breaking change
// TODO: next semver major remove this. Consumers should use @npmcli/redact instead
module.exports.cleanUrl = cleanUrl