Skip to content

Commit ec622a2

Browse files
committed
fix: PWAキャッシュ更新のためクライアントバージョンをv8に、キャッシュ名をv11にインクリメント
1 parent 52f2f53 commit ec622a2

4 files changed

Lines changed: 10 additions & 10 deletions

File tree

public/sw.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const CACHE_NAME = "launcherg-pwa-shell-mobile-pwa-v10";
1+
const CACHE_NAME = "launcherg-pwa-shell-mobile-pwa-v11";
22
const PRECACHE_ASSETS = Array.isArray(self.__LAUNCHERG_PWA_ASSETS__)
33
? self.__LAUNCHERG_PWA_ASSETS__
44
: [];

src/lib/mobileCompanionInstall.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import {
88
describe("createMobileCompanionInstallStartUrl", () => {
99
it("keeps the room in the installed launch URL", () => {
1010
const query = new URLSearchParams({
11-
client: "mobile-pwa-v7",
11+
client: "mobile-pwa-v8",
1212
mode: "library",
1313
roomId: "room-1",
1414
gameId: "42",
@@ -21,7 +21,7 @@ describe("createMobileCompanionInstallStartUrl", () => {
2121
query,
2222
),
2323
).toBe(
24-
"https://example.test/Launcherg-Mod/#/companion?client=mobile-pwa-v7&mode=library&roomId=room-1&gameId=42&authToken=short-lived-token",
24+
"https://example.test/Launcherg-Mod/#/companion?client=mobile-pwa-v8&mode=library&roomId=room-1&gameId=42&authToken=short-lived-token",
2525
);
2626
});
2727

@@ -84,15 +84,15 @@ describe("configureMobileCompanionInstallManifest", () => {
8484
const link = document.querySelector<HTMLLinkElement>('link[rel="manifest"]');
8585

8686
expect(startUrl).toBe(
87-
"https://example.test/Launcherg-Mod/#/companion?client=mobile-pwa-v7&mode=controller&roomId=room-1&authToken=short-lived-token",
87+
"https://example.test/Launcherg-Mod/#/companion?client=mobile-pwa-v8&mode=controller&roomId=room-1&authToken=short-lived-token",
8888
);
8989
expect(link?.href).toContain("data:application/manifest+json");
9090
expect(link?.dataset.launchergDynamicCompanionManifest).toBe("true");
9191
const manifest = JSON.parse(
9292
decodeURIComponent(link?.href.split(",")[1] ?? ""),
9393
);
9494
expect(manifest.start_url).toBe(
95-
"https://example.test/Launcherg-Mod/#/companion?client=mobile-pwa-v7&mode=controller&roomId=room-1&authToken=short-lived-token",
95+
"https://example.test/Launcherg-Mod/#/companion?client=mobile-pwa-v8&mode=controller&roomId=room-1&authToken=short-lived-token",
9696
);
9797
});
9898
});

src/lib/mobileCompanionUrl.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ describe("createMobileCompanionUrl", () => {
99
});
1010

1111
expect(url).toBe(
12-
"https://example.test/companion.html?client=mobile-pwa-v7&mode=controller&roomId=room-1",
12+
"https://example.test/companion.html?client=mobile-pwa-v8&mode=controller&roomId=room-1",
1313
);
1414
});
1515

@@ -20,7 +20,7 @@ describe("createMobileCompanionUrl", () => {
2020
});
2121

2222
expect(url).toBe(
23-
"https://example.test/Launcherg-Mod/companion.html?client=mobile-pwa-v7&mode=controller&roomId=room-1",
23+
"https://example.test/Launcherg-Mod/companion.html?client=mobile-pwa-v8&mode=controller&roomId=room-1",
2424
);
2525
});
2626

@@ -34,7 +34,7 @@ describe("createMobileCompanionUrl", () => {
3434
});
3535

3636
expect(url).toBe(
37-
"https://example.test/companion.html?client=mobile-pwa-v7&mode=controller&roomId=room-1&gameId=42&seiyaUrl=https%3A%2F%2Fseiya.example%2Fgame%3Fid%3D42&authToken=token-1",
37+
"https://example.test/companion.html?client=mobile-pwa-v8&mode=controller&roomId=room-1&gameId=42&seiyaUrl=https%3A%2F%2Fseiya.example%2Fgame%3Fid%3D42&authToken=token-1",
3838
);
3939
});
4040

@@ -46,7 +46,7 @@ describe("createMobileCompanionUrl", () => {
4646
});
4747

4848
expect(url).toBe(
49-
"https://example.test/companion.html?client=mobile-pwa-v7&mode=library&roomId=room-1",
49+
"https://example.test/companion.html?client=mobile-pwa-v8&mode=library&roomId=room-1",
5050
);
5151
});
5252
});

src/lib/mobileCompanionUrl.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ const configuredMobileCompanionOrigin =
33

44
export const MOBILE_COMPANION_ORIGIN =
55
configuredMobileCompanionOrigin || "https://nnnsmm.github.io/Launcherg-Mod/";
6-
export const MOBILE_COMPANION_CLIENT_VERSION = "mobile-pwa-v7";
6+
export const MOBILE_COMPANION_CLIENT_VERSION = "mobile-pwa-v8";
77
export const SKYWAY_CONNECT_ENDPOINT = "https://launcherg.ryoha.moe/connect";
88

99
export type MobileCompanionUrlParams = {

0 commit comments

Comments
 (0)