( outputPath: string, filePath: string, content: string, )
| 706 | Buffer.from(content, "utf-8").toString("base64"); |
| 707 | |
| 708 | export const getCreateFileCommand = ( |
| 709 | outputPath: string, |
| 710 | filePath: string, |
| 711 | content: string, |
| 712 | ) => { |
| 713 | const fullPath = path.join(outputPath, filePath); |
| 714 | if (fullPath.endsWith(path.sep) || filePath.endsWith("/")) { |
| 715 | return `mkdir -p ${fullPath};`; |
| 716 | } |
| 717 | |
| 718 | const directory = path.dirname(fullPath); |
| 719 | const encodedContent = encodeBase64(content); |
| 720 | return ` |
| 721 | mkdir -p ${directory}; |
| 722 | echo "${encodedContent}" | base64 -d > "${fullPath}"; |
| 723 | `; |
| 724 | }; |
| 725 | |
| 726 | export const getServiceContainer = async ( |
| 727 | appName: string, |
no test coverage detected