pre
This commit is contained in:
@@ -4,6 +4,7 @@ import { sdk } from '../sdk'
|
||||
import {
|
||||
DEFAULT_COINGECKO_TOKEN_COINS,
|
||||
DEFAULT_OPERATOR_RELAY,
|
||||
DEFAULT_PLATFORM_CALLBACK_HOST,
|
||||
DEFAULT_PLATFORM_MODE,
|
||||
} from '../utils'
|
||||
|
||||
@@ -103,6 +104,20 @@ const inputSpec = InputSpec.of({
|
||||
minLength: null,
|
||||
maxLength: null,
|
||||
}),
|
||||
platformCallbackHost: Value.text({
|
||||
name: i18n('CALLBACK HOST'),
|
||||
description: i18n(
|
||||
'Callback hostname SpacesOps uses for cert-callback flows (PLATFORM_CALLBACK_HOST). Leave blank to use spacesops.startos.',
|
||||
),
|
||||
warning: null,
|
||||
footnote: null,
|
||||
default: DEFAULT_PLATFORM_CALLBACK_HOST,
|
||||
required: false,
|
||||
masked: false,
|
||||
placeholder: 'spacesops.startos',
|
||||
minLength: null,
|
||||
maxLength: null,
|
||||
}),
|
||||
})
|
||||
|
||||
export const configurePlatform = sdk.Action.withInput(
|
||||
@@ -113,7 +128,7 @@ export const configurePlatform = sdk.Action.withInput(
|
||||
async ({ effects }) => ({
|
||||
name: i18n('Configure Platform'),
|
||||
description: i18n(
|
||||
'Set optional SpacesOps settings: Nostr relay, theme mode, CoinGecko pricing, and SUBS backend. Saving restarts the service so the new settings take effect.',
|
||||
'Set optional SpacesOps settings: Nostr relay, theme mode, CoinGecko pricing, SUBS backend, and callback host. Saving restarts the service so the new settings take effect.',
|
||||
),
|
||||
warning: null,
|
||||
allowedStatuses: 'any',
|
||||
@@ -136,6 +151,8 @@ export const configurePlatform = sdk.Action.withInput(
|
||||
subsUrl: store?.subsUrl ?? null,
|
||||
subsUser: store?.subsUser ?? null,
|
||||
subsPassword: store?.subsPassword ?? null,
|
||||
platformCallbackHost:
|
||||
store?.platformCallbackHost ?? DEFAULT_PLATFORM_CALLBACK_HOST,
|
||||
}
|
||||
},
|
||||
|
||||
@@ -149,6 +166,7 @@ export const configurePlatform = sdk.Action.withInput(
|
||||
subsUrl: input.subsUrl || null,
|
||||
subsUser: input.subsUser || null,
|
||||
subsPassword: input.subsPassword || null,
|
||||
platformCallbackHost: input.platformCallbackHost?.trim() || null,
|
||||
})
|
||||
|
||||
return {
|
||||
|
||||
@@ -16,6 +16,7 @@ const shape = z.object({
|
||||
subsUrl: z.string().nullable().catch(null),
|
||||
subsUser: z.string().nullable().catch(null),
|
||||
subsPassword: z.string().nullable().catch(null),
|
||||
platformCallbackHost: z.string().nullable().catch(null),
|
||||
})
|
||||
|
||||
export const storeJson = FileHelper.json(
|
||||
|
||||
@@ -16,7 +16,7 @@ const dict = {
|
||||
'SUBS RPC Password': 12,
|
||||
'Optional SUBS RPC password (SUBS_RPC_PASSWORD).': 13,
|
||||
'Configure Platform': 14,
|
||||
'Set optional SpacesOps settings: Nostr relay, theme mode, CoinGecko pricing, and SUBS backend. Saving restarts the service so the new settings take effect.': 15,
|
||||
'Set optional SpacesOps settings: Nostr relay, theme mode, CoinGecko pricing, SUBS backend, and callback host. Saving restarts the service so the new settings take effect.': 15,
|
||||
Success: 16,
|
||||
'Platform configuration saved. The service is restarting to apply the new settings.': 17,
|
||||
'Operator Secret Key (hex)': 18,
|
||||
@@ -50,6 +50,8 @@ const dict = {
|
||||
'Web Interface': 46,
|
||||
'The web interface is ready': 47,
|
||||
'The web interface is not ready': 48,
|
||||
'CALLBACK HOST': 49,
|
||||
'Callback hostname SpacesOps uses for cert-callback flows (PLATFORM_CALLBACK_HOST). Leave blank to use spacesops.startos.': 50,
|
||||
} as const
|
||||
|
||||
/**
|
||||
|
||||
+4
-1
@@ -5,6 +5,7 @@ import { sdk } from './sdk'
|
||||
import {
|
||||
dataDir,
|
||||
DEFAULT_OPERATOR_RELAY,
|
||||
DEFAULT_PLATFORM_CALLBACK_HOST,
|
||||
DEFAULT_PLATFORM_MODE,
|
||||
SPACED_RPC_URL,
|
||||
SPACED_WALLETLOAD_NAME,
|
||||
@@ -110,8 +111,10 @@ export const main = sdk.setupMain(async ({ effects }) => {
|
||||
if (store.subsUrl) env.SUBS_URI_VALUE = store.subsUrl
|
||||
if (store.subsUser) env.SUBS_RPC_USER = store.subsUser
|
||||
if (store.subsPassword) env.SUBS_RPC_PASSWORD = store.subsPassword
|
||||
env.PLATFORM_CALLBACK_HOST =
|
||||
store.platformCallbackHost ?? DEFAULT_PLATFORM_CALLBACK_HOST
|
||||
|
||||
// v1.0.1's entrypoint sources setup-spacesops-env.sh with set -u. That file
|
||||
// v1.0.3's entrypoint sources setup-spacesops-env.sh with set -u. That file
|
||||
// exports NODE_EXTRA_CA_CERTS using ${_SCRIPT_DIR}, but _SCRIPT_DIR is set on
|
||||
// a separate non-export line the entrypoint never evals — startup crashes
|
||||
// unless NODE_EXTRA_CA_CERTS is already set. Fetch the StartOS root CA for
|
||||
|
||||
@@ -14,7 +14,7 @@ export const manifest = setupManifest({
|
||||
volumes: ['main'],
|
||||
images: {
|
||||
spacesops: {
|
||||
source: { dockerTag: 'spacesops/spacesops:v1.0.1' },
|
||||
source: { dockerTag: 'spacesops/spacesops:v1.0.3' },
|
||||
arch: ['x86_64', 'aarch64'],
|
||||
},
|
||||
},
|
||||
|
||||
+6
-3
@@ -18,16 +18,16 @@ export const SPACES_PACKAGE_ID = 'spaces'
|
||||
// Spaces exposes its spaced JSON-RPC as the `spaces-api` interface on 7225,
|
||||
// reachable from a dependent package at this address.
|
||||
export const SPACED_RPC_URL = 'http://spaces.startos:7225'
|
||||
export const SPACED_WALLETLOAD_NAME = 'main'
|
||||
export const SPACED_WALLETLOAD_NAME = 'default'
|
||||
|
||||
// Admin Basic Auth is baked into the v1.0.1 image with NO env override. It
|
||||
// Admin Basic Auth is baked into the v1.0.3 image with NO env override. It
|
||||
// cannot be changed without rebuilding the image. Surfaced (with a warning)
|
||||
// via the "Show Admin Credentials" action.
|
||||
export const ADMIN_USER = 'admin'
|
||||
export const ADMIN_PASSWORD = 'Whatever!'
|
||||
|
||||
// Where StartOS writes the StartOS root CA for outbound *.startos HTTPS (see
|
||||
// main.ts). Always injected as NODE_EXTRA_CA_CERTS — required on v1.0.1+ where
|
||||
// main.ts). Always injected as NODE_EXTRA_CA_CERTS — required on v1.0.3+ where
|
||||
// the image entrypoint's setup-spacesops-env.sh references _SCRIPT_DIR without
|
||||
// defining it under set -u.
|
||||
export const nodeExtraCaCertVolumeSubpath = '.startos/startos-root-ca.crt'
|
||||
@@ -51,6 +51,9 @@ export function startOsHostnameFromUrl(url: string): string | null {
|
||||
export const DEFAULT_OPERATOR_RELAY = 'wss://relay.primal.net'
|
||||
export const DEFAULT_PLATFORM_MODE = 'prod'
|
||||
export const DEFAULT_COINGECKO_TOKEN_COINS = 'bitcoin'
|
||||
// Hostname SpacesOps uses when building payment callback URLs
|
||||
// (http://${PLATFORM_CALLBACK_HOST}:${PORT}/...).
|
||||
export const DEFAULT_PLATFORM_CALLBACK_HOST = 'spacesops.startos'
|
||||
|
||||
// 32 random bytes as a 64-char hex string — a secp256k1/Nostr secret key. The
|
||||
// odds of an out-of-range key are ~1 in 2^128; if getPublicKey rejects it,
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
import { VersionGraph } from '@start9labs/start-sdk'
|
||||
import { v_1_0_1_0 } from './v1.0.1.0'
|
||||
import { v_1_0_1_1 } from './v1.0.1.1'
|
||||
import { v_1_0_2_0 } from './v1.0.2.0'
|
||||
import { v_1_0_2_1 } from './v1.0.2.1'
|
||||
import { v_1_0_3_0 } from './v1.0.3.0'
|
||||
|
||||
export const versionGraph = VersionGraph.of({
|
||||
current: v_1_0_1_1,
|
||||
other: [v_1_0_1_0],
|
||||
current: v_1_0_3_0,
|
||||
other: [v_1_0_2_1, v_1_0_2_0, v_1_0_1_1, v_1_0_1_0],
|
||||
})
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
import { IMPOSSIBLE, VersionInfo } from '@start9labs/start-sdk'
|
||||
|
||||
export const v_1_0_2_0 = VersionInfo.of({
|
||||
version: '1.0.2:0',
|
||||
releaseNotes: {
|
||||
en_US: `Upstream upgrade to SpacesOps v1.0.2.
|
||||
- Bumps the image to spacesops/spacesops:v1.0.2 on x86_64 and aarch64.
|
||||
- No StartOS-side configuration, action, or migration changes; existing operator keypair, session secret, and Configure-Platform settings are preserved.`,
|
||||
},
|
||||
migrations: {
|
||||
up: async ({ effects }) => {},
|
||||
down: IMPOSSIBLE,
|
||||
},
|
||||
})
|
||||
@@ -0,0 +1,13 @@
|
||||
import { IMPOSSIBLE, VersionInfo } from '@start9labs/start-sdk'
|
||||
|
||||
export const v_1_0_2_1 = VersionInfo.of({
|
||||
version: '1.0.2:1',
|
||||
releaseNotes: {
|
||||
en_US: `- Adds PLATFORM_CALLBACK_HOST to Configure Platform (defaults to spacesops.startos) for cert-callback and payment callback URLs.
|
||||
- Sets SPACED_WALLETLOAD_NAME to default (was main).`,
|
||||
},
|
||||
migrations: {
|
||||
up: async ({ effects }) => {},
|
||||
down: IMPOSSIBLE,
|
||||
},
|
||||
})
|
||||
@@ -0,0 +1,14 @@
|
||||
import { IMPOSSIBLE, VersionInfo } from '@start9labs/start-sdk'
|
||||
|
||||
export const v_1_0_3_0 = VersionInfo.of({
|
||||
version: '1.0.3:0',
|
||||
releaseNotes: {
|
||||
en_US: `Upstream upgrade to SpacesOps v1.0.3.
|
||||
- Bumps the image to spacesops/spacesops:v1.0.3 on x86_64 and aarch64.
|
||||
- No StartOS-side configuration, action, or migration changes; existing operator keypair, session secret, and Configure-Platform settings are preserved.`,
|
||||
},
|
||||
migrations: {
|
||||
up: async ({ effects }) => {},
|
||||
down: IMPOSSIBLE,
|
||||
},
|
||||
})
|
||||
Reference in New Issue
Block a user