MCPcopy Create free account
hub / github.com/Openpanel-dev/openpanel / main

Function main

apps/api/scripts/mock.ts:492–511  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

490};
491
492async function main() {
493 const [type, file = 'mock-basic.json'] = process.argv.slice(2);
494
495 switch (type) {
496 case 'send': {
497 const data = await import(`./${file}`, { assert: { type: 'json' } });
498 await triggerEvents(data.default);
499 break;
500 }
501 case 'sim':
502 await simultaneousRequests();
503 break;
504 case 'mock':
505 await createMock(file);
506 await exit();
507 break;
508 default:
509 console.log('usage: jiti mock.ts send|mock|sim [file]');
510 }
511}
512
513main();

Callers 1

mock.tsFile · 0.70

Calls 5

triggerEventsFunction · 0.85
simultaneousRequestsFunction · 0.85
createMockFunction · 0.85
exitFunction · 0.70
logMethod · 0.45

Tested by

no test coverage detected