This commit is contained in:
+23
-3
@@ -1,6 +1,6 @@
|
||||
import { i18n } from './i18n'
|
||||
import { sdk } from './sdk'
|
||||
import { uiPort } from './utils'
|
||||
import { EXPLORER_PORT, uiPort } from './utils'
|
||||
|
||||
export const setInterfaces = sdk.setupInterfaces(async ({ effects }) => {
|
||||
const uiMulti = sdk.MultiHost.of(effects, 'ui-multi')
|
||||
@@ -8,7 +8,7 @@ export const setInterfaces = sdk.setupInterfaces(async ({ effects }) => {
|
||||
protocol: 'http',
|
||||
})
|
||||
const ui = sdk.createInterface(effects, {
|
||||
name: i18n('Web UI'),
|
||||
name: i18n('Space-CLI Web UI'),
|
||||
id: 'ui',
|
||||
description: i18n(
|
||||
'Browser terminal that exposes space-cli inside the Spaces container.',
|
||||
@@ -23,5 +23,25 @@ export const setInterfaces = sdk.setupInterfaces(async ({ effects }) => {
|
||||
|
||||
const uiReceipt = await uiMultiOrigin.export([ui])
|
||||
|
||||
return [uiReceipt]
|
||||
const explorerMulti = sdk.MultiHost.of(effects, 'explorer-multi')
|
||||
const explorerMultiOrigin = await explorerMulti.bindPort(EXPLORER_PORT, {
|
||||
protocol: 'http',
|
||||
})
|
||||
const explorer = sdk.createInterface(effects, {
|
||||
name: i18n('Explorer Web UI'),
|
||||
id: 'explorer',
|
||||
description: i18n(
|
||||
'SvelteKit explorer for the Spaces protocol. Reads from the embedded PostgreSQL populated by the indexer. Only useful while the embedded explorer is enabled.',
|
||||
),
|
||||
type: 'ui',
|
||||
masked: false,
|
||||
schemeOverride: null,
|
||||
username: null,
|
||||
path: '',
|
||||
query: {},
|
||||
})
|
||||
|
||||
const explorerReceipt = await explorerMultiOrigin.export([explorer])
|
||||
|
||||
return [uiReceipt, explorerReceipt]
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user