MCPcopy Create free account
hub / github.com/arctic-cli/interface / bootstrap

Function bootstrap

packages/arctic/src/cli/bootstrap.ts:4–17  ·  view source on GitHub ↗
(directory: string, cb: () => Promise<T>)

Source from the content-addressed store, hash-verified

2import { Instance } from "../project/instance"
3
4export async function bootstrap<T>(directory: string, cb: () => Promise<T>) {
5 return Instance.provide({
6 directory,
7 init: InstanceBootstrap,
8 fn: async () => {
9 try {
10 const result = await cb()
11 return result
12 } finally {
13 await Instance.dispose()
14 }
15 },
16 })
17}

Callers 11

stats.tsFile · 0.90
run.tsFile · 0.90
import.tsFile · 0.90
export.tsFile · 0.90
session.tsFile · 0.90
handlerFunction · 0.90
handlerFunction · 0.90
handlerFunction · 0.90
handlerFunction · 0.90
handlerFunction · 0.90
handlerFunction · 0.90

Calls 1

disposeMethod · 0.45

Tested by

no test coverage detected