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, PocketHostPlugin,
onAfterInstanceStartedAction, onAfterInstanceStartedAction,
parseError, parseError,
} from 'pockethost/core' } from 'pockethost'
import { LOGIN, PASSWORD, PLUGIN_NAME } from './constants' import { LOGIN, PASSWORD, PLUGIN_NAME } from './constants'
import { dbg, info } from './log' 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') const logger = LoggerService().create('plugin-auto-admin')
export const { dbg, info } = logger export const { dbg, info } = logger

View File

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

View File

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

View File

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

View File

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

View File

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