feat(lib/plugins): expose utils in unscoped API

This commit is contained in:
PalmDevs 2025-05-06 22:08:35 +07:00
parent cd62a70001
commit bb8d46468a
No known key found for this signature in database
GPG key ID: 6FAE8F8677ACA8BA
4 changed files with 17 additions and 2 deletions

View file

@ -3,16 +3,17 @@ import * as ModulesLibrary from '@revenge-mod/modules'
import * as PatcherLibrary from '@revenge-mod/patcher'
import * as PluginsLibrary from '@revenge-mod/plugins'
import * as ReactLibrary from '@revenge-mod/react'
import * as UtilsLibrary from '@revenge-mod/utils'
const { PluginFlags, PluginStatus } = PluginsLibrary
export const _uapi: PluginsLibrary.UnscopedInitPluginApi | PluginsLibrary.UnscopedPluginApi = {
discord: DiscordLibrary,
modules: ModulesLibrary,
patcher: PatcherLibrary,
plugins: PluginsLibrary,
react: ReactLibrary,
patcher: PatcherLibrary,
// utils: UtilsLibrary,
utils: UtilsLibrary,
}
const _plugins = new Map<PluginsLibrary.PluginManifest['id'], InternalPlugin>()

View file

@ -12,6 +12,7 @@ export interface UnscopedInitPluginApi {
modules: typeof import('@revenge-mod/modules')
patcher: typeof import('@revenge-mod/patcher')
react: typeof import('@revenge-mod/react')
utils: typeof import('@revenge-mod/utils')
}
/**

View file

@ -3,6 +3,9 @@
"private": true,
"type": "module",
"exports": {
".": {
"default": "./src/index.ts"
},
"./callbacks": {
"default": "./src/callbacks.ts"
},

10
lib/utils/src/index.ts Normal file
View file

@ -0,0 +1,10 @@
export * from './callbacks'
export * from './errors'
export * from './functions'
export * from './generators'
export * from './logger'
export * from './objects'
export * from './proxy'
export * from './react'
export * from './trees'
export * from './types'