cargo-messages 0.0.52 → 0.0.54

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/cjs/index.cjs +11 -4
  2. package/package.json +1 -1
package/cjs/index.cjs CHANGED
@@ -27,6 +27,13 @@ function addon() {
27
27
  return addon();
28
28
  }
29
29
 
30
+ const {
31
+ findArtifact,
32
+ findFileByCrateType,
33
+ fromFile,
34
+ fromStdin
35
+ } = addon();
36
+
30
37
  const PRIVATE = {};
31
38
 
32
39
  function enforcePrivate(nonce, className) {
@@ -42,7 +49,7 @@ class CargoArtifact {
42
49
  }
43
50
 
44
51
  findFileByCrateType(crateType) {
45
- return addon().findFileByCrateType(this._kernel, crateType);
52
+ return findFileByCrateType(this._kernel, crateType);
46
53
  }
47
54
  }
48
55
 
@@ -52,12 +59,12 @@ class CargoMessages {
52
59
  this._mount = options.mount || null;
53
60
  this._manifestPath = options.manifestPath || null;
54
61
  this._kernel = options.file
55
- ? addon().fromFile(options.file, this._mount, this._manifestPath)
56
- : addon().fromStdin(this._mount, this._manifestPath);
62
+ ? fromFile(options.file, this._mount, this._manifestPath)
63
+ : fromStdin(this._mount, this._manifestPath);
57
64
  }
58
65
 
59
66
  findArtifact(crateName) {
60
- const found = addon().findArtifact(this._kernel, crateName);
67
+ const found = findArtifact(this._kernel, crateName);
61
68
  return found
62
69
  ? new CargoArtifact(PRIVATE, found)
63
70
  : null;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "cargo-messages",
3
3
  "private": false,
4
- "version": "0.0.52",
4
+ "version": "0.0.54",
5
5
  "description": "A streaming reader for JSON messages emitted from Cargo.",
6
6
  "type": "module",
7
7
  "exports": {