navy
Version:
Quick and powerful development environments using Docker and Docker Compose
23 lines (18 loc) • 803 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _helpers = require("./helpers");
function rewriteService(service, serviceName, serviceState) {
if (!serviceState || !serviceState._develop) return service;
const _serviceState = serviceState;
return { ...service,
stdin_open: true,
volumes: _helpers.middlewareHelpers.addVolumes(service, Object.keys(serviceState._develop.mounts).map(local => `${local}:${_serviceState._develop.mounts[local]}`)),
command: serviceState._develop.command ? serviceState._develop.command : service.command
};
}
var _default = (config, state) => _helpers.middlewareHelpers.rewriteServicesWithState(config, state, rewriteService);
exports.default = _default;
module.exports = exports.default;