seyfert 3.2.5-dev-16284796103.0 → 3.2.5-dev-16476410534.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -311,10 +311,14 @@ class BaseClient {
311
311
  const seyfertConfig = (BaseClient._seyfertCfWorkerConfig ||
312
312
  (await this.options?.getRC?.()) ||
313
313
  (await Promise.any(['.js', '.mjs', '.cjs', '.ts', '.mts', '.cts'].map(ext => (0, common_1.magicImport)((0, node_path_1.join)(process.cwd(), `seyfert.config${ext}`)).then(x => x.default ?? x))).catch((e) => {
314
- if (e.errors.every((err) => err.stack?.includes('ERR_MODULE_NOT_FOUND'))) {
315
- throw new Error('No seyfert.config file found');
316
- }
317
- throw e.errors.find((err) => !err.stack?.includes('ERR_MODULE_NOT_FOUND')) ?? e.errors[0];
314
+ const errors = e.errors.map((err) => {
315
+ err.message = err.message.replace(/seyfert\.config\.(js|mjs|cjs|ts|mts|cts)/g, 'seyfert.config');
316
+ return err;
317
+ });
318
+ const uniqueError = errors.find(er => errors.filter(err => err.message === er.message).length === 1);
319
+ if (uniqueError)
320
+ throw uniqueError;
321
+ throw new Error('No seyfert.config file found');
318
322
  })));
319
323
  const { locations, debug, ...env } = seyfertConfig;
320
324
  const locationsFullPaths = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "seyfert",
3
- "version": "3.2.5-dev-16284796103.0",
3
+ "version": "3.2.5-dev-16476410534.0",
4
4
  "description": "The most advanced framework for discord bots",
5
5
  "main": "./lib/index.js",
6
6
  "module": "./lib/index.js",