MCPcopy Index your code
hub / github.com/massCodeIO/massCode / parseHttpImportFiles

Function parseHttpImportFiles

src/main/http/import/index.ts:42–67  ·  view source on GitHub ↗
(
  files: HttpImportFile[],
)

Source from the content-addressed store, hash-verified

40}
41
42export async function parseHttpImportFiles(
43 files: HttpImportFile[],
44): Promise<HttpImportResult> {
45 const expandedFiles = await expandZipFiles(files)
46 const postman = parsePostmanFiles(expandedFiles)
47 const openCollection = parseOpenCollectionFiles(expandedFiles)
48 const openApi = parseOpenApiFiles(expandedFiles)
49
50 return {
51 collections: [
52 ...postman.collections,
53 ...openCollection.collections,
54 ...openApi.collections,
55 ],
56 environments: [
57 ...postman.environments,
58 ...openCollection.environments,
59 ...openApi.environments,
60 ],
61 warnings: [
62 ...postman.warnings,
63 ...openCollection.warnings,
64 ...openApi.warnings,
65 ],
66 }
67}
68
69export type {
70 HttpImportFile,

Callers 2

previewHttpImportFunction · 0.85
applyHttpImportFunction · 0.85

Calls 4

expandZipFilesFunction · 0.90
parsePostmanFilesFunction · 0.90
parseOpenCollectionFilesFunction · 0.90
parseOpenApiFilesFunction · 0.90

Tested by

no test coverage detected