Compare commits
7 commits
t3chguy/re
...
develop
Author | SHA1 | Date | |
---|---|---|---|
|
7073fb2faf | ||
|
6e8f0f6f6d | ||
|
627377229c | ||
|
3153f8862a | ||
|
6efd8a4642 | ||
|
3080c97007 | ||
|
380ab17932 |
|
@ -10,15 +10,15 @@ module.exports = {
|
||||||
"last 2 Safari versions",
|
"last 2 Safari versions",
|
||||||
"last 2 Edge versions",
|
"last 2 Edge versions",
|
||||||
],
|
],
|
||||||
|
include: ["@babel/plugin-transform-class-properties"],
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
"@babel/preset-typescript",
|
["@babel/preset-typescript", { allowDeclareFields: true }],
|
||||||
"@babel/preset-react",
|
"@babel/preset-react",
|
||||||
],
|
],
|
||||||
plugins: [
|
plugins: [
|
||||||
"@babel/plugin-proposal-export-default-from",
|
"@babel/plugin-proposal-export-default-from",
|
||||||
"@babel/plugin-transform-numeric-separator",
|
"@babel/plugin-transform-numeric-separator",
|
||||||
"@babel/plugin-transform-class-properties",
|
|
||||||
"@babel/plugin-transform-object-rest-spread",
|
"@babel/plugin-transform-object-rest-spread",
|
||||||
"@babel/plugin-transform-optional-chaining",
|
"@babel/plugin-transform-optional-chaining",
|
||||||
"@babel/plugin-transform-nullish-coalescing-operator",
|
"@babel/plugin-transform-nullish-coalescing-operator",
|
||||||
|
|
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 32 KiB |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 3.2 KiB |
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 4 KiB |
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 3.9 KiB |
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 4.8 KiB |
Before Width: | Height: | Size: 434 B After Width: | Height: | Size: 770 B |
Before Width: | Height: | Size: 3.9 KiB After Width: | Height: | Size: 8.1 KiB |
Before Width: | Height: | Size: 629 B After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 732 B After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 4.5 KiB After Width: | Height: | Size: 9.2 KiB |
Before Width: | Height: | Size: 1 KiB After Width: | Height: | Size: 2.2 KiB |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 2.4 KiB |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 3 KiB |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 3.2 KiB |
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 3.9 KiB |
Before Width: | Height: | Size: 2 KiB After Width: | Height: | Size: 3.9 KiB |
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 4.7 KiB |
Before Width: | Height: | Size: 803 B After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 837 B After Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 974 B After Width: | Height: | Size: 2 KiB |
Before Width: | Height: | Size: 1 KiB After Width: | Height: | Size: 2.2 KiB |
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 4 KiB |
Before Width: | Height: | Size: 3.9 KiB After Width: | Height: | Size: 8.5 KiB |
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 4.4 KiB |
Before Width: | Height: | Size: 940 B After Width: | Height: | Size: 1.9 KiB |
|
@ -25,13 +25,13 @@ const serverSupportMap: {
|
||||||
};
|
};
|
||||||
} = {};
|
} = {};
|
||||||
|
|
||||||
self.addEventListener("install", (event) => {
|
global.addEventListener("install", (event) => {
|
||||||
// We skipWaiting() to update the service worker more frequently, particularly in development environments.
|
// We skipWaiting() to update the service worker more frequently, particularly in development environments.
|
||||||
// @ts-expect-error - service worker types are not available. See 'fetch' event handler.
|
// @ts-expect-error - service worker types are not available. See 'fetch' event handler.
|
||||||
event.waitUntil(skipWaiting());
|
event.waitUntil(skipWaiting());
|
||||||
});
|
});
|
||||||
|
|
||||||
self.addEventListener("activate", (event) => {
|
global.addEventListener("activate", (event) => {
|
||||||
// We force all clients to be under our control, immediately. This could be old tabs.
|
// We force all clients to be under our control, immediately. This could be old tabs.
|
||||||
// @ts-expect-error - service worker types are not available. See 'fetch' event handler.
|
// @ts-expect-error - service worker types are not available. See 'fetch' event handler.
|
||||||
event.waitUntil(clients.claim());
|
event.waitUntil(clients.claim());
|
||||||
|
@ -40,7 +40,7 @@ self.addEventListener("activate", (event) => {
|
||||||
// @ts-expect-error - the service worker types conflict with the DOM types available through TypeScript. Many hours
|
// @ts-expect-error - the service worker types conflict with the DOM types available through TypeScript. Many hours
|
||||||
// have been spent trying to convince the type system that there's no actual conflict, but it has yet to work. Instead
|
// have been spent trying to convince the type system that there's no actual conflict, but it has yet to work. Instead
|
||||||
// of trying to make it do the thing, we force-cast to something close enough where we can (and ignore errors otherwise).
|
// of trying to make it do the thing, we force-cast to something close enough where we can (and ignore errors otherwise).
|
||||||
self.addEventListener("fetch", (event: FetchEvent) => {
|
global.addEventListener("fetch", (event: FetchEvent) => {
|
||||||
// This is the authenticated media (MSC3916) check, proxying what was unauthenticated to the authenticated variants.
|
// This is the authenticated media (MSC3916) check, proxying what was unauthenticated to the authenticated variants.
|
||||||
|
|
||||||
if (event.request.method !== "GET") {
|
if (event.request.method !== "GET") {
|
||||||
|
@ -72,7 +72,7 @@ self.addEventListener("fetch", (event: FetchEvent) => {
|
||||||
|
|
||||||
// Locate our access token, and populate the fetchConfig with the authentication header.
|
// Locate our access token, and populate the fetchConfig with the authentication header.
|
||||||
// @ts-expect-error - service worker types are not available. See 'fetch' event handler.
|
// @ts-expect-error - service worker types are not available. See 'fetch' event handler.
|
||||||
const client = await self.clients.get(event.clientId);
|
const client = await global.clients.get(event.clientId);
|
||||||
accessToken = await getAccessToken(client);
|
accessToken = await getAccessToken(client);
|
||||||
|
|
||||||
// Update or populate the server support map using a (usually) authenticated `/versions` call.
|
// Update or populate the server support map using a (usually) authenticated `/versions` call.
|
||||||
|
@ -166,9 +166,9 @@ async function askClientForUserIdParams(client: unknown): Promise<{ userId: stri
|
||||||
if (event.data?.responseKey !== responseKey) return; // not for us
|
if (event.data?.responseKey !== responseKey) return; // not for us
|
||||||
clearTimeout(timeoutId); // do this as soon as possible, avoiding a race between resolve and reject.
|
clearTimeout(timeoutId); // do this as soon as possible, avoiding a race between resolve and reject.
|
||||||
resolve(event.data); // "unblock" the remainder of the thread, if that were such a thing in JavaScript.
|
resolve(event.data); // "unblock" the remainder of the thread, if that were such a thing in JavaScript.
|
||||||
self.removeEventListener("message", listener); // cleanup, since we're not going to do anything else.
|
global.removeEventListener("message", listener); // cleanup, since we're not going to do anything else.
|
||||||
};
|
};
|
||||||
self.addEventListener("message", listener);
|
global.addEventListener("message", listener);
|
||||||
|
|
||||||
// Ask the tab for the information we need. This is handled by WebPlatform.
|
// Ask the tab for the information we need. This is handled by WebPlatform.
|
||||||
(client as Window).postMessage({ responseKey, type: "userinfo" });
|
(client as Window).postMessage({ responseKey, type: "userinfo" });
|
||||||
|
|
|
@ -4,9 +4,10 @@
|
||||||
"emitDecoratorMetadata": false,
|
"emitDecoratorMetadata": false,
|
||||||
"resolveJsonModule": true,
|
"resolveJsonModule": true,
|
||||||
"esModuleInterop": true,
|
"esModuleInterop": true,
|
||||||
|
"useDefineForClassFields": true,
|
||||||
"module": "es2022",
|
"module": "es2022",
|
||||||
"moduleResolution": "node",
|
"moduleResolution": "node",
|
||||||
"target": "es2018",
|
"target": "es2022",
|
||||||
"noUnusedLocals": true,
|
"noUnusedLocals": true,
|
||||||
"sourceMap": false,
|
"sourceMap": false,
|
||||||
"outDir": "./lib",
|
"outDir": "./lib",
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
"jsx": "preserve",
|
"jsx": "preserve",
|
||||||
"declaration": false,
|
"declaration": false,
|
||||||
"outDir": "./lib/module_system",
|
"outDir": "./lib/module_system",
|
||||||
"lib": ["es2020"],
|
"lib": ["es2022"],
|
||||||
"types": ["node"]
|
"types": ["node"]
|
||||||
},
|
},
|
||||||
"include": ["./module_system/**/*.ts"]
|
"include": ["./module_system/**/*.ts"]
|
||||||
|
|
|
@ -714,8 +714,8 @@ module.exports = (env, argv) => {
|
||||||
sourcemaps: {
|
sourcemaps: {
|
||||||
paths: "./webapp/bundles/**",
|
paths: "./webapp/bundles/**",
|
||||||
},
|
},
|
||||||
errorHandler: (err, invokeErr, compilation) => {
|
errorHandler: (err) => {
|
||||||
compilation.warnings.push("Sentry CLI Plugin: " + err.message);
|
console.warn("Sentry CLI Plugin: " + err.message);
|
||||||
console.log(`::warning title=Sentry error::${err.message}`);
|
console.log(`::warning title=Sentry error::${err.message}`);
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
|
|