( files: HttpImportFile[], )
| 12 | import { expandZipFiles } from './zip' |
| 13 | |
| 14 | export async function previewHttpImport( |
| 15 | files: HttpImportFile[], |
| 16 | ): Promise<HttpImportPreview> { |
| 17 | const result = await parseHttpImportFiles(files) |
| 18 | |
| 19 | return { |
| 20 | collections: result.collections.map((collection, index) => ({ |
| 21 | folders: collection.folders.length, |
| 22 | index, |
| 23 | name: collection.name, |
| 24 | requests: collection.requests.length, |
| 25 | })), |
| 26 | environments: result.environments.map((environment, index) => ({ |
| 27 | index, |
| 28 | name: environment.name, |
| 29 | variables: Object.keys(environment.variables).length, |
| 30 | })), |
| 31 | warnings: result.warnings, |
| 32 | } |
| 33 | } |
| 34 | |
| 35 | export async function applyHttpImport( |
| 36 | files: HttpImportFile[], |
no test coverage detected