fix schema import path

This commit is contained in:
dswbx
2025-07-07 16:09:29 +02:00
parent 43c8f14470
commit 88ec3432a0
97 changed files with 180 additions and 180 deletions
+4 -1
View File
@@ -12,7 +12,10 @@ export function getBindings<T extends GetBindingType>(env: any, type: T): Bindin
const bindings: BindingMap<T>[] = [];
for (const key in env) {
try {
if (env[key] && (env[key] as any).constructor.name === type) {
if (
env[key] &&
((env[key] as any).constructor.name === type || String(env[key]) === `[object ${type}]`)
) {
bindings.push({
key,
value: env[key] as BindingTypeMap[T],
+1 -1
View File
@@ -13,7 +13,7 @@ export {
type BindingMap,
} from "./bindings";
export { constants } from "./config";
export { StorageR2Adapter } from "./storage/StorageR2Adapter";
export { StorageR2Adapter, registerMedia } from "./storage/StorageR2Adapter";
export { registries } from "bknd";
// for compatibility with old code
@@ -2,7 +2,7 @@ import { registries } from "bknd";
import { isDebug } from "bknd/core";
import { guessMimeType as guess, StorageAdapter, type FileBody } from "bknd/media";
import { getBindings } from "../bindings";
import { s } from "core/object/schema";
import { s } from "bknd/core";
export function makeSchema(bindings: string[] = []) {
return s.object(