MCPcopy Index your code
hub / github.com/arctic-cli/interface / createArcticClient

Function createArcticClient

packages/sdk/js/src/client.ts:8–30  ·  view source on GitHub ↗
(config?: Config & { directory?: string })

Source from the content-addressed store, hash-verified

6export { type Config as ArcticClientConfig, ArcticClient }
7
8export function createArcticClient(config?: Config & { directory?: string }) {
9 if (!config?.fetch) {
10 const customFetch: any = (req: any) => {
11 // @ts-ignore
12 req.timeout = false
13 return fetch(req)
14 }
15 config = {
16 ...config,
17 fetch: customFetch,
18 }
19 }
20
21 if (config?.directory) {
22 config.headers = {
23 ...config.headers,
24 "x-arctic-directory": config.directory,
25 }
26 }
27
28 const client = createClient(config)
29 return new ArcticClient({ client })
30}

Callers 3

example.tsFile · 0.90
createArcticFunction · 0.90
index.tsFile · 0.50

Calls 1

createClientFunction · 0.90

Tested by

no test coverage detected