@dxos/plugin-client 0.8.4-main.422d1c7879 → 0.8.4-main.51f1e5ca51
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/lib/browser/{chunk-WNJRYPGG.mjs → chunk-M37DHX5L.mjs} +1 -1
- package/dist/lib/browser/{chunk-WNJRYPGG.mjs.map → chunk-M37DHX5L.mjs.map} +2 -2
- package/dist/lib/browser/{chunk-M43LJQ5U.mjs → chunk-RPMM5NKJ.mjs} +2 -2
- package/dist/lib/browser/chunk-RPMM5NKJ.mjs.map +7 -0
- package/dist/lib/browser/{chunk-ELAYKIQU.mjs → chunk-VAIJSQYA.mjs} +1 -1
- package/dist/lib/browser/{chunk-ELAYKIQU.mjs.map → chunk-VAIJSQYA.mjs.map} +2 -2
- package/dist/lib/browser/cli/index.mjs +5 -37
- package/dist/lib/browser/cli/index.mjs.map +2 -2
- package/dist/lib/browser/{create-agent-SS5SE35J.mjs → create-agent-JV3EM3TV.mjs} +5 -13
- package/dist/lib/browser/create-agent-JV3EM3TV.mjs.map +7 -0
- package/dist/lib/browser/{create-identity-PBEUEIPN.mjs → create-identity-ZITQKEVZ.mjs} +4 -4
- package/dist/lib/browser/create-identity-ZITQKEVZ.mjs.map +7 -0
- package/dist/lib/browser/{create-passkey-JN6I5WMM.mjs → create-passkey-NCP4XA7C.mjs} +7 -31
- package/dist/lib/browser/create-passkey-NCP4XA7C.mjs.map +7 -0
- package/dist/lib/browser/{create-recovery-code-32I6IWZC.mjs → create-recovery-code-L5LA3GAP.mjs} +6 -14
- package/dist/lib/browser/create-recovery-code-L5LA3GAP.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +5 -75
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/{join-identity-2BP4G2SD.mjs → join-identity-3W6PJLKN.mjs} +4 -4
- package/dist/lib/browser/{join-identity-2BP4G2SD.mjs.map → join-identity-3W6PJLKN.mjs.map} +1 -1
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/operations/index.mjs +3 -3
- package/dist/lib/browser/operations/index.mjs.map +3 -3
- package/dist/lib/browser/{recover-identity-LS6B5INB.mjs → recover-identity-KL6QY4GI.mjs} +4 -4
- package/dist/lib/browser/{recover-identity-LS6B5INB.mjs.map → recover-identity-KL6QY4GI.mjs.map} +1 -1
- package/dist/lib/browser/{redeem-passkey-OCIV6VCK.mjs → redeem-passkey-NDEWSJTM.mjs} +6 -22
- package/dist/lib/browser/redeem-passkey-NDEWSJTM.mjs.map +7 -0
- package/dist/lib/browser/{redeem-token-6BCRGKV6.mjs → redeem-token-YLWAVFXD.mjs} +5 -13
- package/dist/lib/browser/redeem-token-YLWAVFXD.mjs.map +7 -0
- package/dist/lib/browser/{reset-storage-QJLTL7J3.mjs → reset-storage-OBHEGA6Z.mjs} +4 -4
- package/dist/lib/browser/{reset-storage-QJLTL7J3.mjs.map → reset-storage-OBHEGA6Z.mjs.map} +1 -1
- package/dist/lib/browser/{share-identity-YJEBJTPA.mjs → share-identity-FTFHFSZQ.mjs} +4 -4
- package/dist/lib/browser/{share-identity-YJEBJTPA.mjs.map → share-identity-FTFHFSZQ.mjs.map} +1 -1
- package/dist/lib/browser/testing/index.mjs.map +2 -2
- package/dist/lib/browser/translations.mjs +74 -0
- package/dist/lib/browser/translations.mjs.map +7 -0
- package/dist/lib/browser/types/index.mjs +1 -1
- package/dist/lib/node-esm/{chunk-SJ6FDER5.mjs → chunk-G77YYPR6.mjs} +2 -2
- package/dist/lib/node-esm/chunk-G77YYPR6.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-J5RWSQT6.mjs → chunk-OHKM7GJW.mjs} +1 -1
- package/dist/lib/node-esm/{chunk-J5RWSQT6.mjs.map → chunk-OHKM7GJW.mjs.map} +2 -2
- package/dist/lib/node-esm/{chunk-IT5LAIV3.mjs → chunk-UBY7FBQ7.mjs} +1 -1
- package/dist/lib/node-esm/{chunk-IT5LAIV3.mjs.map → chunk-UBY7FBQ7.mjs.map} +2 -2
- package/dist/lib/node-esm/cli/index.mjs +5 -37
- package/dist/lib/node-esm/cli/index.mjs.map +2 -2
- package/dist/lib/node-esm/{create-agent-QGEHMHBL.mjs → create-agent-Y4BPVDV7.mjs} +5 -13
- package/dist/lib/node-esm/create-agent-Y4BPVDV7.mjs.map +7 -0
- package/dist/lib/node-esm/{create-identity-EHRJQOO4.mjs → create-identity-367SQSX6.mjs} +4 -4
- package/dist/lib/node-esm/create-identity-367SQSX6.mjs.map +7 -0
- package/dist/lib/node-esm/{create-passkey-PFBHHBEQ.mjs → create-passkey-WMWK2ETT.mjs} +7 -31
- package/dist/lib/node-esm/create-passkey-WMWK2ETT.mjs.map +7 -0
- package/dist/lib/node-esm/{create-recovery-code-HBAM2A72.mjs → create-recovery-code-VJGE5HJL.mjs} +6 -14
- package/dist/lib/node-esm/create-recovery-code-VJGE5HJL.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +5 -75
- package/dist/lib/node-esm/index.mjs.map +4 -4
- package/dist/lib/node-esm/{join-identity-75JCKQHM.mjs → join-identity-IRIRO2VT.mjs} +4 -4
- package/dist/lib/node-esm/{join-identity-75JCKQHM.mjs.map → join-identity-IRIRO2VT.mjs.map} +1 -1
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/operations/index.mjs +3 -3
- package/dist/lib/node-esm/operations/index.mjs.map +3 -3
- package/dist/lib/node-esm/{recover-identity-AKGNTUJI.mjs → recover-identity-LJCY4BCJ.mjs} +4 -4
- package/dist/lib/node-esm/{recover-identity-AKGNTUJI.mjs.map → recover-identity-LJCY4BCJ.mjs.map} +1 -1
- package/dist/lib/node-esm/{redeem-passkey-FZO3LZ57.mjs → redeem-passkey-PT7QWFJE.mjs} +6 -22
- package/dist/lib/node-esm/redeem-passkey-PT7QWFJE.mjs.map +7 -0
- package/dist/lib/node-esm/{redeem-token-IHHIAIQ2.mjs → redeem-token-BHKHEXJM.mjs} +5 -13
- package/dist/lib/node-esm/redeem-token-BHKHEXJM.mjs.map +7 -0
- package/dist/lib/node-esm/{reset-storage-S5MJITI3.mjs → reset-storage-VPUZJOUV.mjs} +4 -4
- package/dist/lib/node-esm/{reset-storage-S5MJITI3.mjs.map → reset-storage-VPUZJOUV.mjs.map} +1 -1
- package/dist/lib/node-esm/{share-identity-QZLY3VHE.mjs → share-identity-SZ3REIRC.mjs} +4 -4
- package/dist/lib/node-esm/{share-identity-QZLY3VHE.mjs.map → share-identity-SZ3REIRC.mjs.map} +1 -1
- package/dist/lib/node-esm/testing/index.mjs.map +2 -2
- package/dist/lib/node-esm/translations.mjs +75 -0
- package/dist/lib/node-esm/translations.mjs.map +7 -0
- package/dist/lib/node-esm/types/index.mjs +1 -1
- package/dist/types/src/ClientPlugin.d.ts.map +1 -1
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
- package/dist/types/src/capabilities/client.d.ts +1 -1
- package/dist/types/src/capabilities/client.d.ts.map +1 -1
- package/dist/types/src/capabilities/index.d.ts +13 -13
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/migrations.d.ts.map +1 -1
- package/dist/types/src/capabilities/navigation-handler/navigation-handler.d.ts.map +1 -1
- package/dist/types/src/capabilities/node.d.ts +13 -13
- package/dist/types/src/capabilities/node.d.ts.map +1 -1
- package/dist/types/src/capabilities/operation-handler.d.ts +1 -1
- package/dist/types/src/capabilities/operation-handler.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-context.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
- package/dist/types/src/capabilities/schema-defs.d.ts.map +1 -1
- package/dist/types/src/cli/commands/config/index.d.ts +1 -1
- package/dist/types/src/cli/commands/config/view.d.ts +1 -1
- package/dist/types/src/cli/commands/device/util.d.ts.map +1 -1
- package/dist/types/src/cli/commands/halo/create/create.d.ts +2 -2
- package/dist/types/src/cli/commands/halo/credential/list/list.d.ts +2 -2
- package/dist/types/src/cli/commands/halo/join/join.d.ts +1 -1
- package/dist/types/src/cli/commands/halo/util.d.ts.map +1 -1
- package/dist/types/src/cli/commands/profile/create.d.ts +1 -1
- package/dist/types/src/cli/commands/profile/import.d.ts +2 -2
- package/dist/types/src/cli/commands/profile/index.d.ts +6 -6
- package/dist/types/src/cli/commands/profile/reset.d.ts +1 -1
- package/dist/types/src/cli/commands/profile/util.d.ts.map +1 -1
- package/dist/types/src/cli/testing/test-console.d.ts.map +1 -1
- package/dist/types/src/containers/DevicesContainer/DevicesContainer.d.ts.map +1 -1
- package/dist/types/src/containers/DevicesContainer/DevicesContainer.stories.d.ts +165 -165
- package/dist/types/src/containers/DevicesContainer/DevicesContainer.stories.d.ts.map +1 -1
- package/dist/types/src/containers/JoinDialog/JoinDialog.d.ts.map +1 -1
- package/dist/types/src/containers/JoinDialog/JoinDialog.stories.d.ts.map +1 -1
- package/dist/types/src/containers/ProfileContainer/ProfileContainer.stories.d.ts.map +1 -1
- package/dist/types/src/containers/RecoveryCodeDialog/RecoveryCodeDialog.d.ts.map +1 -1
- package/dist/types/src/containers/RecoveryCodeDialog/RecoveryCodeDialog.stories.d.ts.map +1 -1
- package/dist/types/src/containers/RecoveryCodeDialog/index.d.ts.map +1 -1
- package/dist/types/src/containers/RecoveryCredentialsContainer/RecoveryCredentialsContainer.stories.d.ts.map +1 -1
- package/dist/types/src/containers/ResetDialog/ResetDialog.d.ts.map +1 -1
- package/dist/types/src/containers/ResetDialog/ResetDialog.stories.d.ts +1 -1
- package/dist/types/src/containers/ResetDialog/ResetDialog.stories.d.ts.map +1 -1
- package/dist/types/src/containers/ResetDialog/index.d.ts.map +1 -1
- package/dist/types/src/operations/create-agent.d.ts +1 -1
- package/dist/types/src/operations/create-agent.d.ts.map +1 -1
- package/dist/types/src/operations/create-identity.d.ts +1 -1
- package/dist/types/src/operations/create-identity.d.ts.map +1 -1
- package/dist/types/src/operations/create-passkey.d.ts +1 -1
- package/dist/types/src/operations/create-passkey.d.ts.map +1 -1
- package/dist/types/src/operations/create-recovery-code.d.ts +1 -1
- package/dist/types/src/operations/create-recovery-code.d.ts.map +1 -1
- package/dist/types/src/operations/definitions.d.ts +1 -1
- package/dist/types/src/operations/definitions.d.ts.map +1 -1
- package/dist/types/src/operations/index.d.ts +1 -1
- package/dist/types/src/operations/index.d.ts.map +1 -1
- package/dist/types/src/operations/join-identity.d.ts +1 -1
- package/dist/types/src/operations/join-identity.d.ts.map +1 -1
- package/dist/types/src/operations/recover-identity.d.ts +1 -1
- package/dist/types/src/operations/recover-identity.d.ts.map +1 -1
- package/dist/types/src/operations/redeem-passkey.d.ts +1 -1
- package/dist/types/src/operations/redeem-passkey.d.ts.map +1 -1
- package/dist/types/src/operations/redeem-token.d.ts +1 -1
- package/dist/types/src/operations/redeem-token.d.ts.map +1 -1
- package/dist/types/src/operations/reset-storage.d.ts +1 -1
- package/dist/types/src/operations/reset-storage.d.ts.map +1 -1
- package/dist/types/src/operations/share-identity.d.ts +1 -1
- package/dist/types/src/operations/share-identity.d.ts.map +1 -1
- package/dist/types/src/testing/initializeIdentity.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/capabilities.d.ts.map +1 -1
- package/dist/types/src/types/events.d.ts.map +1 -1
- package/dist/types/src/types/schema.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +44 -37
- package/src/ClientPlugin.ts +1 -2
- package/src/capabilities/app-graph-builder.ts +1 -1
- package/src/capabilities/index.ts +1 -1
- package/src/capabilities/navigation-handler/navigation-handler.ts +1 -1
- package/src/capabilities/node.ts +1 -1
- package/src/capabilities/operation-handler.ts +1 -1
- package/src/containers/DevicesContainer/DevicesContainer.stories.tsx +1 -1
- package/src/containers/JoinDialog/JoinDialog.stories.tsx +2 -1
- package/src/containers/ProfileContainer/ProfileContainer.stories.tsx +2 -1
- package/src/containers/RecoveryCodeDialog/RecoveryCodeDialog.stories.tsx +2 -1
- package/src/containers/RecoveryCredentialsContainer/RecoveryCredentialsContainer.stories.tsx +1 -1
- package/src/containers/ResetDialog/ResetDialog.stories.tsx +2 -1
- package/src/operations/create-agent.ts +1 -1
- package/src/operations/create-identity.ts +1 -1
- package/src/operations/create-passkey.ts +1 -1
- package/src/operations/create-recovery-code.ts +1 -1
- package/src/operations/definitions.ts +1 -1
- package/src/operations/index.ts +1 -1
- package/src/operations/join-identity.ts +1 -1
- package/src/operations/recover-identity.ts +1 -1
- package/src/operations/redeem-passkey.ts +1 -1
- package/src/operations/redeem-token.ts +1 -1
- package/src/operations/reset-storage.ts +1 -1
- package/src/operations/share-identity.ts +1 -1
- package/src/translations.ts +2 -3
- package/dist/lib/browser/chunk-M43LJQ5U.mjs.map +0 -7
- package/dist/lib/browser/create-agent-SS5SE35J.mjs.map +0 -7
- package/dist/lib/browser/create-identity-PBEUEIPN.mjs.map +0 -7
- package/dist/lib/browser/create-passkey-JN6I5WMM.mjs.map +0 -7
- package/dist/lib/browser/create-recovery-code-32I6IWZC.mjs.map +0 -7
- package/dist/lib/browser/redeem-passkey-OCIV6VCK.mjs.map +0 -7
- package/dist/lib/browser/redeem-token-6BCRGKV6.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-SJ6FDER5.mjs.map +0 -7
- package/dist/lib/node-esm/create-agent-QGEHMHBL.mjs.map +0 -7
- package/dist/lib/node-esm/create-identity-EHRJQOO4.mjs.map +0 -7
- package/dist/lib/node-esm/create-passkey-PFBHHBEQ.mjs.map +0 -7
- package/dist/lib/node-esm/create-recovery-code-HBAM2A72.mjs.map +0 -7
- package/dist/lib/node-esm/redeem-passkey-FZO3LZ57.mjs.map +0 -7
- package/dist/lib/node-esm/redeem-token-IHHIAIQ2.mjs.map +0 -7
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/operations/create-identity.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport { Capabilities, Capability } from '@dxos/app-framework';\nimport { Operation } from '@dxos/compute';\nimport { runAndForwardErrors } from '@dxos/effect';\nimport { ObservabilityOperation } from '@dxos/plugin-observability/operations';\n\nimport { ClientEvents } from '../types';\nimport { ClientCapabilities } from '../types';\nimport { CreateIdentity } from './definitions';\n\nconst handler: Operation.WithHandler<typeof CreateIdentity> = CreateIdentity.pipe(\n Operation.withHandler(\n Effect.fnUntraced(function* (profile) {\n const manager = yield* Capability.get(Capabilities.PluginManager);\n const client = yield* Capability.get(ClientCapabilities.Client);\n const data = yield* Effect.promise(() => client.halo.createIdentity(profile));\n yield* Effect.promise(() => runAndForwardErrors(manager.activate(ClientEvents.IdentityCreated)));\n yield* Operation.schedule(ObservabilityOperation.SendEvent, { name: 'identity.create' });\n return data;\n }),\n ),\n);\n\nexport default handler;\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;AAIA,YAAYA,YAAY;AAExB,SAASC,cAAcC,kBAAkB;AACzC,SAASC,iBAAiB;AAC1B,SAASC,2BAA2B;AACpC,SAASC,8BAA8B;AAMvC,IAAMC,UAAwDC,eAAeC,KAC3EC,UAAUC,YACDC,kBAAW,WAAWC,SAAO;AAClC,QAAMC,UAAU,OAAOC,WAAWC,IAAIC,aAAaC,aAAa;AAChE,QAAMC,SAAS,OAAOJ,WAAWC,IAAII,mBAAmBC,MAAM;AAC9D,QAAMC,OAAO,OAAcC,eAAQ,MAAMJ,OAAOK,KAAKC,eAAeZ,OAAAA,CAAAA;AACpE,SAAcU,eAAQ,MAAMG,oBAAoBZ,QAAQa,SAASC,aAAaC,eAAe,CAAA,CAAA;AAC7F,SAAOnB,UAAUoB,SAASC,uBAAuBC,WAAW;IAAEC,MAAM;EAAkB,CAAA;AACtF,SAAOX;AACT,CAAA,CAAA,CAAA;AAIJ,IAAA,0BAAef;",
|
|
6
|
+
"names": ["Effect", "Capabilities", "Capability", "Operation", "runAndForwardErrors", "ObservabilityOperation", "handler", "CreateIdentity", "pipe", "Operation", "withHandler", "fnUntraced", "profile", "manager", "Capability", "get", "Capabilities", "PluginManager", "client", "ClientCapabilities", "Client", "data", "promise", "halo", "createIdentity", "runAndForwardErrors", "activate", "ClientEvents", "IdentityCreated", "schedule", "ObservabilityOperation", "SendEvent", "name"]
|
|
7
|
+
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
CreatePasskey
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-RPMM5NKJ.mjs";
|
|
4
4
|
import {
|
|
5
5
|
ClientCapabilities
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-M37DHX5L.mjs";
|
|
7
7
|
import "./chunk-J5LGTIGS.mjs";
|
|
8
8
|
|
|
9
9
|
// src/operations/create-passkey.ts
|
|
@@ -12,21 +12,13 @@ import * as Match from "effect/Match";
|
|
|
12
12
|
import { Capability } from "@dxos/app-framework";
|
|
13
13
|
import { supportsNativePasskeys, createNativePasskey, extractPublicKeyFromAttestation } from "@dxos/app-toolkit";
|
|
14
14
|
import { PublicKey } from "@dxos/client";
|
|
15
|
+
import { Operation } from "@dxos/compute";
|
|
15
16
|
import { invariant } from "@dxos/invariant";
|
|
16
|
-
import { Operation } from "@dxos/operation";
|
|
17
17
|
var __dxlog_file = "/__w/dxos/dxos/packages/plugins/plugin-client/src/operations/create-passkey.ts";
|
|
18
18
|
var handler = CreatePasskey.pipe(Operation.withHandler(Effect.fnUntraced(function* () {
|
|
19
19
|
const client = yield* Capability.get(ClientCapabilities.Client);
|
|
20
20
|
const identity = client.halo.identity.get();
|
|
21
|
-
invariant(identity, "Identity not available", {
|
|
22
|
-
F: __dxlog_file,
|
|
23
|
-
L: 22,
|
|
24
|
-
S: this,
|
|
25
|
-
A: [
|
|
26
|
-
"identity",
|
|
27
|
-
"'Identity not available'"
|
|
28
|
-
]
|
|
29
|
-
});
|
|
21
|
+
invariant(identity, "Identity not available", { "~LogMeta": "~LogMeta", F: __dxlog_file, L: 16, S: this, A: ["identity", "'Identity not available'"] });
|
|
30
22
|
const lookupKey = PublicKey.random();
|
|
31
23
|
const { recoveryKey, algorithm } = yield* Match.value(supportsNativePasskeys()).pipe(Match.when(true, () => Effect.gen(function* () {
|
|
32
24
|
const result = yield* Effect.promise(() => createNativePasskey({
|
|
@@ -67,29 +59,13 @@ var handler = CreatePasskey.pipe(Operation.withHandler(Effect.fnUntraced(functio
|
|
|
67
59
|
}
|
|
68
60
|
}
|
|
69
61
|
}));
|
|
70
|
-
invariant(credential, "Credential not available", {
|
|
71
|
-
F: __dxlog_file,
|
|
72
|
-
L: 65,
|
|
73
|
-
S: this,
|
|
74
|
-
A: [
|
|
75
|
-
"credential",
|
|
76
|
-
"'Credential not available'"
|
|
77
|
-
]
|
|
78
|
-
});
|
|
62
|
+
invariant(credential, "Credential not available", { "~LogMeta": "~LogMeta", F: __dxlog_file, L: 57, S: this, A: ["credential", "'Credential not available'"] });
|
|
79
63
|
return {
|
|
80
64
|
recoveryKey: PublicKey.from(new Uint8Array(credential.response.getPublicKey())),
|
|
81
65
|
algorithm: credential.response.getPublicKeyAlgorithm() === -7 ? "ES256" : "ED25519"
|
|
82
66
|
};
|
|
83
67
|
})));
|
|
84
|
-
invariant(client.services.services.IdentityService, "IdentityService not available", {
|
|
85
|
-
F: __dxlog_file,
|
|
86
|
-
L: 74,
|
|
87
|
-
S: this,
|
|
88
|
-
A: [
|
|
89
|
-
"client.services.services.IdentityService",
|
|
90
|
-
"'IdentityService not available'"
|
|
91
|
-
]
|
|
92
|
-
});
|
|
68
|
+
invariant(client.services.services.IdentityService, "IdentityService not available", { "~LogMeta": "~LogMeta", F: __dxlog_file, L: 63, S: this, A: ["client.services.services.IdentityService", "'IdentityService not available'"] });
|
|
93
69
|
yield* Effect.promise(() => client.services.services.IdentityService.createRecoveryCredential({
|
|
94
70
|
data: {
|
|
95
71
|
recoveryKey,
|
|
@@ -102,4 +78,4 @@ var create_passkey_default = handler;
|
|
|
102
78
|
export {
|
|
103
79
|
create_passkey_default as default
|
|
104
80
|
};
|
|
105
|
-
//# sourceMappingURL=create-passkey-
|
|
81
|
+
//# sourceMappingURL=create-passkey-NCP4XA7C.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/operations/create-passkey.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\nimport * as Match from 'effect/Match';\n\nimport { Capability } from '@dxos/app-framework';\nimport { supportsNativePasskeys, createNativePasskey, extractPublicKeyFromAttestation } from '@dxos/app-toolkit';\nimport { PublicKey } from '@dxos/client';\nimport { Operation } from '@dxos/compute';\nimport { invariant } from '@dxos/invariant';\n\nimport { ClientCapabilities } from '../types';\nimport { CreatePasskey } from './definitions';\n\nconst handler: Operation.WithHandler<typeof CreatePasskey> = CreatePasskey.pipe(\n Operation.withHandler(\n Effect.fnUntraced(function* () {\n const client = yield* Capability.get(ClientCapabilities.Client);\n const identity = client.halo.identity.get();\n invariant(identity, 'Identity not available');\n\n const lookupKey = PublicKey.random();\n\n const { recoveryKey, algorithm } = yield* Match.value(supportsNativePasskeys()).pipe(\n Match.when(true, () =>\n Effect.gen(function* () {\n const result = yield* Effect.promise(() =>\n createNativePasskey({\n username: identity.did,\n userId: lookupKey.asUint8Array(),\n }),\n );\n const { publicKey, algorithm: alg } = extractPublicKeyFromAttestation(result.attestation_object);\n return {\n recoveryKey: PublicKey.from(publicKey),\n algorithm: alg === -7 ? 'ES256' : 'ED25519',\n };\n }),\n ),\n Match.orElse(() =>\n Effect.gen(function* () {\n const credential = yield* Effect.promise(() =>\n navigator.credentials.create({\n publicKey: {\n challenge: new Uint8Array(),\n rp: { id: location.hostname, name: 'Composer' },\n user: {\n id: lookupKey.asUint8Array() as Uint8Array<ArrayBuffer>,\n name: identity.did,\n displayName: identity.profile?.displayName ?? '',\n },\n pubKeyCredParams: [\n { type: 'public-key', alg: -8 },\n { type: 'public-key', alg: -7 },\n ],\n authenticatorSelection: {\n residentKey: 'required',\n requireResidentKey: true,\n },\n },\n }),\n );\n invariant(credential, 'Credential not available');\n return {\n recoveryKey: PublicKey.from(new Uint8Array((credential as any).response.getPublicKey())),\n algorithm: (credential as any).response.getPublicKeyAlgorithm() === -7 ? 'ES256' : 'ED25519',\n };\n }),\n ),\n );\n\n invariant(client.services.services.IdentityService, 'IdentityService not available');\n yield* Effect.promise(() =>\n client.services.services.IdentityService!.createRecoveryCredential({\n data: {\n recoveryKey,\n algorithm,\n lookupKey,\n },\n }),\n );\n }),\n ),\n);\n\nexport default handler;\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;AAIA,YAAYA,YAAY;AACxB,YAAYC,WAAW;AAEvB,SAASC,kBAAkB;AAC3B,SAASC,wBAAwBC,qBAAqBC,uCAAuC;AAC7F,SAASC,iBAAiB;AAC1B,SAASC,iBAAiB;AAC1B,SAASC,iBAAiB;AAK1B,IAAA,eAA6DC;IAIvD,UAAMC,cAAkBC,KAAKD,UAAY,YAAA,kBAAA,aAAA;AACzCE,QAAAA,SAAUF,OAAU,WAAA,IAAA,mBAAA,MAAA;AAEpB,QAAMG,WAAAA,OAAYC,KAAUC,SAAM,IAAA;AAElC,YAAQC,UAAW,0BAAuBC,EAAAA,YAAYC,YAAAA,GAAAA,cAA0BC,GAC9EF,IAAAA,GAAAA,MAAU,GAAC,CAAA,YACTG,0BAAW,EAAA,CAAA;oBACHC,UAAS,OAAOD;uBAElBE,UAAUZ,IAASa,OAAG,YAAA,uBAAA,CAAA,EAAA,KAAA,WAAA,MAAA,MAAA,WAAA,aAAA;mBACtBC,OAAkBC,eAAAA,MAAY,oBAAA;MAChC,UAAA,SAAA;MAEMC,QAAAA,UAAWC,aAAmBC;IACtC,CAAA,CAAA;UACEZ,EAAAA,WAAaF,WAAUe,IAAKH,IAAAA,gCAAAA,OAAAA,kBAAAA;WAC5BC;MACF,aAAA,UAAA,KAAA,SAAA;MAGJV,WAAa,QACXG,KAAU,UAAC;IACT;oBAEIM,MAAW,WAAA,aAAA;uBACTI,OAAeC,eAAAA,MAAAA,UAAAA,YAAAA,OAAAA;iBACX;mBAAMC,IAAAA,WAAiB;YAAEC;UAAiB,IAAA,SAAA;UAC9CC,MAAM;;cAEJD;UACAE,IAAAA,UAAazB,aAAS0B;UACxB,MAAA,SAAA;UACAC,aAAAA,SAAkB,SAAA,eAAA;;0BACR;;YAAsB,MAAA;YAC9B,KAAA;;;YAA8B,MAAA;YAC/B,KAAA;UACDC;;gCAEsB;UACtB,aAAA;UACF,oBAAA;QACF;MAEF1B;IACA,CAAA,CAAA;cACEI,YAAaF,4BAA+ByB,EAAAA,YAAmBC,YAASC,GAAAA,cAAY,GAAA,IAAA,GAAA,MAAA,GAAA,CAAA,cAAA,4BAAA,EAAA,CAAA;WACpFd;MACF,aAAA,UAAA,KAAA,IAAA,WAAA,WAAA,SAAA,aAAA,CAAA,CAAA;MACF,WAAA,WAAA,SAAA,sBAAA,MAAA,KAAA,UAAA;IAIJf;EACA,CAAA,CAAA,CAAOQ;YAEHsB,OAAM,SAAA,SAAA,iBAAA,iCAAA,EAAA,YAAA,YAAA,GAAA,cAAA,GAAA,IAAA,GAAA,MAAA,GAAA,CAAA,4CAAA,iCAAA,EAAA,CAAA;SACJ1B,eAAAA,MAAAA,OAAAA,SAAAA,SAAAA,gBAAAA,yBAAAA;UACAW;MACAd;MACF;MACF;IAEJ;EAIJ,CAAA,CAAA;;;",
|
|
6
|
+
"names": ["Effect", "Match", "Capability", "supportsNativePasskeys", "createNativePasskey", "extractPublicKeyFromAttestation", "PublicKey", "Operation", "invariant", "CreatePasskey", "identity", "halo", "invariant", "lookupKey", "PublicKey", "random", "recoveryKey", "Match", "supportsNativePasskeys", "pipe", "Effect", "result", "username", "did", "userId", "asUint8Array", "publicKey", "algorithm", "extractPublicKeyFromAttestation", "from", "challenge", "Uint8Array", "location", "name", "user", "displayName", "profile", "pubKeyCredParams", "authenticatorSelection", "credential", "response", "getPublicKey", "data"]
|
|
7
|
+
}
|
package/dist/lib/browser/{create-recovery-code-32I6IWZC.mjs → create-recovery-code-L5LA3GAP.mjs}
RENAMED
|
@@ -1,32 +1,24 @@
|
|
|
1
1
|
import {
|
|
2
2
|
RECOVERY_CODE_DIALOG
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-VAIJSQYA.mjs";
|
|
4
4
|
import {
|
|
5
5
|
CreateRecoveryCode
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-RPMM5NKJ.mjs";
|
|
7
7
|
import {
|
|
8
8
|
ClientCapabilities
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-M37DHX5L.mjs";
|
|
10
10
|
import "./chunk-J5LGTIGS.mjs";
|
|
11
11
|
|
|
12
12
|
// src/operations/create-recovery-code.ts
|
|
13
13
|
import * as Effect from "effect/Effect";
|
|
14
14
|
import { Capability } from "@dxos/app-framework";
|
|
15
15
|
import { LayoutOperation } from "@dxos/app-toolkit";
|
|
16
|
+
import { Operation } from "@dxos/compute";
|
|
16
17
|
import { invariant } from "@dxos/invariant";
|
|
17
|
-
import { Operation } from "@dxos/operation";
|
|
18
18
|
var __dxlog_file = "/__w/dxos/dxos/packages/plugins/plugin-client/src/operations/create-recovery-code.ts";
|
|
19
19
|
var handler = CreateRecoveryCode.pipe(Operation.withHandler(Effect.fnUntraced(function* () {
|
|
20
20
|
const client = yield* Capability.get(ClientCapabilities.Client);
|
|
21
|
-
invariant(client.services.services.IdentityService, "IdentityService not available", {
|
|
22
|
-
F: __dxlog_file,
|
|
23
|
-
L: 20,
|
|
24
|
-
S: this,
|
|
25
|
-
A: [
|
|
26
|
-
"client.services.services.IdentityService",
|
|
27
|
-
"'IdentityService not available'"
|
|
28
|
-
]
|
|
29
|
-
});
|
|
21
|
+
invariant(client.services.services.IdentityService, "IdentityService not available", { "~LogMeta": "~LogMeta", F: __dxlog_file, L: 14, S: this, A: ["client.services.services.IdentityService", "'IdentityService not available'"] });
|
|
30
22
|
const { recoveryCode } = yield* Effect.promise(() => client.services.services.IdentityService.createRecoveryCredential({}));
|
|
31
23
|
yield* Operation.invoke(LayoutOperation.UpdateDialog, {
|
|
32
24
|
subject: RECOVERY_CODE_DIALOG,
|
|
@@ -41,4 +33,4 @@ var create_recovery_code_default = handler;
|
|
|
41
33
|
export {
|
|
42
34
|
create_recovery_code_default as default
|
|
43
35
|
};
|
|
44
|
-
//# sourceMappingURL=create-recovery-code-
|
|
36
|
+
//# sourceMappingURL=create-recovery-code-L5LA3GAP.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/operations/create-recovery-code.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport { Capability } from '@dxos/app-framework';\nimport { LayoutOperation } from '@dxos/app-toolkit';\nimport { Operation } from '@dxos/compute';\nimport { invariant } from '@dxos/invariant';\n\nimport { RECOVERY_CODE_DIALOG } from '../constants';\nimport { ClientCapabilities } from '../types';\nimport { CreateRecoveryCode } from './definitions';\n\nconst handler: Operation.WithHandler<typeof CreateRecoveryCode> = CreateRecoveryCode.pipe(\n Operation.withHandler(\n Effect.fnUntraced(function* () {\n const client = yield* Capability.get(ClientCapabilities.Client);\n invariant(client.services.services.IdentityService, 'IdentityService not available');\n const { recoveryCode } = yield* Effect.promise(() =>\n client.services.services.IdentityService!.createRecoveryCredential({}),\n );\n yield* Operation.invoke(LayoutOperation.UpdateDialog, {\n subject: RECOVERY_CODE_DIALOG,\n blockAlign: 'start',\n type: 'alert',\n props: { code: recoveryCode },\n });\n }),\n ),\n);\n\nexport default handler;\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;AAIA,YAAYA,YAAY;AAExB,SAASC,kBAAkB;AAC3B,SAASC,uBAAuB;AAChC,SAASC,iBAAiB;AAC1B,SAASC,iBAAiB;AAM1B,IAAA,eAAkEC;IAI5DC,UAAUC,mBAAgBC,KAASC,UAAAA,YAAiB,kBAAA,aAAA;AACpD,QAAM,SAAEC,OAAc,WAAUC,IAAAA,mBAC9BJ,MAAOC;AAET,YAAOI,OAAUC,SAAOC,SAAAA,iBAA4B,iCAAE,EAAA,YAAA,YAAA,GAAA,cAAA,GAAA,IAAA,GAAA,MAAA,GAAA,CAAA,4CAAA,iCAAA,EAAA,CAAA;QACpDC,EAAAA,aAASC,IAAAA,OAAAA,eAAAA,MAAAA,OAAAA,SAAAA,SAAAA,gBAAAA,yBAAAA,CAAAA,CAAAA,CAAAA;SACTC,UAAY,OAAA,gBAAA,cAAA;IACZC,SAAM;IACNC,YAAO;UAAEC;IAAmB,OAAA;MAC9B,MAAA;IACF;EAIJ,CAAA;;;",
|
|
6
|
+
"names": ["Effect", "Capability", "LayoutOperation", "Operation", "invariant", "CreateRecoveryCode", "invariant", "client", "services", "IdentityService", "recoveryCode", "Effect", "Operation", "invoke", "LayoutOperation", "subject", "RECOVERY_CODE_DIALOG", "blockAlign", "type", "props", "code"]
|
|
7
|
+
}
|
|
@@ -4,80 +4,10 @@ import "./chunk-J5LGTIGS.mjs";
|
|
|
4
4
|
import { ActivationEvent, ActivationEvents, Capability, Plugin } from "@dxos/app-framework";
|
|
5
5
|
import { AppActivationEvents, AppPlugin } from "@dxos/app-toolkit";
|
|
6
6
|
import { AppGraphBuilder, Client, Migrations, NavigationHandler, OperationHandler, ReactContext, ReactSurface, SchemaDefs } from "#capabilities";
|
|
7
|
-
import { meta as meta2 } from "#meta";
|
|
8
|
-
import { ClientEvents } from "#types";
|
|
9
|
-
|
|
10
|
-
// src/translations.ts
|
|
11
|
-
import { translations as shellTranslations } from "@dxos/shell/react";
|
|
12
7
|
import { meta } from "#meta";
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
[meta.id]: {
|
|
17
|
-
"account.label": "User profile",
|
|
18
|
-
"profile.label": "Profile",
|
|
19
|
-
"profile.description": "You can adjust how your user settings here.",
|
|
20
|
-
"devices.label": "Devices",
|
|
21
|
-
"add-device.label": "Add device",
|
|
22
|
-
"devices-verbose.label": "Manage devices",
|
|
23
|
-
"add-device.description": "Authenticating another device is a two-step process. To get started, create a code using the button below.",
|
|
24
|
-
"devices.description": "You can add and remove devices, configure your agent in the cloud, reset this device, or log in as a different identity here.",
|
|
25
|
-
"create-device-invitation.label": "Create code",
|
|
26
|
-
"qr-code.description": "Scan this QR code using the device you want to log in to, or copy the URL and share it with the new device.",
|
|
27
|
-
"security.label": "Security",
|
|
28
|
-
"reset-device.description": "Log out from this device, erasing all the data on this\xA0device.",
|
|
29
|
-
"join-new-identity.description": "Log out from this device, erasing all the data currently on this device, and use a QR code or URL to log\xA0in.",
|
|
30
|
-
"recover-identity.description": "Log out from this device, erasing all the data currently on this device, and use a passkey or recovery code to log\xA0in.",
|
|
31
|
-
"danger-zone.title": "Log out",
|
|
32
|
-
"danger-zone.description": "Because Composer is decentralized, logging out entails erasing all the data on this device. If you have any data on this device that you\u2019d like to keep, you can log in on a separate device using a passkey or complete a peer-to-peer\xA0device invitation above.",
|
|
33
|
-
"display-name.label": "Display name",
|
|
34
|
-
"display-name.description": "Your name as it appears in the app.",
|
|
35
|
-
"display-name-input.placeholder": "Enter a name",
|
|
36
|
-
"icon.label": "Avatar",
|
|
37
|
-
"icon.description": "The emoji used to represent the user.",
|
|
38
|
-
"hue.label": "Color",
|
|
39
|
-
"hue.description": "The color used to represent you in the app, including as your avatar\u2019s background, your cursor as it appears to others, and the messages you send in group threads.",
|
|
40
|
-
"did.label": "DID",
|
|
41
|
-
"did.description": "Your unique ID.",
|
|
42
|
-
"open-user-account.label": "Open user account",
|
|
43
|
-
"manage-credentials-dialog.title": "Manage Account Recovery",
|
|
44
|
-
"credentials-list.label": "Recovery credentials",
|
|
45
|
-
"no-credentials.title": "WARNING: There is currently no way to recover your account.",
|
|
46
|
-
"no-credentials.message": "Create a recovery credential above to secure your\xA0account.",
|
|
47
|
-
"recovery-setup-dialog.title": "Account Security",
|
|
48
|
-
"recovery-setup-dialog.description": "In order to maintain access to your account you need to register a recovery credential. Passkeys are the recommended way to do this, they can be stored in your browser or in a password\xA0manager.",
|
|
49
|
-
"create-passkey.label": "Create Passkey",
|
|
50
|
-
// TODO(wittjosiah): At link to user-focused passkey information.
|
|
51
|
-
// Something like https://www.tomsguide.com/news/what-are-passkeys.
|
|
52
|
-
"create-passkey.description": "A passkey is a secure and easy to use credential that can be used to recover your\xA0account.",
|
|
53
|
-
"create-recovery-code.label": "Create Recovery Code",
|
|
54
|
-
"create-recovery-code.description": "A recovery code is 12 word phrase representing a private\xA0key.",
|
|
55
|
-
"recovery-code-dialog.title": "Recovery Code",
|
|
56
|
-
"recovery-code-dialog.description": "This is your identity recovery code, store it in a safe place. You can use it to recover your identity if you ever lose access to your\xA0devices.",
|
|
57
|
-
"recovery-code-dialog-warning-1.message": "NOTE: This code will not be displayed\xA0again.",
|
|
58
|
-
"recovery-code-dialog-warning-2.message": "It is your private key for recovering DXOS data. Anyone with this key will be able to gain access to your\xA0account.",
|
|
59
|
-
"recovery-code-confirmation.label": "Please confirm you have saved the\xA0code.",
|
|
60
|
-
"continue.label": "Continue",
|
|
61
|
-
"auth-code.message": "Authorization code",
|
|
62
|
-
"auth-other-device-emoji.message": "Authorization icon",
|
|
63
|
-
"cancel.label": "Cancel",
|
|
64
|
-
"join-new-identity.label": "Join an existing identity",
|
|
65
|
-
"qr.label": "QR Code",
|
|
66
|
-
"recover-identity.label": "Use a recovery code",
|
|
67
|
-
"reset-device.label": "Reset storage",
|
|
68
|
-
"reset-dialog.description": "Reset storage",
|
|
69
|
-
"reset-dialog.title": "Reset storage"
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
];
|
|
74
|
-
var translations = [
|
|
75
|
-
...pluginTranslations,
|
|
76
|
-
...shellTranslations
|
|
77
|
-
];
|
|
78
|
-
|
|
79
|
-
// src/ClientPlugin.ts
|
|
80
|
-
var ClientPlugin = Plugin.define(meta2).pipe(AppPlugin.addAppGraphModule({
|
|
8
|
+
import { translations } from "#translations";
|
|
9
|
+
import { ClientEvents } from "#types";
|
|
10
|
+
var ClientPlugin = Plugin.define(meta).pipe(AppPlugin.addAppGraphModule({
|
|
81
11
|
activate: AppGraphBuilder
|
|
82
12
|
}), AppPlugin.addNavigationHandlerModule(({ invitationProp }) => ({
|
|
83
13
|
activate: () => NavigationHandler({
|
|
@@ -128,7 +58,7 @@ var ClientPlugin = Plugin.define(meta2).pipe(AppPlugin.addAppGraphModule({
|
|
|
128
58
|
|
|
129
59
|
// src/meta.ts
|
|
130
60
|
import { trim } from "@dxos/util";
|
|
131
|
-
var
|
|
61
|
+
var meta2 = {
|
|
132
62
|
id: "org.dxos.plugin.client",
|
|
133
63
|
name: "Client",
|
|
134
64
|
description: trim`
|
|
@@ -138,6 +68,6 @@ var meta3 = {
|
|
|
138
68
|
};
|
|
139
69
|
export {
|
|
140
70
|
ClientPlugin,
|
|
141
|
-
|
|
71
|
+
meta2 as meta
|
|
142
72
|
};
|
|
143
73
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../../src/ClientPlugin.ts", "../../../src/
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { ActivationEvent, ActivationEvents, Capability, Plugin } from '@dxos/app-framework';\nimport { AppActivationEvents, AppPlugin } from '@dxos/app-toolkit';\n\nimport {\n AppGraphBuilder,\n Client,\n Migrations,\n NavigationHandler,\n OperationHandler,\n ReactContext,\n ReactSurface,\n SchemaDefs,\n} from '#capabilities';\nimport { meta } from '#meta';\nimport {
|
|
5
|
-
"mappings": ";;;AAIA,SAASA,iBAAiBC,kBAAkBC,YAAYC,cAAc;AACtE,SAASC,qBAAqBC,iBAAiB;AAE/C,SACEC,iBACAC,QACAC,YACAC,mBACAC,kBACAC,cACAC,cACAC,kBACK;AACP,SAASC,
|
|
6
|
-
"names": ["ActivationEvent", "ActivationEvents", "Capability", "Plugin", "AppActivationEvents", "AppPlugin", "AppGraphBuilder", "Client", "Migrations", "NavigationHandler", "OperationHandler", "ReactContext", "ReactSurface", "SchemaDefs", "meta", "
|
|
3
|
+
"sources": ["../../../src/ClientPlugin.ts", "../../../src/meta.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { ActivationEvent, ActivationEvents, Capability, Plugin } from '@dxos/app-framework';\nimport { AppActivationEvents, AppPlugin } from '@dxos/app-toolkit';\n\nimport {\n AppGraphBuilder,\n Client,\n Migrations,\n NavigationHandler,\n OperationHandler,\n ReactContext,\n ReactSurface,\n SchemaDefs,\n} from '#capabilities';\nimport { meta } from '#meta';\nimport { translations } from '#translations';\nimport { ClientEvents } from '#types';\nimport { type ClientPluginOptions } from '#types';\n\nexport const ClientPlugin = Plugin.define<ClientPluginOptions>(meta).pipe(\n AppPlugin.addAppGraphModule({ activate: AppGraphBuilder }),\n AppPlugin.addNavigationHandlerModule(({ invitationProp }) => ({\n activate: () => NavigationHandler({ invitationProp }),\n })),\n AppPlugin.addOperationHandlerModule({ activate: OperationHandler }),\n AppPlugin.addReactContextModule({ activate: ReactContext }),\n AppPlugin.addTranslationsModule({ translations }),\n Plugin.addModule((options) => {\n return {\n id: Capability.getModuleTag(Client),\n activatesOn: ActivationEvent.oneOf(ActivationEvents.Startup, AppActivationEvents.SetupAppGraph),\n firesAfterActivation: [ClientEvents.ClientReady],\n activate: () => Client(options),\n };\n }),\n Plugin.addModule({\n activatesOn: ClientEvents.ClientReady,\n firesBeforeActivation: [AppActivationEvents.SetupSchema],\n activate: SchemaDefs,\n }),\n Plugin.addModule({\n activatesOn: ClientEvents.ClientReady,\n firesBeforeActivation: [ClientEvents.SetupMigration],\n activate: Migrations,\n }),\n Plugin.addModule(\n ({\n shareableLinkOrigin = typeof window !== 'undefined' ? window.location.origin : 'http://localhost',\n invitationPath = '/',\n invitationProp = 'deviceInvitationCode',\n onReset,\n }) => {\n const createInvitationUrl = (invitationCode: string) => {\n const baseUrl = new URL(invitationPath || '/', shareableLinkOrigin);\n baseUrl.searchParams.set(invitationProp, invitationCode);\n return baseUrl.toString();\n };\n\n return {\n id: Capability.getModuleTag(ReactSurface),\n activatesOn: ActivationEvents.SetupReactSurface,\n activate: () => ReactSurface({ createInvitationUrl, onReset }),\n };\n },\n ),\n Plugin.make,\n);\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { type Plugin } from '@dxos/app-framework';\nimport { trim } from '@dxos/util';\n\nexport const meta: Plugin.Meta = {\n id: 'org.dxos.plugin.client',\n name: 'Client',\n description: trim`\n Core client connectivity and peer-to-peer networking infrastructure.\n Manages identity, authentication, and real-time synchronization across devices.\n `,\n};\n"],
|
|
5
|
+
"mappings": ";;;AAIA,SAASA,iBAAiBC,kBAAkBC,YAAYC,cAAc;AACtE,SAASC,qBAAqBC,iBAAiB;AAE/C,SACEC,iBACAC,QACAC,YACAC,mBACAC,kBACAC,cACAC,cACAC,kBACK;AACP,SAASC,YAAY;AACrB,SAASC,oBAAoB;AAC7B,SAASC,oBAAoB;AAGtB,IAAMC,eAAed,OAAOe,OAA4BJ,IAAAA,EAAMK,KACnEd,UAAUe,kBAAkB;EAAEC,UAAUf;AAAgB,CAAA,GACxDD,UAAUiB,2BAA2B,CAAC,EAAEC,eAAc,OAAQ;EAC5DF,UAAU,MAAMZ,kBAAkB;IAAEc;EAAe,CAAA;AACrD,EAAA,GACAlB,UAAUmB,0BAA0B;EAAEH,UAAUX;AAAiB,CAAA,GACjEL,UAAUoB,sBAAsB;EAAEJ,UAAUV;AAAa,CAAA,GACzDN,UAAUqB,sBAAsB;EAAEX;AAAa,CAAA,GAC/CZ,OAAOwB,UAAU,CAACC,YAAAA;AAChB,SAAO;IACLC,IAAI3B,WAAW4B,aAAavB,MAAAA;IAC5BwB,aAAa/B,gBAAgBgC,MAAM/B,iBAAiBgC,SAAS7B,oBAAoB8B,aAAa;IAC9FC,sBAAsB;MAACnB,aAAaoB;;IACpCf,UAAU,MAAMd,OAAOqB,OAAAA;EACzB;AACF,CAAA,GACAzB,OAAOwB,UAAU;EACfI,aAAaf,aAAaoB;EAC1BC,uBAAuB;IAACjC,oBAAoBkC;;EAC5CjB,UAAUR;AACZ,CAAA,GACAV,OAAOwB,UAAU;EACfI,aAAaf,aAAaoB;EAC1BC,uBAAuB;IAACrB,aAAauB;;EACrClB,UAAUb;AACZ,CAAA,GACAL,OAAOwB,UACL,CAAC,EACCa,sBAAsB,OAAOC,WAAW,cAAcA,OAAOC,SAASC,SAAS,oBAC/EC,iBAAiB,KACjBrB,iBAAiB,wBACjBsB,QAAO,MACR;AACC,QAAMC,sBAAsB,CAACC,mBAAAA;AAC3B,UAAMC,UAAU,IAAIC,IAAIL,kBAAkB,KAAKJ,mBAAAA;AAC/CQ,YAAQE,aAAaC,IAAI5B,gBAAgBwB,cAAAA;AACzC,WAAOC,QAAQI,SAAQ;EACzB;AAEA,SAAO;IACLvB,IAAI3B,WAAW4B,aAAalB,YAAAA;IAC5BmB,aAAa9B,iBAAiBoD;IAC9BhC,UAAU,MAAMT,aAAa;MAAEkC;MAAqBD;IAAQ,CAAA;EAC9D;AACF,CAAA,GAEF1C,OAAOmD,IAAI;;;AC/Db,SAASC,YAAY;AAEd,IAAMC,QAAoB;EAC/BC,IAAI;EACJC,MAAM;EACNC,aAAaJ;;;;AAIf;",
|
|
6
|
+
"names": ["ActivationEvent", "ActivationEvents", "Capability", "Plugin", "AppActivationEvents", "AppPlugin", "AppGraphBuilder", "Client", "Migrations", "NavigationHandler", "OperationHandler", "ReactContext", "ReactSurface", "SchemaDefs", "meta", "translations", "ClientEvents", "ClientPlugin", "define", "pipe", "addAppGraphModule", "activate", "addNavigationHandlerModule", "invitationProp", "addOperationHandlerModule", "addReactContextModule", "addTranslationsModule", "addModule", "options", "id", "getModuleTag", "activatesOn", "oneOf", "Startup", "SetupAppGraph", "firesAfterActivation", "ClientReady", "firesBeforeActivation", "SetupSchema", "SetupMigration", "shareableLinkOrigin", "window", "location", "origin", "invitationPath", "onReset", "createInvitationUrl", "invitationCode", "baseUrl", "URL", "searchParams", "set", "toString", "SetupReactSurface", "make", "trim", "meta", "id", "name", "description"]
|
|
7
7
|
}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
JOIN_DIALOG
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-VAIJSQYA.mjs";
|
|
4
4
|
import {
|
|
5
5
|
JoinIdentity
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-RPMM5NKJ.mjs";
|
|
7
7
|
import "./chunk-J5LGTIGS.mjs";
|
|
8
8
|
|
|
9
9
|
// src/operations/join-identity.ts
|
|
10
10
|
import * as Effect from "effect/Effect";
|
|
11
11
|
import { LayoutOperation } from "@dxos/app-toolkit";
|
|
12
|
-
import { Operation } from "@dxos/
|
|
12
|
+
import { Operation } from "@dxos/compute";
|
|
13
13
|
var handler = JoinIdentity.pipe(Operation.withHandler(Effect.fnUntraced(function* (data) {
|
|
14
14
|
yield* Operation.invoke(LayoutOperation.UpdateDialog, {
|
|
15
15
|
subject: JOIN_DIALOG,
|
|
@@ -24,4 +24,4 @@ var join_identity_default = handler;
|
|
|
24
24
|
export {
|
|
25
25
|
join_identity_default as default
|
|
26
26
|
};
|
|
27
|
-
//# sourceMappingURL=join-identity-
|
|
27
|
+
//# sourceMappingURL=join-identity-3W6PJLKN.mjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/operations/join-identity.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport { LayoutOperation } from '@dxos/app-toolkit';\nimport { Operation } from '@dxos/
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport { LayoutOperation } from '@dxos/app-toolkit';\nimport { Operation } from '@dxos/compute';\n\nimport { JOIN_DIALOG } from '../constants';\nimport { JoinIdentity } from './definitions';\n\nconst handler: Operation.WithHandler<typeof JoinIdentity> = JoinIdentity.pipe(\n Operation.withHandler(\n Effect.fnUntraced(function* (data) {\n yield* Operation.invoke(LayoutOperation.UpdateDialog, {\n subject: JOIN_DIALOG,\n blockAlign: 'start',\n props: {\n initialInvitationCode: data.invitationCode,\n initialDisposition: 'accept-halo-invitation',\n },\n });\n }),\n ),\n);\n\nexport default handler;\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;AAIA,YAAYA,YAAY;AAExB,SAASC,uBAAuB;AAChC,SAASC,iBAAiB;AAK1B,IAAMC,UAAsDC,aAAaC,KACvEC,UAAUC,YACDC,kBAAW,WAAWC,MAAI;AAC/B,SAAOH,UAAUI,OAAOC,gBAAgBC,cAAc;IACpDC,SAASC;IACTC,YAAY;IACZC,OAAO;MACLC,uBAAuBR,KAAKS;MAC5BC,oBAAoB;IACtB;EACF,CAAA;AACF,CAAA,CAAA,CAAA;AAIJ,IAAA,wBAAehB;",
|
|
6
6
|
"names": ["Effect", "LayoutOperation", "Operation", "handler", "JoinIdentity", "pipe", "Operation", "withHandler", "fnUntraced", "data", "invoke", "LayoutOperation", "UpdateDialog", "subject", "JOIN_DIALOG", "blockAlign", "props", "initialInvitationCode", "invitationCode", "initialDisposition"]
|
|
7
7
|
}
|