Update deps

This commit is contained in:
Anton Medvedev 2023-03-28 17:15:22 +02:00
commit 363bb1be96
126 changed files with 5743 additions and 2737 deletions

39
node_modules/webpod/src/utils.ts generated vendored Normal file
View file

@ -0,0 +1,39 @@
import fs from 'node:fs'
import os from 'node:os'
import process from 'node:process'
export function isWritable(path: string): boolean {
try {
fs.accessSync(path, fs.constants.W_OK)
return true
} catch (err) {
return false
}
}
export function controlPath(host: string) {
let c = 'ssh-' + host
if ('CI' in process.env && isWritable('/dev/shm')) {
return `/dev/shm/${c}`
}
return `${os.homedir()}/.ssh/${c}`
}
export function escapeshellarg(arg: string) {
if (/^[a-z0-9/_.\-@:=]+$/i.test(arg) || arg === '') {
return arg
}
return (
`$'` +
arg
.replace(/\\/g, '\\\\')
.replace(/'/g, '\\\'')
.replace(/\f/g, '\\f')
.replace(/\n/g, '\\n')
.replace(/\r/g, '\\r')
.replace(/\t/g, '\\t')
.replace(/\v/g, '\\v')
.replace(/\0/g, '\\0') +
`'`
)
}