2025-06-03 16:24:58 +07:00
|
|
|
import {
|
|
|
|
|
byDependencies,
|
|
|
|
|
byProps,
|
|
|
|
|
preferExports,
|
|
|
|
|
} from '@revenge-mod/modules/finders/filters'
|
2025-05-09 19:05:31 +07:00
|
|
|
import { lookupModule } from '@revenge-mod/modules/finders/lookup'
|
2025-05-08 18:53:30 +07:00
|
|
|
import { proxify } from '@revenge-mod/utils/proxy'
|
|
|
|
|
|
2025-06-13 23:35:23 +07:00
|
|
|
const { loose, relative } = byDependencies
|
|
|
|
|
|
2025-05-08 18:53:30 +07:00
|
|
|
export let nodeUtil: typeof import('node:util') = proxify(
|
|
|
|
|
() => {
|
2025-05-18 22:24:48 +07:00
|
|
|
const [module] = lookupModule(
|
2025-06-03 16:24:58 +07:00
|
|
|
preferExports(
|
|
|
|
|
byProps<typeof nodeUtil>('inspect'),
|
2025-06-12 23:53:19 +07:00
|
|
|
byDependencies([
|
2025-06-13 23:35:23 +07:00
|
|
|
loose([relative(2, true), relative(4, true)]),
|
2025-06-12 23:53:19 +07:00
|
|
|
[],
|
|
|
|
|
[],
|
|
|
|
|
]),
|
2025-06-03 16:24:58 +07:00
|
|
|
),
|
2025-05-08 18:53:30 +07:00
|
|
|
{
|
|
|
|
|
includeUninitialized: true,
|
|
|
|
|
},
|
|
|
|
|
)
|
|
|
|
|
|
2025-05-08 23:43:25 +07:00
|
|
|
if (module) return (nodeUtil = module)
|
2025-05-08 18:53:30 +07:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
hint: 'object',
|
|
|
|
|
},
|
|
|
|
|
)!
|