@dxos/plugin-registry 0.8.4-main.7ace549 → 0.8.4-main.937b3ca
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/app-graph-builder-P3ZGGFAR.mjs +166 -0
- package/dist/lib/browser/app-graph-builder-P3ZGGFAR.mjs.map +7 -0
- package/dist/lib/browser/{chunk-XPEFEID2.mjs → chunk-VOAOTNGS.mjs} +1 -1
- package/dist/lib/browser/chunk-VOAOTNGS.mjs.map +7 -0
- package/dist/lib/browser/cli/index.mjs +223 -0
- package/dist/lib/browser/cli/index.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +22 -29
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/operation-resolver-P5PKLPRT.mjs +24 -0
- package/dist/lib/browser/operation-resolver-P5PKLPRT.mjs.map +7 -0
- package/dist/lib/browser/react-surface-IIM6T7IA.mjs +337 -0
- package/dist/lib/browser/react-surface-IIM6T7IA.mjs.map +7 -0
- package/dist/lib/node-esm/app-graph-builder-56JXLOGZ.mjs +167 -0
- package/dist/lib/node-esm/app-graph-builder-56JXLOGZ.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-SALMIZ2W.mjs +21 -0
- package/dist/lib/node-esm/chunk-SALMIZ2W.mjs.map +7 -0
- package/dist/lib/node-esm/cli/index.mjs +224 -0
- package/dist/lib/node-esm/cli/index.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +63 -0
- package/dist/lib/node-esm/index.mjs.map +7 -0
- package/dist/lib/node-esm/meta.json +1 -0
- package/dist/lib/node-esm/operation-resolver-3ZB5W3T3.mjs +25 -0
- package/dist/lib/node-esm/operation-resolver-3ZB5W3T3.mjs.map +7 -0
- package/dist/lib/node-esm/react-surface-F67P7RC3.mjs +338 -0
- package/dist/lib/node-esm/react-surface-F67P7RC3.mjs.map +7 -0
- package/dist/types/src/RegistryPlugin.d.ts +2 -1
- package/dist/types/src/RegistryPlugin.d.ts.map +1 -1
- package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts +6 -0
- package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts.map +1 -0
- package/dist/types/src/capabilities/app-graph-builder/index.d.ts +3 -0
- package/dist/types/src/capabilities/app-graph-builder/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/index.d.ts +3 -3
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/operation-resolver/index.d.ts +3 -0
- package/dist/types/src/capabilities/operation-resolver/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts +5 -0
- package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-surface/index.d.ts +3 -0
- package/dist/types/src/capabilities/react-surface/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-surface/react-surface.d.ts +5 -0
- package/dist/types/src/capabilities/react-surface/react-surface.d.ts.map +1 -0
- package/dist/types/src/cli/commands/disable.d.ts +11 -0
- package/dist/types/src/cli/commands/disable.d.ts.map +1 -0
- package/dist/types/src/cli/commands/enable.d.ts +11 -0
- package/dist/types/src/cli/commands/enable.d.ts.map +1 -0
- package/dist/types/src/cli/commands/index.d.ts +3 -0
- package/dist/types/src/cli/commands/index.d.ts.map +1 -0
- package/dist/types/src/cli/commands/list.d.ts +7 -0
- package/dist/types/src/cli/commands/list.d.ts.map +1 -0
- package/dist/types/src/cli/commands/util.d.ts +11 -0
- package/dist/types/src/cli/commands/util.d.ts.map +1 -0
- package/dist/types/src/cli/index.d.ts +3 -0
- package/dist/types/src/cli/index.d.ts.map +1 -0
- package/dist/types/src/cli/plugin.d.ts +3 -0
- package/dist/types/src/cli/plugin.d.ts.map +1 -0
- package/dist/types/src/cli/storage.d.ts +18 -0
- package/dist/types/src/cli/storage.d.ts.map +1 -0
- package/dist/types/src/components/PluginDetail.d.ts +3 -3
- package/dist/types/src/components/PluginDetail.d.ts.map +1 -1
- package/dist/types/src/components/PluginDetail.stories.d.ts +1 -1
- package/dist/types/src/components/PluginDetail.stories.d.ts.map +1 -1
- package/dist/types/src/components/PluginItem.d.ts +2 -2
- package/dist/types/src/components/PluginItem.d.ts.map +1 -1
- package/dist/types/src/components/PluginList.d.ts +1 -1
- package/dist/types/src/components/PluginList.d.ts.map +1 -1
- package/dist/types/src/components/PluginList.stories.d.ts.map +1 -1
- package/dist/types/src/components/RegistryContainer.d.ts +4 -3
- package/dist/types/src/components/RegistryContainer.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +2 -2
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +47 -31
- package/src/RegistryPlugin.tsx +9 -24
- package/src/capabilities/app-graph-builder/app-graph-builder.ts +136 -0
- package/src/capabilities/app-graph-builder/index.ts +7 -0
- package/src/capabilities/index.ts +3 -5
- package/src/capabilities/operation-resolver/index.ts +7 -0
- package/src/capabilities/operation-resolver/operation-resolver.ts +23 -0
- package/src/capabilities/react-surface/index.ts +7 -0
- package/src/capabilities/react-surface/react-surface.tsx +99 -0
- package/src/cli/commands/disable.ts +47 -0
- package/src/cli/commands/enable.ts +44 -0
- package/src/cli/commands/index.ts +14 -0
- package/src/cli/commands/list.ts +41 -0
- package/src/cli/commands/util.ts +24 -0
- package/src/cli/index.ts +6 -0
- package/src/cli/plugin.ts +16 -0
- package/src/cli/storage.ts +57 -0
- package/src/components/PluginDetail.stories.tsx +14 -16
- package/src/components/PluginDetail.tsx +8 -11
- package/src/components/PluginItem.tsx +5 -5
- package/src/components/PluginList.stories.tsx +14 -17
- package/src/components/PluginList.tsx +2 -2
- package/src/components/RegistryContainer.tsx +43 -36
- package/src/meta.ts +2 -2
- package/dist/lib/browser/app-graph-builder-6CNBP3A4.mjs +0 -162
- package/dist/lib/browser/app-graph-builder-6CNBP3A4.mjs.map +0 -7
- package/dist/lib/browser/chunk-XPEFEID2.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-LKNUYBTN.mjs +0 -23
- package/dist/lib/browser/intent-resolver-LKNUYBTN.mjs.map +0 -7
- package/dist/lib/browser/react-surface-IGCXOVE2.mjs +0 -359
- package/dist/lib/browser/react-surface-IGCXOVE2.mjs.map +0 -7
- package/dist/types/src/capabilities/app-graph-builder.d.ts +0 -4
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +0 -1
- package/dist/types/src/capabilities/intent-resolver.d.ts +0 -4
- package/dist/types/src/capabilities/intent-resolver.d.ts.map +0 -1
- package/dist/types/src/capabilities/react-surface.d.ts +0 -4
- package/dist/types/src/capabilities/react-surface.d.ts.map +0 -1
- package/src/capabilities/app-graph-builder.ts +0 -156
- package/src/capabilities/intent-resolver.ts +0 -27
- package/src/capabilities/react-surface.tsx +0 -86
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
import {
|
|
2
|
+
REGISTRY_ID,
|
|
3
|
+
REGISTRY_KEY,
|
|
4
|
+
meta
|
|
5
|
+
} from "./chunk-VOAOTNGS.mjs";
|
|
6
|
+
|
|
7
|
+
// src/capabilities/app-graph-builder/app-graph-builder.ts
|
|
8
|
+
import * as Effect from "effect/Effect";
|
|
9
|
+
import { Capability, Common, SettingsOperation } from "@dxos/app-framework";
|
|
10
|
+
import { Operation } from "@dxos/operation";
|
|
11
|
+
import { GraphBuilder, NodeMatcher } from "@dxos/plugin-graph";
|
|
12
|
+
var app_graph_builder_default = Capability.makeModule(Effect.fnUntraced(function* () {
|
|
13
|
+
const capabilities = yield* Capability.Service;
|
|
14
|
+
const extensions = yield* Effect.all([
|
|
15
|
+
GraphBuilder.createExtension({
|
|
16
|
+
id: meta.id,
|
|
17
|
+
match: NodeMatcher.whenRoot,
|
|
18
|
+
actions: () => Effect.succeed([
|
|
19
|
+
{
|
|
20
|
+
id: meta.id,
|
|
21
|
+
data: () => Operation.invoke(SettingsOperation.OpenPluginRegistry),
|
|
22
|
+
properties: {
|
|
23
|
+
label: [
|
|
24
|
+
"open plugin registry label",
|
|
25
|
+
{
|
|
26
|
+
ns: meta.id
|
|
27
|
+
}
|
|
28
|
+
],
|
|
29
|
+
icon: "ph--squares-four--regular",
|
|
30
|
+
disposition: "menu"
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
])
|
|
34
|
+
}),
|
|
35
|
+
GraphBuilder.createExtension({
|
|
36
|
+
id: meta.id,
|
|
37
|
+
match: NodeMatcher.whenRoot,
|
|
38
|
+
connector: () => Effect.succeed([
|
|
39
|
+
{
|
|
40
|
+
id: REGISTRY_ID,
|
|
41
|
+
type: meta.id,
|
|
42
|
+
properties: {
|
|
43
|
+
label: [
|
|
44
|
+
"plugin registry label",
|
|
45
|
+
{
|
|
46
|
+
ns: meta.id
|
|
47
|
+
}
|
|
48
|
+
],
|
|
49
|
+
icon: "ph--squares-four--regular",
|
|
50
|
+
disposition: "pin-end",
|
|
51
|
+
testId: "treeView.pluginRegistry"
|
|
52
|
+
},
|
|
53
|
+
nodes: [
|
|
54
|
+
{
|
|
55
|
+
id: `${REGISTRY_KEY}+all`,
|
|
56
|
+
type: "category",
|
|
57
|
+
data: `${REGISTRY_KEY}+all`,
|
|
58
|
+
properties: {
|
|
59
|
+
label: [
|
|
60
|
+
"all plugins label",
|
|
61
|
+
{
|
|
62
|
+
ns: meta.id
|
|
63
|
+
}
|
|
64
|
+
],
|
|
65
|
+
icon: "ph--squares-four--regular",
|
|
66
|
+
key: REGISTRY_KEY,
|
|
67
|
+
testId: "pluginRegistry.all"
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
id: `${REGISTRY_KEY}+installed`,
|
|
72
|
+
type: "category",
|
|
73
|
+
data: `${REGISTRY_KEY}+installed`,
|
|
74
|
+
properties: {
|
|
75
|
+
label: [
|
|
76
|
+
"installed plugins label",
|
|
77
|
+
{
|
|
78
|
+
ns: meta.id
|
|
79
|
+
}
|
|
80
|
+
],
|
|
81
|
+
icon: "ph--check--regular",
|
|
82
|
+
key: REGISTRY_KEY,
|
|
83
|
+
testId: "pluginRegistry.installed"
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
id: `${REGISTRY_KEY}+recommended`,
|
|
88
|
+
type: "category",
|
|
89
|
+
data: `${REGISTRY_KEY}+recommended`,
|
|
90
|
+
properties: {
|
|
91
|
+
label: [
|
|
92
|
+
"recommended plugins label",
|
|
93
|
+
{
|
|
94
|
+
ns: meta.id
|
|
95
|
+
}
|
|
96
|
+
],
|
|
97
|
+
icon: "ph--star--regular",
|
|
98
|
+
key: REGISTRY_KEY,
|
|
99
|
+
testId: "pluginRegistry.recommended"
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
id: `${REGISTRY_KEY}+labs`,
|
|
104
|
+
type: "category",
|
|
105
|
+
data: `${REGISTRY_KEY}+labs`,
|
|
106
|
+
properties: {
|
|
107
|
+
label: [
|
|
108
|
+
"labs plugins label",
|
|
109
|
+
{
|
|
110
|
+
ns: meta.id
|
|
111
|
+
}
|
|
112
|
+
],
|
|
113
|
+
icon: "ph--flask--regular",
|
|
114
|
+
key: REGISTRY_KEY,
|
|
115
|
+
testId: "pluginRegistry.labs"
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
]
|
|
119
|
+
}
|
|
120
|
+
])
|
|
121
|
+
}),
|
|
122
|
+
GraphBuilder.createExtension({
|
|
123
|
+
id: `${meta.id}/actions`,
|
|
124
|
+
match: NodeMatcher.whenId(REGISTRY_ID),
|
|
125
|
+
actions: () => Effect.succeed([
|
|
126
|
+
{
|
|
127
|
+
id: `${meta.id}/load-by-url`,
|
|
128
|
+
data: Effect.fnUntraced(function* () {
|
|
129
|
+
}),
|
|
130
|
+
properties: {
|
|
131
|
+
label: [
|
|
132
|
+
"load by url label",
|
|
133
|
+
{
|
|
134
|
+
ns: meta.id
|
|
135
|
+
}
|
|
136
|
+
],
|
|
137
|
+
icon: "ph--cloud-arrow-down--regular",
|
|
138
|
+
disabled: true
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
])
|
|
142
|
+
}),
|
|
143
|
+
GraphBuilder.createExtension({
|
|
144
|
+
id: `${meta.id}/plugins`,
|
|
145
|
+
match: NodeMatcher.whenId(REGISTRY_ID),
|
|
146
|
+
connector: () => {
|
|
147
|
+
const manager = capabilities.get(Common.Capability.PluginManager);
|
|
148
|
+
return Effect.succeed(manager.getPlugins().map((plugin) => ({
|
|
149
|
+
id: plugin.meta.id.replaceAll("/", ":"),
|
|
150
|
+
type: "dxos.org/plugin",
|
|
151
|
+
data: plugin,
|
|
152
|
+
properties: {
|
|
153
|
+
label: plugin.meta.name ?? plugin.meta.id,
|
|
154
|
+
icon: plugin.meta.icon ?? "ph--circle--regular",
|
|
155
|
+
disposition: "hidden"
|
|
156
|
+
}
|
|
157
|
+
})));
|
|
158
|
+
}
|
|
159
|
+
})
|
|
160
|
+
]);
|
|
161
|
+
return Capability.contributes(Common.Capability.AppGraphBuilder, extensions);
|
|
162
|
+
}));
|
|
163
|
+
export {
|
|
164
|
+
app_graph_builder_default as default
|
|
165
|
+
};
|
|
166
|
+
//# sourceMappingURL=app-graph-builder-P3ZGGFAR.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/capabilities/app-graph-builder/app-graph-builder.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport { Capability, Common, SettingsOperation } from '@dxos/app-framework';\nimport { Operation } from '@dxos/operation';\nimport { GraphBuilder, NodeMatcher } from '@dxos/plugin-graph';\n\nimport { REGISTRY_ID, REGISTRY_KEY, meta } from '../../meta';\n\nexport default Capability.makeModule(\n Effect.fnUntraced(function* () {\n const capabilities = yield* Capability.Service;\n\n const extensions = yield* Effect.all([\n GraphBuilder.createExtension({\n id: meta.id,\n match: NodeMatcher.whenRoot,\n actions: () =>\n Effect.succeed([\n {\n id: meta.id,\n data: () => Operation.invoke(SettingsOperation.OpenPluginRegistry),\n properties: {\n label: ['open plugin registry label', { ns: meta.id }],\n icon: 'ph--squares-four--regular',\n disposition: 'menu',\n },\n },\n ]),\n }),\n GraphBuilder.createExtension({\n id: meta.id,\n match: NodeMatcher.whenRoot,\n connector: () =>\n Effect.succeed([\n {\n id: REGISTRY_ID,\n type: meta.id,\n properties: {\n label: ['plugin registry label', { ns: meta.id }],\n icon: 'ph--squares-four--regular',\n disposition: 'pin-end',\n testId: 'treeView.pluginRegistry',\n },\n nodes: [\n {\n id: `${REGISTRY_KEY}+all`,\n type: 'category',\n data: `${REGISTRY_KEY}+all`,\n properties: {\n label: ['all plugins label', { ns: meta.id }],\n icon: 'ph--squares-four--regular',\n key: REGISTRY_KEY,\n testId: 'pluginRegistry.all',\n },\n },\n {\n id: `${REGISTRY_KEY}+installed`,\n type: 'category',\n data: `${REGISTRY_KEY}+installed`,\n properties: {\n label: ['installed plugins label', { ns: meta.id }],\n icon: 'ph--check--regular',\n key: REGISTRY_KEY,\n testId: 'pluginRegistry.installed',\n },\n },\n {\n id: `${REGISTRY_KEY}+recommended`,\n type: 'category',\n data: `${REGISTRY_KEY}+recommended`,\n properties: {\n label: ['recommended plugins label', { ns: meta.id }],\n icon: 'ph--star--regular',\n key: REGISTRY_KEY,\n testId: 'pluginRegistry.recommended',\n },\n },\n {\n id: `${REGISTRY_KEY}+labs`,\n type: 'category',\n data: `${REGISTRY_KEY}+labs`,\n properties: {\n label: ['labs plugins label', { ns: meta.id }],\n icon: 'ph--flask--regular',\n key: REGISTRY_KEY,\n testId: 'pluginRegistry.labs',\n },\n },\n ],\n },\n ]),\n }),\n GraphBuilder.createExtension({\n id: `${meta.id}/actions`,\n match: NodeMatcher.whenId(REGISTRY_ID),\n actions: () =>\n Effect.succeed([\n {\n id: `${meta.id}/load-by-url`,\n data: Effect.fnUntraced(function* () {}),\n properties: {\n label: ['load by url label', { ns: meta.id }],\n icon: 'ph--cloud-arrow-down--regular',\n disabled: true,\n },\n },\n ]),\n }),\n GraphBuilder.createExtension({\n id: `${meta.id}/plugins`,\n match: NodeMatcher.whenId(REGISTRY_ID),\n connector: () => {\n const manager = capabilities.get(Common.Capability.PluginManager);\n return Effect.succeed(\n manager.getPlugins().map((plugin) => ({\n id: plugin.meta.id.replaceAll('/', ':'),\n type: 'dxos.org/plugin',\n data: plugin,\n properties: {\n label: plugin.meta.name ?? plugin.meta.id,\n icon: plugin.meta.icon ?? 'ph--circle--regular',\n disposition: 'hidden',\n },\n })),\n );\n },\n }),\n ]);\n\n return Capability.contributes(Common.Capability.AppGraphBuilder, extensions);\n }),\n);\n"],
|
|
5
|
+
"mappings": ";;;;;;;AAIA,YAAYA,YAAY;AAExB,SAASC,YAAYC,QAAQC,yBAAyB;AACtD,SAASC,iBAAiB;AAC1B,SAASC,cAAcC,mBAAmB;AAI1C,IAAA,4BAAeC,WAAWC,WACjBC,kBAAW,aAAA;AAChB,QAAMC,eAAe,OAAOH,WAAWI;AAEvC,QAAMC,aAAa,OAAcC,WAAI;IACnCC,aAAaC,gBAAgB;MAC3BC,IAAIC,KAAKD;MACTE,OAAOC,YAAYC;MACnBC,SAAS,MACAC,eAAQ;QACb;UACEN,IAAIC,KAAKD;UACTO,MAAM,MAAMC,UAAUC,OAAOC,kBAAkBC,kBAAkB;UACjEC,YAAY;YACVC,OAAO;cAAC;cAA8B;gBAAEC,IAAIb,KAAKD;cAAG;;YACpDe,MAAM;YACNC,aAAa;UACf;QACF;OACD;IACL,CAAA;IACAlB,aAAaC,gBAAgB;MAC3BC,IAAIC,KAAKD;MACTE,OAAOC,YAAYC;MACnBa,WAAW,MACFX,eAAQ;QACb;UACEN,IAAIkB;UACJC,MAAMlB,KAAKD;UACXY,YAAY;YACVC,OAAO;cAAC;cAAyB;gBAAEC,IAAIb,KAAKD;cAAG;;YAC/Ce,MAAM;YACNC,aAAa;YACbI,QAAQ;UACV;UACAC,OAAO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,WAAAA;MAC1BD,WAAW,MAAA;AACT,cAAMS,UAAUhC,aAAaiC,IAAIC,OAAOrC,WAAWsC,aAAa;AAChE,eAAcvB,eACZoB,QAAQI,WAAU,EAAGC,IAAI,CAACC,YAAY;UACpChC,IAAIgC,OAAO/B,KAAKD,GAAGiC,WAAW,KAAK,GAAA;UACnCd,MAAM;UACNZ,MAAMyB;UACNpB,YAAY;YACVC,OAAOmB,OAAO/B,KAAKiC,QAAQF,OAAO/B,KAAKD;YACvCe,MAAMiB,OAAO/B,KAAKc,QAAQ;YAC1BC,aAAa;UACf;QACF,EAAA,CAAA;MAEJ;IACF,CAAA;GACD;AAED,SAAOzB,WAAW4C,YAAYP,OAAOrC,WAAW6C,iBAAiBxC,UAAAA;AACnE,CAAA,CAAA;",
|
|
6
|
+
"names": ["Effect", "Capability", "Common", "SettingsOperation", "Operation", "GraphBuilder", "NodeMatcher", "Capability", "makeModule", "fnUntraced", "capabilities", "Service", "extensions", "all", "GraphBuilder", "createExtension", "id", "meta", "match", "NodeMatcher", "whenRoot", "actions", "succeed", "data", "Operation", "invoke", "SettingsOperation", "OpenPluginRegistry", "properties", "label", "ns", "icon", "disposition", "connector", "REGISTRY_ID", "type", "testId", "nodes", "REGISTRY_KEY", "key", "whenId", "disabled", "manager", "get", "Common", "PluginManager", "getPlugins", "map", "plugin", "replaceAll", "name", "contributes", "AppGraphBuilder"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/meta.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { type Plugin } from '@dxos/app-framework';\nimport { trim } from '@dxos/util';\n\n// TODO(wittjosiah): Deck does not currently support `/` in ids.\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.\nexport const REGISTRY_ID = '!dxos:plugin-registry';\nexport const REGISTRY_KEY = 'plugin-registry';\n\nexport const meta: Plugin.Meta = {\n id: 'dxos.org/plugin/registry',\n name: 'Plugins',\n description: trim`\n Plugin management system for discovering, installing, and configuring workspace extensions.\n Browse available plugins and customize your workspace capabilities.\n `,\n};\n"],
|
|
5
|
+
"mappings": ";AAKA,SAASA,YAAY;AAKd,IAAMC,cAAc;AACpB,IAAMC,eAAe;AAErB,IAAMC,OAAoB;EAC/BC,IAAI;EACJC,MAAM;EACNC,aAAaC;;;;AAIf;",
|
|
6
|
+
"names": ["trim", "REGISTRY_ID", "REGISTRY_KEY", "meta", "id", "name", "description", "trim"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
import {
|
|
2
|
+
meta
|
|
3
|
+
} from "../chunk-VOAOTNGS.mjs";
|
|
4
|
+
|
|
5
|
+
// src/cli/plugin.ts
|
|
6
|
+
import { Common, Plugin as Plugin4 } from "@dxos/app-framework";
|
|
7
|
+
|
|
8
|
+
// src/cli/commands/index.ts
|
|
9
|
+
import * as Command4 from "@effect/cli/Command";
|
|
10
|
+
|
|
11
|
+
// src/cli/commands/disable.ts
|
|
12
|
+
import * as Args from "@effect/cli/Args";
|
|
13
|
+
import * as Command from "@effect/cli/Command";
|
|
14
|
+
import * as Console from "effect/Console";
|
|
15
|
+
import * as Effect2 from "effect/Effect";
|
|
16
|
+
import { Plugin } from "@dxos/app-framework";
|
|
17
|
+
import { CommandConfig } from "@dxos/cli-util";
|
|
18
|
+
import { invariant } from "@dxos/invariant";
|
|
19
|
+
|
|
20
|
+
// src/cli/storage.ts
|
|
21
|
+
import * as FileSystem from "@effect/platform/FileSystem";
|
|
22
|
+
import * as Path from "@effect/platform/Path";
|
|
23
|
+
import * as Effect from "effect/Effect";
|
|
24
|
+
import * as Schema from "effect/Schema";
|
|
25
|
+
import { DX_CONFIG, getProfilePath } from "@dxos/client-protocol";
|
|
26
|
+
var PLUGINS_FILE = "plugins.json";
|
|
27
|
+
var PluginsSchema = Schema.Array(Schema.String);
|
|
28
|
+
var getPluginsPath = (profile) => Effect.gen(function* () {
|
|
29
|
+
const path = yield* Path.Path;
|
|
30
|
+
return path.join(getProfilePath(DX_CONFIG, profile), PLUGINS_FILE);
|
|
31
|
+
});
|
|
32
|
+
var loadEnabledPlugins = Effect.fn(function* ({ profile }) {
|
|
33
|
+
const fs = yield* FileSystem.FileSystem;
|
|
34
|
+
const pluginsPath = yield* getPluginsPath(profile);
|
|
35
|
+
const content = yield* fs.readFileString(pluginsPath).pipe(Effect.catchTag("SystemError", () => Effect.succeed("[]")));
|
|
36
|
+
const parsed = yield* Schema.decodeUnknown(Schema.parseJson(PluginsSchema))(content).pipe(Effect.catchAll(() => Effect.succeed([])));
|
|
37
|
+
return parsed;
|
|
38
|
+
});
|
|
39
|
+
var saveEnabledPlugins = Effect.fn(function* ({ profile, enabled }) {
|
|
40
|
+
const fs = yield* FileSystem.FileSystem;
|
|
41
|
+
const pluginsPath = yield* getPluginsPath(profile);
|
|
42
|
+
const profileDir = getProfilePath(DX_CONFIG, profile);
|
|
43
|
+
yield* fs.makeDirectory(profileDir, {
|
|
44
|
+
recursive: true
|
|
45
|
+
});
|
|
46
|
+
const encoded = Schema.encodeSync(Schema.parseJson(PluginsSchema))(enabled);
|
|
47
|
+
yield* fs.writeFileString(pluginsPath, encoded + "\n");
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
// src/cli/commands/disable.ts
|
|
51
|
+
var __dxlog_file = "/__w/dxos/dxos/packages/plugins/plugin-registry/src/cli/commands/disable.ts";
|
|
52
|
+
var handler = Effect2.fn(function* ({ id }) {
|
|
53
|
+
const { json, profile } = yield* CommandConfig;
|
|
54
|
+
const manager = yield* Plugin.Service;
|
|
55
|
+
const plugins = manager.getPlugins();
|
|
56
|
+
const plugin2 = plugins.find((p) => p.meta.id === id);
|
|
57
|
+
invariant(plugin2, `Plugin not found: ${id}`, {
|
|
58
|
+
F: __dxlog_file,
|
|
59
|
+
L: 22,
|
|
60
|
+
S: this,
|
|
61
|
+
A: [
|
|
62
|
+
"plugin",
|
|
63
|
+
"`Plugin not found: ${id}`"
|
|
64
|
+
]
|
|
65
|
+
});
|
|
66
|
+
const core = manager.getCore();
|
|
67
|
+
invariant(!core.includes(id), `Cannot disable core plugin: ${id}`, {
|
|
68
|
+
F: __dxlog_file,
|
|
69
|
+
L: 25,
|
|
70
|
+
S: this,
|
|
71
|
+
A: [
|
|
72
|
+
"!core.includes(id)",
|
|
73
|
+
"`Cannot disable core plugin: ${id}`"
|
|
74
|
+
]
|
|
75
|
+
});
|
|
76
|
+
const disabled = yield* manager.disable(id);
|
|
77
|
+
invariant(disabled, `Failed to disable plugin: ${id}`, {
|
|
78
|
+
F: __dxlog_file,
|
|
79
|
+
L: 28,
|
|
80
|
+
S: this,
|
|
81
|
+
A: [
|
|
82
|
+
"disabled",
|
|
83
|
+
"`Failed to disable plugin: ${id}`"
|
|
84
|
+
]
|
|
85
|
+
});
|
|
86
|
+
const enabledPlugins = manager.getEnabled();
|
|
87
|
+
yield* saveEnabledPlugins({
|
|
88
|
+
profile,
|
|
89
|
+
enabled: [
|
|
90
|
+
...enabledPlugins
|
|
91
|
+
]
|
|
92
|
+
});
|
|
93
|
+
if (json) {
|
|
94
|
+
yield* Console.log(JSON.stringify({
|
|
95
|
+
id,
|
|
96
|
+
enabled: false
|
|
97
|
+
}, null, 2));
|
|
98
|
+
} else {
|
|
99
|
+
yield* Console.log(`Plugin "${plugin2.meta.name ?? id}" disabled.`);
|
|
100
|
+
}
|
|
101
|
+
});
|
|
102
|
+
var disable = Command.make("disable", {
|
|
103
|
+
id: Args.text({
|
|
104
|
+
name: "id"
|
|
105
|
+
}).pipe(Args.withDescription("The ID of the plugin to disable."))
|
|
106
|
+
}, handler).pipe(Command.withDescription("Disable a plugin."));
|
|
107
|
+
|
|
108
|
+
// src/cli/commands/enable.ts
|
|
109
|
+
import * as Args2 from "@effect/cli/Args";
|
|
110
|
+
import * as Command2 from "@effect/cli/Command";
|
|
111
|
+
import * as Console2 from "effect/Console";
|
|
112
|
+
import * as Effect3 from "effect/Effect";
|
|
113
|
+
import { Plugin as Plugin2 } from "@dxos/app-framework";
|
|
114
|
+
import { CommandConfig as CommandConfig2 } from "@dxos/cli-util";
|
|
115
|
+
import { invariant as invariant2 } from "@dxos/invariant";
|
|
116
|
+
var __dxlog_file2 = "/__w/dxos/dxos/packages/plugins/plugin-registry/src/cli/commands/enable.ts";
|
|
117
|
+
var handler2 = Effect3.fn(function* ({ id }) {
|
|
118
|
+
const { json, profile } = yield* CommandConfig2;
|
|
119
|
+
const manager = yield* Plugin2.Service;
|
|
120
|
+
const plugins = manager.getPlugins();
|
|
121
|
+
const plugin2 = plugins.find((p) => p.meta.id === id);
|
|
122
|
+
invariant2(plugin2, `Plugin not found: ${id}`, {
|
|
123
|
+
F: __dxlog_file2,
|
|
124
|
+
L: 22,
|
|
125
|
+
S: this,
|
|
126
|
+
A: [
|
|
127
|
+
"plugin",
|
|
128
|
+
"`Plugin not found: ${id}`"
|
|
129
|
+
]
|
|
130
|
+
});
|
|
131
|
+
const enabled = yield* manager.enable(id);
|
|
132
|
+
invariant2(enabled, `Failed to enable plugin: ${id}`, {
|
|
133
|
+
F: __dxlog_file2,
|
|
134
|
+
L: 25,
|
|
135
|
+
S: this,
|
|
136
|
+
A: [
|
|
137
|
+
"enabled",
|
|
138
|
+
"`Failed to enable plugin: ${id}`"
|
|
139
|
+
]
|
|
140
|
+
});
|
|
141
|
+
const enabledPlugins = manager.getEnabled();
|
|
142
|
+
yield* saveEnabledPlugins({
|
|
143
|
+
profile,
|
|
144
|
+
enabled: [
|
|
145
|
+
...enabledPlugins
|
|
146
|
+
]
|
|
147
|
+
});
|
|
148
|
+
if (json) {
|
|
149
|
+
yield* Console2.log(JSON.stringify({
|
|
150
|
+
id,
|
|
151
|
+
enabled: true
|
|
152
|
+
}, null, 2));
|
|
153
|
+
} else {
|
|
154
|
+
yield* Console2.log(`Plugin "${plugin2.meta.name ?? id}" enabled.`);
|
|
155
|
+
}
|
|
156
|
+
});
|
|
157
|
+
var enable = Command2.make("enable", {
|
|
158
|
+
id: Args2.text({
|
|
159
|
+
name: "id"
|
|
160
|
+
}).pipe(Args2.withDescription("The ID of the plugin to enable."))
|
|
161
|
+
}, handler2).pipe(Command2.withDescription("Enable a plugin."));
|
|
162
|
+
|
|
163
|
+
// src/cli/commands/list.ts
|
|
164
|
+
import * as Command3 from "@effect/cli/Command";
|
|
165
|
+
import * as Console3 from "effect/Console";
|
|
166
|
+
import * as Effect4 from "effect/Effect";
|
|
167
|
+
import { Plugin as Plugin3 } from "@dxos/app-framework";
|
|
168
|
+
import { CommandConfig as CommandConfig3, printList } from "@dxos/cli-util";
|
|
169
|
+
|
|
170
|
+
// src/cli/commands/util.ts
|
|
171
|
+
import { FormBuilder } from "@dxos/cli-util";
|
|
172
|
+
var printPlugin = (plugin2) => {
|
|
173
|
+
const status = plugin2.core ? "core" : plugin2.enabled ? "enabled" : "disabled";
|
|
174
|
+
return FormBuilder.make({
|
|
175
|
+
title: plugin2.name
|
|
176
|
+
}).pipe(FormBuilder.set("id", plugin2.id), FormBuilder.set("status", status), FormBuilder.build);
|
|
177
|
+
};
|
|
178
|
+
|
|
179
|
+
// src/cli/commands/list.ts
|
|
180
|
+
var handler3 = Effect4.fn(function* () {
|
|
181
|
+
const { json } = yield* CommandConfig3;
|
|
182
|
+
const manager = yield* Plugin3.Service;
|
|
183
|
+
const plugins = manager.getPlugins();
|
|
184
|
+
const enabled = manager.getEnabled();
|
|
185
|
+
const core = manager.getCore();
|
|
186
|
+
const formattedPlugins = plugins.map((plugin2) => {
|
|
187
|
+
const isEnabled = enabled.includes(plugin2.meta.id);
|
|
188
|
+
const isCore = core.includes(plugin2.meta.id);
|
|
189
|
+
return {
|
|
190
|
+
id: plugin2.meta.id,
|
|
191
|
+
name: plugin2.meta.name ?? plugin2.meta.id,
|
|
192
|
+
enabled: isEnabled,
|
|
193
|
+
core: isCore
|
|
194
|
+
};
|
|
195
|
+
});
|
|
196
|
+
if (json) {
|
|
197
|
+
yield* Console3.log(JSON.stringify(formattedPlugins, null, 2));
|
|
198
|
+
} else {
|
|
199
|
+
const formatted = formattedPlugins.map(printPlugin);
|
|
200
|
+
yield* Console3.log(printList(formatted));
|
|
201
|
+
}
|
|
202
|
+
});
|
|
203
|
+
var list = Command3.make("list", {}, handler3).pipe(Command3.withDescription("List all available plugins."));
|
|
204
|
+
|
|
205
|
+
// src/cli/commands/index.ts
|
|
206
|
+
var plugin = Command4.make("plugin").pipe(Command4.withDescription("Manage plugins."), Command4.withSubcommands([
|
|
207
|
+
enable,
|
|
208
|
+
disable,
|
|
209
|
+
list
|
|
210
|
+
]));
|
|
211
|
+
|
|
212
|
+
// src/cli/plugin.ts
|
|
213
|
+
var RegistryPlugin = Plugin4.define(meta).pipe(Common.Plugin.addCommandModule({
|
|
214
|
+
commands: [
|
|
215
|
+
plugin
|
|
216
|
+
]
|
|
217
|
+
}), Plugin4.make);
|
|
218
|
+
export {
|
|
219
|
+
RegistryPlugin,
|
|
220
|
+
loadEnabledPlugins,
|
|
221
|
+
saveEnabledPlugins
|
|
222
|
+
};
|
|
223
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/cli/plugin.ts", "../../../../src/cli/commands/index.ts", "../../../../src/cli/commands/disable.ts", "../../../../src/cli/storage.ts", "../../../../src/cli/commands/enable.ts", "../../../../src/cli/commands/list.ts", "../../../../src/cli/commands/util.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { Common, Plugin } from '@dxos/app-framework';\n\nimport { meta } from '../meta';\n\nimport { plugin } from './commands';\n\nexport const RegistryPlugin = Plugin.define(meta).pipe(\n Common.Plugin.addCommandModule({\n commands: [plugin],\n }),\n Plugin.make,\n);\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Command from '@effect/cli/Command';\n\nimport { disable } from './disable';\nimport { enable } from './enable';\nimport { list } from './list';\n\nexport const plugin: Command.Command<any, any, any, any> = Command.make('plugin').pipe(\n Command.withDescription('Manage plugins.'),\n Command.withSubcommands([enable, disable, list]),\n);\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Args from '@effect/cli/Args';\nimport * as Command from '@effect/cli/Command';\nimport * as Console from 'effect/Console';\nimport * as Effect from 'effect/Effect';\n\nimport { Plugin } from '@dxos/app-framework';\nimport { CommandConfig } from '@dxos/cli-util';\nimport { invariant } from '@dxos/invariant';\n\nimport { saveEnabledPlugins } from '../storage';\n\nexport const handler = Effect.fn(function* ({ id }: { id: string }) {\n const { json, profile } = yield* CommandConfig;\n const manager = yield* Plugin.Service;\n\n const plugins = manager.getPlugins();\n const plugin = plugins.find((p: Plugin.Plugin) => p.meta.id === id);\n invariant(plugin, `Plugin not found: ${id}`);\n\n const core = manager.getCore();\n invariant(!core.includes(id), `Cannot disable core plugin: ${id}`);\n\n const disabled = yield* manager.disable(id);\n invariant(disabled, `Failed to disable plugin: ${id}`);\n\n // Save enabled plugins to storage\n const enabledPlugins = manager.getEnabled();\n yield* saveEnabledPlugins({ profile, enabled: [...enabledPlugins] });\n\n if (json) {\n yield* Console.log(JSON.stringify({ id, enabled: false }, null, 2));\n } else {\n yield* Console.log(`Plugin \"${plugin.meta.name ?? id}\" disabled.`);\n }\n});\n\nexport const disable = Command.make(\n 'disable',\n {\n id: Args.text({ name: 'id' }).pipe(Args.withDescription('The ID of the plugin to disable.')),\n },\n handler,\n).pipe(Command.withDescription('Disable a plugin.'));\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport * as FileSystem from '@effect/platform/FileSystem';\nimport * as Path from '@effect/platform/Path';\nimport * as Effect from 'effect/Effect';\nimport * as Schema from 'effect/Schema';\n\nimport { DX_CONFIG, getProfilePath } from '@dxos/client-protocol';\n\n// TODO(wittjosiah): Factor out to app-framework?\n\nconst PLUGINS_FILE = 'plugins.json';\n\nconst PluginsSchema = Schema.Array(Schema.String);\n\n/**\n * Get the path to the plugins configuration file for a profile.\n */\nconst getPluginsPath = (profile: string): Effect.Effect<string, never, Path.Path> =>\n Effect.gen(function* () {\n const path = yield* Path.Path;\n return path.join(getProfilePath(DX_CONFIG, profile), PLUGINS_FILE);\n });\n\n/**\n * Load enabled plugins from profile storage.\n * Returns the list of enabled plugin IDs, or an empty array if the file doesn't exist.\n */\nexport const loadEnabledPlugins = Effect.fn(function* ({ profile }: { profile: string }) {\n const fs = yield* FileSystem.FileSystem;\n const pluginsPath = yield* getPluginsPath(profile);\n\n const content = yield* fs\n .readFileString(pluginsPath)\n .pipe(Effect.catchTag('SystemError', () => Effect.succeed('[]')));\n\n const parsed = yield* Schema.decodeUnknown(Schema.parseJson(PluginsSchema))(content).pipe(\n Effect.catchAll(() => Effect.succeed([] as string[])),\n );\n\n return parsed;\n});\n\n/**\n * Save enabled plugins to profile storage.\n */\nexport const saveEnabledPlugins = Effect.fn(function* ({ profile, enabled }: { profile: string; enabled: string[] }) {\n const fs = yield* FileSystem.FileSystem;\n const pluginsPath = yield* getPluginsPath(profile);\n const profileDir = getProfilePath(DX_CONFIG, profile);\n\n yield* fs.makeDirectory(profileDir, { recursive: true });\n const encoded = Schema.encodeSync(Schema.parseJson(PluginsSchema))(enabled);\n yield* fs.writeFileString(pluginsPath, encoded + '\\n');\n});\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Args from '@effect/cli/Args';\nimport * as Command from '@effect/cli/Command';\nimport * as Console from 'effect/Console';\nimport * as Effect from 'effect/Effect';\n\nimport { Plugin } from '@dxos/app-framework';\nimport { CommandConfig } from '@dxos/cli-util';\nimport { invariant } from '@dxos/invariant';\n\nimport { saveEnabledPlugins } from '../storage';\n\nexport const handler = Effect.fn(function* ({ id }: { id: string }) {\n const { json, profile } = yield* CommandConfig;\n const manager = yield* Plugin.Service;\n\n const plugins = manager.getPlugins();\n const plugin = plugins.find((p: Plugin.Plugin) => p.meta.id === id);\n invariant(plugin, `Plugin not found: ${id}`);\n\n const enabled = yield* manager.enable(id);\n invariant(enabled, `Failed to enable plugin: ${id}`);\n\n // Save enabled plugins to storage\n const enabledPlugins = manager.getEnabled();\n yield* saveEnabledPlugins({ profile, enabled: [...enabledPlugins] });\n\n if (json) {\n yield* Console.log(JSON.stringify({ id, enabled: true }, null, 2));\n } else {\n yield* Console.log(`Plugin \"${plugin.meta.name ?? id}\" enabled.`);\n }\n});\n\nexport const enable = Command.make(\n 'enable',\n {\n id: Args.text({ name: 'id' }).pipe(Args.withDescription('The ID of the plugin to enable.')),\n },\n handler,\n).pipe(Command.withDescription('Enable a plugin.'));\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Command from '@effect/cli/Command';\nimport * as Console from 'effect/Console';\nimport * as Effect from 'effect/Effect';\n\nimport { Plugin } from '@dxos/app-framework';\nimport { CommandConfig, printList } from '@dxos/cli-util';\n\nimport { type FormattedPlugin, printPlugin } from './util';\n\nexport const handler = Effect.fn(function* () {\n const { json } = yield* CommandConfig;\n const manager = yield* Plugin.Service;\n\n const plugins = manager.getPlugins();\n const enabled = manager.getEnabled();\n const core = manager.getCore();\n\n const formattedPlugins: FormattedPlugin[] = plugins.map((plugin: Plugin.Plugin) => {\n const isEnabled = enabled.includes(plugin.meta.id);\n const isCore = core.includes(plugin.meta.id);\n return {\n id: plugin.meta.id,\n name: plugin.meta.name ?? plugin.meta.id,\n enabled: isEnabled,\n core: isCore,\n };\n });\n\n if (json) {\n yield* Console.log(JSON.stringify(formattedPlugins, null, 2));\n } else {\n const formatted = formattedPlugins.map(printPlugin);\n yield* Console.log(printList(formatted));\n }\n});\n\nexport const list = Command.make('list', {}, handler).pipe(Command.withDescription('List all available plugins.'));\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { FormBuilder } from '@dxos/cli-util';\n\nexport type FormattedPlugin = {\n id: string;\n name: string;\n enabled: boolean;\n core: boolean;\n};\n\n/**\n * Pretty prints a plugin with ANSI colors.\n */\nexport const printPlugin = (plugin: FormattedPlugin) => {\n const status = plugin.core ? 'core' : plugin.enabled ? 'enabled' : 'disabled';\n return FormBuilder.make({ title: plugin.name }).pipe(\n FormBuilder.set('id', plugin.id),\n FormBuilder.set('status', status),\n FormBuilder.build,\n );\n};\n"],
|
|
5
|
+
"mappings": ";;;;;AAIA,SAASA,QAAQC,UAAAA,eAAc;;;ACA/B,YAAYC,cAAa;;;ACAzB,YAAYC,UAAU;AACtB,YAAYC,aAAa;AACzB,YAAYC,aAAa;AACzB,YAAYC,aAAY;AAExB,SAASC,cAAc;AACvB,SAASC,qBAAqB;AAC9B,SAASC,iBAAiB;;;ACP1B,YAAYC,gBAAgB;AAC5B,YAAYC,UAAU;AACtB,YAAYC,YAAY;AACxB,YAAYC,YAAY;AAExB,SAASC,WAAWC,sBAAsB;AAI1C,IAAMC,eAAe;AAErB,IAAMC,gBAAuBC,aAAaC,aAAM;AAKhD,IAAMC,iBAAiB,CAACC,YACfC,WAAI,aAAA;AACT,QAAMC,OAAO,OAAYC;AACzB,SAAOD,KAAKE,KAAKC,eAAeC,WAAWN,OAAAA,GAAUL,YAAAA;AACvD,CAAA;AAMK,IAAMY,qBAA4BC,UAAG,WAAW,EAAER,QAAO,GAAuB;AACrF,QAAMS,KAAK,OAAkBC;AAC7B,QAAMC,cAAc,OAAOZ,eAAeC,OAAAA;AAE1C,QAAMY,UAAU,OAAOH,GACpBI,eAAeF,WAAAA,EACfG,KAAYC,gBAAS,eAAe,MAAaC,eAAQ,IAAA,CAAA,CAAA;AAE5D,QAAMC,SAAS,OAAcC,qBAAqBC,iBAAUvB,aAAAA,CAAAA,EAAgBgB,OAAAA,EAASE,KAC5EM,gBAAS,MAAaJ,eAAQ,CAAA,CAAE,CAAA,CAAA;AAGzC,SAAOC;AACT,CAAA;AAKO,IAAMI,qBAA4Bb,UAAG,WAAW,EAAER,SAASsB,QAAO,GAA0C;AACjH,QAAMb,KAAK,OAAkBC;AAC7B,QAAMC,cAAc,OAAOZ,eAAeC,OAAA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OAAOJ,OAAOK,iBAAiB;EAC7BC,UAAU;IAACC;;AACb,CAAA,GACAP,QAAOQ,IAAI;",
|
|
6
|
+
"names": ["Common", "Plugin", "Command", "Args", "Command", "Console", "Effect", "Plugin", "CommandConfig", "invariant", "FileSystem", "Path", "Effect", "Schema", "DX_CONFIG", "getProfilePath", "PLUGINS_FILE", "PluginsSchema", "Array", "String", "getPluginsPath", "profile", "gen", "path", "Path", "join", "getProfilePath", "DX_CONFIG", "loadEnabledPlugins", "fn", "fs", "FileSystem", "pluginsPath", "content", "readFileString", "pipe", "catchTag", "succeed", "parsed", "decodeUnknown", "parseJson", "catchAll", "saveEnabledPlugins", "enabled", "profileDir", "makeDirectory", "recursive", "encoded", "encodeSync", "writeFileString", "handler", "fn", "id", "json", "profile", "CommandConfig", "manager", "Plugin", "Service", "plugins", "getPlugins", "plugin", "find", "p", "meta", "invariant", "core", "getCore", "includes", "disabled", "disable", "enabledPlugins", "getEnabled", "saveEnabledPlugins", "enabled", "log", "JSON", "stringify", "name", "make", "text", "pipe", "withDescription", "Args", "Command", "Console", "Effect", "Plugin", "CommandConfig", "invariant", "handler", "fn", "id", "json", "profile", "CommandConfig", "manager", "Plugin", "Service", "plugins", "getPlugins", "plugin", "find", "p", "meta", "invariant", "enabled", "enable", "enabledPlugins", "getEnabled", "saveEnabledPlugins", "log", "JSON", "stringify", "name", "make", "text", "pipe", "withDescription", "Command", "Console", "Effect", "Plugin", "CommandConfig", "printList", "FormBuilder", "printPlugin", "plugin", "status", "core", "enabled", "FormBuilder", "make", "title", "name", "pipe", "set", "id", "build", "handler", "fn", "json", "CommandConfig", "manager", "Plugin", "Service", "plugins", "getPlugins", "enabled", "getEnabled", "core", "getCore", "formattedPlugins", "map", "plugin", "isEnabled", "includes", "meta", "id", "isCore", "name", "log", "JSON", "stringify", "formatted", "printPlugin", "printList", "list", "make", "pipe", "withDescription", "plugin", "make", "pipe", "withDescription", "withSubcommands", "enable", "disable", "list", "RegistryPlugin", "Plugin", "define", "meta", "pipe", "Common", "addCommandModule", "commands", "plugin", "make"]
|
|
7
|
+
}
|
|
@@ -2,16 +2,22 @@ import {
|
|
|
2
2
|
REGISTRY_ID,
|
|
3
3
|
REGISTRY_KEY,
|
|
4
4
|
meta
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-VOAOTNGS.mjs";
|
|
6
6
|
|
|
7
7
|
// src/RegistryPlugin.tsx
|
|
8
|
-
import {
|
|
8
|
+
import { Common, Plugin } from "@dxos/app-framework";
|
|
9
9
|
|
|
10
|
-
// src/capabilities/index.ts
|
|
11
|
-
import {
|
|
12
|
-
var AppGraphBuilder = lazy(() => import("./app-graph-builder-
|
|
13
|
-
|
|
14
|
-
|
|
10
|
+
// src/capabilities/app-graph-builder/index.ts
|
|
11
|
+
import { Capability } from "@dxos/app-framework";
|
|
12
|
+
var AppGraphBuilder = Capability.lazy("AppGraphBuilder", () => import("./app-graph-builder-P3ZGGFAR.mjs"));
|
|
13
|
+
|
|
14
|
+
// src/capabilities/operation-resolver/index.ts
|
|
15
|
+
import { Capability as Capability2 } from "@dxos/app-framework";
|
|
16
|
+
var OperationResolver = Capability2.lazy("OperationResolver", () => import("./operation-resolver-P5PKLPRT.mjs"));
|
|
17
|
+
|
|
18
|
+
// src/capabilities/react-surface/index.ts
|
|
19
|
+
import { Capability as Capability3 } from "@dxos/app-framework";
|
|
20
|
+
var ReactSurface = Capability3.lazy("ReactSurface", () => import("./react-surface-IIM6T7IA.mjs"));
|
|
15
21
|
|
|
16
22
|
// src/translations.ts
|
|
17
23
|
var translations = [
|
|
@@ -38,28 +44,15 @@ var translations = [
|
|
|
38
44
|
];
|
|
39
45
|
|
|
40
46
|
// src/RegistryPlugin.tsx
|
|
41
|
-
var RegistryPlugin =
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
activate: ReactSurface
|
|
51
|
-
}),
|
|
52
|
-
defineModule({
|
|
53
|
-
id: `${meta.id}/module/intent-resolver`,
|
|
54
|
-
activatesOn: Events.SetupIntentResolver,
|
|
55
|
-
activate: IntentResolver
|
|
56
|
-
}),
|
|
57
|
-
defineModule({
|
|
58
|
-
id: `${meta.id}/module/app-graph-builder`,
|
|
59
|
-
activatesOn: Events.SetupAppGraph,
|
|
60
|
-
activate: AppGraphBuilder
|
|
61
|
-
})
|
|
62
|
-
]);
|
|
47
|
+
var RegistryPlugin = Plugin.define(meta).pipe(Common.Plugin.addTranslationsModule({
|
|
48
|
+
translations
|
|
49
|
+
}), Common.Plugin.addSurfaceModule({
|
|
50
|
+
activate: ReactSurface
|
|
51
|
+
}), Common.Plugin.addOperationResolverModule({
|
|
52
|
+
activate: OperationResolver
|
|
53
|
+
}), Common.Plugin.addAppGraphModule({
|
|
54
|
+
activate: AppGraphBuilder
|
|
55
|
+
}), Plugin.make);
|
|
63
56
|
export {
|
|
64
57
|
REGISTRY_ID,
|
|
65
58
|
REGISTRY_KEY,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../../src/RegistryPlugin.tsx", "../../../src/capabilities/index.ts", "../../../src/translations.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport {
|
|
5
|
-
"mappings": ";;;;;;;AAIA,SAASA,
|
|
6
|
-
"names": ["
|
|
3
|
+
"sources": ["../../../src/RegistryPlugin.tsx", "../../../src/capabilities/app-graph-builder/index.ts", "../../../src/capabilities/operation-resolver/index.ts", "../../../src/capabilities/react-surface/index.ts", "../../../src/translations.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { Common, Plugin } from '@dxos/app-framework';\n\nimport { AppGraphBuilder, OperationResolver, ReactSurface } from './capabilities';\nimport { meta } from './meta';\nimport { translations } from './translations';\n\nexport const RegistryPlugin = Plugin.define(meta).pipe(\n Common.Plugin.addTranslationsModule({ translations }),\n Common.Plugin.addSurfaceModule({ activate: ReactSurface }),\n Common.Plugin.addOperationResolverModule({ activate: OperationResolver }),\n Common.Plugin.addAppGraphModule({ activate: AppGraphBuilder }),\n Plugin.make,\n);\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { Capability } from '@dxos/app-framework';\n\nexport const AppGraphBuilder = Capability.lazy('AppGraphBuilder', () => import('./app-graph-builder'));\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { Capability } from '@dxos/app-framework';\n\nexport const OperationResolver = Capability.lazy('OperationResolver', () => import('./operation-resolver'));\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { Capability } from '@dxos/app-framework';\n\nexport const ReactSurface = Capability.lazy('ReactSurface', () => import('./react-surface'));\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { type Resource } from '@dxos/react-ui';\n\nimport { meta } from './meta';\n\nexport const translations = [\n {\n 'en-US': {\n [meta.id]: {\n 'plugin name': 'Registry',\n 'details label': 'Details',\n 'home page label': 'Website',\n 'source label': 'Source',\n 'plugin registry label': 'Plugin Registry',\n 'all plugins label': 'All',\n 'installed plugins label': 'Enabled',\n 'recommended plugins label': 'Recommended',\n 'labs plugins label': 'Labs',\n 'community plugins label': 'Community',\n 'load by url label': 'Load by URL (soon)',\n 'coming soon label': 'Coming soon!',\n 'open plugin registry label': 'Open plugin registry',\n 'settings label': 'Settings',\n },\n },\n },\n] as const satisfies Resource[];\n"],
|
|
5
|
+
"mappings": ";;;;;;;AAIA,SAASA,QAAQC,cAAc;;;ACA/B,SAASC,kBAAkB;AAEpB,IAAMC,kBAAkBC,WAAWC,KAAK,mBAAmB,MAAM,OAAO,kCAAA,CAAA;;;ACF/E,SAASC,cAAAA,mBAAkB;AAEpB,IAAMC,oBAAoBC,YAAWC,KAAK,qBAAqB,MAAM,OAAO,mCAAA,CAAA;;;ACFnF,SAASC,cAAAA,mBAAkB;AAEpB,IAAMC,eAAeC,YAAWC,KAAK,gBAAgB,MAAM,OAAO,8BAAA,CAAA;;;ACElE,IAAMC,eAAe;EAC1B;IACE,SAAS;MACP,CAACC,KAAKC,EAAE,GAAG;QACT,eAAe;QACf,iBAAiB;QACjB,mBAAmB;QACnB,gBAAgB;QAChB,yBAAyB;QACzB,qBAAqB;QACrB,2BAA2B;QAC3B,6BAA6B;QAC7B,sBAAsB;QACtB,2BAA2B;QAC3B,qBAAqB;QACrB,qBAAqB;QACrB,8BAA8B;QAC9B,kBAAkB;MACpB;IACF;EACF;;;;AJlBK,IAAMC,iBAAiBC,OAAOC,OAAOC,IAAAA,EAAMC,KAChDC,OAAOJ,OAAOK,sBAAsB;EAAEC;AAAa,CAAA,GACnDF,OAAOJ,OAAOO,iBAAiB;EAAEC,UAAUC;AAAa,CAAA,GACxDL,OAAOJ,OAAOU,2BAA2B;EAAEF,UAAUG;AAAkB,CAAA,GACvEP,OAAOJ,OAAOY,kBAAkB;EAAEJ,UAAUK;AAAgB,CAAA,GAC5Db,OAAOc,IAAI;",
|
|
6
|
+
"names": ["Common", "Plugin", "Capability", "AppGraphBuilder", "Capability", "lazy", "Capability", "OperationResolver", "Capability", "lazy", "Capability", "ReactSurface", "Capability", "lazy", "translations", "meta", "id", "RegistryPlugin", "Plugin", "define", "meta", "pipe", "Common", "addTranslationsModule", "translations", "addSurfaceModule", "activate", "ReactSurface", "addOperationResolverModule", "OperationResolver", "addAppGraphModule", "AppGraphBuilder", "make"]
|
|
7
7
|
}
|