@drifted/raven 0.0.20 → 0.0.21

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 (3) hide show
  1. package/index.js +16 -1
  2. package/package.json +2 -4
  3. package/bufferable.js +0 -18
package/index.js CHANGED
@@ -3,7 +3,22 @@ const crypto = require('crypto');
3
3
  const fs = require('fs');
4
4
  const ivLength = 16;
5
5
  const { Readable, pipeline, buffer } = require('stream');
6
- const Bufferable = require(path.join(__dirname, 'bufferable'));
6
+ const { Writable } = require('node:stream');
7
+
8
+ class Bufferable extends Writable {
9
+ constructor() {
10
+ super();
11
+ this.chunks = [];
12
+ }
13
+ _write(chunk, encoding, callback) {
14
+ this.chunks.push(chunk);
15
+ callback();
16
+ }
17
+ get buffer() {
18
+ return Buffer.concat(this.chunks);
19
+ }
20
+ }
21
+
7
22
 
8
23
 
9
24
  class RavenDataFile {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@drifted/raven",
3
- "version": "0.0.20",
3
+ "version": "0.0.21",
4
4
  "description": "",
5
5
  "homepage": "https://github.com/driftless-group/raven",
6
6
  "bin": {
@@ -22,8 +22,6 @@
22
22
  "@drifted/qa": "^0.0.5"
23
23
  },
24
24
  "dependencies": {
25
- "carrier-pigeon": "^0.1.11",
26
- "file-type": "^22.0.0",
27
- "read-chunk": "^5.0.0"
25
+ "carrier-pigeon": "^0.1.11"
28
26
  }
29
27
  }
package/bufferable.js DELETED
@@ -1,18 +0,0 @@
1
- const { Writable } = require('node:stream');
2
-
3
- class Bufferable extends Writable {
4
- constructor() {
5
- super();
6
- this.chunks = [];
7
- }
8
- _write(chunk, encoding, callback) {
9
- this.chunks.push(chunk);
10
- callback();
11
- }
12
- get buffer() {
13
- return Buffer.concat(this.chunks);
14
- }
15
- }
16
-
17
-
18
- module.exports = Bufferable;