smipper 11.0.0 → 14.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 +8 -0
  2. package/package.json +3 -3
package/index.js CHANGED
@@ -117,11 +117,19 @@ 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
+ if (mapUrl.startsWith("base64,")) {
131
+ return Buffer.from(mapUrl.substr(7), "base64").toString();
132
+ }
125
133
  return load(mapUrl);
126
134
  }).then(sourceMapData => {
127
135
  const parsed = JSON.parse(sourceMapData);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "smipper",
3
- "version": "11.0.0",
3
+ "version": "14.0.0",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -9,8 +9,8 @@
9
9
  "bin": {
10
10
  "smipper": "index.js"
11
11
  },
12
- "author": "",
13
- "license": "ISC",
12
+ "author": "agbakken@gmail.com",
13
+ "license": "BSD-3-Clause",
14
14
  "dependencies": {
15
15
  "got": "^9.6.0",
16
16
  "source-map": "^0.7.3"