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:
27
server/node_modules/node-appwrite/dist/client.mjs
generated
vendored
27
server/node_modules/node-appwrite/dist/client.mjs
generated
vendored
@@ -14,7 +14,7 @@ var AppwriteException = class 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")
|
||||
@@ -50,9 +50,9 @@ var _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"
|
||||
};
|
||||
}
|
||||
/**
|
||||
@@ -65,9 +65,6 @@ var _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;
|
||||
}
|
||||
@@ -217,10 +214,7 @@ var _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 File) ?? [];
|
||||
if (!file || !fileParam) {
|
||||
throw new Error("File not found in payload");
|
||||
}
|
||||
const file = Object.values(originalPayload).find((value) => value instanceof File);
|
||||
if (file.size <= _Client.CHUNK_SIZE) {
|
||||
return await this.call(method, url, headers, originalPayload);
|
||||
}
|
||||
@@ -233,8 +227,7 @@ var _Client = class _Client {
|
||||
}
|
||||
headers["content-range"] = `bytes ${start}-${end - 1}/${file.size}`;
|
||||
const chunk = file.slice(start, end);
|
||||
let payload = { ...originalPayload };
|
||||
payload[fileParam] = new File([chunk], file.name);
|
||||
let payload = { ...originalPayload, file: new File([chunk], file.name) };
|
||||
response = await this.call(method, url, headers, payload);
|
||||
if (onProgress && typeof onProgress === "function") {
|
||||
onProgress({
|
||||
@@ -267,7 +260,7 @@ var _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 fetch(uri, options);
|
||||
@@ -285,13 +278,7 @@ var _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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user