v1.0 with SW PWA enabled
This commit is contained in:
19
frontend/node_modules/workbox-navigation-preload/LICENSE
generated
vendored
Normal file
19
frontend/node_modules/workbox-navigation-preload/LICENSE
generated
vendored
Normal file
@ -0,0 +1,19 @@
|
||||
Copyright 2018 Google LLC
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
1
frontend/node_modules/workbox-navigation-preload/README.md
generated
vendored
Normal file
1
frontend/node_modules/workbox-navigation-preload/README.md
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
This module's documentation can be found at https://developers.google.com/web/tools/workbox/modules/workbox-navigation-preload
|
||||
0
frontend/node_modules/workbox-navigation-preload/_version.d.ts
generated
vendored
Normal file
0
frontend/node_modules/workbox-navigation-preload/_version.d.ts
generated
vendored
Normal file
6
frontend/node_modules/workbox-navigation-preload/_version.js
generated
vendored
Normal file
6
frontend/node_modules/workbox-navigation-preload/_version.js
generated
vendored
Normal file
@ -0,0 +1,6 @@
|
||||
"use strict";
|
||||
// @ts-ignore
|
||||
try {
|
||||
self['workbox:navigation-preload:7.3.0'] && _();
|
||||
}
|
||||
catch (e) { }
|
||||
1
frontend/node_modules/workbox-navigation-preload/_version.mjs
generated
vendored
Normal file
1
frontend/node_modules/workbox-navigation-preload/_version.mjs
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
try{self['workbox:navigation-preload:7.4.0']&&_()}catch(e){}// eslint-disable-line
|
||||
99
frontend/node_modules/workbox-navigation-preload/build/workbox-navigation-preload.dev.js
generated
vendored
Normal file
99
frontend/node_modules/workbox-navigation-preload/build/workbox-navigation-preload.dev.js
generated
vendored
Normal file
@ -0,0 +1,99 @@
|
||||
this.workbox = this.workbox || {};
|
||||
this.workbox.navigationPreload = (function (exports, logger_js) {
|
||||
'use strict';
|
||||
|
||||
// @ts-ignore
|
||||
try {
|
||||
self['workbox:navigation-preload:7.3.0'] && _();
|
||||
} catch (e) {}
|
||||
|
||||
/*
|
||||
Copyright 2018 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.
|
||||
*/
|
||||
/**
|
||||
* @return {boolean} Whether or not the current browser supports enabling
|
||||
* navigation preload.
|
||||
*
|
||||
* @memberof workbox-navigation-preload
|
||||
*/
|
||||
function isSupported() {
|
||||
return Boolean(self.registration && self.registration.navigationPreload);
|
||||
}
|
||||
|
||||
/*
|
||||
Copyright 2018 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 the browser supports Navigation Preload, then this will disable it.
|
||||
*
|
||||
* @memberof workbox-navigation-preload
|
||||
*/
|
||||
function disable() {
|
||||
if (isSupported()) {
|
||||
self.addEventListener('activate', event => {
|
||||
event.waitUntil(self.registration.navigationPreload.disable().then(() => {
|
||||
{
|
||||
logger_js.logger.log(`Navigation preload is disabled.`);
|
||||
}
|
||||
}));
|
||||
});
|
||||
} else {
|
||||
{
|
||||
logger_js.logger.log(`Navigation preload is not supported in this browser.`);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
Copyright 2018 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 the browser supports Navigation Preload, then this will enable it.
|
||||
*
|
||||
* @param {string} [headerValue] Optionally, allows developers to
|
||||
* [override](https://developers.google.com/web/updates/2017/02/navigation-preload#changing_the_header)
|
||||
* the value of the `Service-Worker-Navigation-Preload` header which will be
|
||||
* sent to the server when making the navigation request.
|
||||
*
|
||||
* @memberof workbox-navigation-preload
|
||||
*/
|
||||
function enable(headerValue) {
|
||||
if (isSupported()) {
|
||||
self.addEventListener('activate', event => {
|
||||
event.waitUntil(self.registration.navigationPreload.enable().then(() => {
|
||||
// Defaults to Service-Worker-Navigation-Preload: true if not set.
|
||||
if (headerValue) {
|
||||
void self.registration.navigationPreload.setHeaderValue(headerValue);
|
||||
}
|
||||
{
|
||||
logger_js.logger.log(`Navigation preload is enabled.`);
|
||||
}
|
||||
}));
|
||||
});
|
||||
} else {
|
||||
{
|
||||
logger_js.logger.log(`Navigation preload is not supported in this browser.`);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
exports.disable = disable;
|
||||
exports.enable = enable;
|
||||
exports.isSupported = isSupported;
|
||||
|
||||
return exports;
|
||||
|
||||
})({}, workbox.core._private);
|
||||
//# sourceMappingURL=workbox-navigation-preload.dev.js.map
|
||||
1
frontend/node_modules/workbox-navigation-preload/build/workbox-navigation-preload.dev.js.map
generated
vendored
Normal file
1
frontend/node_modules/workbox-navigation-preload/build/workbox-navigation-preload.dev.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
2
frontend/node_modules/workbox-navigation-preload/build/workbox-navigation-preload.prod.js
generated
vendored
Normal file
2
frontend/node_modules/workbox-navigation-preload/build/workbox-navigation-preload.prod.js
generated
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
this.workbox=this.workbox||{},this.workbox.navigationPreload=function(t){"use strict";try{self["workbox:navigation-preload:7.3.0"]&&_()}catch(t){}function e(){return Boolean(self.registration&&self.registration.navigationPreload)}return t.disable=function(){e()&&self.addEventListener("activate",(t=>{t.waitUntil(self.registration.navigationPreload.disable().then((()=>{})))}))},t.enable=function(t){e()&&self.addEventListener("activate",(e=>{e.waitUntil(self.registration.navigationPreload.enable().then((()=>{t&&self.registration.navigationPreload.setHeaderValue(t)})))}))},t.isSupported=e,t}({});
|
||||
//# sourceMappingURL=workbox-navigation-preload.prod.js.map
|
||||
1
frontend/node_modules/workbox-navigation-preload/build/workbox-navigation-preload.prod.js.map
generated
vendored
Normal file
1
frontend/node_modules/workbox-navigation-preload/build/workbox-navigation-preload.prod.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"workbox-navigation-preload.prod.js","sources":["../_version.js","../isSupported.js","../disable.js","../enable.js"],"sourcesContent":["\"use strict\";\n// @ts-ignore\ntry {\n self['workbox:navigation-preload:7.3.0'] && _();\n}\ncatch (e) { }\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport './_version.js';\n/**\n * @return {boolean} Whether or not the current browser supports enabling\n * navigation preload.\n *\n * @memberof workbox-navigation-preload\n */\nfunction isSupported() {\n return Boolean(self.registration && self.registration.navigationPreload);\n}\nexport { isSupported };\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { logger } from 'workbox-core/_private/logger.js';\nimport { isSupported } from './isSupported.js';\nimport './_version.js';\n/**\n * If the browser supports Navigation Preload, then this will disable it.\n *\n * @memberof workbox-navigation-preload\n */\nfunction disable() {\n if (isSupported()) {\n self.addEventListener('activate', (event) => {\n event.waitUntil(self.registration.navigationPreload.disable().then(() => {\n if (process.env.NODE_ENV !== 'production') {\n logger.log(`Navigation preload is disabled.`);\n }\n }));\n });\n }\n else {\n if (process.env.NODE_ENV !== 'production') {\n logger.log(`Navigation preload is not supported in this browser.`);\n }\n }\n}\nexport { disable };\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { logger } from 'workbox-core/_private/logger.js';\nimport { isSupported } from './isSupported.js';\nimport './_version.js';\n/**\n * If the browser supports Navigation Preload, then this will enable it.\n *\n * @param {string} [headerValue] Optionally, allows developers to\n * [override](https://developers.google.com/web/updates/2017/02/navigation-preload#changing_the_header)\n * the value of the `Service-Worker-Navigation-Preload` header which will be\n * sent to the server when making the navigation request.\n *\n * @memberof workbox-navigation-preload\n */\nfunction enable(headerValue) {\n if (isSupported()) {\n self.addEventListener('activate', (event) => {\n event.waitUntil(self.registration.navigationPreload.enable().then(() => {\n // Defaults to Service-Worker-Navigation-Preload: true if not set.\n if (headerValue) {\n void self.registration.navigationPreload.setHeaderValue(headerValue);\n }\n if (process.env.NODE_ENV !== 'production') {\n logger.log(`Navigation preload is enabled.`);\n }\n }));\n });\n }\n else {\n if (process.env.NODE_ENV !== 'production') {\n logger.log(`Navigation preload is not supported in this browser.`);\n }\n }\n}\nexport { enable };\n"],"names":["self","_","e","isSupported","Boolean","registration","navigationPreload","addEventListener","event","waitUntil","disable","then","headerValue","enable","setHeaderValue"],"mappings":"sFAEA,IACIA,KAAK,qCAAuCC,GAChD,CACA,MAAOC,GAAG,CCSV,SAASC,IACL,OAAOC,QAAQJ,KAAKK,cAAgBL,KAAKK,aAAaC,kBAC1D,kBCDA,WACQH,KACAH,KAAKO,iBAAiB,YAAaC,IAC/BA,EAAMC,UAAUT,KAAKK,aAAaC,kBAAkBI,UAAUC,MAAK,SAIhE,GAQf,WCVA,SAAgBC,GACRT,KACAH,KAAKO,iBAAiB,YAAaC,IAC/BA,EAAMC,UAAUT,KAAKK,aAAaC,kBAAkBO,SAASF,MAAK,KAE1DC,GACKZ,KAAKK,aAAaC,kBAAkBQ,eAAeF,EAC5D,IAID,GAQf"}
|
||||
8
frontend/node_modules/workbox-navigation-preload/disable.d.ts
generated
vendored
Normal file
8
frontend/node_modules/workbox-navigation-preload/disable.d.ts
generated
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
import './_version.js';
|
||||
/**
|
||||
* If the browser supports Navigation Preload, then this will disable it.
|
||||
*
|
||||
* @memberof workbox-navigation-preload
|
||||
*/
|
||||
declare function disable(): void;
|
||||
export { disable };
|
||||
32
frontend/node_modules/workbox-navigation-preload/disable.js
generated
vendored
Normal file
32
frontend/node_modules/workbox-navigation-preload/disable.js
generated
vendored
Normal file
@ -0,0 +1,32 @@
|
||||
/*
|
||||
Copyright 2018 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.
|
||||
*/
|
||||
import { logger } from 'workbox-core/_private/logger.js';
|
||||
import { isSupported } from './isSupported.js';
|
||||
import './_version.js';
|
||||
/**
|
||||
* If the browser supports Navigation Preload, then this will disable it.
|
||||
*
|
||||
* @memberof workbox-navigation-preload
|
||||
*/
|
||||
function disable() {
|
||||
if (isSupported()) {
|
||||
self.addEventListener('activate', (event) => {
|
||||
event.waitUntil(self.registration.navigationPreload.disable().then(() => {
|
||||
if (process.env.NODE_ENV !== 'production') {
|
||||
logger.log(`Navigation preload is disabled.`);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
else {
|
||||
if (process.env.NODE_ENV !== 'production') {
|
||||
logger.log(`Navigation preload is not supported in this browser.`);
|
||||
}
|
||||
}
|
||||
}
|
||||
export { disable };
|
||||
1
frontend/node_modules/workbox-navigation-preload/disable.mjs
generated
vendored
Normal file
1
frontend/node_modules/workbox-navigation-preload/disable.mjs
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
export * from './disable.js';
|
||||
13
frontend/node_modules/workbox-navigation-preload/enable.d.ts
generated
vendored
Normal file
13
frontend/node_modules/workbox-navigation-preload/enable.d.ts
generated
vendored
Normal file
@ -0,0 +1,13 @@
|
||||
import './_version.js';
|
||||
/**
|
||||
* If the browser supports Navigation Preload, then this will enable it.
|
||||
*
|
||||
* @param {string} [headerValue] Optionally, allows developers to
|
||||
* [override](https://developers.google.com/web/updates/2017/02/navigation-preload#changing_the_header)
|
||||
* the value of the `Service-Worker-Navigation-Preload` header which will be
|
||||
* sent to the server when making the navigation request.
|
||||
*
|
||||
* @memberof workbox-navigation-preload
|
||||
*/
|
||||
declare function enable(headerValue?: string): void;
|
||||
export { enable };
|
||||
41
frontend/node_modules/workbox-navigation-preload/enable.js
generated
vendored
Normal file
41
frontend/node_modules/workbox-navigation-preload/enable.js
generated
vendored
Normal file
@ -0,0 +1,41 @@
|
||||
/*
|
||||
Copyright 2018 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.
|
||||
*/
|
||||
import { logger } from 'workbox-core/_private/logger.js';
|
||||
import { isSupported } from './isSupported.js';
|
||||
import './_version.js';
|
||||
/**
|
||||
* If the browser supports Navigation Preload, then this will enable it.
|
||||
*
|
||||
* @param {string} [headerValue] Optionally, allows developers to
|
||||
* [override](https://developers.google.com/web/updates/2017/02/navigation-preload#changing_the_header)
|
||||
* the value of the `Service-Worker-Navigation-Preload` header which will be
|
||||
* sent to the server when making the navigation request.
|
||||
*
|
||||
* @memberof workbox-navigation-preload
|
||||
*/
|
||||
function enable(headerValue) {
|
||||
if (isSupported()) {
|
||||
self.addEventListener('activate', (event) => {
|
||||
event.waitUntil(self.registration.navigationPreload.enable().then(() => {
|
||||
// Defaults to Service-Worker-Navigation-Preload: true if not set.
|
||||
if (headerValue) {
|
||||
void self.registration.navigationPreload.setHeaderValue(headerValue);
|
||||
}
|
||||
if (process.env.NODE_ENV !== 'production') {
|
||||
logger.log(`Navigation preload is enabled.`);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
else {
|
||||
if (process.env.NODE_ENV !== 'production') {
|
||||
logger.log(`Navigation preload is not supported in this browser.`);
|
||||
}
|
||||
}
|
||||
}
|
||||
export { enable };
|
||||
1
frontend/node_modules/workbox-navigation-preload/enable.mjs
generated
vendored
Normal file
1
frontend/node_modules/workbox-navigation-preload/enable.mjs
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
export * from './enable.js';
|
||||
23
frontend/node_modules/workbox-navigation-preload/index.d.ts
generated
vendored
Normal file
23
frontend/node_modules/workbox-navigation-preload/index.d.ts
generated
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
import { disable } from './disable.js';
|
||||
import { enable } from './enable.js';
|
||||
import { isSupported } from './isSupported.js';
|
||||
import './_version.js';
|
||||
interface NavigationPreloadState {
|
||||
enabled?: boolean;
|
||||
headerValue?: string;
|
||||
}
|
||||
interface NavigationPreloadManager {
|
||||
disable(): Promise<void>;
|
||||
enable(): Promise<void>;
|
||||
getState(): Promise<NavigationPreloadState>;
|
||||
setHeaderValue(value: string): Promise<void>;
|
||||
}
|
||||
declare global {
|
||||
interface ServiceWorkerRegistration {
|
||||
readonly navigationPreload: NavigationPreloadManager;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* @module workbox-navigation-preload
|
||||
*/
|
||||
export { disable, enable, isSupported };
|
||||
15
frontend/node_modules/workbox-navigation-preload/index.js
generated
vendored
Normal file
15
frontend/node_modules/workbox-navigation-preload/index.js
generated
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
/*
|
||||
Copyright 2018 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.
|
||||
*/
|
||||
import { disable } from './disable.js';
|
||||
import { enable } from './enable.js';
|
||||
import { isSupported } from './isSupported.js';
|
||||
import './_version.js';
|
||||
/**
|
||||
* @module workbox-navigation-preload
|
||||
*/
|
||||
export { disable, enable, isSupported };
|
||||
1
frontend/node_modules/workbox-navigation-preload/index.mjs
generated
vendored
Normal file
1
frontend/node_modules/workbox-navigation-preload/index.mjs
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
export * from './index.js';
|
||||
9
frontend/node_modules/workbox-navigation-preload/isSupported.d.ts
generated
vendored
Normal file
9
frontend/node_modules/workbox-navigation-preload/isSupported.d.ts
generated
vendored
Normal file
@ -0,0 +1,9 @@
|
||||
import './_version.js';
|
||||
/**
|
||||
* @return {boolean} Whether or not the current browser supports enabling
|
||||
* navigation preload.
|
||||
*
|
||||
* @memberof workbox-navigation-preload
|
||||
*/
|
||||
declare function isSupported(): boolean;
|
||||
export { isSupported };
|
||||
18
frontend/node_modules/workbox-navigation-preload/isSupported.js
generated
vendored
Normal file
18
frontend/node_modules/workbox-navigation-preload/isSupported.js
generated
vendored
Normal file
@ -0,0 +1,18 @@
|
||||
/*
|
||||
Copyright 2018 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.
|
||||
*/
|
||||
import './_version.js';
|
||||
/**
|
||||
* @return {boolean} Whether or not the current browser supports enabling
|
||||
* navigation preload.
|
||||
*
|
||||
* @memberof workbox-navigation-preload
|
||||
*/
|
||||
function isSupported() {
|
||||
return Boolean(self.registration && self.registration.navigationPreload);
|
||||
}
|
||||
export { isSupported };
|
||||
1
frontend/node_modules/workbox-navigation-preload/isSupported.mjs
generated
vendored
Normal file
1
frontend/node_modules/workbox-navigation-preload/isSupported.mjs
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
export * from './isSupported.js';
|
||||
31
frontend/node_modules/workbox-navigation-preload/package.json
generated
vendored
Executable file
31
frontend/node_modules/workbox-navigation-preload/package.json
generated
vendored
Executable file
@ -0,0 +1,31 @@
|
||||
{
|
||||
"name": "workbox-navigation-preload",
|
||||
"version": "7.4.0",
|
||||
"license": "MIT",
|
||||
"author": "Google's Web DevRel Team and Google's Aurora Team",
|
||||
"description": "This library allows developers to opt-in to using Navigation Preload in their service worker.",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/googlechrome/workbox.git"
|
||||
},
|
||||
"bugs": "https://github.com/googlechrome/workbox/issues",
|
||||
"homepage": "https://github.com/GoogleChrome/workbox",
|
||||
"keywords": [
|
||||
"workbox",
|
||||
"workboxjs",
|
||||
"service worker",
|
||||
"sw",
|
||||
"navigation"
|
||||
],
|
||||
"workbox": {
|
||||
"browserNamespace": "workbox.navigationPreload",
|
||||
"packageType": "sw"
|
||||
},
|
||||
"main": "index.js",
|
||||
"module": "index.mjs",
|
||||
"types": "index.d.ts",
|
||||
"dependencies": {
|
||||
"workbox-core": "7.4.0"
|
||||
},
|
||||
"gitHead": "fa702feeddd417fcdfa495cd9428fb4a28632e92"
|
||||
}
|
||||
2
frontend/node_modules/workbox-navigation-preload/src/_version.ts
generated
vendored
Normal file
2
frontend/node_modules/workbox-navigation-preload/src/_version.ts
generated
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
// @ts-ignore
|
||||
try{self['workbox:navigation-preload:7.4.0']&&_()}catch(e){}
|
||||
39
frontend/node_modules/workbox-navigation-preload/src/disable.ts
generated
vendored
Normal file
39
frontend/node_modules/workbox-navigation-preload/src/disable.ts
generated
vendored
Normal file
@ -0,0 +1,39 @@
|
||||
/*
|
||||
Copyright 2018 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.
|
||||
*/
|
||||
|
||||
import {logger} from 'workbox-core/_private/logger.js';
|
||||
import {isSupported} from './isSupported.js';
|
||||
import './_version.js';
|
||||
|
||||
// Give TypeScript the correct global.
|
||||
declare let self: ServiceWorkerGlobalScope;
|
||||
|
||||
/**
|
||||
* If the browser supports Navigation Preload, then this will disable it.
|
||||
*
|
||||
* @memberof workbox-navigation-preload
|
||||
*/
|
||||
function disable(): void {
|
||||
if (isSupported()) {
|
||||
self.addEventListener('activate', (event: ExtendableEvent) => {
|
||||
event.waitUntil(
|
||||
self.registration.navigationPreload.disable().then(() => {
|
||||
if (process.env.NODE_ENV !== 'production') {
|
||||
logger.log(`Navigation preload is disabled.`);
|
||||
}
|
||||
}),
|
||||
);
|
||||
});
|
||||
} else {
|
||||
if (process.env.NODE_ENV !== 'production') {
|
||||
logger.log(`Navigation preload is not supported in this browser.`);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export {disable};
|
||||
51
frontend/node_modules/workbox-navigation-preload/src/enable.ts
generated
vendored
Normal file
51
frontend/node_modules/workbox-navigation-preload/src/enable.ts
generated
vendored
Normal file
@ -0,0 +1,51 @@
|
||||
/*
|
||||
Copyright 2018 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.
|
||||
*/
|
||||
|
||||
import {logger} from 'workbox-core/_private/logger.js';
|
||||
import {isSupported} from './isSupported.js';
|
||||
import './_version.js';
|
||||
|
||||
// Give TypeScript the correct global.
|
||||
declare let self: ServiceWorkerGlobalScope;
|
||||
|
||||
/**
|
||||
* If the browser supports Navigation Preload, then this will enable it.
|
||||
*
|
||||
* @param {string} [headerValue] Optionally, allows developers to
|
||||
* [override](https://developers.google.com/web/updates/2017/02/navigation-preload#changing_the_header)
|
||||
* the value of the `Service-Worker-Navigation-Preload` header which will be
|
||||
* sent to the server when making the navigation request.
|
||||
*
|
||||
* @memberof workbox-navigation-preload
|
||||
*/
|
||||
function enable(headerValue?: string): void {
|
||||
if (isSupported()) {
|
||||
self.addEventListener('activate', (event: ExtendableEvent) => {
|
||||
event.waitUntil(
|
||||
self.registration.navigationPreload.enable().then(() => {
|
||||
// Defaults to Service-Worker-Navigation-Preload: true if not set.
|
||||
if (headerValue) {
|
||||
void self.registration.navigationPreload.setHeaderValue(
|
||||
headerValue,
|
||||
);
|
||||
}
|
||||
|
||||
if (process.env.NODE_ENV !== 'production') {
|
||||
logger.log(`Navigation preload is enabled.`);
|
||||
}
|
||||
}),
|
||||
);
|
||||
});
|
||||
} else {
|
||||
if (process.env.NODE_ENV !== 'production') {
|
||||
logger.log(`Navigation preload is not supported in this browser.`);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export {enable};
|
||||
37
frontend/node_modules/workbox-navigation-preload/src/index.ts
generated
vendored
Normal file
37
frontend/node_modules/workbox-navigation-preload/src/index.ts
generated
vendored
Normal file
@ -0,0 +1,37 @@
|
||||
/*
|
||||
Copyright 2018 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.
|
||||
*/
|
||||
|
||||
import {disable} from './disable.js';
|
||||
import {enable} from './enable.js';
|
||||
import {isSupported} from './isSupported.js';
|
||||
import './_version.js';
|
||||
|
||||
// See https://github.com/GoogleChrome/workbox/issues/2946
|
||||
interface NavigationPreloadState {
|
||||
enabled?: boolean;
|
||||
headerValue?: string;
|
||||
}
|
||||
|
||||
interface NavigationPreloadManager {
|
||||
disable(): Promise<void>;
|
||||
enable(): Promise<void>;
|
||||
getState(): Promise<NavigationPreloadState>;
|
||||
setHeaderValue(value: string): Promise<void>;
|
||||
}
|
||||
|
||||
declare global {
|
||||
interface ServiceWorkerRegistration {
|
||||
readonly navigationPreload: NavigationPreloadManager;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @module workbox-navigation-preload
|
||||
*/
|
||||
|
||||
export {disable, enable, isSupported};
|
||||
24
frontend/node_modules/workbox-navigation-preload/src/isSupported.ts
generated
vendored
Normal file
24
frontend/node_modules/workbox-navigation-preload/src/isSupported.ts
generated
vendored
Normal file
@ -0,0 +1,24 @@
|
||||
/*
|
||||
Copyright 2018 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.
|
||||
*/
|
||||
|
||||
import './_version.js';
|
||||
|
||||
// Give TypeScript the correct global.
|
||||
declare let self: ServiceWorkerGlobalScope;
|
||||
|
||||
/**
|
||||
* @return {boolean} Whether or not the current browser supports enabling
|
||||
* navigation preload.
|
||||
*
|
||||
* @memberof workbox-navigation-preload
|
||||
*/
|
||||
function isSupported(): boolean {
|
||||
return Boolean(self.registration && self.registration.navigationPreload);
|
||||
}
|
||||
|
||||
export {isSupported};
|
||||
10
frontend/node_modules/workbox-navigation-preload/tsconfig.json
generated
vendored
Normal file
10
frontend/node_modules/workbox-navigation-preload/tsconfig.json
generated
vendored
Normal file
@ -0,0 +1,10 @@
|
||||
{
|
||||
"extends": "../../tsconfig",
|
||||
"compilerOptions": {
|
||||
"outDir": "./",
|
||||
"rootDir": "./src",
|
||||
"tsBuildInfoFile": "./tsconfig.tsbuildinfo"
|
||||
},
|
||||
"include": ["src/**/*.ts"],
|
||||
"references": [{"path": "../workbox-core/"}]
|
||||
}
|
||||
1
frontend/node_modules/workbox-navigation-preload/tsconfig.tsbuildinfo
generated
vendored
Normal file
1
frontend/node_modules/workbox-navigation-preload/tsconfig.tsbuildinfo
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user