smipper 11.0.0 → 12.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +9 -0
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -117,11 +117,20 @@ function loadUri(path) {
|
|
|
117
117
|
return path + ".map";
|
|
118
118
|
|
|
119
119
|
const mapUrl = jsData.substr(idx + 21);
|
|
120
|
+
const match = /^(data:.+\/.+;)base64,/.exec(mapUrl);
|
|
121
|
+
if (match) {
|
|
122
|
+
return mapUrl.substr(match[1].length);
|
|
123
|
+
}
|
|
120
124
|
if (mapUrl.indexOf("://") != -1) {
|
|
121
125
|
return mapUrl;
|
|
122
126
|
}
|
|
127
|
+
// console.log(mapUrl);
|
|
123
128
|
return (new url.URL(mapUrl, path)).href;
|
|
124
129
|
}).then(mapUrl => {
|
|
130
|
+
console.log(mapUrl.substr(0, 20));
|
|
131
|
+
if (mapUrl.startsWith("base64,")) {
|
|
132
|
+
return Buffer.from(mapUrl.substr(7), "base64").toString();
|
|
133
|
+
}
|
|
125
134
|
return load(mapUrl);
|
|
126
135
|
}).then(sourceMapData => {
|
|
127
136
|
const parsed = JSON.parse(sourceMapData);
|