chore(common,pockethost): refactor mergeConfig to common

This commit is contained in:
Ben Allfree 2024-06-05 23:00:58 -07:00
parent 268e882398
commit 99151a6a5d
8 changed files with 14 additions and 8 deletions

View File

@ -2,7 +2,7 @@
import chalk from 'chalk'
import stringify from 'json-stringify-safe'
import { mergeConfig } from '../../pockethost/src/util/mergeConfig'
import { mergeConfig } from './mergeConfig'
import { mkSingleton } from './mkSingleton'
import { PocketHostAction, action } from './plugin'

View File

@ -5,6 +5,7 @@ export * from './assert'
export * from './asyncExecutionGuard'
export * from './events'
export * from './ioc'
export * from './mergeConfig'
export * from './mkSingleton'
export * from './newId'
export * from './plugin'

View File

@ -7,8 +7,13 @@ import {
SSL_CERT,
SSL_KEY,
} from '$constants'
import { exitHook, mergeConfig } from '$util'
import { LoggerService, PocketBase, mkSingleton } from '@pockethost/common'
import { exitHook } from '$util'
import {
LoggerService,
PocketBase,
mergeConfig,
mkSingleton,
} from '@pockethost/common'
import { keys, values } from '@s-libs/micro-dash'
import { readFileSync } from 'fs'
import { FtpSrv } from 'ftp-srv'

View File

@ -1,8 +1,9 @@
import { mkInstanceDataPath } from '$constants'
import { asyncExitHook, mergeConfig } from '$util'
import { asyncExitHook } from '$util'
import {
LoggerService,
createCleanupManager,
mergeConfig,
stringify,
} from '@pockethost/common'
import * as fs from 'fs'

View File

@ -3,11 +3,11 @@ import {
MOTHERSHIP_ADMIN_USERNAME,
MOTHERSHIP_URL,
} from '$constants'
import { mergeConfig } from '$util'
import {
Logger,
LoggerService,
PocketBase,
mergeConfig,
mkSingleton,
} from '@pockethost/common'
import { createAdminPbClient } from './createAdminPbClient'

View File

@ -1,6 +1,6 @@
import { INITIAL_PORT_POOL_SIZE } from '$constants'
import { mergeConfig, PromiseAllocator } from '$util'
import { mkSingleton } from '@pockethost/common'
import { PromiseAllocator } from '$util'
import { mergeConfig, mkSingleton } from '@pockethost/common'
import getPort from 'get-port'
export type Config = { maxPorts: number }

View File

@ -6,7 +6,6 @@ export * from './discordAlert'
export * from './env'
export * from './exit'
export * from './internal'
export * from './mergeConfig'
export * from './now'
export * from './process'
export * from './smartFetch'