@dxos/plugin-client 0.8.4-main.c85a9c8dae → 0.8.4-main.d05673bc65
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/{DevicesContainer-46MEG3F5.mjs → DevicesContainer-3N7ANEJ7.mjs} +3 -3
- package/dist/lib/browser/{JoinDialog-2RCYK4O5.mjs → JoinDialog-VTTK7NHO.mjs} +3 -3
- package/dist/lib/browser/{ProfileContainer-XYRCOQ5I.mjs → ProfileContainer-XV7OXJC2.mjs} +2 -2
- package/dist/lib/browser/{RecoveryCodeDialog-EX2CLFND.mjs → RecoveryCodeDialog-WO34OZEJ.mjs} +2 -2
- package/dist/lib/browser/{RecoveryCredentialsContainer-RWTEIHOB.mjs → RecoveryCredentialsContainer-G22FSTIX.mjs} +4 -4
- package/dist/lib/browser/{RecoveryCredentialsContainer-RWTEIHOB.mjs.map → RecoveryCredentialsContainer-G22FSTIX.mjs.map} +1 -1
- package/dist/lib/browser/{app-graph-builder-QJWFLYZE.mjs → app-graph-builder-GGJKFY3X.mjs} +4 -4
- package/dist/lib/browser/{app-graph-builder-QJWFLYZE.mjs.map → app-graph-builder-GGJKFY3X.mjs.map} +1 -1
- package/dist/lib/browser/{chunk-DPAXDXMK.mjs → chunk-FVEKZBM7.mjs} +31 -31
- package/dist/lib/browser/{chunk-DPAXDXMK.mjs.map → chunk-FVEKZBM7.mjs.map} +1 -1
- package/dist/lib/browser/{chunk-4XYOOXAH.mjs → chunk-GSVYEYVS.mjs} +4 -4
- package/dist/lib/browser/chunk-HSFDKP5D.mjs +15 -0
- package/dist/lib/browser/{chunk-VYX3ROUX.mjs.map → chunk-HSFDKP5D.mjs.map} +1 -1
- package/dist/lib/browser/{chunk-N2GMSVDQ.mjs → chunk-JHSBBOCI.mjs} +2 -2
- package/dist/lib/browser/{chunk-N2GMSVDQ.mjs.map → chunk-JHSBBOCI.mjs.map} +1 -1
- package/dist/lib/browser/cli/index.mjs +35 -27
- package/dist/lib/browser/cli/index.mjs.map +3 -3
- package/dist/lib/browser/{client-Z25GQ5YC.mjs → client-BXCP3EUE.mjs} +3 -3
- package/dist/lib/browser/index.mjs +7 -7
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/{migrations-HLHRMOW6.mjs → migrations-GKUA2ARL.mjs} +3 -3
- package/dist/lib/browser/{operation-resolver-6QW3BKA5.mjs → operation-resolver-VSWA74RS.mjs} +14 -14
- package/dist/lib/browser/operation-resolver-VSWA74RS.mjs.map +7 -0
- package/dist/lib/browser/{react-context-E7TAJMDK.mjs → react-context-GZ3T5UON.mjs} +3 -3
- package/dist/lib/browser/{react-surface-L5A2LBFE.mjs → react-surface-5VZP34X3.mjs} +9 -9
- package/dist/lib/browser/{schema-defs-5WDZWVEI.mjs → schema-defs-KAG6HQMI.mjs} +3 -3
- package/dist/lib/browser/types/index.mjs +2 -2
- package/dist/lib/node-esm/{DevicesContainer-WQ3DQA45.mjs → DevicesContainer-V7HEUPO7.mjs} +3 -3
- package/dist/lib/node-esm/{JoinDialog-KLTNJY5F.mjs → JoinDialog-XVKW4SLT.mjs} +3 -3
- package/dist/lib/node-esm/{ProfileContainer-XI425QK5.mjs → ProfileContainer-B5LJ6TMU.mjs} +2 -2
- package/dist/lib/node-esm/{RecoveryCodeDialog-AISRNJUM.mjs → RecoveryCodeDialog-YIRGXM7N.mjs} +2 -2
- package/dist/lib/node-esm/{RecoveryCredentialsContainer-3TKQRPQK.mjs → RecoveryCredentialsContainer-MVJEFNXX.mjs} +4 -4
- package/dist/lib/node-esm/{RecoveryCredentialsContainer-3TKQRPQK.mjs.map → RecoveryCredentialsContainer-MVJEFNXX.mjs.map} +1 -1
- package/dist/lib/node-esm/{app-graph-builder-6JD6BZAI.mjs → app-graph-builder-PTNZ46NN.mjs} +4 -4
- package/dist/lib/node-esm/{app-graph-builder-6JD6BZAI.mjs.map → app-graph-builder-PTNZ46NN.mjs.map} +1 -1
- package/dist/lib/node-esm/{chunk-RGULICLJ.mjs → chunk-BOTJSPCT.mjs} +2 -2
- package/dist/lib/node-esm/{chunk-RGULICLJ.mjs.map → chunk-BOTJSPCT.mjs.map} +1 -1
- package/dist/lib/node-esm/{chunk-VEUNEDN5.mjs → chunk-DT2ZNOGU.mjs} +31 -31
- package/dist/lib/node-esm/{chunk-VEUNEDN5.mjs.map → chunk-DT2ZNOGU.mjs.map} +1 -1
- package/dist/lib/node-esm/{chunk-H2CCMM4Z.mjs → chunk-OFJUOKY7.mjs} +4 -4
- package/dist/lib/node-esm/chunk-VLNCZYIC.mjs +16 -0
- package/dist/lib/node-esm/{chunk-HKSNTZF5.mjs.map → chunk-VLNCZYIC.mjs.map} +1 -1
- package/dist/lib/node-esm/cli/index.mjs +35 -27
- package/dist/lib/node-esm/cli/index.mjs.map +3 -3
- package/dist/lib/node-esm/{client-5AIPYSBT.mjs → client-EGZHGRRC.mjs} +3 -3
- package/dist/lib/node-esm/index.mjs +7 -7
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/{migrations-O5KG2GGN.mjs → migrations-4NEKCBGU.mjs} +3 -3
- package/dist/lib/node-esm/{operation-resolver-GSH7AOTZ.mjs → operation-resolver-4GWB3YZG.mjs} +14 -14
- package/dist/lib/node-esm/operation-resolver-4GWB3YZG.mjs.map +7 -0
- package/dist/lib/node-esm/{react-context-OMJSBS23.mjs → react-context-T2ORT5CC.mjs} +3 -3
- package/dist/lib/node-esm/{react-surface-N3BSPMMX.mjs → react-surface-B65OUZYI.mjs} +9 -9
- package/dist/lib/node-esm/{schema-defs-ENOYSDP3.mjs → schema-defs-GXQ47JZN.mjs} +3 -3
- package/dist/lib/node-esm/types/index.mjs +2 -2
- package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts.map +1 -1
- package/dist/types/src/cli/commands/profile/create.d.ts +2 -1
- package/dist/types/src/cli/commands/profile/create.d.ts.map +1 -1
- package/dist/types/src/cli/commands/profile/delete.d.ts +1 -1
- package/dist/types/src/cli/commands/profile/delete.d.ts.map +1 -1
- package/dist/types/src/cli/commands/profile/list.d.ts.map +1 -1
- package/dist/types/src/containers/DevicesContainer/DevicesContainer.stories.d.ts +1 -1
- package/dist/types/src/types/schema.d.ts +30 -30
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +28 -28
- package/src/capabilities/app-graph-builder/app-graph-builder.ts +1 -1
- package/src/capabilities/operation-resolver/operation-resolver.ts +5 -3
- package/src/cli/commands/profile/create.ts +9 -6
- package/src/cli/commands/profile/delete.ts +5 -2
- package/src/cli/commands/profile/list.ts +13 -11
- package/src/constants.ts +3 -3
- package/src/containers/RecoveryCredentialsContainer/RecoveryCredentialsContainer.tsx +1 -1
- package/src/meta.ts +1 -1
- package/src/types/capabilities.ts +3 -3
- package/src/types/events.ts +5 -5
- package/src/types/schema.ts +21 -21
- package/dist/lib/browser/chunk-VYX3ROUX.mjs +0 -15
- package/dist/lib/browser/operation-resolver-6QW3BKA5.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-HKSNTZF5.mjs +0 -16
- package/dist/lib/node-esm/operation-resolver-GSH7AOTZ.mjs.map +0 -7
- /package/dist/lib/browser/{DevicesContainer-46MEG3F5.mjs.map → DevicesContainer-3N7ANEJ7.mjs.map} +0 -0
- /package/dist/lib/browser/{JoinDialog-2RCYK4O5.mjs.map → JoinDialog-VTTK7NHO.mjs.map} +0 -0
- /package/dist/lib/browser/{ProfileContainer-XYRCOQ5I.mjs.map → ProfileContainer-XV7OXJC2.mjs.map} +0 -0
- /package/dist/lib/browser/{RecoveryCodeDialog-EX2CLFND.mjs.map → RecoveryCodeDialog-WO34OZEJ.mjs.map} +0 -0
- /package/dist/lib/browser/{chunk-4XYOOXAH.mjs.map → chunk-GSVYEYVS.mjs.map} +0 -0
- /package/dist/lib/browser/{client-Z25GQ5YC.mjs.map → client-BXCP3EUE.mjs.map} +0 -0
- /package/dist/lib/browser/{migrations-HLHRMOW6.mjs.map → migrations-GKUA2ARL.mjs.map} +0 -0
- /package/dist/lib/browser/{react-context-E7TAJMDK.mjs.map → react-context-GZ3T5UON.mjs.map} +0 -0
- /package/dist/lib/browser/{react-surface-L5A2LBFE.mjs.map → react-surface-5VZP34X3.mjs.map} +0 -0
- /package/dist/lib/browser/{schema-defs-5WDZWVEI.mjs.map → schema-defs-KAG6HQMI.mjs.map} +0 -0
- /package/dist/lib/node-esm/{DevicesContainer-WQ3DQA45.mjs.map → DevicesContainer-V7HEUPO7.mjs.map} +0 -0
- /package/dist/lib/node-esm/{JoinDialog-KLTNJY5F.mjs.map → JoinDialog-XVKW4SLT.mjs.map} +0 -0
- /package/dist/lib/node-esm/{ProfileContainer-XI425QK5.mjs.map → ProfileContainer-B5LJ6TMU.mjs.map} +0 -0
- /package/dist/lib/node-esm/{RecoveryCodeDialog-AISRNJUM.mjs.map → RecoveryCodeDialog-YIRGXM7N.mjs.map} +0 -0
- /package/dist/lib/node-esm/{chunk-H2CCMM4Z.mjs.map → chunk-OFJUOKY7.mjs.map} +0 -0
- /package/dist/lib/node-esm/{client-5AIPYSBT.mjs.map → client-EGZHGRRC.mjs.map} +0 -0
- /package/dist/lib/node-esm/{migrations-O5KG2GGN.mjs.map → migrations-4NEKCBGU.mjs.map} +0 -0
- /package/dist/lib/node-esm/{react-context-OMJSBS23.mjs.map → react-context-T2ORT5CC.mjs.map} +0 -0
- /package/dist/lib/node-esm/{react-surface-N3BSPMMX.mjs.map → react-surface-B65OUZYI.mjs.map} +0 -0
- /package/dist/lib/node-esm/{schema-defs-ENOYSDP3.mjs.map → schema-defs-GXQ47JZN.mjs.map} +0 -0
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
meta
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-BOTJSPCT.mjs";
|
|
5
5
|
|
|
6
6
|
// src/types/capabilities.ts
|
|
7
7
|
import { Capability } from "@dxos/app-framework";
|
|
8
8
|
(function(ClientCapabilities2) {
|
|
9
|
-
ClientCapabilities2.Client = Capability.make(`${meta.id}
|
|
10
|
-
ClientCapabilities2.Schema = Capability.make(`${meta.id}
|
|
11
|
-
ClientCapabilities2.Migration = Capability.make(`${meta.id}
|
|
9
|
+
ClientCapabilities2.Client = Capability.make(`${meta.id}.capability.client`);
|
|
10
|
+
ClientCapabilities2.Schema = Capability.make(`${meta.id}.capability.schema`);
|
|
11
|
+
ClientCapabilities2.Migration = Capability.make(`${meta.id}.capability.migration`);
|
|
12
12
|
})(ClientCapabilities || (ClientCapabilities = {}));
|
|
13
13
|
var ClientCapabilities;
|
|
14
14
|
|
|
15
15
|
// src/types/events.ts
|
|
16
16
|
import { ActivationEvent } from "@dxos/app-framework";
|
|
17
17
|
(function(ClientEvents2) {
|
|
18
|
-
ClientEvents2.ClientReady = ActivationEvent.make(`${meta.id}
|
|
19
|
-
ClientEvents2.SetupSchema = ActivationEvent.make(`${meta.id}
|
|
20
|
-
ClientEvents2.SetupMigration = ActivationEvent.make(`${meta.id}
|
|
21
|
-
ClientEvents2.IdentityCreated = ActivationEvent.make(`${meta.id}
|
|
22
|
-
ClientEvents2.SpacesReady = ActivationEvent.make(`${meta.id}
|
|
18
|
+
ClientEvents2.ClientReady = ActivationEvent.make(`${meta.id}.event.client-ready`);
|
|
19
|
+
ClientEvents2.SetupSchema = ActivationEvent.make(`${meta.id}.event.setup-schema`);
|
|
20
|
+
ClientEvents2.SetupMigration = ActivationEvent.make(`${meta.id}.event.setup-migration`);
|
|
21
|
+
ClientEvents2.IdentityCreated = ActivationEvent.make(`${meta.id}.event.identity-created`);
|
|
22
|
+
ClientEvents2.SpacesReady = ActivationEvent.make(`${meta.id}.event.spaces-ready`);
|
|
23
23
|
})(ClientEvents || (ClientEvents = {}));
|
|
24
24
|
var ClientEvents;
|
|
25
25
|
|
|
@@ -49,13 +49,13 @@ var IdentitySchema = Schema.Struct({
|
|
|
49
49
|
value: Schema.Any
|
|
50
50
|
}))
|
|
51
51
|
});
|
|
52
|
-
class CreateIdentity extends Schema.TaggedClass()(`${meta.id}
|
|
52
|
+
class CreateIdentity extends Schema.TaggedClass()(`${meta.id}.action.create-identity`, {
|
|
53
53
|
input: ProfileSchema,
|
|
54
54
|
output: IdentitySchema
|
|
55
55
|
}) {
|
|
56
56
|
}
|
|
57
57
|
ClientAction2.CreateIdentity = CreateIdentity;
|
|
58
|
-
class JoinIdentity extends Schema.TaggedClass()(`${meta.id}
|
|
58
|
+
class JoinIdentity extends Schema.TaggedClass()(`${meta.id}.action.join-identity`, {
|
|
59
59
|
input: Schema.Struct({
|
|
60
60
|
invitationCode: Schema.optional(Schema.String)
|
|
61
61
|
}),
|
|
@@ -63,19 +63,19 @@ var IdentitySchema = Schema.Struct({
|
|
|
63
63
|
}) {
|
|
64
64
|
}
|
|
65
65
|
ClientAction2.JoinIdentity = JoinIdentity;
|
|
66
|
-
class ShareIdentity extends Schema.TaggedClass()(`${meta.id}
|
|
66
|
+
class ShareIdentity extends Schema.TaggedClass()(`${meta.id}.action.share-identity`, {
|
|
67
67
|
input: Schema.Void,
|
|
68
68
|
output: Schema.Void
|
|
69
69
|
}) {
|
|
70
70
|
}
|
|
71
71
|
ClientAction2.ShareIdentity = ShareIdentity;
|
|
72
|
-
class RecoverIdentity extends Schema.TaggedClass()(`${meta.id}
|
|
72
|
+
class RecoverIdentity extends Schema.TaggedClass()(`${meta.id}.action.recover-identity`, {
|
|
73
73
|
input: Schema.Void,
|
|
74
74
|
output: Schema.Void
|
|
75
75
|
}) {
|
|
76
76
|
}
|
|
77
77
|
ClientAction2.RecoverIdentity = RecoverIdentity;
|
|
78
|
-
class ResetStorage extends Schema.TaggedClass()(`${meta.id}
|
|
78
|
+
class ResetStorage extends Schema.TaggedClass()(`${meta.id}.action.reset-storage`, {
|
|
79
79
|
input: Schema.Struct({
|
|
80
80
|
mode: Schema.optional(Schema.String)
|
|
81
81
|
}),
|
|
@@ -83,31 +83,31 @@ var IdentitySchema = Schema.Struct({
|
|
|
83
83
|
}) {
|
|
84
84
|
}
|
|
85
85
|
ClientAction2.ResetStorage = ResetStorage;
|
|
86
|
-
class CreateAgent extends Schema.TaggedClass()(`${meta.id}
|
|
86
|
+
class CreateAgent extends Schema.TaggedClass()(`${meta.id}.action.create-agent`, {
|
|
87
87
|
input: Schema.Void,
|
|
88
88
|
output: Schema.Void
|
|
89
89
|
}) {
|
|
90
90
|
}
|
|
91
91
|
ClientAction2.CreateAgent = CreateAgent;
|
|
92
|
-
class CreateRecoveryCode extends Schema.TaggedClass()(`${meta.id}
|
|
92
|
+
class CreateRecoveryCode extends Schema.TaggedClass()(`${meta.id}.action.create-recovery-code`, {
|
|
93
93
|
input: Schema.Void,
|
|
94
94
|
output: Schema.Void
|
|
95
95
|
}) {
|
|
96
96
|
}
|
|
97
97
|
ClientAction2.CreateRecoveryCode = CreateRecoveryCode;
|
|
98
|
-
class CreatePasskey extends Schema.TaggedClass()(`${meta.id}
|
|
98
|
+
class CreatePasskey extends Schema.TaggedClass()(`${meta.id}.action.create-passkey`, {
|
|
99
99
|
input: Schema.Void,
|
|
100
100
|
output: Schema.Void
|
|
101
101
|
}) {
|
|
102
102
|
}
|
|
103
103
|
ClientAction2.CreatePasskey = CreatePasskey;
|
|
104
|
-
class RedeemPasskey extends Schema.TaggedClass()(`${meta.id}
|
|
104
|
+
class RedeemPasskey extends Schema.TaggedClass()(`${meta.id}.action.redeem-passkey`, {
|
|
105
105
|
input: Schema.Void,
|
|
106
106
|
output: Schema.Void
|
|
107
107
|
}) {
|
|
108
108
|
}
|
|
109
109
|
ClientAction2.RedeemPasskey = RedeemPasskey;
|
|
110
|
-
class RedeemToken extends Schema.TaggedClass()(`${meta.id}
|
|
110
|
+
class RedeemToken extends Schema.TaggedClass()(`${meta.id}.action.redeem-token`, {
|
|
111
111
|
input: Schema.Struct({
|
|
112
112
|
token: Schema.String
|
|
113
113
|
}),
|
|
@@ -116,7 +116,7 @@ var IdentitySchema = Schema.Struct({
|
|
|
116
116
|
}
|
|
117
117
|
ClientAction2.RedeemToken = RedeemToken;
|
|
118
118
|
})(ClientAction || (ClientAction = {}));
|
|
119
|
-
var CLIENT_OPERATION = `${meta.id}
|
|
119
|
+
var CLIENT_OPERATION = `${meta.id}.operation`;
|
|
120
120
|
(function(ClientOperation2) {
|
|
121
121
|
const ProfileSchema = Schema.Struct({
|
|
122
122
|
displayName: Schema.optional(Schema.String),
|
|
@@ -128,7 +128,7 @@ var CLIENT_OPERATION = `${meta.id}/operation`;
|
|
|
128
128
|
});
|
|
129
129
|
ClientOperation2.CreateIdentity = Operation.make({
|
|
130
130
|
meta: {
|
|
131
|
-
key: `${CLIENT_OPERATION}
|
|
131
|
+
key: `${CLIENT_OPERATION}.create-identity`,
|
|
132
132
|
name: "Create Identity"
|
|
133
133
|
},
|
|
134
134
|
services: [
|
|
@@ -141,7 +141,7 @@ var CLIENT_OPERATION = `${meta.id}/operation`;
|
|
|
141
141
|
});
|
|
142
142
|
ClientOperation2.JoinIdentity = Operation.make({
|
|
143
143
|
meta: {
|
|
144
|
-
key: `${CLIENT_OPERATION}
|
|
144
|
+
key: `${CLIENT_OPERATION}.join-identity`,
|
|
145
145
|
name: "Join Identity"
|
|
146
146
|
},
|
|
147
147
|
services: [
|
|
@@ -156,7 +156,7 @@ var CLIENT_OPERATION = `${meta.id}/operation`;
|
|
|
156
156
|
});
|
|
157
157
|
ClientOperation2.ShareIdentity = Operation.make({
|
|
158
158
|
meta: {
|
|
159
|
-
key: `${CLIENT_OPERATION}
|
|
159
|
+
key: `${CLIENT_OPERATION}.share-identity`,
|
|
160
160
|
name: "Share Identity"
|
|
161
161
|
},
|
|
162
162
|
services: [
|
|
@@ -169,7 +169,7 @@ var CLIENT_OPERATION = `${meta.id}/operation`;
|
|
|
169
169
|
});
|
|
170
170
|
ClientOperation2.RecoverIdentity = Operation.make({
|
|
171
171
|
meta: {
|
|
172
|
-
key: `${CLIENT_OPERATION}
|
|
172
|
+
key: `${CLIENT_OPERATION}.recover-identity`,
|
|
173
173
|
name: "Recover Identity"
|
|
174
174
|
},
|
|
175
175
|
services: [
|
|
@@ -182,7 +182,7 @@ var CLIENT_OPERATION = `${meta.id}/operation`;
|
|
|
182
182
|
});
|
|
183
183
|
ClientOperation2.ResetStorage = Operation.make({
|
|
184
184
|
meta: {
|
|
185
|
-
key: `${CLIENT_OPERATION}
|
|
185
|
+
key: `${CLIENT_OPERATION}.reset-storage`,
|
|
186
186
|
name: "Reset Storage"
|
|
187
187
|
},
|
|
188
188
|
services: [
|
|
@@ -197,7 +197,7 @@ var CLIENT_OPERATION = `${meta.id}/operation`;
|
|
|
197
197
|
});
|
|
198
198
|
ClientOperation2.CreateAgent = Operation.make({
|
|
199
199
|
meta: {
|
|
200
|
-
key: `${CLIENT_OPERATION}
|
|
200
|
+
key: `${CLIENT_OPERATION}.create-agent`,
|
|
201
201
|
name: "Create Agent"
|
|
202
202
|
},
|
|
203
203
|
services: [
|
|
@@ -210,7 +210,7 @@ var CLIENT_OPERATION = `${meta.id}/operation`;
|
|
|
210
210
|
});
|
|
211
211
|
ClientOperation2.CreateRecoveryCode = Operation.make({
|
|
212
212
|
meta: {
|
|
213
|
-
key: `${CLIENT_OPERATION}
|
|
213
|
+
key: `${CLIENT_OPERATION}.create-recovery-code`,
|
|
214
214
|
name: "Create Recovery Code"
|
|
215
215
|
},
|
|
216
216
|
services: [
|
|
@@ -223,7 +223,7 @@ var CLIENT_OPERATION = `${meta.id}/operation`;
|
|
|
223
223
|
});
|
|
224
224
|
ClientOperation2.CreatePasskey = Operation.make({
|
|
225
225
|
meta: {
|
|
226
|
-
key: `${CLIENT_OPERATION}
|
|
226
|
+
key: `${CLIENT_OPERATION}.create-passkey`,
|
|
227
227
|
name: "Create Passkey"
|
|
228
228
|
},
|
|
229
229
|
services: [
|
|
@@ -236,7 +236,7 @@ var CLIENT_OPERATION = `${meta.id}/operation`;
|
|
|
236
236
|
});
|
|
237
237
|
ClientOperation2.RedeemPasskey = Operation.make({
|
|
238
238
|
meta: {
|
|
239
|
-
key: `${CLIENT_OPERATION}
|
|
239
|
+
key: `${CLIENT_OPERATION}.redeem-passkey`,
|
|
240
240
|
name: "Redeem Passkey"
|
|
241
241
|
},
|
|
242
242
|
services: [
|
|
@@ -249,7 +249,7 @@ var CLIENT_OPERATION = `${meta.id}/operation`;
|
|
|
249
249
|
});
|
|
250
250
|
ClientOperation2.RedeemToken = Operation.make({
|
|
251
251
|
meta: {
|
|
252
|
-
key: `${CLIENT_OPERATION}
|
|
252
|
+
key: `${CLIENT_OPERATION}.redeem-token`,
|
|
253
253
|
name: "Redeem Token"
|
|
254
254
|
},
|
|
255
255
|
services: [
|
|
@@ -281,4 +281,4 @@ export {
|
|
|
281
281
|
ClientOperation,
|
|
282
282
|
Account
|
|
283
283
|
};
|
|
284
|
-
//# sourceMappingURL=chunk-
|
|
284
|
+
//# sourceMappingURL=chunk-DT2ZNOGU.mjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/types/capabilities.ts", "../../../src/types/events.ts", "../../../src/types/schema.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { Capability } from '@dxos/app-framework';\nimport { type Client } from '@dxos/client';\nimport { type ObjectMigration } from '@dxos/client/echo';\nimport { type Type } from '@dxos/echo';\n\nimport { meta } from '../meta';\n\nexport namespace ClientCapabilities {\n export const Client = Capability.make<Client>(`${meta.id}
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { Capability } from '@dxos/app-framework';\nimport { type Client } from '@dxos/client';\nimport { type ObjectMigration } from '@dxos/client/echo';\nimport { type Type } from '@dxos/echo';\n\nimport { meta } from '../meta';\n\nexport namespace ClientCapabilities {\n export const Client = Capability.make<Client>(`${meta.id}.capability.client`);\n export const Schema = Capability.make<Type.AnyEntity[]>(`${meta.id}.capability.schema`);\n export const Migration = Capability.make<ObjectMigration[]>(`${meta.id}.capability.migration`);\n}\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { ActivationEvent } from '@dxos/app-framework';\n\nimport { meta } from '../meta';\n\nexport namespace ClientEvents {\n export const ClientReady = ActivationEvent.make(`${meta.id}.event.client-ready`);\n export const SetupSchema = ActivationEvent.make(`${meta.id}.event.setup-schema`);\n export const SetupMigration = ActivationEvent.make(`${meta.id}.event.setup-migration`);\n export const IdentityCreated = ActivationEvent.make(`${meta.id}.event.identity-created`);\n export const SpacesReady = ActivationEvent.make(`${meta.id}.event.spaces-ready`);\n}\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport type * as Effect from 'effect/Effect';\nimport * as Schema from 'effect/Schema';\n\nimport { Capability } from '@dxos/app-framework';\nimport { type Client, type ClientOptions, PublicKey } from '@dxos/client';\nimport { Operation } from '@dxos/operation';\n\nimport { meta } from '../meta';\n\n// TODO(wittjosiah): Factor out. Generate?\nconst IdentitySchema = Schema.Struct({\n identityKey: Schema.instanceOf(PublicKey),\n spaceKey: Schema.optional(Schema.instanceOf(PublicKey)),\n profile: Schema.optional(\n Schema.Struct({\n displayName: Schema.optional(Schema.String),\n avatarCid: Schema.optional(Schema.String),\n data: Schema.optional(Schema.Record({ key: Schema.String, value: Schema.Any })),\n }),\n ),\n});\n\nexport namespace ClientAction {\n const ProfileSchema = Schema.Struct({\n displayName: Schema.optional(Schema.String),\n avatarCid: Schema.optional(Schema.String),\n data: Schema.optional(Schema.Record({ key: Schema.String, value: Schema.Any })),\n });\n\n export class CreateIdentity extends Schema.TaggedClass<CreateIdentity>()(`${meta.id}.action.create-identity`, {\n input: ProfileSchema,\n output: IdentitySchema,\n }) {}\n\n export class JoinIdentity extends Schema.TaggedClass<JoinIdentity>()(`${meta.id}.action.join-identity`, {\n input: Schema.Struct({\n invitationCode: Schema.optional(Schema.String),\n }),\n output: Schema.Void,\n }) {}\n\n export class ShareIdentity extends Schema.TaggedClass<ShareIdentity>()(`${meta.id}.action.share-identity`, {\n input: Schema.Void,\n output: Schema.Void,\n }) {}\n\n export class RecoverIdentity extends Schema.TaggedClass<RecoverIdentity>()(`${meta.id}.action.recover-identity`, {\n input: Schema.Void,\n output: Schema.Void,\n }) {}\n\n export class ResetStorage extends Schema.TaggedClass<ResetStorage>()(`${meta.id}.action.reset-storage`, {\n input: Schema.Struct({\n mode: Schema.optional(Schema.String),\n }),\n output: Schema.Void,\n }) {}\n\n export class CreateAgent extends Schema.TaggedClass<CreateAgent>()(`${meta.id}.action.create-agent`, {\n input: Schema.Void,\n output: Schema.Void,\n }) {}\n\n export class CreateRecoveryCode extends Schema.TaggedClass<CreateRecoveryCode>()(\n `${meta.id}.action.create-recovery-code`,\n {\n input: Schema.Void,\n output: Schema.Void,\n },\n ) {}\n\n export class CreatePasskey extends Schema.TaggedClass<CreatePasskey>()(`${meta.id}.action.create-passkey`, {\n input: Schema.Void,\n output: Schema.Void,\n }) {}\n\n export class RedeemPasskey extends Schema.TaggedClass<RedeemPasskey>()(`${meta.id}.action.redeem-passkey`, {\n input: Schema.Void,\n output: Schema.Void,\n }) {}\n\n export class RedeemToken extends Schema.TaggedClass<RedeemToken>()(`${meta.id}.action.redeem-token`, {\n input: Schema.Struct({\n token: Schema.String,\n }),\n output: Schema.Void,\n }) {}\n}\n\nconst CLIENT_OPERATION = `${meta.id}.operation`;\n\n/**\n * Operations for the Client plugin.\n */\nexport namespace ClientOperation {\n const ProfileSchema = Schema.Struct({\n displayName: Schema.optional(Schema.String),\n avatarCid: Schema.optional(Schema.String),\n data: Schema.optional(Schema.Record({ key: Schema.String, value: Schema.Any })),\n });\n\n export const CreateIdentity = Operation.make({\n meta: { key: `${CLIENT_OPERATION}.create-identity`, name: 'Create Identity' },\n services: [Capability.Service],\n schema: {\n input: ProfileSchema,\n output: IdentitySchema,\n },\n });\n\n export const JoinIdentity = Operation.make({\n meta: { key: `${CLIENT_OPERATION}.join-identity`, name: 'Join Identity' },\n services: [Capability.Service],\n schema: {\n input: Schema.Struct({\n invitationCode: Schema.optional(Schema.String),\n }),\n output: Schema.Void,\n },\n });\n\n export const ShareIdentity = Operation.make({\n meta: { key: `${CLIENT_OPERATION}.share-identity`, name: 'Share Identity' },\n services: [Capability.Service],\n schema: {\n input: Schema.Void,\n output: Schema.Void,\n },\n });\n\n export const RecoverIdentity = Operation.make({\n meta: { key: `${CLIENT_OPERATION}.recover-identity`, name: 'Recover Identity' },\n services: [Capability.Service],\n schema: {\n input: Schema.Void,\n output: Schema.Void,\n },\n });\n\n export const ResetStorage = Operation.make({\n meta: { key: `${CLIENT_OPERATION}.reset-storage`, name: 'Reset Storage' },\n services: [Capability.Service],\n schema: {\n input: Schema.Struct({\n mode: Schema.optional(Schema.String),\n }),\n output: Schema.Void,\n },\n });\n\n export const CreateAgent = Operation.make({\n meta: { key: `${CLIENT_OPERATION}.create-agent`, name: 'Create Agent' },\n services: [Capability.Service],\n schema: {\n input: Schema.Void,\n output: Schema.Void,\n },\n });\n\n export const CreateRecoveryCode = Operation.make({\n meta: { key: `${CLIENT_OPERATION}.create-recovery-code`, name: 'Create Recovery Code' },\n services: [Capability.Service],\n schema: {\n input: Schema.Void,\n output: Schema.Void,\n },\n });\n\n export const CreatePasskey = Operation.make({\n meta: { key: `${CLIENT_OPERATION}.create-passkey`, name: 'Create Passkey' },\n services: [Capability.Service],\n schema: {\n input: Schema.Void,\n output: Schema.Void,\n },\n });\n\n export const RedeemPasskey = Operation.make({\n meta: { key: `${CLIENT_OPERATION}.redeem-passkey`, name: 'Redeem Passkey' },\n services: [Capability.Service],\n schema: {\n input: Schema.Void,\n output: Schema.Void,\n },\n });\n\n export const RedeemToken = Operation.make({\n meta: { key: `${CLIENT_OPERATION}.redeem-token`, name: 'Redeem Token' },\n services: [Capability.Service],\n schema: {\n input: Schema.Struct({\n token: Schema.String,\n }),\n output: Schema.Void,\n },\n });\n}\n\nexport type ClientPluginOptions = ClientOptions & {\n /**\n * Base origin for the invitation link.\n */\n shareableLinkOrigin?: string;\n\n /**\n * Path for the invitation link.\n */\n invitationPath?: string;\n\n /**\n * Query parameter for the invitation code.\n */\n invitationProp?: string;\n\n /**\n * Run after the client has been initialized.\n * Plugin context is provided so capabilities are accessible.\n */\n onClientInitialized?: (params: { client: Client }) => Effect.Effect<void, Error | never, Capability.Service | never>;\n\n /**\n * Called when spaces are ready.\n * Plugin context is provided so capabilities are accessible.\n */\n onSpacesReady?: (params: { client: Client }) => Effect.Effect<void, Error | never, Capability.Service | never>;\n\n /**\n * Called when the client is reset.\n * Plugin context is provided so capabilities are accessible.\n */\n onReset?: (params: { target?: string }) => Effect.Effect<void, Error | never, Capability.Service | never>;\n};\n\nexport namespace Account {\n // TODO(wittjosiah): Cannot use slashes in ids until we have a router which decouples ids from url paths.\n const _id = 'dxos.org.plugin.client.account';\n // TODO(wittjosiah): This is a hack to prevent the previous deck from being set for pinned items.\n // Ideally this should be worked into the data model in a generic way.\n export const id = `!${_id}`;\n\n export const Profile = `${_id}.profile`;\n export const Devices = `${_id}.devices`;\n export const Security = `${_id}.security`;\n}\n"],
|
|
5
5
|
"mappings": ";;;;;;AAIA,SAASA,kBAAkB;UAOVC,qBAAAA;sBACFC,SAASC,WAAWC,KAAa,GAAGC,KAAKC,EAAE,oBAAoB;sBAC/DC,SAASJ,WAAWC,KAAuB,GAAGC,KAAKC,EAAE,oBAAoB;sBACzEE,YAAYL,WAAWC,KAAwB,GAAGC,KAAKC,EAAE,uBAAuB;AAC/F,GAJiBL,uBAAAA,qBAAAA,CAAAA,EAAAA;;;;ACPjB,SAASQ,uBAAuB;UAIfC,eAAAA;gBACFC,cAAcC,gBAAgBC,KAAK,GAAGC,KAAKC,EAAE,qBAAqB;gBAClEC,cAAcJ,gBAAgBC,KAAK,GAAGC,KAAKC,EAAE,qBAAqB;gBAClEE,iBAAiBL,gBAAgBC,KAAK,GAAGC,KAAKC,EAAE,wBAAwB;gBACxEG,kBAAkBN,gBAAgBC,KAAK,GAAGC,KAAKC,EAAE,yBAAyB;gBAC1EI,cAAcP,gBAAgBC,KA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O,UAAUC,KAAK;IAC/CpB,MAAM;MAAEP,KAAK,GAAGwB,gBAAAA;MAAyCI,MAAM;IAAuB;IACtFC,UAAU;MAACC,YAAWC;;IACtBC,QAAQ;MACNvB,OAAcI;MACdH,QAAeG;IACjB;EACF,CAAA;mBAEaO,gBAAgBM,UAAUC,KAAK;IAC1CpB,MAAM;MAAEP,KAAK,GAAGwB,gBAAAA;MAAmCI,MAAM;IAAiB;IAC1EC,UAAU;MAACC,YAAWC;;IACtBC,QAAQ;MACNvB,OAAcI;MACdH,QAAeG;IACjB;EACF,CAAA;mBAEaQ,gBAAgBK,UAAUC,KAAK;IAC1CpB,MAAM;MAAEP,KAAK,GAAGwB,gBAAAA;MAAmCI,MAAM;IAAiB;IAC1EC,UAAU;MAACC,YAAWC;;IACtBC,QAAQ;MACNvB,OAAcI;MACdH,QAAeG;IACjB;EACF,CAAA;mBAEaS,cAAcI,UAAUC,KAAK;IACxCpB,MAAM;MAAEP,KAAK,GAAGwB,gBAAAA;MAAiCI,MAAM;IAAe;IACtEC,UAAU;MAACC,YAAWC;;IACtBC,QAAQ;MACNvB,OAAcrB,cAAO;QACnBmC,OAAc3B;MAChB,CAAA;MACAc,QAAeG;IACjB;EACF,CAAA;AACF,GAtGiBY,oBAAAA,kBAAAA,CAAAA,EAAAA;UA2IAQ,UAAAA;AAEf,QAAMC,MAAM;WAGC1B,KAAK,IAAI0B,GAAAA;WAETC,UAAU,GAAGD,GAAAA;WACbE,UAAU,GAAGF,GAAAA;WACbG,WAAW,GAAGH,GAAAA;AAC7B,GAViBD,YAAAA,UAAAA,CAAAA,EAAAA;;;;",
|
|
6
6
|
"names": ["Capability", "ClientCapabilities", "Client", "Capability", "make", "meta", "id", "Schema", "Migration", "ActivationEvent", "ClientEvents", "ClientReady", "ActivationEvent", "make", "meta", "id", "SetupSchema", "SetupMigration", "IdentityCreated", "SpacesReady", "Schema", "Capability", "PublicKey", "Operation", "IdentitySchema", "Struct", "identityKey", "instanceOf", "PublicKey", "spaceKey", "optional", "profile", "displayName", "String", "avatarCid", "data", "Record", "key", "value", "Any", "ClientAction", "ProfileSchema", "CreateIdentity", "TaggedClass", "meta", "id", "input", "output", "JoinIdentity", "invitationCode", "Void", "ShareIdentity", "RecoverIdentity", "ResetStorage", "mode", "CreateAgent", "CreateRecoveryCode", "CreatePasskey", "RedeemPasskey", "RedeemToken", "token", "CLIENT_OPERATION", "ClientOperation", "Operation", "make", "name", "services", "Capability", "Service", "schema", "Account", "_id", "Profile", "Devices", "Security"]
|
|
7
7
|
}
|
|
@@ -2,19 +2,19 @@ import { createRequire } from 'node:module';const require = createRequire(import
|
|
|
2
2
|
|
|
3
3
|
// src/capabilities/client/index.ts
|
|
4
4
|
import { Capability } from "@dxos/app-framework";
|
|
5
|
-
var Client = Capability.lazy("Client", () => import("./client-
|
|
5
|
+
var Client = Capability.lazy("Client", () => import("./client-EGZHGRRC.mjs"));
|
|
6
6
|
|
|
7
7
|
// src/capabilities/operation-resolver/index.ts
|
|
8
8
|
import { Capability as Capability2 } from "@dxos/app-framework";
|
|
9
|
-
var OperationResolver = Capability2.lazy("OperationResolver", () => import("./operation-resolver-
|
|
9
|
+
var OperationResolver = Capability2.lazy("OperationResolver", () => import("./operation-resolver-4GWB3YZG.mjs"));
|
|
10
10
|
|
|
11
11
|
// src/capabilities/schema-defs/index.ts
|
|
12
12
|
import { Capability as Capability3 } from "@dxos/app-framework";
|
|
13
|
-
var SchemaDefs = Capability3.lazy("SchemaDefs", () => import("./schema-defs-
|
|
13
|
+
var SchemaDefs = Capability3.lazy("SchemaDefs", () => import("./schema-defs-GXQ47JZN.mjs"));
|
|
14
14
|
|
|
15
15
|
export {
|
|
16
16
|
Client,
|
|
17
17
|
OperationResolver,
|
|
18
18
|
SchemaDefs
|
|
19
19
|
};
|
|
20
|
-
//# sourceMappingURL=chunk-
|
|
20
|
+
//# sourceMappingURL=chunk-OFJUOKY7.mjs.map
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
|
|
2
|
+
import {
|
|
3
|
+
meta
|
|
4
|
+
} from "./chunk-BOTJSPCT.mjs";
|
|
5
|
+
|
|
6
|
+
// src/constants.ts
|
|
7
|
+
var JOIN_DIALOG = `${meta.id}.JoinDialog`;
|
|
8
|
+
var RECOVERY_CODE_DIALOG = `${meta.id}.RecoveryCodeDialog`;
|
|
9
|
+
var RESET_DIALOG = `${meta.id}.ResetDialog`;
|
|
10
|
+
|
|
11
|
+
export {
|
|
12
|
+
JOIN_DIALOG,
|
|
13
|
+
RECOVERY_CODE_DIALOG,
|
|
14
|
+
RESET_DIALOG
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=chunk-VLNCZYIC.mjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/constants.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { meta } from './meta';\n\nexport const JOIN_DIALOG = `${meta.id}
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { meta } from './meta';\n\nexport const JOIN_DIALOG = `${meta.id}.JoinDialog`;\nexport const RECOVERY_CODE_DIALOG = `${meta.id}.RecoveryCodeDialog`;\nexport const RESET_DIALOG = `${meta.id}.ResetDialog`;\n"],
|
|
5
5
|
"mappings": ";;;;;;AAMO,IAAMA,cAAc,GAAGC,KAAKC,EAAE;AAC9B,IAAMC,uBAAuB,GAAGF,KAAKC,EAAE;AACvC,IAAME,eAAe,GAAGH,KAAKC,EAAE;",
|
|
6
6
|
"names": ["JOIN_DIALOG", "meta", "id", "RECOVERY_CODE_DIALOG", "RESET_DIALOG"]
|
|
7
7
|
}
|
|
@@ -3,14 +3,14 @@ import {
|
|
|
3
3
|
Client,
|
|
4
4
|
OperationResolver,
|
|
5
5
|
SchemaDefs
|
|
6
|
-
} from "../chunk-
|
|
6
|
+
} from "../chunk-OFJUOKY7.mjs";
|
|
7
7
|
import {
|
|
8
8
|
ClientEvents,
|
|
9
9
|
ClientOperation
|
|
10
|
-
} from "../chunk-
|
|
10
|
+
} from "../chunk-DT2ZNOGU.mjs";
|
|
11
11
|
import {
|
|
12
12
|
meta
|
|
13
|
-
} from "../chunk-
|
|
13
|
+
} from "../chunk-BOTJSPCT.mjs";
|
|
14
14
|
|
|
15
15
|
// src/cli/plugin.ts
|
|
16
16
|
import { ActivationEvents, Capability, Plugin as Plugin2 } from "@dxos/app-framework";
|
|
@@ -671,12 +671,13 @@ import * as Command25 from "@effect/cli/Command";
|
|
|
671
671
|
import * as Command19 from "@effect/cli/Command";
|
|
672
672
|
import * as Options5 from "@effect/cli/Options";
|
|
673
673
|
import * as FileSystem from "@effect/platform/FileSystem";
|
|
674
|
+
import * as Path from "@effect/platform/Path";
|
|
674
675
|
import * as Console14 from "effect/Console";
|
|
675
676
|
import * as Effect14 from "effect/Effect";
|
|
676
677
|
import * as Option6 from "effect/Option";
|
|
677
678
|
import * as Record from "effect/Record";
|
|
678
679
|
import { CommandConfig as CommandConfig14, print as print8 } from "@dxos/cli-util";
|
|
679
|
-
import { DX_CONFIG,
|
|
680
|
+
import { DX_CONFIG, getProfileConfigPath } from "@dxos/client-protocol";
|
|
680
681
|
import { trim } from "@dxos/util";
|
|
681
682
|
|
|
682
683
|
// src/cli/commands/profile/util.ts
|
|
@@ -746,19 +747,23 @@ var create2 = Command19.make("create", {
|
|
|
746
747
|
}, Effect14.fnUntraced(function* ({ template, name }) {
|
|
747
748
|
const { json } = yield* CommandConfig14;
|
|
748
749
|
const fs = yield* FileSystem.FileSystem;
|
|
750
|
+
const path = yield* Path.Path;
|
|
749
751
|
const profileName = name.pipe(Option6.getOrElse(() => template));
|
|
750
|
-
const
|
|
751
|
-
if (yield* fs.exists(
|
|
752
|
+
const configPath = getProfileConfigPath(DX_CONFIG, profileName);
|
|
753
|
+
if (yield* fs.exists(configPath)) {
|
|
752
754
|
throw new Error(`Profile ${profileName} already exists`);
|
|
753
755
|
}
|
|
754
|
-
yield* fs.
|
|
756
|
+
yield* fs.makeDirectory(path.dirname(configPath), {
|
|
757
|
+
recursive: true
|
|
758
|
+
});
|
|
759
|
+
yield* fs.writeFileString(configPath, TEMPLATES[template]);
|
|
755
760
|
if (json) {
|
|
756
761
|
yield* Console14.log(JSON.stringify({
|
|
757
762
|
name: profileName,
|
|
758
|
-
path:
|
|
763
|
+
path: configPath
|
|
759
764
|
}, null, 2));
|
|
760
765
|
} else {
|
|
761
|
-
yield* Console14.log(print8(printProfileCreated(profileName,
|
|
766
|
+
yield* Console14.log(print8(printProfileCreated(profileName, configPath)));
|
|
762
767
|
}
|
|
763
768
|
}));
|
|
764
769
|
|
|
@@ -770,14 +775,17 @@ import * as Console15 from "effect/Console";
|
|
|
770
775
|
import * as Effect15 from "effect/Effect";
|
|
771
776
|
import * as Option7 from "effect/Option";
|
|
772
777
|
import { CommandConfig as CommandConfig15, print as print9 } from "@dxos/cli-util";
|
|
773
|
-
import { DX_CONFIG as DX_CONFIG2,
|
|
778
|
+
import { DX_CONFIG as DX_CONFIG2, getProfileConfigPath as getProfileConfigPath2 } from "@dxos/client-protocol";
|
|
774
779
|
var del = Command20.make("delete", {
|
|
775
780
|
name: Options6.text("name").pipe(Options6.withDescription("Profile name"), Options6.optional)
|
|
776
781
|
}, Effect15.fnUntraced(function* ({ name }) {
|
|
777
782
|
const { json } = yield* CommandConfig15;
|
|
778
783
|
const fs = yield* FileSystem3.FileSystem;
|
|
779
784
|
const profileName = name.pipe(Option7.getOrElse(() => "default"));
|
|
780
|
-
|
|
785
|
+
const configPath = getProfileConfigPath2(DX_CONFIG2, profileName);
|
|
786
|
+
const pluginsPath = `${DX_CONFIG2}/plugins/${profileName}.yml`;
|
|
787
|
+
yield* fs.remove(configPath).pipe(Effect15.ignore);
|
|
788
|
+
yield* fs.remove(pluginsPath).pipe(Effect15.ignore);
|
|
781
789
|
if (json) {
|
|
782
790
|
yield* Console15.log(JSON.stringify({
|
|
783
791
|
name: profileName,
|
|
@@ -793,7 +801,7 @@ import * as Command21 from "@effect/cli/Command";
|
|
|
793
801
|
import * as Options7 from "@effect/cli/Options";
|
|
794
802
|
import * as Prompt2 from "@effect/cli/Prompt";
|
|
795
803
|
import * as FileSystem5 from "@effect/platform/FileSystem";
|
|
796
|
-
import * as
|
|
804
|
+
import * as Path3 from "@effect/platform/Path";
|
|
797
805
|
import * as Console16 from "effect/Console";
|
|
798
806
|
import * as Effect16 from "effect/Effect";
|
|
799
807
|
import * as Option8 from "effect/Option";
|
|
@@ -805,7 +813,7 @@ var handler11 = Effect16.fn(function* ({ file, dataDir, force }) {
|
|
|
805
813
|
const dataDirValue = Option8.getOrUndefined(dataDir);
|
|
806
814
|
const { json, profile: profile2 } = yield* CommandConfig16;
|
|
807
815
|
const fs = yield* FileSystem5.FileSystem;
|
|
808
|
-
const path = yield*
|
|
816
|
+
const path = yield* Path3.Path;
|
|
809
817
|
const config2 = yield* ConfigService2;
|
|
810
818
|
const { createLevel, createStorageObjects, importProfileData, decodeProfileArchive } = yield* Effect16.promise(() => import("@dxos/client-services"));
|
|
811
819
|
let storageConfig;
|
|
@@ -926,31 +934,31 @@ var inspect = Command22.make("inspect", {
|
|
|
926
934
|
// src/cli/commands/profile/list.ts
|
|
927
935
|
import * as Command23 from "@effect/cli/Command";
|
|
928
936
|
import * as FileSystem9 from "@effect/platform/FileSystem";
|
|
929
|
-
import * as
|
|
937
|
+
import * as Path5 from "@effect/platform/Path";
|
|
930
938
|
import * as Console18 from "effect/Console";
|
|
931
939
|
import * as Effect18 from "effect/Effect";
|
|
932
940
|
import * as Yaml2 from "yaml";
|
|
933
941
|
import { CommandConfig as CommandConfig18, printList as printList3 } from "@dxos/cli-util";
|
|
934
942
|
import { Config } from "@dxos/client";
|
|
935
|
-
import { DX_CONFIG as DX_CONFIG3, DX_DATA, getProfilePath
|
|
943
|
+
import { DX_CONFIG as DX_CONFIG3, DX_DATA, getProfilePath } from "@dxos/client-protocol";
|
|
936
944
|
var list3 = Command23.make("list", {}, Effect18.fnUntraced(function* () {
|
|
937
945
|
const { profile: currentProfile } = yield* CommandConfig18;
|
|
938
946
|
const fs = yield* FileSystem9.FileSystem;
|
|
939
|
-
const path = yield*
|
|
947
|
+
const path = yield* Path5.Path;
|
|
940
948
|
const profileDir = path.join(DX_CONFIG3, "profile");
|
|
941
|
-
const
|
|
942
|
-
const
|
|
943
|
-
|
|
944
|
-
const name = filename.slice(0, -
|
|
945
|
-
const
|
|
946
|
-
const configContent = yield* fs.readFileString(
|
|
947
|
-
const configValues = Yaml2.parse(configContent);
|
|
949
|
+
const entries = yield* fs.readDirectory(profileDir);
|
|
950
|
+
const profileFiles = entries.filter((entry) => entry.endsWith(".yml"));
|
|
951
|
+
const profiles = yield* Effect18.forEach(profileFiles, (filename) => Effect18.gen(function* () {
|
|
952
|
+
const name = filename.slice(0, -4);
|
|
953
|
+
const configPath = path.join(profileDir, filename);
|
|
954
|
+
const configContent = yield* fs.readFileString(configPath).pipe(Effect18.catchTag("SystemError", () => Effect18.succeed("{}")));
|
|
955
|
+
const configValues = Yaml2.parse(configContent) ?? {};
|
|
948
956
|
const config2 = new Config(configValues);
|
|
949
957
|
return {
|
|
950
958
|
name,
|
|
951
959
|
isCurrent: name === currentProfile,
|
|
952
|
-
fullPath,
|
|
953
|
-
storagePath:
|
|
960
|
+
fullPath: configPath,
|
|
961
|
+
storagePath: getProfilePath(configValues?.runtime?.client?.storage?.dataRoot ?? DX_DATA, name),
|
|
954
962
|
edge: config2.values.runtime?.services?.edge?.url
|
|
955
963
|
};
|
|
956
964
|
}));
|
|
@@ -971,7 +979,7 @@ import * as FileSystem11 from "@effect/platform/FileSystem";
|
|
|
971
979
|
import * as Console19 from "effect/Console";
|
|
972
980
|
import * as Effect19 from "effect/Effect";
|
|
973
981
|
import { CommandConfig as CommandConfig19, print as print11 } from "@dxos/cli-util";
|
|
974
|
-
import { DX_DATA as DX_DATA2, getProfilePath as
|
|
982
|
+
import { DX_DATA as DX_DATA2, getProfilePath as getProfilePath2 } from "@dxos/client-protocol";
|
|
975
983
|
import { ConfigService as ConfigService3 } from "@dxos/config";
|
|
976
984
|
var reset = Command24.make("reset", {
|
|
977
985
|
force: Options9.boolean("force", {
|
|
@@ -981,7 +989,7 @@ var reset = Command24.make("reset", {
|
|
|
981
989
|
const fs = yield* FileSystem11.FileSystem;
|
|
982
990
|
const config2 = yield* ConfigService3;
|
|
983
991
|
const { json, profile: profile2 } = yield* CommandConfig19;
|
|
984
|
-
const path = config2.values.runtime?.client?.storage?.dataRoot ??
|
|
992
|
+
const path = config2.values.runtime?.client?.storage?.dataRoot ?? getProfilePath2(DX_DATA2, profile2);
|
|
985
993
|
if (!force) {
|
|
986
994
|
const confirmed = yield* Prompt3.confirm({
|
|
987
995
|
message: `Are you sure you want to reset the profile (${profile2})?`,
|