Load and (when applicable) compose a sibling init notebook for a runnable file.
(filePath: string)
| 130 | |
| 131 | /** Load and (when applicable) compose a sibling init notebook for a runnable file. */ |
| 132 | async function resolveRunnableWithInit(filePath: string): Promise<{ |
| 133 | file: DeepnoteFile |
| 134 | originalPath: string |
| 135 | format: LoadedRunnableFile['format'] |
| 136 | wasConverted: boolean |
| 137 | warnings: string[] |
| 138 | }> { |
| 139 | const loaded = await loadRunnableFile(filePath) |
| 140 | const resolved = await resolveAndComposeInitIfNeeded(loaded) |
| 141 | return { |
| 142 | file: resolved.file, |
| 143 | originalPath: loaded.originalPath, |
| 144 | format: loaded.format, |
| 145 | wasConverted: loaded.wasConverted, |
| 146 | warnings: resolved.warnings, |
| 147 | } |
| 148 | } |
| 149 | |
| 150 | async function handleRun(args: Record<string, unknown>) { |
| 151 | const parsedArgs = runArgsSchema.safeParse(args) |
no test coverage detected