MCPcopy
hub / github.com/learnhouse/learnhouse / writeInstall

Function writeInstall

apps/cli/tests/unit.test.ts:494–514  ·  view source on GitHub ↗
(name: string, deploymentId: string, createdAt: string)

Source from the content-addressed store, hash-verified

492 let origHome: string | undefined
493
494 function writeInstall(name: string, deploymentId: string, createdAt: string) {
495 const dir = path.join(lhBase, name)
496 fs.mkdirSync(dir, { recursive: true })
497 fs.writeFileSync(
498 path.join(dir, 'learnhouse.config.json'),
499 JSON.stringify({
500 version: '0.0.0-test',
501 deploymentId,
502 createdAt,
503 installDir: dir,
504 domain: 'localhost',
505 httpPort: 8088,
506 useHttps: false,
507 autoSsl: false,
508 useExternalDb: false,
509 orgSlug: 'default',
510 }),
511 )
512 fs.writeFileSync(path.join(dir, '.env'), '# test')
513 return dir
514 }
515
516 beforeEach(() => {
517 fs.mkdirSync(lhBase, { recursive: true })

Callers 1

unit.test.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected