MCPcopy
hub / github.com/deepnote/deepnote / createDagVarsAction

Function createDagVarsAction

packages/cli/src/commands/dag.ts:59–71  ·  view source on GitHub ↗
(
  _program: Command
)

Source from the content-addressed store, hash-verified

57 * Creates the dag vars action - lists variables defined/used by each block.
58 */
59export function createDagVarsAction(
60 _program: Command
61): (path: string | undefined, options: DagOptions) => Promise<void> {
62 return async (path, options) => {
63 try {
64 debug(`Analyzing variables for: ${path}`)
65 const { dag, blocks, blockMap } = await analyzeDag(path, options)
66 outputDagVars(dag, blocks, blockMap, options)
67 } catch (error) {
68 handleError(error, options)
69 }
70 }
71}
72
73/**
74 * Creates the dag downstream action - shows what needs re-run if a block changes.

Callers 2

registerCommandsFunction · 0.90
dag.test.tsFile · 0.90

Calls 4

debugFunction · 0.90
analyzeDagFunction · 0.85
outputDagVarsFunction · 0.85
handleErrorFunction · 0.70

Tested by

no test coverage detected