Compare commits
49 commits
main
...
stable-3.x
Author | SHA1 | Date | |
---|---|---|---|
215f1fae25 | |||
d44ee67e57 | |||
effc654f05 | |||
997b03c2a2 | |||
45d8b9bcd3 | |||
78e7c8c967 | |||
25280b310c | |||
73b062d306 | |||
2ae73966ec | |||
5e031fe997 | |||
1c6e707f58 | |||
4a1a59f15d | |||
67680fc97f | |||
40f100db94 | |||
7d144c95b6 | |||
3b25b33583 | |||
c70e078b26 | |||
3abc31e2aa | |||
0161b04e1f | |||
d7b0fc463e | |||
3d411c3be1 | |||
9c49df9d87 | |||
06712f35b5 | |||
91f2d3b50f | |||
688c850c50 | |||
26214c9eb8 | |||
4928ac1d2c | |||
27e62da887 | |||
d25f912c06 | |||
19f7345762 | |||
a63e1a893b | |||
a755e32bc7 | |||
c380c469ef | |||
faecaa8b8a | |||
ae3cf033be | |||
9fa9c047d1 | |||
faa043cb99 | |||
7587932250 | |||
9406ffda5f | |||
10ee128136 | |||
|
91d8d0df63 | ||
71b5727b6c | |||
c6960061b7 | |||
55262f73c5 | |||
750a312b2f | |||
e0f0cb69d8 | |||
d01064cc17 | |||
c9df74c745 | |||
46a256d31f |
Before Width: | Height: | Size: 6.6 KiB After Width: | Height: | Size: 6.6 KiB |
Before Width: | Height: | Size: 6.4 KiB After Width: | Height: | Size: 9.4 KiB |
Before Width: | Height: | Size: 6.8 KiB After Width: | Height: | Size: 5.9 KiB |
Before Width: | Height: | Size: 8.6 KiB After Width: | Height: | Size: 8 KiB |
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 3.6 KiB |
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 4 KiB After Width: | Height: | Size: 9.8 KiB |
Before Width: | Height: | Size: 8.9 KiB After Width: | Height: | Size: 8.5 KiB |
Before Width: | Height: | Size: 9.8 KiB After Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 5.8 KiB After Width: | Height: | Size: 5.6 KiB |
Before Width: | Height: | Size: 6.4 KiB After Width: | Height: | Size: 6.3 KiB |
Before Width: | Height: | Size: 6.5 KiB After Width: | Height: | Size: 6.3 KiB |
Before Width: | Height: | Size: 7 KiB After Width: | Height: | Size: 7 KiB |
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 3.1 KiB |
Before Width: | Height: | Size: 8.2 KiB After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 6.7 KiB After Width: | Height: | Size: 9.8 KiB |
Before Width: | Height: | Size: 4.1 KiB After Width: | Height: | Size: 9.5 KiB |
Before Width: | Height: | Size: 5.8 KiB After Width: | Height: | Size: 5.9 KiB |
Before Width: | Height: | Size: 7.1 KiB After Width: | Height: | Size: 6.5 KiB |
1
.gitignore
vendored
|
@ -1 +1,2 @@
|
|||
commit.sh
|
||||
log
|
||||
|
|
2
LICENSE
|
@ -1,6 +1,6 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) 2020 DorianTech S.A.
|
||||
Copyright (c) 2018-2024 SVR.JS
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
|
77
config.json
|
@ -3,7 +3,7 @@
|
|||
"port": 80,
|
||||
"pubport": 80,
|
||||
"page404": "404.html",
|
||||
"timestamp": 1680954429282,
|
||||
"timestamp": 1709477722479,
|
||||
"blacklist": [],
|
||||
"nonStandardCodes": [],
|
||||
"enableCompression": true,
|
||||
|
@ -14,73 +14,50 @@
|
|||
"enableDirectoryListingWithDefaultHead": false,
|
||||
"serverAdministratorEmail": "[no contact information]",
|
||||
"stackHidden": false,
|
||||
"enableRemoteLogBrowsing": true,
|
||||
"enableRemoteLogBrowsing": false,
|
||||
"exposeServerVersion": true,
|
||||
"disableServerSideScriptExpose": false,
|
||||
"disableServerSideScriptExpose": true,
|
||||
"rewriteMap": [
|
||||
{
|
||||
"definingRegex": "/\\/invoke500\\/\\?/",
|
||||
"definingRegex": "/^\\/serverSideScript\\.js(?:$|[#?])/",
|
||||
"replacements": [
|
||||
{
|
||||
"regex": "/\\/invoke500\\/\\?/",
|
||||
"replacement": "/invoke500.svr?"
|
||||
"regex": "/^\\/serverSideScript\\.js($|[#?])/",
|
||||
"replacement": "/NONEXISTENT_PAGE$1"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"definingRegex": "/\\/invoke500\\/.+\\//",
|
||||
"definingRegex": "/^\\/testdir_rewritten(?:$|[\\/?#])/",
|
||||
"replacements": [
|
||||
{
|
||||
"regex": "/\\/\\?/",
|
||||
"replacement": "&"
|
||||
},
|
||||
{
|
||||
"regex": "/invoke500\\//",
|
||||
"replacement": "invoke500.svr?"
|
||||
},
|
||||
{
|
||||
"regex": "/\\/(?!invoke500.svr?)/",
|
||||
"replacement": ""
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"definingRegex": "/\\/invoke500\\/.+/",
|
||||
"replacements": [
|
||||
{
|
||||
"regex": "/\\?/",
|
||||
"replacement": "&"
|
||||
},
|
||||
{
|
||||
"regex": "/invoke500\\//",
|
||||
"replacement": "invoke500.svr?"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"definingRegex": "/\\/invoke500\\//",
|
||||
"replacements": [
|
||||
{
|
||||
"regex": "/\\/invoke500\\//",
|
||||
"replacement": "/invoke500.svr"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"definingRegex": "/\\/invoke500$/",
|
||||
"replacements": [
|
||||
{
|
||||
"regex": "/\\/invoke500/",
|
||||
"replacement": "/invoke500.svr"
|
||||
"regex": "/^\\/testdir_rewritten($|[\\/?#])/",
|
||||
"replacement": "/testdir$1"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"allowStatus": true,
|
||||
"dontCompress": ["/.*\\.ipxe$/","/.*\\.img$/","/.*\\.iso$/"],
|
||||
"dontCompress": [
|
||||
"/.*\\.ipxe$/",
|
||||
"/.*\\.(?:jpe?g|png|bmp|tiff|jfif|gif|webp)$/",
|
||||
"/.*\\.(?:[id]mg|iso|flp)$/",
|
||||
"/.*\\.(?:zip|rar|bz2|[gb7x]z|lzma|tar)$/",
|
||||
"/.*\\.(?:mp[34]|mov|wm[av]|avi|webm|og[gv]|mk[va])$/"
|
||||
],
|
||||
"enableIPSpoofing": false,
|
||||
"secure": false,
|
||||
"sni": {},
|
||||
"disableNonEncryptedServer": false,
|
||||
"disableToHTTPSRedirect": false
|
||||
"disableToHTTPSRedirect": false,
|
||||
"enableETag": true,
|
||||
"disableUnusedWorkerTermination": false,
|
||||
"rewriteDirtyURLs": true,
|
||||
"errorPages": [],
|
||||
"useWebRootServerSideScript": true,
|
||||
"exposeModsInErrorPages": true,
|
||||
"disableTrailingSlashRedirects": false,
|
||||
"environmentVariables": {},
|
||||
"allowDoubleSlashes": false,
|
||||
"optOutOfStatisticsServer": false
|
||||
}
|
||||
|
|
Before Width: | Height: | Size: 243 B |
|
@ -1,124 +0,0 @@
|
|||
//Base64.js for hexstrbase64 library for Node.js
|
||||
/*
|
||||
* Copyright (c) 2012 Miles Shang <mail@mshang.ca>
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining
|
||||
* a copy of this software and associated documentation files (the
|
||||
* "Software"), to deal in the Software without restriction, including
|
||||
* without limitation the rights to use, copy, modify, merge, publish,
|
||||
* distribute, sublicense, and/or sell copies of the Software, and to
|
||||
* permit persons to whom the Software is furnished to do so, subject to
|
||||
* the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Usage:
|
||||
* Set your settings:
|
||||
* base64.settings.char62 = "-";
|
||||
* base64.settings.char63 = "_";
|
||||
* etc.
|
||||
*
|
||||
* Then:
|
||||
* base64.encode(str) takes a string and returns the base64 encoding of it.
|
||||
* base64.decode(str) does the reverse.
|
||||
*/
|
||||
|
||||
/* TODO:
|
||||
* Add a "padding_mandatory" flag to check for bad padding in the decoder.
|
||||
* Add test cases that throw errors.
|
||||
*/
|
||||
|
||||
var base64 = new Object();
|
||||
|
||||
base64.settings = { // defaults
|
||||
"char62" : "+",
|
||||
"char63" : "/",
|
||||
"pad" : "=",
|
||||
"ascii" : false
|
||||
};
|
||||
|
||||
/*
|
||||
* Settings:
|
||||
* If "pad" is not null or undefined, then it will be used for encoding.
|
||||
*
|
||||
* If "ascii" is set to true, then the encoder
|
||||
* will assume that plaintext is in 8-bit chars (the standard).
|
||||
* In this case, for every 3 chars in plaintext, you get 4 chars of base64.
|
||||
* Any non-8-bit chars will cause an error.
|
||||
* Otherwise, assume that all plaintext can be in the full range
|
||||
* of Javascript chars, i.e. 16 bits. Get 8 chars of base64 for 3 chars
|
||||
* of plaintext. Any possible JS string can be encoded.
|
||||
*/
|
||||
|
||||
base64.encode = function (str) {
|
||||
this.char_set =
|
||||
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
|
||||
+ this.settings.char62 + this.settings.char63;
|
||||
|
||||
var output = ""; // final output
|
||||
var buf = ""; // binary buffer
|
||||
for (var i = 0; i < str.length; ++i) {
|
||||
var c_num = str.charCodeAt(i);
|
||||
if (this.settings.ascii)
|
||||
if (c_num >= 256)
|
||||
throw "Not an 8-bit char.";
|
||||
var c_bin = c_num.toString(2);
|
||||
while (c_bin.length < (this.settings.ascii ? 8 : 16))
|
||||
c_bin = "0" + c_bin;
|
||||
buf += c_bin;
|
||||
|
||||
while (buf.length >= 6) {
|
||||
var sextet = buf.slice(0, 6);
|
||||
buf = buf.slice(6);
|
||||
output += this.char_set.charAt(parseInt(sextet, 2));
|
||||
}
|
||||
}
|
||||
|
||||
if (buf) { // not empty
|
||||
while (buf.length < 6) buf += "0";
|
||||
output += this.char_set.charAt(parseInt(buf, 2));
|
||||
}
|
||||
|
||||
if (this.settings.pad)
|
||||
while (output.length % (this.settings.ascii ? 4 : 8) != 0)
|
||||
output += this.settings.pad;
|
||||
|
||||
return output;
|
||||
}
|
||||
|
||||
base64.decode = function (str) {
|
||||
this.char_set =
|
||||
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
|
||||
+ this.settings.char62 + this.settings.char63;
|
||||
|
||||
var output = ""; // final output
|
||||
var buf = ""; // binary buffer
|
||||
var bits = (this.settings.ascii ? 8 : 16);
|
||||
for (var i = 0; i < str.length; ++i) {
|
||||
if (str[i] == this.settings.pad) break;
|
||||
var c_num = this.char_set.indexOf(str.charAt(i));
|
||||
if (c_num == -1) throw "Not base64.";
|
||||
var c_bin = c_num.toString(2);
|
||||
while (c_bin.length < 6) c_bin = "0" + c_bin;
|
||||
buf += c_bin;
|
||||
|
||||
while (buf.length >= bits) {
|
||||
var octet = buf.slice(0, bits);
|
||||
buf = buf.slice(bits);
|
||||
output += String.fromCharCode(parseInt(octet, 2));
|
||||
}
|
||||
}
|
||||
return output;
|
||||
}
|
||||
module.exports = base64;
|
|
@ -1,123 +0,0 @@
|
|||
//Base64.js for hexstrbase64 library for browser
|
||||
/*
|
||||
* Copyright (c) 2012 Miles Shang <mail@mshang.ca>
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining
|
||||
* a copy of this software and associated documentation files (the
|
||||
* "Software"), to deal in the Software without restriction, including
|
||||
* without limitation the rights to use, copy, modify, merge, publish,
|
||||
* distribute, sublicense, and/or sell copies of the Software, and to
|
||||
* permit persons to whom the Software is furnished to do so, subject to
|
||||
* the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Usage:
|
||||
* Set your settings:
|
||||
* base64.settings.char62 = "-";
|
||||
* base64.settings.char63 = "_";
|
||||
* etc.
|
||||
*
|
||||
* Then:
|
||||
* base64.encode(str) takes a string and returns the base64 encoding of it.
|
||||
* base64.decode(str) does the reverse.
|
||||
*/
|
||||
|
||||
/* TODO:
|
||||
* Add a "padding_mandatory" flag to check for bad padding in the decoder.
|
||||
* Add test cases that throw errors.
|
||||
*/
|
||||
|
||||
var base64 = new Object();
|
||||
|
||||
base64.settings = { // defaults
|
||||
"char62" : "+",
|
||||
"char63" : "/",
|
||||
"pad" : "=",
|
||||
"ascii" : false
|
||||
};
|
||||
|
||||
/*
|
||||
* Settings:
|
||||
* If "pad" is not null or undefined, then it will be used for encoding.
|
||||
*
|
||||
* If "ascii" is set to true, then the encoder
|
||||
* will assume that plaintext is in 8-bit chars (the standard).
|
||||
* In this case, for every 3 chars in plaintext, you get 4 chars of base64.
|
||||
* Any non-8-bit chars will cause an error.
|
||||
* Otherwise, assume that all plaintext can be in the full range
|
||||
* of Javascript chars, i.e. 16 bits. Get 8 chars of base64 for 3 chars
|
||||
* of plaintext. Any possible JS string can be encoded.
|
||||
*/
|
||||
|
||||
base64.encode = function (str) {
|
||||
this.char_set =
|
||||
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
|
||||
+ this.settings.char62 + this.settings.char63;
|
||||
|
||||
var output = ""; // final output
|
||||
var buf = ""; // binary buffer
|
||||
for (var i = 0; i < str.length; ++i) {
|
||||
var c_num = str.charCodeAt(i);
|
||||
if (this.settings.ascii)
|
||||
if (c_num >= 256)
|
||||
throw "Not an 8-bit char.";
|
||||
var c_bin = c_num.toString(2);
|
||||
while (c_bin.length < (this.settings.ascii ? 8 : 16))
|
||||
c_bin = "0" + c_bin;
|
||||
buf += c_bin;
|
||||
|
||||
while (buf.length >= 6) {
|
||||
var sextet = buf.slice(0, 6);
|
||||
buf = buf.slice(6);
|
||||
output += this.char_set.charAt(parseInt(sextet, 2));
|
||||
}
|
||||
}
|
||||
|
||||
if (buf) { // not empty
|
||||
while (buf.length < 6) buf += "0";
|
||||
output += this.char_set.charAt(parseInt(buf, 2));
|
||||
}
|
||||
|
||||
if (this.settings.pad)
|
||||
while (output.length % (this.settings.ascii ? 4 : 8) != 0)
|
||||
output += this.settings.pad;
|
||||
|
||||
return output;
|
||||
}
|
||||
|
||||
base64.decode = function (str) {
|
||||
this.char_set =
|
||||
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
|
||||
+ this.settings.char62 + this.settings.char63;
|
||||
|
||||
var output = ""; // final output
|
||||
var buf = ""; // binary buffer
|
||||
var bits = (this.settings.ascii ? 8 : 16);
|
||||
for (var i = 0; i < str.length; ++i) {
|
||||
if (str[i] == this.settings.pad) break;
|
||||
var c_num = this.char_set.indexOf(str.charAt(i));
|
||||
if (c_num == -1) throw "Not base64.";
|
||||
var c_bin = c_num.toString(2);
|
||||
while (c_bin.length < 6) c_bin = "0" + c_bin;
|
||||
buf += c_bin;
|
||||
|
||||
while (buf.length >= bits) {
|
||||
var octet = buf.slice(0, bits);
|
||||
buf = buf.slice(bits);
|
||||
output += String.fromCharCode(parseInt(octet, 2));
|
||||
}
|
||||
}
|
||||
return output;
|
||||
}
|
|
@ -1,129 +0,0 @@
|
|||
//Requires base64
|
||||
var base64 = require('./base64.js');
|
||||
var HexStrBase64Buffer = {
|
||||
from: function(s, e) {
|
||||
var type = e;
|
||||
var value = '';
|
||||
if (e == 'base64') {
|
||||
value = base64.decode(s);
|
||||
} else if (e == 'hex') {
|
||||
try {
|
||||
var escaped = "";
|
||||
var hex = "";
|
||||
if(s.length%4 > 0) {
|
||||
for(i=0;i<(4-(s.length%4));i++) {
|
||||
hex += "0";
|
||||
}
|
||||
}
|
||||
hex += s;
|
||||
for(var i = 0;i<hex.length;i += 4) {
|
||||
escaped += new String("%u" + hex.charAt(i) + hex.charAt(i + 1) + hex.charAt(i + 2) + hex.charAt(i + 3)).toString().split("undefined").join("");
|
||||
}
|
||||
value = unescape(escaped).split(unescape("%00")).join("");
|
||||
} catch (ex) {
|
||||
var modex = ex.toString().split('Error: ');
|
||||
modex[0] = '';
|
||||
if (typeof modex == 'object') {
|
||||
throw new Error(
|
||||
'Invaild hex input: ' + s + '. Reason: ' + modex.join('')
|
||||
);
|
||||
} else {
|
||||
throw new Error('Invaild hex input: ' + s + '. Reason: ' + ex);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
value = Buffer.from(s, 'utf8').toString(e);
|
||||
}
|
||||
function toString(en) {
|
||||
//function toStringE(en,type) {
|
||||
if (en == 'base64') {
|
||||
return base64.encode(value);
|
||||
} else if (en == 'hex') {
|
||||
var result = "";
|
||||
for(var i=0;i<value.length;i++) {
|
||||
var unicode = escape(value.charAt(i));
|
||||
var hex = "";
|
||||
if(value.charAt(i) == "\n") {
|
||||
hex = "000a";
|
||||
} else if(value.charAt(i) == "\r") {
|
||||
hex = "000d";
|
||||
} else if(value.charAt(i) == " ") {
|
||||
hex = "0020";
|
||||
} else if(value.charAt(i) == "\0") {
|
||||
hex = "";
|
||||
} else if(unicode == value.charAt(i)) {
|
||||
var oldhex = value.charCodeAt(i).toString(16);
|
||||
var newhex = "";
|
||||
if(oldhex.length < 4) {
|
||||
for(var j=0;j<4-(oldhex.length%4);j++) {
|
||||
newhex += "0";
|
||||
}
|
||||
newhex += oldhex;
|
||||
} else {
|
||||
newhex = oldhex;
|
||||
}
|
||||
hex = newhex;
|
||||
} else {
|
||||
hex = unicode.split("%u").join("");
|
||||
}
|
||||
if(hex.length == 4 || hex === "") {
|
||||
result += hex;
|
||||
} else if(hex.length > 4) {
|
||||
result += hex.substring(hex.length-5,hex.length-1);
|
||||
} else if(hex.length < 4) {
|
||||
for(var j=0;j<=4-(hex.length%4);j++) {
|
||||
result += "0";
|
||||
}
|
||||
result += hex;
|
||||
}
|
||||
}
|
||||
return result.split("undefined").join("").split("%").join("");
|
||||
} else {
|
||||
//return Buffer.from(value, type).toString(en);
|
||||
return Buffer.from(value,"utf8").toString(en);
|
||||
}
|
||||
}
|
||||
//}
|
||||
//function toString(en) {
|
||||
//return toStringE(en,type);
|
||||
//}
|
||||
return { type: type, value: value, toString: toString };
|
||||
}
|
||||
};
|
||||
var hexstrbase64 = {
|
||||
strtobase64: function(s) {
|
||||
return HexStrBase64Buffer.from(s, 'utf8').toString('base64');
|
||||
},
|
||||
base64tostr: function(b) {
|
||||
return HexStrBase64Buffer.from(b, 'base64').toString('utf8');
|
||||
},
|
||||
strtohex: function(s) {
|
||||
return HexStrBase64Buffer.from(s, 'utf8').toString('hex');
|
||||
},
|
||||
hextostr: function(h) {
|
||||
return HexStrBase64Buffer.from(h, 'hex').toString('utf8');
|
||||
},
|
||||
hextobase64: function(h) {
|
||||
return hexstrbase64.strtobase64(hexstrbase64.hextostr(h));
|
||||
},
|
||||
base64tohex: function(b) {
|
||||
return hexstrbase64.strtohex(hexstrbase64.base64tostr(b));
|
||||
},
|
||||
cipher: function() {
|
||||
this.strtobase64 = hexstrbase64.strtobase64;
|
||||
this.base64tostr = hexstrbase64.base64tostr;
|
||||
this.strtohex = hexstrbase64.strtohex;
|
||||
this.hextostr = hexstrbase64.hextostr;
|
||||
this.hextobase64 = hextobase64.hextobase64;
|
||||
this.base64tohex = hextobase64.base64tohex;
|
||||
},
|
||||
native: {
|
||||
btoa: function(b) {
|
||||
return hexstrbase64.strtobase64(b);
|
||||
},
|
||||
atob: function(a) {
|
||||
return hexstrbase64.base64tostr(a);
|
||||
}
|
||||
}
|
||||
};
|
||||
module.exports = hexstrbase64;
|
|
@ -1,126 +0,0 @@
|
|||
//Requires base64_browser.js
|
||||
var HexStrBase64Buffer = {
|
||||
from: function(s, e) {
|
||||
var type = e;
|
||||
var value = '';
|
||||
if (e == 'base64') {
|
||||
value = base64.decode(s);
|
||||
} else if (e == 'hex') {
|
||||
try {
|
||||
var escaped = "";
|
||||
var hex = "";
|
||||
if(s.length%4 > 0) {
|
||||
for(i=0;i<(4-(s.length%4));i++) {
|
||||
hex += "0";
|
||||
}
|
||||
}
|
||||
hex += s;
|
||||
for(var i = 0;i<hex.length;i += 4) {
|
||||
escaped += new String("%u" + hex.charAt(i) + hex.charAt(i + 1) + hex.charAt(i + 2) + hex.charAt(i + 3)).toString().split("undefined").join("");
|
||||
}
|
||||
value = unescape(escaped).split(unescape("%00")).join("");
|
||||
} catch (ex) {
|
||||
var modex = ex.toString().split('Error: ');
|
||||
modex[0] = '';
|
||||
if (typeof modex == 'object') {
|
||||
throw new Error(
|
||||
'Invaild hex input: ' + s + '. Reason: ' + modex.join('')
|
||||
);
|
||||
} else {
|
||||
throw new Error('Invaild hex input: ' + s + '. Reason: ' + ex);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
value = new TextDecoder(e).decode(new TextEncoder('utf8').encode(s));
|
||||
}
|
||||
//function toStringE(en,type) {
|
||||
function toString(en) {
|
||||
if (en == 'base64') {
|
||||
return base64.encode(value);
|
||||
} else if (en == 'hex') {
|
||||
var result = "";
|
||||
for(var i=0;i<value.length;i++) {
|
||||
var unicode = escape(value.charAt(i));
|
||||
var hex = "";
|
||||
if(value.charAt(i) == "\n") {
|
||||
hex = "000a";
|
||||
} else if(value.charAt(i) == "\r") {
|
||||
hex = "000d";
|
||||
} else if(value.charAt(i) == " ") {
|
||||
hex = "0020";
|
||||
} else if(value.charAt(i) == "\0") {
|
||||
hex = "";
|
||||
} else if(unicode == value.charAt(i)) {
|
||||
var oldhex = value.charCodeAt(i).toString(16);
|
||||
var newhex = "";
|
||||
if(oldhex.length < 4) {
|
||||
for(var j=0;j<4-(oldhex.length%4);j++) {
|
||||
newhex += "0";
|
||||
}
|
||||
newhex += oldhex;
|
||||
} else {
|
||||
newhex = oldhex;
|
||||
}
|
||||
hex = newhex;
|
||||
} else {
|
||||
hex = unicode.split("%u").join("");
|
||||
}
|
||||
if(hex.length == 4 || hex === "") {
|
||||
result += hex;
|
||||
} else if(hex.length > 4) {
|
||||
result += hex.substring(hex.length-5,hex.length-1);
|
||||
} else if(hex.length < 4) {
|
||||
for(var j=0;j<=4-(hex.length%4);j++) {
|
||||
result += "0";
|
||||
}
|
||||
result += hex;
|
||||
}
|
||||
}
|
||||
return result.split("undefined").join("").split("%").join("");
|
||||
} else {
|
||||
//return new TextDecoder(en).decode(new TextEncoder(type).encode(value));
|
||||
return new TextDecoder(en).decode(new TextEncoder("utf8").encode(value));
|
||||
}
|
||||
}
|
||||
//function toString(en) {
|
||||
//return toStringE(en,type);
|
||||
//}
|
||||
return { type: type, value: value, toString: toString };
|
||||
}
|
||||
};
|
||||
var hexstrbase64 = {
|
||||
strtobase64: function(s) {
|
||||
return HexStrBase64Buffer.from(s, 'utf8').toString('base64');
|
||||
},
|
||||
base64tostr: function(b) {
|
||||
return HexStrBase64Buffer.from(b, 'base64').toString('utf8');
|
||||
},
|
||||
strtohex: function(s) {
|
||||
return HexStrBase64Buffer.from(s, 'utf8').toString('hex');
|
||||
},
|
||||
hextostr: function(h) {
|
||||
return HexStrBase64Buffer.from(h, 'hex').toString('utf8');
|
||||
},
|
||||
hextobase64: function(h) {
|
||||
return hexstrbase64.strtobase64(hexstrbase64.hextostr(h));
|
||||
},
|
||||
base64tohex: function(b) {
|
||||
return hexstrbase64.strtohex(hexstrbase64.base64tostr(b));
|
||||
},
|
||||
cipher: function() {
|
||||
this.strtobase64 = hexstrbase64.strtobase64;
|
||||
this.base64tostr = hexstrbase64.base64tostr;
|
||||
this.strtohex = hexstrbase64.strtohex;
|
||||
this.hextostr = hexstrbase64.hextostr;
|
||||
this.hextobase64 = hextobase64.hextobase64;
|
||||
this.base64tohex = hextobase64.base64tohex;
|
||||
},
|
||||
native: {
|
||||
btoa: function(b) {
|
||||
return hexstrbase64.strtobase64(b);
|
||||
},
|
||||
atob: function(a) {
|
||||
return hexstrbase64.base64tostr(a);
|
||||
}
|
||||
}
|
||||
};
|
|
@ -1,11 +0,0 @@
|
|||
let hexstrbase64 = require("./hexstrbase64/main.js");
|
||||
function decodeBase(b) {
|
||||
return hexstrbase64.native.atob(b);
|
||||
}
|
||||
function encodeStr(s) {
|
||||
return hexstrbase64.native.btoa(s);
|
||||
}
|
||||
var m = Object.create(hexstrbase64);
|
||||
m.decodeBase = decodeBase;
|
||||
m.encodeBase = encodeStr;
|
||||
module.exports = m;
|
Before Width: | Height: | Size: 252 B |
|
@ -1,8 +0,0 @@
|
|||
.code {
|
||||
border-width: 5px;
|
||||
border-color: #BEBEBE;
|
||||
border-style: solid;
|
||||
color:black;
|
||||
background-color: #7F7F7F;
|
||||
font-family: Hack,Consolas,Monaco,monospace;
|
||||
}
|
|
@ -1,31 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>HexStrBase64 Readme</title>
|
||||
<link rel="stylesheet" href="readme.css">
|
||||
</head>
|
||||
<body>
|
||||
<h1>hexstrbase64</h1>
|
||||
<h2>How to install?</h2>
|
||||
<h3>Node.js</h3>
|
||||
<ol>
|
||||
<li>Download library from <a href="https://repl.it/@DorianNiemiec/Hex-String-Base64-NodeJS-Library.zip" download>here</a>.</li>
|
||||
<li>Modify index.js</li>
|
||||
<li>Write header in program (replace <b>./hexstrbase64</b> with your path to hexstrbase64 library):</li>
|
||||
<div class="code">
|
||||
var hexstrbase64 = require("<b>./hexstrbase64</b>/index.js");<br/>
|
||||
</div>
|
||||
<li>Now hexstrbase64 library added to program!</li>
|
||||
</ol>
|
||||
<h3>Browser Javascript</h3>
|
||||
<ol>
|
||||
<li>Download library from <a href="https://repl.it/@DorianNiemiec/Hex-String-Base64-NodeJS-Library.zip" download>here</a>.</li>
|
||||
<li>Write this code in <head> element (replace <b>hexstrbase64/</b> with your path to hexstrbase64 library):</li>
|
||||
<div class="code">
|
||||
<script src="<b>hexstrbase64/</b>hexstrbase64/base64_browser.js"></script><br/>
|
||||
<script src="<b>hexstrbase64/</b>hexstrbase64/main_browser.js"></script>
|
||||
</div>
|
||||
<li>Now hexstrbase64 library added to HTML!</li>
|
||||
</ol>
|
||||
</body>
|
||||
</html>
|
|
@ -1,13 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>hexstrbase64 base64 test</title>
|
||||
<script src="../hexstrbase64/base64_browser.js"></script>
|
||||
<script src="../hexstrbase64/main_browser.js"></script>
|
||||
<script src="base64.js"></script>
|
||||
<script>
|
||||
testStart();
|
||||
</script>
|
||||
</head>
|
||||
</html>
|
|
@ -1,56 +0,0 @@
|
|||
function nameObj(n, v) {
|
||||
return {name:n, value:v};
|
||||
}
|
||||
|
||||
function testStart() {
|
||||
document.write('<meta charset="UTF-8">');
|
||||
document.write('<title>hexstrbase64 base64 test</title>');
|
||||
console.log("TESTING STARTED");
|
||||
for (var i = 0; i < 3; i++) {
|
||||
document.write('<h1>' + enccases[i].name + '</h1>');
|
||||
console.log("SWITCH " + enccases[i].name);
|
||||
for (var j = 0; j < 2; j++) {
|
||||
document.write('<h2>' + enccases[i].value[j].name + '</h2>');
|
||||
console.log("CASE " + enccases[i].value[j].name);
|
||||
console.log("MUST BE: " + enccases[i].value[j].value);
|
||||
console.log("IS : " + hexstrbase64.strtobase64(enccases[i].value[j].name));
|
||||
if (hexstrbase64.strtobase64(enccases[i].value[j].name) == enccases[i].value[j].value) {
|
||||
document.write('<p><img src="../ok.png"></img>Equals</p>');
|
||||
console.log("EQUALS");
|
||||
} else {
|
||||
document.write('<p><img src="../fail.png"></img>Not Equals</p>');
|
||||
console.log("NOT EQUALS");
|
||||
}
|
||||
console.log("CASE " + enccases[i].value[j].name + " ENDED");
|
||||
}
|
||||
console.log("SWITCH " + enccases[i].name + " ENDED");
|
||||
}
|
||||
console.log("TESTING ENDED");
|
||||
}
|
||||
|
||||
var enccases = [
|
||||
nameObj('Ascii', [
|
||||
nameObj('Hello world!', 'AEgAZQBsAGwAbwAgAHcAbwByAGwAZAAh'),
|
||||
nameObj('Lorem ipsum', 'AEwAbwByAGUAbQAgAGkAcABzAHUAbQ==')
|
||||
]),
|
||||
nameObj('Ascii More Than 64 Bytes', [
|
||||
nameObj(
|
||||
'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum fermentum ac nisl a sollicitudin. Cras interdum dui turpis, non scelerisque.',
|
||||
'AEwAbwByAGUAbQAgAGkAcABzAHUAbQAgAGQAbwBsAG8AcgAgAHMAaQB0ACAAYQBtAGUAdAAsACAAYwBvAG4AcwBlAGMAdABlAHQAdQByACAAYQBkAGkAcABpAHMAYwBpAG4AZwAgAGUAbABpAHQALgAgAFYAZQBzAHQAaQBiAHUAbAB1AG0AIABmAGUAcgBtAGUAbgB0AHUAbQAgAGEAYwAgAG4AaQBzAGwAIABhACAAcwBvAGwAbABpAGMAaQB0AHUAZABpAG4ALgAgAEMAcgBhAHMAIABpAG4AdABlAHIAZAB1AG0AIABkAHUAaQAgAHQAdQByAHAAaQBzACwAIABuAG8AbgAgAHMAYwBlAGwAZQByAGkAcwBxAHUAZQAu'
|
||||
),
|
||||
nameObj(
|
||||
'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus dapibus volutpat ligula at pulvinar. Etiam consequat mi fringilla facilisis eleifend.',
|
||||
'AEwAbwByAGUAbQAgAGkAcABzAHUAbQAgAGQAbwBsAG8AcgAgAHMAaQB0ACAAYQBtAGUAdAAsACAAYwBvAG4AcwBlAGMAdABlAHQAdQByACAAYQBkAGkAcABpAHMAYwBpAG4AZwAgAGUAbABpAHQALgAgAFAAaABhAHMAZQBsAGwAdQBzACAAZABhAHAAaQBiAHUAcwAgAHYAbwBsAHUAdABwAGEAdAAgAGwAaQBnAHUAbABhACAAYQB0ACAAcAB1AGwAdgBpAG4AYQByAC4AIABFAHQAaQBhAG0AIABjAG8AbgBzAGUAcQB1AGEAdAAgAG0AaQAgAGYAcgBpAG4AZwBpAGwAbABhACAAZgBhAGMAaQBsAGkAcwBpAHMAIABlAGwAZQBpAGYAZQBuAGQALg=='
|
||||
)
|
||||
]),
|
||||
nameObj('Unicode UTF8', [
|
||||
nameObj(
|
||||
'DorianTech Hex String Base64转换器',
|
||||
'AEQAbwByAGkAYQBuAFQAZQBjAGgAIABIAGUAeAAgAFMAdAByAGkAbgBnACAAQgBhAHMAZQA2ADSPbGNiVmg====='
|
||||
),
|
||||
nameObj(
|
||||
'DorianTech Hex String Base64转换器,用于由DorianTech提供的Node.js',
|
||||
'AEQAbwByAGkAYQBuAFQAZQBjAGgAIABIAGUAeAAgAFMAdAByAGkAbgBnACAAQgBhAHMAZQA2ADSPbGNiVmj/DHUoTo51MQBEAG8AcgBpAGEAbgBUAGUAYwBoY9BPm3aEAE4AbwBkAGUALgBqAHM====='
|
||||
)
|
||||
])
|
||||
];
|
|
@ -1,13 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>hexstrbase64 hex test</title>
|
||||
<script src="../hexstrbase64/base64_browser.js"></script>
|
||||
<script src="../hexstrbase64/main_browser.js"></script>
|
||||
<script src="hex.js"></script>
|
||||
<script>
|
||||
testStart();
|
||||
</script>
|
||||
</head>
|
||||
</html>
|
|
@ -1,56 +0,0 @@
|
|||
function nameObj(n, v) {
|
||||
return {name:n, value:v};
|
||||
}
|
||||
|
||||
function testStart() {
|
||||
document.write('<meta charset="UTF-8">');
|
||||
document.write('<title>hexstrbase64 hex test</title>');
|
||||
console.log("TESTING STARTED");
|
||||
for (var i = 0; i < 3; i++) {
|
||||
document.write('<h1>' + enccases[i].name + '</h1>');
|
||||
console.log("SWITCH " + enccases[i].name);
|
||||
for (var j = 0; j < 2; j++) {
|
||||
document.write('<h2>' + enccases[i].value[j].name + '</h2>');
|
||||
console.log("CASE " + enccases[i].value[j].name);
|
||||
console.log("MUST BE: " + enccases[i].value[j].value);
|
||||
console.log("IS : " + hexstrbase64.strtohex(enccases[i].value[j].name));
|
||||
if (hexstrbase64.strtohex(enccases[i].value[j].name) == enccases[i].value[j].value) {
|
||||
document.write('<p><img src="../ok.png"></img>Equals</p>');
|
||||
console.log("EQUALS");
|
||||
} else {
|
||||
document.write('<p><img src="../fail.png"></img>Not Equals</p>');
|
||||
console.log("NOT EQUALS");
|
||||
}
|
||||
console.log("CASE " + enccases[i].value[j].name + " ENDED");
|
||||
}
|
||||
console.log("SWITCH " + enccases[i].name + " ENDED");
|
||||
}
|
||||
console.log("TESTING ENDED");
|
||||
}
|
||||
|
||||
var enccases = [
|
||||
nameObj('Ascii', [
|
||||
nameObj('Hello world!', '00480065006c006c006f00200077006f0072006c00640021'),
|
||||
nameObj('Lorem ipsum', '004c006f00720065006d00200069007000730075006d')
|
||||
]),
|
||||
nameObj('Ascii More Than 64 Bytes', [
|
||||
nameObj(
|
||||
'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum fermentum ac nisl a sollicitudin. Cras interdum dui turpis, non scelerisque.',
|
||||
'004c006f00720065006d00200069007000730075006d00200064006f006c006f0072002000730069007400200061006d00650074002C00200063006f006e00730065006300740065007400750072002000610064006900700069007300630069006e006700200065006c00690074002e00200056006500730074006900620075006c0075006d0020006600650072006d0065006e00740075006d0020006100630020006e00690073006c0020006100200073006f006c006c0069006300690074007500640069006e002e0020004300720061007300200069006e00740065007200640075006d00200064007500690020007400750072007000690073002C0020006e006f006e0020007300630065006c0065007200690073007100750065002e'
|
||||
),
|
||||
nameObj(
|
||||
'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus dapibus volutpat ligula at pulvinar. Etiam consequat mi fringilla facilisis eleifend.',
|
||||
'004c006f00720065006d00200069007000730075006d00200064006f006c006f0072002000730069007400200061006d00650074002C00200063006f006e00730065006300740065007400750072002000610064006900700069007300630069006e006700200065006c00690074002e002000500068006100730065006c006c007500730020006400610070006900620075007300200076006f006c007500740070006100740020006c006900670075006c0061002000610074002000700075006c00760069006e00610072002e00200045007400690061006d00200063006f006e0073006500710075006100740020006d00690020006600720069006e00670069006c006c006100200066006100630069006c006900730069007300200065006c0065006900660065006e0064002e'
|
||||
)
|
||||
]),
|
||||
nameObj('Unicode UTF8', [
|
||||
nameObj(
|
||||
'DorianTech Hex String Base64转换器',
|
||||
'0044006f007200690061006e0054006500630068002000480065007800200053007400720069006e006700200042006100730065003600348F6C63625668'
|
||||
),
|
||||
nameObj(
|
||||
'DorianTech Hex String Base64转换器,用于由DorianTech提供的Node.js',
|
||||
'0044006f007200690061006e0054006500630068002000480065007800200053007400720069006e006700200042006100730065003600348F6C63625668FF0C75284E8E75310044006f007200690061006e005400650063006863D04F9B7684004e006f00640065002e006a0073'
|
||||
)
|
||||
])
|
||||
];
|
|
@ -1,16 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>hexstrbase64 test</title>
|
||||
<style>
|
||||
iframe {
|
||||
width: 200px;
|
||||
height: 200px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<iframe src="base64.html"></iframe>
|
||||
<iframe src="hex.html"></iframe>
|
||||
</body>
|
||||
</html>
|
|
@ -1 +0,0 @@
|
|||
0
|
254
index.html
|
@ -1,129 +1,171 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>SVR.JS 3.6.4</title>
|
||||
<title>SVR.JS 3.15.7</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<meta charset="UTF-8" />
|
||||
<style>
|
||||
body {
|
||||
font-family: FreeSans, Helvetica, Tahoma, Arial, sans-serif;
|
||||
html {
|
||||
background-color: #dfffdf;
|
||||
color: #000000;
|
||||
font-family: FreeSans, Helvetica, Tahoma, Verdana, Arial, sans-serif;
|
||||
margin: 0.75em;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
body {
|
||||
background-color: #ffffff;
|
||||
padding: 0.5em 0.5em 0.1em;
|
||||
margin: 0.5em auto;
|
||||
width: 90%;
|
||||
max-width: 800px;
|
||||
-webkit-box-shadow: 0 5px 10px 0 rgba(0, 0, 0, 0.15);
|
||||
-moz-box-shadow: 0 5px 10px 0 rgba(0, 0, 0, 0.15);
|
||||
box-shadow: 0 5px 10px 0 rgba(0, 0, 0, 0.15)
|
||||
}
|
||||
|
||||
h1 {
|
||||
text-align: center;
|
||||
font-size: 2.25em;
|
||||
margin: 0.3em 0 0.5em
|
||||
}
|
||||
|
||||
pre,
|
||||
code {
|
||||
background-color: #dfffdf;
|
||||
-webkit-box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.1);
|
||||
-moz-box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.1);
|
||||
box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.1);
|
||||
display: block;
|
||||
padding: 0.2em;
|
||||
font-family: "DejaVu Sans Mono", "Bitstream Vera Sans Mono", Hack, Menlo, Consolas, Monaco, monospace;
|
||||
font-size: 0.85em;
|
||||
margin: auto;
|
||||
width: 95%;
|
||||
}
|
||||
|
||||
@media screen and (prefers-color-scheme: dark) {
|
||||
html {
|
||||
background-color: #002000;
|
||||
color: #ffffff
|
||||
}
|
||||
|
||||
body {
|
||||
background-color: #000f00;
|
||||
-webkit-box-shadow: 0 5px 10px 0 rgba(127, 127, 127, 0.15);
|
||||
-moz-box-shadow: 0 5px 10px 0 rgba(127, 127, 127, 0.15);
|
||||
box-shadow: 0 5px 10px 0 rgba(127, 127, 127, 0.15)
|
||||
}
|
||||
|
||||
pre,
|
||||
code {
|
||||
background-color: #002000;
|
||||
-webkit-box-shadow: 0 2px 4px 0 rgba(127, 127, 127, 0.1);
|
||||
-moz-box-shadow: 0 2px 4px 0 rgba(127, 127, 127, 0.1);
|
||||
box-shadow: 0 2px 4px 0 rgba(127, 127, 127, 0.1)
|
||||
}
|
||||
|
||||
a {
|
||||
color: #ffffff
|
||||
}
|
||||
|
||||
a:hover {
|
||||
color: #00ff00
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Welcome to SVR.JS 3.6.4</h1>
|
||||
<h1>Welcome to SVR.JS 3.15.7</h1>
|
||||
<br />
|
||||
<img src="/logo.png" style="width: 256px;" />
|
||||
<img src="/logo.png" style="width: 224px; max-width: 100%;" />
|
||||
<br />
|
||||
<p>If you see this page, that means, that the server is properly working. You can further configure the server and replace <i>index.html</i> and <i>tests.html</i> pages with custom ones.</p>
|
||||
<p>If you see this page that means that the server is working properly. You can further configure the server and replace <i>index.html</i> and <i>tests.html</i> pages with custom ones.</p>
|
||||
<p>Default <i>config.json</i> looks like this:</p>
|
||||
<div style="background-color: #e0e0e0; padding: 5px; text-align: left; display: inline-block;">
|
||||
<code>
|
||||
{<br/>
|
||||
"users": [],<br/>
|
||||
"port": 80,<br/>
|
||||
"pubport": 80,<br/>
|
||||
"page404": "404.html",<br/>
|
||||
"timestamp": 1680954429282,<br/>
|
||||
"blacklist": [],<br/>
|
||||
"nonStandardCodes": [],<br/>
|
||||
"enableCompression": true,<br/>
|
||||
"customHeaders": {},<br/>
|
||||
"enableHTTP2": false,<br/>
|
||||
"enableLogging": true,<br/>
|
||||
"enableDirectoryListing": true,<br/>
|
||||
"enableDirectoryListingWithDefaultHead": false,<br/>
|
||||
"serverAdministratorEmail": "[no contact information]",<br/>
|
||||
"stackHidden": false,<br/>
|
||||
"enableRemoteLogBrowsing": true,<br/>
|
||||
"exposeServerVersion": true,<br/>
|
||||
"disableServerSideScriptExpose": false,<br/>
|
||||
"rewriteMap": [<br/>
|
||||
{<br/>
|
||||
"definingRegex": "/\\/invoke500\\/\\?/",<br/>
|
||||
"replacements": dorians[<br/>
|
||||
{<br/>
|
||||
"regex": "/\\/invoke500\\/\\?/",<br/>
|
||||
"replacement": "/invoke500.svr?"<br/>
|
||||
}<br/>
|
||||
]<br/>
|
||||
},<br/>
|
||||
{<br/>
|
||||
"definingRegex": "/\\/invoke500\\/.+\\//",<br/>
|
||||
"replacements": [<br/>
|
||||
{<br/>
|
||||
"regex": "/\\/\\?/",<br/>
|
||||
"replacement": "&"<br/>
|
||||
},<br/>
|
||||
{<br/>
|
||||
"regex": "/invoke500\\//",<br/>
|
||||
"replacement": "invoke500.svr?"<br/>
|
||||
},<br/>
|
||||
{<br/>
|
||||
"regex": "/\\/(?!invoke500.svr?)/",<br/>
|
||||
"replacement": ""<br/>
|
||||
}<br/>
|
||||
]<br/>
|
||||
},<br/>3.4.13
|
||||
{<br/>
|
||||
"definingRegex": "/\\/invoke500\\/.+/",<br/>
|
||||
"replacements": [<br/>
|
||||
{<br/>
|
||||
"regex": "/\\?/",<br/>
|
||||
"replacement": "&"<br/>
|
||||
},<br/>
|
||||
{<br/>
|
||||
"regex": "/invoke500\\//",<br/>
|
||||
"replacement": "invoke500.svr?"<br/>
|
||||
}<br/>
|
||||
]<br/>
|
||||
},<br/>
|
||||
{<br/>
|
||||
"definingRegex": "/\\/invoke500\\//",<br/>
|
||||
"replacements": [<br/>
|
||||
{<br/>
|
||||
"regex": "/\\/invoke500\\//",<br/>
|
||||
"replacement": "/invoke500.svr"<br/>
|
||||
}<br/>
|
||||
]<br/>
|
||||
},<br/>
|
||||
{<br/>
|
||||
"definingRegex": "/\\/invoke500$/",<br/>
|
||||
"replacements": [<br/>
|
||||
{<br/>
|
||||
"regex": "/\\/invoke500/",<br/>
|
||||
"replacement": "/invoke500.svr"<br/>
|
||||
}<br/>
|
||||
]<br/>
|
||||
}<br/>
|
||||
],<br/>
|
||||
"allowStatus": true,<br/>
|
||||
"dontCompress": ["/.*\\.ipxe$/","/.*\\.img$/","/.*\\.iso$/"],<br/>
|
||||
"enableIPSpoofing": false,<br/>
|
||||
"secure": false,<br/>
|
||||
"sni": {},<br/>
|
||||
"disableNonEncryptedServer": false,<br/>
|
||||
"disableToHTTPSRedirect": false<br/>
|
||||
<code style="padding: 5px; text-align: left; display: block; display: inline-block;">
|
||||
<pre style="margin: 0.2em; white-space: pre-wrap; overflow-wrap: break-word; word-wrap: break-word; word-break: break-all; word-break: break-word; -webkit-box-shadow: none; -moz-box-shadow: none; box-shadow: none;">{
|
||||
"users": [],
|
||||
"port": 80,
|
||||
"pubport": 80,
|
||||
"page404": "404.html",
|
||||
"timestamp": 1709477722479,
|
||||
"blacklist": [],
|
||||
"nonStandardCodes": [],
|
||||
"enableCompression": true,
|
||||
"customHeaders": {},
|
||||
"enableHTTP2": false,
|
||||
"enableLogging": true,
|
||||
"enableDirectoryListing": true,
|
||||
"enableDirectoryListingWithDefaultHead": false,
|
||||
"serverAdministratorEmail": "[no contact information]",
|
||||
"stackHidden": false,
|
||||
"enableRemoteLogBrowsing": false,
|
||||
"exposeServerVersion": true,
|
||||
"disableServerSideScriptExpose": true,
|
||||
"rewriteMap": [
|
||||
{
|
||||
"definingRegex": "/^\\/serverSideScript\\.js(?:$|[#?])/",
|
||||
"replacements": [
|
||||
{
|
||||
"regex": "/^\\/serverSideScript\\.js($|[#?])/",
|
||||
"replacement": "/NONEXISTENT_PAGE$1"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"definingRegex": "/^\\/testdir_rewritten(?:$|[\\/?#])/",
|
||||
"replacements": [
|
||||
{
|
||||
"regex": "/^\\/testdir_rewritten($|[\\/?#])/",
|
||||
"replacement": "/testdir$1"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"allowStatus": true,
|
||||
"dontCompress": [
|
||||
"/.*\\.ipxe$/",
|
||||
"/.*\\.(?:jpe?g|png|bmp|tiff|jfif|gif|webp)$/",
|
||||
"/.*\\.(?:[id]mg|iso|flp)$/",
|
||||
"/.*\\.(?:zip|rar|bz2|[gb7x]z|lzma|tar)$/",
|
||||
"/.*\\.(?:mp[34]|mov|wm[av]|avi|webm|og[gv]|mk[va])$/"
|
||||
],
|
||||
"enableIPSpoofing": false,
|
||||
"secure": false,
|
||||
"sni": {},
|
||||
"disableNonEncryptedServer": false,
|
||||
"disableToHTTPSRedirect": false,
|
||||
"enableETag": true,
|
||||
"disableUnusedWorkerTermination": false,
|
||||
"rewriteDirtyURLs": true,
|
||||
"errorPages": [],
|
||||
"useWebRootServerSideScript": true,
|
||||
"exposeModsInErrorPages": true,
|
||||
"disableTrailingSlashRedirects": false,
|
||||
"environmentVariables": {},
|
||||
"allowDoubleSlashes": false,
|
||||
"optOutOfStatisticsServer": false
|
||||
}</pre>
|
||||
</code>
|
||||
</div>
|
||||
<p>Changes:</p>
|
||||
<ul>
|
||||
<li>Improved reliability while loading server-side JavaScript.</li>
|
||||
<ul style="display: inline-block; margin: 0;">
|
||||
<li>Fix bug in getting public IP address without crypto support.</li>
|
||||
<li>Fix bug in partial content serving functionality.</li>
|
||||
<li>Fix bug in the factory reset function.</li>
|
||||
<li>Fix bug in the IP address match function.</li>
|
||||
<li>Fix bug in the URL parser with href attribute of a parsed URL missing a port number.</li>
|
||||
<li>Fix bug with config.json read errors being undefined.</li>
|
||||
<li>Fix bugs in the block list.</li>
|
||||
<li>Main process crashes no longer display as worker crashes.</li>
|
||||
<li>Server crashes now results in exit code of 1 if no exit code is not specified.</li>
|
||||
<li>Updated dependencies.</li>
|
||||
</ul>
|
||||
<p>Bugs:</p>
|
||||
<ul>
|
||||
<li>Some very old mods requiring hexstrbase64 will fail to load.</li>
|
||||
<li>On first load server-side JavaScript will fail to load when SVR.JS is running on Bun.</li>
|
||||
</ul>
|
||||
<br/>
|
||||
<p>
|
||||
<a href="/tests.html">Tests</a><br />
|
||||
<a href="/licenses">Licenses</a><br/>
|
||||
<a href="/licenses/">Licenses</a><br />
|
||||
<a href="/svrjsstatus.svr">SVR.JS status page</a><br />
|
||||
<a href="https://svrjs.org/docs">More Information</a>
|
||||
<br/>
|
||||
<br/>
|
||||
<a href="https://svrjs.org/docs">SVR.JS documentation</a>
|
||||
</p>
|
||||
<img src="/powered.png" />
|
||||
</body>
|
||||
</html>
|
||||
|
|
Before Width: | Height: | Size: 243 B |
|
@ -1,124 +0,0 @@
|
|||
//Base64.js for hexstrbase64 library for Node.js
|
||||
/*
|
||||
* Copyright (c) 2012 Miles Shang <mail@mshang.ca>
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining
|
||||
* a copy of this software and associated documentation files (the
|
||||
* "Software"), to deal in the Software without restriction, including
|
||||
* without limitation the rights to use, copy, modify, merge, publish,
|
||||
* distribute, sublicense, and/or sell copies of the Software, and to
|
||||
* permit persons to whom the Software is furnished to do so, subject to
|
||||
* the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Usage:
|
||||
* Set your settings:
|
||||
* base64.settings.char62 = "-";
|
||||
* base64.settings.char63 = "_";
|
||||
* etc.
|
||||
*
|
||||
* Then:
|
||||
* base64.encode(str) takes a string and returns the base64 encoding of it.
|
||||
* base64.decode(str) does the reverse.
|
||||
*/
|
||||
|
||||
/* TODO:
|
||||
* Add a "padding_mandatory" flag to check for bad padding in the decoder.
|
||||
* Add test cases that throw errors.
|
||||
*/
|
||||
|
||||
var base64 = new Object();
|
||||
|
||||
base64.settings = { // defaults
|
||||
"char62" : "+",
|
||||
"char63" : "/",
|
||||
"pad" : "=",
|
||||
"ascii" : false
|
||||
};
|
||||
|
||||
/*
|
||||
* Settings:
|
||||
* If "pad" is not null or undefined, then it will be used for encoding.
|
||||
*
|
||||
* If "ascii" is set to true, then the encoder
|
||||
* will assume that plaintext is in 8-bit chars (the standard).
|
||||
* In this case, for every 3 chars in plaintext, you get 4 chars of base64.
|
||||
* Any non-8-bit chars will cause an error.
|
||||
* Otherwise, assume that all plaintext can be in the full range
|
||||
* of Javascript chars, i.e. 16 bits. Get 8 chars of base64 for 3 chars
|
||||
* of plaintext. Any possible JS string can be encoded.
|
||||
*/
|
||||
|
||||
base64.encode = function (str) {
|
||||
this.char_set =
|
||||
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
|
||||
+ this.settings.char62 + this.settings.char63;
|
||||
|
||||
var output = ""; // final output
|
||||
var buf = ""; // binary buffer
|
||||
for (var i = 0; i < str.length; ++i) {
|
||||
var c_num = str.charCodeAt(i);
|
||||
if (this.settings.ascii)
|
||||
if (c_num >= 256)
|
||||
throw "Not an 8-bit char.";
|
||||
var c_bin = c_num.toString(2);
|
||||
while (c_bin.length < (this.settings.ascii ? 8 : 16))
|
||||
c_bin = "0" + c_bin;
|
||||
buf += c_bin;
|
||||
|
||||
while (buf.length >= 6) {
|
||||
var sextet = buf.slice(0, 6);
|
||||
buf = buf.slice(6);
|
||||
output += this.char_set.charAt(parseInt(sextet, 2));
|
||||
}
|
||||
}
|
||||
|
||||
if (buf) { // not empty
|
||||
while (buf.length < 6) buf += "0";
|
||||
output += this.char_set.charAt(parseInt(buf, 2));
|
||||
}
|
||||
|
||||
if (this.settings.pad)
|
||||
while (output.length % (this.settings.ascii ? 4 : 8) != 0)
|
||||
output += this.settings.pad;
|
||||
|
||||
return output;
|
||||
}
|
||||
|
||||
base64.decode = function (str) {
|
||||
this.char_set =
|
||||
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
|
||||
+ this.settings.char62 + this.settings.char63;
|
||||
|
||||
var output = ""; // final output
|
||||
var buf = ""; // binary buffer
|
||||
var bits = (this.settings.ascii ? 8 : 16);
|
||||
for (var i = 0; i < str.length; ++i) {
|
||||
if (str[i] == this.settings.pad) break;
|
||||
var c_num = this.char_set.indexOf(str.charAt(i));
|
||||
if (c_num == -1) throw "Not base64.";
|
||||
var c_bin = c_num.toString(2);
|
||||
while (c_bin.length < 6) c_bin = "0" + c_bin;
|
||||
buf += c_bin;
|
||||
|
||||
while (buf.length >= bits) {
|
||||
var octet = buf.slice(0, bits);
|
||||
buf = buf.slice(bits);
|
||||
output += String.fromCharCode(parseInt(octet, 2));
|
||||
}
|
||||
}
|
||||
return output;
|
||||
}
|
||||
module.exports = base64;
|
|
@ -1,123 +0,0 @@
|
|||
//Base64.js for hexstrbase64 library for browser
|
||||
/*
|
||||
* Copyright (c) 2012 Miles Shang <mail@mshang.ca>
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining
|
||||
* a copy of this software and associated documentation files (the
|
||||
* "Software"), to deal in the Software without restriction, including
|
||||
* without limitation the rights to use, copy, modify, merge, publish,
|
||||
* distribute, sublicense, and/or sell copies of the Software, and to
|
||||
* permit persons to whom the Software is furnished to do so, subject to
|
||||
* the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Usage:
|
||||
* Set your settings:
|
||||
* base64.settings.char62 = "-";
|
||||
* base64.settings.char63 = "_";
|
||||
* etc.
|
||||
*
|
||||
* Then:
|
||||
* base64.encode(str) takes a string and returns the base64 encoding of it.
|
||||
* base64.decode(str) does the reverse.
|
||||
*/
|
||||
|
||||
/* TODO:
|
||||
* Add a "padding_mandatory" flag to check for bad padding in the decoder.
|
||||
* Add test cases that throw errors.
|
||||
*/
|
||||
|
||||
var base64 = new Object();
|
||||
|
||||
base64.settings = { // defaults
|
||||
"char62" : "+",
|
||||
"char63" : "/",
|
||||
"pad" : "=",
|
||||
"ascii" : false
|
||||
};
|
||||
|
||||
/*
|
||||
* Settings:
|
||||
* If "pad" is not null or undefined, then it will be used for encoding.
|
||||
*
|
||||
* If "ascii" is set to true, then the encoder
|
||||
* will assume that plaintext is in 8-bit chars (the standard).
|
||||
* In this case, for every 3 chars in plaintext, you get 4 chars of base64.
|
||||
* Any non-8-bit chars will cause an error.
|
||||
* Otherwise, assume that all plaintext can be in the full range
|
||||
* of Javascript chars, i.e. 16 bits. Get 8 chars of base64 for 3 chars
|
||||
* of plaintext. Any possible JS string can be encoded.
|
||||
*/
|
||||
|
||||
base64.encode = function (str) {
|
||||
this.char_set =
|
||||
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
|
||||
+ this.settings.char62 + this.settings.char63;
|
||||
|
||||
var output = ""; // final output
|
||||
var buf = ""; // binary buffer
|
||||
for (var i = 0; i < str.length; ++i) {
|
||||
var c_num = str.charCodeAt(i);
|
||||
if (this.settings.ascii)
|
||||
if (c_num >= 256)
|
||||
throw "Not an 8-bit char.";
|
||||
var c_bin = c_num.toString(2);
|
||||
while (c_bin.length < (this.settings.ascii ? 8 : 16))
|
||||
c_bin = "0" + c_bin;
|
||||
buf += c_bin;
|
||||
|
||||
while (buf.length >= 6) {
|
||||
var sextet = buf.slice(0, 6);
|
||||
buf = buf.slice(6);
|
||||
output += this.char_set.charAt(parseInt(sextet, 2));
|
||||
}
|
||||
}
|
||||
|
||||
if (buf) { // not empty
|
||||
while (buf.length < 6) buf += "0";
|
||||
output += this.char_set.charAt(parseInt(buf, 2));
|
||||
}
|
||||
|
||||
if (this.settings.pad)
|
||||
while (output.length % (this.settings.ascii ? 4 : 8) != 0)
|
||||
output += this.settings.pad;
|
||||
|
||||
return output;
|
||||
}
|
||||
|
||||
base64.decode = function (str) {
|
||||
this.char_set =
|
||||
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
|
||||
+ this.settings.char62 + this.settings.char63;
|
||||
|
||||
var output = ""; // final output
|
||||
var buf = ""; // binary buffer
|
||||
var bits = (this.settings.ascii ? 8 : 16);
|
||||
for (var i = 0; i < str.length; ++i) {
|
||||
if (str[i] == this.settings.pad) break;
|
||||
var c_num = this.char_set.indexOf(str.charAt(i));
|
||||
if (c_num == -1) throw "Not base64.";
|
||||
var c_bin = c_num.toString(2);
|
||||
while (c_bin.length < 6) c_bin = "0" + c_bin;
|
||||
buf += c_bin;
|
||||
|
||||
while (buf.length >= bits) {
|
||||
var octet = buf.slice(0, bits);
|
||||
buf = buf.slice(bits);
|
||||
output += String.fromCharCode(parseInt(octet, 2));
|
||||
}
|
||||
}
|
||||
return output;
|
||||
}
|
|
@ -1,129 +0,0 @@
|
|||
//Requires base64
|
||||
var base64 = require('./base64.js');
|
||||
var HexStrBase64Buffer = {
|
||||
from: function(s, e) {
|
||||
var type = e;
|
||||
var value = '';
|
||||
if (e == 'base64') {
|
||||
value = base64.decode(s);
|
||||
} else if (e == 'hex') {
|
||||
try {
|
||||
var escaped = "";
|
||||
var hex = "";
|
||||
if(s.length%4 > 0) {
|
||||
for(i=0;i<(4-(s.length%4));i++) {
|
||||
hex += "0";
|
||||
}
|
||||
}
|
||||
hex += s;
|
||||
for(var i = 0;i<hex.length;i += 4) {
|
||||
escaped += new String("%u" + hex.charAt(i) + hex.charAt(i + 1) + hex.charAt(i + 2) + hex.charAt(i + 3)).toString().split("undefined").join("");
|
||||
}
|
||||
value = unescape(escaped).split(unescape("%00")).join("");
|
||||
} catch (ex) {
|
||||
var modex = ex.toString().split('Error: ');
|
||||
modex[0] = '';
|
||||
if (typeof modex == 'object') {
|
||||
throw new Error(
|
||||
'Invaild hex input: ' + s + '. Reason: ' + modex.join('')
|
||||
);
|
||||
} else {
|
||||
throw new Error('Invaild hex input: ' + s + '. Reason: ' + ex);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
value = Buffer.from(s, 'utf8').toString(e);
|
||||
}
|
||||
function toString(en) {
|
||||
//function toStringE(en,type) {
|
||||
if (en == 'base64') {
|
||||
return base64.encode(value);
|
||||
} else if (en == 'hex') {
|
||||
var result = "";
|
||||
for(var i=0;i<value.length;i++) {
|
||||
var unicode = escape(value.charAt(i));
|
||||
var hex = "";
|
||||
if(value.charAt(i) == "\n") {
|
||||
hex = "000a";
|
||||
} else if(value.charAt(i) == "\r") {
|
||||
hex = "000d";
|
||||
} else if(value.charAt(i) == " ") {
|
||||
hex = "0020";
|
||||
} else if(value.charAt(i) == "\0") {
|
||||
hex = "";
|
||||
} else if(unicode == value.charAt(i)) {
|
||||
var oldhex = value.charCodeAt(i).toString(16);
|
||||
var newhex = "";
|
||||
if(oldhex.length < 4) {
|
||||
for(var j=0;j<4-(oldhex.length%4);j++) {
|
||||
newhex += "0";
|
||||
}
|
||||
newhex += oldhex;
|
||||
} else {
|
||||
newhex = oldhex;
|
||||
}
|
||||
hex = newhex;
|
||||
} else {
|
||||
hex = unicode.split("%u").join("");
|
||||
}
|
||||
if(hex.length == 4 || hex === "") {
|
||||
result += hex;
|
||||
} else if(hex.length > 4) {
|
||||
result += hex.substring(hex.length-5,hex.length-1);
|
||||
} else if(hex.length < 4) {
|
||||
for(var j=0;j<=4-(hex.length%4);j++) {
|
||||
result += "0";
|
||||
}
|
||||
result += hex;
|
||||
}
|
||||
}
|
||||
return result.split("undefined").join("").split("%").join("");
|
||||
} else {
|
||||
//return Buffer.from(value, type).toString(en);
|
||||
return Buffer.from(value,"utf8").toString(en);
|
||||
}
|
||||
}
|
||||
//}
|
||||
//function toString(en) {
|
||||
//return toStringE(en,type);
|
||||
//}
|
||||
return { type: type, value: value, toString: toString };
|
||||
}
|
||||
};
|
||||
var hexstrbase64 = {
|
||||
strtobase64: function(s) {
|
||||
return HexStrBase64Buffer.from(s, 'utf8').toString('base64');
|
||||
},
|
||||
base64tostr: function(b) {
|
||||
return HexStrBase64Buffer.from(b, 'base64').toString('utf8');
|
||||
},
|
||||
strtohex: function(s) {
|
||||
return HexStrBase64Buffer.from(s, 'utf8').toString('hex');
|
||||
},
|
||||
hextostr: function(h) {
|
||||
return HexStrBase64Buffer.from(h, 'hex').toString('utf8');
|
||||
},
|
||||
hextobase64: function(h) {
|
||||
return hexstrbase64.strtobase64(hexstrbase64.hextostr(h));
|
||||
},
|
||||
base64tohex: function(b) {
|
||||
return hexstrbase64.strtohex(hexstrbase64.base64tostr(b));
|
||||
},
|
||||
cipher: function() {
|
||||
this.strtobase64 = hexstrbase64.strtobase64;
|
||||
this.base64tostr = hexstrbase64.base64tostr;
|
||||
this.strtohex = hexstrbase64.strtohex;
|
||||
this.hextostr = hexstrbase64.hextostr;
|
||||
this.hextobase64 = hextobase64.hextobase64;
|
||||
this.base64tohex = hextobase64.base64tohex;
|
||||
},
|
||||
native: {
|
||||
btoa: function(b) {
|
||||
return hexstrbase64.strtobase64(b);
|
||||
},
|
||||
atob: function(a) {
|
||||
return hexstrbase64.base64tostr(a);
|
||||
}
|
||||
}
|
||||
};
|
||||
module.exports = hexstrbase64;
|
|
@ -1,126 +0,0 @@
|
|||
//Requires base64_browser.js
|
||||
var HexStrBase64Buffer = {
|
||||
from: function(s, e) {
|
||||
var type = e;
|
||||
var value = '';
|
||||
if (e == 'base64') {
|
||||
value = base64.decode(s);
|
||||
} else if (e == 'hex') {
|
||||
try {
|
||||
var escaped = "";
|
||||
var hex = "";
|
||||
if(s.length%4 > 0) {
|
||||
for(i=0;i<(4-(s.length%4));i++) {
|
||||
hex += "0";
|
||||
}
|
||||
}
|
||||
hex += s;
|
||||
for(var i = 0;i<hex.length;i += 4) {
|
||||
escaped += new String("%u" + hex.charAt(i) + hex.charAt(i + 1) + hex.charAt(i + 2) + hex.charAt(i + 3)).toString().split("undefined").join("");
|
||||
}
|
||||
value = unescape(escaped).split(unescape("%00")).join("");
|
||||
} catch (ex) {
|
||||
var modex = ex.toString().split('Error: ');
|
||||
modex[0] = '';
|
||||
if (typeof modex == 'object') {
|
||||
throw new Error(
|
||||
'Invaild hex input: ' + s + '. Reason: ' + modex.join('')
|
||||
);
|
||||
} else {
|
||||
throw new Error('Invaild hex input: ' + s + '. Reason: ' + ex);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
value = new TextDecoder(e).decode(new TextEncoder('utf8').encode(s));
|
||||
}
|
||||
//function toStringE(en,type) {
|
||||
function toString(en) {
|
||||
if (en == 'base64') {
|
||||
return base64.encode(value);
|
||||
} else if (en == 'hex') {
|
||||
var result = "";
|
||||
for(var i=0;i<value.length;i++) {
|
||||
var unicode = escape(value.charAt(i));
|
||||
var hex = "";
|
||||
if(value.charAt(i) == "\n") {
|
||||
hex = "000a";
|
||||
} else if(value.charAt(i) == "\r") {
|
||||
hex = "000d";
|
||||
} else if(value.charAt(i) == " ") {
|
||||
hex = "0020";
|
||||
} else if(value.charAt(i) == "\0") {
|
||||
hex = "";
|
||||
} else if(unicode == value.charAt(i)) {
|
||||
var oldhex = value.charCodeAt(i).toString(16);
|
||||
var newhex = "";
|
||||
if(oldhex.length < 4) {
|
||||
for(var j=0;j<4-(oldhex.length%4);j++) {
|
||||
newhex += "0";
|
||||
}
|
||||
newhex += oldhex;
|
||||
} else {
|
||||
newhex = oldhex;
|
||||
}
|
||||
hex = newhex;
|
||||
} else {
|
||||
hex = unicode.split("%u").join("");
|
||||
}
|
||||
if(hex.length == 4 || hex === "") {
|
||||
result += hex;
|
||||
} else if(hex.length > 4) {
|
||||
result += hex.substring(hex.length-5,hex.length-1);
|
||||
} else if(hex.length < 4) {
|
||||
for(var j=0;j<=4-(hex.length%4);j++) {
|
||||
result += "0";
|
||||
}
|
||||
result += hex;
|
||||
}
|
||||
}
|
||||
return result.split("undefined").join("").split("%").join("");
|
||||
} else {
|
||||
//return new TextDecoder(en).decode(new TextEncoder(type).encode(value));
|
||||
return new TextDecoder(en).decode(new TextEncoder("utf8").encode(value));
|
||||
}
|
||||
}
|
||||
//function toString(en) {
|
||||
//return toStringE(en,type);
|
||||
//}
|
||||
return { type: type, value: value, toString: toString };
|
||||
}
|
||||
};
|
||||
var hexstrbase64 = {
|
||||
strtobase64: function(s) {
|
||||
return HexStrBase64Buffer.from(s, 'utf8').toString('base64');
|
||||
},
|
||||
base64tostr: function(b) {
|
||||
return HexStrBase64Buffer.from(b, 'base64').toString('utf8');
|
||||
},
|
||||
strtohex: function(s) {
|
||||
return HexStrBase64Buffer.from(s, 'utf8').toString('hex');
|
||||
},
|
||||
hextostr: function(h) {
|
||||
return HexStrBase64Buffer.from(h, 'hex').toString('utf8');
|
||||
},
|
||||
hextobase64: function(h) {
|
||||
return hexstrbase64.strtobase64(hexstrbase64.hextostr(h));
|
||||
},
|
||||
base64tohex: function(b) {
|
||||
return hexstrbase64.strtohex(hexstrbase64.base64tostr(b));
|
||||
},
|
||||
cipher: function() {
|
||||
this.strtobase64 = hexstrbase64.strtobase64;
|
||||
this.base64tostr = hexstrbase64.base64tostr;
|
||||
this.strtohex = hexstrbase64.strtohex;
|
||||
this.hextostr = hexstrbase64.hextostr;
|
||||
this.hextobase64 = hextobase64.hextobase64;
|
||||
this.base64tohex = hextobase64.base64tohex;
|
||||
},
|
||||
native: {
|
||||
btoa: function(b) {
|
||||
return hexstrbase64.strtobase64(b);
|
||||
},
|
||||
atob: function(a) {
|
||||
return hexstrbase64.base64tostr(a);
|
||||
}
|
||||
}
|
||||
};
|
|
@ -1,11 +0,0 @@
|
|||
let hexstrbase64 = require("./hexstrbase64/main.js");
|
||||
function decodeBase(b) {
|
||||
return hexstrbase64.native.atob(b);
|
||||
}
|
||||
function encodeStr(s) {
|
||||
return hexstrbase64.native.btoa(s);
|
||||
}
|
||||
var m = Object.create(hexstrbase64);
|
||||
m.decodeBase = decodeBase;
|
||||
m.encodeBase = encodeStr;
|
||||
module.exports = m;
|
Before Width: | Height: | Size: 252 B |
|
@ -1,8 +0,0 @@
|
|||
.code {
|
||||
border-width: 5px;
|
||||
border-color: #BEBEBE;
|
||||
border-style: solid;
|
||||
color:black;
|
||||
background-color: #7F7F7F;
|
||||
font-family: Hack,Consolas,Monaco,monospace;
|
||||
}
|
|
@ -1,31 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>HexStrBase64 Readme</title>
|
||||
<link rel="stylesheet" href="readme.css">
|
||||
</head>
|
||||
<body>
|
||||
<h1>hexstrbase64</h1>
|
||||
<h2>How to install?</h2>
|
||||
<h3>Node.js</h3>
|
||||
<ol>
|
||||
<li>Download library from <a href="https://repl.it/@DorianNiemiec/Hex-String-Base64-NodeJS-Library.zip" download>here</a>.</li>
|
||||
<li>Modify index.js</li>
|
||||
<li>Write header in program (replace <b>./hexstrbase64</b> with your path to hexstrbase64 library):</li>
|
||||
<div class="code">
|
||||
var hexstrbase64 = require("<b>./hexstrbase64</b>/index.js");<br/>
|
||||
</div>
|
||||
<li>Now hexstrbase64 library added to program!</li>
|
||||
</ol>
|
||||
<h3>Browser Javascript</h3>
|
||||
<ol>
|
||||
<li>Download library from <a href="https://repl.it/@DorianNiemiec/Hex-String-Base64-NodeJS-Library.zip" download>here</a>.</li>
|
||||
<li>Write this code in <head> element (replace <b>hexstrbase64/</b> with your path to hexstrbase64 library):</li>
|
||||
<div class="code">
|
||||
<script src="<b>hexstrbase64/</b>hexstrbase64/base64_browser.js"></script><br/>
|
||||
<script src="<b>hexstrbase64/</b>hexstrbase64/main_browser.js"></script>
|
||||
</div>
|
||||
<li>Now hexstrbase64 library added to HTML!</li>
|
||||
</ol>
|
||||
</body>
|
||||
</html>
|
|
@ -1,13 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>hexstrbase64 base64 test</title>
|
||||
<script src="../hexstrbase64/base64_browser.js"></script>
|
||||
<script src="../hexstrbase64/main_browser.js"></script>
|
||||
<script src="base64.js"></script>
|
||||
<script>
|
||||
testStart();
|
||||
</script>
|
||||
</head>
|
||||
</html>
|
|
@ -1,56 +0,0 @@
|
|||
function nameObj(n, v) {
|
||||
return {name:n, value:v};
|
||||
}
|
||||
|
||||
function testStart() {
|
||||
document.write('<meta charset="UTF-8">');
|
||||
document.write('<title>hexstrbase64 base64 test</title>');
|
||||
console.log("TESTING STARTED");
|
||||
for (var i = 0; i < 3; i++) {
|
||||
document.write('<h1>' + enccases[i].name + '</h1>');
|
||||
console.log("SWITCH " + enccases[i].name);
|
||||
for (var j = 0; j < 2; j++) {
|
||||
document.write('<h2>' + enccases[i].value[j].name + '</h2>');
|
||||
console.log("CASE " + enccases[i].value[j].name);
|
||||
console.log("MUST BE: " + enccases[i].value[j].value);
|
||||
console.log("IS : " + hexstrbase64.strtobase64(enccases[i].value[j].name));
|
||||
if (hexstrbase64.strtobase64(enccases[i].value[j].name) == enccases[i].value[j].value) {
|
||||
document.write('<p><img src="../ok.png"></img>Equals</p>');
|
||||
console.log("EQUALS");
|
||||
} else {
|
||||
document.write('<p><img src="../fail.png"></img>Not Equals</p>');
|
||||
console.log("NOT EQUALS");
|
||||
}
|
||||
console.log("CASE " + enccases[i].value[j].name + " ENDED");
|
||||
}
|
||||
console.log("SWITCH " + enccases[i].name + " ENDED");
|
||||
}
|
||||
console.log("TESTING ENDED");
|
||||
}
|
||||
|
||||
var enccases = [
|
||||
nameObj('Ascii', [
|
||||
nameObj('Hello world!', 'AEgAZQBsAGwAbwAgAHcAbwByAGwAZAAh'),
|
||||
nameObj('Lorem ipsum', 'AEwAbwByAGUAbQAgAGkAcABzAHUAbQ==')
|
||||
]),
|
||||
nameObj('Ascii More Than 64 Bytes', [
|
||||
nameObj(
|
||||
'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum fermentum ac nisl a sollicitudin. Cras interdum dui turpis, non scelerisque.',
|
||||
'AEwAbwByAGUAbQAgAGkAcABzAHUAbQAgAGQAbwBsAG8AcgAgAHMAaQB0ACAAYQBtAGUAdAAsACAAYwBvAG4AcwBlAGMAdABlAHQAdQByACAAYQBkAGkAcABpAHMAYwBpAG4AZwAgAGUAbABpAHQALgAgAFYAZQBzAHQAaQBiAHUAbAB1AG0AIABmAGUAcgBtAGUAbgB0AHUAbQAgAGEAYwAgAG4AaQBzAGwAIABhACAAcwBvAGwAbABpAGMAaQB0AHUAZABpAG4ALgAgAEMAcgBhAHMAIABpAG4AdABlAHIAZAB1AG0AIABkAHUAaQAgAHQAdQByAHAAaQBzACwAIABuAG8AbgAgAHMAYwBlAGwAZQByAGkAcwBxAHUAZQAu'
|
||||
),
|
||||
nameObj(
|
||||
'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus dapibus volutpat ligula at pulvinar. Etiam consequat mi fringilla facilisis eleifend.',
|
||||
'AEwAbwByAGUAbQAgAGkAcABzAHUAbQAgAGQAbwBsAG8AcgAgAHMAaQB0ACAAYQBtAGUAdAAsACAAYwBvAG4AcwBlAGMAdABlAHQAdQByACAAYQBkAGkAcABpAHMAYwBpAG4AZwAgAGUAbABpAHQALgAgAFAAaABhAHMAZQBsAGwAdQBzACAAZABhAHAAaQBiAHUAcwAgAHYAbwBsAHUAdABwAGEAdAAgAGwAaQBnAHUAbABhACAAYQB0ACAAcAB1AGwAdgBpAG4AYQByAC4AIABFAHQAaQBhAG0AIABjAG8AbgBzAGUAcQB1AGEAdAAgAG0AaQAgAGYAcgBpAG4AZwBpAGwAbABhACAAZgBhAGMAaQBsAGkAcwBpAHMAIABlAGwAZQBpAGYAZQBuAGQALg=='
|
||||
)
|
||||
]),
|
||||
nameObj('Unicode UTF8', [
|
||||
nameObj(
|
||||
'DorianTech Hex String Base64转换器',
|
||||
'AEQAbwByAGkAYQBuAFQAZQBjAGgAIABIAGUAeAAgAFMAdAByAGkAbgBnACAAQgBhAHMAZQA2ADSPbGNiVmg====='
|
||||
),
|
||||
nameObj(
|
||||
'DorianTech Hex String Base64转换器,用于由DorianTech提供的Node.js',
|
||||
'AEQAbwByAGkAYQBuAFQAZQBjAGgAIABIAGUAeAAgAFMAdAByAGkAbgBnACAAQgBhAHMAZQA2ADSPbGNiVmj/DHUoTo51MQBEAG8AcgBpAGEAbgBUAGUAYwBoY9BPm3aEAE4AbwBkAGUALgBqAHM====='
|
||||
)
|
||||
])
|
||||
];
|
|
@ -1,13 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>hexstrbase64 hex test</title>
|
||||
<script src="../hexstrbase64/base64_browser.js"></script>
|
||||
<script src="../hexstrbase64/main_browser.js"></script>
|
||||
<script src="hex.js"></script>
|
||||
<script>
|
||||
testStart();
|
||||
</script>
|
||||
</head>
|
||||
</html>
|
|
@ -1,56 +0,0 @@
|
|||
function nameObj(n, v) {
|
||||
return {name:n, value:v};
|
||||
}
|
||||
|
||||
function testStart() {
|
||||
document.write('<meta charset="UTF-8">');
|
||||
document.write('<title>hexstrbase64 hex test</title>');
|
||||
console.log("TESTING STARTED");
|
||||
for (var i = 0; i < 3; i++) {
|
||||
document.write('<h1>' + enccases[i].name + '</h1>');
|
||||
console.log("SWITCH " + enccases[i].name);
|
||||
for (var j = 0; j < 2; j++) {
|
||||
document.write('<h2>' + enccases[i].value[j].name + '</h2>');
|
||||
console.log("CASE " + enccases[i].value[j].name);
|
||||
console.log("MUST BE: " + enccases[i].value[j].value);
|
||||
console.log("IS : " + hexstrbase64.strtohex(enccases[i].value[j].name));
|
||||
if (hexstrbase64.strtohex(enccases[i].value[j].name) == enccases[i].value[j].value) {
|
||||
document.write('<p><img src="../ok.png"></img>Equals</p>');
|
||||
console.log("EQUALS");
|
||||
} else {
|
||||
document.write('<p><img src="../fail.png"></img>Not Equals</p>');
|
||||
console.log("NOT EQUALS");
|
||||
}
|
||||
console.log("CASE " + enccases[i].value[j].name + " ENDED");
|
||||
}
|
||||
console.log("SWITCH " + enccases[i].name + " ENDED");
|
||||
}
|
||||
console.log("TESTING ENDED");
|
||||
}
|
||||
|
||||
var enccases = [
|
||||
nameObj('Ascii', [
|
||||
nameObj('Hello world!', '00480065006c006c006f00200077006f0072006c00640021'),
|
||||
nameObj('Lorem ipsum', '004c006f00720065006d00200069007000730075006d')
|
||||
]),
|
||||
nameObj('Ascii More Than 64 Bytes', [
|
||||
nameObj(
|
||||
'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum fermentum ac nisl a sollicitudin. Cras interdum dui turpis, non scelerisque.',
|
||||
'004c006f00720065006d00200069007000730075006d00200064006f006c006f0072002000730069007400200061006d00650074002C00200063006f006e00730065006300740065007400750072002000610064006900700069007300630069006e006700200065006c00690074002e00200056006500730074006900620075006c0075006d0020006600650072006d0065006e00740075006d0020006100630020006e00690073006c0020006100200073006f006c006c0069006300690074007500640069006e002e0020004300720061007300200069006e00740065007200640075006d00200064007500690020007400750072007000690073002C0020006e006f006e0020007300630065006c0065007200690073007100750065002e'
|
||||
),
|
||||
nameObj(
|
||||
'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus dapibus volutpat ligula at pulvinar. Etiam consequat mi fringilla facilisis eleifend.',
|
||||
'004c006f00720065006d00200069007000730075006d00200064006f006c006f0072002000730069007400200061006d00650074002C00200063006f006e00730065006300740065007400750072002000610064006900700069007300630069006e006700200065006c00690074002e002000500068006100730065006c006c007500730020006400610070006900620075007300200076006f006c007500740070006100740020006c006900670075006c0061002000610074002000700075006c00760069006e00610072002e00200045007400690061006d00200063006f006e0073006500710075006100740020006d00690020006600720069006e00670069006c006c006100200066006100630069006c006900730069007300200065006c0065006900660065006e0064002e'
|
||||
)
|
||||
]),
|
||||
nameObj('Unicode UTF8', [
|
||||
nameObj(
|
||||
'DorianTech Hex String Base64转换器',
|
||||
'0044006f007200690061006e0054006500630068002000480065007800200053007400720069006e006700200042006100730065003600348F6C63625668'
|
||||
),
|
||||
nameObj(
|
||||
'DorianTech Hex String Base64转换器,用于由DorianTech提供的Node.js',
|
||||
'0044006f007200690061006e0054006500630068002000480065007800200053007400720069006e006700200042006100730065003600348F6C63625668FF0C75284E8E75310044006f007200690061006e005400650063006863D04F9B7684004e006f00640065002e006a0073'
|
||||
)
|
||||
])
|
||||
];
|
|
@ -1,16 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>hexstrbase64 test</title>
|
||||
<style>
|
||||
iframe {
|
||||
width: 200px;
|
||||
height: 200px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<iframe src="base64.html"></iframe>
|
||||
<iframe src="hex.html"></iframe>
|
||||
</body>
|
||||
</html>
|
21
licenses/define-data-property.txt
Normal file
|
@ -0,0 +1,21 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) 2023 Jordan Harband
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
21
licenses/es-define-property.txt
Normal file
|
@ -0,0 +1,21 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) 2024 Jordan Harband
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
21
licenses/es-errors.txt
Normal file
|
@ -0,0 +1,21 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) 2024 Jordan Harband
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
21
licenses/gopd.txt
Normal file
|
@ -0,0 +1,21 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) 2022 Jordan Harband
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
|
@ -1,6 +1,6 @@
|
|||
The ISC License
|
||||
|
||||
Copyright (c) Isaac Z. Schlueter, Ben Noordhuis, and Contributors
|
||||
Copyright (c) 2011-2022 Isaac Z. Schlueter, Ben Noordhuis, and Contributors
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted, provided that the above
|
||||
|
|
21
licenses/has-property-descriptors.txt
Normal file
|
@ -0,0 +1,21 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) 2022 Inspect JS
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
21
licenses/has-proto.txt
Normal file
|
@ -0,0 +1,21 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) 2022 Inspect JS
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
|
@ -1,22 +0,0 @@
|
|||
Copyright (c) 2013 Thiago de Arruda
|
||||
|
||||
Permission is hereby granted, free of charge, to any person
|
||||
obtaining a copy of this software and associated documentation
|
||||
files (the "Software"), to deal in the Software without
|
||||
restriction, including without limitation the rights to use,
|
||||
copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the
|
||||
Software is furnished to do so, subject to the following
|
||||
conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
||||
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
||||
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
OTHER DEALINGS IN THE SOFTWARE.
|
21
licenses/hasown.txt
Normal file
|
@ -0,0 +1,21 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) Jordan Harband and contributors
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
|
@ -1,23 +1,87 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>SVR.JS 3.6.4 Licenses</title>
|
||||
<title>SVR.JS 3.15.7 Licenses</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<meta charset="UTF-8" />
|
||||
<style>
|
||||
body {
|
||||
font-family: FreeSans, Helvetica, Tahoma, Arial, sans-serif;
|
||||
html {
|
||||
background-color: #dfffdf;
|
||||
color: #000000;
|
||||
font-family: FreeSans, Helvetica, Tahoma, Verdana, Arial, sans-serif;
|
||||
margin: 0.75em;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
body {
|
||||
background-color: #ffffff;
|
||||
padding: 0.5em 0.5em 0.1em;
|
||||
margin: 0.5em auto;
|
||||
width: 90%;
|
||||
max-width: 800px;
|
||||
-webkit-box-shadow: 0 5px 10px 0 rgba(0, 0, 0, 0.15);
|
||||
-moz-box-shadow: 0 5px 10px 0 rgba(0, 0, 0, 0.15);
|
||||
box-shadow: 0 5px 10px 0 rgba(0, 0, 0, 0.15)
|
||||
}
|
||||
|
||||
h1 {
|
||||
text-align: center;
|
||||
font-size: 2.25em;
|
||||
margin: 0.3em 0 0.5em
|
||||
}
|
||||
|
||||
pre,
|
||||
code {
|
||||
background-color: #dfffdf;
|
||||
-webkit-box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.1);
|
||||
-moz-box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.1);
|
||||
box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.1);
|
||||
display: block;
|
||||
padding: 0.2em;
|
||||
font-family: "DejaVu Sans Mono", "Bitstream Vera Sans Mono", Hack, Menlo, Consolas, Monaco, monospace;
|
||||
font-size: 0.85em;
|
||||
margin: auto;
|
||||
width: 95%;
|
||||
}
|
||||
|
||||
@media screen and (prefers-color-scheme: dark) {
|
||||
html {
|
||||
background-color: #002000;
|
||||
color: #ffffff
|
||||
}
|
||||
|
||||
body {
|
||||
background-color: #000f00;
|
||||
-webkit-box-shadow: 0 5px 10px 0 rgba(127, 127, 127, 0.15);
|
||||
-moz-box-shadow: 0 5px 10px 0 rgba(127, 127, 127, 0.15);
|
||||
box-shadow: 0 5px 10px 0 rgba(127, 127, 127, 0.15)
|
||||
}
|
||||
|
||||
pre,
|
||||
code {
|
||||
background-color: #002000;
|
||||
-webkit-box-shadow: 0 2px 4px 0 rgba(127, 127, 127, 0.1);
|
||||
-moz-box-shadow: 0 2px 4px 0 rgba(127, 127, 127, 0.1);
|
||||
box-shadow: 0 2px 4px 0 rgba(127, 127, 127, 0.1)
|
||||
}
|
||||
|
||||
a {
|
||||
color: #ffffff
|
||||
}
|
||||
|
||||
a:hover {
|
||||
color: #00ff00
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h1>SVR.JS 3.6.4 Licenses</h1>
|
||||
<h2>SVR.JS 3.6.4</h2>
|
||||
<h1>SVR.JS 3.15.7 Licenses</h1>
|
||||
<h2>SVR.JS 3.15.7</h2>
|
||||
<div style="display: inline-block; text-align: left; border-width: 2px; border-style: solid; border-color: gray; padding: 8px;">
|
||||
MIT License<br/>
|
||||
<br/>
|
||||
Copyright (c) 2020 DorianTech S.A.<br/>
|
||||
Copyright (c) 2018-2024 SVR.JS<br/>
|
||||
<br/>
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy<br/>
|
||||
of this software and associated documentation files (the "Software"), to deal<br/>
|
||||
|
@ -37,8 +101,9 @@
|
|||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE<br/>
|
||||
SOFTWARE.<br/>
|
||||
</div>
|
||||
<h2>Packages used by SVR.JS 3.6.4 and utilities</h2>
|
||||
<div style="width: 100%; background-color: #ccc; border: 1px solid green; text-align: left; margin: 10px 0;">
|
||||
<h2>Packages used by SVR.JS 3.15.7</h2>
|
||||
<div style="width: 100%; max-width: 1280px; margin: auto">
|
||||
<div style="width: 100%; background-color: #ccc; background-color: rgba(200, 200, 200, 0.3); border: 1px solid green; text-align: left; margin: 10px 0;">
|
||||
<div style="float: right;">License: MIT</div>
|
||||
<div style="font-size: 20px;">
|
||||
<a href="/licenses/asap.txt"><b>asap</b></a>
|
||||
|
@ -47,7 +112,7 @@
|
|||
High-priority task queue for Node.js and browsers
|
||||
</div>
|
||||
</div>
|
||||
<div style="width: 100%; background-color: #ccc; border: 1px solid green; text-align: left; margin: 10px 0;">
|
||||
<div style="width: 100%; background-color: #ccc; background-color: rgba(200, 200, 200, 0.3); border: 1px solid green; text-align: left; margin: 10px 0;">
|
||||
<div style="float: right;">License: MIT</div>
|
||||
<div style="font-size: 20px;">
|
||||
<a href="/licenses/asn1.js.txt"><b>asn1.js</b></a> (by Fedor Indutny)
|
||||
|
@ -56,7 +121,7 @@
|
|||
ASN.1 encoder and decoder
|
||||
</div>
|
||||
</div>
|
||||
<div style="width: 100%; background-color: #ccc; border: 1px solid green; text-align: left; margin: 10px 0;">
|
||||
<div style="width: 100%; background-color: #ccc; background-color: rgba(200, 200, 200, 0.3); border: 1px solid green; text-align: left; margin: 10px 0;">
|
||||
<div style="float: right;">License: MIT</div>
|
||||
<div style="font-size: 20px;">
|
||||
<a href="/licenses/asn1.js-rfc2560.txt"><b>asn1.js-rfc2560</b></a> (by Fedor Indutny)
|
||||
|
@ -65,7 +130,7 @@
|
|||
RFC2560 structures for asn1.js
|
||||
</div>
|
||||
</div>
|
||||
<div style="width: 100%; background-color: #ccc; border: 1px solid green; text-align: left; margin: 10px 0;">
|
||||
<div style="width: 100%; background-color: #ccc; background-color: rgba(200, 200, 200, 0.3); border: 1px solid green; text-align: left; margin: 10px 0;">
|
||||
<div style="float: right;">License: MIT</div>
|
||||
<div style="font-size: 20px;">
|
||||
<a href="/licenses/asn1.js-rfc5280.txt"><b>asn1.js-rfc5280</b></a> (by Felix Hanley)
|
||||
|
@ -74,7 +139,7 @@
|
|||
RFC5280 extension structures for asn1.js
|
||||
</div>
|
||||
</div>
|
||||
<div style="width: 100%; background-color: #ccc; border: 1px solid green; text-align: left; margin: 10px 0;">
|
||||
<div style="width: 100%; background-color: #ccc; background-color: rgba(200, 200, 200, 0.3); border: 1px solid green; text-align: left; margin: 10px 0;">
|
||||
<div style="float: right;">License: MIT</div>
|
||||
<div style="font-size: 20px;">
|
||||
<a href="/licenses/async.txt"><b>async</b></a> (by Caolan McMahon)
|
||||
|
@ -83,7 +148,7 @@
|
|||
Higher-order functions and common patterns for asynchronous code
|
||||
</div>
|
||||
</div>
|
||||
<div style="width: 100%; background-color: #ccc; border: 1px solid green; text-align: left; margin: 10px 0;">
|
||||
<div style="width: 100%; background-color: #ccc; background-color: rgba(200, 200, 200, 0.3); border: 1px solid green; text-align: left; margin: 10px 0;">
|
||||
<div style="float: right;">License: MIT</div>
|
||||
<div style="font-size: 20px;">
|
||||
<a href="/licenses/bn.js.txt"><b>bn.js</b></a> (by Fedor Indutny)
|
||||
|
@ -92,7 +157,7 @@
|
|||
Big number implementation in pure javascript
|
||||
</div>
|
||||
</div>
|
||||
<div style="width: 100%; background-color: #ccc; border: 1px solid green; text-align: left; margin: 10px 0;">
|
||||
<div style="width: 100%; background-color: #ccc; background-color: rgba(200, 200, 200, 0.3); border: 1px solid green; text-align: left; margin: 10px 0;">
|
||||
<div style="float: right;">License: MIT</div>
|
||||
<div style="font-size: 20px;">
|
||||
<a href="/licenses/call-bind.txt"><b>call-bind</b></a> (by Jordan Harband)
|
||||
|
@ -101,7 +166,7 @@
|
|||
Robustly `.call.bind()` a function
|
||||
</div>
|
||||
</div>
|
||||
<div style="width: 100%; background-color: #ccc; border: 1px solid green; text-align: left; margin: 10px 0;">
|
||||
<div style="width: 100%; background-color: #ccc; background-color: rgba(200, 200, 200, 0.3); border: 1px solid green; text-align: left; margin: 10px 0;">
|
||||
<div style="float: right;">License: ISC</div>
|
||||
<div style="font-size: 20px;">
|
||||
<a href="/licenses/chownr.txt"><b>chownr</b></a> (by Isaac Z. Schlueter)
|
||||
|
@ -110,7 +175,16 @@
|
|||
like `chown -R`
|
||||
</div>
|
||||
</div>
|
||||
<div style="width: 100%; background-color: #ccc; border: 1px solid green; text-align: left; margin: 10px 0;">
|
||||
<div style="width: 100%; background-color: #ccc; background-color: rgba(200, 200, 200, 0.3); border: 1px solid green; text-align: left; margin: 10px 0;">
|
||||
<div style="float: right;">License: MIT</div>
|
||||
<div style="font-size: 20px;">
|
||||
<a href="/licenses/define-data-property.txt"><b>define-data-property</b></a> (by Jordan Harband)
|
||||
</div>
|
||||
<div style="font-size: 12px;">
|
||||
Define a data property on an object. Will fall back to assignment in an engine without descriptors.
|
||||
</div>
|
||||
</div>
|
||||
<div style="width: 100%; background-color: #ccc; background-color: rgba(200, 200, 200, 0.3); border: 1px solid green; text-align: left; margin: 10px 0;">
|
||||
<div style="float: right;">License: ISC</div>
|
||||
<div style="font-size: 20px;">
|
||||
<a href="/licenses/dezalgo.txt"><b>dezalgo</b></a> (by Isaac Z. Schlueter)
|
||||
|
@ -119,7 +193,25 @@
|
|||
Contain async insanity so that the dark pony lord doesn't eat souls
|
||||
</div>
|
||||
</div>
|
||||
<div style="width: 100%; background-color: #ccc; border: 1px solid green; text-align: left; margin: 10px 0;">
|
||||
<div style="width: 100%; background-color: #ccc; background-color: rgba(200, 200, 200, 0.3); border: 1px solid green; text-align: left; margin: 10px 0;">
|
||||
<div style="float: right;">License: MIT</div>
|
||||
<div style="font-size: 20px;">
|
||||
<a href="/licenses/es-define-property.txt"><b>es-define-property</b></a> (by Jordan Harband)
|
||||
</div>
|
||||
<div style="font-size: 12px;">
|
||||
`Object.defineProperty`, but not IE 8's broken one.
|
||||
</div>
|
||||
</div>
|
||||
<div style="width: 100%; background-color: #ccc; background-color: rgba(200, 200, 200, 0.3); border: 1px solid green; text-align: left; margin: 10px 0;">
|
||||
<div style="float: right;">License: MIT</div>
|
||||
<div style="font-size: 20px;">
|
||||
<a href="/licenses/es-errors.txt"><b>es-errors</b></a> (by Jordan Harband)
|
||||
</div>
|
||||
<div style="font-size: 12px;">
|
||||
A simple cache for a few of the JS Error constructors.
|
||||
</div>
|
||||
</div>
|
||||
<div style="width: 100%; background-color: #ccc; background-color: rgba(200, 200, 200, 0.3); border: 1px solid green; text-align: left; margin: 10px 0;">
|
||||
<div style="float: right;">License: MIT</div>
|
||||
<div style="font-size: 20px;">
|
||||
<a href="/licenses/formidable.txt"><b>formidable</b></a>
|
||||
|
@ -129,7 +221,7 @@
|
|||
<b>Required by SVR.JS</b>
|
||||
</div>
|
||||
</div>
|
||||
<div style="width: 100%; background-color: #ccc; border: 1px solid green; text-align: left; margin: 10px 0;">
|
||||
<div style="width: 100%; background-color: #ccc; background-color: rgba(200, 200, 200, 0.3); border: 1px solid green; text-align: left; margin: 10px 0;">
|
||||
<div style="float: right;">License: ISC</div>
|
||||
<div style="font-size: 20px;">
|
||||
<a href="/licenses/fs-minipass.txt"><b>fs-minipass</b></a> (by Isaac Z. Schlueter)
|
||||
|
@ -139,7 +231,7 @@
|
|||
<b>Patched to work with Bun</b>
|
||||
</div>
|
||||
</div>
|
||||
<div style="width: 100%; background-color: #ccc; border: 1px solid green; text-align: left; margin: 10px 0;">
|
||||
<div style="width: 100%; background-color: #ccc; background-color: rgba(200, 200, 200, 0.3); border: 1px solid green; text-align: left; margin: 10px 0;">
|
||||
<div style="float: right;">License: MIT</div>
|
||||
<div style="font-size: 20px;">
|
||||
<a href="/licenses/function-bind.txt"><b>function-bind</b></a> (by Raynos)
|
||||
|
@ -148,7 +240,7 @@
|
|||
Implementation of Function.prototype.bind
|
||||
</div>
|
||||
</div>
|
||||
<div style="width: 100%; background-color: #ccc; border: 1px solid green; text-align: left; margin: 10px 0;">
|
||||
<div style="width: 100%; background-color: #ccc; background-color: rgba(200, 200, 200, 0.3); border: 1px solid green; text-align: left; margin: 10px 0;">
|
||||
<div style="float: right;">License: MIT</div>
|
||||
<div style="font-size: 20px;">
|
||||
<a href="/licenses/get-intrinsic.txt"><b>get-intrinsic</b></a> (by Jordan Harband)
|
||||
|
@ -157,7 +249,16 @@
|
|||
Get and robustly cache all JS language-level intrinsics at first require time
|
||||
</div>
|
||||
</div>
|
||||
<div style="width: 100%; background-color: #ccc; border: 1px solid green; text-align: left; margin: 10px 0;">
|
||||
<div style="width: 100%; background-color: #ccc; background-color: rgba(200, 200, 200, 0.3); border: 1px solid green; text-align: left; margin: 10px 0;">
|
||||
<div style="float: right;">License: MIT</div>
|
||||
<div style="font-size: 20px;">
|
||||
<a href="/licenses/gopd.txt"><b>gopd</b></a> (by Jordan Harband)
|
||||
</div>
|
||||
<div style="font-size: 12px;">
|
||||
`Object.getOwnPropertyDescriptor`, but accounts for IE's broken implementation.
|
||||
</div>
|
||||
</div>
|
||||
<div style="width: 100%; background-color: #ccc; background-color: rgba(200, 200, 200, 0.3); border: 1px solid green; text-align: left; margin: 10px 0;">
|
||||
<div style="float: right;">License: ISC</div>
|
||||
<div style="font-size: 20px;">
|
||||
<a href="/licenses/graceful-fs.txt"><b>graceful-fs</b></a>
|
||||
|
@ -167,16 +268,25 @@
|
|||
<b>Required by SVR.JS.</b>
|
||||
</div>
|
||||
</div>
|
||||
<div style="width: 100%; background-color: #ccc; border: 1px solid green; text-align: left; margin: 10px 0;">
|
||||
<div style="width: 100%; background-color: #ccc; background-color: rgba(200, 200, 200, 0.3); border: 1px solid green; text-align: left; margin: 10px 0;">
|
||||
<div style="float: right;">License: MIT</div>
|
||||
<div style="font-size: 20px;">
|
||||
<a href="/licenses/has.txt"><b>has</b></a> (by Thiago de Arruda)
|
||||
<a href="/licenses/has-property-descriptors.txt"><b>has-property-descriptors</b></a> (by Jordan Harband)
|
||||
</div>
|
||||
<div style="font-size: 12px;">
|
||||
Object.prototype.hasOwnProperty.call shortcut
|
||||
Does the environment have full property descriptor support? Handles IE 8's broken defineProperty/gOPD.
|
||||
</div>
|
||||
</div>
|
||||
<div style="width: 100%; background-color: #ccc; border: 1px solid green; text-align: left; margin: 10px 0;">
|
||||
<div style="width: 100%; background-color: #ccc; background-color: rgba(200, 200, 200, 0.3); border: 1px solid green; text-align: left; margin: 10px 0;">
|
||||
<div style="float: right;">License: MIT</div>
|
||||
<div style="font-size: 20px;">
|
||||
<a href="/licenses/has-proto.txt"><b>has-proto</b></a> (by Jordan Harband)
|
||||
</div>
|
||||
<div style="font-size: 12px;">
|
||||
Does this environment have the ability to get the [[Prototype]] of an object on creation with <code>__proto__</code>?
|
||||
</div>
|
||||
</div>
|
||||
<div style="width: 100%; background-color: #ccc; background-color: rgba(200, 200, 200, 0.3); border: 1px solid green; text-align: left; margin: 10px 0;">
|
||||
<div style="float: right;">License: MIT</div>
|
||||
<div style="font-size: 20px;">
|
||||
<a href="/licenses/has-symbols.txt"><b>has-symbols</b></a> (by Jordan Harband)
|
||||
|
@ -185,7 +295,16 @@
|
|||
Determine if the JS environment has Symbol support. Supports spec, or shams.
|
||||
</div>
|
||||
</div>
|
||||
<div style="width: 100%; background-color: #ccc; border: 1px solid green; text-align: left; margin: 10px 0;">
|
||||
<div style="width: 100%; background-color: #ccc; background-color: rgba(200, 200, 200, 0.3); border: 1px solid green; text-align: left; margin: 10px 0;">
|
||||
<div style="float: right;">License: MIT</div>
|
||||
<div style="font-size: 20px;">
|
||||
<a href="/licenses/hasown.txt"><b>hasown</b></a> (by Jordan Harband)
|
||||
</div>
|
||||
<div style="font-size: 12px;">
|
||||
A robust, ES3 compatible, "has own property" predicate.
|
||||
</div>
|
||||
</div>
|
||||
<div style="width: 100%; background-color: #ccc; background-color: rgba(200, 200, 200, 0.3); border: 1px solid green; text-align: left; margin: 10px 0;">
|
||||
<div style="float: right;">License: MIT</div>
|
||||
<div style="font-size: 20px;">
|
||||
<a href="/licenses/hexoid.txt"><b>hexoid</b></a> (by Luke Edwards)
|
||||
|
@ -194,7 +313,7 @@
|
|||
A tiny (190B) and extremely fast utility to generate random IDs of fixed length
|
||||
</div>
|
||||
</div>
|
||||
<div style="width: 100%; background-color: #ccc; border: 1px solid green; text-align: left; margin: 10px 0;">
|
||||
<div style="width: 100%; background-color: #ccc; background-color: rgba(200, 200, 200, 0.3); border: 1px solid green; text-align: left; margin: 10px 0;">
|
||||
<div style="float: right;">License: ISC</div>
|
||||
<div style="font-size: 20px;">
|
||||
<a href="/licenses/inherits.txt"><b>inherits</b></a>
|
||||
|
@ -203,7 +322,7 @@
|
|||
Browser-friendly inheritance fully compatible with standard node.js inherits()
|
||||
</div>
|
||||
</div>
|
||||
<div style="width: 100%; background-color: #ccc; border: 1px solid green; text-align: left; margin: 10px 0;">
|
||||
<div style="width: 100%; background-color: #ccc; background-color: rgba(200, 200, 200, 0.3); border: 1px solid green; text-align: left; margin: 10px 0;">
|
||||
<div style="float: right;">License: MIT</div>
|
||||
<div style="font-size: 20px;">
|
||||
<a href="/licenses/mime-db.txt"><b>mime-db</b></a>
|
||||
|
@ -212,7 +331,7 @@
|
|||
Media Type Database
|
||||
</div>
|
||||
</div>
|
||||
<div style="width: 100%; background-color: #ccc; border: 1px solid green; text-align: left; margin: 10px 0;">
|
||||
<div style="width: 100%; background-color: #ccc; background-color: rgba(200, 200, 200, 0.3); border: 1px solid green; text-align: left; margin: 10px 0;">
|
||||
<div style="float: right;">License: MIT</div>
|
||||
<div style="font-size: 20px;">
|
||||
<a href="/licenses/mime-types.txt"><b>mime-types</b></a>
|
||||
|
@ -222,7 +341,7 @@
|
|||
<b>Required by SVR.JS.</b>
|
||||
</div>
|
||||
</div>
|
||||
<div style="width: 100%; background-color: #ccc; border: 1px solid green; text-align: left; margin: 10px 0;">
|
||||
<div style="width: 100%; background-color: #ccc; background-color: rgba(200, 200, 200, 0.3); border: 1px solid green; text-align: left; margin: 10px 0;">
|
||||
<div style="float: right;">License: ISC</div>
|
||||
<div style="font-size: 20px;">
|
||||
<a href="/licenses/minimalistic-assert.txt"><b>minimalistic-assert</b></a>
|
||||
|
@ -231,7 +350,7 @@
|
|||
minimalistic-assert ===
|
||||
</div>
|
||||
</div>
|
||||
<div style="width: 100%; background-color: #ccc; border: 1px solid green; text-align: left; margin: 10px 0;">
|
||||
<div style="width: 100%; background-color: #ccc; background-color: rgba(200, 200, 200, 0.3); border: 1px solid green; text-align: left; margin: 10px 0;">
|
||||
<div style="float: right;">License: ISC</div>
|
||||
<div style="font-size: 20px;">
|
||||
<a href="/licenses/minipass.txt"><b>minipass</b></a> (by Isaac Z. Schlueter)
|
||||
|
@ -240,7 +359,7 @@
|
|||
minimal implementation of a PassThrough stream
|
||||
</div>
|
||||
</div>
|
||||
<div style="width: 100%; background-color: #ccc; border: 1px solid green; text-align: left; margin: 10px 0;">
|
||||
<div style="width: 100%; background-color: #ccc; background-color: rgba(200, 200, 200, 0.3); border: 1px solid green; text-align: left; margin: 10px 0;">
|
||||
<div style="float: right;">License: MIT</div>
|
||||
<div style="font-size: 20px;">
|
||||
<a href="/licenses/minizlib.txt"><b>minizlib</b></a> (by Isaac Z. Schlueter)
|
||||
|
@ -249,7 +368,7 @@
|
|||
A small fast zlib stream built on <a href="http://npm.im/minipass">minipass</a> and Node.js's zlib binding.
|
||||
</div>
|
||||
</div>
|
||||
<div style="width: 100%; background-color: #ccc; border: 1px solid green; text-align: left; margin: 10px 0;">
|
||||
<div style="width: 100%; background-color: #ccc; background-color: rgba(200, 200, 200, 0.3); border: 1px solid green; text-align: left; margin: 10px 0;">
|
||||
<div style="float: right;">License: MIT</div>
|
||||
<div style="font-size: 20px;">
|
||||
<a href="/licenses/mkdirp.txt"><b>mkdirp</b></a>
|
||||
|
@ -258,7 +377,7 @@
|
|||
Recursively mkdir, like `mkdir -p`
|
||||
</div>
|
||||
</div>
|
||||
<div style="width: 100%; background-color: #ccc; border: 1px solid green; text-align: left; margin: 10px 0;">
|
||||
<div style="width: 100%; background-color: #ccc; background-color: rgba(200, 200, 200, 0.3); border: 1px solid green; text-align: left; margin: 10px 0;">
|
||||
<div style="float: right;">License: MIT</div>
|
||||
<div style="font-size: 20px;">
|
||||
<a href="/licenses/object-inspect.txt"><b>object-inspect</b></a> (by James Halliday)
|
||||
|
@ -267,7 +386,7 @@
|
|||
string representations of objects in node and the browser
|
||||
</div>
|
||||
</div>
|
||||
<div style="width: 100%; background-color: #ccc; border: 1px solid green; text-align: left; margin: 10px 0;">
|
||||
<div style="width: 100%; background-color: #ccc; background-color: rgba(200, 200, 200, 0.3); border: 1px solid green; text-align: left; margin: 10px 0;">
|
||||
<div style="float: right;">License: MIT</div>
|
||||
<div style="font-size: 20px;">
|
||||
<a href="/licenses/ocsp.txt"><b>ocsp</b></a> (by Fedor Indutny)
|
||||
|
@ -277,7 +396,7 @@
|
|||
<b>Required by SVR.JS.</b>
|
||||
</div>
|
||||
</div>
|
||||
<div style="width: 100%; background-color: #ccc; border: 1px solid green; text-align: left; margin: 10px 0;">
|
||||
<div style="width: 100%; background-color: #ccc; background-color: rgba(200, 200, 200, 0.3); border: 1px solid green; text-align: left; margin: 10px 0;">
|
||||
<div style="float: right;">License: ISC</div>
|
||||
<div style="font-size: 20px;">
|
||||
<a href="/licenses/once.txt"><b>once</b></a> (by Isaac Z. Schlueter)
|
||||
|
@ -286,17 +405,7 @@
|
|||
Run a function exactly one time
|
||||
</div>
|
||||
</div>
|
||||
<div style="width: 100%; background-color: #ccc; border: 1px solid green; text-align: left; margin: 10px 0;">
|
||||
<div style="float: right;">License: MIT</div>
|
||||
<div style="font-size: 20px;">
|
||||
<a href="/licenses/pretty-bytes.txt"><b>pretty-bytes</b></a> (by Sindre Sorhus)
|
||||
</div>
|
||||
<div style="font-size: 12px;">
|
||||
Convert bytes to a human readable string: 1337 → 1.34 kB<br/>
|
||||
<b>Required by SVR.JS.</b>
|
||||
</div>
|
||||
</div>
|
||||
<div style="width: 100%; background-color: #ccc; border: 1px solid green; text-align: left; margin: 10px 0;">
|
||||
<div style="width: 100%; background-color: #ccc; background-color: rgba(200, 200, 200, 0.3); border: 1px solid green; text-align: left; margin: 10px 0;">
|
||||
<div style="float: right;">License: BSD-3</div>
|
||||
<div style="font-size: 20px;">
|
||||
<a href="/licenses/qs.txt"><b>qs</b></a>
|
||||
|
@ -305,7 +414,16 @@
|
|||
A querystring parser that supports nesting and arrays, with a depth limit
|
||||
</div>
|
||||
</div>
|
||||
<div style="width: 100%; background-color: #ccc; border: 1px solid green; text-align: left; margin: 10px 0;">
|
||||
<div style="width: 100%; background-color: #ccc; background-color: rgba(200, 200, 200, 0.3); border: 1px solid green; text-align: left; margin: 10px 0;">
|
||||
<div style="float: right;">License: MIT</div>
|
||||
<div style="font-size: 20px;">
|
||||
<a href="/licenses/set-function-length.txt"><b>set-function-length</b></a> (by Jordan Harband)
|
||||
</div>
|
||||
<div style="font-size: 12px;">
|
||||
Set a function's length property
|
||||
</div>
|
||||
</div>
|
||||
<div style="width: 100%; background-color: #ccc; background-color: rgba(200, 200, 200, 0.3); border: 1px solid green; text-align: left; margin: 10px 0;">
|
||||
<div style="float: right;">License: MIT</div>
|
||||
<div style="font-size: 20px;">
|
||||
<a href="/licenses/side-channel.txt"><b>side-channel</b></a> (by Jordan Harband)
|
||||
|
@ -314,7 +432,7 @@
|
|||
Store information about any JS value in a side channel. Uses WeakMap if available.
|
||||
</div>
|
||||
</div>
|
||||
<div style="width: 100%; background-color: #ccc; border: 1px solid green; text-align: left; margin: 10px 0;">
|
||||
<div style="width: 100%; background-color: #ccc; background-color: rgba(200, 200, 200, 0.3); border: 1px solid green; text-align: left; margin: 10px 0;">
|
||||
<div style="float: right;">License: MIT</div>
|
||||
<div style="font-size: 20px;">
|
||||
<a href="/licenses/simple-lru-cache.txt"><b>simple-lru-cache</b></a> (by Gabriel Eisbruch)
|
||||
|
@ -323,17 +441,17 @@
|
|||
node-simple-lru-cache =====================
|
||||
</div>
|
||||
</div>
|
||||
<div style="width: 100%; background-color: #ccc; border: 1px solid green; text-align: left; margin: 10px 0;">
|
||||
<div style="width: 100%; background-color: #ccc; background-color: rgba(200, 200, 200, 0.3); border: 1px solid green; text-align: left; margin: 10px 0;">
|
||||
<div style="float: right;">License: ISC</div>
|
||||
<div style="font-size: 20px;">
|
||||
<a href="/licenses/tar.txt"><b>tar</b></a> (by Isaac Z. Schlueter)
|
||||
<a href="/licenses/tar.txt"><b>tar</b></a> (by GitHub Inc.)
|
||||
</div>
|
||||
<div style="font-size: 12px;">
|
||||
tar for node<br/>
|
||||
<b>Required by SVR.JS.</b>
|
||||
</div>
|
||||
</div>
|
||||
<div style="width: 100%; background-color: #ccc; border: 1px solid green; text-align: left; margin: 10px 0;">
|
||||
<div style="width: 100%; background-color: #ccc; background-color: rgba(200, 200, 200, 0.3); border: 1px solid green; text-align: left; margin: 10px 0;">
|
||||
<div style="float: right;">License: ISC</div>
|
||||
<div style="font-size: 20px;">
|
||||
<a href="/licenses/wrappy.txt"><b>wrappy</b></a> (by Isaac Z. Schlueter)
|
||||
|
@ -342,7 +460,7 @@
|
|||
Callback wrapping utility
|
||||
</div>
|
||||
</div>
|
||||
<div style="width: 100%; background-color: #ccc; border: 1px solid green; text-align: left; margin: 10px 0;">
|
||||
<div style="width: 100%; background-color: #ccc; background-color: rgba(200, 200, 200, 0.3); border: 1px solid green; text-align: left; margin: 10px 0;">
|
||||
<div style="float: right;">License: ISC</div>
|
||||
<div style="font-size: 20px;">
|
||||
<a href="/licenses/yallist.txt"><b>yallist</b></a> (by Isaac Z. Schlueter)
|
||||
|
@ -351,6 +469,7 @@
|
|||
Yet Another Linked List
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<br/>
|
||||
<img src="/powered.png" />
|
||||
</body>
|
||||
|
|
|
@ -1,22 +1,23 @@
|
|||
(The MIT License)
|
||||
|
||||
The MIT License (MIT)
|
||||
Copyright (c) 2014 Jonathan Ong <me@jongleberry.com>
|
||||
Copyright (c) 2015-2022 Douglas Christopher Wilson <doug@somethingdoug.com>
|
||||
|
||||
Copyright (c) 2014 Jonathan Ong me@jongleberry.com
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
'Software'), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
The ISC License
|
||||
|
||||
Copyright (c) npm, Inc. and Contributors
|
||||
Copyright (c) 2017-2023 npm, Inc., Isaac Z. Schlueter, and Contributors
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted, provided that the above
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
21
licenses/set-function-length.txt
Normal file
|
@ -0,0 +1,21 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) Jordan Harband and contributors
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
|
@ -35,15 +35,17 @@ function viewLog(log) {
|
|||
if(log[0] == "") log.shift();
|
||||
for(var i=0;i<log.length;i++) {
|
||||
if(log[i].indexOf("SERVER REQUEST MESSAGE") != -1) {
|
||||
log[i] = log[i].replace("SERVER REQUEST MESSAGE","\x1b[34mSERVER REQUEST MESSAGE") + "\x1b[37m\x1b[0m";
|
||||
log[i] = log[i].replace("SERVER REQUEST MESSAGE","\x1b[34m\x1b[1mSERVER REQUEST MESSAGE\x1b[22m") + "\x1b[37m\x1b[0m";
|
||||
} else if(log[i].indexOf("SERVER RESPONSE MESSAGE") != -1) {
|
||||
log[i] = log[i].replace("SERVER RESPONSE MESSAGE","\x1b[32mSERVER RESPONSE MESSAGE") + "\x1b[37m\x1b[0m";
|
||||
log[i] = log[i].replace("SERVER RESPONSE MESSAGE","\x1b[32m\x1b[1mSERVER RESPONSE MESSAGE\x1b[22m") + "\x1b[37m\x1b[0m";
|
||||
} else if(log[i].indexOf("SERVER RESPONSE ERROR MESSAGE") != -1) {
|
||||
log[i] = log[i].replace("SERVER RESPONSE ERROR MESSAGE","\x1b[31mSERVER RESPONSE ERROR MESSAGE") + "\x1b[37m\x1b[0m";
|
||||
log[i] = log[i].replace("SERVER RESPONSE ERROR MESSAGE","\x1b[31m\x1b[1mSERVER RESPONSE ERROR MESSAGE\x1b[22m") + "\x1b[37m\x1b[0m";
|
||||
} else if(log[i].indexOf("SERVER ERROR MESSAGE") != -1) {
|
||||
log[i] = log[i].replace("SERVER ERROR MESSAGE","\x1b[41mSERVER ERROR MESSAGE") + "\x1b[40m\x1b[0m";
|
||||
log[i] = log[i].replace("SERVER ERROR MESSAGE","\x1b[41m\x1b[1mSERVER ERROR MESSAGE\x1b[22m") + "\x1b[40m\x1b[0m";
|
||||
} else if(log[i].indexOf("SERVER WARNING MESSAGE") != -1) {
|
||||
log[i] = log[i].replace("SERVER WARNING MESSAGE","\x1b[43mSERVER WARNING MESSAGE") + "\x1b[40m\x1b[0m";
|
||||
log[i] = log[i].replace("SERVER WARNING MESSAGE","\x1b[43m\x1b[1mSERVER WARNING MESSAGE\x1b[22m") + "\x1b[40m\x1b[0m";
|
||||
} else if(log[i].indexOf("SERVER MESSAGE") != -1) {
|
||||
log[i] = log[i].replace("SERVER MESSAGE","\x1b[1mSERVER MESSAGE\x1b[22m");
|
||||
}
|
||||
console.log(log[i]);
|
||||
}
|
||||
|
|
BIN
logo.png
Before Width: | Height: | Size: 31 KiB After Width: | Height: | Size: 44 KiB |
14
logviewer.js
101
node_modules/asap/package.json
generated
vendored
|
@ -1,27 +1,18 @@
|
|||
{
|
||||
"_from": "asap@^2.0.0",
|
||||
"_id": "asap@2.0.6",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-BSHWgDSAiKs50o2Re8ppvp3seVHXSRM44cdSsT9FfNEUUZLOGWVCsiWaRPWM1Znn+mqZ1OfVZ3z3DWEzSp7hRA==",
|
||||
"_location": "/asap",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "range",
|
||||
"registry": true,
|
||||
"raw": "asap@^2.0.0",
|
||||
"name": "asap",
|
||||
"escapedName": "asap",
|
||||
"rawSpec": "^2.0.0",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "^2.0.0"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/dezalgo"
|
||||
"version": "2.0.6",
|
||||
"description": "High-priority task queue for Node.js and browsers",
|
||||
"keywords": [
|
||||
"event",
|
||||
"task",
|
||||
"queue"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz",
|
||||
"_shasum": "e50347611d7e690943208bbdafebcbc2fb866d46",
|
||||
"_spec": "asap@^2.0.0",
|
||||
"_where": "/home/ubuntu/formidable/node_modules/dezalgo",
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/kriskowal/asap.git"
|
||||
},
|
||||
"main": "./asap.js",
|
||||
"browser": {
|
||||
"./asap": "./browser-asap.js",
|
||||
"./asap.js": "./browser-asap.js",
|
||||
|
@ -29,14 +20,29 @@
|
|||
"./raw.js": "./browser-raw.js",
|
||||
"./test/domain.js": "./test/browser-domain.js"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/kriskowal/asap/issues"
|
||||
"react-native": {
|
||||
"domain": false
|
||||
},
|
||||
"files": [
|
||||
"raw.js",
|
||||
"asap.js",
|
||||
"browser-raw.js",
|
||||
"browser-asap.js"
|
||||
],
|
||||
"scripts": {
|
||||
"test": "npm run lint && npm run test-node",
|
||||
"test-travis": "npm run lint && npm run test-node && npm run test-saucelabs && npm run test-saucelabs-worker",
|
||||
"test-node": "node test/asap-test.js",
|
||||
"test-publish": "node scripts/publish-bundle.js test/asap-test.js | pbcopy",
|
||||
"test-browser": "node scripts/publish-bundle.js test/asap-test.js | xargs opener",
|
||||
"test-saucelabs": "node scripts/saucelabs.js test/asap-test.js scripts/saucelabs-spot-configurations.json",
|
||||
"test-saucelabs-all": "node scripts/saucelabs.js test/asap-test.js scripts/saucelabs-all-configurations.json",
|
||||
"test-saucelabs-worker": "node scripts/saucelabs-worker-test.js scripts/saucelabs-spot-configurations.json",
|
||||
"test-saucelabs-worker-all": "node scripts/saucelabs-worker-test.js scripts/saucelabs-all-configurations.json",
|
||||
"lint": "jshint raw.js asap.js browser-raw.js browser-asap.js $(find scripts -name '*.js' | grep -v gauntlet)",
|
||||
"benchmarks": "node benchmarks"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"deprecated": false,
|
||||
"description": "High-priority task queue for Node.js and browsers",
|
||||
"devDependencies": {
|
||||
"benchmark": "^1.0.0",
|
||||
"events": "^1.0.1",
|
||||
"jshint": "^2.5.1",
|
||||
"knox": "^0.8.10",
|
||||
|
@ -46,42 +52,7 @@
|
|||
"q-io": "^2.0.3",
|
||||
"saucelabs": "^0.1.1",
|
||||
"wd": "^0.2.21",
|
||||
"weak-map": "^1.0.5"
|
||||
},
|
||||
"files": [
|
||||
"raw.js",
|
||||
"asap.js",
|
||||
"browser-raw.js",
|
||||
"browser-asap.js"
|
||||
],
|
||||
"homepage": "https://github.com/kriskowal/asap#readme",
|
||||
"keywords": [
|
||||
"event",
|
||||
"task",
|
||||
"queue"
|
||||
],
|
||||
"license": "MIT",
|
||||
"main": "./asap.js",
|
||||
"name": "asap",
|
||||
"react-native": {
|
||||
"domain": false
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/kriskowal/asap.git"
|
||||
},
|
||||
"scripts": {
|
||||
"benchmarks": "node benchmarks",
|
||||
"lint": "jshint raw.js asap.js browser-raw.js browser-asap.js $(find scripts -name '*.js' | grep -v gauntlet)",
|
||||
"test": "npm run lint && npm run test-node",
|
||||
"test-browser": "node scripts/publish-bundle.js test/asap-test.js | xargs opener",
|
||||
"test-node": "node test/asap-test.js",
|
||||
"test-publish": "node scripts/publish-bundle.js test/asap-test.js | pbcopy",
|
||||
"test-saucelabs": "node scripts/saucelabs.js test/asap-test.js scripts/saucelabs-spot-configurations.json",
|
||||
"test-saucelabs-all": "node scripts/saucelabs.js test/asap-test.js scripts/saucelabs-all-configurations.json",
|
||||
"test-saucelabs-worker": "node scripts/saucelabs-worker-test.js scripts/saucelabs-spot-configurations.json",
|
||||
"test-saucelabs-worker-all": "node scripts/saucelabs-worker-test.js scripts/saucelabs-all-configurations.json",
|
||||
"test-travis": "npm run lint && npm run test-node && npm run test-saucelabs && npm run test-saucelabs-worker"
|
||||
},
|
||||
"version": "2.0.6"
|
||||
"weak-map": "^1.0.5",
|
||||
"benchmark": "^1.0.0"
|
||||
}
|
||||
}
|
||||
|
|
67
node_modules/asn1.js-rfc2560/package.json
generated
vendored
|
@ -1,60 +1,33 @@
|
|||
{
|
||||
"_from": "asn1.js-rfc2560@^4.0.0",
|
||||
"_id": "asn1.js-rfc2560@4.0.6",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-ysf48ni+f/efNPilq4+ApbifUPcSW/xbDeQAh055I+grr2gXgNRQqHew7kkO70WSMQ2tEOURVwsK+dJqUNjIIg==",
|
||||
"_location": "/asn1.js-rfc2560",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "range",
|
||||
"registry": true,
|
||||
"raw": "asn1.js-rfc2560@^4.0.0",
|
||||
"name": "asn1.js-rfc2560",
|
||||
"escapedName": "asn1.js-rfc2560",
|
||||
"rawSpec": "^4.0.0",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "^4.0.0"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/ocsp"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/asn1.js-rfc2560/-/asn1.js-rfc2560-4.0.6.tgz",
|
||||
"_shasum": "0975ce84768a8401e95884ad13e2d00e7b25a280",
|
||||
"_spec": "asn1.js-rfc2560@^4.0.0",
|
||||
"_where": "/home/ubuntu/OCSP/node_modules/ocsp",
|
||||
"author": {
|
||||
"name": "Fedor Indutny"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/indutny/asn1.js/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"dependencies": {
|
||||
"asn1.js-rfc5280": "^2.0.0"
|
||||
},
|
||||
"deprecated": false,
|
||||
"version": "4.0.6",
|
||||
"description": "RFC2560 structures for asn1.js",
|
||||
"devDependencies": {
|
||||
"mocha": "^4.0.1"
|
||||
"main": "index.js",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git@github.com:indutny/asn1.js"
|
||||
},
|
||||
"homepage": "https://github.com/indutny/asn1.js",
|
||||
"keywords": [
|
||||
"asn1",
|
||||
"rfc2560",
|
||||
"der"
|
||||
],
|
||||
"license": "MIT",
|
||||
"main": "index.js",
|
||||
"name": "asn1.js-rfc2560",
|
||||
"peerDependencies": {
|
||||
"asn1.js": "^4.4.0"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+ssh://git@github.com/indutny/asn1.js.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "mocha --reporter=spec test/*-test.js"
|
||||
},
|
||||
"version": "4.0.6"
|
||||
"author": "Fedor Indutny",
|
||||
"license": "MIT",
|
||||
"bugs": {
|
||||
"url": "https://github.com/indutny/asn1.js/issues"
|
||||
},
|
||||
"homepage": "https://github.com/indutny/asn1.js",
|
||||
"dependencies": {
|
||||
"asn1.js-rfc5280": "^2.0.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"asn1.js": "^4.4.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"mocha": "^4.0.1"
|
||||
}
|
||||
}
|
||||
|
|
62
node_modules/asn1.js-rfc5280/package.json
generated
vendored
|
@ -1,58 +1,30 @@
|
|||
{
|
||||
"_from": "asn1.js-rfc5280@^2.0.0",
|
||||
"_id": "asn1.js-rfc5280@2.0.1",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-1e2ypnvTbYD/GdxWK77tdLBahvo1fZUHlQJqAVUuZWdYj0rdjGcf2CWYUtbsyRYpYUMwMWLZFUtLxog8ZXTrcg==",
|
||||
"_location": "/asn1.js-rfc5280",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "range",
|
||||
"registry": true,
|
||||
"raw": "asn1.js-rfc5280@^2.0.0",
|
||||
"name": "asn1.js-rfc5280",
|
||||
"escapedName": "asn1.js-rfc5280",
|
||||
"rawSpec": "^2.0.0",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "^2.0.0"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/asn1.js-rfc2560",
|
||||
"/ocsp"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/asn1.js-rfc5280/-/asn1.js-rfc5280-2.0.1.tgz",
|
||||
"_shasum": "072f3dfc03f86d1faae7485c6197584ba2bb5ddc",
|
||||
"_spec": "asn1.js-rfc5280@^2.0.0",
|
||||
"_where": "/home/ubuntu/OCSP/node_modules/ocsp",
|
||||
"author": {
|
||||
"name": "Felix Hanley"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/indutny/asn1.js/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"dependencies": {
|
||||
"asn1.js": "^4.5.0"
|
||||
},
|
||||
"deprecated": false,
|
||||
"version": "2.0.1",
|
||||
"description": "RFC5280 extension structures for asn1.js",
|
||||
"devDependencies": {
|
||||
"mocha": "^4.0.1"
|
||||
"main": "index.js",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git@github.com:indutny/asn1.js"
|
||||
},
|
||||
"homepage": "https://github.com/indutny/asn1.js",
|
||||
"keywords": [
|
||||
"asn1",
|
||||
"rfc5280",
|
||||
"der"
|
||||
],
|
||||
"license": "MIT",
|
||||
"main": "index.js",
|
||||
"name": "asn1.js-rfc5280",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+ssh://git@github.com/indutny/asn1.js.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "mocha --reporter=spec test/*-test.js"
|
||||
},
|
||||
"version": "2.0.1"
|
||||
"author": "Felix Hanley",
|
||||
"license": "MIT",
|
||||
"bugs": {
|
||||
"url": "https://github.com/indutny/asn1.js/issues"
|
||||
},
|
||||
"homepage": "https://github.com/indutny/asn1.js",
|
||||
"dependencies": {
|
||||
"asn1.js": "^4.5.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"mocha": "^4.0.1"
|
||||
}
|
||||
}
|
||||
|
|
66
node_modules/asn1.js/package.json
generated
vendored
|
@ -1,59 +1,31 @@
|
|||
{
|
||||
"_from": "asn1.js@^4.8.0",
|
||||
"_id": "asn1.js@4.10.1",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-p32cOF5q0Zqs9uBiONKYLm6BClCoBCM5O9JfeUSlnQLBTxYdTK+pW+nXflm8UkKd2UYlEbYz5qEi0JuZR9ckSw==",
|
||||
"_location": "/asn1.js",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "range",
|
||||
"registry": true,
|
||||
"raw": "asn1.js@^4.8.0",
|
||||
"name": "asn1.js",
|
||||
"escapedName": "asn1.js",
|
||||
"rawSpec": "^4.8.0",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "^4.8.0"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/asn1.js-rfc5280",
|
||||
"/ocsp"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-4.10.1.tgz",
|
||||
"_shasum": "b9c2bf5805f1e64aadeed6df3a2bfafb5a73f5a0",
|
||||
"_spec": "asn1.js@^4.8.0",
|
||||
"_where": "/home/ubuntu/OCSP/node_modules/ocsp",
|
||||
"author": {
|
||||
"name": "Fedor Indutny"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/indutny/asn1.js/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"dependencies": {
|
||||
"bn.js": "^4.0.0",
|
||||
"inherits": "^2.0.1",
|
||||
"minimalistic-assert": "^1.0.0"
|
||||
},
|
||||
"deprecated": false,
|
||||
"version": "4.10.1",
|
||||
"description": "ASN.1 encoder and decoder",
|
||||
"devDependencies": {
|
||||
"mocha": "^2.3.4"
|
||||
"main": "lib/asn1.js",
|
||||
"scripts": {
|
||||
"test": "mocha --reporter spec test/*-test.js && cd rfc/2560 && npm i && npm test && cd ../../rfc/5280 && npm i && npm test"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git@github.com:indutny/asn1.js"
|
||||
},
|
||||
"homepage": "https://github.com/indutny/asn1.js",
|
||||
"keywords": [
|
||||
"asn.1",
|
||||
"der"
|
||||
],
|
||||
"author": "Fedor Indutny",
|
||||
"license": "MIT",
|
||||
"main": "lib/asn1.js",
|
||||
"name": "asn1.js",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+ssh://git@github.com/indutny/asn1.js.git"
|
||||
"bugs": {
|
||||
"url": "https://github.com/indutny/asn1.js/issues"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "mocha --reporter spec test/*-test.js && cd rfc/2560 && npm i && npm test && cd ../../rfc/5280 && npm i && npm test"
|
||||
"homepage": "https://github.com/indutny/asn1.js",
|
||||
"devDependencies": {
|
||||
"mocha": "^2.3.4"
|
||||
},
|
||||
"version": "4.10.1"
|
||||
"dependencies": {
|
||||
"bn.js": "^4.0.0",
|
||||
"inherits": "^2.0.1",
|
||||
"minimalistic-assert": "^1.0.0"
|
||||
}
|
||||
}
|
||||
|
|
76
node_modules/async/package.json
generated
vendored
|
@ -1,38 +1,30 @@
|
|||
{
|
||||
"_from": "async@^1.5.2",
|
||||
"_id": "async@1.5.2",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-nSVgobk4rv61R9PUSDtYt7mPVB2olxNR5RWJcAsH676/ef11bUZwvu7+RGYrYauVdDPcO519v68wRhXQtxsV9w==",
|
||||
"_location": "/async",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "range",
|
||||
"registry": true,
|
||||
"raw": "async@^1.5.2",
|
||||
"name": "async",
|
||||
"escapedName": "async",
|
||||
"rawSpec": "^1.5.2",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "^1.5.2"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/ocsp"
|
||||
"description": "Higher-order functions and common patterns for asynchronous code",
|
||||
"main": "lib/async.js",
|
||||
"files": [
|
||||
"lib",
|
||||
"dist/async.js",
|
||||
"dist/async.min.js"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz",
|
||||
"_shasum": "ec6a61ae56480c0c3cb241c95618e20892f9672a",
|
||||
"_spec": "async@^1.5.2",
|
||||
"_where": "/home/ubuntu/OCSP/node_modules/ocsp",
|
||||
"author": {
|
||||
"name": "Caolan McMahon"
|
||||
"author": "Caolan McMahon",
|
||||
"version": "1.5.2",
|
||||
"keywords": [
|
||||
"async",
|
||||
"callback",
|
||||
"utility",
|
||||
"module"
|
||||
],
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/caolan/async.git"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/caolan/async/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"deprecated": false,
|
||||
"description": "Higher-order functions and common patterns for asynchronous code",
|
||||
"license": "MIT",
|
||||
"devDependencies": {
|
||||
"benchmark": "github:bestiejs/benchmark.js",
|
||||
"benchmark": "bestiejs/benchmark.js",
|
||||
"bluebird": "^2.9.32",
|
||||
"chai": "^3.1.0",
|
||||
"coveralls": "^2.11.2",
|
||||
|
@ -56,12 +48,6 @@
|
|||
"xyz": "^0.5.0",
|
||||
"yargs": "~3.9.1"
|
||||
},
|
||||
"files": [
|
||||
"lib",
|
||||
"dist/async.js",
|
||||
"dist/async.min.js"
|
||||
],
|
||||
"homepage": "https://github.com/caolan/async#readme",
|
||||
"jam": {
|
||||
"main": "lib/async.js",
|
||||
"include": [
|
||||
|
@ -73,33 +59,19 @@
|
|||
"Utilities"
|
||||
]
|
||||
},
|
||||
"keywords": [
|
||||
"async",
|
||||
"callback",
|
||||
"utility",
|
||||
"module"
|
||||
],
|
||||
"license": "MIT",
|
||||
"main": "lib/async.js",
|
||||
"name": "async",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/caolan/async.git"
|
||||
},
|
||||
"scripts": {
|
||||
"coverage": "nyc npm test && nyc report",
|
||||
"coveralls": "nyc npm test && nyc report --reporter=text-lcov | coveralls",
|
||||
"lint": "jshint lib/*.js test/*.js perf/*.js && jscs lib/*.js test/*.js perf/*.js",
|
||||
"mocha-browser-test": "karma start",
|
||||
"mocha-node-test": "mocha mocha_test/",
|
||||
"mocha-browser-test": "karma start",
|
||||
"mocha-test": "npm run mocha-node-test && npm run mocha-browser-test",
|
||||
"nodeunit-test": "nodeunit test/test-async.js",
|
||||
"test": "npm run-script lint && npm run nodeunit-test && npm run mocha-test"
|
||||
"test": "npm run-script lint && npm run nodeunit-test && npm run mocha-test",
|
||||
"lint": "jshint lib/*.js test/*.js perf/*.js && jscs lib/*.js test/*.js perf/*.js",
|
||||
"coverage": "nyc npm test && nyc report",
|
||||
"coveralls": "nyc npm test && nyc report --reporter=text-lcov | coveralls"
|
||||
},
|
||||
"spm": {
|
||||
"main": "lib/async.js"
|
||||
},
|
||||
"version": "1.5.2",
|
||||
"volo": {
|
||||
"main": "lib/async.js",
|
||||
"ignore": [
|
||||
|
|
70
node_modules/bn.js/package.json
generated
vendored
|
@ -1,46 +1,17 @@
|
|||
{
|
||||
"_from": "bn.js@^4.0.0",
|
||||
"_id": "bn.js@4.12.0",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==",
|
||||
"_location": "/bn.js",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "range",
|
||||
"registry": true,
|
||||
"raw": "bn.js@^4.0.0",
|
||||
"name": "bn.js",
|
||||
"escapedName": "bn.js",
|
||||
"rawSpec": "^4.0.0",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "^4.0.0"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/asn1.js"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz",
|
||||
"_shasum": "775b3f278efbb9718eec7361f483fb36fbbfea88",
|
||||
"_spec": "bn.js@^4.0.0",
|
||||
"_where": "/home/ubuntu/OCSP/node_modules/asn1.js",
|
||||
"author": {
|
||||
"name": "Fedor Indutny",
|
||||
"email": "fedor@indutny.com"
|
||||
},
|
||||
"browser": {
|
||||
"buffer": false
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/indutny/bn.js/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"deprecated": false,
|
||||
"version": "4.12.0",
|
||||
"description": "Big number implementation in pure javascript",
|
||||
"devDependencies": {
|
||||
"istanbul": "^0.3.5",
|
||||
"mocha": "^2.1.0",
|
||||
"semistandard": "^7.0.4"
|
||||
"main": "lib/bn.js",
|
||||
"scripts": {
|
||||
"lint": "semistandard",
|
||||
"unit": "mocha --reporter=spec test/*-test.js",
|
||||
"test": "npm run lint && npm run unit"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git@github.com:indutny/bn.js"
|
||||
},
|
||||
"homepage": "https://github.com/indutny/bn.js",
|
||||
"keywords": [
|
||||
"BN",
|
||||
"BigNum",
|
||||
|
@ -48,17 +19,18 @@
|
|||
"Modulo",
|
||||
"Montgomery"
|
||||
],
|
||||
"author": "Fedor Indutny <fedor@indutny.com>",
|
||||
"license": "MIT",
|
||||
"main": "lib/bn.js",
|
||||
"name": "bn.js",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+ssh://git@github.com/indutny/bn.js.git"
|
||||
"bugs": {
|
||||
"url": "https://github.com/indutny/bn.js/issues"
|
||||
},
|
||||
"scripts": {
|
||||
"lint": "semistandard",
|
||||
"test": "npm run lint && npm run unit",
|
||||
"unit": "mocha --reporter=spec test/*-test.js"
|
||||
"homepage": "https://github.com/indutny/bn.js",
|
||||
"browser": {
|
||||
"buffer": false
|
||||
},
|
||||
"version": "4.12.0"
|
||||
"devDependencies": {
|
||||
"istanbul": "^0.3.5",
|
||||
"mocha": "^2.1.0",
|
||||
"semistandard": "^7.0.4"
|
||||
}
|
||||
}
|
||||
|
|
1
node_modules/call-bind/.eslintrc
generated
vendored
|
@ -12,6 +12,5 @@
|
|||
],
|
||||
}],
|
||||
"no-magic-numbers": 0,
|
||||
"operator-linebreak": [2, "before"],
|
||||
},
|
||||
}
|
||||
|
|
4
node_modules/call-bind/.nycrc
generated
vendored
|
@ -2,10 +2,6 @@
|
|||
"all": true,
|
||||
"check-coverage": false,
|
||||
"reporter": ["text-summary", "text", "html", "json"],
|
||||
"lines": 86,
|
||||
"statements": 85.93,
|
||||
"functions": 82.43,
|
||||
"branches": 76.06,
|
||||
"exclude": [
|
||||
"coverage",
|
||||
"test"
|
||||
|
|
51
node_modules/call-bind/CHANGELOG.md
generated
vendored
|
@ -5,6 +5,57 @@ All notable changes to this project will be documented in this file.
|
|||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
|
||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## [v1.0.7](https://github.com/ljharb/call-bind/compare/v1.0.6...v1.0.7) - 2024-02-12
|
||||
|
||||
### Commits
|
||||
|
||||
- [Refactor] use `es-define-property` [`09b76a0`](https://github.com/ljharb/call-bind/commit/09b76a01634440461d44a80c9924ec4b500f3b03)
|
||||
- [Deps] update `get-intrinsic`, `set-function-length` [`ad5136d`](https://github.com/ljharb/call-bind/commit/ad5136ddda2a45c590959829ad3dce0c9f4e3590)
|
||||
|
||||
## [v1.0.6](https://github.com/ljharb/call-bind/compare/v1.0.5...v1.0.6) - 2024-02-05
|
||||
|
||||
### Commits
|
||||
|
||||
- [Dev Deps] update `aud`, `npmignore`, `tape` [`d564d5c`](https://github.com/ljharb/call-bind/commit/d564d5ce3e06a19df4d499c77f8d1a9da44e77aa)
|
||||
- [Deps] update `get-intrinsic`, `set-function-length` [`cfc2bdc`](https://github.com/ljharb/call-bind/commit/cfc2bdca7b633df0e0e689e6b637f668f1c6792e)
|
||||
- [Refactor] use `es-errors`, so things that only need those do not need `get-intrinsic` [`64cd289`](https://github.com/ljharb/call-bind/commit/64cd289ae5862c250a4ca80aa8d461047c166af5)
|
||||
- [meta] add missing `engines.node` [`32a4038`](https://github.com/ljharb/call-bind/commit/32a4038857b62179f7f9b7b3df2c5260036be582)
|
||||
|
||||
## [v1.0.5](https://github.com/ljharb/call-bind/compare/v1.0.4...v1.0.5) - 2023-10-19
|
||||
|
||||
### Commits
|
||||
|
||||
- [Fix] throw an error on non-functions as early as possible [`f262408`](https://github.com/ljharb/call-bind/commit/f262408f822c840fbc268080f3ad7c429611066d)
|
||||
- [Deps] update `set-function-length` [`3fff271`](https://github.com/ljharb/call-bind/commit/3fff27145a1e3a76a5b74f1d7c3c43d0fa3b9871)
|
||||
|
||||
## [v1.0.4](https://github.com/ljharb/call-bind/compare/v1.0.3...v1.0.4) - 2023-10-19
|
||||
|
||||
## [v1.0.3](https://github.com/ljharb/call-bind/compare/v1.0.2...v1.0.3) - 2023-10-19
|
||||
|
||||
### Commits
|
||||
|
||||
- [actions] reuse common workflows [`a994df6`](https://github.com/ljharb/call-bind/commit/a994df69f401f4bf735a4ccd77029b85d1549453)
|
||||
- [meta] use `npmignore` to autogenerate an npmignore file [`eef3ef2`](https://github.com/ljharb/call-bind/commit/eef3ef21e1f002790837fedb8af2679c761fbdf5)
|
||||
- [readme] flesh out content [`1845ccf`](https://github.com/ljharb/call-bind/commit/1845ccfd9976a607884cfc7157c93192cc16cf22)
|
||||
- [actions] use `node/install` instead of `node/run`; use `codecov` action [`5b47d53`](https://github.com/ljharb/call-bind/commit/5b47d53d2fd74af5ea0a44f1d51e503cd42f7a90)
|
||||
- [Refactor] use `set-function-length` [`a0e165c`](https://github.com/ljharb/call-bind/commit/a0e165c5dc61db781cbc919b586b1c2b8da0b150)
|
||||
- [Dev Deps] update `@ljharb/eslint-config`, `aud`, `tape` [`9c50103`](https://github.com/ljharb/call-bind/commit/9c50103f44137279a817317cf6cc421a658f85b4)
|
||||
- [meta] simplify "exports" [`019c6d0`](https://github.com/ljharb/call-bind/commit/019c6d06b0e1246ceed8e579f57e44441cbbf6d9)
|
||||
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `safe-publish-latest`, `tape` [`23bd718`](https://github.com/ljharb/call-bind/commit/23bd718a288d3b03042062b4ef5153b3cea83f11)
|
||||
- [actions] update codecov uploader [`62552d7`](https://github.com/ljharb/call-bind/commit/62552d79cc79e05825e99aaba134ae5b37f33da5)
|
||||
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `tape` [`ec81665`](https://github.com/ljharb/call-bind/commit/ec81665b300f87eabff597afdc8b8092adfa7afd)
|
||||
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `safe-publish-latest`, `tape` [`35d67fc`](https://github.com/ljharb/call-bind/commit/35d67fcea883e686650f736f61da5ddca2592de8)
|
||||
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `tape` [`0266d8d`](https://github.com/ljharb/call-bind/commit/0266d8d2a45086a922db366d0c2932fa463662ff)
|
||||
- [Dev Deps] update `@ljharb/eslint-config`, `aud`, `tape` [`43a5b28`](https://github.com/ljharb/call-bind/commit/43a5b28a444e710e1bbf92adb8afb5cf7523a223)
|
||||
- [Deps] update `define-data-property`, `function-bind`, `get-intrinsic` [`780eb36`](https://github.com/ljharb/call-bind/commit/780eb36552514f8cc99c70821ce698697c2726a5)
|
||||
- [Dev Deps] update `aud`, `tape` [`90d50ad`](https://github.com/ljharb/call-bind/commit/90d50ad03b061e0268b3380b0065fcaec183dc05)
|
||||
- [meta] use `prepublishOnly` script for npm 7+ [`44c5433`](https://github.com/ljharb/call-bind/commit/44c5433b7980e02b4870007046407cf6fc543329)
|
||||
- [Deps] update `get-intrinsic` [`86bfbfc`](https://github.com/ljharb/call-bind/commit/86bfbfcf34afdc6eabc93ce3d408548d0e27d958)
|
||||
- [Deps] update `get-intrinsic` [`5c53354`](https://github.com/ljharb/call-bind/commit/5c5335489be0294c18cd7a8bb6e08226ee019ff5)
|
||||
- [actions] update checkout action [`4c393a8`](https://github.com/ljharb/call-bind/commit/4c393a8173b3c8e5b30d5b3297b3b94d48bf87f3)
|
||||
- [Deps] update `get-intrinsic` [`4e70bde`](https://github.com/ljharb/call-bind/commit/4e70bdec0626acb11616d66250fc14565e716e91)
|
||||
- [Deps] update `get-intrinsic` [`55ae803`](https://github.com/ljharb/call-bind/commit/55ae803a920bd93c369cd798c20de31f91e9fc60)
|
||||
|
||||
## [v1.0.2](https://github.com/ljharb/call-bind/compare/v1.0.1...v1.0.2) - 2021-01-11
|
||||
|
||||
### Commits
|
||||
|
|
64
node_modules/call-bind/README.md
generated
vendored
|
@ -1,2 +1,64 @@
|
|||
# call-bind
|
||||
# call-bind <sup>[![Version Badge][npm-version-svg]][package-url]</sup>
|
||||
|
||||
[![github actions][actions-image]][actions-url]
|
||||
[![coverage][codecov-image]][codecov-url]
|
||||
[![dependency status][deps-svg]][deps-url]
|
||||
[![dev dependency status][dev-deps-svg]][dev-deps-url]
|
||||
[![License][license-image]][license-url]
|
||||
[![Downloads][downloads-image]][downloads-url]
|
||||
|
||||
[![npm badge][npm-badge-png]][package-url]
|
||||
|
||||
Robustly `.call.bind()` a function.
|
||||
|
||||
## Getting started
|
||||
|
||||
```sh
|
||||
npm install --save call-bind
|
||||
```
|
||||
|
||||
## Usage/Examples
|
||||
|
||||
```js
|
||||
const assert = require('assert');
|
||||
const callBind = require('call-bind');
|
||||
const callBound = require('call-bind/callBound');
|
||||
|
||||
function f(a, b) {
|
||||
assert.equal(this, 1);
|
||||
assert.equal(a, 2);
|
||||
assert.equal(b, 3);
|
||||
assert.equal(arguments.length, 2);
|
||||
}
|
||||
|
||||
const fBound = callBind(f);
|
||||
|
||||
const slice = callBound('Array.prototype.slice');
|
||||
|
||||
delete Function.prototype.call;
|
||||
delete Function.prototype.bind;
|
||||
|
||||
fBound(1, 2, 3);
|
||||
|
||||
assert.deepEqual(slice([1, 2, 3, 4], 1, -1), [2, 3]);
|
||||
```
|
||||
|
||||
## Tests
|
||||
|
||||
Clone the repo, `npm install`, and run `npm test`
|
||||
|
||||
[package-url]: https://npmjs.org/package/call-bind
|
||||
[npm-version-svg]: https://versionbadg.es/ljharb/call-bind.svg
|
||||
[deps-svg]: https://david-dm.org/ljharb/call-bind.svg
|
||||
[deps-url]: https://david-dm.org/ljharb/call-bind
|
||||
[dev-deps-svg]: https://david-dm.org/ljharb/call-bind/dev-status.svg
|
||||
[dev-deps-url]: https://david-dm.org/ljharb/call-bind#info=devDependencies
|
||||
[npm-badge-png]: https://nodei.co/npm/call-bind.png?downloads=true&stars=true
|
||||
[license-image]: https://img.shields.io/npm/l/call-bind.svg
|
||||
[license-url]: LICENSE
|
||||
[downloads-image]: https://img.shields.io/npm/dm/call-bind.svg
|
||||
[downloads-url]: https://npm-stat.com/charts.html?package=call-bind
|
||||
[codecov-image]: https://codecov.io/gh/ljharb/call-bind/branch/main/graphs/badge.svg
|
||||
[codecov-url]: https://app.codecov.io/gh/ljharb/call-bind/
|
||||
[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/ljharb/call-bind
|
||||
[actions-url]: https://github.com/ljharb/call-bind/actions
|
||||
|
|
30
node_modules/call-bind/index.js
generated
vendored
|
@ -2,38 +2,26 @@
|
|||
|
||||
var bind = require('function-bind');
|
||||
var GetIntrinsic = require('get-intrinsic');
|
||||
var setFunctionLength = require('set-function-length');
|
||||
|
||||
var $TypeError = require('es-errors/type');
|
||||
var $apply = GetIntrinsic('%Function.prototype.apply%');
|
||||
var $call = GetIntrinsic('%Function.prototype.call%');
|
||||
var $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply);
|
||||
|
||||
var $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true);
|
||||
var $defineProperty = GetIntrinsic('%Object.defineProperty%', true);
|
||||
var $defineProperty = require('es-define-property');
|
||||
var $max = GetIntrinsic('%Math.max%');
|
||||
|
||||
if ($defineProperty) {
|
||||
try {
|
||||
$defineProperty({}, 'a', { value: 1 });
|
||||
} catch (e) {
|
||||
// IE 8 has a broken defineProperty
|
||||
$defineProperty = null;
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = function callBind(originalFunction) {
|
||||
if (typeof originalFunction !== 'function') {
|
||||
throw new $TypeError('a function is required');
|
||||
}
|
||||
var func = $reflectApply(bind, $call, arguments);
|
||||
if ($gOPD && $defineProperty) {
|
||||
var desc = $gOPD(func, 'length');
|
||||
if (desc.configurable) {
|
||||
// original length, plus the receiver, minus any additional arguments (after the receiver)
|
||||
$defineProperty(
|
||||
return setFunctionLength(
|
||||
func,
|
||||
'length',
|
||||
{ value: 1 + $max(0, originalFunction.length - (arguments.length - 1)) }
|
||||
1 + $max(0, originalFunction.length - (arguments.length - 1)),
|
||||
true
|
||||
);
|
||||
}
|
||||
}
|
||||
return func;
|
||||
};
|
||||
|
||||
var applyBind = function applyBind() {
|
||||
|
|
151
node_modules/call-bind/package.json
generated
vendored
|
@ -1,77 +1,30 @@
|
|||
{
|
||||
"_from": "call-bind@^1.0.0",
|
||||
"_id": "call-bind@1.0.2",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==",
|
||||
"_location": "/call-bind",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "range",
|
||||
"registry": true,
|
||||
"raw": "call-bind@^1.0.0",
|
||||
"name": "call-bind",
|
||||
"escapedName": "call-bind",
|
||||
"rawSpec": "^1.0.0",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "^1.0.0"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/side-channel"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz",
|
||||
"_shasum": "b1d4e89e688119c3c9a903ad30abb2f6a919be3c",
|
||||
"_spec": "call-bind@^1.0.0",
|
||||
"_where": "/home/ubuntu/formidable/node_modules/side-channel",
|
||||
"author": {
|
||||
"name": "Jordan Harband",
|
||||
"email": "ljharb@gmail.com"
|
||||
},
|
||||
"auto-changelog": {
|
||||
"output": "CHANGELOG.md",
|
||||
"template": "keepachangelog",
|
||||
"unreleased": false,
|
||||
"commitLimit": false,
|
||||
"backfillLimit": false,
|
||||
"hideCredit": true
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/ljharb/call-bind/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"dependencies": {
|
||||
"function-bind": "^1.1.1",
|
||||
"get-intrinsic": "^1.0.2"
|
||||
},
|
||||
"deprecated": false,
|
||||
"version": "1.0.7",
|
||||
"description": "Robustly `.call.bind()` a function",
|
||||
"devDependencies": {
|
||||
"@ljharb/eslint-config": "^17.3.0",
|
||||
"aud": "^1.1.3",
|
||||
"auto-changelog": "^2.2.1",
|
||||
"eslint": "^7.17.0",
|
||||
"nyc": "^10.3.2",
|
||||
"safe-publish-latest": "^1.1.4",
|
||||
"tape": "^5.1.1"
|
||||
},
|
||||
"main": "index.js",
|
||||
"exports": {
|
||||
".": [
|
||||
{
|
||||
"default": "./index.js"
|
||||
},
|
||||
"./index.js"
|
||||
],
|
||||
"./callBound": [
|
||||
{
|
||||
"default": "./callBound.js"
|
||||
},
|
||||
"./callBound.js"
|
||||
],
|
||||
".": "./index.js",
|
||||
"./callBound": "./callBound.js",
|
||||
"./package.json": "./package.json"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
"scripts": {
|
||||
"prepack": "npmignore --auto --commentLines=auto",
|
||||
"prepublish": "not-in-publish || npm run prepublishOnly",
|
||||
"prepublishOnly": "safe-publish-latest",
|
||||
"lint": "eslint --ext=.js,.mjs .",
|
||||
"postlint": "evalmd README.md",
|
||||
"pretest": "npm run lint",
|
||||
"tests-only": "nyc tape 'test/**/*.js'",
|
||||
"test": "npm run tests-only",
|
||||
"posttest": "aud --production",
|
||||
"version": "auto-changelog && git add CHANGELOG.md",
|
||||
"postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\""
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/ljharb/call-bind.git"
|
||||
},
|
||||
"homepage": "https://github.com/ljharb/call-bind#readme",
|
||||
"keywords": [
|
||||
"javascript",
|
||||
"ecmascript",
|
||||
|
@ -87,22 +40,56 @@
|
|||
"function",
|
||||
"es-abstract"
|
||||
],
|
||||
"author": "Jordan Harband <ljharb@gmail.com>",
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
},
|
||||
"license": "MIT",
|
||||
"main": "index.js",
|
||||
"name": "call-bind",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/ljharb/call-bind.git"
|
||||
"bugs": {
|
||||
"url": "https://github.com/ljharb/call-bind/issues"
|
||||
},
|
||||
"scripts": {
|
||||
"lint": "eslint --ext=.js,.mjs .",
|
||||
"posttest": "aud --production",
|
||||
"postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"",
|
||||
"prepublish": "safe-publish-latest",
|
||||
"pretest": "npm run lint",
|
||||
"test": "npm run tests-only",
|
||||
"tests-only": "nyc tape 'test/*'",
|
||||
"version": "auto-changelog && git add CHANGELOG.md"
|
||||
"homepage": "https://github.com/ljharb/call-bind#readme",
|
||||
"devDependencies": {
|
||||
"@ljharb/eslint-config": "^21.1.0",
|
||||
"aud": "^2.0.4",
|
||||
"auto-changelog": "^2.4.0",
|
||||
"es-value-fixtures": "^1.4.2",
|
||||
"eslint": "=8.8.0",
|
||||
"evalmd": "^0.0.19",
|
||||
"for-each": "^0.3.3",
|
||||
"gopd": "^1.0.1",
|
||||
"has-strict-mode": "^1.0.1",
|
||||
"in-publish": "^2.0.1",
|
||||
"npmignore": "^0.3.1",
|
||||
"nyc": "^10.3.2",
|
||||
"object-inspect": "^1.13.1",
|
||||
"safe-publish-latest": "^2.0.0",
|
||||
"tape": "^5.7.4"
|
||||
},
|
||||
"version": "1.0.2"
|
||||
"dependencies": {
|
||||
"es-define-property": "^1.0.0",
|
||||
"es-errors": "^1.3.0",
|
||||
"function-bind": "^1.1.2",
|
||||
"get-intrinsic": "^1.2.4",
|
||||
"set-function-length": "^1.2.1"
|
||||
},
|
||||
"testling": {
|
||||
"files": "test/index.js"
|
||||
},
|
||||
"auto-changelog": {
|
||||
"output": "CHANGELOG.md",
|
||||
"template": "keepachangelog",
|
||||
"unreleased": false,
|
||||
"commitLimit": false,
|
||||
"backfillLimit": false,
|
||||
"hideCredit": true
|
||||
},
|
||||
"publishConfig": {
|
||||
"ignore": [
|
||||
".github/workflows"
|
||||
]
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
}
|
||||
}
|
||||
|
|
1
node_modules/call-bind/test/callBound.js
generated
vendored
|
@ -40,7 +40,6 @@ test('callBound', function (t) {
|
|||
'allowMissing arg still throws for unknown intrinsic'
|
||||
);
|
||||
|
||||
/* globals WeakRef: false */
|
||||
t.test('real but absent intrinsic', { skip: typeof WeakRef !== 'undefined' }, function (st) {
|
||||
st['throws'](
|
||||
function () { callBound('WeakRef'); },
|
||||
|
|
22
node_modules/call-bind/test/index.js
generated
vendored
|
@ -2,6 +2,11 @@
|
|||
|
||||
var callBind = require('../');
|
||||
var bind = require('function-bind');
|
||||
var gOPD = require('gopd');
|
||||
var hasStrictMode = require('has-strict-mode')();
|
||||
var forEach = require('for-each');
|
||||
var inspect = require('object-inspect');
|
||||
var v = require('es-value-fixtures');
|
||||
|
||||
var test = require('tape');
|
||||
|
||||
|
@ -10,15 +15,24 @@ var test = require('tape');
|
|||
* in io.js v3, it is configurable except on bound functions, hence the .bind()
|
||||
*/
|
||||
var functionsHaveConfigurableLengths = !!(
|
||||
Object.getOwnPropertyDescriptor
|
||||
gOPD
|
||||
&& Object.getOwnPropertyDescriptor
|
||||
&& Object.getOwnPropertyDescriptor(bind.call(function () {}), 'length').configurable
|
||||
);
|
||||
|
||||
test('callBind', function (t) {
|
||||
forEach(v.nonFunctions, function (nonFunction) {
|
||||
t['throws'](
|
||||
function () { callBind(nonFunction); },
|
||||
TypeError,
|
||||
inspect(nonFunction) + ' is not a function'
|
||||
);
|
||||
});
|
||||
|
||||
var sentinel = { sentinel: true };
|
||||
var func = function (a, b) {
|
||||
// eslint-disable-next-line no-invalid-this
|
||||
return [this, a, b];
|
||||
return [!hasStrictMode && this === global ? undefined : this, a, b];
|
||||
};
|
||||
t.equal(func.length, 2, 'original function length is 2');
|
||||
t.deepEqual(func(), [undefined, undefined, undefined], 'unbound func with too few args');
|
||||
|
@ -28,8 +42,8 @@ test('callBind', function (t) {
|
|||
var bound = callBind(func);
|
||||
t.equal(bound.length, func.length + 1, 'function length is preserved', { skip: !functionsHaveConfigurableLengths });
|
||||
t.deepEqual(bound(), [undefined, undefined, undefined], 'bound func with too few args');
|
||||
t.deepEqual(bound(1, 2), [1, 2, undefined], 'bound func with right args');
|
||||
t.deepEqual(bound(1, 2, 3), [1, 2, 3], 'bound func with too many args');
|
||||
t.deepEqual(bound(1, 2), [hasStrictMode ? 1 : Object(1), 2, undefined], 'bound func with right args');
|
||||
t.deepEqual(bound(1, 2, 3), [hasStrictMode ? 1 : Object(1), 2, 3], 'bound func with too many args');
|
||||
|
||||
var boundR = callBind(func, sentinel);
|
||||
t.equal(boundR.length, func.length, 'function length is preserved', { skip: !functionsHaveConfigurableLengths });
|
||||
|
|
24
node_modules/define-data-property/.eslintrc
generated
vendored
Normal file
|
@ -0,0 +1,24 @@
|
|||
{
|
||||
"root": true,
|
||||
|
||||
"extends": "@ljharb",
|
||||
|
||||
"rules": {
|
||||
"complexity": 0,
|
||||
"id-length": 0,
|
||||
"new-cap": ["error", {
|
||||
"capIsNewExceptions": [
|
||||
"GetIntrinsic",
|
||||
],
|
||||
}],
|
||||
},
|
||||
|
||||
"overrides": [
|
||||
{
|
||||
"files": "test/**",
|
||||
"rules": {
|
||||
"max-lines-per-function": "off",
|
||||
},
|
||||
},
|
||||
],
|
||||
}
|
12
node_modules/define-data-property/.github/FUNDING.yml
generated
vendored
Normal file
|
@ -0,0 +1,12 @@
|
|||
# These are supported funding model platforms
|
||||
|
||||
github: [ljharb]
|
||||
patreon: # Replace with a single Patreon username
|
||||
open_collective: # Replace with a single Open Collective username
|
||||
ko_fi: # Replace with a single Ko-fi username
|
||||
tidelift: npm/define-data-property
|
||||
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
|
||||
liberapay: # Replace with a single Liberapay username
|
||||
issuehunt: # Replace with a single IssueHunt username
|
||||
otechie: # Replace with a single Otechie username
|
||||
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
|
13
node_modules/define-data-property/.nycrc
generated
vendored
Normal file
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
"all": true,
|
||||
"check-coverage": false,
|
||||
"reporter": ["text-summary", "text", "html", "json"],
|
||||
"lines": 86,
|
||||
"statements": 85.93,
|
||||
"functions": 82.43,
|
||||
"branches": 76.06,
|
||||
"exclude": [
|
||||
"coverage",
|
||||
"test"
|
||||
]
|
||||
}
|
70
node_modules/define-data-property/CHANGELOG.md
generated
vendored
Normal file
|
@ -0,0 +1,70 @@
|
|||
# Changelog
|
||||
|
||||
All notable changes to this project will be documented in this file.
|
||||
|
||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
|
||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## [v1.1.4](https://github.com/ljharb/define-data-property/compare/v1.1.3...v1.1.4) - 2024-02-13
|
||||
|
||||
### Commits
|
||||
|
||||
- [Refactor] use `es-define-property` [`90f2f4c`](https://github.com/ljharb/define-data-property/commit/90f2f4cc20298401e71c28e1e08888db12021453)
|
||||
- [Dev Deps] update `@types/object.getownpropertydescriptors` [`cd929d9`](https://github.com/ljharb/define-data-property/commit/cd929d9a04f5f2fdcfa9d5be140940b91a083153)
|
||||
|
||||
## [v1.1.3](https://github.com/ljharb/define-data-property/compare/v1.1.2...v1.1.3) - 2024-02-12
|
||||
|
||||
### Commits
|
||||
|
||||
- [types] hand-write d.ts instead of emitting it [`0cbc988`](https://github.com/ljharb/define-data-property/commit/0cbc988203c105f2d97948327c7167ebd33bd318)
|
||||
- [meta] simplify `exports` [`690781e`](https://github.com/ljharb/define-data-property/commit/690781eed28bbf2d6766237efda0ba6dd591609e)
|
||||
- [Dev Deps] update `hasown`; clean up DT packages [`6cdfd1c`](https://github.com/ljharb/define-data-property/commit/6cdfd1cb2d91d791bfd18cda5d5cab232fd5d8fc)
|
||||
- [actions] cleanup [`3142bc6`](https://github.com/ljharb/define-data-property/commit/3142bc6a4bc406a51f5b04f31e98562a27f35ffd)
|
||||
- [meta] add `funding` [`8474423`](https://github.com/ljharb/define-data-property/commit/847442391a79779af3e0f1bf0b5bb923552b7804)
|
||||
- [Deps] update `get-intrinsic` [`3e9be00`](https://github.com/ljharb/define-data-property/commit/3e9be00e07784ba34e7c77d8bc0fdbc832ad61de)
|
||||
|
||||
## [v1.1.2](https://github.com/ljharb/define-data-property/compare/v1.1.1...v1.1.2) - 2024-02-05
|
||||
|
||||
### Commits
|
||||
|
||||
- [Dev Deps] update @types packages, `object-inspect`, `tape`, `typescript` [`df41bf8`](https://github.com/ljharb/define-data-property/commit/df41bf84ca3456be6226055caab44e38e3a7fd2f)
|
||||
- [Dev Deps] update DT packages, `aud`, `npmignore`, `tape`, typescript` [`fab0e4e`](https://github.com/ljharb/define-data-property/commit/fab0e4ec709ee02b79f42d6db3ee5f26e0a34b8a)
|
||||
- [Dev Deps] use `hasown` instead of `has` [`aa51ef9`](https://github.com/ljharb/define-data-property/commit/aa51ef93f6403d49d9bb72a807bcdb6e418978c0)
|
||||
- [Refactor] use `es-errors`, so things that only need those do not need `get-intrinsic` [`d89be50`](https://github.com/ljharb/define-data-property/commit/d89be50571175888d391238605122679f7e65ffc)
|
||||
- [Deps] update `has-property-descriptors` [`7af887c`](https://github.com/ljharb/define-data-property/commit/7af887c9083b59b195b0079e04815cfed9fcee2b)
|
||||
- [Deps] update `get-intrinsic` [`bb8728e`](https://github.com/ljharb/define-data-property/commit/bb8728ec42cd998505a7157ae24853a560c20646)
|
||||
|
||||
## [v1.1.1](https://github.com/ljharb/define-data-property/compare/v1.1.0...v1.1.1) - 2023-10-12
|
||||
|
||||
### Commits
|
||||
|
||||
- [Tests] fix tests in ES3 engines [`5c6920e`](https://github.com/ljharb/define-data-property/commit/5c6920edd1f52f675b02f417e539c28135b43f94)
|
||||
- [Dev Deps] update `@types/es-value-fixtures`, `@types/for-each`, `@types/gopd`, `@types/has-property-descriptors`, `tape`, `typescript` [`7d82dfc`](https://github.com/ljharb/define-data-property/commit/7d82dfc20f778b4465bba06335dd53f6f431aea3)
|
||||
- [Fix] IE 8 has a broken `Object.defineProperty` [`0672e1a`](https://github.com/ljharb/define-data-property/commit/0672e1af2a9fcc787e7c23b96dea60d290df5548)
|
||||
- [meta] emit types on prepack [`73acb1f`](https://github.com/ljharb/define-data-property/commit/73acb1f903c21b314ec7156bf10f73c7910530c0)
|
||||
- [Dev Deps] update `tape`, `typescript` [`9489a77`](https://github.com/ljharb/define-data-property/commit/9489a7738bf2ecf0ac71d5b78ec4ca6ad7ba0142)
|
||||
|
||||
## [v1.1.0](https://github.com/ljharb/define-data-property/compare/v1.0.1...v1.1.0) - 2023-09-13
|
||||
|
||||
### Commits
|
||||
|
||||
- [New] add `loose` arg [`155235a`](https://github.com/ljharb/define-data-property/commit/155235a4c4d7741f6de01cd87c99599a56654b72)
|
||||
- [New] allow `null` to be passed for the non* args [`7d2fa5f`](https://github.com/ljharb/define-data-property/commit/7d2fa5f06be0392736c13b126f7cd38979f34792)
|
||||
|
||||
## [v1.0.1](https://github.com/ljharb/define-data-property/compare/v1.0.0...v1.0.1) - 2023-09-12
|
||||
|
||||
### Commits
|
||||
|
||||
- [meta] add TS types [`43d763c`](https://github.com/ljharb/define-data-property/commit/43d763c6c883f652de1c9c02ef6216ee507ffa69)
|
||||
- [Dev Deps] update `@types/tape`, `typescript` [`f444985`](https://github.com/ljharb/define-data-property/commit/f444985811c36f3e6448a03ad2f9b7898917f4c7)
|
||||
- [meta] add `safe-publish-latest`, [`172bb10`](https://github.com/ljharb/define-data-property/commit/172bb10890896ebb160e64398f6ee55760107bee)
|
||||
|
||||
## v1.0.0 - 2023-09-12
|
||||
|
||||
### Commits
|
||||
|
||||
- Initial implementation, tests, readme [`5b43d6b`](https://github.com/ljharb/define-data-property/commit/5b43d6b44e675a904810467a7d4e0adb7efc3196)
|
||||
- Initial commit [`35e577a`](https://github.com/ljharb/define-data-property/commit/35e577a6ba59a98befa97776d70d90f3bea9009d)
|
||||
- npm init [`82a0a04`](https://github.com/ljharb/define-data-property/commit/82a0a04a321ca7de220af02d41e2745e8a9962ed)
|
||||
- Only apps should have lockfiles [`96df244`](https://github.com/ljharb/define-data-property/commit/96df244a3c6f426f9a2437be825d1c6f5dd7158e)
|
||||
- [meta] use `npmignore` to autogenerate an npmignore file [`a87ff18`](https://github.com/ljharb/define-data-property/commit/a87ff18cb79e14c2eb5720486c4759fd9a189375)
|
21
node_modules/define-data-property/LICENSE
generated
vendored
Normal file
|
@ -0,0 +1,21 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) 2023 Jordan Harband
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
67
node_modules/define-data-property/README.md
generated
vendored
Normal file
|
@ -0,0 +1,67 @@
|
|||
# define-data-property <sup>[![Version Badge][npm-version-svg]][package-url]</sup>
|
||||
|
||||
[![github actions][actions-image]][actions-url]
|
||||
[![coverage][codecov-image]][codecov-url]
|
||||
[![License][license-image]][license-url]
|
||||
[![Downloads][downloads-image]][downloads-url]
|
||||
|
||||
[![npm badge][npm-badge-png]][package-url]
|
||||
|
||||
Define a data property on an object. Will fall back to assignment in an engine without descriptors.
|
||||
|
||||
The three `non*` argument can also be passed `null`, which will use the existing state if available.
|
||||
|
||||
The `loose` argument will mean that if you attempt to set a non-normal data property, in an environment without descriptor support, it will fall back to normal assignment.
|
||||
|
||||
## Usage
|
||||
|
||||
```javascript
|
||||
var defineDataProperty = require('define-data-property');
|
||||
var assert = require('assert');
|
||||
|
||||
var obj = {};
|
||||
defineDataProperty(obj, 'key', 'value');
|
||||
defineDataProperty(
|
||||
obj,
|
||||
'key2',
|
||||
'value',
|
||||
true, // nonEnumerable, optional
|
||||
false, // nonWritable, optional
|
||||
true, // nonConfigurable, optional
|
||||
false // loose, optional
|
||||
);
|
||||
|
||||
assert.deepEqual(
|
||||
Object.getOwnPropertyDescriptors(obj),
|
||||
{
|
||||
key: {
|
||||
configurable: true,
|
||||
enumerable: true,
|
||||
value: 'value',
|
||||
writable: true,
|
||||
},
|
||||
key2: {
|
||||
configurable: false,
|
||||
enumerable: false,
|
||||
value: 'value',
|
||||
writable: true,
|
||||
},
|
||||
}
|
||||
);
|
||||
```
|
||||
|
||||
[package-url]: https://npmjs.org/package/define-data-property
|
||||
[npm-version-svg]: https://versionbadg.es/ljharb/define-data-property.svg
|
||||
[deps-svg]: https://david-dm.org/ljharb/define-data-property.svg
|
||||
[deps-url]: https://david-dm.org/ljharb/define-data-property
|
||||
[dev-deps-svg]: https://david-dm.org/ljharb/define-data-property/dev-status.svg
|
||||
[dev-deps-url]: https://david-dm.org/ljharb/define-data-property#info=devDependencies
|
||||
[npm-badge-png]: https://nodei.co/npm/define-data-property.png?downloads=true&stars=true
|
||||
[license-image]: https://img.shields.io/npm/l/define-data-property.svg
|
||||
[license-url]: LICENSE
|
||||
[downloads-image]: https://img.shields.io/npm/dm/define-data-property.svg
|
||||
[downloads-url]: https://npm-stat.com/charts.html?package=define-data-property
|
||||
[codecov-image]: https://codecov.io/gh/ljharb/define-data-property/branch/main/graphs/badge.svg
|
||||
[codecov-url]: https://app.codecov.io/gh/ljharb/define-data-property/
|
||||
[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/ljharb/define-data-property
|
||||
[actions-url]: https://github.com/ljharb/define-data-property/actions
|
12
node_modules/define-data-property/index.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,12 @@
|
|||
|
||||
declare function defineDataProperty(
|
||||
obj: Record<PropertyKey, unknown>,
|
||||
property: keyof typeof obj,
|
||||
value: typeof obj[typeof property],
|
||||
nonEnumerable?: boolean | null,
|
||||
nonWritable?: boolean | null,
|
||||
nonConfigurable?: boolean | null,
|
||||
loose?: boolean
|
||||
): void;
|
||||
|
||||
export = defineDataProperty;
|
56
node_modules/define-data-property/index.js
generated
vendored
Normal file
|
@ -0,0 +1,56 @@
|
|||
'use strict';
|
||||
|
||||
var $defineProperty = require('es-define-property');
|
||||
|
||||
var $SyntaxError = require('es-errors/syntax');
|
||||
var $TypeError = require('es-errors/type');
|
||||
|
||||
var gopd = require('gopd');
|
||||
|
||||
/** @type {import('.')} */
|
||||
module.exports = function defineDataProperty(
|
||||
obj,
|
||||
property,
|
||||
value
|
||||
) {
|
||||
if (!obj || (typeof obj !== 'object' && typeof obj !== 'function')) {
|
||||
throw new $TypeError('`obj` must be an object or a function`');
|
||||
}
|
||||
if (typeof property !== 'string' && typeof property !== 'symbol') {
|
||||
throw new $TypeError('`property` must be a string or a symbol`');
|
||||
}
|
||||
if (arguments.length > 3 && typeof arguments[3] !== 'boolean' && arguments[3] !== null) {
|
||||
throw new $TypeError('`nonEnumerable`, if provided, must be a boolean or null');
|
||||
}
|
||||
if (arguments.length > 4 && typeof arguments[4] !== 'boolean' && arguments[4] !== null) {
|
||||
throw new $TypeError('`nonWritable`, if provided, must be a boolean or null');
|
||||
}
|
||||
if (arguments.length > 5 && typeof arguments[5] !== 'boolean' && arguments[5] !== null) {
|
||||
throw new $TypeError('`nonConfigurable`, if provided, must be a boolean or null');
|
||||
}
|
||||
if (arguments.length > 6 && typeof arguments[6] !== 'boolean') {
|
||||
throw new $TypeError('`loose`, if provided, must be a boolean');
|
||||
}
|
||||
|
||||
var nonEnumerable = arguments.length > 3 ? arguments[3] : null;
|
||||
var nonWritable = arguments.length > 4 ? arguments[4] : null;
|
||||
var nonConfigurable = arguments.length > 5 ? arguments[5] : null;
|
||||
var loose = arguments.length > 6 ? arguments[6] : false;
|
||||
|
||||
/* @type {false | TypedPropertyDescriptor<unknown>} */
|
||||
var desc = !!gopd && gopd(obj, property);
|
||||
|
||||
if ($defineProperty) {
|
||||
$defineProperty(obj, property, {
|
||||
configurable: nonConfigurable === null && desc ? desc.configurable : !nonConfigurable,
|
||||
enumerable: nonEnumerable === null && desc ? desc.enumerable : !nonEnumerable,
|
||||
value: value,
|
||||
writable: nonWritable === null && desc ? desc.writable : !nonWritable
|
||||
});
|
||||
} else if (loose || (!nonEnumerable && !nonWritable && !nonConfigurable)) {
|
||||
// must fall back to [[Set]], and was not explicitly asked to make non-enumerable, non-writable, or non-configurable
|
||||
obj[property] = value; // eslint-disable-line no-param-reassign
|
||||
} else {
|
||||
throw new $SyntaxError('This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.');
|
||||
}
|
||||
};
|
106
node_modules/define-data-property/package.json
generated
vendored
Normal file
|
@ -0,0 +1,106 @@
|
|||
{
|
||||
"name": "define-data-property",
|
||||
"version": "1.1.4",
|
||||
"description": "Define a data property on an object. Will fall back to assignment in an engine without descriptors.",
|
||||
"main": "index.js",
|
||||
"types": "./index.d.ts",
|
||||
"exports": {
|
||||
".": "./index.js",
|
||||
"./package.json": "./package.json"
|
||||
},
|
||||
"sideEffects": false,
|
||||
"scripts": {
|
||||
"prepack": "npmignore --auto --commentLines=autogenerated",
|
||||
"prepublish": "not-in-publish || npm run prepublishOnly",
|
||||
"prepublishOnly": "safe-publish-latest",
|
||||
"tsc": "tsc -p .",
|
||||
"prelint": "evalmd README.md",
|
||||
"lint": "eslint --ext=js,mjs .",
|
||||
"postlint": "npm run tsc",
|
||||
"pretest": "npm run lint",
|
||||
"tests-only": "nyc tape 'test/**/*.js'",
|
||||
"test": "npm run tests-only",
|
||||
"posttest": "aud --production",
|
||||
"version": "auto-changelog && git add CHANGELOG.md",
|
||||
"postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\""
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/ljharb/define-data-property.git"
|
||||
},
|
||||
"keywords": [
|
||||
"define",
|
||||
"data",
|
||||
"property",
|
||||
"object",
|
||||
"accessor",
|
||||
"javascript",
|
||||
"ecmascript",
|
||||
"enumerable",
|
||||
"configurable",
|
||||
"writable"
|
||||
],
|
||||
"author": "Jordan Harband <ljharb@gmail.com>",
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
},
|
||||
"license": "MIT",
|
||||
"bugs": {
|
||||
"url": "https://github.com/ljharb/define-data-property/issues"
|
||||
},
|
||||
"homepage": "https://github.com/ljharb/define-data-property#readme",
|
||||
"dependencies": {
|
||||
"es-define-property": "^1.0.0",
|
||||
"es-errors": "^1.3.0",
|
||||
"gopd": "^1.0.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@ljharb/eslint-config": "^21.1.0",
|
||||
"@types/call-bind": "^1.0.5",
|
||||
"@types/define-properties": "^1.1.5",
|
||||
"@types/es-value-fixtures": "^1.4.4",
|
||||
"@types/for-each": "^0.3.3",
|
||||
"@types/get-intrinsic": "^1.2.2",
|
||||
"@types/gopd": "^1.0.3",
|
||||
"@types/has-property-descriptors": "^1.0.3",
|
||||
"@types/object-inspect": "^1.8.4",
|
||||
"@types/object.getownpropertydescriptors": "^2.1.4",
|
||||
"@types/tape": "^5.6.4",
|
||||
"aud": "^2.0.4",
|
||||
"auto-changelog": "^2.4.0",
|
||||
"es-value-fixtures": "^1.4.2",
|
||||
"eslint": "=8.8.0",
|
||||
"evalmd": "^0.0.19",
|
||||
"for-each": "^0.3.3",
|
||||
"hasown": "^2.0.1",
|
||||
"in-publish": "^2.0.1",
|
||||
"npmignore": "^0.3.1",
|
||||
"nyc": "^10.3.2",
|
||||
"object-inspect": "^1.13.1",
|
||||
"object.getownpropertydescriptors": "^2.1.7",
|
||||
"reflect.ownkeys": "^1.1.4",
|
||||
"safe-publish-latest": "^2.0.0",
|
||||
"tape": "^5.7.4",
|
||||
"typescript": "next"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
},
|
||||
"testling": {
|
||||
"files": "test/index.js"
|
||||
},
|
||||
"auto-changelog": {
|
||||
"output": "CHANGELOG.md",
|
||||
"template": "keepachangelog",
|
||||
"unreleased": false,
|
||||
"commitLimit": false,
|
||||
"backfillLimit": false,
|
||||
"hideCredit": true
|
||||
},
|
||||
"publishConfig": {
|
||||
"ignore": [
|
||||
".github/workflows",
|
||||
"types/reflect.ownkeys"
|
||||
]
|
||||
}
|
||||
}
|
392
node_modules/define-data-property/test/index.js
generated
vendored
Normal file
|
@ -0,0 +1,392 @@
|
|||
'use strict';
|
||||
|
||||
var test = require('tape');
|
||||
var v = require('es-value-fixtures');
|
||||
var forEach = require('for-each');
|
||||
var inspect = require('object-inspect');
|
||||
var hasOwn = require('hasown');
|
||||
var hasPropertyDescriptors = require('has-property-descriptors')();
|
||||
var getOwnPropertyDescriptors = require('object.getownpropertydescriptors');
|
||||
var ownKeys = require('reflect.ownkeys');
|
||||
|
||||
var defineDataProperty = require('../');
|
||||
|
||||
test('defineDataProperty', function (t) {
|
||||
t.test('argument validation', function (st) {
|
||||
forEach(v.primitives, function (nonObject) {
|
||||
st['throws'](
|
||||
// @ts-expect-error
|
||||
function () { defineDataProperty(nonObject, 'key', 'value'); },
|
||||
TypeError,
|
||||
'throws on non-object input: ' + inspect(nonObject)
|
||||
);
|
||||
});
|
||||
|
||||
forEach(v.nonPropertyKeys, function (nonPropertyKey) {
|
||||
st['throws'](
|
||||
// @ts-expect-error
|
||||
function () { defineDataProperty({}, nonPropertyKey, 'value'); },
|
||||
TypeError,
|
||||
'throws on non-PropertyKey input: ' + inspect(nonPropertyKey)
|
||||
);
|
||||
});
|
||||
|
||||
forEach(v.nonBooleans, function (nonBoolean) {
|
||||
if (nonBoolean !== null) {
|
||||
st['throws'](
|
||||
// @ts-expect-error
|
||||
function () { defineDataProperty({}, 'key', 'value', nonBoolean); },
|
||||
TypeError,
|
||||
'throws on non-boolean nonEnumerable: ' + inspect(nonBoolean)
|
||||
);
|
||||
|
||||
st['throws'](
|
||||
// @ts-expect-error
|
||||
function () { defineDataProperty({}, 'key', 'value', false, nonBoolean); },
|
||||
TypeError,
|
||||
'throws on non-boolean nonWritable: ' + inspect(nonBoolean)
|
||||
);
|
||||
|
||||
st['throws'](
|
||||
// @ts-expect-error
|
||||
function () { defineDataProperty({}, 'key', 'value', false, false, nonBoolean); },
|
||||
TypeError,
|
||||
'throws on non-boolean nonConfigurable: ' + inspect(nonBoolean)
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
st.end();
|
||||
});
|
||||
|
||||
t.test('normal data property', function (st) {
|
||||
/** @type {Record<PropertyKey, string>} */
|
||||
var obj = { existing: 'existing property' };
|
||||
st.ok(hasOwn(obj, 'existing'), 'has initial own property');
|
||||
st.equal(obj.existing, 'existing property', 'has expected initial value');
|
||||
|
||||
var res = defineDataProperty(obj, 'added', 'added property');
|
||||
st.equal(res, void undefined, 'returns `undefined`');
|
||||
st.ok(hasOwn(obj, 'added'), 'has expected own property');
|
||||
st.equal(obj.added, 'added property', 'has expected value');
|
||||
|
||||
defineDataProperty(obj, 'existing', 'new value');
|
||||
st.ok(hasOwn(obj, 'existing'), 'still has expected own property');
|
||||
st.equal(obj.existing, 'new value', 'has new expected value');
|
||||
|
||||
defineDataProperty(obj, 'explicit1', 'new value', false);
|
||||
st.ok(hasOwn(obj, 'explicit1'), 'has expected own property (explicit enumerable)');
|
||||
st.equal(obj.explicit1, 'new value', 'has new expected value (explicit enumerable)');
|
||||
|
||||
defineDataProperty(obj, 'explicit2', 'new value', false, false);
|
||||
st.ok(hasOwn(obj, 'explicit2'), 'has expected own property (explicit writable)');
|
||||
st.equal(obj.explicit2, 'new value', 'has new expected value (explicit writable)');
|
||||
|
||||
defineDataProperty(obj, 'explicit3', 'new value', false, false, false);
|
||||
st.ok(hasOwn(obj, 'explicit3'), 'has expected own property (explicit configurable)');
|
||||
st.equal(obj.explicit3, 'new value', 'has new expected value (explicit configurable)');
|
||||
|
||||
st.end();
|
||||
});
|
||||
|
||||
t.test('loose mode', { skip: !hasPropertyDescriptors }, function (st) {
|
||||
var obj = { existing: 'existing property' };
|
||||
|
||||
defineDataProperty(obj, 'added', 'added value 1', true, null, null, true);
|
||||
st.deepEqual(
|
||||
getOwnPropertyDescriptors(obj),
|
||||
{
|
||||
existing: {
|
||||
configurable: true,
|
||||
enumerable: true,
|
||||
value: 'existing property',
|
||||
writable: true
|
||||
},
|
||||
added: {
|
||||
configurable: true,
|
||||
enumerable: !hasPropertyDescriptors,
|
||||
value: 'added value 1',
|
||||
writable: true
|
||||
}
|
||||
},
|
||||
'in loose mode, obj still adds property 1'
|
||||
);
|
||||
|
||||
defineDataProperty(obj, 'added', 'added value 2', false, true, null, true);
|
||||
st.deepEqual(
|
||||
getOwnPropertyDescriptors(obj),
|
||||
{
|
||||
existing: {
|
||||
configurable: true,
|
||||
enumerable: true,
|
||||
value: 'existing property',
|
||||
writable: true
|
||||
},
|
||||
added: {
|
||||
configurable: true,
|
||||
enumerable: true,
|
||||
value: 'added value 2',
|
||||
writable: !hasPropertyDescriptors
|
||||
}
|
||||
},
|
||||
'in loose mode, obj still adds property 2'
|
||||
);
|
||||
|
||||
defineDataProperty(obj, 'added', 'added value 3', false, false, true, true);
|
||||
st.deepEqual(
|
||||
getOwnPropertyDescriptors(obj),
|
||||
{
|
||||
existing: {
|
||||
configurable: true,
|
||||
enumerable: true,
|
||||
value: 'existing property',
|
||||
writable: true
|
||||
},
|
||||
added: {
|
||||
configurable: !hasPropertyDescriptors,
|
||||
enumerable: true,
|
||||
value: 'added value 3',
|
||||
writable: true
|
||||
}
|
||||
},
|
||||
'in loose mode, obj still adds property 3'
|
||||
);
|
||||
|
||||
st.end();
|
||||
});
|
||||
|
||||
t.test('non-normal data property, ES3', { skip: hasPropertyDescriptors }, function (st) {
|
||||
/** @type {Record<PropertyKey, string>} */
|
||||
var obj = { existing: 'existing property' };
|
||||
|
||||
st['throws'](
|
||||
function () { defineDataProperty(obj, 'added', 'added value', true); },
|
||||
SyntaxError,
|
||||
'nonEnumerable throws a Syntax Error'
|
||||
);
|
||||
|
||||
st['throws'](
|
||||
function () { defineDataProperty(obj, 'added', 'added value', false, true); },
|
||||
SyntaxError,
|
||||
'nonWritable throws a Syntax Error'
|
||||
);
|
||||
|
||||
st['throws'](
|
||||
function () { defineDataProperty(obj, 'added', 'added value', false, false, true); },
|
||||
SyntaxError,
|
||||
'nonWritable throws a Syntax Error'
|
||||
);
|
||||
|
||||
st.deepEqual(
|
||||
ownKeys(obj),
|
||||
['existing'],
|
||||
'obj still has expected keys'
|
||||
);
|
||||
st.equal(obj.existing, 'existing property', 'obj still has expected values');
|
||||
|
||||
st.end();
|
||||
});
|
||||
|
||||
t.test('new non-normal data property, ES5+', { skip: !hasPropertyDescriptors }, function (st) {
|
||||
/** @type {Record<PropertyKey, string>} */
|
||||
var obj = { existing: 'existing property' };
|
||||
|
||||
defineDataProperty(obj, 'nonEnum', null, true);
|
||||
defineDataProperty(obj, 'nonWrit', null, false, true);
|
||||
defineDataProperty(obj, 'nonConf', null, false, false, true);
|
||||
|
||||
st.deepEqual(
|
||||
getOwnPropertyDescriptors(obj),
|
||||
{
|
||||
existing: {
|
||||
configurable: true,
|
||||
enumerable: true,
|
||||
value: 'existing property',
|
||||
writable: true
|
||||
},
|
||||
nonEnum: {
|
||||
configurable: true,
|
||||
enumerable: false,
|
||||
value: null,
|
||||
writable: true
|
||||
},
|
||||
nonWrit: {
|
||||
configurable: true,
|
||||
enumerable: true,
|
||||
value: null,
|
||||
writable: false
|
||||
},
|
||||
nonConf: {
|
||||
configurable: false,
|
||||
enumerable: true,
|
||||
value: null,
|
||||
writable: true
|
||||
}
|
||||
},
|
||||
'obj has expected property descriptors'
|
||||
);
|
||||
|
||||
st.end();
|
||||
});
|
||||
|
||||
t.test('existing non-normal data property, ES5+', { skip: !hasPropertyDescriptors }, function (st) {
|
||||
// test case changing an existing non-normal property
|
||||
|
||||
/** @type {Record<string, null | string>} */
|
||||
var obj = {};
|
||||
Object.defineProperty(obj, 'nonEnum', { configurable: true, enumerable: false, value: null, writable: true });
|
||||
Object.defineProperty(obj, 'nonWrit', { configurable: true, enumerable: true, value: null, writable: false });
|
||||
Object.defineProperty(obj, 'nonConf', { configurable: false, enumerable: true, value: null, writable: true });
|
||||
|
||||
st.deepEqual(
|
||||
getOwnPropertyDescriptors(obj),
|
||||
{
|
||||
nonEnum: {
|
||||
configurable: true,
|
||||
enumerable: false,
|
||||
value: null,
|
||||
writable: true
|
||||
},
|
||||
nonWrit: {
|
||||
configurable: true,
|
||||
enumerable: true,
|
||||
value: null,
|
||||
writable: false
|
||||
},
|
||||
nonConf: {
|
||||
configurable: false,
|
||||
enumerable: true,
|
||||
value: null,
|
||||
writable: true
|
||||
}
|
||||
},
|
||||
'obj initially has expected property descriptors'
|
||||
);
|
||||
|
||||
defineDataProperty(obj, 'nonEnum', 'new value', false);
|
||||
defineDataProperty(obj, 'nonWrit', 'new value', false, false);
|
||||
st['throws'](
|
||||
function () { defineDataProperty(obj, 'nonConf', 'new value', false, false, false); },
|
||||
TypeError,
|
||||
'can not alter a nonconfigurable property'
|
||||
);
|
||||
|
||||
st.deepEqual(
|
||||
getOwnPropertyDescriptors(obj),
|
||||
{
|
||||
nonEnum: {
|
||||
configurable: true,
|
||||
enumerable: true,
|
||||
value: 'new value',
|
||||
writable: true
|
||||
},
|
||||
nonWrit: {
|
||||
configurable: true,
|
||||
enumerable: true,
|
||||
value: 'new value',
|
||||
writable: true
|
||||
},
|
||||
nonConf: {
|
||||
configurable: false,
|
||||
enumerable: true,
|
||||
value: null,
|
||||
writable: true
|
||||
}
|
||||
},
|
||||
'obj ends up with expected property descriptors'
|
||||
);
|
||||
|
||||
st.end();
|
||||
});
|
||||
|
||||
t.test('frozen object, ES5+', { skip: !hasPropertyDescriptors }, function (st) {
|
||||
var frozen = Object.freeze({ existing: true });
|
||||
|
||||
st['throws'](
|
||||
function () { defineDataProperty(frozen, 'existing', 'new value'); },
|
||||
TypeError,
|
||||
'frozen object can not modify an existing property'
|
||||
);
|
||||
|
||||
st['throws'](
|
||||
function () { defineDataProperty(frozen, 'new', 'new property'); },
|
||||
TypeError,
|
||||
'frozen object can not add a new property'
|
||||
);
|
||||
|
||||
st.end();
|
||||
});
|
||||
|
||||
t.test('sealed object, ES5+', { skip: !hasPropertyDescriptors }, function (st) {
|
||||
var sealed = Object.seal({ existing: true });
|
||||
st.deepEqual(
|
||||
Object.getOwnPropertyDescriptor(sealed, 'existing'),
|
||||
{
|
||||
configurable: false,
|
||||
enumerable: true,
|
||||
value: true,
|
||||
writable: true
|
||||
},
|
||||
'existing value on sealed object has expected descriptor'
|
||||
);
|
||||
|
||||
defineDataProperty(sealed, 'existing', 'new value');
|
||||
|
||||
st.deepEqual(
|
||||
Object.getOwnPropertyDescriptor(sealed, 'existing'),
|
||||
{
|
||||
configurable: false,
|
||||
enumerable: true,
|
||||
value: 'new value',
|
||||
writable: true
|
||||
},
|
||||
'existing value on sealed object has changed descriptor'
|
||||
);
|
||||
|
||||
st['throws'](
|
||||
function () { defineDataProperty(sealed, 'new', 'new property'); },
|
||||
TypeError,
|
||||
'sealed object can not add a new property'
|
||||
);
|
||||
|
||||
st.end();
|
||||
});
|
||||
|
||||
t.test('nonextensible object, ES5+', { skip: !hasPropertyDescriptors }, function (st) {
|
||||
var nonExt = Object.preventExtensions({ existing: true });
|
||||
|
||||
st.deepEqual(
|
||||
Object.getOwnPropertyDescriptor(nonExt, 'existing'),
|
||||
{
|
||||
configurable: true,
|
||||
enumerable: true,
|
||||
value: true,
|
||||
writable: true
|
||||
},
|
||||
'existing value on non-extensible object has expected descriptor'
|
||||
);
|
||||
|
||||
defineDataProperty(nonExt, 'existing', 'new value', true);
|
||||
|
||||
st.deepEqual(
|
||||
Object.getOwnPropertyDescriptor(nonExt, 'existing'),
|
||||
{
|
||||
configurable: true,
|
||||
enumerable: false,
|
||||
value: 'new value',
|
||||
writable: true
|
||||
},
|
||||
'existing value on non-extensible object has changed descriptor'
|
||||
);
|
||||
|
||||
st['throws'](
|
||||
function () { defineDataProperty(nonExt, 'new', 'new property'); },
|
||||
TypeError,
|
||||
'non-extensible object can not add a new property'
|
||||
);
|
||||
|
||||
st.end();
|
||||
});
|
||||
|
||||
t.end();
|
||||
});
|
59
node_modules/define-data-property/tsconfig.json
generated
vendored
Normal file
|
@ -0,0 +1,59 @@
|
|||
{
|
||||
"compilerOptions": {
|
||||
/* Visit https://aka.ms/tsconfig to read more about this file */
|
||||
|
||||
/* Projects */
|
||||
|
||||
/* Language and Environment */
|
||||
"target": "es2022", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */
|
||||
// "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */
|
||||
// "noLib": true, /* Disable including any library files, including the default lib.d.ts. */
|
||||
"useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */
|
||||
// "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */
|
||||
|
||||
/* Modules */
|
||||
"module": "commonjs", /* Specify what module code is generated. */
|
||||
// "rootDir": "./", /* Specify the root folder within your source files. */
|
||||
// "moduleResolution": "node10", /* Specify how TypeScript looks up a file from a given module specifier. */
|
||||
// "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */
|
||||
// "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */
|
||||
// "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */
|
||||
"typeRoots": ["types"], /* Specify multiple folders that act like './node_modules/@types'. */
|
||||
"resolveJsonModule": true, /* Enable importing .json files. */
|
||||
|
||||
/* JavaScript Support */
|
||||
"allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */
|
||||
"checkJs": true, /* Enable error reporting in type-checked JavaScript files. */
|
||||
"maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */
|
||||
|
||||
/* Emit */
|
||||
"declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */
|
||||
"declarationMap": true, /* Create sourcemaps for d.ts files. */
|
||||
// "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */
|
||||
"noEmit": true, /* Disable emitting files from a compilation. */
|
||||
|
||||
/* Interop Constraints */
|
||||
"allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */
|
||||
"esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */
|
||||
"forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */
|
||||
|
||||
/* Type Checking */
|
||||
"strict": true, /* Enable all strict type-checking options. */
|
||||
"noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied 'any' type. */
|
||||
"noImplicitThis": true, /* Enable error reporting when 'this' is given the type 'any'. */
|
||||
"useUnknownInCatchVariables": true, /* Default catch clause variables as 'unknown' instead of 'any'. */
|
||||
"noUnusedLocals": true, /* Enable error reporting when local variables aren't read. */
|
||||
"noUnusedParameters": true, /* Raise an error when a function parameter isn't read. */
|
||||
"noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */
|
||||
"noFallthroughCasesInSwitch": true, /* Enable error reporting for fallthrough cases in switch statements. */
|
||||
"noUncheckedIndexedAccess": true, /* Add 'undefined' to a type when accessed using an index. */
|
||||
"noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */
|
||||
// "noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type. */
|
||||
|
||||
/* Completeness */
|
||||
// "skipLibCheck": true /* Skip type checking all .d.ts files. */
|
||||
},
|
||||
"exclude": [
|
||||
"coverage"
|
||||
]
|
||||
}
|
63
node_modules/dezalgo/package.json
generated
vendored
|
@ -1,52 +1,28 @@
|
|||
{
|
||||
"_from": "dezalgo@^1.0.4",
|
||||
"_id": "dezalgo@1.0.4",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-rXSP0bf+5n0Qonsb+SVVfNfIsimO4HEtmnIpPHY8Q1UCzKlQrDMfdobr8nJOOsRgWCyMRqeSBQzmWUMq7zvVig==",
|
||||
"_location": "/dezalgo",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "range",
|
||||
"registry": true,
|
||||
"raw": "dezalgo@^1.0.4",
|
||||
"name": "dezalgo",
|
||||
"escapedName": "dezalgo",
|
||||
"rawSpec": "^1.0.4",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "^1.0.4"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/formidable"
|
||||
"version": "1.0.4",
|
||||
"description": "Contain async insanity so that the dark pony lord doesn't eat souls",
|
||||
"main": "dezalgo.js",
|
||||
"files": [
|
||||
"dezalgo.js"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/dezalgo/-/dezalgo-1.0.4.tgz",
|
||||
"_shasum": "751235260469084c132157dfa857f386d4c33d81",
|
||||
"_spec": "dezalgo@^1.0.4",
|
||||
"_where": "/home/ubuntu/formidable/node_modules/formidable",
|
||||
"author": {
|
||||
"name": "Isaac Z. Schlueter",
|
||||
"email": "i@izs.me",
|
||||
"url": "http://blog.izs.me/"
|
||||
"directories": {
|
||||
"test": "test"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/npm/dezalgo/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"dependencies": {
|
||||
"asap": "^2.0.0",
|
||||
"wrappy": "1"
|
||||
},
|
||||
"deprecated": false,
|
||||
"description": "Contain async insanity so that the dark pony lord doesn't eat souls",
|
||||
"devDependencies": {
|
||||
"tap": "^12.4.0"
|
||||
},
|
||||
"directories": {
|
||||
"test": "test"
|
||||
"scripts": {
|
||||
"test": "tap test/*.js"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/npm/dezalgo"
|
||||
},
|
||||
"files": [
|
||||
"dezalgo.js"
|
||||
],
|
||||
"homepage": "https://github.com/npm/dezalgo",
|
||||
"keywords": [
|
||||
"async",
|
||||
"zalgo",
|
||||
|
@ -61,15 +37,10 @@
|
|||
"HE COMES",
|
||||
"there used to be some funky unicode keywords here, but it broke the npm website on chrome, so they were removed, sorry"
|
||||
],
|
||||
"author": "Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me/)",
|
||||
"license": "ISC",
|
||||
"main": "dezalgo.js",
|
||||
"name": "dezalgo",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/npm/dezalgo.git"
|
||||
"bugs": {
|
||||
"url": "https://github.com/npm/dezalgo/issues"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "tap test/*.js"
|
||||
},
|
||||
"version": "1.0.4"
|
||||
"homepage": "https://github.com/npm/dezalgo"
|
||||
}
|
||||
|
|
13
node_modules/es-define-property/.eslintrc
generated
vendored
Normal file
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
"root": true,
|
||||
|
||||
"extends": "@ljharb",
|
||||
|
||||
"rules": {
|
||||
"new-cap": ["error", {
|
||||
"capIsNewExceptions": [
|
||||
"GetIntrinsic",
|
||||
],
|
||||
}],
|
||||
},
|
||||
}
|
12
node_modules/es-define-property/.github/FUNDING.yml
generated
vendored
Normal file
|
@ -0,0 +1,12 @@
|
|||
# These are supported funding model platforms
|
||||
|
||||
github: [ljharb]
|
||||
patreon: # Replace with a single Patreon username
|
||||
open_collective: # Replace with a single Open Collective username
|
||||
ko_fi: # Replace with a single Ko-fi username
|
||||
tidelift: npm/es-define-property
|
||||
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
|
||||
liberapay: # Replace with a single Liberapay username
|
||||
issuehunt: # Replace with a single IssueHunt username
|
||||
otechie: # Replace with a single Otechie username
|
||||
custom: # Replace with a single custom sponsorship URL
|
9
node_modules/es-define-property/.nycrc
generated
vendored
Normal file
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
"all": true,
|
||||
"check-coverage": false,
|
||||
"reporter": ["text-summary", "text", "html", "json"],
|
||||
"exclude": [
|
||||
"coverage",
|
||||
"test"
|
||||
]
|
||||
}
|