MCPcopy
hub / github.com/deepnote/deepnote / openDeepnoteFile

Function openDeepnoteFile

packages/cli/src/commands/open.ts:33–54  ·  view source on GitHub ↗
(path: string | undefined, options: OpenOptions)

Source from the content-addressed store, hash-verified

31}
32
33async function openDeepnoteFile(path: string | undefined, options: OpenOptions): Promise<void> {
34 const { absolutePath } = await resolvePathToDeepnoteFile(path)
35 const c = getChalk()
36 const isJsonOutput = options.output === 'json'
37
38 const result = await openDeepnoteFileInCloud(absolutePath, {
39 domain: options.domain,
40 quiet: isJsonOutput,
41 })
42
43 if (isJsonOutput) {
44 outputJson({
45 success: true,
46 path: absolutePath,
47 url: result.url,
48 importId: result.importId,
49 })
50 } else {
51 output(`${c.green('✓')} Opened in Deepnote`)
52 output(`${c.dim('URL:')} ${result.url}`)
53 }
54}

Callers 1

createOpenActionFunction · 0.85

Calls 5

getChalkFunction · 0.90
openDeepnoteFileInCloudFunction · 0.90
outputJsonFunction · 0.90
outputFunction · 0.90

Tested by

no test coverage detected