Skip to content

Commit 296fae3

Browse files
committed
fix(ci): restore web push migration lint
1 parent 0471b29 commit 296fae3

1 file changed

Lines changed: 5 additions & 15 deletions

File tree

src/infra/state-migrations.web-push.ts

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
// Doctor-only import for the retired Web Push JSON stores.
21
import { createHash } from "node:crypto";
32
import fs from "node:fs";
43
import path from "node:path";
@@ -51,14 +50,10 @@ type ParsedLegacyState = {
5150
snapshots: LegacySourceSnapshot[];
5251
};
5352

54-
function resolveLegacyWebPushPaths(stateDir: string): {
55-
subscriptionsPath: string;
56-
vapidKeysPath: string;
57-
} {
58-
const pushDir = path.join(stateDir, "push");
53+
function resolveLegacyWebPushPaths(stateDir: string) {
5954
return {
60-
subscriptionsPath: path.join(pushDir, "web-push-subscriptions.json"),
61-
vapidKeysPath: path.join(pushDir, "vapid-keys.json"),
55+
subscriptionsPath: path.join(stateDir, "push", "web-push-subscriptions.json"),
56+
vapidKeysPath: path.join(stateDir, "push", "vapid-keys.json"),
6257
};
6358
}
6459

@@ -84,13 +79,9 @@ function relativeLegacyPath(stateDir: string, filePath: string): string {
8479
return relativePath;
8580
}
8681

87-
function sourceOrClaimMayExist(sourcePath: string): boolean {
88-
return (
89-
legacyPathMayExist(sourcePath) || legacyPathMayExist(`${sourcePath}${DOCTOR_CLAIM_SUFFIX}`)
90-
);
91-
}
82+
const sourceOrClaimMayExist = (sourcePath: string) =>
83+
legacyPathMayExist(sourcePath) || legacyPathMayExist(`${sourcePath}${DOCTOR_CLAIM_SUFFIX}`);
9284

93-
/** Detect retired Web Push state only when an explicit doctor flow opts in. */
9485
export function detectLegacyWebPush(params: {
9586
stateDir: string;
9687
doctorOnlyStateMigrations?: boolean;
@@ -573,7 +564,6 @@ async function migrateLegacyWebPushWithExclusiveStateOwnership(params: {
573564
return { changes, warnings, notices };
574565
}
575566

576-
/** Import both retired stores while excluding old Gateways that can recreate them. */
577567
export async function migrateLegacyWebPush(params: {
578568
detected: LegacyStateDetection["webPush"];
579569
stateDir: string;

0 commit comments

Comments
 (0)