source-map-support
Advanced tools
Comparing version 0.5.9 to 0.5.10
@@ -20,11 +20,11 @@ /* | ||
g,y){var a="";for(y=Math.min(e.length,y);g<y;g++)a+=String.fromCharCode(e[g]);return a}function k(e,g,y,a){a||(q("boolean"===typeof y,"missing or invalid endian"),q(void 0!==g&&null!==g,"missing offset"),q(g+1<e.length,"Trying to read beyond buffer length"));a=e.length;if(!(g>=a))return y?(y=e[g],g+1<a&&(y|=e[g+1]<<8)):(y=e[g]<<8,g+1<a&&(y|=e[g+1])),y}function h(e,g,y,a){a||(q("boolean"===typeof y,"missing or invalid endian"),q(void 0!==g&&null!==g,"missing offset"),q(g+3<e.length,"Trying to read beyond buffer length")); | ||
a=e.length;if(!(g>=a)){var c;y?(g+2<a&&(c=e[g+2]<<16),g+1<a&&(c|=e[g+1]<<8),c|=e[g],g+3<a&&(c+=e[g+3]<<24>>>0)):(g+1<a&&(c=e[g+1]<<16),g+2<a&&(c|=e[g+2]<<8),g+3<a&&(c|=e[g+3]),c+=e[g]<<24>>>0);return c}}function d(e,g,a,c){c||(q("boolean"===typeof a,"missing or invalid endian"),q(void 0!==g&&null!==g,"missing offset"),q(g+1<e.length,"Trying to read beyond buffer length"));if(!(g>=e.length))return e=k(e,g,a,!0),e&32768?-1*(65535-e+1):e}function a(e,g,a,c){c||(q("boolean"===typeof a,"missing or invalid endian"), | ||
q(void 0!==g&&null!==g,"missing offset"),q(g+3<e.length,"Trying to read beyond buffer length"));if(!(g>=e.length))return e=h(e,g,a,!0),e&2147483648?-1*(4294967295-e+1):e}function l(e,g,a,c){c||(q("boolean"===typeof a,"missing or invalid endian"),q(g+3<e.length,"Trying to read beyond buffer length"));return G.read(e,g,a,23,4)}function u(e,g,a,c){c||(q("boolean"===typeof a,"missing or invalid endian"),q(g+7<e.length,"Trying to read beyond buffer length"));return G.read(e,g,a,52,8)}function r(e,g,a, | ||
c,b){b||(q(void 0!==g&&null!==g,"missing value"),q("boolean"===typeof c,"missing or invalid endian"),q(void 0!==a&&null!==a,"missing offset"),q(a+1<e.length,"trying to write beyond buffer length"),H(g,65535));var y=e.length;if(!(a>=y))for(b=0,y=Math.min(y-a,2);b<y;b++)e[a+b]=(g&255<<8*(c?b:1-b))>>>8*(c?b:1-b)}function t(e,g,a,c,b){b||(q(void 0!==g&&null!==g,"missing value"),q("boolean"===typeof c,"missing or invalid endian"),q(void 0!==a&&null!==a,"missing offset"),q(a+3<e.length,"trying to write beyond buffer length"), | ||
H(g,4294967295));var y=e.length;if(!(a>=y))for(b=0,y=Math.min(y-a,4);b<y;b++)e[a+b]=g>>>8*(c?b:3-b)&255}function z(e,g,a,c,b){b||(q(void 0!==g&&null!==g,"missing value"),q("boolean"===typeof c,"missing or invalid endian"),q(void 0!==a&&null!==a,"missing offset"),q(a+1<e.length,"Trying to write beyond buffer length"),A(g,32767,-32768));a>=e.length||(0<=g?r(e,g,a,c,b):r(e,65535+g+1,a,c,b))}function c(e,g,a,c,b){b||(q(void 0!==g&&null!==g,"missing value"),q("boolean"===typeof c,"missing or invalid endian"), | ||
q(void 0!==a&&null!==a,"missing offset"),q(a+3<e.length,"Trying to write beyond buffer length"),A(g,2147483647,-2147483648));a>=e.length||(0<=g?t(e,g,a,c,b):t(e,4294967295+g+1,a,c,b))}function n(e,g,a,c,b){b||(q(void 0!==g&&null!==g,"missing value"),q("boolean"===typeof c,"missing or invalid endian"),q(void 0!==a&&null!==a,"missing offset"),q(a+3<e.length,"Trying to write beyond buffer length"),D(g,3.4028234663852886E38,-3.4028234663852886E38));a>=e.length||G.write(e,g,a,c,23,4)}function x(e,g,a, | ||
c,b){b||(q(void 0!==g&&null!==g,"missing value"),q("boolean"===typeof c,"missing or invalid endian"),q(void 0!==a&&null!==a,"missing offset"),q(a+7<e.length,"Trying to write beyond buffer length"),D(g,1.7976931348623157E308,-1.7976931348623157E308));a>=e.length||G.write(e,g,a,c,52,8)}function B(e,g,a){if("number"!==typeof e)return a;e=~~e;if(e>=g)return g;if(0<=e)return e;e+=g;return 0<=e?e:0}function I(e){e=~~Math.ceil(+e);return 0>e?0:e}function M(e){return(Array.isArray||function(e){return"[object Array]"=== | ||
Object.prototype.toString.call(e)})(e)}function K(e){return 16>e?"0"+e.toString(16):e.toString(16)}function L(e){for(var g=[],a=0;a<e.length;a++){var c=e.charCodeAt(a);if(127>=c)g.push(e.charCodeAt(a));else{var b=a;55296<=c&&57343>=c&&a++;c=encodeURIComponent(e.slice(b,a+1)).substr(1).split("%");for(b=0;b<c.length;b++)g.push(parseInt(c[b],16))}}return g}function J(e){for(var g=[],a=0;a<e.length;a++)g.push(e.charCodeAt(a)&255);return g}function C(e,a,c,b){for(var g=0;g<b&&!(g+c>=a.length||g>=e.length);g++)a[g+ | ||
c]=e[g];return g}function F(e){try{return decodeURIComponent(e)}catch(g){return String.fromCharCode(65533)}}function H(e,a){q("number"===typeof e,"cannot write a non-number as a number");q(0<=e,"specified a negative value for writing an unsigned value");q(e<=a,"value is larger than maximum value for type");q(Math.floor(e)===e,"value has a fractional component")}function A(e,a,c){q("number"===typeof e,"cannot write a non-number as a number");q(e<=a,"value larger than maximum allowed value");q(e>=c, | ||
"value smaller than minimum allowed value");q(Math.floor(e)===e,"value has a fractional component")}function D(e,a,c){q("number"===typeof e,"cannot write a non-number as a number");q(e<=a,"value larger than maximum allowed value");q(e>=c,"value smaller than minimum allowed value")}function q(e,a){if(!e)throw Error(a||"Failed assertion");}var E=p("base64-js"),G=p("ieee754");m.Buffer=b;m.SlowBuffer=b;m.INSPECT_MAX_BYTES=50;b.poolSize=8192;b._useTypedArrays=function(){try{var e=new ArrayBuffer(0),a= | ||
a=e.length;if(!(g>=a)){var b;y?(g+2<a&&(b=e[g+2]<<16),g+1<a&&(b|=e[g+1]<<8),b|=e[g],g+3<a&&(b+=e[g+3]<<24>>>0)):(g+1<a&&(b=e[g+1]<<16),g+2<a&&(b|=e[g+2]<<8),g+3<a&&(b|=e[g+3]),b+=e[g]<<24>>>0);return b}}function d(e,g,a,b){b||(q("boolean"===typeof a,"missing or invalid endian"),q(void 0!==g&&null!==g,"missing offset"),q(g+1<e.length,"Trying to read beyond buffer length"));if(!(g>=e.length))return e=k(e,g,a,!0),e&32768?-1*(65535-e+1):e}function a(e,g,a,b){b||(q("boolean"===typeof a,"missing or invalid endian"), | ||
q(void 0!==g&&null!==g,"missing offset"),q(g+3<e.length,"Trying to read beyond buffer length"));if(!(g>=e.length))return e=h(e,g,a,!0),e&2147483648?-1*(4294967295-e+1):e}function l(e,g,a,b){b||(q("boolean"===typeof a,"missing or invalid endian"),q(g+3<e.length,"Trying to read beyond buffer length"));return G.read(e,g,a,23,4)}function u(e,g,a,b){b||(q("boolean"===typeof a,"missing or invalid endian"),q(g+7<e.length,"Trying to read beyond buffer length"));return G.read(e,g,a,52,8)}function r(e,g,a, | ||
b,c){c||(q(void 0!==g&&null!==g,"missing value"),q("boolean"===typeof b,"missing or invalid endian"),q(void 0!==a&&null!==a,"missing offset"),q(a+1<e.length,"trying to write beyond buffer length"),H(g,65535));var y=e.length;if(!(a>=y))for(c=0,y=Math.min(y-a,2);c<y;c++)e[a+c]=(g&255<<8*(b?c:1-c))>>>8*(b?c:1-c)}function t(e,g,a,b,c){c||(q(void 0!==g&&null!==g,"missing value"),q("boolean"===typeof b,"missing or invalid endian"),q(void 0!==a&&null!==a,"missing offset"),q(a+3<e.length,"trying to write beyond buffer length"), | ||
H(g,4294967295));var y=e.length;if(!(a>=y))for(c=0,y=Math.min(y-a,4);c<y;c++)e[a+c]=g>>>8*(b?c:3-c)&255}function z(e,g,a,b,c){c||(q(void 0!==g&&null!==g,"missing value"),q("boolean"===typeof b,"missing or invalid endian"),q(void 0!==a&&null!==a,"missing offset"),q(a+1<e.length,"Trying to write beyond buffer length"),A(g,32767,-32768));a>=e.length||(0<=g?r(e,g,a,b,c):r(e,65535+g+1,a,b,c))}function c(e,g,a,b,c){c||(q(void 0!==g&&null!==g,"missing value"),q("boolean"===typeof b,"missing or invalid endian"), | ||
q(void 0!==a&&null!==a,"missing offset"),q(a+3<e.length,"Trying to write beyond buffer length"),A(g,2147483647,-2147483648));a>=e.length||(0<=g?t(e,g,a,b,c):t(e,4294967295+g+1,a,b,c))}function n(e,g,a,b,c){c||(q(void 0!==g&&null!==g,"missing value"),q("boolean"===typeof b,"missing or invalid endian"),q(void 0!==a&&null!==a,"missing offset"),q(a+3<e.length,"Trying to write beyond buffer length"),D(g,3.4028234663852886E38,-3.4028234663852886E38));a>=e.length||G.write(e,g,a,b,23,4)}function x(e,g,a, | ||
b,c){c||(q(void 0!==g&&null!==g,"missing value"),q("boolean"===typeof b,"missing or invalid endian"),q(void 0!==a&&null!==a,"missing offset"),q(a+7<e.length,"Trying to write beyond buffer length"),D(g,1.7976931348623157E308,-1.7976931348623157E308));a>=e.length||G.write(e,g,a,b,52,8)}function B(e,g,a){if("number"!==typeof e)return a;e=~~e;if(e>=g)return g;if(0<=e)return e;e+=g;return 0<=e?e:0}function I(e){e=~~Math.ceil(+e);return 0>e?0:e}function M(e){return(Array.isArray||function(e){return"[object Array]"=== | ||
Object.prototype.toString.call(e)})(e)}function K(e){return 16>e?"0"+e.toString(16):e.toString(16)}function L(e){for(var g=[],a=0;a<e.length;a++){var b=e.charCodeAt(a);if(127>=b)g.push(e.charCodeAt(a));else{var c=a;55296<=b&&57343>=b&&a++;b=encodeURIComponent(e.slice(c,a+1)).substr(1).split("%");for(c=0;c<b.length;c++)g.push(parseInt(b[c],16))}}return g}function J(e){for(var g=[],a=0;a<e.length;a++)g.push(e.charCodeAt(a)&255);return g}function C(e,a,b,c){for(var g=0;g<c&&!(g+b>=a.length||g>=e.length);g++)a[g+ | ||
b]=e[g];return g}function F(e){try{return decodeURIComponent(e)}catch(g){return String.fromCharCode(65533)}}function H(e,g){q("number"===typeof e,"cannot write a non-number as a number");q(0<=e,"specified a negative value for writing an unsigned value");q(e<=g,"value is larger than maximum value for type");q(Math.floor(e)===e,"value has a fractional component")}function A(e,g,a){q("number"===typeof e,"cannot write a non-number as a number");q(e<=g,"value larger than maximum allowed value");q(e>=a, | ||
"value smaller than minimum allowed value");q(Math.floor(e)===e,"value has a fractional component")}function D(e,a,b){q("number"===typeof e,"cannot write a non-number as a number");q(e<=a,"value larger than maximum allowed value");q(e>=b,"value smaller than minimum allowed value")}function q(e,a){if(!e)throw Error(a||"Failed assertion");}var E=p("base64-js"),G=p("ieee754");m.Buffer=b;m.SlowBuffer=b;m.INSPECT_MAX_BYTES=50;b.poolSize=8192;b._useTypedArrays=function(){try{var e=new ArrayBuffer(0),a= | ||
new Uint8Array(e);a.foo=function(){return 42};return 42===a.foo()&&"function"===typeof a.subarray}catch(y){return!1}}();b.isEncoding=function(e){switch(String(e).toLowerCase()){case "hex":case "utf8":case "utf-8":case "ascii":case "binary":case "base64":case "raw":case "ucs2":case "ucs-2":case "utf16le":case "utf-16le":return!0;default:return!1}};b.isBuffer=function(e){return!(null===e||void 0===e||!e._isBuffer)};b.byteLength=function(e,a){e+="";switch(a||"utf8"){case "hex":var g=e.length/2;break; | ||
@@ -51,7 +51,7 @@ case "utf8":case "utf-8":g=L(e).length;break;case "ascii":case "binary":case "raw":g=e.length;break;case "base64":g=E.toByteArray(e).length;break;case "ucs2":case "ucs-2":case "utf16le":case "utf-16le":g=2*e.length;break;default:throw Error("Unknown encoding");}return g};b.concat=function(e,a){q(M(e),"Usage: Buffer.concat(list, [totalLength])\nlist should be an Array.");if(0===e.length)return new b(0);if(1===e.length)return e[0];var g;if("number"!==typeof a)for(g=a=0;g<e.length;g++)a+=e[g].length; | ||
return a}).join("/"))};m.relative=function(a,b){function d(a){for(var c=0;c<a.length&&""===a[c];c++);for(var b=a.length-1;0<=b&&""===a[b];b--);return c>b?[]:a.slice(c,b-c+1)}a=m.resolve(a).substr(1);b=m.resolve(b).substr(1);for(var l=d(a.split("/")),t=d(b.split("/")),f=Math.min(l.length,t.length),c=f,n=0;n<f;n++)if(l[n]!==t[n]){c=n;break}f=[];for(n=c;n<l.length;n++)f.push("..");f=f.concat(t.slice(c));return f.join("/")};m.sep="/";m.delimiter=":";m.dirname=function(a){var b=h.exec(a).slice(1);a=b[0]; | ||
b=b[1];if(!a&&!b)return".";b&&(b=b.substr(0,b.length-1));return a+b};m.basename=function(a,b){var d=h.exec(a).slice(1)[2];b&&d.substr(-1*b.length)===b&&(d=d.substr(0,d.length-b.length));return d};m.extname=function(a){return h.exec(a).slice(1)[3]};var d="b"==="ab".substr(-1)?function(a,b,d){return a.substr(b,d)}:function(a,b,d){0>b&&(b=a.length+b);return a.substr(b,d)}}).call(this,p("node_modules/process/browser.js"))},{"node_modules/process/browser.js":8}],8:[function(p,v,m){function b(){}p=v.exports= | ||
{};p.nextTick=function(){if("undefined"!==typeof window&&window.setImmediate)return function(b){return window.setImmediate(b)};if("undefined"!==typeof window&&window.postMessage&&window.addEventListener){var b=[];window.addEventListener("message",function(f){var k=f.source;k!==window&&null!==k||"process-tick"!==f.data||(f.stopPropagation(),0<b.length&&b.shift()())},!0);return function(f){b.push(f);window.postMessage("process-tick","*")}}return function(b){setTimeout(b,0)}}();p.title="browser";p.browser= | ||
!0;p.env={};p.argv=[];p.on=b;p.once=b;p.off=b;p.emit=b;p.binding=function(b){throw Error("process.binding is not supported");};p.cwd=function(){return"/"};p.chdir=function(b){throw Error("process.chdir is not supported");}},{}],9:[function(p,v,m){function b(){this._array=[];this._set=h?new Map:Object.create(null)}var f=p("./util"),k=Object.prototype.hasOwnProperty,h="undefined"!==typeof Map;b.fromArray=function(d,a){for(var f=new b,k=0,r=d.length;k<r;k++)f.add(d[k],a);return f};b.prototype.size=function(){return h? | ||
this._set.size:Object.getOwnPropertyNames(this._set).length};b.prototype.add=function(b,a){var d=h?b:f.toSetString(b),u=h?this.has(b):k.call(this._set,d),r=this._array.length;u&&!a||this._array.push(b);u||(h?this._set.set(b,r):this._set[d]=r)};b.prototype.has=function(b){if(h)return this._set.has(b);b=f.toSetString(b);return k.call(this._set,b)};b.prototype.indexOf=function(b){if(h){var a=this._set.get(b);if(0<=a)return a}else if(a=f.toSetString(b),k.call(this._set,a))return this._set[a];throw Error('"'+ | ||
b+'" is not in the set.');};b.prototype.at=function(b){if(0<=b&&b<this._array.length)return this._array[b];throw Error("No element indexed by "+b);};b.prototype.toArray=function(){return this._array.slice()};m.ArraySet=b},{"./util":18}],10:[function(p,v,m){var b=p("./base64");m.encode=function(f){var k="",h=0>f?(-f<<1)+1:f<<1;do f=h&31,h>>>=5,0<h&&(f|=32),k+=b.encode(f);while(0<h);return k};m.decode=function(f,k,h){var d=f.length,a=0,l=0;do{if(k>=d)throw Error("Expected more digits in base 64 VLQ value."); | ||
b=b[1];if(!a&&!b)return".";b&&(b=b.substr(0,b.length-1));return a+b};m.basename=function(a,b){var d=h.exec(a).slice(1)[2];b&&d.substr(-1*b.length)===b&&(d=d.substr(0,d.length-b.length));return d};m.extname=function(a){return h.exec(a).slice(1)[3]};var d="b"==="ab".substr(-1)?function(a,b,d){return a.substr(b,d)}:function(a,b,d){0>b&&(b=a.length+b);return a.substr(b,d)}}).call(this,p("g5I+bs"))},{"g5I+bs":8}],8:[function(p,v,m){function b(){}p=v.exports={};p.nextTick=function(){if("undefined"!==typeof window&& | ||
window.setImmediate)return function(b){return window.setImmediate(b)};if("undefined"!==typeof window&&window.postMessage&&window.addEventListener){var b=[];window.addEventListener("message",function(f){var k=f.source;k!==window&&null!==k||"process-tick"!==f.data||(f.stopPropagation(),0<b.length&&b.shift()())},!0);return function(f){b.push(f);window.postMessage("process-tick","*")}}return function(b){setTimeout(b,0)}}();p.title="browser";p.browser=!0;p.env={};p.argv=[];p.on=b;p.addListener=b;p.once= | ||
b;p.off=b;p.removeListener=b;p.removeAllListeners=b;p.emit=b;p.binding=function(b){throw Error("process.binding is not supported");};p.cwd=function(){return"/"};p.chdir=function(b){throw Error("process.chdir is not supported");}},{}],9:[function(p,v,m){function b(){this._array=[];this._set=h?new Map:Object.create(null)}var f=p("./util"),k=Object.prototype.hasOwnProperty,h="undefined"!==typeof Map;b.fromArray=function(d,a){for(var f=new b,k=0,r=d.length;k<r;k++)f.add(d[k],a);return f};b.prototype.size= | ||
function(){return h?this._set.size:Object.getOwnPropertyNames(this._set).length};b.prototype.add=function(b,a){var d=h?b:f.toSetString(b),u=h?this.has(b):k.call(this._set,d),r=this._array.length;u&&!a||this._array.push(b);u||(h?this._set.set(b,r):this._set[d]=r)};b.prototype.has=function(b){if(h)return this._set.has(b);b=f.toSetString(b);return k.call(this._set,b)};b.prototype.indexOf=function(b){if(h){var a=this._set.get(b);if(0<=a)return a}else if(a=f.toSetString(b),k.call(this._set,a))return this._set[a]; | ||
throw Error('"'+b+'" is not in the set.');};b.prototype.at=function(b){if(0<=b&&b<this._array.length)return this._array[b];throw Error("No element indexed by "+b);};b.prototype.toArray=function(){return this._array.slice()};m.ArraySet=b},{"./util":18}],10:[function(p,v,m){var b=p("./base64");m.encode=function(f){var k="",h=0>f?(-f<<1)+1:f<<1;do f=h&31,h>>>=5,0<h&&(f|=32),k+=b.encode(f);while(0<h);return k};m.decode=function(f,k,h){var d=f.length,a=0,l=0;do{if(k>=d)throw Error("Expected more digits in base 64 VLQ value."); | ||
var u=b.decode(f.charCodeAt(k++));if(-1===u)throw Error("Invalid base64 digit: "+f.charAt(k-1));var r=!!(u&32);u&=31;a+=u<<l;l+=5}while(r);f=a>>1;h.value=1===(a&1)?-f:f;h.rest=k}},{"./base64":11}],11:[function(p,v,m){var b="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");m.encode=function(f){if(0<=f&&f<b.length)return b[f];throw new TypeError("Must be between 0 and 63: "+f);};m.decode=function(b){return 65<=b&&90>=b?b-65:97<=b&&122>=b?b-97+26:48<=b&&57>=b?b-48+52:43==b? | ||
@@ -66,3 +66,3 @@ 62:47==b?63:-1}},{}],12:[function(p,v,m){function b(f,k,h,d,a,l){var u=Math.floor((k-f)/2)+f,r=a(h,d[u],!0);return 0===r?u:0<r?1<k-u?b(u,k,h,d,a,l):l==m.LEAST_UPPER_BOUND?k<d.length?k:-1:u:1<u-f?b(f,u,h,d,a,l):l==m.LEAST_UPPER_BOUND?u:0>f?-1:f}m.GREATEST_LOWER_BOUND=1;m.LEAST_UPPER_BOUND=2;m.search=function(f,k,h,d){if(0===k.length)return-1;f=b(-1,k.length,f,k,h,d||m.GREATEST_LOWER_BOUND);if(0>f)return-1;for(;0<=f-1&&0===h(k[f],k[f-1],!0);)--f;return f}},{}],13:[function(p,v,m){function b(){this._array= | ||
function(a,b){var c=a.charAt(b);return";"===c||","===c};b.prototype._parseMappings=function(a,b){throw Error("Subclasses must implement _parseMappings");};b.GENERATED_ORDER=1;b.ORIGINAL_ORDER=2;b.GREATEST_LOWER_BOUND=1;b.LEAST_UPPER_BOUND=2;b.prototype.eachMapping=function(a,f,c){f=f||null;switch(c||b.GENERATED_ORDER){case b.GENERATED_ORDER:c=this._generatedMappings;break;case b.ORIGINAL_ORDER:c=this._originalMappings;break;default:throw Error("Unknown order of iteration.");}var n=this.sourceRoot; | ||
c.map(function(a){var c=null===a.source?null:this._sources.at(a.source);c=d.computeSourceURL(n,c,this._sourceMapURL);return{source:c,generatedLine:a.generatedLine,generatedColumn:a.generatedColumn,originalLine:a.originalLine,originalColumn:a.originalColumn,name:null===a.name?null:this._names.at(a.name)}},this).forEach(a,f)};b.prototype.allGeneratedPositionsFor=function(b){var f=d.getArg(b,"line"),c={source:d.getArg(b,"source"),originalLine:f,originalColumn:d.getArg(b,"column",0)};null!=this.sourceRoot&& | ||
c.map(function(a){var b=null===a.source?null:this._sources.at(a.source);b=d.computeSourceURL(n,b,this._sourceMapURL);return{source:b,generatedLine:a.generatedLine,generatedColumn:a.generatedColumn,originalLine:a.originalLine,originalColumn:a.originalColumn,name:null===a.name?null:this._names.at(a.name)}},this).forEach(a,f)};b.prototype.allGeneratedPositionsFor=function(b){var f=d.getArg(b,"line"),c={source:d.getArg(b,"source"),originalLine:f,originalColumn:d.getArg(b,"column",0)};null!=this.sourceRoot&& | ||
(c.source=d.relative(this.sourceRoot,c.source));if(!this._sources.has(c.source))return[];c.source=this._sources.indexOf(c.source);var n=[];c=this._findMapping(c,this._originalMappings,"originalLine","originalColumn",d.compareByOriginalPositions,a.LEAST_UPPER_BOUND);if(0<=c){var t=this._originalMappings[c];if(void 0===b.column)for(f=t.originalLine;t&&t.originalLine===f;)n.push({line:d.getArg(t,"generatedLine",null),column:d.getArg(t,"generatedColumn",null),lastColumn:d.getArg(t,"lastGeneratedColumn", | ||
@@ -109,11 +109,11 @@ null)}),t=this._originalMappings[++c];else for(b=t.originalColumn;t&&t.originalLine===f&&t.originalColumn==b;)n.push({line:d.getArg(t,"generatedLine",null),column:d.getArg(t,"generatedColumn",null),lastColumn:d.getArg(t,"lastGeneratedColumn",null)}),t=this._originalMappings[++c]}return n};m.SourceMapConsumer=b;f.prototype=Object.create(b.prototype);f.prototype.consumer=b;f.fromSourceMap=function(a,b){var c=Object.create(f.prototype),n=c._names=l.fromArray(a._names.toArray(),!0),t=c._sources=l.fromArray(a._sources.toArray(), | ||
a[c](b);if(e)return e}return null}}function h(a,b){if(!a)return b;var c=x.dirname(a),e=/^\w+:\/\/[^\/]*/.exec(c);e=e?e[0]:"";var d=c.slice(e.length);return e&&/^\/\w:/.test(d)?(e+="/",e+x.resolve(c.slice(e.length),b).replace(/\\/g,"/")):e+x.resolve(c.slice(e.length),b)}function d(a){var b=F[a.source];if(!b){var c=E(a.source);c?(b=F[a.source]={url:c.url,map:new n(c.map)},b.map.sourcesContent&&b.map.sources.forEach(function(a,c){var e=b.map.sourcesContent[c];if(e){var d=h(b.url,a);C[d]=e}})):b=F[a.source]= | ||
{url:null,map:null}}return b&&b.map&&(c=b.map.originalPositionFor(a),null!==c.source)?(c.source=h(b.url,c.source),c):a}function a(b){var c=/^eval at ([^(]+) \((.+):(\d+):(\d+)\)$/.exec(b);return c?(b=d({source:c[2],line:+c[3],column:c[4]-1}),"eval at "+c[1]+" ("+b.source+":"+b.line+":"+(b.column+1)+")"):(c=/^eval at ([^(]+) \((.+)\)$/.exec(b))?"eval at "+c[1]+" ("+a(c[2])+")":b}function l(){var a="";if(this.isNative())a="native";else{var b=this.getScriptNameOrSourceURL();!b&&this.isEval()&&(a=this.getEvalOrigin(), | ||
a+=", ");a=b?a+b:a+"<anonymous>";b=this.getLineNumber();null!=b&&(a+=":"+b,(b=this.getColumnNumber())&&(a+=":"+b))}b="";var c=this.getFunctionName(),d=!0,f=this.isConstructor();if(this.isToplevel()||f)f?b+="new "+(c||"<anonymous>"):c?b+=c:(b+=a,d=!1);else{f=this.getTypeName();"[object Object]"===f&&(f="null");var h=this.getMethodName();c?(f&&0!=c.indexOf(f)&&(b+=f+"."),b+=c,h&&c.indexOf("."+h)!=c.length-h.length-1&&(b+=" [as "+h+"]")):b+=f+"."+(h||"<anonymous>")}d&&(b+=" ("+a+")");return b}function u(a){var b= | ||
{};Object.getOwnPropertyNames(Object.getPrototypeOf(a)).forEach(function(c){b[c]=/^(?:is|get)/.test(c)?function(){return a[c].call(a)}:a[c]});b.toString=l;return b}function r(b){if(b.isNative())return b;var c=b.getFileName()||b.getScriptNameOrSourceURL();if(c){var e=b.getLineNumber(),h=b.getColumnNumber()-1;1===e&&62<h&&!f()&&!b.isEval()&&(h-=62);var k=d({source:c,line:e,column:h});b=u(b);var l=b.getFunctionName;b.getFunctionName=function(){return k.name||l()};b.getFileName=function(){return k.source}; | ||
b.getLineNumber=function(){return k.line};b.getColumnNumber=function(){return k.column+1};b.getScriptNameOrSourceURL=function(){return k.source};return b}var m=b.isEval()&&b.getEvalOrigin();m&&(m=a(m),b=u(b),b.getEvalOrigin=function(){return m});return b}function t(a,b){L&&(C={},F={});return a+b.map(function(a){return"\n at "+r(a)}).join("")}function v(a){var b=/\n at [^(]+ \((.*):(\d+):(\d+)\)/.exec(a.stack);if(b){a=b[1];var c=+b[2];b=+b[3];var d=C[a];if(!d&&B&&B.existsSync(a))try{d=B.readFileSync(a, | ||
"utf8")}catch(Q){d=""}if(d&&(d=d.split(/(?:\r\n|\r|\n)/)[c-1]))return a+":"+c+"\n"+d+"\n"+Array(b).join(" ")+"^"}return null}function c(){var a=b.emit;b.emit=function(c){if("uncaughtException"===c){var d=arguments[1]&&arguments[1].stack,e=0<this.listeners(c).length;if(d&&!e){d=arguments[1];e=v(d);b.stderr._handle&&b.stderr._handle.setBlocking&&b.stderr._handle.setBlocking(!0);e&&(console.error(),console.error(e));console.error(d.stack);b.exit(1);return}}return a.apply(this,arguments)}}var n=p("source-map").SourceMapConsumer, | ||
x=p("path");try{var B=p("fs");B.existsSync&&B.readFileSync||(B=null)}catch(e){}var I=p("buffer-from"),M=!1,K=!1,L=!1,J="auto",C={},F={},H=/^data:application\/json[^,]+base64,/,A=[],D=[],q=k(A);A.push(function(a){a=a.trim();/^file:/.test(a)&&(a=a.replace(/file:\/\/\/(\w:)?/,function(a,b){return b?"":"/"}));if(a in C)return C[a];var b="";try{if(B)B.existsSync(a)&&(b=B.readFileSync(a,"utf8"));else{var c=new XMLHttpRequest;c.open("GET",a,!1);c.send(null);4===c.readyState&&200===c.status&&(b=c.responseText)}}catch(P){}return C[a]= | ||
b});var E=k(D);D.push(function(a){a:{if(f())try{var b=new XMLHttpRequest;b.open("GET",a,!1);b.send(null);var c=b.getResponseHeader("SourceMap")||b.getResponseHeader("X-SourceMap");if(c){var d=c;break a}}catch(R){}d=q(a);b=/(?:\/\/[@#][ \t]+sourceMappingURL=([^\s'"]+?)[ \t]*$)|(?:\/\*[@#][ \t]+sourceMappingURL=([^\*]+?)[ \t]*(?:\*\/)[ \t]*$)/mg;for(var e;c=b.exec(d);)e=c;d=e?e[1]:null}if(!d)return null;H.test(d)?(e=d.slice(d.indexOf(",")+1),e=I(e,"base64").toString(),d=a):(d=h(a,d),e=q(d));return e? | ||
{url:d,map:e}:null});var G=A.slice(0),w=D.slice(0);m.wrapCallSite=r;m.getErrorSource=v;m.mapSourcePosition=d;m.retrieveSourceMap=E;m.install=function(a){a=a||{};if(a.environment&&(J=a.environment,-1===["node","browser","auto"].indexOf(J)))throw Error("environment "+J+" was unknown. Available options are {auto, browser, node}");a.retrieveFile&&(a.overrideRetrieveFile&&(A.length=0),A.unshift(a.retrieveFile));a.retrieveSourceMap&&(a.overrideRetrieveSourceMap&&(D.length=0),D.unshift(a.retrieveSourceMap)); | ||
if(a.hookRequire&&!f()){try{var d=p("module")}catch(P){}var e=d.prototype._compile;e.__sourceMapSupport||(d.prototype._compile=function(a,b){C[b]=a;F[b]=void 0;return e.call(this,a,b)},d.prototype._compile.__sourceMapSupport=!0)}L||(L="emptyCacheBetweenOperations"in a?a.emptyCacheBetweenOperations:!1);M||(M=!0,Error.prepareStackTrace=t);!K&&("handleUncaughtExceptions"in a?a.handleUncaughtExceptions:1)&&"object"===typeof b&&null!==b&&"function"===typeof b.on&&(K=!0,c())};m.resetRetrieveHandlers=function(){A.length= | ||
0;D.length=0;A=G.slice(0);D=w.slice(0)}}).call(this,p("node_modules/process/browser.js"))},{"node_modules/process/browser.js":8,"buffer-from":4,fs:3,module:3,path:7,"source-map":19}]},{},[1]);return N}); | ||
{url:null,map:null}}return b&&b.map&&"function"===typeof b.map.originalPositionFor&&(c=b.map.originalPositionFor(a),null!==c.source)?(c.source=h(b.url,c.source),c):a}function a(b){var c=/^eval at ([^(]+) \((.+):(\d+):(\d+)\)$/.exec(b);return c?(b=d({source:c[2],line:+c[3],column:c[4]-1}),"eval at "+c[1]+" ("+b.source+":"+b.line+":"+(b.column+1)+")"):(c=/^eval at ([^(]+) \((.+)\)$/.exec(b))?"eval at "+c[1]+" ("+a(c[2])+")":b}function l(){var a="";if(this.isNative())a="native";else{var b=this.getScriptNameOrSourceURL(); | ||
!b&&this.isEval()&&(a=this.getEvalOrigin(),a+=", ");a=b?a+b:a+"<anonymous>";b=this.getLineNumber();null!=b&&(a+=":"+b,(b=this.getColumnNumber())&&(a+=":"+b))}b="";var c=this.getFunctionName(),d=!0,f=this.isConstructor();if(this.isToplevel()||f)f?b+="new "+(c||"<anonymous>"):c?b+=c:(b+=a,d=!1);else{f=this.getTypeName();"[object Object]"===f&&(f="null");var h=this.getMethodName();c?(f&&0!=c.indexOf(f)&&(b+=f+"."),b+=c,h&&c.indexOf("."+h)!=c.length-h.length-1&&(b+=" [as "+h+"]")):b+=f+"."+(h||"<anonymous>")}d&& | ||
(b+=" ("+a+")");return b}function u(a){var b={};Object.getOwnPropertyNames(Object.getPrototypeOf(a)).forEach(function(c){b[c]=/^(?:is|get)/.test(c)?function(){return a[c].call(a)}:a[c]});b.toString=l;return b}function r(b){if(b.isNative())return b;var c=b.getFileName()||b.getScriptNameOrSourceURL();if(c){var e=b.getLineNumber(),h=b.getColumnNumber()-1;1===e&&62<h&&!f()&&!b.isEval()&&(h-=62);var k=d({source:c,line:e,column:h});b=u(b);var l=b.getFunctionName;b.getFunctionName=function(){return k.name|| | ||
l()};b.getFileName=function(){return k.source};b.getLineNumber=function(){return k.line};b.getColumnNumber=function(){return k.column+1};b.getScriptNameOrSourceURL=function(){return k.source};return b}var m=b.isEval()&&b.getEvalOrigin();m&&(m=a(m),b=u(b),b.getEvalOrigin=function(){return m});return b}function t(a,b){L&&(C={},F={});return a+b.map(function(a){return"\n at "+r(a)}).join("")}function v(a){var b=/\n at [^(]+ \((.*):(\d+):(\d+)\)/.exec(a.stack);if(b){a=b[1];var c=+b[2];b=+b[3];var d= | ||
C[a];if(!d&&B&&B.existsSync(a))try{d=B.readFileSync(a,"utf8")}catch(Q){d=""}if(d&&(d=d.split(/(?:\r\n|\r|\n)/)[c-1]))return a+":"+c+"\n"+d+"\n"+Array(b).join(" ")+"^"}return null}function c(){var a=b.emit;b.emit=function(c){if("uncaughtException"===c){var d=arguments[1]&&arguments[1].stack,e=0<this.listeners(c).length;if(d&&!e){d=arguments[1];e=v(d);b.stderr._handle&&b.stderr._handle.setBlocking&&b.stderr._handle.setBlocking(!0);e&&(console.error(),console.error(e));console.error(d.stack);b.exit(1); | ||
return}}return a.apply(this,arguments)}}var n=p("source-map").SourceMapConsumer,x=p("path");try{var B=p("fs");B.existsSync&&B.readFileSync||(B=null)}catch(e){}var I=p("buffer-from"),M=!1,K=!1,L=!1,J="auto",C={},F={},H=/^data:application\/json[^,]+base64,/,A=[],D=[],q=k(A);A.push(function(a){a=a.trim();/^file:/.test(a)&&(a=a.replace(/file:\/\/\/(\w:)?/,function(a,b){return b?"":"/"}));if(a in C)return C[a];var b="";try{if(B)B.existsSync(a)&&(b=B.readFileSync(a,"utf8"));else{var c=new XMLHttpRequest; | ||
c.open("GET",a,!1);c.send(null);4===c.readyState&&200===c.status&&(b=c.responseText)}}catch(P){}return C[a]=b});var E=k(D);D.push(function(a){a:{if(f())try{var b=new XMLHttpRequest;b.open("GET",a,!1);b.send(null);var c=b.getResponseHeader("SourceMap")||b.getResponseHeader("X-SourceMap");if(c){var d=c;break a}}catch(R){}d=q(a);b=/(?:\/\/[@#][ \t]+sourceMappingURL=([^\s'"]+?)[ \t]*$)|(?:\/\*[@#][ \t]+sourceMappingURL=([^\*]+?)[ \t]*(?:\*\/)[ \t]*$)/mg;for(var e;c=b.exec(d);)e=c;d=e?e[1]:null}if(!d)return null; | ||
H.test(d)?(e=d.slice(d.indexOf(",")+1),e=I(e,"base64").toString(),d=a):(d=h(a,d),e=q(d));return e?{url:d,map:e}:null});var G=A.slice(0),w=D.slice(0);m.wrapCallSite=r;m.getErrorSource=v;m.mapSourcePosition=d;m.retrieveSourceMap=E;m.install=function(a){a=a||{};if(a.environment&&(J=a.environment,-1===["node","browser","auto"].indexOf(J)))throw Error("environment "+J+" was unknown. Available options are {auto, browser, node}");a.retrieveFile&&(a.overrideRetrieveFile&&(A.length=0),A.unshift(a.retrieveFile)); | ||
a.retrieveSourceMap&&(a.overrideRetrieveSourceMap&&(D.length=0),D.unshift(a.retrieveSourceMap));if(a.hookRequire&&!f()){try{var d=p("module")}catch(P){}var e=d.prototype._compile;e.__sourceMapSupport||(d.prototype._compile=function(a,b){C[b]=a;F[b]=void 0;return e.call(this,a,b)},d.prototype._compile.__sourceMapSupport=!0)}L||(L="emptyCacheBetweenOperations"in a?a.emptyCacheBetweenOperations:!1);M||(M=!0,Error.prepareStackTrace=t);!K&&("handleUncaughtExceptions"in a?a.handleUncaughtExceptions:1)&& | ||
"object"===typeof b&&null!==b&&"function"===typeof b.on&&(K=!0,c())};m.resetRetrieveHandlers=function(){A.length=0;D.length=0;A=G.slice(0);D=w.slice(0)}}).call(this,p("g5I+bs"))},{"buffer-from":4,fs:3,"g5I+bs":8,module:3,path:7,"source-map":19}]},{},[1]);return N}); |
{ | ||
"name": "source-map-support", | ||
"description": "Fixes stack traces for files with source maps", | ||
"version": "0.5.9", | ||
"version": "0.5.10", | ||
"main": "./source-map-support.js", | ||
@@ -17,7 +17,7 @@ "scripts": { | ||
"devDependencies": { | ||
"browserify": "3.44.2", | ||
"coffee-script": "1.7.1", | ||
"browserify": "^3.46.1", | ||
"coffeescript": "^1.12.7", | ||
"http-server": "^0.8.5", | ||
"mocha": "1.18.2", | ||
"webpack": "^1.13.3" | ||
"mocha": "^1.21.5", | ||
"webpack": "^1.15.0" | ||
}, | ||
@@ -24,0 +24,0 @@ "repository": { |
@@ -105,4 +105,4 @@ # Source Map Support | ||
The module will by default assume a browser environment if XMLHttpRequest and window are defined. If either of these do not exist it will instead assume a node environment. | ||
In some rare cases, e.g. when running a browser emulation and where both variables are also set, you can explictly specify the environment to be either 'browser' or 'node'. | ||
The module will by default assume a browser environment if XMLHttpRequest and window are defined. If either of these do not exist it will instead assume a node environment. | ||
In some rare cases, e.g. when running a browser emulation and where both variables are also set, you can explictly specify the environment to be either 'browser' or 'node'. | ||
@@ -213,3 +213,26 @@ ```js | ||
``` | ||
There is also the option to use `-r source-map-support/register` with typescript, without the need add the `require('source-map-support').install()` in the code base: | ||
``` | ||
$ npm install source-map-support typescript | ||
$ node_modules/typescript/bin/tsc -sourcemap demo.ts | ||
$ node -r source-map-support/register demo.js | ||
demo.ts:5 | ||
bar() { throw new Error('this is a demo'); } | ||
^ | ||
Error: this is a demo | ||
at Foo.bar (demo.ts:5:17) | ||
at new Foo (demo.ts:4:24) | ||
at Object.<anonymous> (demo.ts:7:1) | ||
at Module._compile (module.js:456:26) | ||
at Object.Module._extensions..js (module.js:474:10) | ||
at Module.load (module.js:356:32) | ||
at Function.Module._load (module.js:312:12) | ||
at Function.Module.runMain (module.js:497:10) | ||
at startup (node.js:119:16) | ||
at node.js:901:3 | ||
``` | ||
#### CoffeeScript Demo | ||
@@ -230,4 +253,4 @@ | ||
```sh | ||
$ npm install source-map-support coffee-script | ||
$ node_modules/coffee-script/bin/coffee --map --compile demo.coffee | ||
$ npm install source-map-support coffeescript | ||
$ node_modules/.bin/coffee --map --compile demo.coffee | ||
$ node demo.js | ||
@@ -234,0 +257,0 @@ |
@@ -213,3 +213,3 @@ var SourceMapConsumer = require('source-map').SourceMapConsumer; | ||
// Resolve the source URL relative to the URL of the source map | ||
if (sourceMap && sourceMap.map) { | ||
if (sourceMap && sourceMap.map && typeof sourceMap.map.originalPositionFor === 'function') { | ||
var originalPosition = sourceMap.map.originalPositionFor(position); | ||
@@ -216,0 +216,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
83101
285
719