@bbki.ng/site 1.1.4 → 1.1.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # @bbki.ng/site
2
2
 
3
+ ## 1.1.6
4
+
5
+ ## 1.1.5
6
+
3
7
  ## 1.1.4
4
8
 
5
9
  ## 1.1.3
package/dev-dist/sw.js ADDED
@@ -0,0 +1,128 @@
1
+ /**
2
+ * Copyright 2018 Google Inc. All Rights Reserved.
3
+ * Licensed under the Apache License, Version 2.0 (the "License");
4
+ * you may not use this file except in compliance with the License.
5
+ * You may obtain a copy of the License at
6
+ * http://www.apache.org/licenses/LICENSE-2.0
7
+ * Unless required by applicable law or agreed to in writing, software
8
+ * distributed under the License is distributed on an "AS IS" BASIS,
9
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10
+ * See the License for the specific language governing permissions and
11
+ * limitations under the License.
12
+ */
13
+
14
+ // If the loader is already loaded, just stop.
15
+ if (!self.define) {
16
+ let registry = {};
17
+
18
+ // Used for `eval` and `importScripts` where we can't get script URL by other means.
19
+ // In both cases, it's safe to use a global var because those functions are synchronous.
20
+ let nextDefineUri;
21
+
22
+ const singleRequire = (uri, parentUri) => {
23
+ uri = new URL(uri + ".js", parentUri).href;
24
+ return (
25
+ registry[uri] ||
26
+ new Promise((resolve) => {
27
+ if ("document" in self) {
28
+ const script = document.createElement("script");
29
+ script.src = uri;
30
+ script.onload = resolve;
31
+ document.head.appendChild(script);
32
+ } else {
33
+ nextDefineUri = uri;
34
+ importScripts(uri);
35
+ resolve();
36
+ }
37
+ }).then(() => {
38
+ let promise = registry[uri];
39
+ if (!promise) {
40
+ throw new Error(`Module ${uri} didn’t register its module`);
41
+ }
42
+ return promise;
43
+ })
44
+ );
45
+ };
46
+
47
+ self.define = (depsNames, factory) => {
48
+ const uri =
49
+ nextDefineUri ||
50
+ ("document" in self ? document.currentScript.src : "") ||
51
+ location.href;
52
+ if (registry[uri]) {
53
+ // Module is already loading or loaded.
54
+ return;
55
+ }
56
+ let exports = {};
57
+ const require = (depUri) => singleRequire(depUri, uri);
58
+ const specialDeps = {
59
+ module: { uri },
60
+ exports,
61
+ require,
62
+ };
63
+ registry[uri] = Promise.all(
64
+ depsNames.map((depName) => specialDeps[depName] || require(depName))
65
+ ).then((deps) => {
66
+ factory(...deps);
67
+ return exports;
68
+ });
69
+ };
70
+ }
71
+ define(["./workbox-baccbcc1"], function (workbox) {
72
+ "use strict";
73
+
74
+ /**
75
+ * Welcome to your Workbox-powered service worker!
76
+ *
77
+ * You'll need to register this file in your web app.
78
+ * See https://goo.gl/nhQhGp
79
+ *
80
+ * The rest of the code is auto-generated. Please don't update this file
81
+ * directly; instead, make changes to your Workbox build configuration
82
+ * and re-run your build process.
83
+ * See https://goo.gl/2aRDsh
84
+ */
85
+
86
+ self.addEventListener("message", (event) => {
87
+ if (event.data && event.data.type === "SKIP_WAITING") {
88
+ self.skipWaiting();
89
+ }
90
+ });
91
+ /**
92
+ * The precacheAndRoute() method efficiently caches and responds to
93
+ * requests for URLs in the manifest.
94
+ * See https://goo.gl/S9QRab
95
+ */
96
+
97
+ workbox.precacheAndRoute(
98
+ [
99
+ {
100
+ url: "index.html",
101
+ revision: "0.5299a0oa4co",
102
+ },
103
+ ],
104
+ {}
105
+ );
106
+ workbox.cleanupOutdatedCaches();
107
+ workbox.registerRoute(
108
+ new workbox.NavigationRoute(workbox.createHandlerBoundToURL("index.html"), {
109
+ allowlist: [/^\/$/],
110
+ })
111
+ );
112
+ workbox.registerRoute(
113
+ /^https:\/\/zjh-im-res\.oss-cn-shenzhen\.aliyuncs\.com\/.*/i,
114
+ new workbox.CacheFirst({
115
+ cacheName: "oss-resource-cache",
116
+ plugins: [
117
+ new workbox.ExpirationPlugin({
118
+ maxEntries: 100,
119
+ maxAgeSeconds: 31536000,
120
+ }),
121
+ new workbox.CacheableResponsePlugin({
122
+ statuses: [0, 200],
123
+ }),
124
+ ],
125
+ }),
126
+ "GET"
127
+ );
128
+ });