Skip to content

Commit

Permalink
chore: removed logs
Browse files Browse the repository at this point in the history
  • Loading branch information
gentlementlegen committed Oct 2, 2024
1 parent 75f2bb6 commit 7417f3d
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions src/helpers/validator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,16 @@ import { Env, envSchema, envValidator, PluginSettings, pluginSettingsSchema, plu
export function validateAndDecodeSchemas(rawEnv: object, rawSettings: object) {
const errors: ValueError[] = [];

console.log(rawEnv, rawSettings);
const env = Value.Default(envSchema, rawEnv) as Env;
if (!envValidator.test(env)) {
for (const error of envValidator.errors(env)) {
console.error(error);
errors.push(error);
}
}

const settings = Value.Default(pluginSettingsSchema, rawSettings) as PluginSettings;
if (!pluginSettingsValidator.test(settings)) {
for (const error of pluginSettingsValidator.errors(settings)) {
console.error(error);
errors.push(error);
}
}
Expand All @@ -30,7 +27,6 @@ export function validateAndDecodeSchemas(rawEnv: object, rawSettings: object) {
const decodedEnv = Value.Decode(envSchema, rawEnv || {});
return { decodedEnv, decodedSettings };
} catch (e) {
console.error("validateAndDecodeSchemas", e);
if (e instanceof TransformDecodeCheckError || e instanceof TransformDecodeError) {
throw { errors: [e.error] };
}
Expand Down

0 comments on commit 7417f3d

Please sign in to comment.