mirror of
https://github.com/pockethost/pockethost.git
synced 2025-11-29 08:28:40 +00:00
refactor(multi): remove common import from core import
This commit is contained in:
parent
eb0d011b3e
commit
acd760a93f
@ -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'
|
||||||
|
|
||||||
|
|||||||
@ -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
|
||||||
|
|||||||
@ -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'
|
||||||
|
|||||||
@ -1,2 +1 @@
|
|||||||
export * from './src/common'
|
|
||||||
export * from './src/core'
|
export * from './src/core'
|
||||||
|
|||||||
@ -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'
|
||||||
|
|||||||
@ -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'
|
||||||
|
|
||||||
|
|||||||
@ -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')
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user