How to use the rsp-client.StatusSeverity.isInfo function in rsp-client

To help you get started, we’ve selected a few rsp-client examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github redhat-developer / vscode-rsp-ui / src / extensionApi.ts View on Github external
actionId: action.id,
            data: workflowMap,
            requestId: null,
            serverId: context.server.id
        };

        let response: Protocol.WorkflowResponse = await client.getOutgoingHandler().executeServerAction(actionRequest);
        if (!response) {
            return;
        }
        while (true) {
            const workflowMap = {};
            const status = await this.handleWorkflow(response, workflowMap);
            if (!status) {
                return;
            } else if (!StatusSeverity.isInfo(status)) {
                return status;
            }

            actionRequest.requestId = response.requestId;
            actionRequest.data = workflowMap;
            // Now we have a data map
            response = await client.getOutgoingHandler().executeServerAction(actionRequest);
        }
    }
github redhat-developer / vscode-rsp-ui / src / extensionApi.ts View on Github external
}

        const rtId: string = await this.promptDownloadableRuntimes(client);
        if (!rtId) {
            return;
        }
        let response: Protocol.WorkflowResponse = await this.initEmptyDownloadRuntimeRequest(rtId, client);
        if (!response) {
            return;
        }
        while (true) {
            const workflowMap = {};
            const status = await this.handleWorkflow(response, workflowMap);
            if (!status) {
                return;
            } else if (!StatusSeverity.isInfo(status)) {
                return status;
            }
            // Now we have a data map
            response = await this.initDownloadRuntimeRequest(rtId, workflowMap, response.requestId, client);
        }
    }