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 chalk from 'chalk'
import stringify from 'json-stringify-safe' import stringify from 'json-stringify-safe'
import { mergeConfig } from '../../pockethost/src/util/mergeConfig' import { mergeConfig } from './mergeConfig'
import { mkSingleton } from './mkSingleton' import { mkSingleton } from './mkSingleton'
import { PocketHostAction, action } from './plugin' import { PocketHostAction, action } from './plugin'

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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