"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.generateBackendStartApiSh = generateBackendStartApiSh;
function generateBackendStartApiSh({ devOps: { database }, schema: { projectType }, }) {
    const useDb = !!database;
    const directory = projectType.kind === 'workspace' ? `projects/${projectType.projectDirectory}/` : '';
    return generateStartApiSh({ useDb, directory });
}
const generateStartApiSh = ({ useDb, directory }) => {
    return /*sh*/ `#!/bin/sh
/bin/pwd

cd /app/${directory.slice(0, -1)}
${useDb ? `\npnpm prisma migrate deploy\n` : ''}cd /app/${directory}backend
pnpm run start
`;
};
//# sourceMappingURL=backend-start-api-sh.generator.js.map