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.
- package/lib/client/base.js +8 -4
- package/package.json +1 -1
package/lib/client/base.js
CHANGED
|
@@ -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
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
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 = {
|