mirror of
https://github.com/shishantbiswas/bknd.git
synced 2026-03-16 04:27:21 +00:00
fix: update external dependencies and enhance error logging
Added "wrangler" to the external dependencies in the build configuration. Improved error logging in the Storage class to include the file name when image dimension retrieval fails. Enhanced the InvalidSchemaError to provide additional context by including the schema in the error message.
This commit is contained in:
@@ -4,7 +4,7 @@ import { formatNumber } from "bknd/utils";
|
|||||||
import * as esbuild from "esbuild";
|
import * as esbuild from "esbuild";
|
||||||
|
|
||||||
const deps = Object.keys(pkg.dependencies);
|
const deps = Object.keys(pkg.dependencies);
|
||||||
const external = ["jsonv-ts/*", ...deps];
|
const external = ["jsonv-ts/*", "wrangler", ...deps];
|
||||||
|
|
||||||
if (process.env.DEBUG) {
|
if (process.env.DEBUG) {
|
||||||
const result = await esbuild.build({
|
const result = await esbuild.build({
|
||||||
|
|||||||
@@ -38,7 +38,8 @@ export class InvalidSchemaError extends Error {
|
|||||||
) {
|
) {
|
||||||
super(
|
super(
|
||||||
`Invalid schema given for ${JSON.stringify(value, null, 2)}\n\n` +
|
`Invalid schema given for ${JSON.stringify(value, null, 2)}\n\n` +
|
||||||
`Error: ${JSON.stringify(errors[0], null, 2)}`,
|
`Error: ${JSON.stringify(errors[0], null, 2)}\n\n` +
|
||||||
|
`Schema: ${JSON.stringify(schema.toJSON(), null, 2)}`,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -103,7 +103,7 @@ export class Storage implements EmitsEvents {
|
|||||||
...dim,
|
...dim,
|
||||||
};
|
};
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
$console.warn("Failed to get image dimensions", e);
|
$console.warn("Failed to get image dimensions", e, file);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user