Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
51cc1b5526 | ||
|
|
58584e3d97 | ||
|
|
f06e39e022 | ||
|
|
4c705618e1 | ||
|
|
1ebb922e84 |
@@ -87,6 +87,12 @@ describe('getInputList', () => {
|
||||
expect(res).toEqual(['foo=bar', 'bar=qux']);
|
||||
});
|
||||
|
||||
it('multiline with comment and no infix comment', async () => {
|
||||
setInput('labels', '# ignore this\nfoo=bar\nbar=qux#baz');
|
||||
const res = Util.getInputList('labels', {comment: '#', commentNoInfix: true});
|
||||
expect(res).toEqual(['foo=bar', 'bar=qux#baz']);
|
||||
});
|
||||
|
||||
it('different new lines and ignoring comma correctly', async () => {
|
||||
setInput('cache-from', 'user/app:cache\r\ntype=local,src=path/to/dir');
|
||||
const res = Util.getInputList('cache-from', {ignoreComma: true});
|
||||
|
||||
@@ -70,6 +70,10 @@ export class History {
|
||||
}
|
||||
|
||||
public async export(opts: ExportOpts): Promise<ExportResponse> {
|
||||
if (!(await this.buildx.versionSatisfies('>=0.23.0'))) {
|
||||
throw new Error('Buildx >= 0.23.0 is required to export a build record');
|
||||
}
|
||||
|
||||
let builderName: string = '';
|
||||
let nodeName: string = '';
|
||||
const refs: Array<string> = [];
|
||||
|
||||
@@ -107,7 +107,6 @@ export interface ExportOpts {
|
||||
refs: Array<string>;
|
||||
noSummaries?: boolean;
|
||||
image?: string;
|
||||
useContainer?: boolean;
|
||||
}
|
||||
|
||||
export interface ExportResponse {
|
||||
|
||||
@@ -24,6 +24,7 @@ import {parse} from 'csv-parse/sync';
|
||||
export interface ListOpts {
|
||||
ignoreComma?: boolean;
|
||||
comment?: string;
|
||||
commentNoInfix?: boolean;
|
||||
quote?: string | boolean | Buffer | null;
|
||||
}
|
||||
|
||||
@@ -42,6 +43,7 @@ export class Util {
|
||||
columns: false,
|
||||
relaxQuotes: true,
|
||||
comment: opts?.comment,
|
||||
comment_no_infix: opts?.commentNoInfix,
|
||||
relaxColumnCount: true,
|
||||
skipEmptyLines: true,
|
||||
quote: opts?.quote
|
||||
|
||||
Reference in New Issue
Block a user