all repos — caroster @ 370004b3ff7dccd334b8a38211ed48909f230030

[Octree] Group carpool to your event https://caroster.io

šŸ› Fix PWA & Linter
Tim Izzo tim@octree.ch
Mon, 21 Jun 2021 13:43:21 +0200
commit

370004b3ff7dccd334b8a38211ed48909f230030

parent

d95489de238022fba2931520d1174ed2b9483154

2 files changed, 3 insertions(+), 2 deletions(-)

jump to
M frontend/.eslintignorefrontend/.eslintignore

@@ -1,3 +1,4 @@

build/ *test.js -src/serviceWorker.js+src/serviceWorker.js +public/
M frontend/public/sw.jsfrontend/public/sw.js

@@ -1,1 +1,1 @@

-if(!self.define){const e=e=>{"require"!==e&&(e+=".js");let s=Promise.resolve();return t[e]||(s=new Promise((async s=>{if("document"in self){const t=document.createElement("script");t.src=e,document.head.appendChild(t),t.onload=s}else importScripts(e),s()}))),s.then((()=>{if(!t[e])throw new Error(`Module ${e} didnā€™t register its module`);return t[e]}))},s=(s,t)=>{Promise.all(s.map(e)).then((e=>t(1===e.length?e[0]:e)))},t={require:Promise.resolve(s)};self.define=(s,a,n)=>{t[s]||(t[s]=Promise.resolve().then((()=>{let t={};const r={uri:location.origin+s.slice(1)};return Promise.all(a.map((s=>{switch(s){case"exports":return t;case"module":return r;default:return e(s)}}))).then((e=>{const s=n(...e);return t.default||(t.default=s),t}))})))}}define("./sw.js",["./workbox-ea903bce"],(function(e){"use strict";importScripts(),self.skipWaiting(),e.clientsClaim(),e.precacheAndRoute([{url:"/_next/static/YCG9yCH3t7hU_PKjLV6PW/_buildManifest.js",revision:"YCG9yCH3t7hU_PKjLV6PW"},{url:"/_next/static/YCG9yCH3t7hU_PKjLV6PW/_ssgManifest.js",revision:"YCG9yCH3t7hU_PKjLV6PW"},{url:"/_next/static/chunks/410-653db06247f2aaf5b65a.js",revision:"YCG9yCH3t7hU_PKjLV6PW"},{url:"/_next/static/chunks/506-4580d7d40598a37c5ba9.js",revision:"YCG9yCH3t7hU_PKjLV6PW"},{url:"/_next/static/chunks/83-581b598ba6fa8df8c264.js",revision:"YCG9yCH3t7hU_PKjLV6PW"},{url:"/_next/static/chunks/830-cfa8c051a6241caffd1e.js",revision:"YCG9yCH3t7hU_PKjLV6PW"},{url:"/_next/static/chunks/872-1471f7c8dcd3fee5ec9b.js",revision:"YCG9yCH3t7hU_PKjLV6PW"},{url:"/_next/static/chunks/925-26267f659e168d324a87.js",revision:"YCG9yCH3t7hU_PKjLV6PW"},{url:"/_next/static/chunks/940-b0d5631a090d1d9f503d.js",revision:"YCG9yCH3t7hU_PKjLV6PW"},{url:"/_next/static/chunks/framework-2191d16384373197bc0a.js",revision:"YCG9yCH3t7hU_PKjLV6PW"},{url:"/_next/static/chunks/main-ec0b5244d0f3a9994a2e.js",revision:"YCG9yCH3t7hU_PKjLV6PW"},{url:"/_next/static/chunks/pages/_app-7f3f78f7119390446b51.js",revision:"YCG9yCH3t7hU_PKjLV6PW"},{url:"/_next/static/chunks/pages/_error-82a806cd39f8ab3dc3ac.js",revision:"YCG9yCH3t7hU_PKjLV6PW"},{url:"/_next/static/chunks/pages/auth/confirm-6d6e0f167d2458173953.js",revision:"YCG9yCH3t7hU_PKjLV6PW"},{url:"/_next/static/chunks/pages/auth/login-4a43e2fbb93eaed6d823.js",revision:"YCG9yCH3t7hU_PKjLV6PW"},{url:"/_next/static/chunks/pages/auth/lost-password-04941488ea3d5835dfa9.js",revision:"YCG9yCH3t7hU_PKjLV6PW"},{url:"/_next/static/chunks/pages/auth/register-5cc2409de6d121f97824.js",revision:"YCG9yCH3t7hU_PKjLV6PW"},{url:"/_next/static/chunks/pages/auth/reset-804c3aff5a5d6a26d724.js",revision:"YCG9yCH3t7hU_PKjLV6PW"},{url:"/_next/static/chunks/pages/dashboard-95a97a201c707db37f0a.js",revision:"YCG9yCH3t7hU_PKjLV6PW"},{url:"/_next/static/chunks/pages/e/%5BeventId%5D-2d43d27863a435780b38.js",revision:"YCG9yCH3t7hU_PKjLV6PW"},{url:"/_next/static/chunks/pages/index-6b3abf405d9a4c7f8142.js",revision:"YCG9yCH3t7hU_PKjLV6PW"},{url:"/_next/static/chunks/pages/profile-63c45769bf2482128895.js",revision:"YCG9yCH3t7hU_PKjLV6PW"},{url:"/_next/static/chunks/polyfills-a54b4f32bdc1ef890ddd.js",revision:"YCG9yCH3t7hU_PKjLV6PW"},{url:"/_next/static/chunks/webpack-6d72c6ed51d58793f029.js",revision:"YCG9yCH3t7hU_PKjLV6PW"},{url:"/assets/Caroster_Octree_Social.jpg",revision:"563fc10a4ec83e735943c5f67d417a6e"},{url:"/assets/android-chrome-192x192.png",revision:"b288769d936ad5f9a87944e027d0096c"},{url:"/assets/android-chrome-512x512.png",revision:"c789c009674fc4a2087a8b71c24a12b7"},{url:"/assets/apple-touch-icon.png",revision:"573a4bc22886d3ef3f6c3aa0eab64d44"},{url:"/assets/favicon-16x16.png",revision:"9f98c22a36ec0001995797d29a7583b1"},{url:"/assets/favicon-32x32.png",revision:"562ff70a6694a29302644d4f85b2e920"},{url:"/assets/favicon.ico",revision:"45004f0a61722a526ca688bddc4955c4"},{url:"/assets/google-icon.svg",revision:"81ad048ed858673aaca6cc2227076b8a"},{url:"/assets/icon.png",revision:"ac122f40fd4c9fd7f1831b0dd406c950"},{url:"/assets/logo.png",revision:"d685d6b49c3aedcf4819d5cbbc873d60"},{url:"/assets/logo.svg",revision:"ac6bdc2dc62feb11a5bc8b0ad3aca84e"},{url:"/assets/site.webmanifest",revision:"053100cb84a50d2ae7f5492f7dd7f25e"},{url:"/favicon.ico",revision:"8eb6dd187ac1c4e26f8df8062bb42e09"},{url:"/manifest.json",revision:"e76480838d8eb8908456941dcb59275e"}],{ignoreURLParametersMatching:[]}),e.cleanupOutdatedCaches(),e.registerRoute("/",new e.NetworkFirst({cacheName:"start-url",plugins:[{cacheWillUpdate:async({request:e,response:s,event:t,state:a})=>s&&"opaqueredirect"===s.type?new Response(s.body,{status:200,statusText:"OK",headers:s.headers}):s}]}),"GET"),e.registerRoute(/^https:\/\/fonts\.(?:googleapis|gstatic)\.com\/.*/i,new e.CacheFirst({cacheName:"google-fonts",plugins:[new e.ExpirationPlugin({maxEntries:4,maxAgeSeconds:31536e3,purgeOnQuotaError:!0})]}),"GET"),e.registerRoute(/\.(?:eot|otf|ttc|ttf|woff|woff2|font.css)$/i,new e.StaleWhileRevalidate({cacheName:"static-font-assets",plugins:[new e.ExpirationPlugin({maxEntries:4,maxAgeSeconds:604800,purgeOnQuotaError:!0})]}),"GET"),e.registerRoute(/\.(?:jpg|jpeg|gif|png|svg|ico|webp)$/i,new e.StaleWhileRevalidate({cacheName:"static-image-assets",plugins:[new e.ExpirationPlugin({maxEntries:64,maxAgeSeconds:86400,purgeOnQuotaError:!0})]}),"GET"),e.registerRoute(/\/_next\/image\?url=.+$/i,new e.StaleWhileRevalidate({cacheName:"next-image",plugins:[new e.ExpirationPlugin({maxEntries:64,maxAgeSeconds:86400,purgeOnQuotaError:!0})]}),"GET"),e.registerRoute(/\.(?:mp3|mp4)$/i,new e.StaleWhileRevalidate({cacheName:"static-media-assets",plugins:[new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:86400,purgeOnQuotaError:!0})]}),"GET"),e.registerRoute(/\.(?:js)$/i,new e.StaleWhileRevalidate({cacheName:"static-js-assets",plugins:[new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:86400,purgeOnQuotaError:!0})]}),"GET"),e.registerRoute(/\.(?:css|less)$/i,new e.StaleWhileRevalidate({cacheName:"static-style-assets",plugins:[new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:86400,purgeOnQuotaError:!0})]}),"GET"),e.registerRoute(/\/_next\/data\/.+\/.+\.json$/i,new e.StaleWhileRevalidate({cacheName:"next-data",plugins:[new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:86400,purgeOnQuotaError:!0})]}),"GET"),e.registerRoute(/\.(?:json|xml|csv)$/i,new e.NetworkFirst({cacheName:"static-data-assets",plugins:[new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:86400,purgeOnQuotaError:!0})]}),"GET"),e.registerRoute((({url:e})=>{if(!(self.origin===e.origin))return!1;const s=e.pathname;return!s.startsWith("/api/auth/")&&!!s.startsWith("/api/")}),new e.NetworkFirst({cacheName:"apis",networkTimeoutSeconds:10,plugins:[new e.ExpirationPlugin({maxEntries:16,maxAgeSeconds:86400,purgeOnQuotaError:!0})]}),"GET"),e.registerRoute((({url:e})=>{if(!(self.origin===e.origin))return!1;return!e.pathname.startsWith("/api/")}),new e.NetworkFirst({cacheName:"others",networkTimeoutSeconds:10,plugins:[new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:86400,purgeOnQuotaError:!0})]}),"GET")})); +if(!self.define){const e=e=>{"require"!==e&&(e+=".js");let s=Promise.resolve();return a[e]||(s=new Promise((async s=>{if("document"in self){const a=document.createElement("script");a.src=e,document.head.appendChild(a),a.onload=s}else importScripts(e),s()}))),s.then((()=>{if(!a[e])throw new Error(`Module ${e} didnā€™t register its module`);return a[e]}))},s=(s,a)=>{Promise.all(s.map(e)).then((e=>a(1===e.length?e[0]:e)))},a={require:Promise.resolve(s)};self.define=(s,n,t)=>{a[s]||(a[s]=Promise.resolve().then((()=>{let a={};const r={uri:location.origin+s.slice(1)};return Promise.all(n.map((s=>{switch(s){case"exports":return a;case"module":return r;default:return e(s)}}))).then((e=>{const s=t(...e);return a.default||(a.default=s),a}))})))}}define("./sw.js",["./workbox-ea903bce"],(function(e){"use strict";importScripts(),self.skipWaiting(),e.clientsClaim(),e.precacheAndRoute([{url:"/_next/static/JT0xld2I5wp6z9Dmh3RVV/_buildManifest.js",revision:"JT0xld2I5wp6z9Dmh3RVV"},{url:"/_next/static/JT0xld2I5wp6z9Dmh3RVV/_ssgManifest.js",revision:"JT0xld2I5wp6z9Dmh3RVV"},{url:"/_next/static/chunks/410-653db06247f2aaf5b65a.js",revision:"JT0xld2I5wp6z9Dmh3RVV"},{url:"/_next/static/chunks/506-4580d7d40598a37c5ba9.js",revision:"JT0xld2I5wp6z9Dmh3RVV"},{url:"/_next/static/chunks/83-581b598ba6fa8df8c264.js",revision:"JT0xld2I5wp6z9Dmh3RVV"},{url:"/_next/static/chunks/830-cfa8c051a6241caffd1e.js",revision:"JT0xld2I5wp6z9Dmh3RVV"},{url:"/_next/static/chunks/872-1471f7c8dcd3fee5ec9b.js",revision:"JT0xld2I5wp6z9Dmh3RVV"},{url:"/_next/static/chunks/925-26267f659e168d324a87.js",revision:"JT0xld2I5wp6z9Dmh3RVV"},{url:"/_next/static/chunks/940-b0d5631a090d1d9f503d.js",revision:"JT0xld2I5wp6z9Dmh3RVV"},{url:"/_next/static/chunks/framework-2191d16384373197bc0a.js",revision:"JT0xld2I5wp6z9Dmh3RVV"},{url:"/_next/static/chunks/main-ec0b5244d0f3a9994a2e.js",revision:"JT0xld2I5wp6z9Dmh3RVV"},{url:"/_next/static/chunks/pages/_app-7f3f78f7119390446b51.js",revision:"JT0xld2I5wp6z9Dmh3RVV"},{url:"/_next/static/chunks/pages/_error-82a806cd39f8ab3dc3ac.js",revision:"JT0xld2I5wp6z9Dmh3RVV"},{url:"/_next/static/chunks/pages/auth/confirm-6d6e0f167d2458173953.js",revision:"JT0xld2I5wp6z9Dmh3RVV"},{url:"/_next/static/chunks/pages/auth/login-4a43e2fbb93eaed6d823.js",revision:"JT0xld2I5wp6z9Dmh3RVV"},{url:"/_next/static/chunks/pages/auth/lost-password-04941488ea3d5835dfa9.js",revision:"JT0xld2I5wp6z9Dmh3RVV"},{url:"/_next/static/chunks/pages/auth/register-5cc2409de6d121f97824.js",revision:"JT0xld2I5wp6z9Dmh3RVV"},{url:"/_next/static/chunks/pages/auth/reset-804c3aff5a5d6a26d724.js",revision:"JT0xld2I5wp6z9Dmh3RVV"},{url:"/_next/static/chunks/pages/dashboard-95a97a201c707db37f0a.js",revision:"JT0xld2I5wp6z9Dmh3RVV"},{url:"/_next/static/chunks/pages/e/%5BeventId%5D-2d43d27863a435780b38.js",revision:"JT0xld2I5wp6z9Dmh3RVV"},{url:"/_next/static/chunks/pages/index-6b3abf405d9a4c7f8142.js",revision:"JT0xld2I5wp6z9Dmh3RVV"},{url:"/_next/static/chunks/pages/profile-63c45769bf2482128895.js",revision:"JT0xld2I5wp6z9Dmh3RVV"},{url:"/_next/static/chunks/polyfills-a54b4f32bdc1ef890ddd.js",revision:"JT0xld2I5wp6z9Dmh3RVV"},{url:"/_next/static/chunks/webpack-6d72c6ed51d58793f029.js",revision:"JT0xld2I5wp6z9Dmh3RVV"},{url:"/assets/Caroster_Octree_Social.jpg",revision:"563fc10a4ec83e735943c5f67d417a6e"},{url:"/assets/android-chrome-192x192.png",revision:"b288769d936ad5f9a87944e027d0096c"},{url:"/assets/android-chrome-512x512.png",revision:"c789c009674fc4a2087a8b71c24a12b7"},{url:"/assets/apple-touch-icon.png",revision:"573a4bc22886d3ef3f6c3aa0eab64d44"},{url:"/assets/favicon-16x16.png",revision:"9f98c22a36ec0001995797d29a7583b1"},{url:"/assets/favicon-32x32.png",revision:"562ff70a6694a29302644d4f85b2e920"},{url:"/assets/favicon.ico",revision:"45004f0a61722a526ca688bddc4955c4"},{url:"/assets/google-icon.svg",revision:"81ad048ed858673aaca6cc2227076b8a"},{url:"/assets/icon.png",revision:"ac122f40fd4c9fd7f1831b0dd406c950"},{url:"/assets/logo.png",revision:"d685d6b49c3aedcf4819d5cbbc873d60"},{url:"/assets/logo.svg",revision:"ac6bdc2dc62feb11a5bc8b0ad3aca84e"},{url:"/assets/site.webmanifest",revision:"053100cb84a50d2ae7f5492f7dd7f25e"},{url:"/favicon.ico",revision:"8eb6dd187ac1c4e26f8df8062bb42e09"},{url:"/manifest.json",revision:"e76480838d8eb8908456941dcb59275e"}],{ignoreURLParametersMatching:[]}),e.cleanupOutdatedCaches(),e.registerRoute("/",new e.NetworkFirst({cacheName:"start-url",plugins:[{cacheWillUpdate:async({request:e,response:s,event:a,state:n})=>s&&"opaqueredirect"===s.type?new Response(s.body,{status:200,statusText:"OK",headers:s.headers}):s}]}),"GET"),e.registerRoute(/^https:\/\/fonts\.(?:googleapis|gstatic)\.com\/.*/i,new e.CacheFirst({cacheName:"google-fonts",plugins:[new e.ExpirationPlugin({maxEntries:4,maxAgeSeconds:31536e3,purgeOnQuotaError:!0})]}),"GET"),e.registerRoute(/\.(?:eot|otf|ttc|ttf|woff|woff2|font.css)$/i,new e.StaleWhileRevalidate({cacheName:"static-font-assets",plugins:[new e.ExpirationPlugin({maxEntries:4,maxAgeSeconds:604800,purgeOnQuotaError:!0})]}),"GET"),e.registerRoute(/\.(?:jpg|jpeg|gif|png|svg|ico|webp)$/i,new e.StaleWhileRevalidate({cacheName:"static-image-assets",plugins:[new e.ExpirationPlugin({maxEntries:64,maxAgeSeconds:86400,purgeOnQuotaError:!0})]}),"GET"),e.registerRoute(/\/_next\/image\?url=.+$/i,new e.StaleWhileRevalidate({cacheName:"next-image",plugins:[new e.ExpirationPlugin({maxEntries:64,maxAgeSeconds:86400,purgeOnQuotaError:!0})]}),"GET"),e.registerRoute(/\.(?:mp3|mp4)$/i,new e.StaleWhileRevalidate({cacheName:"static-media-assets",plugins:[new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:86400,purgeOnQuotaError:!0})]}),"GET"),e.registerRoute(/\.(?:js)$/i,new e.StaleWhileRevalidate({cacheName:"static-js-assets",plugins:[new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:86400,purgeOnQuotaError:!0})]}),"GET"),e.registerRoute(/\.(?:css|less)$/i,new e.StaleWhileRevalidate({cacheName:"static-style-assets",plugins:[new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:86400,purgeOnQuotaError:!0})]}),"GET"),e.registerRoute(/\/_next\/data\/.+\/.+\.json$/i,new e.StaleWhileRevalidate({cacheName:"next-data",plugins:[new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:86400,purgeOnQuotaError:!0})]}),"GET"),e.registerRoute(/\.(?:json|xml|csv)$/i,new e.NetworkFirst({cacheName:"static-data-assets",plugins:[new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:86400,purgeOnQuotaError:!0})]}),"GET"),e.registerRoute((({url:e})=>{if(!(self.origin===e.origin))return!1;const s=e.pathname;return!s.startsWith("/api/auth/")&&!!s.startsWith("/api/")}),new e.NetworkFirst({cacheName:"apis",networkTimeoutSeconds:10,plugins:[new e.ExpirationPlugin({maxEntries:16,maxAgeSeconds:86400,purgeOnQuotaError:!0})]}),"GET"),e.registerRoute((({url:e})=>{if(!(self.origin===e.origin))return!1;return!e.pathname.startsWith("/api/")}),new e.NetworkFirst({cacheName:"others",networkTimeoutSeconds:10,plugins:[new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:86400,purgeOnQuotaError:!0})]}),"GET")}));