Creates a new CLI client. This client will connect via Websockets to your custom client server instance. Once it picks up any change in the custom server's working directory, we will repack the server, upload it to the custom server instance and restart it. Every console.log output of your custom server instance will be sent back to the cli_client and printed on the console.

For configuration options see CliClientArgs

Hierarchy

  • CloudClient

Constructors

Properties

authToken: string
authTokenValidatedAt?: number

Time of the last successful auth token validation, in ms since epoch

config: Partial<CloudConfig>
page?: PageClient
server?: ServerClient
subscription?: SubscriptionClient
AUTH_RETRY_DELAYS_MS: number[] = ...

Delays between auth token validation retries on server or network errors, in ms

AUTH_VALIDATION_CACHE_MS: number = ...

How long a successful auth token validation is reused, in ms

Methods

  • Helper function to check the validity of the provided Wonderland API auth token.

    A successful validation is cached for CloudClient.AUTH_VALIDATION_CACHE_MS, so long-running processes can call this before every operation without hitting the API each time. Invalid tokens (4xx) fail immediately; server and network errors are retried with exponential backoff.

    Returns Promise<boolean>

Generated using TypeDoc