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

Function previewHttpImport

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

Source from the content-addressed store, hash-verified

12import { expandZipFiles } from './zip'
13
14export 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
35export async function applyHttpImport(
36 files: HttpImportFile[],

Callers 1

http-import.tsFile · 0.90

Calls 1

parseHttpImportFilesFunction · 0.85

Tested by

no test coverage detected