Skip to content

Commit

Permalink
Deploy to GitHub pages
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Aug 16, 2023
1 parent 066efd0 commit afe67e5
Show file tree
Hide file tree
Showing 15 changed files with 91,709 additions and 71,594 deletions.
2 changes: 1 addition & 1 deletion demo/.last_build_id
Original file line number Diff line number Diff line change
@@ -1 +1 @@
9768c4593ebcfce55abde80e22794e51
a4309e075ad9573e547aa885e2c5b342
Binary file added demo/assets/AssetManifest.bin
Binary file not shown.
30,369 changes: 23,371 additions & 6,998 deletions demo/assets/NOTICES

Large diffs are not rendered by default.

Binary file modified demo/assets/fonts/MaterialIcons-Regular.otf
Binary file not shown.
Binary file modified demo/assets/shaders/ink_sparkle.frag
Binary file not shown.
468 changes: 203 additions & 265 deletions demo/canvaskit/canvaskit.js

Large diffs are not rendered by default.

Binary file modified demo/canvaskit/canvaskit.wasm
Binary file not shown.
223 changes: 223 additions & 0 deletions demo/canvaskit/chromium/canvaskit.js

Large diffs are not rendered by default.

Binary file added demo/canvaskit/chromium/canvaskit.wasm
Binary file not shown.
153 changes: 153 additions & 0 deletions demo/canvaskit/skwasm.js

Large diffs are not rendered by default.

Binary file added demo/canvaskit/skwasm.wasm
Binary file not shown.
1 change: 1 addition & 0 deletions demo/canvaskit/skwasm.worker.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 12 additions & 5 deletions demo/flutter.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,7 @@ _flutter.loader = null;
*/
constructor(validPatterns, policyName = "flutter-js") {
const patterns = validPatterns || [
/\.dart\.js$/,
/^flutter_service_worker.js$/
/\.js$/,
];
if (window.trustedTypes) {
this.policy = trustedTypes.createPolicy(policyName, {
Expand Down Expand Up @@ -116,10 +115,19 @@ _flutter.loader = null;
* @returns {Promise} that resolves when the latest serviceWorker is ready.
*/
loadServiceWorker(settings) {
if (!("serviceWorker" in navigator) || settings == null) {
if (settings == null) {
// In the future, settings = null -> uninstall service worker?
console.debug("Null serviceWorker configuration. Skipping.");
return Promise.resolve();
}
if (!("serviceWorker" in navigator)) {
let errorMessage = "Service Worker API unavailable.";
if (!window.isSecureContext) {
errorMessage += "\nThe current context is NOT secure."
errorMessage += "\nRead more: https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts";
}
return Promise.reject(
new Error("Service worker not supported (or configured).")
new Error(errorMessage)
);
}
const {
Expand Down Expand Up @@ -373,4 +381,3 @@ _flutter.loader = null;

_flutter.loader = new FlutterLoader();
})();

48 changes: 25 additions & 23 deletions demo/flutter_service_worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,33 +2,36 @@
const MANIFEST = 'flutter-app-manifest';
const TEMP = 'flutter-temp-cache';
const CACHE_NAME = 'flutter-app-cache';
const RESOURCES = {
"favicon.png": "5dcef449791fa27946b3d35ad8803796",
"manifest.json": "962c0c9f48ce7b739f480352eafd2cf4",
"version.json": "66049a6dd288834c2c8f78adc8d70791",
"canvaskit/canvaskit.js": "97937cb4c2c2073c968525a3e08c86a3",
"canvaskit/canvaskit.wasm": "3de12d898ec208a5f31362cc00f09b9e",
"canvaskit/profiling/canvaskit.js": "c21852696bc1cc82e8894d851c01921a",
"canvaskit/profiling/canvaskit.wasm": "371bc4e204443b0d5e774d64a046eb99",
"flutter.js": "a85fcf6324d3c4d3ae3be1ae4931e9c5",
"assets/FontManifest.json": "7b2a36307916a9721811788013e65289",
"assets/NOTICES": "662a1b1e7174f516c680c1ce0948cb3d",
"assets/fonts/MaterialIcons-Regular.otf": "e7069dfd19b331be16bed984668fe080",

const RESOURCES = {"assets/fonts/MaterialIcons-Regular.otf": "7da06b2e1ca96e19646aa2c21977aab4",
"assets/AssetManifest.json": "99914b932bd37a50b983c5e7c90ae93b",
"assets/shaders/ink_sparkle.frag": "f8b80e740d33eb157090be4e995febdf",
"assets/AssetManifest.bin": "0b0a3415aad49b6e9bf965ff578614f9",
"assets/FontManifest.json": "7b2a36307916a9721811788013e65289",
"assets/NOTICES": "5f566012e2ed0f80a3ffc24a0ffe33e0",
"version.json": "66049a6dd288834c2c8f78adc8d70791",
"manifest.json": "962c0c9f48ce7b739f480352eafd2cf4",
"index.html": "1fb153674cf46987bf780e4dafeb7e5a",
"/": "1fb153674cf46987bf780e4dafeb7e5a",
"main.dart.js": "e584e7ee44468742a88029ce0e94781e",
"favicon.png": "5dcef449791fa27946b3d35ad8803796",
"flutter.js": "6fef97aeca90b426343ba6c5c9dc5d4a",
"icons/Icon-192.png": "ac9a721a12bbc803b44f645561ecb1e1",
"icons/Icon-512.png": "96e752610906ba2a93c65f8abe1645f1",
"icons/Icon-192.png": "ac9a721a12bbc803b44f645561ecb1e1"
};

"main.dart.js": "3f2a5718b5b320b2254593ec7bb3259d",
"canvaskit/canvaskit.wasm": "f48eaf57cada79163ec6dec7929486ea",
"canvaskit/skwasm.wasm": "6711032e17bf49924b2b001cef0d3ea3",
"canvaskit/canvaskit.js": "76f7d822f42397160c5dfc69cbc9b2de",
"canvaskit/skwasm.worker.js": "19659053a277272607529ef87acf9d8a",
"canvaskit/chromium/canvaskit.wasm": "fc18c3010856029414b70cae1afc5cd9",
"canvaskit/chromium/canvaskit.js": "8c8392ce4a4364cbb240aa09b5652e05",
"canvaskit/skwasm.js": "1df4d741f441fa1a4d10530ced463ef8"};
// The application shell files that are downloaded before a service worker can
// start.
const CORE = [
"main.dart.js",
const CORE = ["main.dart.js",
"index.html",
"assets/AssetManifest.json",
"assets/FontManifest.json"];

// During install, the TEMP cache is populated with the application shell files.
self.addEventListener("install", (event) => {
self.skipWaiting();
Expand All @@ -39,7 +42,6 @@ self.addEventListener("install", (event) => {
})
);
});

// During activate, the cache is populated with the temp files downloaded in
// install. If this service worker is upgrading from one with a saved
// MANIFEST, then use this to retain unchanged resource files.
Expand All @@ -61,6 +63,8 @@ self.addEventListener("activate", function(event) {
await caches.delete(TEMP);
// Save the manifest to make future upgrades efficient.
await manifestCache.put('manifest', new Response(JSON.stringify(RESOURCES)));
// Claim client to enable caching on first launch
self.clients.claim();
return;
}
var oldManifest = await manifest.json();
Expand All @@ -86,6 +90,8 @@ self.addEventListener("activate", function(event) {
await caches.delete(TEMP);
// Save the manifest to make future upgrades efficient.
await manifestCache.put('manifest', new Response(JSON.stringify(RESOURCES)));
// Claim client to enable caching on first launch
self.clients.claim();
return;
} catch (err) {
// On an unhandled exception the state of the cache cannot be guaranteed.
Expand All @@ -96,7 +102,6 @@ self.addEventListener("activate", function(event) {
}
}());
});

// The fetch handler redirects requests for RESOURCE files to the service
// worker cache.
self.addEventListener("fetch", (event) => {
Expand Down Expand Up @@ -136,7 +141,6 @@ self.addEventListener("fetch", (event) => {
})
);
});

self.addEventListener('message', (event) => {
// SkipWaiting can be used to immediately activate a waiting service worker.
// This will also require a page refresh triggered by the main worker.
Expand All @@ -149,7 +153,6 @@ self.addEventListener('message', (event) => {
return;
}
});

// Download offline will check the RESOURCES for all files not in the cache
// and populate them.
async function downloadOffline() {
Expand All @@ -170,7 +173,6 @@ async function downloadOffline() {
}
return contentCache.addAll(resources);
}

// Attempt to download the resource online before falling back to
// the offline cache.
function onlineFirst(event) {
Expand Down
Loading

0 comments on commit afe67e5

Please sign in to comment.