Added optional Explorer/Indexer
Build Service / BuildPackage (push) Has been cancelled

This commit is contained in:
2026-05-20 15:43:38 -04:00
parent 2cdc4a5f34
commit e41ff31221
27 changed files with 1431 additions and 70 deletions
+23 -3
View File
@@ -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]
})