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