@drifted/raven 0.0.5 → 0.0.6
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/index.js +3 -3
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -19,7 +19,7 @@ class RavenDataFile {
|
|
|
19
19
|
this.algorithm = 'aes-256-gcm';
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
if (this.secret == undefined &&
|
|
22
|
+
if (this.secret == undefined && RavenDataFile.hasFile()) {
|
|
23
23
|
this.populateSecretFromFile();
|
|
24
24
|
}
|
|
25
25
|
|
|
@@ -29,7 +29,7 @@ class RavenDataFile {
|
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
populateSecretFromFile() {
|
|
32
|
-
var data = fs.readFileSync(
|
|
32
|
+
var data = fs.readFileSync(RavenDataFile.secretFile()).toString();
|
|
33
33
|
var json = JSON.parse(data);
|
|
34
34
|
this.secret = json.secret;
|
|
35
35
|
}
|
|
@@ -47,7 +47,7 @@ class RavenDataFile {
|
|
|
47
47
|
}
|
|
48
48
|
|
|
49
49
|
return new Promise(async(resolve) => {
|
|
50
|
-
var file = new
|
|
50
|
+
var file = new RavenDataFile(options);
|
|
51
51
|
var times = 0;
|
|
52
52
|
|
|
53
53
|
await file.read();
|