mirror of
https://github.com/bitwarden/browser
synced 2025-12-11 13:53:34 +00:00
Add devFlag for the config service retrieval interval when developing (#9006)
* Add devFlag for a configurable config retrieval interval when developing * Add Ms suffix to dev flag
This commit is contained in:
@@ -11,6 +11,7 @@ export type SharedFlags = {
|
|||||||
export type SharedDevFlags = {
|
export type SharedDevFlags = {
|
||||||
noopNotifications: boolean;
|
noopNotifications: boolean;
|
||||||
skipWelcomeOnInstall: boolean;
|
skipWelcomeOnInstall: boolean;
|
||||||
|
configRetrievalIntervalMs: number;
|
||||||
};
|
};
|
||||||
|
|
||||||
function getFlags<T>(envFlags: string | T): T {
|
function getFlags<T>(envFlags: string | T): T {
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
import {
|
import {
|
||||||
NEVER,
|
|
||||||
Observable,
|
|
||||||
Subject,
|
|
||||||
combineLatest,
|
combineLatest,
|
||||||
firstValueFrom,
|
firstValueFrom,
|
||||||
map,
|
map,
|
||||||
mergeWith,
|
mergeWith,
|
||||||
|
NEVER,
|
||||||
|
Observable,
|
||||||
of,
|
of,
|
||||||
shareReplay,
|
shareReplay,
|
||||||
|
Subject,
|
||||||
switchMap,
|
switchMap,
|
||||||
tap,
|
tap,
|
||||||
} from "rxjs";
|
} from "rxjs";
|
||||||
@@ -24,10 +24,13 @@ import { ConfigService } from "../../abstractions/config/config.service";
|
|||||||
import { ServerConfig } from "../../abstractions/config/server-config";
|
import { ServerConfig } from "../../abstractions/config/server-config";
|
||||||
import { EnvironmentService, Region } from "../../abstractions/environment.service";
|
import { EnvironmentService, Region } from "../../abstractions/environment.service";
|
||||||
import { LogService } from "../../abstractions/log.service";
|
import { LogService } from "../../abstractions/log.service";
|
||||||
|
import { devFlagEnabled, devFlagValue } from "../../misc/flags";
|
||||||
import { ServerConfigData } from "../../models/data/server-config.data";
|
import { ServerConfigData } from "../../models/data/server-config.data";
|
||||||
import { CONFIG_DISK, KeyDefinition, StateProvider, UserKeyDefinition } from "../../state";
|
import { CONFIG_DISK, KeyDefinition, StateProvider, UserKeyDefinition } from "../../state";
|
||||||
|
|
||||||
export const RETRIEVAL_INTERVAL = 3_600_000; // 1 hour
|
export const RETRIEVAL_INTERVAL = devFlagEnabled("configRetrievalIntervalMs")
|
||||||
|
? (devFlagValue("configRetrievalIntervalMs") as number)
|
||||||
|
: 3_600_000; // 1 hour
|
||||||
|
|
||||||
export type ApiUrl = string;
|
export type ApiUrl = string;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user