gip-remote 1.2.0 → 1.2.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.
Files changed (2) hide show
  1. package/index.js +5 -2
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -23,9 +23,12 @@ class Remote extends ReadyResource {
23
23
  if (typeof this._link === 'string') {
24
24
  this._name = this._link
25
25
  config = {}
26
- } else {
26
+ } else if (this._link.drive) {
27
27
  this._name = this._link.pathname?.split('/').slice(1)[0]
28
- config = this._link.drive
28
+ config = { key: this._link.drive.key }
29
+ } else {
30
+ this._name = this._link.name
31
+ config = this._link
29
32
  }
30
33
 
31
34
  const bee = new Hyperbee(store, config, { autoUpdate: true })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gip-remote",
3
- "version": "1.2.0",
3
+ "version": "1.2.1",
4
4
  "description": "Git+Pear remote DB for handling git data",
5
5
  "main": "index.js",
6
6
  "scripts": {