id int64 0 1.29M | original_id stringlengths 32 32 | swhid stringlengths 100 170 | sha1 stringlengths 40 40 | repo_name stringlengths 2 45 | repo_group stringclasses 12
values | filepath stringlengths 5 153 | name stringlengths 1 14.9k | type stringclasses 3
values | code stringlengths 7 2.12M |
|---|---|---|---|---|---|---|---|---|---|
1,287,900 | 4c2816456f04c1436420187ba7bdf8c3 | swh:1:cnt:9e027b007ff5244d6878a6c996b8f4ec3aa179f8;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=629-702/ | ad32f86cc016e69237bcd5c23bb7b41127615389 | wlbdashboard | wmcs | node_modules/workbox-routing/build/workbox-routing.dev.js | Router::findMatchingRoute | function | /**
* Checks a request and URL (and optionally an event) against the list of
* registered routes, and if there's a match, returns the corresponding
* route along with any params generated by the match.
*
* @param {Object} options
* @param {URL} options.url
* @param {bool... |
1,287,901 | 35bf0b93e1a073c4f614a0fdecd04103 | swh:1:cnt:9e027b007ff5244d6878a6c996b8f4ec3aa179f8;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=944-967/ | ad32f86cc016e69237bcd5c23bb7b41127615389 | wlbdashboard | wmcs | node_modules/workbox-routing/build/workbox-routing.dev.js | setDefaultHandler | function | /*
Copyright 2019 Google LLC
Use of this source code is governed by an MIT-style
license that can be found in the LICENSE file or at
https://opensource.org/licenses/MIT.
*/
/**
* Define a default `handler` that's called when no routes explicitly
* match the incoming request.
... |
1,287,902 | 8502b6aef736e7a35b8e7134e567b4db | swh:1:cnt:9e027b007ff5244d6878a6c996b8f4ec3aa179f8;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=722-733/ | ad32f86cc016e69237bcd5c23bb7b41127615389 | wlbdashboard | wmcs | node_modules/workbox-routing/build/workbox-routing.dev.js | Router::setCatchHandler | function | /**
* If a Route throws an error while handling a request, this `handler`
* will be called and given a chance to provide a response.
*
* @param {workbox-routing~handlerCallback} handler A callback
* function that returns a Promise resulting in a Response.
*/
setCatchHan... |
1,287,903 | 27479ae781ba50c5644c9315adf6df5c | swh:1:cnt:9e027b007ff5244d6878a6c996b8f4ec3aa179f8;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=922-942/ | ad32f86cc016e69237bcd5c23bb7b41127615389 | wlbdashboard | wmcs | node_modules/workbox-routing/build/workbox-routing.dev.js | setCatchHandler | function | /*
Copyright 2019 Google LLC
Use of this source code is governed by an MIT-style
license that can be found in the LICENSE file or at
https://opensource.org/licenses/MIT.
*/
/**
* If a Route throws an error while handling a request, this `handler`
* will be called and given a c... |
1,287,904 | 49e5a5daeb8f0c5a32963b650e903cb5 | swh:1:cnt:dde54a2ebeb1264de6070d9a8917df0e1c2a7830;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=1-1/ | 0bbf0e02ba2fdcd36c7cdc1d884ae9d19092e519 | wlbdashboard | wmcs | node_modules/workbox-routing/build/workbox-routing.prod.js | r | type | class r{constructor(t,e,r="GET"){this.handler=s(e),this.match=t,this.method=r}setCatchHandler(t){this.catchHandler=s(t)}} |
1,287,905 | 0692962a2f78a1ce12644f326d59fa89 | swh:1:cnt:dde54a2ebeb1264de6070d9a8917df0e1c2a7830;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=1-1/ | 0bbf0e02ba2fdcd36c7cdc1d884ae9d19092e519 | wlbdashboard | wmcs | node_modules/workbox-routing/build/workbox-routing.prod.js | n | type | class n extends r{constructor(t,e,s){super((({url:e})=>{const s=t.exec(e.href);if(s&&(e.origin===location.origin||0===s.index))return s.slice(1)}),e,s)}} |
1,287,906 | 709348d29d3c618f4a1f4c42ab72ec69 | swh:1:cnt:dde54a2ebeb1264de6070d9a8917df0e1c2a7830;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=1-1/ | 0bbf0e02ba2fdcd36c7cdc1d884ae9d19092e519 | wlbdashboard | wmcs | node_modules/workbox-routing/build/workbox-routing.prod.js | i | type | class i{constructor(){this.ft=new Map,this.dt=new Map}get routes(){return this.ft}addFetchListener(){self.addEventListener("fetch",(t=>{const{request:e}=t,s=this.handleRequest({request:e,event:t});s&&t.respondWith(s)}))}addCacheListener(){self.addEventListener("message",(t=>{if(t.data&&"CACHE_URLS"===t.data.type){const... |
1,287,907 | 409cb232ae93fc2bc6574397e4c19280 | swh:1:cnt:dde54a2ebeb1264de6070d9a8917df0e1c2a7830;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=1-1/ | 0bbf0e02ba2fdcd36c7cdc1d884ae9d19092e519 | wlbdashboard | wmcs | node_modules/workbox-routing/build/workbox-routing.prod.js | r::constructor | function | constructor(t,e,r="GET"){this.handler=s(e),this.match=t,this.method=r} |
1,287,908 | 8ee9f1d75677f442ffc931fcf1c58b79 | swh:1:cnt:dde54a2ebeb1264de6070d9a8917df0e1c2a7830;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=1-1/ | 0bbf0e02ba2fdcd36c7cdc1d884ae9d19092e519 | wlbdashboard | wmcs | node_modules/workbox-routing/build/workbox-routing.prod.js | r::setCatchHandler | function | setCatchHandler(t){this.catchHandler=s(t)} |
1,287,909 | 87756eea42af3424fb5c44dbbd366d19 | swh:1:cnt:dde54a2ebeb1264de6070d9a8917df0e1c2a7830;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=1-1/ | 0bbf0e02ba2fdcd36c7cdc1d884ae9d19092e519 | wlbdashboard | wmcs | node_modules/workbox-routing/build/workbox-routing.prod.js | i::constructor | function | constructor(){this.ft=new Map,this.dt=new Map} |
1,287,910 | 1c2da5de8d1f20728e01f40c354886b1 | swh:1:cnt:dde54a2ebeb1264de6070d9a8917df0e1c2a7830;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=1-1/ | 0bbf0e02ba2fdcd36c7cdc1d884ae9d19092e519 | wlbdashboard | wmcs | node_modules/workbox-routing/build/workbox-routing.prod.js | i::routes | function | get routes(){return this.ft} |
1,287,911 | 6b13cb7d6e991057d3cfeebf878402f4 | swh:1:cnt:dde54a2ebeb1264de6070d9a8917df0e1c2a7830;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=1-1/ | 0bbf0e02ba2fdcd36c7cdc1d884ae9d19092e519 | wlbdashboard | wmcs | node_modules/workbox-routing/build/workbox-routing.prod.js | n::constructor | function | constructor(t,e,s){super((({url:e})=>{const s=t.exec(e.href);if(s&&(e.origin===location.origin||0===s.index))return s.slice(1)}),e,s)} |
1,287,912 | 968143700a3f8d41009961ccd3fa8a68 | swh:1:cnt:dde54a2ebeb1264de6070d9a8917df0e1c2a7830;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=1-1/ | 0bbf0e02ba2fdcd36c7cdc1d884ae9d19092e519 | wlbdashboard | wmcs | node_modules/workbox-routing/build/workbox-routing.prod.js | i::addFetchListener | function | addFetchListener(){self.addEventListener("fetch",(t=>{const{request:e}=t,s=this.handleRequest({request:e,event:t});s&&t.respondWith(s)}))} |
1,287,913 | 47ee9873c35ea52dc49d9f7f2bfe32e8 | swh:1:cnt:dde54a2ebeb1264de6070d9a8917df0e1c2a7830;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=1-1/ | 0bbf0e02ba2fdcd36c7cdc1d884ae9d19092e519 | wlbdashboard | wmcs | node_modules/workbox-routing/build/workbox-routing.prod.js | i::addCacheListener | function | addCacheListener(){self.addEventListener("message",(t=>{if(t.data&&"CACHE_URLS"===t.data.type){const{payload:e}=t.data,s=Promise.all(e.urlsToCache.map((e=>{"string"==typeof e&&(e=[e]);const s=new Request(...e);return this.handleRequest({request:s,event:t})})));t.waitUntil(s),t.ports&&t.ports[0]&&s.then((()=>t.ports[0].... |
1,287,914 | 7f794e7f8772a0bbde516f313191fce0 | swh:1:cnt:dde54a2ebeb1264de6070d9a8917df0e1c2a7830;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=1-1/ | 0bbf0e02ba2fdcd36c7cdc1d884ae9d19092e519 | wlbdashboard | wmcs | node_modules/workbox-routing/build/workbox-routing.prod.js | i::handleRequest | function | handleRequest({request:t,event:e}){const s=new URL(t.url,location.href);if(!s.protocol.startsWith("http"))return;const r=s.origin===location.origin,{params:n,route:i}=this.findMatchingRoute({event:e,request:t,sameOrigin:r,url:s});let o=i&&i.handler;const u=t.method;if(!o&&this.dt.has(u)&&(o=this.dt.get(u)),!o)return;le... |
1,287,915 | d311ff4187c87e33d8ffbcb7a51472cc | swh:1:cnt:dde54a2ebeb1264de6070d9a8917df0e1c2a7830;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=1-1/ | 0bbf0e02ba2fdcd36c7cdc1d884ae9d19092e519 | wlbdashboard | wmcs | node_modules/workbox-routing/build/workbox-routing.prod.js | i::findMatchingRoute | function | findMatchingRoute({url:t,sameOrigin:e,request:s,event:r}){const n=this.ft.get(s.method)||[];for(const i of n){let n;const o=i.match({url:t,sameOrigin:e,request:s,event:r});if(o)return n=o,(Array.isArray(n)&&0===n.length||o.constructor===Object&&0===Object.keys(o).length||"boolean"==typeof o)&&(n=void 0),{route:i,params... |
1,287,916 | 85066be0c1e03c702158a5adc91ed459 | swh:1:cnt:dde54a2ebeb1264de6070d9a8917df0e1c2a7830;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=1-1/ | 0bbf0e02ba2fdcd36c7cdc1d884ae9d19092e519 | wlbdashboard | wmcs | node_modules/workbox-routing/build/workbox-routing.prod.js | i::setDefaultHandler | function | setDefaultHandler(t,e="GET"){this.dt.set(e,s(t))} |
1,287,917 | 5580d9a38aa98b96ff35694fd92d1419 | swh:1:cnt:dde54a2ebeb1264de6070d9a8917df0e1c2a7830;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=1-1/ | 0bbf0e02ba2fdcd36c7cdc1d884ae9d19092e519 | wlbdashboard | wmcs | node_modules/workbox-routing/build/workbox-routing.prod.js | i::setCatchHandler | function | setCatchHandler(t){this.wt=s(t)} |
1,287,918 | a7164d4af886528115437dcf33ae11a2 | swh:1:cnt:dde54a2ebeb1264de6070d9a8917df0e1c2a7830;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=1-1/ | 0bbf0e02ba2fdcd36c7cdc1d884ae9d19092e519 | wlbdashboard | wmcs | node_modules/workbox-routing/build/workbox-routing.prod.js | gt | function | gt({url:t,request:e}){if(e&&"navigate"!==e.mode)return!1;const s=t.pathname+t.search;for(const t of this.yt)if(t.test(s))return!1;return!!this.qt.some((t=>t.test(s)))} |
1,287,919 | a4f21e919e5c92373d813b7cb14e4362 | swh:1:cnt:dde54a2ebeb1264de6070d9a8917df0e1c2a7830;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=1-1/ | 0bbf0e02ba2fdcd36c7cdc1d884ae9d19092e519 | wlbdashboard | wmcs | node_modules/workbox-routing/build/workbox-routing.prod.js | constructor | function | constructor(t,{allowlist:e=[/./],denylist:s=[]}={}){super((t=>this.gt(t)),t),this.qt=e,this.yt=s} |
1,287,920 | b07938ab931f3f264974bb1884516937 | swh:1:cnt:dde54a2ebeb1264de6070d9a8917df0e1c2a7830;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=1-1/ | 0bbf0e02ba2fdcd36c7cdc1d884ae9d19092e519 | wlbdashboard | wmcs | node_modules/workbox-routing/build/workbox-routing.prod.js | i::unregisterRoute | function | unregisterRoute(t){if(!this.ft.has(t.method))throw new e.WorkboxError("unregister-route-but-not-found-with-method",{method:t.method});const s=this.ft.get(t.method).indexOf(t);if(!(s>-1))throw new e.WorkboxError("unregister-route-route-not-registered");this.ft.get(t.method).splice(s,1)} |
1,287,921 | 5441bf2e184084b5c5a93c7dece993b0 | swh:1:cnt:dde54a2ebeb1264de6070d9a8917df0e1c2a7830;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=1-1/ | 0bbf0e02ba2fdcd36c7cdc1d884ae9d19092e519 | wlbdashboard | wmcs | node_modules/workbox-routing/build/workbox-routing.prod.js | i::registerRoute | function | registerRoute(t){this.ft.has(t.method)||this.ft.set(t.method,[]),this.ft.get(t.method).push(t)} |
1,287,922 | 2feca432622e79d53e78db0fdac9b5e7 | swh:1:cnt:7c878cd7f4a38793fa99156258c66cd4249ed46d;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=17-20/ | b86e5715654625a737c9ad389325c5e0709f1b22 | wlbdashboard | wmcs | node_modules/workbox-routing/src/NavigationRoute.ts | NavigationRouteMatchOptions | type | interface NavigationRouteMatchOptions {
allowlist?: RegExp[];
denylist?: RegExp[];
} |
1,287,923 | 3f27cef7e5a740469163903aa052ccb9 | swh:1:cnt:7c878cd7f4a38793fa99156258c66cd4249ed46d;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=22-141/ | b86e5715654625a737c9ad389325c5e0709f1b22 | wlbdashboard | wmcs | node_modules/workbox-routing/src/NavigationRoute.ts | NavigationRoute | type | /**
* NavigationRoute makes it easy to create a
* {@link workbox-routing.Route} that matches for browser
* [navigation requests]{@link https://developers.google.com/web/fundamentals/primers/service-workers/high-performance-loading#first_what_are_navigation_requests}.
*
* It will only match incoming Requests whose
... |
1,287,924 | a1435368e63ad0a05e3395cba1e8d65f | swh:1:cnt:7c878cd7f4a38793fa99156258c66cd4249ed46d;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=41-91/ | b86e5715654625a737c9ad389325c5e0709f1b22 | wlbdashboard | wmcs | node_modules/workbox-routing/src/NavigationRoute.ts | NavigationRoute::constructor | function | /**
* If both `denylist` and `allowlist` are provided, the `denylist` will
* take precedence and the request will not match this route.
*
* The regular expressions in `allowlist` and `denylist`
* are matched against the concatenated
* [`pathname`]{@link https://developer.mozilla.org/en-US/docs/Web/API... |
1,287,925 | 443724d923a35b0d3cf304b8c38d02a4 | swh:1:cnt:7c878cd7f4a38793fa99156258c66cd4249ed46d;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=93-140/ | b86e5715654625a737c9ad389325c5e0709f1b22 | wlbdashboard | wmcs | node_modules/workbox-routing/src/NavigationRoute.ts | NavigationRoute::_match | function | /**
* Routes match handler.
*
* @param {Object} options
* @param {URL} options.url
* @param {Request} options.request
* @return {boolean}
*
* @private
*/
private _match({url, request}: RouteMatchCallbackOptions): boolean {
if (request && request.mode !== 'navigate') {
return false... |
1,287,926 | 0026fa32a2946aaa061bf9dda6710ad5 | swh:1:cnt:42f999cfdce6b20f55ea34338f1fddce20f0eea9;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=22-90/ | bd2575bb5ca79aeec62b4fa5a15941a346d1bb23 | wlbdashboard | wmcs | node_modules/workbox-routing/src/RegExpRoute.ts | RegExpRoute | type | /**
* RegExpRoute makes it easy to create a regular expression based
* {@link workbox-routing.Route}.
*
* For same-origin requests the RegExp only needs to match part of the URL. For
* requests against third-party servers, you must define a RegExp that matches
* the start of the URL.
*
* @memberof workbox-routi... |
1,287,927 | 36edf63b86e6e6e3425f8a23999e0fbf | swh:1:cnt:42f999cfdce6b20f55ea34338f1fddce20f0eea9;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=34-89/ | bd2575bb5ca79aeec62b4fa5a15941a346d1bb23 | wlbdashboard | wmcs | node_modules/workbox-routing/src/RegExpRoute.ts | RegExpRoute::constructor | function | /**
* If the regular expression contains
* [capture groups]{@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp#grouping-back-references},
* the captured values will be passed to the
* {@link workbox-routing~handlerCallback} `params`
* argument.
*
* @param ... |
1,287,928 | 7e6b73d057ce41a727ccd5dc293e9974 | swh:1:cnt:54e59844f6250915fa1aa042794d0cc041274029;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=20-113/ | 4959466e13018c48ab25c79742a0bbe33aae1600 | wlbdashboard | wmcs | node_modules/workbox-routing/src/registerRoute.ts | registerRoute | function | /**
* Easily register a RegExp, string, or function with a caching
* strategy to a singleton Router instance.
*
* This method will generate a Route for you if needed and
* call {@link workbox-routing.Router#registerRoute}.
*
* @param {RegExp|string|workbox-routing.Route~matchCallback|workbox-routing.Route} captu... |
1,287,929 | 164734aeba685cd149bea56809c3180f | swh:1:cnt:5af836d151b8d5a2f2bc0255ee034e4520a6e8e3;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=19-78/ | 26d464dfe042fab7270e11f7d39a8b2865052ab4 | wlbdashboard | wmcs | node_modules/workbox-routing/src/Route.ts | Route | type | /**
* A `Route` consists of a pair of callback functions, "match" and "handler".
* The "match" callback determine if a route should be used to "handle" a
* request by returning a non-falsy value if it can. The "handler" callback
* is called when there is a match and should return a Promise that resolves
* to a `Re... |
1,287,930 | 5fa8e0b8e00b1aa9fd3e641c7d72ca44 | swh:1:cnt:5af836d151b8d5a2f2bc0255ee034e4520a6e8e3;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=34-68/ | 26d464dfe042fab7270e11f7d39a8b2865052ab4 | wlbdashboard | wmcs | node_modules/workbox-routing/src/Route.ts | Route::constructor | function | /**
* Constructor for Route class.
*
* @param {workbox-routing~matchCallback} match
* A callback function that determines whether the route matches a given
* `fetch` event by returning a non-falsy value.
* @param {workbox-routing~handlerCallback} handler A callback
* function that returns a Promise... |
1,287,931 | fa11ef77e400fef19836215ef9fa4a1c | swh:1:cnt:5af836d151b8d5a2f2bc0255ee034e4520a6e8e3;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=70-77/ | 26d464dfe042fab7270e11f7d39a8b2865052ab4 | wlbdashboard | wmcs | node_modules/workbox-routing/src/Route.ts | Route::setCatchHandler | function | /**
*
* @param {workbox-routing-handlerCallback} handler A callback
* function that returns a Promise resolving to a Response
*/
setCatchHandler(handler: RouteHandler): void {
this.catchHandler = normalizeHandler(handler);
} |
1,287,932 | 12815d8ff477664970dcc3ec46fb7069 | swh:1:cnt:316f301590be805736b40a53be46d630c525cff2;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=25-25/ | c38671e05c6e7a882432d333b5877dfa9cdb8d88 | wlbdashboard | wmcs | node_modules/workbox-routing/src/Router.ts | RequestArgs | type | type RequestArgs = string | [string, RequestInit?]; |
1,287,933 | ccc95b091c5d63d7d32bf6e95878a013 | swh:1:cnt:316f301590be805736b40a53be46d630c525cff2;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=27-32/ | c38671e05c6e7a882432d333b5877dfa9cdb8d88 | wlbdashboard | wmcs | node_modules/workbox-routing/src/Router.ts | CacheURLsMessageData | type | interface CacheURLsMessageData {
type: string;
payload: {
urlsToCache: RequestArgs[];
};
} |
1,287,934 | eb8a1950b013e6fb7a598a5d275199e9 | swh:1:cnt:316f301590be805736b40a53be46d630c525cff2;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=34-487/ | c38671e05c6e7a882432d333b5877dfa9cdb8d88 | wlbdashboard | wmcs | node_modules/workbox-routing/src/Router.ts | Router | type | /**
* The Router can be used to process a `FetchEvent` using one or more
* {@link workbox-routing.Route}, responding with a `Response` if
* a matching route exists.
*
* If no route matches a given a request, the Router will use a "default"
* handler if one is defined.
*
* Should the matching Route throw an erro... |
1,287,935 | 5ab31d02d181cb69b26e0048d05fe635 | swh:1:cnt:316f301590be805736b40a53be46d630c525cff2;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=56-62/ | c38671e05c6e7a882432d333b5877dfa9cdb8d88 | wlbdashboard | wmcs | node_modules/workbox-routing/src/Router.ts | Router::constructor | function | /**
* Initializes a new Router.
*/
constructor() {
this._routes = new Map();
this._defaultHandlerMap = new Map();
} |
1,287,936 | a415f81e147dccf57af20594ac699b03 | swh:1:cnt:316f301590be805736b40a53be46d630c525cff2;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=73-86/ | c38671e05c6e7a882432d333b5877dfa9cdb8d88 | wlbdashboard | wmcs | node_modules/workbox-routing/src/Router.ts | Router::addFetchListener | function | /**
* Adds a fetch event listener to respond to events when a route matches
* the event's request.
*/
addFetchListener(): void {
// See https://github.com/Microsoft/TypeScript/issues/28357#issuecomment-436484705
self.addEventListener('fetch', ((event: FetchEvent) => {
const {request} = event;
... |
1,287,937 | d329477aa4d88d9541e2f8e73f1b3357 | swh:1:cnt:316f301590be805736b40a53be46d630c525cff2;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=64-71/ | c38671e05c6e7a882432d333b5877dfa9cdb8d88 | wlbdashboard | wmcs | node_modules/workbox-routing/src/Router.ts | Router::routes | function | /**
* @return {Map<string, Array<workbox-routing.Route>>} routes A `Map` of HTTP
* method name ('GET', etc.) to an array of all the corresponding `Route`
* instances that are registered.
*/
get routes(): Map<HTTPMethod, Route[]> {
return this._routes;
} |
1,287,938 | 8b28d485aafbe23f3ad419f8ff98e6a5 | swh:1:cnt:316f301590be805736b40a53be46d630c525cff2;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=88-146/ | c38671e05c6e7a882432d333b5877dfa9cdb8d88 | wlbdashboard | wmcs | node_modules/workbox-routing/src/Router.ts | Router::addCacheListener | function | /**
* Adds a message event listener for URLs to cache from the window.
* This is useful to cache resources loaded on the page prior to when the
* service worker started controlling it.
*
* The format of the message data sent from the window should be as follows.
* Where the `urlsToCache` array may con... |
1,287,939 | c8201815c1b8be0203f9bff4c692012c | swh:1:cnt:316f301590be805736b40a53be46d630c525cff2;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=148-311/ | c38671e05c6e7a882432d333b5877dfa9cdb8d88 | wlbdashboard | wmcs | node_modules/workbox-routing/src/Router.ts | Router::handleRequest | function | /**
* Apply the routing rules to a FetchEvent object to get a Response from an
* appropriate Route's handler.
*
* @param {Object} options
* @param {Request} options.request The request to handle.
* @param {ExtendableEvent} options.event The event that triggered the
* request.
* @return {Prom... |
1,287,940 | e8124bea034b0511da917ed21f252cff | swh:1:cnt:316f301590be805736b40a53be46d630c525cff2;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=313-382/ | c38671e05c6e7a882432d333b5877dfa9cdb8d88 | wlbdashboard | wmcs | node_modules/workbox-routing/src/Router.ts | Router::findMatchingRoute | function | /**
* Checks a request and URL (and optionally an event) against the list of
* registered routes, and if there's a match, returns the corresponding
* route along with any params generated by the match.
*
* @param {Object} options
* @param {URL} options.url
* @param {boolean} options.sameOrigin The ... |
1,287,941 | ec4aa58a4fc571ec615888add3cdcb82 | swh:1:cnt:316f301590be805736b40a53be46d630c525cff2;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=384-403/ | c38671e05c6e7a882432d333b5877dfa9cdb8d88 | wlbdashboard | wmcs | node_modules/workbox-routing/src/Router.ts | Router::setDefaultHandler | function | /**
* Define a default `handler` that's called when no routes explicitly
* match the incoming request.
*
* Each HTTP method ('GET', 'POST', etc.) gets its own default handler.
*
* Without a default handler, unmatched requests will go against the
* network as if there were no service worker present.... |
1,287,942 | 9ad4cb0f2296702ed8e20fa5f0ed56bf | swh:1:cnt:316f301590be805736b40a53be46d630c525cff2;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=405-414/ | c38671e05c6e7a882432d333b5877dfa9cdb8d88 | wlbdashboard | wmcs | node_modules/workbox-routing/src/Router.ts | Router::setCatchHandler | function | /**
* If a Route throws an error while handling a request, this `handler`
* will be called and given a chance to provide a response.
*
* @param {workbox-routing~handlerCallback} handler A callback
* function that returns a Promise resulting in a Response.
*/
setCatchHandler(handler: RouteHandler): v... |
1,287,943 | 7334951820acabb3db47a4d4723d2dc6 | swh:1:cnt:316f301590be805736b40a53be46d630c525cff2;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=416-466/ | c38671e05c6e7a882432d333b5877dfa9cdb8d88 | wlbdashboard | wmcs | node_modules/workbox-routing/src/Router.ts | Router::registerRoute | function | /**
* Registers a route with the router.
*
* @param {workbox-routing.Route} route The route to register.
*/
registerRoute(route: Route): void {
if (process.env.NODE_ENV !== 'production') {
assert!.isType(route, 'object', {
moduleName: 'workbox-routing',
className: 'Router',
... |
1,287,944 | 8f877867acb03d95619034a4953a4a6b | swh:1:cnt:316f301590be805736b40a53be46d630c525cff2;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=468-486/ | c38671e05c6e7a882432d333b5877dfa9cdb8d88 | wlbdashboard | wmcs | node_modules/workbox-routing/src/Router.ts | Router::unregisterRoute | function | /**
* Unregisters a route with the router.
*
* @param {workbox-routing.Route} route The route to unregister.
*/
unregisterRoute(route: Route): void {
if (!this._routes.has(route.method)) {
throw new WorkboxError('unregister-route-but-not-found-with-method', {
method: route.method,
... |
1,287,945 | 09d9a1535ccff20665a1d73e6520a7c3 | swh:1:cnt:375fe18c5ade382986119e9cdf6530b188b6532f;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=15-27/ | a1b870273b7a662f10673dc4e824e74e1d06391c | wlbdashboard | wmcs | node_modules/workbox-routing/src/setCatchHandler.ts | setCatchHandler | function | /**
* If a Route throws an error while handling a request, this `handler`
* will be called and given a chance to provide a response.
*
* @param {workbox-routing~handlerCallback} handler A callback
* function that returns a Promise resulting in a Response.
*
* @memberof workbox-routing
*/
function setCatchHandle... |
1,287,946 | ad1dc9e36939672fd9db9e3e645e3828 | swh:1:cnt:121941a2c9f85a4cd3905bbb7d7bc7a0199f64df;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=15-30/ | 78381c34397c4a7448afb5e3bc06c8ce0e8f967c | wlbdashboard | wmcs | node_modules/workbox-routing/src/setDefaultHandler.ts | setDefaultHandler | function | /**
* Define a default `handler` that's called when no routes explicitly
* match the incoming request.
*
* Without a default handler, unmatched requests will go against the
* network as if there were no service worker present.
*
* @param {workbox-routing~handlerCallback} handler A callback
* function that retur... |
1,287,947 | ba2e3aa30254e61a8b5a92ba0a7bb82d | swh:1:cnt:32b54ca088c2780f50233b8632259a3e52d0056d;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=11-11/ | 04b75bcff4ef2e73169ae5db8e249db494386b94 | wlbdashboard | wmcs | node_modules/workbox-routing/src/utils/constants.ts | HTTPMethod | type | type HTTPMethod = 'DELETE' | 'GET' | 'HEAD' | 'PATCH' | 'POST' | 'PUT'; |
1,287,948 | ba2e3aa30254e61a8b5a92ba0a7bb82d | swh:1:cnt:9d1068952a29c8527e860930c6e70e32a7f283a2;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=2-2/ | 55ee542fd61f28b757dfa22a4f238caed282eeff | wlbdashboard | wmcs | node_modules/workbox-routing/utils/constants.d.ts | HTTPMethod | type | type HTTPMethod = 'DELETE' | 'GET' | 'HEAD' | 'PATCH' | 'POST' | 'PUT'; |
1,287,949 | bc13533b99a2d981fef25e9920a41457 | swh:1:cnt:0e97629d4e82e23e89acf5785f07dc1888aa1432;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=18-27/ | 5a1760da62c35204ebf17186e68df2ed9d0f0d0d | wlbdashboard | wmcs | node_modules/workbox-strategies/CacheFirst.d.ts | CacheFirst | type | class CacheFirst extends Strategy {
/**
* @private
* @param {Request|string} request A request to run this strategy for.
* @param {workbox-strategies.StrategyHandler} handler The event that
* triggered the request.
* @return {Promise<Response>}
*/
_handle(request: Request, hand... |
1,287,950 | eae36ca35ddf1377cd81d5a450e0dde7 | swh:1:cnt:085628f54f4b1d13508e41c4d1fac9706122eaa7;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=14-88/ | e9b209218b76c696a50c3967ba0366174491187e | wlbdashboard | wmcs | node_modules/workbox-strategies/CacheFirst.js | CacheFirst | type | /**
* An implementation of a [cache-first](https://developer.chrome.com/docs/workbox/caching-strategies-overview/#cache-first-falling-back-to-network)
* request strategy.
*
* A cache first strategy is useful for assets that have been revisioned,
* such as URLs like `/styles/example.a8f5f1.css`, since they
* can b... |
1,287,951 | 4072f15d877626a9e278ab1b6b369cfc | swh:1:cnt:085628f54f4b1d13508e41c4d1fac9706122eaa7;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=29-87/ | e9b209218b76c696a50c3967ba0366174491187e | wlbdashboard | wmcs | node_modules/workbox-strategies/CacheFirst.js | CacheFirst::_handle | function | /**
* @private
* @param {Request|string} request A request to run this strategy for.
* @param {workbox-strategies.StrategyHandler} handler The event that
* triggered the request.
* @return {Promise<Response>}
*/
async _handle(request, handler) {
const logs = [];
if ... |
1,287,952 | d408f78815bf0fea6c9f249557487b23 | swh:1:cnt:22bfd59d0c37987916362c85a469efc3defd8a77;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=16-25/ | eb1c6054d7912e112a01e1b599b8dced7cc36d3c | wlbdashboard | wmcs | node_modules/workbox-strategies/CacheOnly.d.ts | CacheOnly | type | class CacheOnly extends Strategy {
/**
* @private
* @param {Request|string} request A request to run this strategy for.
* @param {workbox-strategies.StrategyHandler} handler The event that
* triggered the request.
* @return {Promise<Response>}
*/
_handle(request: Request, handl... |
1,287,953 | b872babc4f01a03fd10ffde5dc5b3731 | swh:1:cnt:2d9d55701f470ca002dca11fcc04d12ef6ca8b99;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=14-60/ | 139e18f6243cf430b208cbae8bb3e1a34a0161bd | wlbdashboard | wmcs | node_modules/workbox-strategies/CacheOnly.js | CacheOnly | type | /**
* An implementation of a [cache-only](https://developer.chrome.com/docs/workbox/caching-strategies-overview/#cache-only)
* request strategy.
*
* This class is useful if you want to take advantage of any
* [Workbox plugins](https://developer.chrome.com/docs/workbox/using-plugins/).
*
* If there is no cache ma... |
1,287,954 | fa6be378bc1acf3566e12209a3da2389 | swh:1:cnt:2d9d55701f470ca002dca11fcc04d12ef6ca8b99;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=27-59/ | 139e18f6243cf430b208cbae8bb3e1a34a0161bd | wlbdashboard | wmcs | node_modules/workbox-strategies/CacheOnly.js | CacheOnly::_handle | function | /**
* @private
* @param {Request|string} request A request to run this strategy for.
* @param {workbox-strategies.StrategyHandler} handler The event that
* triggered the request.
* @return {Promise<Response>}
*/
async _handle(request, handler) {
if (process.env.NODE_ENV !==... |
1,287,955 | e5fd65a156375e4ae59178b99ee9f6d9 | swh:1:cnt:b51c544df121855e4efe3c984b4bb960362e5d4e;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=10-12/ | bdc1dc356950236a62182c5e491a65a82238e506 | wlbdashboard | wmcs | node_modules/workbox-strategies/index.d.ts | FetchEvent | type | interface FetchEvent {
readonly preloadResponse: Promise<any>;
} |
1,287,956 | dbeb4afc1f572878bc583e0c167809d6 | swh:1:cnt:3e8097131f498dc15f392dc96b8b5b9d84a49a33;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=4-6/ | e7a3e989221e49f2bd093986a5e377d8364bbbd6 | wlbdashboard | wmcs | node_modules/workbox-strategies/NetworkFirst.d.ts | NetworkFirstOptions | type | interface NetworkFirstOptions extends StrategyOptions {
networkTimeoutSeconds?: number;
} |
1,287,957 | 331815d734abc6f3f6194de8671dbd91 | swh:1:cnt:3e8097131f498dc15f392dc96b8b5b9d84a49a33;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=23-79/ | e7a3e989221e49f2bd093986a5e377d8364bbbd6 | wlbdashboard | wmcs | node_modules/workbox-strategies/NetworkFirst.d.ts | NetworkFirst | type | class NetworkFirst extends Strategy {
private readonly _networkTimeoutSeconds;
/**
* @param {Object} [options]
* @param {string} [options.cacheName] Cache name to store and retrieve
* requests. Defaults to cache names provided by
* {@link workbox-core.cacheNames}.
* @param {Array<Object... |
1,287,958 | a34c7e2e1e3dd5fea5f60b6c9790abd5 | swh:1:cnt:1471537ee9371aadba3ae4cad585fb890729e3f7;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=15-196/ | 30b526c4ac0dd2247874103c119288249f55c4a6 | wlbdashboard | wmcs | node_modules/workbox-strategies/NetworkFirst.js | NetworkFirst | type | /**
* An implementation of a
* [network first](https://developer.chrome.com/docs/workbox/caching-strategies-overview/#network-first-falling-back-to-cache)
* request strategy.
*
* By default, this strategy will cache responses with a 200 status code as
* well as [opaque responses](https://developer.chrome.com/docs... |
1,287,959 | 834efa35f77be9cd12c3d7b43a23300e | swh:1:cnt:1471537ee9371aadba3ae4cad585fb890729e3f7;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=32-69/ | 30b526c4ac0dd2247874103c119288249f55c4a6 | wlbdashboard | wmcs | node_modules/workbox-strategies/NetworkFirst.js | NetworkFirst::constructor | function | /**
* @param {Object} [options]
* @param {string} [options.cacheName] Cache name to store and retrieve
* requests. Defaults to cache names provided by
* {@link workbox-core.cacheNames}.
* @param {Array<Object>} [options.plugins] [Plugins]{@link https://developers.google.com/web/tools/workbox/gu... |
1,287,960 | bbdf47ab39ca9ff1f72efddc4cda225c | swh:1:cnt:1471537ee9371aadba3ae4cad585fb890729e3f7;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=124-149/ | 30b526c4ac0dd2247874103c119288249f55c4a6 | wlbdashboard | wmcs | node_modules/workbox-strategies/NetworkFirst.js | NetworkFirst::_getTimeoutPromise | function | /**
* @param {Object} options
* @param {Request} options.request
* @param {Array} options.logs A reference to the logs array
* @param {Event} options.event
* @return {Promise<Response>}
*
* @private
*/
_getTimeoutPromise({ request, logs, handler, }) {
let timeoutId;
... |
1,287,961 | a2dd1ab7c5026d1177193a6f40a2f0c7 | swh:1:cnt:1471537ee9371aadba3ae4cad585fb890729e3f7;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=150-195/ | 30b526c4ac0dd2247874103c119288249f55c4a6 | wlbdashboard | wmcs | node_modules/workbox-strategies/NetworkFirst.js | NetworkFirst::_getNetworkPromise | function | /**
* @param {Object} options
* @param {number|undefined} options.timeoutId
* @param {Request} options.request
* @param {Array} options.logs A reference to the logs Array.
* @param {Event} options.event
* @return {Promise<Response>}
*
* @private
*/
async _getNetworkPromi... |
1,287,962 | 844c3e6655115a44dd43ac3095980a4b | swh:1:cnt:1471537ee9371aadba3ae4cad585fb890729e3f7;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=70-123/ | 30b526c4ac0dd2247874103c119288249f55c4a6 | wlbdashboard | wmcs | node_modules/workbox-strategies/NetworkFirst.js | NetworkFirst::_handle | function | /**
* @private
* @param {Request|string} request A request to run this strategy for.
* @param {workbox-strategies.StrategyHandler} handler The event that
* triggered the request.
* @return {Promise<Response>}
*/
async _handle(request, handler) {
const logs = [];
if ... |
1,287,963 | 7305f1e0d49377eab9463d6ca4e4a7b4 | swh:1:cnt:454b6e1edc8592604eaa102fc23703f958455298;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=4-6/ | abeddd6155327b9f1c4cf4ee2d5a8c444b8bacae | wlbdashboard | wmcs | node_modules/workbox-strategies/NetworkOnly.d.ts | NetworkOnlyOptions | type | interface NetworkOnlyOptions extends Omit<StrategyOptions, 'cacheName' | 'matchOptions'> {
networkTimeoutSeconds?: number;
} |
1,287,964 | 9514080c8afae9dcb708d84de8eb3250 | swh:1:cnt:454b6e1edc8592604eaa102fc23703f958455298;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=20-42/ | abeddd6155327b9f1c4cf4ee2d5a8c444b8bacae | wlbdashboard | wmcs | node_modules/workbox-strategies/NetworkOnly.d.ts | NetworkOnly | type | class NetworkOnly extends Strategy {
private readonly _networkTimeoutSeconds;
/**
* @param {Object} [options]
* @param {Array<Object>} [options.plugins] [Plugins]{@link https://developers.google.com/web/tools/workbox/guides/using-plugins}
* to use in conjunction with this caching strategy.
*... |
1,287,965 | 0678f7cefb8fbd7591ca7f6ae333904a | swh:1:cnt:991acdfa73ca022cf729ac46e2843760337a9c62;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=15-97/ | 9394925a397336d0e6ea9cd7a620a54ebaa06bae | wlbdashboard | wmcs | node_modules/workbox-strategies/NetworkOnly.js | NetworkOnly | type | /**
* An implementation of a
* [network-only](https://developer.chrome.com/docs/workbox/caching-strategies-overview/#network-only)
* request strategy.
*
* This class is useful if you want to take advantage of any
* [Workbox plugins](https://developer.chrome.com/docs/workbox/using-plugins/).
*
* If the network r... |
1,287,966 | fe66d7b40a07fedce021d019a88d8c2c | swh:1:cnt:991acdfa73ca022cf729ac46e2843760337a9c62;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=29-43/ | 9394925a397336d0e6ea9cd7a620a54ebaa06bae | wlbdashboard | wmcs | node_modules/workbox-strategies/NetworkOnly.js | NetworkOnly::constructor | function | /**
* @param {Object} [options]
* @param {Array<Object>} [options.plugins] [Plugins]{@link https://developers.google.com/web/tools/workbox/guides/using-plugins}
* to use in conjunction with this caching strategy.
* @param {Object} [options.fetchOptions] Values passed along to the
* [`init`](htt... |
1,287,967 | 51f129d682e5135e8e33e91229ed81ab | swh:1:cnt:991acdfa73ca022cf729ac46e2843760337a9c62;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=44-96/ | 9394925a397336d0e6ea9cd7a620a54ebaa06bae | wlbdashboard | wmcs | node_modules/workbox-strategies/NetworkOnly.js | NetworkOnly::_handle | function | /**
* @private
* @param {Request|string} request A request to run this strategy for.
* @param {workbox-strategies.StrategyHandler} handler The event that
* triggered the request.
* @return {Promise<Response>}
*/
async _handle(request, handler) {
if (process.env.NODE_ENV !==... |
1,287,968 | d8c454fdd133dedee1c62db123352206 | swh:1:cnt:858e1a66fcb0af2949dc27805161becc6a7ab43b;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=25-48/ | b6b15ac3adec6ecb5b8945708a9e562d76e9b98d | wlbdashboard | wmcs | node_modules/workbox-strategies/StaleWhileRevalidate.d.ts | StaleWhileRevalidate | type | class StaleWhileRevalidate extends Strategy {
/**
* @param {Object} [options]
* @param {string} [options.cacheName] Cache name to store and retrieve
* requests. Defaults to cache names provided by
* {@link workbox-core.cacheNames}.
* @param {Array<Object>} [options.plugins] [Plugins]{@link ... |
1,287,969 | 80f2a5e88111135c0b6824dd177dd2d1 | swh:1:cnt:e93e3c3ae19be6206fd995366212b51b88ab3b3a;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=15-117/ | e1d21b65ea48dfa5f44398a5612098f9c55ab4d8 | wlbdashboard | wmcs | node_modules/workbox-strategies/StaleWhileRevalidate.js | StaleWhileRevalidate | type | /**
* An implementation of a
* [stale-while-revalidate](https://developer.chrome.com/docs/workbox/caching-strategies-overview/#stale-while-revalidate)
* request strategy.
*
* Resources are requested from both the cache and the network in parallel.
* The strategy will respond with the cached version if available, ... |
1,287,970 | 1465265e724e21f42199121954ab801c | swh:1:cnt:e93e3c3ae19be6206fd995366212b51b88ab3b3a;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=37-57/ | e1d21b65ea48dfa5f44398a5612098f9c55ab4d8 | wlbdashboard | wmcs | node_modules/workbox-strategies/StaleWhileRevalidate.js | StaleWhileRevalidate::constructor | function | /**
* @param {Object} [options]
* @param {string} [options.cacheName] Cache name to store and retrieve
* requests. Defaults to cache names provided by
* {@link workbox-core.cacheNames}.
* @param {Array<Object>} [options.plugins] [Plugins]{@link https://developers.google.com/web/tools/workbox/gu... |
1,287,971 | 8daa133e2f05c244e7e927cb05d3995a | swh:1:cnt:e93e3c3ae19be6206fd995366212b51b88ab3b3a;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=58-116/ | e1d21b65ea48dfa5f44398a5612098f9c55ab4d8 | wlbdashboard | wmcs | node_modules/workbox-strategies/StaleWhileRevalidate.js | StaleWhileRevalidate::_handle | function | /**
* @private
* @param {Request|string} request A request to run this strategy for.
* @param {workbox-strategies.StrategyHandler} handler The event that
* triggered the request.
* @return {Promise<Response>}
*/
async _handle(request, handler) {
const logs = [];
if ... |
1,287,972 | 23a6f8bf655bda367b7ebeda92e2c21f | swh:1:cnt:1947398b5bc372111badb53fd89f491f0d44f4a3;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=4-9/ | ac1921c9fa056287779930dc178b3ecc7a7bc065 | wlbdashboard | wmcs | node_modules/workbox-strategies/Strategy.d.ts | StrategyOptions | type | interface StrategyOptions {
cacheName?: string;
plugins?: WorkboxPlugin[];
fetchOptions?: RequestInit;
matchOptions?: CacheQueryOptions;
} |
1,287,973 | ab1dbbccd99e7d7d9af906c14adac95c | swh:1:cnt:e81a2f67d0e9ef886bb527c7b11b38cccf3edeeb;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=14-210/ | c58ebad489845703db906bd795eec718280107c4 | wlbdashboard | wmcs | node_modules/workbox-strategies/Strategy.js | Strategy | type | /**
* An abstract base class that all other strategy classes must extend from:
*
* @memberof workbox-strategies
*/
class Strategy {
/**
* Creates a new instance of the strategy and sets all documented option
* properties as public instance properties.
*
* Note: if a custom strategy class ext... |
1,287,974 | ef5f4a72468aa77bb4dcf8c23d4810b9 | swh:1:cnt:e81a2f67d0e9ef886bb527c7b11b38cccf3edeeb;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=20-75/ | c58ebad489845703db906bd795eec718280107c4 | wlbdashboard | wmcs | node_modules/workbox-strategies/Strategy.js | Strategy::constructor | function | /**
* Creates a new instance of the strategy and sets all documented option
* properties as public instance properties.
*
* Note: if a custom strategy class extends the base Strategy class and does
* not need more than these properties, it does not need to define its own
* constructor.
... |
1,287,975 | 60a1ff7dd63d1d3013522a3a5dd1d37c | swh:1:cnt:e81a2f67d0e9ef886bb527c7b11b38cccf3edeeb;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=140-174/ | c58ebad489845703db906bd795eec718280107c4 | wlbdashboard | wmcs | node_modules/workbox-strategies/Strategy.js | Strategy::_getResponse | function | async _getResponse(handler, request, event) {
await handler.runCallbacks('handlerWillStart', { event, request });
let response = undefined;
try {
response = await this._handle(request, handler);
// The "official" Strategy subclasses all throw this error automatically,
... |
1,287,976 | a8d170c34a05d356cdff43e8e77237ea | swh:1:cnt:e81a2f67d0e9ef886bb527c7b11b38cccf3edeeb;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=76-98/ | c58ebad489845703db906bd795eec718280107c4 | wlbdashboard | wmcs | node_modules/workbox-strategies/Strategy.js | Strategy::handle | function | /**
* Perform a request strategy and returns a `Promise` that will resolve with
* a `Response`, invoking all relevant plugin callbacks.
*
* When a strategy instance is registered with a Workbox
* {@link workbox-routing.Route}, this method is automatically
* called when the route matches.
... |
1,287,977 | 2f2fc2306bb5d1dc97107157c857ea16 | swh:1:cnt:e81a2f67d0e9ef886bb527c7b11b38cccf3edeeb;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=99-139/ | c58ebad489845703db906bd795eec718280107c4 | wlbdashboard | wmcs | node_modules/workbox-strategies/Strategy.js | Strategy::handleAll | function | /**
* Similar to {@link workbox-strategies.Strategy~handle}, but
* instead of just returning a `Promise` that resolves to a `Response` it
* it will return an tuple of `[response, done]` promises, where the former
* (`response`) is equivalent to what `handle()` returns, and the latter is a
* Pro... |
1,287,978 | f6e7fc5e76235dceb645f5583d75434f | swh:1:cnt:e81a2f67d0e9ef886bb527c7b11b38cccf3edeeb;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=175-209/ | c58ebad489845703db906bd795eec718280107c4 | wlbdashboard | wmcs | node_modules/workbox-strategies/Strategy.js | Strategy::_awaitComplete | function | async _awaitComplete(responseDone, handler, request, event) {
let response;
let error;
try {
response = await responseDone;
}
catch (error) {
// Ignore errors, as response errors should be caught via the `response`
// promise above. The `done` ... |
1,287,979 | 64e0cbb5b9eb977fb5bd5774b18d9b14 | swh:1:cnt:34dbef131a3caacff0005996fcdf3f24a2ff40d1;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=13-183/ | fab8068a046bce1b52d44c7cef735596412bc16d | wlbdashboard | wmcs | node_modules/workbox-strategies/StrategyHandler.d.ts | StrategyHandler | type | class StrategyHandler {
request: Request;
url?: URL;
event: ExtendableEvent;
params?: any;
private _cacheKeys;
private readonly _strategy;
private readonly _extendLifetimePromises;
private readonly _handlerDeferred;
private readonly _plugins;
private readonly _pluginStateMap;
... |
1,287,980 | fa55884d1f06ad9670d8f69c99a38ed7 | swh:1:cnt:93487809399ac68a100db836719e81c27e02ca41;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=17-19/ | 915082c1e2c0ec63e43eeb4463140eadcf6f67d8 | wlbdashboard | wmcs | node_modules/workbox-strategies/StrategyHandler.js | toRequest | function | function toRequest(input) {
return typeof input === 'string' ? new Request(input) : input;
} |
1,287,981 | 8bf1cfe1f62c1ba6e42e2c68b23335e6 | swh:1:cnt:93487809399ac68a100db836719e81c27e02ca41;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=209-247/ | 915082c1e2c0ec63e43eeb4463140eadcf6f67d8 | wlbdashboard | wmcs | node_modules/workbox-strategies/StrategyHandler.js | StrategyHandler::cacheMatch | function | /**
* Matches a request from the cache (and invokes any applicable plugin
* callback methods) using the `cacheName`, `matchOptions`, and `plugins`
* defined on the strategy object.
*
* The following plugin lifecycle methods are invoked when using this method:
* - cacheKeyWillByUsed()
... |
1,287,982 | f6edaefbb125573ce38c9721d849d88c | swh:1:cnt:93487809399ac68a100db836719e81c27e02ca41;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=30-106/ | 915082c1e2c0ec63e43eeb4463140eadcf6f67d8 | wlbdashboard | wmcs | node_modules/workbox-strategies/StrategyHandler.js | StrategyHandler::constructor | function | /**
* Creates a new instance associated with the passed strategy and event
* that's handling the request.
*
* The constructor also initializes the state that will be passed to each of
* the plugins handling this request.
*
* @param {workbox-strategies.Strategy} strategy
* @param ... |
1,287,983 | 65a5574806a2bafb96cfbf63f08edd95 | swh:1:cnt:93487809399ac68a100db836719e81c27e02ca41;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=107-192/ | 915082c1e2c0ec63e43eeb4463140eadcf6f67d8 | wlbdashboard | wmcs | node_modules/workbox-strategies/StrategyHandler.js | StrategyHandler::fetch | function | /**
* Fetches a given request (and invokes any applicable plugin callback
* methods) using the `fetchOptions` (for non-navigation requests) and
* `plugins` defined on the `Strategy` object.
*
* The following plugin lifecycle methods are invoked when using this method:
* - `requestWillFetch... |
1,287,984 | 813771f005d30840dcae546bcf0b7c1f | swh:1:cnt:93487809399ac68a100db836719e81c27e02ca41;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=193-208/ | 915082c1e2c0ec63e43eeb4463140eadcf6f67d8 | wlbdashboard | wmcs | node_modules/workbox-strategies/StrategyHandler.js | StrategyHandler::fetchAndCachePut | function | /**
* Calls `this.fetch()` and (in the background) runs `this.cachePut()` on
* the response generated by `this.fetch()`.
*
* The call to `this.cachePut()` automatically invokes `this.waitUntil()`,
* so you do not have to manually call `waitUntil()` on the event.
*
* @param {Request|st... |
1,287,985 | 464a27d68419fdb43ac787712ac70d7a | swh:1:cnt:93487809399ac68a100db836719e81c27e02ca41;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=248-338/ | 915082c1e2c0ec63e43eeb4463140eadcf6f67d8 | wlbdashboard | wmcs | node_modules/workbox-strategies/StrategyHandler.js | StrategyHandler::cachePut | function | /**
* Puts a request/response pair in the cache (and invokes any applicable
* plugin callback methods) using the `cacheName` and `plugins` defined on
* the strategy object.
*
* The following plugin lifecycle methods are invoked when using this method:
* - cacheKeyWillByUsed()
* - cach... |
1,287,986 | 91f2da38a481b6207d54f3856e783669 | swh:1:cnt:93487809399ac68a100db836719e81c27e02ca41;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=339-366/ | 915082c1e2c0ec63e43eeb4463140eadcf6f67d8 | wlbdashboard | wmcs | node_modules/workbox-strategies/StrategyHandler.js | StrategyHandler::getCacheKey | function | /**
* Checks the list of plugins for the `cacheKeyWillBeUsed` callback, and
* executes any of those callbacks found in sequence. The final `Request`
* object returned by the last plugin is treated as the cache key for cache
* reads and/or writes. If no `cacheKeyWillBeUsed` plugin callbacks have
... |
1,287,987 | db7677acb7823e55b64d7fcbfbf33bb0 | swh:1:cnt:93487809399ac68a100db836719e81c27e02ca41;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=367-381/ | 915082c1e2c0ec63e43eeb4463140eadcf6f67d8 | wlbdashboard | wmcs | node_modules/workbox-strategies/StrategyHandler.js | StrategyHandler::hasCallback | function | /**
* Returns true if the strategy has at least one plugin with the given
* callback.
*
* @param {string} name The name of the callback to check for.
* @return {boolean}
*/
hasCallback(name) {
for (const plugin of this._strategy.plugins) {
if (name in plugin) {
... |
1,287,988 | a85c304eef6d9aadabfac18d2a51e056 | swh:1:cnt:93487809399ac68a100db836719e81c27e02ca41;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=382-404/ | 915082c1e2c0ec63e43eeb4463140eadcf6f67d8 | wlbdashboard | wmcs | node_modules/workbox-strategies/StrategyHandler.js | StrategyHandler::runCallbacks | function | /**
* Runs all plugin callbacks matching the given name, in order, passing the
* given param object (merged ith the current plugin state) as the only
* argument.
*
* Note: since this method runs all plugins, it's not suitable for cases
* where the return value of a callback needs to be app... |
1,287,989 | dba89c49caa5ac40e0e0fe62027f4a9d | swh:1:cnt:93487809399ac68a100db836719e81c27e02ca41;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=405-427/ | 915082c1e2c0ec63e43eeb4463140eadcf6f67d8 | wlbdashboard | wmcs | node_modules/workbox-strategies/StrategyHandler.js | StrategyHandler::iterateCallbacks | function | /**
* Accepts a callback and returns an iterable of matching plugin callbacks,
* where each callback is wrapped with the current handler state (i.e. when
* you call each callback, whatever object parameter you pass it will
* be merged with the plugin's current state).
*
* @param {string} n... |
1,287,990 | 1a7be25d58ecd74ec65ddf4dabb3f2ef | swh:1:cnt:93487809399ac68a100db836719e81c27e02ca41;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=445-460/ | 915082c1e2c0ec63e43eeb4463140eadcf6f67d8 | wlbdashboard | wmcs | node_modules/workbox-strategies/StrategyHandler.js | StrategyHandler::doneWaiting | function | /**
* Returns a promise that resolves once all promises passed to
* {@link workbox-strategies.StrategyHandler~waitUntil}
* have settled.
*
* Note: any work done after `doneWaiting()` settles should be manually
* passed to an event's `waitUntil()` method (not this handler's
* `waitUnti... |
1,287,991 | 36b3cd5928d90c50875e48f74f86c4b3 | swh:1:cnt:93487809399ac68a100db836719e81c27e02ca41;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=461-467/ | 915082c1e2c0ec63e43eeb4463140eadcf6f67d8 | wlbdashboard | wmcs | node_modules/workbox-strategies/StrategyHandler.js | StrategyHandler::destroy | function | /**
* Stops running the strategy and immediately resolves any pending
* `waitUntil()` promises.
*/
destroy() {
this._handlerDeferred.resolve(null);
} |
1,287,992 | 3ef3893dae5274c13bbb052ee897f4dd | swh:1:cnt:93487809399ac68a100db836719e81c27e02ca41;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=468-515/ | 915082c1e2c0ec63e43eeb4463140eadcf6f67d8 | wlbdashboard | wmcs | node_modules/workbox-strategies/StrategyHandler.js | StrategyHandler::_ensureResponseSafeToCache | function | /**
* This method will call cacheWillUpdate on the available plugins (or use
* status === 200) to determine if the Response is safe and valid to cache.
*
* @param {Request} options.request
* @param {Response} options.response
* @return {Promise<Response|undefined>}
*
* @private
... |
1,287,993 | b19dae10774b5daf98a800255bc6ff1e | swh:1:cnt:93487809399ac68a100db836719e81c27e02ca41;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=428-444/ | 915082c1e2c0ec63e43eeb4463140eadcf6f67d8 | wlbdashboard | wmcs | node_modules/workbox-strategies/StrategyHandler.js | StrategyHandler::waitUntil | function | /**
* Adds a promise to the
* [extend lifetime promises]{@link https://w3c.github.io/ServiceWorker/#extendableevent-extend-lifetime-promises}
* of the event event associated with the request being handled (usually a
* `FetchEvent`).
*
* Note: you can await
* {@link workbox-strategies.... |
1,287,994 | 06f0a001bec0bfb98c93ba39f7659c6f | swh:1:cnt:93487809399ac68a100db836719e81c27e02ca41;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=20-516/ | 915082c1e2c0ec63e43eeb4463140eadcf6f67d8 | wlbdashboard | wmcs | node_modules/workbox-strategies/StrategyHandler.js | StrategyHandler | type | /**
* A class created every time a Strategy instance instance calls
* {@link workbox-strategies.Strategy~handle} or
* {@link workbox-strategies.Strategy~handleAll} that wraps all fetch and
* cache actions around plugin callbacks and keeps track of when the strategy
* is "done" (i.e. all added `event.waitUntil()` p... |
1,287,995 | e6023e91258c3e7c34646c7ecc8ac7be | swh:1:cnt:9576a12c1915de5fb921cae0fc3a64503671ea75;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=229-275/ | 6074840948921b372f03a1e89fe49661913926eb | wlbdashboard | wmcs | node_modules/workbox-strategies/build/workbox-strategies.dev.js | StrategyHandler::cacheMatch | function | /**
* Matches a request from the cache (and invokes any applicable plugin
* callback methods) using the `cacheName`, `matchOptions`, and `plugins`
* defined on the strategy object.
*
* The following plugin lifecycle methods are invoked when using this method:
* - cacheKeyWillBy... |
1,287,996 | 9e0bb26c69bede551849544247b16c87 | swh:1:cnt:9576a12c1915de5fb921cae0fc3a64503671ea75;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=411-428/ | 6074840948921b372f03a1e89fe49661913926eb | wlbdashboard | wmcs | node_modules/workbox-strategies/build/workbox-strategies.dev.js | StrategyHandler::hasCallback | function | /**
* Returns true if the strategy has at least one plugin with the given
* callback.
*
* @param {string} name The name of the callback to check for.
* @return {boolean}
*/
hasCallback(name) {
for (const plugin of this._strategy.plugins) {
if (name in ... |
1,287,997 | 2974ff687e92164c1051b5ee261991ba | swh:1:cnt:9576a12c1915de5fb921cae0fc3a64503671ea75;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=781-816/ | 6074840948921b372f03a1e89fe49661913926eb | wlbdashboard | wmcs | node_modules/workbox-strategies/build/workbox-strategies.dev.js | Strategy::_awaitComplete | function | async _awaitComplete(responseDone, handler, request, event) {
let response;
let error;
try {
response = await responseDone;
} catch (error) {// Ignore errors, as response errors should be caught via the `response`
// promise above. The `done` promise will only throw ... |
1,287,998 | f5572b279a9b05b8114f99b0b9df5c4d | swh:1:cnt:9576a12c1915de5fb921cae0fc3a64503671ea75;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=681-729/ | 6074840948921b372f03a1e89fe49661913926eb | wlbdashboard | wmcs | node_modules/workbox-strategies/build/workbox-strategies.dev.js | Strategy::handleAll | function | /**
* Similar to {@link workbox-strategies.Strategy~handle}, but
* instead of just returning a `Promise` that resolves to a `Response` it
* it will return an tuple of `[response, done]` promises, where the former
* (`response`) is equivalent to what `handle()` returns, and the latter is a
... |
1,287,999 | 5fbd61a2d89210e0f0aa43d69462cf0f | swh:1:cnt:9576a12c1915de5fb921cae0fc3a64503671ea75;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=531-579/ | 6074840948921b372f03a1e89fe49661913926eb | wlbdashboard | wmcs | node_modules/workbox-strategies/build/workbox-strategies.dev.js | StrategyHandler::_ensureResponseSafeToCache | function | /**
* This method will call cacheWillUpdate on the available plugins (or use
* status === 200) to determine if the Response is safe and valid to cache.
*
* @param {Request} options.request
* @param {Response} options.response
* @return {Promise<Response|undefined>}
*
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.