vrpc 3.3.0 → 3.3.1
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/package.json +1 -1
- package/vrpc/VrpcPersistor.js +1 -9
package/package.json
CHANGED
package/vrpc/VrpcPersistor.js
CHANGED
|
@@ -38,6 +38,7 @@ SOFTWARE.
|
|
|
38
38
|
*/
|
|
39
39
|
|
|
40
40
|
const VrpcAdapter = require('./VrpcAdapter')
|
|
41
|
+
const Storage = require('@heisenware/storage')
|
|
41
42
|
|
|
42
43
|
/**
|
|
43
44
|
* Provides a persistence layer for VRPC instances.
|
|
@@ -58,15 +59,6 @@ class VrpcPersistor {
|
|
|
58
59
|
* @param {string} [options.dir] Optional directory for storage. Defaults to a path derived from the agent's name.
|
|
59
60
|
*/
|
|
60
61
|
constructor ({ agentInstance, log, dir }) {
|
|
61
|
-
let Storage
|
|
62
|
-
try {
|
|
63
|
-
Storage = require('@heisenware/storage')
|
|
64
|
-
} catch (err) {
|
|
65
|
-
throw new Error(
|
|
66
|
-
"The '@heisenware/storage' package is required to use VrpcPersistor. Please install it (`npm i @heisenware/storage`) and add it to your project's dependencies."
|
|
67
|
-
)
|
|
68
|
-
}
|
|
69
|
-
|
|
70
62
|
this._agentInstance = agentInstance
|
|
71
63
|
|
|
72
64
|
// Define a no-operation function for the default logger.
|