@dxos/plugin-client 0.8.4-main.69d29f4 → 0.8.4-main.6fa680abb7
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-3N7ANEJ7.mjs +268 -0
- package/dist/lib/browser/DevicesContainer-3N7ANEJ7.mjs.map +7 -0
- package/dist/lib/browser/JoinDialog-VTTK7NHO.mjs +59 -0
- package/dist/lib/browser/JoinDialog-VTTK7NHO.mjs.map +7 -0
- package/dist/lib/browser/ProfileContainer-XV7OXJC2.mjs +171 -0
- package/dist/lib/browser/ProfileContainer-XV7OXJC2.mjs.map +7 -0
- package/dist/lib/browser/RecoveryCodeDialog-WO34OZEJ.mjs +60 -0
- package/dist/lib/browser/RecoveryCodeDialog-WO34OZEJ.mjs.map +7 -0
- package/dist/lib/browser/RecoveryCredentialsContainer-G22FSTIX.mjs +57 -0
- package/dist/lib/browser/RecoveryCredentialsContainer-G22FSTIX.mjs.map +7 -0
- package/dist/lib/browser/ResetDialog-W24FOWBQ.mjs +52 -0
- package/dist/lib/browser/ResetDialog-W24FOWBQ.mjs.map +7 -0
- package/dist/lib/browser/{app-graph-builder-3FGBMLTF.mjs → app-graph-builder-GGJKFY3X.mjs} +9 -6
- package/dist/lib/browser/app-graph-builder-GGJKFY3X.mjs.map +7 -0
- package/dist/lib/browser/{chunk-4BZGRIFS.mjs → chunk-FVEKZBM7.mjs} +34 -44
- package/dist/lib/browser/chunk-FVEKZBM7.mjs.map +7 -0
- package/dist/lib/browser/{chunk-F7H2Y3Z2.mjs → chunk-GSVYEYVS.mjs} +4 -4
- package/dist/lib/browser/chunk-HSFDKP5D.mjs +15 -0
- package/dist/lib/browser/{chunk-G7C3S2BE.mjs.map → chunk-HSFDKP5D.mjs.map} +1 -1
- package/dist/lib/browser/chunk-JHSBBOCI.mjs +15 -0
- package/dist/lib/browser/chunk-JHSBBOCI.mjs.map +7 -0
- package/dist/lib/browser/cli/index.mjs +60 -49
- package/dist/lib/browser/cli/index.mjs.map +3 -3
- package/dist/lib/browser/{client-IX5LMWV4.mjs → client-BXCP3EUE.mjs} +11 -11
- package/dist/lib/browser/client-BXCP3EUE.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +26 -23
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/{migrations-3EBTAW3N.mjs → migrations-GKUA2ARL.mjs} +6 -5
- package/dist/lib/browser/migrations-GKUA2ARL.mjs.map +7 -0
- package/dist/lib/browser/{operation-resolver-2NT3ISVP.mjs → operation-resolver-VSWA74RS.mjs} +24 -23
- package/dist/lib/browser/operation-resolver-VSWA74RS.mjs.map +7 -0
- package/dist/lib/browser/{react-context-4UABG3GP.mjs → react-context-GZ3T5UON.mjs} +8 -6
- package/dist/lib/browser/react-context-GZ3T5UON.mjs.map +7 -0
- package/dist/lib/browser/react-surface-5VZP34X3.mjs +77 -0
- package/dist/lib/browser/react-surface-5VZP34X3.mjs.map +7 -0
- package/dist/lib/browser/{schema-defs-O7VLP745.mjs → schema-defs-KAG6HQMI.mjs} +8 -6
- package/dist/lib/browser/schema-defs-KAG6HQMI.mjs.map +7 -0
- package/dist/lib/browser/types/index.mjs +2 -1
- package/dist/lib/node-esm/DevicesContainer-V7HEUPO7.mjs +269 -0
- package/dist/lib/node-esm/DevicesContainer-V7HEUPO7.mjs.map +7 -0
- package/dist/lib/node-esm/JoinDialog-XVKW4SLT.mjs +60 -0
- package/dist/lib/node-esm/JoinDialog-XVKW4SLT.mjs.map +7 -0
- package/dist/lib/node-esm/ProfileContainer-B5LJ6TMU.mjs +172 -0
- package/dist/lib/node-esm/ProfileContainer-B5LJ6TMU.mjs.map +7 -0
- package/dist/lib/node-esm/RecoveryCodeDialog-YIRGXM7N.mjs +61 -0
- package/dist/lib/node-esm/RecoveryCodeDialog-YIRGXM7N.mjs.map +7 -0
- package/dist/lib/node-esm/RecoveryCredentialsContainer-MVJEFNXX.mjs +58 -0
- package/dist/lib/node-esm/RecoveryCredentialsContainer-MVJEFNXX.mjs.map +7 -0
- package/dist/lib/node-esm/ResetDialog-GGBWSQZO.mjs +54 -0
- package/dist/lib/node-esm/ResetDialog-GGBWSQZO.mjs.map +7 -0
- package/dist/lib/node-esm/{app-graph-builder-2PIYVUNC.mjs → app-graph-builder-PTNZ46NN.mjs} +9 -6
- package/dist/lib/node-esm/app-graph-builder-PTNZ46NN.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-BOTJSPCT.mjs +17 -0
- package/dist/lib/node-esm/chunk-BOTJSPCT.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-JAF64TFQ.mjs → chunk-DT2ZNOGU.mjs} +33 -44
- package/dist/lib/node-esm/chunk-DT2ZNOGU.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-BCELGXRI.mjs → chunk-OFJUOKY7.mjs} +4 -4
- package/dist/lib/node-esm/chunk-VLNCZYIC.mjs +16 -0
- package/dist/lib/node-esm/{chunk-PRAFFO54.mjs.map → chunk-VLNCZYIC.mjs.map} +1 -1
- package/dist/lib/node-esm/cli/index.mjs +60 -49
- package/dist/lib/node-esm/cli/index.mjs.map +3 -3
- package/dist/lib/node-esm/{client-FFPK5UFP.mjs → client-EGZHGRRC.mjs} +11 -11
- package/dist/lib/node-esm/client-EGZHGRRC.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +26 -23
- package/dist/lib/node-esm/index.mjs.map +3 -3
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/{migrations-WSZSFGDK.mjs → migrations-4NEKCBGU.mjs} +6 -5
- package/dist/lib/node-esm/migrations-4NEKCBGU.mjs.map +7 -0
- package/dist/lib/node-esm/{operation-resolver-VW5R2BE4.mjs → operation-resolver-4GWB3YZG.mjs} +24 -23
- package/dist/lib/node-esm/operation-resolver-4GWB3YZG.mjs.map +7 -0
- package/dist/lib/node-esm/{react-context-UVXMGPW4.mjs → react-context-T2ORT5CC.mjs} +8 -6
- package/dist/lib/node-esm/react-context-T2ORT5CC.mjs.map +7 -0
- package/dist/lib/node-esm/react-surface-B65OUZYI.mjs +78 -0
- package/dist/lib/node-esm/react-surface-B65OUZYI.mjs.map +7 -0
- package/dist/lib/node-esm/{schema-defs-QLRGBIKY.mjs → schema-defs-GXQ47JZN.mjs} +8 -6
- package/dist/lib/node-esm/schema-defs-GXQ47JZN.mjs.map +7 -0
- package/dist/lib/node-esm/types/index.mjs +2 -1
- package/dist/types/src/ClientPlugin.d.ts.map +1 -1
- package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts +1 -1
- package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts.map +1 -1
- package/dist/types/src/capabilities/client/client.d.ts +2 -2
- package/dist/types/src/capabilities/client/client.d.ts.map +1 -1
- package/dist/types/src/capabilities/client/index.d.ts +2 -1
- package/dist/types/src/capabilities/client/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/migrations/migrations.d.ts +1 -1
- package/dist/types/src/capabilities/migrations/migrations.d.ts.map +1 -1
- package/dist/types/src/capabilities/operation-resolver/index.d.ts +1 -1
- package/dist/types/src/capabilities/operation-resolver/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts +2 -2
- package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-context/react-context.d.ts +1 -1
- package/dist/types/src/capabilities/react-context/react-context.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-surface/index.d.ts +1 -1
- package/dist/types/src/capabilities/react-surface/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-surface/react-surface.d.ts +2 -2
- package/dist/types/src/capabilities/react-surface/react-surface.d.ts.map +1 -1
- package/dist/types/src/capabilities/schema-defs/schema-defs.d.ts +1 -1
- package/dist/types/src/capabilities/schema-defs/schema-defs.d.ts.map +1 -1
- package/dist/types/src/cli/commands/halo/create/create.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/cli/plugin.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +0 -6
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/containers/DevicesContainer/DevicesContainer.d.ts.map +1 -0
- package/dist/types/src/{components → containers/DevicesContainer}/DevicesContainer.stories.d.ts +9 -7
- package/dist/types/src/containers/DevicesContainer/DevicesContainer.stories.d.ts.map +1 -0
- package/dist/types/src/containers/DevicesContainer/index.d.ts +3 -0
- package/dist/types/src/containers/DevicesContainer/index.d.ts.map +1 -0
- package/dist/types/src/containers/JoinDialog/JoinDialog.d.ts.map +1 -0
- package/dist/types/src/containers/JoinDialog/index.d.ts +3 -0
- package/dist/types/src/containers/JoinDialog/index.d.ts.map +1 -0
- package/dist/types/src/containers/ProfileContainer/ProfileContainer.d.ts.map +1 -0
- package/dist/types/src/containers/ProfileContainer/ProfileContainer.stories.d.ts.map +1 -0
- package/dist/types/src/containers/ProfileContainer/index.d.ts +3 -0
- package/dist/types/src/containers/ProfileContainer/index.d.ts.map +1 -0
- package/dist/types/src/containers/RecoveryCodeDialog/RecoveryCodeDialog.d.ts.map +1 -0
- package/dist/types/src/containers/RecoveryCodeDialog/RecoveryCodeDialog.stories.d.ts.map +1 -0
- package/dist/types/src/containers/RecoveryCodeDialog/index.d.ts +4 -0
- package/dist/types/src/containers/RecoveryCodeDialog/index.d.ts.map +1 -0
- package/dist/types/src/containers/RecoveryCredentialsContainer/RecoveryCredentialsContainer.d.ts.map +1 -0
- package/dist/types/src/containers/RecoveryCredentialsContainer/RecoveryCredentialsContainer.stories.d.ts.map +1 -0
- package/dist/types/src/containers/RecoveryCredentialsContainer/index.d.ts +3 -0
- package/dist/types/src/containers/RecoveryCredentialsContainer/index.d.ts.map +1 -0
- package/dist/types/src/{components → containers/ResetDialog}/ResetDialog.d.ts +1 -1
- package/dist/types/src/containers/ResetDialog/ResetDialog.d.ts.map +1 -0
- package/dist/types/src/{components → containers/ResetDialog}/ResetDialog.stories.d.ts +1 -1
- package/dist/types/src/containers/ResetDialog/ResetDialog.stories.d.ts.map +1 -0
- package/dist/types/src/containers/ResetDialog/index.d.ts +4 -0
- package/dist/types/src/containers/ResetDialog/index.d.ts.map +1 -0
- package/dist/types/src/containers/index.d.ts +10 -0
- package/dist/types/src/containers/index.d.ts.map +1 -0
- package/dist/types/src/types/capabilities.d.ts +1 -1
- package/dist/types/src/types/capabilities.d.ts.map +1 -1
- package/dist/types/src/types/schema.d.ts +36 -32
- package/dist/types/src/types/schema.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +36 -35
- package/src/ClientPlugin.ts +27 -19
- package/src/capabilities/app-graph-builder/app-graph-builder.ts +4 -3
- package/src/capabilities/client/client.ts +7 -5
- package/src/capabilities/migrations/migrations.ts +3 -3
- package/src/capabilities/operation-resolver/operation-resolver.ts +13 -12
- package/src/capabilities/react-context/react-context.tsx +3 -3
- package/src/capabilities/react-surface/react-surface.tsx +12 -12
- package/src/capabilities/schema-defs/schema-defs.ts +7 -6
- package/src/cli/commands/edge/status.ts +2 -2
- package/src/cli/commands/halo/create/create.ts +2 -2
- 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/cli/plugin.ts +7 -6
- package/src/components/index.ts +0 -7
- package/src/constants.ts +3 -3
- package/src/{components → containers/DevicesContainer}/DevicesContainer.stories.tsx +8 -6
- package/src/{components → containers/DevicesContainer}/DevicesContainer.tsx +49 -57
- package/src/containers/DevicesContainer/index.ts +7 -0
- package/src/{components → containers/JoinDialog}/JoinDialog.tsx +8 -6
- package/src/containers/JoinDialog/index.ts +7 -0
- package/src/{components → containers/ProfileContainer}/ProfileContainer.stories.tsx +4 -4
- package/src/{components → containers/ProfileContainer}/ProfileContainer.tsx +20 -28
- package/src/containers/ProfileContainer/index.ts +7 -0
- package/src/{components → containers/RecoveryCodeDialog}/RecoveryCodeDialog.stories.tsx +4 -4
- package/src/{components → containers/RecoveryCodeDialog}/RecoveryCodeDialog.tsx +28 -25
- package/src/containers/RecoveryCodeDialog/index.ts +8 -0
- package/src/{components → containers/RecoveryCredentialsContainer}/RecoveryCredentialsContainer.stories.tsx +8 -6
- package/src/{components → containers/RecoveryCredentialsContainer}/RecoveryCredentialsContainer.tsx +19 -19
- package/src/containers/RecoveryCredentialsContainer/index.ts +7 -0
- package/src/{components → containers/ResetDialog}/ResetDialog.stories.tsx +27 -14
- package/src/{components → containers/ResetDialog}/ResetDialog.tsx +10 -10
- package/src/containers/ResetDialog/index.ts +8 -0
- package/src/containers/index.ts +15 -0
- package/src/meta.ts +1 -1
- package/src/translations.ts +1 -1
- package/src/types/capabilities.ts +3 -3
- package/src/types/events.ts +5 -5
- package/src/types/schema.ts +28 -23
- package/dist/lib/browser/app-graph-builder-3FGBMLTF.mjs.map +0 -7
- package/dist/lib/browser/chunk-4BZGRIFS.mjs.map +0 -7
- package/dist/lib/browser/chunk-G7C3S2BE.mjs +0 -15
- package/dist/lib/browser/client-IX5LMWV4.mjs.map +0 -7
- package/dist/lib/browser/migrations-3EBTAW3N.mjs.map +0 -7
- package/dist/lib/browser/operation-resolver-2NT3ISVP.mjs.map +0 -7
- package/dist/lib/browser/react-context-4UABG3GP.mjs.map +0 -7
- package/dist/lib/browser/react-surface-RSQ74XCT.mjs +0 -675
- package/dist/lib/browser/react-surface-RSQ74XCT.mjs.map +0 -7
- package/dist/lib/browser/schema-defs-O7VLP745.mjs.map +0 -7
- package/dist/lib/node-esm/app-graph-builder-2PIYVUNC.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-JAF64TFQ.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-PRAFFO54.mjs +0 -16
- package/dist/lib/node-esm/client-FFPK5UFP.mjs.map +0 -7
- package/dist/lib/node-esm/migrations-WSZSFGDK.mjs.map +0 -7
- package/dist/lib/node-esm/operation-resolver-VW5R2BE4.mjs.map +0 -7
- package/dist/lib/node-esm/react-context-UVXMGPW4.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-KBHANGGC.mjs +0 -676
- package/dist/lib/node-esm/react-surface-KBHANGGC.mjs.map +0 -7
- package/dist/lib/node-esm/schema-defs-QLRGBIKY.mjs.map +0 -7
- package/dist/types/src/components/DevicesContainer.d.ts.map +0 -1
- package/dist/types/src/components/DevicesContainer.stories.d.ts.map +0 -1
- package/dist/types/src/components/JoinDialog.d.ts.map +0 -1
- package/dist/types/src/components/ProfileContainer.d.ts.map +0 -1
- package/dist/types/src/components/ProfileContainer.stories.d.ts.map +0 -1
- package/dist/types/src/components/RecoveryCodeDialog.d.ts.map +0 -1
- package/dist/types/src/components/RecoveryCodeDialog.stories.d.ts.map +0 -1
- package/dist/types/src/components/RecoveryCredentialsContainer.d.ts.map +0 -1
- package/dist/types/src/components/RecoveryCredentialsContainer.stories.d.ts.map +0 -1
- package/dist/types/src/components/ResetDialog.d.ts.map +0 -1
- package/dist/types/src/components/ResetDialog.stories.d.ts.map +0 -1
- /package/dist/lib/browser/{chunk-F7H2Y3Z2.mjs.map → chunk-GSVYEYVS.mjs.map} +0 -0
- /package/dist/lib/node-esm/{chunk-BCELGXRI.mjs.map → chunk-OFJUOKY7.mjs.map} +0 -0
- /package/dist/types/src/{components → containers/DevicesContainer}/DevicesContainer.d.ts +0 -0
- /package/dist/types/src/{components → containers/JoinDialog}/JoinDialog.d.ts +0 -0
- /package/dist/types/src/{components → containers/ProfileContainer}/ProfileContainer.d.ts +0 -0
- /package/dist/types/src/{components → containers/ProfileContainer}/ProfileContainer.stories.d.ts +0 -0
- /package/dist/types/src/{components → containers/RecoveryCodeDialog}/RecoveryCodeDialog.d.ts +0 -0
- /package/dist/types/src/{components → containers/RecoveryCodeDialog}/RecoveryCodeDialog.stories.d.ts +0 -0
- /package/dist/types/src/{components → containers/RecoveryCredentialsContainer}/RecoveryCredentialsContainer.d.ts +0 -0
- /package/dist/types/src/{components → containers/RecoveryCredentialsContainer}/RecoveryCredentialsContainer.stories.d.ts +0 -0
|
@@ -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,15 +3,18 @@ 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
|
-
ClientOperation
|
|
9
|
+
ClientOperation
|
|
10
|
+
} from "../chunk-DT2ZNOGU.mjs";
|
|
11
|
+
import {
|
|
10
12
|
meta
|
|
11
|
-
} from "../chunk-
|
|
13
|
+
} from "../chunk-BOTJSPCT.mjs";
|
|
12
14
|
|
|
13
15
|
// src/cli/plugin.ts
|
|
14
|
-
import {
|
|
16
|
+
import { ActivationEvents, Capability, Plugin as Plugin2 } from "@dxos/app-framework";
|
|
17
|
+
import { AppActivationEvents, AppPlugin } from "@dxos/app-toolkit";
|
|
15
18
|
|
|
16
19
|
// src/cli/commands/config/index.ts
|
|
17
20
|
import * as Command2 from "@effect/cli/Command";
|
|
@@ -207,8 +210,8 @@ import { createEdgeIdentity } from "@dxos/client/edge";
|
|
|
207
210
|
var getStatus = () => Effect5.gen(function* () {
|
|
208
211
|
const client = yield* ClientService4;
|
|
209
212
|
const identity2 = createEdgeIdentity(client);
|
|
210
|
-
client.edge.setIdentity(identity2);
|
|
211
|
-
const status2 = yield* Effect5.tryPromise(() => client.edge.getStatus());
|
|
213
|
+
client.edge.http.setIdentity(identity2);
|
|
214
|
+
const status2 = yield* Effect5.tryPromise(() => client.edge.http.getStatus());
|
|
212
215
|
if (yield* CommandConfig5.isJson) {
|
|
213
216
|
yield* Console5.log(JSON.stringify(status2, null, 2));
|
|
214
217
|
} else if (status2.problems.length > 0) {
|
|
@@ -244,7 +247,7 @@ import * as Options2 from "@effect/cli/Options";
|
|
|
244
247
|
import * as Console6 from "effect/Console";
|
|
245
248
|
import * as Effect6 from "effect/Effect";
|
|
246
249
|
import * as Option2 from "effect/Option";
|
|
247
|
-
import {
|
|
250
|
+
import { Capabilities, Plugin } from "@dxos/app-framework";
|
|
248
251
|
import { CommandConfig as CommandConfig6, flushAndSync, spaceLayer } from "@dxos/cli-util";
|
|
249
252
|
import { print as print3 } from "@dxos/cli-util";
|
|
250
253
|
import { ClientService as ClientService5 } from "@dxos/client";
|
|
@@ -271,7 +274,7 @@ var handler4 = Effect6.fn(function* ({ agent, displayName }) {
|
|
|
271
274
|
]
|
|
272
275
|
});
|
|
273
276
|
const manager = yield* Plugin.Service;
|
|
274
|
-
const { invoke } = manager.capabilities.get(
|
|
277
|
+
const { invoke } = manager.capabilities.get(Capabilities.OperationInvoker);
|
|
275
278
|
const identity2 = yield* invoke(ClientOperation.CreateIdentity, {
|
|
276
279
|
displayName: Option2.getOrUndefined(displayName)
|
|
277
280
|
});
|
|
@@ -396,7 +399,7 @@ import * as Console8 from "effect/Console";
|
|
|
396
399
|
import * as Duration from "effect/Duration";
|
|
397
400
|
import * as Effect8 from "effect/Effect";
|
|
398
401
|
import * as Option4 from "effect/Option";
|
|
399
|
-
import { CommandConfig as CommandConfig8, Common
|
|
402
|
+
import { CommandConfig as CommandConfig8, Common, FormBuilder as FormBuilder3, getSpace, printList as printList2, spaceIdWithDefault } from "@dxos/cli-util";
|
|
400
403
|
import { ClientService as ClientService7 } from "@dxos/client";
|
|
401
404
|
var mapCredentials = (credentials) => {
|
|
402
405
|
return credentials.map((credential2) => ({
|
|
@@ -457,7 +460,7 @@ var handler6 = Effect8.fn(function* ({ type, spaceId, timeout: timeout2, delay }
|
|
|
457
460
|
});
|
|
458
461
|
var list2 = Command11.make("list", {
|
|
459
462
|
type: Options3.text("type").pipe(Options3.withDescription("Filter by credential type."), Options3.optional),
|
|
460
|
-
spaceId:
|
|
463
|
+
spaceId: Common.spaceId.pipe(Options3.withDescription("Space ID to show credentials from."), Options3.optional),
|
|
461
464
|
timeout: Options3.integer("timeout").pipe(Options3.withDescription("Time in milliseconds to wait for at least one credential before listing."), Options3.withDefault(500)),
|
|
462
465
|
delay: Options3.integer("delay").pipe(Options3.withDescription("Delay in milliseconds before listing."), Options3.withDefault(250))
|
|
463
466
|
}, handler6).pipe(Command11.withDescription("List HALO credentials."));
|
|
@@ -668,12 +671,13 @@ import * as Command25 from "@effect/cli/Command";
|
|
|
668
671
|
import * as Command19 from "@effect/cli/Command";
|
|
669
672
|
import * as Options5 from "@effect/cli/Options";
|
|
670
673
|
import * as FileSystem from "@effect/platform/FileSystem";
|
|
674
|
+
import * as Path from "@effect/platform/Path";
|
|
671
675
|
import * as Console14 from "effect/Console";
|
|
672
676
|
import * as Effect14 from "effect/Effect";
|
|
673
677
|
import * as Option6 from "effect/Option";
|
|
674
678
|
import * as Record from "effect/Record";
|
|
675
679
|
import { CommandConfig as CommandConfig14, print as print8 } from "@dxos/cli-util";
|
|
676
|
-
import { DX_CONFIG,
|
|
680
|
+
import { DX_CONFIG, getProfileConfigPath } from "@dxos/client-protocol";
|
|
677
681
|
import { trim } from "@dxos/util";
|
|
678
682
|
|
|
679
683
|
// src/cli/commands/profile/util.ts
|
|
@@ -743,19 +747,23 @@ var create2 = Command19.make("create", {
|
|
|
743
747
|
}, Effect14.fnUntraced(function* ({ template, name }) {
|
|
744
748
|
const { json } = yield* CommandConfig14;
|
|
745
749
|
const fs = yield* FileSystem.FileSystem;
|
|
750
|
+
const path = yield* Path.Path;
|
|
746
751
|
const profileName = name.pipe(Option6.getOrElse(() => template));
|
|
747
|
-
const
|
|
748
|
-
if (yield* fs.exists(
|
|
752
|
+
const configPath = getProfileConfigPath(DX_CONFIG, profileName);
|
|
753
|
+
if (yield* fs.exists(configPath)) {
|
|
749
754
|
throw new Error(`Profile ${profileName} already exists`);
|
|
750
755
|
}
|
|
751
|
-
yield* fs.
|
|
756
|
+
yield* fs.makeDirectory(path.dirname(configPath), {
|
|
757
|
+
recursive: true
|
|
758
|
+
});
|
|
759
|
+
yield* fs.writeFileString(configPath, TEMPLATES[template]);
|
|
752
760
|
if (json) {
|
|
753
761
|
yield* Console14.log(JSON.stringify({
|
|
754
762
|
name: profileName,
|
|
755
|
-
path:
|
|
763
|
+
path: configPath
|
|
756
764
|
}, null, 2));
|
|
757
765
|
} else {
|
|
758
|
-
yield* Console14.log(print8(printProfileCreated(profileName,
|
|
766
|
+
yield* Console14.log(print8(printProfileCreated(profileName, configPath)));
|
|
759
767
|
}
|
|
760
768
|
}));
|
|
761
769
|
|
|
@@ -767,14 +775,17 @@ import * as Console15 from "effect/Console";
|
|
|
767
775
|
import * as Effect15 from "effect/Effect";
|
|
768
776
|
import * as Option7 from "effect/Option";
|
|
769
777
|
import { CommandConfig as CommandConfig15, print as print9 } from "@dxos/cli-util";
|
|
770
|
-
import { DX_CONFIG as DX_CONFIG2,
|
|
778
|
+
import { DX_CONFIG as DX_CONFIG2, getProfileConfigPath as getProfileConfigPath2 } from "@dxos/client-protocol";
|
|
771
779
|
var del = Command20.make("delete", {
|
|
772
780
|
name: Options6.text("name").pipe(Options6.withDescription("Profile name"), Options6.optional)
|
|
773
781
|
}, Effect15.fnUntraced(function* ({ name }) {
|
|
774
782
|
const { json } = yield* CommandConfig15;
|
|
775
783
|
const fs = yield* FileSystem3.FileSystem;
|
|
776
784
|
const profileName = name.pipe(Option7.getOrElse(() => "default"));
|
|
777
|
-
|
|
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);
|
|
778
789
|
if (json) {
|
|
779
790
|
yield* Console15.log(JSON.stringify({
|
|
780
791
|
name: profileName,
|
|
@@ -790,7 +801,7 @@ import * as Command21 from "@effect/cli/Command";
|
|
|
790
801
|
import * as Options7 from "@effect/cli/Options";
|
|
791
802
|
import * as Prompt2 from "@effect/cli/Prompt";
|
|
792
803
|
import * as FileSystem5 from "@effect/platform/FileSystem";
|
|
793
|
-
import * as
|
|
804
|
+
import * as Path3 from "@effect/platform/Path";
|
|
794
805
|
import * as Console16 from "effect/Console";
|
|
795
806
|
import * as Effect16 from "effect/Effect";
|
|
796
807
|
import * as Option8 from "effect/Option";
|
|
@@ -802,7 +813,7 @@ var handler11 = Effect16.fn(function* ({ file, dataDir, force }) {
|
|
|
802
813
|
const dataDirValue = Option8.getOrUndefined(dataDir);
|
|
803
814
|
const { json, profile: profile2 } = yield* CommandConfig16;
|
|
804
815
|
const fs = yield* FileSystem5.FileSystem;
|
|
805
|
-
const path = yield*
|
|
816
|
+
const path = yield* Path3.Path;
|
|
806
817
|
const config2 = yield* ConfigService2;
|
|
807
818
|
const { createLevel, createStorageObjects, importProfileData, decodeProfileArchive } = yield* Effect16.promise(() => import("@dxos/client-services"));
|
|
808
819
|
let storageConfig;
|
|
@@ -923,31 +934,31 @@ var inspect = Command22.make("inspect", {
|
|
|
923
934
|
// src/cli/commands/profile/list.ts
|
|
924
935
|
import * as Command23 from "@effect/cli/Command";
|
|
925
936
|
import * as FileSystem9 from "@effect/platform/FileSystem";
|
|
926
|
-
import * as
|
|
937
|
+
import * as Path5 from "@effect/platform/Path";
|
|
927
938
|
import * as Console18 from "effect/Console";
|
|
928
939
|
import * as Effect18 from "effect/Effect";
|
|
929
940
|
import * as Yaml2 from "yaml";
|
|
930
941
|
import { CommandConfig as CommandConfig18, printList as printList3 } from "@dxos/cli-util";
|
|
931
942
|
import { Config } from "@dxos/client";
|
|
932
|
-
import { DX_CONFIG as DX_CONFIG3, DX_DATA, getProfilePath
|
|
943
|
+
import { DX_CONFIG as DX_CONFIG3, DX_DATA, getProfilePath } from "@dxos/client-protocol";
|
|
933
944
|
var list3 = Command23.make("list", {}, Effect18.fnUntraced(function* () {
|
|
934
945
|
const { profile: currentProfile } = yield* CommandConfig18;
|
|
935
946
|
const fs = yield* FileSystem9.FileSystem;
|
|
936
|
-
const path = yield*
|
|
947
|
+
const path = yield* Path5.Path;
|
|
937
948
|
const profileDir = path.join(DX_CONFIG3, "profile");
|
|
938
|
-
const
|
|
939
|
-
const
|
|
940
|
-
|
|
941
|
-
const name = filename.slice(0, -
|
|
942
|
-
const
|
|
943
|
-
const configContent = yield* fs.readFileString(
|
|
944
|
-
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) ?? {};
|
|
945
956
|
const config2 = new Config(configValues);
|
|
946
957
|
return {
|
|
947
958
|
name,
|
|
948
959
|
isCurrent: name === currentProfile,
|
|
949
|
-
fullPath,
|
|
950
|
-
storagePath:
|
|
960
|
+
fullPath: configPath,
|
|
961
|
+
storagePath: getProfilePath(configValues?.runtime?.client?.storage?.dataRoot ?? DX_DATA, name),
|
|
951
962
|
edge: config2.values.runtime?.services?.edge?.url
|
|
952
963
|
};
|
|
953
964
|
}));
|
|
@@ -968,7 +979,7 @@ import * as FileSystem11 from "@effect/platform/FileSystem";
|
|
|
968
979
|
import * as Console19 from "effect/Console";
|
|
969
980
|
import * as Effect19 from "effect/Effect";
|
|
970
981
|
import { CommandConfig as CommandConfig19, print as print11 } from "@dxos/cli-util";
|
|
971
|
-
import { DX_DATA as DX_DATA2, getProfilePath as
|
|
982
|
+
import { DX_DATA as DX_DATA2, getProfilePath as getProfilePath2 } from "@dxos/client-protocol";
|
|
972
983
|
import { ConfigService as ConfigService3 } from "@dxos/config";
|
|
973
984
|
var reset = Command24.make("reset", {
|
|
974
985
|
force: Options9.boolean("force", {
|
|
@@ -978,7 +989,7 @@ var reset = Command24.make("reset", {
|
|
|
978
989
|
const fs = yield* FileSystem11.FileSystem;
|
|
979
990
|
const config2 = yield* ConfigService3;
|
|
980
991
|
const { json, profile: profile2 } = yield* CommandConfig19;
|
|
981
|
-
const path = config2.values.runtime?.client?.storage?.dataRoot ??
|
|
992
|
+
const path = config2.values.runtime?.client?.storage?.dataRoot ?? getProfilePath2(DX_DATA2, profile2);
|
|
982
993
|
if (!force) {
|
|
983
994
|
const confirmed = yield* Prompt3.confirm({
|
|
984
995
|
message: `Are you sure you want to reset the profile (${profile2})?`,
|
|
@@ -1013,9 +1024,22 @@ var profile = Command25.make("profile").pipe(Command25.withDescription("Profile
|
|
|
1013
1024
|
|
|
1014
1025
|
// src/cli/plugin.ts
|
|
1015
1026
|
var ClientPlugin = Plugin2.define(meta).pipe(
|
|
1027
|
+
// TODO(wittjosiah): Could some of these commands make use of operations?
|
|
1028
|
+
AppPlugin.addCommandModule({
|
|
1029
|
+
commands: [
|
|
1030
|
+
config,
|
|
1031
|
+
device,
|
|
1032
|
+
edge,
|
|
1033
|
+
halo,
|
|
1034
|
+
profile
|
|
1035
|
+
]
|
|
1036
|
+
}),
|
|
1037
|
+
AppPlugin.addOperationResolverModule({
|
|
1038
|
+
activate: OperationResolver
|
|
1039
|
+
}),
|
|
1016
1040
|
Plugin2.addModule((options) => ({
|
|
1017
1041
|
id: Capability.getModuleTag(Client),
|
|
1018
|
-
activatesOn:
|
|
1042
|
+
activatesOn: ActivationEvents.Startup,
|
|
1019
1043
|
activatesAfter: [
|
|
1020
1044
|
ClientEvents.ClientReady
|
|
1021
1045
|
],
|
|
@@ -1024,23 +1048,10 @@ var ClientPlugin = Plugin2.define(meta).pipe(
|
|
|
1024
1048
|
Plugin2.addModule({
|
|
1025
1049
|
activatesOn: ClientEvents.ClientReady,
|
|
1026
1050
|
activatesBefore: [
|
|
1027
|
-
|
|
1051
|
+
AppActivationEvents.SetupSchema
|
|
1028
1052
|
],
|
|
1029
1053
|
activate: SchemaDefs
|
|
1030
1054
|
}),
|
|
1031
|
-
// TODO(wittjosiah): Could some of these commands make use of operations?
|
|
1032
|
-
Common3.Plugin.addCommandModule({
|
|
1033
|
-
commands: [
|
|
1034
|
-
config,
|
|
1035
|
-
device,
|
|
1036
|
-
edge,
|
|
1037
|
-
halo,
|
|
1038
|
-
profile
|
|
1039
|
-
]
|
|
1040
|
-
}),
|
|
1041
|
-
Common3.Plugin.addOperationResolverModule({
|
|
1042
|
-
activate: () => OperationResolver()
|
|
1043
|
-
}),
|
|
1044
1055
|
Plugin2.make
|
|
1045
1056
|
);
|
|
1046
1057
|
export {
|