(bundle: FileBundleHandler)
| 57 | const templateFileFromContent = createTemplateFile(environment, options) |
| 58 | |
| 59 | async function writeFileBundle(bundle: FileBundleHandler) { |
| 60 | const files = await bundle.getFiles() |
| 61 | |
| 62 | for (const file of files) { |
| 63 | const contents = await bundle.getFileContents(file) |
| 64 | |
| 65 | if (isBase64(contents)) { |
| 66 | await environment.writeFileBase64( |
| 67 | joinPaths(options.targetDir, file), |
| 68 | contents, |
| 69 | ) |
| 70 | } else { |
| 71 | await templateFileFromContent(file, contents) |
| 72 | } |
| 73 | } |
| 74 | |
| 75 | const deletedFiles = await bundle.getDeletedFiles() |
| 76 | for (const file of deletedFiles) { |
| 77 | await environment.deleteFile(joinPaths(options.targetDir, file)) |
| 78 | } |
| 79 | } |
| 80 | |
| 81 | environment.startStep({ |
| 82 | id: 'write-framework-files', |
no test coverage detected