@dxos/plugin-devtools 0.12.0-next-73daef452f1464b62efdbca75fb0067c1066f264 → 0.13.0
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/PLUGIN.mdl +144 -57
- package/dist/lib/Devtools.mjs +9 -1
- package/dist/lib/Devtools.mjs.map +1 -1
- package/dist/lib/capabilities.browser.mjs +45 -0
- package/dist/lib/capabilities.browser.mjs.map +1 -0
- package/dist/lib/capabilities.mjs +9 -7
- package/dist/lib/capabilities.mjs.map +1 -1
- package/dist/lib/capabilities.node.mjs +7 -3
- package/dist/lib/capabilities.node.mjs.map +1 -1
- package/dist/lib/capabilities.tauri.mjs +45 -0
- package/dist/lib/capabilities.tauri.mjs.map +1 -0
- package/dist/lib/capabilities.workerd.mjs +2 -2
- package/dist/lib/capabilities.workerd.mjs.map +1 -1
- package/dist/lib/{chunk-CliPanel.mjs → chunk-CliArticle.mjs} +28 -24
- package/dist/lib/chunk-CliArticle.mjs.map +1 -0
- package/dist/lib/chunk-DebugGraph.mjs +12 -8
- package/dist/lib/chunk-DebugGraph.mjs.map +1 -1
- package/dist/lib/chunk-DevtoolsCards.mjs +108 -0
- package/dist/lib/chunk-DevtoolsCards.mjs.map +1 -0
- package/dist/lib/chunk-DevtoolsOverviewContainer.mjs +59 -22
- package/dist/lib/chunk-DevtoolsOverviewContainer.mjs.map +1 -1
- package/dist/lib/chunk-GithubPanel.mjs +13 -10
- package/dist/lib/chunk-GithubPanel.mjs.map +1 -1
- package/dist/lib/chunk-PLUGIN.mjs +6 -0
- package/dist/lib/chunk-PLUGIN.mjs.map +1 -0
- package/dist/lib/{chunk-RegistryPanel.mjs → chunk-RegistryArticle.mjs} +26 -25
- package/dist/lib/chunk-RegistryArticle.mjs.map +1 -0
- package/dist/lib/chunk-ToolsExplorerContainer.mjs +7 -3
- package/dist/lib/chunk-ToolsExplorerContainer.mjs.map +1 -1
- package/dist/lib/chunk-app-graph-builder.mjs +323 -312
- package/dist/lib/chunk-app-graph-builder.mjs.map +1 -1
- package/dist/lib/chunk-react-context.mjs +1 -1
- package/dist/lib/chunk-react-context.mjs.map +1 -1
- package/dist/lib/chunk-react-surface.mjs +244 -88
- package/dist/lib/chunk-react-surface.mjs.map +1 -1
- package/dist/lib/containers.mjs +3 -3
- package/dist/lib/containers.mjs.map +1 -1
- package/dist/lib/index.mjs +0 -1
- package/dist/lib/meta.mjs +2 -2
- package/dist/lib/meta.mjs.map +1 -1
- package/dist/lib/translations.mjs +55 -49
- package/dist/lib/translations.mjs.map +1 -1
- package/dist/types/src/capabilities/DevtoolsCards.d.ts +28 -0
- package/dist/types/src/capabilities/DevtoolsCards.d.ts.map +1 -0
- package/dist/types/src/capabilities/DevtoolsSurfaces.d.ts +19 -6
- package/dist/types/src/capabilities/DevtoolsSurfaces.d.ts.map +1 -1
- package/dist/types/src/capabilities/app-graph-builder.d.ts +19 -0
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
- package/dist/types/src/capabilities/app-graph-builder.test.d.ts +2 -0
- package/dist/types/src/capabilities/app-graph-builder.test.d.ts.map +1 -0
- package/dist/types/src/capabilities/gen/browser.d.ts +8 -0
- package/dist/types/src/capabilities/gen/browser.d.ts.map +1 -0
- package/dist/types/src/capabilities/gen/tauri.d.ts +8 -0
- package/dist/types/src/capabilities/gen/tauri.d.ts.map +1 -0
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/containers/CliArticle/CliArticle.d.ts +8 -0
- package/dist/types/src/containers/CliArticle/CliArticle.d.ts.map +1 -0
- package/dist/types/src/containers/{CliPanel/CliPanel.stories.d.ts → CliArticle/CliArticle.stories.d.ts} +33 -5
- package/dist/types/src/containers/CliArticle/CliArticle.stories.d.ts.map +1 -0
- package/dist/types/src/containers/CliArticle/index.d.ts +2 -0
- package/dist/types/src/containers/CliArticle/index.d.ts.map +1 -0
- package/dist/types/src/containers/{CliPanel → CliArticle}/useCliApp.d.ts +1 -1
- package/dist/types/src/containers/CliArticle/useCliApp.d.ts.map +1 -0
- package/dist/types/src/containers/DebugGraph/DebugGraph.d.ts +2 -1
- package/dist/types/src/containers/DebugGraph/DebugGraph.d.ts.map +1 -1
- package/dist/types/src/containers/DebugGraph/index.d.ts +1 -1
- package/dist/types/src/containers/DebugGraph/index.d.ts.map +1 -1
- package/dist/types/src/containers/DevtoolsOverviewContainer/DevtoolsOverviewContainer.d.ts.map +1 -1
- package/dist/types/src/containers/DevtoolsOverviewContainer/index.d.ts +1 -1
- package/dist/types/src/containers/DevtoolsOverviewContainer/index.d.ts.map +1 -1
- package/dist/types/src/containers/GithubPanel/GithubComponent.d.ts.map +1 -1
- package/dist/types/src/containers/GithubPanel/GithubComponent.stories.d.ts +30 -2
- package/dist/types/src/containers/GithubPanel/GithubComponent.stories.d.ts.map +1 -1
- package/dist/types/src/containers/GithubPanel/index.d.ts +1 -1
- package/dist/types/src/containers/GithubPanel/index.d.ts.map +1 -1
- package/dist/types/src/containers/RegistryArticle/RegistryArticle.d.ts +8 -0
- package/dist/types/src/containers/RegistryArticle/RegistryArticle.d.ts.map +1 -0
- package/dist/types/src/containers/RegistryArticle/index.d.ts +2 -0
- package/dist/types/src/containers/RegistryArticle/index.d.ts.map +1 -0
- package/dist/types/src/containers/ToolsExplorerContainer/ToolsExplorerContainer.d.ts +3 -1
- package/dist/types/src/containers/ToolsExplorerContainer/ToolsExplorerContainer.d.ts.map +1 -1
- package/dist/types/src/containers/ToolsExplorerContainer/index.d.ts +1 -1
- package/dist/types/src/containers/ToolsExplorerContainer/index.d.ts.map +1 -1
- package/dist/types/src/containers/index.d.ts +2 -2
- package/dist/types/src/containers/index.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +1 -2
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +30 -2
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/Devtools.d.ts +6 -0
- package/dist/types/src/types/Devtools.d.ts.map +1 -1
- package/dist/types/src/types/index.d.ts +2 -2
- package/dist/types/src/types/index.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/dx.config.ts +2 -2
- package/package.json +43 -39
- package/src/capabilities/DevtoolsCards.tsx +140 -0
- package/src/capabilities/DevtoolsSurfaces.tsx +32 -38
- package/src/capabilities/app-graph-builder.test.ts +75 -0
- package/src/capabilities/app-graph-builder.ts +324 -313
- package/src/capabilities/gen/browser.ts +61 -0
- package/src/capabilities/gen/node.ts +4 -4
- package/src/capabilities/gen/tauri.ts +61 -0
- package/src/capabilities/gen/workerd.ts +2 -2
- package/src/capabilities/index.ts +7 -7
- package/src/capabilities/react-context.tsx +1 -1
- package/src/capabilities/react-surface.ts +222 -79
- package/src/containers/{CliPanel/CliPanel.stories.tsx → CliArticle/CliArticle.stories.tsx} +9 -10
- package/src/containers/{CliPanel/CliPanel.tsx → CliArticle/CliArticle.tsx} +7 -7
- package/src/containers/CliArticle/index.ts +5 -0
- package/src/containers/{CliPanel → CliArticle}/useCliApp.ts +17 -12
- package/src/containers/DebugGraph/DebugGraph.tsx +7 -6
- package/src/containers/DebugGraph/index.ts +1 -1
- package/src/containers/DevtoolsOverviewContainer/DevtoolsOverviewContainer.tsx +72 -32
- package/src/containers/DevtoolsOverviewContainer/index.ts +1 -1
- package/src/containers/GithubPanel/GithubComponent.stories.tsx +2 -2
- package/src/containers/GithubPanel/GithubComponent.tsx +14 -11
- package/src/containers/GithubPanel/GithubPanel.tsx +2 -2
- package/src/containers/GithubPanel/index.ts +1 -1
- package/src/containers/{RegistryPanel/RegistryPanel.tsx → RegistryArticle/RegistryArticle.tsx} +11 -10
- package/src/containers/RegistryArticle/index.ts +5 -0
- package/src/containers/ToolsExplorerContainer/ToolsExplorerContainer.tsx +10 -3
- package/src/containers/ToolsExplorerContainer/index.ts +1 -1
- package/src/containers/index.ts +6 -6
- package/src/index.ts +1 -2
- package/src/meta.ts +1 -1
- package/src/plugin.test.ts +2 -2
- package/src/translations.ts +7 -3
- package/src/types/Devtools.ts +10 -0
- package/src/types/index.ts +2 -2
- package/dist/lib/chunk-CliPanel.mjs.map +0 -1
- package/dist/lib/chunk-RegistryPanel.mjs.map +0 -1
- package/dist/types/src/containers/CliPanel/CliPanel.d.ts +0 -6
- package/dist/types/src/containers/CliPanel/CliPanel.d.ts.map +0 -1
- package/dist/types/src/containers/CliPanel/CliPanel.stories.d.ts.map +0 -1
- package/dist/types/src/containers/CliPanel/index.d.ts +0 -2
- package/dist/types/src/containers/CliPanel/index.d.ts.map +0 -1
- package/dist/types/src/containers/CliPanel/useCliApp.d.ts.map +0 -1
- package/dist/types/src/containers/RegistryPanel/RegistryPanel.d.ts +0 -6
- package/dist/types/src/containers/RegistryPanel/RegistryPanel.d.ts.map +0 -1
- package/dist/types/src/containers/RegistryPanel/index.d.ts +0 -2
- package/dist/types/src/containers/RegistryPanel/index.d.ts.map +0 -1
- package/src/containers/CliPanel/index.ts +0 -5
- package/src/containers/RegistryPanel/index.ts +0 -5
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2026 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
// GENERATED by dx-plugin — do not edit. Sliced from ../index.ts for the 'browser' condition.
|
|
6
|
+
|
|
7
|
+
import { create } from '@bufbuild/protobuf';
|
|
8
|
+
import * as Effect from 'effect/Effect';
|
|
9
|
+
|
|
10
|
+
import * as Capability from '@dxos/app-framework/Capability';
|
|
11
|
+
import * as AppCapabilities from '@dxos/app-toolkit/AppCapabilities';
|
|
12
|
+
import * as AppCapability from '@dxos/app-toolkit/AppCapability';
|
|
13
|
+
import { Runtime_Client_StorageSchema } from '@dxos/protocols/buf/dxos/config_pb';
|
|
14
|
+
import { type Client } from '@dxos/react-client';
|
|
15
|
+
|
|
16
|
+
import { meta } from '#meta';
|
|
17
|
+
import { translations } from '#translations';
|
|
18
|
+
|
|
19
|
+
import pluginSpec from '../../../PLUGIN.mdl?raw';
|
|
20
|
+
|
|
21
|
+
const setupDevtools = () => {
|
|
22
|
+
(globalThis as any).composer ??= {};
|
|
23
|
+
|
|
24
|
+
// Used to test how composer handles breaking protocol changes.
|
|
25
|
+
(globalThis as any).composer.changeStorageVersionInMetadata = async (version: number) => {
|
|
26
|
+
const { changeStorageVersionInMetadata } = await import('@dxos/client-services/testing');
|
|
27
|
+
const { Storage } = await import('@dxos/client-services');
|
|
28
|
+
const client: Client = (window as any).dxos.client;
|
|
29
|
+
const config = client.config;
|
|
30
|
+
await client.destroy();
|
|
31
|
+
const { storage } = Storage.createStorageObjects(
|
|
32
|
+
config.values?.runtime?.client?.storage ?? create(Runtime_Client_StorageSchema, {}),
|
|
33
|
+
);
|
|
34
|
+
await changeStorageVersionInMetadata(storage, version);
|
|
35
|
+
location.pathname = '/';
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
export const AppGraphBuilder = AppCapability.appGraphBuilder(() => import('../app-graph-builder.ts'), {
|
|
40
|
+
requires: [AppCapabilities.AppGraph],
|
|
41
|
+
environments: ['browser', 'node', 'tauri'],
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
export const ReactContext = AppCapability.reactContext(() => import('../react-context.tsx'));
|
|
45
|
+
|
|
46
|
+
export const ReactSurface = AppCapability.surface(() => import('../react-surface.ts'), {
|
|
47
|
+
roles: ['org.dxos.plugin.debug.surface.page', 'org.dxos.role.deckCompanion.devtoolsOverview'],
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
export const SetupDevtools = Capability.inlineModule('setup-devtools', { provides: [] }, () =>
|
|
51
|
+
Effect.sync(() => setupDevtools()),
|
|
52
|
+
);
|
|
53
|
+
|
|
54
|
+
export const Translations = AppCapability.translations(translations);
|
|
55
|
+
|
|
56
|
+
export const PluginAsset = AppCapability.pluginAsset({
|
|
57
|
+
pluginId: meta.profile.key,
|
|
58
|
+
path: 'PLUGIN.mdl',
|
|
59
|
+
content: pluginSpec,
|
|
60
|
+
mimeType: 'application/x-mdl',
|
|
61
|
+
});
|
|
@@ -21,11 +21,11 @@ const setupDevtools = () => {
|
|
|
21
21
|
// Used to test how composer handles breaking protocol changes.
|
|
22
22
|
(globalThis as any).composer.changeStorageVersionInMetadata = async (version: number) => {
|
|
23
23
|
const { changeStorageVersionInMetadata } = await import('@dxos/client-services/testing');
|
|
24
|
-
const {
|
|
24
|
+
const { Storage } = await import('@dxos/client-services');
|
|
25
25
|
const client: Client = (window as any).dxos.client;
|
|
26
26
|
const config = client.config;
|
|
27
27
|
await client.destroy();
|
|
28
|
-
const { storage } = createStorageObjects(
|
|
28
|
+
const { storage } = Storage.createStorageObjects(
|
|
29
29
|
config.values?.runtime?.client?.storage ?? create(Runtime_Client_StorageSchema, {}),
|
|
30
30
|
);
|
|
31
31
|
await changeStorageVersionInMetadata(storage, version);
|
|
@@ -33,9 +33,9 @@ const setupDevtools = () => {
|
|
|
33
33
|
};
|
|
34
34
|
};
|
|
35
35
|
|
|
36
|
-
export const AppGraphBuilder = AppCapability.appGraphBuilder(() => import('../app-graph-builder'), {
|
|
36
|
+
export const AppGraphBuilder = AppCapability.appGraphBuilder(() => import('../app-graph-builder.ts'), {
|
|
37
37
|
requires: [AppCapabilities.AppGraph],
|
|
38
|
-
environments: ['node'],
|
|
38
|
+
environments: ['browser', 'node', 'tauri'],
|
|
39
39
|
});
|
|
40
40
|
|
|
41
41
|
export const SetupDevtools = Capability.inlineModule('setup-devtools', { provides: [] }, () =>
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2026 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
// GENERATED by dx-plugin — do not edit. Sliced from ../index.ts for the 'tauri' condition.
|
|
6
|
+
|
|
7
|
+
import { create } from '@bufbuild/protobuf';
|
|
8
|
+
import * as Effect from 'effect/Effect';
|
|
9
|
+
|
|
10
|
+
import * as Capability from '@dxos/app-framework/Capability';
|
|
11
|
+
import * as AppCapabilities from '@dxos/app-toolkit/AppCapabilities';
|
|
12
|
+
import * as AppCapability from '@dxos/app-toolkit/AppCapability';
|
|
13
|
+
import { Runtime_Client_StorageSchema } from '@dxos/protocols/buf/dxos/config_pb';
|
|
14
|
+
import { type Client } from '@dxos/react-client';
|
|
15
|
+
|
|
16
|
+
import { meta } from '#meta';
|
|
17
|
+
import { translations } from '#translations';
|
|
18
|
+
|
|
19
|
+
import pluginSpec from '../../../PLUGIN.mdl?raw';
|
|
20
|
+
|
|
21
|
+
const setupDevtools = () => {
|
|
22
|
+
(globalThis as any).composer ??= {};
|
|
23
|
+
|
|
24
|
+
// Used to test how composer handles breaking protocol changes.
|
|
25
|
+
(globalThis as any).composer.changeStorageVersionInMetadata = async (version: number) => {
|
|
26
|
+
const { changeStorageVersionInMetadata } = await import('@dxos/client-services/testing');
|
|
27
|
+
const { Storage } = await import('@dxos/client-services');
|
|
28
|
+
const client: Client = (window as any).dxos.client;
|
|
29
|
+
const config = client.config;
|
|
30
|
+
await client.destroy();
|
|
31
|
+
const { storage } = Storage.createStorageObjects(
|
|
32
|
+
config.values?.runtime?.client?.storage ?? create(Runtime_Client_StorageSchema, {}),
|
|
33
|
+
);
|
|
34
|
+
await changeStorageVersionInMetadata(storage, version);
|
|
35
|
+
location.pathname = '/';
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
export const AppGraphBuilder = AppCapability.appGraphBuilder(() => import('../app-graph-builder.ts'), {
|
|
40
|
+
requires: [AppCapabilities.AppGraph],
|
|
41
|
+
environments: ['browser', 'node', 'tauri'],
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
export const ReactContext = AppCapability.reactContext(() => import('../react-context.tsx'));
|
|
45
|
+
|
|
46
|
+
export const ReactSurface = AppCapability.surface(() => import('../react-surface.ts'), {
|
|
47
|
+
roles: ['org.dxos.plugin.debug.surface.page', 'org.dxos.role.deckCompanion.devtoolsOverview'],
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
export const SetupDevtools = Capability.inlineModule('setup-devtools', { provides: [] }, () =>
|
|
51
|
+
Effect.sync(() => setupDevtools()),
|
|
52
|
+
);
|
|
53
|
+
|
|
54
|
+
export const Translations = AppCapability.translations(translations);
|
|
55
|
+
|
|
56
|
+
export const PluginAsset = AppCapability.pluginAsset({
|
|
57
|
+
pluginId: meta.profile.key,
|
|
58
|
+
path: 'PLUGIN.mdl',
|
|
59
|
+
content: pluginSpec,
|
|
60
|
+
mimeType: 'application/x-mdl',
|
|
61
|
+
});
|
|
@@ -20,11 +20,11 @@ const setupDevtools = () => {
|
|
|
20
20
|
// Used to test how composer handles breaking protocol changes.
|
|
21
21
|
(globalThis as any).composer.changeStorageVersionInMetadata = async (version: number) => {
|
|
22
22
|
const { changeStorageVersionInMetadata } = await import('@dxos/client-services/testing');
|
|
23
|
-
const {
|
|
23
|
+
const { Storage } = await import('@dxos/client-services');
|
|
24
24
|
const client: Client = (window as any).dxos.client;
|
|
25
25
|
const config = client.config;
|
|
26
26
|
await client.destroy();
|
|
27
|
-
const { storage } = createStorageObjects(
|
|
27
|
+
const { storage } = Storage.createStorageObjects(
|
|
28
28
|
config.values?.runtime?.client?.storage ?? create(Runtime_Client_StorageSchema, {}),
|
|
29
29
|
);
|
|
30
30
|
await changeStorageVersionInMetadata(storage, version);
|
|
@@ -17,13 +17,13 @@ import { translations } from '#translations';
|
|
|
17
17
|
// eslint-disable-next-line import/no-relative-packages
|
|
18
18
|
import pluginSpec from '../../PLUGIN.mdl?raw';
|
|
19
19
|
|
|
20
|
-
export const AppGraphBuilder = AppCapability.appGraphBuilder(() => import('./app-graph-builder'), {
|
|
20
|
+
export const AppGraphBuilder = AppCapability.appGraphBuilder(() => import('./app-graph-builder.ts'), {
|
|
21
21
|
requires: [AppCapabilities.AppGraph],
|
|
22
|
-
environments: ['node'],
|
|
22
|
+
environments: ['browser', 'node', 'tauri'],
|
|
23
23
|
});
|
|
24
|
-
export const ReactContext = AppCapability.reactContext(() => import('./react-context'));
|
|
25
|
-
export const ReactSurface = AppCapability.surface(() => import('./react-surface'), {
|
|
26
|
-
roles: ['org.dxos.
|
|
24
|
+
export const ReactContext = AppCapability.reactContext(() => import('./react-context.tsx'));
|
|
25
|
+
export const ReactSurface = AppCapability.surface(() => import('./react-surface.ts'), {
|
|
26
|
+
roles: ['org.dxos.plugin.debug.surface.page', 'org.dxos.role.deckCompanion.devtoolsOverview'],
|
|
27
27
|
});
|
|
28
28
|
export const SetupDevtools = Capability.inlineModule('setup-devtools', { provides: [] }, () =>
|
|
29
29
|
Effect.sync(() => setupDevtools()),
|
|
@@ -42,11 +42,11 @@ const setupDevtools = () => {
|
|
|
42
42
|
// Used to test how composer handles breaking protocol changes.
|
|
43
43
|
(globalThis as any).composer.changeStorageVersionInMetadata = async (version: number) => {
|
|
44
44
|
const { changeStorageVersionInMetadata } = await import('@dxos/client-services/testing');
|
|
45
|
-
const {
|
|
45
|
+
const { Storage } = await import('@dxos/client-services');
|
|
46
46
|
const client: Client = (window as any).dxos.client;
|
|
47
47
|
const config = client.config;
|
|
48
48
|
await client.destroy();
|
|
49
|
-
const { storage } = createStorageObjects(
|
|
49
|
+
const { storage } = Storage.createStorageObjects(
|
|
50
50
|
config.values?.runtime?.client?.storage ?? create(Runtime_Client_StorageSchema, {}),
|
|
51
51
|
);
|
|
52
52
|
await changeStorageVersionInMetadata(storage, version);
|
|
@@ -7,7 +7,7 @@ import React from 'react';
|
|
|
7
7
|
|
|
8
8
|
import * as Capabilities from '@dxos/app-framework/Capabilities';
|
|
9
9
|
import * as Capability from '@dxos/app-framework/Capability';
|
|
10
|
-
import
|
|
10
|
+
import * as Surface from '@dxos/app-framework/Surface';
|
|
11
11
|
import { DevtoolsContextProvider } from '@dxos/devtools';
|
|
12
12
|
|
|
13
13
|
import { meta } from '#meta';
|
|
@@ -6,43 +6,67 @@ import * as Effect from 'effect/Effect';
|
|
|
6
6
|
|
|
7
7
|
import * as Capabilities from '@dxos/app-framework/Capabilities';
|
|
8
8
|
import * as Capability from '@dxos/app-framework/Capability';
|
|
9
|
-
import
|
|
9
|
+
import * as Surface from '@dxos/app-framework/Surface';
|
|
10
10
|
import type * as AppGraph from '@dxos/app-graph/AppGraph';
|
|
11
|
-
import
|
|
11
|
+
import * as AppSurface from '@dxos/app-toolkit/AppSurface';
|
|
12
12
|
import {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
13
|
+
AutomergeArticle,
|
|
14
|
+
ConfigArticle,
|
|
15
|
+
CredentialsArticle,
|
|
16
|
+
DatabaseCard,
|
|
17
|
+
DeviceListArticle,
|
|
18
|
+
DiagnosticsArticle,
|
|
19
|
+
EdgeDashboardArticle,
|
|
20
|
+
FeedsArticle,
|
|
21
|
+
IdentityArticle,
|
|
22
|
+
KeyringArticle,
|
|
23
|
+
LoggingArticle,
|
|
24
|
+
MembersArticle,
|
|
25
|
+
MemoryCard,
|
|
26
|
+
MetadataArticle,
|
|
27
|
+
NetworkArticle,
|
|
28
|
+
NetworkCard,
|
|
29
|
+
ObjectsArticle,
|
|
30
|
+
PerformanceCard,
|
|
31
|
+
QueriesArticle,
|
|
32
|
+
QueuesArticle,
|
|
33
|
+
ReplicatorCard,
|
|
34
|
+
ReplicatorMessagesCard,
|
|
35
|
+
SchemaArticle,
|
|
36
|
+
SignalArticle,
|
|
37
|
+
SqliteArticle,
|
|
38
|
+
StorageArticle,
|
|
39
|
+
SwarmArticle,
|
|
40
|
+
TimeSeriesCard,
|
|
41
|
+
WorkflowArticle,
|
|
34
42
|
} from '@dxos/devtools';
|
|
43
|
+
import * as DebugSurface from '@dxos/plugin-debug/DebugSurface';
|
|
35
44
|
|
|
36
|
-
import {
|
|
45
|
+
import {
|
|
46
|
+
CliArticle,
|
|
47
|
+
DebugGraph,
|
|
48
|
+
DevtoolsOverviewContainer,
|
|
49
|
+
RegistryArticle,
|
|
50
|
+
ToolsExplorerContainer,
|
|
51
|
+
} from '#containers';
|
|
37
52
|
import { Devtools } from '#types';
|
|
38
53
|
|
|
54
|
+
import {
|
|
55
|
+
EdgeCardSurface,
|
|
56
|
+
IndexerCardSurface,
|
|
57
|
+
QueriesCardSurface,
|
|
58
|
+
SurfaceProfilerCardSurface,
|
|
59
|
+
SwarmTraceCardSurface,
|
|
60
|
+
SyncCardSurface,
|
|
61
|
+
devtoolsCard,
|
|
62
|
+
} from './DevtoolsCards.tsx';
|
|
39
63
|
import {
|
|
40
64
|
ActiveSpacePanel,
|
|
41
65
|
EdgeTestingSurface,
|
|
42
66
|
EdgeTracesSurface,
|
|
43
67
|
SpaceInfoSurface,
|
|
44
68
|
SpaceListSurface,
|
|
45
|
-
} from './DevtoolsSurfaces';
|
|
69
|
+
} from './DevtoolsSurfaces.tsx';
|
|
46
70
|
|
|
47
71
|
type GraphDebug = {
|
|
48
72
|
graph: AppGraph.Graph;
|
|
@@ -69,24 +93,27 @@ export default Capability.makeModule(
|
|
|
69
93
|
return Capability.contribute(Capabilities.ReactSurface, [
|
|
70
94
|
Surface.create({
|
|
71
95
|
id: 'appGraph',
|
|
72
|
-
filter: AppSurface.subject(
|
|
96
|
+
filter: AppSurface.subject(DebugSurface.Page, isGraphDebug),
|
|
73
97
|
component: DebugGraph,
|
|
74
|
-
props: ({ data: { subject } }) => ({ graph: subject.graph, root: subject.root }),
|
|
98
|
+
props: ({ role, data: { subject } }) => ({ role, graph: subject.graph, root: subject.root }),
|
|
75
99
|
}),
|
|
76
100
|
Surface.create({
|
|
77
101
|
id: 'toolsExplorer',
|
|
78
|
-
filter: AppSurface.literal(
|
|
102
|
+
filter: AppSurface.literal(DebugSurface.Page, Devtools.ToolsExplorer),
|
|
79
103
|
component: ToolsExplorerContainer,
|
|
104
|
+
props: ({ role }) => ({ role }),
|
|
80
105
|
}),
|
|
81
106
|
Surface.create({
|
|
82
107
|
id: 'cli',
|
|
83
|
-
filter: AppSurface.literal(
|
|
84
|
-
component:
|
|
108
|
+
filter: AppSurface.literal(DebugSurface.Page, Devtools.Cli),
|
|
109
|
+
component: CliArticle,
|
|
110
|
+
props: ({ role }) => ({ role }),
|
|
85
111
|
}),
|
|
86
112
|
Surface.create({
|
|
87
113
|
id: 'registry',
|
|
88
|
-
filter: AppSurface.literal(
|
|
89
|
-
component:
|
|
114
|
+
filter: AppSurface.literal(DebugSurface.Page, Devtools.Echo.Registry),
|
|
115
|
+
component: RegistryArticle,
|
|
116
|
+
props: ({ role }) => ({ role }),
|
|
90
117
|
}),
|
|
91
118
|
Surface.create({
|
|
92
119
|
id: 'devtoolsOverview',
|
|
@@ -94,143 +121,259 @@ export default Capability.makeModule(
|
|
|
94
121
|
component: DevtoolsOverviewContainer,
|
|
95
122
|
}),
|
|
96
123
|
|
|
124
|
+
//
|
|
125
|
+
// Stats cards, in stack order.
|
|
126
|
+
//
|
|
127
|
+
|
|
128
|
+
Surface.create({
|
|
129
|
+
id: 'card.memory',
|
|
130
|
+
filter: devtoolsCard,
|
|
131
|
+
position: 0,
|
|
132
|
+
component: MemoryCard,
|
|
133
|
+
props: ({ data: { stats } }) => ({ memory: stats.memory }),
|
|
134
|
+
}),
|
|
135
|
+
Surface.create({
|
|
136
|
+
id: 'card.network',
|
|
137
|
+
filter: devtoolsCard,
|
|
138
|
+
position: 1,
|
|
139
|
+
component: NetworkCard,
|
|
140
|
+
props: ({ data: { stats } }) => ({ network: stats.network }),
|
|
141
|
+
}),
|
|
142
|
+
Surface.create({
|
|
143
|
+
id: 'card.edge',
|
|
144
|
+
filter: devtoolsCard,
|
|
145
|
+
position: 2,
|
|
146
|
+
component: EdgeCardSurface,
|
|
147
|
+
props: ({ data: { stats } }) => ({ stats }),
|
|
148
|
+
}),
|
|
149
|
+
Surface.create({
|
|
150
|
+
id: 'card.performance',
|
|
151
|
+
filter: devtoolsCard,
|
|
152
|
+
position: 3,
|
|
153
|
+
component: PerformanceCard,
|
|
154
|
+
props: ({ data: { stats } }) => ({ entries: stats.performanceEntries }),
|
|
155
|
+
}),
|
|
156
|
+
Surface.create({
|
|
157
|
+
id: 'card.swarmTrace',
|
|
158
|
+
filter: devtoolsCard,
|
|
159
|
+
position: 4,
|
|
160
|
+
component: SwarmTraceCardSurface,
|
|
161
|
+
}),
|
|
162
|
+
Surface.create({
|
|
163
|
+
id: 'card.surfaceProfiler',
|
|
164
|
+
filter: devtoolsCard,
|
|
165
|
+
position: 5,
|
|
166
|
+
component: SurfaceProfilerCardSurface,
|
|
167
|
+
props: ({ data: { surfaceProfilerStats, onClearSurfaceProfiler } }) => ({
|
|
168
|
+
surfaceProfilerStats,
|
|
169
|
+
onClearSurfaceProfiler,
|
|
170
|
+
}),
|
|
171
|
+
}),
|
|
172
|
+
Surface.create({
|
|
173
|
+
id: 'card.database',
|
|
174
|
+
filter: devtoolsCard,
|
|
175
|
+
position: 6,
|
|
176
|
+
component: DatabaseCard,
|
|
177
|
+
props: ({ data: { stats } }) => ({ database: stats.database }),
|
|
178
|
+
}),
|
|
179
|
+
Surface.create({
|
|
180
|
+
id: 'card.replicator',
|
|
181
|
+
filter: devtoolsCard,
|
|
182
|
+
position: 7,
|
|
183
|
+
component: ReplicatorCard,
|
|
184
|
+
props: ({ data: { stats } }) => ({ database: stats.database }),
|
|
185
|
+
}),
|
|
186
|
+
Surface.create({
|
|
187
|
+
id: 'card.replicatorMessages',
|
|
188
|
+
filter: devtoolsCard,
|
|
189
|
+
position: 8,
|
|
190
|
+
component: ReplicatorMessagesCard,
|
|
191
|
+
props: ({ data: { stats } }) => ({ database: stats.database }),
|
|
192
|
+
}),
|
|
193
|
+
Surface.create({
|
|
194
|
+
id: 'card.queries',
|
|
195
|
+
filter: devtoolsCard,
|
|
196
|
+
position: 9,
|
|
197
|
+
component: QueriesCardSurface,
|
|
198
|
+
}),
|
|
199
|
+
Surface.create({
|
|
200
|
+
id: 'card.sync',
|
|
201
|
+
filter: devtoolsCard,
|
|
202
|
+
position: 11,
|
|
203
|
+
component: SyncCardSurface,
|
|
204
|
+
}),
|
|
205
|
+
Surface.create({
|
|
206
|
+
id: 'card.indexer',
|
|
207
|
+
filter: devtoolsCard,
|
|
208
|
+
position: 12,
|
|
209
|
+
component: IndexerCardSurface,
|
|
210
|
+
}),
|
|
211
|
+
Surface.create({
|
|
212
|
+
id: 'card.timeSeries',
|
|
213
|
+
filter: devtoolsCard,
|
|
214
|
+
position: 13,
|
|
215
|
+
component: TimeSeriesCard,
|
|
216
|
+
}),
|
|
217
|
+
|
|
97
218
|
//
|
|
98
219
|
// Devtools
|
|
99
220
|
//
|
|
100
221
|
|
|
101
222
|
Surface.create({
|
|
102
223
|
id: 'client.config',
|
|
103
|
-
filter: AppSurface.literal(
|
|
104
|
-
component:
|
|
105
|
-
props: () => ({ vaultSelector: false }),
|
|
224
|
+
filter: AppSurface.literal(DebugSurface.Page, Devtools.Client.Config),
|
|
225
|
+
component: ConfigArticle,
|
|
226
|
+
props: ({ role }) => ({ role, vaultSelector: false }),
|
|
106
227
|
}),
|
|
107
228
|
Surface.create({
|
|
108
229
|
id: 'client.storage',
|
|
109
|
-
filter: AppSurface.literal(
|
|
110
|
-
component:
|
|
230
|
+
filter: AppSurface.literal(DebugSurface.Page, Devtools.Client.Storage),
|
|
231
|
+
component: StorageArticle,
|
|
232
|
+
props: ({ role }) => ({ role }),
|
|
111
233
|
}),
|
|
112
234
|
Surface.create({
|
|
113
235
|
id: 'client.sqlite',
|
|
114
|
-
filter: AppSurface.literal(
|
|
115
|
-
component:
|
|
236
|
+
filter: AppSurface.literal(DebugSurface.Page, Devtools.Client.Sqlite),
|
|
237
|
+
component: SqliteArticle,
|
|
238
|
+
props: ({ role }) => ({ role }),
|
|
116
239
|
}),
|
|
117
240
|
Surface.create({
|
|
118
241
|
id: 'client.logs',
|
|
119
|
-
filter: AppSurface.literal(
|
|
120
|
-
component:
|
|
242
|
+
filter: AppSurface.literal(DebugSurface.Page, Devtools.Client.Logs),
|
|
243
|
+
component: LoggingArticle,
|
|
244
|
+
props: ({ role }) => ({ role }),
|
|
121
245
|
}),
|
|
122
246
|
Surface.create({
|
|
123
247
|
id: 'client.diagnostics',
|
|
124
|
-
filter: AppSurface.literal(
|
|
125
|
-
component:
|
|
248
|
+
filter: AppSurface.literal(DebugSurface.Page, Devtools.Client.Diagnostics),
|
|
249
|
+
component: DiagnosticsArticle,
|
|
250
|
+
props: ({ role }) => ({ role }),
|
|
126
251
|
}),
|
|
127
252
|
Surface.create({
|
|
128
253
|
id: 'halo.identity',
|
|
129
|
-
filter: AppSurface.literal(
|
|
130
|
-
component:
|
|
254
|
+
filter: AppSurface.literal(DebugSurface.Page, Devtools.Halo.Identity),
|
|
255
|
+
component: IdentityArticle,
|
|
256
|
+
props: ({ role }) => ({ role }),
|
|
131
257
|
}),
|
|
132
258
|
Surface.create({
|
|
133
259
|
id: 'halo.devices',
|
|
134
|
-
filter: AppSurface.literal(
|
|
135
|
-
component:
|
|
260
|
+
filter: AppSurface.literal(DebugSurface.Page, Devtools.Halo.Devices),
|
|
261
|
+
component: DeviceListArticle,
|
|
262
|
+
props: ({ role }) => ({ role }),
|
|
136
263
|
}),
|
|
137
264
|
Surface.create({
|
|
138
265
|
id: 'halo.keyring',
|
|
139
|
-
filter: AppSurface.literal(
|
|
140
|
-
component:
|
|
266
|
+
filter: AppSurface.literal(DebugSurface.Page, Devtools.Halo.Keyring),
|
|
267
|
+
component: KeyringArticle,
|
|
268
|
+
props: ({ role }) => ({ role }),
|
|
141
269
|
}),
|
|
142
270
|
Surface.create({
|
|
143
271
|
id: 'halo.credentials',
|
|
144
|
-
filter: AppSurface.literal(
|
|
272
|
+
filter: AppSurface.literal(DebugSurface.Page, Devtools.Halo.Credentials),
|
|
145
273
|
component: ActiveSpacePanel,
|
|
146
|
-
props: () => ({ Panel:
|
|
274
|
+
props: ({ role }) => ({ role, Panel: CredentialsArticle }),
|
|
147
275
|
}),
|
|
148
276
|
Surface.create({
|
|
149
277
|
id: 'echo.spaces',
|
|
150
|
-
filter: AppSurface.literal(
|
|
278
|
+
filter: AppSurface.literal(DebugSurface.Page, Devtools.Echo.Spaces),
|
|
151
279
|
component: SpaceListSurface,
|
|
280
|
+
props: ({ role, data: { onNavigate } }) => ({ role, onNavigate }),
|
|
152
281
|
}),
|
|
153
282
|
Surface.create({
|
|
154
283
|
id: 'echo.space',
|
|
155
|
-
filter: AppSurface.literal(
|
|
284
|
+
filter: AppSurface.literal(DebugSurface.Page, Devtools.Echo.Space),
|
|
156
285
|
component: SpaceInfoSurface,
|
|
286
|
+
props: ({ role, data: { onNavigate } }) => ({ role, onNavigate }),
|
|
157
287
|
}),
|
|
158
288
|
Surface.create({
|
|
159
289
|
id: 'echo.feeds',
|
|
160
|
-
filter: AppSurface.literal(
|
|
290
|
+
filter: AppSurface.literal(DebugSurface.Page, Devtools.Echo.Feeds),
|
|
161
291
|
component: ActiveSpacePanel,
|
|
162
|
-
props: () => ({ Panel:
|
|
292
|
+
props: ({ role }) => ({ role, Panel: FeedsArticle }),
|
|
163
293
|
}),
|
|
164
294
|
Surface.create({
|
|
165
295
|
id: 'echo.objects',
|
|
166
|
-
filter: AppSurface.literal(
|
|
296
|
+
filter: AppSurface.literal(DebugSurface.Page, Devtools.Echo.Objects),
|
|
167
297
|
component: ActiveSpacePanel,
|
|
168
|
-
props: () => ({ Panel:
|
|
298
|
+
props: ({ role }) => ({ role, Panel: ObjectsArticle }),
|
|
299
|
+
}),
|
|
300
|
+
Surface.create({
|
|
301
|
+
id: 'echo.queries',
|
|
302
|
+
filter: AppSurface.literal(DebugSurface.Page, Devtools.Echo.Queries),
|
|
303
|
+
component: QueriesArticle,
|
|
304
|
+
props: ({ role }) => ({ role }),
|
|
169
305
|
}),
|
|
170
306
|
Surface.create({
|
|
171
307
|
id: 'echo.schema',
|
|
172
|
-
filter: AppSurface.literal(
|
|
308
|
+
filter: AppSurface.literal(DebugSurface.Page, Devtools.Echo.Schema),
|
|
173
309
|
component: ActiveSpacePanel,
|
|
174
|
-
props: () => ({ Panel:
|
|
310
|
+
props: ({ role }) => ({ role, Panel: SchemaArticle }),
|
|
175
311
|
}),
|
|
176
312
|
Surface.create({
|
|
177
313
|
id: 'echo.automerge',
|
|
178
|
-
filter: AppSurface.literal(
|
|
314
|
+
filter: AppSurface.literal(DebugSurface.Page, Devtools.Echo.Automerge),
|
|
179
315
|
component: ActiveSpacePanel,
|
|
180
|
-
props: () => ({ Panel:
|
|
316
|
+
props: ({ role }) => ({ role, Panel: AutomergeArticle }),
|
|
181
317
|
}),
|
|
182
318
|
Surface.create({
|
|
183
319
|
id: 'echo.queues',
|
|
184
|
-
filter: AppSurface.literal(
|
|
185
|
-
component:
|
|
320
|
+
filter: AppSurface.literal(DebugSurface.Page, Devtools.Echo.Queues),
|
|
321
|
+
component: QueuesArticle,
|
|
322
|
+
props: ({ role }) => ({ role }),
|
|
186
323
|
}),
|
|
187
324
|
Surface.create({
|
|
188
325
|
id: 'echo.members',
|
|
189
|
-
filter: AppSurface.literal(
|
|
326
|
+
filter: AppSurface.literal(DebugSurface.Page, Devtools.Echo.Members),
|
|
190
327
|
component: ActiveSpacePanel,
|
|
191
|
-
props: () => ({ Panel:
|
|
328
|
+
props: ({ role }) => ({ role, Panel: MembersArticle }),
|
|
192
329
|
}),
|
|
193
330
|
Surface.create({
|
|
194
331
|
id: 'echo.metadata',
|
|
195
|
-
filter: AppSurface.literal(
|
|
196
|
-
component:
|
|
332
|
+
filter: AppSurface.literal(DebugSurface.Page, Devtools.Echo.Metadata),
|
|
333
|
+
component: MetadataArticle,
|
|
334
|
+
props: ({ role }) => ({ role }),
|
|
197
335
|
}),
|
|
198
336
|
Surface.create({
|
|
199
337
|
id: 'mesh.signal',
|
|
200
|
-
filter: AppSurface.literal(
|
|
201
|
-
component:
|
|
338
|
+
filter: AppSurface.literal(DebugSurface.Page, Devtools.Mesh.Signal),
|
|
339
|
+
component: SignalArticle,
|
|
340
|
+
props: ({ role }) => ({ role }),
|
|
202
341
|
}),
|
|
203
342
|
Surface.create({
|
|
204
343
|
id: 'mesh.swarm',
|
|
205
|
-
filter: AppSurface.literal(
|
|
206
|
-
component:
|
|
344
|
+
filter: AppSurface.literal(DebugSurface.Page, Devtools.Mesh.Swarm),
|
|
345
|
+
component: SwarmArticle,
|
|
346
|
+
props: ({ role }) => ({ role }),
|
|
207
347
|
}),
|
|
208
348
|
Surface.create({
|
|
209
349
|
id: 'mesh.network',
|
|
210
|
-
filter: AppSurface.literal(
|
|
350
|
+
filter: AppSurface.literal(DebugSurface.Page, Devtools.Mesh.Network),
|
|
211
351
|
component: ActiveSpacePanel,
|
|
212
|
-
props: () => ({ Panel:
|
|
352
|
+
props: ({ role }) => ({ role, Panel: NetworkArticle }),
|
|
213
353
|
}),
|
|
214
354
|
Surface.create({
|
|
215
355
|
id: 'edge.dashboard',
|
|
216
|
-
filter: AppSurface.literal(
|
|
217
|
-
component:
|
|
356
|
+
filter: AppSurface.literal(DebugSurface.Page, Devtools.Edge.Dashboard),
|
|
357
|
+
component: EdgeDashboardArticle,
|
|
358
|
+
props: ({ role }) => ({ role }),
|
|
218
359
|
}),
|
|
219
360
|
Surface.create({
|
|
220
361
|
id: 'edge.workflows',
|
|
221
|
-
filter: AppSurface.literal(
|
|
362
|
+
filter: AppSurface.literal(DebugSurface.Page, Devtools.Edge.Workflows),
|
|
222
363
|
component: ActiveSpacePanel,
|
|
223
|
-
props: () => ({ Panel:
|
|
364
|
+
props: ({ role }) => ({ role, Panel: WorkflowArticle }),
|
|
224
365
|
}),
|
|
225
366
|
Surface.create({
|
|
226
367
|
id: 'edge.traces',
|
|
227
|
-
filter: AppSurface.literal(
|
|
368
|
+
filter: AppSurface.literal(DebugSurface.Page, Devtools.Edge.Traces),
|
|
228
369
|
component: EdgeTracesSurface,
|
|
370
|
+
props: ({ role }) => ({ role }),
|
|
229
371
|
}),
|
|
230
372
|
Surface.create({
|
|
231
373
|
id: 'edge.testing',
|
|
232
|
-
filter: AppSurface.literal(
|
|
374
|
+
filter: AppSurface.literal(DebugSurface.Page, Devtools.Edge.Testing),
|
|
233
375
|
component: EdgeTestingSurface,
|
|
376
|
+
props: ({ role }) => ({ role }),
|
|
234
377
|
}),
|
|
235
378
|
]);
|
|
236
379
|
}),
|