forgot to build last update

This commit is contained in:
2025-10-31 13:26:19 +00:00
parent b800542afa
commit 1452d6eaad
4 changed files with 9 additions and 7 deletions

6
dist/index.cjs.js vendored
View File

@@ -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") {

6
dist/index.es.js vendored
View File

@@ -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") {

View File

@@ -1,6 +1,6 @@
{
"name": "updaterweblibrary",
"version": "1.0.7",
"version": "1.0.8",
"description": "OTA Updater App frontend library",
"repository": {
"type": "git",

View File

@@ -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())
})
})