UNPKG

1.3 kBTypeScriptView Raw
1import { SoftwareEnvironment } from '@stencila/schema';
2import IUrlFetcher from './IUrlFetcher';
3/**
4 * Compiles a project into a Dockerfile, or Docker image
5 */
6export default class DockerCompiler {
7 /**
8 * The instance of IUrlFetcher to fetch URLs
9 */
10 private readonly urlFetcher;
11 constructor(urlFetcher: IUrlFetcher);
12 /**
13 * Compile a project
14 *
15 * @param source The folder, Dockerfile or `SoftwareEnvironment` to compile
16 * @param build Should the Docker image be built?
17 * @param comments Should comments be added to the Dockerfile?
18 * @param stencila Should relevant Stencila language packages be installed in the image?
19 */
20 compile(source: string, build?: boolean, comments?: boolean, stencila?: boolean): Promise<SoftwareEnvironment | null>;
21 /**
22 * Execute the project by compiling, building and running a Docker container for it
23 *
24 * @param source The project to execute
25 */
26 execute(source: string, command?: string): Promise<any>;
27 /**
28 * Find out who contributed to the packages that your project
29 * depends upon.
30 *
31 * @param folder The project to examine
32 * @param maxDepth The maximum dependency recursion depth
33 */
34 who(folder: string, maxDepth?: number): Promise<object>;
35}