mirror of
https://github.com/chrononeko/chronocat.git
synced 2024-11-25 09:37:35 +00:00
feat(shell): update ctx
This commit is contained in:
parent
07f282420d
commit
18ffcdbad1
@ -14,6 +14,8 @@ import { uix } from './services/uix'
|
||||
import { validate } from './services/validate'
|
||||
import type { ChronocatContext, Engine } from './types'
|
||||
import { PLATFORM } from './utils/consts'
|
||||
import { exists } from './utils/fs'
|
||||
import { sleep, timeout } from './utils/time'
|
||||
|
||||
export * from './satori/types'
|
||||
export * from './services/config/configEntity'
|
||||
@ -34,11 +36,14 @@ export const chronocat = async () => {
|
||||
api,
|
||||
baseDir,
|
||||
emit: emitter.emit,
|
||||
exists,
|
||||
getAuthData,
|
||||
getConfig,
|
||||
getSelfProfile,
|
||||
l,
|
||||
platform: PLATFORM,
|
||||
sleep,
|
||||
timeout,
|
||||
uix,
|
||||
validate,
|
||||
whenReady: () => readyPromise,
|
||||
|
@ -14,17 +14,22 @@ import type { getSelfProfile } from './services/selfProfile'
|
||||
import type { uix } from './services/uix'
|
||||
import type { validate } from './services/validate'
|
||||
import type { PLATFORM } from './utils/consts'
|
||||
import type { exists } from './utils/fs'
|
||||
import type { sleep, timeout } from './utils/time'
|
||||
|
||||
export interface ChronocatContext {
|
||||
chronocat: {
|
||||
api: typeof api
|
||||
baseDir: typeof baseDir
|
||||
emit: (message: DispatchMessage) => void
|
||||
exists: typeof exists
|
||||
getAuthData: typeof getAuthData
|
||||
getConfig: typeof getConfig
|
||||
getSelfProfile: typeof getSelfProfile
|
||||
l: typeof l
|
||||
platform: typeof PLATFORM
|
||||
sleep: typeof sleep
|
||||
timeout: typeof timeout
|
||||
uix: typeof uix
|
||||
validate: typeof validate
|
||||
whenReady: () => Promise<void>
|
||||
|
Loading…
Reference in New Issue
Block a user