feat: 日志中增加上传配置的响应

This commit is contained in:
xream 2025-01-09 18:56:36 +08:00
parent 01eb69d8ae
commit f96d9dea74
3 changed files with 28 additions and 1 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "sub-store", "name": "sub-store",
"version": "2.16.7", "version": "2.16.8",
"description": "Advanced Subscription Manager for QX, Loon, Surge, Stash and ShadowRocket.", "description": "Advanced Subscription Manager for QX, Loon, Surge, Stash and ShadowRocket.",
"main": "src/main.js", "main": "src/main.js",
"scripts": { "scripts": {

View File

@ -174,6 +174,14 @@ async function doSync() {
const resp = await syncToGist(files); const resp = await syncToGist(files);
const body = JSON.parse(resp.body); const body = JSON.parse(resp.body);
delete body.history;
delete body.forks;
delete body.owner;
Object.values(body.files).forEach((file) => {
delete file.content;
});
$.info('上传配置响应:');
$.info(JSON.stringify(body, null, 2));
for (const artifact of allArtifacts) { for (const artifact of allArtifacts) {
if (artifact.sync) { if (artifact.sync) {

View File

@ -625,6 +625,15 @@ async function syncArtifacts() {
const resp = await syncToGist(files); const resp = await syncToGist(files);
const body = JSON.parse(resp.body); const body = JSON.parse(resp.body);
delete body.history;
delete body.forks;
delete body.owner;
Object.values(body.files).forEach((file) => {
delete file.content;
});
$.info('上传配置响应:');
$.info(JSON.stringify(body, null, 2));
for (const artifact of allArtifacts) { for (const artifact of allArtifacts) {
if (artifact.sync) { if (artifact.sync) {
artifact.updated = new Date().getTime(); artifact.updated = new Date().getTime();
@ -743,6 +752,16 @@ async function syncArtifact(req, res) {
}); });
artifact.updated = new Date().getTime(); artifact.updated = new Date().getTime();
const body = JSON.parse(resp.body); const body = JSON.parse(resp.body);
delete body.history;
delete body.forks;
delete body.owner;
Object.values(body.files).forEach((file) => {
delete file.content;
});
$.info('上传配置响应:');
$.info(JSON.stringify(body, null, 2));
let files = body.files; let files = body.files;
let isGitLab; let isGitLab;
if (Array.isArray(files)) { if (Array.isArray(files)) {