shogun-core 3.0.1 → 3.0.2
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/dist/core.js
CHANGED
|
@@ -67,17 +67,17 @@ export class CoreInitializer {
|
|
|
67
67
|
try {
|
|
68
68
|
if (config.gunInstance && config.gunInstance instanceof Gun) {
|
|
69
69
|
console.log("config.gunInstance", config.gunInstance);
|
|
70
|
-
this.core.
|
|
70
|
+
this.core._gun = config.gunInstance;
|
|
71
71
|
}
|
|
72
72
|
else {
|
|
73
73
|
console.log("config.gunOptions", config.gunOptions);
|
|
74
|
-
this.core.
|
|
74
|
+
this.core._gun = createGun(config.gunOptions);
|
|
75
75
|
// Explicitly apply peers configuration if not already set
|
|
76
76
|
if (config.gunOptions?.peers &&
|
|
77
77
|
Array.isArray(config.gunOptions.peers)) {
|
|
78
78
|
console.log("Applying peers configuration:", config.gunOptions.peers);
|
|
79
|
-
this.core.
|
|
80
|
-
console.log("Peers after explicit application:", this.core.
|
|
79
|
+
this.core._gun.opt({ peers: config.gunOptions.peers });
|
|
80
|
+
console.log("Peers after explicit application:", this.core._gun?.opt?.peers);
|
|
81
81
|
}
|
|
82
82
|
}
|
|
83
83
|
}
|
|
@@ -90,7 +90,7 @@ export class CoreInitializer {
|
|
|
90
90
|
try {
|
|
91
91
|
console.log("Initialize Gun instance", this.core.gun);
|
|
92
92
|
this.core.db = new DataBase(this.core.gun, config.gunOptions.scope || "");
|
|
93
|
-
this.core.
|
|
93
|
+
this.core._gun = this.core.db.gun;
|
|
94
94
|
}
|
|
95
95
|
catch (error) {
|
|
96
96
|
if (typeof console !== "undefined" && console.error) {
|
package/dist/types/core.d.ts
CHANGED
|
@@ -19,7 +19,7 @@ import { PluginManager } from "./managers/PluginManager";
|
|
|
19
19
|
* @since 2.0.0
|
|
20
20
|
*/
|
|
21
21
|
export declare class ShogunCore implements IShogunCore {
|
|
22
|
-
static readonly API_VERSION = "^3.0.
|
|
22
|
+
static readonly API_VERSION = "^3.0.1";
|
|
23
23
|
db: DataBase;
|
|
24
24
|
storage: ShogunStorage;
|
|
25
25
|
provider?: ethers.Provider;
|