File tree Expand file tree Collapse file tree 3 files changed +14
-7
lines changed
Expand file tree Collapse file tree 3 files changed +14
-7
lines changed Original file line number Diff line number Diff line change @@ -173,20 +173,22 @@ export interface CliStatusTracker extends Disposable {
173173export function createCliStatusTracker (
174174 outputChannel : LogOutputChannel ,
175175) : CliStatusTracker {
176- const status = createValueEmitter < SetupStatus > ( ) ;
176+ const setupStatus = createValueEmitter < SetupStatus > ( ) ;
177177 const cliPath = createValueEmitter < string | undefined > ( ) ;
178178 const outdated = createValueEmitter < boolean | undefined > ( ) ;
179179
180180 const track = createOnceImmediate ( async ( ) => {
181181 const newCli = await findLocalStack ( ) . catch ( ( ) => undefined ) ;
182182 outputChannel . info ( `[cli]: findLocalStack = ${ newCli ?. cliPath } ` ) ;
183183
184- status . setValue (
184+ setupStatus . setValue (
185185 newCli ?. found && newCli . executable && newCli . upToDate
186186 ? "ok"
187187 : "setup_required" ,
188188 ) ;
189- cliPath . setValue ( status . value ( ) === "ok" ? newCli ?. cliPath : undefined ) ;
189+ cliPath . setValue (
190+ setupStatus . value ( ) === "ok" ? newCli ?. cliPath : undefined ,
191+ ) ;
190192 outdated . setValue (
191193 newCli ?. upToDate !== undefined ? ! newCli . upToDate : undefined ,
192194 ) ;
@@ -225,10 +227,10 @@ export function createCliStatusTracker(
225227 cliPath . onChange ( callback ) ;
226228 } ,
227229 status ( ) {
228- return status . value ( ) ;
230+ return setupStatus . value ( ) ;
229231 } ,
230232 onStatusChange ( callback ) {
231- status . onChange ( callback ) ;
233+ setupStatus . onChange ( callback ) ;
232234 } ,
233235 outdated ( ) {
234236 return outdated . value ( ) ;
Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ import { execLocalStack } from "./cli.ts";
77import type { CliStatusTracker } from "./cli.ts" ;
88import { createFileStatusTracker } from "./file-status-tracker.ts" ;
99import type { StatusTracker } from "./file-status-tracker.ts" ;
10+ import { minDelay } from "./min-delay.ts" ;
1011
1112/**
1213 * See https://github.com/localstack/localstack/blob/de861e1f656a52eaa090b061bd44fc1a7069715e/localstack-core/localstack/utils/files.py#L38-L55.
@@ -115,7 +116,11 @@ export function createLicenseStatusTracker(
115116 return "waiting_for_dependencies" ;
116117 }
117118
118- const isLicenseValid = await checkIsLicenseValid ( cliPath , outputChannel ) ;
119+ const isLicenseValid = await minDelay (
120+ activateLicense ( cliPath , outputChannel ) . then ( ( ) =>
121+ checkIsLicenseValid ( cliPath , outputChannel ) ,
122+ ) ,
123+ ) ;
119124
120125 return isLicenseValid ? "ok" : "setup_required" ;
121126 } ,
Original file line number Diff line number Diff line change @@ -59,7 +59,7 @@ export function createLocalStackInstanceStatusTracker(
5959 } ) ;
6060
6161 status . onChange ( ( newStatus ) => {
62- outputChannel . trace ( `[localstack-instances -status] status=${ newStatus } ` ) ;
62+ outputChannel . trace ( `[localstack-instance -status] status=${ newStatus } ` ) ;
6363
6464 if ( newStatus === "running" ) {
6565 healthCheckStatusTracker . stop ( ) ;
You can’t perform that action at this time.
0 commit comments