smipper 28.0.0 → 30.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/dist/init.js CHANGED
@@ -55,7 +55,7 @@ function init() {
55
55
  smipper.verbose = console.error.bind(console);
56
56
  }
57
57
  else if (arg === "--version") {
58
- console.log(JSON.parse(fs_1.default.readFileSync(path_1.default.join(__dirname, "package.json"), "utf8")).version);
58
+ console.log(JSON.parse(fs_1.default.readFileSync(path_1.default.join(__dirname, "..", "package.json"), "utf8")).version);
59
59
  process.exit(0);
60
60
  }
61
61
  else if (arg === "--json") {
package/dist/loadUri.js CHANGED
@@ -1,32 +1,13 @@
1
1
  "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
24
4
  };
25
5
  Object.defineProperty(exports, "__esModule", { value: true });
26
6
  exports.loadUri = void 0;
27
- const sourceMap = __importStar(require("source-map"));
28
7
  const load_1 = require("./load");
29
- async function loadUri(smipper, path) {
8
+ const assert_1 = __importDefault(require("assert"));
9
+ const source_map_1 = __importDefault(require("source-map"));
10
+ function loadUri(smipper, path) {
30
11
  if (path[0] === "/") {
31
12
  path = "file://" + path;
32
13
  }
@@ -47,6 +28,7 @@ async function loadUri(smipper, path) {
47
28
  const mapUrl = jsData.substring(idx + 21);
48
29
  const match = /^(data:.+\/.+;)base64,/.exec(mapUrl);
49
30
  if (match) {
31
+ (0, assert_1.default)(match[1] !== undefined);
50
32
  return mapUrl.substring(match[1].length);
51
33
  }
52
34
  if (mapUrl.indexOf("://") != -1) {
@@ -64,7 +46,7 @@ async function loadUri(smipper, path) {
64
46
  })
65
47
  .then(async (sourceMapData) => {
66
48
  const parsed = JSON.parse(sourceMapData);
67
- const smap = await new sourceMap.SourceMapConsumer(parsed);
49
+ const smap = await new source_map_1.default.SourceMapConsumer(parsed);
68
50
  const pending = smipper.sourceMaps[path];
69
51
  // sourceMaps.delete(path);
70
52
  if (pending) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "smipper",
3
- "version": "28.0.0",
3
+ "version": "30.0.0",
4
4
  "description": "",
5
5
  "main": "./index.js",
6
6
  "bin": {