source-map-support
Advanced tools
Comparing version 0.5.3 to 0.5.4
@@ -16,3 +16,3 @@ /* | ||
4&63);a+="==";break;case 2:r=(b[b.length-2]<<8)+b[b.length-1],a+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(r>>10),a+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(r>>4&63),a+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(r<<2&63),a+="="}return a}})("undefined"===typeof h?this.base64js={}:h)},{}],3:[function(q,v,h){},{}],4:[function(q,v,h){function b(f,g,w){if(!(this instanceof b))return new b(f,g,w);var a=typeof f; | ||
if("base64"===g&&"string"===a)for(f=f.trim?f.trim():f.replace(/^\s+|\s+$/g,"");0!==f.length%4;)f+="=";if("number"===a)var c=D(f);else if("string"===a)c=b.byteLength(f,g);else if("object"===a)c=D(f.length);else throw Error("First argument needs to be a number, array or string.");if(b._useTypedArrays)var d=b._augment(new Uint8Array(c));else d=this,d.length=c,d._isBuffer=!0;if(b._useTypedArrays&&"number"===typeof f.byteLength)d._set(f);else{var m=f;if(M(m)||b.isBuffer(m)||m&&"object"===typeof m&&"number"=== | ||
if("base64"===g&&"string"===a)for(f=f.trim?f.trim():f.replace(/^\s+|\s+$/g,"");0!==f.length%4;)f+="=";if("number"===a)var c=C(f);else if("string"===a)c=b.byteLength(f,g);else if("object"===a)c=C(f.length);else throw Error("First argument needs to be a number, array or string.");if(b._useTypedArrays)var d=b._augment(new Uint8Array(c));else d=this,d.length=c,d._isBuffer=!0;if(b._useTypedArrays&&"number"===typeof f.byteLength)d._set(f);else{var m=f;if(M(m)||b.isBuffer(m)||m&&"object"===typeof m&&"number"=== | ||
typeof m.length)for(g=0;g<c;g++)b.isBuffer(f)?d[g]=f.readUInt8(g):d[g]=f[g];else if("string"===a)d.write(f,0,g);else if("number"===a&&!b._useTypedArrays&&!w)for(g=0;g<c;g++)d[g]=0}return d}function e(f,g,w){var a="";for(w=Math.min(f.length,w);g<w;g++)a+=String.fromCharCode(f[g]);return a}function k(f,g,w,a){a||(p("boolean"===typeof w,"missing or invalid endian"),p(void 0!==g&&null!==g,"missing offset"),p(g+1<f.length,"Trying to read beyond buffer length"));a=f.length;if(!(g>=a))return w?(w=f[g],g+ | ||
@@ -25,3 +25,3 @@ 1<a&&(w|=f[g+1]<<8)):(w=f[g]<<8,g+1<a&&(w|=f[g+1])),w}function n(f,g,a,c){c||(p("boolean"===typeof a,"missing or invalid endian"),p(void 0!==g&&null!==g,"missing offset"),p(g+3<f.length,"Trying to read beyond buffer length"));c=f.length;if(!(g>=c)){var w;a?(g+2<c&&(w=f[g+2]<<16),g+1<c&&(w|=f[g+1]<<8),w|=f[g],g+3<c&&(w+=f[g+3]<<24>>>0)):(g+1<c&&(w=f[g+1]<<16),g+2<c&&(w|=f[g+2]<<8),g+3<c&&(w|=f[g+3]),w+=f[g]<<24>>>0);return w}}function d(f,g,w,a){a||(p("boolean"===typeof w,"missing or invalid endian"), | ||
"missing or invalid endian"),p(void 0!==a&&null!==a,"missing offset"),p(a+3<f.length,"Trying to write beyond buffer length"),F(g,3.4028234663852886E38,-3.4028234663852886E38));a>=f.length||I.write(f,g,a,c,23,4)}function y(f,g,a,c,b){b||(p(void 0!==g&&null!==g,"missing value"),p("boolean"===typeof c,"missing or invalid endian"),p(void 0!==a&&null!==a,"missing offset"),p(a+7<f.length,"Trying to write beyond buffer length"),F(g,1.7976931348623157E308,-1.7976931348623157E308));a>=f.length||I.write(f, | ||
g,a,c,52,8)}function C(f,g,a){if("number"!==typeof f)return a;f=~~f;if(f>=g)return g;if(0<=f)return f;f+=g;return 0<=f?f:0}function D(f){f=~~Math.ceil(+f);return 0>f?0:f}function M(f){return(Array.isArray||function(f){return"[object Array]"===Object.prototype.toString.call(f)})(f)}function K(f){return 16>f?"0"+f.toString(16):f.toString(16)}function L(f){for(var g=[],a=0;a<f.length;a++){var c=f.charCodeAt(a);if(127>=c)g.push(f.charCodeAt(a));else{var b=a;55296<=c&&57343>=c&&a++;c=encodeURIComponent(f.slice(b, | ||
g,a,c,52,8)}function D(f,g,a){if("number"!==typeof f)return a;f=~~f;if(f>=g)return g;if(0<=f)return f;f+=g;return 0<=f?f:0}function C(f){f=~~Math.ceil(+f);return 0>f?0:f}function M(f){return(Array.isArray||function(f){return"[object Array]"===Object.prototype.toString.call(f)})(f)}function K(f){return 16>f?"0"+f.toString(16):f.toString(16)}function L(f){for(var g=[],a=0;a<f.length;a++){var c=f.charCodeAt(a);if(127>=c)g.push(f.charCodeAt(a));else{var b=a;55296<=c&&57343>=c&&a++;c=encodeURIComponent(f.slice(b, | ||
a+1)).substr(1).split("%");for(b=0;b<c.length;b++)g.push(parseInt(c[b],16))}}return g}function J(f){for(var a=[],c=0;c<f.length;c++)a.push(f.charCodeAt(c)&255);return a}function B(f,a,c,b){for(var g=0;g<b&&!(g+c>=a.length||g>=f.length);g++)a[g+c]=f[g];return g}function G(f){try{return decodeURIComponent(f)}catch(g){return String.fromCharCode(65533)}}function H(f,a){p("number"===typeof f,"cannot write a non-number as a number");p(0<=f,"specified a negative value for writing an unsigned value");p(f<= | ||
@@ -36,3 +36,3 @@ a,"value is larger than maximum value for type");p(Math.floor(f)===f,"value has a fractional component")}function A(f,a,c){p("number"===typeof f,"cannot write a non-number as a number");p(f<=a,"value larger than maximum allowed value");p(f>=c,"value smaller than minimum allowed value");p(Math.floor(f)===f,"value has a fractional component")}function F(f,a,c){p("number"===typeof f,"cannot write a non-number as a number");p(f<=a,"value larger than maximum allowed value");p(f>=c,"value smaller than minimum allowed value")} | ||
this,0)}};b.prototype.copy=function(f,a,c,d){c||(c=0);d||0===d||(d=this.length);a||(a=0);if(d!==c&&0!==f.length&&0!==this.length)if(p(d>=c,"sourceEnd < sourceStart"),p(0<=a&&a<f.length,"targetStart out of bounds"),p(0<=c&&c<this.length,"sourceStart out of bounds"),p(0<=d&&d<=this.length,"sourceEnd out of bounds"),d>this.length&&(d=this.length),f.length-a<d-c&&(d=f.length-a+c),d-=c,100>d||!b._useTypedArrays)for(var g=0;g<d;g++)f[g+a]=this[g+c];else f._set(this.subarray(c,c+d),a)};b.prototype.slice= | ||
function(f,a){var c=this.length;f=C(f,c,0);a=C(a,c,c);if(b._useTypedArrays)return b._augment(this.subarray(f,a));c=a-f;for(var g=new b(c,void 0,!0),d=0;d<c;d++)g[d]=this[d+f];return g};b.prototype.get=function(f){console.log(".get() is deprecated. Access using array indexes instead.");return this.readUInt8(f)};b.prototype.set=function(f,a){console.log(".set() is deprecated. Access using array indexes instead.");return this.writeUInt8(f,a)};b.prototype.readUInt8=function(f,a){a||(p(void 0!==f&&null!== | ||
function(f,a){var c=this.length;f=D(f,c,0);a=D(a,c,c);if(b._useTypedArrays)return b._augment(this.subarray(f,a));c=a-f;for(var g=new b(c,void 0,!0),d=0;d<c;d++)g[d]=this[d+f];return g};b.prototype.get=function(f){console.log(".get() is deprecated. Access using array indexes instead.");return this.readUInt8(f)};b.prototype.set=function(f,a){console.log(".set() is deprecated. Access using array indexes instead.");return this.writeUInt8(f,a)};b.prototype.readUInt8=function(f,a){a||(p(void 0!==f&&null!== | ||
f,"missing offset"),p(f<this.length,"Trying to read beyond buffer length"));if(!(f>=this.length))return this[f]};b.prototype.readUInt16LE=function(f,a){return k(this,f,!0,a)};b.prototype.readUInt16BE=function(a,c){return k(this,a,!1,c)};b.prototype.readUInt32LE=function(a,c){return n(this,a,!0,c)};b.prototype.readUInt32BE=function(a,c){return n(this,a,!1,c)};b.prototype.readInt8=function(a,c){c||(p(void 0!==a&&null!==a,"missing offset"),p(a<this.length,"Trying to read beyond buffer length"));if(!(a>= | ||
@@ -88,8 +88,8 @@ this.length))return this[a]&128?-1*(255-this[a]+1):this[a]};b.prototype.readInt16LE=function(a,c){return d(this,a,!0,c)};b.prototype.readInt16BE=function(a,c){return d(this,a,!1,c)};b.prototype.readInt32LE=function(f,c){return a(this,f,!0,c)};b.prototype.readInt32BE=function(c,g){return a(this,c,!1,g)};b.prototype.readFloatLE=function(a,c){return l(this,a,!0,c)};b.prototype.readFloatBE=function(a,c){return l(this,a,!1,c)};b.prototype.readDoubleLE=function(a,c){return u(this,a,!0,c)};b.prototype.readDoubleBE= | ||
b.source)),b.originalLine=m.line,b.originalColumn=m.column,null!=m.name&&(b.name=m.name))}m=b.source;null==m||u.has(m)||u.add(m);b=b.name;null==b||c.has(b)||c.add(b)},this);this._sources=u;this._names=c;a.sources.forEach(function(b){var c=a.sourceContentFor(b);null!=c&&(null!=d&&(b=k.join(d,b)),null!=l&&(b=k.relative(l,b)),this.setSourceContent(b,c))},this)};b.prototype._validateMapping=function(a,b,d,e){if(b&&"number"!==typeof b.line&&"number"!==typeof b.column)throw Error("original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values."); | ||
if(!(a&&"line"in a&&"column"in a&&0<a.line&&0<=a.column&&!b&&!d&&!e||a&&"line"in a&&"column"in a&&b&&"line"in b&&"column"in b&&0<a.line&&0<=a.column&&0<b.line&&0<=b.column&&d))throw Error("Invalid mapping: "+JSON.stringify({generated:a,source:d,original:b,name:e}));};b.prototype._serializeMappings=function(){for(var a=0,b=1,d=0,h=0,n=0,q=0,c="",m,y,C,D=this._mappings.toArray(),v=0,K=D.length;v<K;v++){y=D[v];m="";if(y.generatedLine!==b)for(a=0;y.generatedLine!==b;)m+=";",b++;else if(0<v){if(!k.compareByGeneratedPositionsInflated(y, | ||
D[v-1]))continue;m+=","}m+=e.encode(y.generatedColumn-a);a=y.generatedColumn;null!=y.source&&(C=this._sources.indexOf(y.source),m+=e.encode(C-q),q=C,m+=e.encode(y.originalLine-1-h),h=y.originalLine-1,m+=e.encode(y.originalColumn-d),d=y.originalColumn,null!=y.name&&(y=this._names.indexOf(y.name),m+=e.encode(y-n),n=y));c+=m}return c};b.prototype._generateSourcesContent=function(a,b){return a.map(function(a){if(!this._sourcesContents)return null;null!=b&&(a=k.relative(b,a));a=k.toSetString(a);return Object.prototype.hasOwnProperty.call(this._sourcesContents, | ||
if(!(a&&"line"in a&&"column"in a&&0<a.line&&0<=a.column&&!b&&!d&&!e||a&&"line"in a&&"column"in a&&b&&"line"in b&&"column"in b&&0<a.line&&0<=a.column&&0<b.line&&0<=b.column&&d))throw Error("Invalid mapping: "+JSON.stringify({generated:a,source:d,original:b,name:e}));};b.prototype._serializeMappings=function(){for(var a=0,b=1,d=0,h=0,n=0,q=0,c="",m,y,D,C=this._mappings.toArray(),v=0,K=C.length;v<K;v++){y=C[v];m="";if(y.generatedLine!==b)for(a=0;y.generatedLine!==b;)m+=";",b++;else if(0<v){if(!k.compareByGeneratedPositionsInflated(y, | ||
C[v-1]))continue;m+=","}m+=e.encode(y.generatedColumn-a);a=y.generatedColumn;null!=y.source&&(D=this._sources.indexOf(y.source),m+=e.encode(D-q),q=D,m+=e.encode(y.originalLine-1-h),h=y.originalLine-1,m+=e.encode(y.originalColumn-d),d=y.originalColumn,null!=y.name&&(y=this._names.indexOf(y.name),m+=e.encode(y-n),n=y));c+=m}return c};b.prototype._generateSourcesContent=function(a,b){return a.map(function(a){if(!this._sourcesContents)return null;null!=b&&(a=k.relative(b,a));a=k.toSetString(a);return Object.prototype.hasOwnProperty.call(this._sourcesContents, | ||
a)?this._sourcesContents[a]:null},this)};b.prototype.toJSON=function(){var a={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};null!=this._file&&(a.file=this._file);null!=this._sourceRoot&&(a.sourceRoot=this._sourceRoot);this._sourcesContents&&(a.sourcesContent=this._generateSourcesContent(a.sources,a.sourceRoot));return a};b.prototype.toString=function(){return JSON.stringify(this.toJSON())};h.SourceMapGenerator=b},{"./array-set":8, | ||
"./base64-vlq":9,"./mapping-list":12,"./util":17}],16:[function(q,v,h){function b(b,a,e,k,h){this.children=[];this.sourceContents={};this.line=null==b?null:b;this.column=null==a?null:a;this.source=null==e?null:e;this.name=null==h?null:h;this.$$$isSourceNode$$$=!0;null!=k&&this.add(k)}var e=q("./source-map-generator").SourceMapGenerator,k=q("./util"),n=/(\r?\n)/;b.fromStringWithSourceMap=function(d,a,e){function l(a,c){if(null===a||void 0===a.source)h.add(c);else{var d=e?k.join(e,a.source):a.source; | ||
h.add(new b(a.originalLine,a.originalColumn,d,c,a.name))}}var h=new b,t=d.split(n),q=0,c=function(){var a=q<t.length?t[q++]:void 0,b=(q<t.length?t[q++]:void 0)||"";return a+b},m=1,y=0,C=null;a.eachMapping(function(a){if(null!==C)if(m<a.generatedLine)l(C,c()),m++,y=0;else{var b=t[q]||"",d=b.substr(0,a.generatedColumn-y);t[q]=b.substr(a.generatedColumn-y);y=a.generatedColumn;l(C,d);C=a;return}for(;m<a.generatedLine;)h.add(c()),m++;y<a.generatedColumn&&(b=t[q]||"",h.add(b.substr(0,a.generatedColumn)), | ||
t[q]=b.substr(a.generatedColumn),y=a.generatedColumn);C=a},this);q<t.length&&(C&&l(C,c()),h.add(t.splice(q).join("")));a.sources.forEach(function(b){var c=a.sourceContentFor(b);null!=c&&(null!=e&&(b=k.join(e,b)),h.setSourceContent(b,c))});return h};b.prototype.add=function(b){if(Array.isArray(b))b.forEach(function(a){this.add(a)},this);else if(b.$$$isSourceNode$$$||"string"===typeof b)b&&this.children.push(b);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+ | ||
h.add(new b(a.originalLine,a.originalColumn,d,c,a.name))}}var h=new b,t=d.split(n),q=0,c=function(){var a=q<t.length?t[q++]:void 0,b=(q<t.length?t[q++]:void 0)||"";return a+b},m=1,y=0,D=null;a.eachMapping(function(a){if(null!==D)if(m<a.generatedLine)l(D,c()),m++,y=0;else{var b=t[q]||"",d=b.substr(0,a.generatedColumn-y);t[q]=b.substr(a.generatedColumn-y);y=a.generatedColumn;l(D,d);D=a;return}for(;m<a.generatedLine;)h.add(c()),m++;y<a.generatedColumn&&(b=t[q]||"",h.add(b.substr(0,a.generatedColumn)), | ||
t[q]=b.substr(a.generatedColumn),y=a.generatedColumn);D=a},this);q<t.length&&(D&&l(D,c()),h.add(t.splice(q).join("")));a.sources.forEach(function(b){var c=a.sourceContentFor(b);null!=c&&(null!=e&&(b=k.join(e,b)),h.setSourceContent(b,c))});return h};b.prototype.add=function(b){if(Array.isArray(b))b.forEach(function(a){this.add(a)},this);else if(b.$$$isSourceNode$$$||"string"===typeof b)b&&this.children.push(b);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+ | ||
b);return this};b.prototype.prepend=function(b){if(Array.isArray(b))for(var a=b.length-1;0<=a;a--)this.prepend(b[a]);else if(b.$$$isSourceNode$$$||"string"===typeof b)this.children.unshift(b);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+b);return this};b.prototype.walk=function(b){for(var a,d=0,e=this.children.length;d<e;d++)a=this.children[d],a.$$$isSourceNode$$$?a.walk(b):""!==a&&b(a,{source:this.source,line:this.line,column:this.column, | ||
@@ -107,11 +107,11 @@ name:this.name})};b.prototype.join=function(b){var a,d=this.children.length;if(0<d){var e=[];for(a=0;a<d-1;a++)e.push(this.children[a]),e.push(b);e.push(this.children[a]);this.children=e}return this};b.prototype.replaceRight=function(b,a){var d=this.children[this.children.length-1];d.$$$isSourceNode$$$?d.replaceRight(b,a):"string"===typeof d?this.children[this.children.length-1]=d.replace(b,a):this.children.push("".replace(b,a));return this};b.prototype.setSourceContent=function(b,a){this.sourceContents[k.toSetString(b)]= | ||
h.SourceMapConsumer=q("./lib/source-map-consumer").SourceMapConsumer;h.SourceNode=q("./lib/source-node").SourceNode},{"./lib/source-map-consumer":14,"./lib/source-map-generator":15,"./lib/source-node":16}],19:[function(q,v,h){(function(b,e){function k(){return"browser"===J?!0:"node"===J?!1:"undefined"!==typeof window&&"function"===typeof XMLHttpRequest&&!(window.require&&window.module&&window.process&&"renderer"===window.process.type)}function n(a){return function(b){for(var c=0;c<a.length;c++){var d= | ||
a[c](b);if(d)return d}return null}}function d(a,b){if(!a)return b;var c=C.dirname(a),d=/^\w+:\/\/[^\/]*/.exec(c);d=d?d[0]:"";var e=c.slice(d.length);return d&&/^\/\w:/.test(e)?(d+="/",d+C.resolve(c.slice(d.length),b).replace(/\\/g,"/")):d+C.resolve(c.slice(d.length),b)}function a(a){var b=G[a.source];if(!b){var c=E(a.source);c?(b=G[a.source]={url:c.url,map:new y(c.map)},b.map.sourcesContent&&b.map.sources.forEach(function(a,c){var e=b.map.sourcesContent[c];if(e){var f=d(b.url,a);B[f]=e}})):b=G[a.source]= | ||
a[c](b);if(d)return d}return null}}function d(a,b){if(!a)return b;var c=D.dirname(a),d=/^\w+:\/\/[^\/]*/.exec(c);d=d?d[0]:"";var e=c.slice(d.length);return d&&/^\/\w:/.test(e)?(d+="/",d+D.resolve(c.slice(d.length),b).replace(/\\/g,"/")):d+D.resolve(c.slice(d.length),b)}function a(a){var b=G[a.source];if(!b){var c=E(a.source);c?(b=G[a.source]={url:c.url,map:new y(c.map)},b.map.sourcesContent&&b.map.sources.forEach(function(a,c){var e=b.map.sourcesContent[c];if(e){var f=d(b.url,a);B[f]=e}})):b=G[a.source]= | ||
{url:null,map:null}}return b&&b.map&&(c=b.map.originalPositionFor(a),null!==c.source)?(c.source=d(b.url,c.source),c):a}function l(b){var c=/^eval at ([^(]+) \((.+):(\d+):(\d+)\)$/.exec(b);return c?(b=a({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]+" ("+l(c[2])+")":b}function u(){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,e=this.isConstructor();if(this.isToplevel()||e)e?b+="new "+(c||"<anonymous>"):c?b+=c:(b+=a,d=!1);else{e=this.getTypeName();"[object Object]"===e&&(e="null");var k=this.getMethodName();c?(e&&0!=c.indexOf(e)&&(b+=e+"."),b+=c,k&&c.indexOf("."+k)!=c.length-k.length-1&&(b+=" [as "+k+"]")):b+=e+"."+(k||"<anonymous>")}d&&(b+=" ("+a+")");return b}function r(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=u;return b}function t(b){if(b.isNative())return b;var c=b.getFileName()||b.getScriptNameOrSourceURL();if(c){var d=b.getLineNumber(),e=b.getColumnNumber()-1;1===d&&62<e&&!k()&&!b.isEval()&&(e-=62);var h=a({source:c,line:d,column:e});b=r(b);b.getFileName=function(){return h.source};b.getLineNumber=function(){return h.line};b.getColumnNumber=function(){return h.column+ | ||
1};b.getScriptNameOrSourceURL=function(){return h.source};return b}var m=b.isEval()&&b.getEvalOrigin();m&&(m=l(m),b=r(b),b.getEvalOrigin=function(){return m});return b}function v(a,b){L&&(B={},G={});return a+b.map(function(a){return"\n at "+t(a)}).join("")}function c(a){var b=/\n at [^(]+ \((.*):(\d+):(\d+)\)/.exec(a.stack);if(b){a=b[1];var c=+b[2];b=+b[3];var d=B[a];if(!d&&D&&D.existsSync(a))try{d=D.readFileSync(a,"utf8")}catch(w){d=""}if(d&&(d=d.split(/(?:\r\n|\r|\n)/)[c-1]))return a+":"+ | ||
c+"\n"+d+"\n"+Array(b).join(" ")+"^"}return null}function m(){var a=b.emit;b.emit=function(d){if("uncaughtException"===d){var e=arguments[1]&&arguments[1].stack,g=0<this.listeners(d).length;if(e&&!g){e=arguments[1];if(g=c(e))console.error(),console.error(g);console.error(e.stack);b.exit(1);return}}return a.apply(this,arguments)}}var y=q("source-map").SourceMapConsumer,C=q("path");try{var D=q("fs");D.existsSync&&D.readFileSync||(D=null)}catch(I){}var M=!1,K=!1,L=!1,J="auto",B={},G={},H=/^data:application\/json[^,]+base64,/, | ||
A=[],F=[],p=n(A);A.push(function(a){a=a.trim();/^file:/.test(a)&&(a=a.replace(/file:\/\/\/(\w:)?/,function(a,b){return b?"":"/"}));if(a in B)return B[a];var b=null;if(!D){var c=new XMLHttpRequest;c.open("GET",a,!1);c.send(null);b=null;4===c.readyState&&200===c.status&&(b=c.responseText)}else if(D.existsSync(a))try{b=D.readFileSync(a,"utf8")}catch(g){b=""}return B[a]=b});var E=n(F);F.push(function(a){a:{if(k())try{var b=new XMLHttpRequest;b.open("GET",a,!1);b.send(null);var c=b.getResponseHeader("SourceMap")|| | ||
1};b.getScriptNameOrSourceURL=function(){return h.source};return b}var m=b.isEval()&&b.getEvalOrigin();m&&(m=l(m),b=r(b),b.getEvalOrigin=function(){return m});return b}function v(a,b){L&&(B={},G={});return a+b.map(function(a){return"\n at "+t(a)}).join("")}function c(a){var b=/\n at [^(]+ \((.*):(\d+):(\d+)\)/.exec(a.stack);if(b){a=b[1];var c=+b[2];b=+b[3];var d=B[a];if(!d&&C&&C.existsSync(a))try{d=C.readFileSync(a,"utf8")}catch(w){d=""}if(d&&(d=d.split(/(?:\r\n|\r|\n)/)[c-1]))return a+":"+ | ||
c+"\n"+d+"\n"+Array(b).join(" ")+"^"}return null}function m(){var a=b.emit;b.emit=function(d){if("uncaughtException"===d){var e=arguments[1]&&arguments[1].stack,g=0<this.listeners(d).length;if(e&&!g){e=arguments[1];(g=c(e))&&C.writeSync(2,"\n"+g+"\n");C.writeSync(2,e.stack+"\n");b.exit(1);return}}return a.apply(this,arguments)}}var y=q("source-map").SourceMapConsumer,D=q("path");try{var C=q("fs");C.existsSync&&C.readFileSync||(C=null)}catch(I){}var M=!1,K=!1,L=!1,J="auto",B={},G={},H=/^data:application\/json[^,]+base64,/, | ||
A=[],F=[],p=n(A);A.push(function(a){a=a.trim();/^file:/.test(a)&&(a=a.replace(/file:\/\/\/(\w:)?/,function(a,b){return b?"":"/"}));if(a in B)return B[a];var b=null;if(!C){var c=new XMLHttpRequest;c.open("GET",a,!1);c.send(null);b=null;4===c.readyState&&200===c.status&&(b=c.responseText)}else if(C.existsSync(a))try{b=C.readFileSync(a,"utf8")}catch(g){b=""}return B[a]=b});var E=n(F);F.push(function(a){a:{if(k())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 g=c;break a}}catch(P){}g=p(a);b=/(?:\/\/[@#][ \t]+sourceMappingURL=([^\s'"]+?)[ \t]*$)|(?:\/\*[@#][ \t]+sourceMappingURL=([^\*]+?)[ \t]*(?:\*\/)[ \t]*$)/mg;for(var h;c=b.exec(g);)h=c;g=h?h[1]:null}if(!g)return null;H.test(g)?(h=g.slice(g.indexOf(",")+1),h=(new e(h,"base64")).toString(),g=a):(g=d(a,g),h=p(g));return h?{url:g,map:h}:null});h.wrapCallSite=t;h.getErrorSource=c;h.mapSourcePosition=a;h.retrieveSourceMap=E;h.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&&(F.length=0),F.unshift(a.retrieveSourceMap));if(a.hookRequire&&!k()){try{var c=q("module")}catch(g){}var d=c.prototype._compile;d.__sourceMapSupport||(c.prototype._compile=function(a,b){B[b]=a;G[b]=void 0;return d.call(this, | ||
a,b)},c.prototype._compile.__sourceMapSupport=!0)}L||(L="emptyCacheBetweenOperations"in a?a.emptyCacheBetweenOperations:!1);M||(M=!0,Error.prepareStackTrace=v);!K&&("handleUncaughtExceptions"in a?a.handleUncaughtExceptions:1)&&"object"===typeof b&&null!==b&&"function"===typeof b.on&&(K=!0,m())}}).call(this,q("node_modules/process/browser.js"),q("buffer").Buffer)},{"node_modules/process/browser.js":7,buffer:4,fs:3,module:3,path:6,"source-map":18}]},{},[1]);return N}); |
{ | ||
"name": "source-map-support", | ||
"description": "Fixes stack traces for files with source maps", | ||
"version": "0.5.3", | ||
"version": "0.5.4", | ||
"main": "./source-map-support.js", | ||
@@ -6,0 +6,0 @@ "scripts": { |
@@ -432,7 +432,6 @@ var SourceMapConsumer = require('source-map').SourceMapConsumer; | ||
if (source) { | ||
console.error(); | ||
console.error(source); | ||
fs.writeSync(2, "\n" + source + "\n"); | ||
} | ||
console.error(error.stack); | ||
fs.writeSync(2, error.stack + "\n"); | ||
process.exit(1); | ||
@@ -439,0 +438,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
80393
699