MCPcopy Index your code
hub / github.com/simstudioai/sim / buildZip

Function buildZip

apps/sim/lib/file-parsers/zip-guard.test.ts:18–31  ·  view source on GitHub ↗
(
  entries: Record<string, string>,
  options: { comment?: string } = {}
)

Source from the content-addressed store, hash-verified

16}
17
18async function buildZip(
19 entries: Record<string, string>,
20 options: { comment?: string } = {}
21): Promise<Buffer> {
22 const zip = new JSZip()
23 for (const [name, content] of Object.entries(entries)) {
24 zip.file(name, content)
25 }
26 return zip.generateAsync({
27 type: 'nodebuffer',
28 compression: 'DEFLATE',
29 comment: options.comment,
30 })
31}
32
33describe('assertOoxmlArchiveWithinLimits', () => {
34 it('accepts a well-formed archive within limits', async () => {

Callers 1

zip-guard.test.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected