@yz-social/civildefense.io 4.5.28 → 4.5.29
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.
package/package.json
CHANGED
package/public/service-worker.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const { Request, Response, URL, clients} = self;
|
|
2
2
|
// Little point in trying to automatically pull this through package.json, as we need a byte change in THIS file to trigger a new worker.
|
|
3
|
-
const serviceVersion = '4.5.
|
|
3
|
+
const serviceVersion = '4.5.29';
|
|
4
4
|
|
|
5
5
|
const cacheList = [ // The files we need.
|
|
6
6
|
"/",
|
package/server/getLocation.js
CHANGED
|
@@ -7,10 +7,10 @@ import { resolve } from './dirname.js';
|
|
|
7
7
|
const filename = './location.json';
|
|
8
8
|
export const data = await import(filename, {with: { type: 'json' }})
|
|
9
9
|
.catch(async error => {
|
|
10
|
-
console.log(
|
|
10
|
+
console.log("Unable to get location.json");
|
|
11
11
|
const response = await fetch('https://ipinfo.io/json');
|
|
12
12
|
const string = await response.text();
|
|
13
|
-
console.log(
|
|
13
|
+
console.log("Estimating location as", string);
|
|
14
14
|
await fs.writeFile(resolve(filename), string, 'utf8');
|
|
15
15
|
return {default: JSON.parse(string)};
|
|
16
16
|
});
|