capacitor-ota 1.0.3 → 1.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -65,8 +65,8 @@ var OtaUpdater = class {
65
65
  error: null
66
66
  });
67
67
  try {
68
- const url = `${this.config.staticUrl}/updates/${this.config.appId}.json?_=${Date.now()}`;
69
- const response = await fetch(url);
68
+ const url = `${this.config.staticUrl}/updates/${this.config.appId}.json`;
69
+ const response = await fetch(url, { cache: "no-store" });
70
70
  if (!response.ok) {
71
71
  if (response.status === 404) {
72
72
  this.setState({ status: "idle" });
@@ -118,7 +118,7 @@ var OtaUpdater = class {
118
118
  }
119
119
  try {
120
120
  const url = `${this.config.staticUrl}/updates/${this.config.appId}.json`;
121
- const data = await (await fetch(url)).json();
121
+ const data = await (await fetch(url, { cache: "no-store" })).json();
122
122
  const { CapacitorUpdater } = await import("@capgo/capacitor-updater");
123
123
  const listener = await CapacitorUpdater.addListener("download", (event) => {
124
124
  this.setState({ progress: event.percent });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "capacitor-ota",
3
- "version": "1.0.3",
3
+ "version": "1.0.4",
4
4
  "type": "module",
5
5
  "main": "dist/src/index.mjs",
6
6
  "types": "dist/src/index.d.mts",