wuffle 0.56.0 → 0.57.0
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/lib/columns.js +6 -0
- package/lib/store.js +17 -5
- package/package.json +7 -7
- package/public/bundle.js.map +1 -1
- package/public/service-worker.js +1 -1
- package/public/service-worker.js.map +1 -1
- package/wuffle.config.example.js +5 -3
package/public/service-worker.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
!function(){"use strict";const e="wuffle-cache-v1";function t(t,n){return fetch(n).then((s=>{if(s&&200===s.status){const a=s.clone();t.waitUntil(function(t,n,s){return caches.open(e).then((e=>{if(t.clientId)return clients.get(t.clientId).then((t=>e.match(n).then((a=>{a&&a.headers.get("ETag")!==s.headers.get("ETag")&&t.postMessage({message:"resource.changed",url:n.url}),e.put(n,s)}))));e.put(n,s)}))}(t,n,a))}return s}))}function n(t,n){return caches.open(e).then((e=>e.match(n).then((e=>e||Promise.reject("not-in-cache")))))}self.addEventListener("install",(t=>{t.waitUntil(caches.open(e).then((function(e){return e.addAll(["/board","/board/apple-touch-icon.png","/board/bundle.css","/board/bundle.js","/board/bundle.js.map","/board/favicon.png","/board/global.css","/board/logo-192.png","/board/logo-512.png","/board/logo.svg","/board/manifest.json"]).catch((e=>console.error("caching failed",e)))}))),self.skipWaiting()})),self.addEventListener("activate",(function(e){e.waitUntil(self.clients.claim())})),self.addEventListener("fetch",(function(e){if("only-if-cached"===e.request.cache&&"same-origin"!==e.request.mode)return;const{request:s}=e,{url:a}=s;if(/^https:\/\/avatars[\d]+\.githubusercontent\.com/.test(a))e.respondWith(n(0,s).catch((()=>t(e,s))).catch((()=>Promise.resolve(new Response('<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" fill="currentColor" viewBox="0 0 40 40"><path fill="#b3b3b3" d="M0 0h40v40H0z"/><path d="M32 32a2 2 0 01-2 2H10a2 2 0 01-2-2v-2c0-5 8-8 8-8v-2c-2-1-2-3-2-8s4-6 6-6 6 1 6 6 0 7-2 8v2s8 3 8 8z" fill-rule="evenodd" fill="#fff"/></svg>',{headers:{"Content-Type":"image/svg+xml"}})))));else{if(/\/board\?.*$/.test(a)){const s=new Request("/board"),a=t(e,s);return e.respondWith(n(0,s).catch((()=>a))),void e.waitUntil(a)}if(!/\/wuffle\/.*/.test(a)||/\/wuffle\/board$/.test(a)){const a=t(e,s);return e.respondWith(n(0,s).catch((()=>a))),void e.waitUntil(a)}}}))}();
|
|
1
|
+
!function(){"use strict";const e="wuffle-cache-v1";function t(t,n){return fetch(n).then((s=>{if(s&&200===s.status){const a=s.clone();t.waitUntil(function(t,n,s){if(/^https?:/.test(n.url))return caches.open(e).then((e=>{if(t.clientId)return clients.get(t.clientId).then((t=>e.match(n).then((a=>{a&&a.headers.get("ETag")!==s.headers.get("ETag")&&t.postMessage({message:"resource.changed",url:n.url}),e.put(n,s)}))));e.put(n,s)}))}(t,n,a))}return s}))}function n(t,n){return caches.open(e).then((e=>e.match(n).then((e=>e||Promise.reject("not-in-cache")))))}self.addEventListener("install",(t=>{t.waitUntil(caches.open(e).then((function(e){return e.addAll(["/board","/board/apple-touch-icon.png","/board/bundle.css","/board/bundle.js","/board/bundle.js.map","/board/favicon.png","/board/global.css","/board/logo-192.png","/board/logo-512.png","/board/logo.svg","/board/manifest.json"]).catch((e=>console.error("caching failed",e)))}))),self.skipWaiting()})),self.addEventListener("activate",(function(e){e.waitUntil(self.clients.claim())})),self.addEventListener("fetch",(function(e){if("only-if-cached"===e.request.cache&&"same-origin"!==e.request.mode)return;const{request:s}=e,{url:a}=s;if(/^https:\/\/avatars[\d]+\.githubusercontent\.com/.test(a))e.respondWith(n(0,s).catch((()=>t(e,s))).catch((()=>Promise.resolve(new Response('<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" fill="currentColor" viewBox="0 0 40 40"><path fill="#b3b3b3" d="M0 0h40v40H0z"/><path d="M32 32a2 2 0 01-2 2H10a2 2 0 01-2-2v-2c0-5 8-8 8-8v-2c-2-1-2-3-2-8s4-6 6-6 6 1 6 6 0 7-2 8v2s8 3 8 8z" fill-rule="evenodd" fill="#fff"/></svg>',{headers:{"Content-Type":"image/svg+xml"}})))));else{if(/\/board\?.*$/.test(a)){const s=new Request("/board"),a=t(e,s);return e.respondWith(n(0,s).catch((()=>a))),void e.waitUntil(a)}if(!/\/wuffle\/.*/.test(a)||/\/wuffle\/board$/.test(a)){const a=t(e,s);return e.respondWith(n(0,s).catch((()=>a))),void e.waitUntil(a)}}}))}();
|
|
2
2
|
//# sourceMappingURL=service-worker.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"service-worker.js","sources":["../../board/src/service-worker.js"],"sourcesContent":["import AVATAR_SVG from './avatar.svg';\n\nconst CACHE = 'wuffle-cache-v1';\n\nfunction precache() {\n return caches.open(CACHE).then(function(cache) {\n return cache.addAll([\n '/board',\n '/board/apple-touch-icon.png',\n '/board/bundle.css',\n '/board/bundle.js',\n '/board/bundle.js.map',\n '/board/favicon.png',\n '/board/global.css',\n '/board/logo-192.png',\n '/board/logo-512.png',\n '/board/logo.svg',\n '/board/manifest.json'\n ]).catch(err => console.error('caching failed', err));\n });\n}\n\nfunction cacheResponse(event, request, response) {\n\n return caches.open(CACHE).then(cache => {\n\n if (!event.clientId) {\n cache.put(request, response);\n\n return;\n }\n\n /* global clients */\n return clients.get(event.clientId).then(client => {\n\n return cache.match(request).then(matchingResponse => {\n\n if (matchingResponse) {\n\n const oldEtag = matchingResponse.headers.get('ETag');\n const newEtag = response.headers.get('ETag');\n\n if (oldEtag !== newEtag) {\n client.postMessage({\n message: 'resource.changed',\n url: request.url\n });\n }\n }\n\n cache.put(request, response);\n });\n });\n });\n}\n\nfunction fromNetwork(event, request) {\n\n return fetch(request).then(response => {\n\n if (response && response.status === 200) {\n const cachedResponse = response.clone();\n\n event.waitUntil(\n cacheResponse(event, request, cachedResponse)\n );\n }\n\n return response;\n });\n}\n\nfunction serveFallbackAvatar() {\n return Promise.resolve(new Response(AVATAR_SVG, {\n headers: {\n 'Content-Type': 'image/svg+xml'\n }\n }));\n}\n\nfunction fromCache(event, request) {\n return caches.open(CACHE).then(cache => {\n return cache.match(request).then(matching => {\n return matching || Promise.reject('not-in-cache');\n });\n });\n}\n\nself.addEventListener('install', event => {\n event.waitUntil(\n precache()\n );\n\n self.skipWaiting();\n});\n\nself.addEventListener('activate', function(event) {\n event.waitUntil(self.clients.claim());\n});\n\n// actual fetching logic ////////////\n\nself.addEventListener('fetch', function(event) {\n\n if (event.request.cache === 'only-if-cached' && event.request.mode !== 'same-origin') {\n return;\n }\n\n const { request } = event;\n\n const { url } = request;\n\n if (/^https:\\/\\/avatars[\\d]+\\.githubusercontent\\.com/.test(url)) {\n event.respondWith(\n fromCache(event, request)\n .catch(() => fromNetwork(event, request))\n .catch(() => serveFallbackAvatar())\n );\n\n return;\n }\n\n if (/\\/board\\?.*$/.test(url)) {\n\n const cachedRequest = new Request('/board');\n\n const remoteFetch = fromNetwork(event, cachedRequest);\n\n event.respondWith(\n fromCache(event, cachedRequest)\n .catch(() => remoteFetch)\n );\n\n event.waitUntil(remoteFetch);\n\n return;\n }\n\n if (!/\\/wuffle\\/.*/.test(url) || /\\/wuffle\\/board$/.test(url)) {\n const remoteFetch = fromNetwork(event, request);\n\n event.respondWith(\n fromCache(event, request)\n .catch(() => remoteFetch)\n );\n\n event.waitUntil(remoteFetch);\n\n return;\n }\n});"],"names":["CACHE","fromNetwork","event","request","fetch","then","response","status","cachedResponse","clone","waitUntil","caches","open","cache","clientId","clients","get","client","match","matchingResponse","headers","postMessage","message","
|
|
1
|
+
{"version":3,"file":"service-worker.js","sources":["../../board/src/service-worker.js"],"sourcesContent":["import AVATAR_SVG from './avatar.svg';\n\nconst CACHE = 'wuffle-cache-v1';\n\nfunction precache() {\n return caches.open(CACHE).then(function(cache) {\n return cache.addAll([\n '/board',\n '/board/apple-touch-icon.png',\n '/board/bundle.css',\n '/board/bundle.js',\n '/board/bundle.js.map',\n '/board/favicon.png',\n '/board/global.css',\n '/board/logo-192.png',\n '/board/logo-512.png',\n '/board/logo.svg',\n '/board/manifest.json'\n ]).catch(err => console.error('caching failed', err));\n });\n}\n\nfunction cacheResponse(event, request, response) {\n\n // only cache http(s) resources\n if (!/^https?:/.test(request.url)) {\n return;\n }\n\n return caches.open(CACHE).then(cache => {\n\n if (!event.clientId) {\n cache.put(request, response);\n\n return;\n }\n\n /* global clients */\n return clients.get(event.clientId).then(client => {\n\n return cache.match(request).then(matchingResponse => {\n\n if (matchingResponse) {\n\n const oldEtag = matchingResponse.headers.get('ETag');\n const newEtag = response.headers.get('ETag');\n\n if (oldEtag !== newEtag) {\n client.postMessage({\n message: 'resource.changed',\n url: request.url\n });\n }\n }\n\n cache.put(request, response);\n });\n });\n });\n}\n\nfunction fromNetwork(event, request) {\n\n return fetch(request).then(response => {\n\n if (response && response.status === 200) {\n const cachedResponse = response.clone();\n\n event.waitUntil(\n cacheResponse(event, request, cachedResponse)\n );\n }\n\n return response;\n });\n}\n\nfunction serveFallbackAvatar() {\n return Promise.resolve(new Response(AVATAR_SVG, {\n headers: {\n 'Content-Type': 'image/svg+xml'\n }\n }));\n}\n\nfunction fromCache(event, request) {\n return caches.open(CACHE).then(cache => {\n return cache.match(request).then(matching => {\n return matching || Promise.reject('not-in-cache');\n });\n });\n}\n\nself.addEventListener('install', event => {\n event.waitUntil(\n precache()\n );\n\n self.skipWaiting();\n});\n\nself.addEventListener('activate', function(event) {\n event.waitUntil(self.clients.claim());\n});\n\n// actual fetching logic ////////////\n\nself.addEventListener('fetch', function(event) {\n\n if (event.request.cache === 'only-if-cached' && event.request.mode !== 'same-origin') {\n return;\n }\n\n const { request } = event;\n\n const { url } = request;\n\n if (/^https:\\/\\/avatars[\\d]+\\.githubusercontent\\.com/.test(url)) {\n event.respondWith(\n fromCache(event, request)\n .catch(() => fromNetwork(event, request))\n .catch(() => serveFallbackAvatar())\n );\n\n return;\n }\n\n if (/\\/board\\?.*$/.test(url)) {\n\n const cachedRequest = new Request('/board');\n\n const remoteFetch = fromNetwork(event, cachedRequest);\n\n event.respondWith(\n fromCache(event, cachedRequest)\n .catch(() => remoteFetch)\n );\n\n event.waitUntil(remoteFetch);\n\n return;\n }\n\n if (!/\\/wuffle\\/.*/.test(url) || /\\/wuffle\\/board$/.test(url)) {\n const remoteFetch = fromNetwork(event, request);\n\n event.respondWith(\n fromCache(event, request)\n .catch(() => remoteFetch)\n );\n\n event.waitUntil(remoteFetch);\n\n return;\n }\n});"],"names":["CACHE","fromNetwork","event","request","fetch","then","response","status","cachedResponse","clone","waitUntil","test","url","caches","open","cache","clientId","clients","get","client","match","matchingResponse","headers","postMessage","message","put","cacheResponse","fromCache","matching","Promise","reject","self","addEventListener","addAll","catch","err","console","error","skipWaiting","claim","mode","respondWith","resolve","Response","cachedRequest","Request","remoteFetch"],"mappings":"yBAEA,MAAMA,EAAQ,kBA2Dd,SAASC,EAAYC,EAAOC,GAE1B,OAAOC,MAAMD,GAASE,MAAKC,IAEzB,GAAIA,GAAgC,MAApBA,EAASC,OAAgB,CACvC,MAAMC,EAAiBF,EAASG,QAEhCP,EAAMQ,UA9CZ,SAAuBR,EAAOC,EAASG,GAGrC,GAAK,WAAWK,KAAKR,EAAQS,KAI7B,OAAOC,OAAOC,KAAKd,GAAOK,MAAKU,IAE7B,GAAKb,EAAMc,SAOX,OAAOC,QAAQC,IAAIhB,EAAMc,UAAUX,MAAKc,GAE/BJ,EAAMK,MAAMjB,GAASE,MAAKgB,IAE3BA,GAEcA,EAAiBC,QAAQJ,IAAI,UAC7BZ,EAASgB,QAAQJ,IAAI,SAGnCC,EAAOI,YAAY,CACjBC,QAAS,mBACTZ,IAAKT,EAAQS,MAKnBG,EAAMU,IAAItB,EAASG,EAAS,MAvB9BS,EAAMU,IAAItB,EAASG,EAyBnB,GAEN,CAUQoB,CAAcxB,EAAOC,EAASK,GAEjC,CAED,OAAOF,CAAQ,GAEnB,CAUA,SAASqB,EAAUzB,EAAOC,GACxB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le.config.example.js
CHANGED
|
@@ -15,6 +15,8 @@
|
|
|
15
15
|
* * closed - if the column issues must be closed
|
|
16
16
|
* * sorting - true if column cards should be sorted
|
|
17
17
|
* incrementally based on links
|
|
18
|
+
* * fifo - true to turn the default column ordering from
|
|
19
|
+
* last in first out to first in first out
|
|
18
20
|
* * states - a list of board states to map to this column
|
|
19
21
|
*
|
|
20
22
|
* The default column is the column that holds open issues without
|
|
@@ -33,9 +35,9 @@ module.exports = {
|
|
|
33
35
|
columns: [
|
|
34
36
|
{ name: 'Inbox', label: null },
|
|
35
37
|
{ name: 'Backlog', label: 'backlog', sorting: true },
|
|
36
|
-
{ name: 'Ready', label: 'ready', sorting: true },
|
|
37
|
-
{ name: 'In Progress', label: 'in progress', sorting: true },
|
|
38
|
-
{ name: 'Needs Review', label: 'needs review', sorting: true },
|
|
38
|
+
{ name: 'Ready', label: 'ready', sorting: true, fifo: true },
|
|
39
|
+
{ name: 'In Progress', label: 'in progress', sorting: true, fifo: true },
|
|
40
|
+
{ name: 'Needs Review', label: 'needs review', sorting: true, fifo: true },
|
|
39
41
|
{ name: 'Done', label: null, closed: true }
|
|
40
42
|
],
|
|
41
43
|
|