MCPcopy Create free account
hub / github.com/ChatLab/ChatLab / createTakeoutZip

Function createTakeoutZip

apps/cli/src/http/routes/web/import-source.test.ts:13–35  ·  view source on GitHub ↗
(zipPath: string)

Source from the content-addressed store, hash-verified

11import { registerImportRoutes } from './import'
12
13function createTakeoutZip(zipPath: string): void {
14 writeZipFixture(zipPath, [
15 {
16 name: 'Takeout/Google Chat/Users/User sample/user_info.json',
17 content: JSON.stringify({
18 user: { email: 'owner@example.com', name: 'Owner', user_type: 'Human' },
19 }),
20 },
21 {
22 name: 'Takeout/Google Chat/Groups/DM sample/group_info.json',
23 content: JSON.stringify({
24 members: [
25 { email: 'owner@example.com', name: 'Owner', user_type: 'Human' },
26 { email: 'other@example.com', name: 'Other User', user_type: 'Human' },
27 ],
28 }),
29 },
30 {
31 name: 'Takeout/Google Chat/Groups/DM sample/messages.json',
32 content: JSON.stringify({ messages: [] }),
33 },
34 ])
35}
36
37function multipartPayload(fileName: string, file: Buffer): { payload: Buffer; contentType: string } {
38 const boundary = '----chatlab-import-source-test'

Callers 1

Calls 1

writeZipFixtureFunction · 0.90

Tested by

no test coverage detected