qcobjectsnewapp 2.4.33 → 2.4.36

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/VERSION CHANGED
@@ -1 +1 @@
1
- 2.4.33
1
+ 2.4.36
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "qcobjectsnewapp",
3
- "version": "2.4.33",
3
+ "version": "2.4.36",
4
4
  "description": "App template for New App in QCObjects",
5
5
  "targets": {
6
6
  "default": {
@@ -61,7 +61,7 @@
61
61
  "publish:electron": "qcobjects publish electron",
62
62
  "publish:esbuild": "npx esbuild build/js/*.js build/js/**/*.js --bundle --outdir=public/js --keep-names --minify --global-name=global --sourcemap",
63
63
  "publish:parcel": "npx parcel build",
64
- "publish:web": "npm run build:static && npm run build:ts && npm run publish:static && npm run publish:esbuild",
64
+ "publish:web": "npm run build:static && npm run build:ts && npm run publish:static && npm run publish:esbuild && npm run generate-sw",
65
65
  "publish:docker": "docker push qcobjects/qcobjects-newapp:latest",
66
66
  "deploy:docker": "npm run build:docker && npm run publish:docker",
67
67
  "docker-server": "docker run -p 8080:8080 -p 8443:8443 -d --name qcobjects-newapp qcobjects/qcobjects-newapp",
@@ -71,7 +71,8 @@
71
71
  "start:dev": "npm-watch start",
72
72
  "build:dev": "npm-watch build",
73
73
  "tree": "tree -d --gitignore",
74
- "lighthouse": "lighthouse https://127.0.0.1:8443/ --quiet --chrome-flags=\"--ignore-certificate-errors\" --budget-path=./lighthouse-budget.json --output html --output-path ./lighthouse/lighthouse-report.html --view"
74
+ "lighthouse": "lighthouse https://127.0.0.1:8443/ --quiet --chrome-flags=\"--ignore-certificate-errors\" --budget-path=./lighthouse-budget.json --output html --output-path ./lighthouse/lighthouse-report.html --view",
75
+ "generate-sw": "npx qcobjects generate-sw qcobjectsnewapp -d public"
75
76
  },
76
77
  "repository": {
77
78
  "type": "file",
@@ -115,7 +116,7 @@
115
116
  "npm-run-all": "^4.1.5",
116
117
  "parcel": "^2.8.3",
117
118
  "process": "^0.11.10",
118
- "qcobjects-cli": "^2.4.52",
119
+ "qcobjects-cli": "^2.4.53",
119
120
  "qcobjects-command-publish-static": "^1.0.2",
120
121
  "qcobjects-tsconfig": "^2.4.10",
121
122
  "semistandard": "^16.0.1",
@@ -127,9 +128,9 @@
127
128
  "grunt-contrib-jasmine": "^4.0.0",
128
129
  "npm-watch": "^0.11.0",
129
130
  "nyc": "^15.1.0",
130
- "qcobjects": "^2.4.89",
131
+ "qcobjects": "^2.4.93",
131
132
  "qcobjects-handler-hello-world": "^1.0.0",
132
- "qcobjects-sdk": "^2.4.59"
133
+ "qcobjects-sdk": "^2.4.60"
133
134
  },
134
135
  "engines": {
135
136
  "npm": ">=8",
package/src/sw.js CHANGED
@@ -1,6 +1,6 @@
1
1
  /**
2
- * QCObjects SDK 1.0
3
- * ________________
2
+ * QCObjects Framework
3
+ * ____________________________________
4
4
  *
5
5
  * Author: Jean Machuca <correojean@gmail.com>
6
6
  *
@@ -24,10 +24,67 @@
24
24
  */
25
25
  "use strict";
26
26
  // eslint-disable-next-line no-undef
27
- importScripts("./pwabuilder-sw.js");
28
- const version = "1.2.93";
27
+
28
+ /* eslint-disable no-undef */
29
+ // This is the service worker with the combined offline experience (Offline page + Offline copy of pages)
30
+
31
+ const CACHE = "qcobjectsnewapp-offline-page";
32
+
33
+ importScripts("https://storage.googleapis.com/workbox-cdn/releases/5.1.2/workbox-sw.js");
34
+
35
+ const offlineFallbackPage = "index-fallback.html";
36
+
37
+ self.addEventListener("message", (event) => {
38
+ if (event.data && event.data.type === "SKIP_WAITING") {
39
+ self.skipWaiting();
40
+ }
41
+ });
42
+
43
+ self.addEventListener("install", async (event) => {
44
+ event.waitUntil(
45
+ caches.open(CACHE)
46
+ .then((cache) => cache.add(offlineFallbackPage))
47
+ );
48
+ });
49
+
50
+ if (workbox.navigationPreload.isSupported()) {
51
+ workbox.navigationPreload.enable();
52
+ }
53
+
54
+ workbox.routing.registerRoute(
55
+ // eslint-disable-next-line prefer-regex-literals
56
+ new RegExp("/*"),
57
+ new workbox.strategies.StaleWhileRevalidate({
58
+ cacheName: CACHE
59
+ })
60
+ );
61
+
62
+ self.addEventListener("fetch", (event) => {
63
+ if (event.request.mode === "navigate") {
64
+ event.respondWith((async () => {
65
+ try {
66
+ const preloadResp = await event.preloadResponse;
67
+
68
+ if (preloadResp) {
69
+ return preloadResp;
70
+ }
71
+
72
+ const networkResp = await fetch(event.request);
73
+ return networkResp;
74
+ } catch (error) {
75
+
76
+ const cache = await caches.open(CACHE);
77
+ const cachedResp = await cache.match(offlineFallbackPage);
78
+ return cachedResp;
79
+ }
80
+ })());
81
+ }
82
+ });
83
+
84
+
85
+ const version = "1.0.0";
29
86
  const appName = "qcobjectsnewapp";
30
- const cacheSufix = (Math.round(Date.now() / (1000 * 3600))).toString(); // 1 hour
87
+ const cacheSufix = (Math.round(Date.now()/(1000*3600))).toString(); // 1 hour
31
88
  const cacheName = `qcobjects-app-${appName}-${version}-${cacheSufix}`;
32
89
  const startUrl = "/?homescreen=1";
33
90
  caches.delete(cacheName); // force to reload cache for the first time the sw is loaded
@@ -35,121 +92,137 @@ self.addEventListener("install", e => {
35
92
  e.waitUntil(
36
93
  caches.open(cacheName).then(cache => {
37
94
  return cache.addAll([`${startUrl}`,
38
- "/",
39
- "Dockerfile",
40
- "LICENSE.txt",
41
- "README.md",
42
- "VERSION",
43
- "app.js",
44
- "coverage/lcov-report/base.css",
45
- "coverage/lcov-report/block-navigation.js",
46
- "coverage/lcov-report/favicon.png",
47
- "coverage/lcov-report/index.html",
48
- "coverage/lcov-report/prettify.css",
49
- "coverage/lcov-report/prettify.js",
50
- "coverage/lcov-report/sort-arrow-sprite.png",
51
- "coverage/lcov-report/sorter.js",
52
- "coverage/lcov-report/testsSpec.js.html",
53
- "coverage/lcov.info",
54
- "css/components/button.css",
55
- "css/components/card.css",
56
- "css/components/hero/hero-call-to-action.css",
57
- "css/components/hero/hero-overlay.css",
58
- "css/components/hero/hero-two-column-form.css",
59
- "css/components/modal.css",
60
- "css/desktop/container.css",
61
- "css/desktop/content.css",
62
- "css/desktop/footer.css",
63
- "css/desktop/index.css",
64
- "css/desktop/navbar.css",
65
- "css/desktop/sidebar.css",
66
- "css/index.css",
67
- "css/mobile/content.css",
68
- "css/mobile/footer.css",
69
- "css/mobile/index.css",
70
- "css/mobile/navbar.css",
71
- "css/mobile/sidebar.css",
72
- "css/modern-base.css",
73
- "css/theme/basic/style.css",
74
- "css/theme/cyan/style.css",
75
- "css/theme/redlight/style.css",
76
- "css/theme/xtra/style.css",
77
- "favicon.ico",
78
- "humans.txt",
79
- "img/Q_web copy.png",
80
- "img/Q_web-white.png",
81
- "img/Q_web.png",
82
- "img/Q_web.svg",
83
- "img/icons/icon-128x128.png",
84
- "img/icons/icon-144x144.png",
85
- "img/icons/icon-152x152.png",
86
- "img/icons/icon-192x192.png",
87
- "img/icons/icon-384x384.png",
88
- "img/icons/icon-512x512.png",
89
- "img/icons/icon-72x72.png",
90
- "img/icons/icon-96x96.png",
91
- "img/logo-qcobjects-white-powered-quickcorp.svg",
92
- "img/logo-qcobjects-white.svg",
93
- "img/logo.png",
94
- "img/placeholder.svg",
95
- "img/screenshots/screenshot1.png",
96
- "img/screenshots/screenshot1.webp",
97
- "img/screenshots/screenshot2.png",
98
- "img/screenshots/screenshot2.webp",
99
- "index.html",
100
- "js/init.js",
101
- "js/packages/com.qcobjects.installer.js",
102
- "js/packages/org.quickcorp.custom.components.js",
103
- "js/packages/org.quickcorp.custom.controllers.js",
104
- "js/packages/org.quickcorp.custom.effects.js",
105
- "js/packages/org.quickcorp.custom.js",
106
- "js/packages/org.quickcorp.custom.models.js",
107
- "js/packages/org.quickcorp.custom.views.js",
108
- "manifest.json",
109
- "qcobjectsnewapp.iml",
110
- "robots.txt",
111
- "spec/support/jasmine.json",
112
- "spec/testsSpec.js",
113
- "templates/components/article1.tpl.html",
114
- "templates/components/article2.tpl.html",
115
- "templates/components/article3.tpl.html",
116
- "templates/components/article4.tpl.html",
117
- "templates/components/blank.tpl.html",
118
- "templates/components/card.tpl.html",
119
- "templates/components/contentblock.tpl.html",
120
- "templates/components/footer.tpl.html",
121
- "templates/components/footer2.tpl.html",
122
- "templates/components/header.tpl.html",
123
- "templates/components/hero/hero-call-to-action.tpl.html",
124
- "templates/components/hero/hero-overlay.tpl.html",
125
- "templates/components/hero/hero-two-column-form.tpl.html",
126
- "templates/components/install-button.tpl.html",
127
- "templates/components/layout-basic.tpl.html",
128
- "templates/components/loading.tpl.html",
129
- "templates/components/loadingfooter.tpl.html",
130
- "templates/components/login-button.tpl.html",
131
- "templates/components/login2.tpl.html",
132
- "templates/components/loginform.tpl.html",
133
- "templates/components/modal.tpl.html",
134
- "templates/components/nav.tpl.html",
135
- "templates/components/pages/page1.tpl.html",
136
- "templates/components/pages/page2.tpl.html",
137
- "templates/components/pages/page3.tpl.html",
138
- "templates/components/product.tpl.html",
139
- "templates/components/profile.tpl.html",
140
- "templates/components/section1.tpl.html",
141
- "templates/components/section2.tpl.html",
142
- "templates/components/shadowed-card.tpl.html",
143
- "templates/components/signin-button.tpl.html",
144
- "templates/components/signup-form.tpl.html",
145
- "templates/components/signup.tpl.html",
146
- "templates/components/signupbuttons.tpl.html",
147
- "templates/components/signupform.tpl.html",
148
- "templates/components/signuppage.tpl.html",
149
- "templates/components/signupsuccessful.tpl.html",
150
- "templates/components/signupsuccessfulfooter.tpl.html",
151
- "templates/components/splashscreen.tpl.html",
152
- "templates/components/topmenu.tpl.html"])
95
+ "/",
96
+ "404.html",
97
+ "_redirects",
98
+ "css/body-layout.css",
99
+ "css/components/button.css",
100
+ "css/components/card.css",
101
+ "css/components/hero/hero-call-to-action.css",
102
+ "css/components/hero/hero-overlay.css",
103
+ "css/components/hero/hero-two-column-form.css",
104
+ "css/components/modal.css",
105
+ "css/desktop/components/deploy-grid.css",
106
+ "css/desktop/components/github-grid.css",
107
+ "css/desktop/container.css",
108
+ "css/desktop/content.css",
109
+ "css/desktop/footer.css",
110
+ "css/desktop/index.css",
111
+ "css/desktop/navbar.css",
112
+ "css/desktop/sidebar.css",
113
+ "css/index.css",
114
+ "css/mobile/components/deploy-grid.css",
115
+ "css/mobile/components/github-grid.css",
116
+ "css/mobile/content.css",
117
+ "css/mobile/footer.css",
118
+ "css/mobile/index.css",
119
+ "css/mobile/navbar.css",
120
+ "css/mobile/sidebar.css",
121
+ "css/modern-base.css",
122
+ "css/theme/basic/style.css",
123
+ "css/theme/cyan/style.css",
124
+ "css/theme/redlight/style.css",
125
+ "css/theme/xtra/style.css",
126
+ "favicon.ico",
127
+ "humans.txt",
128
+ "img/Q_web copy.png",
129
+ "img/Q_web-white.png",
130
+ "img/Q_web.png",
131
+ "img/Q_web.svg",
132
+ "img/awsmplogo3.svg",
133
+ "img/icons/icon-128x128.png",
134
+ "img/icons/icon-144x144.png",
135
+ "img/icons/icon-152x152.png",
136
+ "img/icons/icon-192x192.png",
137
+ "img/icons/icon-384x384.png",
138
+ "img/icons/icon-512x512.png",
139
+ "img/icons/icon-72x72.png",
140
+ "img/icons/icon-96x96.png",
141
+ "img/logo-qcobjects-version.svg",
142
+ "img/logo-qcobjects-white-powered-quickcorp.svg",
143
+ "img/logo-qcobjects-white.svg",
144
+ "img/logo.png",
145
+ "img/netlify-button.svg",
146
+ "img/octocat.svg",
147
+ "img/placeholder.svg",
148
+ "img/screenshots/screenshot1.png",
149
+ "img/screenshots/screenshot1.webp",
150
+ "img/screenshots/screenshot2.png",
151
+ "img/screenshots/screenshot2.webp",
152
+ "index-fallback.html",
153
+ "index.html",
154
+ "js/config.d.ts",
155
+ "js/config.ts",
156
+ "js/customWidgets.d.ts",
157
+ "js/customWidgets.ts",
158
+ "js/init.d.ts",
159
+ "js/init.ts",
160
+ "js/packages/com.qcobjects.installer.d.ts",
161
+ "js/packages/com.qcobjects.installer.ts",
162
+ "js/packages/com.qcobjects.services.github.d.ts",
163
+ "js/packages/com.qcobjects.services.github.ts",
164
+ "js/packages/org.quickcorp.custom.components.d.ts",
165
+ "js/packages/org.quickcorp.custom.components.ts",
166
+ "js/packages/org.quickcorp.custom.controllers.d.ts",
167
+ "js/packages/org.quickcorp.custom.controllers.ts",
168
+ "js/packages/org.quickcorp.custom.d.ts",
169
+ "js/packages/org.quickcorp.custom.effects.d.ts",
170
+ "js/packages/org.quickcorp.custom.effects.ts",
171
+ "js/packages/org.quickcorp.custom.models.d.ts",
172
+ "js/packages/org.quickcorp.custom.models.ts",
173
+ "js/packages/org.quickcorp.custom.ts",
174
+ "js/packages/org.quickcorp.custom.views.d.ts",
175
+ "js/packages/org.quickcorp.custom.views.ts",
176
+ "manifest.json",
177
+ "robots.txt",
178
+ "templates/components/article1.tpl.html",
179
+ "templates/components/article2.tpl.html",
180
+ "templates/components/aws-button.tpl.html",
181
+ "templates/components/blank.tpl.html",
182
+ "templates/components/card.tpl.html",
183
+ "templates/components/codespaces-button.tpl.html",
184
+ "templates/components/contentblock.tpl.html",
185
+ "templates/components/footer.tpl.html",
186
+ "templates/components/footer2.tpl.html",
187
+ "templates/components/github-button.tpl.html",
188
+ "templates/components/github-card.tpl.html",
189
+ "templates/components/gitpod-button.tpl.html",
190
+ "templates/components/header.tpl.html",
191
+ "templates/components/hero/hero-call-to-action.tpl.html",
192
+ "templates/components/hero/hero-overlay.tpl.html",
193
+ "templates/components/hero/hero-two-column-form.tpl.html",
194
+ "templates/components/install-button.tpl.html",
195
+ "templates/components/layout-basic.tpl.html",
196
+ "templates/components/loading.tpl.html",
197
+ "templates/components/loadingfooter.tpl.html",
198
+ "templates/components/login-button.tpl.html",
199
+ "templates/components/login2.tpl.html",
200
+ "templates/components/loginform.tpl.html",
201
+ "templates/components/modal.tpl.html",
202
+ "templates/components/nav.tpl.html",
203
+ "templates/components/netlify-button.tpl.html",
204
+ "templates/components/octocat-icon.tpl.html",
205
+ "templates/components/pages/about-of.tpl.html",
206
+ "templates/components/pages/author.tpl.html",
207
+ "templates/components/pages/page1.tpl.html",
208
+ "templates/components/pages/page2.tpl.html",
209
+ "templates/components/pages/page3.tpl.html",
210
+ "templates/components/pages/qcobjects-forks-stars.tpl.html",
211
+ "templates/components/product.tpl.html",
212
+ "templates/components/profile.tpl.html",
213
+ "templates/components/section1.tpl.html",
214
+ "templates/components/section2.tpl.html",
215
+ "templates/components/shadowed-card.tpl.html",
216
+ "templates/components/signin-button.tpl.html",
217
+ "templates/components/signup-form.tpl.html",
218
+ "templates/components/signup.tpl.html",
219
+ "templates/components/signupbuttons.tpl.html",
220
+ "templates/components/signupform.tpl.html",
221
+ "templates/components/signuppage.tpl.html",
222
+ "templates/components/signupsuccessful.tpl.html",
223
+ "templates/components/signupsuccessfulfooter.tpl.html",
224
+ "templates/components/splashscreen.tpl.html",
225
+ "templates/components/topmenu.tpl.html"])
153
226
  .then(() => self.skipWaiting());
154
227
  })
155
228
  );
@@ -1,55 +0,0 @@
1
- /* eslint-disable no-undef */
2
- // This is the service worker with the combined offline experience (Offline page + Offline copy of pages)
3
-
4
- const CACHE = "qcobjectsnewapp-offline-page";
5
-
6
- importScripts("https://storage.googleapis.com/workbox-cdn/releases/5.1.2/workbox-sw.js");
7
-
8
- const offlineFallbackPage = "index-fallback.html";
9
-
10
- self.addEventListener("message", (event) => {
11
- if (event.data && event.data.type === "SKIP_WAITING") {
12
- self.skipWaiting();
13
- }
14
- });
15
-
16
- self.addEventListener("install", async (event) => {
17
- event.waitUntil(
18
- caches.open(CACHE)
19
- .then((cache) => cache.add(offlineFallbackPage))
20
- );
21
- });
22
-
23
- if (workbox.navigationPreload.isSupported()) {
24
- workbox.navigationPreload.enable();
25
- }
26
-
27
- workbox.routing.registerRoute(
28
- // eslint-disable-next-line prefer-regex-literals
29
- new RegExp("/*"),
30
- new workbox.strategies.StaleWhileRevalidate({
31
- cacheName: CACHE
32
- })
33
- );
34
-
35
- self.addEventListener("fetch", (event) => {
36
- if (event.request.mode === "navigate") {
37
- event.respondWith((async () => {
38
- try {
39
- const preloadResp = await event.preloadResponse;
40
-
41
- if (preloadResp) {
42
- return preloadResp;
43
- }
44
-
45
- const networkResp = await fetch(event.request);
46
- return networkResp;
47
- } catch (error) {
48
-
49
- const cache = await caches.open(CACHE);
50
- const cachedResp = await cache.match(offlineFallbackPage);
51
- return cachedResp;
52
- }
53
- })());
54
- }
55
- });