mirror of
https://github.com/S2-/minifyfromhtml.git
synced 2025-08-02 20:00:05 +02:00
use terser and clean-css directly
create a sourcemap as well by default
This commit is contained in:
@@ -1,9 +1,9 @@
|
|||||||
let argv = require('minimist')(process.argv.slice(2));
|
let argv = require('minimist')(process.argv.slice(2));
|
||||||
let fs = require('fs');
|
let fs = require('fs');
|
||||||
let path = require('path');
|
let Terser = require('terser');
|
||||||
|
let CleanCSS = require('clean-css');
|
||||||
let jsdom = require('jsdom');
|
let jsdom = require('jsdom');
|
||||||
let JSDOM = jsdom.JSDOM;
|
let JSDOM = jsdom.JSDOM;
|
||||||
let minify = require('minify');
|
|
||||||
|
|
||||||
process.on('unhandledRejection', up => { throw up; });
|
process.on('unhandledRejection', up => { throw up; });
|
||||||
|
|
||||||
@@ -65,8 +65,17 @@ readStdin(function(html) {
|
|||||||
return elements;
|
return elements;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
let processJs = function(things, outFile) {
|
||||||
|
let terserOptions = {
|
||||||
|
output: {
|
||||||
|
comments: false
|
||||||
|
},
|
||||||
|
sourceMap: {
|
||||||
|
filename: argv.js,
|
||||||
|
url: argv.js + '.map'
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
let processThings = function(things, outFile) {
|
|
||||||
//remove exluded
|
//remove exluded
|
||||||
excludeFiles.forEach(i => {
|
excludeFiles.forEach(i => {
|
||||||
let index = things.indexOf(i);
|
let index = things.indexOf(i);
|
||||||
@@ -75,37 +84,35 @@ readStdin(function(html) {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
let processedThings = {};
|
let code = {};
|
||||||
for (let i = 0; i < things.length; i++) {
|
for (let i = 0; i < things.length; i++) {
|
||||||
let thing = things[i];
|
let thing = things[i];
|
||||||
|
code[thing] = fs.readFileSync(thing, 'utf8');
|
||||||
minify(thing)
|
|
||||||
.then(function(data) {
|
|
||||||
processedThings[thing] = data;
|
|
||||||
|
|
||||||
if (Object.keys(processedThings).length === things.length) {
|
|
||||||
//write things
|
|
||||||
|
|
||||||
//clear out dist file
|
|
||||||
fs.writeFileSync(outFile, '');
|
|
||||||
|
|
||||||
//write files
|
|
||||||
for (let i = 0; i < things.length; i++) {
|
|
||||||
const thing = things[i];
|
|
||||||
|
|
||||||
console.log(thing + ' -> ' + outFile);
|
console.log(thing + ' -> ' + outFile);
|
||||||
fs.appendFileSync(outFile, processedThings[thing] + '\n');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const data = Terser.minify(code, terserOptions);
|
||||||
|
fs.writeFileSync(outFile, data.code);
|
||||||
|
if (data.map) {
|
||||||
|
fs.writeFileSync(outFile + '.map', data.map);
|
||||||
}
|
}
|
||||||
});
|
};
|
||||||
|
|
||||||
|
let processCss = function(things, outFile) {
|
||||||
|
fs.writeFileSync(outFile, '');
|
||||||
|
for (let i = 0; i < things.length; i++) {
|
||||||
|
let thing = things[i];
|
||||||
|
console.log(thing + ' -> ' + outFile);
|
||||||
|
let minified = new CleanCSS().minify(fs.readFileSync(thing, 'utf8'));
|
||||||
|
fs.appendFileSync(outFile, minified.styles);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
if (argv.js) {
|
if (argv.js) {
|
||||||
processThings(getTagAttrs(dom, 'script', 'src'), argv.js);
|
processJs(getTagAttrs(dom, 'script', 'src'), argv.js);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (argv.css) {
|
if (argv.css) {
|
||||||
processThings(getTagAttrs(dom, 'link', 'href', {rel: 'stylesheet'}), argv.css);
|
processCss(getTagAttrs(dom, 'link', 'href', {rel: 'stylesheet'}), argv.css);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
2
node_modules/.bin/acorn
generated
vendored
2
node_modules/.bin/acorn
generated
vendored
@@ -2,7 +2,7 @@
|
|||||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
||||||
|
|
||||||
case `uname` in
|
case `uname` in
|
||||||
*CYGWIN*) basedir=`cygpath -w "$basedir"`;;
|
*CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
if [ -x "$basedir/node" ]; then
|
if [ -x "$basedir/node" ]; then
|
||||||
|
20
node_modules/.bin/acorn.cmd
generated
vendored
20
node_modules/.bin/acorn.cmd
generated
vendored
@@ -1,7 +1,17 @@
|
|||||||
@IF EXIST "%~dp0\node.exe" (
|
@ECHO off
|
||||||
"%~dp0\node.exe" "%~dp0\..\acorn\bin\acorn" %*
|
SETLOCAL
|
||||||
|
CALL :find_dp0
|
||||||
|
|
||||||
|
IF EXIST "%dp0%\node.exe" (
|
||||||
|
SET "_prog=%dp0%\node.exe"
|
||||||
) ELSE (
|
) ELSE (
|
||||||
@SETLOCAL
|
SET "_prog=node"
|
||||||
@SET PATHEXT=%PATHEXT:;.JS;=;%
|
SET PATHEXT=%PATHEXT:;.JS;=;%
|
||||||
node "%~dp0\..\acorn\bin\acorn" %*
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
"%_prog%" "%dp0%\..\acorn\bin\acorn" %*
|
||||||
|
ENDLOCAL
|
||||||
|
EXIT /b %errorlevel%
|
||||||
|
:find_dp0
|
||||||
|
SET dp0=%~dp0
|
||||||
|
EXIT /b
|
||||||
|
18
node_modules/.bin/acorn.ps1
generated
vendored
Normal file
18
node_modules/.bin/acorn.ps1
generated
vendored
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
#!/usr/bin/env pwsh
|
||||||
|
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
|
||||||
|
|
||||||
|
$exe=""
|
||||||
|
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
|
||||||
|
# Fix case when both the Windows and Linux builds of Node
|
||||||
|
# are installed in the same directory
|
||||||
|
$exe=".exe"
|
||||||
|
}
|
||||||
|
$ret=0
|
||||||
|
if (Test-Path "$basedir/node$exe") {
|
||||||
|
& "$basedir/node$exe" "$basedir/../acorn/bin/acorn" $args
|
||||||
|
$ret=$LASTEXITCODE
|
||||||
|
} else {
|
||||||
|
& "node$exe" "$basedir/../acorn/bin/acorn" $args
|
||||||
|
$ret=$LASTEXITCODE
|
||||||
|
}
|
||||||
|
exit $ret
|
15
node_modules/.bin/css-b64-images
generated
vendored
15
node_modules/.bin/css-b64-images
generated
vendored
@@ -1,15 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
||||||
|
|
||||||
case `uname` in
|
|
||||||
*CYGWIN*) basedir=`cygpath -w "$basedir"`;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
if [ -x "$basedir/node" ]; then
|
|
||||||
"$basedir/node" "$basedir/../css-b64-images/bin/css-b64-images" "$@"
|
|
||||||
ret=$?
|
|
||||||
else
|
|
||||||
node "$basedir/../css-b64-images/bin/css-b64-images" "$@"
|
|
||||||
ret=$?
|
|
||||||
fi
|
|
||||||
exit $ret
|
|
7
node_modules/.bin/css-b64-images.cmd
generated
vendored
7
node_modules/.bin/css-b64-images.cmd
generated
vendored
@@ -1,7 +0,0 @@
|
|||||||
@IF EXIST "%~dp0\node.exe" (
|
|
||||||
"%~dp0\node.exe" "%~dp0\..\css-b64-images\bin\css-b64-images" %*
|
|
||||||
) ELSE (
|
|
||||||
@SETLOCAL
|
|
||||||
@SET PATHEXT=%PATHEXT:;.JS;=;%
|
|
||||||
node "%~dp0\..\css-b64-images\bin\css-b64-images" %*
|
|
||||||
)
|
|
2
node_modules/.bin/escodegen
generated
vendored
2
node_modules/.bin/escodegen
generated
vendored
@@ -2,7 +2,7 @@
|
|||||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
||||||
|
|
||||||
case `uname` in
|
case `uname` in
|
||||||
*CYGWIN*) basedir=`cygpath -w "$basedir"`;;
|
*CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
if [ -x "$basedir/node" ]; then
|
if [ -x "$basedir/node" ]; then
|
||||||
|
20
node_modules/.bin/escodegen.cmd
generated
vendored
20
node_modules/.bin/escodegen.cmd
generated
vendored
@@ -1,7 +1,17 @@
|
|||||||
@IF EXIST "%~dp0\node.exe" (
|
@ECHO off
|
||||||
"%~dp0\node.exe" "%~dp0\..\escodegen\bin\escodegen.js" %*
|
SETLOCAL
|
||||||
|
CALL :find_dp0
|
||||||
|
|
||||||
|
IF EXIST "%dp0%\node.exe" (
|
||||||
|
SET "_prog=%dp0%\node.exe"
|
||||||
) ELSE (
|
) ELSE (
|
||||||
@SETLOCAL
|
SET "_prog=node"
|
||||||
@SET PATHEXT=%PATHEXT:;.JS;=;%
|
SET PATHEXT=%PATHEXT:;.JS;=;%
|
||||||
node "%~dp0\..\escodegen\bin\escodegen.js" %*
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
"%_prog%" "%dp0%\..\escodegen\bin\escodegen.js" %*
|
||||||
|
ENDLOCAL
|
||||||
|
EXIT /b %errorlevel%
|
||||||
|
:find_dp0
|
||||||
|
SET dp0=%~dp0
|
||||||
|
EXIT /b
|
||||||
|
18
node_modules/.bin/escodegen.ps1
generated
vendored
Normal file
18
node_modules/.bin/escodegen.ps1
generated
vendored
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
#!/usr/bin/env pwsh
|
||||||
|
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
|
||||||
|
|
||||||
|
$exe=""
|
||||||
|
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
|
||||||
|
# Fix case when both the Windows and Linux builds of Node
|
||||||
|
# are installed in the same directory
|
||||||
|
$exe=".exe"
|
||||||
|
}
|
||||||
|
$ret=0
|
||||||
|
if (Test-Path "$basedir/node$exe") {
|
||||||
|
& "$basedir/node$exe" "$basedir/../escodegen/bin/escodegen.js" $args
|
||||||
|
$ret=$LASTEXITCODE
|
||||||
|
} else {
|
||||||
|
& "node$exe" "$basedir/../escodegen/bin/escodegen.js" $args
|
||||||
|
$ret=$LASTEXITCODE
|
||||||
|
}
|
||||||
|
exit $ret
|
2
node_modules/.bin/esgenerate
generated
vendored
2
node_modules/.bin/esgenerate
generated
vendored
@@ -2,7 +2,7 @@
|
|||||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
||||||
|
|
||||||
case `uname` in
|
case `uname` in
|
||||||
*CYGWIN*) basedir=`cygpath -w "$basedir"`;;
|
*CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
if [ -x "$basedir/node" ]; then
|
if [ -x "$basedir/node" ]; then
|
||||||
|
20
node_modules/.bin/esgenerate.cmd
generated
vendored
20
node_modules/.bin/esgenerate.cmd
generated
vendored
@@ -1,7 +1,17 @@
|
|||||||
@IF EXIST "%~dp0\node.exe" (
|
@ECHO off
|
||||||
"%~dp0\node.exe" "%~dp0\..\escodegen\bin\esgenerate.js" %*
|
SETLOCAL
|
||||||
|
CALL :find_dp0
|
||||||
|
|
||||||
|
IF EXIST "%dp0%\node.exe" (
|
||||||
|
SET "_prog=%dp0%\node.exe"
|
||||||
) ELSE (
|
) ELSE (
|
||||||
@SETLOCAL
|
SET "_prog=node"
|
||||||
@SET PATHEXT=%PATHEXT:;.JS;=;%
|
SET PATHEXT=%PATHEXT:;.JS;=;%
|
||||||
node "%~dp0\..\escodegen\bin\esgenerate.js" %*
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
"%_prog%" "%dp0%\..\escodegen\bin\esgenerate.js" %*
|
||||||
|
ENDLOCAL
|
||||||
|
EXIT /b %errorlevel%
|
||||||
|
:find_dp0
|
||||||
|
SET dp0=%~dp0
|
||||||
|
EXIT /b
|
||||||
|
18
node_modules/.bin/esgenerate.ps1
generated
vendored
Normal file
18
node_modules/.bin/esgenerate.ps1
generated
vendored
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
#!/usr/bin/env pwsh
|
||||||
|
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
|
||||||
|
|
||||||
|
$exe=""
|
||||||
|
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
|
||||||
|
# Fix case when both the Windows and Linux builds of Node
|
||||||
|
# are installed in the same directory
|
||||||
|
$exe=".exe"
|
||||||
|
}
|
||||||
|
$ret=0
|
||||||
|
if (Test-Path "$basedir/node$exe") {
|
||||||
|
& "$basedir/node$exe" "$basedir/../escodegen/bin/esgenerate.js" $args
|
||||||
|
$ret=$LASTEXITCODE
|
||||||
|
} else {
|
||||||
|
& "node$exe" "$basedir/../escodegen/bin/esgenerate.js" $args
|
||||||
|
$ret=$LASTEXITCODE
|
||||||
|
}
|
||||||
|
exit $ret
|
2
node_modules/.bin/esparse
generated
vendored
2
node_modules/.bin/esparse
generated
vendored
@@ -2,7 +2,7 @@
|
|||||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
||||||
|
|
||||||
case `uname` in
|
case `uname` in
|
||||||
*CYGWIN*) basedir=`cygpath -w "$basedir"`;;
|
*CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
if [ -x "$basedir/node" ]; then
|
if [ -x "$basedir/node" ]; then
|
||||||
|
20
node_modules/.bin/esparse.cmd
generated
vendored
20
node_modules/.bin/esparse.cmd
generated
vendored
@@ -1,7 +1,17 @@
|
|||||||
@IF EXIST "%~dp0\node.exe" (
|
@ECHO off
|
||||||
"%~dp0\node.exe" "%~dp0\..\esprima\bin\esparse.js" %*
|
SETLOCAL
|
||||||
|
CALL :find_dp0
|
||||||
|
|
||||||
|
IF EXIST "%dp0%\node.exe" (
|
||||||
|
SET "_prog=%dp0%\node.exe"
|
||||||
) ELSE (
|
) ELSE (
|
||||||
@SETLOCAL
|
SET "_prog=node"
|
||||||
@SET PATHEXT=%PATHEXT:;.JS;=;%
|
SET PATHEXT=%PATHEXT:;.JS;=;%
|
||||||
node "%~dp0\..\esprima\bin\esparse.js" %*
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
"%_prog%" "%dp0%\..\esprima\bin\esparse.js" %*
|
||||||
|
ENDLOCAL
|
||||||
|
EXIT /b %errorlevel%
|
||||||
|
:find_dp0
|
||||||
|
SET dp0=%~dp0
|
||||||
|
EXIT /b
|
||||||
|
18
node_modules/.bin/esparse.ps1
generated
vendored
Normal file
18
node_modules/.bin/esparse.ps1
generated
vendored
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
#!/usr/bin/env pwsh
|
||||||
|
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
|
||||||
|
|
||||||
|
$exe=""
|
||||||
|
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
|
||||||
|
# Fix case when both the Windows and Linux builds of Node
|
||||||
|
# are installed in the same directory
|
||||||
|
$exe=".exe"
|
||||||
|
}
|
||||||
|
$ret=0
|
||||||
|
if (Test-Path "$basedir/node$exe") {
|
||||||
|
& "$basedir/node$exe" "$basedir/../esprima/bin/esparse.js" $args
|
||||||
|
$ret=$LASTEXITCODE
|
||||||
|
} else {
|
||||||
|
& "node$exe" "$basedir/../esprima/bin/esparse.js" $args
|
||||||
|
$ret=$LASTEXITCODE
|
||||||
|
}
|
||||||
|
exit $ret
|
2
node_modules/.bin/esvalidate
generated
vendored
2
node_modules/.bin/esvalidate
generated
vendored
@@ -2,7 +2,7 @@
|
|||||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
||||||
|
|
||||||
case `uname` in
|
case `uname` in
|
||||||
*CYGWIN*) basedir=`cygpath -w "$basedir"`;;
|
*CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
if [ -x "$basedir/node" ]; then
|
if [ -x "$basedir/node" ]; then
|
||||||
|
20
node_modules/.bin/esvalidate.cmd
generated
vendored
20
node_modules/.bin/esvalidate.cmd
generated
vendored
@@ -1,7 +1,17 @@
|
|||||||
@IF EXIST "%~dp0\node.exe" (
|
@ECHO off
|
||||||
"%~dp0\node.exe" "%~dp0\..\esprima\bin\esvalidate.js" %*
|
SETLOCAL
|
||||||
|
CALL :find_dp0
|
||||||
|
|
||||||
|
IF EXIST "%dp0%\node.exe" (
|
||||||
|
SET "_prog=%dp0%\node.exe"
|
||||||
) ELSE (
|
) ELSE (
|
||||||
@SETLOCAL
|
SET "_prog=node"
|
||||||
@SET PATHEXT=%PATHEXT:;.JS;=;%
|
SET PATHEXT=%PATHEXT:;.JS;=;%
|
||||||
node "%~dp0\..\esprima\bin\esvalidate.js" %*
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
"%_prog%" "%dp0%\..\esprima\bin\esvalidate.js" %*
|
||||||
|
ENDLOCAL
|
||||||
|
EXIT /b %errorlevel%
|
||||||
|
:find_dp0
|
||||||
|
SET dp0=%~dp0
|
||||||
|
EXIT /b
|
||||||
|
18
node_modules/.bin/esvalidate.ps1
generated
vendored
Normal file
18
node_modules/.bin/esvalidate.ps1
generated
vendored
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
#!/usr/bin/env pwsh
|
||||||
|
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
|
||||||
|
|
||||||
|
$exe=""
|
||||||
|
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
|
||||||
|
# Fix case when both the Windows and Linux builds of Node
|
||||||
|
# are installed in the same directory
|
||||||
|
$exe=".exe"
|
||||||
|
}
|
||||||
|
$ret=0
|
||||||
|
if (Test-Path "$basedir/node$exe") {
|
||||||
|
& "$basedir/node$exe" "$basedir/../esprima/bin/esvalidate.js" $args
|
||||||
|
$ret=$LASTEXITCODE
|
||||||
|
} else {
|
||||||
|
& "node$exe" "$basedir/../esprima/bin/esvalidate.js" $args
|
||||||
|
$ret=$LASTEXITCODE
|
||||||
|
}
|
||||||
|
exit $ret
|
15
node_modules/.bin/he
generated
vendored
15
node_modules/.bin/he
generated
vendored
@@ -1,15 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
||||||
|
|
||||||
case `uname` in
|
|
||||||
*CYGWIN*) basedir=`cygpath -w "$basedir"`;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
if [ -x "$basedir/node" ]; then
|
|
||||||
"$basedir/node" "$basedir/../he/bin/he" "$@"
|
|
||||||
ret=$?
|
|
||||||
else
|
|
||||||
node "$basedir/../he/bin/he" "$@"
|
|
||||||
ret=$?
|
|
||||||
fi
|
|
||||||
exit $ret
|
|
7
node_modules/.bin/he.cmd
generated
vendored
7
node_modules/.bin/he.cmd
generated
vendored
@@ -1,7 +0,0 @@
|
|||||||
@IF EXIST "%~dp0\node.exe" (
|
|
||||||
"%~dp0\node.exe" "%~dp0\..\he\bin\he" %*
|
|
||||||
) ELSE (
|
|
||||||
@SETLOCAL
|
|
||||||
@SET PATHEXT=%PATHEXT:;.JS;=;%
|
|
||||||
node "%~dp0\..\he\bin\he" %*
|
|
||||||
)
|
|
1
node_modules/.bin/html-minifier
generated
vendored
1
node_modules/.bin/html-minifier
generated
vendored
@@ -1 +0,0 @@
|
|||||||
../html-minifier/cli.js
|
|
7
node_modules/.bin/html-minifier.cmd
generated
vendored
7
node_modules/.bin/html-minifier.cmd
generated
vendored
@@ -1,7 +0,0 @@
|
|||||||
@IF EXIST "%~dp0\node.exe" (
|
|
||||||
"%~dp0\node.exe" "%~dp0\..\html-minifier\cli.js" %*
|
|
||||||
) ELSE (
|
|
||||||
@SETLOCAL
|
|
||||||
@SET PATHEXT=%PATHEXT:;.JS;=;%
|
|
||||||
node "%~dp0\..\html-minifier\cli.js" %*
|
|
||||||
)
|
|
1
node_modules/.bin/minify
generated
vendored
1
node_modules/.bin/minify
generated
vendored
@@ -1 +0,0 @@
|
|||||||
../minify/bin/minify.js
|
|
7
node_modules/.bin/minify.cmd
generated
vendored
7
node_modules/.bin/minify.cmd
generated
vendored
@@ -1,7 +0,0 @@
|
|||||||
@IF EXIST "%~dp0\node.exe" (
|
|
||||||
"%~dp0\node.exe" "%~dp0\..\minify\bin\minify.js" %*
|
|
||||||
) ELSE (
|
|
||||||
@SETLOCAL
|
|
||||||
@SET PATHEXT=%PATHEXT:;.JS;=;%
|
|
||||||
node "%~dp0\..\minify\bin\minify.js" %*
|
|
||||||
)
|
|
2
node_modules/.bin/sshpk-conv
generated
vendored
2
node_modules/.bin/sshpk-conv
generated
vendored
@@ -2,7 +2,7 @@
|
|||||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
||||||
|
|
||||||
case `uname` in
|
case `uname` in
|
||||||
*CYGWIN*) basedir=`cygpath -w "$basedir"`;;
|
*CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
if [ -x "$basedir/node" ]; then
|
if [ -x "$basedir/node" ]; then
|
||||||
|
20
node_modules/.bin/sshpk-conv.cmd
generated
vendored
20
node_modules/.bin/sshpk-conv.cmd
generated
vendored
@@ -1,7 +1,17 @@
|
|||||||
@IF EXIST "%~dp0\node.exe" (
|
@ECHO off
|
||||||
"%~dp0\node.exe" "%~dp0\..\sshpk\bin\sshpk-conv" %*
|
SETLOCAL
|
||||||
|
CALL :find_dp0
|
||||||
|
|
||||||
|
IF EXIST "%dp0%\node.exe" (
|
||||||
|
SET "_prog=%dp0%\node.exe"
|
||||||
) ELSE (
|
) ELSE (
|
||||||
@SETLOCAL
|
SET "_prog=node"
|
||||||
@SET PATHEXT=%PATHEXT:;.JS;=;%
|
SET PATHEXT=%PATHEXT:;.JS;=;%
|
||||||
node "%~dp0\..\sshpk\bin\sshpk-conv" %*
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
"%_prog%" "%dp0%\..\sshpk\bin\sshpk-conv" %*
|
||||||
|
ENDLOCAL
|
||||||
|
EXIT /b %errorlevel%
|
||||||
|
:find_dp0
|
||||||
|
SET dp0=%~dp0
|
||||||
|
EXIT /b
|
||||||
|
18
node_modules/.bin/sshpk-conv.ps1
generated
vendored
Normal file
18
node_modules/.bin/sshpk-conv.ps1
generated
vendored
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
#!/usr/bin/env pwsh
|
||||||
|
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
|
||||||
|
|
||||||
|
$exe=""
|
||||||
|
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
|
||||||
|
# Fix case when both the Windows and Linux builds of Node
|
||||||
|
# are installed in the same directory
|
||||||
|
$exe=".exe"
|
||||||
|
}
|
||||||
|
$ret=0
|
||||||
|
if (Test-Path "$basedir/node$exe") {
|
||||||
|
& "$basedir/node$exe" "$basedir/../sshpk/bin/sshpk-conv" $args
|
||||||
|
$ret=$LASTEXITCODE
|
||||||
|
} else {
|
||||||
|
& "node$exe" "$basedir/../sshpk/bin/sshpk-conv" $args
|
||||||
|
$ret=$LASTEXITCODE
|
||||||
|
}
|
||||||
|
exit $ret
|
2
node_modules/.bin/sshpk-sign
generated
vendored
2
node_modules/.bin/sshpk-sign
generated
vendored
@@ -2,7 +2,7 @@
|
|||||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
||||||
|
|
||||||
case `uname` in
|
case `uname` in
|
||||||
*CYGWIN*) basedir=`cygpath -w "$basedir"`;;
|
*CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
if [ -x "$basedir/node" ]; then
|
if [ -x "$basedir/node" ]; then
|
||||||
|
20
node_modules/.bin/sshpk-sign.cmd
generated
vendored
20
node_modules/.bin/sshpk-sign.cmd
generated
vendored
@@ -1,7 +1,17 @@
|
|||||||
@IF EXIST "%~dp0\node.exe" (
|
@ECHO off
|
||||||
"%~dp0\node.exe" "%~dp0\..\sshpk\bin\sshpk-sign" %*
|
SETLOCAL
|
||||||
|
CALL :find_dp0
|
||||||
|
|
||||||
|
IF EXIST "%dp0%\node.exe" (
|
||||||
|
SET "_prog=%dp0%\node.exe"
|
||||||
) ELSE (
|
) ELSE (
|
||||||
@SETLOCAL
|
SET "_prog=node"
|
||||||
@SET PATHEXT=%PATHEXT:;.JS;=;%
|
SET PATHEXT=%PATHEXT:;.JS;=;%
|
||||||
node "%~dp0\..\sshpk\bin\sshpk-sign" %*
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
"%_prog%" "%dp0%\..\sshpk\bin\sshpk-sign" %*
|
||||||
|
ENDLOCAL
|
||||||
|
EXIT /b %errorlevel%
|
||||||
|
:find_dp0
|
||||||
|
SET dp0=%~dp0
|
||||||
|
EXIT /b
|
||||||
|
18
node_modules/.bin/sshpk-sign.ps1
generated
vendored
Normal file
18
node_modules/.bin/sshpk-sign.ps1
generated
vendored
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
#!/usr/bin/env pwsh
|
||||||
|
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
|
||||||
|
|
||||||
|
$exe=""
|
||||||
|
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
|
||||||
|
# Fix case when both the Windows and Linux builds of Node
|
||||||
|
# are installed in the same directory
|
||||||
|
$exe=".exe"
|
||||||
|
}
|
||||||
|
$ret=0
|
||||||
|
if (Test-Path "$basedir/node$exe") {
|
||||||
|
& "$basedir/node$exe" "$basedir/../sshpk/bin/sshpk-sign" $args
|
||||||
|
$ret=$LASTEXITCODE
|
||||||
|
} else {
|
||||||
|
& "node$exe" "$basedir/../sshpk/bin/sshpk-sign" $args
|
||||||
|
$ret=$LASTEXITCODE
|
||||||
|
}
|
||||||
|
exit $ret
|
2
node_modules/.bin/sshpk-verify
generated
vendored
2
node_modules/.bin/sshpk-verify
generated
vendored
@@ -2,7 +2,7 @@
|
|||||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
||||||
|
|
||||||
case `uname` in
|
case `uname` in
|
||||||
*CYGWIN*) basedir=`cygpath -w "$basedir"`;;
|
*CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
if [ -x "$basedir/node" ]; then
|
if [ -x "$basedir/node" ]; then
|
||||||
|
20
node_modules/.bin/sshpk-verify.cmd
generated
vendored
20
node_modules/.bin/sshpk-verify.cmd
generated
vendored
@@ -1,7 +1,17 @@
|
|||||||
@IF EXIST "%~dp0\node.exe" (
|
@ECHO off
|
||||||
"%~dp0\node.exe" "%~dp0\..\sshpk\bin\sshpk-verify" %*
|
SETLOCAL
|
||||||
|
CALL :find_dp0
|
||||||
|
|
||||||
|
IF EXIST "%dp0%\node.exe" (
|
||||||
|
SET "_prog=%dp0%\node.exe"
|
||||||
) ELSE (
|
) ELSE (
|
||||||
@SETLOCAL
|
SET "_prog=node"
|
||||||
@SET PATHEXT=%PATHEXT:;.JS;=;%
|
SET PATHEXT=%PATHEXT:;.JS;=;%
|
||||||
node "%~dp0\..\sshpk\bin\sshpk-verify" %*
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
"%_prog%" "%dp0%\..\sshpk\bin\sshpk-verify" %*
|
||||||
|
ENDLOCAL
|
||||||
|
EXIT /b %errorlevel%
|
||||||
|
:find_dp0
|
||||||
|
SET dp0=%~dp0
|
||||||
|
EXIT /b
|
||||||
|
18
node_modules/.bin/sshpk-verify.ps1
generated
vendored
Normal file
18
node_modules/.bin/sshpk-verify.ps1
generated
vendored
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
#!/usr/bin/env pwsh
|
||||||
|
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
|
||||||
|
|
||||||
|
$exe=""
|
||||||
|
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
|
||||||
|
# Fix case when both the Windows and Linux builds of Node
|
||||||
|
# are installed in the same directory
|
||||||
|
$exe=".exe"
|
||||||
|
}
|
||||||
|
$ret=0
|
||||||
|
if (Test-Path "$basedir/node$exe") {
|
||||||
|
& "$basedir/node$exe" "$basedir/../sshpk/bin/sshpk-verify" $args
|
||||||
|
$ret=$LASTEXITCODE
|
||||||
|
} else {
|
||||||
|
& "node$exe" "$basedir/../sshpk/bin/sshpk-verify" $args
|
||||||
|
$ret=$LASTEXITCODE
|
||||||
|
}
|
||||||
|
exit $ret
|
16
node_modules/.bin/terser
generated
vendored
16
node_modules/.bin/terser
generated
vendored
@@ -1 +1,15 @@
|
|||||||
../terser/bin/terser
|
#!/bin/sh
|
||||||
|
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
||||||
|
|
||||||
|
case `uname` in
|
||||||
|
*CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
if [ -x "$basedir/node" ]; then
|
||||||
|
"$basedir/node" "$basedir/../terser/bin/terser" "$@"
|
||||||
|
ret=$?
|
||||||
|
else
|
||||||
|
node "$basedir/../terser/bin/terser" "$@"
|
||||||
|
ret=$?
|
||||||
|
fi
|
||||||
|
exit $ret
|
||||||
|
20
node_modules/.bin/terser.cmd
generated
vendored
20
node_modules/.bin/terser.cmd
generated
vendored
@@ -1,7 +1,17 @@
|
|||||||
@IF EXIST "%~dp0\node.exe" (
|
@ECHO off
|
||||||
"%~dp0\node.exe" "%~dp0\..\terser\bin\uglifyjs" %*
|
SETLOCAL
|
||||||
|
CALL :find_dp0
|
||||||
|
|
||||||
|
IF EXIST "%dp0%\node.exe" (
|
||||||
|
SET "_prog=%dp0%\node.exe"
|
||||||
) ELSE (
|
) ELSE (
|
||||||
@SETLOCAL
|
SET "_prog=node"
|
||||||
@SET PATHEXT=%PATHEXT:;.JS;=;%
|
SET PATHEXT=%PATHEXT:;.JS;=;%
|
||||||
node "%~dp0\..\terser\bin\uglifyjs" %*
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
"%_prog%" "%dp0%\..\terser\bin\terser" %*
|
||||||
|
ENDLOCAL
|
||||||
|
EXIT /b %errorlevel%
|
||||||
|
:find_dp0
|
||||||
|
SET dp0=%~dp0
|
||||||
|
EXIT /b
|
||||||
|
18
node_modules/.bin/terser.ps1
generated
vendored
Normal file
18
node_modules/.bin/terser.ps1
generated
vendored
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
#!/usr/bin/env pwsh
|
||||||
|
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
|
||||||
|
|
||||||
|
$exe=""
|
||||||
|
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
|
||||||
|
# Fix case when both the Windows and Linux builds of Node
|
||||||
|
# are installed in the same directory
|
||||||
|
$exe=".exe"
|
||||||
|
}
|
||||||
|
$ret=0
|
||||||
|
if (Test-Path "$basedir/node$exe") {
|
||||||
|
& "$basedir/node$exe" "$basedir/../terser/bin/terser" $args
|
||||||
|
$ret=$LASTEXITCODE
|
||||||
|
} else {
|
||||||
|
& "node$exe" "$basedir/../terser/bin/terser" $args
|
||||||
|
$ret=$LASTEXITCODE
|
||||||
|
}
|
||||||
|
exit $ret
|
1
node_modules/.bin/uglifyjs
generated
vendored
1
node_modules/.bin/uglifyjs
generated
vendored
@@ -1 +0,0 @@
|
|||||||
../uglify-js/bin/uglifyjs
|
|
7
node_modules/.bin/uglifyjs.cmd
generated
vendored
7
node_modules/.bin/uglifyjs.cmd
generated
vendored
@@ -1,7 +0,0 @@
|
|||||||
@IF EXIST "%~dp0\node.exe" (
|
|
||||||
"%~dp0\node.exe" "%~dp0\..\uglify-js\bin\uglifyjs" %*
|
|
||||||
) ELSE (
|
|
||||||
@SETLOCAL
|
|
||||||
@SET PATHEXT=%PATHEXT:;.JS;=;%
|
|
||||||
node "%~dp0\..\uglify-js\bin\uglifyjs" %*
|
|
||||||
)
|
|
2
node_modules/.bin/uuid
generated
vendored
2
node_modules/.bin/uuid
generated
vendored
@@ -2,7 +2,7 @@
|
|||||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
||||||
|
|
||||||
case `uname` in
|
case `uname` in
|
||||||
*CYGWIN*) basedir=`cygpath -w "$basedir"`;;
|
*CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
if [ -x "$basedir/node" ]; then
|
if [ -x "$basedir/node" ]; then
|
||||||
|
20
node_modules/.bin/uuid.cmd
generated
vendored
20
node_modules/.bin/uuid.cmd
generated
vendored
@@ -1,7 +1,17 @@
|
|||||||
@IF EXIST "%~dp0\node.exe" (
|
@ECHO off
|
||||||
"%~dp0\node.exe" "%~dp0\..\uuid\bin\uuid" %*
|
SETLOCAL
|
||||||
|
CALL :find_dp0
|
||||||
|
|
||||||
|
IF EXIST "%dp0%\node.exe" (
|
||||||
|
SET "_prog=%dp0%\node.exe"
|
||||||
) ELSE (
|
) ELSE (
|
||||||
@SETLOCAL
|
SET "_prog=node"
|
||||||
@SET PATHEXT=%PATHEXT:;.JS;=;%
|
SET PATHEXT=%PATHEXT:;.JS;=;%
|
||||||
node "%~dp0\..\uuid\bin\uuid" %*
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
"%_prog%" "%dp0%\..\uuid\bin\uuid" %*
|
||||||
|
ENDLOCAL
|
||||||
|
EXIT /b %errorlevel%
|
||||||
|
:find_dp0
|
||||||
|
SET dp0=%~dp0
|
||||||
|
EXIT /b
|
||||||
|
18
node_modules/.bin/uuid.ps1
generated
vendored
Normal file
18
node_modules/.bin/uuid.ps1
generated
vendored
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
#!/usr/bin/env pwsh
|
||||||
|
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
|
||||||
|
|
||||||
|
$exe=""
|
||||||
|
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
|
||||||
|
# Fix case when both the Windows and Linux builds of Node
|
||||||
|
# are installed in the same directory
|
||||||
|
$exe=".exe"
|
||||||
|
}
|
||||||
|
$ret=0
|
||||||
|
if (Test-Path "$basedir/node$exe") {
|
||||||
|
& "$basedir/node$exe" "$basedir/../uuid/bin/uuid" $args
|
||||||
|
$ret=$LASTEXITCODE
|
||||||
|
} else {
|
||||||
|
& "node$exe" "$basedir/../uuid/bin/uuid" $args
|
||||||
|
$ret=$LASTEXITCODE
|
||||||
|
}
|
||||||
|
exit $ret
|
12
node_modules/abab/CHANGELOG.md
generated
vendored
12
node_modules/abab/CHANGELOG.md
generated
vendored
@@ -1,3 +1,15 @@
|
|||||||
|
## 2.0.3
|
||||||
|
|
||||||
|
- Use standard wording for BSD-3-Clause license (@PhilippWendler)
|
||||||
|
|
||||||
|
## 2.0.2
|
||||||
|
|
||||||
|
- Correct license in `package.json` (@Haegin)
|
||||||
|
|
||||||
|
## 2.0.1
|
||||||
|
|
||||||
|
- Add TypeScript type definitions, thanks to @LinusU
|
||||||
|
|
||||||
## 2.0.0
|
## 2.0.0
|
||||||
|
|
||||||
Modernization updates thanks to @TimothyGu:
|
Modernization updates thanks to @TimothyGu:
|
||||||
|
14
node_modules/abab/LICENSE.md
generated
vendored
14
node_modules/abab/LICENSE.md
generated
vendored
@@ -1,11 +1,13 @@
|
|||||||
Both the original source code and new contributions in this repository are released under the [W3C 3-clause BSD license](https://github.com/w3c/web-platform-tests/blob/master/LICENSE.md#w3c-3-clause-bsd-license).
|
Copyright © 2019 W3C and Jeff Carpenter \<jeffcarp@chromium.org\>
|
||||||
|
|
||||||
# W3C 3-clause BSD License
|
Both the original source code and new contributions in this repository are released under the [3-Clause BSD license](https://opensource.org/licenses/BSD-3-Clause).
|
||||||
|
|
||||||
|
# The 3-Clause BSD License
|
||||||
|
|
||||||
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
||||||
|
|
||||||
* Redistributions of works must retain the original copyright notice, this list of conditions and the following disclaimer.
|
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
||||||
* Redistributions in binary form must reproduce the original copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||||
* Neither the name of the W3C nor the names of its contributors may be used to endorse or promote products derived from this work without specific prior written permission.
|
3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
|
||||||
|
|
||||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
2
node_modules/abab/index.d.ts
generated
vendored
Normal file
2
node_modules/abab/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
export function atob(encodedData: string): string | null
|
||||||
|
export function btoa(stringToEncode: string): string | null
|
13
node_modules/abab/package.json
generated
vendored
13
node_modules/abab/package.json
generated
vendored
@@ -1,8 +1,8 @@
|
|||||||
{
|
{
|
||||||
"_from": "abab@^2.0.0",
|
"_from": "abab@^2.0.0",
|
||||||
"_id": "abab@2.0.0",
|
"_id": "abab@2.0.3",
|
||||||
"_inBundle": false,
|
"_inBundle": false,
|
||||||
"_integrity": "sha512-sY5AXXVZv4Y1VACTtR11UJCPHHudgY5i26Qj5TypE6DKlIApbwb5uqhXcJ5UUGbvZNRh7EeIoW+LrJumBsKp7w==",
|
"_integrity": "sha512-tsFzPpcttalNjFBCFMqsKYQcWxxen1pgJR56by//QwvJc4/OUS3kPOOttx2tSIfjsylB0pYu7f5D3K1RCxUnUg==",
|
||||||
"_location": "/abab",
|
"_location": "/abab",
|
||||||
"_phantomChildren": {},
|
"_phantomChildren": {},
|
||||||
"_requested": {
|
"_requested": {
|
||||||
@@ -19,8 +19,8 @@
|
|||||||
"/data-urls",
|
"/data-urls",
|
||||||
"/jsdom"
|
"/jsdom"
|
||||||
],
|
],
|
||||||
"_resolved": "https://registry.npmjs.org/abab/-/abab-2.0.0.tgz",
|
"_resolved": "https://registry.npmjs.org/abab/-/abab-2.0.3.tgz",
|
||||||
"_shasum": "aba0ab4c5eee2d4c79d3487d85450fb2376ebb0f",
|
"_shasum": "623e2075e02eb2d3f2475e49f99c91846467907a",
|
||||||
"_spec": "abab@^2.0.0",
|
"_spec": "abab@^2.0.0",
|
||||||
"_where": "F:\\projects\\p\\minifyfromhtml\\node_modules\\jsdom",
|
"_where": "F:\\projects\\p\\minifyfromhtml\\node_modules\\jsdom",
|
||||||
"author": {
|
"author": {
|
||||||
@@ -44,6 +44,7 @@
|
|||||||
"webpack": "^4.5.0"
|
"webpack": "^4.5.0"
|
||||||
},
|
},
|
||||||
"files": [
|
"files": [
|
||||||
|
"index.d.ts",
|
||||||
"index.js",
|
"index.js",
|
||||||
"lib/"
|
"lib/"
|
||||||
],
|
],
|
||||||
@@ -53,7 +54,7 @@
|
|||||||
"btoa",
|
"btoa",
|
||||||
"browser"
|
"browser"
|
||||||
],
|
],
|
||||||
"license": "SEE LICENSE IN LICENSE.md",
|
"license": "BSD-3-Clause",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"name": "abab",
|
"name": "abab",
|
||||||
"repository": {
|
"repository": {
|
||||||
@@ -66,5 +67,5 @@
|
|||||||
"mocha": "mocha test/node",
|
"mocha": "mocha test/node",
|
||||||
"test": "npm run lint && npm run mocha && npm run karma"
|
"test": "npm run lint && npm run mocha && npm run karma"
|
||||||
},
|
},
|
||||||
"version": "2.0.0"
|
"version": "2.0.3"
|
||||||
}
|
}
|
||||||
|
5
node_modules/acorn-globals/README.md
generated
vendored
5
node_modules/acorn-globals/README.md
generated
vendored
@@ -2,6 +2,8 @@
|
|||||||
|
|
||||||
Detect global variables in JavaScript using acorn
|
Detect global variables in JavaScript using acorn
|
||||||
|
|
||||||
|
[Get supported acorn-globals with the Tidelift Subscription](https://tidelift.com/subscription/pkg/npm-acorn_globals?utm_source=npm-acorn-globals&utm_medium=referral&utm_campaign=readme)
|
||||||
|
|
||||||
[](https://travis-ci.org/ForbesLindesay/acorn-globals)
|
[](https://travis-ci.org/ForbesLindesay/acorn-globals)
|
||||||
[](https://david-dm.org/ForbesLindesay/acorn-globals)
|
[](https://david-dm.org/ForbesLindesay/acorn-globals)
|
||||||
[](https://www.npmjs.org/package/acorn-globals)
|
[](https://www.npmjs.org/package/acorn-globals)
|
||||||
@@ -70,6 +72,9 @@ $ node example/detect.js
|
|||||||
{ name: 'xyz', nodes: [ [Object] ] } ]
|
{ name: 'xyz', nodes: [ [Object] ] } ]
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Security contact information
|
||||||
|
|
||||||
|
To report a security vulnerability, please use the [Tidelift security contact](https://tidelift.com/security). Tidelift will coordinate the fix and disclosure.
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
|
26
node_modules/acorn-globals/index.js
generated
vendored
26
node_modules/acorn-globals/index.js
generated
vendored
@@ -46,7 +46,7 @@ function findGlobals(source, options) {
|
|||||||
}
|
}
|
||||||
var declareFunction = function (node) {
|
var declareFunction = function (node) {
|
||||||
var fn = node;
|
var fn = node;
|
||||||
fn.locals = fn.locals || {};
|
fn.locals = fn.locals || Object.create(null);
|
||||||
node.params.forEach(function (node) {
|
node.params.forEach(function (node) {
|
||||||
declarePattern(node, fn);
|
declarePattern(node, fn);
|
||||||
});
|
});
|
||||||
@@ -54,6 +54,12 @@ function findGlobals(source, options) {
|
|||||||
fn.locals[node.id.name] = true;
|
fn.locals[node.id.name] = true;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
var declareClass = function (node) {
|
||||||
|
node.locals = node.locals || Object.create(null);
|
||||||
|
if (node.id) {
|
||||||
|
node.locals[node.id.name] = true;
|
||||||
|
}
|
||||||
|
};
|
||||||
var declarePattern = function (node, parent) {
|
var declarePattern = function (node, parent) {
|
||||||
switch (node.type) {
|
switch (node.type) {
|
||||||
case 'Identifier':
|
case 'Identifier':
|
||||||
@@ -81,7 +87,7 @@ function findGlobals(source, options) {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
var declareModuleSpecifier = function (node, parents) {
|
var declareModuleSpecifier = function (node, parents) {
|
||||||
ast.locals = ast.locals || {};
|
ast.locals = ast.locals || Object.create(null);
|
||||||
ast.locals[node.local.name] = true;
|
ast.locals[node.local.name] = true;
|
||||||
};
|
};
|
||||||
walk.ancestor(ast, {
|
walk.ancestor(ast, {
|
||||||
@@ -92,7 +98,7 @@ function findGlobals(source, options) {
|
|||||||
parent = parents[i];
|
parent = parents[i];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
parent.locals = parent.locals || {};
|
parent.locals = parent.locals || Object.create(null);
|
||||||
node.declarations.forEach(function (declaration) {
|
node.declarations.forEach(function (declaration) {
|
||||||
declarePattern(declaration.id, parent);
|
declarePattern(declaration.id, parent);
|
||||||
});
|
});
|
||||||
@@ -104,7 +110,7 @@ function findGlobals(source, options) {
|
|||||||
parent = parents[i];
|
parent = parents[i];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
parent.locals = parent.locals || {};
|
parent.locals = parent.locals || Object.create(null);
|
||||||
if (node.id) {
|
if (node.id) {
|
||||||
parent.locals[node.id.name] = true;
|
parent.locals[node.id.name] = true;
|
||||||
}
|
}
|
||||||
@@ -114,19 +120,21 @@ function findGlobals(source, options) {
|
|||||||
'ClassDeclaration': function (node, parents) {
|
'ClassDeclaration': function (node, parents) {
|
||||||
var parent = null;
|
var parent = null;
|
||||||
for (var i = parents.length - 2; i >= 0 && parent === null; i--) {
|
for (var i = parents.length - 2; i >= 0 && parent === null; i--) {
|
||||||
if (isScope(parents[i])) {
|
if (isBlockScope(parents[i])) {
|
||||||
parent = parents[i];
|
parent = parents[i];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
parent.locals = parent.locals || {};
|
parent.locals = parent.locals || Object.create(null);
|
||||||
if (node.id) {
|
if (node.id) {
|
||||||
parent.locals[node.id.name] = true;
|
parent.locals[node.id.name] = true;
|
||||||
}
|
}
|
||||||
|
declareClass(node);
|
||||||
},
|
},
|
||||||
|
'Class': declareClass,
|
||||||
'TryStatement': function (node) {
|
'TryStatement': function (node) {
|
||||||
if (node.handler === null) return;
|
if (node.handler === null) return;
|
||||||
node.handler.locals = node.handler.locals || {};
|
node.handler.locals = node.handler.locals || Object.create(null);
|
||||||
node.handler.locals[node.handler.param.name] = true;
|
declarePattern(node.handler.param, node.handler);
|
||||||
},
|
},
|
||||||
'ImportDefaultSpecifier': declareModuleSpecifier,
|
'ImportDefaultSpecifier': declareModuleSpecifier,
|
||||||
'ImportSpecifier': declareModuleSpecifier,
|
'ImportSpecifier': declareModuleSpecifier,
|
||||||
@@ -159,7 +167,7 @@ function findGlobals(source, options) {
|
|||||||
globals.push(node);
|
globals.push(node);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
var groupedGlobals = {};
|
var groupedGlobals = Object.create(null);
|
||||||
globals.forEach(function (node) {
|
globals.forEach(function (node) {
|
||||||
var name = node.type === 'ThisExpression' ? 'this' : node.name;
|
var name = node.type === 'ThisExpression' ? 'this' : node.name;
|
||||||
groupedGlobals[name] = (groupedGlobals[name] || []);
|
groupedGlobals[name] = (groupedGlobals[name] || []);
|
||||||
|
10
node_modules/acorn-globals/package.json
generated
vendored
10
node_modules/acorn-globals/package.json
generated
vendored
@@ -1,8 +1,8 @@
|
|||||||
{
|
{
|
||||||
"_from": "acorn-globals@^4.3.0",
|
"_from": "acorn-globals@^4.3.0",
|
||||||
"_id": "acorn-globals@4.3.1",
|
"_id": "acorn-globals@4.3.4",
|
||||||
"_inBundle": false,
|
"_inBundle": false,
|
||||||
"_integrity": "sha512-gJSiKY8dBIjV/0jagZIFBdVMtfQyA5QHCvAT48H2q8REQoW8Fs5AOjqBql1LgSXgrMWdevcE+8cdZ33NtVbIBA==",
|
"_integrity": "sha512-clfQEh21R+D0leSbUdWf3OcfqyaCSAQ8Ryq00bofSekfr9W8u1jyYZo6ir0xu9Gtcf7BjcHJpnbZH7JOCpP60A==",
|
||||||
"_location": "/acorn-globals",
|
"_location": "/acorn-globals",
|
||||||
"_phantomChildren": {},
|
"_phantomChildren": {},
|
||||||
"_requested": {
|
"_requested": {
|
||||||
@@ -18,8 +18,8 @@
|
|||||||
"_requiredBy": [
|
"_requiredBy": [
|
||||||
"/jsdom"
|
"/jsdom"
|
||||||
],
|
],
|
||||||
"_resolved": "https://registry.npmjs.org/acorn-globals/-/acorn-globals-4.3.1.tgz",
|
"_resolved": "https://registry.npmjs.org/acorn-globals/-/acorn-globals-4.3.4.tgz",
|
||||||
"_shasum": "deb149c59276657ebd40ba2ba849ddd529763ccf",
|
"_shasum": "9fa1926addc11c97308c4e66d7add0d40c3272e7",
|
||||||
"_spec": "acorn-globals@^4.3.0",
|
"_spec": "acorn-globals@^4.3.0",
|
||||||
"_where": "F:\\projects\\p\\minifyfromhtml\\node_modules\\jsdom",
|
"_where": "F:\\projects\\p\\minifyfromhtml\\node_modules\\jsdom",
|
||||||
"author": {
|
"author": {
|
||||||
@@ -62,5 +62,5 @@
|
|||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "node test"
|
"test": "node test"
|
||||||
},
|
},
|
||||||
"version": "4.3.1"
|
"version": "4.3.4"
|
||||||
}
|
}
|
||||||
|
6
node_modules/acorn-walk/CHANGELOG.md
generated
vendored
6
node_modules/acorn-walk/CHANGELOG.md
generated
vendored
@@ -1,3 +1,9 @@
|
|||||||
|
## 6.2.0 (2017-07-04)
|
||||||
|
|
||||||
|
### New features
|
||||||
|
|
||||||
|
Add support for `Import` nodes.
|
||||||
|
|
||||||
## 6.1.0 (2018-09-28)
|
## 6.1.0 (2018-09-28)
|
||||||
|
|
||||||
### New features
|
### New features
|
||||||
|
2
node_modules/acorn-walk/README.md
generated
vendored
2
node_modules/acorn-walk/README.md
generated
vendored
@@ -6,7 +6,7 @@ An abstract syntax tree walker for the
|
|||||||
## Community
|
## Community
|
||||||
|
|
||||||
Acorn is open source software released under an
|
Acorn is open source software released under an
|
||||||
[MIT license](https://github.com/acornjs/acorn/blob/master/LICENSE).
|
[MIT license](https://github.com/acornjs/acorn/blob/master/acorn-walk/LICENSE).
|
||||||
|
|
||||||
You are welcome to
|
You are welcome to
|
||||||
[report bugs](https://github.com/acornjs/acorn/issues) or create pull
|
[report bugs](https://github.com/acornjs/acorn/issues) or create pull
|
||||||
|
354
node_modules/acorn-walk/dist/walk.js
generated
vendored
354
node_modules/acorn-walk/dist/walk.js
generated
vendored
@@ -1,40 +1,40 @@
|
|||||||
(function (global, factory) {
|
(function (global, factory) {
|
||||||
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
|
||||||
typeof define === 'function' && define.amd ? define(['exports'], factory) :
|
typeof define === 'function' && define.amd ? define(['exports'], factory) :
|
||||||
(factory((global.acorn = global.acorn || {}, global.acorn.walk = {})));
|
(global = global || self, factory((global.acorn = global.acorn || {}, global.acorn.walk = {})));
|
||||||
}(this, (function (exports) { 'use strict';
|
}(this, function (exports) { 'use strict';
|
||||||
|
|
||||||
// AST walker module for Mozilla Parser API compatible trees
|
// AST walker module for Mozilla Parser API compatible trees
|
||||||
|
|
||||||
// A simple walk is one where you simply specify callbacks to be
|
// A simple walk is one where you simply specify callbacks to be
|
||||||
// called on specific nodes. The last two arguments are optional. A
|
// called on specific nodes. The last two arguments are optional. A
|
||||||
// simple use would be
|
// simple use would be
|
||||||
//
|
//
|
||||||
// walk.simple(myTree, {
|
// walk.simple(myTree, {
|
||||||
// Expression: function(node) { ... }
|
// Expression: function(node) { ... }
|
||||||
// });
|
// });
|
||||||
//
|
//
|
||||||
// to do something with all expressions. All Parser API node types
|
// to do something with all expressions. All Parser API node types
|
||||||
// can be used to identify node types, as well as Expression and
|
// can be used to identify node types, as well as Expression and
|
||||||
// Statement, which denote categories of nodes.
|
// Statement, which denote categories of nodes.
|
||||||
//
|
//
|
||||||
// The base argument can be used to pass a custom (recursive)
|
// The base argument can be used to pass a custom (recursive)
|
||||||
// walker, and state can be used to give this walked an initial
|
// walker, and state can be used to give this walked an initial
|
||||||
// state.
|
// state.
|
||||||
|
|
||||||
function simple(node, visitors, baseVisitor, state, override) {
|
function simple(node, visitors, baseVisitor, state, override) {
|
||||||
if (!baseVisitor) { baseVisitor = base
|
if (!baseVisitor) { baseVisitor = base
|
||||||
; }(function c(node, st, override) {
|
; }(function c(node, st, override) {
|
||||||
var type = override || node.type, found = visitors[type];
|
var type = override || node.type, found = visitors[type];
|
||||||
baseVisitor[type](node, st, c);
|
baseVisitor[type](node, st, c);
|
||||||
if (found) { found(node, st); }
|
if (found) { found(node, st); }
|
||||||
})(node, state, override);
|
})(node, state, override);
|
||||||
}
|
}
|
||||||
|
|
||||||
// An ancestor walk keeps an array of ancestor nodes (including the
|
// An ancestor walk keeps an array of ancestor nodes (including the
|
||||||
// current node) and passes them to the callback as third parameter
|
// current node) and passes them to the callback as third parameter
|
||||||
// (and also as state parameter when no other state is present).
|
// (and also as state parameter when no other state is present).
|
||||||
function ancestor(node, visitors, baseVisitor, state) {
|
function ancestor(node, visitors, baseVisitor, state) {
|
||||||
var ancestors = [];
|
var ancestors = [];
|
||||||
if (!baseVisitor) { baseVisitor = base
|
if (!baseVisitor) { baseVisitor = base
|
||||||
; }(function c(node, st, override) {
|
; }(function c(node, st, override) {
|
||||||
@@ -45,45 +45,47 @@ function ancestor(node, visitors, baseVisitor, state) {
|
|||||||
if (found) { found(node, st || ancestors, ancestors); }
|
if (found) { found(node, st || ancestors, ancestors); }
|
||||||
if (isNew) { ancestors.pop(); }
|
if (isNew) { ancestors.pop(); }
|
||||||
})(node, state);
|
})(node, state);
|
||||||
}
|
}
|
||||||
|
|
||||||
// A recursive walk is one where your functions override the default
|
// A recursive walk is one where your functions override the default
|
||||||
// walkers. They can modify and replace the state parameter that's
|
// walkers. They can modify and replace the state parameter that's
|
||||||
// threaded through the walk, and can opt how and whether to walk
|
// threaded through the walk, and can opt how and whether to walk
|
||||||
// their child nodes (by calling their third argument on these
|
// their child nodes (by calling their third argument on these
|
||||||
// nodes).
|
// nodes).
|
||||||
function recursive(node, state, funcs, baseVisitor, override) {
|
function recursive(node, state, funcs, baseVisitor, override) {
|
||||||
var visitor = funcs ? make(funcs, baseVisitor || undefined) : baseVisitor;(function c(node, st, override) {
|
var visitor = funcs ? make(funcs, baseVisitor || undefined) : baseVisitor
|
||||||
|
;(function c(node, st, override) {
|
||||||
visitor[override || node.type](node, st, c);
|
visitor[override || node.type](node, st, c);
|
||||||
})(node, state, override);
|
})(node, state, override);
|
||||||
}
|
}
|
||||||
|
|
||||||
function makeTest(test) {
|
function makeTest(test) {
|
||||||
if (typeof test === "string")
|
if (typeof test === "string")
|
||||||
{ return function (type) { return type === test; } }
|
{ return function (type) { return type === test; } }
|
||||||
else if (!test)
|
else if (!test)
|
||||||
{ return function () { return true; } }
|
{ return function () { return true; } }
|
||||||
else
|
else
|
||||||
{ return test }
|
{ return test }
|
||||||
}
|
}
|
||||||
|
|
||||||
var Found = function Found(node, state) { this.node = node; this.state = state; };
|
var Found = function Found(node, state) { this.node = node; this.state = state; };
|
||||||
|
|
||||||
// A full walk triggers the callback on each node
|
// A full walk triggers the callback on each node
|
||||||
function full(node, callback, baseVisitor, state, override) {
|
function full(node, callback, baseVisitor, state, override) {
|
||||||
if (!baseVisitor) { baseVisitor = base
|
if (!baseVisitor) { baseVisitor = base
|
||||||
; }(function c(node, st, override) {
|
; }(function c(node, st, override) {
|
||||||
var type = override || node.type;
|
var type = override || node.type;
|
||||||
baseVisitor[type](node, st, c);
|
baseVisitor[type](node, st, c);
|
||||||
if (!override) { callback(node, st, type); }
|
if (!override) { callback(node, st, type); }
|
||||||
})(node, state, override);
|
})(node, state, override);
|
||||||
}
|
}
|
||||||
|
|
||||||
// An fullAncestor walk is like an ancestor walk, but triggers
|
// An fullAncestor walk is like an ancestor walk, but triggers
|
||||||
// the callback on each node
|
// the callback on each node
|
||||||
function fullAncestor(node, callback, baseVisitor, state) {
|
function fullAncestor(node, callback, baseVisitor, state) {
|
||||||
if (!baseVisitor) { baseVisitor = base; }
|
if (!baseVisitor) { baseVisitor = base; }
|
||||||
var ancestors = [];(function c(node, st, override) {
|
var ancestors = []
|
||||||
|
;(function c(node, st, override) {
|
||||||
var type = override || node.type;
|
var type = override || node.type;
|
||||||
var isNew = node !== ancestors[ancestors.length - 1];
|
var isNew = node !== ancestors[ancestors.length - 1];
|
||||||
if (isNew) { ancestors.push(node); }
|
if (isNew) { ancestors.push(node); }
|
||||||
@@ -91,12 +93,12 @@ function fullAncestor(node, callback, baseVisitor, state) {
|
|||||||
if (!override) { callback(node, st || ancestors, ancestors, type); }
|
if (!override) { callback(node, st || ancestors, ancestors, type); }
|
||||||
if (isNew) { ancestors.pop(); }
|
if (isNew) { ancestors.pop(); }
|
||||||
})(node, state);
|
})(node, state);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Find a node with a given start, end, and type (all are optional,
|
// Find a node with a given start, end, and type (all are optional,
|
||||||
// null can be used as wildcard). Returns a {node, state} object, or
|
// null can be used as wildcard). Returns a {node, state} object, or
|
||||||
// undefined when it doesn't find a matching node.
|
// undefined when it doesn't find a matching node.
|
||||||
function findNodeAt(node, start, end, test, baseVisitor, state) {
|
function findNodeAt(node, start, end, test, baseVisitor, state) {
|
||||||
if (!baseVisitor) { baseVisitor = base; }
|
if (!baseVisitor) { baseVisitor = base; }
|
||||||
test = makeTest(test);
|
test = makeTest(test);
|
||||||
try {
|
try {
|
||||||
@@ -114,11 +116,11 @@ function findNodeAt(node, start, end, test, baseVisitor, state) {
|
|||||||
if (e instanceof Found) { return e }
|
if (e instanceof Found) { return e }
|
||||||
throw e
|
throw e
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Find the innermost node of a given type that contains the given
|
// Find the innermost node of a given type that contains the given
|
||||||
// position. Interface similar to findNodeAt.
|
// position. Interface similar to findNodeAt.
|
||||||
function findNodeAround(node, pos, test, baseVisitor, state) {
|
function findNodeAround(node, pos, test, baseVisitor, state) {
|
||||||
test = makeTest(test);
|
test = makeTest(test);
|
||||||
if (!baseVisitor) { baseVisitor = base; }
|
if (!baseVisitor) { baseVisitor = base; }
|
||||||
try {
|
try {
|
||||||
@@ -132,10 +134,10 @@ function findNodeAround(node, pos, test, baseVisitor, state) {
|
|||||||
if (e instanceof Found) { return e }
|
if (e instanceof Found) { return e }
|
||||||
throw e
|
throw e
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Find the outermost matching node after a given position.
|
// Find the outermost matching node after a given position.
|
||||||
function findNodeAfter(node, pos, test, baseVisitor, state) {
|
function findNodeAfter(node, pos, test, baseVisitor, state) {
|
||||||
test = makeTest(test);
|
test = makeTest(test);
|
||||||
if (!baseVisitor) { baseVisitor = base; }
|
if (!baseVisitor) { baseVisitor = base; }
|
||||||
try {
|
try {
|
||||||
@@ -149,13 +151,14 @@ function findNodeAfter(node, pos, test, baseVisitor, state) {
|
|||||||
if (e instanceof Found) { return e }
|
if (e instanceof Found) { return e }
|
||||||
throw e
|
throw e
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Find the outermost matching node before a given position.
|
// Find the outermost matching node before a given position.
|
||||||
function findNodeBefore(node, pos, test, baseVisitor, state) {
|
function findNodeBefore(node, pos, test, baseVisitor, state) {
|
||||||
test = makeTest(test);
|
test = makeTest(test);
|
||||||
if (!baseVisitor) { baseVisitor = base; }
|
if (!baseVisitor) { baseVisitor = base; }
|
||||||
var max;(function c(node, st, override) {
|
var max
|
||||||
|
;(function c(node, st, override) {
|
||||||
if (node.start > pos) { return }
|
if (node.start > pos) { return }
|
||||||
var type = override || node.type;
|
var type = override || node.type;
|
||||||
if (node.end <= pos && (!max || max.node.end < node.end) && test(type, node))
|
if (node.end <= pos && (!max || max.node.end < node.end) && test(type, node))
|
||||||
@@ -163,68 +166,68 @@ function findNodeBefore(node, pos, test, baseVisitor, state) {
|
|||||||
baseVisitor[type](node, st, c);
|
baseVisitor[type](node, st, c);
|
||||||
})(node, state);
|
})(node, state);
|
||||||
return max
|
return max
|
||||||
}
|
}
|
||||||
|
|
||||||
// Fallback to an Object.create polyfill for older environments.
|
// Fallback to an Object.create polyfill for older environments.
|
||||||
var create = Object.create || function(proto) {
|
var create = Object.create || function(proto) {
|
||||||
function Ctor() {}
|
function Ctor() {}
|
||||||
Ctor.prototype = proto;
|
Ctor.prototype = proto;
|
||||||
return new Ctor
|
return new Ctor
|
||||||
};
|
};
|
||||||
|
|
||||||
// Used to create a custom walker. Will fill in all missing node
|
// Used to create a custom walker. Will fill in all missing node
|
||||||
// type properties with the defaults.
|
// type properties with the defaults.
|
||||||
function make(funcs, baseVisitor) {
|
function make(funcs, baseVisitor) {
|
||||||
var visitor = create(baseVisitor || base);
|
var visitor = create(baseVisitor || base);
|
||||||
for (var type in funcs) { visitor[type] = funcs[type]; }
|
for (var type in funcs) { visitor[type] = funcs[type]; }
|
||||||
return visitor
|
return visitor
|
||||||
}
|
}
|
||||||
|
|
||||||
function skipThrough(node, st, c) { c(node, st); }
|
function skipThrough(node, st, c) { c(node, st); }
|
||||||
function ignore(_node, _st, _c) {}
|
function ignore(_node, _st, _c) {}
|
||||||
|
|
||||||
// Node walkers.
|
// Node walkers.
|
||||||
|
|
||||||
var base = {};
|
var base = {};
|
||||||
|
|
||||||
base.Program = base.BlockStatement = function (node, st, c) {
|
base.Program = base.BlockStatement = function (node, st, c) {
|
||||||
for (var i = 0, list = node.body; i < list.length; i += 1)
|
for (var i = 0, list = node.body; i < list.length; i += 1)
|
||||||
{
|
{
|
||||||
var stmt = list[i];
|
var stmt = list[i];
|
||||||
|
|
||||||
c(stmt, st, "Statement");
|
c(stmt, st, "Statement");
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
base.Statement = skipThrough;
|
base.Statement = skipThrough;
|
||||||
base.EmptyStatement = ignore;
|
base.EmptyStatement = ignore;
|
||||||
base.ExpressionStatement = base.ParenthesizedExpression =
|
base.ExpressionStatement = base.ParenthesizedExpression =
|
||||||
function (node, st, c) { return c(node.expression, st, "Expression"); };
|
function (node, st, c) { return c(node.expression, st, "Expression"); };
|
||||||
base.IfStatement = function (node, st, c) {
|
base.IfStatement = function (node, st, c) {
|
||||||
c(node.test, st, "Expression");
|
c(node.test, st, "Expression");
|
||||||
c(node.consequent, st, "Statement");
|
c(node.consequent, st, "Statement");
|
||||||
if (node.alternate) { c(node.alternate, st, "Statement"); }
|
if (node.alternate) { c(node.alternate, st, "Statement"); }
|
||||||
};
|
};
|
||||||
base.LabeledStatement = function (node, st, c) { return c(node.body, st, "Statement"); };
|
base.LabeledStatement = function (node, st, c) { return c(node.body, st, "Statement"); };
|
||||||
base.BreakStatement = base.ContinueStatement = ignore;
|
base.BreakStatement = base.ContinueStatement = ignore;
|
||||||
base.WithStatement = function (node, st, c) {
|
base.WithStatement = function (node, st, c) {
|
||||||
c(node.object, st, "Expression");
|
c(node.object, st, "Expression");
|
||||||
c(node.body, st, "Statement");
|
c(node.body, st, "Statement");
|
||||||
};
|
};
|
||||||
base.SwitchStatement = function (node, st, c) {
|
base.SwitchStatement = function (node, st, c) {
|
||||||
c(node.discriminant, st, "Expression");
|
c(node.discriminant, st, "Expression");
|
||||||
for (var i = 0, list = node.cases; i < list.length; i += 1) {
|
for (var i$1 = 0, list$1 = node.cases; i$1 < list$1.length; i$1 += 1) {
|
||||||
var cs = list[i];
|
var cs = list$1[i$1];
|
||||||
|
|
||||||
if (cs.test) { c(cs.test, st, "Expression"); }
|
if (cs.test) { c(cs.test, st, "Expression"); }
|
||||||
for (var i$1 = 0, list$1 = cs.consequent; i$1 < list$1.length; i$1 += 1)
|
for (var i = 0, list = cs.consequent; i < list.length; i += 1)
|
||||||
{
|
{
|
||||||
var cons = list$1[i$1];
|
var cons = list[i];
|
||||||
|
|
||||||
c(cons, st, "Statement");
|
c(cons, st, "Statement");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
base.SwitchCase = function (node, st, c) {
|
base.SwitchCase = function (node, st, c) {
|
||||||
if (node.test) { c(node.test, st, "Expression"); }
|
if (node.test) { c(node.test, st, "Expression"); }
|
||||||
for (var i = 0, list = node.consequent; i < list.length; i += 1)
|
for (var i = 0, list = node.consequent; i < list.length; i += 1)
|
||||||
{
|
{
|
||||||
@@ -232,57 +235,57 @@ base.SwitchCase = function (node, st, c) {
|
|||||||
|
|
||||||
c(cons, st, "Statement");
|
c(cons, st, "Statement");
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
base.ReturnStatement = base.YieldExpression = base.AwaitExpression = function (node, st, c) {
|
base.ReturnStatement = base.YieldExpression = base.AwaitExpression = function (node, st, c) {
|
||||||
if (node.argument) { c(node.argument, st, "Expression"); }
|
if (node.argument) { c(node.argument, st, "Expression"); }
|
||||||
};
|
};
|
||||||
base.ThrowStatement = base.SpreadElement =
|
base.ThrowStatement = base.SpreadElement =
|
||||||
function (node, st, c) { return c(node.argument, st, "Expression"); };
|
function (node, st, c) { return c(node.argument, st, "Expression"); };
|
||||||
base.TryStatement = function (node, st, c) {
|
base.TryStatement = function (node, st, c) {
|
||||||
c(node.block, st, "Statement");
|
c(node.block, st, "Statement");
|
||||||
if (node.handler) { c(node.handler, st); }
|
if (node.handler) { c(node.handler, st); }
|
||||||
if (node.finalizer) { c(node.finalizer, st, "Statement"); }
|
if (node.finalizer) { c(node.finalizer, st, "Statement"); }
|
||||||
};
|
};
|
||||||
base.CatchClause = function (node, st, c) {
|
base.CatchClause = function (node, st, c) {
|
||||||
if (node.param) { c(node.param, st, "Pattern"); }
|
if (node.param) { c(node.param, st, "Pattern"); }
|
||||||
c(node.body, st, "Statement");
|
c(node.body, st, "Statement");
|
||||||
};
|
};
|
||||||
base.WhileStatement = base.DoWhileStatement = function (node, st, c) {
|
base.WhileStatement = base.DoWhileStatement = function (node, st, c) {
|
||||||
c(node.test, st, "Expression");
|
c(node.test, st, "Expression");
|
||||||
c(node.body, st, "Statement");
|
c(node.body, st, "Statement");
|
||||||
};
|
};
|
||||||
base.ForStatement = function (node, st, c) {
|
base.ForStatement = function (node, st, c) {
|
||||||
if (node.init) { c(node.init, st, "ForInit"); }
|
if (node.init) { c(node.init, st, "ForInit"); }
|
||||||
if (node.test) { c(node.test, st, "Expression"); }
|
if (node.test) { c(node.test, st, "Expression"); }
|
||||||
if (node.update) { c(node.update, st, "Expression"); }
|
if (node.update) { c(node.update, st, "Expression"); }
|
||||||
c(node.body, st, "Statement");
|
c(node.body, st, "Statement");
|
||||||
};
|
};
|
||||||
base.ForInStatement = base.ForOfStatement = function (node, st, c) {
|
base.ForInStatement = base.ForOfStatement = function (node, st, c) {
|
||||||
c(node.left, st, "ForInit");
|
c(node.left, st, "ForInit");
|
||||||
c(node.right, st, "Expression");
|
c(node.right, st, "Expression");
|
||||||
c(node.body, st, "Statement");
|
c(node.body, st, "Statement");
|
||||||
};
|
};
|
||||||
base.ForInit = function (node, st, c) {
|
base.ForInit = function (node, st, c) {
|
||||||
if (node.type === "VariableDeclaration") { c(node, st); }
|
if (node.type === "VariableDeclaration") { c(node, st); }
|
||||||
else { c(node, st, "Expression"); }
|
else { c(node, st, "Expression"); }
|
||||||
};
|
};
|
||||||
base.DebuggerStatement = ignore;
|
base.DebuggerStatement = ignore;
|
||||||
|
|
||||||
base.FunctionDeclaration = function (node, st, c) { return c(node, st, "Function"); };
|
base.FunctionDeclaration = function (node, st, c) { return c(node, st, "Function"); };
|
||||||
base.VariableDeclaration = function (node, st, c) {
|
base.VariableDeclaration = function (node, st, c) {
|
||||||
for (var i = 0, list = node.declarations; i < list.length; i += 1)
|
for (var i = 0, list = node.declarations; i < list.length; i += 1)
|
||||||
{
|
{
|
||||||
var decl = list[i];
|
var decl = list[i];
|
||||||
|
|
||||||
c(decl, st);
|
c(decl, st);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
base.VariableDeclarator = function (node, st, c) {
|
base.VariableDeclarator = function (node, st, c) {
|
||||||
c(node.id, st, "Pattern");
|
c(node.id, st, "Pattern");
|
||||||
if (node.init) { c(node.init, st, "Expression"); }
|
if (node.init) { c(node.init, st, "Expression"); }
|
||||||
};
|
};
|
||||||
|
|
||||||
base.Function = function (node, st, c) {
|
base.Function = function (node, st, c) {
|
||||||
if (node.id) { c(node.id, st, "Pattern"); }
|
if (node.id) { c(node.id, st, "Pattern"); }
|
||||||
for (var i = 0, list = node.params; i < list.length; i += 1)
|
for (var i = 0, list = node.params; i < list.length; i += 1)
|
||||||
{
|
{
|
||||||
@@ -291,27 +294,27 @@ base.Function = function (node, st, c) {
|
|||||||
c(param, st, "Pattern");
|
c(param, st, "Pattern");
|
||||||
}
|
}
|
||||||
c(node.body, st, node.expression ? "Expression" : "Statement");
|
c(node.body, st, node.expression ? "Expression" : "Statement");
|
||||||
};
|
};
|
||||||
|
|
||||||
base.Pattern = function (node, st, c) {
|
base.Pattern = function (node, st, c) {
|
||||||
if (node.type === "Identifier")
|
if (node.type === "Identifier")
|
||||||
{ c(node, st, "VariablePattern"); }
|
{ c(node, st, "VariablePattern"); }
|
||||||
else if (node.type === "MemberExpression")
|
else if (node.type === "MemberExpression")
|
||||||
{ c(node, st, "MemberPattern"); }
|
{ c(node, st, "MemberPattern"); }
|
||||||
else
|
else
|
||||||
{ c(node, st); }
|
{ c(node, st); }
|
||||||
};
|
};
|
||||||
base.VariablePattern = ignore;
|
base.VariablePattern = ignore;
|
||||||
base.MemberPattern = skipThrough;
|
base.MemberPattern = skipThrough;
|
||||||
base.RestElement = function (node, st, c) { return c(node.argument, st, "Pattern"); };
|
base.RestElement = function (node, st, c) { return c(node.argument, st, "Pattern"); };
|
||||||
base.ArrayPattern = function (node, st, c) {
|
base.ArrayPattern = function (node, st, c) {
|
||||||
for (var i = 0, list = node.elements; i < list.length; i += 1) {
|
for (var i = 0, list = node.elements; i < list.length; i += 1) {
|
||||||
var elt = list[i];
|
var elt = list[i];
|
||||||
|
|
||||||
if (elt) { c(elt, st, "Pattern"); }
|
if (elt) { c(elt, st, "Pattern"); }
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
base.ObjectPattern = function (node, st, c) {
|
base.ObjectPattern = function (node, st, c) {
|
||||||
for (var i = 0, list = node.properties; i < list.length; i += 1) {
|
for (var i = 0, list = node.properties; i < list.length; i += 1) {
|
||||||
var prop = list[i];
|
var prop = list[i];
|
||||||
|
|
||||||
@@ -322,35 +325,35 @@ base.ObjectPattern = function (node, st, c) {
|
|||||||
c(prop.argument, st, "Pattern");
|
c(prop.argument, st, "Pattern");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
base.Expression = skipThrough;
|
base.Expression = skipThrough;
|
||||||
base.ThisExpression = base.Super = base.MetaProperty = ignore;
|
base.ThisExpression = base.Super = base.MetaProperty = ignore;
|
||||||
base.ArrayExpression = function (node, st, c) {
|
base.ArrayExpression = function (node, st, c) {
|
||||||
for (var i = 0, list = node.elements; i < list.length; i += 1) {
|
for (var i = 0, list = node.elements; i < list.length; i += 1) {
|
||||||
var elt = list[i];
|
var elt = list[i];
|
||||||
|
|
||||||
if (elt) { c(elt, st, "Expression"); }
|
if (elt) { c(elt, st, "Expression"); }
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
base.ObjectExpression = function (node, st, c) {
|
base.ObjectExpression = function (node, st, c) {
|
||||||
for (var i = 0, list = node.properties; i < list.length; i += 1)
|
for (var i = 0, list = node.properties; i < list.length; i += 1)
|
||||||
{
|
{
|
||||||
var prop = list[i];
|
var prop = list[i];
|
||||||
|
|
||||||
c(prop, st);
|
c(prop, st);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
base.FunctionExpression = base.ArrowFunctionExpression = base.FunctionDeclaration;
|
base.FunctionExpression = base.ArrowFunctionExpression = base.FunctionDeclaration;
|
||||||
base.SequenceExpression = function (node, st, c) {
|
base.SequenceExpression = function (node, st, c) {
|
||||||
for (var i = 0, list = node.expressions; i < list.length; i += 1)
|
for (var i = 0, list = node.expressions; i < list.length; i += 1)
|
||||||
{
|
{
|
||||||
var expr = list[i];
|
var expr = list[i];
|
||||||
|
|
||||||
c(expr, st, "Expression");
|
c(expr, st, "Expression");
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
base.TemplateLiteral = function (node, st, c) {
|
base.TemplateLiteral = function (node, st, c) {
|
||||||
for (var i = 0, list = node.quasis; i < list.length; i += 1)
|
for (var i = 0, list = node.quasis; i < list.length; i += 1)
|
||||||
{
|
{
|
||||||
var quasi = list[i];
|
var quasi = list[i];
|
||||||
@@ -364,25 +367,25 @@ base.TemplateLiteral = function (node, st, c) {
|
|||||||
|
|
||||||
c(expr, st, "Expression");
|
c(expr, st, "Expression");
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
base.TemplateElement = ignore;
|
base.TemplateElement = ignore;
|
||||||
base.UnaryExpression = base.UpdateExpression = function (node, st, c) {
|
base.UnaryExpression = base.UpdateExpression = function (node, st, c) {
|
||||||
c(node.argument, st, "Expression");
|
c(node.argument, st, "Expression");
|
||||||
};
|
};
|
||||||
base.BinaryExpression = base.LogicalExpression = function (node, st, c) {
|
base.BinaryExpression = base.LogicalExpression = function (node, st, c) {
|
||||||
c(node.left, st, "Expression");
|
c(node.left, st, "Expression");
|
||||||
c(node.right, st, "Expression");
|
c(node.right, st, "Expression");
|
||||||
};
|
};
|
||||||
base.AssignmentExpression = base.AssignmentPattern = function (node, st, c) {
|
base.AssignmentExpression = base.AssignmentPattern = function (node, st, c) {
|
||||||
c(node.left, st, "Pattern");
|
c(node.left, st, "Pattern");
|
||||||
c(node.right, st, "Expression");
|
c(node.right, st, "Expression");
|
||||||
};
|
};
|
||||||
base.ConditionalExpression = function (node, st, c) {
|
base.ConditionalExpression = function (node, st, c) {
|
||||||
c(node.test, st, "Expression");
|
c(node.test, st, "Expression");
|
||||||
c(node.consequent, st, "Expression");
|
c(node.consequent, st, "Expression");
|
||||||
c(node.alternate, st, "Expression");
|
c(node.alternate, st, "Expression");
|
||||||
};
|
};
|
||||||
base.NewExpression = base.CallExpression = function (node, st, c) {
|
base.NewExpression = base.CallExpression = function (node, st, c) {
|
||||||
c(node.callee, st, "Expression");
|
c(node.callee, st, "Expression");
|
||||||
if (node.arguments)
|
if (node.arguments)
|
||||||
{ for (var i = 0, list = node.arguments; i < list.length; i += 1)
|
{ for (var i = 0, list = node.arguments; i < list.length; i += 1)
|
||||||
@@ -391,20 +394,20 @@ base.NewExpression = base.CallExpression = function (node, st, c) {
|
|||||||
|
|
||||||
c(arg, st, "Expression");
|
c(arg, st, "Expression");
|
||||||
} }
|
} }
|
||||||
};
|
};
|
||||||
base.MemberExpression = function (node, st, c) {
|
base.MemberExpression = function (node, st, c) {
|
||||||
c(node.object, st, "Expression");
|
c(node.object, st, "Expression");
|
||||||
if (node.computed) { c(node.property, st, "Expression"); }
|
if (node.computed) { c(node.property, st, "Expression"); }
|
||||||
};
|
};
|
||||||
base.ExportNamedDeclaration = base.ExportDefaultDeclaration = function (node, st, c) {
|
base.ExportNamedDeclaration = base.ExportDefaultDeclaration = function (node, st, c) {
|
||||||
if (node.declaration)
|
if (node.declaration)
|
||||||
{ c(node.declaration, st, node.type === "ExportNamedDeclaration" || node.declaration.id ? "Statement" : "Expression"); }
|
{ c(node.declaration, st, node.type === "ExportNamedDeclaration" || node.declaration.id ? "Statement" : "Expression"); }
|
||||||
if (node.source) { c(node.source, st, "Expression"); }
|
if (node.source) { c(node.source, st, "Expression"); }
|
||||||
};
|
};
|
||||||
base.ExportAllDeclaration = function (node, st, c) {
|
base.ExportAllDeclaration = function (node, st, c) {
|
||||||
c(node.source, st, "Expression");
|
c(node.source, st, "Expression");
|
||||||
};
|
};
|
||||||
base.ImportDeclaration = function (node, st, c) {
|
base.ImportDeclaration = function (node, st, c) {
|
||||||
for (var i = 0, list = node.specifiers; i < list.length; i += 1)
|
for (var i = 0, list = node.specifiers; i < list.length; i += 1)
|
||||||
{
|
{
|
||||||
var spec = list[i];
|
var spec = list[i];
|
||||||
@@ -412,45 +415,44 @@ base.ImportDeclaration = function (node, st, c) {
|
|||||||
c(spec, st);
|
c(spec, st);
|
||||||
}
|
}
|
||||||
c(node.source, st, "Expression");
|
c(node.source, st, "Expression");
|
||||||
};
|
};
|
||||||
base.ImportSpecifier = base.ImportDefaultSpecifier = base.ImportNamespaceSpecifier = base.Identifier = base.Literal = ignore;
|
base.ImportSpecifier = base.ImportDefaultSpecifier = base.ImportNamespaceSpecifier = base.Identifier = base.Literal = base.Import = ignore;
|
||||||
|
|
||||||
base.TaggedTemplateExpression = function (node, st, c) {
|
base.TaggedTemplateExpression = function (node, st, c) {
|
||||||
c(node.tag, st, "Expression");
|
c(node.tag, st, "Expression");
|
||||||
c(node.quasi, st, "Expression");
|
c(node.quasi, st, "Expression");
|
||||||
};
|
};
|
||||||
base.ClassDeclaration = base.ClassExpression = function (node, st, c) { return c(node, st, "Class"); };
|
base.ClassDeclaration = base.ClassExpression = function (node, st, c) { return c(node, st, "Class"); };
|
||||||
base.Class = function (node, st, c) {
|
base.Class = function (node, st, c) {
|
||||||
if (node.id) { c(node.id, st, "Pattern"); }
|
if (node.id) { c(node.id, st, "Pattern"); }
|
||||||
if (node.superClass) { c(node.superClass, st, "Expression"); }
|
if (node.superClass) { c(node.superClass, st, "Expression"); }
|
||||||
c(node.body, st);
|
c(node.body, st);
|
||||||
};
|
};
|
||||||
base.ClassBody = function (node, st, c) {
|
base.ClassBody = function (node, st, c) {
|
||||||
for (var i = 0, list = node.body; i < list.length; i += 1)
|
for (var i = 0, list = node.body; i < list.length; i += 1)
|
||||||
{
|
{
|
||||||
var elt = list[i];
|
var elt = list[i];
|
||||||
|
|
||||||
c(elt, st);
|
c(elt, st);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
base.MethodDefinition = base.Property = function (node, st, c) {
|
base.MethodDefinition = base.Property = function (node, st, c) {
|
||||||
if (node.computed) { c(node.key, st, "Expression"); }
|
if (node.computed) { c(node.key, st, "Expression"); }
|
||||||
c(node.value, st, "Expression");
|
c(node.value, st, "Expression");
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.simple = simple;
|
exports.ancestor = ancestor;
|
||||||
exports.ancestor = ancestor;
|
exports.base = base;
|
||||||
exports.recursive = recursive;
|
exports.findNodeAfter = findNodeAfter;
|
||||||
exports.full = full;
|
exports.findNodeAround = findNodeAround;
|
||||||
exports.fullAncestor = fullAncestor;
|
exports.findNodeAt = findNodeAt;
|
||||||
exports.findNodeAt = findNodeAt;
|
exports.findNodeBefore = findNodeBefore;
|
||||||
exports.findNodeAround = findNodeAround;
|
exports.full = full;
|
||||||
exports.findNodeAfter = findNodeAfter;
|
exports.fullAncestor = fullAncestor;
|
||||||
exports.findNodeBefore = findNodeBefore;
|
exports.make = make;
|
||||||
exports.make = make;
|
exports.recursive = recursive;
|
||||||
exports.base = base;
|
exports.simple = simple;
|
||||||
|
|
||||||
Object.defineProperty(exports, '__esModule', { value: true });
|
Object.defineProperty(exports, '__esModule', { value: true });
|
||||||
|
|
||||||
})));
|
}));
|
||||||
//# sourceMappingURL=walk.js.map
|
|
||||||
|
22
node_modules/acorn-walk/dist/walk.mjs
generated
vendored
22
node_modules/acorn-walk/dist/walk.mjs
generated
vendored
@@ -47,7 +47,8 @@ function ancestor(node, visitors, baseVisitor, state) {
|
|||||||
// their child nodes (by calling their third argument on these
|
// their child nodes (by calling their third argument on these
|
||||||
// nodes).
|
// nodes).
|
||||||
function recursive(node, state, funcs, baseVisitor, override) {
|
function recursive(node, state, funcs, baseVisitor, override) {
|
||||||
var visitor = funcs ? make(funcs, baseVisitor || undefined) : baseVisitor;(function c(node, st, override) {
|
var visitor = funcs ? make(funcs, baseVisitor || undefined) : baseVisitor
|
||||||
|
;(function c(node, st, override) {
|
||||||
visitor[override || node.type](node, st, c);
|
visitor[override || node.type](node, st, c);
|
||||||
})(node, state, override);
|
})(node, state, override);
|
||||||
}
|
}
|
||||||
@@ -77,7 +78,8 @@ function full(node, callback, baseVisitor, state, override) {
|
|||||||
// the callback on each node
|
// the callback on each node
|
||||||
function fullAncestor(node, callback, baseVisitor, state) {
|
function fullAncestor(node, callback, baseVisitor, state) {
|
||||||
if (!baseVisitor) { baseVisitor = base; }
|
if (!baseVisitor) { baseVisitor = base; }
|
||||||
var ancestors = [];(function c(node, st, override) {
|
var ancestors = []
|
||||||
|
;(function c(node, st, override) {
|
||||||
var type = override || node.type;
|
var type = override || node.type;
|
||||||
var isNew = node !== ancestors[ancestors.length - 1];
|
var isNew = node !== ancestors[ancestors.length - 1];
|
||||||
if (isNew) { ancestors.push(node); }
|
if (isNew) { ancestors.push(node); }
|
||||||
@@ -149,7 +151,8 @@ function findNodeAfter(node, pos, test, baseVisitor, state) {
|
|||||||
function findNodeBefore(node, pos, test, baseVisitor, state) {
|
function findNodeBefore(node, pos, test, baseVisitor, state) {
|
||||||
test = makeTest(test);
|
test = makeTest(test);
|
||||||
if (!baseVisitor) { baseVisitor = base; }
|
if (!baseVisitor) { baseVisitor = base; }
|
||||||
var max;(function c(node, st, override) {
|
var max
|
||||||
|
;(function c(node, st, override) {
|
||||||
if (node.start > pos) { return }
|
if (node.start > pos) { return }
|
||||||
var type = override || node.type;
|
var type = override || node.type;
|
||||||
if (node.end <= pos && (!max || max.node.end < node.end) && test(type, node))
|
if (node.end <= pos && (!max || max.node.end < node.end) && test(type, node))
|
||||||
@@ -206,13 +209,13 @@ base.WithStatement = function (node, st, c) {
|
|||||||
};
|
};
|
||||||
base.SwitchStatement = function (node, st, c) {
|
base.SwitchStatement = function (node, st, c) {
|
||||||
c(node.discriminant, st, "Expression");
|
c(node.discriminant, st, "Expression");
|
||||||
for (var i = 0, list = node.cases; i < list.length; i += 1) {
|
for (var i$1 = 0, list$1 = node.cases; i$1 < list$1.length; i$1 += 1) {
|
||||||
var cs = list[i];
|
var cs = list$1[i$1];
|
||||||
|
|
||||||
if (cs.test) { c(cs.test, st, "Expression"); }
|
if (cs.test) { c(cs.test, st, "Expression"); }
|
||||||
for (var i$1 = 0, list$1 = cs.consequent; i$1 < list$1.length; i$1 += 1)
|
for (var i = 0, list = cs.consequent; i < list.length; i += 1)
|
||||||
{
|
{
|
||||||
var cons = list$1[i$1];
|
var cons = list[i];
|
||||||
|
|
||||||
c(cons, st, "Statement");
|
c(cons, st, "Statement");
|
||||||
}
|
}
|
||||||
@@ -407,7 +410,7 @@ base.ImportDeclaration = function (node, st, c) {
|
|||||||
}
|
}
|
||||||
c(node.source, st, "Expression");
|
c(node.source, st, "Expression");
|
||||||
};
|
};
|
||||||
base.ImportSpecifier = base.ImportDefaultSpecifier = base.ImportNamespaceSpecifier = base.Identifier = base.Literal = ignore;
|
base.ImportSpecifier = base.ImportDefaultSpecifier = base.ImportNamespaceSpecifier = base.Identifier = base.Literal = base.Import = ignore;
|
||||||
|
|
||||||
base.TaggedTemplateExpression = function (node, st, c) {
|
base.TaggedTemplateExpression = function (node, st, c) {
|
||||||
c(node.tag, st, "Expression");
|
c(node.tag, st, "Expression");
|
||||||
@@ -432,5 +435,4 @@ base.MethodDefinition = base.Property = function (node, st, c) {
|
|||||||
c(node.value, st, "Expression");
|
c(node.value, st, "Expression");
|
||||||
};
|
};
|
||||||
|
|
||||||
export { simple, ancestor, recursive, full, fullAncestor, findNodeAt, findNodeAround, findNodeAfter, findNodeBefore, make, base };
|
export { ancestor, base, findNodeAfter, findNodeAround, findNodeAt, findNodeBefore, full, fullAncestor, make, recursive, simple };
|
||||||
//# sourceMappingURL=walk.mjs.map
|
|
||||||
|
10
node_modules/acorn-walk/package.json
generated
vendored
10
node_modules/acorn-walk/package.json
generated
vendored
@@ -1,8 +1,8 @@
|
|||||||
{
|
{
|
||||||
"_from": "acorn-walk@^6.0.1",
|
"_from": "acorn-walk@^6.0.1",
|
||||||
"_id": "acorn-walk@6.1.1",
|
"_id": "acorn-walk@6.2.0",
|
||||||
"_inBundle": false,
|
"_inBundle": false,
|
||||||
"_integrity": "sha512-OtUw6JUTgxA2QoqqmrmQ7F2NYqiBPi/L2jqHyFtllhOUvXYQXf0Z1CYUinIfyT4bTCGmrA7gX9FvHA81uzCoVw==",
|
"_integrity": "sha512-7evsyfH1cLOCdAzZAd43Cic04yKydNx0cF+7tiA19p1XnLLPU4dpCQOqpjqwokFe//vS0QqfqqjCS2JkiIs0cA==",
|
||||||
"_location": "/acorn-walk",
|
"_location": "/acorn-walk",
|
||||||
"_phantomChildren": {},
|
"_phantomChildren": {},
|
||||||
"_requested": {
|
"_requested": {
|
||||||
@@ -18,8 +18,8 @@
|
|||||||
"_requiredBy": [
|
"_requiredBy": [
|
||||||
"/acorn-globals"
|
"/acorn-globals"
|
||||||
],
|
],
|
||||||
"_resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-6.1.1.tgz",
|
"_resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-6.2.0.tgz",
|
||||||
"_shasum": "d363b66f5fac5f018ff9c3a1e7b6f8e310cc3913",
|
"_shasum": "123cb8f3b84c2171f1f7fb252615b1c78a6b1a8c",
|
||||||
"_spec": "acorn-walk@^6.0.1",
|
"_spec": "acorn-walk@^6.0.1",
|
||||||
"_where": "F:\\projects\\p\\minifyfromhtml\\node_modules\\acorn-globals",
|
"_where": "F:\\projects\\p\\minifyfromhtml\\node_modules\\acorn-globals",
|
||||||
"bugs": {
|
"bugs": {
|
||||||
@@ -59,5 +59,5 @@
|
|||||||
"scripts": {
|
"scripts": {
|
||||||
"prepare": "cd ..; npm run build:walk"
|
"prepare": "cd ..; npm run build:walk"
|
||||||
},
|
},
|
||||||
"version": "6.1.1"
|
"version": "6.2.0"
|
||||||
}
|
}
|
||||||
|
36
node_modules/acorn/CHANGELOG.md
generated
vendored
36
node_modules/acorn/CHANGELOG.md
generated
vendored
@@ -1,3 +1,39 @@
|
|||||||
|
## 6.4.0 (2019-11-26)
|
||||||
|
|
||||||
|
### New features
|
||||||
|
|
||||||
|
Add a static `acorn` property to the `Parser` class that contains the entire module interface, to allow plugins to access the instance of the library that they are acting on.
|
||||||
|
|
||||||
|
## 6.3.0 (2019-08-12)
|
||||||
|
|
||||||
|
### New features
|
||||||
|
|
||||||
|
`sourceType: "module"` can now be used even when `ecmaVersion` is less than 6, to parse module-style code that otherwise conforms to an older standard.
|
||||||
|
|
||||||
|
## 6.2.1 (2019-07-21)
|
||||||
|
|
||||||
|
### Bug fixes
|
||||||
|
|
||||||
|
Fix bug causing Acorn to treat some characters as identifier characters that shouldn't be treated as such.
|
||||||
|
|
||||||
|
Fix issue where setting the `allowReserved` option to `"never"` allowed reserved words in some circumstances.
|
||||||
|
|
||||||
|
## 6.2.0 (2019-07-04)
|
||||||
|
|
||||||
|
### Bug fixes
|
||||||
|
|
||||||
|
Improve valid assignment checking in `for`/`in` and `for`/`of` loops.
|
||||||
|
|
||||||
|
Disallow binding `let` in patterns.
|
||||||
|
|
||||||
|
### New features
|
||||||
|
|
||||||
|
Support bigint syntax with `ecmaVersion` >= 10.
|
||||||
|
|
||||||
|
Support dynamic `import` syntax with `ecmaVersion` >= 10.
|
||||||
|
|
||||||
|
Upgrade to Unicode version 12.
|
||||||
|
|
||||||
## 6.1.1 (2019-02-27)
|
## 6.1.1 (2019-02-27)
|
||||||
|
|
||||||
### Bug fixes
|
### Bug fixes
|
||||||
|
8
node_modules/acorn/README.md
generated
vendored
8
node_modules/acorn/README.md
generated
vendored
@@ -54,7 +54,7 @@ an object containing any of these fields:
|
|||||||
- **ecmaVersion**: Indicates the ECMAScript version to parse. Must be
|
- **ecmaVersion**: Indicates the ECMAScript version to parse. Must be
|
||||||
either 3, 5, 6 (2015), 7 (2016), 8 (2017), 9 (2018) or 10 (2019, partial
|
either 3, 5, 6 (2015), 7 (2016), 8 (2017), 9 (2018) or 10 (2019, partial
|
||||||
support). This influences support for strict mode, the set of
|
support). This influences support for strict mode, the set of
|
||||||
reserved words, and support for new syntax features. Default is 7.
|
reserved words, and support for new syntax features. Default is 9.
|
||||||
|
|
||||||
**NOTE**: Only 'stage 4' (finalized) ECMAScript features are being
|
**NOTE**: Only 'stage 4' (finalized) ECMAScript features are being
|
||||||
implemented by Acorn. Other proposed new features can be implemented
|
implemented by Acorn. Other proposed new features can be implemented
|
||||||
@@ -64,6 +64,9 @@ an object containing any of these fields:
|
|||||||
either `"script"` or `"module"`. This influences global strict mode
|
either `"script"` or `"module"`. This influences global strict mode
|
||||||
and parsing of `import` and `export` declarations.
|
and parsing of `import` and `export` declarations.
|
||||||
|
|
||||||
|
**NOTE**: If set to `"module"`, then static `import` / `export` syntax
|
||||||
|
will be valid, even if `ecmaVersion` is less than 6.
|
||||||
|
|
||||||
- **onInsertedSemicolon**: If given a callback, that callback will be
|
- **onInsertedSemicolon**: If given a callback, that callback will be
|
||||||
called whenever a missing semicolon is inserted by the parser. The
|
called whenever a missing semicolon is inserted by the parser. The
|
||||||
callback will be given the character offset of the point where the
|
callback will be given the character offset of the point where the
|
||||||
@@ -260,10 +263,7 @@ The utility spits out the syntax tree as JSON data.
|
|||||||
Plugins for ECMAScript proposals:
|
Plugins for ECMAScript proposals:
|
||||||
|
|
||||||
- [`acorn-stage3`](https://github.com/acornjs/acorn-stage3): Parse most stage 3 proposals, bundling:
|
- [`acorn-stage3`](https://github.com/acornjs/acorn-stage3): Parse most stage 3 proposals, bundling:
|
||||||
- [`acorn-async-iteration`](https://github.com/acornjs/acorn-async-iteration): Parse [async iteration proposal](https://github.com/tc39/proposal-async-iteration)
|
|
||||||
- [`acorn-bigint`](https://github.com/acornjs/acorn-bigint): Parse [BigInt proposal](https://github.com/tc39/proposal-bigint)
|
|
||||||
- [`acorn-class-fields`](https://github.com/acornjs/acorn-class-fields): Parse [class fields proposal](https://github.com/tc39/proposal-class-fields)
|
- [`acorn-class-fields`](https://github.com/acornjs/acorn-class-fields): Parse [class fields proposal](https://github.com/tc39/proposal-class-fields)
|
||||||
- [`acorn-dynamic-import`](https://github.com/kesne/acorn-dynamic-import): Parse [import() proposal](https://github.com/tc39/proposal-dynamic-import)
|
|
||||||
- [`acorn-import-meta`](https://github.com/acornjs/acorn-import-meta): Parse [import.meta proposal](https://github.com/tc39/proposal-import-meta)
|
- [`acorn-import-meta`](https://github.com/acornjs/acorn-import-meta): Parse [import.meta proposal](https://github.com/tc39/proposal-import-meta)
|
||||||
- [`acorn-numeric-separator`](https://github.com/acornjs/acorn-numeric-separator): Parse [numeric separator proposal](https://github.com/tc39/proposal-numeric-separator)
|
- [`acorn-numeric-separator`](https://github.com/acornjs/acorn-numeric-separator): Parse [numeric separator proposal](https://github.com/tc39/proposal-numeric-separator)
|
||||||
- [`acorn-private-methods`](https://github.com/acornjs/acorn-private-methods): parse [private methods, getters and setters proposal](https://github.com/tc39/proposal-private-methods)n
|
- [`acorn-private-methods`](https://github.com/acornjs/acorn-private-methods): parse [private methods, getters and setters proposal](https://github.com/tc39/proposal-private-methods)n
|
||||||
|
12
node_modules/acorn/dist/acorn.d.ts
generated
vendored
12
node_modules/acorn/dist/acorn.d.ts
generated
vendored
@@ -16,7 +16,7 @@ declare namespace acorn {
|
|||||||
sourceType?: 'script' | 'module'
|
sourceType?: 'script' | 'module'
|
||||||
onInsertedSemicolon?: (lastTokEnd: number, lastTokEndLoc?: Position) => void
|
onInsertedSemicolon?: (lastTokEnd: number, lastTokEndLoc?: Position) => void
|
||||||
onTrailingComma?: (lastTokEnd: number, lastTokEndLoc?: Position) => void
|
onTrailingComma?: (lastTokEnd: number, lastTokEndLoc?: Position) => void
|
||||||
allowReserved?: boolean
|
allowReserved?: boolean | 'never'
|
||||||
allowReturnOutsideFunction?: boolean
|
allowReturnOutsideFunction?: boolean
|
||||||
allowImportExportEverywhere?: boolean
|
allowImportExportEverywhere?: boolean
|
||||||
allowAwaitOutsideFunction?: boolean
|
allowAwaitOutsideFunction?: boolean
|
||||||
@@ -36,14 +36,14 @@ declare namespace acorn {
|
|||||||
|
|
||||||
class Parser {
|
class Parser {
|
||||||
constructor(options: Options, input: string, startPos?: number)
|
constructor(options: Options, input: string, startPos?: number)
|
||||||
parse(): Node
|
parse(this: Parser): Node
|
||||||
static parse(input: string, options?: Options): Node
|
static parse(this: typeof Parser, input: string, options?: Options): Node
|
||||||
static parseExpressionAt(input: string, pos: number, options?: Options): Node
|
static parseExpressionAt(this: typeof Parser, input: string, pos: number, options?: Options): Node
|
||||||
static tokenizer(input: string, options?: Options): {
|
static tokenizer(this: typeof Parser, input: string, options?: Options): {
|
||||||
getToken(): Token
|
getToken(): Token
|
||||||
[Symbol.iterator](): Iterator<Token>
|
[Symbol.iterator](): Iterator<Token>
|
||||||
}
|
}
|
||||||
static extend(...plugins: ((BaseParser: typeof Parser) => typeof Parser)[]): typeof Parser
|
static extend(this: typeof Parser, ...plugins: ((BaseParser: typeof Parser) => typeof Parser)[]): typeof Parser
|
||||||
}
|
}
|
||||||
|
|
||||||
interface Position { line: number; column: number; offset: number }
|
interface Position { line: number; column: number; offset: number }
|
||||||
|
2580
node_modules/acorn/dist/acorn.js
generated
vendored
2580
node_modules/acorn/dist/acorn.js
generated
vendored
File diff suppressed because it is too large
Load Diff
862
node_modules/acorn/dist/acorn.mjs
generated
vendored
862
node_modules/acorn/dist/acorn.mjs
generated
vendored
File diff suppressed because it is too large
Load Diff
12
node_modules/acorn/dist/bin.js
generated
vendored
12
node_modules/acorn/dist/bin.js
generated
vendored
@@ -4,11 +4,7 @@ var path = require('path');
|
|||||||
var fs = require('fs');
|
var fs = require('fs');
|
||||||
var acorn = require('./acorn.js');
|
var acorn = require('./acorn.js');
|
||||||
|
|
||||||
var infile;
|
var infile, forceFile, silent = false, compact = false, tokenize = false;
|
||||||
var forceFile;
|
|
||||||
var silent = false;
|
|
||||||
var compact = false;
|
|
||||||
var tokenize = false;
|
|
||||||
var options = {};
|
var options = {};
|
||||||
|
|
||||||
function help(status) {
|
function help(status) {
|
||||||
@@ -45,14 +41,14 @@ function run(code) {
|
|||||||
result = acorn.parse(code, options);
|
result = acorn.parse(code, options);
|
||||||
} else {
|
} else {
|
||||||
result = [];
|
result = [];
|
||||||
var tokenizer$$1 = acorn.tokenizer(code, options), token;
|
var tokenizer = acorn.tokenizer(code, options), token;
|
||||||
do {
|
do {
|
||||||
token = tokenizer$$1.getToken();
|
token = tokenizer.getToken();
|
||||||
result.push(token);
|
result.push(token);
|
||||||
} while (token.type !== acorn.tokTypes.eof)
|
} while (token.type !== acorn.tokTypes.eof)
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error(e.message);
|
console.error(infile && infile !== "-" ? e.message.replace(/\(\d+:\d+\)$/, function (m) { return m.slice(0, 1) + infile + " " + m.slice(1); }) : e.message);
|
||||||
process.exit(1);
|
process.exit(1);
|
||||||
}
|
}
|
||||||
if (!silent) { console.log(JSON.stringify(result, null, compact ? null : 2)); }
|
if (!silent) { console.log(JSON.stringify(result, null, compact ? null : 2)); }
|
||||||
|
12
node_modules/acorn/package.json
generated
vendored
12
node_modules/acorn/package.json
generated
vendored
@@ -1,8 +1,8 @@
|
|||||||
{
|
{
|
||||||
"_from": "acorn@^6.0.4",
|
"_from": "acorn@^6.0.4",
|
||||||
"_id": "acorn@6.1.1",
|
"_id": "acorn@6.4.0",
|
||||||
"_inBundle": false,
|
"_inBundle": false,
|
||||||
"_integrity": "sha512-jPTiwtOxaHNaAPg/dmrJ/beuzLRnXtB0kQPQ8JpotKJgTB6rX6c8mlf315941pyjBSaPg8NHXS9fhP4u17DpGA==",
|
"_integrity": "sha512-gac8OEcQ2Li1dxIEWGZzsp2BitJxwkwcOm0zHAJLcPJaVvm58FRnk6RkuLRpU1EujipU2ZFODv2P9DLMfnV8mw==",
|
||||||
"_location": "/acorn",
|
"_location": "/acorn",
|
||||||
"_phantomChildren": {},
|
"_phantomChildren": {},
|
||||||
"_requested": {
|
"_requested": {
|
||||||
@@ -19,12 +19,12 @@
|
|||||||
"/acorn-globals",
|
"/acorn-globals",
|
||||||
"/jsdom"
|
"/jsdom"
|
||||||
],
|
],
|
||||||
"_resolved": "https://registry.npmjs.org/acorn/-/acorn-6.1.1.tgz",
|
"_resolved": "https://registry.npmjs.org/acorn/-/acorn-6.4.0.tgz",
|
||||||
"_shasum": "7d25ae05bb8ad1f9b699108e1094ecd7884adc1f",
|
"_shasum": "b659d2ffbafa24baf5db1cdbb2c94a983ecd2784",
|
||||||
"_spec": "acorn@^6.0.4",
|
"_spec": "acorn@^6.0.4",
|
||||||
"_where": "F:\\projects\\p\\minifyfromhtml\\node_modules\\jsdom",
|
"_where": "F:\\projects\\p\\minifyfromhtml\\node_modules\\jsdom",
|
||||||
"bin": {
|
"bin": {
|
||||||
"acorn": "./bin/acorn"
|
"acorn": "bin/acorn"
|
||||||
},
|
},
|
||||||
"bugs": {
|
"bugs": {
|
||||||
"url": "https://github.com/acornjs/acorn/issues"
|
"url": "https://github.com/acornjs/acorn/issues"
|
||||||
@@ -63,5 +63,5 @@
|
|||||||
"scripts": {
|
"scripts": {
|
||||||
"prepare": "cd ..; npm run build:main && npm run build:bin"
|
"prepare": "cd ..; npm run build:main && npm run build:bin"
|
||||||
},
|
},
|
||||||
"version": "6.1.1"
|
"version": "6.4.0"
|
||||||
}
|
}
|
||||||
|
52
node_modules/ajv/README.md
generated
vendored
52
node_modules/ajv/README.md
generated
vendored
@@ -11,7 +11,6 @@ The fastest JSON Schema validator for Node.js and browser. Supports draft-04/06/
|
|||||||
[](https://greenkeeper.io/)
|
[](https://greenkeeper.io/)
|
||||||
[](https://gitter.im/ajv-validator/ajv)
|
[](https://gitter.im/ajv-validator/ajv)
|
||||||
|
|
||||||
### _Ajv and [related repositories](#related-packages) will be transfered to [ajv-validator](https://github.com/ajv-validator) org_
|
|
||||||
|
|
||||||
## Using version 6
|
## Using version 6
|
||||||
|
|
||||||
@@ -53,7 +52,12 @@ ajv.addMetaSchema(require('ajv/lib/refs/json-schema-draft-04.json'));
|
|||||||
- [Defining custom keywords](#defining-custom-keywords)
|
- [Defining custom keywords](#defining-custom-keywords)
|
||||||
- [Asynchronous schema compilation](#asynchronous-schema-compilation)
|
- [Asynchronous schema compilation](#asynchronous-schema-compilation)
|
||||||
- [Asynchronous validation](#asynchronous-validation)
|
- [Asynchronous validation](#asynchronous-validation)
|
||||||
- [Security considerations](#security-considerations)
|
- [Security considerations](#security-considerations)
|
||||||
|
- [Security contact](#security-contact)
|
||||||
|
- [Untrusted schemas](#untrusted-schemas)
|
||||||
|
- [Circular references in objects](#circular-references-in-javascript-objects)
|
||||||
|
- [Trusted schemas](#security-risks-of-trusted-schemas)
|
||||||
|
- [ReDoS attack](#redos-attack)
|
||||||
- Modifying data during validation
|
- Modifying data during validation
|
||||||
- [Filtering data](#filtering-data)
|
- [Filtering data](#filtering-data)
|
||||||
- [Assigning defaults](#assigning-defaults)
|
- [Assigning defaults](#assigning-defaults)
|
||||||
@@ -65,7 +69,7 @@ ajv.addMetaSchema(require('ajv/lib/refs/json-schema-draft-04.json'));
|
|||||||
- [Plugins](#plugins)
|
- [Plugins](#plugins)
|
||||||
- [Related packages](#related-packages)
|
- [Related packages](#related-packages)
|
||||||
- [Some packages using Ajv](#some-packages-using-ajv)
|
- [Some packages using Ajv](#some-packages-using-ajv)
|
||||||
- [Tests, Contributing, History, License](#tests)
|
- [Tests, Contributing, History, Support, License](#tests)
|
||||||
|
|
||||||
|
|
||||||
## Performance
|
## Performance
|
||||||
@@ -227,7 +231,7 @@ JSON Schema specification defines several annotation keywords that describe sche
|
|||||||
- `title` and `description`: information about the data represented by that schema
|
- `title` and `description`: information about the data represented by that schema
|
||||||
- `$comment` (NEW in draft-07): information for developers. With option `$comment` Ajv logs or passes the comment string to the user-supplied function. See [Options](#options).
|
- `$comment` (NEW in draft-07): information for developers. With option `$comment` Ajv logs or passes the comment string to the user-supplied function. See [Options](#options).
|
||||||
- `default`: a default value of the data instance, see [Assigning defaults](#assigning-defaults).
|
- `default`: a default value of the data instance, see [Assigning defaults](#assigning-defaults).
|
||||||
- `examples` (NEW in draft-07): an array of data instances. Ajv does not check the validity of these instances against the schema.
|
- `examples` (NEW in draft-06): an array of data instances. Ajv does not check the validity of these instances against the schema.
|
||||||
- `readOnly` and `writeOnly` (NEW in draft-07): marks data-instance as read-only or write-only in relation to the source of the data (database, api, etc.).
|
- `readOnly` and `writeOnly` (NEW in draft-07): marks data-instance as read-only or write-only in relation to the source of the data (database, api, etc.).
|
||||||
- `contentEncoding`: [RFC 2045](https://tools.ietf.org/html/rfc2045#section-6.1 ), e.g., "base64".
|
- `contentEncoding`: [RFC 2045](https://tools.ietf.org/html/rfc2045#section-6.1 ), e.g., "base64".
|
||||||
- `contentMediaType`: [RFC 2046](https://tools.ietf.org/html/rfc2046), e.g., "image/png".
|
- `contentMediaType`: [RFC 2046](https://tools.ietf.org/html/rfc2046), e.g., "image/png".
|
||||||
@@ -237,7 +241,11 @@ __Please note__: Ajv does not implement validation of the keywords `examples`,
|
|||||||
|
|
||||||
## Formats
|
## Formats
|
||||||
|
|
||||||
The following formats are supported for string validation with "format" keyword:
|
Ajv implements formats defined by JSON Schema specification and several other formats. It is recommended NOT to use "format" keyword implementations with untrusted data, as they use potentially unsafe regular expressions - see [ReDoS attack](#redos-attack).
|
||||||
|
|
||||||
|
__Please note__: if you need to use "format" keyword to validate untrusted data, you MUST assess their suitability and safety for your validation scenarios.
|
||||||
|
|
||||||
|
The following formats are implemented for string validation with "format" keyword:
|
||||||
|
|
||||||
- _date_: full-date according to [RFC3339](http://tools.ietf.org/html/rfc3339#section-5.6).
|
- _date_: full-date according to [RFC3339](http://tools.ietf.org/html/rfc3339#section-5.6).
|
||||||
- _time_: time with optional time-zone.
|
- _time_: time with optional time-zone.
|
||||||
@@ -611,6 +619,13 @@ See [Options](#options).
|
|||||||
JSON Schema, if properly used, can replace data sanitisation. It doesn't replace other API security considerations. It also introduces additional security aspects to consider.
|
JSON Schema, if properly used, can replace data sanitisation. It doesn't replace other API security considerations. It also introduces additional security aspects to consider.
|
||||||
|
|
||||||
|
|
||||||
|
##### Security contact
|
||||||
|
|
||||||
|
To report a security vulnerability, please use the
|
||||||
|
[Tidelift security contact](https://tidelift.com/security).
|
||||||
|
Tidelift will coordinate the fix and disclosure. Please do NOT report security vulnerabilities via GitHub issues.
|
||||||
|
|
||||||
|
|
||||||
##### Untrusted schemas
|
##### Untrusted schemas
|
||||||
|
|
||||||
Ajv treats JSON schemas as trusted as your application code. This security model is based on the most common use case, when the schemas are static and bundled together with the application.
|
Ajv treats JSON schemas as trusted as your application code. This security model is based on the most common use case, when the schemas are static and bundled together with the application.
|
||||||
@@ -636,9 +651,9 @@ An attempt to compile such schemas or validate such data would cause stack overf
|
|||||||
|
|
||||||
Some keywords in JSON Schemas can lead to very slow validation for certain data. These keywords include (but may be not limited to):
|
Some keywords in JSON Schemas can lead to very slow validation for certain data. These keywords include (but may be not limited to):
|
||||||
|
|
||||||
- `pattern` and `format` for large strings - use `maxLength` to mitigate
|
- `pattern` and `format` for large strings - in some cases using `maxLength` can help mitigate it, but certain regular expressions can lead to exponential validation time even with relatively short strings (see [ReDoS attack](#redos-attack)).
|
||||||
|
- `patternProperties` for large property names - use `propertyNames` to mitigate, but some regular expressions can have exponential evaluation time as well.
|
||||||
- `uniqueItems` for large non-scalar arrays - use `maxItems` to mitigate
|
- `uniqueItems` for large non-scalar arrays - use `maxItems` to mitigate
|
||||||
- `patternProperties` for large property names - use `propertyNames` to mitigate
|
|
||||||
|
|
||||||
__Please note__: The suggestions above to prevent slow validation would only work if you do NOT use `allErrors: true` in production code (using it would continue validation after validation errors).
|
__Please note__: The suggestions above to prevent slow validation would only work if you do NOT use `allErrors: true` in production code (using it would continue validation after validation errors).
|
||||||
|
|
||||||
@@ -650,13 +665,29 @@ const isSchemaSecure = ajv.compile(require('ajv/lib/refs/json-schema-secure.json
|
|||||||
const schema1 = {format: 'email'};
|
const schema1 = {format: 'email'};
|
||||||
isSchemaSecure(schema1); // false
|
isSchemaSecure(schema1); // false
|
||||||
|
|
||||||
const schema2 = {format: 'email', maxLength: 256};
|
const schema2 = {format: 'email', maxLength: MAX_LENGTH};
|
||||||
isSchemaSecure(schema2); // true
|
isSchemaSecure(schema2); // true
|
||||||
```
|
```
|
||||||
|
|
||||||
__Please note__: following all these recommendation is not a guarantee that validation of untrusted data is safe - it can still lead to some undesirable results.
|
__Please note__: following all these recommendation is not a guarantee that validation of untrusted data is safe - it can still lead to some undesirable results.
|
||||||
|
|
||||||
|
|
||||||
|
## ReDoS attack
|
||||||
|
|
||||||
|
Certain regular expressions can lead to the exponential evaluation time even with relatively short strings.
|
||||||
|
|
||||||
|
Please assess the regular expressions you use in the schemas on their vulnerability to this attack - see [safe-regex](https://github.com/substack/safe-regex), for example.
|
||||||
|
|
||||||
|
__Please note__: some formats that Ajv implements use [regular expressions](https://github.com/epoberezkin/ajv/blob/master/lib/compile/formats.js) that can be vulnerable to ReDoS attack, so if you use Ajv to validate data from untrusted sources __it is strongly recommended__ to consider the following:
|
||||||
|
|
||||||
|
- making assessment of "format" implementations in Ajv.
|
||||||
|
- using `format: 'fast'` option that simplifies some of the regular expressions (although it does not guarantee that they are safe).
|
||||||
|
- replacing format implementations provided by Ajv with your own implementations of "format" keyword that either uses different regular expressions or another approach to format validation. Please see [addFormat](#api-addformat) method.
|
||||||
|
- disabling format validation by ignoring "format" keyword with option `format: false`
|
||||||
|
|
||||||
|
Whatever mitigation you choose, please assume all formats provided by Ajv as potentially unsafe and make your own assessment of their suitability for your validation scenarios.
|
||||||
|
|
||||||
|
|
||||||
## Filtering data
|
## Filtering data
|
||||||
|
|
||||||
With [option `removeAdditional`](#options) (added by [andyscott](https://github.com/andyscott)) you can filter data during the validation.
|
With [option `removeAdditional`](#options) (added by [andyscott](https://github.com/andyscott)) you can filter data during the validation.
|
||||||
@@ -1339,6 +1370,11 @@ __Please note__: [Changes in version 6.0.0](https://github.com/epoberezkin/ajv/r
|
|||||||
[Version 2.0.0](https://github.com/epoberezkin/ajv/releases/tag/2.0.0).
|
[Version 2.0.0](https://github.com/epoberezkin/ajv/releases/tag/2.0.0).
|
||||||
|
|
||||||
|
|
||||||
|
## Open-source software support
|
||||||
|
|
||||||
|
Ajv is a part of [Tidelift subscription](https://tidelift.com/subscription/pkg/npm-ajv?utm_source=npm-ajv&utm_medium=referral&utm_campaign=readme) - it provides a centralised support to open-source software users, in addition to the support provided by software maintainers.
|
||||||
|
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
[MIT](https://github.com/epoberezkin/ajv/blob/master/LICENSE)
|
[MIT](https://github.com/epoberezkin/ajv/blob/master/LICENSE)
|
||||||
|
222
node_modules/ajv/dist/ajv.bundle.js
generated
vendored
222
node_modules/ajv/dist/ajv.bundle.js
generated
vendored
@@ -161,7 +161,7 @@ var util = require('./util');
|
|||||||
|
|
||||||
var DATE = /^(\d\d\d\d)-(\d\d)-(\d\d)$/;
|
var DATE = /^(\d\d\d\d)-(\d\d)-(\d\d)$/;
|
||||||
var DAYS = [0,31,28,31,30,31,30,31,31,30,31,30,31];
|
var DAYS = [0,31,28,31,30,31,30,31,31,30,31,30,31];
|
||||||
var TIME = /^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d:\d\d)?$/i;
|
var TIME = /^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i;
|
||||||
var HOSTNAME = /^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*$/i;
|
var HOSTNAME = /^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*$/i;
|
||||||
var URI = /^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;
|
var URI = /^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;
|
||||||
var URIREF = /^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;
|
var URIREF = /^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;
|
||||||
@@ -190,8 +190,8 @@ formats.fast = {
|
|||||||
// date: http://tools.ietf.org/html/rfc3339#section-5.6
|
// date: http://tools.ietf.org/html/rfc3339#section-5.6
|
||||||
date: /^\d\d\d\d-[0-1]\d-[0-3]\d$/,
|
date: /^\d\d\d\d-[0-1]\d-[0-3]\d$/,
|
||||||
// date-time: http://tools.ietf.org/html/rfc3339#section-5.6
|
// date-time: http://tools.ietf.org/html/rfc3339#section-5.6
|
||||||
time: /^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d:\d\d)?$/i,
|
time: /^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,
|
||||||
'date-time': /^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d:\d\d)$/i,
|
'date-time': /^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,
|
||||||
// uri: https://github.com/mafintosh/is-my-json-valid/blob/master/formats.js
|
// uri: https://github.com/mafintosh/is-my-json-valid/blob/master/formats.js
|
||||||
uri: /^(?:[a-z][a-z0-9+-.]*:)(?:\/?\/)?[^\s]*$/i,
|
uri: /^(?:[a-z][a-z0-9+-.]*:)(?:\/?\/)?[^\s]*$/i,
|
||||||
'uri-reference': /^(?:(?:[a-z][a-z0-9+-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,
|
'uri-reference': /^(?:(?:[a-z][a-z0-9+-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,
|
||||||
@@ -694,7 +694,7 @@ function vars(arr, statement) {
|
|||||||
return code;
|
return code;
|
||||||
}
|
}
|
||||||
|
|
||||||
},{"../dotjs/validate":37,"./error_classes":3,"./resolve":6,"./util":10,"fast-deep-equal":41,"fast-json-stable-stringify":42}],6:[function(require,module,exports){
|
},{"../dotjs/validate":38,"./error_classes":3,"./resolve":6,"./util":10,"fast-deep-equal":42,"fast-json-stable-stringify":43}],6:[function(require,module,exports){
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
var URI = require('uri-js')
|
var URI = require('uri-js')
|
||||||
@@ -966,7 +966,7 @@ function resolveIds(schema) {
|
|||||||
return localRefs;
|
return localRefs;
|
||||||
}
|
}
|
||||||
|
|
||||||
},{"./schema_obj":8,"./util":10,"fast-deep-equal":41,"json-schema-traverse":43,"uri-js":44}],7:[function(require,module,exports){
|
},{"./schema_obj":8,"./util":10,"fast-deep-equal":42,"json-schema-traverse":44,"uri-js":45}],7:[function(require,module,exports){
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
var ruleModules = require('../dotjs')
|
var ruleModules = require('../dotjs')
|
||||||
@@ -1034,7 +1034,7 @@ module.exports = function rules() {
|
|||||||
return RULES;
|
return RULES;
|
||||||
};
|
};
|
||||||
|
|
||||||
},{"../dotjs":26,"./util":10}],8:[function(require,module,exports){
|
},{"../dotjs":27,"./util":10}],8:[function(require,module,exports){
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
var util = require('./util');
|
var util = require('./util');
|
||||||
@@ -1343,7 +1343,7 @@ function unescapeJsonPointer(str) {
|
|||||||
return str.replace(/~1/g, '/').replace(/~0/g, '~');
|
return str.replace(/~1/g, '/').replace(/~0/g, '~');
|
||||||
}
|
}
|
||||||
|
|
||||||
},{"./ucs2length":9,"fast-deep-equal":41}],11:[function(require,module,exports){
|
},{"./ucs2length":9,"fast-deep-equal":42}],11:[function(require,module,exports){
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
var KEYWORDS = [
|
var KEYWORDS = [
|
||||||
@@ -1396,6 +1396,45 @@ module.exports = function (metaSchema, keywordsJsonPointers) {
|
|||||||
|
|
||||||
},{}],12:[function(require,module,exports){
|
},{}],12:[function(require,module,exports){
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
|
var metaSchema = require('./refs/json-schema-draft-07.json');
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
$id: 'https://github.com/epoberezkin/ajv/blob/master/lib/definition_schema.js',
|
||||||
|
definitions: {
|
||||||
|
simpleTypes: metaSchema.definitions.simpleTypes
|
||||||
|
},
|
||||||
|
type: 'object',
|
||||||
|
dependencies: {
|
||||||
|
schema: ['validate'],
|
||||||
|
$data: ['validate'],
|
||||||
|
statements: ['inline'],
|
||||||
|
valid: {not: {required: ['macro']}}
|
||||||
|
},
|
||||||
|
properties: {
|
||||||
|
type: metaSchema.properties.type,
|
||||||
|
schema: {type: 'boolean'},
|
||||||
|
statements: {type: 'boolean'},
|
||||||
|
dependencies: {
|
||||||
|
type: 'array',
|
||||||
|
items: {type: 'string'}
|
||||||
|
},
|
||||||
|
metaSchema: {type: 'object'},
|
||||||
|
modifying: {type: 'boolean'},
|
||||||
|
valid: {type: 'boolean'},
|
||||||
|
$data: {type: 'boolean'},
|
||||||
|
async: {type: 'boolean'},
|
||||||
|
errors: {
|
||||||
|
anyOf: [
|
||||||
|
{type: 'boolean'},
|
||||||
|
{const: 'full'}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
},{"./refs/json-schema-draft-07.json":41}],13:[function(require,module,exports){
|
||||||
|
'use strict';
|
||||||
module.exports = function generate__limit(it, $keyword, $ruleType) {
|
module.exports = function generate__limit(it, $keyword, $ruleType) {
|
||||||
var out = ' ';
|
var out = ' ';
|
||||||
var $lvl = it.level;
|
var $lvl = it.level;
|
||||||
@@ -1553,7 +1592,7 @@ module.exports = function generate__limit(it, $keyword, $ruleType) {
|
|||||||
return out;
|
return out;
|
||||||
}
|
}
|
||||||
|
|
||||||
},{}],13:[function(require,module,exports){
|
},{}],14:[function(require,module,exports){
|
||||||
'use strict';
|
'use strict';
|
||||||
module.exports = function generate__limitItems(it, $keyword, $ruleType) {
|
module.exports = function generate__limitItems(it, $keyword, $ruleType) {
|
||||||
var out = ' ';
|
var out = ' ';
|
||||||
@@ -1632,7 +1671,7 @@ module.exports = function generate__limitItems(it, $keyword, $ruleType) {
|
|||||||
return out;
|
return out;
|
||||||
}
|
}
|
||||||
|
|
||||||
},{}],14:[function(require,module,exports){
|
},{}],15:[function(require,module,exports){
|
||||||
'use strict';
|
'use strict';
|
||||||
module.exports = function generate__limitLength(it, $keyword, $ruleType) {
|
module.exports = function generate__limitLength(it, $keyword, $ruleType) {
|
||||||
var out = ' ';
|
var out = ' ';
|
||||||
@@ -1716,7 +1755,7 @@ module.exports = function generate__limitLength(it, $keyword, $ruleType) {
|
|||||||
return out;
|
return out;
|
||||||
}
|
}
|
||||||
|
|
||||||
},{}],15:[function(require,module,exports){
|
},{}],16:[function(require,module,exports){
|
||||||
'use strict';
|
'use strict';
|
||||||
module.exports = function generate__limitProperties(it, $keyword, $ruleType) {
|
module.exports = function generate__limitProperties(it, $keyword, $ruleType) {
|
||||||
var out = ' ';
|
var out = ' ';
|
||||||
@@ -1795,7 +1834,7 @@ module.exports = function generate__limitProperties(it, $keyword, $ruleType) {
|
|||||||
return out;
|
return out;
|
||||||
}
|
}
|
||||||
|
|
||||||
},{}],16:[function(require,module,exports){
|
},{}],17:[function(require,module,exports){
|
||||||
'use strict';
|
'use strict';
|
||||||
module.exports = function generate_allOf(it, $keyword, $ruleType) {
|
module.exports = function generate_allOf(it, $keyword, $ruleType) {
|
||||||
var out = ' ';
|
var out = ' ';
|
||||||
@@ -1815,7 +1854,7 @@ module.exports = function generate_allOf(it, $keyword, $ruleType) {
|
|||||||
l1 = arr1.length - 1;
|
l1 = arr1.length - 1;
|
||||||
while ($i < l1) {
|
while ($i < l1) {
|
||||||
$sch = arr1[$i += 1];
|
$sch = arr1[$i += 1];
|
||||||
if (it.util.schemaHasRules($sch, it.RULES.all)) {
|
if ((it.opts.strictKeywords ? typeof $sch == 'object' && Object.keys($sch).length > 0 : it.util.schemaHasRules($sch, it.RULES.all))) {
|
||||||
$allSchemasEmpty = false;
|
$allSchemasEmpty = false;
|
||||||
$it.schema = $sch;
|
$it.schema = $sch;
|
||||||
$it.schemaPath = $schemaPath + '[' + $i + ']';
|
$it.schemaPath = $schemaPath + '[' + $i + ']';
|
||||||
@@ -1840,7 +1879,7 @@ module.exports = function generate_allOf(it, $keyword, $ruleType) {
|
|||||||
return out;
|
return out;
|
||||||
}
|
}
|
||||||
|
|
||||||
},{}],17:[function(require,module,exports){
|
},{}],18:[function(require,module,exports){
|
||||||
'use strict';
|
'use strict';
|
||||||
module.exports = function generate_anyOf(it, $keyword, $ruleType) {
|
module.exports = function generate_anyOf(it, $keyword, $ruleType) {
|
||||||
var out = ' ';
|
var out = ' ';
|
||||||
@@ -1858,7 +1897,7 @@ module.exports = function generate_anyOf(it, $keyword, $ruleType) {
|
|||||||
$it.level++;
|
$it.level++;
|
||||||
var $nextValid = 'valid' + $it.level;
|
var $nextValid = 'valid' + $it.level;
|
||||||
var $noEmptySchema = $schema.every(function($sch) {
|
var $noEmptySchema = $schema.every(function($sch) {
|
||||||
return it.util.schemaHasRules($sch, it.RULES.all);
|
return (it.opts.strictKeywords ? typeof $sch == 'object' && Object.keys($sch).length > 0 : it.util.schemaHasRules($sch, it.RULES.all));
|
||||||
});
|
});
|
||||||
if ($noEmptySchema) {
|
if ($noEmptySchema) {
|
||||||
var $currentBaseId = $it.baseId;
|
var $currentBaseId = $it.baseId;
|
||||||
@@ -1916,7 +1955,7 @@ module.exports = function generate_anyOf(it, $keyword, $ruleType) {
|
|||||||
return out;
|
return out;
|
||||||
}
|
}
|
||||||
|
|
||||||
},{}],18:[function(require,module,exports){
|
},{}],19:[function(require,module,exports){
|
||||||
'use strict';
|
'use strict';
|
||||||
module.exports = function generate_comment(it, $keyword, $ruleType) {
|
module.exports = function generate_comment(it, $keyword, $ruleType) {
|
||||||
var out = ' ';
|
var out = ' ';
|
||||||
@@ -1932,7 +1971,7 @@ module.exports = function generate_comment(it, $keyword, $ruleType) {
|
|||||||
return out;
|
return out;
|
||||||
}
|
}
|
||||||
|
|
||||||
},{}],19:[function(require,module,exports){
|
},{}],20:[function(require,module,exports){
|
||||||
'use strict';
|
'use strict';
|
||||||
module.exports = function generate_const(it, $keyword, $ruleType) {
|
module.exports = function generate_const(it, $keyword, $ruleType) {
|
||||||
var out = ' ';
|
var out = ' ';
|
||||||
@@ -1990,7 +2029,7 @@ module.exports = function generate_const(it, $keyword, $ruleType) {
|
|||||||
return out;
|
return out;
|
||||||
}
|
}
|
||||||
|
|
||||||
},{}],20:[function(require,module,exports){
|
},{}],21:[function(require,module,exports){
|
||||||
'use strict';
|
'use strict';
|
||||||
module.exports = function generate_contains(it, $keyword, $ruleType) {
|
module.exports = function generate_contains(it, $keyword, $ruleType) {
|
||||||
var out = ' ';
|
var out = ' ';
|
||||||
@@ -2011,7 +2050,7 @@ module.exports = function generate_contains(it, $keyword, $ruleType) {
|
|||||||
$dataNxt = $it.dataLevel = it.dataLevel + 1,
|
$dataNxt = $it.dataLevel = it.dataLevel + 1,
|
||||||
$nextData = 'data' + $dataNxt,
|
$nextData = 'data' + $dataNxt,
|
||||||
$currentBaseId = it.baseId,
|
$currentBaseId = it.baseId,
|
||||||
$nonEmptySchema = it.util.schemaHasRules($schema, it.RULES.all);
|
$nonEmptySchema = (it.opts.strictKeywords ? typeof $schema == 'object' && Object.keys($schema).length > 0 : it.util.schemaHasRules($schema, it.RULES.all));
|
||||||
out += 'var ' + ($errs) + ' = errors;var ' + ($valid) + ';';
|
out += 'var ' + ($errs) + ' = errors;var ' + ($valid) + ';';
|
||||||
if ($nonEmptySchema) {
|
if ($nonEmptySchema) {
|
||||||
var $wasComposite = it.compositeRule;
|
var $wasComposite = it.compositeRule;
|
||||||
@@ -2074,7 +2113,7 @@ module.exports = function generate_contains(it, $keyword, $ruleType) {
|
|||||||
return out;
|
return out;
|
||||||
}
|
}
|
||||||
|
|
||||||
},{}],21:[function(require,module,exports){
|
},{}],22:[function(require,module,exports){
|
||||||
'use strict';
|
'use strict';
|
||||||
module.exports = function generate_custom(it, $keyword, $ruleType) {
|
module.exports = function generate_custom(it, $keyword, $ruleType) {
|
||||||
var out = ' ';
|
var out = ' ';
|
||||||
@@ -2304,7 +2343,7 @@ module.exports = function generate_custom(it, $keyword, $ruleType) {
|
|||||||
return out;
|
return out;
|
||||||
}
|
}
|
||||||
|
|
||||||
},{}],22:[function(require,module,exports){
|
},{}],23:[function(require,module,exports){
|
||||||
'use strict';
|
'use strict';
|
||||||
module.exports = function generate_dependencies(it, $keyword, $ruleType) {
|
module.exports = function generate_dependencies(it, $keyword, $ruleType) {
|
||||||
var out = ' ';
|
var out = ' ';
|
||||||
@@ -2449,7 +2488,7 @@ module.exports = function generate_dependencies(it, $keyword, $ruleType) {
|
|||||||
var $currentBaseId = $it.baseId;
|
var $currentBaseId = $it.baseId;
|
||||||
for (var $property in $schemaDeps) {
|
for (var $property in $schemaDeps) {
|
||||||
var $sch = $schemaDeps[$property];
|
var $sch = $schemaDeps[$property];
|
||||||
if (it.util.schemaHasRules($sch, it.RULES.all)) {
|
if ((it.opts.strictKeywords ? typeof $sch == 'object' && Object.keys($sch).length > 0 : it.util.schemaHasRules($sch, it.RULES.all))) {
|
||||||
out += ' ' + ($nextValid) + ' = true; if ( ' + ($data) + (it.util.getProperty($property)) + ' !== undefined ';
|
out += ' ' + ($nextValid) + ' = true; if ( ' + ($data) + (it.util.getProperty($property)) + ' !== undefined ';
|
||||||
if ($ownProperties) {
|
if ($ownProperties) {
|
||||||
out += ' && Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($property)) + '\') ';
|
out += ' && Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($property)) + '\') ';
|
||||||
@@ -2474,7 +2513,7 @@ module.exports = function generate_dependencies(it, $keyword, $ruleType) {
|
|||||||
return out;
|
return out;
|
||||||
}
|
}
|
||||||
|
|
||||||
},{}],23:[function(require,module,exports){
|
},{}],24:[function(require,module,exports){
|
||||||
'use strict';
|
'use strict';
|
||||||
module.exports = function generate_enum(it, $keyword, $ruleType) {
|
module.exports = function generate_enum(it, $keyword, $ruleType) {
|
||||||
var out = ' ';
|
var out = ' ';
|
||||||
@@ -2542,7 +2581,7 @@ module.exports = function generate_enum(it, $keyword, $ruleType) {
|
|||||||
return out;
|
return out;
|
||||||
}
|
}
|
||||||
|
|
||||||
},{}],24:[function(require,module,exports){
|
},{}],25:[function(require,module,exports){
|
||||||
'use strict';
|
'use strict';
|
||||||
module.exports = function generate_format(it, $keyword, $ruleType) {
|
module.exports = function generate_format(it, $keyword, $ruleType) {
|
||||||
var out = ' ';
|
var out = ' ';
|
||||||
@@ -2694,7 +2733,7 @@ module.exports = function generate_format(it, $keyword, $ruleType) {
|
|||||||
return out;
|
return out;
|
||||||
}
|
}
|
||||||
|
|
||||||
},{}],25:[function(require,module,exports){
|
},{}],26:[function(require,module,exports){
|
||||||
'use strict';
|
'use strict';
|
||||||
module.exports = function generate_if(it, $keyword, $ruleType) {
|
module.exports = function generate_if(it, $keyword, $ruleType) {
|
||||||
var out = ' ';
|
var out = ' ';
|
||||||
@@ -2712,8 +2751,8 @@ module.exports = function generate_if(it, $keyword, $ruleType) {
|
|||||||
var $nextValid = 'valid' + $it.level;
|
var $nextValid = 'valid' + $it.level;
|
||||||
var $thenSch = it.schema['then'],
|
var $thenSch = it.schema['then'],
|
||||||
$elseSch = it.schema['else'],
|
$elseSch = it.schema['else'],
|
||||||
$thenPresent = $thenSch !== undefined && it.util.schemaHasRules($thenSch, it.RULES.all),
|
$thenPresent = $thenSch !== undefined && (it.opts.strictKeywords ? typeof $thenSch == 'object' && Object.keys($thenSch).length > 0 : it.util.schemaHasRules($thenSch, it.RULES.all)),
|
||||||
$elsePresent = $elseSch !== undefined && it.util.schemaHasRules($elseSch, it.RULES.all),
|
$elsePresent = $elseSch !== undefined && (it.opts.strictKeywords ? typeof $elseSch == 'object' && Object.keys($elseSch).length > 0 : it.util.schemaHasRules($elseSch, it.RULES.all)),
|
||||||
$currentBaseId = $it.baseId;
|
$currentBaseId = $it.baseId;
|
||||||
if ($thenPresent || $elsePresent) {
|
if ($thenPresent || $elsePresent) {
|
||||||
var $ifClause;
|
var $ifClause;
|
||||||
@@ -2800,7 +2839,7 @@ module.exports = function generate_if(it, $keyword, $ruleType) {
|
|||||||
return out;
|
return out;
|
||||||
}
|
}
|
||||||
|
|
||||||
},{}],26:[function(require,module,exports){
|
},{}],27:[function(require,module,exports){
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
//all requires must be explicit because browserify won't work with dynamic requires
|
//all requires must be explicit because browserify won't work with dynamic requires
|
||||||
@@ -2835,7 +2874,7 @@ module.exports = {
|
|||||||
validate: require('./validate')
|
validate: require('./validate')
|
||||||
};
|
};
|
||||||
|
|
||||||
},{"./_limit":12,"./_limitItems":13,"./_limitLength":14,"./_limitProperties":15,"./allOf":16,"./anyOf":17,"./comment":18,"./const":19,"./contains":20,"./dependencies":22,"./enum":23,"./format":24,"./if":25,"./items":27,"./multipleOf":28,"./not":29,"./oneOf":30,"./pattern":31,"./properties":32,"./propertyNames":33,"./ref":34,"./required":35,"./uniqueItems":36,"./validate":37}],27:[function(require,module,exports){
|
},{"./_limit":13,"./_limitItems":14,"./_limitLength":15,"./_limitProperties":16,"./allOf":17,"./anyOf":18,"./comment":19,"./const":20,"./contains":21,"./dependencies":23,"./enum":24,"./format":25,"./if":26,"./items":28,"./multipleOf":29,"./not":30,"./oneOf":31,"./pattern":32,"./properties":33,"./propertyNames":34,"./ref":35,"./required":36,"./uniqueItems":37,"./validate":38}],28:[function(require,module,exports){
|
||||||
'use strict';
|
'use strict';
|
||||||
module.exports = function generate_items(it, $keyword, $ruleType) {
|
module.exports = function generate_items(it, $keyword, $ruleType) {
|
||||||
var out = ' ';
|
var out = ' ';
|
||||||
@@ -2904,7 +2943,7 @@ module.exports = function generate_items(it, $keyword, $ruleType) {
|
|||||||
l1 = arr1.length - 1;
|
l1 = arr1.length - 1;
|
||||||
while ($i < l1) {
|
while ($i < l1) {
|
||||||
$sch = arr1[$i += 1];
|
$sch = arr1[$i += 1];
|
||||||
if (it.util.schemaHasRules($sch, it.RULES.all)) {
|
if ((it.opts.strictKeywords ? typeof $sch == 'object' && Object.keys($sch).length > 0 : it.util.schemaHasRules($sch, it.RULES.all))) {
|
||||||
out += ' ' + ($nextValid) + ' = true; if (' + ($data) + '.length > ' + ($i) + ') { ';
|
out += ' ' + ($nextValid) + ' = true; if (' + ($data) + '.length > ' + ($i) + ') { ';
|
||||||
var $passData = $data + '[' + $i + ']';
|
var $passData = $data + '[' + $i + ']';
|
||||||
$it.schema = $sch;
|
$it.schema = $sch;
|
||||||
@@ -2927,7 +2966,7 @@ module.exports = function generate_items(it, $keyword, $ruleType) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (typeof $additionalItems == 'object' && it.util.schemaHasRules($additionalItems, it.RULES.all)) {
|
if (typeof $additionalItems == 'object' && (it.opts.strictKeywords ? typeof $additionalItems == 'object' && Object.keys($additionalItems).length > 0 : it.util.schemaHasRules($additionalItems, it.RULES.all))) {
|
||||||
$it.schema = $additionalItems;
|
$it.schema = $additionalItems;
|
||||||
$it.schemaPath = it.schemaPath + '.additionalItems';
|
$it.schemaPath = it.schemaPath + '.additionalItems';
|
||||||
$it.errSchemaPath = it.errSchemaPath + '/additionalItems';
|
$it.errSchemaPath = it.errSchemaPath + '/additionalItems';
|
||||||
@@ -2951,7 +2990,7 @@ module.exports = function generate_items(it, $keyword, $ruleType) {
|
|||||||
$closingBraces += '}';
|
$closingBraces += '}';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (it.util.schemaHasRules($schema, it.RULES.all)) {
|
} else if ((it.opts.strictKeywords ? typeof $schema == 'object' && Object.keys($schema).length > 0 : it.util.schemaHasRules($schema, it.RULES.all))) {
|
||||||
$it.schema = $schema;
|
$it.schema = $schema;
|
||||||
$it.schemaPath = $schemaPath;
|
$it.schemaPath = $schemaPath;
|
||||||
$it.errSchemaPath = $errSchemaPath;
|
$it.errSchemaPath = $errSchemaPath;
|
||||||
@@ -2978,7 +3017,7 @@ module.exports = function generate_items(it, $keyword, $ruleType) {
|
|||||||
return out;
|
return out;
|
||||||
}
|
}
|
||||||
|
|
||||||
},{}],28:[function(require,module,exports){
|
},{}],29:[function(require,module,exports){
|
||||||
'use strict';
|
'use strict';
|
||||||
module.exports = function generate_multipleOf(it, $keyword, $ruleType) {
|
module.exports = function generate_multipleOf(it, $keyword, $ruleType) {
|
||||||
var out = ' ';
|
var out = ' ';
|
||||||
@@ -3057,7 +3096,7 @@ module.exports = function generate_multipleOf(it, $keyword, $ruleType) {
|
|||||||
return out;
|
return out;
|
||||||
}
|
}
|
||||||
|
|
||||||
},{}],29:[function(require,module,exports){
|
},{}],30:[function(require,module,exports){
|
||||||
'use strict';
|
'use strict';
|
||||||
module.exports = function generate_not(it, $keyword, $ruleType) {
|
module.exports = function generate_not(it, $keyword, $ruleType) {
|
||||||
var out = ' ';
|
var out = ' ';
|
||||||
@@ -3072,7 +3111,7 @@ module.exports = function generate_not(it, $keyword, $ruleType) {
|
|||||||
var $it = it.util.copy(it);
|
var $it = it.util.copy(it);
|
||||||
$it.level++;
|
$it.level++;
|
||||||
var $nextValid = 'valid' + $it.level;
|
var $nextValid = 'valid' + $it.level;
|
||||||
if (it.util.schemaHasRules($schema, it.RULES.all)) {
|
if ((it.opts.strictKeywords ? typeof $schema == 'object' && Object.keys($schema).length > 0 : it.util.schemaHasRules($schema, it.RULES.all))) {
|
||||||
$it.schema = $schema;
|
$it.schema = $schema;
|
||||||
$it.schemaPath = $schemaPath;
|
$it.schemaPath = $schemaPath;
|
||||||
$it.errSchemaPath = $errSchemaPath;
|
$it.errSchemaPath = $errSchemaPath;
|
||||||
@@ -3143,7 +3182,7 @@ module.exports = function generate_not(it, $keyword, $ruleType) {
|
|||||||
return out;
|
return out;
|
||||||
}
|
}
|
||||||
|
|
||||||
},{}],30:[function(require,module,exports){
|
},{}],31:[function(require,module,exports){
|
||||||
'use strict';
|
'use strict';
|
||||||
module.exports = function generate_oneOf(it, $keyword, $ruleType) {
|
module.exports = function generate_oneOf(it, $keyword, $ruleType) {
|
||||||
var out = ' ';
|
var out = ' ';
|
||||||
@@ -3172,7 +3211,7 @@ module.exports = function generate_oneOf(it, $keyword, $ruleType) {
|
|||||||
l1 = arr1.length - 1;
|
l1 = arr1.length - 1;
|
||||||
while ($i < l1) {
|
while ($i < l1) {
|
||||||
$sch = arr1[$i += 1];
|
$sch = arr1[$i += 1];
|
||||||
if (it.util.schemaHasRules($sch, it.RULES.all)) {
|
if ((it.opts.strictKeywords ? typeof $sch == 'object' && Object.keys($sch).length > 0 : it.util.schemaHasRules($sch, it.RULES.all))) {
|
||||||
$it.schema = $sch;
|
$it.schema = $sch;
|
||||||
$it.schemaPath = $schemaPath + '[' + $i + ']';
|
$it.schemaPath = $schemaPath + '[' + $i + ']';
|
||||||
$it.errSchemaPath = $errSchemaPath + '/' + $i;
|
$it.errSchemaPath = $errSchemaPath + '/' + $i;
|
||||||
@@ -3218,7 +3257,7 @@ module.exports = function generate_oneOf(it, $keyword, $ruleType) {
|
|||||||
return out;
|
return out;
|
||||||
}
|
}
|
||||||
|
|
||||||
},{}],31:[function(require,module,exports){
|
},{}],32:[function(require,module,exports){
|
||||||
'use strict';
|
'use strict';
|
||||||
module.exports = function generate_pattern(it, $keyword, $ruleType) {
|
module.exports = function generate_pattern(it, $keyword, $ruleType) {
|
||||||
var out = ' ';
|
var out = ' ';
|
||||||
@@ -3295,7 +3334,7 @@ module.exports = function generate_pattern(it, $keyword, $ruleType) {
|
|||||||
return out;
|
return out;
|
||||||
}
|
}
|
||||||
|
|
||||||
},{}],32:[function(require,module,exports){
|
},{}],33:[function(require,module,exports){
|
||||||
'use strict';
|
'use strict';
|
||||||
module.exports = function generate_properties(it, $keyword, $ruleType) {
|
module.exports = function generate_properties(it, $keyword, $ruleType) {
|
||||||
var out = ' ';
|
var out = ' ';
|
||||||
@@ -3481,7 +3520,7 @@ module.exports = function generate_properties(it, $keyword, $ruleType) {
|
|||||||
while (i3 < l3) {
|
while (i3 < l3) {
|
||||||
$propertyKey = arr3[i3 += 1];
|
$propertyKey = arr3[i3 += 1];
|
||||||
var $sch = $schema[$propertyKey];
|
var $sch = $schema[$propertyKey];
|
||||||
if (it.util.schemaHasRules($sch, it.RULES.all)) {
|
if ((it.opts.strictKeywords ? typeof $sch == 'object' && Object.keys($sch).length > 0 : it.util.schemaHasRules($sch, it.RULES.all))) {
|
||||||
var $prop = it.util.getProperty($propertyKey),
|
var $prop = it.util.getProperty($propertyKey),
|
||||||
$passData = $data + $prop,
|
$passData = $data + $prop,
|
||||||
$hasDefault = $useDefaults && $sch.default !== undefined;
|
$hasDefault = $useDefaults && $sch.default !== undefined;
|
||||||
@@ -3584,7 +3623,7 @@ module.exports = function generate_properties(it, $keyword, $ruleType) {
|
|||||||
while (i4 < l4) {
|
while (i4 < l4) {
|
||||||
$pProperty = arr4[i4 += 1];
|
$pProperty = arr4[i4 += 1];
|
||||||
var $sch = $pProperties[$pProperty];
|
var $sch = $pProperties[$pProperty];
|
||||||
if (it.util.schemaHasRules($sch, it.RULES.all)) {
|
if ((it.opts.strictKeywords ? typeof $sch == 'object' && Object.keys($sch).length > 0 : it.util.schemaHasRules($sch, it.RULES.all))) {
|
||||||
$it.schema = $sch;
|
$it.schema = $sch;
|
||||||
$it.schemaPath = it.schemaPath + '.patternProperties' + it.util.getProperty($pProperty);
|
$it.schemaPath = it.schemaPath + '.patternProperties' + it.util.getProperty($pProperty);
|
||||||
$it.errSchemaPath = it.errSchemaPath + '/patternProperties/' + it.util.escapeFragment($pProperty);
|
$it.errSchemaPath = it.errSchemaPath + '/patternProperties/' + it.util.escapeFragment($pProperty);
|
||||||
@@ -3627,7 +3666,7 @@ module.exports = function generate_properties(it, $keyword, $ruleType) {
|
|||||||
return out;
|
return out;
|
||||||
}
|
}
|
||||||
|
|
||||||
},{}],33:[function(require,module,exports){
|
},{}],34:[function(require,module,exports){
|
||||||
'use strict';
|
'use strict';
|
||||||
module.exports = function generate_propertyNames(it, $keyword, $ruleType) {
|
module.exports = function generate_propertyNames(it, $keyword, $ruleType) {
|
||||||
var out = ' ';
|
var out = ' ';
|
||||||
@@ -3644,7 +3683,7 @@ module.exports = function generate_propertyNames(it, $keyword, $ruleType) {
|
|||||||
$it.level++;
|
$it.level++;
|
||||||
var $nextValid = 'valid' + $it.level;
|
var $nextValid = 'valid' + $it.level;
|
||||||
out += 'var ' + ($errs) + ' = errors;';
|
out += 'var ' + ($errs) + ' = errors;';
|
||||||
if (it.util.schemaHasRules($schema, it.RULES.all)) {
|
if ((it.opts.strictKeywords ? typeof $schema == 'object' && Object.keys($schema).length > 0 : it.util.schemaHasRules($schema, it.RULES.all))) {
|
||||||
$it.schema = $schema;
|
$it.schema = $schema;
|
||||||
$it.schemaPath = $schemaPath;
|
$it.schemaPath = $schemaPath;
|
||||||
$it.errSchemaPath = $errSchemaPath;
|
$it.errSchemaPath = $errSchemaPath;
|
||||||
@@ -3711,7 +3750,7 @@ module.exports = function generate_propertyNames(it, $keyword, $ruleType) {
|
|||||||
return out;
|
return out;
|
||||||
}
|
}
|
||||||
|
|
||||||
},{}],34:[function(require,module,exports){
|
},{}],35:[function(require,module,exports){
|
||||||
'use strict';
|
'use strict';
|
||||||
module.exports = function generate_ref(it, $keyword, $ruleType) {
|
module.exports = function generate_ref(it, $keyword, $ruleType) {
|
||||||
var out = ' ';
|
var out = ' ';
|
||||||
@@ -3837,7 +3876,7 @@ module.exports = function generate_ref(it, $keyword, $ruleType) {
|
|||||||
return out;
|
return out;
|
||||||
}
|
}
|
||||||
|
|
||||||
},{}],35:[function(require,module,exports){
|
},{}],36:[function(require,module,exports){
|
||||||
'use strict';
|
'use strict';
|
||||||
module.exports = function generate_required(it, $keyword, $ruleType) {
|
module.exports = function generate_required(it, $keyword, $ruleType) {
|
||||||
var out = ' ';
|
var out = ' ';
|
||||||
@@ -3868,7 +3907,7 @@ module.exports = function generate_required(it, $keyword, $ruleType) {
|
|||||||
while (i1 < l1) {
|
while (i1 < l1) {
|
||||||
$property = arr1[i1 += 1];
|
$property = arr1[i1 += 1];
|
||||||
var $propertySch = it.schema.properties[$property];
|
var $propertySch = it.schema.properties[$property];
|
||||||
if (!($propertySch && it.util.schemaHasRules($propertySch, it.RULES.all))) {
|
if (!($propertySch && (it.opts.strictKeywords ? typeof $propertySch == 'object' && Object.keys($propertySch).length > 0 : it.util.schemaHasRules($propertySch, it.RULES.all)))) {
|
||||||
$required[$required.length] = $property;
|
$required[$required.length] = $property;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -4109,7 +4148,7 @@ module.exports = function generate_required(it, $keyword, $ruleType) {
|
|||||||
return out;
|
return out;
|
||||||
}
|
}
|
||||||
|
|
||||||
},{}],36:[function(require,module,exports){
|
},{}],37:[function(require,module,exports){
|
||||||
'use strict';
|
'use strict';
|
||||||
module.exports = function generate_uniqueItems(it, $keyword, $ruleType) {
|
module.exports = function generate_uniqueItems(it, $keyword, $ruleType) {
|
||||||
var out = ' ';
|
var out = ' ';
|
||||||
@@ -4197,7 +4236,7 @@ module.exports = function generate_uniqueItems(it, $keyword, $ruleType) {
|
|||||||
return out;
|
return out;
|
||||||
}
|
}
|
||||||
|
|
||||||
},{}],37:[function(require,module,exports){
|
},{}],38:[function(require,module,exports){
|
||||||
'use strict';
|
'use strict';
|
||||||
module.exports = function generate_validate(it, $keyword, $ruleType) {
|
module.exports = function generate_validate(it, $keyword, $ruleType) {
|
||||||
var out = '';
|
var out = '';
|
||||||
@@ -4693,12 +4732,12 @@ module.exports = function generate_validate(it, $keyword, $ruleType) {
|
|||||||
return out;
|
return out;
|
||||||
}
|
}
|
||||||
|
|
||||||
},{}],38:[function(require,module,exports){
|
},{}],39:[function(require,module,exports){
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
var IDENTIFIER = /^[a-z_$][a-z0-9_$-]*$/i;
|
var IDENTIFIER = /^[a-z_$][a-z0-9_$-]*$/i;
|
||||||
var customRuleCode = require('./dotjs/custom');
|
var customRuleCode = require('./dotjs/custom');
|
||||||
var metaSchema = require('./refs/json-schema-draft-07.json');
|
var definitionSchema = require('./definition_schema');
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
add: addKeyword,
|
add: addKeyword,
|
||||||
@@ -4707,38 +4746,6 @@ module.exports = {
|
|||||||
validate: validateKeyword
|
validate: validateKeyword
|
||||||
};
|
};
|
||||||
|
|
||||||
var definitionSchema = {
|
|
||||||
definitions: {
|
|
||||||
simpleTypes: metaSchema.definitions.simpleTypes
|
|
||||||
},
|
|
||||||
type: 'object',
|
|
||||||
dependencies: {
|
|
||||||
schema: ['validate'],
|
|
||||||
$data: ['validate'],
|
|
||||||
statements: ['inline'],
|
|
||||||
valid: {not: {required: ['macro']}}
|
|
||||||
},
|
|
||||||
properties: {
|
|
||||||
type: metaSchema.properties.type,
|
|
||||||
schema: {type: 'boolean'},
|
|
||||||
statements: {type: 'boolean'},
|
|
||||||
dependencies: {
|
|
||||||
type: 'array',
|
|
||||||
items: {type: 'string'}
|
|
||||||
},
|
|
||||||
metaSchema: {type: 'object'},
|
|
||||||
modifying: {type: 'boolean'},
|
|
||||||
valid: {type: 'boolean'},
|
|
||||||
$data: {type: 'boolean'},
|
|
||||||
async: {type: 'boolean'},
|
|
||||||
errors: {
|
|
||||||
anyOf: [
|
|
||||||
{type: 'boolean'},
|
|
||||||
{const: 'full'}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Define custom keyword
|
* Define custom keyword
|
||||||
@@ -4873,7 +4880,7 @@ function validateKeyword(definition, throwError) {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
},{"./dotjs/custom":21,"./refs/json-schema-draft-07.json":40}],39:[function(require,module,exports){
|
},{"./definition_schema":12,"./dotjs/custom":22}],40:[function(require,module,exports){
|
||||||
module.exports={
|
module.exports={
|
||||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||||
"$id": "https://raw.githubusercontent.com/epoberezkin/ajv/master/lib/refs/data.json#",
|
"$id": "https://raw.githubusercontent.com/epoberezkin/ajv/master/lib/refs/data.json#",
|
||||||
@@ -4892,7 +4899,7 @@ module.exports={
|
|||||||
"additionalProperties": false
|
"additionalProperties": false
|
||||||
}
|
}
|
||||||
|
|
||||||
},{}],40:[function(require,module,exports){
|
},{}],41:[function(require,module,exports){
|
||||||
module.exports={
|
module.exports={
|
||||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||||
"$id": "http://json-schema.org/draft-07/schema#",
|
"$id": "http://json-schema.org/draft-07/schema#",
|
||||||
@@ -5062,24 +5069,21 @@ module.exports={
|
|||||||
"default": true
|
"default": true
|
||||||
}
|
}
|
||||||
|
|
||||||
},{}],41:[function(require,module,exports){
|
},{}],42:[function(require,module,exports){
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
var isArray = Array.isArray;
|
// do not edit .js files directly - edit src/index.jst
|
||||||
var keyList = Object.keys;
|
|
||||||
var hasProp = Object.prototype.hasOwnProperty;
|
|
||||||
|
|
||||||
module.exports = function equal(a, b) {
|
module.exports = function equal(a, b) {
|
||||||
if (a === b) return true;
|
if (a === b) return true;
|
||||||
|
|
||||||
if (a && b && typeof a == 'object' && typeof b == 'object') {
|
if (a && b && typeof a == 'object' && typeof b == 'object') {
|
||||||
var arrA = isArray(a)
|
if (a.constructor !== b.constructor) return false;
|
||||||
, arrB = isArray(b)
|
|
||||||
, i
|
|
||||||
, length
|
|
||||||
, key;
|
|
||||||
|
|
||||||
if (arrA && arrB) {
|
var length, i, keys;
|
||||||
|
if (Array.isArray(a)) {
|
||||||
length = a.length;
|
length = a.length;
|
||||||
if (length != b.length) return false;
|
if (length != b.length) return false;
|
||||||
for (i = length; i-- !== 0;)
|
for (i = length; i-- !== 0;)
|
||||||
@@ -5087,39 +5091,33 @@ module.exports = function equal(a, b) {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (arrA != arrB) return false;
|
|
||||||
|
|
||||||
var dateA = a instanceof Date
|
|
||||||
, dateB = b instanceof Date;
|
|
||||||
if (dateA != dateB) return false;
|
|
||||||
if (dateA && dateB) return a.getTime() == b.getTime();
|
|
||||||
|
|
||||||
var regexpA = a instanceof RegExp
|
if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;
|
||||||
, regexpB = b instanceof RegExp;
|
if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();
|
||||||
if (regexpA != regexpB) return false;
|
if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();
|
||||||
if (regexpA && regexpB) return a.toString() == b.toString();
|
|
||||||
|
|
||||||
var keys = keyList(a);
|
keys = Object.keys(a);
|
||||||
length = keys.length;
|
length = keys.length;
|
||||||
|
if (length !== Object.keys(b).length) return false;
|
||||||
if (length !== keyList(b).length)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
for (i = length; i-- !== 0;)
|
for (i = length; i-- !== 0;)
|
||||||
if (!hasProp.call(b, keys[i])) return false;
|
if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;
|
||||||
|
|
||||||
for (i = length; i-- !== 0;) {
|
for (i = length; i-- !== 0;) {
|
||||||
key = keys[i];
|
var key = keys[i];
|
||||||
|
|
||||||
if (!equal(a[key], b[key])) return false;
|
if (!equal(a[key], b[key])) return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// true if both NaN, false otherwise
|
||||||
return a!==a && b!==b;
|
return a!==a && b!==b;
|
||||||
};
|
};
|
||||||
|
|
||||||
},{}],42:[function(require,module,exports){
|
},{}],43:[function(require,module,exports){
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
module.exports = function (data, opts) {
|
module.exports = function (data, opts) {
|
||||||
@@ -5180,7 +5178,7 @@ module.exports = function (data, opts) {
|
|||||||
})(data);
|
})(data);
|
||||||
};
|
};
|
||||||
|
|
||||||
},{}],43:[function(require,module,exports){
|
},{}],44:[function(require,module,exports){
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
var traverse = module.exports = function (schema, opts, cb) {
|
var traverse = module.exports = function (schema, opts, cb) {
|
||||||
@@ -5271,7 +5269,7 @@ function escapeJsonPtr(str) {
|
|||||||
return str.replace(/~/g, '~0').replace(/\//g, '~1');
|
return str.replace(/~/g, '~0').replace(/\//g, '~1');
|
||||||
}
|
}
|
||||||
|
|
||||||
},{}],44:[function(require,module,exports){
|
},{}],45:[function(require,module,exports){
|
||||||
/** @license URI.js v4.2.1 (c) 2011 Gary Court. License: http://github.com/garycourt/uri-js */
|
/** @license URI.js v4.2.1 (c) 2011 Gary Court. License: http://github.com/garycourt/uri-js */
|
||||||
(function (global, factory) {
|
(function (global, factory) {
|
||||||
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
|
||||||
@@ -7161,5 +7159,5 @@ function setLogger(self) {
|
|||||||
|
|
||||||
function noop() {}
|
function noop() {}
|
||||||
|
|
||||||
},{"./cache":1,"./compile":5,"./compile/async":2,"./compile/error_classes":3,"./compile/formats":4,"./compile/resolve":6,"./compile/rules":7,"./compile/schema_obj":8,"./compile/util":10,"./data":11,"./keyword":38,"./refs/data.json":39,"./refs/json-schema-draft-07.json":40,"fast-json-stable-stringify":42}]},{},[])("ajv")
|
},{"./cache":1,"./compile":5,"./compile/async":2,"./compile/error_classes":3,"./compile/formats":4,"./compile/resolve":6,"./compile/rules":7,"./compile/schema_obj":8,"./compile/util":10,"./data":11,"./keyword":39,"./refs/data.json":40,"./refs/json-schema-draft-07.json":41,"fast-json-stable-stringify":43}]},{},[])("ajv")
|
||||||
});
|
});
|
||||||
|
4
node_modules/ajv/dist/ajv.min.js
generated
vendored
4
node_modules/ajv/dist/ajv.min.js
generated
vendored
File diff suppressed because one or more lines are too long
2
node_modules/ajv/dist/ajv.min.js.map
generated
vendored
2
node_modules/ajv/dist/ajv.min.js.map
generated
vendored
File diff suppressed because one or more lines are too long
BIN
node_modules/ajv/lib/.DS_Store
generated
vendored
BIN
node_modules/ajv/lib/.DS_Store
generated
vendored
Binary file not shown.
4
node_modules/ajv/lib/ajv.d.ts
generated
vendored
4
node_modules/ajv/lib/ajv.d.ts
generated
vendored
@@ -178,9 +178,10 @@ declare namespace ajv {
|
|||||||
extendRefs?: true | 'ignore' | 'fail';
|
extendRefs?: true | 'ignore' | 'fail';
|
||||||
loadSchema?: (uri: string, cb?: (err: Error, schema: object) => void) => PromiseLike<object | boolean>;
|
loadSchema?: (uri: string, cb?: (err: Error, schema: object) => void) => PromiseLike<object | boolean>;
|
||||||
removeAdditional?: boolean | 'all' | 'failing';
|
removeAdditional?: boolean | 'all' | 'failing';
|
||||||
useDefaults?: boolean | 'shared';
|
useDefaults?: boolean | 'empty' | 'shared';
|
||||||
coerceTypes?: boolean | 'array';
|
coerceTypes?: boolean | 'array';
|
||||||
strictDefaults?: boolean | 'log';
|
strictDefaults?: boolean | 'log';
|
||||||
|
strictKeywords?: boolean | 'log';
|
||||||
async?: boolean | string;
|
async?: boolean | string;
|
||||||
transpile?: string | ((code: string) => string);
|
transpile?: string | ((code: string) => string);
|
||||||
meta?: boolean | object;
|
meta?: boolean | object;
|
||||||
@@ -242,6 +243,7 @@ declare namespace ajv {
|
|||||||
interface CompilationContext {
|
interface CompilationContext {
|
||||||
level: number;
|
level: number;
|
||||||
dataLevel: number;
|
dataLevel: number;
|
||||||
|
dataPathArr: string[];
|
||||||
schema: any;
|
schema: any;
|
||||||
schemaPath: string;
|
schemaPath: string;
|
||||||
baseId: string;
|
baseId: string;
|
||||||
|
6
node_modules/ajv/lib/compile/formats.js
generated
vendored
6
node_modules/ajv/lib/compile/formats.js
generated
vendored
@@ -4,7 +4,7 @@ var util = require('./util');
|
|||||||
|
|
||||||
var DATE = /^(\d\d\d\d)-(\d\d)-(\d\d)$/;
|
var DATE = /^(\d\d\d\d)-(\d\d)-(\d\d)$/;
|
||||||
var DAYS = [0,31,28,31,30,31,30,31,31,30,31,30,31];
|
var DAYS = [0,31,28,31,30,31,30,31,31,30,31,30,31];
|
||||||
var TIME = /^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d:\d\d)?$/i;
|
var TIME = /^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i;
|
||||||
var HOSTNAME = /^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*$/i;
|
var HOSTNAME = /^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*$/i;
|
||||||
var URI = /^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;
|
var URI = /^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;
|
||||||
var URIREF = /^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;
|
var URIREF = /^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;
|
||||||
@@ -33,8 +33,8 @@ formats.fast = {
|
|||||||
// date: http://tools.ietf.org/html/rfc3339#section-5.6
|
// date: http://tools.ietf.org/html/rfc3339#section-5.6
|
||||||
date: /^\d\d\d\d-[0-1]\d-[0-3]\d$/,
|
date: /^\d\d\d\d-[0-1]\d-[0-3]\d$/,
|
||||||
// date-time: http://tools.ietf.org/html/rfc3339#section-5.6
|
// date-time: http://tools.ietf.org/html/rfc3339#section-5.6
|
||||||
time: /^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d:\d\d)?$/i,
|
time: /^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,
|
||||||
'date-time': /^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d:\d\d)$/i,
|
'date-time': /^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,
|
||||||
// uri: https://github.com/mafintosh/is-my-json-valid/blob/master/formats.js
|
// uri: https://github.com/mafintosh/is-my-json-valid/blob/master/formats.js
|
||||||
uri: /^(?:[a-z][a-z0-9+-.]*:)(?:\/?\/)?[^\s]*$/i,
|
uri: /^(?:[a-z][a-z0-9+-.]*:)(?:\/?\/)?[^\s]*$/i,
|
||||||
'uri-reference': /^(?:(?:[a-z][a-z0-9+-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,
|
'uri-reference': /^(?:(?:[a-z][a-z0-9+-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,
|
||||||
|
37
node_modules/ajv/lib/definition_schema.js
generated
vendored
Normal file
37
node_modules/ajv/lib/definition_schema.js
generated
vendored
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
'use strict';
|
||||||
|
|
||||||
|
var metaSchema = require('./refs/json-schema-draft-07.json');
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
$id: 'https://github.com/epoberezkin/ajv/blob/master/lib/definition_schema.js',
|
||||||
|
definitions: {
|
||||||
|
simpleTypes: metaSchema.definitions.simpleTypes
|
||||||
|
},
|
||||||
|
type: 'object',
|
||||||
|
dependencies: {
|
||||||
|
schema: ['validate'],
|
||||||
|
$data: ['validate'],
|
||||||
|
statements: ['inline'],
|
||||||
|
valid: {not: {required: ['macro']}}
|
||||||
|
},
|
||||||
|
properties: {
|
||||||
|
type: metaSchema.properties.type,
|
||||||
|
schema: {type: 'boolean'},
|
||||||
|
statements: {type: 'boolean'},
|
||||||
|
dependencies: {
|
||||||
|
type: 'array',
|
||||||
|
items: {type: 'string'}
|
||||||
|
},
|
||||||
|
metaSchema: {type: 'object'},
|
||||||
|
modifying: {type: 'boolean'},
|
||||||
|
valid: {type: 'boolean'},
|
||||||
|
$data: {type: 'boolean'},
|
||||||
|
async: {type: 'boolean'},
|
||||||
|
errors: {
|
||||||
|
anyOf: [
|
||||||
|
{type: 'boolean'},
|
||||||
|
{const: 'full'}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
4
node_modules/ajv/lib/dot/definitions.def
generated
vendored
4
node_modules/ajv/lib/dot/definitions.def
generated
vendored
@@ -63,7 +63,9 @@
|
|||||||
|
|
||||||
|
|
||||||
{{## def.nonEmptySchema:_schema:
|
{{## def.nonEmptySchema:_schema:
|
||||||
it.util.schemaHasRules(_schema, it.RULES.all)
|
(it.opts.strictKeywords
|
||||||
|
? typeof _schema == 'object' && Object.keys(_schema).length > 0
|
||||||
|
: it.util.schemaHasRules(_schema, it.RULES.all))
|
||||||
#}}
|
#}}
|
||||||
|
|
||||||
|
|
||||||
|
2
node_modules/ajv/lib/dotjs/allOf.js
generated
vendored
2
node_modules/ajv/lib/dotjs/allOf.js
generated
vendored
@@ -17,7 +17,7 @@ module.exports = function generate_allOf(it, $keyword, $ruleType) {
|
|||||||
l1 = arr1.length - 1;
|
l1 = arr1.length - 1;
|
||||||
while ($i < l1) {
|
while ($i < l1) {
|
||||||
$sch = arr1[$i += 1];
|
$sch = arr1[$i += 1];
|
||||||
if (it.util.schemaHasRules($sch, it.RULES.all)) {
|
if ((it.opts.strictKeywords ? typeof $sch == 'object' && Object.keys($sch).length > 0 : it.util.schemaHasRules($sch, it.RULES.all))) {
|
||||||
$allSchemasEmpty = false;
|
$allSchemasEmpty = false;
|
||||||
$it.schema = $sch;
|
$it.schema = $sch;
|
||||||
$it.schemaPath = $schemaPath + '[' + $i + ']';
|
$it.schemaPath = $schemaPath + '[' + $i + ']';
|
||||||
|
2
node_modules/ajv/lib/dotjs/anyOf.js
generated
vendored
2
node_modules/ajv/lib/dotjs/anyOf.js
generated
vendored
@@ -15,7 +15,7 @@ module.exports = function generate_anyOf(it, $keyword, $ruleType) {
|
|||||||
$it.level++;
|
$it.level++;
|
||||||
var $nextValid = 'valid' + $it.level;
|
var $nextValid = 'valid' + $it.level;
|
||||||
var $noEmptySchema = $schema.every(function($sch) {
|
var $noEmptySchema = $schema.every(function($sch) {
|
||||||
return it.util.schemaHasRules($sch, it.RULES.all);
|
return (it.opts.strictKeywords ? typeof $sch == 'object' && Object.keys($sch).length > 0 : it.util.schemaHasRules($sch, it.RULES.all));
|
||||||
});
|
});
|
||||||
if ($noEmptySchema) {
|
if ($noEmptySchema) {
|
||||||
var $currentBaseId = $it.baseId;
|
var $currentBaseId = $it.baseId;
|
||||||
|
2
node_modules/ajv/lib/dotjs/contains.js
generated
vendored
2
node_modules/ajv/lib/dotjs/contains.js
generated
vendored
@@ -18,7 +18,7 @@ module.exports = function generate_contains(it, $keyword, $ruleType) {
|
|||||||
$dataNxt = $it.dataLevel = it.dataLevel + 1,
|
$dataNxt = $it.dataLevel = it.dataLevel + 1,
|
||||||
$nextData = 'data' + $dataNxt,
|
$nextData = 'data' + $dataNxt,
|
||||||
$currentBaseId = it.baseId,
|
$currentBaseId = it.baseId,
|
||||||
$nonEmptySchema = it.util.schemaHasRules($schema, it.RULES.all);
|
$nonEmptySchema = (it.opts.strictKeywords ? typeof $schema == 'object' && Object.keys($schema).length > 0 : it.util.schemaHasRules($schema, it.RULES.all));
|
||||||
out += 'var ' + ($errs) + ' = errors;var ' + ($valid) + ';';
|
out += 'var ' + ($errs) + ' = errors;var ' + ($valid) + ';';
|
||||||
if ($nonEmptySchema) {
|
if ($nonEmptySchema) {
|
||||||
var $wasComposite = it.compositeRule;
|
var $wasComposite = it.compositeRule;
|
||||||
|
2
node_modules/ajv/lib/dotjs/dependencies.js
generated
vendored
2
node_modules/ajv/lib/dotjs/dependencies.js
generated
vendored
@@ -142,7 +142,7 @@ module.exports = function generate_dependencies(it, $keyword, $ruleType) {
|
|||||||
var $currentBaseId = $it.baseId;
|
var $currentBaseId = $it.baseId;
|
||||||
for (var $property in $schemaDeps) {
|
for (var $property in $schemaDeps) {
|
||||||
var $sch = $schemaDeps[$property];
|
var $sch = $schemaDeps[$property];
|
||||||
if (it.util.schemaHasRules($sch, it.RULES.all)) {
|
if ((it.opts.strictKeywords ? typeof $sch == 'object' && Object.keys($sch).length > 0 : it.util.schemaHasRules($sch, it.RULES.all))) {
|
||||||
out += ' ' + ($nextValid) + ' = true; if ( ' + ($data) + (it.util.getProperty($property)) + ' !== undefined ';
|
out += ' ' + ($nextValid) + ' = true; if ( ' + ($data) + (it.util.getProperty($property)) + ' !== undefined ';
|
||||||
if ($ownProperties) {
|
if ($ownProperties) {
|
||||||
out += ' && Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($property)) + '\') ';
|
out += ' && Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($property)) + '\') ';
|
||||||
|
4
node_modules/ajv/lib/dotjs/if.js
generated
vendored
4
node_modules/ajv/lib/dotjs/if.js
generated
vendored
@@ -15,8 +15,8 @@ module.exports = function generate_if(it, $keyword, $ruleType) {
|
|||||||
var $nextValid = 'valid' + $it.level;
|
var $nextValid = 'valid' + $it.level;
|
||||||
var $thenSch = it.schema['then'],
|
var $thenSch = it.schema['then'],
|
||||||
$elseSch = it.schema['else'],
|
$elseSch = it.schema['else'],
|
||||||
$thenPresent = $thenSch !== undefined && it.util.schemaHasRules($thenSch, it.RULES.all),
|
$thenPresent = $thenSch !== undefined && (it.opts.strictKeywords ? typeof $thenSch == 'object' && Object.keys($thenSch).length > 0 : it.util.schemaHasRules($thenSch, it.RULES.all)),
|
||||||
$elsePresent = $elseSch !== undefined && it.util.schemaHasRules($elseSch, it.RULES.all),
|
$elsePresent = $elseSch !== undefined && (it.opts.strictKeywords ? typeof $elseSch == 'object' && Object.keys($elseSch).length > 0 : it.util.schemaHasRules($elseSch, it.RULES.all)),
|
||||||
$currentBaseId = $it.baseId;
|
$currentBaseId = $it.baseId;
|
||||||
if ($thenPresent || $elsePresent) {
|
if ($thenPresent || $elsePresent) {
|
||||||
var $ifClause;
|
var $ifClause;
|
||||||
|
6
node_modules/ajv/lib/dotjs/items.js
generated
vendored
6
node_modules/ajv/lib/dotjs/items.js
generated
vendored
@@ -66,7 +66,7 @@ module.exports = function generate_items(it, $keyword, $ruleType) {
|
|||||||
l1 = arr1.length - 1;
|
l1 = arr1.length - 1;
|
||||||
while ($i < l1) {
|
while ($i < l1) {
|
||||||
$sch = arr1[$i += 1];
|
$sch = arr1[$i += 1];
|
||||||
if (it.util.schemaHasRules($sch, it.RULES.all)) {
|
if ((it.opts.strictKeywords ? typeof $sch == 'object' && Object.keys($sch).length > 0 : it.util.schemaHasRules($sch, it.RULES.all))) {
|
||||||
out += ' ' + ($nextValid) + ' = true; if (' + ($data) + '.length > ' + ($i) + ') { ';
|
out += ' ' + ($nextValid) + ' = true; if (' + ($data) + '.length > ' + ($i) + ') { ';
|
||||||
var $passData = $data + '[' + $i + ']';
|
var $passData = $data + '[' + $i + ']';
|
||||||
$it.schema = $sch;
|
$it.schema = $sch;
|
||||||
@@ -89,7 +89,7 @@ module.exports = function generate_items(it, $keyword, $ruleType) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (typeof $additionalItems == 'object' && it.util.schemaHasRules($additionalItems, it.RULES.all)) {
|
if (typeof $additionalItems == 'object' && (it.opts.strictKeywords ? typeof $additionalItems == 'object' && Object.keys($additionalItems).length > 0 : it.util.schemaHasRules($additionalItems, it.RULES.all))) {
|
||||||
$it.schema = $additionalItems;
|
$it.schema = $additionalItems;
|
||||||
$it.schemaPath = it.schemaPath + '.additionalItems';
|
$it.schemaPath = it.schemaPath + '.additionalItems';
|
||||||
$it.errSchemaPath = it.errSchemaPath + '/additionalItems';
|
$it.errSchemaPath = it.errSchemaPath + '/additionalItems';
|
||||||
@@ -113,7 +113,7 @@ module.exports = function generate_items(it, $keyword, $ruleType) {
|
|||||||
$closingBraces += '}';
|
$closingBraces += '}';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (it.util.schemaHasRules($schema, it.RULES.all)) {
|
} else if ((it.opts.strictKeywords ? typeof $schema == 'object' && Object.keys($schema).length > 0 : it.util.schemaHasRules($schema, it.RULES.all))) {
|
||||||
$it.schema = $schema;
|
$it.schema = $schema;
|
||||||
$it.schemaPath = $schemaPath;
|
$it.schemaPath = $schemaPath;
|
||||||
$it.errSchemaPath = $errSchemaPath;
|
$it.errSchemaPath = $errSchemaPath;
|
||||||
|
2
node_modules/ajv/lib/dotjs/not.js
generated
vendored
2
node_modules/ajv/lib/dotjs/not.js
generated
vendored
@@ -12,7 +12,7 @@ module.exports = function generate_not(it, $keyword, $ruleType) {
|
|||||||
var $it = it.util.copy(it);
|
var $it = it.util.copy(it);
|
||||||
$it.level++;
|
$it.level++;
|
||||||
var $nextValid = 'valid' + $it.level;
|
var $nextValid = 'valid' + $it.level;
|
||||||
if (it.util.schemaHasRules($schema, it.RULES.all)) {
|
if ((it.opts.strictKeywords ? typeof $schema == 'object' && Object.keys($schema).length > 0 : it.util.schemaHasRules($schema, it.RULES.all))) {
|
||||||
$it.schema = $schema;
|
$it.schema = $schema;
|
||||||
$it.schemaPath = $schemaPath;
|
$it.schemaPath = $schemaPath;
|
||||||
$it.errSchemaPath = $errSchemaPath;
|
$it.errSchemaPath = $errSchemaPath;
|
||||||
|
2
node_modules/ajv/lib/dotjs/oneOf.js
generated
vendored
2
node_modules/ajv/lib/dotjs/oneOf.js
generated
vendored
@@ -26,7 +26,7 @@ module.exports = function generate_oneOf(it, $keyword, $ruleType) {
|
|||||||
l1 = arr1.length - 1;
|
l1 = arr1.length - 1;
|
||||||
while ($i < l1) {
|
while ($i < l1) {
|
||||||
$sch = arr1[$i += 1];
|
$sch = arr1[$i += 1];
|
||||||
if (it.util.schemaHasRules($sch, it.RULES.all)) {
|
if ((it.opts.strictKeywords ? typeof $sch == 'object' && Object.keys($sch).length > 0 : it.util.schemaHasRules($sch, it.RULES.all))) {
|
||||||
$it.schema = $sch;
|
$it.schema = $sch;
|
||||||
$it.schemaPath = $schemaPath + '[' + $i + ']';
|
$it.schemaPath = $schemaPath + '[' + $i + ']';
|
||||||
$it.errSchemaPath = $errSchemaPath + '/' + $i;
|
$it.errSchemaPath = $errSchemaPath + '/' + $i;
|
||||||
|
4
node_modules/ajv/lib/dotjs/properties.js
generated
vendored
4
node_modules/ajv/lib/dotjs/properties.js
generated
vendored
@@ -183,7 +183,7 @@ module.exports = function generate_properties(it, $keyword, $ruleType) {
|
|||||||
while (i3 < l3) {
|
while (i3 < l3) {
|
||||||
$propertyKey = arr3[i3 += 1];
|
$propertyKey = arr3[i3 += 1];
|
||||||
var $sch = $schema[$propertyKey];
|
var $sch = $schema[$propertyKey];
|
||||||
if (it.util.schemaHasRules($sch, it.RULES.all)) {
|
if ((it.opts.strictKeywords ? typeof $sch == 'object' && Object.keys($sch).length > 0 : it.util.schemaHasRules($sch, it.RULES.all))) {
|
||||||
var $prop = it.util.getProperty($propertyKey),
|
var $prop = it.util.getProperty($propertyKey),
|
||||||
$passData = $data + $prop,
|
$passData = $data + $prop,
|
||||||
$hasDefault = $useDefaults && $sch.default !== undefined;
|
$hasDefault = $useDefaults && $sch.default !== undefined;
|
||||||
@@ -286,7 +286,7 @@ module.exports = function generate_properties(it, $keyword, $ruleType) {
|
|||||||
while (i4 < l4) {
|
while (i4 < l4) {
|
||||||
$pProperty = arr4[i4 += 1];
|
$pProperty = arr4[i4 += 1];
|
||||||
var $sch = $pProperties[$pProperty];
|
var $sch = $pProperties[$pProperty];
|
||||||
if (it.util.schemaHasRules($sch, it.RULES.all)) {
|
if ((it.opts.strictKeywords ? typeof $sch == 'object' && Object.keys($sch).length > 0 : it.util.schemaHasRules($sch, it.RULES.all))) {
|
||||||
$it.schema = $sch;
|
$it.schema = $sch;
|
||||||
$it.schemaPath = it.schemaPath + '.patternProperties' + it.util.getProperty($pProperty);
|
$it.schemaPath = it.schemaPath + '.patternProperties' + it.util.getProperty($pProperty);
|
||||||
$it.errSchemaPath = it.errSchemaPath + '/patternProperties/' + it.util.escapeFragment($pProperty);
|
$it.errSchemaPath = it.errSchemaPath + '/patternProperties/' + it.util.escapeFragment($pProperty);
|
||||||
|
2
node_modules/ajv/lib/dotjs/propertyNames.js
generated
vendored
2
node_modules/ajv/lib/dotjs/propertyNames.js
generated
vendored
@@ -14,7 +14,7 @@ module.exports = function generate_propertyNames(it, $keyword, $ruleType) {
|
|||||||
$it.level++;
|
$it.level++;
|
||||||
var $nextValid = 'valid' + $it.level;
|
var $nextValid = 'valid' + $it.level;
|
||||||
out += 'var ' + ($errs) + ' = errors;';
|
out += 'var ' + ($errs) + ' = errors;';
|
||||||
if (it.util.schemaHasRules($schema, it.RULES.all)) {
|
if ((it.opts.strictKeywords ? typeof $schema == 'object' && Object.keys($schema).length > 0 : it.util.schemaHasRules($schema, it.RULES.all))) {
|
||||||
$it.schema = $schema;
|
$it.schema = $schema;
|
||||||
$it.schemaPath = $schemaPath;
|
$it.schemaPath = $schemaPath;
|
||||||
$it.errSchemaPath = $errSchemaPath;
|
$it.errSchemaPath = $errSchemaPath;
|
||||||
|
2
node_modules/ajv/lib/dotjs/required.js
generated
vendored
2
node_modules/ajv/lib/dotjs/required.js
generated
vendored
@@ -28,7 +28,7 @@ module.exports = function generate_required(it, $keyword, $ruleType) {
|
|||||||
while (i1 < l1) {
|
while (i1 < l1) {
|
||||||
$property = arr1[i1 += 1];
|
$property = arr1[i1 += 1];
|
||||||
var $propertySch = it.schema.properties[$property];
|
var $propertySch = it.schema.properties[$property];
|
||||||
if (!($propertySch && it.util.schemaHasRules($propertySch, it.RULES.all))) {
|
if (!($propertySch && (it.opts.strictKeywords ? typeof $propertySch == 'object' && Object.keys($propertySch).length > 0 : it.util.schemaHasRules($propertySch, it.RULES.all)))) {
|
||||||
$required[$required.length] = $property;
|
$required[$required.length] = $property;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
34
node_modules/ajv/lib/keyword.js
generated
vendored
34
node_modules/ajv/lib/keyword.js
generated
vendored
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
var IDENTIFIER = /^[a-z_$][a-z0-9_$-]*$/i;
|
var IDENTIFIER = /^[a-z_$][a-z0-9_$-]*$/i;
|
||||||
var customRuleCode = require('./dotjs/custom');
|
var customRuleCode = require('./dotjs/custom');
|
||||||
var metaSchema = require('./refs/json-schema-draft-07.json');
|
var definitionSchema = require('./definition_schema');
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
add: addKeyword,
|
add: addKeyword,
|
||||||
@@ -11,38 +11,6 @@ module.exports = {
|
|||||||
validate: validateKeyword
|
validate: validateKeyword
|
||||||
};
|
};
|
||||||
|
|
||||||
var definitionSchema = {
|
|
||||||
definitions: {
|
|
||||||
simpleTypes: metaSchema.definitions.simpleTypes
|
|
||||||
},
|
|
||||||
type: 'object',
|
|
||||||
dependencies: {
|
|
||||||
schema: ['validate'],
|
|
||||||
$data: ['validate'],
|
|
||||||
statements: ['inline'],
|
|
||||||
valid: {not: {required: ['macro']}}
|
|
||||||
},
|
|
||||||
properties: {
|
|
||||||
type: metaSchema.properties.type,
|
|
||||||
schema: {type: 'boolean'},
|
|
||||||
statements: {type: 'boolean'},
|
|
||||||
dependencies: {
|
|
||||||
type: 'array',
|
|
||||||
items: {type: 'string'}
|
|
||||||
},
|
|
||||||
metaSchema: {type: 'object'},
|
|
||||||
modifying: {type: 'boolean'},
|
|
||||||
valid: {type: 'boolean'},
|
|
||||||
$data: {type: 'boolean'},
|
|
||||||
async: {type: 'boolean'},
|
|
||||||
errors: {
|
|
||||||
anyOf: [
|
|
||||||
{type: 'boolean'},
|
|
||||||
{const: 'full'}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Define custom keyword
|
* Define custom keyword
|
||||||
|
28
node_modules/ajv/package.json
generated
vendored
28
node_modules/ajv/package.json
generated
vendored
@@ -1,8 +1,8 @@
|
|||||||
{
|
{
|
||||||
"_from": "ajv@^6.5.5",
|
"_from": "ajv@^6.5.5",
|
||||||
"_id": "ajv@6.10.0",
|
"_id": "ajv@6.11.0",
|
||||||
"_inBundle": false,
|
"_inBundle": false,
|
||||||
"_integrity": "sha512-nffhOpkymDECQyR0mnsUtoCE8RlX38G0rYP+wgLWFyZuUyuuojSSvi/+euOiQBIn63whYwYVIIH1TvE3tu4OEg==",
|
"_integrity": "sha512-nCprB/0syFYy9fVYU1ox1l2KN8S9I+tziH8D4zdZuLT3N6RMlGSGt5FSTpAiHB/Whv8Qs1cWHma1aMKZyaHRKA==",
|
||||||
"_location": "/ajv",
|
"_location": "/ajv",
|
||||||
"_phantomChildren": {},
|
"_phantomChildren": {},
|
||||||
"_requested": {
|
"_requested": {
|
||||||
@@ -18,8 +18,8 @@
|
|||||||
"_requiredBy": [
|
"_requiredBy": [
|
||||||
"/har-validator"
|
"/har-validator"
|
||||||
],
|
],
|
||||||
"_resolved": "https://registry.npmjs.org/ajv/-/ajv-6.10.0.tgz",
|
"_resolved": "https://registry.npmjs.org/ajv/-/ajv-6.11.0.tgz",
|
||||||
"_shasum": "90d0d54439da587cd7e843bfb7045f50bd22bdf1",
|
"_shasum": "c3607cbc8ae392d8a5a536f25b21f8e5f3f87fe9",
|
||||||
"_spec": "ajv@^6.5.5",
|
"_spec": "ajv@^6.5.5",
|
||||||
"_where": "F:\\projects\\p\\minifyfromhtml\\node_modules\\har-validator",
|
"_where": "F:\\projects\\p\\minifyfromhtml\\node_modules\\har-validator",
|
||||||
"author": {
|
"author": {
|
||||||
@@ -30,7 +30,7 @@
|
|||||||
},
|
},
|
||||||
"bundleDependencies": false,
|
"bundleDependencies": false,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"fast-deep-equal": "^2.0.1",
|
"fast-deep-equal": "^3.1.1",
|
||||||
"fast-json-stable-stringify": "^2.0.0",
|
"fast-json-stable-stringify": "^2.0.0",
|
||||||
"json-schema-traverse": "^0.4.1",
|
"json-schema-traverse": "^0.4.1",
|
||||||
"uri-js": "^4.2.2"
|
"uri-js": "^4.2.2"
|
||||||
@@ -44,25 +44,25 @@
|
|||||||
"browserify": "^16.2.0",
|
"browserify": "^16.2.0",
|
||||||
"chai": "^4.0.1",
|
"chai": "^4.0.1",
|
||||||
"coveralls": "^3.0.1",
|
"coveralls": "^3.0.1",
|
||||||
"del-cli": "^1.1.0",
|
"del-cli": "^3.0.0",
|
||||||
"dot": "^1.0.3",
|
"dot": "^1.0.3",
|
||||||
"eslint": "^5.0.0",
|
"eslint": "^6.0.0",
|
||||||
"gh-pages-generator": "^0.2.3",
|
"gh-pages-generator": "^0.2.3",
|
||||||
"glob": "^7.0.0",
|
"glob": "^7.0.0",
|
||||||
"if-node-version": "^1.0.0",
|
"if-node-version": "^1.0.0",
|
||||||
"js-beautify": "^1.7.3",
|
"js-beautify": "^1.7.3",
|
||||||
"jshint": "2.9.7",
|
"jshint": "^2.10.2",
|
||||||
"json-schema-test": "^2.0.0",
|
"json-schema-test": "^2.0.0",
|
||||||
"karma": "^3.0.0",
|
"karma": "^4.0.1",
|
||||||
"karma-chrome-launcher": "^2.2.0",
|
"karma-chrome-launcher": "^3.0.0",
|
||||||
"karma-mocha": "^1.1.1",
|
"karma-mocha": "^1.1.1",
|
||||||
"karma-sauce-launcher": "^2.0.0",
|
"karma-sauce-launcher": "^2.0.0",
|
||||||
"mocha": "^6.0.0",
|
"mocha": "^6.0.0",
|
||||||
"nyc": "^13.2.0",
|
"nyc": "^15.0.0",
|
||||||
"pre-commit": "^1.1.1",
|
"pre-commit": "^1.1.1",
|
||||||
"require-globify": "^1.3.0",
|
"require-globify": "^1.3.0",
|
||||||
"typescript": "^2.8.3",
|
"typescript": "^2.8.3",
|
||||||
"uglify-js": "^3.3.24",
|
"uglify-js": "^3.6.9",
|
||||||
"watch": "^1.0.0"
|
"watch": "^1.0.0"
|
||||||
},
|
},
|
||||||
"files": [
|
"files": [
|
||||||
@@ -109,7 +109,7 @@
|
|||||||
"lint": "npm run jshint && npm run eslint",
|
"lint": "npm run jshint && npm run eslint",
|
||||||
"prepublish": "npm run build && npm run bundle",
|
"prepublish": "npm run build && npm run bundle",
|
||||||
"test": "npm run lint && npm run build && npm run test-all",
|
"test": "npm run lint && npm run build && npm run test-all",
|
||||||
"test-all": "npm run test-ts && npm run test-cov && if-node-version 10 npm run test-browser",
|
"test-all": "npm run test-cov && if-node-version 10 npm run test-browser",
|
||||||
"test-browser": "del-cli .browser && npm run bundle && scripts/prepare-tests && npm run test-karma",
|
"test-browser": "del-cli .browser && npm run bundle && scripts/prepare-tests && npm run test-karma",
|
||||||
"test-cov": "nyc npm run test-spec",
|
"test-cov": "nyc npm run test-spec",
|
||||||
"test-debug": "npm run test-spec -- --inspect-brk",
|
"test-debug": "npm run test-spec -- --inspect-brk",
|
||||||
@@ -121,5 +121,5 @@
|
|||||||
},
|
},
|
||||||
"tonicExampleFilename": ".tonic_example.js",
|
"tonicExampleFilename": ".tonic_example.js",
|
||||||
"typings": "lib/ajv.d.ts",
|
"typings": "lib/ajv.d.ts",
|
||||||
"version": "6.10.0"
|
"version": "6.11.0"
|
||||||
}
|
}
|
||||||
|
2
node_modules/async-limiter/.eslintignore
generated
vendored
Normal file
2
node_modules/async-limiter/.eslintignore
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
coverage
|
||||||
|
.nyc_output
|
10
node_modules/async-limiter/.nycrc
generated
vendored
Normal file
10
node_modules/async-limiter/.nycrc
generated
vendored
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
{
|
||||||
|
"check-coverage": false,
|
||||||
|
"lines": 99,
|
||||||
|
"statements": 99,
|
||||||
|
"functions": 99,
|
||||||
|
"branches": 99,
|
||||||
|
"include": [
|
||||||
|
"index.js"
|
||||||
|
]
|
||||||
|
}
|
2
node_modules/async-limiter/.travis.yml
generated
vendored
2
node_modules/async-limiter/.travis.yml
generated
vendored
@@ -1,6 +1,8 @@
|
|||||||
language: node_js
|
language: node_js
|
||||||
node_js:
|
node_js:
|
||||||
- "6"
|
- "6"
|
||||||
|
- "8"
|
||||||
|
- "10"
|
||||||
- "node"
|
- "node"
|
||||||
script: npm run travis
|
script: npm run travis
|
||||||
cache:
|
cache:
|
||||||
|
1
node_modules/async-limiter/coverage/coverage.json
generated
vendored
1
node_modules/async-limiter/coverage/coverage.json
generated
vendored
@@ -1 +0,0 @@
|
|||||||
{"/Users/samuelreed/git/forks/async-throttle/index.js":{"path":"/Users/samuelreed/git/forks/async-throttle/index.js","s":{"1":1,"2":7,"3":1,"4":6,"5":6,"6":6,"7":6,"8":6,"9":6,"10":1,"11":1,"12":3,"13":13,"14":13,"15":13,"16":1,"17":19,"18":1,"19":45,"20":6,"21":39,"22":13,"23":13,"24":13,"25":13,"26":39,"27":18,"28":6,"29":6,"30":1,"31":6,"32":6,"33":6,"34":1,"35":13,"36":13,"37":1},"b":{"1":[1,6],"2":[6,5],"3":[6,5],"4":[6,39],"5":[13,26],"6":[18,21],"7":[6,0]},"f":{"1":7,"2":3,"3":13,"4":19,"5":45,"6":6,"7":13},"fnMap":{"1":{"name":"Queue","line":3,"loc":{"start":{"line":3,"column":0},"end":{"line":3,"column":24}}},"2":{"name":"(anonymous_2)","line":22,"loc":{"start":{"line":22,"column":24},"end":{"line":22,"column":41}}},"3":{"name":"(anonymous_3)","line":23,"loc":{"start":{"line":23,"column":28},"end":{"line":23,"column":39}}},"4":{"name":"(anonymous_4)","line":31,"loc":{"start":{"line":31,"column":7},"end":{"line":31,"column":18}}},"5":{"name":"(anonymous_5)","line":36,"loc":{"start":{"line":36,"column":23},"end":{"line":36,"column":34}}},"6":{"name":"(anonymous_6)","line":55,"loc":{"start":{"line":55,"column":25},"end":{"line":55,"column":38}}},"7":{"name":"done","line":62,"loc":{"start":{"line":62,"column":0},"end":{"line":62,"column":16}}}},"statementMap":{"1":{"start":{"line":3,"column":0},"end":{"line":14,"column":1}},"2":{"start":{"line":4,"column":2},"end":{"line":6,"column":3}},"3":{"start":{"line":5,"column":4},"end":{"line":5,"column":30}},"4":{"start":{"line":8,"column":2},"end":{"line":8,"column":26}},"5":{"start":{"line":9,"column":2},"end":{"line":9,"column":53}},"6":{"start":{"line":10,"column":2},"end":{"line":10,"column":19}},"7":{"start":{"line":11,"column":2},"end":{"line":11,"column":17}},"8":{"start":{"line":12,"column":2},"end":{"line":12,"column":16}},"9":{"start":{"line":13,"column":2},"end":{"line":13,"column":31}},"10":{"start":{"line":16,"column":0},"end":{"line":20,"column":2}},"11":{"start":{"line":22,"column":0},"end":{"line":28,"column":3}},"12":{"start":{"line":23,"column":2},"end":{"line":27,"column":4}},"13":{"start":{"line":24,"column":4},"end":{"line":24,"column":75}},"14":{"start":{"line":25,"column":4},"end":{"line":25,"column":16}},"15":{"start":{"line":26,"column":4},"end":{"line":26,"column":24}},"16":{"start":{"line":30,"column":0},"end":{"line":34,"column":3}},"17":{"start":{"line":32,"column":4},"end":{"line":32,"column":43}},"18":{"start":{"line":36,"column":0},"end":{"line":53,"column":2}},"19":{"start":{"line":37,"column":2},"end":{"line":39,"column":3}},"20":{"start":{"line":38,"column":4},"end":{"line":38,"column":11}},"21":{"start":{"line":40,"column":2},"end":{"line":45,"column":3}},"22":{"start":{"line":41,"column":4},"end":{"line":41,"column":32}},"23":{"start":{"line":42,"column":4},"end":{"line":42,"column":19}},"24":{"start":{"line":43,"column":4},"end":{"line":43,"column":20}},"25":{"start":{"line":44,"column":4},"end":{"line":44,"column":16}},"26":{"start":{"line":47,"column":2},"end":{"line":52,"column":3}},"27":{"start":{"line":48,"column":4},"end":{"line":51,"column":5}},"28":{"start":{"line":49,"column":6},"end":{"line":49,"column":30}},"29":{"start":{"line":50,"column":6},"end":{"line":50,"column":27}},"30":{"start":{"line":55,"column":0},"end":{"line":60,"column":2}},"31":{"start":{"line":56,"column":2},"end":{"line":59,"column":3}},"32":{"start":{"line":57,"column":4},"end":{"line":57,"column":22}},"33":{"start":{"line":58,"column":4},"end":{"line":58,"column":16}},"34":{"start":{"line":62,"column":0},"end":{"line":65,"column":1}},"35":{"start":{"line":63,"column":2},"end":{"line":63,"column":17}},"36":{"start":{"line":64,"column":2},"end":{"line":64,"column":14}},"37":{"start":{"line":67,"column":0},"end":{"line":67,"column":23}}},"branchMap":{"1":{"line":4,"type":"if","locations":[{"start":{"line":4,"column":2},"end":{"line":4,"column":2}},{"start":{"line":4,"column":2},"end":{"line":4,"column":2}}]},"2":{"line":8,"type":"binary-expr","locations":[{"start":{"line":8,"column":12},"end":{"line":8,"column":19}},{"start":{"line":8,"column":23},"end":{"line":8,"column":25}}]},"3":{"line":9,"type":"binary-expr","locations":[{"start":{"line":9,"column":21},"end":{"line":9,"column":40}},{"start":{"line":9,"column":44},"end":{"line":9,"column":52}}]},"4":{"line":37,"type":"if","locations":[{"start":{"line":37,"column":2},"end":{"line":37,"column":2}},{"start":{"line":37,"column":2},"end":{"line":37,"column":2}}]},"5":{"line":40,"type":"if","locations":[{"start":{"line":40,"column":2},"end":{"line":40,"column":2}},{"start":{"line":40,"column":2},"end":{"line":40,"column":2}}]},"6":{"line":47,"type":"if","locations":[{"start":{"line":47,"column":2},"end":{"line":47,"column":2}},{"start":{"line":47,"column":2},"end":{"line":47,"column":2}}]},"7":{"line":56,"type":"if","locations":[{"start":{"line":56,"column":2},"end":{"line":56,"column":2}},{"start":{"line":56,"column":2},"end":{"line":56,"column":2}}]}}}}
|
|
73
node_modules/async-limiter/coverage/lcov-report/async-throttle/index.html
generated
vendored
73
node_modules/async-limiter/coverage/lcov-report/async-throttle/index.html
generated
vendored
@@ -1,73 +0,0 @@
|
|||||||
<!doctype html>
|
|
||||||
<html lang="en">
|
|
||||||
<head>
|
|
||||||
<title>Code coverage report for async-throttle/</title>
|
|
||||||
<meta charset="utf-8">
|
|
||||||
<link rel="stylesheet" href="../prettify.css">
|
|
||||||
<link rel="stylesheet" href="../base.css">
|
|
||||||
<style type='text/css'>
|
|
||||||
div.coverage-summary .sorter {
|
|
||||||
background-image: url(../sort-arrow-sprite.png);
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<div class="header high">
|
|
||||||
<h1>Code coverage report for <span class="entity">async-throttle/</span></h1>
|
|
||||||
<h2>
|
|
||||||
Statements: <span class="metric">100% <small>(37 / 37)</small></span>
|
|
||||||
Branches: <span class="metric">92.86% <small>(13 / 14)</small></span>
|
|
||||||
Functions: <span class="metric">100% <small>(7 / 7)</small></span>
|
|
||||||
Lines: <span class="metric">100% <small>(37 / 37)</small></span>
|
|
||||||
Ignored: <span class="metric"><span class="ignore-none">none</span></span>
|
|
||||||
</h2>
|
|
||||||
<div class="path"><a href="../index.html">All files</a> » async-throttle/</div>
|
|
||||||
</div>
|
|
||||||
<div class="body">
|
|
||||||
<div class="coverage-summary">
|
|
||||||
<table>
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th data-col="file" data-fmt="html" data-html="true" class="file">File</th>
|
|
||||||
<th data-col="pic" data-type="number" data-fmt="html" data-html="true" class="pic"></th>
|
|
||||||
<th data-col="statements" data-type="number" data-fmt="pct" class="pct">Statements</th>
|
|
||||||
<th data-col="statements_raw" data-type="number" data-fmt="html" class="abs"></th>
|
|
||||||
<th data-col="branches" data-type="number" data-fmt="pct" class="pct">Branches</th>
|
|
||||||
<th data-col="branches_raw" data-type="number" data-fmt="html" class="abs"></th>
|
|
||||||
<th data-col="functions" data-type="number" data-fmt="pct" class="pct">Functions</th>
|
|
||||||
<th data-col="functions_raw" data-type="number" data-fmt="html" class="abs"></th>
|
|
||||||
<th data-col="lines" data-type="number" data-fmt="pct" class="pct">Lines</th>
|
|
||||||
<th data-col="lines_raw" data-type="number" data-fmt="html" class="abs"></th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody><tr>
|
|
||||||
<td class="file high" data-value="index.js"><a href="index.js.html">index.js</a></td>
|
|
||||||
<td data-value="100" class="pic high"><span class="cover-fill cover-full" style="width: 100px;"></span><span class="cover-empty" style="width:0px;"></span></td>
|
|
||||||
<td data-value="100" class="pct high">100%</td>
|
|
||||||
<td data-value="37" class="abs high">(37 / 37)</td>
|
|
||||||
<td data-value="92.86" class="pct high">92.86%</td>
|
|
||||||
<td data-value="14" class="abs high">(13 / 14)</td>
|
|
||||||
<td data-value="100" class="pct high">100%</td>
|
|
||||||
<td data-value="7" class="abs high">(7 / 7)</td>
|
|
||||||
<td data-value="100" class="pct high">100%</td>
|
|
||||||
<td data-value="37" class="abs high">(37 / 37)</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="footer">
|
|
||||||
<div class="meta">Generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Mon Sep 11 2017 11:14:14 GMT-0500 (CDT)</div>
|
|
||||||
</div>
|
|
||||||
<script src="../prettify.js"></script>
|
|
||||||
<script>
|
|
||||||
window.onload = function () {
|
|
||||||
if (typeof prettyPrint === 'function') {
|
|
||||||
prettyPrint();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
<script src="../sorter.js"></script>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
246
node_modules/async-limiter/coverage/lcov-report/async-throttle/index.js.html
generated
vendored
246
node_modules/async-limiter/coverage/lcov-report/async-throttle/index.js.html
generated
vendored
@@ -1,246 +0,0 @@
|
|||||||
<!doctype html>
|
|
||||||
<html lang="en">
|
|
||||||
<head>
|
|
||||||
<title>Code coverage report for async-throttle/index.js</title>
|
|
||||||
<meta charset="utf-8">
|
|
||||||
<link rel="stylesheet" href="../prettify.css">
|
|
||||||
<link rel="stylesheet" href="../base.css">
|
|
||||||
<style type='text/css'>
|
|
||||||
div.coverage-summary .sorter {
|
|
||||||
background-image: url(../sort-arrow-sprite.png);
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<div class="header high">
|
|
||||||
<h1>Code coverage report for <span class="entity">async-throttle/index.js</span></h1>
|
|
||||||
<h2>
|
|
||||||
Statements: <span class="metric">100% <small>(37 / 37)</small></span>
|
|
||||||
Branches: <span class="metric">92.86% <small>(13 / 14)</small></span>
|
|
||||||
Functions: <span class="metric">100% <small>(7 / 7)</small></span>
|
|
||||||
Lines: <span class="metric">100% <small>(37 / 37)</small></span>
|
|
||||||
Ignored: <span class="metric"><span class="ignore-none">none</span></span>
|
|
||||||
</h2>
|
|
||||||
<div class="path"><a href="../index.html">All files</a> » <a href="index.html">async-throttle/</a> » index.js</div>
|
|
||||||
</div>
|
|
||||||
<div class="body">
|
|
||||||
<pre><table class="coverage">
|
|
||||||
<tr><td class="line-count">1
|
|
||||||
2
|
|
||||||
3
|
|
||||||
4
|
|
||||||
5
|
|
||||||
6
|
|
||||||
7
|
|
||||||
8
|
|
||||||
9
|
|
||||||
10
|
|
||||||
11
|
|
||||||
12
|
|
||||||
13
|
|
||||||
14
|
|
||||||
15
|
|
||||||
16
|
|
||||||
17
|
|
||||||
18
|
|
||||||
19
|
|
||||||
20
|
|
||||||
21
|
|
||||||
22
|
|
||||||
23
|
|
||||||
24
|
|
||||||
25
|
|
||||||
26
|
|
||||||
27
|
|
||||||
28
|
|
||||||
29
|
|
||||||
30
|
|
||||||
31
|
|
||||||
32
|
|
||||||
33
|
|
||||||
34
|
|
||||||
35
|
|
||||||
36
|
|
||||||
37
|
|
||||||
38
|
|
||||||
39
|
|
||||||
40
|
|
||||||
41
|
|
||||||
42
|
|
||||||
43
|
|
||||||
44
|
|
||||||
45
|
|
||||||
46
|
|
||||||
47
|
|
||||||
48
|
|
||||||
49
|
|
||||||
50
|
|
||||||
51
|
|
||||||
52
|
|
||||||
53
|
|
||||||
54
|
|
||||||
55
|
|
||||||
56
|
|
||||||
57
|
|
||||||
58
|
|
||||||
59
|
|
||||||
60
|
|
||||||
61
|
|
||||||
62
|
|
||||||
63
|
|
||||||
64
|
|
||||||
65
|
|
||||||
66
|
|
||||||
67
|
|
||||||
68</td><td class="line-coverage"><span class="cline-any cline-neutral"> </span>
|
|
||||||
<span class="cline-any cline-neutral"> </span>
|
|
||||||
<span class="cline-any cline-yes">1</span>
|
|
||||||
<span class="cline-any cline-yes">7</span>
|
|
||||||
<span class="cline-any cline-yes">1</span>
|
|
||||||
<span class="cline-any cline-neutral"> </span>
|
|
||||||
<span class="cline-any cline-neutral"> </span>
|
|
||||||
<span class="cline-any cline-yes">6</span>
|
|
||||||
<span class="cline-any cline-yes">6</span>
|
|
||||||
<span class="cline-any cline-yes">6</span>
|
|
||||||
<span class="cline-any cline-yes">6</span>
|
|
||||||
<span class="cline-any cline-yes">6</span>
|
|
||||||
<span class="cline-any cline-yes">6</span>
|
|
||||||
<span class="cline-any cline-neutral"> </span>
|
|
||||||
<span class="cline-any cline-neutral"> </span>
|
|
||||||
<span class="cline-any cline-yes">1</span>
|
|
||||||
<span class="cline-any cline-neutral"> </span>
|
|
||||||
<span class="cline-any cline-neutral"> </span>
|
|
||||||
<span class="cline-any cline-neutral"> </span>
|
|
||||||
<span class="cline-any cline-neutral"> </span>
|
|
||||||
<span class="cline-any cline-neutral"> </span>
|
|
||||||
<span class="cline-any cline-yes">1</span>
|
|
||||||
<span class="cline-any cline-yes">3</span>
|
|
||||||
<span class="cline-any cline-yes">13</span>
|
|
||||||
<span class="cline-any cline-yes">13</span>
|
|
||||||
<span class="cline-any cline-yes">13</span>
|
|
||||||
<span class="cline-any cline-neutral"> </span>
|
|
||||||
<span class="cline-any cline-neutral"> </span>
|
|
||||||
<span class="cline-any cline-neutral"> </span>
|
|
||||||
<span class="cline-any cline-yes">1</span>
|
|
||||||
<span class="cline-any cline-neutral"> </span>
|
|
||||||
<span class="cline-any cline-yes">19</span>
|
|
||||||
<span class="cline-any cline-neutral"> </span>
|
|
||||||
<span class="cline-any cline-neutral"> </span>
|
|
||||||
<span class="cline-any cline-neutral"> </span>
|
|
||||||
<span class="cline-any cline-yes">1</span>
|
|
||||||
<span class="cline-any cline-yes">45</span>
|
|
||||||
<span class="cline-any cline-yes">6</span>
|
|
||||||
<span class="cline-any cline-neutral"> </span>
|
|
||||||
<span class="cline-any cline-yes">39</span>
|
|
||||||
<span class="cline-any cline-yes">13</span>
|
|
||||||
<span class="cline-any cline-yes">13</span>
|
|
||||||
<span class="cline-any cline-yes">13</span>
|
|
||||||
<span class="cline-any cline-yes">13</span>
|
|
||||||
<span class="cline-any cline-neutral"> </span>
|
|
||||||
<span class="cline-any cline-neutral"> </span>
|
|
||||||
<span class="cline-any cline-yes">39</span>
|
|
||||||
<span class="cline-any cline-yes">18</span>
|
|
||||||
<span class="cline-any cline-yes">6</span>
|
|
||||||
<span class="cline-any cline-yes">6</span>
|
|
||||||
<span class="cline-any cline-neutral"> </span>
|
|
||||||
<span class="cline-any cline-neutral"> </span>
|
|
||||||
<span class="cline-any cline-neutral"> </span>
|
|
||||||
<span class="cline-any cline-neutral"> </span>
|
|
||||||
<span class="cline-any cline-yes">1</span>
|
|
||||||
<span class="cline-any cline-yes">6</span>
|
|
||||||
<span class="cline-any cline-yes">6</span>
|
|
||||||
<span class="cline-any cline-yes">6</span>
|
|
||||||
<span class="cline-any cline-neutral"> </span>
|
|
||||||
<span class="cline-any cline-neutral"> </span>
|
|
||||||
<span class="cline-any cline-neutral"> </span>
|
|
||||||
<span class="cline-any cline-yes">1</span>
|
|
||||||
<span class="cline-any cline-yes">13</span>
|
|
||||||
<span class="cline-any cline-yes">13</span>
|
|
||||||
<span class="cline-any cline-neutral"> </span>
|
|
||||||
<span class="cline-any cline-neutral"> </span>
|
|
||||||
<span class="cline-any cline-yes">1</span>
|
|
||||||
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js">'use strict';
|
|
||||||
|
|
||||||
function Queue(options) {
|
|
||||||
if (!(this instanceof Queue)) {
|
|
||||||
return new Queue(options);
|
|
||||||
}
|
|
||||||
|
|
||||||
options = options || {};
|
|
||||||
this.concurrency = options.concurrency || Infinity;
|
|
||||||
this.pending = 0;
|
|
||||||
this.jobs = [];
|
|
||||||
this.cbs = [];
|
|
||||||
this._done = done.bind(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
var arrayAddMethods = [
|
|
||||||
'push',
|
|
||||||
'unshift',
|
|
||||||
'splice'
|
|
||||||
];
|
|
||||||
|
|
||||||
arrayAddMethods.forEach(function(method) {
|
|
||||||
Queue.prototype[method] = function() {
|
|
||||||
var methodResult = Array.prototype[method].apply(this.jobs, arguments);
|
|
||||||
this._run();
|
|
||||||
return methodResult;
|
|
||||||
};
|
|
||||||
});
|
|
||||||
|
|
||||||
Object.defineProperty(Queue.prototype, 'length', {
|
|
||||||
get: function() {
|
|
||||||
return this.pending + this.jobs.length;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
Queue.prototype._run = function() {
|
|
||||||
if (this.pending === this.concurrency) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (this.jobs.length) {
|
|
||||||
var job = this.jobs.shift();
|
|
||||||
this.pending++;
|
|
||||||
job(this._done);
|
|
||||||
this._run();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.pending === 0) {
|
|
||||||
while (this.cbs.length !== 0) {
|
|
||||||
var cb = this.cbs.pop();
|
|
||||||
process.nextTick(cb);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
Queue.prototype.onDone = function(cb) {
|
|
||||||
<span class="missing-if-branch" title="else path not taken" >E</span>if (typeof cb === 'function') {
|
|
||||||
this.cbs.push(cb);
|
|
||||||
this._run();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
function done() {
|
|
||||||
this.pending--;
|
|
||||||
this._run();
|
|
||||||
}
|
|
||||||
|
|
||||||
module.exports = Queue;
|
|
||||||
</pre></td></tr>
|
|
||||||
</table></pre>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<div class="footer">
|
|
||||||
<div class="meta">Generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Mon Sep 11 2017 11:14:14 GMT-0500 (CDT)</div>
|
|
||||||
</div>
|
|
||||||
<script src="../prettify.js"></script>
|
|
||||||
<script>
|
|
||||||
window.onload = function () {
|
|
||||||
if (typeof prettyPrint === 'function') {
|
|
||||||
prettyPrint();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
<script src="../sorter.js"></script>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
182
node_modules/async-limiter/coverage/lcov-report/base.css
generated
vendored
182
node_modules/async-limiter/coverage/lcov-report/base.css
generated
vendored
@@ -1,182 +0,0 @@
|
|||||||
body, html {
|
|
||||||
margin:0; padding: 0;
|
|
||||||
}
|
|
||||||
body {
|
|
||||||
font-family: Helvetica Neue, Helvetica,Arial;
|
|
||||||
font-size: 10pt;
|
|
||||||
}
|
|
||||||
div.header, div.footer {
|
|
||||||
background: #eee;
|
|
||||||
padding: 1em;
|
|
||||||
}
|
|
||||||
div.header {
|
|
||||||
z-index: 100;
|
|
||||||
position: fixed;
|
|
||||||
top: 0;
|
|
||||||
border-bottom: 1px solid #666;
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
div.footer {
|
|
||||||
border-top: 1px solid #666;
|
|
||||||
}
|
|
||||||
div.body {
|
|
||||||
margin-top: 10em;
|
|
||||||
}
|
|
||||||
div.meta {
|
|
||||||
font-size: 90%;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
h1, h2, h3 {
|
|
||||||
font-weight: normal;
|
|
||||||
}
|
|
||||||
h1 {
|
|
||||||
font-size: 12pt;
|
|
||||||
}
|
|
||||||
h2 {
|
|
||||||
font-size: 10pt;
|
|
||||||
}
|
|
||||||
pre {
|
|
||||||
font-family: Consolas, Menlo, Monaco, monospace;
|
|
||||||
margin: 0;
|
|
||||||
padding: 0;
|
|
||||||
line-height: 1.3;
|
|
||||||
font-size: 14px;
|
|
||||||
-moz-tab-size: 2;
|
|
||||||
-o-tab-size: 2;
|
|
||||||
tab-size: 2;
|
|
||||||
}
|
|
||||||
|
|
||||||
div.path { font-size: 110%; }
|
|
||||||
div.path a:link, div.path a:visited { color: #000; }
|
|
||||||
table.coverage { border-collapse: collapse; margin:0; padding: 0 }
|
|
||||||
|
|
||||||
table.coverage td {
|
|
||||||
margin: 0;
|
|
||||||
padding: 0;
|
|
||||||
color: #111;
|
|
||||||
vertical-align: top;
|
|
||||||
}
|
|
||||||
table.coverage td.line-count {
|
|
||||||
width: 50px;
|
|
||||||
text-align: right;
|
|
||||||
padding-right: 5px;
|
|
||||||
}
|
|
||||||
table.coverage td.line-coverage {
|
|
||||||
color: #777 !important;
|
|
||||||
text-align: right;
|
|
||||||
border-left: 1px solid #666;
|
|
||||||
border-right: 1px solid #666;
|
|
||||||
}
|
|
||||||
|
|
||||||
table.coverage td.text {
|
|
||||||
}
|
|
||||||
|
|
||||||
table.coverage td span.cline-any {
|
|
||||||
display: inline-block;
|
|
||||||
padding: 0 5px;
|
|
||||||
width: 40px;
|
|
||||||
}
|
|
||||||
table.coverage td span.cline-neutral {
|
|
||||||
background: #eee;
|
|
||||||
}
|
|
||||||
table.coverage td span.cline-yes {
|
|
||||||
background: #b5d592;
|
|
||||||
color: #999;
|
|
||||||
}
|
|
||||||
table.coverage td span.cline-no {
|
|
||||||
background: #fc8c84;
|
|
||||||
}
|
|
||||||
|
|
||||||
.cstat-yes { color: #111; }
|
|
||||||
.cstat-no { background: #fc8c84; color: #111; }
|
|
||||||
.fstat-no { background: #ffc520; color: #111 !important; }
|
|
||||||
.cbranch-no { background: yellow !important; color: #111; }
|
|
||||||
|
|
||||||
.cstat-skip { background: #ddd; color: #111; }
|
|
||||||
.fstat-skip { background: #ddd; color: #111 !important; }
|
|
||||||
.cbranch-skip { background: #ddd !important; color: #111; }
|
|
||||||
|
|
||||||
.missing-if-branch {
|
|
||||||
display: inline-block;
|
|
||||||
margin-right: 10px;
|
|
||||||
position: relative;
|
|
||||||
padding: 0 4px;
|
|
||||||
background: black;
|
|
||||||
color: yellow;
|
|
||||||
}
|
|
||||||
|
|
||||||
.skip-if-branch {
|
|
||||||
display: none;
|
|
||||||
margin-right: 10px;
|
|
||||||
position: relative;
|
|
||||||
padding: 0 4px;
|
|
||||||
background: #ccc;
|
|
||||||
color: white;
|
|
||||||
}
|
|
||||||
|
|
||||||
.missing-if-branch .typ, .skip-if-branch .typ {
|
|
||||||
color: inherit !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.entity, .metric { font-weight: bold; }
|
|
||||||
.metric { display: inline-block; border: 1px solid #333; padding: 0.3em; background: white; }
|
|
||||||
.metric small { font-size: 80%; font-weight: normal; color: #666; }
|
|
||||||
|
|
||||||
div.coverage-summary table { border-collapse: collapse; margin: 3em; font-size: 110%; }
|
|
||||||
div.coverage-summary td, div.coverage-summary table th { margin: 0; padding: 0.25em 1em; border-top: 1px solid #666; border-bottom: 1px solid #666; }
|
|
||||||
div.coverage-summary th { text-align: left; border: 1px solid #666; background: #eee; font-weight: normal; }
|
|
||||||
div.coverage-summary th.file { border-right: none !important; }
|
|
||||||
div.coverage-summary th.pic { border-left: none !important; text-align: right; }
|
|
||||||
div.coverage-summary th.pct { border-right: none !important; }
|
|
||||||
div.coverage-summary th.abs { border-left: none !important; text-align: right; }
|
|
||||||
div.coverage-summary td.pct { text-align: right; border-left: 1px solid #666; }
|
|
||||||
div.coverage-summary td.abs { text-align: right; font-size: 90%; color: #444; border-right: 1px solid #666; }
|
|
||||||
div.coverage-summary td.file { border-left: 1px solid #666; white-space: nowrap; }
|
|
||||||
div.coverage-summary td.pic { min-width: 120px !important; }
|
|
||||||
div.coverage-summary a:link { text-decoration: none; color: #000; }
|
|
||||||
div.coverage-summary a:visited { text-decoration: none; color: #777; }
|
|
||||||
div.coverage-summary a:hover { text-decoration: underline; }
|
|
||||||
div.coverage-summary tfoot td { border-top: 1px solid #666; }
|
|
||||||
|
|
||||||
div.coverage-summary .sorter {
|
|
||||||
height: 10px;
|
|
||||||
width: 7px;
|
|
||||||
display: inline-block;
|
|
||||||
margin-left: 0.5em;
|
|
||||||
background: url(sort-arrow-sprite.png) no-repeat scroll 0 0 transparent;
|
|
||||||
}
|
|
||||||
div.coverage-summary .sorted .sorter {
|
|
||||||
background-position: 0 -20px;
|
|
||||||
}
|
|
||||||
div.coverage-summary .sorted-desc .sorter {
|
|
||||||
background-position: 0 -10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.high { background: #b5d592 !important; }
|
|
||||||
.medium { background: #ffe87c !important; }
|
|
||||||
.low { background: #fc8c84 !important; }
|
|
||||||
|
|
||||||
span.cover-fill, span.cover-empty {
|
|
||||||
display:inline-block;
|
|
||||||
border:1px solid #444;
|
|
||||||
background: white;
|
|
||||||
height: 12px;
|
|
||||||
}
|
|
||||||
span.cover-fill {
|
|
||||||
background: #ccc;
|
|
||||||
border-right: 1px solid #444;
|
|
||||||
}
|
|
||||||
span.cover-empty {
|
|
||||||
background: white;
|
|
||||||
border-left: none;
|
|
||||||
}
|
|
||||||
span.cover-full {
|
|
||||||
border-right: none !important;
|
|
||||||
}
|
|
||||||
pre.prettyprint {
|
|
||||||
border: none !important;
|
|
||||||
padding: 0 !important;
|
|
||||||
margin: 0 !important;
|
|
||||||
}
|
|
||||||
.com { color: #999 !important; }
|
|
||||||
.ignore-none { color: #999; font-weight: normal; }
|
|
73
node_modules/async-limiter/coverage/lcov-report/index.html
generated
vendored
73
node_modules/async-limiter/coverage/lcov-report/index.html
generated
vendored
@@ -1,73 +0,0 @@
|
|||||||
<!doctype html>
|
|
||||||
<html lang="en">
|
|
||||||
<head>
|
|
||||||
<title>Code coverage report for All files</title>
|
|
||||||
<meta charset="utf-8">
|
|
||||||
<link rel="stylesheet" href="prettify.css">
|
|
||||||
<link rel="stylesheet" href="base.css">
|
|
||||||
<style type='text/css'>
|
|
||||||
div.coverage-summary .sorter {
|
|
||||||
background-image: url(sort-arrow-sprite.png);
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<div class="header high">
|
|
||||||
<h1>Code coverage report for <span class="entity">All files</span></h1>
|
|
||||||
<h2>
|
|
||||||
Statements: <span class="metric">100% <small>(37 / 37)</small></span>
|
|
||||||
Branches: <span class="metric">92.86% <small>(13 / 14)</small></span>
|
|
||||||
Functions: <span class="metric">100% <small>(7 / 7)</small></span>
|
|
||||||
Lines: <span class="metric">100% <small>(37 / 37)</small></span>
|
|
||||||
Ignored: <span class="metric"><span class="ignore-none">none</span></span>
|
|
||||||
</h2>
|
|
||||||
<div class="path"></div>
|
|
||||||
</div>
|
|
||||||
<div class="body">
|
|
||||||
<div class="coverage-summary">
|
|
||||||
<table>
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th data-col="file" data-fmt="html" data-html="true" class="file">File</th>
|
|
||||||
<th data-col="pic" data-type="number" data-fmt="html" data-html="true" class="pic"></th>
|
|
||||||
<th data-col="statements" data-type="number" data-fmt="pct" class="pct">Statements</th>
|
|
||||||
<th data-col="statements_raw" data-type="number" data-fmt="html" class="abs"></th>
|
|
||||||
<th data-col="branches" data-type="number" data-fmt="pct" class="pct">Branches</th>
|
|
||||||
<th data-col="branches_raw" data-type="number" data-fmt="html" class="abs"></th>
|
|
||||||
<th data-col="functions" data-type="number" data-fmt="pct" class="pct">Functions</th>
|
|
||||||
<th data-col="functions_raw" data-type="number" data-fmt="html" class="abs"></th>
|
|
||||||
<th data-col="lines" data-type="number" data-fmt="pct" class="pct">Lines</th>
|
|
||||||
<th data-col="lines_raw" data-type="number" data-fmt="html" class="abs"></th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody><tr>
|
|
||||||
<td class="file high" data-value="async-throttle/"><a href="async-throttle/index.html">async-throttle/</a></td>
|
|
||||||
<td data-value="100" class="pic high"><span class="cover-fill cover-full" style="width: 100px;"></span><span class="cover-empty" style="width:0px;"></span></td>
|
|
||||||
<td data-value="100" class="pct high">100%</td>
|
|
||||||
<td data-value="37" class="abs high">(37 / 37)</td>
|
|
||||||
<td data-value="92.86" class="pct high">92.86%</td>
|
|
||||||
<td data-value="14" class="abs high">(13 / 14)</td>
|
|
||||||
<td data-value="100" class="pct high">100%</td>
|
|
||||||
<td data-value="7" class="abs high">(7 / 7)</td>
|
|
||||||
<td data-value="100" class="pct high">100%</td>
|
|
||||||
<td data-value="37" class="abs high">(37 / 37)</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="footer">
|
|
||||||
<div class="meta">Generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Mon Sep 11 2017 11:14:14 GMT-0500 (CDT)</div>
|
|
||||||
</div>
|
|
||||||
<script src="prettify.js"></script>
|
|
||||||
<script>
|
|
||||||
window.onload = function () {
|
|
||||||
if (typeof prettyPrint === 'function') {
|
|
||||||
prettyPrint();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
<script src="sorter.js"></script>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
1
node_modules/async-limiter/coverage/lcov-report/prettify.css
generated
vendored
1
node_modules/async-limiter/coverage/lcov-report/prettify.css
generated
vendored
@@ -1 +0,0 @@
|
|||||||
.pln{color:#000}@media screen{.str{color:#080}.kwd{color:#008}.com{color:#800}.typ{color:#606}.lit{color:#066}.pun,.opn,.clo{color:#660}.tag{color:#008}.atn{color:#606}.atv{color:#080}.dec,.var{color:#606}.fun{color:red}}@media print,projection{.str{color:#060}.kwd{color:#006;font-weight:bold}.com{color:#600;font-style:italic}.typ{color:#404;font-weight:bold}.lit{color:#044}.pun,.opn,.clo{color:#440}.tag{color:#006;font-weight:bold}.atn{color:#404}.atv{color:#060}}pre.prettyprint{padding:2px;border:1px solid #888}ol.linenums{margin-top:0;margin-bottom:0}li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8{list-style-type:none}li.L1,li.L3,li.L5,li.L7,li.L9{background:#eee}
|
|
1
node_modules/async-limiter/coverage/lcov-report/prettify.js
generated
vendored
1
node_modules/async-limiter/coverage/lcov-report/prettify.js
generated
vendored
File diff suppressed because one or more lines are too long
BIN
node_modules/async-limiter/coverage/lcov-report/sort-arrow-sprite.png
generated
vendored
BIN
node_modules/async-limiter/coverage/lcov-report/sort-arrow-sprite.png
generated
vendored
Binary file not shown.
Before Width: | Height: | Size: 209 B |
156
node_modules/async-limiter/coverage/lcov-report/sorter.js
generated
vendored
156
node_modules/async-limiter/coverage/lcov-report/sorter.js
generated
vendored
@@ -1,156 +0,0 @@
|
|||||||
var addSorting = (function () {
|
|
||||||
"use strict";
|
|
||||||
var cols,
|
|
||||||
currentSort = {
|
|
||||||
index: 0,
|
|
||||||
desc: false
|
|
||||||
};
|
|
||||||
|
|
||||||
// returns the summary table element
|
|
||||||
function getTable() { return document.querySelector('.coverage-summary table'); }
|
|
||||||
// returns the thead element of the summary table
|
|
||||||
function getTableHeader() { return getTable().querySelector('thead tr'); }
|
|
||||||
// returns the tbody element of the summary table
|
|
||||||
function getTableBody() { return getTable().querySelector('tbody'); }
|
|
||||||
// returns the th element for nth column
|
|
||||||
function getNthColumn(n) { return getTableHeader().querySelectorAll('th')[n]; }
|
|
||||||
|
|
||||||
// loads all columns
|
|
||||||
function loadColumns() {
|
|
||||||
var colNodes = getTableHeader().querySelectorAll('th'),
|
|
||||||
colNode,
|
|
||||||
cols = [],
|
|
||||||
col,
|
|
||||||
i;
|
|
||||||
|
|
||||||
for (i = 0; i < colNodes.length; i += 1) {
|
|
||||||
colNode = colNodes[i];
|
|
||||||
col = {
|
|
||||||
key: colNode.getAttribute('data-col'),
|
|
||||||
sortable: !colNode.getAttribute('data-nosort'),
|
|
||||||
type: colNode.getAttribute('data-type') || 'string'
|
|
||||||
};
|
|
||||||
cols.push(col);
|
|
||||||
if (col.sortable) {
|
|
||||||
col.defaultDescSort = col.type === 'number';
|
|
||||||
colNode.innerHTML = colNode.innerHTML + '<span class="sorter"></span>';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return cols;
|
|
||||||
}
|
|
||||||
// attaches a data attribute to every tr element with an object
|
|
||||||
// of data values keyed by column name
|
|
||||||
function loadRowData(tableRow) {
|
|
||||||
var tableCols = tableRow.querySelectorAll('td'),
|
|
||||||
colNode,
|
|
||||||
col,
|
|
||||||
data = {},
|
|
||||||
i,
|
|
||||||
val;
|
|
||||||
for (i = 0; i < tableCols.length; i += 1) {
|
|
||||||
colNode = tableCols[i];
|
|
||||||
col = cols[i];
|
|
||||||
val = colNode.getAttribute('data-value');
|
|
||||||
if (col.type === 'number') {
|
|
||||||
val = Number(val);
|
|
||||||
}
|
|
||||||
data[col.key] = val;
|
|
||||||
}
|
|
||||||
return data;
|
|
||||||
}
|
|
||||||
// loads all row data
|
|
||||||
function loadData() {
|
|
||||||
var rows = getTableBody().querySelectorAll('tr'),
|
|
||||||
i;
|
|
||||||
|
|
||||||
for (i = 0; i < rows.length; i += 1) {
|
|
||||||
rows[i].data = loadRowData(rows[i]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// sorts the table using the data for the ith column
|
|
||||||
function sortByIndex(index, desc) {
|
|
||||||
var key = cols[index].key,
|
|
||||||
sorter = function (a, b) {
|
|
||||||
a = a.data[key];
|
|
||||||
b = b.data[key];
|
|
||||||
return a < b ? -1 : a > b ? 1 : 0;
|
|
||||||
},
|
|
||||||
finalSorter = sorter,
|
|
||||||
tableBody = document.querySelector('.coverage-summary tbody'),
|
|
||||||
rowNodes = tableBody.querySelectorAll('tr'),
|
|
||||||
rows = [],
|
|
||||||
i;
|
|
||||||
|
|
||||||
if (desc) {
|
|
||||||
finalSorter = function (a, b) {
|
|
||||||
return -1 * sorter(a, b);
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
for (i = 0; i < rowNodes.length; i += 1) {
|
|
||||||
rows.push(rowNodes[i]);
|
|
||||||
tableBody.removeChild(rowNodes[i]);
|
|
||||||
}
|
|
||||||
|
|
||||||
rows.sort(finalSorter);
|
|
||||||
|
|
||||||
for (i = 0; i < rows.length; i += 1) {
|
|
||||||
tableBody.appendChild(rows[i]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// removes sort indicators for current column being sorted
|
|
||||||
function removeSortIndicators() {
|
|
||||||
var col = getNthColumn(currentSort.index),
|
|
||||||
cls = col.className;
|
|
||||||
|
|
||||||
cls = cls.replace(/ sorted$/, '').replace(/ sorted-desc$/, '');
|
|
||||||
col.className = cls;
|
|
||||||
}
|
|
||||||
// adds sort indicators for current column being sorted
|
|
||||||
function addSortIndicators() {
|
|
||||||
getNthColumn(currentSort.index).className += currentSort.desc ? ' sorted-desc' : ' sorted';
|
|
||||||
}
|
|
||||||
// adds event listeners for all sorter widgets
|
|
||||||
function enableUI() {
|
|
||||||
var i,
|
|
||||||
el,
|
|
||||||
ithSorter = function ithSorter(i) {
|
|
||||||
var col = cols[i];
|
|
||||||
|
|
||||||
return function () {
|
|
||||||
var desc = col.defaultDescSort;
|
|
||||||
|
|
||||||
if (currentSort.index === i) {
|
|
||||||
desc = !currentSort.desc;
|
|
||||||
}
|
|
||||||
sortByIndex(i, desc);
|
|
||||||
removeSortIndicators();
|
|
||||||
currentSort.index = i;
|
|
||||||
currentSort.desc = desc;
|
|
||||||
addSortIndicators();
|
|
||||||
};
|
|
||||||
};
|
|
||||||
for (i =0 ; i < cols.length; i += 1) {
|
|
||||||
if (cols[i].sortable) {
|
|
||||||
el = getNthColumn(i).querySelector('.sorter');
|
|
||||||
if (el.addEventListener) {
|
|
||||||
el.addEventListener('click', ithSorter(i));
|
|
||||||
} else {
|
|
||||||
el.attachEvent('onclick', ithSorter(i));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// adds sorting functionality to the UI
|
|
||||||
return function () {
|
|
||||||
if (!getTable()) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
cols = loadColumns();
|
|
||||||
loadData(cols);
|
|
||||||
addSortIndicators();
|
|
||||||
enableUI();
|
|
||||||
};
|
|
||||||
})();
|
|
||||||
|
|
||||||
window.addEventListener('load', addSorting);
|
|
74
node_modules/async-limiter/coverage/lcov.info
generated
vendored
74
node_modules/async-limiter/coverage/lcov.info
generated
vendored
@@ -1,74 +0,0 @@
|
|||||||
TN:
|
|
||||||
SF:/Users/samuelreed/git/forks/async-throttle/index.js
|
|
||||||
FN:3,Queue
|
|
||||||
FN:22,(anonymous_2)
|
|
||||||
FN:23,(anonymous_3)
|
|
||||||
FN:31,(anonymous_4)
|
|
||||||
FN:36,(anonymous_5)
|
|
||||||
FN:55,(anonymous_6)
|
|
||||||
FN:62,done
|
|
||||||
FNF:7
|
|
||||||
FNH:7
|
|
||||||
FNDA:7,Queue
|
|
||||||
FNDA:3,(anonymous_2)
|
|
||||||
FNDA:13,(anonymous_3)
|
|
||||||
FNDA:19,(anonymous_4)
|
|
||||||
FNDA:45,(anonymous_5)
|
|
||||||
FNDA:6,(anonymous_6)
|
|
||||||
FNDA:13,done
|
|
||||||
DA:3,1
|
|
||||||
DA:4,7
|
|
||||||
DA:5,1
|
|
||||||
DA:8,6
|
|
||||||
DA:9,6
|
|
||||||
DA:10,6
|
|
||||||
DA:11,6
|
|
||||||
DA:12,6
|
|
||||||
DA:13,6
|
|
||||||
DA:16,1
|
|
||||||
DA:22,1
|
|
||||||
DA:23,3
|
|
||||||
DA:24,13
|
|
||||||
DA:25,13
|
|
||||||
DA:26,13
|
|
||||||
DA:30,1
|
|
||||||
DA:32,19
|
|
||||||
DA:36,1
|
|
||||||
DA:37,45
|
|
||||||
DA:38,6
|
|
||||||
DA:40,39
|
|
||||||
DA:41,13
|
|
||||||
DA:42,13
|
|
||||||
DA:43,13
|
|
||||||
DA:44,13
|
|
||||||
DA:47,39
|
|
||||||
DA:48,18
|
|
||||||
DA:49,6
|
|
||||||
DA:50,6
|
|
||||||
DA:55,1
|
|
||||||
DA:56,6
|
|
||||||
DA:57,6
|
|
||||||
DA:58,6
|
|
||||||
DA:62,1
|
|
||||||
DA:63,13
|
|
||||||
DA:64,13
|
|
||||||
DA:67,1
|
|
||||||
LF:37
|
|
||||||
LH:37
|
|
||||||
BRDA:4,1,0,1
|
|
||||||
BRDA:4,1,1,6
|
|
||||||
BRDA:8,2,0,6
|
|
||||||
BRDA:8,2,1,5
|
|
||||||
BRDA:9,3,0,6
|
|
||||||
BRDA:9,3,1,5
|
|
||||||
BRDA:37,4,0,6
|
|
||||||
BRDA:37,4,1,39
|
|
||||||
BRDA:40,5,0,13
|
|
||||||
BRDA:40,5,1,26
|
|
||||||
BRDA:47,6,0,18
|
|
||||||
BRDA:47,6,1,21
|
|
||||||
BRDA:56,7,0,6
|
|
||||||
BRDA:56,7,1,0
|
|
||||||
BRF:14
|
|
||||||
BRH:13
|
|
||||||
end_of_record
|
|
28
node_modules/async-limiter/package.json
generated
vendored
28
node_modules/async-limiter/package.json
generated
vendored
@@ -1,8 +1,8 @@
|
|||||||
{
|
{
|
||||||
"_from": "async-limiter@~1.0.0",
|
"_from": "async-limiter@~1.0.0",
|
||||||
"_id": "async-limiter@1.0.0",
|
"_id": "async-limiter@1.0.1",
|
||||||
"_inBundle": false,
|
"_inBundle": false,
|
||||||
"_integrity": "sha512-jp/uFnooOiO+L211eZOoSyzpOITMXx1rBITauYykG3BRYPu8h0UcxsPNB04RR5vo4Tyz3+ay17tR6JVf9qzYWg==",
|
"_integrity": "sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ==",
|
||||||
"_location": "/async-limiter",
|
"_location": "/async-limiter",
|
||||||
"_phantomChildren": {},
|
"_phantomChildren": {},
|
||||||
"_requested": {
|
"_requested": {
|
||||||
@@ -18,8 +18,8 @@
|
|||||||
"_requiredBy": [
|
"_requiredBy": [
|
||||||
"/ws"
|
"/ws"
|
||||||
],
|
],
|
||||||
"_resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.0.tgz",
|
"_resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.1.tgz",
|
||||||
"_shasum": "78faed8c3d074ab81f22b4e985d79e8738f720f8",
|
"_shasum": "dd379e94f0db8310b08291f9d64c3209766617fd",
|
||||||
"_spec": "async-limiter@~1.0.0",
|
"_spec": "async-limiter@~1.0.0",
|
||||||
"_where": "F:\\projects\\p\\minifyfromhtml\\node_modules\\ws",
|
"_where": "F:\\projects\\p\\minifyfromhtml\\node_modules\\ws",
|
||||||
"author": {
|
"author": {
|
||||||
@@ -33,13 +33,13 @@
|
|||||||
"deprecated": false,
|
"deprecated": false,
|
||||||
"description": "asynchronous function queue with adjustable concurrency",
|
"description": "asynchronous function queue with adjustable concurrency",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"coveralls": "^2.11.2",
|
"coveralls": "^3.0.3",
|
||||||
"eslint": "^4.6.1",
|
"eslint": "^5.16.0",
|
||||||
"eslint-plugin-mocha": "^4.11.0",
|
"eslint-plugin-mocha": "^5.3.0",
|
||||||
"intelli-espower-loader": "^1.0.1",
|
"intelli-espower-loader": "^1.0.1",
|
||||||
"istanbul": "^0.3.2",
|
"mocha": "^6.1.4",
|
||||||
"mocha": "^3.5.2",
|
"nyc": "^14.1.1",
|
||||||
"power-assert": "^1.4.4"
|
"power-assert": "^1.6.1"
|
||||||
},
|
},
|
||||||
"homepage": "https://github.com/strml/async-limiter#readme",
|
"homepage": "https://github.com/strml/async-limiter#readme",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
@@ -59,11 +59,11 @@
|
|||||||
"url": "git+https://github.com/strml/async-limiter.git"
|
"url": "git+https://github.com/strml/async-limiter.git"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"coverage": "istanbul cover ./node_modules/mocha/bin/_mocha --report lcovonly -- -R spec && cat ./coverage/lcov.info | coveralls",
|
"coverage": "nyc npm test && nyc report --reporter=text-lcov | coveralls",
|
||||||
"example": "node example",
|
"example": "node example",
|
||||||
"lint": "eslint .",
|
"lint": "eslint .",
|
||||||
"test": "mocha --R intelli-espower-loader test/",
|
"test": "mocha --require intelli-espower-loader test/",
|
||||||
"travis": "npm run lint && npm run coverage"
|
"travis": "npm run lint && npm run test"
|
||||||
},
|
},
|
||||||
"version": "1.0.0"
|
"version": "1.0.1"
|
||||||
}
|
}
|
||||||
|
16
node_modules/async-limiter/readme.md
generated
vendored
16
node_modules/async-limiter/readme.md
generated
vendored
@@ -93,7 +93,7 @@ console.time('deflate');
|
|||||||
for(let i = 0; i < 30000; ++i) {
|
for(let i = 0; i < 30000; ++i) {
|
||||||
deflate(payload, function (err, buffer) {});
|
deflate(payload, function (err, buffer) {});
|
||||||
}
|
}
|
||||||
q.onDone(function() {
|
t.onDone(function() {
|
||||||
console.timeEnd('deflate');
|
console.timeEnd('deflate');
|
||||||
});
|
});
|
||||||
```
|
```
|
||||||
@@ -110,23 +110,23 @@ q.onDone(function() {
|
|||||||
|
|
||||||
### `var t = new Limiter([opts])`
|
### `var t = new Limiter([opts])`
|
||||||
Constructor. `opts` may contain inital values for:
|
Constructor. `opts` may contain inital values for:
|
||||||
* `q.concurrency`
|
* `t.concurrency`
|
||||||
|
|
||||||
## Instance methods
|
## Instance methods
|
||||||
|
|
||||||
### `q.onDone(fn)`
|
### `t.onDone(fn)`
|
||||||
`fn` will be called once and only once, when the queue is empty.
|
`fn` will be called once and only once, when the queue is empty.
|
||||||
|
|
||||||
## Instance methods mixed in from `Array`
|
## Instance methods mixed in from `Array`
|
||||||
Mozilla has docs on how these methods work [here](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array).
|
Mozilla has docs on how these methods work [here](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array).
|
||||||
### `q.push(element1, ..., elementN)`
|
### `t.push(element1, ..., elementN)`
|
||||||
### `q.unshift(element1, ..., elementN)`
|
### `t.unshift(element1, ..., elementN)`
|
||||||
### `q.splice(index , howMany[, element1[, ...[, elementN]]])`
|
### `t.splice(index , howMany[, element1[, ...[, elementN]]])`
|
||||||
|
|
||||||
## Properties
|
## Properties
|
||||||
### `q.concurrency`
|
### `t.concurrency`
|
||||||
Max number of jobs the queue should process concurrently, defaults to `Infinity`.
|
Max number of jobs the queue should process concurrently, defaults to `Infinity`.
|
||||||
|
|
||||||
### `q.length`
|
### `t.length`
|
||||||
Jobs pending + jobs to process (readonly).
|
Jobs pending + jobs to process (readonly).
|
||||||
|
|
||||||
|
6
node_modules/aws4/.travis.yml
generated
vendored
6
node_modules/aws4/.travis.yml
generated
vendored
@@ -2,4 +2,8 @@ language: node_js
|
|||||||
node_js:
|
node_js:
|
||||||
- "0.10"
|
- "0.10"
|
||||||
- "0.12"
|
- "0.12"
|
||||||
- "4.2"
|
- "4"
|
||||||
|
- "6"
|
||||||
|
- "8"
|
||||||
|
- "10"
|
||||||
|
- "12"
|
||||||
|
4
node_modules/aws4/README.md
generated
vendored
4
node_modules/aws4/README.md
generated
vendored
@@ -3,10 +3,10 @@ aws4
|
|||||||
|
|
||||||
[](http://travis-ci.org/mhart/aws4)
|
[](http://travis-ci.org/mhart/aws4)
|
||||||
|
|
||||||
A small utility to sign vanilla node.js http(s) request options using Amazon's
|
A small utility to sign vanilla Node.js http(s) request options using Amazon's
|
||||||
[AWS Signature Version 4](http://docs.amazonwebservices.com/general/latest/gr/signature-version-4.html).
|
[AWS Signature Version 4](http://docs.amazonwebservices.com/general/latest/gr/signature-version-4.html).
|
||||||
|
|
||||||
Can also be used [in the browser](./browser).
|
If you want to sign and send AWS requests in a modern browser, or an environment like [Cloudflare Workers](https://developers.cloudflare.com/workers/), then check out [aws4fetch](https://github.com/mhart/aws4fetch) – otherwise you can also bundle this library for use [in the browser](./browser).
|
||||||
|
|
||||||
This signature is supported by nearly all Amazon services, including
|
This signature is supported by nearly all Amazon services, including
|
||||||
[S3](http://docs.aws.amazon.com/AmazonS3/latest/API/),
|
[S3](http://docs.aws.amazon.com/AmazonS3/latest/API/),
|
||||||
|
47
node_modules/aws4/aws4.js
generated
vendored
47
node_modules/aws4/aws4.js
generated
vendored
@@ -22,6 +22,10 @@ function encodeRfc3986(urlEncodedString) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function encodeRfc3986Full(str) {
|
||||||
|
return encodeRfc3986(encodeURIComponent(str))
|
||||||
|
}
|
||||||
|
|
||||||
// request: { path | body, [host], [method], [headers], [service], [region] }
|
// request: { path | body, [host], [method], [headers], [service], [region] }
|
||||||
// credentials: { accessKeyId, secretAccessKey, [sessionToken] }
|
// credentials: { accessKeyId, secretAccessKey, [sessionToken] }
|
||||||
function RequestSigner(request, credentials) {
|
function RequestSigner(request, credentials) {
|
||||||
@@ -220,12 +224,22 @@ RequestSigner.prototype.canonicalString = function() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (query) {
|
if (query) {
|
||||||
queryStr = encodeRfc3986(querystring.stringify(Object.keys(query).sort().reduce(function(obj, key) {
|
var reducedQuery = Object.keys(query).reduce(function(obj, key) {
|
||||||
if (!key) return obj
|
if (!key) return obj
|
||||||
obj[key] = !Array.isArray(query[key]) ? query[key] :
|
obj[encodeRfc3986Full(key)] = !Array.isArray(query[key]) ? query[key] :
|
||||||
(firstValOnly ? query[key][0] : query[key].slice().sort())
|
(firstValOnly ? query[key][0] : query[key])
|
||||||
return obj
|
return obj
|
||||||
}, {})))
|
}, {})
|
||||||
|
var encodedQueryPieces = []
|
||||||
|
Object.keys(reducedQuery).sort().forEach(function(key) {
|
||||||
|
if (!Array.isArray(reducedQuery[key])) {
|
||||||
|
encodedQueryPieces.push(key + '=' + encodeRfc3986Full(reducedQuery[key]))
|
||||||
|
} else {
|
||||||
|
reducedQuery[key].map(encodeRfc3986Full).sort()
|
||||||
|
.forEach(function(val) { encodedQueryPieces.push(key + '=' + val) })
|
||||||
|
}
|
||||||
|
})
|
||||||
|
queryStr = encodedQueryPieces.join('&')
|
||||||
}
|
}
|
||||||
if (pathStr !== '/') {
|
if (pathStr !== '/') {
|
||||||
if (normalizePath) pathStr = pathStr.replace(/\/{2,}/g, '/')
|
if (normalizePath) pathStr = pathStr.replace(/\/{2,}/g, '/')
|
||||||
@@ -233,8 +247,8 @@ RequestSigner.prototype.canonicalString = function() {
|
|||||||
if (normalizePath && piece === '..') {
|
if (normalizePath && piece === '..') {
|
||||||
path.pop()
|
path.pop()
|
||||||
} else if (!normalizePath || piece !== '.') {
|
} else if (!normalizePath || piece !== '.') {
|
||||||
if (decodePath) piece = decodeURIComponent(piece)
|
if (decodePath) piece = decodeURIComponent(piece).replace(/\+/g, ' ')
|
||||||
path.push(encodeRfc3986(encodeURIComponent(piece)))
|
path.push(encodeRfc3986Full(piece))
|
||||||
}
|
}
|
||||||
return path
|
return path
|
||||||
}, []).join('/')
|
}, []).join('/')
|
||||||
@@ -289,8 +303,16 @@ RequestSigner.prototype.defaultCredentials = function() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
RequestSigner.prototype.parsePath = function() {
|
RequestSigner.prototype.parsePath = function() {
|
||||||
var path = this.request.path || '/',
|
var path = this.request.path || '/'
|
||||||
queryIx = path.indexOf('?'),
|
|
||||||
|
// S3 doesn't always encode characters > 127 correctly and
|
||||||
|
// all services don't encode characters > 255 correctly
|
||||||
|
// So if there are non-reserved chars (and it's not already all % encoded), just encode them all
|
||||||
|
if (/[^0-9A-Za-z;,/?:@&=+$\-_.!~*'()#%]/.test(path)) {
|
||||||
|
path = encodeURI(decodeURI(path))
|
||||||
|
}
|
||||||
|
|
||||||
|
var queryIx = path.indexOf('?'),
|
||||||
query = null
|
query = null
|
||||||
|
|
||||||
if (queryIx >= 0) {
|
if (queryIx >= 0) {
|
||||||
@@ -298,15 +320,6 @@ RequestSigner.prototype.parsePath = function() {
|
|||||||
path = path.slice(0, queryIx)
|
path = path.slice(0, queryIx)
|
||||||
}
|
}
|
||||||
|
|
||||||
// S3 doesn't always encode characters > 127 correctly and
|
|
||||||
// all services don't encode characters > 255 correctly
|
|
||||||
// So if there are non-reserved chars (and it's not already all % encoded), just encode them all
|
|
||||||
if (/[^0-9A-Za-z!'()*\-._~%/]/.test(path)) {
|
|
||||||
path = path.split('/').map(function(piece) {
|
|
||||||
return encodeURIComponent(decodeURIComponent(piece))
|
|
||||||
}).join('/')
|
|
||||||
}
|
|
||||||
|
|
||||||
this.parsedPath = {
|
this.parsedPath = {
|
||||||
path: path,
|
path: path,
|
||||||
query: query,
|
query: query,
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user