@peers-app/peers-ui 0.19.10 → 0.19.12
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.
|
@@ -189,10 +189,9 @@ function CreateGroupModal({ colorMode, userContext, onClose, onGroupCreated, })
|
|
|
189
189
|
signature: "", // Will be set by signAndSave()
|
|
190
190
|
});
|
|
191
191
|
await (0, peers_sdk_1.Groups)(groupDataContext).signAndSave(newGroup);
|
|
192
|
-
// Auto-install peers-core for the new group
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
.catch((err) => {
|
|
192
|
+
// Auto-install peers-core for the new group (copy from another context that
|
|
193
|
+
// already has it, else fall back to the remote updateUrl / bundle).
|
|
194
|
+
await peers_sdk_1.rpcServerCalls.seedBundledPeersCore(groupId).catch((err) => {
|
|
196
195
|
console.error("Error auto-installing peers-core for group:", err);
|
|
197
196
|
});
|
|
198
197
|
// Notify parent
|
|
@@ -23,14 +23,9 @@ const SetupUser = () => {
|
|
|
23
23
|
// Generate new user credentials
|
|
24
24
|
const keys = (0, peers_sdk_1.newKeys)();
|
|
25
25
|
const _userId = (0, peers_sdk_1.newid)();
|
|
26
|
-
// Call setUserIdAndSecretKey
|
|
26
|
+
// Call setUserIdAndSecretKey. This triggers device init, which installs
|
|
27
|
+
// peers-core into the personal context (S3-first, bundle fallback).
|
|
27
28
|
await peers_sdk_1.rpcServerCalls.setUserIdAndSecretKey(_userId, keys.secretKey);
|
|
28
|
-
// Auto-install peers-core for the new user
|
|
29
|
-
await peers_sdk_1.rpcServerCalls
|
|
30
|
-
.addOrUpdatePackage(peers_sdk_1.peersCorePackageId, { dataContextId: _userId })
|
|
31
|
-
.catch((err) => {
|
|
32
|
-
console.error("Error auto-installing peers-core:", err);
|
|
33
|
-
});
|
|
34
29
|
// Success - reload the app (peers-services registration runs after Welcome modal)
|
|
35
30
|
window.location.reload();
|
|
36
31
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@peers-app/peers-ui",
|
|
3
|
-
"version": "0.19.
|
|
3
|
+
"version": "0.19.12",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/peers-app/peers-ui.git"
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"lint:fix": "biome check --write ."
|
|
29
29
|
},
|
|
30
30
|
"peerDependencies": {
|
|
31
|
-
"@peers-app/peers-sdk": "^0.19.
|
|
31
|
+
"@peers-app/peers-sdk": "^0.19.12",
|
|
32
32
|
"bootstrap": "^5.3.3",
|
|
33
33
|
"react": "^18.0.0",
|
|
34
34
|
"react-dom": "^18.0.0"
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"@babel/preset-env": "^7.24.5",
|
|
40
40
|
"@babel/preset-react": "^7.24.1",
|
|
41
41
|
"@babel/preset-typescript": "^7.27.1",
|
|
42
|
-
"@peers-app/peers-sdk": "0.19.
|
|
42
|
+
"@peers-app/peers-sdk": "0.19.12",
|
|
43
43
|
"@testing-library/dom": "^10.4.0",
|
|
44
44
|
"@testing-library/jest-dom": "^6.6.3",
|
|
45
45
|
"@testing-library/react": "^16.3.0",
|
|
@@ -5,7 +5,6 @@ import {
|
|
|
5
5
|
type IGroup,
|
|
6
6
|
newid,
|
|
7
7
|
newKeys,
|
|
8
|
-
peersCorePackageId,
|
|
9
8
|
rpcServerCalls,
|
|
10
9
|
setUserTrustLevel,
|
|
11
10
|
TrustLevel,
|
|
@@ -293,12 +292,11 @@ function CreateGroupModal({
|
|
|
293
292
|
|
|
294
293
|
await Groups(groupDataContext).signAndSave(newGroup);
|
|
295
294
|
|
|
296
|
-
// Auto-install peers-core for the new group
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
.
|
|
300
|
-
|
|
301
|
-
});
|
|
295
|
+
// Auto-install peers-core for the new group (copy from another context that
|
|
296
|
+
// already has it, else fall back to the remote updateUrl / bundle).
|
|
297
|
+
await rpcServerCalls.seedBundledPeersCore(groupId).catch((err: unknown) => {
|
|
298
|
+
console.error("Error auto-installing peers-core for group:", err);
|
|
299
|
+
});
|
|
302
300
|
|
|
303
301
|
// Notify parent
|
|
304
302
|
onGroupCreated(newGroup.groupId);
|
|
@@ -4,7 +4,6 @@ import {
|
|
|
4
4
|
newid,
|
|
5
5
|
newKeys,
|
|
6
6
|
openMessageWithPublicKey,
|
|
7
|
-
peersCorePackageId,
|
|
8
7
|
rpcServerCalls,
|
|
9
8
|
signMessageWithSecretKey,
|
|
10
9
|
} from "@peers-app/peers-sdk";
|
|
@@ -36,16 +35,10 @@ export const SetupUser = () => {
|
|
|
36
35
|
const keys = newKeys();
|
|
37
36
|
const _userId = newid();
|
|
38
37
|
|
|
39
|
-
// Call setUserIdAndSecretKey
|
|
38
|
+
// Call setUserIdAndSecretKey. This triggers device init, which installs
|
|
39
|
+
// peers-core into the personal context (S3-first, bundle fallback).
|
|
40
40
|
await rpcServerCalls.setUserIdAndSecretKey(_userId, keys.secretKey);
|
|
41
41
|
|
|
42
|
-
// Auto-install peers-core for the new user
|
|
43
|
-
await rpcServerCalls
|
|
44
|
-
.addOrUpdatePackage(peersCorePackageId, { dataContextId: _userId })
|
|
45
|
-
.catch((err: unknown) => {
|
|
46
|
-
console.error("Error auto-installing peers-core:", err);
|
|
47
|
-
});
|
|
48
|
-
|
|
49
42
|
// Success - reload the app (peers-services registration runs after Welcome modal)
|
|
50
43
|
window.location.reload();
|
|
51
44
|
} catch (err) {
|