@frockbot/plugin-settings 0.3.1 → 0.3.3
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/package.json +10 -9
- package/src/backend.ts +14 -0
- package/src/client/index.ts +11 -0
- package/src/user.ts +24 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@frockbot/plugin-settings",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.3",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -21,14 +21,15 @@
|
|
|
21
21
|
"typecheck": "vue-tsc --noEmit -p tsconfig.json"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@frockbot/catalog-core": "0.3.
|
|
25
|
-
"@frockbot/client-core": "0.3.
|
|
26
|
-
"@frockbot/client-ui": "0.3.
|
|
27
|
-
"@frockbot/configuration-core": "0.3.
|
|
28
|
-
"@frockbot/connection-core": "0.3.
|
|
29
|
-
"@frockbot/kernel-composition": "0.3.
|
|
30
|
-
"@frockbot/
|
|
31
|
-
"@frockbot/plugin-
|
|
24
|
+
"@frockbot/catalog-core": "0.3.3",
|
|
25
|
+
"@frockbot/client-core": "0.3.3",
|
|
26
|
+
"@frockbot/client-ui": "0.3.3",
|
|
27
|
+
"@frockbot/configuration-core": "0.3.3",
|
|
28
|
+
"@frockbot/connection-core": "0.3.3",
|
|
29
|
+
"@frockbot/kernel-composition": "0.3.3",
|
|
30
|
+
"@frockbot/kernel-contracts": "0.3.3",
|
|
31
|
+
"@frockbot/plugin-auth": "0.3.3",
|
|
32
|
+
"@frockbot/plugin-shell": "0.3.3",
|
|
32
33
|
"cordis": "4.0.0-rc.8",
|
|
33
34
|
"vue": "3.5.41"
|
|
34
35
|
},
|
package/src/backend.ts
CHANGED
|
@@ -20,6 +20,7 @@ import {
|
|
|
20
20
|
type ConnectionCommandV1,
|
|
21
21
|
} from "@frockbot/connection-core";
|
|
22
22
|
import type { Plugin } from "cordis";
|
|
23
|
+
import { defineGatewayContribution } from "@frockbot/kernel-contracts/contributions";
|
|
23
24
|
|
|
24
25
|
export interface SettingsConnectionGatewayHost {
|
|
25
26
|
executeConnection(
|
|
@@ -260,3 +261,16 @@ export namespace createSettingsBackendContribution {
|
|
|
260
261
|
return () => lifecycle.mount(createSettingsBackendContribution(host));
|
|
261
262
|
}
|
|
262
263
|
}
|
|
264
|
+
|
|
265
|
+
/**
|
|
266
|
+
* The manifest's gateway `backend` entry, resolved by specifier. The
|
|
267
|
+
* application looks this descriptor up in its Contribution table; it never
|
|
268
|
+
* branches on which Package it belongs to.
|
|
269
|
+
*/
|
|
270
|
+
export const backendContribution = defineGatewayContribution<
|
|
271
|
+
SettingsGatewayHost,
|
|
272
|
+
SettingsBackendRouteContribution
|
|
273
|
+
>({
|
|
274
|
+
specifier: "@frockbot/plugin-settings/backend",
|
|
275
|
+
create: createSettingsBackendContribution.plugin,
|
|
276
|
+
});
|
package/src/client/index.ts
CHANGED
|
@@ -14,6 +14,7 @@ import PluginsSurface from "./PluginsSurface.vue";
|
|
|
14
14
|
import PackageCatalogSurface from "./PackageCatalogSurface.vue";
|
|
15
15
|
import UserProfileTrigger from "./UserProfileTrigger.vue";
|
|
16
16
|
import UserSettingsSurface from "./UserSettingsSurface.vue";
|
|
17
|
+
import { defineClientContribution } from "@frockbot/kernel-contracts/contributions";
|
|
17
18
|
|
|
18
19
|
export const settingsClientPlugin: ClientPlugin = (ctx) => {
|
|
19
20
|
const surfaces = ctx.inject(clientSurfaceRegistryKey);
|
|
@@ -86,3 +87,13 @@ export {
|
|
|
86
87
|
} from "./bot-settings.js";
|
|
87
88
|
|
|
88
89
|
export default settingsClientPlugin;
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* The manifest's `client` entry, resolved by specifier. The application looks
|
|
93
|
+
* this descriptor up in its Contribution table; it never branches on which
|
|
94
|
+
* Package it belongs to.
|
|
95
|
+
*/
|
|
96
|
+
export const clientContribution = defineClientContribution<ClientPlugin>({
|
|
97
|
+
specifier: "@frockbot/plugin-settings/client",
|
|
98
|
+
plugin: settingsClientPlugin,
|
|
99
|
+
});
|
package/src/user.ts
CHANGED
|
@@ -31,6 +31,7 @@ import {
|
|
|
31
31
|
import type { ConnectionCommandV1 } from "@frockbot/connection-core";
|
|
32
32
|
import type { PackageSettingDefinition } from "@frockbot/kernel-composition";
|
|
33
33
|
import type { Plugin } from "cordis";
|
|
34
|
+
import { defineUserBackendContribution } from "@frockbot/kernel-contracts/contributions";
|
|
34
35
|
|
|
35
36
|
const STATE_KEY = "user-configuration";
|
|
36
37
|
const DEFAULT_PACKAGES_BOOTSTRAP_KEY = "user-default-packages-bootstrap:v1";
|
|
@@ -1209,3 +1210,26 @@ export function createUserSettingsBackendPlugin(
|
|
|
1209
1210
|
): Plugin {
|
|
1210
1211
|
return () => lifecycle.mount(createUserSettingsBackendContribution(host));
|
|
1211
1212
|
}
|
|
1213
|
+
|
|
1214
|
+
/**
|
|
1215
|
+
* What an application hands this Contribution: User settings, Package installation, and Connection commands, under the
|
|
1216
|
+
* Package's own key so one wide host object can satisfy every Package's slice
|
|
1217
|
+
* without their fields colliding.
|
|
1218
|
+
*/
|
|
1219
|
+
export interface SettingsUserApplicationHostV1 {
|
|
1220
|
+
settings: UserSettingsBackendHost;
|
|
1221
|
+
}
|
|
1222
|
+
|
|
1223
|
+
/**
|
|
1224
|
+
* The manifest's `user` entry, resolved by specifier. The
|
|
1225
|
+
* application looks this descriptor up in its Contribution table; it never
|
|
1226
|
+
* branches on which Package it belongs to.
|
|
1227
|
+
*/
|
|
1228
|
+
export const userContribution = defineUserBackendContribution<
|
|
1229
|
+
SettingsUserApplicationHostV1,
|
|
1230
|
+
UserSettingsBackendContribution
|
|
1231
|
+
>({
|
|
1232
|
+
specifier: "@frockbot/plugin-settings/user",
|
|
1233
|
+
create: (host, lifecycle) =>
|
|
1234
|
+
createUserSettingsBackendPlugin(host.settings, lifecycle),
|
|
1235
|
+
});
|