chore: Fix the build for the start9labs/sdk was a new directory structure

This commit is contained in:
J H
2024-03-14 15:14:12 -06:00
parent a089d544a5
commit e87182264a
5 changed files with 13 additions and 8 deletions

View File

@@ -1,16 +1,16 @@
import { DOCUMENT } from '@angular/common'
import { Inject, Injectable } from '@angular/core'
import { WorkspaceConfig } from '@start9labs/shared'
import {
HostnameInfoIp,
HostnameInfoOnion,
} from '@start9labs/start-sdk/mjs/lib/types'
import { types } from '@start9labs/start-sdk'
import {
InstalledPackageDataEntry,
PackageMainStatus,
PackageState,
} from 'src/app/services/patch-db/data-model'
type HostnameInfoIp = types.HostnameInfoIp
type HostnameInfoOnion = types.HostnameInfoOnion
const {
gitHash,
useMocks,
@@ -79,14 +79,14 @@ export class ConfigService {
if (host.kind === 'multi') {
const onionHostname = host.hostnames.find(
h => h.kind === 'onion',
(h: any) => h.kind === 'onion',
) as HostnameInfoOnion
if (this.isTor() && onionHostname) {
url.hostname = onionHostname.hostname.value
} else {
const ipHostname = host.hostnames.find(
h => h.kind === 'ip',
(h: any) => h.kind === 'ip',
) as HostnameInfoIp
if (!ipHostname) return ''