mirror of
https://github.com/pockethost/pockethost.git
synced 2025-07-03 03:12:29 +00:00
chore: refactor clientService
This commit is contained in:
parent
a611c86c9c
commit
3f942e2507
@ -1,4 +1,5 @@
|
||||
import { logger } from '@pockethost/common'
|
||||
import { createPbClient, PocketbaseClientApi } from '../clientService/PbClient'
|
||||
import {
|
||||
DAEMON_PB_PASSWORD,
|
||||
DAEMON_PB_USERNAME,
|
||||
@ -6,7 +7,6 @@ import {
|
||||
PUBLIC_PB_PROTOCOL,
|
||||
PUBLIC_PB_SUBDOMAIN,
|
||||
} from '../constants'
|
||||
import { createPbClient, PocketbaseClientApi } from '../db/PbClient'
|
||||
import { pocketbase } from '../services/PocketBaseService'
|
||||
import { safeCatch } from '../util/promiseHelper'
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { logger } from '@pockethost/common'
|
||||
import { clientService } from './clientService/clientService'
|
||||
import { DEBUG, PH_BIN_CACHE, PUBLIC_PB_SUBDOMAIN } from './constants'
|
||||
import { clientService } from './db/clientService'
|
||||
import { backupService } from './services/BackupService'
|
||||
import { ftpService } from './services/FtpService/FtpService'
|
||||
import { instanceService } from './services/InstanceService'
|
||||
|
@ -14,7 +14,7 @@ import {
|
||||
RpcCommands,
|
||||
} from '@pockethost/common'
|
||||
import Bottleneck from 'bottleneck'
|
||||
import { clientService } from '../db/clientService'
|
||||
import { clientService } from '../clientService/clientService'
|
||||
import { backupInstance } from '../util/backupInstance'
|
||||
import { rpcService } from './RpcService'
|
||||
|
||||
|
@ -1,6 +1,8 @@
|
||||
import { logger, mkSingleton } from '@pockethost/common'
|
||||
import { readFileSync } from 'fs'
|
||||
import { FtpSrv } from 'ftp-srv'
|
||||
import { clientService } from '../../clientService/clientService'
|
||||
import { createPbClient } from '../../clientService/PbClient'
|
||||
import {
|
||||
PH_FTP_PASV_IP,
|
||||
PH_FTP_PASV_PORT_MAX,
|
||||
@ -9,8 +11,6 @@ import {
|
||||
SSL_CERT,
|
||||
SSL_KEY,
|
||||
} from '../../constants'
|
||||
import { clientService } from '../../db/clientService'
|
||||
import { createPbClient } from '../../db/PbClient'
|
||||
import { PhFs } from './PhFs'
|
||||
|
||||
export type FtpConfig = {}
|
||||
|
@ -3,8 +3,8 @@ import { existsSync, mkdirSync } from 'fs'
|
||||
import { FileStat, FileSystem, FtpConnection } from 'ftp-srv'
|
||||
import { join } from 'path'
|
||||
import { Readable } from 'stream'
|
||||
import { PocketbaseClientApi } from '../../clientService/PbClient'
|
||||
import { DAEMON_PB_DATA_DIR } from '../../constants'
|
||||
import { PocketbaseClientApi } from '../../db/PbClient'
|
||||
import {
|
||||
FOLDER_NAMES,
|
||||
isFolder,
|
||||
|
@ -14,13 +14,13 @@ import { forEachRight, map } from '@s-libs/micro-dash'
|
||||
import Bottleneck from 'bottleneck'
|
||||
import getPort from 'get-port'
|
||||
import { AsyncReturnType } from 'type-fest'
|
||||
import { clientService } from '../clientService/clientService'
|
||||
import {
|
||||
DAEMON_PB_IDLE_TTL,
|
||||
DAEMON_PB_PORT_BASE,
|
||||
PUBLIC_APP_DOMAIN,
|
||||
PUBLIC_APP_PROTOCOL,
|
||||
} from '../constants'
|
||||
import { clientService } from '../db/clientService'
|
||||
import { mkInternalUrl } from '../util/internal'
|
||||
import { now } from '../util/now'
|
||||
import { safeCatch } from '../util/promiseHelper'
|
||||
|
@ -13,7 +13,7 @@ import Bottleneck from 'bottleneck'
|
||||
import { default as knexFactory } from 'knex'
|
||||
import pocketbaseEs from 'pocketbase'
|
||||
import { AsyncReturnType, JsonObject } from 'type-fest'
|
||||
import { clientService } from '../db/clientService'
|
||||
import { clientService } from '../clientService/clientService'
|
||||
|
||||
export type RpcServiceApi = AsyncReturnType<typeof rpcService>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user