"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const crypto_1 = require("crypto");
class Workspace {
    constructor(raw, port, config) {
        this.raw = raw;
        this.port = port;
        this.config = config;
    }
    get hash() {
        return crypto_1.createHash('md5')
            .update(JSON.stringify(this.raw))
            .digest('hex');
    }
    get id() {
        let { id } = this.raw;
        return id;
    }
    get image() {
        let { image = this.config.image } = this.raw;
        return image;
    }
    get services() {
        let { services = [] } = this.raw;
        return services;
    }
    get projects() {
        let { projects } = this.raw;
        return projects;
    }
    get volume() {
        return `workspace-${this.id}`;
    }
}
exports.Workspace = Workspace;
//# sourceMappingURL=workspace.js.map