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
@@ -16,7 +16,7 @@ import { CoreInitializer } from "./managers/CoreInitializer";
16
16
  * @since 2.0.0
17
17
  */
18
18
  export class ShogunCore {
19
- static API_VERSION = "^3.0.5";
19
+ static API_VERSION = "^3.0.1";
20
20
  db;
21
21
  storage;
22
22
  provider;
@@ -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.gun = config.gunInstance;
70
+ this.core._gun = config.gunInstance;
71
71
  }
72
72
  else {
73
73
  console.log("config.gunOptions", config.gunOptions);
74
- this.core.gun = createGun(config.gunOptions);
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.gun.opt({ peers: config.gunOptions.peers });
80
- console.log("Peers after explicit application:", this.core.gun?.opt?.peers);
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.gun = this.core.db.gun;
93
+ this.core._gun = this.core.db.gun;
94
94
  }
95
95
  catch (error) {
96
96
  if (typeof console !== "undefined" && console.error) {
@@ -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.5";
22
+ static readonly API_VERSION = "^3.0.1";
23
23
  db: DataBase;
24
24
  storage: ShogunStorage;
25
25
  provider?: ethers.Provider;
@@ -115,6 +115,7 @@ export interface SignUpResult {
115
115
  }
116
116
  export interface IShogunCore extends PluginManager {
117
117
  gun: GunInstance;
118
+ _gun: GunInstance;
118
119
  user: GunUserInstance | null;
119
120
  db: DataBase;
120
121
  rx: RxJS;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shogun-core",
3
- "version": "3.0.1",
3
+ "version": "3.0.2",
4
4
  "description": "SHOGUN CORE - Core library for Shogun Ecosystem",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",