smipper 10.0.0 → 13.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.
Files changed (2) hide show
  1. package/index.js +12 -0
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -77,6 +77,10 @@ function load(path)
77
77
  reject(new Error("Not a url"));
78
78
  return;
79
79
  }
80
+ if (path.startsWith("http://localcontrol.netflix.com/")) {
81
+ reject(new Error("No need to resolve this one"));
82
+ return;
83
+ }
80
84
  let retryIndex = 0;
81
85
  async function get()
82
86
  {
@@ -113,11 +117,19 @@ function loadUri(path) {
113
117
  return path + ".map";
114
118
 
115
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
+ }
116
124
  if (mapUrl.indexOf("://") != -1) {
117
125
  return mapUrl;
118
126
  }
127
+ // console.log(mapUrl);
119
128
  return (new url.URL(mapUrl, path)).href;
120
129
  }).then(mapUrl => {
130
+ if (mapUrl.startsWith("base64,")) {
131
+ return Buffer.from(mapUrl.substr(7), "base64").toString();
132
+ }
121
133
  return load(mapUrl);
122
134
  }).then(sourceMapData => {
123
135
  const parsed = JSON.parse(sourceMapData);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "smipper",
3
- "version": "10.0.0",
3
+ "version": "13.0.0",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {