import GulpFile, { BufferFile, StreamFile } from 'vinyl'; import { Transform, ResultCallback } from 'streamx'; import * as QRCode from 'qrcode'; /** * Gulp plugin base transform stream, * which support just BufferFile output * * @public @internal */ declare abstract class GulpFile2BufferFile extends Transform { /** * @internal */ protected getFileBuffer(file: GulpFile): Promise; /** * @internal */ protected getFileText(file: GulpFile): Promise; /** * @internal */ protected abstract _transform2BufferFile(fileText: string, sourceFile: GulpFile): Promise; /** * @internal */ _transform(file: GulpFile, callback: ResultCallback): void; } /** * GulpFile2GulpFile options * * @public */ interface Options$1 { /** * Create output GulpFile with Buffer (true), * or with stream (false). * * If not specified, created StreamFile * when input file is StreamFile, * and created BufferFile, * when input file is BufferFile. * * @public */ buffer?: boolean; } /** * Gulp plugin base transform stream * * @public @internal */ declare abstract class GulpFile2GulpFile extends GulpFile2BufferFile { private readonly _options; constructor(options?: Options$1); /** * @internal */ protected abstract _transform2StreamFile(fileText: string, sourceFile: GulpFile): Promise; /** * @internal */ _transform(file: GulpFile, callback: ResultCallback): void; } /** * gulp-file2qr plugin options * * @remarks * * @see {@link url2qr} for more details. * * @public */ interface Options extends Options$1 { /** * Options for generated PNG QR codes. * * See {@link https://www.npmjs.com/package/qrcode| `qrcode`} * for more details. * * @public */ qrOptions?: QRCode.QRCodeRenderersOptions; } /** * Gulp plugin stream for transformation text data from file * to PNG QR code * * @public @internal */ declare class GulpFile2QR extends GulpFile2GulpFile { /** * @internal */ protected readonly options: Options; /** * @internal */ constructor(options?: Options); /** * @internal */ protected _transform2StreamFile(fileText: string, sourceFile: GulpFile): Promise; /** * @internal */ protected _transform2BufferFile(fileText: string, sourceFile: GulpFile): Promise; } /** * Plugin fabric function. * * Returns Gulp plugin stream for transformation * GulpFile with utf-8 plain text data * to GulpFile with PNG QR code. * * Used in pipeline with other Gulp plugins, * which transforms source files to simple * buffered utf-8 text files with QR code data. * * @param options - {@link Options} for QRCode generator * * @internal */ declare function file2qr(options?: Options): NodeJS.ReadWriteStream; /** * A Gulp plugin for creating PNG QRCodes with URI * from source .url files. * * .url files - INI files. For example: * * ```ini * [{000214A0-0000-0000-C000-000000000046}] * Prop3=19,2 * [InternetShortcut] * URL=https://github.com/IT-Service-NPM/gulp-file2qr * ``` * * @packageDocumentation */ /** * Plugin fabric function. * * Returns Gulp plugin stream for transformation * .url files to PNG QR codes. * * .url files - INI files. For example: * * ```ini * [{000214A0-0000-0000-C000-000000000046}] * Prop3=19,2 * [InternetShortcut] * URL=https://github.com/IT-Service-NPM/gulp-file2qr * ``` * * @param options - {@link Options} for QRCode generator * * @public */ declare function url2qr(options?: Options): NodeJS.ReadWriteStream; export { GulpFile2QR, type Options, file2qr, url2qr };