Email Sorter Beta

Ich habe soweit automatisiert the Emails sortieren aber ich muss noch schauen was es fur bugs es gibt wenn die app online  ist deswegen wurde ich mit diesen Commit die website veroffentlichen obwohjl es sein konnte  das es noch nicht fertig ist und verkaufs bereit
This commit is contained in:
2026-01-22 19:32:12 +01:00
parent 95349af50b
commit abf761db07
596 changed files with 56405 additions and 51231 deletions

View File

@@ -15,7 +15,7 @@ class AppwriteException extends Error {
}
}
function getUserAgent() {
let ua = "AppwriteNodeJSSDK/21.1.0";
let ua = "AppwriteNodeJSSDK/14.2.0";
const platform = [];
if (typeof process !== "undefined") {
if (typeof process.platform === "string")
@@ -51,9 +51,9 @@ const _Client = class _Client {
"x-sdk-name": "Node.js",
"x-sdk-platform": "server",
"x-sdk-language": "nodejs",
"x-sdk-version": "21.1.0",
"x-sdk-version": "14.2.0",
"user-agent": getUserAgent(),
"X-Appwrite-Response-Format": "1.8.0"
"X-Appwrite-Response-Format": "1.6.0"
};
}
/**
@@ -66,9 +66,6 @@ const _Client = class _Client {
* @returns {this}
*/
setEndpoint(endpoint) {
if (!endpoint.startsWith("http://") && !endpoint.startsWith("https://")) {
throw new AppwriteException("Invalid endpoint URL: " + endpoint);
}
this.config.endpoint = endpoint;
return this;
}
@@ -218,10 +215,7 @@ const _Client = class _Client {
return { uri: url.toString(), options };
}
async chunkedUpload(method, url, headers = {}, originalPayload = {}, onProgress) {
const [fileParam, file] = Object.entries(originalPayload).find(([_, value]) => value instanceof nodeFetchNativeWithAgent.File) ?? [];
if (!file || !fileParam) {
throw new Error("File not found in payload");
}
const file = Object.values(originalPayload).find((value) => value instanceof nodeFetchNativeWithAgent.File);
if (file.size <= _Client.CHUNK_SIZE) {
return await this.call(method, url, headers, originalPayload);
}
@@ -234,8 +228,7 @@ const _Client = class _Client {
}
headers["content-range"] = `bytes ${start}-${end - 1}/${file.size}`;
const chunk = file.slice(start, end);
let payload = { ...originalPayload };
payload[fileParam] = new nodeFetchNativeWithAgent.File([chunk], file.name);
let payload = { ...originalPayload, file: new nodeFetchNativeWithAgent.File([chunk], file.name) };
response = await this.call(method, url, headers, payload);
if (onProgress && typeof onProgress === "function") {
onProgress({
@@ -268,7 +261,7 @@ const _Client = class _Client {
return response.headers.get("location") || "";
}
async call(method, url, headers = {}, params = {}, responseType = "json") {
var _a, _b;
var _a;
const { uri, options } = this.prepareRequest(method, url, headers, params);
let data = null;
const response = await nodeFetchNativeWithAgent.fetch(uri, options);
@@ -286,13 +279,7 @@ const _Client = class _Client {
};
}
if (400 <= response.status) {
let responseText = "";
if (((_b = response.headers.get("content-type")) == null ? void 0 : _b.includes("application/json")) || responseType === "arrayBuffer") {
responseText = JSON.stringify(data);
} else {
responseText = data == null ? void 0 : data.message;
}
throw new AppwriteException(data == null ? void 0 : data.message, response.status, data == null ? void 0 : data.type, responseText);
throw new AppwriteException(data == null ? void 0 : data.message, response.status, data == null ? void 0 : data.type, data);
}
return data;
}