mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-04-04 06:19:44 +00:00
Merge branch 'integration/new-container-runtime' of github.com:Start9Labs/start-os into rebase/feat/domains
This commit is contained in:
@@ -18,12 +18,12 @@ import {
|
||||
MarketplacePkg,
|
||||
} from '@start9labs/marketplace'
|
||||
import { Log } from '@start9labs/shared'
|
||||
import { unionSelectKey } from '@start9labs/start-sdk/lib/config/configTypes'
|
||||
import { List } from '@start9labs/start-sdk/lib/config/builder/list'
|
||||
import { Value } from '@start9labs/start-sdk/lib/config/builder/value'
|
||||
import { Variants } from '@start9labs/start-sdk/lib/config/builder/variants'
|
||||
import { Config } from '@start9labs/start-sdk/lib/config/builder/config'
|
||||
import { configBuilderToSpec } from 'src/app/util/configBuilderToSpec'
|
||||
import { Config } from '@start9labs/start-sdk/cjs/sdk/lib/config/builder/config'
|
||||
import { Value } from '@start9labs/start-sdk/cjs/sdk/lib/config/builder/value'
|
||||
import { Variants } from '@start9labs/start-sdk/cjs/sdk/lib/config/builder/variants'
|
||||
import { List } from '@start9labs/start-sdk/cjs/sdk/lib/config/builder/list'
|
||||
import { unionSelectKey } from '@start9labs/start-sdk/cjs/sdk/lib/config/configTypes'
|
||||
|
||||
export module Mock {
|
||||
export const ServerUpdated: ServerStatusInfo = {
|
||||
@@ -67,9 +67,6 @@ export module Mock {
|
||||
short: 'A Bitcoin full node by Bitcoin Core.',
|
||||
long: 'Bitcoin is a decentralized consensus protocol and settlement network.',
|
||||
},
|
||||
assets: {
|
||||
icon: 'icon.png',
|
||||
},
|
||||
replaces: ['banks', 'governments'],
|
||||
'release-notes': 'Taproot, Schnorr, and more.',
|
||||
license: 'MIT',
|
||||
@@ -86,8 +83,9 @@ export module Mock {
|
||||
start: 'Starting Bitcoin is good for your health.',
|
||||
stop: null,
|
||||
},
|
||||
'os-version': '0.2.12',
|
||||
dependencies: {},
|
||||
'os-version': '0.4.0',
|
||||
'has-config': true,
|
||||
}
|
||||
|
||||
export const MockManifestLnd: Manifest = {
|
||||
@@ -98,11 +96,7 @@ export module Mock {
|
||||
short: 'A bolt spec compliant client.',
|
||||
long: 'More info about LND. More info about LND. More info about LND.',
|
||||
},
|
||||
assets: {
|
||||
icon: 'icon.png',
|
||||
},
|
||||
'release-notes':
|
||||
'* Dual funded channels! And lots more amazing new features. Also includes several bugfixes and performance enhancements.',
|
||||
'release-notes': 'Dual funded channels!',
|
||||
license: 'MIT',
|
||||
'wrapper-repo': 'https://github.com/start9labs/lnd-wrapper',
|
||||
'upstream-repo': 'https://github.com/lightningnetwork/lnd',
|
||||
@@ -117,26 +111,19 @@ export module Mock {
|
||||
start: 'Starting LND is good for your health.',
|
||||
stop: null,
|
||||
},
|
||||
'os-version': '0.2.12',
|
||||
dependencies: {
|
||||
bitcoind: {
|
||||
version: '=0.21.0',
|
||||
description: 'LND needs bitcoin to live.',
|
||||
requirement: {
|
||||
type: 'opt-out',
|
||||
how: 'You can use an external node from your server if you prefer.',
|
||||
},
|
||||
optional: true,
|
||||
},
|
||||
'btc-rpc-proxy': {
|
||||
version: '>=0.2.2',
|
||||
description:
|
||||
'As long as Bitcoin is pruned, LND needs Bitcoin Proxy to fetch block over the P2P network.',
|
||||
requirement: {
|
||||
type: 'opt-in',
|
||||
how: `To use Proxy's user management system, go to LND config and select Bitcoin Proxy under Bitcoin config.`,
|
||||
},
|
||||
optional: true,
|
||||
},
|
||||
},
|
||||
'os-version': '0.4.0',
|
||||
'has-config': true,
|
||||
}
|
||||
|
||||
export const MockManifestBitcoinProxy: Manifest = {
|
||||
@@ -148,9 +135,6 @@ export module Mock {
|
||||
short: 'A super charger for your Bitcoin node.',
|
||||
long: 'More info about Bitcoin Proxy. More info about Bitcoin Proxy. More info about Bitcoin Proxy.',
|
||||
},
|
||||
assets: {
|
||||
icon: 'icon.png',
|
||||
},
|
||||
'release-notes': 'Even better support for Bitcoin and wallets!',
|
||||
license: 'MIT',
|
||||
'wrapper-repo': 'https://github.com/start9labs/btc-rpc-proxy-wrapper',
|
||||
@@ -165,27 +149,27 @@ export module Mock {
|
||||
start: null,
|
||||
stop: null,
|
||||
},
|
||||
'os-version': '0.2.12',
|
||||
dependencies: {
|
||||
bitcoind: {
|
||||
version: '>=0.20.0',
|
||||
description: 'Bitcoin Proxy requires a Bitcoin node.',
|
||||
requirement: {
|
||||
type: 'required',
|
||||
},
|
||||
optional: false,
|
||||
},
|
||||
},
|
||||
'os-version': '0.4.0',
|
||||
'has-config': false,
|
||||
}
|
||||
|
||||
export const BitcoinDep: DependencyMetadata = {
|
||||
title: 'Bitcoin Core',
|
||||
icon: BTC_ICON,
|
||||
optional: false,
|
||||
hidden: true,
|
||||
}
|
||||
|
||||
export const ProxyDep: DependencyMetadata = {
|
||||
title: 'Bitcoin Proxy',
|
||||
icon: PROXY_ICON,
|
||||
optional: true,
|
||||
hidden: false,
|
||||
}
|
||||
|
||||
@@ -1292,6 +1276,7 @@ export module Mock {
|
||||
},
|
||||
'dependency-config-errors': {},
|
||||
},
|
||||
actions: {}, // @TODO need mocks
|
||||
'service-interfaces': {
|
||||
ui: {
|
||||
id: 'ui',
|
||||
@@ -1508,11 +1493,6 @@ export module Mock {
|
||||
},
|
||||
},
|
||||
},
|
||||
'current-dependents': {
|
||||
lnd: {
|
||||
'health-checks': [],
|
||||
},
|
||||
},
|
||||
'current-dependencies': {},
|
||||
'dependency-info': {},
|
||||
'marketplace-url': 'https://registry.start9.com/',
|
||||
@@ -1535,6 +1515,7 @@ export module Mock {
|
||||
},
|
||||
'dependency-config-errors': {},
|
||||
},
|
||||
actions: {},
|
||||
'service-interfaces': {
|
||||
ui: {
|
||||
id: 'ui',
|
||||
@@ -1643,13 +1624,9 @@ export module Mock {
|
||||
},
|
||||
},
|
||||
},
|
||||
'current-dependents': {
|
||||
lnd: {
|
||||
'health-checks': [],
|
||||
},
|
||||
},
|
||||
'current-dependencies': {
|
||||
bitcoind: {
|
||||
versionRange: '>=26.0.0',
|
||||
'health-checks': [],
|
||||
},
|
||||
},
|
||||
@@ -1681,6 +1658,7 @@ export module Mock {
|
||||
'btc-rpc-proxy': 'Username not found',
|
||||
},
|
||||
},
|
||||
actions: {},
|
||||
'service-interfaces': {
|
||||
grpc: {
|
||||
id: 'grpc',
|
||||
@@ -1893,12 +1871,13 @@ export module Mock {
|
||||
},
|
||||
},
|
||||
},
|
||||
'current-dependents': {},
|
||||
'current-dependencies': {
|
||||
bitcoind: {
|
||||
versionRange: '>=26.0.0',
|
||||
'health-checks': [],
|
||||
},
|
||||
'btc-rpc-proxy': {
|
||||
versionRange: '>2.0.0', // @TODO
|
||||
'health-checks': [],
|
||||
},
|
||||
},
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import { Dump, Revision } from 'patch-db-client'
|
||||
import { MarketplacePkg, StoreInfo, Manifest } from '@start9labs/marketplace'
|
||||
import { InputSpec } from '@start9labs/start-sdk/lib/config/configTypes'
|
||||
import {
|
||||
DataModel,
|
||||
DomainInfo,
|
||||
@@ -16,7 +15,8 @@ import {
|
||||
FollowLogsRes,
|
||||
FollowLogsReq,
|
||||
} from '@start9labs/shared'
|
||||
import { customSmtp } from '@start9labs/start-sdk/lib/config/configConstants'
|
||||
import { customSmtp } from '@start9labs/start-sdk/cjs/sdk/lib/config/configConstants'
|
||||
import { InputSpec } from '@start9labs/start-sdk/cjs/sdk/lib/config/configTypes'
|
||||
|
||||
export module RR {
|
||||
// DB
|
||||
@@ -596,8 +596,8 @@ export enum NotificationLevel {
|
||||
export type NotificationData<T> = T extends 0
|
||||
? null
|
||||
: T extends 1
|
||||
? BackupReport
|
||||
: any
|
||||
? BackupReport
|
||||
: any
|
||||
|
||||
export interface BackupReport {
|
||||
server: {
|
||||
|
||||
@@ -866,7 +866,7 @@ export class MockApiService extends ApiService {
|
||||
setTimeout(async () => {
|
||||
for (let i = 0; i < ids.length; i++) {
|
||||
const id = ids[i]
|
||||
const appPath = `/package-data/${id}/installed/status/main/status`
|
||||
const appPath = `/package-data/${id}/status/main/status`
|
||||
const appPatch = [
|
||||
{
|
||||
op: PatchOp.REPLACE,
|
||||
@@ -1032,7 +1032,7 @@ export class MockApiService extends ApiService {
|
||||
const patch = [
|
||||
{
|
||||
op: PatchOp.REPLACE,
|
||||
path: `/package-data/${params.id}/installed/status/configured`,
|
||||
path: `/package-data/${params.id}/status/configured`,
|
||||
value: true,
|
||||
},
|
||||
]
|
||||
@@ -1079,7 +1079,7 @@ export class MockApiService extends ApiService {
|
||||
}
|
||||
|
||||
async startPackage(params: RR.StartPackageReq): Promise<RR.StartPackageRes> {
|
||||
const path = `/package-data/${params.id}/installed/status/main`
|
||||
const path = `/package-data/${params.id}/status/main`
|
||||
|
||||
await pauseFor(2000)
|
||||
|
||||
@@ -1128,7 +1128,7 @@ export class MockApiService extends ApiService {
|
||||
): Promise<RR.RestartPackageRes> {
|
||||
// first enact stop
|
||||
await pauseFor(2000)
|
||||
const path = `/package-data/${params.id}/installed/status/main`
|
||||
const path = `/package-data/${params.id}/status/main`
|
||||
|
||||
setTimeout(async () => {
|
||||
const patch2: Operation<any>[] = [
|
||||
|
||||
@@ -1,4 +1,9 @@
|
||||
import { DataModel } from 'src/app/services/patch-db/data-model'
|
||||
import {
|
||||
DataModel,
|
||||
HealthResult,
|
||||
PackageMainStatus,
|
||||
PackageState,
|
||||
} from 'src/app/services/patch-db/data-model'
|
||||
import { Mock } from './api.fixures'
|
||||
|
||||
export const mockPatchData: DataModel = {
|
||||
@@ -31,18 +36,49 @@ export const mockPatchData: DataModel = {
|
||||
id: 'abcdefgh',
|
||||
version: '0.3.5.1',
|
||||
country: 'us',
|
||||
ui: {
|
||||
lanHostname: 'adjective-noun.local',
|
||||
torHostname: 'myveryownspecialtoraddress.onion',
|
||||
ipInfo: {
|
||||
eth0: {
|
||||
wireless: false,
|
||||
ipv4: '10.0.0.1',
|
||||
ipv6: 'FE80:CD00:0000:0CDE:1257:0000:211E:729CD',
|
||||
ui: [
|
||||
{
|
||||
kind: 'ip',
|
||||
networkInterfaceId: 'elan0',
|
||||
public: false,
|
||||
hostname: {
|
||||
kind: 'local',
|
||||
value: 'adjective-noun.local',
|
||||
port: null,
|
||||
sslPort: 1111,
|
||||
},
|
||||
},
|
||||
domainInfo: null,
|
||||
},
|
||||
{
|
||||
kind: 'onion',
|
||||
hostname: {
|
||||
value: 'myveryownspecialtoraddress.onion',
|
||||
port: 80,
|
||||
sslPort: 443,
|
||||
},
|
||||
},
|
||||
{
|
||||
kind: 'ip',
|
||||
networkInterfaceId: 'elan0',
|
||||
public: false,
|
||||
hostname: {
|
||||
kind: 'ipv4',
|
||||
value: '192.168.1.5',
|
||||
port: null,
|
||||
sslPort: 1111,
|
||||
},
|
||||
},
|
||||
{
|
||||
kind: 'ip',
|
||||
networkInterfaceId: 'elan0',
|
||||
public: false,
|
||||
hostname: {
|
||||
kind: 'ipv6',
|
||||
value: '[2001:db8:85a3:8d3:1319:8a2e:370:7348]',
|
||||
port: null,
|
||||
sslPort: 1111,
|
||||
},
|
||||
},
|
||||
],
|
||||
network: {
|
||||
domains: [],
|
||||
start9ToSubdomain: null,
|
||||
@@ -109,11 +145,49 @@ export const mockPatchData: DataModel = {
|
||||
},
|
||||
'package-data': {
|
||||
bitcoind: {
|
||||
...Mock.bitcoind,
|
||||
manifest: {
|
||||
...Mock.bitcoind.manifest,
|
||||
version: '0.19.0',
|
||||
'state-info': {
|
||||
state: PackageState.Installed,
|
||||
manifest: {
|
||||
...Mock.MockManifestBitcoind,
|
||||
version: '0.20.0',
|
||||
},
|
||||
},
|
||||
icon: '/assets/img/service-icons/bitcoind.svg',
|
||||
'last-backup': null,
|
||||
status: {
|
||||
configured: true,
|
||||
main: {
|
||||
status: PackageMainStatus.Running,
|
||||
started: '2021-06-14T20:49:17.774Z',
|
||||
health: {
|
||||
'ephemeral-health-check': {
|
||||
name: 'Ephemeral Health Check',
|
||||
result: HealthResult.Starting,
|
||||
},
|
||||
'chain-state': {
|
||||
name: 'Chain State',
|
||||
result: HealthResult.Loading,
|
||||
message: 'Bitcoin is syncing from genesis',
|
||||
},
|
||||
'p2p-interface': {
|
||||
name: 'P2P',
|
||||
result: HealthResult.Success,
|
||||
message: 'Health check successful',
|
||||
},
|
||||
'rpc-interface': {
|
||||
name: 'RPC',
|
||||
result: HealthResult.Failure,
|
||||
message: 'RPC interface unreachable.',
|
||||
},
|
||||
'unnecessary-health-check': {
|
||||
name: 'Unnecessary Health Check',
|
||||
result: HealthResult.Disabled,
|
||||
},
|
||||
},
|
||||
},
|
||||
'dependency-config-errors': {},
|
||||
},
|
||||
actions: {}, // @TODO
|
||||
'service-interfaces': {
|
||||
ui: {
|
||||
id: 'ui',
|
||||
@@ -330,22 +404,20 @@ export const mockPatchData: DataModel = {
|
||||
},
|
||||
},
|
||||
},
|
||||
'current-dependents': {
|
||||
lnd: {
|
||||
pointers: [],
|
||||
'health-checks': [],
|
||||
},
|
||||
},
|
||||
'current-dependencies': {},
|
||||
'dependency-info': {},
|
||||
'marketplace-url': 'https://registry.start9.com/',
|
||||
'developer-key': 'developer-key',
|
||||
'has-config': true,
|
||||
outboundProxy: null,
|
||||
},
|
||||
lnd: {
|
||||
...Mock.lnd,
|
||||
manifest: {
|
||||
...Mock.lnd.manifest,
|
||||
version: '0.11.0',
|
||||
'state-info': {
|
||||
state: PackageState.Installed,
|
||||
manifest: {
|
||||
...Mock.MockManifestLnd,
|
||||
version: '0.11.0',
|
||||
},
|
||||
},
|
||||
icon: '/assets/img/service-icons/lnd.png',
|
||||
'last-backup': null,
|
||||
@@ -358,6 +430,7 @@ export const mockPatchData: DataModel = {
|
||||
'btc-rpc-proxy': 'This is a config unsatisfied error',
|
||||
},
|
||||
},
|
||||
actions: {},
|
||||
'service-interfaces': {
|
||||
grpc: {
|
||||
id: 'grpc',
|
||||
@@ -568,12 +641,13 @@ export const mockPatchData: DataModel = {
|
||||
},
|
||||
},
|
||||
},
|
||||
'current-dependents': {},
|
||||
'current-dependencies': {
|
||||
bitcoind: {
|
||||
versionRange: '>=26.0.0',
|
||||
'health-checks': [],
|
||||
},
|
||||
'btc-rpc-proxy': {
|
||||
versionRange: '>2.0.0',
|
||||
'health-checks': [],
|
||||
},
|
||||
},
|
||||
@@ -589,6 +663,8 @@ export const mockPatchData: DataModel = {
|
||||
},
|
||||
'marketplace-url': 'https://registry.start9.com/',
|
||||
'developer-key': 'developer-key',
|
||||
'has-config': true,
|
||||
outboundProxy: null,
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user