chore: remove AsyncContext

This commit is contained in:
Ben Allfree 2023-10-21 03:20:18 -07:00
parent a76566002d
commit db2a47fd4a
4 changed files with 1 additions and 10 deletions

View File

@ -7,7 +7,6 @@ import {
import { port as getPort, InstanceLogger } from '$services' import { port as getPort, InstanceLogger } from '$services'
import { import {
assert, assert,
AsyncContext,
asyncExitHook, asyncExitHook,
mkInternalUrl, mkInternalUrl,
tryFetch, tryFetch,
@ -67,7 +66,7 @@ export const createPocketbaseService = async (
const tm = createTimerManager({}) const tm = createTimerManager({})
const _spawn = async (cfg: SpawnConfig, context?: AsyncContext) => { const _spawn = async (cfg: SpawnConfig) => {
const cm = createCleanupManager() const cm = createCleanupManager()
const logger = (context?.logger || _serviceLogger).create('spawn') const logger = (context?.logger || _serviceLogger).create('spawn')
const { dbg, warn, error } = logger const { dbg, warn, error } = logger

View File

@ -1,5 +1,4 @@
import { MixinContext } from '$services' import { MixinContext } from '$services'
import { AsyncContext } from '$util'
import { import {
INSTANCE_COLLECTION, INSTANCE_COLLECTION,
InstanceFields, InstanceFields,
@ -56,7 +55,6 @@ export const createInstanceMixin = (context: MixinContext) => {
const getInstanceById = async ( const getInstanceById = async (
instanceId: InstanceId, instanceId: InstanceId,
context?: AsyncContext,
): Promise<[InstanceFields, UserFields] | []> => ): Promise<[InstanceFields, UserFields] | []> =>
client client
.collection(INSTANCE_COLLECTION) .collection(INSTANCE_COLLECTION)

View File

@ -1,5 +0,0 @@
import { Logger } from '@pockethost/common'
export type AsyncContext = {
logger: Logger
}

View File

@ -1,4 +1,3 @@
export * from './AsyncContext'
export * from './PromiseAllocator' export * from './PromiseAllocator'
export * from './assert' export * from './assert'
export * from './downloadAndExtract' export * from './downloadAndExtract'