File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -188,6 +188,9 @@ export class Client extends AsyncEventEmitter<Events> {
188188 readonly ready : Accessor < boolean > ;
189189 #setReady: Setter < boolean > ;
190190
191+ readonly configured : Accessor < boolean > ;
192+ #setConfigured: Setter < boolean > ;
193+
191194 readonly connectionFailureCount : Accessor < number > ;
192195 #setConnectionFailureCount: Setter < number > ;
193196 #reconnectTimeout: number | undefined ;
@@ -239,6 +242,12 @@ export class Client extends AsyncEventEmitter<Events> {
239242 baseURL : this . options . baseURL ,
240243 } ) ;
241244
245+ const [ configured , setConfigured ] = createSignal ( configuration !== undefined ) ;
246+ this . configured = configured ;
247+ this . #setConfigured = setConfigured ;
248+
249+ this . #fetchConfiguration( ) ;
250+
242251 const [ ready , setReady ] = createSignal ( false ) ;
243252 this . ready = ready ;
244253 this . #setReady = setReady ;
@@ -328,6 +337,7 @@ export class Client extends AsyncEventEmitter<Events> {
328337 async #fetchConfiguration( ) : Promise < void > {
329338 if ( ! this . configuration ) {
330339 this . configuration = await this . api . get ( "/" ) ;
340+ this . #setConfigured( true ) ;
331341 }
332342 }
333343
You can’t perform that action at this time.
0 commit comments