@renown/sdk 0.1.0 → 0.4.0
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 +3 -3
- package/src/constants.ts +1 -1
- package/src/init.browser.ts +6 -1
- package/src/init.node.ts +7 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@renown/sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"license": "AGPL-3.0-only",
|
|
6
6
|
"private": false,
|
|
@@ -28,10 +28,10 @@
|
|
|
28
28
|
}
|
|
29
29
|
},
|
|
30
30
|
"peerDependencies": {
|
|
31
|
-
"document-model": "2.
|
|
31
|
+
"document-model": "2.16.0"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
|
-
"document-model": "2.
|
|
34
|
+
"document-model": "2.16.0"
|
|
35
35
|
},
|
|
36
36
|
"scripts": {
|
|
37
37
|
"check-types": "tsc -p tsconfig.node.json --noEmit && tsc -p tsconfig.browser.json --noEmit",
|
package/src/constants.ts
CHANGED
package/src/init.browser.ts
CHANGED
|
@@ -3,10 +3,15 @@ import { RenownEvents, RenownStorageMap } from "./types";
|
|
|
3
3
|
import { BrowserEventEmitter } from "./event/event.browser";
|
|
4
4
|
import { BrowserStorage } from "./storage/storage.browser";
|
|
5
5
|
|
|
6
|
-
export function initRenown(
|
|
6
|
+
export function initRenown(
|
|
7
|
+
connectId: string,
|
|
8
|
+
basename: string | undefined,
|
|
9
|
+
baseUrl?: string,
|
|
10
|
+
) {
|
|
7
11
|
return new Renown(
|
|
8
12
|
new BrowserStorage<RenownStorageMap>("renown", basename),
|
|
9
13
|
new BrowserEventEmitter<RenownEvents>(),
|
|
10
14
|
connectId,
|
|
15
|
+
baseUrl,
|
|
11
16
|
);
|
|
12
17
|
}
|
package/src/init.node.ts
CHANGED
|
@@ -7,7 +7,13 @@ export function initRenown(
|
|
|
7
7
|
connectId: string,
|
|
8
8
|
filePath: string,
|
|
9
9
|
namespace: string,
|
|
10
|
+
baseUrl?: string,
|
|
10
11
|
) {
|
|
11
12
|
const storage = new NodeStorage<RenownStorageMap>(filePath, namespace);
|
|
12
|
-
return new Renown(
|
|
13
|
+
return new Renown(
|
|
14
|
+
storage,
|
|
15
|
+
new NodeEventEmitter<RenownEvents>(),
|
|
16
|
+
connectId,
|
|
17
|
+
baseUrl,
|
|
18
|
+
);
|
|
13
19
|
}
|