balena-cli
Version:
The official balena Command Line Interface
70 lines (69 loc) • 3.04 kB
TypeScript
import type { Renderer } from './compose_ts';
import type * as SDK from 'balena-sdk';
import type Dockerode = require('dockerode');
import type { Composition, ImageDescriptor } from '@balena/compose/dist/parse';
import type { BuiltImage, ComposeOpts, ComposeProject, Release, TaggedImage } from './compose-types';
import Logger = require('./logger');
import type { ProgressCallback } from 'docker-progress';
export declare function generateOpts(options: {
source?: string;
projectName?: string;
nologs: boolean;
'noconvert-eol': boolean;
dockerfile?: string;
'multi-dockerignore': boolean;
'noparent-check': boolean;
}): Promise<ComposeOpts>;
export declare function createProject(composePath: string, composeStr: string, projectName?: string, imageTag?: string): ComposeProject;
export declare const createRelease: (sdk: SDK.BalenaSDK, logger: Logger, appId: number, composition: Composition, draft: boolean, semver: string | undefined, contract: import("@balena/compose/dist/release/models").ReleaseModel["contract"]) => Promise<Release>;
export declare const tagServiceImages: (docker: Dockerode, images: BuiltImage[], serviceImages: Release["serviceImages"]) => Promise<TaggedImage[]>;
export declare const getPreviousRepos: (sdk: SDK.BalenaSDK, logger: Logger, appID: number) => Promise<string[]>;
export declare const authorizePush: (sdk: SDK.BalenaSDK, tokenAuthEndpoint: string, registry: string, images: string[], previousRepos: string[]) => Promise<string>;
export declare const pushProgressRenderer: (tty: ReturnType<typeof import("./tty")>, prefix: string) => ProgressCallback & {
end: () => void;
};
export declare class BuildProgressUI implements Renderer {
streams: import("lodash").Dictionary<any>;
private _prefix;
private _prefixWidth;
private _tty;
private _services;
private _startTime;
private _ended;
private _serviceToDataMap;
private _cancelled;
private _spinner;
private _runloop;
private _maxLineWidth;
private _lineWidths;
constructor(tty: ReturnType<typeof import('./tty')>, descriptors: ImageDescriptor[]);
_handleEvent(service: string, event: {
status?: string;
progress?: number;
error?: Error;
}): void;
start(): void;
end(summary?: Dictionary<string>): void;
_display(): void;
_clear(): void;
_getServiceSummary(): import("lodash").Dictionary<any>;
_renderStatus(end?: boolean): void;
_renderSummary(serviceToStrMap: Dictionary<string>): void;
}
export declare class BuildProgressInline implements Renderer {
streams: import("lodash").Dictionary<any>;
private _prefixWidth;
private _outStream;
private _services;
private _startTime;
private _ended;
constructor(outStream: NodeJS.ReadWriteStream, descriptors: Array<{
serviceName: string;
}>);
start(): void;
end(summary?: Dictionary<string>): void;
_renderEvent(service: string, event: {
status?: string;
error?: Error;
}): void;
}