v1.0 with SW PWA enabled
This commit is contained in:
19
frontend/node_modules/workbox-routing/utils/constants.d.ts
generated
vendored
Normal file
19
frontend/node_modules/workbox-routing/utils/constants.d.ts
generated
vendored
Normal file
@ -0,0 +1,19 @@
|
||||
import '../_version.js';
|
||||
export type HTTPMethod = 'DELETE' | 'GET' | 'HEAD' | 'PATCH' | 'POST' | 'PUT';
|
||||
/**
|
||||
* The default HTTP method, 'GET', used when there's no specific method
|
||||
* configured for a route.
|
||||
*
|
||||
* @type {string}
|
||||
*
|
||||
* @private
|
||||
*/
|
||||
export declare const defaultMethod: HTTPMethod;
|
||||
/**
|
||||
* The list of valid HTTP methods associated with requests that could be routed.
|
||||
*
|
||||
* @type {Array<string>}
|
||||
*
|
||||
* @private
|
||||
*/
|
||||
export declare const validMethods: HTTPMethod[];
|
||||
32
frontend/node_modules/workbox-routing/utils/constants.js
generated
vendored
Normal file
32
frontend/node_modules/workbox-routing/utils/constants.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 '../_version.js';
|
||||
/**
|
||||
* The default HTTP method, 'GET', used when there's no specific method
|
||||
* configured for a route.
|
||||
*
|
||||
* @type {string}
|
||||
*
|
||||
* @private
|
||||
*/
|
||||
export const defaultMethod = 'GET';
|
||||
/**
|
||||
* The list of valid HTTP methods associated with requests that could be routed.
|
||||
*
|
||||
* @type {Array<string>}
|
||||
*
|
||||
* @private
|
||||
*/
|
||||
export const validMethods = [
|
||||
'DELETE',
|
||||
'GET',
|
||||
'HEAD',
|
||||
'PATCH',
|
||||
'POST',
|
||||
'PUT',
|
||||
];
|
||||
1
frontend/node_modules/workbox-routing/utils/constants.mjs
generated
vendored
Normal file
1
frontend/node_modules/workbox-routing/utils/constants.mjs
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
export * from './constants.js';
|
||||
10
frontend/node_modules/workbox-routing/utils/getOrCreateDefaultRouter.d.ts
generated
vendored
Normal file
10
frontend/node_modules/workbox-routing/utils/getOrCreateDefaultRouter.d.ts
generated
vendored
Normal file
@ -0,0 +1,10 @@
|
||||
import { Router } from '../Router.js';
|
||||
import '../_version.js';
|
||||
/**
|
||||
* Creates a new, singleton Router instance if one does not exist. If one
|
||||
* does already exist, that instance is returned.
|
||||
*
|
||||
* @private
|
||||
* @return {Router}
|
||||
*/
|
||||
export declare const getOrCreateDefaultRouter: () => Router;
|
||||
26
frontend/node_modules/workbox-routing/utils/getOrCreateDefaultRouter.js
generated
vendored
Normal file
26
frontend/node_modules/workbox-routing/utils/getOrCreateDefaultRouter.js
generated
vendored
Normal file
@ -0,0 +1,26 @@
|
||||
/*
|
||||
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.
|
||||
*/
|
||||
import { Router } from '../Router.js';
|
||||
import '../_version.js';
|
||||
let defaultRouter;
|
||||
/**
|
||||
* Creates a new, singleton Router instance if one does not exist. If one
|
||||
* does already exist, that instance is returned.
|
||||
*
|
||||
* @private
|
||||
* @return {Router}
|
||||
*/
|
||||
export const getOrCreateDefaultRouter = () => {
|
||||
if (!defaultRouter) {
|
||||
defaultRouter = new Router();
|
||||
// The helpers that use the default Router assume these listeners exist.
|
||||
defaultRouter.addFetchListener();
|
||||
defaultRouter.addCacheListener();
|
||||
}
|
||||
return defaultRouter;
|
||||
};
|
||||
1
frontend/node_modules/workbox-routing/utils/getOrCreateDefaultRouter.mjs
generated
vendored
Normal file
1
frontend/node_modules/workbox-routing/utils/getOrCreateDefaultRouter.mjs
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
export * from './getOrCreateDefaultRouter.js';
|
||||
10
frontend/node_modules/workbox-routing/utils/normalizeHandler.d.ts
generated
vendored
Normal file
10
frontend/node_modules/workbox-routing/utils/normalizeHandler.d.ts
generated
vendored
Normal file
@ -0,0 +1,10 @@
|
||||
import { RouteHandler, RouteHandlerObject } from 'workbox-core/types.js';
|
||||
import '../_version.js';
|
||||
/**
|
||||
* @param {function()|Object} handler Either a function, or an object with a
|
||||
* 'handle' method.
|
||||
* @return {Object} An object with a handle method.
|
||||
*
|
||||
* @private
|
||||
*/
|
||||
export declare const normalizeHandler: (handler: RouteHandler) => RouteHandlerObject;
|
||||
40
frontend/node_modules/workbox-routing/utils/normalizeHandler.js
generated
vendored
Normal file
40
frontend/node_modules/workbox-routing/utils/normalizeHandler.js
generated
vendored
Normal file
@ -0,0 +1,40 @@
|
||||
/*
|
||||
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 { assert } from 'workbox-core/_private/assert.js';
|
||||
import '../_version.js';
|
||||
/**
|
||||
* @param {function()|Object} handler Either a function, or an object with a
|
||||
* 'handle' method.
|
||||
* @return {Object} An object with a handle method.
|
||||
*
|
||||
* @private
|
||||
*/
|
||||
export const normalizeHandler = (handler) => {
|
||||
if (handler && typeof handler === 'object') {
|
||||
if (process.env.NODE_ENV !== 'production') {
|
||||
assert.hasMethod(handler, 'handle', {
|
||||
moduleName: 'workbox-routing',
|
||||
className: 'Route',
|
||||
funcName: 'constructor',
|
||||
paramName: 'handler',
|
||||
});
|
||||
}
|
||||
return handler;
|
||||
}
|
||||
else {
|
||||
if (process.env.NODE_ENV !== 'production') {
|
||||
assert.isType(handler, 'function', {
|
||||
moduleName: 'workbox-routing',
|
||||
className: 'Route',
|
||||
funcName: 'constructor',
|
||||
paramName: 'handler',
|
||||
});
|
||||
}
|
||||
return { handle: handler };
|
||||
}
|
||||
};
|
||||
1
frontend/node_modules/workbox-routing/utils/normalizeHandler.mjs
generated
vendored
Normal file
1
frontend/node_modules/workbox-routing/utils/normalizeHandler.mjs
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
export * from './normalizeHandler.js';
|
||||
Reference in New Issue
Block a user