Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
stream.on("response", headers => {
const status = headers[HTTP2_HEADER_STATUS];
if (status !== HTTP_STATUS_OK) {
reject(new (_builderUtilRuntime().HttpError)(status));
return;
}
const objectStream = StreamJsonObjects.make();
objectStream.output.on("data", object => {
const data = object.value;
if (_builderUtil().log.isDebugEnabled) {
_builderUtil().log.debug({
event: JSON.stringify(data, null, 2)
}, "remote builder event");
}
if (data.status != null) {
_builderUtil().log.info({
status: data.status
}, "remote building");
} else if ("error" in data) {
resolve({
files: null,