Compare commits

..
2 Commits
Author SHA1 Message Date
fyears f26e491922 bump to 0.3.23
Release A New Version / build (16.x) (push) Failing after 47s
2022-05-03 10:06:25 +08:00
fyears dbf80c3359 properly deal with cache-control for onedrive 2022-05-03 10:04:36 +08:00
4 changed files with 6 additions and 15 deletions
+1 -1
View File
@@ -1,7 +1,7 @@
{ {
"id": "remotely-save", "id": "remotely-save",
"name": "Remotely Save", "name": "Remotely Save",
"version": "0.3.22", "version": "0.3.23",
"minAppVersion": "0.13.21", "minAppVersion": "0.13.21",
"description": "Yet another unofficial plugin allowing users to synchronize notes between local device and the cloud service.", "description": "Yet another unofficial plugin allowing users to synchronize notes between local device and the cloud service.",
"author": "fyears", "author": "fyears",
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "remotely-save", "name": "remotely-save",
"version": "0.3.22", "version": "0.3.23",
"description": "This is yet another sync plugin for Obsidian app.", "description": "This is yet another sync plugin for Obsidian app.",
"scripts": { "scripts": {
"dev2": "node esbuild.config.mjs", "dev2": "node esbuild.config.mjs",
+3 -12
View File
@@ -461,7 +461,6 @@ export class WrappedOnedriveClient {
body: JSON.stringify(payload), body: JSON.stringify(payload),
headers: { headers: {
Authorization: `Bearer ${await this.authGetter.getAccessToken()}`, Authorization: `Bearer ${await this.authGetter.getAccessToken()}`,
"Cache-Control": "no-cache",
}, },
}) })
); );
@@ -478,7 +477,6 @@ export class WrappedOnedriveClient {
body: JSON.stringify(payload), body: JSON.stringify(payload),
headers: { headers: {
Authorization: `Bearer ${await this.authGetter.getAccessToken()}`, Authorization: `Bearer ${await this.authGetter.getAccessToken()}`,
"Cache-Control": "no-cache",
}, },
}) })
); );
@@ -493,7 +491,6 @@ export class WrappedOnedriveClient {
method: "DELETE", method: "DELETE",
headers: { headers: {
Authorization: `Bearer ${await this.authGetter.getAccessToken()}`, Authorization: `Bearer ${await this.authGetter.getAccessToken()}`,
"Cache-Control": "no-cache",
}, },
}); });
} else { } else {
@@ -501,7 +498,6 @@ export class WrappedOnedriveClient {
method: "DELETE", method: "DELETE",
headers: { headers: {
Authorization: `Bearer ${await this.authGetter.getAccessToken()}`, Authorization: `Bearer ${await this.authGetter.getAccessToken()}`,
"Cache-Control": "no-cache",
}, },
}); });
} }
@@ -522,7 +518,6 @@ export class WrappedOnedriveClient {
headers: { headers: {
"Content-Type": DEFAULT_CONTENT_TYPE, "Content-Type": DEFAULT_CONTENT_TYPE,
Authorization: `Bearer ${await this.authGetter.getAccessToken()}`, Authorization: `Bearer ${await this.authGetter.getAccessToken()}`,
"Cache-Control": "no-cache",
}, },
}); });
} else { } else {
@@ -532,7 +527,6 @@ export class WrappedOnedriveClient {
headers: { headers: {
"Content-Type": DEFAULT_CONTENT_TYPE, "Content-Type": DEFAULT_CONTENT_TYPE,
Authorization: `Bearer ${await this.authGetter.getAccessToken()}`, Authorization: `Bearer ${await this.authGetter.getAccessToken()}`,
"Cache-Control": "no-cache",
}, },
}); });
} }
@@ -826,12 +820,9 @@ const downloadFromRemoteRaw = async (
).arrayBuffer; ).arrayBuffer;
return content; return content;
} else { } else {
const content = await ( const content = await // cannot set no-cache here, will have cors error
await fetch(downloadUrl, { (
headers: { await fetch(downloadUrl)
"Cache-Control": "no-cache",
},
})
).arrayBuffer(); ).arrayBuffer();
return content; return content;
} }
+1 -1
View File
@@ -1,4 +1,4 @@
{ {
"0.3.2": "0.12.15", "0.3.2": "0.12.15",
"0.3.22": "0.13.21" "0.3.23": "0.13.21"
} }