shogun-button-react 3.0.0 → 3.0.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/dist/connector.js
CHANGED
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
import { ShogunCore } from "shogun-core";
|
|
2
2
|
import { GunAdvancedPlugin } from "./plugins/GunAdvancedPlugin";
|
|
3
3
|
export function shogunConnector(options) {
|
|
4
|
-
const {
|
|
4
|
+
const { gunOptions, appName, timeouts, oauth, webauthn, nostr, web3, showOauth, showWebauthn, showNostr, showMetamask, darkMode, enableGunDebug = true, enableConnectionMonitoring = true, defaultPageSize = 20, connectionTimeout = 10000, debounceInterval = 100, ...restOptions } = options;
|
|
5
|
+
// Ensure gunOptions has default values to prevent undefined errors
|
|
6
|
+
const defaultGunOptions = {
|
|
7
|
+
peers: ["https://gun-manhattan.herokuapp.com/gun"],
|
|
8
|
+
...gunOptions
|
|
9
|
+
};
|
|
5
10
|
const core = new ShogunCore({
|
|
6
|
-
gunOptions:
|
|
7
|
-
peers,
|
|
8
|
-
scope: appName,
|
|
9
|
-
authToken,
|
|
10
|
-
localStorage,
|
|
11
|
-
radisk,
|
|
12
|
-
},
|
|
11
|
+
gunOptions: defaultGunOptions,
|
|
13
12
|
oauth,
|
|
14
13
|
webauthn,
|
|
15
14
|
nostr,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ShogunCore
|
|
1
|
+
import { ShogunCore } from "shogun-core";
|
|
2
2
|
import { GunAdvancedPlugin } from "../plugins/GunAdvancedPlugin";
|
|
3
3
|
export interface ShogunConnectorOptions {
|
|
4
4
|
appName: string;
|
|
@@ -10,9 +10,12 @@ export interface ShogunConnectorOptions {
|
|
|
10
10
|
showNostr?: boolean;
|
|
11
11
|
showOauth?: boolean;
|
|
12
12
|
darkMode?: boolean;
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
gunOptions?: {
|
|
14
|
+
peers?: string[];
|
|
15
|
+
authToken?: string;
|
|
16
|
+
scope?: string;
|
|
17
|
+
[key: string]: any;
|
|
18
|
+
};
|
|
16
19
|
timeouts?: {
|
|
17
20
|
login?: number;
|
|
18
21
|
signup?: number;
|
|
@@ -34,8 +37,6 @@ export interface ShogunConnectorOptions {
|
|
|
34
37
|
web3?: {
|
|
35
38
|
enabled?: boolean;
|
|
36
39
|
};
|
|
37
|
-
localStorage?: boolean;
|
|
38
|
-
radisk?: boolean;
|
|
39
40
|
enableGunDebug?: boolean;
|
|
40
41
|
enableConnectionMonitoring?: boolean;
|
|
41
42
|
defaultPageSize?: number;
|
|
@@ -69,7 +69,7 @@ export declare class GunAdvancedPlugin extends BasePlugin {
|
|
|
69
69
|
key: string;
|
|
70
70
|
};
|
|
71
71
|
put(path: string, data: any): Promise<void>;
|
|
72
|
-
get(path: string):
|
|
72
|
+
get(path: string): any;
|
|
73
73
|
remove(path: string): Promise<void>;
|
|
74
74
|
cleanup(): void;
|
|
75
75
|
getStats(): {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "shogun-button-react",
|
|
3
3
|
"description": "Shogun connector button",
|
|
4
|
-
"version": "3.0.
|
|
4
|
+
"version": "3.0.1",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist",
|
|
7
7
|
"src/styles/index.css"
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"ethers": "^6.13.5",
|
|
35
35
|
"prettier": "^3.5.3",
|
|
36
36
|
"rxjs": "^7.8.1",
|
|
37
|
-
"shogun-core": "^3.0.
|
|
37
|
+
"shogun-core": "^3.0.1"
|
|
38
38
|
},
|
|
39
39
|
"peerDependencies": {
|
|
40
40
|
"react": "^18.0.0",
|