Updated the files.

This commit is contained in:
Batuhan Berk Başoğlu 2024-02-08 19:38:41 -05:00
parent 1553e6b971
commit 753967d4f5
23418 changed files with 3784666 additions and 0 deletions

77
my-app/node_modules/karma/scripts/client.js generated vendored Executable file
View file

@ -0,0 +1,77 @@
const browserify = require('browserify')
const watchify = require('watchify')
const { createWriteStream } = require('fs')
const { readFile } = require('fs').promises
const bundleResourceToFile = (inPath, outPath) => {
return new Promise((resolve, reject) => {
browserify(inPath).bundle()
.once('error', (e) => reject(e))
.pipe(createWriteStream(outPath))
.once('finish', () => resolve())
})
}
const bundleResource = (inPath) => {
return new Promise((resolve, reject) => {
browserify(inPath).bundle((err, buffer) => {
if (err != null) {
reject(err)
return
}
resolve(buffer)
})
})
}
const watchResourceToFile = (inPath, outPath) => {
const b = browserify({
entries: [inPath],
cache: {},
packageCache: {},
plugin: [watchify]
})
const bundle = () => {
b.bundle()
.once('error', (e) => {
console.error(`Failed to bundle ${inPath} into ${outPath}.`)
console.error(e)
})
.pipe(createWriteStream(outPath))
.once('finish', () => console.log(`Bundled ${inPath} into ${outPath}.`))
}
b.on('update', bundle)
bundle()
}
const main = async () => {
if (process.argv[2] === 'build') {
await bundleResourceToFile('client/main.js', 'static/karma.js')
await bundleResourceToFile('context/main.js', 'static/context.js')
} else if (process.argv[2] === 'check') {
const expectedClient = await bundleResource('client/main.js')
const expectedContext = await bundleResource('context/main.js')
const actualClient = await readFile('static/karma.js')
const actualContext = await readFile('static/context.js')
if (Buffer.compare(expectedClient, actualClient) !== 0 || Buffer.compare(expectedContext, actualContext) !== 0) {
// eslint-disable-next-line no-throw-literal
throw 'Bundled client assets are outdated. Forgot to run "npm run build"?'
}
} else if (process.argv[2] === 'watch') {
watchResourceToFile('client/main.js', 'static/karma.js')
watchResourceToFile('context/main.js', 'static/context.js')
} else {
// eslint-disable-next-line no-throw-literal
throw `Unknown command: ${process.argv[2]}`
}
}
main().catch((err) => {
console.error(err)
process.exit(1)
})

4
my-app/node_modules/karma/scripts/integration-tests.sh generated vendored Executable file
View file

@ -0,0 +1,4 @@
PKG_FILE="$PWD/$(npm pack)"
git clone https://github.com/karma-runner/integration-tests.git --depth 1
cd integration-tests
./run.sh $PKG_FILE

50
my-app/node_modules/karma/scripts/karma-completion.sh generated vendored Executable file
View file

@ -0,0 +1,50 @@
###-begin-karma-completion-###
#
# karma command completion script
# This is stolen from npm. Thanks @isaac!
#
# Installation: karma completion >> ~/.bashrc (or ~/.zshrc)
# Or, maybe: karma completion > /usr/local/etc/bash_completion.d/karma
#
if type complete &>/dev/null; then
__karma_completion () {
local si="$IFS"
IFS=$'\n' COMPREPLY=($(COMP_CWORD="$COMP_CWORD" \
COMP_LINE="$COMP_LINE" \
COMP_POINT="$COMP_POINT" \
karma completion -- "${COMP_WORDS[@]}" \
2>/dev/null)) || return $?
IFS="$si"
}
complete -F __karma_completion karma
elif type compdef &>/dev/null; then
__karma_completion() {
si=$IFS
compadd -- $(COMP_CWORD=$((CURRENT-1)) \
COMP_LINE=$BUFFER \
COMP_POINT=0 \
karma completion -- "${words[@]}" \
2>/dev/null)
IFS=$si
}
compdef __karma_completion karma
elif type compctl &>/dev/null; then
__karma_completion () {
local cword line point words si
read -Ac words
read -cn cword
let cword-=1
read -l line
read -ln point
si="$IFS"
IFS=$'\n' reply=($(COMP_CWORD="$cword" \
COMP_LINE="$line" \
COMP_POINT="$point" \
karma completion -- "${words[@]}" \
2>/dev/null)) || return $?
IFS="$si"
}
compctl -K __karma_completion karma
fi
###-end-karma-completion-###