0) {
- if(p < this.DB && (d = this[i]>>p) > 0) { m = true; r = int2char(d); }
- while(i >= 0) {
- if(p < k) {
- d = (this[i]&((1<>(p+=this.DB-k);
- }
- else {
- d = (this[i]>>(p-=k))&km;
- if(p <= 0) { p += this.DB; --i; }
- }
- if(d > 0) m = true;
- if(m) r += int2char(d);
- }
- }
- return m?r:"0";
- }
-
- // (public) -this
- function bnNegate() { var r = nbi(); BigInteger.ZERO.subTo(this,r); return r; }
-
- // (public) |this|
- function bnAbs() { return (this.s<0)?this.negate():this; }
-
- // (public) return + if this > a, - if this < a, 0 if equal
- function bnCompareTo(a) {
- var r = this.s-a.s;
- if(r != 0) return r;
- var i = this.t;
- r = i-a.t;
- if(r != 0) return (this.s<0)?-r:r;
- while(--i >= 0) if((r=this[i]-a[i]) != 0) return r;
- return 0;
- }
-
- // returns bit length of the integer x
- function nbits(x) {
- var r = 1, t;
- if((t=x>>>16) != 0) { x = t; r += 16; }
- if((t=x>>8) != 0) { x = t; r += 8; }
- if((t=x>>4) != 0) { x = t; r += 4; }
- if((t=x>>2) != 0) { x = t; r += 2; }
- if((t=x>>1) != 0) { x = t; r += 1; }
- return r;
- }
-
- // (public) return the number of bits in "this"
- function bnBitLength() {
- if(this.t <= 0) return 0;
- return this.DB*(this.t-1)+nbits(this[this.t-1]^(this.s&this.DM));
- }
-
- // (protected) r = this << n*DB
- function bnpDLShiftTo(n,r) {
- var i;
- for(i = this.t-1; i >= 0; --i) r[i+n] = this[i];
- for(i = n-1; i >= 0; --i) r[i] = 0;
- r.t = this.t+n;
- r.s = this.s;
- }
-
- // (protected) r = this >> n*DB
- function bnpDRShiftTo(n,r) {
- for(var i = n; i < this.t; ++i) r[i-n] = this[i];
- r.t = Math.max(this.t-n,0);
- r.s = this.s;
- }
-
- // (protected) r = this << n
- function bnpLShiftTo(n,r) {
- var bs = n%this.DB;
- var cbs = this.DB-bs;
- var bm = (1<= 0; --i) {
- r[i+ds+1] = (this[i]>>cbs)|c;
- c = (this[i]&bm)<= 0; --i) r[i] = 0;
- r[ds] = c;
- r.t = this.t+ds+1;
- r.s = this.s;
- r.clamp();
- }
-
- // (protected) r = this >> n
- function bnpRShiftTo(n,r) {
- r.s = this.s;
- var ds = Math.floor(n/this.DB);
- if(ds >= this.t) { r.t = 0; return; }
- var bs = n%this.DB;
- var cbs = this.DB-bs;
- var bm = (1<>bs;
- for(var i = ds+1; i < this.t; ++i) {
- r[i-ds-1] |= (this[i]&bm)<>bs;
- }
- if(bs > 0) r[this.t-ds-1] |= (this.s&bm)<>= this.DB;
- }
- if(a.t < this.t) {
- c -= a.s;
- while(i < this.t) {
- c += this[i];
- r[i++] = c&this.DM;
- c >>= this.DB;
- }
- c += this.s;
- }
- else {
- c += this.s;
- while(i < a.t) {
- c -= a[i];
- r[i++] = c&this.DM;
- c >>= this.DB;
- }
- c -= a.s;
- }
- r.s = (c<0)?-1:0;
- if(c < -1) r[i++] = this.DV+c;
- else if(c > 0) r[i++] = c;
- r.t = i;
- r.clamp();
- }
-
- // (protected) r = this * a, r != this,a (HAC 14.12)
- // "this" should be the larger one if appropriate.
- function bnpMultiplyTo(a,r) {
- var x = this.abs(), y = a.abs();
- var i = x.t;
- r.t = i+y.t;
- while(--i >= 0) r[i] = 0;
- for(i = 0; i < y.t; ++i) r[i+x.t] = x.am(0,y[i],r,i,0,x.t);
- r.s = 0;
- r.clamp();
- if(this.s != a.s) BigInteger.ZERO.subTo(r,r);
- }
-
- // (protected) r = this^2, r != this (HAC 14.16)
- function bnpSquareTo(r) {
- var x = this.abs();
- var i = r.t = 2*x.t;
- while(--i >= 0) r[i] = 0;
- for(i = 0; i < x.t-1; ++i) {
- var c = x.am(i,x[i],r,2*i,0,1);
- if((r[i+x.t]+=x.am(i+1,2*x[i],r,2*i+1,c,x.t-i-1)) >= x.DV) {
- r[i+x.t] -= x.DV;
- r[i+x.t+1] = 1;
- }
- }
- if(r.t > 0) r[r.t-1] += x.am(i,x[i],r,2*i,0,1);
- r.s = 0;
- r.clamp();
- }
-
- // (protected) divide this by m, quotient and remainder to q, r (HAC 14.20)
- // r != q, this != m. q or r may be null.
- function bnpDivRemTo(m,q,r) {
- var pm = m.abs();
- if(pm.t <= 0) return;
- var pt = this.abs();
- if(pt.t < pm.t) {
- if(q != null) q.fromInt(0);
- if(r != null) this.copyTo(r);
- return;
- }
- if(r == null) r = nbi();
- var y = nbi(), ts = this.s, ms = m.s;
- var nsh = this.DB-nbits(pm[pm.t-1]); // normalize modulus
- if(nsh > 0) { pm.lShiftTo(nsh,y); pt.lShiftTo(nsh,r); }
- else { pm.copyTo(y); pt.copyTo(r); }
- var ys = y.t;
- var y0 = y[ys-1];
- if(y0 == 0) return;
- var yt = y0*(1<1)?y[ys-2]>>this.F2:0);
- var d1 = this.FV/yt, d2 = (1<= 0) {
- r[r.t++] = 1;
- r.subTo(t,r);
- }
- BigInteger.ONE.dlShiftTo(ys,t);
- t.subTo(y,y); // "negative" y so we can replace sub with am later
- while(y.t < ys) y[y.t++] = 0;
- while(--j >= 0) {
- // Estimate quotient digit
- var qd = (r[--i]==y0)?this.DM:Math.floor(r[i]*d1+(r[i-1]+e)*d2);
- if((r[i]+=y.am(0,qd,r,j,0,ys)) < qd) { // Try it out
- y.dlShiftTo(j,t);
- r.subTo(t,r);
- while(r[i] < --qd) r.subTo(t,r);
- }
- }
- if(q != null) {
- r.drShiftTo(ys,q);
- if(ts != ms) BigInteger.ZERO.subTo(q,q);
- }
- r.t = ys;
- r.clamp();
- if(nsh > 0) r.rShiftTo(nsh,r); // Denormalize remainder
- if(ts < 0) BigInteger.ZERO.subTo(r,r);
- }
-
- // (public) this mod a
- function bnMod(a) {
- var r = nbi();
- this.abs().divRemTo(a,null,r);
- if(this.s < 0 && r.compareTo(BigInteger.ZERO) > 0) a.subTo(r,r);
- return r;
- }
-
- // Modular reduction using "classic" algorithm
- function Classic(m) { this.m = m; }
- function cConvert(x) {
- if(x.s < 0 || x.compareTo(this.m) >= 0) return x.mod(this.m);
- else return x;
- }
- function cRevert(x) { return x; }
- function cReduce(x) { x.divRemTo(this.m,null,x); }
- function cMulTo(x,y,r) { x.multiplyTo(y,r); this.reduce(r); }
- function cSqrTo(x,r) { x.squareTo(r); this.reduce(r); }
-
- Classic.prototype.convert = cConvert;
- Classic.prototype.revert = cRevert;
- Classic.prototype.reduce = cReduce;
- Classic.prototype.mulTo = cMulTo;
- Classic.prototype.sqrTo = cSqrTo;
-
- // (protected) return "-1/this % 2^DB"; useful for Mont. reduction
- // justification:
- // xy == 1 (mod m)
- // xy = 1+km
- // xy(2-xy) = (1+km)(1-km)
- // x[y(2-xy)] = 1-k^2m^2
- // x[y(2-xy)] == 1 (mod m^2)
- // if y is 1/x mod m, then y(2-xy) is 1/x mod m^2
- // should reduce x and y(2-xy) by m^2 at each step to keep size bounded.
- // JS multiply "overflows" differently from C/C++, so care is needed here.
- function bnpInvDigit() {
- if(this.t < 1) return 0;
- var x = this[0];
- if((x&1) == 0) return 0;
- var y = x&3; // y == 1/x mod 2^2
- y = (y*(2-(x&0xf)*y))&0xf; // y == 1/x mod 2^4
- y = (y*(2-(x&0xff)*y))&0xff; // y == 1/x mod 2^8
- y = (y*(2-(((x&0xffff)*y)&0xffff)))&0xffff; // y == 1/x mod 2^16
- // last step - calculate inverse mod DV directly;
- // assumes 16 < DB <= 32 and assumes ability to handle 48-bit ints
- y = (y*(2-x*y%this.DV))%this.DV; // y == 1/x mod 2^dbits
- // we really want the negative inverse, and -DV < y < DV
- return (y>0)?this.DV-y:-y;
- }
-
- // Montgomery reduction
- function Montgomery(m) {
- this.m = m;
- this.mp = m.invDigit();
- this.mpl = this.mp&0x7fff;
- this.mph = this.mp>>15;
- this.um = (1<<(m.DB-15))-1;
- this.mt2 = 2*m.t;
- }
-
- // xR mod m
- function montConvert(x) {
- var r = nbi();
- x.abs().dlShiftTo(this.m.t,r);
- r.divRemTo(this.m,null,r);
- if(x.s < 0 && r.compareTo(BigInteger.ZERO) > 0) this.m.subTo(r,r);
- return r;
- }
-
- // x/R mod m
- function montRevert(x) {
- var r = nbi();
- x.copyTo(r);
- this.reduce(r);
- return r;
- }
-
- // x = x/R mod m (HAC 14.32)
- function montReduce(x) {
- while(x.t <= this.mt2) // pad x so am has enough room later
- x[x.t++] = 0;
- for(var i = 0; i < this.m.t; ++i) {
- // faster way of calculating u0 = x[i]*mp mod DV
- var j = x[i]&0x7fff;
- var u0 = (j*this.mpl+(((j*this.mph+(x[i]>>15)*this.mpl)&this.um)<<15))&x.DM;
- // use am to combine the multiply-shift-add into one call
- j = i+this.m.t;
- x[j] += this.m.am(0,u0,x,i,0,this.m.t);
- // propagate carry
- while(x[j] >= x.DV) { x[j] -= x.DV; x[++j]++; }
- }
- x.clamp();
- x.drShiftTo(this.m.t,x);
- if(x.compareTo(this.m) >= 0) x.subTo(this.m,x);
- }
-
- // r = "x^2/R mod m"; x != r
- function montSqrTo(x,r) { x.squareTo(r); this.reduce(r); }
-
- // r = "xy/R mod m"; x,y != r
- function montMulTo(x,y,r) { x.multiplyTo(y,r); this.reduce(r); }
-
- Montgomery.prototype.convert = montConvert;
- Montgomery.prototype.revert = montRevert;
- Montgomery.prototype.reduce = montReduce;
- Montgomery.prototype.mulTo = montMulTo;
- Montgomery.prototype.sqrTo = montSqrTo;
-
- // (protected) true iff this is even
- function bnpIsEven() { return ((this.t>0)?(this[0]&1):this.s) == 0; }
-
- // (protected) this^e, e < 2^32, doing sqr and mul with "r" (HAC 14.79)
- function bnpExp(e,z) {
- if(e > 0xffffffff || e < 1) return BigInteger.ONE;
- var r = nbi(), r2 = nbi(), g = z.convert(this), i = nbits(e)-1;
- g.copyTo(r);
- while(--i >= 0) {
- z.sqrTo(r,r2);
- if((e&(1< 0) z.mulTo(r2,g,r);
- else { var t = r; r = r2; r2 = t; }
- }
- return z.revert(r);
- }
-
- // (public) this^e % m, 0 <= e < 2^32
- function bnModPowInt(e,m) {
- var z;
- if(e < 256 || m.isEven()) z = new Classic(m); else z = new Montgomery(m);
- return this.exp(e,z);
- }
-
- // protected
- BigInteger.prototype.copyTo = bnpCopyTo;
- BigInteger.prototype.fromInt = bnpFromInt;
- BigInteger.prototype.fromString = bnpFromString;
- BigInteger.prototype.clamp = bnpClamp;
- BigInteger.prototype.dlShiftTo = bnpDLShiftTo;
- BigInteger.prototype.drShiftTo = bnpDRShiftTo;
- BigInteger.prototype.lShiftTo = bnpLShiftTo;
- BigInteger.prototype.rShiftTo = bnpRShiftTo;
- BigInteger.prototype.subTo = bnpSubTo;
- BigInteger.prototype.multiplyTo = bnpMultiplyTo;
- BigInteger.prototype.squareTo = bnpSquareTo;
- BigInteger.prototype.divRemTo = bnpDivRemTo;
- BigInteger.prototype.invDigit = bnpInvDigit;
- BigInteger.prototype.isEven = bnpIsEven;
- BigInteger.prototype.exp = bnpExp;
-
- // public
- BigInteger.prototype.toString = bnToString;
- BigInteger.prototype.negate = bnNegate;
- BigInteger.prototype.abs = bnAbs;
- BigInteger.prototype.compareTo = bnCompareTo;
- BigInteger.prototype.bitLength = bnBitLength;
- BigInteger.prototype.mod = bnMod;
- BigInteger.prototype.modPowInt = bnModPowInt;
-
- // "constants"
- BigInteger.ZERO = nbv(0);
- BigInteger.ONE = nbv(1);
-
- // Copyright (c) 2005-2009 Tom Wu
- // All Rights Reserved.
- // See "LICENSE" for details.
-
- // Extended JavaScript BN functions, required for RSA private ops.
-
- // Version 1.1: new BigInteger("0", 10) returns "proper" zero
- // Version 1.2: square() API, isProbablePrime fix
-
- // (public)
- function bnClone() { var r = nbi(); this.copyTo(r); return r; }
-
- // (public) return value as integer
- function bnIntValue() {
- if(this.s < 0) {
- if(this.t == 1) return this[0]-this.DV;
- else if(this.t == 0) return -1;
- }
- else if(this.t == 1) return this[0];
- else if(this.t == 0) return 0;
- // assumes 16 < DB < 32
- return ((this[1]&((1<<(32-this.DB))-1))<>24; }
-
- // (public) return value as short (assumes DB>=16)
- function bnShortValue() { return (this.t==0)?this.s:(this[0]<<16)>>16; }
-
- // (protected) return x s.t. r^x < DV
- function bnpChunkSize(r) { return Math.floor(Math.LN2*this.DB/Math.log(r)); }
-
- // (public) 0 if this == 0, 1 if this > 0
- function bnSigNum() {
- if(this.s < 0) return -1;
- else if(this.t <= 0 || (this.t == 1 && this[0] <= 0)) return 0;
- else return 1;
- }
-
- // (protected) convert to radix string
- function bnpToRadix(b) {
- if(b == null) b = 10;
- if(this.signum() == 0 || b < 2 || b > 36) return "0";
- var cs = this.chunkSize(b);
- var a = Math.pow(b,cs);
- var d = nbv(a), y = nbi(), z = nbi(), r = "";
- this.divRemTo(d,y,z);
- while(y.signum() > 0) {
- r = (a+z.intValue()).toString(b).substr(1) + r;
- y.divRemTo(d,y,z);
- }
- return z.intValue().toString(b) + r;
- }
-
- // (protected) convert from radix string
- function bnpFromRadix(s,b) {
- this.fromInt(0);
- if(b == null) b = 10;
- var cs = this.chunkSize(b);
- var d = Math.pow(b,cs), mi = false, j = 0, w = 0;
- for(var i = 0; i < s.length; ++i) {
- var x = intAt(s,i);
- if(x < 0) {
- if(s.charAt(i) == "-" && this.signum() == 0) mi = true;
- continue;
- }
- w = b*w+x;
- if(++j >= cs) {
- this.dMultiply(d);
- this.dAddOffset(w,0);
- j = 0;
- w = 0;
- }
- }
- if(j > 0) {
- this.dMultiply(Math.pow(b,j));
- this.dAddOffset(w,0);
- }
- if(mi) BigInteger.ZERO.subTo(this,this);
- }
-
- // (protected) alternate constructor
- function bnpFromNumber(a,b,c) {
- if("number" == typeof b) {
- // new BigInteger(int,int,RNG)
- if(a < 2) this.fromInt(1);
- else {
- this.fromNumber(a,c);
- if(!this.testBit(a-1)) // force MSB set
- this.bitwiseTo(BigInteger.ONE.shiftLeft(a-1),op_or,this);
- if(this.isEven()) this.dAddOffset(1,0); // force odd
- while(!this.isProbablePrime(b)) {
- this.dAddOffset(2,0);
- if(this.bitLength() > a) this.subTo(BigInteger.ONE.shiftLeft(a-1),this);
- }
- }
- }
- else {
- // new BigInteger(int,RNG)
- var x = new Array(), t = a&7;
- x.length = (a>>3)+1;
- b.nextBytes(x);
- if(t > 0) x[0] &= ((1< 0) {
- if(p < this.DB && (d = this[i]>>p) != (this.s&this.DM)>>p)
- r[k++] = d|(this.s<<(this.DB-p));
- while(i >= 0) {
- if(p < 8) {
- d = (this[i]&((1<>(p+=this.DB-8);
- }
- else {
- d = (this[i]>>(p-=8))&0xff;
- if(p <= 0) { p += this.DB; --i; }
- }
- if((d&0x80) != 0) d |= -256;
- if(k == 0 && (this.s&0x80) != (d&0x80)) ++k;
- if(k > 0 || d != this.s) r[k++] = d;
- }
- }
- return r;
- }
-
- function bnEquals(a) { return(this.compareTo(a)==0); }
- function bnMin(a) { return(this.compareTo(a)<0)?this:a; }
- function bnMax(a) { return(this.compareTo(a)>0)?this:a; }
-
- // (protected) r = this op a (bitwise)
- function bnpBitwiseTo(a,op,r) {
- var i, f, m = Math.min(a.t,this.t);
- for(i = 0; i < m; ++i) r[i] = op(this[i],a[i]);
- if(a.t < this.t) {
- f = a.s&this.DM;
- for(i = m; i < this.t; ++i) r[i] = op(this[i],f);
- r.t = this.t;
- }
- else {
- f = this.s&this.DM;
- for(i = m; i < a.t; ++i) r[i] = op(f,a[i]);
- r.t = a.t;
- }
- r.s = op(this.s,a.s);
- r.clamp();
- }
-
- // (public) this & a
- function op_and(x,y) { return x&y; }
- function bnAnd(a) { var r = nbi(); this.bitwiseTo(a,op_and,r); return r; }
-
- // (public) this | a
- function op_or(x,y) { return x|y; }
- function bnOr(a) { var r = nbi(); this.bitwiseTo(a,op_or,r); return r; }
-
- // (public) this ^ a
- function op_xor(x,y) { return x^y; }
- function bnXor(a) { var r = nbi(); this.bitwiseTo(a,op_xor,r); return r; }
-
- // (public) this & ~a
- function op_andnot(x,y) { return x&~y; }
- function bnAndNot(a) { var r = nbi(); this.bitwiseTo(a,op_andnot,r); return r; }
-
- // (public) ~this
- function bnNot() {
- var r = nbi();
- for(var i = 0; i < this.t; ++i) r[i] = this.DM&~this[i];
- r.t = this.t;
- r.s = ~this.s;
- return r;
- }
-
- // (public) this << n
- function bnShiftLeft(n) {
- var r = nbi();
- if(n < 0) this.rShiftTo(-n,r); else this.lShiftTo(n,r);
- return r;
- }
-
- // (public) this >> n
- function bnShiftRight(n) {
- var r = nbi();
- if(n < 0) this.lShiftTo(-n,r); else this.rShiftTo(n,r);
- return r;
- }
-
- // return index of lowest 1-bit in x, x < 2^31
- function lbit(x) {
- if(x == 0) return -1;
- var r = 0;
- if((x&0xffff) == 0) { x >>= 16; r += 16; }
- if((x&0xff) == 0) { x >>= 8; r += 8; }
- if((x&0xf) == 0) { x >>= 4; r += 4; }
- if((x&3) == 0) { x >>= 2; r += 2; }
- if((x&1) == 0) ++r;
- return r;
- }
-
- // (public) returns index of lowest 1-bit (or -1 if none)
- function bnGetLowestSetBit() {
- for(var i = 0; i < this.t; ++i)
- if(this[i] != 0) return i*this.DB+lbit(this[i]);
- if(this.s < 0) return this.t*this.DB;
- return -1;
- }
-
- // return number of 1 bits in x
- function cbit(x) {
- var r = 0;
- while(x != 0) { x &= x-1; ++r; }
- return r;
- }
-
- // (public) return number of set bits
- function bnBitCount() {
- var r = 0, x = this.s&this.DM;
- for(var i = 0; i < this.t; ++i) r += cbit(this[i]^x);
- return r;
- }
-
- // (public) true iff nth bit is set
- function bnTestBit(n) {
- var j = Math.floor(n/this.DB);
- if(j >= this.t) return(this.s!=0);
- return((this[j]&(1<<(n%this.DB)))!=0);
- }
-
- // (protected) this op (1<>= this.DB;
- }
- if(a.t < this.t) {
- c += a.s;
- while(i < this.t) {
- c += this[i];
- r[i++] = c&this.DM;
- c >>= this.DB;
- }
- c += this.s;
- }
- else {
- c += this.s;
- while(i < a.t) {
- c += a[i];
- r[i++] = c&this.DM;
- c >>= this.DB;
- }
- c += a.s;
- }
- r.s = (c<0)?-1:0;
- if(c > 0) r[i++] = c;
- else if(c < -1) r[i++] = this.DV+c;
- r.t = i;
- r.clamp();
- }
-
- // (public) this + a
- function bnAdd(a) { var r = nbi(); this.addTo(a,r); return r; }
-
- // (public) this - a
- function bnSubtract(a) { var r = nbi(); this.subTo(a,r); return r; }
-
- // (public) this * a
- function bnMultiply(a) { var r = nbi(); this.multiplyTo(a,r); return r; }
-
- // (public) this^2
- function bnSquare() { var r = nbi(); this.squareTo(r); return r; }
-
- // (public) this / a
- function bnDivide(a) { var r = nbi(); this.divRemTo(a,r,null); return r; }
-
- // (public) this % a
- function bnRemainder(a) { var r = nbi(); this.divRemTo(a,null,r); return r; }
-
- // (public) [this/a,this%a]
- function bnDivideAndRemainder(a) {
- var q = nbi(), r = nbi();
- this.divRemTo(a,q,r);
- return new Array(q,r);
- }
-
- // (protected) this *= n, this >= 0, 1 < n < DV
- function bnpDMultiply(n) {
- this[this.t] = this.am(0,n-1,this,0,0,this.t);
- ++this.t;
- this.clamp();
- }
-
- // (protected) this += n << w words, this >= 0
- function bnpDAddOffset(n,w) {
- if(n == 0) return;
- while(this.t <= w) this[this.t++] = 0;
- this[w] += n;
- while(this[w] >= this.DV) {
- this[w] -= this.DV;
- if(++w >= this.t) this[this.t++] = 0;
- ++this[w];
- }
- }
-
- // A "null" reducer
- function NullExp() {}
- function nNop(x) { return x; }
- function nMulTo(x,y,r) { x.multiplyTo(y,r); }
- function nSqrTo(x,r) { x.squareTo(r); }
-
- NullExp.prototype.convert = nNop;
- NullExp.prototype.revert = nNop;
- NullExp.prototype.mulTo = nMulTo;
- NullExp.prototype.sqrTo = nSqrTo;
-
- // (public) this^e
- function bnPow(e) { return this.exp(e,new NullExp()); }
-
- // (protected) r = lower n words of "this * a", a.t <= n
- // "this" should be the larger one if appropriate.
- function bnpMultiplyLowerTo(a,n,r) {
- var i = Math.min(this.t+a.t,n);
- r.s = 0; // assumes a,this >= 0
- r.t = i;
- while(i > 0) r[--i] = 0;
- var j;
- for(j = r.t-this.t; i < j; ++i) r[i+this.t] = this.am(0,a[i],r,i,0,this.t);
- for(j = Math.min(a.t,n); i < j; ++i) this.am(0,a[i],r,i,0,n-i);
- r.clamp();
- }
-
- // (protected) r = "this * a" without lower n words, n > 0
- // "this" should be the larger one if appropriate.
- function bnpMultiplyUpperTo(a,n,r) {
- --n;
- var i = r.t = this.t+a.t-n;
- r.s = 0; // assumes a,this >= 0
- while(--i >= 0) r[i] = 0;
- for(i = Math.max(n-this.t,0); i < a.t; ++i)
- r[this.t+i-n] = this.am(n-i,a[i],r,0,0,this.t+i-n);
- r.clamp();
- r.drShiftTo(1,r);
- }
-
- // Barrett modular reduction
- function Barrett(m) {
- // setup Barrett
- this.r2 = nbi();
- this.q3 = nbi();
- BigInteger.ONE.dlShiftTo(2*m.t,this.r2);
- this.mu = this.r2.divide(m);
- this.m = m;
- }
-
- function barrettConvert(x) {
- if(x.s < 0 || x.t > 2*this.m.t) return x.mod(this.m);
- else if(x.compareTo(this.m) < 0) return x;
- else { var r = nbi(); x.copyTo(r); this.reduce(r); return r; }
- }
-
- function barrettRevert(x) { return x; }
-
- // x = x mod m (HAC 14.42)
- function barrettReduce(x) {
- x.drShiftTo(this.m.t-1,this.r2);
- if(x.t > this.m.t+1) { x.t = this.m.t+1; x.clamp(); }
- this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3);
- this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);
- while(x.compareTo(this.r2) < 0) x.dAddOffset(1,this.m.t+1);
- x.subTo(this.r2,x);
- while(x.compareTo(this.m) >= 0) x.subTo(this.m,x);
- }
-
- // r = x^2 mod m; x != r
- function barrettSqrTo(x,r) { x.squareTo(r); this.reduce(r); }
-
- // r = x*y mod m; x,y != r
- function barrettMulTo(x,y,r) { x.multiplyTo(y,r); this.reduce(r); }
-
- Barrett.prototype.convert = barrettConvert;
- Barrett.prototype.revert = barrettRevert;
- Barrett.prototype.reduce = barrettReduce;
- Barrett.prototype.mulTo = barrettMulTo;
- Barrett.prototype.sqrTo = barrettSqrTo;
-
- // (public) this^e % m (HAC 14.85)
- function bnModPow(e,m) {
- var i = e.bitLength(), k, r = nbv(1), z;
- if(i <= 0) return r;
- else if(i < 18) k = 1;
- else if(i < 48) k = 3;
- else if(i < 144) k = 4;
- else if(i < 768) k = 5;
- else k = 6;
- if(i < 8)
- z = new Classic(m);
- else if(m.isEven())
- z = new Barrett(m);
- else
- z = new Montgomery(m);
-
- // precomputation
- var g = new Array(), n = 3, k1 = k-1, km = (1< 1) {
- var g2 = nbi();
- z.sqrTo(g[1],g2);
- while(n <= km) {
- g[n] = nbi();
- z.mulTo(g2,g[n-2],g[n]);
- n += 2;
- }
- }
-
- var j = e.t-1, w, is1 = true, r2 = nbi(), t;
- i = nbits(e[j])-1;
- while(j >= 0) {
- if(i >= k1) w = (e[j]>>(i-k1))&km;
- else {
- w = (e[j]&((1<<(i+1))-1))<<(k1-i);
- if(j > 0) w |= e[j-1]>>(this.DB+i-k1);
- }
-
- n = k;
- while((w&1) == 0) { w >>= 1; --n; }
- if((i -= n) < 0) { i += this.DB; --j; }
- if(is1) { // ret == 1, don't bother squaring or multiplying it
- g[w].copyTo(r);
- is1 = false;
- }
- else {
- while(n > 1) { z.sqrTo(r,r2); z.sqrTo(r2,r); n -= 2; }
- if(n > 0) z.sqrTo(r,r2); else { t = r; r = r2; r2 = t; }
- z.mulTo(r2,g[w],r);
- }
-
- while(j >= 0 && (e[j]&(1< 0) {
- x.rShiftTo(g,x);
- y.rShiftTo(g,y);
- }
- while(x.signum() > 0) {
- if((i = x.getLowestSetBit()) > 0) x.rShiftTo(i,x);
- if((i = y.getLowestSetBit()) > 0) y.rShiftTo(i,y);
- if(x.compareTo(y) >= 0) {
- x.subTo(y,x);
- x.rShiftTo(1,x);
- }
- else {
- y.subTo(x,y);
- y.rShiftTo(1,y);
- }
- }
- if(g > 0) y.lShiftTo(g,y);
- return y;
- }
-
- // (protected) this % n, n < 2^26
- function bnpModInt(n) {
- if(n <= 0) return 0;
- var d = this.DV%n, r = (this.s<0)?n-1:0;
- if(this.t > 0)
- if(d == 0) r = this[0]%n;
- else for(var i = this.t-1; i >= 0; --i) r = (d*r+this[i])%n;
- return r;
- }
-
- // (public) 1/this % m (HAC 14.61)
- function bnModInverse(m) {
- var ac = m.isEven();
- if((this.isEven() && ac) || m.signum() == 0) return BigInteger.ZERO;
- var u = m.clone(), v = this.clone();
- var a = nbv(1), b = nbv(0), c = nbv(0), d = nbv(1);
- while(u.signum() != 0) {
- while(u.isEven()) {
- u.rShiftTo(1,u);
- if(ac) {
- if(!a.isEven() || !b.isEven()) { a.addTo(this,a); b.subTo(m,b); }
- a.rShiftTo(1,a);
- }
- else if(!b.isEven()) b.subTo(m,b);
- b.rShiftTo(1,b);
- }
- while(v.isEven()) {
- v.rShiftTo(1,v);
- if(ac) {
- if(!c.isEven() || !d.isEven()) { c.addTo(this,c); d.subTo(m,d); }
- c.rShiftTo(1,c);
- }
- else if(!d.isEven()) d.subTo(m,d);
- d.rShiftTo(1,d);
- }
- if(u.compareTo(v) >= 0) {
- u.subTo(v,u);
- if(ac) a.subTo(c,a);
- b.subTo(d,b);
- }
- else {
- v.subTo(u,v);
- if(ac) c.subTo(a,c);
- d.subTo(b,d);
- }
- }
- if(v.compareTo(BigInteger.ONE) != 0) return BigInteger.ZERO;
- if(d.compareTo(m) >= 0) return d.subtract(m);
- if(d.signum() < 0) d.addTo(m,d); else return d;
- if(d.signum() < 0) return d.add(m); else return d;
- }
-
- var lowprimes = [2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997];
- var lplim = (1<<26)/lowprimes[lowprimes.length-1];
-
- // (public) test primality with certainty >= 1-.5^t
- function bnIsProbablePrime(t) {
- var i, x = this.abs();
- if(x.t == 1 && x[0] <= lowprimes[lowprimes.length-1]) {
- for(i = 0; i < lowprimes.length; ++i)
- if(x[0] == lowprimes[i]) return true;
- return false;
- }
- if(x.isEven()) return false;
- i = 1;
- while(i < lowprimes.length) {
- var m = lowprimes[i], j = i+1;
- while(j < lowprimes.length && m < lplim) m *= lowprimes[j++];
- m = x.modInt(m);
- while(i < j) if(m%lowprimes[i++] == 0) return false;
- }
- return x.millerRabin(t);
- }
-
- // (protected) true if probably prime (HAC 4.24, Miller-Rabin)
- function bnpMillerRabin(t) {
- var n1 = this.subtract(BigInteger.ONE);
- var k = n1.getLowestSetBit();
- if(k <= 0) return false;
- var r = n1.shiftRight(k);
- t = (t+1)>>1;
- if(t > lowprimes.length) t = lowprimes.length;
- var a = nbi();
- for(var i = 0; i < t; ++i) {
- //Pick bases at random, instead of starting at 2
- a.fromInt(lowprimes[Math.floor(Math.random()*lowprimes.length)]);
- var y = a.modPow(r,this);
- if(y.compareTo(BigInteger.ONE) != 0 && y.compareTo(n1) != 0) {
- var j = 1;
- while(j++ < k && y.compareTo(n1) != 0) {
- y = y.modPowInt(2,this);
- if(y.compareTo(BigInteger.ONE) == 0) return false;
- }
- if(y.compareTo(n1) != 0) return false;
- }
- }
- return true;
- }
-
- // protected
- BigInteger.prototype.chunkSize = bnpChunkSize;
- BigInteger.prototype.toRadix = bnpToRadix;
- BigInteger.prototype.fromRadix = bnpFromRadix;
- BigInteger.prototype.fromNumber = bnpFromNumber;
- BigInteger.prototype.bitwiseTo = bnpBitwiseTo;
- BigInteger.prototype.changeBit = bnpChangeBit;
- BigInteger.prototype.addTo = bnpAddTo;
- BigInteger.prototype.dMultiply = bnpDMultiply;
- BigInteger.prototype.dAddOffset = bnpDAddOffset;
- BigInteger.prototype.multiplyLowerTo = bnpMultiplyLowerTo;
- BigInteger.prototype.multiplyUpperTo = bnpMultiplyUpperTo;
- BigInteger.prototype.modInt = bnpModInt;
- BigInteger.prototype.millerRabin = bnpMillerRabin;
-
- // public
- BigInteger.prototype.clone = bnClone;
- BigInteger.prototype.intValue = bnIntValue;
- BigInteger.prototype.byteValue = bnByteValue;
- BigInteger.prototype.shortValue = bnShortValue;
- BigInteger.prototype.signum = bnSigNum;
- BigInteger.prototype.toByteArray = bnToByteArray;
- BigInteger.prototype.equals = bnEquals;
- BigInteger.prototype.min = bnMin;
- BigInteger.prototype.max = bnMax;
- BigInteger.prototype.and = bnAnd;
- BigInteger.prototype.or = bnOr;
- BigInteger.prototype.xor = bnXor;
- BigInteger.prototype.andNot = bnAndNot;
- BigInteger.prototype.not = bnNot;
- BigInteger.prototype.shiftLeft = bnShiftLeft;
- BigInteger.prototype.shiftRight = bnShiftRight;
- BigInteger.prototype.getLowestSetBit = bnGetLowestSetBit;
- BigInteger.prototype.bitCount = bnBitCount;
- BigInteger.prototype.testBit = bnTestBit;
- BigInteger.prototype.setBit = bnSetBit;
- BigInteger.prototype.clearBit = bnClearBit;
- BigInteger.prototype.flipBit = bnFlipBit;
- BigInteger.prototype.add = bnAdd;
- BigInteger.prototype.subtract = bnSubtract;
- BigInteger.prototype.multiply = bnMultiply;
- BigInteger.prototype.divide = bnDivide;
- BigInteger.prototype.remainder = bnRemainder;
- BigInteger.prototype.divideAndRemainder = bnDivideAndRemainder;
- BigInteger.prototype.modPow = bnModPow;
- BigInteger.prototype.modInverse = bnModInverse;
- BigInteger.prototype.pow = bnPow;
- BigInteger.prototype.gcd = bnGCD;
- BigInteger.prototype.isProbablePrime = bnIsProbablePrime;
-
- // JSBN-specific extension
- BigInteger.prototype.square = bnSquare;
-
- // Expose the Barrett function
- BigInteger.prototype.Barrett = Barrett
-
- // BigInteger interfaces not implemented in jsbn:
-
- // BigInteger(int signum, byte[] magnitude)
- // double doubleValue()
- // float floatValue()
- // int hashCode()
- // long longValue()
- // static BigInteger valueOf(long val)
-
- // Random number generator - requires a PRNG backend, e.g. prng4.js
-
- // For best results, put code like
- //
- // in your main HTML document.
-
- var rng_state;
- var rng_pool;
- var rng_pptr;
-
- // Mix in a 32-bit integer into the pool
- function rng_seed_int(x) {
- rng_pool[rng_pptr++] ^= x & 255;
- rng_pool[rng_pptr++] ^= (x >> 8) & 255;
- rng_pool[rng_pptr++] ^= (x >> 16) & 255;
- rng_pool[rng_pptr++] ^= (x >> 24) & 255;
- if(rng_pptr >= rng_psize) rng_pptr -= rng_psize;
- }
-
- // Mix in the current time (w/milliseconds) into the pool
- function rng_seed_time() {
- rng_seed_int(new Date().getTime());
- }
-
- // Initialize the pool with junk if needed.
- if(rng_pool == null) {
- rng_pool = new Array();
- rng_pptr = 0;
- var t;
- if(typeof window !== "undefined" && window.crypto) {
- if (window.crypto.getRandomValues) {
- // Use webcrypto if available
- var ua = new Uint8Array(32);
- window.crypto.getRandomValues(ua);
- for(t = 0; t < 32; ++t)
- rng_pool[rng_pptr++] = ua[t];
- }
- else if(navigator.appName == "Netscape" && navigator.appVersion < "5") {
- // Extract entropy (256 bits) from NS4 RNG if available
- var z = window.crypto.random(32);
- for(t = 0; t < z.length; ++t)
- rng_pool[rng_pptr++] = z.charCodeAt(t) & 255;
- }
- }
- while(rng_pptr < rng_psize) { // extract some randomness from Math.random()
- t = Math.floor(65536 * Math.random());
- rng_pool[rng_pptr++] = t >>> 8;
- rng_pool[rng_pptr++] = t & 255;
- }
- rng_pptr = 0;
- rng_seed_time();
- //rng_seed_int(window.screenX);
- //rng_seed_int(window.screenY);
- }
-
- function rng_get_byte() {
- if(rng_state == null) {
- rng_seed_time();
- rng_state = prng_newstate();
- rng_state.init(rng_pool);
- for(rng_pptr = 0; rng_pptr < rng_pool.length; ++rng_pptr)
- rng_pool[rng_pptr] = 0;
- rng_pptr = 0;
- //rng_pool = null;
- }
- // TODO: allow reseeding after first request
- return rng_state.next();
- }
-
- function rng_get_bytes(ba) {
- var i;
- for(i = 0; i < ba.length; ++i) ba[i] = rng_get_byte();
- }
-
- function SecureRandom() {}
-
- SecureRandom.prototype.nextBytes = rng_get_bytes;
-
- // prng4.js - uses Arcfour as a PRNG
-
- function Arcfour() {
- this.i = 0;
- this.j = 0;
- this.S = new Array();
- }
-
- // Initialize arcfour context from key, an array of ints, each from [0..255]
- function ARC4init(key) {
- var i, j, t;
- for(i = 0; i < 256; ++i)
- this.S[i] = i;
- j = 0;
- for(i = 0; i < 256; ++i) {
- j = (j + this.S[i] + key[i % key.length]) & 255;
- t = this.S[i];
- this.S[i] = this.S[j];
- this.S[j] = t;
- }
- this.i = 0;
- this.j = 0;
- }
-
- function ARC4next() {
- var t;
- this.i = (this.i + 1) & 255;
- this.j = (this.j + this.S[this.i]) & 255;
- t = this.S[this.i];
- this.S[this.i] = this.S[this.j];
- this.S[this.j] = t;
- return this.S[(t + this.S[this.i]) & 255];
- }
-
- Arcfour.prototype.init = ARC4init;
- Arcfour.prototype.next = ARC4next;
-
- // Plug in your RNG constructor here
- function prng_newstate() {
- return new Arcfour();
- }
-
- // Pool size must be a multiple of 4 and greater than 32.
- // An array of bytes the size of the pool will be passed to init()
- var rng_psize = 256;
-
- BigInteger.SecureRandom = SecureRandom;
- BigInteger.BigInteger = BigInteger;
- if (typeof exports !== 'undefined') {
- exports = module.exports = BigInteger;
- } else {
- this.BigInteger = BigInteger;
- this.SecureRandom = SecureRandom;
- }
-
-}).call(this);
diff --git a/node_modules/jsbn/package.json b/node_modules/jsbn/package.json
deleted file mode 100644
index 99d7943..0000000
--- a/node_modules/jsbn/package.json
+++ /dev/null
@@ -1,53 +0,0 @@
-{
- "_from": "jsbn@~0.1.0",
- "_id": "jsbn@0.1.1",
- "_inBundle": false,
- "_integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=",
- "_location": "/jsbn",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "jsbn@~0.1.0",
- "name": "jsbn",
- "escapedName": "jsbn",
- "rawSpec": "~0.1.0",
- "saveSpec": null,
- "fetchSpec": "~0.1.0"
- },
- "_requiredBy": [
- "/ecc-jsbn",
- "/sshpk"
- ],
- "_resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz",
- "_shasum": "a5e654c2e5a2deb5f201d96cefbca80c0ef2f513",
- "_spec": "jsbn@~0.1.0",
- "_where": "D:\\Projects\\minifyfromhtml\\node_modules\\sshpk",
- "author": {
- "name": "Tom Wu"
- },
- "bugs": {
- "url": "https://github.com/andyperlitch/jsbn/issues"
- },
- "bundleDependencies": false,
- "deprecated": false,
- "description": "The jsbn library is a fast, portable implementation of large-number math in pure JavaScript, enabling public-key crypto and other applications on desktop and mobile browsers.",
- "homepage": "https://github.com/andyperlitch/jsbn#readme",
- "keywords": [
- "biginteger",
- "bignumber",
- "big",
- "integer"
- ],
- "license": "MIT",
- "main": "index.js",
- "name": "jsbn",
- "repository": {
- "type": "git",
- "url": "git+https://github.com/andyperlitch/jsbn.git"
- },
- "scripts": {
- "test": "mocha test.js"
- },
- "version": "0.1.1"
-}
diff --git a/node_modules/jsdom/Changelog.md b/node_modules/jsdom/Changelog.md
index 17a21a2..f1e74fd 100644
--- a/node_modules/jsdom/Changelog.md
+++ b/node_modules/jsdom/Changelog.md
@@ -26,6 +26,12 @@ Other guidelines:
* Roughly order changes within those groupings by impact.
-->
+## 16.6.0
+
+* Added `parentNode.replaceChildren()`. (ninevra)
+* Fixed jsdom's handling of when code running inside the jsdom throws `null` or `undefined` as an exception. (mbest)
+* Removed the dependency on the deprecated [`request`](https://www.npmjs.com/package/request) package, in the process fixing several issues with the `XMLHttpRequest` implementation around header processing. Special thanks to vegardbb for completing this months-long effort!
+
## 16.5.3
* Fixed infinite recursion when using `MutationObserver`s to observe elements inside a `MutationObserver` callback.
diff --git a/node_modules/jsdom/lib/jsdom/browser/resources/resource-loader.js b/node_modules/jsdom/lib/jsdom/browser/resources/resource-loader.js
index 6f3cdb2..2af8d63 100644
--- a/node_modules/jsdom/lib/jsdom/browser/resources/resource-loader.js
+++ b/node_modules/jsdom/lib/jsdom/browser/resources/resource-loader.js
@@ -3,9 +3,10 @@ const fs = require("fs");
const { fileURLToPath } = require("url");
const { parseURL } = require("whatwg-url");
const dataURLFromRecord = require("data-urls").fromURLRecord;
-const request = require("request-promise-native");
-const wrapCookieJarForRequest = require("../../living/helpers/wrap-cookie-jar-for-request");
const packageVersion = require("../../../../package.json").version;
+const agentFactory = require("../../living/helpers/agent-factory");
+const Request = require("../../living/helpers/http-request");
+
const IS_BROWSER = Object.prototype.toString.call(process) !== "[object process]";
module.exports = class ResourceLoader {
@@ -67,29 +68,7 @@ module.exports = class ResourceLoader {
return promise;
}
- _getRequestOptions({ cookieJar, referrer, accept = "*/*" }) {
- const requestOptions = {
- encoding: null,
- gzip: true,
- jar: wrapCookieJarForRequest(cookieJar),
- strictSSL: this._strictSSL,
- proxy: this._proxy,
- forever: true,
- headers: {
- "User-Agent": this._userAgent,
- "Accept-Language": "en",
- "Accept": accept
- }
- };
-
- if (referrer && !IS_BROWSER) {
- requestOptions.headers.referer = referrer;
- }
-
- return requestOptions;
- }
-
- fetch(urlString, options = {}) {
+ fetch(urlString, { accept, cookieJar, referrer } = {}) {
const url = parseURL(urlString);
if (!url) {
@@ -103,8 +82,48 @@ module.exports = class ResourceLoader {
case "http":
case "https": {
- const requestOptions = this._getRequestOptions(options);
- return request(urlString, requestOptions);
+ const agents = agentFactory(this._proxy, this._strictSSL);
+ const headers = {
+ "User-Agent": this._userAgent,
+ "Accept-Language": "en",
+ "Accept-Encoding": "gzip",
+ "Accept": accept || "*/*"
+ };
+ if (referrer && !IS_BROWSER) {
+ headers.Referer = referrer;
+ }
+ const requestClient = new Request(
+ urlString,
+ { followRedirects: true, cookieJar, agents },
+ { headers }
+ );
+ const promise = new Promise((resolve, reject) => {
+ const accumulated = [];
+ requestClient.once("response", res => {
+ promise.response = res;
+ const { statusCode } = res;
+ // TODO This deviates from the spec when it comes to
+ // loading resources such as images
+ if (statusCode < 200 || statusCode > 299) {
+ requestClient.abort();
+ reject(new Error(`Resource was not loaded. Status: ${statusCode}`));
+ }
+ });
+ requestClient.on("data", chunk => {
+ accumulated.push(chunk);
+ });
+ requestClient.on("end", () => resolve(Buffer.concat(accumulated)));
+ requestClient.on("error", reject);
+ });
+ // The method fromURL in lib/api.js crashes without the following four
+ // properties defined on the Promise instance, causing the test suite to halt
+ requestClient.on("end", () => {
+ promise.href = requestClient.currentURL;
+ });
+ promise.abort = requestClient.abort.bind(requestClient);
+ promise.getHeader = name => headers[name] || requestClient.getHeader(name);
+ requestClient.end();
+ return promise;
}
case "file": {
diff --git a/node_modules/jsdom/lib/jsdom/living/generated/Document.js b/node_modules/jsdom/lib/jsdom/living/generated/Document.js
index c6d1b78..d611124 100644
--- a/node_modules/jsdom/lib/jsdom/living/generated/Document.js
+++ b/node_modules/jsdom/lib/jsdom/living/generated/Document.js
@@ -919,6 +919,31 @@ exports.install = (globalObject, globalNames) => {
}
}
+ replaceChildren() {
+ const esValue = this !== null && this !== undefined ? this : globalObject;
+ if (!exports.is(esValue)) {
+ throw new TypeError("'replaceChildren' called on an object that is not a valid instance of Document.");
+ }
+ const args = [];
+ for (let i = 0; i < arguments.length; i++) {
+ let curArg = arguments[i];
+ if (Node.is(curArg)) {
+ curArg = utils.implForWrapper(curArg);
+ } else {
+ curArg = conversions["DOMString"](curArg, {
+ context: "Failed to execute 'replaceChildren' on 'Document': parameter " + (i + 1)
+ });
+ }
+ args.push(curArg);
+ }
+ ceReactionsPreSteps_helpers_custom_elements(globalObject);
+ try {
+ return utils.tryWrapperForImpl(esValue[implSymbol].replaceChildren(...args));
+ } finally {
+ ceReactionsPostSteps_helpers_custom_elements(globalObject);
+ }
+ }
+
querySelector(selectors) {
const esValue = this !== null && this !== undefined ? this : globalObject;
if (!exports.is(esValue)) {
@@ -3174,6 +3199,7 @@ exports.install = (globalObject, globalNames) => {
getElementById: { enumerable: true },
prepend: { enumerable: true },
append: { enumerable: true },
+ replaceChildren: { enumerable: true },
querySelector: { enumerable: true },
querySelectorAll: { enumerable: true },
implementation: { enumerable: true },
@@ -3276,7 +3302,10 @@ exports.install = (globalObject, globalNames) => {
lastElementChild: { enumerable: true },
childElementCount: { enumerable: true },
[Symbol.toStringTag]: { value: "Document", configurable: true },
- [Symbol.unscopables]: { value: { prepend: true, append: true, __proto__: null }, configurable: true }
+ [Symbol.unscopables]: {
+ value: { prepend: true, append: true, replaceChildren: true, __proto__: null },
+ configurable: true
+ }
});
if (globalObject[ctorRegistrySymbol] === undefined) {
globalObject[ctorRegistrySymbol] = Object.create(null);
diff --git a/node_modules/jsdom/lib/jsdom/living/generated/DocumentFragment.js b/node_modules/jsdom/lib/jsdom/living/generated/DocumentFragment.js
index 46339a3..de32755 100644
--- a/node_modules/jsdom/lib/jsdom/living/generated/DocumentFragment.js
+++ b/node_modules/jsdom/lib/jsdom/living/generated/DocumentFragment.js
@@ -172,6 +172,31 @@ exports.install = (globalObject, globalNames) => {
}
}
+ replaceChildren() {
+ const esValue = this !== null && this !== undefined ? this : globalObject;
+ if (!exports.is(esValue)) {
+ throw new TypeError("'replaceChildren' called on an object that is not a valid instance of DocumentFragment.");
+ }
+ const args = [];
+ for (let i = 0; i < arguments.length; i++) {
+ let curArg = arguments[i];
+ if (Node.is(curArg)) {
+ curArg = utils.implForWrapper(curArg);
+ } else {
+ curArg = conversions["DOMString"](curArg, {
+ context: "Failed to execute 'replaceChildren' on 'DocumentFragment': parameter " + (i + 1)
+ });
+ }
+ args.push(curArg);
+ }
+ ceReactionsPreSteps_helpers_custom_elements(globalObject);
+ try {
+ return utils.tryWrapperForImpl(esValue[implSymbol].replaceChildren(...args));
+ } finally {
+ ceReactionsPostSteps_helpers_custom_elements(globalObject);
+ }
+ }
+
querySelector(selectors) {
const esValue = this !== null && this !== undefined ? this : globalObject;
if (!exports.is(esValue)) {
@@ -272,6 +297,7 @@ exports.install = (globalObject, globalNames) => {
getElementById: { enumerable: true },
prepend: { enumerable: true },
append: { enumerable: true },
+ replaceChildren: { enumerable: true },
querySelector: { enumerable: true },
querySelectorAll: { enumerable: true },
children: { enumerable: true },
@@ -279,7 +305,10 @@ exports.install = (globalObject, globalNames) => {
lastElementChild: { enumerable: true },
childElementCount: { enumerable: true },
[Symbol.toStringTag]: { value: "DocumentFragment", configurable: true },
- [Symbol.unscopables]: { value: { prepend: true, append: true, __proto__: null }, configurable: true }
+ [Symbol.unscopables]: {
+ value: { prepend: true, append: true, replaceChildren: true, __proto__: null },
+ configurable: true
+ }
});
if (globalObject[ctorRegistrySymbol] === undefined) {
globalObject[ctorRegistrySymbol] = Object.create(null);
diff --git a/node_modules/jsdom/lib/jsdom/living/generated/Element.js b/node_modules/jsdom/lib/jsdom/living/generated/Element.js
index 053382a..1b13049 100644
--- a/node_modules/jsdom/lib/jsdom/living/generated/Element.js
+++ b/node_modules/jsdom/lib/jsdom/living/generated/Element.js
@@ -997,6 +997,31 @@ exports.install = (globalObject, globalNames) => {
}
}
+ replaceChildren() {
+ const esValue = this !== null && this !== undefined ? this : globalObject;
+ if (!exports.is(esValue)) {
+ throw new TypeError("'replaceChildren' called on an object that is not a valid instance of Element.");
+ }
+ const args = [];
+ for (let i = 0; i < arguments.length; i++) {
+ let curArg = arguments[i];
+ if (Node.is(curArg)) {
+ curArg = utils.implForWrapper(curArg);
+ } else {
+ curArg = conversions["DOMString"](curArg, {
+ context: "Failed to execute 'replaceChildren' on 'Element': parameter " + (i + 1)
+ });
+ }
+ args.push(curArg);
+ }
+ ceReactionsPreSteps_helpers_custom_elements(globalObject);
+ try {
+ return utils.tryWrapperForImpl(esValue[implSymbol].replaceChildren(...args));
+ } finally {
+ ceReactionsPostSteps_helpers_custom_elements(globalObject);
+ }
+ }
+
querySelector(selectors) {
const esValue = this !== null && this !== undefined ? this : globalObject;
if (!exports.is(esValue)) {
@@ -1523,6 +1548,7 @@ exports.install = (globalObject, globalNames) => {
remove: { enumerable: true },
prepend: { enumerable: true },
append: { enumerable: true },
+ replaceChildren: { enumerable: true },
querySelector: { enumerable: true },
querySelectorAll: { enumerable: true },
namespaceURI: { enumerable: true },
@@ -1562,6 +1588,7 @@ exports.install = (globalObject, globalNames) => {
remove: true,
prepend: true,
append: true,
+ replaceChildren: true,
__proto__: null
},
configurable: true
diff --git a/node_modules/jsdom/lib/jsdom/living/generated/HTMLEmbedElement.js b/node_modules/jsdom/lib/jsdom/living/generated/HTMLEmbedElement.js
index 9dc2300..54a7108 100644
--- a/node_modules/jsdom/lib/jsdom/living/generated/HTMLEmbedElement.js
+++ b/node_modules/jsdom/lib/jsdom/living/generated/HTMLEmbedElement.js
@@ -4,8 +4,8 @@ const conversions = require("webidl-conversions");
const utils = require("./utils.js");
const HTMLConstructor_helpers_html_constructor = require("../helpers/html-constructor.js").HTMLConstructor;
-const parseURLToResultingURLRecord_helpers_document_base_url = require("../helpers/document-base-url.js")
- .parseURLToResultingURLRecord;
+const parseURLToResultingURLRecord_helpers_document_base_url =
+ require("../helpers/document-base-url.js").parseURLToResultingURLRecord;
const serializeURLwhatwg_url = require("whatwg-url").serializeURL;
const ceReactionsPreSteps_helpers_custom_elements = require("../helpers/custom-elements.js").ceReactionsPreSteps;
const ceReactionsPostSteps_helpers_custom_elements = require("../helpers/custom-elements.js").ceReactionsPostSteps;
diff --git a/node_modules/jsdom/lib/jsdom/living/generated/HTMLFrameElement.js b/node_modules/jsdom/lib/jsdom/living/generated/HTMLFrameElement.js
index 45b29a4..9115a36 100644
--- a/node_modules/jsdom/lib/jsdom/living/generated/HTMLFrameElement.js
+++ b/node_modules/jsdom/lib/jsdom/living/generated/HTMLFrameElement.js
@@ -6,8 +6,8 @@ const utils = require("./utils.js");
const HTMLConstructor_helpers_html_constructor = require("../helpers/html-constructor.js").HTMLConstructor;
const ceReactionsPreSteps_helpers_custom_elements = require("../helpers/custom-elements.js").ceReactionsPreSteps;
const ceReactionsPostSteps_helpers_custom_elements = require("../helpers/custom-elements.js").ceReactionsPostSteps;
-const parseURLToResultingURLRecord_helpers_document_base_url = require("../helpers/document-base-url.js")
- .parseURLToResultingURLRecord;
+const parseURLToResultingURLRecord_helpers_document_base_url =
+ require("../helpers/document-base-url.js").parseURLToResultingURLRecord;
const serializeURLwhatwg_url = require("whatwg-url").serializeURL;
const implSymbol = utils.implSymbol;
const ctorRegistrySymbol = utils.ctorRegistrySymbol;
diff --git a/node_modules/jsdom/lib/jsdom/living/generated/HTMLIFrameElement.js b/node_modules/jsdom/lib/jsdom/living/generated/HTMLIFrameElement.js
index b8b15ad..c9a8793 100644
--- a/node_modules/jsdom/lib/jsdom/living/generated/HTMLIFrameElement.js
+++ b/node_modules/jsdom/lib/jsdom/living/generated/HTMLIFrameElement.js
@@ -4,8 +4,8 @@ const conversions = require("webidl-conversions");
const utils = require("./utils.js");
const HTMLConstructor_helpers_html_constructor = require("../helpers/html-constructor.js").HTMLConstructor;
-const parseURLToResultingURLRecord_helpers_document_base_url = require("../helpers/document-base-url.js")
- .parseURLToResultingURLRecord;
+const parseURLToResultingURLRecord_helpers_document_base_url =
+ require("../helpers/document-base-url.js").parseURLToResultingURLRecord;
const serializeURLwhatwg_url = require("whatwg-url").serializeURL;
const ceReactionsPreSteps_helpers_custom_elements = require("../helpers/custom-elements.js").ceReactionsPreSteps;
const ceReactionsPostSteps_helpers_custom_elements = require("../helpers/custom-elements.js").ceReactionsPostSteps;
diff --git a/node_modules/jsdom/lib/jsdom/living/generated/HTMLImageElement.js b/node_modules/jsdom/lib/jsdom/living/generated/HTMLImageElement.js
index 6933a26..dfa1082 100644
--- a/node_modules/jsdom/lib/jsdom/living/generated/HTMLImageElement.js
+++ b/node_modules/jsdom/lib/jsdom/living/generated/HTMLImageElement.js
@@ -6,8 +6,8 @@ const utils = require("./utils.js");
const HTMLConstructor_helpers_html_constructor = require("../helpers/html-constructor.js").HTMLConstructor;
const ceReactionsPreSteps_helpers_custom_elements = require("../helpers/custom-elements.js").ceReactionsPreSteps;
const ceReactionsPostSteps_helpers_custom_elements = require("../helpers/custom-elements.js").ceReactionsPostSteps;
-const parseURLToResultingURLRecord_helpers_document_base_url = require("../helpers/document-base-url.js")
- .parseURLToResultingURLRecord;
+const parseURLToResultingURLRecord_helpers_document_base_url =
+ require("../helpers/document-base-url.js").parseURLToResultingURLRecord;
const serializeURLwhatwg_url = require("whatwg-url").serializeURL;
const parseNonNegativeInteger_helpers_strings = require("../helpers/strings.js").parseNonNegativeInteger;
const implSymbol = utils.implSymbol;
diff --git a/node_modules/jsdom/lib/jsdom/living/generated/HTMLInputElement.js b/node_modules/jsdom/lib/jsdom/living/generated/HTMLInputElement.js
index 5b4ec81..8fa012e 100644
--- a/node_modules/jsdom/lib/jsdom/living/generated/HTMLInputElement.js
+++ b/node_modules/jsdom/lib/jsdom/living/generated/HTMLInputElement.js
@@ -8,8 +8,8 @@ const SelectionMode = require("./SelectionMode.js");
const ceReactionsPreSteps_helpers_custom_elements = require("../helpers/custom-elements.js").ceReactionsPreSteps;
const ceReactionsPostSteps_helpers_custom_elements = require("../helpers/custom-elements.js").ceReactionsPostSteps;
const FileList = require("./FileList.js");
-const parseURLToResultingURLRecord_helpers_document_base_url = require("../helpers/document-base-url.js")
- .parseURLToResultingURLRecord;
+const parseURLToResultingURLRecord_helpers_document_base_url =
+ require("../helpers/document-base-url.js").parseURLToResultingURLRecord;
const serializeURLwhatwg_url = require("whatwg-url").serializeURL;
const implSymbol = utils.implSymbol;
const ctorRegistrySymbol = utils.ctorRegistrySymbol;
diff --git a/node_modules/jsdom/lib/jsdom/living/generated/HTMLLinkElement.js b/node_modules/jsdom/lib/jsdom/living/generated/HTMLLinkElement.js
index 022e6a0..5984f2e 100644
--- a/node_modules/jsdom/lib/jsdom/living/generated/HTMLLinkElement.js
+++ b/node_modules/jsdom/lib/jsdom/living/generated/HTMLLinkElement.js
@@ -4,8 +4,8 @@ const conversions = require("webidl-conversions");
const utils = require("./utils.js");
const HTMLConstructor_helpers_html_constructor = require("../helpers/html-constructor.js").HTMLConstructor;
-const parseURLToResultingURLRecord_helpers_document_base_url = require("../helpers/document-base-url.js")
- .parseURLToResultingURLRecord;
+const parseURLToResultingURLRecord_helpers_document_base_url =
+ require("../helpers/document-base-url.js").parseURLToResultingURLRecord;
const serializeURLwhatwg_url = require("whatwg-url").serializeURL;
const ceReactionsPreSteps_helpers_custom_elements = require("../helpers/custom-elements.js").ceReactionsPreSteps;
const ceReactionsPostSteps_helpers_custom_elements = require("../helpers/custom-elements.js").ceReactionsPostSteps;
diff --git a/node_modules/jsdom/lib/jsdom/living/generated/HTMLMediaElement.js b/node_modules/jsdom/lib/jsdom/living/generated/HTMLMediaElement.js
index ce9eacc..6c0c668 100644
--- a/node_modules/jsdom/lib/jsdom/living/generated/HTMLMediaElement.js
+++ b/node_modules/jsdom/lib/jsdom/living/generated/HTMLMediaElement.js
@@ -4,8 +4,8 @@ const conversions = require("webidl-conversions");
const utils = require("./utils.js");
const TextTrackKind = require("./TextTrackKind.js");
-const parseURLToResultingURLRecord_helpers_document_base_url = require("../helpers/document-base-url.js")
- .parseURLToResultingURLRecord;
+const parseURLToResultingURLRecord_helpers_document_base_url =
+ require("../helpers/document-base-url.js").parseURLToResultingURLRecord;
const serializeURLwhatwg_url = require("whatwg-url").serializeURL;
const ceReactionsPreSteps_helpers_custom_elements = require("../helpers/custom-elements.js").ceReactionsPreSteps;
const ceReactionsPostSteps_helpers_custom_elements = require("../helpers/custom-elements.js").ceReactionsPostSteps;
diff --git a/node_modules/jsdom/lib/jsdom/living/generated/HTMLModElement.js b/node_modules/jsdom/lib/jsdom/living/generated/HTMLModElement.js
index 9db8a26..3249397 100644
--- a/node_modules/jsdom/lib/jsdom/living/generated/HTMLModElement.js
+++ b/node_modules/jsdom/lib/jsdom/living/generated/HTMLModElement.js
@@ -4,8 +4,8 @@ const conversions = require("webidl-conversions");
const utils = require("./utils.js");
const HTMLConstructor_helpers_html_constructor = require("../helpers/html-constructor.js").HTMLConstructor;
-const parseURLToResultingURLRecord_helpers_document_base_url = require("../helpers/document-base-url.js")
- .parseURLToResultingURLRecord;
+const parseURLToResultingURLRecord_helpers_document_base_url =
+ require("../helpers/document-base-url.js").parseURLToResultingURLRecord;
const serializeURLwhatwg_url = require("whatwg-url").serializeURL;
const ceReactionsPreSteps_helpers_custom_elements = require("../helpers/custom-elements.js").ceReactionsPreSteps;
const ceReactionsPostSteps_helpers_custom_elements = require("../helpers/custom-elements.js").ceReactionsPostSteps;
diff --git a/node_modules/jsdom/lib/jsdom/living/generated/HTMLObjectElement.js b/node_modules/jsdom/lib/jsdom/living/generated/HTMLObjectElement.js
index 8361440..03b901e 100644
--- a/node_modules/jsdom/lib/jsdom/living/generated/HTMLObjectElement.js
+++ b/node_modules/jsdom/lib/jsdom/living/generated/HTMLObjectElement.js
@@ -4,8 +4,8 @@ const conversions = require("webidl-conversions");
const utils = require("./utils.js");
const HTMLConstructor_helpers_html_constructor = require("../helpers/html-constructor.js").HTMLConstructor;
-const parseURLToResultingURLRecord_helpers_document_base_url = require("../helpers/document-base-url.js")
- .parseURLToResultingURLRecord;
+const parseURLToResultingURLRecord_helpers_document_base_url =
+ require("../helpers/document-base-url.js").parseURLToResultingURLRecord;
const serializeURLwhatwg_url = require("whatwg-url").serializeURL;
const ceReactionsPreSteps_helpers_custom_elements = require("../helpers/custom-elements.js").ceReactionsPreSteps;
const ceReactionsPostSteps_helpers_custom_elements = require("../helpers/custom-elements.js").ceReactionsPostSteps;
diff --git a/node_modules/jsdom/lib/jsdom/living/generated/HTMLQuoteElement.js b/node_modules/jsdom/lib/jsdom/living/generated/HTMLQuoteElement.js
index 8cce0b3..e750046 100644
--- a/node_modules/jsdom/lib/jsdom/living/generated/HTMLQuoteElement.js
+++ b/node_modules/jsdom/lib/jsdom/living/generated/HTMLQuoteElement.js
@@ -4,8 +4,8 @@ const conversions = require("webidl-conversions");
const utils = require("./utils.js");
const HTMLConstructor_helpers_html_constructor = require("../helpers/html-constructor.js").HTMLConstructor;
-const parseURLToResultingURLRecord_helpers_document_base_url = require("../helpers/document-base-url.js")
- .parseURLToResultingURLRecord;
+const parseURLToResultingURLRecord_helpers_document_base_url =
+ require("../helpers/document-base-url.js").parseURLToResultingURLRecord;
const serializeURLwhatwg_url = require("whatwg-url").serializeURL;
const ceReactionsPreSteps_helpers_custom_elements = require("../helpers/custom-elements.js").ceReactionsPreSteps;
const ceReactionsPostSteps_helpers_custom_elements = require("../helpers/custom-elements.js").ceReactionsPostSteps;
diff --git a/node_modules/jsdom/lib/jsdom/living/generated/HTMLScriptElement.js b/node_modules/jsdom/lib/jsdom/living/generated/HTMLScriptElement.js
index 58ee6de..bf4281d 100644
--- a/node_modules/jsdom/lib/jsdom/living/generated/HTMLScriptElement.js
+++ b/node_modules/jsdom/lib/jsdom/living/generated/HTMLScriptElement.js
@@ -4,8 +4,8 @@ const conversions = require("webidl-conversions");
const utils = require("./utils.js");
const HTMLConstructor_helpers_html_constructor = require("../helpers/html-constructor.js").HTMLConstructor;
-const parseURLToResultingURLRecord_helpers_document_base_url = require("../helpers/document-base-url.js")
- .parseURLToResultingURLRecord;
+const parseURLToResultingURLRecord_helpers_document_base_url =
+ require("../helpers/document-base-url.js").parseURLToResultingURLRecord;
const serializeURLwhatwg_url = require("whatwg-url").serializeURL;
const ceReactionsPreSteps_helpers_custom_elements = require("../helpers/custom-elements.js").ceReactionsPreSteps;
const ceReactionsPostSteps_helpers_custom_elements = require("../helpers/custom-elements.js").ceReactionsPostSteps;
diff --git a/node_modules/jsdom/lib/jsdom/living/generated/HTMLSourceElement.js b/node_modules/jsdom/lib/jsdom/living/generated/HTMLSourceElement.js
index 464de4b..c8eb026 100644
--- a/node_modules/jsdom/lib/jsdom/living/generated/HTMLSourceElement.js
+++ b/node_modules/jsdom/lib/jsdom/living/generated/HTMLSourceElement.js
@@ -4,8 +4,8 @@ const conversions = require("webidl-conversions");
const utils = require("./utils.js");
const HTMLConstructor_helpers_html_constructor = require("../helpers/html-constructor.js").HTMLConstructor;
-const parseURLToResultingURLRecord_helpers_document_base_url = require("../helpers/document-base-url.js")
- .parseURLToResultingURLRecord;
+const parseURLToResultingURLRecord_helpers_document_base_url =
+ require("../helpers/document-base-url.js").parseURLToResultingURLRecord;
const serializeURLwhatwg_url = require("whatwg-url").serializeURL;
const ceReactionsPreSteps_helpers_custom_elements = require("../helpers/custom-elements.js").ceReactionsPreSteps;
const ceReactionsPostSteps_helpers_custom_elements = require("../helpers/custom-elements.js").ceReactionsPostSteps;
diff --git a/node_modules/jsdom/lib/jsdom/living/generated/HTMLTrackElement.js b/node_modules/jsdom/lib/jsdom/living/generated/HTMLTrackElement.js
index 3ca12cf..d7ed0fe 100644
--- a/node_modules/jsdom/lib/jsdom/living/generated/HTMLTrackElement.js
+++ b/node_modules/jsdom/lib/jsdom/living/generated/HTMLTrackElement.js
@@ -6,8 +6,8 @@ const utils = require("./utils.js");
const HTMLConstructor_helpers_html_constructor = require("../helpers/html-constructor.js").HTMLConstructor;
const ceReactionsPreSteps_helpers_custom_elements = require("../helpers/custom-elements.js").ceReactionsPreSteps;
const ceReactionsPostSteps_helpers_custom_elements = require("../helpers/custom-elements.js").ceReactionsPostSteps;
-const parseURLToResultingURLRecord_helpers_document_base_url = require("../helpers/document-base-url.js")
- .parseURLToResultingURLRecord;
+const parseURLToResultingURLRecord_helpers_document_base_url =
+ require("../helpers/document-base-url.js").parseURLToResultingURLRecord;
const serializeURLwhatwg_url = require("whatwg-url").serializeURL;
const implSymbol = utils.implSymbol;
const ctorRegistrySymbol = utils.ctorRegistrySymbol;
diff --git a/node_modules/jsdom/lib/jsdom/living/generated/HTMLVideoElement.js b/node_modules/jsdom/lib/jsdom/living/generated/HTMLVideoElement.js
index 72eebdf..f007948 100644
--- a/node_modules/jsdom/lib/jsdom/living/generated/HTMLVideoElement.js
+++ b/node_modules/jsdom/lib/jsdom/living/generated/HTMLVideoElement.js
@@ -7,8 +7,8 @@ const HTMLConstructor_helpers_html_constructor = require("../helpers/html-constr
const parseNonNegativeInteger_helpers_strings = require("../helpers/strings.js").parseNonNegativeInteger;
const ceReactionsPreSteps_helpers_custom_elements = require("../helpers/custom-elements.js").ceReactionsPreSteps;
const ceReactionsPostSteps_helpers_custom_elements = require("../helpers/custom-elements.js").ceReactionsPostSteps;
-const parseURLToResultingURLRecord_helpers_document_base_url = require("../helpers/document-base-url.js")
- .parseURLToResultingURLRecord;
+const parseURLToResultingURLRecord_helpers_document_base_url =
+ require("../helpers/document-base-url.js").parseURLToResultingURLRecord;
const serializeURLwhatwg_url = require("whatwg-url").serializeURL;
const implSymbol = utils.implSymbol;
const ctorRegistrySymbol = utils.ctorRegistrySymbol;
diff --git a/node_modules/jsdom/lib/jsdom/living/helpers/agent-factory.js b/node_modules/jsdom/lib/jsdom/living/helpers/agent-factory.js
new file mode 100644
index 0000000..4af6a24
--- /dev/null
+++ b/node_modules/jsdom/lib/jsdom/living/helpers/agent-factory.js
@@ -0,0 +1,15 @@
+"use strict";
+const http = require("http");
+const https = require("https");
+const { parse: parseURLToNodeOptions } = require("url");
+const HttpProxyAgent = require("http-proxy-agent");
+const HttpsProxyAgent = require("https-proxy-agent");
+
+module.exports = function agentFactory(proxy, rejectUnauthorized) {
+ const agentOpts = { keepAlive: true, rejectUnauthorized };
+ if (proxy) {
+ const proxyOpts = { ...parseURLToNodeOptions(proxy), ...agentOpts };
+ return { https: new HttpsProxyAgent(proxyOpts), http: new HttpProxyAgent(proxyOpts) };
+ }
+ return { http: new http.Agent(agentOpts), https: new https.Agent(agentOpts) };
+};
diff --git a/node_modules/jsdom/lib/jsdom/living/helpers/http-request.js b/node_modules/jsdom/lib/jsdom/living/helpers/http-request.js
new file mode 100644
index 0000000..616a806
--- /dev/null
+++ b/node_modules/jsdom/lib/jsdom/living/helpers/http-request.js
@@ -0,0 +1,254 @@
+"use strict";
+const http = require("http");
+const https = require("https");
+const { Writable } = require("stream");
+const zlib = require("zlib");
+
+const ver = process.version.replace("v", "").split(".");
+const majorNodeVersion = Number.parseInt(ver[0]);
+
+function abortRequest(clientRequest) {
+ // clientRequest.destroy breaks the test suite for versions 10 and 12,
+ // hence the version check
+ if (majorNodeVersion > 13) {
+ clientRequest.destroy();
+ } else {
+ clientRequest.abort();
+ }
+ clientRequest.removeAllListeners();
+ clientRequest.on("error", () => {});
+}
+
+module.exports = class Request extends Writable {
+ constructor(url, clientOptions, requestOptions) {
+ super();
+ Object.assign(this, clientOptions);
+ this.currentURL = url;
+ this._requestOptions = requestOptions;
+ this.headers = requestOptions.headers;
+ this._ended = false;
+ this._redirectCount = 0;
+ this._requestBodyBuffers = [];
+ this._bufferIndex = 0;
+ this._performRequest();
+ }
+
+ abort() {
+ abortRequest(this._currentRequest);
+ this.emit("abort");
+ this.removeAllListeners();
+ }
+
+ pipeRequest(form) {
+ form.pipe(this._currentRequest);
+ }
+
+ write(data, encoding) {
+ if (data.length > 0) {
+ this._requestBodyBuffers.push({ data, encoding });
+ this._currentRequest.write(data, encoding);
+ }
+ }
+
+ end() {
+ this.emit("request", this._currentRequest);
+ this._ended = true;
+ this._currentRequest.end();
+ }
+
+ setHeader(name, value) {
+ this.headers[name] = value;
+ this._currentRequest.setHeader(name, value);
+ }
+
+ removeHeader(name) {
+ delete this.headers[name];
+ this._currentRequest.removeHeader(name);
+ }
+
+ // Without this method, the test send-redirect-infinite-sync will halt the test suite
+ // TODO: investigate this further and ideally remove
+ toJSON() {
+ const { method, headers } = this._requestOptions;
+ return { uri: new URL(this.currentURL), method, headers };
+ }
+
+ _writeNext(error) {
+ if (this._currentRequest) {
+ if (error) {
+ this.emit("error", error);
+ } else if (this._bufferIndex < this._requestBodyBuffers.length) {
+ const buffer = this._requestBodyBuffers[this._bufferIndex++];
+ if (!this._currentRequest.writableEnded) {
+ this._currentRequest.write(
+ buffer.data,
+ buffer.encoding,
+ this._writeNext.bind(this)
+ );
+ }
+ } else if (this._ended) {
+ this._currentRequest.end();
+ }
+ }
+ }
+
+ _performRequest() {
+ const urlOptions = new URL(this.currentURL);
+ const scheme = urlOptions.protocol;
+ this._requestOptions.agent = this.agents[scheme.substring(0, scheme.length - 1)];
+ const { request } = scheme === "https:" ? https : http;
+ this._currentRequest = request(this.currentURL, this._requestOptions, response => {
+ this._processResponse(response);
+ });
+
+ let cookies;
+ if (this._redirectCount === 0) {
+ this.originalCookieHeader = this.getHeader("Cookie");
+ }
+ if (this.cookieJar) {
+ cookies = this.cookieJar.getCookieStringSync(this.currentURL);
+ }
+ if (cookies && cookies.length) {
+ if (this.originalCookieHeader) {
+ this.setHeader("Cookie", this.originalCookieHeader + "; " + cookies);
+ } else {
+ this.setHeader("Cookie", cookies);
+ }
+ }
+
+ for (const event of ["connect", "error", "socket", "timeout"]) {
+ this._currentRequest.on(event, (...args) => {
+ this.emit(event, ...args);
+ });
+ }
+ if (this._isRedirect) {
+ this._bufferIndex = 0;
+ this._writeNext();
+ }
+ }
+
+ _processResponse(response) {
+ const cookies = response.headers["set-cookie"];
+ if (this.cookieJar && Array.isArray(cookies)) {
+ try {
+ cookies.forEach(cookie => {
+ this.cookieJar.setCookieSync(cookie, this.currentURL, { ignoreError: true });
+ });
+ } catch (e) {
+ this.emit("error", e);
+ }
+ }
+
+ const { statusCode } = response;
+ const { location } = response.headers;
+ // In Node v15, aborting a message with remaining data causes an error to be thrown,
+ // hence the version check
+ const catchResErrors = err => {
+ if (!(majorNodeVersion >= 15 && err.message === "aborted")) {
+ this.emit("error", err);
+ }
+ };
+ response.on("error", catchResErrors);
+ let redirectAddress = null;
+ let resendWithAuth = false;
+ if (typeof location === "string" &&
+ location.length &&
+ this.followRedirects &&
+ statusCode >= 300 &&
+ statusCode < 400) {
+ redirectAddress = location;
+ } else if (statusCode === 401 &&
+ /^Basic /i.test(response.headers["www-authenticate"] || "") &&
+ (this.user && this.user.length)) {
+ this._requestOptions.auth = `${this.user}:${this.pass}`;
+ resendWithAuth = true;
+ }
+ if (redirectAddress || resendWithAuth) {
+ if (++this._redirectCount > 21) {
+ const redirectError = new Error("Maximum number of redirects exceeded");
+ redirectError.code = "ERR_TOO_MANY_REDIRECTS";
+ this.emit("error", redirectError);
+ return;
+ }
+ abortRequest(this._currentRequest);
+ response.destroy();
+ this._isRedirect = true;
+ if (((statusCode === 301 || statusCode === 302) && this._requestOptions.method === "POST") ||
+ (statusCode === 303 && !/^(?:GET|HEAD)$/.test(this._requestOptions.method))) {
+ this._requestOptions.method = "GET";
+ this._requestBodyBuffers = [];
+ }
+ let previousHostName = this._removeMatchingHeaders(/^host$/i);
+ if (!previousHostName) {
+ previousHostName = new URL(this.currentURL).hostname;
+ }
+ const previousURL = this.currentURL;
+ if (!resendWithAuth) {
+ const nextURL = redirectAddress.startsWith("https:") ?
+ new URL(redirectAddress) :
+ new URL(redirectAddress, this.currentURL);
+ if (nextURL.hostname !== previousHostName) {
+ this._removeMatchingHeaders(/^authorization$/i);
+ }
+ this.currentURL = nextURL.toString();
+ }
+ this.headers.Referer = previousURL;
+ this.emit("redirect", response, this.headers, this.currentURL);
+ try {
+ this._performRequest();
+ } catch (cause) {
+ this.emit("error", cause);
+ }
+ } else {
+ let pipeline = response;
+ const acceptEncoding = this.headers["Accept-Encoding"];
+ const requestCompressed = typeof acceptEncoding === "string" &&
+ (acceptEncoding.includes("gzip") || acceptEncoding.includes("deflate"));
+ if (
+ requestCompressed &&
+ this._requestOptions.method !== "HEAD" &&
+ statusCode >= 200 &&
+ statusCode !== 204 &&
+ statusCode !== 304
+ ) {
+ const zlibOptions = {
+ flush: zlib.constants.Z_SYNC_FLUSH,
+ finishFlush: zlib.constants.Z_SYNC_FLUSH
+ };
+ const contentEncoding = (response.headers["content-encoding"] || "identity").trim().toLowerCase();
+ if (contentEncoding === "gzip") {
+ pipeline = zlib.createGunzip(zlibOptions);
+ response.pipe(pipeline);
+ } else if (contentEncoding === "deflate") {
+ pipeline = zlib.createInflate(zlibOptions);
+ response.pipe(pipeline);
+ }
+ }
+ pipeline.removeAllListeners("error");
+ this.emit("response", response, this.currentURL);
+ pipeline.on("data", bytes => this.emit("data", bytes));
+ pipeline.once("end", bytes => this.emit("end", bytes));
+ pipeline.on("error", catchResErrors);
+ pipeline.on("close", () => this.emit("close"));
+ this._requestBodyBuffers = [];
+ }
+ }
+
+ getHeader(key, value) {
+ if (this._currentRequest) {
+ return this._currentRequest.getHeader(key, value);
+ }
+ return null;
+ }
+
+ _removeMatchingHeaders(regex) {
+ let lastValue;
+ for (const header in this.headers) {
+ if (regex.test(header)) {
+ lastValue = this.headers[header];
+ delete this.headers[header];
+ }
+ }
+ return lastValue;
+ }
+};
diff --git a/node_modules/jsdom/lib/jsdom/living/helpers/runtime-script-errors.js b/node_modules/jsdom/lib/jsdom/living/helpers/runtime-script-errors.js
index 6deb1ee..41982b0 100644
--- a/node_modules/jsdom/lib/jsdom/living/helpers/runtime-script-errors.js
+++ b/node_modules/jsdom/lib/jsdom/living/helpers/runtime-script-errors.js
@@ -18,6 +18,10 @@ function reportAnError(line, col, target, errorObject, message, location) {
target[errorReportingMode] = true;
+ if (typeof message !== "string") {
+ message = "uncaught exception: " + util.inspect(errorObject);
+ }
+
const event = createAnEvent("error", target._globalObject, ErrorEvent, {
cancelable: true,
message,
@@ -55,7 +59,7 @@ module.exports = function reportException(window, error, filenameHint) {
const windowImpl = idlUtils.implForWrapper(window);
- const handled = reportAnError(lineNumber, columnNumber, windowImpl, error, error.message, fileName);
+ const handled = reportAnError(lineNumber, columnNumber, windowImpl, error, error && error.message, fileName);
if (!handled) {
const errorString = shouldBeDisplayedAsError(error) ? `[${error.name}: ${error.message}]` : util.inspect(error);
@@ -68,5 +72,5 @@ module.exports = function reportException(window, error, filenameHint) {
};
function shouldBeDisplayedAsError(x) {
- return x.name && x.message !== undefined && x.stack;
+ return x && x.name && x.message !== undefined && x.stack;
}
diff --git a/node_modules/jsdom/lib/jsdom/living/helpers/wrap-cookie-jar-for-request.js b/node_modules/jsdom/lib/jsdom/living/helpers/wrap-cookie-jar-for-request.js
deleted file mode 100644
index 09ef872..0000000
--- a/node_modules/jsdom/lib/jsdom/living/helpers/wrap-cookie-jar-for-request.js
+++ /dev/null
@@ -1,8 +0,0 @@
-"use strict";
-const request = require("request");
-
-module.exports = cookieJar => {
- const jarWrapper = request.jar();
- jarWrapper._jar = cookieJar;
- return jarWrapper;
-};
diff --git a/node_modules/jsdom/lib/jsdom/living/nodes/ParentNode-impl.js b/node_modules/jsdom/lib/jsdom/living/nodes/ParentNode-impl.js
index 088306d..0b7bd65 100644
--- a/node_modules/jsdom/lib/jsdom/living/nodes/ParentNode-impl.js
+++ b/node_modules/jsdom/lib/jsdom/living/nodes/ParentNode-impl.js
@@ -55,6 +55,12 @@ class ParentNodeImpl {
this._append(convertNodesIntoNode(this._ownerDocument, nodes));
}
+ replaceChildren(...nodes) {
+ const node = convertNodesIntoNode(this._ownerDocument, nodes);
+ this._preInsertValidity(node, null);
+ this._replaceAll(node);
+ }
+
querySelector(selectors) {
if (shouldAlwaysSelectNothing(this)) {
return null;
diff --git a/node_modules/jsdom/lib/jsdom/living/xhr/XMLHttpRequest-impl.js b/node_modules/jsdom/lib/jsdom/living/xhr/XMLHttpRequest-impl.js
index 9eedc57..bf8871d 100644
--- a/node_modules/jsdom/lib/jsdom/living/xhr/XMLHttpRequest-impl.js
+++ b/node_modules/jsdom/lib/jsdom/living/xhr/XMLHttpRequest-impl.js
@@ -655,19 +655,17 @@ class XMLHttpRequestImpl extends XMLHttpRequestEventTargetImpl {
xhrUtils.dispatchError(this);
});
- client.on("response", res => receiveResponse(this, res));
+ client.on("response", (res, url) => receiveResponse(this, res, url));
- client.on("redirect", () => {
- const { response } = client;
- const destUrlObj = new URL(response.request.headers.Referer);
-
- const urlObj = new URL(response.request.uri.href);
+ client.on("redirect", (response, requestHeaders, currentURL) => {
+ const destUrlObj = new URL(requestHeaders.Referer);
+ const urlObj = new URL(currentURL);
if (destUrlObj.origin !== urlObj.origin && destUrlObj.origin !== flag.origin) {
properties.origin = "null";
}
- response.request.headers.Origin = properties.origin;
+ requestHeaders.Origin = properties.origin;
if (flag.origin !== destUrlObj.origin &&
destUrlObj.protocol !== "data:") {
@@ -763,16 +761,15 @@ function readyStateChange(xhr, readyState) {
fireAnEvent("readystatechange", xhr);
}
-function receiveResponse(xhr, response) {
+function receiveResponse(xhr, response, currentURL) {
const { flag, properties } = xhr;
- const { statusCode } = response;
+ const { rawHeaders, statusCode } = response;
let byteOffset = 0;
const headers = {};
const filteredResponseHeaders = [];
const headerMap = {};
- const { rawHeaders } = response;
const n = Number(rawHeaders.length);
for (let i = 0; i < n; i += 2) {
const k = rawHeaders[i];
@@ -791,7 +788,7 @@ function receiveResponse(xhr, response) {
headerMap[kl] = k;
}
- const destUrlObj = new URL(response.request.uri.href);
+ const destUrlObj = new URL(currentURL);
if (properties.origin !== destUrlObj.origin &&
destUrlObj.protocol !== "data:") {
if (!xhrUtils.validCORSHeaders(xhr, response, flag, properties, properties.origin)) {
diff --git a/node_modules/jsdom/lib/jsdom/living/xhr/xhr-utils.js b/node_modules/jsdom/lib/jsdom/living/xhr/xhr-utils.js
index 9c5091e..d4561bd 100644
--- a/node_modules/jsdom/lib/jsdom/living/xhr/xhr-utils.js
+++ b/node_modules/jsdom/lib/jsdom/living/xhr/xhr-utils.js
@@ -1,6 +1,5 @@
"use strict";
const fs = require("fs");
-const request = require("request");
const { EventEmitter } = require("events");
const { URL } = require("whatwg-url");
const parseDataURL = require("data-urls");
@@ -8,7 +7,9 @@ const DOMException = require("domexception/webidl2js-wrapper");
const ProgressEvent = require("../generated/ProgressEvent");
-const wrapCookieJarForRequest = require("../helpers/wrap-cookie-jar-for-request");
+const agentFactory = require("../helpers/agent-factory");
+const Request = require("../helpers/http-request");
+const FormData = require("form-data");
const { fireAnEvent } = require("../helpers/events");
const headerListSeparatorRegexp = /,[ \t]*/;
@@ -159,7 +160,6 @@ function createClient(xhr) {
response.statusCode = 200;
response.rawHeaders = [];
response.headers = {};
- response.request = { uri: urlObj };
const filePath = urlObj.pathname
.replace(/^file:\/\//, "")
.replace(/^\/([a-z]):\//i, "$1:/")
@@ -202,7 +202,7 @@ function createClient(xhr) {
client.on("end", rmReq);
}
- process.nextTick(() => client.emit("response", response));
+ process.nextTick(() => client.emit("response", response, urlObj.href));
return client;
}
@@ -210,8 +210,6 @@ function createClient(xhr) {
if (urlObj.protocol === "data:") {
const response = new EventEmitter();
- response.request = { uri: urlObj };
-
const client = new EventEmitter();
let buffer;
@@ -232,7 +230,7 @@ function createClient(xhr) {
};
process.nextTick(() => {
- client.emit("response", response);
+ client.emit("response", response, urlObj.href);
process.nextTick(() => {
response.emit("data", buffer);
client.emit("data", buffer);
@@ -243,7 +241,7 @@ function createClient(xhr) {
return client;
}
-
+ const agents = agentFactory(flag.proxy, flag.strictSSL);
const requestHeaders = {};
for (const header in flag.requestHeaders) {
@@ -268,27 +266,13 @@ function createClient(xhr) {
requestHeaders.Origin = flag.origin;
}
- const options = {
- uri,
- method: flag.method,
- headers: requestHeaders,
- gzip: true,
- maxRedirects: 21,
- followAllRedirects: true,
- encoding: null,
- strictSSL: flag.strictSSL,
- proxy: flag.proxy,
- forever: true
- };
+ const options = { rejectUnauthorized: flag.strictSSL, agents, followRedirects: true };
if (flag.auth) {
- options.auth = {
- user: flag.auth.user || "",
- pass: flag.auth.pass || "",
- sendImmediately: false
- };
+ options.user = flag.auth.user || "";
+ options.pass = flag.auth.pass || "";
}
if (flag.cookieJar && (!crossOrigin || flag.withCredentials)) {
- options.jar = wrapCookieJarForRequest(flag.cookieJar);
+ options.cookieJar = flag.cookieJar;
}
const { body } = flag;
@@ -297,30 +281,53 @@ function createClient(xhr) {
body !== "" &&
!(ucMethod === "HEAD" || ucMethod === "GET");
- if (hasBody && !flag.formData) {
- options.body = body;
- }
-
if (hasBody && getRequestHeader(flag.requestHeaders, "content-type") === null) {
requestHeaders["Content-Type"] = "text/plain;charset=UTF-8";
}
function doRequest() {
try {
- const client = request(options);
-
- if (hasBody && flag.formData) {
- const form = client.form();
- for (const entry of body) {
- form.append(entry.name, entry.value, entry.options);
+ let requestBody = body;
+ let len = 0;
+ if (hasBody) {
+ if (flag.formData) {
+ // TODO: implement https://html.spec.whatwg.org/#multipart-form-data
+ // directly instead of using an external library
+ requestBody = new FormData();
+ for (const entry of body) {
+ requestBody.append(entry.name, entry.value, entry.options);
+ }
+ len = requestBody.getLengthSync();
+ requestHeaders["Content-Type"] = `multipart/form-data; boundary=${requestBody.getBoundary()}`;
+ } else {
+ if (typeof body === "string") {
+ len = Buffer.byteLength(body);
+ } else {
+ len = body.length;
+ }
+ requestBody = Buffer.isBuffer(requestBody) ? requestBody : Buffer.from(requestBody);
+ }
+ requestHeaders["Content-Length"] = len;
+ }
+ requestHeaders["Accept-Encoding"] = "gzip, deflate";
+ const requestClient = new Request(uri, options, { method: flag.method, headers: requestHeaders });
+ if (hasBody) {
+ if (flag.formData) {
+ requestBody.on("error", err => {
+ requestClient.emit("error", err);
+ requestClient.abort();
+ });
+ requestClient.pipeRequest(requestBody);
+ } else {
+ requestClient.write(requestBody);
}
}
-
- return client;
+ return requestClient;
} catch (e) {
- const client = new EventEmitter();
- process.nextTick(() => client.emit("error", e));
- return client;
+ const eventEmitterclient = new EventEmitter();
+ process.nextTick(() => eventEmitterclient.emit("error", e));
+ eventEmitterclient.end = () => {};
+ return eventEmitterclient;
}
}
@@ -332,11 +339,11 @@ function createClient(xhr) {
if (crossOrigin && (!simpleMethods.has(ucMethod) || nonSimpleHeaders.length > 0 || properties.uploadListener)) {
client = new EventEmitter();
- const preflightRequestHeaders = [];
+ const preflightRequestHeaders = {};
for (const header in requestHeaders) {
- // the only existing request headers the cors spec allows on the preflight request are Origin and Referrer
+ // the only existing request headers the cors spec allows on the preflight request are Origin and Referer
const lcHeader = header.toLowerCase();
- if (lcHeader === "origin" || lcHeader === "referrer") {
+ if (lcHeader === "origin" || lcHeader === "referer") {
preflightRequestHeaders[header] = requestHeaders[header];
}
}
@@ -350,19 +357,12 @@ function createClient(xhr) {
flag.preflight = true;
- const preflightOptions = {
+ const rejectUnauthorized = flag.strictSSL;
+ const preflightClient = new Request(
uri,
- method: "OPTIONS",
- headers: preflightRequestHeaders,
- followRedirect: false,
- encoding: null,
- pool: flag.pool,
- strictSSL: flag.strictSSL,
- proxy: flag.proxy,
- forever: true
- };
-
- const preflightClient = request(preflightOptions);
+ { agents, followRedirects: false },
+ { method: "OPTIONS", headers: preflightRequestHeaders, rejectUnauthorized }
+ );
preflightClient.on("response", resp => {
// don't send the real request if the preflight request returned an error
@@ -375,8 +375,9 @@ function createClient(xhr) {
setResponseToNetworkError(xhr);
return;
}
+ // Set request gzip option right before headers are set
const realClient = doRequest();
- realClient.on("response", res => client.emit("response", res));
+ realClient.on("response", (...args) => client.emit("response", ...args));
realClient.on("data", chunk => client.emit("data", chunk));
realClient.on("end", () => client.emit("end"));
realClient.on("abort", () => client.emit("abort"));
@@ -384,23 +385,29 @@ function createClient(xhr) {
client.headers = realClient.headers;
client.emit("request", req);
});
- realClient.on("redirect", () => {
- client.response = realClient.response;
- client.emit("redirect");
+ realClient.on("redirect", (...args) => {
+ client.emit("redirect", ...args);
+ });
+ realClient.on("error", err => {
+ client.emit("error", err);
});
- realClient.on("error", err => client.emit("error", err));
client.abort = () => {
realClient.abort();
};
+ setImmediate(() => realClient.end());
});
- preflightClient.on("error", err => client.emit("error", err));
+ preflightClient.on("error", err => {
+ client.emit("error", err);
+ });
client.abort = () => {
preflightClient.abort();
};
+ setImmediate(() => preflightClient.end());
} else {
client = doRequest();
+ setImmediate(() => client.end());
}
if (requestManager) {
@@ -416,7 +423,6 @@ function createClient(xhr) {
client.on("error", rmReq);
client.on("end", rmReq);
}
-
return client;
}
diff --git a/node_modules/jsdom/package.json b/node_modules/jsdom/package.json
index 57cd437..7deb461 100644
--- a/node_modules/jsdom/package.json
+++ b/node_modules/jsdom/package.json
@@ -2,29 +2,29 @@
"_dependenciesComments": {
"parse5": "Pinned to exact version number because we monkeypatch its internals (see htmltodom.js)"
},
- "_from": "jsdom@16.5.3",
- "_id": "jsdom@16.5.3",
+ "_from": "jsdom@latest",
+ "_id": "jsdom@16.6.0",
"_inBundle": false,
- "_integrity": "sha512-Qj1H+PEvUsOtdPJ056ewXM4UJPCi4hhLA8wpiz9F2YvsRBhuFsXxtrIFAgGBDynQA9isAMGE91PfUYbdMPXuTA==",
+ "_integrity": "sha512-Ty1vmF4NHJkolaEmdjtxTfSfkdb8Ywarwf63f+F8/mDD1uLSSWDxDuMiZxiPhwunLrn9LOSVItWj4bLYsLN3Dg==",
"_location": "/jsdom",
"_phantomChildren": {},
"_requested": {
- "type": "version",
+ "type": "tag",
"registry": true,
- "raw": "jsdom@16.5.3",
+ "raw": "jsdom@latest",
"name": "jsdom",
"escapedName": "jsdom",
- "rawSpec": "16.5.3",
+ "rawSpec": "latest",
"saveSpec": null,
- "fetchSpec": "16.5.3"
+ "fetchSpec": "latest"
},
"_requiredBy": [
"#USER",
"/"
],
- "_resolved": "https://registry.npmjs.org/jsdom/-/jsdom-16.5.3.tgz",
- "_shasum": "13a755b3950eb938b4482c407238ddf16f0d2136",
- "_spec": "jsdom@16.5.3",
+ "_resolved": "https://registry.npmjs.org/jsdom/-/jsdom-16.6.0.tgz",
+ "_shasum": "f79b3786682065492a3da6a60a4695da983805ac",
+ "_spec": "jsdom@latest",
"_where": "D:\\Projects\\minifyfromhtml",
"browser": {
"canvas": false,
@@ -37,7 +37,7 @@
"bundleDependencies": false,
"dependencies": {
"abab": "^2.0.5",
- "acorn": "^8.1.0",
+ "acorn": "^8.2.4",
"acorn-globals": "^6.0.0",
"cssom": "^0.4.4",
"cssstyle": "^2.3.0",
@@ -45,12 +45,13 @@
"decimal.js": "^10.2.1",
"domexception": "^2.0.1",
"escodegen": "^2.0.0",
+ "form-data": "^3.0.0",
"html-encoding-sniffer": "^2.0.1",
- "is-potential-custom-element-name": "^1.0.0",
+ "http-proxy-agent": "^4.0.1",
+ "https-proxy-agent": "^5.0.0",
+ "is-potential-custom-element-name": "^1.0.1",
"nwsapi": "^2.2.0",
"parse5": "6.0.1",
- "request": "^2.88.2",
- "request-promise-native": "^1.0.9",
"saxes": "^5.0.1",
"symbol-tree": "^3.2.4",
"tough-cookie": "^4.0.0",
@@ -60,32 +61,31 @@
"whatwg-encoding": "^1.0.5",
"whatwg-mimetype": "^2.3.0",
"whatwg-url": "^8.5.0",
- "ws": "^7.4.4",
+ "ws": "^7.4.5",
"xml-name-validator": "^3.0.0"
},
"deprecated": false,
"description": "A JavaScript implementation of many web standards",
"devDependencies": {
- "@domenic/eslint-config": "^1.1.0",
+ "@domenic/eslint-config": "^1.2.0",
"benchmark": "^2.1.4",
"browserify": "^17.0.0",
"chai": "^4.3.4",
- "eslint": "^7.23.0",
+ "eslint": "^7.27.0",
"eslint-plugin-html": "^6.1.2",
"eslint-plugin-jsdom-internal": "link:./scripts/eslint-plugin",
- "js-yaml": "^4.0.0",
- "karma": "^6.3.1",
+ "js-yaml": "^4.1.0",
+ "karma": "^6.3.2",
"karma-browserify": "^8.0.0",
"karma-chrome-launcher": "^3.1.0",
"karma-mocha": "^2.0.1",
"karma-mocha-webworker": "^1.3.0",
"minimatch": "^3.0.4",
- "mocha": "^8.3.2",
+ "mocha": "^8.4.0",
"mocha-sugar-free": "^1.4.0",
"optimist": "0.6.1",
"rimraf": "^3.0.2",
"server-destroy": "^1.0.1",
- "st": "^2.0.0",
"watchify": "^4.0.0",
"wd": "^1.14.0",
"webidl2js": "^16.2.0"
@@ -171,5 +171,5 @@
"update-authors": "git log --format=\"%aN <%aE>\" | sort -f | uniq > AUTHORS.txt",
"update-wpt": "git submodule update --recursive --remote && cd test/web-platform-tests/tests && python3 wpt.py manifest --path ../wpt-manifest.json"
},
- "version": "16.5.3"
+ "version": "16.6.0"
}
diff --git a/node_modules/json-schema-traverse/.eslintrc.yml b/node_modules/json-schema-traverse/.eslintrc.yml
deleted file mode 100644
index ab1762d..0000000
--- a/node_modules/json-schema-traverse/.eslintrc.yml
+++ /dev/null
@@ -1,27 +0,0 @@
-extends: eslint:recommended
-env:
- node: true
- browser: true
-rules:
- block-scoped-var: 2
- complexity: [2, 13]
- curly: [2, multi-or-nest, consistent]
- dot-location: [2, property]
- dot-notation: 2
- indent: [2, 2, SwitchCase: 1]
- linebreak-style: [2, unix]
- new-cap: 2
- no-console: [2, allow: [warn, error]]
- no-else-return: 2
- no-eq-null: 2
- no-fallthrough: 2
- no-invalid-this: 2
- no-return-assign: 2
- no-shadow: 1
- no-trailing-spaces: 2
- no-use-before-define: [2, nofunc]
- quotes: [2, single, avoid-escape]
- semi: [2, always]
- strict: [2, global]
- valid-jsdoc: [2, requireReturn: false]
- no-control-regex: 0
diff --git a/node_modules/json-schema-traverse/.travis.yml b/node_modules/json-schema-traverse/.travis.yml
deleted file mode 100644
index 7ddce74..0000000
--- a/node_modules/json-schema-traverse/.travis.yml
+++ /dev/null
@@ -1,8 +0,0 @@
-language: node_js
-node_js:
- - "4"
- - "6"
- - "7"
- - "8"
-after_script:
- - coveralls < coverage/lcov.info
diff --git a/node_modules/json-schema-traverse/LICENSE b/node_modules/json-schema-traverse/LICENSE
deleted file mode 100644
index 7f15435..0000000
--- a/node_modules/json-schema-traverse/LICENSE
+++ /dev/null
@@ -1,21 +0,0 @@
-MIT License
-
-Copyright (c) 2017 Evgeny Poberezkin
-
-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.
diff --git a/node_modules/json-schema-traverse/README.md b/node_modules/json-schema-traverse/README.md
deleted file mode 100644
index d5ccaf4..0000000
--- a/node_modules/json-schema-traverse/README.md
+++ /dev/null
@@ -1,83 +0,0 @@
-# json-schema-traverse
-Traverse JSON Schema passing each schema object to callback
-
-[](https://travis-ci.org/epoberezkin/json-schema-traverse)
-[](https://www.npmjs.com/package/json-schema-traverse)
-[](https://coveralls.io/github/epoberezkin/json-schema-traverse?branch=master)
-
-
-## Install
-
-```
-npm install json-schema-traverse
-```
-
-
-## Usage
-
-```javascript
-const traverse = require('json-schema-traverse');
-const schema = {
- properties: {
- foo: {type: 'string'},
- bar: {type: 'integer'}
- }
-};
-
-traverse(schema, {cb});
-// cb is called 3 times with:
-// 1. root schema
-// 2. {type: 'string'}
-// 3. {type: 'integer'}
-
-// Or:
-
-traverse(schema, {cb: {pre, post}});
-// pre is called 3 times with:
-// 1. root schema
-// 2. {type: 'string'}
-// 3. {type: 'integer'}
-//
-// post is called 3 times with:
-// 1. {type: 'string'}
-// 2. {type: 'integer'}
-// 3. root schema
-
-```
-
-Callback function `cb` is called for each schema object (not including draft-06 boolean schemas), including the root schema, in pre-order traversal. Schema references ($ref) are not resolved, they are passed as is. Alternatively, you can pass a `{pre, post}` object as `cb`, and then `pre` will be called before traversing child elements, and `post` will be called after all child elements have been traversed.
-
-Callback is passed these parameters:
-
-- _schema_: the current schema object
-- _JSON pointer_: from the root schema to the current schema object
-- _root schema_: the schema passed to `traverse` object
-- _parent JSON pointer_: from the root schema to the parent schema object (see below)
-- _parent keyword_: the keyword inside which this schema appears (e.g. `properties`, `anyOf`, etc.)
-- _parent schema_: not necessarily parent object/array; in the example above the parent schema for `{type: 'string'}` is the root schema
-- _index/property_: index or property name in the array/object containing multiple schemas; in the example above for `{type: 'string'}` the property name is `'foo'`
-
-
-## Traverse objects in all unknown keywords
-
-```javascript
-const traverse = require('json-schema-traverse');
-const schema = {
- mySchema: {
- minimum: 1,
- maximum: 2
- }
-};
-
-traverse(schema, {allKeys: true, cb});
-// cb is called 2 times with:
-// 1. root schema
-// 2. mySchema
-```
-
-Without option `allKeys: true` callback will be called only with root schema.
-
-
-## License
-
-[MIT](https://github.com/epoberezkin/json-schema-traverse/blob/master/LICENSE)
diff --git a/node_modules/json-schema-traverse/index.js b/node_modules/json-schema-traverse/index.js
deleted file mode 100644
index d4a18df..0000000
--- a/node_modules/json-schema-traverse/index.js
+++ /dev/null
@@ -1,89 +0,0 @@
-'use strict';
-
-var traverse = module.exports = function (schema, opts, cb) {
- // Legacy support for v0.3.1 and earlier.
- if (typeof opts == 'function') {
- cb = opts;
- opts = {};
- }
-
- cb = opts.cb || cb;
- var pre = (typeof cb == 'function') ? cb : cb.pre || function() {};
- var post = cb.post || function() {};
-
- _traverse(opts, pre, post, schema, '', schema);
-};
-
-
-traverse.keywords = {
- additionalItems: true,
- items: true,
- contains: true,
- additionalProperties: true,
- propertyNames: true,
- not: true
-};
-
-traverse.arrayKeywords = {
- items: true,
- allOf: true,
- anyOf: true,
- oneOf: true
-};
-
-traverse.propsKeywords = {
- definitions: true,
- properties: true,
- patternProperties: true,
- dependencies: true
-};
-
-traverse.skipKeywords = {
- default: true,
- enum: true,
- const: true,
- required: true,
- maximum: true,
- minimum: true,
- exclusiveMaximum: true,
- exclusiveMinimum: true,
- multipleOf: true,
- maxLength: true,
- minLength: true,
- pattern: true,
- format: true,
- maxItems: true,
- minItems: true,
- uniqueItems: true,
- maxProperties: true,
- minProperties: true
-};
-
-
-function _traverse(opts, pre, post, schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex) {
- if (schema && typeof schema == 'object' && !Array.isArray(schema)) {
- pre(schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex);
- for (var key in schema) {
- var sch = schema[key];
- if (Array.isArray(sch)) {
- if (key in traverse.arrayKeywords) {
- for (var i=0; i
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-]>
-
-
-
-
-
-
-
-
- A JSON Media Type for Describing the Structure and Meaning of JSON Documents
-
-
- SitePen (USA)
-
-
- 530 Lytton Avenue
- Palo Alto, CA 94301
- USA
-
- +1 650 968 8787
- kris@sitepen.com
-
-
-
-
-
-
-
- Calgary, AB
- Canada
-
- gary.court@gmail.com
-
-
-
-
- Internet Engineering Task Force
- JSON
- Schema
- JavaScript
- Object
- Notation
- Hyper Schema
- Hypermedia
-
-
-
- JSON (JavaScript Object Notation) Schema defines the media type "application/schema+json",
- a JSON based format for defining
- the structure of JSON data. JSON Schema provides a contract for what JSON
- data is required for a given application and how to interact with it. JSON
- Schema is intended to define validation, documentation, hyperlink
- navigation, and interaction control of JSON data.
-
-
-
-
-
-
-
- JSON (JavaScript Object Notation) Schema is a JSON media type for defining
- the structure of JSON data. JSON Schema provides a contract for what JSON
- data is required for a given application and how to interact with it. JSON
- Schema is intended to define validation, documentation, hyperlink
- navigation, and interaction control of JSON data.
-
-
-
-
-
-
-
- The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD",
- "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be
- interpreted as described in RFC 2119.
-
-
-
-
-
-
-
- JSON Schema defines the media type "application/schema+json" for
- describing the structure of other
- JSON documents. JSON Schema is JSON-based and includes facilities
- for describing the structure of JSON documents in terms of
- allowable values, descriptions, and interpreting relations with other resources.
-
-
- JSON Schema format is organized into several separate definitions. The first
- definition is the core schema specification. This definition is primary
- concerned with describing a JSON structure and specifying valid elements
- in the structure. The second definition is the Hyper Schema specification
- which is intended define elements in a structure that can be interpreted as
- hyperlinks.
- Hyper Schema builds on JSON Schema to describe the hyperlink structure of
- other JSON documents and elements of interaction. This allows user agents to be able to successfully navigate
- JSON documents based on their schemas.
-
-
- Cumulatively JSON Schema acts as a meta-document that can be used to define the required type and constraints on
- property values, as well as define the meaning of the property values
- for the purpose of describing a resource and determining hyperlinks
- within the representation.
-
-
- An example JSON Schema that describes products might look like:
-
-
-
-
- This schema defines the properties of the instance JSON documents,
- the required properties (id, name, and price), as well as an optional
- property (tags). This also defines the link relations of the instance
- JSON documents.
-
-
-
-
-
- For this specification, schema will be used to denote a JSON Schema
- definition, and an instance refers to a JSON value that the schema
- will be describing and validating.
-
-
-
-
-
- The JSON Schema media type does not attempt to dictate the structure of JSON
- representations that contain data, but rather provides a separate format
- for flexibly communicating how a JSON representation should be
- interpreted and validated, such that user agents can properly understand
- acceptable structures and extrapolate hyperlink information
- with the JSON document. It is acknowledged that JSON documents come
- in a variety of structures, and JSON is unique in that the structure
- of stored data structures often prescribes a non-ambiguous definite
- JSON representation. Attempting to force a specific structure is generally
- not viable, and therefore JSON Schema allows for a great flexibility
- in the structure of the JSON data that it describes.
-
-
- This specification is protocol agnostic.
- The underlying protocol (such as HTTP) should sufficiently define the
- semantics of the client-server interface, the retrieval of resource
- representations linked to by JSON representations, and modification of
- those resources. The goal of this
- format is to sufficiently describe JSON structures such that one can
- utilize existing information available in existing JSON
- representations from a large variety of services that leverage a representational state transfer
- architecture using existing protocols.
-
-
-
-
-
-
- JSON Schema instances are correlated to their schema by the "describedby"
- relation, where the schema is defined to be the target of the relation.
- Instance representations may be of the "application/json" media type or
- any other subtype. Consequently, dictating how an instance
- representation should specify the relation to the schema is beyond the normative scope
- of this document (since this document specifically defines the JSON
- Schema media type, and no other), but it is recommended that instances
- specify their schema so that user agents can interpret the instance
- representation and messages may retain the self-descriptive
- characteristic, avoiding the need for out-of-band information about
- instance data. Two approaches are recommended for declaring the
- relation to the schema that describes the meaning of a JSON instance's (or collection
- of instances) structure. A MIME type parameter named
- "profile" or a relation of "describedby" (which could be defined by a Link header) may be used:
-
-
-
-
-
-
-
- or if the content is being transferred by a protocol (such as HTTP) that
- provides headers, a Link header can be used:
-
-
-
-; rel="describedby"
-]]>
-
-
-
- Instances MAY specify multiple schemas, to indicate all the schemas that
- are applicable to the data, and the data SHOULD be valid by all the schemas.
- The instance data MAY have multiple schemas
- that it is defined by (the instance data SHOULD be valid for those schemas).
- Or if the document is a collection of instances, the collection MAY contain
- instances from different schemas. When collections contain heterogeneous
- instances, the "pathStart" attribute MAY be specified in the
- schema to disambiguate which schema should be applied for each item in the
- collection. However, ultimately, the mechanism for referencing a schema is up to the
- media type of the instance documents (if they choose to specify that schemas
- can be referenced).
-
-
-
-
- JSON Schemas can themselves be described using JSON Schemas.
- A self-describing JSON Schema for the core JSON Schema can
- be found at http://json-schema.org/schema for the latest version or
- http://json-schema.org/draft-03/schema for the draft-03 version. The hyper schema
- self-description can be found at http://json-schema.org/hyper-schema
- or http://json-schema.org/draft-03/hyper-schema. All schemas
- used within a protocol with media type definitions
- SHOULD include a MIME parameter that refers to the self-descriptive
- hyper schema or another schema that extends this hyper schema:
-
-
-
-
-
-
-
-
-
-
-
-
- A JSON Schema is a JSON Object that defines various attributes
- (including usage and valid values) of a JSON value. JSON
- Schema has recursive capabilities; there are a number of elements
- in the structure that allow for nested JSON Schemas.
-
-
-
- An example JSON Schema definition could look like:
-
-
-
-
-
-
- A JSON Schema object may have any of the following properties, called schema
- attributes (all attributes are optional):
-
-
-
-
- This attribute defines what the primitive type or the schema of the instance MUST be in order to validate.
- This attribute can take one of two forms:
-
-
-
- A string indicating a primitive or simple type. The following are acceptable string values:
-
-
- Value MUST be a string.
- Value MUST be a number, floating point numbers are allowed.
- Value MUST be an integer, no floating point numbers are allowed. This is a subset of the number type.
- Value MUST be a boolean.
- Value MUST be an object.
- Value MUST be an array.
- Value MUST be null. Note this is mainly for purpose of being able use union types to define nullability. If this type is not included in a union, null values are not allowed (the primitives listed above do not allow nulls on their own).
- Value MAY be of any type including null.
-
-
- If the property is not defined or is not in this list, then any type of value is acceptable.
- Other type values MAY be used for custom purposes, but minimal validators of the specification
- implementation can allow any instance value on unknown type values.
-
-
-
- An array of two or more simple type definitions. Each item in the array MUST be a simple type definition or a schema.
- The instance value is valid if it is of the same type as one of the simple type definitions, or valid by one of the schemas, in the array.
-
-
-
-
-
- For example, a schema that defines if an instance can be a string or a number would be:
-
-
-
-
-
-
- This attribute is an object with property definitions that define the valid values of instance object property values. When the instance value is an object, the property values of the instance object MUST conform to the property definitions in this object. In this object, each property definition's value MUST be a schema, and the property's name MUST be the name of the instance property that it defines. The instance property value MUST be valid according to the schema from the property definition. Properties are considered unordered, the order of the instance properties MAY be in any order.
-
-
-
- This attribute is an object that defines the schema for a set of property names of an object instance. The name of each property of this attribute's object is a regular expression pattern in the ECMA 262/Perl 5 format, while the value is a schema. If the pattern matches the name of a property on the instance object, the value of the instance's property MUST be valid against the pattern name's schema value.
-
-
-
- This attribute defines a schema for all properties that are not explicitly defined in an object type definition. If specified, the value MUST be a schema or a boolean. If false is provided, no additional properties are allowed beyond the properties defined in the schema. The default value is an empty schema which allows any value for additional properties.
-
-
-
- This attribute defines the allowed items in an instance array, and MUST be a schema or an array of schemas. The default value is an empty schema which allows any value for items in the instance array.
- When this attribute value is a schema and the instance value is an array, then all the items in the array MUST be valid according to the schema.
- When this attribute value is an array of schemas and the instance value is an array, each position in the instance array MUST conform to the schema in the corresponding position for this array. This called tuple typing. When tuple typing is used, additional items are allowed, disallowed, or constrained by the "additionalItems" attribute using the same rules as "additionalProperties" for objects.
-
-
-
- This provides a definition for additional items in an array instance when tuple definitions of the items is provided. This can be false to indicate additional items in the array are not allowed, or it can be a schema that defines the schema of the additional items.
-
-
-
- This attribute indicates if the instance must have a value, and not be undefined. This is false by default, making the instance optional.
-
-
-
- This attribute is an object that defines the requirements of a property on an instance object. If an object instance has a property with the same name as a property in this attribute's object, then the instance must be valid against the attribute's property value (hereafter referred to as the "dependency value").
-
- The dependency value can take one of two forms:
-
-
-
- If the dependency value is a string, then the instance object MUST have a property with the same name as the dependency value.
- If the dependency value is an array of strings, then the instance object MUST have a property with the same name as each string in the dependency value's array.
-
-
- If the dependency value is a schema, then the instance object MUST be valid against the schema.
-
-
-
-
-
-
- This attribute defines the minimum value of the instance property when the type of the instance value is a number.
-
-
-
- This attribute defines the maximum value of the instance property when the type of the instance value is a number.
-
-
-
- This attribute indicates if the value of the instance (if the instance is a number) can not equal the number defined by the "minimum" attribute. This is false by default, meaning the instance value can be greater then or equal to the minimum value.
-
-
-
- This attribute indicates if the value of the instance (if the instance is a number) can not equal the number defined by the "maximum" attribute. This is false by default, meaning the instance value can be less then or equal to the maximum value.
-
-
-
- This attribute defines the minimum number of values in an array when the array is the instance value.
-
-
-
- This attribute defines the maximum number of values in an array when the array is the instance value.
-
-
-
- This attribute indicates that all items in an array instance MUST be unique (contains no two identical values).
-
- Two instance are consider equal if they are both of the same type and:
-
-
- are null; or
- are booleans/numbers/strings and have the same value; or
- are arrays, contains the same number of items, and each item in the array is equal to the corresponding item in the other array; or
- are objects, contains the same property names, and each property in the object is equal to the corresponding property in the other object.
-
-
-
-
-
- When the instance value is a string, this provides a regular expression that a string instance MUST match in order to be valid. Regular expressions SHOULD follow the regular expression specification from ECMA 262/Perl 5
-
-
-
- When the instance value is a string, this defines the minimum length of the string.
-
-
-
- When the instance value is a string, this defines the maximum length of the string.
-
-
-
- This provides an enumeration of all possible values that are valid for the instance property. This MUST be an array, and each item in the array represents a possible value for the instance value. If this attribute is defined, the instance value MUST be one of the values in the array in order for the schema to be valid. Comparison of enum values uses the same algorithm as defined in "uniqueItems".
-
-
-
- This attribute defines the default value of the instance when the instance is undefined.
-
-
-
- This attribute is a string that provides a short description of the instance property.
-
-
-
- This attribute is a string that provides a full description of the of purpose the instance property.
-
-
-
- This property defines the type of data, content type, or microformat to be expected in the instance property values. A format attribute MAY be one of the values listed below, and if so, SHOULD adhere to the semantics describing for the format. A format SHOULD only be used to give meaning to primitive types (string, integer, number, or boolean). Validators MAY (but are not required to) validate that the instance values conform to a format.
-
-
- The following formats are predefined:
-
-
- This SHOULD be a date in ISO 8601 format of YYYY-MM-DDThh:mm:ssZ in UTC time. This is the recommended form of date/timestamp.
- This SHOULD be a date in the format of YYYY-MM-DD. It is recommended that you use the "date-time" format instead of "date" unless you need to transfer only the date part.
- This SHOULD be a time in the format of hh:mm:ss. It is recommended that you use the "date-time" format instead of "time" unless you need to transfer only the time part.
- This SHOULD be the difference, measured in milliseconds, between the specified time and midnight, 00:00 of January 1, 1970 UTC. The value SHOULD be a number (integer or float).
- A regular expression, following the regular expression specification from ECMA 262/Perl 5.
- This is a CSS color (like "#FF0000" or "red"), based on CSS 2.1.
- This is a CSS style definition (like "color: red; background-color:#FFF"), based on CSS 2.1.
- This SHOULD be a phone number (format MAY follow E.123).
- This value SHOULD be a URI.
- This SHOULD be an email address.
- This SHOULD be an ip version 4 address.
- This SHOULD be an ip version 6 address.
- This SHOULD be a host-name.
-
-
-
- Additional custom formats MAY be created. These custom formats MAY be expressed as an URI, and this URI MAY reference a schema of that format.
-
-
-
- This attribute defines what value the number instance must be divisible by with no remainder (the result of the division must be an integer.) The value of this attribute SHOULD NOT be 0.
-
-
-
- This attribute takes the same values as the "type" attribute, however if the instance matches the type or if this value is an array and the instance matches any type or schema in the array, then this instance is not valid.
-
-
-
- The value of this property MUST be another schema which will provide a base schema which the current schema will inherit from. The inheritance rules are such that any instance that is valid according to the current schema MUST be valid according to the referenced schema. This MAY also be an array, in which case, the instance MUST be valid for all the schemas in the array. A schema that extends another schema MAY define additional attributes, constrain existing attributes, or add other constraints.
-
- Conceptually, the behavior of extends can be seen as validating an
- instance against all constraints in the extending schema as well as
- the extended schema(s). More optimized implementations that merge
- schemas are possible, but are not required. Some examples of using "extends":
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- This attribute defines the current URI of this schema (this attribute is
- effectively a "self" link). This URI MAY be relative or absolute. If
- the URI is relative it is resolved against the current URI of the parent
- schema it is contained in. If this schema is not contained in any
- parent schema, the current URI of the parent schema is held to be the
- URI under which this schema was addressed. If id is missing, the current URI of a schema is
- defined to be that of the parent schema. The current URI of the schema
- is also used to construct relative references such as for $ref.
-
-
-
-
-
- This attribute defines a URI of a schema that contains the full representation of this schema.
- When a validator encounters this attribute, it SHOULD replace the current schema with the schema referenced by the value's URI (if known and available) and re-validate the instance.
- This URI MAY be relative or absolute, and relative URIs SHOULD be resolved against the URI of the current schema.
-
-
-
-
-
- This attribute defines a URI of a JSON Schema that is the schema of the current schema.
- When this attribute is defined, a validator SHOULD use the schema referenced by the value's URI (if known and available) when resolving Hyper Schemalinks.
-
-
-
- A validator MAY use this attribute's value to determine which version of JSON Schema the current schema is written in, and provide the appropriate validation features and behavior.
- Therefore, it is RECOMMENDED that all schema authors include this attribute in their schemas to prevent conflicts with future JSON Schema specification changes.
-
-
-
-
-
-
- The following attributes are specified in addition to those
- attributes that already provided by the core schema with the specific
- purpose of informing user agents of relations between resources based
- on JSON data. Just as with JSON
- schema attributes, all the attributes in hyper schemas are optional.
- Therefore, an empty object is a valid (non-informative) schema, and
- essentially describes plain JSON (no constraints on the structures).
- Addition of attributes provides additive information for user agents.
-
-
-
-
- The value of the links property MUST be an array, where each item
- in the array is a link description object which describes the link
- relations of the instances.
-
-
-
-
- A link description object is used to describe link relations. In
- the context of a schema, it defines the link relations of the
- instances of the schema, and can be parameterized by the instance
- values. The link description format can be used on its own in
- regular (non-schema documents), and use of this format can
- be declared by referencing the normative link description
- schema as the the schema for the data structure that uses the
- links. The URI of the normative link description schema is:
- http://json-schema.org/links (latest version) or
- http://json-schema.org/draft-03/links (draft-03 version).
-
-
-
-
- The value of the "href" link description property
- indicates the target URI of the related resource. The value
- of the instance property SHOULD be resolved as a URI-Reference per RFC 3986
- and MAY be a relative URI. The base URI to be used for relative resolution
- SHOULD be the URI used to retrieve the instance object (not the schema)
- when used within a schema. Also, when links are used within a schema, the URI
- SHOULD be parametrized by the property values of the instance
- object, if property values exist for the corresponding variables
- in the template (otherwise they MAY be provided from alternate sources, like user input).
-
-
-
- Instance property values SHOULD be substituted into the URIs where
- matching braces ('{', '}') are found surrounding zero or more characters,
- creating an expanded URI. Instance property value substitutions are resolved
- by using the text between the braces to denote the property name
- from the instance to get the value to substitute.
-
-
- For example, if an href value is defined:
-
-
-
- Then it would be resolved by replace the value of the "id" property value from the instance object.
-
-
-
- If the value of the "id" property was "45", the expanded URI would be:
-
-
-
-
-
- If matching braces are found with the string "@" (no quotes) between the braces, then the
- actual instance value SHOULD be used to replace the braces, rather than a property value.
- This should only be used in situations where the instance is a scalar (string,
- boolean, or number), and not for objects or arrays.
-
-
-
-
-
- The value of the "rel" property indicates the name of the
- relation to the target resource. The relation to the target SHOULD be interpreted as specifically from the instance object that the schema (or sub-schema) applies to, not just the top level resource that contains the object within its hierarchy. If a resource JSON representation contains a sub object with a property interpreted as a link, that sub-object holds the relation with the target. A relation to target from the top level resource MUST be indicated with the schema describing the top level JSON representation.
-
-
-
- Relationship definitions SHOULD NOT be media type dependent, and users are encouraged to utilize existing accepted relation definitions, including those in existing relation registries (see RFC 4287). However, we define these relations here for clarity of normative interpretation within the context of JSON hyper schema defined relations:
-
-
-
- If the relation value is "self", when this property is encountered in
- the instance object, the object represents a resource and the instance object is
- treated as a full representation of the target resource identified by
- the specified URI.
-
-
-
- This indicates that the target of the link is the full representation for the instance object. The object that contains this link possibly may not be the full representation.
-
-
-
- This indicates the target of the link is the schema for the instance object. This MAY be used to specifically denote the schemas of objects within a JSON object hierarchy, facilitating polymorphic type data structures.
-
-
-
- This relation indicates that the target of the link
- SHOULD be treated as the root or the body of the representation for the
- purposes of user agent interaction or fragment resolution. All other
- properties of the instance objects can be regarded as meta-data
- descriptions for the data.
-
-
-
-
-
- The following relations are applicable for schemas (the schema as the "from" resource in the relation):
-
-
- This indicates the target resource that represents collection of instances of a schema.
- This indicates a target to use for creating new instances of a schema. This link definition SHOULD be a submission link with a non-safe method (like POST).
-
-
-
-
-
- For example, if a schema is defined:
-
-
-
-
-
-
- And if a collection of instance resource's JSON representation was retrieved:
-
-
-
-
-
- This would indicate that for the first item in the collection, its own
- (self) URI would resolve to "/Resource/thing" and the first item's "up"
- relation SHOULD be resolved to the resource at "/Resource/parent".
- The "children" collection would be located at "/Resource/?upId=thing".
-
-
-
-
- This property value is a schema that defines the expected structure of the JSON representation of the target of the link.
-
-
-
-
- The following properties also apply to link definition objects, and
- provide functionality analogous to HTML forms, in providing a
- means for submitting extra (often user supplied) information to send to a server.
-
-
-
-
- This attribute defines which method can be used to access the target resource.
- In an HTTP environment, this would be "GET" or "POST" (other HTTP methods
- such as "PUT" and "DELETE" have semantics that are clearly implied by
- accessed resources, and do not need to be defined here).
- This defaults to "GET".
-
-
-
-
-
- If present, this property indicates a query media type format that the server
- supports for querying or posting to the collection of instances at the target
- resource. The query can be
- suffixed to the target URI to query the collection with
- property-based constraints on the resources that SHOULD be returned from
- the server or used to post data to the resource (depending on the method).
-
-
- For example, with the following schema:
-
-
-
- This indicates that the client can query the server for instances that have a specific name.
-
-
-
- For example:
-
-
-
-
-
- If no enctype or method is specified, only the single URI specified by
- the href property is defined. If the method is POST, "application/json" is
- the default media type.
-
-
-
-
-
- This attribute contains a schema which defines the acceptable structure of the submitted
- request (for a GET request, this schema would define the properties for the query string
- and for a POST request, this would define the body).
-
-
-
-
-
-
-
-
- This property indicates the fragment resolution protocol to use for
- resolving fragment identifiers in URIs within the instance
- representations. This applies to the instance object URIs and all
- children of the instance object's URIs. The default fragment resolution
- protocol is "slash-delimited", which is defined below. Other fragment
- resolution protocols MAY be used, but are not defined in this document.
-
-
-
- The fragment identifier is based on RFC 2396, Sec 5, and defines the
- mechanism for resolving references to entities within a document.
-
-
-
-
- With the slash-delimited fragment resolution protocol, the fragment
- identifier is interpreted as a series of property reference tokens that start with and
- are delimited by the "/" character (\x2F). Each property reference token
- is a series of unreserved or escaped URI characters. Each property
- reference token SHOULD be interpreted, starting from the beginning of
- the fragment identifier, as a path reference in the target JSON
- structure. The final target value of the fragment can be determined by
- starting with the root of the JSON structure from the representation of
- the resource identified by the pre-fragment URI. If the target is a JSON
- object, then the new target is the value of the property with the name
- identified by the next property reference token in the fragment. If the
- target is a JSON array, then the target is determined by finding the
- item in array the array with the index defined by the next property
- reference token (which MUST be a number). The target is successively
- updated for each property reference token, until the entire fragment has
- been traversed.
-
-
-
- Property names SHOULD be URI-encoded. In particular, any "/" in a
- property name MUST be encoded to avoid being interpreted as a property
- delimiter.
-
-
-
-
- For example, for the following JSON representation:
-
-
-
-
-
-
- The following fragment identifiers would be resolved:
-
-
-
-
-
-
-
-
-
- The dot-delimited fragment resolution protocol is the same as
- slash-delimited fragment resolution protocol except that the "." character
- (\x2E) is used as the delimiter between property names (instead of "/") and
- the path does not need to start with a ".". For example, #.foo and #foo are a valid fragment
- identifiers for referencing the value of the foo propery.
-
-
-
-
-
- This attribute indicates that the instance property SHOULD NOT be changed. Attempts by a user agent to modify the value of this property are expected to be rejected by a server.
-
-
-
- If the instance property value is a string, this attribute defines that the string SHOULD be interpreted as binary data and decoded using the encoding named by this schema property. RFC 2045, Sec 6.1 lists the possible values for this property.
-
-
-
-
- This attribute is a URI that defines what the instance's URI MUST start with in order to validate.
- The value of the "pathStart" attribute MUST be resolved as per RFC 3986, Sec 5,
- and is relative to the instance's URI.
-
-
-
- When multiple schemas have been referenced for an instance, the user agent
- can determine if this schema is applicable for a particular instance by
- determining if the URI of the instance begins with the the value of the "pathStart"
- attribute. If the URI of the instance does not start with this URI,
- or if another schema specifies a starting URI that is longer and also matches the
- instance, this schema SHOULD NOT be applied to the instance. Any schema
- that does not have a pathStart attribute SHOULD be considered applicable
- to all the instances for which it is referenced.
-
-
-
-
- This attribute defines the media type of the instance representations that this schema is defining.
-
-
-
-
-
- This specification is a sub-type of the JSON format, and
- consequently the security considerations are generally the same as RFC 4627.
- However, an additional issue is that when link relation of "self"
- is used to denote a full representation of an object, the user agent
- SHOULD NOT consider the representation to be the authoritative representation
- of the resource denoted by the target URI if the target URI is not
- equivalent to or a sub-path of the the URI used to request the resource
- representation which contains the target URI with the "self" link.
-
-
- For example, if a hyper schema was defined:
-
-
-
-
-
-
- And a resource was requested from somesite.com:
-
-
-
-
-
-
- With a response of:
-
-
-
-
-
-
-
-
- The proposed MIME media type for JSON Schema is "application/schema+json".
- Type name: application
- Subtype name: schema+json
- Required parameters: profile
-
- The value of the profile parameter SHOULD be a URI (relative or absolute) that
- refers to the schema used to define the structure of this structure (the
- meta-schema). Normally the value would be http://json-schema.org/draft-03/hyper-schema,
- but it is allowable to use other schemas that extend the hyper schema's meta-
- schema.
-
- Optional parameters: pretty
- The value of the pretty parameter MAY be true or false to indicate if additional whitespace has been included to make the JSON representation easier to read.
-
-
-
- This registry is maintained by IANA per RFC 4287 and this specification adds
- four values: "full", "create", "instances", "root". New
- assignments are subject to IESG Approval, as outlined in RFC 5226.
- Requests should be made by email to IANA, which will then forward the
- request to the IESG, requesting approval.
-
-
-
-
-
-
-
-
- &rfc2045;
- &rfc2119;
- &rfc2396;
- &rfc3339;
- &rfc3986;
- &rfc4287;
-
-
- &rfc2616;
- &rfc4627;
- &rfc5226;
- &iddiscovery;
- &uritemplate;
- &linkheader;
- &html401;
- &css21;
-
-
-
-
-
-
-
- Added example and verbiage to "extends" attribute.
- Defined slash-delimited to use a leading slash.
- Made "root" a relation instead of an attribute.
- Removed address values, and MIME media type from format to reduce confusion (mediaType already exists, so it can be used for MIME types).
- Added more explanation of nullability.
- Removed "alternate" attribute.
- Upper cased many normative usages of must, may, and should.
- Replaced the link submission "properties" attribute to "schema" attribute.
- Replaced "optional" attribute with "required" attribute.
- Replaced "maximumCanEqual" attribute with "exclusiveMaximum" attribute.
- Replaced "minimumCanEqual" attribute with "exclusiveMinimum" attribute.
- Replaced "requires" attribute with "dependencies" attribute.
- Moved "contentEncoding" attribute to hyper schema.
- Added "additionalItems" attribute.
- Added "id" attribute.
- Switched self-referencing variable substitution from "-this" to "@" to align with reserved characters in URI template.
- Added "patternProperties" attribute.
- Schema URIs are now namespace versioned.
- Added "$ref" and "$schema" attributes.
-
-
-
-
-
- Replaced "maxDecimal" attribute with "divisibleBy" attribute.
- Added slash-delimited fragment resolution protocol and made it the default.
- Added language about using links outside of schemas by referencing its normative URI.
- Added "uniqueItems" attribute.
- Added "targetSchema" attribute to link description object.
-
-
-
-
-
- Fixed category and updates from template.
-
-
-
-
-
- Initial draft.
-
-
-
-
-
-
-
-
-
- Should we give a preference to MIME headers over Link headers (or only use one)?
- Should "root" be a MIME parameter?
- Should "format" be renamed to "mediaType" or "contentType" to reflect the usage MIME media types that are allowed?
- How should dates be handled?
-
-
-
-
-
diff --git a/node_modules/json-schema/draft-zyp-json-schema-04.xml b/node_modules/json-schema/draft-zyp-json-schema-04.xml
deleted file mode 100644
index 8ede6bf..0000000
--- a/node_modules/json-schema/draft-zyp-json-schema-04.xml
+++ /dev/null
@@ -1,1072 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-]>
-
-
-
-
-
-
-
-
- A JSON Media Type for Describing the Structure and Meaning of JSON Documents
-
-
- SitePen (USA)
-
-
- 530 Lytton Avenue
- Palo Alto, CA 94301
- USA
-
- +1 650 968 8787
- kris@sitepen.com
-
-
-
-
-
-
-
- Calgary, AB
- Canada
-
- gary.court@gmail.com
-
-
-
-
- Internet Engineering Task Force
- JSON
- Schema
- JavaScript
- Object
- Notation
- Hyper Schema
- Hypermedia
-
-
-
- JSON (JavaScript Object Notation) Schema defines the media type "application/schema+json",
- a JSON based format for defining the structure of JSON data. JSON Schema provides a contract for what JSON
- data is required for a given application and how to interact with it. JSON
- Schema is intended to define validation, documentation, hyperlink
- navigation, and interaction control of JSON data.
-
-
-
-
-
-
-
- JSON (JavaScript Object Notation) Schema is a JSON media type for defining
- the structure of JSON data. JSON Schema provides a contract for what JSON
- data is required for a given application and how to interact with it. JSON
- Schema is intended to define validation, documentation, hyperlink
- navigation, and interaction control of JSON data.
-
-
-
-
-
-
-
- The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD",
- "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be
- interpreted as described in RFC 2119.
-
-
-
- The terms "JSON", "JSON text", "JSON value", "member", "element", "object",
- "array", "number", "string", "boolean", "true", "false", and "null" in this
- document are to be interpreted as defined in RFC 4627.
-
-
-
- This specification also uses the following defined terms:
-
-
- A JSON Schema object.
- Equivalent to "JSON value" as defined in RFC 4627.
- Equivalent to "member" as defined in RFC 4627.
- Equivalent to "element" as defined in RFC 4627.
- A property of a JSON Schema object.
-
-
-
-
-
-
- JSON Schema defines the media type "application/schema+json" for
- describing the structure of JSON text. JSON Schemas are also written in JSON and includes facilities
- for describing the structure of JSON in terms of
- allowable values, descriptions, and interpreting relations with other resources.
-
-
- This document is organized into several separate definitions. The first
- definition is the core schema specification. This definition is primary
- concerned with describing a JSON structure and specifying valid elements
- in the structure. The second definition is the Hyper Schema specification
- which is intended to define elements in a structure that can be interpreted as
- hyperlinks.
- Hyper Schema builds on JSON Schema to describe the hyperlink structure of
- JSON values. This allows user agents to be able to successfully navigate
- documents containing JSON based on their schemas.
-
-
- Cumulatively JSON Schema acts as meta-JSON that can be used to define the
- required type and constraints on JSON values, as well as define the meaning
- of the JSON values for the purpose of describing a resource and determining
- hyperlinks within the representation.
-
-
- An example JSON Schema that describes products might look like:
-
-
-
-
- This schema defines the properties of the instance,
- the required properties (id, name, and price), as well as an optional
- property (tags). This also defines the link relations of the instance.
-
-
-
-
-
- The JSON Schema media type does not attempt to dictate the structure of JSON
- values that contain data, but rather provides a separate format
- for flexibly communicating how a JSON value should be
- interpreted and validated, such that user agents can properly understand
- acceptable structures and extrapolate hyperlink information
- from the JSON. It is acknowledged that JSON values come
- in a variety of structures, and JSON is unique in that the structure
- of stored data structures often prescribes a non-ambiguous definite
- JSON representation. Attempting to force a specific structure is generally
- not viable, and therefore JSON Schema allows for a great flexibility
- in the structure of the JSON data that it describes.
-
-
- This specification is protocol agnostic.
- The underlying protocol (such as HTTP) should sufficiently define the
- semantics of the client-server interface, the retrieval of resource
- representations linked to by JSON representations, and modification of
- those resources. The goal of this
- format is to sufficiently describe JSON structures such that one can
- utilize existing information available in existing JSON
- representations from a large variety of services that leverage a representational state transfer
- architecture using existing protocols.
-
-
-
-
-
-
- JSON values are correlated to their schema by the "describedby"
- relation, where the schema is the target of the relation.
- JSON values MUST be of the "application/json" media type or
- any other subtype. Consequently, dictating how a JSON value should
- specify the relation to the schema is beyond the normative scope
- of this document since this document specifically defines the JSON
- Schema media type, and no other. It is RECOMMNENDED that JSON values
- specify their schema so that user agents can interpret the instance
- and retain the self-descriptive characteristics. This avoides the need for out-of-band information about
- instance data. Two approaches are recommended for declaring the
- relation to the schema that describes the meaning of a JSON instance's (or collection
- of instances) structure. A MIME type parameter named
- "profile" or a relation of "describedby" (which could be specified by a Link header) may be used:
-
-
-
-
-
-
-
- or if the content is being transferred by a protocol (such as HTTP) that
- provides headers, a Link header can be used:
-
-
-
-; rel="describedby"
-]]>
-
-
-
- Instances MAY specify multiple schemas, to indicate all the schemas that
- are applicable to the data, and the data SHOULD be valid by all the schemas.
- The instance data MAY have multiple schemas
- that it is described by (the instance data SHOULD be valid for those schemas).
- Or if the document is a collection of instances, the collection MAY contain
- instances from different schemas. The mechanism for referencing a schema is
- determined by the media type of the instance (if it provides a method for
- referencing schemas).
-
-
-
-
- JSON Schemas can themselves be described using JSON Schemas.
- A self-describing JSON Schema for the core JSON Schema can
- be found at http://json-schema.org/schema for the latest version or
- http://json-schema.org/draft-04/schema for the draft-04 version. The hyper schema
- self-description can be found at http://json-schema.org/hyper-schema
- or http://json-schema.org/draft-04/hyper-schema. All schemas
- used within a protocol with a media type specified SHOULD include a MIME parameter that refers to the self-descriptive
- hyper schema or another schema that extends this hyper schema:
-
-
-
-
-
-
-
-
-
-
-
-
- A JSON Schema is a JSON object that defines various attributes
- (including usage and valid values) of a JSON value. JSON
- Schema has recursive capabilities; there are a number of elements
- in the structure that allow for nested JSON Schemas.
-
-
-
- An example JSON Schema could look like:
-
-
-
-
-
-
- A JSON Schema object MAY have any of the following optional properties:
-
-
-
-
-
-
-
- This attribute defines what the primitive type or the schema of the instance MUST be in order to validate.
- This attribute can take one of two forms:
-
-
-
- A string indicating a primitive or simple type. The string MUST be one of the following values:
-
-
- Instance MUST be an object.
- Instance MUST be an array.
- Instance MUST be a string.
- Instance MUST be a number, including floating point numbers.
- Instance MUST be the JSON literal "true" or "false".
- Instance MUST be the JSON literal "null". Note that without this type, null values are not allowed.
- Instance MAY be of any type, including null.
-
-
-
-
- An array of one or more simple or schema types.
- The instance value is valid if it is of the same type as one of the simple types, or valid by one of the schemas, in the array.
-
-
-
- If this attribute is not specified, then all value types are accepted.
-
-
-
- For example, a schema that defines if an instance can be a string or a number would be:
-
-
-
-
-
-
-
- This attribute is an object with properties that specify the schemas for the properties of the instance object.
- In this attribute's object, each property value MUST be a schema.
- When the instance value is an object, the value of the instance's properties MUST be valid according to the schemas with the same property names specified in this attribute.
- Objects are unordered, so therefore the order of the instance properties or attribute properties MUST NOT determine validation success.
-
-
-
-
-
- This attribute is an object that defines the schema for a set of property names of an object instance.
- The name of each property of this attribute's object is a regular expression pattern in the ECMA 262/Perl 5 format, while the value is a schema.
- If the pattern matches the name of a property on the instance object, the value of the instance's property MUST be valid against the pattern name's schema value.
-
-
-
-
- This attribute specifies how any instance property that is not explicitly defined by either the "properties" or "patternProperties" attributes (hereafter referred to as "additional properties") is handled. If specified, the value MUST be a schema or a boolean.
- If a schema is provided, then all additional properties MUST be valid according to the schema.
- If false is provided, then no additional properties are allowed.
- The default value is an empty schema, which allows any value for additional properties.
-
-
-
- This attribute provides the allowed items in an array instance. If specified, this attribute MUST be a schema or an array of schemas.
- When this attribute value is a schema and the instance value is an array, then all the items in the array MUST be valid according to the schema.
- When this attribute value is an array of schemas and the instance value is an array, each position in the instance array MUST be valid according to the schema in the corresponding position for this array. This called tuple typing. When tuple typing is used, additional items are allowed, disallowed, or constrained by the "additionalItems" attribute the same way as "additionalProperties" for objects is.
-
-
-
- This attribute specifies how any item in the array instance that is not explicitly defined by "items" (hereafter referred to as "additional items") is handled. If specified, the value MUST be a schema or a boolean.
- If a schema is provided:
-
- If the "items" attribute is unspecified, then all items in the array instance must be valid against this schema.
- If the "items" attribute is a schema, then this attribute is ignored.
- If the "items" attribute is an array (during tuple typing), then any additional items MUST be valid against this schema.
-
-
- If false is provided, then any additional items in the array are not allowed.
- The default value is an empty schema, which allows any value for additional items.
-
-
-
- This attribute is an array of strings that defines all the property names that must exist on the object instance.
-
-
-
- This attribute is an object that specifies the requirements of a property on an object instance. If an object instance has a property with the same name as a property in this attribute's object, then the instance must be valid against the attribute's property value (hereafter referred to as the "dependency value").
-
- The dependency value can take one of two forms:
-
-
-
- If the dependency value is a string, then the instance object MUST have a property with the same name as the dependency value.
- If the dependency value is an array of strings, then the instance object MUST have a property with the same name as each string in the dependency value's array.
-
-
- If the dependency value is a schema, then the instance object MUST be valid against the schema.
-
-
-
-
-
-
- This attribute defines the minimum value of the instance property when the type of the instance value is a number.
-
-
-
- This attribute defines the maximum value of the instance property when the type of the instance value is a number.
-
-
-
- This attribute indicates if the value of the instance (if the instance is a number) can not equal the number defined by the "minimum" attribute. This is false by default, meaning the instance value can be greater then or equal to the minimum value.
-
-
-
- This attribute indicates if the value of the instance (if the instance is a number) can not equal the number defined by the "maximum" attribute. This is false by default, meaning the instance value can be less then or equal to the maximum value.
-
-
-
- This attribute defines the minimum number of values in an array when the array is the instance value.
-
-
-
- This attribute defines the maximum number of values in an array when the array is the instance value.
-
-
-
- This attribute defines the minimum number of properties required on an object instance.
-
-
-
- This attribute defines the maximum number of properties the object instance can have.
-
-
-
- This attribute indicates that all items in an array instance MUST be unique (contains no two identical values).
-
- Two instance are consider equal if they are both of the same type and:
-
-
- are null; or
- are booleans/numbers/strings and have the same value; or
- are arrays, contains the same number of items, and each item in the array is equal to the item at the corresponding index in the other array; or
- are objects, contains the same property names, and each property in the object is equal to the corresponding property in the other object.
-
-
-
-
-
- When the instance value is a string, this provides a regular expression that a string instance MUST match in order to be valid. Regular expressions SHOULD follow the regular expression specification from ECMA 262/Perl 5
-
-
-
- When the instance value is a string, this defines the minimum length of the string.
-
-
-
- When the instance value is a string, this defines the maximum length of the string.
-
-
-
- This provides an enumeration of all possible values that are valid for the instance property. This MUST be an array, and each item in the array represents a possible value for the instance value. If this attribute is defined, the instance value MUST be one of the values in the array in order for the schema to be valid. Comparison of enum values uses the same algorithm as defined in "uniqueItems".
-
-
-
- This attribute defines the default value of the instance when the instance is undefined.
-
-
-
- This attribute is a string that provides a short description of the instance property.
-
-
-
- This attribute is a string that provides a full description of the of purpose the instance property.
-
-
-
- This attribute defines what value the number instance must be divisible by with no remainder (the result of the division must be an integer.) The value of this attribute SHOULD NOT be 0.
-
-
-
- This attribute takes the same values as the "type" attribute, however if the instance matches the type or if this value is an array and the instance matches any type or schema in the array, then this instance is not valid.
-
-
-
- The value of this property MUST be another schema which will provide a base schema which the current schema will inherit from. The inheritance rules are such that any instance that is valid according to the current schema MUST be valid according to the referenced schema. This MAY also be an array, in which case, the instance MUST be valid for all the schemas in the array. A schema that extends another schema MAY define additional attributes, constrain existing attributes, or add other constraints.
-
- Conceptually, the behavior of extends can be seen as validating an
- instance against all constraints in the extending schema as well as
- the extended schema(s). More optimized implementations that merge
- schemas are possible, but are not required. Some examples of using "extends":
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- This attribute defines the current URI of this schema (this attribute is
- effectively a "self" link). This URI MAY be relative or absolute. If
- the URI is relative it is resolved against the current URI of the parent
- schema it is contained in. If this schema is not contained in any
- parent schema, the current URI of the parent schema is held to be the
- URI under which this schema was addressed. If id is missing, the current URI of a schema is
- defined to be that of the parent schema. The current URI of the schema
- is also used to construct relative references such as for $ref.
-
-
-
-
-
- This attribute defines a URI of a schema that contains the full representation of this schema.
- When a validator encounters this attribute, it SHOULD replace the current schema with the schema referenced by the value's URI (if known and available) and re-validate the instance.
- This URI MAY be relative or absolute, and relative URIs SHOULD be resolved against the URI of the current schema.
-
-
-
-
-
- This attribute defines a URI of a JSON Schema that is the schema of the current schema.
- When this attribute is defined, a validator SHOULD use the schema referenced by the value's URI (if known and available) when resolving Hyper Schemalinks.
-
-
-
- A validator MAY use this attribute's value to determine which version of JSON Schema the current schema is written in, and provide the appropriate validation features and behavior.
- Therefore, it is RECOMMENDED that all schema authors include this attribute in their schemas to prevent conflicts with future JSON Schema specification changes.
-
-
-
-
-
-
- The following attributes are specified in addition to those
- attributes that already provided by the core schema with the specific
- purpose of informing user agents of relations between resources based
- on JSON data. Just as with JSON
- schema attributes, all the attributes in hyper schemas are optional.
- Therefore, an empty object is a valid (non-informative) schema, and
- essentially describes plain JSON (no constraints on the structures).
- Addition of attributes provides additive information for user agents.
-
-
-
-
- The value of the links property MUST be an array, where each item
- in the array is a link description object which describes the link
- relations of the instances.
-
-
-
-
-
-
- A link description object is used to describe link relations. In
- the context of a schema, it defines the link relations of the
- instances of the schema, and can be parameterized by the instance
- values. The link description format can be used without JSON Schema,
- and use of this format can
- be declared by referencing the normative link description
- schema as the the schema for the data structure that uses the
- links. The URI of the normative link description schema is:
- http://json-schema.org/links (latest version) or
- http://json-schema.org/draft-04/links (draft-04 version).
-
-
-
-
- The value of the "href" link description property
- indicates the target URI of the related resource. The value
- of the instance property SHOULD be resolved as a URI-Reference per RFC 3986
- and MAY be a relative URI. The base URI to be used for relative resolution
- SHOULD be the URI used to retrieve the instance object (not the schema)
- when used within a schema. Also, when links are used within a schema, the URI
- SHOULD be parametrized by the property values of the instance
- object, if property values exist for the corresponding variables
- in the template (otherwise they MAY be provided from alternate sources, like user input).
-
-
-
- Instance property values SHOULD be substituted into the URIs where
- matching braces ('{', '}') are found surrounding zero or more characters,
- creating an expanded URI. Instance property value substitutions are resolved
- by using the text between the braces to denote the property name
- from the instance to get the value to substitute.
-
-
- For example, if an href value is defined:
-
-
-
- Then it would be resolved by replace the value of the "id" property value from the instance object.
-
-
-
- If the value of the "id" property was "45", the expanded URI would be:
-
-
-
-
-
- If matching braces are found with the string "@" (no quotes) between the braces, then the
- actual instance value SHOULD be used to replace the braces, rather than a property value.
- This should only be used in situations where the instance is a scalar (string,
- boolean, or number), and not for objects or arrays.
-
-
-
-
-
- The value of the "rel" property indicates the name of the
- relation to the target resource. The relation to the target SHOULD be interpreted as specifically from the instance object that the schema (or sub-schema) applies to, not just the top level resource that contains the object within its hierarchy. If a resource JSON representation contains a sub object with a property interpreted as a link, that sub-object holds the relation with the target. A relation to target from the top level resource MUST be indicated with the schema describing the top level JSON representation.
-
-
-
- Relationship definitions SHOULD NOT be media type dependent, and users are encouraged to utilize existing accepted relation definitions, including those in existing relation registries (see RFC 4287). However, we define these relations here for clarity of normative interpretation within the context of JSON hyper schema defined relations:
-
-
-
- If the relation value is "self", when this property is encountered in
- the instance object, the object represents a resource and the instance object is
- treated as a full representation of the target resource identified by
- the specified URI.
-
-
-
- This indicates that the target of the link is the full representation for the instance object. The object that contains this link possibly may not be the full representation.
-
-
-
- This indicates the target of the link is the schema for the instance object. This MAY be used to specifically denote the schemas of objects within a JSON object hierarchy, facilitating polymorphic type data structures.
-
-
-
- This relation indicates that the target of the link
- SHOULD be treated as the root or the body of the representation for the
- purposes of user agent interaction or fragment resolution. All other
- properties of the instance objects can be regarded as meta-data
- descriptions for the data.
-
-
-
-
-
- The following relations are applicable for schemas (the schema as the "from" resource in the relation):
-
-
- This indicates the target resource that represents collection of instances of a schema.
- This indicates a target to use for creating new instances of a schema. This link definition SHOULD be a submission link with a non-safe method (like POST).
-
-
-
-
-
- For example, if a schema is defined:
-
-
-
-
-
-
- And if a collection of instance resource's JSON representation was retrieved:
-
-
-
-
-
- This would indicate that for the first item in the collection, its own
- (self) URI would resolve to "/Resource/thing" and the first item's "up"
- relation SHOULD be resolved to the resource at "/Resource/parent".
- The "children" collection would be located at "/Resource/?upId=thing".
-
-
-
-
- This property value is a string that defines the templating language used in the "href" attribute. If no templating language is defined, then the default Link Description Object templating langauge is used.
-
-
-
- This property value is a schema that defines the expected structure of the JSON representation of the target of the link.
-
-
-
-
- The following properties also apply to link definition objects, and
- provide functionality analogous to HTML forms, in providing a
- means for submitting extra (often user supplied) information to send to a server.
-
-
-
-
- This attribute defines which method can be used to access the target resource.
- In an HTTP environment, this would be "GET" or "POST" (other HTTP methods
- such as "PUT" and "DELETE" have semantics that are clearly implied by
- accessed resources, and do not need to be defined here).
- This defaults to "GET".
-
-
-
-
-
- If present, this property indicates a query media type format that the server
- supports for querying or posting to the collection of instances at the target
- resource. The query can be
- suffixed to the target URI to query the collection with
- property-based constraints on the resources that SHOULD be returned from
- the server or used to post data to the resource (depending on the method).
-
-
- For example, with the following schema:
-
-
-
- This indicates that the client can query the server for instances that have a specific name.
-
-
-
- For example:
-
-
-
-
-
- If no enctype or method is specified, only the single URI specified by
- the href property is defined. If the method is POST, "application/json" is
- the default media type.
-
-
-
-
-
- This attribute contains a schema which defines the acceptable structure of the submitted
- request (for a GET request, this schema would define the properties for the query string
- and for a POST request, this would define the body).
-
-
-
-
-
-
-
-
- This property indicates the fragment resolution protocol to use for
- resolving fragment identifiers in URIs within the instance
- representations. This applies to the instance object URIs and all
- children of the instance object's URIs. The default fragment resolution
- protocol is "json-pointer", which is defined below. Other fragment
- resolution protocols MAY be used, but are not defined in this document.
-
-
-
- The fragment identifier is based on RFC 3986, Sec 5, and defines the
- mechanism for resolving references to entities within a document.
-
-
-
- The "json-pointer" fragment resolution protocol uses a JSON Pointer to resolve fragment identifiers in URIs within instance representations.
-
-
-
-
-
-
- This attribute indicates that the instance value SHOULD NOT be changed. Attempts by a user agent to modify the value of this property are expected to be rejected by a server.
-
-
-
- If the instance property value is a string, this attribute defines that the string SHOULD be interpreted as binary data and decoded using the encoding named by this schema property. RFC 2045, Sec 6.1 lists the possible values for this property.
-
-
-
-
- This attribute is a URI that defines what the instance's URI MUST start with in order to validate.
- The value of the "pathStart" attribute MUST be resolved as per RFC 3986, Sec 5,
- and is relative to the instance's URI.
-
-
-
- When multiple schemas have been referenced for an instance, the user agent
- can determine if this schema is applicable for a particular instance by
- determining if the URI of the instance begins with the the value of the "pathStart"
- attribute. If the URI of the instance does not start with this URI,
- or if another schema specifies a starting URI that is longer and also matches the
- instance, this schema SHOULD NOT be applied to the instance. Any schema
- that does not have a pathStart attribute SHOULD be considered applicable
- to all the instances for which it is referenced.
-
-
-
-
- This attribute defines the media type of the instance representations that this schema is defining.
-
-
-
-
-
- This specification is a sub-type of the JSON format, and
- consequently the security considerations are generally the same as RFC 4627.
- However, an additional issue is that when link relation of "self"
- is used to denote a full representation of an object, the user agent
- SHOULD NOT consider the representation to be the authoritative representation
- of the resource denoted by the target URI if the target URI is not
- equivalent to or a sub-path of the the URI used to request the resource
- representation which contains the target URI with the "self" link.
-
-
- For example, if a hyper schema was defined:
-
-
-
-
-
-
- And a resource was requested from somesite.com:
-
-
-
-
-
-
- With a response of:
-
-
-
-
-
-
-
-
- The proposed MIME media type for JSON Schema is "application/schema+json".
- Type name: application
- Subtype name: schema+json
- Required parameters: profile
-
- The value of the profile parameter SHOULD be a URI (relative or absolute) that
- refers to the schema used to define the structure of this structure (the
- meta-schema). Normally the value would be http://json-schema.org/draft-04/hyper-schema,
- but it is allowable to use other schemas that extend the hyper schema's meta-
- schema.
-
- Optional parameters: pretty
- The value of the pretty parameter MAY be true or false to indicate if additional whitespace has been included to make the JSON representation easier to read.
-
-
-
- This registry is maintained by IANA per RFC 4287 and this specification adds
- four values: "full", "create", "instances", "root". New
- assignments are subject to IESG Approval, as outlined in RFC 5226.
- Requests should be made by email to IANA, which will then forward the
- request to the IESG, requesting approval.
-
-
-
-
-
-
-
-
- &rfc2045;
- &rfc2119;
- &rfc3339;
- &rfc3986;
- &rfc4287;
-
-
- JSON Pointer
-
- ForgeRock US, Inc.
-
-
- SitePen (USA)
-
-
-
-
-
-
- &rfc2616;
- &rfc4627;
- &rfc5226;
- &iddiscovery;
- &uritemplate;
- &linkheader;
- &html401;
- &css21;
-
-
-
-
-
-
-
- Changed "required" attribute to an array of strings.
- Removed "format" attribute.
- Added "minProperties" and "maxProperties" attributes.
- Replaced "slash-delimited" fragment resolution with "json-pointer".
- Added "template" LDO attribute.
- Removed irrelevant "Open Issues" section.
- Merged Conventions and Terminology sections.
- Defined terms used in specification.
- Removed "integer" type in favor of {"type":"number", "divisibleBy":1}.
- Restricted "type" to only the core JSON types.
- Improved wording of many sections.
-
-
-
-
-
- Added example and verbiage to "extends" attribute.
- Defined slash-delimited to use a leading slash.
- Made "root" a relation instead of an attribute.
- Removed address values, and MIME media type from format to reduce confusion (mediaType already exists, so it can be used for MIME types).
- Added more explanation of nullability.
- Removed "alternate" attribute.
- Upper cased many normative usages of must, may, and should.
- Replaced the link submission "properties" attribute to "schema" attribute.
- Replaced "optional" attribute with "required" attribute.
- Replaced "maximumCanEqual" attribute with "exclusiveMaximum" attribute.
- Replaced "minimumCanEqual" attribute with "exclusiveMinimum" attribute.
- Replaced "requires" attribute with "dependencies" attribute.
- Moved "contentEncoding" attribute to hyper schema.
- Added "additionalItems" attribute.
- Added "id" attribute.
- Switched self-referencing variable substitution from "-this" to "@" to align with reserved characters in URI template.
- Added "patternProperties" attribute.
- Schema URIs are now namespace versioned.
- Added "$ref" and "$schema" attributes.
-
-
-
-
-
- Replaced "maxDecimal" attribute with "divisibleBy" attribute.
- Added slash-delimited fragment resolution protocol and made it the default.
- Added language about using links outside of schemas by referencing its normative URI.
- Added "uniqueItems" attribute.
- Added "targetSchema" attribute to link description object.
-
-
-
-
-
- Fixed category and updates from template.
-
-
-
-
-
- Initial draft.
-
-
-
-
-
-
-
diff --git a/node_modules/json-schema/lib/links.js b/node_modules/json-schema/lib/links.js
deleted file mode 100644
index 8a87f02..0000000
--- a/node_modules/json-schema/lib/links.js
+++ /dev/null
@@ -1,66 +0,0 @@
-/**
- * JSON Schema link handler
- * Copyright (c) 2007 Kris Zyp SitePen (www.sitepen.com)
- * Licensed under the MIT (MIT-LICENSE.txt) license.
- */
-(function (root, factory) {
- if (typeof define === 'function' && define.amd) {
- // AMD. Register as an anonymous module.
- define([], function () {
- return factory();
- });
- } else if (typeof module === 'object' && module.exports) {
- // Node. Does not work with strict CommonJS, but
- // only CommonJS-like environments that support module.exports,
- // like Node.
- module.exports = factory();
- } else {
- // Browser globals
- root.jsonSchemaLinks = factory();
- }
-}(this, function () {// setup primitive classes to be JSON Schema types
-var exports = {};
-exports.cacheLinks = true;
-exports.getLink = function(relation, instance, schema){
- // gets the URI of the link for the given relation based on the instance and schema
- // for example:
- // getLink(
- // "brother",
- // {"brother_id":33},
- // {links:[{rel:"brother", href:"Brother/{brother_id}"}]}) ->
- // "Brother/33"
- var links = schema.__linkTemplates;
- if(!links){
- links = {};
- var schemaLinks = schema.links;
- if(schemaLinks && schemaLinks instanceof Array){
- schemaLinks.forEach(function(link){
- /* // TODO: allow for multiple same-name relations
- if(links[link.rel]){
- if(!(links[link.rel] instanceof Array)){
- links[link.rel] = [links[link.rel]];
- }
- }*/
- links[link.rel] = link.href;
- });
- }
- if(exports.cacheLinks){
- schema.__linkTemplates = links;
- }
- }
- var linkTemplate = links[relation];
- return linkTemplate && exports.substitute(linkTemplate, instance);
-};
-
-exports.substitute = function(linkTemplate, instance){
- return linkTemplate.replace(/\{([^\}]*)\}/g, function(t, property){
- var value = instance[decodeURIComponent(property)];
- if(value instanceof Array){
- // the value is an array, it should produce a URI like /Table/(4,5,8) and store.get() should handle that as an array of values
- return '(' + value.join(',') + ')';
- }
- return value;
- });
-};
-return exports;
-}));
\ No newline at end of file
diff --git a/node_modules/json-schema/lib/validate.js b/node_modules/json-schema/lib/validate.js
deleted file mode 100644
index e4dc151..0000000
--- a/node_modules/json-schema/lib/validate.js
+++ /dev/null
@@ -1,273 +0,0 @@
-/**
- * JSONSchema Validator - Validates JavaScript objects using JSON Schemas
- * (http://www.json.com/json-schema-proposal/)
- *
- * Copyright (c) 2007 Kris Zyp SitePen (www.sitepen.com)
- * Licensed under the MIT (MIT-LICENSE.txt) license.
-To use the validator call the validate function with an instance object and an optional schema object.
-If a schema is provided, it will be used to validate. If the instance object refers to a schema (self-validating),
-that schema will be used to validate and the schema parameter is not necessary (if both exist,
-both validations will occur).
-The validate method will return an array of validation errors. If there are no errors, then an
-empty list will be returned. A validation error will have two properties:
-"property" which indicates which property had the error
-"message" which indicates what the error was
- */
-(function (root, factory) {
- if (typeof define === 'function' && define.amd) {
- // AMD. Register as an anonymous module.
- define([], function () {
- return factory();
- });
- } else if (typeof module === 'object' && module.exports) {
- // Node. Does not work with strict CommonJS, but
- // only CommonJS-like environments that support module.exports,
- // like Node.
- module.exports = factory();
- } else {
- // Browser globals
- root.jsonSchema = factory();
- }
-}(this, function () {// setup primitive classes to be JSON Schema types
-var exports = validate
-exports.Integer = {type:"integer"};
-var primitiveConstructors = {
- String: String,
- Boolean: Boolean,
- Number: Number,
- Object: Object,
- Array: Array,
- Date: Date
-}
-exports.validate = validate;
-function validate(/*Any*/instance,/*Object*/schema) {
- // Summary:
- // To use the validator call JSONSchema.validate with an instance object and an optional schema object.
- // If a schema is provided, it will be used to validate. If the instance object refers to a schema (self-validating),
- // that schema will be used to validate and the schema parameter is not necessary (if both exist,
- // both validations will occur).
- // The validate method will return an object with two properties:
- // valid: A boolean indicating if the instance is valid by the schema
- // errors: An array of validation errors. If there are no errors, then an
- // empty list will be returned. A validation error will have two properties:
- // property: which indicates which property had the error
- // message: which indicates what the error was
- //
- return validate(instance, schema, {changing: false});//, coerce: false, existingOnly: false});
- };
-exports.checkPropertyChange = function(/*Any*/value,/*Object*/schema, /*String*/property) {
- // Summary:
- // The checkPropertyChange method will check to see if an value can legally be in property with the given schema
- // This is slightly different than the validate method in that it will fail if the schema is readonly and it will
- // not check for self-validation, it is assumed that the passed in value is already internally valid.
- // The checkPropertyChange method will return the same object type as validate, see JSONSchema.validate for
- // information.
- //
- return validate(value, schema, {changing: property || "property"});
- };
-var validate = exports._validate = function(/*Any*/instance,/*Object*/schema,/*Object*/options) {
-
- if (!options) options = {};
- var _changing = options.changing;
-
- function getType(schema){
- return schema.type || (primitiveConstructors[schema.name] == schema && schema.name.toLowerCase());
- }
- var errors = [];
- // validate a value against a property definition
- function checkProp(value, schema, path,i){
-
- var l;
- path += path ? typeof i == 'number' ? '[' + i + ']' : typeof i == 'undefined' ? '' : '.' + i : i;
- function addError(message){
- errors.push({property:path,message:message});
- }
-
- if((typeof schema != 'object' || schema instanceof Array) && (path || typeof schema != 'function') && !(schema && getType(schema))){
- if(typeof schema == 'function'){
- if(!(value instanceof schema)){
- addError("is not an instance of the class/constructor " + schema.name);
- }
- }else if(schema){
- addError("Invalid schema/property definition " + schema);
- }
- return null;
- }
- if(_changing && schema.readonly){
- addError("is a readonly field, it can not be changed");
- }
- if(schema['extends']){ // if it extends another schema, it must pass that schema as well
- checkProp(value,schema['extends'],path,i);
- }
- // validate a value against a type definition
- function checkType(type,value){
- if(type){
- if(typeof type == 'string' && type != 'any' &&
- (type == 'null' ? value !== null : typeof value != type) &&
- !(value instanceof Array && type == 'array') &&
- !(value instanceof Date && type == 'date') &&
- !(type == 'integer' && value%1===0)){
- return [{property:path,message:(typeof value) + " value found, but a " + type + " is required"}];
- }
- if(type instanceof Array){
- var unionErrors=[];
- for(var j = 0; j < type.length; j++){ // a union type
- if(!(unionErrors=checkType(type[j],value)).length){
- break;
- }
- }
- if(unionErrors.length){
- return unionErrors;
- }
- }else if(typeof type == 'object'){
- var priorErrors = errors;
- errors = [];
- checkProp(value,type,path);
- var theseErrors = errors;
- errors = priorErrors;
- return theseErrors;
- }
- }
- return [];
- }
- if(value === undefined){
- if(schema.required){
- addError("is missing and it is required");
- }
- }else{
- errors = errors.concat(checkType(getType(schema),value));
- if(schema.disallow && !checkType(schema.disallow,value).length){
- addError(" disallowed value was matched");
- }
- if(value !== null){
- if(value instanceof Array){
- if(schema.items){
- var itemsIsArray = schema.items instanceof Array;
- var propDef = schema.items;
- for (i = 0, l = value.length; i < l; i += 1) {
- if (itemsIsArray)
- propDef = schema.items[i];
- if (options.coerce)
- value[i] = options.coerce(value[i], propDef);
- errors.concat(checkProp(value[i],propDef,path,i));
- }
- }
- if(schema.minItems && value.length < schema.minItems){
- addError("There must be a minimum of " + schema.minItems + " in the array");
- }
- if(schema.maxItems && value.length > schema.maxItems){
- addError("There must be a maximum of " + schema.maxItems + " in the array");
- }
- }else if(schema.properties || schema.additionalProperties){
- errors.concat(checkObj(value, schema.properties, path, schema.additionalProperties));
- }
- if(schema.pattern && typeof value == 'string' && !value.match(schema.pattern)){
- addError("does not match the regex pattern " + schema.pattern);
- }
- if(schema.maxLength && typeof value == 'string' && value.length > schema.maxLength){
- addError("may only be " + schema.maxLength + " characters long");
- }
- if(schema.minLength && typeof value == 'string' && value.length < schema.minLength){
- addError("must be at least " + schema.minLength + " characters long");
- }
- if(typeof schema.minimum !== undefined && typeof value == typeof schema.minimum &&
- schema.minimum > value){
- addError("must have a minimum value of " + schema.minimum);
- }
- if(typeof schema.maximum !== undefined && typeof value == typeof schema.maximum &&
- schema.maximum < value){
- addError("must have a maximum value of " + schema.maximum);
- }
- if(schema['enum']){
- var enumer = schema['enum'];
- l = enumer.length;
- var found;
- for(var j = 0; j < l; j++){
- if(enumer[j]===value){
- found=1;
- break;
- }
- }
- if(!found){
- addError("does not have a value in the enumeration " + enumer.join(", "));
- }
- }
- if(typeof schema.maxDecimal == 'number' &&
- (value.toString().match(new RegExp("\\.[0-9]{" + (schema.maxDecimal + 1) + ",}")))){
- addError("may only have " + schema.maxDecimal + " digits of decimal places");
- }
- }
- }
- return null;
- }
- // validate an object against a schema
- function checkObj(instance,objTypeDef,path,additionalProp){
-
- if(typeof objTypeDef =='object'){
- if(typeof instance != 'object' || instance instanceof Array){
- errors.push({property:path,message:"an object is required"});
- }
-
- for(var i in objTypeDef){
- if(objTypeDef.hasOwnProperty(i)){
- var value = instance[i];
- // skip _not_ specified properties
- if (value === undefined && options.existingOnly) continue;
- var propDef = objTypeDef[i];
- // set default
- if(value === undefined && propDef["default"]){
- value = instance[i] = propDef["default"];
- }
- if(options.coerce && i in instance){
- value = instance[i] = options.coerce(value, propDef);
- }
- checkProp(value,propDef,path,i);
- }
- }
- }
- for(i in instance){
- if(instance.hasOwnProperty(i) && !(i.charAt(0) == '_' && i.charAt(1) == '_') && objTypeDef && !objTypeDef[i] && additionalProp===false){
- if (options.filter) {
- delete instance[i];
- continue;
- } else {
- errors.push({property:path,message:(typeof value) + "The property " + i +
- " is not defined in the schema and the schema does not allow additional properties"});
- }
- }
- var requires = objTypeDef && objTypeDef[i] && objTypeDef[i].requires;
- if(requires && !(requires in instance)){
- errors.push({property:path,message:"the presence of the property " + i + " requires that " + requires + " also be present"});
- }
- value = instance[i];
- if(additionalProp && (!(objTypeDef && typeof objTypeDef == 'object') || !(i in objTypeDef))){
- if(options.coerce){
- value = instance[i] = options.coerce(value, additionalProp);
- }
- checkProp(value,additionalProp,path,i);
- }
- if(!_changing && value && value.$schema){
- errors = errors.concat(checkProp(value,value.$schema,path,i));
- }
- }
- return errors;
- }
- if(schema){
- checkProp(instance,schema,'',_changing || '');
- }
- if(!_changing && instance && instance.$schema){
- checkProp(instance,instance.$schema,'','');
- }
- return {valid:!errors.length,errors:errors};
-};
-exports.mustBeValid = function(result){
- // summary:
- // This checks to ensure that the result is valid and will throw an appropriate error message if it is not
- // result: the result returned from checkPropertyChange or validate
- if(!result.valid){
- throw new TypeError(result.errors.map(function(error){return "for property " + error.property + ': ' + error.message;}).join(", \n"));
- }
-}
-
-return exports;
-}));
diff --git a/node_modules/json-schema/package.json b/node_modules/json-schema/package.json
deleted file mode 100644
index 5b9b4d1..0000000
--- a/node_modules/json-schema/package.json
+++ /dev/null
@@ -1,71 +0,0 @@
-{
- "_from": "json-schema@0.2.3",
- "_id": "json-schema@0.2.3",
- "_inBundle": false,
- "_integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=",
- "_location": "/json-schema",
- "_phantomChildren": {},
- "_requested": {
- "type": "version",
- "registry": true,
- "raw": "json-schema@0.2.3",
- "name": "json-schema",
- "escapedName": "json-schema",
- "rawSpec": "0.2.3",
- "saveSpec": null,
- "fetchSpec": "0.2.3"
- },
- "_requiredBy": [
- "/jsprim"
- ],
- "_resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz",
- "_shasum": "b480c892e59a2f05954ce727bd3f2a4e882f9e13",
- "_spec": "json-schema@0.2.3",
- "_where": "D:\\Projects\\minifyfromhtml\\node_modules\\jsprim",
- "author": {
- "name": "Kris Zyp"
- },
- "bugs": {
- "url": "https://github.com/kriszyp/json-schema/issues"
- },
- "bundleDependencies": false,
- "deprecated": false,
- "description": "JSON Schema validation and specifications",
- "devDependencies": {
- "vows": "*"
- },
- "directories": {
- "lib": "./lib"
- },
- "homepage": "https://github.com/kriszyp/json-schema#readme",
- "keywords": [
- "json",
- "schema"
- ],
- "licenses": [
- {
- "type": "AFLv2.1",
- "url": "http://trac.dojotoolkit.org/browser/dojo/trunk/LICENSE#L43"
- },
- {
- "type": "BSD",
- "url": "http://trac.dojotoolkit.org/browser/dojo/trunk/LICENSE#L13"
- }
- ],
- "main": "./lib/validate.js",
- "maintainers": [
- {
- "name": "Kris Zyp",
- "email": "kriszyp@gmail.com"
- }
- ],
- "name": "json-schema",
- "repository": {
- "type": "git",
- "url": "git+ssh://git@github.com/kriszyp/json-schema.git"
- },
- "scripts": {
- "test": "echo TESTS DISABLED vows --spec test/*.js"
- },
- "version": "0.2.3"
-}
diff --git a/node_modules/json-schema/test/tests.js b/node_modules/json-schema/test/tests.js
deleted file mode 100644
index 2938aea..0000000
--- a/node_modules/json-schema/test/tests.js
+++ /dev/null
@@ -1,95 +0,0 @@
-var assert = require('assert');
-var vows = require('vows');
-var path = require('path');
-var fs = require('fs');
-
-var validate = require('../lib/validate').validate;
-
-
-var revision = 'draft-03';
-var schemaRoot = path.join(__dirname, '..', revision);
-var schemaNames = ['schema', 'hyper-schema', 'links', 'json-ref' ];
-var schemas = {};
-
-schemaNames.forEach(function(name) {
- var file = path.join(schemaRoot, name);
- schemas[name] = loadSchema(file);
-});
-
-schemaNames.forEach(function(name) {
- var s, n = name+'-nsd', f = path.join(schemaRoot, name);
- schemas[n] = loadSchema(f);
- s = schemas[n];
- delete s['$schema'];
-});
-
-function loadSchema(path) {
- var data = fs.readFileSync(path, 'utf-8');
- var schema = JSON.parse(data);
- return schema;
-}
-
-function resultIsValid() {
- return function(result) {
- assert.isObject(result);
- //assert.isBoolean(result.valid);
- assert.equal(typeof(result.valid), 'boolean');
- assert.isArray(result.errors);
- for (var i = 0; i < result.errors.length; i++) {
- assert.notEqual(result.errors[i], null, 'errors['+i+'] is null');
- }
- }
-}
-
-function assertValidates(doc, schema) {
- var context = {};
-
- context[': validate('+doc+', '+schema+')'] = {
- topic: validate(schemas[doc], schemas[schema]),
- 'returns valid result': resultIsValid(),
- 'with valid=true': function(result) { assert.equal(result.valid, true); },
- 'and no errors': function(result) {
- // XXX work-around for bug in vows: [null] chokes it
- if (result.errors[0] == null) assert.fail('(errors contains null)');
- assert.length(result.errors, 0);
- }
- };
-
- return context;
-}
-
-function assertSelfValidates(doc) {
- var context = {};
-
- context[': validate('+doc+')'] = {
- topic: validate(schemas[doc]),
- 'returns valid result': resultIsValid(),
- 'with valid=true': function(result) { assert.equal(result.valid, true); },
- 'and no errors': function(result) { assert.length(result.errors, 0); }
- };
-
- return context;
-}
-
-var suite = vows.describe('JSON Schema').addBatch({
- 'Core-NSD self-validates': assertSelfValidates('schema-nsd'),
- 'Core-NSD/Core-NSD': assertValidates('schema-nsd', 'schema-nsd'),
- 'Core-NSD/Core': assertValidates('schema-nsd', 'schema'),
-
- 'Core self-validates': assertSelfValidates('schema'),
- 'Core/Core': assertValidates('schema', 'schema'),
-
- 'Hyper-NSD self-validates': assertSelfValidates('hyper-schema-nsd'),
- 'Hyper self-validates': assertSelfValidates('hyper-schema'),
- 'Hyper/Hyper': assertValidates('hyper-schema', 'hyper-schema'),
- 'Hyper/Core': assertValidates('hyper-schema', 'schema'),
-
- 'Links-NSD self-validates': assertSelfValidates('links-nsd'),
- 'Links self-validates': assertSelfValidates('links'),
- 'Links/Hyper': assertValidates('links', 'hyper-schema'),
- 'Links/Core': assertValidates('links', 'schema'),
-
- 'Json-Ref self-validates': assertSelfValidates('json-ref'),
- 'Json-Ref/Hyper': assertValidates('json-ref', 'hyper-schema'),
- 'Json-Ref/Core': assertValidates('json-ref', 'schema')
-}).export(module);
diff --git a/node_modules/json-stringify-safe/.npmignore b/node_modules/json-stringify-safe/.npmignore
deleted file mode 100644
index 17d6b36..0000000
--- a/node_modules/json-stringify-safe/.npmignore
+++ /dev/null
@@ -1 +0,0 @@
-/*.tgz
diff --git a/node_modules/json-stringify-safe/CHANGELOG.md b/node_modules/json-stringify-safe/CHANGELOG.md
deleted file mode 100644
index 42bcb60..0000000
--- a/node_modules/json-stringify-safe/CHANGELOG.md
+++ /dev/null
@@ -1,14 +0,0 @@
-## Unreleased
-- Fixes stringify to only take ancestors into account when checking
- circularity.
- It previously assumed every visited object was circular which led to [false
- positives][issue9].
- Uses the tiny serializer I wrote for [Must.js][must] a year and a half ago.
-- Fixes calling the `replacer` function in the proper context (`thisArg`).
-- Fixes calling the `cycleReplacer` function in the proper context (`thisArg`).
-- Speeds serializing by a factor of
- Big-O(h-my-god-it-linearly-searched-every-object) it had ever seen. Searching
- only the ancestors for a circular references speeds up things considerably.
-
-[must]: https://github.com/moll/js-must
-[issue9]: https://github.com/isaacs/json-stringify-safe/issues/9
diff --git a/node_modules/json-stringify-safe/LICENSE b/node_modules/json-stringify-safe/LICENSE
deleted file mode 100644
index 19129e3..0000000
--- a/node_modules/json-stringify-safe/LICENSE
+++ /dev/null
@@ -1,15 +0,0 @@
-The ISC License
-
-Copyright (c) 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
-copyright notice and this permission notice appear in all copies.
-
-THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
-IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/node_modules/json-stringify-safe/Makefile b/node_modules/json-stringify-safe/Makefile
deleted file mode 100644
index 36088c7..0000000
--- a/node_modules/json-stringify-safe/Makefile
+++ /dev/null
@@ -1,35 +0,0 @@
-NODE_OPTS =
-TEST_OPTS =
-
-love:
- @echo "Feel like makin' love."
-
-test:
- @node $(NODE_OPTS) ./node_modules/.bin/_mocha -R dot $(TEST_OPTS)
-
-spec:
- @node $(NODE_OPTS) ./node_modules/.bin/_mocha -R spec $(TEST_OPTS)
-
-autotest:
- @node $(NODE_OPTS) ./node_modules/.bin/_mocha -R dot --watch $(TEST_OPTS)
-
-autospec:
- @node $(NODE_OPTS) ./node_modules/.bin/_mocha -R spec --watch $(TEST_OPTS)
-
-pack:
- @file=$$(npm pack); echo "$$file"; tar tf "$$file"
-
-publish:
- npm publish
-
-tag:
- git tag "v$$(node -e 'console.log(require("./package").version)')"
-
-clean:
- rm -f *.tgz
- npm prune --production
-
-.PHONY: love
-.PHONY: test spec autotest autospec
-.PHONY: pack publish tag
-.PHONY: clean
diff --git a/node_modules/json-stringify-safe/README.md b/node_modules/json-stringify-safe/README.md
deleted file mode 100644
index a11f302..0000000
--- a/node_modules/json-stringify-safe/README.md
+++ /dev/null
@@ -1,52 +0,0 @@
-# json-stringify-safe
-
-Like JSON.stringify, but doesn't throw on circular references.
-
-## Usage
-
-Takes the same arguments as `JSON.stringify`.
-
-```javascript
-var stringify = require('json-stringify-safe');
-var circularObj = {};
-circularObj.circularRef = circularObj;
-circularObj.list = [ circularObj, circularObj ];
-console.log(stringify(circularObj, null, 2));
-```
-
-Output:
-
-```json
-{
- "circularRef": "[Circular]",
- "list": [
- "[Circular]",
- "[Circular]"
- ]
-}
-```
-
-## Details
-
-```
-stringify(obj, serializer, indent, decycler)
-```
-
-The first three arguments are the same as to JSON.stringify. The last
-is an argument that's only used when the object has been seen already.
-
-The default `decycler` function returns the string `'[Circular]'`.
-If, for example, you pass in `function(k,v){}` (return nothing) then it
-will prune cycles. If you pass in `function(k,v){ return {foo: 'bar'}}`,
-then cyclical objects will always be represented as `{"foo":"bar"}` in
-the result.
-
-```
-stringify.getSerialize(serializer, decycler)
-```
-
-Returns a serializer that can be used elsewhere. This is the actual
-function that's passed to JSON.stringify.
-
-**Note** that the function returned from `getSerialize` is stateful for now, so
-do **not** use it more than once.
diff --git a/node_modules/json-stringify-safe/package.json b/node_modules/json-stringify-safe/package.json
deleted file mode 100644
index 48e1f44..0000000
--- a/node_modules/json-stringify-safe/package.json
+++ /dev/null
@@ -1,66 +0,0 @@
-{
- "_from": "json-stringify-safe@~5.0.1",
- "_id": "json-stringify-safe@5.0.1",
- "_inBundle": false,
- "_integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=",
- "_location": "/json-stringify-safe",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "json-stringify-safe@~5.0.1",
- "name": "json-stringify-safe",
- "escapedName": "json-stringify-safe",
- "rawSpec": "~5.0.1",
- "saveSpec": null,
- "fetchSpec": "~5.0.1"
- },
- "_requiredBy": [
- "/request"
- ],
- "_resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz",
- "_shasum": "1296a2d58fd45f19a0f6ce01d65701e2c735b6eb",
- "_spec": "json-stringify-safe@~5.0.1",
- "_where": "D:\\Projects\\minifyfromhtml\\node_modules\\request",
- "author": {
- "name": "Isaac Z. Schlueter",
- "email": "i@izs.me",
- "url": "http://blog.izs.me"
- },
- "bugs": {
- "url": "https://github.com/isaacs/json-stringify-safe/issues"
- },
- "bundleDependencies": false,
- "contributors": [
- {
- "name": "Andri Möll",
- "email": "andri@dot.ee",
- "url": "http://themoll.com"
- }
- ],
- "deprecated": false,
- "description": "Like JSON.stringify, but doesn't blow up on circular refs.",
- "devDependencies": {
- "mocha": ">= 2.1.0 < 3",
- "must": ">= 0.12 < 0.13",
- "sinon": ">= 1.12.2 < 2"
- },
- "homepage": "https://github.com/isaacs/json-stringify-safe",
- "keywords": [
- "json",
- "stringify",
- "circular",
- "safe"
- ],
- "license": "ISC",
- "main": "stringify.js",
- "name": "json-stringify-safe",
- "repository": {
- "type": "git",
- "url": "git://github.com/isaacs/json-stringify-safe.git"
- },
- "scripts": {
- "test": "node test.js"
- },
- "version": "5.0.1"
-}
diff --git a/node_modules/json-stringify-safe/stringify.js b/node_modules/json-stringify-safe/stringify.js
deleted file mode 100644
index 124a452..0000000
--- a/node_modules/json-stringify-safe/stringify.js
+++ /dev/null
@@ -1,27 +0,0 @@
-exports = module.exports = stringify
-exports.getSerialize = serializer
-
-function stringify(obj, replacer, spaces, cycleReplacer) {
- return JSON.stringify(obj, serializer(replacer, cycleReplacer), spaces)
-}
-
-function serializer(replacer, cycleReplacer) {
- var stack = [], keys = []
-
- if (cycleReplacer == null) cycleReplacer = function(key, value) {
- if (stack[0] === value) return "[Circular ~]"
- return "[Circular ~." + keys.slice(0, stack.indexOf(value)).join(".") + "]"
- }
-
- return function(key, value) {
- if (stack.length > 0) {
- var thisPos = stack.indexOf(this)
- ~thisPos ? stack.splice(thisPos + 1) : stack.push(this)
- ~thisPos ? keys.splice(thisPos, Infinity, key) : keys.push(key)
- if (~stack.indexOf(value)) value = cycleReplacer.call(this, key, value)
- }
- else stack.push(value)
-
- return replacer == null ? value : replacer.call(this, key, value)
- }
-}
diff --git a/node_modules/json-stringify-safe/test/mocha.opts b/node_modules/json-stringify-safe/test/mocha.opts
deleted file mode 100644
index 2544e58..0000000
--- a/node_modules/json-stringify-safe/test/mocha.opts
+++ /dev/null
@@ -1,2 +0,0 @@
---recursive
---require must
diff --git a/node_modules/json-stringify-safe/test/stringify_test.js b/node_modules/json-stringify-safe/test/stringify_test.js
deleted file mode 100644
index 5b32583..0000000
--- a/node_modules/json-stringify-safe/test/stringify_test.js
+++ /dev/null
@@ -1,246 +0,0 @@
-var Sinon = require("sinon")
-var stringify = require("..")
-function jsonify(obj) { return JSON.stringify(obj, null, 2) }
-
-describe("Stringify", function() {
- it("must stringify circular objects", function() {
- var obj = {name: "Alice"}
- obj.self = obj
- var json = stringify(obj, null, 2)
- json.must.eql(jsonify({name: "Alice", self: "[Circular ~]"}))
- })
-
- it("must stringify circular objects with intermediaries", function() {
- var obj = {name: "Alice"}
- obj.identity = {self: obj}
- var json = stringify(obj, null, 2)
- json.must.eql(jsonify({name: "Alice", identity: {self: "[Circular ~]"}}))
- })
-
- it("must stringify circular objects deeper", function() {
- var obj = {name: "Alice", child: {name: "Bob"}}
- obj.child.self = obj.child
-
- stringify(obj, null, 2).must.eql(jsonify({
- name: "Alice",
- child: {name: "Bob", self: "[Circular ~.child]"}
- }))
- })
-
- it("must stringify circular objects deeper with intermediaries", function() {
- var obj = {name: "Alice", child: {name: "Bob"}}
- obj.child.identity = {self: obj.child}
-
- stringify(obj, null, 2).must.eql(jsonify({
- name: "Alice",
- child: {name: "Bob", identity: {self: "[Circular ~.child]"}}
- }))
- })
-
- it("must stringify circular objects in an array", function() {
- var obj = {name: "Alice"}
- obj.self = [obj, obj]
-
- stringify(obj, null, 2).must.eql(jsonify({
- name: "Alice", self: ["[Circular ~]", "[Circular ~]"]
- }))
- })
-
- it("must stringify circular objects deeper in an array", function() {
- var obj = {name: "Alice", children: [{name: "Bob"}, {name: "Eve"}]}
- obj.children[0].self = obj.children[0]
- obj.children[1].self = obj.children[1]
-
- stringify(obj, null, 2).must.eql(jsonify({
- name: "Alice",
- children: [
- {name: "Bob", self: "[Circular ~.children.0]"},
- {name: "Eve", self: "[Circular ~.children.1]"}
- ]
- }))
- })
-
- it("must stringify circular arrays", function() {
- var obj = []
- obj.push(obj)
- obj.push(obj)
- var json = stringify(obj, null, 2)
- json.must.eql(jsonify(["[Circular ~]", "[Circular ~]"]))
- })
-
- it("must stringify circular arrays with intermediaries", function() {
- var obj = []
- obj.push({name: "Alice", self: obj})
- obj.push({name: "Bob", self: obj})
-
- stringify(obj, null, 2).must.eql(jsonify([
- {name: "Alice", self: "[Circular ~]"},
- {name: "Bob", self: "[Circular ~]"}
- ]))
- })
-
- it("must stringify repeated objects in objects", function() {
- var obj = {}
- var alice = {name: "Alice"}
- obj.alice1 = alice
- obj.alice2 = alice
-
- stringify(obj, null, 2).must.eql(jsonify({
- alice1: {name: "Alice"},
- alice2: {name: "Alice"}
- }))
- })
-
- it("must stringify repeated objects in arrays", function() {
- var alice = {name: "Alice"}
- var obj = [alice, alice]
- var json = stringify(obj, null, 2)
- json.must.eql(jsonify([{name: "Alice"}, {name: "Alice"}]))
- })
-
- it("must call given decycler and use its output", function() {
- var obj = {}
- obj.a = obj
- obj.b = obj
-
- var decycle = Sinon.spy(function() { return decycle.callCount })
- var json = stringify(obj, null, 2, decycle)
- json.must.eql(jsonify({a: 1, b: 2}, null, 2))
-
- decycle.callCount.must.equal(2)
- decycle.thisValues[0].must.equal(obj)
- decycle.args[0][0].must.equal("a")
- decycle.args[0][1].must.equal(obj)
- decycle.thisValues[1].must.equal(obj)
- decycle.args[1][0].must.equal("b")
- decycle.args[1][1].must.equal(obj)
- })
-
- it("must call replacer and use its output", function() {
- var obj = {name: "Alice", child: {name: "Bob"}}
-
- var replacer = Sinon.spy(bangString)
- var json = stringify(obj, replacer, 2)
- json.must.eql(jsonify({name: "Alice!", child: {name: "Bob!"}}))
-
- replacer.callCount.must.equal(4)
- replacer.args[0][0].must.equal("")
- replacer.args[0][1].must.equal(obj)
- replacer.thisValues[1].must.equal(obj)
- replacer.args[1][0].must.equal("name")
- replacer.args[1][1].must.equal("Alice")
- replacer.thisValues[2].must.equal(obj)
- replacer.args[2][0].must.equal("child")
- replacer.args[2][1].must.equal(obj.child)
- replacer.thisValues[3].must.equal(obj.child)
- replacer.args[3][0].must.equal("name")
- replacer.args[3][1].must.equal("Bob")
- })
-
- it("must call replacer after describing circular references", function() {
- var obj = {name: "Alice"}
- obj.self = obj
-
- var replacer = Sinon.spy(bangString)
- var json = stringify(obj, replacer, 2)
- json.must.eql(jsonify({name: "Alice!", self: "[Circular ~]!"}))
-
- replacer.callCount.must.equal(3)
- replacer.args[0][0].must.equal("")
- replacer.args[0][1].must.equal(obj)
- replacer.thisValues[1].must.equal(obj)
- replacer.args[1][0].must.equal("name")
- replacer.args[1][1].must.equal("Alice")
- replacer.thisValues[2].must.equal(obj)
- replacer.args[2][0].must.equal("self")
- replacer.args[2][1].must.equal("[Circular ~]")
- })
-
- it("must call given decycler and use its output for nested objects",
- function() {
- var obj = {}
- obj.a = obj
- obj.b = {self: obj}
-
- var decycle = Sinon.spy(function() { return decycle.callCount })
- var json = stringify(obj, null, 2, decycle)
- json.must.eql(jsonify({a: 1, b: {self: 2}}))
-
- decycle.callCount.must.equal(2)
- decycle.args[0][0].must.equal("a")
- decycle.args[0][1].must.equal(obj)
- decycle.args[1][0].must.equal("self")
- decycle.args[1][1].must.equal(obj)
- })
-
- it("must use decycler's output when it returned null", function() {
- var obj = {a: "b"}
- obj.self = obj
- obj.selves = [obj, obj]
-
- function decycle() { return null }
- stringify(obj, null, 2, decycle).must.eql(jsonify({
- a: "b",
- self: null,
- selves: [null, null]
- }))
- })
-
- it("must use decycler's output when it returned undefined", function() {
- var obj = {a: "b"}
- obj.self = obj
- obj.selves = [obj, obj]
-
- function decycle() {}
- stringify(obj, null, 2, decycle).must.eql(jsonify({
- a: "b",
- selves: [null, null]
- }))
- })
-
- it("must throw given a decycler that returns a cycle", function() {
- var obj = {}
- obj.self = obj
- var err
- function identity(key, value) { return value }
- try { stringify(obj, null, 2, identity) } catch (ex) { err = ex }
- err.must.be.an.instanceof(TypeError)
- })
-
- describe(".getSerialize", function() {
- it("must stringify circular objects", function() {
- var obj = {a: "b"}
- obj.circularRef = obj
- obj.list = [obj, obj]
-
- var json = JSON.stringify(obj, stringify.getSerialize(), 2)
- json.must.eql(jsonify({
- "a": "b",
- "circularRef": "[Circular ~]",
- "list": ["[Circular ~]", "[Circular ~]"]
- }))
- })
-
- // This is the behavior as of Mar 3, 2015.
- // The serializer function keeps state inside the returned function and
- // so far I'm not sure how to not do that. JSON.stringify's replacer is not
- // called _after_ serialization.
- xit("must return a function that could be called twice", function() {
- var obj = {name: "Alice"}
- obj.self = obj
-
- var json
- var serializer = stringify.getSerialize()
-
- json = JSON.stringify(obj, serializer, 2)
- json.must.eql(jsonify({name: "Alice", self: "[Circular ~]"}))
-
- json = JSON.stringify(obj, serializer, 2)
- json.must.eql(jsonify({name: "Alice", self: "[Circular ~]"}))
- })
- })
-})
-
-function bangString(key, value) {
- return typeof value == "string" ? value + "!" : value
-}
diff --git a/node_modules/jsprim/CHANGES.md b/node_modules/jsprim/CHANGES.md
deleted file mode 100644
index c52d39d..0000000
--- a/node_modules/jsprim/CHANGES.md
+++ /dev/null
@@ -1,49 +0,0 @@
-# Changelog
-
-## not yet released
-
-None yet.
-
-## v1.4.1 (2017-08-02)
-
-* #21 Update verror dep
-* #22 Update extsprintf dependency
-* #23 update contribution guidelines
-
-## v1.4.0 (2017-03-13)
-
-* #7 Add parseInteger() function for safer number parsing
-
-## v1.3.1 (2016-09-12)
-
-* #13 Incompatible with webpack
-
-## v1.3.0 (2016-06-22)
-
-* #14 add safer version of hasOwnProperty()
-* #15 forEachKey() should ignore inherited properties
-
-## v1.2.2 (2015-10-15)
-
-* #11 NPM package shouldn't include any code that does `require('JSV')`
-* #12 jsl.node.conf missing definition for "module"
-
-## v1.2.1 (2015-10-14)
-
-* #8 odd date parsing behaviour
-
-## v1.2.0 (2015-10-13)
-
-* #9 want function for returning RFC1123 dates
-
-## v1.1.0 (2015-09-02)
-
-* #6 a new suite of hrtime manipulation routines: `hrtimeAdd()`,
- `hrtimeAccum()`, `hrtimeNanosec()`, `hrtimeMicrosec()` and
- `hrtimeMillisec()`.
-
-## v1.0.0 (2015-09-01)
-
-First tracked release. Includes everything in previous releases, plus:
-
-* #4 want function for merging objects
diff --git a/node_modules/jsprim/CONTRIBUTING.md b/node_modules/jsprim/CONTRIBUTING.md
deleted file mode 100644
index 750cef8..0000000
--- a/node_modules/jsprim/CONTRIBUTING.md
+++ /dev/null
@@ -1,19 +0,0 @@
-# Contributing
-
-This repository uses [cr.joyent.us](https://cr.joyent.us) (Gerrit) for new
-changes. Anyone can submit changes. To get started, see the [cr.joyent.us user
-guide](https://github.com/joyent/joyent-gerrit/blob/master/docs/user/README.md).
-This repo does not use GitHub pull requests.
-
-See the [Joyent Engineering
-Guidelines](https://github.com/joyent/eng/blob/master/docs/index.md) for general
-best practices expected in this repository.
-
-Contributions should be "make prepush" clean. The "prepush" target runs the
-"check" target, which requires these separate tools:
-
-* https://github.com/davepacheco/jsstyle
-* https://github.com/davepacheco/javascriptlint
-
-If you're changing something non-trivial or user-facing, you may want to submit
-an issue first.
diff --git a/node_modules/jsprim/LICENSE b/node_modules/jsprim/LICENSE
deleted file mode 100644
index cbc0bb3..0000000
--- a/node_modules/jsprim/LICENSE
+++ /dev/null
@@ -1,19 +0,0 @@
-Copyright (c) 2012, Joyent, Inc. All rights reserved.
-
-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
diff --git a/node_modules/jsprim/README.md b/node_modules/jsprim/README.md
deleted file mode 100644
index b3f28a4..0000000
--- a/node_modules/jsprim/README.md
+++ /dev/null
@@ -1,287 +0,0 @@
-# jsprim: utilities for primitive JavaScript types
-
-This module provides miscellaneous facilities for working with strings,
-numbers, dates, and objects and arrays of these basic types.
-
-
-### deepCopy(obj)
-
-Creates a deep copy of a primitive type, object, or array of primitive types.
-
-
-### deepEqual(obj1, obj2)
-
-Returns whether two objects are equal.
-
-
-### isEmpty(obj)
-
-Returns true if the given object has no properties and false otherwise. This
-is O(1) (unlike `Object.keys(obj).length === 0`, which is O(N)).
-
-### hasKey(obj, key)
-
-Returns true if the given object has an enumerable, non-inherited property
-called `key`. [For information on enumerability and ownership of properties, see
-the MDN
-documentation.](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Enumerability_and_ownership_of_properties)
-
-### forEachKey(obj, callback)
-
-Like Array.forEach, but iterates enumerable, owned properties of an object
-rather than elements of an array. Equivalent to:
-
- for (var key in obj) {
- if (Object.prototype.hasOwnProperty.call(obj, key)) {
- callback(key, obj[key]);
- }
- }
-
-
-### flattenObject(obj, depth)
-
-Flattens an object up to a given level of nesting, returning an array of arrays
-of length "depth + 1", where the first "depth" elements correspond to flattened
-columns and the last element contains the remaining object . For example:
-
- flattenObject({
- 'I': {
- 'A': {
- 'i': {
- 'datum1': [ 1, 2 ],
- 'datum2': [ 3, 4 ]
- },
- 'ii': {
- 'datum1': [ 3, 4 ]
- }
- },
- 'B': {
- 'i': {
- 'datum1': [ 5, 6 ]
- },
- 'ii': {
- 'datum1': [ 7, 8 ],
- 'datum2': [ 3, 4 ],
- },
- 'iii': {
- }
- }
- },
- 'II': {
- 'A': {
- 'i': {
- 'datum1': [ 1, 2 ],
- 'datum2': [ 3, 4 ]
- }
- }
- }
- }, 3)
-
-becomes:
-
- [
- [ 'I', 'A', 'i', { 'datum1': [ 1, 2 ], 'datum2': [ 3, 4 ] } ],
- [ 'I', 'A', 'ii', { 'datum1': [ 3, 4 ] } ],
- [ 'I', 'B', 'i', { 'datum1': [ 5, 6 ] } ],
- [ 'I', 'B', 'ii', { 'datum1': [ 7, 8 ], 'datum2': [ 3, 4 ] } ],
- [ 'I', 'B', 'iii', {} ],
- [ 'II', 'A', 'i', { 'datum1': [ 1, 2 ], 'datum2': [ 3, 4 ] } ]
- ]
-
-This function is strict: "depth" must be a non-negative integer and "obj" must
-be a non-null object with at least "depth" levels of nesting under all keys.
-
-
-### flattenIter(obj, depth, func)
-
-This is similar to `flattenObject` except that instead of returning an array,
-this function invokes `func(entry)` for each `entry` in the array that
-`flattenObject` would return. `flattenIter(obj, depth, func)` is logically
-equivalent to `flattenObject(obj, depth).forEach(func)`. Importantly, this
-version never constructs the full array. Its memory usage is O(depth) rather
-than O(n) (where `n` is the number of flattened elements).
-
-There's another difference between `flattenObject` and `flattenIter` that's
-related to the special case where `depth === 0`. In this case, `flattenObject`
-omits the array wrapping `obj` (which is regrettable).
-
-
-### pluck(obj, key)
-
-Fetch nested property "key" from object "obj", traversing objects as needed.
-For example, `pluck(obj, "foo.bar.baz")` is roughly equivalent to
-`obj.foo.bar.baz`, except that:
-
-1. If traversal fails, the resulting value is undefined, and no error is
- thrown. For example, `pluck({}, "foo.bar")` is just undefined.
-2. If "obj" has property "key" directly (without traversing), the
- corresponding property is returned. For example,
- `pluck({ 'foo.bar': 1 }, 'foo.bar')` is 1, not undefined. This is also
- true recursively, so `pluck({ 'a': { 'foo.bar': 1 } }, 'a.foo.bar')` is
- also 1, not undefined.
-
-
-### randElt(array)
-
-Returns an element from "array" selected uniformly at random. If "array" is
-empty, throws an Error.
-
-
-### startsWith(str, prefix)
-
-Returns true if the given string starts with the given prefix and false
-otherwise.
-
-
-### endsWith(str, suffix)
-
-Returns true if the given string ends with the given suffix and false
-otherwise.
-
-
-### parseInteger(str, options)
-
-Parses the contents of `str` (a string) as an integer. On success, the integer
-value is returned (as a number). On failure, an error is **returned** describing
-why parsing failed.
-
-By default, leading and trailing whitespace characters are not allowed, nor are
-trailing characters that are not part of the numeric representation. This
-behaviour can be toggled by using the options below. The empty string (`''`) is
-not considered valid input. If the return value cannot be precisely represented
-as a number (i.e., is smaller than `Number.MIN_SAFE_INTEGER` or larger than
-`Number.MAX_SAFE_INTEGER`), an error is returned. Additionally, the string
-`'-0'` will be parsed as the integer `0`, instead of as the IEEE floating point
-value `-0`.
-
-This function accepts both upper and lowercase characters for digits, similar to
-`parseInt()`, `Number()`, and [strtol(3C)](https://illumos.org/man/3C/strtol).
-
-The following may be specified in `options`:
-
-Option | Type | Default | Meaning
------------------- | ------- | ------- | ---------------------------
-base | number | 10 | numeric base (radix) to use, in the range 2 to 36
-allowSign | boolean | true | whether to interpret any leading `+` (positive) and `-` (negative) characters
-allowImprecise | boolean | false | whether to accept values that may have lost precision (past `MAX_SAFE_INTEGER` or below `MIN_SAFE_INTEGER`)
-allowPrefix | boolean | false | whether to interpret the prefixes `0b` (base 2), `0o` (base 8), `0t` (base 10), or `0x` (base 16)
-allowTrailing | boolean | false | whether to ignore trailing characters
-trimWhitespace | boolean | false | whether to trim any leading or trailing whitespace/line terminators
-leadingZeroIsOctal | boolean | false | whether a leading zero indicates octal
-
-Note that if `base` is unspecified, and `allowPrefix` or `leadingZeroIsOctal`
-are, then the leading characters can change the default base from 10. If `base`
-is explicitly specified and `allowPrefix` is true, then the prefix will only be
-accepted if it matches the specified base. `base` and `leadingZeroIsOctal`
-cannot be used together.
-
-**Context:** It's tricky to parse integers with JavaScript's built-in facilities
-for several reasons:
-
-- `parseInt()` and `Number()` by default allow the base to be specified in the
- input string by a prefix (e.g., `0x` for hex).
-- `parseInt()` allows trailing nonnumeric characters.
-- `Number(str)` returns 0 when `str` is the empty string (`''`).
-- Both functions return incorrect values when the input string represents a
- valid integer outside the range of integers that can be represented precisely.
- Specifically, `parseInt('9007199254740993')` returns 9007199254740992.
-- Both functions always accept `-` and `+` signs before the digit.
-- Some older JavaScript engines always interpret a leading 0 as indicating
- octal, which can be surprising when parsing input from users who expect a
- leading zero to be insignificant.
-
-While each of these may be desirable in some contexts, there are also times when
-none of them are wanted. `parseInteger()` grants greater control over what
-input's permissible.
-
-### iso8601(date)
-
-Converts a Date object to an ISO8601 date string of the form
-"YYYY-MM-DDTHH:MM:SS.sssZ". This format is not customizable.
-
-
-### parseDateTime(str)
-
-Parses a date expressed as a string, as either a number of milliseconds since
-the epoch or any string format that Date accepts, giving preference to the
-former where these two sets overlap (e.g., strings containing small numbers).
-
-
-### hrtimeDiff(timeA, timeB)
-
-Given two hrtime readings (as from Node's `process.hrtime()`), where timeA is
-later than timeB, compute the difference and return that as an hrtime. It is
-illegal to invoke this for a pair of times where timeB is newer than timeA.
-
-### hrtimeAdd(timeA, timeB)
-
-Add two hrtime intervals (as from Node's `process.hrtime()`), returning a new
-hrtime interval array. This function does not modify either input argument.
-
-
-### hrtimeAccum(timeA, timeB)
-
-Add two hrtime intervals (as from Node's `process.hrtime()`), storing the
-result in `timeA`. This function overwrites (and returns) the first argument
-passed in.
-
-
-### hrtimeNanosec(timeA), hrtimeMicrosec(timeA), hrtimeMillisec(timeA)
-
-This suite of functions converts a hrtime interval (as from Node's
-`process.hrtime()`) into a scalar number of nanoseconds, microseconds or
-milliseconds. Results are truncated, as with `Math.floor()`.
-
-
-### validateJsonObject(schema, object)
-
-Uses JSON validation (via JSV) to validate the given object against the given
-schema. On success, returns null. On failure, *returns* (does not throw) a
-useful Error object.
-
-
-### extraProperties(object, allowed)
-
-Check an object for unexpected properties. Accepts the object to check, and an
-array of allowed property name strings. If extra properties are detected, an
-array of extra property names is returned. If no properties other than those
-in the allowed list are present on the object, the returned array will be of
-zero length.
-
-### mergeObjects(provided, overrides, defaults)
-
-Merge properties from objects "provided", "overrides", and "defaults". The
-intended use case is for functions that accept named arguments in an "args"
-object, but want to provide some default values and override other values. In
-that case, "provided" is what the caller specified, "overrides" are what the
-function wants to override, and "defaults" contains default values.
-
-The function starts with the values in "defaults", overrides them with the
-values in "provided", and then overrides those with the values in "overrides".
-For convenience, any of these objects may be falsey, in which case they will be
-ignored. The input objects are never modified, but properties in the returned
-object are not deep-copied.
-
-For example:
-
- mergeObjects(undefined, { 'objectMode': true }, { 'highWaterMark': 0 })
-
-returns:
-
- { 'objectMode': true, 'highWaterMark': 0 }
-
-For another example:
-
- mergeObjects(
- { 'highWaterMark': 16, 'objectMode': 7 }, /* from caller */
- { 'objectMode': true }, /* overrides */
- { 'highWaterMark': 0 }); /* default */
-
-returns:
-
- { 'objectMode': true, 'highWaterMark': 16 }
-
-
-# Contributing
-
-See separate [contribution guidelines](CONTRIBUTING.md).
diff --git a/node_modules/jsprim/lib/jsprim.js b/node_modules/jsprim/lib/jsprim.js
deleted file mode 100644
index f7d0d81..0000000
--- a/node_modules/jsprim/lib/jsprim.js
+++ /dev/null
@@ -1,735 +0,0 @@
-/*
- * lib/jsprim.js: utilities for primitive JavaScript types
- */
-
-var mod_assert = require('assert-plus');
-var mod_util = require('util');
-
-var mod_extsprintf = require('extsprintf');
-var mod_verror = require('verror');
-var mod_jsonschema = require('json-schema');
-
-/*
- * Public interface
- */
-exports.deepCopy = deepCopy;
-exports.deepEqual = deepEqual;
-exports.isEmpty = isEmpty;
-exports.hasKey = hasKey;
-exports.forEachKey = forEachKey;
-exports.pluck = pluck;
-exports.flattenObject = flattenObject;
-exports.flattenIter = flattenIter;
-exports.validateJsonObject = validateJsonObjectJS;
-exports.validateJsonObjectJS = validateJsonObjectJS;
-exports.randElt = randElt;
-exports.extraProperties = extraProperties;
-exports.mergeObjects = mergeObjects;
-
-exports.startsWith = startsWith;
-exports.endsWith = endsWith;
-
-exports.parseInteger = parseInteger;
-
-exports.iso8601 = iso8601;
-exports.rfc1123 = rfc1123;
-exports.parseDateTime = parseDateTime;
-
-exports.hrtimediff = hrtimeDiff;
-exports.hrtimeDiff = hrtimeDiff;
-exports.hrtimeAccum = hrtimeAccum;
-exports.hrtimeAdd = hrtimeAdd;
-exports.hrtimeNanosec = hrtimeNanosec;
-exports.hrtimeMicrosec = hrtimeMicrosec;
-exports.hrtimeMillisec = hrtimeMillisec;
-
-
-/*
- * Deep copy an acyclic *basic* Javascript object. This only handles basic
- * scalars (strings, numbers, booleans) and arbitrarily deep arrays and objects
- * containing these. This does *not* handle instances of other classes.
- */
-function deepCopy(obj)
-{
- var ret, key;
- var marker = '__deepCopy';
-
- if (obj && obj[marker])
- throw (new Error('attempted deep copy of cyclic object'));
-
- if (obj && obj.constructor == Object) {
- ret = {};
- obj[marker] = true;
-
- for (key in obj) {
- if (key == marker)
- continue;
-
- ret[key] = deepCopy(obj[key]);
- }
-
- delete (obj[marker]);
- return (ret);
- }
-
- if (obj && obj.constructor == Array) {
- ret = [];
- obj[marker] = true;
-
- for (key = 0; key < obj.length; key++)
- ret.push(deepCopy(obj[key]));
-
- delete (obj[marker]);
- return (ret);
- }
-
- /*
- * It must be a primitive type -- just return it.
- */
- return (obj);
-}
-
-function deepEqual(obj1, obj2)
-{
- if (typeof (obj1) != typeof (obj2))
- return (false);
-
- if (obj1 === null || obj2 === null || typeof (obj1) != 'object')
- return (obj1 === obj2);
-
- if (obj1.constructor != obj2.constructor)
- return (false);
-
- var k;
- for (k in obj1) {
- if (!obj2.hasOwnProperty(k))
- return (false);
-
- if (!deepEqual(obj1[k], obj2[k]))
- return (false);
- }
-
- for (k in obj2) {
- if (!obj1.hasOwnProperty(k))
- return (false);
- }
-
- return (true);
-}
-
-function isEmpty(obj)
-{
- var key;
- for (key in obj)
- return (false);
- return (true);
-}
-
-function hasKey(obj, key)
-{
- mod_assert.equal(typeof (key), 'string');
- return (Object.prototype.hasOwnProperty.call(obj, key));
-}
-
-function forEachKey(obj, callback)
-{
- for (var key in obj) {
- if (hasKey(obj, key)) {
- callback(key, obj[key]);
- }
- }
-}
-
-function pluck(obj, key)
-{
- mod_assert.equal(typeof (key), 'string');
- return (pluckv(obj, key));
-}
-
-function pluckv(obj, key)
-{
- if (obj === null || typeof (obj) !== 'object')
- return (undefined);
-
- if (obj.hasOwnProperty(key))
- return (obj[key]);
-
- var i = key.indexOf('.');
- if (i == -1)
- return (undefined);
-
- var key1 = key.substr(0, i);
- if (!obj.hasOwnProperty(key1))
- return (undefined);
-
- return (pluckv(obj[key1], key.substr(i + 1)));
-}
-
-/*
- * Invoke callback(row) for each entry in the array that would be returned by
- * flattenObject(data, depth). This is just like flattenObject(data,
- * depth).forEach(callback), except that the intermediate array is never
- * created.
- */
-function flattenIter(data, depth, callback)
-{
- doFlattenIter(data, depth, [], callback);
-}
-
-function doFlattenIter(data, depth, accum, callback)
-{
- var each;
- var key;
-
- if (depth === 0) {
- each = accum.slice(0);
- each.push(data);
- callback(each);
- return;
- }
-
- mod_assert.ok(data !== null);
- mod_assert.equal(typeof (data), 'object');
- mod_assert.equal(typeof (depth), 'number');
- mod_assert.ok(depth >= 0);
-
- for (key in data) {
- each = accum.slice(0);
- each.push(key);
- doFlattenIter(data[key], depth - 1, each, callback);
- }
-}
-
-function flattenObject(data, depth)
-{
- if (depth === 0)
- return ([ data ]);
-
- mod_assert.ok(data !== null);
- mod_assert.equal(typeof (data), 'object');
- mod_assert.equal(typeof (depth), 'number');
- mod_assert.ok(depth >= 0);
-
- var rv = [];
- var key;
-
- for (key in data) {
- flattenObject(data[key], depth - 1).forEach(function (p) {
- rv.push([ key ].concat(p));
- });
- }
-
- return (rv);
-}
-
-function startsWith(str, prefix)
-{
- return (str.substr(0, prefix.length) == prefix);
-}
-
-function endsWith(str, suffix)
-{
- return (str.substr(
- str.length - suffix.length, suffix.length) == suffix);
-}
-
-function iso8601(d)
-{
- if (typeof (d) == 'number')
- d = new Date(d);
- mod_assert.ok(d.constructor === Date);
- return (mod_extsprintf.sprintf('%4d-%02d-%02dT%02d:%02d:%02d.%03dZ',
- d.getUTCFullYear(), d.getUTCMonth() + 1, d.getUTCDate(),
- d.getUTCHours(), d.getUTCMinutes(), d.getUTCSeconds(),
- d.getUTCMilliseconds()));
-}
-
-var RFC1123_MONTHS = [
- 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',
- 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
-var RFC1123_DAYS = [
- 'Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'];
-
-function rfc1123(date) {
- return (mod_extsprintf.sprintf('%s, %02d %s %04d %02d:%02d:%02d GMT',
- RFC1123_DAYS[date.getUTCDay()], date.getUTCDate(),
- RFC1123_MONTHS[date.getUTCMonth()], date.getUTCFullYear(),
- date.getUTCHours(), date.getUTCMinutes(),
- date.getUTCSeconds()));
-}
-
-/*
- * Parses a date expressed as a string, as either a number of milliseconds since
- * the epoch or any string format that Date accepts, giving preference to the
- * former where these two sets overlap (e.g., small numbers).
- */
-function parseDateTime(str)
-{
- /*
- * This is irritatingly implicit, but significantly more concise than
- * alternatives. The "+str" will convert a string containing only a
- * number directly to a Number, or NaN for other strings. Thus, if the
- * conversion succeeds, we use it (this is the milliseconds-since-epoch
- * case). Otherwise, we pass the string directly to the Date
- * constructor to parse.
- */
- var numeric = +str;
- if (!isNaN(numeric)) {
- return (new Date(numeric));
- } else {
- return (new Date(str));
- }
-}
-
-
-/*
- * Number.*_SAFE_INTEGER isn't present before node v0.12, so we hardcode
- * the ES6 definitions here, while allowing for them to someday be higher.
- */
-var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || 9007199254740991;
-var MIN_SAFE_INTEGER = Number.MIN_SAFE_INTEGER || -9007199254740991;
-
-
-/*
- * Default options for parseInteger().
- */
-var PI_DEFAULTS = {
- base: 10,
- allowSign: true,
- allowPrefix: false,
- allowTrailing: false,
- allowImprecise: false,
- trimWhitespace: false,
- leadingZeroIsOctal: false
-};
-
-var CP_0 = 0x30;
-var CP_9 = 0x39;
-
-var CP_A = 0x41;
-var CP_B = 0x42;
-var CP_O = 0x4f;
-var CP_T = 0x54;
-var CP_X = 0x58;
-var CP_Z = 0x5a;
-
-var CP_a = 0x61;
-var CP_b = 0x62;
-var CP_o = 0x6f;
-var CP_t = 0x74;
-var CP_x = 0x78;
-var CP_z = 0x7a;
-
-var PI_CONV_DEC = 0x30;
-var PI_CONV_UC = 0x37;
-var PI_CONV_LC = 0x57;
-
-
-/*
- * A stricter version of parseInt() that provides options for changing what
- * is an acceptable string (for example, disallowing trailing characters).
- */
-function parseInteger(str, uopts)
-{
- mod_assert.string(str, 'str');
- mod_assert.optionalObject(uopts, 'options');
-
- var baseOverride = false;
- var options = PI_DEFAULTS;
-
- if (uopts) {
- baseOverride = hasKey(uopts, 'base');
- options = mergeObjects(options, uopts);
- mod_assert.number(options.base, 'options.base');
- mod_assert.ok(options.base >= 2, 'options.base >= 2');
- mod_assert.ok(options.base <= 36, 'options.base <= 36');
- mod_assert.bool(options.allowSign, 'options.allowSign');
- mod_assert.bool(options.allowPrefix, 'options.allowPrefix');
- mod_assert.bool(options.allowTrailing,
- 'options.allowTrailing');
- mod_assert.bool(options.allowImprecise,
- 'options.allowImprecise');
- mod_assert.bool(options.trimWhitespace,
- 'options.trimWhitespace');
- mod_assert.bool(options.leadingZeroIsOctal,
- 'options.leadingZeroIsOctal');
-
- if (options.leadingZeroIsOctal) {
- mod_assert.ok(!baseOverride,
- '"base" and "leadingZeroIsOctal" are ' +
- 'mutually exclusive');
- }
- }
-
- var c;
- var pbase = -1;
- var base = options.base;
- var start;
- var mult = 1;
- var value = 0;
- var idx = 0;
- var len = str.length;
-
- /* Trim any whitespace on the left side. */
- if (options.trimWhitespace) {
- while (idx < len && isSpace(str.charCodeAt(idx))) {
- ++idx;
- }
- }
-
- /* Check the number for a leading sign. */
- if (options.allowSign) {
- if (str[idx] === '-') {
- idx += 1;
- mult = -1;
- } else if (str[idx] === '+') {
- idx += 1;
- }
- }
-
- /* Parse the base-indicating prefix if there is one. */
- if (str[idx] === '0') {
- if (options.allowPrefix) {
- pbase = prefixToBase(str.charCodeAt(idx + 1));
- if (pbase !== -1 && (!baseOverride || pbase === base)) {
- base = pbase;
- idx += 2;
- }
- }
-
- if (pbase === -1 && options.leadingZeroIsOctal) {
- base = 8;
- }
- }
-
- /* Parse the actual digits. */
- for (start = idx; idx < len; ++idx) {
- c = translateDigit(str.charCodeAt(idx));
- if (c !== -1 && c < base) {
- value *= base;
- value += c;
- } else {
- break;
- }
- }
-
- /* If we didn't parse any digits, we have an invalid number. */
- if (start === idx) {
- return (new Error('invalid number: ' + JSON.stringify(str)));
- }
-
- /* Trim any whitespace on the right side. */
- if (options.trimWhitespace) {
- while (idx < len && isSpace(str.charCodeAt(idx))) {
- ++idx;
- }
- }
-
- /* Check for trailing characters. */
- if (idx < len && !options.allowTrailing) {
- return (new Error('trailing characters after number: ' +
- JSON.stringify(str.slice(idx))));
- }
-
- /* If our value is 0, we return now, to avoid returning -0. */
- if (value === 0) {
- return (0);
- }
-
- /* Calculate our final value. */
- var result = value * mult;
-
- /*
- * If the string represents a value that cannot be precisely represented
- * by JavaScript, then we want to check that:
- *
- * - We never increased the value past MAX_SAFE_INTEGER
- * - We don't make the result negative and below MIN_SAFE_INTEGER
- *
- * Because we only ever increment the value during parsing, there's no
- * chance of moving past MAX_SAFE_INTEGER and then dropping below it
- * again, losing precision in the process. This means that we only need
- * to do our checks here, at the end.
- */
- if (!options.allowImprecise &&
- (value > MAX_SAFE_INTEGER || result < MIN_SAFE_INTEGER)) {
- return (new Error('number is outside of the supported range: ' +
- JSON.stringify(str.slice(start, idx))));
- }
-
- return (result);
-}
-
-
-/*
- * Interpret a character code as a base-36 digit.
- */
-function translateDigit(d)
-{
- if (d >= CP_0 && d <= CP_9) {
- /* '0' to '9' -> 0 to 9 */
- return (d - PI_CONV_DEC);
- } else if (d >= CP_A && d <= CP_Z) {
- /* 'A' - 'Z' -> 10 to 35 */
- return (d - PI_CONV_UC);
- } else if (d >= CP_a && d <= CP_z) {
- /* 'a' - 'z' -> 10 to 35 */
- return (d - PI_CONV_LC);
- } else {
- /* Invalid character code */
- return (-1);
- }
-}
-
-
-/*
- * Test if a value matches the ECMAScript definition of trimmable whitespace.
- */
-function isSpace(c)
-{
- return (c === 0x20) ||
- (c >= 0x0009 && c <= 0x000d) ||
- (c === 0x00a0) ||
- (c === 0x1680) ||
- (c === 0x180e) ||
- (c >= 0x2000 && c <= 0x200a) ||
- (c === 0x2028) ||
- (c === 0x2029) ||
- (c === 0x202f) ||
- (c === 0x205f) ||
- (c === 0x3000) ||
- (c === 0xfeff);
-}
-
-
-/*
- * Determine which base a character indicates (e.g., 'x' indicates hex).
- */
-function prefixToBase(c)
-{
- if (c === CP_b || c === CP_B) {
- /* 0b/0B (binary) */
- return (2);
- } else if (c === CP_o || c === CP_O) {
- /* 0o/0O (octal) */
- return (8);
- } else if (c === CP_t || c === CP_T) {
- /* 0t/0T (decimal) */
- return (10);
- } else if (c === CP_x || c === CP_X) {
- /* 0x/0X (hexadecimal) */
- return (16);
- } else {
- /* Not a meaningful character */
- return (-1);
- }
-}
-
-
-function validateJsonObjectJS(schema, input)
-{
- var report = mod_jsonschema.validate(input, schema);
-
- if (report.errors.length === 0)
- return (null);
-
- /* Currently, we only do anything useful with the first error. */
- var error = report.errors[0];
-
- /* The failed property is given by a URI with an irrelevant prefix. */
- var propname = error['property'];
- var reason = error['message'].toLowerCase();
- var i, j;
-
- /*
- * There's at least one case where the property error message is
- * confusing at best. We work around this here.
- */
- if ((i = reason.indexOf('the property ')) != -1 &&
- (j = reason.indexOf(' is not defined in the schema and the ' +
- 'schema does not allow additional properties')) != -1) {
- i += 'the property '.length;
- if (propname === '')
- propname = reason.substr(i, j - i);
- else
- propname = propname + '.' + reason.substr(i, j - i);
-
- reason = 'unsupported property';
- }
-
- var rv = new mod_verror.VError('property "%s": %s', propname, reason);
- rv.jsv_details = error;
- return (rv);
-}
-
-function randElt(arr)
-{
- mod_assert.ok(Array.isArray(arr) && arr.length > 0,
- 'randElt argument must be a non-empty array');
-
- return (arr[Math.floor(Math.random() * arr.length)]);
-}
-
-function assertHrtime(a)
-{
- mod_assert.ok(a[0] >= 0 && a[1] >= 0,
- 'negative numbers not allowed in hrtimes');
- mod_assert.ok(a[1] < 1e9, 'nanoseconds column overflow');
-}
-
-/*
- * Compute the time elapsed between hrtime readings A and B, where A is later
- * than B. hrtime readings come from Node's process.hrtime(). There is no
- * defined way to represent negative deltas, so it's illegal to diff B from A
- * where the time denoted by B is later than the time denoted by A. If this
- * becomes valuable, we can define a representation and extend the
- * implementation to support it.
- */
-function hrtimeDiff(a, b)
-{
- assertHrtime(a);
- assertHrtime(b);
- mod_assert.ok(a[0] > b[0] || (a[0] == b[0] && a[1] >= b[1]),
- 'negative differences not allowed');
-
- var rv = [ a[0] - b[0], 0 ];
-
- if (a[1] >= b[1]) {
- rv[1] = a[1] - b[1];
- } else {
- rv[0]--;
- rv[1] = 1e9 - (b[1] - a[1]);
- }
-
- return (rv);
-}
-
-/*
- * Convert a hrtime reading from the array format returned by Node's
- * process.hrtime() into a scalar number of nanoseconds.
- */
-function hrtimeNanosec(a)
-{
- assertHrtime(a);
-
- return (Math.floor(a[0] * 1e9 + a[1]));
-}
-
-/*
- * Convert a hrtime reading from the array format returned by Node's
- * process.hrtime() into a scalar number of microseconds.
- */
-function hrtimeMicrosec(a)
-{
- assertHrtime(a);
-
- return (Math.floor(a[0] * 1e6 + a[1] / 1e3));
-}
-
-/*
- * Convert a hrtime reading from the array format returned by Node's
- * process.hrtime() into a scalar number of milliseconds.
- */
-function hrtimeMillisec(a)
-{
- assertHrtime(a);
-
- return (Math.floor(a[0] * 1e3 + a[1] / 1e6));
-}
-
-/*
- * Add two hrtime readings A and B, overwriting A with the result of the
- * addition. This function is useful for accumulating several hrtime intervals
- * into a counter. Returns A.
- */
-function hrtimeAccum(a, b)
-{
- assertHrtime(a);
- assertHrtime(b);
-
- /*
- * Accumulate the nanosecond component.
- */
- a[1] += b[1];
- if (a[1] >= 1e9) {
- /*
- * The nanosecond component overflowed, so carry to the seconds
- * field.
- */
- a[0]++;
- a[1] -= 1e9;
- }
-
- /*
- * Accumulate the seconds component.
- */
- a[0] += b[0];
-
- return (a);
-}
-
-/*
- * Add two hrtime readings A and B, returning the result as a new hrtime array.
- * Does not modify either input argument.
- */
-function hrtimeAdd(a, b)
-{
- assertHrtime(a);
-
- var rv = [ a[0], a[1] ];
-
- return (hrtimeAccum(rv, b));
-}
-
-
-/*
- * Check an object for unexpected properties. Accepts the object to check, and
- * an array of allowed property names (strings). Returns an array of key names
- * that were found on the object, but did not appear in the list of allowed
- * properties. If no properties were found, the returned array will be of
- * zero length.
- */
-function extraProperties(obj, allowed)
-{
- mod_assert.ok(typeof (obj) === 'object' && obj !== null,
- 'obj argument must be a non-null object');
- mod_assert.ok(Array.isArray(allowed),
- 'allowed argument must be an array of strings');
- for (var i = 0; i < allowed.length; i++) {
- mod_assert.ok(typeof (allowed[i]) === 'string',
- 'allowed argument must be an array of strings');
- }
-
- return (Object.keys(obj).filter(function (key) {
- return (allowed.indexOf(key) === -1);
- }));
-}
-
-/*
- * Given three sets of properties "provided" (may be undefined), "overrides"
- * (required), and "defaults" (may be undefined), construct an object containing
- * the union of these sets with "overrides" overriding "provided", and
- * "provided" overriding "defaults". None of the input objects are modified.
- */
-function mergeObjects(provided, overrides, defaults)
-{
- var rv, k;
-
- rv = {};
- if (defaults) {
- for (k in defaults)
- rv[k] = defaults[k];
- }
-
- if (provided) {
- for (k in provided)
- rv[k] = provided[k];
- }
-
- if (overrides) {
- for (k in overrides)
- rv[k] = overrides[k];
- }
-
- return (rv);
-}
diff --git a/node_modules/jsprim/package.json b/node_modules/jsprim/package.json
deleted file mode 100644
index b3e5dd3..0000000
--- a/node_modules/jsprim/package.json
+++ /dev/null
@@ -1,49 +0,0 @@
-{
- "_from": "jsprim@^1.2.2",
- "_id": "jsprim@1.4.1",
- "_inBundle": false,
- "_integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=",
- "_location": "/jsprim",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "jsprim@^1.2.2",
- "name": "jsprim",
- "escapedName": "jsprim",
- "rawSpec": "^1.2.2",
- "saveSpec": null,
- "fetchSpec": "^1.2.2"
- },
- "_requiredBy": [
- "/http-signature"
- ],
- "_resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz",
- "_shasum": "313e66bc1e5cc06e438bc1b7499c2e5c56acb6a2",
- "_spec": "jsprim@^1.2.2",
- "_where": "D:\\Projects\\minifyfromhtml\\node_modules\\http-signature",
- "bugs": {
- "url": "https://github.com/joyent/node-jsprim/issues"
- },
- "bundleDependencies": false,
- "dependencies": {
- "assert-plus": "1.0.0",
- "extsprintf": "1.3.0",
- "json-schema": "0.2.3",
- "verror": "1.10.0"
- },
- "deprecated": false,
- "description": "utilities for primitive JavaScript types",
- "engines": [
- "node >=0.6.0"
- ],
- "homepage": "https://github.com/joyent/node-jsprim#readme",
- "license": "MIT",
- "main": "./lib/jsprim.js",
- "name": "jsprim",
- "repository": {
- "type": "git",
- "url": "git://github.com/joyent/node-jsprim.git"
- },
- "version": "1.4.1"
-}
diff --git a/node_modules/mime-db/HISTORY.md b/node_modules/mime-db/HISTORY.md
index 1555055..ff9438e 100644
--- a/node_modules/mime-db/HISTORY.md
+++ b/node_modules/mime-db/HISTORY.md
@@ -1,3 +1,10 @@
+1.48.0 / 2021-05-30
+===================
+
+ * Add extension `.mvt` to `application/vnd.mapbox-vector-tile`
+ * Add new upstream MIME types
+ * Mark `text/yaml` as compressible
+
1.47.0 / 2021-04-01
===================
diff --git a/node_modules/mime-db/db.json b/node_modules/mime-db/db.json
index 63c189e..067e0ce 100644
--- a/node_modules/mime-db/db.json
+++ b/node_modules/mime-db/db.json
@@ -11,6 +11,14 @@
"source": "iana",
"compressible": true
},
+ "application/3gpphal+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/3gpphalforms+json": {
+ "source": "iana",
+ "compressible": true
+ },
"application/a2l": {
"source": "iana"
},
@@ -999,6 +1007,9 @@
"application/nss": {
"source": "iana"
},
+ "application/oauth-authz-req+jwt": {
+ "source": "iana"
+ },
"application/ocsp-request": {
"source": "iana"
},
@@ -1342,6 +1353,10 @@
"source": "iana",
"compressible": true
},
+ "application/sarif-external-properties+json": {
+ "source": "iana",
+ "compressible": true
+ },
"application/sbe": {
"source": "iana"
},
@@ -1696,6 +1711,9 @@
"application/vnd.3gpp-v2x-local-service-information": {
"source": "iana"
},
+ "application/vnd.3gpp.5gnas": {
+ "source": "iana"
+ },
"application/vnd.3gpp.access-transfer-events+xml": {
"source": "iana",
"compressible": true
@@ -1708,9 +1726,15 @@
"source": "iana",
"compressible": true
},
+ "application/vnd.3gpp.gtpc": {
+ "source": "iana"
+ },
"application/vnd.3gpp.interworking-data": {
"source": "iana"
},
+ "application/vnd.3gpp.lpp": {
+ "source": "iana"
+ },
"application/vnd.3gpp.mc-signalling-ear": {
"source": "iana"
},
@@ -1820,6 +1844,12 @@
"source": "iana",
"compressible": true
},
+ "application/vnd.3gpp.ngap": {
+ "source": "iana"
+ },
+ "application/vnd.3gpp.pfcp": {
+ "source": "iana"
+ },
"application/vnd.3gpp.pic-bw-large": {
"source": "iana",
"extensions": ["plb"]
@@ -1832,6 +1862,9 @@
"source": "iana",
"extensions": ["pvb"]
},
+ "application/vnd.3gpp.s1ap": {
+ "source": "iana"
+ },
"application/vnd.3gpp.sms": {
"source": "iana"
},
@@ -2322,6 +2355,9 @@
"application/vnd.cryptomator.encrypted": {
"source": "iana"
},
+ "application/vnd.cryptomator.vault": {
+ "source": "iana"
+ },
"application/vnd.ctc-posml": {
"source": "iana",
"extensions": ["pml"]
@@ -2817,6 +2853,19 @@
"source": "iana",
"extensions": ["fsc"]
},
+ "application/vnd.fujifilm.fb.docuworks": {
+ "source": "iana"
+ },
+ "application/vnd.fujifilm.fb.docuworks.binder": {
+ "source": "iana"
+ },
+ "application/vnd.fujifilm.fb.docuworks.container": {
+ "source": "iana"
+ },
+ "application/vnd.fujifilm.fb.jfi+xml": {
+ "source": "iana",
+ "compressible": true
+ },
"application/vnd.fujitsu.oasys": {
"source": "iana",
"extensions": ["oas"]
@@ -3427,7 +3476,8 @@
"extensions": ["portpkg"]
},
"application/vnd.mapbox-vector-tile": {
- "source": "iana"
+ "source": "iana",
+ "extensions": ["mvt"]
},
"application/vnd.marlin.drm.actiontoken+xml": {
"source": "iana",
@@ -5438,6 +5488,7 @@
"source": "iana"
},
"application/wasm": {
+ "source": "iana",
"compressible": true,
"extensions": ["wasm"]
},
@@ -7400,6 +7451,9 @@
"source": "iana",
"extensions": ["x_t"]
},
+ "model/vnd.pytha.pyox": {
+ "source": "iana"
+ },
"model/vnd.rosette.annotated-data-model": {
"source": "iana"
},
@@ -7682,6 +7736,7 @@
"source": "iana"
},
"text/shex": {
+ "source": "iana",
"extensions": ["shex"]
},
"text/slim": {
@@ -7953,6 +8008,7 @@
"source": "iana"
},
"text/yaml": {
+ "compressible": true,
"extensions": ["yaml","yml"]
},
"video/1d-interleaved-parityfec": {
diff --git a/node_modules/mime-db/package.json b/node_modules/mime-db/package.json
index 2706982..ed844e7 100644
--- a/node_modules/mime-db/package.json
+++ b/node_modules/mime-db/package.json
@@ -1,26 +1,26 @@
{
- "_from": "mime-db@1.47.0",
- "_id": "mime-db@1.47.0",
+ "_from": "mime-db@1.48.0",
+ "_id": "mime-db@1.48.0",
"_inBundle": false,
- "_integrity": "sha512-QBmA/G2y+IfeS4oktet3qRZ+P5kPhCKRXxXnQEudYqUaEioAU1/Lq2us3D/t1Jfo4hE9REQPrbB7K5sOczJVIw==",
+ "_integrity": "sha512-FM3QwxV+TnZYQ2aRqhlKBMHxk10lTbMt3bBkMAp54ddrNeVSfcQYOOKuGuy3Ddrm38I04If834fOUSq1yzslJQ==",
"_location": "/mime-db",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
- "raw": "mime-db@1.47.0",
+ "raw": "mime-db@1.48.0",
"name": "mime-db",
"escapedName": "mime-db",
- "rawSpec": "1.47.0",
+ "rawSpec": "1.48.0",
"saveSpec": null,
- "fetchSpec": "1.47.0"
+ "fetchSpec": "1.48.0"
},
"_requiredBy": [
"/mime-types"
],
- "_resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.47.0.tgz",
- "_shasum": "8cb313e59965d3c05cfbf898915a267af46a335c",
- "_spec": "mime-db@1.47.0",
+ "_resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.48.0.tgz",
+ "_shasum": "e35b31045dd7eada3aaad537ed88a33afbef2d1d",
+ "_spec": "mime-db@1.48.0",
"_where": "D:\\Projects\\minifyfromhtml\\node_modules\\mime-types",
"bugs": {
"url": "https://github.com/jshttp/mime-db/issues"
@@ -48,16 +48,16 @@
"bluebird": "3.7.2",
"co": "4.6.0",
"cogent": "1.0.1",
- "csv-parse": "4.15.3",
- "eslint": "7.23.0",
+ "csv-parse": "4.15.4",
+ "eslint": "7.27.0",
"eslint-config-standard": "15.0.1",
- "eslint-plugin-import": "2.22.1",
- "eslint-plugin-markdown": "2.0.0",
+ "eslint-plugin-import": "2.23.4",
+ "eslint-plugin-markdown": "2.2.0",
"eslint-plugin-node": "11.1.0",
- "eslint-plugin-promise": "4.3.1",
+ "eslint-plugin-promise": "5.1.0",
"eslint-plugin-standard": "4.1.0",
"gnode": "0.1.2",
- "mocha": "8.3.2",
+ "mocha": "8.4.0",
"nyc": "15.1.0",
"raw-body": "2.4.1",
"stream-to-array": "2.3.0"
@@ -98,5 +98,5 @@
"update": "npm run fetch && npm run build",
"version": "node scripts/version-history.js && git add HISTORY.md"
},
- "version": "1.47.0"
+ "version": "1.48.0"
}
diff --git a/node_modules/mime-types/HISTORY.md b/node_modules/mime-types/HISTORY.md
index 38472be..19e45a1 100644
--- a/node_modules/mime-types/HISTORY.md
+++ b/node_modules/mime-types/HISTORY.md
@@ -1,3 +1,11 @@
+2.1.31 / 2021-06-01
+===================
+
+ * deps: mime-db@1.48.0
+ - Add extension `.mvt` to `application/vnd.mapbox-vector-tile`
+ - Add new upstream MIME types
+ - Mark `text/yaml` as compressible
+
2.1.30 / 2021-04-02
===================
diff --git a/node_modules/mime-types/package.json b/node_modules/mime-types/package.json
index a5053c5..f26fe21 100644
--- a/node_modules/mime-types/package.json
+++ b/node_modules/mime-types/package.json
@@ -1,28 +1,27 @@
{
- "_from": "mime-types@~2.1.19",
- "_id": "mime-types@2.1.30",
+ "_from": "mime-types@^2.1.12",
+ "_id": "mime-types@2.1.31",
"_inBundle": false,
- "_integrity": "sha512-crmjA4bLtR8m9qLpHvgxSChT+XoSlZi8J4n/aIdn3z92e/U47Z0V/yl+Wh9W046GgFVAmoNR/fmdbZYcSSIUeg==",
+ "_integrity": "sha512-XGZnNzm3QvgKxa8dpzyhFTHmpP3l5YNusmne07VUOXxou9CqUqYa/HBy124RqtVh/O2pECas/MOcsDgpilPOPg==",
"_location": "/mime-types",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
- "raw": "mime-types@~2.1.19",
+ "raw": "mime-types@^2.1.12",
"name": "mime-types",
"escapedName": "mime-types",
- "rawSpec": "~2.1.19",
+ "rawSpec": "^2.1.12",
"saveSpec": null,
- "fetchSpec": "~2.1.19"
+ "fetchSpec": "^2.1.12"
},
"_requiredBy": [
- "/form-data",
- "/request"
+ "/form-data"
],
- "_resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.30.tgz",
- "_shasum": "6e7be8b4c479825f85ed6326695db73f9305d62d",
- "_spec": "mime-types@~2.1.19",
- "_where": "D:\\Projects\\minifyfromhtml\\node_modules\\request",
+ "_resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.31.tgz",
+ "_shasum": "a00d76b74317c61f9c2db2218b8e9f8e9c5c9e6b",
+ "_spec": "mime-types@^2.1.12",
+ "_where": "D:\\Projects\\minifyfromhtml\\node_modules\\form-data",
"bugs": {
"url": "https://github.com/jshttp/mime-types/issues"
},
@@ -44,19 +43,19 @@
}
],
"dependencies": {
- "mime-db": "1.47.0"
+ "mime-db": "1.48.0"
},
"deprecated": false,
"description": "The ultimate javascript content-type utility.",
"devDependencies": {
- "eslint": "7.23.0",
+ "eslint": "7.27.0",
"eslint-config-standard": "14.1.1",
- "eslint-plugin-import": "2.22.1",
- "eslint-plugin-markdown": "2.0.0",
+ "eslint-plugin-import": "2.23.4",
+ "eslint-plugin-markdown": "2.2.0",
"eslint-plugin-node": "11.1.0",
- "eslint-plugin-promise": "4.3.1",
+ "eslint-plugin-promise": "5.1.0",
"eslint-plugin-standard": "4.1.0",
- "mocha": "8.3.2",
+ "mocha": "8.4.0",
"nyc": "15.1.0"
},
"engines": {
@@ -84,5 +83,5 @@
"test-ci": "nyc --reporter=lcov --reporter=text npm test",
"test-cov": "nyc --reporter=html --reporter=text npm test"
},
- "version": "2.1.30"
+ "version": "2.1.31"
}
diff --git a/node_modules/ms/index.js b/node_modules/ms/index.js
new file mode 100644
index 0000000..c4498bc
--- /dev/null
+++ b/node_modules/ms/index.js
@@ -0,0 +1,162 @@
+/**
+ * Helpers.
+ */
+
+var s = 1000;
+var m = s * 60;
+var h = m * 60;
+var d = h * 24;
+var w = d * 7;
+var y = d * 365.25;
+
+/**
+ * Parse or format the given `val`.
+ *
+ * Options:
+ *
+ * - `long` verbose formatting [false]
+ *
+ * @param {String|Number} val
+ * @param {Object} [options]
+ * @throws {Error} throw an error if val is not a non-empty string or a number
+ * @return {String|Number}
+ * @api public
+ */
+
+module.exports = function(val, options) {
+ options = options || {};
+ var type = typeof val;
+ if (type === 'string' && val.length > 0) {
+ return parse(val);
+ } else if (type === 'number' && isFinite(val)) {
+ return options.long ? fmtLong(val) : fmtShort(val);
+ }
+ throw new Error(
+ 'val is not a non-empty string or a valid number. val=' +
+ JSON.stringify(val)
+ );
+};
+
+/**
+ * Parse the given `str` and return milliseconds.
+ *
+ * @param {String} str
+ * @return {Number}
+ * @api private
+ */
+
+function parse(str) {
+ str = String(str);
+ if (str.length > 100) {
+ return;
+ }
+ var match = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(
+ str
+ );
+ if (!match) {
+ return;
+ }
+ var n = parseFloat(match[1]);
+ var type = (match[2] || 'ms').toLowerCase();
+ switch (type) {
+ case 'years':
+ case 'year':
+ case 'yrs':
+ case 'yr':
+ case 'y':
+ return n * y;
+ case 'weeks':
+ case 'week':
+ case 'w':
+ return n * w;
+ case 'days':
+ case 'day':
+ case 'd':
+ return n * d;
+ case 'hours':
+ case 'hour':
+ case 'hrs':
+ case 'hr':
+ case 'h':
+ return n * h;
+ case 'minutes':
+ case 'minute':
+ case 'mins':
+ case 'min':
+ case 'm':
+ return n * m;
+ case 'seconds':
+ case 'second':
+ case 'secs':
+ case 'sec':
+ case 's':
+ return n * s;
+ case 'milliseconds':
+ case 'millisecond':
+ case 'msecs':
+ case 'msec':
+ case 'ms':
+ return n;
+ default:
+ return undefined;
+ }
+}
+
+/**
+ * Short format for `ms`.
+ *
+ * @param {Number} ms
+ * @return {String}
+ * @api private
+ */
+
+function fmtShort(ms) {
+ var msAbs = Math.abs(ms);
+ if (msAbs >= d) {
+ return Math.round(ms / d) + 'd';
+ }
+ if (msAbs >= h) {
+ return Math.round(ms / h) + 'h';
+ }
+ if (msAbs >= m) {
+ return Math.round(ms / m) + 'm';
+ }
+ if (msAbs >= s) {
+ return Math.round(ms / s) + 's';
+ }
+ return ms + 'ms';
+}
+
+/**
+ * Long format for `ms`.
+ *
+ * @param {Number} ms
+ * @return {String}
+ * @api private
+ */
+
+function fmtLong(ms) {
+ var msAbs = Math.abs(ms);
+ if (msAbs >= d) {
+ return plural(ms, msAbs, d, 'day');
+ }
+ if (msAbs >= h) {
+ return plural(ms, msAbs, h, 'hour');
+ }
+ if (msAbs >= m) {
+ return plural(ms, msAbs, m, 'minute');
+ }
+ if (msAbs >= s) {
+ return plural(ms, msAbs, s, 'second');
+ }
+ return ms + ' ms';
+}
+
+/**
+ * Pluralization helper.
+ */
+
+function plural(ms, msAbs, n, name) {
+ var isPlural = msAbs >= n * 1.5;
+ return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : '');
+}
diff --git a/node_modules/ajv/LICENSE b/node_modules/ms/license.md
similarity index 96%
rename from node_modules/ajv/LICENSE
rename to node_modules/ms/license.md
index 96ee719..69b6125 100644
--- a/node_modules/ajv/LICENSE
+++ b/node_modules/ms/license.md
@@ -1,6 +1,6 @@
The MIT License (MIT)
-Copyright (c) 2015-2017 Evgeny Poberezkin
+Copyright (c) 2016 Zeit, Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@@ -19,4 +19,3 @@ 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.
-
diff --git a/node_modules/ms/package.json b/node_modules/ms/package.json
new file mode 100644
index 0000000..f0b0071
--- /dev/null
+++ b/node_modules/ms/package.json
@@ -0,0 +1,69 @@
+{
+ "_from": "ms@2.1.2",
+ "_id": "ms@2.1.2",
+ "_inBundle": false,
+ "_integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==",
+ "_location": "/ms",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "version",
+ "registry": true,
+ "raw": "ms@2.1.2",
+ "name": "ms",
+ "escapedName": "ms",
+ "rawSpec": "2.1.2",
+ "saveSpec": null,
+ "fetchSpec": "2.1.2"
+ },
+ "_requiredBy": [
+ "/debug"
+ ],
+ "_resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
+ "_shasum": "d09d1f357b443f493382a8eb3ccd183872ae6009",
+ "_spec": "ms@2.1.2",
+ "_where": "D:\\Projects\\minifyfromhtml\\node_modules\\debug",
+ "bugs": {
+ "url": "https://github.com/zeit/ms/issues"
+ },
+ "bundleDependencies": false,
+ "deprecated": false,
+ "description": "Tiny millisecond conversion utility",
+ "devDependencies": {
+ "eslint": "4.12.1",
+ "expect.js": "0.3.1",
+ "husky": "0.14.3",
+ "lint-staged": "5.0.0",
+ "mocha": "4.0.1"
+ },
+ "eslintConfig": {
+ "extends": "eslint:recommended",
+ "env": {
+ "node": true,
+ "es6": true
+ }
+ },
+ "files": [
+ "index.js"
+ ],
+ "homepage": "https://github.com/zeit/ms#readme",
+ "license": "MIT",
+ "lint-staged": {
+ "*.js": [
+ "npm run lint",
+ "prettier --single-quote --write",
+ "git add"
+ ]
+ },
+ "main": "./index",
+ "name": "ms",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/zeit/ms.git"
+ },
+ "scripts": {
+ "lint": "eslint lib/* bin/*",
+ "precommit": "lint-staged",
+ "test": "mocha tests.js"
+ },
+ "version": "2.1.2"
+}
diff --git a/node_modules/ms/readme.md b/node_modules/ms/readme.md
new file mode 100644
index 0000000..9a1996b
--- /dev/null
+++ b/node_modules/ms/readme.md
@@ -0,0 +1,60 @@
+# ms
+
+[](https://travis-ci.org/zeit/ms)
+[](https://spectrum.chat/zeit)
+
+Use this package to easily convert various time formats to milliseconds.
+
+## Examples
+
+```js
+ms('2 days') // 172800000
+ms('1d') // 86400000
+ms('10h') // 36000000
+ms('2.5 hrs') // 9000000
+ms('2h') // 7200000
+ms('1m') // 60000
+ms('5s') // 5000
+ms('1y') // 31557600000
+ms('100') // 100
+ms('-3 days') // -259200000
+ms('-1h') // -3600000
+ms('-200') // -200
+```
+
+### Convert from Milliseconds
+
+```js
+ms(60000) // "1m"
+ms(2 * 60000) // "2m"
+ms(-3 * 60000) // "-3m"
+ms(ms('10 hours')) // "10h"
+```
+
+### Time Format Written-Out
+
+```js
+ms(60000, { long: true }) // "1 minute"
+ms(2 * 60000, { long: true }) // "2 minutes"
+ms(-3 * 60000, { long: true }) // "-3 minutes"
+ms(ms('10 hours'), { long: true }) // "10 hours"
+```
+
+## Features
+
+- Works both in [Node.js](https://nodejs.org) and in the browser
+- If a number is supplied to `ms`, a string with a unit is returned
+- If a string that contains the number is supplied, it returns it as a number (e.g.: it returns `100` for `'100'`)
+- If you pass a string with a number and a valid unit, the number of equivalent milliseconds is returned
+
+## Related Packages
+
+- [ms.macro](https://github.com/knpwrs/ms.macro) - Run `ms` as a macro at build-time.
+
+## Caught a Bug?
+
+1. [Fork](https://help.github.com/articles/fork-a-repo/) this repository to your own GitHub account and then [clone](https://help.github.com/articles/cloning-a-repository/) it to your local device
+2. Link the package to the global module directory: `npm link`
+3. Within the module you want to test your local development instance of ms, just link it to the dependencies: `npm link ms`. Instead of the default one from npm, Node.js will now use your clone of ms!
+
+As always, you can run the tests using: `npm test`
diff --git a/node_modules/oauth-sign/LICENSE b/node_modules/oauth-sign/LICENSE
deleted file mode 100644
index a4a9aee..0000000
--- a/node_modules/oauth-sign/LICENSE
+++ /dev/null
@@ -1,55 +0,0 @@
-Apache License
-
-Version 2.0, January 2004
-
-http://www.apache.org/licenses/
-
-TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-1. Definitions.
-
-"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
-
-"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
-
-"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
-
-"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
-
-"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
-
-"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
-
-"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
-
-"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
-
-"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
-
-"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
-
-2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
-
-3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
-
-4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
-
-You must give any other recipients of the Work or Derivative Works a copy of this License; and
-
-You must cause any modified files to carry prominent notices stating that You changed the files; and
-
-You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
-
-If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
-
-5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
-
-6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
-
-7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
-
-8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
-
-9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
-
-END OF TERMS AND CONDITIONS
\ No newline at end of file
diff --git a/node_modules/oauth-sign/README.md b/node_modules/oauth-sign/README.md
deleted file mode 100644
index 549cbba..0000000
--- a/node_modules/oauth-sign/README.md
+++ /dev/null
@@ -1,11 +0,0 @@
-oauth-sign
-==========
-
-OAuth 1 signing. Formerly a vendor lib in mikeal/request, now a standalone module.
-
-## Supported Method Signatures
-
-- HMAC-SHA1
-- HMAC-SHA256
-- RSA-SHA1
-- PLAINTEXT
\ No newline at end of file
diff --git a/node_modules/oauth-sign/index.js b/node_modules/oauth-sign/index.js
deleted file mode 100644
index 6482f77..0000000
--- a/node_modules/oauth-sign/index.js
+++ /dev/null
@@ -1,146 +0,0 @@
-var crypto = require('crypto')
-
-function sha (key, body, algorithm) {
- return crypto.createHmac(algorithm, key).update(body).digest('base64')
-}
-
-function rsa (key, body) {
- return crypto.createSign('RSA-SHA1').update(body).sign(key, 'base64')
-}
-
-function rfc3986 (str) {
- return encodeURIComponent(str)
- .replace(/!/g,'%21')
- .replace(/\*/g,'%2A')
- .replace(/\(/g,'%28')
- .replace(/\)/g,'%29')
- .replace(/'/g,'%27')
-}
-
-// Maps object to bi-dimensional array
-// Converts { foo: 'A', bar: [ 'b', 'B' ]} to
-// [ ['foo', 'A'], ['bar', 'b'], ['bar', 'B'] ]
-function map (obj) {
- var key, val, arr = []
- for (key in obj) {
- val = obj[key]
- if (Array.isArray(val))
- for (var i = 0; i < val.length; i++)
- arr.push([key, val[i]])
- else if (typeof val === 'object')
- for (var prop in val)
- arr.push([key + '[' + prop + ']', val[prop]])
- else
- arr.push([key, val])
- }
- return arr
-}
-
-// Compare function for sort
-function compare (a, b) {
- return a > b ? 1 : a < b ? -1 : 0
-}
-
-function generateBase (httpMethod, base_uri, params) {
- // adapted from https://dev.twitter.com/docs/auth/oauth and
- // https://dev.twitter.com/docs/auth/creating-signature
-
- // Parameter normalization
- // http://tools.ietf.org/html/rfc5849#section-3.4.1.3.2
- var normalized = map(params)
- // 1. First, the name and value of each parameter are encoded
- .map(function (p) {
- return [ rfc3986(p[0]), rfc3986(p[1] || '') ]
- })
- // 2. The parameters are sorted by name, using ascending byte value
- // ordering. If two or more parameters share the same name, they
- // are sorted by their value.
- .sort(function (a, b) {
- return compare(a[0], b[0]) || compare(a[1], b[1])
- })
- // 3. The name of each parameter is concatenated to its corresponding
- // value using an "=" character (ASCII code 61) as a separator, even
- // if the value is empty.
- .map(function (p) { return p.join('=') })
- // 4. The sorted name/value pairs are concatenated together into a
- // single string by using an "&" character (ASCII code 38) as
- // separator.
- .join('&')
-
- var base = [
- rfc3986(httpMethod ? httpMethod.toUpperCase() : 'GET'),
- rfc3986(base_uri),
- rfc3986(normalized)
- ].join('&')
-
- return base
-}
-
-function hmacsign (httpMethod, base_uri, params, consumer_secret, token_secret) {
- var base = generateBase(httpMethod, base_uri, params)
- var key = [
- consumer_secret || '',
- token_secret || ''
- ].map(rfc3986).join('&')
-
- return sha(key, base, 'sha1')
-}
-
-function hmacsign256 (httpMethod, base_uri, params, consumer_secret, token_secret) {
- var base = generateBase(httpMethod, base_uri, params)
- var key = [
- consumer_secret || '',
- token_secret || ''
- ].map(rfc3986).join('&')
-
- return sha(key, base, 'sha256')
-}
-
-function rsasign (httpMethod, base_uri, params, private_key, token_secret) {
- var base = generateBase(httpMethod, base_uri, params)
- var key = private_key || ''
-
- return rsa(key, base)
-}
-
-function plaintext (consumer_secret, token_secret) {
- var key = [
- consumer_secret || '',
- token_secret || ''
- ].map(rfc3986).join('&')
-
- return key
-}
-
-function sign (signMethod, httpMethod, base_uri, params, consumer_secret, token_secret) {
- var method
- var skipArgs = 1
-
- switch (signMethod) {
- case 'RSA-SHA1':
- method = rsasign
- break
- case 'HMAC-SHA1':
- method = hmacsign
- break
- case 'HMAC-SHA256':
- method = hmacsign256
- break
- case 'PLAINTEXT':
- method = plaintext
- skipArgs = 4
- break
- default:
- throw new Error('Signature method not supported: ' + signMethod)
- }
-
- return method.apply(null, [].slice.call(arguments, skipArgs))
-}
-
-exports.hmacsign = hmacsign
-exports.hmacsign256 = hmacsign256
-exports.rsasign = rsasign
-exports.plaintext = plaintext
-exports.sign = sign
-exports.rfc3986 = rfc3986
-exports.generateBase = generateBase
\ No newline at end of file
diff --git a/node_modules/oauth-sign/package.json b/node_modules/oauth-sign/package.json
deleted file mode 100644
index 3561453..0000000
--- a/node_modules/oauth-sign/package.json
+++ /dev/null
@@ -1,56 +0,0 @@
-{
- "_from": "oauth-sign@~0.9.0",
- "_id": "oauth-sign@0.9.0",
- "_inBundle": false,
- "_integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==",
- "_location": "/oauth-sign",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "oauth-sign@~0.9.0",
- "name": "oauth-sign",
- "escapedName": "oauth-sign",
- "rawSpec": "~0.9.0",
- "saveSpec": null,
- "fetchSpec": "~0.9.0"
- },
- "_requiredBy": [
- "/request"
- ],
- "_resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz",
- "_shasum": "47a7b016baa68b5fa0ecf3dee08a85c679ac6455",
- "_spec": "oauth-sign@~0.9.0",
- "_where": "D:\\Projects\\minifyfromhtml\\node_modules\\request",
- "author": {
- "name": "Mikeal Rogers",
- "email": "mikeal.rogers@gmail.com",
- "url": "http://www.futurealoof.com"
- },
- "bugs": {
- "url": "https://github.com/mikeal/oauth-sign/issues"
- },
- "bundleDependencies": false,
- "dependencies": {},
- "deprecated": false,
- "description": "OAuth 1 signing. Formerly a vendor lib in mikeal/request, now a standalone module.",
- "devDependencies": {},
- "engines": {
- "node": "*"
- },
- "files": [
- "index.js"
- ],
- "homepage": "https://github.com/mikeal/oauth-sign#readme",
- "license": "Apache-2.0",
- "main": "index.js",
- "name": "oauth-sign",
- "optionalDependencies": {},
- "repository": {
- "url": "git+https://github.com/mikeal/oauth-sign.git"
- },
- "scripts": {
- "test": "node test.js"
- },
- "version": "0.9.0"
-}
diff --git a/node_modules/performance-now/.npmignore b/node_modules/performance-now/.npmignore
deleted file mode 100644
index 496ee2c..0000000
--- a/node_modules/performance-now/.npmignore
+++ /dev/null
@@ -1 +0,0 @@
-.DS_Store
\ No newline at end of file
diff --git a/node_modules/performance-now/.tm_properties b/node_modules/performance-now/.tm_properties
deleted file mode 100644
index 4b8eb3f..0000000
--- a/node_modules/performance-now/.tm_properties
+++ /dev/null
@@ -1,7 +0,0 @@
-excludeDirectories = "{.git,node_modules}"
-excludeInFolderSearch = "{excludeDirectories,lib}"
-
-includeFiles = "{.gitignore,.npmignore,.travis.yml}"
-
-[ attr.untitled ]
-fileType = 'source.coffee'
\ No newline at end of file
diff --git a/node_modules/performance-now/.travis.yml b/node_modules/performance-now/.travis.yml
deleted file mode 100644
index 1543c19..0000000
--- a/node_modules/performance-now/.travis.yml
+++ /dev/null
@@ -1,6 +0,0 @@
-language: node_js
-node_js:
- - "node"
- - "6"
- - "4"
- - "0.12"
diff --git a/node_modules/performance-now/README.md b/node_modules/performance-now/README.md
deleted file mode 100644
index 28080f8..0000000
--- a/node_modules/performance-now/README.md
+++ /dev/null
@@ -1,30 +0,0 @@
-# performance-now [](https://travis-ci.org/braveg1rl/performance-now) [](https://david-dm.org/braveg1rl/performance-now)
-
-Implements a function similar to `performance.now` (based on `process.hrtime`).
-
-Modern browsers have a `window.performance` object with - among others - a `now` method which gives time in milliseconds, but with sub-millisecond precision. This module offers the same function based on the Node.js native `process.hrtime` function.
-
-Using `process.hrtime` means that the reported time will be monotonically increasing, and not subject to clock-drift.
-
-According to the [High Resolution Time specification](http://www.w3.org/TR/hr-time/), the number of milliseconds reported by `performance.now` should be relative to the value of `performance.timing.navigationStart`.
-
-In the current version of the module (2.0) the reported time is relative to the time the current Node process has started (inferred from `process.uptime()`).
-
-Version 1.0 reported a different time. The reported time was relative to the time the module was loaded (i.e. the time it was first `require`d). If you need this functionality, version 1.0 is still available on NPM.
-
-## Example usage
-
-```javascript
-var now = require("performance-now")
-var start = now()
-var end = now()
-console.log(start.toFixed(3)) // the number of milliseconds the current node process is running
-console.log((start-end).toFixed(3)) // ~ 0.002 on my system
-```
-
-Running the now function two times right after each other yields a time difference of a few microseconds. Given this overhead, I think it's best to assume that the precision of intervals computed with this method is not higher than 10 microseconds, if you don't know the exact overhead on your own system.
-
-## License
-
-performance-now is released under the [MIT License](http://opensource.org/licenses/MIT).
-Copyright (c) 2017 Braveg1rl
diff --git a/node_modules/performance-now/lib/performance-now.js b/node_modules/performance-now/lib/performance-now.js
deleted file mode 100644
index 37f569d..0000000
--- a/node_modules/performance-now/lib/performance-now.js
+++ /dev/null
@@ -1,36 +0,0 @@
-// Generated by CoffeeScript 1.12.2
-(function() {
- var getNanoSeconds, hrtime, loadTime, moduleLoadTime, nodeLoadTime, upTime;
-
- if ((typeof performance !== "undefined" && performance !== null) && performance.now) {
- module.exports = function() {
- return performance.now();
- };
- } else if ((typeof process !== "undefined" && process !== null) && process.hrtime) {
- module.exports = function() {
- return (getNanoSeconds() - nodeLoadTime) / 1e6;
- };
- hrtime = process.hrtime;
- getNanoSeconds = function() {
- var hr;
- hr = hrtime();
- return hr[0] * 1e9 + hr[1];
- };
- moduleLoadTime = getNanoSeconds();
- upTime = process.uptime() * 1e9;
- nodeLoadTime = moduleLoadTime - upTime;
- } else if (Date.now) {
- module.exports = function() {
- return Date.now() - loadTime;
- };
- loadTime = Date.now();
- } else {
- module.exports = function() {
- return new Date().getTime() - loadTime;
- };
- loadTime = new Date().getTime();
- }
-
-}).call(this);
-
-//# sourceMappingURL=performance-now.js.map
diff --git a/node_modules/performance-now/lib/performance-now.js.map b/node_modules/performance-now/lib/performance-now.js.map
deleted file mode 100644
index bef8362..0000000
--- a/node_modules/performance-now/lib/performance-now.js.map
+++ /dev/null
@@ -1,10 +0,0 @@
-{
- "version": 3,
- "file": "performance-now.js",
- "sourceRoot": "..",
- "sources": [
- "src/performance-now.coffee"
- ],
- "names": [],
- "mappings": ";AAAA;AAAA,MAAA;;EAAA,IAAG,4DAAA,IAAiB,WAAW,CAAC,GAAhC;IACE,MAAM,CAAC,OAAP,GAAiB,SAAA;aAAG,WAAW,CAAC,GAAZ,CAAA;IAAH,EADnB;GAAA,MAEK,IAAG,oDAAA,IAAa,OAAO,CAAC,MAAxB;IACH,MAAM,CAAC,OAAP,GAAiB,SAAA;aAAG,CAAC,cAAA,CAAA,CAAA,GAAmB,YAApB,CAAA,GAAoC;IAAvC;IACjB,MAAA,GAAS,OAAO,CAAC;IACjB,cAAA,GAAiB,SAAA;AACf,UAAA;MAAA,EAAA,GAAK,MAAA,CAAA;aACL,EAAG,CAAA,CAAA,CAAH,GAAQ,GAAR,GAAc,EAAG,CAAA,CAAA;IAFF;IAGjB,cAAA,GAAiB,cAAA,CAAA;IACjB,MAAA,GAAS,OAAO,CAAC,MAAR,CAAA,CAAA,GAAmB;IAC5B,YAAA,GAAe,cAAA,GAAiB,OAR7B;GAAA,MASA,IAAG,IAAI,CAAC,GAAR;IACH,MAAM,CAAC,OAAP,GAAiB,SAAA;aAAG,IAAI,CAAC,GAAL,CAAA,CAAA,GAAa;IAAhB;IACjB,QAAA,GAAW,IAAI,CAAC,GAAL,CAAA,EAFR;GAAA,MAAA;IAIH,MAAM,CAAC,OAAP,GAAiB,SAAA;aAAO,IAAA,IAAA,CAAA,CAAM,CAAC,OAAP,CAAA,CAAJ,GAAuB;IAA1B;IACjB,QAAA,GAAe,IAAA,IAAA,CAAA,CAAM,CAAC,OAAP,CAAA,EALZ;;AAXL"
-}
\ No newline at end of file
diff --git a/node_modules/performance-now/license.txt b/node_modules/performance-now/license.txt
deleted file mode 100644
index 0bf51b4..0000000
--- a/node_modules/performance-now/license.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-Copyright (c) 2013 Braveg1rl
-
-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.
\ No newline at end of file
diff --git a/node_modules/performance-now/package.json b/node_modules/performance-now/package.json
deleted file mode 100644
index 0f4e89e..0000000
--- a/node_modules/performance-now/package.json
+++ /dev/null
@@ -1,65 +0,0 @@
-{
- "_from": "performance-now@^2.1.0",
- "_id": "performance-now@2.1.0",
- "_inBundle": false,
- "_integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=",
- "_location": "/performance-now",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "performance-now@^2.1.0",
- "name": "performance-now",
- "escapedName": "performance-now",
- "rawSpec": "^2.1.0",
- "saveSpec": null,
- "fetchSpec": "^2.1.0"
- },
- "_requiredBy": [
- "/request"
- ],
- "_resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz",
- "_shasum": "6309f4e0e5fa913ec1c69307ae364b4b377c9e7b",
- "_spec": "performance-now@^2.1.0",
- "_where": "D:\\Projects\\minifyfromhtml\\node_modules\\request",
- "author": {
- "name": "Braveg1rl",
- "email": "braveg1rl@outlook.com"
- },
- "bugs": {
- "url": "https://github.com/braveg1rl/performance-now/issues"
- },
- "bundleDependencies": false,
- "dependencies": {},
- "deprecated": false,
- "description": "Implements performance.now (based on process.hrtime).",
- "devDependencies": {
- "bluebird": "^3.4.7",
- "call-delayed": "^1.0.0",
- "chai": "^3.5.0",
- "chai-increasing": "^1.2.0",
- "coffee-script": "~1.12.2",
- "mocha": "~3.2.0",
- "pre-commit": "^1.2.2"
- },
- "homepage": "https://github.com/braveg1rl/performance-now",
- "keywords": [],
- "license": "MIT",
- "main": "lib/performance-now.js",
- "name": "performance-now",
- "optionalDependencies": {},
- "private": false,
- "repository": {
- "type": "git",
- "url": "git://github.com/braveg1rl/performance-now.git"
- },
- "scripts": {
- "build": "mkdir -p lib && rm -rf lib/* && node_modules/.bin/coffee --compile -m --output lib/ src/",
- "prepublish": "npm test",
- "pretest": "npm run build",
- "test": "mocha",
- "watch": "coffee --watch --compile --output lib/ src/"
- },
- "typings": "src/index.d.ts",
- "version": "2.1.0"
-}
diff --git a/node_modules/performance-now/src/index.d.ts b/node_modules/performance-now/src/index.d.ts
deleted file mode 100644
index 68dca8e..0000000
--- a/node_modules/performance-now/src/index.d.ts
+++ /dev/null
@@ -1,8 +0,0 @@
-// This file describes the package to typescript.
-
-/**
- * Returns the number of milliseconds since the page was loaded (if browser)
- * or the node process was started.
- */
-declare function now(): number;
-export = now;
diff --git a/node_modules/performance-now/src/performance-now.coffee b/node_modules/performance-now/src/performance-now.coffee
deleted file mode 100644
index a8e075a..0000000
--- a/node_modules/performance-now/src/performance-now.coffee
+++ /dev/null
@@ -1,17 +0,0 @@
-if performance? and performance.now
- module.exports = -> performance.now()
-else if process? and process.hrtime
- module.exports = -> (getNanoSeconds() - nodeLoadTime) / 1e6
- hrtime = process.hrtime
- getNanoSeconds = ->
- hr = hrtime()
- hr[0] * 1e9 + hr[1]
- moduleLoadTime = getNanoSeconds()
- upTime = process.uptime() * 1e9
- nodeLoadTime = moduleLoadTime - upTime
-else if Date.now
- module.exports = -> Date.now() - loadTime
- loadTime = Date.now()
-else
- module.exports = -> new Date().getTime() - loadTime
- loadTime = new Date().getTime()
diff --git a/node_modules/performance-now/test/mocha.opts b/node_modules/performance-now/test/mocha.opts
deleted file mode 100644
index 55d8492..0000000
--- a/node_modules/performance-now/test/mocha.opts
+++ /dev/null
@@ -1,3 +0,0 @@
---require coffee-script/register
---compilers coffee:coffee-script/register
---reporter spec
\ No newline at end of file
diff --git a/node_modules/performance-now/test/performance-now.coffee b/node_modules/performance-now/test/performance-now.coffee
deleted file mode 100644
index c99e95c..0000000
--- a/node_modules/performance-now/test/performance-now.coffee
+++ /dev/null
@@ -1,43 +0,0 @@
-chai = require "chai"
-chai.use(require "chai-increasing")
-{assert,expect} = chai
-Bluebird = require "bluebird"
-
-now = require "../"
-
-getUptime = -> process.uptime() * 1e3
-
-describe "now", ->
- it "reported time differs at most 1ms from a freshly reported uptime", ->
- assert.isAtMost Math.abs(now()-getUptime()), 1
-
- it "two subsequent calls return an increasing number", ->
- assert.isBelow now(), now()
-
- it "has less than 10 microseconds overhead", ->
- assert.isBelow Math.abs(now() - now()), 0.010
-
- it "can be called 1 million times in under 1 second (averaging under 1 microsecond per call)", ->
- @timeout 1000
- now() for [0...1e6]
- undefined
-
- it "for 10,000 numbers, number n is never bigger than number n-1", ->
- stamps = (now() for [1...10000])
- expect(stamps).to.be.increasing
-
- it "shows that at least 0.2 ms has passed after a timeout of 1 ms", ->
- earlier = now()
- Bluebird.resolve().delay(1).then -> assert.isAbove (now()-earlier), 0.2
-
- it "shows that at most 3 ms has passed after a timeout of 1 ms", ->
- earlier = now()
- Bluebird.resolve().delay(1).then -> assert.isBelow (now()-earlier), 3
-
- it "shows that at least 190ms ms has passed after a timeout of 200ms", ->
- earlier = now()
- Bluebird.resolve().delay(200).then -> assert.isAbove (now()-earlier), 190
-
- it "shows that at most 220 ms has passed after a timeout of 200ms", ->
- earlier = now()
- Bluebird.resolve().delay(200).then -> assert.isBelow (now()-earlier), 220
diff --git a/node_modules/performance-now/test/scripts.coffee b/node_modules/performance-now/test/scripts.coffee
deleted file mode 100644
index 16312f1..0000000
--- a/node_modules/performance-now/test/scripts.coffee
+++ /dev/null
@@ -1,27 +0,0 @@
-Bluebird = require "bluebird"
-exec = require("child_process").execSync
-{assert} = require "chai"
-
-describe "scripts/initital-value.coffee (module.uptime(), expressed in milliseconds)", ->
- result = exec("./test/scripts/initial-value.coffee").toString().trim()
- it "printed #{result}", ->
- it "printed a value above 100", -> assert.isAbove result, 100
- it "printed a value below 350", -> assert.isBelow result, 350
-
-describe "scripts/delayed-require.coffee (sum of uptime and 250 ms delay`)", ->
- result = exec("./test/scripts/delayed-require.coffee").toString().trim()
- it "printed #{result}", ->
- it "printed a value above 350", -> assert.isAbove result, 350
- it "printed a value below 600", -> assert.isBelow result, 600
-
-describe "scripts/delayed-call.coffee (sum of uptime and 250 ms delay`)", ->
- result = exec("./test/scripts/delayed-call.coffee").toString().trim()
- it "printed #{result}", ->
- it "printed a value above 350", -> assert.isAbove result, 350
- it "printed a value below 600", -> assert.isBelow result, 600
-
-describe "scripts/difference.coffee", ->
- result = exec("./test/scripts/difference.coffee").toString().trim()
- it "printed #{result}", ->
- it "printed a value above 0.005", -> assert.isAbove result, 0.005
- it "printed a value below 0.07", -> assert.isBelow result, 0.07
diff --git a/node_modules/performance-now/test/scripts/delayed-call.coffee b/node_modules/performance-now/test/scripts/delayed-call.coffee
deleted file mode 100755
index 0c3bab5..0000000
--- a/node_modules/performance-now/test/scripts/delayed-call.coffee
+++ /dev/null
@@ -1,11 +0,0 @@
-#!/usr/bin/env ./node_modules/.bin/coffee
-
-###
-Expected output is a number above 350 and below 600.
-The time reported is relative to the time the node.js process was started
-this is approximately at `(Date.now() process.uptime() * 1000)`
-###
-
-delay = require "call-delayed"
-now = require "../../lib/performance-now"
-delay 250, -> console.log now().toFixed 3
diff --git a/node_modules/performance-now/test/scripts/delayed-require.coffee b/node_modules/performance-now/test/scripts/delayed-require.coffee
deleted file mode 100755
index 3ddee95..0000000
--- a/node_modules/performance-now/test/scripts/delayed-require.coffee
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/usr/bin/env ./node_modules/.bin/coffee
-
-###
-Expected output is a number above 350 and below 600.
-The time reported is relative to the time the node.js process was started
-this is approximately at `(Date.now() process.uptime() * 1000)`
-###
-
-delay = require "call-delayed"
-delay 250, ->
- now = require "../../lib/performance-now"
- console.log now().toFixed 3
diff --git a/node_modules/performance-now/test/scripts/difference.coffee b/node_modules/performance-now/test/scripts/difference.coffee
deleted file mode 100755
index 0b5edf6..0000000
--- a/node_modules/performance-now/test/scripts/difference.coffee
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/usr/bin/env ./node_modules/.bin/coffee
-
-# Expected output is above 0.005 and below 0.07.
-
-now = require('../../lib/performance-now')
-console.log -(now() - now()).toFixed 3
diff --git a/node_modules/performance-now/test/scripts/initial-value.coffee b/node_modules/performance-now/test/scripts/initial-value.coffee
deleted file mode 100755
index 19ef4e0..0000000
--- a/node_modules/performance-now/test/scripts/initial-value.coffee
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/usr/bin/env ./node_modules/.bin/coffee
-
-###
-Expected output is a number above 100 and below 350.
-The time reported is relative to the time the node.js process was started
-this is approximately at `(Date.now() process.uptime() * 1000)`
-###
-
-now = require '../../lib/performance-now'
-console.log now().toFixed 3
diff --git a/node_modules/qs/.editorconfig b/node_modules/qs/.editorconfig
deleted file mode 100644
index b2654e7..0000000
--- a/node_modules/qs/.editorconfig
+++ /dev/null
@@ -1,30 +0,0 @@
-root = true
-
-[*]
-indent_style = space
-indent_size = 4
-end_of_line = lf
-charset = utf-8
-trim_trailing_whitespace = true
-insert_final_newline = true
-max_line_length = 140
-
-[test/*]
-max_line_length = off
-
-[*.md]
-max_line_length = off
-
-[*.json]
-max_line_length = off
-
-[Makefile]
-max_line_length = off
-
-[CHANGELOG.md]
-indent_style = space
-indent_size = 2
-
-[LICENSE]
-indent_size = 2
-max_line_length = off
diff --git a/node_modules/qs/.eslintignore b/node_modules/qs/.eslintignore
deleted file mode 100644
index 1521c8b..0000000
--- a/node_modules/qs/.eslintignore
+++ /dev/null
@@ -1 +0,0 @@
-dist
diff --git a/node_modules/qs/.eslintrc b/node_modules/qs/.eslintrc
deleted file mode 100644
index b7a87b9..0000000
--- a/node_modules/qs/.eslintrc
+++ /dev/null
@@ -1,19 +0,0 @@
-{
- "root": true,
-
- "extends": "@ljharb",
-
- "rules": {
- "complexity": 0,
- "consistent-return": 1,
- "func-name-matching": 0,
- "id-length": [2, { "min": 1, "max": 25, "properties": "never" }],
- "indent": [2, 4],
- "max-params": [2, 12],
- "max-statements": [2, 45],
- "no-continue": 1,
- "no-magic-numbers": 0,
- "no-restricted-syntax": [2, "BreakStatement", "DebuggerStatement", "ForInStatement", "LabeledStatement", "WithStatement"],
- "operator-linebreak": [2, "before"],
- }
-}
diff --git a/node_modules/qs/CHANGELOG.md b/node_modules/qs/CHANGELOG.md
deleted file mode 100644
index fe52320..0000000
--- a/node_modules/qs/CHANGELOG.md
+++ /dev/null
@@ -1,226 +0,0 @@
-## **6.5.2**
-- [Fix] use `safer-buffer` instead of `Buffer` constructor
-- [Refactor] utils: `module.exports` one thing, instead of mutating `exports` (#230)
-- [Dev Deps] update `browserify`, `eslint`, `iconv-lite`, `safer-buffer`, `tape`, `browserify`
-
-## **6.5.1**
-- [Fix] Fix parsing & compacting very deep objects (#224)
-- [Refactor] name utils functions
-- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape`
-- [Tests] up to `node` `v8.4`; use `nvm install-latest-npm` so newer npm doesn’t break older node
-- [Tests] Use precise dist for Node.js 0.6 runtime (#225)
-- [Tests] make 0.6 required, now that it’s passing
-- [Tests] on `node` `v8.2`; fix npm on node 0.6
-
-## **6.5.0**
-- [New] add `utils.assign`
-- [New] pass default encoder/decoder to custom encoder/decoder functions (#206)
-- [New] `parse`/`stringify`: add `ignoreQueryPrefix`/`addQueryPrefix` options, respectively (#213)
-- [Fix] Handle stringifying empty objects with addQueryPrefix (#217)
-- [Fix] do not mutate `options` argument (#207)
-- [Refactor] `parse`: cache index to reuse in else statement (#182)
-- [Docs] add various badges to readme (#208)
-- [Dev Deps] update `eslint`, `browserify`, `iconv-lite`, `tape`
-- [Tests] up to `node` `v8.1`, `v7.10`, `v6.11`; npm v4.6 breaks on node < v1; npm v5+ breaks on node < v4
-- [Tests] add `editorconfig-tools`
-
-## **6.4.0**
-- [New] `qs.stringify`: add `encodeValuesOnly` option
-- [Fix] follow `allowPrototypes` option during merge (#201, #201)
-- [Fix] support keys starting with brackets (#202, #200)
-- [Fix] chmod a-x
-- [Dev Deps] update `eslint`
-- [Tests] up to `node` `v7.7`, `v6.10`,` v4.8`; disable osx builds since they block linux builds
-- [eslint] reduce warnings
-
-## **6.3.2**
-- [Fix] follow `allowPrototypes` option during merge (#201, #200)
-- [Dev Deps] update `eslint`
-- [Fix] chmod a-x
-- [Fix] support keys starting with brackets (#202, #200)
-- [Tests] up to `node` `v7.7`, `v6.10`,` v4.8`; disable osx builds since they block linux builds
-
-## **6.3.1**
-- [Fix] ensure that `allowPrototypes: false` does not ever shadow Object.prototype properties (thanks, @snyk!)
-- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `browserify`, `iconv-lite`, `qs-iconv`, `tape`
-- [Tests] on all node minors; improve test matrix
-- [Docs] document stringify option `allowDots` (#195)
-- [Docs] add empty object and array values example (#195)
-- [Docs] Fix minor inconsistency/typo (#192)
-- [Docs] document stringify option `sort` (#191)
-- [Refactor] `stringify`: throw faster with an invalid encoder
-- [Refactor] remove unnecessary escapes (#184)
-- Remove contributing.md, since `qs` is no longer part of `hapi` (#183)
-
-## **6.3.0**
-- [New] Add support for RFC 1738 (#174, #173)
-- [New] `stringify`: Add `serializeDate` option to customize Date serialization (#159)
-- [Fix] ensure `utils.merge` handles merging two arrays
-- [Refactor] only constructors should be capitalized
-- [Refactor] capitalized var names are for constructors only
-- [Refactor] avoid using a sparse array
-- [Robustness] `formats`: cache `String#replace`
-- [Dev Deps] update `browserify`, `eslint`, `@ljharb/eslint-config`; add `safe-publish-latest`
-- [Tests] up to `node` `v6.8`, `v4.6`; improve test matrix
-- [Tests] flesh out arrayLimit/arrayFormat tests (#107)
-- [Tests] skip Object.create tests when null objects are not available
-- [Tests] Turn on eslint for test files (#175)
-
-## **6.2.3**
-- [Fix] follow `allowPrototypes` option during merge (#201, #200)
-- [Fix] chmod a-x
-- [Fix] support keys starting with brackets (#202, #200)
-- [Tests] up to `node` `v7.7`, `v6.10`,` v4.8`; disable osx builds since they block linux builds
-
-## **6.2.2**
-- [Fix] ensure that `allowPrototypes: false` does not ever shadow Object.prototype properties
-
-## **6.2.1**
-- [Fix] ensure `key[]=x&key[]&key[]=y` results in 3, not 2, values
-- [Refactor] Be explicit and use `Object.prototype.hasOwnProperty.call`
-- [Tests] remove `parallelshell` since it does not reliably report failures
-- [Tests] up to `node` `v6.3`, `v5.12`
-- [Dev Deps] update `tape`, `eslint`, `@ljharb/eslint-config`, `qs-iconv`
-
-## [**6.2.0**](https://github.com/ljharb/qs/issues?milestone=36&state=closed)
-- [New] pass Buffers to the encoder/decoder directly (#161)
-- [New] add "encoder" and "decoder" options, for custom param encoding/decoding (#160)
-- [Fix] fix compacting of nested sparse arrays (#150)
-
-## **6.1.2
-- [Fix] follow `allowPrototypes` option during merge (#201, #200)
-- [Fix] chmod a-x
-- [Fix] support keys starting with brackets (#202, #200)
-- [Tests] up to `node` `v7.7`, `v6.10`,` v4.8`; disable osx builds since they block linux builds
-
-## **6.1.1**
-- [Fix] ensure that `allowPrototypes: false` does not ever shadow Object.prototype properties
-
-## [**6.1.0**](https://github.com/ljharb/qs/issues?milestone=35&state=closed)
-- [New] allowDots option for `stringify` (#151)
-- [Fix] "sort" option should work at a depth of 3 or more (#151)
-- [Fix] Restore `dist` directory; will be removed in v7 (#148)
-
-## **6.0.4**
-- [Fix] follow `allowPrototypes` option during merge (#201, #200)
-- [Fix] chmod a-x
-- [Fix] support keys starting with brackets (#202, #200)
-- [Tests] up to `node` `v7.7`, `v6.10`,` v4.8`; disable osx builds since they block linux builds
-
-## **6.0.3**
-- [Fix] ensure that `allowPrototypes: false` does not ever shadow Object.prototype properties
-- [Fix] Restore `dist` directory; will be removed in v7 (#148)
-
-## [**6.0.2**](https://github.com/ljharb/qs/issues?milestone=33&state=closed)
-- Revert ES6 requirement and restore support for node down to v0.8.
-
-## [**6.0.1**](https://github.com/ljharb/qs/issues?milestone=32&state=closed)
-- [**#127**](https://github.com/ljharb/qs/pull/127) Fix engines definition in package.json
-
-## [**6.0.0**](https://github.com/ljharb/qs/issues?milestone=31&state=closed)
-- [**#124**](https://github.com/ljharb/qs/issues/124) Use ES6 and drop support for node < v4
-
-## **5.2.1**
-- [Fix] ensure `key[]=x&key[]&key[]=y` results in 3, not 2, values
-
-## [**5.2.0**](https://github.com/ljharb/qs/issues?milestone=30&state=closed)
-- [**#64**](https://github.com/ljharb/qs/issues/64) Add option to sort object keys in the query string
-
-## [**5.1.0**](https://github.com/ljharb/qs/issues?milestone=29&state=closed)
-- [**#117**](https://github.com/ljharb/qs/issues/117) make URI encoding stringified results optional
-- [**#106**](https://github.com/ljharb/qs/issues/106) Add flag `skipNulls` to optionally skip null values in stringify
-
-## [**5.0.0**](https://github.com/ljharb/qs/issues?milestone=28&state=closed)
-- [**#114**](https://github.com/ljharb/qs/issues/114) default allowDots to false
-- [**#100**](https://github.com/ljharb/qs/issues/100) include dist to npm
-
-## [**4.0.0**](https://github.com/ljharb/qs/issues?milestone=26&state=closed)
-- [**#98**](https://github.com/ljharb/qs/issues/98) make returning plain objects and allowing prototype overwriting properties optional
-
-## [**3.1.0**](https://github.com/ljharb/qs/issues?milestone=24&state=closed)
-- [**#89**](https://github.com/ljharb/qs/issues/89) Add option to disable "Transform dot notation to bracket notation"
-
-## [**3.0.0**](https://github.com/ljharb/qs/issues?milestone=23&state=closed)
-- [**#80**](https://github.com/ljharb/qs/issues/80) qs.parse silently drops properties
-- [**#77**](https://github.com/ljharb/qs/issues/77) Perf boost
-- [**#60**](https://github.com/ljharb/qs/issues/60) Add explicit option to disable array parsing
-- [**#74**](https://github.com/ljharb/qs/issues/74) Bad parse when turning array into object
-- [**#81**](https://github.com/ljharb/qs/issues/81) Add a `filter` option
-- [**#68**](https://github.com/ljharb/qs/issues/68) Fixed issue with recursion and passing strings into objects.
-- [**#66**](https://github.com/ljharb/qs/issues/66) Add mixed array and object dot notation support Closes: #47
-- [**#76**](https://github.com/ljharb/qs/issues/76) RFC 3986
-- [**#85**](https://github.com/ljharb/qs/issues/85) No equal sign
-- [**#84**](https://github.com/ljharb/qs/issues/84) update license attribute
-
-## [**2.4.1**](https://github.com/ljharb/qs/issues?milestone=20&state=closed)
-- [**#73**](https://github.com/ljharb/qs/issues/73) Property 'hasOwnProperty' of object #