@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
|
@@ -2,14 +2,14 @@ import {
|
|
|
2
2
|
Client,
|
|
3
3
|
OperationResolver,
|
|
4
4
|
SchemaDefs
|
|
5
|
-
} from "../chunk-
|
|
5
|
+
} from "../chunk-GSVYEYVS.mjs";
|
|
6
6
|
import {
|
|
7
7
|
ClientEvents,
|
|
8
8
|
ClientOperation
|
|
9
|
-
} from "../chunk-
|
|
9
|
+
} from "../chunk-FVEKZBM7.mjs";
|
|
10
10
|
import {
|
|
11
11
|
meta
|
|
12
|
-
} from "../chunk-
|
|
12
|
+
} from "../chunk-JHSBBOCI.mjs";
|
|
13
13
|
|
|
14
14
|
// src/cli/plugin.ts
|
|
15
15
|
import { ActivationEvents, Capability, Plugin as Plugin2 } from "@dxos/app-framework";
|
|
@@ -670,12 +670,13 @@ import * as Command25 from "@effect/cli/Command";
|
|
|
670
670
|
import * as Command19 from "@effect/cli/Command";
|
|
671
671
|
import * as Options5 from "@effect/cli/Options";
|
|
672
672
|
import * as FileSystem from "@effect/platform/FileSystem";
|
|
673
|
+
import * as Path from "@effect/platform/Path";
|
|
673
674
|
import * as Console14 from "effect/Console";
|
|
674
675
|
import * as Effect14 from "effect/Effect";
|
|
675
676
|
import * as Option6 from "effect/Option";
|
|
676
677
|
import * as Record from "effect/Record";
|
|
677
678
|
import { CommandConfig as CommandConfig14, print as print8 } from "@dxos/cli-util";
|
|
678
|
-
import { DX_CONFIG,
|
|
679
|
+
import { DX_CONFIG, getProfileConfigPath } from "@dxos/client-protocol";
|
|
679
680
|
import { trim } from "@dxos/util";
|
|
680
681
|
|
|
681
682
|
// src/cli/commands/profile/util.ts
|
|
@@ -745,19 +746,23 @@ var create2 = Command19.make("create", {
|
|
|
745
746
|
}, Effect14.fnUntraced(function* ({ template, name }) {
|
|
746
747
|
const { json } = yield* CommandConfig14;
|
|
747
748
|
const fs = yield* FileSystem.FileSystem;
|
|
749
|
+
const path = yield* Path.Path;
|
|
748
750
|
const profileName = name.pipe(Option6.getOrElse(() => template));
|
|
749
|
-
const
|
|
750
|
-
if (yield* fs.exists(
|
|
751
|
+
const configPath = getProfileConfigPath(DX_CONFIG, profileName);
|
|
752
|
+
if (yield* fs.exists(configPath)) {
|
|
751
753
|
throw new Error(`Profile ${profileName} already exists`);
|
|
752
754
|
}
|
|
753
|
-
yield* fs.
|
|
755
|
+
yield* fs.makeDirectory(path.dirname(configPath), {
|
|
756
|
+
recursive: true
|
|
757
|
+
});
|
|
758
|
+
yield* fs.writeFileString(configPath, TEMPLATES[template]);
|
|
754
759
|
if (json) {
|
|
755
760
|
yield* Console14.log(JSON.stringify({
|
|
756
761
|
name: profileName,
|
|
757
|
-
path:
|
|
762
|
+
path: configPath
|
|
758
763
|
}, null, 2));
|
|
759
764
|
} else {
|
|
760
|
-
yield* Console14.log(print8(printProfileCreated(profileName,
|
|
765
|
+
yield* Console14.log(print8(printProfileCreated(profileName, configPath)));
|
|
761
766
|
}
|
|
762
767
|
}));
|
|
763
768
|
|
|
@@ -769,14 +774,17 @@ import * as Console15 from "effect/Console";
|
|
|
769
774
|
import * as Effect15 from "effect/Effect";
|
|
770
775
|
import * as Option7 from "effect/Option";
|
|
771
776
|
import { CommandConfig as CommandConfig15, print as print9 } from "@dxos/cli-util";
|
|
772
|
-
import { DX_CONFIG as DX_CONFIG2,
|
|
777
|
+
import { DX_CONFIG as DX_CONFIG2, getProfileConfigPath as getProfileConfigPath2 } from "@dxos/client-protocol";
|
|
773
778
|
var del = Command20.make("delete", {
|
|
774
779
|
name: Options6.text("name").pipe(Options6.withDescription("Profile name"), Options6.optional)
|
|
775
780
|
}, Effect15.fnUntraced(function* ({ name }) {
|
|
776
781
|
const { json } = yield* CommandConfig15;
|
|
777
782
|
const fs = yield* FileSystem3.FileSystem;
|
|
778
783
|
const profileName = name.pipe(Option7.getOrElse(() => "default"));
|
|
779
|
-
|
|
784
|
+
const configPath = getProfileConfigPath2(DX_CONFIG2, profileName);
|
|
785
|
+
const pluginsPath = `${DX_CONFIG2}/plugins/${profileName}.yml`;
|
|
786
|
+
yield* fs.remove(configPath).pipe(Effect15.ignore);
|
|
787
|
+
yield* fs.remove(pluginsPath).pipe(Effect15.ignore);
|
|
780
788
|
if (json) {
|
|
781
789
|
yield* Console15.log(JSON.stringify({
|
|
782
790
|
name: profileName,
|
|
@@ -792,7 +800,7 @@ import * as Command21 from "@effect/cli/Command";
|
|
|
792
800
|
import * as Options7 from "@effect/cli/Options";
|
|
793
801
|
import * as Prompt2 from "@effect/cli/Prompt";
|
|
794
802
|
import * as FileSystem5 from "@effect/platform/FileSystem";
|
|
795
|
-
import * as
|
|
803
|
+
import * as Path3 from "@effect/platform/Path";
|
|
796
804
|
import * as Console16 from "effect/Console";
|
|
797
805
|
import * as Effect16 from "effect/Effect";
|
|
798
806
|
import * as Option8 from "effect/Option";
|
|
@@ -804,7 +812,7 @@ var handler11 = Effect16.fn(function* ({ file, dataDir, force }) {
|
|
|
804
812
|
const dataDirValue = Option8.getOrUndefined(dataDir);
|
|
805
813
|
const { json, profile: profile2 } = yield* CommandConfig16;
|
|
806
814
|
const fs = yield* FileSystem5.FileSystem;
|
|
807
|
-
const path = yield*
|
|
815
|
+
const path = yield* Path3.Path;
|
|
808
816
|
const config2 = yield* ConfigService2;
|
|
809
817
|
const { createLevel, createStorageObjects, importProfileData, decodeProfileArchive } = yield* Effect16.promise(() => import("@dxos/client-services"));
|
|
810
818
|
let storageConfig;
|
|
@@ -925,31 +933,31 @@ var inspect = Command22.make("inspect", {
|
|
|
925
933
|
// src/cli/commands/profile/list.ts
|
|
926
934
|
import * as Command23 from "@effect/cli/Command";
|
|
927
935
|
import * as FileSystem9 from "@effect/platform/FileSystem";
|
|
928
|
-
import * as
|
|
936
|
+
import * as Path5 from "@effect/platform/Path";
|
|
929
937
|
import * as Console18 from "effect/Console";
|
|
930
938
|
import * as Effect18 from "effect/Effect";
|
|
931
939
|
import * as Yaml2 from "yaml";
|
|
932
940
|
import { CommandConfig as CommandConfig18, printList as printList3 } from "@dxos/cli-util";
|
|
933
941
|
import { Config } from "@dxos/client";
|
|
934
|
-
import { DX_CONFIG as DX_CONFIG3, DX_DATA, getProfilePath
|
|
942
|
+
import { DX_CONFIG as DX_CONFIG3, DX_DATA, getProfilePath } from "@dxos/client-protocol";
|
|
935
943
|
var list3 = Command23.make("list", {}, Effect18.fnUntraced(function* () {
|
|
936
944
|
const { profile: currentProfile } = yield* CommandConfig18;
|
|
937
945
|
const fs = yield* FileSystem9.FileSystem;
|
|
938
|
-
const path = yield*
|
|
946
|
+
const path = yield* Path5.Path;
|
|
939
947
|
const profileDir = path.join(DX_CONFIG3, "profile");
|
|
940
|
-
const
|
|
941
|
-
const
|
|
942
|
-
|
|
943
|
-
const name = filename.slice(0, -
|
|
944
|
-
const
|
|
945
|
-
const configContent = yield* fs.readFileString(
|
|
946
|
-
const configValues = Yaml2.parse(configContent);
|
|
948
|
+
const entries = yield* fs.readDirectory(profileDir);
|
|
949
|
+
const profileFiles = entries.filter((entry) => entry.endsWith(".yml"));
|
|
950
|
+
const profiles = yield* Effect18.forEach(profileFiles, (filename) => Effect18.gen(function* () {
|
|
951
|
+
const name = filename.slice(0, -4);
|
|
952
|
+
const configPath = path.join(profileDir, filename);
|
|
953
|
+
const configContent = yield* fs.readFileString(configPath).pipe(Effect18.catchTag("SystemError", () => Effect18.succeed("{}")));
|
|
954
|
+
const configValues = Yaml2.parse(configContent) ?? {};
|
|
947
955
|
const config2 = new Config(configValues);
|
|
948
956
|
return {
|
|
949
957
|
name,
|
|
950
958
|
isCurrent: name === currentProfile,
|
|
951
|
-
fullPath,
|
|
952
|
-
storagePath:
|
|
959
|
+
fullPath: configPath,
|
|
960
|
+
storagePath: getProfilePath(configValues?.runtime?.client?.storage?.dataRoot ?? DX_DATA, name),
|
|
953
961
|
edge: config2.values.runtime?.services?.edge?.url
|
|
954
962
|
};
|
|
955
963
|
}));
|
|
@@ -970,7 +978,7 @@ import * as FileSystem11 from "@effect/platform/FileSystem";
|
|
|
970
978
|
import * as Console19 from "effect/Console";
|
|
971
979
|
import * as Effect19 from "effect/Effect";
|
|
972
980
|
import { CommandConfig as CommandConfig19, print as print11 } from "@dxos/cli-util";
|
|
973
|
-
import { DX_DATA as DX_DATA2, getProfilePath as
|
|
981
|
+
import { DX_DATA as DX_DATA2, getProfilePath as getProfilePath2 } from "@dxos/client-protocol";
|
|
974
982
|
import { ConfigService as ConfigService3 } from "@dxos/config";
|
|
975
983
|
var reset = Command24.make("reset", {
|
|
976
984
|
force: Options9.boolean("force", {
|
|
@@ -980,7 +988,7 @@ var reset = Command24.make("reset", {
|
|
|
980
988
|
const fs = yield* FileSystem11.FileSystem;
|
|
981
989
|
const config2 = yield* ConfigService3;
|
|
982
990
|
const { json, profile: profile2 } = yield* CommandConfig19;
|
|
983
|
-
const path = config2.values.runtime?.client?.storage?.dataRoot ??
|
|
991
|
+
const path = config2.values.runtime?.client?.storage?.dataRoot ?? getProfilePath2(DX_DATA2, profile2);
|
|
984
992
|
if (!force) {
|
|
985
993
|
const confirmed = yield* Prompt3.confirm({
|
|
986
994
|
message: `Are you sure you want to reset the profile (${profile2})?`,
|