Merge pull request #53 from bknd-io/fix/release-0.6.1

fix auth screens' missing config permission, and media URL resolution
This commit is contained in:
dswbx
2025-01-21 17:13:57 +01:00
committed by GitHub
4 changed files with 13 additions and 11 deletions

View File

@@ -3,7 +3,7 @@
"type": "module",
"sideEffects": false,
"bin": "./dist/cli/index.js",
"version": "0.6.0",
"version": "0.6.1",
"description": "Lightweight Firebase/Supabase alternative built to run anywhere — incl. Next.js, Remix, Astro, Cloudflare, Bun, Node, AWS Lambda & more.",
"homepage": "https://bknd.io",
"repository": {

View File

@@ -57,7 +57,7 @@ export function BkndProvider({
errorShown.current = true;
setError(true);
return;
//return;
} else if (error) {
setError(false);
}
@@ -106,7 +106,7 @@ export function BkndProvider({
value={{ ...schema, actions, requireSecrets, app, adminOverride, hasSecrets }}
key={local_version}
>
{error && (
{/*{error && (
<Alert.Exception className="gap-2">
<IconAlertHexagon />
You attempted to load system configuration with secrets without having proper
@@ -115,7 +115,7 @@ export function BkndProvider({
<Button variant="red">Reload</Button>
</a>
</Alert.Exception>
)}
)}*/}
{children}
</BkndContext.Provider>

View File

@@ -219,19 +219,20 @@ export function Dropzone({
return;
}
const { url, headers, method = "POST" } = getUploadInfo(file.body);
const uploadInfo = getUploadInfo(file.body);
console.log("dropzone:uploadInfo", uploadInfo);
const { url, headers, method = "POST" } = uploadInfo;
const formData = new FormData();
formData.append("file", file.body);
const xhr = new XMLHttpRequest();
const urlWithParams = new URL(url);
console.log("xhr:url", url);
const searchParams = new URLSearchParams();
if (overwrite) {
urlWithParams.searchParams.append("overwrite", "1");
searchParams.append("overwrite", "1");
}
console.log("url", urlWithParams.toString());
//return;
xhr.open(method, urlWithParams.toString(), true);
xhr.open(method, String(url) + "?" + String(searchParams), true);
if (headers) {
headers.forEach((value, key) => {

View File

@@ -29,10 +29,11 @@ export function DropzoneContainer({
...props
}: DropzoneContainerProps) {
const id = useId();
const baseUrl = useBaseUrl();
const api = useApi();
const baseUrl = api.baseUrl;
const invalidate = useInvalidate();
const limit = query?.limit ? query?.limit : props.maxItems ? props.maxItems : 50;
console.log("dropzone:baseUrl", baseUrl);
const $q = useEntityQuery(
entity_name as "media",