This is an automated email from the ASF dual-hosted git repository.

sunyi pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/apisix-dashboard.git


The following commit(s) were added to refs/heads/master by this push:
     new 517e482  chore: remove service worker (#1758)
517e482 is described below

commit 517e4824c32f221370222ebf5027505bf0588ac7
Author: 琚致远 <[email protected]>
AuthorDate: Tue Apr 13 16:33:21 2021 +0800

    chore: remove service worker (#1758)
---
 .actions/ASF-Release.cfg  |  1 -
 web/src/service-worker.js | 93 -----------------------------------------------
 2 files changed, 94 deletions(-)

diff --git a/.actions/ASF-Release.cfg b/.actions/ASF-Release.cfg
index 00d08fd..341e221 100644
--- a/.actions/ASF-Release.cfg
+++ b/.actions/ASF-Release.cfg
@@ -77,7 +77,6 @@ web/src/components/RightContent
 web/src/e2e/__mocks__/antd-pro-merge-less.js
 web/src/e2e/baseLayout.e2e.js
 web/src/pages/404.tsx
-web/src/service-worker.js
 web/src/libs/iconfont.js
 api/build-tools/json.lua
 
diff --git a/web/src/service-worker.js b/web/src/service-worker.js
deleted file mode 100644
index d99e1cf..0000000
--- a/web/src/service-worker.js
+++ /dev/null
@@ -1,93 +0,0 @@
-/*
-* MIT License
-
-* Copyright (c) 2019 Alipay.inc
-
-* 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.
-*/
-/* eslint-disable eslint-comments/disable-enable-pair */
-/* eslint-disable no-restricted-globals */
-/* eslint-disable no-underscore-dangle */
-/* globals workbox */
-workbox.core.setCacheNameDetails({
-  prefix: 'antd-pro',
-  suffix: 'v1',
-});
-// Control all opened tabs ASAP
-workbox.clientsClaim();
-
-/**
- * Use precaching list generated by workbox in build process.
- * 
https://developers.google.com/web/tools/workbox/reference-docs/latest/workbox.precaching
- */
-workbox.precaching.precacheAndRoute(self.__precacheManifest || []);
-
-/**
- * Register a navigation route.
- * 
https://developers.google.com/web/tools/workbox/modules/workbox-routing#how_to_register_a_navigation_route
- */
-workbox.routing.registerNavigationRoute('/index.html');
-
-/**
- * Use runtime cache:
- * 
https://developers.google.com/web/tools/workbox/reference-docs/latest/workbox.routing#.registerRoute
- *
- * Workbox provides all common caching strategies including CacheFirst, 
NetworkFirst etc.
- * 
https://developers.google.com/web/tools/workbox/reference-docs/latest/workbox.strategies
- */
-
-/**
- * Handle API requests
- */
-workbox.routing.registerRoute(/\/api\//, workbox.strategies.networkFirst());
-
-/**
- * Handle third party requests
- */
-workbox.routing.registerRoute(
-  /^https:\/\/gw.alipayobjects.com\//,
-  workbox.strategies.networkFirst(),
-);
-workbox.routing.registerRoute(
-  /^https:\/\/cdnjs.cloudflare.com\//,
-  workbox.strategies.networkFirst(),
-);
-workbox.routing.registerRoute(/\/color.less/, 
workbox.strategies.networkFirst());
-
-/**
- * Response to client after skipping waiting with MessageChannel
- */
-addEventListener('message', (event) => {
-  const replyPort = event.ports[0];
-  const message = event.data;
-  if (replyPort && message && message.type === 'skip-waiting') {
-    event.waitUntil(
-      self.skipWaiting().then(
-        () =>
-          replyPort.postMessage({
-            error: null,
-          }),
-        (error) =>
-          replyPort.postMessage({
-            error,
-          }),
-      ),
-    );
-  }
-});

Reply via email to