mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-18 01:36:08 +08:00
20 lines
649 B
JavaScript
Executable File
20 lines
649 B
JavaScript
Executable File
#!/usr/bin/env node
|
|
require('@hydrooj/utils/lib/register');
|
|
|
|
const { default: hook } = require('require-resolve-hook');
|
|
const { bypass } = hook(/^(hydrooj|@hydrooj\/utils|cordis|schemastery|lodash|js-yaml)/, (id) => {
|
|
if (id.startsWith('hydrooj/src')) {
|
|
console.log('module require via %s is deprecated.', id);
|
|
if (process.env.DEV) {
|
|
console.log(
|
|
new Error().stack.split('\n')
|
|
.filter((i) => !i.includes('node:internal') && i.startsWith(' '))
|
|
.join('\n'),
|
|
);
|
|
}
|
|
}
|
|
return bypass(() => require.resolve(id));
|
|
});
|
|
|
|
require('./commands');
|