test: update recurrence expansion test + fix TS/Lint errors

This commit is contained in:
Bernd Rodler
2026-08-07 12:40:32 +02:00
parent 47b9ab4398
commit 931d1fa06a
6 changed files with 12 additions and 12 deletions
+2 -2
View File
@@ -456,8 +456,8 @@ describe('expandRecurringEvents', () => {
recurrenceRules: [rule({ '@type': 'RecurrenceRule', frequency: 'daily' })],
});
const result = expand(event, '2025-01-06T00:00:00', '2025-01-08T00:00:00');
expect(result[0].id).toBe('evt1:2025-01-06T09:00:00');
expect(result[1].id).toBe('evt1:2025-01-07T09:00:00');
expect(result[0].id).toBe('evt1::occurrence::2025-01-06T09:00:00');
expect(result[1].id).toBe('evt1::occurrence::2025-01-07T09:00:00');
});
it('preserves originalId pointing to master', () => {
+3 -2
View File
@@ -6096,6 +6096,7 @@ export class JMAPClient implements IJMAPClient {
private wsReconnectAttempts: number = 0;
private wsConsecutiveFailures: number = 0;
private wsPermanentlyDisabled: boolean = false;
private _statesPromise: Promise<void> | null = null;
private wsHeartbeatTimer: NodeJS.Timeout | null = null;
private lastWSActivity: number = 0;
@@ -6177,7 +6178,7 @@ export class JMAPClient implements IJMAPClient {
// entirely: SSE only streams changes from the moment it connects
// onward (no catch-up on connect), so the one thing that CAN catch up
// is a diff against a state snapshot taken before the gap started.
void this.fetchCurrentStates();
this._statesPromise = this.fetchCurrentStates();
// Not confirmed either way whether this server's WebSocket push fans
// out to shared/secondary accounts or, like Stalwart's SSE, covers the
// primary account only - keep the same secondary poll running under
@@ -6321,7 +6322,7 @@ export class JMAPClient implements IJMAPClient {
* original 31s-worst-case ladder did.
*/
private async reconcileAfterWebSocketFallback(): Promise<void> {
await this._stateSnapshotPromise;
await this._statesPromise;
await this.checkForStateChanges();
const eventSourceUrl = this.getEventSourceUrl();
+1
View File
@@ -800,6 +800,7 @@ export interface StateChange {
Calendar?: string;
CalendarEvent?: string;
SieveScript?: string;
FileNode?: string;
};
};
}
+1 -1
View File
@@ -121,7 +121,7 @@ export async function exchangeCodeForTokens(
const tokens = await tokenResponse.json();
if (!tokens.access_token) {
const { access_token, refresh_token, ...safeTokens } = tokens;
const { access_token: _at, refresh_token: _rt, ...safeTokens } = tokens;
logger.error('Token response missing access_token', { response: JSON.stringify(safeTokens).substring(0, 500) });
throw new Error('Invalid token response');
}
+2 -2
View File
@@ -1,11 +1,11 @@
{
"name": "bulwark-webmail",
"name": "vncmail-plus",
"version": "1.7.8",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "bulwark-webmail",
"name": "vncmail-plus",
"version": "1.7.8",
"license": "AGPL-3.0-only",
"dependencies": {
+1 -3
View File
@@ -2,6 +2,7 @@ import { create } from 'zustand';
import { persist } from 'zustand/middleware';
import { useThemeStore } from './theme-store';
import { useLocaleStore } from './locale-store';
import { usePolicyStore } from './policy-store';
import type { NotificationSoundChoice } from '@/lib/notification-sound';
import { apiFetch } from '@/lib/browser-navigation';
import {
@@ -645,11 +646,8 @@ export const useSettingsStore = create<SettingsState>()(
updateSetting: (key, value, opts?: { force?: boolean }) => {
if (!opts?.force) {
try {
const { usePolicyStore } = require('./policy-store');
const locked = usePolicyStore.getState().isSettingLocked(key);
if (locked) return;
} catch { /* policy store may not be loaded yet */ }
}
set({ [key]: value });