(filePath: string, fileContent: string, projectId: string, promptId: string, type: "NEXTJS" | "REACT_NATIVE")
| 10 | |
| 11 | |
| 12 | export async function onFileUpdate(filePath: string, fileContent: string, projectId: string, promptId: string, type: "NEXTJS" | "REACT_NATIVE") { |
| 13 | await prismaClient.action.create({ |
| 14 | data: { |
| 15 | projectId, |
| 16 | promptId, |
| 17 | content: `Updated file ${filePath}` |
| 18 | }, |
| 19 | }); |
| 20 | |
| 21 | RelayWebsocket.getInstance().send(JSON.stringify({ |
| 22 | event: "admin", |
| 23 | data: { |
| 24 | type: "update-file", |
| 25 | content: fileContent, |
| 26 | path: `${getBaseWorkerDir(type)}/${filePath}` |
| 27 | } |
| 28 | })) |
| 29 | } |
| 30 | |
| 31 | export async function onShellCommand(shellCommand: string, projectId: string, promptId: string) { |
| 32 | //npm run build && npm run start |
no test coverage detected