@inlang/core
Advanced tools
Comparing version 0.8.0 to 0.8.1
@@ -26,7 +26,2 @@ import { setupPlugins } from "../plugin/setupPlugins.js"; | ||
If plugins return errors, chances are high that the plugin errors are the root cause | ||
for the config errors. Try to fix the plugin errors first. | ||
--- | ||
# The following errors occured during the setup of plugins: | ||
@@ -39,2 +34,8 @@ | ||
${configTest.error.message} | ||
--- | ||
If plugins return errors, chances are high that the plugin errors are the root cause | ||
for the config errors. Try to fix the plugin errors first. | ||
`); | ||
@@ -41,0 +42,0 @@ } |
import { PluginSetupError } from "./errors/PluginSetupError.js"; | ||
import { deepmergeInto } from "deepmerge-ts"; | ||
import { dedent } from "ts-dedent"; | ||
/** | ||
@@ -43,5 +44,6 @@ * Setup the plugins and process the config callback. | ||
// if one plugin fails, the whole app should not crash. | ||
errors.push(new PluginSetupError(`Failed to setup plugin '${args.config.plugins[i]?.id}'`, { | ||
cause: error, | ||
})); | ||
errors.push(new PluginSetupError(dedent ` | ||
Failed to setup plugin '${args.config.plugins[i]?.id}': | ||
${error?.message ?? "Unknown error"} | ||
`)); | ||
} | ||
@@ -48,0 +50,0 @@ } |
{ | ||
"name": "@inlang/core", | ||
"type": "module", | ||
"version": "0.8.0", | ||
"version": "0.8.1", | ||
"publishConfig": { | ||
@@ -6,0 +6,0 @@ "access": "public" |
@@ -33,7 +33,2 @@ import type { InlangConfig, InlangConfigModule } from "./schema.js" | ||
If plugins return errors, chances are high that the plugin errors are the root cause | ||
for the config errors. Try to fix the plugin errors first. | ||
--- | ||
# The following errors occured during the setup of plugins: | ||
@@ -46,2 +41,8 @@ | ||
${configTest.error.message} | ||
--- | ||
If plugins return errors, chances are high that the plugin errors are the root cause | ||
for the config errors. Try to fix the plugin errors first. | ||
`) | ||
@@ -48,0 +49,0 @@ } |
@@ -6,2 +6,3 @@ import type { InlangConfig } from "../config/schema.js" | ||
import type { InlangEnvironment } from "../environment/types.js" | ||
import { dedent } from "ts-dedent" | ||
// import { withErrorHandling } from "./withErrorHandling.js" | ||
@@ -56,5 +57,6 @@ | ||
errors.push( | ||
new PluginSetupError(`Failed to setup plugin '${(args.config.plugins[i] as Plugin)?.id}'`, { | ||
cause: error, | ||
}), | ||
new PluginSetupError(dedent` | ||
Failed to setup plugin '${(args.config.plugins[i] as Plugin)?.id}': | ||
${(error as Error | undefined)?.message ?? "Unknown error"} | ||
`), | ||
) | ||
@@ -61,0 +63,0 @@ } |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
464671
5613