From 1452d6eaad0939153456797a8432318bc3c5cc2a Mon Sep 17 00:00:00 2001 From: chopster44 Date: Fri, 31 Oct 2025 13:26:19 +0000 Subject: [PATCH] forgot to build last update --- dist/index.cjs.js | 6 +++--- dist/index.es.js | 6 +++--- package.json | 2 +- test/archive.test.ts | 2 ++ 4 files changed, 9 insertions(+), 7 deletions(-) diff --git a/dist/index.cjs.js b/dist/index.cjs.js index 255e35a..bde5d44 100644 --- a/dist/index.cjs.js +++ b/dist/index.cjs.js @@ -10,8 +10,8 @@ class Updater { this.feedType = feedType; } async getRawArchive() { - const res = await fetch(`https://cors.emaker.limited/?url=${this.archiveURL}.${this.feedType}`, { - "mode": "cors" + const res = await fetch(`http://cors.emaker.limited/?url=${this.archiveURL}.${this.feedType}`, { + // "mode": "cors" }); const text = await res.text(); return text; @@ -24,7 +24,7 @@ class Updater { if (element.name == "title") { outEntry.title = element.children[0].text; } - else if (element.name == "date") { + else if (element.name == "updated") { outEntry.date = new Date(element.children[0].text); } else if (element.name == "link") { diff --git a/dist/index.es.js b/dist/index.es.js index 83cae78..4884f21 100644 --- a/dist/index.es.js +++ b/dist/index.es.js @@ -8,8 +8,8 @@ class Updater { this.feedType = feedType; } async getRawArchive() { - const res = await fetch(`https://cors.emaker.limited/?url=${this.archiveURL}.${this.feedType}`, { - "mode": "cors" + const res = await fetch(`http://cors.emaker.limited/?url=${this.archiveURL}.${this.feedType}`, { + // "mode": "cors" }); const text = await res.text(); return text; @@ -22,7 +22,7 @@ class Updater { if (element.name == "title") { outEntry.title = element.children[0].text; } - else if (element.name == "date") { + else if (element.name == "updated") { outEntry.date = new Date(element.children[0].text); } else if (element.name == "link") { diff --git a/package.json b/package.json index f61005e..f822073 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "updaterweblibrary", - "version": "1.0.7", + "version": "1.0.8", "description": "OTA Updater App frontend library", "repository": { "type": "git", diff --git a/test/archive.test.ts b/test/archive.test.ts index f625a7e..4b44fee 100644 --- a/test/archive.test.ts +++ b/test/archive.test.ts @@ -30,6 +30,8 @@ describe("data validation", () => { const res: versionNotes[] = await updater.getArchive(); const date: Date = res[0].date as Date; const today: Date = new Date; + console.log(date); + console.log(today) expect(date.getUTCSeconds()).not.toBe(today.getUTCSeconds()) }) })