File Explorer

/var/runtime/node_modules/@aws-sdk/node_modules/aws-crt/dist.browser/common

This explorer reads the filesystem of the server it runs on, so /workspace/user isn't present here. Browsing and the terminal still work against this server's own disk from /.

log.js6.3 KB · 150 lines
"use strict";/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */var __values = (this && this.__values) || function(o) {    var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;    if (m) return m.call(o);    if (o && typeof o.length === "number") return {        next: function () {            if (o && i >= o.length) o = void 0;            return { value: o && o[i++], done: !o };        }    };    throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");};Object.defineProperty(exports, "__esModule", { value: true });exports.appendOptionalBytesPropertyLine = exports.appendBytesPropertyLine = exports.appendStringArrayPropertyLine = exports.appendOptionalStringPropertyLine = exports.appendStringPropertyLine = exports.appendEnumArrayPropertyLine = exports.appendOptionalEnumPropertyLine = exports.appendEnumPropertyLine = exports.appendOptionalNumericArrayPropertyLine = exports.appendOptionalNumericPropertyLine = exports.appendNumericPropertyLine = exports.appendOptionalBooleanPropertyLine = exports.appendBooleanPropertyLine = void 0;/** * * Package-private module containing a grab bag of support for building log strings * * @packageDocumentation * @module log *//* * A bunch of helper functions for building more complex log strings.  We don't just toString() objects because * there are fields we may want to transform or hide */function appendBooleanPropertyLine(current, prefix, propertyName, value) {    return current + "".concat(prefix, "  ").concat(propertyName, ": ").concat(value ? "true" : "false", "\n");}exports.appendBooleanPropertyLine = appendBooleanPropertyLine;function appendOptionalBooleanPropertyLine(current, prefix, propertyName, value) {    if (value == undefined) {        return current;    }    else {        return appendBooleanPropertyLine(current, prefix, propertyName, value);    }}exports.appendOptionalBooleanPropertyLine = appendOptionalBooleanPropertyLine;function appendNumericPropertyLine(current, prefix, propertyName, value) {    return current + "".concat(prefix, "  ").concat(propertyName, ": ").concat(value, "\n");}exports.appendNumericPropertyLine = appendNumericPropertyLine;function appendOptionalNumericPropertyLine(current, prefix, propertyName, value) {    if (value == undefined) {        return current;    }    else {        return appendNumericPropertyLine(current, prefix, propertyName, value);    }}exports.appendOptionalNumericPropertyLine = appendOptionalNumericPropertyLine;function appendOptionalNumericArrayPropertyLine(current, prefix, propertyName, values) {    if (values == undefined) {        return current;    }    else {        current += "".concat(prefix, "  ").concat(propertyName, ": [");        for (var i = 0; i < values.length; i++) {            if (i > 0) {                current += ", ";            }            current += values[i];        }        current += "]\n";        return current;    }}exports.appendOptionalNumericArrayPropertyLine = appendOptionalNumericArrayPropertyLine;function appendEnumPropertyLine(current, prefix, propertyName, valueNameConverter, value) {    return current + "".concat(prefix, "  ").concat(propertyName, ": ").concat(valueNameConverter(value), "(").concat(value, ")\n");}exports.appendEnumPropertyLine = appendEnumPropertyLine;function appendOptionalEnumPropertyLine(current, prefix, propertyName, valueNameConverter, value) {    if (value == undefined) {        return current;    }    else {        return appendEnumPropertyLine(current, prefix, propertyName, valueNameConverter, value);    }}exports.appendOptionalEnumPropertyLine = appendOptionalEnumPropertyLine;function appendEnumArrayPropertyLine(current, prefix, propertyName, valueNameConverter, values) {    current += "".concat(prefix, "  ").concat(propertyName, ": [\n");    for (var i = 0; i < values.length; i++) {        var value = values[i];        current += "".concat(prefix, "    ").concat(valueNameConverter(value), "(").concat(value, ")\n");    }    current += "".concat(prefix, "  ]\n");    return current;}exports.appendEnumArrayPropertyLine = appendEnumArrayPropertyLine;function appendStringPropertyLine(current, prefix, propertyName, value) {    return current + "".concat(prefix, "  ").concat(propertyName, ": ").concat(value, "\n");}exports.appendStringPropertyLine = appendStringPropertyLine;function appendOptionalStringPropertyLine(current, prefix, propertyName, value) {    if (value == undefined) {        return current;    }    else {        return appendStringPropertyLine(current, prefix, propertyName, value);    }}exports.appendOptionalStringPropertyLine = appendOptionalStringPropertyLine;function appendStringArrayPropertyLine(current, prefix, propertyName, values) {    var e_1, _a;    current += "".concat(prefix, "  ").concat(propertyName, ": [\n");    try {        for (var values_1 = __values(values), values_1_1 = values_1.next(); !values_1_1.done; values_1_1 = values_1.next()) {            var value = values_1_1.value;            current += "".concat(prefix, "    ").concat(value, "\n");        }    }    catch (e_1_1) { e_1 = { error: e_1_1 }; }    finally {        try {            if (values_1_1 && !values_1_1.done && (_a = values_1.return)) _a.call(values_1);        }        finally { if (e_1) throw e_1.error; }    }    current += "".concat(prefix, "  ]\n");    return current;}exports.appendStringArrayPropertyLine = appendStringArrayPropertyLine;function appendBytesPropertyLine(current, prefix, propertyName, value) {    var valueByteLength = 0;    if (typeof value === 'string') {        var encoder = new TextEncoder();        valueByteLength = encoder.encode(value).buffer.byteLength;    }    else {        valueByteLength = value.byteLength;    }    return current + "".concat(prefix, "  ").concat(propertyName, ": [..").concat(valueByteLength, " bytes..]\n");}exports.appendBytesPropertyLine = appendBytesPropertyLine;function appendOptionalBytesPropertyLine(current, prefix, propertyName, value) {    if (value == undefined) {        return current;    }    else {        return appendBytesPropertyLine(current, prefix, propertyName, value);    }}exports.appendOptionalBytesPropertyLine = appendOptionalBytesPropertyLine;//# sourceMappingURL=log.js.map