diff --git a/packages/remote-context/src/remote-context.ts b/packages/remote-context/src/remote-context.ts index bfdbf00..aef3e8f 100644 --- a/packages/remote-context/src/remote-context.ts +++ b/packages/remote-context/src/remote-context.ts @@ -1,8 +1,12 @@ -import {AlwatrRemoteContextStateMachineBase, type ServerContextState} from './base.js'; +import { + AlwatrRemoteContextStateMachineBase as AlwatrManualReloadRemoteContextStateMachineBase, + type ServerContextState, +} from './base.js'; -import type {FetchOptions} from '@alwatr/nanolib'; +import type {FetchOptions} from '@alwatr/flux'; +import type {Json} from '@alwatr/type-helper'; -export class AlwatrRemoteContextStateMachine extends AlwatrRemoteContextStateMachineBase { +export class AlwatrManualReloadRemoteContextStateMachine extends AlwatrManualReloadRemoteContextStateMachineBase { /** * Current state. */ @@ -14,6 +18,10 @@ export class AlwatrRemoteContextStateMachine extends Alwa return this.context_; } + get isLoadedFromRemote(): boolean { + return this.isLoadedFromRemote_; + } + request(fetchOptions?: Partial): void { return this.request_(fetchOptions); } @@ -25,3 +33,5 @@ export class AlwatrRemoteContextStateMachine extends Alwa this.clean_(); } } + +export type {ServerContextState as ManualReloadServerContextState};