All files / dist/controller tn-base-controller.js

100% Statements 9/9
50% Branches 1/2
100% Functions 4/4
100% Lines 9/9

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22    5x 5x 5x     42x 42x     41x     44x     16x     5x  
"use strict";
/*! Copyright (c) 2023 Siemens AG. Licensed under the MIT License. */
Object.defineProperty(exports, "__esModule", { value: true });
exports.TnBaseController = void 0;
const core_1 = require("@coaty/core");
class TnBaseController extends core_1.Controller {
    constructor(container, options, controllerName) {
        super(container, options, controllerName);
        this.debug = this.runtime.commonOptions.extra.debug.extend(controllerName);
    }
    base64ToByteArray(value) {
        return Buffer.from(value, "base64");
    }
    byteArrayToBase64(value) {
        return (value instanceof Buffer ? value : Buffer.from(value)).toString("base64");
    }
    async onServiceStopping() {
        return Promise.resolve();
    }
}
exports.TnBaseController = TnBaseController;