forgot to build last update
This commit is contained in:
6
dist/index.cjs.js
vendored
6
dist/index.cjs.js
vendored
@@ -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
6
dist/index.es.js
vendored
@@ -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") {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "updaterweblibrary",
|
||||
"version": "1.0.7",
|
||||
"version": "1.0.8",
|
||||
"description": "OTA Updater App frontend library",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
||||
@@ -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())
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user