refactor(multi): remove common import from core import

This commit is contained in:
Ben Allfree 2024-06-27 01:00:11 -07:00
parent eb0d011b3e
commit acd760a93f
7 changed files with 15 additions and 23 deletions

View File

@ -3,7 +3,7 @@ import {
PocketHostPlugin,
onAfterInstanceStartedAction,
parseError,
} from 'pockethost/core'
} from 'pockethost'
import { LOGIN, PASSWORD, PLUGIN_NAME } from './constants'
import { dbg, info } from './log'

View File

@ -1,4 +1,4 @@
import { LoggerService } from 'pockethost/core'
import { LoggerService } from 'pockethost'
const logger = LoggerService().create('plugin-auto-admin')
export const { dbg, info } = logger

View File

@ -4,22 +4,24 @@ import getPort from 'get-port'
import { gobot } from 'gobot'
import { join } from 'path'
import {
APEX_DOMAIN,
INSTANCE_DATA_DIR,
LoggerService,
PH_HOME,
PORT,
PocketHostPlugin,
doAfterInstanceStartedAction,
doAfterInstanceStoppedAction,
doInstanceLogAction,
exitHook,
mkInstance,
onAfterInstanceFoundAction,
onAfterServerStartAction,
onGetInstanceByRequestInfoFilter,
onGetOrProvisionInstanceUrlFilter,
onNewInstanceRecordFilter,
} from 'pockethost'
import {
APEX_DOMAIN,
INSTANCE_DATA_DIR,
PH_HOME,
PORT,
exitHook,
tryFetch,
} from 'pockethost/core'
import { gte } from 'semver'

View File

@ -1,2 +1 @@
export * from './src/common'
export * from './src/core'

View File

@ -4,15 +4,14 @@ import { uniq } from '@s-libs/micro-dash'
import { program } from 'commander'
import { readFileSync } from 'fs'
import updateNotifier from 'update-notifier'
import { PH_PLUGINS, PH_PROJECT_DIR } from '../../core'
import {
DEBUG,
LogLevelName,
LoggerService,
PH_PLUGINS,
PH_PROJECT_DIR,
doCliCommandsFilter,
loadPlugins,
} from '../../core'
} from '../common'
import { ConfigCommand } from './commands/ConfigCommand'
import { PluginCommand } from './commands/PluginCommand'
import { ServeCommand } from './commands/ServeCommand'

View File

@ -4,14 +4,8 @@ import envPaths from 'env-paths'
import { dirname, join } from 'path'
import { cwd } from 'process'
import { fileURLToPath } from 'url'
import {
InstanceId,
mkBoolean,
mkCsvString,
mkNumber,
mkPath,
mkString,
} from '../core'
import { mkBoolean, mkCsvString, mkNumber, mkPath, mkString } from '../core'
import { InstanceId } from './common'
import { DEBUG, IS_DEV } from './common/debug'
import { Settings } from './core/Settings'

View File

@ -2,10 +2,7 @@ import express, { ErrorRequestHandler } from 'express'
import 'express-async-errors'
import { default as httpProxy } from 'http-proxy'
import {
APEX_DOMAIN,
LoggerService,
PORT,
asyncExitHook,
doAfterInstanceFoundAction,
doAfterServerStartAction,
doAppMountedAction,
@ -15,7 +12,8 @@ import {
doRequestErrorAction,
doRequestErrorMessageFilter,
onInstanceLogAction,
} from '../core'
} from '../common'
import { APEX_DOMAIN, PORT, asyncExitHook } from '../core'
export const serve = async () => {
const _proxyLogger = LoggerService().create('ProxyService')