From 8c48d52ba7264fd1a31098b02bf70486bd7e2e6b Mon Sep 17 00:00:00 2001 From: Alexis Svinartchouk Date: Thu, 5 Mar 2020 16:52:59 +0100 Subject: [PATCH 01/23] Don't use .then in asCallback implementation Change-type: patch --- lib/utils.ts | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/lib/utils.ts b/lib/utils.ts index 769667bf..71453604 100644 --- a/lib/utils.ts +++ b/lib/utils.ts @@ -61,13 +61,14 @@ export function difference(setA: Set, setB: Set): Set { return _difference; } -export function asCallback( - promise: Promise, - callback: (error: Error | void, value?: any) => void, -) { - promise - .then((value: any) => { - callback(undefined, value); - }) - .catch(callback); +export async function asCallback( + promise: Promise, + callback: (error: Error | void, value?: T) => void, +): Promise { + try { + const value = await promise; + callback(undefined, value); + } catch (error) { + callback(error); + } } From 9dd3536bec367627b25449edef6fe540596b838e Mon Sep 17 00:00:00 2001 From: Alexis Svinartchouk Date: Thu, 5 Mar 2020 18:44:53 +0100 Subject: [PATCH 02/23] Use known buffers size when concatenating buffers Change-type: patch --- lib/block-transform-stream.ts | 2 +- lib/block-write-stream.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/block-transform-stream.ts b/lib/block-transform-stream.ts index 0462876d..14e1d4fa 100644 --- a/lib/block-transform-stream.ts +++ b/lib/block-transform-stream.ts @@ -28,7 +28,7 @@ export class BlockTransformStream extends Transform { private writeBuffers(flush = false) { if (flush || this._bytes >= this.chunkSize) { - let block = Buffer.concat(this._buffers); + let block = Buffer.concat(this._buffers, this._bytes); const length = flush ? block.length : Math.floor(block.length / this.chunkSize) * this.chunkSize; diff --git a/lib/block-write-stream.ts b/lib/block-write-stream.ts index 54a0bcd6..267105f1 100644 --- a/lib/block-write-stream.ts +++ b/lib/block-write-stream.ts @@ -81,7 +81,7 @@ export class BlockWriteStream extends Writable { private async writeBuffers(): Promise { if (this._bytes >= CHUNK_SIZE) { - let block = Buffer.concat(this._buffers); + let block = Buffer.concat(this._buffers, this._bytes); const length = Math.floor(block.length / this.destination.blockSize) * this.destination.blockSize; From a0be4f2cdd5cb58f3dec4479cc79c907c760554b Mon Sep 17 00:00:00 2001 From: Alexis Svinartchouk Date: Wed, 11 Mar 2020 14:24:28 +0100 Subject: [PATCH 03/23] Drop node 6 support Change-type: major --- lib/fs.ts | 188 ++--------------------------- lib/lazy.ts | 5 +- lib/source-destination/dmg.ts | 2 +- lib/source-destination/file.ts | 3 +- lib/source-destination/xz.ts | 2 +- package.json | 2 +- tsconfig.json | 12 +- typings/lzma-native/index.d.ts | 5 +- typings/mountutils/index.d.ts | 2 +- typings/readable-stream/index.d.ts | 5 +- 10 files changed, 26 insertions(+), 200 deletions(-) diff --git a/lib/fs.ts b/lib/fs.ts index f9c4dd69..867d28df 100644 --- a/lib/fs.ts +++ b/lib/fs.ts @@ -14,180 +14,16 @@ * limitations under the License. */ -import { ReadResult, WriteResult } from 'file-disk'; import * as fs from 'fs'; - -export async function close(fd: number): Promise { - await new Promise((resolve: () => void, reject: (err: Error) => void) => { - fs.close(fd, (err: Error) => { - if (err) { - reject(err); - return; - } - resolve(); - }); - }); -} - -export async function fstat(fd: number): Promise { - return await new Promise( - (resolve: (stats: fs.Stats) => void, reject: (err: Error) => void) => { - fs.fstat(fd, (err: Error, stats: fs.Stats) => { - if (err) { - reject(err); - return; - } - resolve(stats); - }); - }, - ); -} - -export async function fsync(fd: number): Promise { - await new Promise((resolve: () => void, reject: (err: Error) => void) => { - fs.fsync(fd, (err: Error) => { - if (err) { - reject(err); - return; - } - resolve(); - }); - }); -} - -export async function open( - path: string | Buffer, - flags: string | number, - mode = 0o666, -): Promise { - return await new Promise( - (resolve: (fd: number) => void, reject: (err: Error) => void) => { - fs.open(path, flags, mode, (err: Error, fd: number) => { - if (err) { - reject(err); - return; - } - resolve(fd); - }); - }, - ); -} - -export async function read( - fd: number, - buf: Buffer, - offset: number, - length: number, - position: number, -): Promise { - return await new Promise( - (resolve: (result: ReadResult) => void, reject: (err: Error) => void) => { - fs.read( - fd, - buf, - offset, - length, - position, - (err: Error, bytesRead: number, buffer: Buffer) => { - if (err) { - reject(err); - return; - } - resolve({ bytesRead, buffer }); - }, - ); - }, - ); -} - -export async function readFile( - path: string, - options: { encoding: string | null; flag: string } | undefined = { - encoding: null, - flag: 'r', - }, -): Promise { - return await new Promise( - ( - resolve: (data: string | Buffer) => void, - reject: (err: Error) => void, - ) => { - fs.readFile(path, options, (err: Error, data: string | Buffer) => { - if (err) { - reject(err); - return; - } - resolve(data); - }); - }, - ); -} - -export async function stat(path: string | Buffer): Promise { - return await new Promise( - (resolve: (stats: fs.Stats) => void, reject: (err: Error) => void) => { - fs.stat(path, (err: Error, stats: fs.Stats) => { - if (err) { - reject(err); - return; - } - resolve(stats); - }); - }, - ); -} - -export async function writeFile( - path: string, - data: string | Buffer, - options = { encoding: 'utf8', mode: 0o666, flag: 'w' }, -): Promise { - await new Promise((resolve: () => void, reject: (err: Error) => void) => { - fs.writeFile(path, data, options, (err: Error) => { - if (err) { - reject(err); - return; - } - resolve(); - }); - }); -} - -export async function unlink(path: string | Buffer): Promise { - await new Promise((resolve: () => void, reject: (err: Error) => void) => { - fs.unlink(path, (err: Error) => { - if (err) { - reject(err); - return; - } - resolve(); - }); - }); -} - -export async function write( - fd: number, - buf: Buffer, - offset: number, - length: number, - position: number, -): Promise { - return await new Promise( - (resolve: (result: WriteResult) => void, reject: (err: Error) => void) => { - fs.write( - fd, - buf, - offset, - length, - position, - (err: Error, bytesWritten: number, buffer: Buffer) => { - if (err) { - reject(err); - return; - } - resolve({ bytesWritten, buffer }); - }, - ); - }, - ); -} +import { promisify } from 'util'; + +export const close = promisify(fs.close); +export const fstat = promisify(fs.fstat); +export const fsync = promisify(fs.fsync); +export const open = promisify(fs.open); +export const read = promisify(fs.read); +export const readFile = promisify(fs.readFile); +export const stat = promisify(fs.stat); +export const unlink = promisify(fs.unlink); +export const write = promisify(fs.write); +export const writeFile = promisify(fs.writeFile); diff --git a/lib/lazy.ts b/lib/lazy.ts index 36529161..a2c1dc37 100644 --- a/lib/lazy.ts +++ b/lib/lazy.ts @@ -14,13 +14,12 @@ See the License for the specific language governing permissions and limitations under the License. */ +import { once } from 'lodash'; +import { promisify } from 'util'; import * as xxhash from 'xxhash'; export type XXHash = typeof xxhash; -import { promisify } from 'bluebird'; -import { once } from 'lodash'; - export const getRaspberrypiUsbboot = once(() => { try { return require('node-raspberrypi-usbboot') as typeof import('node-raspberrypi-usbboot'); diff --git a/lib/source-destination/dmg.ts b/lib/source-destination/dmg.ts index bab2e383..d2224618 100644 --- a/lib/source-destination/dmg.ts +++ b/lib/source-destination/dmg.ts @@ -14,9 +14,9 @@ * limitations under the License. */ -import { promisify } from 'bluebird'; import * as _ from 'lodash'; import { BLOCK, CHECKSUM_TYPE, Image as UDIFImage, SECTOR_SIZE } from 'udif'; +import { promisify } from 'util'; import { Metadata } from './metadata'; import { SourceDestination, SourceDestinationFs } from './source-destination'; diff --git a/lib/source-destination/file.ts b/lib/source-destination/file.ts index 36865cf2..aa8da542 100644 --- a/lib/source-destination/file.ts +++ b/lib/source-destination/file.ts @@ -34,8 +34,6 @@ import { } from '../sparse-stream/sparse-write-stream'; export const ProgressWriteStream = makeClassEmitProgressEvents( - // type definitions for node 6 export fs.WriteStream as an interface, but it's a class. - // @ts-ignore fs.WriteStream, 'bytesWritten', 'bytesWritten', @@ -135,6 +133,7 @@ export class File extends SourceDestination { } public async createWriteStream(): Promise { + // @ts-ignore: @types/node is wrong about fs.WriteStream constructor: it takes 2 arguments, the first one is the file path const stream = new ProgressWriteStream(null, { fd: this.fd, autoClose: false, diff --git a/lib/source-destination/xz.ts b/lib/source-destination/xz.ts index 0f60b0be..fe023841 100644 --- a/lib/source-destination/xz.ts +++ b/lib/source-destination/xz.ts @@ -14,9 +14,9 @@ * limitations under the License. */ -import { promisify } from 'bluebird'; import { createDecompressor, parseFileIndex } from 'lzma-native'; import { Transform } from 'stream'; +import { promisify } from 'util'; import { CompressedSource } from './compressed-source'; import { SourceDestination } from './source-destination'; diff --git a/package.json b/package.json index db976b25..a4915cc8 100644 --- a/package.json +++ b/package.json @@ -49,7 +49,6 @@ "winusb-driver-generator": "^1.2.3" }, "dependencies": { - "@types/node": "^6.0.112", "axios": "^0.18.0", "blockmap": "^4.0.0", "bluebird": "^3.5.1", @@ -82,6 +81,7 @@ "@types/file-type": "^5.2.1", "@types/lodash": "^4.14.108", "@types/mocha": "^5.2.4", + "@types/node": "^8.10.59", "@types/progress": "^2.0.1", "@types/sinon": "^5.0.1", "@types/yargs": "^11.0.0", diff --git a/tsconfig.json b/tsconfig.json index afe30c89..562054b1 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -5,21 +5,13 @@ "outDir": "build", "sourceMap": true, "declaration": true, - "target": "es6", + "target": "es2017", "noImplicitAny": true, "noUnusedLocals": true, "noUnusedParameters": true, - "strictNullChecks": true, - "lib": [ - "es2016" - ] + "strictNullChecks": true }, "include": [ "lib" - ], - "exclude": [ - "node_modules", - "build", - "tests" ] } diff --git a/typings/lzma-native/index.d.ts b/typings/lzma-native/index.d.ts index d6d3abf3..f970eb3c 100644 --- a/typings/lzma-native/index.d.ts +++ b/typings/lzma-native/index.d.ts @@ -12,6 +12,9 @@ declare module 'lzma-native' { cb: (err: Error | null, buffer?: Buffer) => any, ) => void; }, - callback: (error?: Error, metadata?: { uncompressedSize: number }) => void, + callback: ( + error: Error | null, + metadata: { uncompressedSize: number }, + ) => void, ): void; } diff --git a/typings/mountutils/index.d.ts b/typings/mountutils/index.d.ts index 4bc1d4f6..e62ec828 100644 --- a/typings/mountutils/index.d.ts +++ b/typings/mountutils/index.d.ts @@ -1,6 +1,6 @@ declare module 'mountutils' { export function unmountDisk( device: string, - callback: (error: any, result?: any) => void, + callback: (error?: Error | null) => void, ): void; } diff --git a/typings/readable-stream/index.d.ts b/typings/readable-stream/index.d.ts index 336793aa..96b8390a 100644 --- a/typings/readable-stream/index.d.ts +++ b/typings/readable-stream/index.d.ts @@ -13,8 +13,5 @@ declare module 'readable-stream' { export class Transform extends NodeJSTransform {} - export class Writable extends NodeJSWritable { - // destroy does not exist in node 6 Writable - public destroy(error?: Error): this; - } + export class Writable extends NodeJSWritable {} } From de87be53766b15ef5bde3cd2c02f6fdc8880bcfb Mon Sep 17 00:00:00 2001 From: Alexis Svinartchouk Date: Wed, 11 Mar 2020 19:51:00 +0100 Subject: [PATCH 04/23] LockableBuffer class --- lib/lockable-buffer.ts | 24 ++++++++++++++++++++++++ package.json | 2 ++ typings/ronomon__direct-io/index.d.ts | 3 +++ typings/rwmutex/index.d.ts | 7 +++++++ 4 files changed, 36 insertions(+) create mode 100644 lib/lockable-buffer.ts create mode 100644 typings/ronomon__direct-io/index.d.ts create mode 100644 typings/rwmutex/index.d.ts diff --git a/lib/lockable-buffer.ts b/lib/lockable-buffer.ts new file mode 100644 index 00000000..f173f05f --- /dev/null +++ b/lib/lockable-buffer.ts @@ -0,0 +1,24 @@ +import { getAlignedBuffer } from '@ronomon/direct-io'; +import RWMutex = require('rwmutex'); + +export interface LockableBuffer extends Buffer { + lock: () => Promise<() => void>; + rlock: () => Promise<() => void>; + slice: (start?: number, end?: number) => LockableBuffer; +} + +function attachMutex(buf: Buffer, mutex: RWMutex): LockableBuffer { + const buffer = buf as LockableBuffer; + buffer.lock = mutex.lock.bind(mutex); + buffer.rlock = mutex.rlock.bind(mutex); + const bufferSlice = buffer.slice.bind(buffer); + buffer.slice = (...args) => { + const slice = bufferSlice(...args); + return attachMutex(slice, mutex); + }; + return buffer; +} + +export function createBuffer(size: number, alignment: number): LockableBuffer { + return attachMutex(getAlignedBuffer(size, alignment), new RWMutex()); +} diff --git a/package.json b/package.json index a4915cc8..272ba06b 100644 --- a/package.json +++ b/package.json @@ -49,6 +49,7 @@ "winusb-driver-generator": "^1.2.3" }, "dependencies": { + "@ronomon/direct-io": "^3.0.1", "axios": "^0.18.0", "blockmap": "^4.0.0", "bluebird": "^3.5.1", @@ -65,6 +66,7 @@ "partitioninfo": "^5.3.4", "readable-stream": "^2.3.6", "resin-image-fs": "^5.0.8", + "rwmutex": "^1.0.0", "speedometer": "^1.0.0", "udif": "^0.15.7", "unbzip2-stream": "balena-io-modules/unbzip2-stream#942fc218013c14adab01cf693b0500cf6ac83193", diff --git a/typings/ronomon__direct-io/index.d.ts b/typings/ronomon__direct-io/index.d.ts new file mode 100644 index 00000000..4cadd905 --- /dev/null +++ b/typings/ronomon__direct-io/index.d.ts @@ -0,0 +1,3 @@ +declare module '@ronomon/direct-io' { + function getAlignedBuffer(size: number, alignment: number): Buffer; +} diff --git a/typings/rwmutex/index.d.ts b/typings/rwmutex/index.d.ts new file mode 100644 index 00000000..4e3ccb4f --- /dev/null +++ b/typings/rwmutex/index.d.ts @@ -0,0 +1,7 @@ +declare module 'rwmutex' { + class RWMutex { + public lock: () => Promise<() => void>; + public rlock: () => Promise<() => void>; + } + export = RWMutex; +} From 1a7a17c36133e9919926cd59dc938cf3a5e4ed17 Mon Sep 17 00:00:00 2001 From: Alexis Svinartchouk Date: Thu, 12 Mar 2020 13:17:01 +0100 Subject: [PATCH 05/23] Use aligned buffers to read and write block devices with O_DIRECT Change-type: major --- examples/balena-s3-configure.ts | 5 +- examples/file-to-file.ts | 6 +- examples/http-zip.ts | 5 +- examples/multi-destination.ts | 31 ++-- examples/usbboot.ts | 1 - examples/utils.ts | 12 +- lib/aligned-lockable-buffer.ts | 66 ++++++++ lib/block-read-stream.ts | 76 ++++++---- lib/block-transform-stream.ts | 90 +++++++---- lib/block-write-stream.ts | 142 ++++++------------ lib/constants.ts | 1 + lib/lockable-buffer.ts | 24 --- lib/multi-write.ts | 50 ++++-- lib/scanner/adapters/block-device.ts | 14 +- lib/source-destination/balena-s3-source.ts | 9 +- lib/source-destination/block-device.ts | 86 +++++++---- lib/source-destination/compressed-source.ts | 9 +- .../configured-source/configured-source.ts | 63 +++++--- lib/source-destination/dmg.ts | 45 ++++-- lib/source-destination/file.ts | 125 +++++++++------ lib/source-destination/http.ts | 11 +- lib/source-destination/multi-destination.ts | 51 +++++-- .../single-use-stream-source.ts | 12 +- lib/source-destination/source-destination.ts | 74 ++++++--- lib/source-destination/zip.ts | 108 +++++++------ lib/sparse-stream/shared.ts | 11 +- lib/sparse-stream/sparse-filter-stream.ts | 20 ++- lib/sparse-stream/sparse-read-stream.ts | 73 ++++++--- lib/sparse-stream/sparse-transform-stream.ts | 86 +++++++++++ lib/sparse-stream/sparse-write-stream.ts | 104 ++++++++----- lib/utils.ts | 29 +++- tests/block-write-stream.spec.ts | 81 ++++++---- tests/directory.spec.ts | 5 +- tests/dmg.spec.ts | 1 - tests/get-inner-source.spec.ts | 11 +- tests/single-use-stream-source.spec.ts | 7 +- tests/sparse.spec.ts | 37 +---- tests/tester.ts | 22 +-- tests/zip.spec.ts | 5 +- typings/ronomon__direct-io/index.d.ts | 2 + 40 files changed, 1026 insertions(+), 584 deletions(-) create mode 100644 lib/aligned-lockable-buffer.ts delete mode 100644 lib/lockable-buffer.ts create mode 100644 lib/sparse-stream/sparse-transform-stream.ts diff --git a/examples/balena-s3-configure.ts b/examples/balena-s3-configure.ts index 3222dcc5..3e23cf23 100644 --- a/examples/balena-s3-configure.ts +++ b/examples/balena-s3-configure.ts @@ -48,10 +48,7 @@ const main = async ({ config !== undefined ? { config: await readJsonFile(config) } : undefined, ); } - const destination = new sourceDestination.File( - fileDestination, - sourceDestination.File.OpenFlags.ReadWrite, - ); + const destination = new sourceDestination.File(fileDestination, true); await pipeSourceToDestinationsWithProgressBar(source, [destination], verify); }; diff --git a/examples/file-to-file.ts b/examples/file-to-file.ts index fe35d91c..a92e8ccf 100644 --- a/examples/file-to-file.ts +++ b/examples/file-to-file.ts @@ -33,12 +33,8 @@ const main = async ({ }: any) => { let source: sourceDestination.SourceDestination = new sourceDestination.File( fileSource, - sourceDestination.File.OpenFlags.Read, - ); - const destination = new sourceDestination.File( - fileDestination, - sourceDestination.File.OpenFlags.ReadWrite, ); + const destination = new sourceDestination.File(fileDestination, true); source = await source.getInnerSource(); const canRead = await source.canRead(); if (trim || config !== undefined) { diff --git a/examples/http-zip.ts b/examples/http-zip.ts index a9eaa08a..9e1e99d9 100644 --- a/examples/http-zip.ts +++ b/examples/http-zip.ts @@ -22,10 +22,7 @@ import { pipeSourceToDestinationsWithProgressBar, wrapper } from './utils'; const main = async ({ zipSource, fileDestination, verify }: any) => { const sourceHttp = new sourceDestination.Http(zipSource); - const destinationFile = new sourceDestination.File( - fileDestination, - sourceDestination.File.OpenFlags.ReadWrite, - ); + const destinationFile = new sourceDestination.File(fileDestination, true); const sourceZip = await sourceHttp.getInnerSource(); await pipeSourceToDestinationsWithProgressBar( sourceZip, diff --git a/examples/multi-destination.ts b/examples/multi-destination.ts index be97d6c0..9a2a3b48 100644 --- a/examples/multi-destination.ts +++ b/examples/multi-destination.ts @@ -26,14 +26,21 @@ import { const main = async ({ sourceImage, - devicePathPrefix, + devices, verify, trim, config, -}: any) => { + numBuffers, +}: { + sourceImage: string; + devices: string[]; + verify: boolean; + trim: boolean; + config: string; + numBuffers: number; +}) => { const adapters = [ - new scanner.adapters.BlockDeviceAdapter(() => false), - new scanner.adapters.UsbbootDeviceAdapter(), + new scanner.adapters.BlockDeviceAdapter(() => false, false, true, true), ]; const deviceScanner = new scanner.Scanner(adapters); deviceScanner.on('error', console.error); @@ -44,7 +51,6 @@ const main = async ({ }); let source: sourceDestination.SourceDestination = new sourceDestination.File( sourceImage, - sourceDestination.File.OpenFlags.Read, ); source = await source.getInnerSource(); // getInnerSource will open the sources for you, no need to call open(). if (trim || config !== undefined) { @@ -58,7 +64,7 @@ const main = async ({ } const destinationDrives = Array.from(deviceScanner.drives.values()).filter( drive => { - return drive.devicePath && drive.devicePath.startsWith(devicePathPrefix); + return devices.includes(drive.device!); }, ); try { @@ -66,6 +72,7 @@ const main = async ({ source, destinationDrives, verify, + numBuffers, ); } finally { deviceScanner.stop(); @@ -74,15 +81,19 @@ const main = async ({ // tslint:disable-next-line: no-var-requires const argv = require('yargs').command( - '$0 ', - 'Write the sourceImage on all drives which link name in /dev/disk/by-path/ starts with devicePathPrefix.', + '$0 [devices..]', + 'Write the sourceImage on all devices.', (yargs: Argv) => { yargs.positional('sourceImage', { describe: 'Source image' }); - yargs.positional('devicePathPrefix', { - describe: 'Devices name prefix in /dev/disk/by-path/', + yargs.positional('devices', { + describe: 'Devices to write to', }); yargs.option('verify', { default: false }); yargs.option('trim', { default: false }); + yargs.option('numBuffers', { + default: 16, + describe: 'Number of 1MiB buffers used to buffer data', + }); yargs.describe('config', 'json configuration file'); }, ).argv; diff --git a/examples/usbboot.ts b/examples/usbboot.ts index 9e2aca45..4cdc0724 100644 --- a/examples/usbboot.ts +++ b/examples/usbboot.ts @@ -86,7 +86,6 @@ async function main() { console.log(`Writing image ${argv[2]}`); let source: sourceDestination.SourceDestination = new sourceDestination.File( argv[2], - sourceDestination.File.OpenFlags.Read, ); if (await source.canRead()) { source = new sourceDestination.ConfiguredSource(source, true, true); diff --git a/examples/utils.ts b/examples/utils.ts index c0cac96e..2fa5077c 100644 --- a/examples/utils.ts +++ b/examples/utils.ts @@ -110,12 +110,21 @@ export async function pipeSourceToDestinationsWithProgressBar( source: sourceDestination.SourceDestination, destinations: sourceDestination.SourceDestination[], verify = false, + numBuffers = 16, ): Promise { function onFail( destination: sourceDestination.SourceDestination, error: Error, ) { - console.error(`Error "${error}" on ${destination}`); + let name: string; + if (destination instanceof sourceDestination.BlockDevice) { + name = destination.device; + } else if (destination instanceof sourceDestination.File) { + name = destination.path; + } else { + name = destination.toString(); + } + console.error(`Error "${error}" on ${name}`); } let step: multiWrite.WriteStep; let progressBar: any | ProgressBar | Spinner; @@ -143,6 +152,7 @@ export async function pipeSourceToDestinationsWithProgressBar( onFail, onProgress, verify, + numBuffers, ); // Sleep here to be sure the last spinner title was shown. await delay(SPINNER_DELAY); diff --git a/lib/aligned-lockable-buffer.ts b/lib/aligned-lockable-buffer.ts new file mode 100644 index 00000000..d54ca60b --- /dev/null +++ b/lib/aligned-lockable-buffer.ts @@ -0,0 +1,66 @@ +import { getAlignedBuffer } from '@ronomon/direct-io'; +import RWMutex = require('rwmutex'); + +export interface AlignedLockableBuffer extends Buffer { + alignment: number; + lock: () => Promise<() => void>; + rlock: () => Promise<() => void>; + slice: (start?: number, end?: number) => AlignedLockableBuffer; +} + +function attachMutex( + buf: Buffer, + mutex: RWMutex, + alignment: number, +): AlignedLockableBuffer { + const buffer = buf as AlignedLockableBuffer; + buffer.alignment = alignment; + buffer.lock = mutex.lock.bind(mutex); + buffer.rlock = mutex.rlock.bind(mutex); + const bufferSlice = buffer.slice.bind(buffer); + buffer.slice = (...args) => { + const slice = bufferSlice(...args); + return attachMutex(slice, mutex, alignment); + }; + return buffer; +} + +export function createBuffer( + size: number, + alignment: number, +): AlignedLockableBuffer { + return attachMutex( + getAlignedBuffer(size, alignment), + new RWMutex(), + alignment, + ); +} + +export function isAlignedLockableBuffer( + buffer: Buffer, +): buffer is AlignedLockableBuffer { + return (buffer as AlignedLockableBuffer).rlock !== undefined; +} + +export class AlignedReadableState { + private buffers: AlignedLockableBuffer[]; + private currentBufferIndex = 0; + + constructor( + private bufferSize: number, + private alignment: number, + private numBuffers: number, + ) { + this.buffers = new Array(numBuffers); + } + + public getCurrentBuffer(): AlignedLockableBuffer { + let buffer = this.buffers[this.currentBufferIndex]; + if (buffer === undefined) { + buffer = createBuffer(this.bufferSize, this.alignment); + this.buffers[this.currentBufferIndex] = buffer; + } + this.currentBufferIndex = (this.currentBufferIndex + 1) % this.numBuffers; + return buffer; + } +} diff --git a/lib/block-read-stream.ts b/lib/block-read-stream.ts index 6744ae34..f3aba57a 100644 --- a/lib/block-read-stream.ts +++ b/lib/block-read-stream.ts @@ -18,6 +18,7 @@ import { delay } from 'bluebird'; import { ReadResult } from 'file-disk'; import { Readable } from 'readable-stream'; +import { AlignedReadableState } from './aligned-lockable-buffer'; import { CHUNK_SIZE, PROGRESS_EMISSION_INTERVAL, @@ -28,19 +29,42 @@ import { File } from './source-destination/file'; import { makeClassEmitProgressEvents } from './source-destination/progress'; export class BlockReadStream extends Readable { - private chunkSize: number; + private source: File; + private alignedReadableState: AlignedReadableState; + private bytesRead = 0; + private end: number; + private maxRetries: number; - constructor( - private source: File, - private bytesRead = 0, - private end = Infinity, + constructor({ + source, + alignment, + start = 0, + end = Infinity, chunkSize = CHUNK_SIZE, - private maxRetries = 5, - ) { - super({ objectMode: true, highWaterMark: 2 }); - this.chunkSize = Math.max( - Math.floor(chunkSize / this.source.blockSize) * this.source.blockSize, - this.source.blockSize, + maxRetries = 5, + numBuffers = 2, + }: { + source: File; + alignment: number; + start?: number; + end?: number; + chunkSize?: number; + maxRetries?: number; + numBuffers?: number; + }) { + super({ objectMode: true, highWaterMark: numBuffers - 1 }); + this.source = source; + this.bytesRead = start; + this.end = end; + this.maxRetries = maxRetries; + chunkSize = Math.max( + Math.floor(chunkSize / alignment) * alignment, + alignment, + ); + this.alignedReadableState = new AlignedReadableState( + chunkSize, + alignment, + numBuffers, ); } @@ -65,34 +89,30 @@ export class BlockReadStream extends Readable { } } - private async __read(): Promise { - const toRead = this.end - this.bytesRead + 1; // end is inclusive - - if (toRead <= 0) { + public async _read(): Promise { + if (this.bytesRead > this.end) { this.push(null); return; } - - // Read chunkSize bytes if available, else all remaining bytes. - const length = Math.min(this.chunkSize, toRead); - const buffer = Buffer.allocUnsafe(length); - + let buffer = this.alignedReadableState.getCurrentBuffer(); + const toRead = this.end - this.bytesRead + 1; + if (toRead < buffer.length) { + buffer = buffer.slice(0, toRead); + } try { + const unlock = await buffer.lock(); const { bytesRead } = await this.tryRead(buffer); - if (bytesRead === 0) { + unlock(); + this.bytesRead += bytesRead; + if (bytesRead !== 0) { + this.push(buffer.slice(0, bytesRead)); + } else { this.push(null); - return; } - this.bytesRead += bytesRead; - this.push(buffer.slice(0, bytesRead)); } catch (error) { this.emit('error', error); } } - - public _read() { - this.__read(); - } } export const ProgressBlockReadStream = makeClassEmitProgressEvents( diff --git a/lib/block-transform-stream.ts b/lib/block-transform-stream.ts index 14e1d4fa..09f5332f 100644 --- a/lib/block-transform-stream.ts +++ b/lib/block-transform-stream.ts @@ -16,60 +16,92 @@ import { Transform } from 'readable-stream'; +import { AlignedReadableState } from './aligned-lockable-buffer'; +import { CHUNK_SIZE } from './constants'; + export class BlockTransformStream extends Transform { public bytesRead = 0; public bytesWritten = 0; - private _buffers: Buffer[] = []; - private _bytes = 0; + private chunkSize: number; + private alignedReadableState: AlignedReadableState; + private inputBuffers: Buffer[] = []; + private inputBytes = 0; - constructor(private chunkSize: number) { - super(); + constructor({ + chunkSize, + alignment, + numBuffers = 2, + }: { + chunkSize: number; + alignment: number; + numBuffers?: number; + }) { + super({ objectMode: true, highWaterMark: numBuffers - 1 }); + this.chunkSize = chunkSize; + this.alignedReadableState = new AlignedReadableState( + chunkSize, + alignment, + numBuffers, + ); } - private writeBuffers(flush = false) { - if (flush || this._bytes >= this.chunkSize) { - let block = Buffer.concat(this._buffers, this._bytes); + private async writeBuffers(flush = false): Promise { + if (flush || this.inputBytes >= this.chunkSize) { + // TODO optimize + let block = Buffer.concat(this.inputBuffers, this.inputBytes); const length = flush ? block.length : Math.floor(block.length / this.chunkSize) * this.chunkSize; - this._buffers.length = 0; - this._bytes = 0; + this.inputBuffers.length = 0; + this.inputBytes = 0; if (block.length !== length) { - this._buffers.push(block.slice(length)); - this._bytes += block.length - length; + this.inputBuffers.push(block.slice(length)); + this.inputBytes += block.length - length; block = block.slice(0, length); } - this.bytesWritten += block.length; - this.push(block); + const alignedBuffer = this.alignedReadableState.getCurrentBuffer(); + const unlock = await alignedBuffer.lock(); + block.copy(alignedBuffer); + unlock(); + this.bytesWritten += length; + this.push(alignedBuffer.slice(0, length)); } } - public _transform( + public async _transform( chunk: Buffer, _encoding: string, callback: (error?: Error) => void, - ) { + ): Promise { this.bytesRead += chunk.length; - if ( - this._bytes === 0 && - chunk.length >= this.chunkSize && - chunk.length % this.chunkSize === 0 - ) { - this.bytesWritten += chunk.length; - this.push(chunk); - } else { - this._buffers.push(chunk); - this._bytes += chunk.length; - this.writeBuffers(); - } + this.inputBuffers.push(chunk); + this.inputBytes += chunk.length; + await this.writeBuffers(); callback(); } - public _flush(callback: (error?: Error) => void) { - this.writeBuffers(true); + public async _flush(callback: (error?: Error) => void): Promise { + await this.writeBuffers(true); callback(); } + + public static alignIfNeeded( + stream: NodeJS.ReadableStream, + alignment?: number, + numBuffers?: number, + ) { + if (alignment === undefined) { + return stream; + } + const transform = new BlockTransformStream({ + chunkSize: CHUNK_SIZE, + alignment, + numBuffers, + }); + stream.pipe(transform); + return transform; + } } diff --git a/lib/block-write-stream.ts b/lib/block-write-stream.ts index 267105f1..9431f89d 100644 --- a/lib/block-write-stream.ts +++ b/lib/block-write-stream.ts @@ -14,15 +14,13 @@ * limitations under the License. */ +import { getAlignedBuffer } from '@ronomon/direct-io'; import { delay } from 'bluebird'; import * as _debug from 'debug'; import { Writable } from 'readable-stream'; -import { - CHUNK_SIZE, - PROGRESS_EMISSION_INTERVAL, - RETRY_BASE_TIMEOUT, -} from './constants'; +import { AlignedLockableBuffer } from './aligned-lockable-buffer'; +import { PROGRESS_EMISSION_INTERVAL, RETRY_BASE_TIMEOUT } from './constants'; import { isTransientError } from './errors'; import { BlockDevice } from './source-destination/block-device'; import { makeClassEmitProgressEvents } from './source-destination/progress'; @@ -31,39 +29,35 @@ import { asCallback } from './utils'; const debug = _debug('etcher:writer:block-write-stream'); export class BlockWriteStream extends Writable { + private destination: BlockDevice; + private delayFirstBuffer: boolean; + private maxRetries: number; public bytesWritten = 0; - private _firstBuffers: Buffer[] = []; - private _buffers: Buffer[] = []; - private _bytes = 0; - - constructor( - private destination: BlockDevice, - public firstBytesToKeep = 0, - private maxRetries = 5, - ) { - super({ objectMode: true, highWaterMark: 1 }); - this.firstBytesToKeep = - Math.ceil(firstBytesToKeep / destination.blockSize) * - destination.blockSize; + private position = 0; + private firstBuffer?: Buffer; + + constructor({ + destination, + highWaterMark, + delayFirstBuffer = false, + maxRetries = 5, + }: { + destination: BlockDevice; + highWaterMark?: number; + delayFirstBuffer?: boolean; + maxRetries?: number; + }) { + super({ objectMode: true, highWaterMark }); + this.destination = destination; + this.delayFirstBuffer = delayFirstBuffer; + this.maxRetries = maxRetries; } - private async writeChunk( - buffer: Buffer, - position: number, - flushing = false, - ): Promise { + private async writeBuffer(buffer: Buffer, position: number): Promise { let retries = 0; while (true) { try { - const { bytesWritten } = await this.destination.write( - buffer, - 0, - buffer.length, - position, - ); - if (!flushing) { - this.bytesWritten += bytesWritten; - } + await this.destination.write(buffer, 0, buffer.length, position); return; } catch (error) { if (isTransientError(error)) { @@ -79,59 +73,27 @@ export class BlockWriteStream extends Writable { } } - private async writeBuffers(): Promise { - if (this._bytes >= CHUNK_SIZE) { - let block = Buffer.concat(this._buffers, this._bytes); - const length = - Math.floor(block.length / this.destination.blockSize) * - this.destination.blockSize; - - this._buffers.length = 0; - this._bytes = 0; - - if (block.length !== length) { - this._buffers.push(block.slice(length)); - this._bytes += block.length - length; - block = block.slice(0, length); - } - - await this.writeChunk(block, this.bytesWritten); - } - } - - private async __write(buffer: Buffer): Promise { - debug('_write', buffer.length, this.bytesWritten); - - // Keep the first blocks in memory and write them once the rest has been written. - // This is to prevent Windows from mounting the device while we flash it. - if (this.bytesWritten < this.firstBytesToKeep) { - const end = this.bytesWritten + buffer.length; - if (end <= this.firstBytesToKeep) { - this._firstBuffers.push(buffer); - this.bytesWritten += buffer.length; + private async __write(buffer: AlignedLockableBuffer): Promise { + const unlock = await buffer.rlock(); + debug('_write', buffer.length, this.position, this.bytesWritten); + try { + // Keep the first buffer in memory and write it once the rest has been written. + // This is to prevent Windows from mounting the device while we flash it. + if (this.delayFirstBuffer && this.firstBuffer === undefined) { + this.firstBuffer = getAlignedBuffer(buffer.length, buffer.alignment); + buffer.copy(this.firstBuffer); } else { - const difference = this.firstBytesToKeep - this.bytesWritten; - this._firstBuffers.push(buffer.slice(0, difference)); - this._buffers.push(buffer.slice(difference)); - this._bytes += buffer.length - difference; - this.bytesWritten += difference; - await this.writeBuffers(); + await this.writeBuffer(buffer, this.position); + this.bytesWritten += buffer.length; } - } else if ( - this._bytes === 0 && - buffer.length >= CHUNK_SIZE && - buffer.length % this.destination.blockSize === 0 - ) { - await this.writeChunk(buffer, this.bytesWritten); - } else { - this._buffers.push(buffer); - this._bytes += buffer.length; - await this.writeBuffers(); + this.position += buffer.length; + } finally { + unlock(); } } public _write( - buffer: Buffer, + buffer: AlignedLockableBuffer, _encoding: string, callback: (error: Error | undefined) => void, ) { @@ -140,22 +102,14 @@ export class BlockWriteStream extends Writable { private async __final(): Promise { debug('_final'); - try { - if (this._bytes) { - await this.writeChunk( - Buffer.concat(this._buffers, this._bytes), - this.bytesWritten, - ); - } - - let position = 0; - for (const buffer of this._firstBuffers) { - await this.writeChunk(buffer, position, true); - position += buffer.length; + if (this.firstBuffer) { + try { + await this.writeBuffer(this.firstBuffer, 0); + this.bytesWritten += this.firstBuffer.length; + } catch (error) { + this.destroy(); + throw error; } - } catch (error) { - this.destroy(); - throw error; } } diff --git a/lib/constants.ts b/lib/constants.ts index d0da64bf..85393197 100644 --- a/lib/constants.ts +++ b/lib/constants.ts @@ -20,3 +20,4 @@ export const CHUNK_SIZE = 1024 ** 2; export const NO_MATCHING_FILE_MSG = "Can't find a matching file in this zip archive"; export const XXHASH_SEED = 0x45544348; // Seed value 0x45544348 = ASCII "ETCH" +export const DEFAULT_ALIGNMENT = 512; diff --git a/lib/lockable-buffer.ts b/lib/lockable-buffer.ts deleted file mode 100644 index f173f05f..00000000 --- a/lib/lockable-buffer.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { getAlignedBuffer } from '@ronomon/direct-io'; -import RWMutex = require('rwmutex'); - -export interface LockableBuffer extends Buffer { - lock: () => Promise<() => void>; - rlock: () => Promise<() => void>; - slice: (start?: number, end?: number) => LockableBuffer; -} - -function attachMutex(buf: Buffer, mutex: RWMutex): LockableBuffer { - const buffer = buf as LockableBuffer; - buffer.lock = mutex.lock.bind(mutex); - buffer.rlock = mutex.rlock.bind(mutex); - const bufferSlice = buffer.slice.bind(buffer); - buffer.slice = (...args) => { - const slice = bufferSlice(...args); - return attachMutex(slice, mutex); - }; - return buffer; -} - -export function createBuffer(size: number, alignment: number): LockableBuffer { - return attachMutex(getAlignedBuffer(size, alignment), new RWMutex()); -} diff --git a/lib/multi-write.ts b/lib/multi-write.ts index 1fd946ac..835eb06e 100644 --- a/lib/multi-write.ts +++ b/lib/multi-write.ts @@ -85,7 +85,11 @@ export async function pipeSourceToDestinations( onFail: OnFailFunction, onProgress: OnProgressFunction, verify = false, + numBuffers = 16, ): Promise { + if (numBuffers < 2) { + numBuffers = 2; + } const destination = new MultiDestination(destinations); const failures: Map = new Map(); let bytesWritten = 0; @@ -193,6 +197,7 @@ export async function pipeSourceToDestinations( source, destination, verify, + numBuffers, updateState, _onFail, _onProgress, @@ -204,6 +209,7 @@ export async function pipeSourceToDestinations( sourceMetadata, destination, verify, + numBuffers, updateState, _onFail, _onProgress, @@ -220,6 +226,7 @@ async function pipeRegularSourceToDestination( sourceMetadata: Metadata, destination: MultiDestination, verify: boolean, + numBuffers: number, updateState: (state?: WriteStep) => void, onFail: (error: MultiDestinationError) => void, onProgress: (progress: ProgressEvent) => void, @@ -228,9 +235,15 @@ async function pipeRegularSourceToDestination( let lastPosition = 0; const emitSourceProgress = sourceMetadata.size === undefined || sourceMetadata.isSizeEstimated; + const alignment = destination.getAlignment(); + const highWaterMark = alignment === undefined ? undefined : numBuffers - 1; const [sourceStream, destinationStream] = await Promise.all([ - source.createReadStream(emitSourceProgress), - destination.createWriteStream(), + source.createReadStream({ + emitProgress: emitSourceProgress, + alignment, + numBuffers, + }), + destination.createWriteStream({ highWaterMark }), ]); getRootStream(sourceStream).on('progress', (progress: ProgressEvent) => { _onRootStreamProgress(progress); @@ -276,13 +289,22 @@ async function pipeRegularSourceToDestination( onProgress(progress); }); if ( - !(sourceStream instanceof BlockReadStream) && - destination.destinations.size > 1 + alignment !== undefined && + !( + sourceStream instanceof BlockReadStream || + sourceStream instanceof BlockTransformStream + ) ) { - // Chunk the input stream in a transform if it's not a block read stream, avoiding - // chunking it in each destination stream. + // The destination needs data to be aligned and it isn't. + // Pass it through a BlockTransformStream to align it. sourceStream - .pipe(new BlockTransformStream(CHUNK_SIZE)) + .pipe( + new BlockTransformStream({ + chunkSize: CHUNK_SIZE, + alignment, + numBuffers, + }), + ) .pipe(destinationStream); } else { sourceStream.pipe(destinationStream); @@ -305,17 +327,23 @@ async function pipeRegularSourceToDestination( async function pipeSparseSourceToDestination( source: SourceDestination, - destination: SourceDestination, + destination: MultiDestination, verify: boolean, + numBuffers: number, updateState: (state?: WriteStep) => void, onFail: (error: MultiDestinationError) => void, onProgress: (progress: ProgressEvent) => void, _onRootStreamProgress: (progress: ProgressEvent) => void, ): Promise { - // TODO: if verify is true, we must ensure that source and destination streams hash algorithms are the same + const alignment = destination.getAlignment(); + const highWaterMark = alignment === undefined ? undefined : numBuffers - 1; const [sourceStream, destinationStream] = await Promise.all([ - source.createSparseReadStream(verify), - destination.createSparseWriteStream(), + source.createSparseReadStream({ + generateChecksums: verify, + alignment, + numBuffers, + }), + destination.createSparseWriteStream({ highWaterMark }), ]); getRootStream(sourceStream).on('progress', (progress: ProgressEvent) => { _onRootStreamProgress(progress); diff --git a/lib/scanner/adapters/block-device.ts b/lib/scanner/adapters/block-device.ts index fb5b6d1a..be80f629 100644 --- a/lib/scanner/adapters/block-device.ts +++ b/lib/scanner/adapters/block-device.ts @@ -59,7 +59,12 @@ export class BlockDeviceAdapter extends Adapter { private running = false; private ready = false; - constructor(public includeSystemDrives: () => boolean = () => false) { + constructor( + public includeSystemDrives: () => boolean = () => false, + private unmountOnSuccess = false, + private oWrite = false, + private oDirect = true, + ) { super(); } @@ -97,7 +102,12 @@ export class BlockDeviceAdapter extends Adapter { } for (const added of difference(newDevices, oldDevices)) { const drive = drives.get(added); - const blockDevice = new BlockDevice(drive!); + const blockDevice = new BlockDevice( + drive!, + this.unmountOnSuccess, + this.oWrite, + this.oDirect, + ); this.emit('attach', blockDevice); this.drives.set(added, blockDevice); } diff --git a/lib/source-destination/balena-s3-source.ts b/lib/source-destination/balena-s3-source.ts index bfe114bb..f1d06b49 100644 --- a/lib/source-destination/balena-s3-source.ts +++ b/lib/source-destination/balena-s3-source.ts @@ -19,7 +19,10 @@ import { ReadResult } from 'file-disk'; import { Http } from './http'; import { Metadata } from './metadata'; -import { SourceDestination } from './source-destination'; +import { + CreateReadStreamOptions, + SourceDestination, +} from './source-destination'; import { ZipSource } from './zip'; type Name = 'balena' | 'resin'; @@ -98,10 +101,10 @@ export class BalenaS3Source extends SourceDestination { } public async createReadStream( - ...args: any[] + options: CreateReadStreamOptions = {}, ): Promise { await this.ready; - return await this.zipSource.createReadStream(...args); + return await this.zipSource.createReadStream(options); } protected async _getMetadata(): Promise { diff --git a/lib/source-destination/block-device.ts b/lib/source-destination/block-device.ts index 60d1a7fc..11c7333d 100644 --- a/lib/source-destination/block-device.ts +++ b/lib/source-destination/block-device.ts @@ -14,23 +14,25 @@ * limitations under the License. */ +import { getAlignedBuffer, O_EXLOCK } from '@ronomon/direct-io'; import { delay } from 'bluebird'; import { Drive as DrivelistDrive } from 'drivelist'; import { ReadResult, WriteResult } from 'file-disk'; +import * as fs from 'fs'; import { platform } from 'os'; import { BlockWriteStream, ProgressBlockWriteStream, } from '../block-write-stream'; +import { DEFAULT_ALIGNMENT } from '../constants'; import { clean } from '../diskpart'; +import { getUnmountDisk } from '../lazy'; import { AdapterSourceDestination } from '../scanner/adapters/adapter'; import { ProgressSparseWriteStream, SparseWriteStream, } from '../sparse-stream/sparse-write-stream'; - -import { getUnmountDisk } from '../lazy'; import { File } from './file'; import { Metadata } from './metadata'; @@ -38,16 +40,40 @@ import { Metadata } from './metadata'; * @summary Time, in milliseconds, to wait before unmounting on success */ const UNMOUNT_ON_SUCCESS_TIMEOUT_MS = 2000; -const DEFAULT_BLOCK_SIZE = 512; const WIN32_FIRST_BYTES_TO_KEEP = 64 * 1024; -const USE_ALIGNED_IO = platform() === 'win32' || platform() === 'darwin'; export class BlockDevice extends File implements AdapterSourceDestination { public emitsProgress = false; + public readonly alignment: number; + + constructor( + private drive: DrivelistDrive, + private unmountOnSuccess = false, + oWrite = false, + public readonly oDirect = true, + ) { + super(drive.raw, oWrite); + this.alignment = drive.blockSize || DEFAULT_ALIGNMENT; + } + + public getAlignment() { + if (this.oDirect) { + return this.alignment; + } + } - constructor(private drive: DrivelistDrive, private unmountOnSuccess = false) { - super(drive.raw, File.OpenFlags.WriteDevice); - this.blockSize = drive.blockSize || DEFAULT_BLOCK_SIZE; + protected getOpenFlags() { + // tslint:disable:no-bitwise + let flags = super.getOpenFlags(); + if (this.oDirect) { + flags |= + fs.constants.O_DIRECT | fs.constants.O_SYNC | fs.constants.O_NONBLOCK; + } + if (this.oWrite) { + flags |= platform() === 'linux' ? fs.constants.O_EXCL : O_EXLOCK; + } + // tslint:enable:no-bitwise + return flags; } get isSystem(): boolean { @@ -96,20 +122,26 @@ export class BlockDevice extends File implements AdapterSourceDestination { return !this.drive.isReadOnly; } - public async createWriteStream(): Promise { - const stream = new ProgressBlockWriteStream( - this, - platform() === 'win32' ? WIN32_FIRST_BYTES_TO_KEEP : 0, - ); + public async createWriteStream({ + highWaterMark, + }: { highWaterMark?: number } = {}): Promise { + const stream = new ProgressBlockWriteStream({ + destination: this, + delayFirstBuffer: platform() === 'win32', + highWaterMark, + }); stream.on('finish', stream.emit.bind(stream, 'done')); return stream; } - public async createSparseWriteStream(): Promise { - const stream = new ProgressSparseWriteStream( - this, - platform() === 'win32' ? WIN32_FIRST_BYTES_TO_KEEP : 0, - ); + public async createSparseWriteStream({ + highWaterMark, + }: { highWaterMark?: number } = {}): Promise { + const stream = new ProgressSparseWriteStream({ + destination: this, + firstBytesToKeep: platform() === 'win32' ? WIN32_FIRST_BYTES_TO_KEEP : 0, + highWaterMark, + }); stream.on('finish', stream.emit.bind(stream, 'done')); return stream; } @@ -137,15 +169,15 @@ export class BlockDevice extends File implements AdapterSourceDestination { } private offsetIsAligned(offset: number): boolean { - return offset % this.blockSize === 0; + return offset % this.alignment === 0; } private alignOffsetBefore(offset: number): number { - return Math.floor(offset / this.blockSize) * this.blockSize; + return Math.floor(offset / this.alignment) * this.alignment; } private alignOffsetAfter(offset: number): number { - return Math.ceil(offset / this.blockSize) * this.blockSize; + return Math.ceil(offset / this.alignment) * this.alignment; } private async alignedRead( @@ -156,7 +188,7 @@ export class BlockDevice extends File implements AdapterSourceDestination { ): Promise { const start = this.alignOffsetBefore(sourceOffset); const end = this.alignOffsetAfter(sourceOffset + length); - const alignedBuffer = Buffer.allocUnsafe(end - start); + const alignedBuffer = getAlignedBuffer(end - start, this.alignment); const { bytesRead } = await super.read( alignedBuffer, 0, @@ -174,10 +206,7 @@ export class BlockDevice extends File implements AdapterSourceDestination { length: number, sourceOffset: number, ): Promise { - if ( - USE_ALIGNED_IO && - !(this.offsetIsAligned(sourceOffset) && this.offsetIsAligned(length)) - ) { + if (!(this.offsetIsAligned(sourceOffset) && this.offsetIsAligned(length))) { return await this.alignedRead(buffer, bufferOffset, length, sourceOffset); } else { return await super.read(buffer, bufferOffset, length, sourceOffset); @@ -192,7 +221,7 @@ export class BlockDevice extends File implements AdapterSourceDestination { ): Promise { const start = this.alignOffsetBefore(fileOffset); const end = this.alignOffsetAfter(fileOffset + length); - const alignedBuffer = Buffer.allocUnsafe(end - start); + const alignedBuffer = getAlignedBuffer(end - start, this.alignment); await super.read(alignedBuffer, 0, alignedBuffer.length, start); const offset = fileOffset - start; buffer.copy(alignedBuffer, offset, bufferOffset, length); @@ -206,10 +235,7 @@ export class BlockDevice extends File implements AdapterSourceDestination { length: number, fileOffset: number, ): Promise { - if ( - USE_ALIGNED_IO && - !(this.offsetIsAligned(fileOffset) && this.offsetIsAligned(length)) - ) { + if (!(this.offsetIsAligned(fileOffset) && this.offsetIsAligned(length))) { return await this.alignedWrite(buffer, bufferOffset, length, fileOffset); } else { return await super.write(buffer, bufferOffset, length, fileOffset); diff --git a/lib/source-destination/compressed-source.ts b/lib/source-destination/compressed-source.ts index 0038a0b5..9d14f3bb 100644 --- a/lib/source-destination/compressed-source.ts +++ b/lib/source-destination/compressed-source.ts @@ -20,6 +20,7 @@ import { Transform } from 'stream'; import { NotCapable } from '../errors'; import { StreamLimiter } from '../stream-limiter'; import { Metadata } from './metadata'; +import { CreateReadStreamOptions } from './source-destination'; import { SourceSource } from './source-source'; export interface SourceTransform extends Transform { @@ -51,15 +52,15 @@ export abstract class CompressedSource extends SourceSource { return true; } - public async createReadStream( + public async createReadStream({ emitProgress = false, start = 0, - end?: number, - ): Promise { + end, + }: CreateReadStreamOptions = {}): Promise { if (start !== 0) { throw new NotCapable(); } - const stream = await this.source.createReadStream(emitProgress); + const stream = await this.source.createReadStream({ emitProgress }); // as any because we need to add the sourceStream property const transform = this.createTransform() as any; stream.pipe(transform); diff --git a/lib/source-destination/configured-source/configured-source.ts b/lib/source-destination/configured-source/configured-source.ts index 787ab03a..df113be5 100644 --- a/lib/source-destination/configured-source/configured-source.ts +++ b/lib/source-destination/configured-source/configured-source.ts @@ -31,7 +31,11 @@ import { SparseFilterStream } from '../../sparse-stream/sparse-filter-stream'; import { SparseReadStream } from '../../sparse-stream/sparse-read-stream'; import { Metadata } from '../metadata'; -import { SourceDestination } from '../source-destination'; +import { + CreateReadStreamOptions, + CreateSparseReadStreamOptions, + SourceDestination, +} from '../source-destination'; import { SourceSource } from '../source-source'; import { configure as legacyConfigure } from './configure'; @@ -146,9 +150,9 @@ export class ConfiguredSource extends SourceSource { } public async createReadStream( - ...args: any[] + options: CreateReadStreamOptions, ): Promise { - const imageStream = await this.source.createReadStream(...args); + const imageStream = await this.source.createReadStream(options); const transform = this.disk.getTransformStream(); imageStream.on('error', (err: Error) => { transform.emit('error', err); @@ -159,37 +163,58 @@ export class ConfiguredSource extends SourceSource { private async createSparseReadStreamFromDisk( generateChecksums: boolean, + alignment?: number, + numBuffers = 2, ): Promise { - return new SparseReadStream( - this, - await this.getBlocksWithChecksumType(generateChecksums), // blocks - CHUNK_SIZE, - false, // verify + return new SparseReadStream({ + source: this, + blocks: await this.getBlocksWithChecksumType(generateChecksums), // blocks + chunkSize: CHUNK_SIZE, + verify: false, generateChecksums, - ); + alignment, + numBuffers, + }); } private async createSparseReadStreamFromStream( generateChecksums: boolean, + alignment?: number, + numBuffers = 2, ): Promise { - const stream = await this.createReadStream(); - const transform = new SparseFilterStream( - await this.getBlocksWithChecksumType(generateChecksums), - false, // verify + const stream = await this.createReadStream({ + alignment, + numBuffers, + }); + const transform = new SparseFilterStream({ + blocks: await this.getBlocksWithChecksumType(generateChecksums), + verify: false, generateChecksums, - ); + }); stream.on('error', transform.emit.bind(transform, 'error')); stream.pipe(transform); return transform; } - public async createSparseReadStream( - generateChecksums: boolean, - ): Promise { + public async createSparseReadStream({ + generateChecksums = false, + alignment, + numBuffers = 2, + }: CreateSparseReadStreamOptions = {}): Promise< + SparseReadStream | SparseFilterStream + > { if (this.createStreamFromDisk) { - return await this.createSparseReadStreamFromDisk(generateChecksums); + return await this.createSparseReadStreamFromDisk( + generateChecksums, + alignment, + numBuffers, + ); } else { - return await this.createSparseReadStreamFromStream(generateChecksums); + return await this.createSparseReadStreamFromStream( + generateChecksums, + alignment, + numBuffers, + ); } } diff --git a/lib/source-destination/dmg.ts b/lib/source-destination/dmg.ts index d2224618..54fcf407 100644 --- a/lib/source-destination/dmg.ts +++ b/lib/source-destination/dmg.ts @@ -19,9 +19,16 @@ import { BLOCK, CHECKSUM_TYPE, Image as UDIFImage, SECTOR_SIZE } from 'udif'; import { promisify } from 'util'; import { Metadata } from './metadata'; -import { SourceDestination, SourceDestinationFs } from './source-destination'; +import { + CreateReadStreamOptions, + CreateSparseReadStreamOptions, + SourceDestination, + SourceDestinationFs, +} from './source-destination'; import { SourceSource } from './source-source'; +import { BlockTransformStream } from '../block-transform-stream'; +import { CHUNK_SIZE } from '../constants'; import { NotCapable } from '../errors'; import { Block, @@ -29,6 +36,7 @@ import { BlocksWithChecksum, SparseReadable, } from '../sparse-stream/shared'; +import { ProgressSparseTransformStream } from '../sparse-stream/sparse-transform-stream'; import { StreamLimiter } from '../stream-limiter'; export class DmgSource extends SourceSource { @@ -56,11 +64,12 @@ export class DmgSource extends SourceSource { return true; } - public async createReadStream( - _emitProgress = false, + public async createReadStream({ start = 0, - end?: number, - ): Promise { + end, + alignment, + numBuffers, + }: CreateReadStreamOptions = {}): Promise { if (start !== 0) { throw new NotCapable(); } @@ -69,15 +78,29 @@ export class DmgSource extends SourceSource { const transform = new StreamLimiter(stream, end + 1); return transform; } - return stream; + return BlockTransformStream.alignIfNeeded(stream, alignment, numBuffers); } - public async createSparseReadStream( - _generateChecksums: boolean, - ): Promise { - return Object.assign(this.image.createSparseReadStream(), { - blocks: await this.getBlocks(), + public async createSparseReadStream({ + alignment, + numBuffers, + }: CreateSparseReadStreamOptions = {}): Promise { + const blocks = await this.getBlocks(); + const stream = Object.assign(this.image.createSparseReadStream(), { + blocks, }); + if (alignment !== undefined) { + const transform = new ProgressSparseTransformStream({ + blocks, + chunkSize: CHUNK_SIZE, + alignment, + numBuffers, + }); + stream.pipe(transform); + return transform; + } else { + return stream; + } } public async getBlocks(): Promise { diff --git a/lib/source-destination/file.ts b/lib/source-destination/file.ts index aa8da542..2093caf4 100644 --- a/lib/source-destination/file.ts +++ b/lib/source-destination/file.ts @@ -15,83 +15,67 @@ */ import { ReadResult, WriteResult } from 'file-disk'; -// Can't use "import { constants, ReadStream, WriteStream } from 'fs';" -// as ReadStream and WriteStream are defined as interfaces in @types/node -// and are not imported in the generated js. They are classes, not interfaces. -import * as fs from 'fs'; +import { constants, ReadStream, WriteStream } from 'fs'; import { basename } from 'path'; import { Metadata } from './metadata'; import { makeClassEmitProgressEvents } from './progress'; -import { SourceDestination } from './source-destination'; +import { + CreateReadStreamOptions, + SourceDestination, +} from './source-destination'; import { BlockReadStream, ProgressBlockReadStream } from '../block-read-stream'; -import { PROGRESS_EMISSION_INTERVAL } from '../constants'; +import { CHUNK_SIZE, PROGRESS_EMISSION_INTERVAL } from '../constants'; import { close, open, read, stat, write } from '../fs'; import { ProgressSparseWriteStream, SparseWriteStream, } from '../sparse-stream/sparse-write-stream'; +export const ProgressReadStream = makeClassEmitProgressEvents( + ReadStream, + 'bytesRead', + 'bytesRead', + PROGRESS_EMISSION_INTERVAL, +); + export const ProgressWriteStream = makeClassEmitProgressEvents( - fs.WriteStream, + WriteStream, 'bytesWritten', 'bytesWritten', PROGRESS_EMISSION_INTERVAL, ); -// tslint:disable:no-bitwise -enum OpenFlags { - Read = fs.constants.O_RDONLY, - ReadWrite = fs.constants.O_RDWR | fs.constants.O_CREAT, - WriteDevice = fs.constants.O_RDWR | - fs.constants.O_NONBLOCK | - fs.constants.O_SYNC, -} -// tslint:enable:no-bitwise - export class File extends SourceDestination { - public static readonly OpenFlags = OpenFlags; protected fd: number; - public blockSize = 512; - constructor(private path: string, private flags: OpenFlags) { + constructor(public readonly path: string, public readonly oWrite = false) { super(); } - private _canRead() { - return ( - this.flags === File.OpenFlags.Read || - this.flags === File.OpenFlags.ReadWrite || - this.flags === File.OpenFlags.WriteDevice - ); - } - - private _canWrite() { - return ( - this.flags === File.OpenFlags.ReadWrite || - this.flags === File.OpenFlags.WriteDevice - ); + protected getOpenFlags() { + return this.oWrite ? constants.O_RDWR : constants.O_RDONLY; } public async canRead(): Promise { - return this._canRead(); + return true; } public async canWrite(): Promise { - return this._canWrite(); + return this.oWrite; } public async canCreateReadStream(): Promise { - return this._canRead(); + return true; } public async canCreateWriteStream(): Promise { - return this._canWrite(); + return await this.canWrite(); } public async canCreateSparseWriteStream(): Promise { - return this._canWrite(); + return await this.canWrite(); } protected async _getMetadata(): Promise { @@ -119,37 +103,82 @@ export class File extends SourceDestination { return await write(this.fd, buffer, bufferOffset, length, fileOffset); } - public async createReadStream( + private streamOptions(start?: number, end?: number) { + // TODO: pass fs: SourceDestinationFs(this) instead of fd (only works with node >= v13.6.0) + return { + fd: this.fd, + highWaterMark: CHUNK_SIZE, + autoClose: false, + start, + end, + }; + } + + public async createReadStream({ emitProgress = false, start = 0, - end?: number, - ): Promise { + end, + alignment, + numBuffers, + }: CreateReadStreamOptions = {}): Promise { await this.open(); - if (emitProgress) { - return new ProgressBlockReadStream(this, start, end); + if (alignment !== undefined) { + if (emitProgress) { + return new ProgressBlockReadStream({ + source: this, + alignment, + start, + end, + numBuffers, + }); + } else { + return new BlockReadStream({ + source: this, + alignment, + start, + end, + numBuffers, + }); + } } else { - return new BlockReadStream(this, start, end); + const options = this.streamOptions(start, end); + if (emitProgress) { + // @ts-ignore: @types/node is wrong about fs.WriteStream constructor: it takes 2 arguments, the first one is the file path + return new ProgressReadStream(null, options); + } else { + // @ts-ignore: @types/node is wrong about fs.WriteStream constructor: it takes 2 arguments, the first one is the file path + return new ReadStream(null, options); + } } } - public async createWriteStream(): Promise { + public async createWriteStream({ + highWaterMark, + }: { highWaterMark?: number } = {}): Promise { + // TODO: use SourceDestinationFs (implement write) when node 14 becomes LTS // @ts-ignore: @types/node is wrong about fs.WriteStream constructor: it takes 2 arguments, the first one is the file path const stream = new ProgressWriteStream(null, { fd: this.fd, autoClose: false, + highWaterMark, }); stream.on('finish', stream.emit.bind(stream, 'done')); return stream; } - public async createSparseWriteStream(): Promise { - const stream = new ProgressSparseWriteStream(this); + public async createSparseWriteStream({ + highWaterMark, + }: { highWaterMark?: number } = {}): Promise { + const stream = new ProgressSparseWriteStream({ + destination: this, + highWaterMark, + }); stream.on('finish', stream.emit.bind(stream, 'done')); return stream; } protected async _open(): Promise { - this.fd = await open(this.path, this.flags); + this.fd = await open(this.path, this.getOpenFlags()); } protected async _close(): Promise { diff --git a/lib/source-destination/http.ts b/lib/source-destination/http.ts index 00bb94f3..65d9c308 100644 --- a/lib/source-destination/http.ts +++ b/lib/source-destination/http.ts @@ -24,7 +24,10 @@ import { unescape } from 'querystring'; import { parse } from 'url'; import { Metadata } from './metadata'; -import { SourceDestination } from './source-destination'; +import { + CreateReadStreamOptions, + SourceDestination, +} from './source-destination'; axios.defaults.adapter = axiosNodeAdapter; @@ -107,11 +110,11 @@ export class Http extends SourceDestination { return { bytesRead, buffer }; } - public async createReadStream( + public async createReadStream({ emitProgress = false, start = 0, - end?: number, - ): Promise { + end, + }: CreateReadStreamOptions = {}): Promise { const response = await axios({ method: 'get', url: this.url, diff --git a/lib/source-destination/multi-destination.ts b/lib/source-destination/multi-destination.ts index af635eb1..295d1c4f 100644 --- a/lib/source-destination/multi-destination.ts +++ b/lib/source-destination/multi-destination.ts @@ -23,10 +23,16 @@ import { PassThrough } from 'stream'; import { PROGRESS_EMISSION_INTERVAL } from '../constants'; import { VerificationError } from '../errors'; import { BlocksWithChecksum, SparseReadable } from '../sparse-stream/shared'; -import { SparseWritable } from '../sparse-stream/sparse-write-stream'; +import { SparseWritable } from '../sparse-stream/shared'; import { difference } from '../utils'; +import { BlockDevice } from './block-device'; import { ProgressEvent } from './progress'; -import { SourceDestination, Verifier } from './source-destination'; +import { + CreateReadStreamOptions, + CreateSparseReadStreamOptions, + SourceDestination, + Verifier, +} from './source-destination'; function isntNull(x: any) { return x !== null; @@ -108,9 +114,21 @@ export class MultiDestination extends SourceDestination { if (destinations.length === 0) { throw new Error('At least one destination is required'); } - destinations.map((destination: SourceDestination) => { + for (const destination of destinations) { this.destinations.add(destination); - }); + } + } + + public getAlignment(): number | undefined { + const alignments: number[] = []; + for (const destination of this.destinations.values()) { + if (destination instanceof BlockDevice) { + alignments.push(destination.alignment); + } + } + if (alignments.length) { + return Math.max(...alignments); + } } public destinationError( @@ -217,23 +235,26 @@ export class MultiDestination extends SourceDestination { } public async createReadStream( - ...args: any[] + options: CreateReadStreamOptions, ): Promise { // TODO: raise an error or a warning here return await Array.from(this.activeDestinations)[0].createReadStream( - ...args, + options, ); } - public async createSparseReadStream(...args: any[]): Promise { + public async createSparseReadStream( + options: CreateSparseReadStreamOptions, + ): Promise { // TODO: raise an error or a warning here return await Array.from(this.activeDestinations)[0].createSparseReadStream( - ...args, + options, ); } private async createStream( methodName: 'createWriteStream' | 'createSparseWriteStream', + ...args: any[] ) { const passthrough = new PassThrough({ objectMode: methodName === 'createSparseWriteStream', @@ -275,7 +296,7 @@ export class MultiDestination extends SourceDestination { await map( this.activeDestinations, async (destination: SourceDestination) => { - const stream = await destination[methodName](); + const stream = await destination[methodName](...args); progresses.set(stream, null); stream.on('progress', (progressEvent: ProgressEvent) => { progresses.set(stream, progressEvent); @@ -301,12 +322,16 @@ export class MultiDestination extends SourceDestination { return passthrough; } - public async createWriteStream(): Promise { - return await this.createStream('createWriteStream'); + public async createWriteStream( + ...args: any[] + ): Promise { + return await this.createStream('createWriteStream', ...args); } - public async createSparseWriteStream(): Promise { - return await this.createStream('createSparseWriteStream'); + public async createSparseWriteStream( + ...args: any[] + ): Promise { + return await this.createStream('createSparseWriteStream', ...args); } public createVerifier( diff --git a/lib/source-destination/single-use-stream-source.ts b/lib/source-destination/single-use-stream-source.ts index c1f86372..3ac246b4 100644 --- a/lib/source-destination/single-use-stream-source.ts +++ b/lib/source-destination/single-use-stream-source.ts @@ -14,7 +14,10 @@ * limitations under the License. */ -import { SourceDestination } from './source-destination'; +import { + CreateReadStreamOptions, + SourceDestination, +} from './source-destination'; import { NotCapable } from '../errors'; import { StreamLimiter } from '../stream-limiter'; @@ -30,11 +33,10 @@ export class SingleUseStreamSource extends SourceDestination { return !this.used; } - public async createReadStream( - _emitProgress = false, + public async createReadStream({ start = 0, - end?: number, - ): Promise { + end, + }: CreateReadStreamOptions = {}): Promise { if (this.used) { throw new NotCapable('Single use source stream already used'); } diff --git a/lib/source-destination/source-destination.ts b/lib/source-destination/source-destination.ts index 63879b0c..8ae64d87 100644 --- a/lib/source-destination/source-destination.ts +++ b/lib/source-destination/source-destination.ts @@ -29,9 +29,9 @@ import { } from '../constants'; import { ChecksumVerificationError, NotCapable } from '../errors'; import { BlocksWithChecksum, SparseReadable } from '../sparse-stream/shared'; +import { SparseWritable } from '../sparse-stream/shared'; import { SparseFilterStream } from '../sparse-stream/sparse-filter-stream'; import { SparseReadStream } from '../sparse-stream/sparse-read-stream'; -import { SparseWritable } from '../sparse-stream/sparse-write-stream'; import { streamToBuffer } from '../utils'; import { Metadata } from './metadata'; @@ -159,7 +159,10 @@ export class StreamVerifier extends Verifier { } public async run(): Promise { - const stream = await this.source.createReadStream(false, 0, this.size - 1); + const stream = await this.source.createReadStream({ + end: this.size - 1, + alignment: this.source.getAlignment(), + }); stream.on('error', this.emit.bind(this, 'error')); const hasher = createHasher(); hasher.on('error', this.emit.bind(this, 'error')); @@ -188,15 +191,18 @@ export class SparseStreamVerifier extends Verifier { } public async run(): Promise { + const alignment = this.source.getAlignment(); let stream: SparseReadStream | SparseFilterStream; if (await this.source.canRead()) { - stream = new SparseReadStream( - this.source, - this.blocks, - CHUNK_SIZE, - true, // verify - false, // generateChecksums - ); + stream = new SparseReadStream({ + source: this.source, + blocks: this.blocks, + chunkSize: CHUNK_SIZE, + verify: true, + generateChecksums: false, + alignment, + numBuffers: 2, + }); stream.on('error', this.emit.bind(this, 'error')); } else if (await this.source.canCreateReadStream()) { const originalStream = await this.source.createReadStream(); @@ -204,11 +210,11 @@ export class SparseStreamVerifier extends Verifier { originalStream.unpipe(transform); this.emit('error', error); }); - const transform = new SparseFilterStream( - this.blocks, - true, // verify - false, // generateChecksums - ); + const transform = new SparseFilterStream({ + blocks: this.blocks, + verify: true, + generateChecksums: false, + }); transform.once('error', (error: Error) => { originalStream.unpipe(transform); // @ts-ignore @@ -228,6 +234,20 @@ export class SparseStreamVerifier extends Verifier { } } +export interface CreateReadStreamOptions { + emitProgress?: boolean; + start?: number; + end?: number; + alignment?: number; + numBuffers?: number; +} + +export interface CreateSparseReadStreamOptions { + generateChecksums?: boolean; + alignment?: number; + numBuffers?: number; +} + export class SourceDestination extends EventEmitter { public static readonly imageExtensions = [ 'img', @@ -253,6 +273,10 @@ export class SourceDestination extends EventEmitter { } } + public getAlignment(): number | undefined { + return undefined; + } + public async canRead(): Promise { return false; } @@ -307,15 +331,13 @@ export class SourceDestination extends EventEmitter { } public async createReadStream( - _emitProgress = false, - _start = 0, - _end?: number, + _options: CreateReadStreamOptions = {}, ): Promise { throw new NotCapable(); } public async createSparseReadStream( - _generateChecksums = false, + _options: CreateSparseReadStreamOptions = {}, ): Promise { throw new NotCapable(); } @@ -324,11 +346,15 @@ export class SourceDestination extends EventEmitter { throw new NotCapable(); } - public async createWriteStream(): Promise { + public async createWriteStream( + _options: { highWaterMark?: number } = {}, + ): Promise { throw new NotCapable(); } - public async createSparseWriteStream(): Promise { + public async createSparseWriteStream( + _options: { highWaterMark?: number } = {}, + ): Promise { throw new NotCapable(); } @@ -391,7 +417,9 @@ export class SourceDestination extends EventEmitter { private async getMimeTypeFromContent(): Promise { let stream: NodeJS.ReadableStream; try { - stream = await this.createReadStream(false, 0, 263); // TODO: constant + stream = await this.createReadStream({ + end: 263, // TODO: constant + }); } catch (error) { if (error instanceof NotCapable) { return; @@ -443,7 +471,9 @@ export class SourceDestination extends EventEmitter { } public async getPartitionTable(): Promise { - const stream = await this.createReadStream(false, 0, 65535); // TODO: constant + const stream = await this.createReadStream({ + end: 65535, // TODO: constant + }); const buffer = await streamToBuffer(stream); try { return await getPartitions(buffer, { getLogical: false }); diff --git a/lib/source-destination/zip.ts b/lib/source-destination/zip.ts index 407f1bab..34b06986 100644 --- a/lib/source-destination/zip.ts +++ b/lib/source-destination/zip.ts @@ -30,9 +30,14 @@ import { import { NO_MATCHING_FILE_MSG } from '../constants'; import { getFileStreamFromZipStream } from '../zip'; import { Metadata } from './metadata'; -import { SourceDestination } from './source-destination'; +import { + CreateReadStreamOptions, + CreateSparseReadStreamOptions, + SourceDestination, +} from './source-destination'; import { SourceSource } from './source-source'; +import { BlockTransformStream } from '../block-transform-stream'; import { NotCapable } from '../errors'; import { blocksLength, @@ -83,7 +88,7 @@ export class StreamZipSource extends SourceSource { private async getEntry(): Promise { if (this.entry === undefined) { const entry = await getFileStreamFromZipStream( - await this.source.createReadStream(false), + await this.source.createReadStream(), this.match, ); this.entry = entry; @@ -98,11 +103,10 @@ export class StreamZipSource extends SourceSource { return this.entry; } - public async createReadStream( - _emitProgress = false, + public async createReadStream({ start = 0, - end?: number, - ): Promise { + end, + }: CreateReadStreamOptions = {}): Promise { if (start !== 0) { throw new NotCapable(); } @@ -136,7 +140,7 @@ class SourceRandomAccessReader extends RandomAccessReader { // Workaround this method not being async with a passthrough stream const passthrough = new PassThrough(); this.source - .createReadStream(false, start, end - 1) + .createReadStream({ start, end: end - 1 }) .then(stream => { stream.on('error', passthrough.emit.bind(passthrough, 'error')); stream.pipe(passthrough); @@ -268,11 +272,12 @@ export class RandomAccessZipSource extends SourceSource { } } - public async createReadStream( - _emitProgress = false, + public async createReadStream({ start = 0, - end?: number, - ): Promise { + end, + alignment, + numBuffers, + }: CreateReadStreamOptions): Promise { if (start !== 0) { throw new NotCapable(); } @@ -284,25 +289,34 @@ export class RandomAccessZipSource extends SourceSource { if (end !== undefined) { // TODO: handle errors on stream after transform finish event const transform = new StreamLimiter(stream, end + 1); - return transform; + return BlockTransformStream.alignIfNeeded( + transform, + alignment, + numBuffers, + ); } - return stream; + return BlockTransformStream.alignIfNeeded(stream, alignment, numBuffers); } - public async createSparseReadStream( + public async createSparseReadStream({ generateChecksums = false, - ): Promise { + alignment, + numBuffers, + }: CreateSparseReadStreamOptions = {}): Promise { const metadata = await this.getMetadata(); if (metadata.blocks === undefined) { throw new NotCapable(); } // Verifying and generating checksums makes no sense, so we only verify if generateChecksums is false. - const transform = new SparseFilterStream( - metadata.blocks, - !generateChecksums, + const transform = new SparseFilterStream({ + blocks: metadata.blocks, + verify: !generateChecksums, generateChecksums, - ); - const stream = await this.createReadStream(false); + }); + const stream = await this.createReadStream({ + alignment, + numBuffers, + }); stream.pipe(transform); return transform; } @@ -347,6 +361,7 @@ export class RandomAccessZipSource extends SourceSource { export class ZipSource extends SourceSource { public static readonly mimetype = 'application/zip'; + private ready: Promise; private implementation: RandomAccessZipSource | StreamZipSource; constructor( @@ -355,54 +370,63 @@ export class ZipSource extends SourceSource { private match: (filename: string) => boolean = matchSupportedExtensions, ) { super(source); + this.ready = this.prepare(); } private async prepare() { - if (this.implementation === undefined) { - if (!this.preferStreamSource && (await this.source.canRead())) { - this.implementation = new RandomAccessZipSource( - this.source, - this.match, - ); - } else { - this.implementation = new StreamZipSource(this.source, this.match); - } + if (!this.preferStreamSource && (await this.source.canRead())) { + this.implementation = new RandomAccessZipSource(this.source, this.match); + } else { + this.implementation = new StreamZipSource(this.source, this.match); } } public async canCreateReadStream(): Promise { - await this.prepare(); + await this.ready; return await this.implementation.canCreateReadStream(); } public async open(): Promise { - await this.prepare(); + await this.ready; return await this.implementation.open(); } public async canCreateSparseReadStream(): Promise { - await this.prepare(); + await this.ready; return await this.implementation.canCreateSparseReadStream(); } - public async createReadStream( + public async createReadStream({ emitProgress = false, start = 0, - end?: number, - ): Promise { - await this.prepare(); - return await this.implementation.createReadStream(emitProgress, start, end); + end, + alignment, + numBuffers, + }: CreateReadStreamOptions = {}): Promise { + await this.ready; + const stream = await this.implementation.createReadStream({ + emitProgress, + start, + end, + }); + return BlockTransformStream.alignIfNeeded(stream, alignment, numBuffers); } - public async createSparseReadStream( + public async createSparseReadStream({ generateChecksums = false, - ): Promise { - await this.prepare(); - return await this.implementation.createSparseReadStream(generateChecksums); + alignment, + numBuffers, + }: CreateSparseReadStreamOptions = {}): Promise { + await this.ready; + return await this.implementation.createSparseReadStream({ + generateChecksums, + alignment, + numBuffers, + }); } protected async _getMetadata(): Promise { - await this.prepare(); + await this.ready; return await this.implementation.getMetadata(); } } diff --git a/lib/sparse-stream/shared.ts b/lib/sparse-stream/shared.ts index 221235a4..ea38f971 100644 --- a/lib/sparse-stream/shared.ts +++ b/lib/sparse-stream/shared.ts @@ -18,6 +18,7 @@ import { createHash, Hash } from 'crypto'; import { padStart } from 'lodash'; import * as XXHash from 'xxhash'; +import { AlignedLockableBuffer } from '../aligned-lockable-buffer'; import { XXHASH_SEED } from '../constants'; import { BlocksVerificationError } from '../errors'; import { getCrc, getXXHash } from '../lazy'; @@ -41,7 +42,7 @@ export interface BlocksWithChecksum { } export interface SparseStreamChunk { - buffer: Buffer; + buffer: Buffer | AlignedLockableBuffer; position: number; } @@ -50,6 +51,14 @@ export interface SparseReadable extends NodeJS.ReadableStream { push(chunk: SparseStreamChunk): boolean; } +export interface SparseWritable extends NodeJS.WritableStream { + _write( + chunk: SparseStreamChunk, + encoding: string, + callback: (err?: Error | void) => void, + ): void; +} + class CRC32Hasher { private value: number; private crc32 = getCrc().crc32; diff --git a/lib/sparse-stream/sparse-filter-stream.ts b/lib/sparse-stream/sparse-filter-stream.ts index 73676fd5..56e99632 100644 --- a/lib/sparse-stream/sparse-filter-stream.ts +++ b/lib/sparse-stream/sparse-filter-stream.ts @@ -15,7 +15,6 @@ */ import { Transform } from 'readable-stream'; -import { TransformOptions } from 'stream'; import { BlocksWithChecksum, @@ -25,17 +24,22 @@ import { } from './shared'; export class SparseFilterStream extends Transform implements SparseReadable { + public readonly blocks: BlocksWithChecksum[]; private stateIterator: Iterator; private state?: SparseReaderState; private position = 0; - constructor( - public readonly blocks: BlocksWithChecksum[], - verify: boolean, - generateChecksums: boolean, - options: TransformOptions = {}, - ) { - super({ ...options, objectMode: true }); + constructor({ + blocks, + verify, + generateChecksums, + }: { + blocks: BlocksWithChecksum[]; + verify: boolean; + generateChecksums: boolean; + }) { + super({ objectMode: true }); + this.blocks = blocks; this.stateIterator = createSparseReaderStateIterator( blocks, verify, diff --git a/lib/sparse-stream/sparse-read-stream.ts b/lib/sparse-stream/sparse-read-stream.ts index caf5e78e..a8b9b694 100644 --- a/lib/sparse-stream/sparse-read-stream.ts +++ b/lib/sparse-stream/sparse-read-stream.ts @@ -15,9 +15,13 @@ */ import { Readable } from 'readable-stream'; -import { ReadableOptions } from 'stream'; +import { + AlignedReadableState, + isAlignedLockableBuffer, +} from '../aligned-lockable-buffer'; import { SourceDestination } from '../source-destination/source-destination'; +import { noop } from '../utils'; import { BlocksWithChecksum, createSparseReaderStateIterator, @@ -27,19 +31,42 @@ import { } from './shared'; export class SparseReadStream extends Readable implements SparseReadable { + private source: SourceDestination; + public readonly blocks: BlocksWithChecksum[]; + private chunkSize: number; private stateIterator: Iterator; private state?: SparseReaderState; private positionInBlock = 0; + private alignedReadableState?: AlignedReadableState; - constructor( - private source: SourceDestination, - public readonly blocks: BlocksWithChecksum[], - private chunkSize: number, - verify: boolean, - generateChecksums: boolean, - options: ReadableOptions = {}, - ) { - super({ ...options, objectMode: true }); + constructor({ + source, + blocks, + chunkSize, + verify, + generateChecksums, + alignment, + numBuffers = 2, + }: { + source: SourceDestination; + blocks: BlocksWithChecksum[]; + chunkSize: number; + verify: boolean; + generateChecksums: boolean; + alignment?: number; + numBuffers?: number; + }) { + super({ objectMode: true, highWaterMark: numBuffers - 1 }); + this.source = source; + this.blocks = blocks; + this.chunkSize = chunkSize; + if (alignment !== undefined) { + this.alignedReadableState = new AlignedReadableState( + chunkSize, + alignment, + numBuffers, + ); + } this.stateIterator = createSparseReaderStateIterator( blocks, verify, @@ -71,15 +98,23 @@ export class SparseReadStream extends Readable implements SparseReadable { this.chunkSize, this.state.subBlock.length - this.positionInBlock, ); - const buffer = Buffer.allocUnsafe(length); - await this.source.read( - buffer, - 0, - length, - this.state.subBlock.offset + this.positionInBlock, - ); - if (this.state.hasher !== undefined) { - this.state.hasher.update(buffer); + const buffer = + this.alignedReadableState !== undefined + ? this.alignedReadableState.getCurrentBuffer().slice(0, length) + : Buffer.allocUnsafe(length); + const unlock = isAlignedLockableBuffer(buffer) ? await buffer.lock() : noop; + try { + await this.source.read( + buffer, + 0, + length, + this.state.subBlock.offset + this.positionInBlock, + ); + if (this.state.hasher !== undefined) { + this.state.hasher.update(buffer); + } + } finally { + unlock(); } const chunk = { buffer, diff --git a/lib/sparse-stream/sparse-transform-stream.ts b/lib/sparse-stream/sparse-transform-stream.ts new file mode 100644 index 00000000..ce5819e6 --- /dev/null +++ b/lib/sparse-stream/sparse-transform-stream.ts @@ -0,0 +1,86 @@ +/* + * Copyright 2018 balena.io + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { Transform } from 'stream'; + +import { AlignedReadableState } from '../aligned-lockable-buffer'; +import { PROGRESS_EMISSION_INTERVAL } from '../constants'; +import { makeClassEmitProgressEvents } from '../source-destination/progress'; +import { + BlocksWithChecksum, + SparseReadable, + SparseStreamChunk, + SparseWritable, +} from './shared'; + +export class SparseTransformStream extends Transform + implements SparseWritable, SparseReadable { + // This is only used to align buffers emitted by node-udif's createSparseStream as we don't control their allocation + public blocks: BlocksWithChecksum[]; + public position = 0; + public bytesWritten = 0; + private alignedReadableState: AlignedReadableState; + + constructor({ + blocks, + chunkSize, + alignment, + numBuffers = 2, + }: { + blocks: BlocksWithChecksum[]; + chunkSize: number; + alignment: number; + numBuffers?: number; + }) { + super({ objectMode: true, highWaterMark: numBuffers - 1 }); + this.blocks = blocks; + this.alignedReadableState = new AlignedReadableState( + chunkSize, + alignment, + numBuffers, + ); + } + + public async _transform( + chunk: SparseStreamChunk, + _encoding: string, + callback: (error?: Error) => void, + ): Promise { + this.position = chunk.position; + // This will fail if a chunk buffer is larger than chunkSize passed to the constructor + let buffer = this.alignedReadableState.getCurrentBuffer(); + const unlock = await buffer.lock(); + try { + if (chunk.buffer.length < buffer.length) { + buffer = buffer.slice(0, chunk.buffer.length); + } + chunk.buffer.copy(buffer); + } finally { + unlock(); + } + this.push({ position: chunk.position, buffer }); + this.bytesWritten += chunk.buffer.length; + this.position += chunk.buffer.length; + callback(); + } +} + +export const ProgressSparseTransformStream = makeClassEmitProgressEvents( + SparseTransformStream, + 'bytesWritten', + 'position', + PROGRESS_EMISSION_INTERVAL, +); diff --git a/lib/sparse-stream/sparse-write-stream.ts b/lib/sparse-stream/sparse-write-stream.ts index 5b432e05..d8754dd4 100644 --- a/lib/sparse-stream/sparse-write-stream.ts +++ b/lib/sparse-stream/sparse-write-stream.ts @@ -1,32 +1,38 @@ +import { getAlignedBuffer } from '@ronomon/direct-io'; import { delay } from 'bluebird'; import { Writable } from 'readable-stream'; +import { isAlignedLockableBuffer } from '../aligned-lockable-buffer'; import { PROGRESS_EMISSION_INTERVAL, RETRY_BASE_TIMEOUT } from '../constants'; import { isTransientError } from '../errors'; import { makeClassEmitProgressEvents } from '../source-destination/progress'; import { SourceDestination } from '../source-destination/source-destination'; -import { asCallback } from '../utils'; -import { SparseStreamChunk } from './shared'; - -export interface SparseWritable extends NodeJS.WritableStream { - _write( - chunk: SparseStreamChunk, - encoding: string, - callback: (err?: Error | void) => void, - ): void; -} +import { asCallback, noop } from '../utils'; +import { SparseStreamChunk, SparseWritable } from './shared'; export class SparseWriteStream extends Writable implements SparseWritable { + private destination: SourceDestination; + public firstBytesToKeep: number; + private maxRetries: number; public position: number; public bytesWritten = 0; private _firstChunks: SparseStreamChunk[] = []; - constructor( - private destination: SourceDestination, - public firstBytesToKeep = 0, - private maxRetries = 5, - ) { - super({ objectMode: true }); + constructor({ + destination, + highWaterMark, + firstBytesToKeep = 0, + maxRetries = 5, + }: { + destination: SourceDestination; + firstBytesToKeep?: number; + maxRetries?: number; + highWaterMark?: number; + }) { + super({ objectMode: true, highWaterMark }); + this.destination = destination; + this.firstBytesToKeep = firstBytesToKeep; + this.maxRetries = maxRetries; } private async writeChunk( @@ -62,31 +68,53 @@ export class SparseWriteStream extends Writable implements SparseWritable { } } + private copyChunk(chunk: SparseStreamChunk): SparseStreamChunk { + if (isAlignedLockableBuffer(chunk.buffer)) { + const buffer = getAlignedBuffer( + chunk.buffer.length, + chunk.buffer.alignment, + ); + chunk.buffer.copy(buffer); + return { position: chunk.position, buffer }; + } else { + return chunk; + } + } + private async __write(chunk: SparseStreamChunk): Promise { - // Keep the first blocks in memory and write them once the rest has been written. - // This is to prevent Windows from mounting the device while we flash it. - if (chunk.position < this.firstBytesToKeep) { - const end = chunk.position + chunk.buffer.length; - if (end <= this.firstBytesToKeep) { - this._firstChunks.push(chunk); - this.position = chunk.position + chunk.buffer.length; - this.bytesWritten += chunk.buffer.length; + const unlock = isAlignedLockableBuffer(chunk.buffer) + ? await chunk.buffer.rlock() + : noop; + try { + // Keep the first blocks in memory and write them once the rest has been written. + // This is to prevent Windows from mounting the device while we flash it. + if (chunk.position < this.firstBytesToKeep) { + const end = chunk.position + chunk.buffer.length; + if (end <= this.firstBytesToKeep) { + this._firstChunks.push(this.copyChunk(chunk)); + this.position = chunk.position + chunk.buffer.length; + this.bytesWritten += chunk.buffer.length; + } else { + const difference = this.firstBytesToKeep - chunk.position; + this._firstChunks.push( + this.copyChunk({ + position: chunk.position, + buffer: chunk.buffer.slice(0, difference), + }), + ); + this.position = this.firstBytesToKeep; + this.bytesWritten += difference; + const remainingBuffer = chunk.buffer.slice(difference); + await this.writeChunk({ + position: this.firstBytesToKeep, + buffer: remainingBuffer, + }); + } } else { - const difference = this.firstBytesToKeep - chunk.position; - this._firstChunks.push({ - position: chunk.position, - buffer: chunk.buffer.slice(0, difference), - }); - this.position = this.firstBytesToKeep; - this.bytesWritten += difference; - const remainingBuffer = chunk.buffer.slice(difference); - await this.writeChunk({ - position: this.firstBytesToKeep, - buffer: remainingBuffer, - }); + await this.writeChunk(chunk); } - } else { - await this.writeChunk(chunk); + } finally { + unlock(); } } diff --git a/lib/utils.ts b/lib/utils.ts index 71453604..2307b25b 100644 --- a/lib/utils.ts +++ b/lib/utils.ts @@ -14,6 +14,7 @@ * limitations under the License. */ +import { isAlignedLockableBuffer } from './aligned-lockable-buffer'; import { SparseStreamChunk } from './sparse-stream/shared'; export async function streamToBuffer( @@ -23,7 +24,18 @@ export async function streamToBuffer( (resolve: (buffer: Buffer) => void, reject: (error: Error) => void) => { const chunks: Buffer[] = []; stream.on('error', reject); - stream.on('data', chunks.push.bind(chunks)); + stream.on('data', async (chunk: Buffer) => { + let data: Buffer; + if (isAlignedLockableBuffer(chunk)) { + const unlock = await chunk.rlock(); + data = Buffer.allocUnsafe(chunk.length); + chunk.copy(data); + unlock(); + } else { + data = chunk; + } + chunks.push(data); + }); stream.on('end', () => { resolve(Buffer.concat(chunks)); }); @@ -40,7 +52,16 @@ export async function sparseStreamToBuffer( await new Promise((resolve: () => void, reject: (error: Error) => void) => { stream.on('error', reject); stream.on('end', resolve); - stream.on('data', chunks.push.bind(chunks)); + stream.on('data', async (chunk: SparseStreamChunk) => { + if (isAlignedLockableBuffer(chunk.buffer)) { + const unlock = await chunk.buffer.rlock(); + const data = Buffer.allocUnsafe(chunk.buffer.length); + chunk.buffer.copy(data); + unlock(); + chunk.buffer = data; + } + chunks.push(chunk); + }); }); if (chunks.length === 0) { return Buffer.alloc(0); @@ -72,3 +93,7 @@ export async function asCallback( callback(error); } } + +export function noop() { + // noop +} diff --git a/tests/block-write-stream.spec.ts b/tests/block-write-stream.spec.ts index 963ffbe8..249ba338 100644 --- a/tests/block-write-stream.spec.ts +++ b/tests/block-write-stream.spec.ts @@ -16,12 +16,14 @@ import { using } from 'bluebird'; import { expect } from 'chai'; -import { randomBytes as randomBytesNode } from 'crypto'; +import { randomFill } from 'crypto'; import 'mocha'; import * as os from 'os'; import { spy, stub } from 'sinon'; import { Readable } from 'stream'; +import { promisify } from 'util'; +import { createBuffer } from '../lib/aligned-lockable-buffer'; import { BlockWriteStream } from '../lib/block-write-stream'; import { CHUNK_SIZE as BLOCK_WRITE_STREAM_CHUNK_SIZE } from '../lib/constants'; import * as diskpart from '../lib/diskpart'; @@ -30,18 +32,12 @@ import { SparseWriteStream } from '../lib/sparse-stream/sparse-write-stream'; import { tmpFileDisposer, TmpFileResult } from '../lib/tmp'; import { blockDeviceFromFile, DEFAULT_IMAGE_TESTS_TIMEOUT } from './tester'; -async function randomBytes(size: number): Promise { - return await new Promise( - (resolve: (stats: Buffer) => void, reject: (err: Error) => void) => { - randomBytesNode(size, (err: Error, buffer: Buffer) => { - if (err) { - reject(err); - return; - } - resolve(buffer); - }); - }, - ); +const randomFillAsync = promisify(randomFill); + +async function randomBytes(size: number, alignment: number): Promise { + const buffer = createBuffer(size, alignment); + await randomFillAsync(buffer); + return buffer; } function* bufferChunks(buffer: Buffer, chunkSize: number) { @@ -82,13 +78,14 @@ describe('block-write-stream', function() { this.timeout(DEFAULT_IMAGE_TESTS_TIMEOUT); const SIZE = BLOCK_WRITE_STREAM_CHUNK_SIZE + 7; const CHUNK_SIZE = 512; + const ALIGNMENT = 512; async function testBlockWriteStream( size: number, chunkSize: number, sparse = false, ): Promise { - const data = await randomBytes(size); + const data = await randomBytes(size, ALIGNMENT); const input = new Readable({ objectMode: sparse }); await using(tmpFileDisposer(false), async (file: TmpFileResult) => { const destination = await blockDeviceFromFile(file.path); @@ -112,24 +109,44 @@ describe('block-write-stream', function() { }); // Check that the first bytes are written last on windows. // ts-ignores are for accessing getCall() which is added by the spy() above. - if (os.platform() === 'win32') { - expect(output.firstBytesToKeep).to.not.equal(0); - // @ts-ignore - expect(destination.write.getCall(0).args[3]).to.equal( - output.firstBytesToKeep, - ); - const $chunkSize = sparse ? CHUNK_SIZE : BLOCK_WRITE_STREAM_CHUNK_SIZE; - const callNumber = - Math.floor((SIZE - output.firstBytesToKeep) / $chunkSize) + 1; - // @ts-ignore - expect(destination.write.getCall(callNumber).args[3]).to.equal(0); - } else { - // @ts-ignore - expect(destination.write.getCall(0).args[3]).to.equal(0); - // @ts-ignore - expect(destination.write.getCall(1).args[3]).to.equal( - sparse ? CHUNK_SIZE : BLOCK_WRITE_STREAM_CHUNK_SIZE, - ); + if (output instanceof SparseWriteStream) { + if (os.platform() === 'win32') { + expect(output.firstBytesToKeep).to.not.equal(0); + // @ts-ignore + expect(destination.write.getCall(0).args[3]).to.equal( + output.firstBytesToKeep, + ); + const $chunkSize = sparse + ? CHUNK_SIZE + : BLOCK_WRITE_STREAM_CHUNK_SIZE; + const callNumber = + Math.floor((SIZE - output.firstBytesToKeep) / $chunkSize) + 1; + // @ts-ignore + expect(destination.write.getCall(callNumber).args[3]).to.equal(0); + } else { + // @ts-ignore + expect(destination.write.getCall(0).args[3]).to.equal(0); + // @ts-ignore + expect(destination.write.getCall(1).args[3]).to.equal( + sparse ? CHUNK_SIZE : BLOCK_WRITE_STREAM_CHUNK_SIZE, + ); + } + } else if (output instanceof BlockWriteStream) { + if (os.platform() === 'win32') { + // @ts-ignore (delayFirstBuffer is private) + expect(output.delayFirstBuffer).to.equal(true); + // @ts-ignore + expect(destination.write.getCall(0).args[3]).to.equal(CHUNK_SIZE); + // @ts-ignore + expect(destination.write.lastCall.args[3]).to.equal(0); + } else { + // @ts-ignore (delayFirstBuffer is private) + expect(output.delayFirstBuffer).to.equal(false); + // @ts-ignore + expect(destination.write.getCall(0).args[3]).to.equal(0); + // @ts-ignore + expect(destination.write.getCall(1).args[3]).to.equal(CHUNK_SIZE); + } } expect(output.bytesWritten).to.equal(size); await destination.close(); diff --git a/tests/directory.spec.ts b/tests/directory.spec.ts index e67cf912..dade959e 100644 --- a/tests/directory.spec.ts +++ b/tests/directory.spec.ts @@ -26,10 +26,7 @@ const IMAGES_PATH = join(DATA_PATH, 'images'); describe('directory', function() { it('should be rejected with an error', async function() { - const source = new sourceDestination.File( - IMAGES_PATH, - sourceDestination.File.OpenFlags.Read, - ); + const source = new sourceDestination.File(IMAGES_PATH); try { await source.getInnerSource(); assert(false); diff --git a/tests/dmg.spec.ts b/tests/dmg.spec.ts index 0c40d567..155be83c 100644 --- a/tests/dmg.spec.ts +++ b/tests/dmg.spec.ts @@ -56,7 +56,6 @@ describe('dmg support', function() { it('invalid dmg file', async function() { const source = new sourceDestination.File( join(DATA_PATH, 'unrecognized', 'invalid.dmg'), - sourceDestination.File.OpenFlags.Read, ); await source.open(); const dmgSource = new sourceDestination.DmgSource(source); diff --git a/tests/get-inner-source.spec.ts b/tests/get-inner-source.spec.ts index 1a452942..0ed22981 100644 --- a/tests/get-inner-source.spec.ts +++ b/tests/get-inner-source.spec.ts @@ -27,10 +27,7 @@ const DATA_PATH = join(__dirname, 'data', 'nested'); describe('getInnerSource()', function() { for (const filename of ['data.img.zip', 'data.img.zip.gz.bz2.xz']) { it(`should work for ${filename}`, async function() { - const source = new sourceDestination.File( - join(DATA_PATH, filename), - sourceDestination.File.OpenFlags.Read, - ); + const source = new sourceDestination.File(join(DATA_PATH, filename)); const innerSource = await source.getInnerSource(); const metadata = await innerSource.getMetadata(); const data = await streamToBuffer(await innerSource.createReadStream()); @@ -42,10 +39,7 @@ describe('getInnerSource()', function() { for (const filename of ['data.dmg.zip', 'data.dmg.zip.gz.bz2.xz']) { it(`should fail for ${filename}`, async function() { - const source = new sourceDestination.File( - join(DATA_PATH, filename), - sourceDestination.File.OpenFlags.Read, - ); + const source = new sourceDestination.File(join(DATA_PATH, filename)); try { await source.getInnerSource(); assert(false); @@ -63,7 +57,6 @@ describe('getInnerSource()', function() { const filename = 'raw-image-not-a-dmg.dmg'; const source = new sourceDestination.File( join(__dirname, 'data', 'images', filename), - sourceDestination.File.OpenFlags.Read, ); const innerSource = await source.getInnerSource(); const metadata = await innerSource.getMetadata(); diff --git a/tests/single-use-stream-source.spec.ts b/tests/single-use-stream-source.spec.ts index 81b0a463..fd267a8b 100644 --- a/tests/single-use-stream-source.spec.ts +++ b/tests/single-use-stream-source.spec.ts @@ -48,12 +48,7 @@ describe('zip in a single use stream source', function() { await using(tmpFileDisposer(false), async file => { await multiWrite.pipeSourceToDestinations( source, - [ - new sourceDestination.File( - file.path, - sourceDestination.File.OpenFlags.ReadWrite, - ), - ], + [new sourceDestination.File(file.path, true)], // onFail (_destination: sourceDestination.SourceDestination, _error: Error) => { assert(false); diff --git a/tests/sparse.spec.ts b/tests/sparse.spec.ts index 469c0813..3acbed77 100644 --- a/tests/sparse.spec.ts +++ b/tests/sparse.spec.ts @@ -41,10 +41,7 @@ describe('sparse streams', function() { this.timeout(DEFAULT_IMAGE_TESTS_TIMEOUT); it('dmgs, sparse streams and verifiers', async () => { - const source = new sourceDestination.File( - DMG_PATH, - sourceDestination.File.OpenFlags.Read, - ); + const source = new sourceDestination.File(DMG_PATH); const innerSource = await source.getInnerSource(); assert(innerSource instanceof sourceDestination.DmgSource); @@ -55,10 +52,7 @@ describe('sparse streams', function() { // Create a temporary destination file: await using(tmpFileDisposer(false), async ({ path }: { path: string }) => { - const destination = new sourceDestination.File( - path, - sourceDestination.File.OpenFlags.ReadWrite, - ); + const destination = new sourceDestination.File(path, true); await destination.open(); // Test sparse write stream const destinationStream = await destination.createSparseWriteStream(); @@ -113,10 +107,7 @@ describe('sparse streams', function() { // Test regular streams const sourceStream = await innerSource.createReadStream(); await using(tmpFileDisposer(false), async ({ path }: { path: string }) => { - const destination = new sourceDestination.File( - path, - sourceDestination.File.OpenFlags.ReadWrite, - ); + const destination = new sourceDestination.File(path, true); await destination.open(); const destinationStream = await destination.createWriteStream(); await new Promise((resolve, reject) => { @@ -146,10 +137,7 @@ describe('sparse streams', function() { for (const createStreamFromDisk of [false, true]) { for (const checksumType of checksumTypes) { it(`${checksumType} hasher, createStreamFromDisk=${createStreamFromDisk}, alignment=${alignment}`, async () => { - const source = new sourceDestination.File( - DISK_PATH, - sourceDestination.File.OpenFlags.Read, - ); + const source = new sourceDestination.File(DISK_PATH); const trimmedSource = new sourceDestination.ConfiguredSource( source, true, @@ -161,7 +149,7 @@ describe('sparse streams', function() { ); await trimmedSource.open(); const sourceSparseStream = await trimmedSource.createSparseReadStream( - true, + { generateChecksums: true }, ); if (alignment === 1) { assert(sourceSparseStream.blocks.length === 15); @@ -176,10 +164,7 @@ describe('sparse streams', function() { await using( tmpFileDisposer(false), async ({ path }: { path: string }) => { - const destination = new sourceDestination.File( - path, - sourceDestination.File.OpenFlags.ReadWrite, - ); + const destination = new sourceDestination.File(path, true); await destination.open(); // Test sparse write stream const destinationStream = await destination.createSparseWriteStream(); @@ -246,10 +231,7 @@ describe('sparse streams', function() { } it('blockmap in a zip file', async () => { - const source = new sourceDestination.File( - ZIP_PATH, - sourceDestination.File.OpenFlags.Read, - ); + const source = new sourceDestination.File(ZIP_PATH); const innerSource = await source.getInnerSource(); assert(innerSource instanceof sourceDestination.ZipSource); @@ -269,10 +251,7 @@ describe('sparse streams', function() { // Create a temporary destination file: await using(tmpFileDisposer(false), async ({ path }: { path: string }) => { - const destination = new sourceDestination.File( - path, - sourceDestination.File.OpenFlags.ReadWrite, - ); + const destination = new sourceDestination.File(path, true); await destination.open(); // Test sparse write stream const destinationStream = await destination.createSparseWriteStream(); diff --git a/tests/tester.ts b/tests/tester.ts index 056e9f36..707b7b0d 100644 --- a/tests/tester.ts +++ b/tests/tester.ts @@ -67,7 +67,7 @@ export async function blockDeviceFromFile( isVirtual: false, logicalBlockSize: 512, }; - return new FakeBlockDevice(drive); + return new FakeBlockDevice(drive, false, true, false); } export async function testImageNoIt( @@ -86,10 +86,7 @@ export async function testImageNoIt( ): Promise { let source: sourceDestination.File | sourceDestination.BlockDevice; if (sourceClass === sourceDestination.File) { - source = new sourceDestination.File( - imagePath, - sourceDestination.File.OpenFlags.Read, - ); + source = new sourceDestination.File(imagePath); } else { source = await blockDeviceFromFile(imagePath); } @@ -103,10 +100,7 @@ export async function testImageNoIt( const sourceMetadata = await innerSource.getMetadata(); const sourceStat = await stat(imagePath); - const compareSource = new sourceDestination.File( - compareToPath, - sourceDestination.File.OpenFlags.Read, - ); + const compareSource = new sourceDestination.File(compareToPath); await compareSource.open(); const compareMetadata = await compareSource.getMetadata(); const compareStat = await stat(compareToPath); @@ -214,10 +208,7 @@ export function expectSourceSourceError( message: string, ) { it(testName, async function() { - const source = new sourceDestination.File( - filePath, - sourceDestination.File.OpenFlags.Read, - ); + const source = new sourceDestination.File(filePath); await source.open(); const innerSource = new Cls(source); try { @@ -238,10 +229,7 @@ export function expectGetInnerSourceError( message: string, ) { it(testName, async function() { - const source = new sourceDestination.File( - filePath, - sourceDestination.File.OpenFlags.Read, - ); + const source = new sourceDestination.File(filePath); try { await source.getInnerSource(); } catch (error) { diff --git a/tests/zip.spec.ts b/tests/zip.spec.ts index ce1e4001..cf02f96b 100644 --- a/tests/zip.spec.ts +++ b/tests/zip.spec.ts @@ -105,10 +105,7 @@ describe('zip support', function() { for (const preferStreamSource of [false, true]) { it(`should fail to read from a zip file containing no archive (use stream=${preferStreamSource})`, async () => { const source = new sourceDestination.ZipSource( - new sourceDestination.File( - join(ZIP_PATH, 'zip-directory-empty.zip'), - sourceDestination.File.OpenFlags.Read, - ), + new sourceDestination.File(join(ZIP_PATH, 'zip-directory-empty.zip')), preferStreamSource, () => false, // Don't match any filename ); diff --git a/typings/ronomon__direct-io/index.d.ts b/typings/ronomon__direct-io/index.d.ts index 4cadd905..e620094b 100644 --- a/typings/ronomon__direct-io/index.d.ts +++ b/typings/ronomon__direct-io/index.d.ts @@ -1,3 +1,5 @@ declare module '@ronomon/direct-io' { + const O_EXLOCK: number; + function getAlignedBuffer(size: number, alignment: number): Buffer; } From 554b213bba8168d8a5cc1acb3eba23c154f457ed Mon Sep 17 00:00:00 2001 From: Alexis Svinartchouk Date: Fri, 27 Mar 2020 19:23:24 +0100 Subject: [PATCH 06/23] Update generated docs Change-type: patch --- doc/README.md | 629 +++--- doc/classes/adapter.md | 116 +- doc/classes/alignedreadablestate.md | 93 + doc/classes/balenas3source.md | 241 ++- doc/classes/blockdevice.md | 338 +-- doc/classes/blockdeviceadapter.md | 167 +- doc/classes/blockreadstream.md | 360 ++-- doc/classes/blocksverificationerror.md | 14 +- doc/classes/blocktransformstream.md | 530 +++-- doc/classes/blockwritestream.md | 431 ++-- doc/classes/bzip2source.md | 225 +- doc/classes/checksumverificationerror.md | 14 +- doc/classes/compressedsource.md | 225 +- doc/classes/configuredsource.md | 267 ++- doc/classes/countinghashstream.md | 446 ++-- doc/classes/countingwritable.md | 369 +++- doc/classes/crc32hasher.md | 12 +- doc/classes/dmgsource.md | 229 +- doc/classes/driverlessdevice.md | 253 ++- doc/classes/driverlessdeviceadapter_.md | 130 +- doc/classes/file.md | 322 +-- doc/classes/gzipsource.md | 225 +- doc/classes/http.md | 229 +- doc/classes/multidestination.md | 224 +- doc/classes/multidestinationerror.md | 14 +- doc/classes/multidestinationverifier.md | 134 +- doc/classes/notcapable.md | 8 +- doc/classes/randomaccesszipsource.md | 248 ++- doc/classes/scanner.md | 128 +- doc/classes/singleusestreamsource.md | 220 +- doc/classes/sourcedestination.md | 223 +- doc/classes/sourcedestinationfs.md | 20 +- doc/classes/sourcedisk.md | 28 +- doc/classes/sourcerandomaccessreader.md | 122 +- doc/classes/sourcesource.md | 219 +- doc/classes/sparsefilterstream.md | 477 +++-- doc/classes/sparsereadstream.md | 357 ++-- doc/classes/sparsestreamverifier.md | 130 +- doc/classes/sparsetransformstream.md | 1684 +++++++++++++++ doc/classes/sparsewritestream.md | 377 +++- doc/classes/streamlimiter.md | 452 ++-- doc/classes/streamverifier.md | 132 +- doc/classes/streamzipsource.md | 226 +- doc/classes/usbbootdeviceadapter.md | 126 +- doc/classes/usbbootdrive.md | 259 ++- doc/classes/verificationerror.md | 10 +- doc/classes/verifier.md | 124 +- doc/classes/xzsource.md | 225 +- doc/classes/zipsource.md | 240 ++- doc/enums/openflags.md | 37 - doc/interfaces/adaptersourcedestination.md | 229 +- doc/interfaces/alignedlockablebuffer.md | 1843 +++++++++++++++++ doc/interfaces/block.md | 4 +- doc/interfaces/blockswithchecksum.md | 6 +- doc/interfaces/createreadstreamoptions.md | 57 + .../createsparsereadstreamoptions.md | 39 + doc/interfaces/drivelistdrive.md | 4 +- doc/interfaces/execresult.md | 4 +- doc/interfaces/metadata.md | 36 +- doc/interfaces/multidestinationprogress.md | 36 +- doc/interfaces/multidestinationstate.md | 24 +- doc/interfaces/operation.md | 4 +- .../pipesourcetodestinationsresult.md | 4 +- doc/interfaces/progressevent.md | 6 +- doc/interfaces/sourcetransform.md | 442 ++-- doc/interfaces/sparsereadable.md | 157 +- doc/interfaces/sparsereaderstate.md | 6 +- doc/interfaces/sparsestreamchunk.md | 6 +- doc/interfaces/sparsewritable.md | 133 +- doc/interfaces/tmpfileresult.md | 4 +- doc/interfaces/wificonfig.md | 12 +- 71 files changed, 11336 insertions(+), 4029 deletions(-) create mode 100644 doc/classes/alignedreadablestate.md create mode 100644 doc/classes/sparsetransformstream.md delete mode 100644 doc/enums/openflags.md create mode 100644 doc/interfaces/alignedlockablebuffer.md create mode 100644 doc/interfaces/createreadstreamoptions.md create mode 100644 doc/interfaces/createsparsereadstreamoptions.md diff --git a/doc/README.md b/doc/README.md index cd76b70c..30501000 100644 --- a/doc/README.md +++ b/doc/README.md @@ -4,13 +4,10 @@ ## Index -### Enumerations - -* [OpenFlags](enums/openflags.md) - ### Classes * [Adapter](classes/adapter.md) +* [AlignedReadableState](classes/alignedreadablestate.md) * [BZip2Source](classes/bzip2source.md) * [BalenaS3Source](classes/balenas3source.md) * [BlockDevice](classes/blockdevice.md) @@ -46,6 +43,7 @@ * [SparseFilterStream](classes/sparsefilterstream.md) * [SparseReadStream](classes/sparsereadstream.md) * [SparseStreamVerifier](classes/sparsestreamverifier.md) +* [SparseTransformStream](classes/sparsetransformstream.md) * [SparseWriteStream](classes/sparsewritestream.md) * [StreamLimiter](classes/streamlimiter.md) * [StreamVerifier](classes/streamverifier.md) @@ -60,8 +58,11 @@ ### Interfaces * [AdapterSourceDestination](interfaces/adaptersourcedestination.md) +* [AlignedLockableBuffer](interfaces/alignedlockablebuffer.md) * [Block](interfaces/block.md) * [BlocksWithChecksum](interfaces/blockswithchecksum.md) +* [CreateReadStreamOptions](interfaces/createreadstreamoptions.md) +* [CreateSparseReadStreamOptions](interfaces/createsparsereadstreamoptions.md) * [DrivelistDrive](interfaces/drivelistdrive.md) * [ExecResult](interfaces/execresult.md) * [Metadata](interfaces/metadata.md) @@ -95,7 +96,7 @@ * [BITS](README.md#const-bits) * [CHUNK_SIZE](README.md#const-chunk_size) -* [DEFAULT_BLOCK_SIZE](README.md#const-default_block_size) +* [DEFAULT_ALIGNMENT](README.md#const-default_alignment) * [DISKPART_DELAY](README.md#const-diskpart_delay) * [DISKPART_RETRIES](README.md#const-diskpart_retries) * [DriverlessDeviceAdapter](README.md#const-driverlessdeviceadapter) @@ -109,39 +110,52 @@ * [ProgressBlockReadStream](README.md#const-progressblockreadstream) * [ProgressBlockWriteStream](README.md#const-progressblockwritestream) * [ProgressHashStream](README.md#const-progresshashstream) +* [ProgressReadStream](README.md#const-progressreadstream) +* [ProgressSparseTransformStream](README.md#const-progresssparsetransformstream) * [ProgressSparseWriteStream](README.md#const-progresssparsewritestream) * [ProgressWritable](README.md#const-progresswritable) * [ProgressWriteStream](README.md#const-progresswritestream) * [RETRY_BASE_TIMEOUT](README.md#const-retry_base_timeout) +* [RWMutex](README.md#rwmutex) * [SCAN_INTERVAL](README.md#const-scan_interval) * [TMP_DIR](README.md#const-tmp_dir) * [TMP_RANDOM_BYTES](README.md#const-tmp_random_bytes) * [TRIES](README.md#const-tries) * [UNMOUNT_ON_SUCCESS_TIMEOUT_MS](README.md#const-unmount_on_success_timeout_ms) * [USBBOOT_RPI_COMPUTE_MODULE_NAMES](README.md#const-usbboot_rpi_compute_module_names) -* [USE_ALIGNED_IO](README.md#const-use_aligned_io) * [WIN32_FIRST_BYTES_TO_KEEP](README.md#const-win32_first_bytes_to_keep) * [XXHASH_SEED](README.md#const-xxhash_seed) +* [close](README.md#const-close) * [debug](README.md#const-debug) +* [fstat](README.md#const-fstat) +* [fsync](README.md#const-fsync) * [getCrc](README.md#const-getcrc) * [getRaspberrypiUsbboot](README.md#const-getraspberrypiusbboot) * [getUnmountDisk](README.md#const-getunmountdisk) * [getXXHash](README.md#const-getxxhash) +* [open](README.md#const-open) * [parseFileIndexAsync](README.md#const-parsefileindexasync) +* [read](README.md#const-read) +* [readFile](README.md#const-readfile) * [speedometer](README.md#speedometer) +* [stat](README.md#const-stat) * [unbzip2Stream](README.md#unbzip2stream) +* [unlink](README.md#const-unlink) +* [write](README.md#const-write) +* [writeFile](README.md#const-writefile) * [zlib](README.md#zlib) ### Functions * [asCallback](README.md#ascallback) +* [attachMutex](README.md#attachmutex) * [blockmapToBlocks](README.md#blockmaptoblocks) * [blocksLength](README.md#blockslength) * [blocksVerificationErrorMessage](README.md#blocksverificationerrormessage) * [clean](README.md#const-clean) -* [close](README.md#close) * [configure](README.md#const-configure) * [copy](README.md#const-copy) +* [createBuffer](README.md#createbuffer) * [createHasher](README.md#createhasher) * [createNetworkConfigFiles](README.md#const-createnetworkconfigfiles) * [createSparseReaderStateIterator](README.md#createsparsereaderstateiterator) @@ -150,13 +164,12 @@ * [execFileAsync](README.md#const-execfileasync) * [execute](README.md#const-execute) * [executeOperation](README.md#const-executeoperation) -* [fstat](README.md#fstat) -* [fsync](README.md#fsync) * [getDiskDeviceType](README.md#const-getdiskdevicetype) * [getEta](README.md#geteta) * [getFileStreamFromZipStream](README.md#const-getfilestreamfromzipstream) * [getPartitionIndex](README.md#const-getpartitionindex) * [getRootStream](README.md#getrootstream) +* [isAlignedLockableBuffer](README.md#isalignedlockablebuffer) * [isSourceTransform](README.md#issourcetransform) * [isTransientError](README.md#istransienterror) * [isntNull](README.md#isntnull) @@ -164,25 +177,19 @@ * [makeClassEmitProgressEvents](README.md#makeclassemitprogressevents) * [matchSupportedExtensions](README.md#matchsupportedextensions) * [nmWifiConfig](README.md#const-nmwificonfig) -* [open](README.md#open) +* [noop](README.md#noop) * [pad](README.md#const-pad) * [pipeRegularSourceToDestination](README.md#piperegularsourcetodestination) * [pipeSourceToDestinations](README.md#pipesourcetodestinations) * [pipeSparseSourceToDestination](README.md#pipesparsesourcetodestination) * [randomFilePath](README.md#const-randomfilepath) -* [read](README.md#read) -* [readFile](README.md#readfile) * [runDiskpart](README.md#const-rundiskpart) * [runVerifier](README.md#runverifier) * [sparseStreamToBuffer](README.md#sparsestreamtobuffer) -* [stat](README.md#stat) * [streamToBuffer](README.md#streamtobuffer) * [tmpFile](README.md#const-tmpfile) * [tmpFileDisposer](README.md#const-tmpfiledisposer) -* [unlink](README.md#unlink) * [verifyOrGenerateChecksum](README.md#verifyorgeneratechecksum) -* [write](README.md#write) -* [writeFile](README.md#writefile) ### Object literals @@ -194,7 +201,7 @@ Ƭ **AnyHasher**: *[CRC32Hasher](classes/crc32hasher.md) | Hash | XXHash | XXHash64* -*Defined in [lib/sparse-stream/shared.ts:66](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/sparse-stream/shared.ts#L66)* +*Defined in [lib/sparse-stream/shared.ts:75](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/sparse-stream/shared.ts#L75)* ___ @@ -202,7 +209,7 @@ ___ Ƭ **ChecksumType**: *"crc32" | "sha1" | "sha256" | "xxhash32" | "xxhash64"* -*Defined in [lib/sparse-stream/shared.ts:25](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/sparse-stream/shared.ts#L25)* +*Defined in [lib/sparse-stream/shared.ts:26](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/sparse-stream/shared.ts#L26)* ___ @@ -210,7 +217,7 @@ ___ Ƭ **ConfigureFunction**: *function* -*Defined in [lib/source-destination/configured-source/configured-source.ts:41](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/configured-source/configured-source.ts#L41)* +*Defined in [lib/source-destination/configured-source/configured-source.ts:45](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/configured-source/configured-source.ts#L45)* #### Type declaration: @@ -229,7 +236,7 @@ ___ Ƭ **Constructor**: *object* -*Defined in [lib/source-destination/progress.ts:25](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/progress.ts#L25)* +*Defined in [lib/source-destination/progress.ts:25](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/progress.ts#L25)* #### Type declaration: @@ -239,7 +246,7 @@ ___ Ƭ **Name**: *"balena" | "resin"* -*Defined in [lib/source-destination/balena-s3-source.ts:25](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/balena-s3-source.ts#L25)* +*Defined in [lib/source-destination/balena-s3-source.ts:28](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/balena-s3-source.ts#L28)* ___ @@ -247,7 +254,7 @@ ___ Ƭ **OnFailFunction**: *function* -*Defined in [lib/multi-write.ts:60](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/multi-write.ts#L60)* +*Defined in [lib/multi-write.ts:60](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/multi-write.ts#L60)* #### Type declaration: @@ -266,7 +273,7 @@ ___ Ƭ **OnProgressFunction**: *function* -*Defined in [lib/multi-write.ts:65](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/multi-write.ts#L65)* +*Defined in [lib/multi-write.ts:65](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/multi-write.ts#L65)* #### Type declaration: @@ -284,7 +291,7 @@ ___ Ƭ **OperationCommand**: *"configure" | "copy"* -*Defined in [lib/source-destination/configured-source/configure.ts:28](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/configured-source/configure.ts#L28)* +*Defined in [lib/source-destination/configured-source/configure.ts:28](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/configured-source/configure.ts#L28)* ___ @@ -292,7 +299,7 @@ ___ Ƭ **WriteStep**: *"flashing" | "verifying" | "finished"* -*Defined in [lib/multi-write.ts:34](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/multi-write.ts#L34)* +*Defined in [lib/multi-write.ts:34](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/multi-write.ts#L34)* ___ @@ -300,7 +307,7 @@ ___ Ƭ **XXHash**: *typeof xxhash* -*Defined in [lib/lazy.ts:19](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/lazy.ts#L19)* +*Defined in [lib/lazy.ts:21](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/lazy.ts#L21)* ## Variables @@ -308,7 +315,7 @@ ___ • **BITS**: *64 | 32* = arch === 'x64' || arch === 'aarch64' ? 64 : 32 -*Defined in [lib/source-destination/source-destination.ts:45](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L45)* +*Defined in [lib/source-destination/source-destination.ts:45](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L45)* ___ @@ -316,15 +323,15 @@ ___ • **CHUNK_SIZE**: *number* = 1024 ** 2 -*Defined in [lib/constants.ts:19](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/constants.ts#L19)* +*Defined in [lib/constants.ts:19](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/constants.ts#L19)* ___ -### `Const` DEFAULT_BLOCK_SIZE +### `Const` DEFAULT_ALIGNMENT -• **DEFAULT_BLOCK_SIZE**: *512* = 512 +• **DEFAULT_ALIGNMENT**: *512* = 512 -*Defined in [lib/source-destination/block-device.ts:41](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/block-device.ts#L41)* +*Defined in [lib/constants.ts:23](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/constants.ts#L23)* ___ @@ -332,7 +339,7 @@ ___ • **DISKPART_DELAY**: *2000* = 2000 -*Defined in [lib/diskpart.ts:27](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/diskpart.ts#L27)* +*Defined in [lib/diskpart.ts:27](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/diskpart.ts#L27)* ___ @@ -340,7 +347,7 @@ ___ • **DISKPART_RETRIES**: *5* = 5 -*Defined in [lib/diskpart.ts:28](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/diskpart.ts#L28)* +*Defined in [lib/diskpart.ts:28](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/diskpart.ts#L28)* ___ @@ -348,7 +355,7 @@ ___ • **DriverlessDeviceAdapter**: *undefined | [DriverlessDeviceAdapter$](classes/driverlessdeviceadapter_.md)* = platform === 'win32' ? DriverlessDeviceAdapter$ : undefined -*Defined in [lib/scanner/adapters/driverless.ts:105](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/scanner/adapters/driverless.ts#L105)* +*Defined in [lib/scanner/adapters/driverless.ts:105](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/scanner/adapters/driverless.ts#L105)* ___ @@ -356,7 +363,7 @@ ___ • **ISIZE_LENGTH**: *4* = 4 -*Defined in [lib/source-destination/gzip.ts:23](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/gzip.ts#L23)* +*Defined in [lib/source-destination/gzip.ts:23](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/gzip.ts#L23)* ___ @@ -364,7 +371,7 @@ ___ • **MBR_LAST_PRIMARY_PARTITION**: *4* = 4 -*Defined in [lib/source-destination/configured-source/configure.ts:36](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/configured-source/configure.ts#L36)* +*Defined in [lib/source-destination/configured-source/configure.ts:36](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/configured-source/configure.ts#L36)* ___ @@ -379,7 +386,7 @@ ___ 'routeMetric', ] -*Defined in [lib/source-destination/configured-source/operations/configure.ts:23](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/configured-source/operations/configure.ts#L23)* +*Defined in [lib/source-destination/configured-source/operations/configure.ts:23](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/configured-source/operations/configure.ts#L23)* ___ @@ -387,7 +394,7 @@ ___ • **NO_MATCHING_FILE_MSG**: *"Can't find a matching file in this zip archive"* = "Can't find a matching file in this zip archive" -*Defined in [lib/constants.ts:20](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/constants.ts#L20)* +*Defined in [lib/constants.ts:20](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/constants.ts#L20)* ___ @@ -395,7 +402,7 @@ ___ • **PARTITION_FIELDS**: *string[]* = ['partition', 'to.partition', 'from.partition'] -*Defined in [lib/source-destination/configured-source/configure.ts:35](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/configured-source/configure.ts#L35)* +*Defined in [lib/source-destination/configured-source/configure.ts:35](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/configured-source/configure.ts#L35)* ___ @@ -403,7 +410,7 @@ ___ • **PATTERN**: *RegExp‹›* = /PHYSICALDRIVE(\d+)/i -*Defined in [lib/diskpart.ts:29](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/diskpart.ts#L29)* +*Defined in [lib/diskpart.ts:29](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/diskpart.ts#L29)* ___ @@ -411,7 +418,7 @@ ___ • **PROGRESS_EMISSION_INTERVAL**: *number* = 1000 / 2 -*Defined in [lib/constants.ts:17](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/constants.ts#L17)* +*Defined in [lib/constants.ts:17](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/constants.ts#L17)* ___ @@ -424,7 +431,7 @@ ___ PROGRESS_EMISSION_INTERVAL, ) -*Defined in [lib/block-read-stream.ts:98](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/block-read-stream.ts#L98)* +*Defined in [lib/block-read-stream.ts:118](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/block-read-stream.ts#L118)* ___ @@ -437,7 +444,7 @@ ___ PROGRESS_EMISSION_INTERVAL, ) -*Defined in [lib/block-write-stream.ts:170](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/block-write-stream.ts#L170)* +*Defined in [lib/block-write-stream.ts:124](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/block-write-stream.ts#L124)* ___ @@ -450,7 +457,33 @@ ___ PROGRESS_EMISSION_INTERVAL, ) -*Defined in [lib/source-destination/source-destination.ts:58](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L58)* +*Defined in [lib/source-destination/source-destination.ts:58](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L58)* + +___ + +### `Const` ProgressReadStream + +• **ProgressReadStream**: *(Anonymous class) & ReadStream* = makeClassEmitProgressEvents( + ReadStream, + 'bytesRead', + 'bytesRead', + PROGRESS_EMISSION_INTERVAL, +) + +*Defined in [lib/source-destination/file.ts:36](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/file.ts#L36)* + +___ + +### `Const` ProgressSparseTransformStream + +• **ProgressSparseTransformStream**: *(Anonymous class) & [SparseTransformStream](classes/sparsetransformstream.md)* = makeClassEmitProgressEvents( + SparseTransformStream, + 'bytesWritten', + 'position', + PROGRESS_EMISSION_INTERVAL, +) + +*Defined in [lib/sparse-stream/sparse-transform-stream.ts:81](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/sparse-stream/sparse-transform-stream.ts#L81)* ___ @@ -463,7 +496,7 @@ ___ PROGRESS_EMISSION_INTERVAL, ) -*Defined in [lib/sparse-stream/sparse-write-stream.ts:120](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/sparse-stream/sparse-write-stream.ts#L120)* +*Defined in [lib/sparse-stream/sparse-write-stream.ts:148](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/sparse-stream/sparse-write-stream.ts#L148)* ___ @@ -476,22 +509,20 @@ ___ PROGRESS_EMISSION_INTERVAL, ) -*Defined in [lib/source-destination/progress.ts:110](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/progress.ts#L110)* +*Defined in [lib/source-destination/progress.ts:110](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/progress.ts#L110)* ___ ### `Const` ProgressWriteStream -• **ProgressWriteStream**: *any* = makeClassEmitProgressEvents( - // type definitions for node 6 export fs.WriteStream as an interface, but it's a class. - // @ts-ignore - fs.WriteStream, +• **ProgressWriteStream**: *(Anonymous class) & WriteStream* = makeClassEmitProgressEvents( + WriteStream, 'bytesWritten', 'bytesWritten', PROGRESS_EMISSION_INTERVAL, ) -*Defined in [lib/source-destination/file.ts:36](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/file.ts#L36)* +*Defined in [lib/source-destination/file.ts:43](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/file.ts#L43)* ___ @@ -499,7 +530,15 @@ ___ • **RETRY_BASE_TIMEOUT**: *100* = 100 -*Defined in [lib/constants.ts:18](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/constants.ts#L18)* +*Defined in [lib/constants.ts:18](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/constants.ts#L18)* + +___ + +### RWMutex + +• **RWMutex**: *[RWMutex](README.md#rwmutex)* + +*Defined in [lib/aligned-lockable-buffer.ts:2](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/aligned-lockable-buffer.ts#L2)* ___ @@ -507,9 +546,9 @@ ___ • **SCAN_INTERVAL**: *1000* = 1000 -*Defined in [lib/scanner/adapters/block-device.ts:27](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/scanner/adapters/block-device.ts#L27)* +*Defined in [lib/scanner/adapters/block-device.ts:27](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/scanner/adapters/block-device.ts#L27)* -*Defined in [lib/scanner/adapters/driverless.ts:26](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/scanner/adapters/driverless.ts#L26)* +*Defined in [lib/scanner/adapters/driverless.ts:26](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/scanner/adapters/driverless.ts#L26)* ___ @@ -517,7 +556,7 @@ ___ • **TMP_DIR**: *string* = tmpdir() -*Defined in [lib/tmp.ts:25](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/tmp.ts#L25)* +*Defined in [lib/tmp.ts:25](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/tmp.ts#L25)* ___ @@ -525,7 +564,7 @@ ___ • **TMP_RANDOM_BYTES**: *6* = 6 -*Defined in [lib/tmp.ts:24](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/tmp.ts#L24)* +*Defined in [lib/tmp.ts:24](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/tmp.ts#L24)* ___ @@ -533,7 +572,7 @@ ___ • **TRIES**: *5* = 5 -*Defined in [lib/tmp.ts:26](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/tmp.ts#L26)* +*Defined in [lib/tmp.ts:26](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/tmp.ts#L26)* ___ @@ -541,7 +580,7 @@ ___ • **UNMOUNT_ON_SUCCESS_TIMEOUT_MS**: *2000* = 2000 -*Defined in [lib/source-destination/block-device.ts:40](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/block-device.ts#L40)* +*Defined in [lib/source-destination/block-device.ts:42](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/block-device.ts#L42)* **`summary`** Time, in milliseconds, to wait before unmounting on success @@ -559,31 +598,31 @@ ___ 'Linux File-Stor Gadget Media', ] -*Defined in [lib/scanner/adapters/block-device.ts:28](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/scanner/adapters/block-device.ts#L28)* +*Defined in [lib/scanner/adapters/block-device.ts:28](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/scanner/adapters/block-device.ts#L28)* ___ -### `Const` USE_ALIGNED_IO +### `Const` WIN32_FIRST_BYTES_TO_KEEP -• **USE_ALIGNED_IO**: *boolean* = platform() === 'win32' || platform() === 'darwin' +• **WIN32_FIRST_BYTES_TO_KEEP**: *number* = 64 * 1024 -*Defined in [lib/source-destination/block-device.ts:43](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/block-device.ts#L43)* +*Defined in [lib/source-destination/block-device.ts:43](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/block-device.ts#L43)* ___ -### `Const` WIN32_FIRST_BYTES_TO_KEEP +### `Const` XXHASH_SEED -• **WIN32_FIRST_BYTES_TO_KEEP**: *number* = 64 * 1024 +• **XXHASH_SEED**: *1163150152* = 1163150152 -*Defined in [lib/source-destination/block-device.ts:42](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/block-device.ts#L42)* +*Defined in [lib/constants.ts:22](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/constants.ts#L22)* ___ -### `Const` XXHASH_SEED +### `Const` close -• **XXHASH_SEED**: *1163150152* = 1163150152 +• **close**: *__promisify__* = promisify(fs.close) -*Defined in [lib/constants.ts:22](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/constants.ts#L22)* +*Defined in [lib/fs.ts:20](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/fs.ts#L20)* ___ @@ -591,15 +630,31 @@ ___ • **debug**: *IDebugger* = _debug('etcher-sdk:configured-source') -*Defined in [lib/diskpart.ts:25](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/diskpart.ts#L25)* +*Defined in [lib/diskpart.ts:25](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/diskpart.ts#L25)* -*Defined in [lib/block-write-stream.ts:31](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/block-write-stream.ts#L31)* +*Defined in [lib/block-write-stream.ts:29](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/block-write-stream.ts#L29)* -*Defined in [lib/scanner/adapters/block-device.ts:25](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/scanner/adapters/block-device.ts#L25)* +*Defined in [lib/scanner/adapters/block-device.ts:25](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/scanner/adapters/block-device.ts#L25)* -*Defined in [lib/scanner/scanner.ts:22](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/scanner/scanner.ts#L22)* +*Defined in [lib/scanner/scanner.ts:22](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/scanner/scanner.ts#L22)* -*Defined in [lib/source-destination/configured-source/configured-source.ts:39](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/configured-source/configured-source.ts#L39)* +*Defined in [lib/source-destination/configured-source/configured-source.ts:43](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/configured-source/configured-source.ts#L43)* + +___ + +### `Const` fstat + +• **fstat**: *__promisify__* = promisify(fs.fstat) + +*Defined in [lib/fs.ts:21](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/fs.ts#L21)* + +___ + +### `Const` fsync + +• **fsync**: *__promisify__* = promisify(fs.fsync) + +*Defined in [lib/fs.ts:22](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/fs.ts#L22)* ___ @@ -607,7 +662,7 @@ ___ • **getCrc**: *(Anonymous function)* = once(() => require('crc') as typeof import('crc')) -*Defined in [lib/lazy.ts:40](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/lazy.ts#L40)* +*Defined in [lib/lazy.ts:39](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/lazy.ts#L39)* ___ @@ -621,7 +676,7 @@ ___ } }) -*Defined in [lib/lazy.ts:24](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/lazy.ts#L24)* +*Defined in [lib/lazy.ts:23](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/lazy.ts#L23)* ___ @@ -631,7 +686,7 @@ ___ promisify((require('mountutils') as typeof import('mountutils')).unmountDisk), ) -*Defined in [lib/lazy.ts:36](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/lazy.ts#L36)* +*Defined in [lib/lazy.ts:35](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/lazy.ts#L35)* ___ @@ -641,7 +696,15 @@ ___ () => require('xxhash') as typeof import('xxhash'), ) -*Defined in [lib/lazy.ts:32](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/lazy.ts#L32)* +*Defined in [lib/lazy.ts:31](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/lazy.ts#L31)* + +___ + +### `Const` open + +• **open**: *__promisify__* = promisify(fs.open) + +*Defined in [lib/fs.ts:23](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/fs.ts#L23)* ___ @@ -649,17 +712,33 @@ ___ • **parseFileIndexAsync**: *function* = promisify(parseFileIndex) -*Defined in [lib/source-destination/xz.ts:24](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/xz.ts#L24)* +*Defined in [lib/source-destination/xz.ts:24](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/xz.ts#L24)* #### Type declaration: -▸ (`arg1`: A1): *Bluebird‹T›* +▸ (`arg1`: T1): *Promise‹TResult›* **Parameters:** Name | Type | ------ | ------ | -`arg1` | A1 | +`arg1` | T1 | + +___ + +### `Const` read + +• **read**: *__promisify__* = promisify(fs.read) + +*Defined in [lib/fs.ts:24](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/fs.ts#L24)* + +___ + +### `Const` readFile + +• **readFile**: *__promisify__* = promisify(fs.readFile) + +*Defined in [lib/fs.ts:25](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/fs.ts#L25)* ___ @@ -667,7 +746,15 @@ ___ • **speedometer**: *[speedometer](README.md#speedometer)* -*Defined in [lib/source-destination/progress.ts:21](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/progress.ts#L21)* +*Defined in [lib/source-destination/progress.ts:21](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/progress.ts#L21)* + +___ + +### `Const` stat + +• **stat**: *__promisify__* = promisify(fs.stat) + +*Defined in [lib/fs.ts:26](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/fs.ts#L26)* ___ @@ -675,7 +762,31 @@ ___ • **unbzip2Stream**: *[unbzip2Stream](README.md#unbzip2stream)* -*Defined in [lib/source-destination/bzip2.ts:18](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/bzip2.ts#L18)* +*Defined in [lib/source-destination/bzip2.ts:18](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/bzip2.ts#L18)* + +___ + +### `Const` unlink + +• **unlink**: *__promisify__* = promisify(fs.unlink) + +*Defined in [lib/fs.ts:27](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/fs.ts#L27)* + +___ + +### `Const` write + +• **write**: *__promisify__* = promisify(fs.write) + +*Defined in [lib/fs.ts:28](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/fs.ts#L28)* + +___ + +### `Const` writeFile + +• **writeFile**: *__promisify__* = promisify(fs.writeFile) + +*Defined in [lib/fs.ts:29](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/fs.ts#L29)* ___ @@ -683,32 +794,54 @@ ___ • **zlib**: *"zlib"* -*Defined in [lib/stream-limiter.ts:18](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/stream-limiter.ts#L18)* +*Defined in [lib/stream-limiter.ts:18](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/stream-limiter.ts#L18)* ## Functions ### asCallback -▸ **asCallback**(`promise`: Promise‹any›, `callback`: function): *void* +▸ **asCallback**<**T**>(`promise`: Promise‹T›, `callback`: function): *Promise‹void›* + +*Defined in [lib/utils.ts:85](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/utils.ts#L85)* + +**Type parameters:** -*Defined in [lib/utils.ts:64](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/utils.ts#L64)* +▪ **T** **Parameters:** -▪ **promise**: *Promise‹any›* +▪ **promise**: *Promise‹T›* ▪ **callback**: *function* -▸ (`error`: [Error](classes/notcapable.md#static-error) | void, `value?`: any): *void* +▸ (`error`: [Error](classes/notcapable.md#static-error) | void, `value?`: T): *void* **Parameters:** Name | Type | ------ | ------ | `error` | [Error](classes/notcapable.md#static-error) | void | -`value?` | any | +`value?` | T | -**Returns:** *void* +**Returns:** *Promise‹void›* + +___ + +### attachMutex + +▸ **attachMutex**(`buf`: [Buffer](interfaces/alignedlockablebuffer.md#buffer), `mutex`: [RWMutex](README.md#rwmutex), `alignment`: number): *[AlignedLockableBuffer](interfaces/alignedlockablebuffer.md)* + +*Defined in [lib/aligned-lockable-buffer.ts:11](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/aligned-lockable-buffer.ts#L11)* + +**Parameters:** + +Name | Type | +------ | ------ | +`buf` | [Buffer](interfaces/alignedlockablebuffer.md#buffer) | +`mutex` | [RWMutex](README.md#rwmutex) | +`alignment` | number | + +**Returns:** *[AlignedLockableBuffer](interfaces/alignedlockablebuffer.md)* ___ @@ -716,7 +849,7 @@ ___ ▸ **blockmapToBlocks**(`blockmap`: BlockMap): *[BlocksWithChecksum](interfaces/blockswithchecksum.md)[]* -*Defined in [lib/source-destination/zip.ts:46](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/zip.ts#L46)* +*Defined in [lib/source-destination/zip.ts:51](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/zip.ts#L51)* **Parameters:** @@ -732,7 +865,7 @@ ___ ▸ **blocksLength**(`blocks`: [BlocksWithChecksum](interfaces/blockswithchecksum.md)[]): *number* -*Defined in [lib/sparse-stream/shared.ts:130](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/sparse-stream/shared.ts#L130)* +*Defined in [lib/sparse-stream/shared.ts:139](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/sparse-stream/shared.ts#L139)* **Parameters:** @@ -748,7 +881,7 @@ ___ ▸ **blocksVerificationErrorMessage**(`blocksWithChecksum`: [BlocksWithChecksum](interfaces/blockswithchecksum.md), `checksum`: string): *string* -*Defined in [lib/errors.ts:37](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/errors.ts#L37)* +*Defined in [lib/errors.ts:37](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/errors.ts#L37)* **Parameters:** @@ -765,7 +898,7 @@ ___ ▸ **clean**(`device`: string): *Promise‹void›* -*Defined in [lib/diskpart.ts:86](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/diskpart.ts#L86)* +*Defined in [lib/diskpart.ts:86](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/diskpart.ts#L86)* **`summary`** Clean a device's partition tables @@ -784,27 +917,11 @@ Name | Type | Description | ___ -### close - -▸ **close**(`fd`: number): *Promise‹void›* - -*Defined in [lib/fs.ts:20](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/fs.ts#L20)* - -**Parameters:** - -Name | Type | ------- | ------ | -`fd` | number | - -**Returns:** *Promise‹void›* - -___ - ### `Const` configure ▸ **configure**(`disk`: Disk, `options`: object): *Promise‹void›* -*Defined in [lib/source-destination/configured-source/configure.ts:87](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/configured-source/configure.ts#L87)* +*Defined in [lib/source-destination/configured-source/configure.ts:87](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/configured-source/configure.ts#L87)* **Parameters:** @@ -824,7 +941,7 @@ ___ ▸ **copy**(`sourceFs`: AsyncFsLike, `sourcePath`: string, `destinationFs`: AsyncFsLike, `destinationPath`: string): *Promise‹void›* -*Defined in [lib/source-destination/configured-source/operations/copy.ts:22](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/configured-source/operations/copy.ts#L22)* +*Defined in [lib/source-destination/configured-source/operations/copy.ts:22](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/configured-source/operations/copy.ts#L22)* **Parameters:** @@ -839,11 +956,28 @@ Name | Type | ___ +### createBuffer + +▸ **createBuffer**(`size`: number, `alignment`: number): *[AlignedLockableBuffer](interfaces/alignedlockablebuffer.md)* + +*Defined in [lib/aligned-lockable-buffer.ts:28](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/aligned-lockable-buffer.ts#L28)* + +**Parameters:** + +Name | Type | +------ | ------ | +`size` | number | +`alignment` | number | + +**Returns:** *[AlignedLockableBuffer](interfaces/alignedlockablebuffer.md)* + +___ + ### createHasher ▸ **createHasher**(`checksumType?`: [ChecksumType](README.md#checksumtype)): *undefined | [AnyHasher](README.md#anyhasher)* -*Defined in [lib/sparse-stream/shared.ts:68](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/sparse-stream/shared.ts#L68)* +*Defined in [lib/sparse-stream/shared.ts:77](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/sparse-stream/shared.ts#L77)* **Parameters:** @@ -859,7 +993,7 @@ ___ ▸ **createNetworkConfigFiles**(`networks`: any): *object* -*Defined in [lib/source-destination/configured-source/operations/configure.ts:95](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/configured-source/operations/configure.ts#L95)* +*Defined in [lib/source-destination/configured-source/operations/configure.ts:95](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/configured-source/operations/configure.ts#L95)* **Parameters:** @@ -887,7 +1021,7 @@ ___ ▸ **createSparseReaderStateIterator**(`blocks`: [BlocksWithChecksum](interfaces/blockswithchecksum.md)[], `verify`: boolean, `generateChecksums`: boolean): *Iterator‹[SparseReaderState](interfaces/sparsereaderstate.md)›* -*Defined in [lib/sparse-stream/shared.ts:88](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/sparse-stream/shared.ts#L88)* +*Defined in [lib/sparse-stream/shared.ts:97](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/sparse-stream/shared.ts#L97)* **Parameters:** @@ -905,7 +1039,7 @@ ___ ▸ **difference**<**T**>(`setA`: Set‹T›, `setB`: Set‹T›): *Set‹T›* -*Defined in [lib/utils.ts:56](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/utils.ts#L56)* +*Defined in [lib/utils.ts:77](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/utils.ts#L77)* **Type parameters:** @@ -926,7 +1060,7 @@ ___ ▸ **driveKey**(`drive`: $Drive): *string* -*Defined in [lib/scanner/adapters/block-device.ts:47](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/scanner/adapters/block-device.ts#L47)* +*Defined in [lib/scanner/adapters/block-device.ts:47](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/scanner/adapters/block-device.ts#L47)* **Parameters:** @@ -942,7 +1076,7 @@ ___ ▸ **execFileAsync**(`command`: string, `args`: string[], `options`: ExecFileOptions): *Promise‹[ExecResult](interfaces/execresult.md)›* -*Defined in [lib/diskpart.ts:36](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/diskpart.ts#L36)* +*Defined in [lib/diskpart.ts:36](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/diskpart.ts#L36)* **Parameters:** @@ -960,7 +1094,7 @@ ___ ▸ **execute**(`operation`: any, `disk`: Disk): *Promise‹void›* -*Defined in [lib/source-destination/configured-source/operations/configure.ts:114](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/configured-source/operations/configure.ts#L114)* +*Defined in [lib/source-destination/configured-source/operations/configure.ts:114](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/configured-source/operations/configure.ts#L114)* **Parameters:** @@ -973,7 +1107,7 @@ Name | Type | ▸ **execute**(`operation`: any, `disk`: Disk): *Promise‹void›* -*Defined in [lib/source-destination/configured-source/operations/copy.ts:39](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/configured-source/operations/copy.ts#L39)* +*Defined in [lib/source-destination/configured-source/operations/copy.ts:39](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/configured-source/operations/copy.ts#L39)* **Parameters:** @@ -990,7 +1124,7 @@ ___ ▸ **executeOperation**(`operation`: [Operation](interfaces/operation.md), `disk`: Disk): *Promise‹void›* -*Defined in [lib/source-destination/configured-source/configure.ts:43](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/configured-source/configure.ts#L43)* +*Defined in [lib/source-destination/configured-source/configure.ts:43](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/configured-source/configure.ts#L43)* **Parameters:** @@ -1003,43 +1137,11 @@ Name | Type | ___ -### fstat - -▸ **fstat**(`fd`: number): *Promise‹Stats›* - -*Defined in [lib/fs.ts:32](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/fs.ts#L32)* - -**Parameters:** - -Name | Type | ------- | ------ | -`fd` | number | - -**Returns:** *Promise‹Stats›* - -___ - -### fsync - -▸ **fsync**(`fd`: number): *Promise‹void›* - -*Defined in [lib/fs.ts:46](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/fs.ts#L46)* - -**Parameters:** - -Name | Type | ------- | ------ | -`fd` | number | - -**Returns:** *Promise‹void›* - -___ - ### `Const` getDiskDeviceType ▸ **getDiskDeviceType**(`disk`: Disk): *Promise‹any›* -*Defined in [lib/source-destination/configured-source/configure.ts:68](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/configured-source/configure.ts#L68)* +*Defined in [lib/source-destination/configured-source/configure.ts:68](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/configured-source/configure.ts#L68)* **Parameters:** @@ -1055,7 +1157,7 @@ ___ ▸ **getEta**(`current`: number, `total`: number, `speed`: number): *number | undefined* -*Defined in [lib/multi-write.ts:72](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/multi-write.ts#L72)* +*Defined in [lib/multi-write.ts:72](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/multi-write.ts#L72)* **Parameters:** @@ -1073,7 +1175,7 @@ ___ ▸ **getFileStreamFromZipStream**(`zipStream`: ReadableStream, `match`: function): *Promise‹ZipStreamEntry›* -*Defined in [lib/zip.ts:21](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/zip.ts#L21)* +*Defined in [lib/zip.ts:21](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/zip.ts#L21)* **Parameters:** @@ -1097,7 +1199,7 @@ ___ ▸ **getPartitionIndex**(`partition`: number | object): *number* -*Defined in [lib/source-destination/configured-source/configure.ts:50](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/configured-source/configure.ts#L50)* +*Defined in [lib/source-destination/configured-source/configure.ts:50](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/configured-source/configure.ts#L50)* **Parameters:** @@ -1113,7 +1215,7 @@ ___ ▸ **getRootStream**(`stream`: ReadableStream): *ReadableStream* -*Defined in [lib/source-destination/compressed-source.ts:33](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/compressed-source.ts#L33)* +*Defined in [lib/source-destination/compressed-source.ts:34](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/compressed-source.ts#L34)* **Parameters:** @@ -1125,11 +1227,27 @@ Name | Type | ___ +### isAlignedLockableBuffer + +▸ **isAlignedLockableBuffer**(`buffer`: [Buffer](interfaces/alignedlockablebuffer.md#buffer)): *buffer is AlignedLockableBuffer* + +*Defined in [lib/aligned-lockable-buffer.ts:39](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/aligned-lockable-buffer.ts#L39)* + +**Parameters:** + +Name | Type | +------ | ------ | +`buffer` | [Buffer](interfaces/alignedlockablebuffer.md#buffer) | + +**Returns:** *buffer is AlignedLockableBuffer* + +___ + ### isSourceTransform ▸ **isSourceTransform**(`stream`: any): *stream is SourceTransform* -*Defined in [lib/source-destination/compressed-source.ts:29](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/compressed-source.ts#L29)* +*Defined in [lib/source-destination/compressed-source.ts:30](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/compressed-source.ts#L30)* **Parameters:** @@ -1145,7 +1263,7 @@ ___ ▸ **isTransientError**(`error`: ErrnoException): *boolean* -*Defined in [lib/errors.ts:65](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/errors.ts#L65)* +*Defined in [lib/errors.ts:65](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/errors.ts#L65)* **`summary`** Determine whether an error is considered a transient occurrence, and the operation should be retried @@ -1168,7 +1286,7 @@ ___ ▸ **isntNull**(`x`: any): *boolean* -*Defined in [lib/source-destination/multi-destination.ts:31](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/multi-destination.ts#L31)* +*Defined in [lib/source-destination/multi-destination.ts:37](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/multi-destination.ts#L37)* **Parameters:** @@ -1184,7 +1302,7 @@ ___ ▸ **looksLikeComputeModule**(`description`: string): *boolean* -*Defined in [lib/scanner/adapters/block-device.ts:38](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/scanner/adapters/block-device.ts#L38)* +*Defined in [lib/scanner/adapters/block-device.ts:38](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/scanner/adapters/block-device.ts#L38)* **Parameters:** @@ -1200,7 +1318,7 @@ ___ ▸ **makeClassEmitProgressEvents**<**T**>(`Cls`: T, `attribute`: string, `positionAttribute`: string, `interval`: number): *(Anonymous class) & T* -*Defined in [lib/source-destination/progress.ts:33](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/progress.ts#L33)* +*Defined in [lib/source-destination/progress.ts:33](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/progress.ts#L33)* **Type parameters:** @@ -1223,7 +1341,7 @@ ___ ▸ **matchSupportedExtensions**(`filename`: string): *boolean* -*Defined in [lib/source-destination/zip.ts:61](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/zip.ts#L61)* +*Defined in [lib/source-destination/zip.ts:66](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/zip.ts#L66)* **Parameters:** @@ -1239,7 +1357,7 @@ ___ ▸ **nmWifiConfig**(`index`: number, `options`: [WifiConfig](interfaces/wificonfig.md)): *string* -*Defined in [lib/source-destination/configured-source/operations/configure.ts:41](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/configured-source/operations/configure.ts#L41)* +*Defined in [lib/source-destination/configured-source/operations/configure.ts:41](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/configured-source/operations/configure.ts#L41)* **Parameters:** @@ -1252,21 +1370,13 @@ Name | Type | ___ -### open +### noop -▸ **open**(`path`: string | Buffer, `flags`: string | number, `mode`: number): *Promise‹number›* +▸ **noop**(): *void* -*Defined in [lib/fs.ts:58](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/fs.ts#L58)* +*Defined in [lib/utils.ts:97](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/utils.ts#L97)* -**Parameters:** - -Name | Type | Default | ------- | ------ | ------ | -`path` | string | Buffer | - | -`flags` | string | number | - | -`mode` | number | 438 | - -**Returns:** *Promise‹number›* +**Returns:** *void* ___ @@ -1274,7 +1384,7 @@ ___ ▸ **pad**(`num`: number): *string* -*Defined in [lib/source-destination/configured-source/operations/configure.ts:110](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/configured-source/operations/configure.ts#L110)* +*Defined in [lib/source-destination/configured-source/operations/configure.ts:110](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/configured-source/operations/configure.ts#L110)* **Parameters:** @@ -1288,9 +1398,9 @@ ___ ### pipeRegularSourceToDestination -▸ **pipeRegularSourceToDestination**(`source`: [SourceDestination](classes/sourcedestination.md), `sourceMetadata`: [Metadata](interfaces/metadata.md), `destination`: [MultiDestination](classes/multidestination.md), `verify`: boolean, `updateState`: function, `onFail`: function, `onProgress`: function, `_onRootStreamProgress`: function): *Promise‹void›* +▸ **pipeRegularSourceToDestination**(`source`: [SourceDestination](classes/sourcedestination.md), `sourceMetadata`: [Metadata](interfaces/metadata.md), `destination`: [MultiDestination](classes/multidestination.md), `verify`: boolean, `numBuffers`: number, `updateState`: function, `onFail`: function, `onProgress`: function, `_onRootStreamProgress`: function): *Promise‹void›* -*Defined in [lib/multi-write.ts:218](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/multi-write.ts#L218)* +*Defined in [lib/multi-write.ts:224](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/multi-write.ts#L224)* **Parameters:** @@ -1302,6 +1412,8 @@ ___ ▪ **verify**: *boolean* +▪ **numBuffers**: *number* + ▪ **updateState**: *function* ▸ (`state?`: [WriteStep](README.md#writestep)): *void* @@ -1348,9 +1460,9 @@ ___ ### pipeSourceToDestinations -▸ **pipeSourceToDestinations**(`source`: [SourceDestination](classes/sourcedestination.md), `destinations`: [SourceDestination](classes/sourcedestination.md)[], `onFail`: [OnFailFunction](README.md#onfailfunction), `onProgress`: [OnProgressFunction](README.md#onprogressfunction), `verify`: boolean): *Promise‹[PipeSourceToDestinationsResult](interfaces/pipesourcetodestinationsresult.md)›* +▸ **pipeSourceToDestinations**(`source`: [SourceDestination](classes/sourcedestination.md), `destinations`: [SourceDestination](classes/sourcedestination.md)[], `onFail`: [OnFailFunction](README.md#onfailfunction), `onProgress`: [OnProgressFunction](README.md#onprogressfunction), `verify`: boolean, `numBuffers`: number): *Promise‹[PipeSourceToDestinationsResult](interfaces/pipesourcetodestinationsresult.md)›* -*Defined in [lib/multi-write.ts:82](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/multi-write.ts#L82)* +*Defined in [lib/multi-write.ts:82](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/multi-write.ts#L82)* **Parameters:** @@ -1361,6 +1473,7 @@ Name | Type | Default | `onFail` | [OnFailFunction](README.md#onfailfunction) | - | `onProgress` | [OnProgressFunction](README.md#onprogressfunction) | - | `verify` | boolean | false | +`numBuffers` | number | 16 | **Returns:** *Promise‹[PipeSourceToDestinationsResult](interfaces/pipesourcetodestinationsresult.md)›* @@ -1368,18 +1481,20 @@ ___ ### pipeSparseSourceToDestination -▸ **pipeSparseSourceToDestination**(`source`: [SourceDestination](classes/sourcedestination.md), `destination`: [SourceDestination](classes/sourcedestination.md), `verify`: boolean, `updateState`: function, `onFail`: function, `onProgress`: function, `_onRootStreamProgress`: function): *Promise‹void›* +▸ **pipeSparseSourceToDestination**(`source`: [SourceDestination](classes/sourcedestination.md), `destination`: [MultiDestination](classes/multidestination.md), `verify`: boolean, `numBuffers`: number, `updateState`: function, `onFail`: function, `onProgress`: function, `_onRootStreamProgress`: function): *Promise‹void›* -*Defined in [lib/multi-write.ts:306](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/multi-write.ts#L306)* +*Defined in [lib/multi-write.ts:328](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/multi-write.ts#L328)* **Parameters:** ▪ **source**: *[SourceDestination](classes/sourcedestination.md)* -▪ **destination**: *[SourceDestination](classes/sourcedestination.md)* +▪ **destination**: *[MultiDestination](classes/multidestination.md)* ▪ **verify**: *boolean* +▪ **numBuffers**: *number* + ▪ **updateState**: *function* ▸ (`state?`: [WriteStep](README.md#writestep)): *void* @@ -1428,57 +1543,17 @@ ___ ▸ **randomFilePath**(): *string* -*Defined in [lib/tmp.ts:28](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/tmp.ts#L28)* +*Defined in [lib/tmp.ts:28](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/tmp.ts#L28)* **Returns:** *string* ___ -### read - -▸ **read**(`fd`: number, `buf`: Buffer, `offset`: number, `length`: number, `position`: number): *Promise‹ReadResult›* - -*Defined in [lib/fs.ts:76](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/fs.ts#L76)* - -**Parameters:** - -Name | Type | ------- | ------ | -`fd` | number | -`buf` | Buffer | -`offset` | number | -`length` | number | -`position` | number | - -**Returns:** *Promise‹ReadResult›* - -___ - -### readFile - -▸ **readFile**(`path`: string, `options`: object | undefined): *Promise‹string | Buffer›* - -*Defined in [lib/fs.ts:103](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/fs.ts#L103)* - -**Parameters:** - -Name | Type | Default | ------- | ------ | ------ | -`path` | string | - | -`options` | object | undefined | { - encoding: null, - flag: 'r', - } | - -**Returns:** *Promise‹string | Buffer›* - -___ - ### `Const` runDiskpart ▸ **runDiskpart**(`commands`: string[]): *Promise‹void›* -*Defined in [lib/diskpart.ts:63](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/diskpart.ts#L63)* +*Defined in [lib/diskpart.ts:63](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/diskpart.ts#L63)* **`summary`** Run a diskpart script @@ -1496,7 +1571,7 @@ ___ ▸ **runVerifier**(`verifier`: [Verifier](classes/verifier.md), `onFail`: function, `onProgress`: function): *Promise‹void›* -*Defined in [lib/multi-write.ts:338](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/multi-write.ts#L338)* +*Defined in [lib/multi-write.ts:366](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/multi-write.ts#L366)* **Parameters:** @@ -1528,9 +1603,9 @@ ___ ### sparseStreamToBuffer -▸ **sparseStreamToBuffer**(`stream`: ReadableStream): *Promise‹Buffer›* +▸ **sparseStreamToBuffer**(`stream`: ReadableStream): *Promise‹[Buffer](interfaces/alignedlockablebuffer.md#buffer)›* -*Defined in [lib/utils.ts:36](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/utils.ts#L36)* +*Defined in [lib/utils.ts:48](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/utils.ts#L48)* **Parameters:** @@ -1538,31 +1613,15 @@ Name | Type | ------ | ------ | `stream` | ReadableStream | -**Returns:** *Promise‹Buffer›* - -___ - -### stat - -▸ **stat**(`path`: string | Buffer): *Promise‹Stats›* - -*Defined in [lib/fs.ts:126](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/fs.ts#L126)* - -**Parameters:** - -Name | Type | ------- | ------ | -`path` | string | Buffer | - -**Returns:** *Promise‹Stats›* +**Returns:** *Promise‹[Buffer](interfaces/alignedlockablebuffer.md#buffer)›* ___ ### streamToBuffer -▸ **streamToBuffer**(`stream`: ReadableStream): *Promise‹Buffer›* +▸ **streamToBuffer**(`stream`: ReadableStream): *Promise‹[Buffer](interfaces/alignedlockablebuffer.md#buffer)›* -*Defined in [lib/utils.ts:19](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/utils.ts#L19)* +*Defined in [lib/utils.ts:20](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/utils.ts#L20)* **Parameters:** @@ -1570,7 +1629,7 @@ Name | Type | ------ | ------ | `stream` | ReadableStream | -**Returns:** *Promise‹Buffer›* +**Returns:** *Promise‹[Buffer](interfaces/alignedlockablebuffer.md#buffer)›* ___ @@ -1578,7 +1637,7 @@ ___ ▸ **tmpFile**(`keepOpen`: boolean): *Promise‹[TmpFileResult](interfaces/tmpfileresult.md)›* -*Defined in [lib/tmp.ts:37](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/tmp.ts#L37)* +*Defined in [lib/tmp.ts:37](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/tmp.ts#L37)* **Parameters:** @@ -1594,7 +1653,7 @@ ___ ▸ **tmpFileDisposer**(`keepOpen`: boolean): *Disposer‹[TmpFileResult](interfaces/tmpfileresult.md)›* -*Defined in [lib/tmp.ts:65](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/tmp.ts#L65)* +*Defined in [lib/tmp.ts:65](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/tmp.ts#L65)* **Parameters:** @@ -1606,27 +1665,11 @@ Name | Type | Default | ___ -### unlink - -▸ **unlink**(`path`: string | Buffer): *Promise‹void›* - -*Defined in [lib/fs.ts:156](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/fs.ts#L156)* - -**Parameters:** - -Name | Type | ------- | ------ | -`path` | string | Buffer | - -**Returns:** *Promise‹void›* - -___ - ### verifyOrGenerateChecksum ▸ **verifyOrGenerateChecksum**(`hasher`: [AnyHasher](README.md#anyhasher) | undefined, `blocks`: [BlocksWithChecksum](interfaces/blockswithchecksum.md), `verify`: boolean, `generateChecksums`: boolean): *void* -*Defined in [lib/sparse-stream/shared.ts:114](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/sparse-stream/shared.ts#L114)* +*Defined in [lib/sparse-stream/shared.ts:123](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/sparse-stream/shared.ts#L123)* **Parameters:** @@ -1639,66 +1682,22 @@ Name | Type | **Returns:** *void* -___ - -### write - -▸ **write**(`fd`: number, `buf`: Buffer, `offset`: number, `length`: number, `position`: number): *Promise‹WriteResult›* - -*Defined in [lib/fs.ts:168](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/fs.ts#L168)* - -**Parameters:** - -Name | Type | ------- | ------ | -`fd` | number | -`buf` | Buffer | -`offset` | number | -`length` | number | -`position` | number | - -**Returns:** *Promise‹WriteResult›* - -___ - -### writeFile - -▸ **writeFile**(`path`: string, `data`: string | Buffer, `options`: object): *Promise‹void›* - -*Defined in [lib/fs.ts:140](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/fs.ts#L140)* - -**Parameters:** - -▪ **path**: *string* - -▪ **data**: *string | Buffer* - -▪`Default value` **options**: *object*= { encoding: 'utf8', mode: 0o666, flag: 'w' } - -Name | Type | Default | ------- | ------ | ------ | -`encoding` | string | "utf8" | -`flag` | string | "w" | -`mode` | number | 438 | - -**Returns:** *Promise‹void›* - ## Object literals ### `Const` ACTIONS ### ▪ **ACTIONS**: *object* -*Defined in [lib/source-destination/configured-source/configure.ts:38](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/configured-source/configure.ts#L38)* +*Defined in [lib/source-destination/configured-source/configure.ts:38](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/configured-source/configure.ts#L38)* ### configure • **configure**: *execute* = configureAction -*Defined in [lib/source-destination/configured-source/configure.ts:39](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/configured-source/configure.ts#L39)* +*Defined in [lib/source-destination/configured-source/configure.ts:39](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/configured-source/configure.ts#L39)* ### copy • **copy**: *execute* = copyAction -*Defined in [lib/source-destination/configured-source/configure.ts:40](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/configured-source/configure.ts#L40)* +*Defined in [lib/source-destination/configured-source/configure.ts:40](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/configured-source/configure.ts#L40)* diff --git a/doc/classes/adapter.md b/doc/classes/adapter.md index 4aaefc5c..25a5b6de 100644 --- a/doc/classes/adapter.md +++ b/doc/classes/adapter.md @@ -47,26 +47,33 @@ *Inherited from [CountingWritable](countingwritable.md).[defaultMaxListeners](countingwritable.md#static-defaultmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:681 +Defined in node_modules/@types/node/base.d.ts:896 ## Methods ### addListener -▸ **addListener**(`event`: string | symbol, `listener`: Function): *this* +▸ **addListener**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[addListener](sourcesource.md#addlistener)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[addListener](../interfaces/sparsereadable.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:683 +Defined in node_modules/@types/node/base.d.ts:898 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -80,7 +87,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[emit](../interfaces/sparsereadable.md#emit)* -Defined in node_modules/@types/node/base.d.ts:693 +Defined in node_modules/@types/node/base.d.ts:908 **Parameters:** @@ -95,15 +102,15 @@ ___ ### eventNames -▸ **eventNames**(): *string | symbol[]* +▸ **eventNames**(): *Array‹string | symbol›* *Inherited from [CountingWritable](countingwritable.md).[eventNames](countingwritable.md#eventnames)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[eventNames](../interfaces/sparsereadable.md#eventnames)* -Defined in node_modules/@types/node/base.d.ts:694 +Defined in node_modules/@types/node/base.d.ts:909 -**Returns:** *string | symbol[]* +**Returns:** *Array‹string | symbol›* ___ @@ -115,7 +122,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[getMaxListeners](../interfaces/sparsereadable.md#getmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:691 +Defined in node_modules/@types/node/base.d.ts:906 **Returns:** *number* @@ -129,7 +136,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[listenerCount](../interfaces/sparsereadable.md#listenercount)* -Defined in node_modules/@types/node/base.d.ts:695 +Defined in node_modules/@types/node/base.d.ts:910 **Parameters:** @@ -149,7 +156,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[listeners](../interfaces/sparsereadable.md#listeners)* -Defined in node_modules/@types/node/base.d.ts:692 +Defined in node_modules/@types/node/base.d.ts:907 **Parameters:** @@ -163,20 +170,27 @@ ___ ### on -▸ **on**(`event`: string | symbol, `listener`: Function): *this* +▸ **on**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[on](sourcesource.md#on)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[on](../interfaces/sparsereadable.md#on)* -Defined in node_modules/@types/node/base.d.ts:684 +Defined in node_modules/@types/node/base.d.ts:899 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -184,20 +198,27 @@ ___ ### once -▸ **once**(`event`: string | symbol, `listener`: Function): *this* +▸ **once**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[once](sourcesource.md#once)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[once](../interfaces/sparsereadable.md#once)* -Defined in node_modules/@types/node/base.d.ts:685 +Defined in node_modules/@types/node/base.d.ts:900 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -205,20 +226,27 @@ ___ ### prependListener -▸ **prependListener**(`event`: string | symbol, `listener`: Function): *this* +▸ **prependListener**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[prependListener](sourcesource.md#prependlistener)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[prependListener](../interfaces/sparsereadable.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:686 +Defined in node_modules/@types/node/base.d.ts:901 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -226,20 +254,27 @@ ___ ### prependOnceListener -▸ **prependOnceListener**(`event`: string | symbol, `listener`: Function): *this* +▸ **prependOnceListener**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[prependOnceListener](sourcesource.md#prependoncelistener)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[prependOnceListener](../interfaces/sparsereadable.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:687 +Defined in node_modules/@types/node/base.d.ts:902 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -253,7 +288,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[removeAllListeners](../interfaces/sparsereadable.md#removealllisteners)* -Defined in node_modules/@types/node/base.d.ts:689 +Defined in node_modules/@types/node/base.d.ts:904 **Parameters:** @@ -267,20 +302,27 @@ ___ ### removeListener -▸ **removeListener**(`event`: string | symbol, `listener`: Function): *this* +▸ **removeListener**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[removeListener](sourcesource.md#removelistener)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[removeListener](../interfaces/sparsereadable.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:688 +Defined in node_modules/@types/node/base.d.ts:903 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -294,7 +336,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[setMaxListeners](../interfaces/sparsereadable.md#setmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:690 +Defined in node_modules/@types/node/base.d.ts:905 **Parameters:** @@ -310,7 +352,7 @@ ___ ▸ **start**(): *void* -*Defined in [lib/scanner/adapters/adapter.ts:34](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/scanner/adapters/adapter.ts#L34)* +*Defined in [lib/scanner/adapters/adapter.ts:34](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/scanner/adapters/adapter.ts#L34)* **Returns:** *void* @@ -320,7 +362,7 @@ ___ ▸ **stop**(): *void* -*Defined in [lib/scanner/adapters/adapter.ts:35](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/scanner/adapters/adapter.ts#L35)* +*Defined in [lib/scanner/adapters/adapter.ts:35](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/scanner/adapters/adapter.ts#L35)* **Returns:** *void* @@ -332,7 +374,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[listenerCount](countingwritable.md#static-listenercount)* -Defined in node_modules/@types/node/base.d.ts:680 +Defined in node_modules/@types/node/base.d.ts:895 **Parameters:** diff --git a/doc/classes/alignedreadablestate.md b/doc/classes/alignedreadablestate.md new file mode 100644 index 00000000..afc94179 --- /dev/null +++ b/doc/classes/alignedreadablestate.md @@ -0,0 +1,93 @@ +[etcher-sdk](../README.md) › [AlignedReadableState](alignedreadablestate.md) + +# Class: AlignedReadableState + +## Hierarchy + +* **AlignedReadableState** + +## Index + +### Constructors + +* [constructor](alignedreadablestate.md#constructor) + +### Properties + +* [alignment](alignedreadablestate.md#private-alignment) +* [bufferSize](alignedreadablestate.md#private-buffersize) +* [buffers](alignedreadablestate.md#private-buffers) +* [currentBufferIndex](alignedreadablestate.md#private-currentbufferindex) +* [numBuffers](alignedreadablestate.md#private-numbuffers) + +### Methods + +* [getCurrentBuffer](alignedreadablestate.md#getcurrentbuffer) + +## Constructors + +### constructor + +\+ **new AlignedReadableState**(`bufferSize`: number, `alignment`: number, `numBuffers`: number): *[AlignedReadableState](alignedreadablestate.md)* + +*Defined in [lib/aligned-lockable-buffer.ts:47](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/aligned-lockable-buffer.ts#L47)* + +**Parameters:** + +Name | Type | +------ | ------ | +`bufferSize` | number | +`alignment` | number | +`numBuffers` | number | + +**Returns:** *[AlignedReadableState](alignedreadablestate.md)* + +## Properties + +### `Private` alignment + +• **alignment**: *number* + +*Defined in [lib/aligned-lockable-buffer.ts:51](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/aligned-lockable-buffer.ts#L51)* + +___ + +### `Private` bufferSize + +• **bufferSize**: *number* + +*Defined in [lib/aligned-lockable-buffer.ts:50](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/aligned-lockable-buffer.ts#L50)* + +___ + +### `Private` buffers + +• **buffers**: *[AlignedLockableBuffer](../interfaces/alignedlockablebuffer.md)[]* + +*Defined in [lib/aligned-lockable-buffer.ts:46](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/aligned-lockable-buffer.ts#L46)* + +___ + +### `Private` currentBufferIndex + +• **currentBufferIndex**: *number* = 0 + +*Defined in [lib/aligned-lockable-buffer.ts:47](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/aligned-lockable-buffer.ts#L47)* + +___ + +### `Private` numBuffers + +• **numBuffers**: *number* + +*Defined in [lib/aligned-lockable-buffer.ts:52](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/aligned-lockable-buffer.ts#L52)* + +## Methods + +### getCurrentBuffer + +▸ **getCurrentBuffer**(): *[AlignedLockableBuffer](../interfaces/alignedlockablebuffer.md)* + +*Defined in [lib/aligned-lockable-buffer.ts:57](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/aligned-lockable-buffer.ts#L57)* + +**Returns:** *[AlignedLockableBuffer](../interfaces/alignedlockablebuffer.md)* diff --git a/doc/classes/balenas3source.md b/doc/classes/balenas3source.md index 3986a29f..f403c2f9 100644 --- a/doc/classes/balenas3source.md +++ b/doc/classes/balenas3source.md @@ -49,6 +49,7 @@ * [createWriteStream](balenas3source.md#createwritestream) * [emit](balenas3source.md#emit) * [eventNames](balenas3source.md#eventnames) +* [getAlignment](balenas3source.md#getalignment) * [getBlocks](balenas3source.md#getblocks) * [getInnerSource](balenas3source.md#getinnersource) * [getMaxListeners](balenas3source.md#getmaxlisteners) @@ -78,7 +79,7 @@ \+ **new BalenaS3Source**(`bucket`: string, `deviceType`: string, `version`: string, `host`: string): *[BalenaS3Source](balenas3source.md)* -*Defined in [lib/source-destination/balena-s3-source.ts:32](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/balena-s3-source.ts#L32)* +*Defined in [lib/source-destination/balena-s3-source.ts:35](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/balena-s3-source.ts#L35)* **Parameters:** @@ -97,7 +98,7 @@ Name | Type | Default | • **bucket**: *string* -*Defined in [lib/source-destination/balena-s3-source.ts:35](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/balena-s3-source.ts#L35)* +*Defined in [lib/source-destination/balena-s3-source.ts:38](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/balena-s3-source.ts#L38)* ___ @@ -105,7 +106,7 @@ ___ • **deviceType**: *string* -*Defined in [lib/source-destination/balena-s3-source.ts:36](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/balena-s3-source.ts#L36)* +*Defined in [lib/source-destination/balena-s3-source.ts:39](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/balena-s3-source.ts#L39)* ___ @@ -113,7 +114,7 @@ ___ • **host**: *string* -*Defined in [lib/source-destination/balena-s3-source.ts:38](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/balena-s3-source.ts#L38)* +*Defined in [lib/source-destination/balena-s3-source.ts:41](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/balena-s3-source.ts#L41)* ___ @@ -121,7 +122,7 @@ ___ • **name**: *[Name](../README.md#name)* -*Defined in [lib/source-destination/balena-s3-source.ts:32](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/balena-s3-source.ts#L32)* +*Defined in [lib/source-destination/balena-s3-source.ts:35](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/balena-s3-source.ts#L35)* ___ @@ -129,7 +130,7 @@ ___ • **names**: *[Name](../README.md#name)[]* = ['balena', 'resin'] -*Defined in [lib/source-destination/balena-s3-source.ts:31](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/balena-s3-source.ts#L31)* +*Defined in [lib/source-destination/balena-s3-source.ts:34](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/balena-s3-source.ts#L34)* ___ @@ -137,7 +138,7 @@ ___ • **rawSource**: *[Http](http.md)* -*Defined in [lib/source-destination/balena-s3-source.ts:28](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/balena-s3-source.ts#L28)* +*Defined in [lib/source-destination/balena-s3-source.ts:31](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/balena-s3-source.ts#L31)* ___ @@ -145,7 +146,7 @@ ___ • **ready**: *Promise‹void›* -*Defined in [lib/source-destination/balena-s3-source.ts:30](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/balena-s3-source.ts#L30)* +*Defined in [lib/source-destination/balena-s3-source.ts:33](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/balena-s3-source.ts#L33)* ___ @@ -153,7 +154,7 @@ ___ • **version**: *string* -*Defined in [lib/source-destination/balena-s3-source.ts:37](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/balena-s3-source.ts#L37)* +*Defined in [lib/source-destination/balena-s3-source.ts:40](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/balena-s3-source.ts#L40)* ___ @@ -161,7 +162,7 @@ ___ • **zipSource**: *[ZipSource](zipsource.md)* -*Defined in [lib/source-destination/balena-s3-source.ts:29](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/balena-s3-source.ts#L29)* +*Defined in [lib/source-destination/balena-s3-source.ts:32](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/balena-s3-source.ts#L32)* ___ @@ -171,7 +172,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[defaultMaxListeners](countingwritable.md#static-defaultmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:681 +Defined in node_modules/@types/node/base.d.ts:896 ___ @@ -192,7 +193,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[imageExtensions](sourcesource.md#static-imageextensions)* -*Defined in [lib/source-destination/source-destination.ts:232](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L232)* +*Defined in [lib/source-destination/source-destination.ts:252](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L252)* ___ @@ -202,7 +203,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[mimetype](sourcesource.md#static-optional-mimetype)* -*Defined in [lib/source-destination/source-destination.ts:244](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L244)* +*Defined in [lib/source-destination/source-destination.ts:264](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L264)* ## Methods @@ -212,7 +213,7 @@ ___ *Overrides [SourceDestination](sourcedestination.md).[_close](sourcedestination.md#protected-_close)* -*Defined in [lib/source-destination/balena-s3-source.ts:117](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/balena-s3-source.ts#L117)* +*Defined in [lib/source-destination/balena-s3-source.ts:120](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/balena-s3-source.ts#L120)* **Returns:** *Promise‹void›* @@ -224,7 +225,7 @@ ___ *Overrides [SourceSource](sourcesource.md).[_getMetadata](sourcesource.md#protected-_getmetadata)* -*Defined in [lib/source-destination/balena-s3-source.ts:107](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/balena-s3-source.ts#L107)* +*Defined in [lib/source-destination/balena-s3-source.ts:110](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/balena-s3-source.ts#L110)* **Returns:** *Promise‹[Metadata](../interfaces/metadata.md)›* @@ -236,7 +237,7 @@ ___ *Overrides [SourceDestination](sourcedestination.md).[_open](sourcedestination.md#protected-_open)* -*Defined in [lib/source-destination/balena-s3-source.ts:112](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/balena-s3-source.ts#L112)* +*Defined in [lib/source-destination/balena-s3-source.ts:115](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/balena-s3-source.ts#L115)* **Returns:** *Promise‹void›* @@ -244,20 +245,27 @@ ___ ### addListener -▸ **addListener**(`event`: string | symbol, `listener`: Function): *this* +▸ **addListener**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[addListener](sourcesource.md#addlistener)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[addListener](../interfaces/sparsereadable.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:683 +Defined in node_modules/@types/node/base.d.ts:898 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -269,7 +277,7 @@ ___ *Overrides [SourceSource](sourcesource.md).[canCreateReadStream](sourcesource.md#cancreatereadstream)* -*Defined in [lib/source-destination/balena-s3-source.ts:71](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/balena-s3-source.ts#L71)* +*Defined in [lib/source-destination/balena-s3-source.ts:74](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/balena-s3-source.ts#L74)* **Returns:** *Promise‹boolean›* @@ -281,7 +289,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[canCreateSparseReadStream](sourcesource.md#cancreatesparsereadstream)* -*Defined in [lib/source-destination/source-destination.ts:268](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L268)* +*Defined in [lib/source-destination/source-destination.ts:292](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L292)* **Returns:** *Promise‹boolean›* @@ -293,7 +301,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[canCreateSparseWriteStream](sourcesource.md#cancreatesparsewritestream)* -*Defined in [lib/source-destination/source-destination.ts:276](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L276)* +*Defined in [lib/source-destination/source-destination.ts:300](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L300)* **Returns:** *Promise‹boolean›* @@ -305,7 +313,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[canCreateWriteStream](sourcesource.md#cancreatewritestream)* -*Defined in [lib/source-destination/source-destination.ts:272](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L272)* +*Defined in [lib/source-destination/source-destination.ts:296](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L296)* **Returns:** *Promise‹boolean›* @@ -317,7 +325,7 @@ ___ *Overrides [SourceSource](sourcesource.md).[canRead](sourcesource.md#canread)* -*Defined in [lib/source-destination/balena-s3-source.ts:75](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/balena-s3-source.ts#L75)* +*Defined in [lib/source-destination/balena-s3-source.ts:78](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/balena-s3-source.ts#L78)* **Returns:** *Promise‹boolean›* @@ -329,7 +337,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[canWrite](sourcesource.md#canwrite)* -*Defined in [lib/source-destination/source-destination.ts:260](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L260)* +*Defined in [lib/source-destination/source-destination.ts:284](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L284)* **Returns:** *Promise‹boolean›* @@ -341,7 +349,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[close](sourcesource.md#close)* -*Defined in [lib/source-destination/source-destination.ts:342](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L342)* +*Defined in [lib/source-destination/source-destination.ts:368](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L368)* **Returns:** *Promise‹void›* @@ -349,17 +357,17 @@ ___ ### createReadStream -▸ **createReadStream**(...`args`: any[]): *Promise‹ReadableStream›* +▸ **createReadStream**(`options`: [CreateReadStreamOptions](../interfaces/createreadstreamoptions.md)): *Promise‹ReadableStream›* *Overrides [SourceSource](sourcesource.md).[createReadStream](sourcesource.md#createreadstream)* -*Defined in [lib/source-destination/balena-s3-source.ts:100](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/balena-s3-source.ts#L100)* +*Defined in [lib/source-destination/balena-s3-source.ts:103](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/balena-s3-source.ts#L103)* **Parameters:** -Name | Type | ------- | ------ | -`...args` | any[] | +Name | Type | Default | +------ | ------ | ------ | +`options` | [CreateReadStreamOptions](../interfaces/createreadstreamoptions.md) | {} | **Returns:** *Promise‹ReadableStream›* @@ -367,17 +375,17 @@ ___ ### createSparseReadStream -▸ **createSparseReadStream**(`_generateChecksums`: boolean): *Promise‹[SparseReadable](../interfaces/sparsereadable.md)›* +▸ **createSparseReadStream**(`_options`: [CreateSparseReadStreamOptions](../interfaces/createsparsereadstreamoptions.md)): *Promise‹[SparseReadable](../interfaces/sparsereadable.md)›* *Inherited from [SourceSource](sourcesource.md).[createSparseReadStream](sourcesource.md#createsparsereadstream)* -*Defined in [lib/source-destination/source-destination.ts:317](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L317)* +*Defined in [lib/source-destination/source-destination.ts:339](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L339)* **Parameters:** Name | Type | Default | ------ | ------ | ------ | -`_generateChecksums` | boolean | false | +`_options` | [CreateSparseReadStreamOptions](../interfaces/createsparsereadstreamoptions.md) | {} | **Returns:** *Promise‹[SparseReadable](../interfaces/sparsereadable.md)›* @@ -385,11 +393,19 @@ ___ ### createSparseWriteStream -▸ **createSparseWriteStream**(): *Promise‹[SparseWritable](../interfaces/sparsewritable.md)›* +▸ **createSparseWriteStream**(`_options`: object): *Promise‹[SparseWritable](../interfaces/sparsewritable.md)›* *Inherited from [SourceSource](sourcesource.md).[createSparseWriteStream](sourcesource.md#createsparsewritestream)* -*Defined in [lib/source-destination/source-destination.ts:331](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L331)* +*Defined in [lib/source-destination/source-destination.ts:355](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L355)* + +**Parameters:** + +▪`Default value` **_options**: *object*= {} + +Name | Type | +------ | ------ | +`highWaterMark?` | undefined | number | **Returns:** *Promise‹[SparseWritable](../interfaces/sparsewritable.md)›* @@ -401,7 +417,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[createVerifier](sourcesource.md#createverifier)* -*Defined in [lib/source-destination/source-destination.ts:357](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L357)* +*Defined in [lib/source-destination/source-destination.ts:383](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L383)* **Parameters:** @@ -416,11 +432,19 @@ ___ ### createWriteStream -▸ **createWriteStream**(): *Promise‹WritableStream›* +▸ **createWriteStream**(`_options`: object): *Promise‹WritableStream›* *Inherited from [SourceSource](sourcesource.md).[createWriteStream](sourcesource.md#createwritestream)* -*Defined in [lib/source-destination/source-destination.ts:327](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L327)* +*Defined in [lib/source-destination/source-destination.ts:349](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L349)* + +**Parameters:** + +▪`Default value` **_options**: *object*= {} + +Name | Type | +------ | ------ | +`highWaterMark?` | undefined | number | **Returns:** *Promise‹WritableStream›* @@ -434,7 +458,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[emit](../interfaces/sparsereadable.md#emit)* -Defined in node_modules/@types/node/base.d.ts:693 +Defined in node_modules/@types/node/base.d.ts:908 **Parameters:** @@ -449,15 +473,27 @@ ___ ### eventNames -▸ **eventNames**(): *string | symbol[]* +▸ **eventNames**(): *Array‹string | symbol›* *Inherited from [CountingWritable](countingwritable.md).[eventNames](countingwritable.md#eventnames)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[eventNames](../interfaces/sparsereadable.md#eventnames)* -Defined in node_modules/@types/node/base.d.ts:694 +Defined in node_modules/@types/node/base.d.ts:909 + +**Returns:** *Array‹string | symbol›* -**Returns:** *string | symbol[]* +___ + +### getAlignment + +▸ **getAlignment**(): *number | undefined* + +*Inherited from [SourceSource](sourcesource.md).[getAlignment](sourcesource.md#getalignment)* + +*Defined in [lib/source-destination/source-destination.ts:276](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L276)* + +**Returns:** *number | undefined* ___ @@ -467,7 +503,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[getBlocks](sourcesource.md#getblocks)* -*Defined in [lib/source-destination/source-destination.ts:323](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L323)* +*Defined in [lib/source-destination/source-destination.ts:345](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L345)* **Returns:** *Promise‹[BlocksWithChecksum](../interfaces/blockswithchecksum.md)[]›* @@ -479,7 +515,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[getInnerSource](sourcesource.md#getinnersource)* -*Defined in [lib/source-destination/source-destination.ts:424](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L424)* +*Defined in [lib/source-destination/source-destination.ts:452](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L452)* **Returns:** *Promise‹[SourceDestination](sourcedestination.md)›* @@ -493,7 +529,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[getMaxListeners](../interfaces/sparsereadable.md#getmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:691 +Defined in node_modules/@types/node/base.d.ts:906 **Returns:** *number* @@ -505,7 +541,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[getMetadata](sourcesource.md#getmetadata)* -*Defined in [lib/source-destination/source-destination.ts:280](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L280)* +*Defined in [lib/source-destination/source-destination.ts:304](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L304)* **Returns:** *Promise‹[Metadata](../interfaces/metadata.md)›* @@ -515,7 +551,7 @@ ___ ▸ **getName**(): *Promise‹[Name](../README.md#name)›* -*Defined in [lib/source-destination/balena-s3-source.ts:57](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/balena-s3-source.ts#L57)* +*Defined in [lib/source-destination/balena-s3-source.ts:60](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/balena-s3-source.ts#L60)* **Returns:** *Promise‹[Name](../README.md#name)›* @@ -527,7 +563,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[getPartitionTable](sourcesource.md#getpartitiontable)* -*Defined in [lib/source-destination/source-destination.ts:445](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L445)* +*Defined in [lib/source-destination/source-destination.ts:473](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L473)* **Returns:** *Promise‹GetPartitionsResult | undefined›* @@ -537,7 +573,7 @@ ___ ▸ **getUrl**(`path`: string): *string* -*Defined in [lib/source-destination/balena-s3-source.ts:79](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/balena-s3-source.ts#L79)* +*Defined in [lib/source-destination/balena-s3-source.ts:82](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/balena-s3-source.ts#L82)* **Parameters:** @@ -557,7 +593,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[listenerCount](../interfaces/sparsereadable.md#listenercount)* -Defined in node_modules/@types/node/base.d.ts:695 +Defined in node_modules/@types/node/base.d.ts:910 **Parameters:** @@ -577,7 +613,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[listeners](../interfaces/sparsereadable.md#listeners)* -Defined in node_modules/@types/node/base.d.ts:692 +Defined in node_modules/@types/node/base.d.ts:907 **Parameters:** @@ -591,20 +627,27 @@ ___ ### on -▸ **on**(`event`: string | symbol, `listener`: Function): *this* +▸ **on**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[on](sourcesource.md#on)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[on](../interfaces/sparsereadable.md#on)* -Defined in node_modules/@types/node/base.d.ts:684 +Defined in node_modules/@types/node/base.d.ts:899 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -612,20 +655,27 @@ ___ ### once -▸ **once**(`event`: string | symbol, `listener`: Function): *this* +▸ **once**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[once](sourcesource.md#once)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[once](../interfaces/sparsereadable.md#once)* -Defined in node_modules/@types/node/base.d.ts:685 +Defined in node_modules/@types/node/base.d.ts:900 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -637,7 +687,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[open](sourcesource.md#open)* -*Defined in [lib/source-destination/source-destination.ts:335](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L335)* +*Defined in [lib/source-destination/source-destination.ts:361](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L361)* **Returns:** *Promise‹void›* @@ -647,7 +697,7 @@ ___ ▸ **prepare**(): *Promise‹void›* -*Defined in [lib/source-destination/balena-s3-source.ts:48](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/balena-s3-source.ts#L48)* +*Defined in [lib/source-destination/balena-s3-source.ts:51](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/balena-s3-source.ts#L51)* **Returns:** *Promise‹void›* @@ -655,20 +705,27 @@ ___ ### prependListener -▸ **prependListener**(`event`: string | symbol, `listener`: Function): *this* +▸ **prependListener**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[prependListener](sourcesource.md#prependlistener)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[prependListener](../interfaces/sparsereadable.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:686 +Defined in node_modules/@types/node/base.d.ts:901 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -676,20 +733,27 @@ ___ ### prependOnceListener -▸ **prependOnceListener**(`event`: string | symbol, `listener`: Function): *this* +▸ **prependOnceListener**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[prependOnceListener](sourcesource.md#prependoncelistener)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[prependOnceListener](../interfaces/sparsereadable.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:687 +Defined in node_modules/@types/node/base.d.ts:902 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -697,17 +761,17 @@ ___ ### read -▸ **read**(`buffer`: Buffer, `bufferOffset`: number, `length`: number, `sourceOffset`: number): *Promise‹ReadResult›* +▸ **read**(`buffer`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer), `bufferOffset`: number, `length`: number, `sourceOffset`: number): *Promise‹ReadResult›* *Overrides [SourceSource](sourcesource.md).[read](sourcesource.md#read)* -*Defined in [lib/source-destination/balena-s3-source.ts:85](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/balena-s3-source.ts#L85)* +*Defined in [lib/source-destination/balena-s3-source.ts:88](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/balena-s3-source.ts#L88)* **Parameters:** Name | Type | ------ | ------ | -`buffer` | Buffer | +`buffer` | [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | `bufferOffset` | number | `length` | number | `sourceOffset` | number | @@ -724,7 +788,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[removeAllListeners](../interfaces/sparsereadable.md#removealllisteners)* -Defined in node_modules/@types/node/base.d.ts:689 +Defined in node_modules/@types/node/base.d.ts:904 **Parameters:** @@ -738,20 +802,27 @@ ___ ### removeListener -▸ **removeListener**(`event`: string | symbol, `listener`: Function): *this* +▸ **removeListener**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[removeListener](sourcesource.md#removelistener)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[removeListener](../interfaces/sparsereadable.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:688 +Defined in node_modules/@types/node/base.d.ts:903 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -765,7 +836,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[setMaxListeners](../interfaces/sparsereadable.md#setmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:690 +Defined in node_modules/@types/node/base.d.ts:905 **Parameters:** @@ -779,17 +850,17 @@ ___ ### write -▸ **write**(`_buffer`: Buffer, `_bufferOffset`: number, `_length`: number, `_fileOffset`: number): *Promise‹WriteResult›* +▸ **write**(`_buffer`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer), `_bufferOffset`: number, `_length`: number, `_fileOffset`: number): *Promise‹WriteResult›* *Inherited from [SourceSource](sourcesource.md).[write](sourcesource.md#write)* -*Defined in [lib/source-destination/source-destination.ts:300](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L300)* +*Defined in [lib/source-destination/source-destination.ts:324](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L324)* **Parameters:** Name | Type | ------ | ------ | -`_buffer` | Buffer | +`_buffer` | [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | `_bufferOffset` | number | `_length` | number | `_fileOffset` | number | @@ -804,7 +875,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[listenerCount](countingwritable.md#static-listenercount)* -Defined in node_modules/@types/node/base.d.ts:680 +Defined in node_modules/@types/node/base.d.ts:895 **Parameters:** @@ -823,7 +894,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[register](sourcesource.md#static-register)* -*Defined in [lib/source-destination/source-destination.ts:250](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L250)* +*Defined in [lib/source-destination/source-destination.ts:270](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L270)* **Parameters:** diff --git a/doc/classes/blockdevice.md b/doc/classes/blockdevice.md index 04bb2d7d..dae93e31 100644 --- a/doc/classes/blockdevice.md +++ b/doc/classes/blockdevice.md @@ -20,12 +20,14 @@ ### Properties -* [blockSize](blockdevice.md#blocksize) +* [alignment](blockdevice.md#alignment) * [drive](blockdevice.md#private-drive) * [emitsProgress](blockdevice.md#emitsprogress) * [fd](blockdevice.md#protected-fd) +* [oDirect](blockdevice.md#odirect) +* [oWrite](blockdevice.md#owrite) +* [path](blockdevice.md#path) * [unmountOnSuccess](blockdevice.md#private-unmountonsuccess) -* [OpenFlags](blockdevice.md#static-openflags) * [defaultMaxListeners](blockdevice.md#static-defaultmaxlisteners) * [imageExtensions](blockdevice.md#static-imageextensions) * [mimetype](blockdevice.md#static-optional-mimetype) @@ -64,10 +66,12 @@ * [createWriteStream](blockdevice.md#createwritestream) * [emit](blockdevice.md#emit) * [eventNames](blockdevice.md#eventnames) +* [getAlignment](blockdevice.md#getalignment) * [getBlocks](blockdevice.md#getblocks) * [getInnerSource](blockdevice.md#getinnersource) * [getMaxListeners](blockdevice.md#getmaxlisteners) * [getMetadata](blockdevice.md#getmetadata) +* [getOpenFlags](blockdevice.md#protected-getopenflags) * [getPartitionTable](blockdevice.md#getpartitiontable) * [listenerCount](blockdevice.md#listenercount) * [listeners](blockdevice.md#listeners) @@ -89,11 +93,11 @@ ### constructor -\+ **new BlockDevice**(`drive`: [DrivelistDrive](../interfaces/drivelistdrive.md), `unmountOnSuccess`: boolean): *[BlockDevice](blockdevice.md)* +\+ **new BlockDevice**(`drive`: [DrivelistDrive](../interfaces/drivelistdrive.md), `unmountOnSuccess`: boolean, `oWrite`: boolean, `oDirect`: boolean): *[BlockDevice](blockdevice.md)* *Overrides [File](file.md).[constructor](file.md#constructor)* -*Defined in [lib/source-destination/block-device.ts:46](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/block-device.ts#L46)* +*Defined in [lib/source-destination/block-device.ts:47](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/block-device.ts#L47)* **Parameters:** @@ -101,18 +105,18 @@ Name | Type | Default | ------ | ------ | ------ | `drive` | [DrivelistDrive](../interfaces/drivelistdrive.md) | - | `unmountOnSuccess` | boolean | false | +`oWrite` | boolean | false | +`oDirect` | boolean | true | **Returns:** *[BlockDevice](blockdevice.md)* ## Properties -### blockSize +### alignment -• **blockSize**: *number* = 512 +• **alignment**: *number* -*Inherited from [File](file.md).[blockSize](file.md#blocksize)* - -*Defined in [lib/source-destination/file.ts:58](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/file.ts#L58)* +*Defined in [lib/source-destination/block-device.ts:47](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/block-device.ts#L47)* ___ @@ -120,7 +124,7 @@ ___ • **drive**: *[DrivelistDrive](../interfaces/drivelistdrive.md)* -*Defined in [lib/source-destination/block-device.ts:48](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/block-device.ts#L48)* +*Defined in [lib/source-destination/block-device.ts:50](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/block-device.ts#L50)* ___ @@ -130,7 +134,7 @@ ___ *Implementation of [AdapterSourceDestination](../interfaces/adaptersourcedestination.md).[emitsProgress](../interfaces/adaptersourcedestination.md#emitsprogress)* -*Defined in [lib/source-destination/block-device.ts:46](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/block-device.ts#L46)* +*Defined in [lib/source-destination/block-device.ts:46](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/block-device.ts#L46)* ___ @@ -140,25 +144,43 @@ ___ *Inherited from [File](file.md).[fd](file.md#protected-fd)* -*Defined in [lib/source-destination/file.ts:57](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/file.ts#L57)* +*Defined in [lib/source-destination/file.ts:51](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/file.ts#L51)* ___ -### `Private` unmountOnSuccess +### oDirect -• **unmountOnSuccess**: *boolean* +• **oDirect**: *boolean* + +*Defined in [lib/source-destination/block-device.ts:53](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/block-device.ts#L53)* + +___ + +### oWrite -*Defined in [lib/source-destination/block-device.ts:48](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/block-device.ts#L48)* +• **oWrite**: *boolean* + +*Inherited from [File](file.md).[oWrite](file.md#owrite)* + +*Defined in [lib/source-destination/file.ts:53](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/file.ts#L53)* ___ -### `Static` OpenFlags +### path -▪ **OpenFlags**: *[OpenFlags](../enums/openflags.md)* = OpenFlags +• **path**: *string* -*Inherited from [File](file.md).[OpenFlags](file.md#static-openflags)* +*Inherited from [File](file.md).[path](file.md#path)* -*Defined in [lib/source-destination/file.ts:56](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/file.ts#L56)* +*Defined in [lib/source-destination/file.ts:53](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/file.ts#L53)* + +___ + +### `Private` unmountOnSuccess + +• **unmountOnSuccess**: *boolean* + +*Defined in [lib/source-destination/block-device.ts:51](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/block-device.ts#L51)* ___ @@ -170,7 +192,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[defaultMaxListeners](countingwritable.md#static-defaultmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:681 +Defined in node_modules/@types/node/base.d.ts:896 ___ @@ -193,7 +215,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[imageExtensions](sourcesource.md#static-imageextensions)* -*Defined in [lib/source-destination/source-destination.ts:232](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L232)* +*Defined in [lib/source-destination/source-destination.ts:252](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L252)* ___ @@ -205,7 +227,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[mimetype](sourcesource.md#static-optional-mimetype)* -*Defined in [lib/source-destination/source-destination.ts:244](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L244)* +*Defined in [lib/source-destination/source-destination.ts:264](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L264)* ## Accessors @@ -213,7 +235,7 @@ ___ • **get description**(): *string* -*Defined in [lib/source-destination/block-device.ts:69](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/block-device.ts#L69)* +*Defined in [lib/source-destination/block-device.ts:95](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/block-device.ts#L95)* **Returns:** *string* @@ -223,7 +245,7 @@ ___ • **get device**(): *string* -*Defined in [lib/source-destination/block-device.ts:61](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/block-device.ts#L61)* +*Defined in [lib/source-destination/block-device.ts:87](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/block-device.ts#L87)* **Returns:** *string* @@ -233,7 +255,7 @@ ___ • **get devicePath**(): *string | null* -*Defined in [lib/source-destination/block-device.ts:65](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/block-device.ts#L65)* +*Defined in [lib/source-destination/block-device.ts:91](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/block-device.ts#L91)* **Returns:** *string | null* @@ -243,7 +265,7 @@ ___ • **get isSystem**(): *boolean* -*Defined in [lib/source-destination/block-device.ts:53](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/block-device.ts#L53)* +*Defined in [lib/source-destination/block-device.ts:79](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/block-device.ts#L79)* **Returns:** *boolean* @@ -253,7 +275,7 @@ ___ • **get mountpoints**(): *Array‹object›* -*Defined in [lib/source-destination/block-device.ts:73](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/block-device.ts#L73)* +*Defined in [lib/source-destination/block-device.ts:99](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/block-device.ts#L99)* **Returns:** *Array‹object›* @@ -263,7 +285,7 @@ ___ • **get raw**(): *string* -*Defined in [lib/source-destination/block-device.ts:57](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/block-device.ts#L57)* +*Defined in [lib/source-destination/block-device.ts:83](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/block-device.ts#L83)* **Returns:** *string* @@ -273,7 +295,7 @@ ___ • **get size**(): *number | null* -*Defined in [lib/source-destination/block-device.ts:77](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/block-device.ts#L77)* +*Defined in [lib/source-destination/block-device.ts:103](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/block-device.ts#L103)* **Returns:** *number | null* @@ -287,7 +309,7 @@ ___ *Overrides [File](file.md).[_close](file.md#protected-_close)* -*Defined in [lib/source-destination/block-device.ts:126](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/block-device.ts#L126)* +*Defined in [lib/source-destination/block-device.ts:158](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/block-device.ts#L158)* **Returns:** *Promise‹void›* @@ -301,7 +323,7 @@ ___ *Overrides [File](file.md).[_getMetadata](file.md#protected-_getmetadata)* -*Defined in [lib/source-destination/block-device.ts:81](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/block-device.ts#L81)* +*Defined in [lib/source-destination/block-device.ts:107](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/block-device.ts#L107)* **Returns:** *Promise‹[Metadata](../interfaces/metadata.md)›* @@ -315,7 +337,7 @@ ___ *Overrides [File](file.md).[_open](file.md#protected-_open)* -*Defined in [lib/source-destination/block-device.ts:117](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/block-device.ts#L117)* +*Defined in [lib/source-destination/block-device.ts:149](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/block-device.ts#L149)* **Returns:** *Promise‹void›* @@ -323,22 +345,27 @@ ___ ### addListener -▸ **addListener**(`event`: string | symbol, `listener`: Function): *this* - -*Implementation of [AdapterSourceDestination](../interfaces/adaptersourcedestination.md)* +▸ **addListener**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[addListener](sourcesource.md#addlistener)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[addListener](../interfaces/sparsereadable.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:683 +Defined in node_modules/@types/node/base.d.ts:898 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -348,7 +375,7 @@ ___ ▸ **alignOffsetAfter**(`offset`: number): *number* -*Defined in [lib/source-destination/block-device.ts:147](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/block-device.ts#L147)* +*Defined in [lib/source-destination/block-device.ts:179](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/block-device.ts#L179)* **Parameters:** @@ -364,7 +391,7 @@ ___ ▸ **alignOffsetBefore**(`offset`: number): *number* -*Defined in [lib/source-destination/block-device.ts:143](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/block-device.ts#L143)* +*Defined in [lib/source-destination/block-device.ts:175](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/block-device.ts#L175)* **Parameters:** @@ -378,15 +405,15 @@ ___ ### `Private` alignedRead -▸ **alignedRead**(`buffer`: Buffer, `bufferOffset`: number, `length`: number, `sourceOffset`: number): *Promise‹ReadResult›* +▸ **alignedRead**(`buffer`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer), `bufferOffset`: number, `length`: number, `sourceOffset`: number): *Promise‹ReadResult›* -*Defined in [lib/source-destination/block-device.ts:151](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/block-device.ts#L151)* +*Defined in [lib/source-destination/block-device.ts:183](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/block-device.ts#L183)* **Parameters:** Name | Type | ------ | ------ | -`buffer` | Buffer | +`buffer` | [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | `bufferOffset` | number | `length` | number | `sourceOffset` | number | @@ -397,15 +424,15 @@ ___ ### `Private` alignedWrite -▸ **alignedWrite**(`buffer`: Buffer, `bufferOffset`: number, `length`: number, `fileOffset`: number): *Promise‹WriteResult›* +▸ **alignedWrite**(`buffer`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer), `bufferOffset`: number, `length`: number, `fileOffset`: number): *Promise‹WriteResult›* -*Defined in [lib/source-destination/block-device.ts:187](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/block-device.ts#L187)* +*Defined in [lib/source-destination/block-device.ts:216](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/block-device.ts#L216)* **Parameters:** Name | Type | ------ | ------ | -`buffer` | Buffer | +`buffer` | [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | `bufferOffset` | number | `length` | number | `fileOffset` | number | @@ -424,7 +451,7 @@ ___ *Overrides [SourceSource](sourcesource.md).[canCreateReadStream](sourcesource.md#cancreatereadstream)* -*Defined in [lib/source-destination/file.ts:87](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/file.ts#L87)* +*Defined in [lib/source-destination/file.ts:69](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/file.ts#L69)* **Returns:** *Promise‹boolean›* @@ -438,7 +465,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[canCreateSparseReadStream](sourcesource.md#cancreatesparsereadstream)* -*Defined in [lib/source-destination/source-destination.ts:268](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L268)* +*Defined in [lib/source-destination/source-destination.ts:292](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L292)* **Returns:** *Promise‹boolean›* @@ -452,7 +479,7 @@ ___ *Overrides [File](file.md).[canCreateSparseWriteStream](file.md#cancreatesparsewritestream)* -*Defined in [lib/source-destination/block-device.ts:95](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/block-device.ts#L95)* +*Defined in [lib/source-destination/block-device.ts:121](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/block-device.ts#L121)* **Returns:** *Promise‹boolean›* @@ -466,7 +493,7 @@ ___ *Overrides [File](file.md).[canCreateWriteStream](file.md#cancreatewritestream)* -*Defined in [lib/source-destination/block-device.ts:91](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/block-device.ts#L91)* +*Defined in [lib/source-destination/block-device.ts:117](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/block-device.ts#L117)* **Returns:** *Promise‹boolean›* @@ -482,7 +509,7 @@ ___ *Overrides [SourceSource](sourcesource.md).[canRead](sourcesource.md#canread)* -*Defined in [lib/source-destination/file.ts:79](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/file.ts#L79)* +*Defined in [lib/source-destination/file.ts:61](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/file.ts#L61)* **Returns:** *Promise‹boolean›* @@ -496,7 +523,7 @@ ___ *Overrides [File](file.md).[canWrite](file.md#canwrite)* -*Defined in [lib/source-destination/block-device.ts:87](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/block-device.ts#L87)* +*Defined in [lib/source-destination/block-device.ts:113](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/block-device.ts#L113)* **Returns:** *Promise‹boolean›* @@ -510,7 +537,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[close](sourcesource.md#close)* -*Defined in [lib/source-destination/source-destination.ts:342](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L342)* +*Defined in [lib/source-destination/source-destination.ts:368](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L368)* **Returns:** *Promise‹void›* @@ -518,23 +545,25 @@ ___ ### createReadStream -▸ **createReadStream**(`emitProgress`: boolean, `start`: number, `end?`: undefined | number): *Promise‹ReadableStream›* - -*Implementation of [AdapterSourceDestination](../interfaces/adaptersourcedestination.md)* +▸ **createReadStream**(`__namedParameters`: object): *Promise‹ReadableStream›* *Inherited from [File](file.md).[createReadStream](file.md#createreadstream)* *Overrides [SourceSource](sourcesource.md).[createReadStream](sourcesource.md#createreadstream)* -*Defined in [lib/source-destination/file.ts:124](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/file.ts#L124)* +*Defined in [lib/source-destination/file.ts:117](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/file.ts#L117)* **Parameters:** +▪`Default value` **__namedParameters**: *object*= {} + Name | Type | Default | ------ | ------ | ------ | +`alignment` | undefined | number | - | `emitProgress` | boolean | false | +`end` | undefined | number | - | +`numBuffers` | undefined | number | - | `start` | number | 0 | -`end?` | undefined | number | - | **Returns:** *Promise‹ReadableStream›* @@ -542,19 +571,19 @@ ___ ### createSparseReadStream -▸ **createSparseReadStream**(`_generateChecksums`: boolean): *Promise‹[SparseReadable](../interfaces/sparsereadable.md)›* +▸ **createSparseReadStream**(`_options`: [CreateSparseReadStreamOptions](../interfaces/createsparsereadstreamoptions.md)): *Promise‹[SparseReadable](../interfaces/sparsereadable.md)›* *Implementation of [AdapterSourceDestination](../interfaces/adaptersourcedestination.md)* *Inherited from [SourceSource](sourcesource.md).[createSparseReadStream](sourcesource.md#createsparsereadstream)* -*Defined in [lib/source-destination/source-destination.ts:317](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L317)* +*Defined in [lib/source-destination/source-destination.ts:339](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L339)* **Parameters:** Name | Type | Default | ------ | ------ | ------ | -`_generateChecksums` | boolean | false | +`_options` | [CreateSparseReadStreamOptions](../interfaces/createsparsereadstreamoptions.md) | {} | **Returns:** *Promise‹[SparseReadable](../interfaces/sparsereadable.md)›* @@ -562,13 +591,19 @@ ___ ### createSparseWriteStream -▸ **createSparseWriteStream**(): *Promise‹[SparseWriteStream](sparsewritestream.md)›* - -*Implementation of [AdapterSourceDestination](../interfaces/adaptersourcedestination.md)* +▸ **createSparseWriteStream**(`__namedParameters`: object): *Promise‹[SparseWriteStream](sparsewritestream.md)›* *Overrides [File](file.md).[createSparseWriteStream](file.md#createsparsewritestream)* -*Defined in [lib/source-destination/block-device.ts:108](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/block-device.ts#L108)* +*Defined in [lib/source-destination/block-device.ts:137](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/block-device.ts#L137)* + +**Parameters:** + +▪`Default value` **__namedParameters**: *object*= {} + +Name | Type | +------ | ------ | +`highWaterMark` | undefined | number | **Returns:** *Promise‹[SparseWriteStream](sparsewritestream.md)›* @@ -582,7 +617,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[createVerifier](sourcesource.md#createverifier)* -*Defined in [lib/source-destination/source-destination.ts:357](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L357)* +*Defined in [lib/source-destination/source-destination.ts:383](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L383)* **Parameters:** @@ -597,13 +632,19 @@ ___ ### createWriteStream -▸ **createWriteStream**(): *Promise‹[BlockWriteStream](blockwritestream.md)›* - -*Implementation of [AdapterSourceDestination](../interfaces/adaptersourcedestination.md)* +▸ **createWriteStream**(`__namedParameters`: object): *Promise‹[BlockWriteStream](blockwritestream.md)›* *Overrides [File](file.md).[createWriteStream](file.md#createwritestream)* -*Defined in [lib/source-destination/block-device.ts:99](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/block-device.ts#L99)* +*Defined in [lib/source-destination/block-device.ts:125](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/block-device.ts#L125)* + +**Parameters:** + +▪`Default value` **__namedParameters**: *object*= {} + +Name | Type | +------ | ------ | +`highWaterMark` | undefined | number | **Returns:** *Promise‹[BlockWriteStream](blockwritestream.md)›* @@ -619,7 +660,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[emit](../interfaces/sparsereadable.md#emit)* -Defined in node_modules/@types/node/base.d.ts:693 +Defined in node_modules/@types/node/base.d.ts:908 **Parameters:** @@ -634,7 +675,7 @@ ___ ### eventNames -▸ **eventNames**(): *string | symbol[]* +▸ **eventNames**(): *Array‹string | symbol›* *Implementation of [AdapterSourceDestination](../interfaces/adaptersourcedestination.md)* @@ -642,9 +683,23 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[eventNames](../interfaces/sparsereadable.md#eventnames)* -Defined in node_modules/@types/node/base.d.ts:694 +Defined in node_modules/@types/node/base.d.ts:909 + +**Returns:** *Array‹string | symbol›* + +___ + +### getAlignment + +▸ **getAlignment**(): *undefined | number* + +*Implementation of [AdapterSourceDestination](../interfaces/adaptersourcedestination.md)* + +*Overrides [SourceSource](sourcesource.md).[getAlignment](sourcesource.md#getalignment)* + +*Defined in [lib/source-destination/block-device.ts:59](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/block-device.ts#L59)* -**Returns:** *string | symbol[]* +**Returns:** *undefined | number* ___ @@ -656,7 +711,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[getBlocks](sourcesource.md#getblocks)* -*Defined in [lib/source-destination/source-destination.ts:323](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L323)* +*Defined in [lib/source-destination/source-destination.ts:345](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L345)* **Returns:** *Promise‹[BlocksWithChecksum](../interfaces/blockswithchecksum.md)[]›* @@ -670,7 +725,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[getInnerSource](sourcesource.md#getinnersource)* -*Defined in [lib/source-destination/source-destination.ts:424](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L424)* +*Defined in [lib/source-destination/source-destination.ts:452](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L452)* **Returns:** *Promise‹[SourceDestination](sourcedestination.md)›* @@ -686,7 +741,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[getMaxListeners](../interfaces/sparsereadable.md#getmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:691 +Defined in node_modules/@types/node/base.d.ts:906 **Returns:** *number* @@ -700,12 +755,24 @@ ___ *Inherited from [SourceSource](sourcesource.md).[getMetadata](sourcesource.md#getmetadata)* -*Defined in [lib/source-destination/source-destination.ts:280](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L280)* +*Defined in [lib/source-destination/source-destination.ts:304](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L304)* **Returns:** *Promise‹[Metadata](../interfaces/metadata.md)›* ___ +### `Protected` getOpenFlags + +▸ **getOpenFlags**(): *number* + +*Overrides [File](file.md).[getOpenFlags](file.md#protected-getopenflags)* + +*Defined in [lib/source-destination/block-device.ts:65](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/block-device.ts#L65)* + +**Returns:** *number* + +___ + ### getPartitionTable ▸ **getPartitionTable**(): *Promise‹GetPartitionsResult | undefined›* @@ -714,7 +781,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[getPartitionTable](sourcesource.md#getpartitiontable)* -*Defined in [lib/source-destination/source-destination.ts:445](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L445)* +*Defined in [lib/source-destination/source-destination.ts:473](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L473)* **Returns:** *Promise‹GetPartitionsResult | undefined›* @@ -730,7 +797,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[listenerCount](../interfaces/sparsereadable.md#listenercount)* -Defined in node_modules/@types/node/base.d.ts:695 +Defined in node_modules/@types/node/base.d.ts:910 **Parameters:** @@ -752,7 +819,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[listeners](../interfaces/sparsereadable.md#listeners)* -Defined in node_modules/@types/node/base.d.ts:692 +Defined in node_modules/@types/node/base.d.ts:907 **Parameters:** @@ -768,7 +835,7 @@ ___ ▸ **offsetIsAligned**(`offset`: number): *boolean* -*Defined in [lib/source-destination/block-device.ts:139](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/block-device.ts#L139)* +*Defined in [lib/source-destination/block-device.ts:171](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/block-device.ts#L171)* **Parameters:** @@ -782,22 +849,27 @@ ___ ### on -▸ **on**(`event`: string | symbol, `listener`: Function): *this* - -*Implementation of [AdapterSourceDestination](../interfaces/adaptersourcedestination.md)* +▸ **on**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[on](sourcesource.md#on)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[on](../interfaces/sparsereadable.md#on)* -Defined in node_modules/@types/node/base.d.ts:684 +Defined in node_modules/@types/node/base.d.ts:899 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -805,22 +877,27 @@ ___ ### once -▸ **once**(`event`: string | symbol, `listener`: Function): *this* - -*Implementation of [AdapterSourceDestination](../interfaces/adaptersourcedestination.md)* +▸ **once**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[once](sourcesource.md#once)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[once](../interfaces/sparsereadable.md#once)* -Defined in node_modules/@types/node/base.d.ts:685 +Defined in node_modules/@types/node/base.d.ts:900 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -834,7 +911,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[open](sourcesource.md#open)* -*Defined in [lib/source-destination/source-destination.ts:335](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L335)* +*Defined in [lib/source-destination/source-destination.ts:361](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L361)* **Returns:** *Promise‹void›* @@ -842,22 +919,27 @@ ___ ### prependListener -▸ **prependListener**(`event`: string | symbol, `listener`: Function): *this* - -*Implementation of [AdapterSourceDestination](../interfaces/adaptersourcedestination.md)* +▸ **prependListener**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[prependListener](sourcesource.md#prependlistener)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[prependListener](../interfaces/sparsereadable.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:686 +Defined in node_modules/@types/node/base.d.ts:901 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -865,22 +947,27 @@ ___ ### prependOnceListener -▸ **prependOnceListener**(`event`: string | symbol, `listener`: Function): *this* - -*Implementation of [AdapterSourceDestination](../interfaces/adaptersourcedestination.md)* +▸ **prependOnceListener**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[prependOnceListener](sourcesource.md#prependoncelistener)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[prependOnceListener](../interfaces/sparsereadable.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:687 +Defined in node_modules/@types/node/base.d.ts:902 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -888,19 +975,19 @@ ___ ### read -▸ **read**(`buffer`: Buffer, `bufferOffset`: number, `length`: number, `sourceOffset`: number): *Promise‹ReadResult›* +▸ **read**(`buffer`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer), `bufferOffset`: number, `length`: number, `sourceOffset`: number): *Promise‹ReadResult›* *Implementation of [AdapterSourceDestination](../interfaces/adaptersourcedestination.md)* *Overrides [File](file.md).[read](file.md#read)* -*Defined in [lib/source-destination/block-device.ts:171](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/block-device.ts#L171)* +*Defined in [lib/source-destination/block-device.ts:203](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/block-device.ts#L203)* **Parameters:** Name | Type | ------ | ------ | -`buffer` | Buffer | +`buffer` | [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | `bufferOffset` | number | `length` | number | `sourceOffset` | number | @@ -919,7 +1006,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[removeAllListeners](../interfaces/sparsereadable.md#removealllisteners)* -Defined in node_modules/@types/node/base.d.ts:689 +Defined in node_modules/@types/node/base.d.ts:904 **Parameters:** @@ -933,22 +1020,27 @@ ___ ### removeListener -▸ **removeListener**(`event`: string | symbol, `listener`: Function): *this* - -*Implementation of [AdapterSourceDestination](../interfaces/adaptersourcedestination.md)* +▸ **removeListener**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[removeListener](sourcesource.md#removelistener)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[removeListener](../interfaces/sparsereadable.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:688 +Defined in node_modules/@types/node/base.d.ts:903 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -964,7 +1056,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[setMaxListeners](../interfaces/sparsereadable.md#setmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:690 +Defined in node_modules/@types/node/base.d.ts:905 **Parameters:** @@ -978,19 +1070,19 @@ ___ ### write -▸ **write**(`buffer`: Buffer, `bufferOffset`: number, `length`: number, `fileOffset`: number): *Promise‹WriteResult›* +▸ **write**(`buffer`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer), `bufferOffset`: number, `length`: number, `fileOffset`: number): *Promise‹WriteResult›* *Implementation of [AdapterSourceDestination](../interfaces/adaptersourcedestination.md)* *Overrides [File](file.md).[write](file.md#write)* -*Defined in [lib/source-destination/block-device.ts:203](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/block-device.ts#L203)* +*Defined in [lib/source-destination/block-device.ts:232](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/block-device.ts#L232)* **Parameters:** Name | Type | ------ | ------ | -`buffer` | Buffer | +`buffer` | [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | `bufferOffset` | number | `length` | number | `fileOffset` | number | @@ -1007,7 +1099,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[listenerCount](countingwritable.md#static-listenercount)* -Defined in node_modules/@types/node/base.d.ts:680 +Defined in node_modules/@types/node/base.d.ts:895 **Parameters:** @@ -1028,7 +1120,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[register](sourcesource.md#static-register)* -*Defined in [lib/source-destination/source-destination.ts:250](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L250)* +*Defined in [lib/source-destination/source-destination.ts:270](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L270)* **Parameters:** diff --git a/doc/classes/blockdeviceadapter.md b/doc/classes/blockdeviceadapter.md index 1eda71dd..49b793b7 100644 --- a/doc/classes/blockdeviceadapter.md +++ b/doc/classes/blockdeviceadapter.md @@ -18,8 +18,11 @@ * [drives](blockdeviceadapter.md#private-drives) * [includeSystemDrives](blockdeviceadapter.md#includesystemdrives) +* [oDirect](blockdeviceadapter.md#private-odirect) +* [oWrite](blockdeviceadapter.md#private-owrite) * [ready](blockdeviceadapter.md#private-ready) * [running](blockdeviceadapter.md#private-running) +* [unmountOnSuccess](blockdeviceadapter.md#private-unmountonsuccess) * [defaultMaxListeners](blockdeviceadapter.md#static-defaultmaxlisteners) ### Methods @@ -48,9 +51,9 @@ ### constructor -\+ **new BlockDeviceAdapter**(`includeSystemDrives`: function): *[BlockDeviceAdapter](blockdeviceadapter.md)* +\+ **new BlockDeviceAdapter**(`includeSystemDrives`: function, `unmountOnSuccess`: boolean, `oWrite`: boolean, `oDirect`: boolean): *[BlockDeviceAdapter](blockdeviceadapter.md)* -*Defined in [lib/scanner/adapters/block-device.ts:60](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/scanner/adapters/block-device.ts#L60)* +*Defined in [lib/scanner/adapters/block-device.ts:60](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/scanner/adapters/block-device.ts#L60)* **Parameters:** @@ -58,6 +61,12 @@ ▸ (): *boolean* +▪`Default value` **unmountOnSuccess**: *boolean*= false + +▪`Default value` **oWrite**: *boolean*= false + +▪`Default value` **oDirect**: *boolean*= true + **Returns:** *[BlockDeviceAdapter](blockdeviceadapter.md)* ## Properties @@ -66,7 +75,7 @@ • **drives**: *Map‹string, [BlockDevice](blockdevice.md)›* = new Map() -*Defined in [lib/scanner/adapters/block-device.ts:58](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/scanner/adapters/block-device.ts#L58)* +*Defined in [lib/scanner/adapters/block-device.ts:58](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/scanner/adapters/block-device.ts#L58)* ___ @@ -74,7 +83,7 @@ ___ • **includeSystemDrives**: *function* -*Defined in [lib/scanner/adapters/block-device.ts:62](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/scanner/adapters/block-device.ts#L62)* +*Defined in [lib/scanner/adapters/block-device.ts:63](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/scanner/adapters/block-device.ts#L63)* #### Type declaration: @@ -82,11 +91,27 @@ ___ ___ +### `Private` oDirect + +• **oDirect**: *boolean* + +*Defined in [lib/scanner/adapters/block-device.ts:66](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/scanner/adapters/block-device.ts#L66)* + +___ + +### `Private` oWrite + +• **oWrite**: *boolean* + +*Defined in [lib/scanner/adapters/block-device.ts:65](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/scanner/adapters/block-device.ts#L65)* + +___ + ### `Private` ready • **ready**: *boolean* = false -*Defined in [lib/scanner/adapters/block-device.ts:60](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/scanner/adapters/block-device.ts#L60)* +*Defined in [lib/scanner/adapters/block-device.ts:60](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/scanner/adapters/block-device.ts#L60)* ___ @@ -94,7 +119,15 @@ ___ • **running**: *boolean* = false -*Defined in [lib/scanner/adapters/block-device.ts:59](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/scanner/adapters/block-device.ts#L59)* +*Defined in [lib/scanner/adapters/block-device.ts:59](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/scanner/adapters/block-device.ts#L59)* + +___ + +### `Private` unmountOnSuccess + +• **unmountOnSuccess**: *boolean* + +*Defined in [lib/scanner/adapters/block-device.ts:64](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/scanner/adapters/block-device.ts#L64)* ___ @@ -104,26 +137,33 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[defaultMaxListeners](countingwritable.md#static-defaultmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:681 +Defined in node_modules/@types/node/base.d.ts:896 ## Methods ### addListener -▸ **addListener**(`event`: string | symbol, `listener`: Function): *this* +▸ **addListener**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[addListener](sourcesource.md#addlistener)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[addListener](../interfaces/sparsereadable.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:683 +Defined in node_modules/@types/node/base.d.ts:898 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -137,7 +177,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[emit](../interfaces/sparsereadable.md#emit)* -Defined in node_modules/@types/node/base.d.ts:693 +Defined in node_modules/@types/node/base.d.ts:908 **Parameters:** @@ -152,15 +192,15 @@ ___ ### eventNames -▸ **eventNames**(): *string | symbol[]* +▸ **eventNames**(): *Array‹string | symbol›* *Inherited from [CountingWritable](countingwritable.md).[eventNames](countingwritable.md#eventnames)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[eventNames](../interfaces/sparsereadable.md#eventnames)* -Defined in node_modules/@types/node/base.d.ts:694 +Defined in node_modules/@types/node/base.d.ts:909 -**Returns:** *string | symbol[]* +**Returns:** *Array‹string | symbol›* ___ @@ -172,7 +212,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[getMaxListeners](../interfaces/sparsereadable.md#getmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:691 +Defined in node_modules/@types/node/base.d.ts:906 **Returns:** *number* @@ -182,7 +222,7 @@ ___ ▸ **listDrives**(): *Promise‹Map‹string, [DrivelistDrive](../interfaces/drivelistdrive.md)››* -*Defined in [lib/scanner/adapters/block-device.ts:107](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/scanner/adapters/block-device.ts#L107)* +*Defined in [lib/scanner/adapters/block-device.ts:117](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/scanner/adapters/block-device.ts#L117)* **Returns:** *Promise‹Map‹string, [DrivelistDrive](../interfaces/drivelistdrive.md)››* @@ -196,7 +236,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[listenerCount](../interfaces/sparsereadable.md#listenercount)* -Defined in node_modules/@types/node/base.d.ts:695 +Defined in node_modules/@types/node/base.d.ts:910 **Parameters:** @@ -216,7 +256,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[listeners](../interfaces/sparsereadable.md#listeners)* -Defined in node_modules/@types/node/base.d.ts:692 +Defined in node_modules/@types/node/base.d.ts:907 **Parameters:** @@ -230,20 +270,27 @@ ___ ### on -▸ **on**(`event`: string | symbol, `listener`: Function): *this* +▸ **on**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[on](sourcesource.md#on)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[on](../interfaces/sparsereadable.md#on)* -Defined in node_modules/@types/node/base.d.ts:684 +Defined in node_modules/@types/node/base.d.ts:899 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -251,20 +298,27 @@ ___ ### once -▸ **once**(`event`: string | symbol, `listener`: Function): *this* +▸ **once**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[once](sourcesource.md#once)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[once](../interfaces/sparsereadable.md#once)* -Defined in node_modules/@types/node/base.d.ts:685 +Defined in node_modules/@types/node/base.d.ts:900 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -272,20 +326,27 @@ ___ ### prependListener -▸ **prependListener**(`event`: string | symbol, `listener`: Function): *this* +▸ **prependListener**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[prependListener](sourcesource.md#prependlistener)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[prependListener](../interfaces/sparsereadable.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:686 +Defined in node_modules/@types/node/base.d.ts:901 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -293,20 +354,27 @@ ___ ### prependOnceListener -▸ **prependOnceListener**(`event`: string | symbol, `listener`: Function): *this* +▸ **prependOnceListener**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[prependOnceListener](sourcesource.md#prependoncelistener)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[prependOnceListener](../interfaces/sparsereadable.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:687 +Defined in node_modules/@types/node/base.d.ts:902 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -320,7 +388,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[removeAllListeners](../interfaces/sparsereadable.md#removealllisteners)* -Defined in node_modules/@types/node/base.d.ts:689 +Defined in node_modules/@types/node/base.d.ts:904 **Parameters:** @@ -334,20 +402,27 @@ ___ ### removeListener -▸ **removeListener**(`event`: string | symbol, `listener`: Function): *this* +▸ **removeListener**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[removeListener](sourcesource.md#removelistener)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[removeListener](../interfaces/sparsereadable.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:688 +Defined in node_modules/@types/node/base.d.ts:903 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -357,7 +432,7 @@ ___ ▸ **scan**(): *Promise‹void›* -*Defined in [lib/scanner/adapters/block-device.ts:88](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/scanner/adapters/block-device.ts#L88)* +*Defined in [lib/scanner/adapters/block-device.ts:93](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/scanner/adapters/block-device.ts#L93)* **Returns:** *Promise‹void›* @@ -367,7 +442,7 @@ ___ ▸ **scanLoop**(): *Promise‹void›* -*Defined in [lib/scanner/adapters/block-device.ts:77](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/scanner/adapters/block-device.ts#L77)* +*Defined in [lib/scanner/adapters/block-device.ts:82](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/scanner/adapters/block-device.ts#L82)* **Returns:** *Promise‹void›* @@ -381,7 +456,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[setMaxListeners](../interfaces/sparsereadable.md#setmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:690 +Defined in node_modules/@types/node/base.d.ts:905 **Parameters:** @@ -399,7 +474,7 @@ ___ *Overrides [Adapter](adapter.md).[start](adapter.md#abstract-start)* -*Defined in [lib/scanner/adapters/block-device.ts:66](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/scanner/adapters/block-device.ts#L66)* +*Defined in [lib/scanner/adapters/block-device.ts:71](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/scanner/adapters/block-device.ts#L71)* **Returns:** *void* @@ -411,7 +486,7 @@ ___ *Overrides [Adapter](adapter.md).[stop](adapter.md#abstract-stop)* -*Defined in [lib/scanner/adapters/block-device.ts:71](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/scanner/adapters/block-device.ts#L71)* +*Defined in [lib/scanner/adapters/block-device.ts:76](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/scanner/adapters/block-device.ts#L76)* **Returns:** *void* @@ -423,7 +498,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[listenerCount](countingwritable.md#static-listenercount)* -Defined in node_modules/@types/node/base.d.ts:680 +Defined in node_modules/@types/node/base.d.ts:895 **Parameters:** diff --git a/doc/classes/blockreadstream.md b/doc/classes/blockreadstream.md index 21bc4184..f04d7985 100644 --- a/doc/classes/blockreadstream.md +++ b/doc/classes/blockreadstream.md @@ -20,19 +20,21 @@ ### Properties +* [alignedReadableState](blockreadstream.md#private-alignedreadablestate) * [bytesRead](blockreadstream.md#private-bytesread) -* [chunkSize](blockreadstream.md#private-chunksize) * [end](blockreadstream.md#private-end) * [maxRetries](blockreadstream.md#private-maxretries) * [readable](blockreadstream.md#readable) +* [readableHighWaterMark](blockreadstream.md#readablehighwatermark) * [source](blockreadstream.md#private-source) * [defaultMaxListeners](blockreadstream.md#static-defaultmaxlisteners) ### Methods -* [__read](blockreadstream.md#private-__read) +* [_destroy](blockreadstream.md#_destroy) * [_read](blockreadstream.md#_read) * [addListener](blockreadstream.md#addlistener) +* [destroy](blockreadstream.md#destroy) * [emit](blockreadstream.md#emit) * [eventNames](blockreadstream.md#eventnames) * [getMaxListeners](blockreadstream.md#getmaxlisteners) @@ -62,39 +64,43 @@ ### constructor -\+ **new BlockReadStream**(`source`: [File](file.md), `bytesRead`: number, `end`: number, `chunkSize`: number, `maxRetries`: number): *[BlockReadStream](blockreadstream.md)* +\+ **new BlockReadStream**(`__namedParameters`: object): *[BlockReadStream](blockreadstream.md)* *Overrides void* -*Defined in [lib/block-read-stream.ts:31](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/block-read-stream.ts#L31)* +*Defined in [lib/block-read-stream.ts:36](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/block-read-stream.ts#L36)* **Parameters:** +▪ **__namedParameters**: *object* + Name | Type | Default | ------ | ------ | ------ | -`source` | [File](file.md) | - | -`bytesRead` | number | 0 | -`end` | number | Infinity | +`alignment` | number | - | `chunkSize` | number | CHUNK_SIZE | +`end` | number | Infinity | `maxRetries` | number | 5 | +`numBuffers` | number | 2 | +`source` | [File](file.md)‹› | - | +`start` | number | 0 | **Returns:** *[BlockReadStream](blockreadstream.md)* ## Properties -### `Private` bytesRead +### `Private` alignedReadableState -• **bytesRead**: *number* +• **alignedReadableState**: *[AlignedReadableState](alignedreadablestate.md)* -*Defined in [lib/block-read-stream.ts:35](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/block-read-stream.ts#L35)* +*Defined in [lib/block-read-stream.ts:33](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/block-read-stream.ts#L33)* ___ -### `Private` chunkSize +### `Private` bytesRead -• **chunkSize**: *number* +• **bytesRead**: *number* = 0 -*Defined in [lib/block-read-stream.ts:31](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/block-read-stream.ts#L31)* +*Defined in [lib/block-read-stream.ts:34](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/block-read-stream.ts#L34)* ___ @@ -102,7 +108,7 @@ ___ • **end**: *number* -*Defined in [lib/block-read-stream.ts:36](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/block-read-stream.ts#L36)* +*Defined in [lib/block-read-stream.ts:35](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/block-read-stream.ts#L35)* ___ @@ -110,7 +116,7 @@ ___ • **maxRetries**: *number* -*Defined in [lib/block-read-stream.ts:38](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/block-read-stream.ts#L38)* +*Defined in [lib/block-read-stream.ts:36](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/block-read-stream.ts#L36)* ___ @@ -120,7 +126,17 @@ ___ *Inherited from [SparseFilterStream](sparsefilterstream.md).[readable](sparsefilterstream.md#readable)* -Defined in node_modules/@types/node/base.d.ts:3688 +Defined in node_modules/@types/node/base.d.ts:5422 + +___ + +### readableHighWaterMark + +• **readableHighWaterMark**: *number* + +*Inherited from [SparseFilterStream](sparsefilterstream.md).[readableHighWaterMark](sparsefilterstream.md#readablehighwatermark)* + +Defined in node_modules/@types/node/base.d.ts:5423 ___ @@ -128,7 +144,7 @@ ___ • **source**: *[File](file.md)* -*Defined in [lib/block-read-stream.ts:34](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/block-read-stream.ts#L34)* +*Defined in [lib/block-read-stream.ts:32](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/block-read-stream.ts#L32)* ___ @@ -138,56 +154,79 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[defaultMaxListeners](countingwritable.md#static-defaultmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:681 +Defined in node_modules/@types/node/base.d.ts:896 ## Methods -### `Private` __read +### _destroy -▸ **__read**(): *Promise‹void›* +▸ **_destroy**(`error`: [Error](notcapable.md#static-error) | null, `callback`: function): *void* -*Defined in [lib/block-read-stream.ts:68](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/block-read-stream.ts#L68)* +*Inherited from [SparseReadStream](sparsereadstream.md).[_destroy](sparsereadstream.md#_destroy)* -**Returns:** *Promise‹void›* +Defined in node_modules/@types/node/base.d.ts:5435 + +**Parameters:** + +▪ **error**: *[Error](notcapable.md#static-error) | null* + +▪ **callback**: *function* + +▸ (`error?`: [Error](notcapable.md#static-error)): *void* + +**Parameters:** + +Name | Type | +------ | ------ | +`error?` | [Error](notcapable.md#static-error) | + +**Returns:** *void* ___ ### _read -▸ **_read**(): *void* +▸ **_read**(): *Promise‹void›* *Overrides [SparseFilterStream](sparsefilterstream.md).[_read](sparsefilterstream.md#_read)* -*Defined in [lib/block-read-stream.ts:93](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/block-read-stream.ts#L93)* +*Defined in [lib/block-read-stream.ts:92](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/block-read-stream.ts#L92)* -**Returns:** *void* +**Returns:** *Promise‹void›* ___ ### addListener -▸ **addListener**(`event`: string, `listener`: Function): *this* +▸ **addListener**(`event`: string, `listener`: function): *this* *Inherited from [SparseFilterStream](sparsefilterstream.md).[addListener](sparsefilterstream.md#addlistener)* *Overrides [SourceSource](sourcesource.md).[addListener](sourcesource.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:3711 +Defined in node_modules/@types/node/base.d.ts:5447 Event emitter The defined events on documents including: - 1. close - 2. data - 3. end - 4. readable - 5. error +1. close +2. data +3. end +4. readable +5. error + +**Parameters:** + +▪ **event**: *string* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -197,7 +236,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[addListener](sourcesource.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:3712 +Defined in node_modules/@types/node/base.d.ts:5448 **Parameters:** @@ -215,7 +254,7 @@ Defined in node_modules/@types/node/base.d.ts:3712 *Overrides [SourceSource](sourcesource.md).[addListener](sourcesource.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:3713 +Defined in node_modules/@types/node/base.d.ts:5449 **Parameters:** @@ -223,13 +262,13 @@ Defined in node_modules/@types/node/base.d.ts:3713 ▪ **listener**: *function* -▸ (`chunk`: Buffer | string): *void* +▸ (`chunk`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string): *void* **Parameters:** Name | Type | ------ | ------ | -`chunk` | Buffer | string | +`chunk` | [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string | **Returns:** *this* @@ -239,7 +278,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[addListener](sourcesource.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:3714 +Defined in node_modules/@types/node/base.d.ts:5450 **Parameters:** @@ -257,7 +296,7 @@ Defined in node_modules/@types/node/base.d.ts:3714 *Overrides [SourceSource](sourcesource.md).[addListener](sourcesource.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:3715 +Defined in node_modules/@types/node/base.d.ts:5451 **Parameters:** @@ -275,7 +314,7 @@ Defined in node_modules/@types/node/base.d.ts:3715 *Overrides [SourceSource](sourcesource.md).[addListener](sourcesource.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:3716 +Defined in node_modules/@types/node/base.d.ts:5452 **Parameters:** @@ -295,6 +334,24 @@ Name | Type | ___ +### destroy + +▸ **destroy**(`error?`: [Error](notcapable.md#static-error)): *void* + +*Inherited from [SparseReadStream](sparsereadstream.md).[destroy](sparsereadstream.md#destroy)* + +Defined in node_modules/@types/node/base.d.ts:5436 + +**Parameters:** + +Name | Type | +------ | ------ | +`error?` | [Error](notcapable.md#static-error) | + +**Returns:** *void* + +___ + ### emit ▸ **emit**(`event`: string | symbol, ...`args`: any[]): *boolean* @@ -303,7 +360,7 @@ ___ *Overrides [SourceSource](sourcesource.md).[emit](sourcesource.md#emit)* -Defined in node_modules/@types/node/base.d.ts:3718 +Defined in node_modules/@types/node/base.d.ts:5454 **Parameters:** @@ -320,7 +377,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[emit](sourcesource.md#emit)* -Defined in node_modules/@types/node/base.d.ts:3719 +Defined in node_modules/@types/node/base.d.ts:5455 **Parameters:** @@ -330,20 +387,20 @@ Name | Type | **Returns:** *boolean* -▸ **emit**(`event`: "data", `chunk`: Buffer | string): *boolean* +▸ **emit**(`event`: "data", `chunk`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string): *boolean* *Inherited from [SparseFilterStream](sparsefilterstream.md).[emit](sparsefilterstream.md#emit)* *Overrides [SourceSource](sourcesource.md).[emit](sourcesource.md#emit)* -Defined in node_modules/@types/node/base.d.ts:3720 +Defined in node_modules/@types/node/base.d.ts:5456 **Parameters:** Name | Type | ------ | ------ | `event` | "data" | -`chunk` | Buffer | string | +`chunk` | [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string | **Returns:** *boolean* @@ -353,7 +410,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[emit](sourcesource.md#emit)* -Defined in node_modules/@types/node/base.d.ts:3721 +Defined in node_modules/@types/node/base.d.ts:5457 **Parameters:** @@ -369,7 +426,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[emit](sourcesource.md#emit)* -Defined in node_modules/@types/node/base.d.ts:3722 +Defined in node_modules/@types/node/base.d.ts:5458 **Parameters:** @@ -385,7 +442,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[emit](sourcesource.md#emit)* -Defined in node_modules/@types/node/base.d.ts:3723 +Defined in node_modules/@types/node/base.d.ts:5459 **Parameters:** @@ -400,13 +457,13 @@ ___ ### eventNames -▸ **eventNames**(): *string | symbol[]* +▸ **eventNames**(): *Array‹string | symbol›* *Inherited from [CountingWritable](countingwritable.md).[eventNames](countingwritable.md#eventnames)* -Defined in node_modules/@types/node/base.d.ts:694 +Defined in node_modules/@types/node/base.d.ts:909 -**Returns:** *string | symbol[]* +**Returns:** *Array‹string | symbol›* ___ @@ -416,7 +473,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[getMaxListeners](countingwritable.md#getmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:691 +Defined in node_modules/@types/node/base.d.ts:906 **Returns:** *number* @@ -428,7 +485,7 @@ ___ *Inherited from [SparseFilterStream](sparsefilterstream.md).[isPaused](sparsefilterstream.md#ispaused)* -Defined in node_modules/@types/node/base.d.ts:3695 +Defined in node_modules/@types/node/base.d.ts:5430 **Returns:** *boolean* @@ -440,7 +497,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[listenerCount](countingwritable.md#static-listenercount)* -Defined in node_modules/@types/node/base.d.ts:695 +Defined in node_modules/@types/node/base.d.ts:910 **Parameters:** @@ -458,7 +515,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[listeners](countingwritable.md#listeners)* -Defined in node_modules/@types/node/base.d.ts:692 +Defined in node_modules/@types/node/base.d.ts:907 **Parameters:** @@ -472,20 +529,27 @@ ___ ### on -▸ **on**(`event`: string, `listener`: Function): *this* +▸ **on**(`event`: string, `listener`: function): *this* *Inherited from [SparseFilterStream](sparsefilterstream.md).[on](sparsefilterstream.md#on)* *Overrides [SourceSource](sourcesource.md).[on](sourcesource.md#on)* -Defined in node_modules/@types/node/base.d.ts:3725 +Defined in node_modules/@types/node/base.d.ts:5461 + +**Parameters:** + +▪ **event**: *string* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -495,7 +559,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[on](sourcesource.md#on)* -Defined in node_modules/@types/node/base.d.ts:3726 +Defined in node_modules/@types/node/base.d.ts:5462 **Parameters:** @@ -513,7 +577,7 @@ Defined in node_modules/@types/node/base.d.ts:3726 *Overrides [SourceSource](sourcesource.md).[on](sourcesource.md#on)* -Defined in node_modules/@types/node/base.d.ts:3727 +Defined in node_modules/@types/node/base.d.ts:5463 **Parameters:** @@ -521,13 +585,13 @@ Defined in node_modules/@types/node/base.d.ts:3727 ▪ **listener**: *function* -▸ (`chunk`: Buffer | string): *void* +▸ (`chunk`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string): *void* **Parameters:** Name | Type | ------ | ------ | -`chunk` | Buffer | string | +`chunk` | [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string | **Returns:** *this* @@ -537,7 +601,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[on](sourcesource.md#on)* -Defined in node_modules/@types/node/base.d.ts:3728 +Defined in node_modules/@types/node/base.d.ts:5464 **Parameters:** @@ -555,7 +619,7 @@ Defined in node_modules/@types/node/base.d.ts:3728 *Overrides [SourceSource](sourcesource.md).[on](sourcesource.md#on)* -Defined in node_modules/@types/node/base.d.ts:3729 +Defined in node_modules/@types/node/base.d.ts:5465 **Parameters:** @@ -573,7 +637,7 @@ Defined in node_modules/@types/node/base.d.ts:3729 *Overrides [SourceSource](sourcesource.md).[on](sourcesource.md#on)* -Defined in node_modules/@types/node/base.d.ts:3730 +Defined in node_modules/@types/node/base.d.ts:5466 **Parameters:** @@ -595,20 +659,27 @@ ___ ### once -▸ **once**(`event`: string, `listener`: Function): *this* +▸ **once**(`event`: string, `listener`: function): *this* *Inherited from [SparseFilterStream](sparsefilterstream.md).[once](sparsefilterstream.md#once)* *Overrides [SourceSource](sourcesource.md).[once](sourcesource.md#once)* -Defined in node_modules/@types/node/base.d.ts:3732 +Defined in node_modules/@types/node/base.d.ts:5468 + +**Parameters:** + +▪ **event**: *string* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -618,7 +689,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[once](sourcesource.md#once)* -Defined in node_modules/@types/node/base.d.ts:3733 +Defined in node_modules/@types/node/base.d.ts:5469 **Parameters:** @@ -636,7 +707,7 @@ Defined in node_modules/@types/node/base.d.ts:3733 *Overrides [SourceSource](sourcesource.md).[once](sourcesource.md#once)* -Defined in node_modules/@types/node/base.d.ts:3734 +Defined in node_modules/@types/node/base.d.ts:5470 **Parameters:** @@ -644,13 +715,13 @@ Defined in node_modules/@types/node/base.d.ts:3734 ▪ **listener**: *function* -▸ (`chunk`: Buffer | string): *void* +▸ (`chunk`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string): *void* **Parameters:** Name | Type | ------ | ------ | -`chunk` | Buffer | string | +`chunk` | [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string | **Returns:** *this* @@ -660,7 +731,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[once](sourcesource.md#once)* -Defined in node_modules/@types/node/base.d.ts:3735 +Defined in node_modules/@types/node/base.d.ts:5471 **Parameters:** @@ -678,7 +749,7 @@ Defined in node_modules/@types/node/base.d.ts:3735 *Overrides [SourceSource](sourcesource.md).[once](sourcesource.md#once)* -Defined in node_modules/@types/node/base.d.ts:3736 +Defined in node_modules/@types/node/base.d.ts:5472 **Parameters:** @@ -696,7 +767,7 @@ Defined in node_modules/@types/node/base.d.ts:3736 *Overrides [SourceSource](sourcesource.md).[once](sourcesource.md#once)* -Defined in node_modules/@types/node/base.d.ts:3737 +Defined in node_modules/@types/node/base.d.ts:5473 **Parameters:** @@ -722,7 +793,7 @@ ___ *Inherited from [SparseFilterStream](sparsefilterstream.md).[pause](sparsefilterstream.md#pause)* -Defined in node_modules/@types/node/base.d.ts:3693 +Defined in node_modules/@types/node/base.d.ts:5428 **Returns:** *this* @@ -732,11 +803,9 @@ ___ ▸ **pipe**<**T**>(`destination`: T, `options?`: undefined | object): *T* -*Inherited from [SparseFilterStream](sparsefilterstream.md).[pipe](sparsefilterstream.md#pipe)* - -*Overrides [CountingWritable](countingwritable.md).[pipe](countingwritable.md#pipe)* +*Inherited from [CountingWritable](countingwritable.md).[pipe](countingwritable.md#pipe)* -Defined in node_modules/@types/node/base.d.ts:3696 +Defined in node_modules/@types/node/base.d.ts:5407 **Type parameters:** @@ -755,20 +824,27 @@ ___ ### prependListener -▸ **prependListener**(`event`: string, `listener`: Function): *this* +▸ **prependListener**(`event`: string, `listener`: function): *this* *Inherited from [SparseFilterStream](sparsefilterstream.md).[prependListener](sparsefilterstream.md#prependlistener)* *Overrides [SourceSource](sourcesource.md).[prependListener](sourcesource.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:3739 +Defined in node_modules/@types/node/base.d.ts:5475 + +**Parameters:** + +▪ **event**: *string* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -778,7 +854,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[prependListener](sourcesource.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:3740 +Defined in node_modules/@types/node/base.d.ts:5476 **Parameters:** @@ -796,7 +872,7 @@ Defined in node_modules/@types/node/base.d.ts:3740 *Overrides [SourceSource](sourcesource.md).[prependListener](sourcesource.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:3741 +Defined in node_modules/@types/node/base.d.ts:5477 **Parameters:** @@ -804,13 +880,13 @@ Defined in node_modules/@types/node/base.d.ts:3741 ▪ **listener**: *function* -▸ (`chunk`: Buffer | string): *void* +▸ (`chunk`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string): *void* **Parameters:** Name | Type | ------ | ------ | -`chunk` | Buffer | string | +`chunk` | [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string | **Returns:** *this* @@ -820,7 +896,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[prependListener](sourcesource.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:3742 +Defined in node_modules/@types/node/base.d.ts:5478 **Parameters:** @@ -838,7 +914,7 @@ Defined in node_modules/@types/node/base.d.ts:3742 *Overrides [SourceSource](sourcesource.md).[prependListener](sourcesource.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:3743 +Defined in node_modules/@types/node/base.d.ts:5479 **Parameters:** @@ -856,7 +932,7 @@ Defined in node_modules/@types/node/base.d.ts:3743 *Overrides [SourceSource](sourcesource.md).[prependListener](sourcesource.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:3744 +Defined in node_modules/@types/node/base.d.ts:5480 **Parameters:** @@ -878,20 +954,27 @@ ___ ### prependOnceListener -▸ **prependOnceListener**(`event`: string, `listener`: Function): *this* +▸ **prependOnceListener**(`event`: string, `listener`: function): *this* *Inherited from [SparseFilterStream](sparsefilterstream.md).[prependOnceListener](sparsefilterstream.md#prependoncelistener)* *Overrides [SourceSource](sourcesource.md).[prependOnceListener](sourcesource.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:3746 +Defined in node_modules/@types/node/base.d.ts:5482 + +**Parameters:** + +▪ **event**: *string* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -901,7 +984,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[prependOnceListener](sourcesource.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:3747 +Defined in node_modules/@types/node/base.d.ts:5483 **Parameters:** @@ -919,7 +1002,7 @@ Defined in node_modules/@types/node/base.d.ts:3747 *Overrides [SourceSource](sourcesource.md).[prependOnceListener](sourcesource.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:3748 +Defined in node_modules/@types/node/base.d.ts:5484 **Parameters:** @@ -927,13 +1010,13 @@ Defined in node_modules/@types/node/base.d.ts:3748 ▪ **listener**: *function* -▸ (`chunk`: Buffer | string): *void* +▸ (`chunk`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string): *void* **Parameters:** Name | Type | ------ | ------ | -`chunk` | Buffer | string | +`chunk` | [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string | **Returns:** *this* @@ -943,7 +1026,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[prependOnceListener](sourcesource.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:3749 +Defined in node_modules/@types/node/base.d.ts:5485 **Parameters:** @@ -961,7 +1044,7 @@ Defined in node_modules/@types/node/base.d.ts:3749 *Overrides [SourceSource](sourcesource.md).[prependOnceListener](sourcesource.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:3750 +Defined in node_modules/@types/node/base.d.ts:5486 **Parameters:** @@ -979,7 +1062,7 @@ Defined in node_modules/@types/node/base.d.ts:3750 *Overrides [SourceSource](sourcesource.md).[prependOnceListener](sourcesource.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:3751 +Defined in node_modules/@types/node/base.d.ts:5487 **Parameters:** @@ -1005,7 +1088,7 @@ ___ *Inherited from [SparseFilterStream](sparsefilterstream.md).[push](sparsefilterstream.md#push)* -Defined in node_modules/@types/node/base.d.ts:3700 +Defined in node_modules/@types/node/base.d.ts:5434 **Parameters:** @@ -1024,7 +1107,7 @@ ___ *Inherited from [SparseFilterStream](sparsefilterstream.md).[read](sparsefilterstream.md#read)* -Defined in node_modules/@types/node/base.d.ts:3691 +Defined in node_modules/@types/node/base.d.ts:5426 **Parameters:** @@ -1042,7 +1125,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[removeAllListeners](countingwritable.md#removealllisteners)* -Defined in node_modules/@types/node/base.d.ts:689 +Defined in node_modules/@types/node/base.d.ts:904 **Parameters:** @@ -1056,20 +1139,27 @@ ___ ### removeListener -▸ **removeListener**(`event`: string, `listener`: Function): *this* +▸ **removeListener**(`event`: string, `listener`: function): *this* *Inherited from [SparseFilterStream](sparsefilterstream.md).[removeListener](sparsefilterstream.md#removelistener)* *Overrides [SourceSource](sourcesource.md).[removeListener](sourcesource.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:3753 +Defined in node_modules/@types/node/base.d.ts:5489 + +**Parameters:** + +▪ **event**: *string* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -1079,7 +1169,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[removeListener](sourcesource.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:3754 +Defined in node_modules/@types/node/base.d.ts:5490 **Parameters:** @@ -1097,7 +1187,7 @@ Defined in node_modules/@types/node/base.d.ts:3754 *Overrides [SourceSource](sourcesource.md).[removeListener](sourcesource.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:3755 +Defined in node_modules/@types/node/base.d.ts:5491 **Parameters:** @@ -1105,13 +1195,13 @@ Defined in node_modules/@types/node/base.d.ts:3755 ▪ **listener**: *function* -▸ (`chunk`: Buffer | string): *void* +▸ (`chunk`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string): *void* **Parameters:** Name | Type | ------ | ------ | -`chunk` | Buffer | string | +`chunk` | [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string | **Returns:** *this* @@ -1121,7 +1211,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[removeListener](sourcesource.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:3756 +Defined in node_modules/@types/node/base.d.ts:5492 **Parameters:** @@ -1139,7 +1229,7 @@ Defined in node_modules/@types/node/base.d.ts:3756 *Overrides [SourceSource](sourcesource.md).[removeListener](sourcesource.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:3757 +Defined in node_modules/@types/node/base.d.ts:5493 **Parameters:** @@ -1157,7 +1247,7 @@ Defined in node_modules/@types/node/base.d.ts:3757 *Overrides [SourceSource](sourcesource.md).[removeListener](sourcesource.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:3758 +Defined in node_modules/@types/node/base.d.ts:5494 **Parameters:** @@ -1183,7 +1273,7 @@ ___ *Inherited from [SparseFilterStream](sparsefilterstream.md).[resume](sparsefilterstream.md#resume)* -Defined in node_modules/@types/node/base.d.ts:3694 +Defined in node_modules/@types/node/base.d.ts:5429 **Returns:** *this* @@ -1191,11 +1281,11 @@ ___ ### setEncoding -▸ **setEncoding**(`encoding`: string): *void* +▸ **setEncoding**(`encoding`: string): *this* *Inherited from [SparseFilterStream](sparsefilterstream.md).[setEncoding](sparsefilterstream.md#setencoding)* -Defined in node_modules/@types/node/base.d.ts:3692 +Defined in node_modules/@types/node/base.d.ts:5427 **Parameters:** @@ -1203,7 +1293,7 @@ Name | Type | ------ | ------ | `encoding` | string | -**Returns:** *void* +**Returns:** *this* ___ @@ -1213,7 +1303,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[setMaxListeners](countingwritable.md#setmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:690 +Defined in node_modules/@types/node/base.d.ts:905 **Parameters:** @@ -1227,15 +1317,15 @@ ___ ### `Private` tryRead -▸ **tryRead**(`buffer`: Buffer): *Promise‹ReadResult›* +▸ **tryRead**(`buffer`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer)): *Promise‹ReadResult›* -*Defined in [lib/block-read-stream.ts:47](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/block-read-stream.ts#L47)* +*Defined in [lib/block-read-stream.ts:71](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/block-read-stream.ts#L71)* **Parameters:** Name | Type | ------ | ------ | -`buffer` | Buffer | +`buffer` | [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | **Returns:** *Promise‹ReadResult›* @@ -1243,11 +1333,11 @@ ___ ### unpipe -▸ **unpipe**<**T**>(`destination?`: T): *void* +▸ **unpipe**<**T**>(`destination?`: T): *this* *Inherited from [SparseFilterStream](sparsefilterstream.md).[unpipe](sparsefilterstream.md#unpipe)* -Defined in node_modules/@types/node/base.d.ts:3697 +Defined in node_modules/@types/node/base.d.ts:5431 **Type parameters:** @@ -1259,7 +1349,7 @@ Name | Type | ------ | ------ | `destination?` | T | -**Returns:** *void* +**Returns:** *this* ___ @@ -1269,7 +1359,7 @@ ___ *Inherited from [SparseFilterStream](sparsefilterstream.md).[unshift](sparsefilterstream.md#unshift)* -Defined in node_modules/@types/node/base.d.ts:3698 +Defined in node_modules/@types/node/base.d.ts:5432 **Parameters:** @@ -1283,11 +1373,11 @@ ___ ### wrap -▸ **wrap**(`oldStream`: ReadableStream): *Readable* +▸ **wrap**(`oldStream`: ReadableStream): *this* *Inherited from [SparseFilterStream](sparsefilterstream.md).[wrap](sparsefilterstream.md#wrap)* -Defined in node_modules/@types/node/base.d.ts:3699 +Defined in node_modules/@types/node/base.d.ts:5433 **Parameters:** @@ -1295,7 +1385,7 @@ Name | Type | ------ | ------ | `oldStream` | ReadableStream | -**Returns:** *Readable* +**Returns:** *this* ___ @@ -1305,7 +1395,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[listenerCount](countingwritable.md#static-listenercount)* -Defined in node_modules/@types/node/base.d.ts:680 +Defined in node_modules/@types/node/base.d.ts:895 **Parameters:** diff --git a/doc/classes/blocksverificationerror.md b/doc/classes/blocksverificationerror.md index 62430827..f4016623 100644 --- a/doc/classes/blocksverificationerror.md +++ b/doc/classes/blocksverificationerror.md @@ -29,7 +29,7 @@ \+ **new BlocksVerificationError**(`blocks`: [BlocksWithChecksum](../interfaces/blockswithchecksum.md), `checksum`: string): *[BlocksVerificationError](blocksverificationerror.md)* -*Defined in [lib/errors.ts:48](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/errors.ts#L48)* +*Defined in [lib/errors.ts:48](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/errors.ts#L48)* **Parameters:** @@ -46,7 +46,7 @@ Name | Type | • **blocks**: *[BlocksWithChecksum](../interfaces/blockswithchecksum.md)* -*Defined in [lib/errors.ts:50](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/errors.ts#L50)* +*Defined in [lib/errors.ts:50](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/errors.ts#L50)* ___ @@ -54,7 +54,7 @@ ___ • **checksum**: *string* -*Defined in [lib/errors.ts:51](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/errors.ts#L51)* +*Defined in [lib/errors.ts:51](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/errors.ts#L51)* ___ @@ -64,7 +64,7 @@ ___ *Inherited from [VerificationError](verificationerror.md).[code](verificationerror.md#code)* -*Defined in [lib/errors.ts:24](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/errors.ts#L24)* +*Defined in [lib/errors.ts:24](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/errors.ts#L24)* ___ @@ -74,7 +74,7 @@ ___ *Inherited from [NotCapable](notcapable.md).[message](notcapable.md#message)* -Defined in node_modules/typedoc/node_modules/typescript/lib/lib.es5.d.ts:974 +Defined in node_modules/typescript/lib/lib.es5.d.ts:974 ___ @@ -84,7 +84,7 @@ ___ *Inherited from [NotCapable](notcapable.md).[name](notcapable.md#name)* -Defined in node_modules/typedoc/node_modules/typescript/lib/lib.es5.d.ts:973 +Defined in node_modules/typescript/lib/lib.es5.d.ts:973 ___ @@ -94,4 +94,4 @@ ___ *Inherited from [NotCapable](notcapable.md).[stack](notcapable.md#optional-stack)* -Defined in node_modules/typedoc/node_modules/typescript/lib/lib.es5.d.ts:975 +Defined in node_modules/typescript/lib/lib.es5.d.ts:975 diff --git a/doc/classes/blocktransformstream.md b/doc/classes/blocktransformstream.md index dd1e3dfd..fcfe9af7 100644 --- a/doc/classes/blocktransformstream.md +++ b/doc/classes/blocktransformstream.md @@ -21,22 +21,30 @@ ### Properties -* [_buffers](blocktransformstream.md#private-_buffers) -* [_bytes](blocktransformstream.md#private-_bytes) +* [alignedReadableState](blocktransformstream.md#private-alignedreadablestate) * [bytesRead](blocktransformstream.md#bytesread) * [bytesWritten](blocktransformstream.md#byteswritten) * [chunkSize](blocktransformstream.md#private-chunksize) +* [inputBuffers](blocktransformstream.md#private-inputbuffers) +* [inputBytes](blocktransformstream.md#private-inputbytes) * [readable](blocktransformstream.md#readable) +* [readableHighWaterMark](blocktransformstream.md#readablehighwatermark) * [writable](blocktransformstream.md#writable) +* [writableHighWaterMark](blocktransformstream.md#writablehighwatermark) * [defaultMaxListeners](blocktransformstream.md#static-defaultmaxlisteners) ### Methods +* [_destroy](blocktransformstream.md#_destroy) +* [_final](blocktransformstream.md#_final) * [_flush](blocktransformstream.md#_flush) * [_read](blocktransformstream.md#_read) * [_transform](blocktransformstream.md#_transform) * [_write](blocktransformstream.md#_write) +* [_writev](blocktransformstream.md#optional-_writev) * [addListener](blocktransformstream.md#addlistener) +* [cork](blocktransformstream.md#cork) +* [destroy](blocktransformstream.md#destroy) * [emit](blocktransformstream.md#emit) * [end](blocktransformstream.md#end) * [eventNames](blocktransformstream.md#eventnames) @@ -58,46 +66,44 @@ * [setDefaultEncoding](blocktransformstream.md#setdefaultencoding) * [setEncoding](blocktransformstream.md#setencoding) * [setMaxListeners](blocktransformstream.md#setmaxlisteners) +* [uncork](blocktransformstream.md#uncork) * [unpipe](blocktransformstream.md#unpipe) * [unshift](blocktransformstream.md#unshift) * [wrap](blocktransformstream.md#wrap) * [write](blocktransformstream.md#write) * [writeBuffers](blocktransformstream.md#private-writebuffers) +* [alignIfNeeded](blocktransformstream.md#static-alignifneeded) * [listenerCount](blocktransformstream.md#static-listenercount) ## Constructors ### constructor -\+ **new BlockTransformStream**(`chunkSize`: number): *[BlockTransformStream](blocktransformstream.md)* +\+ **new BlockTransformStream**(`__namedParameters`: object): *[BlockTransformStream](blocktransformstream.md)* *Overrides [SourceTransform](../interfaces/sourcetransform.md).[constructor](../interfaces/sourcetransform.md#constructor)* -*Defined in [lib/block-transform-stream.ts:23](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/block-transform-stream.ts#L23)* +*Defined in [lib/block-transform-stream.ts:28](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/block-transform-stream.ts#L28)* **Parameters:** -Name | Type | ------- | ------ | -`chunkSize` | number | +▪ **__namedParameters**: *object* + +Name | Type | Default | +------ | ------ | ------ | +`alignment` | number | - | +`chunkSize` | number | - | +`numBuffers` | number | 2 | **Returns:** *[BlockTransformStream](blocktransformstream.md)* ## Properties -### `Private` _buffers - -• **_buffers**: *Buffer[]* = [] +### `Private` alignedReadableState -*Defined in [lib/block-transform-stream.ts:22](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/block-transform-stream.ts#L22)* +• **alignedReadableState**: *[AlignedReadableState](alignedreadablestate.md)* -___ - -### `Private` _bytes - -• **_bytes**: *number* = 0 - -*Defined in [lib/block-transform-stream.ts:23](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/block-transform-stream.ts#L23)* +*Defined in [lib/block-transform-stream.ts:26](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/block-transform-stream.ts#L26)* ___ @@ -105,7 +111,7 @@ ___ • **bytesRead**: *number* = 0 -*Defined in [lib/block-transform-stream.ts:20](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/block-transform-stream.ts#L20)* +*Defined in [lib/block-transform-stream.ts:23](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/block-transform-stream.ts#L23)* ___ @@ -113,7 +119,7 @@ ___ • **bytesWritten**: *number* = 0 -*Defined in [lib/block-transform-stream.ts:21](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/block-transform-stream.ts#L21)* +*Defined in [lib/block-transform-stream.ts:24](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/block-transform-stream.ts#L24)* ___ @@ -121,7 +127,23 @@ ___ • **chunkSize**: *number* -*Defined in [lib/block-transform-stream.ts:25](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/block-transform-stream.ts#L25)* +*Defined in [lib/block-transform-stream.ts:25](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/block-transform-stream.ts#L25)* + +___ + +### `Private` inputBuffers + +• **inputBuffers**: *[Buffer](../interfaces/alignedlockablebuffer.md#buffer)[]* = [] + +*Defined in [lib/block-transform-stream.ts:27](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/block-transform-stream.ts#L27)* + +___ + +### `Private` inputBytes + +• **inputBytes**: *number* = 0 + +*Defined in [lib/block-transform-stream.ts:28](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/block-transform-stream.ts#L28)* ___ @@ -131,7 +153,17 @@ ___ *Inherited from [SparseFilterStream](sparsefilterstream.md).[readable](sparsefilterstream.md#readable)* -Defined in node_modules/@types/node/base.d.ts:3688 +Defined in node_modules/@types/node/base.d.ts:5422 + +___ + +### readableHighWaterMark + +• **readableHighWaterMark**: *number* + +*Inherited from [SparseFilterStream](sparsefilterstream.md).[readableHighWaterMark](sparsefilterstream.md#readablehighwatermark)* + +Defined in node_modules/@types/node/base.d.ts:5423 ___ @@ -141,7 +173,17 @@ ___ *Inherited from [SparseFilterStream](sparsefilterstream.md).[writable](sparsefilterstream.md#writable)* -Defined in node_modules/@types/node/base.d.ts:3855 +Defined in node_modules/@types/node/base.d.ts:5600 + +___ + +### writableHighWaterMark + +• **writableHighWaterMark**: *number* + +*Inherited from [SparseFilterStream](sparsefilterstream.md).[writableHighWaterMark](sparsefilterstream.md#writablehighwatermark)* + +Defined in node_modules/@types/node/base.d.ts:5601 ___ @@ -151,18 +193,24 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[defaultMaxListeners](countingwritable.md#static-defaultmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:681 +Defined in node_modules/@types/node/base.d.ts:896 ## Methods -### _flush +### _destroy -▸ **_flush**(`callback`: function): *void* +▸ **_destroy**(`error`: [Error](notcapable.md#static-error) | null, `callback`: function): *void* -*Defined in [lib/block-transform-stream.ts:71](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/block-transform-stream.ts#L71)* +*Inherited from [SparseFilterStream](sparsefilterstream.md).[_destroy](sparsefilterstream.md#_destroy)* + +*Overrides [SparseReadStream](sparsereadstream.md).[_destroy](sparsereadstream.md#_destroy)* + +Defined in node_modules/@types/node/base.d.ts:5605 **Parameters:** +▪ **error**: *[Error](notcapable.md#static-error) | null* + ▪ **callback**: *function* ▸ (`error?`: [Error](notcapable.md#static-error)): *void* @@ -177,13 +225,53 @@ Name | Type | ___ +### _final + +▸ **_final**(`callback`: Function): *void* + +*Inherited from [SparseFilterStream](sparsefilterstream.md).[_final](sparsefilterstream.md#_final)* + +Defined in node_modules/@types/node/base.d.ts:5606 + +**Parameters:** + +Name | Type | +------ | ------ | +`callback` | Function | + +**Returns:** *void* + +___ + +### _flush + +▸ **_flush**(`callback`: function): *Promise‹void›* + +*Defined in [lib/block-transform-stream.ts:86](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/block-transform-stream.ts#L86)* + +**Parameters:** + +▪ **callback**: *function* + +▸ (`error?`: [Error](notcapable.md#static-error)): *void* + +**Parameters:** + +Name | Type | +------ | ------ | +`error?` | [Error](notcapable.md#static-error) | + +**Returns:** *Promise‹void›* + +___ + ### _read ▸ **_read**(`size`: number): *void* *Inherited from [SparseFilterStream](sparsefilterstream.md).[_read](sparsefilterstream.md#_read)* -Defined in node_modules/@types/node/base.d.ts:3690 +Defined in node_modules/@types/node/base.d.ts:5425 **Parameters:** @@ -197,15 +285,15 @@ ___ ### _transform -▸ **_transform**(`chunk`: Buffer, `_encoding`: string, `callback`: function): *void* +▸ **_transform**(`chunk`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer), `_encoding`: string, `callback`: function): *Promise‹void›* *Overrides [SourceTransform](../interfaces/sourcetransform.md).[_transform](../interfaces/sourcetransform.md#_transform)* -*Defined in [lib/block-transform-stream.ts:50](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/block-transform-stream.ts#L50)* +*Defined in [lib/block-transform-stream.ts:74](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/block-transform-stream.ts#L74)* **Parameters:** -▪ **chunk**: *Buffer* +▪ **chunk**: *[Buffer](../interfaces/alignedlockablebuffer.md#buffer)* ▪ **_encoding**: *string* @@ -219,25 +307,59 @@ Name | Type | ------ | ------ | `error?` | [Error](notcapable.md#static-error) | -**Returns:** *void* +**Returns:** *Promise‹void›* ___ ### _write -▸ **_write**(`chunk`: any, `encoding`: string, `callback`: Function): *void* +▸ **_write**(`chunk`: any, `encoding`: string, `callback`: function): *void* *Inherited from [SparseFilterStream](sparsefilterstream.md).[_write](sparsefilterstream.md#_write)* -Defined in node_modules/@types/node/base.d.ts:3857 +Defined in node_modules/@types/node/base.d.ts:5603 + +**Parameters:** + +▪ **chunk**: *any* + +▪ **encoding**: *string* + +▪ **callback**: *function* + +▸ (`err?`: [Error](notcapable.md#static-error)): *void* **Parameters:** Name | Type | ------ | ------ | -`chunk` | any | -`encoding` | string | -`callback` | Function | +`err?` | [Error](notcapable.md#static-error) | + +**Returns:** *void* + +___ + +### `Optional` _writev + +▸ **_writev**(`chunks`: Array‹object›, `callback`: function): *void* + +*Inherited from [SparseFilterStream](sparsefilterstream.md).[_writev](sparsefilterstream.md#optional-_writev)* + +Defined in node_modules/@types/node/base.d.ts:5604 + +**Parameters:** + +▪ **chunks**: *Array‹object›* + +▪ **callback**: *function* + +▸ (`err?`: [Error](notcapable.md#static-error)): *void* + +**Parameters:** + +Name | Type | +------ | ------ | +`err?` | [Error](notcapable.md#static-error) | **Returns:** *void* @@ -245,28 +367,35 @@ ___ ### addListener -▸ **addListener**(`event`: string, `listener`: Function): *this* +▸ **addListener**(`event`: string, `listener`: function): *this* *Inherited from [SparseFilterStream](sparsefilterstream.md).[addListener](sparsefilterstream.md#addlistener)* *Overrides [SourceSource](sourcesource.md).[addListener](sourcesource.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:3711 +Defined in node_modules/@types/node/base.d.ts:5447 Event emitter The defined events on documents including: - 1. close - 2. data - 3. end - 4. readable - 5. error +1. close +2. data +3. end +4. readable +5. error + +**Parameters:** + +▪ **event**: *string* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -276,7 +405,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[addListener](sourcesource.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:3712 +Defined in node_modules/@types/node/base.d.ts:5448 **Parameters:** @@ -294,7 +423,7 @@ Defined in node_modules/@types/node/base.d.ts:3712 *Overrides [SourceSource](sourcesource.md).[addListener](sourcesource.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:3713 +Defined in node_modules/@types/node/base.d.ts:5449 **Parameters:** @@ -302,13 +431,13 @@ Defined in node_modules/@types/node/base.d.ts:3713 ▪ **listener**: *function* -▸ (`chunk`: Buffer | string): *void* +▸ (`chunk`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string): *void* **Parameters:** Name | Type | ------ | ------ | -`chunk` | Buffer | string | +`chunk` | [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string | **Returns:** *this* @@ -318,7 +447,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[addListener](sourcesource.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:3714 +Defined in node_modules/@types/node/base.d.ts:5450 **Parameters:** @@ -336,7 +465,7 @@ Defined in node_modules/@types/node/base.d.ts:3714 *Overrides [SourceSource](sourcesource.md).[addListener](sourcesource.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:3715 +Defined in node_modules/@types/node/base.d.ts:5451 **Parameters:** @@ -354,7 +483,7 @@ Defined in node_modules/@types/node/base.d.ts:3715 *Overrides [SourceSource](sourcesource.md).[addListener](sourcesource.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:3716 +Defined in node_modules/@types/node/base.d.ts:5452 **Parameters:** @@ -374,6 +503,38 @@ Name | Type | ___ +### cork + +▸ **cork**(): *void* + +*Inherited from [SparseFilterStream](sparsefilterstream.md).[cork](sparsefilterstream.md#cork)* + +Defined in node_modules/@types/node/base.d.ts:5613 + +**Returns:** *void* + +___ + +### destroy + +▸ **destroy**(`error?`: [Error](notcapable.md#static-error)): *void* + +*Inherited from [SparseFilterStream](sparsefilterstream.md).[destroy](sparsefilterstream.md#destroy)* + +*Overrides [SparseReadStream](sparsereadstream.md).[destroy](sparsereadstream.md#destroy)* + +Defined in node_modules/@types/node/base.d.ts:5625 + +**Parameters:** + +Name | Type | +------ | ------ | +`error?` | [Error](notcapable.md#static-error) | + +**Returns:** *void* + +___ + ### emit ▸ **emit**(`event`: string | symbol, ...`args`: any[]): *boolean* @@ -382,7 +543,7 @@ ___ *Overrides [SourceSource](sourcesource.md).[emit](sourcesource.md#emit)* -Defined in node_modules/@types/node/base.d.ts:3718 +Defined in node_modules/@types/node/base.d.ts:5454 **Parameters:** @@ -399,7 +560,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[emit](sourcesource.md#emit)* -Defined in node_modules/@types/node/base.d.ts:3719 +Defined in node_modules/@types/node/base.d.ts:5455 **Parameters:** @@ -409,20 +570,20 @@ Name | Type | **Returns:** *boolean* -▸ **emit**(`event`: "data", `chunk`: Buffer | string): *boolean* +▸ **emit**(`event`: "data", `chunk`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string): *boolean* *Inherited from [SparseFilterStream](sparsefilterstream.md).[emit](sparsefilterstream.md#emit)* *Overrides [SourceSource](sourcesource.md).[emit](sourcesource.md#emit)* -Defined in node_modules/@types/node/base.d.ts:3720 +Defined in node_modules/@types/node/base.d.ts:5456 **Parameters:** Name | Type | ------ | ------ | `event` | "data" | -`chunk` | Buffer | string | +`chunk` | [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string | **Returns:** *boolean* @@ -432,7 +593,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[emit](sourcesource.md#emit)* -Defined in node_modules/@types/node/base.d.ts:3721 +Defined in node_modules/@types/node/base.d.ts:5457 **Parameters:** @@ -448,7 +609,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[emit](sourcesource.md#emit)* -Defined in node_modules/@types/node/base.d.ts:3722 +Defined in node_modules/@types/node/base.d.ts:5458 **Parameters:** @@ -464,7 +625,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[emit](sourcesource.md#emit)* -Defined in node_modules/@types/node/base.d.ts:3723 +Defined in node_modules/@types/node/base.d.ts:5459 **Parameters:** @@ -483,7 +644,7 @@ ___ *Inherited from [SparseFilterStream](sparsefilterstream.md).[end](sparsefilterstream.md#end)* -Defined in node_modules/@types/node/base.d.ts:3861 +Defined in node_modules/@types/node/base.d.ts:5610 **Parameters:** @@ -497,7 +658,7 @@ Name | Type | *Inherited from [SparseFilterStream](sparsefilterstream.md).[end](sparsefilterstream.md#end)* -Defined in node_modules/@types/node/base.d.ts:3862 +Defined in node_modules/@types/node/base.d.ts:5611 **Parameters:** @@ -512,7 +673,7 @@ Name | Type | *Inherited from [SparseFilterStream](sparsefilterstream.md).[end](sparsefilterstream.md#end)* -Defined in node_modules/@types/node/base.d.ts:3863 +Defined in node_modules/@types/node/base.d.ts:5612 **Parameters:** @@ -528,13 +689,13 @@ ___ ### eventNames -▸ **eventNames**(): *string | symbol[]* +▸ **eventNames**(): *Array‹string | symbol›* *Inherited from [CountingWritable](countingwritable.md).[eventNames](countingwritable.md#eventnames)* -Defined in node_modules/@types/node/base.d.ts:694 +Defined in node_modules/@types/node/base.d.ts:909 -**Returns:** *string | symbol[]* +**Returns:** *Array‹string | symbol›* ___ @@ -544,7 +705,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[getMaxListeners](countingwritable.md#getmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:691 +Defined in node_modules/@types/node/base.d.ts:906 **Returns:** *number* @@ -556,7 +717,7 @@ ___ *Inherited from [SparseFilterStream](sparsefilterstream.md).[isPaused](sparsefilterstream.md#ispaused)* -Defined in node_modules/@types/node/base.d.ts:3695 +Defined in node_modules/@types/node/base.d.ts:5430 **Returns:** *boolean* @@ -568,7 +729,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[listenerCount](countingwritable.md#static-listenercount)* -Defined in node_modules/@types/node/base.d.ts:695 +Defined in node_modules/@types/node/base.d.ts:910 **Parameters:** @@ -586,7 +747,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[listeners](countingwritable.md#listeners)* -Defined in node_modules/@types/node/base.d.ts:692 +Defined in node_modules/@types/node/base.d.ts:907 **Parameters:** @@ -600,20 +761,27 @@ ___ ### on -▸ **on**(`event`: string, `listener`: Function): *this* +▸ **on**(`event`: string, `listener`: function): *this* *Inherited from [SparseFilterStream](sparsefilterstream.md).[on](sparsefilterstream.md#on)* *Overrides [SourceSource](sourcesource.md).[on](sourcesource.md#on)* -Defined in node_modules/@types/node/base.d.ts:3725 +Defined in node_modules/@types/node/base.d.ts:5461 + +**Parameters:** + +▪ **event**: *string* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -623,7 +791,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[on](sourcesource.md#on)* -Defined in node_modules/@types/node/base.d.ts:3726 +Defined in node_modules/@types/node/base.d.ts:5462 **Parameters:** @@ -641,7 +809,7 @@ Defined in node_modules/@types/node/base.d.ts:3726 *Overrides [SourceSource](sourcesource.md).[on](sourcesource.md#on)* -Defined in node_modules/@types/node/base.d.ts:3727 +Defined in node_modules/@types/node/base.d.ts:5463 **Parameters:** @@ -649,13 +817,13 @@ Defined in node_modules/@types/node/base.d.ts:3727 ▪ **listener**: *function* -▸ (`chunk`: Buffer | string): *void* +▸ (`chunk`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string): *void* **Parameters:** Name | Type | ------ | ------ | -`chunk` | Buffer | string | +`chunk` | [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string | **Returns:** *this* @@ -665,7 +833,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[on](sourcesource.md#on)* -Defined in node_modules/@types/node/base.d.ts:3728 +Defined in node_modules/@types/node/base.d.ts:5464 **Parameters:** @@ -683,7 +851,7 @@ Defined in node_modules/@types/node/base.d.ts:3728 *Overrides [SourceSource](sourcesource.md).[on](sourcesource.md#on)* -Defined in node_modules/@types/node/base.d.ts:3729 +Defined in node_modules/@types/node/base.d.ts:5465 **Parameters:** @@ -701,7 +869,7 @@ Defined in node_modules/@types/node/base.d.ts:3729 *Overrides [SourceSource](sourcesource.md).[on](sourcesource.md#on)* -Defined in node_modules/@types/node/base.d.ts:3730 +Defined in node_modules/@types/node/base.d.ts:5466 **Parameters:** @@ -723,20 +891,27 @@ ___ ### once -▸ **once**(`event`: string, `listener`: Function): *this* +▸ **once**(`event`: string, `listener`: function): *this* *Inherited from [SparseFilterStream](sparsefilterstream.md).[once](sparsefilterstream.md#once)* *Overrides [SourceSource](sourcesource.md).[once](sourcesource.md#once)* -Defined in node_modules/@types/node/base.d.ts:3732 +Defined in node_modules/@types/node/base.d.ts:5468 + +**Parameters:** + +▪ **event**: *string* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -746,7 +921,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[once](sourcesource.md#once)* -Defined in node_modules/@types/node/base.d.ts:3733 +Defined in node_modules/@types/node/base.d.ts:5469 **Parameters:** @@ -764,7 +939,7 @@ Defined in node_modules/@types/node/base.d.ts:3733 *Overrides [SourceSource](sourcesource.md).[once](sourcesource.md#once)* -Defined in node_modules/@types/node/base.d.ts:3734 +Defined in node_modules/@types/node/base.d.ts:5470 **Parameters:** @@ -772,13 +947,13 @@ Defined in node_modules/@types/node/base.d.ts:3734 ▪ **listener**: *function* -▸ (`chunk`: Buffer | string): *void* +▸ (`chunk`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string): *void* **Parameters:** Name | Type | ------ | ------ | -`chunk` | Buffer | string | +`chunk` | [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string | **Returns:** *this* @@ -788,7 +963,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[once](sourcesource.md#once)* -Defined in node_modules/@types/node/base.d.ts:3735 +Defined in node_modules/@types/node/base.d.ts:5471 **Parameters:** @@ -806,7 +981,7 @@ Defined in node_modules/@types/node/base.d.ts:3735 *Overrides [SourceSource](sourcesource.md).[once](sourcesource.md#once)* -Defined in node_modules/@types/node/base.d.ts:3736 +Defined in node_modules/@types/node/base.d.ts:5472 **Parameters:** @@ -824,7 +999,7 @@ Defined in node_modules/@types/node/base.d.ts:3736 *Overrides [SourceSource](sourcesource.md).[once](sourcesource.md#once)* -Defined in node_modules/@types/node/base.d.ts:3737 +Defined in node_modules/@types/node/base.d.ts:5473 **Parameters:** @@ -850,7 +1025,7 @@ ___ *Inherited from [SparseFilterStream](sparsefilterstream.md).[pause](sparsefilterstream.md#pause)* -Defined in node_modules/@types/node/base.d.ts:3693 +Defined in node_modules/@types/node/base.d.ts:5428 **Returns:** *this* @@ -860,11 +1035,9 @@ ___ ▸ **pipe**<**T**>(`destination`: T, `options?`: undefined | object): *T* -*Inherited from [SparseFilterStream](sparsefilterstream.md).[pipe](sparsefilterstream.md#pipe)* +*Inherited from [CountingWritable](countingwritable.md).[pipe](countingwritable.md#pipe)* -*Overrides [CountingWritable](countingwritable.md).[pipe](countingwritable.md#pipe)* - -Defined in node_modules/@types/node/base.d.ts:3696 +Defined in node_modules/@types/node/base.d.ts:5407 **Type parameters:** @@ -883,20 +1056,27 @@ ___ ### prependListener -▸ **prependListener**(`event`: string, `listener`: Function): *this* +▸ **prependListener**(`event`: string, `listener`: function): *this* *Inherited from [SparseFilterStream](sparsefilterstream.md).[prependListener](sparsefilterstream.md#prependlistener)* *Overrides [SourceSource](sourcesource.md).[prependListener](sourcesource.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:3739 +Defined in node_modules/@types/node/base.d.ts:5475 + +**Parameters:** + +▪ **event**: *string* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -906,7 +1086,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[prependListener](sourcesource.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:3740 +Defined in node_modules/@types/node/base.d.ts:5476 **Parameters:** @@ -924,7 +1104,7 @@ Defined in node_modules/@types/node/base.d.ts:3740 *Overrides [SourceSource](sourcesource.md).[prependListener](sourcesource.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:3741 +Defined in node_modules/@types/node/base.d.ts:5477 **Parameters:** @@ -932,13 +1112,13 @@ Defined in node_modules/@types/node/base.d.ts:3741 ▪ **listener**: *function* -▸ (`chunk`: Buffer | string): *void* +▸ (`chunk`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string): *void* **Parameters:** Name | Type | ------ | ------ | -`chunk` | Buffer | string | +`chunk` | [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string | **Returns:** *this* @@ -948,7 +1128,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[prependListener](sourcesource.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:3742 +Defined in node_modules/@types/node/base.d.ts:5478 **Parameters:** @@ -966,7 +1146,7 @@ Defined in node_modules/@types/node/base.d.ts:3742 *Overrides [SourceSource](sourcesource.md).[prependListener](sourcesource.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:3743 +Defined in node_modules/@types/node/base.d.ts:5479 **Parameters:** @@ -984,7 +1164,7 @@ Defined in node_modules/@types/node/base.d.ts:3743 *Overrides [SourceSource](sourcesource.md).[prependListener](sourcesource.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:3744 +Defined in node_modules/@types/node/base.d.ts:5480 **Parameters:** @@ -1006,20 +1186,27 @@ ___ ### prependOnceListener -▸ **prependOnceListener**(`event`: string, `listener`: Function): *this* +▸ **prependOnceListener**(`event`: string, `listener`: function): *this* *Inherited from [SparseFilterStream](sparsefilterstream.md).[prependOnceListener](sparsefilterstream.md#prependoncelistener)* *Overrides [SourceSource](sourcesource.md).[prependOnceListener](sourcesource.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:3746 +Defined in node_modules/@types/node/base.d.ts:5482 + +**Parameters:** + +▪ **event**: *string* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -1029,7 +1216,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[prependOnceListener](sourcesource.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:3747 +Defined in node_modules/@types/node/base.d.ts:5483 **Parameters:** @@ -1047,7 +1234,7 @@ Defined in node_modules/@types/node/base.d.ts:3747 *Overrides [SourceSource](sourcesource.md).[prependOnceListener](sourcesource.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:3748 +Defined in node_modules/@types/node/base.d.ts:5484 **Parameters:** @@ -1055,13 +1242,13 @@ Defined in node_modules/@types/node/base.d.ts:3748 ▪ **listener**: *function* -▸ (`chunk`: Buffer | string): *void* +▸ (`chunk`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string): *void* **Parameters:** Name | Type | ------ | ------ | -`chunk` | Buffer | string | +`chunk` | [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string | **Returns:** *this* @@ -1071,7 +1258,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[prependOnceListener](sourcesource.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:3749 +Defined in node_modules/@types/node/base.d.ts:5485 **Parameters:** @@ -1089,7 +1276,7 @@ Defined in node_modules/@types/node/base.d.ts:3749 *Overrides [SourceSource](sourcesource.md).[prependOnceListener](sourcesource.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:3750 +Defined in node_modules/@types/node/base.d.ts:5486 **Parameters:** @@ -1107,7 +1294,7 @@ Defined in node_modules/@types/node/base.d.ts:3750 *Overrides [SourceSource](sourcesource.md).[prependOnceListener](sourcesource.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:3751 +Defined in node_modules/@types/node/base.d.ts:5487 **Parameters:** @@ -1133,7 +1320,7 @@ ___ *Inherited from [SparseFilterStream](sparsefilterstream.md).[push](sparsefilterstream.md#push)* -Defined in node_modules/@types/node/base.d.ts:3700 +Defined in node_modules/@types/node/base.d.ts:5434 **Parameters:** @@ -1152,7 +1339,7 @@ ___ *Inherited from [SparseFilterStream](sparsefilterstream.md).[read](sparsefilterstream.md#read)* -Defined in node_modules/@types/node/base.d.ts:3691 +Defined in node_modules/@types/node/base.d.ts:5426 **Parameters:** @@ -1170,7 +1357,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[removeAllListeners](countingwritable.md#removealllisteners)* -Defined in node_modules/@types/node/base.d.ts:689 +Defined in node_modules/@types/node/base.d.ts:904 **Parameters:** @@ -1184,20 +1371,27 @@ ___ ### removeListener -▸ **removeListener**(`event`: string, `listener`: Function): *this* +▸ **removeListener**(`event`: string, `listener`: function): *this* *Inherited from [SparseFilterStream](sparsefilterstream.md).[removeListener](sparsefilterstream.md#removelistener)* *Overrides [SourceSource](sourcesource.md).[removeListener](sourcesource.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:3753 +Defined in node_modules/@types/node/base.d.ts:5489 + +**Parameters:** + +▪ **event**: *string* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -1207,7 +1401,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[removeListener](sourcesource.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:3754 +Defined in node_modules/@types/node/base.d.ts:5490 **Parameters:** @@ -1225,7 +1419,7 @@ Defined in node_modules/@types/node/base.d.ts:3754 *Overrides [SourceSource](sourcesource.md).[removeListener](sourcesource.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:3755 +Defined in node_modules/@types/node/base.d.ts:5491 **Parameters:** @@ -1233,13 +1427,13 @@ Defined in node_modules/@types/node/base.d.ts:3755 ▪ **listener**: *function* -▸ (`chunk`: Buffer | string): *void* +▸ (`chunk`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string): *void* **Parameters:** Name | Type | ------ | ------ | -`chunk` | Buffer | string | +`chunk` | [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string | **Returns:** *this* @@ -1249,7 +1443,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[removeListener](sourcesource.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:3756 +Defined in node_modules/@types/node/base.d.ts:5492 **Parameters:** @@ -1267,7 +1461,7 @@ Defined in node_modules/@types/node/base.d.ts:3756 *Overrides [SourceSource](sourcesource.md).[removeListener](sourcesource.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:3757 +Defined in node_modules/@types/node/base.d.ts:5493 **Parameters:** @@ -1285,7 +1479,7 @@ Defined in node_modules/@types/node/base.d.ts:3757 *Overrides [SourceSource](sourcesource.md).[removeListener](sourcesource.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:3758 +Defined in node_modules/@types/node/base.d.ts:5494 **Parameters:** @@ -1311,7 +1505,7 @@ ___ *Inherited from [SparseFilterStream](sparsefilterstream.md).[resume](sparsefilterstream.md#resume)* -Defined in node_modules/@types/node/base.d.ts:3694 +Defined in node_modules/@types/node/base.d.ts:5429 **Returns:** *this* @@ -1323,7 +1517,7 @@ ___ *Inherited from [SparseFilterStream](sparsefilterstream.md).[setDefaultEncoding](sparsefilterstream.md#setdefaultencoding)* -Defined in node_modules/@types/node/base.d.ts:3860 +Defined in node_modules/@types/node/base.d.ts:5609 **Parameters:** @@ -1337,11 +1531,11 @@ ___ ### setEncoding -▸ **setEncoding**(`encoding`: string): *void* +▸ **setEncoding**(`encoding`: string): *this* *Inherited from [SparseFilterStream](sparsefilterstream.md).[setEncoding](sparsefilterstream.md#setencoding)* -Defined in node_modules/@types/node/base.d.ts:3692 +Defined in node_modules/@types/node/base.d.ts:5427 **Parameters:** @@ -1349,7 +1543,7 @@ Name | Type | ------ | ------ | `encoding` | string | -**Returns:** *void* +**Returns:** *this* ___ @@ -1359,7 +1553,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[setMaxListeners](countingwritable.md#setmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:690 +Defined in node_modules/@types/node/base.d.ts:905 **Parameters:** @@ -1371,13 +1565,25 @@ Name | Type | ___ +### uncork + +▸ **uncork**(): *void* + +*Inherited from [SparseFilterStream](sparsefilterstream.md).[uncork](sparsefilterstream.md#uncork)* + +Defined in node_modules/@types/node/base.d.ts:5614 + +**Returns:** *void* + +___ + ### unpipe -▸ **unpipe**<**T**>(`destination?`: T): *void* +▸ **unpipe**<**T**>(`destination?`: T): *this* *Inherited from [SparseFilterStream](sparsefilterstream.md).[unpipe](sparsefilterstream.md#unpipe)* -Defined in node_modules/@types/node/base.d.ts:3697 +Defined in node_modules/@types/node/base.d.ts:5431 **Type parameters:** @@ -1389,7 +1595,7 @@ Name | Type | ------ | ------ | `destination?` | T | -**Returns:** *void* +**Returns:** *this* ___ @@ -1399,7 +1605,7 @@ ___ *Inherited from [SparseFilterStream](sparsefilterstream.md).[unshift](sparsefilterstream.md#unshift)* -Defined in node_modules/@types/node/base.d.ts:3698 +Defined in node_modules/@types/node/base.d.ts:5432 **Parameters:** @@ -1413,11 +1619,11 @@ ___ ### wrap -▸ **wrap**(`oldStream`: ReadableStream): *Readable* +▸ **wrap**(`oldStream`: ReadableStream): *this* *Inherited from [SparseFilterStream](sparsefilterstream.md).[wrap](sparsefilterstream.md#wrap)* -Defined in node_modules/@types/node/base.d.ts:3699 +Defined in node_modules/@types/node/base.d.ts:5433 **Parameters:** @@ -1425,7 +1631,7 @@ Name | Type | ------ | ------ | `oldStream` | ReadableStream | -**Returns:** *Readable* +**Returns:** *this* ___ @@ -1435,7 +1641,7 @@ ___ *Inherited from [SparseFilterStream](sparsefilterstream.md).[write](sparsefilterstream.md#write)* -Defined in node_modules/@types/node/base.d.ts:3858 +Defined in node_modules/@types/node/base.d.ts:5607 **Parameters:** @@ -1450,7 +1656,7 @@ Name | Type | *Inherited from [SparseFilterStream](sparsefilterstream.md).[write](sparsefilterstream.md#write)* -Defined in node_modules/@types/node/base.d.ts:3859 +Defined in node_modules/@types/node/base.d.ts:5608 **Parameters:** @@ -1466,9 +1672,9 @@ ___ ### `Private` writeBuffers -▸ **writeBuffers**(`flush`: boolean): *void* +▸ **writeBuffers**(`flush`: boolean): *Promise‹void›* -*Defined in [lib/block-transform-stream.ts:29](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/block-transform-stream.ts#L29)* +*Defined in [lib/block-transform-stream.ts:48](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/block-transform-stream.ts#L48)* **Parameters:** @@ -1476,7 +1682,25 @@ Name | Type | Default | ------ | ------ | ------ | `flush` | boolean | false | -**Returns:** *void* +**Returns:** *Promise‹void›* + +___ + +### `Static` alignIfNeeded + +▸ **alignIfNeeded**(`stream`: ReadableStream, `alignment?`: undefined | number, `numBuffers?`: undefined | number): *ReadableStream‹› | [BlockTransformStream](blocktransformstream.md)‹›* + +*Defined in [lib/block-transform-stream.ts:91](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/block-transform-stream.ts#L91)* + +**Parameters:** + +Name | Type | +------ | ------ | +`stream` | ReadableStream | +`alignment?` | undefined | number | +`numBuffers?` | undefined | number | + +**Returns:** *ReadableStream‹› | [BlockTransformStream](blocktransformstream.md)‹›* ___ @@ -1486,7 +1710,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[listenerCount](countingwritable.md#static-listenercount)* -Defined in node_modules/@types/node/base.d.ts:680 +Defined in node_modules/@types/node/base.d.ts:895 **Parameters:** diff --git a/doc/classes/blockwritestream.md b/doc/classes/blockwritestream.md index 76e6043e..0af0a1ab 100644 --- a/doc/classes/blockwritestream.md +++ b/doc/classes/blockwritestream.md @@ -20,23 +20,26 @@ ### Properties -* [_buffers](blockwritestream.md#private-_buffers) -* [_bytes](blockwritestream.md#private-_bytes) -* [_firstBuffers](blockwritestream.md#private-_firstbuffers) * [bytesWritten](blockwritestream.md#byteswritten) +* [delayFirstBuffer](blockwritestream.md#private-delayfirstbuffer) * [destination](blockwritestream.md#private-destination) -* [firstBytesToKeep](blockwritestream.md#firstbytestokeep) +* [firstBuffer](blockwritestream.md#private-optional-firstbuffer) * [maxRetries](blockwritestream.md#private-maxretries) +* [position](blockwritestream.md#private-position) * [writable](blockwritestream.md#writable) +* [writableHighWaterMark](blockwritestream.md#writablehighwatermark) * [defaultMaxListeners](blockwritestream.md#static-defaultmaxlisteners) ### Methods * [__final](blockwritestream.md#private-__final) * [__write](blockwritestream.md#private-__write) +* [_destroy](blockwritestream.md#_destroy) * [_final](blockwritestream.md#_final) * [_write](blockwritestream.md#_write) +* [_writev](blockwritestream.md#optional-_writev) * [addListener](blockwritestream.md#addlistener) +* [cork](blockwritestream.md#cork) * [destroy](blockwritestream.md#destroy) * [emit](blockwritestream.md#emit) * [end](blockwritestream.md#end) @@ -53,96 +56,101 @@ * [removeListener](blockwritestream.md#removelistener) * [setDefaultEncoding](blockwritestream.md#setdefaultencoding) * [setMaxListeners](blockwritestream.md#setmaxlisteners) +* [uncork](blockwritestream.md#uncork) * [write](blockwritestream.md#write) -* [writeBuffers](blockwritestream.md#private-writebuffers) -* [writeChunk](blockwritestream.md#private-writechunk) +* [writeBuffer](blockwritestream.md#private-writebuffer) * [listenerCount](blockwritestream.md#static-listenercount) ## Constructors ### constructor -\+ **new BlockWriteStream**(`destination`: [BlockDevice](blockdevice.md), `firstBytesToKeep`: number, `maxRetries`: number): *[BlockWriteStream](blockwritestream.md)* +\+ **new BlockWriteStream**(`__namedParameters`: object): *[BlockWriteStream](blockwritestream.md)* *Overrides [CountingWritable](countingwritable.md).[constructor](countingwritable.md#constructor)* -*Defined in [lib/block-write-stream.ts:37](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/block-write-stream.ts#L37)* +*Defined in [lib/block-write-stream.ts:37](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/block-write-stream.ts#L37)* **Parameters:** +▪ **__namedParameters**: *object* + Name | Type | Default | ------ | ------ | ------ | -`destination` | [BlockDevice](blockdevice.md) | - | -`firstBytesToKeep` | number | 0 | +`delayFirstBuffer` | boolean | false | +`destination` | [BlockDevice](blockdevice.md)‹› | - | +`highWaterMark` | undefined | number | - | `maxRetries` | number | 5 | **Returns:** *[BlockWriteStream](blockwritestream.md)* ## Properties -### `Private` _buffers +### bytesWritten -• **_buffers**: *Buffer[]* = [] +• **bytesWritten**: *number* = 0 -*Defined in [lib/block-write-stream.ts:36](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/block-write-stream.ts#L36)* +*Defined in [lib/block-write-stream.ts:35](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/block-write-stream.ts#L35)* ___ -### `Private` _bytes +### `Private` delayFirstBuffer -• **_bytes**: *number* = 0 +• **delayFirstBuffer**: *boolean* -*Defined in [lib/block-write-stream.ts:37](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/block-write-stream.ts#L37)* +*Defined in [lib/block-write-stream.ts:33](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/block-write-stream.ts#L33)* ___ -### `Private` _firstBuffers +### `Private` destination -• **_firstBuffers**: *Buffer[]* = [] +• **destination**: *[BlockDevice](blockdevice.md)* -*Defined in [lib/block-write-stream.ts:35](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/block-write-stream.ts#L35)* +*Defined in [lib/block-write-stream.ts:32](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/block-write-stream.ts#L32)* ___ -### bytesWritten +### `Private` `Optional` firstBuffer -• **bytesWritten**: *number* = 0 +• **firstBuffer**? : *[Buffer](../interfaces/alignedlockablebuffer.md#buffer)* -*Defined in [lib/block-write-stream.ts:34](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/block-write-stream.ts#L34)* +*Defined in [lib/block-write-stream.ts:37](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/block-write-stream.ts#L37)* ___ -### `Private` destination +### `Private` maxRetries -• **destination**: *[BlockDevice](blockdevice.md)* +• **maxRetries**: *number* -*Defined in [lib/block-write-stream.ts:40](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/block-write-stream.ts#L40)* +*Defined in [lib/block-write-stream.ts:34](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/block-write-stream.ts#L34)* ___ -### firstBytesToKeep +### `Private` position -• **firstBytesToKeep**: *number* +• **position**: *number* = 0 -*Defined in [lib/block-write-stream.ts:41](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/block-write-stream.ts#L41)* +*Defined in [lib/block-write-stream.ts:36](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/block-write-stream.ts#L36)* ___ -### `Private` maxRetries +### writable -• **maxRetries**: *number* +• **writable**: *boolean* + +*Inherited from [CountingWritable](countingwritable.md).[writable](countingwritable.md#writable)* -*Defined in [lib/block-write-stream.ts:42](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/block-write-stream.ts#L42)* +Defined in node_modules/@types/node/base.d.ts:5508 ___ -### writable +### writableHighWaterMark -• **writable**: *boolean* +• **writableHighWaterMark**: *number* -*Inherited from [CountingWritable](countingwritable.md).[writable](countingwritable.md#writable)* +*Inherited from [CountingWritable](countingwritable.md).[writableHighWaterMark](countingwritable.md#writablehighwatermark)* -Defined in node_modules/@types/node/base.d.ts:3770 +Defined in node_modules/@types/node/base.d.ts:5509 ___ @@ -152,7 +160,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[defaultMaxListeners](countingwritable.md#static-defaultmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:681 +Defined in node_modules/@types/node/base.d.ts:896 ## Methods @@ -160,7 +168,7 @@ Defined in node_modules/@types/node/base.d.ts:681 ▸ **__final**(): *Promise‹void›* -*Defined in [lib/block-write-stream.ts:141](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/block-write-stream.ts#L141)* +*Defined in [lib/block-write-stream.ts:103](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/block-write-stream.ts#L103)* **Returns:** *Promise‹void›* @@ -168,25 +176,53 @@ ___ ### `Private` __write -▸ **__write**(`buffer`: Buffer): *Promise‹void›* +▸ **__write**(`buffer`: [AlignedLockableBuffer](../interfaces/alignedlockablebuffer.md)): *Promise‹void›* -*Defined in [lib/block-write-stream.ts:102](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/block-write-stream.ts#L102)* +*Defined in [lib/block-write-stream.ts:76](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/block-write-stream.ts#L76)* **Parameters:** Name | Type | ------ | ------ | -`buffer` | Buffer | +`buffer` | [AlignedLockableBuffer](../interfaces/alignedlockablebuffer.md) | **Returns:** *Promise‹void›* ___ +### _destroy + +▸ **_destroy**(`error`: [Error](notcapable.md#static-error) | null, `callback`: function): *void* + +*Inherited from [CountingWritable](countingwritable.md).[_destroy](countingwritable.md#_destroy)* + +Defined in node_modules/@types/node/base.d.ts:5513 + +**Parameters:** + +▪ **error**: *[Error](notcapable.md#static-error) | null* + +▪ **callback**: *function* + +▸ (`error?`: [Error](notcapable.md#static-error)): *void* + +**Parameters:** + +Name | Type | +------ | ------ | +`error?` | [Error](notcapable.md#static-error) | + +**Returns:** *void* + +___ + ### _final ▸ **_final**(`callback`: function): *void* -*Defined in [lib/block-write-stream.ts:165](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/block-write-stream.ts#L165)* +*Overrides [CountingWritable](countingwritable.md).[_final](countingwritable.md#_final)* + +*Defined in [lib/block-write-stream.ts:119](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/block-write-stream.ts#L119)* **`summary`** Write buffered data before a stream ends, called by stream internals @@ -208,15 +244,15 @@ ___ ### _write -▸ **_write**(`buffer`: Buffer, `_encoding`: string, `callback`: function): *void* +▸ **_write**(`buffer`: [AlignedLockableBuffer](../interfaces/alignedlockablebuffer.md), `_encoding`: string, `callback`: function): *void* *Overrides void* -*Defined in [lib/block-write-stream.ts:133](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/block-write-stream.ts#L133)* +*Defined in [lib/block-write-stream.ts:95](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/block-write-stream.ts#L95)* **Parameters:** -▪ **buffer**: *Buffer* +▪ **buffer**: *[AlignedLockableBuffer](../interfaces/alignedlockablebuffer.md)* ▪ **_encoding**: *string* @@ -234,31 +270,64 @@ Name | Type | ___ +### `Optional` _writev + +▸ **_writev**(`chunks`: Array‹object›, `callback`: function): *void* + +*Inherited from [CountingWritable](countingwritable.md).[_writev](countingwritable.md#optional-_writev)* + +Defined in node_modules/@types/node/base.d.ts:5512 + +**Parameters:** + +▪ **chunks**: *Array‹object›* + +▪ **callback**: *function* + +▸ (`err?`: [Error](notcapable.md#static-error)): *void* + +**Parameters:** + +Name | Type | +------ | ------ | +`err?` | [Error](notcapable.md#static-error) | + +**Returns:** *void* + +___ + ### addListener -▸ **addListener**(`event`: string, `listener`: Function): *this* +▸ **addListener**(`event`: string, `listener`: function): *this* *Inherited from [CountingWritable](countingwritable.md).[addListener](countingwritable.md#addlistener)* *Overrides [SourceSource](sourcesource.md).[addListener](sourcesource.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:3790 +Defined in node_modules/@types/node/base.d.ts:5535 Event emitter The defined events on documents including: - 1. close - 2. drain - 3. error - 4. finish - 5. pipe - 6. unpipe +1. close +2. drain +3. error +4. finish +5. pipe +6. unpipe + +**Parameters:** + +▪ **event**: *string* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -268,7 +337,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[addListener](sourcesource.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:3791 +Defined in node_modules/@types/node/base.d.ts:5536 **Parameters:** @@ -286,7 +355,7 @@ Defined in node_modules/@types/node/base.d.ts:3791 *Overrides [SourceSource](sourcesource.md).[addListener](sourcesource.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:3792 +Defined in node_modules/@types/node/base.d.ts:5537 **Parameters:** @@ -304,7 +373,7 @@ Defined in node_modules/@types/node/base.d.ts:3792 *Overrides [SourceSource](sourcesource.md).[addListener](sourcesource.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:3793 +Defined in node_modules/@types/node/base.d.ts:5538 **Parameters:** @@ -328,7 +397,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[addListener](sourcesource.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:3794 +Defined in node_modules/@types/node/base.d.ts:5539 **Parameters:** @@ -346,7 +415,7 @@ Defined in node_modules/@types/node/base.d.ts:3794 *Overrides [SourceSource](sourcesource.md).[addListener](sourcesource.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:3795 +Defined in node_modules/@types/node/base.d.ts:5540 **Parameters:** @@ -370,7 +439,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[addListener](sourcesource.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:3796 +Defined in node_modules/@types/node/base.d.ts:5541 **Parameters:** @@ -390,13 +459,25 @@ Name | Type | ___ +### cork + +▸ **cork**(): *void* + +*Inherited from [CountingWritable](countingwritable.md).[cork](countingwritable.md#cork)* + +Defined in node_modules/@types/node/base.d.ts:5521 + +**Returns:** *void* + +___ + ### destroy -▸ **destroy**(`error?`: [Error](notcapable.md#static-error)): *this* +▸ **destroy**(`error?`: [Error](notcapable.md#static-error)): *void* -*Inherited from [SparseWriteStream](sparsewritestream.md).[destroy](sparsewritestream.md#destroy)* +*Inherited from [CountingWritable](countingwritable.md).[destroy](countingwritable.md#destroy)* -*Defined in [typings/readable-stream/index.d.ts:18](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/typings/readable-stream/index.d.ts#L18)* +Defined in node_modules/@types/node/base.d.ts:5523 **Parameters:** @@ -404,7 +485,7 @@ Name | Type | ------ | ------ | `error?` | [Error](notcapable.md#static-error) | -**Returns:** *this* +**Returns:** *void* ___ @@ -416,7 +497,7 @@ ___ *Overrides [SourceSource](sourcesource.md).[emit](sourcesource.md#emit)* -Defined in node_modules/@types/node/base.d.ts:3798 +Defined in node_modules/@types/node/base.d.ts:5543 **Parameters:** @@ -433,7 +514,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[emit](sourcesource.md#emit)* -Defined in node_modules/@types/node/base.d.ts:3799 +Defined in node_modules/@types/node/base.d.ts:5544 **Parameters:** @@ -443,20 +524,20 @@ Name | Type | **Returns:** *boolean* -▸ **emit**(`event`: "drain", `chunk`: Buffer | string): *boolean* +▸ **emit**(`event`: "drain", `chunk`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string): *boolean* *Inherited from [CountingWritable](countingwritable.md).[emit](countingwritable.md#emit)* *Overrides [SourceSource](sourcesource.md).[emit](sourcesource.md#emit)* -Defined in node_modules/@types/node/base.d.ts:3800 +Defined in node_modules/@types/node/base.d.ts:5545 **Parameters:** Name | Type | ------ | ------ | `event` | "drain" | -`chunk` | Buffer | string | +`chunk` | [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string | **Returns:** *boolean* @@ -466,7 +547,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[emit](sourcesource.md#emit)* -Defined in node_modules/@types/node/base.d.ts:3801 +Defined in node_modules/@types/node/base.d.ts:5546 **Parameters:** @@ -483,7 +564,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[emit](sourcesource.md#emit)* -Defined in node_modules/@types/node/base.d.ts:3802 +Defined in node_modules/@types/node/base.d.ts:5547 **Parameters:** @@ -499,7 +580,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[emit](sourcesource.md#emit)* -Defined in node_modules/@types/node/base.d.ts:3803 +Defined in node_modules/@types/node/base.d.ts:5548 **Parameters:** @@ -516,7 +597,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[emit](sourcesource.md#emit)* -Defined in node_modules/@types/node/base.d.ts:3804 +Defined in node_modules/@types/node/base.d.ts:5549 **Parameters:** @@ -535,7 +616,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[end](countingwritable.md#end)* -Defined in node_modules/@types/node/base.d.ts:3776 +Defined in node_modules/@types/node/base.d.ts:5518 **Parameters:** @@ -549,7 +630,7 @@ Name | Type | *Inherited from [CountingWritable](countingwritable.md).[end](countingwritable.md#end)* -Defined in node_modules/@types/node/base.d.ts:3777 +Defined in node_modules/@types/node/base.d.ts:5519 **Parameters:** @@ -564,7 +645,7 @@ Name | Type | *Inherited from [CountingWritable](countingwritable.md).[end](countingwritable.md#end)* -Defined in node_modules/@types/node/base.d.ts:3778 +Defined in node_modules/@types/node/base.d.ts:5520 **Parameters:** @@ -580,13 +661,13 @@ ___ ### eventNames -▸ **eventNames**(): *string | symbol[]* +▸ **eventNames**(): *Array‹string | symbol›* *Inherited from [CountingWritable](countingwritable.md).[eventNames](countingwritable.md#eventnames)* -Defined in node_modules/@types/node/base.d.ts:694 +Defined in node_modules/@types/node/base.d.ts:909 -**Returns:** *string | symbol[]* +**Returns:** *Array‹string | symbol›* ___ @@ -596,7 +677,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[getMaxListeners](countingwritable.md#getmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:691 +Defined in node_modules/@types/node/base.d.ts:906 **Returns:** *number* @@ -608,7 +689,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[listenerCount](countingwritable.md#static-listenercount)* -Defined in node_modules/@types/node/base.d.ts:695 +Defined in node_modules/@types/node/base.d.ts:910 **Parameters:** @@ -626,7 +707,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[listeners](countingwritable.md#listeners)* -Defined in node_modules/@types/node/base.d.ts:692 +Defined in node_modules/@types/node/base.d.ts:907 **Parameters:** @@ -640,20 +721,27 @@ ___ ### on -▸ **on**(`event`: string, `listener`: Function): *this* +▸ **on**(`event`: string, `listener`: function): *this* *Inherited from [CountingWritable](countingwritable.md).[on](countingwritable.md#on)* *Overrides [SourceSource](sourcesource.md).[on](sourcesource.md#on)* -Defined in node_modules/@types/node/base.d.ts:3806 +Defined in node_modules/@types/node/base.d.ts:5551 + +**Parameters:** + +▪ **event**: *string* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -663,7 +751,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[on](sourcesource.md#on)* -Defined in node_modules/@types/node/base.d.ts:3807 +Defined in node_modules/@types/node/base.d.ts:5552 **Parameters:** @@ -681,7 +769,7 @@ Defined in node_modules/@types/node/base.d.ts:3807 *Overrides [SourceSource](sourcesource.md).[on](sourcesource.md#on)* -Defined in node_modules/@types/node/base.d.ts:3808 +Defined in node_modules/@types/node/base.d.ts:5553 **Parameters:** @@ -699,7 +787,7 @@ Defined in node_modules/@types/node/base.d.ts:3808 *Overrides [SourceSource](sourcesource.md).[on](sourcesource.md#on)* -Defined in node_modules/@types/node/base.d.ts:3809 +Defined in node_modules/@types/node/base.d.ts:5554 **Parameters:** @@ -723,7 +811,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[on](sourcesource.md#on)* -Defined in node_modules/@types/node/base.d.ts:3810 +Defined in node_modules/@types/node/base.d.ts:5555 **Parameters:** @@ -741,7 +829,7 @@ Defined in node_modules/@types/node/base.d.ts:3810 *Overrides [SourceSource](sourcesource.md).[on](sourcesource.md#on)* -Defined in node_modules/@types/node/base.d.ts:3811 +Defined in node_modules/@types/node/base.d.ts:5556 **Parameters:** @@ -765,7 +853,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[on](sourcesource.md#on)* -Defined in node_modules/@types/node/base.d.ts:3812 +Defined in node_modules/@types/node/base.d.ts:5557 **Parameters:** @@ -787,20 +875,27 @@ ___ ### once -▸ **once**(`event`: string, `listener`: Function): *this* +▸ **once**(`event`: string, `listener`: function): *this* *Inherited from [CountingWritable](countingwritable.md).[once](countingwritable.md#once)* *Overrides [SourceSource](sourcesource.md).[once](sourcesource.md#once)* -Defined in node_modules/@types/node/base.d.ts:3814 +Defined in node_modules/@types/node/base.d.ts:5559 + +**Parameters:** + +▪ **event**: *string* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -810,7 +905,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[once](sourcesource.md#once)* -Defined in node_modules/@types/node/base.d.ts:3815 +Defined in node_modules/@types/node/base.d.ts:5560 **Parameters:** @@ -828,7 +923,7 @@ Defined in node_modules/@types/node/base.d.ts:3815 *Overrides [SourceSource](sourcesource.md).[once](sourcesource.md#once)* -Defined in node_modules/@types/node/base.d.ts:3816 +Defined in node_modules/@types/node/base.d.ts:5561 **Parameters:** @@ -846,7 +941,7 @@ Defined in node_modules/@types/node/base.d.ts:3816 *Overrides [SourceSource](sourcesource.md).[once](sourcesource.md#once)* -Defined in node_modules/@types/node/base.d.ts:3817 +Defined in node_modules/@types/node/base.d.ts:5562 **Parameters:** @@ -870,7 +965,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[once](sourcesource.md#once)* -Defined in node_modules/@types/node/base.d.ts:3818 +Defined in node_modules/@types/node/base.d.ts:5563 **Parameters:** @@ -888,7 +983,7 @@ Defined in node_modules/@types/node/base.d.ts:3818 *Overrides [SourceSource](sourcesource.md).[once](sourcesource.md#once)* -Defined in node_modules/@types/node/base.d.ts:3819 +Defined in node_modules/@types/node/base.d.ts:5564 **Parameters:** @@ -912,7 +1007,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[once](sourcesource.md#once)* -Defined in node_modules/@types/node/base.d.ts:3820 +Defined in node_modules/@types/node/base.d.ts:5565 **Parameters:** @@ -938,7 +1033,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[pipe](countingwritable.md#pipe)* -Defined in node_modules/@types/node/base.d.ts:3673 +Defined in node_modules/@types/node/base.d.ts:5407 **Type parameters:** @@ -957,20 +1052,27 @@ ___ ### prependListener -▸ **prependListener**(`event`: string, `listener`: Function): *this* +▸ **prependListener**(`event`: string, `listener`: function): *this* *Inherited from [CountingWritable](countingwritable.md).[prependListener](countingwritable.md#prependlistener)* *Overrides [SourceSource](sourcesource.md).[prependListener](sourcesource.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:3822 +Defined in node_modules/@types/node/base.d.ts:5567 + +**Parameters:** + +▪ **event**: *string* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -980,7 +1082,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[prependListener](sourcesource.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:3823 +Defined in node_modules/@types/node/base.d.ts:5568 **Parameters:** @@ -998,7 +1100,7 @@ Defined in node_modules/@types/node/base.d.ts:3823 *Overrides [SourceSource](sourcesource.md).[prependListener](sourcesource.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:3824 +Defined in node_modules/@types/node/base.d.ts:5569 **Parameters:** @@ -1016,7 +1118,7 @@ Defined in node_modules/@types/node/base.d.ts:3824 *Overrides [SourceSource](sourcesource.md).[prependListener](sourcesource.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:3825 +Defined in node_modules/@types/node/base.d.ts:5570 **Parameters:** @@ -1040,7 +1142,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[prependListener](sourcesource.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:3826 +Defined in node_modules/@types/node/base.d.ts:5571 **Parameters:** @@ -1058,7 +1160,7 @@ Defined in node_modules/@types/node/base.d.ts:3826 *Overrides [SourceSource](sourcesource.md).[prependListener](sourcesource.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:3827 +Defined in node_modules/@types/node/base.d.ts:5572 **Parameters:** @@ -1082,7 +1184,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[prependListener](sourcesource.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:3828 +Defined in node_modules/@types/node/base.d.ts:5573 **Parameters:** @@ -1104,20 +1206,27 @@ ___ ### prependOnceListener -▸ **prependOnceListener**(`event`: string, `listener`: Function): *this* +▸ **prependOnceListener**(`event`: string, `listener`: function): *this* *Inherited from [CountingWritable](countingwritable.md).[prependOnceListener](countingwritable.md#prependoncelistener)* *Overrides [SourceSource](sourcesource.md).[prependOnceListener](sourcesource.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:3830 +Defined in node_modules/@types/node/base.d.ts:5575 + +**Parameters:** + +▪ **event**: *string* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -1127,7 +1236,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[prependOnceListener](sourcesource.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:3831 +Defined in node_modules/@types/node/base.d.ts:5576 **Parameters:** @@ -1145,7 +1254,7 @@ Defined in node_modules/@types/node/base.d.ts:3831 *Overrides [SourceSource](sourcesource.md).[prependOnceListener](sourcesource.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:3832 +Defined in node_modules/@types/node/base.d.ts:5577 **Parameters:** @@ -1163,7 +1272,7 @@ Defined in node_modules/@types/node/base.d.ts:3832 *Overrides [SourceSource](sourcesource.md).[prependOnceListener](sourcesource.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:3833 +Defined in node_modules/@types/node/base.d.ts:5578 **Parameters:** @@ -1187,7 +1296,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[prependOnceListener](sourcesource.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:3834 +Defined in node_modules/@types/node/base.d.ts:5579 **Parameters:** @@ -1205,7 +1314,7 @@ Defined in node_modules/@types/node/base.d.ts:3834 *Overrides [SourceSource](sourcesource.md).[prependOnceListener](sourcesource.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:3835 +Defined in node_modules/@types/node/base.d.ts:5580 **Parameters:** @@ -1229,7 +1338,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[prependOnceListener](sourcesource.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:3836 +Defined in node_modules/@types/node/base.d.ts:5581 **Parameters:** @@ -1255,7 +1364,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[removeAllListeners](countingwritable.md#removealllisteners)* -Defined in node_modules/@types/node/base.d.ts:689 +Defined in node_modules/@types/node/base.d.ts:904 **Parameters:** @@ -1269,20 +1378,27 @@ ___ ### removeListener -▸ **removeListener**(`event`: string, `listener`: Function): *this* +▸ **removeListener**(`event`: string, `listener`: function): *this* *Inherited from [CountingWritable](countingwritable.md).[removeListener](countingwritable.md#removelistener)* *Overrides [SourceSource](sourcesource.md).[removeListener](sourcesource.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:3838 +Defined in node_modules/@types/node/base.d.ts:5583 + +**Parameters:** + +▪ **event**: *string* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -1292,7 +1408,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[removeListener](sourcesource.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:3839 +Defined in node_modules/@types/node/base.d.ts:5584 **Parameters:** @@ -1310,7 +1426,7 @@ Defined in node_modules/@types/node/base.d.ts:3839 *Overrides [SourceSource](sourcesource.md).[removeListener](sourcesource.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:3840 +Defined in node_modules/@types/node/base.d.ts:5585 **Parameters:** @@ -1328,7 +1444,7 @@ Defined in node_modules/@types/node/base.d.ts:3840 *Overrides [SourceSource](sourcesource.md).[removeListener](sourcesource.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:3841 +Defined in node_modules/@types/node/base.d.ts:5586 **Parameters:** @@ -1352,7 +1468,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[removeListener](sourcesource.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:3842 +Defined in node_modules/@types/node/base.d.ts:5587 **Parameters:** @@ -1370,7 +1486,7 @@ Defined in node_modules/@types/node/base.d.ts:3842 *Overrides [SourceSource](sourcesource.md).[removeListener](sourcesource.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:3843 +Defined in node_modules/@types/node/base.d.ts:5588 **Parameters:** @@ -1394,7 +1510,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[removeListener](sourcesource.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:3844 +Defined in node_modules/@types/node/base.d.ts:5589 **Parameters:** @@ -1420,7 +1536,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[setDefaultEncoding](countingwritable.md#setdefaultencoding)* -Defined in node_modules/@types/node/base.d.ts:3775 +Defined in node_modules/@types/node/base.d.ts:5517 **Parameters:** @@ -1438,7 +1554,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[setMaxListeners](countingwritable.md#setmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:690 +Defined in node_modules/@types/node/base.d.ts:905 **Parameters:** @@ -1450,13 +1566,25 @@ Name | Type | ___ +### uncork + +▸ **uncork**(): *void* + +*Inherited from [CountingWritable](countingwritable.md).[uncork](countingwritable.md#uncork)* + +Defined in node_modules/@types/node/base.d.ts:5522 + +**Returns:** *void* + +___ + ### write ▸ **write**(`chunk`: any, `cb?`: Function): *boolean* *Inherited from [CountingWritable](countingwritable.md).[write](countingwritable.md#write)* -Defined in node_modules/@types/node/base.d.ts:3773 +Defined in node_modules/@types/node/base.d.ts:5515 **Parameters:** @@ -1471,7 +1599,7 @@ Name | Type | *Inherited from [CountingWritable](countingwritable.md).[write](countingwritable.md#write)* -Defined in node_modules/@types/node/base.d.ts:3774 +Defined in node_modules/@types/node/base.d.ts:5516 **Parameters:** @@ -1485,29 +1613,18 @@ Name | Type | ___ -### `Private` writeBuffers - -▸ **writeBuffers**(): *Promise‹void›* - -*Defined in [lib/block-write-stream.ts:82](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/block-write-stream.ts#L82)* - -**Returns:** *Promise‹void›* - -___ - -### `Private` writeChunk +### `Private` writeBuffer -▸ **writeChunk**(`buffer`: Buffer, `position`: number, `flushing`: boolean): *Promise‹void›* +▸ **writeBuffer**(`buffer`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer), `position`: number): *Promise‹void›* -*Defined in [lib/block-write-stream.ts:50](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/block-write-stream.ts#L50)* +*Defined in [lib/block-write-stream.ts:56](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/block-write-stream.ts#L56)* **Parameters:** -Name | Type | Default | ------- | ------ | ------ | -`buffer` | Buffer | - | -`position` | number | - | -`flushing` | boolean | false | +Name | Type | +------ | ------ | +`buffer` | [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | +`position` | number | **Returns:** *Promise‹void›* @@ -1519,7 +1636,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[listenerCount](countingwritable.md#static-listenercount)* -Defined in node_modules/@types/node/base.d.ts:680 +Defined in node_modules/@types/node/base.d.ts:895 **Parameters:** diff --git a/doc/classes/bzip2source.md b/doc/classes/bzip2source.md index c0fc0090..a312d775 100644 --- a/doc/classes/bzip2source.md +++ b/doc/classes/bzip2source.md @@ -44,6 +44,7 @@ * [createWriteStream](bzip2source.md#createwritestream) * [emit](bzip2source.md#emit) * [eventNames](bzip2source.md#eventnames) +* [getAlignment](bzip2source.md#getalignment) * [getBlocks](bzip2source.md#getblocks) * [getInnerSource](bzip2source.md#getinnersource) * [getMaxListeners](bzip2source.md#getmaxlisteners) @@ -73,7 +74,7 @@ *Inherited from [SourceSource](sourcesource.md).[constructor](sourcesource.md#constructor)* -*Defined in [lib/source-destination/source-source.ts:20](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-source.ts#L20)* +*Defined in [lib/source-destination/source-source.ts:20](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-source.ts#L20)* **Parameters:** @@ -91,7 +92,7 @@ Name | Type | *Inherited from [CompressedSource](compressedsource.md).[isSizeEstimated](compressedsource.md#protected-issizeestimated)* -*Defined in [lib/source-destination/compressed-source.ts:44](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/compressed-source.ts#L44)* +*Defined in [lib/source-destination/compressed-source.ts:45](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/compressed-source.ts#L45)* ___ @@ -101,7 +102,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[source](sourcesource.md#protected-source)* -*Defined in [lib/source-destination/source-source.ts:22](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-source.ts#L22)* +*Defined in [lib/source-destination/source-source.ts:22](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-source.ts#L22)* ___ @@ -111,7 +112,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[defaultMaxListeners](countingwritable.md#static-defaultmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:681 +Defined in node_modules/@types/node/base.d.ts:896 ___ @@ -132,7 +133,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[imageExtensions](sourcesource.md#static-imageextensions)* -*Defined in [lib/source-destination/source-destination.ts:232](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L232)* +*Defined in [lib/source-destination/source-destination.ts:252](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L252)* ___ @@ -142,7 +143,7 @@ ___ *Overrides [SourceSource](sourcesource.md).[mimetype](sourcesource.md#static-optional-mimetype)* -*Defined in [lib/source-destination/bzip2.ts:24](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/bzip2.ts#L24)* +*Defined in [lib/source-destination/bzip2.ts:24](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/bzip2.ts#L24)* ___ @@ -152,7 +153,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[requiresRandomReadableSource](sourcesource.md#static-requiresrandomreadablesource)* -*Defined in [lib/source-destination/source-source.ts:20](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-source.ts#L20)* +*Defined in [lib/source-destination/source-source.ts:20](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-source.ts#L20)* ## Methods @@ -164,7 +165,7 @@ ___ *Overrides [SourceDestination](sourcedestination.md).[_close](sourcedestination.md#protected-_close)* -*Defined in [lib/source-destination/source-source.ts:30](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-source.ts#L30)* +*Defined in [lib/source-destination/source-source.ts:30](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-source.ts#L30)* **Returns:** *Promise‹void›* @@ -178,7 +179,7 @@ ___ *Overrides [SourceSource](sourcesource.md).[_getMetadata](sourcesource.md#protected-_getmetadata)* -*Defined in [lib/source-destination/compressed-source.ts:84](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/compressed-source.ts#L84)* +*Defined in [lib/source-destination/compressed-source.ts:85](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/compressed-source.ts#L85)* **Returns:** *Promise‹[Metadata](../interfaces/metadata.md)›* @@ -192,7 +193,7 @@ ___ *Overrides [SourceDestination](sourcedestination.md).[_open](sourcedestination.md#protected-_open)* -*Defined in [lib/source-destination/source-source.ts:26](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-source.ts#L26)* +*Defined in [lib/source-destination/source-source.ts:26](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-source.ts#L26)* **Returns:** *Promise‹void›* @@ -200,20 +201,27 @@ ___ ### addListener -▸ **addListener**(`event`: string | symbol, `listener`: Function): *this* +▸ **addListener**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[addListener](sourcesource.md#addlistener)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[addListener](../interfaces/sparsereadable.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:683 +Defined in node_modules/@types/node/base.d.ts:898 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -227,7 +235,7 @@ ___ *Overrides [SourceSource](sourcesource.md).[canCreateReadStream](sourcesource.md#cancreatereadstream)* -*Defined in [lib/source-destination/compressed-source.ts:50](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/compressed-source.ts#L50)* +*Defined in [lib/source-destination/compressed-source.ts:51](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/compressed-source.ts#L51)* **Returns:** *Promise‹boolean›* @@ -239,7 +247,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[canCreateSparseReadStream](sourcesource.md#cancreatesparsereadstream)* -*Defined in [lib/source-destination/source-destination.ts:268](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L268)* +*Defined in [lib/source-destination/source-destination.ts:292](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L292)* **Returns:** *Promise‹boolean›* @@ -251,7 +259,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[canCreateSparseWriteStream](sourcesource.md#cancreatesparsewritestream)* -*Defined in [lib/source-destination/source-destination.ts:276](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L276)* +*Defined in [lib/source-destination/source-destination.ts:300](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L300)* **Returns:** *Promise‹boolean›* @@ -263,7 +271,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[canCreateWriteStream](sourcesource.md#cancreatewritestream)* -*Defined in [lib/source-destination/source-destination.ts:272](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L272)* +*Defined in [lib/source-destination/source-destination.ts:296](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L296)* **Returns:** *Promise‹boolean›* @@ -275,7 +283,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[canRead](sourcesource.md#canread)* -*Defined in [lib/source-destination/source-destination.ts:256](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L256)* +*Defined in [lib/source-destination/source-destination.ts:280](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L280)* **Returns:** *Promise‹boolean›* @@ -287,7 +295,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[canWrite](sourcesource.md#canwrite)* -*Defined in [lib/source-destination/source-destination.ts:260](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L260)* +*Defined in [lib/source-destination/source-destination.ts:284](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L284)* **Returns:** *Promise‹boolean›* @@ -299,7 +307,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[close](sourcesource.md#close)* -*Defined in [lib/source-destination/source-destination.ts:342](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L342)* +*Defined in [lib/source-destination/source-destination.ts:368](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L368)* **Returns:** *Promise‹void›* @@ -307,21 +315,23 @@ ___ ### createReadStream -▸ **createReadStream**(`emitProgress`: boolean, `start`: number, `end?`: undefined | number): *Promise‹[SourceTransform](../interfaces/sourcetransform.md)›* +▸ **createReadStream**(`__namedParameters`: object): *Promise‹[SourceTransform](../interfaces/sourcetransform.md)›* *Inherited from [CompressedSource](compressedsource.md).[createReadStream](compressedsource.md#createreadstream)* *Overrides [SourceSource](sourcesource.md).[createReadStream](sourcesource.md#createreadstream)* -*Defined in [lib/source-destination/compressed-source.ts:54](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/compressed-source.ts#L54)* +*Defined in [lib/source-destination/compressed-source.ts:55](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/compressed-source.ts#L55)* **Parameters:** +▪`Default value` **__namedParameters**: *object*= {} + Name | Type | Default | ------ | ------ | ------ | `emitProgress` | boolean | false | +`end` | undefined | number | - | `start` | number | 0 | -`end?` | undefined | number | - | **Returns:** *Promise‹[SourceTransform](../interfaces/sourcetransform.md)›* @@ -329,17 +339,17 @@ ___ ### createSparseReadStream -▸ **createSparseReadStream**(`_generateChecksums`: boolean): *Promise‹[SparseReadable](../interfaces/sparsereadable.md)›* +▸ **createSparseReadStream**(`_options`: [CreateSparseReadStreamOptions](../interfaces/createsparsereadstreamoptions.md)): *Promise‹[SparseReadable](../interfaces/sparsereadable.md)›* *Inherited from [SourceSource](sourcesource.md).[createSparseReadStream](sourcesource.md#createsparsereadstream)* -*Defined in [lib/source-destination/source-destination.ts:317](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L317)* +*Defined in [lib/source-destination/source-destination.ts:339](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L339)* **Parameters:** Name | Type | Default | ------ | ------ | ------ | -`_generateChecksums` | boolean | false | +`_options` | [CreateSparseReadStreamOptions](../interfaces/createsparsereadstreamoptions.md) | {} | **Returns:** *Promise‹[SparseReadable](../interfaces/sparsereadable.md)›* @@ -347,11 +357,19 @@ ___ ### createSparseWriteStream -▸ **createSparseWriteStream**(): *Promise‹[SparseWritable](../interfaces/sparsewritable.md)›* +▸ **createSparseWriteStream**(`_options`: object): *Promise‹[SparseWritable](../interfaces/sparsewritable.md)›* *Inherited from [SourceSource](sourcesource.md).[createSparseWriteStream](sourcesource.md#createsparsewritestream)* -*Defined in [lib/source-destination/source-destination.ts:331](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L331)* +*Defined in [lib/source-destination/source-destination.ts:355](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L355)* + +**Parameters:** + +▪`Default value` **_options**: *object*= {} + +Name | Type | +------ | ------ | +`highWaterMark?` | undefined | number | **Returns:** *Promise‹[SparseWritable](../interfaces/sparsewritable.md)›* @@ -363,7 +381,7 @@ ___ *Overrides [CompressedSource](compressedsource.md).[createTransform](compressedsource.md#protected-abstract-createtransform)* -*Defined in [lib/source-destination/bzip2.ts:26](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/bzip2.ts#L26)* +*Defined in [lib/source-destination/bzip2.ts:26](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/bzip2.ts#L26)* **Returns:** *Transform* @@ -375,7 +393,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[createVerifier](sourcesource.md#createverifier)* -*Defined in [lib/source-destination/source-destination.ts:357](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L357)* +*Defined in [lib/source-destination/source-destination.ts:383](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L383)* **Parameters:** @@ -390,11 +408,19 @@ ___ ### createWriteStream -▸ **createWriteStream**(): *Promise‹WritableStream›* +▸ **createWriteStream**(`_options`: object): *Promise‹WritableStream›* *Inherited from [SourceSource](sourcesource.md).[createWriteStream](sourcesource.md#createwritestream)* -*Defined in [lib/source-destination/source-destination.ts:327](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L327)* +*Defined in [lib/source-destination/source-destination.ts:349](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L349)* + +**Parameters:** + +▪`Default value` **_options**: *object*= {} + +Name | Type | +------ | ------ | +`highWaterMark?` | undefined | number | **Returns:** *Promise‹WritableStream›* @@ -408,7 +434,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[emit](../interfaces/sparsereadable.md#emit)* -Defined in node_modules/@types/node/base.d.ts:693 +Defined in node_modules/@types/node/base.d.ts:908 **Parameters:** @@ -423,15 +449,27 @@ ___ ### eventNames -▸ **eventNames**(): *string | symbol[]* +▸ **eventNames**(): *Array‹string | symbol›* *Inherited from [CountingWritable](countingwritable.md).[eventNames](countingwritable.md#eventnames)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[eventNames](../interfaces/sparsereadable.md#eventnames)* -Defined in node_modules/@types/node/base.d.ts:694 +Defined in node_modules/@types/node/base.d.ts:909 -**Returns:** *string | symbol[]* +**Returns:** *Array‹string | symbol›* + +___ + +### getAlignment + +▸ **getAlignment**(): *number | undefined* + +*Inherited from [SourceSource](sourcesource.md).[getAlignment](sourcesource.md#getalignment)* + +*Defined in [lib/source-destination/source-destination.ts:276](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L276)* + +**Returns:** *number | undefined* ___ @@ -441,7 +479,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[getBlocks](sourcesource.md#getblocks)* -*Defined in [lib/source-destination/source-destination.ts:323](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L323)* +*Defined in [lib/source-destination/source-destination.ts:345](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L345)* **Returns:** *Promise‹[BlocksWithChecksum](../interfaces/blockswithchecksum.md)[]›* @@ -453,7 +491,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[getInnerSource](sourcesource.md#getinnersource)* -*Defined in [lib/source-destination/source-destination.ts:424](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L424)* +*Defined in [lib/source-destination/source-destination.ts:452](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L452)* **Returns:** *Promise‹[SourceDestination](sourcedestination.md)›* @@ -467,7 +505,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[getMaxListeners](../interfaces/sparsereadable.md#getmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:691 +Defined in node_modules/@types/node/base.d.ts:906 **Returns:** *number* @@ -479,7 +517,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[getMetadata](sourcesource.md#getmetadata)* -*Defined in [lib/source-destination/source-destination.ts:280](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L280)* +*Defined in [lib/source-destination/source-destination.ts:304](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L304)* **Returns:** *Promise‹[Metadata](../interfaces/metadata.md)›* @@ -491,7 +529,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[getPartitionTable](sourcesource.md#getpartitiontable)* -*Defined in [lib/source-destination/source-destination.ts:445](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L445)* +*Defined in [lib/source-destination/source-destination.ts:473](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L473)* **Returns:** *Promise‹GetPartitionsResult | undefined›* @@ -503,7 +541,7 @@ ___ *Inherited from [CompressedSource](compressedsource.md).[getSize](compressedsource.md#protected-getsize)* -*Defined in [lib/source-destination/compressed-source.ts:46](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/compressed-source.ts#L46)* +*Defined in [lib/source-destination/compressed-source.ts:47](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/compressed-source.ts#L47)* **Returns:** *Promise‹number | undefined›* @@ -517,7 +555,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[listenerCount](../interfaces/sparsereadable.md#listenercount)* -Defined in node_modules/@types/node/base.d.ts:695 +Defined in node_modules/@types/node/base.d.ts:910 **Parameters:** @@ -537,7 +575,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[listeners](../interfaces/sparsereadable.md#listeners)* -Defined in node_modules/@types/node/base.d.ts:692 +Defined in node_modules/@types/node/base.d.ts:907 **Parameters:** @@ -551,20 +589,27 @@ ___ ### on -▸ **on**(`event`: string | symbol, `listener`: Function): *this* +▸ **on**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[on](sourcesource.md#on)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[on](../interfaces/sparsereadable.md#on)* -Defined in node_modules/@types/node/base.d.ts:684 +Defined in node_modules/@types/node/base.d.ts:899 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -572,20 +617,27 @@ ___ ### once -▸ **once**(`event`: string | symbol, `listener`: Function): *this* +▸ **once**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[once](sourcesource.md#once)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[once](../interfaces/sparsereadable.md#once)* -Defined in node_modules/@types/node/base.d.ts:685 +Defined in node_modules/@types/node/base.d.ts:900 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -597,7 +649,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[open](sourcesource.md#open)* -*Defined in [lib/source-destination/source-destination.ts:335](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L335)* +*Defined in [lib/source-destination/source-destination.ts:361](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L361)* **Returns:** *Promise‹void›* @@ -605,20 +657,27 @@ ___ ### prependListener -▸ **prependListener**(`event`: string | symbol, `listener`: Function): *this* +▸ **prependListener**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[prependListener](sourcesource.md#prependlistener)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[prependListener](../interfaces/sparsereadable.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:686 +Defined in node_modules/@types/node/base.d.ts:901 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -626,20 +685,27 @@ ___ ### prependOnceListener -▸ **prependOnceListener**(`event`: string | symbol, `listener`: Function): *this* +▸ **prependOnceListener**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[prependOnceListener](sourcesource.md#prependoncelistener)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[prependOnceListener](../interfaces/sparsereadable.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:687 +Defined in node_modules/@types/node/base.d.ts:902 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -647,17 +713,17 @@ ___ ### read -▸ **read**(`_buffer`: Buffer, `_bufferOffset`: number, `_length`: number, `_sourceOffset`: number): *Promise‹ReadResult›* +▸ **read**(`_buffer`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer), `_bufferOffset`: number, `_length`: number, `_sourceOffset`: number): *Promise‹ReadResult›* *Inherited from [SourceSource](sourcesource.md).[read](sourcesource.md#read)* -*Defined in [lib/source-destination/source-destination.ts:291](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L291)* +*Defined in [lib/source-destination/source-destination.ts:315](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L315)* **Parameters:** Name | Type | ------ | ------ | -`_buffer` | Buffer | +`_buffer` | [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | `_bufferOffset` | number | `_length` | number | `_sourceOffset` | number | @@ -674,7 +740,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[removeAllListeners](../interfaces/sparsereadable.md#removealllisteners)* -Defined in node_modules/@types/node/base.d.ts:689 +Defined in node_modules/@types/node/base.d.ts:904 **Parameters:** @@ -688,20 +754,27 @@ ___ ### removeListener -▸ **removeListener**(`event`: string | symbol, `listener`: Function): *this* +▸ **removeListener**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[removeListener](sourcesource.md#removelistener)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[removeListener](../interfaces/sparsereadable.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:688 +Defined in node_modules/@types/node/base.d.ts:903 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -715,7 +788,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[setMaxListeners](../interfaces/sparsereadable.md#setmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:690 +Defined in node_modules/@types/node/base.d.ts:905 **Parameters:** @@ -729,17 +802,17 @@ ___ ### write -▸ **write**(`_buffer`: Buffer, `_bufferOffset`: number, `_length`: number, `_fileOffset`: number): *Promise‹WriteResult›* +▸ **write**(`_buffer`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer), `_bufferOffset`: number, `_length`: number, `_fileOffset`: number): *Promise‹WriteResult›* *Inherited from [SourceSource](sourcesource.md).[write](sourcesource.md#write)* -*Defined in [lib/source-destination/source-destination.ts:300](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L300)* +*Defined in [lib/source-destination/source-destination.ts:324](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L324)* **Parameters:** Name | Type | ------ | ------ | -`_buffer` | Buffer | +`_buffer` | [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | `_bufferOffset` | number | `_length` | number | `_fileOffset` | number | @@ -754,7 +827,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[listenerCount](countingwritable.md#static-listenercount)* -Defined in node_modules/@types/node/base.d.ts:680 +Defined in node_modules/@types/node/base.d.ts:895 **Parameters:** @@ -773,7 +846,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[register](sourcesource.md#static-register)* -*Defined in [lib/source-destination/source-destination.ts:250](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L250)* +*Defined in [lib/source-destination/source-destination.ts:270](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L270)* **Parameters:** diff --git a/doc/classes/checksumverificationerror.md b/doc/classes/checksumverificationerror.md index a98b9392..13cf8760 100644 --- a/doc/classes/checksumverificationerror.md +++ b/doc/classes/checksumverificationerror.md @@ -29,7 +29,7 @@ \+ **new ChecksumVerificationError**(`message`: string, `checksum`: string, `expectedChecksum`: string): *[ChecksumVerificationError](checksumverificationerror.md)* -*Defined in [lib/errors.ts:27](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/errors.ts#L27)* +*Defined in [lib/errors.ts:27](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/errors.ts#L27)* **Parameters:** @@ -47,7 +47,7 @@ Name | Type | • **checksum**: *string* -*Defined in [lib/errors.ts:30](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/errors.ts#L30)* +*Defined in [lib/errors.ts:30](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/errors.ts#L30)* ___ @@ -57,7 +57,7 @@ ___ *Inherited from [VerificationError](verificationerror.md).[code](verificationerror.md#code)* -*Defined in [lib/errors.ts:24](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/errors.ts#L24)* +*Defined in [lib/errors.ts:24](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/errors.ts#L24)* ___ @@ -65,7 +65,7 @@ ___ • **expectedChecksum**: *string* -*Defined in [lib/errors.ts:31](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/errors.ts#L31)* +*Defined in [lib/errors.ts:31](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/errors.ts#L31)* ___ @@ -75,7 +75,7 @@ ___ *Inherited from [NotCapable](notcapable.md).[message](notcapable.md#message)* -Defined in node_modules/typedoc/node_modules/typescript/lib/lib.es5.d.ts:974 +Defined in node_modules/typescript/lib/lib.es5.d.ts:974 ___ @@ -85,7 +85,7 @@ ___ *Inherited from [NotCapable](notcapable.md).[name](notcapable.md#name)* -Defined in node_modules/typedoc/node_modules/typescript/lib/lib.es5.d.ts:973 +Defined in node_modules/typescript/lib/lib.es5.d.ts:973 ___ @@ -95,4 +95,4 @@ ___ *Inherited from [NotCapable](notcapable.md).[stack](notcapable.md#optional-stack)* -Defined in node_modules/typedoc/node_modules/typescript/lib/lib.es5.d.ts:975 +Defined in node_modules/typescript/lib/lib.es5.d.ts:975 diff --git a/doc/classes/compressedsource.md b/doc/classes/compressedsource.md index 8de58658..5763729c 100644 --- a/doc/classes/compressedsource.md +++ b/doc/classes/compressedsource.md @@ -50,6 +50,7 @@ * [createWriteStream](compressedsource.md#createwritestream) * [emit](compressedsource.md#emit) * [eventNames](compressedsource.md#eventnames) +* [getAlignment](compressedsource.md#getalignment) * [getBlocks](compressedsource.md#getblocks) * [getInnerSource](compressedsource.md#getinnersource) * [getMaxListeners](compressedsource.md#getmaxlisteners) @@ -79,7 +80,7 @@ *Inherited from [SourceSource](sourcesource.md).[constructor](sourcesource.md#constructor)* -*Defined in [lib/source-destination/source-source.ts:20](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-source.ts#L20)* +*Defined in [lib/source-destination/source-source.ts:20](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-source.ts#L20)* **Parameters:** @@ -95,7 +96,7 @@ Name | Type | • **isSizeEstimated**: *boolean* = false -*Defined in [lib/source-destination/compressed-source.ts:44](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/compressed-source.ts#L44)* +*Defined in [lib/source-destination/compressed-source.ts:45](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/compressed-source.ts#L45)* ___ @@ -105,7 +106,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[source](sourcesource.md#protected-source)* -*Defined in [lib/source-destination/source-source.ts:22](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-source.ts#L22)* +*Defined in [lib/source-destination/source-source.ts:22](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-source.ts#L22)* ___ @@ -115,7 +116,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[defaultMaxListeners](countingwritable.md#static-defaultmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:681 +Defined in node_modules/@types/node/base.d.ts:896 ___ @@ -136,7 +137,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[imageExtensions](sourcesource.md#static-imageextensions)* -*Defined in [lib/source-destination/source-destination.ts:232](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L232)* +*Defined in [lib/source-destination/source-destination.ts:252](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L252)* ___ @@ -146,7 +147,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[mimetype](sourcesource.md#static-optional-mimetype)* -*Defined in [lib/source-destination/source-destination.ts:244](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L244)* +*Defined in [lib/source-destination/source-destination.ts:264](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L264)* ___ @@ -156,7 +157,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[requiresRandomReadableSource](sourcesource.md#static-requiresrandomreadablesource)* -*Defined in [lib/source-destination/source-source.ts:20](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-source.ts#L20)* +*Defined in [lib/source-destination/source-source.ts:20](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-source.ts#L20)* ## Methods @@ -168,7 +169,7 @@ ___ *Overrides [SourceDestination](sourcedestination.md).[_close](sourcedestination.md#protected-_close)* -*Defined in [lib/source-destination/source-source.ts:30](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-source.ts#L30)* +*Defined in [lib/source-destination/source-source.ts:30](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-source.ts#L30)* **Returns:** *Promise‹void›* @@ -180,7 +181,7 @@ ___ *Overrides [SourceSource](sourcesource.md).[_getMetadata](sourcesource.md#protected-_getmetadata)* -*Defined in [lib/source-destination/compressed-source.ts:84](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/compressed-source.ts#L84)* +*Defined in [lib/source-destination/compressed-source.ts:85](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/compressed-source.ts#L85)* **Returns:** *Promise‹[Metadata](../interfaces/metadata.md)›* @@ -194,7 +195,7 @@ ___ *Overrides [SourceDestination](sourcedestination.md).[_open](sourcedestination.md#protected-_open)* -*Defined in [lib/source-destination/source-source.ts:26](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-source.ts#L26)* +*Defined in [lib/source-destination/source-source.ts:26](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-source.ts#L26)* **Returns:** *Promise‹void›* @@ -202,20 +203,27 @@ ___ ### addListener -▸ **addListener**(`event`: string | symbol, `listener`: Function): *this* +▸ **addListener**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[addListener](sourcesource.md#addlistener)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[addListener](../interfaces/sparsereadable.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:683 +Defined in node_modules/@types/node/base.d.ts:898 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -227,7 +235,7 @@ ___ *Overrides [SourceSource](sourcesource.md).[canCreateReadStream](sourcesource.md#cancreatereadstream)* -*Defined in [lib/source-destination/compressed-source.ts:50](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/compressed-source.ts#L50)* +*Defined in [lib/source-destination/compressed-source.ts:51](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/compressed-source.ts#L51)* **Returns:** *Promise‹boolean›* @@ -239,7 +247,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[canCreateSparseReadStream](sourcesource.md#cancreatesparsereadstream)* -*Defined in [lib/source-destination/source-destination.ts:268](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L268)* +*Defined in [lib/source-destination/source-destination.ts:292](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L292)* **Returns:** *Promise‹boolean›* @@ -251,7 +259,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[canCreateSparseWriteStream](sourcesource.md#cancreatesparsewritestream)* -*Defined in [lib/source-destination/source-destination.ts:276](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L276)* +*Defined in [lib/source-destination/source-destination.ts:300](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L300)* **Returns:** *Promise‹boolean›* @@ -263,7 +271,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[canCreateWriteStream](sourcesource.md#cancreatewritestream)* -*Defined in [lib/source-destination/source-destination.ts:272](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L272)* +*Defined in [lib/source-destination/source-destination.ts:296](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L296)* **Returns:** *Promise‹boolean›* @@ -275,7 +283,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[canRead](sourcesource.md#canread)* -*Defined in [lib/source-destination/source-destination.ts:256](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L256)* +*Defined in [lib/source-destination/source-destination.ts:280](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L280)* **Returns:** *Promise‹boolean›* @@ -287,7 +295,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[canWrite](sourcesource.md#canwrite)* -*Defined in [lib/source-destination/source-destination.ts:260](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L260)* +*Defined in [lib/source-destination/source-destination.ts:284](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L284)* **Returns:** *Promise‹boolean›* @@ -299,7 +307,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[close](sourcesource.md#close)* -*Defined in [lib/source-destination/source-destination.ts:342](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L342)* +*Defined in [lib/source-destination/source-destination.ts:368](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L368)* **Returns:** *Promise‹void›* @@ -307,19 +315,21 @@ ___ ### createReadStream -▸ **createReadStream**(`emitProgress`: boolean, `start`: number, `end?`: undefined | number): *Promise‹[SourceTransform](../interfaces/sourcetransform.md)›* +▸ **createReadStream**(`__namedParameters`: object): *Promise‹[SourceTransform](../interfaces/sourcetransform.md)›* *Overrides [SourceSource](sourcesource.md).[createReadStream](sourcesource.md#createreadstream)* -*Defined in [lib/source-destination/compressed-source.ts:54](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/compressed-source.ts#L54)* +*Defined in [lib/source-destination/compressed-source.ts:55](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/compressed-source.ts#L55)* **Parameters:** +▪`Default value` **__namedParameters**: *object*= {} + Name | Type | Default | ------ | ------ | ------ | `emitProgress` | boolean | false | +`end` | undefined | number | - | `start` | number | 0 | -`end?` | undefined | number | - | **Returns:** *Promise‹[SourceTransform](../interfaces/sourcetransform.md)›* @@ -327,17 +337,17 @@ ___ ### createSparseReadStream -▸ **createSparseReadStream**(`_generateChecksums`: boolean): *Promise‹[SparseReadable](../interfaces/sparsereadable.md)›* +▸ **createSparseReadStream**(`_options`: [CreateSparseReadStreamOptions](../interfaces/createsparsereadstreamoptions.md)): *Promise‹[SparseReadable](../interfaces/sparsereadable.md)›* *Inherited from [SourceSource](sourcesource.md).[createSparseReadStream](sourcesource.md#createsparsereadstream)* -*Defined in [lib/source-destination/source-destination.ts:317](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L317)* +*Defined in [lib/source-destination/source-destination.ts:339](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L339)* **Parameters:** Name | Type | Default | ------ | ------ | ------ | -`_generateChecksums` | boolean | false | +`_options` | [CreateSparseReadStreamOptions](../interfaces/createsparsereadstreamoptions.md) | {} | **Returns:** *Promise‹[SparseReadable](../interfaces/sparsereadable.md)›* @@ -345,11 +355,19 @@ ___ ### createSparseWriteStream -▸ **createSparseWriteStream**(): *Promise‹[SparseWritable](../interfaces/sparsewritable.md)›* +▸ **createSparseWriteStream**(`_options`: object): *Promise‹[SparseWritable](../interfaces/sparsewritable.md)›* *Inherited from [SourceSource](sourcesource.md).[createSparseWriteStream](sourcesource.md#createsparsewritestream)* -*Defined in [lib/source-destination/source-destination.ts:331](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L331)* +*Defined in [lib/source-destination/source-destination.ts:355](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L355)* + +**Parameters:** + +▪`Default value` **_options**: *object*= {} + +Name | Type | +------ | ------ | +`highWaterMark?` | undefined | number | **Returns:** *Promise‹[SparseWritable](../interfaces/sparsewritable.md)›* @@ -359,7 +377,7 @@ ___ ▸ **createTransform**(): *Transform* -*Defined in [lib/source-destination/compressed-source.ts:43](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/compressed-source.ts#L43)* +*Defined in [lib/source-destination/compressed-source.ts:44](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/compressed-source.ts#L44)* **Returns:** *Transform* @@ -371,7 +389,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[createVerifier](sourcesource.md#createverifier)* -*Defined in [lib/source-destination/source-destination.ts:357](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L357)* +*Defined in [lib/source-destination/source-destination.ts:383](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L383)* **Parameters:** @@ -386,11 +404,19 @@ ___ ### createWriteStream -▸ **createWriteStream**(): *Promise‹WritableStream›* +▸ **createWriteStream**(`_options`: object): *Promise‹WritableStream›* *Inherited from [SourceSource](sourcesource.md).[createWriteStream](sourcesource.md#createwritestream)* -*Defined in [lib/source-destination/source-destination.ts:327](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L327)* +*Defined in [lib/source-destination/source-destination.ts:349](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L349)* + +**Parameters:** + +▪`Default value` **_options**: *object*= {} + +Name | Type | +------ | ------ | +`highWaterMark?` | undefined | number | **Returns:** *Promise‹WritableStream›* @@ -404,7 +430,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[emit](../interfaces/sparsereadable.md#emit)* -Defined in node_modules/@types/node/base.d.ts:693 +Defined in node_modules/@types/node/base.d.ts:908 **Parameters:** @@ -419,15 +445,27 @@ ___ ### eventNames -▸ **eventNames**(): *string | symbol[]* +▸ **eventNames**(): *Array‹string | symbol›* *Inherited from [CountingWritable](countingwritable.md).[eventNames](countingwritable.md#eventnames)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[eventNames](../interfaces/sparsereadable.md#eventnames)* -Defined in node_modules/@types/node/base.d.ts:694 +Defined in node_modules/@types/node/base.d.ts:909 -**Returns:** *string | symbol[]* +**Returns:** *Array‹string | symbol›* + +___ + +### getAlignment + +▸ **getAlignment**(): *number | undefined* + +*Inherited from [SourceSource](sourcesource.md).[getAlignment](sourcesource.md#getalignment)* + +*Defined in [lib/source-destination/source-destination.ts:276](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L276)* + +**Returns:** *number | undefined* ___ @@ -437,7 +475,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[getBlocks](sourcesource.md#getblocks)* -*Defined in [lib/source-destination/source-destination.ts:323](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L323)* +*Defined in [lib/source-destination/source-destination.ts:345](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L345)* **Returns:** *Promise‹[BlocksWithChecksum](../interfaces/blockswithchecksum.md)[]›* @@ -449,7 +487,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[getInnerSource](sourcesource.md#getinnersource)* -*Defined in [lib/source-destination/source-destination.ts:424](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L424)* +*Defined in [lib/source-destination/source-destination.ts:452](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L452)* **Returns:** *Promise‹[SourceDestination](sourcedestination.md)›* @@ -463,7 +501,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[getMaxListeners](../interfaces/sparsereadable.md#getmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:691 +Defined in node_modules/@types/node/base.d.ts:906 **Returns:** *number* @@ -475,7 +513,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[getMetadata](sourcesource.md#getmetadata)* -*Defined in [lib/source-destination/source-destination.ts:280](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L280)* +*Defined in [lib/source-destination/source-destination.ts:304](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L304)* **Returns:** *Promise‹[Metadata](../interfaces/metadata.md)›* @@ -487,7 +525,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[getPartitionTable](sourcesource.md#getpartitiontable)* -*Defined in [lib/source-destination/source-destination.ts:445](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L445)* +*Defined in [lib/source-destination/source-destination.ts:473](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L473)* **Returns:** *Promise‹GetPartitionsResult | undefined›* @@ -497,7 +535,7 @@ ___ ▸ **getSize**(): *Promise‹number | undefined›* -*Defined in [lib/source-destination/compressed-source.ts:46](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/compressed-source.ts#L46)* +*Defined in [lib/source-destination/compressed-source.ts:47](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/compressed-source.ts#L47)* **Returns:** *Promise‹number | undefined›* @@ -511,7 +549,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[listenerCount](../interfaces/sparsereadable.md#listenercount)* -Defined in node_modules/@types/node/base.d.ts:695 +Defined in node_modules/@types/node/base.d.ts:910 **Parameters:** @@ -531,7 +569,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[listeners](../interfaces/sparsereadable.md#listeners)* -Defined in node_modules/@types/node/base.d.ts:692 +Defined in node_modules/@types/node/base.d.ts:907 **Parameters:** @@ -545,20 +583,27 @@ ___ ### on -▸ **on**(`event`: string | symbol, `listener`: Function): *this* +▸ **on**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[on](sourcesource.md#on)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[on](../interfaces/sparsereadable.md#on)* -Defined in node_modules/@types/node/base.d.ts:684 +Defined in node_modules/@types/node/base.d.ts:899 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -566,20 +611,27 @@ ___ ### once -▸ **once**(`event`: string | symbol, `listener`: Function): *this* +▸ **once**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[once](sourcesource.md#once)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[once](../interfaces/sparsereadable.md#once)* -Defined in node_modules/@types/node/base.d.ts:685 +Defined in node_modules/@types/node/base.d.ts:900 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -591,7 +643,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[open](sourcesource.md#open)* -*Defined in [lib/source-destination/source-destination.ts:335](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L335)* +*Defined in [lib/source-destination/source-destination.ts:361](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L361)* **Returns:** *Promise‹void›* @@ -599,20 +651,27 @@ ___ ### prependListener -▸ **prependListener**(`event`: string | symbol, `listener`: Function): *this* +▸ **prependListener**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[prependListener](sourcesource.md#prependlistener)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[prependListener](../interfaces/sparsereadable.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:686 +Defined in node_modules/@types/node/base.d.ts:901 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -620,20 +679,27 @@ ___ ### prependOnceListener -▸ **prependOnceListener**(`event`: string | symbol, `listener`: Function): *this* +▸ **prependOnceListener**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[prependOnceListener](sourcesource.md#prependoncelistener)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[prependOnceListener](../interfaces/sparsereadable.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:687 +Defined in node_modules/@types/node/base.d.ts:902 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -641,17 +707,17 @@ ___ ### read -▸ **read**(`_buffer`: Buffer, `_bufferOffset`: number, `_length`: number, `_sourceOffset`: number): *Promise‹ReadResult›* +▸ **read**(`_buffer`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer), `_bufferOffset`: number, `_length`: number, `_sourceOffset`: number): *Promise‹ReadResult›* *Inherited from [SourceSource](sourcesource.md).[read](sourcesource.md#read)* -*Defined in [lib/source-destination/source-destination.ts:291](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L291)* +*Defined in [lib/source-destination/source-destination.ts:315](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L315)* **Parameters:** Name | Type | ------ | ------ | -`_buffer` | Buffer | +`_buffer` | [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | `_bufferOffset` | number | `_length` | number | `_sourceOffset` | number | @@ -668,7 +734,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[removeAllListeners](../interfaces/sparsereadable.md#removealllisteners)* -Defined in node_modules/@types/node/base.d.ts:689 +Defined in node_modules/@types/node/base.d.ts:904 **Parameters:** @@ -682,20 +748,27 @@ ___ ### removeListener -▸ **removeListener**(`event`: string | symbol, `listener`: Function): *this* +▸ **removeListener**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[removeListener](sourcesource.md#removelistener)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[removeListener](../interfaces/sparsereadable.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:688 +Defined in node_modules/@types/node/base.d.ts:903 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -709,7 +782,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[setMaxListeners](../interfaces/sparsereadable.md#setmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:690 +Defined in node_modules/@types/node/base.d.ts:905 **Parameters:** @@ -723,17 +796,17 @@ ___ ### write -▸ **write**(`_buffer`: Buffer, `_bufferOffset`: number, `_length`: number, `_fileOffset`: number): *Promise‹WriteResult›* +▸ **write**(`_buffer`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer), `_bufferOffset`: number, `_length`: number, `_fileOffset`: number): *Promise‹WriteResult›* *Inherited from [SourceSource](sourcesource.md).[write](sourcesource.md#write)* -*Defined in [lib/source-destination/source-destination.ts:300](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L300)* +*Defined in [lib/source-destination/source-destination.ts:324](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L324)* **Parameters:** Name | Type | ------ | ------ | -`_buffer` | Buffer | +`_buffer` | [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | `_bufferOffset` | number | `_length` | number | `_fileOffset` | number | @@ -748,7 +821,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[listenerCount](countingwritable.md#static-listenercount)* -Defined in node_modules/@types/node/base.d.ts:680 +Defined in node_modules/@types/node/base.d.ts:895 **Parameters:** @@ -767,7 +840,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[register](sourcesource.md#static-register)* -*Defined in [lib/source-destination/source-destination.ts:250](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L250)* +*Defined in [lib/source-destination/source-destination.ts:270](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L270)* **Parameters:** diff --git a/doc/classes/configuredsource.md b/doc/classes/configuredsource.md index 12570f30..e44fe9ae 100644 --- a/doc/classes/configuredsource.md +++ b/doc/classes/configuredsource.md @@ -51,6 +51,7 @@ * [createWriteStream](configuredsource.md#createwritestream) * [emit](configuredsource.md#emit) * [eventNames](configuredsource.md#eventnames) +* [getAlignment](configuredsource.md#getalignment) * [getBlocks](configuredsource.md#getblocks) * [getBlocksWithChecksumType](configuredsource.md#private-getblockswithchecksumtype) * [getInnerSource](configuredsource.md#getinnersource) @@ -81,7 +82,7 @@ *Overrides [SourceSource](sourcesource.md).[constructor](sourcesource.md#constructor)* -*Defined in [lib/source-destination/configured-source/configured-source.ts:87](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/configured-source/configured-source.ts#L87)* +*Defined in [lib/source-destination/configured-source/configured-source.ts:91](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/configured-source/configured-source.ts#L91)* **Parameters:** @@ -103,7 +104,7 @@ Name | Type | Default | • **checksumType**: *[ChecksumType](../README.md#checksumtype)* -*Defined in [lib/source-destination/configured-source/configured-source.ts:96](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/configured-source/configured-source.ts#L96)* +*Defined in [lib/source-destination/configured-source/configured-source.ts:100](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/configured-source/configured-source.ts#L100)* ___ @@ -111,7 +112,7 @@ ___ • **chunkSize**: *number* -*Defined in [lib/source-destination/configured-source/configured-source.ts:97](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/configured-source/configured-source.ts#L97)* +*Defined in [lib/source-destination/configured-source/configured-source.ts:101](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/configured-source/configured-source.ts#L101)* ___ @@ -119,7 +120,7 @@ ___ • **config**? : *any* -*Defined in [lib/source-destination/configured-source/configured-source.ts:95](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/configured-source/configured-source.ts#L95)* +*Defined in [lib/source-destination/configured-source/configured-source.ts:99](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/configured-source/configured-source.ts#L99)* ___ @@ -127,7 +128,7 @@ ___ • **configure**? : *[ConfigureFunction](../README.md#configurefunction)* -*Defined in [lib/source-destination/configured-source/configured-source.ts:87](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/configured-source/configured-source.ts#L87)* +*Defined in [lib/source-destination/configured-source/configured-source.ts:91](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/configured-source/configured-source.ts#L91)* ___ @@ -135,7 +136,7 @@ ___ • **createStreamFromDisk**: *boolean* -*Defined in [lib/source-destination/configured-source/configured-source.ts:93](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/configured-source/configured-source.ts#L93)* +*Defined in [lib/source-destination/configured-source/configured-source.ts:97](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/configured-source/configured-source.ts#L97)* ___ @@ -143,7 +144,7 @@ ___ • **disk**: *[SourceDisk](sourcedisk.md)* -*Defined in [lib/source-destination/configured-source/configured-source.ts:86](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/configured-source/configured-source.ts#L86)* +*Defined in [lib/source-destination/configured-source/configured-source.ts:90](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/configured-source/configured-source.ts#L90)* ___ @@ -151,7 +152,7 @@ ___ • **shouldTrimPartitions**: *boolean* -*Defined in [lib/source-destination/configured-source/configured-source.ts:92](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/configured-source/configured-source.ts#L92)* +*Defined in [lib/source-destination/configured-source/configured-source.ts:96](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/configured-source/configured-source.ts#L96)* ___ @@ -161,7 +162,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[source](sourcesource.md#protected-source)* -*Defined in [lib/source-destination/source-source.ts:22](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-source.ts#L22)* +*Defined in [lib/source-destination/source-source.ts:22](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-source.ts#L22)* ___ @@ -171,7 +172,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[defaultMaxListeners](countingwritable.md#static-defaultmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:681 +Defined in node_modules/@types/node/base.d.ts:896 ___ @@ -192,7 +193,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[imageExtensions](sourcesource.md#static-imageextensions)* -*Defined in [lib/source-destination/source-destination.ts:232](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L232)* +*Defined in [lib/source-destination/source-destination.ts:252](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L252)* ___ @@ -202,7 +203,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[mimetype](sourcesource.md#static-optional-mimetype)* -*Defined in [lib/source-destination/source-destination.ts:244](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L244)* +*Defined in [lib/source-destination/source-destination.ts:264](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L264)* ___ @@ -212,7 +213,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[requiresRandomReadableSource](sourcesource.md#static-requiresrandomreadablesource)* -*Defined in [lib/source-destination/source-source.ts:20](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-source.ts#L20)* +*Defined in [lib/source-destination/source-source.ts:20](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-source.ts#L20)* ## Methods @@ -222,7 +223,7 @@ ___ *Overrides [SourceSource](sourcesource.md).[_close](sourcesource.md#protected-_close)* -*Defined in [lib/source-destination/configured-source/configured-source.ts:252](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/configured-source/configured-source.ts#L252)* +*Defined in [lib/source-destination/configured-source/configured-source.ts:277](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/configured-source/configured-source.ts#L277)* **Returns:** *Promise‹void›* @@ -234,7 +235,7 @@ ___ *Overrides [SourceSource](sourcesource.md).[_getMetadata](sourcesource.md#protected-_getmetadata)* -*Defined in [lib/source-destination/configured-source/configured-source.ts:196](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/configured-source/configured-source.ts#L196)* +*Defined in [lib/source-destination/configured-source/configured-source.ts:221](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/configured-source/configured-source.ts#L221)* **Returns:** *Promise‹[Metadata](../interfaces/metadata.md)›* @@ -246,7 +247,7 @@ ___ *Overrides [SourceSource](sourcesource.md).[_open](sourcesource.md#protected-_open)* -*Defined in [lib/source-destination/configured-source/configured-source.ts:241](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/configured-source/configured-source.ts#L241)* +*Defined in [lib/source-destination/configured-source/configured-source.ts:266](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/configured-source/configured-source.ts#L266)* **Returns:** *Promise‹void›* @@ -254,20 +255,27 @@ ___ ### addListener -▸ **addListener**(`event`: string | symbol, `listener`: Function): *this* +▸ **addListener**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[addListener](sourcesource.md#addlistener)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[addListener](../interfaces/sparsereadable.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:683 +Defined in node_modules/@types/node/base.d.ts:898 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -279,7 +287,7 @@ ___ *Overrides [SourceSource](sourcesource.md).[canCreateReadStream](sourcesource.md#cancreatereadstream)* -*Defined in [lib/source-destination/configured-source/configured-source.ts:131](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/configured-source/configured-source.ts#L131)* +*Defined in [lib/source-destination/configured-source/configured-source.ts:135](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/configured-source/configured-source.ts#L135)* **Returns:** *Promise‹boolean›* @@ -291,7 +299,7 @@ ___ *Overrides [SourceSource](sourcesource.md).[canCreateSparseReadStream](sourcesource.md#cancreatesparsereadstream)* -*Defined in [lib/source-destination/configured-source/configured-source.ts:135](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/configured-source/configured-source.ts#L135)* +*Defined in [lib/source-destination/configured-source/configured-source.ts:139](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/configured-source/configured-source.ts#L139)* **Returns:** *Promise‹boolean›* @@ -303,7 +311,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[canCreateSparseWriteStream](sourcesource.md#cancreatesparsewritestream)* -*Defined in [lib/source-destination/source-destination.ts:276](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L276)* +*Defined in [lib/source-destination/source-destination.ts:300](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L300)* **Returns:** *Promise‹boolean›* @@ -315,7 +323,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[canCreateWriteStream](sourcesource.md#cancreatewritestream)* -*Defined in [lib/source-destination/source-destination.ts:272](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L272)* +*Defined in [lib/source-destination/source-destination.ts:296](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L296)* **Returns:** *Promise‹boolean›* @@ -327,7 +335,7 @@ ___ *Overrides [SourceSource](sourcesource.md).[canRead](sourcesource.md#canread)* -*Defined in [lib/source-destination/configured-source/configured-source.ts:127](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/configured-source/configured-source.ts#L127)* +*Defined in [lib/source-destination/configured-source/configured-source.ts:131](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/configured-source/configured-source.ts#L131)* **Returns:** *Promise‹boolean›* @@ -339,7 +347,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[canWrite](sourcesource.md#canwrite)* -*Defined in [lib/source-destination/source-destination.ts:260](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L260)* +*Defined in [lib/source-destination/source-destination.ts:284](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L284)* **Returns:** *Promise‹boolean›* @@ -351,7 +359,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[close](sourcesource.md#close)* -*Defined in [lib/source-destination/source-destination.ts:342](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L342)* +*Defined in [lib/source-destination/source-destination.ts:368](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L368)* **Returns:** *Promise‹void›* @@ -359,17 +367,17 @@ ___ ### createReadStream -▸ **createReadStream**(...`args`: any[]): *Promise‹ReadableStream›* +▸ **createReadStream**(`options`: [CreateReadStreamOptions](../interfaces/createreadstreamoptions.md)): *Promise‹ReadableStream›* *Overrides [SourceSource](sourcesource.md).[createReadStream](sourcesource.md#createreadstream)* -*Defined in [lib/source-destination/configured-source/configured-source.ts:148](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/configured-source/configured-source.ts#L148)* +*Defined in [lib/source-destination/configured-source/configured-source.ts:152](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/configured-source/configured-source.ts#L152)* **Parameters:** Name | Type | ------ | ------ | -`...args` | any[] | +`options` | [CreateReadStreamOptions](../interfaces/createreadstreamoptions.md) | **Returns:** *Promise‹ReadableStream›* @@ -377,17 +385,21 @@ ___ ### createSparseReadStream -▸ **createSparseReadStream**(`generateChecksums`: boolean): *Promise‹[SparseReadStream](sparsereadstream.md) | [SparseFilterStream](sparsefilterstream.md)›* +▸ **createSparseReadStream**(`__namedParameters`: object): *Promise‹[SparseReadStream](sparsereadstream.md) | [SparseFilterStream](sparsefilterstream.md)›* *Overrides [SourceSource](sourcesource.md).[createSparseReadStream](sourcesource.md#createsparsereadstream)* -*Defined in [lib/source-destination/configured-source/configured-source.ts:186](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/configured-source/configured-source.ts#L186)* +*Defined in [lib/source-destination/configured-source/configured-source.ts:199](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/configured-source/configured-source.ts#L199)* **Parameters:** -Name | Type | ------- | ------ | -`generateChecksums` | boolean | +▪`Default value` **__namedParameters**: *object*= {} + +Name | Type | Default | +------ | ------ | ------ | +`alignment` | undefined | number | - | +`generateChecksums` | boolean | false | +`numBuffers` | number | 2 | **Returns:** *Promise‹[SparseReadStream](sparsereadstream.md) | [SparseFilterStream](sparsefilterstream.md)›* @@ -395,15 +407,17 @@ ___ ### `Private` createSparseReadStreamFromDisk -▸ **createSparseReadStreamFromDisk**(`generateChecksums`: boolean): *Promise‹[SparseReadStream](sparsereadstream.md)›* +▸ **createSparseReadStreamFromDisk**(`generateChecksums`: boolean, `alignment?`: undefined | number, `numBuffers`: number): *Promise‹[SparseReadStream](sparsereadstream.md)›* -*Defined in [lib/source-destination/configured-source/configured-source.ts:160](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/configured-source/configured-source.ts#L160)* +*Defined in [lib/source-destination/configured-source/configured-source.ts:164](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/configured-source/configured-source.ts#L164)* **Parameters:** -Name | Type | ------- | ------ | -`generateChecksums` | boolean | +Name | Type | Default | +------ | ------ | ------ | +`generateChecksums` | boolean | - | +`alignment?` | undefined | number | - | +`numBuffers` | number | 2 | **Returns:** *Promise‹[SparseReadStream](sparsereadstream.md)›* @@ -411,15 +425,17 @@ ___ ### `Private` createSparseReadStreamFromStream -▸ **createSparseReadStreamFromStream**(`generateChecksums`: boolean): *Promise‹[SparseFilterStream](sparsefilterstream.md)›* +▸ **createSparseReadStreamFromStream**(`generateChecksums`: boolean, `alignment?`: undefined | number, `numBuffers`: number): *Promise‹[SparseFilterStream](sparsefilterstream.md)›* -*Defined in [lib/source-destination/configured-source/configured-source.ts:172](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/configured-source/configured-source.ts#L172)* +*Defined in [lib/source-destination/configured-source/configured-source.ts:180](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/configured-source/configured-source.ts#L180)* **Parameters:** -Name | Type | ------- | ------ | -`generateChecksums` | boolean | +Name | Type | Default | +------ | ------ | ------ | +`generateChecksums` | boolean | - | +`alignment?` | undefined | number | - | +`numBuffers` | number | 2 | **Returns:** *Promise‹[SparseFilterStream](sparsefilterstream.md)›* @@ -427,11 +443,19 @@ ___ ### createSparseWriteStream -▸ **createSparseWriteStream**(): *Promise‹[SparseWritable](../interfaces/sparsewritable.md)›* +▸ **createSparseWriteStream**(`_options`: object): *Promise‹[SparseWritable](../interfaces/sparsewritable.md)›* *Inherited from [SourceSource](sourcesource.md).[createSparseWriteStream](sourcesource.md#createsparsewritestream)* -*Defined in [lib/source-destination/source-destination.ts:331](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L331)* +*Defined in [lib/source-destination/source-destination.ts:355](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L355)* + +**Parameters:** + +▪`Default value` **_options**: *object*= {} + +Name | Type | +------ | ------ | +`highWaterMark?` | undefined | number | **Returns:** *Promise‹[SparseWritable](../interfaces/sparsewritable.md)›* @@ -443,7 +467,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[createVerifier](sourcesource.md#createverifier)* -*Defined in [lib/source-destination/source-destination.ts:357](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L357)* +*Defined in [lib/source-destination/source-destination.ts:383](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L383)* **Parameters:** @@ -458,11 +482,19 @@ ___ ### createWriteStream -▸ **createWriteStream**(): *Promise‹WritableStream›* +▸ **createWriteStream**(`_options`: object): *Promise‹WritableStream›* *Inherited from [SourceSource](sourcesource.md).[createWriteStream](sourcesource.md#createwritestream)* -*Defined in [lib/source-destination/source-destination.ts:327](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L327)* +*Defined in [lib/source-destination/source-destination.ts:349](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L349)* + +**Parameters:** + +▪`Default value` **_options**: *object*= {} + +Name | Type | +------ | ------ | +`highWaterMark?` | undefined | number | **Returns:** *Promise‹WritableStream›* @@ -476,7 +508,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[emit](../interfaces/sparsereadable.md#emit)* -Defined in node_modules/@types/node/base.d.ts:693 +Defined in node_modules/@types/node/base.d.ts:908 **Parameters:** @@ -491,15 +523,27 @@ ___ ### eventNames -▸ **eventNames**(): *string | symbol[]* +▸ **eventNames**(): *Array‹string | symbol›* *Inherited from [CountingWritable](countingwritable.md).[eventNames](countingwritable.md#eventnames)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[eventNames](../interfaces/sparsereadable.md#eventnames)* -Defined in node_modules/@types/node/base.d.ts:694 +Defined in node_modules/@types/node/base.d.ts:909 + +**Returns:** *Array‹string | symbol›* + +___ + +### getAlignment + +▸ **getAlignment**(): *number | undefined* + +*Inherited from [SourceSource](sourcesource.md).[getAlignment](sourcesource.md#getalignment)* -**Returns:** *string | symbol[]* +*Defined in [lib/source-destination/source-destination.ts:276](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L276)* + +**Returns:** *number | undefined* ___ @@ -509,7 +553,7 @@ ___ *Overrides [SourceSource](sourcesource.md).[getBlocks](sourcesource.md#getblocks)* -*Defined in [lib/source-destination/configured-source/configured-source.ts:108](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/configured-source/configured-source.ts#L108)* +*Defined in [lib/source-destination/configured-source/configured-source.ts:112](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/configured-source/configured-source.ts#L112)* **Returns:** *Promise‹[BlocksWithChecksum](../interfaces/blockswithchecksum.md)[]›* @@ -519,7 +563,7 @@ ___ ▸ **getBlocksWithChecksumType**(`generateChecksums`: boolean): *Promise‹[BlocksWithChecksum](../interfaces/blockswithchecksum.md)[]›* -*Defined in [lib/source-destination/configured-source/configured-source.ts:114](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/configured-source/configured-source.ts#L114)* +*Defined in [lib/source-destination/configured-source/configured-source.ts:118](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/configured-source/configured-source.ts#L118)* **Parameters:** @@ -537,7 +581,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[getInnerSource](sourcesource.md#getinnersource)* -*Defined in [lib/source-destination/source-destination.ts:424](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L424)* +*Defined in [lib/source-destination/source-destination.ts:452](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L452)* **Returns:** *Promise‹[SourceDestination](sourcedestination.md)›* @@ -551,7 +595,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[getMaxListeners](../interfaces/sparsereadable.md#getmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:691 +Defined in node_modules/@types/node/base.d.ts:906 **Returns:** *number* @@ -563,7 +607,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[getMetadata](sourcesource.md#getmetadata)* -*Defined in [lib/source-destination/source-destination.ts:280](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L280)* +*Defined in [lib/source-destination/source-destination.ts:304](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L304)* **Returns:** *Promise‹[Metadata](../interfaces/metadata.md)›* @@ -575,7 +619,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[getPartitionTable](sourcesource.md#getpartitiontable)* -*Defined in [lib/source-destination/source-destination.ts:445](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L445)* +*Defined in [lib/source-destination/source-destination.ts:473](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L473)* **Returns:** *Promise‹GetPartitionsResult | undefined›* @@ -589,7 +633,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[listenerCount](../interfaces/sparsereadable.md#listenercount)* -Defined in node_modules/@types/node/base.d.ts:695 +Defined in node_modules/@types/node/base.d.ts:910 **Parameters:** @@ -609,7 +653,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[listeners](../interfaces/sparsereadable.md#listeners)* -Defined in node_modules/@types/node/base.d.ts:692 +Defined in node_modules/@types/node/base.d.ts:907 **Parameters:** @@ -623,20 +667,27 @@ ___ ### on -▸ **on**(`event`: string | symbol, `listener`: Function): *this* +▸ **on**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[on](sourcesource.md#on)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[on](../interfaces/sparsereadable.md#on)* -Defined in node_modules/@types/node/base.d.ts:684 +Defined in node_modules/@types/node/base.d.ts:899 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -644,20 +695,27 @@ ___ ### once -▸ **once**(`event`: string | symbol, `listener`: Function): *this* +▸ **once**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[once](sourcesource.md#once)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[once](../interfaces/sparsereadable.md#once)* -Defined in node_modules/@types/node/base.d.ts:685 +Defined in node_modules/@types/node/base.d.ts:900 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -669,7 +727,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[open](sourcesource.md#open)* -*Defined in [lib/source-destination/source-destination.ts:335](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L335)* +*Defined in [lib/source-destination/source-destination.ts:361](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L361)* **Returns:** *Promise‹void›* @@ -677,20 +735,27 @@ ___ ### prependListener -▸ **prependListener**(`event`: string | symbol, `listener`: Function): *this* +▸ **prependListener**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[prependListener](sourcesource.md#prependlistener)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[prependListener](../interfaces/sparsereadable.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:686 +Defined in node_modules/@types/node/base.d.ts:901 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -698,20 +763,27 @@ ___ ### prependOnceListener -▸ **prependOnceListener**(`event`: string | symbol, `listener`: Function): *this* +▸ **prependOnceListener**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[prependOnceListener](sourcesource.md#prependoncelistener)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[prependOnceListener](../interfaces/sparsereadable.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:687 +Defined in node_modules/@types/node/base.d.ts:902 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -719,17 +791,17 @@ ___ ### read -▸ **read**(`buffer`: Buffer, `bufferOffset`: number, `length`: number, `sourceOffset`: number): *Promise‹ReadResult›* +▸ **read**(`buffer`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer), `bufferOffset`: number, `length`: number, `sourceOffset`: number): *Promise‹ReadResult›* *Overrides [SourceSource](sourcesource.md).[read](sourcesource.md#read)* -*Defined in [lib/source-destination/configured-source/configured-source.ts:139](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/configured-source/configured-source.ts#L139)* +*Defined in [lib/source-destination/configured-source/configured-source.ts:143](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/configured-source/configured-source.ts#L143)* **Parameters:** Name | Type | ------ | ------ | -`buffer` | Buffer | +`buffer` | [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | `bufferOffset` | number | `length` | number | `sourceOffset` | number | @@ -746,7 +818,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[removeAllListeners](../interfaces/sparsereadable.md#removealllisteners)* -Defined in node_modules/@types/node/base.d.ts:689 +Defined in node_modules/@types/node/base.d.ts:904 **Parameters:** @@ -760,20 +832,27 @@ ___ ### removeListener -▸ **removeListener**(`event`: string | symbol, `listener`: Function): *this* +▸ **removeListener**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[removeListener](sourcesource.md#removelistener)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[removeListener](../interfaces/sparsereadable.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:688 +Defined in node_modules/@types/node/base.d.ts:903 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -787,7 +866,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[setMaxListeners](../interfaces/sparsereadable.md#setmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:690 +Defined in node_modules/@types/node/base.d.ts:905 **Parameters:** @@ -803,7 +882,7 @@ ___ ▸ **trimPartitions**(): *Promise‹void›* -*Defined in [lib/source-destination/configured-source/configured-source.ts:203](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/configured-source/configured-source.ts#L203)* +*Defined in [lib/source-destination/configured-source/configured-source.ts:228](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/configured-source/configured-source.ts#L228)* **Returns:** *Promise‹void›* @@ -811,17 +890,17 @@ ___ ### write -▸ **write**(`_buffer`: Buffer, `_bufferOffset`: number, `_length`: number, `_fileOffset`: number): *Promise‹WriteResult›* +▸ **write**(`_buffer`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer), `_bufferOffset`: number, `_length`: number, `_fileOffset`: number): *Promise‹WriteResult›* *Inherited from [SourceSource](sourcesource.md).[write](sourcesource.md#write)* -*Defined in [lib/source-destination/source-destination.ts:300](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L300)* +*Defined in [lib/source-destination/source-destination.ts:324](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L324)* **Parameters:** Name | Type | ------ | ------ | -`_buffer` | Buffer | +`_buffer` | [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | `_bufferOffset` | number | `_length` | number | `_fileOffset` | number | @@ -836,7 +915,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[listenerCount](countingwritable.md#static-listenercount)* -Defined in node_modules/@types/node/base.d.ts:680 +Defined in node_modules/@types/node/base.d.ts:895 **Parameters:** @@ -855,7 +934,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[register](sourcesource.md#static-register)* -*Defined in [lib/source-destination/source-destination.ts:250](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L250)* +*Defined in [lib/source-destination/source-destination.ts:270](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L270)* **Parameters:** diff --git a/doc/classes/countinghashstream.md b/doc/classes/countinghashstream.md index 1868e748..4e9b646e 100644 --- a/doc/classes/countinghashstream.md +++ b/doc/classes/countinghashstream.md @@ -23,15 +23,22 @@ * [bytesWritten](countinghashstream.md#byteswritten) * [readable](countinghashstream.md#readable) +* [readableHighWaterMark](countinghashstream.md#readablehighwatermark) * [writable](countinghashstream.md#writable) +* [writableHighWaterMark](countinghashstream.md#writablehighwatermark) * [defaultMaxListeners](countinghashstream.md#static-defaultmaxlisteners) ### Methods +* [_destroy](countinghashstream.md#_destroy) +* [_final](countinghashstream.md#_final) * [_read](countinghashstream.md#_read) * [_transform](countinghashstream.md#_transform) * [_write](countinghashstream.md#_write) +* [_writev](countinghashstream.md#optional-_writev) * [addListener](countinghashstream.md#addlistener) +* [cork](countinghashstream.md#cork) +* [destroy](countinghashstream.md#destroy) * [emit](countinghashstream.md#emit) * [end](countinghashstream.md#end) * [eventNames](countinghashstream.md#eventnames) @@ -53,6 +60,7 @@ * [setDefaultEncoding](countinghashstream.md#setdefaultencoding) * [setEncoding](countinghashstream.md#setencoding) * [setMaxListeners](countinghashstream.md#setmaxlisteners) +* [uncork](countinghashstream.md#uncork) * [unpipe](countinghashstream.md#unpipe) * [unshift](countinghashstream.md#unshift) * [wrap](countinghashstream.md#wrap) @@ -69,7 +77,7 @@ *Overrides [SourceTransform](../interfaces/sourcetransform.md).[constructor](../interfaces/sourcetransform.md#constructor)* -*Defined in [typings/xxhash/index.d.ts:12](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/typings/xxhash/index.d.ts#L12)* +*Defined in [typings/xxhash/index.d.ts:12](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/typings/xxhash/index.d.ts#L12)* **Parameters:** @@ -87,7 +95,7 @@ Name | Type | • **bytesWritten**: *number* = 0 -*Defined in [lib/source-destination/source-destination.ts:48](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L48)* +*Defined in [lib/source-destination/source-destination.ts:48](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L48)* ___ @@ -97,7 +105,17 @@ ___ *Inherited from [SparseFilterStream](sparsefilterstream.md).[readable](sparsefilterstream.md#readable)* -Defined in node_modules/@types/node/base.d.ts:3688 +Defined in node_modules/@types/node/base.d.ts:5422 + +___ + +### readableHighWaterMark + +• **readableHighWaterMark**: *number* + +*Inherited from [SparseFilterStream](sparsefilterstream.md).[readableHighWaterMark](sparsefilterstream.md#readablehighwatermark)* + +Defined in node_modules/@types/node/base.d.ts:5423 ___ @@ -107,7 +125,17 @@ ___ *Inherited from [SparseFilterStream](sparsefilterstream.md).[writable](sparsefilterstream.md#writable)* -Defined in node_modules/@types/node/base.d.ts:3855 +Defined in node_modules/@types/node/base.d.ts:5600 + +___ + +### writableHighWaterMark + +• **writableHighWaterMark**: *number* + +*Inherited from [SparseFilterStream](sparsefilterstream.md).[writableHighWaterMark](sparsefilterstream.md#writablehighwatermark)* + +Defined in node_modules/@types/node/base.d.ts:5601 ___ @@ -117,17 +145,63 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[defaultMaxListeners](countingwritable.md#static-defaultmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:681 +Defined in node_modules/@types/node/base.d.ts:896 ## Methods +### _destroy + +▸ **_destroy**(`error`: [Error](notcapable.md#static-error) | null, `callback`: function): *void* + +*Inherited from [SparseFilterStream](sparsefilterstream.md).[_destroy](sparsefilterstream.md#_destroy)* + +*Overrides [SparseReadStream](sparsereadstream.md).[_destroy](sparsereadstream.md#_destroy)* + +Defined in node_modules/@types/node/base.d.ts:5605 + +**Parameters:** + +▪ **error**: *[Error](notcapable.md#static-error) | null* + +▪ **callback**: *function* + +▸ (`error?`: [Error](notcapable.md#static-error)): *void* + +**Parameters:** + +Name | Type | +------ | ------ | +`error?` | [Error](notcapable.md#static-error) | + +**Returns:** *void* + +___ + +### _final + +▸ **_final**(`callback`: Function): *void* + +*Inherited from [SparseFilterStream](sparsefilterstream.md).[_final](sparsefilterstream.md#_final)* + +Defined in node_modules/@types/node/base.d.ts:5606 + +**Parameters:** + +Name | Type | +------ | ------ | +`callback` | Function | + +**Returns:** *void* + +___ + ### _read ▸ **_read**(`size`: number): *void* *Inherited from [SparseFilterStream](sparsefilterstream.md).[_read](sparsefilterstream.md#_read)* -Defined in node_modules/@types/node/base.d.ts:3690 +Defined in node_modules/@types/node/base.d.ts:5425 **Parameters:** @@ -141,15 +215,15 @@ ___ ### _transform -▸ **_transform**(`chunk`: Buffer, `encoding`: string, `callback`: function): *void* +▸ **_transform**(`chunk`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer), `encoding`: string, `callback`: function): *void* *Overrides [SourceTransform](../interfaces/sourcetransform.md).[_transform](../interfaces/sourcetransform.md#_transform)* -*Defined in [lib/source-destination/source-destination.ts:50](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L50)* +*Defined in [lib/source-destination/source-destination.ts:50](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L50)* **Parameters:** -▪ **chunk**: *Buffer* +▪ **chunk**: *[Buffer](../interfaces/alignedlockablebuffer.md#buffer)* ▪ **encoding**: *string* @@ -163,19 +237,53 @@ ___ ### _write -▸ **_write**(`chunk`: any, `encoding`: string, `callback`: Function): *void* +▸ **_write**(`chunk`: any, `encoding`: string, `callback`: function): *void* *Inherited from [SparseFilterStream](sparsefilterstream.md).[_write](sparsefilterstream.md#_write)* -Defined in node_modules/@types/node/base.d.ts:3857 +Defined in node_modules/@types/node/base.d.ts:5603 + +**Parameters:** + +▪ **chunk**: *any* + +▪ **encoding**: *string* + +▪ **callback**: *function* + +▸ (`err?`: [Error](notcapable.md#static-error)): *void* **Parameters:** Name | Type | ------ | ------ | -`chunk` | any | -`encoding` | string | -`callback` | Function | +`err?` | [Error](notcapable.md#static-error) | + +**Returns:** *void* + +___ + +### `Optional` _writev + +▸ **_writev**(`chunks`: Array‹object›, `callback`: function): *void* + +*Inherited from [SparseFilterStream](sparsefilterstream.md).[_writev](sparsefilterstream.md#optional-_writev)* + +Defined in node_modules/@types/node/base.d.ts:5604 + +**Parameters:** + +▪ **chunks**: *Array‹object›* + +▪ **callback**: *function* + +▸ (`err?`: [Error](notcapable.md#static-error)): *void* + +**Parameters:** + +Name | Type | +------ | ------ | +`err?` | [Error](notcapable.md#static-error) | **Returns:** *void* @@ -183,28 +291,35 @@ ___ ### addListener -▸ **addListener**(`event`: string, `listener`: Function): *this* +▸ **addListener**(`event`: string, `listener`: function): *this* *Inherited from [SparseFilterStream](sparsefilterstream.md).[addListener](sparsefilterstream.md#addlistener)* *Overrides [SourceSource](sourcesource.md).[addListener](sourcesource.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:3711 +Defined in node_modules/@types/node/base.d.ts:5447 Event emitter The defined events on documents including: - 1. close - 2. data - 3. end - 4. readable - 5. error +1. close +2. data +3. end +4. readable +5. error + +**Parameters:** + +▪ **event**: *string* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -214,7 +329,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[addListener](sourcesource.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:3712 +Defined in node_modules/@types/node/base.d.ts:5448 **Parameters:** @@ -232,7 +347,7 @@ Defined in node_modules/@types/node/base.d.ts:3712 *Overrides [SourceSource](sourcesource.md).[addListener](sourcesource.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:3713 +Defined in node_modules/@types/node/base.d.ts:5449 **Parameters:** @@ -240,13 +355,13 @@ Defined in node_modules/@types/node/base.d.ts:3713 ▪ **listener**: *function* -▸ (`chunk`: Buffer | string): *void* +▸ (`chunk`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string): *void* **Parameters:** Name | Type | ------ | ------ | -`chunk` | Buffer | string | +`chunk` | [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string | **Returns:** *this* @@ -256,7 +371,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[addListener](sourcesource.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:3714 +Defined in node_modules/@types/node/base.d.ts:5450 **Parameters:** @@ -274,7 +389,7 @@ Defined in node_modules/@types/node/base.d.ts:3714 *Overrides [SourceSource](sourcesource.md).[addListener](sourcesource.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:3715 +Defined in node_modules/@types/node/base.d.ts:5451 **Parameters:** @@ -292,7 +407,7 @@ Defined in node_modules/@types/node/base.d.ts:3715 *Overrides [SourceSource](sourcesource.md).[addListener](sourcesource.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:3716 +Defined in node_modules/@types/node/base.d.ts:5452 **Parameters:** @@ -312,6 +427,38 @@ Name | Type | ___ +### cork + +▸ **cork**(): *void* + +*Inherited from [SparseFilterStream](sparsefilterstream.md).[cork](sparsefilterstream.md#cork)* + +Defined in node_modules/@types/node/base.d.ts:5613 + +**Returns:** *void* + +___ + +### destroy + +▸ **destroy**(`error?`: [Error](notcapable.md#static-error)): *void* + +*Inherited from [SparseFilterStream](sparsefilterstream.md).[destroy](sparsefilterstream.md#destroy)* + +*Overrides [SparseReadStream](sparsereadstream.md).[destroy](sparsereadstream.md#destroy)* + +Defined in node_modules/@types/node/base.d.ts:5625 + +**Parameters:** + +Name | Type | +------ | ------ | +`error?` | [Error](notcapable.md#static-error) | + +**Returns:** *void* + +___ + ### emit ▸ **emit**(`event`: string | symbol, ...`args`: any[]): *boolean* @@ -320,7 +467,7 @@ ___ *Overrides [SourceSource](sourcesource.md).[emit](sourcesource.md#emit)* -Defined in node_modules/@types/node/base.d.ts:3718 +Defined in node_modules/@types/node/base.d.ts:5454 **Parameters:** @@ -337,7 +484,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[emit](sourcesource.md#emit)* -Defined in node_modules/@types/node/base.d.ts:3719 +Defined in node_modules/@types/node/base.d.ts:5455 **Parameters:** @@ -347,20 +494,20 @@ Name | Type | **Returns:** *boolean* -▸ **emit**(`event`: "data", `chunk`: Buffer | string): *boolean* +▸ **emit**(`event`: "data", `chunk`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string): *boolean* *Inherited from [SparseFilterStream](sparsefilterstream.md).[emit](sparsefilterstream.md#emit)* *Overrides [SourceSource](sourcesource.md).[emit](sourcesource.md#emit)* -Defined in node_modules/@types/node/base.d.ts:3720 +Defined in node_modules/@types/node/base.d.ts:5456 **Parameters:** Name | Type | ------ | ------ | `event` | "data" | -`chunk` | Buffer | string | +`chunk` | [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string | **Returns:** *boolean* @@ -370,7 +517,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[emit](sourcesource.md#emit)* -Defined in node_modules/@types/node/base.d.ts:3721 +Defined in node_modules/@types/node/base.d.ts:5457 **Parameters:** @@ -386,7 +533,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[emit](sourcesource.md#emit)* -Defined in node_modules/@types/node/base.d.ts:3722 +Defined in node_modules/@types/node/base.d.ts:5458 **Parameters:** @@ -402,7 +549,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[emit](sourcesource.md#emit)* -Defined in node_modules/@types/node/base.d.ts:3723 +Defined in node_modules/@types/node/base.d.ts:5459 **Parameters:** @@ -421,7 +568,7 @@ ___ *Inherited from [SparseFilterStream](sparsefilterstream.md).[end](sparsefilterstream.md#end)* -Defined in node_modules/@types/node/base.d.ts:3861 +Defined in node_modules/@types/node/base.d.ts:5610 **Parameters:** @@ -435,7 +582,7 @@ Name | Type | *Inherited from [SparseFilterStream](sparsefilterstream.md).[end](sparsefilterstream.md#end)* -Defined in node_modules/@types/node/base.d.ts:3862 +Defined in node_modules/@types/node/base.d.ts:5611 **Parameters:** @@ -450,7 +597,7 @@ Name | Type | *Inherited from [SparseFilterStream](sparsefilterstream.md).[end](sparsefilterstream.md#end)* -Defined in node_modules/@types/node/base.d.ts:3863 +Defined in node_modules/@types/node/base.d.ts:5612 **Parameters:** @@ -466,13 +613,13 @@ ___ ### eventNames -▸ **eventNames**(): *string | symbol[]* +▸ **eventNames**(): *Array‹string | symbol›* *Inherited from [CountingWritable](countingwritable.md).[eventNames](countingwritable.md#eventnames)* -Defined in node_modules/@types/node/base.d.ts:694 +Defined in node_modules/@types/node/base.d.ts:909 -**Returns:** *string | symbol[]* +**Returns:** *Array‹string | symbol›* ___ @@ -482,7 +629,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[getMaxListeners](countingwritable.md#getmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:691 +Defined in node_modules/@types/node/base.d.ts:906 **Returns:** *number* @@ -494,7 +641,7 @@ ___ *Inherited from [SparseFilterStream](sparsefilterstream.md).[isPaused](sparsefilterstream.md#ispaused)* -Defined in node_modules/@types/node/base.d.ts:3695 +Defined in node_modules/@types/node/base.d.ts:5430 **Returns:** *boolean* @@ -506,7 +653,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[listenerCount](countingwritable.md#static-listenercount)* -Defined in node_modules/@types/node/base.d.ts:695 +Defined in node_modules/@types/node/base.d.ts:910 **Parameters:** @@ -524,7 +671,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[listeners](countingwritable.md#listeners)* -Defined in node_modules/@types/node/base.d.ts:692 +Defined in node_modules/@types/node/base.d.ts:907 **Parameters:** @@ -538,20 +685,27 @@ ___ ### on -▸ **on**(`event`: string, `listener`: Function): *this* +▸ **on**(`event`: string, `listener`: function): *this* *Inherited from [SparseFilterStream](sparsefilterstream.md).[on](sparsefilterstream.md#on)* *Overrides [SourceSource](sourcesource.md).[on](sourcesource.md#on)* -Defined in node_modules/@types/node/base.d.ts:3725 +Defined in node_modules/@types/node/base.d.ts:5461 + +**Parameters:** + +▪ **event**: *string* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -561,7 +715,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[on](sourcesource.md#on)* -Defined in node_modules/@types/node/base.d.ts:3726 +Defined in node_modules/@types/node/base.d.ts:5462 **Parameters:** @@ -579,7 +733,7 @@ Defined in node_modules/@types/node/base.d.ts:3726 *Overrides [SourceSource](sourcesource.md).[on](sourcesource.md#on)* -Defined in node_modules/@types/node/base.d.ts:3727 +Defined in node_modules/@types/node/base.d.ts:5463 **Parameters:** @@ -587,13 +741,13 @@ Defined in node_modules/@types/node/base.d.ts:3727 ▪ **listener**: *function* -▸ (`chunk`: Buffer | string): *void* +▸ (`chunk`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string): *void* **Parameters:** Name | Type | ------ | ------ | -`chunk` | Buffer | string | +`chunk` | [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string | **Returns:** *this* @@ -603,7 +757,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[on](sourcesource.md#on)* -Defined in node_modules/@types/node/base.d.ts:3728 +Defined in node_modules/@types/node/base.d.ts:5464 **Parameters:** @@ -621,7 +775,7 @@ Defined in node_modules/@types/node/base.d.ts:3728 *Overrides [SourceSource](sourcesource.md).[on](sourcesource.md#on)* -Defined in node_modules/@types/node/base.d.ts:3729 +Defined in node_modules/@types/node/base.d.ts:5465 **Parameters:** @@ -639,7 +793,7 @@ Defined in node_modules/@types/node/base.d.ts:3729 *Overrides [SourceSource](sourcesource.md).[on](sourcesource.md#on)* -Defined in node_modules/@types/node/base.d.ts:3730 +Defined in node_modules/@types/node/base.d.ts:5466 **Parameters:** @@ -661,20 +815,27 @@ ___ ### once -▸ **once**(`event`: string, `listener`: Function): *this* +▸ **once**(`event`: string, `listener`: function): *this* *Inherited from [SparseFilterStream](sparsefilterstream.md).[once](sparsefilterstream.md#once)* *Overrides [SourceSource](sourcesource.md).[once](sourcesource.md#once)* -Defined in node_modules/@types/node/base.d.ts:3732 +Defined in node_modules/@types/node/base.d.ts:5468 + +**Parameters:** + +▪ **event**: *string* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -684,7 +845,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[once](sourcesource.md#once)* -Defined in node_modules/@types/node/base.d.ts:3733 +Defined in node_modules/@types/node/base.d.ts:5469 **Parameters:** @@ -702,7 +863,7 @@ Defined in node_modules/@types/node/base.d.ts:3733 *Overrides [SourceSource](sourcesource.md).[once](sourcesource.md#once)* -Defined in node_modules/@types/node/base.d.ts:3734 +Defined in node_modules/@types/node/base.d.ts:5470 **Parameters:** @@ -710,13 +871,13 @@ Defined in node_modules/@types/node/base.d.ts:3734 ▪ **listener**: *function* -▸ (`chunk`: Buffer | string): *void* +▸ (`chunk`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string): *void* **Parameters:** Name | Type | ------ | ------ | -`chunk` | Buffer | string | +`chunk` | [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string | **Returns:** *this* @@ -726,7 +887,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[once](sourcesource.md#once)* -Defined in node_modules/@types/node/base.d.ts:3735 +Defined in node_modules/@types/node/base.d.ts:5471 **Parameters:** @@ -744,7 +905,7 @@ Defined in node_modules/@types/node/base.d.ts:3735 *Overrides [SourceSource](sourcesource.md).[once](sourcesource.md#once)* -Defined in node_modules/@types/node/base.d.ts:3736 +Defined in node_modules/@types/node/base.d.ts:5472 **Parameters:** @@ -762,7 +923,7 @@ Defined in node_modules/@types/node/base.d.ts:3736 *Overrides [SourceSource](sourcesource.md).[once](sourcesource.md#once)* -Defined in node_modules/@types/node/base.d.ts:3737 +Defined in node_modules/@types/node/base.d.ts:5473 **Parameters:** @@ -788,7 +949,7 @@ ___ *Inherited from [SparseFilterStream](sparsefilterstream.md).[pause](sparsefilterstream.md#pause)* -Defined in node_modules/@types/node/base.d.ts:3693 +Defined in node_modules/@types/node/base.d.ts:5428 **Returns:** *this* @@ -798,11 +959,9 @@ ___ ▸ **pipe**<**T**>(`destination`: T, `options?`: undefined | object): *T* -*Inherited from [SparseFilterStream](sparsefilterstream.md).[pipe](sparsefilterstream.md#pipe)* +*Inherited from [CountingWritable](countingwritable.md).[pipe](countingwritable.md#pipe)* -*Overrides [CountingWritable](countingwritable.md).[pipe](countingwritable.md#pipe)* - -Defined in node_modules/@types/node/base.d.ts:3696 +Defined in node_modules/@types/node/base.d.ts:5407 **Type parameters:** @@ -821,20 +980,27 @@ ___ ### prependListener -▸ **prependListener**(`event`: string, `listener`: Function): *this* +▸ **prependListener**(`event`: string, `listener`: function): *this* *Inherited from [SparseFilterStream](sparsefilterstream.md).[prependListener](sparsefilterstream.md#prependlistener)* *Overrides [SourceSource](sourcesource.md).[prependListener](sourcesource.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:3739 +Defined in node_modules/@types/node/base.d.ts:5475 + +**Parameters:** + +▪ **event**: *string* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -844,7 +1010,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[prependListener](sourcesource.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:3740 +Defined in node_modules/@types/node/base.d.ts:5476 **Parameters:** @@ -862,7 +1028,7 @@ Defined in node_modules/@types/node/base.d.ts:3740 *Overrides [SourceSource](sourcesource.md).[prependListener](sourcesource.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:3741 +Defined in node_modules/@types/node/base.d.ts:5477 **Parameters:** @@ -870,13 +1036,13 @@ Defined in node_modules/@types/node/base.d.ts:3741 ▪ **listener**: *function* -▸ (`chunk`: Buffer | string): *void* +▸ (`chunk`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string): *void* **Parameters:** Name | Type | ------ | ------ | -`chunk` | Buffer | string | +`chunk` | [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string | **Returns:** *this* @@ -886,7 +1052,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[prependListener](sourcesource.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:3742 +Defined in node_modules/@types/node/base.d.ts:5478 **Parameters:** @@ -904,7 +1070,7 @@ Defined in node_modules/@types/node/base.d.ts:3742 *Overrides [SourceSource](sourcesource.md).[prependListener](sourcesource.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:3743 +Defined in node_modules/@types/node/base.d.ts:5479 **Parameters:** @@ -922,7 +1088,7 @@ Defined in node_modules/@types/node/base.d.ts:3743 *Overrides [SourceSource](sourcesource.md).[prependListener](sourcesource.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:3744 +Defined in node_modules/@types/node/base.d.ts:5480 **Parameters:** @@ -944,20 +1110,27 @@ ___ ### prependOnceListener -▸ **prependOnceListener**(`event`: string, `listener`: Function): *this* +▸ **prependOnceListener**(`event`: string, `listener`: function): *this* *Inherited from [SparseFilterStream](sparsefilterstream.md).[prependOnceListener](sparsefilterstream.md#prependoncelistener)* *Overrides [SourceSource](sourcesource.md).[prependOnceListener](sourcesource.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:3746 +Defined in node_modules/@types/node/base.d.ts:5482 + +**Parameters:** + +▪ **event**: *string* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -967,7 +1140,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[prependOnceListener](sourcesource.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:3747 +Defined in node_modules/@types/node/base.d.ts:5483 **Parameters:** @@ -985,7 +1158,7 @@ Defined in node_modules/@types/node/base.d.ts:3747 *Overrides [SourceSource](sourcesource.md).[prependOnceListener](sourcesource.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:3748 +Defined in node_modules/@types/node/base.d.ts:5484 **Parameters:** @@ -993,13 +1166,13 @@ Defined in node_modules/@types/node/base.d.ts:3748 ▪ **listener**: *function* -▸ (`chunk`: Buffer | string): *void* +▸ (`chunk`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string): *void* **Parameters:** Name | Type | ------ | ------ | -`chunk` | Buffer | string | +`chunk` | [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string | **Returns:** *this* @@ -1009,7 +1182,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[prependOnceListener](sourcesource.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:3749 +Defined in node_modules/@types/node/base.d.ts:5485 **Parameters:** @@ -1027,7 +1200,7 @@ Defined in node_modules/@types/node/base.d.ts:3749 *Overrides [SourceSource](sourcesource.md).[prependOnceListener](sourcesource.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:3750 +Defined in node_modules/@types/node/base.d.ts:5486 **Parameters:** @@ -1045,7 +1218,7 @@ Defined in node_modules/@types/node/base.d.ts:3750 *Overrides [SourceSource](sourcesource.md).[prependOnceListener](sourcesource.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:3751 +Defined in node_modules/@types/node/base.d.ts:5487 **Parameters:** @@ -1071,7 +1244,7 @@ ___ *Inherited from [SparseFilterStream](sparsefilterstream.md).[push](sparsefilterstream.md#push)* -Defined in node_modules/@types/node/base.d.ts:3700 +Defined in node_modules/@types/node/base.d.ts:5434 **Parameters:** @@ -1090,7 +1263,7 @@ ___ *Inherited from [SparseFilterStream](sparsefilterstream.md).[read](sparsefilterstream.md#read)* -Defined in node_modules/@types/node/base.d.ts:3691 +Defined in node_modules/@types/node/base.d.ts:5426 **Parameters:** @@ -1108,7 +1281,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[removeAllListeners](countingwritable.md#removealllisteners)* -Defined in node_modules/@types/node/base.d.ts:689 +Defined in node_modules/@types/node/base.d.ts:904 **Parameters:** @@ -1122,20 +1295,27 @@ ___ ### removeListener -▸ **removeListener**(`event`: string, `listener`: Function): *this* +▸ **removeListener**(`event`: string, `listener`: function): *this* *Inherited from [SparseFilterStream](sparsefilterstream.md).[removeListener](sparsefilterstream.md#removelistener)* *Overrides [SourceSource](sourcesource.md).[removeListener](sourcesource.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:3753 +Defined in node_modules/@types/node/base.d.ts:5489 + +**Parameters:** + +▪ **event**: *string* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -1145,7 +1325,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[removeListener](sourcesource.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:3754 +Defined in node_modules/@types/node/base.d.ts:5490 **Parameters:** @@ -1163,7 +1343,7 @@ Defined in node_modules/@types/node/base.d.ts:3754 *Overrides [SourceSource](sourcesource.md).[removeListener](sourcesource.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:3755 +Defined in node_modules/@types/node/base.d.ts:5491 **Parameters:** @@ -1171,13 +1351,13 @@ Defined in node_modules/@types/node/base.d.ts:3755 ▪ **listener**: *function* -▸ (`chunk`: Buffer | string): *void* +▸ (`chunk`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string): *void* **Parameters:** Name | Type | ------ | ------ | -`chunk` | Buffer | string | +`chunk` | [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string | **Returns:** *this* @@ -1187,7 +1367,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[removeListener](sourcesource.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:3756 +Defined in node_modules/@types/node/base.d.ts:5492 **Parameters:** @@ -1205,7 +1385,7 @@ Defined in node_modules/@types/node/base.d.ts:3756 *Overrides [SourceSource](sourcesource.md).[removeListener](sourcesource.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:3757 +Defined in node_modules/@types/node/base.d.ts:5493 **Parameters:** @@ -1223,7 +1403,7 @@ Defined in node_modules/@types/node/base.d.ts:3757 *Overrides [SourceSource](sourcesource.md).[removeListener](sourcesource.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:3758 +Defined in node_modules/@types/node/base.d.ts:5494 **Parameters:** @@ -1249,7 +1429,7 @@ ___ *Inherited from [SparseFilterStream](sparsefilterstream.md).[resume](sparsefilterstream.md#resume)* -Defined in node_modules/@types/node/base.d.ts:3694 +Defined in node_modules/@types/node/base.d.ts:5429 **Returns:** *this* @@ -1261,7 +1441,7 @@ ___ *Inherited from [SparseFilterStream](sparsefilterstream.md).[setDefaultEncoding](sparsefilterstream.md#setdefaultencoding)* -Defined in node_modules/@types/node/base.d.ts:3860 +Defined in node_modules/@types/node/base.d.ts:5609 **Parameters:** @@ -1275,11 +1455,11 @@ ___ ### setEncoding -▸ **setEncoding**(`encoding`: string): *void* +▸ **setEncoding**(`encoding`: string): *this* *Inherited from [SparseFilterStream](sparsefilterstream.md).[setEncoding](sparsefilterstream.md#setencoding)* -Defined in node_modules/@types/node/base.d.ts:3692 +Defined in node_modules/@types/node/base.d.ts:5427 **Parameters:** @@ -1287,7 +1467,7 @@ Name | Type | ------ | ------ | `encoding` | string | -**Returns:** *void* +**Returns:** *this* ___ @@ -1297,7 +1477,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[setMaxListeners](countingwritable.md#setmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:690 +Defined in node_modules/@types/node/base.d.ts:905 **Parameters:** @@ -1309,13 +1489,25 @@ Name | Type | ___ +### uncork + +▸ **uncork**(): *void* + +*Inherited from [SparseFilterStream](sparsefilterstream.md).[uncork](sparsefilterstream.md#uncork)* + +Defined in node_modules/@types/node/base.d.ts:5614 + +**Returns:** *void* + +___ + ### unpipe -▸ **unpipe**<**T**>(`destination?`: T): *void* +▸ **unpipe**<**T**>(`destination?`: T): *this* *Inherited from [SparseFilterStream](sparsefilterstream.md).[unpipe](sparsefilterstream.md#unpipe)* -Defined in node_modules/@types/node/base.d.ts:3697 +Defined in node_modules/@types/node/base.d.ts:5431 **Type parameters:** @@ -1327,7 +1519,7 @@ Name | Type | ------ | ------ | `destination?` | T | -**Returns:** *void* +**Returns:** *this* ___ @@ -1337,7 +1529,7 @@ ___ *Inherited from [SparseFilterStream](sparsefilterstream.md).[unshift](sparsefilterstream.md#unshift)* -Defined in node_modules/@types/node/base.d.ts:3698 +Defined in node_modules/@types/node/base.d.ts:5432 **Parameters:** @@ -1351,11 +1543,11 @@ ___ ### wrap -▸ **wrap**(`oldStream`: ReadableStream): *Readable* +▸ **wrap**(`oldStream`: ReadableStream): *this* *Inherited from [SparseFilterStream](sparsefilterstream.md).[wrap](sparsefilterstream.md#wrap)* -Defined in node_modules/@types/node/base.d.ts:3699 +Defined in node_modules/@types/node/base.d.ts:5433 **Parameters:** @@ -1363,7 +1555,7 @@ Name | Type | ------ | ------ | `oldStream` | ReadableStream | -**Returns:** *Readable* +**Returns:** *this* ___ @@ -1373,7 +1565,7 @@ ___ *Inherited from [SparseFilterStream](sparsefilterstream.md).[write](sparsefilterstream.md#write)* -Defined in node_modules/@types/node/base.d.ts:3858 +Defined in node_modules/@types/node/base.d.ts:5607 **Parameters:** @@ -1388,7 +1580,7 @@ Name | Type | *Inherited from [SparseFilterStream](sparsefilterstream.md).[write](sparsefilterstream.md#write)* -Defined in node_modules/@types/node/base.d.ts:3859 +Defined in node_modules/@types/node/base.d.ts:5608 **Parameters:** @@ -1408,7 +1600,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[listenerCount](countingwritable.md#static-listenercount)* -Defined in node_modules/@types/node/base.d.ts:680 +Defined in node_modules/@types/node/base.d.ts:895 **Parameters:** diff --git a/doc/classes/countingwritable.md b/doc/classes/countingwritable.md index 046596dc..0e59c20f 100644 --- a/doc/classes/countingwritable.md +++ b/doc/classes/countingwritable.md @@ -23,12 +23,18 @@ * [bytesWritten](countingwritable.md#byteswritten) * [position](countingwritable.md#position) * [writable](countingwritable.md#writable) +* [writableHighWaterMark](countingwritable.md#writablehighwatermark) * [defaultMaxListeners](countingwritable.md#static-defaultmaxlisteners) ### Methods +* [_destroy](countingwritable.md#_destroy) +* [_final](countingwritable.md#_final) * [_write](countingwritable.md#_write) +* [_writev](countingwritable.md#optional-_writev) * [addListener](countingwritable.md#addlistener) +* [cork](countingwritable.md#cork) +* [destroy](countingwritable.md#destroy) * [emit](countingwritable.md#emit) * [end](countingwritable.md#end) * [eventNames](countingwritable.md#eventnames) @@ -44,6 +50,7 @@ * [removeListener](countingwritable.md#removelistener) * [setDefaultEncoding](countingwritable.md#setdefaultencoding) * [setMaxListeners](countingwritable.md#setmaxlisteners) +* [uncork](countingwritable.md#uncork) * [write](countingwritable.md#write) * [listenerCount](countingwritable.md#static-listenercount) @@ -55,7 +62,7 @@ *Inherited from [CountingWritable](countingwritable.md).[constructor](countingwritable.md#constructor)* -Defined in node_modules/@types/node/base.d.ts:3770 +Defined in node_modules/@types/node/base.d.ts:5509 **Parameters:** @@ -71,7 +78,7 @@ Name | Type | • **bytesWritten**: *number* = 0 -*Defined in [lib/source-destination/progress.ts:92](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/progress.ts#L92)* +*Defined in [lib/source-destination/progress.ts:92](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/progress.ts#L92)* ___ @@ -79,7 +86,7 @@ ___ • **position**: *number | undefined* -*Defined in [lib/source-destination/progress.ts:93](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/progress.ts#L93)* +*Defined in [lib/source-destination/progress.ts:93](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/progress.ts#L93)* ___ @@ -89,7 +96,17 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[writable](countingwritable.md#writable)* -Defined in node_modules/@types/node/base.d.ts:3770 +Defined in node_modules/@types/node/base.d.ts:5508 + +___ + +### writableHighWaterMark + +• **writableHighWaterMark**: *number* + +*Inherited from [CountingWritable](countingwritable.md).[writableHighWaterMark](countingwritable.md#writablehighwatermark)* + +Defined in node_modules/@types/node/base.d.ts:5509 ___ @@ -99,21 +116,65 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[defaultMaxListeners](countingwritable.md#static-defaultmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:681 +Defined in node_modules/@types/node/base.d.ts:896 ## Methods +### _destroy + +▸ **_destroy**(`error`: [Error](notcapable.md#static-error) | null, `callback`: function): *void* + +*Inherited from [CountingWritable](countingwritable.md).[_destroy](countingwritable.md#_destroy)* + +Defined in node_modules/@types/node/base.d.ts:5513 + +**Parameters:** + +▪ **error**: *[Error](notcapable.md#static-error) | null* + +▪ **callback**: *function* + +▸ (`error?`: [Error](notcapable.md#static-error)): *void* + +**Parameters:** + +Name | Type | +------ | ------ | +`error?` | [Error](notcapable.md#static-error) | + +**Returns:** *void* + +___ + +### _final + +▸ **_final**(`callback`: Function): *void* + +*Inherited from [CountingWritable](countingwritable.md).[_final](countingwritable.md#_final)* + +Defined in node_modules/@types/node/base.d.ts:5514 + +**Parameters:** + +Name | Type | +------ | ------ | +`callback` | Function | + +**Returns:** *void* + +___ + ### _write -▸ **_write**(`chunk`: Buffer | Chunk, `_enc`: string, `callback`: function): *void* +▸ **_write**(`chunk`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | Chunk, `_enc`: string, `callback`: function): *void* *Overrides void* -*Defined in [lib/source-destination/progress.ts:95](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/progress.ts#L95)* +*Defined in [lib/source-destination/progress.ts:95](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/progress.ts#L95)* **Parameters:** -▪ **chunk**: *Buffer | Chunk* +▪ **chunk**: *[Buffer](../interfaces/alignedlockablebuffer.md#buffer) | Chunk* ▪ **_enc**: *string* @@ -131,31 +192,64 @@ Name | Type | ___ +### `Optional` _writev + +▸ **_writev**(`chunks`: Array‹object›, `callback`: function): *void* + +*Inherited from [CountingWritable](countingwritable.md).[_writev](countingwritable.md#optional-_writev)* + +Defined in node_modules/@types/node/base.d.ts:5512 + +**Parameters:** + +▪ **chunks**: *Array‹object›* + +▪ **callback**: *function* + +▸ (`err?`: [Error](notcapable.md#static-error)): *void* + +**Parameters:** + +Name | Type | +------ | ------ | +`err?` | [Error](notcapable.md#static-error) | + +**Returns:** *void* + +___ + ### addListener -▸ **addListener**(`event`: string, `listener`: Function): *this* +▸ **addListener**(`event`: string, `listener`: function): *this* *Inherited from [CountingWritable](countingwritable.md).[addListener](countingwritable.md#addlistener)* *Overrides [SourceSource](sourcesource.md).[addListener](sourcesource.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:3790 +Defined in node_modules/@types/node/base.d.ts:5535 Event emitter The defined events on documents including: - 1. close - 2. drain - 3. error - 4. finish - 5. pipe - 6. unpipe +1. close +2. drain +3. error +4. finish +5. pipe +6. unpipe + +**Parameters:** + +▪ **event**: *string* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -165,7 +259,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[addListener](sourcesource.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:3791 +Defined in node_modules/@types/node/base.d.ts:5536 **Parameters:** @@ -183,7 +277,7 @@ Defined in node_modules/@types/node/base.d.ts:3791 *Overrides [SourceSource](sourcesource.md).[addListener](sourcesource.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:3792 +Defined in node_modules/@types/node/base.d.ts:5537 **Parameters:** @@ -201,7 +295,7 @@ Defined in node_modules/@types/node/base.d.ts:3792 *Overrides [SourceSource](sourcesource.md).[addListener](sourcesource.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:3793 +Defined in node_modules/@types/node/base.d.ts:5538 **Parameters:** @@ -225,7 +319,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[addListener](sourcesource.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:3794 +Defined in node_modules/@types/node/base.d.ts:5539 **Parameters:** @@ -243,7 +337,7 @@ Defined in node_modules/@types/node/base.d.ts:3794 *Overrides [SourceSource](sourcesource.md).[addListener](sourcesource.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:3795 +Defined in node_modules/@types/node/base.d.ts:5540 **Parameters:** @@ -267,7 +361,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[addListener](sourcesource.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:3796 +Defined in node_modules/@types/node/base.d.ts:5541 **Parameters:** @@ -287,6 +381,36 @@ Name | Type | ___ +### cork + +▸ **cork**(): *void* + +*Inherited from [CountingWritable](countingwritable.md).[cork](countingwritable.md#cork)* + +Defined in node_modules/@types/node/base.d.ts:5521 + +**Returns:** *void* + +___ + +### destroy + +▸ **destroy**(`error?`: [Error](notcapable.md#static-error)): *void* + +*Inherited from [CountingWritable](countingwritable.md).[destroy](countingwritable.md#destroy)* + +Defined in node_modules/@types/node/base.d.ts:5523 + +**Parameters:** + +Name | Type | +------ | ------ | +`error?` | [Error](notcapable.md#static-error) | + +**Returns:** *void* + +___ + ### emit ▸ **emit**(`event`: string | symbol, ...`args`: any[]): *boolean* @@ -295,7 +419,7 @@ ___ *Overrides [SourceSource](sourcesource.md).[emit](sourcesource.md#emit)* -Defined in node_modules/@types/node/base.d.ts:3798 +Defined in node_modules/@types/node/base.d.ts:5543 **Parameters:** @@ -312,7 +436,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[emit](sourcesource.md#emit)* -Defined in node_modules/@types/node/base.d.ts:3799 +Defined in node_modules/@types/node/base.d.ts:5544 **Parameters:** @@ -322,20 +446,20 @@ Name | Type | **Returns:** *boolean* -▸ **emit**(`event`: "drain", `chunk`: Buffer | string): *boolean* +▸ **emit**(`event`: "drain", `chunk`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string): *boolean* *Inherited from [CountingWritable](countingwritable.md).[emit](countingwritable.md#emit)* *Overrides [SourceSource](sourcesource.md).[emit](sourcesource.md#emit)* -Defined in node_modules/@types/node/base.d.ts:3800 +Defined in node_modules/@types/node/base.d.ts:5545 **Parameters:** Name | Type | ------ | ------ | `event` | "drain" | -`chunk` | Buffer | string | +`chunk` | [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string | **Returns:** *boolean* @@ -345,7 +469,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[emit](sourcesource.md#emit)* -Defined in node_modules/@types/node/base.d.ts:3801 +Defined in node_modules/@types/node/base.d.ts:5546 **Parameters:** @@ -362,7 +486,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[emit](sourcesource.md#emit)* -Defined in node_modules/@types/node/base.d.ts:3802 +Defined in node_modules/@types/node/base.d.ts:5547 **Parameters:** @@ -378,7 +502,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[emit](sourcesource.md#emit)* -Defined in node_modules/@types/node/base.d.ts:3803 +Defined in node_modules/@types/node/base.d.ts:5548 **Parameters:** @@ -395,7 +519,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[emit](sourcesource.md#emit)* -Defined in node_modules/@types/node/base.d.ts:3804 +Defined in node_modules/@types/node/base.d.ts:5549 **Parameters:** @@ -414,7 +538,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[end](countingwritable.md#end)* -Defined in node_modules/@types/node/base.d.ts:3776 +Defined in node_modules/@types/node/base.d.ts:5518 **Parameters:** @@ -428,7 +552,7 @@ Name | Type | *Inherited from [CountingWritable](countingwritable.md).[end](countingwritable.md#end)* -Defined in node_modules/@types/node/base.d.ts:3777 +Defined in node_modules/@types/node/base.d.ts:5519 **Parameters:** @@ -443,7 +567,7 @@ Name | Type | *Inherited from [CountingWritable](countingwritable.md).[end](countingwritable.md#end)* -Defined in node_modules/@types/node/base.d.ts:3778 +Defined in node_modules/@types/node/base.d.ts:5520 **Parameters:** @@ -459,13 +583,13 @@ ___ ### eventNames -▸ **eventNames**(): *string | symbol[]* +▸ **eventNames**(): *Array‹string | symbol›* *Inherited from [CountingWritable](countingwritable.md).[eventNames](countingwritable.md#eventnames)* -Defined in node_modules/@types/node/base.d.ts:694 +Defined in node_modules/@types/node/base.d.ts:909 -**Returns:** *string | symbol[]* +**Returns:** *Array‹string | symbol›* ___ @@ -475,7 +599,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[getMaxListeners](countingwritable.md#getmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:691 +Defined in node_modules/@types/node/base.d.ts:906 **Returns:** *number* @@ -487,7 +611,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[listenerCount](countingwritable.md#static-listenercount)* -Defined in node_modules/@types/node/base.d.ts:695 +Defined in node_modules/@types/node/base.d.ts:910 **Parameters:** @@ -505,7 +629,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[listeners](countingwritable.md#listeners)* -Defined in node_modules/@types/node/base.d.ts:692 +Defined in node_modules/@types/node/base.d.ts:907 **Parameters:** @@ -519,20 +643,27 @@ ___ ### on -▸ **on**(`event`: string, `listener`: Function): *this* +▸ **on**(`event`: string, `listener`: function): *this* *Inherited from [CountingWritable](countingwritable.md).[on](countingwritable.md#on)* *Overrides [SourceSource](sourcesource.md).[on](sourcesource.md#on)* -Defined in node_modules/@types/node/base.d.ts:3806 +Defined in node_modules/@types/node/base.d.ts:5551 + +**Parameters:** + +▪ **event**: *string* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -542,7 +673,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[on](sourcesource.md#on)* -Defined in node_modules/@types/node/base.d.ts:3807 +Defined in node_modules/@types/node/base.d.ts:5552 **Parameters:** @@ -560,7 +691,7 @@ Defined in node_modules/@types/node/base.d.ts:3807 *Overrides [SourceSource](sourcesource.md).[on](sourcesource.md#on)* -Defined in node_modules/@types/node/base.d.ts:3808 +Defined in node_modules/@types/node/base.d.ts:5553 **Parameters:** @@ -578,7 +709,7 @@ Defined in node_modules/@types/node/base.d.ts:3808 *Overrides [SourceSource](sourcesource.md).[on](sourcesource.md#on)* -Defined in node_modules/@types/node/base.d.ts:3809 +Defined in node_modules/@types/node/base.d.ts:5554 **Parameters:** @@ -602,7 +733,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[on](sourcesource.md#on)* -Defined in node_modules/@types/node/base.d.ts:3810 +Defined in node_modules/@types/node/base.d.ts:5555 **Parameters:** @@ -620,7 +751,7 @@ Defined in node_modules/@types/node/base.d.ts:3810 *Overrides [SourceSource](sourcesource.md).[on](sourcesource.md#on)* -Defined in node_modules/@types/node/base.d.ts:3811 +Defined in node_modules/@types/node/base.d.ts:5556 **Parameters:** @@ -644,7 +775,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[on](sourcesource.md#on)* -Defined in node_modules/@types/node/base.d.ts:3812 +Defined in node_modules/@types/node/base.d.ts:5557 **Parameters:** @@ -666,20 +797,27 @@ ___ ### once -▸ **once**(`event`: string, `listener`: Function): *this* +▸ **once**(`event`: string, `listener`: function): *this* *Inherited from [CountingWritable](countingwritable.md).[once](countingwritable.md#once)* *Overrides [SourceSource](sourcesource.md).[once](sourcesource.md#once)* -Defined in node_modules/@types/node/base.d.ts:3814 +Defined in node_modules/@types/node/base.d.ts:5559 + +**Parameters:** + +▪ **event**: *string* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -689,7 +827,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[once](sourcesource.md#once)* -Defined in node_modules/@types/node/base.d.ts:3815 +Defined in node_modules/@types/node/base.d.ts:5560 **Parameters:** @@ -707,7 +845,7 @@ Defined in node_modules/@types/node/base.d.ts:3815 *Overrides [SourceSource](sourcesource.md).[once](sourcesource.md#once)* -Defined in node_modules/@types/node/base.d.ts:3816 +Defined in node_modules/@types/node/base.d.ts:5561 **Parameters:** @@ -725,7 +863,7 @@ Defined in node_modules/@types/node/base.d.ts:3816 *Overrides [SourceSource](sourcesource.md).[once](sourcesource.md#once)* -Defined in node_modules/@types/node/base.d.ts:3817 +Defined in node_modules/@types/node/base.d.ts:5562 **Parameters:** @@ -749,7 +887,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[once](sourcesource.md#once)* -Defined in node_modules/@types/node/base.d.ts:3818 +Defined in node_modules/@types/node/base.d.ts:5563 **Parameters:** @@ -767,7 +905,7 @@ Defined in node_modules/@types/node/base.d.ts:3818 *Overrides [SourceSource](sourcesource.md).[once](sourcesource.md#once)* -Defined in node_modules/@types/node/base.d.ts:3819 +Defined in node_modules/@types/node/base.d.ts:5564 **Parameters:** @@ -791,7 +929,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[once](sourcesource.md#once)* -Defined in node_modules/@types/node/base.d.ts:3820 +Defined in node_modules/@types/node/base.d.ts:5565 **Parameters:** @@ -817,7 +955,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[pipe](countingwritable.md#pipe)* -Defined in node_modules/@types/node/base.d.ts:3673 +Defined in node_modules/@types/node/base.d.ts:5407 **Type parameters:** @@ -836,20 +974,27 @@ ___ ### prependListener -▸ **prependListener**(`event`: string, `listener`: Function): *this* +▸ **prependListener**(`event`: string, `listener`: function): *this* *Inherited from [CountingWritable](countingwritable.md).[prependListener](countingwritable.md#prependlistener)* *Overrides [SourceSource](sourcesource.md).[prependListener](sourcesource.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:3822 +Defined in node_modules/@types/node/base.d.ts:5567 + +**Parameters:** + +▪ **event**: *string* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -859,7 +1004,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[prependListener](sourcesource.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:3823 +Defined in node_modules/@types/node/base.d.ts:5568 **Parameters:** @@ -877,7 +1022,7 @@ Defined in node_modules/@types/node/base.d.ts:3823 *Overrides [SourceSource](sourcesource.md).[prependListener](sourcesource.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:3824 +Defined in node_modules/@types/node/base.d.ts:5569 **Parameters:** @@ -895,7 +1040,7 @@ Defined in node_modules/@types/node/base.d.ts:3824 *Overrides [SourceSource](sourcesource.md).[prependListener](sourcesource.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:3825 +Defined in node_modules/@types/node/base.d.ts:5570 **Parameters:** @@ -919,7 +1064,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[prependListener](sourcesource.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:3826 +Defined in node_modules/@types/node/base.d.ts:5571 **Parameters:** @@ -937,7 +1082,7 @@ Defined in node_modules/@types/node/base.d.ts:3826 *Overrides [SourceSource](sourcesource.md).[prependListener](sourcesource.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:3827 +Defined in node_modules/@types/node/base.d.ts:5572 **Parameters:** @@ -961,7 +1106,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[prependListener](sourcesource.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:3828 +Defined in node_modules/@types/node/base.d.ts:5573 **Parameters:** @@ -983,20 +1128,27 @@ ___ ### prependOnceListener -▸ **prependOnceListener**(`event`: string, `listener`: Function): *this* +▸ **prependOnceListener**(`event`: string, `listener`: function): *this* *Inherited from [CountingWritable](countingwritable.md).[prependOnceListener](countingwritable.md#prependoncelistener)* *Overrides [SourceSource](sourcesource.md).[prependOnceListener](sourcesource.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:3830 +Defined in node_modules/@types/node/base.d.ts:5575 + +**Parameters:** + +▪ **event**: *string* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -1006,7 +1158,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[prependOnceListener](sourcesource.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:3831 +Defined in node_modules/@types/node/base.d.ts:5576 **Parameters:** @@ -1024,7 +1176,7 @@ Defined in node_modules/@types/node/base.d.ts:3831 *Overrides [SourceSource](sourcesource.md).[prependOnceListener](sourcesource.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:3832 +Defined in node_modules/@types/node/base.d.ts:5577 **Parameters:** @@ -1042,7 +1194,7 @@ Defined in node_modules/@types/node/base.d.ts:3832 *Overrides [SourceSource](sourcesource.md).[prependOnceListener](sourcesource.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:3833 +Defined in node_modules/@types/node/base.d.ts:5578 **Parameters:** @@ -1066,7 +1218,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[prependOnceListener](sourcesource.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:3834 +Defined in node_modules/@types/node/base.d.ts:5579 **Parameters:** @@ -1084,7 +1236,7 @@ Defined in node_modules/@types/node/base.d.ts:3834 *Overrides [SourceSource](sourcesource.md).[prependOnceListener](sourcesource.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:3835 +Defined in node_modules/@types/node/base.d.ts:5580 **Parameters:** @@ -1108,7 +1260,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[prependOnceListener](sourcesource.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:3836 +Defined in node_modules/@types/node/base.d.ts:5581 **Parameters:** @@ -1134,7 +1286,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[removeAllListeners](countingwritable.md#removealllisteners)* -Defined in node_modules/@types/node/base.d.ts:689 +Defined in node_modules/@types/node/base.d.ts:904 **Parameters:** @@ -1148,20 +1300,27 @@ ___ ### removeListener -▸ **removeListener**(`event`: string, `listener`: Function): *this* +▸ **removeListener**(`event`: string, `listener`: function): *this* *Inherited from [CountingWritable](countingwritable.md).[removeListener](countingwritable.md#removelistener)* *Overrides [SourceSource](sourcesource.md).[removeListener](sourcesource.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:3838 +Defined in node_modules/@types/node/base.d.ts:5583 + +**Parameters:** + +▪ **event**: *string* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -1171,7 +1330,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[removeListener](sourcesource.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:3839 +Defined in node_modules/@types/node/base.d.ts:5584 **Parameters:** @@ -1189,7 +1348,7 @@ Defined in node_modules/@types/node/base.d.ts:3839 *Overrides [SourceSource](sourcesource.md).[removeListener](sourcesource.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:3840 +Defined in node_modules/@types/node/base.d.ts:5585 **Parameters:** @@ -1207,7 +1366,7 @@ Defined in node_modules/@types/node/base.d.ts:3840 *Overrides [SourceSource](sourcesource.md).[removeListener](sourcesource.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:3841 +Defined in node_modules/@types/node/base.d.ts:5586 **Parameters:** @@ -1231,7 +1390,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[removeListener](sourcesource.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:3842 +Defined in node_modules/@types/node/base.d.ts:5587 **Parameters:** @@ -1249,7 +1408,7 @@ Defined in node_modules/@types/node/base.d.ts:3842 *Overrides [SourceSource](sourcesource.md).[removeListener](sourcesource.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:3843 +Defined in node_modules/@types/node/base.d.ts:5588 **Parameters:** @@ -1273,7 +1432,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[removeListener](sourcesource.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:3844 +Defined in node_modules/@types/node/base.d.ts:5589 **Parameters:** @@ -1299,7 +1458,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[setDefaultEncoding](countingwritable.md#setdefaultencoding)* -Defined in node_modules/@types/node/base.d.ts:3775 +Defined in node_modules/@types/node/base.d.ts:5517 **Parameters:** @@ -1317,7 +1476,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[setMaxListeners](countingwritable.md#setmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:690 +Defined in node_modules/@types/node/base.d.ts:905 **Parameters:** @@ -1329,13 +1488,25 @@ Name | Type | ___ +### uncork + +▸ **uncork**(): *void* + +*Inherited from [CountingWritable](countingwritable.md).[uncork](countingwritable.md#uncork)* + +Defined in node_modules/@types/node/base.d.ts:5522 + +**Returns:** *void* + +___ + ### write ▸ **write**(`chunk`: any, `cb?`: Function): *boolean* *Inherited from [CountingWritable](countingwritable.md).[write](countingwritable.md#write)* -Defined in node_modules/@types/node/base.d.ts:3773 +Defined in node_modules/@types/node/base.d.ts:5515 **Parameters:** @@ -1350,7 +1521,7 @@ Name | Type | *Inherited from [CountingWritable](countingwritable.md).[write](countingwritable.md#write)* -Defined in node_modules/@types/node/base.d.ts:3774 +Defined in node_modules/@types/node/base.d.ts:5516 **Parameters:** @@ -1370,7 +1541,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[listenerCount](countingwritable.md#static-listenercount)* -Defined in node_modules/@types/node/base.d.ts:680 +Defined in node_modules/@types/node/base.d.ts:895 **Parameters:** diff --git a/doc/classes/crc32hasher.md b/doc/classes/crc32hasher.md index 530cb314..e840c5d7 100644 --- a/doc/classes/crc32hasher.md +++ b/doc/classes/crc32hasher.md @@ -24,7 +24,7 @@ • **crc32**: *crc32* = getCrc().crc32 -*Defined in [lib/sparse-stream/shared.ts:55](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/sparse-stream/shared.ts#L55)* +*Defined in [lib/sparse-stream/shared.ts:64](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/sparse-stream/shared.ts#L64)* ___ @@ -32,7 +32,7 @@ ___ • **value**: *number* -*Defined in [lib/sparse-stream/shared.ts:54](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/sparse-stream/shared.ts#L54)* +*Defined in [lib/sparse-stream/shared.ts:63](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/sparse-stream/shared.ts#L63)* ## Methods @@ -40,7 +40,7 @@ ___ ▸ **digest**(`_encoding`: "hex"): *string* -*Defined in [lib/sparse-stream/shared.ts:61](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/sparse-stream/shared.ts#L61)* +*Defined in [lib/sparse-stream/shared.ts:70](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/sparse-stream/shared.ts#L70)* **Parameters:** @@ -54,14 +54,14 @@ ___ ### update -▸ **update**(`data`: Buffer): *void* +▸ **update**(`data`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer)): *void* -*Defined in [lib/sparse-stream/shared.ts:57](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/sparse-stream/shared.ts#L57)* +*Defined in [lib/sparse-stream/shared.ts:66](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/sparse-stream/shared.ts#L66)* **Parameters:** Name | Type | ------ | ------ | -`data` | Buffer | +`data` | [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | **Returns:** *void* diff --git a/doc/classes/dmgsource.md b/doc/classes/dmgsource.md index b62e3b1a..6d41351d 100644 --- a/doc/classes/dmgsource.md +++ b/doc/classes/dmgsource.md @@ -44,6 +44,7 @@ * [createWriteStream](dmgsource.md#createwritestream) * [emit](dmgsource.md#emit) * [eventNames](dmgsource.md#eventnames) +* [getAlignment](dmgsource.md#getalignment) * [getBlocks](dmgsource.md#getblocks) * [getInnerSource](dmgsource.md#getinnersource) * [getMaxListeners](dmgsource.md#getmaxlisteners) @@ -72,7 +73,7 @@ *Overrides [SourceSource](sourcesource.md).[constructor](sourcesource.md#constructor)* -*Defined in [lib/source-destination/dmg.ts:44](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/dmg.ts#L44)* +*Defined in [lib/source-destination/dmg.ts:52](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/dmg.ts#L52)* **Parameters:** @@ -88,7 +89,7 @@ Name | Type | • **image**: *UDIFImage* -*Defined in [lib/source-destination/dmg.ts:44](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/dmg.ts#L44)* +*Defined in [lib/source-destination/dmg.ts:52](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/dmg.ts#L52)* ___ @@ -98,7 +99,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[source](sourcesource.md#protected-source)* -*Defined in [lib/source-destination/source-source.ts:22](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-source.ts#L22)* +*Defined in [lib/source-destination/source-source.ts:22](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-source.ts#L22)* ___ @@ -108,7 +109,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[defaultMaxListeners](countingwritable.md#static-defaultmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:681 +Defined in node_modules/@types/node/base.d.ts:896 ___ @@ -129,7 +130,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[imageExtensions](sourcesource.md#static-imageextensions)* -*Defined in [lib/source-destination/source-destination.ts:232](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L232)* +*Defined in [lib/source-destination/source-destination.ts:252](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L252)* ___ @@ -143,7 +144,7 @@ ___ BLOCK.LZFSE, ] -*Defined in [lib/source-destination/dmg.ts:35](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/dmg.ts#L35)* +*Defined in [lib/source-destination/dmg.ts:43](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/dmg.ts#L43)* ___ @@ -153,7 +154,7 @@ ___ *Overrides [SourceSource](sourcesource.md).[mimetype](sourcesource.md#static-optional-mimetype)* -*Defined in [lib/source-destination/dmg.ts:43](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/dmg.ts#L43)* +*Defined in [lib/source-destination/dmg.ts:51](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/dmg.ts#L51)* ___ @@ -163,7 +164,7 @@ ___ *Overrides [SourceSource](sourcesource.md).[requiresRandomReadableSource](sourcesource.md#static-requiresrandomreadablesource)* -*Defined in [lib/source-destination/dmg.ts:42](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/dmg.ts#L42)* +*Defined in [lib/source-destination/dmg.ts:50](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/dmg.ts#L50)* ## Methods @@ -173,7 +174,7 @@ ___ *Overrides [SourceSource](sourcesource.md).[_close](sourcesource.md#protected-_close)* -*Defined in [lib/source-destination/dmg.ts:136](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/dmg.ts#L136)* +*Defined in [lib/source-destination/dmg.ts:159](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/dmg.ts#L159)* **Returns:** *Promise‹void›* @@ -185,7 +186,7 @@ ___ *Overrides [SourceSource](sourcesource.md).[_getMetadata](sourcesource.md#protected-_getmetadata)* -*Defined in [lib/source-destination/dmg.ts:123](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/dmg.ts#L123)* +*Defined in [lib/source-destination/dmg.ts:146](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/dmg.ts#L146)* **Returns:** *Promise‹[Metadata](../interfaces/metadata.md)›* @@ -197,7 +198,7 @@ ___ *Overrides [SourceSource](sourcesource.md).[_open](sourcesource.md#protected-_open)* -*Defined in [lib/source-destination/dmg.ts:131](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/dmg.ts#L131)* +*Defined in [lib/source-destination/dmg.ts:154](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/dmg.ts#L154)* **Returns:** *Promise‹void›* @@ -205,20 +206,27 @@ ___ ### addListener -▸ **addListener**(`event`: string | symbol, `listener`: Function): *this* +▸ **addListener**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[addListener](sourcesource.md#addlistener)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[addListener](../interfaces/sparsereadable.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:683 +Defined in node_modules/@types/node/base.d.ts:898 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -230,7 +238,7 @@ ___ *Overrides [SourceSource](sourcesource.md).[canCreateReadStream](sourcesource.md#cancreatereadstream)* -*Defined in [lib/source-destination/dmg.ts:51](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/dmg.ts#L51)* +*Defined in [lib/source-destination/dmg.ts:59](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/dmg.ts#L59)* **Returns:** *Promise‹boolean›* @@ -242,7 +250,7 @@ ___ *Overrides [SourceSource](sourcesource.md).[canCreateSparseReadStream](sourcesource.md#cancreatesparsereadstream)* -*Defined in [lib/source-destination/dmg.ts:55](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/dmg.ts#L55)* +*Defined in [lib/source-destination/dmg.ts:63](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/dmg.ts#L63)* **Returns:** *Promise‹boolean›* @@ -254,7 +262,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[canCreateSparseWriteStream](sourcesource.md#cancreatesparsewritestream)* -*Defined in [lib/source-destination/source-destination.ts:276](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L276)* +*Defined in [lib/source-destination/source-destination.ts:300](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L300)* **Returns:** *Promise‹boolean›* @@ -266,7 +274,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[canCreateWriteStream](sourcesource.md#cancreatewritestream)* -*Defined in [lib/source-destination/source-destination.ts:272](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L272)* +*Defined in [lib/source-destination/source-destination.ts:296](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L296)* **Returns:** *Promise‹boolean›* @@ -278,7 +286,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[canRead](sourcesource.md#canread)* -*Defined in [lib/source-destination/source-destination.ts:256](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L256)* +*Defined in [lib/source-destination/source-destination.ts:280](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L280)* **Returns:** *Promise‹boolean›* @@ -290,7 +298,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[canWrite](sourcesource.md#canwrite)* -*Defined in [lib/source-destination/source-destination.ts:260](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L260)* +*Defined in [lib/source-destination/source-destination.ts:284](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L284)* **Returns:** *Promise‹boolean›* @@ -302,7 +310,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[close](sourcesource.md#close)* -*Defined in [lib/source-destination/source-destination.ts:342](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L342)* +*Defined in [lib/source-destination/source-destination.ts:368](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L368)* **Returns:** *Promise‹void›* @@ -310,19 +318,22 @@ ___ ### createReadStream -▸ **createReadStream**(`_emitProgress`: boolean, `start`: number, `end?`: undefined | number): *Promise‹ReadableStream›* +▸ **createReadStream**(`__namedParameters`: object): *Promise‹ReadableStream›* *Overrides [SourceSource](sourcesource.md).[createReadStream](sourcesource.md#createreadstream)* -*Defined in [lib/source-destination/dmg.ts:59](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/dmg.ts#L59)* +*Defined in [lib/source-destination/dmg.ts:67](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/dmg.ts#L67)* **Parameters:** +▪`Default value` **__namedParameters**: *object*= {} + Name | Type | Default | ------ | ------ | ------ | -`_emitProgress` | boolean | false | +`alignment` | undefined | number | - | +`end` | undefined | number | - | +`numBuffers` | undefined | number | - | `start` | number | 0 | -`end?` | undefined | number | - | **Returns:** *Promise‹ReadableStream›* @@ -330,17 +341,20 @@ ___ ### createSparseReadStream -▸ **createSparseReadStream**(`_generateChecksums`: boolean): *Promise‹[SparseReadable](../interfaces/sparsereadable.md)›* +▸ **createSparseReadStream**(`__namedParameters`: object): *Promise‹[SparseReadable](../interfaces/sparsereadable.md)›* *Overrides [SourceSource](sourcesource.md).[createSparseReadStream](sourcesource.md#createsparsereadstream)* -*Defined in [lib/source-destination/dmg.ts:75](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/dmg.ts#L75)* +*Defined in [lib/source-destination/dmg.ts:84](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/dmg.ts#L84)* **Parameters:** +▪`Default value` **__namedParameters**: *object*= {} + Name | Type | ------ | ------ | -`_generateChecksums` | boolean | +`alignment` | undefined | number | +`numBuffers` | undefined | number | **Returns:** *Promise‹[SparseReadable](../interfaces/sparsereadable.md)›* @@ -348,11 +362,19 @@ ___ ### createSparseWriteStream -▸ **createSparseWriteStream**(): *Promise‹[SparseWritable](../interfaces/sparsewritable.md)›* +▸ **createSparseWriteStream**(`_options`: object): *Promise‹[SparseWritable](../interfaces/sparsewritable.md)›* *Inherited from [SourceSource](sourcesource.md).[createSparseWriteStream](sourcesource.md#createsparsewritestream)* -*Defined in [lib/source-destination/source-destination.ts:331](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L331)* +*Defined in [lib/source-destination/source-destination.ts:355](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L355)* + +**Parameters:** + +▪`Default value` **_options**: *object*= {} + +Name | Type | +------ | ------ | +`highWaterMark?` | undefined | number | **Returns:** *Promise‹[SparseWritable](../interfaces/sparsewritable.md)›* @@ -364,7 +386,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[createVerifier](sourcesource.md#createverifier)* -*Defined in [lib/source-destination/source-destination.ts:357](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L357)* +*Defined in [lib/source-destination/source-destination.ts:383](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L383)* **Parameters:** @@ -379,11 +401,19 @@ ___ ### createWriteStream -▸ **createWriteStream**(): *Promise‹WritableStream›* +▸ **createWriteStream**(`_options`: object): *Promise‹WritableStream›* *Inherited from [SourceSource](sourcesource.md).[createWriteStream](sourcesource.md#createwritestream)* -*Defined in [lib/source-destination/source-destination.ts:327](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L327)* +*Defined in [lib/source-destination/source-destination.ts:349](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L349)* + +**Parameters:** + +▪`Default value` **_options**: *object*= {} + +Name | Type | +------ | ------ | +`highWaterMark?` | undefined | number | **Returns:** *Promise‹WritableStream›* @@ -397,7 +427,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[emit](../interfaces/sparsereadable.md#emit)* -Defined in node_modules/@types/node/base.d.ts:693 +Defined in node_modules/@types/node/base.d.ts:908 **Parameters:** @@ -412,15 +442,27 @@ ___ ### eventNames -▸ **eventNames**(): *string | symbol[]* +▸ **eventNames**(): *Array‹string | symbol›* *Inherited from [CountingWritable](countingwritable.md).[eventNames](countingwritable.md#eventnames)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[eventNames](../interfaces/sparsereadable.md#eventnames)* -Defined in node_modules/@types/node/base.d.ts:694 +Defined in node_modules/@types/node/base.d.ts:909 + +**Returns:** *Array‹string | symbol›* + +___ + +### getAlignment + +▸ **getAlignment**(): *number | undefined* + +*Inherited from [SourceSource](sourcesource.md).[getAlignment](sourcesource.md#getalignment)* + +*Defined in [lib/source-destination/source-destination.ts:276](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L276)* -**Returns:** *string | symbol[]* +**Returns:** *number | undefined* ___ @@ -430,7 +472,7 @@ ___ *Overrides [SourceSource](sourcesource.md).[getBlocks](sourcesource.md#getblocks)* -*Defined in [lib/source-destination/dmg.ts:83](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/dmg.ts#L83)* +*Defined in [lib/source-destination/dmg.ts:106](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/dmg.ts#L106)* **Returns:** *Promise‹[BlocksWithChecksum](../interfaces/blockswithchecksum.md)[]›* @@ -442,7 +484,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[getInnerSource](sourcesource.md#getinnersource)* -*Defined in [lib/source-destination/source-destination.ts:424](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L424)* +*Defined in [lib/source-destination/source-destination.ts:452](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L452)* **Returns:** *Promise‹[SourceDestination](sourcedestination.md)›* @@ -456,7 +498,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[getMaxListeners](../interfaces/sparsereadable.md#getmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:691 +Defined in node_modules/@types/node/base.d.ts:906 **Returns:** *number* @@ -468,7 +510,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[getMetadata](sourcesource.md#getmetadata)* -*Defined in [lib/source-destination/source-destination.ts:280](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L280)* +*Defined in [lib/source-destination/source-destination.ts:304](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L304)* **Returns:** *Promise‹[Metadata](../interfaces/metadata.md)›* @@ -480,7 +522,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[getPartitionTable](sourcesource.md#getpartitiontable)* -*Defined in [lib/source-destination/source-destination.ts:445](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L445)* +*Defined in [lib/source-destination/source-destination.ts:473](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L473)* **Returns:** *Promise‹GetPartitionsResult | undefined›* @@ -494,7 +536,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[listenerCount](../interfaces/sparsereadable.md#listenercount)* -Defined in node_modules/@types/node/base.d.ts:695 +Defined in node_modules/@types/node/base.d.ts:910 **Parameters:** @@ -514,7 +556,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[listeners](../interfaces/sparsereadable.md#listeners)* -Defined in node_modules/@types/node/base.d.ts:692 +Defined in node_modules/@types/node/base.d.ts:907 **Parameters:** @@ -528,20 +570,27 @@ ___ ### on -▸ **on**(`event`: string | symbol, `listener`: Function): *this* +▸ **on**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[on](sourcesource.md#on)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[on](../interfaces/sparsereadable.md#on)* -Defined in node_modules/@types/node/base.d.ts:684 +Defined in node_modules/@types/node/base.d.ts:899 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -549,20 +598,27 @@ ___ ### once -▸ **once**(`event`: string | symbol, `listener`: Function): *this* +▸ **once**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[once](sourcesource.md#once)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[once](../interfaces/sparsereadable.md#once)* -Defined in node_modules/@types/node/base.d.ts:685 +Defined in node_modules/@types/node/base.d.ts:900 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -574,7 +630,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[open](sourcesource.md#open)* -*Defined in [lib/source-destination/source-destination.ts:335](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L335)* +*Defined in [lib/source-destination/source-destination.ts:361](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L361)* **Returns:** *Promise‹void›* @@ -582,20 +638,27 @@ ___ ### prependListener -▸ **prependListener**(`event`: string | symbol, `listener`: Function): *this* +▸ **prependListener**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[prependListener](sourcesource.md#prependlistener)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[prependListener](../interfaces/sparsereadable.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:686 +Defined in node_modules/@types/node/base.d.ts:901 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -603,20 +666,27 @@ ___ ### prependOnceListener -▸ **prependOnceListener**(`event`: string | symbol, `listener`: Function): *this* +▸ **prependOnceListener**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[prependOnceListener](sourcesource.md#prependoncelistener)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[prependOnceListener](../interfaces/sparsereadable.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:687 +Defined in node_modules/@types/node/base.d.ts:902 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -624,17 +694,17 @@ ___ ### read -▸ **read**(`_buffer`: Buffer, `_bufferOffset`: number, `_length`: number, `_sourceOffset`: number): *Promise‹ReadResult›* +▸ **read**(`_buffer`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer), `_bufferOffset`: number, `_length`: number, `_sourceOffset`: number): *Promise‹ReadResult›* *Inherited from [SourceSource](sourcesource.md).[read](sourcesource.md#read)* -*Defined in [lib/source-destination/source-destination.ts:291](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L291)* +*Defined in [lib/source-destination/source-destination.ts:315](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L315)* **Parameters:** Name | Type | ------ | ------ | -`_buffer` | Buffer | +`_buffer` | [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | `_bufferOffset` | number | `_length` | number | `_sourceOffset` | number | @@ -651,7 +721,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[removeAllListeners](../interfaces/sparsereadable.md#removealllisteners)* -Defined in node_modules/@types/node/base.d.ts:689 +Defined in node_modules/@types/node/base.d.ts:904 **Parameters:** @@ -665,20 +735,27 @@ ___ ### removeListener -▸ **removeListener**(`event`: string | symbol, `listener`: Function): *this* +▸ **removeListener**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[removeListener](sourcesource.md#removelistener)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[removeListener](../interfaces/sparsereadable.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:688 +Defined in node_modules/@types/node/base.d.ts:903 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -692,7 +769,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[setMaxListeners](../interfaces/sparsereadable.md#setmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:690 +Defined in node_modules/@types/node/base.d.ts:905 **Parameters:** @@ -706,17 +783,17 @@ ___ ### write -▸ **write**(`_buffer`: Buffer, `_bufferOffset`: number, `_length`: number, `_fileOffset`: number): *Promise‹WriteResult›* +▸ **write**(`_buffer`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer), `_bufferOffset`: number, `_length`: number, `_fileOffset`: number): *Promise‹WriteResult›* *Inherited from [SourceSource](sourcesource.md).[write](sourcesource.md#write)* -*Defined in [lib/source-destination/source-destination.ts:300](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L300)* +*Defined in [lib/source-destination/source-destination.ts:324](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L324)* **Parameters:** Name | Type | ------ | ------ | -`_buffer` | Buffer | +`_buffer` | [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | `_bufferOffset` | number | `_length` | number | `_fileOffset` | number | @@ -731,7 +808,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[listenerCount](countingwritable.md#static-listenercount)* -Defined in node_modules/@types/node/base.d.ts:680 +Defined in node_modules/@types/node/base.d.ts:895 **Parameters:** @@ -750,7 +827,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[register](sourcesource.md#static-register)* -*Defined in [lib/source-destination/source-destination.ts:250](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L250)* +*Defined in [lib/source-destination/source-destination.ts:270](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L270)* **Parameters:** diff --git a/doc/classes/driverlessdevice.md b/doc/classes/driverlessdevice.md index 0b1dff5b..89f84939 100644 --- a/doc/classes/driverlessdevice.md +++ b/doc/classes/driverlessdevice.md @@ -54,6 +54,7 @@ * [createWriteStream](driverlessdevice.md#createwritestream) * [emit](driverlessdevice.md#emit) * [eventNames](driverlessdevice.md#eventnames) +* [getAlignment](driverlessdevice.md#getalignment) * [getBlocks](driverlessdevice.md#getblocks) * [getInnerSource](driverlessdevice.md#getinnersource) * [getMaxListeners](driverlessdevice.md#getmaxlisteners) @@ -80,7 +81,7 @@ \+ **new DriverlessDevice**(`driverlessDevice`: WinUsbDriverlessDevice): *[DriverlessDevice](driverlessdevice.md)* -*Defined in [lib/source-destination/driverless.ts:33](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/driverless.ts#L33)* +*Defined in [lib/source-destination/driverless.ts:33](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/driverless.ts#L33)* **Parameters:** @@ -96,7 +97,7 @@ Name | Type | • **accessible**: *boolean* = false -*Defined in [lib/source-destination/driverless.ts:24](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/driverless.ts#L24)* +*Defined in [lib/source-destination/driverless.ts:24](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/driverless.ts#L24)* ___ @@ -106,7 +107,7 @@ ___ *Implementation of [AdapterSourceDestination](../interfaces/adaptersourcedestination.md).[description](../interfaces/adaptersourcedestination.md#description)* -*Defined in [lib/source-destination/driverless.ts:33](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/driverless.ts#L33)* +*Defined in [lib/source-destination/driverless.ts:33](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/driverless.ts#L33)* ___ @@ -116,7 +117,7 @@ ___ *Implementation of [AdapterSourceDestination](../interfaces/adaptersourcedestination.md).[device](../interfaces/adaptersourcedestination.md#device)* -*Defined in [lib/source-destination/driverless.ts:26](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/driverless.ts#L26)* +*Defined in [lib/source-destination/driverless.ts:26](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/driverless.ts#L26)* ___ @@ -124,7 +125,7 @@ ___ • **deviceDescriptor**: *object* -*Defined in [lib/source-destination/driverless.ts:32](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/driverless.ts#L32)* +*Defined in [lib/source-destination/driverless.ts:32](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/driverless.ts#L32)* #### Type declaration: @@ -140,7 +141,7 @@ ___ *Implementation of [AdapterSourceDestination](../interfaces/adaptersourcedestination.md).[devicePath](../interfaces/adaptersourcedestination.md#devicepath)* -*Defined in [lib/source-destination/driverless.ts:27](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/driverless.ts#L27)* +*Defined in [lib/source-destination/driverless.ts:27](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/driverless.ts#L27)* ___ @@ -150,7 +151,7 @@ ___ *Implementation of [AdapterSourceDestination](../interfaces/adaptersourcedestination.md).[emitsProgress](../interfaces/adaptersourcedestination.md#emitsprogress)* -*Defined in [lib/source-destination/driverless.ts:31](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/driverless.ts#L31)* +*Defined in [lib/source-destination/driverless.ts:31](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/driverless.ts#L31)* ___ @@ -160,7 +161,7 @@ ___ *Implementation of [AdapterSourceDestination](../interfaces/adaptersourcedestination.md).[isSystem](../interfaces/adaptersourcedestination.md#issystem)* -*Defined in [lib/source-destination/driverless.ts:28](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/driverless.ts#L28)* +*Defined in [lib/source-destination/driverless.ts:28](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/driverless.ts#L28)* ___ @@ -170,7 +171,7 @@ ___ *Implementation of [AdapterSourceDestination](../interfaces/adaptersourcedestination.md).[mountpoints](../interfaces/adaptersourcedestination.md#mountpoints)* -*Defined in [lib/source-destination/driverless.ts:29](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/driverless.ts#L29)* +*Defined in [lib/source-destination/driverless.ts:29](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/driverless.ts#L29)* ___ @@ -180,7 +181,7 @@ ___ *Implementation of [AdapterSourceDestination](../interfaces/adaptersourcedestination.md).[raw](../interfaces/adaptersourcedestination.md#raw)* -*Defined in [lib/source-destination/driverless.ts:25](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/driverless.ts#L25)* +*Defined in [lib/source-destination/driverless.ts:25](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/driverless.ts#L25)* ___ @@ -190,7 +191,7 @@ ___ *Implementation of [AdapterSourceDestination](../interfaces/adaptersourcedestination.md).[size](../interfaces/adaptersourcedestination.md#size)* -*Defined in [lib/source-destination/driverless.ts:30](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/driverless.ts#L30)* +*Defined in [lib/source-destination/driverless.ts:30](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/driverless.ts#L30)* ___ @@ -202,7 +203,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[defaultMaxListeners](countingwritable.md#static-defaultmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:681 +Defined in node_modules/@types/node/base.d.ts:896 ___ @@ -225,7 +226,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[imageExtensions](sourcesource.md#static-imageextensions)* -*Defined in [lib/source-destination/source-destination.ts:232](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L232)* +*Defined in [lib/source-destination/source-destination.ts:252](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L252)* ___ @@ -237,7 +238,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[mimetype](sourcesource.md#static-optional-mimetype)* -*Defined in [lib/source-destination/source-destination.ts:244](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L244)* +*Defined in [lib/source-destination/source-destination.ts:264](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L264)* ## Methods @@ -249,7 +250,7 @@ ___ *Inherited from [SourceDestination](sourcedestination.md).[_close](sourcedestination.md#protected-_close)* -*Defined in [lib/source-destination/source-destination.ts:353](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L353)* +*Defined in [lib/source-destination/source-destination.ts:379](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L379)* **Returns:** *Promise‹void›* @@ -263,7 +264,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[_getMetadata](sourcesource.md#protected-_getmetadata)* -*Defined in [lib/source-destination/source-destination.ts:287](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L287)* +*Defined in [lib/source-destination/source-destination.ts:311](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L311)* **Returns:** *Promise‹[Metadata](../interfaces/metadata.md)›* @@ -277,7 +278,7 @@ ___ *Inherited from [SourceDestination](sourcedestination.md).[_open](sourcedestination.md#protected-_open)* -*Defined in [lib/source-destination/source-destination.ts:349](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L349)* +*Defined in [lib/source-destination/source-destination.ts:375](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L375)* **Returns:** *Promise‹void›* @@ -285,22 +286,27 @@ ___ ### addListener -▸ **addListener**(`event`: string | symbol, `listener`: Function): *this* - -*Implementation of [AdapterSourceDestination](../interfaces/adaptersourcedestination.md)* +▸ **addListener**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[addListener](sourcesource.md#addlistener)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[addListener](../interfaces/sparsereadable.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:683 +Defined in node_modules/@types/node/base.d.ts:898 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -314,7 +320,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[canCreateReadStream](sourcesource.md#cancreatereadstream)* -*Defined in [lib/source-destination/source-destination.ts:264](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L264)* +*Defined in [lib/source-destination/source-destination.ts:288](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L288)* **Returns:** *Promise‹boolean›* @@ -328,7 +334,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[canCreateSparseReadStream](sourcesource.md#cancreatesparsereadstream)* -*Defined in [lib/source-destination/source-destination.ts:268](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L268)* +*Defined in [lib/source-destination/source-destination.ts:292](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L292)* **Returns:** *Promise‹boolean›* @@ -342,7 +348,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[canCreateSparseWriteStream](sourcesource.md#cancreatesparsewritestream)* -*Defined in [lib/source-destination/source-destination.ts:276](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L276)* +*Defined in [lib/source-destination/source-destination.ts:300](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L300)* **Returns:** *Promise‹boolean›* @@ -356,7 +362,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[canCreateWriteStream](sourcesource.md#cancreatewritestream)* -*Defined in [lib/source-destination/source-destination.ts:272](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L272)* +*Defined in [lib/source-destination/source-destination.ts:296](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L296)* **Returns:** *Promise‹boolean›* @@ -370,7 +376,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[canRead](sourcesource.md#canread)* -*Defined in [lib/source-destination/source-destination.ts:256](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L256)* +*Defined in [lib/source-destination/source-destination.ts:280](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L280)* **Returns:** *Promise‹boolean›* @@ -384,7 +390,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[canWrite](sourcesource.md#canwrite)* -*Defined in [lib/source-destination/source-destination.ts:260](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L260)* +*Defined in [lib/source-destination/source-destination.ts:284](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L284)* **Returns:** *Promise‹boolean›* @@ -398,7 +404,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[close](sourcesource.md#close)* -*Defined in [lib/source-destination/source-destination.ts:342](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L342)* +*Defined in [lib/source-destination/source-destination.ts:368](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L368)* **Returns:** *Promise‹void›* @@ -406,21 +412,19 @@ ___ ### createReadStream -▸ **createReadStream**(`_emitProgress`: boolean, `_start`: number, `_end?`: undefined | number): *Promise‹ReadableStream›* +▸ **createReadStream**(`_options`: [CreateReadStreamOptions](../interfaces/createreadstreamoptions.md)): *Promise‹ReadableStream›* *Implementation of [AdapterSourceDestination](../interfaces/adaptersourcedestination.md)* *Inherited from [SourceSource](sourcesource.md).[createReadStream](sourcesource.md#createreadstream)* -*Defined in [lib/source-destination/source-destination.ts:309](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L309)* +*Defined in [lib/source-destination/source-destination.ts:333](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L333)* **Parameters:** Name | Type | Default | ------ | ------ | ------ | -`_emitProgress` | boolean | false | -`_start` | number | 0 | -`_end?` | undefined | number | - | +`_options` | [CreateReadStreamOptions](../interfaces/createreadstreamoptions.md) | {} | **Returns:** *Promise‹ReadableStream›* @@ -428,19 +432,19 @@ ___ ### createSparseReadStream -▸ **createSparseReadStream**(`_generateChecksums`: boolean): *Promise‹[SparseReadable](../interfaces/sparsereadable.md)›* +▸ **createSparseReadStream**(`_options`: [CreateSparseReadStreamOptions](../interfaces/createsparsereadstreamoptions.md)): *Promise‹[SparseReadable](../interfaces/sparsereadable.md)›* *Implementation of [AdapterSourceDestination](../interfaces/adaptersourcedestination.md)* *Inherited from [SourceSource](sourcesource.md).[createSparseReadStream](sourcesource.md#createsparsereadstream)* -*Defined in [lib/source-destination/source-destination.ts:317](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L317)* +*Defined in [lib/source-destination/source-destination.ts:339](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L339)* **Parameters:** Name | Type | Default | ------ | ------ | ------ | -`_generateChecksums` | boolean | false | +`_options` | [CreateSparseReadStreamOptions](../interfaces/createsparsereadstreamoptions.md) | {} | **Returns:** *Promise‹[SparseReadable](../interfaces/sparsereadable.md)›* @@ -448,13 +452,19 @@ ___ ### createSparseWriteStream -▸ **createSparseWriteStream**(): *Promise‹[SparseWritable](../interfaces/sparsewritable.md)›* - -*Implementation of [AdapterSourceDestination](../interfaces/adaptersourcedestination.md)* +▸ **createSparseWriteStream**(`_options`: object): *Promise‹[SparseWritable](../interfaces/sparsewritable.md)›* *Inherited from [SourceSource](sourcesource.md).[createSparseWriteStream](sourcesource.md#createsparsewritestream)* -*Defined in [lib/source-destination/source-destination.ts:331](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L331)* +*Defined in [lib/source-destination/source-destination.ts:355](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L355)* + +**Parameters:** + +▪`Default value` **_options**: *object*= {} + +Name | Type | +------ | ------ | +`highWaterMark?` | undefined | number | **Returns:** *Promise‹[SparseWritable](../interfaces/sparsewritable.md)›* @@ -468,7 +478,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[createVerifier](sourcesource.md#createverifier)* -*Defined in [lib/source-destination/source-destination.ts:357](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L357)* +*Defined in [lib/source-destination/source-destination.ts:383](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L383)* **Parameters:** @@ -483,13 +493,19 @@ ___ ### createWriteStream -▸ **createWriteStream**(): *Promise‹WritableStream›* - -*Implementation of [AdapterSourceDestination](../interfaces/adaptersourcedestination.md)* +▸ **createWriteStream**(`_options`: object): *Promise‹WritableStream›* *Inherited from [SourceSource](sourcesource.md).[createWriteStream](sourcesource.md#createwritestream)* -*Defined in [lib/source-destination/source-destination.ts:327](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L327)* +*Defined in [lib/source-destination/source-destination.ts:349](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L349)* + +**Parameters:** + +▪`Default value` **_options**: *object*= {} + +Name | Type | +------ | ------ | +`highWaterMark?` | undefined | number | **Returns:** *Promise‹WritableStream›* @@ -505,7 +521,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[emit](../interfaces/sparsereadable.md#emit)* -Defined in node_modules/@types/node/base.d.ts:693 +Defined in node_modules/@types/node/base.d.ts:908 **Parameters:** @@ -520,7 +536,7 @@ ___ ### eventNames -▸ **eventNames**(): *string | symbol[]* +▸ **eventNames**(): *Array‹string | symbol›* *Implementation of [AdapterSourceDestination](../interfaces/adaptersourcedestination.md)* @@ -528,9 +544,23 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[eventNames](../interfaces/sparsereadable.md#eventnames)* -Defined in node_modules/@types/node/base.d.ts:694 +Defined in node_modules/@types/node/base.d.ts:909 + +**Returns:** *Array‹string | symbol›* + +___ + +### getAlignment + +▸ **getAlignment**(): *number | undefined* -**Returns:** *string | symbol[]* +*Implementation of [AdapterSourceDestination](../interfaces/adaptersourcedestination.md)* + +*Inherited from [SourceSource](sourcesource.md).[getAlignment](sourcesource.md#getalignment)* + +*Defined in [lib/source-destination/source-destination.ts:276](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L276)* + +**Returns:** *number | undefined* ___ @@ -542,7 +572,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[getBlocks](sourcesource.md#getblocks)* -*Defined in [lib/source-destination/source-destination.ts:323](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L323)* +*Defined in [lib/source-destination/source-destination.ts:345](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L345)* **Returns:** *Promise‹[BlocksWithChecksum](../interfaces/blockswithchecksum.md)[]›* @@ -556,7 +586,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[getInnerSource](sourcesource.md#getinnersource)* -*Defined in [lib/source-destination/source-destination.ts:424](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L424)* +*Defined in [lib/source-destination/source-destination.ts:452](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L452)* **Returns:** *Promise‹[SourceDestination](sourcedestination.md)›* @@ -572,7 +602,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[getMaxListeners](../interfaces/sparsereadable.md#getmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:691 +Defined in node_modules/@types/node/base.d.ts:906 **Returns:** *number* @@ -586,7 +616,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[getMetadata](sourcesource.md#getmetadata)* -*Defined in [lib/source-destination/source-destination.ts:280](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L280)* +*Defined in [lib/source-destination/source-destination.ts:304](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L304)* **Returns:** *Promise‹[Metadata](../interfaces/metadata.md)›* @@ -600,7 +630,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[getPartitionTable](sourcesource.md#getpartitiontable)* -*Defined in [lib/source-destination/source-destination.ts:445](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L445)* +*Defined in [lib/source-destination/source-destination.ts:473](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L473)* **Returns:** *Promise‹GetPartitionsResult | undefined›* @@ -616,7 +646,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[listenerCount](../interfaces/sparsereadable.md#listenercount)* -Defined in node_modules/@types/node/base.d.ts:695 +Defined in node_modules/@types/node/base.d.ts:910 **Parameters:** @@ -638,7 +668,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[listeners](../interfaces/sparsereadable.md#listeners)* -Defined in node_modules/@types/node/base.d.ts:692 +Defined in node_modules/@types/node/base.d.ts:907 **Parameters:** @@ -652,22 +682,27 @@ ___ ### on -▸ **on**(`event`: string | symbol, `listener`: Function): *this* - -*Implementation of [AdapterSourceDestination](../interfaces/adaptersourcedestination.md)* +▸ **on**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[on](sourcesource.md#on)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[on](../interfaces/sparsereadable.md#on)* -Defined in node_modules/@types/node/base.d.ts:684 +Defined in node_modules/@types/node/base.d.ts:899 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -675,22 +710,27 @@ ___ ### once -▸ **once**(`event`: string | symbol, `listener`: Function): *this* - -*Implementation of [AdapterSourceDestination](../interfaces/adaptersourcedestination.md)* +▸ **once**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[once](sourcesource.md#once)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[once](../interfaces/sparsereadable.md#once)* -Defined in node_modules/@types/node/base.d.ts:685 +Defined in node_modules/@types/node/base.d.ts:900 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -704,7 +744,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[open](sourcesource.md#open)* -*Defined in [lib/source-destination/source-destination.ts:335](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L335)* +*Defined in [lib/source-destination/source-destination.ts:361](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L361)* **Returns:** *Promise‹void›* @@ -712,22 +752,27 @@ ___ ### prependListener -▸ **prependListener**(`event`: string | symbol, `listener`: Function): *this* - -*Implementation of [AdapterSourceDestination](../interfaces/adaptersourcedestination.md)* +▸ **prependListener**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[prependListener](sourcesource.md#prependlistener)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[prependListener](../interfaces/sparsereadable.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:686 +Defined in node_modules/@types/node/base.d.ts:901 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -735,22 +780,27 @@ ___ ### prependOnceListener -▸ **prependOnceListener**(`event`: string | symbol, `listener`: Function): *this* - -*Implementation of [AdapterSourceDestination](../interfaces/adaptersourcedestination.md)* +▸ **prependOnceListener**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[prependOnceListener](sourcesource.md#prependoncelistener)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[prependOnceListener](../interfaces/sparsereadable.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:687 +Defined in node_modules/@types/node/base.d.ts:902 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -758,19 +808,19 @@ ___ ### read -▸ **read**(`_buffer`: Buffer, `_bufferOffset`: number, `_length`: number, `_sourceOffset`: number): *Promise‹ReadResult›* +▸ **read**(`_buffer`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer), `_bufferOffset`: number, `_length`: number, `_sourceOffset`: number): *Promise‹ReadResult›* *Implementation of [AdapterSourceDestination](../interfaces/adaptersourcedestination.md)* *Inherited from [SourceSource](sourcesource.md).[read](sourcesource.md#read)* -*Defined in [lib/source-destination/source-destination.ts:291](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L291)* +*Defined in [lib/source-destination/source-destination.ts:315](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L315)* **Parameters:** Name | Type | ------ | ------ | -`_buffer` | Buffer | +`_buffer` | [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | `_bufferOffset` | number | `_length` | number | `_sourceOffset` | number | @@ -789,7 +839,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[removeAllListeners](../interfaces/sparsereadable.md#removealllisteners)* -Defined in node_modules/@types/node/base.d.ts:689 +Defined in node_modules/@types/node/base.d.ts:904 **Parameters:** @@ -803,22 +853,27 @@ ___ ### removeListener -▸ **removeListener**(`event`: string | symbol, `listener`: Function): *this* - -*Implementation of [AdapterSourceDestination](../interfaces/adaptersourcedestination.md)* +▸ **removeListener**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[removeListener](sourcesource.md#removelistener)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[removeListener](../interfaces/sparsereadable.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:688 +Defined in node_modules/@types/node/base.d.ts:903 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -834,7 +889,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[setMaxListeners](../interfaces/sparsereadable.md#setmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:690 +Defined in node_modules/@types/node/base.d.ts:905 **Parameters:** @@ -848,19 +903,19 @@ ___ ### write -▸ **write**(`_buffer`: Buffer, `_bufferOffset`: number, `_length`: number, `_fileOffset`: number): *Promise‹WriteResult›* +▸ **write**(`_buffer`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer), `_bufferOffset`: number, `_length`: number, `_fileOffset`: number): *Promise‹WriteResult›* *Implementation of [AdapterSourceDestination](../interfaces/adaptersourcedestination.md)* *Inherited from [SourceSource](sourcesource.md).[write](sourcesource.md#write)* -*Defined in [lib/source-destination/source-destination.ts:300](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L300)* +*Defined in [lib/source-destination/source-destination.ts:324](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L324)* **Parameters:** Name | Type | ------ | ------ | -`_buffer` | Buffer | +`_buffer` | [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | `_bufferOffset` | number | `_length` | number | `_fileOffset` | number | @@ -877,7 +932,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[listenerCount](countingwritable.md#static-listenercount)* -Defined in node_modules/@types/node/base.d.ts:680 +Defined in node_modules/@types/node/base.d.ts:895 **Parameters:** @@ -898,7 +953,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[register](sourcesource.md#static-register)* -*Defined in [lib/source-destination/source-destination.ts:250](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L250)* +*Defined in [lib/source-destination/source-destination.ts:270](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L270)* **Parameters:** diff --git a/doc/classes/driverlessdeviceadapter_.md b/doc/classes/driverlessdeviceadapter_.md index 34383999..ccd7d4b0 100644 --- a/doc/classes/driverlessdeviceadapter_.md +++ b/doc/classes/driverlessdeviceadapter_.md @@ -46,7 +46,7 @@ • **drives**: *Map‹string, [DriverlessDevice](driverlessdevice.md)›* = new Map() -*Defined in [lib/scanner/adapters/driverless.ts:30](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/scanner/adapters/driverless.ts#L30)* +*Defined in [lib/scanner/adapters/driverless.ts:30](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/scanner/adapters/driverless.ts#L30)* ___ @@ -54,7 +54,7 @@ ___ • **listDriverlessDevices**: *any* -*Defined in [lib/scanner/adapters/driverless.ts:33](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/scanner/adapters/driverless.ts#L33)* +*Defined in [lib/scanner/adapters/driverless.ts:33](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/scanner/adapters/driverless.ts#L33)* ___ @@ -62,7 +62,7 @@ ___ • **ready**: *boolean* = false -*Defined in [lib/scanner/adapters/driverless.ts:32](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/scanner/adapters/driverless.ts#L32)* +*Defined in [lib/scanner/adapters/driverless.ts:32](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/scanner/adapters/driverless.ts#L32)* ___ @@ -70,7 +70,7 @@ ___ • **running**: *boolean* = false -*Defined in [lib/scanner/adapters/driverless.ts:31](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/scanner/adapters/driverless.ts#L31)* +*Defined in [lib/scanner/adapters/driverless.ts:31](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/scanner/adapters/driverless.ts#L31)* ___ @@ -80,26 +80,33 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[defaultMaxListeners](countingwritable.md#static-defaultmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:681 +Defined in node_modules/@types/node/base.d.ts:896 ## Methods ### addListener -▸ **addListener**(`event`: string | symbol, `listener`: Function): *this* +▸ **addListener**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[addListener](sourcesource.md#addlistener)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[addListener](../interfaces/sparsereadable.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:683 +Defined in node_modules/@types/node/base.d.ts:898 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -113,7 +120,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[emit](../interfaces/sparsereadable.md#emit)* -Defined in node_modules/@types/node/base.d.ts:693 +Defined in node_modules/@types/node/base.d.ts:908 **Parameters:** @@ -128,15 +135,15 @@ ___ ### eventNames -▸ **eventNames**(): *string | symbol[]* +▸ **eventNames**(): *Array‹string | symbol›* *Inherited from [CountingWritable](countingwritable.md).[eventNames](countingwritable.md#eventnames)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[eventNames](../interfaces/sparsereadable.md#eventnames)* -Defined in node_modules/@types/node/base.d.ts:694 +Defined in node_modules/@types/node/base.d.ts:909 -**Returns:** *string | symbol[]* +**Returns:** *Array‹string | symbol›* ___ @@ -148,7 +155,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[getMaxListeners](../interfaces/sparsereadable.md#getmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:691 +Defined in node_modules/@types/node/base.d.ts:906 **Returns:** *number* @@ -158,7 +165,7 @@ ___ ▸ **listDrives**(): *Map‹string, WinUsbDriverlessDevice›* -*Defined in [lib/scanner/adapters/driverless.ts:88](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/scanner/adapters/driverless.ts#L88)* +*Defined in [lib/scanner/adapters/driverless.ts:88](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/scanner/adapters/driverless.ts#L88)* **Returns:** *Map‹string, WinUsbDriverlessDevice›* @@ -172,7 +179,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[listenerCount](../interfaces/sparsereadable.md#listenercount)* -Defined in node_modules/@types/node/base.d.ts:695 +Defined in node_modules/@types/node/base.d.ts:910 **Parameters:** @@ -192,7 +199,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[listeners](../interfaces/sparsereadable.md#listeners)* -Defined in node_modules/@types/node/base.d.ts:692 +Defined in node_modules/@types/node/base.d.ts:907 **Parameters:** @@ -206,20 +213,27 @@ ___ ### on -▸ **on**(`event`: string | symbol, `listener`: Function): *this* +▸ **on**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[on](sourcesource.md#on)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[on](../interfaces/sparsereadable.md#on)* -Defined in node_modules/@types/node/base.d.ts:684 +Defined in node_modules/@types/node/base.d.ts:899 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -227,20 +241,27 @@ ___ ### once -▸ **once**(`event`: string | symbol, `listener`: Function): *this* +▸ **once**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[once](sourcesource.md#once)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[once](../interfaces/sparsereadable.md#once)* -Defined in node_modules/@types/node/base.d.ts:685 +Defined in node_modules/@types/node/base.d.ts:900 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -248,20 +269,27 @@ ___ ### prependListener -▸ **prependListener**(`event`: string | symbol, `listener`: Function): *this* +▸ **prependListener**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[prependListener](sourcesource.md#prependlistener)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[prependListener](../interfaces/sparsereadable.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:686 +Defined in node_modules/@types/node/base.d.ts:901 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -269,20 +297,27 @@ ___ ### prependOnceListener -▸ **prependOnceListener**(`event`: string | symbol, `listener`: Function): *this* +▸ **prependOnceListener**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[prependOnceListener](sourcesource.md#prependoncelistener)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[prependOnceListener](../interfaces/sparsereadable.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:687 +Defined in node_modules/@types/node/base.d.ts:902 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -296,7 +331,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[removeAllListeners](../interfaces/sparsereadable.md#removealllisteners)* -Defined in node_modules/@types/node/base.d.ts:689 +Defined in node_modules/@types/node/base.d.ts:904 **Parameters:** @@ -310,20 +345,27 @@ ___ ### removeListener -▸ **removeListener**(`event`: string | symbol, `listener`: Function): *this* +▸ **removeListener**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[removeListener](sourcesource.md#removelistener)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[removeListener](../interfaces/sparsereadable.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:688 +Defined in node_modules/@types/node/base.d.ts:903 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -333,7 +375,7 @@ ___ ▸ **scan**(): *void* -*Defined in [lib/scanner/adapters/driverless.ts:63](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/scanner/adapters/driverless.ts#L63)* +*Defined in [lib/scanner/adapters/driverless.ts:63](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/scanner/adapters/driverless.ts#L63)* **Returns:** *void* @@ -343,7 +385,7 @@ ___ ▸ **scanLoop**(): *Promise‹void›* -*Defined in [lib/scanner/adapters/driverless.ts:46](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/scanner/adapters/driverless.ts#L46)* +*Defined in [lib/scanner/adapters/driverless.ts:46](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/scanner/adapters/driverless.ts#L46)* **Returns:** *Promise‹void›* @@ -357,7 +399,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[setMaxListeners](../interfaces/sparsereadable.md#setmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:690 +Defined in node_modules/@types/node/base.d.ts:905 **Parameters:** @@ -375,7 +417,7 @@ ___ *Overrides [Adapter](adapter.md).[start](adapter.md#abstract-start)* -*Defined in [lib/scanner/adapters/driverless.ts:35](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/scanner/adapters/driverless.ts#L35)* +*Defined in [lib/scanner/adapters/driverless.ts:35](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/scanner/adapters/driverless.ts#L35)* **Returns:** *void* @@ -387,7 +429,7 @@ ___ *Overrides [Adapter](adapter.md).[stop](adapter.md#abstract-stop)* -*Defined in [lib/scanner/adapters/driverless.ts:40](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/scanner/adapters/driverless.ts#L40)* +*Defined in [lib/scanner/adapters/driverless.ts:40](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/scanner/adapters/driverless.ts#L40)* **Returns:** *void* @@ -399,7 +441,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[listenerCount](countingwritable.md#static-listenercount)* -Defined in node_modules/@types/node/base.d.ts:680 +Defined in node_modules/@types/node/base.d.ts:895 **Parameters:** diff --git a/doc/classes/file.md b/doc/classes/file.md index 48353739..5d829809 100644 --- a/doc/classes/file.md +++ b/doc/classes/file.md @@ -18,19 +18,15 @@ ### Properties -* [blockSize](file.md#blocksize) * [fd](file.md#protected-fd) -* [flags](file.md#private-flags) -* [path](file.md#private-path) -* [OpenFlags](file.md#static-openflags) +* [oWrite](file.md#owrite) +* [path](file.md#path) * [defaultMaxListeners](file.md#static-defaultmaxlisteners) * [imageExtensions](file.md#static-imageextensions) * [mimetype](file.md#static-optional-mimetype) ### Methods -* [_canRead](file.md#private-_canread) -* [_canWrite](file.md#private-_canwrite) * [_close](file.md#protected-_close) * [_getMetadata](file.md#protected-_getmetadata) * [_open](file.md#protected-_open) @@ -49,10 +45,12 @@ * [createWriteStream](file.md#createwritestream) * [emit](file.md#emit) * [eventNames](file.md#eventnames) +* [getAlignment](file.md#getalignment) * [getBlocks](file.md#getblocks) * [getInnerSource](file.md#getinnersource) * [getMaxListeners](file.md#getmaxlisteners) * [getMetadata](file.md#getmetadata) +* [getOpenFlags](file.md#protected-getopenflags) * [getPartitionTable](file.md#getpartitiontable) * [listenerCount](file.md#listenercount) * [listeners](file.md#listeners) @@ -65,6 +63,7 @@ * [removeAllListeners](file.md#removealllisteners) * [removeListener](file.md#removelistener) * [setMaxListeners](file.md#setmaxlisteners) +* [streamOptions](file.md#private-streamoptions) * [write](file.md#write) * [listenerCount](file.md#static-listenercount) * [register](file.md#static-register) @@ -73,58 +72,42 @@ ### constructor -\+ **new File**(`path`: string, `flags`: [OpenFlags](../enums/openflags.md)): *[File](file.md)* +\+ **new File**(`path`: string, `oWrite`: boolean): *[File](file.md)* -*Defined in [lib/source-destination/file.ts:58](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/file.ts#L58)* +*Defined in [lib/source-destination/file.ts:51](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/file.ts#L51)* **Parameters:** -Name | Type | ------- | ------ | -`path` | string | -`flags` | [OpenFlags](../enums/openflags.md) | +Name | Type | Default | +------ | ------ | ------ | +`path` | string | - | +`oWrite` | boolean | false | **Returns:** *[File](file.md)* ## Properties -### blockSize - -• **blockSize**: *number* = 512 - -*Defined in [lib/source-destination/file.ts:58](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/file.ts#L58)* - -___ - ### `Protected` fd • **fd**: *number* -*Defined in [lib/source-destination/file.ts:57](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/file.ts#L57)* +*Defined in [lib/source-destination/file.ts:51](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/file.ts#L51)* ___ -### `Private` flags +### oWrite -• **flags**: *[OpenFlags](../enums/openflags.md)* +• **oWrite**: *boolean* -*Defined in [lib/source-destination/file.ts:60](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/file.ts#L60)* +*Defined in [lib/source-destination/file.ts:53](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/file.ts#L53)* ___ -### `Private` path +### path • **path**: *string* -*Defined in [lib/source-destination/file.ts:60](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/file.ts#L60)* - -___ - -### `Static` OpenFlags - -▪ **OpenFlags**: *[OpenFlags](../enums/openflags.md)* = OpenFlags - -*Defined in [lib/source-destination/file.ts:56](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/file.ts#L56)* +*Defined in [lib/source-destination/file.ts:53](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/file.ts#L53)* ___ @@ -134,7 +117,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[defaultMaxListeners](countingwritable.md#static-defaultmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:681 +Defined in node_modules/@types/node/base.d.ts:896 ___ @@ -155,7 +138,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[imageExtensions](sourcesource.md#static-imageextensions)* -*Defined in [lib/source-destination/source-destination.ts:232](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L232)* +*Defined in [lib/source-destination/source-destination.ts:252](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L252)* ___ @@ -165,37 +148,17 @@ ___ *Inherited from [SourceSource](sourcesource.md).[mimetype](sourcesource.md#static-optional-mimetype)* -*Defined in [lib/source-destination/source-destination.ts:244](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L244)* +*Defined in [lib/source-destination/source-destination.ts:264](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L264)* ## Methods -### `Private` _canRead - -▸ **_canRead**(): *boolean* - -*Defined in [lib/source-destination/file.ts:64](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/file.ts#L64)* - -**Returns:** *boolean* - -___ - -### `Private` _canWrite - -▸ **_canWrite**(): *boolean* - -*Defined in [lib/source-destination/file.ts:72](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/file.ts#L72)* - -**Returns:** *boolean* - -___ - ### `Protected` _close ▸ **_close**(): *Promise‹void›* *Overrides [SourceDestination](sourcedestination.md).[_close](sourcedestination.md#protected-_close)* -*Defined in [lib/source-destination/file.ts:156](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/file.ts#L156)* +*Defined in [lib/source-destination/file.ts:184](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/file.ts#L184)* **Returns:** *Promise‹void›* @@ -207,7 +170,7 @@ ___ *Overrides [SourceSource](sourcesource.md).[_getMetadata](sourcesource.md#protected-_getmetadata)* -*Defined in [lib/source-destination/file.ts:99](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/file.ts#L99)* +*Defined in [lib/source-destination/file.ts:81](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/file.ts#L81)* **Returns:** *Promise‹[Metadata](../interfaces/metadata.md)›* @@ -219,7 +182,7 @@ ___ *Overrides [SourceDestination](sourcedestination.md).[_open](sourcedestination.md#protected-_open)* -*Defined in [lib/source-destination/file.ts:152](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/file.ts#L152)* +*Defined in [lib/source-destination/file.ts:180](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/file.ts#L180)* **Returns:** *Promise‹void›* @@ -227,20 +190,27 @@ ___ ### addListener -▸ **addListener**(`event`: string | symbol, `listener`: Function): *this* +▸ **addListener**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[addListener](sourcesource.md#addlistener)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[addListener](../interfaces/sparsereadable.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:683 +Defined in node_modules/@types/node/base.d.ts:898 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -252,7 +222,7 @@ ___ *Overrides [SourceSource](sourcesource.md).[canCreateReadStream](sourcesource.md#cancreatereadstream)* -*Defined in [lib/source-destination/file.ts:87](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/file.ts#L87)* +*Defined in [lib/source-destination/file.ts:69](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/file.ts#L69)* **Returns:** *Promise‹boolean›* @@ -264,7 +234,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[canCreateSparseReadStream](sourcesource.md#cancreatesparsereadstream)* -*Defined in [lib/source-destination/source-destination.ts:268](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L268)* +*Defined in [lib/source-destination/source-destination.ts:292](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L292)* **Returns:** *Promise‹boolean›* @@ -276,7 +246,7 @@ ___ *Overrides [SourceSource](sourcesource.md).[canCreateSparseWriteStream](sourcesource.md#cancreatesparsewritestream)* -*Defined in [lib/source-destination/file.ts:95](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/file.ts#L95)* +*Defined in [lib/source-destination/file.ts:77](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/file.ts#L77)* **Returns:** *Promise‹boolean›* @@ -288,7 +258,7 @@ ___ *Overrides [SourceSource](sourcesource.md).[canCreateWriteStream](sourcesource.md#cancreatewritestream)* -*Defined in [lib/source-destination/file.ts:91](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/file.ts#L91)* +*Defined in [lib/source-destination/file.ts:73](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/file.ts#L73)* **Returns:** *Promise‹boolean›* @@ -300,7 +270,7 @@ ___ *Overrides [SourceSource](sourcesource.md).[canRead](sourcesource.md#canread)* -*Defined in [lib/source-destination/file.ts:79](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/file.ts#L79)* +*Defined in [lib/source-destination/file.ts:61](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/file.ts#L61)* **Returns:** *Promise‹boolean›* @@ -312,7 +282,7 @@ ___ *Overrides [SourceSource](sourcesource.md).[canWrite](sourcesource.md#canwrite)* -*Defined in [lib/source-destination/file.ts:83](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/file.ts#L83)* +*Defined in [lib/source-destination/file.ts:65](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/file.ts#L65)* **Returns:** *Promise‹boolean›* @@ -324,7 +294,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[close](sourcesource.md#close)* -*Defined in [lib/source-destination/source-destination.ts:342](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L342)* +*Defined in [lib/source-destination/source-destination.ts:368](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L368)* **Returns:** *Promise‹void›* @@ -332,19 +302,23 @@ ___ ### createReadStream -▸ **createReadStream**(`emitProgress`: boolean, `start`: number, `end?`: undefined | number): *Promise‹ReadableStream›* +▸ **createReadStream**(`__namedParameters`: object): *Promise‹ReadableStream›* *Overrides [SourceSource](sourcesource.md).[createReadStream](sourcesource.md#createreadstream)* -*Defined in [lib/source-destination/file.ts:124](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/file.ts#L124)* +*Defined in [lib/source-destination/file.ts:117](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/file.ts#L117)* **Parameters:** +▪`Default value` **__namedParameters**: *object*= {} + Name | Type | Default | ------ | ------ | ------ | +`alignment` | undefined | number | - | `emitProgress` | boolean | false | +`end` | undefined | number | - | +`numBuffers` | undefined | number | - | `start` | number | 0 | -`end?` | undefined | number | - | **Returns:** *Promise‹ReadableStream›* @@ -352,17 +326,17 @@ ___ ### createSparseReadStream -▸ **createSparseReadStream**(`_generateChecksums`: boolean): *Promise‹[SparseReadable](../interfaces/sparsereadable.md)›* +▸ **createSparseReadStream**(`_options`: [CreateSparseReadStreamOptions](../interfaces/createsparsereadstreamoptions.md)): *Promise‹[SparseReadable](../interfaces/sparsereadable.md)›* *Inherited from [SourceSource](sourcesource.md).[createSparseReadStream](sourcesource.md#createsparsereadstream)* -*Defined in [lib/source-destination/source-destination.ts:317](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L317)* +*Defined in [lib/source-destination/source-destination.ts:339](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L339)* **Parameters:** Name | Type | Default | ------ | ------ | ------ | -`_generateChecksums` | boolean | false | +`_options` | [CreateSparseReadStreamOptions](../interfaces/createsparsereadstreamoptions.md) | {} | **Returns:** *Promise‹[SparseReadable](../interfaces/sparsereadable.md)›* @@ -370,11 +344,19 @@ ___ ### createSparseWriteStream -▸ **createSparseWriteStream**(): *Promise‹[SparseWriteStream](sparsewritestream.md)›* +▸ **createSparseWriteStream**(`__namedParameters`: object): *Promise‹[SparseWriteStream](sparsewritestream.md)›* *Overrides [SourceSource](sourcesource.md).[createSparseWriteStream](sourcesource.md#createsparsewritestream)* -*Defined in [lib/source-destination/file.ts:146](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/file.ts#L146)* +*Defined in [lib/source-destination/file.ts:169](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/file.ts#L169)* + +**Parameters:** + +▪`Default value` **__namedParameters**: *object*= {} + +Name | Type | +------ | ------ | +`highWaterMark` | undefined | number | **Returns:** *Promise‹[SparseWriteStream](sparsewritestream.md)›* @@ -386,7 +368,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[createVerifier](sourcesource.md#createverifier)* -*Defined in [lib/source-destination/source-destination.ts:357](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L357)* +*Defined in [lib/source-destination/source-destination.ts:383](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L383)* **Parameters:** @@ -401,11 +383,19 @@ ___ ### createWriteStream -▸ **createWriteStream**(): *Promise‹WritableStream›* +▸ **createWriteStream**(`__namedParameters`: object): *Promise‹WritableStream›* *Overrides [SourceSource](sourcesource.md).[createWriteStream](sourcesource.md#createwritestream)* -*Defined in [lib/source-destination/file.ts:137](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/file.ts#L137)* +*Defined in [lib/source-destination/file.ts:155](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/file.ts#L155)* + +**Parameters:** + +▪`Default value` **__namedParameters**: *object*= {} + +Name | Type | +------ | ------ | +`highWaterMark` | undefined | number | **Returns:** *Promise‹WritableStream›* @@ -419,7 +409,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[emit](../interfaces/sparsereadable.md#emit)* -Defined in node_modules/@types/node/base.d.ts:693 +Defined in node_modules/@types/node/base.d.ts:908 **Parameters:** @@ -434,15 +424,27 @@ ___ ### eventNames -▸ **eventNames**(): *string | symbol[]* +▸ **eventNames**(): *Array‹string | symbol›* *Inherited from [CountingWritable](countingwritable.md).[eventNames](countingwritable.md#eventnames)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[eventNames](../interfaces/sparsereadable.md#eventnames)* -Defined in node_modules/@types/node/base.d.ts:694 +Defined in node_modules/@types/node/base.d.ts:909 + +**Returns:** *Array‹string | symbol›* + +___ + +### getAlignment + +▸ **getAlignment**(): *number | undefined* + +*Inherited from [SourceSource](sourcesource.md).[getAlignment](sourcesource.md#getalignment)* -**Returns:** *string | symbol[]* +*Defined in [lib/source-destination/source-destination.ts:276](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L276)* + +**Returns:** *number | undefined* ___ @@ -452,7 +454,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[getBlocks](sourcesource.md#getblocks)* -*Defined in [lib/source-destination/source-destination.ts:323](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L323)* +*Defined in [lib/source-destination/source-destination.ts:345](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L345)* **Returns:** *Promise‹[BlocksWithChecksum](../interfaces/blockswithchecksum.md)[]›* @@ -464,7 +466,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[getInnerSource](sourcesource.md#getinnersource)* -*Defined in [lib/source-destination/source-destination.ts:424](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L424)* +*Defined in [lib/source-destination/source-destination.ts:452](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L452)* **Returns:** *Promise‹[SourceDestination](sourcedestination.md)›* @@ -478,7 +480,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[getMaxListeners](../interfaces/sparsereadable.md#getmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:691 +Defined in node_modules/@types/node/base.d.ts:906 **Returns:** *number* @@ -490,19 +492,29 @@ ___ *Inherited from [SourceSource](sourcesource.md).[getMetadata](sourcesource.md#getmetadata)* -*Defined in [lib/source-destination/source-destination.ts:280](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L280)* +*Defined in [lib/source-destination/source-destination.ts:304](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L304)* **Returns:** *Promise‹[Metadata](../interfaces/metadata.md)›* ___ +### `Protected` getOpenFlags + +▸ **getOpenFlags**(): *number* + +*Defined in [lib/source-destination/file.ts:57](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/file.ts#L57)* + +**Returns:** *number* + +___ + ### getPartitionTable ▸ **getPartitionTable**(): *Promise‹GetPartitionsResult | undefined›* *Inherited from [SourceSource](sourcesource.md).[getPartitionTable](sourcesource.md#getpartitiontable)* -*Defined in [lib/source-destination/source-destination.ts:445](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L445)* +*Defined in [lib/source-destination/source-destination.ts:473](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L473)* **Returns:** *Promise‹GetPartitionsResult | undefined›* @@ -516,7 +528,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[listenerCount](../interfaces/sparsereadable.md#listenercount)* -Defined in node_modules/@types/node/base.d.ts:695 +Defined in node_modules/@types/node/base.d.ts:910 **Parameters:** @@ -536,7 +548,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[listeners](../interfaces/sparsereadable.md#listeners)* -Defined in node_modules/@types/node/base.d.ts:692 +Defined in node_modules/@types/node/base.d.ts:907 **Parameters:** @@ -550,20 +562,27 @@ ___ ### on -▸ **on**(`event`: string | symbol, `listener`: Function): *this* +▸ **on**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[on](sourcesource.md#on)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[on](../interfaces/sparsereadable.md#on)* -Defined in node_modules/@types/node/base.d.ts:684 +Defined in node_modules/@types/node/base.d.ts:899 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -571,20 +590,27 @@ ___ ### once -▸ **once**(`event`: string | symbol, `listener`: Function): *this* +▸ **once**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[once](sourcesource.md#once)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[once](../interfaces/sparsereadable.md#once)* -Defined in node_modules/@types/node/base.d.ts:685 +Defined in node_modules/@types/node/base.d.ts:900 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -596,7 +622,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[open](sourcesource.md#open)* -*Defined in [lib/source-destination/source-destination.ts:335](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L335)* +*Defined in [lib/source-destination/source-destination.ts:361](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L361)* **Returns:** *Promise‹void›* @@ -604,20 +630,27 @@ ___ ### prependListener -▸ **prependListener**(`event`: string | symbol, `listener`: Function): *this* +▸ **prependListener**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[prependListener](sourcesource.md#prependlistener)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[prependListener](../interfaces/sparsereadable.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:686 +Defined in node_modules/@types/node/base.d.ts:901 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -625,20 +658,27 @@ ___ ### prependOnceListener -▸ **prependOnceListener**(`event`: string | symbol, `listener`: Function): *this* +▸ **prependOnceListener**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[prependOnceListener](sourcesource.md#prependoncelistener)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[prependOnceListener](../interfaces/sparsereadable.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:687 +Defined in node_modules/@types/node/base.d.ts:902 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -646,17 +686,17 @@ ___ ### read -▸ **read**(`buffer`: Buffer, `bufferOffset`: number, `length`: number, `sourceOffset`: number): *Promise‹ReadResult›* +▸ **read**(`buffer`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer), `bufferOffset`: number, `length`: number, `sourceOffset`: number): *Promise‹ReadResult›* *Overrides [SourceSource](sourcesource.md).[read](sourcesource.md#read)* -*Defined in [lib/source-destination/file.ts:106](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/file.ts#L106)* +*Defined in [lib/source-destination/file.ts:88](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/file.ts#L88)* **Parameters:** Name | Type | ------ | ------ | -`buffer` | Buffer | +`buffer` | [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | `bufferOffset` | number | `length` | number | `sourceOffset` | number | @@ -673,7 +713,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[removeAllListeners](../interfaces/sparsereadable.md#removealllisteners)* -Defined in node_modules/@types/node/base.d.ts:689 +Defined in node_modules/@types/node/base.d.ts:904 **Parameters:** @@ -687,20 +727,27 @@ ___ ### removeListener -▸ **removeListener**(`event`: string | symbol, `listener`: Function): *this* +▸ **removeListener**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[removeListener](sourcesource.md#removelistener)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[removeListener](../interfaces/sparsereadable.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:688 +Defined in node_modules/@types/node/base.d.ts:903 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -714,7 +761,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[setMaxListeners](../interfaces/sparsereadable.md#setmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:690 +Defined in node_modules/@types/node/base.d.ts:905 **Parameters:** @@ -726,19 +773,46 @@ Name | Type | ___ +### `Private` streamOptions + +▸ **streamOptions**(`start?`: undefined | number, `end?`: undefined | number): *object* + +*Defined in [lib/source-destination/file.ts:106](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/file.ts#L106)* + +**Parameters:** + +Name | Type | +------ | ------ | +`start?` | undefined | number | +`end?` | undefined | number | + +**Returns:** *object* + +* **autoClose**: *boolean* = false + +* **end**: *undefined | number* + +* **fd**: *number* = this.fd + +* **highWaterMark**: *number* = CHUNK_SIZE + +* **start**: *undefined | number* + +___ + ### write -▸ **write**(`buffer`: Buffer, `bufferOffset`: number, `length`: number, `fileOffset`: number): *Promise‹WriteResult›* +▸ **write**(`buffer`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer), `bufferOffset`: number, `length`: number, `fileOffset`: number): *Promise‹WriteResult›* *Overrides [SourceSource](sourcesource.md).[write](sourcesource.md#write)* -*Defined in [lib/source-destination/file.ts:115](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/file.ts#L115)* +*Defined in [lib/source-destination/file.ts:97](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/file.ts#L97)* **Parameters:** Name | Type | ------ | ------ | -`buffer` | Buffer | +`buffer` | [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | `bufferOffset` | number | `length` | number | `fileOffset` | number | @@ -753,7 +827,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[listenerCount](countingwritable.md#static-listenercount)* -Defined in node_modules/@types/node/base.d.ts:680 +Defined in node_modules/@types/node/base.d.ts:895 **Parameters:** @@ -772,7 +846,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[register](sourcesource.md#static-register)* -*Defined in [lib/source-destination/source-destination.ts:250](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L250)* +*Defined in [lib/source-destination/source-destination.ts:270](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L270)* **Parameters:** diff --git a/doc/classes/gzipsource.md b/doc/classes/gzipsource.md index e6b18d0b..e06efd38 100644 --- a/doc/classes/gzipsource.md +++ b/doc/classes/gzipsource.md @@ -44,6 +44,7 @@ * [createWriteStream](gzipsource.md#createwritestream) * [emit](gzipsource.md#emit) * [eventNames](gzipsource.md#eventnames) +* [getAlignment](gzipsource.md#getalignment) * [getBlocks](gzipsource.md#getblocks) * [getInnerSource](gzipsource.md#getinnersource) * [getMaxListeners](gzipsource.md#getmaxlisteners) @@ -73,7 +74,7 @@ *Inherited from [SourceSource](sourcesource.md).[constructor](sourcesource.md#constructor)* -*Defined in [lib/source-destination/source-source.ts:20](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-source.ts#L20)* +*Defined in [lib/source-destination/source-source.ts:20](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-source.ts#L20)* **Parameters:** @@ -91,7 +92,7 @@ Name | Type | *Overrides [CompressedSource](compressedsource.md).[isSizeEstimated](compressedsource.md#protected-issizeestimated)* -*Defined in [lib/source-destination/gzip.ts:27](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/gzip.ts#L27)* +*Defined in [lib/source-destination/gzip.ts:27](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/gzip.ts#L27)* ___ @@ -101,7 +102,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[source](sourcesource.md#protected-source)* -*Defined in [lib/source-destination/source-source.ts:22](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-source.ts#L22)* +*Defined in [lib/source-destination/source-source.ts:22](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-source.ts#L22)* ___ @@ -111,7 +112,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[defaultMaxListeners](countingwritable.md#static-defaultmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:681 +Defined in node_modules/@types/node/base.d.ts:896 ___ @@ -132,7 +133,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[imageExtensions](sourcesource.md#static-imageextensions)* -*Defined in [lib/source-destination/source-destination.ts:232](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L232)* +*Defined in [lib/source-destination/source-destination.ts:252](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L252)* ___ @@ -142,7 +143,7 @@ ___ *Overrides [SourceSource](sourcesource.md).[mimetype](sourcesource.md#static-optional-mimetype)* -*Defined in [lib/source-destination/gzip.ts:26](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/gzip.ts#L26)* +*Defined in [lib/source-destination/gzip.ts:26](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/gzip.ts#L26)* ___ @@ -152,7 +153,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[requiresRandomReadableSource](sourcesource.md#static-requiresrandomreadablesource)* -*Defined in [lib/source-destination/source-source.ts:20](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-source.ts#L20)* +*Defined in [lib/source-destination/source-source.ts:20](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-source.ts#L20)* ## Methods @@ -164,7 +165,7 @@ ___ *Overrides [SourceDestination](sourcedestination.md).[_close](sourcedestination.md#protected-_close)* -*Defined in [lib/source-destination/source-source.ts:30](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-source.ts#L30)* +*Defined in [lib/source-destination/source-source.ts:30](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-source.ts#L30)* **Returns:** *Promise‹void›* @@ -178,7 +179,7 @@ ___ *Overrides [SourceSource](sourcesource.md).[_getMetadata](sourcesource.md#protected-_getmetadata)* -*Defined in [lib/source-destination/compressed-source.ts:84](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/compressed-source.ts#L84)* +*Defined in [lib/source-destination/compressed-source.ts:85](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/compressed-source.ts#L85)* **Returns:** *Promise‹[Metadata](../interfaces/metadata.md)›* @@ -192,7 +193,7 @@ ___ *Overrides [SourceDestination](sourcedestination.md).[_open](sourcedestination.md#protected-_open)* -*Defined in [lib/source-destination/source-source.ts:26](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-source.ts#L26)* +*Defined in [lib/source-destination/source-source.ts:26](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-source.ts#L26)* **Returns:** *Promise‹void›* @@ -200,20 +201,27 @@ ___ ### addListener -▸ **addListener**(`event`: string | symbol, `listener`: Function): *this* +▸ **addListener**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[addListener](sourcesource.md#addlistener)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[addListener](../interfaces/sparsereadable.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:683 +Defined in node_modules/@types/node/base.d.ts:898 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -227,7 +235,7 @@ ___ *Overrides [SourceSource](sourcesource.md).[canCreateReadStream](sourcesource.md#cancreatereadstream)* -*Defined in [lib/source-destination/compressed-source.ts:50](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/compressed-source.ts#L50)* +*Defined in [lib/source-destination/compressed-source.ts:51](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/compressed-source.ts#L51)* **Returns:** *Promise‹boolean›* @@ -239,7 +247,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[canCreateSparseReadStream](sourcesource.md#cancreatesparsereadstream)* -*Defined in [lib/source-destination/source-destination.ts:268](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L268)* +*Defined in [lib/source-destination/source-destination.ts:292](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L292)* **Returns:** *Promise‹boolean›* @@ -251,7 +259,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[canCreateSparseWriteStream](sourcesource.md#cancreatesparsewritestream)* -*Defined in [lib/source-destination/source-destination.ts:276](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L276)* +*Defined in [lib/source-destination/source-destination.ts:300](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L300)* **Returns:** *Promise‹boolean›* @@ -263,7 +271,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[canCreateWriteStream](sourcesource.md#cancreatewritestream)* -*Defined in [lib/source-destination/source-destination.ts:272](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L272)* +*Defined in [lib/source-destination/source-destination.ts:296](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L296)* **Returns:** *Promise‹boolean›* @@ -275,7 +283,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[canRead](sourcesource.md#canread)* -*Defined in [lib/source-destination/source-destination.ts:256](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L256)* +*Defined in [lib/source-destination/source-destination.ts:280](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L280)* **Returns:** *Promise‹boolean›* @@ -287,7 +295,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[canWrite](sourcesource.md#canwrite)* -*Defined in [lib/source-destination/source-destination.ts:260](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L260)* +*Defined in [lib/source-destination/source-destination.ts:284](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L284)* **Returns:** *Promise‹boolean›* @@ -299,7 +307,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[close](sourcesource.md#close)* -*Defined in [lib/source-destination/source-destination.ts:342](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L342)* +*Defined in [lib/source-destination/source-destination.ts:368](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L368)* **Returns:** *Promise‹void›* @@ -307,21 +315,23 @@ ___ ### createReadStream -▸ **createReadStream**(`emitProgress`: boolean, `start`: number, `end?`: undefined | number): *Promise‹[SourceTransform](../interfaces/sourcetransform.md)›* +▸ **createReadStream**(`__namedParameters`: object): *Promise‹[SourceTransform](../interfaces/sourcetransform.md)›* *Inherited from [CompressedSource](compressedsource.md).[createReadStream](compressedsource.md#createreadstream)* *Overrides [SourceSource](sourcesource.md).[createReadStream](sourcesource.md#createreadstream)* -*Defined in [lib/source-destination/compressed-source.ts:54](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/compressed-source.ts#L54)* +*Defined in [lib/source-destination/compressed-source.ts:55](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/compressed-source.ts#L55)* **Parameters:** +▪`Default value` **__namedParameters**: *object*= {} + Name | Type | Default | ------ | ------ | ------ | `emitProgress` | boolean | false | +`end` | undefined | number | - | `start` | number | 0 | -`end?` | undefined | number | - | **Returns:** *Promise‹[SourceTransform](../interfaces/sourcetransform.md)›* @@ -329,17 +339,17 @@ ___ ### createSparseReadStream -▸ **createSparseReadStream**(`_generateChecksums`: boolean): *Promise‹[SparseReadable](../interfaces/sparsereadable.md)›* +▸ **createSparseReadStream**(`_options`: [CreateSparseReadStreamOptions](../interfaces/createsparsereadstreamoptions.md)): *Promise‹[SparseReadable](../interfaces/sparsereadable.md)›* *Inherited from [SourceSource](sourcesource.md).[createSparseReadStream](sourcesource.md#createsparsereadstream)* -*Defined in [lib/source-destination/source-destination.ts:317](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L317)* +*Defined in [lib/source-destination/source-destination.ts:339](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L339)* **Parameters:** Name | Type | Default | ------ | ------ | ------ | -`_generateChecksums` | boolean | false | +`_options` | [CreateSparseReadStreamOptions](../interfaces/createsparsereadstreamoptions.md) | {} | **Returns:** *Promise‹[SparseReadable](../interfaces/sparsereadable.md)›* @@ -347,11 +357,19 @@ ___ ### createSparseWriteStream -▸ **createSparseWriteStream**(): *Promise‹[SparseWritable](../interfaces/sparsewritable.md)›* +▸ **createSparseWriteStream**(`_options`: object): *Promise‹[SparseWritable](../interfaces/sparsewritable.md)›* *Inherited from [SourceSource](sourcesource.md).[createSparseWriteStream](sourcesource.md#createsparsewritestream)* -*Defined in [lib/source-destination/source-destination.ts:331](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L331)* +*Defined in [lib/source-destination/source-destination.ts:355](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L355)* + +**Parameters:** + +▪`Default value` **_options**: *object*= {} + +Name | Type | +------ | ------ | +`highWaterMark?` | undefined | number | **Returns:** *Promise‹[SparseWritable](../interfaces/sparsewritable.md)›* @@ -363,7 +381,7 @@ ___ *Overrides [CompressedSource](compressedsource.md).[createTransform](compressedsource.md#protected-abstract-createtransform)* -*Defined in [lib/source-destination/gzip.ts:29](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/gzip.ts#L29)* +*Defined in [lib/source-destination/gzip.ts:29](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/gzip.ts#L29)* **Returns:** *Transform* @@ -375,7 +393,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[createVerifier](sourcesource.md#createverifier)* -*Defined in [lib/source-destination/source-destination.ts:357](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L357)* +*Defined in [lib/source-destination/source-destination.ts:383](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L383)* **Parameters:** @@ -390,11 +408,19 @@ ___ ### createWriteStream -▸ **createWriteStream**(): *Promise‹WritableStream›* +▸ **createWriteStream**(`_options`: object): *Promise‹WritableStream›* *Inherited from [SourceSource](sourcesource.md).[createWriteStream](sourcesource.md#createwritestream)* -*Defined in [lib/source-destination/source-destination.ts:327](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L327)* +*Defined in [lib/source-destination/source-destination.ts:349](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L349)* + +**Parameters:** + +▪`Default value` **_options**: *object*= {} + +Name | Type | +------ | ------ | +`highWaterMark?` | undefined | number | **Returns:** *Promise‹WritableStream›* @@ -408,7 +434,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[emit](../interfaces/sparsereadable.md#emit)* -Defined in node_modules/@types/node/base.d.ts:693 +Defined in node_modules/@types/node/base.d.ts:908 **Parameters:** @@ -423,15 +449,27 @@ ___ ### eventNames -▸ **eventNames**(): *string | symbol[]* +▸ **eventNames**(): *Array‹string | symbol›* *Inherited from [CountingWritable](countingwritable.md).[eventNames](countingwritable.md#eventnames)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[eventNames](../interfaces/sparsereadable.md#eventnames)* -Defined in node_modules/@types/node/base.d.ts:694 +Defined in node_modules/@types/node/base.d.ts:909 -**Returns:** *string | symbol[]* +**Returns:** *Array‹string | symbol›* + +___ + +### getAlignment + +▸ **getAlignment**(): *number | undefined* + +*Inherited from [SourceSource](sourcesource.md).[getAlignment](sourcesource.md#getalignment)* + +*Defined in [lib/source-destination/source-destination.ts:276](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L276)* + +**Returns:** *number | undefined* ___ @@ -441,7 +479,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[getBlocks](sourcesource.md#getblocks)* -*Defined in [lib/source-destination/source-destination.ts:323](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L323)* +*Defined in [lib/source-destination/source-destination.ts:345](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L345)* **Returns:** *Promise‹[BlocksWithChecksum](../interfaces/blockswithchecksum.md)[]›* @@ -453,7 +491,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[getInnerSource](sourcesource.md#getinnersource)* -*Defined in [lib/source-destination/source-destination.ts:424](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L424)* +*Defined in [lib/source-destination/source-destination.ts:452](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L452)* **Returns:** *Promise‹[SourceDestination](sourcedestination.md)›* @@ -467,7 +505,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[getMaxListeners](../interfaces/sparsereadable.md#getmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:691 +Defined in node_modules/@types/node/base.d.ts:906 **Returns:** *number* @@ -479,7 +517,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[getMetadata](sourcesource.md#getmetadata)* -*Defined in [lib/source-destination/source-destination.ts:280](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L280)* +*Defined in [lib/source-destination/source-destination.ts:304](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L304)* **Returns:** *Promise‹[Metadata](../interfaces/metadata.md)›* @@ -491,7 +529,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[getPartitionTable](sourcesource.md#getpartitiontable)* -*Defined in [lib/source-destination/source-destination.ts:445](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L445)* +*Defined in [lib/source-destination/source-destination.ts:473](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L473)* **Returns:** *Promise‹GetPartitionsResult | undefined›* @@ -503,7 +541,7 @@ ___ *Overrides [CompressedSource](compressedsource.md).[getSize](compressedsource.md#protected-getsize)* -*Defined in [lib/source-destination/gzip.ts:33](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/gzip.ts#L33)* +*Defined in [lib/source-destination/gzip.ts:33](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/gzip.ts#L33)* **Returns:** *Promise‹number | undefined›* @@ -517,7 +555,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[listenerCount](../interfaces/sparsereadable.md#listenercount)* -Defined in node_modules/@types/node/base.d.ts:695 +Defined in node_modules/@types/node/base.d.ts:910 **Parameters:** @@ -537,7 +575,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[listeners](../interfaces/sparsereadable.md#listeners)* -Defined in node_modules/@types/node/base.d.ts:692 +Defined in node_modules/@types/node/base.d.ts:907 **Parameters:** @@ -551,20 +589,27 @@ ___ ### on -▸ **on**(`event`: string | symbol, `listener`: Function): *this* +▸ **on**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[on](sourcesource.md#on)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[on](../interfaces/sparsereadable.md#on)* -Defined in node_modules/@types/node/base.d.ts:684 +Defined in node_modules/@types/node/base.d.ts:899 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -572,20 +617,27 @@ ___ ### once -▸ **once**(`event`: string | symbol, `listener`: Function): *this* +▸ **once**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[once](sourcesource.md#once)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[once](../interfaces/sparsereadable.md#once)* -Defined in node_modules/@types/node/base.d.ts:685 +Defined in node_modules/@types/node/base.d.ts:900 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -597,7 +649,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[open](sourcesource.md#open)* -*Defined in [lib/source-destination/source-destination.ts:335](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L335)* +*Defined in [lib/source-destination/source-destination.ts:361](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L361)* **Returns:** *Promise‹void›* @@ -605,20 +657,27 @@ ___ ### prependListener -▸ **prependListener**(`event`: string | symbol, `listener`: Function): *this* +▸ **prependListener**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[prependListener](sourcesource.md#prependlistener)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[prependListener](../interfaces/sparsereadable.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:686 +Defined in node_modules/@types/node/base.d.ts:901 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -626,20 +685,27 @@ ___ ### prependOnceListener -▸ **prependOnceListener**(`event`: string | symbol, `listener`: Function): *this* +▸ **prependOnceListener**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[prependOnceListener](sourcesource.md#prependoncelistener)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[prependOnceListener](../interfaces/sparsereadable.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:687 +Defined in node_modules/@types/node/base.d.ts:902 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -647,17 +713,17 @@ ___ ### read -▸ **read**(`_buffer`: Buffer, `_bufferOffset`: number, `_length`: number, `_sourceOffset`: number): *Promise‹ReadResult›* +▸ **read**(`_buffer`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer), `_bufferOffset`: number, `_length`: number, `_sourceOffset`: number): *Promise‹ReadResult›* *Inherited from [SourceSource](sourcesource.md).[read](sourcesource.md#read)* -*Defined in [lib/source-destination/source-destination.ts:291](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L291)* +*Defined in [lib/source-destination/source-destination.ts:315](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L315)* **Parameters:** Name | Type | ------ | ------ | -`_buffer` | Buffer | +`_buffer` | [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | `_bufferOffset` | number | `_length` | number | `_sourceOffset` | number | @@ -674,7 +740,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[removeAllListeners](../interfaces/sparsereadable.md#removealllisteners)* -Defined in node_modules/@types/node/base.d.ts:689 +Defined in node_modules/@types/node/base.d.ts:904 **Parameters:** @@ -688,20 +754,27 @@ ___ ### removeListener -▸ **removeListener**(`event`: string | symbol, `listener`: Function): *this* +▸ **removeListener**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[removeListener](sourcesource.md#removelistener)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[removeListener](../interfaces/sparsereadable.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:688 +Defined in node_modules/@types/node/base.d.ts:903 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -715,7 +788,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[setMaxListeners](../interfaces/sparsereadable.md#setmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:690 +Defined in node_modules/@types/node/base.d.ts:905 **Parameters:** @@ -729,17 +802,17 @@ ___ ### write -▸ **write**(`_buffer`: Buffer, `_bufferOffset`: number, `_length`: number, `_fileOffset`: number): *Promise‹WriteResult›* +▸ **write**(`_buffer`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer), `_bufferOffset`: number, `_length`: number, `_fileOffset`: number): *Promise‹WriteResult›* *Inherited from [SourceSource](sourcesource.md).[write](sourcesource.md#write)* -*Defined in [lib/source-destination/source-destination.ts:300](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L300)* +*Defined in [lib/source-destination/source-destination.ts:324](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L324)* **Parameters:** Name | Type | ------ | ------ | -`_buffer` | Buffer | +`_buffer` | [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | `_bufferOffset` | number | `_length` | number | `_fileOffset` | number | @@ -754,7 +827,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[listenerCount](countingwritable.md#static-listenercount)* -Defined in node_modules/@types/node/base.d.ts:680 +Defined in node_modules/@types/node/base.d.ts:895 **Parameters:** @@ -773,7 +846,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[register](sourcesource.md#static-register)* -*Defined in [lib/source-destination/source-destination.ts:250](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L250)* +*Defined in [lib/source-destination/source-destination.ts:270](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L270)* **Parameters:** diff --git a/doc/classes/http.md b/doc/classes/http.md index fd077443..ed614d98 100644 --- a/doc/classes/http.md +++ b/doc/classes/http.md @@ -45,6 +45,7 @@ * [createWriteStream](http.md#createwritestream) * [emit](http.md#emit) * [eventNames](http.md#eventnames) +* [getAlignment](http.md#getalignment) * [getBlocks](http.md#getblocks) * [getInfo](http.md#private-getinfo) * [getInnerSource](http.md#getinnersource) @@ -73,7 +74,7 @@ \+ **new Http**(`url`: string): *[Http](http.md)* -*Defined in [lib/source-destination/http.ts:36](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/http.ts#L36)* +*Defined in [lib/source-destination/http.ts:39](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/http.ts#L39)* **Parameters:** @@ -89,7 +90,7 @@ Name | Type | • **acceptsRange**: *boolean* -*Defined in [lib/source-destination/http.ts:34](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/http.ts#L34)* +*Defined in [lib/source-destination/http.ts:37](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/http.ts#L37)* ___ @@ -97,7 +98,7 @@ ___ • **error**: *[Error](notcapable.md#static-error)* -*Defined in [lib/source-destination/http.ts:36](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/http.ts#L36)* +*Defined in [lib/source-destination/http.ts:39](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/http.ts#L39)* ___ @@ -105,7 +106,7 @@ ___ • **ready**: *Promise‹void›* -*Defined in [lib/source-destination/http.ts:35](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/http.ts#L35)* +*Defined in [lib/source-destination/http.ts:38](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/http.ts#L38)* ___ @@ -113,7 +114,7 @@ ___ • **size**: *number* -*Defined in [lib/source-destination/http.ts:33](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/http.ts#L33)* +*Defined in [lib/source-destination/http.ts:36](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/http.ts#L36)* ___ @@ -121,7 +122,7 @@ ___ • **url**: *string* -*Defined in [lib/source-destination/http.ts:38](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/http.ts#L38)* +*Defined in [lib/source-destination/http.ts:41](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/http.ts#L41)* ___ @@ -131,7 +132,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[defaultMaxListeners](countingwritable.md#static-defaultmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:681 +Defined in node_modules/@types/node/base.d.ts:896 ___ @@ -152,7 +153,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[imageExtensions](sourcesource.md#static-imageextensions)* -*Defined in [lib/source-destination/source-destination.ts:232](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L232)* +*Defined in [lib/source-destination/source-destination.ts:252](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L252)* ___ @@ -162,7 +163,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[mimetype](sourcesource.md#static-optional-mimetype)* -*Defined in [lib/source-destination/source-destination.ts:244](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L244)* +*Defined in [lib/source-destination/source-destination.ts:264](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L264)* ## Methods @@ -172,7 +173,7 @@ ___ *Inherited from [SourceDestination](sourcedestination.md).[_close](sourcedestination.md#protected-_close)* -*Defined in [lib/source-destination/source-destination.ts:353](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L353)* +*Defined in [lib/source-destination/source-destination.ts:379](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L379)* **Returns:** *Promise‹void›* @@ -184,7 +185,7 @@ ___ *Overrides [SourceSource](sourcesource.md).[_getMetadata](sourcesource.md#protected-_getmetadata)* -*Defined in [lib/source-destination/http.ts:65](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/http.ts#L65)* +*Defined in [lib/source-destination/http.ts:68](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/http.ts#L68)* **Returns:** *Promise‹[Metadata](../interfaces/metadata.md)›* @@ -196,7 +197,7 @@ ___ *Inherited from [SourceDestination](sourcedestination.md).[_open](sourcedestination.md#protected-_open)* -*Defined in [lib/source-destination/source-destination.ts:349](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L349)* +*Defined in [lib/source-destination/source-destination.ts:375](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L375)* **Returns:** *Promise‹void›* @@ -204,20 +205,27 @@ ___ ### addListener -▸ **addListener**(`event`: string | symbol, `listener`: Function): *this* +▸ **addListener**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[addListener](sourcesource.md#addlistener)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[addListener](../interfaces/sparsereadable.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:683 +Defined in node_modules/@types/node/base.d.ts:898 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -229,7 +237,7 @@ ___ *Overrides [SourceSource](sourcesource.md).[canCreateReadStream](sourcesource.md#cancreatereadstream)* -*Defined in [lib/source-destination/http.ts:61](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/http.ts#L61)* +*Defined in [lib/source-destination/http.ts:64](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/http.ts#L64)* **Returns:** *Promise‹boolean›* @@ -241,7 +249,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[canCreateSparseReadStream](sourcesource.md#cancreatesparsereadstream)* -*Defined in [lib/source-destination/source-destination.ts:268](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L268)* +*Defined in [lib/source-destination/source-destination.ts:292](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L292)* **Returns:** *Promise‹boolean›* @@ -253,7 +261,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[canCreateSparseWriteStream](sourcesource.md#cancreatesparsewritestream)* -*Defined in [lib/source-destination/source-destination.ts:276](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L276)* +*Defined in [lib/source-destination/source-destination.ts:300](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L300)* **Returns:** *Promise‹boolean›* @@ -265,7 +273,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[canCreateWriteStream](sourcesource.md#cancreatewritestream)* -*Defined in [lib/source-destination/source-destination.ts:272](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L272)* +*Defined in [lib/source-destination/source-destination.ts:296](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L296)* **Returns:** *Promise‹boolean›* @@ -277,7 +285,7 @@ ___ *Overrides [SourceSource](sourcesource.md).[canRead](sourcesource.md#canread)* -*Defined in [lib/source-destination/http.ts:53](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/http.ts#L53)* +*Defined in [lib/source-destination/http.ts:56](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/http.ts#L56)* **Returns:** *Promise‹boolean›* @@ -289,7 +297,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[canWrite](sourcesource.md#canwrite)* -*Defined in [lib/source-destination/source-destination.ts:260](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L260)* +*Defined in [lib/source-destination/source-destination.ts:284](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L284)* **Returns:** *Promise‹boolean›* @@ -301,7 +309,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[close](sourcesource.md#close)* -*Defined in [lib/source-destination/source-destination.ts:342](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L342)* +*Defined in [lib/source-destination/source-destination.ts:368](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L368)* **Returns:** *Promise‹void›* @@ -309,19 +317,21 @@ ___ ### createReadStream -▸ **createReadStream**(`emitProgress`: boolean, `start`: number, `end?`: undefined | number): *Promise‹ReadableStream›* +▸ **createReadStream**(`__namedParameters`: object): *Promise‹ReadableStream›* *Overrides [SourceSource](sourcesource.md).[createReadStream](sourcesource.md#createreadstream)* -*Defined in [lib/source-destination/http.ts:110](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/http.ts#L110)* +*Defined in [lib/source-destination/http.ts:113](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/http.ts#L113)* **Parameters:** +▪`Default value` **__namedParameters**: *object*= {} + Name | Type | Default | ------ | ------ | ------ | `emitProgress` | boolean | false | +`end` | undefined | number | - | `start` | number | 0 | -`end?` | undefined | number | - | **Returns:** *Promise‹ReadableStream›* @@ -329,17 +339,17 @@ ___ ### createSparseReadStream -▸ **createSparseReadStream**(`_generateChecksums`: boolean): *Promise‹[SparseReadable](../interfaces/sparsereadable.md)›* +▸ **createSparseReadStream**(`_options`: [CreateSparseReadStreamOptions](../interfaces/createsparsereadstreamoptions.md)): *Promise‹[SparseReadable](../interfaces/sparsereadable.md)›* *Inherited from [SourceSource](sourcesource.md).[createSparseReadStream](sourcesource.md#createsparsereadstream)* -*Defined in [lib/source-destination/source-destination.ts:317](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L317)* +*Defined in [lib/source-destination/source-destination.ts:339](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L339)* **Parameters:** Name | Type | Default | ------ | ------ | ------ | -`_generateChecksums` | boolean | false | +`_options` | [CreateSparseReadStreamOptions](../interfaces/createsparsereadstreamoptions.md) | {} | **Returns:** *Promise‹[SparseReadable](../interfaces/sparsereadable.md)›* @@ -347,11 +357,19 @@ ___ ### createSparseWriteStream -▸ **createSparseWriteStream**(): *Promise‹[SparseWritable](../interfaces/sparsewritable.md)›* +▸ **createSparseWriteStream**(`_options`: object): *Promise‹[SparseWritable](../interfaces/sparsewritable.md)›* *Inherited from [SourceSource](sourcesource.md).[createSparseWriteStream](sourcesource.md#createsparsewritestream)* -*Defined in [lib/source-destination/source-destination.ts:331](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L331)* +*Defined in [lib/source-destination/source-destination.ts:355](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L355)* + +**Parameters:** + +▪`Default value` **_options**: *object*= {} + +Name | Type | +------ | ------ | +`highWaterMark?` | undefined | number | **Returns:** *Promise‹[SparseWritable](../interfaces/sparsewritable.md)›* @@ -363,7 +381,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[createVerifier](sourcesource.md#createverifier)* -*Defined in [lib/source-destination/source-destination.ts:357](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L357)* +*Defined in [lib/source-destination/source-destination.ts:383](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L383)* **Parameters:** @@ -378,11 +396,19 @@ ___ ### createWriteStream -▸ **createWriteStream**(): *Promise‹WritableStream›* +▸ **createWriteStream**(`_options`: object): *Promise‹WritableStream›* *Inherited from [SourceSource](sourcesource.md).[createWriteStream](sourcesource.md#createwritestream)* -*Defined in [lib/source-destination/source-destination.ts:327](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L327)* +*Defined in [lib/source-destination/source-destination.ts:349](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L349)* + +**Parameters:** + +▪`Default value` **_options**: *object*= {} + +Name | Type | +------ | ------ | +`highWaterMark?` | undefined | number | **Returns:** *Promise‹WritableStream›* @@ -396,7 +422,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[emit](../interfaces/sparsereadable.md#emit)* -Defined in node_modules/@types/node/base.d.ts:693 +Defined in node_modules/@types/node/base.d.ts:908 **Parameters:** @@ -411,15 +437,27 @@ ___ ### eventNames -▸ **eventNames**(): *string | symbol[]* +▸ **eventNames**(): *Array‹string | symbol›* *Inherited from [CountingWritable](countingwritable.md).[eventNames](countingwritable.md#eventnames)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[eventNames](../interfaces/sparsereadable.md#eventnames)* -Defined in node_modules/@types/node/base.d.ts:694 +Defined in node_modules/@types/node/base.d.ts:909 + +**Returns:** *Array‹string | symbol›* + +___ + +### getAlignment + +▸ **getAlignment**(): *number | undefined* + +*Inherited from [SourceSource](sourcesource.md).[getAlignment](sourcesource.md#getalignment)* + +*Defined in [lib/source-destination/source-destination.ts:276](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L276)* -**Returns:** *string | symbol[]* +**Returns:** *number | undefined* ___ @@ -429,7 +467,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[getBlocks](sourcesource.md#getblocks)* -*Defined in [lib/source-destination/source-destination.ts:323](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L323)* +*Defined in [lib/source-destination/source-destination.ts:345](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L345)* **Returns:** *Promise‹[BlocksWithChecksum](../interfaces/blockswithchecksum.md)[]›* @@ -439,7 +477,7 @@ ___ ▸ **getInfo**(): *Promise‹void›* -*Defined in [lib/source-destination/http.ts:43](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/http.ts#L43)* +*Defined in [lib/source-destination/http.ts:46](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/http.ts#L46)* **Returns:** *Promise‹void›* @@ -451,7 +489,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[getInnerSource](sourcesource.md#getinnersource)* -*Defined in [lib/source-destination/source-destination.ts:424](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L424)* +*Defined in [lib/source-destination/source-destination.ts:452](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L452)* **Returns:** *Promise‹[SourceDestination](sourcedestination.md)›* @@ -465,7 +503,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[getMaxListeners](../interfaces/sparsereadable.md#getmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:691 +Defined in node_modules/@types/node/base.d.ts:906 **Returns:** *number* @@ -477,7 +515,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[getMetadata](sourcesource.md#getmetadata)* -*Defined in [lib/source-destination/source-destination.ts:280](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L280)* +*Defined in [lib/source-destination/source-destination.ts:304](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L304)* **Returns:** *Promise‹[Metadata](../interfaces/metadata.md)›* @@ -489,7 +527,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[getPartitionTable](sourcesource.md#getpartitiontable)* -*Defined in [lib/source-destination/source-destination.ts:445](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L445)* +*Defined in [lib/source-destination/source-destination.ts:473](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L473)* **Returns:** *Promise‹GetPartitionsResult | undefined›* @@ -499,7 +537,7 @@ ___ ▸ **getRange**(`start`: number, `end?`: undefined | number): *string* -*Defined in [lib/source-destination/http.ts:81](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/http.ts#L81)* +*Defined in [lib/source-destination/http.ts:84](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/http.ts#L84)* **Parameters:** @@ -520,7 +558,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[listenerCount](../interfaces/sparsereadable.md#listenercount)* -Defined in node_modules/@types/node/base.d.ts:695 +Defined in node_modules/@types/node/base.d.ts:910 **Parameters:** @@ -540,7 +578,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[listeners](../interfaces/sparsereadable.md#listeners)* -Defined in node_modules/@types/node/base.d.ts:692 +Defined in node_modules/@types/node/base.d.ts:907 **Parameters:** @@ -554,20 +592,27 @@ ___ ### on -▸ **on**(`event`: string | symbol, `listener`: Function): *this* +▸ **on**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[on](sourcesource.md#on)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[on](../interfaces/sparsereadable.md#on)* -Defined in node_modules/@types/node/base.d.ts:684 +Defined in node_modules/@types/node/base.d.ts:899 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -575,20 +620,27 @@ ___ ### once -▸ **once**(`event`: string | symbol, `listener`: Function): *this* +▸ **once**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[once](sourcesource.md#once)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[once](../interfaces/sparsereadable.md#once)* -Defined in node_modules/@types/node/base.d.ts:685 +Defined in node_modules/@types/node/base.d.ts:900 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -600,7 +652,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[open](sourcesource.md#open)* -*Defined in [lib/source-destination/source-destination.ts:335](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L335)* +*Defined in [lib/source-destination/source-destination.ts:361](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L361)* **Returns:** *Promise‹void›* @@ -608,20 +660,27 @@ ___ ### prependListener -▸ **prependListener**(`event`: string | symbol, `listener`: Function): *this* +▸ **prependListener**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[prependListener](sourcesource.md#prependlistener)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[prependListener](../interfaces/sparsereadable.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:686 +Defined in node_modules/@types/node/base.d.ts:901 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -629,20 +688,27 @@ ___ ### prependOnceListener -▸ **prependOnceListener**(`event`: string | symbol, `listener`: Function): *this* +▸ **prependOnceListener**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[prependOnceListener](sourcesource.md#prependoncelistener)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[prependOnceListener](../interfaces/sparsereadable.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:687 +Defined in node_modules/@types/node/base.d.ts:902 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -650,17 +716,17 @@ ___ ### read -▸ **read**(`buffer`: Buffer, `bufferOffset`: number, `length`: number, `sourceOffset`: number): *Promise‹ReadResult›* +▸ **read**(`buffer`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer), `bufferOffset`: number, `length`: number, `sourceOffset`: number): *Promise‹ReadResult›* *Overrides [SourceSource](sourcesource.md).[read](sourcesource.md#read)* -*Defined in [lib/source-destination/http.ts:90](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/http.ts#L90)* +*Defined in [lib/source-destination/http.ts:93](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/http.ts#L93)* **Parameters:** Name | Type | ------ | ------ | -`buffer` | Buffer | +`buffer` | [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | `bufferOffset` | number | `length` | number | `sourceOffset` | number | @@ -677,7 +743,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[removeAllListeners](../interfaces/sparsereadable.md#removealllisteners)* -Defined in node_modules/@types/node/base.d.ts:689 +Defined in node_modules/@types/node/base.d.ts:904 **Parameters:** @@ -691,20 +757,27 @@ ___ ### removeListener -▸ **removeListener**(`event`: string | symbol, `listener`: Function): *this* +▸ **removeListener**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[removeListener](sourcesource.md#removelistener)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[removeListener](../interfaces/sparsereadable.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:688 +Defined in node_modules/@types/node/base.d.ts:903 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -718,7 +791,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[setMaxListeners](../interfaces/sparsereadable.md#setmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:690 +Defined in node_modules/@types/node/base.d.ts:905 **Parameters:** @@ -732,17 +805,17 @@ ___ ### write -▸ **write**(`_buffer`: Buffer, `_bufferOffset`: number, `_length`: number, `_fileOffset`: number): *Promise‹WriteResult›* +▸ **write**(`_buffer`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer), `_bufferOffset`: number, `_length`: number, `_fileOffset`: number): *Promise‹WriteResult›* *Inherited from [SourceSource](sourcesource.md).[write](sourcesource.md#write)* -*Defined in [lib/source-destination/source-destination.ts:300](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L300)* +*Defined in [lib/source-destination/source-destination.ts:324](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L324)* **Parameters:** Name | Type | ------ | ------ | -`_buffer` | Buffer | +`_buffer` | [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | `_bufferOffset` | number | `_length` | number | `_fileOffset` | number | @@ -757,7 +830,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[listenerCount](countingwritable.md#static-listenercount)* -Defined in node_modules/@types/node/base.d.ts:680 +Defined in node_modules/@types/node/base.d.ts:895 **Parameters:** @@ -776,7 +849,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[register](sourcesource.md#static-register)* -*Defined in [lib/source-destination/source-destination.ts:250](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L250)* +*Defined in [lib/source-destination/source-destination.ts:270](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L270)* **Parameters:** diff --git a/doc/classes/multidestination.md b/doc/classes/multidestination.md index 33c32fd6..06fc480d 100644 --- a/doc/classes/multidestination.md +++ b/doc/classes/multidestination.md @@ -49,6 +49,7 @@ * [destinationError](multidestination.md#destinationerror) * [emit](multidestination.md#emit) * [eventNames](multidestination.md#eventnames) +* [getAlignment](multidestination.md#getalignment) * [getBlocks](multidestination.md#getblocks) * [getInnerSource](multidestination.md#getinnersource) * [getMaxListeners](multidestination.md#getmaxlisteners) @@ -75,7 +76,7 @@ \+ **new MultiDestination**(`destinations`: [SourceDestination](sourcedestination.md)[]): *[MultiDestination](multidestination.md)* -*Defined in [lib/source-destination/multi-destination.ts:104](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/multi-destination.ts#L104)* +*Defined in [lib/source-destination/multi-destination.ts:110](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/multi-destination.ts#L110)* **Parameters:** @@ -91,7 +92,7 @@ Name | Type | • **destinations**: *Set‹[SourceDestination](sourcedestination.md)›* = new Set() -*Defined in [lib/source-destination/multi-destination.ts:103](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/multi-destination.ts#L103)* +*Defined in [lib/source-destination/multi-destination.ts:109](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/multi-destination.ts#L109)* ___ @@ -99,7 +100,7 @@ ___ • **erroredDestinations**: *Set‹[SourceDestination](sourcedestination.md)›* = new Set() -*Defined in [lib/source-destination/multi-destination.ts:104](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/multi-destination.ts#L104)* +*Defined in [lib/source-destination/multi-destination.ts:110](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/multi-destination.ts#L110)* ___ @@ -109,7 +110,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[defaultMaxListeners](countingwritable.md#static-defaultmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:681 +Defined in node_modules/@types/node/base.d.ts:896 ___ @@ -130,7 +131,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[imageExtensions](sourcesource.md#static-imageextensions)* -*Defined in [lib/source-destination/source-destination.ts:232](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L232)* +*Defined in [lib/source-destination/source-destination.ts:252](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L252)* ___ @@ -140,7 +141,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[mimetype](sourcesource.md#static-optional-mimetype)* -*Defined in [lib/source-destination/source-destination.ts:244](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L244)* +*Defined in [lib/source-destination/source-destination.ts:264](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L264)* ## Accessors @@ -148,7 +149,7 @@ ___ • **get activeDestinations**(): *Set‹[SourceDestination](sourcedestination.md)›* -*Defined in [lib/source-destination/multi-destination.ts:135](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/multi-destination.ts#L135)* +*Defined in [lib/source-destination/multi-destination.ts:153](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/multi-destination.ts#L153)* **Returns:** *Set‹[SourceDestination](sourcedestination.md)›* @@ -160,7 +161,7 @@ ___ *Overrides [SourceDestination](sourcedestination.md).[_close](sourcedestination.md#protected-_close)* -*Defined in [lib/source-destination/multi-destination.ts:329](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/multi-destination.ts#L329)* +*Defined in [lib/source-destination/multi-destination.ts:354](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/multi-destination.ts#L354)* **Returns:** *Promise‹void›* @@ -172,7 +173,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[_getMetadata](sourcesource.md#protected-_getmetadata)* -*Defined in [lib/source-destination/source-destination.ts:287](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L287)* +*Defined in [lib/source-destination/source-destination.ts:311](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L311)* **Returns:** *Promise‹[Metadata](../interfaces/metadata.md)›* @@ -184,7 +185,7 @@ ___ *Overrides [SourceDestination](sourcedestination.md).[_open](sourcedestination.md#protected-_open)* -*Defined in [lib/source-destination/multi-destination.ts:319](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/multi-destination.ts#L319)* +*Defined in [lib/source-destination/multi-destination.ts:344](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/multi-destination.ts#L344)* **Returns:** *Promise‹void›* @@ -192,20 +193,27 @@ ___ ### addListener -▸ **addListener**(`event`: string | symbol, `listener`: Function): *this* +▸ **addListener**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[addListener](sourcesource.md#addlistener)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[addListener](../interfaces/sparsereadable.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:683 +Defined in node_modules/@types/node/base.d.ts:898 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -215,7 +223,7 @@ ___ ▸ **can**(`methodName`: "canRead" | "canWrite" | "canCreateReadStream" | "canCreateSparseReadStream" | "canCreateWriteStream" | "canCreateSparseWriteStream"): *Promise‹boolean›* -*Defined in [lib/source-destination/multi-destination.ts:139](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/multi-destination.ts#L139)* +*Defined in [lib/source-destination/multi-destination.ts:157](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/multi-destination.ts#L157)* **Parameters:** @@ -233,7 +241,7 @@ ___ *Overrides [SourceSource](sourcesource.md).[canCreateReadStream](sourcesource.md#cancreatereadstream)* -*Defined in [lib/source-destination/multi-destination.ts:166](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/multi-destination.ts#L166)* +*Defined in [lib/source-destination/multi-destination.ts:184](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/multi-destination.ts#L184)* **Returns:** *Promise‹boolean›* @@ -245,7 +253,7 @@ ___ *Overrides [SourceSource](sourcesource.md).[canCreateSparseReadStream](sourcesource.md#cancreatesparsereadstream)* -*Defined in [lib/source-destination/multi-destination.ts:170](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/multi-destination.ts#L170)* +*Defined in [lib/source-destination/multi-destination.ts:188](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/multi-destination.ts#L188)* **Returns:** *Promise‹boolean›* @@ -257,7 +265,7 @@ ___ *Overrides [SourceSource](sourcesource.md).[canCreateSparseWriteStream](sourcesource.md#cancreatesparsewritestream)* -*Defined in [lib/source-destination/multi-destination.ts:178](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/multi-destination.ts#L178)* +*Defined in [lib/source-destination/multi-destination.ts:196](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/multi-destination.ts#L196)* **Returns:** *Promise‹boolean›* @@ -269,7 +277,7 @@ ___ *Overrides [SourceSource](sourcesource.md).[canCreateWriteStream](sourcesource.md#cancreatewritestream)* -*Defined in [lib/source-destination/multi-destination.ts:174](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/multi-destination.ts#L174)* +*Defined in [lib/source-destination/multi-destination.ts:192](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/multi-destination.ts#L192)* **Returns:** *Promise‹boolean›* @@ -281,7 +289,7 @@ ___ *Overrides [SourceSource](sourcesource.md).[canRead](sourcesource.md#canread)* -*Defined in [lib/source-destination/multi-destination.ts:158](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/multi-destination.ts#L158)* +*Defined in [lib/source-destination/multi-destination.ts:176](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/multi-destination.ts#L176)* **Returns:** *Promise‹boolean›* @@ -293,7 +301,7 @@ ___ *Overrides [SourceSource](sourcesource.md).[canWrite](sourcesource.md#canwrite)* -*Defined in [lib/source-destination/multi-destination.ts:162](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/multi-destination.ts#L162)* +*Defined in [lib/source-destination/multi-destination.ts:180](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/multi-destination.ts#L180)* **Returns:** *Promise‹boolean›* @@ -305,7 +313,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[close](sourcesource.md#close)* -*Defined in [lib/source-destination/source-destination.ts:342](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L342)* +*Defined in [lib/source-destination/source-destination.ts:368](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L368)* **Returns:** *Promise‹void›* @@ -313,17 +321,17 @@ ___ ### createReadStream -▸ **createReadStream**(...`args`: any[]): *Promise‹ReadableStream›* +▸ **createReadStream**(`options`: [CreateReadStreamOptions](../interfaces/createreadstreamoptions.md)): *Promise‹ReadableStream›* *Overrides [SourceSource](sourcesource.md).[createReadStream](sourcesource.md#createreadstream)* -*Defined in [lib/source-destination/multi-destination.ts:219](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/multi-destination.ts#L219)* +*Defined in [lib/source-destination/multi-destination.ts:237](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/multi-destination.ts#L237)* **Parameters:** Name | Type | ------ | ------ | -`...args` | any[] | +`options` | [CreateReadStreamOptions](../interfaces/createreadstreamoptions.md) | **Returns:** *Promise‹ReadableStream›* @@ -331,17 +339,17 @@ ___ ### createSparseReadStream -▸ **createSparseReadStream**(...`args`: any[]): *Promise‹[SparseReadable](../interfaces/sparsereadable.md)›* +▸ **createSparseReadStream**(`options`: [CreateSparseReadStreamOptions](../interfaces/createsparsereadstreamoptions.md)): *Promise‹[SparseReadable](../interfaces/sparsereadable.md)›* *Overrides [SourceSource](sourcesource.md).[createSparseReadStream](sourcesource.md#createsparsereadstream)* -*Defined in [lib/source-destination/multi-destination.ts:228](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/multi-destination.ts#L228)* +*Defined in [lib/source-destination/multi-destination.ts:246](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/multi-destination.ts#L246)* **Parameters:** Name | Type | ------ | ------ | -`...args` | any[] | +`options` | [CreateSparseReadStreamOptions](../interfaces/createsparsereadstreamoptions.md) | **Returns:** *Promise‹[SparseReadable](../interfaces/sparsereadable.md)›* @@ -349,11 +357,17 @@ ___ ### createSparseWriteStream -▸ **createSparseWriteStream**(): *Promise‹[SparseWritable](../interfaces/sparsewritable.md)›* +▸ **createSparseWriteStream**(...`args`: any[]): *Promise‹[SparseWritable](../interfaces/sparsewritable.md)›* *Overrides [SourceSource](sourcesource.md).[createSparseWriteStream](sourcesource.md#createsparsewritestream)* -*Defined in [lib/source-destination/multi-destination.ts:308](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/multi-destination.ts#L308)* +*Defined in [lib/source-destination/multi-destination.ts:331](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/multi-destination.ts#L331)* + +**Parameters:** + +Name | Type | +------ | ------ | +`...args` | any[] | **Returns:** *Promise‹[SparseWritable](../interfaces/sparsewritable.md)›* @@ -361,15 +375,16 @@ ___ ### `Private` createStream -▸ **createStream**(`methodName`: "createWriteStream" | "createSparseWriteStream"): *Promise‹PassThrough‹››* +▸ **createStream**(`methodName`: "createWriteStream" | "createSparseWriteStream", ...`args`: any[]): *Promise‹PassThrough‹››* -*Defined in [lib/source-destination/multi-destination.ts:235](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/multi-destination.ts#L235)* +*Defined in [lib/source-destination/multi-destination.ts:255](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/multi-destination.ts#L255)* **Parameters:** Name | Type | ------ | ------ | `methodName` | "createWriteStream" | "createSparseWriteStream" | +`...args` | any[] | **Returns:** *Promise‹PassThrough‹››* @@ -381,7 +396,7 @@ ___ *Overrides [SourceSource](sourcesource.md).[createVerifier](sourcesource.md#createverifier)* -*Defined in [lib/source-destination/multi-destination.ts:312](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/multi-destination.ts#L312)* +*Defined in [lib/source-destination/multi-destination.ts:337](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/multi-destination.ts#L337)* **Parameters:** @@ -396,11 +411,17 @@ ___ ### createWriteStream -▸ **createWriteStream**(): *Promise‹WritableStream›* +▸ **createWriteStream**(...`args`: any[]): *Promise‹WritableStream›* *Overrides [SourceSource](sourcesource.md).[createWriteStream](sourcesource.md#createwritestream)* -*Defined in [lib/source-destination/multi-destination.ts:304](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/multi-destination.ts#L304)* +*Defined in [lib/source-destination/multi-destination.ts:325](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/multi-destination.ts#L325)* + +**Parameters:** + +Name | Type | +------ | ------ | +`...args` | any[] | **Returns:** *Promise‹WritableStream›* @@ -410,7 +431,7 @@ ___ ▸ **destinationError**(`destination`: [SourceDestination](sourcedestination.md), `error`: [Error](notcapable.md#static-error), `stream?`: EventEmitter): *void* -*Defined in [lib/source-destination/multi-destination.ts:116](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/multi-destination.ts#L116)* +*Defined in [lib/source-destination/multi-destination.ts:134](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/multi-destination.ts#L134)* **Parameters:** @@ -432,7 +453,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[emit](../interfaces/sparsereadable.md#emit)* -Defined in node_modules/@types/node/base.d.ts:693 +Defined in node_modules/@types/node/base.d.ts:908 **Parameters:** @@ -447,15 +468,27 @@ ___ ### eventNames -▸ **eventNames**(): *string | symbol[]* +▸ **eventNames**(): *Array‹string | symbol›* *Inherited from [CountingWritable](countingwritable.md).[eventNames](countingwritable.md#eventnames)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[eventNames](../interfaces/sparsereadable.md#eventnames)* -Defined in node_modules/@types/node/base.d.ts:694 +Defined in node_modules/@types/node/base.d.ts:909 + +**Returns:** *Array‹string | symbol›* + +___ + +### getAlignment + +▸ **getAlignment**(): *number | undefined* + +*Overrides [SourceSource](sourcesource.md).[getAlignment](sourcesource.md#getalignment)* -**Returns:** *string | symbol[]* +*Defined in [lib/source-destination/multi-destination.ts:122](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/multi-destination.ts#L122)* + +**Returns:** *number | undefined* ___ @@ -465,7 +498,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[getBlocks](sourcesource.md#getblocks)* -*Defined in [lib/source-destination/source-destination.ts:323](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L323)* +*Defined in [lib/source-destination/source-destination.ts:345](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L345)* **Returns:** *Promise‹[BlocksWithChecksum](../interfaces/blockswithchecksum.md)[]›* @@ -477,7 +510,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[getInnerSource](sourcesource.md#getinnersource)* -*Defined in [lib/source-destination/source-destination.ts:424](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L424)* +*Defined in [lib/source-destination/source-destination.ts:452](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L452)* **Returns:** *Promise‹[SourceDestination](sourcedestination.md)›* @@ -491,7 +524,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[getMaxListeners](../interfaces/sparsereadable.md#getmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:691 +Defined in node_modules/@types/node/base.d.ts:906 **Returns:** *number* @@ -503,7 +536,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[getMetadata](sourcesource.md#getmetadata)* -*Defined in [lib/source-destination/source-destination.ts:280](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L280)* +*Defined in [lib/source-destination/source-destination.ts:304](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L304)* **Returns:** *Promise‹[Metadata](../interfaces/metadata.md)›* @@ -515,7 +548,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[getPartitionTable](sourcesource.md#getpartitiontable)* -*Defined in [lib/source-destination/source-destination.ts:445](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L445)* +*Defined in [lib/source-destination/source-destination.ts:473](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L473)* **Returns:** *Promise‹GetPartitionsResult | undefined›* @@ -529,7 +562,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[listenerCount](../interfaces/sparsereadable.md#listenercount)* -Defined in node_modules/@types/node/base.d.ts:695 +Defined in node_modules/@types/node/base.d.ts:910 **Parameters:** @@ -549,7 +582,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[listeners](../interfaces/sparsereadable.md#listeners)* -Defined in node_modules/@types/node/base.d.ts:692 +Defined in node_modules/@types/node/base.d.ts:907 **Parameters:** @@ -563,20 +596,27 @@ ___ ### on -▸ **on**(`event`: string | symbol, `listener`: Function): *this* +▸ **on**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[on](sourcesource.md#on)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[on](../interfaces/sparsereadable.md#on)* -Defined in node_modules/@types/node/base.d.ts:684 +Defined in node_modules/@types/node/base.d.ts:899 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -584,20 +624,27 @@ ___ ### once -▸ **once**(`event`: string | symbol, `listener`: Function): *this* +▸ **once**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[once](sourcesource.md#once)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[once](../interfaces/sparsereadable.md#once)* -Defined in node_modules/@types/node/base.d.ts:685 +Defined in node_modules/@types/node/base.d.ts:900 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -609,7 +656,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[open](sourcesource.md#open)* -*Defined in [lib/source-destination/source-destination.ts:335](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L335)* +*Defined in [lib/source-destination/source-destination.ts:361](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L361)* **Returns:** *Promise‹void›* @@ -617,20 +664,27 @@ ___ ### prependListener -▸ **prependListener**(`event`: string | symbol, `listener`: Function): *this* +▸ **prependListener**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[prependListener](sourcesource.md#prependlistener)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[prependListener](../interfaces/sparsereadable.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:686 +Defined in node_modules/@types/node/base.d.ts:901 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -638,20 +692,27 @@ ___ ### prependOnceListener -▸ **prependOnceListener**(`event`: string | symbol, `listener`: Function): *this* +▸ **prependOnceListener**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[prependOnceListener](sourcesource.md#prependoncelistener)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[prependOnceListener](../interfaces/sparsereadable.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:687 +Defined in node_modules/@types/node/base.d.ts:902 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -659,17 +720,17 @@ ___ ### read -▸ **read**(`buffer`: Buffer, `bufferOffset`: number, `length`: number, `sourceOffset`: number): *Promise‹ReadResult›* +▸ **read**(`buffer`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer), `bufferOffset`: number, `length`: number, `sourceOffset`: number): *Promise‹ReadResult›* *Overrides [SourceSource](sourcesource.md).[read](sourcesource.md#read)* -*Defined in [lib/source-destination/multi-destination.ts:182](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/multi-destination.ts#L182)* +*Defined in [lib/source-destination/multi-destination.ts:200](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/multi-destination.ts#L200)* **Parameters:** Name | Type | ------ | ------ | -`buffer` | Buffer | +`buffer` | [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | `bufferOffset` | number | `length` | number | `sourceOffset` | number | @@ -686,7 +747,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[removeAllListeners](../interfaces/sparsereadable.md#removealllisteners)* -Defined in node_modules/@types/node/base.d.ts:689 +Defined in node_modules/@types/node/base.d.ts:904 **Parameters:** @@ -700,20 +761,27 @@ ___ ### removeListener -▸ **removeListener**(`event`: string | symbol, `listener`: Function): *this* +▸ **removeListener**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[removeListener](sourcesource.md#removelistener)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[removeListener](../interfaces/sparsereadable.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:688 +Defined in node_modules/@types/node/base.d.ts:903 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -727,7 +795,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[setMaxListeners](../interfaces/sparsereadable.md#setmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:690 +Defined in node_modules/@types/node/base.d.ts:905 **Parameters:** @@ -741,17 +809,17 @@ ___ ### write -▸ **write**(`buffer`: Buffer, `bufferOffset`: number, `length`: number, `fileOffset`: number): *Promise‹WriteResult›* +▸ **write**(`buffer`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer), `bufferOffset`: number, `length`: number, `fileOffset`: number): *Promise‹WriteResult›* *Overrides [SourceSource](sourcesource.md).[write](sourcesource.md#write)* -*Defined in [lib/source-destination/multi-destination.ts:197](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/multi-destination.ts#L197)* +*Defined in [lib/source-destination/multi-destination.ts:215](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/multi-destination.ts#L215)* **Parameters:** Name | Type | ------ | ------ | -`buffer` | Buffer | +`buffer` | [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | `bufferOffset` | number | `length` | number | `fileOffset` | number | @@ -766,7 +834,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[listenerCount](countingwritable.md#static-listenercount)* -Defined in node_modules/@types/node/base.d.ts:680 +Defined in node_modules/@types/node/base.d.ts:895 **Parameters:** @@ -785,7 +853,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[register](sourcesource.md#static-register)* -*Defined in [lib/source-destination/source-destination.ts:250](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L250)* +*Defined in [lib/source-destination/source-destination.ts:270](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L270)* **Parameters:** diff --git a/doc/classes/multidestinationerror.md b/doc/classes/multidestinationerror.md index e0fa71a3..68cab0f3 100644 --- a/doc/classes/multidestinationerror.md +++ b/doc/classes/multidestinationerror.md @@ -29,7 +29,7 @@ \+ **new MultiDestinationError**(`error`: [Error](notcapable.md#static-error), `destination`: [SourceDestination](sourcedestination.md)): *[MultiDestinationError](multidestinationerror.md)* -*Defined in [lib/source-destination/multi-destination.ts:35](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/multi-destination.ts#L35)* +*Defined in [lib/source-destination/multi-destination.ts:41](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/multi-destination.ts#L41)* **Parameters:** @@ -46,7 +46,7 @@ Name | Type | • **destination**: *[SourceDestination](sourcedestination.md)* -*Defined in [lib/source-destination/multi-destination.ts:36](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/multi-destination.ts#L36)* +*Defined in [lib/source-destination/multi-destination.ts:42](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/multi-destination.ts#L42)* ___ @@ -54,7 +54,7 @@ ___ • **error**: *[Error](notcapable.md#static-error)* -*Defined in [lib/source-destination/multi-destination.ts:36](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/multi-destination.ts#L36)* +*Defined in [lib/source-destination/multi-destination.ts:42](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/multi-destination.ts#L42)* ___ @@ -64,7 +64,7 @@ ___ *Inherited from [NotCapable](notcapable.md).[message](notcapable.md#message)* -Defined in node_modules/typedoc/node_modules/typescript/lib/lib.es5.d.ts:974 +Defined in node_modules/typescript/lib/lib.es5.d.ts:974 ___ @@ -74,7 +74,7 @@ ___ *Inherited from [NotCapable](notcapable.md).[name](notcapable.md#name)* -Defined in node_modules/typedoc/node_modules/typescript/lib/lib.es5.d.ts:973 +Defined in node_modules/typescript/lib/lib.es5.d.ts:973 ___ @@ -86,7 +86,7 @@ ___ *Overrides [NotCapable](notcapable.md).[stack](notcapable.md#optional-stack)* -Defined in node_modules/typedoc/node_modules/typescript/lib/lib.es5.d.ts:975 +Defined in node_modules/typescript/lib/lib.es5.d.ts:975 ___ @@ -94,4 +94,4 @@ ___ ▪ **Error**: *ErrorConstructor* -Defined in node_modules/typedoc/node_modules/typescript/lib/lib.es5.d.ts:984 +Defined in node_modules/typescript/lib/lib.es5.d.ts:984 diff --git a/doc/classes/multidestinationverifier.md b/doc/classes/multidestinationverifier.md index 54ef6cb9..116bee9c 100644 --- a/doc/classes/multidestinationverifier.md +++ b/doc/classes/multidestinationverifier.md @@ -51,7 +51,7 @@ \+ **new MultiDestinationVerifier**(`source`: [MultiDestination](multidestination.md), `checksumOrBlocks`: string | [BlocksWithChecksum](../interfaces/blockswithchecksum.md)[], `size?`: undefined | number): *[MultiDestinationVerifier](multidestinationverifier.md)* -*Defined in [lib/source-destination/multi-destination.ts:43](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/multi-destination.ts#L43)* +*Defined in [lib/source-destination/multi-destination.ts:49](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/multi-destination.ts#L49)* **Parameters:** @@ -69,7 +69,7 @@ Name | Type | • **timer**: *Timer* -*Defined in [lib/source-destination/multi-destination.ts:43](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/multi-destination.ts#L43)* +*Defined in [lib/source-destination/multi-destination.ts:49](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/multi-destination.ts#L49)* ___ @@ -77,7 +77,7 @@ ___ • **verifiers**: *Set‹[Verifier](verifier.md)›* = new Set() -*Defined in [lib/source-destination/multi-destination.ts:42](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/multi-destination.ts#L42)* +*Defined in [lib/source-destination/multi-destination.ts:48](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/multi-destination.ts#L48)* ___ @@ -87,26 +87,33 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[defaultMaxListeners](countingwritable.md#static-defaultmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:681 +Defined in node_modules/@types/node/base.d.ts:896 ## Methods ### addListener -▸ **addListener**(`event`: string | symbol, `listener`: Function): *this* +▸ **addListener**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[addListener](sourcesource.md#addlistener)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[addListener](../interfaces/sparsereadable.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:683 +Defined in node_modules/@types/node/base.d.ts:898 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -120,7 +127,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[emit](../interfaces/sparsereadable.md#emit)* -Defined in node_modules/@types/node/base.d.ts:693 +Defined in node_modules/@types/node/base.d.ts:908 **Parameters:** @@ -137,7 +144,7 @@ ___ ▸ **emitProgress**(): *void* -*Defined in [lib/source-destination/multi-destination.ts:76](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/multi-destination.ts#L76)* +*Defined in [lib/source-destination/multi-destination.ts:82](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/multi-destination.ts#L82)* **Returns:** *void* @@ -145,15 +152,15 @@ ___ ### eventNames -▸ **eventNames**(): *string | symbol[]* +▸ **eventNames**(): *Array‹string | symbol›* *Inherited from [CountingWritable](countingwritable.md).[eventNames](countingwritable.md#eventnames)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[eventNames](../interfaces/sparsereadable.md#eventnames)* -Defined in node_modules/@types/node/base.d.ts:694 +Defined in node_modules/@types/node/base.d.ts:909 -**Returns:** *string | symbol[]* +**Returns:** *Array‹string | symbol›* ___ @@ -165,7 +172,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[getMaxListeners](../interfaces/sparsereadable.md#getmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:691 +Defined in node_modules/@types/node/base.d.ts:906 **Returns:** *number* @@ -177,7 +184,7 @@ ___ *Inherited from [Verifier](verifier.md).[handleEventsAndPipe](verifier.md#protected-handleeventsandpipe)* -*Defined in [lib/source-destination/source-destination.ts:134](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L134)* +*Defined in [lib/source-destination/source-destination.ts:134](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L134)* **Parameters:** @@ -198,7 +205,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[listenerCount](../interfaces/sparsereadable.md#listenercount)* -Defined in node_modules/@types/node/base.d.ts:695 +Defined in node_modules/@types/node/base.d.ts:910 **Parameters:** @@ -218,7 +225,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[listeners](../interfaces/sparsereadable.md#listeners)* -Defined in node_modules/@types/node/base.d.ts:692 +Defined in node_modules/@types/node/base.d.ts:907 **Parameters:** @@ -232,20 +239,27 @@ ___ ### on -▸ **on**(`event`: string | symbol, `listener`: Function): *this* +▸ **on**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[on](sourcesource.md#on)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[on](../interfaces/sparsereadable.md#on)* -Defined in node_modules/@types/node/base.d.ts:684 +Defined in node_modules/@types/node/base.d.ts:899 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -253,20 +267,27 @@ ___ ### once -▸ **once**(`event`: string | symbol, `listener`: Function): *this* +▸ **once**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[once](sourcesource.md#once)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[once](../interfaces/sparsereadable.md#once)* -Defined in node_modules/@types/node/base.d.ts:685 +Defined in node_modules/@types/node/base.d.ts:900 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -276,7 +297,7 @@ ___ ▸ **oneVerifierFinished**(`verifier`: [Verifier](verifier.md)): *void* -*Defined in [lib/source-destination/multi-destination.ts:64](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/multi-destination.ts#L64)* +*Defined in [lib/source-destination/multi-destination.ts:70](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/multi-destination.ts#L70)* **Parameters:** @@ -290,20 +311,27 @@ ___ ### prependListener -▸ **prependListener**(`event`: string | symbol, `listener`: Function): *this* +▸ **prependListener**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[prependListener](sourcesource.md#prependlistener)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[prependListener](../interfaces/sparsereadable.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:686 +Defined in node_modules/@types/node/base.d.ts:901 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -311,20 +339,27 @@ ___ ### prependOnceListener -▸ **prependOnceListener**(`event`: string | symbol, `listener`: Function): *this* +▸ **prependOnceListener**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[prependOnceListener](sourcesource.md#prependoncelistener)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[prependOnceListener](../interfaces/sparsereadable.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:687 +Defined in node_modules/@types/node/base.d.ts:902 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -338,7 +373,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[removeAllListeners](../interfaces/sparsereadable.md#removealllisteners)* -Defined in node_modules/@types/node/base.d.ts:689 +Defined in node_modules/@types/node/base.d.ts:904 **Parameters:** @@ -352,20 +387,27 @@ ___ ### removeListener -▸ **removeListener**(`event`: string | symbol, `listener`: Function): *this* +▸ **removeListener**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[removeListener](sourcesource.md#removelistener)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[removeListener](../interfaces/sparsereadable.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:688 +Defined in node_modules/@types/node/base.d.ts:903 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -377,7 +419,7 @@ ___ *Overrides [Verifier](verifier.md).[run](verifier.md#abstract-run)* -*Defined in [lib/source-destination/multi-destination.ts:86](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/multi-destination.ts#L86)* +*Defined in [lib/source-destination/multi-destination.ts:92](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/multi-destination.ts#L92)* **Returns:** *Promise‹void›* @@ -391,7 +433,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[setMaxListeners](../interfaces/sparsereadable.md#setmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:690 +Defined in node_modules/@types/node/base.d.ts:905 **Parameters:** @@ -409,7 +451,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[listenerCount](countingwritable.md#static-listenercount)* -Defined in node_modules/@types/node/base.d.ts:680 +Defined in node_modules/@types/node/base.d.ts:895 **Parameters:** @@ -428,22 +470,22 @@ Name | Type | *Inherited from [Verifier](verifier.md).[progress](verifier.md#progress)* -*Defined in [lib/source-destination/source-destination.ts:130](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L130)* +*Defined in [lib/source-destination/source-destination.ts:130](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L130)* ### bytes • **bytes**: *number* = 0 -*Defined in [lib/source-destination/source-destination.ts:130](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L130)* +*Defined in [lib/source-destination/source-destination.ts:130](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L130)* ### position • **position**: *number* = 0 -*Defined in [lib/source-destination/source-destination.ts:130](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L130)* +*Defined in [lib/source-destination/source-destination.ts:130](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L130)* ### speed • **speed**: *number* = 0 -*Defined in [lib/source-destination/source-destination.ts:130](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L130)* +*Defined in [lib/source-destination/source-destination.ts:130](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L130)* diff --git a/doc/classes/notcapable.md b/doc/classes/notcapable.md index f5ac99b7..7699f6eb 100644 --- a/doc/classes/notcapable.md +++ b/doc/classes/notcapable.md @@ -25,7 +25,7 @@ *Inherited from [NotCapable](notcapable.md).[message](notcapable.md#message)* -Defined in node_modules/typedoc/node_modules/typescript/lib/lib.es5.d.ts:974 +Defined in node_modules/typescript/lib/lib.es5.d.ts:974 ___ @@ -35,7 +35,7 @@ ___ *Inherited from [NotCapable](notcapable.md).[name](notcapable.md#name)* -Defined in node_modules/typedoc/node_modules/typescript/lib/lib.es5.d.ts:973 +Defined in node_modules/typescript/lib/lib.es5.d.ts:973 ___ @@ -47,7 +47,7 @@ ___ *Overrides [NotCapable](notcapable.md).[stack](notcapable.md#optional-stack)* -Defined in node_modules/typedoc/node_modules/typescript/lib/lib.es5.d.ts:975 +Defined in node_modules/typescript/lib/lib.es5.d.ts:975 ___ @@ -55,4 +55,4 @@ ___ ▪ **Error**: *ErrorConstructor* -Defined in node_modules/typedoc/node_modules/typescript/lib/lib.es5.d.ts:984 +Defined in node_modules/typescript/lib/lib.es5.d.ts:984 diff --git a/doc/classes/randomaccesszipsource.md b/doc/classes/randomaccesszipsource.md index b30034f5..eca42d82 100644 --- a/doc/classes/randomaccesszipsource.md +++ b/doc/classes/randomaccesszipsource.md @@ -47,6 +47,7 @@ * [createWriteStream](randomaccesszipsource.md#createwritestream) * [emit](randomaccesszipsource.md#emit) * [eventNames](randomaccesszipsource.md#eventnames) +* [getAlignment](randomaccesszipsource.md#getalignment) * [getBlocks](randomaccesszipsource.md#getblocks) * [getEntries](randomaccesszipsource.md#private-getentries) * [getEntryByName](randomaccesszipsource.md#private-getentrybyname) @@ -82,7 +83,7 @@ *Overrides [SourceSource](sourcesource.md).[constructor](sourcesource.md#constructor)* -*Defined in [lib/source-destination/zip.ts:162](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/zip.ts#L162)* +*Defined in [lib/source-destination/zip.ts:166](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/zip.ts#L166)* **Parameters:** @@ -106,7 +107,7 @@ Name | Type | • **entries**: *Entry[]* = [] -*Defined in [lib/source-destination/zip.ts:162](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/zip.ts#L162)* +*Defined in [lib/source-destination/zip.ts:166](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/zip.ts#L166)* ___ @@ -114,7 +115,7 @@ ___ • **match**: *function* -*Defined in [lib/source-destination/zip.ts:166](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/zip.ts#L166)* +*Defined in [lib/source-destination/zip.ts:170](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/zip.ts#L170)* #### Type declaration: @@ -132,7 +133,7 @@ ___ • **ready**: *Promise‹void›* -*Defined in [lib/source-destination/zip.ts:161](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/zip.ts#L161)* +*Defined in [lib/source-destination/zip.ts:165](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/zip.ts#L165)* ___ @@ -142,7 +143,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[source](sourcesource.md#protected-source)* -*Defined in [lib/source-destination/source-source.ts:22](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-source.ts#L22)* +*Defined in [lib/source-destination/source-source.ts:22](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-source.ts#L22)* ___ @@ -150,7 +151,7 @@ ___ • **zip**: *ZipFile* -*Defined in [lib/source-destination/zip.ts:160](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/zip.ts#L160)* +*Defined in [lib/source-destination/zip.ts:164](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/zip.ts#L164)* ___ @@ -160,7 +161,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[defaultMaxListeners](countingwritable.md#static-defaultmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:681 +Defined in node_modules/@types/node/base.d.ts:896 ___ @@ -181,7 +182,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[imageExtensions](sourcesource.md#static-imageextensions)* -*Defined in [lib/source-destination/source-destination.ts:232](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L232)* +*Defined in [lib/source-destination/source-destination.ts:252](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L252)* ___ @@ -198,7 +199,7 @@ ___ 'version', ] -*Defined in [lib/source-destination/zip.ts:150](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/zip.ts#L150)* +*Defined in [lib/source-destination/zip.ts:154](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/zip.ts#L154)* ___ @@ -208,7 +209,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[mimetype](sourcesource.md#static-optional-mimetype)* -*Defined in [lib/source-destination/source-destination.ts:244](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L244)* +*Defined in [lib/source-destination/source-destination.ts:264](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L264)* ___ @@ -218,7 +219,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[requiresRandomReadableSource](sourcesource.md#static-requiresrandomreadablesource)* -*Defined in [lib/source-destination/source-source.ts:20](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-source.ts#L20)* +*Defined in [lib/source-destination/source-source.ts:20](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-source.ts#L20)* ## Methods @@ -230,7 +231,7 @@ ___ *Overrides [SourceDestination](sourcedestination.md).[_close](sourcedestination.md#protected-_close)* -*Defined in [lib/source-destination/source-source.ts:30](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-source.ts#L30)* +*Defined in [lib/source-destination/source-source.ts:30](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-source.ts#L30)* **Returns:** *Promise‹void›* @@ -242,7 +243,7 @@ ___ *Overrides [SourceSource](sourcesource.md).[_getMetadata](sourcesource.md#protected-_getmetadata)* -*Defined in [lib/source-destination/zip.ts:310](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/zip.ts#L310)* +*Defined in [lib/source-destination/zip.ts:324](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/zip.ts#L324)* **Returns:** *Promise‹[Metadata](../interfaces/metadata.md)›* @@ -254,7 +255,7 @@ ___ *Overrides [SourceSource](sourcesource.md).[_open](sourcesource.md#protected-_open)* -*Defined in [lib/source-destination/zip.ts:227](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/zip.ts#L227)* +*Defined in [lib/source-destination/zip.ts:231](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/zip.ts#L231)* **Returns:** *Promise‹void›* @@ -262,20 +263,27 @@ ___ ### addListener -▸ **addListener**(`event`: string | symbol, `listener`: Function): *this* +▸ **addListener**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[addListener](sourcesource.md#addlistener)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[addListener](../interfaces/sparsereadable.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:683 +Defined in node_modules/@types/node/base.d.ts:898 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -287,7 +295,7 @@ ___ *Overrides [SourceSource](sourcesource.md).[canCreateReadStream](sourcesource.md#cancreatereadstream)* -*Defined in [lib/source-destination/zip.ts:198](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/zip.ts#L198)* +*Defined in [lib/source-destination/zip.ts:202](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/zip.ts#L202)* **Returns:** *Promise‹boolean›* @@ -299,7 +307,7 @@ ___ *Overrides [SourceSource](sourcesource.md).[canCreateSparseReadStream](sourcesource.md#cancreatesparsereadstream)* -*Defined in [lib/source-destination/zip.ts:202](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/zip.ts#L202)* +*Defined in [lib/source-destination/zip.ts:206](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/zip.ts#L206)* **Returns:** *Promise‹boolean›* @@ -311,7 +319,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[canCreateSparseWriteStream](sourcesource.md#cancreatesparsewritestream)* -*Defined in [lib/source-destination/source-destination.ts:276](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L276)* +*Defined in [lib/source-destination/source-destination.ts:300](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L300)* **Returns:** *Promise‹boolean›* @@ -323,7 +331,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[canCreateWriteStream](sourcesource.md#cancreatewritestream)* -*Defined in [lib/source-destination/source-destination.ts:272](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L272)* +*Defined in [lib/source-destination/source-destination.ts:296](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L296)* **Returns:** *Promise‹boolean›* @@ -335,7 +343,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[canRead](sourcesource.md#canread)* -*Defined in [lib/source-destination/source-destination.ts:256](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L256)* +*Defined in [lib/source-destination/source-destination.ts:280](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L280)* **Returns:** *Promise‹boolean›* @@ -347,7 +355,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[canWrite](sourcesource.md#canwrite)* -*Defined in [lib/source-destination/source-destination.ts:260](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L260)* +*Defined in [lib/source-destination/source-destination.ts:284](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L284)* **Returns:** *Promise‹boolean›* @@ -359,7 +367,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[close](sourcesource.md#close)* -*Defined in [lib/source-destination/source-destination.ts:342](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L342)* +*Defined in [lib/source-destination/source-destination.ts:368](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L368)* **Returns:** *Promise‹void›* @@ -367,19 +375,22 @@ ___ ### createReadStream -▸ **createReadStream**(`_emitProgress`: boolean, `start`: number, `end?`: undefined | number): *Promise‹ReadableStream›* +▸ **createReadStream**(`__namedParameters`: object): *Promise‹ReadableStream›* *Overrides [SourceSource](sourcesource.md).[createReadStream](sourcesource.md#createreadstream)* -*Defined in [lib/source-destination/zip.ts:271](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/zip.ts#L271)* +*Defined in [lib/source-destination/zip.ts:275](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/zip.ts#L275)* **Parameters:** +▪ **__namedParameters**: *object* + Name | Type | Default | ------ | ------ | ------ | -`_emitProgress` | boolean | false | +`alignment` | undefined | number | - | +`end` | undefined | number | - | +`numBuffers` | undefined | number | - | `start` | number | 0 | -`end?` | undefined | number | - | **Returns:** *Promise‹ReadableStream›* @@ -387,17 +398,21 @@ ___ ### createSparseReadStream -▸ **createSparseReadStream**(`generateChecksums`: boolean): *Promise‹[SparseFilterStream](sparsefilterstream.md)›* +▸ **createSparseReadStream**(`__namedParameters`: object): *Promise‹[SparseFilterStream](sparsefilterstream.md)›* *Overrides [SourceSource](sourcesource.md).[createSparseReadStream](sourcesource.md#createsparsereadstream)* -*Defined in [lib/source-destination/zip.ts:292](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/zip.ts#L292)* +*Defined in [lib/source-destination/zip.ts:301](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/zip.ts#L301)* **Parameters:** +▪`Default value` **__namedParameters**: *object*= {} + Name | Type | Default | ------ | ------ | ------ | +`alignment` | undefined | number | - | `generateChecksums` | boolean | false | +`numBuffers` | undefined | number | - | **Returns:** *Promise‹[SparseFilterStream](sparsefilterstream.md)›* @@ -405,11 +420,19 @@ ___ ### createSparseWriteStream -▸ **createSparseWriteStream**(): *Promise‹[SparseWritable](../interfaces/sparsewritable.md)›* +▸ **createSparseWriteStream**(`_options`: object): *Promise‹[SparseWritable](../interfaces/sparsewritable.md)›* *Inherited from [SourceSource](sourcesource.md).[createSparseWriteStream](sourcesource.md#createsparsewritestream)* -*Defined in [lib/source-destination/source-destination.ts:331](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L331)* +*Defined in [lib/source-destination/source-destination.ts:355](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L355)* + +**Parameters:** + +▪`Default value` **_options**: *object*= {} + +Name | Type | +------ | ------ | +`highWaterMark?` | undefined | number | **Returns:** *Promise‹[SparseWritable](../interfaces/sparsewritable.md)›* @@ -421,7 +444,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[createVerifier](sourcesource.md#createverifier)* -*Defined in [lib/source-destination/source-destination.ts:357](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L357)* +*Defined in [lib/source-destination/source-destination.ts:383](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L383)* **Parameters:** @@ -436,11 +459,19 @@ ___ ### createWriteStream -▸ **createWriteStream**(): *Promise‹WritableStream›* +▸ **createWriteStream**(`_options`: object): *Promise‹WritableStream›* *Inherited from [SourceSource](sourcesource.md).[createWriteStream](sourcesource.md#createwritestream)* -*Defined in [lib/source-destination/source-destination.ts:327](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L327)* +*Defined in [lib/source-destination/source-destination.ts:349](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L349)* + +**Parameters:** + +▪`Default value` **_options**: *object*= {} + +Name | Type | +------ | ------ | +`highWaterMark?` | undefined | number | **Returns:** *Promise‹WritableStream›* @@ -454,7 +485,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[emit](../interfaces/sparsereadable.md#emit)* -Defined in node_modules/@types/node/base.d.ts:693 +Defined in node_modules/@types/node/base.d.ts:908 **Parameters:** @@ -469,15 +500,27 @@ ___ ### eventNames -▸ **eventNames**(): *string | symbol[]* +▸ **eventNames**(): *Array‹string | symbol›* *Inherited from [CountingWritable](countingwritable.md).[eventNames](countingwritable.md#eventnames)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[eventNames](../interfaces/sparsereadable.md#eventnames)* -Defined in node_modules/@types/node/base.d.ts:694 +Defined in node_modules/@types/node/base.d.ts:909 + +**Returns:** *Array‹string | symbol›* + +___ + +### getAlignment + +▸ **getAlignment**(): *number | undefined* + +*Inherited from [SourceSource](sourcesource.md).[getAlignment](sourcesource.md#getalignment)* + +*Defined in [lib/source-destination/source-destination.ts:276](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L276)* -**Returns:** *string | symbol[]* +**Returns:** *number | undefined* ___ @@ -487,7 +530,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[getBlocks](sourcesource.md#getblocks)* -*Defined in [lib/source-destination/source-destination.ts:323](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L323)* +*Defined in [lib/source-destination/source-destination.ts:345](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L345)* **Returns:** *Promise‹[BlocksWithChecksum](../interfaces/blockswithchecksum.md)[]›* @@ -497,7 +540,7 @@ ___ ▸ **getEntries**(): *Promise‹Entry[]›* -*Defined in [lib/source-destination/zip.ts:207](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/zip.ts#L207)* +*Defined in [lib/source-destination/zip.ts:211](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/zip.ts#L211)* **Returns:** *Promise‹Entry[]›* @@ -507,7 +550,7 @@ ___ ▸ **getEntryByName**(`name`: string): *Promise‹Entry | undefined›* -*Defined in [lib/source-destination/zip.ts:233](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/zip.ts#L233)* +*Defined in [lib/source-destination/zip.ts:237](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/zip.ts#L237)* **Parameters:** @@ -523,7 +566,7 @@ ___ ▸ **getImageEntry**(): *Promise‹Entry›* -*Defined in [lib/source-destination/zip.ts:212](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/zip.ts#L212)* +*Defined in [lib/source-destination/zip.ts:216](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/zip.ts#L216)* **Returns:** *Promise‹Entry›* @@ -535,7 +578,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[getInnerSource](sourcesource.md#getinnersource)* -*Defined in [lib/source-destination/source-destination.ts:424](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L424)* +*Defined in [lib/source-destination/source-destination.ts:452](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L452)* **Returns:** *Promise‹[SourceDestination](sourcedestination.md)›* @@ -545,7 +588,7 @@ ___ ▸ **getJson**(`name`: string): *Promise‹any›* -*Defined in [lib/source-destination/zip.ts:264](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/zip.ts#L264)* +*Defined in [lib/source-destination/zip.ts:268](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/zip.ts#L268)* **Parameters:** @@ -565,7 +608,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[getMaxListeners](../interfaces/sparsereadable.md#getmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:691 +Defined in node_modules/@types/node/base.d.ts:906 **Returns:** *number* @@ -577,7 +620,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[getMetadata](sourcesource.md#getmetadata)* -*Defined in [lib/source-destination/source-destination.ts:280](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L280)* +*Defined in [lib/source-destination/source-destination.ts:304](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L304)* **Returns:** *Promise‹[Metadata](../interfaces/metadata.md)›* @@ -589,7 +632,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[getPartitionTable](sourcesource.md#getpartitiontable)* -*Defined in [lib/source-destination/source-destination.ts:445](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L445)* +*Defined in [lib/source-destination/source-destination.ts:473](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L473)* **Returns:** *Promise‹GetPartitionsResult | undefined›* @@ -599,7 +642,7 @@ ___ ▸ **getStream**(`name`: string): *Promise‹ReadableStream | undefined›* -*Defined in [lib/source-destination/zip.ts:242](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/zip.ts#L242)* +*Defined in [lib/source-destination/zip.ts:246](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/zip.ts#L246)* **Parameters:** @@ -615,7 +658,7 @@ ___ ▸ **getString**(`name`: string): *Promise‹string | undefined›* -*Defined in [lib/source-destination/zip.ts:256](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/zip.ts#L256)* +*Defined in [lib/source-destination/zip.ts:260](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/zip.ts#L260)* **Parameters:** @@ -631,7 +674,7 @@ ___ ▸ **init**(): *Promise‹void›* -*Defined in [lib/source-destination/zip.ts:172](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/zip.ts#L172)* +*Defined in [lib/source-destination/zip.ts:176](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/zip.ts#L176)* **Returns:** *Promise‹void›* @@ -645,7 +688,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[listenerCount](../interfaces/sparsereadable.md#listenercount)* -Defined in node_modules/@types/node/base.d.ts:695 +Defined in node_modules/@types/node/base.d.ts:910 **Parameters:** @@ -665,7 +708,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[listeners](../interfaces/sparsereadable.md#listeners)* -Defined in node_modules/@types/node/base.d.ts:692 +Defined in node_modules/@types/node/base.d.ts:907 **Parameters:** @@ -679,20 +722,27 @@ ___ ### on -▸ **on**(`event`: string | symbol, `listener`: Function): *this* +▸ **on**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[on](sourcesource.md#on)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[on](../interfaces/sparsereadable.md#on)* -Defined in node_modules/@types/node/base.d.ts:684 +Defined in node_modules/@types/node/base.d.ts:899 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -700,20 +750,27 @@ ___ ### once -▸ **once**(`event`: string | symbol, `listener`: Function): *this* +▸ **once**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[once](sourcesource.md#once)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[once](../interfaces/sparsereadable.md#once)* -Defined in node_modules/@types/node/base.d.ts:685 +Defined in node_modules/@types/node/base.d.ts:900 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -725,7 +782,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[open](sourcesource.md#open)* -*Defined in [lib/source-destination/source-destination.ts:335](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L335)* +*Defined in [lib/source-destination/source-destination.ts:361](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L361)* **Returns:** *Promise‹void›* @@ -733,20 +790,27 @@ ___ ### prependListener -▸ **prependListener**(`event`: string | symbol, `listener`: Function): *this* +▸ **prependListener**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[prependListener](sourcesource.md#prependlistener)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[prependListener](../interfaces/sparsereadable.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:686 +Defined in node_modules/@types/node/base.d.ts:901 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -754,20 +818,27 @@ ___ ### prependOnceListener -▸ **prependOnceListener**(`event`: string | symbol, `listener`: Function): *this* +▸ **prependOnceListener**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[prependOnceListener](sourcesource.md#prependoncelistener)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[prependOnceListener](../interfaces/sparsereadable.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:687 +Defined in node_modules/@types/node/base.d.ts:902 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -775,17 +846,17 @@ ___ ### read -▸ **read**(`_buffer`: Buffer, `_bufferOffset`: number, `_length`: number, `_sourceOffset`: number): *Promise‹ReadResult›* +▸ **read**(`_buffer`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer), `_bufferOffset`: number, `_length`: number, `_sourceOffset`: number): *Promise‹ReadResult›* *Inherited from [SourceSource](sourcesource.md).[read](sourcesource.md#read)* -*Defined in [lib/source-destination/source-destination.ts:291](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L291)* +*Defined in [lib/source-destination/source-destination.ts:315](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L315)* **Parameters:** Name | Type | ------ | ------ | -`_buffer` | Buffer | +`_buffer` | [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | `_bufferOffset` | number | `_length` | number | `_sourceOffset` | number | @@ -802,7 +873,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[removeAllListeners](../interfaces/sparsereadable.md#removealllisteners)* -Defined in node_modules/@types/node/base.d.ts:689 +Defined in node_modules/@types/node/base.d.ts:904 **Parameters:** @@ -816,20 +887,27 @@ ___ ### removeListener -▸ **removeListener**(`event`: string | symbol, `listener`: Function): *this* +▸ **removeListener**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[removeListener](sourcesource.md#removelistener)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[removeListener](../interfaces/sparsereadable.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:688 +Defined in node_modules/@types/node/base.d.ts:903 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -843,7 +921,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[setMaxListeners](../interfaces/sparsereadable.md#setmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:690 +Defined in node_modules/@types/node/base.d.ts:905 **Parameters:** @@ -857,17 +935,17 @@ ___ ### write -▸ **write**(`_buffer`: Buffer, `_bufferOffset`: number, `_length`: number, `_fileOffset`: number): *Promise‹WriteResult›* +▸ **write**(`_buffer`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer), `_bufferOffset`: number, `_length`: number, `_fileOffset`: number): *Promise‹WriteResult›* *Inherited from [SourceSource](sourcesource.md).[write](sourcesource.md#write)* -*Defined in [lib/source-destination/source-destination.ts:300](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L300)* +*Defined in [lib/source-destination/source-destination.ts:324](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L324)* **Parameters:** Name | Type | ------ | ------ | -`_buffer` | Buffer | +`_buffer` | [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | `_bufferOffset` | number | `_length` | number | `_fileOffset` | number | @@ -882,7 +960,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[listenerCount](countingwritable.md#static-listenercount)* -Defined in node_modules/@types/node/base.d.ts:680 +Defined in node_modules/@types/node/base.d.ts:895 **Parameters:** @@ -901,7 +979,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[register](sourcesource.md#static-register)* -*Defined in [lib/source-destination/source-destination.ts:250](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L250)* +*Defined in [lib/source-destination/source-destination.ts:270](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L270)* **Parameters:** diff --git a/doc/classes/scanner.md b/doc/classes/scanner.md index d532a98b..a120bdd2 100644 --- a/doc/classes/scanner.md +++ b/doc/classes/scanner.md @@ -48,7 +48,7 @@ \+ **new Scanner**(`adapters`: [Adapter](adapter.md)[]): *[Scanner](scanner.md)* -*Defined in [lib/scanner/scanner.ts:25](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/scanner/scanner.ts#L25)* +*Defined in [lib/scanner/scanner.ts:25](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/scanner/scanner.ts#L25)* **Parameters:** @@ -64,7 +64,7 @@ Name | Type | • **adapters**: *[Adapter](adapter.md)[]* -*Defined in [lib/scanner/scanner.ts:27](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/scanner/scanner.ts#L27)* +*Defined in [lib/scanner/scanner.ts:27](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/scanner/scanner.ts#L27)* ___ @@ -72,7 +72,7 @@ ___ • **drives**: *Set‹[AdapterSourceDestination](../interfaces/adaptersourcedestination.md)›* = new Set() -*Defined in [lib/scanner/scanner.ts:25](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/scanner/scanner.ts#L25)* +*Defined in [lib/scanner/scanner.ts:25](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/scanner/scanner.ts#L25)* ___ @@ -82,26 +82,33 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[defaultMaxListeners](countingwritable.md#static-defaultmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:681 +Defined in node_modules/@types/node/base.d.ts:896 ## Methods ### addListener -▸ **addListener**(`event`: string | symbol, `listener`: Function): *this* +▸ **addListener**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[addListener](sourcesource.md#addlistener)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[addListener](../interfaces/sparsereadable.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:683 +Defined in node_modules/@types/node/base.d.ts:898 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -115,7 +122,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[emit](../interfaces/sparsereadable.md#emit)* -Defined in node_modules/@types/node/base.d.ts:693 +Defined in node_modules/@types/node/base.d.ts:908 **Parameters:** @@ -130,15 +137,15 @@ ___ ### eventNames -▸ **eventNames**(): *string | symbol[]* +▸ **eventNames**(): *Array‹string | symbol›* *Inherited from [CountingWritable](countingwritable.md).[eventNames](countingwritable.md#eventnames)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[eventNames](../interfaces/sparsereadable.md#eventnames)* -Defined in node_modules/@types/node/base.d.ts:694 +Defined in node_modules/@types/node/base.d.ts:909 -**Returns:** *string | symbol[]* +**Returns:** *Array‹string | symbol›* ___ @@ -146,7 +153,7 @@ ___ ▸ **getBy**(`field`: "raw" | "device" | "devicePath", `value`: string): *[AdapterSourceDestination](../interfaces/adaptersourcedestination.md) | undefined* -*Defined in [lib/scanner/scanner.ts:46](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/scanner/scanner.ts#L46)* +*Defined in [lib/scanner/scanner.ts:46](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/scanner/scanner.ts#L46)* **Parameters:** @@ -167,7 +174,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[getMaxListeners](../interfaces/sparsereadable.md#getmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:691 +Defined in node_modules/@types/node/base.d.ts:906 **Returns:** *number* @@ -181,7 +188,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[listenerCount](../interfaces/sparsereadable.md#listenercount)* -Defined in node_modules/@types/node/base.d.ts:695 +Defined in node_modules/@types/node/base.d.ts:910 **Parameters:** @@ -201,7 +208,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[listeners](../interfaces/sparsereadable.md#listeners)* -Defined in node_modules/@types/node/base.d.ts:692 +Defined in node_modules/@types/node/base.d.ts:907 **Parameters:** @@ -215,20 +222,27 @@ ___ ### on -▸ **on**(`event`: string | symbol, `listener`: Function): *this* +▸ **on**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[on](sourcesource.md#on)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[on](../interfaces/sparsereadable.md#on)* -Defined in node_modules/@types/node/base.d.ts:684 +Defined in node_modules/@types/node/base.d.ts:899 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -238,7 +252,7 @@ ___ ▸ **onAttach**(`drive`: [AdapterSourceDestination](../interfaces/adaptersourcedestination.md)): *void* -*Defined in [lib/scanner/scanner.ts:36](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/scanner/scanner.ts#L36)* +*Defined in [lib/scanner/scanner.ts:36](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/scanner/scanner.ts#L36)* **Parameters:** @@ -254,7 +268,7 @@ ___ ▸ **onDetach**(`drive`: [AdapterSourceDestination](../interfaces/adaptersourcedestination.md)): *void* -*Defined in [lib/scanner/scanner.ts:41](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/scanner/scanner.ts#L41)* +*Defined in [lib/scanner/scanner.ts:41](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/scanner/scanner.ts#L41)* **Parameters:** @@ -268,20 +282,27 @@ ___ ### once -▸ **once**(`event`: string | symbol, `listener`: Function): *this* +▸ **once**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[once](sourcesource.md#once)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[once](../interfaces/sparsereadable.md#once)* -Defined in node_modules/@types/node/base.d.ts:685 +Defined in node_modules/@types/node/base.d.ts:900 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -289,20 +310,27 @@ ___ ### prependListener -▸ **prependListener**(`event`: string | symbol, `listener`: Function): *this* +▸ **prependListener**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[prependListener](sourcesource.md#prependlistener)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[prependListener](../interfaces/sparsereadable.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:686 +Defined in node_modules/@types/node/base.d.ts:901 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -310,20 +338,27 @@ ___ ### prependOnceListener -▸ **prependOnceListener**(`event`: string | symbol, `listener`: Function): *this* +▸ **prependOnceListener**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[prependOnceListener](sourcesource.md#prependoncelistener)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[prependOnceListener](../interfaces/sparsereadable.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:687 +Defined in node_modules/@types/node/base.d.ts:902 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -337,7 +372,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[removeAllListeners](../interfaces/sparsereadable.md#removealllisteners)* -Defined in node_modules/@types/node/base.d.ts:689 +Defined in node_modules/@types/node/base.d.ts:904 **Parameters:** @@ -351,20 +386,27 @@ ___ ### removeListener -▸ **removeListener**(`event`: string | symbol, `listener`: Function): *this* +▸ **removeListener**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[removeListener](sourcesource.md#removelistener)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[removeListener](../interfaces/sparsereadable.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:688 +Defined in node_modules/@types/node/base.d.ts:903 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -378,7 +420,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[setMaxListeners](../interfaces/sparsereadable.md#setmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:690 +Defined in node_modules/@types/node/base.d.ts:905 **Parameters:** @@ -394,7 +436,7 @@ ___ ▸ **start**(): *Promise‹void›* -*Defined in [lib/scanner/scanner.ts:57](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/scanner/scanner.ts#L57)* +*Defined in [lib/scanner/scanner.ts:57](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/scanner/scanner.ts#L57)* **Returns:** *Promise‹void›* @@ -404,7 +446,7 @@ ___ ▸ **stop**(): *void* -*Defined in [lib/scanner/scanner.ts:74](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/scanner/scanner.ts#L74)* +*Defined in [lib/scanner/scanner.ts:74](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/scanner/scanner.ts#L74)* **Returns:** *void* @@ -416,7 +458,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[listenerCount](countingwritable.md#static-listenercount)* -Defined in node_modules/@types/node/base.d.ts:680 +Defined in node_modules/@types/node/base.d.ts:895 **Parameters:** diff --git a/doc/classes/singleusestreamsource.md b/doc/classes/singleusestreamsource.md index 15bd2a3f..80720efe 100644 --- a/doc/classes/singleusestreamsource.md +++ b/doc/classes/singleusestreamsource.md @@ -42,6 +42,7 @@ * [createWriteStream](singleusestreamsource.md#createwritestream) * [emit](singleusestreamsource.md#emit) * [eventNames](singleusestreamsource.md#eventnames) +* [getAlignment](singleusestreamsource.md#getalignment) * [getBlocks](singleusestreamsource.md#getblocks) * [getInnerSource](singleusestreamsource.md#getinnersource) * [getMaxListeners](singleusestreamsource.md#getmaxlisteners) @@ -68,7 +69,7 @@ \+ **new SingleUseStreamSource**(`stream`: ReadableStream): *[SingleUseStreamSource](singleusestreamsource.md)* -*Defined in [lib/source-destination/single-use-stream-source.ts:23](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/single-use-stream-source.ts#L23)* +*Defined in [lib/source-destination/single-use-stream-source.ts:26](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/single-use-stream-source.ts#L26)* **Parameters:** @@ -84,7 +85,7 @@ Name | Type | • **stream**: *ReadableStream* -*Defined in [lib/source-destination/single-use-stream-source.ts:25](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/single-use-stream-source.ts#L25)* +*Defined in [lib/source-destination/single-use-stream-source.ts:28](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/single-use-stream-source.ts#L28)* ___ @@ -92,7 +93,7 @@ ___ • **used**: *boolean* = false -*Defined in [lib/source-destination/single-use-stream-source.ts:23](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/single-use-stream-source.ts#L23)* +*Defined in [lib/source-destination/single-use-stream-source.ts:26](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/single-use-stream-source.ts#L26)* ___ @@ -102,7 +103,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[defaultMaxListeners](countingwritable.md#static-defaultmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:681 +Defined in node_modules/@types/node/base.d.ts:896 ___ @@ -123,7 +124,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[imageExtensions](sourcesource.md#static-imageextensions)* -*Defined in [lib/source-destination/source-destination.ts:232](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L232)* +*Defined in [lib/source-destination/source-destination.ts:252](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L252)* ___ @@ -133,7 +134,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[mimetype](sourcesource.md#static-optional-mimetype)* -*Defined in [lib/source-destination/source-destination.ts:244](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L244)* +*Defined in [lib/source-destination/source-destination.ts:264](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L264)* ## Methods @@ -143,7 +144,7 @@ ___ *Inherited from [SourceDestination](sourcedestination.md).[_close](sourcedestination.md#protected-_close)* -*Defined in [lib/source-destination/source-destination.ts:353](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L353)* +*Defined in [lib/source-destination/source-destination.ts:379](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L379)* **Returns:** *Promise‹void›* @@ -155,7 +156,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[_getMetadata](sourcesource.md#protected-_getmetadata)* -*Defined in [lib/source-destination/source-destination.ts:287](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L287)* +*Defined in [lib/source-destination/source-destination.ts:311](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L311)* **Returns:** *Promise‹[Metadata](../interfaces/metadata.md)›* @@ -167,7 +168,7 @@ ___ *Inherited from [SourceDestination](sourcedestination.md).[_open](sourcedestination.md#protected-_open)* -*Defined in [lib/source-destination/source-destination.ts:349](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L349)* +*Defined in [lib/source-destination/source-destination.ts:375](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L375)* **Returns:** *Promise‹void›* @@ -175,20 +176,27 @@ ___ ### addListener -▸ **addListener**(`event`: string | symbol, `listener`: Function): *this* +▸ **addListener**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[addListener](sourcesource.md#addlistener)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[addListener](../interfaces/sparsereadable.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:683 +Defined in node_modules/@types/node/base.d.ts:898 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -200,7 +208,7 @@ ___ *Overrides [SourceSource](sourcesource.md).[canCreateReadStream](sourcesource.md#cancreatereadstream)* -*Defined in [lib/source-destination/single-use-stream-source.ts:29](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/single-use-stream-source.ts#L29)* +*Defined in [lib/source-destination/single-use-stream-source.ts:32](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/single-use-stream-source.ts#L32)* **Returns:** *Promise‹boolean›* @@ -212,7 +220,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[canCreateSparseReadStream](sourcesource.md#cancreatesparsereadstream)* -*Defined in [lib/source-destination/source-destination.ts:268](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L268)* +*Defined in [lib/source-destination/source-destination.ts:292](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L292)* **Returns:** *Promise‹boolean›* @@ -224,7 +232,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[canCreateSparseWriteStream](sourcesource.md#cancreatesparsewritestream)* -*Defined in [lib/source-destination/source-destination.ts:276](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L276)* +*Defined in [lib/source-destination/source-destination.ts:300](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L300)* **Returns:** *Promise‹boolean›* @@ -236,7 +244,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[canCreateWriteStream](sourcesource.md#cancreatewritestream)* -*Defined in [lib/source-destination/source-destination.ts:272](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L272)* +*Defined in [lib/source-destination/source-destination.ts:296](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L296)* **Returns:** *Promise‹boolean›* @@ -248,7 +256,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[canRead](sourcesource.md#canread)* -*Defined in [lib/source-destination/source-destination.ts:256](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L256)* +*Defined in [lib/source-destination/source-destination.ts:280](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L280)* **Returns:** *Promise‹boolean›* @@ -260,7 +268,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[canWrite](sourcesource.md#canwrite)* -*Defined in [lib/source-destination/source-destination.ts:260](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L260)* +*Defined in [lib/source-destination/source-destination.ts:284](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L284)* **Returns:** *Promise‹boolean›* @@ -272,7 +280,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[close](sourcesource.md#close)* -*Defined in [lib/source-destination/source-destination.ts:342](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L342)* +*Defined in [lib/source-destination/source-destination.ts:368](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L368)* **Returns:** *Promise‹void›* @@ -280,19 +288,20 @@ ___ ### createReadStream -▸ **createReadStream**(`_emitProgress`: boolean, `start`: number, `end?`: undefined | number): *Promise‹ReadableStream›* +▸ **createReadStream**(`__namedParameters`: object): *Promise‹ReadableStream›* *Overrides [SourceSource](sourcesource.md).[createReadStream](sourcesource.md#createreadstream)* -*Defined in [lib/source-destination/single-use-stream-source.ts:33](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/single-use-stream-source.ts#L33)* +*Defined in [lib/source-destination/single-use-stream-source.ts:36](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/single-use-stream-source.ts#L36)* **Parameters:** +▪`Default value` **__namedParameters**: *object*= {} + Name | Type | Default | ------ | ------ | ------ | -`_emitProgress` | boolean | false | +`end` | undefined | number | - | `start` | number | 0 | -`end?` | undefined | number | - | **Returns:** *Promise‹ReadableStream›* @@ -300,17 +309,17 @@ ___ ### createSparseReadStream -▸ **createSparseReadStream**(`_generateChecksums`: boolean): *Promise‹[SparseReadable](../interfaces/sparsereadable.md)›* +▸ **createSparseReadStream**(`_options`: [CreateSparseReadStreamOptions](../interfaces/createsparsereadstreamoptions.md)): *Promise‹[SparseReadable](../interfaces/sparsereadable.md)›* *Inherited from [SourceSource](sourcesource.md).[createSparseReadStream](sourcesource.md#createsparsereadstream)* -*Defined in [lib/source-destination/source-destination.ts:317](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L317)* +*Defined in [lib/source-destination/source-destination.ts:339](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L339)* **Parameters:** Name | Type | Default | ------ | ------ | ------ | -`_generateChecksums` | boolean | false | +`_options` | [CreateSparseReadStreamOptions](../interfaces/createsparsereadstreamoptions.md) | {} | **Returns:** *Promise‹[SparseReadable](../interfaces/sparsereadable.md)›* @@ -318,11 +327,19 @@ ___ ### createSparseWriteStream -▸ **createSparseWriteStream**(): *Promise‹[SparseWritable](../interfaces/sparsewritable.md)›* +▸ **createSparseWriteStream**(`_options`: object): *Promise‹[SparseWritable](../interfaces/sparsewritable.md)›* *Inherited from [SourceSource](sourcesource.md).[createSparseWriteStream](sourcesource.md#createsparsewritestream)* -*Defined in [lib/source-destination/source-destination.ts:331](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L331)* +*Defined in [lib/source-destination/source-destination.ts:355](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L355)* + +**Parameters:** + +▪`Default value` **_options**: *object*= {} + +Name | Type | +------ | ------ | +`highWaterMark?` | undefined | number | **Returns:** *Promise‹[SparseWritable](../interfaces/sparsewritable.md)›* @@ -334,7 +351,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[createVerifier](sourcesource.md#createverifier)* -*Defined in [lib/source-destination/source-destination.ts:357](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L357)* +*Defined in [lib/source-destination/source-destination.ts:383](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L383)* **Parameters:** @@ -349,11 +366,19 @@ ___ ### createWriteStream -▸ **createWriteStream**(): *Promise‹WritableStream›* +▸ **createWriteStream**(`_options`: object): *Promise‹WritableStream›* *Inherited from [SourceSource](sourcesource.md).[createWriteStream](sourcesource.md#createwritestream)* -*Defined in [lib/source-destination/source-destination.ts:327](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L327)* +*Defined in [lib/source-destination/source-destination.ts:349](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L349)* + +**Parameters:** + +▪`Default value` **_options**: *object*= {} + +Name | Type | +------ | ------ | +`highWaterMark?` | undefined | number | **Returns:** *Promise‹WritableStream›* @@ -367,7 +392,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[emit](../interfaces/sparsereadable.md#emit)* -Defined in node_modules/@types/node/base.d.ts:693 +Defined in node_modules/@types/node/base.d.ts:908 **Parameters:** @@ -382,15 +407,27 @@ ___ ### eventNames -▸ **eventNames**(): *string | symbol[]* +▸ **eventNames**(): *Array‹string | symbol›* *Inherited from [CountingWritable](countingwritable.md).[eventNames](countingwritable.md#eventnames)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[eventNames](../interfaces/sparsereadable.md#eventnames)* -Defined in node_modules/@types/node/base.d.ts:694 +Defined in node_modules/@types/node/base.d.ts:909 -**Returns:** *string | symbol[]* +**Returns:** *Array‹string | symbol›* + +___ + +### getAlignment + +▸ **getAlignment**(): *number | undefined* + +*Inherited from [SourceSource](sourcesource.md).[getAlignment](sourcesource.md#getalignment)* + +*Defined in [lib/source-destination/source-destination.ts:276](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L276)* + +**Returns:** *number | undefined* ___ @@ -400,7 +437,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[getBlocks](sourcesource.md#getblocks)* -*Defined in [lib/source-destination/source-destination.ts:323](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L323)* +*Defined in [lib/source-destination/source-destination.ts:345](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L345)* **Returns:** *Promise‹[BlocksWithChecksum](../interfaces/blockswithchecksum.md)[]›* @@ -412,7 +449,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[getInnerSource](sourcesource.md#getinnersource)* -*Defined in [lib/source-destination/source-destination.ts:424](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L424)* +*Defined in [lib/source-destination/source-destination.ts:452](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L452)* **Returns:** *Promise‹[SourceDestination](sourcedestination.md)›* @@ -426,7 +463,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[getMaxListeners](../interfaces/sparsereadable.md#getmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:691 +Defined in node_modules/@types/node/base.d.ts:906 **Returns:** *number* @@ -438,7 +475,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[getMetadata](sourcesource.md#getmetadata)* -*Defined in [lib/source-destination/source-destination.ts:280](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L280)* +*Defined in [lib/source-destination/source-destination.ts:304](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L304)* **Returns:** *Promise‹[Metadata](../interfaces/metadata.md)›* @@ -450,7 +487,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[getPartitionTable](sourcesource.md#getpartitiontable)* -*Defined in [lib/source-destination/source-destination.ts:445](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L445)* +*Defined in [lib/source-destination/source-destination.ts:473](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L473)* **Returns:** *Promise‹GetPartitionsResult | undefined›* @@ -464,7 +501,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[listenerCount](../interfaces/sparsereadable.md#listenercount)* -Defined in node_modules/@types/node/base.d.ts:695 +Defined in node_modules/@types/node/base.d.ts:910 **Parameters:** @@ -484,7 +521,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[listeners](../interfaces/sparsereadable.md#listeners)* -Defined in node_modules/@types/node/base.d.ts:692 +Defined in node_modules/@types/node/base.d.ts:907 **Parameters:** @@ -498,20 +535,27 @@ ___ ### on -▸ **on**(`event`: string | symbol, `listener`: Function): *this* +▸ **on**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[on](sourcesource.md#on)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[on](../interfaces/sparsereadable.md#on)* -Defined in node_modules/@types/node/base.d.ts:684 +Defined in node_modules/@types/node/base.d.ts:899 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -519,20 +563,27 @@ ___ ### once -▸ **once**(`event`: string | symbol, `listener`: Function): *this* +▸ **once**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[once](sourcesource.md#once)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[once](../interfaces/sparsereadable.md#once)* -Defined in node_modules/@types/node/base.d.ts:685 +Defined in node_modules/@types/node/base.d.ts:900 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -544,7 +595,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[open](sourcesource.md#open)* -*Defined in [lib/source-destination/source-destination.ts:335](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L335)* +*Defined in [lib/source-destination/source-destination.ts:361](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L361)* **Returns:** *Promise‹void›* @@ -552,20 +603,27 @@ ___ ### prependListener -▸ **prependListener**(`event`: string | symbol, `listener`: Function): *this* +▸ **prependListener**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[prependListener](sourcesource.md#prependlistener)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[prependListener](../interfaces/sparsereadable.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:686 +Defined in node_modules/@types/node/base.d.ts:901 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -573,20 +631,27 @@ ___ ### prependOnceListener -▸ **prependOnceListener**(`event`: string | symbol, `listener`: Function): *this* +▸ **prependOnceListener**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[prependOnceListener](sourcesource.md#prependoncelistener)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[prependOnceListener](../interfaces/sparsereadable.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:687 +Defined in node_modules/@types/node/base.d.ts:902 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -594,17 +659,17 @@ ___ ### read -▸ **read**(`_buffer`: Buffer, `_bufferOffset`: number, `_length`: number, `_sourceOffset`: number): *Promise‹ReadResult›* +▸ **read**(`_buffer`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer), `_bufferOffset`: number, `_length`: number, `_sourceOffset`: number): *Promise‹ReadResult›* *Inherited from [SourceSource](sourcesource.md).[read](sourcesource.md#read)* -*Defined in [lib/source-destination/source-destination.ts:291](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L291)* +*Defined in [lib/source-destination/source-destination.ts:315](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L315)* **Parameters:** Name | Type | ------ | ------ | -`_buffer` | Buffer | +`_buffer` | [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | `_bufferOffset` | number | `_length` | number | `_sourceOffset` | number | @@ -621,7 +686,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[removeAllListeners](../interfaces/sparsereadable.md#removealllisteners)* -Defined in node_modules/@types/node/base.d.ts:689 +Defined in node_modules/@types/node/base.d.ts:904 **Parameters:** @@ -635,20 +700,27 @@ ___ ### removeListener -▸ **removeListener**(`event`: string | symbol, `listener`: Function): *this* +▸ **removeListener**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[removeListener](sourcesource.md#removelistener)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[removeListener](../interfaces/sparsereadable.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:688 +Defined in node_modules/@types/node/base.d.ts:903 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -662,7 +734,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[setMaxListeners](../interfaces/sparsereadable.md#setmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:690 +Defined in node_modules/@types/node/base.d.ts:905 **Parameters:** @@ -676,17 +748,17 @@ ___ ### write -▸ **write**(`_buffer`: Buffer, `_bufferOffset`: number, `_length`: number, `_fileOffset`: number): *Promise‹WriteResult›* +▸ **write**(`_buffer`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer), `_bufferOffset`: number, `_length`: number, `_fileOffset`: number): *Promise‹WriteResult›* *Inherited from [SourceSource](sourcesource.md).[write](sourcesource.md#write)* -*Defined in [lib/source-destination/source-destination.ts:300](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L300)* +*Defined in [lib/source-destination/source-destination.ts:324](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L324)* **Parameters:** Name | Type | ------ | ------ | -`_buffer` | Buffer | +`_buffer` | [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | `_bufferOffset` | number | `_length` | number | `_fileOffset` | number | @@ -701,7 +773,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[listenerCount](countingwritable.md#static-listenercount)* -Defined in node_modules/@types/node/base.d.ts:680 +Defined in node_modules/@types/node/base.d.ts:895 **Parameters:** @@ -720,7 +792,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[register](sourcesource.md#static-register)* -*Defined in [lib/source-destination/source-destination.ts:250](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L250)* +*Defined in [lib/source-destination/source-destination.ts:270](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L270)* **Parameters:** diff --git a/doc/classes/sourcedestination.md b/doc/classes/sourcedestination.md index 04c2bdeb..bc6edf90 100644 --- a/doc/classes/sourcedestination.md +++ b/doc/classes/sourcedestination.md @@ -57,6 +57,7 @@ * [createWriteStream](sourcedestination.md#createwritestream) * [emit](sourcedestination.md#emit) * [eventNames](sourcedestination.md#eventnames) +* [getAlignment](sourcedestination.md#getalignment) * [getBlocks](sourcedestination.md#getblocks) * [getInnerSource](sourcedestination.md#getinnersource) * [getInnerSourceHelper](sourcedestination.md#private-getinnersourcehelper) @@ -86,7 +87,7 @@ • **isOpen**: *boolean* = false -*Defined in [lib/source-destination/source-destination.ts:248](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L248)* +*Defined in [lib/source-destination/source-destination.ts:268](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L268)* ___ @@ -94,7 +95,7 @@ ___ • **metadata**: *[Metadata](../interfaces/metadata.md)* -*Defined in [lib/source-destination/source-destination.ts:247](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L247)* +*Defined in [lib/source-destination/source-destination.ts:267](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L267)* ___ @@ -104,7 +105,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[defaultMaxListeners](countingwritable.md#static-defaultmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:681 +Defined in node_modules/@types/node/base.d.ts:896 ___ @@ -123,7 +124,7 @@ ___ 'wic', ] -*Defined in [lib/source-destination/source-destination.ts:232](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L232)* +*Defined in [lib/source-destination/source-destination.ts:252](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L252)* ___ @@ -131,7 +132,7 @@ ___ ▪ **mimetype**? : *undefined | string* -*Defined in [lib/source-destination/source-destination.ts:244](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L244)* +*Defined in [lib/source-destination/source-destination.ts:264](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L264)* ___ @@ -139,7 +140,7 @@ ___ ▪ **mimetypes**: *Map‹string, [SourceSource](sourcesource.md)›* = new Map() -*Defined in [lib/source-destination/source-destination.ts:245](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L245)* +*Defined in [lib/source-destination/source-destination.ts:265](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L265)* ## Methods @@ -147,7 +148,7 @@ ___ ▸ **_close**(): *Promise‹void›* -*Defined in [lib/source-destination/source-destination.ts:353](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L353)* +*Defined in [lib/source-destination/source-destination.ts:379](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L379)* **Returns:** *Promise‹void›* @@ -157,7 +158,7 @@ ___ ▸ **_getMetadata**(): *Promise‹[Metadata](../interfaces/metadata.md)›* -*Defined in [lib/source-destination/source-destination.ts:287](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L287)* +*Defined in [lib/source-destination/source-destination.ts:311](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L311)* **Returns:** *Promise‹[Metadata](../interfaces/metadata.md)›* @@ -167,7 +168,7 @@ ___ ▸ **_open**(): *Promise‹void›* -*Defined in [lib/source-destination/source-destination.ts:349](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L349)* +*Defined in [lib/source-destination/source-destination.ts:375](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L375)* **Returns:** *Promise‹void›* @@ -175,20 +176,27 @@ ___ ### addListener -▸ **addListener**(`event`: string | symbol, `listener`: Function): *this* +▸ **addListener**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[addListener](sourcesource.md#addlistener)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[addListener](../interfaces/sparsereadable.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:683 +Defined in node_modules/@types/node/base.d.ts:898 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -198,7 +206,7 @@ ___ ▸ **canCreateReadStream**(): *Promise‹boolean›* -*Defined in [lib/source-destination/source-destination.ts:264](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L264)* +*Defined in [lib/source-destination/source-destination.ts:288](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L288)* **Returns:** *Promise‹boolean›* @@ -208,7 +216,7 @@ ___ ▸ **canCreateSparseReadStream**(): *Promise‹boolean›* -*Defined in [lib/source-destination/source-destination.ts:268](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L268)* +*Defined in [lib/source-destination/source-destination.ts:292](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L292)* **Returns:** *Promise‹boolean›* @@ -218,7 +226,7 @@ ___ ▸ **canCreateSparseWriteStream**(): *Promise‹boolean›* -*Defined in [lib/source-destination/source-destination.ts:276](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L276)* +*Defined in [lib/source-destination/source-destination.ts:300](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L300)* **Returns:** *Promise‹boolean›* @@ -228,7 +236,7 @@ ___ ▸ **canCreateWriteStream**(): *Promise‹boolean›* -*Defined in [lib/source-destination/source-destination.ts:272](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L272)* +*Defined in [lib/source-destination/source-destination.ts:296](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L296)* **Returns:** *Promise‹boolean›* @@ -238,7 +246,7 @@ ___ ▸ **canRead**(): *Promise‹boolean›* -*Defined in [lib/source-destination/source-destination.ts:256](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L256)* +*Defined in [lib/source-destination/source-destination.ts:280](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L280)* **Returns:** *Promise‹boolean›* @@ -248,7 +256,7 @@ ___ ▸ **canWrite**(): *Promise‹boolean›* -*Defined in [lib/source-destination/source-destination.ts:260](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L260)* +*Defined in [lib/source-destination/source-destination.ts:284](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L284)* **Returns:** *Promise‹boolean›* @@ -258,7 +266,7 @@ ___ ▸ **close**(): *Promise‹void›* -*Defined in [lib/source-destination/source-destination.ts:342](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L342)* +*Defined in [lib/source-destination/source-destination.ts:368](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L368)* **Returns:** *Promise‹void›* @@ -266,17 +274,15 @@ ___ ### createReadStream -▸ **createReadStream**(`_emitProgress`: boolean, `_start`: number, `_end?`: undefined | number): *Promise‹ReadableStream›* +▸ **createReadStream**(`_options`: [CreateReadStreamOptions](../interfaces/createreadstreamoptions.md)): *Promise‹ReadableStream›* -*Defined in [lib/source-destination/source-destination.ts:309](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L309)* +*Defined in [lib/source-destination/source-destination.ts:333](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L333)* **Parameters:** Name | Type | Default | ------ | ------ | ------ | -`_emitProgress` | boolean | false | -`_start` | number | 0 | -`_end?` | undefined | number | - | +`_options` | [CreateReadStreamOptions](../interfaces/createreadstreamoptions.md) | {} | **Returns:** *Promise‹ReadableStream›* @@ -284,15 +290,15 @@ ___ ### createSparseReadStream -▸ **createSparseReadStream**(`_generateChecksums`: boolean): *Promise‹[SparseReadable](../interfaces/sparsereadable.md)›* +▸ **createSparseReadStream**(`_options`: [CreateSparseReadStreamOptions](../interfaces/createsparsereadstreamoptions.md)): *Promise‹[SparseReadable](../interfaces/sparsereadable.md)›* -*Defined in [lib/source-destination/source-destination.ts:317](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L317)* +*Defined in [lib/source-destination/source-destination.ts:339](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L339)* **Parameters:** Name | Type | Default | ------ | ------ | ------ | -`_generateChecksums` | boolean | false | +`_options` | [CreateSparseReadStreamOptions](../interfaces/createsparsereadstreamoptions.md) | {} | **Returns:** *Promise‹[SparseReadable](../interfaces/sparsereadable.md)›* @@ -300,9 +306,17 @@ ___ ### createSparseWriteStream -▸ **createSparseWriteStream**(): *Promise‹[SparseWritable](../interfaces/sparsewritable.md)›* +▸ **createSparseWriteStream**(`_options`: object): *Promise‹[SparseWritable](../interfaces/sparsewritable.md)›* -*Defined in [lib/source-destination/source-destination.ts:331](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L331)* +*Defined in [lib/source-destination/source-destination.ts:355](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L355)* + +**Parameters:** + +▪`Default value` **_options**: *object*= {} + +Name | Type | +------ | ------ | +`highWaterMark?` | undefined | number | **Returns:** *Promise‹[SparseWritable](../interfaces/sparsewritable.md)›* @@ -312,7 +326,7 @@ ___ ▸ **createVerifier**(`checksumOrBlocks`: string | [BlocksWithChecksum](../interfaces/blockswithchecksum.md)[], `size?`: undefined | number): *[Verifier](verifier.md)* -*Defined in [lib/source-destination/source-destination.ts:357](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L357)* +*Defined in [lib/source-destination/source-destination.ts:383](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L383)* **Parameters:** @@ -327,9 +341,17 @@ ___ ### createWriteStream -▸ **createWriteStream**(): *Promise‹WritableStream›* +▸ **createWriteStream**(`_options`: object): *Promise‹WritableStream›* + +*Defined in [lib/source-destination/source-destination.ts:349](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L349)* + +**Parameters:** + +▪`Default value` **_options**: *object*= {} -*Defined in [lib/source-destination/source-destination.ts:327](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L327)* +Name | Type | +------ | ------ | +`highWaterMark?` | undefined | number | **Returns:** *Promise‹WritableStream›* @@ -343,7 +365,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[emit](../interfaces/sparsereadable.md#emit)* -Defined in node_modules/@types/node/base.d.ts:693 +Defined in node_modules/@types/node/base.d.ts:908 **Parameters:** @@ -358,15 +380,25 @@ ___ ### eventNames -▸ **eventNames**(): *string | symbol[]* +▸ **eventNames**(): *Array‹string | symbol›* *Inherited from [CountingWritable](countingwritable.md).[eventNames](countingwritable.md#eventnames)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[eventNames](../interfaces/sparsereadable.md#eventnames)* -Defined in node_modules/@types/node/base.d.ts:694 +Defined in node_modules/@types/node/base.d.ts:909 -**Returns:** *string | symbol[]* +**Returns:** *Array‹string | symbol›* + +___ + +### getAlignment + +▸ **getAlignment**(): *number | undefined* + +*Defined in [lib/source-destination/source-destination.ts:276](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L276)* + +**Returns:** *number | undefined* ___ @@ -374,7 +406,7 @@ ___ ▸ **getBlocks**(): *Promise‹[BlocksWithChecksum](../interfaces/blockswithchecksum.md)[]›* -*Defined in [lib/source-destination/source-destination.ts:323](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L323)* +*Defined in [lib/source-destination/source-destination.ts:345](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L345)* **Returns:** *Promise‹[BlocksWithChecksum](../interfaces/blockswithchecksum.md)[]›* @@ -384,7 +416,7 @@ ___ ▸ **getInnerSource**(): *Promise‹[SourceDestination](sourcedestination.md)›* -*Defined in [lib/source-destination/source-destination.ts:424](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L424)* +*Defined in [lib/source-destination/source-destination.ts:452](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L452)* **Returns:** *Promise‹[SourceDestination](sourcedestination.md)›* @@ -394,7 +426,7 @@ ___ ▸ **getInnerSourceHelper**(`mimetype?`: undefined | string): *Promise‹[SourceDestination](sourcedestination.md)‹››* -*Defined in [lib/source-destination/source-destination.ts:407](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L407)* +*Defined in [lib/source-destination/source-destination.ts:435](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L435)* **Parameters:** @@ -414,7 +446,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[getMaxListeners](../interfaces/sparsereadable.md#getmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:691 +Defined in node_modules/@types/node/base.d.ts:906 **Returns:** *number* @@ -424,7 +456,7 @@ ___ ▸ **getMetadata**(): *Promise‹[Metadata](../interfaces/metadata.md)›* -*Defined in [lib/source-destination/source-destination.ts:280](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L280)* +*Defined in [lib/source-destination/source-destination.ts:304](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L304)* **Returns:** *Promise‹[Metadata](../interfaces/metadata.md)›* @@ -434,7 +466,7 @@ ___ ▸ **getMimeTypeFromContent**(): *Promise‹string | undefined›* -*Defined in [lib/source-destination/source-destination.ts:391](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L391)* +*Defined in [lib/source-destination/source-destination.ts:417](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L417)* **Returns:** *Promise‹string | undefined›* @@ -444,7 +476,7 @@ ___ ▸ **getMimeTypeFromName**(): *Promise‹string | undefined›* -*Defined in [lib/source-destination/source-destination.ts:380](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L380)* +*Defined in [lib/source-destination/source-destination.ts:406](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L406)* **Returns:** *Promise‹string | undefined›* @@ -454,7 +486,7 @@ ___ ▸ **getPartitionTable**(): *Promise‹GetPartitionsResult | undefined›* -*Defined in [lib/source-destination/source-destination.ts:445](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L445)* +*Defined in [lib/source-destination/source-destination.ts:473](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L473)* **Returns:** *Promise‹GetPartitionsResult | undefined›* @@ -468,7 +500,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[listenerCount](../interfaces/sparsereadable.md#listenercount)* -Defined in node_modules/@types/node/base.d.ts:695 +Defined in node_modules/@types/node/base.d.ts:910 **Parameters:** @@ -488,7 +520,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[listeners](../interfaces/sparsereadable.md#listeners)* -Defined in node_modules/@types/node/base.d.ts:692 +Defined in node_modules/@types/node/base.d.ts:907 **Parameters:** @@ -502,20 +534,27 @@ ___ ### on -▸ **on**(`event`: string | symbol, `listener`: Function): *this* +▸ **on**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[on](sourcesource.md#on)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[on](../interfaces/sparsereadable.md#on)* -Defined in node_modules/@types/node/base.d.ts:684 +Defined in node_modules/@types/node/base.d.ts:899 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -523,20 +562,27 @@ ___ ### once -▸ **once**(`event`: string | symbol, `listener`: Function): *this* +▸ **once**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[once](sourcesource.md#once)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[once](../interfaces/sparsereadable.md#once)* -Defined in node_modules/@types/node/base.d.ts:685 +Defined in node_modules/@types/node/base.d.ts:900 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -546,7 +592,7 @@ ___ ▸ **open**(): *Promise‹void›* -*Defined in [lib/source-destination/source-destination.ts:335](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L335)* +*Defined in [lib/source-destination/source-destination.ts:361](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L361)* **Returns:** *Promise‹void›* @@ -554,20 +600,27 @@ ___ ### prependListener -▸ **prependListener**(`event`: string | symbol, `listener`: Function): *this* +▸ **prependListener**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[prependListener](sourcesource.md#prependlistener)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[prependListener](../interfaces/sparsereadable.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:686 +Defined in node_modules/@types/node/base.d.ts:901 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -575,20 +628,27 @@ ___ ### prependOnceListener -▸ **prependOnceListener**(`event`: string | symbol, `listener`: Function): *this* +▸ **prependOnceListener**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[prependOnceListener](sourcesource.md#prependoncelistener)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[prependOnceListener](../interfaces/sparsereadable.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:687 +Defined in node_modules/@types/node/base.d.ts:902 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -596,15 +656,15 @@ ___ ### read -▸ **read**(`_buffer`: Buffer, `_bufferOffset`: number, `_length`: number, `_sourceOffset`: number): *Promise‹ReadResult›* +▸ **read**(`_buffer`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer), `_bufferOffset`: number, `_length`: number, `_sourceOffset`: number): *Promise‹ReadResult›* -*Defined in [lib/source-destination/source-destination.ts:291](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L291)* +*Defined in [lib/source-destination/source-destination.ts:315](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L315)* **Parameters:** Name | Type | ------ | ------ | -`_buffer` | Buffer | +`_buffer` | [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | `_bufferOffset` | number | `_length` | number | `_sourceOffset` | number | @@ -621,7 +681,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[removeAllListeners](../interfaces/sparsereadable.md#removealllisteners)* -Defined in node_modules/@types/node/base.d.ts:689 +Defined in node_modules/@types/node/base.d.ts:904 **Parameters:** @@ -635,20 +695,27 @@ ___ ### removeListener -▸ **removeListener**(`event`: string | symbol, `listener`: Function): *this* +▸ **removeListener**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[removeListener](sourcesource.md#removelistener)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[removeListener](../interfaces/sparsereadable.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:688 +Defined in node_modules/@types/node/base.d.ts:903 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -662,7 +729,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[setMaxListeners](../interfaces/sparsereadable.md#setmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:690 +Defined in node_modules/@types/node/base.d.ts:905 **Parameters:** @@ -676,15 +743,15 @@ ___ ### write -▸ **write**(`_buffer`: Buffer, `_bufferOffset`: number, `_length`: number, `_fileOffset`: number): *Promise‹WriteResult›* +▸ **write**(`_buffer`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer), `_bufferOffset`: number, `_length`: number, `_fileOffset`: number): *Promise‹WriteResult›* -*Defined in [lib/source-destination/source-destination.ts:300](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L300)* +*Defined in [lib/source-destination/source-destination.ts:324](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L324)* **Parameters:** Name | Type | ------ | ------ | -`_buffer` | Buffer | +`_buffer` | [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | `_bufferOffset` | number | `_length` | number | `_fileOffset` | number | @@ -699,7 +766,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[listenerCount](countingwritable.md#static-listenercount)* -Defined in node_modules/@types/node/base.d.ts:680 +Defined in node_modules/@types/node/base.d.ts:895 **Parameters:** @@ -716,7 +783,7 @@ ___ ▸ **register**(`Cls`: typeof SourceSource): *void* -*Defined in [lib/source-destination/source-destination.ts:250](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L250)* +*Defined in [lib/source-destination/source-destination.ts:270](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L270)* **Parameters:** diff --git a/doc/classes/sourcedestinationfs.md b/doc/classes/sourcedestinationfs.md index f78755fb..10e69d7a 100644 --- a/doc/classes/sourcedestinationfs.md +++ b/doc/classes/sourcedestinationfs.md @@ -29,7 +29,7 @@ \+ **new SourceDestinationFs**(`source`: [SourceDestination](sourcedestination.md)): *[SourceDestinationFs](sourcedestinationfs.md)* -*Defined in [lib/source-destination/source-destination.ts:74](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L74)* +*Defined in [lib/source-destination/source-destination.ts:74](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L74)* **Parameters:** @@ -45,7 +45,7 @@ Name | Type | • **source**: *[SourceDestination](sourcedestination.md)* -*Defined in [lib/source-destination/source-destination.ts:76](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L76)* +*Defined in [lib/source-destination/source-destination.ts:76](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L76)* ## Methods @@ -53,7 +53,7 @@ Name | Type | ▸ **close**(`_fd`: number, `callback`: function): *void* -*Defined in [lib/source-destination/source-destination.ts:86](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L86)* +*Defined in [lib/source-destination/source-destination.ts:86](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L86)* **Parameters:** @@ -77,7 +77,7 @@ ___ ▸ **fstat**(`_fd`: number, `callback`: function): *void* -*Defined in [lib/source-destination/source-destination.ts:90](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L90)* +*Defined in [lib/source-destination/source-destination.ts:90](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L90)* **Parameters:** @@ -102,7 +102,7 @@ ___ ▸ **open**(`_path`: string, `_options`: any, `callback`: function): *void* -*Defined in [lib/source-destination/source-destination.ts:78](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L78)* +*Defined in [lib/source-destination/source-destination.ts:78](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L78)* **Parameters:** @@ -127,15 +127,15 @@ ___ ### read -▸ **read**(`_fd`: number, `buffer`: Buffer, `bufferOffset`: number, `length`: number, `sourceOffset`: number, `callback`: function): *void* +▸ **read**(`_fd`: number, `buffer`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer), `bufferOffset`: number, `length`: number, `sourceOffset`: number, `callback`: function): *void* -*Defined in [lib/source-destination/source-destination.ts:106](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L106)* +*Defined in [lib/source-destination/source-destination.ts:106](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L106)* **Parameters:** ▪ **_fd**: *number* -▪ **buffer**: *Buffer* +▪ **buffer**: *[Buffer](../interfaces/alignedlockablebuffer.md#buffer)* ▪ **bufferOffset**: *number* @@ -145,7 +145,7 @@ ___ ▪ **callback**: *function* -▸ (`error`: [Error](notcapable.md#static-error) | null, `bytesRead?`: undefined | number, `buffer?`: Buffer): *void* +▸ (`error`: [Error](notcapable.md#static-error) | null, `bytesRead?`: undefined | number, `buffer?`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer)): *void* **Parameters:** @@ -153,6 +153,6 @@ Name | Type | ------ | ------ | `error` | [Error](notcapable.md#static-error) | null | `bytesRead?` | undefined | number | -`buffer?` | Buffer | +`buffer?` | [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | **Returns:** *void* diff --git a/doc/classes/sourcedisk.md b/doc/classes/sourcedisk.md index e26ade9a..e402dd48 100644 --- a/doc/classes/sourcedisk.md +++ b/doc/classes/sourcedisk.md @@ -48,7 +48,7 @@ *Overrides void* -*Defined in [lib/source-destination/configured-source/configured-source.ts:43](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/configured-source/configured-source.ts#L43)* +*Defined in [lib/source-destination/configured-source/configured-source.ts:47](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/configured-source/configured-source.ts#L47)* **Parameters:** @@ -124,7 +124,7 @@ ___ • **source**: *[SourceDestination](sourcedestination.md)* -*Defined in [lib/source-destination/configured-source/configured-source.ts:44](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/configured-source/configured-source.ts#L44)* +*Defined in [lib/source-destination/configured-source/configured-source.ts:48](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/configured-source/configured-source.ts#L48)* ## Methods @@ -134,7 +134,7 @@ ___ *Overrides void* -*Defined in [lib/source-destination/configured-source/configured-source.ts:80](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/configured-source/configured-source.ts#L80)* +*Defined in [lib/source-destination/configured-source/configured-source.ts:84](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/configured-source/configured-source.ts#L84)* **Returns:** *Promise‹void›* @@ -146,7 +146,7 @@ ___ *Overrides void* -*Defined in [lib/source-destination/configured-source/configured-source.ts:53](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/configured-source/configured-source.ts#L53)* +*Defined in [lib/source-destination/configured-source/configured-source.ts:57](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/configured-source/configured-source.ts#L57)* **Returns:** *Promise‹number›* @@ -154,17 +154,17 @@ ___ ### `Protected` _read -▸ **_read**(`buffer`: Buffer, `bufferOffset`: number, `length`: number, `fileOffset`: number): *Promise‹ReadResult›* +▸ **_read**(`buffer`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer), `bufferOffset`: number, `length`: number, `fileOffset`: number): *Promise‹ReadResult›* *Overrides void* -*Defined in [lib/source-destination/configured-source/configured-source.ts:62](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/configured-source/configured-source.ts#L62)* +*Defined in [lib/source-destination/configured-source/configured-source.ts:66](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/configured-source/configured-source.ts#L66)* **Parameters:** Name | Type | ------ | ------ | -`buffer` | Buffer | +`buffer` | [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | `bufferOffset` | number | `length` | number | `fileOffset` | number | @@ -175,17 +175,17 @@ ___ ### `Protected` _write -▸ **_write**(`_buffer`: Buffer, `_bufferOffset`: number, `_length`: number, `_fileOffset`: number): *Promise‹WriteResult›* +▸ **_write**(`_buffer`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer), `_bufferOffset`: number, `_length`: number, `_fileOffset`: number): *Promise‹WriteResult›* *Overrides void* -*Defined in [lib/source-destination/configured-source/configured-source.ts:71](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/configured-source/configured-source.ts#L71)* +*Defined in [lib/source-destination/configured-source/configured-source.ts:75](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/configured-source/configured-source.ts#L75)* **Parameters:** Name | Type | ------ | ------ | -`_buffer` | Buffer | +`_buffer` | [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | `_bufferOffset` | number | `_length` | number | `_fileOffset` | number | @@ -301,7 +301,7 @@ ___ ### read -▸ **read**(`buffer`: Buffer, `_bufferOffset`: number, `length`: number, `fileOffset`: number): *Promise‹ReadResult›* +▸ **read**(`buffer`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer), `_bufferOffset`: number, `length`: number, `fileOffset`: number): *Promise‹ReadResult›* *Inherited from [SourceDisk](sourcedisk.md).[read](sourcedisk.md#read)* @@ -311,7 +311,7 @@ Defined in node_modules/file-disk/build/index.d.ts:33 Name | Type | ------ | ------ | -`buffer` | Buffer | +`buffer` | [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | `_bufferOffset` | number | `length` | number | `fileOffset` | number | @@ -322,7 +322,7 @@ ___ ### write -▸ **write**(`buffer`: Buffer, `bufferOffset`: number, `length`: number, `fileOffset`: number): *Promise‹WriteResult›* +▸ **write**(`buffer`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer), `bufferOffset`: number, `length`: number, `fileOffset`: number): *Promise‹WriteResult›* *Inherited from [SourceDisk](sourcedisk.md).[write](sourcedisk.md#write)* @@ -332,7 +332,7 @@ Defined in node_modules/file-disk/build/index.d.ts:34 Name | Type | ------ | ------ | -`buffer` | Buffer | +`buffer` | [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | `bufferOffset` | number | `length` | number | `fileOffset` | number | diff --git a/doc/classes/sourcerandomaccessreader.md b/doc/classes/sourcerandomaccessreader.md index 5778cab6..4941b23f 100644 --- a/doc/classes/sourcerandomaccessreader.md +++ b/doc/classes/sourcerandomaccessreader.md @@ -46,7 +46,7 @@ \+ **new SourceRandomAccessReader**(`source`: [SourceDestination](sourcedestination.md)): *[SourceRandomAccessReader](sourcerandomaccessreader.md)* -*Defined in [lib/source-destination/zip.ts:128](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/zip.ts#L128)* +*Defined in [lib/source-destination/zip.ts:132](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/zip.ts#L132)* **Parameters:** @@ -62,7 +62,7 @@ Name | Type | • **source**: *[SourceDestination](sourcedestination.md)* -*Defined in [lib/source-destination/zip.ts:129](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/zip.ts#L129)* +*Defined in [lib/source-destination/zip.ts:133](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/zip.ts#L133)* ___ @@ -72,7 +72,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[defaultMaxListeners](countingwritable.md#static-defaultmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:681 +Defined in node_modules/@types/node/base.d.ts:896 ## Methods @@ -82,7 +82,7 @@ Defined in node_modules/@types/node/base.d.ts:681 *Overrides void* -*Defined in [lib/source-destination/zip.ts:133](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/zip.ts#L133)* +*Defined in [lib/source-destination/zip.ts:137](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/zip.ts#L137)* **Parameters:** @@ -97,20 +97,27 @@ ___ ### addListener -▸ **addListener**(`event`: string | symbol, `listener`: Function): *this* +▸ **addListener**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[addListener](sourcesource.md#addlistener)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[addListener](../interfaces/sparsereadable.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:683 +Defined in node_modules/@types/node/base.d.ts:898 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -169,7 +176,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[emit](../interfaces/sparsereadable.md#emit)* -Defined in node_modules/@types/node/base.d.ts:693 +Defined in node_modules/@types/node/base.d.ts:908 **Parameters:** @@ -184,15 +191,15 @@ ___ ### eventNames -▸ **eventNames**(): *string | symbol[]* +▸ **eventNames**(): *Array‹string | symbol›* *Inherited from [CountingWritable](countingwritable.md).[eventNames](countingwritable.md#eventnames)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[eventNames](../interfaces/sparsereadable.md#eventnames)* -Defined in node_modules/@types/node/base.d.ts:694 +Defined in node_modules/@types/node/base.d.ts:909 -**Returns:** *string | symbol[]* +**Returns:** *Array‹string | symbol›* ___ @@ -204,7 +211,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[getMaxListeners](../interfaces/sparsereadable.md#getmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:691 +Defined in node_modules/@types/node/base.d.ts:906 **Returns:** *number* @@ -218,7 +225,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[listenerCount](../interfaces/sparsereadable.md#listenercount)* -Defined in node_modules/@types/node/base.d.ts:695 +Defined in node_modules/@types/node/base.d.ts:910 **Parameters:** @@ -238,7 +245,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[listeners](../interfaces/sparsereadable.md#listeners)* -Defined in node_modules/@types/node/base.d.ts:692 +Defined in node_modules/@types/node/base.d.ts:907 **Parameters:** @@ -252,20 +259,27 @@ ___ ### on -▸ **on**(`event`: string | symbol, `listener`: Function): *this* +▸ **on**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[on](sourcesource.md#on)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[on](../interfaces/sparsereadable.md#on)* -Defined in node_modules/@types/node/base.d.ts:684 +Defined in node_modules/@types/node/base.d.ts:899 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -273,20 +287,27 @@ ___ ### once -▸ **once**(`event`: string | symbol, `listener`: Function): *this* +▸ **once**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[once](sourcesource.md#once)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[once](../interfaces/sparsereadable.md#once)* -Defined in node_modules/@types/node/base.d.ts:685 +Defined in node_modules/@types/node/base.d.ts:900 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -294,20 +315,27 @@ ___ ### prependListener -▸ **prependListener**(`event`: string | symbol, `listener`: Function): *this* +▸ **prependListener**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[prependListener](sourcesource.md#prependlistener)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[prependListener](../interfaces/sparsereadable.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:686 +Defined in node_modules/@types/node/base.d.ts:901 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -315,20 +343,27 @@ ___ ### prependOnceListener -▸ **prependOnceListener**(`event`: string | symbol, `listener`: Function): *this* +▸ **prependOnceListener**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[prependOnceListener](sourcesource.md#prependoncelistener)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[prependOnceListener](../interfaces/sparsereadable.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:687 +Defined in node_modules/@types/node/base.d.ts:902 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -336,7 +371,7 @@ ___ ### read -▸ **read**(`buffer`: Buffer, `offset`: number, `length`: number, `position`: number, `callback`: function): *void* +▸ **read**(`buffer`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer), `offset`: number, `length`: number, `position`: number, `callback`: function): *void* *Inherited from [SourceRandomAccessReader](sourcerandomaccessreader.md).[read](sourcerandomaccessreader.md#read)* @@ -344,7 +379,7 @@ Defined in node_modules/@types/yauzl/index.d.ts:14 **Parameters:** -▪ **buffer**: *Buffer* +▪ **buffer**: *[Buffer](../interfaces/alignedlockablebuffer.md#buffer)* ▪ **offset**: *number* @@ -374,7 +409,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[removeAllListeners](../interfaces/sparsereadable.md#removealllisteners)* -Defined in node_modules/@types/node/base.d.ts:689 +Defined in node_modules/@types/node/base.d.ts:904 **Parameters:** @@ -388,20 +423,27 @@ ___ ### removeListener -▸ **removeListener**(`event`: string | symbol, `listener`: Function): *this* +▸ **removeListener**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[removeListener](sourcesource.md#removelistener)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[removeListener](../interfaces/sparsereadable.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:688 +Defined in node_modules/@types/node/base.d.ts:903 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -415,7 +457,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[setMaxListeners](../interfaces/sparsereadable.md#setmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:690 +Defined in node_modules/@types/node/base.d.ts:905 **Parameters:** @@ -433,7 +475,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[listenerCount](countingwritable.md#static-listenercount)* -Defined in node_modules/@types/node/base.d.ts:680 +Defined in node_modules/@types/node/base.d.ts:895 **Parameters:** diff --git a/doc/classes/sourcesource.md b/doc/classes/sourcesource.md index 347e54b8..5cee8a0e 100644 --- a/doc/classes/sourcesource.md +++ b/doc/classes/sourcesource.md @@ -54,6 +54,7 @@ * [createWriteStream](sourcesource.md#createwritestream) * [emit](sourcesource.md#emit) * [eventNames](sourcesource.md#eventnames) +* [getAlignment](sourcesource.md#getalignment) * [getBlocks](sourcesource.md#getblocks) * [getInnerSource](sourcesource.md#getinnersource) * [getMaxListeners](sourcesource.md#getmaxlisteners) @@ -80,7 +81,7 @@ \+ **new SourceSource**(`source`: [SourceDestination](sourcedestination.md)): *[SourceSource](sourcesource.md)* -*Defined in [lib/source-destination/source-source.ts:20](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-source.ts#L20)* +*Defined in [lib/source-destination/source-source.ts:20](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-source.ts#L20)* **Parameters:** @@ -96,7 +97,7 @@ Name | Type | • **source**: *[SourceDestination](sourcedestination.md)* -*Defined in [lib/source-destination/source-source.ts:22](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-source.ts#L22)* +*Defined in [lib/source-destination/source-source.ts:22](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-source.ts#L22)* ___ @@ -106,7 +107,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[defaultMaxListeners](countingwritable.md#static-defaultmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:681 +Defined in node_modules/@types/node/base.d.ts:896 ___ @@ -127,7 +128,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[imageExtensions](sourcesource.md#static-imageextensions)* -*Defined in [lib/source-destination/source-destination.ts:232](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L232)* +*Defined in [lib/source-destination/source-destination.ts:252](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L252)* ___ @@ -137,7 +138,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[mimetype](sourcesource.md#static-optional-mimetype)* -*Defined in [lib/source-destination/source-destination.ts:244](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L244)* +*Defined in [lib/source-destination/source-destination.ts:264](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L264)* ___ @@ -145,7 +146,7 @@ ___ ▪ **requiresRandomReadableSource**: *boolean* = false -*Defined in [lib/source-destination/source-source.ts:20](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-source.ts#L20)* +*Defined in [lib/source-destination/source-source.ts:20](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-source.ts#L20)* ## Methods @@ -155,7 +156,7 @@ ___ *Overrides [SourceDestination](sourcedestination.md).[_close](sourcedestination.md#protected-_close)* -*Defined in [lib/source-destination/source-source.ts:30](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-source.ts#L30)* +*Defined in [lib/source-destination/source-source.ts:30](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-source.ts#L30)* **Returns:** *Promise‹void›* @@ -167,7 +168,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[_getMetadata](sourcesource.md#protected-_getmetadata)* -*Defined in [lib/source-destination/source-destination.ts:287](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L287)* +*Defined in [lib/source-destination/source-destination.ts:311](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L311)* **Returns:** *Promise‹[Metadata](../interfaces/metadata.md)›* @@ -179,7 +180,7 @@ ___ *Overrides [SourceDestination](sourcedestination.md).[_open](sourcedestination.md#protected-_open)* -*Defined in [lib/source-destination/source-source.ts:26](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-source.ts#L26)* +*Defined in [lib/source-destination/source-source.ts:26](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-source.ts#L26)* **Returns:** *Promise‹void›* @@ -187,20 +188,27 @@ ___ ### addListener -▸ **addListener**(`event`: string | symbol, `listener`: Function): *this* +▸ **addListener**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[addListener](sourcesource.md#addlistener)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[addListener](../interfaces/sparsereadable.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:683 +Defined in node_modules/@types/node/base.d.ts:898 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -212,7 +220,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[canCreateReadStream](sourcesource.md#cancreatereadstream)* -*Defined in [lib/source-destination/source-destination.ts:264](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L264)* +*Defined in [lib/source-destination/source-destination.ts:288](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L288)* **Returns:** *Promise‹boolean›* @@ -224,7 +232,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[canCreateSparseReadStream](sourcesource.md#cancreatesparsereadstream)* -*Defined in [lib/source-destination/source-destination.ts:268](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L268)* +*Defined in [lib/source-destination/source-destination.ts:292](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L292)* **Returns:** *Promise‹boolean›* @@ -236,7 +244,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[canCreateSparseWriteStream](sourcesource.md#cancreatesparsewritestream)* -*Defined in [lib/source-destination/source-destination.ts:276](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L276)* +*Defined in [lib/source-destination/source-destination.ts:300](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L300)* **Returns:** *Promise‹boolean›* @@ -248,7 +256,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[canCreateWriteStream](sourcesource.md#cancreatewritestream)* -*Defined in [lib/source-destination/source-destination.ts:272](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L272)* +*Defined in [lib/source-destination/source-destination.ts:296](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L296)* **Returns:** *Promise‹boolean›* @@ -260,7 +268,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[canRead](sourcesource.md#canread)* -*Defined in [lib/source-destination/source-destination.ts:256](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L256)* +*Defined in [lib/source-destination/source-destination.ts:280](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L280)* **Returns:** *Promise‹boolean›* @@ -272,7 +280,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[canWrite](sourcesource.md#canwrite)* -*Defined in [lib/source-destination/source-destination.ts:260](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L260)* +*Defined in [lib/source-destination/source-destination.ts:284](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L284)* **Returns:** *Promise‹boolean›* @@ -284,7 +292,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[close](sourcesource.md#close)* -*Defined in [lib/source-destination/source-destination.ts:342](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L342)* +*Defined in [lib/source-destination/source-destination.ts:368](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L368)* **Returns:** *Promise‹void›* @@ -292,19 +300,17 @@ ___ ### createReadStream -▸ **createReadStream**(`_emitProgress`: boolean, `_start`: number, `_end?`: undefined | number): *Promise‹ReadableStream›* +▸ **createReadStream**(`_options`: [CreateReadStreamOptions](../interfaces/createreadstreamoptions.md)): *Promise‹ReadableStream›* *Inherited from [SourceSource](sourcesource.md).[createReadStream](sourcesource.md#createreadstream)* -*Defined in [lib/source-destination/source-destination.ts:309](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L309)* +*Defined in [lib/source-destination/source-destination.ts:333](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L333)* **Parameters:** Name | Type | Default | ------ | ------ | ------ | -`_emitProgress` | boolean | false | -`_start` | number | 0 | -`_end?` | undefined | number | - | +`_options` | [CreateReadStreamOptions](../interfaces/createreadstreamoptions.md) | {} | **Returns:** *Promise‹ReadableStream›* @@ -312,17 +318,17 @@ ___ ### createSparseReadStream -▸ **createSparseReadStream**(`_generateChecksums`: boolean): *Promise‹[SparseReadable](../interfaces/sparsereadable.md)›* +▸ **createSparseReadStream**(`_options`: [CreateSparseReadStreamOptions](../interfaces/createsparsereadstreamoptions.md)): *Promise‹[SparseReadable](../interfaces/sparsereadable.md)›* *Inherited from [SourceSource](sourcesource.md).[createSparseReadStream](sourcesource.md#createsparsereadstream)* -*Defined in [lib/source-destination/source-destination.ts:317](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L317)* +*Defined in [lib/source-destination/source-destination.ts:339](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L339)* **Parameters:** Name | Type | Default | ------ | ------ | ------ | -`_generateChecksums` | boolean | false | +`_options` | [CreateSparseReadStreamOptions](../interfaces/createsparsereadstreamoptions.md) | {} | **Returns:** *Promise‹[SparseReadable](../interfaces/sparsereadable.md)›* @@ -330,11 +336,19 @@ ___ ### createSparseWriteStream -▸ **createSparseWriteStream**(): *Promise‹[SparseWritable](../interfaces/sparsewritable.md)›* +▸ **createSparseWriteStream**(`_options`: object): *Promise‹[SparseWritable](../interfaces/sparsewritable.md)›* *Inherited from [SourceSource](sourcesource.md).[createSparseWriteStream](sourcesource.md#createsparsewritestream)* -*Defined in [lib/source-destination/source-destination.ts:331](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L331)* +*Defined in [lib/source-destination/source-destination.ts:355](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L355)* + +**Parameters:** + +▪`Default value` **_options**: *object*= {} + +Name | Type | +------ | ------ | +`highWaterMark?` | undefined | number | **Returns:** *Promise‹[SparseWritable](../interfaces/sparsewritable.md)›* @@ -346,7 +360,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[createVerifier](sourcesource.md#createverifier)* -*Defined in [lib/source-destination/source-destination.ts:357](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L357)* +*Defined in [lib/source-destination/source-destination.ts:383](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L383)* **Parameters:** @@ -361,11 +375,19 @@ ___ ### createWriteStream -▸ **createWriteStream**(): *Promise‹WritableStream›* +▸ **createWriteStream**(`_options`: object): *Promise‹WritableStream›* *Inherited from [SourceSource](sourcesource.md).[createWriteStream](sourcesource.md#createwritestream)* -*Defined in [lib/source-destination/source-destination.ts:327](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L327)* +*Defined in [lib/source-destination/source-destination.ts:349](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L349)* + +**Parameters:** + +▪`Default value` **_options**: *object*= {} + +Name | Type | +------ | ------ | +`highWaterMark?` | undefined | number | **Returns:** *Promise‹WritableStream›* @@ -379,7 +401,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[emit](../interfaces/sparsereadable.md#emit)* -Defined in node_modules/@types/node/base.d.ts:693 +Defined in node_modules/@types/node/base.d.ts:908 **Parameters:** @@ -394,15 +416,27 @@ ___ ### eventNames -▸ **eventNames**(): *string | symbol[]* +▸ **eventNames**(): *Array‹string | symbol›* *Inherited from [CountingWritable](countingwritable.md).[eventNames](countingwritable.md#eventnames)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[eventNames](../interfaces/sparsereadable.md#eventnames)* -Defined in node_modules/@types/node/base.d.ts:694 +Defined in node_modules/@types/node/base.d.ts:909 -**Returns:** *string | symbol[]* +**Returns:** *Array‹string | symbol›* + +___ + +### getAlignment + +▸ **getAlignment**(): *number | undefined* + +*Inherited from [SourceSource](sourcesource.md).[getAlignment](sourcesource.md#getalignment)* + +*Defined in [lib/source-destination/source-destination.ts:276](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L276)* + +**Returns:** *number | undefined* ___ @@ -412,7 +446,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[getBlocks](sourcesource.md#getblocks)* -*Defined in [lib/source-destination/source-destination.ts:323](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L323)* +*Defined in [lib/source-destination/source-destination.ts:345](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L345)* **Returns:** *Promise‹[BlocksWithChecksum](../interfaces/blockswithchecksum.md)[]›* @@ -424,7 +458,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[getInnerSource](sourcesource.md#getinnersource)* -*Defined in [lib/source-destination/source-destination.ts:424](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L424)* +*Defined in [lib/source-destination/source-destination.ts:452](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L452)* **Returns:** *Promise‹[SourceDestination](sourcedestination.md)›* @@ -438,7 +472,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[getMaxListeners](../interfaces/sparsereadable.md#getmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:691 +Defined in node_modules/@types/node/base.d.ts:906 **Returns:** *number* @@ -450,7 +484,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[getMetadata](sourcesource.md#getmetadata)* -*Defined in [lib/source-destination/source-destination.ts:280](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L280)* +*Defined in [lib/source-destination/source-destination.ts:304](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L304)* **Returns:** *Promise‹[Metadata](../interfaces/metadata.md)›* @@ -462,7 +496,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[getPartitionTable](sourcesource.md#getpartitiontable)* -*Defined in [lib/source-destination/source-destination.ts:445](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L445)* +*Defined in [lib/source-destination/source-destination.ts:473](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L473)* **Returns:** *Promise‹GetPartitionsResult | undefined›* @@ -476,7 +510,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[listenerCount](../interfaces/sparsereadable.md#listenercount)* -Defined in node_modules/@types/node/base.d.ts:695 +Defined in node_modules/@types/node/base.d.ts:910 **Parameters:** @@ -496,7 +530,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[listeners](../interfaces/sparsereadable.md#listeners)* -Defined in node_modules/@types/node/base.d.ts:692 +Defined in node_modules/@types/node/base.d.ts:907 **Parameters:** @@ -510,20 +544,27 @@ ___ ### on -▸ **on**(`event`: string | symbol, `listener`: Function): *this* +▸ **on**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[on](sourcesource.md#on)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[on](../interfaces/sparsereadable.md#on)* -Defined in node_modules/@types/node/base.d.ts:684 +Defined in node_modules/@types/node/base.d.ts:899 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -531,20 +572,27 @@ ___ ### once -▸ **once**(`event`: string | symbol, `listener`: Function): *this* +▸ **once**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[once](sourcesource.md#once)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[once](../interfaces/sparsereadable.md#once)* -Defined in node_modules/@types/node/base.d.ts:685 +Defined in node_modules/@types/node/base.d.ts:900 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -556,7 +604,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[open](sourcesource.md#open)* -*Defined in [lib/source-destination/source-destination.ts:335](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L335)* +*Defined in [lib/source-destination/source-destination.ts:361](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L361)* **Returns:** *Promise‹void›* @@ -564,20 +612,27 @@ ___ ### prependListener -▸ **prependListener**(`event`: string | symbol, `listener`: Function): *this* +▸ **prependListener**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[prependListener](sourcesource.md#prependlistener)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[prependListener](../interfaces/sparsereadable.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:686 +Defined in node_modules/@types/node/base.d.ts:901 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -585,20 +640,27 @@ ___ ### prependOnceListener -▸ **prependOnceListener**(`event`: string | symbol, `listener`: Function): *this* +▸ **prependOnceListener**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[prependOnceListener](sourcesource.md#prependoncelistener)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[prependOnceListener](../interfaces/sparsereadable.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:687 +Defined in node_modules/@types/node/base.d.ts:902 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -606,17 +668,17 @@ ___ ### read -▸ **read**(`_buffer`: Buffer, `_bufferOffset`: number, `_length`: number, `_sourceOffset`: number): *Promise‹ReadResult›* +▸ **read**(`_buffer`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer), `_bufferOffset`: number, `_length`: number, `_sourceOffset`: number): *Promise‹ReadResult›* *Inherited from [SourceSource](sourcesource.md).[read](sourcesource.md#read)* -*Defined in [lib/source-destination/source-destination.ts:291](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L291)* +*Defined in [lib/source-destination/source-destination.ts:315](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L315)* **Parameters:** Name | Type | ------ | ------ | -`_buffer` | Buffer | +`_buffer` | [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | `_bufferOffset` | number | `_length` | number | `_sourceOffset` | number | @@ -633,7 +695,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[removeAllListeners](../interfaces/sparsereadable.md#removealllisteners)* -Defined in node_modules/@types/node/base.d.ts:689 +Defined in node_modules/@types/node/base.d.ts:904 **Parameters:** @@ -647,20 +709,27 @@ ___ ### removeListener -▸ **removeListener**(`event`: string | symbol, `listener`: Function): *this* +▸ **removeListener**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[removeListener](sourcesource.md#removelistener)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[removeListener](../interfaces/sparsereadable.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:688 +Defined in node_modules/@types/node/base.d.ts:903 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -674,7 +743,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[setMaxListeners](../interfaces/sparsereadable.md#setmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:690 +Defined in node_modules/@types/node/base.d.ts:905 **Parameters:** @@ -688,17 +757,17 @@ ___ ### write -▸ **write**(`_buffer`: Buffer, `_bufferOffset`: number, `_length`: number, `_fileOffset`: number): *Promise‹WriteResult›* +▸ **write**(`_buffer`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer), `_bufferOffset`: number, `_length`: number, `_fileOffset`: number): *Promise‹WriteResult›* *Inherited from [SourceSource](sourcesource.md).[write](sourcesource.md#write)* -*Defined in [lib/source-destination/source-destination.ts:300](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L300)* +*Defined in [lib/source-destination/source-destination.ts:324](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L324)* **Parameters:** Name | Type | ------ | ------ | -`_buffer` | Buffer | +`_buffer` | [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | `_bufferOffset` | number | `_length` | number | `_fileOffset` | number | @@ -713,7 +782,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[listenerCount](countingwritable.md#static-listenercount)* -Defined in node_modules/@types/node/base.d.ts:680 +Defined in node_modules/@types/node/base.d.ts:895 **Parameters:** @@ -732,7 +801,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[register](sourcesource.md#static-register)* -*Defined in [lib/source-destination/source-destination.ts:250](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L250)* +*Defined in [lib/source-destination/source-destination.ts:270](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L270)* **Parameters:** diff --git a/doc/classes/sparsefilterstream.md b/doc/classes/sparsefilterstream.md index 710d694f..98f365bb 100644 --- a/doc/classes/sparsefilterstream.md +++ b/doc/classes/sparsefilterstream.md @@ -25,18 +25,25 @@ * [blocks](sparsefilterstream.md#blocks) * [position](sparsefilterstream.md#private-position) * [readable](sparsefilterstream.md#readable) +* [readableHighWaterMark](sparsefilterstream.md#readablehighwatermark) * [state](sparsefilterstream.md#private-optional-state) * [stateIterator](sparsefilterstream.md#private-stateiterator) * [writable](sparsefilterstream.md#writable) +* [writableHighWaterMark](sparsefilterstream.md#writablehighwatermark) * [defaultMaxListeners](sparsefilterstream.md#static-defaultmaxlisteners) ### Methods * [__transform](sparsefilterstream.md#private-__transform) +* [_destroy](sparsefilterstream.md#_destroy) +* [_final](sparsefilterstream.md#_final) * [_read](sparsefilterstream.md#_read) * [_transform](sparsefilterstream.md#_transform) * [_write](sparsefilterstream.md#_write) +* [_writev](sparsefilterstream.md#optional-_writev) * [addListener](sparsefilterstream.md#addlistener) +* [cork](sparsefilterstream.md#cork) +* [destroy](sparsefilterstream.md#destroy) * [emit](sparsefilterstream.md#emit) * [end](sparsefilterstream.md#end) * [eventNames](sparsefilterstream.md#eventnames) @@ -59,6 +66,7 @@ * [setDefaultEncoding](sparsefilterstream.md#setdefaultencoding) * [setEncoding](sparsefilterstream.md#setencoding) * [setMaxListeners](sparsefilterstream.md#setmaxlisteners) +* [uncork](sparsefilterstream.md#uncork) * [unpipe](sparsefilterstream.md#unpipe) * [unshift](sparsefilterstream.md#unshift) * [wrap](sparsefilterstream.md#wrap) @@ -69,20 +77,21 @@ ### constructor -\+ **new SparseFilterStream**(`blocks`: [BlocksWithChecksum](../interfaces/blockswithchecksum.md)[], `verify`: boolean, `generateChecksums`: boolean, `options`: TransformOptions): *[SparseFilterStream](sparsefilterstream.md)* +\+ **new SparseFilterStream**(`__namedParameters`: object): *[SparseFilterStream](sparsefilterstream.md)* *Overrides [SourceTransform](../interfaces/sourcetransform.md).[constructor](../interfaces/sourcetransform.md#constructor)* -*Defined in [lib/sparse-stream/sparse-filter-stream.ts:30](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/sparse-stream/sparse-filter-stream.ts#L30)* +*Defined in [lib/sparse-stream/sparse-filter-stream.ts:30](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/sparse-stream/sparse-filter-stream.ts#L30)* **Parameters:** -Name | Type | Default | ------- | ------ | ------ | -`blocks` | [BlocksWithChecksum](../interfaces/blockswithchecksum.md)[] | - | -`verify` | boolean | - | -`generateChecksums` | boolean | - | -`options` | TransformOptions | {} | +▪ **__namedParameters**: *object* + +Name | Type | +------ | ------ | +`blocks` | [BlocksWithChecksum](../interfaces/blockswithchecksum.md)[] | +`generateChecksums` | boolean | +`verify` | boolean | **Returns:** *[SparseFilterStream](sparsefilterstream.md)* @@ -94,7 +103,7 @@ Name | Type | Default | *Implementation of [SparseReadable](../interfaces/sparsereadable.md).[blocks](../interfaces/sparsereadable.md#blocks)* -*Defined in [lib/sparse-stream/sparse-filter-stream.ts:33](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/sparse-stream/sparse-filter-stream.ts#L33)* +*Defined in [lib/sparse-stream/sparse-filter-stream.ts:27](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/sparse-stream/sparse-filter-stream.ts#L27)* ___ @@ -102,7 +111,7 @@ ___ • **position**: *number* = 0 -*Defined in [lib/sparse-stream/sparse-filter-stream.ts:30](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/sparse-stream/sparse-filter-stream.ts#L30)* +*Defined in [lib/sparse-stream/sparse-filter-stream.ts:30](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/sparse-stream/sparse-filter-stream.ts#L30)* ___ @@ -114,7 +123,17 @@ ___ *Inherited from [SparseFilterStream](sparsefilterstream.md).[readable](sparsefilterstream.md#readable)* -Defined in node_modules/@types/node/base.d.ts:3688 +Defined in node_modules/@types/node/base.d.ts:5422 + +___ + +### readableHighWaterMark + +• **readableHighWaterMark**: *number* + +*Inherited from [SparseFilterStream](sparsefilterstream.md).[readableHighWaterMark](sparsefilterstream.md#readablehighwatermark)* + +Defined in node_modules/@types/node/base.d.ts:5423 ___ @@ -122,7 +141,7 @@ ___ • **state**? : *[SparseReaderState](../interfaces/sparsereaderstate.md)* -*Defined in [lib/sparse-stream/sparse-filter-stream.ts:29](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/sparse-stream/sparse-filter-stream.ts#L29)* +*Defined in [lib/sparse-stream/sparse-filter-stream.ts:29](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/sparse-stream/sparse-filter-stream.ts#L29)* ___ @@ -130,7 +149,7 @@ ___ • **stateIterator**: *Iterator‹[SparseReaderState](../interfaces/sparsereaderstate.md)›* -*Defined in [lib/sparse-stream/sparse-filter-stream.ts:28](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/sparse-stream/sparse-filter-stream.ts#L28)* +*Defined in [lib/sparse-stream/sparse-filter-stream.ts:28](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/sparse-stream/sparse-filter-stream.ts#L28)* ___ @@ -140,7 +159,17 @@ ___ *Inherited from [SparseFilterStream](sparsefilterstream.md).[writable](sparsefilterstream.md#writable)* -Defined in node_modules/@types/node/base.d.ts:3855 +Defined in node_modules/@types/node/base.d.ts:5600 + +___ + +### writableHighWaterMark + +• **writableHighWaterMark**: *number* + +*Inherited from [SparseFilterStream](sparsefilterstream.md).[writableHighWaterMark](sparsefilterstream.md#writablehighwatermark)* + +Defined in node_modules/@types/node/base.d.ts:5601 ___ @@ -150,21 +179,67 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[defaultMaxListeners](countingwritable.md#static-defaultmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:681 +Defined in node_modules/@types/node/base.d.ts:896 ## Methods ### `Private` __transform -▸ **__transform**(`buffer`: Buffer): *void* +▸ **__transform**(`buffer`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer)): *void* + +*Defined in [lib/sparse-stream/sparse-filter-stream.ts:69](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/sparse-stream/sparse-filter-stream.ts#L69)* + +**Parameters:** + +Name | Type | +------ | ------ | +`buffer` | [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | + +**Returns:** *void* + +___ + +### _destroy + +▸ **_destroy**(`error`: [Error](notcapable.md#static-error) | null, `callback`: function): *void* + +*Inherited from [SparseFilterStream](sparsefilterstream.md).[_destroy](sparsefilterstream.md#_destroy)* + +*Overrides [SparseReadStream](sparsereadstream.md).[_destroy](sparsereadstream.md#_destroy)* + +Defined in node_modules/@types/node/base.d.ts:5605 -*Defined in [lib/sparse-stream/sparse-filter-stream.ts:65](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/sparse-stream/sparse-filter-stream.ts#L65)* +**Parameters:** + +▪ **error**: *[Error](notcapable.md#static-error) | null* + +▪ **callback**: *function* + +▸ (`error?`: [Error](notcapable.md#static-error)): *void* **Parameters:** Name | Type | ------ | ------ | -`buffer` | Buffer | +`error?` | [Error](notcapable.md#static-error) | + +**Returns:** *void* + +___ + +### _final + +▸ **_final**(`callback`: Function): *void* + +*Inherited from [SparseFilterStream](sparsefilterstream.md).[_final](sparsefilterstream.md#_final)* + +Defined in node_modules/@types/node/base.d.ts:5606 + +**Parameters:** + +Name | Type | +------ | ------ | +`callback` | Function | **Returns:** *void* @@ -176,7 +251,7 @@ ___ *Inherited from [SparseFilterStream](sparsefilterstream.md).[_read](sparsefilterstream.md#_read)* -Defined in node_modules/@types/node/base.d.ts:3690 +Defined in node_modules/@types/node/base.d.ts:5425 **Parameters:** @@ -190,15 +265,15 @@ ___ ### _transform -▸ **_transform**(`chunk`: Buffer, `_encoding`: string, `callback`: function): *void* +▸ **_transform**(`chunk`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer), `_encoding`: string, `callback`: function): *void* *Overrides [SourceTransform](../interfaces/sourcetransform.md).[_transform](../interfaces/sourcetransform.md#_transform)* -*Defined in [lib/sparse-stream/sparse-filter-stream.ts:51](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/sparse-stream/sparse-filter-stream.ts#L51)* +*Defined in [lib/sparse-stream/sparse-filter-stream.ts:55](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/sparse-stream/sparse-filter-stream.ts#L55)* **Parameters:** -▪ **chunk**: *Buffer* +▪ **chunk**: *[Buffer](../interfaces/alignedlockablebuffer.md#buffer)* ▪ **_encoding**: *string* @@ -218,19 +293,53 @@ ___ ### _write -▸ **_write**(`chunk`: any, `encoding`: string, `callback`: Function): *void* +▸ **_write**(`chunk`: any, `encoding`: string, `callback`: function): *void* *Inherited from [SparseFilterStream](sparsefilterstream.md).[_write](sparsefilterstream.md#_write)* -Defined in node_modules/@types/node/base.d.ts:3857 +Defined in node_modules/@types/node/base.d.ts:5603 + +**Parameters:** + +▪ **chunk**: *any* + +▪ **encoding**: *string* + +▪ **callback**: *function* + +▸ (`err?`: [Error](notcapable.md#static-error)): *void* **Parameters:** Name | Type | ------ | ------ | -`chunk` | any | -`encoding` | string | -`callback` | Function | +`err?` | [Error](notcapable.md#static-error) | + +**Returns:** *void* + +___ + +### `Optional` _writev + +▸ **_writev**(`chunks`: Array‹object›, `callback`: function): *void* + +*Inherited from [SparseFilterStream](sparsefilterstream.md).[_writev](sparsefilterstream.md#optional-_writev)* + +Defined in node_modules/@types/node/base.d.ts:5604 + +**Parameters:** + +▪ **chunks**: *Array‹object›* + +▪ **callback**: *function* + +▸ (`err?`: [Error](notcapable.md#static-error)): *void* + +**Parameters:** + +Name | Type | +------ | ------ | +`err?` | [Error](notcapable.md#static-error) | **Returns:** *void* @@ -238,28 +347,35 @@ ___ ### addListener -▸ **addListener**(`event`: string, `listener`: Function): *this* +▸ **addListener**(`event`: string, `listener`: function): *this* *Inherited from [SparseFilterStream](sparsefilterstream.md).[addListener](sparsefilterstream.md#addlistener)* *Overrides [SourceSource](sourcesource.md).[addListener](sourcesource.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:3711 +Defined in node_modules/@types/node/base.d.ts:5447 Event emitter The defined events on documents including: - 1. close - 2. data - 3. end - 4. readable - 5. error +1. close +2. data +3. end +4. readable +5. error + +**Parameters:** + +▪ **event**: *string* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -269,7 +385,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[addListener](sourcesource.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:3712 +Defined in node_modules/@types/node/base.d.ts:5448 **Parameters:** @@ -287,7 +403,7 @@ Defined in node_modules/@types/node/base.d.ts:3712 *Overrides [SourceSource](sourcesource.md).[addListener](sourcesource.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:3713 +Defined in node_modules/@types/node/base.d.ts:5449 **Parameters:** @@ -295,13 +411,13 @@ Defined in node_modules/@types/node/base.d.ts:3713 ▪ **listener**: *function* -▸ (`chunk`: Buffer | string): *void* +▸ (`chunk`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string): *void* **Parameters:** Name | Type | ------ | ------ | -`chunk` | Buffer | string | +`chunk` | [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string | **Returns:** *this* @@ -311,7 +427,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[addListener](sourcesource.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:3714 +Defined in node_modules/@types/node/base.d.ts:5450 **Parameters:** @@ -329,7 +445,7 @@ Defined in node_modules/@types/node/base.d.ts:3714 *Overrides [SourceSource](sourcesource.md).[addListener](sourcesource.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:3715 +Defined in node_modules/@types/node/base.d.ts:5451 **Parameters:** @@ -347,7 +463,7 @@ Defined in node_modules/@types/node/base.d.ts:3715 *Overrides [SourceSource](sourcesource.md).[addListener](sourcesource.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:3716 +Defined in node_modules/@types/node/base.d.ts:5452 **Parameters:** @@ -367,6 +483,38 @@ Name | Type | ___ +### cork + +▸ **cork**(): *void* + +*Inherited from [SparseFilterStream](sparsefilterstream.md).[cork](sparsefilterstream.md#cork)* + +Defined in node_modules/@types/node/base.d.ts:5613 + +**Returns:** *void* + +___ + +### destroy + +▸ **destroy**(`error?`: [Error](notcapable.md#static-error)): *void* + +*Inherited from [SparseFilterStream](sparsefilterstream.md).[destroy](sparsefilterstream.md#destroy)* + +*Overrides [SparseReadStream](sparsereadstream.md).[destroy](sparsereadstream.md#destroy)* + +Defined in node_modules/@types/node/base.d.ts:5625 + +**Parameters:** + +Name | Type | +------ | ------ | +`error?` | [Error](notcapable.md#static-error) | + +**Returns:** *void* + +___ + ### emit ▸ **emit**(`event`: string | symbol, ...`args`: any[]): *boolean* @@ -377,7 +525,7 @@ ___ *Overrides [SourceSource](sourcesource.md).[emit](sourcesource.md#emit)* -Defined in node_modules/@types/node/base.d.ts:3718 +Defined in node_modules/@types/node/base.d.ts:5454 **Parameters:** @@ -394,7 +542,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[emit](sourcesource.md#emit)* -Defined in node_modules/@types/node/base.d.ts:3719 +Defined in node_modules/@types/node/base.d.ts:5455 **Parameters:** @@ -404,20 +552,20 @@ Name | Type | **Returns:** *boolean* -▸ **emit**(`event`: "data", `chunk`: Buffer | string): *boolean* +▸ **emit**(`event`: "data", `chunk`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string): *boolean* *Inherited from [SparseFilterStream](sparsefilterstream.md).[emit](sparsefilterstream.md#emit)* *Overrides [SourceSource](sourcesource.md).[emit](sourcesource.md#emit)* -Defined in node_modules/@types/node/base.d.ts:3720 +Defined in node_modules/@types/node/base.d.ts:5456 **Parameters:** Name | Type | ------ | ------ | `event` | "data" | -`chunk` | Buffer | string | +`chunk` | [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string | **Returns:** *boolean* @@ -427,7 +575,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[emit](sourcesource.md#emit)* -Defined in node_modules/@types/node/base.d.ts:3721 +Defined in node_modules/@types/node/base.d.ts:5457 **Parameters:** @@ -443,7 +591,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[emit](sourcesource.md#emit)* -Defined in node_modules/@types/node/base.d.ts:3722 +Defined in node_modules/@types/node/base.d.ts:5458 **Parameters:** @@ -459,7 +607,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[emit](sourcesource.md#emit)* -Defined in node_modules/@types/node/base.d.ts:3723 +Defined in node_modules/@types/node/base.d.ts:5459 **Parameters:** @@ -478,7 +626,7 @@ ___ *Inherited from [SparseFilterStream](sparsefilterstream.md).[end](sparsefilterstream.md#end)* -Defined in node_modules/@types/node/base.d.ts:3861 +Defined in node_modules/@types/node/base.d.ts:5610 **Parameters:** @@ -492,7 +640,7 @@ Name | Type | *Inherited from [SparseFilterStream](sparsefilterstream.md).[end](sparsefilterstream.md#end)* -Defined in node_modules/@types/node/base.d.ts:3862 +Defined in node_modules/@types/node/base.d.ts:5611 **Parameters:** @@ -507,7 +655,7 @@ Name | Type | *Inherited from [SparseFilterStream](sparsefilterstream.md).[end](sparsefilterstream.md#end)* -Defined in node_modules/@types/node/base.d.ts:3863 +Defined in node_modules/@types/node/base.d.ts:5612 **Parameters:** @@ -523,15 +671,15 @@ ___ ### eventNames -▸ **eventNames**(): *string | symbol[]* +▸ **eventNames**(): *Array‹string | symbol›* *Implementation of [SparseReadable](../interfaces/sparsereadable.md)* *Inherited from [CountingWritable](countingwritable.md).[eventNames](countingwritable.md#eventnames)* -Defined in node_modules/@types/node/base.d.ts:694 +Defined in node_modules/@types/node/base.d.ts:909 -**Returns:** *string | symbol[]* +**Returns:** *Array‹string | symbol›* ___ @@ -543,7 +691,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[getMaxListeners](countingwritable.md#getmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:691 +Defined in node_modules/@types/node/base.d.ts:906 **Returns:** *number* @@ -557,7 +705,7 @@ ___ *Inherited from [SparseFilterStream](sparsefilterstream.md).[isPaused](sparsefilterstream.md#ispaused)* -Defined in node_modules/@types/node/base.d.ts:3695 +Defined in node_modules/@types/node/base.d.ts:5430 **Returns:** *boolean* @@ -571,7 +719,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[listenerCount](countingwritable.md#static-listenercount)* -Defined in node_modules/@types/node/base.d.ts:695 +Defined in node_modules/@types/node/base.d.ts:910 **Parameters:** @@ -591,7 +739,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[listeners](countingwritable.md#listeners)* -Defined in node_modules/@types/node/base.d.ts:692 +Defined in node_modules/@types/node/base.d.ts:907 **Parameters:** @@ -607,7 +755,7 @@ ___ ▸ **nextBlock**(): *void* -*Defined in [lib/sparse-stream/sparse-filter-stream.ts:47](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/sparse-stream/sparse-filter-stream.ts#L47)* +*Defined in [lib/sparse-stream/sparse-filter-stream.ts:51](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/sparse-stream/sparse-filter-stream.ts#L51)* **Returns:** *void* @@ -615,20 +763,27 @@ ___ ### on -▸ **on**(`event`: string, `listener`: Function): *this* +▸ **on**(`event`: string, `listener`: function): *this* *Inherited from [SparseFilterStream](sparsefilterstream.md).[on](sparsefilterstream.md#on)* *Overrides [SourceSource](sourcesource.md).[on](sourcesource.md#on)* -Defined in node_modules/@types/node/base.d.ts:3725 +Defined in node_modules/@types/node/base.d.ts:5461 + +**Parameters:** + +▪ **event**: *string* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -638,7 +793,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[on](sourcesource.md#on)* -Defined in node_modules/@types/node/base.d.ts:3726 +Defined in node_modules/@types/node/base.d.ts:5462 **Parameters:** @@ -656,7 +811,7 @@ Defined in node_modules/@types/node/base.d.ts:3726 *Overrides [SourceSource](sourcesource.md).[on](sourcesource.md#on)* -Defined in node_modules/@types/node/base.d.ts:3727 +Defined in node_modules/@types/node/base.d.ts:5463 **Parameters:** @@ -664,13 +819,13 @@ Defined in node_modules/@types/node/base.d.ts:3727 ▪ **listener**: *function* -▸ (`chunk`: Buffer | string): *void* +▸ (`chunk`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string): *void* **Parameters:** Name | Type | ------ | ------ | -`chunk` | Buffer | string | +`chunk` | [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string | **Returns:** *this* @@ -680,7 +835,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[on](sourcesource.md#on)* -Defined in node_modules/@types/node/base.d.ts:3728 +Defined in node_modules/@types/node/base.d.ts:5464 **Parameters:** @@ -698,7 +853,7 @@ Defined in node_modules/@types/node/base.d.ts:3728 *Overrides [SourceSource](sourcesource.md).[on](sourcesource.md#on)* -Defined in node_modules/@types/node/base.d.ts:3729 +Defined in node_modules/@types/node/base.d.ts:5465 **Parameters:** @@ -716,7 +871,7 @@ Defined in node_modules/@types/node/base.d.ts:3729 *Overrides [SourceSource](sourcesource.md).[on](sourcesource.md#on)* -Defined in node_modules/@types/node/base.d.ts:3730 +Defined in node_modules/@types/node/base.d.ts:5466 **Parameters:** @@ -738,20 +893,27 @@ ___ ### once -▸ **once**(`event`: string, `listener`: Function): *this* +▸ **once**(`event`: string, `listener`: function): *this* *Inherited from [SparseFilterStream](sparsefilterstream.md).[once](sparsefilterstream.md#once)* *Overrides [SourceSource](sourcesource.md).[once](sourcesource.md#once)* -Defined in node_modules/@types/node/base.d.ts:3732 +Defined in node_modules/@types/node/base.d.ts:5468 + +**Parameters:** + +▪ **event**: *string* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -761,7 +923,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[once](sourcesource.md#once)* -Defined in node_modules/@types/node/base.d.ts:3733 +Defined in node_modules/@types/node/base.d.ts:5469 **Parameters:** @@ -779,7 +941,7 @@ Defined in node_modules/@types/node/base.d.ts:3733 *Overrides [SourceSource](sourcesource.md).[once](sourcesource.md#once)* -Defined in node_modules/@types/node/base.d.ts:3734 +Defined in node_modules/@types/node/base.d.ts:5470 **Parameters:** @@ -787,13 +949,13 @@ Defined in node_modules/@types/node/base.d.ts:3734 ▪ **listener**: *function* -▸ (`chunk`: Buffer | string): *void* +▸ (`chunk`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string): *void* **Parameters:** Name | Type | ------ | ------ | -`chunk` | Buffer | string | +`chunk` | [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string | **Returns:** *this* @@ -803,7 +965,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[once](sourcesource.md#once)* -Defined in node_modules/@types/node/base.d.ts:3735 +Defined in node_modules/@types/node/base.d.ts:5471 **Parameters:** @@ -821,7 +983,7 @@ Defined in node_modules/@types/node/base.d.ts:3735 *Overrides [SourceSource](sourcesource.md).[once](sourcesource.md#once)* -Defined in node_modules/@types/node/base.d.ts:3736 +Defined in node_modules/@types/node/base.d.ts:5472 **Parameters:** @@ -839,7 +1001,7 @@ Defined in node_modules/@types/node/base.d.ts:3736 *Overrides [SourceSource](sourcesource.md).[once](sourcesource.md#once)* -Defined in node_modules/@types/node/base.d.ts:3737 +Defined in node_modules/@types/node/base.d.ts:5473 **Parameters:** @@ -867,7 +1029,7 @@ ___ *Inherited from [SparseFilterStream](sparsefilterstream.md).[pause](sparsefilterstream.md#pause)* -Defined in node_modules/@types/node/base.d.ts:3693 +Defined in node_modules/@types/node/base.d.ts:5428 **Returns:** *this* @@ -877,11 +1039,9 @@ ___ ▸ **pipe**<**T**>(`destination`: T, `options?`: undefined | object): *T* -*Inherited from [SparseFilterStream](sparsefilterstream.md).[pipe](sparsefilterstream.md#pipe)* - -*Overrides [CountingWritable](countingwritable.md).[pipe](countingwritable.md#pipe)* +*Inherited from [CountingWritable](countingwritable.md).[pipe](countingwritable.md#pipe)* -Defined in node_modules/@types/node/base.d.ts:3696 +Defined in node_modules/@types/node/base.d.ts:5407 **Type parameters:** @@ -900,20 +1060,27 @@ ___ ### prependListener -▸ **prependListener**(`event`: string, `listener`: Function): *this* +▸ **prependListener**(`event`: string, `listener`: function): *this* *Inherited from [SparseFilterStream](sparsefilterstream.md).[prependListener](sparsefilterstream.md#prependlistener)* *Overrides [SourceSource](sourcesource.md).[prependListener](sourcesource.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:3739 +Defined in node_modules/@types/node/base.d.ts:5475 + +**Parameters:** + +▪ **event**: *string* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -923,7 +1090,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[prependListener](sourcesource.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:3740 +Defined in node_modules/@types/node/base.d.ts:5476 **Parameters:** @@ -941,7 +1108,7 @@ Defined in node_modules/@types/node/base.d.ts:3740 *Overrides [SourceSource](sourcesource.md).[prependListener](sourcesource.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:3741 +Defined in node_modules/@types/node/base.d.ts:5477 **Parameters:** @@ -949,13 +1116,13 @@ Defined in node_modules/@types/node/base.d.ts:3741 ▪ **listener**: *function* -▸ (`chunk`: Buffer | string): *void* +▸ (`chunk`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string): *void* **Parameters:** Name | Type | ------ | ------ | -`chunk` | Buffer | string | +`chunk` | [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string | **Returns:** *this* @@ -965,7 +1132,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[prependListener](sourcesource.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:3742 +Defined in node_modules/@types/node/base.d.ts:5478 **Parameters:** @@ -983,7 +1150,7 @@ Defined in node_modules/@types/node/base.d.ts:3742 *Overrides [SourceSource](sourcesource.md).[prependListener](sourcesource.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:3743 +Defined in node_modules/@types/node/base.d.ts:5479 **Parameters:** @@ -1001,7 +1168,7 @@ Defined in node_modules/@types/node/base.d.ts:3743 *Overrides [SourceSource](sourcesource.md).[prependListener](sourcesource.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:3744 +Defined in node_modules/@types/node/base.d.ts:5480 **Parameters:** @@ -1023,20 +1190,27 @@ ___ ### prependOnceListener -▸ **prependOnceListener**(`event`: string, `listener`: Function): *this* +▸ **prependOnceListener**(`event`: string, `listener`: function): *this* *Inherited from [SparseFilterStream](sparsefilterstream.md).[prependOnceListener](sparsefilterstream.md#prependoncelistener)* *Overrides [SourceSource](sourcesource.md).[prependOnceListener](sourcesource.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:3746 +Defined in node_modules/@types/node/base.d.ts:5482 + +**Parameters:** + +▪ **event**: *string* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -1046,7 +1220,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[prependOnceListener](sourcesource.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:3747 +Defined in node_modules/@types/node/base.d.ts:5483 **Parameters:** @@ -1064,7 +1238,7 @@ Defined in node_modules/@types/node/base.d.ts:3747 *Overrides [SourceSource](sourcesource.md).[prependOnceListener](sourcesource.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:3748 +Defined in node_modules/@types/node/base.d.ts:5484 **Parameters:** @@ -1072,13 +1246,13 @@ Defined in node_modules/@types/node/base.d.ts:3748 ▪ **listener**: *function* -▸ (`chunk`: Buffer | string): *void* +▸ (`chunk`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string): *void* **Parameters:** Name | Type | ------ | ------ | -`chunk` | Buffer | string | +`chunk` | [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string | **Returns:** *this* @@ -1088,7 +1262,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[prependOnceListener](sourcesource.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:3749 +Defined in node_modules/@types/node/base.d.ts:5485 **Parameters:** @@ -1106,7 +1280,7 @@ Defined in node_modules/@types/node/base.d.ts:3749 *Overrides [SourceSource](sourcesource.md).[prependOnceListener](sourcesource.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:3750 +Defined in node_modules/@types/node/base.d.ts:5486 **Parameters:** @@ -1124,7 +1298,7 @@ Defined in node_modules/@types/node/base.d.ts:3750 *Overrides [SourceSource](sourcesource.md).[prependOnceListener](sourcesource.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:3751 +Defined in node_modules/@types/node/base.d.ts:5487 **Parameters:** @@ -1150,7 +1324,7 @@ ___ *Inherited from [SparseFilterStream](sparsefilterstream.md).[push](sparsefilterstream.md#push)* -Defined in node_modules/@types/node/base.d.ts:3700 +Defined in node_modules/@types/node/base.d.ts:5434 **Parameters:** @@ -1171,7 +1345,7 @@ ___ *Inherited from [SparseFilterStream](sparsefilterstream.md).[read](sparsefilterstream.md#read)* -Defined in node_modules/@types/node/base.d.ts:3691 +Defined in node_modules/@types/node/base.d.ts:5426 **Parameters:** @@ -1191,7 +1365,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[removeAllListeners](countingwritable.md#removealllisteners)* -Defined in node_modules/@types/node/base.d.ts:689 +Defined in node_modules/@types/node/base.d.ts:904 **Parameters:** @@ -1205,20 +1379,27 @@ ___ ### removeListener -▸ **removeListener**(`event`: string, `listener`: Function): *this* +▸ **removeListener**(`event`: string, `listener`: function): *this* *Inherited from [SparseFilterStream](sparsefilterstream.md).[removeListener](sparsefilterstream.md#removelistener)* *Overrides [SourceSource](sourcesource.md).[removeListener](sourcesource.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:3753 +Defined in node_modules/@types/node/base.d.ts:5489 + +**Parameters:** + +▪ **event**: *string* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -1228,7 +1409,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[removeListener](sourcesource.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:3754 +Defined in node_modules/@types/node/base.d.ts:5490 **Parameters:** @@ -1246,7 +1427,7 @@ Defined in node_modules/@types/node/base.d.ts:3754 *Overrides [SourceSource](sourcesource.md).[removeListener](sourcesource.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:3755 +Defined in node_modules/@types/node/base.d.ts:5491 **Parameters:** @@ -1254,13 +1435,13 @@ Defined in node_modules/@types/node/base.d.ts:3755 ▪ **listener**: *function* -▸ (`chunk`: Buffer | string): *void* +▸ (`chunk`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string): *void* **Parameters:** Name | Type | ------ | ------ | -`chunk` | Buffer | string | +`chunk` | [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string | **Returns:** *this* @@ -1270,7 +1451,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[removeListener](sourcesource.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:3756 +Defined in node_modules/@types/node/base.d.ts:5492 **Parameters:** @@ -1288,7 +1469,7 @@ Defined in node_modules/@types/node/base.d.ts:3756 *Overrides [SourceSource](sourcesource.md).[removeListener](sourcesource.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:3757 +Defined in node_modules/@types/node/base.d.ts:5493 **Parameters:** @@ -1306,7 +1487,7 @@ Defined in node_modules/@types/node/base.d.ts:3757 *Overrides [SourceSource](sourcesource.md).[removeListener](sourcesource.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:3758 +Defined in node_modules/@types/node/base.d.ts:5494 **Parameters:** @@ -1334,7 +1515,7 @@ ___ *Inherited from [SparseFilterStream](sparsefilterstream.md).[resume](sparsefilterstream.md#resume)* -Defined in node_modules/@types/node/base.d.ts:3694 +Defined in node_modules/@types/node/base.d.ts:5429 **Returns:** *this* @@ -1346,7 +1527,7 @@ ___ *Inherited from [SparseFilterStream](sparsefilterstream.md).[setDefaultEncoding](sparsefilterstream.md#setdefaultencoding)* -Defined in node_modules/@types/node/base.d.ts:3860 +Defined in node_modules/@types/node/base.d.ts:5609 **Parameters:** @@ -1360,11 +1541,13 @@ ___ ### setEncoding -▸ **setEncoding**(`encoding`: string): *void* +▸ **setEncoding**(`encoding`: string): *this* + +*Implementation of [SparseReadable](../interfaces/sparsereadable.md)* *Inherited from [SparseFilterStream](sparsefilterstream.md).[setEncoding](sparsefilterstream.md#setencoding)* -Defined in node_modules/@types/node/base.d.ts:3692 +Defined in node_modules/@types/node/base.d.ts:5427 **Parameters:** @@ -1372,7 +1555,7 @@ Name | Type | ------ | ------ | `encoding` | string | -**Returns:** *void* +**Returns:** *this* ___ @@ -1384,7 +1567,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[setMaxListeners](countingwritable.md#setmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:690 +Defined in node_modules/@types/node/base.d.ts:905 **Parameters:** @@ -1396,15 +1579,27 @@ Name | Type | ___ +### uncork + +▸ **uncork**(): *void* + +*Inherited from [SparseFilterStream](sparsefilterstream.md).[uncork](sparsefilterstream.md#uncork)* + +Defined in node_modules/@types/node/base.d.ts:5614 + +**Returns:** *void* + +___ + ### unpipe -▸ **unpipe**<**T**>(`destination?`: T): *void* +▸ **unpipe**<**T**>(`destination?`: T): *this* *Implementation of [SparseReadable](../interfaces/sparsereadable.md)* *Inherited from [SparseFilterStream](sparsefilterstream.md).[unpipe](sparsefilterstream.md#unpipe)* -Defined in node_modules/@types/node/base.d.ts:3697 +Defined in node_modules/@types/node/base.d.ts:5431 **Type parameters:** @@ -1416,7 +1611,7 @@ Name | Type | ------ | ------ | `destination?` | T | -**Returns:** *void* +**Returns:** *this* ___ @@ -1426,7 +1621,7 @@ ___ *Inherited from [SparseFilterStream](sparsefilterstream.md).[unshift](sparsefilterstream.md#unshift)* -Defined in node_modules/@types/node/base.d.ts:3698 +Defined in node_modules/@types/node/base.d.ts:5432 **Parameters:** @@ -1440,13 +1635,13 @@ ___ ### wrap -▸ **wrap**(`oldStream`: ReadableStream): *Readable* +▸ **wrap**(`oldStream`: ReadableStream): *this* *Implementation of [SparseReadable](../interfaces/sparsereadable.md)* *Inherited from [SparseFilterStream](sparsefilterstream.md).[wrap](sparsefilterstream.md#wrap)* -Defined in node_modules/@types/node/base.d.ts:3699 +Defined in node_modules/@types/node/base.d.ts:5433 **Parameters:** @@ -1454,7 +1649,7 @@ Name | Type | ------ | ------ | `oldStream` | ReadableStream | -**Returns:** *Readable* +**Returns:** *this* ___ @@ -1464,7 +1659,7 @@ ___ *Inherited from [SparseFilterStream](sparsefilterstream.md).[write](sparsefilterstream.md#write)* -Defined in node_modules/@types/node/base.d.ts:3858 +Defined in node_modules/@types/node/base.d.ts:5607 **Parameters:** @@ -1479,7 +1674,7 @@ Name | Type | *Inherited from [SparseFilterStream](sparsefilterstream.md).[write](sparsefilterstream.md#write)* -Defined in node_modules/@types/node/base.d.ts:3859 +Defined in node_modules/@types/node/base.d.ts:5608 **Parameters:** @@ -1499,7 +1694,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[listenerCount](countingwritable.md#static-listenercount)* -Defined in node_modules/@types/node/base.d.ts:680 +Defined in node_modules/@types/node/base.d.ts:895 **Parameters:** diff --git a/doc/classes/sparsereadstream.md b/doc/classes/sparsereadstream.md index 34df8749..bb8ab46b 100644 --- a/doc/classes/sparsereadstream.md +++ b/doc/classes/sparsereadstream.md @@ -21,10 +21,12 @@ ### Properties +* [alignedReadableState](sparsereadstream.md#private-optional-alignedreadablestate) * [blocks](sparsereadstream.md#blocks) * [chunkSize](sparsereadstream.md#private-chunksize) * [positionInBlock](sparsereadstream.md#private-positioninblock) * [readable](sparsereadstream.md#readable) +* [readableHighWaterMark](sparsereadstream.md#readablehighwatermark) * [source](sparsereadstream.md#private-source) * [state](sparsereadstream.md#private-optional-state) * [stateIterator](sparsereadstream.md#private-stateiterator) @@ -33,8 +35,10 @@ ### Methods * [__read](sparsereadstream.md#private-__read) +* [_destroy](sparsereadstream.md#_destroy) * [_read](sparsereadstream.md#_read) * [addListener](sparsereadstream.md#addlistener) +* [destroy](sparsereadstream.md#destroy) * [emit](sparsereadstream.md#emit) * [eventNames](sparsereadstream.md#eventnames) * [getMaxListeners](sparsereadstream.md#getmaxlisteners) @@ -64,34 +68,45 @@ ### constructor -\+ **new SparseReadStream**(`source`: [SourceDestination](sourcedestination.md), `blocks`: [BlocksWithChecksum](../interfaces/blockswithchecksum.md)[], `chunkSize`: number, `verify`: boolean, `generateChecksums`: boolean, `options`: ReadableOptions): *[SparseReadStream](sparsereadstream.md)* +\+ **new SparseReadStream**(`__namedParameters`: object): *[SparseReadStream](sparsereadstream.md)* *Overrides void* -*Defined in [lib/sparse-stream/sparse-read-stream.ts:32](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/sparse-stream/sparse-read-stream.ts#L32)* +*Defined in [lib/sparse-stream/sparse-read-stream.ts:40](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/sparse-stream/sparse-read-stream.ts#L40)* **Parameters:** +▪ **__namedParameters**: *object* + Name | Type | Default | ------ | ------ | ------ | -`source` | [SourceDestination](sourcedestination.md) | - | +`alignment` | undefined | number | - | `blocks` | [BlocksWithChecksum](../interfaces/blockswithchecksum.md)[] | - | `chunkSize` | number | - | -`verify` | boolean | - | `generateChecksums` | boolean | - | -`options` | ReadableOptions | {} | +`numBuffers` | number | 2 | +`source` | [SourceDestination](sourcedestination.md)‹› | - | +`verify` | boolean | - | **Returns:** *[SparseReadStream](sparsereadstream.md)* ## Properties +### `Private` `Optional` alignedReadableState + +• **alignedReadableState**? : *[AlignedReadableState](alignedreadablestate.md)* + +*Defined in [lib/sparse-stream/sparse-read-stream.ts:40](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/sparse-stream/sparse-read-stream.ts#L40)* + +___ + ### blocks • **blocks**: *[BlocksWithChecksum](../interfaces/blockswithchecksum.md)[]* *Implementation of [SparseReadable](../interfaces/sparsereadable.md).[blocks](../interfaces/sparsereadable.md#blocks)* -*Defined in [lib/sparse-stream/sparse-read-stream.ts:36](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/sparse-stream/sparse-read-stream.ts#L36)* +*Defined in [lib/sparse-stream/sparse-read-stream.ts:35](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/sparse-stream/sparse-read-stream.ts#L35)* ___ @@ -99,7 +114,7 @@ ___ • **chunkSize**: *number* -*Defined in [lib/sparse-stream/sparse-read-stream.ts:37](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/sparse-stream/sparse-read-stream.ts#L37)* +*Defined in [lib/sparse-stream/sparse-read-stream.ts:36](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/sparse-stream/sparse-read-stream.ts#L36)* ___ @@ -107,7 +122,7 @@ ___ • **positionInBlock**: *number* = 0 -*Defined in [lib/sparse-stream/sparse-read-stream.ts:32](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/sparse-stream/sparse-read-stream.ts#L32)* +*Defined in [lib/sparse-stream/sparse-read-stream.ts:39](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/sparse-stream/sparse-read-stream.ts#L39)* ___ @@ -119,7 +134,17 @@ ___ *Inherited from [SparseFilterStream](sparsefilterstream.md).[readable](sparsefilterstream.md#readable)* -Defined in node_modules/@types/node/base.d.ts:3688 +Defined in node_modules/@types/node/base.d.ts:5422 + +___ + +### readableHighWaterMark + +• **readableHighWaterMark**: *number* + +*Inherited from [SparseFilterStream](sparsefilterstream.md).[readableHighWaterMark](sparsefilterstream.md#readablehighwatermark)* + +Defined in node_modules/@types/node/base.d.ts:5423 ___ @@ -127,7 +152,7 @@ ___ • **source**: *[SourceDestination](sourcedestination.md)* -*Defined in [lib/sparse-stream/sparse-read-stream.ts:35](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/sparse-stream/sparse-read-stream.ts#L35)* +*Defined in [lib/sparse-stream/sparse-read-stream.ts:34](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/sparse-stream/sparse-read-stream.ts#L34)* ___ @@ -135,7 +160,7 @@ ___ • **state**? : *[SparseReaderState](../interfaces/sparsereaderstate.md)* -*Defined in [lib/sparse-stream/sparse-read-stream.ts:31](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/sparse-stream/sparse-read-stream.ts#L31)* +*Defined in [lib/sparse-stream/sparse-read-stream.ts:38](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/sparse-stream/sparse-read-stream.ts#L38)* ___ @@ -143,7 +168,7 @@ ___ • **stateIterator**: *Iterator‹[SparseReaderState](../interfaces/sparsereaderstate.md)›* -*Defined in [lib/sparse-stream/sparse-read-stream.ts:30](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/sparse-stream/sparse-read-stream.ts#L30)* +*Defined in [lib/sparse-stream/sparse-read-stream.ts:37](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/sparse-stream/sparse-read-stream.ts#L37)* ___ @@ -153,7 +178,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[defaultMaxListeners](countingwritable.md#static-defaultmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:681 +Defined in node_modules/@types/node/base.d.ts:896 ## Methods @@ -161,19 +186,45 @@ Defined in node_modules/@types/node/base.d.ts:681 ▸ **__read**(): *Promise‹[SparseStreamChunk](../interfaces/sparsestreamchunk.md) | null›* -*Defined in [lib/sparse-stream/sparse-read-stream.ts:65](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/sparse-stream/sparse-read-stream.ts#L65)* +*Defined in [lib/sparse-stream/sparse-read-stream.ts:92](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/sparse-stream/sparse-read-stream.ts#L92)* **Returns:** *Promise‹[SparseStreamChunk](../interfaces/sparsestreamchunk.md) | null›* ___ +### _destroy + +▸ **_destroy**(`error`: [Error](notcapable.md#static-error) | null, `callback`: function): *void* + +*Inherited from [SparseReadStream](sparsereadstream.md).[_destroy](sparsereadstream.md#_destroy)* + +Defined in node_modules/@types/node/base.d.ts:5435 + +**Parameters:** + +▪ **error**: *[Error](notcapable.md#static-error) | null* + +▪ **callback**: *function* + +▸ (`error?`: [Error](notcapable.md#static-error)): *void* + +**Parameters:** + +Name | Type | +------ | ------ | +`error?` | [Error](notcapable.md#static-error) | + +**Returns:** *void* + +___ + ### _read ▸ **_read**(): *Promise‹void›* *Overrides [SparseFilterStream](sparsefilterstream.md).[_read](sparsefilterstream.md#_read)* -*Defined in [lib/sparse-stream/sparse-read-stream.ts:51](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/sparse-stream/sparse-read-stream.ts#L51)* +*Defined in [lib/sparse-stream/sparse-read-stream.ts:78](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/sparse-stream/sparse-read-stream.ts#L78)* **Returns:** *Promise‹void›* @@ -181,28 +232,35 @@ ___ ### addListener -▸ **addListener**(`event`: string, `listener`: Function): *this* +▸ **addListener**(`event`: string, `listener`: function): *this* *Inherited from [SparseFilterStream](sparsefilterstream.md).[addListener](sparsefilterstream.md#addlistener)* *Overrides [SourceSource](sourcesource.md).[addListener](sourcesource.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:3711 +Defined in node_modules/@types/node/base.d.ts:5447 Event emitter The defined events on documents including: - 1. close - 2. data - 3. end - 4. readable - 5. error +1. close +2. data +3. end +4. readable +5. error + +**Parameters:** + +▪ **event**: *string* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -212,7 +270,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[addListener](sourcesource.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:3712 +Defined in node_modules/@types/node/base.d.ts:5448 **Parameters:** @@ -230,7 +288,7 @@ Defined in node_modules/@types/node/base.d.ts:3712 *Overrides [SourceSource](sourcesource.md).[addListener](sourcesource.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:3713 +Defined in node_modules/@types/node/base.d.ts:5449 **Parameters:** @@ -238,13 +296,13 @@ Defined in node_modules/@types/node/base.d.ts:3713 ▪ **listener**: *function* -▸ (`chunk`: Buffer | string): *void* +▸ (`chunk`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string): *void* **Parameters:** Name | Type | ------ | ------ | -`chunk` | Buffer | string | +`chunk` | [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string | **Returns:** *this* @@ -254,7 +312,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[addListener](sourcesource.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:3714 +Defined in node_modules/@types/node/base.d.ts:5450 **Parameters:** @@ -272,7 +330,7 @@ Defined in node_modules/@types/node/base.d.ts:3714 *Overrides [SourceSource](sourcesource.md).[addListener](sourcesource.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:3715 +Defined in node_modules/@types/node/base.d.ts:5451 **Parameters:** @@ -290,7 +348,7 @@ Defined in node_modules/@types/node/base.d.ts:3715 *Overrides [SourceSource](sourcesource.md).[addListener](sourcesource.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:3716 +Defined in node_modules/@types/node/base.d.ts:5452 **Parameters:** @@ -310,6 +368,24 @@ Name | Type | ___ +### destroy + +▸ **destroy**(`error?`: [Error](notcapable.md#static-error)): *void* + +*Inherited from [SparseReadStream](sparsereadstream.md).[destroy](sparsereadstream.md#destroy)* + +Defined in node_modules/@types/node/base.d.ts:5436 + +**Parameters:** + +Name | Type | +------ | ------ | +`error?` | [Error](notcapable.md#static-error) | + +**Returns:** *void* + +___ + ### emit ▸ **emit**(`event`: string | symbol, ...`args`: any[]): *boolean* @@ -320,7 +396,7 @@ ___ *Overrides [SourceSource](sourcesource.md).[emit](sourcesource.md#emit)* -Defined in node_modules/@types/node/base.d.ts:3718 +Defined in node_modules/@types/node/base.d.ts:5454 **Parameters:** @@ -337,7 +413,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[emit](sourcesource.md#emit)* -Defined in node_modules/@types/node/base.d.ts:3719 +Defined in node_modules/@types/node/base.d.ts:5455 **Parameters:** @@ -347,20 +423,20 @@ Name | Type | **Returns:** *boolean* -▸ **emit**(`event`: "data", `chunk`: Buffer | string): *boolean* +▸ **emit**(`event`: "data", `chunk`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string): *boolean* *Inherited from [SparseFilterStream](sparsefilterstream.md).[emit](sparsefilterstream.md#emit)* *Overrides [SourceSource](sourcesource.md).[emit](sourcesource.md#emit)* -Defined in node_modules/@types/node/base.d.ts:3720 +Defined in node_modules/@types/node/base.d.ts:5456 **Parameters:** Name | Type | ------ | ------ | `event` | "data" | -`chunk` | Buffer | string | +`chunk` | [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string | **Returns:** *boolean* @@ -370,7 +446,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[emit](sourcesource.md#emit)* -Defined in node_modules/@types/node/base.d.ts:3721 +Defined in node_modules/@types/node/base.d.ts:5457 **Parameters:** @@ -386,7 +462,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[emit](sourcesource.md#emit)* -Defined in node_modules/@types/node/base.d.ts:3722 +Defined in node_modules/@types/node/base.d.ts:5458 **Parameters:** @@ -402,7 +478,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[emit](sourcesource.md#emit)* -Defined in node_modules/@types/node/base.d.ts:3723 +Defined in node_modules/@types/node/base.d.ts:5459 **Parameters:** @@ -417,15 +493,15 @@ ___ ### eventNames -▸ **eventNames**(): *string | symbol[]* +▸ **eventNames**(): *Array‹string | symbol›* *Implementation of [SparseReadable](../interfaces/sparsereadable.md)* *Inherited from [CountingWritable](countingwritable.md).[eventNames](countingwritable.md#eventnames)* -Defined in node_modules/@types/node/base.d.ts:694 +Defined in node_modules/@types/node/base.d.ts:909 -**Returns:** *string | symbol[]* +**Returns:** *Array‹string | symbol›* ___ @@ -437,7 +513,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[getMaxListeners](countingwritable.md#getmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:691 +Defined in node_modules/@types/node/base.d.ts:906 **Returns:** *number* @@ -451,7 +527,7 @@ ___ *Inherited from [SparseFilterStream](sparsefilterstream.md).[isPaused](sparsefilterstream.md#ispaused)* -Defined in node_modules/@types/node/base.d.ts:3695 +Defined in node_modules/@types/node/base.d.ts:5430 **Returns:** *boolean* @@ -465,7 +541,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[listenerCount](countingwritable.md#static-listenercount)* -Defined in node_modules/@types/node/base.d.ts:695 +Defined in node_modules/@types/node/base.d.ts:910 **Parameters:** @@ -485,7 +561,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[listeners](countingwritable.md#listeners)* -Defined in node_modules/@types/node/base.d.ts:692 +Defined in node_modules/@types/node/base.d.ts:907 **Parameters:** @@ -501,7 +577,7 @@ ___ ▸ **nextBlock**(): *void* -*Defined in [lib/sparse-stream/sparse-read-stream.ts:60](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/sparse-stream/sparse-read-stream.ts#L60)* +*Defined in [lib/sparse-stream/sparse-read-stream.ts:87](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/sparse-stream/sparse-read-stream.ts#L87)* **Returns:** *void* @@ -509,20 +585,27 @@ ___ ### on -▸ **on**(`event`: string, `listener`: Function): *this* +▸ **on**(`event`: string, `listener`: function): *this* *Inherited from [SparseFilterStream](sparsefilterstream.md).[on](sparsefilterstream.md#on)* *Overrides [SourceSource](sourcesource.md).[on](sourcesource.md#on)* -Defined in node_modules/@types/node/base.d.ts:3725 +Defined in node_modules/@types/node/base.d.ts:5461 + +**Parameters:** + +▪ **event**: *string* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -532,7 +615,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[on](sourcesource.md#on)* -Defined in node_modules/@types/node/base.d.ts:3726 +Defined in node_modules/@types/node/base.d.ts:5462 **Parameters:** @@ -550,7 +633,7 @@ Defined in node_modules/@types/node/base.d.ts:3726 *Overrides [SourceSource](sourcesource.md).[on](sourcesource.md#on)* -Defined in node_modules/@types/node/base.d.ts:3727 +Defined in node_modules/@types/node/base.d.ts:5463 **Parameters:** @@ -558,13 +641,13 @@ Defined in node_modules/@types/node/base.d.ts:3727 ▪ **listener**: *function* -▸ (`chunk`: Buffer | string): *void* +▸ (`chunk`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string): *void* **Parameters:** Name | Type | ------ | ------ | -`chunk` | Buffer | string | +`chunk` | [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string | **Returns:** *this* @@ -574,7 +657,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[on](sourcesource.md#on)* -Defined in node_modules/@types/node/base.d.ts:3728 +Defined in node_modules/@types/node/base.d.ts:5464 **Parameters:** @@ -592,7 +675,7 @@ Defined in node_modules/@types/node/base.d.ts:3728 *Overrides [SourceSource](sourcesource.md).[on](sourcesource.md#on)* -Defined in node_modules/@types/node/base.d.ts:3729 +Defined in node_modules/@types/node/base.d.ts:5465 **Parameters:** @@ -610,7 +693,7 @@ Defined in node_modules/@types/node/base.d.ts:3729 *Overrides [SourceSource](sourcesource.md).[on](sourcesource.md#on)* -Defined in node_modules/@types/node/base.d.ts:3730 +Defined in node_modules/@types/node/base.d.ts:5466 **Parameters:** @@ -632,20 +715,27 @@ ___ ### once -▸ **once**(`event`: string, `listener`: Function): *this* +▸ **once**(`event`: string, `listener`: function): *this* *Inherited from [SparseFilterStream](sparsefilterstream.md).[once](sparsefilterstream.md#once)* *Overrides [SourceSource](sourcesource.md).[once](sourcesource.md#once)* -Defined in node_modules/@types/node/base.d.ts:3732 +Defined in node_modules/@types/node/base.d.ts:5468 + +**Parameters:** + +▪ **event**: *string* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -655,7 +745,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[once](sourcesource.md#once)* -Defined in node_modules/@types/node/base.d.ts:3733 +Defined in node_modules/@types/node/base.d.ts:5469 **Parameters:** @@ -673,7 +763,7 @@ Defined in node_modules/@types/node/base.d.ts:3733 *Overrides [SourceSource](sourcesource.md).[once](sourcesource.md#once)* -Defined in node_modules/@types/node/base.d.ts:3734 +Defined in node_modules/@types/node/base.d.ts:5470 **Parameters:** @@ -681,13 +771,13 @@ Defined in node_modules/@types/node/base.d.ts:3734 ▪ **listener**: *function* -▸ (`chunk`: Buffer | string): *void* +▸ (`chunk`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string): *void* **Parameters:** Name | Type | ------ | ------ | -`chunk` | Buffer | string | +`chunk` | [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string | **Returns:** *this* @@ -697,7 +787,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[once](sourcesource.md#once)* -Defined in node_modules/@types/node/base.d.ts:3735 +Defined in node_modules/@types/node/base.d.ts:5471 **Parameters:** @@ -715,7 +805,7 @@ Defined in node_modules/@types/node/base.d.ts:3735 *Overrides [SourceSource](sourcesource.md).[once](sourcesource.md#once)* -Defined in node_modules/@types/node/base.d.ts:3736 +Defined in node_modules/@types/node/base.d.ts:5472 **Parameters:** @@ -733,7 +823,7 @@ Defined in node_modules/@types/node/base.d.ts:3736 *Overrides [SourceSource](sourcesource.md).[once](sourcesource.md#once)* -Defined in node_modules/@types/node/base.d.ts:3737 +Defined in node_modules/@types/node/base.d.ts:5473 **Parameters:** @@ -761,7 +851,7 @@ ___ *Inherited from [SparseFilterStream](sparsefilterstream.md).[pause](sparsefilterstream.md#pause)* -Defined in node_modules/@types/node/base.d.ts:3693 +Defined in node_modules/@types/node/base.d.ts:5428 **Returns:** *this* @@ -771,11 +861,9 @@ ___ ▸ **pipe**<**T**>(`destination`: T, `options?`: undefined | object): *T* -*Inherited from [SparseFilterStream](sparsefilterstream.md).[pipe](sparsefilterstream.md#pipe)* +*Inherited from [CountingWritable](countingwritable.md).[pipe](countingwritable.md#pipe)* -*Overrides [CountingWritable](countingwritable.md).[pipe](countingwritable.md#pipe)* - -Defined in node_modules/@types/node/base.d.ts:3696 +Defined in node_modules/@types/node/base.d.ts:5407 **Type parameters:** @@ -794,20 +882,27 @@ ___ ### prependListener -▸ **prependListener**(`event`: string, `listener`: Function): *this* +▸ **prependListener**(`event`: string, `listener`: function): *this* *Inherited from [SparseFilterStream](sparsefilterstream.md).[prependListener](sparsefilterstream.md#prependlistener)* *Overrides [SourceSource](sourcesource.md).[prependListener](sourcesource.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:3739 +Defined in node_modules/@types/node/base.d.ts:5475 + +**Parameters:** + +▪ **event**: *string* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -817,7 +912,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[prependListener](sourcesource.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:3740 +Defined in node_modules/@types/node/base.d.ts:5476 **Parameters:** @@ -835,7 +930,7 @@ Defined in node_modules/@types/node/base.d.ts:3740 *Overrides [SourceSource](sourcesource.md).[prependListener](sourcesource.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:3741 +Defined in node_modules/@types/node/base.d.ts:5477 **Parameters:** @@ -843,13 +938,13 @@ Defined in node_modules/@types/node/base.d.ts:3741 ▪ **listener**: *function* -▸ (`chunk`: Buffer | string): *void* +▸ (`chunk`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string): *void* **Parameters:** Name | Type | ------ | ------ | -`chunk` | Buffer | string | +`chunk` | [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string | **Returns:** *this* @@ -859,7 +954,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[prependListener](sourcesource.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:3742 +Defined in node_modules/@types/node/base.d.ts:5478 **Parameters:** @@ -877,7 +972,7 @@ Defined in node_modules/@types/node/base.d.ts:3742 *Overrides [SourceSource](sourcesource.md).[prependListener](sourcesource.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:3743 +Defined in node_modules/@types/node/base.d.ts:5479 **Parameters:** @@ -895,7 +990,7 @@ Defined in node_modules/@types/node/base.d.ts:3743 *Overrides [SourceSource](sourcesource.md).[prependListener](sourcesource.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:3744 +Defined in node_modules/@types/node/base.d.ts:5480 **Parameters:** @@ -917,20 +1012,27 @@ ___ ### prependOnceListener -▸ **prependOnceListener**(`event`: string, `listener`: Function): *this* +▸ **prependOnceListener**(`event`: string, `listener`: function): *this* *Inherited from [SparseFilterStream](sparsefilterstream.md).[prependOnceListener](sparsefilterstream.md#prependoncelistener)* *Overrides [SourceSource](sourcesource.md).[prependOnceListener](sourcesource.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:3746 +Defined in node_modules/@types/node/base.d.ts:5482 + +**Parameters:** + +▪ **event**: *string* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -940,7 +1042,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[prependOnceListener](sourcesource.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:3747 +Defined in node_modules/@types/node/base.d.ts:5483 **Parameters:** @@ -958,7 +1060,7 @@ Defined in node_modules/@types/node/base.d.ts:3747 *Overrides [SourceSource](sourcesource.md).[prependOnceListener](sourcesource.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:3748 +Defined in node_modules/@types/node/base.d.ts:5484 **Parameters:** @@ -966,13 +1068,13 @@ Defined in node_modules/@types/node/base.d.ts:3748 ▪ **listener**: *function* -▸ (`chunk`: Buffer | string): *void* +▸ (`chunk`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string): *void* **Parameters:** Name | Type | ------ | ------ | -`chunk` | Buffer | string | +`chunk` | [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string | **Returns:** *this* @@ -982,7 +1084,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[prependOnceListener](sourcesource.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:3749 +Defined in node_modules/@types/node/base.d.ts:5485 **Parameters:** @@ -1000,7 +1102,7 @@ Defined in node_modules/@types/node/base.d.ts:3749 *Overrides [SourceSource](sourcesource.md).[prependOnceListener](sourcesource.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:3750 +Defined in node_modules/@types/node/base.d.ts:5486 **Parameters:** @@ -1018,7 +1120,7 @@ Defined in node_modules/@types/node/base.d.ts:3750 *Overrides [SourceSource](sourcesource.md).[prependOnceListener](sourcesource.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:3751 +Defined in node_modules/@types/node/base.d.ts:5487 **Parameters:** @@ -1044,7 +1146,7 @@ ___ *Inherited from [SparseFilterStream](sparsefilterstream.md).[push](sparsefilterstream.md#push)* -Defined in node_modules/@types/node/base.d.ts:3700 +Defined in node_modules/@types/node/base.d.ts:5434 **Parameters:** @@ -1065,7 +1167,7 @@ ___ *Inherited from [SparseFilterStream](sparsefilterstream.md).[read](sparsefilterstream.md#read)* -Defined in node_modules/@types/node/base.d.ts:3691 +Defined in node_modules/@types/node/base.d.ts:5426 **Parameters:** @@ -1085,7 +1187,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[removeAllListeners](countingwritable.md#removealllisteners)* -Defined in node_modules/@types/node/base.d.ts:689 +Defined in node_modules/@types/node/base.d.ts:904 **Parameters:** @@ -1099,20 +1201,27 @@ ___ ### removeListener -▸ **removeListener**(`event`: string, `listener`: Function): *this* +▸ **removeListener**(`event`: string, `listener`: function): *this* *Inherited from [SparseFilterStream](sparsefilterstream.md).[removeListener](sparsefilterstream.md#removelistener)* *Overrides [SourceSource](sourcesource.md).[removeListener](sourcesource.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:3753 +Defined in node_modules/@types/node/base.d.ts:5489 + +**Parameters:** + +▪ **event**: *string* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -1122,7 +1231,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[removeListener](sourcesource.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:3754 +Defined in node_modules/@types/node/base.d.ts:5490 **Parameters:** @@ -1140,7 +1249,7 @@ Defined in node_modules/@types/node/base.d.ts:3754 *Overrides [SourceSource](sourcesource.md).[removeListener](sourcesource.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:3755 +Defined in node_modules/@types/node/base.d.ts:5491 **Parameters:** @@ -1148,13 +1257,13 @@ Defined in node_modules/@types/node/base.d.ts:3755 ▪ **listener**: *function* -▸ (`chunk`: Buffer | string): *void* +▸ (`chunk`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string): *void* **Parameters:** Name | Type | ------ | ------ | -`chunk` | Buffer | string | +`chunk` | [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string | **Returns:** *this* @@ -1164,7 +1273,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[removeListener](sourcesource.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:3756 +Defined in node_modules/@types/node/base.d.ts:5492 **Parameters:** @@ -1182,7 +1291,7 @@ Defined in node_modules/@types/node/base.d.ts:3756 *Overrides [SourceSource](sourcesource.md).[removeListener](sourcesource.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:3757 +Defined in node_modules/@types/node/base.d.ts:5493 **Parameters:** @@ -1200,7 +1309,7 @@ Defined in node_modules/@types/node/base.d.ts:3757 *Overrides [SourceSource](sourcesource.md).[removeListener](sourcesource.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:3758 +Defined in node_modules/@types/node/base.d.ts:5494 **Parameters:** @@ -1228,7 +1337,7 @@ ___ *Inherited from [SparseFilterStream](sparsefilterstream.md).[resume](sparsefilterstream.md#resume)* -Defined in node_modules/@types/node/base.d.ts:3694 +Defined in node_modules/@types/node/base.d.ts:5429 **Returns:** *this* @@ -1236,11 +1345,13 @@ ___ ### setEncoding -▸ **setEncoding**(`encoding`: string): *void* +▸ **setEncoding**(`encoding`: string): *this* + +*Implementation of [SparseReadable](../interfaces/sparsereadable.md)* *Inherited from [SparseFilterStream](sparsefilterstream.md).[setEncoding](sparsefilterstream.md#setencoding)* -Defined in node_modules/@types/node/base.d.ts:3692 +Defined in node_modules/@types/node/base.d.ts:5427 **Parameters:** @@ -1248,7 +1359,7 @@ Name | Type | ------ | ------ | `encoding` | string | -**Returns:** *void* +**Returns:** *this* ___ @@ -1260,7 +1371,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[setMaxListeners](countingwritable.md#setmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:690 +Defined in node_modules/@types/node/base.d.ts:905 **Parameters:** @@ -1274,13 +1385,13 @@ ___ ### unpipe -▸ **unpipe**<**T**>(`destination?`: T): *void* +▸ **unpipe**<**T**>(`destination?`: T): *this* *Implementation of [SparseReadable](../interfaces/sparsereadable.md)* *Inherited from [SparseFilterStream](sparsefilterstream.md).[unpipe](sparsefilterstream.md#unpipe)* -Defined in node_modules/@types/node/base.d.ts:3697 +Defined in node_modules/@types/node/base.d.ts:5431 **Type parameters:** @@ -1292,7 +1403,7 @@ Name | Type | ------ | ------ | `destination?` | T | -**Returns:** *void* +**Returns:** *this* ___ @@ -1302,7 +1413,7 @@ ___ *Inherited from [SparseFilterStream](sparsefilterstream.md).[unshift](sparsefilterstream.md#unshift)* -Defined in node_modules/@types/node/base.d.ts:3698 +Defined in node_modules/@types/node/base.d.ts:5432 **Parameters:** @@ -1316,13 +1427,13 @@ ___ ### wrap -▸ **wrap**(`oldStream`: ReadableStream): *Readable* +▸ **wrap**(`oldStream`: ReadableStream): *this* *Implementation of [SparseReadable](../interfaces/sparsereadable.md)* *Inherited from [SparseFilterStream](sparsefilterstream.md).[wrap](sparsefilterstream.md#wrap)* -Defined in node_modules/@types/node/base.d.ts:3699 +Defined in node_modules/@types/node/base.d.ts:5433 **Parameters:** @@ -1330,7 +1441,7 @@ Name | Type | ------ | ------ | `oldStream` | ReadableStream | -**Returns:** *Readable* +**Returns:** *this* ___ @@ -1340,7 +1451,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[listenerCount](countingwritable.md#static-listenercount)* -Defined in node_modules/@types/node/base.d.ts:680 +Defined in node_modules/@types/node/base.d.ts:895 **Parameters:** diff --git a/doc/classes/sparsestreamverifier.md b/doc/classes/sparsestreamverifier.md index 2b2ac85c..7291375b 100644 --- a/doc/classes/sparsestreamverifier.md +++ b/doc/classes/sparsestreamverifier.md @@ -49,7 +49,7 @@ \+ **new SparseStreamVerifier**(`source`: [SourceDestination](sourcedestination.md), `blocks`: [BlocksWithChecksum](../interfaces/blockswithchecksum.md)[]): *[SparseStreamVerifier](sparsestreamverifier.md)* -*Defined in [lib/source-destination/source-destination.ts:182](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L182)* +*Defined in [lib/source-destination/source-destination.ts:185](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L185)* **Parameters:** @@ -66,7 +66,7 @@ Name | Type | • **blocks**: *[BlocksWithChecksum](../interfaces/blockswithchecksum.md)[]* -*Defined in [lib/source-destination/source-destination.ts:185](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L185)* +*Defined in [lib/source-destination/source-destination.ts:188](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L188)* ___ @@ -74,7 +74,7 @@ ___ • **source**: *[SourceDestination](sourcedestination.md)* -*Defined in [lib/source-destination/source-destination.ts:184](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L184)* +*Defined in [lib/source-destination/source-destination.ts:187](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L187)* ___ @@ -84,26 +84,33 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[defaultMaxListeners](countingwritable.md#static-defaultmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:681 +Defined in node_modules/@types/node/base.d.ts:896 ## Methods ### addListener -▸ **addListener**(`event`: string | symbol, `listener`: Function): *this* +▸ **addListener**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[addListener](sourcesource.md#addlistener)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[addListener](../interfaces/sparsereadable.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:683 +Defined in node_modules/@types/node/base.d.ts:898 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -117,7 +124,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[emit](../interfaces/sparsereadable.md#emit)* -Defined in node_modules/@types/node/base.d.ts:693 +Defined in node_modules/@types/node/base.d.ts:908 **Parameters:** @@ -132,15 +139,15 @@ ___ ### eventNames -▸ **eventNames**(): *string | symbol[]* +▸ **eventNames**(): *Array‹string | symbol›* *Inherited from [CountingWritable](countingwritable.md).[eventNames](countingwritable.md#eventnames)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[eventNames](../interfaces/sparsereadable.md#eventnames)* -Defined in node_modules/@types/node/base.d.ts:694 +Defined in node_modules/@types/node/base.d.ts:909 -**Returns:** *string | symbol[]* +**Returns:** *Array‹string | symbol›* ___ @@ -152,7 +159,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[getMaxListeners](../interfaces/sparsereadable.md#getmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:691 +Defined in node_modules/@types/node/base.d.ts:906 **Returns:** *number* @@ -164,7 +171,7 @@ ___ *Inherited from [Verifier](verifier.md).[handleEventsAndPipe](verifier.md#protected-handleeventsandpipe)* -*Defined in [lib/source-destination/source-destination.ts:134](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L134)* +*Defined in [lib/source-destination/source-destination.ts:134](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L134)* **Parameters:** @@ -185,7 +192,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[listenerCount](../interfaces/sparsereadable.md#listenercount)* -Defined in node_modules/@types/node/base.d.ts:695 +Defined in node_modules/@types/node/base.d.ts:910 **Parameters:** @@ -205,7 +212,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[listeners](../interfaces/sparsereadable.md#listeners)* -Defined in node_modules/@types/node/base.d.ts:692 +Defined in node_modules/@types/node/base.d.ts:907 **Parameters:** @@ -219,20 +226,27 @@ ___ ### on -▸ **on**(`event`: string | symbol, `listener`: Function): *this* +▸ **on**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[on](sourcesource.md#on)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[on](../interfaces/sparsereadable.md#on)* -Defined in node_modules/@types/node/base.d.ts:684 +Defined in node_modules/@types/node/base.d.ts:899 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -240,20 +254,27 @@ ___ ### once -▸ **once**(`event`: string | symbol, `listener`: Function): *this* +▸ **once**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[once](sourcesource.md#once)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[once](../interfaces/sparsereadable.md#once)* -Defined in node_modules/@types/node/base.d.ts:685 +Defined in node_modules/@types/node/base.d.ts:900 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -261,20 +282,27 @@ ___ ### prependListener -▸ **prependListener**(`event`: string | symbol, `listener`: Function): *this* +▸ **prependListener**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[prependListener](sourcesource.md#prependlistener)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[prependListener](../interfaces/sparsereadable.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:686 +Defined in node_modules/@types/node/base.d.ts:901 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -282,20 +310,27 @@ ___ ### prependOnceListener -▸ **prependOnceListener**(`event`: string | symbol, `listener`: Function): *this* +▸ **prependOnceListener**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[prependOnceListener](sourcesource.md#prependoncelistener)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[prependOnceListener](../interfaces/sparsereadable.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:687 +Defined in node_modules/@types/node/base.d.ts:902 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -309,7 +344,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[removeAllListeners](../interfaces/sparsereadable.md#removealllisteners)* -Defined in node_modules/@types/node/base.d.ts:689 +Defined in node_modules/@types/node/base.d.ts:904 **Parameters:** @@ -323,20 +358,27 @@ ___ ### removeListener -▸ **removeListener**(`event`: string | symbol, `listener`: Function): *this* +▸ **removeListener**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[removeListener](sourcesource.md#removelistener)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[removeListener](../interfaces/sparsereadable.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:688 +Defined in node_modules/@types/node/base.d.ts:903 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -348,7 +390,7 @@ ___ *Overrides [Verifier](verifier.md).[run](verifier.md#abstract-run)* -*Defined in [lib/source-destination/source-destination.ts:190](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L190)* +*Defined in [lib/source-destination/source-destination.ts:193](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L193)* **Returns:** *Promise‹void›* @@ -362,7 +404,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[setMaxListeners](../interfaces/sparsereadable.md#setmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:690 +Defined in node_modules/@types/node/base.d.ts:905 **Parameters:** @@ -380,7 +422,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[listenerCount](countingwritable.md#static-listenercount)* -Defined in node_modules/@types/node/base.d.ts:680 +Defined in node_modules/@types/node/base.d.ts:895 **Parameters:** @@ -399,22 +441,22 @@ Name | Type | *Inherited from [Verifier](verifier.md).[progress](verifier.md#progress)* -*Defined in [lib/source-destination/source-destination.ts:130](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L130)* +*Defined in [lib/source-destination/source-destination.ts:130](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L130)* ### bytes • **bytes**: *number* = 0 -*Defined in [lib/source-destination/source-destination.ts:130](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L130)* +*Defined in [lib/source-destination/source-destination.ts:130](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L130)* ### position • **position**: *number* = 0 -*Defined in [lib/source-destination/source-destination.ts:130](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L130)* +*Defined in [lib/source-destination/source-destination.ts:130](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L130)* ### speed • **speed**: *number* = 0 -*Defined in [lib/source-destination/source-destination.ts:130](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L130)* +*Defined in [lib/source-destination/source-destination.ts:130](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L130)* diff --git a/doc/classes/sparsetransformstream.md b/doc/classes/sparsetransformstream.md new file mode 100644 index 00000000..e0276273 --- /dev/null +++ b/doc/classes/sparsetransformstream.md @@ -0,0 +1,1684 @@ +[etcher-sdk](../README.md) › [SparseTransformStream](sparsetransformstream.md) + +# Class: SparseTransformStream + +## Hierarchy + +* Transform + + ↳ **SparseTransformStream** + +## Implements + +* ReadableStream +* Writable +* [SparseWritable](../interfaces/sparsewritable.md) +* [SparseReadable](../interfaces/sparsereadable.md) + +## Index + +### Constructors + +* [constructor](sparsetransformstream.md#constructor) + +### Properties + +* [alignedReadableState](sparsetransformstream.md#private-alignedreadablestate) +* [blocks](sparsetransformstream.md#blocks) +* [bytesWritten](sparsetransformstream.md#byteswritten) +* [position](sparsetransformstream.md#position) +* [readable](sparsetransformstream.md#readable) +* [readableHighWaterMark](sparsetransformstream.md#readablehighwatermark) +* [writable](sparsetransformstream.md#writable) +* [writableHighWaterMark](sparsetransformstream.md#writablehighwatermark) +* [defaultMaxListeners](sparsetransformstream.md#static-defaultmaxlisteners) + +### Methods + +* [_destroy](sparsetransformstream.md#_destroy) +* [_final](sparsetransformstream.md#_final) +* [_read](sparsetransformstream.md#_read) +* [_transform](sparsetransformstream.md#_transform) +* [_write](sparsetransformstream.md#_write) +* [_writev](sparsetransformstream.md#optional-_writev) +* [addListener](sparsetransformstream.md#addlistener) +* [cork](sparsetransformstream.md#cork) +* [destroy](sparsetransformstream.md#destroy) +* [emit](sparsetransformstream.md#emit) +* [end](sparsetransformstream.md#end) +* [eventNames](sparsetransformstream.md#eventnames) +* [getMaxListeners](sparsetransformstream.md#getmaxlisteners) +* [isPaused](sparsetransformstream.md#ispaused) +* [listenerCount](sparsetransformstream.md#listenercount) +* [listeners](sparsetransformstream.md#listeners) +* [on](sparsetransformstream.md#on) +* [once](sparsetransformstream.md#once) +* [pause](sparsetransformstream.md#pause) +* [pipe](sparsetransformstream.md#pipe) +* [prependListener](sparsetransformstream.md#prependlistener) +* [prependOnceListener](sparsetransformstream.md#prependoncelistener) +* [push](sparsetransformstream.md#push) +* [read](sparsetransformstream.md#read) +* [removeAllListeners](sparsetransformstream.md#removealllisteners) +* [removeListener](sparsetransformstream.md#removelistener) +* [resume](sparsetransformstream.md#resume) +* [setDefaultEncoding](sparsetransformstream.md#setdefaultencoding) +* [setEncoding](sparsetransformstream.md#setencoding) +* [setMaxListeners](sparsetransformstream.md#setmaxlisteners) +* [uncork](sparsetransformstream.md#uncork) +* [unpipe](sparsetransformstream.md#unpipe) +* [unshift](sparsetransformstream.md#unshift) +* [wrap](sparsetransformstream.md#wrap) +* [write](sparsetransformstream.md#write) +* [listenerCount](sparsetransformstream.md#static-listenercount) + +## Constructors + +### constructor + +\+ **new SparseTransformStream**(`__namedParameters`: object): *[SparseTransformStream](sparsetransformstream.md)* + +*Overrides [SourceTransform](../interfaces/sourcetransform.md).[constructor](../interfaces/sourcetransform.md#constructor)* + +*Defined in [lib/sparse-stream/sparse-transform-stream.ts:35](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/sparse-stream/sparse-transform-stream.ts#L35)* + +**Parameters:** + +▪ **__namedParameters**: *object* + +Name | Type | Default | +------ | ------ | ------ | +`alignment` | number | - | +`blocks` | [BlocksWithChecksum](../interfaces/blockswithchecksum.md)[] | - | +`chunkSize` | number | - | +`numBuffers` | number | 2 | + +**Returns:** *[SparseTransformStream](sparsetransformstream.md)* + +## Properties + +### `Private` alignedReadableState + +• **alignedReadableState**: *[AlignedReadableState](alignedreadablestate.md)* + +*Defined in [lib/sparse-stream/sparse-transform-stream.ts:35](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/sparse-stream/sparse-transform-stream.ts#L35)* + +___ + +### blocks + +• **blocks**: *[BlocksWithChecksum](../interfaces/blockswithchecksum.md)[]* + +*Implementation of [SparseReadable](../interfaces/sparsereadable.md).[blocks](../interfaces/sparsereadable.md#blocks)* + +*Defined in [lib/sparse-stream/sparse-transform-stream.ts:32](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/sparse-stream/sparse-transform-stream.ts#L32)* + +___ + +### bytesWritten + +• **bytesWritten**: *number* = 0 + +*Defined in [lib/sparse-stream/sparse-transform-stream.ts:34](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/sparse-stream/sparse-transform-stream.ts#L34)* + +___ + +### position + +• **position**: *number* = 0 + +*Defined in [lib/sparse-stream/sparse-transform-stream.ts:33](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/sparse-stream/sparse-transform-stream.ts#L33)* + +___ + +### readable + +• **readable**: *boolean* + +*Implementation of [SparseReadable](../interfaces/sparsereadable.md).[readable](../interfaces/sparsereadable.md#readable)* + +*Inherited from [SparseFilterStream](sparsefilterstream.md).[readable](sparsefilterstream.md#readable)* + +Defined in node_modules/@types/node/base.d.ts:5422 + +___ + +### readableHighWaterMark + +• **readableHighWaterMark**: *number* + +*Inherited from [SparseFilterStream](sparsefilterstream.md).[readableHighWaterMark](sparsefilterstream.md#readablehighwatermark)* + +Defined in node_modules/@types/node/base.d.ts:5423 + +___ + +### writable + +• **writable**: *boolean* + +*Implementation of [SparseWritable](../interfaces/sparsewritable.md).[writable](../interfaces/sparsewritable.md#writable)* + +*Inherited from [SparseFilterStream](sparsefilterstream.md).[writable](sparsefilterstream.md#writable)* + +Defined in node_modules/@types/node/base.d.ts:5600 + +___ + +### writableHighWaterMark + +• **writableHighWaterMark**: *number* + +*Inherited from [SparseFilterStream](sparsefilterstream.md).[writableHighWaterMark](sparsefilterstream.md#writablehighwatermark)* + +Defined in node_modules/@types/node/base.d.ts:5601 + +___ + +### `Static` defaultMaxListeners + +▪ **defaultMaxListeners**: *number* + +*Inherited from [CountingWritable](countingwritable.md).[defaultMaxListeners](countingwritable.md#static-defaultmaxlisteners)* + +Defined in node_modules/@types/node/base.d.ts:896 + +## Methods + +### _destroy + +▸ **_destroy**(`error`: [Error](notcapable.md#static-error) | null, `callback`: function): *void* + +*Inherited from [SparseFilterStream](sparsefilterstream.md).[_destroy](sparsefilterstream.md#_destroy)* + +*Overrides [SparseReadStream](sparsereadstream.md).[_destroy](sparsereadstream.md#_destroy)* + +Defined in node_modules/@types/node/base.d.ts:5605 + +**Parameters:** + +▪ **error**: *[Error](notcapable.md#static-error) | null* + +▪ **callback**: *function* + +▸ (`error?`: [Error](notcapable.md#static-error)): *void* + +**Parameters:** + +Name | Type | +------ | ------ | +`error?` | [Error](notcapable.md#static-error) | + +**Returns:** *void* + +___ + +### _final + +▸ **_final**(`callback`: Function): *void* + +*Inherited from [SparseFilterStream](sparsefilterstream.md).[_final](sparsefilterstream.md#_final)* + +Defined in node_modules/@types/node/base.d.ts:5606 + +**Parameters:** + +Name | Type | +------ | ------ | +`callback` | Function | + +**Returns:** *void* + +___ + +### _read + +▸ **_read**(`size`: number): *void* + +*Inherited from [SparseFilterStream](sparsefilterstream.md).[_read](sparsefilterstream.md#_read)* + +Defined in node_modules/@types/node/base.d.ts:5425 + +**Parameters:** + +Name | Type | +------ | ------ | +`size` | number | + +**Returns:** *void* + +___ + +### _transform + +▸ **_transform**(`chunk`: [SparseStreamChunk](../interfaces/sparsestreamchunk.md), `_encoding`: string, `callback`: function): *Promise‹void›* + +*Overrides [SourceTransform](../interfaces/sourcetransform.md).[_transform](../interfaces/sourcetransform.md#_transform)* + +*Defined in [lib/sparse-stream/sparse-transform-stream.ts:57](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/sparse-stream/sparse-transform-stream.ts#L57)* + +**Parameters:** + +▪ **chunk**: *[SparseStreamChunk](../interfaces/sparsestreamchunk.md)* + +▪ **_encoding**: *string* + +▪ **callback**: *function* + +▸ (`error?`: [Error](notcapable.md#static-error)): *void* + +**Parameters:** + +Name | Type | +------ | ------ | +`error?` | [Error](notcapable.md#static-error) | + +**Returns:** *Promise‹void›* + +___ + +### _write + +▸ **_write**(`chunk`: any, `encoding`: string, `callback`: function): *void* + +*Inherited from [SparseFilterStream](sparsefilterstream.md).[_write](sparsefilterstream.md#_write)* + +Defined in node_modules/@types/node/base.d.ts:5603 + +**Parameters:** + +▪ **chunk**: *any* + +▪ **encoding**: *string* + +▪ **callback**: *function* + +▸ (`err?`: [Error](notcapable.md#static-error)): *void* + +**Parameters:** + +Name | Type | +------ | ------ | +`err?` | [Error](notcapable.md#static-error) | + +**Returns:** *void* + +___ + +### `Optional` _writev + +▸ **_writev**(`chunks`: Array‹object›, `callback`: function): *void* + +*Inherited from [SparseFilterStream](sparsefilterstream.md).[_writev](sparsefilterstream.md#optional-_writev)* + +Defined in node_modules/@types/node/base.d.ts:5604 + +**Parameters:** + +▪ **chunks**: *Array‹object›* + +▪ **callback**: *function* + +▸ (`err?`: [Error](notcapable.md#static-error)): *void* + +**Parameters:** + +Name | Type | +------ | ------ | +`err?` | [Error](notcapable.md#static-error) | + +**Returns:** *void* + +___ + +### addListener + +▸ **addListener**(`event`: string, `listener`: function): *this* + +*Inherited from [SparseFilterStream](sparsefilterstream.md).[addListener](sparsefilterstream.md#addlistener)* + +*Overrides [SourceSource](sourcesource.md).[addListener](sourcesource.md#addlistener)* + +Defined in node_modules/@types/node/base.d.ts:5447 + +Event emitter +The defined events on documents including: +1. close +2. data +3. end +4. readable +5. error + +**Parameters:** + +▪ **event**: *string* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* + +**Parameters:** + +Name | Type | +------ | ------ | +`...args` | any[] | + +**Returns:** *this* + +▸ **addListener**(`event`: "close", `listener`: function): *this* + +*Inherited from [SparseFilterStream](sparsefilterstream.md).[addListener](sparsefilterstream.md#addlistener)* + +*Overrides [SourceSource](sourcesource.md).[addListener](sourcesource.md#addlistener)* + +Defined in node_modules/@types/node/base.d.ts:5448 + +**Parameters:** + +▪ **event**: *"close"* + +▪ **listener**: *function* + +▸ (): *void* + +**Returns:** *this* + +▸ **addListener**(`event`: "data", `listener`: function): *this* + +*Inherited from [SparseFilterStream](sparsefilterstream.md).[addListener](sparsefilterstream.md#addlistener)* + +*Overrides [SourceSource](sourcesource.md).[addListener](sourcesource.md#addlistener)* + +Defined in node_modules/@types/node/base.d.ts:5449 + +**Parameters:** + +▪ **event**: *"data"* + +▪ **listener**: *function* + +▸ (`chunk`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string): *void* + +**Parameters:** + +Name | Type | +------ | ------ | +`chunk` | [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string | + +**Returns:** *this* + +▸ **addListener**(`event`: "end", `listener`: function): *this* + +*Inherited from [SparseFilterStream](sparsefilterstream.md).[addListener](sparsefilterstream.md#addlistener)* + +*Overrides [SourceSource](sourcesource.md).[addListener](sourcesource.md#addlistener)* + +Defined in node_modules/@types/node/base.d.ts:5450 + +**Parameters:** + +▪ **event**: *"end"* + +▪ **listener**: *function* + +▸ (): *void* + +**Returns:** *this* + +▸ **addListener**(`event`: "readable", `listener`: function): *this* + +*Inherited from [SparseFilterStream](sparsefilterstream.md).[addListener](sparsefilterstream.md#addlistener)* + +*Overrides [SourceSource](sourcesource.md).[addListener](sourcesource.md#addlistener)* + +Defined in node_modules/@types/node/base.d.ts:5451 + +**Parameters:** + +▪ **event**: *"readable"* + +▪ **listener**: *function* + +▸ (): *void* + +**Returns:** *this* + +▸ **addListener**(`event`: "error", `listener`: function): *this* + +*Inherited from [SparseFilterStream](sparsefilterstream.md).[addListener](sparsefilterstream.md#addlistener)* + +*Overrides [SourceSource](sourcesource.md).[addListener](sourcesource.md#addlistener)* + +Defined in node_modules/@types/node/base.d.ts:5452 + +**Parameters:** + +▪ **event**: *"error"* + +▪ **listener**: *function* + +▸ (`err`: [Error](notcapable.md#static-error)): *void* + +**Parameters:** + +Name | Type | +------ | ------ | +`err` | [Error](notcapable.md#static-error) | + +**Returns:** *this* + +___ + +### cork + +▸ **cork**(): *void* + +*Inherited from [SparseFilterStream](sparsefilterstream.md).[cork](sparsefilterstream.md#cork)* + +Defined in node_modules/@types/node/base.d.ts:5613 + +**Returns:** *void* + +___ + +### destroy + +▸ **destroy**(`error?`: [Error](notcapable.md#static-error)): *void* + +*Inherited from [SparseFilterStream](sparsefilterstream.md).[destroy](sparsefilterstream.md#destroy)* + +*Overrides [SparseReadStream](sparsereadstream.md).[destroy](sparsereadstream.md#destroy)* + +Defined in node_modules/@types/node/base.d.ts:5625 + +**Parameters:** + +Name | Type | +------ | ------ | +`error?` | [Error](notcapable.md#static-error) | + +**Returns:** *void* + +___ + +### emit + +▸ **emit**(`event`: string | symbol, ...`args`: any[]): *boolean* + +*Implementation of [SparseReadable](../interfaces/sparsereadable.md)* + +*Inherited from [SparseFilterStream](sparsefilterstream.md).[emit](sparsefilterstream.md#emit)* + +*Overrides [SourceSource](sourcesource.md).[emit](sourcesource.md#emit)* + +Defined in node_modules/@types/node/base.d.ts:5454 + +**Parameters:** + +Name | Type | +------ | ------ | +`event` | string | symbol | +`...args` | any[] | + +**Returns:** *boolean* + +▸ **emit**(`event`: "close"): *boolean* + +*Inherited from [SparseFilterStream](sparsefilterstream.md).[emit](sparsefilterstream.md#emit)* + +*Overrides [SourceSource](sourcesource.md).[emit](sourcesource.md#emit)* + +Defined in node_modules/@types/node/base.d.ts:5455 + +**Parameters:** + +Name | Type | +------ | ------ | +`event` | "close" | + +**Returns:** *boolean* + +▸ **emit**(`event`: "data", `chunk`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string): *boolean* + +*Inherited from [SparseFilterStream](sparsefilterstream.md).[emit](sparsefilterstream.md#emit)* + +*Overrides [SourceSource](sourcesource.md).[emit](sourcesource.md#emit)* + +Defined in node_modules/@types/node/base.d.ts:5456 + +**Parameters:** + +Name | Type | +------ | ------ | +`event` | "data" | +`chunk` | [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string | + +**Returns:** *boolean* + +▸ **emit**(`event`: "end"): *boolean* + +*Inherited from [SparseFilterStream](sparsefilterstream.md).[emit](sparsefilterstream.md#emit)* + +*Overrides [SourceSource](sourcesource.md).[emit](sourcesource.md#emit)* + +Defined in node_modules/@types/node/base.d.ts:5457 + +**Parameters:** + +Name | Type | +------ | ------ | +`event` | "end" | + +**Returns:** *boolean* + +▸ **emit**(`event`: "readable"): *boolean* + +*Inherited from [SparseFilterStream](sparsefilterstream.md).[emit](sparsefilterstream.md#emit)* + +*Overrides [SourceSource](sourcesource.md).[emit](sourcesource.md#emit)* + +Defined in node_modules/@types/node/base.d.ts:5458 + +**Parameters:** + +Name | Type | +------ | ------ | +`event` | "readable" | + +**Returns:** *boolean* + +▸ **emit**(`event`: "error", `err`: [Error](notcapable.md#static-error)): *boolean* + +*Inherited from [SparseFilterStream](sparsefilterstream.md).[emit](sparsefilterstream.md#emit)* + +*Overrides [SourceSource](sourcesource.md).[emit](sourcesource.md#emit)* + +Defined in node_modules/@types/node/base.d.ts:5459 + +**Parameters:** + +Name | Type | +------ | ------ | +`event` | "error" | +`err` | [Error](notcapable.md#static-error) | + +**Returns:** *boolean* + +___ + +### end + +▸ **end**(`cb?`: Function): *void* + +*Implementation of [SparseWritable](../interfaces/sparsewritable.md)* + +*Inherited from [SparseFilterStream](sparsefilterstream.md).[end](sparsefilterstream.md#end)* + +Defined in node_modules/@types/node/base.d.ts:5610 + +**Parameters:** + +Name | Type | +------ | ------ | +`cb?` | Function | + +**Returns:** *void* + +▸ **end**(`chunk`: any, `cb?`: Function): *void* + +*Inherited from [SparseFilterStream](sparsefilterstream.md).[end](sparsefilterstream.md#end)* + +Defined in node_modules/@types/node/base.d.ts:5611 + +**Parameters:** + +Name | Type | +------ | ------ | +`chunk` | any | +`cb?` | Function | + +**Returns:** *void* + +▸ **end**(`chunk`: any, `encoding?`: undefined | string, `cb?`: Function): *void* + +*Inherited from [SparseFilterStream](sparsefilterstream.md).[end](sparsefilterstream.md#end)* + +Defined in node_modules/@types/node/base.d.ts:5612 + +**Parameters:** + +Name | Type | +------ | ------ | +`chunk` | any | +`encoding?` | undefined | string | +`cb?` | Function | + +**Returns:** *void* + +___ + +### eventNames + +▸ **eventNames**(): *Array‹string | symbol›* + +*Implementation of [SparseReadable](../interfaces/sparsereadable.md)* + +*Inherited from [CountingWritable](countingwritable.md).[eventNames](countingwritable.md#eventnames)* + +Defined in node_modules/@types/node/base.d.ts:909 + +**Returns:** *Array‹string | symbol›* + +___ + +### getMaxListeners + +▸ **getMaxListeners**(): *number* + +*Implementation of [SparseReadable](../interfaces/sparsereadable.md)* + +*Inherited from [CountingWritable](countingwritable.md).[getMaxListeners](countingwritable.md#getmaxlisteners)* + +Defined in node_modules/@types/node/base.d.ts:906 + +**Returns:** *number* + +___ + +### isPaused + +▸ **isPaused**(): *boolean* + +*Implementation of [SparseReadable](../interfaces/sparsereadable.md)* + +*Inherited from [SparseFilterStream](sparsefilterstream.md).[isPaused](sparsefilterstream.md#ispaused)* + +Defined in node_modules/@types/node/base.d.ts:5430 + +**Returns:** *boolean* + +___ + +### listenerCount + +▸ **listenerCount**(`type`: string | symbol): *number* + +*Implementation of [SparseReadable](../interfaces/sparsereadable.md)* + +*Inherited from [CountingWritable](countingwritable.md).[listenerCount](countingwritable.md#static-listenercount)* + +Defined in node_modules/@types/node/base.d.ts:910 + +**Parameters:** + +Name | Type | +------ | ------ | +`type` | string | symbol | + +**Returns:** *number* + +___ + +### listeners + +▸ **listeners**(`event`: string | symbol): *Function[]* + +*Implementation of [SparseReadable](../interfaces/sparsereadable.md)* + +*Inherited from [CountingWritable](countingwritable.md).[listeners](countingwritable.md#listeners)* + +Defined in node_modules/@types/node/base.d.ts:907 + +**Parameters:** + +Name | Type | +------ | ------ | +`event` | string | symbol | + +**Returns:** *Function[]* + +___ + +### on + +▸ **on**(`event`: string, `listener`: function): *this* + +*Inherited from [SparseFilterStream](sparsefilterstream.md).[on](sparsefilterstream.md#on)* + +*Overrides [SourceSource](sourcesource.md).[on](sourcesource.md#on)* + +Defined in node_modules/@types/node/base.d.ts:5461 + +**Parameters:** + +▪ **event**: *string* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* + +**Parameters:** + +Name | Type | +------ | ------ | +`...args` | any[] | + +**Returns:** *this* + +▸ **on**(`event`: "close", `listener`: function): *this* + +*Inherited from [SparseFilterStream](sparsefilterstream.md).[on](sparsefilterstream.md#on)* + +*Overrides [SourceSource](sourcesource.md).[on](sourcesource.md#on)* + +Defined in node_modules/@types/node/base.d.ts:5462 + +**Parameters:** + +▪ **event**: *"close"* + +▪ **listener**: *function* + +▸ (): *void* + +**Returns:** *this* + +▸ **on**(`event`: "data", `listener`: function): *this* + +*Inherited from [SparseFilterStream](sparsefilterstream.md).[on](sparsefilterstream.md#on)* + +*Overrides [SourceSource](sourcesource.md).[on](sourcesource.md#on)* + +Defined in node_modules/@types/node/base.d.ts:5463 + +**Parameters:** + +▪ **event**: *"data"* + +▪ **listener**: *function* + +▸ (`chunk`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string): *void* + +**Parameters:** + +Name | Type | +------ | ------ | +`chunk` | [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string | + +**Returns:** *this* + +▸ **on**(`event`: "end", `listener`: function): *this* + +*Inherited from [SparseFilterStream](sparsefilterstream.md).[on](sparsefilterstream.md#on)* + +*Overrides [SourceSource](sourcesource.md).[on](sourcesource.md#on)* + +Defined in node_modules/@types/node/base.d.ts:5464 + +**Parameters:** + +▪ **event**: *"end"* + +▪ **listener**: *function* + +▸ (): *void* + +**Returns:** *this* + +▸ **on**(`event`: "readable", `listener`: function): *this* + +*Inherited from [SparseFilterStream](sparsefilterstream.md).[on](sparsefilterstream.md#on)* + +*Overrides [SourceSource](sourcesource.md).[on](sourcesource.md#on)* + +Defined in node_modules/@types/node/base.d.ts:5465 + +**Parameters:** + +▪ **event**: *"readable"* + +▪ **listener**: *function* + +▸ (): *void* + +**Returns:** *this* + +▸ **on**(`event`: "error", `listener`: function): *this* + +*Inherited from [SparseFilterStream](sparsefilterstream.md).[on](sparsefilterstream.md#on)* + +*Overrides [SourceSource](sourcesource.md).[on](sourcesource.md#on)* + +Defined in node_modules/@types/node/base.d.ts:5466 + +**Parameters:** + +▪ **event**: *"error"* + +▪ **listener**: *function* + +▸ (`err`: [Error](notcapable.md#static-error)): *void* + +**Parameters:** + +Name | Type | +------ | ------ | +`err` | [Error](notcapable.md#static-error) | + +**Returns:** *this* + +___ + +### once + +▸ **once**(`event`: string, `listener`: function): *this* + +*Inherited from [SparseFilterStream](sparsefilterstream.md).[once](sparsefilterstream.md#once)* + +*Overrides [SourceSource](sourcesource.md).[once](sourcesource.md#once)* + +Defined in node_modules/@types/node/base.d.ts:5468 + +**Parameters:** + +▪ **event**: *string* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* + +**Parameters:** + +Name | Type | +------ | ------ | +`...args` | any[] | + +**Returns:** *this* + +▸ **once**(`event`: "close", `listener`: function): *this* + +*Inherited from [SparseFilterStream](sparsefilterstream.md).[once](sparsefilterstream.md#once)* + +*Overrides [SourceSource](sourcesource.md).[once](sourcesource.md#once)* + +Defined in node_modules/@types/node/base.d.ts:5469 + +**Parameters:** + +▪ **event**: *"close"* + +▪ **listener**: *function* + +▸ (): *void* + +**Returns:** *this* + +▸ **once**(`event`: "data", `listener`: function): *this* + +*Inherited from [SparseFilterStream](sparsefilterstream.md).[once](sparsefilterstream.md#once)* + +*Overrides [SourceSource](sourcesource.md).[once](sourcesource.md#once)* + +Defined in node_modules/@types/node/base.d.ts:5470 + +**Parameters:** + +▪ **event**: *"data"* + +▪ **listener**: *function* + +▸ (`chunk`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string): *void* + +**Parameters:** + +Name | Type | +------ | ------ | +`chunk` | [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string | + +**Returns:** *this* + +▸ **once**(`event`: "end", `listener`: function): *this* + +*Inherited from [SparseFilterStream](sparsefilterstream.md).[once](sparsefilterstream.md#once)* + +*Overrides [SourceSource](sourcesource.md).[once](sourcesource.md#once)* + +Defined in node_modules/@types/node/base.d.ts:5471 + +**Parameters:** + +▪ **event**: *"end"* + +▪ **listener**: *function* + +▸ (): *void* + +**Returns:** *this* + +▸ **once**(`event`: "readable", `listener`: function): *this* + +*Inherited from [SparseFilterStream](sparsefilterstream.md).[once](sparsefilterstream.md#once)* + +*Overrides [SourceSource](sourcesource.md).[once](sourcesource.md#once)* + +Defined in node_modules/@types/node/base.d.ts:5472 + +**Parameters:** + +▪ **event**: *"readable"* + +▪ **listener**: *function* + +▸ (): *void* + +**Returns:** *this* + +▸ **once**(`event`: "error", `listener`: function): *this* + +*Inherited from [SparseFilterStream](sparsefilterstream.md).[once](sparsefilterstream.md#once)* + +*Overrides [SourceSource](sourcesource.md).[once](sourcesource.md#once)* + +Defined in node_modules/@types/node/base.d.ts:5473 + +**Parameters:** + +▪ **event**: *"error"* + +▪ **listener**: *function* + +▸ (`err`: [Error](notcapable.md#static-error)): *void* + +**Parameters:** + +Name | Type | +------ | ------ | +`err` | [Error](notcapable.md#static-error) | + +**Returns:** *this* + +___ + +### pause + +▸ **pause**(): *this* + +*Implementation of [SparseReadable](../interfaces/sparsereadable.md)* + +*Inherited from [SparseFilterStream](sparsefilterstream.md).[pause](sparsefilterstream.md#pause)* + +Defined in node_modules/@types/node/base.d.ts:5428 + +**Returns:** *this* + +___ + +### pipe + +▸ **pipe**<**T**>(`destination`: T, `options?`: undefined | object): *T* + +*Inherited from [CountingWritable](countingwritable.md).[pipe](countingwritable.md#pipe)* + +Defined in node_modules/@types/node/base.d.ts:5407 + +**Type parameters:** + +▪ **T**: *WritableStream* + +**Parameters:** + +Name | Type | +------ | ------ | +`destination` | T | +`options?` | undefined | object | + +**Returns:** *T* + +___ + +### prependListener + +▸ **prependListener**(`event`: string, `listener`: function): *this* + +*Inherited from [SparseFilterStream](sparsefilterstream.md).[prependListener](sparsefilterstream.md#prependlistener)* + +*Overrides [SourceSource](sourcesource.md).[prependListener](sourcesource.md#prependlistener)* + +Defined in node_modules/@types/node/base.d.ts:5475 + +**Parameters:** + +▪ **event**: *string* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* + +**Parameters:** + +Name | Type | +------ | ------ | +`...args` | any[] | + +**Returns:** *this* + +▸ **prependListener**(`event`: "close", `listener`: function): *this* + +*Inherited from [SparseFilterStream](sparsefilterstream.md).[prependListener](sparsefilterstream.md#prependlistener)* + +*Overrides [SourceSource](sourcesource.md).[prependListener](sourcesource.md#prependlistener)* + +Defined in node_modules/@types/node/base.d.ts:5476 + +**Parameters:** + +▪ **event**: *"close"* + +▪ **listener**: *function* + +▸ (): *void* + +**Returns:** *this* + +▸ **prependListener**(`event`: "data", `listener`: function): *this* + +*Inherited from [SparseFilterStream](sparsefilterstream.md).[prependListener](sparsefilterstream.md#prependlistener)* + +*Overrides [SourceSource](sourcesource.md).[prependListener](sourcesource.md#prependlistener)* + +Defined in node_modules/@types/node/base.d.ts:5477 + +**Parameters:** + +▪ **event**: *"data"* + +▪ **listener**: *function* + +▸ (`chunk`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string): *void* + +**Parameters:** + +Name | Type | +------ | ------ | +`chunk` | [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string | + +**Returns:** *this* + +▸ **prependListener**(`event`: "end", `listener`: function): *this* + +*Inherited from [SparseFilterStream](sparsefilterstream.md).[prependListener](sparsefilterstream.md#prependlistener)* + +*Overrides [SourceSource](sourcesource.md).[prependListener](sourcesource.md#prependlistener)* + +Defined in node_modules/@types/node/base.d.ts:5478 + +**Parameters:** + +▪ **event**: *"end"* + +▪ **listener**: *function* + +▸ (): *void* + +**Returns:** *this* + +▸ **prependListener**(`event`: "readable", `listener`: function): *this* + +*Inherited from [SparseFilterStream](sparsefilterstream.md).[prependListener](sparsefilterstream.md#prependlistener)* + +*Overrides [SourceSource](sourcesource.md).[prependListener](sourcesource.md#prependlistener)* + +Defined in node_modules/@types/node/base.d.ts:5479 + +**Parameters:** + +▪ **event**: *"readable"* + +▪ **listener**: *function* + +▸ (): *void* + +**Returns:** *this* + +▸ **prependListener**(`event`: "error", `listener`: function): *this* + +*Inherited from [SparseFilterStream](sparsefilterstream.md).[prependListener](sparsefilterstream.md#prependlistener)* + +*Overrides [SourceSource](sourcesource.md).[prependListener](sourcesource.md#prependlistener)* + +Defined in node_modules/@types/node/base.d.ts:5480 + +**Parameters:** + +▪ **event**: *"error"* + +▪ **listener**: *function* + +▸ (`err`: [Error](notcapable.md#static-error)): *void* + +**Parameters:** + +Name | Type | +------ | ------ | +`err` | [Error](notcapable.md#static-error) | + +**Returns:** *this* + +___ + +### prependOnceListener + +▸ **prependOnceListener**(`event`: string, `listener`: function): *this* + +*Inherited from [SparseFilterStream](sparsefilterstream.md).[prependOnceListener](sparsefilterstream.md#prependoncelistener)* + +*Overrides [SourceSource](sourcesource.md).[prependOnceListener](sourcesource.md#prependoncelistener)* + +Defined in node_modules/@types/node/base.d.ts:5482 + +**Parameters:** + +▪ **event**: *string* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* + +**Parameters:** + +Name | Type | +------ | ------ | +`...args` | any[] | + +**Returns:** *this* + +▸ **prependOnceListener**(`event`: "close", `listener`: function): *this* + +*Inherited from [SparseFilterStream](sparsefilterstream.md).[prependOnceListener](sparsefilterstream.md#prependoncelistener)* + +*Overrides [SourceSource](sourcesource.md).[prependOnceListener](sourcesource.md#prependoncelistener)* + +Defined in node_modules/@types/node/base.d.ts:5483 + +**Parameters:** + +▪ **event**: *"close"* + +▪ **listener**: *function* + +▸ (): *void* + +**Returns:** *this* + +▸ **prependOnceListener**(`event`: "data", `listener`: function): *this* + +*Inherited from [SparseFilterStream](sparsefilterstream.md).[prependOnceListener](sparsefilterstream.md#prependoncelistener)* + +*Overrides [SourceSource](sourcesource.md).[prependOnceListener](sourcesource.md#prependoncelistener)* + +Defined in node_modules/@types/node/base.d.ts:5484 + +**Parameters:** + +▪ **event**: *"data"* + +▪ **listener**: *function* + +▸ (`chunk`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string): *void* + +**Parameters:** + +Name | Type | +------ | ------ | +`chunk` | [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string | + +**Returns:** *this* + +▸ **prependOnceListener**(`event`: "end", `listener`: function): *this* + +*Inherited from [SparseFilterStream](sparsefilterstream.md).[prependOnceListener](sparsefilterstream.md#prependoncelistener)* + +*Overrides [SourceSource](sourcesource.md).[prependOnceListener](sourcesource.md#prependoncelistener)* + +Defined in node_modules/@types/node/base.d.ts:5485 + +**Parameters:** + +▪ **event**: *"end"* + +▪ **listener**: *function* + +▸ (): *void* + +**Returns:** *this* + +▸ **prependOnceListener**(`event`: "readable", `listener`: function): *this* + +*Inherited from [SparseFilterStream](sparsefilterstream.md).[prependOnceListener](sparsefilterstream.md#prependoncelistener)* + +*Overrides [SourceSource](sourcesource.md).[prependOnceListener](sourcesource.md#prependoncelistener)* + +Defined in node_modules/@types/node/base.d.ts:5486 + +**Parameters:** + +▪ **event**: *"readable"* + +▪ **listener**: *function* + +▸ (): *void* + +**Returns:** *this* + +▸ **prependOnceListener**(`event`: "error", `listener`: function): *this* + +*Inherited from [SparseFilterStream](sparsefilterstream.md).[prependOnceListener](sparsefilterstream.md#prependoncelistener)* + +*Overrides [SourceSource](sourcesource.md).[prependOnceListener](sourcesource.md#prependoncelistener)* + +Defined in node_modules/@types/node/base.d.ts:5487 + +**Parameters:** + +▪ **event**: *"error"* + +▪ **listener**: *function* + +▸ (`err`: [Error](notcapable.md#static-error)): *void* + +**Parameters:** + +Name | Type | +------ | ------ | +`err` | [Error](notcapable.md#static-error) | + +**Returns:** *this* + +___ + +### push + +▸ **push**(`chunk`: any, `encoding?`: undefined | string): *boolean* + +*Inherited from [SparseFilterStream](sparsefilterstream.md).[push](sparsefilterstream.md#push)* + +Defined in node_modules/@types/node/base.d.ts:5434 + +**Parameters:** + +Name | Type | +------ | ------ | +`chunk` | any | +`encoding?` | undefined | string | + +**Returns:** *boolean* + +___ + +### read + +▸ **read**(`size?`: undefined | number): *any* + +*Implementation of [SparseReadable](../interfaces/sparsereadable.md)* + +*Inherited from [SparseFilterStream](sparsefilterstream.md).[read](sparsefilterstream.md#read)* + +Defined in node_modules/@types/node/base.d.ts:5426 + +**Parameters:** + +Name | Type | +------ | ------ | +`size?` | undefined | number | + +**Returns:** *any* + +___ + +### removeAllListeners + +▸ **removeAllListeners**(`event?`: string | symbol): *this* + +*Implementation of [SparseReadable](../interfaces/sparsereadable.md)* + +*Inherited from [CountingWritable](countingwritable.md).[removeAllListeners](countingwritable.md#removealllisteners)* + +Defined in node_modules/@types/node/base.d.ts:904 + +**Parameters:** + +Name | Type | +------ | ------ | +`event?` | string | symbol | + +**Returns:** *this* + +___ + +### removeListener + +▸ **removeListener**(`event`: string, `listener`: function): *this* + +*Inherited from [SparseFilterStream](sparsefilterstream.md).[removeListener](sparsefilterstream.md#removelistener)* + +*Overrides [SourceSource](sourcesource.md).[removeListener](sourcesource.md#removelistener)* + +Defined in node_modules/@types/node/base.d.ts:5489 + +**Parameters:** + +▪ **event**: *string* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* + +**Parameters:** + +Name | Type | +------ | ------ | +`...args` | any[] | + +**Returns:** *this* + +▸ **removeListener**(`event`: "close", `listener`: function): *this* + +*Inherited from [SparseFilterStream](sparsefilterstream.md).[removeListener](sparsefilterstream.md#removelistener)* + +*Overrides [SourceSource](sourcesource.md).[removeListener](sourcesource.md#removelistener)* + +Defined in node_modules/@types/node/base.d.ts:5490 + +**Parameters:** + +▪ **event**: *"close"* + +▪ **listener**: *function* + +▸ (): *void* + +**Returns:** *this* + +▸ **removeListener**(`event`: "data", `listener`: function): *this* + +*Inherited from [SparseFilterStream](sparsefilterstream.md).[removeListener](sparsefilterstream.md#removelistener)* + +*Overrides [SourceSource](sourcesource.md).[removeListener](sourcesource.md#removelistener)* + +Defined in node_modules/@types/node/base.d.ts:5491 + +**Parameters:** + +▪ **event**: *"data"* + +▪ **listener**: *function* + +▸ (`chunk`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string): *void* + +**Parameters:** + +Name | Type | +------ | ------ | +`chunk` | [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string | + +**Returns:** *this* + +▸ **removeListener**(`event`: "end", `listener`: function): *this* + +*Inherited from [SparseFilterStream](sparsefilterstream.md).[removeListener](sparsefilterstream.md#removelistener)* + +*Overrides [SourceSource](sourcesource.md).[removeListener](sourcesource.md#removelistener)* + +Defined in node_modules/@types/node/base.d.ts:5492 + +**Parameters:** + +▪ **event**: *"end"* + +▪ **listener**: *function* + +▸ (): *void* + +**Returns:** *this* + +▸ **removeListener**(`event`: "readable", `listener`: function): *this* + +*Inherited from [SparseFilterStream](sparsefilterstream.md).[removeListener](sparsefilterstream.md#removelistener)* + +*Overrides [SourceSource](sourcesource.md).[removeListener](sourcesource.md#removelistener)* + +Defined in node_modules/@types/node/base.d.ts:5493 + +**Parameters:** + +▪ **event**: *"readable"* + +▪ **listener**: *function* + +▸ (): *void* + +**Returns:** *this* + +▸ **removeListener**(`event`: "error", `listener`: function): *this* + +*Inherited from [SparseFilterStream](sparsefilterstream.md).[removeListener](sparsefilterstream.md#removelistener)* + +*Overrides [SourceSource](sourcesource.md).[removeListener](sourcesource.md#removelistener)* + +Defined in node_modules/@types/node/base.d.ts:5494 + +**Parameters:** + +▪ **event**: *"error"* + +▪ **listener**: *function* + +▸ (`err`: [Error](notcapable.md#static-error)): *void* + +**Parameters:** + +Name | Type | +------ | ------ | +`err` | [Error](notcapable.md#static-error) | + +**Returns:** *this* + +___ + +### resume + +▸ **resume**(): *this* + +*Implementation of [SparseReadable](../interfaces/sparsereadable.md)* + +*Inherited from [SparseFilterStream](sparsefilterstream.md).[resume](sparsefilterstream.md#resume)* + +Defined in node_modules/@types/node/base.d.ts:5429 + +**Returns:** *this* + +___ + +### setDefaultEncoding + +▸ **setDefaultEncoding**(`encoding`: string): *this* + +*Inherited from [SparseFilterStream](sparsefilterstream.md).[setDefaultEncoding](sparsefilterstream.md#setdefaultencoding)* + +Defined in node_modules/@types/node/base.d.ts:5609 + +**Parameters:** + +Name | Type | +------ | ------ | +`encoding` | string | + +**Returns:** *this* + +___ + +### setEncoding + +▸ **setEncoding**(`encoding`: string): *this* + +*Implementation of [SparseReadable](../interfaces/sparsereadable.md)* + +*Inherited from [SparseFilterStream](sparsefilterstream.md).[setEncoding](sparsefilterstream.md#setencoding)* + +Defined in node_modules/@types/node/base.d.ts:5427 + +**Parameters:** + +Name | Type | +------ | ------ | +`encoding` | string | + +**Returns:** *this* + +___ + +### setMaxListeners + +▸ **setMaxListeners**(`n`: number): *this* + +*Implementation of [SparseReadable](../interfaces/sparsereadable.md)* + +*Inherited from [CountingWritable](countingwritable.md).[setMaxListeners](countingwritable.md#setmaxlisteners)* + +Defined in node_modules/@types/node/base.d.ts:905 + +**Parameters:** + +Name | Type | +------ | ------ | +`n` | number | + +**Returns:** *this* + +___ + +### uncork + +▸ **uncork**(): *void* + +*Inherited from [SparseFilterStream](sparsefilterstream.md).[uncork](sparsefilterstream.md#uncork)* + +Defined in node_modules/@types/node/base.d.ts:5614 + +**Returns:** *void* + +___ + +### unpipe + +▸ **unpipe**<**T**>(`destination?`: T): *this* + +*Implementation of [SparseReadable](../interfaces/sparsereadable.md)* + +*Inherited from [SparseFilterStream](sparsefilterstream.md).[unpipe](sparsefilterstream.md#unpipe)* + +Defined in node_modules/@types/node/base.d.ts:5431 + +**Type parameters:** + +▪ **T**: *WritableStream* + +**Parameters:** + +Name | Type | +------ | ------ | +`destination?` | T | + +**Returns:** *this* + +___ + +### unshift + +▸ **unshift**(`chunk`: any): *void* + +*Inherited from [SparseFilterStream](sparsefilterstream.md).[unshift](sparsefilterstream.md#unshift)* + +Defined in node_modules/@types/node/base.d.ts:5432 + +**Parameters:** + +Name | Type | +------ | ------ | +`chunk` | any | + +**Returns:** *void* + +___ + +### wrap + +▸ **wrap**(`oldStream`: ReadableStream): *this* + +*Implementation of [SparseReadable](../interfaces/sparsereadable.md)* + +*Inherited from [SparseFilterStream](sparsefilterstream.md).[wrap](sparsefilterstream.md#wrap)* + +Defined in node_modules/@types/node/base.d.ts:5433 + +**Parameters:** + +Name | Type | +------ | ------ | +`oldStream` | ReadableStream | + +**Returns:** *this* + +___ + +### write + +▸ **write**(`chunk`: any, `cb?`: Function): *boolean* + +*Inherited from [SparseFilterStream](sparsefilterstream.md).[write](sparsefilterstream.md#write)* + +Defined in node_modules/@types/node/base.d.ts:5607 + +**Parameters:** + +Name | Type | +------ | ------ | +`chunk` | any | +`cb?` | Function | + +**Returns:** *boolean* + +▸ **write**(`chunk`: any, `encoding?`: undefined | string, `cb?`: Function): *boolean* + +*Inherited from [SparseFilterStream](sparsefilterstream.md).[write](sparsefilterstream.md#write)* + +Defined in node_modules/@types/node/base.d.ts:5608 + +**Parameters:** + +Name | Type | +------ | ------ | +`chunk` | any | +`encoding?` | undefined | string | +`cb?` | Function | + +**Returns:** *boolean* + +___ + +### `Static` listenerCount + +▸ **listenerCount**(`emitter`: EventEmitter, `event`: string | symbol): *number* + +*Inherited from [CountingWritable](countingwritable.md).[listenerCount](countingwritable.md#static-listenercount)* + +Defined in node_modules/@types/node/base.d.ts:895 + +**Parameters:** + +Name | Type | +------ | ------ | +`emitter` | EventEmitter | +`event` | string | symbol | + +**Returns:** *number* diff --git a/doc/classes/sparsewritestream.md b/doc/classes/sparsewritestream.md index a71b04b7..fb4a9c21 100644 --- a/doc/classes/sparsewritestream.md +++ b/doc/classes/sparsewritestream.md @@ -28,15 +28,20 @@ * [maxRetries](sparsewritestream.md#private-maxretries) * [position](sparsewritestream.md#position) * [writable](sparsewritestream.md#writable) +* [writableHighWaterMark](sparsewritestream.md#writablehighwatermark) * [defaultMaxListeners](sparsewritestream.md#static-defaultmaxlisteners) ### Methods * [__final](sparsewritestream.md#private-__final) * [__write](sparsewritestream.md#private-__write) +* [_destroy](sparsewritestream.md#_destroy) * [_final](sparsewritestream.md#_final) * [_write](sparsewritestream.md#_write) +* [_writev](sparsewritestream.md#optional-_writev) * [addListener](sparsewritestream.md#addlistener) +* [copyChunk](sparsewritestream.md#private-copychunk) +* [cork](sparsewritestream.md#cork) * [destroy](sparsewritestream.md#destroy) * [emit](sparsewritestream.md#emit) * [end](sparsewritestream.md#end) @@ -53,6 +58,7 @@ * [removeListener](sparsewritestream.md#removelistener) * [setDefaultEncoding](sparsewritestream.md#setdefaultencoding) * [setMaxListeners](sparsewritestream.md#setmaxlisteners) +* [uncork](sparsewritestream.md#uncork) * [write](sparsewritestream.md#write) * [writeChunk](sparsewritestream.md#private-writechunk) * [listenerCount](sparsewritestream.md#static-listenercount) @@ -61,18 +67,21 @@ ### constructor -\+ **new SparseWriteStream**(`destination`: [SourceDestination](sourcedestination.md), `firstBytesToKeep`: number, `maxRetries`: number): *[SparseWriteStream](sparsewritestream.md)* +\+ **new SparseWriteStream**(`__namedParameters`: object): *[SparseWriteStream](sparsewritestream.md)* *Overrides [CountingWritable](countingwritable.md).[constructor](countingwritable.md#constructor)* -*Defined in [lib/sparse-stream/sparse-write-stream.ts:22](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/sparse-stream/sparse-write-stream.ts#L22)* +*Defined in [lib/sparse-stream/sparse-write-stream.ts:19](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/sparse-stream/sparse-write-stream.ts#L19)* **Parameters:** +▪ **__namedParameters**: *object* + Name | Type | Default | ------ | ------ | ------ | -`destination` | [SourceDestination](sourcedestination.md) | - | +`destination` | [SourceDestination](sourcedestination.md)‹› | - | `firstBytesToKeep` | number | 0 | +`highWaterMark` | undefined | number | - | `maxRetries` | number | 5 | **Returns:** *[SparseWriteStream](sparsewritestream.md)* @@ -83,7 +92,7 @@ Name | Type | Default | • **_firstChunks**: *[SparseStreamChunk](../interfaces/sparsestreamchunk.md)[]* = [] -*Defined in [lib/sparse-stream/sparse-write-stream.ts:22](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/sparse-stream/sparse-write-stream.ts#L22)* +*Defined in [lib/sparse-stream/sparse-write-stream.ts:19](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/sparse-stream/sparse-write-stream.ts#L19)* ___ @@ -91,7 +100,7 @@ ___ • **bytesWritten**: *number* = 0 -*Defined in [lib/sparse-stream/sparse-write-stream.ts:21](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/sparse-stream/sparse-write-stream.ts#L21)* +*Defined in [lib/sparse-stream/sparse-write-stream.ts:18](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/sparse-stream/sparse-write-stream.ts#L18)* ___ @@ -99,7 +108,7 @@ ___ • **destination**: *[SourceDestination](sourcedestination.md)* -*Defined in [lib/sparse-stream/sparse-write-stream.ts:25](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/sparse-stream/sparse-write-stream.ts#L25)* +*Defined in [lib/sparse-stream/sparse-write-stream.ts:14](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/sparse-stream/sparse-write-stream.ts#L14)* ___ @@ -107,7 +116,7 @@ ___ • **firstBytesToKeep**: *number* -*Defined in [lib/sparse-stream/sparse-write-stream.ts:26](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/sparse-stream/sparse-write-stream.ts#L26)* +*Defined in [lib/sparse-stream/sparse-write-stream.ts:15](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/sparse-stream/sparse-write-stream.ts#L15)* ___ @@ -115,7 +124,7 @@ ___ • **maxRetries**: *number* -*Defined in [lib/sparse-stream/sparse-write-stream.ts:27](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/sparse-stream/sparse-write-stream.ts#L27)* +*Defined in [lib/sparse-stream/sparse-write-stream.ts:16](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/sparse-stream/sparse-write-stream.ts#L16)* ___ @@ -123,7 +132,7 @@ ___ • **position**: *number* -*Defined in [lib/sparse-stream/sparse-write-stream.ts:20](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/sparse-stream/sparse-write-stream.ts#L20)* +*Defined in [lib/sparse-stream/sparse-write-stream.ts:17](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/sparse-stream/sparse-write-stream.ts#L17)* ___ @@ -135,7 +144,17 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[writable](countingwritable.md#writable)* -Defined in node_modules/@types/node/base.d.ts:3770 +Defined in node_modules/@types/node/base.d.ts:5508 + +___ + +### writableHighWaterMark + +• **writableHighWaterMark**: *number* + +*Inherited from [CountingWritable](countingwritable.md).[writableHighWaterMark](countingwritable.md#writablehighwatermark)* + +Defined in node_modules/@types/node/base.d.ts:5509 ___ @@ -145,7 +164,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[defaultMaxListeners](countingwritable.md#static-defaultmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:681 +Defined in node_modules/@types/node/base.d.ts:896 ## Methods @@ -153,7 +172,7 @@ Defined in node_modules/@types/node/base.d.ts:681 ▸ **__final**(): *Promise‹void›* -*Defined in [lib/sparse-stream/sparse-write-stream.ts:101](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/sparse-stream/sparse-write-stream.ts#L101)* +*Defined in [lib/sparse-stream/sparse-write-stream.ts:129](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/sparse-stream/sparse-write-stream.ts#L129)* **Returns:** *Promise‹void›* @@ -163,7 +182,7 @@ ___ ▸ **__write**(`chunk`: [SparseStreamChunk](../interfaces/sparsestreamchunk.md)): *Promise‹void›* -*Defined in [lib/sparse-stream/sparse-write-stream.ts:65](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/sparse-stream/sparse-write-stream.ts#L65)* +*Defined in [lib/sparse-stream/sparse-write-stream.ts:84](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/sparse-stream/sparse-write-stream.ts#L84)* **Parameters:** @@ -175,11 +194,39 @@ Name | Type | ___ +### _destroy + +▸ **_destroy**(`error`: [Error](notcapable.md#static-error) | null, `callback`: function): *void* + +*Inherited from [CountingWritable](countingwritable.md).[_destroy](countingwritable.md#_destroy)* + +Defined in node_modules/@types/node/base.d.ts:5513 + +**Parameters:** + +▪ **error**: *[Error](notcapable.md#static-error) | null* + +▪ **callback**: *function* + +▸ (`error?`: [Error](notcapable.md#static-error)): *void* + +**Parameters:** + +Name | Type | +------ | ------ | +`error?` | [Error](notcapable.md#static-error) | + +**Returns:** *void* + +___ + ### _final ▸ **_final**(`callback`: function): *void* -*Defined in [lib/sparse-stream/sparse-write-stream.ts:115](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/sparse-stream/sparse-write-stream.ts#L115)* +*Overrides [CountingWritable](countingwritable.md).[_final](countingwritable.md#_final)* + +*Defined in [lib/sparse-stream/sparse-write-stream.ts:143](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/sparse-stream/sparse-write-stream.ts#L143)* **`summary`** Write buffered data before a stream ends, called by stream internals @@ -205,7 +252,7 @@ ___ *Overrides void* -*Defined in [lib/sparse-stream/sparse-write-stream.ts:93](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/sparse-stream/sparse-write-stream.ts#L93)* +*Defined in [lib/sparse-stream/sparse-write-stream.ts:121](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/sparse-stream/sparse-write-stream.ts#L121)* **Parameters:** @@ -227,31 +274,64 @@ Name | Type | ___ +### `Optional` _writev + +▸ **_writev**(`chunks`: Array‹object›, `callback`: function): *void* + +*Inherited from [CountingWritable](countingwritable.md).[_writev](countingwritable.md#optional-_writev)* + +Defined in node_modules/@types/node/base.d.ts:5512 + +**Parameters:** + +▪ **chunks**: *Array‹object›* + +▪ **callback**: *function* + +▸ (`err?`: [Error](notcapable.md#static-error)): *void* + +**Parameters:** + +Name | Type | +------ | ------ | +`err?` | [Error](notcapable.md#static-error) | + +**Returns:** *void* + +___ + ### addListener -▸ **addListener**(`event`: string, `listener`: Function): *this* +▸ **addListener**(`event`: string, `listener`: function): *this* *Inherited from [CountingWritable](countingwritable.md).[addListener](countingwritable.md#addlistener)* *Overrides [SourceSource](sourcesource.md).[addListener](sourcesource.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:3790 +Defined in node_modules/@types/node/base.d.ts:5535 Event emitter The defined events on documents including: - 1. close - 2. drain - 3. error - 4. finish - 5. pipe - 6. unpipe +1. close +2. drain +3. error +4. finish +5. pipe +6. unpipe + +**Parameters:** + +▪ **event**: *string* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -261,7 +341,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[addListener](sourcesource.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:3791 +Defined in node_modules/@types/node/base.d.ts:5536 **Parameters:** @@ -279,7 +359,7 @@ Defined in node_modules/@types/node/base.d.ts:3791 *Overrides [SourceSource](sourcesource.md).[addListener](sourcesource.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:3792 +Defined in node_modules/@types/node/base.d.ts:5537 **Parameters:** @@ -297,7 +377,7 @@ Defined in node_modules/@types/node/base.d.ts:3792 *Overrides [SourceSource](sourcesource.md).[addListener](sourcesource.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:3793 +Defined in node_modules/@types/node/base.d.ts:5538 **Parameters:** @@ -321,7 +401,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[addListener](sourcesource.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:3794 +Defined in node_modules/@types/node/base.d.ts:5539 **Parameters:** @@ -339,7 +419,7 @@ Defined in node_modules/@types/node/base.d.ts:3794 *Overrides [SourceSource](sourcesource.md).[addListener](sourcesource.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:3795 +Defined in node_modules/@types/node/base.d.ts:5540 **Parameters:** @@ -363,7 +443,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[addListener](sourcesource.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:3796 +Defined in node_modules/@types/node/base.d.ts:5541 **Parameters:** @@ -383,13 +463,41 @@ Name | Type | ___ +### `Private` copyChunk + +▸ **copyChunk**(`chunk`: [SparseStreamChunk](../interfaces/sparsestreamchunk.md)): *[SparseStreamChunk](../interfaces/sparsestreamchunk.md)* + +*Defined in [lib/sparse-stream/sparse-write-stream.ts:71](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/sparse-stream/sparse-write-stream.ts#L71)* + +**Parameters:** + +Name | Type | +------ | ------ | +`chunk` | [SparseStreamChunk](../interfaces/sparsestreamchunk.md) | + +**Returns:** *[SparseStreamChunk](../interfaces/sparsestreamchunk.md)* + +___ + +### cork + +▸ **cork**(): *void* + +*Inherited from [CountingWritable](countingwritable.md).[cork](countingwritable.md#cork)* + +Defined in node_modules/@types/node/base.d.ts:5521 + +**Returns:** *void* + +___ + ### destroy -▸ **destroy**(`error?`: [Error](notcapable.md#static-error)): *this* +▸ **destroy**(`error?`: [Error](notcapable.md#static-error)): *void* -*Inherited from [SparseWriteStream](sparsewritestream.md).[destroy](sparsewritestream.md#destroy)* +*Inherited from [CountingWritable](countingwritable.md).[destroy](countingwritable.md#destroy)* -*Defined in [typings/readable-stream/index.d.ts:18](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/typings/readable-stream/index.d.ts#L18)* +Defined in node_modules/@types/node/base.d.ts:5523 **Parameters:** @@ -397,7 +505,7 @@ Name | Type | ------ | ------ | `error?` | [Error](notcapable.md#static-error) | -**Returns:** *this* +**Returns:** *void* ___ @@ -411,7 +519,7 @@ ___ *Overrides [SourceSource](sourcesource.md).[emit](sourcesource.md#emit)* -Defined in node_modules/@types/node/base.d.ts:3798 +Defined in node_modules/@types/node/base.d.ts:5543 **Parameters:** @@ -428,7 +536,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[emit](sourcesource.md#emit)* -Defined in node_modules/@types/node/base.d.ts:3799 +Defined in node_modules/@types/node/base.d.ts:5544 **Parameters:** @@ -438,20 +546,20 @@ Name | Type | **Returns:** *boolean* -▸ **emit**(`event`: "drain", `chunk`: Buffer | string): *boolean* +▸ **emit**(`event`: "drain", `chunk`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string): *boolean* *Inherited from [CountingWritable](countingwritable.md).[emit](countingwritable.md#emit)* *Overrides [SourceSource](sourcesource.md).[emit](sourcesource.md#emit)* -Defined in node_modules/@types/node/base.d.ts:3800 +Defined in node_modules/@types/node/base.d.ts:5545 **Parameters:** Name | Type | ------ | ------ | `event` | "drain" | -`chunk` | Buffer | string | +`chunk` | [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string | **Returns:** *boolean* @@ -461,7 +569,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[emit](sourcesource.md#emit)* -Defined in node_modules/@types/node/base.d.ts:3801 +Defined in node_modules/@types/node/base.d.ts:5546 **Parameters:** @@ -478,7 +586,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[emit](sourcesource.md#emit)* -Defined in node_modules/@types/node/base.d.ts:3802 +Defined in node_modules/@types/node/base.d.ts:5547 **Parameters:** @@ -494,7 +602,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[emit](sourcesource.md#emit)* -Defined in node_modules/@types/node/base.d.ts:3803 +Defined in node_modules/@types/node/base.d.ts:5548 **Parameters:** @@ -511,7 +619,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[emit](sourcesource.md#emit)* -Defined in node_modules/@types/node/base.d.ts:3804 +Defined in node_modules/@types/node/base.d.ts:5549 **Parameters:** @@ -532,7 +640,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[end](countingwritable.md#end)* -Defined in node_modules/@types/node/base.d.ts:3776 +Defined in node_modules/@types/node/base.d.ts:5518 **Parameters:** @@ -546,7 +654,7 @@ Name | Type | *Inherited from [CountingWritable](countingwritable.md).[end](countingwritable.md#end)* -Defined in node_modules/@types/node/base.d.ts:3777 +Defined in node_modules/@types/node/base.d.ts:5519 **Parameters:** @@ -561,7 +669,7 @@ Name | Type | *Inherited from [CountingWritable](countingwritable.md).[end](countingwritable.md#end)* -Defined in node_modules/@types/node/base.d.ts:3778 +Defined in node_modules/@types/node/base.d.ts:5520 **Parameters:** @@ -577,15 +685,15 @@ ___ ### eventNames -▸ **eventNames**(): *string | symbol[]* +▸ **eventNames**(): *Array‹string | symbol›* *Implementation of [SparseWritable](../interfaces/sparsewritable.md)* *Inherited from [CountingWritable](countingwritable.md).[eventNames](countingwritable.md#eventnames)* -Defined in node_modules/@types/node/base.d.ts:694 +Defined in node_modules/@types/node/base.d.ts:909 -**Returns:** *string | symbol[]* +**Returns:** *Array‹string | symbol›* ___ @@ -597,7 +705,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[getMaxListeners](countingwritable.md#getmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:691 +Defined in node_modules/@types/node/base.d.ts:906 **Returns:** *number* @@ -611,7 +719,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[listenerCount](countingwritable.md#static-listenercount)* -Defined in node_modules/@types/node/base.d.ts:695 +Defined in node_modules/@types/node/base.d.ts:910 **Parameters:** @@ -631,7 +739,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[listeners](countingwritable.md#listeners)* -Defined in node_modules/@types/node/base.d.ts:692 +Defined in node_modules/@types/node/base.d.ts:907 **Parameters:** @@ -645,20 +753,27 @@ ___ ### on -▸ **on**(`event`: string, `listener`: Function): *this* +▸ **on**(`event`: string, `listener`: function): *this* *Inherited from [CountingWritable](countingwritable.md).[on](countingwritable.md#on)* *Overrides [SourceSource](sourcesource.md).[on](sourcesource.md#on)* -Defined in node_modules/@types/node/base.d.ts:3806 +Defined in node_modules/@types/node/base.d.ts:5551 + +**Parameters:** + +▪ **event**: *string* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -668,7 +783,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[on](sourcesource.md#on)* -Defined in node_modules/@types/node/base.d.ts:3807 +Defined in node_modules/@types/node/base.d.ts:5552 **Parameters:** @@ -686,7 +801,7 @@ Defined in node_modules/@types/node/base.d.ts:3807 *Overrides [SourceSource](sourcesource.md).[on](sourcesource.md#on)* -Defined in node_modules/@types/node/base.d.ts:3808 +Defined in node_modules/@types/node/base.d.ts:5553 **Parameters:** @@ -704,7 +819,7 @@ Defined in node_modules/@types/node/base.d.ts:3808 *Overrides [SourceSource](sourcesource.md).[on](sourcesource.md#on)* -Defined in node_modules/@types/node/base.d.ts:3809 +Defined in node_modules/@types/node/base.d.ts:5554 **Parameters:** @@ -728,7 +843,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[on](sourcesource.md#on)* -Defined in node_modules/@types/node/base.d.ts:3810 +Defined in node_modules/@types/node/base.d.ts:5555 **Parameters:** @@ -746,7 +861,7 @@ Defined in node_modules/@types/node/base.d.ts:3810 *Overrides [SourceSource](sourcesource.md).[on](sourcesource.md#on)* -Defined in node_modules/@types/node/base.d.ts:3811 +Defined in node_modules/@types/node/base.d.ts:5556 **Parameters:** @@ -770,7 +885,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[on](sourcesource.md#on)* -Defined in node_modules/@types/node/base.d.ts:3812 +Defined in node_modules/@types/node/base.d.ts:5557 **Parameters:** @@ -792,20 +907,27 @@ ___ ### once -▸ **once**(`event`: string, `listener`: Function): *this* +▸ **once**(`event`: string, `listener`: function): *this* *Inherited from [CountingWritable](countingwritable.md).[once](countingwritable.md#once)* *Overrides [SourceSource](sourcesource.md).[once](sourcesource.md#once)* -Defined in node_modules/@types/node/base.d.ts:3814 +Defined in node_modules/@types/node/base.d.ts:5559 + +**Parameters:** + +▪ **event**: *string* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -815,7 +937,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[once](sourcesource.md#once)* -Defined in node_modules/@types/node/base.d.ts:3815 +Defined in node_modules/@types/node/base.d.ts:5560 **Parameters:** @@ -833,7 +955,7 @@ Defined in node_modules/@types/node/base.d.ts:3815 *Overrides [SourceSource](sourcesource.md).[once](sourcesource.md#once)* -Defined in node_modules/@types/node/base.d.ts:3816 +Defined in node_modules/@types/node/base.d.ts:5561 **Parameters:** @@ -851,7 +973,7 @@ Defined in node_modules/@types/node/base.d.ts:3816 *Overrides [SourceSource](sourcesource.md).[once](sourcesource.md#once)* -Defined in node_modules/@types/node/base.d.ts:3817 +Defined in node_modules/@types/node/base.d.ts:5562 **Parameters:** @@ -875,7 +997,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[once](sourcesource.md#once)* -Defined in node_modules/@types/node/base.d.ts:3818 +Defined in node_modules/@types/node/base.d.ts:5563 **Parameters:** @@ -893,7 +1015,7 @@ Defined in node_modules/@types/node/base.d.ts:3818 *Overrides [SourceSource](sourcesource.md).[once](sourcesource.md#once)* -Defined in node_modules/@types/node/base.d.ts:3819 +Defined in node_modules/@types/node/base.d.ts:5564 **Parameters:** @@ -917,7 +1039,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[once](sourcesource.md#once)* -Defined in node_modules/@types/node/base.d.ts:3820 +Defined in node_modules/@types/node/base.d.ts:5565 **Parameters:** @@ -943,7 +1065,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[pipe](countingwritable.md#pipe)* -Defined in node_modules/@types/node/base.d.ts:3673 +Defined in node_modules/@types/node/base.d.ts:5407 **Type parameters:** @@ -962,20 +1084,27 @@ ___ ### prependListener -▸ **prependListener**(`event`: string, `listener`: Function): *this* +▸ **prependListener**(`event`: string, `listener`: function): *this* *Inherited from [CountingWritable](countingwritable.md).[prependListener](countingwritable.md#prependlistener)* *Overrides [SourceSource](sourcesource.md).[prependListener](sourcesource.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:3822 +Defined in node_modules/@types/node/base.d.ts:5567 + +**Parameters:** + +▪ **event**: *string* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -985,7 +1114,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[prependListener](sourcesource.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:3823 +Defined in node_modules/@types/node/base.d.ts:5568 **Parameters:** @@ -1003,7 +1132,7 @@ Defined in node_modules/@types/node/base.d.ts:3823 *Overrides [SourceSource](sourcesource.md).[prependListener](sourcesource.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:3824 +Defined in node_modules/@types/node/base.d.ts:5569 **Parameters:** @@ -1021,7 +1150,7 @@ Defined in node_modules/@types/node/base.d.ts:3824 *Overrides [SourceSource](sourcesource.md).[prependListener](sourcesource.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:3825 +Defined in node_modules/@types/node/base.d.ts:5570 **Parameters:** @@ -1045,7 +1174,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[prependListener](sourcesource.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:3826 +Defined in node_modules/@types/node/base.d.ts:5571 **Parameters:** @@ -1063,7 +1192,7 @@ Defined in node_modules/@types/node/base.d.ts:3826 *Overrides [SourceSource](sourcesource.md).[prependListener](sourcesource.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:3827 +Defined in node_modules/@types/node/base.d.ts:5572 **Parameters:** @@ -1087,7 +1216,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[prependListener](sourcesource.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:3828 +Defined in node_modules/@types/node/base.d.ts:5573 **Parameters:** @@ -1109,20 +1238,27 @@ ___ ### prependOnceListener -▸ **prependOnceListener**(`event`: string, `listener`: Function): *this* +▸ **prependOnceListener**(`event`: string, `listener`: function): *this* *Inherited from [CountingWritable](countingwritable.md).[prependOnceListener](countingwritable.md#prependoncelistener)* *Overrides [SourceSource](sourcesource.md).[prependOnceListener](sourcesource.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:3830 +Defined in node_modules/@types/node/base.d.ts:5575 + +**Parameters:** + +▪ **event**: *string* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -1132,7 +1268,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[prependOnceListener](sourcesource.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:3831 +Defined in node_modules/@types/node/base.d.ts:5576 **Parameters:** @@ -1150,7 +1286,7 @@ Defined in node_modules/@types/node/base.d.ts:3831 *Overrides [SourceSource](sourcesource.md).[prependOnceListener](sourcesource.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:3832 +Defined in node_modules/@types/node/base.d.ts:5577 **Parameters:** @@ -1168,7 +1304,7 @@ Defined in node_modules/@types/node/base.d.ts:3832 *Overrides [SourceSource](sourcesource.md).[prependOnceListener](sourcesource.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:3833 +Defined in node_modules/@types/node/base.d.ts:5578 **Parameters:** @@ -1192,7 +1328,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[prependOnceListener](sourcesource.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:3834 +Defined in node_modules/@types/node/base.d.ts:5579 **Parameters:** @@ -1210,7 +1346,7 @@ Defined in node_modules/@types/node/base.d.ts:3834 *Overrides [SourceSource](sourcesource.md).[prependOnceListener](sourcesource.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:3835 +Defined in node_modules/@types/node/base.d.ts:5580 **Parameters:** @@ -1234,7 +1370,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[prependOnceListener](sourcesource.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:3836 +Defined in node_modules/@types/node/base.d.ts:5581 **Parameters:** @@ -1262,7 +1398,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[removeAllListeners](countingwritable.md#removealllisteners)* -Defined in node_modules/@types/node/base.d.ts:689 +Defined in node_modules/@types/node/base.d.ts:904 **Parameters:** @@ -1276,20 +1412,27 @@ ___ ### removeListener -▸ **removeListener**(`event`: string, `listener`: Function): *this* +▸ **removeListener**(`event`: string, `listener`: function): *this* *Inherited from [CountingWritable](countingwritable.md).[removeListener](countingwritable.md#removelistener)* *Overrides [SourceSource](sourcesource.md).[removeListener](sourcesource.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:3838 +Defined in node_modules/@types/node/base.d.ts:5583 + +**Parameters:** + +▪ **event**: *string* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -1299,7 +1442,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[removeListener](sourcesource.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:3839 +Defined in node_modules/@types/node/base.d.ts:5584 **Parameters:** @@ -1317,7 +1460,7 @@ Defined in node_modules/@types/node/base.d.ts:3839 *Overrides [SourceSource](sourcesource.md).[removeListener](sourcesource.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:3840 +Defined in node_modules/@types/node/base.d.ts:5585 **Parameters:** @@ -1335,7 +1478,7 @@ Defined in node_modules/@types/node/base.d.ts:3840 *Overrides [SourceSource](sourcesource.md).[removeListener](sourcesource.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:3841 +Defined in node_modules/@types/node/base.d.ts:5586 **Parameters:** @@ -1359,7 +1502,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[removeListener](sourcesource.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:3842 +Defined in node_modules/@types/node/base.d.ts:5587 **Parameters:** @@ -1377,7 +1520,7 @@ Defined in node_modules/@types/node/base.d.ts:3842 *Overrides [SourceSource](sourcesource.md).[removeListener](sourcesource.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:3843 +Defined in node_modules/@types/node/base.d.ts:5588 **Parameters:** @@ -1401,7 +1544,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[removeListener](sourcesource.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:3844 +Defined in node_modules/@types/node/base.d.ts:5589 **Parameters:** @@ -1427,7 +1570,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[setDefaultEncoding](countingwritable.md#setdefaultencoding)* -Defined in node_modules/@types/node/base.d.ts:3775 +Defined in node_modules/@types/node/base.d.ts:5517 **Parameters:** @@ -1447,7 +1590,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[setMaxListeners](countingwritable.md#setmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:690 +Defined in node_modules/@types/node/base.d.ts:905 **Parameters:** @@ -1459,13 +1602,25 @@ Name | Type | ___ +### uncork + +▸ **uncork**(): *void* + +*Inherited from [CountingWritable](countingwritable.md).[uncork](countingwritable.md#uncork)* + +Defined in node_modules/@types/node/base.d.ts:5522 + +**Returns:** *void* + +___ + ### write ▸ **write**(`chunk`: any, `cb?`: Function): *boolean* *Inherited from [CountingWritable](countingwritable.md).[write](countingwritable.md#write)* -Defined in node_modules/@types/node/base.d.ts:3773 +Defined in node_modules/@types/node/base.d.ts:5515 **Parameters:** @@ -1480,7 +1635,7 @@ Name | Type | *Inherited from [CountingWritable](countingwritable.md).[write](countingwritable.md#write)* -Defined in node_modules/@types/node/base.d.ts:3774 +Defined in node_modules/@types/node/base.d.ts:5516 **Parameters:** @@ -1498,7 +1653,7 @@ ___ ▸ **writeChunk**(`chunk`: [SparseStreamChunk](../interfaces/sparsestreamchunk.md), `flushing`: boolean): *Promise‹void›* -*Defined in [lib/sparse-stream/sparse-write-stream.ts:32](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/sparse-stream/sparse-write-stream.ts#L32)* +*Defined in [lib/sparse-stream/sparse-write-stream.ts:38](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/sparse-stream/sparse-write-stream.ts#L38)* **Parameters:** @@ -1517,7 +1672,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[listenerCount](countingwritable.md#static-listenercount)* -Defined in node_modules/@types/node/base.d.ts:680 +Defined in node_modules/@types/node/base.d.ts:895 **Parameters:** diff --git a/doc/classes/streamlimiter.md b/doc/classes/streamlimiter.md index a0e30e2d..c1c05cad 100644 --- a/doc/classes/streamlimiter.md +++ b/doc/classes/streamlimiter.md @@ -23,16 +23,23 @@ * [maxBytes](streamlimiter.md#private-maxbytes) * [readable](streamlimiter.md#readable) +* [readableHighWaterMark](streamlimiter.md#readablehighwatermark) * [stream](streamlimiter.md#private-stream) * [writable](streamlimiter.md#writable) +* [writableHighWaterMark](streamlimiter.md#writablehighwatermark) * [defaultMaxListeners](streamlimiter.md#static-defaultmaxlisteners) ### Methods +* [_destroy](streamlimiter.md#_destroy) +* [_final](streamlimiter.md#_final) * [_read](streamlimiter.md#_read) * [_transform](streamlimiter.md#_transform) * [_write](streamlimiter.md#_write) +* [_writev](streamlimiter.md#optional-_writev) * [addListener](streamlimiter.md#addlistener) +* [cork](streamlimiter.md#cork) +* [destroy](streamlimiter.md#destroy) * [emit](streamlimiter.md#emit) * [end](streamlimiter.md#end) * [eventNames](streamlimiter.md#eventnames) @@ -54,6 +61,7 @@ * [setDefaultEncoding](streamlimiter.md#setdefaultencoding) * [setEncoding](streamlimiter.md#setencoding) * [setMaxListeners](streamlimiter.md#setmaxlisteners) +* [uncork](streamlimiter.md#uncork) * [unpipe](streamlimiter.md#unpipe) * [unshift](streamlimiter.md#unshift) * [wrap](streamlimiter.md#wrap) @@ -68,7 +76,7 @@ *Overrides [SourceTransform](../interfaces/sourcetransform.md).[constructor](../interfaces/sourcetransform.md#constructor)* -*Defined in [lib/stream-limiter.ts:22](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/stream-limiter.ts#L22)* +*Defined in [lib/stream-limiter.ts:22](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/stream-limiter.ts#L22)* **Parameters:** @@ -85,7 +93,7 @@ Name | Type | • **maxBytes**: *number* -*Defined in [lib/stream-limiter.ts:23](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/stream-limiter.ts#L23)* +*Defined in [lib/stream-limiter.ts:23](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/stream-limiter.ts#L23)* ___ @@ -95,7 +103,17 @@ ___ *Inherited from [SparseFilterStream](sparsefilterstream.md).[readable](sparsefilterstream.md#readable)* -Defined in node_modules/@types/node/base.d.ts:3688 +Defined in node_modules/@types/node/base.d.ts:5422 + +___ + +### readableHighWaterMark + +• **readableHighWaterMark**: *number* + +*Inherited from [SparseFilterStream](sparsefilterstream.md).[readableHighWaterMark](sparsefilterstream.md#readablehighwatermark)* + +Defined in node_modules/@types/node/base.d.ts:5423 ___ @@ -103,7 +121,7 @@ ___ • **stream**: *ReadableStream* -*Defined in [lib/stream-limiter.ts:23](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/stream-limiter.ts#L23)* +*Defined in [lib/stream-limiter.ts:23](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/stream-limiter.ts#L23)* ___ @@ -113,7 +131,17 @@ ___ *Inherited from [SparseFilterStream](sparsefilterstream.md).[writable](sparsefilterstream.md#writable)* -Defined in node_modules/@types/node/base.d.ts:3855 +Defined in node_modules/@types/node/base.d.ts:5600 + +___ + +### writableHighWaterMark + +• **writableHighWaterMark**: *number* + +*Inherited from [SparseFilterStream](sparsefilterstream.md).[writableHighWaterMark](sparsefilterstream.md#writablehighwatermark)* + +Defined in node_modules/@types/node/base.d.ts:5601 ___ @@ -123,17 +151,63 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[defaultMaxListeners](countingwritable.md#static-defaultmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:681 +Defined in node_modules/@types/node/base.d.ts:896 ## Methods +### _destroy + +▸ **_destroy**(`error`: [Error](notcapable.md#static-error) | null, `callback`: function): *void* + +*Inherited from [SparseFilterStream](sparsefilterstream.md).[_destroy](sparsefilterstream.md#_destroy)* + +*Overrides [SparseReadStream](sparsereadstream.md).[_destroy](sparsereadstream.md#_destroy)* + +Defined in node_modules/@types/node/base.d.ts:5605 + +**Parameters:** + +▪ **error**: *[Error](notcapable.md#static-error) | null* + +▪ **callback**: *function* + +▸ (`error?`: [Error](notcapable.md#static-error)): *void* + +**Parameters:** + +Name | Type | +------ | ------ | +`error?` | [Error](notcapable.md#static-error) | + +**Returns:** *void* + +___ + +### _final + +▸ **_final**(`callback`: Function): *void* + +*Inherited from [SparseFilterStream](sparsefilterstream.md).[_final](sparsefilterstream.md#_final)* + +Defined in node_modules/@types/node/base.d.ts:5606 + +**Parameters:** + +Name | Type | +------ | ------ | +`callback` | Function | + +**Returns:** *void* + +___ + ### _read ▸ **_read**(`size`: number): *void* *Inherited from [SparseFilterStream](sparsefilterstream.md).[_read](sparsefilterstream.md#_read)* -Defined in node_modules/@types/node/base.d.ts:3690 +Defined in node_modules/@types/node/base.d.ts:5425 **Parameters:** @@ -147,28 +221,28 @@ ___ ### _transform -▸ **_transform**(`buffer`: Buffer, `_encoding`: string, `callback`: function): *void* +▸ **_transform**(`buffer`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer), `_encoding`: string, `callback`: function): *void* *Overrides [SourceTransform](../interfaces/sourcetransform.md).[_transform](../interfaces/sourcetransform.md#_transform)* -*Defined in [lib/stream-limiter.ts:29](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/stream-limiter.ts#L29)* +*Defined in [lib/stream-limiter.ts:29](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/stream-limiter.ts#L29)* **Parameters:** -▪ **buffer**: *Buffer* +▪ **buffer**: *[Buffer](../interfaces/alignedlockablebuffer.md#buffer)* ▪ **_encoding**: *string* ▪ **callback**: *function* -▸ (`error?`: [Error](notcapable.md#static-error) | null, `data?`: Buffer): *void* +▸ (`error?`: [Error](notcapable.md#static-error) | null, `data?`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer)): *void* **Parameters:** Name | Type | ------ | ------ | `error?` | [Error](notcapable.md#static-error) | null | -`data?` | Buffer | +`data?` | [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | **Returns:** *void* @@ -176,19 +250,53 @@ ___ ### _write -▸ **_write**(`chunk`: any, `encoding`: string, `callback`: Function): *void* +▸ **_write**(`chunk`: any, `encoding`: string, `callback`: function): *void* *Inherited from [SparseFilterStream](sparsefilterstream.md).[_write](sparsefilterstream.md#_write)* -Defined in node_modules/@types/node/base.d.ts:3857 +Defined in node_modules/@types/node/base.d.ts:5603 + +**Parameters:** + +▪ **chunk**: *any* + +▪ **encoding**: *string* + +▪ **callback**: *function* + +▸ (`err?`: [Error](notcapable.md#static-error)): *void* **Parameters:** Name | Type | ------ | ------ | -`chunk` | any | -`encoding` | string | -`callback` | Function | +`err?` | [Error](notcapable.md#static-error) | + +**Returns:** *void* + +___ + +### `Optional` _writev + +▸ **_writev**(`chunks`: Array‹object›, `callback`: function): *void* + +*Inherited from [SparseFilterStream](sparsefilterstream.md).[_writev](sparsefilterstream.md#optional-_writev)* + +Defined in node_modules/@types/node/base.d.ts:5604 + +**Parameters:** + +▪ **chunks**: *Array‹object›* + +▪ **callback**: *function* + +▸ (`err?`: [Error](notcapable.md#static-error)): *void* + +**Parameters:** + +Name | Type | +------ | ------ | +`err?` | [Error](notcapable.md#static-error) | **Returns:** *void* @@ -196,28 +304,35 @@ ___ ### addListener -▸ **addListener**(`event`: string, `listener`: Function): *this* +▸ **addListener**(`event`: string, `listener`: function): *this* *Inherited from [SparseFilterStream](sparsefilterstream.md).[addListener](sparsefilterstream.md#addlistener)* *Overrides [SourceSource](sourcesource.md).[addListener](sourcesource.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:3711 +Defined in node_modules/@types/node/base.d.ts:5447 Event emitter The defined events on documents including: - 1. close - 2. data - 3. end - 4. readable - 5. error +1. close +2. data +3. end +4. readable +5. error + +**Parameters:** + +▪ **event**: *string* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -227,7 +342,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[addListener](sourcesource.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:3712 +Defined in node_modules/@types/node/base.d.ts:5448 **Parameters:** @@ -245,7 +360,7 @@ Defined in node_modules/@types/node/base.d.ts:3712 *Overrides [SourceSource](sourcesource.md).[addListener](sourcesource.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:3713 +Defined in node_modules/@types/node/base.d.ts:5449 **Parameters:** @@ -253,13 +368,13 @@ Defined in node_modules/@types/node/base.d.ts:3713 ▪ **listener**: *function* -▸ (`chunk`: Buffer | string): *void* +▸ (`chunk`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string): *void* **Parameters:** Name | Type | ------ | ------ | -`chunk` | Buffer | string | +`chunk` | [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string | **Returns:** *this* @@ -269,7 +384,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[addListener](sourcesource.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:3714 +Defined in node_modules/@types/node/base.d.ts:5450 **Parameters:** @@ -287,7 +402,7 @@ Defined in node_modules/@types/node/base.d.ts:3714 *Overrides [SourceSource](sourcesource.md).[addListener](sourcesource.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:3715 +Defined in node_modules/@types/node/base.d.ts:5451 **Parameters:** @@ -305,7 +420,7 @@ Defined in node_modules/@types/node/base.d.ts:3715 *Overrides [SourceSource](sourcesource.md).[addListener](sourcesource.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:3716 +Defined in node_modules/@types/node/base.d.ts:5452 **Parameters:** @@ -325,6 +440,38 @@ Name | Type | ___ +### cork + +▸ **cork**(): *void* + +*Inherited from [SparseFilterStream](sparsefilterstream.md).[cork](sparsefilterstream.md#cork)* + +Defined in node_modules/@types/node/base.d.ts:5613 + +**Returns:** *void* + +___ + +### destroy + +▸ **destroy**(`error?`: [Error](notcapable.md#static-error)): *void* + +*Inherited from [SparseFilterStream](sparsefilterstream.md).[destroy](sparsefilterstream.md#destroy)* + +*Overrides [SparseReadStream](sparsereadstream.md).[destroy](sparsereadstream.md#destroy)* + +Defined in node_modules/@types/node/base.d.ts:5625 + +**Parameters:** + +Name | Type | +------ | ------ | +`error?` | [Error](notcapable.md#static-error) | + +**Returns:** *void* + +___ + ### emit ▸ **emit**(`event`: string | symbol, ...`args`: any[]): *boolean* @@ -333,7 +480,7 @@ ___ *Overrides [SourceSource](sourcesource.md).[emit](sourcesource.md#emit)* -Defined in node_modules/@types/node/base.d.ts:3718 +Defined in node_modules/@types/node/base.d.ts:5454 **Parameters:** @@ -350,7 +497,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[emit](sourcesource.md#emit)* -Defined in node_modules/@types/node/base.d.ts:3719 +Defined in node_modules/@types/node/base.d.ts:5455 **Parameters:** @@ -360,20 +507,20 @@ Name | Type | **Returns:** *boolean* -▸ **emit**(`event`: "data", `chunk`: Buffer | string): *boolean* +▸ **emit**(`event`: "data", `chunk`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string): *boolean* *Inherited from [SparseFilterStream](sparsefilterstream.md).[emit](sparsefilterstream.md#emit)* *Overrides [SourceSource](sourcesource.md).[emit](sourcesource.md#emit)* -Defined in node_modules/@types/node/base.d.ts:3720 +Defined in node_modules/@types/node/base.d.ts:5456 **Parameters:** Name | Type | ------ | ------ | `event` | "data" | -`chunk` | Buffer | string | +`chunk` | [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string | **Returns:** *boolean* @@ -383,7 +530,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[emit](sourcesource.md#emit)* -Defined in node_modules/@types/node/base.d.ts:3721 +Defined in node_modules/@types/node/base.d.ts:5457 **Parameters:** @@ -399,7 +546,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[emit](sourcesource.md#emit)* -Defined in node_modules/@types/node/base.d.ts:3722 +Defined in node_modules/@types/node/base.d.ts:5458 **Parameters:** @@ -415,7 +562,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[emit](sourcesource.md#emit)* -Defined in node_modules/@types/node/base.d.ts:3723 +Defined in node_modules/@types/node/base.d.ts:5459 **Parameters:** @@ -434,7 +581,7 @@ ___ *Inherited from [SparseFilterStream](sparsefilterstream.md).[end](sparsefilterstream.md#end)* -Defined in node_modules/@types/node/base.d.ts:3861 +Defined in node_modules/@types/node/base.d.ts:5610 **Parameters:** @@ -448,7 +595,7 @@ Name | Type | *Inherited from [SparseFilterStream](sparsefilterstream.md).[end](sparsefilterstream.md#end)* -Defined in node_modules/@types/node/base.d.ts:3862 +Defined in node_modules/@types/node/base.d.ts:5611 **Parameters:** @@ -463,7 +610,7 @@ Name | Type | *Inherited from [SparseFilterStream](sparsefilterstream.md).[end](sparsefilterstream.md#end)* -Defined in node_modules/@types/node/base.d.ts:3863 +Defined in node_modules/@types/node/base.d.ts:5612 **Parameters:** @@ -479,13 +626,13 @@ ___ ### eventNames -▸ **eventNames**(): *string | symbol[]* +▸ **eventNames**(): *Array‹string | symbol›* *Inherited from [CountingWritable](countingwritable.md).[eventNames](countingwritable.md#eventnames)* -Defined in node_modules/@types/node/base.d.ts:694 +Defined in node_modules/@types/node/base.d.ts:909 -**Returns:** *string | symbol[]* +**Returns:** *Array‹string | symbol›* ___ @@ -495,7 +642,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[getMaxListeners](countingwritable.md#getmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:691 +Defined in node_modules/@types/node/base.d.ts:906 **Returns:** *number* @@ -507,7 +654,7 @@ ___ *Inherited from [SparseFilterStream](sparsefilterstream.md).[isPaused](sparsefilterstream.md#ispaused)* -Defined in node_modules/@types/node/base.d.ts:3695 +Defined in node_modules/@types/node/base.d.ts:5430 **Returns:** *boolean* @@ -519,7 +666,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[listenerCount](countingwritable.md#static-listenercount)* -Defined in node_modules/@types/node/base.d.ts:695 +Defined in node_modules/@types/node/base.d.ts:910 **Parameters:** @@ -537,7 +684,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[listeners](countingwritable.md#listeners)* -Defined in node_modules/@types/node/base.d.ts:692 +Defined in node_modules/@types/node/base.d.ts:907 **Parameters:** @@ -551,20 +698,27 @@ ___ ### on -▸ **on**(`event`: string, `listener`: Function): *this* +▸ **on**(`event`: string, `listener`: function): *this* *Inherited from [SparseFilterStream](sparsefilterstream.md).[on](sparsefilterstream.md#on)* *Overrides [SourceSource](sourcesource.md).[on](sourcesource.md#on)* -Defined in node_modules/@types/node/base.d.ts:3725 +Defined in node_modules/@types/node/base.d.ts:5461 + +**Parameters:** + +▪ **event**: *string* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -574,7 +728,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[on](sourcesource.md#on)* -Defined in node_modules/@types/node/base.d.ts:3726 +Defined in node_modules/@types/node/base.d.ts:5462 **Parameters:** @@ -592,7 +746,7 @@ Defined in node_modules/@types/node/base.d.ts:3726 *Overrides [SourceSource](sourcesource.md).[on](sourcesource.md#on)* -Defined in node_modules/@types/node/base.d.ts:3727 +Defined in node_modules/@types/node/base.d.ts:5463 **Parameters:** @@ -600,13 +754,13 @@ Defined in node_modules/@types/node/base.d.ts:3727 ▪ **listener**: *function* -▸ (`chunk`: Buffer | string): *void* +▸ (`chunk`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string): *void* **Parameters:** Name | Type | ------ | ------ | -`chunk` | Buffer | string | +`chunk` | [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string | **Returns:** *this* @@ -616,7 +770,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[on](sourcesource.md#on)* -Defined in node_modules/@types/node/base.d.ts:3728 +Defined in node_modules/@types/node/base.d.ts:5464 **Parameters:** @@ -634,7 +788,7 @@ Defined in node_modules/@types/node/base.d.ts:3728 *Overrides [SourceSource](sourcesource.md).[on](sourcesource.md#on)* -Defined in node_modules/@types/node/base.d.ts:3729 +Defined in node_modules/@types/node/base.d.ts:5465 **Parameters:** @@ -652,7 +806,7 @@ Defined in node_modules/@types/node/base.d.ts:3729 *Overrides [SourceSource](sourcesource.md).[on](sourcesource.md#on)* -Defined in node_modules/@types/node/base.d.ts:3730 +Defined in node_modules/@types/node/base.d.ts:5466 **Parameters:** @@ -674,20 +828,27 @@ ___ ### once -▸ **once**(`event`: string, `listener`: Function): *this* +▸ **once**(`event`: string, `listener`: function): *this* *Inherited from [SparseFilterStream](sparsefilterstream.md).[once](sparsefilterstream.md#once)* *Overrides [SourceSource](sourcesource.md).[once](sourcesource.md#once)* -Defined in node_modules/@types/node/base.d.ts:3732 +Defined in node_modules/@types/node/base.d.ts:5468 + +**Parameters:** + +▪ **event**: *string* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -697,7 +858,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[once](sourcesource.md#once)* -Defined in node_modules/@types/node/base.d.ts:3733 +Defined in node_modules/@types/node/base.d.ts:5469 **Parameters:** @@ -715,7 +876,7 @@ Defined in node_modules/@types/node/base.d.ts:3733 *Overrides [SourceSource](sourcesource.md).[once](sourcesource.md#once)* -Defined in node_modules/@types/node/base.d.ts:3734 +Defined in node_modules/@types/node/base.d.ts:5470 **Parameters:** @@ -723,13 +884,13 @@ Defined in node_modules/@types/node/base.d.ts:3734 ▪ **listener**: *function* -▸ (`chunk`: Buffer | string): *void* +▸ (`chunk`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string): *void* **Parameters:** Name | Type | ------ | ------ | -`chunk` | Buffer | string | +`chunk` | [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string | **Returns:** *this* @@ -739,7 +900,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[once](sourcesource.md#once)* -Defined in node_modules/@types/node/base.d.ts:3735 +Defined in node_modules/@types/node/base.d.ts:5471 **Parameters:** @@ -757,7 +918,7 @@ Defined in node_modules/@types/node/base.d.ts:3735 *Overrides [SourceSource](sourcesource.md).[once](sourcesource.md#once)* -Defined in node_modules/@types/node/base.d.ts:3736 +Defined in node_modules/@types/node/base.d.ts:5472 **Parameters:** @@ -775,7 +936,7 @@ Defined in node_modules/@types/node/base.d.ts:3736 *Overrides [SourceSource](sourcesource.md).[once](sourcesource.md#once)* -Defined in node_modules/@types/node/base.d.ts:3737 +Defined in node_modules/@types/node/base.d.ts:5473 **Parameters:** @@ -801,7 +962,7 @@ ___ *Inherited from [SparseFilterStream](sparsefilterstream.md).[pause](sparsefilterstream.md#pause)* -Defined in node_modules/@types/node/base.d.ts:3693 +Defined in node_modules/@types/node/base.d.ts:5428 **Returns:** *this* @@ -811,11 +972,9 @@ ___ ▸ **pipe**<**T**>(`destination`: T, `options?`: undefined | object): *T* -*Inherited from [SparseFilterStream](sparsefilterstream.md).[pipe](sparsefilterstream.md#pipe)* +*Inherited from [CountingWritable](countingwritable.md).[pipe](countingwritable.md#pipe)* -*Overrides [CountingWritable](countingwritable.md).[pipe](countingwritable.md#pipe)* - -Defined in node_modules/@types/node/base.d.ts:3696 +Defined in node_modules/@types/node/base.d.ts:5407 **Type parameters:** @@ -834,20 +993,27 @@ ___ ### prependListener -▸ **prependListener**(`event`: string, `listener`: Function): *this* +▸ **prependListener**(`event`: string, `listener`: function): *this* *Inherited from [SparseFilterStream](sparsefilterstream.md).[prependListener](sparsefilterstream.md#prependlistener)* *Overrides [SourceSource](sourcesource.md).[prependListener](sourcesource.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:3739 +Defined in node_modules/@types/node/base.d.ts:5475 + +**Parameters:** + +▪ **event**: *string* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -857,7 +1023,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[prependListener](sourcesource.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:3740 +Defined in node_modules/@types/node/base.d.ts:5476 **Parameters:** @@ -875,7 +1041,7 @@ Defined in node_modules/@types/node/base.d.ts:3740 *Overrides [SourceSource](sourcesource.md).[prependListener](sourcesource.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:3741 +Defined in node_modules/@types/node/base.d.ts:5477 **Parameters:** @@ -883,13 +1049,13 @@ Defined in node_modules/@types/node/base.d.ts:3741 ▪ **listener**: *function* -▸ (`chunk`: Buffer | string): *void* +▸ (`chunk`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string): *void* **Parameters:** Name | Type | ------ | ------ | -`chunk` | Buffer | string | +`chunk` | [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string | **Returns:** *this* @@ -899,7 +1065,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[prependListener](sourcesource.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:3742 +Defined in node_modules/@types/node/base.d.ts:5478 **Parameters:** @@ -917,7 +1083,7 @@ Defined in node_modules/@types/node/base.d.ts:3742 *Overrides [SourceSource](sourcesource.md).[prependListener](sourcesource.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:3743 +Defined in node_modules/@types/node/base.d.ts:5479 **Parameters:** @@ -935,7 +1101,7 @@ Defined in node_modules/@types/node/base.d.ts:3743 *Overrides [SourceSource](sourcesource.md).[prependListener](sourcesource.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:3744 +Defined in node_modules/@types/node/base.d.ts:5480 **Parameters:** @@ -957,20 +1123,27 @@ ___ ### prependOnceListener -▸ **prependOnceListener**(`event`: string, `listener`: Function): *this* +▸ **prependOnceListener**(`event`: string, `listener`: function): *this* *Inherited from [SparseFilterStream](sparsefilterstream.md).[prependOnceListener](sparsefilterstream.md#prependoncelistener)* *Overrides [SourceSource](sourcesource.md).[prependOnceListener](sourcesource.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:3746 +Defined in node_modules/@types/node/base.d.ts:5482 + +**Parameters:** + +▪ **event**: *string* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -980,7 +1153,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[prependOnceListener](sourcesource.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:3747 +Defined in node_modules/@types/node/base.d.ts:5483 **Parameters:** @@ -998,7 +1171,7 @@ Defined in node_modules/@types/node/base.d.ts:3747 *Overrides [SourceSource](sourcesource.md).[prependOnceListener](sourcesource.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:3748 +Defined in node_modules/@types/node/base.d.ts:5484 **Parameters:** @@ -1006,13 +1179,13 @@ Defined in node_modules/@types/node/base.d.ts:3748 ▪ **listener**: *function* -▸ (`chunk`: Buffer | string): *void* +▸ (`chunk`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string): *void* **Parameters:** Name | Type | ------ | ------ | -`chunk` | Buffer | string | +`chunk` | [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string | **Returns:** *this* @@ -1022,7 +1195,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[prependOnceListener](sourcesource.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:3749 +Defined in node_modules/@types/node/base.d.ts:5485 **Parameters:** @@ -1040,7 +1213,7 @@ Defined in node_modules/@types/node/base.d.ts:3749 *Overrides [SourceSource](sourcesource.md).[prependOnceListener](sourcesource.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:3750 +Defined in node_modules/@types/node/base.d.ts:5486 **Parameters:** @@ -1058,7 +1231,7 @@ Defined in node_modules/@types/node/base.d.ts:3750 *Overrides [SourceSource](sourcesource.md).[prependOnceListener](sourcesource.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:3751 +Defined in node_modules/@types/node/base.d.ts:5487 **Parameters:** @@ -1084,7 +1257,7 @@ ___ *Inherited from [SparseFilterStream](sparsefilterstream.md).[push](sparsefilterstream.md#push)* -Defined in node_modules/@types/node/base.d.ts:3700 +Defined in node_modules/@types/node/base.d.ts:5434 **Parameters:** @@ -1103,7 +1276,7 @@ ___ *Inherited from [SparseFilterStream](sparsefilterstream.md).[read](sparsefilterstream.md#read)* -Defined in node_modules/@types/node/base.d.ts:3691 +Defined in node_modules/@types/node/base.d.ts:5426 **Parameters:** @@ -1121,7 +1294,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[removeAllListeners](countingwritable.md#removealllisteners)* -Defined in node_modules/@types/node/base.d.ts:689 +Defined in node_modules/@types/node/base.d.ts:904 **Parameters:** @@ -1135,20 +1308,27 @@ ___ ### removeListener -▸ **removeListener**(`event`: string, `listener`: Function): *this* +▸ **removeListener**(`event`: string, `listener`: function): *this* *Inherited from [SparseFilterStream](sparsefilterstream.md).[removeListener](sparsefilterstream.md#removelistener)* *Overrides [SourceSource](sourcesource.md).[removeListener](sourcesource.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:3753 +Defined in node_modules/@types/node/base.d.ts:5489 + +**Parameters:** + +▪ **event**: *string* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -1158,7 +1338,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[removeListener](sourcesource.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:3754 +Defined in node_modules/@types/node/base.d.ts:5490 **Parameters:** @@ -1176,7 +1356,7 @@ Defined in node_modules/@types/node/base.d.ts:3754 *Overrides [SourceSource](sourcesource.md).[removeListener](sourcesource.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:3755 +Defined in node_modules/@types/node/base.d.ts:5491 **Parameters:** @@ -1184,13 +1364,13 @@ Defined in node_modules/@types/node/base.d.ts:3755 ▪ **listener**: *function* -▸ (`chunk`: Buffer | string): *void* +▸ (`chunk`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string): *void* **Parameters:** Name | Type | ------ | ------ | -`chunk` | Buffer | string | +`chunk` | [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string | **Returns:** *this* @@ -1200,7 +1380,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[removeListener](sourcesource.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:3756 +Defined in node_modules/@types/node/base.d.ts:5492 **Parameters:** @@ -1218,7 +1398,7 @@ Defined in node_modules/@types/node/base.d.ts:3756 *Overrides [SourceSource](sourcesource.md).[removeListener](sourcesource.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:3757 +Defined in node_modules/@types/node/base.d.ts:5493 **Parameters:** @@ -1236,7 +1416,7 @@ Defined in node_modules/@types/node/base.d.ts:3757 *Overrides [SourceSource](sourcesource.md).[removeListener](sourcesource.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:3758 +Defined in node_modules/@types/node/base.d.ts:5494 **Parameters:** @@ -1262,7 +1442,7 @@ ___ *Inherited from [SparseFilterStream](sparsefilterstream.md).[resume](sparsefilterstream.md#resume)* -Defined in node_modules/@types/node/base.d.ts:3694 +Defined in node_modules/@types/node/base.d.ts:5429 **Returns:** *this* @@ -1274,7 +1454,7 @@ ___ *Inherited from [SparseFilterStream](sparsefilterstream.md).[setDefaultEncoding](sparsefilterstream.md#setdefaultencoding)* -Defined in node_modules/@types/node/base.d.ts:3860 +Defined in node_modules/@types/node/base.d.ts:5609 **Parameters:** @@ -1288,11 +1468,11 @@ ___ ### setEncoding -▸ **setEncoding**(`encoding`: string): *void* +▸ **setEncoding**(`encoding`: string): *this* *Inherited from [SparseFilterStream](sparsefilterstream.md).[setEncoding](sparsefilterstream.md#setencoding)* -Defined in node_modules/@types/node/base.d.ts:3692 +Defined in node_modules/@types/node/base.d.ts:5427 **Parameters:** @@ -1300,7 +1480,7 @@ Name | Type | ------ | ------ | `encoding` | string | -**Returns:** *void* +**Returns:** *this* ___ @@ -1310,7 +1490,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[setMaxListeners](countingwritable.md#setmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:690 +Defined in node_modules/@types/node/base.d.ts:905 **Parameters:** @@ -1322,13 +1502,25 @@ Name | Type | ___ +### uncork + +▸ **uncork**(): *void* + +*Inherited from [SparseFilterStream](sparsefilterstream.md).[uncork](sparsefilterstream.md#uncork)* + +Defined in node_modules/@types/node/base.d.ts:5614 + +**Returns:** *void* + +___ + ### unpipe -▸ **unpipe**<**T**>(`destination?`: T): *void* +▸ **unpipe**<**T**>(`destination?`: T): *this* *Inherited from [SparseFilterStream](sparsefilterstream.md).[unpipe](sparsefilterstream.md#unpipe)* -Defined in node_modules/@types/node/base.d.ts:3697 +Defined in node_modules/@types/node/base.d.ts:5431 **Type parameters:** @@ -1340,7 +1532,7 @@ Name | Type | ------ | ------ | `destination?` | T | -**Returns:** *void* +**Returns:** *this* ___ @@ -1350,7 +1542,7 @@ ___ *Inherited from [SparseFilterStream](sparsefilterstream.md).[unshift](sparsefilterstream.md#unshift)* -Defined in node_modules/@types/node/base.d.ts:3698 +Defined in node_modules/@types/node/base.d.ts:5432 **Parameters:** @@ -1364,11 +1556,11 @@ ___ ### wrap -▸ **wrap**(`oldStream`: ReadableStream): *Readable* +▸ **wrap**(`oldStream`: ReadableStream): *this* *Inherited from [SparseFilterStream](sparsefilterstream.md).[wrap](sparsefilterstream.md#wrap)* -Defined in node_modules/@types/node/base.d.ts:3699 +Defined in node_modules/@types/node/base.d.ts:5433 **Parameters:** @@ -1376,7 +1568,7 @@ Name | Type | ------ | ------ | `oldStream` | ReadableStream | -**Returns:** *Readable* +**Returns:** *this* ___ @@ -1386,7 +1578,7 @@ ___ *Inherited from [SparseFilterStream](sparsefilterstream.md).[write](sparsefilterstream.md#write)* -Defined in node_modules/@types/node/base.d.ts:3858 +Defined in node_modules/@types/node/base.d.ts:5607 **Parameters:** @@ -1401,7 +1593,7 @@ Name | Type | *Inherited from [SparseFilterStream](sparsefilterstream.md).[write](sparsefilterstream.md#write)* -Defined in node_modules/@types/node/base.d.ts:3859 +Defined in node_modules/@types/node/base.d.ts:5608 **Parameters:** @@ -1421,7 +1613,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[listenerCount](countingwritable.md#static-listenercount)* -Defined in node_modules/@types/node/base.d.ts:680 +Defined in node_modules/@types/node/base.d.ts:895 **Parameters:** diff --git a/doc/classes/streamverifier.md b/doc/classes/streamverifier.md index 7f2d6e0f..1893e6d4 100644 --- a/doc/classes/streamverifier.md +++ b/doc/classes/streamverifier.md @@ -50,7 +50,7 @@ \+ **new StreamVerifier**(`source`: [SourceDestination](sourcedestination.md), `checksum`: string, `size`: number): *[StreamVerifier](streamverifier.md)* -*Defined in [lib/source-destination/source-destination.ts:152](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L152)* +*Defined in [lib/source-destination/source-destination.ts:152](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L152)* **Parameters:** @@ -68,7 +68,7 @@ Name | Type | • **checksum**: *string* -*Defined in [lib/source-destination/source-destination.ts:155](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L155)* +*Defined in [lib/source-destination/source-destination.ts:155](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L155)* ___ @@ -76,7 +76,7 @@ ___ • **size**: *number* -*Defined in [lib/source-destination/source-destination.ts:156](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L156)* +*Defined in [lib/source-destination/source-destination.ts:156](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L156)* ___ @@ -84,7 +84,7 @@ ___ • **source**: *[SourceDestination](sourcedestination.md)* -*Defined in [lib/source-destination/source-destination.ts:154](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L154)* +*Defined in [lib/source-destination/source-destination.ts:154](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L154)* ___ @@ -94,26 +94,33 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[defaultMaxListeners](countingwritable.md#static-defaultmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:681 +Defined in node_modules/@types/node/base.d.ts:896 ## Methods ### addListener -▸ **addListener**(`event`: string | symbol, `listener`: Function): *this* +▸ **addListener**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[addListener](sourcesource.md#addlistener)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[addListener](../interfaces/sparsereadable.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:683 +Defined in node_modules/@types/node/base.d.ts:898 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -127,7 +134,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[emit](../interfaces/sparsereadable.md#emit)* -Defined in node_modules/@types/node/base.d.ts:693 +Defined in node_modules/@types/node/base.d.ts:908 **Parameters:** @@ -142,15 +149,15 @@ ___ ### eventNames -▸ **eventNames**(): *string | symbol[]* +▸ **eventNames**(): *Array‹string | symbol›* *Inherited from [CountingWritable](countingwritable.md).[eventNames](countingwritable.md#eventnames)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[eventNames](../interfaces/sparsereadable.md#eventnames)* -Defined in node_modules/@types/node/base.d.ts:694 +Defined in node_modules/@types/node/base.d.ts:909 -**Returns:** *string | symbol[]* +**Returns:** *Array‹string | symbol›* ___ @@ -162,7 +169,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[getMaxListeners](../interfaces/sparsereadable.md#getmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:691 +Defined in node_modules/@types/node/base.d.ts:906 **Returns:** *number* @@ -174,7 +181,7 @@ ___ *Inherited from [Verifier](verifier.md).[handleEventsAndPipe](verifier.md#protected-handleeventsandpipe)* -*Defined in [lib/source-destination/source-destination.ts:134](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L134)* +*Defined in [lib/source-destination/source-destination.ts:134](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L134)* **Parameters:** @@ -195,7 +202,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[listenerCount](../interfaces/sparsereadable.md#listenercount)* -Defined in node_modules/@types/node/base.d.ts:695 +Defined in node_modules/@types/node/base.d.ts:910 **Parameters:** @@ -215,7 +222,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[listeners](../interfaces/sparsereadable.md#listeners)* -Defined in node_modules/@types/node/base.d.ts:692 +Defined in node_modules/@types/node/base.d.ts:907 **Parameters:** @@ -229,20 +236,27 @@ ___ ### on -▸ **on**(`event`: string | symbol, `listener`: Function): *this* +▸ **on**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[on](sourcesource.md#on)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[on](../interfaces/sparsereadable.md#on)* -Defined in node_modules/@types/node/base.d.ts:684 +Defined in node_modules/@types/node/base.d.ts:899 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -250,20 +264,27 @@ ___ ### once -▸ **once**(`event`: string | symbol, `listener`: Function): *this* +▸ **once**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[once](sourcesource.md#once)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[once](../interfaces/sparsereadable.md#once)* -Defined in node_modules/@types/node/base.d.ts:685 +Defined in node_modules/@types/node/base.d.ts:900 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -271,20 +292,27 @@ ___ ### prependListener -▸ **prependListener**(`event`: string | symbol, `listener`: Function): *this* +▸ **prependListener**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[prependListener](sourcesource.md#prependlistener)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[prependListener](../interfaces/sparsereadable.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:686 +Defined in node_modules/@types/node/base.d.ts:901 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -292,20 +320,27 @@ ___ ### prependOnceListener -▸ **prependOnceListener**(`event`: string | symbol, `listener`: Function): *this* +▸ **prependOnceListener**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[prependOnceListener](sourcesource.md#prependoncelistener)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[prependOnceListener](../interfaces/sparsereadable.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:687 +Defined in node_modules/@types/node/base.d.ts:902 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -319,7 +354,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[removeAllListeners](../interfaces/sparsereadable.md#removealllisteners)* -Defined in node_modules/@types/node/base.d.ts:689 +Defined in node_modules/@types/node/base.d.ts:904 **Parameters:** @@ -333,20 +368,27 @@ ___ ### removeListener -▸ **removeListener**(`event`: string | symbol, `listener`: Function): *this* +▸ **removeListener**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[removeListener](sourcesource.md#removelistener)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[removeListener](../interfaces/sparsereadable.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:688 +Defined in node_modules/@types/node/base.d.ts:903 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -358,7 +400,7 @@ ___ *Overrides [Verifier](verifier.md).[run](verifier.md#abstract-run)* -*Defined in [lib/source-destination/source-destination.ts:161](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L161)* +*Defined in [lib/source-destination/source-destination.ts:161](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L161)* **Returns:** *Promise‹void›* @@ -372,7 +414,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[setMaxListeners](../interfaces/sparsereadable.md#setmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:690 +Defined in node_modules/@types/node/base.d.ts:905 **Parameters:** @@ -390,7 +432,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[listenerCount](countingwritable.md#static-listenercount)* -Defined in node_modules/@types/node/base.d.ts:680 +Defined in node_modules/@types/node/base.d.ts:895 **Parameters:** @@ -409,22 +451,22 @@ Name | Type | *Inherited from [Verifier](verifier.md).[progress](verifier.md#progress)* -*Defined in [lib/source-destination/source-destination.ts:130](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L130)* +*Defined in [lib/source-destination/source-destination.ts:130](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L130)* ### bytes • **bytes**: *number* = 0 -*Defined in [lib/source-destination/source-destination.ts:130](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L130)* +*Defined in [lib/source-destination/source-destination.ts:130](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L130)* ### position • **position**: *number* = 0 -*Defined in [lib/source-destination/source-destination.ts:130](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L130)* +*Defined in [lib/source-destination/source-destination.ts:130](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L130)* ### speed • **speed**: *number* = 0 -*Defined in [lib/source-destination/source-destination.ts:130](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L130)* +*Defined in [lib/source-destination/source-destination.ts:130](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L130)* diff --git a/doc/classes/streamzipsource.md b/doc/classes/streamzipsource.md index c2a318af..316bc2a7 100644 --- a/doc/classes/streamzipsource.md +++ b/doc/classes/streamzipsource.md @@ -44,6 +44,7 @@ * [createWriteStream](streamzipsource.md#createwritestream) * [emit](streamzipsource.md#emit) * [eventNames](streamzipsource.md#eventnames) +* [getAlignment](streamzipsource.md#getalignment) * [getBlocks](streamzipsource.md#getblocks) * [getEntry](streamzipsource.md#private-getentry) * [getInnerSource](streamzipsource.md#getinnersource) @@ -73,7 +74,7 @@ *Overrides [SourceSource](sourcesource.md).[constructor](sourcesource.md#constructor)* -*Defined in [lib/source-destination/zip.ts:70](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/zip.ts#L70)* +*Defined in [lib/source-destination/zip.ts:75](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/zip.ts#L75)* **Parameters:** @@ -97,7 +98,7 @@ Name | Type | • **entry**? : *ZipStreamEntry* -*Defined in [lib/source-destination/zip.ts:70](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/zip.ts#L70)* +*Defined in [lib/source-destination/zip.ts:75](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/zip.ts#L75)* ___ @@ -105,7 +106,7 @@ ___ • **match**: *function* -*Defined in [lib/source-destination/zip.ts:74](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/zip.ts#L74)* +*Defined in [lib/source-destination/zip.ts:79](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/zip.ts#L79)* #### Type declaration: @@ -125,7 +126,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[source](sourcesource.md#protected-source)* -*Defined in [lib/source-destination/source-source.ts:22](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-source.ts#L22)* +*Defined in [lib/source-destination/source-source.ts:22](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-source.ts#L22)* ___ @@ -135,7 +136,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[defaultMaxListeners](countingwritable.md#static-defaultmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:681 +Defined in node_modules/@types/node/base.d.ts:896 ___ @@ -156,7 +157,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[imageExtensions](sourcesource.md#static-imageextensions)* -*Defined in [lib/source-destination/source-destination.ts:232](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L232)* +*Defined in [lib/source-destination/source-destination.ts:252](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L252)* ___ @@ -166,7 +167,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[mimetype](sourcesource.md#static-optional-mimetype)* -*Defined in [lib/source-destination/source-destination.ts:244](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L244)* +*Defined in [lib/source-destination/source-destination.ts:264](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L264)* ___ @@ -176,7 +177,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[requiresRandomReadableSource](sourcesource.md#static-requiresrandomreadablesource)* -*Defined in [lib/source-destination/source-source.ts:20](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-source.ts#L20)* +*Defined in [lib/source-destination/source-source.ts:20](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-source.ts#L20)* ## Methods @@ -188,7 +189,7 @@ ___ *Overrides [SourceDestination](sourcedestination.md).[_close](sourcedestination.md#protected-_close)* -*Defined in [lib/source-destination/source-source.ts:30](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-source.ts#L30)* +*Defined in [lib/source-destination/source-source.ts:30](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-source.ts#L30)* **Returns:** *Promise‹void›* @@ -200,7 +201,7 @@ ___ *Overrides [SourceSource](sourcesource.md).[_getMetadata](sourcesource.md#protected-_getmetadata)* -*Defined in [lib/source-destination/zip.ts:118](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/zip.ts#L118)* +*Defined in [lib/source-destination/zip.ts:122](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/zip.ts#L122)* **Returns:** *Promise‹[Metadata](../interfaces/metadata.md)›* @@ -214,7 +215,7 @@ ___ *Overrides [SourceDestination](sourcedestination.md).[_open](sourcedestination.md#protected-_open)* -*Defined in [lib/source-destination/source-source.ts:26](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-source.ts#L26)* +*Defined in [lib/source-destination/source-source.ts:26](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-source.ts#L26)* **Returns:** *Promise‹void›* @@ -222,20 +223,27 @@ ___ ### addListener -▸ **addListener**(`event`: string | symbol, `listener`: Function): *this* +▸ **addListener**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[addListener](sourcesource.md#addlistener)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[addListener](../interfaces/sparsereadable.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:683 +Defined in node_modules/@types/node/base.d.ts:898 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -247,7 +255,7 @@ ___ *Overrides [SourceSource](sourcesource.md).[canCreateReadStream](sourcesource.md#cancreatereadstream)* -*Defined in [lib/source-destination/zip.ts:79](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/zip.ts#L79)* +*Defined in [lib/source-destination/zip.ts:84](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/zip.ts#L84)* **Returns:** *Promise‹boolean›* @@ -259,7 +267,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[canCreateSparseReadStream](sourcesource.md#cancreatesparsereadstream)* -*Defined in [lib/source-destination/source-destination.ts:268](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L268)* +*Defined in [lib/source-destination/source-destination.ts:292](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L292)* **Returns:** *Promise‹boolean›* @@ -271,7 +279,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[canCreateSparseWriteStream](sourcesource.md#cancreatesparsewritestream)* -*Defined in [lib/source-destination/source-destination.ts:276](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L276)* +*Defined in [lib/source-destination/source-destination.ts:300](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L300)* **Returns:** *Promise‹boolean›* @@ -283,7 +291,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[canCreateWriteStream](sourcesource.md#cancreatewritestream)* -*Defined in [lib/source-destination/source-destination.ts:272](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L272)* +*Defined in [lib/source-destination/source-destination.ts:296](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L296)* **Returns:** *Promise‹boolean›* @@ -295,7 +303,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[canRead](sourcesource.md#canread)* -*Defined in [lib/source-destination/source-destination.ts:256](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L256)* +*Defined in [lib/source-destination/source-destination.ts:280](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L280)* **Returns:** *Promise‹boolean›* @@ -307,7 +315,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[canWrite](sourcesource.md#canwrite)* -*Defined in [lib/source-destination/source-destination.ts:260](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L260)* +*Defined in [lib/source-destination/source-destination.ts:284](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L284)* **Returns:** *Promise‹boolean›* @@ -319,7 +327,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[close](sourcesource.md#close)* -*Defined in [lib/source-destination/source-destination.ts:342](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L342)* +*Defined in [lib/source-destination/source-destination.ts:368](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L368)* **Returns:** *Promise‹void›* @@ -327,19 +335,20 @@ ___ ### createReadStream -▸ **createReadStream**(`_emitProgress`: boolean, `start`: number, `end?`: undefined | number): *Promise‹ReadableStream›* +▸ **createReadStream**(`__namedParameters`: object): *Promise‹ReadableStream›* *Overrides [SourceSource](sourcesource.md).[createReadStream](sourcesource.md#createreadstream)* -*Defined in [lib/source-destination/zip.ts:101](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/zip.ts#L101)* +*Defined in [lib/source-destination/zip.ts:106](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/zip.ts#L106)* **Parameters:** +▪`Default value` **__namedParameters**: *object*= {} + Name | Type | Default | ------ | ------ | ------ | -`_emitProgress` | boolean | false | +`end` | undefined | number | - | `start` | number | 0 | -`end?` | undefined | number | - | **Returns:** *Promise‹ReadableStream›* @@ -347,17 +356,17 @@ ___ ### createSparseReadStream -▸ **createSparseReadStream**(`_generateChecksums`: boolean): *Promise‹[SparseReadable](../interfaces/sparsereadable.md)›* +▸ **createSparseReadStream**(`_options`: [CreateSparseReadStreamOptions](../interfaces/createsparsereadstreamoptions.md)): *Promise‹[SparseReadable](../interfaces/sparsereadable.md)›* *Inherited from [SourceSource](sourcesource.md).[createSparseReadStream](sourcesource.md#createsparsereadstream)* -*Defined in [lib/source-destination/source-destination.ts:317](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L317)* +*Defined in [lib/source-destination/source-destination.ts:339](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L339)* **Parameters:** Name | Type | Default | ------ | ------ | ------ | -`_generateChecksums` | boolean | false | +`_options` | [CreateSparseReadStreamOptions](../interfaces/createsparsereadstreamoptions.md) | {} | **Returns:** *Promise‹[SparseReadable](../interfaces/sparsereadable.md)›* @@ -365,11 +374,19 @@ ___ ### createSparseWriteStream -▸ **createSparseWriteStream**(): *Promise‹[SparseWritable](../interfaces/sparsewritable.md)›* +▸ **createSparseWriteStream**(`_options`: object): *Promise‹[SparseWritable](../interfaces/sparsewritable.md)›* *Inherited from [SourceSource](sourcesource.md).[createSparseWriteStream](sourcesource.md#createsparsewritestream)* -*Defined in [lib/source-destination/source-destination.ts:331](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L331)* +*Defined in [lib/source-destination/source-destination.ts:355](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L355)* + +**Parameters:** + +▪`Default value` **_options**: *object*= {} + +Name | Type | +------ | ------ | +`highWaterMark?` | undefined | number | **Returns:** *Promise‹[SparseWritable](../interfaces/sparsewritable.md)›* @@ -381,7 +398,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[createVerifier](sourcesource.md#createverifier)* -*Defined in [lib/source-destination/source-destination.ts:357](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L357)* +*Defined in [lib/source-destination/source-destination.ts:383](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L383)* **Parameters:** @@ -396,11 +413,19 @@ ___ ### createWriteStream -▸ **createWriteStream**(): *Promise‹WritableStream›* +▸ **createWriteStream**(`_options`: object): *Promise‹WritableStream›* *Inherited from [SourceSource](sourcesource.md).[createWriteStream](sourcesource.md#createwritestream)* -*Defined in [lib/source-destination/source-destination.ts:327](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L327)* +*Defined in [lib/source-destination/source-destination.ts:349](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L349)* + +**Parameters:** + +▪`Default value` **_options**: *object*= {} + +Name | Type | +------ | ------ | +`highWaterMark?` | undefined | number | **Returns:** *Promise‹WritableStream›* @@ -414,7 +439,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[emit](../interfaces/sparsereadable.md#emit)* -Defined in node_modules/@types/node/base.d.ts:693 +Defined in node_modules/@types/node/base.d.ts:908 **Parameters:** @@ -429,15 +454,27 @@ ___ ### eventNames -▸ **eventNames**(): *string | symbol[]* +▸ **eventNames**(): *Array‹string | symbol›* *Inherited from [CountingWritable](countingwritable.md).[eventNames](countingwritable.md#eventnames)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[eventNames](../interfaces/sparsereadable.md#eventnames)* -Defined in node_modules/@types/node/base.d.ts:694 +Defined in node_modules/@types/node/base.d.ts:909 -**Returns:** *string | symbol[]* +**Returns:** *Array‹string | symbol›* + +___ + +### getAlignment + +▸ **getAlignment**(): *number | undefined* + +*Inherited from [SourceSource](sourcesource.md).[getAlignment](sourcesource.md#getalignment)* + +*Defined in [lib/source-destination/source-destination.ts:276](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L276)* + +**Returns:** *number | undefined* ___ @@ -447,7 +484,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[getBlocks](sourcesource.md#getblocks)* -*Defined in [lib/source-destination/source-destination.ts:323](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L323)* +*Defined in [lib/source-destination/source-destination.ts:345](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L345)* **Returns:** *Promise‹[BlocksWithChecksum](../interfaces/blockswithchecksum.md)[]›* @@ -457,7 +494,7 @@ ___ ▸ **getEntry**(): *Promise‹ZipStreamEntry›* -*Defined in [lib/source-destination/zip.ts:83](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/zip.ts#L83)* +*Defined in [lib/source-destination/zip.ts:88](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/zip.ts#L88)* **Returns:** *Promise‹ZipStreamEntry›* @@ -469,7 +506,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[getInnerSource](sourcesource.md#getinnersource)* -*Defined in [lib/source-destination/source-destination.ts:424](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L424)* +*Defined in [lib/source-destination/source-destination.ts:452](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L452)* **Returns:** *Promise‹[SourceDestination](sourcedestination.md)›* @@ -483,7 +520,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[getMaxListeners](../interfaces/sparsereadable.md#getmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:691 +Defined in node_modules/@types/node/base.d.ts:906 **Returns:** *number* @@ -495,7 +532,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[getMetadata](sourcesource.md#getmetadata)* -*Defined in [lib/source-destination/source-destination.ts:280](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L280)* +*Defined in [lib/source-destination/source-destination.ts:304](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L304)* **Returns:** *Promise‹[Metadata](../interfaces/metadata.md)›* @@ -507,7 +544,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[getPartitionTable](sourcesource.md#getpartitiontable)* -*Defined in [lib/source-destination/source-destination.ts:445](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L445)* +*Defined in [lib/source-destination/source-destination.ts:473](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L473)* **Returns:** *Promise‹GetPartitionsResult | undefined›* @@ -521,7 +558,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[listenerCount](../interfaces/sparsereadable.md#listenercount)* -Defined in node_modules/@types/node/base.d.ts:695 +Defined in node_modules/@types/node/base.d.ts:910 **Parameters:** @@ -541,7 +578,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[listeners](../interfaces/sparsereadable.md#listeners)* -Defined in node_modules/@types/node/base.d.ts:692 +Defined in node_modules/@types/node/base.d.ts:907 **Parameters:** @@ -555,20 +592,27 @@ ___ ### on -▸ **on**(`event`: string | symbol, `listener`: Function): *this* +▸ **on**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[on](sourcesource.md#on)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[on](../interfaces/sparsereadable.md#on)* -Defined in node_modules/@types/node/base.d.ts:684 +Defined in node_modules/@types/node/base.d.ts:899 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -576,20 +620,27 @@ ___ ### once -▸ **once**(`event`: string | symbol, `listener`: Function): *this* +▸ **once**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[once](sourcesource.md#once)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[once](../interfaces/sparsereadable.md#once)* -Defined in node_modules/@types/node/base.d.ts:685 +Defined in node_modules/@types/node/base.d.ts:900 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -601,7 +652,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[open](sourcesource.md#open)* -*Defined in [lib/source-destination/source-destination.ts:335](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L335)* +*Defined in [lib/source-destination/source-destination.ts:361](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L361)* **Returns:** *Promise‹void›* @@ -609,20 +660,27 @@ ___ ### prependListener -▸ **prependListener**(`event`: string | symbol, `listener`: Function): *this* +▸ **prependListener**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[prependListener](sourcesource.md#prependlistener)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[prependListener](../interfaces/sparsereadable.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:686 +Defined in node_modules/@types/node/base.d.ts:901 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -630,20 +688,27 @@ ___ ### prependOnceListener -▸ **prependOnceListener**(`event`: string | symbol, `listener`: Function): *this* +▸ **prependOnceListener**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[prependOnceListener](sourcesource.md#prependoncelistener)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[prependOnceListener](../interfaces/sparsereadable.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:687 +Defined in node_modules/@types/node/base.d.ts:902 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -651,17 +716,17 @@ ___ ### read -▸ **read**(`_buffer`: Buffer, `_bufferOffset`: number, `_length`: number, `_sourceOffset`: number): *Promise‹ReadResult›* +▸ **read**(`_buffer`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer), `_bufferOffset`: number, `_length`: number, `_sourceOffset`: number): *Promise‹ReadResult›* *Inherited from [SourceSource](sourcesource.md).[read](sourcesource.md#read)* -*Defined in [lib/source-destination/source-destination.ts:291](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L291)* +*Defined in [lib/source-destination/source-destination.ts:315](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L315)* **Parameters:** Name | Type | ------ | ------ | -`_buffer` | Buffer | +`_buffer` | [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | `_bufferOffset` | number | `_length` | number | `_sourceOffset` | number | @@ -678,7 +743,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[removeAllListeners](../interfaces/sparsereadable.md#removealllisteners)* -Defined in node_modules/@types/node/base.d.ts:689 +Defined in node_modules/@types/node/base.d.ts:904 **Parameters:** @@ -692,20 +757,27 @@ ___ ### removeListener -▸ **removeListener**(`event`: string | symbol, `listener`: Function): *this* +▸ **removeListener**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[removeListener](sourcesource.md#removelistener)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[removeListener](../interfaces/sparsereadable.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:688 +Defined in node_modules/@types/node/base.d.ts:903 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -719,7 +791,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[setMaxListeners](../interfaces/sparsereadable.md#setmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:690 +Defined in node_modules/@types/node/base.d.ts:905 **Parameters:** @@ -733,17 +805,17 @@ ___ ### write -▸ **write**(`_buffer`: Buffer, `_bufferOffset`: number, `_length`: number, `_fileOffset`: number): *Promise‹WriteResult›* +▸ **write**(`_buffer`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer), `_bufferOffset`: number, `_length`: number, `_fileOffset`: number): *Promise‹WriteResult›* *Inherited from [SourceSource](sourcesource.md).[write](sourcesource.md#write)* -*Defined in [lib/source-destination/source-destination.ts:300](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L300)* +*Defined in [lib/source-destination/source-destination.ts:324](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L324)* **Parameters:** Name | Type | ------ | ------ | -`_buffer` | Buffer | +`_buffer` | [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | `_bufferOffset` | number | `_length` | number | `_fileOffset` | number | @@ -758,7 +830,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[listenerCount](countingwritable.md#static-listenercount)* -Defined in node_modules/@types/node/base.d.ts:680 +Defined in node_modules/@types/node/base.d.ts:895 **Parameters:** @@ -777,7 +849,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[register](sourcesource.md#static-register)* -*Defined in [lib/source-destination/source-destination.ts:250](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L250)* +*Defined in [lib/source-destination/source-destination.ts:270](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L270)* **Parameters:** diff --git a/doc/classes/usbbootdeviceadapter.md b/doc/classes/usbbootdeviceadapter.md index 01918757..8d9eef13 100644 --- a/doc/classes/usbbootdeviceadapter.md +++ b/doc/classes/usbbootdeviceadapter.md @@ -47,7 +47,7 @@ \+ **new UsbbootDeviceAdapter**(): *[UsbbootDeviceAdapter](usbbootdeviceadapter.md)* -*Defined in [lib/scanner/adapters/usbboot.ts:28](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/scanner/adapters/usbboot.ts#L28)* +*Defined in [lib/scanner/adapters/usbboot.ts:28](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/scanner/adapters/usbboot.ts#L28)* **Returns:** *[UsbbootDeviceAdapter](usbbootdeviceadapter.md)* @@ -57,7 +57,7 @@ • **drives**: *Map‹UsbbootDevice, [UsbbootDrive](usbbootdrive.md)›* = new Map() -*Defined in [lib/scanner/adapters/usbboot.ts:27](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/scanner/adapters/usbboot.ts#L27)* +*Defined in [lib/scanner/adapters/usbboot.ts:27](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/scanner/adapters/usbboot.ts#L27)* ___ @@ -65,7 +65,7 @@ ___ • **scanner**: *UsbbootScannerType* -*Defined in [lib/scanner/adapters/usbboot.ts:28](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/scanner/adapters/usbboot.ts#L28)* +*Defined in [lib/scanner/adapters/usbboot.ts:28](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/scanner/adapters/usbboot.ts#L28)* ___ @@ -75,26 +75,33 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[defaultMaxListeners](countingwritable.md#static-defaultmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:681 +Defined in node_modules/@types/node/base.d.ts:896 ## Methods ### addListener -▸ **addListener**(`event`: string | symbol, `listener`: Function): *this* +▸ **addListener**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[addListener](sourcesource.md#addlistener)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[addListener](../interfaces/sparsereadable.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:683 +Defined in node_modules/@types/node/base.d.ts:898 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -108,7 +115,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[emit](../interfaces/sparsereadable.md#emit)* -Defined in node_modules/@types/node/base.d.ts:693 +Defined in node_modules/@types/node/base.d.ts:908 **Parameters:** @@ -123,15 +130,15 @@ ___ ### eventNames -▸ **eventNames**(): *string | symbol[]* +▸ **eventNames**(): *Array‹string | symbol›* *Inherited from [CountingWritable](countingwritable.md).[eventNames](countingwritable.md#eventnames)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[eventNames](../interfaces/sparsereadable.md#eventnames)* -Defined in node_modules/@types/node/base.d.ts:694 +Defined in node_modules/@types/node/base.d.ts:909 -**Returns:** *string | symbol[]* +**Returns:** *Array‹string | symbol›* ___ @@ -143,7 +150,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[getMaxListeners](../interfaces/sparsereadable.md#getmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:691 +Defined in node_modules/@types/node/base.d.ts:906 **Returns:** *number* @@ -157,7 +164,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[listenerCount](../interfaces/sparsereadable.md#listenercount)* -Defined in node_modules/@types/node/base.d.ts:695 +Defined in node_modules/@types/node/base.d.ts:910 **Parameters:** @@ -177,7 +184,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[listeners](../interfaces/sparsereadable.md#listeners)* -Defined in node_modules/@types/node/base.d.ts:692 +Defined in node_modules/@types/node/base.d.ts:907 **Parameters:** @@ -191,20 +198,27 @@ ___ ### on -▸ **on**(`event`: string | symbol, `listener`: Function): *this* +▸ **on**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[on](sourcesource.md#on)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[on](../interfaces/sparsereadable.md#on)* -Defined in node_modules/@types/node/base.d.ts:684 +Defined in node_modules/@types/node/base.d.ts:899 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -214,7 +228,7 @@ ___ ▸ **onAttach**(`device`: UsbbootDevice): *void* -*Defined in [lib/scanner/adapters/usbboot.ts:53](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/scanner/adapters/usbboot.ts#L53)* +*Defined in [lib/scanner/adapters/usbboot.ts:53](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/scanner/adapters/usbboot.ts#L53)* **Parameters:** @@ -230,7 +244,7 @@ ___ ▸ **onDetach**(`device`: UsbbootDevice): *void* -*Defined in [lib/scanner/adapters/usbboot.ts:62](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/scanner/adapters/usbboot.ts#L62)* +*Defined in [lib/scanner/adapters/usbboot.ts:62](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/scanner/adapters/usbboot.ts#L62)* **Parameters:** @@ -244,20 +258,27 @@ ___ ### once -▸ **once**(`event`: string | symbol, `listener`: Function): *this* +▸ **once**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[once](sourcesource.md#once)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[once](../interfaces/sparsereadable.md#once)* -Defined in node_modules/@types/node/base.d.ts:685 +Defined in node_modules/@types/node/base.d.ts:900 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -265,20 +286,27 @@ ___ ### prependListener -▸ **prependListener**(`event`: string | symbol, `listener`: Function): *this* +▸ **prependListener**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[prependListener](sourcesource.md#prependlistener)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[prependListener](../interfaces/sparsereadable.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:686 +Defined in node_modules/@types/node/base.d.ts:901 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -286,20 +314,27 @@ ___ ### prependOnceListener -▸ **prependOnceListener**(`event`: string | symbol, `listener`: Function): *this* +▸ **prependOnceListener**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[prependOnceListener](sourcesource.md#prependoncelistener)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[prependOnceListener](../interfaces/sparsereadable.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:687 +Defined in node_modules/@types/node/base.d.ts:902 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -313,7 +348,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[removeAllListeners](../interfaces/sparsereadable.md#removealllisteners)* -Defined in node_modules/@types/node/base.d.ts:689 +Defined in node_modules/@types/node/base.d.ts:904 **Parameters:** @@ -327,20 +362,27 @@ ___ ### removeListener -▸ **removeListener**(`event`: string | symbol, `listener`: Function): *this* +▸ **removeListener**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[removeListener](sourcesource.md#removelistener)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[removeListener](../interfaces/sparsereadable.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:688 +Defined in node_modules/@types/node/base.d.ts:903 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -354,7 +396,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[setMaxListeners](../interfaces/sparsereadable.md#setmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:690 +Defined in node_modules/@types/node/base.d.ts:905 **Parameters:** @@ -372,7 +414,7 @@ ___ *Overrides [Adapter](adapter.md).[start](adapter.md#abstract-start)* -*Defined in [lib/scanner/adapters/usbboot.ts:45](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/scanner/adapters/usbboot.ts#L45)* +*Defined in [lib/scanner/adapters/usbboot.ts:45](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/scanner/adapters/usbboot.ts#L45)* **Returns:** *void* @@ -384,7 +426,7 @@ ___ *Overrides [Adapter](adapter.md).[stop](adapter.md#abstract-stop)* -*Defined in [lib/scanner/adapters/usbboot.ts:49](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/scanner/adapters/usbboot.ts#L49)* +*Defined in [lib/scanner/adapters/usbboot.ts:49](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/scanner/adapters/usbboot.ts#L49)* **Returns:** *void* @@ -396,7 +438,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[listenerCount](countingwritable.md#static-listenercount)* -Defined in node_modules/@types/node/base.d.ts:680 +Defined in node_modules/@types/node/base.d.ts:895 **Parameters:** diff --git a/doc/classes/usbbootdrive.md b/doc/classes/usbbootdrive.md index dbc13773..a36a2d49 100644 --- a/doc/classes/usbbootdrive.md +++ b/doc/classes/usbbootdrive.md @@ -57,6 +57,7 @@ * [createWriteStream](usbbootdrive.md#createwritestream) * [emit](usbbootdrive.md#emit) * [eventNames](usbbootdrive.md#eventnames) +* [getAlignment](usbbootdrive.md#getalignment) * [getBlocks](usbbootdrive.md#getblocks) * [getInnerSource](usbbootdrive.md#getinnersource) * [getMaxListeners](usbbootdrive.md#getmaxlisteners) @@ -83,7 +84,7 @@ \+ **new UsbbootDrive**(`usbDevice`: UsbbootDevice): *[UsbbootDrive](usbbootdrive.md)* -*Defined in [lib/source-destination/usbboot.ts:35](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/usbboot.ts#L35)* +*Defined in [lib/source-destination/usbboot.ts:35](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/usbboot.ts#L35)* **Parameters:** @@ -101,7 +102,7 @@ Name | Type | *Implementation of [AdapterSourceDestination](../interfaces/adaptersourcedestination.md).[description](../interfaces/adaptersourcedestination.md#description)* -*Defined in [lib/source-destination/usbboot.ts:30](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/usbboot.ts#L30)* +*Defined in [lib/source-destination/usbboot.ts:30](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/usbboot.ts#L30)* ___ @@ -111,7 +112,7 @@ ___ *Implementation of [AdapterSourceDestination](../interfaces/adaptersourcedestination.md).[device](../interfaces/adaptersourcedestination.md#device)* -*Defined in [lib/source-destination/usbboot.ts:26](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/usbboot.ts#L26)* +*Defined in [lib/source-destination/usbboot.ts:26](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/usbboot.ts#L26)* ___ @@ -121,7 +122,7 @@ ___ *Implementation of [AdapterSourceDestination](../interfaces/adaptersourcedestination.md).[devicePath](../interfaces/adaptersourcedestination.md#devicepath)* -*Defined in [lib/source-destination/usbboot.ts:27](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/usbboot.ts#L27)* +*Defined in [lib/source-destination/usbboot.ts:27](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/usbboot.ts#L27)* ___ @@ -129,7 +130,7 @@ ___ • **disabled**: *boolean* = true -*Defined in [lib/source-destination/usbboot.ts:33](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/usbboot.ts#L33)* +*Defined in [lib/source-destination/usbboot.ts:33](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/usbboot.ts#L33)* ___ @@ -137,7 +138,7 @@ ___ • **displayName**: *string* = "Initializing device" -*Defined in [lib/source-destination/usbboot.ts:25](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/usbboot.ts#L25)* +*Defined in [lib/source-destination/usbboot.ts:25](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/usbboot.ts#L25)* ___ @@ -147,7 +148,7 @@ ___ *Implementation of [AdapterSourceDestination](../interfaces/adaptersourcedestination.md).[emitsProgress](../interfaces/adaptersourcedestination.md#emitsprogress)* -*Defined in [lib/source-destination/usbboot.ts:35](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/usbboot.ts#L35)* +*Defined in [lib/source-destination/usbboot.ts:35](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/usbboot.ts#L35)* ___ @@ -155,7 +156,7 @@ ___ • **icon**: *string* = "loading" -*Defined in [lib/source-destination/usbboot.ts:28](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/usbboot.ts#L28)* +*Defined in [lib/source-destination/usbboot.ts:28](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/usbboot.ts#L28)* ___ @@ -163,7 +164,7 @@ ___ • **isReadOnly**: *boolean* = false -*Defined in [lib/source-destination/usbboot.ts:32](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/usbboot.ts#L32)* +*Defined in [lib/source-destination/usbboot.ts:32](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/usbboot.ts#L32)* ___ @@ -173,7 +174,7 @@ ___ *Implementation of [AdapterSourceDestination](../interfaces/adaptersourcedestination.md).[isSystem](../interfaces/adaptersourcedestination.md#issystem)* -*Defined in [lib/source-destination/usbboot.ts:29](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/usbboot.ts#L29)* +*Defined in [lib/source-destination/usbboot.ts:29](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/usbboot.ts#L29)* ___ @@ -183,7 +184,7 @@ ___ *Implementation of [AdapterSourceDestination](../interfaces/adaptersourcedestination.md).[mountpoints](../interfaces/adaptersourcedestination.md#mountpoints)* -*Defined in [lib/source-destination/usbboot.ts:31](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/usbboot.ts#L31)* +*Defined in [lib/source-destination/usbboot.ts:31](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/usbboot.ts#L31)* ___ @@ -193,7 +194,7 @@ ___ *Implementation of [AdapterSourceDestination](../interfaces/adaptersourcedestination.md).[raw](../interfaces/adaptersourcedestination.md#raw)* -*Defined in [lib/source-destination/usbboot.ts:24](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/usbboot.ts#L24)* +*Defined in [lib/source-destination/usbboot.ts:24](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/usbboot.ts#L24)* ___ @@ -203,7 +204,7 @@ ___ *Implementation of [AdapterSourceDestination](../interfaces/adaptersourcedestination.md).[size](../interfaces/adaptersourcedestination.md#size)* -*Defined in [lib/source-destination/usbboot.ts:34](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/usbboot.ts#L34)* +*Defined in [lib/source-destination/usbboot.ts:34](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/usbboot.ts#L34)* ___ @@ -211,7 +212,7 @@ ___ • **usbDevice**: *UsbbootDevice* -*Defined in [lib/source-destination/usbboot.ts:37](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/usbboot.ts#L37)* +*Defined in [lib/source-destination/usbboot.ts:37](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/usbboot.ts#L37)* ___ @@ -223,7 +224,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[defaultMaxListeners](countingwritable.md#static-defaultmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:681 +Defined in node_modules/@types/node/base.d.ts:896 ___ @@ -246,7 +247,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[imageExtensions](sourcesource.md#static-imageextensions)* -*Defined in [lib/source-destination/source-destination.ts:232](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L232)* +*Defined in [lib/source-destination/source-destination.ts:252](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L252)* ___ @@ -258,7 +259,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[mimetype](sourcesource.md#static-optional-mimetype)* -*Defined in [lib/source-destination/source-destination.ts:244](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L244)* +*Defined in [lib/source-destination/source-destination.ts:264](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L264)* ## Methods @@ -270,7 +271,7 @@ ___ *Inherited from [SourceDestination](sourcedestination.md).[_close](sourcedestination.md#protected-_close)* -*Defined in [lib/source-destination/source-destination.ts:353](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L353)* +*Defined in [lib/source-destination/source-destination.ts:379](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L379)* **Returns:** *Promise‹void›* @@ -284,7 +285,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[_getMetadata](sourcesource.md#protected-_getmetadata)* -*Defined in [lib/source-destination/source-destination.ts:287](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L287)* +*Defined in [lib/source-destination/source-destination.ts:311](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L311)* **Returns:** *Promise‹[Metadata](../interfaces/metadata.md)›* @@ -298,7 +299,7 @@ ___ *Inherited from [SourceDestination](sourcedestination.md).[_open](sourcedestination.md#protected-_open)* -*Defined in [lib/source-destination/source-destination.ts:349](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L349)* +*Defined in [lib/source-destination/source-destination.ts:375](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L375)* **Returns:** *Promise‹void›* @@ -306,22 +307,27 @@ ___ ### addListener -▸ **addListener**(`event`: string | symbol, `listener`: Function): *this* - -*Implementation of [AdapterSourceDestination](../interfaces/adaptersourcedestination.md)* +▸ **addListener**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[addListener](sourcesource.md#addlistener)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[addListener](../interfaces/sparsereadable.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:683 +Defined in node_modules/@types/node/base.d.ts:898 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -335,7 +341,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[canCreateReadStream](sourcesource.md#cancreatereadstream)* -*Defined in [lib/source-destination/source-destination.ts:264](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L264)* +*Defined in [lib/source-destination/source-destination.ts:288](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L288)* **Returns:** *Promise‹boolean›* @@ -349,7 +355,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[canCreateSparseReadStream](sourcesource.md#cancreatesparsereadstream)* -*Defined in [lib/source-destination/source-destination.ts:268](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L268)* +*Defined in [lib/source-destination/source-destination.ts:292](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L292)* **Returns:** *Promise‹boolean›* @@ -363,7 +369,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[canCreateSparseWriteStream](sourcesource.md#cancreatesparsewritestream)* -*Defined in [lib/source-destination/source-destination.ts:276](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L276)* +*Defined in [lib/source-destination/source-destination.ts:300](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L300)* **Returns:** *Promise‹boolean›* @@ -377,7 +383,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[canCreateWriteStream](sourcesource.md#cancreatewritestream)* -*Defined in [lib/source-destination/source-destination.ts:272](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L272)* +*Defined in [lib/source-destination/source-destination.ts:296](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L296)* **Returns:** *Promise‹boolean›* @@ -391,7 +397,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[canRead](sourcesource.md#canread)* -*Defined in [lib/source-destination/source-destination.ts:256](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L256)* +*Defined in [lib/source-destination/source-destination.ts:280](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L280)* **Returns:** *Promise‹boolean›* @@ -405,7 +411,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[canWrite](sourcesource.md#canwrite)* -*Defined in [lib/source-destination/source-destination.ts:260](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L260)* +*Defined in [lib/source-destination/source-destination.ts:284](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L284)* **Returns:** *Promise‹boolean›* @@ -419,7 +425,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[close](sourcesource.md#close)* -*Defined in [lib/source-destination/source-destination.ts:342](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L342)* +*Defined in [lib/source-destination/source-destination.ts:368](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L368)* **Returns:** *Promise‹void›* @@ -427,21 +433,19 @@ ___ ### createReadStream -▸ **createReadStream**(`_emitProgress`: boolean, `_start`: number, `_end?`: undefined | number): *Promise‹ReadableStream›* +▸ **createReadStream**(`_options`: [CreateReadStreamOptions](../interfaces/createreadstreamoptions.md)): *Promise‹ReadableStream›* *Implementation of [AdapterSourceDestination](../interfaces/adaptersourcedestination.md)* *Inherited from [SourceSource](sourcesource.md).[createReadStream](sourcesource.md#createreadstream)* -*Defined in [lib/source-destination/source-destination.ts:309](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L309)* +*Defined in [lib/source-destination/source-destination.ts:333](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L333)* **Parameters:** Name | Type | Default | ------ | ------ | ------ | -`_emitProgress` | boolean | false | -`_start` | number | 0 | -`_end?` | undefined | number | - | +`_options` | [CreateReadStreamOptions](../interfaces/createreadstreamoptions.md) | {} | **Returns:** *Promise‹ReadableStream›* @@ -449,19 +453,19 @@ ___ ### createSparseReadStream -▸ **createSparseReadStream**(`_generateChecksums`: boolean): *Promise‹[SparseReadable](../interfaces/sparsereadable.md)›* +▸ **createSparseReadStream**(`_options`: [CreateSparseReadStreamOptions](../interfaces/createsparsereadstreamoptions.md)): *Promise‹[SparseReadable](../interfaces/sparsereadable.md)›* *Implementation of [AdapterSourceDestination](../interfaces/adaptersourcedestination.md)* *Inherited from [SourceSource](sourcesource.md).[createSparseReadStream](sourcesource.md#createsparsereadstream)* -*Defined in [lib/source-destination/source-destination.ts:317](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L317)* +*Defined in [lib/source-destination/source-destination.ts:339](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L339)* **Parameters:** Name | Type | Default | ------ | ------ | ------ | -`_generateChecksums` | boolean | false | +`_options` | [CreateSparseReadStreamOptions](../interfaces/createsparsereadstreamoptions.md) | {} | **Returns:** *Promise‹[SparseReadable](../interfaces/sparsereadable.md)›* @@ -469,13 +473,19 @@ ___ ### createSparseWriteStream -▸ **createSparseWriteStream**(): *Promise‹[SparseWritable](../interfaces/sparsewritable.md)›* - -*Implementation of [AdapterSourceDestination](../interfaces/adaptersourcedestination.md)* +▸ **createSparseWriteStream**(`_options`: object): *Promise‹[SparseWritable](../interfaces/sparsewritable.md)›* *Inherited from [SourceSource](sourcesource.md).[createSparseWriteStream](sourcesource.md#createsparsewritestream)* -*Defined in [lib/source-destination/source-destination.ts:331](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L331)* +*Defined in [lib/source-destination/source-destination.ts:355](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L355)* + +**Parameters:** + +▪`Default value` **_options**: *object*= {} + +Name | Type | +------ | ------ | +`highWaterMark?` | undefined | number | **Returns:** *Promise‹[SparseWritable](../interfaces/sparsewritable.md)›* @@ -489,7 +499,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[createVerifier](sourcesource.md#createverifier)* -*Defined in [lib/source-destination/source-destination.ts:357](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L357)* +*Defined in [lib/source-destination/source-destination.ts:383](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L383)* **Parameters:** @@ -504,13 +514,19 @@ ___ ### createWriteStream -▸ **createWriteStream**(): *Promise‹WritableStream›* - -*Implementation of [AdapterSourceDestination](../interfaces/adaptersourcedestination.md)* +▸ **createWriteStream**(`_options`: object): *Promise‹WritableStream›* *Inherited from [SourceSource](sourcesource.md).[createWriteStream](sourcesource.md#createwritestream)* -*Defined in [lib/source-destination/source-destination.ts:327](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L327)* +*Defined in [lib/source-destination/source-destination.ts:349](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L349)* + +**Parameters:** + +▪`Default value` **_options**: *object*= {} + +Name | Type | +------ | ------ | +`highWaterMark?` | undefined | number | **Returns:** *Promise‹WritableStream›* @@ -526,7 +542,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[emit](../interfaces/sparsereadable.md#emit)* -Defined in node_modules/@types/node/base.d.ts:693 +Defined in node_modules/@types/node/base.d.ts:908 **Parameters:** @@ -541,7 +557,7 @@ ___ ### eventNames -▸ **eventNames**(): *string | symbol[]* +▸ **eventNames**(): *Array‹string | symbol›* *Implementation of [AdapterSourceDestination](../interfaces/adaptersourcedestination.md)* @@ -549,9 +565,23 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[eventNames](../interfaces/sparsereadable.md#eventnames)* -Defined in node_modules/@types/node/base.d.ts:694 +Defined in node_modules/@types/node/base.d.ts:909 + +**Returns:** *Array‹string | symbol›* + +___ + +### getAlignment + +▸ **getAlignment**(): *number | undefined* -**Returns:** *string | symbol[]* +*Implementation of [AdapterSourceDestination](../interfaces/adaptersourcedestination.md)* + +*Inherited from [SourceSource](sourcesource.md).[getAlignment](sourcesource.md#getalignment)* + +*Defined in [lib/source-destination/source-destination.ts:276](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L276)* + +**Returns:** *number | undefined* ___ @@ -563,7 +593,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[getBlocks](sourcesource.md#getblocks)* -*Defined in [lib/source-destination/source-destination.ts:323](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L323)* +*Defined in [lib/source-destination/source-destination.ts:345](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L345)* **Returns:** *Promise‹[BlocksWithChecksum](../interfaces/blockswithchecksum.md)[]›* @@ -577,7 +607,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[getInnerSource](sourcesource.md#getinnersource)* -*Defined in [lib/source-destination/source-destination.ts:424](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L424)* +*Defined in [lib/source-destination/source-destination.ts:452](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L452)* **Returns:** *Promise‹[SourceDestination](sourcedestination.md)›* @@ -593,7 +623,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[getMaxListeners](../interfaces/sparsereadable.md#getmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:691 +Defined in node_modules/@types/node/base.d.ts:906 **Returns:** *number* @@ -607,7 +637,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[getMetadata](sourcesource.md#getmetadata)* -*Defined in [lib/source-destination/source-destination.ts:280](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L280)* +*Defined in [lib/source-destination/source-destination.ts:304](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L304)* **Returns:** *Promise‹[Metadata](../interfaces/metadata.md)›* @@ -621,7 +651,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[getPartitionTable](sourcesource.md#getpartitiontable)* -*Defined in [lib/source-destination/source-destination.ts:445](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L445)* +*Defined in [lib/source-destination/source-destination.ts:473](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L473)* **Returns:** *Promise‹GetPartitionsResult | undefined›* @@ -637,7 +667,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[listenerCount](../interfaces/sparsereadable.md#listenercount)* -Defined in node_modules/@types/node/base.d.ts:695 +Defined in node_modules/@types/node/base.d.ts:910 **Parameters:** @@ -659,7 +689,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[listeners](../interfaces/sparsereadable.md#listeners)* -Defined in node_modules/@types/node/base.d.ts:692 +Defined in node_modules/@types/node/base.d.ts:907 **Parameters:** @@ -673,22 +703,27 @@ ___ ### on -▸ **on**(`event`: string | symbol, `listener`: Function): *this* - -*Implementation of [AdapterSourceDestination](../interfaces/adaptersourcedestination.md)* +▸ **on**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[on](sourcesource.md#on)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[on](../interfaces/sparsereadable.md#on)* -Defined in node_modules/@types/node/base.d.ts:684 +Defined in node_modules/@types/node/base.d.ts:899 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -696,22 +731,27 @@ ___ ### once -▸ **once**(`event`: string | symbol, `listener`: Function): *this* - -*Implementation of [AdapterSourceDestination](../interfaces/adaptersourcedestination.md)* +▸ **once**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[once](sourcesource.md#once)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[once](../interfaces/sparsereadable.md#once)* -Defined in node_modules/@types/node/base.d.ts:685 +Defined in node_modules/@types/node/base.d.ts:900 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -725,7 +765,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[open](sourcesource.md#open)* -*Defined in [lib/source-destination/source-destination.ts:335](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L335)* +*Defined in [lib/source-destination/source-destination.ts:361](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L361)* **Returns:** *Promise‹void›* @@ -733,22 +773,27 @@ ___ ### prependListener -▸ **prependListener**(`event`: string | symbol, `listener`: Function): *this* - -*Implementation of [AdapterSourceDestination](../interfaces/adaptersourcedestination.md)* +▸ **prependListener**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[prependListener](sourcesource.md#prependlistener)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[prependListener](../interfaces/sparsereadable.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:686 +Defined in node_modules/@types/node/base.d.ts:901 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -756,22 +801,27 @@ ___ ### prependOnceListener -▸ **prependOnceListener**(`event`: string | symbol, `listener`: Function): *this* - -*Implementation of [AdapterSourceDestination](../interfaces/adaptersourcedestination.md)* +▸ **prependOnceListener**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[prependOnceListener](sourcesource.md#prependoncelistener)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[prependOnceListener](../interfaces/sparsereadable.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:687 +Defined in node_modules/@types/node/base.d.ts:902 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -779,19 +829,19 @@ ___ ### read -▸ **read**(`_buffer`: Buffer, `_bufferOffset`: number, `_length`: number, `_sourceOffset`: number): *Promise‹ReadResult›* +▸ **read**(`_buffer`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer), `_bufferOffset`: number, `_length`: number, `_sourceOffset`: number): *Promise‹ReadResult›* *Implementation of [AdapterSourceDestination](../interfaces/adaptersourcedestination.md)* *Inherited from [SourceSource](sourcesource.md).[read](sourcesource.md#read)* -*Defined in [lib/source-destination/source-destination.ts:291](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L291)* +*Defined in [lib/source-destination/source-destination.ts:315](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L315)* **Parameters:** Name | Type | ------ | ------ | -`_buffer` | Buffer | +`_buffer` | [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | `_bufferOffset` | number | `_length` | number | `_sourceOffset` | number | @@ -810,7 +860,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[removeAllListeners](../interfaces/sparsereadable.md#removealllisteners)* -Defined in node_modules/@types/node/base.d.ts:689 +Defined in node_modules/@types/node/base.d.ts:904 **Parameters:** @@ -824,22 +874,27 @@ ___ ### removeListener -▸ **removeListener**(`event`: string | symbol, `listener`: Function): *this* - -*Implementation of [AdapterSourceDestination](../interfaces/adaptersourcedestination.md)* +▸ **removeListener**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[removeListener](sourcesource.md#removelistener)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[removeListener](../interfaces/sparsereadable.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:688 +Defined in node_modules/@types/node/base.d.ts:903 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -855,7 +910,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[setMaxListeners](../interfaces/sparsereadable.md#setmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:690 +Defined in node_modules/@types/node/base.d.ts:905 **Parameters:** @@ -869,19 +924,19 @@ ___ ### write -▸ **write**(`_buffer`: Buffer, `_bufferOffset`: number, `_length`: number, `_fileOffset`: number): *Promise‹WriteResult›* +▸ **write**(`_buffer`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer), `_bufferOffset`: number, `_length`: number, `_fileOffset`: number): *Promise‹WriteResult›* *Implementation of [AdapterSourceDestination](../interfaces/adaptersourcedestination.md)* *Inherited from [SourceSource](sourcesource.md).[write](sourcesource.md#write)* -*Defined in [lib/source-destination/source-destination.ts:300](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L300)* +*Defined in [lib/source-destination/source-destination.ts:324](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L324)* **Parameters:** Name | Type | ------ | ------ | -`_buffer` | Buffer | +`_buffer` | [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | `_bufferOffset` | number | `_length` | number | `_fileOffset` | number | @@ -898,7 +953,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[listenerCount](countingwritable.md#static-listenercount)* -Defined in node_modules/@types/node/base.d.ts:680 +Defined in node_modules/@types/node/base.d.ts:895 **Parameters:** @@ -919,7 +974,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[register](sourcesource.md#static-register)* -*Defined in [lib/source-destination/source-destination.ts:250](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L250)* +*Defined in [lib/source-destination/source-destination.ts:270](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L270)* **Parameters:** diff --git a/doc/classes/verificationerror.md b/doc/classes/verificationerror.md index feeaaad1..a57fdebd 100644 --- a/doc/classes/verificationerror.md +++ b/doc/classes/verificationerror.md @@ -28,7 +28,7 @@ • **code**: *string* = "EVALIDATION" -*Defined in [lib/errors.ts:24](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/errors.ts#L24)* +*Defined in [lib/errors.ts:24](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/errors.ts#L24)* ___ @@ -38,7 +38,7 @@ ___ *Inherited from [NotCapable](notcapable.md).[message](notcapable.md#message)* -Defined in node_modules/typedoc/node_modules/typescript/lib/lib.es5.d.ts:974 +Defined in node_modules/typescript/lib/lib.es5.d.ts:974 ___ @@ -48,7 +48,7 @@ ___ *Inherited from [NotCapable](notcapable.md).[name](notcapable.md#name)* -Defined in node_modules/typedoc/node_modules/typescript/lib/lib.es5.d.ts:973 +Defined in node_modules/typescript/lib/lib.es5.d.ts:973 ___ @@ -60,7 +60,7 @@ ___ *Overrides [NotCapable](notcapable.md).[stack](notcapable.md#optional-stack)* -Defined in node_modules/typedoc/node_modules/typescript/lib/lib.es5.d.ts:975 +Defined in node_modules/typescript/lib/lib.es5.d.ts:975 ___ @@ -68,4 +68,4 @@ ___ ▪ **Error**: *ErrorConstructor* -Defined in node_modules/typedoc/node_modules/typescript/lib/lib.es5.d.ts:984 +Defined in node_modules/typescript/lib/lib.es5.d.ts:984 diff --git a/doc/classes/verifier.md b/doc/classes/verifier.md index 3dff538b..dddb197f 100644 --- a/doc/classes/verifier.md +++ b/doc/classes/verifier.md @@ -51,26 +51,33 @@ *Inherited from [CountingWritable](countingwritable.md).[defaultMaxListeners](countingwritable.md#static-defaultmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:681 +Defined in node_modules/@types/node/base.d.ts:896 ## Methods ### addListener -▸ **addListener**(`event`: string | symbol, `listener`: Function): *this* +▸ **addListener**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[addListener](sourcesource.md#addlistener)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[addListener](../interfaces/sparsereadable.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:683 +Defined in node_modules/@types/node/base.d.ts:898 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -84,7 +91,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[emit](../interfaces/sparsereadable.md#emit)* -Defined in node_modules/@types/node/base.d.ts:693 +Defined in node_modules/@types/node/base.d.ts:908 **Parameters:** @@ -99,15 +106,15 @@ ___ ### eventNames -▸ **eventNames**(): *string | symbol[]* +▸ **eventNames**(): *Array‹string | symbol›* *Inherited from [CountingWritable](countingwritable.md).[eventNames](countingwritable.md#eventnames)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[eventNames](../interfaces/sparsereadable.md#eventnames)* -Defined in node_modules/@types/node/base.d.ts:694 +Defined in node_modules/@types/node/base.d.ts:909 -**Returns:** *string | symbol[]* +**Returns:** *Array‹string | symbol›* ___ @@ -119,7 +126,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[getMaxListeners](../interfaces/sparsereadable.md#getmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:691 +Defined in node_modules/@types/node/base.d.ts:906 **Returns:** *number* @@ -129,7 +136,7 @@ ___ ▸ **handleEventsAndPipe**(`stream`: ReadableStream, `meter`: WritableStream): *void* -*Defined in [lib/source-destination/source-destination.ts:134](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L134)* +*Defined in [lib/source-destination/source-destination.ts:134](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L134)* **Parameters:** @@ -150,7 +157,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[listenerCount](../interfaces/sparsereadable.md#listenercount)* -Defined in node_modules/@types/node/base.d.ts:695 +Defined in node_modules/@types/node/base.d.ts:910 **Parameters:** @@ -170,7 +177,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[listeners](../interfaces/sparsereadable.md#listeners)* -Defined in node_modules/@types/node/base.d.ts:692 +Defined in node_modules/@types/node/base.d.ts:907 **Parameters:** @@ -184,20 +191,27 @@ ___ ### on -▸ **on**(`event`: string | symbol, `listener`: Function): *this* +▸ **on**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[on](sourcesource.md#on)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[on](../interfaces/sparsereadable.md#on)* -Defined in node_modules/@types/node/base.d.ts:684 +Defined in node_modules/@types/node/base.d.ts:899 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -205,20 +219,27 @@ ___ ### once -▸ **once**(`event`: string | symbol, `listener`: Function): *this* +▸ **once**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[once](sourcesource.md#once)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[once](../interfaces/sparsereadable.md#once)* -Defined in node_modules/@types/node/base.d.ts:685 +Defined in node_modules/@types/node/base.d.ts:900 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -226,20 +247,27 @@ ___ ### prependListener -▸ **prependListener**(`event`: string | symbol, `listener`: Function): *this* +▸ **prependListener**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[prependListener](sourcesource.md#prependlistener)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[prependListener](../interfaces/sparsereadable.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:686 +Defined in node_modules/@types/node/base.d.ts:901 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -247,20 +275,27 @@ ___ ### prependOnceListener -▸ **prependOnceListener**(`event`: string | symbol, `listener`: Function): *this* +▸ **prependOnceListener**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[prependOnceListener](sourcesource.md#prependoncelistener)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[prependOnceListener](../interfaces/sparsereadable.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:687 +Defined in node_modules/@types/node/base.d.ts:902 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -274,7 +309,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[removeAllListeners](../interfaces/sparsereadable.md#removealllisteners)* -Defined in node_modules/@types/node/base.d.ts:689 +Defined in node_modules/@types/node/base.d.ts:904 **Parameters:** @@ -288,20 +323,27 @@ ___ ### removeListener -▸ **removeListener**(`event`: string | symbol, `listener`: Function): *this* +▸ **removeListener**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[removeListener](sourcesource.md#removelistener)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[removeListener](../interfaces/sparsereadable.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:688 +Defined in node_modules/@types/node/base.d.ts:903 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -311,7 +353,7 @@ ___ ▸ **run**(): *Promise‹void›* -*Defined in [lib/source-destination/source-destination.ts:132](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L132)* +*Defined in [lib/source-destination/source-destination.ts:132](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L132)* **Returns:** *Promise‹void›* @@ -325,7 +367,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[setMaxListeners](../interfaces/sparsereadable.md#setmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:690 +Defined in node_modules/@types/node/base.d.ts:905 **Parameters:** @@ -343,7 +385,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[listenerCount](countingwritable.md#static-listenercount)* -Defined in node_modules/@types/node/base.d.ts:680 +Defined in node_modules/@types/node/base.d.ts:895 **Parameters:** @@ -360,22 +402,22 @@ Name | Type | ### ▪ **progress**: *object* -*Defined in [lib/source-destination/source-destination.ts:130](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L130)* +*Defined in [lib/source-destination/source-destination.ts:130](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L130)* ### bytes • **bytes**: *number* = 0 -*Defined in [lib/source-destination/source-destination.ts:130](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L130)* +*Defined in [lib/source-destination/source-destination.ts:130](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L130)* ### position • **position**: *number* = 0 -*Defined in [lib/source-destination/source-destination.ts:130](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L130)* +*Defined in [lib/source-destination/source-destination.ts:130](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L130)* ### speed • **speed**: *number* = 0 -*Defined in [lib/source-destination/source-destination.ts:130](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L130)* +*Defined in [lib/source-destination/source-destination.ts:130](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L130)* diff --git a/doc/classes/xzsource.md b/doc/classes/xzsource.md index 7b710670..366d01c1 100644 --- a/doc/classes/xzsource.md +++ b/doc/classes/xzsource.md @@ -44,6 +44,7 @@ * [createWriteStream](xzsource.md#createwritestream) * [emit](xzsource.md#emit) * [eventNames](xzsource.md#eventnames) +* [getAlignment](xzsource.md#getalignment) * [getBlocks](xzsource.md#getblocks) * [getInnerSource](xzsource.md#getinnersource) * [getMaxListeners](xzsource.md#getmaxlisteners) @@ -73,7 +74,7 @@ *Inherited from [SourceSource](sourcesource.md).[constructor](sourcesource.md#constructor)* -*Defined in [lib/source-destination/source-source.ts:20](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-source.ts#L20)* +*Defined in [lib/source-destination/source-source.ts:20](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-source.ts#L20)* **Parameters:** @@ -91,7 +92,7 @@ Name | Type | *Inherited from [CompressedSource](compressedsource.md).[isSizeEstimated](compressedsource.md#protected-issizeestimated)* -*Defined in [lib/source-destination/compressed-source.ts:44](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/compressed-source.ts#L44)* +*Defined in [lib/source-destination/compressed-source.ts:45](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/compressed-source.ts#L45)* ___ @@ -101,7 +102,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[source](sourcesource.md#protected-source)* -*Defined in [lib/source-destination/source-source.ts:22](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-source.ts#L22)* +*Defined in [lib/source-destination/source-source.ts:22](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-source.ts#L22)* ___ @@ -111,7 +112,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[defaultMaxListeners](countingwritable.md#static-defaultmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:681 +Defined in node_modules/@types/node/base.d.ts:896 ___ @@ -132,7 +133,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[imageExtensions](sourcesource.md#static-imageextensions)* -*Defined in [lib/source-destination/source-destination.ts:232](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L232)* +*Defined in [lib/source-destination/source-destination.ts:252](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L252)* ___ @@ -142,7 +143,7 @@ ___ *Overrides [SourceSource](sourcesource.md).[mimetype](sourcesource.md#static-optional-mimetype)* -*Defined in [lib/source-destination/xz.ts:27](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/xz.ts#L27)* +*Defined in [lib/source-destination/xz.ts:27](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/xz.ts#L27)* ___ @@ -152,7 +153,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[requiresRandomReadableSource](sourcesource.md#static-requiresrandomreadablesource)* -*Defined in [lib/source-destination/source-source.ts:20](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-source.ts#L20)* +*Defined in [lib/source-destination/source-source.ts:20](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-source.ts#L20)* ## Methods @@ -164,7 +165,7 @@ ___ *Overrides [SourceDestination](sourcedestination.md).[_close](sourcedestination.md#protected-_close)* -*Defined in [lib/source-destination/source-source.ts:30](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-source.ts#L30)* +*Defined in [lib/source-destination/source-source.ts:30](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-source.ts#L30)* **Returns:** *Promise‹void›* @@ -178,7 +179,7 @@ ___ *Overrides [SourceSource](sourcesource.md).[_getMetadata](sourcesource.md#protected-_getmetadata)* -*Defined in [lib/source-destination/compressed-source.ts:84](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/compressed-source.ts#L84)* +*Defined in [lib/source-destination/compressed-source.ts:85](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/compressed-source.ts#L85)* **Returns:** *Promise‹[Metadata](../interfaces/metadata.md)›* @@ -192,7 +193,7 @@ ___ *Overrides [SourceDestination](sourcedestination.md).[_open](sourcedestination.md#protected-_open)* -*Defined in [lib/source-destination/source-source.ts:26](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-source.ts#L26)* +*Defined in [lib/source-destination/source-source.ts:26](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-source.ts#L26)* **Returns:** *Promise‹void›* @@ -200,20 +201,27 @@ ___ ### addListener -▸ **addListener**(`event`: string | symbol, `listener`: Function): *this* +▸ **addListener**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[addListener](sourcesource.md#addlistener)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[addListener](../interfaces/sparsereadable.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:683 +Defined in node_modules/@types/node/base.d.ts:898 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -227,7 +235,7 @@ ___ *Overrides [SourceSource](sourcesource.md).[canCreateReadStream](sourcesource.md#cancreatereadstream)* -*Defined in [lib/source-destination/compressed-source.ts:50](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/compressed-source.ts#L50)* +*Defined in [lib/source-destination/compressed-source.ts:51](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/compressed-source.ts#L51)* **Returns:** *Promise‹boolean›* @@ -239,7 +247,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[canCreateSparseReadStream](sourcesource.md#cancreatesparsereadstream)* -*Defined in [lib/source-destination/source-destination.ts:268](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L268)* +*Defined in [lib/source-destination/source-destination.ts:292](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L292)* **Returns:** *Promise‹boolean›* @@ -251,7 +259,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[canCreateSparseWriteStream](sourcesource.md#cancreatesparsewritestream)* -*Defined in [lib/source-destination/source-destination.ts:276](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L276)* +*Defined in [lib/source-destination/source-destination.ts:300](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L300)* **Returns:** *Promise‹boolean›* @@ -263,7 +271,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[canCreateWriteStream](sourcesource.md#cancreatewritestream)* -*Defined in [lib/source-destination/source-destination.ts:272](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L272)* +*Defined in [lib/source-destination/source-destination.ts:296](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L296)* **Returns:** *Promise‹boolean›* @@ -275,7 +283,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[canRead](sourcesource.md#canread)* -*Defined in [lib/source-destination/source-destination.ts:256](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L256)* +*Defined in [lib/source-destination/source-destination.ts:280](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L280)* **Returns:** *Promise‹boolean›* @@ -287,7 +295,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[canWrite](sourcesource.md#canwrite)* -*Defined in [lib/source-destination/source-destination.ts:260](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L260)* +*Defined in [lib/source-destination/source-destination.ts:284](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L284)* **Returns:** *Promise‹boolean›* @@ -299,7 +307,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[close](sourcesource.md#close)* -*Defined in [lib/source-destination/source-destination.ts:342](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L342)* +*Defined in [lib/source-destination/source-destination.ts:368](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L368)* **Returns:** *Promise‹void›* @@ -307,21 +315,23 @@ ___ ### createReadStream -▸ **createReadStream**(`emitProgress`: boolean, `start`: number, `end?`: undefined | number): *Promise‹[SourceTransform](../interfaces/sourcetransform.md)›* +▸ **createReadStream**(`__namedParameters`: object): *Promise‹[SourceTransform](../interfaces/sourcetransform.md)›* *Inherited from [CompressedSource](compressedsource.md).[createReadStream](compressedsource.md#createreadstream)* *Overrides [SourceSource](sourcesource.md).[createReadStream](sourcesource.md#createreadstream)* -*Defined in [lib/source-destination/compressed-source.ts:54](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/compressed-source.ts#L54)* +*Defined in [lib/source-destination/compressed-source.ts:55](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/compressed-source.ts#L55)* **Parameters:** +▪`Default value` **__namedParameters**: *object*= {} + Name | Type | Default | ------ | ------ | ------ | `emitProgress` | boolean | false | +`end` | undefined | number | - | `start` | number | 0 | -`end?` | undefined | number | - | **Returns:** *Promise‹[SourceTransform](../interfaces/sourcetransform.md)›* @@ -329,17 +339,17 @@ ___ ### createSparseReadStream -▸ **createSparseReadStream**(`_generateChecksums`: boolean): *Promise‹[SparseReadable](../interfaces/sparsereadable.md)›* +▸ **createSparseReadStream**(`_options`: [CreateSparseReadStreamOptions](../interfaces/createsparsereadstreamoptions.md)): *Promise‹[SparseReadable](../interfaces/sparsereadable.md)›* *Inherited from [SourceSource](sourcesource.md).[createSparseReadStream](sourcesource.md#createsparsereadstream)* -*Defined in [lib/source-destination/source-destination.ts:317](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L317)* +*Defined in [lib/source-destination/source-destination.ts:339](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L339)* **Parameters:** Name | Type | Default | ------ | ------ | ------ | -`_generateChecksums` | boolean | false | +`_options` | [CreateSparseReadStreamOptions](../interfaces/createsparsereadstreamoptions.md) | {} | **Returns:** *Promise‹[SparseReadable](../interfaces/sparsereadable.md)›* @@ -347,11 +357,19 @@ ___ ### createSparseWriteStream -▸ **createSparseWriteStream**(): *Promise‹[SparseWritable](../interfaces/sparsewritable.md)›* +▸ **createSparseWriteStream**(`_options`: object): *Promise‹[SparseWritable](../interfaces/sparsewritable.md)›* *Inherited from [SourceSource](sourcesource.md).[createSparseWriteStream](sourcesource.md#createsparsewritestream)* -*Defined in [lib/source-destination/source-destination.ts:331](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L331)* +*Defined in [lib/source-destination/source-destination.ts:355](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L355)* + +**Parameters:** + +▪`Default value` **_options**: *object*= {} + +Name | Type | +------ | ------ | +`highWaterMark?` | undefined | number | **Returns:** *Promise‹[SparseWritable](../interfaces/sparsewritable.md)›* @@ -363,7 +381,7 @@ ___ *Overrides [CompressedSource](compressedsource.md).[createTransform](compressedsource.md#protected-abstract-createtransform)* -*Defined in [lib/source-destination/xz.ts:29](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/xz.ts#L29)* +*Defined in [lib/source-destination/xz.ts:29](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/xz.ts#L29)* **Returns:** *Transform* @@ -375,7 +393,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[createVerifier](sourcesource.md#createverifier)* -*Defined in [lib/source-destination/source-destination.ts:357](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L357)* +*Defined in [lib/source-destination/source-destination.ts:383](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L383)* **Parameters:** @@ -390,11 +408,19 @@ ___ ### createWriteStream -▸ **createWriteStream**(): *Promise‹WritableStream›* +▸ **createWriteStream**(`_options`: object): *Promise‹WritableStream›* *Inherited from [SourceSource](sourcesource.md).[createWriteStream](sourcesource.md#createwritestream)* -*Defined in [lib/source-destination/source-destination.ts:327](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L327)* +*Defined in [lib/source-destination/source-destination.ts:349](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L349)* + +**Parameters:** + +▪`Default value` **_options**: *object*= {} + +Name | Type | +------ | ------ | +`highWaterMark?` | undefined | number | **Returns:** *Promise‹WritableStream›* @@ -408,7 +434,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[emit](../interfaces/sparsereadable.md#emit)* -Defined in node_modules/@types/node/base.d.ts:693 +Defined in node_modules/@types/node/base.d.ts:908 **Parameters:** @@ -423,15 +449,27 @@ ___ ### eventNames -▸ **eventNames**(): *string | symbol[]* +▸ **eventNames**(): *Array‹string | symbol›* *Inherited from [CountingWritable](countingwritable.md).[eventNames](countingwritable.md#eventnames)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[eventNames](../interfaces/sparsereadable.md#eventnames)* -Defined in node_modules/@types/node/base.d.ts:694 +Defined in node_modules/@types/node/base.d.ts:909 -**Returns:** *string | symbol[]* +**Returns:** *Array‹string | symbol›* + +___ + +### getAlignment + +▸ **getAlignment**(): *number | undefined* + +*Inherited from [SourceSource](sourcesource.md).[getAlignment](sourcesource.md#getalignment)* + +*Defined in [lib/source-destination/source-destination.ts:276](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L276)* + +**Returns:** *number | undefined* ___ @@ -441,7 +479,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[getBlocks](sourcesource.md#getblocks)* -*Defined in [lib/source-destination/source-destination.ts:323](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L323)* +*Defined in [lib/source-destination/source-destination.ts:345](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L345)* **Returns:** *Promise‹[BlocksWithChecksum](../interfaces/blockswithchecksum.md)[]›* @@ -453,7 +491,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[getInnerSource](sourcesource.md#getinnersource)* -*Defined in [lib/source-destination/source-destination.ts:424](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L424)* +*Defined in [lib/source-destination/source-destination.ts:452](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L452)* **Returns:** *Promise‹[SourceDestination](sourcedestination.md)›* @@ -467,7 +505,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[getMaxListeners](../interfaces/sparsereadable.md#getmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:691 +Defined in node_modules/@types/node/base.d.ts:906 **Returns:** *number* @@ -479,7 +517,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[getMetadata](sourcesource.md#getmetadata)* -*Defined in [lib/source-destination/source-destination.ts:280](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L280)* +*Defined in [lib/source-destination/source-destination.ts:304](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L304)* **Returns:** *Promise‹[Metadata](../interfaces/metadata.md)›* @@ -491,7 +529,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[getPartitionTable](sourcesource.md#getpartitiontable)* -*Defined in [lib/source-destination/source-destination.ts:445](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L445)* +*Defined in [lib/source-destination/source-destination.ts:473](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L473)* **Returns:** *Promise‹GetPartitionsResult | undefined›* @@ -503,7 +541,7 @@ ___ *Overrides [CompressedSource](compressedsource.md).[getSize](compressedsource.md#protected-getsize)* -*Defined in [lib/source-destination/xz.ts:33](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/xz.ts#L33)* +*Defined in [lib/source-destination/xz.ts:33](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/xz.ts#L33)* **Returns:** *Promise‹number | undefined›* @@ -517,7 +555,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[listenerCount](../interfaces/sparsereadable.md#listenercount)* -Defined in node_modules/@types/node/base.d.ts:695 +Defined in node_modules/@types/node/base.d.ts:910 **Parameters:** @@ -537,7 +575,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[listeners](../interfaces/sparsereadable.md#listeners)* -Defined in node_modules/@types/node/base.d.ts:692 +Defined in node_modules/@types/node/base.d.ts:907 **Parameters:** @@ -551,20 +589,27 @@ ___ ### on -▸ **on**(`event`: string | symbol, `listener`: Function): *this* +▸ **on**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[on](sourcesource.md#on)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[on](../interfaces/sparsereadable.md#on)* -Defined in node_modules/@types/node/base.d.ts:684 +Defined in node_modules/@types/node/base.d.ts:899 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -572,20 +617,27 @@ ___ ### once -▸ **once**(`event`: string | symbol, `listener`: Function): *this* +▸ **once**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[once](sourcesource.md#once)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[once](../interfaces/sparsereadable.md#once)* -Defined in node_modules/@types/node/base.d.ts:685 +Defined in node_modules/@types/node/base.d.ts:900 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -597,7 +649,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[open](sourcesource.md#open)* -*Defined in [lib/source-destination/source-destination.ts:335](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L335)* +*Defined in [lib/source-destination/source-destination.ts:361](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L361)* **Returns:** *Promise‹void›* @@ -605,20 +657,27 @@ ___ ### prependListener -▸ **prependListener**(`event`: string | symbol, `listener`: Function): *this* +▸ **prependListener**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[prependListener](sourcesource.md#prependlistener)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[prependListener](../interfaces/sparsereadable.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:686 +Defined in node_modules/@types/node/base.d.ts:901 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -626,20 +685,27 @@ ___ ### prependOnceListener -▸ **prependOnceListener**(`event`: string | symbol, `listener`: Function): *this* +▸ **prependOnceListener**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[prependOnceListener](sourcesource.md#prependoncelistener)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[prependOnceListener](../interfaces/sparsereadable.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:687 +Defined in node_modules/@types/node/base.d.ts:902 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -647,17 +713,17 @@ ___ ### read -▸ **read**(`_buffer`: Buffer, `_bufferOffset`: number, `_length`: number, `_sourceOffset`: number): *Promise‹ReadResult›* +▸ **read**(`_buffer`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer), `_bufferOffset`: number, `_length`: number, `_sourceOffset`: number): *Promise‹ReadResult›* *Inherited from [SourceSource](sourcesource.md).[read](sourcesource.md#read)* -*Defined in [lib/source-destination/source-destination.ts:291](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L291)* +*Defined in [lib/source-destination/source-destination.ts:315](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L315)* **Parameters:** Name | Type | ------ | ------ | -`_buffer` | Buffer | +`_buffer` | [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | `_bufferOffset` | number | `_length` | number | `_sourceOffset` | number | @@ -674,7 +740,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[removeAllListeners](../interfaces/sparsereadable.md#removealllisteners)* -Defined in node_modules/@types/node/base.d.ts:689 +Defined in node_modules/@types/node/base.d.ts:904 **Parameters:** @@ -688,20 +754,27 @@ ___ ### removeListener -▸ **removeListener**(`event`: string | symbol, `listener`: Function): *this* +▸ **removeListener**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[removeListener](sourcesource.md#removelistener)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[removeListener](../interfaces/sparsereadable.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:688 +Defined in node_modules/@types/node/base.d.ts:903 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -715,7 +788,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[setMaxListeners](../interfaces/sparsereadable.md#setmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:690 +Defined in node_modules/@types/node/base.d.ts:905 **Parameters:** @@ -729,17 +802,17 @@ ___ ### write -▸ **write**(`_buffer`: Buffer, `_bufferOffset`: number, `_length`: number, `_fileOffset`: number): *Promise‹WriteResult›* +▸ **write**(`_buffer`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer), `_bufferOffset`: number, `_length`: number, `_fileOffset`: number): *Promise‹WriteResult›* *Inherited from [SourceSource](sourcesource.md).[write](sourcesource.md#write)* -*Defined in [lib/source-destination/source-destination.ts:300](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L300)* +*Defined in [lib/source-destination/source-destination.ts:324](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L324)* **Parameters:** Name | Type | ------ | ------ | -`_buffer` | Buffer | +`_buffer` | [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | `_bufferOffset` | number | `_length` | number | `_fileOffset` | number | @@ -754,7 +827,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[listenerCount](countingwritable.md#static-listenercount)* -Defined in node_modules/@types/node/base.d.ts:680 +Defined in node_modules/@types/node/base.d.ts:895 **Parameters:** @@ -773,7 +846,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[register](sourcesource.md#static-register)* -*Defined in [lib/source-destination/source-destination.ts:250](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L250)* +*Defined in [lib/source-destination/source-destination.ts:270](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L270)* **Parameters:** diff --git a/doc/classes/zipsource.md b/doc/classes/zipsource.md index bf6594c8..e9015b3d 100644 --- a/doc/classes/zipsource.md +++ b/doc/classes/zipsource.md @@ -19,6 +19,7 @@ * [implementation](zipsource.md#private-implementation) * [match](zipsource.md#private-match) * [preferStreamSource](zipsource.md#private-preferstreamsource) +* [ready](zipsource.md#private-ready) * [source](zipsource.md#protected-source) * [defaultMaxListeners](zipsource.md#static-defaultmaxlisteners) * [imageExtensions](zipsource.md#static-imageextensions) @@ -45,6 +46,7 @@ * [createWriteStream](zipsource.md#createwritestream) * [emit](zipsource.md#emit) * [eventNames](zipsource.md#eventnames) +* [getAlignment](zipsource.md#getalignment) * [getBlocks](zipsource.md#getblocks) * [getInnerSource](zipsource.md#getinnersource) * [getMaxListeners](zipsource.md#getmaxlisteners) @@ -74,7 +76,7 @@ *Overrides [SourceSource](sourcesource.md).[constructor](sourcesource.md#constructor)* -*Defined in [lib/source-destination/zip.ts:350](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/zip.ts#L350)* +*Defined in [lib/source-destination/zip.ts:365](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/zip.ts#L365)* **Parameters:** @@ -100,7 +102,7 @@ Name | Type | • **implementation**: *[RandomAccessZipSource](randomaccesszipsource.md) | [StreamZipSource](streamzipsource.md)* -*Defined in [lib/source-destination/zip.ts:350](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/zip.ts#L350)* +*Defined in [lib/source-destination/zip.ts:365](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/zip.ts#L365)* ___ @@ -108,7 +110,7 @@ ___ • **match**: *function* -*Defined in [lib/source-destination/zip.ts:355](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/zip.ts#L355)* +*Defined in [lib/source-destination/zip.ts:370](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/zip.ts#L370)* #### Type declaration: @@ -126,7 +128,15 @@ ___ • **preferStreamSource**: *boolean* -*Defined in [lib/source-destination/zip.ts:354](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/zip.ts#L354)* +*Defined in [lib/source-destination/zip.ts:369](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/zip.ts#L369)* + +___ + +### `Private` ready + +• **ready**: *Promise‹void›* + +*Defined in [lib/source-destination/zip.ts:364](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/zip.ts#L364)* ___ @@ -136,7 +146,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[source](sourcesource.md#protected-source)* -*Defined in [lib/source-destination/source-source.ts:22](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-source.ts#L22)* +*Defined in [lib/source-destination/source-source.ts:22](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-source.ts#L22)* ___ @@ -146,7 +156,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[defaultMaxListeners](countingwritable.md#static-defaultmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:681 +Defined in node_modules/@types/node/base.d.ts:896 ___ @@ -167,7 +177,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[imageExtensions](sourcesource.md#static-imageextensions)* -*Defined in [lib/source-destination/source-destination.ts:232](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L232)* +*Defined in [lib/source-destination/source-destination.ts:252](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L252)* ___ @@ -177,7 +187,7 @@ ___ *Overrides [SourceSource](sourcesource.md).[mimetype](sourcesource.md#static-optional-mimetype)* -*Defined in [lib/source-destination/zip.ts:349](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/zip.ts#L349)* +*Defined in [lib/source-destination/zip.ts:363](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/zip.ts#L363)* ___ @@ -187,7 +197,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[requiresRandomReadableSource](sourcesource.md#static-requiresrandomreadablesource)* -*Defined in [lib/source-destination/source-source.ts:20](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-source.ts#L20)* +*Defined in [lib/source-destination/source-source.ts:20](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-source.ts#L20)* ## Methods @@ -199,7 +209,7 @@ ___ *Overrides [SourceDestination](sourcedestination.md).[_close](sourcedestination.md#protected-_close)* -*Defined in [lib/source-destination/source-source.ts:30](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-source.ts#L30)* +*Defined in [lib/source-destination/source-source.ts:30](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-source.ts#L30)* **Returns:** *Promise‹void›* @@ -211,7 +221,7 @@ ___ *Overrides [SourceSource](sourcesource.md).[_getMetadata](sourcesource.md#protected-_getmetadata)* -*Defined in [lib/source-destination/zip.ts:404](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/zip.ts#L404)* +*Defined in [lib/source-destination/zip.ts:428](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/zip.ts#L428)* **Returns:** *Promise‹[Metadata](../interfaces/metadata.md)›* @@ -225,7 +235,7 @@ ___ *Overrides [SourceDestination](sourcedestination.md).[_open](sourcedestination.md#protected-_open)* -*Defined in [lib/source-destination/source-source.ts:26](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-source.ts#L26)* +*Defined in [lib/source-destination/source-source.ts:26](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-source.ts#L26)* **Returns:** *Promise‹void›* @@ -233,20 +243,27 @@ ___ ### addListener -▸ **addListener**(`event`: string | symbol, `listener`: Function): *this* +▸ **addListener**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[addListener](sourcesource.md#addlistener)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[addListener](../interfaces/sparsereadable.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:683 +Defined in node_modules/@types/node/base.d.ts:898 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -258,7 +275,7 @@ ___ *Overrides [SourceSource](sourcesource.md).[canCreateReadStream](sourcesource.md#cancreatereadstream)* -*Defined in [lib/source-destination/zip.ts:373](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/zip.ts#L373)* +*Defined in [lib/source-destination/zip.ts:384](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/zip.ts#L384)* **Returns:** *Promise‹boolean›* @@ -270,7 +287,7 @@ ___ *Overrides [SourceSource](sourcesource.md).[canCreateSparseReadStream](sourcesource.md#cancreatesparsereadstream)* -*Defined in [lib/source-destination/zip.ts:383](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/zip.ts#L383)* +*Defined in [lib/source-destination/zip.ts:394](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/zip.ts#L394)* **Returns:** *Promise‹boolean›* @@ -282,7 +299,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[canCreateSparseWriteStream](sourcesource.md#cancreatesparsewritestream)* -*Defined in [lib/source-destination/source-destination.ts:276](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L276)* +*Defined in [lib/source-destination/source-destination.ts:300](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L300)* **Returns:** *Promise‹boolean›* @@ -294,7 +311,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[canCreateWriteStream](sourcesource.md#cancreatewritestream)* -*Defined in [lib/source-destination/source-destination.ts:272](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L272)* +*Defined in [lib/source-destination/source-destination.ts:296](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L296)* **Returns:** *Promise‹boolean›* @@ -306,7 +323,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[canRead](sourcesource.md#canread)* -*Defined in [lib/source-destination/source-destination.ts:256](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L256)* +*Defined in [lib/source-destination/source-destination.ts:280](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L280)* **Returns:** *Promise‹boolean›* @@ -318,7 +335,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[canWrite](sourcesource.md#canwrite)* -*Defined in [lib/source-destination/source-destination.ts:260](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L260)* +*Defined in [lib/source-destination/source-destination.ts:284](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L284)* **Returns:** *Promise‹boolean›* @@ -330,7 +347,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[close](sourcesource.md#close)* -*Defined in [lib/source-destination/source-destination.ts:342](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L342)* +*Defined in [lib/source-destination/source-destination.ts:368](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L368)* **Returns:** *Promise‹void›* @@ -338,19 +355,23 @@ ___ ### createReadStream -▸ **createReadStream**(`emitProgress`: boolean, `start`: number, `end?`: undefined | number): *Promise‹ReadableStream›* +▸ **createReadStream**(`__namedParameters`: object): *Promise‹ReadableStream›* *Overrides [SourceSource](sourcesource.md).[createReadStream](sourcesource.md#createreadstream)* -*Defined in [lib/source-destination/zip.ts:388](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/zip.ts#L388)* +*Defined in [lib/source-destination/zip.ts:399](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/zip.ts#L399)* **Parameters:** +▪`Default value` **__namedParameters**: *object*= {} + Name | Type | Default | ------ | ------ | ------ | +`alignment` | undefined | number | - | `emitProgress` | boolean | false | +`end` | undefined | number | - | +`numBuffers` | undefined | number | - | `start` | number | 0 | -`end?` | undefined | number | - | **Returns:** *Promise‹ReadableStream›* @@ -358,17 +379,21 @@ ___ ### createSparseReadStream -▸ **createSparseReadStream**(`generateChecksums`: boolean): *Promise‹[SparseReadable](../interfaces/sparsereadable.md)›* +▸ **createSparseReadStream**(`__namedParameters`: object): *Promise‹[SparseReadable](../interfaces/sparsereadable.md)›* *Overrides [SourceSource](sourcesource.md).[createSparseReadStream](sourcesource.md#createsparsereadstream)* -*Defined in [lib/source-destination/zip.ts:397](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/zip.ts#L397)* +*Defined in [lib/source-destination/zip.ts:415](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/zip.ts#L415)* **Parameters:** +▪`Default value` **__namedParameters**: *object*= {} + Name | Type | Default | ------ | ------ | ------ | +`alignment` | undefined | number | - | `generateChecksums` | boolean | false | +`numBuffers` | undefined | number | - | **Returns:** *Promise‹[SparseReadable](../interfaces/sparsereadable.md)›* @@ -376,11 +401,19 @@ ___ ### createSparseWriteStream -▸ **createSparseWriteStream**(): *Promise‹[SparseWritable](../interfaces/sparsewritable.md)›* +▸ **createSparseWriteStream**(`_options`: object): *Promise‹[SparseWritable](../interfaces/sparsewritable.md)›* *Inherited from [SourceSource](sourcesource.md).[createSparseWriteStream](sourcesource.md#createsparsewritestream)* -*Defined in [lib/source-destination/source-destination.ts:331](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L331)* +*Defined in [lib/source-destination/source-destination.ts:355](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L355)* + +**Parameters:** + +▪`Default value` **_options**: *object*= {} + +Name | Type | +------ | ------ | +`highWaterMark?` | undefined | number | **Returns:** *Promise‹[SparseWritable](../interfaces/sparsewritable.md)›* @@ -392,7 +425,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[createVerifier](sourcesource.md#createverifier)* -*Defined in [lib/source-destination/source-destination.ts:357](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L357)* +*Defined in [lib/source-destination/source-destination.ts:383](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L383)* **Parameters:** @@ -407,11 +440,19 @@ ___ ### createWriteStream -▸ **createWriteStream**(): *Promise‹WritableStream›* +▸ **createWriteStream**(`_options`: object): *Promise‹WritableStream›* *Inherited from [SourceSource](sourcesource.md).[createWriteStream](sourcesource.md#createwritestream)* -*Defined in [lib/source-destination/source-destination.ts:327](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L327)* +*Defined in [lib/source-destination/source-destination.ts:349](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L349)* + +**Parameters:** + +▪`Default value` **_options**: *object*= {} + +Name | Type | +------ | ------ | +`highWaterMark?` | undefined | number | **Returns:** *Promise‹WritableStream›* @@ -425,7 +466,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[emit](../interfaces/sparsereadable.md#emit)* -Defined in node_modules/@types/node/base.d.ts:693 +Defined in node_modules/@types/node/base.d.ts:908 **Parameters:** @@ -440,15 +481,27 @@ ___ ### eventNames -▸ **eventNames**(): *string | symbol[]* +▸ **eventNames**(): *Array‹string | symbol›* *Inherited from [CountingWritable](countingwritable.md).[eventNames](countingwritable.md#eventnames)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[eventNames](../interfaces/sparsereadable.md#eventnames)* -Defined in node_modules/@types/node/base.d.ts:694 +Defined in node_modules/@types/node/base.d.ts:909 -**Returns:** *string | symbol[]* +**Returns:** *Array‹string | symbol›* + +___ + +### getAlignment + +▸ **getAlignment**(): *number | undefined* + +*Inherited from [SourceSource](sourcesource.md).[getAlignment](sourcesource.md#getalignment)* + +*Defined in [lib/source-destination/source-destination.ts:276](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L276)* + +**Returns:** *number | undefined* ___ @@ -458,7 +511,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[getBlocks](sourcesource.md#getblocks)* -*Defined in [lib/source-destination/source-destination.ts:323](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L323)* +*Defined in [lib/source-destination/source-destination.ts:345](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L345)* **Returns:** *Promise‹[BlocksWithChecksum](../interfaces/blockswithchecksum.md)[]›* @@ -470,7 +523,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[getInnerSource](sourcesource.md#getinnersource)* -*Defined in [lib/source-destination/source-destination.ts:424](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L424)* +*Defined in [lib/source-destination/source-destination.ts:452](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L452)* **Returns:** *Promise‹[SourceDestination](sourcedestination.md)›* @@ -484,7 +537,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[getMaxListeners](../interfaces/sparsereadable.md#getmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:691 +Defined in node_modules/@types/node/base.d.ts:906 **Returns:** *number* @@ -496,7 +549,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[getMetadata](sourcesource.md#getmetadata)* -*Defined in [lib/source-destination/source-destination.ts:280](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L280)* +*Defined in [lib/source-destination/source-destination.ts:304](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L304)* **Returns:** *Promise‹[Metadata](../interfaces/metadata.md)›* @@ -508,7 +561,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[getPartitionTable](sourcesource.md#getpartitiontable)* -*Defined in [lib/source-destination/source-destination.ts:445](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L445)* +*Defined in [lib/source-destination/source-destination.ts:473](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L473)* **Returns:** *Promise‹GetPartitionsResult | undefined›* @@ -522,7 +575,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[listenerCount](../interfaces/sparsereadable.md#listenercount)* -Defined in node_modules/@types/node/base.d.ts:695 +Defined in node_modules/@types/node/base.d.ts:910 **Parameters:** @@ -542,7 +595,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[listeners](../interfaces/sparsereadable.md#listeners)* -Defined in node_modules/@types/node/base.d.ts:692 +Defined in node_modules/@types/node/base.d.ts:907 **Parameters:** @@ -556,20 +609,27 @@ ___ ### on -▸ **on**(`event`: string | symbol, `listener`: Function): *this* +▸ **on**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[on](sourcesource.md#on)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[on](../interfaces/sparsereadable.md#on)* -Defined in node_modules/@types/node/base.d.ts:684 +Defined in node_modules/@types/node/base.d.ts:899 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -577,20 +637,27 @@ ___ ### once -▸ **once**(`event`: string | symbol, `listener`: Function): *this* +▸ **once**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[once](sourcesource.md#once)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[once](../interfaces/sparsereadable.md#once)* -Defined in node_modules/@types/node/base.d.ts:685 +Defined in node_modules/@types/node/base.d.ts:900 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -602,7 +669,7 @@ ___ *Overrides [SourceSource](sourcesource.md).[open](sourcesource.md#open)* -*Defined in [lib/source-destination/zip.ts:378](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/zip.ts#L378)* +*Defined in [lib/source-destination/zip.ts:389](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/zip.ts#L389)* **Returns:** *Promise‹void›* @@ -612,7 +679,7 @@ ___ ▸ **prepare**(): *Promise‹void›* -*Defined in [lib/source-destination/zip.ts:360](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/zip.ts#L360)* +*Defined in [lib/source-destination/zip.ts:376](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/zip.ts#L376)* **Returns:** *Promise‹void›* @@ -620,20 +687,27 @@ ___ ### prependListener -▸ **prependListener**(`event`: string | symbol, `listener`: Function): *this* +▸ **prependListener**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[prependListener](sourcesource.md#prependlistener)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[prependListener](../interfaces/sparsereadable.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:686 +Defined in node_modules/@types/node/base.d.ts:901 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -641,20 +715,27 @@ ___ ### prependOnceListener -▸ **prependOnceListener**(`event`: string | symbol, `listener`: Function): *this* +▸ **prependOnceListener**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[prependOnceListener](sourcesource.md#prependoncelistener)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[prependOnceListener](../interfaces/sparsereadable.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:687 +Defined in node_modules/@types/node/base.d.ts:902 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -662,17 +743,17 @@ ___ ### read -▸ **read**(`_buffer`: Buffer, `_bufferOffset`: number, `_length`: number, `_sourceOffset`: number): *Promise‹ReadResult›* +▸ **read**(`_buffer`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer), `_bufferOffset`: number, `_length`: number, `_sourceOffset`: number): *Promise‹ReadResult›* *Inherited from [SourceSource](sourcesource.md).[read](sourcesource.md#read)* -*Defined in [lib/source-destination/source-destination.ts:291](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L291)* +*Defined in [lib/source-destination/source-destination.ts:315](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L315)* **Parameters:** Name | Type | ------ | ------ | -`_buffer` | Buffer | +`_buffer` | [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | `_bufferOffset` | number | `_length` | number | `_sourceOffset` | number | @@ -689,7 +770,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[removeAllListeners](../interfaces/sparsereadable.md#removealllisteners)* -Defined in node_modules/@types/node/base.d.ts:689 +Defined in node_modules/@types/node/base.d.ts:904 **Parameters:** @@ -703,20 +784,27 @@ ___ ### removeListener -▸ **removeListener**(`event`: string | symbol, `listener`: Function): *this* +▸ **removeListener**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](sourcesource.md).[removeListener](sourcesource.md#removelistener)* *Overrides [SparseReadable](../interfaces/sparsereadable.md).[removeListener](../interfaces/sparsereadable.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:688 +Defined in node_modules/@types/node/base.d.ts:903 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -730,7 +818,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[setMaxListeners](../interfaces/sparsereadable.md#setmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:690 +Defined in node_modules/@types/node/base.d.ts:905 **Parameters:** @@ -744,17 +832,17 @@ ___ ### write -▸ **write**(`_buffer`: Buffer, `_bufferOffset`: number, `_length`: number, `_fileOffset`: number): *Promise‹WriteResult›* +▸ **write**(`_buffer`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer), `_bufferOffset`: number, `_length`: number, `_fileOffset`: number): *Promise‹WriteResult›* *Inherited from [SourceSource](sourcesource.md).[write](sourcesource.md#write)* -*Defined in [lib/source-destination/source-destination.ts:300](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L300)* +*Defined in [lib/source-destination/source-destination.ts:324](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L324)* **Parameters:** Name | Type | ------ | ------ | -`_buffer` | Buffer | +`_buffer` | [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | `_bufferOffset` | number | `_length` | number | `_fileOffset` | number | @@ -769,7 +857,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[listenerCount](countingwritable.md#static-listenercount)* -Defined in node_modules/@types/node/base.d.ts:680 +Defined in node_modules/@types/node/base.d.ts:895 **Parameters:** @@ -788,7 +876,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[register](sourcesource.md#static-register)* -*Defined in [lib/source-destination/source-destination.ts:250](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L250)* +*Defined in [lib/source-destination/source-destination.ts:270](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L270)* **Parameters:** diff --git a/doc/enums/openflags.md b/doc/enums/openflags.md deleted file mode 100644 index 7afa9880..00000000 --- a/doc/enums/openflags.md +++ /dev/null @@ -1,37 +0,0 @@ -[etcher-sdk](../README.md) › [OpenFlags](openflags.md) - -# Enumeration: OpenFlags - -## Index - -### Enumeration members - -* [Read](openflags.md#read) -* [ReadWrite](openflags.md#readwrite) -* [WriteDevice](openflags.md#writedevice) - -## Enumeration members - -### Read - -• **Read**: = fs.constants.O_RDONLY - -*Defined in [lib/source-destination/file.ts:47](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/file.ts#L47)* - -___ - -### ReadWrite - -• **ReadWrite**: = fs.constants.O_RDWR | fs.constants.O_CREAT - -*Defined in [lib/source-destination/file.ts:48](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/file.ts#L48)* - -___ - -### WriteDevice - -• **WriteDevice**: = fs.constants.O_RDWR | - fs.constants.O_NONBLOCK | - fs.constants.O_SYNC - -*Defined in [lib/source-destination/file.ts:49](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/file.ts#L49)* diff --git a/doc/interfaces/adaptersourcedestination.md b/doc/interfaces/adaptersourcedestination.md index 1171acc2..6207eda5 100644 --- a/doc/interfaces/adaptersourcedestination.md +++ b/doc/interfaces/adaptersourcedestination.md @@ -50,6 +50,7 @@ * [createWriteStream](adaptersourcedestination.md#createwritestream) * [emit](adaptersourcedestination.md#emit) * [eventNames](adaptersourcedestination.md#eventnames) +* [getAlignment](adaptersourcedestination.md#getalignment) * [getBlocks](adaptersourcedestination.md#getblocks) * [getInnerSource](adaptersourcedestination.md#getinnersource) * [getMaxListeners](adaptersourcedestination.md#getmaxlisteners) @@ -76,7 +77,7 @@ • **description**: *string* -*Defined in [lib/scanner/adapters/adapter.ts:27](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/scanner/adapters/adapter.ts#L27)* +*Defined in [lib/scanner/adapters/adapter.ts:27](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/scanner/adapters/adapter.ts#L27)* ___ @@ -84,7 +85,7 @@ ___ • **device**: *string | null* -*Defined in [lib/scanner/adapters/adapter.ts:24](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/scanner/adapters/adapter.ts#L24)* +*Defined in [lib/scanner/adapters/adapter.ts:24](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/scanner/adapters/adapter.ts#L24)* ___ @@ -92,7 +93,7 @@ ___ • **devicePath**: *string | null* -*Defined in [lib/scanner/adapters/adapter.ts:25](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/scanner/adapters/adapter.ts#L25)* +*Defined in [lib/scanner/adapters/adapter.ts:25](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/scanner/adapters/adapter.ts#L25)* ___ @@ -100,7 +101,7 @@ ___ • **emitsProgress**: *boolean* -*Defined in [lib/scanner/adapters/adapter.ts:30](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/scanner/adapters/adapter.ts#L30)* +*Defined in [lib/scanner/adapters/adapter.ts:30](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/scanner/adapters/adapter.ts#L30)* ___ @@ -108,7 +109,7 @@ ___ • **isSystem**: *boolean* -*Defined in [lib/scanner/adapters/adapter.ts:26](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/scanner/adapters/adapter.ts#L26)* +*Defined in [lib/scanner/adapters/adapter.ts:26](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/scanner/adapters/adapter.ts#L26)* ___ @@ -116,7 +117,7 @@ ___ • **mountpoints**: *Array‹object›* -*Defined in [lib/scanner/adapters/adapter.ts:28](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/scanner/adapters/adapter.ts#L28)* +*Defined in [lib/scanner/adapters/adapter.ts:28](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/scanner/adapters/adapter.ts#L28)* ___ @@ -124,7 +125,7 @@ ___ • **raw**: *string | null* -*Defined in [lib/scanner/adapters/adapter.ts:23](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/scanner/adapters/adapter.ts#L23)* +*Defined in [lib/scanner/adapters/adapter.ts:23](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/scanner/adapters/adapter.ts#L23)* ___ @@ -132,7 +133,7 @@ ___ • **size**: *number | null* -*Defined in [lib/scanner/adapters/adapter.ts:29](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/scanner/adapters/adapter.ts#L29)* +*Defined in [lib/scanner/adapters/adapter.ts:29](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/scanner/adapters/adapter.ts#L29)* ___ @@ -142,7 +143,7 @@ ___ *Inherited from [CountingWritable](../classes/countingwritable.md).[defaultMaxListeners](../classes/countingwritable.md#static-defaultmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:681 +Defined in node_modules/@types/node/base.d.ts:896 ___ @@ -163,7 +164,7 @@ ___ *Inherited from [SourceSource](../classes/sourcesource.md).[imageExtensions](../classes/sourcesource.md#static-imageextensions)* -*Defined in [lib/source-destination/source-destination.ts:232](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L232)* +*Defined in [lib/source-destination/source-destination.ts:252](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L252)* ___ @@ -173,7 +174,7 @@ ___ *Inherited from [SourceSource](../classes/sourcesource.md).[mimetype](../classes/sourcesource.md#static-optional-mimetype)* -*Defined in [lib/source-destination/source-destination.ts:244](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L244)* +*Defined in [lib/source-destination/source-destination.ts:264](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L264)* ## Methods @@ -183,7 +184,7 @@ ___ *Inherited from [SourceDestination](../classes/sourcedestination.md).[_close](../classes/sourcedestination.md#protected-_close)* -*Defined in [lib/source-destination/source-destination.ts:353](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L353)* +*Defined in [lib/source-destination/source-destination.ts:379](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L379)* **Returns:** *Promise‹void›* @@ -195,7 +196,7 @@ ___ *Inherited from [SourceSource](../classes/sourcesource.md).[_getMetadata](../classes/sourcesource.md#protected-_getmetadata)* -*Defined in [lib/source-destination/source-destination.ts:287](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L287)* +*Defined in [lib/source-destination/source-destination.ts:311](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L311)* **Returns:** *Promise‹[Metadata](metadata.md)›* @@ -207,7 +208,7 @@ ___ *Inherited from [SourceDestination](../classes/sourcedestination.md).[_open](../classes/sourcedestination.md#protected-_open)* -*Defined in [lib/source-destination/source-destination.ts:349](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L349)* +*Defined in [lib/source-destination/source-destination.ts:375](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L375)* **Returns:** *Promise‹void›* @@ -215,20 +216,27 @@ ___ ### addListener -▸ **addListener**(`event`: string | symbol, `listener`: Function): *this* +▸ **addListener**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](../classes/sourcesource.md).[addListener](../classes/sourcesource.md#addlistener)* *Overrides [SparseReadable](sparsereadable.md).[addListener](sparsereadable.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:683 +Defined in node_modules/@types/node/base.d.ts:898 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -240,7 +248,7 @@ ___ *Inherited from [SourceSource](../classes/sourcesource.md).[canCreateReadStream](../classes/sourcesource.md#cancreatereadstream)* -*Defined in [lib/source-destination/source-destination.ts:264](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L264)* +*Defined in [lib/source-destination/source-destination.ts:288](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L288)* **Returns:** *Promise‹boolean›* @@ -252,7 +260,7 @@ ___ *Inherited from [SourceSource](../classes/sourcesource.md).[canCreateSparseReadStream](../classes/sourcesource.md#cancreatesparsereadstream)* -*Defined in [lib/source-destination/source-destination.ts:268](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L268)* +*Defined in [lib/source-destination/source-destination.ts:292](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L292)* **Returns:** *Promise‹boolean›* @@ -264,7 +272,7 @@ ___ *Inherited from [SourceSource](../classes/sourcesource.md).[canCreateSparseWriteStream](../classes/sourcesource.md#cancreatesparsewritestream)* -*Defined in [lib/source-destination/source-destination.ts:276](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L276)* +*Defined in [lib/source-destination/source-destination.ts:300](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L300)* **Returns:** *Promise‹boolean›* @@ -276,7 +284,7 @@ ___ *Inherited from [SourceSource](../classes/sourcesource.md).[canCreateWriteStream](../classes/sourcesource.md#cancreatewritestream)* -*Defined in [lib/source-destination/source-destination.ts:272](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L272)* +*Defined in [lib/source-destination/source-destination.ts:296](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L296)* **Returns:** *Promise‹boolean›* @@ -288,7 +296,7 @@ ___ *Inherited from [SourceSource](../classes/sourcesource.md).[canRead](../classes/sourcesource.md#canread)* -*Defined in [lib/source-destination/source-destination.ts:256](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L256)* +*Defined in [lib/source-destination/source-destination.ts:280](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L280)* **Returns:** *Promise‹boolean›* @@ -300,7 +308,7 @@ ___ *Inherited from [SourceSource](../classes/sourcesource.md).[canWrite](../classes/sourcesource.md#canwrite)* -*Defined in [lib/source-destination/source-destination.ts:260](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L260)* +*Defined in [lib/source-destination/source-destination.ts:284](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L284)* **Returns:** *Promise‹boolean›* @@ -312,7 +320,7 @@ ___ *Inherited from [SourceSource](../classes/sourcesource.md).[close](../classes/sourcesource.md#close)* -*Defined in [lib/source-destination/source-destination.ts:342](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L342)* +*Defined in [lib/source-destination/source-destination.ts:368](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L368)* **Returns:** *Promise‹void›* @@ -320,19 +328,17 @@ ___ ### createReadStream -▸ **createReadStream**(`_emitProgress`: boolean, `_start`: number, `_end?`: undefined | number): *Promise‹ReadableStream›* +▸ **createReadStream**(`_options`: [CreateReadStreamOptions](createreadstreamoptions.md)): *Promise‹ReadableStream›* *Inherited from [SourceSource](../classes/sourcesource.md).[createReadStream](../classes/sourcesource.md#createreadstream)* -*Defined in [lib/source-destination/source-destination.ts:309](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L309)* +*Defined in [lib/source-destination/source-destination.ts:333](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L333)* **Parameters:** Name | Type | Default | ------ | ------ | ------ | -`_emitProgress` | boolean | false | -`_start` | number | 0 | -`_end?` | undefined | number | - | +`_options` | [CreateReadStreamOptions](createreadstreamoptions.md) | {} | **Returns:** *Promise‹ReadableStream›* @@ -340,17 +346,17 @@ ___ ### createSparseReadStream -▸ **createSparseReadStream**(`_generateChecksums`: boolean): *Promise‹[SparseReadable](sparsereadable.md)›* +▸ **createSparseReadStream**(`_options`: [CreateSparseReadStreamOptions](createsparsereadstreamoptions.md)): *Promise‹[SparseReadable](sparsereadable.md)›* *Inherited from [SourceSource](../classes/sourcesource.md).[createSparseReadStream](../classes/sourcesource.md#createsparsereadstream)* -*Defined in [lib/source-destination/source-destination.ts:317](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L317)* +*Defined in [lib/source-destination/source-destination.ts:339](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L339)* **Parameters:** Name | Type | Default | ------ | ------ | ------ | -`_generateChecksums` | boolean | false | +`_options` | [CreateSparseReadStreamOptions](createsparsereadstreamoptions.md) | {} | **Returns:** *Promise‹[SparseReadable](sparsereadable.md)›* @@ -358,11 +364,19 @@ ___ ### createSparseWriteStream -▸ **createSparseWriteStream**(): *Promise‹[SparseWritable](sparsewritable.md)›* +▸ **createSparseWriteStream**(`_options`: object): *Promise‹[SparseWritable](sparsewritable.md)›* *Inherited from [SourceSource](../classes/sourcesource.md).[createSparseWriteStream](../classes/sourcesource.md#createsparsewritestream)* -*Defined in [lib/source-destination/source-destination.ts:331](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L331)* +*Defined in [lib/source-destination/source-destination.ts:355](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L355)* + +**Parameters:** + +▪`Default value` **_options**: *object*= {} + +Name | Type | +------ | ------ | +`highWaterMark?` | undefined | number | **Returns:** *Promise‹[SparseWritable](sparsewritable.md)›* @@ -374,7 +388,7 @@ ___ *Inherited from [SourceSource](../classes/sourcesource.md).[createVerifier](../classes/sourcesource.md#createverifier)* -*Defined in [lib/source-destination/source-destination.ts:357](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L357)* +*Defined in [lib/source-destination/source-destination.ts:383](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L383)* **Parameters:** @@ -389,11 +403,19 @@ ___ ### createWriteStream -▸ **createWriteStream**(): *Promise‹WritableStream›* +▸ **createWriteStream**(`_options`: object): *Promise‹WritableStream›* *Inherited from [SourceSource](../classes/sourcesource.md).[createWriteStream](../classes/sourcesource.md#createwritestream)* -*Defined in [lib/source-destination/source-destination.ts:327](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L327)* +*Defined in [lib/source-destination/source-destination.ts:349](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L349)* + +**Parameters:** + +▪`Default value` **_options**: *object*= {} + +Name | Type | +------ | ------ | +`highWaterMark?` | undefined | number | **Returns:** *Promise‹WritableStream›* @@ -407,7 +429,7 @@ ___ *Overrides [SparseReadable](sparsereadable.md).[emit](sparsereadable.md#emit)* -Defined in node_modules/@types/node/base.d.ts:693 +Defined in node_modules/@types/node/base.d.ts:908 **Parameters:** @@ -422,15 +444,27 @@ ___ ### eventNames -▸ **eventNames**(): *string | symbol[]* +▸ **eventNames**(): *Array‹string | symbol›* *Inherited from [CountingWritable](../classes/countingwritable.md).[eventNames](../classes/countingwritable.md#eventnames)* *Overrides [SparseReadable](sparsereadable.md).[eventNames](sparsereadable.md#eventnames)* -Defined in node_modules/@types/node/base.d.ts:694 +Defined in node_modules/@types/node/base.d.ts:909 -**Returns:** *string | symbol[]* +**Returns:** *Array‹string | symbol›* + +___ + +### getAlignment + +▸ **getAlignment**(): *number | undefined* + +*Inherited from [SourceSource](../classes/sourcesource.md).[getAlignment](../classes/sourcesource.md#getalignment)* + +*Defined in [lib/source-destination/source-destination.ts:276](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L276)* + +**Returns:** *number | undefined* ___ @@ -440,7 +474,7 @@ ___ *Inherited from [SourceSource](../classes/sourcesource.md).[getBlocks](../classes/sourcesource.md#getblocks)* -*Defined in [lib/source-destination/source-destination.ts:323](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L323)* +*Defined in [lib/source-destination/source-destination.ts:345](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L345)* **Returns:** *Promise‹[BlocksWithChecksum](blockswithchecksum.md)[]›* @@ -452,7 +486,7 @@ ___ *Inherited from [SourceSource](../classes/sourcesource.md).[getInnerSource](../classes/sourcesource.md#getinnersource)* -*Defined in [lib/source-destination/source-destination.ts:424](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L424)* +*Defined in [lib/source-destination/source-destination.ts:452](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L452)* **Returns:** *Promise‹[SourceDestination](../classes/sourcedestination.md)›* @@ -466,7 +500,7 @@ ___ *Overrides [SparseReadable](sparsereadable.md).[getMaxListeners](sparsereadable.md#getmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:691 +Defined in node_modules/@types/node/base.d.ts:906 **Returns:** *number* @@ -478,7 +512,7 @@ ___ *Inherited from [SourceSource](../classes/sourcesource.md).[getMetadata](../classes/sourcesource.md#getmetadata)* -*Defined in [lib/source-destination/source-destination.ts:280](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L280)* +*Defined in [lib/source-destination/source-destination.ts:304](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L304)* **Returns:** *Promise‹[Metadata](metadata.md)›* @@ -490,7 +524,7 @@ ___ *Inherited from [SourceSource](../classes/sourcesource.md).[getPartitionTable](../classes/sourcesource.md#getpartitiontable)* -*Defined in [lib/source-destination/source-destination.ts:445](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L445)* +*Defined in [lib/source-destination/source-destination.ts:473](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L473)* **Returns:** *Promise‹GetPartitionsResult | undefined›* @@ -504,7 +538,7 @@ ___ *Overrides [SparseReadable](sparsereadable.md).[listenerCount](sparsereadable.md#listenercount)* -Defined in node_modules/@types/node/base.d.ts:695 +Defined in node_modules/@types/node/base.d.ts:910 **Parameters:** @@ -524,7 +558,7 @@ ___ *Overrides [SparseReadable](sparsereadable.md).[listeners](sparsereadable.md#listeners)* -Defined in node_modules/@types/node/base.d.ts:692 +Defined in node_modules/@types/node/base.d.ts:907 **Parameters:** @@ -538,20 +572,27 @@ ___ ### on -▸ **on**(`event`: string | symbol, `listener`: Function): *this* +▸ **on**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](../classes/sourcesource.md).[on](../classes/sourcesource.md#on)* *Overrides [SparseReadable](sparsereadable.md).[on](sparsereadable.md#on)* -Defined in node_modules/@types/node/base.d.ts:684 +Defined in node_modules/@types/node/base.d.ts:899 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -559,20 +600,27 @@ ___ ### once -▸ **once**(`event`: string | symbol, `listener`: Function): *this* +▸ **once**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](../classes/sourcesource.md).[once](../classes/sourcesource.md#once)* *Overrides [SparseReadable](sparsereadable.md).[once](sparsereadable.md#once)* -Defined in node_modules/@types/node/base.d.ts:685 +Defined in node_modules/@types/node/base.d.ts:900 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -584,7 +632,7 @@ ___ *Inherited from [SourceSource](../classes/sourcesource.md).[open](../classes/sourcesource.md#open)* -*Defined in [lib/source-destination/source-destination.ts:335](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L335)* +*Defined in [lib/source-destination/source-destination.ts:361](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L361)* **Returns:** *Promise‹void›* @@ -592,20 +640,27 @@ ___ ### prependListener -▸ **prependListener**(`event`: string | symbol, `listener`: Function): *this* +▸ **prependListener**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](../classes/sourcesource.md).[prependListener](../classes/sourcesource.md#prependlistener)* *Overrides [SparseReadable](sparsereadable.md).[prependListener](sparsereadable.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:686 +Defined in node_modules/@types/node/base.d.ts:901 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -613,20 +668,27 @@ ___ ### prependOnceListener -▸ **prependOnceListener**(`event`: string | symbol, `listener`: Function): *this* +▸ **prependOnceListener**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](../classes/sourcesource.md).[prependOnceListener](../classes/sourcesource.md#prependoncelistener)* *Overrides [SparseReadable](sparsereadable.md).[prependOnceListener](sparsereadable.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:687 +Defined in node_modules/@types/node/base.d.ts:902 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -634,17 +696,17 @@ ___ ### read -▸ **read**(`_buffer`: Buffer, `_bufferOffset`: number, `_length`: number, `_sourceOffset`: number): *Promise‹ReadResult›* +▸ **read**(`_buffer`: [Buffer](alignedlockablebuffer.md#buffer), `_bufferOffset`: number, `_length`: number, `_sourceOffset`: number): *Promise‹ReadResult›* *Inherited from [SourceSource](../classes/sourcesource.md).[read](../classes/sourcesource.md#read)* -*Defined in [lib/source-destination/source-destination.ts:291](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L291)* +*Defined in [lib/source-destination/source-destination.ts:315](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L315)* **Parameters:** Name | Type | ------ | ------ | -`_buffer` | Buffer | +`_buffer` | [Buffer](alignedlockablebuffer.md#buffer) | `_bufferOffset` | number | `_length` | number | `_sourceOffset` | number | @@ -661,7 +723,7 @@ ___ *Overrides [SparseReadable](sparsereadable.md).[removeAllListeners](sparsereadable.md#removealllisteners)* -Defined in node_modules/@types/node/base.d.ts:689 +Defined in node_modules/@types/node/base.d.ts:904 **Parameters:** @@ -675,20 +737,27 @@ ___ ### removeListener -▸ **removeListener**(`event`: string | symbol, `listener`: Function): *this* +▸ **removeListener**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SourceSource](../classes/sourcesource.md).[removeListener](../classes/sourcesource.md#removelistener)* *Overrides [SparseReadable](sparsereadable.md).[removeListener](sparsereadable.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:688 +Defined in node_modules/@types/node/base.d.ts:903 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -702,7 +771,7 @@ ___ *Overrides [SparseReadable](sparsereadable.md).[setMaxListeners](sparsereadable.md#setmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:690 +Defined in node_modules/@types/node/base.d.ts:905 **Parameters:** @@ -716,17 +785,17 @@ ___ ### write -▸ **write**(`_buffer`: Buffer, `_bufferOffset`: number, `_length`: number, `_fileOffset`: number): *Promise‹WriteResult›* +▸ **write**(`_buffer`: [Buffer](alignedlockablebuffer.md#buffer), `_bufferOffset`: number, `_length`: number, `_fileOffset`: number): *Promise‹WriteResult›* *Inherited from [SourceSource](../classes/sourcesource.md).[write](../classes/sourcesource.md#write)* -*Defined in [lib/source-destination/source-destination.ts:300](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L300)* +*Defined in [lib/source-destination/source-destination.ts:324](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L324)* **Parameters:** Name | Type | ------ | ------ | -`_buffer` | Buffer | +`_buffer` | [Buffer](alignedlockablebuffer.md#buffer) | `_bufferOffset` | number | `_length` | number | `_fileOffset` | number | @@ -741,7 +810,7 @@ ___ *Inherited from [CountingWritable](../classes/countingwritable.md).[listenerCount](../classes/countingwritable.md#static-listenercount)* -Defined in node_modules/@types/node/base.d.ts:680 +Defined in node_modules/@types/node/base.d.ts:895 **Parameters:** @@ -760,7 +829,7 @@ ___ *Inherited from [SourceSource](../classes/sourcesource.md).[register](../classes/sourcesource.md#static-register)* -*Defined in [lib/source-destination/source-destination.ts:250](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/source-destination.ts#L250)* +*Defined in [lib/source-destination/source-destination.ts:270](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L270)* **Parameters:** diff --git a/doc/interfaces/alignedlockablebuffer.md b/doc/interfaces/alignedlockablebuffer.md new file mode 100644 index 00000000..417f7da7 --- /dev/null +++ b/doc/interfaces/alignedlockablebuffer.md @@ -0,0 +1,1843 @@ +[etcher-sdk](../README.md) › [AlignedLockableBuffer](alignedlockablebuffer.md) + +# Interface: AlignedLockableBuffer + +## Hierarchy + +* [Buffer](alignedlockablebuffer.md#buffer) + + ↳ **AlignedLockableBuffer** + +## Indexable + +* \[ **index**: *number*\]: number + +## Index + +### Properties + +* [BYTES_PER_ELEMENT](alignedlockablebuffer.md#bytes_per_element) +* [Buffer](alignedlockablebuffer.md#buffer) +* [alignment](alignedlockablebuffer.md#alignment) +* [buffer](alignedlockablebuffer.md#buffer) +* [byteLength](alignedlockablebuffer.md#bytelength) +* [byteOffset](alignedlockablebuffer.md#byteoffset) +* [length](alignedlockablebuffer.md#length) +* [lock](alignedlockablebuffer.md#lock) +* [rlock](alignedlockablebuffer.md#rlock) +* [slice](alignedlockablebuffer.md#slice) + +### Methods + +* [compare](alignedlockablebuffer.md#compare) +* [copy](alignedlockablebuffer.md#copy) +* [copyWithin](alignedlockablebuffer.md#copywithin) +* [entries](alignedlockablebuffer.md#entries) +* [equals](alignedlockablebuffer.md#equals) +* [every](alignedlockablebuffer.md#every) +* [fill](alignedlockablebuffer.md#fill) +* [filter](alignedlockablebuffer.md#filter) +* [find](alignedlockablebuffer.md#find) +* [findIndex](alignedlockablebuffer.md#findindex) +* [forEach](alignedlockablebuffer.md#foreach) +* [includes](alignedlockablebuffer.md#includes) +* [indexOf](alignedlockablebuffer.md#indexof) +* [join](alignedlockablebuffer.md#join) +* [keys](alignedlockablebuffer.md#keys) +* [lastIndexOf](alignedlockablebuffer.md#lastindexof) +* [map](alignedlockablebuffer.md#map) +* [readDoubleBE](alignedlockablebuffer.md#readdoublebe) +* [readDoubleLE](alignedlockablebuffer.md#readdoublele) +* [readFloatBE](alignedlockablebuffer.md#readfloatbe) +* [readFloatLE](alignedlockablebuffer.md#readfloatle) +* [readInt16BE](alignedlockablebuffer.md#readint16be) +* [readInt16LE](alignedlockablebuffer.md#readint16le) +* [readInt32BE](alignedlockablebuffer.md#readint32be) +* [readInt32LE](alignedlockablebuffer.md#readint32le) +* [readInt8](alignedlockablebuffer.md#readint8) +* [readIntBE](alignedlockablebuffer.md#readintbe) +* [readIntLE](alignedlockablebuffer.md#readintle) +* [readUInt16BE](alignedlockablebuffer.md#readuint16be) +* [readUInt16LE](alignedlockablebuffer.md#readuint16le) +* [readUInt32BE](alignedlockablebuffer.md#readuint32be) +* [readUInt32LE](alignedlockablebuffer.md#readuint32le) +* [readUInt8](alignedlockablebuffer.md#readuint8) +* [readUIntBE](alignedlockablebuffer.md#readuintbe) +* [readUIntLE](alignedlockablebuffer.md#readuintle) +* [reduce](alignedlockablebuffer.md#reduce) +* [reduceRight](alignedlockablebuffer.md#reduceright) +* [reverse](alignedlockablebuffer.md#reverse) +* [set](alignedlockablebuffer.md#set) +* [some](alignedlockablebuffer.md#some) +* [sort](alignedlockablebuffer.md#sort) +* [subarray](alignedlockablebuffer.md#subarray) +* [swap16](alignedlockablebuffer.md#swap16) +* [swap32](alignedlockablebuffer.md#swap32) +* [swap64](alignedlockablebuffer.md#swap64) +* [toJSON](alignedlockablebuffer.md#tojson) +* [toLocaleString](alignedlockablebuffer.md#tolocalestring) +* [toString](alignedlockablebuffer.md#tostring) +* [values](alignedlockablebuffer.md#values) +* [write](alignedlockablebuffer.md#write) +* [writeDoubleBE](alignedlockablebuffer.md#writedoublebe) +* [writeDoubleLE](alignedlockablebuffer.md#writedoublele) +* [writeFloatBE](alignedlockablebuffer.md#writefloatbe) +* [writeFloatLE](alignedlockablebuffer.md#writefloatle) +* [writeInt16BE](alignedlockablebuffer.md#writeint16be) +* [writeInt16LE](alignedlockablebuffer.md#writeint16le) +* [writeInt32BE](alignedlockablebuffer.md#writeint32be) +* [writeInt32LE](alignedlockablebuffer.md#writeint32le) +* [writeInt8](alignedlockablebuffer.md#writeint8) +* [writeIntBE](alignedlockablebuffer.md#writeintbe) +* [writeIntLE](alignedlockablebuffer.md#writeintle) +* [writeUInt16BE](alignedlockablebuffer.md#writeuint16be) +* [writeUInt16LE](alignedlockablebuffer.md#writeuint16le) +* [writeUInt32BE](alignedlockablebuffer.md#writeuint32be) +* [writeUInt32LE](alignedlockablebuffer.md#writeuint32le) +* [writeUInt8](alignedlockablebuffer.md#writeuint8) +* [writeUIntBE](alignedlockablebuffer.md#writeuintbe) +* [writeUIntLE](alignedlockablebuffer.md#writeuintle) + +## Properties + +### BYTES_PER_ELEMENT + +• **BYTES_PER_ELEMENT**: *number* + +*Inherited from [AlignedLockableBuffer](alignedlockablebuffer.md).[BYTES_PER_ELEMENT](alignedlockablebuffer.md#bytes_per_element)* + +Defined in node_modules/typescript/lib/lib.es5.d.ts:1988 + +The size in bytes of each element in the array. + +___ + +### Buffer + +• **Buffer**: *object* + +Defined in node_modules/@types/node/base.d.ts:153 + +Raw data is stored in instances of the Buffer class. +A Buffer is similar to an array of integers but corresponds to a raw memory allocation outside the V8 heap. A Buffer cannot be resized. +Valid string encodings: 'ascii'|'utf8'|'utf16le'|'ucs2'(alias of 'utf16le')|'base64'|'binary'(deprecated)|'hex' + +#### Type declaration: + +* **new __type**(`str`: string, `encoding?`: undefined | string): *[Buffer](alignedlockablebuffer.md#buffer)* + +* **new __type**(`size`: number): *[Buffer](alignedlockablebuffer.md#buffer)* + +* **new __type**(`array`: Uint8Array): *[Buffer](alignedlockablebuffer.md#buffer)* + +* **new __type**(`arrayBuffer`: ArrayBuffer): *[Buffer](alignedlockablebuffer.md#buffer)* + +* **new __type**(`array`: any[]): *[Buffer](alignedlockablebuffer.md#buffer)* + +* **new __type**(`buffer`: [Buffer](alignedlockablebuffer.md#buffer)): *[Buffer](alignedlockablebuffer.md#buffer)* + +* **poolSize**: *number* + +* **prototype**: *[Buffer](alignedlockablebuffer.md#buffer)* + +* **alloc**(`size`: number, `fill?`: string | [Buffer](alignedlockablebuffer.md#buffer) | number, `encoding?`: undefined | string): *[Buffer](alignedlockablebuffer.md#buffer)* + +* **allocUnsafe**(`size`: number): *[Buffer](alignedlockablebuffer.md#buffer)* + +* **allocUnsafeSlow**(`size`: number): *[Buffer](alignedlockablebuffer.md#buffer)* + +* **byteLength**(`string`: string | [Buffer](alignedlockablebuffer.md#buffer) | DataView | ArrayBuffer, `encoding?`: undefined | string): *number* + +* **compare**(`buf1`: [Buffer](alignedlockablebuffer.md#buffer), `buf2`: [Buffer](alignedlockablebuffer.md#buffer)): *number* + +* **concat**(`list`: [Buffer](alignedlockablebuffer.md#buffer)[], `totalLength?`: undefined | number): *[Buffer](alignedlockablebuffer.md#buffer)* + +* **from**(`arrayBuffer`: ArrayBuffer, `byteOffset?`: undefined | number, `length?`: undefined | number): *[Buffer](alignedlockablebuffer.md#buffer)* + +* **from**(`data`: any[] | string | [Buffer](alignedlockablebuffer.md#buffer) | ArrayBuffer): *[Buffer](alignedlockablebuffer.md#buffer)* + +* **from**(`str`: string, `encoding?`: undefined | string): *[Buffer](alignedlockablebuffer.md#buffer)* + +* **isBuffer**(`obj`: any): *obj is Buffer* + +* **isEncoding**(`encoding`: string): *boolean* + +___ + +### alignment + +• **alignment**: *number* + +*Defined in [lib/aligned-lockable-buffer.ts:5](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/aligned-lockable-buffer.ts#L5)* + +___ + +### buffer + +• **buffer**: *ArrayBufferLike* + +*Inherited from [AlignedLockableBuffer](alignedlockablebuffer.md).[buffer](alignedlockablebuffer.md#buffer)* + +Defined in node_modules/typescript/lib/lib.es5.d.ts:1993 + +The ArrayBuffer instance referenced by the array. + +___ + +### byteLength + +• **byteLength**: *number* + +*Inherited from [AlignedLockableBuffer](alignedlockablebuffer.md).[byteLength](alignedlockablebuffer.md#bytelength)* + +Defined in node_modules/typescript/lib/lib.es5.d.ts:1998 + +The length in bytes of the array. + +___ + +### byteOffset + +• **byteOffset**: *number* + +*Inherited from [AlignedLockableBuffer](alignedlockablebuffer.md).[byteOffset](alignedlockablebuffer.md#byteoffset)* + +Defined in node_modules/typescript/lib/lib.es5.d.ts:2003 + +The offset in bytes of the array. + +___ + +### length + +• **length**: *number* + +*Inherited from [AlignedLockableBuffer](alignedlockablebuffer.md).[length](alignedlockablebuffer.md#length)* + +Defined in node_modules/typescript/lib/lib.es5.d.ts:2102 + +The length of the array. + +___ + +### lock + +• **lock**: *function* + +*Defined in [lib/aligned-lockable-buffer.ts:6](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/aligned-lockable-buffer.ts#L6)* + +#### Type declaration: + +▸ (): *Promise‹function›* + +___ + +### rlock + +• **rlock**: *function* + +*Defined in [lib/aligned-lockable-buffer.ts:7](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/aligned-lockable-buffer.ts#L7)* + +#### Type declaration: + +▸ (): *Promise‹function›* + +___ + +### slice + +• **slice**: *function* + +*Overrides void* + +*Defined in [lib/aligned-lockable-buffer.ts:8](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/aligned-lockable-buffer.ts#L8)* + +#### Type declaration: + +▸ (`start?`: undefined | number, `end?`: undefined | number): *[AlignedLockableBuffer](alignedlockablebuffer.md)* + +**Parameters:** + +Name | Type | +------ | ------ | +`start?` | undefined | number | +`end?` | undefined | number | + +## Methods + +### compare + +▸ **compare**(`otherBuffer`: [Buffer](alignedlockablebuffer.md#buffer), `targetStart?`: undefined | number, `targetEnd?`: undefined | number, `sourceStart?`: undefined | number, `sourceEnd?`: undefined | number): *number* + +*Inherited from [AlignedLockableBuffer](alignedlockablebuffer.md).[compare](alignedlockablebuffer.md#compare)* + +Defined in node_modules/@types/node/base.d.ts:806 + +**Parameters:** + +Name | Type | +------ | ------ | +`otherBuffer` | [Buffer](alignedlockablebuffer.md#buffer) | +`targetStart?` | undefined | number | +`targetEnd?` | undefined | number | +`sourceStart?` | undefined | number | +`sourceEnd?` | undefined | number | + +**Returns:** *number* + +___ + +### copy + +▸ **copy**(`targetBuffer`: [Buffer](alignedlockablebuffer.md#buffer), `targetStart?`: undefined | number, `sourceStart?`: undefined | number, `sourceEnd?`: undefined | number): *number* + +*Inherited from [AlignedLockableBuffer](alignedlockablebuffer.md).[copy](alignedlockablebuffer.md#copy)* + +Defined in node_modules/@types/node/base.d.ts:807 + +**Parameters:** + +Name | Type | +------ | ------ | +`targetBuffer` | [Buffer](alignedlockablebuffer.md#buffer) | +`targetStart?` | undefined | number | +`sourceStart?` | undefined | number | +`sourceEnd?` | undefined | number | + +**Returns:** *number* + +___ + +### copyWithin + +▸ **copyWithin**(`target`: number, `start`: number, `end?`: undefined | number): *this* + +*Inherited from [AlignedLockableBuffer](alignedlockablebuffer.md).[copyWithin](alignedlockablebuffer.md#copywithin)* + +Defined in node_modules/typescript/lib/lib.es5.d.ts:2014 + +Returns the this object after copying a section of the array identified by start and end +to the same array starting at position target + +**Parameters:** + +Name | Type | Description | +------ | ------ | ------ | +`target` | number | If target is negative, it is treated as length+target where length is the length of the array. | +`start` | number | If start is negative, it is treated as length+start. If end is negative, it is treated as length+end. | +`end?` | undefined | number | If not specified, length of the this object is used as its default value. | + +**Returns:** *this* + +___ + +### entries + +▸ **entries**(): *IterableIterator‹[number, number]›* + +*Inherited from [AlignedLockableBuffer](alignedlockablebuffer.md).[entries](alignedlockablebuffer.md#entries)* + +Defined in node_modules/@types/node/base.d.ts:851 + +**Returns:** *IterableIterator‹[number, number]›* + +___ + +### equals + +▸ **equals**(`otherBuffer`: [Buffer](alignedlockablebuffer.md#buffer)): *boolean* + +*Inherited from [AlignedLockableBuffer](alignedlockablebuffer.md).[equals](alignedlockablebuffer.md#equals)* + +Defined in node_modules/@types/node/base.d.ts:805 + +**Parameters:** + +Name | Type | +------ | ------ | +`otherBuffer` | [Buffer](alignedlockablebuffer.md#buffer) | + +**Returns:** *boolean* + +___ + +### every + +▸ **every**(`callbackfn`: function, `thisArg?`: any): *boolean* + +*Inherited from [AlignedLockableBuffer](alignedlockablebuffer.md).[every](alignedlockablebuffer.md#every)* + +Defined in node_modules/typescript/lib/lib.es5.d.ts:2024 + +Determines whether all the members of an array satisfy the specified test. + +**Parameters:** + +▪ **callbackfn**: *function* + +A function that accepts up to three arguments. The every method calls +the callbackfn function for each element in the array until the callbackfn returns a value +which is coercible to the Boolean value false, or until the end of the array. + +▸ (`value`: number, `index`: number, `array`: Uint8Array): *unknown* + +**Parameters:** + +Name | Type | +------ | ------ | +`value` | number | +`index` | number | +`array` | Uint8Array | + +▪`Optional` **thisArg**: *any* + +An object to which the this keyword can refer in the callbackfn function. +If thisArg is omitted, undefined is used as the this value. + +**Returns:** *boolean* + +___ + +### fill + +▸ **fill**(`value`: any, `offset?`: undefined | number, `end?`: undefined | number): *this* + +*Inherited from [AlignedLockableBuffer](alignedlockablebuffer.md).[fill](alignedlockablebuffer.md#fill)* + +*Overrides void* + +Defined in node_modules/@types/node/base.d.ts:848 + +**Parameters:** + +Name | Type | +------ | ------ | +`value` | any | +`offset?` | undefined | number | +`end?` | undefined | number | + +**Returns:** *this* + +___ + +### filter + +▸ **filter**(`callbackfn`: function, `thisArg?`: any): *Uint8Array* + +*Inherited from [AlignedLockableBuffer](alignedlockablebuffer.md).[filter](alignedlockablebuffer.md#filter)* + +Defined in node_modules/typescript/lib/lib.es5.d.ts:2043 + +Returns the elements of an array that meet the condition specified in a callback function. + +**Parameters:** + +▪ **callbackfn**: *function* + +A function that accepts up to three arguments. The filter method calls +the callbackfn function one time for each element in the array. + +▸ (`value`: number, `index`: number, `array`: Uint8Array): *any* + +**Parameters:** + +Name | Type | +------ | ------ | +`value` | number | +`index` | number | +`array` | Uint8Array | + +▪`Optional` **thisArg**: *any* + +An object to which the this keyword can refer in the callbackfn function. +If thisArg is omitted, undefined is used as the this value. + +**Returns:** *Uint8Array* + +___ + +### find + +▸ **find**(`predicate`: function, `thisArg?`: any): *number | undefined* + +*Inherited from [AlignedLockableBuffer](alignedlockablebuffer.md).[find](alignedlockablebuffer.md#find)* + +Defined in node_modules/typescript/lib/lib.es5.d.ts:2054 + +Returns the value of the first element in the array where predicate is true, and undefined +otherwise. + +**Parameters:** + +▪ **predicate**: *function* + +find calls predicate once for each element of the array, in ascending +order, until it finds one where predicate returns true. If such an element is found, find +immediately returns that element value. Otherwise, find returns undefined. + +▸ (`value`: number, `index`: number, `obj`: Uint8Array): *boolean* + +**Parameters:** + +Name | Type | +------ | ------ | +`value` | number | +`index` | number | +`obj` | Uint8Array | + +▪`Optional` **thisArg**: *any* + +If provided, it will be used as the this value for each invocation of +predicate. If it is not provided, undefined is used instead. + +**Returns:** *number | undefined* + +___ + +### findIndex + +▸ **findIndex**(`predicate`: function, `thisArg?`: any): *number* + +*Inherited from [AlignedLockableBuffer](alignedlockablebuffer.md).[findIndex](alignedlockablebuffer.md#findindex)* + +Defined in node_modules/typescript/lib/lib.es5.d.ts:2065 + +Returns the index of the first element in the array where predicate is true, and -1 +otherwise. + +**Parameters:** + +▪ **predicate**: *function* + +find calls predicate once for each element of the array, in ascending +order, until it finds one where predicate returns true. If such an element is found, +findIndex immediately returns that element index. Otherwise, findIndex returns -1. + +▸ (`value`: number, `index`: number, `obj`: Uint8Array): *boolean* + +**Parameters:** + +Name | Type | +------ | ------ | +`value` | number | +`index` | number | +`obj` | Uint8Array | + +▪`Optional` **thisArg**: *any* + +If provided, it will be used as the this value for each invocation of +predicate. If it is not provided, undefined is used instead. + +**Returns:** *number* + +___ + +### forEach + +▸ **forEach**(`callbackfn`: function, `thisArg?`: any): *void* + +*Inherited from [AlignedLockableBuffer](alignedlockablebuffer.md).[forEach](alignedlockablebuffer.md#foreach)* + +Defined in node_modules/typescript/lib/lib.es5.d.ts:2074 + +Performs the specified action for each element in an array. + +**Parameters:** + +▪ **callbackfn**: *function* + +A function that accepts up to three arguments. forEach calls the +callbackfn function one time for each element in the array. + +▸ (`value`: number, `index`: number, `array`: Uint8Array): *void* + +**Parameters:** + +Name | Type | +------ | ------ | +`value` | number | +`index` | number | +`array` | Uint8Array | + +▪`Optional` **thisArg**: *any* + +An object to which the this keyword can refer in the callbackfn function. +If thisArg is omitted, undefined is used as the this value. + +**Returns:** *void* + +___ + +### includes + +▸ **includes**(`value`: string | number | [Buffer](alignedlockablebuffer.md#buffer), `byteOffset?`: undefined | number, `encoding?`: undefined | string): *boolean* + +*Inherited from [AlignedLockableBuffer](alignedlockablebuffer.md).[includes](alignedlockablebuffer.md#includes)* + +Defined in node_modules/@types/node/base.d.ts:852 + +**Parameters:** + +Name | Type | +------ | ------ | +`value` | string | number | [Buffer](alignedlockablebuffer.md#buffer) | +`byteOffset?` | undefined | number | +`encoding?` | undefined | string | + +**Returns:** *boolean* + +___ + +### indexOf + +▸ **indexOf**(`value`: string | number | [Buffer](alignedlockablebuffer.md#buffer), `byteOffset?`: undefined | number, `encoding?`: undefined | string): *number* + +*Inherited from [AlignedLockableBuffer](alignedlockablebuffer.md).[indexOf](alignedlockablebuffer.md#indexof)* + +*Overrides void* + +Defined in node_modules/@types/node/base.d.ts:849 + +**Parameters:** + +Name | Type | +------ | ------ | +`value` | string | number | [Buffer](alignedlockablebuffer.md#buffer) | +`byteOffset?` | undefined | number | +`encoding?` | undefined | string | + +**Returns:** *number* + +___ + +### join + +▸ **join**(`separator?`: undefined | string): *string* + +*Inherited from [AlignedLockableBuffer](alignedlockablebuffer.md).[join](alignedlockablebuffer.md#join)* + +Defined in node_modules/typescript/lib/lib.es5.d.ts:2089 + +Adds all the elements of an array separated by the specified separator string. + +**Parameters:** + +Name | Type | Description | +------ | ------ | ------ | +`separator?` | undefined | string | A string used to separate one element of an array from the next in the resulting String. If omitted, the array elements are separated with a comma. | + +**Returns:** *string* + +___ + +### keys + +▸ **keys**(): *IterableIterator‹number›* + +*Inherited from [AlignedLockableBuffer](alignedlockablebuffer.md).[keys](alignedlockablebuffer.md#keys)* + +Defined in node_modules/@types/node/base.d.ts:853 + +**Returns:** *IterableIterator‹number›* + +___ + +### lastIndexOf + +▸ **lastIndexOf**(`value`: string | number | [Buffer](alignedlockablebuffer.md#buffer), `byteOffset?`: undefined | number, `encoding?`: undefined | string): *number* + +*Inherited from [AlignedLockableBuffer](alignedlockablebuffer.md).[lastIndexOf](alignedlockablebuffer.md#lastindexof)* + +*Overrides void* + +Defined in node_modules/@types/node/base.d.ts:850 + +**Parameters:** + +Name | Type | +------ | ------ | +`value` | string | number | [Buffer](alignedlockablebuffer.md#buffer) | +`byteOffset?` | undefined | number | +`encoding?` | undefined | string | + +**Returns:** *number* + +___ + +### map + +▸ **map**(`callbackfn`: function, `thisArg?`: any): *Uint8Array* + +*Inherited from [AlignedLockableBuffer](alignedlockablebuffer.md).[map](alignedlockablebuffer.md#map)* + +Defined in node_modules/typescript/lib/lib.es5.d.ts:2112 + +Calls a defined callback function on each element of an array, and returns an array that +contains the results. + +**Parameters:** + +▪ **callbackfn**: *function* + +A function that accepts up to three arguments. The map method calls the +callbackfn function one time for each element in the array. + +▸ (`value`: number, `index`: number, `array`: Uint8Array): *number* + +**Parameters:** + +Name | Type | +------ | ------ | +`value` | number | +`index` | number | +`array` | Uint8Array | + +▪`Optional` **thisArg**: *any* + +An object to which the this keyword can refer in the callbackfn function. +If thisArg is omitted, undefined is used as the this value. + +**Returns:** *Uint8Array* + +___ + +### readDoubleBE + +▸ **readDoubleBE**(`offset`: number, `noAssert?`: undefined | false | true): *number* + +*Inherited from [AlignedLockableBuffer](alignedlockablebuffer.md).[readDoubleBE](alignedlockablebuffer.md#readdoublebe)* + +Defined in node_modules/@types/node/base.d.ts:830 + +**Parameters:** + +Name | Type | +------ | ------ | +`offset` | number | +`noAssert?` | undefined | false | true | + +**Returns:** *number* + +___ + +### readDoubleLE + +▸ **readDoubleLE**(`offset`: number, `noAssert?`: undefined | false | true): *number* + +*Inherited from [AlignedLockableBuffer](alignedlockablebuffer.md).[readDoubleLE](alignedlockablebuffer.md#readdoublele)* + +Defined in node_modules/@types/node/base.d.ts:829 + +**Parameters:** + +Name | Type | +------ | ------ | +`offset` | number | +`noAssert?` | undefined | false | true | + +**Returns:** *number* + +___ + +### readFloatBE + +▸ **readFloatBE**(`offset`: number, `noAssert?`: undefined | false | true): *number* + +*Inherited from [AlignedLockableBuffer](alignedlockablebuffer.md).[readFloatBE](alignedlockablebuffer.md#readfloatbe)* + +Defined in node_modules/@types/node/base.d.ts:828 + +**Parameters:** + +Name | Type | +------ | ------ | +`offset` | number | +`noAssert?` | undefined | false | true | + +**Returns:** *number* + +___ + +### readFloatLE + +▸ **readFloatLE**(`offset`: number, `noAssert?`: undefined | false | true): *number* + +*Inherited from [AlignedLockableBuffer](alignedlockablebuffer.md).[readFloatLE](alignedlockablebuffer.md#readfloatle)* + +Defined in node_modules/@types/node/base.d.ts:827 + +**Parameters:** + +Name | Type | +------ | ------ | +`offset` | number | +`noAssert?` | undefined | false | true | + +**Returns:** *number* + +___ + +### readInt16BE + +▸ **readInt16BE**(`offset`: number, `noAssert?`: undefined | false | true): *number* + +*Inherited from [AlignedLockableBuffer](alignedlockablebuffer.md).[readInt16BE](alignedlockablebuffer.md#readint16be)* + +Defined in node_modules/@types/node/base.d.ts:824 + +**Parameters:** + +Name | Type | +------ | ------ | +`offset` | number | +`noAssert?` | undefined | false | true | + +**Returns:** *number* + +___ + +### readInt16LE + +▸ **readInt16LE**(`offset`: number, `noAssert?`: undefined | false | true): *number* + +*Inherited from [AlignedLockableBuffer](alignedlockablebuffer.md).[readInt16LE](alignedlockablebuffer.md#readint16le)* + +Defined in node_modules/@types/node/base.d.ts:823 + +**Parameters:** + +Name | Type | +------ | ------ | +`offset` | number | +`noAssert?` | undefined | false | true | + +**Returns:** *number* + +___ + +### readInt32BE + +▸ **readInt32BE**(`offset`: number, `noAssert?`: undefined | false | true): *number* + +*Inherited from [AlignedLockableBuffer](alignedlockablebuffer.md).[readInt32BE](alignedlockablebuffer.md#readint32be)* + +Defined in node_modules/@types/node/base.d.ts:826 + +**Parameters:** + +Name | Type | +------ | ------ | +`offset` | number | +`noAssert?` | undefined | false | true | + +**Returns:** *number* + +___ + +### readInt32LE + +▸ **readInt32LE**(`offset`: number, `noAssert?`: undefined | false | true): *number* + +*Inherited from [AlignedLockableBuffer](alignedlockablebuffer.md).[readInt32LE](alignedlockablebuffer.md#readint32le)* + +Defined in node_modules/@types/node/base.d.ts:825 + +**Parameters:** + +Name | Type | +------ | ------ | +`offset` | number | +`noAssert?` | undefined | false | true | + +**Returns:** *number* + +___ + +### readInt8 + +▸ **readInt8**(`offset`: number, `noAssert?`: undefined | false | true): *number* + +*Inherited from [AlignedLockableBuffer](alignedlockablebuffer.md).[readInt8](alignedlockablebuffer.md#readint8)* + +Defined in node_modules/@types/node/base.d.ts:822 + +**Parameters:** + +Name | Type | +------ | ------ | +`offset` | number | +`noAssert?` | undefined | false | true | + +**Returns:** *number* + +___ + +### readIntBE + +▸ **readIntBE**(`offset`: number, `byteLength`: number, `noAssert?`: undefined | false | true): *number* + +*Inherited from [AlignedLockableBuffer](alignedlockablebuffer.md).[readIntBE](alignedlockablebuffer.md#readintbe)* + +Defined in node_modules/@types/node/base.d.ts:816 + +**Parameters:** + +Name | Type | +------ | ------ | +`offset` | number | +`byteLength` | number | +`noAssert?` | undefined | false | true | + +**Returns:** *number* + +___ + +### readIntLE + +▸ **readIntLE**(`offset`: number, `byteLength`: number, `noAssert?`: undefined | false | true): *number* + +*Inherited from [AlignedLockableBuffer](alignedlockablebuffer.md).[readIntLE](alignedlockablebuffer.md#readintle)* + +Defined in node_modules/@types/node/base.d.ts:815 + +**Parameters:** + +Name | Type | +------ | ------ | +`offset` | number | +`byteLength` | number | +`noAssert?` | undefined | false | true | + +**Returns:** *number* + +___ + +### readUInt16BE + +▸ **readUInt16BE**(`offset`: number, `noAssert?`: undefined | false | true): *number* + +*Inherited from [AlignedLockableBuffer](alignedlockablebuffer.md).[readUInt16BE](alignedlockablebuffer.md#readuint16be)* + +Defined in node_modules/@types/node/base.d.ts:819 + +**Parameters:** + +Name | Type | +------ | ------ | +`offset` | number | +`noAssert?` | undefined | false | true | + +**Returns:** *number* + +___ + +### readUInt16LE + +▸ **readUInt16LE**(`offset`: number, `noAssert?`: undefined | false | true): *number* + +*Inherited from [AlignedLockableBuffer](alignedlockablebuffer.md).[readUInt16LE](alignedlockablebuffer.md#readuint16le)* + +Defined in node_modules/@types/node/base.d.ts:818 + +**Parameters:** + +Name | Type | +------ | ------ | +`offset` | number | +`noAssert?` | undefined | false | true | + +**Returns:** *number* + +___ + +### readUInt32BE + +▸ **readUInt32BE**(`offset`: number, `noAssert?`: undefined | false | true): *number* + +*Inherited from [AlignedLockableBuffer](alignedlockablebuffer.md).[readUInt32BE](alignedlockablebuffer.md#readuint32be)* + +Defined in node_modules/@types/node/base.d.ts:821 + +**Parameters:** + +Name | Type | +------ | ------ | +`offset` | number | +`noAssert?` | undefined | false | true | + +**Returns:** *number* + +___ + +### readUInt32LE + +▸ **readUInt32LE**(`offset`: number, `noAssert?`: undefined | false | true): *number* + +*Inherited from [AlignedLockableBuffer](alignedlockablebuffer.md).[readUInt32LE](alignedlockablebuffer.md#readuint32le)* + +Defined in node_modules/@types/node/base.d.ts:820 + +**Parameters:** + +Name | Type | +------ | ------ | +`offset` | number | +`noAssert?` | undefined | false | true | + +**Returns:** *number* + +___ + +### readUInt8 + +▸ **readUInt8**(`offset`: number, `noAssert?`: undefined | false | true): *number* + +*Inherited from [AlignedLockableBuffer](alignedlockablebuffer.md).[readUInt8](alignedlockablebuffer.md#readuint8)* + +Defined in node_modules/@types/node/base.d.ts:817 + +**Parameters:** + +Name | Type | +------ | ------ | +`offset` | number | +`noAssert?` | undefined | false | true | + +**Returns:** *number* + +___ + +### readUIntBE + +▸ **readUIntBE**(`offset`: number, `byteLength`: number, `noAssert?`: undefined | false | true): *number* + +*Inherited from [AlignedLockableBuffer](alignedlockablebuffer.md).[readUIntBE](alignedlockablebuffer.md#readuintbe)* + +Defined in node_modules/@types/node/base.d.ts:814 + +**Parameters:** + +Name | Type | +------ | ------ | +`offset` | number | +`byteLength` | number | +`noAssert?` | undefined | false | true | + +**Returns:** *number* + +___ + +### readUIntLE + +▸ **readUIntLE**(`offset`: number, `byteLength`: number, `noAssert?`: undefined | false | true): *number* + +*Inherited from [AlignedLockableBuffer](alignedlockablebuffer.md).[readUIntLE](alignedlockablebuffer.md#readuintle)* + +Defined in node_modules/@types/node/base.d.ts:813 + +**Parameters:** + +Name | Type | +------ | ------ | +`offset` | number | +`byteLength` | number | +`noAssert?` | undefined | false | true | + +**Returns:** *number* + +___ + +### reduce + +▸ **reduce**(`callbackfn`: function): *number* + +*Inherited from [AlignedLockableBuffer](alignedlockablebuffer.md).[reduce](alignedlockablebuffer.md#reduce)* + +Defined in node_modules/typescript/lib/lib.es5.d.ts:2124 + +Calls the specified callback function for all the elements in an array. The return value of +the callback function is the accumulated result, and is provided as an argument in the next +call to the callback function. + +**Parameters:** + +▪ **callbackfn**: *function* + +A function that accepts up to four arguments. The reduce method calls the +callbackfn function one time for each element in the array. + +▸ (`previousValue`: number, `currentValue`: number, `currentIndex`: number, `array`: Uint8Array): *number* + +**Parameters:** + +Name | Type | +------ | ------ | +`previousValue` | number | +`currentValue` | number | +`currentIndex` | number | +`array` | Uint8Array | + +**Returns:** *number* + +▸ **reduce**(`callbackfn`: function, `initialValue`: number): *number* + +*Inherited from [AlignedLockableBuffer](alignedlockablebuffer.md).[reduce](alignedlockablebuffer.md#reduce)* + +Defined in node_modules/typescript/lib/lib.es5.d.ts:2125 + +**Parameters:** + +▪ **callbackfn**: *function* + +▸ (`previousValue`: number, `currentValue`: number, `currentIndex`: number, `array`: Uint8Array): *number* + +**Parameters:** + +Name | Type | +------ | ------ | +`previousValue` | number | +`currentValue` | number | +`currentIndex` | number | +`array` | Uint8Array | + +▪ **initialValue**: *number* + +**Returns:** *number* + +▸ **reduce**<**U**>(`callbackfn`: function, `initialValue`: U): *U* + +*Inherited from [AlignedLockableBuffer](alignedlockablebuffer.md).[reduce](alignedlockablebuffer.md#reduce)* + +Defined in node_modules/typescript/lib/lib.es5.d.ts:2137 + +Calls the specified callback function for all the elements in an array. The return value of +the callback function is the accumulated result, and is provided as an argument in the next +call to the callback function. + +**Type parameters:** + +▪ **U** + +**Parameters:** + +▪ **callbackfn**: *function* + +A function that accepts up to four arguments. The reduce method calls the +callbackfn function one time for each element in the array. + +▸ (`previousValue`: U, `currentValue`: number, `currentIndex`: number, `array`: Uint8Array): *U* + +**Parameters:** + +Name | Type | +------ | ------ | +`previousValue` | U | +`currentValue` | number | +`currentIndex` | number | +`array` | Uint8Array | + +▪ **initialValue**: *U* + +If initialValue is specified, it is used as the initial value to start +the accumulation. The first call to the callbackfn function provides this value as an argument +instead of an array value. + +**Returns:** *U* + +___ + +### reduceRight + +▸ **reduceRight**(`callbackfn`: function): *number* + +*Inherited from [AlignedLockableBuffer](alignedlockablebuffer.md).[reduceRight](alignedlockablebuffer.md#reduceright)* + +Defined in node_modules/typescript/lib/lib.es5.d.ts:2149 + +Calls the specified callback function for all the elements in an array, in descending order. +The return value of the callback function is the accumulated result, and is provided as an +argument in the next call to the callback function. + +**Parameters:** + +▪ **callbackfn**: *function* + +A function that accepts up to four arguments. The reduceRight method calls +the callbackfn function one time for each element in the array. + +▸ (`previousValue`: number, `currentValue`: number, `currentIndex`: number, `array`: Uint8Array): *number* + +**Parameters:** + +Name | Type | +------ | ------ | +`previousValue` | number | +`currentValue` | number | +`currentIndex` | number | +`array` | Uint8Array | + +**Returns:** *number* + +▸ **reduceRight**(`callbackfn`: function, `initialValue`: number): *number* + +*Inherited from [AlignedLockableBuffer](alignedlockablebuffer.md).[reduceRight](alignedlockablebuffer.md#reduceright)* + +Defined in node_modules/typescript/lib/lib.es5.d.ts:2150 + +**Parameters:** + +▪ **callbackfn**: *function* + +▸ (`previousValue`: number, `currentValue`: number, `currentIndex`: number, `array`: Uint8Array): *number* + +**Parameters:** + +Name | Type | +------ | ------ | +`previousValue` | number | +`currentValue` | number | +`currentIndex` | number | +`array` | Uint8Array | + +▪ **initialValue**: *number* + +**Returns:** *number* + +▸ **reduceRight**<**U**>(`callbackfn`: function, `initialValue`: U): *U* + +*Inherited from [AlignedLockableBuffer](alignedlockablebuffer.md).[reduceRight](alignedlockablebuffer.md#reduceright)* + +Defined in node_modules/typescript/lib/lib.es5.d.ts:2162 + +Calls the specified callback function for all the elements in an array, in descending order. +The return value of the callback function is the accumulated result, and is provided as an +argument in the next call to the callback function. + +**Type parameters:** + +▪ **U** + +**Parameters:** + +▪ **callbackfn**: *function* + +A function that accepts up to four arguments. The reduceRight method calls +the callbackfn function one time for each element in the array. + +▸ (`previousValue`: U, `currentValue`: number, `currentIndex`: number, `array`: Uint8Array): *U* + +**Parameters:** + +Name | Type | +------ | ------ | +`previousValue` | U | +`currentValue` | number | +`currentIndex` | number | +`array` | Uint8Array | + +▪ **initialValue**: *U* + +If initialValue is specified, it is used as the initial value to start +the accumulation. The first call to the callbackfn function provides this value as an argument +instead of an array value. + +**Returns:** *U* + +___ + +### reverse + +▸ **reverse**(): *Uint8Array* + +*Inherited from [AlignedLockableBuffer](alignedlockablebuffer.md).[reverse](alignedlockablebuffer.md#reverse)* + +Defined in node_modules/typescript/lib/lib.es5.d.ts:2167 + +Reverses the elements in an Array. + +**Returns:** *Uint8Array* + +___ + +### set + +▸ **set**(`array`: ArrayLike‹number›, `offset?`: undefined | number): *void* + +*Inherited from [AlignedLockableBuffer](alignedlockablebuffer.md).[set](alignedlockablebuffer.md#set)* + +Defined in node_modules/typescript/lib/lib.es5.d.ts:2174 + +Sets a value or an array of values. + +**Parameters:** + +Name | Type | Description | +------ | ------ | ------ | +`array` | ArrayLike‹number› | A typed or untyped array of values to set. | +`offset?` | undefined | number | The index in the current array at which the values are to be written. | + +**Returns:** *void* + +___ + +### some + +▸ **some**(`callbackfn`: function, `thisArg?`: any): *boolean* + +*Inherited from [AlignedLockableBuffer](alignedlockablebuffer.md).[some](alignedlockablebuffer.md#some)* + +Defined in node_modules/typescript/lib/lib.es5.d.ts:2191 + +Determines whether the specified callback function returns true for any element of an array. + +**Parameters:** + +▪ **callbackfn**: *function* + +A function that accepts up to three arguments. The some method calls +the callbackfn function for each element in the array until the callbackfn returns a value +which is coercible to the Boolean value true, or until the end of the array. + +▸ (`value`: number, `index`: number, `array`: Uint8Array): *unknown* + +**Parameters:** + +Name | Type | +------ | ------ | +`value` | number | +`index` | number | +`array` | Uint8Array | + +▪`Optional` **thisArg**: *any* + +An object to which the this keyword can refer in the callbackfn function. +If thisArg is omitted, undefined is used as the this value. + +**Returns:** *boolean* + +___ + +### sort + +▸ **sort**(`compareFn?`: undefined | function): *this* + +*Inherited from [AlignedLockableBuffer](alignedlockablebuffer.md).[sort](alignedlockablebuffer.md#sort)* + +Defined in node_modules/typescript/lib/lib.es5.d.ts:2202 + +Sorts an array. + +**Parameters:** + +Name | Type | Description | +------ | ------ | ------ | +`compareFn?` | undefined | function | Function used to determine the order of the elements. It is expected to return a negative value if first argument is less than second argument, zero if they're equal and a positive value otherwise. If omitted, the elements are sorted in ascending, ASCII character order. ```ts [11,2,22,1].sort((a, b) => a - b) ``` | + +**Returns:** *this* + +___ + +### subarray + +▸ **subarray**(`begin?`: undefined | number, `end?`: undefined | number): *Uint8Array* + +*Inherited from [AlignedLockableBuffer](alignedlockablebuffer.md).[subarray](alignedlockablebuffer.md#subarray)* + +Defined in node_modules/typescript/lib/lib.es5.d.ts:2210 + +Gets a new Uint8Array view of the ArrayBuffer store for this array, referencing the elements +at begin, inclusive, up to end, exclusive. + +**Parameters:** + +Name | Type | Description | +------ | ------ | ------ | +`begin?` | undefined | number | The index of the beginning of the array. | +`end?` | undefined | number | The index of the end of the array. | + +**Returns:** *Uint8Array* + +___ + +### swap16 + +▸ **swap16**(): *[Buffer](alignedlockablebuffer.md#buffer)* + +*Inherited from [AlignedLockableBuffer](alignedlockablebuffer.md).[swap16](alignedlockablebuffer.md#swap16)* + +Defined in node_modules/@types/node/base.d.ts:831 + +**Returns:** *[Buffer](alignedlockablebuffer.md#buffer)* + +___ + +### swap32 + +▸ **swap32**(): *[Buffer](alignedlockablebuffer.md#buffer)* + +*Inherited from [AlignedLockableBuffer](alignedlockablebuffer.md).[swap32](alignedlockablebuffer.md#swap32)* + +Defined in node_modules/@types/node/base.d.ts:832 + +**Returns:** *[Buffer](alignedlockablebuffer.md#buffer)* + +___ + +### swap64 + +▸ **swap64**(): *[Buffer](alignedlockablebuffer.md#buffer)* + +*Inherited from [AlignedLockableBuffer](alignedlockablebuffer.md).[swap64](alignedlockablebuffer.md#swap64)* + +Defined in node_modules/@types/node/base.d.ts:833 + +**Returns:** *[Buffer](alignedlockablebuffer.md#buffer)* + +___ + +### toJSON + +▸ **toJSON**(): *object* + +*Inherited from [AlignedLockableBuffer](alignedlockablebuffer.md).[toJSON](alignedlockablebuffer.md#tojson)* + +Defined in node_modules/@types/node/base.d.ts:804 + +**Returns:** *object* + +* **data**: *any[]* + +* **type**: *"Buffer"* + +___ + +### toLocaleString + +▸ **toLocaleString**(): *string* + +*Inherited from [AlignedLockableBuffer](alignedlockablebuffer.md).[toLocaleString](alignedlockablebuffer.md#tolocalestring)* + +Defined in node_modules/typescript/lib/lib.es5.d.ts:2215 + +Converts a number to a string by using the current locale. + +**Returns:** *string* + +___ + +### toString + +▸ **toString**(`encoding?`: undefined | string, `start?`: undefined | number, `end?`: undefined | number): *string* + +*Inherited from [AlignedLockableBuffer](alignedlockablebuffer.md).[toString](alignedlockablebuffer.md#tostring)* + +*Overrides void* + +Defined in node_modules/@types/node/base.d.ts:803 + +**Parameters:** + +Name | Type | +------ | ------ | +`encoding?` | undefined | string | +`start?` | undefined | number | +`end?` | undefined | number | + +**Returns:** *string* + +___ + +### values + +▸ **values**(): *IterableIterator‹number›* + +*Inherited from [AlignedLockableBuffer](alignedlockablebuffer.md).[values](alignedlockablebuffer.md#values)* + +Defined in node_modules/@types/node/base.d.ts:854 + +**Returns:** *IterableIterator‹number›* + +___ + +### write + +▸ **write**(`string`: string, `offset?`: undefined | number, `length?`: undefined | number, `encoding?`: undefined | string): *number* + +*Inherited from [AlignedLockableBuffer](alignedlockablebuffer.md).[write](alignedlockablebuffer.md#write)* + +Defined in node_modules/@types/node/base.d.ts:802 + +**Parameters:** + +Name | Type | +------ | ------ | +`string` | string | +`offset?` | undefined | number | +`length?` | undefined | number | +`encoding?` | undefined | string | + +**Returns:** *number* + +___ + +### writeDoubleBE + +▸ **writeDoubleBE**(`value`: number, `offset`: number, `noAssert?`: undefined | false | true): *number* + +*Inherited from [AlignedLockableBuffer](alignedlockablebuffer.md).[writeDoubleBE](alignedlockablebuffer.md#writedoublebe)* + +Defined in node_modules/@types/node/base.d.ts:847 + +**Parameters:** + +Name | Type | +------ | ------ | +`value` | number | +`offset` | number | +`noAssert?` | undefined | false | true | + +**Returns:** *number* + +___ + +### writeDoubleLE + +▸ **writeDoubleLE**(`value`: number, `offset`: number, `noAssert?`: undefined | false | true): *number* + +*Inherited from [AlignedLockableBuffer](alignedlockablebuffer.md).[writeDoubleLE](alignedlockablebuffer.md#writedoublele)* + +Defined in node_modules/@types/node/base.d.ts:846 + +**Parameters:** + +Name | Type | +------ | ------ | +`value` | number | +`offset` | number | +`noAssert?` | undefined | false | true | + +**Returns:** *number* + +___ + +### writeFloatBE + +▸ **writeFloatBE**(`value`: number, `offset`: number, `noAssert?`: undefined | false | true): *number* + +*Inherited from [AlignedLockableBuffer](alignedlockablebuffer.md).[writeFloatBE](alignedlockablebuffer.md#writefloatbe)* + +Defined in node_modules/@types/node/base.d.ts:845 + +**Parameters:** + +Name | Type | +------ | ------ | +`value` | number | +`offset` | number | +`noAssert?` | undefined | false | true | + +**Returns:** *number* + +___ + +### writeFloatLE + +▸ **writeFloatLE**(`value`: number, `offset`: number, `noAssert?`: undefined | false | true): *number* + +*Inherited from [AlignedLockableBuffer](alignedlockablebuffer.md).[writeFloatLE](alignedlockablebuffer.md#writefloatle)* + +Defined in node_modules/@types/node/base.d.ts:844 + +**Parameters:** + +Name | Type | +------ | ------ | +`value` | number | +`offset` | number | +`noAssert?` | undefined | false | true | + +**Returns:** *number* + +___ + +### writeInt16BE + +▸ **writeInt16BE**(`value`: number, `offset`: number, `noAssert?`: undefined | false | true): *number* + +*Inherited from [AlignedLockableBuffer](alignedlockablebuffer.md).[writeInt16BE](alignedlockablebuffer.md#writeint16be)* + +Defined in node_modules/@types/node/base.d.ts:841 + +**Parameters:** + +Name | Type | +------ | ------ | +`value` | number | +`offset` | number | +`noAssert?` | undefined | false | true | + +**Returns:** *number* + +___ + +### writeInt16LE + +▸ **writeInt16LE**(`value`: number, `offset`: number, `noAssert?`: undefined | false | true): *number* + +*Inherited from [AlignedLockableBuffer](alignedlockablebuffer.md).[writeInt16LE](alignedlockablebuffer.md#writeint16le)* + +Defined in node_modules/@types/node/base.d.ts:840 + +**Parameters:** + +Name | Type | +------ | ------ | +`value` | number | +`offset` | number | +`noAssert?` | undefined | false | true | + +**Returns:** *number* + +___ + +### writeInt32BE + +▸ **writeInt32BE**(`value`: number, `offset`: number, `noAssert?`: undefined | false | true): *number* + +*Inherited from [AlignedLockableBuffer](alignedlockablebuffer.md).[writeInt32BE](alignedlockablebuffer.md#writeint32be)* + +Defined in node_modules/@types/node/base.d.ts:843 + +**Parameters:** + +Name | Type | +------ | ------ | +`value` | number | +`offset` | number | +`noAssert?` | undefined | false | true | + +**Returns:** *number* + +___ + +### writeInt32LE + +▸ **writeInt32LE**(`value`: number, `offset`: number, `noAssert?`: undefined | false | true): *number* + +*Inherited from [AlignedLockableBuffer](alignedlockablebuffer.md).[writeInt32LE](alignedlockablebuffer.md#writeint32le)* + +Defined in node_modules/@types/node/base.d.ts:842 + +**Parameters:** + +Name | Type | +------ | ------ | +`value` | number | +`offset` | number | +`noAssert?` | undefined | false | true | + +**Returns:** *number* + +___ + +### writeInt8 + +▸ **writeInt8**(`value`: number, `offset`: number, `noAssert?`: undefined | false | true): *number* + +*Inherited from [AlignedLockableBuffer](alignedlockablebuffer.md).[writeInt8](alignedlockablebuffer.md#writeint8)* + +Defined in node_modules/@types/node/base.d.ts:839 + +**Parameters:** + +Name | Type | +------ | ------ | +`value` | number | +`offset` | number | +`noAssert?` | undefined | false | true | + +**Returns:** *number* + +___ + +### writeIntBE + +▸ **writeIntBE**(`value`: number, `offset`: number, `byteLength`: number, `noAssert?`: undefined | false | true): *number* + +*Inherited from [AlignedLockableBuffer](alignedlockablebuffer.md).[writeIntBE](alignedlockablebuffer.md#writeintbe)* + +Defined in node_modules/@types/node/base.d.ts:812 + +**Parameters:** + +Name | Type | +------ | ------ | +`value` | number | +`offset` | number | +`byteLength` | number | +`noAssert?` | undefined | false | true | + +**Returns:** *number* + +___ + +### writeIntLE + +▸ **writeIntLE**(`value`: number, `offset`: number, `byteLength`: number, `noAssert?`: undefined | false | true): *number* + +*Inherited from [AlignedLockableBuffer](alignedlockablebuffer.md).[writeIntLE](alignedlockablebuffer.md#writeintle)* + +Defined in node_modules/@types/node/base.d.ts:811 + +**Parameters:** + +Name | Type | +------ | ------ | +`value` | number | +`offset` | number | +`byteLength` | number | +`noAssert?` | undefined | false | true | + +**Returns:** *number* + +___ + +### writeUInt16BE + +▸ **writeUInt16BE**(`value`: number, `offset`: number, `noAssert?`: undefined | false | true): *number* + +*Inherited from [AlignedLockableBuffer](alignedlockablebuffer.md).[writeUInt16BE](alignedlockablebuffer.md#writeuint16be)* + +Defined in node_modules/@types/node/base.d.ts:836 + +**Parameters:** + +Name | Type | +------ | ------ | +`value` | number | +`offset` | number | +`noAssert?` | undefined | false | true | + +**Returns:** *number* + +___ + +### writeUInt16LE + +▸ **writeUInt16LE**(`value`: number, `offset`: number, `noAssert?`: undefined | false | true): *number* + +*Inherited from [AlignedLockableBuffer](alignedlockablebuffer.md).[writeUInt16LE](alignedlockablebuffer.md#writeuint16le)* + +Defined in node_modules/@types/node/base.d.ts:835 + +**Parameters:** + +Name | Type | +------ | ------ | +`value` | number | +`offset` | number | +`noAssert?` | undefined | false | true | + +**Returns:** *number* + +___ + +### writeUInt32BE + +▸ **writeUInt32BE**(`value`: number, `offset`: number, `noAssert?`: undefined | false | true): *number* + +*Inherited from [AlignedLockableBuffer](alignedlockablebuffer.md).[writeUInt32BE](alignedlockablebuffer.md#writeuint32be)* + +Defined in node_modules/@types/node/base.d.ts:838 + +**Parameters:** + +Name | Type | +------ | ------ | +`value` | number | +`offset` | number | +`noAssert?` | undefined | false | true | + +**Returns:** *number* + +___ + +### writeUInt32LE + +▸ **writeUInt32LE**(`value`: number, `offset`: number, `noAssert?`: undefined | false | true): *number* + +*Inherited from [AlignedLockableBuffer](alignedlockablebuffer.md).[writeUInt32LE](alignedlockablebuffer.md#writeuint32le)* + +Defined in node_modules/@types/node/base.d.ts:837 + +**Parameters:** + +Name | Type | +------ | ------ | +`value` | number | +`offset` | number | +`noAssert?` | undefined | false | true | + +**Returns:** *number* + +___ + +### writeUInt8 + +▸ **writeUInt8**(`value`: number, `offset`: number, `noAssert?`: undefined | false | true): *number* + +*Inherited from [AlignedLockableBuffer](alignedlockablebuffer.md).[writeUInt8](alignedlockablebuffer.md#writeuint8)* + +Defined in node_modules/@types/node/base.d.ts:834 + +**Parameters:** + +Name | Type | +------ | ------ | +`value` | number | +`offset` | number | +`noAssert?` | undefined | false | true | + +**Returns:** *number* + +___ + +### writeUIntBE + +▸ **writeUIntBE**(`value`: number, `offset`: number, `byteLength`: number, `noAssert?`: undefined | false | true): *number* + +*Inherited from [AlignedLockableBuffer](alignedlockablebuffer.md).[writeUIntBE](alignedlockablebuffer.md#writeuintbe)* + +Defined in node_modules/@types/node/base.d.ts:810 + +**Parameters:** + +Name | Type | +------ | ------ | +`value` | number | +`offset` | number | +`byteLength` | number | +`noAssert?` | undefined | false | true | + +**Returns:** *number* + +___ + +### writeUIntLE + +▸ **writeUIntLE**(`value`: number, `offset`: number, `byteLength`: number, `noAssert?`: undefined | false | true): *number* + +*Inherited from [AlignedLockableBuffer](alignedlockablebuffer.md).[writeUIntLE](alignedlockablebuffer.md#writeuintle)* + +Defined in node_modules/@types/node/base.d.ts:809 + +**Parameters:** + +Name | Type | +------ | ------ | +`value` | number | +`offset` | number | +`byteLength` | number | +`noAssert?` | undefined | false | true | + +**Returns:** *number* diff --git a/doc/interfaces/block.md b/doc/interfaces/block.md index eaa1fe9f..7b5d3d60 100644 --- a/doc/interfaces/block.md +++ b/doc/interfaces/block.md @@ -19,7 +19,7 @@ • **length**: *number* -*Defined in [lib/sparse-stream/shared.ts:34](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/sparse-stream/shared.ts#L34)* +*Defined in [lib/sparse-stream/shared.ts:35](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/sparse-stream/shared.ts#L35)* ___ @@ -27,4 +27,4 @@ ___ • **offset**: *number* -*Defined in [lib/sparse-stream/shared.ts:33](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/sparse-stream/shared.ts#L33)* +*Defined in [lib/sparse-stream/shared.ts:34](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/sparse-stream/shared.ts#L34)* diff --git a/doc/interfaces/blockswithchecksum.md b/doc/interfaces/blockswithchecksum.md index 88c22385..34f6d25c 100644 --- a/doc/interfaces/blockswithchecksum.md +++ b/doc/interfaces/blockswithchecksum.md @@ -20,7 +20,7 @@ • **blocks**: *[Block](block.md)[]* -*Defined in [lib/sparse-stream/shared.ts:40](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/sparse-stream/shared.ts#L40)* +*Defined in [lib/sparse-stream/shared.ts:41](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/sparse-stream/shared.ts#L41)* ___ @@ -28,7 +28,7 @@ ___ • **checksum**? : *undefined | string* -*Defined in [lib/sparse-stream/shared.ts:39](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/sparse-stream/shared.ts#L39)* +*Defined in [lib/sparse-stream/shared.ts:40](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/sparse-stream/shared.ts#L40)* ___ @@ -36,4 +36,4 @@ ___ • **checksumType**? : *[ChecksumType](../README.md#checksumtype)* -*Defined in [lib/sparse-stream/shared.ts:38](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/sparse-stream/shared.ts#L38)* +*Defined in [lib/sparse-stream/shared.ts:39](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/sparse-stream/shared.ts#L39)* diff --git a/doc/interfaces/createreadstreamoptions.md b/doc/interfaces/createreadstreamoptions.md new file mode 100644 index 00000000..fcb77a96 --- /dev/null +++ b/doc/interfaces/createreadstreamoptions.md @@ -0,0 +1,57 @@ +[etcher-sdk](../README.md) › [CreateReadStreamOptions](createreadstreamoptions.md) + +# Interface: CreateReadStreamOptions + +## Hierarchy + +* **CreateReadStreamOptions** + +## Index + +### Properties + +* [alignment](createreadstreamoptions.md#optional-alignment) +* [emitProgress](createreadstreamoptions.md#optional-emitprogress) +* [end](createreadstreamoptions.md#optional-end) +* [numBuffers](createreadstreamoptions.md#optional-numbuffers) +* [start](createreadstreamoptions.md#optional-start) + +## Properties + +### `Optional` alignment + +• **alignment**? : *undefined | number* + +*Defined in [lib/source-destination/source-destination.ts:241](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L241)* + +___ + +### `Optional` emitProgress + +• **emitProgress**? : *undefined | false | true* + +*Defined in [lib/source-destination/source-destination.ts:238](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L238)* + +___ + +### `Optional` end + +• **end**? : *undefined | number* + +*Defined in [lib/source-destination/source-destination.ts:240](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L240)* + +___ + +### `Optional` numBuffers + +• **numBuffers**? : *undefined | number* + +*Defined in [lib/source-destination/source-destination.ts:242](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L242)* + +___ + +### `Optional` start + +• **start**? : *undefined | number* + +*Defined in [lib/source-destination/source-destination.ts:239](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L239)* diff --git a/doc/interfaces/createsparsereadstreamoptions.md b/doc/interfaces/createsparsereadstreamoptions.md new file mode 100644 index 00000000..52c5650c --- /dev/null +++ b/doc/interfaces/createsparsereadstreamoptions.md @@ -0,0 +1,39 @@ +[etcher-sdk](../README.md) › [CreateSparseReadStreamOptions](createsparsereadstreamoptions.md) + +# Interface: CreateSparseReadStreamOptions + +## Hierarchy + +* **CreateSparseReadStreamOptions** + +## Index + +### Properties + +* [alignment](createsparsereadstreamoptions.md#optional-alignment) +* [generateChecksums](createsparsereadstreamoptions.md#optional-generatechecksums) +* [numBuffers](createsparsereadstreamoptions.md#optional-numbuffers) + +## Properties + +### `Optional` alignment + +• **alignment**? : *undefined | number* + +*Defined in [lib/source-destination/source-destination.ts:247](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L247)* + +___ + +### `Optional` generateChecksums + +• **generateChecksums**? : *undefined | false | true* + +*Defined in [lib/source-destination/source-destination.ts:246](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L246)* + +___ + +### `Optional` numBuffers + +• **numBuffers**? : *undefined | number* + +*Defined in [lib/source-destination/source-destination.ts:248](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L248)* diff --git a/doc/interfaces/drivelistdrive.md b/doc/interfaces/drivelistdrive.md index 8da6c6e2..abfca584 100644 --- a/doc/interfaces/drivelistdrive.md +++ b/doc/interfaces/drivelistdrive.md @@ -101,7 +101,7 @@ ___ • **displayName**: *string* -*Defined in [lib/scanner/adapters/block-device.ts:52](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/scanner/adapters/block-device.ts#L52)* +*Defined in [lib/scanner/adapters/block-device.ts:52](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/scanner/adapters/block-device.ts#L52)* ___ @@ -129,7 +129,7 @@ ___ • **icon**? : *undefined | string* -*Defined in [lib/scanner/adapters/block-device.ts:53](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/scanner/adapters/block-device.ts#L53)* +*Defined in [lib/scanner/adapters/block-device.ts:53](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/scanner/adapters/block-device.ts#L53)* ___ diff --git a/doc/interfaces/execresult.md b/doc/interfaces/execresult.md index dd1370ec..640b4dae 100644 --- a/doc/interfaces/execresult.md +++ b/doc/interfaces/execresult.md @@ -19,7 +19,7 @@ • **stderr**: *string* -*Defined in [lib/diskpart.ts:33](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/diskpart.ts#L33)* +*Defined in [lib/diskpart.ts:33](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/diskpart.ts#L33)* ___ @@ -27,4 +27,4 @@ ___ • **stdout**: *string* -*Defined in [lib/diskpart.ts:32](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/diskpart.ts#L32)* +*Defined in [lib/diskpart.ts:32](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/diskpart.ts#L32)* diff --git a/doc/interfaces/metadata.md b/doc/interfaces/metadata.md index 03eb72cf..4b273275 100644 --- a/doc/interfaces/metadata.md +++ b/doc/interfaces/metadata.md @@ -35,7 +35,7 @@ • **blockMap**? : *BlockMap* -*Defined in [lib/source-destination/metadata.ts:27](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/metadata.ts#L27)* +*Defined in [lib/source-destination/metadata.ts:27](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/metadata.ts#L27)* ___ @@ -43,7 +43,7 @@ ___ • **blockmappedSize**? : *undefined | number* -*Defined in [lib/source-destination/metadata.ts:25](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/metadata.ts#L25)* +*Defined in [lib/source-destination/metadata.ts:25](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/metadata.ts#L25)* ___ @@ -51,7 +51,7 @@ ___ • **blocks**? : *[BlocksWithChecksum](blockswithchecksum.md)[]* -*Defined in [lib/source-destination/metadata.ts:28](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/metadata.ts#L28)* +*Defined in [lib/source-destination/metadata.ts:28](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/metadata.ts#L28)* ___ @@ -59,7 +59,7 @@ ___ • **bytesToZeroOutFromTheBeginning**? : *undefined | number* -*Defined in [lib/source-destination/metadata.ts:31](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/metadata.ts#L31)* +*Defined in [lib/source-destination/metadata.ts:31](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/metadata.ts#L31)* ___ @@ -67,7 +67,7 @@ ___ • **checksum**? : *undefined | string* -*Defined in [lib/source-destination/metadata.ts:32](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/metadata.ts#L32)* +*Defined in [lib/source-destination/metadata.ts:32](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/metadata.ts#L32)* ___ @@ -75,7 +75,7 @@ ___ • **checksumType**? : *undefined | string* -*Defined in [lib/source-destination/metadata.ts:33](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/metadata.ts#L33)* +*Defined in [lib/source-destination/metadata.ts:33](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/metadata.ts#L33)* ___ @@ -83,7 +83,7 @@ ___ • **compressedSize**? : *undefined | number* -*Defined in [lib/source-destination/metadata.ts:24](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/metadata.ts#L24)* +*Defined in [lib/source-destination/metadata.ts:24](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/metadata.ts#L24)* ___ @@ -91,7 +91,7 @@ ___ • **instructions**? : *undefined | string* -*Defined in [lib/source-destination/metadata.ts:29](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/metadata.ts#L29)* +*Defined in [lib/source-destination/metadata.ts:29](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/metadata.ts#L29)* ___ @@ -99,7 +99,7 @@ ___ • **isEtch**? : *undefined | false | true* -*Defined in [lib/source-destination/metadata.ts:39](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/metadata.ts#L39)* +*Defined in [lib/source-destination/metadata.ts:39](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/metadata.ts#L39)* ___ @@ -107,7 +107,7 @@ ___ • **isSizeEstimated**? : *undefined | false | true* -*Defined in [lib/source-destination/metadata.ts:23](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/metadata.ts#L23)* +*Defined in [lib/source-destination/metadata.ts:23](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/metadata.ts#L23)* ___ @@ -115,7 +115,7 @@ ___ • **logo**? : *undefined | string* -*Defined in [lib/source-destination/metadata.ts:30](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/metadata.ts#L30)* +*Defined in [lib/source-destination/metadata.ts:30](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/metadata.ts#L30)* ___ @@ -123,7 +123,7 @@ ___ • **name**? : *undefined | string* -*Defined in [lib/source-destination/metadata.ts:26](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/metadata.ts#L26)* +*Defined in [lib/source-destination/metadata.ts:26](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/metadata.ts#L26)* ___ @@ -131,7 +131,7 @@ ___ • **recommendedDriveSize**? : *undefined | number* -*Defined in [lib/source-destination/metadata.ts:34](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/metadata.ts#L34)* +*Defined in [lib/source-destination/metadata.ts:34](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/metadata.ts#L34)* ___ @@ -139,7 +139,7 @@ ___ • **releaseNotesUrl**? : *undefined | string* -*Defined in [lib/source-destination/metadata.ts:35](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/metadata.ts#L35)* +*Defined in [lib/source-destination/metadata.ts:35](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/metadata.ts#L35)* ___ @@ -147,7 +147,7 @@ ___ • **size**? : *undefined | number* -*Defined in [lib/source-destination/metadata.ts:22](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/metadata.ts#L22)* +*Defined in [lib/source-destination/metadata.ts:22](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/metadata.ts#L22)* ___ @@ -155,7 +155,7 @@ ___ • **supportUrl**? : *undefined | string* -*Defined in [lib/source-destination/metadata.ts:36](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/metadata.ts#L36)* +*Defined in [lib/source-destination/metadata.ts:36](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/metadata.ts#L36)* ___ @@ -163,7 +163,7 @@ ___ • **url**? : *undefined | string* -*Defined in [lib/source-destination/metadata.ts:37](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/metadata.ts#L37)* +*Defined in [lib/source-destination/metadata.ts:37](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/metadata.ts#L37)* ___ @@ -171,4 +171,4 @@ ___ • **version**? : *undefined | string* -*Defined in [lib/source-destination/metadata.ts:38](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/metadata.ts#L38)* +*Defined in [lib/source-destination/metadata.ts:38](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/metadata.ts#L38)* diff --git a/doc/interfaces/multidestinationprogress.md b/doc/interfaces/multidestinationprogress.md index 795605d5..847a5ff8 100644 --- a/doc/interfaces/multidestinationprogress.md +++ b/doc/interfaces/multidestinationprogress.md @@ -39,7 +39,7 @@ *Inherited from [MultiDestinationState](multidestinationstate.md).[active](multidestinationstate.md#active)* -*Defined in [lib/multi-write.ts:37](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/multi-write.ts#L37)* +*Defined in [lib/multi-write.ts:37](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/multi-write.ts#L37)* ___ @@ -49,7 +49,7 @@ ___ *Inherited from [MultiDestinationState](multidestinationstate.md).[blockmappedSize](multidestinationstate.md#optional-blockmappedsize)* -*Defined in [lib/multi-write.ts:45](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/multi-write.ts#L45)* +*Defined in [lib/multi-write.ts:45](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/multi-write.ts#L45)* ___ @@ -57,7 +57,7 @@ ___ • **bytes**: *number* -*Defined in [lib/multi-write.ts:52](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/multi-write.ts#L52)* +*Defined in [lib/multi-write.ts:52](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/multi-write.ts#L52)* ___ @@ -67,7 +67,7 @@ ___ *Inherited from [MultiDestinationState](multidestinationstate.md).[compressedSize](multidestinationstate.md#optional-compressedsize)* -*Defined in [lib/multi-write.ts:44](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/multi-write.ts#L44)* +*Defined in [lib/multi-write.ts:44](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/multi-write.ts#L44)* ___ @@ -75,7 +75,7 @@ ___ • **eta**? : *undefined | number* -*Defined in [lib/multi-write.ts:57](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/multi-write.ts#L57)* +*Defined in [lib/multi-write.ts:57](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/multi-write.ts#L57)* ___ @@ -85,7 +85,7 @@ ___ *Inherited from [MultiDestinationState](multidestinationstate.md).[failed](multidestinationstate.md#failed)* -*Defined in [lib/multi-write.ts:40](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/multi-write.ts#L40)* +*Defined in [lib/multi-write.ts:40](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/multi-write.ts#L40)* ___ @@ -95,7 +95,7 @@ ___ *Inherited from [MultiDestinationState](multidestinationstate.md).[flashing](multidestinationstate.md#flashing)* -*Defined in [lib/multi-write.ts:38](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/multi-write.ts#L38)* +*Defined in [lib/multi-write.ts:38](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/multi-write.ts#L38)* ___ @@ -103,7 +103,7 @@ ___ • **percentage**? : *undefined | number* -*Defined in [lib/multi-write.ts:56](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/multi-write.ts#L56)* +*Defined in [lib/multi-write.ts:56](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/multi-write.ts#L56)* ___ @@ -111,7 +111,7 @@ ___ • **position**: *number* -*Defined in [lib/multi-write.ts:53](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/multi-write.ts#L53)* +*Defined in [lib/multi-write.ts:53](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/multi-write.ts#L53)* ___ @@ -121,7 +121,7 @@ ___ *Inherited from [MultiDestinationState](multidestinationstate.md).[rootStreamPosition](multidestinationstate.md#optional-rootstreamposition)* -*Defined in [lib/multi-write.ts:47](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/multi-write.ts#L47)* +*Defined in [lib/multi-write.ts:47](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/multi-write.ts#L47)* ___ @@ -131,7 +131,7 @@ ___ *Inherited from [MultiDestinationState](multidestinationstate.md).[rootStreamSpeed](multidestinationstate.md#optional-rootstreamspeed)* -*Defined in [lib/multi-write.ts:48](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/multi-write.ts#L48)* +*Defined in [lib/multi-write.ts:48](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/multi-write.ts#L48)* ___ @@ -141,7 +141,7 @@ ___ *Inherited from [MultiDestinationState](multidestinationstate.md).[size](multidestinationstate.md#optional-size)* -*Defined in [lib/multi-write.ts:43](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/multi-write.ts#L43)* +*Defined in [lib/multi-write.ts:43](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/multi-write.ts#L43)* ___ @@ -151,7 +151,7 @@ ___ *Inherited from [MultiDestinationState](multidestinationstate.md).[sparse](multidestinationstate.md#optional-sparse)* -*Defined in [lib/multi-write.ts:46](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/multi-write.ts#L46)* +*Defined in [lib/multi-write.ts:46](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/multi-write.ts#L46)* ___ @@ -159,7 +159,7 @@ ___ • **speed**: *number* -*Defined in [lib/multi-write.ts:54](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/multi-write.ts#L54)* +*Defined in [lib/multi-write.ts:54](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/multi-write.ts#L54)* ___ @@ -169,7 +169,7 @@ ___ *Inherited from [MultiDestinationState](multidestinationstate.md).[successful](multidestinationstate.md#successful)* -*Defined in [lib/multi-write.ts:41](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/multi-write.ts#L41)* +*Defined in [lib/multi-write.ts:41](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/multi-write.ts#L41)* ___ @@ -177,7 +177,7 @@ ___ • **totalSpeed**: *number* -*Defined in [lib/multi-write.ts:55](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/multi-write.ts#L55)* +*Defined in [lib/multi-write.ts:55](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/multi-write.ts#L55)* ___ @@ -187,7 +187,7 @@ ___ *Inherited from [MultiDestinationState](multidestinationstate.md).[type](multidestinationstate.md#type)* -*Defined in [lib/multi-write.ts:42](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/multi-write.ts#L42)* +*Defined in [lib/multi-write.ts:42](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/multi-write.ts#L42)* ___ @@ -197,4 +197,4 @@ ___ *Inherited from [MultiDestinationState](multidestinationstate.md).[verifying](multidestinationstate.md#verifying)* -*Defined in [lib/multi-write.ts:39](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/multi-write.ts#L39)* +*Defined in [lib/multi-write.ts:39](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/multi-write.ts#L39)* diff --git a/doc/interfaces/multidestinationstate.md b/doc/interfaces/multidestinationstate.md index 5b5d8baf..6f7d7c2d 100644 --- a/doc/interfaces/multidestinationstate.md +++ b/doc/interfaces/multidestinationstate.md @@ -31,7 +31,7 @@ • **active**: *number* -*Defined in [lib/multi-write.ts:37](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/multi-write.ts#L37)* +*Defined in [lib/multi-write.ts:37](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/multi-write.ts#L37)* ___ @@ -39,7 +39,7 @@ ___ • **blockmappedSize**? : *undefined | number* -*Defined in [lib/multi-write.ts:45](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/multi-write.ts#L45)* +*Defined in [lib/multi-write.ts:45](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/multi-write.ts#L45)* ___ @@ -47,7 +47,7 @@ ___ • **compressedSize**? : *undefined | number* -*Defined in [lib/multi-write.ts:44](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/multi-write.ts#L44)* +*Defined in [lib/multi-write.ts:44](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/multi-write.ts#L44)* ___ @@ -55,7 +55,7 @@ ___ • **failed**: *number* -*Defined in [lib/multi-write.ts:40](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/multi-write.ts#L40)* +*Defined in [lib/multi-write.ts:40](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/multi-write.ts#L40)* ___ @@ -63,7 +63,7 @@ ___ • **flashing**: *number* -*Defined in [lib/multi-write.ts:38](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/multi-write.ts#L38)* +*Defined in [lib/multi-write.ts:38](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/multi-write.ts#L38)* ___ @@ -71,7 +71,7 @@ ___ • **rootStreamPosition**? : *undefined | number* -*Defined in [lib/multi-write.ts:47](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/multi-write.ts#L47)* +*Defined in [lib/multi-write.ts:47](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/multi-write.ts#L47)* ___ @@ -79,7 +79,7 @@ ___ • **rootStreamSpeed**? : *undefined | number* -*Defined in [lib/multi-write.ts:48](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/multi-write.ts#L48)* +*Defined in [lib/multi-write.ts:48](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/multi-write.ts#L48)* ___ @@ -87,7 +87,7 @@ ___ • **size**? : *undefined | number* -*Defined in [lib/multi-write.ts:43](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/multi-write.ts#L43)* +*Defined in [lib/multi-write.ts:43](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/multi-write.ts#L43)* ___ @@ -95,7 +95,7 @@ ___ • **sparse**? : *undefined | false | true* -*Defined in [lib/multi-write.ts:46](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/multi-write.ts#L46)* +*Defined in [lib/multi-write.ts:46](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/multi-write.ts#L46)* ___ @@ -103,7 +103,7 @@ ___ • **successful**: *number* -*Defined in [lib/multi-write.ts:41](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/multi-write.ts#L41)* +*Defined in [lib/multi-write.ts:41](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/multi-write.ts#L41)* ___ @@ -111,7 +111,7 @@ ___ • **type**: *[WriteStep](../README.md#writestep)* -*Defined in [lib/multi-write.ts:42](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/multi-write.ts#L42)* +*Defined in [lib/multi-write.ts:42](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/multi-write.ts#L42)* ___ @@ -119,4 +119,4 @@ ___ • **verifying**: *number* -*Defined in [lib/multi-write.ts:39](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/multi-write.ts#L39)* +*Defined in [lib/multi-write.ts:39](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/multi-write.ts#L39)* diff --git a/doc/interfaces/operation.md b/doc/interfaces/operation.md index a3ab4acc..300a9e5f 100644 --- a/doc/interfaces/operation.md +++ b/doc/interfaces/operation.md @@ -19,7 +19,7 @@ • **command**: *[OperationCommand](../README.md#operationcommand)* -*Defined in [lib/source-destination/configured-source/configure.ts:31](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/configured-source/configure.ts#L31)* +*Defined in [lib/source-destination/configured-source/configure.ts:31](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/configured-source/configure.ts#L31)* ___ @@ -27,4 +27,4 @@ ___ • **when**: *any* -*Defined in [lib/source-destination/configured-source/configure.ts:32](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/configured-source/configure.ts#L32)* +*Defined in [lib/source-destination/configured-source/configure.ts:32](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/configured-source/configure.ts#L32)* diff --git a/doc/interfaces/pipesourcetodestinationsresult.md b/doc/interfaces/pipesourcetodestinationsresult.md index fa1e776a..dbf38e5e 100644 --- a/doc/interfaces/pipesourcetodestinationsresult.md +++ b/doc/interfaces/pipesourcetodestinationsresult.md @@ -19,7 +19,7 @@ • **bytesWritten**: *number* -*Defined in [lib/multi-write.ts:69](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/multi-write.ts#L69)* +*Defined in [lib/multi-write.ts:69](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/multi-write.ts#L69)* ___ @@ -27,4 +27,4 @@ ___ • **failures**: *Map‹[SourceDestination](../classes/sourcedestination.md), [Error](../classes/notcapable.md#static-error)›* -*Defined in [lib/multi-write.ts:68](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/multi-write.ts#L68)* +*Defined in [lib/multi-write.ts:68](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/multi-write.ts#L68)* diff --git a/doc/interfaces/progressevent.md b/doc/interfaces/progressevent.md index 724dd380..1520dcd7 100644 --- a/doc/interfaces/progressevent.md +++ b/doc/interfaces/progressevent.md @@ -20,7 +20,7 @@ • **bytes**: *number* -*Defined in [lib/source-destination/progress.ts:29](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/progress.ts#L29)* +*Defined in [lib/source-destination/progress.ts:29](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/progress.ts#L29)* ___ @@ -28,7 +28,7 @@ ___ • **position**: *number* -*Defined in [lib/source-destination/progress.ts:28](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/progress.ts#L28)* +*Defined in [lib/source-destination/progress.ts:28](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/progress.ts#L28)* ___ @@ -36,4 +36,4 @@ ___ • **speed**: *number* -*Defined in [lib/source-destination/progress.ts:30](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/progress.ts#L30)* +*Defined in [lib/source-destination/progress.ts:30](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/progress.ts#L30)* diff --git a/doc/interfaces/sourcetransform.md b/doc/interfaces/sourcetransform.md index 0dd70b54..a9b374a2 100644 --- a/doc/interfaces/sourcetransform.md +++ b/doc/interfaces/sourcetransform.md @@ -22,16 +22,23 @@ ### Properties * [readable](sourcetransform.md#readable) +* [readableHighWaterMark](sourcetransform.md#readablehighwatermark) * [sourceStream](sourcetransform.md#sourcestream) * [writable](sourcetransform.md#writable) +* [writableHighWaterMark](sourcetransform.md#writablehighwatermark) * [defaultMaxListeners](sourcetransform.md#static-defaultmaxlisteners) ### Methods +* [_destroy](sourcetransform.md#_destroy) +* [_final](sourcetransform.md#_final) * [_read](sourcetransform.md#_read) * [_transform](sourcetransform.md#_transform) * [_write](sourcetransform.md#_write) +* [_writev](sourcetransform.md#optional-_writev) * [addListener](sourcetransform.md#addlistener) +* [cork](sourcetransform.md#cork) +* [destroy](sourcetransform.md#destroy) * [emit](sourcetransform.md#emit) * [end](sourcetransform.md#end) * [eventNames](sourcetransform.md#eventnames) @@ -53,6 +60,7 @@ * [setDefaultEncoding](sourcetransform.md#setdefaultencoding) * [setEncoding](sourcetransform.md#setencoding) * [setMaxListeners](sourcetransform.md#setmaxlisteners) +* [uncork](sourcetransform.md#uncork) * [unpipe](sourcetransform.md#unpipe) * [unshift](sourcetransform.md#unshift) * [wrap](sourcetransform.md#wrap) @@ -69,7 +77,7 @@ *Overrides void* -Defined in node_modules/@types/node/base.d.ts:3871 +Defined in node_modules/@types/node/base.d.ts:5622 **Parameters:** @@ -87,7 +95,17 @@ Name | Type | *Inherited from [SparseFilterStream](../classes/sparsefilterstream.md).[readable](../classes/sparsefilterstream.md#readable)* -Defined in node_modules/@types/node/base.d.ts:3688 +Defined in node_modules/@types/node/base.d.ts:5422 + +___ + +### readableHighWaterMark + +• **readableHighWaterMark**: *number* + +*Inherited from [SparseFilterStream](../classes/sparsefilterstream.md).[readableHighWaterMark](../classes/sparsefilterstream.md#readablehighwatermark)* + +Defined in node_modules/@types/node/base.d.ts:5423 ___ @@ -95,7 +113,7 @@ ___ • **sourceStream**: *ReadableStream* -*Defined in [lib/source-destination/compressed-source.ts:26](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/compressed-source.ts#L26)* +*Defined in [lib/source-destination/compressed-source.ts:27](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/compressed-source.ts#L27)* ___ @@ -105,7 +123,17 @@ ___ *Inherited from [SparseFilterStream](../classes/sparsefilterstream.md).[writable](../classes/sparsefilterstream.md#writable)* -Defined in node_modules/@types/node/base.d.ts:3855 +Defined in node_modules/@types/node/base.d.ts:5600 + +___ + +### writableHighWaterMark + +• **writableHighWaterMark**: *number* + +*Inherited from [SparseFilterStream](../classes/sparsefilterstream.md).[writableHighWaterMark](../classes/sparsefilterstream.md#writablehighwatermark)* + +Defined in node_modules/@types/node/base.d.ts:5601 ___ @@ -115,17 +143,63 @@ ___ *Inherited from [CountingWritable](../classes/countingwritable.md).[defaultMaxListeners](../classes/countingwritable.md#static-defaultmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:681 +Defined in node_modules/@types/node/base.d.ts:896 ## Methods +### _destroy + +▸ **_destroy**(`error`: [Error](../classes/notcapable.md#static-error) | null, `callback`: function): *void* + +*Inherited from [SparseFilterStream](../classes/sparsefilterstream.md).[_destroy](../classes/sparsefilterstream.md#_destroy)* + +*Overrides [SparseReadStream](../classes/sparsereadstream.md).[_destroy](../classes/sparsereadstream.md#_destroy)* + +Defined in node_modules/@types/node/base.d.ts:5605 + +**Parameters:** + +▪ **error**: *[Error](../classes/notcapable.md#static-error) | null* + +▪ **callback**: *function* + +▸ (`error?`: [Error](../classes/notcapable.md#static-error)): *void* + +**Parameters:** + +Name | Type | +------ | ------ | +`error?` | [Error](../classes/notcapable.md#static-error) | + +**Returns:** *void* + +___ + +### _final + +▸ **_final**(`callback`: Function): *void* + +*Inherited from [SparseFilterStream](../classes/sparsefilterstream.md).[_final](../classes/sparsefilterstream.md#_final)* + +Defined in node_modules/@types/node/base.d.ts:5606 + +**Parameters:** + +Name | Type | +------ | ------ | +`callback` | Function | + +**Returns:** *void* + +___ + ### _read ▸ **_read**(`size`: number): *void* *Inherited from [SparseFilterStream](../classes/sparsefilterstream.md).[_read](../classes/sparsefilterstream.md#_read)* -Defined in node_modules/@types/node/base.d.ts:3690 +Defined in node_modules/@types/node/base.d.ts:5425 **Parameters:** @@ -143,7 +217,7 @@ ___ *Inherited from [SourceTransform](sourcetransform.md).[_transform](sourcetransform.md#_transform)* -Defined in node_modules/@types/node/base.d.ts:3873 +Defined in node_modules/@types/node/base.d.ts:5624 **Parameters:** @@ -159,19 +233,53 @@ ___ ### _write -▸ **_write**(`chunk`: any, `encoding`: string, `callback`: Function): *void* +▸ **_write**(`chunk`: any, `encoding`: string, `callback`: function): *void* *Inherited from [SparseFilterStream](../classes/sparsefilterstream.md).[_write](../classes/sparsefilterstream.md#_write)* -Defined in node_modules/@types/node/base.d.ts:3857 +Defined in node_modules/@types/node/base.d.ts:5603 + +**Parameters:** + +▪ **chunk**: *any* + +▪ **encoding**: *string* + +▪ **callback**: *function* + +▸ (`err?`: [Error](../classes/notcapable.md#static-error)): *void* **Parameters:** Name | Type | ------ | ------ | -`chunk` | any | -`encoding` | string | -`callback` | Function | +`err?` | [Error](../classes/notcapable.md#static-error) | + +**Returns:** *void* + +___ + +### `Optional` _writev + +▸ **_writev**(`chunks`: Array‹object›, `callback`: function): *void* + +*Inherited from [SparseFilterStream](../classes/sparsefilterstream.md).[_writev](../classes/sparsefilterstream.md#optional-_writev)* + +Defined in node_modules/@types/node/base.d.ts:5604 + +**Parameters:** + +▪ **chunks**: *Array‹object›* + +▪ **callback**: *function* + +▸ (`err?`: [Error](../classes/notcapable.md#static-error)): *void* + +**Parameters:** + +Name | Type | +------ | ------ | +`err?` | [Error](../classes/notcapable.md#static-error) | **Returns:** *void* @@ -179,28 +287,35 @@ ___ ### addListener -▸ **addListener**(`event`: string, `listener`: Function): *this* +▸ **addListener**(`event`: string, `listener`: function): *this* *Inherited from [SparseFilterStream](../classes/sparsefilterstream.md).[addListener](../classes/sparsefilterstream.md#addlistener)* *Overrides [SourceSource](../classes/sourcesource.md).[addListener](../classes/sourcesource.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:3711 +Defined in node_modules/@types/node/base.d.ts:5447 Event emitter The defined events on documents including: - 1. close - 2. data - 3. end - 4. readable - 5. error +1. close +2. data +3. end +4. readable +5. error + +**Parameters:** + +▪ **event**: *string* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -210,7 +325,7 @@ Name | Type | *Overrides [SourceSource](../classes/sourcesource.md).[addListener](../classes/sourcesource.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:3712 +Defined in node_modules/@types/node/base.d.ts:5448 **Parameters:** @@ -228,7 +343,7 @@ Defined in node_modules/@types/node/base.d.ts:3712 *Overrides [SourceSource](../classes/sourcesource.md).[addListener](../classes/sourcesource.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:3713 +Defined in node_modules/@types/node/base.d.ts:5449 **Parameters:** @@ -236,13 +351,13 @@ Defined in node_modules/@types/node/base.d.ts:3713 ▪ **listener**: *function* -▸ (`chunk`: Buffer | string): *void* +▸ (`chunk`: [Buffer](alignedlockablebuffer.md#buffer) | string): *void* **Parameters:** Name | Type | ------ | ------ | -`chunk` | Buffer | string | +`chunk` | [Buffer](alignedlockablebuffer.md#buffer) | string | **Returns:** *this* @@ -252,7 +367,7 @@ Name | Type | *Overrides [SourceSource](../classes/sourcesource.md).[addListener](../classes/sourcesource.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:3714 +Defined in node_modules/@types/node/base.d.ts:5450 **Parameters:** @@ -270,7 +385,7 @@ Defined in node_modules/@types/node/base.d.ts:3714 *Overrides [SourceSource](../classes/sourcesource.md).[addListener](../classes/sourcesource.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:3715 +Defined in node_modules/@types/node/base.d.ts:5451 **Parameters:** @@ -288,7 +403,7 @@ Defined in node_modules/@types/node/base.d.ts:3715 *Overrides [SourceSource](../classes/sourcesource.md).[addListener](../classes/sourcesource.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:3716 +Defined in node_modules/@types/node/base.d.ts:5452 **Parameters:** @@ -308,6 +423,38 @@ Name | Type | ___ +### cork + +▸ **cork**(): *void* + +*Inherited from [SparseFilterStream](../classes/sparsefilterstream.md).[cork](../classes/sparsefilterstream.md#cork)* + +Defined in node_modules/@types/node/base.d.ts:5613 + +**Returns:** *void* + +___ + +### destroy + +▸ **destroy**(`error?`: [Error](../classes/notcapable.md#static-error)): *void* + +*Inherited from [SparseFilterStream](../classes/sparsefilterstream.md).[destroy](../classes/sparsefilterstream.md#destroy)* + +*Overrides [SparseReadStream](../classes/sparsereadstream.md).[destroy](../classes/sparsereadstream.md#destroy)* + +Defined in node_modules/@types/node/base.d.ts:5625 + +**Parameters:** + +Name | Type | +------ | ------ | +`error?` | [Error](../classes/notcapable.md#static-error) | + +**Returns:** *void* + +___ + ### emit ▸ **emit**(`event`: string | symbol, ...`args`: any[]): *boolean* @@ -316,7 +463,7 @@ ___ *Overrides [SourceSource](../classes/sourcesource.md).[emit](../classes/sourcesource.md#emit)* -Defined in node_modules/@types/node/base.d.ts:3718 +Defined in node_modules/@types/node/base.d.ts:5454 **Parameters:** @@ -333,7 +480,7 @@ Name | Type | *Overrides [SourceSource](../classes/sourcesource.md).[emit](../classes/sourcesource.md#emit)* -Defined in node_modules/@types/node/base.d.ts:3719 +Defined in node_modules/@types/node/base.d.ts:5455 **Parameters:** @@ -343,20 +490,20 @@ Name | Type | **Returns:** *boolean* -▸ **emit**(`event`: "data", `chunk`: Buffer | string): *boolean* +▸ **emit**(`event`: "data", `chunk`: [Buffer](alignedlockablebuffer.md#buffer) | string): *boolean* *Inherited from [SparseFilterStream](../classes/sparsefilterstream.md).[emit](../classes/sparsefilterstream.md#emit)* *Overrides [SourceSource](../classes/sourcesource.md).[emit](../classes/sourcesource.md#emit)* -Defined in node_modules/@types/node/base.d.ts:3720 +Defined in node_modules/@types/node/base.d.ts:5456 **Parameters:** Name | Type | ------ | ------ | `event` | "data" | -`chunk` | Buffer | string | +`chunk` | [Buffer](alignedlockablebuffer.md#buffer) | string | **Returns:** *boolean* @@ -366,7 +513,7 @@ Name | Type | *Overrides [SourceSource](../classes/sourcesource.md).[emit](../classes/sourcesource.md#emit)* -Defined in node_modules/@types/node/base.d.ts:3721 +Defined in node_modules/@types/node/base.d.ts:5457 **Parameters:** @@ -382,7 +529,7 @@ Name | Type | *Overrides [SourceSource](../classes/sourcesource.md).[emit](../classes/sourcesource.md#emit)* -Defined in node_modules/@types/node/base.d.ts:3722 +Defined in node_modules/@types/node/base.d.ts:5458 **Parameters:** @@ -398,7 +545,7 @@ Name | Type | *Overrides [SourceSource](../classes/sourcesource.md).[emit](../classes/sourcesource.md#emit)* -Defined in node_modules/@types/node/base.d.ts:3723 +Defined in node_modules/@types/node/base.d.ts:5459 **Parameters:** @@ -417,7 +564,7 @@ ___ *Inherited from [SparseFilterStream](../classes/sparsefilterstream.md).[end](../classes/sparsefilterstream.md#end)* -Defined in node_modules/@types/node/base.d.ts:3861 +Defined in node_modules/@types/node/base.d.ts:5610 **Parameters:** @@ -431,7 +578,7 @@ Name | Type | *Inherited from [SparseFilterStream](../classes/sparsefilterstream.md).[end](../classes/sparsefilterstream.md#end)* -Defined in node_modules/@types/node/base.d.ts:3862 +Defined in node_modules/@types/node/base.d.ts:5611 **Parameters:** @@ -446,7 +593,7 @@ Name | Type | *Inherited from [SparseFilterStream](../classes/sparsefilterstream.md).[end](../classes/sparsefilterstream.md#end)* -Defined in node_modules/@types/node/base.d.ts:3863 +Defined in node_modules/@types/node/base.d.ts:5612 **Parameters:** @@ -462,13 +609,13 @@ ___ ### eventNames -▸ **eventNames**(): *string | symbol[]* +▸ **eventNames**(): *Array‹string | symbol›* *Inherited from [CountingWritable](../classes/countingwritable.md).[eventNames](../classes/countingwritable.md#eventnames)* -Defined in node_modules/@types/node/base.d.ts:694 +Defined in node_modules/@types/node/base.d.ts:909 -**Returns:** *string | symbol[]* +**Returns:** *Array‹string | symbol›* ___ @@ -478,7 +625,7 @@ ___ *Inherited from [CountingWritable](../classes/countingwritable.md).[getMaxListeners](../classes/countingwritable.md#getmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:691 +Defined in node_modules/@types/node/base.d.ts:906 **Returns:** *number* @@ -490,7 +637,7 @@ ___ *Inherited from [SparseFilterStream](../classes/sparsefilterstream.md).[isPaused](../classes/sparsefilterstream.md#ispaused)* -Defined in node_modules/@types/node/base.d.ts:3695 +Defined in node_modules/@types/node/base.d.ts:5430 **Returns:** *boolean* @@ -502,7 +649,7 @@ ___ *Inherited from [CountingWritable](../classes/countingwritable.md).[listenerCount](../classes/countingwritable.md#static-listenercount)* -Defined in node_modules/@types/node/base.d.ts:695 +Defined in node_modules/@types/node/base.d.ts:910 **Parameters:** @@ -520,7 +667,7 @@ ___ *Inherited from [CountingWritable](../classes/countingwritable.md).[listeners](../classes/countingwritable.md#listeners)* -Defined in node_modules/@types/node/base.d.ts:692 +Defined in node_modules/@types/node/base.d.ts:907 **Parameters:** @@ -534,20 +681,27 @@ ___ ### on -▸ **on**(`event`: string, `listener`: Function): *this* +▸ **on**(`event`: string, `listener`: function): *this* *Inherited from [SparseFilterStream](../classes/sparsefilterstream.md).[on](../classes/sparsefilterstream.md#on)* *Overrides [SourceSource](../classes/sourcesource.md).[on](../classes/sourcesource.md#on)* -Defined in node_modules/@types/node/base.d.ts:3725 +Defined in node_modules/@types/node/base.d.ts:5461 + +**Parameters:** + +▪ **event**: *string* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -557,7 +711,7 @@ Name | Type | *Overrides [SourceSource](../classes/sourcesource.md).[on](../classes/sourcesource.md#on)* -Defined in node_modules/@types/node/base.d.ts:3726 +Defined in node_modules/@types/node/base.d.ts:5462 **Parameters:** @@ -575,7 +729,7 @@ Defined in node_modules/@types/node/base.d.ts:3726 *Overrides [SourceSource](../classes/sourcesource.md).[on](../classes/sourcesource.md#on)* -Defined in node_modules/@types/node/base.d.ts:3727 +Defined in node_modules/@types/node/base.d.ts:5463 **Parameters:** @@ -583,13 +737,13 @@ Defined in node_modules/@types/node/base.d.ts:3727 ▪ **listener**: *function* -▸ (`chunk`: Buffer | string): *void* +▸ (`chunk`: [Buffer](alignedlockablebuffer.md#buffer) | string): *void* **Parameters:** Name | Type | ------ | ------ | -`chunk` | Buffer | string | +`chunk` | [Buffer](alignedlockablebuffer.md#buffer) | string | **Returns:** *this* @@ -599,7 +753,7 @@ Name | Type | *Overrides [SourceSource](../classes/sourcesource.md).[on](../classes/sourcesource.md#on)* -Defined in node_modules/@types/node/base.d.ts:3728 +Defined in node_modules/@types/node/base.d.ts:5464 **Parameters:** @@ -617,7 +771,7 @@ Defined in node_modules/@types/node/base.d.ts:3728 *Overrides [SourceSource](../classes/sourcesource.md).[on](../classes/sourcesource.md#on)* -Defined in node_modules/@types/node/base.d.ts:3729 +Defined in node_modules/@types/node/base.d.ts:5465 **Parameters:** @@ -635,7 +789,7 @@ Defined in node_modules/@types/node/base.d.ts:3729 *Overrides [SourceSource](../classes/sourcesource.md).[on](../classes/sourcesource.md#on)* -Defined in node_modules/@types/node/base.d.ts:3730 +Defined in node_modules/@types/node/base.d.ts:5466 **Parameters:** @@ -657,20 +811,27 @@ ___ ### once -▸ **once**(`event`: string, `listener`: Function): *this* +▸ **once**(`event`: string, `listener`: function): *this* *Inherited from [SparseFilterStream](../classes/sparsefilterstream.md).[once](../classes/sparsefilterstream.md#once)* *Overrides [SourceSource](../classes/sourcesource.md).[once](../classes/sourcesource.md#once)* -Defined in node_modules/@types/node/base.d.ts:3732 +Defined in node_modules/@types/node/base.d.ts:5468 + +**Parameters:** + +▪ **event**: *string* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -680,7 +841,7 @@ Name | Type | *Overrides [SourceSource](../classes/sourcesource.md).[once](../classes/sourcesource.md#once)* -Defined in node_modules/@types/node/base.d.ts:3733 +Defined in node_modules/@types/node/base.d.ts:5469 **Parameters:** @@ -698,7 +859,7 @@ Defined in node_modules/@types/node/base.d.ts:3733 *Overrides [SourceSource](../classes/sourcesource.md).[once](../classes/sourcesource.md#once)* -Defined in node_modules/@types/node/base.d.ts:3734 +Defined in node_modules/@types/node/base.d.ts:5470 **Parameters:** @@ -706,13 +867,13 @@ Defined in node_modules/@types/node/base.d.ts:3734 ▪ **listener**: *function* -▸ (`chunk`: Buffer | string): *void* +▸ (`chunk`: [Buffer](alignedlockablebuffer.md#buffer) | string): *void* **Parameters:** Name | Type | ------ | ------ | -`chunk` | Buffer | string | +`chunk` | [Buffer](alignedlockablebuffer.md#buffer) | string | **Returns:** *this* @@ -722,7 +883,7 @@ Name | Type | *Overrides [SourceSource](../classes/sourcesource.md).[once](../classes/sourcesource.md#once)* -Defined in node_modules/@types/node/base.d.ts:3735 +Defined in node_modules/@types/node/base.d.ts:5471 **Parameters:** @@ -740,7 +901,7 @@ Defined in node_modules/@types/node/base.d.ts:3735 *Overrides [SourceSource](../classes/sourcesource.md).[once](../classes/sourcesource.md#once)* -Defined in node_modules/@types/node/base.d.ts:3736 +Defined in node_modules/@types/node/base.d.ts:5472 **Parameters:** @@ -758,7 +919,7 @@ Defined in node_modules/@types/node/base.d.ts:3736 *Overrides [SourceSource](../classes/sourcesource.md).[once](../classes/sourcesource.md#once)* -Defined in node_modules/@types/node/base.d.ts:3737 +Defined in node_modules/@types/node/base.d.ts:5473 **Parameters:** @@ -784,7 +945,7 @@ ___ *Inherited from [SparseFilterStream](../classes/sparsefilterstream.md).[pause](../classes/sparsefilterstream.md#pause)* -Defined in node_modules/@types/node/base.d.ts:3693 +Defined in node_modules/@types/node/base.d.ts:5428 **Returns:** *this* @@ -794,11 +955,9 @@ ___ ▸ **pipe**<**T**>(`destination`: T, `options?`: undefined | object): *T* -*Inherited from [SparseFilterStream](../classes/sparsefilterstream.md).[pipe](../classes/sparsefilterstream.md#pipe)* - -*Overrides [CountingWritable](../classes/countingwritable.md).[pipe](../classes/countingwritable.md#pipe)* +*Inherited from [CountingWritable](../classes/countingwritable.md).[pipe](../classes/countingwritable.md#pipe)* -Defined in node_modules/@types/node/base.d.ts:3696 +Defined in node_modules/@types/node/base.d.ts:5407 **Type parameters:** @@ -817,20 +976,27 @@ ___ ### prependListener -▸ **prependListener**(`event`: string, `listener`: Function): *this* +▸ **prependListener**(`event`: string, `listener`: function): *this* *Inherited from [SparseFilterStream](../classes/sparsefilterstream.md).[prependListener](../classes/sparsefilterstream.md#prependlistener)* *Overrides [SourceSource](../classes/sourcesource.md).[prependListener](../classes/sourcesource.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:3739 +Defined in node_modules/@types/node/base.d.ts:5475 + +**Parameters:** + +▪ **event**: *string* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -840,7 +1006,7 @@ Name | Type | *Overrides [SourceSource](../classes/sourcesource.md).[prependListener](../classes/sourcesource.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:3740 +Defined in node_modules/@types/node/base.d.ts:5476 **Parameters:** @@ -858,7 +1024,7 @@ Defined in node_modules/@types/node/base.d.ts:3740 *Overrides [SourceSource](../classes/sourcesource.md).[prependListener](../classes/sourcesource.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:3741 +Defined in node_modules/@types/node/base.d.ts:5477 **Parameters:** @@ -866,13 +1032,13 @@ Defined in node_modules/@types/node/base.d.ts:3741 ▪ **listener**: *function* -▸ (`chunk`: Buffer | string): *void* +▸ (`chunk`: [Buffer](alignedlockablebuffer.md#buffer) | string): *void* **Parameters:** Name | Type | ------ | ------ | -`chunk` | Buffer | string | +`chunk` | [Buffer](alignedlockablebuffer.md#buffer) | string | **Returns:** *this* @@ -882,7 +1048,7 @@ Name | Type | *Overrides [SourceSource](../classes/sourcesource.md).[prependListener](../classes/sourcesource.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:3742 +Defined in node_modules/@types/node/base.d.ts:5478 **Parameters:** @@ -900,7 +1066,7 @@ Defined in node_modules/@types/node/base.d.ts:3742 *Overrides [SourceSource](../classes/sourcesource.md).[prependListener](../classes/sourcesource.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:3743 +Defined in node_modules/@types/node/base.d.ts:5479 **Parameters:** @@ -918,7 +1084,7 @@ Defined in node_modules/@types/node/base.d.ts:3743 *Overrides [SourceSource](../classes/sourcesource.md).[prependListener](../classes/sourcesource.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:3744 +Defined in node_modules/@types/node/base.d.ts:5480 **Parameters:** @@ -940,20 +1106,27 @@ ___ ### prependOnceListener -▸ **prependOnceListener**(`event`: string, `listener`: Function): *this* +▸ **prependOnceListener**(`event`: string, `listener`: function): *this* *Inherited from [SparseFilterStream](../classes/sparsefilterstream.md).[prependOnceListener](../classes/sparsefilterstream.md#prependoncelistener)* *Overrides [SourceSource](../classes/sourcesource.md).[prependOnceListener](../classes/sourcesource.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:3746 +Defined in node_modules/@types/node/base.d.ts:5482 + +**Parameters:** + +▪ **event**: *string* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -963,7 +1136,7 @@ Name | Type | *Overrides [SourceSource](../classes/sourcesource.md).[prependOnceListener](../classes/sourcesource.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:3747 +Defined in node_modules/@types/node/base.d.ts:5483 **Parameters:** @@ -981,7 +1154,7 @@ Defined in node_modules/@types/node/base.d.ts:3747 *Overrides [SourceSource](../classes/sourcesource.md).[prependOnceListener](../classes/sourcesource.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:3748 +Defined in node_modules/@types/node/base.d.ts:5484 **Parameters:** @@ -989,13 +1162,13 @@ Defined in node_modules/@types/node/base.d.ts:3748 ▪ **listener**: *function* -▸ (`chunk`: Buffer | string): *void* +▸ (`chunk`: [Buffer](alignedlockablebuffer.md#buffer) | string): *void* **Parameters:** Name | Type | ------ | ------ | -`chunk` | Buffer | string | +`chunk` | [Buffer](alignedlockablebuffer.md#buffer) | string | **Returns:** *this* @@ -1005,7 +1178,7 @@ Name | Type | *Overrides [SourceSource](../classes/sourcesource.md).[prependOnceListener](../classes/sourcesource.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:3749 +Defined in node_modules/@types/node/base.d.ts:5485 **Parameters:** @@ -1023,7 +1196,7 @@ Defined in node_modules/@types/node/base.d.ts:3749 *Overrides [SourceSource](../classes/sourcesource.md).[prependOnceListener](../classes/sourcesource.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:3750 +Defined in node_modules/@types/node/base.d.ts:5486 **Parameters:** @@ -1041,7 +1214,7 @@ Defined in node_modules/@types/node/base.d.ts:3750 *Overrides [SourceSource](../classes/sourcesource.md).[prependOnceListener](../classes/sourcesource.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:3751 +Defined in node_modules/@types/node/base.d.ts:5487 **Parameters:** @@ -1067,7 +1240,7 @@ ___ *Inherited from [SparseFilterStream](../classes/sparsefilterstream.md).[push](../classes/sparsefilterstream.md#push)* -Defined in node_modules/@types/node/base.d.ts:3700 +Defined in node_modules/@types/node/base.d.ts:5434 **Parameters:** @@ -1086,7 +1259,7 @@ ___ *Inherited from [SparseFilterStream](../classes/sparsefilterstream.md).[read](../classes/sparsefilterstream.md#read)* -Defined in node_modules/@types/node/base.d.ts:3691 +Defined in node_modules/@types/node/base.d.ts:5426 **Parameters:** @@ -1104,7 +1277,7 @@ ___ *Inherited from [CountingWritable](../classes/countingwritable.md).[removeAllListeners](../classes/countingwritable.md#removealllisteners)* -Defined in node_modules/@types/node/base.d.ts:689 +Defined in node_modules/@types/node/base.d.ts:904 **Parameters:** @@ -1118,20 +1291,27 @@ ___ ### removeListener -▸ **removeListener**(`event`: string, `listener`: Function): *this* +▸ **removeListener**(`event`: string, `listener`: function): *this* *Inherited from [SparseFilterStream](../classes/sparsefilterstream.md).[removeListener](../classes/sparsefilterstream.md#removelistener)* *Overrides [SourceSource](../classes/sourcesource.md).[removeListener](../classes/sourcesource.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:3753 +Defined in node_modules/@types/node/base.d.ts:5489 + +**Parameters:** + +▪ **event**: *string* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -1141,7 +1321,7 @@ Name | Type | *Overrides [SourceSource](../classes/sourcesource.md).[removeListener](../classes/sourcesource.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:3754 +Defined in node_modules/@types/node/base.d.ts:5490 **Parameters:** @@ -1159,7 +1339,7 @@ Defined in node_modules/@types/node/base.d.ts:3754 *Overrides [SourceSource](../classes/sourcesource.md).[removeListener](../classes/sourcesource.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:3755 +Defined in node_modules/@types/node/base.d.ts:5491 **Parameters:** @@ -1167,13 +1347,13 @@ Defined in node_modules/@types/node/base.d.ts:3755 ▪ **listener**: *function* -▸ (`chunk`: Buffer | string): *void* +▸ (`chunk`: [Buffer](alignedlockablebuffer.md#buffer) | string): *void* **Parameters:** Name | Type | ------ | ------ | -`chunk` | Buffer | string | +`chunk` | [Buffer](alignedlockablebuffer.md#buffer) | string | **Returns:** *this* @@ -1183,7 +1363,7 @@ Name | Type | *Overrides [SourceSource](../classes/sourcesource.md).[removeListener](../classes/sourcesource.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:3756 +Defined in node_modules/@types/node/base.d.ts:5492 **Parameters:** @@ -1201,7 +1381,7 @@ Defined in node_modules/@types/node/base.d.ts:3756 *Overrides [SourceSource](../classes/sourcesource.md).[removeListener](../classes/sourcesource.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:3757 +Defined in node_modules/@types/node/base.d.ts:5493 **Parameters:** @@ -1219,7 +1399,7 @@ Defined in node_modules/@types/node/base.d.ts:3757 *Overrides [SourceSource](../classes/sourcesource.md).[removeListener](../classes/sourcesource.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:3758 +Defined in node_modules/@types/node/base.d.ts:5494 **Parameters:** @@ -1245,7 +1425,7 @@ ___ *Inherited from [SparseFilterStream](../classes/sparsefilterstream.md).[resume](../classes/sparsefilterstream.md#resume)* -Defined in node_modules/@types/node/base.d.ts:3694 +Defined in node_modules/@types/node/base.d.ts:5429 **Returns:** *this* @@ -1257,7 +1437,7 @@ ___ *Inherited from [SparseFilterStream](../classes/sparsefilterstream.md).[setDefaultEncoding](../classes/sparsefilterstream.md#setdefaultencoding)* -Defined in node_modules/@types/node/base.d.ts:3860 +Defined in node_modules/@types/node/base.d.ts:5609 **Parameters:** @@ -1271,11 +1451,11 @@ ___ ### setEncoding -▸ **setEncoding**(`encoding`: string): *void* +▸ **setEncoding**(`encoding`: string): *this* *Inherited from [SparseFilterStream](../classes/sparsefilterstream.md).[setEncoding](../classes/sparsefilterstream.md#setencoding)* -Defined in node_modules/@types/node/base.d.ts:3692 +Defined in node_modules/@types/node/base.d.ts:5427 **Parameters:** @@ -1283,7 +1463,7 @@ Name | Type | ------ | ------ | `encoding` | string | -**Returns:** *void* +**Returns:** *this* ___ @@ -1293,7 +1473,7 @@ ___ *Inherited from [CountingWritable](../classes/countingwritable.md).[setMaxListeners](../classes/countingwritable.md#setmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:690 +Defined in node_modules/@types/node/base.d.ts:905 **Parameters:** @@ -1305,13 +1485,25 @@ Name | Type | ___ +### uncork + +▸ **uncork**(): *void* + +*Inherited from [SparseFilterStream](../classes/sparsefilterstream.md).[uncork](../classes/sparsefilterstream.md#uncork)* + +Defined in node_modules/@types/node/base.d.ts:5614 + +**Returns:** *void* + +___ + ### unpipe -▸ **unpipe**<**T**>(`destination?`: T): *void* +▸ **unpipe**<**T**>(`destination?`: T): *this* *Inherited from [SparseFilterStream](../classes/sparsefilterstream.md).[unpipe](../classes/sparsefilterstream.md#unpipe)* -Defined in node_modules/@types/node/base.d.ts:3697 +Defined in node_modules/@types/node/base.d.ts:5431 **Type parameters:** @@ -1323,7 +1515,7 @@ Name | Type | ------ | ------ | `destination?` | T | -**Returns:** *void* +**Returns:** *this* ___ @@ -1333,7 +1525,7 @@ ___ *Inherited from [SparseFilterStream](../classes/sparsefilterstream.md).[unshift](../classes/sparsefilterstream.md#unshift)* -Defined in node_modules/@types/node/base.d.ts:3698 +Defined in node_modules/@types/node/base.d.ts:5432 **Parameters:** @@ -1347,11 +1539,11 @@ ___ ### wrap -▸ **wrap**(`oldStream`: ReadableStream): *Readable* +▸ **wrap**(`oldStream`: ReadableStream): *this* *Inherited from [SparseFilterStream](../classes/sparsefilterstream.md).[wrap](../classes/sparsefilterstream.md#wrap)* -Defined in node_modules/@types/node/base.d.ts:3699 +Defined in node_modules/@types/node/base.d.ts:5433 **Parameters:** @@ -1359,7 +1551,7 @@ Name | Type | ------ | ------ | `oldStream` | ReadableStream | -**Returns:** *Readable* +**Returns:** *this* ___ @@ -1369,7 +1561,7 @@ ___ *Inherited from [SparseFilterStream](../classes/sparsefilterstream.md).[write](../classes/sparsefilterstream.md#write)* -Defined in node_modules/@types/node/base.d.ts:3858 +Defined in node_modules/@types/node/base.d.ts:5607 **Parameters:** @@ -1384,7 +1576,7 @@ Name | Type | *Inherited from [SparseFilterStream](../classes/sparsefilterstream.md).[write](../classes/sparsefilterstream.md#write)* -Defined in node_modules/@types/node/base.d.ts:3859 +Defined in node_modules/@types/node/base.d.ts:5608 **Parameters:** @@ -1404,7 +1596,7 @@ ___ *Inherited from [CountingWritable](../classes/countingwritable.md).[listenerCount](../classes/countingwritable.md#static-listenercount)* -Defined in node_modules/@types/node/base.d.ts:680 +Defined in node_modules/@types/node/base.d.ts:895 **Parameters:** diff --git a/doc/interfaces/sparsereadable.md b/doc/interfaces/sparsereadable.md index 83fb010a..a4931158 100644 --- a/doc/interfaces/sparsereadable.md +++ b/doc/interfaces/sparsereadable.md @@ -12,6 +12,7 @@ * [SparseFilterStream](../classes/sparsefilterstream.md) * [SparseReadStream](../classes/sparsereadstream.md) +* [SparseTransformStream](../classes/sparsetransformstream.md) ## Index @@ -52,7 +53,7 @@ • **blocks**: *[BlocksWithChecksum](blockswithchecksum.md)[]* -*Defined in [lib/sparse-stream/shared.ts:49](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/sparse-stream/shared.ts#L49)* +*Defined in [lib/sparse-stream/shared.ts:50](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/sparse-stream/shared.ts#L50)* ___ @@ -62,24 +63,31 @@ ___ *Inherited from [SparseReadable](sparsereadable.md).[readable](sparsereadable.md#readable)* -Defined in node_modules/@types/node/base.d.ts:353 +Defined in node_modules/@types/node/base.d.ts:401 ## Methods ### addListener -▸ **addListener**(`event`: string | symbol, `listener`: Function): *this* +▸ **addListener**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SparseReadable](sparsereadable.md).[addListener](sparsereadable.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:336 +Defined in node_modules/@types/node/base.d.ts:384 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -91,7 +99,7 @@ ___ *Inherited from [SparseReadable](sparsereadable.md).[emit](sparsereadable.md#emit)* -Defined in node_modules/@types/node/base.d.ts:344 +Defined in node_modules/@types/node/base.d.ts:392 **Parameters:** @@ -106,13 +114,13 @@ ___ ### eventNames -▸ **eventNames**(): *string | symbol[]* +▸ **eventNames**(): *Array‹string | symbol›* *Inherited from [SparseReadable](sparsereadable.md).[eventNames](sparsereadable.md#eventnames)* -Defined in node_modules/@types/node/base.d.ts:349 +Defined in node_modules/@types/node/base.d.ts:397 -**Returns:** *string | symbol[]* +**Returns:** *Array‹string | symbol›* ___ @@ -122,7 +130,7 @@ ___ *Inherited from [SparseReadable](sparsereadable.md).[getMaxListeners](sparsereadable.md#getmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:342 +Defined in node_modules/@types/node/base.d.ts:390 **Returns:** *number* @@ -134,7 +142,7 @@ ___ *Inherited from [SparseReadable](sparsereadable.md).[isPaused](sparsereadable.md#ispaused)* -Defined in node_modules/@types/node/base.d.ts:358 +Defined in node_modules/@types/node/base.d.ts:406 **Returns:** *boolean* @@ -146,7 +154,7 @@ ___ *Inherited from [SparseReadable](sparsereadable.md).[listenerCount](sparsereadable.md#listenercount)* -Defined in node_modules/@types/node/base.d.ts:345 +Defined in node_modules/@types/node/base.d.ts:393 **Parameters:** @@ -164,7 +172,7 @@ ___ *Inherited from [SparseReadable](sparsereadable.md).[listeners](sparsereadable.md#listeners)* -Defined in node_modules/@types/node/base.d.ts:343 +Defined in node_modules/@types/node/base.d.ts:391 **Parameters:** @@ -178,18 +186,25 @@ ___ ### on -▸ **on**(`event`: string | symbol, `listener`: Function): *this* +▸ **on**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SparseReadable](sparsereadable.md).[on](sparsereadable.md#on)* -Defined in node_modules/@types/node/base.d.ts:337 +Defined in node_modules/@types/node/base.d.ts:385 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -197,18 +212,25 @@ ___ ### once -▸ **once**(`event`: string | symbol, `listener`: Function): *this* +▸ **once**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SparseReadable](sparsereadable.md).[once](sparsereadable.md#once)* -Defined in node_modules/@types/node/base.d.ts:338 +Defined in node_modules/@types/node/base.d.ts:386 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -220,7 +242,7 @@ ___ *Inherited from [SparseReadable](sparsereadable.md).[pause](sparsereadable.md#pause)* -Defined in node_modules/@types/node/base.d.ts:356 +Defined in node_modules/@types/node/base.d.ts:404 **Returns:** *this* @@ -232,7 +254,7 @@ ___ *Inherited from [SparseReadable](sparsereadable.md).[pipe](sparsereadable.md#pipe)* -Defined in node_modules/@types/node/base.d.ts:359 +Defined in node_modules/@types/node/base.d.ts:407 **Type parameters:** @@ -251,18 +273,25 @@ ___ ### prependListener -▸ **prependListener**(`event`: string | symbol, `listener`: Function): *this* +▸ **prependListener**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SparseReadable](sparsereadable.md).[prependListener](sparsereadable.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:347 +Defined in node_modules/@types/node/base.d.ts:395 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -270,18 +299,25 @@ ___ ### prependOnceListener -▸ **prependOnceListener**(`event`: string | symbol, `listener`: Function): *this* +▸ **prependOnceListener**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SparseReadable](sparsereadable.md).[prependOnceListener](sparsereadable.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:348 +Defined in node_modules/@types/node/base.d.ts:396 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -291,7 +327,7 @@ ___ ▸ **push**(`chunk`: [SparseStreamChunk](sparsestreamchunk.md)): *boolean* -*Defined in [lib/sparse-stream/shared.ts:50](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/sparse-stream/shared.ts#L50)* +*Defined in [lib/sparse-stream/shared.ts:51](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/sparse-stream/shared.ts#L51)* **Parameters:** @@ -305,11 +341,11 @@ ___ ### read -▸ **read**(`size?`: undefined | number): *string | Buffer* +▸ **read**(`size?`: undefined | number): *string | [Buffer](alignedlockablebuffer.md#buffer)* *Inherited from [SparseReadable](sparsereadable.md).[read](sparsereadable.md#read)* -Defined in node_modules/@types/node/base.d.ts:354 +Defined in node_modules/@types/node/base.d.ts:402 **Parameters:** @@ -317,7 +353,7 @@ Name | Type | ------ | ------ | `size?` | undefined | number | -**Returns:** *string | Buffer* +**Returns:** *string | [Buffer](alignedlockablebuffer.md#buffer)* ___ @@ -327,7 +363,7 @@ ___ *Inherited from [SparseReadable](sparsereadable.md).[removeAllListeners](sparsereadable.md#removealllisteners)* -Defined in node_modules/@types/node/base.d.ts:340 +Defined in node_modules/@types/node/base.d.ts:388 **Parameters:** @@ -341,18 +377,25 @@ ___ ### removeListener -▸ **removeListener**(`event`: string | symbol, `listener`: Function): *this* +▸ **removeListener**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SparseReadable](sparsereadable.md).[removeListener](sparsereadable.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:339 +Defined in node_modules/@types/node/base.d.ts:387 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -364,7 +407,7 @@ ___ *Inherited from [SparseReadable](sparsereadable.md).[resume](sparsereadable.md#resume)* -Defined in node_modules/@types/node/base.d.ts:357 +Defined in node_modules/@types/node/base.d.ts:405 **Returns:** *this* @@ -372,19 +415,19 @@ ___ ### setEncoding -▸ **setEncoding**(`encoding`: string | null): *void* +▸ **setEncoding**(`encoding`: string): *this* *Inherited from [SparseReadable](sparsereadable.md).[setEncoding](sparsereadable.md#setencoding)* -Defined in node_modules/@types/node/base.d.ts:355 +Defined in node_modules/@types/node/base.d.ts:403 **Parameters:** Name | Type | ------ | ------ | -`encoding` | string | null | +`encoding` | string | -**Returns:** *void* +**Returns:** *this* ___ @@ -394,7 +437,7 @@ ___ *Inherited from [SparseReadable](sparsereadable.md).[setMaxListeners](sparsereadable.md#setmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:341 +Defined in node_modules/@types/node/base.d.ts:389 **Parameters:** @@ -408,11 +451,11 @@ ___ ### unpipe -▸ **unpipe**<**T**>(`destination?`: T): *void* +▸ **unpipe**<**T**>(`destination?`: T): *this* *Inherited from [SparseReadable](sparsereadable.md).[unpipe](sparsereadable.md#unpipe)* -Defined in node_modules/@types/node/base.d.ts:360 +Defined in node_modules/@types/node/base.d.ts:408 **Type parameters:** @@ -424,7 +467,7 @@ Name | Type | ------ | ------ | `destination?` | T | -**Returns:** *void* +**Returns:** *this* ___ @@ -434,7 +477,7 @@ ___ *Inherited from [SparseReadable](sparsereadable.md).[unshift](sparsereadable.md#unshift)* -Defined in node_modules/@types/node/base.d.ts:361 +Defined in node_modules/@types/node/base.d.ts:409 **Parameters:** @@ -444,17 +487,17 @@ Name | Type | **Returns:** *void* -▸ **unshift**(`chunk`: Buffer): *void* +▸ **unshift**(`chunk`: [Buffer](alignedlockablebuffer.md#buffer)): *void* *Inherited from [SparseReadable](sparsereadable.md).[unshift](sparsereadable.md#unshift)* -Defined in node_modules/@types/node/base.d.ts:362 +Defined in node_modules/@types/node/base.d.ts:410 **Parameters:** Name | Type | ------ | ------ | -`chunk` | Buffer | +`chunk` | [Buffer](alignedlockablebuffer.md#buffer) | **Returns:** *void* @@ -462,11 +505,11 @@ ___ ### wrap -▸ **wrap**(`oldStream`: ReadableStream): *ReadableStream* +▸ **wrap**(`oldStream`: ReadableStream): *this* *Inherited from [SparseReadable](sparsereadable.md).[wrap](sparsereadable.md#wrap)* -Defined in node_modules/@types/node/base.d.ts:363 +Defined in node_modules/@types/node/base.d.ts:411 **Parameters:** @@ -474,4 +517,4 @@ Name | Type | ------ | ------ | `oldStream` | ReadableStream | -**Returns:** *ReadableStream* +**Returns:** *this* diff --git a/doc/interfaces/sparsereaderstate.md b/doc/interfaces/sparsereaderstate.md index 909640c4..b554d01c 100644 --- a/doc/interfaces/sparsereaderstate.md +++ b/doc/interfaces/sparsereaderstate.md @@ -20,7 +20,7 @@ • **block**: *[BlocksWithChecksum](blockswithchecksum.md)* -*Defined in [lib/sparse-stream/shared.ts:83](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/sparse-stream/shared.ts#L83)* +*Defined in [lib/sparse-stream/shared.ts:92](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/sparse-stream/shared.ts#L92)* ___ @@ -28,7 +28,7 @@ ___ • **hasher**? : *[AnyHasher](../README.md#anyhasher)* -*Defined in [lib/sparse-stream/shared.ts:85](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/sparse-stream/shared.ts#L85)* +*Defined in [lib/sparse-stream/shared.ts:94](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/sparse-stream/shared.ts#L94)* ___ @@ -36,4 +36,4 @@ ___ • **subBlock**: *[Block](block.md)* -*Defined in [lib/sparse-stream/shared.ts:84](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/sparse-stream/shared.ts#L84)* +*Defined in [lib/sparse-stream/shared.ts:93](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/sparse-stream/shared.ts#L93)* diff --git a/doc/interfaces/sparsestreamchunk.md b/doc/interfaces/sparsestreamchunk.md index 6c4cd208..672ca47a 100644 --- a/doc/interfaces/sparsestreamchunk.md +++ b/doc/interfaces/sparsestreamchunk.md @@ -17,9 +17,9 @@ ### buffer -• **buffer**: *Buffer* +• **buffer**: *[Buffer](alignedlockablebuffer.md#buffer) | [AlignedLockableBuffer](alignedlockablebuffer.md)* -*Defined in [lib/sparse-stream/shared.ts:44](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/sparse-stream/shared.ts#L44)* +*Defined in [lib/sparse-stream/shared.ts:45](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/sparse-stream/shared.ts#L45)* ___ @@ -27,4 +27,4 @@ ___ • **position**: *number* -*Defined in [lib/sparse-stream/shared.ts:45](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/sparse-stream/shared.ts#L45)* +*Defined in [lib/sparse-stream/shared.ts:46](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/sparse-stream/shared.ts#L46)* diff --git a/doc/interfaces/sparsewritable.md b/doc/interfaces/sparsewritable.md index 2f8c4fcb..5fab226d 100644 --- a/doc/interfaces/sparsewritable.md +++ b/doc/interfaces/sparsewritable.md @@ -10,6 +10,7 @@ ## Implemented by +* [SparseTransformStream](../classes/sparsetransformstream.md) * [SparseWriteStream](../classes/sparsewritestream.md) ## Index @@ -45,7 +46,7 @@ *Inherited from [SparseWritable](sparsewritable.md).[writable](sparsewritable.md#writable)* -Defined in node_modules/@types/node/base.d.ts:367 +Defined in node_modules/@types/node/base.d.ts:415 ## Methods @@ -53,7 +54,7 @@ Defined in node_modules/@types/node/base.d.ts:367 ▸ **_write**(`chunk`: [SparseStreamChunk](sparsestreamchunk.md), `encoding`: string, `callback`: function): *void* -*Defined in [lib/sparse-stream/sparse-write-stream.ts:12](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/sparse-stream/sparse-write-stream.ts#L12)* +*Defined in [lib/sparse-stream/shared.ts:55](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/sparse-stream/shared.ts#L55)* **Parameters:** @@ -77,18 +78,25 @@ ___ ### addListener -▸ **addListener**(`event`: string | symbol, `listener`: Function): *this* +▸ **addListener**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SparseReadable](sparsereadable.md).[addListener](sparsereadable.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:336 +Defined in node_modules/@types/node/base.d.ts:384 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -100,7 +108,7 @@ ___ *Inherited from [SparseReadable](sparsereadable.md).[emit](sparsereadable.md#emit)* -Defined in node_modules/@types/node/base.d.ts:344 +Defined in node_modules/@types/node/base.d.ts:392 **Parameters:** @@ -119,7 +127,7 @@ ___ *Inherited from [SparseWritable](sparsewritable.md).[end](sparsewritable.md#end)* -Defined in node_modules/@types/node/base.d.ts:370 +Defined in node_modules/@types/node/base.d.ts:418 **Parameters:** @@ -129,17 +137,17 @@ Name | Type | **Returns:** *void* -▸ **end**(`buffer`: Buffer, `cb?`: Function): *void* +▸ **end**(`buffer`: [Buffer](alignedlockablebuffer.md#buffer), `cb?`: Function): *void* *Inherited from [SparseWritable](sparsewritable.md).[end](sparsewritable.md#end)* -Defined in node_modules/@types/node/base.d.ts:371 +Defined in node_modules/@types/node/base.d.ts:419 **Parameters:** Name | Type | ------ | ------ | -`buffer` | Buffer | +`buffer` | [Buffer](alignedlockablebuffer.md#buffer) | `cb?` | Function | **Returns:** *void* @@ -148,7 +156,7 @@ Name | Type | *Inherited from [SparseWritable](sparsewritable.md).[end](sparsewritable.md#end)* -Defined in node_modules/@types/node/base.d.ts:372 +Defined in node_modules/@types/node/base.d.ts:420 **Parameters:** @@ -163,7 +171,7 @@ Name | Type | *Inherited from [SparseWritable](sparsewritable.md).[end](sparsewritable.md#end)* -Defined in node_modules/@types/node/base.d.ts:373 +Defined in node_modules/@types/node/base.d.ts:421 **Parameters:** @@ -179,13 +187,13 @@ ___ ### eventNames -▸ **eventNames**(): *string | symbol[]* +▸ **eventNames**(): *Array‹string | symbol›* *Inherited from [SparseReadable](sparsereadable.md).[eventNames](sparsereadable.md#eventnames)* -Defined in node_modules/@types/node/base.d.ts:349 +Defined in node_modules/@types/node/base.d.ts:397 -**Returns:** *string | symbol[]* +**Returns:** *Array‹string | symbol›* ___ @@ -195,7 +203,7 @@ ___ *Inherited from [SparseReadable](sparsereadable.md).[getMaxListeners](sparsereadable.md#getmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:342 +Defined in node_modules/@types/node/base.d.ts:390 **Returns:** *number* @@ -207,7 +215,7 @@ ___ *Inherited from [SparseReadable](sparsereadable.md).[listenerCount](sparsereadable.md#listenercount)* -Defined in node_modules/@types/node/base.d.ts:345 +Defined in node_modules/@types/node/base.d.ts:393 **Parameters:** @@ -225,7 +233,7 @@ ___ *Inherited from [SparseReadable](sparsereadable.md).[listeners](sparsereadable.md#listeners)* -Defined in node_modules/@types/node/base.d.ts:343 +Defined in node_modules/@types/node/base.d.ts:391 **Parameters:** @@ -239,18 +247,25 @@ ___ ### on -▸ **on**(`event`: string | symbol, `listener`: Function): *this* +▸ **on**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SparseReadable](sparsereadable.md).[on](sparsereadable.md#on)* -Defined in node_modules/@types/node/base.d.ts:337 +Defined in node_modules/@types/node/base.d.ts:385 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -258,18 +273,25 @@ ___ ### once -▸ **once**(`event`: string | symbol, `listener`: Function): *this* +▸ **once**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SparseReadable](sparsereadable.md).[once](sparsereadable.md#once)* -Defined in node_modules/@types/node/base.d.ts:338 +Defined in node_modules/@types/node/base.d.ts:386 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -277,18 +299,25 @@ ___ ### prependListener -▸ **prependListener**(`event`: string | symbol, `listener`: Function): *this* +▸ **prependListener**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SparseReadable](sparsereadable.md).[prependListener](sparsereadable.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:347 +Defined in node_modules/@types/node/base.d.ts:395 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -296,18 +325,25 @@ ___ ### prependOnceListener -▸ **prependOnceListener**(`event`: string | symbol, `listener`: Function): *this* +▸ **prependOnceListener**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SparseReadable](sparsereadable.md).[prependOnceListener](sparsereadable.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:348 +Defined in node_modules/@types/node/base.d.ts:396 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -319,7 +355,7 @@ ___ *Inherited from [SparseReadable](sparsereadable.md).[removeAllListeners](sparsereadable.md#removealllisteners)* -Defined in node_modules/@types/node/base.d.ts:340 +Defined in node_modules/@types/node/base.d.ts:388 **Parameters:** @@ -333,18 +369,25 @@ ___ ### removeListener -▸ **removeListener**(`event`: string | symbol, `listener`: Function): *this* +▸ **removeListener**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SparseReadable](sparsereadable.md).[removeListener](sparsereadable.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:339 +Defined in node_modules/@types/node/base.d.ts:387 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`listener` | Function | +`...args` | any[] | **Returns:** *this* @@ -356,7 +399,7 @@ ___ *Inherited from [SparseReadable](sparsereadable.md).[setMaxListeners](sparsereadable.md#setmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:341 +Defined in node_modules/@types/node/base.d.ts:389 **Parameters:** @@ -370,17 +413,17 @@ ___ ### write -▸ **write**(`buffer`: Buffer | string, `cb?`: Function): *boolean* +▸ **write**(`buffer`: [Buffer](alignedlockablebuffer.md#buffer) | string, `cb?`: Function): *boolean* *Inherited from [SparseWritable](sparsewritable.md).[write](sparsewritable.md#write)* -Defined in node_modules/@types/node/base.d.ts:368 +Defined in node_modules/@types/node/base.d.ts:416 **Parameters:** Name | Type | ------ | ------ | -`buffer` | Buffer | string | +`buffer` | [Buffer](alignedlockablebuffer.md#buffer) | string | `cb?` | Function | **Returns:** *boolean* @@ -389,7 +432,7 @@ Name | Type | *Inherited from [SparseWritable](sparsewritable.md).[write](sparsewritable.md#write)* -Defined in node_modules/@types/node/base.d.ts:369 +Defined in node_modules/@types/node/base.d.ts:417 **Parameters:** diff --git a/doc/interfaces/tmpfileresult.md b/doc/interfaces/tmpfileresult.md index a270a6d7..482880b5 100644 --- a/doc/interfaces/tmpfileresult.md +++ b/doc/interfaces/tmpfileresult.md @@ -19,7 +19,7 @@ • **fd**? : *undefined | number* -*Defined in [lib/tmp.ts:34](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/tmp.ts#L34)* +*Defined in [lib/tmp.ts:34](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/tmp.ts#L34)* ___ @@ -27,4 +27,4 @@ ___ • **path**: *string* -*Defined in [lib/tmp.ts:33](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/tmp.ts#L33)* +*Defined in [lib/tmp.ts:33](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/tmp.ts#L33)* diff --git a/doc/interfaces/wificonfig.md b/doc/interfaces/wificonfig.md index b9d7d930..93ede8c1 100644 --- a/doc/interfaces/wificonfig.md +++ b/doc/interfaces/wificonfig.md @@ -23,7 +23,7 @@ • **gateway**? : *undefined | string* -*Defined in [lib/source-destination/configured-source/operations/configure.ts:38](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/configured-source/operations/configure.ts#L38)* +*Defined in [lib/source-destination/configured-source/operations/configure.ts:38](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/configured-source/operations/configure.ts#L38)* ___ @@ -31,7 +31,7 @@ ___ • **ip**? : *undefined | string* -*Defined in [lib/source-destination/configured-source/operations/configure.ts:36](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/configured-source/operations/configure.ts#L36)* +*Defined in [lib/source-destination/configured-source/operations/configure.ts:36](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/configured-source/operations/configure.ts#L36)* ___ @@ -39,7 +39,7 @@ ___ • **netmask**? : *undefined | string* -*Defined in [lib/source-destination/configured-source/operations/configure.ts:37](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/configured-source/operations/configure.ts#L37)* +*Defined in [lib/source-destination/configured-source/operations/configure.ts:37](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/configured-source/operations/configure.ts#L37)* ___ @@ -47,7 +47,7 @@ ___ • **routeMetric**? : *number | string* -*Defined in [lib/source-destination/configured-source/operations/configure.ts:35](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/configured-source/operations/configure.ts#L35)* +*Defined in [lib/source-destination/configured-source/operations/configure.ts:35](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/configured-source/operations/configure.ts#L35)* ___ @@ -55,7 +55,7 @@ ___ • **wifiKey**? : *undefined | string* -*Defined in [lib/source-destination/configured-source/operations/configure.ts:34](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/configured-source/operations/configure.ts#L34)* +*Defined in [lib/source-destination/configured-source/operations/configure.ts:34](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/configured-source/operations/configure.ts#L34)* ___ @@ -63,4 +63,4 @@ ___ • **wifiSsid**: *string* -*Defined in [lib/source-destination/configured-source/operations/configure.ts:33](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/source-destination/configured-source/operations/configure.ts#L33)* +*Defined in [lib/source-destination/configured-source/operations/configure.ts:33](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/configured-source/operations/configure.ts#L33)* From 8c46ec7d84d294c24c92a7a6ea7c73a4acd610c5 Mon Sep 17 00:00:00 2001 From: Alexis Svinartchouk Date: Mon, 30 Mar 2020 17:46:47 +0200 Subject: [PATCH 07/23] Address comments --- lib/aligned-lockable-buffer.ts | 28 +++++++++++++-------- lib/block-transform-stream.ts | 15 ++++++----- lib/source-destination/multi-destination.ts | 13 +++++----- 3 files changed, 34 insertions(+), 22 deletions(-) diff --git a/lib/aligned-lockable-buffer.ts b/lib/aligned-lockable-buffer.ts index d54ca60b..97812841 100644 --- a/lib/aligned-lockable-buffer.ts +++ b/lib/aligned-lockable-buffer.ts @@ -8,20 +8,26 @@ export interface AlignedLockableBuffer extends Buffer { slice: (start?: number, end?: number) => AlignedLockableBuffer; } +function alignedLockableBufferSlice( + this: AlignedLockableBuffer, + start?: number, + end?: number, +) { + const slice = Buffer.prototype.slice.call(this, start, end); + return attachMutex(slice, this.alignment, this.lock, this.rlock); +} + function attachMutex( buf: Buffer, - mutex: RWMutex, alignment: number, + lock: () => Promise<() => void>, + rlock: () => Promise<() => void>, ): AlignedLockableBuffer { const buffer = buf as AlignedLockableBuffer; buffer.alignment = alignment; - buffer.lock = mutex.lock.bind(mutex); - buffer.rlock = mutex.rlock.bind(mutex); - const bufferSlice = buffer.slice.bind(buffer); - buffer.slice = (...args) => { - const slice = bufferSlice(...args); - return attachMutex(slice, mutex, alignment); - }; + buffer.lock = lock; + buffer.rlock = rlock; + buffer.slice = alignedLockableBufferSlice; return buffer; } @@ -29,17 +35,19 @@ export function createBuffer( size: number, alignment: number, ): AlignedLockableBuffer { + const mutex = new RWMutex(); return attachMutex( getAlignedBuffer(size, alignment), - new RWMutex(), alignment, + mutex.lock.bind(mutex), + mutex.rlock.bind(mutex), ); } export function isAlignedLockableBuffer( buffer: Buffer, ): buffer is AlignedLockableBuffer { - return (buffer as AlignedLockableBuffer).rlock !== undefined; + return 'rlock' in buffer; } export class AlignedReadableState { diff --git a/lib/block-transform-stream.ts b/lib/block-transform-stream.ts index 09f5332f..0796d079 100644 --- a/lib/block-transform-stream.ts +++ b/lib/block-transform-stream.ts @@ -18,6 +18,7 @@ import { Transform } from 'readable-stream'; import { AlignedReadableState } from './aligned-lockable-buffer'; import { CHUNK_SIZE } from './constants'; +import { asCallback } from './utils'; export class BlockTransformStream extends Transform { public bytesRead = 0; @@ -64,8 +65,11 @@ export class BlockTransformStream extends Transform { const alignedBuffer = this.alignedReadableState.getCurrentBuffer(); const unlock = await alignedBuffer.lock(); - block.copy(alignedBuffer); - unlock(); + try { + block.copy(alignedBuffer); + } finally { + unlock(); + } this.bytesWritten += length; this.push(alignedBuffer.slice(0, length)); } @@ -79,13 +83,11 @@ export class BlockTransformStream extends Transform { this.bytesRead += chunk.length; this.inputBuffers.push(chunk); this.inputBytes += chunk.length; - await this.writeBuffers(); - callback(); + asCallback(this.writeBuffers(), callback); } public async _flush(callback: (error?: Error) => void): Promise { - await this.writeBuffers(true); - callback(); + asCallback(this.writeBuffers(true), callback); } public static alignIfNeeded( @@ -101,6 +103,7 @@ export class BlockTransformStream extends Transform { alignment, numBuffers, }); + stream.on('error', transform.emit.bind(transform, 'error')); stream.pipe(transform); return transform; } diff --git a/lib/source-destination/multi-destination.ts b/lib/source-destination/multi-destination.ts index 295d1c4f..46cee89d 100644 --- a/lib/source-destination/multi-destination.ts +++ b/lib/source-destination/multi-destination.ts @@ -120,15 +120,16 @@ export class MultiDestination extends SourceDestination { } public getAlignment(): number | undefined { - const alignments: number[] = []; + let max; for (const destination of this.destinations.values()) { - if (destination instanceof BlockDevice) { - alignments.push(destination.alignment); + if ( + destination instanceof BlockDevice && + (max === undefined || destination.alignment > max) + ) { + max = destination.alignment; } } - if (alignments.length) { - return Math.max(...alignments); - } + return max; } public destinationError( From f7d318fa67a10601a703b6b9758118825de9dc7a Mon Sep 17 00:00:00 2001 From: Alexis Svinartchouk Date: Mon, 30 Mar 2020 18:24:58 +0200 Subject: [PATCH 08/23] BlockDeviceAdapter constructor takes an options argument Change-type: major --- examples/multi-destination.ts | 7 ++++++- examples/scanner.ts | 4 +++- examples/usbboot.ts | 4 +++- lib/scanner/adapters/block-device.ts | 25 +++++++++++++++++++------ tests/drive-scanner.spec.ts | 4 +++- 5 files changed, 34 insertions(+), 10 deletions(-) diff --git a/examples/multi-destination.ts b/examples/multi-destination.ts index 9a2a3b48..13ac00e8 100644 --- a/examples/multi-destination.ts +++ b/examples/multi-destination.ts @@ -40,7 +40,12 @@ const main = async ({ numBuffers: number; }) => { const adapters = [ - new scanner.adapters.BlockDeviceAdapter(() => false, false, true, true), + new scanner.adapters.BlockDeviceAdapter({ + includeSystemDrives: () => false, + unmountOnSuccess: false, + write: true, + direct: true, + }), ]; const deviceScanner = new scanner.Scanner(adapters); deviceScanner.on('error', console.error); diff --git a/examples/scanner.ts b/examples/scanner.ts index cb2efe08..0a773cfc 100644 --- a/examples/scanner.ts +++ b/examples/scanner.ts @@ -19,7 +19,9 @@ import { scanner } from '../lib/'; async function main() { const adapters: scanner.adapters.Adapter[] = [ - new scanner.adapters.BlockDeviceAdapter(() => true), + new scanner.adapters.BlockDeviceAdapter({ + includeSystemDrives: () => true, + }), new scanner.adapters.UsbbootDeviceAdapter(), ]; if (platform() === 'win32') { diff --git a/examples/usbboot.ts b/examples/usbboot.ts index 4cdc0724..c4ecbf3a 100644 --- a/examples/usbboot.ts +++ b/examples/usbboot.ts @@ -22,7 +22,9 @@ import { pipeSourceToDestinationsWithProgressBar } from './utils'; async function main() { const adapters: scanner.adapters.Adapter[] = [ - new scanner.adapters.BlockDeviceAdapter(() => false), + new scanner.adapters.BlockDeviceAdapter({ + includeSystemDrives: () => false, + }), new scanner.adapters.UsbbootDeviceAdapter(), ]; const deviceScanner = new scanner.Scanner(adapters); diff --git a/lib/scanner/adapters/block-device.ts b/lib/scanner/adapters/block-device.ts index be80f629..69fa8ea9 100644 --- a/lib/scanner/adapters/block-device.ts +++ b/lib/scanner/adapters/block-device.ts @@ -55,17 +55,30 @@ export interface DrivelistDrive extends $Drive { export class BlockDeviceAdapter extends Adapter { // Emits 'attach', 'detach', 'ready' and 'error' events + public includeSystemDrives: () => boolean; + private unmountOnSuccess: boolean; + private oWrite: boolean; + private oDirect: boolean; private drives: Map = new Map(); private running = false; private ready = false; - constructor( - public includeSystemDrives: () => boolean = () => false, - private unmountOnSuccess = false, - private oWrite = false, - private oDirect = true, - ) { + constructor({ + includeSystemDrives = () => false, + unmountOnSuccess = false, + write = false, + direct = true, + }: { + includeSystemDrives?: () => boolean; + unmountOnSuccess?: boolean; + write?: boolean; + direct?: boolean; + }) { super(); + this.includeSystemDrives = includeSystemDrives; + this.unmountOnSuccess = unmountOnSuccess; + this.oWrite = write; + this.oDirect = direct; } public start(): void { diff --git a/tests/drive-scanner.spec.ts b/tests/drive-scanner.spec.ts index ec8a1cb1..f2e04d6b 100644 --- a/tests/drive-scanner.spec.ts +++ b/tests/drive-scanner.spec.ts @@ -25,7 +25,9 @@ async function createScanner( includeSystemDrives = false, ): Promise { const adapters: scanner.adapters.Adapter[] = [ - new scanner.adapters.BlockDeviceAdapter(() => includeSystemDrives), + new scanner.adapters.BlockDeviceAdapter({ + includeSystemDrives: () => includeSystemDrives, + }), ]; const driveScanner = new scanner.Scanner(adapters); await new Promise((resolve, reject) => { From fd66806fae0274a46e8ce4e744debc51b63d0995 Mon Sep 17 00:00:00 2001 From: Alexis Svinartchouk Date: Mon, 30 Mar 2020 20:18:54 +0200 Subject: [PATCH 09/23] Drop node8 support Change-type: major --- examples/balena-s3-configure.ts | 5 ++-- examples/utils.ts | 7 +++--- lib/block-write-stream.ts | 2 +- lib/diskpart.ts | 4 ++-- lib/fs.ts | 29 ----------------------- lib/index.ts | 2 -- lib/source-destination/file.ts | 29 +++++++++++++++-------- lib/sparse-stream/shared.ts | 2 +- lib/sparse-stream/sparse-filter-stream.ts | 4 ++-- lib/sparse-stream/sparse-write-stream.ts | 2 +- lib/stream-limiter.ts | 2 +- lib/tmp.ts | 23 +++++++++--------- lib/utils.ts | 2 +- package.json | 2 +- tests/block-write-stream.spec.ts | 4 ++-- tests/directory.spec.ts | 2 ++ tests/get-inner-source.spec.ts | 3 ++- tests/img.spec.ts | 5 ++-- tests/sparse.spec.ts | 5 ++++ tests/tester.ts | 14 ++++++----- tests/zip.spec.ts | 2 ++ tsconfig.json | 3 ++- 22 files changed, 72 insertions(+), 81 deletions(-) delete mode 100644 lib/fs.ts diff --git a/examples/balena-s3-configure.ts b/examples/balena-s3-configure.ts index 3e23cf23..150c5132 100644 --- a/examples/balena-s3-configure.ts +++ b/examples/balena-s3-configure.ts @@ -14,15 +14,16 @@ * limitations under the License. */ +import { promises as fs } from 'fs'; import { Argv } from 'yargs'; -import { fs, sourceDestination } from '../lib'; +import { sourceDestination } from '../lib'; import { pipeSourceToDestinationsWithProgressBar, wrapper } from './utils'; const readJsonFile = async (path: string): Promise => { const data = await fs.readFile(path, { encoding: 'utf8', flag: 'r' }); - return JSON.parse(data as string); + return JSON.parse(data); }; const main = async ({ diff --git a/examples/utils.ts b/examples/utils.ts index 2fa5077c..1d8efcc6 100644 --- a/examples/utils.ts +++ b/examples/utils.ts @@ -16,18 +16,19 @@ import { delay } from 'bluebird'; import { Spinner } from 'cli-spinner'; +import { promises as fs } from 'fs'; import ProgressBar = require('progress'); -import { fs, multiWrite, sourceDestination } from '../lib'; +import { multiWrite, sourceDestination } from '../lib'; const SPINNER_DELAY = 60; export async function readJsonFile(path: string): Promise { return JSON.parse( - (await fs.readFile(path, { + await fs.readFile(path, { encoding: 'utf8', flag: 'r', - })) as string, + }), ); } diff --git a/lib/block-write-stream.ts b/lib/block-write-stream.ts index 9431f89d..3c4a0c9e 100644 --- a/lib/block-write-stream.ts +++ b/lib/block-write-stream.ts @@ -116,7 +116,7 @@ export class BlockWriteStream extends Writable { /** * @summary Write buffered data before a stream ends, called by stream internals */ - public _final(callback: (error?: Error | void) => void) { + public _final(callback: (error?: Error | null) => void) { asCallback(this.__final(), callback); } } diff --git a/lib/diskpart.ts b/lib/diskpart.ts index 07f5f879..957549a9 100644 --- a/lib/diskpart.ts +++ b/lib/diskpart.ts @@ -17,9 +17,9 @@ import { delay, using } from 'bluebird'; import { execFile, ExecFileOptions } from 'child_process'; import * as _debug from 'debug'; +import { promises as fs } from 'fs'; import { platform } from 'os'; -import { writeFile } from './fs'; import { tmpFileDisposer, TmpFileResult } from './tmp'; const debug = _debug('etcher-sdk:diskpart'); @@ -65,7 +65,7 @@ const runDiskpart = async (commands: string[]): Promise => { return; } await using(tmpFileDisposer(false), async (file: TmpFileResult) => { - await writeFile(file.path, commands.join('\r\n')); + await fs.writeFile(file.path, commands.join('\r\n')); const { stdout, stderr } = await execFileAsync('diskpart', [ '/s', file.path, diff --git a/lib/fs.ts b/lib/fs.ts deleted file mode 100644 index 867d28df..00000000 --- a/lib/fs.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright 2018 balena.io - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import * as fs from 'fs'; -import { promisify } from 'util'; - -export const close = promisify(fs.close); -export const fstat = promisify(fs.fstat); -export const fsync = promisify(fs.fsync); -export const open = promisify(fs.open); -export const read = promisify(fs.read); -export const readFile = promisify(fs.readFile); -export const stat = promisify(fs.stat); -export const unlink = promisify(fs.unlink); -export const write = promisify(fs.write); -export const writeFile = promisify(fs.writeFile); diff --git a/lib/index.ts b/lib/index.ts index e4feea51..6e3851ab 100644 --- a/lib/index.ts +++ b/lib/index.ts @@ -16,7 +16,6 @@ import * as constants from './constants'; import * as errors from './errors'; -import * as fs from './fs'; import * as multiWrite from './multi-write'; import * as scanner from './scanner'; import * as sourceDestination from './source-destination'; @@ -26,7 +25,6 @@ import * as utils from './utils'; export { constants, errors, - fs, multiWrite, scanner, sourceDestination, diff --git a/lib/source-destination/file.ts b/lib/source-destination/file.ts index 2093caf4..ba5e44fb 100644 --- a/lib/source-destination/file.ts +++ b/lib/source-destination/file.ts @@ -15,7 +15,7 @@ */ import { ReadResult, WriteResult } from 'file-disk'; -import { constants, ReadStream, WriteStream } from 'fs'; +import { constants, promises as fs, ReadStream, WriteStream } from 'fs'; import { basename } from 'path'; import { Metadata } from './metadata'; @@ -27,7 +27,6 @@ import { import { BlockReadStream, ProgressBlockReadStream } from '../block-read-stream'; import { CHUNK_SIZE, PROGRESS_EMISSION_INTERVAL } from '../constants'; -import { close, open, read, stat, write } from '../fs'; import { ProgressSparseWriteStream, SparseWriteStream, @@ -48,7 +47,7 @@ export const ProgressWriteStream = makeClassEmitProgressEvents( ); export class File extends SourceDestination { - protected fd: number; + protected fileHandle: fs.FileHandle; constructor(public readonly path: string, public readonly oWrite = false) { super(); @@ -80,7 +79,7 @@ export class File extends SourceDestination { protected async _getMetadata(): Promise { return { - size: (await stat(this.path)).size, + size: (await fs.stat(this.path)).size, name: basename(this.path), }; } @@ -91,7 +90,12 @@ export class File extends SourceDestination { length: number, sourceOffset: number, ): Promise { - return await read(this.fd, buffer, bufferOffset, length, sourceOffset); + return await this.fileHandle.read( + buffer, + bufferOffset, + length, + sourceOffset, + ); } public async write( @@ -100,13 +104,18 @@ export class File extends SourceDestination { length: number, fileOffset: number, ): Promise { - return await write(this.fd, buffer, bufferOffset, length, fileOffset); + return await this.fileHandle.write( + buffer, + bufferOffset, + length, + fileOffset, + ); } private streamOptions(start?: number, end?: number) { // TODO: pass fs: SourceDestinationFs(this) instead of fd (only works with node >= v13.6.0) return { - fd: this.fd, + fd: this.fileHandle.fd, highWaterMark: CHUNK_SIZE, autoClose: false, start, @@ -158,7 +167,7 @@ export class File extends SourceDestination { // TODO: use SourceDestinationFs (implement write) when node 14 becomes LTS // @ts-ignore: @types/node is wrong about fs.WriteStream constructor: it takes 2 arguments, the first one is the file path const stream = new ProgressWriteStream(null, { - fd: this.fd, + fd: this.fileHandle.fd, autoClose: false, highWaterMark, }); @@ -178,10 +187,10 @@ export class File extends SourceDestination { } protected async _open(): Promise { - this.fd = await open(this.path, this.getOpenFlags()); + this.fileHandle = await fs.open(this.path, this.getOpenFlags()); } protected async _close(): Promise { - await close(this.fd); + await this.fileHandle.close(); } } diff --git a/lib/sparse-stream/shared.ts b/lib/sparse-stream/shared.ts index ea38f971..a6b88f2a 100644 --- a/lib/sparse-stream/shared.ts +++ b/lib/sparse-stream/shared.ts @@ -55,7 +55,7 @@ export interface SparseWritable extends NodeJS.WritableStream { _write( chunk: SparseStreamChunk, encoding: string, - callback: (err?: Error | void) => void, + callback: (err?: Error | void | null) => void, ): void; } diff --git a/lib/sparse-stream/sparse-filter-stream.ts b/lib/sparse-stream/sparse-filter-stream.ts index 56e99632..6e8e9510 100644 --- a/lib/sparse-stream/sparse-filter-stream.ts +++ b/lib/sparse-stream/sparse-filter-stream.ts @@ -55,9 +55,9 @@ export class SparseFilterStream extends Transform implements SparseReadable { public _transform( chunk: Buffer, _encoding: string, - callback: (error: Error | null) => void, + callback: (error?: Error) => void, ) { - let error: Error | null = null; + let error: Error | undefined; try { this.__transform(chunk); } catch (err) { diff --git a/lib/sparse-stream/sparse-write-stream.ts b/lib/sparse-stream/sparse-write-stream.ts index d8754dd4..5550d2bc 100644 --- a/lib/sparse-stream/sparse-write-stream.ts +++ b/lib/sparse-stream/sparse-write-stream.ts @@ -140,7 +140,7 @@ export class SparseWriteStream extends Writable implements SparseWritable { /** * @summary Write buffered data before a stream ends, called by stream internals */ - public _final(callback: (error?: Error | void) => void) { + public _final(callback: (error?: Error | null) => void) { asCallback(this.__final(), callback); } } diff --git a/lib/stream-limiter.ts b/lib/stream-limiter.ts index 0ea2f9a1..8558bfda 100644 --- a/lib/stream-limiter.ts +++ b/lib/stream-limiter.ts @@ -29,7 +29,7 @@ export class StreamLimiter extends Transform { public _transform( buffer: Buffer, _encoding: string, - callback: (error?: Error | null, data?: Buffer) => void, + callback: (error?: Error, data?: Buffer) => void, ) { const length = Math.min(buffer.length, this.maxBytes); if (length > 0) { diff --git a/lib/tmp.ts b/lib/tmp.ts index 148306e0..ec997df7 100644 --- a/lib/tmp.ts +++ b/lib/tmp.ts @@ -16,11 +16,10 @@ import { Disposer, resolve } from 'bluebird'; import { randomBytes } from 'crypto'; +import { promises as fs } from 'fs'; import { tmpdir } from 'os'; import { join } from 'path'; -import { close, open, unlink } from './fs'; - const TMP_RANDOM_BYTES = 6; const TMP_DIR = tmpdir(); const TRIES = 5; @@ -31,17 +30,17 @@ const randomFilePath = (): string => { export interface TmpFileResult { path: string; - fd?: number; + fileHandle?: fs.FileHandle; } export const tmpFile = async (keepOpen = true): Promise => { - let fd: number | undefined; + let fileHandle: fs.FileHandle | undefined; let path: string; let ok = false; for (let i = 0; i < TRIES; i++) { path = randomFilePath(); try { - fd = await open(path, 'wx+'); + fileHandle = await fs.open(path, 'wx+'); ok = true; break; } catch (error) { @@ -55,18 +54,18 @@ export const tmpFile = async (keepOpen = true): Promise => { `Could not generate a temporary filename in ${TRIES} tries`, ); } - if (!keepOpen && fd !== undefined) { - await close(fd); - fd = undefined; + if (!keepOpen && fileHandle !== undefined) { + await fileHandle.close(); + fileHandle = undefined; } - return { fd, path: path! }; + return { fileHandle, path: path! }; }; export const tmpFileDisposer = (keepOpen = true): Disposer => { return resolve(tmpFile(keepOpen)).disposer(async (result: TmpFileResult) => { - if (keepOpen && result.fd !== undefined) { - await close(result.fd); + if (keepOpen && result.fileHandle !== undefined) { + await result.fileHandle.close(); } - await unlink(result.path); + await fs.unlink(result.path); }); }; diff --git a/lib/utils.ts b/lib/utils.ts index 2307b25b..7288e465 100644 --- a/lib/utils.ts +++ b/lib/utils.ts @@ -84,7 +84,7 @@ export function difference(setA: Set, setB: Set): Set { export async function asCallback( promise: Promise, - callback: (error: Error | void, value?: T) => void, + callback: (error: Error | void | null, value?: T) => void, ): Promise { try { const value = await promise; diff --git a/package.json b/package.json index 272ba06b..781991c7 100644 --- a/package.json +++ b/package.json @@ -83,7 +83,7 @@ "@types/file-type": "^5.2.1", "@types/lodash": "^4.14.108", "@types/mocha": "^5.2.4", - "@types/node": "^8.10.59", + "@types/node": "^10.17.17", "@types/progress": "^2.0.1", "@types/sinon": "^5.0.1", "@types/yargs": "^11.0.0", diff --git a/tests/block-write-stream.spec.ts b/tests/block-write-stream.spec.ts index 249ba338..55c1e055 100644 --- a/tests/block-write-stream.spec.ts +++ b/tests/block-write-stream.spec.ts @@ -17,6 +17,7 @@ import { using } from 'bluebird'; import { expect } from 'chai'; import { randomFill } from 'crypto'; +import { promises as fs } from 'fs'; import 'mocha'; import * as os from 'os'; import { spy, stub } from 'sinon'; @@ -27,7 +28,6 @@ import { createBuffer } from '../lib/aligned-lockable-buffer'; import { BlockWriteStream } from '../lib/block-write-stream'; import { CHUNK_SIZE as BLOCK_WRITE_STREAM_CHUNK_SIZE } from '../lib/constants'; import * as diskpart from '../lib/diskpart'; -import { readFile } from '../lib/fs'; import { SparseWriteStream } from '../lib/sparse-stream/sparse-write-stream'; import { tmpFileDisposer, TmpFileResult } from '../lib/tmp'; import { blockDeviceFromFile, DEFAULT_IMAGE_TESTS_TIMEOUT } from './tester'; @@ -70,7 +70,7 @@ function bufferToSparseStream( } async function expectFileToContain(path: string, data: Buffer): Promise { - const fileData = await readFile(path); + const fileData = await fs.readFile(path); expect(fileData.slice(0, data.length)).to.deep.equal(data); } diff --git a/tests/directory.spec.ts b/tests/directory.spec.ts index dade959e..8bc3e092 100644 --- a/tests/directory.spec.ts +++ b/tests/directory.spec.ts @@ -36,6 +36,8 @@ describe('directory', function() { 'EISDIR: illegal operation on a directory, read', ); expect(error.code).to.equal('EISDIR'); + } finally { + await source.close(); } }); }); diff --git a/tests/get-inner-source.spec.ts b/tests/get-inner-source.spec.ts index 0ed22981..7241212d 100644 --- a/tests/get-inner-source.spec.ts +++ b/tests/get-inner-source.spec.ts @@ -48,8 +48,9 @@ describe('getInnerSource()', function() { expect(error.message).to.equal( 'Can not read a DmgSource from a ZipSource.', ); + } finally { + await source.close(); } - await source.close(); }); } diff --git a/tests/img.spec.ts b/tests/img.spec.ts index 74ee3650..1d656891 100644 --- a/tests/img.spec.ts +++ b/tests/img.spec.ts @@ -14,7 +14,7 @@ * limitations under the License. */ -import { createReadStream, createWriteStream } from 'fs'; +import { createReadStream, createWriteStream, promises as fs } from 'fs'; import 'mocha'; import { join } from 'path'; import { createGunzip } from 'zlib'; @@ -26,7 +26,6 @@ import { } from './tester'; import { sourceDestination } from '../lib'; -import { unlink } from '../lib/fs'; import { tmpFile } from '../lib/tmp'; const DATA_PATH = join(__dirname, 'data'); @@ -53,7 +52,7 @@ describe('img', function() { }); after(async function() { - await unlink(gunzippedFilePath as string); + await fs.unlink(gunzippedFilePath as string); }); testImage( diff --git a/tests/sparse.spec.ts b/tests/sparse.spec.ts index 3acbed77..4cc31029 100644 --- a/tests/sparse.spec.ts +++ b/tests/sparse.spec.ts @@ -102,6 +102,7 @@ describe('sparse streams', function() { verifierError.message === 'Checksum does not match for range [0, 134217727]: "wrong" != "4c754335"', ); + await destination.close(); }); // Test regular streams @@ -123,7 +124,9 @@ describe('sparse streams', function() { verifier.on('finish', resolve); verifier.run(); }); + await destination.close(); }); + await innerSource.close(); }); const checksumTypes: ChecksumType[] = [ @@ -225,6 +228,7 @@ describe('sparse streams', function() { assert(verifierError instanceof BlocksVerificationError); }, ); + await trimmedSource.close(); }); } } @@ -302,5 +306,6 @@ describe('sparse streams', function() { 'Checksum does not match for range [0, 16383]: "wrong" != "ce55029ab3dd4875edbf69fcc5d1942bb2abaf2cf88b87ae7016609b3feb5028"', ); }); + await innerSource.close(); }); }); diff --git a/tests/tester.ts b/tests/tester.ts index 707b7b0d..9d9b094d 100644 --- a/tests/tester.ts +++ b/tests/tester.ts @@ -15,13 +15,13 @@ */ import * as assert from 'assert'; import { expect } from 'chai'; +import { promises as fs } from 'fs'; import { entries } from 'lodash'; import 'mocha'; import { sourceDestination } from '../lib'; import { SourceSource } from '../lib/source-destination/source-source'; -import { stat } from '../lib/fs'; import { sparseStreamToBuffer, streamToBuffer } from '../lib/utils'; export type PartitionTableType = 'mbr' | 'gpt'; @@ -52,7 +52,7 @@ export async function blockDeviceFromFile( isSystem: false, description: 'some description', mountpoints: [], - size: (await stat(path)).size, + size: (await fs.stat(path)).size, isReadOnly: false, busType: 'UNKNOWN', error: null, @@ -98,12 +98,12 @@ export async function testImageNoIt( await innerSource.open(); } const sourceMetadata = await innerSource.getMetadata(); - const sourceStat = await stat(imagePath); + const sourceStat = await fs.stat(imagePath); const compareSource = new sourceDestination.File(compareToPath); await compareSource.open(); const compareMetadata = await compareSource.getMetadata(); - const compareStat = await stat(compareToPath); + const compareStat = await fs.stat(compareToPath); if (shouldHaveCompressedSize === true) { expect(sourceMetadata.compressedSize).to.equal(sourceStat.size); @@ -159,7 +159,8 @@ export async function testImageNoIt( } } - // TODO: close sources + await source.close(); + await compareSource.close(); } export function testImage( @@ -216,8 +217,9 @@ export function expectSourceSourceError( } catch (error) { expect(error).to.be.an.instanceof(Error); expect(error.message).to.equal(message); - await source.close(); return; + } finally { + await source.close(); } assert(false); }); diff --git a/tests/zip.spec.ts b/tests/zip.spec.ts index cf02f96b..494ef3e7 100644 --- a/tests/zip.spec.ts +++ b/tests/zip.spec.ts @@ -115,6 +115,8 @@ describe('zip support', function() { } catch (error) { expect(error).to.be.instanceof(Error); expect(error.message).to.equal(NO_MATCHING_FILE_MSG); + } finally { + await source.close(); } }); } diff --git a/tsconfig.json b/tsconfig.json index 562054b1..d0ee4178 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -5,10 +5,11 @@ "outDir": "build", "sourceMap": true, "declaration": true, - "target": "es2017", + "target": "es2018", "noImplicitAny": true, "noUnusedLocals": true, "noUnusedParameters": true, + "skipLibCheck": true, "strictNullChecks": true }, "include": [ From 4276cf59cf0d041d1d1f4bb6ac0bd8fbf6b25741 Mon Sep 17 00:00:00 2001 From: Alexis Svinartchouk Date: Tue, 31 Mar 2020 14:43:55 +0200 Subject: [PATCH 10/23] Address PR comments --- lib/block-read-stream.ts | 8 ++++++-- lib/block-transform-stream.ts | 6 +++--- lib/source-destination/dmg.ts | 1 + lib/source-destination/multi-destination.ts | 4 ++-- lib/sparse-stream/shared.ts | 2 +- lib/sparse-stream/sparse-read-stream.ts | 11 +++++------ lib/sparse-stream/sparse-transform-stream.ts | 16 ++++++++++------ lib/sparse-stream/sparse-write-stream.ts | 8 ++++---- lib/utils.ts | 8 ++------ 9 files changed, 34 insertions(+), 30 deletions(-) diff --git a/lib/block-read-stream.ts b/lib/block-read-stream.ts index f3aba57a..4e4cfcdf 100644 --- a/lib/block-read-stream.ts +++ b/lib/block-read-stream.ts @@ -101,8 +101,12 @@ export class BlockReadStream extends Readable { } try { const unlock = await buffer.lock(); - const { bytesRead } = await this.tryRead(buffer); - unlock(); + let bytesRead: number; + try { + ({ bytesRead } = await this.tryRead(buffer)); + } finally { + unlock(); + } this.bytesRead += bytesRead; if (bytesRead !== 0) { this.push(buffer.slice(0, bytesRead)); diff --git a/lib/block-transform-stream.ts b/lib/block-transform-stream.ts index 0796d079..8ea168dd 100644 --- a/lib/block-transform-stream.ts +++ b/lib/block-transform-stream.ts @@ -75,18 +75,18 @@ export class BlockTransformStream extends Transform { } } - public async _transform( + public _transform( chunk: Buffer, _encoding: string, callback: (error?: Error) => void, - ): Promise { + ) { this.bytesRead += chunk.length; this.inputBuffers.push(chunk); this.inputBytes += chunk.length; asCallback(this.writeBuffers(), callback); } - public async _flush(callback: (error?: Error) => void): Promise { + public _flush(callback: (error?: Error) => void) { asCallback(this.writeBuffers(true), callback); } diff --git a/lib/source-destination/dmg.ts b/lib/source-destination/dmg.ts index 54fcf407..2c712876 100644 --- a/lib/source-destination/dmg.ts +++ b/lib/source-destination/dmg.ts @@ -96,6 +96,7 @@ export class DmgSource extends SourceSource { alignment, numBuffers, }); + stream.on('error', transform.emit.bind(transform, 'error')); stream.pipe(transform); return transform; } else { diff --git a/lib/source-destination/multi-destination.ts b/lib/source-destination/multi-destination.ts index 46cee89d..0440b96b 100644 --- a/lib/source-destination/multi-destination.ts +++ b/lib/source-destination/multi-destination.ts @@ -324,13 +324,13 @@ export class MultiDestination extends SourceDestination { } public async createWriteStream( - ...args: any[] + ...args: Parameters ): Promise { return await this.createStream('createWriteStream', ...args); } public async createSparseWriteStream( - ...args: any[] + ...args: Parameters ): Promise { return await this.createStream('createSparseWriteStream', ...args); } diff --git a/lib/sparse-stream/shared.ts b/lib/sparse-stream/shared.ts index a6b88f2a..062e5eb3 100644 --- a/lib/sparse-stream/shared.ts +++ b/lib/sparse-stream/shared.ts @@ -55,7 +55,7 @@ export interface SparseWritable extends NodeJS.WritableStream { _write( chunk: SparseStreamChunk, encoding: string, - callback: (err?: Error | void | null) => void, + callback: (err?: Error | null) => void, ): void; } diff --git a/lib/sparse-stream/sparse-read-stream.ts b/lib/sparse-stream/sparse-read-stream.ts index a8b9b694..4284544c 100644 --- a/lib/sparse-stream/sparse-read-stream.ts +++ b/lib/sparse-stream/sparse-read-stream.ts @@ -21,7 +21,6 @@ import { isAlignedLockableBuffer, } from '../aligned-lockable-buffer'; import { SourceDestination } from '../source-destination/source-destination'; -import { noop } from '../utils'; import { BlocksWithChecksum, createSparseReaderStateIterator, @@ -102,7 +101,9 @@ export class SparseReadStream extends Readable implements SparseReadable { this.alignedReadableState !== undefined ? this.alignedReadableState.getCurrentBuffer().slice(0, length) : Buffer.allocUnsafe(length); - const unlock = isAlignedLockableBuffer(buffer) ? await buffer.lock() : noop; + const unlock = isAlignedLockableBuffer(buffer) + ? await buffer.lock() + : undefined; try { await this.source.read( buffer, @@ -110,11 +111,9 @@ export class SparseReadStream extends Readable implements SparseReadable { length, this.state.subBlock.offset + this.positionInBlock, ); - if (this.state.hasher !== undefined) { - this.state.hasher.update(buffer); - } + this.state.hasher?.update(buffer); } finally { - unlock(); + unlock?.(); } const chunk = { buffer, diff --git a/lib/sparse-stream/sparse-transform-stream.ts b/lib/sparse-stream/sparse-transform-stream.ts index ce5819e6..b02c8db6 100644 --- a/lib/sparse-stream/sparse-transform-stream.ts +++ b/lib/sparse-stream/sparse-transform-stream.ts @@ -19,6 +19,7 @@ import { Transform } from 'stream'; import { AlignedReadableState } from '../aligned-lockable-buffer'; import { PROGRESS_EMISSION_INTERVAL } from '../constants'; import { makeClassEmitProgressEvents } from '../source-destination/progress'; +import { asCallback } from '../utils'; import { BlocksWithChecksum, SparseReadable, @@ -54,11 +55,7 @@ export class SparseTransformStream extends Transform ); } - public async _transform( - chunk: SparseStreamChunk, - _encoding: string, - callback: (error?: Error) => void, - ): Promise { + private async __transform(chunk: SparseStreamChunk): Promise { this.position = chunk.position; // This will fail if a chunk buffer is larger than chunkSize passed to the constructor let buffer = this.alignedReadableState.getCurrentBuffer(); @@ -74,7 +71,14 @@ export class SparseTransformStream extends Transform this.push({ position: chunk.position, buffer }); this.bytesWritten += chunk.buffer.length; this.position += chunk.buffer.length; - callback(); + } + + public _transform( + chunk: SparseStreamChunk, + _encoding: string, + callback: (error?: Error) => void, + ) { + asCallback(this.__transform(chunk), callback); } } diff --git a/lib/sparse-stream/sparse-write-stream.ts b/lib/sparse-stream/sparse-write-stream.ts index 5550d2bc..5288a3f5 100644 --- a/lib/sparse-stream/sparse-write-stream.ts +++ b/lib/sparse-stream/sparse-write-stream.ts @@ -7,7 +7,7 @@ import { PROGRESS_EMISSION_INTERVAL, RETRY_BASE_TIMEOUT } from '../constants'; import { isTransientError } from '../errors'; import { makeClassEmitProgressEvents } from '../source-destination/progress'; import { SourceDestination } from '../source-destination/source-destination'; -import { asCallback, noop } from '../utils'; +import { asCallback } from '../utils'; import { SparseStreamChunk, SparseWritable } from './shared'; export class SparseWriteStream extends Writable implements SparseWritable { @@ -84,7 +84,7 @@ export class SparseWriteStream extends Writable implements SparseWritable { private async __write(chunk: SparseStreamChunk): Promise { const unlock = isAlignedLockableBuffer(chunk.buffer) ? await chunk.buffer.rlock() - : noop; + : undefined; try { // Keep the first blocks in memory and write them once the rest has been written. // This is to prevent Windows from mounting the device while we flash it. @@ -114,14 +114,14 @@ export class SparseWriteStream extends Writable implements SparseWritable { await this.writeChunk(chunk); } } finally { - unlock(); + unlock?.(); } } public _write( chunk: SparseStreamChunk, _enc: string, - callback: (error: Error | undefined) => void, + callback: (error: Error | null) => void, ): void { asCallback(this.__write(chunk), callback); } diff --git a/lib/utils.ts b/lib/utils.ts index 7288e465..1f08da42 100644 --- a/lib/utils.ts +++ b/lib/utils.ts @@ -84,16 +84,12 @@ export function difference(setA: Set, setB: Set): Set { export async function asCallback( promise: Promise, - callback: (error: Error | void | null, value?: T) => void, + callback: (error?: Error | null, value?: T) => void, ): Promise { try { const value = await promise; - callback(undefined, value); + callback(null, value); } catch (error) { callback(error); } } - -export function noop() { - // noop -} From d0053b938a1e2ff01f06ecb4f37b4e9ace751b18 Mon Sep 17 00:00:00 2001 From: Alexis Svinartchouk Date: Tue, 31 Mar 2020 15:30:44 +0200 Subject: [PATCH 11/23] Address PR comments --- lib/block-read-stream.ts | 2 +- lib/source-destination/multi-destination.ts | 14 ++++++++++- lib/utils.ts | 27 +++++++++++++++------ 3 files changed, 34 insertions(+), 9 deletions(-) diff --git a/lib/block-read-stream.ts b/lib/block-read-stream.ts index 4e4cfcdf..2c240fe6 100644 --- a/lib/block-read-stream.ts +++ b/lib/block-read-stream.ts @@ -101,7 +101,7 @@ export class BlockReadStream extends Readable { } try { const unlock = await buffer.lock(); - let bytesRead: number; + let bytesRead; try { ({ bytesRead } = await this.tryRead(buffer)); } finally { diff --git a/lib/source-destination/multi-destination.ts b/lib/source-destination/multi-destination.ts index 0440b96b..c4072cdb 100644 --- a/lib/source-destination/multi-destination.ts +++ b/lib/source-destination/multi-destination.ts @@ -253,9 +253,21 @@ export class MultiDestination extends SourceDestination { ); } + private async createStream( + methodName: 'createWriteStream', + ...args: Parameters + ): Promise; + + private async createStream( + methodName: 'createSparseWriteStream', + ...args: Parameters + ): Promise; + private async createStream( methodName: 'createWriteStream' | 'createSparseWriteStream', - ...args: any[] + ...args: + | Parameters + | Parameters ) { const passthrough = new PassThrough({ objectMode: methodName === 'createSparseWriteStream', diff --git a/lib/utils.ts b/lib/utils.ts index 1f08da42..05dea468 100644 --- a/lib/utils.ts +++ b/lib/utils.ts @@ -28,9 +28,12 @@ export async function streamToBuffer( let data: Buffer; if (isAlignedLockableBuffer(chunk)) { const unlock = await chunk.rlock(); - data = Buffer.allocUnsafe(chunk.length); - chunk.copy(data); - unlock(); + try { + data = Buffer.allocUnsafe(chunk.length); + chunk.copy(data); + } finally { + unlock(); + } } else { data = chunk; } @@ -54,10 +57,20 @@ export async function sparseStreamToBuffer( stream.on('end', resolve); stream.on('data', async (chunk: SparseStreamChunk) => { if (isAlignedLockableBuffer(chunk.buffer)) { - const unlock = await chunk.buffer.rlock(); - const data = Buffer.allocUnsafe(chunk.buffer.length); - chunk.buffer.copy(data); - unlock(); + let unlock; + try { + unlock = await chunk.buffer.rlock(); + } catch (error) { + reject(error); + return; + } + let data; + try { + data = Buffer.allocUnsafe(chunk.buffer.length); + chunk.buffer.copy(data); + } finally { + unlock(); + } chunk.buffer = data; } chunks.push(chunk); From de0826210d6a98cb69a4def83713e273a02aca5b Mon Sep 17 00:00:00 2001 From: Alexis Svinartchouk Date: Tue, 31 Mar 2020 19:29:46 +0200 Subject: [PATCH 12/23] Update blockmap to ^4.0.1 Change-type: patch --- package.json | 2 +- tsconfig.json | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/package.json b/package.json index 781991c7..ff45ff06 100644 --- a/package.json +++ b/package.json @@ -51,7 +51,7 @@ "dependencies": { "@ronomon/direct-io": "^3.0.1", "axios": "^0.18.0", - "blockmap": "^4.0.0", + "blockmap": "^4.0.1", "bluebird": "^3.5.1", "crc": "^3.8.0", "debug": "^3.1.0", diff --git a/tsconfig.json b/tsconfig.json index d0ee4178..54241054 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -9,7 +9,6 @@ "noImplicitAny": true, "noUnusedLocals": true, "noUnusedParameters": true, - "skipLibCheck": true, "strictNullChecks": true }, "include": [ From cc79d7881fb1f3bc63e54e1b01db9310cda9b6af Mon Sep 17 00:00:00 2001 From: Alexis Svinartchouk Date: Wed, 1 Apr 2020 12:32:25 +0200 Subject: [PATCH 13/23] File constructor takes an options object Change-type: major --- examples/balena-s3-configure.ts | 5 ++++- examples/file-to-file.ts | 11 +++++++---- examples/http-zip.ts | 5 ++++- examples/multi-destination.ts | 6 +++--- examples/usbboot.ts | 4 +++- lib/source-destination/block-device.ts | 2 +- lib/source-destination/file.ts | 6 +++++- tests/directory.spec.ts | 2 +- tests/dmg.spec.ts | 6 +++--- tests/get-inner-source.spec.ts | 14 +++++++++----- tests/single-use-stream-source.spec.ts | 2 +- tests/sparse.spec.ts | 17 ++++++++++------- tests/tester.ts | 8 ++++---- tests/zip.spec.ts | 4 +++- 14 files changed, 58 insertions(+), 34 deletions(-) diff --git a/examples/balena-s3-configure.ts b/examples/balena-s3-configure.ts index 150c5132..a560861d 100644 --- a/examples/balena-s3-configure.ts +++ b/examples/balena-s3-configure.ts @@ -49,7 +49,10 @@ const main = async ({ config !== undefined ? { config: await readJsonFile(config) } : undefined, ); } - const destination = new sourceDestination.File(fileDestination, true); + const destination = new sourceDestination.File({ + path: fileDestination, + write: true, + }); await pipeSourceToDestinationsWithProgressBar(source, [destination], verify); }; diff --git a/examples/file-to-file.ts b/examples/file-to-file.ts index a92e8ccf..3f7ac90c 100644 --- a/examples/file-to-file.ts +++ b/examples/file-to-file.ts @@ -31,10 +31,13 @@ const main = async ({ config, verify, }: any) => { - let source: sourceDestination.SourceDestination = new sourceDestination.File( - fileSource, - ); - const destination = new sourceDestination.File(fileDestination, true); + let source: sourceDestination.SourceDestination = new sourceDestination.File({ + path: fileSource, + }); + const destination = new sourceDestination.File({ + path: fileDestination, + write: true, + }); source = await source.getInnerSource(); const canRead = await source.canRead(); if (trim || config !== undefined) { diff --git a/examples/http-zip.ts b/examples/http-zip.ts index 9e1e99d9..8fd30f63 100644 --- a/examples/http-zip.ts +++ b/examples/http-zip.ts @@ -22,7 +22,10 @@ import { pipeSourceToDestinationsWithProgressBar, wrapper } from './utils'; const main = async ({ zipSource, fileDestination, verify }: any) => { const sourceHttp = new sourceDestination.Http(zipSource); - const destinationFile = new sourceDestination.File(fileDestination, true); + const destinationFile = new sourceDestination.File({ + path: fileDestination, + write: true, + }); const sourceZip = await sourceHttp.getInnerSource(); await pipeSourceToDestinationsWithProgressBar( sourceZip, diff --git a/examples/multi-destination.ts b/examples/multi-destination.ts index 13ac00e8..92027c8a 100644 --- a/examples/multi-destination.ts +++ b/examples/multi-destination.ts @@ -54,9 +54,9 @@ const main = async ({ await new Promise(resolve => { deviceScanner.on('ready', resolve); }); - let source: sourceDestination.SourceDestination = new sourceDestination.File( - sourceImage, - ); + let source: sourceDestination.SourceDestination = new sourceDestination.File({ + path: sourceImage, + }); source = await source.getInnerSource(); // getInnerSource will open the sources for you, no need to call open(). if (trim || config !== undefined) { source = new sourceDestination.ConfiguredSource( diff --git a/examples/usbboot.ts b/examples/usbboot.ts index c4ecbf3a..a7ad6778 100644 --- a/examples/usbboot.ts +++ b/examples/usbboot.ts @@ -87,7 +87,9 @@ async function main() { if (argv.length >= 3) { console.log(`Writing image ${argv[2]}`); let source: sourceDestination.SourceDestination = new sourceDestination.File( - argv[2], + { + path: argv[2], + }, ); if (await source.canRead()) { source = new sourceDestination.ConfiguredSource(source, true, true); diff --git a/lib/source-destination/block-device.ts b/lib/source-destination/block-device.ts index 11c7333d..b0df5e26 100644 --- a/lib/source-destination/block-device.ts +++ b/lib/source-destination/block-device.ts @@ -52,7 +52,7 @@ export class BlockDevice extends File implements AdapterSourceDestination { oWrite = false, public readonly oDirect = true, ) { - super(drive.raw, oWrite); + super({ path: drive.raw, write: oWrite }); this.alignment = drive.blockSize || DEFAULT_ALIGNMENT; } diff --git a/lib/source-destination/file.ts b/lib/source-destination/file.ts index ba5e44fb..313314b8 100644 --- a/lib/source-destination/file.ts +++ b/lib/source-destination/file.ts @@ -47,10 +47,14 @@ export const ProgressWriteStream = makeClassEmitProgressEvents( ); export class File extends SourceDestination { + public readonly path: string; + public readonly oWrite: boolean; protected fileHandle: fs.FileHandle; - constructor(public readonly path: string, public readonly oWrite = false) { + constructor({ path, write = false }: { path: string; write?: boolean }) { super(); + this.path = path; + this.oWrite = write; } protected getOpenFlags() { diff --git a/tests/directory.spec.ts b/tests/directory.spec.ts index 8bc3e092..e22a0d49 100644 --- a/tests/directory.spec.ts +++ b/tests/directory.spec.ts @@ -26,7 +26,7 @@ const IMAGES_PATH = join(DATA_PATH, 'images'); describe('directory', function() { it('should be rejected with an error', async function() { - const source = new sourceDestination.File(IMAGES_PATH); + const source = new sourceDestination.File({ path: IMAGES_PATH }); try { await source.getInnerSource(); assert(false); diff --git a/tests/dmg.spec.ts b/tests/dmg.spec.ts index 155be83c..ff333e65 100644 --- a/tests/dmg.spec.ts +++ b/tests/dmg.spec.ts @@ -54,9 +54,9 @@ describe('dmg support', function() { }); it('invalid dmg file', async function() { - const source = new sourceDestination.File( - join(DATA_PATH, 'unrecognized', 'invalid.dmg'), - ); + const source = new sourceDestination.File({ + path: join(DATA_PATH, 'unrecognized', 'invalid.dmg'), + }); await source.open(); const dmgSource = new sourceDestination.DmgSource(source); try { diff --git a/tests/get-inner-source.spec.ts b/tests/get-inner-source.spec.ts index 7241212d..1cd06155 100644 --- a/tests/get-inner-source.spec.ts +++ b/tests/get-inner-source.spec.ts @@ -27,7 +27,9 @@ const DATA_PATH = join(__dirname, 'data', 'nested'); describe('getInnerSource()', function() { for (const filename of ['data.img.zip', 'data.img.zip.gz.bz2.xz']) { it(`should work for ${filename}`, async function() { - const source = new sourceDestination.File(join(DATA_PATH, filename)); + const source = new sourceDestination.File({ + path: join(DATA_PATH, filename), + }); const innerSource = await source.getInnerSource(); const metadata = await innerSource.getMetadata(); const data = await streamToBuffer(await innerSource.createReadStream()); @@ -39,7 +41,9 @@ describe('getInnerSource()', function() { for (const filename of ['data.dmg.zip', 'data.dmg.zip.gz.bz2.xz']) { it(`should fail for ${filename}`, async function() { - const source = new sourceDestination.File(join(DATA_PATH, filename)); + const source = new sourceDestination.File({ + path: join(DATA_PATH, filename), + }); try { await source.getInnerSource(); assert(false); @@ -56,9 +60,9 @@ describe('getInnerSource()', function() { it(`should work for a raw image with a .dmg extension`, async function() { const filename = 'raw-image-not-a-dmg.dmg'; - const source = new sourceDestination.File( - join(__dirname, 'data', 'images', filename), - ); + const source = new sourceDestination.File({ + path: join(__dirname, 'data', 'images', filename), + }); const innerSource = await source.getInnerSource(); const metadata = await innerSource.getMetadata(); const data = await streamToBuffer(await innerSource.createReadStream()); diff --git a/tests/single-use-stream-source.spec.ts b/tests/single-use-stream-source.spec.ts index fd267a8b..31aacd95 100644 --- a/tests/single-use-stream-source.spec.ts +++ b/tests/single-use-stream-source.spec.ts @@ -48,7 +48,7 @@ describe('zip in a single use stream source', function() { await using(tmpFileDisposer(false), async file => { await multiWrite.pipeSourceToDestinations( source, - [new sourceDestination.File(file.path, true)], + [new sourceDestination.File({ path: file.path, write: true })], // onFail (_destination: sourceDestination.SourceDestination, _error: Error) => { assert(false); diff --git a/tests/sparse.spec.ts b/tests/sparse.spec.ts index 4cc31029..6744a0cc 100644 --- a/tests/sparse.spec.ts +++ b/tests/sparse.spec.ts @@ -41,7 +41,7 @@ describe('sparse streams', function() { this.timeout(DEFAULT_IMAGE_TESTS_TIMEOUT); it('dmgs, sparse streams and verifiers', async () => { - const source = new sourceDestination.File(DMG_PATH); + const source = new sourceDestination.File({ path: DMG_PATH }); const innerSource = await source.getInnerSource(); assert(innerSource instanceof sourceDestination.DmgSource); @@ -52,7 +52,7 @@ describe('sparse streams', function() { // Create a temporary destination file: await using(tmpFileDisposer(false), async ({ path }: { path: string }) => { - const destination = new sourceDestination.File(path, true); + const destination = new sourceDestination.File({ path, write: true }); await destination.open(); // Test sparse write stream const destinationStream = await destination.createSparseWriteStream(); @@ -108,7 +108,7 @@ describe('sparse streams', function() { // Test regular streams const sourceStream = await innerSource.createReadStream(); await using(tmpFileDisposer(false), async ({ path }: { path: string }) => { - const destination = new sourceDestination.File(path, true); + const destination = new sourceDestination.File({ path, write: true }); await destination.open(); const destinationStream = await destination.createWriteStream(); await new Promise((resolve, reject) => { @@ -140,7 +140,7 @@ describe('sparse streams', function() { for (const createStreamFromDisk of [false, true]) { for (const checksumType of checksumTypes) { it(`${checksumType} hasher, createStreamFromDisk=${createStreamFromDisk}, alignment=${alignment}`, async () => { - const source = new sourceDestination.File(DISK_PATH); + const source = new sourceDestination.File({ path: DISK_PATH }); const trimmedSource = new sourceDestination.ConfiguredSource( source, true, @@ -167,7 +167,10 @@ describe('sparse streams', function() { await using( tmpFileDisposer(false), async ({ path }: { path: string }) => { - const destination = new sourceDestination.File(path, true); + const destination = new sourceDestination.File({ + path, + write: true, + }); await destination.open(); // Test sparse write stream const destinationStream = await destination.createSparseWriteStream(); @@ -235,7 +238,7 @@ describe('sparse streams', function() { } it('blockmap in a zip file', async () => { - const source = new sourceDestination.File(ZIP_PATH); + const source = new sourceDestination.File({ path: ZIP_PATH }); const innerSource = await source.getInnerSource(); assert(innerSource instanceof sourceDestination.ZipSource); @@ -255,7 +258,7 @@ describe('sparse streams', function() { // Create a temporary destination file: await using(tmpFileDisposer(false), async ({ path }: { path: string }) => { - const destination = new sourceDestination.File(path, true); + const destination = new sourceDestination.File({ path, write: true }); await destination.open(); // Test sparse write stream const destinationStream = await destination.createSparseWriteStream(); diff --git a/tests/tester.ts b/tests/tester.ts index 9d9b094d..d0593763 100644 --- a/tests/tester.ts +++ b/tests/tester.ts @@ -86,7 +86,7 @@ export async function testImageNoIt( ): Promise { let source: sourceDestination.File | sourceDestination.BlockDevice; if (sourceClass === sourceDestination.File) { - source = new sourceDestination.File(imagePath); + source = new sourceDestination.File({ path: imagePath }); } else { source = await blockDeviceFromFile(imagePath); } @@ -100,7 +100,7 @@ export async function testImageNoIt( const sourceMetadata = await innerSource.getMetadata(); const sourceStat = await fs.stat(imagePath); - const compareSource = new sourceDestination.File(compareToPath); + const compareSource = new sourceDestination.File({ path: compareToPath }); await compareSource.open(); const compareMetadata = await compareSource.getMetadata(); const compareStat = await fs.stat(compareToPath); @@ -209,7 +209,7 @@ export function expectSourceSourceError( message: string, ) { it(testName, async function() { - const source = new sourceDestination.File(filePath); + const source = new sourceDestination.File({ path: filePath }); await source.open(); const innerSource = new Cls(source); try { @@ -231,7 +231,7 @@ export function expectGetInnerSourceError( message: string, ) { it(testName, async function() { - const source = new sourceDestination.File(filePath); + const source = new sourceDestination.File({ path: filePath }); try { await source.getInnerSource(); } catch (error) { diff --git a/tests/zip.spec.ts b/tests/zip.spec.ts index 494ef3e7..d187be83 100644 --- a/tests/zip.spec.ts +++ b/tests/zip.spec.ts @@ -105,7 +105,9 @@ describe('zip support', function() { for (const preferStreamSource of [false, true]) { it(`should fail to read from a zip file containing no archive (use stream=${preferStreamSource})`, async () => { const source = new sourceDestination.ZipSource( - new sourceDestination.File(join(ZIP_PATH, 'zip-directory-empty.zip')), + new sourceDestination.File({ + path: join(ZIP_PATH, 'zip-directory-empty.zip'), + }), preferStreamSource, () => false, // Don't match any filename ); From 56ccb38b8ae59d759bcb879a2151a633cea9579f Mon Sep 17 00:00:00 2001 From: Alexis Svinartchouk Date: Wed, 1 Apr 2020 12:48:27 +0200 Subject: [PATCH 14/23] BlockDevice constructor takes an options argument Change-type: major --- lib/scanner/adapters/block-device.ts | 12 ++++++------ lib/source-destination/block-device.ts | 25 ++++++++++++++++++------- tests/tester.ts | 7 ++++++- 3 files changed, 30 insertions(+), 14 deletions(-) diff --git a/lib/scanner/adapters/block-device.ts b/lib/scanner/adapters/block-device.ts index 69fa8ea9..e8df8d15 100644 --- a/lib/scanner/adapters/block-device.ts +++ b/lib/scanner/adapters/block-device.ts @@ -115,12 +115,12 @@ export class BlockDeviceAdapter extends Adapter { } for (const added of difference(newDevices, oldDevices)) { const drive = drives.get(added); - const blockDevice = new BlockDevice( - drive!, - this.unmountOnSuccess, - this.oWrite, - this.oDirect, - ); + const blockDevice = new BlockDevice({ + drive: drive!, + unmountOnSuccess: this.unmountOnSuccess, + write: this.oWrite, + direct: this.oDirect, + }); this.emit('attach', blockDevice); this.drives.set(added, blockDevice); } diff --git a/lib/source-destination/block-device.ts b/lib/source-destination/block-device.ts index b0df5e26..eb650e9d 100644 --- a/lib/source-destination/block-device.ts +++ b/lib/source-destination/block-device.ts @@ -43,16 +43,27 @@ const UNMOUNT_ON_SUCCESS_TIMEOUT_MS = 2000; const WIN32_FIRST_BYTES_TO_KEEP = 64 * 1024; export class BlockDevice extends File implements AdapterSourceDestination { + private drive: DrivelistDrive; + private unmountOnSuccess: boolean; + public readonly oDirect: boolean; public emitsProgress = false; public readonly alignment: number; - constructor( - private drive: DrivelistDrive, - private unmountOnSuccess = false, - oWrite = false, - public readonly oDirect = true, - ) { - super({ path: drive.raw, write: oWrite }); + constructor({ + drive, + unmountOnSuccess = false, + write = false, + direct = true, + }: { + drive: DrivelistDrive; + unmountOnSuccess?: boolean; + write?: boolean; + direct?: boolean; + }) { + super({ path: drive.raw, write }); + this.drive = drive; + this.unmountOnSuccess = unmountOnSuccess; + this.oDirect = direct; this.alignment = drive.blockSize || DEFAULT_ALIGNMENT; } diff --git a/tests/tester.ts b/tests/tester.ts index d0593763..78bcb8f5 100644 --- a/tests/tester.ts +++ b/tests/tester.ts @@ -67,7 +67,12 @@ export async function blockDeviceFromFile( isVirtual: false, logicalBlockSize: 512, }; - return new FakeBlockDevice(drive, false, true, false); + return new FakeBlockDevice({ + drive, + unmountOnSuccess: false, + write: true, + direct: false, + }); } export async function testImageNoIt( From 0478382e0a6547ca0dbec6232e3e88732e6fbe1d Mon Sep 17 00:00:00 2001 From: Alexis Svinartchouk Date: Wed, 1 Apr 2020 13:35:08 +0200 Subject: [PATCH 15/23] ConfiguredSource constructor takes an options argument Change-type: major --- examples/balena-s3-configure.ts | 15 +++++--- examples/file-to-file.ts | 17 +++++---- examples/multi-destination.ts | 15 +++++--- examples/usbboot.ts | 6 ++- .../configured-source/configured-source.ts | 37 ++++++++++++++----- tests/sparse.spec.ts | 10 ++--- 6 files changed, 63 insertions(+), 37 deletions(-) diff --git a/examples/balena-s3-configure.ts b/examples/balena-s3-configure.ts index a560861d..a4f6bb89 100644 --- a/examples/balena-s3-configure.ts +++ b/examples/balena-s3-configure.ts @@ -41,13 +41,16 @@ const main = async ({ buildId, ); if (trim || config !== undefined) { - source = new sourceDestination.ConfiguredSource( + source = new sourceDestination.ConfiguredSource({ source, - trim, - false, - config !== undefined ? 'legacy' : undefined, - config !== undefined ? { config: await readJsonFile(config) } : undefined, - ); + shouldTrimPartitions: trim, + createStreamFromDisk: false, + configure: config !== undefined ? 'legacy' : undefined, + config: + config !== undefined + ? { config: await readJsonFile(config) } + : undefined, + }); } const destination = new sourceDestination.File({ path: fileDestination, diff --git a/examples/file-to-file.ts b/examples/file-to-file.ts index 3f7ac90c..0454fa09 100644 --- a/examples/file-to-file.ts +++ b/examples/file-to-file.ts @@ -46,15 +46,16 @@ const main = async ({ "Can't configure or trim a source that is not randomly readable, skipping", ); } else { - source = new sourceDestination.ConfiguredSource( + source = new sourceDestination.ConfiguredSource({ source, - trim, - true, // create stream from disk (not from stream) - config !== undefined ? 'legacy' : undefined, - config !== undefined - ? { config: await readJsonFile(config) } - : undefined, - ); + shouldTrimPartitions: trim, + createStreamFromDisk: true, + configure: config !== undefined ? 'legacy' : undefined, + config: + config !== undefined + ? { config: await readJsonFile(config) } + : undefined, + }); } } await pipeSourceToDestinationsWithProgressBar(source, [destination], verify); diff --git a/examples/multi-destination.ts b/examples/multi-destination.ts index 92027c8a..dd50ec6f 100644 --- a/examples/multi-destination.ts +++ b/examples/multi-destination.ts @@ -59,13 +59,16 @@ const main = async ({ }); source = await source.getInnerSource(); // getInnerSource will open the sources for you, no need to call open(). if (trim || config !== undefined) { - source = new sourceDestination.ConfiguredSource( + source = new sourceDestination.ConfiguredSource({ source, - trim, - true, - config !== undefined ? 'legacy' : undefined, - config !== undefined ? { config: await readJsonFile(config) } : undefined, - ); + shouldTrimPartitions: trim, + createStreamFromDisk: true, + configure: config !== undefined ? 'legacy' : undefined, + config: + config !== undefined + ? { config: await readJsonFile(config) } + : undefined, + }); } const destinationDrives = Array.from(deviceScanner.drives.values()).filter( drive => { diff --git a/examples/usbboot.ts b/examples/usbboot.ts index a7ad6778..c4333f3a 100644 --- a/examples/usbboot.ts +++ b/examples/usbboot.ts @@ -92,7 +92,11 @@ async function main() { }, ); if (await source.canRead()) { - source = new sourceDestination.ConfiguredSource(source, true, true); + source = new sourceDestination.ConfiguredSource({ + source, + shouldTrimPartitions: true, + createStreamFromDisk: true, + }); } pipeSourceToDestinationsWithProgressBar(source, [dest], true); } diff --git a/lib/source-destination/configured-source/configured-source.ts b/lib/source-destination/configured-source/configured-source.ts index df113be5..a69cf70c 100644 --- a/lib/source-destination/configured-source/configured-source.ts +++ b/lib/source-destination/configured-source/configured-source.ts @@ -87,20 +87,37 @@ export class SourceDisk extends Disk { } export class ConfiguredSource extends SourceSource { + private shouldTrimPartitions: boolean; + private createStreamFromDisk: boolean; + private config: any; + private checksumType: ChecksumType; + private chunkSize: number; private disk: SourceDisk; private configure?: ConfigureFunction; - constructor( - // source needs to implement read and createReadStream - source: SourceDestination, - private shouldTrimPartitions: boolean, - private createStreamFromDisk: boolean, - configure?: ConfigureFunction | 'legacy', - private config?: any, - private checksumType: ChecksumType = 'xxhash64', - private chunkSize = CHUNK_SIZE, - ) { + constructor({ + source, // source needs to implement read and createReadStream + shouldTrimPartitions, + createStreamFromDisk, + configure, + config, + checksumType = 'xxhash64', + chunkSize = CHUNK_SIZE, + }: { + source: SourceDestination; + shouldTrimPartitions: boolean; + createStreamFromDisk: boolean; + configure?: ConfigureFunction | 'legacy'; + config?: any; + checksumType?: ChecksumType; + chunkSize?: number; + }) { super(source); + this.shouldTrimPartitions = shouldTrimPartitions; + this.createStreamFromDisk = createStreamFromDisk; + this.config = config; + this.checksumType = checksumType; + this.chunkSize = chunkSize; this.disk = new SourceDisk(source); if (configure === 'legacy') { this.configure = legacyConfigure; diff --git a/tests/sparse.spec.ts b/tests/sparse.spec.ts index 6744a0cc..1e9e59b0 100644 --- a/tests/sparse.spec.ts +++ b/tests/sparse.spec.ts @@ -141,15 +141,13 @@ describe('sparse streams', function() { for (const checksumType of checksumTypes) { it(`${checksumType} hasher, createStreamFromDisk=${createStreamFromDisk}, alignment=${alignment}`, async () => { const source = new sourceDestination.File({ path: DISK_PATH }); - const trimmedSource = new sourceDestination.ConfiguredSource( + const trimmedSource = new sourceDestination.ConfiguredSource({ source, - true, + shouldTrimPartitions: true, createStreamFromDisk, - undefined, - undefined, checksumType, - alignment, - ); + chunkSize: alignment, + }); await trimmedSource.open(); const sourceSparseStream = await trimmedSource.createSparseReadStream( { generateChecksums: true }, From 16016bb1a477ac0d7874785ee2ed321808ba9dee Mon Sep 17 00:00:00 2001 From: Alexis Svinartchouk Date: Wed, 1 Apr 2020 16:17:27 +0200 Subject: [PATCH 16/23] Update udif to ^0.17.0 Change-type: patch --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index ff45ff06..580a72af 100644 --- a/package.json +++ b/package.json @@ -68,7 +68,7 @@ "resin-image-fs": "^5.0.8", "rwmutex": "^1.0.0", "speedometer": "^1.0.0", - "udif": "^0.15.7", + "udif": "^0.17.0", "unbzip2-stream": "balena-io-modules/unbzip2-stream#942fc218013c14adab01cf693b0500cf6ac83193", "unzip-stream": "^0.3.0", "xxhash": "^0.3.0", From 4133b2f94d90d7d35d3d50cd8f2980a112523262 Mon Sep 17 00:00:00 2001 From: Alexis Svinartchouk Date: Wed, 1 Apr 2020 16:25:07 +0200 Subject: [PATCH 17/23] Update lzma-native to ^6.0.0 Change-type: patch --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 580a72af..73dff910 100644 --- a/package.json +++ b/package.json @@ -59,7 +59,7 @@ "file-disk": "^6.0.1", "file-type": "^8.0.0", "lodash": "^4.17.10", - "lzma-native": "^4.0.5", + "lzma-native": "^6.0.0", "mountutils": "^1.3.18", "node-raspberrypi-usbboot": "^0.2.4", "outdent": "^0.7.0", From 436a5af3f87ad4ffae460a3e88b92423cb1c4d4b Mon Sep 17 00:00:00 2001 From: Alexis Svinartchouk Date: Wed, 1 Apr 2020 16:32:50 +0200 Subject: [PATCH 18/23] Stop using readable-stream Change-type: patch --- lib/block-read-stream.ts | 2 +- lib/block-transform-stream.ts | 2 +- lib/block-write-stream.ts | 2 +- lib/source-destination/zip.ts | 2 +- lib/sparse-stream/sparse-filter-stream.ts | 2 +- lib/sparse-stream/sparse-read-stream.ts | 2 +- lib/sparse-stream/sparse-write-stream.ts | 2 +- lib/stream-limiter.ts | 2 +- package.json | 1 - typings/readable-stream/index.d.ts | 17 ----------------- typings/udif/index.d.ts | 2 +- 11 files changed, 9 insertions(+), 27 deletions(-) delete mode 100644 typings/readable-stream/index.d.ts diff --git a/lib/block-read-stream.ts b/lib/block-read-stream.ts index 2c240fe6..a1317c40 100644 --- a/lib/block-read-stream.ts +++ b/lib/block-read-stream.ts @@ -16,7 +16,7 @@ import { delay } from 'bluebird'; import { ReadResult } from 'file-disk'; -import { Readable } from 'readable-stream'; +import { Readable } from 'stream'; import { AlignedReadableState } from './aligned-lockable-buffer'; import { diff --git a/lib/block-transform-stream.ts b/lib/block-transform-stream.ts index 8ea168dd..703caa36 100644 --- a/lib/block-transform-stream.ts +++ b/lib/block-transform-stream.ts @@ -14,7 +14,7 @@ * limitations under the License. */ -import { Transform } from 'readable-stream'; +import { Transform } from 'stream'; import { AlignedReadableState } from './aligned-lockable-buffer'; import { CHUNK_SIZE } from './constants'; diff --git a/lib/block-write-stream.ts b/lib/block-write-stream.ts index 3c4a0c9e..7d4282c9 100644 --- a/lib/block-write-stream.ts +++ b/lib/block-write-stream.ts @@ -17,7 +17,7 @@ import { getAlignedBuffer } from '@ronomon/direct-io'; import { delay } from 'bluebird'; import * as _debug from 'debug'; -import { Writable } from 'readable-stream'; +import { Writable } from 'stream'; import { AlignedLockableBuffer } from './aligned-lockable-buffer'; import { PROGRESS_EMISSION_INTERVAL, RETRY_BASE_TIMEOUT } from './constants'; diff --git a/lib/source-destination/zip.ts b/lib/source-destination/zip.ts index 34b06986..e785ad2a 100644 --- a/lib/source-destination/zip.ts +++ b/lib/source-destination/zip.ts @@ -18,7 +18,7 @@ import { BlockMap, Range } from 'blockmap'; import { fromCallback } from 'bluebird'; import { sortBy } from 'lodash'; import { posix } from 'path'; -import { PassThrough } from 'readable-stream'; +import { PassThrough } from 'stream'; import { ZipStreamEntry } from 'unzip-stream'; import { Entry, diff --git a/lib/sparse-stream/sparse-filter-stream.ts b/lib/sparse-stream/sparse-filter-stream.ts index 6e8e9510..b169b2ef 100644 --- a/lib/sparse-stream/sparse-filter-stream.ts +++ b/lib/sparse-stream/sparse-filter-stream.ts @@ -14,7 +14,7 @@ * limitations under the License. */ -import { Transform } from 'readable-stream'; +import { Transform } from 'stream'; import { BlocksWithChecksum, diff --git a/lib/sparse-stream/sparse-read-stream.ts b/lib/sparse-stream/sparse-read-stream.ts index 4284544c..c669c481 100644 --- a/lib/sparse-stream/sparse-read-stream.ts +++ b/lib/sparse-stream/sparse-read-stream.ts @@ -14,7 +14,7 @@ * limitations under the License. */ -import { Readable } from 'readable-stream'; +import { Readable } from 'stream'; import { AlignedReadableState, diff --git a/lib/sparse-stream/sparse-write-stream.ts b/lib/sparse-stream/sparse-write-stream.ts index 5288a3f5..02b1a29b 100644 --- a/lib/sparse-stream/sparse-write-stream.ts +++ b/lib/sparse-stream/sparse-write-stream.ts @@ -1,6 +1,6 @@ import { getAlignedBuffer } from '@ronomon/direct-io'; import { delay } from 'bluebird'; -import { Writable } from 'readable-stream'; +import { Writable } from 'stream'; import { isAlignedLockableBuffer } from '../aligned-lockable-buffer'; import { PROGRESS_EMISSION_INTERVAL, RETRY_BASE_TIMEOUT } from '../constants'; diff --git a/lib/stream-limiter.ts b/lib/stream-limiter.ts index 8558bfda..a69df6e6 100644 --- a/lib/stream-limiter.ts +++ b/lib/stream-limiter.ts @@ -14,7 +14,7 @@ * limitations under the License. */ -import { Transform } from 'readable-stream'; +import { Transform } from 'stream'; import zlib = require('zlib'); import { getRootStream } from './source-destination/compressed-source'; diff --git a/package.json b/package.json index 73dff910..6f79da94 100644 --- a/package.json +++ b/package.json @@ -64,7 +64,6 @@ "node-raspberrypi-usbboot": "^0.2.4", "outdent": "^0.7.0", "partitioninfo": "^5.3.4", - "readable-stream": "^2.3.6", "resin-image-fs": "^5.0.8", "rwmutex": "^1.0.0", "speedometer": "^1.0.0", diff --git a/typings/readable-stream/index.d.ts b/typings/readable-stream/index.d.ts deleted file mode 100644 index 96b8390a..00000000 --- a/typings/readable-stream/index.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -declare module 'readable-stream' { - import { EventEmitter } from 'events'; - import { - PassThrough as NodeJSPassThrough, - Readable as NodeJSReadable, - Transform as NodeJSTransform, - Writable as NodeJSWritable, - } from 'stream'; - - export class PassThrough extends NodeJSPassThrough {} - - export class Readable extends NodeJSReadable {} - - export class Transform extends NodeJSTransform {} - - export class Writable extends NodeJSWritable {} -} diff --git a/typings/udif/index.d.ts b/typings/udif/index.d.ts index 01f1fecf..b0dc9800 100644 --- a/typings/udif/index.d.ts +++ b/typings/udif/index.d.ts @@ -1,5 +1,5 @@ declare module 'udif' { - import { Readable } from 'readable-stream'; + import { Readable } from 'stream'; // Not the same as ../lib/sparse-stream/sparse-read-stream/SparseReadStream // (no 'blocks' attribute) From 7c588aace8654e81f225943a14af15fac2c04f96 Mon Sep 17 00:00:00 2001 From: Alexis Svinartchouk Date: Wed, 1 Apr 2020 16:46:28 +0200 Subject: [PATCH 19/23] Remove unneeded @ts-ignore comment --- lib/stream-limiter.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/stream-limiter.ts b/lib/stream-limiter.ts index a69df6e6..d66e542a 100644 --- a/lib/stream-limiter.ts +++ b/lib/stream-limiter.ts @@ -37,7 +37,6 @@ export class StreamLimiter extends Transform { } this.maxBytes -= length; if (this.maxBytes === 0) { - // @ts-ignore this.stream.unpipe(this); this.push(null); this.emit('finish'); From f021668c9d5f123e3de592277433f75c61a3d45c Mon Sep 17 00:00:00 2001 From: Alexis Svinartchouk Date: Thu, 2 Apr 2020 18:28:28 +0200 Subject: [PATCH 20/23] Retry incomplete reads Change-type: patch --- lib/source-destination/block-device.ts | 3 +- lib/source-destination/file.ts | 47 +++++++++++++++++--- lib/source-destination/source-destination.ts | 35 ++++++++++++--- 3 files changed, 72 insertions(+), 13 deletions(-) diff --git a/lib/source-destination/block-device.ts b/lib/source-destination/block-device.ts index eb650e9d..8a7d1758 100644 --- a/lib/source-destination/block-device.ts +++ b/lib/source-destination/block-device.ts @@ -77,8 +77,7 @@ export class BlockDevice extends File implements AdapterSourceDestination { // tslint:disable:no-bitwise let flags = super.getOpenFlags(); if (this.oDirect) { - flags |= - fs.constants.O_DIRECT | fs.constants.O_SYNC | fs.constants.O_NONBLOCK; + flags |= fs.constants.O_DIRECT | fs.constants.O_SYNC; } if (this.oWrite) { flags |= platform() === 'linux' ? fs.constants.O_EXCL : O_EXLOCK; diff --git a/lib/source-destination/file.ts b/lib/source-destination/file.ts index 313314b8..efb0871a 100644 --- a/lib/source-destination/file.ts +++ b/lib/source-destination/file.ts @@ -46,6 +46,8 @@ export const ProgressWriteStream = makeClassEmitProgressEvents( PROGRESS_EMISSION_INTERVAL, ); +const READ_TRIES = 5; + export class File extends SourceDestination { public readonly path: string; public readonly oWrite: boolean; @@ -94,12 +96,47 @@ export class File extends SourceDestination { length: number, sourceOffset: number, ): Promise { - return await this.fileHandle.read( - buffer, - bufferOffset, - length, - sourceOffset, + // In very rare occasions (happened on Linux with node 12 reading from a block device: O_DIRECT + O_SYNC into an aligned buffer), + // the read does not read the whole required length (up to 4KiB can be missing at the end of 1MiB reads). + // This was checked by filling the buffer with a specific pattern before reading and looking for this pattern + // in the buffer after the read. + // To mitigate this, we write a specific marker at the end of the buffer before reading and retry the read if + // it is still there after reading. + let result; + let tries = READ_TRIES; + const readEndMarker = Buffer.from(`not the correct data ${sourceOffset}`); + const markerPosition = bufferOffset + length - readEndMarker.length; + if (length >= readEndMarker.length) { + readEndMarker.copy(buffer, markerPosition); + } + do { + if (tries < READ_TRIES) { + console.warn('Incomptete read', { + path: this.path, + bufferOffset, + length, + sourceOffset, + bufferLength: buffer.length, + }); + } + result = await this.fileHandle.read( + buffer, + bufferOffset, + length, + sourceOffset, + ); + tries -= 1; + } while ( + tries > 0 && + length >= readEndMarker.length && + result.bytesRead === length && + readEndMarker.compare( + buffer, + markerPosition, + markerPosition + readEndMarker.length, + ) === 0 ); + return result; } public async write( diff --git a/lib/source-destination/source-destination.ts b/lib/source-destination/source-destination.ts index 8ae64d87..f1fc475a 100644 --- a/lib/source-destination/source-destination.ts +++ b/lib/source-destination/source-destination.ts @@ -14,6 +14,7 @@ * limitations under the License. */ +import { fromCallback } from 'bluebird'; import { EventEmitter } from 'events'; import { ReadResult, WriteResult } from 'file-disk'; import * as fileType from 'file-type'; @@ -22,6 +23,10 @@ import { extname } from 'path'; import { arch } from 'process'; import { Stream as HashStream } from 'xxhash'; +import { + AlignedLockableBuffer, + isAlignedLockableBuffer, +} from '../aligned-lockable-buffer'; import { CHUNK_SIZE, PROGRESS_EMISSION_INTERVAL, @@ -32,7 +37,7 @@ import { BlocksWithChecksum, SparseReadable } from '../sparse-stream/shared'; import { SparseWritable } from '../sparse-stream/shared'; import { SparseFilterStream } from '../sparse-stream/sparse-filter-stream'; import { SparseReadStream } from '../sparse-stream/sparse-read-stream'; -import { streamToBuffer } from '../utils'; +import { asCallback, streamToBuffer } from '../utils'; import { Metadata } from './metadata'; import { @@ -47,11 +52,29 @@ const BITS = arch === 'x64' || arch === 'aarch64' ? 64 : 32; export class CountingHashStream extends HashStream { public bytesWritten = 0; - public _transform(chunk: Buffer, encoding: string, callback: () => void) { - super._transform(chunk, encoding, () => { - callback(); - this.bytesWritten += chunk.length; - }); + public async __transform( + chunk: Buffer | AlignedLockableBuffer, + encoding: string, + ): Promise { + const unlock = isAlignedLockableBuffer(chunk) + ? await chunk.rlock() + : undefined; + try { + await fromCallback((callback: (error?: Error) => void) => { + super._transform(chunk, encoding, callback); + }); + } finally { + unlock?.(); + } + this.bytesWritten += chunk.length; + } + + public _transform( + chunk: Buffer | AlignedLockableBuffer, + encoding: string, + callback: (error?: Error) => void, + ) { + asCallback(this.__transform(chunk, encoding), callback); } } From da2fa24c26549963fdbeb9b0bc4de502ee1961cf Mon Sep 17 00:00:00 2001 From: Alexis Svinartchouk Date: Tue, 7 Apr 2020 15:50:16 +0200 Subject: [PATCH 21/23] Don't use O_EXLOCK on Windows Change-type: patch --- lib/source-destination/block-device.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/source-destination/block-device.ts b/lib/source-destination/block-device.ts index 8a7d1758..7df62345 100644 --- a/lib/source-destination/block-device.ts +++ b/lib/source-destination/block-device.ts @@ -80,7 +80,13 @@ export class BlockDevice extends File implements AdapterSourceDestination { flags |= fs.constants.O_DIRECT | fs.constants.O_SYNC; } if (this.oWrite) { - flags |= platform() === 'linux' ? fs.constants.O_EXCL : O_EXLOCK; + const plat = platform(); + if (plat === 'linux') { + flags |= fs.constants.O_EXCL; + } else if (plat === 'darwin') { + flags |= O_EXLOCK; + } + // TODO: use O_EXCLOCK on windows too (getting EBUSY errors with it) } // tslint:enable:no-bitwise return flags; From c6e0990a91cb17e335b847ca9545112971b714fd Mon Sep 17 00:00:00 2001 From: Alexis Svinartchouk Date: Tue, 7 Apr 2020 17:25:47 +0200 Subject: [PATCH 22/23] Use setF_NOCACHE on macos for block devices Change-type: patch --- lib/source-destination/block-device.ts | 12 +++++++++--- typings/ronomon__direct-io/index.d.ts | 5 +++++ 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/lib/source-destination/block-device.ts b/lib/source-destination/block-device.ts index 7df62345..9685eae3 100644 --- a/lib/source-destination/block-device.ts +++ b/lib/source-destination/block-device.ts @@ -14,8 +14,8 @@ * limitations under the License. */ -import { getAlignedBuffer, O_EXLOCK } from '@ronomon/direct-io'; -import { delay } from 'bluebird'; +import { getAlignedBuffer, O_EXLOCK, setF_NOCACHE } from '@ronomon/direct-io'; +import { delay, fromCallback } from 'bluebird'; import { Drive as DrivelistDrive } from 'drivelist'; import { ReadResult, WriteResult } from 'file-disk'; import * as fs from 'fs'; @@ -163,12 +163,18 @@ export class BlockDevice extends File implements AdapterSourceDestination { } protected async _open(): Promise { - if (platform() !== 'win32') { + const plat = platform(); + if (plat !== 'win32') { const unmountDisk = getUnmountDisk(); await unmountDisk(this.drive.device); } await clean(this.drive.device); await super._open(); + if (plat === 'darwin') { + await fromCallback(cb => { + setF_NOCACHE(this.fileHandle.fd, 1, cb); + }); + } } protected async _close(): Promise { diff --git a/typings/ronomon__direct-io/index.d.ts b/typings/ronomon__direct-io/index.d.ts index e620094b..5404535c 100644 --- a/typings/ronomon__direct-io/index.d.ts +++ b/typings/ronomon__direct-io/index.d.ts @@ -2,4 +2,9 @@ declare module '@ronomon/direct-io' { const O_EXLOCK: number; function getAlignedBuffer(size: number, alignment: number): Buffer; + function setF_NOCACHE( + fd: number, + value: 0 | 1, + callback: (error?: Error) => void, + ): void; } From 3d0724a96886f4f68a8f480bb2dd889df2569bbe Mon Sep 17 00:00:00 2001 From: Alexis Svinartchouk Date: Tue, 7 Apr 2020 14:45:54 +0200 Subject: [PATCH 23/23] Update generated docs Change-type: patch --- doc/README.md | 343 ++++------ doc/classes/adapter.md | 86 ++- doc/classes/alignedreadablestate.md | 14 +- doc/classes/balenas3source.md | 160 +++-- doc/classes/blockdevice.md | 198 +++--- doc/classes/blockdeviceadapter.md | 125 ++-- doc/classes/blockreadstream.md | 468 ++++++++------ doc/classes/blocksverificationerror.md | 8 +- doc/classes/blocktransformstream.md | 561 ++++++++++------- doc/classes/blockwritestream.md | 456 ++++++++------ doc/classes/bzip2source.md | 146 +++-- doc/classes/checksumverificationerror.md | 8 +- doc/classes/compressedsource.md | 146 +++-- doc/classes/configuredsource.md | 184 ++++-- doc/classes/countinghashstream.md | 584 ++++++++++------- doc/classes/countingwritable.md | 448 +++++++------ doc/classes/crc32hasher.md | 8 +- doc/classes/dmgsource.md | 144 +++-- doc/classes/driverlessdevice.md | 158 +++-- doc/classes/driverlessdeviceadapter_.md | 100 ++- doc/classes/file.md | 160 +++-- doc/classes/gzipsource.md | 146 +++-- doc/classes/http.md | 150 +++-- doc/classes/multidestination.md | 177 ++++-- doc/classes/multidestinationerror.md | 6 +- doc/classes/multidestinationverifier.md | 104 ++- doc/classes/randomaccesszipsource.md | 164 +++-- doc/classes/scanner.md | 98 ++- doc/classes/singleusestreamsource.md | 140 +++-- doc/classes/sourcedestination.md | 146 +++-- doc/classes/sourcedestinationfs.md | 12 +- doc/classes/sourcedisk.md | 12 +- doc/classes/sourcerandomaccessreader.md | 88 ++- doc/classes/sourcesource.md | 140 +++-- doc/classes/sparsefilterstream.md | 576 ++++++++++------- doc/classes/sparsereadstream.md | 482 ++++++++------ doc/classes/sparsestreamverifier.md | 100 ++- doc/classes/sparsetransformstream.md | 591 +++++++++++------- doc/classes/sparsewritestream.md | 470 ++++++++------ doc/classes/streamlimiter.md | 560 ++++++++++------- doc/classes/streamverifier.md | 102 ++- doc/classes/streamzipsource.md | 146 +++-- doc/classes/usbbootdeviceadapter.md | 96 ++- doc/classes/usbbootdrive.md | 164 +++-- doc/classes/verificationerror.md | 2 +- doc/classes/verifier.md | 94 ++- doc/classes/xzsource.md | 146 +++-- doc/classes/zipsource.md | 150 +++-- doc/interfaces/adaptersourcedestination.md | 150 +++-- doc/interfaces/alignedlockablebuffer.md | 165 ++--- doc/interfaces/block.md | 4 +- doc/interfaces/blockswithchecksum.md | 6 +- doc/interfaces/createreadstreamoptions.md | 10 +- .../createsparsereadstreamoptions.md | 6 +- doc/interfaces/drivelistdrive.md | 4 +- doc/interfaces/execresult.md | 4 +- doc/interfaces/metadata.md | 36 +- doc/interfaces/multidestinationprogress.md | 36 +- doc/interfaces/multidestinationstate.md | 24 +- doc/interfaces/operation.md | 4 +- .../pipesourcetodestinationsresult.md | 4 +- doc/interfaces/progressevent.md | 6 +- doc/interfaces/sourcetransform.md | 558 ++++++++++------- doc/interfaces/sparsereadable.md | 119 +++- doc/interfaces/sparsereaderstate.md | 6 +- doc/interfaces/sparsestreamchunk.md | 4 +- doc/interfaces/sparsewritable.md | 92 ++- doc/interfaces/tmpfileresult.md | 10 +- doc/interfaces/wificonfig.md | 12 +- 69 files changed, 6712 insertions(+), 4115 deletions(-) diff --git a/doc/README.md b/doc/README.md index 30501000..625e9e49 100644 --- a/doc/README.md +++ b/doc/README.md @@ -115,6 +115,7 @@ * [ProgressSparseWriteStream](README.md#const-progresssparsewritestream) * [ProgressWritable](README.md#const-progresswritable) * [ProgressWriteStream](README.md#const-progresswritestream) +* [READ_TRIES](README.md#const-read_tries) * [RETRY_BASE_TIMEOUT](README.md#const-retry_base_timeout) * [RWMutex](README.md#rwmutex) * [SCAN_INTERVAL](README.md#const-scan_interval) @@ -125,28 +126,19 @@ * [USBBOOT_RPI_COMPUTE_MODULE_NAMES](README.md#const-usbboot_rpi_compute_module_names) * [WIN32_FIRST_BYTES_TO_KEEP](README.md#const-win32_first_bytes_to_keep) * [XXHASH_SEED](README.md#const-xxhash_seed) -* [close](README.md#const-close) * [debug](README.md#const-debug) -* [fstat](README.md#const-fstat) -* [fsync](README.md#const-fsync) * [getCrc](README.md#const-getcrc) * [getRaspberrypiUsbboot](README.md#const-getraspberrypiusbboot) * [getUnmountDisk](README.md#const-getunmountdisk) * [getXXHash](README.md#const-getxxhash) -* [open](README.md#const-open) * [parseFileIndexAsync](README.md#const-parsefileindexasync) -* [read](README.md#const-read) -* [readFile](README.md#const-readfile) * [speedometer](README.md#speedometer) -* [stat](README.md#const-stat) * [unbzip2Stream](README.md#unbzip2stream) -* [unlink](README.md#const-unlink) -* [write](README.md#const-write) -* [writeFile](README.md#const-writefile) * [zlib](README.md#zlib) ### Functions +* [alignedLockableBufferSlice](README.md#alignedlockablebufferslice) * [asCallback](README.md#ascallback) * [attachMutex](README.md#attachmutex) * [blockmapToBlocks](README.md#blockmaptoblocks) @@ -177,7 +169,6 @@ * [makeClassEmitProgressEvents](README.md#makeclassemitprogressevents) * [matchSupportedExtensions](README.md#matchsupportedextensions) * [nmWifiConfig](README.md#const-nmwificonfig) -* [noop](README.md#noop) * [pad](README.md#const-pad) * [pipeRegularSourceToDestination](README.md#piperegularsourcetodestination) * [pipeSourceToDestinations](README.md#pipesourcetodestinations) @@ -201,7 +192,7 @@ Ƭ **AnyHasher**: *[CRC32Hasher](classes/crc32hasher.md) | Hash | XXHash | XXHash64* -*Defined in [lib/sparse-stream/shared.ts:75](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/sparse-stream/shared.ts#L75)* +*Defined in [lib/sparse-stream/shared.ts:75](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/sparse-stream/shared.ts#L75)* ___ @@ -209,7 +200,7 @@ ___ Ƭ **ChecksumType**: *"crc32" | "sha1" | "sha256" | "xxhash32" | "xxhash64"* -*Defined in [lib/sparse-stream/shared.ts:26](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/sparse-stream/shared.ts#L26)* +*Defined in [lib/sparse-stream/shared.ts:26](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/sparse-stream/shared.ts#L26)* ___ @@ -217,7 +208,7 @@ ___ Ƭ **ConfigureFunction**: *function* -*Defined in [lib/source-destination/configured-source/configured-source.ts:45](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/configured-source/configured-source.ts#L45)* +*Defined in [lib/source-destination/configured-source/configured-source.ts:45](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/configured-source/configured-source.ts#L45)* #### Type declaration: @@ -236,7 +227,7 @@ ___ Ƭ **Constructor**: *object* -*Defined in [lib/source-destination/progress.ts:25](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/progress.ts#L25)* +*Defined in [lib/source-destination/progress.ts:25](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/progress.ts#L25)* #### Type declaration: @@ -246,7 +237,7 @@ ___ Ƭ **Name**: *"balena" | "resin"* -*Defined in [lib/source-destination/balena-s3-source.ts:28](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/balena-s3-source.ts#L28)* +*Defined in [lib/source-destination/balena-s3-source.ts:28](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/balena-s3-source.ts#L28)* ___ @@ -254,7 +245,7 @@ ___ Ƭ **OnFailFunction**: *function* -*Defined in [lib/multi-write.ts:60](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/multi-write.ts#L60)* +*Defined in [lib/multi-write.ts:60](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/multi-write.ts#L60)* #### Type declaration: @@ -273,7 +264,7 @@ ___ Ƭ **OnProgressFunction**: *function* -*Defined in [lib/multi-write.ts:65](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/multi-write.ts#L65)* +*Defined in [lib/multi-write.ts:65](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/multi-write.ts#L65)* #### Type declaration: @@ -291,7 +282,7 @@ ___ Ƭ **OperationCommand**: *"configure" | "copy"* -*Defined in [lib/source-destination/configured-source/configure.ts:28](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/configured-source/configure.ts#L28)* +*Defined in [lib/source-destination/configured-source/configure.ts:28](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/configured-source/configure.ts#L28)* ___ @@ -299,7 +290,7 @@ ___ Ƭ **WriteStep**: *"flashing" | "verifying" | "finished"* -*Defined in [lib/multi-write.ts:34](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/multi-write.ts#L34)* +*Defined in [lib/multi-write.ts:34](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/multi-write.ts#L34)* ___ @@ -307,7 +298,7 @@ ___ Ƭ **XXHash**: *typeof xxhash* -*Defined in [lib/lazy.ts:21](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/lazy.ts#L21)* +*Defined in [lib/lazy.ts:21](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/lazy.ts#L21)* ## Variables @@ -315,7 +306,7 @@ ___ • **BITS**: *64 | 32* = arch === 'x64' || arch === 'aarch64' ? 64 : 32 -*Defined in [lib/source-destination/source-destination.ts:45](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L45)* +*Defined in [lib/source-destination/source-destination.ts:50](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L50)* ___ @@ -323,7 +314,7 @@ ___ • **CHUNK_SIZE**: *number* = 1024 ** 2 -*Defined in [lib/constants.ts:19](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/constants.ts#L19)* +*Defined in [lib/constants.ts:19](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/constants.ts#L19)* ___ @@ -331,7 +322,7 @@ ___ • **DEFAULT_ALIGNMENT**: *512* = 512 -*Defined in [lib/constants.ts:23](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/constants.ts#L23)* +*Defined in [lib/constants.ts:23](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/constants.ts#L23)* ___ @@ -339,7 +330,7 @@ ___ • **DISKPART_DELAY**: *2000* = 2000 -*Defined in [lib/diskpart.ts:27](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/diskpart.ts#L27)* +*Defined in [lib/diskpart.ts:27](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/diskpart.ts#L27)* ___ @@ -347,7 +338,7 @@ ___ • **DISKPART_RETRIES**: *5* = 5 -*Defined in [lib/diskpart.ts:28](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/diskpart.ts#L28)* +*Defined in [lib/diskpart.ts:28](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/diskpart.ts#L28)* ___ @@ -355,7 +346,7 @@ ___ • **DriverlessDeviceAdapter**: *undefined | [DriverlessDeviceAdapter$](classes/driverlessdeviceadapter_.md)* = platform === 'win32' ? DriverlessDeviceAdapter$ : undefined -*Defined in [lib/scanner/adapters/driverless.ts:105](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/scanner/adapters/driverless.ts#L105)* +*Defined in [lib/scanner/adapters/driverless.ts:105](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/scanner/adapters/driverless.ts#L105)* ___ @@ -363,7 +354,7 @@ ___ • **ISIZE_LENGTH**: *4* = 4 -*Defined in [lib/source-destination/gzip.ts:23](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/gzip.ts#L23)* +*Defined in [lib/source-destination/gzip.ts:23](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/gzip.ts#L23)* ___ @@ -371,7 +362,7 @@ ___ • **MBR_LAST_PRIMARY_PARTITION**: *4* = 4 -*Defined in [lib/source-destination/configured-source/configure.ts:36](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/configured-source/configure.ts#L36)* +*Defined in [lib/source-destination/configured-source/configure.ts:36](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/configured-source/configure.ts#L36)* ___ @@ -386,7 +377,7 @@ ___ 'routeMetric', ] -*Defined in [lib/source-destination/configured-source/operations/configure.ts:23](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/configured-source/operations/configure.ts#L23)* +*Defined in [lib/source-destination/configured-source/operations/configure.ts:23](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/configured-source/operations/configure.ts#L23)* ___ @@ -394,7 +385,7 @@ ___ • **NO_MATCHING_FILE_MSG**: *"Can't find a matching file in this zip archive"* = "Can't find a matching file in this zip archive" -*Defined in [lib/constants.ts:20](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/constants.ts#L20)* +*Defined in [lib/constants.ts:20](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/constants.ts#L20)* ___ @@ -402,7 +393,7 @@ ___ • **PARTITION_FIELDS**: *string[]* = ['partition', 'to.partition', 'from.partition'] -*Defined in [lib/source-destination/configured-source/configure.ts:35](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/configured-source/configure.ts#L35)* +*Defined in [lib/source-destination/configured-source/configure.ts:35](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/configured-source/configure.ts#L35)* ___ @@ -410,7 +401,7 @@ ___ • **PATTERN**: *RegExp‹›* = /PHYSICALDRIVE(\d+)/i -*Defined in [lib/diskpart.ts:29](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/diskpart.ts#L29)* +*Defined in [lib/diskpart.ts:29](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/diskpart.ts#L29)* ___ @@ -418,7 +409,7 @@ ___ • **PROGRESS_EMISSION_INTERVAL**: *number* = 1000 / 2 -*Defined in [lib/constants.ts:17](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/constants.ts#L17)* +*Defined in [lib/constants.ts:17](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/constants.ts#L17)* ___ @@ -431,7 +422,7 @@ ___ PROGRESS_EMISSION_INTERVAL, ) -*Defined in [lib/block-read-stream.ts:118](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/block-read-stream.ts#L118)* +*Defined in [lib/block-read-stream.ts:122](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/block-read-stream.ts#L122)* ___ @@ -444,7 +435,7 @@ ___ PROGRESS_EMISSION_INTERVAL, ) -*Defined in [lib/block-write-stream.ts:124](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/block-write-stream.ts#L124)* +*Defined in [lib/block-write-stream.ts:124](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/block-write-stream.ts#L124)* ___ @@ -457,7 +448,7 @@ ___ PROGRESS_EMISSION_INTERVAL, ) -*Defined in [lib/source-destination/source-destination.ts:58](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L58)* +*Defined in [lib/source-destination/source-destination.ts:81](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L81)* ___ @@ -470,7 +461,7 @@ ___ PROGRESS_EMISSION_INTERVAL, ) -*Defined in [lib/source-destination/file.ts:36](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/file.ts#L36)* +*Defined in [lib/source-destination/file.ts:35](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/file.ts#L35)* ___ @@ -483,7 +474,7 @@ ___ PROGRESS_EMISSION_INTERVAL, ) -*Defined in [lib/sparse-stream/sparse-transform-stream.ts:81](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/sparse-stream/sparse-transform-stream.ts#L81)* +*Defined in [lib/sparse-stream/sparse-transform-stream.ts:85](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/sparse-stream/sparse-transform-stream.ts#L85)* ___ @@ -496,7 +487,7 @@ ___ PROGRESS_EMISSION_INTERVAL, ) -*Defined in [lib/sparse-stream/sparse-write-stream.ts:148](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/sparse-stream/sparse-write-stream.ts#L148)* +*Defined in [lib/sparse-stream/sparse-write-stream.ts:148](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/sparse-stream/sparse-write-stream.ts#L148)* ___ @@ -509,7 +500,7 @@ ___ PROGRESS_EMISSION_INTERVAL, ) -*Defined in [lib/source-destination/progress.ts:110](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/progress.ts#L110)* +*Defined in [lib/source-destination/progress.ts:110](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/progress.ts#L110)* ___ @@ -522,7 +513,15 @@ ___ PROGRESS_EMISSION_INTERVAL, ) -*Defined in [lib/source-destination/file.ts:43](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/file.ts#L43)* +*Defined in [lib/source-destination/file.ts:42](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/file.ts#L42)* + +___ + +### `Const` READ_TRIES + +• **READ_TRIES**: *5* = 5 + +*Defined in [lib/source-destination/file.ts:49](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/file.ts#L49)* ___ @@ -530,7 +529,7 @@ ___ • **RETRY_BASE_TIMEOUT**: *100* = 100 -*Defined in [lib/constants.ts:18](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/constants.ts#L18)* +*Defined in [lib/constants.ts:18](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/constants.ts#L18)* ___ @@ -538,7 +537,7 @@ ___ • **RWMutex**: *[RWMutex](README.md#rwmutex)* -*Defined in [lib/aligned-lockable-buffer.ts:2](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/aligned-lockable-buffer.ts#L2)* +*Defined in [lib/aligned-lockable-buffer.ts:2](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/aligned-lockable-buffer.ts#L2)* ___ @@ -546,9 +545,9 @@ ___ • **SCAN_INTERVAL**: *1000* = 1000 -*Defined in [lib/scanner/adapters/block-device.ts:27](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/scanner/adapters/block-device.ts#L27)* +*Defined in [lib/scanner/adapters/block-device.ts:27](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/scanner/adapters/block-device.ts#L27)* -*Defined in [lib/scanner/adapters/driverless.ts:26](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/scanner/adapters/driverless.ts#L26)* +*Defined in [lib/scanner/adapters/driverless.ts:26](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/scanner/adapters/driverless.ts#L26)* ___ @@ -556,7 +555,7 @@ ___ • **TMP_DIR**: *string* = tmpdir() -*Defined in [lib/tmp.ts:25](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/tmp.ts#L25)* +*Defined in [lib/tmp.ts:24](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/tmp.ts#L24)* ___ @@ -564,7 +563,7 @@ ___ • **TMP_RANDOM_BYTES**: *6* = 6 -*Defined in [lib/tmp.ts:24](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/tmp.ts#L24)* +*Defined in [lib/tmp.ts:23](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/tmp.ts#L23)* ___ @@ -572,7 +571,7 @@ ___ • **TRIES**: *5* = 5 -*Defined in [lib/tmp.ts:26](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/tmp.ts#L26)* +*Defined in [lib/tmp.ts:25](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/tmp.ts#L25)* ___ @@ -580,7 +579,7 @@ ___ • **UNMOUNT_ON_SUCCESS_TIMEOUT_MS**: *2000* = 2000 -*Defined in [lib/source-destination/block-device.ts:42](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/block-device.ts#L42)* +*Defined in [lib/source-destination/block-device.ts:42](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/block-device.ts#L42)* **`summary`** Time, in milliseconds, to wait before unmounting on success @@ -598,7 +597,7 @@ ___ 'Linux File-Stor Gadget Media', ] -*Defined in [lib/scanner/adapters/block-device.ts:28](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/scanner/adapters/block-device.ts#L28)* +*Defined in [lib/scanner/adapters/block-device.ts:28](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/scanner/adapters/block-device.ts#L28)* ___ @@ -606,7 +605,7 @@ ___ • **WIN32_FIRST_BYTES_TO_KEEP**: *number* = 64 * 1024 -*Defined in [lib/source-destination/block-device.ts:43](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/block-device.ts#L43)* +*Defined in [lib/source-destination/block-device.ts:43](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/block-device.ts#L43)* ___ @@ -614,15 +613,7 @@ ___ • **XXHASH_SEED**: *1163150152* = 1163150152 -*Defined in [lib/constants.ts:22](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/constants.ts#L22)* - -___ - -### `Const` close - -• **close**: *__promisify__* = promisify(fs.close) - -*Defined in [lib/fs.ts:20](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/fs.ts#L20)* +*Defined in [lib/constants.ts:22](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/constants.ts#L22)* ___ @@ -630,31 +621,15 @@ ___ • **debug**: *IDebugger* = _debug('etcher-sdk:configured-source') -*Defined in [lib/diskpart.ts:25](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/diskpart.ts#L25)* - -*Defined in [lib/block-write-stream.ts:29](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/block-write-stream.ts#L29)* - -*Defined in [lib/scanner/adapters/block-device.ts:25](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/scanner/adapters/block-device.ts#L25)* - -*Defined in [lib/scanner/scanner.ts:22](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/scanner/scanner.ts#L22)* - -*Defined in [lib/source-destination/configured-source/configured-source.ts:43](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/configured-source/configured-source.ts#L43)* - -___ - -### `Const` fstat - -• **fstat**: *__promisify__* = promisify(fs.fstat) +*Defined in [lib/diskpart.ts:25](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/diskpart.ts#L25)* -*Defined in [lib/fs.ts:21](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/fs.ts#L21)* +*Defined in [lib/block-write-stream.ts:29](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/block-write-stream.ts#L29)* -___ - -### `Const` fsync +*Defined in [lib/scanner/adapters/block-device.ts:25](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/scanner/adapters/block-device.ts#L25)* -• **fsync**: *__promisify__* = promisify(fs.fsync) +*Defined in [lib/scanner/scanner.ts:22](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/scanner/scanner.ts#L22)* -*Defined in [lib/fs.ts:22](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/fs.ts#L22)* +*Defined in [lib/source-destination/configured-source/configured-source.ts:43](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/configured-source/configured-source.ts#L43)* ___ @@ -662,7 +637,7 @@ ___ • **getCrc**: *(Anonymous function)* = once(() => require('crc') as typeof import('crc')) -*Defined in [lib/lazy.ts:39](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/lazy.ts#L39)* +*Defined in [lib/lazy.ts:39](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/lazy.ts#L39)* ___ @@ -676,7 +651,7 @@ ___ } }) -*Defined in [lib/lazy.ts:23](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/lazy.ts#L23)* +*Defined in [lib/lazy.ts:23](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/lazy.ts#L23)* ___ @@ -686,7 +661,7 @@ ___ promisify((require('mountutils') as typeof import('mountutils')).unmountDisk), ) -*Defined in [lib/lazy.ts:35](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/lazy.ts#L35)* +*Defined in [lib/lazy.ts:35](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/lazy.ts#L35)* ___ @@ -696,15 +671,7 @@ ___ () => require('xxhash') as typeof import('xxhash'), ) -*Defined in [lib/lazy.ts:31](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/lazy.ts#L31)* - -___ - -### `Const` open - -• **open**: *__promisify__* = promisify(fs.open) - -*Defined in [lib/fs.ts:23](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/fs.ts#L23)* +*Defined in [lib/lazy.ts:31](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/lazy.ts#L31)* ___ @@ -712,7 +679,7 @@ ___ • **parseFileIndexAsync**: *function* = promisify(parseFileIndex) -*Defined in [lib/source-destination/xz.ts:24](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/xz.ts#L24)* +*Defined in [lib/source-destination/xz.ts:24](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/xz.ts#L24)* #### Type declaration: @@ -726,35 +693,11 @@ Name | Type | ___ -### `Const` read - -• **read**: *__promisify__* = promisify(fs.read) - -*Defined in [lib/fs.ts:24](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/fs.ts#L24)* - -___ - -### `Const` readFile - -• **readFile**: *__promisify__* = promisify(fs.readFile) - -*Defined in [lib/fs.ts:25](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/fs.ts#L25)* - -___ - ### speedometer • **speedometer**: *[speedometer](README.md#speedometer)* -*Defined in [lib/source-destination/progress.ts:21](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/progress.ts#L21)* - -___ - -### `Const` stat - -• **stat**: *__promisify__* = promisify(fs.stat) - -*Defined in [lib/fs.ts:26](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/fs.ts#L26)* +*Defined in [lib/source-destination/progress.ts:21](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/progress.ts#L21)* ___ @@ -762,47 +705,41 @@ ___ • **unbzip2Stream**: *[unbzip2Stream](README.md#unbzip2stream)* -*Defined in [lib/source-destination/bzip2.ts:18](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/bzip2.ts#L18)* +*Defined in [lib/source-destination/bzip2.ts:18](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/bzip2.ts#L18)* ___ -### `Const` unlink - -• **unlink**: *__promisify__* = promisify(fs.unlink) +### zlib -*Defined in [lib/fs.ts:27](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/fs.ts#L27)* +• **zlib**: *"zlib"* -___ +*Defined in [lib/stream-limiter.ts:18](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/stream-limiter.ts#L18)* -### `Const` write +## Functions -• **write**: *__promisify__* = promisify(fs.write) +### alignedLockableBufferSlice -*Defined in [lib/fs.ts:28](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/fs.ts#L28)* +▸ **alignedLockableBufferSlice**(`this`: [AlignedLockableBuffer](interfaces/alignedlockablebuffer.md), `start?`: undefined | number, `end?`: undefined | number): *[AlignedLockableBuffer](interfaces/alignedlockablebuffer.md)‹›* -___ +*Defined in [lib/aligned-lockable-buffer.ts:11](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/aligned-lockable-buffer.ts#L11)* -### `Const` writeFile +**Parameters:** -• **writeFile**: *__promisify__* = promisify(fs.writeFile) +Name | Type | +------ | ------ | +`this` | [AlignedLockableBuffer](interfaces/alignedlockablebuffer.md) | +`start?` | undefined | number | +`end?` | undefined | number | -*Defined in [lib/fs.ts:29](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/fs.ts#L29)* +**Returns:** *[AlignedLockableBuffer](interfaces/alignedlockablebuffer.md)‹›* ___ -### zlib - -• **zlib**: *"zlib"* - -*Defined in [lib/stream-limiter.ts:18](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/stream-limiter.ts#L18)* - -## Functions - ### asCallback ▸ **asCallback**<**T**>(`promise`: Promise‹T›, `callback`: function): *Promise‹void›* -*Defined in [lib/utils.ts:85](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/utils.ts#L85)* +*Defined in [lib/utils.ts:98](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/utils.ts#L98)* **Type parameters:** @@ -814,13 +751,13 @@ ___ ▪ **callback**: *function* -▸ (`error`: [Error](classes/notcapable.md#static-error) | void, `value?`: T): *void* +▸ (`error?`: [Error](classes/notcapable.md#static-error) | null, `value?`: T): *void* **Parameters:** Name | Type | ------ | ------ | -`error` | [Error](classes/notcapable.md#static-error) | void | +`error?` | [Error](classes/notcapable.md#static-error) | null | `value?` | T | **Returns:** *Promise‹void›* @@ -829,17 +766,23 @@ ___ ### attachMutex -▸ **attachMutex**(`buf`: [Buffer](interfaces/alignedlockablebuffer.md#buffer), `mutex`: [RWMutex](README.md#rwmutex), `alignment`: number): *[AlignedLockableBuffer](interfaces/alignedlockablebuffer.md)* +▸ **attachMutex**(`buf`: [Buffer](interfaces/alignedlockablebuffer.md#buffer), `alignment`: number, `lock`: function, `rlock`: function): *[AlignedLockableBuffer](interfaces/alignedlockablebuffer.md)* -*Defined in [lib/aligned-lockable-buffer.ts:11](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/aligned-lockable-buffer.ts#L11)* +*Defined in [lib/aligned-lockable-buffer.ts:20](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/aligned-lockable-buffer.ts#L20)* **Parameters:** -Name | Type | ------- | ------ | -`buf` | [Buffer](interfaces/alignedlockablebuffer.md#buffer) | -`mutex` | [RWMutex](README.md#rwmutex) | -`alignment` | number | +▪ **buf**: *[Buffer](interfaces/alignedlockablebuffer.md#buffer)* + +▪ **alignment**: *number* + +▪ **lock**: *function* + +▸ (): *Promise‹function›* + +▪ **rlock**: *function* + +▸ (): *Promise‹function›* **Returns:** *[AlignedLockableBuffer](interfaces/alignedlockablebuffer.md)* @@ -849,7 +792,7 @@ ___ ▸ **blockmapToBlocks**(`blockmap`: BlockMap): *[BlocksWithChecksum](interfaces/blockswithchecksum.md)[]* -*Defined in [lib/source-destination/zip.ts:51](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/zip.ts#L51)* +*Defined in [lib/source-destination/zip.ts:51](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/zip.ts#L51)* **Parameters:** @@ -865,7 +808,7 @@ ___ ▸ **blocksLength**(`blocks`: [BlocksWithChecksum](interfaces/blockswithchecksum.md)[]): *number* -*Defined in [lib/sparse-stream/shared.ts:139](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/sparse-stream/shared.ts#L139)* +*Defined in [lib/sparse-stream/shared.ts:139](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/sparse-stream/shared.ts#L139)* **Parameters:** @@ -881,7 +824,7 @@ ___ ▸ **blocksVerificationErrorMessage**(`blocksWithChecksum`: [BlocksWithChecksum](interfaces/blockswithchecksum.md), `checksum`: string): *string* -*Defined in [lib/errors.ts:37](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/errors.ts#L37)* +*Defined in [lib/errors.ts:37](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/errors.ts#L37)* **Parameters:** @@ -898,7 +841,7 @@ ___ ▸ **clean**(`device`: string): *Promise‹void›* -*Defined in [lib/diskpart.ts:86](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/diskpart.ts#L86)* +*Defined in [lib/diskpart.ts:86](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/diskpart.ts#L86)* **`summary`** Clean a device's partition tables @@ -921,7 +864,7 @@ ___ ▸ **configure**(`disk`: Disk, `options`: object): *Promise‹void›* -*Defined in [lib/source-destination/configured-source/configure.ts:87](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/configured-source/configure.ts#L87)* +*Defined in [lib/source-destination/configured-source/configure.ts:87](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/configured-source/configure.ts#L87)* **Parameters:** @@ -941,7 +884,7 @@ ___ ▸ **copy**(`sourceFs`: AsyncFsLike, `sourcePath`: string, `destinationFs`: AsyncFsLike, `destinationPath`: string): *Promise‹void›* -*Defined in [lib/source-destination/configured-source/operations/copy.ts:22](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/configured-source/operations/copy.ts#L22)* +*Defined in [lib/source-destination/configured-source/operations/copy.ts:22](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/configured-source/operations/copy.ts#L22)* **Parameters:** @@ -960,7 +903,7 @@ ___ ▸ **createBuffer**(`size`: number, `alignment`: number): *[AlignedLockableBuffer](interfaces/alignedlockablebuffer.md)* -*Defined in [lib/aligned-lockable-buffer.ts:28](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/aligned-lockable-buffer.ts#L28)* +*Defined in [lib/aligned-lockable-buffer.ts:34](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/aligned-lockable-buffer.ts#L34)* **Parameters:** @@ -977,7 +920,7 @@ ___ ▸ **createHasher**(`checksumType?`: [ChecksumType](README.md#checksumtype)): *undefined | [AnyHasher](README.md#anyhasher)* -*Defined in [lib/sparse-stream/shared.ts:77](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/sparse-stream/shared.ts#L77)* +*Defined in [lib/sparse-stream/shared.ts:77](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/sparse-stream/shared.ts#L77)* **Parameters:** @@ -993,7 +936,7 @@ ___ ▸ **createNetworkConfigFiles**(`networks`: any): *object* -*Defined in [lib/source-destination/configured-source/operations/configure.ts:95](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/configured-source/operations/configure.ts#L95)* +*Defined in [lib/source-destination/configured-source/operations/configure.ts:95](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/configured-source/operations/configure.ts#L95)* **Parameters:** @@ -1021,7 +964,7 @@ ___ ▸ **createSparseReaderStateIterator**(`blocks`: [BlocksWithChecksum](interfaces/blockswithchecksum.md)[], `verify`: boolean, `generateChecksums`: boolean): *Iterator‹[SparseReaderState](interfaces/sparsereaderstate.md)›* -*Defined in [lib/sparse-stream/shared.ts:97](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/sparse-stream/shared.ts#L97)* +*Defined in [lib/sparse-stream/shared.ts:97](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/sparse-stream/shared.ts#L97)* **Parameters:** @@ -1039,7 +982,7 @@ ___ ▸ **difference**<**T**>(`setA`: Set‹T›, `setB`: Set‹T›): *Set‹T›* -*Defined in [lib/utils.ts:77](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/utils.ts#L77)* +*Defined in [lib/utils.ts:90](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/utils.ts#L90)* **Type parameters:** @@ -1060,7 +1003,7 @@ ___ ▸ **driveKey**(`drive`: $Drive): *string* -*Defined in [lib/scanner/adapters/block-device.ts:47](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/scanner/adapters/block-device.ts#L47)* +*Defined in [lib/scanner/adapters/block-device.ts:47](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/scanner/adapters/block-device.ts#L47)* **Parameters:** @@ -1076,7 +1019,7 @@ ___ ▸ **execFileAsync**(`command`: string, `args`: string[], `options`: ExecFileOptions): *Promise‹[ExecResult](interfaces/execresult.md)›* -*Defined in [lib/diskpart.ts:36](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/diskpart.ts#L36)* +*Defined in [lib/diskpart.ts:36](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/diskpart.ts#L36)* **Parameters:** @@ -1094,7 +1037,7 @@ ___ ▸ **execute**(`operation`: any, `disk`: Disk): *Promise‹void›* -*Defined in [lib/source-destination/configured-source/operations/configure.ts:114](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/configured-source/operations/configure.ts#L114)* +*Defined in [lib/source-destination/configured-source/operations/configure.ts:114](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/configured-source/operations/configure.ts#L114)* **Parameters:** @@ -1107,7 +1050,7 @@ Name | Type | ▸ **execute**(`operation`: any, `disk`: Disk): *Promise‹void›* -*Defined in [lib/source-destination/configured-source/operations/copy.ts:39](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/configured-source/operations/copy.ts#L39)* +*Defined in [lib/source-destination/configured-source/operations/copy.ts:39](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/configured-source/operations/copy.ts#L39)* **Parameters:** @@ -1124,7 +1067,7 @@ ___ ▸ **executeOperation**(`operation`: [Operation](interfaces/operation.md), `disk`: Disk): *Promise‹void›* -*Defined in [lib/source-destination/configured-source/configure.ts:43](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/configured-source/configure.ts#L43)* +*Defined in [lib/source-destination/configured-source/configure.ts:43](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/configured-source/configure.ts#L43)* **Parameters:** @@ -1141,7 +1084,7 @@ ___ ▸ **getDiskDeviceType**(`disk`: Disk): *Promise‹any›* -*Defined in [lib/source-destination/configured-source/configure.ts:68](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/configured-source/configure.ts#L68)* +*Defined in [lib/source-destination/configured-source/configure.ts:68](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/configured-source/configure.ts#L68)* **Parameters:** @@ -1157,7 +1100,7 @@ ___ ▸ **getEta**(`current`: number, `total`: number, `speed`: number): *number | undefined* -*Defined in [lib/multi-write.ts:72](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/multi-write.ts#L72)* +*Defined in [lib/multi-write.ts:72](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/multi-write.ts#L72)* **Parameters:** @@ -1175,7 +1118,7 @@ ___ ▸ **getFileStreamFromZipStream**(`zipStream`: ReadableStream, `match`: function): *Promise‹ZipStreamEntry›* -*Defined in [lib/zip.ts:21](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/zip.ts#L21)* +*Defined in [lib/zip.ts:21](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/zip.ts#L21)* **Parameters:** @@ -1199,7 +1142,7 @@ ___ ▸ **getPartitionIndex**(`partition`: number | object): *number* -*Defined in [lib/source-destination/configured-source/configure.ts:50](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/configured-source/configure.ts#L50)* +*Defined in [lib/source-destination/configured-source/configure.ts:50](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/configured-source/configure.ts#L50)* **Parameters:** @@ -1215,7 +1158,7 @@ ___ ▸ **getRootStream**(`stream`: ReadableStream): *ReadableStream* -*Defined in [lib/source-destination/compressed-source.ts:34](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/compressed-source.ts#L34)* +*Defined in [lib/source-destination/compressed-source.ts:34](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/compressed-source.ts#L34)* **Parameters:** @@ -1231,7 +1174,7 @@ ___ ▸ **isAlignedLockableBuffer**(`buffer`: [Buffer](interfaces/alignedlockablebuffer.md#buffer)): *buffer is AlignedLockableBuffer* -*Defined in [lib/aligned-lockable-buffer.ts:39](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/aligned-lockable-buffer.ts#L39)* +*Defined in [lib/aligned-lockable-buffer.ts:47](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/aligned-lockable-buffer.ts#L47)* **Parameters:** @@ -1247,7 +1190,7 @@ ___ ▸ **isSourceTransform**(`stream`: any): *stream is SourceTransform* -*Defined in [lib/source-destination/compressed-source.ts:30](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/compressed-source.ts#L30)* +*Defined in [lib/source-destination/compressed-source.ts:30](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/compressed-source.ts#L30)* **Parameters:** @@ -1263,7 +1206,7 @@ ___ ▸ **isTransientError**(`error`: ErrnoException): *boolean* -*Defined in [lib/errors.ts:65](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/errors.ts#L65)* +*Defined in [lib/errors.ts:65](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/errors.ts#L65)* **`summary`** Determine whether an error is considered a transient occurrence, and the operation should be retried @@ -1286,7 +1229,7 @@ ___ ▸ **isntNull**(`x`: any): *boolean* -*Defined in [lib/source-destination/multi-destination.ts:37](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/multi-destination.ts#L37)* +*Defined in [lib/source-destination/multi-destination.ts:37](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/multi-destination.ts#L37)* **Parameters:** @@ -1302,7 +1245,7 @@ ___ ▸ **looksLikeComputeModule**(`description`: string): *boolean* -*Defined in [lib/scanner/adapters/block-device.ts:38](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/scanner/adapters/block-device.ts#L38)* +*Defined in [lib/scanner/adapters/block-device.ts:38](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/scanner/adapters/block-device.ts#L38)* **Parameters:** @@ -1318,7 +1261,7 @@ ___ ▸ **makeClassEmitProgressEvents**<**T**>(`Cls`: T, `attribute`: string, `positionAttribute`: string, `interval`: number): *(Anonymous class) & T* -*Defined in [lib/source-destination/progress.ts:33](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/progress.ts#L33)* +*Defined in [lib/source-destination/progress.ts:33](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/progress.ts#L33)* **Type parameters:** @@ -1341,7 +1284,7 @@ ___ ▸ **matchSupportedExtensions**(`filename`: string): *boolean* -*Defined in [lib/source-destination/zip.ts:66](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/zip.ts#L66)* +*Defined in [lib/source-destination/zip.ts:66](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/zip.ts#L66)* **Parameters:** @@ -1357,7 +1300,7 @@ ___ ▸ **nmWifiConfig**(`index`: number, `options`: [WifiConfig](interfaces/wificonfig.md)): *string* -*Defined in [lib/source-destination/configured-source/operations/configure.ts:41](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/configured-source/operations/configure.ts#L41)* +*Defined in [lib/source-destination/configured-source/operations/configure.ts:41](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/configured-source/operations/configure.ts#L41)* **Parameters:** @@ -1370,21 +1313,11 @@ Name | Type | ___ -### noop - -▸ **noop**(): *void* - -*Defined in [lib/utils.ts:97](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/utils.ts#L97)* - -**Returns:** *void* - -___ - ### `Const` pad ▸ **pad**(`num`: number): *string* -*Defined in [lib/source-destination/configured-source/operations/configure.ts:110](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/configured-source/operations/configure.ts#L110)* +*Defined in [lib/source-destination/configured-source/operations/configure.ts:110](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/configured-source/operations/configure.ts#L110)* **Parameters:** @@ -1400,7 +1333,7 @@ ___ ▸ **pipeRegularSourceToDestination**(`source`: [SourceDestination](classes/sourcedestination.md), `sourceMetadata`: [Metadata](interfaces/metadata.md), `destination`: [MultiDestination](classes/multidestination.md), `verify`: boolean, `numBuffers`: number, `updateState`: function, `onFail`: function, `onProgress`: function, `_onRootStreamProgress`: function): *Promise‹void›* -*Defined in [lib/multi-write.ts:224](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/multi-write.ts#L224)* +*Defined in [lib/multi-write.ts:224](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/multi-write.ts#L224)* **Parameters:** @@ -1462,7 +1395,7 @@ ___ ▸ **pipeSourceToDestinations**(`source`: [SourceDestination](classes/sourcedestination.md), `destinations`: [SourceDestination](classes/sourcedestination.md)[], `onFail`: [OnFailFunction](README.md#onfailfunction), `onProgress`: [OnProgressFunction](README.md#onprogressfunction), `verify`: boolean, `numBuffers`: number): *Promise‹[PipeSourceToDestinationsResult](interfaces/pipesourcetodestinationsresult.md)›* -*Defined in [lib/multi-write.ts:82](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/multi-write.ts#L82)* +*Defined in [lib/multi-write.ts:82](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/multi-write.ts#L82)* **Parameters:** @@ -1483,7 +1416,7 @@ ___ ▸ **pipeSparseSourceToDestination**(`source`: [SourceDestination](classes/sourcedestination.md), `destination`: [MultiDestination](classes/multidestination.md), `verify`: boolean, `numBuffers`: number, `updateState`: function, `onFail`: function, `onProgress`: function, `_onRootStreamProgress`: function): *Promise‹void›* -*Defined in [lib/multi-write.ts:328](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/multi-write.ts#L328)* +*Defined in [lib/multi-write.ts:328](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/multi-write.ts#L328)* **Parameters:** @@ -1543,7 +1476,7 @@ ___ ▸ **randomFilePath**(): *string* -*Defined in [lib/tmp.ts:28](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/tmp.ts#L28)* +*Defined in [lib/tmp.ts:27](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/tmp.ts#L27)* **Returns:** *string* @@ -1553,7 +1486,7 @@ ___ ▸ **runDiskpart**(`commands`: string[]): *Promise‹void›* -*Defined in [lib/diskpart.ts:63](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/diskpart.ts#L63)* +*Defined in [lib/diskpart.ts:63](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/diskpart.ts#L63)* **`summary`** Run a diskpart script @@ -1571,7 +1504,7 @@ ___ ▸ **runVerifier**(`verifier`: [Verifier](classes/verifier.md), `onFail`: function, `onProgress`: function): *Promise‹void›* -*Defined in [lib/multi-write.ts:366](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/multi-write.ts#L366)* +*Defined in [lib/multi-write.ts:366](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/multi-write.ts#L366)* **Parameters:** @@ -1605,7 +1538,7 @@ ___ ▸ **sparseStreamToBuffer**(`stream`: ReadableStream): *Promise‹[Buffer](interfaces/alignedlockablebuffer.md#buffer)›* -*Defined in [lib/utils.ts:48](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/utils.ts#L48)* +*Defined in [lib/utils.ts:51](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/utils.ts#L51)* **Parameters:** @@ -1621,7 +1554,7 @@ ___ ▸ **streamToBuffer**(`stream`: ReadableStream): *Promise‹[Buffer](interfaces/alignedlockablebuffer.md#buffer)›* -*Defined in [lib/utils.ts:20](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/utils.ts#L20)* +*Defined in [lib/utils.ts:20](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/utils.ts#L20)* **Parameters:** @@ -1637,7 +1570,7 @@ ___ ▸ **tmpFile**(`keepOpen`: boolean): *Promise‹[TmpFileResult](interfaces/tmpfileresult.md)›* -*Defined in [lib/tmp.ts:37](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/tmp.ts#L37)* +*Defined in [lib/tmp.ts:36](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/tmp.ts#L36)* **Parameters:** @@ -1653,7 +1586,7 @@ ___ ▸ **tmpFileDisposer**(`keepOpen`: boolean): *Disposer‹[TmpFileResult](interfaces/tmpfileresult.md)›* -*Defined in [lib/tmp.ts:65](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/tmp.ts#L65)* +*Defined in [lib/tmp.ts:64](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/tmp.ts#L64)* **Parameters:** @@ -1669,7 +1602,7 @@ ___ ▸ **verifyOrGenerateChecksum**(`hasher`: [AnyHasher](README.md#anyhasher) | undefined, `blocks`: [BlocksWithChecksum](interfaces/blockswithchecksum.md), `verify`: boolean, `generateChecksums`: boolean): *void* -*Defined in [lib/sparse-stream/shared.ts:123](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/sparse-stream/shared.ts#L123)* +*Defined in [lib/sparse-stream/shared.ts:123](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/sparse-stream/shared.ts#L123)* **Parameters:** @@ -1688,16 +1621,16 @@ Name | Type | ### ▪ **ACTIONS**: *object* -*Defined in [lib/source-destination/configured-source/configure.ts:38](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/configured-source/configure.ts#L38)* +*Defined in [lib/source-destination/configured-source/configure.ts:38](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/configured-source/configure.ts#L38)* ### configure • **configure**: *execute* = configureAction -*Defined in [lib/source-destination/configured-source/configure.ts:39](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/configured-source/configure.ts#L39)* +*Defined in [lib/source-destination/configured-source/configure.ts:39](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/configured-source/configure.ts#L39)* ### copy • **copy**: *execute* = copyAction -*Defined in [lib/source-destination/configured-source/configure.ts:40](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/configured-source/configure.ts#L40)* +*Defined in [lib/source-destination/configured-source/configure.ts:40](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/configured-source/configure.ts#L40)* diff --git a/doc/classes/adapter.md b/doc/classes/adapter.md index 25a5b6de..46d6804d 100644 --- a/doc/classes/adapter.md +++ b/doc/classes/adapter.md @@ -28,10 +28,12 @@ * [getMaxListeners](adapter.md#getmaxlisteners) * [listenerCount](adapter.md#listenercount) * [listeners](adapter.md#listeners) +* [off](adapter.md#off) * [on](adapter.md#on) * [once](adapter.md#once) * [prependListener](adapter.md#prependlistener) * [prependOnceListener](adapter.md#prependoncelistener) +* [rawListeners](adapter.md#rawlisteners) * [removeAllListeners](adapter.md#removealllisteners) * [removeListener](adapter.md#removelistener) * [setMaxListeners](adapter.md#setmaxlisteners) @@ -47,7 +49,7 @@ *Inherited from [CountingWritable](countingwritable.md).[defaultMaxListeners](countingwritable.md#static-defaultmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:896 +Defined in node_modules/@types/node/events.d.ts:18 ## Methods @@ -59,7 +61,7 @@ Defined in node_modules/@types/node/base.d.ts:896 *Overrides [SparseReadable](../interfaces/sparsereadable.md).[addListener](../interfaces/sparsereadable.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:898 +Defined in node_modules/@types/node/events.d.ts:20 **Parameters:** @@ -87,7 +89,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[emit](../interfaces/sparsereadable.md#emit)* -Defined in node_modules/@types/node/base.d.ts:908 +Defined in node_modules/@types/node/events.d.ts:32 **Parameters:** @@ -108,7 +110,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[eventNames](../interfaces/sparsereadable.md#eventnames)* -Defined in node_modules/@types/node/base.d.ts:909 +Defined in node_modules/@types/node/events.d.ts:33 **Returns:** *Array‹string | symbol›* @@ -122,7 +124,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[getMaxListeners](../interfaces/sparsereadable.md#getmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:906 +Defined in node_modules/@types/node/events.d.ts:29 **Returns:** *number* @@ -136,7 +138,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[listenerCount](../interfaces/sparsereadable.md#listenercount)* -Defined in node_modules/@types/node/base.d.ts:910 +Defined in node_modules/@types/node/events.d.ts:34 **Parameters:** @@ -156,7 +158,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[listeners](../interfaces/sparsereadable.md#listeners)* -Defined in node_modules/@types/node/base.d.ts:907 +Defined in node_modules/@types/node/events.d.ts:30 **Parameters:** @@ -168,6 +170,34 @@ Name | Type | ___ +### off + +▸ **off**(`event`: string | symbol, `listener`: function): *this* + +*Inherited from [CountingWritable](countingwritable.md).[off](countingwritable.md#off)* + +*Overrides [SparseReadable](../interfaces/sparsereadable.md).[off](../interfaces/sparsereadable.md#off)* + +Defined in node_modules/@types/node/events.d.ts:26 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* + +**Parameters:** + +Name | Type | +------ | ------ | +`...args` | any[] | + +**Returns:** *this* + +___ + ### on ▸ **on**(`event`: string | symbol, `listener`: function): *this* @@ -176,7 +206,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[on](../interfaces/sparsereadable.md#on)* -Defined in node_modules/@types/node/base.d.ts:899 +Defined in node_modules/@types/node/events.d.ts:21 **Parameters:** @@ -204,7 +234,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[once](../interfaces/sparsereadable.md#once)* -Defined in node_modules/@types/node/base.d.ts:900 +Defined in node_modules/@types/node/events.d.ts:22 **Parameters:** @@ -232,7 +262,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[prependListener](../interfaces/sparsereadable.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:901 +Defined in node_modules/@types/node/events.d.ts:23 **Parameters:** @@ -260,7 +290,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[prependOnceListener](../interfaces/sparsereadable.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:902 +Defined in node_modules/@types/node/events.d.ts:24 **Parameters:** @@ -280,6 +310,26 @@ Name | Type | ___ +### rawListeners + +▸ **rawListeners**(`event`: string | symbol): *Function[]* + +*Inherited from [CountingWritable](countingwritable.md).[rawListeners](countingwritable.md#rawlisteners)* + +*Overrides [SparseReadable](../interfaces/sparsereadable.md).[rawListeners](../interfaces/sparsereadable.md#rawlisteners)* + +Defined in node_modules/@types/node/events.d.ts:31 + +**Parameters:** + +Name | Type | +------ | ------ | +`event` | string | symbol | + +**Returns:** *Function[]* + +___ + ### removeAllListeners ▸ **removeAllListeners**(`event?`: string | symbol): *this* @@ -288,7 +338,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[removeAllListeners](../interfaces/sparsereadable.md#removealllisteners)* -Defined in node_modules/@types/node/base.d.ts:904 +Defined in node_modules/@types/node/events.d.ts:27 **Parameters:** @@ -308,7 +358,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[removeListener](../interfaces/sparsereadable.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:903 +Defined in node_modules/@types/node/events.d.ts:25 **Parameters:** @@ -336,7 +386,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[setMaxListeners](../interfaces/sparsereadable.md#setmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:905 +Defined in node_modules/@types/node/events.d.ts:28 **Parameters:** @@ -352,7 +402,7 @@ ___ ▸ **start**(): *void* -*Defined in [lib/scanner/adapters/adapter.ts:34](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/scanner/adapters/adapter.ts#L34)* +*Defined in [lib/scanner/adapters/adapter.ts:34](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/scanner/adapters/adapter.ts#L34)* **Returns:** *void* @@ -362,7 +412,7 @@ ___ ▸ **stop**(): *void* -*Defined in [lib/scanner/adapters/adapter.ts:35](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/scanner/adapters/adapter.ts#L35)* +*Defined in [lib/scanner/adapters/adapter.ts:35](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/scanner/adapters/adapter.ts#L35)* **Returns:** *void* @@ -374,7 +424,9 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[listenerCount](countingwritable.md#static-listenercount)* -Defined in node_modules/@types/node/base.d.ts:895 +Defined in node_modules/@types/node/events.d.ts:17 + +**`deprecated`** since v4.0.0 **Parameters:** diff --git a/doc/classes/alignedreadablestate.md b/doc/classes/alignedreadablestate.md index afc94179..fa13ae7e 100644 --- a/doc/classes/alignedreadablestate.md +++ b/doc/classes/alignedreadablestate.md @@ -30,7 +30,7 @@ \+ **new AlignedReadableState**(`bufferSize`: number, `alignment`: number, `numBuffers`: number): *[AlignedReadableState](alignedreadablestate.md)* -*Defined in [lib/aligned-lockable-buffer.ts:47](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/aligned-lockable-buffer.ts#L47)* +*Defined in [lib/aligned-lockable-buffer.ts:55](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/aligned-lockable-buffer.ts#L55)* **Parameters:** @@ -48,7 +48,7 @@ Name | Type | • **alignment**: *number* -*Defined in [lib/aligned-lockable-buffer.ts:51](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/aligned-lockable-buffer.ts#L51)* +*Defined in [lib/aligned-lockable-buffer.ts:59](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/aligned-lockable-buffer.ts#L59)* ___ @@ -56,7 +56,7 @@ ___ • **bufferSize**: *number* -*Defined in [lib/aligned-lockable-buffer.ts:50](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/aligned-lockable-buffer.ts#L50)* +*Defined in [lib/aligned-lockable-buffer.ts:58](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/aligned-lockable-buffer.ts#L58)* ___ @@ -64,7 +64,7 @@ ___ • **buffers**: *[AlignedLockableBuffer](../interfaces/alignedlockablebuffer.md)[]* -*Defined in [lib/aligned-lockable-buffer.ts:46](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/aligned-lockable-buffer.ts#L46)* +*Defined in [lib/aligned-lockable-buffer.ts:54](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/aligned-lockable-buffer.ts#L54)* ___ @@ -72,7 +72,7 @@ ___ • **currentBufferIndex**: *number* = 0 -*Defined in [lib/aligned-lockable-buffer.ts:47](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/aligned-lockable-buffer.ts#L47)* +*Defined in [lib/aligned-lockable-buffer.ts:55](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/aligned-lockable-buffer.ts#L55)* ___ @@ -80,7 +80,7 @@ ___ • **numBuffers**: *number* -*Defined in [lib/aligned-lockable-buffer.ts:52](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/aligned-lockable-buffer.ts#L52)* +*Defined in [lib/aligned-lockable-buffer.ts:60](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/aligned-lockable-buffer.ts#L60)* ## Methods @@ -88,6 +88,6 @@ ___ ▸ **getCurrentBuffer**(): *[AlignedLockableBuffer](../interfaces/alignedlockablebuffer.md)* -*Defined in [lib/aligned-lockable-buffer.ts:57](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/aligned-lockable-buffer.ts#L57)* +*Defined in [lib/aligned-lockable-buffer.ts:65](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/aligned-lockable-buffer.ts#L65)* **Returns:** *[AlignedLockableBuffer](../interfaces/alignedlockablebuffer.md)* diff --git a/doc/classes/balenas3source.md b/doc/classes/balenas3source.md index f403c2f9..73acee7a 100644 --- a/doc/classes/balenas3source.md +++ b/doc/classes/balenas3source.md @@ -59,12 +59,14 @@ * [getUrl](balenas3source.md#private-geturl) * [listenerCount](balenas3source.md#listenercount) * [listeners](balenas3source.md#listeners) +* [off](balenas3source.md#off) * [on](balenas3source.md#on) * [once](balenas3source.md#once) * [open](balenas3source.md#open) * [prepare](balenas3source.md#private-prepare) * [prependListener](balenas3source.md#prependlistener) * [prependOnceListener](balenas3source.md#prependoncelistener) +* [rawListeners](balenas3source.md#rawlisteners) * [read](balenas3source.md#read) * [removeAllListeners](balenas3source.md#removealllisteners) * [removeListener](balenas3source.md#removelistener) @@ -79,7 +81,7 @@ \+ **new BalenaS3Source**(`bucket`: string, `deviceType`: string, `version`: string, `host`: string): *[BalenaS3Source](balenas3source.md)* -*Defined in [lib/source-destination/balena-s3-source.ts:35](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/balena-s3-source.ts#L35)* +*Defined in [lib/source-destination/balena-s3-source.ts:35](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/balena-s3-source.ts#L35)* **Parameters:** @@ -98,7 +100,7 @@ Name | Type | Default | • **bucket**: *string* -*Defined in [lib/source-destination/balena-s3-source.ts:38](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/balena-s3-source.ts#L38)* +*Defined in [lib/source-destination/balena-s3-source.ts:38](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/balena-s3-source.ts#L38)* ___ @@ -106,7 +108,7 @@ ___ • **deviceType**: *string* -*Defined in [lib/source-destination/balena-s3-source.ts:39](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/balena-s3-source.ts#L39)* +*Defined in [lib/source-destination/balena-s3-source.ts:39](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/balena-s3-source.ts#L39)* ___ @@ -114,7 +116,7 @@ ___ • **host**: *string* -*Defined in [lib/source-destination/balena-s3-source.ts:41](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/balena-s3-source.ts#L41)* +*Defined in [lib/source-destination/balena-s3-source.ts:41](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/balena-s3-source.ts#L41)* ___ @@ -122,7 +124,7 @@ ___ • **name**: *[Name](../README.md#name)* -*Defined in [lib/source-destination/balena-s3-source.ts:35](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/balena-s3-source.ts#L35)* +*Defined in [lib/source-destination/balena-s3-source.ts:35](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/balena-s3-source.ts#L35)* ___ @@ -130,7 +132,7 @@ ___ • **names**: *[Name](../README.md#name)[]* = ['balena', 'resin'] -*Defined in [lib/source-destination/balena-s3-source.ts:34](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/balena-s3-source.ts#L34)* +*Defined in [lib/source-destination/balena-s3-source.ts:34](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/balena-s3-source.ts#L34)* ___ @@ -138,7 +140,7 @@ ___ • **rawSource**: *[Http](http.md)* -*Defined in [lib/source-destination/balena-s3-source.ts:31](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/balena-s3-source.ts#L31)* +*Defined in [lib/source-destination/balena-s3-source.ts:31](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/balena-s3-source.ts#L31)* ___ @@ -146,7 +148,7 @@ ___ • **ready**: *Promise‹void›* -*Defined in [lib/source-destination/balena-s3-source.ts:33](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/balena-s3-source.ts#L33)* +*Defined in [lib/source-destination/balena-s3-source.ts:33](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/balena-s3-source.ts#L33)* ___ @@ -154,7 +156,7 @@ ___ • **version**: *string* -*Defined in [lib/source-destination/balena-s3-source.ts:40](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/balena-s3-source.ts#L40)* +*Defined in [lib/source-destination/balena-s3-source.ts:40](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/balena-s3-source.ts#L40)* ___ @@ -162,7 +164,7 @@ ___ • **zipSource**: *[ZipSource](zipsource.md)* -*Defined in [lib/source-destination/balena-s3-source.ts:32](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/balena-s3-source.ts#L32)* +*Defined in [lib/source-destination/balena-s3-source.ts:32](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/balena-s3-source.ts#L32)* ___ @@ -172,7 +174,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[defaultMaxListeners](countingwritable.md#static-defaultmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:896 +Defined in node_modules/@types/node/events.d.ts:18 ___ @@ -193,7 +195,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[imageExtensions](sourcesource.md#static-imageextensions)* -*Defined in [lib/source-destination/source-destination.ts:252](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L252)* +*Defined in [lib/source-destination/source-destination.ts:275](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L275)* ___ @@ -203,7 +205,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[mimetype](sourcesource.md#static-optional-mimetype)* -*Defined in [lib/source-destination/source-destination.ts:264](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L264)* +*Defined in [lib/source-destination/source-destination.ts:287](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L287)* ## Methods @@ -213,7 +215,7 @@ ___ *Overrides [SourceDestination](sourcedestination.md).[_close](sourcedestination.md#protected-_close)* -*Defined in [lib/source-destination/balena-s3-source.ts:120](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/balena-s3-source.ts#L120)* +*Defined in [lib/source-destination/balena-s3-source.ts:120](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/balena-s3-source.ts#L120)* **Returns:** *Promise‹void›* @@ -225,7 +227,7 @@ ___ *Overrides [SourceSource](sourcesource.md).[_getMetadata](sourcesource.md#protected-_getmetadata)* -*Defined in [lib/source-destination/balena-s3-source.ts:110](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/balena-s3-source.ts#L110)* +*Defined in [lib/source-destination/balena-s3-source.ts:110](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/balena-s3-source.ts#L110)* **Returns:** *Promise‹[Metadata](../interfaces/metadata.md)›* @@ -237,7 +239,7 @@ ___ *Overrides [SourceDestination](sourcedestination.md).[_open](sourcedestination.md#protected-_open)* -*Defined in [lib/source-destination/balena-s3-source.ts:115](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/balena-s3-source.ts#L115)* +*Defined in [lib/source-destination/balena-s3-source.ts:115](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/balena-s3-source.ts#L115)* **Returns:** *Promise‹void›* @@ -251,7 +253,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[addListener](../interfaces/sparsereadable.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:898 +Defined in node_modules/@types/node/events.d.ts:20 **Parameters:** @@ -277,7 +279,7 @@ ___ *Overrides [SourceSource](sourcesource.md).[canCreateReadStream](sourcesource.md#cancreatereadstream)* -*Defined in [lib/source-destination/balena-s3-source.ts:74](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/balena-s3-source.ts#L74)* +*Defined in [lib/source-destination/balena-s3-source.ts:74](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/balena-s3-source.ts#L74)* **Returns:** *Promise‹boolean›* @@ -289,7 +291,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[canCreateSparseReadStream](sourcesource.md#cancreatesparsereadstream)* -*Defined in [lib/source-destination/source-destination.ts:292](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L292)* +*Defined in [lib/source-destination/source-destination.ts:315](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L315)* **Returns:** *Promise‹boolean›* @@ -301,7 +303,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[canCreateSparseWriteStream](sourcesource.md#cancreatesparsewritestream)* -*Defined in [lib/source-destination/source-destination.ts:300](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L300)* +*Defined in [lib/source-destination/source-destination.ts:323](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L323)* **Returns:** *Promise‹boolean›* @@ -313,7 +315,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[canCreateWriteStream](sourcesource.md#cancreatewritestream)* -*Defined in [lib/source-destination/source-destination.ts:296](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L296)* +*Defined in [lib/source-destination/source-destination.ts:319](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L319)* **Returns:** *Promise‹boolean›* @@ -325,7 +327,7 @@ ___ *Overrides [SourceSource](sourcesource.md).[canRead](sourcesource.md#canread)* -*Defined in [lib/source-destination/balena-s3-source.ts:78](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/balena-s3-source.ts#L78)* +*Defined in [lib/source-destination/balena-s3-source.ts:78](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/balena-s3-source.ts#L78)* **Returns:** *Promise‹boolean›* @@ -337,7 +339,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[canWrite](sourcesource.md#canwrite)* -*Defined in [lib/source-destination/source-destination.ts:284](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L284)* +*Defined in [lib/source-destination/source-destination.ts:307](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L307)* **Returns:** *Promise‹boolean›* @@ -349,7 +351,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[close](sourcesource.md#close)* -*Defined in [lib/source-destination/source-destination.ts:368](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L368)* +*Defined in [lib/source-destination/source-destination.ts:391](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L391)* **Returns:** *Promise‹void›* @@ -361,7 +363,7 @@ ___ *Overrides [SourceSource](sourcesource.md).[createReadStream](sourcesource.md#createreadstream)* -*Defined in [lib/source-destination/balena-s3-source.ts:103](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/balena-s3-source.ts#L103)* +*Defined in [lib/source-destination/balena-s3-source.ts:103](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/balena-s3-source.ts#L103)* **Parameters:** @@ -379,7 +381,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[createSparseReadStream](sourcesource.md#createsparsereadstream)* -*Defined in [lib/source-destination/source-destination.ts:339](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L339)* +*Defined in [lib/source-destination/source-destination.ts:362](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L362)* **Parameters:** @@ -397,7 +399,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[createSparseWriteStream](sourcesource.md#createsparsewritestream)* -*Defined in [lib/source-destination/source-destination.ts:355](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L355)* +*Defined in [lib/source-destination/source-destination.ts:378](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L378)* **Parameters:** @@ -417,7 +419,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[createVerifier](sourcesource.md#createverifier)* -*Defined in [lib/source-destination/source-destination.ts:383](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L383)* +*Defined in [lib/source-destination/source-destination.ts:406](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L406)* **Parameters:** @@ -436,7 +438,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[createWriteStream](sourcesource.md#createwritestream)* -*Defined in [lib/source-destination/source-destination.ts:349](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L349)* +*Defined in [lib/source-destination/source-destination.ts:372](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L372)* **Parameters:** @@ -458,7 +460,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[emit](../interfaces/sparsereadable.md#emit)* -Defined in node_modules/@types/node/base.d.ts:908 +Defined in node_modules/@types/node/events.d.ts:32 **Parameters:** @@ -479,7 +481,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[eventNames](../interfaces/sparsereadable.md#eventnames)* -Defined in node_modules/@types/node/base.d.ts:909 +Defined in node_modules/@types/node/events.d.ts:33 **Returns:** *Array‹string | symbol›* @@ -491,7 +493,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[getAlignment](sourcesource.md#getalignment)* -*Defined in [lib/source-destination/source-destination.ts:276](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L276)* +*Defined in [lib/source-destination/source-destination.ts:299](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L299)* **Returns:** *number | undefined* @@ -503,7 +505,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[getBlocks](sourcesource.md#getblocks)* -*Defined in [lib/source-destination/source-destination.ts:345](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L345)* +*Defined in [lib/source-destination/source-destination.ts:368](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L368)* **Returns:** *Promise‹[BlocksWithChecksum](../interfaces/blockswithchecksum.md)[]›* @@ -515,7 +517,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[getInnerSource](sourcesource.md#getinnersource)* -*Defined in [lib/source-destination/source-destination.ts:452](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L452)* +*Defined in [lib/source-destination/source-destination.ts:475](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L475)* **Returns:** *Promise‹[SourceDestination](sourcedestination.md)›* @@ -529,7 +531,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[getMaxListeners](../interfaces/sparsereadable.md#getmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:906 +Defined in node_modules/@types/node/events.d.ts:29 **Returns:** *number* @@ -541,7 +543,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[getMetadata](sourcesource.md#getmetadata)* -*Defined in [lib/source-destination/source-destination.ts:304](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L304)* +*Defined in [lib/source-destination/source-destination.ts:327](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L327)* **Returns:** *Promise‹[Metadata](../interfaces/metadata.md)›* @@ -551,7 +553,7 @@ ___ ▸ **getName**(): *Promise‹[Name](../README.md#name)›* -*Defined in [lib/source-destination/balena-s3-source.ts:60](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/balena-s3-source.ts#L60)* +*Defined in [lib/source-destination/balena-s3-source.ts:60](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/balena-s3-source.ts#L60)* **Returns:** *Promise‹[Name](../README.md#name)›* @@ -563,7 +565,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[getPartitionTable](sourcesource.md#getpartitiontable)* -*Defined in [lib/source-destination/source-destination.ts:473](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L473)* +*Defined in [lib/source-destination/source-destination.ts:496](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L496)* **Returns:** *Promise‹GetPartitionsResult | undefined›* @@ -573,7 +575,7 @@ ___ ▸ **getUrl**(`path`: string): *string* -*Defined in [lib/source-destination/balena-s3-source.ts:82](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/balena-s3-source.ts#L82)* +*Defined in [lib/source-destination/balena-s3-source.ts:82](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/balena-s3-source.ts#L82)* **Parameters:** @@ -593,7 +595,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[listenerCount](../interfaces/sparsereadable.md#listenercount)* -Defined in node_modules/@types/node/base.d.ts:910 +Defined in node_modules/@types/node/events.d.ts:34 **Parameters:** @@ -613,7 +615,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[listeners](../interfaces/sparsereadable.md#listeners)* -Defined in node_modules/@types/node/base.d.ts:907 +Defined in node_modules/@types/node/events.d.ts:30 **Parameters:** @@ -625,6 +627,34 @@ Name | Type | ___ +### off + +▸ **off**(`event`: string | symbol, `listener`: function): *this* + +*Inherited from [CountingWritable](countingwritable.md).[off](countingwritable.md#off)* + +*Overrides [SparseReadable](../interfaces/sparsereadable.md).[off](../interfaces/sparsereadable.md#off)* + +Defined in node_modules/@types/node/events.d.ts:26 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* + +**Parameters:** + +Name | Type | +------ | ------ | +`...args` | any[] | + +**Returns:** *this* + +___ + ### on ▸ **on**(`event`: string | symbol, `listener`: function): *this* @@ -633,7 +663,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[on](../interfaces/sparsereadable.md#on)* -Defined in node_modules/@types/node/base.d.ts:899 +Defined in node_modules/@types/node/events.d.ts:21 **Parameters:** @@ -661,7 +691,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[once](../interfaces/sparsereadable.md#once)* -Defined in node_modules/@types/node/base.d.ts:900 +Defined in node_modules/@types/node/events.d.ts:22 **Parameters:** @@ -687,7 +717,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[open](sourcesource.md#open)* -*Defined in [lib/source-destination/source-destination.ts:361](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L361)* +*Defined in [lib/source-destination/source-destination.ts:384](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L384)* **Returns:** *Promise‹void›* @@ -697,7 +727,7 @@ ___ ▸ **prepare**(): *Promise‹void›* -*Defined in [lib/source-destination/balena-s3-source.ts:51](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/balena-s3-source.ts#L51)* +*Defined in [lib/source-destination/balena-s3-source.ts:51](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/balena-s3-source.ts#L51)* **Returns:** *Promise‹void›* @@ -711,7 +741,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[prependListener](../interfaces/sparsereadable.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:901 +Defined in node_modules/@types/node/events.d.ts:23 **Parameters:** @@ -739,7 +769,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[prependOnceListener](../interfaces/sparsereadable.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:902 +Defined in node_modules/@types/node/events.d.ts:24 **Parameters:** @@ -759,13 +789,33 @@ Name | Type | ___ +### rawListeners + +▸ **rawListeners**(`event`: string | symbol): *Function[]* + +*Inherited from [CountingWritable](countingwritable.md).[rawListeners](countingwritable.md#rawlisteners)* + +*Overrides [SparseReadable](../interfaces/sparsereadable.md).[rawListeners](../interfaces/sparsereadable.md#rawlisteners)* + +Defined in node_modules/@types/node/events.d.ts:31 + +**Parameters:** + +Name | Type | +------ | ------ | +`event` | string | symbol | + +**Returns:** *Function[]* + +___ + ### read ▸ **read**(`buffer`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer), `bufferOffset`: number, `length`: number, `sourceOffset`: number): *Promise‹ReadResult›* *Overrides [SourceSource](sourcesource.md).[read](sourcesource.md#read)* -*Defined in [lib/source-destination/balena-s3-source.ts:88](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/balena-s3-source.ts#L88)* +*Defined in [lib/source-destination/balena-s3-source.ts:88](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/balena-s3-source.ts#L88)* **Parameters:** @@ -788,7 +838,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[removeAllListeners](../interfaces/sparsereadable.md#removealllisteners)* -Defined in node_modules/@types/node/base.d.ts:904 +Defined in node_modules/@types/node/events.d.ts:27 **Parameters:** @@ -808,7 +858,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[removeListener](../interfaces/sparsereadable.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:903 +Defined in node_modules/@types/node/events.d.ts:25 **Parameters:** @@ -836,7 +886,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[setMaxListeners](../interfaces/sparsereadable.md#setmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:905 +Defined in node_modules/@types/node/events.d.ts:28 **Parameters:** @@ -854,7 +904,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[write](sourcesource.md#write)* -*Defined in [lib/source-destination/source-destination.ts:324](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L324)* +*Defined in [lib/source-destination/source-destination.ts:347](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L347)* **Parameters:** @@ -875,7 +925,9 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[listenerCount](countingwritable.md#static-listenercount)* -Defined in node_modules/@types/node/base.d.ts:895 +Defined in node_modules/@types/node/events.d.ts:17 + +**`deprecated`** since v4.0.0 **Parameters:** @@ -894,7 +946,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[register](sourcesource.md#static-register)* -*Defined in [lib/source-destination/source-destination.ts:270](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L270)* +*Defined in [lib/source-destination/source-destination.ts:293](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L293)* **Parameters:** diff --git a/doc/classes/blockdevice.md b/doc/classes/blockdevice.md index dae93e31..add7a77f 100644 --- a/doc/classes/blockdevice.md +++ b/doc/classes/blockdevice.md @@ -23,7 +23,7 @@ * [alignment](blockdevice.md#alignment) * [drive](blockdevice.md#private-drive) * [emitsProgress](blockdevice.md#emitsprogress) -* [fd](blockdevice.md#protected-fd) +* [fileHandle](blockdevice.md#protected-filehandle) * [oDirect](blockdevice.md#odirect) * [oWrite](blockdevice.md#owrite) * [path](blockdevice.md#path) @@ -75,12 +75,14 @@ * [getPartitionTable](blockdevice.md#getpartitiontable) * [listenerCount](blockdevice.md#listenercount) * [listeners](blockdevice.md#listeners) +* [off](blockdevice.md#off) * [offsetIsAligned](blockdevice.md#private-offsetisaligned) * [on](blockdevice.md#on) * [once](blockdevice.md#once) * [open](blockdevice.md#open) * [prependListener](blockdevice.md#prependlistener) * [prependOnceListener](blockdevice.md#prependoncelistener) +* [rawListeners](blockdevice.md#rawlisteners) * [read](blockdevice.md#read) * [removeAllListeners](blockdevice.md#removealllisteners) * [removeListener](blockdevice.md#removelistener) @@ -93,20 +95,22 @@ ### constructor -\+ **new BlockDevice**(`drive`: [DrivelistDrive](../interfaces/drivelistdrive.md), `unmountOnSuccess`: boolean, `oWrite`: boolean, `oDirect`: boolean): *[BlockDevice](blockdevice.md)* +\+ **new BlockDevice**(`__namedParameters`: object): *[BlockDevice](blockdevice.md)* *Overrides [File](file.md).[constructor](file.md#constructor)* -*Defined in [lib/source-destination/block-device.ts:47](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/block-device.ts#L47)* +*Defined in [lib/source-destination/block-device.ts:50](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/block-device.ts#L50)* **Parameters:** +▪ **__namedParameters**: *object* + Name | Type | Default | ------ | ------ | ------ | -`drive` | [DrivelistDrive](../interfaces/drivelistdrive.md) | - | +`direct` | boolean | true | +`drive` | Drive | - | `unmountOnSuccess` | boolean | false | -`oWrite` | boolean | false | -`oDirect` | boolean | true | +`write` | boolean | false | **Returns:** *[BlockDevice](blockdevice.md)* @@ -116,7 +120,7 @@ Name | Type | Default | • **alignment**: *number* -*Defined in [lib/source-destination/block-device.ts:47](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/block-device.ts#L47)* +*Defined in [lib/source-destination/block-device.ts:50](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/block-device.ts#L50)* ___ @@ -124,7 +128,7 @@ ___ • **drive**: *[DrivelistDrive](../interfaces/drivelistdrive.md)* -*Defined in [lib/source-destination/block-device.ts:50](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/block-device.ts#L50)* +*Defined in [lib/source-destination/block-device.ts:46](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/block-device.ts#L46)* ___ @@ -134,17 +138,17 @@ ___ *Implementation of [AdapterSourceDestination](../interfaces/adaptersourcedestination.md).[emitsProgress](../interfaces/adaptersourcedestination.md#emitsprogress)* -*Defined in [lib/source-destination/block-device.ts:46](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/block-device.ts#L46)* +*Defined in [lib/source-destination/block-device.ts:49](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/block-device.ts#L49)* ___ -### `Protected` fd +### `Protected` fileHandle -• **fd**: *number* +• **fileHandle**: *fs.FileHandle* -*Inherited from [File](file.md).[fd](file.md#protected-fd)* +*Inherited from [File](file.md).[fileHandle](file.md#protected-filehandle)* -*Defined in [lib/source-destination/file.ts:51](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/file.ts#L51)* +*Defined in [lib/source-destination/file.ts:54](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/file.ts#L54)* ___ @@ -152,7 +156,7 @@ ___ • **oDirect**: *boolean* -*Defined in [lib/source-destination/block-device.ts:53](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/block-device.ts#L53)* +*Defined in [lib/source-destination/block-device.ts:48](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/block-device.ts#L48)* ___ @@ -162,7 +166,7 @@ ___ *Inherited from [File](file.md).[oWrite](file.md#owrite)* -*Defined in [lib/source-destination/file.ts:53](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/file.ts#L53)* +*Defined in [lib/source-destination/file.ts:53](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/file.ts#L53)* ___ @@ -172,7 +176,7 @@ ___ *Inherited from [File](file.md).[path](file.md#path)* -*Defined in [lib/source-destination/file.ts:53](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/file.ts#L53)* +*Defined in [lib/source-destination/file.ts:52](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/file.ts#L52)* ___ @@ -180,7 +184,7 @@ ___ • **unmountOnSuccess**: *boolean* -*Defined in [lib/source-destination/block-device.ts:51](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/block-device.ts#L51)* +*Defined in [lib/source-destination/block-device.ts:47](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/block-device.ts#L47)* ___ @@ -192,7 +196,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[defaultMaxListeners](countingwritable.md#static-defaultmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:896 +Defined in node_modules/@types/node/events.d.ts:18 ___ @@ -215,7 +219,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[imageExtensions](sourcesource.md#static-imageextensions)* -*Defined in [lib/source-destination/source-destination.ts:252](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L252)* +*Defined in [lib/source-destination/source-destination.ts:275](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L275)* ___ @@ -227,7 +231,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[mimetype](sourcesource.md#static-optional-mimetype)* -*Defined in [lib/source-destination/source-destination.ts:264](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L264)* +*Defined in [lib/source-destination/source-destination.ts:287](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L287)* ## Accessors @@ -235,7 +239,7 @@ ___ • **get description**(): *string* -*Defined in [lib/source-destination/block-device.ts:95](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/block-device.ts#L95)* +*Defined in [lib/source-destination/block-device.ts:111](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/block-device.ts#L111)* **Returns:** *string* @@ -245,7 +249,7 @@ ___ • **get device**(): *string* -*Defined in [lib/source-destination/block-device.ts:87](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/block-device.ts#L87)* +*Defined in [lib/source-destination/block-device.ts:103](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/block-device.ts#L103)* **Returns:** *string* @@ -255,7 +259,7 @@ ___ • **get devicePath**(): *string | null* -*Defined in [lib/source-destination/block-device.ts:91](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/block-device.ts#L91)* +*Defined in [lib/source-destination/block-device.ts:107](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/block-device.ts#L107)* **Returns:** *string | null* @@ -265,7 +269,7 @@ ___ • **get isSystem**(): *boolean* -*Defined in [lib/source-destination/block-device.ts:79](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/block-device.ts#L79)* +*Defined in [lib/source-destination/block-device.ts:95](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/block-device.ts#L95)* **Returns:** *boolean* @@ -275,7 +279,7 @@ ___ • **get mountpoints**(): *Array‹object›* -*Defined in [lib/source-destination/block-device.ts:99](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/block-device.ts#L99)* +*Defined in [lib/source-destination/block-device.ts:115](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/block-device.ts#L115)* **Returns:** *Array‹object›* @@ -285,7 +289,7 @@ ___ • **get raw**(): *string* -*Defined in [lib/source-destination/block-device.ts:83](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/block-device.ts#L83)* +*Defined in [lib/source-destination/block-device.ts:99](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/block-device.ts#L99)* **Returns:** *string* @@ -295,7 +299,7 @@ ___ • **get size**(): *number | null* -*Defined in [lib/source-destination/block-device.ts:103](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/block-device.ts#L103)* +*Defined in [lib/source-destination/block-device.ts:119](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/block-device.ts#L119)* **Returns:** *number | null* @@ -309,7 +313,7 @@ ___ *Overrides [File](file.md).[_close](file.md#protected-_close)* -*Defined in [lib/source-destination/block-device.ts:158](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/block-device.ts#L158)* +*Defined in [lib/source-destination/block-device.ts:180](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/block-device.ts#L180)* **Returns:** *Promise‹void›* @@ -323,7 +327,7 @@ ___ *Overrides [File](file.md).[_getMetadata](file.md#protected-_getmetadata)* -*Defined in [lib/source-destination/block-device.ts:107](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/block-device.ts#L107)* +*Defined in [lib/source-destination/block-device.ts:123](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/block-device.ts#L123)* **Returns:** *Promise‹[Metadata](../interfaces/metadata.md)›* @@ -337,7 +341,7 @@ ___ *Overrides [File](file.md).[_open](file.md#protected-_open)* -*Defined in [lib/source-destination/block-device.ts:149](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/block-device.ts#L149)* +*Defined in [lib/source-destination/block-device.ts:165](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/block-device.ts#L165)* **Returns:** *Promise‹void›* @@ -351,7 +355,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[addListener](../interfaces/sparsereadable.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:898 +Defined in node_modules/@types/node/events.d.ts:20 **Parameters:** @@ -375,7 +379,7 @@ ___ ▸ **alignOffsetAfter**(`offset`: number): *number* -*Defined in [lib/source-destination/block-device.ts:179](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/block-device.ts#L179)* +*Defined in [lib/source-destination/block-device.ts:201](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/block-device.ts#L201)* **Parameters:** @@ -391,7 +395,7 @@ ___ ▸ **alignOffsetBefore**(`offset`: number): *number* -*Defined in [lib/source-destination/block-device.ts:175](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/block-device.ts#L175)* +*Defined in [lib/source-destination/block-device.ts:197](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/block-device.ts#L197)* **Parameters:** @@ -407,7 +411,7 @@ ___ ▸ **alignedRead**(`buffer`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer), `bufferOffset`: number, `length`: number, `sourceOffset`: number): *Promise‹ReadResult›* -*Defined in [lib/source-destination/block-device.ts:183](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/block-device.ts#L183)* +*Defined in [lib/source-destination/block-device.ts:205](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/block-device.ts#L205)* **Parameters:** @@ -426,7 +430,7 @@ ___ ▸ **alignedWrite**(`buffer`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer), `bufferOffset`: number, `length`: number, `fileOffset`: number): *Promise‹WriteResult›* -*Defined in [lib/source-destination/block-device.ts:216](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/block-device.ts#L216)* +*Defined in [lib/source-destination/block-device.ts:238](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/block-device.ts#L238)* **Parameters:** @@ -451,7 +455,7 @@ ___ *Overrides [SourceSource](sourcesource.md).[canCreateReadStream](sourcesource.md#cancreatereadstream)* -*Defined in [lib/source-destination/file.ts:69](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/file.ts#L69)* +*Defined in [lib/source-destination/file.ts:74](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/file.ts#L74)* **Returns:** *Promise‹boolean›* @@ -465,7 +469,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[canCreateSparseReadStream](sourcesource.md#cancreatesparsereadstream)* -*Defined in [lib/source-destination/source-destination.ts:292](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L292)* +*Defined in [lib/source-destination/source-destination.ts:315](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L315)* **Returns:** *Promise‹boolean›* @@ -479,7 +483,7 @@ ___ *Overrides [File](file.md).[canCreateSparseWriteStream](file.md#cancreatesparsewritestream)* -*Defined in [lib/source-destination/block-device.ts:121](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/block-device.ts#L121)* +*Defined in [lib/source-destination/block-device.ts:137](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/block-device.ts#L137)* **Returns:** *Promise‹boolean›* @@ -493,7 +497,7 @@ ___ *Overrides [File](file.md).[canCreateWriteStream](file.md#cancreatewritestream)* -*Defined in [lib/source-destination/block-device.ts:117](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/block-device.ts#L117)* +*Defined in [lib/source-destination/block-device.ts:133](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/block-device.ts#L133)* **Returns:** *Promise‹boolean›* @@ -509,7 +513,7 @@ ___ *Overrides [SourceSource](sourcesource.md).[canRead](sourcesource.md#canread)* -*Defined in [lib/source-destination/file.ts:61](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/file.ts#L61)* +*Defined in [lib/source-destination/file.ts:66](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/file.ts#L66)* **Returns:** *Promise‹boolean›* @@ -523,7 +527,7 @@ ___ *Overrides [File](file.md).[canWrite](file.md#canwrite)* -*Defined in [lib/source-destination/block-device.ts:113](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/block-device.ts#L113)* +*Defined in [lib/source-destination/block-device.ts:129](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/block-device.ts#L129)* **Returns:** *Promise‹boolean›* @@ -537,7 +541,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[close](sourcesource.md#close)* -*Defined in [lib/source-destination/source-destination.ts:368](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L368)* +*Defined in [lib/source-destination/source-destination.ts:391](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L391)* **Returns:** *Promise‹void›* @@ -551,7 +555,7 @@ ___ *Overrides [SourceSource](sourcesource.md).[createReadStream](sourcesource.md#createreadstream)* -*Defined in [lib/source-destination/file.ts:117](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/file.ts#L117)* +*Defined in [lib/source-destination/file.ts:167](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/file.ts#L167)* **Parameters:** @@ -577,7 +581,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[createSparseReadStream](sourcesource.md#createsparsereadstream)* -*Defined in [lib/source-destination/source-destination.ts:339](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L339)* +*Defined in [lib/source-destination/source-destination.ts:362](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L362)* **Parameters:** @@ -595,7 +599,7 @@ ___ *Overrides [File](file.md).[createSparseWriteStream](file.md#createsparsewritestream)* -*Defined in [lib/source-destination/block-device.ts:137](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/block-device.ts#L137)* +*Defined in [lib/source-destination/block-device.ts:153](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/block-device.ts#L153)* **Parameters:** @@ -617,7 +621,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[createVerifier](sourcesource.md#createverifier)* -*Defined in [lib/source-destination/source-destination.ts:383](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L383)* +*Defined in [lib/source-destination/source-destination.ts:406](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L406)* **Parameters:** @@ -636,7 +640,7 @@ ___ *Overrides [File](file.md).[createWriteStream](file.md#createwritestream)* -*Defined in [lib/source-destination/block-device.ts:125](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/block-device.ts#L125)* +*Defined in [lib/source-destination/block-device.ts:141](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/block-device.ts#L141)* **Parameters:** @@ -660,7 +664,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[emit](../interfaces/sparsereadable.md#emit)* -Defined in node_modules/@types/node/base.d.ts:908 +Defined in node_modules/@types/node/events.d.ts:32 **Parameters:** @@ -683,7 +687,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[eventNames](../interfaces/sparsereadable.md#eventnames)* -Defined in node_modules/@types/node/base.d.ts:909 +Defined in node_modules/@types/node/events.d.ts:33 **Returns:** *Array‹string | symbol›* @@ -697,7 +701,7 @@ ___ *Overrides [SourceSource](sourcesource.md).[getAlignment](sourcesource.md#getalignment)* -*Defined in [lib/source-destination/block-device.ts:59](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/block-device.ts#L59)* +*Defined in [lib/source-destination/block-device.ts:70](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/block-device.ts#L70)* **Returns:** *undefined | number* @@ -711,7 +715,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[getBlocks](sourcesource.md#getblocks)* -*Defined in [lib/source-destination/source-destination.ts:345](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L345)* +*Defined in [lib/source-destination/source-destination.ts:368](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L368)* **Returns:** *Promise‹[BlocksWithChecksum](../interfaces/blockswithchecksum.md)[]›* @@ -725,7 +729,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[getInnerSource](sourcesource.md#getinnersource)* -*Defined in [lib/source-destination/source-destination.ts:452](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L452)* +*Defined in [lib/source-destination/source-destination.ts:475](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L475)* **Returns:** *Promise‹[SourceDestination](sourcedestination.md)›* @@ -741,7 +745,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[getMaxListeners](../interfaces/sparsereadable.md#getmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:906 +Defined in node_modules/@types/node/events.d.ts:29 **Returns:** *number* @@ -755,7 +759,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[getMetadata](sourcesource.md#getmetadata)* -*Defined in [lib/source-destination/source-destination.ts:304](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L304)* +*Defined in [lib/source-destination/source-destination.ts:327](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L327)* **Returns:** *Promise‹[Metadata](../interfaces/metadata.md)›* @@ -767,7 +771,7 @@ ___ *Overrides [File](file.md).[getOpenFlags](file.md#protected-getopenflags)* -*Defined in [lib/source-destination/block-device.ts:65](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/block-device.ts#L65)* +*Defined in [lib/source-destination/block-device.ts:76](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/block-device.ts#L76)* **Returns:** *number* @@ -781,7 +785,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[getPartitionTable](sourcesource.md#getpartitiontable)* -*Defined in [lib/source-destination/source-destination.ts:473](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L473)* +*Defined in [lib/source-destination/source-destination.ts:496](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L496)* **Returns:** *Promise‹GetPartitionsResult | undefined›* @@ -797,7 +801,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[listenerCount](../interfaces/sparsereadable.md#listenercount)* -Defined in node_modules/@types/node/base.d.ts:910 +Defined in node_modules/@types/node/events.d.ts:34 **Parameters:** @@ -819,7 +823,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[listeners](../interfaces/sparsereadable.md#listeners)* -Defined in node_modules/@types/node/base.d.ts:907 +Defined in node_modules/@types/node/events.d.ts:30 **Parameters:** @@ -831,11 +835,39 @@ Name | Type | ___ +### off + +▸ **off**(`event`: string | symbol, `listener`: function): *this* + +*Inherited from [CountingWritable](countingwritable.md).[off](countingwritable.md#off)* + +*Overrides [SparseReadable](../interfaces/sparsereadable.md).[off](../interfaces/sparsereadable.md#off)* + +Defined in node_modules/@types/node/events.d.ts:26 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* + +**Parameters:** + +Name | Type | +------ | ------ | +`...args` | any[] | + +**Returns:** *this* + +___ + ### `Private` offsetIsAligned ▸ **offsetIsAligned**(`offset`: number): *boolean* -*Defined in [lib/source-destination/block-device.ts:171](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/block-device.ts#L171)* +*Defined in [lib/source-destination/block-device.ts:193](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/block-device.ts#L193)* **Parameters:** @@ -855,7 +887,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[on](../interfaces/sparsereadable.md#on)* -Defined in node_modules/@types/node/base.d.ts:899 +Defined in node_modules/@types/node/events.d.ts:21 **Parameters:** @@ -883,7 +915,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[once](../interfaces/sparsereadable.md#once)* -Defined in node_modules/@types/node/base.d.ts:900 +Defined in node_modules/@types/node/events.d.ts:22 **Parameters:** @@ -911,7 +943,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[open](sourcesource.md#open)* -*Defined in [lib/source-destination/source-destination.ts:361](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L361)* +*Defined in [lib/source-destination/source-destination.ts:384](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L384)* **Returns:** *Promise‹void›* @@ -925,7 +957,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[prependListener](../interfaces/sparsereadable.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:901 +Defined in node_modules/@types/node/events.d.ts:23 **Parameters:** @@ -953,7 +985,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[prependOnceListener](../interfaces/sparsereadable.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:902 +Defined in node_modules/@types/node/events.d.ts:24 **Parameters:** @@ -973,6 +1005,28 @@ Name | Type | ___ +### rawListeners + +▸ **rawListeners**(`event`: string | symbol): *Function[]* + +*Implementation of [AdapterSourceDestination](../interfaces/adaptersourcedestination.md)* + +*Inherited from [CountingWritable](countingwritable.md).[rawListeners](countingwritable.md#rawlisteners)* + +*Overrides [SparseReadable](../interfaces/sparsereadable.md).[rawListeners](../interfaces/sparsereadable.md#rawlisteners)* + +Defined in node_modules/@types/node/events.d.ts:31 + +**Parameters:** + +Name | Type | +------ | ------ | +`event` | string | symbol | + +**Returns:** *Function[]* + +___ + ### read ▸ **read**(`buffer`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer), `bufferOffset`: number, `length`: number, `sourceOffset`: number): *Promise‹ReadResult›* @@ -981,7 +1035,7 @@ ___ *Overrides [File](file.md).[read](file.md#read)* -*Defined in [lib/source-destination/block-device.ts:203](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/block-device.ts#L203)* +*Defined in [lib/source-destination/block-device.ts:225](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/block-device.ts#L225)* **Parameters:** @@ -1006,7 +1060,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[removeAllListeners](../interfaces/sparsereadable.md#removealllisteners)* -Defined in node_modules/@types/node/base.d.ts:904 +Defined in node_modules/@types/node/events.d.ts:27 **Parameters:** @@ -1026,7 +1080,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[removeListener](../interfaces/sparsereadable.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:903 +Defined in node_modules/@types/node/events.d.ts:25 **Parameters:** @@ -1056,7 +1110,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[setMaxListeners](../interfaces/sparsereadable.md#setmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:905 +Defined in node_modules/@types/node/events.d.ts:28 **Parameters:** @@ -1076,7 +1130,7 @@ ___ *Overrides [File](file.md).[write](file.md#write)* -*Defined in [lib/source-destination/block-device.ts:232](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/block-device.ts#L232)* +*Defined in [lib/source-destination/block-device.ts:254](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/block-device.ts#L254)* **Parameters:** @@ -1099,7 +1153,9 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[listenerCount](countingwritable.md#static-listenercount)* -Defined in node_modules/@types/node/base.d.ts:895 +Defined in node_modules/@types/node/events.d.ts:17 + +**`deprecated`** since v4.0.0 **Parameters:** @@ -1120,7 +1176,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[register](sourcesource.md#static-register)* -*Defined in [lib/source-destination/source-destination.ts:270](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L270)* +*Defined in [lib/source-destination/source-destination.ts:293](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L293)* **Parameters:** diff --git a/doc/classes/blockdeviceadapter.md b/doc/classes/blockdeviceadapter.md index 49b793b7..3cae3bb4 100644 --- a/doc/classes/blockdeviceadapter.md +++ b/doc/classes/blockdeviceadapter.md @@ -34,10 +34,12 @@ * [listDrives](blockdeviceadapter.md#private-listdrives) * [listenerCount](blockdeviceadapter.md#listenercount) * [listeners](blockdeviceadapter.md#listeners) +* [off](blockdeviceadapter.md#off) * [on](blockdeviceadapter.md#on) * [once](blockdeviceadapter.md#once) * [prependListener](blockdeviceadapter.md#prependlistener) * [prependOnceListener](blockdeviceadapter.md#prependoncelistener) +* [rawListeners](blockdeviceadapter.md#rawlisteners) * [removeAllListeners](blockdeviceadapter.md#removealllisteners) * [removeListener](blockdeviceadapter.md#removelistener) * [scan](blockdeviceadapter.md#private-scan) @@ -51,21 +53,20 @@ ### constructor -\+ **new BlockDeviceAdapter**(`includeSystemDrives`: function, `unmountOnSuccess`: boolean, `oWrite`: boolean, `oDirect`: boolean): *[BlockDeviceAdapter](blockdeviceadapter.md)* +\+ **new BlockDeviceAdapter**(`__namedParameters`: object): *[BlockDeviceAdapter](blockdeviceadapter.md)* -*Defined in [lib/scanner/adapters/block-device.ts:60](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/scanner/adapters/block-device.ts#L60)* +*Defined in [lib/scanner/adapters/block-device.ts:64](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/scanner/adapters/block-device.ts#L64)* **Parameters:** -▪`Default value` **includeSystemDrives**: *function*= () => false +▪ **__namedParameters**: *object* -▸ (): *boolean* - -▪`Default value` **unmountOnSuccess**: *boolean*= false - -▪`Default value` **oWrite**: *boolean*= false - -▪`Default value` **oDirect**: *boolean*= true +Name | Type | Default | +------ | ------ | ------ | +`direct` | boolean | true | +`unmountOnSuccess` | boolean | false | +`write` | boolean | false | +`includeSystemDrives` | | - | **Returns:** *[BlockDeviceAdapter](blockdeviceadapter.md)* @@ -75,7 +76,7 @@ • **drives**: *Map‹string, [BlockDevice](blockdevice.md)›* = new Map() -*Defined in [lib/scanner/adapters/block-device.ts:58](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/scanner/adapters/block-device.ts#L58)* +*Defined in [lib/scanner/adapters/block-device.ts:62](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/scanner/adapters/block-device.ts#L62)* ___ @@ -83,7 +84,7 @@ ___ • **includeSystemDrives**: *function* -*Defined in [lib/scanner/adapters/block-device.ts:63](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/scanner/adapters/block-device.ts#L63)* +*Defined in [lib/scanner/adapters/block-device.ts:58](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/scanner/adapters/block-device.ts#L58)* #### Type declaration: @@ -95,7 +96,7 @@ ___ • **oDirect**: *boolean* -*Defined in [lib/scanner/adapters/block-device.ts:66](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/scanner/adapters/block-device.ts#L66)* +*Defined in [lib/scanner/adapters/block-device.ts:61](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/scanner/adapters/block-device.ts#L61)* ___ @@ -103,7 +104,7 @@ ___ • **oWrite**: *boolean* -*Defined in [lib/scanner/adapters/block-device.ts:65](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/scanner/adapters/block-device.ts#L65)* +*Defined in [lib/scanner/adapters/block-device.ts:60](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/scanner/adapters/block-device.ts#L60)* ___ @@ -111,7 +112,7 @@ ___ • **ready**: *boolean* = false -*Defined in [lib/scanner/adapters/block-device.ts:60](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/scanner/adapters/block-device.ts#L60)* +*Defined in [lib/scanner/adapters/block-device.ts:64](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/scanner/adapters/block-device.ts#L64)* ___ @@ -119,7 +120,7 @@ ___ • **running**: *boolean* = false -*Defined in [lib/scanner/adapters/block-device.ts:59](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/scanner/adapters/block-device.ts#L59)* +*Defined in [lib/scanner/adapters/block-device.ts:63](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/scanner/adapters/block-device.ts#L63)* ___ @@ -127,7 +128,7 @@ ___ • **unmountOnSuccess**: *boolean* -*Defined in [lib/scanner/adapters/block-device.ts:64](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/scanner/adapters/block-device.ts#L64)* +*Defined in [lib/scanner/adapters/block-device.ts:59](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/scanner/adapters/block-device.ts#L59)* ___ @@ -137,7 +138,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[defaultMaxListeners](countingwritable.md#static-defaultmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:896 +Defined in node_modules/@types/node/events.d.ts:18 ## Methods @@ -149,7 +150,7 @@ Defined in node_modules/@types/node/base.d.ts:896 *Overrides [SparseReadable](../interfaces/sparsereadable.md).[addListener](../interfaces/sparsereadable.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:898 +Defined in node_modules/@types/node/events.d.ts:20 **Parameters:** @@ -177,7 +178,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[emit](../interfaces/sparsereadable.md#emit)* -Defined in node_modules/@types/node/base.d.ts:908 +Defined in node_modules/@types/node/events.d.ts:32 **Parameters:** @@ -198,7 +199,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[eventNames](../interfaces/sparsereadable.md#eventnames)* -Defined in node_modules/@types/node/base.d.ts:909 +Defined in node_modules/@types/node/events.d.ts:33 **Returns:** *Array‹string | symbol›* @@ -212,7 +213,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[getMaxListeners](../interfaces/sparsereadable.md#getmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:906 +Defined in node_modules/@types/node/events.d.ts:29 **Returns:** *number* @@ -222,7 +223,7 @@ ___ ▸ **listDrives**(): *Promise‹Map‹string, [DrivelistDrive](../interfaces/drivelistdrive.md)››* -*Defined in [lib/scanner/adapters/block-device.ts:117](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/scanner/adapters/block-device.ts#L117)* +*Defined in [lib/scanner/adapters/block-device.ts:130](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/scanner/adapters/block-device.ts#L130)* **Returns:** *Promise‹Map‹string, [DrivelistDrive](../interfaces/drivelistdrive.md)››* @@ -236,7 +237,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[listenerCount](../interfaces/sparsereadable.md#listenercount)* -Defined in node_modules/@types/node/base.d.ts:910 +Defined in node_modules/@types/node/events.d.ts:34 **Parameters:** @@ -256,7 +257,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[listeners](../interfaces/sparsereadable.md#listeners)* -Defined in node_modules/@types/node/base.d.ts:907 +Defined in node_modules/@types/node/events.d.ts:30 **Parameters:** @@ -268,6 +269,34 @@ Name | Type | ___ +### off + +▸ **off**(`event`: string | symbol, `listener`: function): *this* + +*Inherited from [CountingWritable](countingwritable.md).[off](countingwritable.md#off)* + +*Overrides [SparseReadable](../interfaces/sparsereadable.md).[off](../interfaces/sparsereadable.md#off)* + +Defined in node_modules/@types/node/events.d.ts:26 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* + +**Parameters:** + +Name | Type | +------ | ------ | +`...args` | any[] | + +**Returns:** *this* + +___ + ### on ▸ **on**(`event`: string | symbol, `listener`: function): *this* @@ -276,7 +305,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[on](../interfaces/sparsereadable.md#on)* -Defined in node_modules/@types/node/base.d.ts:899 +Defined in node_modules/@types/node/events.d.ts:21 **Parameters:** @@ -304,7 +333,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[once](../interfaces/sparsereadable.md#once)* -Defined in node_modules/@types/node/base.d.ts:900 +Defined in node_modules/@types/node/events.d.ts:22 **Parameters:** @@ -332,7 +361,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[prependListener](../interfaces/sparsereadable.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:901 +Defined in node_modules/@types/node/events.d.ts:23 **Parameters:** @@ -360,7 +389,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[prependOnceListener](../interfaces/sparsereadable.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:902 +Defined in node_modules/@types/node/events.d.ts:24 **Parameters:** @@ -380,6 +409,26 @@ Name | Type | ___ +### rawListeners + +▸ **rawListeners**(`event`: string | symbol): *Function[]* + +*Inherited from [CountingWritable](countingwritable.md).[rawListeners](countingwritable.md#rawlisteners)* + +*Overrides [SparseReadable](../interfaces/sparsereadable.md).[rawListeners](../interfaces/sparsereadable.md#rawlisteners)* + +Defined in node_modules/@types/node/events.d.ts:31 + +**Parameters:** + +Name | Type | +------ | ------ | +`event` | string | symbol | + +**Returns:** *Function[]* + +___ + ### removeAllListeners ▸ **removeAllListeners**(`event?`: string | symbol): *this* @@ -388,7 +437,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[removeAllListeners](../interfaces/sparsereadable.md#removealllisteners)* -Defined in node_modules/@types/node/base.d.ts:904 +Defined in node_modules/@types/node/events.d.ts:27 **Parameters:** @@ -408,7 +457,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[removeListener](../interfaces/sparsereadable.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:903 +Defined in node_modules/@types/node/events.d.ts:25 **Parameters:** @@ -432,7 +481,7 @@ ___ ▸ **scan**(): *Promise‹void›* -*Defined in [lib/scanner/adapters/block-device.ts:93](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/scanner/adapters/block-device.ts#L93)* +*Defined in [lib/scanner/adapters/block-device.ts:106](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/scanner/adapters/block-device.ts#L106)* **Returns:** *Promise‹void›* @@ -442,7 +491,7 @@ ___ ▸ **scanLoop**(): *Promise‹void›* -*Defined in [lib/scanner/adapters/block-device.ts:82](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/scanner/adapters/block-device.ts#L82)* +*Defined in [lib/scanner/adapters/block-device.ts:95](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/scanner/adapters/block-device.ts#L95)* **Returns:** *Promise‹void›* @@ -456,7 +505,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[setMaxListeners](../interfaces/sparsereadable.md#setmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:905 +Defined in node_modules/@types/node/events.d.ts:28 **Parameters:** @@ -474,7 +523,7 @@ ___ *Overrides [Adapter](adapter.md).[start](adapter.md#abstract-start)* -*Defined in [lib/scanner/adapters/block-device.ts:71](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/scanner/adapters/block-device.ts#L71)* +*Defined in [lib/scanner/adapters/block-device.ts:84](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/scanner/adapters/block-device.ts#L84)* **Returns:** *void* @@ -486,7 +535,7 @@ ___ *Overrides [Adapter](adapter.md).[stop](adapter.md#abstract-stop)* -*Defined in [lib/scanner/adapters/block-device.ts:76](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/scanner/adapters/block-device.ts#L76)* +*Defined in [lib/scanner/adapters/block-device.ts:89](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/scanner/adapters/block-device.ts#L89)* **Returns:** *void* @@ -498,7 +547,9 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[listenerCount](countingwritable.md#static-listenercount)* -Defined in node_modules/@types/node/base.d.ts:895 +Defined in node_modules/@types/node/events.d.ts:17 + +**`deprecated`** since v4.0.0 **Parameters:** diff --git a/doc/classes/blockreadstream.md b/doc/classes/blockreadstream.md index f04d7985..4d359ccd 100644 --- a/doc/classes/blockreadstream.md +++ b/doc/classes/blockreadstream.md @@ -26,11 +26,13 @@ * [maxRetries](blockreadstream.md#private-maxretries) * [readable](blockreadstream.md#readable) * [readableHighWaterMark](blockreadstream.md#readablehighwatermark) +* [readableLength](blockreadstream.md#readablelength) * [source](blockreadstream.md#private-source) * [defaultMaxListeners](blockreadstream.md#static-defaultmaxlisteners) ### Methods +* [[Symbol.asyncIterator]](blockreadstream.md#[symbol.asynciterator]) * [_destroy](blockreadstream.md#_destroy) * [_read](blockreadstream.md#_read) * [addListener](blockreadstream.md#addlistener) @@ -41,6 +43,7 @@ * [isPaused](blockreadstream.md#ispaused) * [listenerCount](blockreadstream.md#listenercount) * [listeners](blockreadstream.md#listeners) +* [off](blockreadstream.md#off) * [on](blockreadstream.md#on) * [once](blockreadstream.md#once) * [pause](blockreadstream.md#pause) @@ -48,6 +51,7 @@ * [prependListener](blockreadstream.md#prependlistener) * [prependOnceListener](blockreadstream.md#prependoncelistener) * [push](blockreadstream.md#push) +* [rawListeners](blockreadstream.md#rawlisteners) * [read](blockreadstream.md#read) * [removeAllListeners](blockreadstream.md#removealllisteners) * [removeListener](blockreadstream.md#removelistener) @@ -68,7 +72,7 @@ *Overrides void* -*Defined in [lib/block-read-stream.ts:36](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/block-read-stream.ts#L36)* +*Defined in [lib/block-read-stream.ts:36](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/block-read-stream.ts#L36)* **Parameters:** @@ -92,7 +96,7 @@ Name | Type | Default | • **alignedReadableState**: *[AlignedReadableState](alignedreadablestate.md)* -*Defined in [lib/block-read-stream.ts:33](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/block-read-stream.ts#L33)* +*Defined in [lib/block-read-stream.ts:33](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/block-read-stream.ts#L33)* ___ @@ -100,7 +104,7 @@ ___ • **bytesRead**: *number* = 0 -*Defined in [lib/block-read-stream.ts:34](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/block-read-stream.ts#L34)* +*Defined in [lib/block-read-stream.ts:34](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/block-read-stream.ts#L34)* ___ @@ -108,7 +112,7 @@ ___ • **end**: *number* -*Defined in [lib/block-read-stream.ts:35](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/block-read-stream.ts#L35)* +*Defined in [lib/block-read-stream.ts:35](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/block-read-stream.ts#L35)* ___ @@ -116,7 +120,7 @@ ___ • **maxRetries**: *number* -*Defined in [lib/block-read-stream.ts:36](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/block-read-stream.ts#L36)* +*Defined in [lib/block-read-stream.ts:36](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/block-read-stream.ts#L36)* ___ @@ -126,7 +130,7 @@ ___ *Inherited from [SparseFilterStream](sparsefilterstream.md).[readable](sparsefilterstream.md#readable)* -Defined in node_modules/@types/node/base.d.ts:5422 +Defined in node_modules/@types/node/stream.d.ts:20 ___ @@ -136,7 +140,17 @@ ___ *Inherited from [SparseFilterStream](sparsefilterstream.md).[readableHighWaterMark](sparsefilterstream.md#readablehighwatermark)* -Defined in node_modules/@types/node/base.d.ts:5423 +Defined in node_modules/@types/node/stream.d.ts:21 + +___ + +### readableLength + +• **readableLength**: *number* + +*Inherited from [SparseFilterStream](sparsefilterstream.md).[readableLength](sparsefilterstream.md#readablelength)* + +Defined in node_modules/@types/node/stream.d.ts:22 ___ @@ -144,7 +158,7 @@ ___ • **source**: *[File](file.md)* -*Defined in [lib/block-read-stream.ts:32](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/block-read-stream.ts#L32)* +*Defined in [lib/block-read-stream.ts:32](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/block-read-stream.ts#L32)* ___ @@ -154,17 +168,29 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[defaultMaxListeners](countingwritable.md#static-defaultmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:896 +Defined in node_modules/@types/node/events.d.ts:18 ## Methods +### [Symbol.asyncIterator] + +▸ **[Symbol.asyncIterator]**(): *AsyncIterableIterator‹any›* + +*Inherited from [SparseFilterStream](sparsefilterstream.md).[[Symbol.asyncIterator]](sparsefilterstream.md#[symbol.asynciterator])* + +Defined in node_modules/@types/node/stream.d.ts:95 + +**Returns:** *AsyncIterableIterator‹any›* + +___ + ### _destroy ▸ **_destroy**(`error`: [Error](notcapable.md#static-error) | null, `callback`: function): *void* *Inherited from [SparseReadStream](sparsereadstream.md).[_destroy](sparsereadstream.md#_destroy)* -Defined in node_modules/@types/node/base.d.ts:5435 +Defined in node_modules/@types/node/stream.d.ts:34 **Parameters:** @@ -172,13 +198,13 @@ Defined in node_modules/@types/node/base.d.ts:5435 ▪ **callback**: *function* -▸ (`error?`: [Error](notcapable.md#static-error)): *void* +▸ (`error`: [Error](notcapable.md#static-error) | null): *void* **Parameters:** Name | Type | ------ | ------ | -`error?` | [Error](notcapable.md#static-error) | +`error` | [Error](notcapable.md#static-error) | null | **Returns:** *void* @@ -190,7 +216,7 @@ ___ *Overrides [SparseFilterStream](sparsefilterstream.md).[_read](sparsefilterstream.md#_read)* -*Defined in [lib/block-read-stream.ts:92](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/block-read-stream.ts#L92)* +*Defined in [lib/block-read-stream.ts:92](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/block-read-stream.ts#L92)* **Returns:** *Promise‹void›* @@ -198,13 +224,13 @@ ___ ### addListener -▸ **addListener**(`event`: string, `listener`: function): *this* +▸ **addListener**(`event`: "close", `listener`: function): *this* *Inherited from [SparseFilterStream](sparsefilterstream.md).[addListener](sparsefilterstream.md#addlistener)* *Overrides [SourceSource](sourcesource.md).[addListener](sourcesource.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:5447 +Defined in node_modules/@types/node/stream.d.ts:46 Event emitter The defined events on documents including: @@ -216,30 +242,6 @@ The defined events on documents including: **Parameters:** -▪ **event**: *string* - -▪ **listener**: *function* - -▸ (...`args`: any[]): *void* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | any[] | - -**Returns:** *this* - -▸ **addListener**(`event`: "close", `listener`: function): *this* - -*Inherited from [SparseFilterStream](sparsefilterstream.md).[addListener](sparsefilterstream.md#addlistener)* - -*Overrides [SourceSource](sourcesource.md).[addListener](sourcesource.md#addlistener)* - -Defined in node_modules/@types/node/base.d.ts:5448 - -**Parameters:** - ▪ **event**: *"close"* ▪ **listener**: *function* @@ -254,7 +256,7 @@ Defined in node_modules/@types/node/base.d.ts:5448 *Overrides [SourceSource](sourcesource.md).[addListener](sourcesource.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:5449 +Defined in node_modules/@types/node/stream.d.ts:47 **Parameters:** @@ -262,13 +264,13 @@ Defined in node_modules/@types/node/base.d.ts:5449 ▪ **listener**: *function* -▸ (`chunk`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string): *void* +▸ (`chunk`: any): *void* **Parameters:** Name | Type | ------ | ------ | -`chunk` | [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string | +`chunk` | any | **Returns:** *this* @@ -278,7 +280,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[addListener](sourcesource.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:5450 +Defined in node_modules/@types/node/stream.d.ts:48 **Parameters:** @@ -296,7 +298,7 @@ Defined in node_modules/@types/node/base.d.ts:5450 *Overrides [SourceSource](sourcesource.md).[addListener](sourcesource.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:5451 +Defined in node_modules/@types/node/stream.d.ts:49 **Parameters:** @@ -314,7 +316,7 @@ Defined in node_modules/@types/node/base.d.ts:5451 *Overrides [SourceSource](sourcesource.md).[addListener](sourcesource.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:5452 +Defined in node_modules/@types/node/stream.d.ts:50 **Parameters:** @@ -332,44 +334,51 @@ Name | Type | **Returns:** *this* -___ +▸ **addListener**(`event`: string | symbol, `listener`: function): *this* -### destroy +*Inherited from [SparseFilterStream](sparsefilterstream.md).[addListener](sparsefilterstream.md#addlistener)* -▸ **destroy**(`error?`: [Error](notcapable.md#static-error)): *void* +*Overrides [SourceSource](sourcesource.md).[addListener](sourcesource.md#addlistener)* -*Inherited from [SparseReadStream](sparsereadstream.md).[destroy](sparsereadstream.md#destroy)* +Defined in node_modules/@types/node/stream.d.ts:51 -Defined in node_modules/@types/node/base.d.ts:5436 +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`error?` | [Error](notcapable.md#static-error) | +`...args` | any[] | -**Returns:** *void* +**Returns:** *this* ___ -### emit - -▸ **emit**(`event`: string | symbol, ...`args`: any[]): *boolean* +### destroy -*Inherited from [SparseFilterStream](sparsefilterstream.md).[emit](sparsefilterstream.md#emit)* +▸ **destroy**(`error?`: [Error](notcapable.md#static-error)): *void* -*Overrides [SourceSource](sourcesource.md).[emit](sourcesource.md#emit)* +*Inherited from [SparseFilterStream](sparsefilterstream.md).[destroy](sparsefilterstream.md#destroy)* -Defined in node_modules/@types/node/base.d.ts:5454 +Defined in node_modules/@types/node/stream.d.ts:35 **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`...args` | any[] | +`error?` | [Error](notcapable.md#static-error) | -**Returns:** *boolean* +**Returns:** *void* + +___ + +### emit ▸ **emit**(`event`: "close"): *boolean* @@ -377,7 +386,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[emit](sourcesource.md#emit)* -Defined in node_modules/@types/node/base.d.ts:5455 +Defined in node_modules/@types/node/stream.d.ts:53 **Parameters:** @@ -387,20 +396,20 @@ Name | Type | **Returns:** *boolean* -▸ **emit**(`event`: "data", `chunk`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string): *boolean* +▸ **emit**(`event`: "data", `chunk`: any): *boolean* *Inherited from [SparseFilterStream](sparsefilterstream.md).[emit](sparsefilterstream.md#emit)* *Overrides [SourceSource](sourcesource.md).[emit](sourcesource.md#emit)* -Defined in node_modules/@types/node/base.d.ts:5456 +Defined in node_modules/@types/node/stream.d.ts:54 **Parameters:** Name | Type | ------ | ------ | `event` | "data" | -`chunk` | [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string | +`chunk` | any | **Returns:** *boolean* @@ -410,7 +419,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[emit](sourcesource.md#emit)* -Defined in node_modules/@types/node/base.d.ts:5457 +Defined in node_modules/@types/node/stream.d.ts:55 **Parameters:** @@ -426,7 +435,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[emit](sourcesource.md#emit)* -Defined in node_modules/@types/node/base.d.ts:5458 +Defined in node_modules/@types/node/stream.d.ts:56 **Parameters:** @@ -442,7 +451,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[emit](sourcesource.md#emit)* -Defined in node_modules/@types/node/base.d.ts:5459 +Defined in node_modules/@types/node/stream.d.ts:57 **Parameters:** @@ -453,6 +462,23 @@ Name | Type | **Returns:** *boolean* +▸ **emit**(`event`: string | symbol, ...`args`: any[]): *boolean* + +*Inherited from [SparseFilterStream](sparsefilterstream.md).[emit](sparsefilterstream.md#emit)* + +*Overrides [SourceSource](sourcesource.md).[emit](sourcesource.md#emit)* + +Defined in node_modules/@types/node/stream.d.ts:58 + +**Parameters:** + +Name | Type | +------ | ------ | +`event` | string | symbol | +`...args` | any[] | + +**Returns:** *boolean* + ___ ### eventNames @@ -461,7 +487,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[eventNames](countingwritable.md#eventnames)* -Defined in node_modules/@types/node/base.d.ts:909 +Defined in node_modules/@types/node/events.d.ts:33 **Returns:** *Array‹string | symbol›* @@ -473,7 +499,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[getMaxListeners](countingwritable.md#getmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:906 +Defined in node_modules/@types/node/events.d.ts:29 **Returns:** *number* @@ -485,7 +511,7 @@ ___ *Inherited from [SparseFilterStream](sparsefilterstream.md).[isPaused](sparsefilterstream.md#ispaused)* -Defined in node_modules/@types/node/base.d.ts:5430 +Defined in node_modules/@types/node/stream.d.ts:29 **Returns:** *boolean* @@ -497,7 +523,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[listenerCount](countingwritable.md#static-listenercount)* -Defined in node_modules/@types/node/base.d.ts:910 +Defined in node_modules/@types/node/events.d.ts:34 **Parameters:** @@ -515,7 +541,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[listeners](countingwritable.md#listeners)* -Defined in node_modules/@types/node/base.d.ts:907 +Defined in node_modules/@types/node/events.d.ts:30 **Parameters:** @@ -527,19 +553,17 @@ Name | Type | ___ -### on - -▸ **on**(`event`: string, `listener`: function): *this* +### off -*Inherited from [SparseFilterStream](sparsefilterstream.md).[on](sparsefilterstream.md#on)* +▸ **off**(`event`: string | symbol, `listener`: function): *this* -*Overrides [SourceSource](sourcesource.md).[on](sourcesource.md#on)* +*Inherited from [CountingWritable](countingwritable.md).[off](countingwritable.md#off)* -Defined in node_modules/@types/node/base.d.ts:5461 +Defined in node_modules/@types/node/events.d.ts:26 **Parameters:** -▪ **event**: *string* +▪ **event**: *string | symbol* ▪ **listener**: *function* @@ -553,13 +577,17 @@ Name | Type | **Returns:** *this* +___ + +### on + ▸ **on**(`event`: "close", `listener`: function): *this* *Inherited from [SparseFilterStream](sparsefilterstream.md).[on](sparsefilterstream.md#on)* *Overrides [SourceSource](sourcesource.md).[on](sourcesource.md#on)* -Defined in node_modules/@types/node/base.d.ts:5462 +Defined in node_modules/@types/node/stream.d.ts:60 **Parameters:** @@ -577,7 +605,7 @@ Defined in node_modules/@types/node/base.d.ts:5462 *Overrides [SourceSource](sourcesource.md).[on](sourcesource.md#on)* -Defined in node_modules/@types/node/base.d.ts:5463 +Defined in node_modules/@types/node/stream.d.ts:61 **Parameters:** @@ -585,13 +613,13 @@ Defined in node_modules/@types/node/base.d.ts:5463 ▪ **listener**: *function* -▸ (`chunk`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string): *void* +▸ (`chunk`: any): *void* **Parameters:** Name | Type | ------ | ------ | -`chunk` | [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string | +`chunk` | any | **Returns:** *this* @@ -601,7 +629,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[on](sourcesource.md#on)* -Defined in node_modules/@types/node/base.d.ts:5464 +Defined in node_modules/@types/node/stream.d.ts:62 **Parameters:** @@ -619,7 +647,7 @@ Defined in node_modules/@types/node/base.d.ts:5464 *Overrides [SourceSource](sourcesource.md).[on](sourcesource.md#on)* -Defined in node_modules/@types/node/base.d.ts:5465 +Defined in node_modules/@types/node/stream.d.ts:63 **Parameters:** @@ -637,7 +665,7 @@ Defined in node_modules/@types/node/base.d.ts:5465 *Overrides [SourceSource](sourcesource.md).[on](sourcesource.md#on)* -Defined in node_modules/@types/node/base.d.ts:5466 +Defined in node_modules/@types/node/stream.d.ts:64 **Parameters:** @@ -655,21 +683,17 @@ Name | Type | **Returns:** *this* -___ - -### once - -▸ **once**(`event`: string, `listener`: function): *this* +▸ **on**(`event`: string | symbol, `listener`: function): *this* -*Inherited from [SparseFilterStream](sparsefilterstream.md).[once](sparsefilterstream.md#once)* +*Inherited from [SparseFilterStream](sparsefilterstream.md).[on](sparsefilterstream.md#on)* -*Overrides [SourceSource](sourcesource.md).[once](sourcesource.md#once)* +*Overrides [SourceSource](sourcesource.md).[on](sourcesource.md#on)* -Defined in node_modules/@types/node/base.d.ts:5468 +Defined in node_modules/@types/node/stream.d.ts:65 **Parameters:** -▪ **event**: *string* +▪ **event**: *string | symbol* ▪ **listener**: *function* @@ -683,13 +707,17 @@ Name | Type | **Returns:** *this* +___ + +### once + ▸ **once**(`event`: "close", `listener`: function): *this* *Inherited from [SparseFilterStream](sparsefilterstream.md).[once](sparsefilterstream.md#once)* *Overrides [SourceSource](sourcesource.md).[once](sourcesource.md#once)* -Defined in node_modules/@types/node/base.d.ts:5469 +Defined in node_modules/@types/node/stream.d.ts:67 **Parameters:** @@ -707,7 +735,7 @@ Defined in node_modules/@types/node/base.d.ts:5469 *Overrides [SourceSource](sourcesource.md).[once](sourcesource.md#once)* -Defined in node_modules/@types/node/base.d.ts:5470 +Defined in node_modules/@types/node/stream.d.ts:68 **Parameters:** @@ -715,13 +743,13 @@ Defined in node_modules/@types/node/base.d.ts:5470 ▪ **listener**: *function* -▸ (`chunk`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string): *void* +▸ (`chunk`: any): *void* **Parameters:** Name | Type | ------ | ------ | -`chunk` | [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string | +`chunk` | any | **Returns:** *this* @@ -731,7 +759,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[once](sourcesource.md#once)* -Defined in node_modules/@types/node/base.d.ts:5471 +Defined in node_modules/@types/node/stream.d.ts:69 **Parameters:** @@ -749,7 +777,7 @@ Defined in node_modules/@types/node/base.d.ts:5471 *Overrides [SourceSource](sourcesource.md).[once](sourcesource.md#once)* -Defined in node_modules/@types/node/base.d.ts:5472 +Defined in node_modules/@types/node/stream.d.ts:70 **Parameters:** @@ -767,7 +795,7 @@ Defined in node_modules/@types/node/base.d.ts:5472 *Overrides [SourceSource](sourcesource.md).[once](sourcesource.md#once)* -Defined in node_modules/@types/node/base.d.ts:5473 +Defined in node_modules/@types/node/stream.d.ts:71 **Parameters:** @@ -785,6 +813,30 @@ Name | Type | **Returns:** *this* +▸ **once**(`event`: string | symbol, `listener`: function): *this* + +*Inherited from [SparseFilterStream](sparsefilterstream.md).[once](sparsefilterstream.md#once)* + +*Overrides [SourceSource](sourcesource.md).[once](sourcesource.md#once)* + +Defined in node_modules/@types/node/stream.d.ts:72 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* + +**Parameters:** + +Name | Type | +------ | ------ | +`...args` | any[] | + +**Returns:** *this* + ___ ### pause @@ -793,7 +845,7 @@ ___ *Inherited from [SparseFilterStream](sparsefilterstream.md).[pause](sparsefilterstream.md#pause)* -Defined in node_modules/@types/node/base.d.ts:5428 +Defined in node_modules/@types/node/stream.d.ts:27 **Returns:** *this* @@ -805,7 +857,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[pipe](countingwritable.md#pipe)* -Defined in node_modules/@types/node/base.d.ts:5407 +Defined in node_modules/@types/node/stream.d.ts:5 **Type parameters:** @@ -824,37 +876,13 @@ ___ ### prependListener -▸ **prependListener**(`event`: string, `listener`: function): *this* - -*Inherited from [SparseFilterStream](sparsefilterstream.md).[prependListener](sparsefilterstream.md#prependlistener)* - -*Overrides [SourceSource](sourcesource.md).[prependListener](sourcesource.md#prependlistener)* - -Defined in node_modules/@types/node/base.d.ts:5475 - -**Parameters:** - -▪ **event**: *string* - -▪ **listener**: *function* - -▸ (...`args`: any[]): *void* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | any[] | - -**Returns:** *this* - ▸ **prependListener**(`event`: "close", `listener`: function): *this* *Inherited from [SparseFilterStream](sparsefilterstream.md).[prependListener](sparsefilterstream.md#prependlistener)* *Overrides [SourceSource](sourcesource.md).[prependListener](sourcesource.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:5476 +Defined in node_modules/@types/node/stream.d.ts:74 **Parameters:** @@ -872,7 +900,7 @@ Defined in node_modules/@types/node/base.d.ts:5476 *Overrides [SourceSource](sourcesource.md).[prependListener](sourcesource.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:5477 +Defined in node_modules/@types/node/stream.d.ts:75 **Parameters:** @@ -880,13 +908,13 @@ Defined in node_modules/@types/node/base.d.ts:5477 ▪ **listener**: *function* -▸ (`chunk`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string): *void* +▸ (`chunk`: any): *void* **Parameters:** Name | Type | ------ | ------ | -`chunk` | [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string | +`chunk` | any | **Returns:** *this* @@ -896,7 +924,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[prependListener](sourcesource.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:5478 +Defined in node_modules/@types/node/stream.d.ts:76 **Parameters:** @@ -914,7 +942,7 @@ Defined in node_modules/@types/node/base.d.ts:5478 *Overrides [SourceSource](sourcesource.md).[prependListener](sourcesource.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:5479 +Defined in node_modules/@types/node/stream.d.ts:77 **Parameters:** @@ -932,7 +960,7 @@ Defined in node_modules/@types/node/base.d.ts:5479 *Overrides [SourceSource](sourcesource.md).[prependListener](sourcesource.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:5480 +Defined in node_modules/@types/node/stream.d.ts:78 **Parameters:** @@ -950,21 +978,17 @@ Name | Type | **Returns:** *this* -___ - -### prependOnceListener - -▸ **prependOnceListener**(`event`: string, `listener`: function): *this* +▸ **prependListener**(`event`: string | symbol, `listener`: function): *this* -*Inherited from [SparseFilterStream](sparsefilterstream.md).[prependOnceListener](sparsefilterstream.md#prependoncelistener)* +*Inherited from [SparseFilterStream](sparsefilterstream.md).[prependListener](sparsefilterstream.md#prependlistener)* -*Overrides [SourceSource](sourcesource.md).[prependOnceListener](sourcesource.md#prependoncelistener)* +*Overrides [SourceSource](sourcesource.md).[prependListener](sourcesource.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:5482 +Defined in node_modules/@types/node/stream.d.ts:79 **Parameters:** -▪ **event**: *string* +▪ **event**: *string | symbol* ▪ **listener**: *function* @@ -978,13 +1002,17 @@ Name | Type | **Returns:** *this* +___ + +### prependOnceListener + ▸ **prependOnceListener**(`event`: "close", `listener`: function): *this* *Inherited from [SparseFilterStream](sparsefilterstream.md).[prependOnceListener](sparsefilterstream.md#prependoncelistener)* *Overrides [SourceSource](sourcesource.md).[prependOnceListener](sourcesource.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:5483 +Defined in node_modules/@types/node/stream.d.ts:81 **Parameters:** @@ -1002,7 +1030,7 @@ Defined in node_modules/@types/node/base.d.ts:5483 *Overrides [SourceSource](sourcesource.md).[prependOnceListener](sourcesource.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:5484 +Defined in node_modules/@types/node/stream.d.ts:82 **Parameters:** @@ -1010,13 +1038,13 @@ Defined in node_modules/@types/node/base.d.ts:5484 ▪ **listener**: *function* -▸ (`chunk`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string): *void* +▸ (`chunk`: any): *void* **Parameters:** Name | Type | ------ | ------ | -`chunk` | [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string | +`chunk` | any | **Returns:** *this* @@ -1026,7 +1054,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[prependOnceListener](sourcesource.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:5485 +Defined in node_modules/@types/node/stream.d.ts:83 **Parameters:** @@ -1044,7 +1072,7 @@ Defined in node_modules/@types/node/base.d.ts:5485 *Overrides [SourceSource](sourcesource.md).[prependOnceListener](sourcesource.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:5486 +Defined in node_modules/@types/node/stream.d.ts:84 **Parameters:** @@ -1062,7 +1090,7 @@ Defined in node_modules/@types/node/base.d.ts:5486 *Overrides [SourceSource](sourcesource.md).[prependOnceListener](sourcesource.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:5487 +Defined in node_modules/@types/node/stream.d.ts:85 **Parameters:** @@ -1080,6 +1108,30 @@ Name | Type | **Returns:** *this* +▸ **prependOnceListener**(`event`: string | symbol, `listener`: function): *this* + +*Inherited from [SparseFilterStream](sparsefilterstream.md).[prependOnceListener](sparsefilterstream.md#prependoncelistener)* + +*Overrides [SourceSource](sourcesource.md).[prependOnceListener](sourcesource.md#prependoncelistener)* + +Defined in node_modules/@types/node/stream.d.ts:86 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* + +**Parameters:** + +Name | Type | +------ | ------ | +`...args` | any[] | + +**Returns:** *this* + ___ ### push @@ -1088,7 +1140,7 @@ ___ *Inherited from [SparseFilterStream](sparsefilterstream.md).[push](sparsefilterstream.md#push)* -Defined in node_modules/@types/node/base.d.ts:5434 +Defined in node_modules/@types/node/stream.d.ts:33 **Parameters:** @@ -1101,13 +1153,31 @@ Name | Type | ___ +### rawListeners + +▸ **rawListeners**(`event`: string | symbol): *Function[]* + +*Inherited from [CountingWritable](countingwritable.md).[rawListeners](countingwritable.md#rawlisteners)* + +Defined in node_modules/@types/node/events.d.ts:31 + +**Parameters:** + +Name | Type | +------ | ------ | +`event` | string | symbol | + +**Returns:** *Function[]* + +___ + ### read ▸ **read**(`size?`: undefined | number): *any* *Inherited from [SparseFilterStream](sparsefilterstream.md).[read](sparsefilterstream.md#read)* -Defined in node_modules/@types/node/base.d.ts:5426 +Defined in node_modules/@types/node/stream.d.ts:25 **Parameters:** @@ -1125,7 +1195,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[removeAllListeners](countingwritable.md#removealllisteners)* -Defined in node_modules/@types/node/base.d.ts:904 +Defined in node_modules/@types/node/events.d.ts:27 **Parameters:** @@ -1139,37 +1209,13 @@ ___ ### removeListener -▸ **removeListener**(`event`: string, `listener`: function): *this* - -*Inherited from [SparseFilterStream](sparsefilterstream.md).[removeListener](sparsefilterstream.md#removelistener)* - -*Overrides [SourceSource](sourcesource.md).[removeListener](sourcesource.md#removelistener)* - -Defined in node_modules/@types/node/base.d.ts:5489 - -**Parameters:** - -▪ **event**: *string* - -▪ **listener**: *function* - -▸ (...`args`: any[]): *void* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | any[] | - -**Returns:** *this* - ▸ **removeListener**(`event`: "close", `listener`: function): *this* *Inherited from [SparseFilterStream](sparsefilterstream.md).[removeListener](sparsefilterstream.md#removelistener)* *Overrides [SourceSource](sourcesource.md).[removeListener](sourcesource.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:5490 +Defined in node_modules/@types/node/stream.d.ts:88 **Parameters:** @@ -1187,7 +1233,7 @@ Defined in node_modules/@types/node/base.d.ts:5490 *Overrides [SourceSource](sourcesource.md).[removeListener](sourcesource.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:5491 +Defined in node_modules/@types/node/stream.d.ts:89 **Parameters:** @@ -1195,13 +1241,13 @@ Defined in node_modules/@types/node/base.d.ts:5491 ▪ **listener**: *function* -▸ (`chunk`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string): *void* +▸ (`chunk`: any): *void* **Parameters:** Name | Type | ------ | ------ | -`chunk` | [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string | +`chunk` | any | **Returns:** *this* @@ -1211,7 +1257,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[removeListener](sourcesource.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:5492 +Defined in node_modules/@types/node/stream.d.ts:90 **Parameters:** @@ -1229,7 +1275,7 @@ Defined in node_modules/@types/node/base.d.ts:5492 *Overrides [SourceSource](sourcesource.md).[removeListener](sourcesource.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:5493 +Defined in node_modules/@types/node/stream.d.ts:91 **Parameters:** @@ -1247,7 +1293,7 @@ Defined in node_modules/@types/node/base.d.ts:5493 *Overrides [SourceSource](sourcesource.md).[removeListener](sourcesource.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:5494 +Defined in node_modules/@types/node/stream.d.ts:92 **Parameters:** @@ -1265,6 +1311,30 @@ Name | Type | **Returns:** *this* +▸ **removeListener**(`event`: string | symbol, `listener`: function): *this* + +*Inherited from [SparseFilterStream](sparsefilterstream.md).[removeListener](sparsefilterstream.md#removelistener)* + +*Overrides [SourceSource](sourcesource.md).[removeListener](sourcesource.md#removelistener)* + +Defined in node_modules/@types/node/stream.d.ts:93 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* + +**Parameters:** + +Name | Type | +------ | ------ | +`...args` | any[] | + +**Returns:** *this* + ___ ### resume @@ -1273,7 +1343,7 @@ ___ *Inherited from [SparseFilterStream](sparsefilterstream.md).[resume](sparsefilterstream.md#resume)* -Defined in node_modules/@types/node/base.d.ts:5429 +Defined in node_modules/@types/node/stream.d.ts:28 **Returns:** *this* @@ -1285,7 +1355,7 @@ ___ *Inherited from [SparseFilterStream](sparsefilterstream.md).[setEncoding](sparsefilterstream.md#setencoding)* -Defined in node_modules/@types/node/base.d.ts:5427 +Defined in node_modules/@types/node/stream.d.ts:26 **Parameters:** @@ -1303,7 +1373,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[setMaxListeners](countingwritable.md#setmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:905 +Defined in node_modules/@types/node/events.d.ts:28 **Parameters:** @@ -1319,7 +1389,7 @@ ___ ▸ **tryRead**(`buffer`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer)): *Promise‹ReadResult›* -*Defined in [lib/block-read-stream.ts:71](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/block-read-stream.ts#L71)* +*Defined in [lib/block-read-stream.ts:71](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/block-read-stream.ts#L71)* **Parameters:** @@ -1333,21 +1403,17 @@ ___ ### unpipe -▸ **unpipe**<**T**>(`destination?`: T): *this* +▸ **unpipe**(`destination?`: NodeJS.WritableStream): *this* *Inherited from [SparseFilterStream](sparsefilterstream.md).[unpipe](sparsefilterstream.md#unpipe)* -Defined in node_modules/@types/node/base.d.ts:5431 - -**Type parameters:** - -▪ **T**: *WritableStream* +Defined in node_modules/@types/node/stream.d.ts:30 **Parameters:** Name | Type | ------ | ------ | -`destination?` | T | +`destination?` | NodeJS.WritableStream | **Returns:** *this* @@ -1359,7 +1425,7 @@ ___ *Inherited from [SparseFilterStream](sparsefilterstream.md).[unshift](sparsefilterstream.md#unshift)* -Defined in node_modules/@types/node/base.d.ts:5432 +Defined in node_modules/@types/node/stream.d.ts:31 **Parameters:** @@ -1377,7 +1443,7 @@ ___ *Inherited from [SparseFilterStream](sparsefilterstream.md).[wrap](sparsefilterstream.md#wrap)* -Defined in node_modules/@types/node/base.d.ts:5433 +Defined in node_modules/@types/node/stream.d.ts:32 **Parameters:** @@ -1395,7 +1461,9 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[listenerCount](countingwritable.md#static-listenercount)* -Defined in node_modules/@types/node/base.d.ts:895 +Defined in node_modules/@types/node/events.d.ts:17 + +**`deprecated`** since v4.0.0 **Parameters:** diff --git a/doc/classes/blocksverificationerror.md b/doc/classes/blocksverificationerror.md index f4016623..d8eed0c9 100644 --- a/doc/classes/blocksverificationerror.md +++ b/doc/classes/blocksverificationerror.md @@ -29,7 +29,7 @@ \+ **new BlocksVerificationError**(`blocks`: [BlocksWithChecksum](../interfaces/blockswithchecksum.md), `checksum`: string): *[BlocksVerificationError](blocksverificationerror.md)* -*Defined in [lib/errors.ts:48](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/errors.ts#L48)* +*Defined in [lib/errors.ts:48](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/errors.ts#L48)* **Parameters:** @@ -46,7 +46,7 @@ Name | Type | • **blocks**: *[BlocksWithChecksum](../interfaces/blockswithchecksum.md)* -*Defined in [lib/errors.ts:50](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/errors.ts#L50)* +*Defined in [lib/errors.ts:50](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/errors.ts#L50)* ___ @@ -54,7 +54,7 @@ ___ • **checksum**: *string* -*Defined in [lib/errors.ts:51](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/errors.ts#L51)* +*Defined in [lib/errors.ts:51](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/errors.ts#L51)* ___ @@ -64,7 +64,7 @@ ___ *Inherited from [VerificationError](verificationerror.md).[code](verificationerror.md#code)* -*Defined in [lib/errors.ts:24](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/errors.ts#L24)* +*Defined in [lib/errors.ts:24](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/errors.ts#L24)* ___ diff --git a/doc/classes/blocktransformstream.md b/doc/classes/blocktransformstream.md index fcfe9af7..a13485aa 100644 --- a/doc/classes/blocktransformstream.md +++ b/doc/classes/blocktransformstream.md @@ -29,12 +29,15 @@ * [inputBytes](blocktransformstream.md#private-inputbytes) * [readable](blocktransformstream.md#readable) * [readableHighWaterMark](blocktransformstream.md#readablehighwatermark) +* [readableLength](blocktransformstream.md#readablelength) * [writable](blocktransformstream.md#writable) * [writableHighWaterMark](blocktransformstream.md#writablehighwatermark) +* [writableLength](blocktransformstream.md#writablelength) * [defaultMaxListeners](blocktransformstream.md#static-defaultmaxlisteners) ### Methods +* [[Symbol.asyncIterator]](blocktransformstream.md#[symbol.asynciterator]) * [_destroy](blocktransformstream.md#_destroy) * [_final](blocktransformstream.md#_final) * [_flush](blocktransformstream.md#_flush) @@ -52,6 +55,7 @@ * [isPaused](blocktransformstream.md#ispaused) * [listenerCount](blocktransformstream.md#listenercount) * [listeners](blocktransformstream.md#listeners) +* [off](blocktransformstream.md#off) * [on](blocktransformstream.md#on) * [once](blocktransformstream.md#once) * [pause](blocktransformstream.md#pause) @@ -59,6 +63,7 @@ * [prependListener](blocktransformstream.md#prependlistener) * [prependOnceListener](blocktransformstream.md#prependoncelistener) * [push](blocktransformstream.md#push) +* [rawListeners](blocktransformstream.md#rawlisteners) * [read](blocktransformstream.md#read) * [removeAllListeners](blocktransformstream.md#removealllisteners) * [removeListener](blocktransformstream.md#removelistener) @@ -83,7 +88,7 @@ *Overrides [SourceTransform](../interfaces/sourcetransform.md).[constructor](../interfaces/sourcetransform.md#constructor)* -*Defined in [lib/block-transform-stream.ts:28](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/block-transform-stream.ts#L28)* +*Defined in [lib/block-transform-stream.ts:29](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/block-transform-stream.ts#L29)* **Parameters:** @@ -103,7 +108,7 @@ Name | Type | Default | • **alignedReadableState**: *[AlignedReadableState](alignedreadablestate.md)* -*Defined in [lib/block-transform-stream.ts:26](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/block-transform-stream.ts#L26)* +*Defined in [lib/block-transform-stream.ts:27](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/block-transform-stream.ts#L27)* ___ @@ -111,7 +116,7 @@ ___ • **bytesRead**: *number* = 0 -*Defined in [lib/block-transform-stream.ts:23](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/block-transform-stream.ts#L23)* +*Defined in [lib/block-transform-stream.ts:24](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/block-transform-stream.ts#L24)* ___ @@ -119,7 +124,7 @@ ___ • **bytesWritten**: *number* = 0 -*Defined in [lib/block-transform-stream.ts:24](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/block-transform-stream.ts#L24)* +*Defined in [lib/block-transform-stream.ts:25](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/block-transform-stream.ts#L25)* ___ @@ -127,7 +132,7 @@ ___ • **chunkSize**: *number* -*Defined in [lib/block-transform-stream.ts:25](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/block-transform-stream.ts#L25)* +*Defined in [lib/block-transform-stream.ts:26](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/block-transform-stream.ts#L26)* ___ @@ -135,7 +140,7 @@ ___ • **inputBuffers**: *[Buffer](../interfaces/alignedlockablebuffer.md#buffer)[]* = [] -*Defined in [lib/block-transform-stream.ts:27](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/block-transform-stream.ts#L27)* +*Defined in [lib/block-transform-stream.ts:28](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/block-transform-stream.ts#L28)* ___ @@ -143,7 +148,7 @@ ___ • **inputBytes**: *number* = 0 -*Defined in [lib/block-transform-stream.ts:28](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/block-transform-stream.ts#L28)* +*Defined in [lib/block-transform-stream.ts:29](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/block-transform-stream.ts#L29)* ___ @@ -153,7 +158,7 @@ ___ *Inherited from [SparseFilterStream](sparsefilterstream.md).[readable](sparsefilterstream.md#readable)* -Defined in node_modules/@types/node/base.d.ts:5422 +Defined in node_modules/@types/node/stream.d.ts:20 ___ @@ -163,7 +168,17 @@ ___ *Inherited from [SparseFilterStream](sparsefilterstream.md).[readableHighWaterMark](sparsefilterstream.md#readablehighwatermark)* -Defined in node_modules/@types/node/base.d.ts:5423 +Defined in node_modules/@types/node/stream.d.ts:21 + +___ + +### readableLength + +• **readableLength**: *number* + +*Inherited from [SparseFilterStream](sparsefilterstream.md).[readableLength](sparsefilterstream.md#readablelength)* + +Defined in node_modules/@types/node/stream.d.ts:22 ___ @@ -173,7 +188,7 @@ ___ *Inherited from [SparseFilterStream](sparsefilterstream.md).[writable](sparsefilterstream.md#writable)* -Defined in node_modules/@types/node/base.d.ts:5600 +Defined in node_modules/@types/node/stream.d.ts:209 ___ @@ -183,7 +198,17 @@ ___ *Inherited from [SparseFilterStream](sparsefilterstream.md).[writableHighWaterMark](sparsefilterstream.md#writablehighwatermark)* -Defined in node_modules/@types/node/base.d.ts:5601 +Defined in node_modules/@types/node/stream.d.ts:210 + +___ + +### writableLength + +• **writableLength**: *number* + +*Inherited from [SparseFilterStream](sparsefilterstream.md).[writableLength](sparsefilterstream.md#writablelength)* + +Defined in node_modules/@types/node/stream.d.ts:211 ___ @@ -193,10 +218,22 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[defaultMaxListeners](countingwritable.md#static-defaultmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:896 +Defined in node_modules/@types/node/events.d.ts:18 ## Methods +### [Symbol.asyncIterator] + +▸ **[Symbol.asyncIterator]**(): *AsyncIterableIterator‹any›* + +*Inherited from [SparseFilterStream](sparsefilterstream.md).[[Symbol.asyncIterator]](sparsefilterstream.md#[symbol.asynciterator])* + +Defined in node_modules/@types/node/stream.d.ts:95 + +**Returns:** *AsyncIterableIterator‹any›* + +___ + ### _destroy ▸ **_destroy**(`error`: [Error](notcapable.md#static-error) | null, `callback`: function): *void* @@ -205,7 +242,7 @@ Defined in node_modules/@types/node/base.d.ts:896 *Overrides [SparseReadStream](sparsereadstream.md).[_destroy](sparsereadstream.md#_destroy)* -Defined in node_modules/@types/node/base.d.ts:5605 +Defined in node_modules/@types/node/stream.d.ts:215 **Parameters:** @@ -213,13 +250,13 @@ Defined in node_modules/@types/node/base.d.ts:5605 ▪ **callback**: *function* -▸ (`error?`: [Error](notcapable.md#static-error)): *void* +▸ (`error`: [Error](notcapable.md#static-error) | null): *void* **Parameters:** Name | Type | ------ | ------ | -`error?` | [Error](notcapable.md#static-error) | +`error` | [Error](notcapable.md#static-error) | null | **Returns:** *void* @@ -227,17 +264,23 @@ ___ ### _final -▸ **_final**(`callback`: Function): *void* +▸ **_final**(`callback`: function): *void* *Inherited from [SparseFilterStream](sparsefilterstream.md).[_final](sparsefilterstream.md#_final)* -Defined in node_modules/@types/node/base.d.ts:5606 +Defined in node_modules/@types/node/stream.d.ts:216 + +**Parameters:** + +▪ **callback**: *function* + +▸ (`error?`: [Error](notcapable.md#static-error) | null): *void* **Parameters:** Name | Type | ------ | ------ | -`callback` | Function | +`error?` | [Error](notcapable.md#static-error) | null | **Returns:** *void* @@ -245,9 +288,11 @@ ___ ### _flush -▸ **_flush**(`callback`: function): *Promise‹void›* +▸ **_flush**(`callback`: function): *void* -*Defined in [lib/block-transform-stream.ts:86](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/block-transform-stream.ts#L86)* +*Overrides [SparseFilterStream](sparsefilterstream.md).[_flush](sparsefilterstream.md#_flush)* + +*Defined in [lib/block-transform-stream.ts:89](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/block-transform-stream.ts#L89)* **Parameters:** @@ -261,7 +306,7 @@ Name | Type | ------ | ------ | `error?` | [Error](notcapable.md#static-error) | -**Returns:** *Promise‹void›* +**Returns:** *void* ___ @@ -271,7 +316,7 @@ ___ *Inherited from [SparseFilterStream](sparsefilterstream.md).[_read](sparsefilterstream.md#_read)* -Defined in node_modules/@types/node/base.d.ts:5425 +Defined in node_modules/@types/node/stream.d.ts:24 **Parameters:** @@ -285,11 +330,11 @@ ___ ### _transform -▸ **_transform**(`chunk`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer), `_encoding`: string, `callback`: function): *Promise‹void›* +▸ **_transform**(`chunk`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer), `_encoding`: string, `callback`: function): *void* *Overrides [SourceTransform](../interfaces/sourcetransform.md).[_transform](../interfaces/sourcetransform.md#_transform)* -*Defined in [lib/block-transform-stream.ts:74](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/block-transform-stream.ts#L74)* +*Defined in [lib/block-transform-stream.ts:78](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/block-transform-stream.ts#L78)* **Parameters:** @@ -307,7 +352,7 @@ Name | Type | ------ | ------ | `error?` | [Error](notcapable.md#static-error) | -**Returns:** *Promise‹void›* +**Returns:** *void* ___ @@ -317,7 +362,7 @@ ___ *Inherited from [SparseFilterStream](sparsefilterstream.md).[_write](sparsefilterstream.md#_write)* -Defined in node_modules/@types/node/base.d.ts:5603 +Defined in node_modules/@types/node/stream.d.ts:213 **Parameters:** @@ -327,13 +372,13 @@ Defined in node_modules/@types/node/base.d.ts:5603 ▪ **callback**: *function* -▸ (`err?`: [Error](notcapable.md#static-error)): *void* +▸ (`error?`: [Error](notcapable.md#static-error) | null): *void* **Parameters:** Name | Type | ------ | ------ | -`err?` | [Error](notcapable.md#static-error) | +`error?` | [Error](notcapable.md#static-error) | null | **Returns:** *void* @@ -345,7 +390,7 @@ ___ *Inherited from [SparseFilterStream](sparsefilterstream.md).[_writev](sparsefilterstream.md#optional-_writev)* -Defined in node_modules/@types/node/base.d.ts:5604 +Defined in node_modules/@types/node/stream.d.ts:214 **Parameters:** @@ -353,13 +398,13 @@ Defined in node_modules/@types/node/base.d.ts:5604 ▪ **callback**: *function* -▸ (`err?`: [Error](notcapable.md#static-error)): *void* +▸ (`error?`: [Error](notcapable.md#static-error) | null): *void* **Parameters:** Name | Type | ------ | ------ | -`err?` | [Error](notcapable.md#static-error) | +`error?` | [Error](notcapable.md#static-error) | null | **Returns:** *void* @@ -367,13 +412,13 @@ ___ ### addListener -▸ **addListener**(`event`: string, `listener`: function): *this* +▸ **addListener**(`event`: "close", `listener`: function): *this* *Inherited from [SparseFilterStream](sparsefilterstream.md).[addListener](sparsefilterstream.md#addlistener)* *Overrides [SourceSource](sourcesource.md).[addListener](sourcesource.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:5447 +Defined in node_modules/@types/node/stream.d.ts:46 Event emitter The defined events on documents including: @@ -385,30 +430,6 @@ The defined events on documents including: **Parameters:** -▪ **event**: *string* - -▪ **listener**: *function* - -▸ (...`args`: any[]): *void* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | any[] | - -**Returns:** *this* - -▸ **addListener**(`event`: "close", `listener`: function): *this* - -*Inherited from [SparseFilterStream](sparsefilterstream.md).[addListener](sparsefilterstream.md#addlistener)* - -*Overrides [SourceSource](sourcesource.md).[addListener](sourcesource.md#addlistener)* - -Defined in node_modules/@types/node/base.d.ts:5448 - -**Parameters:** - ▪ **event**: *"close"* ▪ **listener**: *function* @@ -423,7 +444,7 @@ Defined in node_modules/@types/node/base.d.ts:5448 *Overrides [SourceSource](sourcesource.md).[addListener](sourcesource.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:5449 +Defined in node_modules/@types/node/stream.d.ts:47 **Parameters:** @@ -431,13 +452,13 @@ Defined in node_modules/@types/node/base.d.ts:5449 ▪ **listener**: *function* -▸ (`chunk`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string): *void* +▸ (`chunk`: any): *void* **Parameters:** Name | Type | ------ | ------ | -`chunk` | [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string | +`chunk` | any | **Returns:** *this* @@ -447,7 +468,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[addListener](sourcesource.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:5450 +Defined in node_modules/@types/node/stream.d.ts:48 **Parameters:** @@ -465,7 +486,7 @@ Defined in node_modules/@types/node/base.d.ts:5450 *Overrides [SourceSource](sourcesource.md).[addListener](sourcesource.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:5451 +Defined in node_modules/@types/node/stream.d.ts:49 **Parameters:** @@ -483,7 +504,7 @@ Defined in node_modules/@types/node/base.d.ts:5451 *Overrides [SourceSource](sourcesource.md).[addListener](sourcesource.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:5452 +Defined in node_modules/@types/node/stream.d.ts:50 **Parameters:** @@ -501,6 +522,30 @@ Name | Type | **Returns:** *this* +▸ **addListener**(`event`: string | symbol, `listener`: function): *this* + +*Inherited from [SparseFilterStream](sparsefilterstream.md).[addListener](sparsefilterstream.md#addlistener)* + +*Overrides [SourceSource](sourcesource.md).[addListener](sourcesource.md#addlistener)* + +Defined in node_modules/@types/node/stream.d.ts:51 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* + +**Parameters:** + +Name | Type | +------ | ------ | +`...args` | any[] | + +**Returns:** *this* + ___ ### cork @@ -509,7 +554,7 @@ ___ *Inherited from [SparseFilterStream](sparsefilterstream.md).[cork](sparsefilterstream.md#cork)* -Defined in node_modules/@types/node/base.d.ts:5613 +Defined in node_modules/@types/node/stream.d.ts:223 **Returns:** *void* @@ -521,9 +566,7 @@ ___ *Inherited from [SparseFilterStream](sparsefilterstream.md).[destroy](sparsefilterstream.md#destroy)* -*Overrides [SparseReadStream](sparsereadstream.md).[destroy](sparsereadstream.md#destroy)* - -Defined in node_modules/@types/node/base.d.ts:5625 +Defined in node_modules/@types/node/stream.d.ts:35 **Parameters:** @@ -537,102 +580,102 @@ ___ ### emit -▸ **emit**(`event`: string | symbol, ...`args`: any[]): *boolean* +▸ **emit**(`event`: "close"): *boolean* *Inherited from [SparseFilterStream](sparsefilterstream.md).[emit](sparsefilterstream.md#emit)* *Overrides [SourceSource](sourcesource.md).[emit](sourcesource.md#emit)* -Defined in node_modules/@types/node/base.d.ts:5454 +Defined in node_modules/@types/node/stream.d.ts:53 **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`...args` | any[] | +`event` | "close" | **Returns:** *boolean* -▸ **emit**(`event`: "close"): *boolean* +▸ **emit**(`event`: "data", `chunk`: any): *boolean* *Inherited from [SparseFilterStream](sparsefilterstream.md).[emit](sparsefilterstream.md#emit)* *Overrides [SourceSource](sourcesource.md).[emit](sourcesource.md#emit)* -Defined in node_modules/@types/node/base.d.ts:5455 +Defined in node_modules/@types/node/stream.d.ts:54 **Parameters:** Name | Type | ------ | ------ | -`event` | "close" | +`event` | "data" | +`chunk` | any | **Returns:** *boolean* -▸ **emit**(`event`: "data", `chunk`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string): *boolean* +▸ **emit**(`event`: "end"): *boolean* *Inherited from [SparseFilterStream](sparsefilterstream.md).[emit](sparsefilterstream.md#emit)* *Overrides [SourceSource](sourcesource.md).[emit](sourcesource.md#emit)* -Defined in node_modules/@types/node/base.d.ts:5456 +Defined in node_modules/@types/node/stream.d.ts:55 **Parameters:** Name | Type | ------ | ------ | -`event` | "data" | -`chunk` | [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string | +`event` | "end" | **Returns:** *boolean* -▸ **emit**(`event`: "end"): *boolean* +▸ **emit**(`event`: "readable"): *boolean* *Inherited from [SparseFilterStream](sparsefilterstream.md).[emit](sparsefilterstream.md#emit)* *Overrides [SourceSource](sourcesource.md).[emit](sourcesource.md#emit)* -Defined in node_modules/@types/node/base.d.ts:5457 +Defined in node_modules/@types/node/stream.d.ts:56 **Parameters:** Name | Type | ------ | ------ | -`event` | "end" | +`event` | "readable" | **Returns:** *boolean* -▸ **emit**(`event`: "readable"): *boolean* +▸ **emit**(`event`: "error", `err`: [Error](notcapable.md#static-error)): *boolean* *Inherited from [SparseFilterStream](sparsefilterstream.md).[emit](sparsefilterstream.md#emit)* *Overrides [SourceSource](sourcesource.md).[emit](sourcesource.md#emit)* -Defined in node_modules/@types/node/base.d.ts:5458 +Defined in node_modules/@types/node/stream.d.ts:57 **Parameters:** Name | Type | ------ | ------ | -`event` | "readable" | +`event` | "error" | +`err` | [Error](notcapable.md#static-error) | **Returns:** *boolean* -▸ **emit**(`event`: "error", `err`: [Error](notcapable.md#static-error)): *boolean* +▸ **emit**(`event`: string | symbol, ...`args`: any[]): *boolean* *Inherited from [SparseFilterStream](sparsefilterstream.md).[emit](sparsefilterstream.md#emit)* *Overrides [SourceSource](sourcesource.md).[emit](sourcesource.md#emit)* -Defined in node_modules/@types/node/base.d.ts:5459 +Defined in node_modules/@types/node/stream.d.ts:58 **Parameters:** Name | Type | ------ | ------ | -`event` | "error" | -`err` | [Error](notcapable.md#static-error) | +`event` | string | symbol | +`...args` | any[] | **Returns:** *boolean* @@ -640,40 +683,40 @@ ___ ### end -▸ **end**(`cb?`: Function): *void* +▸ **end**(`cb?`: undefined | function): *void* *Inherited from [SparseFilterStream](sparsefilterstream.md).[end](sparsefilterstream.md#end)* -Defined in node_modules/@types/node/base.d.ts:5610 +Defined in node_modules/@types/node/stream.d.ts:220 **Parameters:** Name | Type | ------ | ------ | -`cb?` | Function | +`cb?` | undefined | function | **Returns:** *void* -▸ **end**(`chunk`: any, `cb?`: Function): *void* +▸ **end**(`chunk`: any, `cb?`: undefined | function): *void* *Inherited from [SparseFilterStream](sparsefilterstream.md).[end](sparsefilterstream.md#end)* -Defined in node_modules/@types/node/base.d.ts:5611 +Defined in node_modules/@types/node/stream.d.ts:221 **Parameters:** Name | Type | ------ | ------ | `chunk` | any | -`cb?` | Function | +`cb?` | undefined | function | **Returns:** *void* -▸ **end**(`chunk`: any, `encoding?`: undefined | string, `cb?`: Function): *void* +▸ **end**(`chunk`: any, `encoding?`: undefined | string, `cb?`: undefined | function): *void* *Inherited from [SparseFilterStream](sparsefilterstream.md).[end](sparsefilterstream.md#end)* -Defined in node_modules/@types/node/base.d.ts:5612 +Defined in node_modules/@types/node/stream.d.ts:222 **Parameters:** @@ -681,7 +724,7 @@ Name | Type | ------ | ------ | `chunk` | any | `encoding?` | undefined | string | -`cb?` | Function | +`cb?` | undefined | function | **Returns:** *void* @@ -693,7 +736,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[eventNames](countingwritable.md#eventnames)* -Defined in node_modules/@types/node/base.d.ts:909 +Defined in node_modules/@types/node/events.d.ts:33 **Returns:** *Array‹string | symbol›* @@ -705,7 +748,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[getMaxListeners](countingwritable.md#getmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:906 +Defined in node_modules/@types/node/events.d.ts:29 **Returns:** *number* @@ -717,7 +760,7 @@ ___ *Inherited from [SparseFilterStream](sparsefilterstream.md).[isPaused](sparsefilterstream.md#ispaused)* -Defined in node_modules/@types/node/base.d.ts:5430 +Defined in node_modules/@types/node/stream.d.ts:29 **Returns:** *boolean* @@ -729,7 +772,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[listenerCount](countingwritable.md#static-listenercount)* -Defined in node_modules/@types/node/base.d.ts:910 +Defined in node_modules/@types/node/events.d.ts:34 **Parameters:** @@ -747,7 +790,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[listeners](countingwritable.md#listeners)* -Defined in node_modules/@types/node/base.d.ts:907 +Defined in node_modules/@types/node/events.d.ts:30 **Parameters:** @@ -759,19 +802,17 @@ Name | Type | ___ -### on +### off -▸ **on**(`event`: string, `listener`: function): *this* +▸ **off**(`event`: string | symbol, `listener`: function): *this* -*Inherited from [SparseFilterStream](sparsefilterstream.md).[on](sparsefilterstream.md#on)* - -*Overrides [SourceSource](sourcesource.md).[on](sourcesource.md#on)* +*Inherited from [CountingWritable](countingwritable.md).[off](countingwritable.md#off)* -Defined in node_modules/@types/node/base.d.ts:5461 +Defined in node_modules/@types/node/events.d.ts:26 **Parameters:** -▪ **event**: *string* +▪ **event**: *string | symbol* ▪ **listener**: *function* @@ -785,13 +826,17 @@ Name | Type | **Returns:** *this* +___ + +### on + ▸ **on**(`event`: "close", `listener`: function): *this* *Inherited from [SparseFilterStream](sparsefilterstream.md).[on](sparsefilterstream.md#on)* *Overrides [SourceSource](sourcesource.md).[on](sourcesource.md#on)* -Defined in node_modules/@types/node/base.d.ts:5462 +Defined in node_modules/@types/node/stream.d.ts:60 **Parameters:** @@ -809,7 +854,7 @@ Defined in node_modules/@types/node/base.d.ts:5462 *Overrides [SourceSource](sourcesource.md).[on](sourcesource.md#on)* -Defined in node_modules/@types/node/base.d.ts:5463 +Defined in node_modules/@types/node/stream.d.ts:61 **Parameters:** @@ -817,13 +862,13 @@ Defined in node_modules/@types/node/base.d.ts:5463 ▪ **listener**: *function* -▸ (`chunk`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string): *void* +▸ (`chunk`: any): *void* **Parameters:** Name | Type | ------ | ------ | -`chunk` | [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string | +`chunk` | any | **Returns:** *this* @@ -833,7 +878,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[on](sourcesource.md#on)* -Defined in node_modules/@types/node/base.d.ts:5464 +Defined in node_modules/@types/node/stream.d.ts:62 **Parameters:** @@ -851,7 +896,7 @@ Defined in node_modules/@types/node/base.d.ts:5464 *Overrides [SourceSource](sourcesource.md).[on](sourcesource.md#on)* -Defined in node_modules/@types/node/base.d.ts:5465 +Defined in node_modules/@types/node/stream.d.ts:63 **Parameters:** @@ -869,7 +914,7 @@ Defined in node_modules/@types/node/base.d.ts:5465 *Overrides [SourceSource](sourcesource.md).[on](sourcesource.md#on)* -Defined in node_modules/@types/node/base.d.ts:5466 +Defined in node_modules/@types/node/stream.d.ts:64 **Parameters:** @@ -887,21 +932,17 @@ Name | Type | **Returns:** *this* -___ - -### once - -▸ **once**(`event`: string, `listener`: function): *this* +▸ **on**(`event`: string | symbol, `listener`: function): *this* -*Inherited from [SparseFilterStream](sparsefilterstream.md).[once](sparsefilterstream.md#once)* +*Inherited from [SparseFilterStream](sparsefilterstream.md).[on](sparsefilterstream.md#on)* -*Overrides [SourceSource](sourcesource.md).[once](sourcesource.md#once)* +*Overrides [SourceSource](sourcesource.md).[on](sourcesource.md#on)* -Defined in node_modules/@types/node/base.d.ts:5468 +Defined in node_modules/@types/node/stream.d.ts:65 **Parameters:** -▪ **event**: *string* +▪ **event**: *string | symbol* ▪ **listener**: *function* @@ -915,13 +956,17 @@ Name | Type | **Returns:** *this* +___ + +### once + ▸ **once**(`event`: "close", `listener`: function): *this* *Inherited from [SparseFilterStream](sparsefilterstream.md).[once](sparsefilterstream.md#once)* *Overrides [SourceSource](sourcesource.md).[once](sourcesource.md#once)* -Defined in node_modules/@types/node/base.d.ts:5469 +Defined in node_modules/@types/node/stream.d.ts:67 **Parameters:** @@ -939,7 +984,7 @@ Defined in node_modules/@types/node/base.d.ts:5469 *Overrides [SourceSource](sourcesource.md).[once](sourcesource.md#once)* -Defined in node_modules/@types/node/base.d.ts:5470 +Defined in node_modules/@types/node/stream.d.ts:68 **Parameters:** @@ -947,13 +992,13 @@ Defined in node_modules/@types/node/base.d.ts:5470 ▪ **listener**: *function* -▸ (`chunk`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string): *void* +▸ (`chunk`: any): *void* **Parameters:** Name | Type | ------ | ------ | -`chunk` | [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string | +`chunk` | any | **Returns:** *this* @@ -963,7 +1008,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[once](sourcesource.md#once)* -Defined in node_modules/@types/node/base.d.ts:5471 +Defined in node_modules/@types/node/stream.d.ts:69 **Parameters:** @@ -981,7 +1026,7 @@ Defined in node_modules/@types/node/base.d.ts:5471 *Overrides [SourceSource](sourcesource.md).[once](sourcesource.md#once)* -Defined in node_modules/@types/node/base.d.ts:5472 +Defined in node_modules/@types/node/stream.d.ts:70 **Parameters:** @@ -999,7 +1044,7 @@ Defined in node_modules/@types/node/base.d.ts:5472 *Overrides [SourceSource](sourcesource.md).[once](sourcesource.md#once)* -Defined in node_modules/@types/node/base.d.ts:5473 +Defined in node_modules/@types/node/stream.d.ts:71 **Parameters:** @@ -1017,6 +1062,30 @@ Name | Type | **Returns:** *this* +▸ **once**(`event`: string | symbol, `listener`: function): *this* + +*Inherited from [SparseFilterStream](sparsefilterstream.md).[once](sparsefilterstream.md#once)* + +*Overrides [SourceSource](sourcesource.md).[once](sourcesource.md#once)* + +Defined in node_modules/@types/node/stream.d.ts:72 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* + +**Parameters:** + +Name | Type | +------ | ------ | +`...args` | any[] | + +**Returns:** *this* + ___ ### pause @@ -1025,7 +1094,7 @@ ___ *Inherited from [SparseFilterStream](sparsefilterstream.md).[pause](sparsefilterstream.md#pause)* -Defined in node_modules/@types/node/base.d.ts:5428 +Defined in node_modules/@types/node/stream.d.ts:27 **Returns:** *this* @@ -1037,7 +1106,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[pipe](countingwritable.md#pipe)* -Defined in node_modules/@types/node/base.d.ts:5407 +Defined in node_modules/@types/node/stream.d.ts:5 **Type parameters:** @@ -1056,37 +1125,13 @@ ___ ### prependListener -▸ **prependListener**(`event`: string, `listener`: function): *this* - -*Inherited from [SparseFilterStream](sparsefilterstream.md).[prependListener](sparsefilterstream.md#prependlistener)* - -*Overrides [SourceSource](sourcesource.md).[prependListener](sourcesource.md#prependlistener)* - -Defined in node_modules/@types/node/base.d.ts:5475 - -**Parameters:** - -▪ **event**: *string* - -▪ **listener**: *function* - -▸ (...`args`: any[]): *void* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | any[] | - -**Returns:** *this* - ▸ **prependListener**(`event`: "close", `listener`: function): *this* *Inherited from [SparseFilterStream](sparsefilterstream.md).[prependListener](sparsefilterstream.md#prependlistener)* *Overrides [SourceSource](sourcesource.md).[prependListener](sourcesource.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:5476 +Defined in node_modules/@types/node/stream.d.ts:74 **Parameters:** @@ -1104,7 +1149,7 @@ Defined in node_modules/@types/node/base.d.ts:5476 *Overrides [SourceSource](sourcesource.md).[prependListener](sourcesource.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:5477 +Defined in node_modules/@types/node/stream.d.ts:75 **Parameters:** @@ -1112,13 +1157,13 @@ Defined in node_modules/@types/node/base.d.ts:5477 ▪ **listener**: *function* -▸ (`chunk`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string): *void* +▸ (`chunk`: any): *void* **Parameters:** Name | Type | ------ | ------ | -`chunk` | [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string | +`chunk` | any | **Returns:** *this* @@ -1128,7 +1173,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[prependListener](sourcesource.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:5478 +Defined in node_modules/@types/node/stream.d.ts:76 **Parameters:** @@ -1146,7 +1191,7 @@ Defined in node_modules/@types/node/base.d.ts:5478 *Overrides [SourceSource](sourcesource.md).[prependListener](sourcesource.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:5479 +Defined in node_modules/@types/node/stream.d.ts:77 **Parameters:** @@ -1164,7 +1209,7 @@ Defined in node_modules/@types/node/base.d.ts:5479 *Overrides [SourceSource](sourcesource.md).[prependListener](sourcesource.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:5480 +Defined in node_modules/@types/node/stream.d.ts:78 **Parameters:** @@ -1182,21 +1227,17 @@ Name | Type | **Returns:** *this* -___ +▸ **prependListener**(`event`: string | symbol, `listener`: function): *this* -### prependOnceListener - -▸ **prependOnceListener**(`event`: string, `listener`: function): *this* - -*Inherited from [SparseFilterStream](sparsefilterstream.md).[prependOnceListener](sparsefilterstream.md#prependoncelistener)* +*Inherited from [SparseFilterStream](sparsefilterstream.md).[prependListener](sparsefilterstream.md#prependlistener)* -*Overrides [SourceSource](sourcesource.md).[prependOnceListener](sourcesource.md#prependoncelistener)* +*Overrides [SourceSource](sourcesource.md).[prependListener](sourcesource.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:5482 +Defined in node_modules/@types/node/stream.d.ts:79 **Parameters:** -▪ **event**: *string* +▪ **event**: *string | symbol* ▪ **listener**: *function* @@ -1210,13 +1251,17 @@ Name | Type | **Returns:** *this* +___ + +### prependOnceListener + ▸ **prependOnceListener**(`event`: "close", `listener`: function): *this* *Inherited from [SparseFilterStream](sparsefilterstream.md).[prependOnceListener](sparsefilterstream.md#prependoncelistener)* *Overrides [SourceSource](sourcesource.md).[prependOnceListener](sourcesource.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:5483 +Defined in node_modules/@types/node/stream.d.ts:81 **Parameters:** @@ -1234,7 +1279,7 @@ Defined in node_modules/@types/node/base.d.ts:5483 *Overrides [SourceSource](sourcesource.md).[prependOnceListener](sourcesource.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:5484 +Defined in node_modules/@types/node/stream.d.ts:82 **Parameters:** @@ -1242,13 +1287,13 @@ Defined in node_modules/@types/node/base.d.ts:5484 ▪ **listener**: *function* -▸ (`chunk`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string): *void* +▸ (`chunk`: any): *void* **Parameters:** Name | Type | ------ | ------ | -`chunk` | [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string | +`chunk` | any | **Returns:** *this* @@ -1258,7 +1303,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[prependOnceListener](sourcesource.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:5485 +Defined in node_modules/@types/node/stream.d.ts:83 **Parameters:** @@ -1276,7 +1321,7 @@ Defined in node_modules/@types/node/base.d.ts:5485 *Overrides [SourceSource](sourcesource.md).[prependOnceListener](sourcesource.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:5486 +Defined in node_modules/@types/node/stream.d.ts:84 **Parameters:** @@ -1294,7 +1339,7 @@ Defined in node_modules/@types/node/base.d.ts:5486 *Overrides [SourceSource](sourcesource.md).[prependOnceListener](sourcesource.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:5487 +Defined in node_modules/@types/node/stream.d.ts:85 **Parameters:** @@ -1312,6 +1357,30 @@ Name | Type | **Returns:** *this* +▸ **prependOnceListener**(`event`: string | symbol, `listener`: function): *this* + +*Inherited from [SparseFilterStream](sparsefilterstream.md).[prependOnceListener](sparsefilterstream.md#prependoncelistener)* + +*Overrides [SourceSource](sourcesource.md).[prependOnceListener](sourcesource.md#prependoncelistener)* + +Defined in node_modules/@types/node/stream.d.ts:86 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* + +**Parameters:** + +Name | Type | +------ | ------ | +`...args` | any[] | + +**Returns:** *this* + ___ ### push @@ -1320,7 +1389,7 @@ ___ *Inherited from [SparseFilterStream](sparsefilterstream.md).[push](sparsefilterstream.md#push)* -Defined in node_modules/@types/node/base.d.ts:5434 +Defined in node_modules/@types/node/stream.d.ts:33 **Parameters:** @@ -1333,13 +1402,31 @@ Name | Type | ___ +### rawListeners + +▸ **rawListeners**(`event`: string | symbol): *Function[]* + +*Inherited from [CountingWritable](countingwritable.md).[rawListeners](countingwritable.md#rawlisteners)* + +Defined in node_modules/@types/node/events.d.ts:31 + +**Parameters:** + +Name | Type | +------ | ------ | +`event` | string | symbol | + +**Returns:** *Function[]* + +___ + ### read ▸ **read**(`size?`: undefined | number): *any* *Inherited from [SparseFilterStream](sparsefilterstream.md).[read](sparsefilterstream.md#read)* -Defined in node_modules/@types/node/base.d.ts:5426 +Defined in node_modules/@types/node/stream.d.ts:25 **Parameters:** @@ -1357,7 +1444,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[removeAllListeners](countingwritable.md#removealllisteners)* -Defined in node_modules/@types/node/base.d.ts:904 +Defined in node_modules/@types/node/events.d.ts:27 **Parameters:** @@ -1371,37 +1458,13 @@ ___ ### removeListener -▸ **removeListener**(`event`: string, `listener`: function): *this* - -*Inherited from [SparseFilterStream](sparsefilterstream.md).[removeListener](sparsefilterstream.md#removelistener)* - -*Overrides [SourceSource](sourcesource.md).[removeListener](sourcesource.md#removelistener)* - -Defined in node_modules/@types/node/base.d.ts:5489 - -**Parameters:** - -▪ **event**: *string* - -▪ **listener**: *function* - -▸ (...`args`: any[]): *void* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | any[] | - -**Returns:** *this* - ▸ **removeListener**(`event`: "close", `listener`: function): *this* *Inherited from [SparseFilterStream](sparsefilterstream.md).[removeListener](sparsefilterstream.md#removelistener)* *Overrides [SourceSource](sourcesource.md).[removeListener](sourcesource.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:5490 +Defined in node_modules/@types/node/stream.d.ts:88 **Parameters:** @@ -1419,7 +1482,7 @@ Defined in node_modules/@types/node/base.d.ts:5490 *Overrides [SourceSource](sourcesource.md).[removeListener](sourcesource.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:5491 +Defined in node_modules/@types/node/stream.d.ts:89 **Parameters:** @@ -1427,13 +1490,13 @@ Defined in node_modules/@types/node/base.d.ts:5491 ▪ **listener**: *function* -▸ (`chunk`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string): *void* +▸ (`chunk`: any): *void* **Parameters:** Name | Type | ------ | ------ | -`chunk` | [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string | +`chunk` | any | **Returns:** *this* @@ -1443,7 +1506,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[removeListener](sourcesource.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:5492 +Defined in node_modules/@types/node/stream.d.ts:90 **Parameters:** @@ -1461,7 +1524,7 @@ Defined in node_modules/@types/node/base.d.ts:5492 *Overrides [SourceSource](sourcesource.md).[removeListener](sourcesource.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:5493 +Defined in node_modules/@types/node/stream.d.ts:91 **Parameters:** @@ -1479,7 +1542,7 @@ Defined in node_modules/@types/node/base.d.ts:5493 *Overrides [SourceSource](sourcesource.md).[removeListener](sourcesource.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:5494 +Defined in node_modules/@types/node/stream.d.ts:92 **Parameters:** @@ -1497,6 +1560,30 @@ Name | Type | **Returns:** *this* +▸ **removeListener**(`event`: string | symbol, `listener`: function): *this* + +*Inherited from [SparseFilterStream](sparsefilterstream.md).[removeListener](sparsefilterstream.md#removelistener)* + +*Overrides [SourceSource](sourcesource.md).[removeListener](sourcesource.md#removelistener)* + +Defined in node_modules/@types/node/stream.d.ts:93 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* + +**Parameters:** + +Name | Type | +------ | ------ | +`...args` | any[] | + +**Returns:** *this* + ___ ### resume @@ -1505,7 +1592,7 @@ ___ *Inherited from [SparseFilterStream](sparsefilterstream.md).[resume](sparsefilterstream.md#resume)* -Defined in node_modules/@types/node/base.d.ts:5429 +Defined in node_modules/@types/node/stream.d.ts:28 **Returns:** *this* @@ -1517,7 +1604,7 @@ ___ *Inherited from [SparseFilterStream](sparsefilterstream.md).[setDefaultEncoding](sparsefilterstream.md#setdefaultencoding)* -Defined in node_modules/@types/node/base.d.ts:5609 +Defined in node_modules/@types/node/stream.d.ts:219 **Parameters:** @@ -1535,7 +1622,7 @@ ___ *Inherited from [SparseFilterStream](sparsefilterstream.md).[setEncoding](sparsefilterstream.md#setencoding)* -Defined in node_modules/@types/node/base.d.ts:5427 +Defined in node_modules/@types/node/stream.d.ts:26 **Parameters:** @@ -1553,7 +1640,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[setMaxListeners](countingwritable.md#setmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:905 +Defined in node_modules/@types/node/events.d.ts:28 **Parameters:** @@ -1571,7 +1658,7 @@ ___ *Inherited from [SparseFilterStream](sparsefilterstream.md).[uncork](sparsefilterstream.md#uncork)* -Defined in node_modules/@types/node/base.d.ts:5614 +Defined in node_modules/@types/node/stream.d.ts:224 **Returns:** *void* @@ -1579,21 +1666,17 @@ ___ ### unpipe -▸ **unpipe**<**T**>(`destination?`: T): *this* +▸ **unpipe**(`destination?`: NodeJS.WritableStream): *this* *Inherited from [SparseFilterStream](sparsefilterstream.md).[unpipe](sparsefilterstream.md#unpipe)* -Defined in node_modules/@types/node/base.d.ts:5431 - -**Type parameters:** - -▪ **T**: *WritableStream* +Defined in node_modules/@types/node/stream.d.ts:30 **Parameters:** Name | Type | ------ | ------ | -`destination?` | T | +`destination?` | NodeJS.WritableStream | **Returns:** *this* @@ -1605,7 +1688,7 @@ ___ *Inherited from [SparseFilterStream](sparsefilterstream.md).[unshift](sparsefilterstream.md#unshift)* -Defined in node_modules/@types/node/base.d.ts:5432 +Defined in node_modules/@types/node/stream.d.ts:31 **Parameters:** @@ -1623,7 +1706,7 @@ ___ *Inherited from [SparseFilterStream](sparsefilterstream.md).[wrap](sparsefilterstream.md#wrap)* -Defined in node_modules/@types/node/base.d.ts:5433 +Defined in node_modules/@types/node/stream.d.ts:32 **Parameters:** @@ -1637,26 +1720,26 @@ ___ ### write -▸ **write**(`chunk`: any, `cb?`: Function): *boolean* +▸ **write**(`chunk`: any, `cb?`: undefined | function): *boolean* *Inherited from [SparseFilterStream](sparsefilterstream.md).[write](sparsefilterstream.md#write)* -Defined in node_modules/@types/node/base.d.ts:5607 +Defined in node_modules/@types/node/stream.d.ts:217 **Parameters:** Name | Type | ------ | ------ | `chunk` | any | -`cb?` | Function | +`cb?` | undefined | function | **Returns:** *boolean* -▸ **write**(`chunk`: any, `encoding?`: undefined | string, `cb?`: Function): *boolean* +▸ **write**(`chunk`: any, `encoding?`: undefined | string, `cb?`: undefined | function): *boolean* *Inherited from [SparseFilterStream](sparsefilterstream.md).[write](sparsefilterstream.md#write)* -Defined in node_modules/@types/node/base.d.ts:5608 +Defined in node_modules/@types/node/stream.d.ts:218 **Parameters:** @@ -1664,7 +1747,7 @@ Name | Type | ------ | ------ | `chunk` | any | `encoding?` | undefined | string | -`cb?` | Function | +`cb?` | undefined | function | **Returns:** *boolean* @@ -1674,7 +1757,7 @@ ___ ▸ **writeBuffers**(`flush`: boolean): *Promise‹void›* -*Defined in [lib/block-transform-stream.ts:48](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/block-transform-stream.ts#L48)* +*Defined in [lib/block-transform-stream.ts:49](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/block-transform-stream.ts#L49)* **Parameters:** @@ -1690,7 +1773,7 @@ ___ ▸ **alignIfNeeded**(`stream`: ReadableStream, `alignment?`: undefined | number, `numBuffers?`: undefined | number): *ReadableStream‹› | [BlockTransformStream](blocktransformstream.md)‹›* -*Defined in [lib/block-transform-stream.ts:91](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/block-transform-stream.ts#L91)* +*Defined in [lib/block-transform-stream.ts:93](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/block-transform-stream.ts#L93)* **Parameters:** @@ -1710,7 +1793,9 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[listenerCount](countingwritable.md#static-listenercount)* -Defined in node_modules/@types/node/base.d.ts:895 +Defined in node_modules/@types/node/events.d.ts:17 + +**`deprecated`** since v4.0.0 **Parameters:** diff --git a/doc/classes/blockwritestream.md b/doc/classes/blockwritestream.md index 0af0a1ab..ed762fc2 100644 --- a/doc/classes/blockwritestream.md +++ b/doc/classes/blockwritestream.md @@ -28,6 +28,7 @@ * [position](blockwritestream.md#private-position) * [writable](blockwritestream.md#writable) * [writableHighWaterMark](blockwritestream.md#writablehighwatermark) +* [writableLength](blockwritestream.md#writablelength) * [defaultMaxListeners](blockwritestream.md#static-defaultmaxlisteners) ### Methods @@ -47,11 +48,13 @@ * [getMaxListeners](blockwritestream.md#getmaxlisteners) * [listenerCount](blockwritestream.md#listenercount) * [listeners](blockwritestream.md#listeners) +* [off](blockwritestream.md#off) * [on](blockwritestream.md#on) * [once](blockwritestream.md#once) * [pipe](blockwritestream.md#pipe) * [prependListener](blockwritestream.md#prependlistener) * [prependOnceListener](blockwritestream.md#prependoncelistener) +* [rawListeners](blockwritestream.md#rawlisteners) * [removeAllListeners](blockwritestream.md#removealllisteners) * [removeListener](blockwritestream.md#removelistener) * [setDefaultEncoding](blockwritestream.md#setdefaultencoding) @@ -69,7 +72,7 @@ *Overrides [CountingWritable](countingwritable.md).[constructor](countingwritable.md#constructor)* -*Defined in [lib/block-write-stream.ts:37](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/block-write-stream.ts#L37)* +*Defined in [lib/block-write-stream.ts:37](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/block-write-stream.ts#L37)* **Parameters:** @@ -90,7 +93,7 @@ Name | Type | Default | • **bytesWritten**: *number* = 0 -*Defined in [lib/block-write-stream.ts:35](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/block-write-stream.ts#L35)* +*Defined in [lib/block-write-stream.ts:35](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/block-write-stream.ts#L35)* ___ @@ -98,7 +101,7 @@ ___ • **delayFirstBuffer**: *boolean* -*Defined in [lib/block-write-stream.ts:33](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/block-write-stream.ts#L33)* +*Defined in [lib/block-write-stream.ts:33](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/block-write-stream.ts#L33)* ___ @@ -106,7 +109,7 @@ ___ • **destination**: *[BlockDevice](blockdevice.md)* -*Defined in [lib/block-write-stream.ts:32](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/block-write-stream.ts#L32)* +*Defined in [lib/block-write-stream.ts:32](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/block-write-stream.ts#L32)* ___ @@ -114,7 +117,7 @@ ___ • **firstBuffer**? : *[Buffer](../interfaces/alignedlockablebuffer.md#buffer)* -*Defined in [lib/block-write-stream.ts:37](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/block-write-stream.ts#L37)* +*Defined in [lib/block-write-stream.ts:37](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/block-write-stream.ts#L37)* ___ @@ -122,7 +125,7 @@ ___ • **maxRetries**: *number* -*Defined in [lib/block-write-stream.ts:34](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/block-write-stream.ts#L34)* +*Defined in [lib/block-write-stream.ts:34](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/block-write-stream.ts#L34)* ___ @@ -130,7 +133,7 @@ ___ • **position**: *number* = 0 -*Defined in [lib/block-write-stream.ts:36](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/block-write-stream.ts#L36)* +*Defined in [lib/block-write-stream.ts:36](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/block-write-stream.ts#L36)* ___ @@ -140,7 +143,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[writable](countingwritable.md#writable)* -Defined in node_modules/@types/node/base.d.ts:5508 +Defined in node_modules/@types/node/stream.d.ts:109 ___ @@ -150,7 +153,17 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[writableHighWaterMark](countingwritable.md#writablehighwatermark)* -Defined in node_modules/@types/node/base.d.ts:5509 +Defined in node_modules/@types/node/stream.d.ts:110 + +___ + +### writableLength + +• **writableLength**: *number* + +*Inherited from [CountingWritable](countingwritable.md).[writableLength](countingwritable.md#writablelength)* + +Defined in node_modules/@types/node/stream.d.ts:111 ___ @@ -160,7 +173,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[defaultMaxListeners](countingwritable.md#static-defaultmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:896 +Defined in node_modules/@types/node/events.d.ts:18 ## Methods @@ -168,7 +181,7 @@ Defined in node_modules/@types/node/base.d.ts:896 ▸ **__final**(): *Promise‹void›* -*Defined in [lib/block-write-stream.ts:103](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/block-write-stream.ts#L103)* +*Defined in [lib/block-write-stream.ts:103](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/block-write-stream.ts#L103)* **Returns:** *Promise‹void›* @@ -178,7 +191,7 @@ ___ ▸ **__write**(`buffer`: [AlignedLockableBuffer](../interfaces/alignedlockablebuffer.md)): *Promise‹void›* -*Defined in [lib/block-write-stream.ts:76](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/block-write-stream.ts#L76)* +*Defined in [lib/block-write-stream.ts:76](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/block-write-stream.ts#L76)* **Parameters:** @@ -196,7 +209,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[_destroy](countingwritable.md#_destroy)* -Defined in node_modules/@types/node/base.d.ts:5513 +Defined in node_modules/@types/node/stream.d.ts:115 **Parameters:** @@ -204,13 +217,13 @@ Defined in node_modules/@types/node/base.d.ts:5513 ▪ **callback**: *function* -▸ (`error?`: [Error](notcapable.md#static-error)): *void* +▸ (`error`: [Error](notcapable.md#static-error) | null): *void* **Parameters:** Name | Type | ------ | ------ | -`error?` | [Error](notcapable.md#static-error) | +`error` | [Error](notcapable.md#static-error) | null | **Returns:** *void* @@ -222,7 +235,7 @@ ___ *Overrides [CountingWritable](countingwritable.md).[_final](countingwritable.md#_final)* -*Defined in [lib/block-write-stream.ts:119](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/block-write-stream.ts#L119)* +*Defined in [lib/block-write-stream.ts:119](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/block-write-stream.ts#L119)* **`summary`** Write buffered data before a stream ends, called by stream internals @@ -230,13 +243,13 @@ ___ ▪ **callback**: *function* -▸ (`error?`: [Error](notcapable.md#static-error) | void): *void* +▸ (`error?`: [Error](notcapable.md#static-error) | null): *void* **Parameters:** Name | Type | ------ | ------ | -`error?` | [Error](notcapable.md#static-error) | void | +`error?` | [Error](notcapable.md#static-error) | null | **Returns:** *void* @@ -248,7 +261,7 @@ ___ *Overrides void* -*Defined in [lib/block-write-stream.ts:95](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/block-write-stream.ts#L95)* +*Defined in [lib/block-write-stream.ts:95](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/block-write-stream.ts#L95)* **Parameters:** @@ -276,7 +289,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[_writev](countingwritable.md#optional-_writev)* -Defined in node_modules/@types/node/base.d.ts:5512 +Defined in node_modules/@types/node/stream.d.ts:114 **Parameters:** @@ -284,13 +297,13 @@ Defined in node_modules/@types/node/base.d.ts:5512 ▪ **callback**: *function* -▸ (`err?`: [Error](notcapable.md#static-error)): *void* +▸ (`error?`: [Error](notcapable.md#static-error) | null): *void* **Parameters:** Name | Type | ------ | ------ | -`err?` | [Error](notcapable.md#static-error) | +`error?` | [Error](notcapable.md#static-error) | null | **Returns:** *void* @@ -298,13 +311,13 @@ ___ ### addListener -▸ **addListener**(`event`: string, `listener`: function): *this* +▸ **addListener**(`event`: "close", `listener`: function): *this* *Inherited from [CountingWritable](countingwritable.md).[addListener](countingwritable.md#addlistener)* *Overrides [SourceSource](sourcesource.md).[addListener](sourcesource.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:5535 +Defined in node_modules/@types/node/stream.d.ts:137 Event emitter The defined events on documents including: @@ -317,30 +330,6 @@ The defined events on documents including: **Parameters:** -▪ **event**: *string* - -▪ **listener**: *function* - -▸ (...`args`: any[]): *void* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | any[] | - -**Returns:** *this* - -▸ **addListener**(`event`: "close", `listener`: function): *this* - -*Inherited from [CountingWritable](countingwritable.md).[addListener](countingwritable.md#addlistener)* - -*Overrides [SourceSource](sourcesource.md).[addListener](sourcesource.md#addlistener)* - -Defined in node_modules/@types/node/base.d.ts:5536 - -**Parameters:** - ▪ **event**: *"close"* ▪ **listener**: *function* @@ -355,7 +344,7 @@ Defined in node_modules/@types/node/base.d.ts:5536 *Overrides [SourceSource](sourcesource.md).[addListener](sourcesource.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:5537 +Defined in node_modules/@types/node/stream.d.ts:138 **Parameters:** @@ -373,7 +362,7 @@ Defined in node_modules/@types/node/base.d.ts:5537 *Overrides [SourceSource](sourcesource.md).[addListener](sourcesource.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:5538 +Defined in node_modules/@types/node/stream.d.ts:139 **Parameters:** @@ -397,7 +386,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[addListener](sourcesource.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:5539 +Defined in node_modules/@types/node/stream.d.ts:140 **Parameters:** @@ -415,7 +404,7 @@ Defined in node_modules/@types/node/base.d.ts:5539 *Overrides [SourceSource](sourcesource.md).[addListener](sourcesource.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:5540 +Defined in node_modules/@types/node/stream.d.ts:141 **Parameters:** @@ -439,7 +428,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[addListener](sourcesource.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:5541 +Defined in node_modules/@types/node/stream.d.ts:142 **Parameters:** @@ -457,6 +446,30 @@ Name | Type | **Returns:** *this* +▸ **addListener**(`event`: string | symbol, `listener`: function): *this* + +*Inherited from [CountingWritable](countingwritable.md).[addListener](countingwritable.md#addlistener)* + +*Overrides [SourceSource](sourcesource.md).[addListener](sourcesource.md#addlistener)* + +Defined in node_modules/@types/node/stream.d.ts:143 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* + +**Parameters:** + +Name | Type | +------ | ------ | +`...args` | any[] | + +**Returns:** *this* + ___ ### cork @@ -465,7 +478,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[cork](countingwritable.md#cork)* -Defined in node_modules/@types/node/base.d.ts:5521 +Defined in node_modules/@types/node/stream.d.ts:123 **Returns:** *void* @@ -477,7 +490,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[destroy](countingwritable.md#destroy)* -Defined in node_modules/@types/node/base.d.ts:5523 +Defined in node_modules/@types/node/stream.d.ts:125 **Parameters:** @@ -491,30 +504,13 @@ ___ ### emit -▸ **emit**(`event`: string | symbol, ...`args`: any[]): *boolean* - -*Inherited from [CountingWritable](countingwritable.md).[emit](countingwritable.md#emit)* - -*Overrides [SourceSource](sourcesource.md).[emit](sourcesource.md#emit)* - -Defined in node_modules/@types/node/base.d.ts:5543 - -**Parameters:** - -Name | Type | ------- | ------ | -`event` | string | symbol | -`...args` | any[] | - -**Returns:** *boolean* - ▸ **emit**(`event`: "close"): *boolean* *Inherited from [CountingWritable](countingwritable.md).[emit](countingwritable.md#emit)* *Overrides [SourceSource](sourcesource.md).[emit](sourcesource.md#emit)* -Defined in node_modules/@types/node/base.d.ts:5544 +Defined in node_modules/@types/node/stream.d.ts:145 **Parameters:** @@ -524,20 +520,19 @@ Name | Type | **Returns:** *boolean* -▸ **emit**(`event`: "drain", `chunk`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string): *boolean* +▸ **emit**(`event`: "drain"): *boolean* *Inherited from [CountingWritable](countingwritable.md).[emit](countingwritable.md#emit)* *Overrides [SourceSource](sourcesource.md).[emit](sourcesource.md#emit)* -Defined in node_modules/@types/node/base.d.ts:5545 +Defined in node_modules/@types/node/stream.d.ts:146 **Parameters:** Name | Type | ------ | ------ | `event` | "drain" | -`chunk` | [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string | **Returns:** *boolean* @@ -547,7 +542,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[emit](sourcesource.md#emit)* -Defined in node_modules/@types/node/base.d.ts:5546 +Defined in node_modules/@types/node/stream.d.ts:147 **Parameters:** @@ -564,7 +559,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[emit](sourcesource.md#emit)* -Defined in node_modules/@types/node/base.d.ts:5547 +Defined in node_modules/@types/node/stream.d.ts:148 **Parameters:** @@ -580,7 +575,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[emit](sourcesource.md#emit)* -Defined in node_modules/@types/node/base.d.ts:5548 +Defined in node_modules/@types/node/stream.d.ts:149 **Parameters:** @@ -597,7 +592,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[emit](sourcesource.md#emit)* -Defined in node_modules/@types/node/base.d.ts:5549 +Defined in node_modules/@types/node/stream.d.ts:150 **Parameters:** @@ -608,44 +603,61 @@ Name | Type | **Returns:** *boolean* +▸ **emit**(`event`: string | symbol, ...`args`: any[]): *boolean* + +*Inherited from [CountingWritable](countingwritable.md).[emit](countingwritable.md#emit)* + +*Overrides [SourceSource](sourcesource.md).[emit](sourcesource.md#emit)* + +Defined in node_modules/@types/node/stream.d.ts:151 + +**Parameters:** + +Name | Type | +------ | ------ | +`event` | string | symbol | +`...args` | any[] | + +**Returns:** *boolean* + ___ ### end -▸ **end**(`cb?`: Function): *void* +▸ **end**(`cb?`: undefined | function): *void* *Inherited from [CountingWritable](countingwritable.md).[end](countingwritable.md#end)* -Defined in node_modules/@types/node/base.d.ts:5518 +Defined in node_modules/@types/node/stream.d.ts:120 **Parameters:** Name | Type | ------ | ------ | -`cb?` | Function | +`cb?` | undefined | function | **Returns:** *void* -▸ **end**(`chunk`: any, `cb?`: Function): *void* +▸ **end**(`chunk`: any, `cb?`: undefined | function): *void* *Inherited from [CountingWritable](countingwritable.md).[end](countingwritable.md#end)* -Defined in node_modules/@types/node/base.d.ts:5519 +Defined in node_modules/@types/node/stream.d.ts:121 **Parameters:** Name | Type | ------ | ------ | `chunk` | any | -`cb?` | Function | +`cb?` | undefined | function | **Returns:** *void* -▸ **end**(`chunk`: any, `encoding?`: undefined | string, `cb?`: Function): *void* +▸ **end**(`chunk`: any, `encoding?`: undefined | string, `cb?`: undefined | function): *void* *Inherited from [CountingWritable](countingwritable.md).[end](countingwritable.md#end)* -Defined in node_modules/@types/node/base.d.ts:5520 +Defined in node_modules/@types/node/stream.d.ts:122 **Parameters:** @@ -653,7 +665,7 @@ Name | Type | ------ | ------ | `chunk` | any | `encoding?` | undefined | string | -`cb?` | Function | +`cb?` | undefined | function | **Returns:** *void* @@ -665,7 +677,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[eventNames](countingwritable.md#eventnames)* -Defined in node_modules/@types/node/base.d.ts:909 +Defined in node_modules/@types/node/events.d.ts:33 **Returns:** *Array‹string | symbol›* @@ -677,7 +689,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[getMaxListeners](countingwritable.md#getmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:906 +Defined in node_modules/@types/node/events.d.ts:29 **Returns:** *number* @@ -689,7 +701,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[listenerCount](countingwritable.md#static-listenercount)* -Defined in node_modules/@types/node/base.d.ts:910 +Defined in node_modules/@types/node/events.d.ts:34 **Parameters:** @@ -707,7 +719,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[listeners](countingwritable.md#listeners)* -Defined in node_modules/@types/node/base.d.ts:907 +Defined in node_modules/@types/node/events.d.ts:30 **Parameters:** @@ -719,19 +731,17 @@ Name | Type | ___ -### on +### off -▸ **on**(`event`: string, `listener`: function): *this* +▸ **off**(`event`: string | symbol, `listener`: function): *this* -*Inherited from [CountingWritable](countingwritable.md).[on](countingwritable.md#on)* +*Inherited from [CountingWritable](countingwritable.md).[off](countingwritable.md#off)* -*Overrides [SourceSource](sourcesource.md).[on](sourcesource.md#on)* - -Defined in node_modules/@types/node/base.d.ts:5551 +Defined in node_modules/@types/node/events.d.ts:26 **Parameters:** -▪ **event**: *string* +▪ **event**: *string | symbol* ▪ **listener**: *function* @@ -745,13 +755,17 @@ Name | Type | **Returns:** *this* +___ + +### on + ▸ **on**(`event`: "close", `listener`: function): *this* *Inherited from [CountingWritable](countingwritable.md).[on](countingwritable.md#on)* *Overrides [SourceSource](sourcesource.md).[on](sourcesource.md#on)* -Defined in node_modules/@types/node/base.d.ts:5552 +Defined in node_modules/@types/node/stream.d.ts:153 **Parameters:** @@ -769,7 +783,7 @@ Defined in node_modules/@types/node/base.d.ts:5552 *Overrides [SourceSource](sourcesource.md).[on](sourcesource.md#on)* -Defined in node_modules/@types/node/base.d.ts:5553 +Defined in node_modules/@types/node/stream.d.ts:154 **Parameters:** @@ -787,7 +801,7 @@ Defined in node_modules/@types/node/base.d.ts:5553 *Overrides [SourceSource](sourcesource.md).[on](sourcesource.md#on)* -Defined in node_modules/@types/node/base.d.ts:5554 +Defined in node_modules/@types/node/stream.d.ts:155 **Parameters:** @@ -811,7 +825,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[on](sourcesource.md#on)* -Defined in node_modules/@types/node/base.d.ts:5555 +Defined in node_modules/@types/node/stream.d.ts:156 **Parameters:** @@ -829,7 +843,7 @@ Defined in node_modules/@types/node/base.d.ts:5555 *Overrides [SourceSource](sourcesource.md).[on](sourcesource.md#on)* -Defined in node_modules/@types/node/base.d.ts:5556 +Defined in node_modules/@types/node/stream.d.ts:157 **Parameters:** @@ -853,7 +867,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[on](sourcesource.md#on)* -Defined in node_modules/@types/node/base.d.ts:5557 +Defined in node_modules/@types/node/stream.d.ts:158 **Parameters:** @@ -871,21 +885,17 @@ Name | Type | **Returns:** *this* -___ - -### once - -▸ **once**(`event`: string, `listener`: function): *this* +▸ **on**(`event`: string | symbol, `listener`: function): *this* -*Inherited from [CountingWritable](countingwritable.md).[once](countingwritable.md#once)* +*Inherited from [CountingWritable](countingwritable.md).[on](countingwritable.md#on)* -*Overrides [SourceSource](sourcesource.md).[once](sourcesource.md#once)* +*Overrides [SourceSource](sourcesource.md).[on](sourcesource.md#on)* -Defined in node_modules/@types/node/base.d.ts:5559 +Defined in node_modules/@types/node/stream.d.ts:159 **Parameters:** -▪ **event**: *string* +▪ **event**: *string | symbol* ▪ **listener**: *function* @@ -899,13 +909,17 @@ Name | Type | **Returns:** *this* +___ + +### once + ▸ **once**(`event`: "close", `listener`: function): *this* *Inherited from [CountingWritable](countingwritable.md).[once](countingwritable.md#once)* *Overrides [SourceSource](sourcesource.md).[once](sourcesource.md#once)* -Defined in node_modules/@types/node/base.d.ts:5560 +Defined in node_modules/@types/node/stream.d.ts:161 **Parameters:** @@ -923,7 +937,7 @@ Defined in node_modules/@types/node/base.d.ts:5560 *Overrides [SourceSource](sourcesource.md).[once](sourcesource.md#once)* -Defined in node_modules/@types/node/base.d.ts:5561 +Defined in node_modules/@types/node/stream.d.ts:162 **Parameters:** @@ -941,7 +955,7 @@ Defined in node_modules/@types/node/base.d.ts:5561 *Overrides [SourceSource](sourcesource.md).[once](sourcesource.md#once)* -Defined in node_modules/@types/node/base.d.ts:5562 +Defined in node_modules/@types/node/stream.d.ts:163 **Parameters:** @@ -965,7 +979,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[once](sourcesource.md#once)* -Defined in node_modules/@types/node/base.d.ts:5563 +Defined in node_modules/@types/node/stream.d.ts:164 **Parameters:** @@ -983,7 +997,7 @@ Defined in node_modules/@types/node/base.d.ts:5563 *Overrides [SourceSource](sourcesource.md).[once](sourcesource.md#once)* -Defined in node_modules/@types/node/base.d.ts:5564 +Defined in node_modules/@types/node/stream.d.ts:165 **Parameters:** @@ -1007,7 +1021,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[once](sourcesource.md#once)* -Defined in node_modules/@types/node/base.d.ts:5565 +Defined in node_modules/@types/node/stream.d.ts:166 **Parameters:** @@ -1025,56 +1039,56 @@ Name | Type | **Returns:** *this* -___ +▸ **once**(`event`: string | symbol, `listener`: function): *this* -### pipe +*Inherited from [CountingWritable](countingwritable.md).[once](countingwritable.md#once)* -▸ **pipe**<**T**>(`destination`: T, `options?`: undefined | object): *T* +*Overrides [SourceSource](sourcesource.md).[once](sourcesource.md#once)* -*Inherited from [CountingWritable](countingwritable.md).[pipe](countingwritable.md#pipe)* +Defined in node_modules/@types/node/stream.d.ts:167 -Defined in node_modules/@types/node/base.d.ts:5407 +**Parameters:** -**Type parameters:** +▪ **event**: *string | symbol* -▪ **T**: *WritableStream* +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`destination` | T | -`options?` | undefined | object | +`...args` | any[] | -**Returns:** *T* +**Returns:** *this* ___ -### prependListener - -▸ **prependListener**(`event`: string, `listener`: function): *this* - -*Inherited from [CountingWritable](countingwritable.md).[prependListener](countingwritable.md#prependlistener)* - -*Overrides [SourceSource](sourcesource.md).[prependListener](sourcesource.md#prependlistener)* +### pipe -Defined in node_modules/@types/node/base.d.ts:5567 +▸ **pipe**<**T**>(`destination`: T, `options?`: undefined | object): *T* -**Parameters:** +*Inherited from [CountingWritable](countingwritable.md).[pipe](countingwritable.md#pipe)* -▪ **event**: *string* +Defined in node_modules/@types/node/stream.d.ts:5 -▪ **listener**: *function* +**Type parameters:** -▸ (...`args`: any[]): *void* +▪ **T**: *WritableStream* **Parameters:** Name | Type | ------ | ------ | -`...args` | any[] | +`destination` | T | +`options?` | undefined | object | -**Returns:** *this* +**Returns:** *T* + +___ + +### prependListener ▸ **prependListener**(`event`: "close", `listener`: function): *this* @@ -1082,7 +1096,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[prependListener](sourcesource.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:5568 +Defined in node_modules/@types/node/stream.d.ts:169 **Parameters:** @@ -1100,7 +1114,7 @@ Defined in node_modules/@types/node/base.d.ts:5568 *Overrides [SourceSource](sourcesource.md).[prependListener](sourcesource.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:5569 +Defined in node_modules/@types/node/stream.d.ts:170 **Parameters:** @@ -1118,7 +1132,7 @@ Defined in node_modules/@types/node/base.d.ts:5569 *Overrides [SourceSource](sourcesource.md).[prependListener](sourcesource.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:5570 +Defined in node_modules/@types/node/stream.d.ts:171 **Parameters:** @@ -1142,7 +1156,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[prependListener](sourcesource.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:5571 +Defined in node_modules/@types/node/stream.d.ts:172 **Parameters:** @@ -1160,7 +1174,7 @@ Defined in node_modules/@types/node/base.d.ts:5571 *Overrides [SourceSource](sourcesource.md).[prependListener](sourcesource.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:5572 +Defined in node_modules/@types/node/stream.d.ts:173 **Parameters:** @@ -1184,7 +1198,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[prependListener](sourcesource.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:5573 +Defined in node_modules/@types/node/stream.d.ts:174 **Parameters:** @@ -1202,21 +1216,17 @@ Name | Type | **Returns:** *this* -___ - -### prependOnceListener +▸ **prependListener**(`event`: string | symbol, `listener`: function): *this* -▸ **prependOnceListener**(`event`: string, `listener`: function): *this* - -*Inherited from [CountingWritable](countingwritable.md).[prependOnceListener](countingwritable.md#prependoncelistener)* +*Inherited from [CountingWritable](countingwritable.md).[prependListener](countingwritable.md#prependlistener)* -*Overrides [SourceSource](sourcesource.md).[prependOnceListener](sourcesource.md#prependoncelistener)* +*Overrides [SourceSource](sourcesource.md).[prependListener](sourcesource.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:5575 +Defined in node_modules/@types/node/stream.d.ts:175 **Parameters:** -▪ **event**: *string* +▪ **event**: *string | symbol* ▪ **listener**: *function* @@ -1230,13 +1240,17 @@ Name | Type | **Returns:** *this* +___ + +### prependOnceListener + ▸ **prependOnceListener**(`event`: "close", `listener`: function): *this* *Inherited from [CountingWritable](countingwritable.md).[prependOnceListener](countingwritable.md#prependoncelistener)* *Overrides [SourceSource](sourcesource.md).[prependOnceListener](sourcesource.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:5576 +Defined in node_modules/@types/node/stream.d.ts:177 **Parameters:** @@ -1254,7 +1268,7 @@ Defined in node_modules/@types/node/base.d.ts:5576 *Overrides [SourceSource](sourcesource.md).[prependOnceListener](sourcesource.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:5577 +Defined in node_modules/@types/node/stream.d.ts:178 **Parameters:** @@ -1272,7 +1286,7 @@ Defined in node_modules/@types/node/base.d.ts:5577 *Overrides [SourceSource](sourcesource.md).[prependOnceListener](sourcesource.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:5578 +Defined in node_modules/@types/node/stream.d.ts:179 **Parameters:** @@ -1296,7 +1310,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[prependOnceListener](sourcesource.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:5579 +Defined in node_modules/@types/node/stream.d.ts:180 **Parameters:** @@ -1314,7 +1328,7 @@ Defined in node_modules/@types/node/base.d.ts:5579 *Overrides [SourceSource](sourcesource.md).[prependOnceListener](sourcesource.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:5580 +Defined in node_modules/@types/node/stream.d.ts:181 **Parameters:** @@ -1338,7 +1352,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[prependOnceListener](sourcesource.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:5581 +Defined in node_modules/@types/node/stream.d.ts:182 **Parameters:** @@ -1356,59 +1370,77 @@ Name | Type | **Returns:** *this* -___ +▸ **prependOnceListener**(`event`: string | symbol, `listener`: function): *this* -### removeAllListeners +*Inherited from [CountingWritable](countingwritable.md).[prependOnceListener](countingwritable.md#prependoncelistener)* -▸ **removeAllListeners**(`event?`: string | symbol): *this* +*Overrides [SourceSource](sourcesource.md).[prependOnceListener](sourcesource.md#prependoncelistener)* -*Inherited from [CountingWritable](countingwritable.md).[removeAllListeners](countingwritable.md#removealllisteners)* +Defined in node_modules/@types/node/stream.d.ts:183 -Defined in node_modules/@types/node/base.d.ts:904 +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event?` | string | symbol | +`...args` | any[] | **Returns:** *this* ___ -### removeListener - -▸ **removeListener**(`event`: string, `listener`: function): *this* +### rawListeners -*Inherited from [CountingWritable](countingwritable.md).[removeListener](countingwritable.md#removelistener)* +▸ **rawListeners**(`event`: string | symbol): *Function[]* -*Overrides [SourceSource](sourcesource.md).[removeListener](sourcesource.md#removelistener)* +*Inherited from [CountingWritable](countingwritable.md).[rawListeners](countingwritable.md#rawlisteners)* -Defined in node_modules/@types/node/base.d.ts:5583 +Defined in node_modules/@types/node/events.d.ts:31 **Parameters:** -▪ **event**: *string* +Name | Type | +------ | ------ | +`event` | string | symbol | -▪ **listener**: *function* +**Returns:** *Function[]* -▸ (...`args`: any[]): *void* +___ + +### removeAllListeners + +▸ **removeAllListeners**(`event?`: string | symbol): *this* + +*Inherited from [CountingWritable](countingwritable.md).[removeAllListeners](countingwritable.md#removealllisteners)* + +Defined in node_modules/@types/node/events.d.ts:27 **Parameters:** Name | Type | ------ | ------ | -`...args` | any[] | +`event?` | string | symbol | **Returns:** *this* +___ + +### removeListener + ▸ **removeListener**(`event`: "close", `listener`: function): *this* *Inherited from [CountingWritable](countingwritable.md).[removeListener](countingwritable.md#removelistener)* *Overrides [SourceSource](sourcesource.md).[removeListener](sourcesource.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:5584 +Defined in node_modules/@types/node/stream.d.ts:185 **Parameters:** @@ -1426,7 +1458,7 @@ Defined in node_modules/@types/node/base.d.ts:5584 *Overrides [SourceSource](sourcesource.md).[removeListener](sourcesource.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:5585 +Defined in node_modules/@types/node/stream.d.ts:186 **Parameters:** @@ -1444,7 +1476,7 @@ Defined in node_modules/@types/node/base.d.ts:5585 *Overrides [SourceSource](sourcesource.md).[removeListener](sourcesource.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:5586 +Defined in node_modules/@types/node/stream.d.ts:187 **Parameters:** @@ -1468,7 +1500,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[removeListener](sourcesource.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:5587 +Defined in node_modules/@types/node/stream.d.ts:188 **Parameters:** @@ -1486,7 +1518,7 @@ Defined in node_modules/@types/node/base.d.ts:5587 *Overrides [SourceSource](sourcesource.md).[removeListener](sourcesource.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:5588 +Defined in node_modules/@types/node/stream.d.ts:189 **Parameters:** @@ -1510,7 +1542,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[removeListener](sourcesource.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:5589 +Defined in node_modules/@types/node/stream.d.ts:190 **Parameters:** @@ -1528,6 +1560,30 @@ Name | Type | **Returns:** *this* +▸ **removeListener**(`event`: string | symbol, `listener`: function): *this* + +*Inherited from [CountingWritable](countingwritable.md).[removeListener](countingwritable.md#removelistener)* + +*Overrides [SourceSource](sourcesource.md).[removeListener](sourcesource.md#removelistener)* + +Defined in node_modules/@types/node/stream.d.ts:191 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* + +**Parameters:** + +Name | Type | +------ | ------ | +`...args` | any[] | + +**Returns:** *this* + ___ ### setDefaultEncoding @@ -1536,7 +1592,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[setDefaultEncoding](countingwritable.md#setdefaultencoding)* -Defined in node_modules/@types/node/base.d.ts:5517 +Defined in node_modules/@types/node/stream.d.ts:119 **Parameters:** @@ -1554,7 +1610,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[setMaxListeners](countingwritable.md#setmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:905 +Defined in node_modules/@types/node/events.d.ts:28 **Parameters:** @@ -1572,7 +1628,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[uncork](countingwritable.md#uncork)* -Defined in node_modules/@types/node/base.d.ts:5522 +Defined in node_modules/@types/node/stream.d.ts:124 **Returns:** *void* @@ -1580,26 +1636,26 @@ ___ ### write -▸ **write**(`chunk`: any, `cb?`: Function): *boolean* +▸ **write**(`chunk`: any, `cb?`: undefined | function): *boolean* *Inherited from [CountingWritable](countingwritable.md).[write](countingwritable.md#write)* -Defined in node_modules/@types/node/base.d.ts:5515 +Defined in node_modules/@types/node/stream.d.ts:117 **Parameters:** Name | Type | ------ | ------ | `chunk` | any | -`cb?` | Function | +`cb?` | undefined | function | **Returns:** *boolean* -▸ **write**(`chunk`: any, `encoding?`: undefined | string, `cb?`: Function): *boolean* +▸ **write**(`chunk`: any, `encoding?`: undefined | string, `cb?`: undefined | function): *boolean* *Inherited from [CountingWritable](countingwritable.md).[write](countingwritable.md#write)* -Defined in node_modules/@types/node/base.d.ts:5516 +Defined in node_modules/@types/node/stream.d.ts:118 **Parameters:** @@ -1607,7 +1663,7 @@ Name | Type | ------ | ------ | `chunk` | any | `encoding?` | undefined | string | -`cb?` | Function | +`cb?` | undefined | function | **Returns:** *boolean* @@ -1617,7 +1673,7 @@ ___ ▸ **writeBuffer**(`buffer`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer), `position`: number): *Promise‹void›* -*Defined in [lib/block-write-stream.ts:56](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/block-write-stream.ts#L56)* +*Defined in [lib/block-write-stream.ts:56](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/block-write-stream.ts#L56)* **Parameters:** @@ -1636,7 +1692,9 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[listenerCount](countingwritable.md#static-listenercount)* -Defined in node_modules/@types/node/base.d.ts:895 +Defined in node_modules/@types/node/events.d.ts:17 + +**`deprecated`** since v4.0.0 **Parameters:** diff --git a/doc/classes/bzip2source.md b/doc/classes/bzip2source.md index a312d775..1b97d5b1 100644 --- a/doc/classes/bzip2source.md +++ b/doc/classes/bzip2source.md @@ -53,11 +53,13 @@ * [getSize](bzip2source.md#protected-getsize) * [listenerCount](bzip2source.md#listenercount) * [listeners](bzip2source.md#listeners) +* [off](bzip2source.md#off) * [on](bzip2source.md#on) * [once](bzip2source.md#once) * [open](bzip2source.md#open) * [prependListener](bzip2source.md#prependlistener) * [prependOnceListener](bzip2source.md#prependoncelistener) +* [rawListeners](bzip2source.md#rawlisteners) * [read](bzip2source.md#read) * [removeAllListeners](bzip2source.md#removealllisteners) * [removeListener](bzip2source.md#removelistener) @@ -74,7 +76,7 @@ *Inherited from [SourceSource](sourcesource.md).[constructor](sourcesource.md#constructor)* -*Defined in [lib/source-destination/source-source.ts:20](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-source.ts#L20)* +*Defined in [lib/source-destination/source-source.ts:20](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-source.ts#L20)* **Parameters:** @@ -92,7 +94,7 @@ Name | Type | *Inherited from [CompressedSource](compressedsource.md).[isSizeEstimated](compressedsource.md#protected-issizeestimated)* -*Defined in [lib/source-destination/compressed-source.ts:45](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/compressed-source.ts#L45)* +*Defined in [lib/source-destination/compressed-source.ts:45](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/compressed-source.ts#L45)* ___ @@ -102,7 +104,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[source](sourcesource.md#protected-source)* -*Defined in [lib/source-destination/source-source.ts:22](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-source.ts#L22)* +*Defined in [lib/source-destination/source-source.ts:22](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-source.ts#L22)* ___ @@ -112,7 +114,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[defaultMaxListeners](countingwritable.md#static-defaultmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:896 +Defined in node_modules/@types/node/events.d.ts:18 ___ @@ -133,7 +135,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[imageExtensions](sourcesource.md#static-imageextensions)* -*Defined in [lib/source-destination/source-destination.ts:252](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L252)* +*Defined in [lib/source-destination/source-destination.ts:275](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L275)* ___ @@ -143,7 +145,7 @@ ___ *Overrides [SourceSource](sourcesource.md).[mimetype](sourcesource.md#static-optional-mimetype)* -*Defined in [lib/source-destination/bzip2.ts:24](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/bzip2.ts#L24)* +*Defined in [lib/source-destination/bzip2.ts:24](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/bzip2.ts#L24)* ___ @@ -153,7 +155,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[requiresRandomReadableSource](sourcesource.md#static-requiresrandomreadablesource)* -*Defined in [lib/source-destination/source-source.ts:20](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-source.ts#L20)* +*Defined in [lib/source-destination/source-source.ts:20](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-source.ts#L20)* ## Methods @@ -165,7 +167,7 @@ ___ *Overrides [SourceDestination](sourcedestination.md).[_close](sourcedestination.md#protected-_close)* -*Defined in [lib/source-destination/source-source.ts:30](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-source.ts#L30)* +*Defined in [lib/source-destination/source-source.ts:30](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-source.ts#L30)* **Returns:** *Promise‹void›* @@ -179,7 +181,7 @@ ___ *Overrides [SourceSource](sourcesource.md).[_getMetadata](sourcesource.md#protected-_getmetadata)* -*Defined in [lib/source-destination/compressed-source.ts:85](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/compressed-source.ts#L85)* +*Defined in [lib/source-destination/compressed-source.ts:85](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/compressed-source.ts#L85)* **Returns:** *Promise‹[Metadata](../interfaces/metadata.md)›* @@ -193,7 +195,7 @@ ___ *Overrides [SourceDestination](sourcedestination.md).[_open](sourcedestination.md#protected-_open)* -*Defined in [lib/source-destination/source-source.ts:26](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-source.ts#L26)* +*Defined in [lib/source-destination/source-source.ts:26](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-source.ts#L26)* **Returns:** *Promise‹void›* @@ -207,7 +209,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[addListener](../interfaces/sparsereadable.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:898 +Defined in node_modules/@types/node/events.d.ts:20 **Parameters:** @@ -235,7 +237,7 @@ ___ *Overrides [SourceSource](sourcesource.md).[canCreateReadStream](sourcesource.md#cancreatereadstream)* -*Defined in [lib/source-destination/compressed-source.ts:51](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/compressed-source.ts#L51)* +*Defined in [lib/source-destination/compressed-source.ts:51](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/compressed-source.ts#L51)* **Returns:** *Promise‹boolean›* @@ -247,7 +249,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[canCreateSparseReadStream](sourcesource.md#cancreatesparsereadstream)* -*Defined in [lib/source-destination/source-destination.ts:292](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L292)* +*Defined in [lib/source-destination/source-destination.ts:315](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L315)* **Returns:** *Promise‹boolean›* @@ -259,7 +261,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[canCreateSparseWriteStream](sourcesource.md#cancreatesparsewritestream)* -*Defined in [lib/source-destination/source-destination.ts:300](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L300)* +*Defined in [lib/source-destination/source-destination.ts:323](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L323)* **Returns:** *Promise‹boolean›* @@ -271,7 +273,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[canCreateWriteStream](sourcesource.md#cancreatewritestream)* -*Defined in [lib/source-destination/source-destination.ts:296](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L296)* +*Defined in [lib/source-destination/source-destination.ts:319](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L319)* **Returns:** *Promise‹boolean›* @@ -283,7 +285,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[canRead](sourcesource.md#canread)* -*Defined in [lib/source-destination/source-destination.ts:280](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L280)* +*Defined in [lib/source-destination/source-destination.ts:303](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L303)* **Returns:** *Promise‹boolean›* @@ -295,7 +297,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[canWrite](sourcesource.md#canwrite)* -*Defined in [lib/source-destination/source-destination.ts:284](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L284)* +*Defined in [lib/source-destination/source-destination.ts:307](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L307)* **Returns:** *Promise‹boolean›* @@ -307,7 +309,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[close](sourcesource.md#close)* -*Defined in [lib/source-destination/source-destination.ts:368](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L368)* +*Defined in [lib/source-destination/source-destination.ts:391](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L391)* **Returns:** *Promise‹void›* @@ -321,7 +323,7 @@ ___ *Overrides [SourceSource](sourcesource.md).[createReadStream](sourcesource.md#createreadstream)* -*Defined in [lib/source-destination/compressed-source.ts:55](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/compressed-source.ts#L55)* +*Defined in [lib/source-destination/compressed-source.ts:55](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/compressed-source.ts#L55)* **Parameters:** @@ -343,7 +345,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[createSparseReadStream](sourcesource.md#createsparsereadstream)* -*Defined in [lib/source-destination/source-destination.ts:339](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L339)* +*Defined in [lib/source-destination/source-destination.ts:362](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L362)* **Parameters:** @@ -361,7 +363,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[createSparseWriteStream](sourcesource.md#createsparsewritestream)* -*Defined in [lib/source-destination/source-destination.ts:355](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L355)* +*Defined in [lib/source-destination/source-destination.ts:378](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L378)* **Parameters:** @@ -381,7 +383,7 @@ ___ *Overrides [CompressedSource](compressedsource.md).[createTransform](compressedsource.md#protected-abstract-createtransform)* -*Defined in [lib/source-destination/bzip2.ts:26](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/bzip2.ts#L26)* +*Defined in [lib/source-destination/bzip2.ts:26](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/bzip2.ts#L26)* **Returns:** *Transform* @@ -393,7 +395,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[createVerifier](sourcesource.md#createverifier)* -*Defined in [lib/source-destination/source-destination.ts:383](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L383)* +*Defined in [lib/source-destination/source-destination.ts:406](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L406)* **Parameters:** @@ -412,7 +414,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[createWriteStream](sourcesource.md#createwritestream)* -*Defined in [lib/source-destination/source-destination.ts:349](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L349)* +*Defined in [lib/source-destination/source-destination.ts:372](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L372)* **Parameters:** @@ -434,7 +436,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[emit](../interfaces/sparsereadable.md#emit)* -Defined in node_modules/@types/node/base.d.ts:908 +Defined in node_modules/@types/node/events.d.ts:32 **Parameters:** @@ -455,7 +457,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[eventNames](../interfaces/sparsereadable.md#eventnames)* -Defined in node_modules/@types/node/base.d.ts:909 +Defined in node_modules/@types/node/events.d.ts:33 **Returns:** *Array‹string | symbol›* @@ -467,7 +469,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[getAlignment](sourcesource.md#getalignment)* -*Defined in [lib/source-destination/source-destination.ts:276](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L276)* +*Defined in [lib/source-destination/source-destination.ts:299](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L299)* **Returns:** *number | undefined* @@ -479,7 +481,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[getBlocks](sourcesource.md#getblocks)* -*Defined in [lib/source-destination/source-destination.ts:345](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L345)* +*Defined in [lib/source-destination/source-destination.ts:368](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L368)* **Returns:** *Promise‹[BlocksWithChecksum](../interfaces/blockswithchecksum.md)[]›* @@ -491,7 +493,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[getInnerSource](sourcesource.md#getinnersource)* -*Defined in [lib/source-destination/source-destination.ts:452](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L452)* +*Defined in [lib/source-destination/source-destination.ts:475](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L475)* **Returns:** *Promise‹[SourceDestination](sourcedestination.md)›* @@ -505,7 +507,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[getMaxListeners](../interfaces/sparsereadable.md#getmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:906 +Defined in node_modules/@types/node/events.d.ts:29 **Returns:** *number* @@ -517,7 +519,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[getMetadata](sourcesource.md#getmetadata)* -*Defined in [lib/source-destination/source-destination.ts:304](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L304)* +*Defined in [lib/source-destination/source-destination.ts:327](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L327)* **Returns:** *Promise‹[Metadata](../interfaces/metadata.md)›* @@ -529,7 +531,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[getPartitionTable](sourcesource.md#getpartitiontable)* -*Defined in [lib/source-destination/source-destination.ts:473](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L473)* +*Defined in [lib/source-destination/source-destination.ts:496](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L496)* **Returns:** *Promise‹GetPartitionsResult | undefined›* @@ -541,7 +543,7 @@ ___ *Inherited from [CompressedSource](compressedsource.md).[getSize](compressedsource.md#protected-getsize)* -*Defined in [lib/source-destination/compressed-source.ts:47](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/compressed-source.ts#L47)* +*Defined in [lib/source-destination/compressed-source.ts:47](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/compressed-source.ts#L47)* **Returns:** *Promise‹number | undefined›* @@ -555,7 +557,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[listenerCount](../interfaces/sparsereadable.md#listenercount)* -Defined in node_modules/@types/node/base.d.ts:910 +Defined in node_modules/@types/node/events.d.ts:34 **Parameters:** @@ -575,7 +577,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[listeners](../interfaces/sparsereadable.md#listeners)* -Defined in node_modules/@types/node/base.d.ts:907 +Defined in node_modules/@types/node/events.d.ts:30 **Parameters:** @@ -587,6 +589,34 @@ Name | Type | ___ +### off + +▸ **off**(`event`: string | symbol, `listener`: function): *this* + +*Inherited from [CountingWritable](countingwritable.md).[off](countingwritable.md#off)* + +*Overrides [SparseReadable](../interfaces/sparsereadable.md).[off](../interfaces/sparsereadable.md#off)* + +Defined in node_modules/@types/node/events.d.ts:26 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* + +**Parameters:** + +Name | Type | +------ | ------ | +`...args` | any[] | + +**Returns:** *this* + +___ + ### on ▸ **on**(`event`: string | symbol, `listener`: function): *this* @@ -595,7 +625,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[on](../interfaces/sparsereadable.md#on)* -Defined in node_modules/@types/node/base.d.ts:899 +Defined in node_modules/@types/node/events.d.ts:21 **Parameters:** @@ -623,7 +653,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[once](../interfaces/sparsereadable.md#once)* -Defined in node_modules/@types/node/base.d.ts:900 +Defined in node_modules/@types/node/events.d.ts:22 **Parameters:** @@ -649,7 +679,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[open](sourcesource.md#open)* -*Defined in [lib/source-destination/source-destination.ts:361](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L361)* +*Defined in [lib/source-destination/source-destination.ts:384](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L384)* **Returns:** *Promise‹void›* @@ -663,7 +693,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[prependListener](../interfaces/sparsereadable.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:901 +Defined in node_modules/@types/node/events.d.ts:23 **Parameters:** @@ -691,7 +721,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[prependOnceListener](../interfaces/sparsereadable.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:902 +Defined in node_modules/@types/node/events.d.ts:24 **Parameters:** @@ -711,13 +741,33 @@ Name | Type | ___ +### rawListeners + +▸ **rawListeners**(`event`: string | symbol): *Function[]* + +*Inherited from [CountingWritable](countingwritable.md).[rawListeners](countingwritable.md#rawlisteners)* + +*Overrides [SparseReadable](../interfaces/sparsereadable.md).[rawListeners](../interfaces/sparsereadable.md#rawlisteners)* + +Defined in node_modules/@types/node/events.d.ts:31 + +**Parameters:** + +Name | Type | +------ | ------ | +`event` | string | symbol | + +**Returns:** *Function[]* + +___ + ### read ▸ **read**(`_buffer`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer), `_bufferOffset`: number, `_length`: number, `_sourceOffset`: number): *Promise‹ReadResult›* *Inherited from [SourceSource](sourcesource.md).[read](sourcesource.md#read)* -*Defined in [lib/source-destination/source-destination.ts:315](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L315)* +*Defined in [lib/source-destination/source-destination.ts:338](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L338)* **Parameters:** @@ -740,7 +790,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[removeAllListeners](../interfaces/sparsereadable.md#removealllisteners)* -Defined in node_modules/@types/node/base.d.ts:904 +Defined in node_modules/@types/node/events.d.ts:27 **Parameters:** @@ -760,7 +810,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[removeListener](../interfaces/sparsereadable.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:903 +Defined in node_modules/@types/node/events.d.ts:25 **Parameters:** @@ -788,7 +838,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[setMaxListeners](../interfaces/sparsereadable.md#setmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:905 +Defined in node_modules/@types/node/events.d.ts:28 **Parameters:** @@ -806,7 +856,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[write](sourcesource.md#write)* -*Defined in [lib/source-destination/source-destination.ts:324](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L324)* +*Defined in [lib/source-destination/source-destination.ts:347](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L347)* **Parameters:** @@ -827,7 +877,9 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[listenerCount](countingwritable.md#static-listenercount)* -Defined in node_modules/@types/node/base.d.ts:895 +Defined in node_modules/@types/node/events.d.ts:17 + +**`deprecated`** since v4.0.0 **Parameters:** @@ -846,7 +898,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[register](sourcesource.md#static-register)* -*Defined in [lib/source-destination/source-destination.ts:270](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L270)* +*Defined in [lib/source-destination/source-destination.ts:293](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L293)* **Parameters:** diff --git a/doc/classes/checksumverificationerror.md b/doc/classes/checksumverificationerror.md index 13cf8760..89a40157 100644 --- a/doc/classes/checksumverificationerror.md +++ b/doc/classes/checksumverificationerror.md @@ -29,7 +29,7 @@ \+ **new ChecksumVerificationError**(`message`: string, `checksum`: string, `expectedChecksum`: string): *[ChecksumVerificationError](checksumverificationerror.md)* -*Defined in [lib/errors.ts:27](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/errors.ts#L27)* +*Defined in [lib/errors.ts:27](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/errors.ts#L27)* **Parameters:** @@ -47,7 +47,7 @@ Name | Type | • **checksum**: *string* -*Defined in [lib/errors.ts:30](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/errors.ts#L30)* +*Defined in [lib/errors.ts:30](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/errors.ts#L30)* ___ @@ -57,7 +57,7 @@ ___ *Inherited from [VerificationError](verificationerror.md).[code](verificationerror.md#code)* -*Defined in [lib/errors.ts:24](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/errors.ts#L24)* +*Defined in [lib/errors.ts:24](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/errors.ts#L24)* ___ @@ -65,7 +65,7 @@ ___ • **expectedChecksum**: *string* -*Defined in [lib/errors.ts:31](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/errors.ts#L31)* +*Defined in [lib/errors.ts:31](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/errors.ts#L31)* ___ diff --git a/doc/classes/compressedsource.md b/doc/classes/compressedsource.md index 5763729c..e1e0fcc0 100644 --- a/doc/classes/compressedsource.md +++ b/doc/classes/compressedsource.md @@ -59,11 +59,13 @@ * [getSize](compressedsource.md#protected-getsize) * [listenerCount](compressedsource.md#listenercount) * [listeners](compressedsource.md#listeners) +* [off](compressedsource.md#off) * [on](compressedsource.md#on) * [once](compressedsource.md#once) * [open](compressedsource.md#open) * [prependListener](compressedsource.md#prependlistener) * [prependOnceListener](compressedsource.md#prependoncelistener) +* [rawListeners](compressedsource.md#rawlisteners) * [read](compressedsource.md#read) * [removeAllListeners](compressedsource.md#removealllisteners) * [removeListener](compressedsource.md#removelistener) @@ -80,7 +82,7 @@ *Inherited from [SourceSource](sourcesource.md).[constructor](sourcesource.md#constructor)* -*Defined in [lib/source-destination/source-source.ts:20](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-source.ts#L20)* +*Defined in [lib/source-destination/source-source.ts:20](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-source.ts#L20)* **Parameters:** @@ -96,7 +98,7 @@ Name | Type | • **isSizeEstimated**: *boolean* = false -*Defined in [lib/source-destination/compressed-source.ts:45](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/compressed-source.ts#L45)* +*Defined in [lib/source-destination/compressed-source.ts:45](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/compressed-source.ts#L45)* ___ @@ -106,7 +108,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[source](sourcesource.md#protected-source)* -*Defined in [lib/source-destination/source-source.ts:22](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-source.ts#L22)* +*Defined in [lib/source-destination/source-source.ts:22](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-source.ts#L22)* ___ @@ -116,7 +118,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[defaultMaxListeners](countingwritable.md#static-defaultmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:896 +Defined in node_modules/@types/node/events.d.ts:18 ___ @@ -137,7 +139,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[imageExtensions](sourcesource.md#static-imageextensions)* -*Defined in [lib/source-destination/source-destination.ts:252](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L252)* +*Defined in [lib/source-destination/source-destination.ts:275](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L275)* ___ @@ -147,7 +149,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[mimetype](sourcesource.md#static-optional-mimetype)* -*Defined in [lib/source-destination/source-destination.ts:264](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L264)* +*Defined in [lib/source-destination/source-destination.ts:287](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L287)* ___ @@ -157,7 +159,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[requiresRandomReadableSource](sourcesource.md#static-requiresrandomreadablesource)* -*Defined in [lib/source-destination/source-source.ts:20](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-source.ts#L20)* +*Defined in [lib/source-destination/source-source.ts:20](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-source.ts#L20)* ## Methods @@ -169,7 +171,7 @@ ___ *Overrides [SourceDestination](sourcedestination.md).[_close](sourcedestination.md#protected-_close)* -*Defined in [lib/source-destination/source-source.ts:30](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-source.ts#L30)* +*Defined in [lib/source-destination/source-source.ts:30](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-source.ts#L30)* **Returns:** *Promise‹void›* @@ -181,7 +183,7 @@ ___ *Overrides [SourceSource](sourcesource.md).[_getMetadata](sourcesource.md#protected-_getmetadata)* -*Defined in [lib/source-destination/compressed-source.ts:85](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/compressed-source.ts#L85)* +*Defined in [lib/source-destination/compressed-source.ts:85](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/compressed-source.ts#L85)* **Returns:** *Promise‹[Metadata](../interfaces/metadata.md)›* @@ -195,7 +197,7 @@ ___ *Overrides [SourceDestination](sourcedestination.md).[_open](sourcedestination.md#protected-_open)* -*Defined in [lib/source-destination/source-source.ts:26](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-source.ts#L26)* +*Defined in [lib/source-destination/source-source.ts:26](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-source.ts#L26)* **Returns:** *Promise‹void›* @@ -209,7 +211,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[addListener](../interfaces/sparsereadable.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:898 +Defined in node_modules/@types/node/events.d.ts:20 **Parameters:** @@ -235,7 +237,7 @@ ___ *Overrides [SourceSource](sourcesource.md).[canCreateReadStream](sourcesource.md#cancreatereadstream)* -*Defined in [lib/source-destination/compressed-source.ts:51](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/compressed-source.ts#L51)* +*Defined in [lib/source-destination/compressed-source.ts:51](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/compressed-source.ts#L51)* **Returns:** *Promise‹boolean›* @@ -247,7 +249,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[canCreateSparseReadStream](sourcesource.md#cancreatesparsereadstream)* -*Defined in [lib/source-destination/source-destination.ts:292](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L292)* +*Defined in [lib/source-destination/source-destination.ts:315](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L315)* **Returns:** *Promise‹boolean›* @@ -259,7 +261,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[canCreateSparseWriteStream](sourcesource.md#cancreatesparsewritestream)* -*Defined in [lib/source-destination/source-destination.ts:300](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L300)* +*Defined in [lib/source-destination/source-destination.ts:323](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L323)* **Returns:** *Promise‹boolean›* @@ -271,7 +273,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[canCreateWriteStream](sourcesource.md#cancreatewritestream)* -*Defined in [lib/source-destination/source-destination.ts:296](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L296)* +*Defined in [lib/source-destination/source-destination.ts:319](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L319)* **Returns:** *Promise‹boolean›* @@ -283,7 +285,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[canRead](sourcesource.md#canread)* -*Defined in [lib/source-destination/source-destination.ts:280](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L280)* +*Defined in [lib/source-destination/source-destination.ts:303](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L303)* **Returns:** *Promise‹boolean›* @@ -295,7 +297,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[canWrite](sourcesource.md#canwrite)* -*Defined in [lib/source-destination/source-destination.ts:284](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L284)* +*Defined in [lib/source-destination/source-destination.ts:307](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L307)* **Returns:** *Promise‹boolean›* @@ -307,7 +309,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[close](sourcesource.md#close)* -*Defined in [lib/source-destination/source-destination.ts:368](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L368)* +*Defined in [lib/source-destination/source-destination.ts:391](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L391)* **Returns:** *Promise‹void›* @@ -319,7 +321,7 @@ ___ *Overrides [SourceSource](sourcesource.md).[createReadStream](sourcesource.md#createreadstream)* -*Defined in [lib/source-destination/compressed-source.ts:55](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/compressed-source.ts#L55)* +*Defined in [lib/source-destination/compressed-source.ts:55](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/compressed-source.ts#L55)* **Parameters:** @@ -341,7 +343,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[createSparseReadStream](sourcesource.md#createsparsereadstream)* -*Defined in [lib/source-destination/source-destination.ts:339](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L339)* +*Defined in [lib/source-destination/source-destination.ts:362](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L362)* **Parameters:** @@ -359,7 +361,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[createSparseWriteStream](sourcesource.md#createsparsewritestream)* -*Defined in [lib/source-destination/source-destination.ts:355](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L355)* +*Defined in [lib/source-destination/source-destination.ts:378](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L378)* **Parameters:** @@ -377,7 +379,7 @@ ___ ▸ **createTransform**(): *Transform* -*Defined in [lib/source-destination/compressed-source.ts:44](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/compressed-source.ts#L44)* +*Defined in [lib/source-destination/compressed-source.ts:44](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/compressed-source.ts#L44)* **Returns:** *Transform* @@ -389,7 +391,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[createVerifier](sourcesource.md#createverifier)* -*Defined in [lib/source-destination/source-destination.ts:383](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L383)* +*Defined in [lib/source-destination/source-destination.ts:406](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L406)* **Parameters:** @@ -408,7 +410,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[createWriteStream](sourcesource.md#createwritestream)* -*Defined in [lib/source-destination/source-destination.ts:349](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L349)* +*Defined in [lib/source-destination/source-destination.ts:372](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L372)* **Parameters:** @@ -430,7 +432,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[emit](../interfaces/sparsereadable.md#emit)* -Defined in node_modules/@types/node/base.d.ts:908 +Defined in node_modules/@types/node/events.d.ts:32 **Parameters:** @@ -451,7 +453,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[eventNames](../interfaces/sparsereadable.md#eventnames)* -Defined in node_modules/@types/node/base.d.ts:909 +Defined in node_modules/@types/node/events.d.ts:33 **Returns:** *Array‹string | symbol›* @@ -463,7 +465,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[getAlignment](sourcesource.md#getalignment)* -*Defined in [lib/source-destination/source-destination.ts:276](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L276)* +*Defined in [lib/source-destination/source-destination.ts:299](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L299)* **Returns:** *number | undefined* @@ -475,7 +477,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[getBlocks](sourcesource.md#getblocks)* -*Defined in [lib/source-destination/source-destination.ts:345](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L345)* +*Defined in [lib/source-destination/source-destination.ts:368](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L368)* **Returns:** *Promise‹[BlocksWithChecksum](../interfaces/blockswithchecksum.md)[]›* @@ -487,7 +489,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[getInnerSource](sourcesource.md#getinnersource)* -*Defined in [lib/source-destination/source-destination.ts:452](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L452)* +*Defined in [lib/source-destination/source-destination.ts:475](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L475)* **Returns:** *Promise‹[SourceDestination](sourcedestination.md)›* @@ -501,7 +503,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[getMaxListeners](../interfaces/sparsereadable.md#getmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:906 +Defined in node_modules/@types/node/events.d.ts:29 **Returns:** *number* @@ -513,7 +515,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[getMetadata](sourcesource.md#getmetadata)* -*Defined in [lib/source-destination/source-destination.ts:304](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L304)* +*Defined in [lib/source-destination/source-destination.ts:327](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L327)* **Returns:** *Promise‹[Metadata](../interfaces/metadata.md)›* @@ -525,7 +527,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[getPartitionTable](sourcesource.md#getpartitiontable)* -*Defined in [lib/source-destination/source-destination.ts:473](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L473)* +*Defined in [lib/source-destination/source-destination.ts:496](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L496)* **Returns:** *Promise‹GetPartitionsResult | undefined›* @@ -535,7 +537,7 @@ ___ ▸ **getSize**(): *Promise‹number | undefined›* -*Defined in [lib/source-destination/compressed-source.ts:47](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/compressed-source.ts#L47)* +*Defined in [lib/source-destination/compressed-source.ts:47](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/compressed-source.ts#L47)* **Returns:** *Promise‹number | undefined›* @@ -549,7 +551,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[listenerCount](../interfaces/sparsereadable.md#listenercount)* -Defined in node_modules/@types/node/base.d.ts:910 +Defined in node_modules/@types/node/events.d.ts:34 **Parameters:** @@ -569,7 +571,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[listeners](../interfaces/sparsereadable.md#listeners)* -Defined in node_modules/@types/node/base.d.ts:907 +Defined in node_modules/@types/node/events.d.ts:30 **Parameters:** @@ -581,6 +583,34 @@ Name | Type | ___ +### off + +▸ **off**(`event`: string | symbol, `listener`: function): *this* + +*Inherited from [CountingWritable](countingwritable.md).[off](countingwritable.md#off)* + +*Overrides [SparseReadable](../interfaces/sparsereadable.md).[off](../interfaces/sparsereadable.md#off)* + +Defined in node_modules/@types/node/events.d.ts:26 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* + +**Parameters:** + +Name | Type | +------ | ------ | +`...args` | any[] | + +**Returns:** *this* + +___ + ### on ▸ **on**(`event`: string | symbol, `listener`: function): *this* @@ -589,7 +619,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[on](../interfaces/sparsereadable.md#on)* -Defined in node_modules/@types/node/base.d.ts:899 +Defined in node_modules/@types/node/events.d.ts:21 **Parameters:** @@ -617,7 +647,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[once](../interfaces/sparsereadable.md#once)* -Defined in node_modules/@types/node/base.d.ts:900 +Defined in node_modules/@types/node/events.d.ts:22 **Parameters:** @@ -643,7 +673,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[open](sourcesource.md#open)* -*Defined in [lib/source-destination/source-destination.ts:361](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L361)* +*Defined in [lib/source-destination/source-destination.ts:384](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L384)* **Returns:** *Promise‹void›* @@ -657,7 +687,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[prependListener](../interfaces/sparsereadable.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:901 +Defined in node_modules/@types/node/events.d.ts:23 **Parameters:** @@ -685,7 +715,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[prependOnceListener](../interfaces/sparsereadable.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:902 +Defined in node_modules/@types/node/events.d.ts:24 **Parameters:** @@ -705,13 +735,33 @@ Name | Type | ___ +### rawListeners + +▸ **rawListeners**(`event`: string | symbol): *Function[]* + +*Inherited from [CountingWritable](countingwritable.md).[rawListeners](countingwritable.md#rawlisteners)* + +*Overrides [SparseReadable](../interfaces/sparsereadable.md).[rawListeners](../interfaces/sparsereadable.md#rawlisteners)* + +Defined in node_modules/@types/node/events.d.ts:31 + +**Parameters:** + +Name | Type | +------ | ------ | +`event` | string | symbol | + +**Returns:** *Function[]* + +___ + ### read ▸ **read**(`_buffer`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer), `_bufferOffset`: number, `_length`: number, `_sourceOffset`: number): *Promise‹ReadResult›* *Inherited from [SourceSource](sourcesource.md).[read](sourcesource.md#read)* -*Defined in [lib/source-destination/source-destination.ts:315](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L315)* +*Defined in [lib/source-destination/source-destination.ts:338](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L338)* **Parameters:** @@ -734,7 +784,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[removeAllListeners](../interfaces/sparsereadable.md#removealllisteners)* -Defined in node_modules/@types/node/base.d.ts:904 +Defined in node_modules/@types/node/events.d.ts:27 **Parameters:** @@ -754,7 +804,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[removeListener](../interfaces/sparsereadable.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:903 +Defined in node_modules/@types/node/events.d.ts:25 **Parameters:** @@ -782,7 +832,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[setMaxListeners](../interfaces/sparsereadable.md#setmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:905 +Defined in node_modules/@types/node/events.d.ts:28 **Parameters:** @@ -800,7 +850,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[write](sourcesource.md#write)* -*Defined in [lib/source-destination/source-destination.ts:324](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L324)* +*Defined in [lib/source-destination/source-destination.ts:347](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L347)* **Parameters:** @@ -821,7 +871,9 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[listenerCount](countingwritable.md#static-listenercount)* -Defined in node_modules/@types/node/base.d.ts:895 +Defined in node_modules/@types/node/events.d.ts:17 + +**`deprecated`** since v4.0.0 **Parameters:** @@ -840,7 +892,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[register](sourcesource.md#static-register)* -*Defined in [lib/source-destination/source-destination.ts:270](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L270)* +*Defined in [lib/source-destination/source-destination.ts:293](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L293)* **Parameters:** diff --git a/doc/classes/configuredsource.md b/doc/classes/configuredsource.md index e44fe9ae..1225df39 100644 --- a/doc/classes/configuredsource.md +++ b/doc/classes/configuredsource.md @@ -18,7 +18,7 @@ * [checksumType](configuredsource.md#private-checksumtype) * [chunkSize](configuredsource.md#private-chunksize) -* [config](configuredsource.md#private-optional-config) +* [config](configuredsource.md#private-config) * [configure](configuredsource.md#private-optional-configure) * [createStreamFromDisk](configuredsource.md#private-createstreamfromdisk) * [disk](configuredsource.md#private-disk) @@ -60,11 +60,13 @@ * [getPartitionTable](configuredsource.md#getpartitiontable) * [listenerCount](configuredsource.md#listenercount) * [listeners](configuredsource.md#listeners) +* [off](configuredsource.md#off) * [on](configuredsource.md#on) * [once](configuredsource.md#once) * [open](configuredsource.md#open) * [prependListener](configuredsource.md#prependlistener) * [prependOnceListener](configuredsource.md#prependoncelistener) +* [rawListeners](configuredsource.md#rawlisteners) * [read](configuredsource.md#read) * [removeAllListeners](configuredsource.md#removealllisteners) * [removeListener](configuredsource.md#removelistener) @@ -78,23 +80,25 @@ ### constructor -\+ **new ConfiguredSource**(`source`: [SourceDestination](sourcedestination.md), `shouldTrimPartitions`: boolean, `createStreamFromDisk`: boolean, `configure?`: [ConfigureFunction](../README.md#configurefunction) | "legacy", `config?`: any, `checksumType`: [ChecksumType](../README.md#checksumtype), `chunkSize`: number): *[ConfiguredSource](configuredsource.md)* +\+ **new ConfiguredSource**(`__namedParameters`: object): *[ConfiguredSource](configuredsource.md)* *Overrides [SourceSource](sourcesource.md).[constructor](sourcesource.md#constructor)* -*Defined in [lib/source-destination/configured-source/configured-source.ts:91](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/configured-source/configured-source.ts#L91)* +*Defined in [lib/source-destination/configured-source/configured-source.ts:96](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/configured-source/configured-source.ts#L96)* **Parameters:** +▪ **__namedParameters**: *object* + Name | Type | Default | ------ | ------ | ------ | -`source` | [SourceDestination](sourcedestination.md) | - | -`shouldTrimPartitions` | boolean | - | -`createStreamFromDisk` | boolean | - | -`configure?` | [ConfigureFunction](../README.md#configurefunction) | "legacy" | - | -`config?` | any | - | -`checksumType` | [ChecksumType](../README.md#checksumtype) | "xxhash64" | +`checksumType` | "crc32" | "sha1" | "sha256" | "xxhash32" | "xxhash64" | "xxhash64" | `chunkSize` | number | CHUNK_SIZE | +`config` | any | - | +`configure` | undefined | function | "legacy" | - | +`createStreamFromDisk` | boolean | - | +`shouldTrimPartitions` | boolean | - | +`source` | [SourceDestination](sourcedestination.md)‹› | - | **Returns:** *[ConfiguredSource](configuredsource.md)* @@ -104,7 +108,7 @@ Name | Type | Default | • **checksumType**: *[ChecksumType](../README.md#checksumtype)* -*Defined in [lib/source-destination/configured-source/configured-source.ts:100](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/configured-source/configured-source.ts#L100)* +*Defined in [lib/source-destination/configured-source/configured-source.ts:93](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/configured-source/configured-source.ts#L93)* ___ @@ -112,15 +116,15 @@ ___ • **chunkSize**: *number* -*Defined in [lib/source-destination/configured-source/configured-source.ts:101](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/configured-source/configured-source.ts#L101)* +*Defined in [lib/source-destination/configured-source/configured-source.ts:94](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/configured-source/configured-source.ts#L94)* ___ -### `Private` `Optional` config +### `Private` config -• **config**? : *any* +• **config**: *any* -*Defined in [lib/source-destination/configured-source/configured-source.ts:99](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/configured-source/configured-source.ts#L99)* +*Defined in [lib/source-destination/configured-source/configured-source.ts:92](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/configured-source/configured-source.ts#L92)* ___ @@ -128,7 +132,7 @@ ___ • **configure**? : *[ConfigureFunction](../README.md#configurefunction)* -*Defined in [lib/source-destination/configured-source/configured-source.ts:91](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/configured-source/configured-source.ts#L91)* +*Defined in [lib/source-destination/configured-source/configured-source.ts:96](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/configured-source/configured-source.ts#L96)* ___ @@ -136,7 +140,7 @@ ___ • **createStreamFromDisk**: *boolean* -*Defined in [lib/source-destination/configured-source/configured-source.ts:97](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/configured-source/configured-source.ts#L97)* +*Defined in [lib/source-destination/configured-source/configured-source.ts:91](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/configured-source/configured-source.ts#L91)* ___ @@ -144,7 +148,7 @@ ___ • **disk**: *[SourceDisk](sourcedisk.md)* -*Defined in [lib/source-destination/configured-source/configured-source.ts:90](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/configured-source/configured-source.ts#L90)* +*Defined in [lib/source-destination/configured-source/configured-source.ts:95](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/configured-source/configured-source.ts#L95)* ___ @@ -152,7 +156,7 @@ ___ • **shouldTrimPartitions**: *boolean* -*Defined in [lib/source-destination/configured-source/configured-source.ts:96](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/configured-source/configured-source.ts#L96)* +*Defined in [lib/source-destination/configured-source/configured-source.ts:90](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/configured-source/configured-source.ts#L90)* ___ @@ -162,7 +166,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[source](sourcesource.md#protected-source)* -*Defined in [lib/source-destination/source-source.ts:22](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-source.ts#L22)* +*Defined in [lib/source-destination/source-source.ts:22](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-source.ts#L22)* ___ @@ -172,7 +176,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[defaultMaxListeners](countingwritable.md#static-defaultmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:896 +Defined in node_modules/@types/node/events.d.ts:18 ___ @@ -193,7 +197,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[imageExtensions](sourcesource.md#static-imageextensions)* -*Defined in [lib/source-destination/source-destination.ts:252](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L252)* +*Defined in [lib/source-destination/source-destination.ts:275](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L275)* ___ @@ -203,7 +207,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[mimetype](sourcesource.md#static-optional-mimetype)* -*Defined in [lib/source-destination/source-destination.ts:264](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L264)* +*Defined in [lib/source-destination/source-destination.ts:287](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L287)* ___ @@ -213,7 +217,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[requiresRandomReadableSource](sourcesource.md#static-requiresrandomreadablesource)* -*Defined in [lib/source-destination/source-source.ts:20](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-source.ts#L20)* +*Defined in [lib/source-destination/source-source.ts:20](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-source.ts#L20)* ## Methods @@ -223,7 +227,7 @@ ___ *Overrides [SourceSource](sourcesource.md).[_close](sourcesource.md#protected-_close)* -*Defined in [lib/source-destination/configured-source/configured-source.ts:277](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/configured-source/configured-source.ts#L277)* +*Defined in [lib/source-destination/configured-source/configured-source.ts:294](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/configured-source/configured-source.ts#L294)* **Returns:** *Promise‹void›* @@ -235,7 +239,7 @@ ___ *Overrides [SourceSource](sourcesource.md).[_getMetadata](sourcesource.md#protected-_getmetadata)* -*Defined in [lib/source-destination/configured-source/configured-source.ts:221](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/configured-source/configured-source.ts#L221)* +*Defined in [lib/source-destination/configured-source/configured-source.ts:238](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/configured-source/configured-source.ts#L238)* **Returns:** *Promise‹[Metadata](../interfaces/metadata.md)›* @@ -247,7 +251,7 @@ ___ *Overrides [SourceSource](sourcesource.md).[_open](sourcesource.md#protected-_open)* -*Defined in [lib/source-destination/configured-source/configured-source.ts:266](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/configured-source/configured-source.ts#L266)* +*Defined in [lib/source-destination/configured-source/configured-source.ts:283](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/configured-source/configured-source.ts#L283)* **Returns:** *Promise‹void›* @@ -261,7 +265,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[addListener](../interfaces/sparsereadable.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:898 +Defined in node_modules/@types/node/events.d.ts:20 **Parameters:** @@ -287,7 +291,7 @@ ___ *Overrides [SourceSource](sourcesource.md).[canCreateReadStream](sourcesource.md#cancreatereadstream)* -*Defined in [lib/source-destination/configured-source/configured-source.ts:135](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/configured-source/configured-source.ts#L135)* +*Defined in [lib/source-destination/configured-source/configured-source.ts:152](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/configured-source/configured-source.ts#L152)* **Returns:** *Promise‹boolean›* @@ -299,7 +303,7 @@ ___ *Overrides [SourceSource](sourcesource.md).[canCreateSparseReadStream](sourcesource.md#cancreatesparsereadstream)* -*Defined in [lib/source-destination/configured-source/configured-source.ts:139](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/configured-source/configured-source.ts#L139)* +*Defined in [lib/source-destination/configured-source/configured-source.ts:156](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/configured-source/configured-source.ts#L156)* **Returns:** *Promise‹boolean›* @@ -311,7 +315,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[canCreateSparseWriteStream](sourcesource.md#cancreatesparsewritestream)* -*Defined in [lib/source-destination/source-destination.ts:300](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L300)* +*Defined in [lib/source-destination/source-destination.ts:323](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L323)* **Returns:** *Promise‹boolean›* @@ -323,7 +327,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[canCreateWriteStream](sourcesource.md#cancreatewritestream)* -*Defined in [lib/source-destination/source-destination.ts:296](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L296)* +*Defined in [lib/source-destination/source-destination.ts:319](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L319)* **Returns:** *Promise‹boolean›* @@ -335,7 +339,7 @@ ___ *Overrides [SourceSource](sourcesource.md).[canRead](sourcesource.md#canread)* -*Defined in [lib/source-destination/configured-source/configured-source.ts:131](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/configured-source/configured-source.ts#L131)* +*Defined in [lib/source-destination/configured-source/configured-source.ts:148](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/configured-source/configured-source.ts#L148)* **Returns:** *Promise‹boolean›* @@ -347,7 +351,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[canWrite](sourcesource.md#canwrite)* -*Defined in [lib/source-destination/source-destination.ts:284](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L284)* +*Defined in [lib/source-destination/source-destination.ts:307](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L307)* **Returns:** *Promise‹boolean›* @@ -359,7 +363,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[close](sourcesource.md#close)* -*Defined in [lib/source-destination/source-destination.ts:368](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L368)* +*Defined in [lib/source-destination/source-destination.ts:391](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L391)* **Returns:** *Promise‹void›* @@ -371,7 +375,7 @@ ___ *Overrides [SourceSource](sourcesource.md).[createReadStream](sourcesource.md#createreadstream)* -*Defined in [lib/source-destination/configured-source/configured-source.ts:152](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/configured-source/configured-source.ts#L152)* +*Defined in [lib/source-destination/configured-source/configured-source.ts:169](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/configured-source/configured-source.ts#L169)* **Parameters:** @@ -389,7 +393,7 @@ ___ *Overrides [SourceSource](sourcesource.md).[createSparseReadStream](sourcesource.md#createsparsereadstream)* -*Defined in [lib/source-destination/configured-source/configured-source.ts:199](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/configured-source/configured-source.ts#L199)* +*Defined in [lib/source-destination/configured-source/configured-source.ts:216](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/configured-source/configured-source.ts#L216)* **Parameters:** @@ -409,7 +413,7 @@ ___ ▸ **createSparseReadStreamFromDisk**(`generateChecksums`: boolean, `alignment?`: undefined | number, `numBuffers`: number): *Promise‹[SparseReadStream](sparsereadstream.md)›* -*Defined in [lib/source-destination/configured-source/configured-source.ts:164](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/configured-source/configured-source.ts#L164)* +*Defined in [lib/source-destination/configured-source/configured-source.ts:181](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/configured-source/configured-source.ts#L181)* **Parameters:** @@ -427,7 +431,7 @@ ___ ▸ **createSparseReadStreamFromStream**(`generateChecksums`: boolean, `alignment?`: undefined | number, `numBuffers`: number): *Promise‹[SparseFilterStream](sparsefilterstream.md)›* -*Defined in [lib/source-destination/configured-source/configured-source.ts:180](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/configured-source/configured-source.ts#L180)* +*Defined in [lib/source-destination/configured-source/configured-source.ts:197](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/configured-source/configured-source.ts#L197)* **Parameters:** @@ -447,7 +451,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[createSparseWriteStream](sourcesource.md#createsparsewritestream)* -*Defined in [lib/source-destination/source-destination.ts:355](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L355)* +*Defined in [lib/source-destination/source-destination.ts:378](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L378)* **Parameters:** @@ -467,7 +471,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[createVerifier](sourcesource.md#createverifier)* -*Defined in [lib/source-destination/source-destination.ts:383](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L383)* +*Defined in [lib/source-destination/source-destination.ts:406](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L406)* **Parameters:** @@ -486,7 +490,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[createWriteStream](sourcesource.md#createwritestream)* -*Defined in [lib/source-destination/source-destination.ts:349](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L349)* +*Defined in [lib/source-destination/source-destination.ts:372](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L372)* **Parameters:** @@ -508,7 +512,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[emit](../interfaces/sparsereadable.md#emit)* -Defined in node_modules/@types/node/base.d.ts:908 +Defined in node_modules/@types/node/events.d.ts:32 **Parameters:** @@ -529,7 +533,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[eventNames](../interfaces/sparsereadable.md#eventnames)* -Defined in node_modules/@types/node/base.d.ts:909 +Defined in node_modules/@types/node/events.d.ts:33 **Returns:** *Array‹string | symbol›* @@ -541,7 +545,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[getAlignment](sourcesource.md#getalignment)* -*Defined in [lib/source-destination/source-destination.ts:276](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L276)* +*Defined in [lib/source-destination/source-destination.ts:299](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L299)* **Returns:** *number | undefined* @@ -553,7 +557,7 @@ ___ *Overrides [SourceSource](sourcesource.md).[getBlocks](sourcesource.md#getblocks)* -*Defined in [lib/source-destination/configured-source/configured-source.ts:112](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/configured-source/configured-source.ts#L112)* +*Defined in [lib/source-destination/configured-source/configured-source.ts:129](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/configured-source/configured-source.ts#L129)* **Returns:** *Promise‹[BlocksWithChecksum](../interfaces/blockswithchecksum.md)[]›* @@ -563,7 +567,7 @@ ___ ▸ **getBlocksWithChecksumType**(`generateChecksums`: boolean): *Promise‹[BlocksWithChecksum](../interfaces/blockswithchecksum.md)[]›* -*Defined in [lib/source-destination/configured-source/configured-source.ts:118](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/configured-source/configured-source.ts#L118)* +*Defined in [lib/source-destination/configured-source/configured-source.ts:135](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/configured-source/configured-source.ts#L135)* **Parameters:** @@ -581,7 +585,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[getInnerSource](sourcesource.md#getinnersource)* -*Defined in [lib/source-destination/source-destination.ts:452](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L452)* +*Defined in [lib/source-destination/source-destination.ts:475](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L475)* **Returns:** *Promise‹[SourceDestination](sourcedestination.md)›* @@ -595,7 +599,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[getMaxListeners](../interfaces/sparsereadable.md#getmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:906 +Defined in node_modules/@types/node/events.d.ts:29 **Returns:** *number* @@ -607,7 +611,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[getMetadata](sourcesource.md#getmetadata)* -*Defined in [lib/source-destination/source-destination.ts:304](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L304)* +*Defined in [lib/source-destination/source-destination.ts:327](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L327)* **Returns:** *Promise‹[Metadata](../interfaces/metadata.md)›* @@ -619,7 +623,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[getPartitionTable](sourcesource.md#getpartitiontable)* -*Defined in [lib/source-destination/source-destination.ts:473](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L473)* +*Defined in [lib/source-destination/source-destination.ts:496](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L496)* **Returns:** *Promise‹GetPartitionsResult | undefined›* @@ -633,7 +637,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[listenerCount](../interfaces/sparsereadable.md#listenercount)* -Defined in node_modules/@types/node/base.d.ts:910 +Defined in node_modules/@types/node/events.d.ts:34 **Parameters:** @@ -653,7 +657,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[listeners](../interfaces/sparsereadable.md#listeners)* -Defined in node_modules/@types/node/base.d.ts:907 +Defined in node_modules/@types/node/events.d.ts:30 **Parameters:** @@ -665,6 +669,34 @@ Name | Type | ___ +### off + +▸ **off**(`event`: string | symbol, `listener`: function): *this* + +*Inherited from [CountingWritable](countingwritable.md).[off](countingwritable.md#off)* + +*Overrides [SparseReadable](../interfaces/sparsereadable.md).[off](../interfaces/sparsereadable.md#off)* + +Defined in node_modules/@types/node/events.d.ts:26 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* + +**Parameters:** + +Name | Type | +------ | ------ | +`...args` | any[] | + +**Returns:** *this* + +___ + ### on ▸ **on**(`event`: string | symbol, `listener`: function): *this* @@ -673,7 +705,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[on](../interfaces/sparsereadable.md#on)* -Defined in node_modules/@types/node/base.d.ts:899 +Defined in node_modules/@types/node/events.d.ts:21 **Parameters:** @@ -701,7 +733,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[once](../interfaces/sparsereadable.md#once)* -Defined in node_modules/@types/node/base.d.ts:900 +Defined in node_modules/@types/node/events.d.ts:22 **Parameters:** @@ -727,7 +759,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[open](sourcesource.md#open)* -*Defined in [lib/source-destination/source-destination.ts:361](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L361)* +*Defined in [lib/source-destination/source-destination.ts:384](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L384)* **Returns:** *Promise‹void›* @@ -741,7 +773,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[prependListener](../interfaces/sparsereadable.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:901 +Defined in node_modules/@types/node/events.d.ts:23 **Parameters:** @@ -769,7 +801,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[prependOnceListener](../interfaces/sparsereadable.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:902 +Defined in node_modules/@types/node/events.d.ts:24 **Parameters:** @@ -789,13 +821,33 @@ Name | Type | ___ +### rawListeners + +▸ **rawListeners**(`event`: string | symbol): *Function[]* + +*Inherited from [CountingWritable](countingwritable.md).[rawListeners](countingwritable.md#rawlisteners)* + +*Overrides [SparseReadable](../interfaces/sparsereadable.md).[rawListeners](../interfaces/sparsereadable.md#rawlisteners)* + +Defined in node_modules/@types/node/events.d.ts:31 + +**Parameters:** + +Name | Type | +------ | ------ | +`event` | string | symbol | + +**Returns:** *Function[]* + +___ + ### read ▸ **read**(`buffer`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer), `bufferOffset`: number, `length`: number, `sourceOffset`: number): *Promise‹ReadResult›* *Overrides [SourceSource](sourcesource.md).[read](sourcesource.md#read)* -*Defined in [lib/source-destination/configured-source/configured-source.ts:143](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/configured-source/configured-source.ts#L143)* +*Defined in [lib/source-destination/configured-source/configured-source.ts:160](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/configured-source/configured-source.ts#L160)* **Parameters:** @@ -818,7 +870,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[removeAllListeners](../interfaces/sparsereadable.md#removealllisteners)* -Defined in node_modules/@types/node/base.d.ts:904 +Defined in node_modules/@types/node/events.d.ts:27 **Parameters:** @@ -838,7 +890,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[removeListener](../interfaces/sparsereadable.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:903 +Defined in node_modules/@types/node/events.d.ts:25 **Parameters:** @@ -866,7 +918,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[setMaxListeners](../interfaces/sparsereadable.md#setmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:905 +Defined in node_modules/@types/node/events.d.ts:28 **Parameters:** @@ -882,7 +934,7 @@ ___ ▸ **trimPartitions**(): *Promise‹void›* -*Defined in [lib/source-destination/configured-source/configured-source.ts:228](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/configured-source/configured-source.ts#L228)* +*Defined in [lib/source-destination/configured-source/configured-source.ts:245](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/configured-source/configured-source.ts#L245)* **Returns:** *Promise‹void›* @@ -894,7 +946,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[write](sourcesource.md#write)* -*Defined in [lib/source-destination/source-destination.ts:324](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L324)* +*Defined in [lib/source-destination/source-destination.ts:347](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L347)* **Parameters:** @@ -915,7 +967,9 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[listenerCount](countingwritable.md#static-listenercount)* -Defined in node_modules/@types/node/base.d.ts:895 +Defined in node_modules/@types/node/events.d.ts:17 + +**`deprecated`** since v4.0.0 **Parameters:** @@ -934,7 +988,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[register](sourcesource.md#static-register)* -*Defined in [lib/source-destination/source-destination.ts:270](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L270)* +*Defined in [lib/source-destination/source-destination.ts:293](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L293)* **Parameters:** diff --git a/doc/classes/countinghashstream.md b/doc/classes/countinghashstream.md index 4e9b646e..a8e90f5f 100644 --- a/doc/classes/countinghashstream.md +++ b/doc/classes/countinghashstream.md @@ -24,14 +24,19 @@ * [bytesWritten](countinghashstream.md#byteswritten) * [readable](countinghashstream.md#readable) * [readableHighWaterMark](countinghashstream.md#readablehighwatermark) +* [readableLength](countinghashstream.md#readablelength) * [writable](countinghashstream.md#writable) * [writableHighWaterMark](countinghashstream.md#writablehighwatermark) +* [writableLength](countinghashstream.md#writablelength) * [defaultMaxListeners](countinghashstream.md#static-defaultmaxlisteners) ### Methods +* [[Symbol.asyncIterator]](countinghashstream.md#[symbol.asynciterator]) +* [__transform](countinghashstream.md#__transform) * [_destroy](countinghashstream.md#_destroy) * [_final](countinghashstream.md#_final) +* [_flush](countinghashstream.md#_flush) * [_read](countinghashstream.md#_read) * [_transform](countinghashstream.md#_transform) * [_write](countinghashstream.md#_write) @@ -46,6 +51,7 @@ * [isPaused](countinghashstream.md#ispaused) * [listenerCount](countinghashstream.md#listenercount) * [listeners](countinghashstream.md#listeners) +* [off](countinghashstream.md#off) * [on](countinghashstream.md#on) * [once](countinghashstream.md#once) * [pause](countinghashstream.md#pause) @@ -53,6 +59,7 @@ * [prependListener](countinghashstream.md#prependlistener) * [prependOnceListener](countinghashstream.md#prependoncelistener) * [push](countinghashstream.md#push) +* [rawListeners](countinghashstream.md#rawlisteners) * [read](countinghashstream.md#read) * [removeAllListeners](countinghashstream.md#removealllisteners) * [removeListener](countinghashstream.md#removelistener) @@ -77,7 +84,7 @@ *Overrides [SourceTransform](../interfaces/sourcetransform.md).[constructor](../interfaces/sourcetransform.md#constructor)* -*Defined in [typings/xxhash/index.d.ts:12](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/typings/xxhash/index.d.ts#L12)* +*Defined in [typings/xxhash/index.d.ts:12](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/typings/xxhash/index.d.ts#L12)* **Parameters:** @@ -95,7 +102,7 @@ Name | Type | • **bytesWritten**: *number* = 0 -*Defined in [lib/source-destination/source-destination.ts:48](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L48)* +*Defined in [lib/source-destination/source-destination.ts:53](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L53)* ___ @@ -105,7 +112,7 @@ ___ *Inherited from [SparseFilterStream](sparsefilterstream.md).[readable](sparsefilterstream.md#readable)* -Defined in node_modules/@types/node/base.d.ts:5422 +Defined in node_modules/@types/node/stream.d.ts:20 ___ @@ -115,7 +122,17 @@ ___ *Inherited from [SparseFilterStream](sparsefilterstream.md).[readableHighWaterMark](sparsefilterstream.md#readablehighwatermark)* -Defined in node_modules/@types/node/base.d.ts:5423 +Defined in node_modules/@types/node/stream.d.ts:21 + +___ + +### readableLength + +• **readableLength**: *number* + +*Inherited from [SparseFilterStream](sparsefilterstream.md).[readableLength](sparsefilterstream.md#readablelength)* + +Defined in node_modules/@types/node/stream.d.ts:22 ___ @@ -125,7 +142,7 @@ ___ *Inherited from [SparseFilterStream](sparsefilterstream.md).[writable](sparsefilterstream.md#writable)* -Defined in node_modules/@types/node/base.d.ts:5600 +Defined in node_modules/@types/node/stream.d.ts:209 ___ @@ -135,7 +152,17 @@ ___ *Inherited from [SparseFilterStream](sparsefilterstream.md).[writableHighWaterMark](sparsefilterstream.md#writablehighwatermark)* -Defined in node_modules/@types/node/base.d.ts:5601 +Defined in node_modules/@types/node/stream.d.ts:210 + +___ + +### writableLength + +• **writableLength**: *number* + +*Inherited from [SparseFilterStream](sparsefilterstream.md).[writableLength](sparsefilterstream.md#writablelength)* + +Defined in node_modules/@types/node/stream.d.ts:211 ___ @@ -145,10 +172,39 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[defaultMaxListeners](countingwritable.md#static-defaultmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:896 +Defined in node_modules/@types/node/events.d.ts:18 ## Methods +### [Symbol.asyncIterator] + +▸ **[Symbol.asyncIterator]**(): *AsyncIterableIterator‹any›* + +*Inherited from [SparseFilterStream](sparsefilterstream.md).[[Symbol.asyncIterator]](sparsefilterstream.md#[symbol.asynciterator])* + +Defined in node_modules/@types/node/stream.d.ts:95 + +**Returns:** *AsyncIterableIterator‹any›* + +___ + +### __transform + +▸ **__transform**(`chunk`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | [AlignedLockableBuffer](../interfaces/alignedlockablebuffer.md), `encoding`: string): *Promise‹void›* + +*Defined in [lib/source-destination/source-destination.ts:55](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L55)* + +**Parameters:** + +Name | Type | +------ | ------ | +`chunk` | [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | [AlignedLockableBuffer](../interfaces/alignedlockablebuffer.md) | +`encoding` | string | + +**Returns:** *Promise‹void›* + +___ + ### _destroy ▸ **_destroy**(`error`: [Error](notcapable.md#static-error) | null, `callback`: function): *void* @@ -157,7 +213,7 @@ Defined in node_modules/@types/node/base.d.ts:896 *Overrides [SparseReadStream](sparsereadstream.md).[_destroy](sparsereadstream.md#_destroy)* -Defined in node_modules/@types/node/base.d.ts:5605 +Defined in node_modules/@types/node/stream.d.ts:215 **Parameters:** @@ -165,13 +221,13 @@ Defined in node_modules/@types/node/base.d.ts:5605 ▪ **callback**: *function* -▸ (`error?`: [Error](notcapable.md#static-error)): *void* +▸ (`error`: [Error](notcapable.md#static-error) | null): *void* **Parameters:** Name | Type | ------ | ------ | -`error?` | [Error](notcapable.md#static-error) | +`error` | [Error](notcapable.md#static-error) | null | **Returns:** *void* @@ -179,17 +235,41 @@ ___ ### _final -▸ **_final**(`callback`: Function): *void* +▸ **_final**(`callback`: function): *void* *Inherited from [SparseFilterStream](sparsefilterstream.md).[_final](sparsefilterstream.md#_final)* -Defined in node_modules/@types/node/base.d.ts:5606 +Defined in node_modules/@types/node/stream.d.ts:216 + +**Parameters:** + +▪ **callback**: *function* + +▸ (`error?`: [Error](notcapable.md#static-error) | null): *void* **Parameters:** Name | Type | ------ | ------ | -`callback` | Function | +`error?` | [Error](notcapable.md#static-error) | null | + +**Returns:** *void* + +___ + +### _flush + +▸ **_flush**(`callback`: TransformCallback): *void* + +*Inherited from [SparseFilterStream](sparsefilterstream.md).[_flush](sparsefilterstream.md#_flush)* + +Defined in node_modules/@types/node/stream.d.ts:242 + +**Parameters:** + +Name | Type | +------ | ------ | +`callback` | TransformCallback | **Returns:** *void* @@ -201,7 +281,7 @@ ___ *Inherited from [SparseFilterStream](sparsefilterstream.md).[_read](sparsefilterstream.md#_read)* -Defined in node_modules/@types/node/base.d.ts:5425 +Defined in node_modules/@types/node/stream.d.ts:24 **Parameters:** @@ -215,21 +295,27 @@ ___ ### _transform -▸ **_transform**(`chunk`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer), `encoding`: string, `callback`: function): *void* +▸ **_transform**(`chunk`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | [AlignedLockableBuffer](../interfaces/alignedlockablebuffer.md), `encoding`: string, `callback`: function): *void* *Overrides [SourceTransform](../interfaces/sourcetransform.md).[_transform](../interfaces/sourcetransform.md#_transform)* -*Defined in [lib/source-destination/source-destination.ts:50](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L50)* +*Defined in [lib/source-destination/source-destination.ts:72](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L72)* **Parameters:** -▪ **chunk**: *[Buffer](../interfaces/alignedlockablebuffer.md#buffer)* +▪ **chunk**: *[Buffer](../interfaces/alignedlockablebuffer.md#buffer) | [AlignedLockableBuffer](../interfaces/alignedlockablebuffer.md)* ▪ **encoding**: *string* ▪ **callback**: *function* -▸ (): *void* +▸ (`error?`: [Error](notcapable.md#static-error)): *void* + +**Parameters:** + +Name | Type | +------ | ------ | +`error?` | [Error](notcapable.md#static-error) | **Returns:** *void* @@ -241,7 +327,7 @@ ___ *Inherited from [SparseFilterStream](sparsefilterstream.md).[_write](sparsefilterstream.md#_write)* -Defined in node_modules/@types/node/base.d.ts:5603 +Defined in node_modules/@types/node/stream.d.ts:213 **Parameters:** @@ -251,13 +337,13 @@ Defined in node_modules/@types/node/base.d.ts:5603 ▪ **callback**: *function* -▸ (`err?`: [Error](notcapable.md#static-error)): *void* +▸ (`error?`: [Error](notcapable.md#static-error) | null): *void* **Parameters:** Name | Type | ------ | ------ | -`err?` | [Error](notcapable.md#static-error) | +`error?` | [Error](notcapable.md#static-error) | null | **Returns:** *void* @@ -269,7 +355,7 @@ ___ *Inherited from [SparseFilterStream](sparsefilterstream.md).[_writev](sparsefilterstream.md#optional-_writev)* -Defined in node_modules/@types/node/base.d.ts:5604 +Defined in node_modules/@types/node/stream.d.ts:214 **Parameters:** @@ -277,13 +363,13 @@ Defined in node_modules/@types/node/base.d.ts:5604 ▪ **callback**: *function* -▸ (`err?`: [Error](notcapable.md#static-error)): *void* +▸ (`error?`: [Error](notcapable.md#static-error) | null): *void* **Parameters:** Name | Type | ------ | ------ | -`err?` | [Error](notcapable.md#static-error) | +`error?` | [Error](notcapable.md#static-error) | null | **Returns:** *void* @@ -291,13 +377,13 @@ ___ ### addListener -▸ **addListener**(`event`: string, `listener`: function): *this* +▸ **addListener**(`event`: "close", `listener`: function): *this* *Inherited from [SparseFilterStream](sparsefilterstream.md).[addListener](sparsefilterstream.md#addlistener)* *Overrides [SourceSource](sourcesource.md).[addListener](sourcesource.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:5447 +Defined in node_modules/@types/node/stream.d.ts:46 Event emitter The defined events on documents including: @@ -309,30 +395,6 @@ The defined events on documents including: **Parameters:** -▪ **event**: *string* - -▪ **listener**: *function* - -▸ (...`args`: any[]): *void* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | any[] | - -**Returns:** *this* - -▸ **addListener**(`event`: "close", `listener`: function): *this* - -*Inherited from [SparseFilterStream](sparsefilterstream.md).[addListener](sparsefilterstream.md#addlistener)* - -*Overrides [SourceSource](sourcesource.md).[addListener](sourcesource.md#addlistener)* - -Defined in node_modules/@types/node/base.d.ts:5448 - -**Parameters:** - ▪ **event**: *"close"* ▪ **listener**: *function* @@ -347,7 +409,7 @@ Defined in node_modules/@types/node/base.d.ts:5448 *Overrides [SourceSource](sourcesource.md).[addListener](sourcesource.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:5449 +Defined in node_modules/@types/node/stream.d.ts:47 **Parameters:** @@ -355,13 +417,13 @@ Defined in node_modules/@types/node/base.d.ts:5449 ▪ **listener**: *function* -▸ (`chunk`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string): *void* +▸ (`chunk`: any): *void* **Parameters:** Name | Type | ------ | ------ | -`chunk` | [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string | +`chunk` | any | **Returns:** *this* @@ -371,7 +433,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[addListener](sourcesource.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:5450 +Defined in node_modules/@types/node/stream.d.ts:48 **Parameters:** @@ -389,7 +451,7 @@ Defined in node_modules/@types/node/base.d.ts:5450 *Overrides [SourceSource](sourcesource.md).[addListener](sourcesource.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:5451 +Defined in node_modules/@types/node/stream.d.ts:49 **Parameters:** @@ -407,7 +469,7 @@ Defined in node_modules/@types/node/base.d.ts:5451 *Overrides [SourceSource](sourcesource.md).[addListener](sourcesource.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:5452 +Defined in node_modules/@types/node/stream.d.ts:50 **Parameters:** @@ -425,6 +487,30 @@ Name | Type | **Returns:** *this* +▸ **addListener**(`event`: string | symbol, `listener`: function): *this* + +*Inherited from [SparseFilterStream](sparsefilterstream.md).[addListener](sparsefilterstream.md#addlistener)* + +*Overrides [SourceSource](sourcesource.md).[addListener](sourcesource.md#addlistener)* + +Defined in node_modules/@types/node/stream.d.ts:51 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* + +**Parameters:** + +Name | Type | +------ | ------ | +`...args` | any[] | + +**Returns:** *this* + ___ ### cork @@ -433,7 +519,7 @@ ___ *Inherited from [SparseFilterStream](sparsefilterstream.md).[cork](sparsefilterstream.md#cork)* -Defined in node_modules/@types/node/base.d.ts:5613 +Defined in node_modules/@types/node/stream.d.ts:223 **Returns:** *void* @@ -445,9 +531,7 @@ ___ *Inherited from [SparseFilterStream](sparsefilterstream.md).[destroy](sparsefilterstream.md#destroy)* -*Overrides [SparseReadStream](sparsereadstream.md).[destroy](sparsereadstream.md#destroy)* - -Defined in node_modules/@types/node/base.d.ts:5625 +Defined in node_modules/@types/node/stream.d.ts:35 **Parameters:** @@ -461,102 +545,102 @@ ___ ### emit -▸ **emit**(`event`: string | symbol, ...`args`: any[]): *boolean* +▸ **emit**(`event`: "close"): *boolean* *Inherited from [SparseFilterStream](sparsefilterstream.md).[emit](sparsefilterstream.md#emit)* *Overrides [SourceSource](sourcesource.md).[emit](sourcesource.md#emit)* -Defined in node_modules/@types/node/base.d.ts:5454 +Defined in node_modules/@types/node/stream.d.ts:53 **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`...args` | any[] | +`event` | "close" | **Returns:** *boolean* -▸ **emit**(`event`: "close"): *boolean* +▸ **emit**(`event`: "data", `chunk`: any): *boolean* *Inherited from [SparseFilterStream](sparsefilterstream.md).[emit](sparsefilterstream.md#emit)* *Overrides [SourceSource](sourcesource.md).[emit](sourcesource.md#emit)* -Defined in node_modules/@types/node/base.d.ts:5455 +Defined in node_modules/@types/node/stream.d.ts:54 **Parameters:** Name | Type | ------ | ------ | -`event` | "close" | +`event` | "data" | +`chunk` | any | **Returns:** *boolean* -▸ **emit**(`event`: "data", `chunk`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string): *boolean* +▸ **emit**(`event`: "end"): *boolean* *Inherited from [SparseFilterStream](sparsefilterstream.md).[emit](sparsefilterstream.md#emit)* *Overrides [SourceSource](sourcesource.md).[emit](sourcesource.md#emit)* -Defined in node_modules/@types/node/base.d.ts:5456 +Defined in node_modules/@types/node/stream.d.ts:55 **Parameters:** Name | Type | ------ | ------ | -`event` | "data" | -`chunk` | [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string | +`event` | "end" | **Returns:** *boolean* -▸ **emit**(`event`: "end"): *boolean* +▸ **emit**(`event`: "readable"): *boolean* *Inherited from [SparseFilterStream](sparsefilterstream.md).[emit](sparsefilterstream.md#emit)* *Overrides [SourceSource](sourcesource.md).[emit](sourcesource.md#emit)* -Defined in node_modules/@types/node/base.d.ts:5457 +Defined in node_modules/@types/node/stream.d.ts:56 **Parameters:** Name | Type | ------ | ------ | -`event` | "end" | +`event` | "readable" | **Returns:** *boolean* -▸ **emit**(`event`: "readable"): *boolean* +▸ **emit**(`event`: "error", `err`: [Error](notcapable.md#static-error)): *boolean* *Inherited from [SparseFilterStream](sparsefilterstream.md).[emit](sparsefilterstream.md#emit)* *Overrides [SourceSource](sourcesource.md).[emit](sourcesource.md#emit)* -Defined in node_modules/@types/node/base.d.ts:5458 +Defined in node_modules/@types/node/stream.d.ts:57 **Parameters:** Name | Type | ------ | ------ | -`event` | "readable" | +`event` | "error" | +`err` | [Error](notcapable.md#static-error) | **Returns:** *boolean* -▸ **emit**(`event`: "error", `err`: [Error](notcapable.md#static-error)): *boolean* +▸ **emit**(`event`: string | symbol, ...`args`: any[]): *boolean* *Inherited from [SparseFilterStream](sparsefilterstream.md).[emit](sparsefilterstream.md#emit)* *Overrides [SourceSource](sourcesource.md).[emit](sourcesource.md#emit)* -Defined in node_modules/@types/node/base.d.ts:5459 +Defined in node_modules/@types/node/stream.d.ts:58 **Parameters:** Name | Type | ------ | ------ | -`event` | "error" | -`err` | [Error](notcapable.md#static-error) | +`event` | string | symbol | +`...args` | any[] | **Returns:** *boolean* @@ -564,40 +648,40 @@ ___ ### end -▸ **end**(`cb?`: Function): *void* +▸ **end**(`cb?`: undefined | function): *void* *Inherited from [SparseFilterStream](sparsefilterstream.md).[end](sparsefilterstream.md#end)* -Defined in node_modules/@types/node/base.d.ts:5610 +Defined in node_modules/@types/node/stream.d.ts:220 **Parameters:** Name | Type | ------ | ------ | -`cb?` | Function | +`cb?` | undefined | function | **Returns:** *void* -▸ **end**(`chunk`: any, `cb?`: Function): *void* +▸ **end**(`chunk`: any, `cb?`: undefined | function): *void* *Inherited from [SparseFilterStream](sparsefilterstream.md).[end](sparsefilterstream.md#end)* -Defined in node_modules/@types/node/base.d.ts:5611 +Defined in node_modules/@types/node/stream.d.ts:221 **Parameters:** Name | Type | ------ | ------ | `chunk` | any | -`cb?` | Function | +`cb?` | undefined | function | **Returns:** *void* -▸ **end**(`chunk`: any, `encoding?`: undefined | string, `cb?`: Function): *void* +▸ **end**(`chunk`: any, `encoding?`: undefined | string, `cb?`: undefined | function): *void* *Inherited from [SparseFilterStream](sparsefilterstream.md).[end](sparsefilterstream.md#end)* -Defined in node_modules/@types/node/base.d.ts:5612 +Defined in node_modules/@types/node/stream.d.ts:222 **Parameters:** @@ -605,7 +689,7 @@ Name | Type | ------ | ------ | `chunk` | any | `encoding?` | undefined | string | -`cb?` | Function | +`cb?` | undefined | function | **Returns:** *void* @@ -617,7 +701,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[eventNames](countingwritable.md#eventnames)* -Defined in node_modules/@types/node/base.d.ts:909 +Defined in node_modules/@types/node/events.d.ts:33 **Returns:** *Array‹string | symbol›* @@ -629,7 +713,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[getMaxListeners](countingwritable.md#getmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:906 +Defined in node_modules/@types/node/events.d.ts:29 **Returns:** *number* @@ -641,7 +725,7 @@ ___ *Inherited from [SparseFilterStream](sparsefilterstream.md).[isPaused](sparsefilterstream.md#ispaused)* -Defined in node_modules/@types/node/base.d.ts:5430 +Defined in node_modules/@types/node/stream.d.ts:29 **Returns:** *boolean* @@ -653,7 +737,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[listenerCount](countingwritable.md#static-listenercount)* -Defined in node_modules/@types/node/base.d.ts:910 +Defined in node_modules/@types/node/events.d.ts:34 **Parameters:** @@ -671,7 +755,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[listeners](countingwritable.md#listeners)* -Defined in node_modules/@types/node/base.d.ts:907 +Defined in node_modules/@types/node/events.d.ts:30 **Parameters:** @@ -683,19 +767,17 @@ Name | Type | ___ -### on +### off -▸ **on**(`event`: string, `listener`: function): *this* +▸ **off**(`event`: string | symbol, `listener`: function): *this* -*Inherited from [SparseFilterStream](sparsefilterstream.md).[on](sparsefilterstream.md#on)* +*Inherited from [CountingWritable](countingwritable.md).[off](countingwritable.md#off)* -*Overrides [SourceSource](sourcesource.md).[on](sourcesource.md#on)* - -Defined in node_modules/@types/node/base.d.ts:5461 +Defined in node_modules/@types/node/events.d.ts:26 **Parameters:** -▪ **event**: *string* +▪ **event**: *string | symbol* ▪ **listener**: *function* @@ -709,13 +791,17 @@ Name | Type | **Returns:** *this* +___ + +### on + ▸ **on**(`event`: "close", `listener`: function): *this* *Inherited from [SparseFilterStream](sparsefilterstream.md).[on](sparsefilterstream.md#on)* *Overrides [SourceSource](sourcesource.md).[on](sourcesource.md#on)* -Defined in node_modules/@types/node/base.d.ts:5462 +Defined in node_modules/@types/node/stream.d.ts:60 **Parameters:** @@ -733,7 +819,7 @@ Defined in node_modules/@types/node/base.d.ts:5462 *Overrides [SourceSource](sourcesource.md).[on](sourcesource.md#on)* -Defined in node_modules/@types/node/base.d.ts:5463 +Defined in node_modules/@types/node/stream.d.ts:61 **Parameters:** @@ -741,13 +827,13 @@ Defined in node_modules/@types/node/base.d.ts:5463 ▪ **listener**: *function* -▸ (`chunk`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string): *void* +▸ (`chunk`: any): *void* **Parameters:** Name | Type | ------ | ------ | -`chunk` | [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string | +`chunk` | any | **Returns:** *this* @@ -757,7 +843,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[on](sourcesource.md#on)* -Defined in node_modules/@types/node/base.d.ts:5464 +Defined in node_modules/@types/node/stream.d.ts:62 **Parameters:** @@ -775,7 +861,7 @@ Defined in node_modules/@types/node/base.d.ts:5464 *Overrides [SourceSource](sourcesource.md).[on](sourcesource.md#on)* -Defined in node_modules/@types/node/base.d.ts:5465 +Defined in node_modules/@types/node/stream.d.ts:63 **Parameters:** @@ -793,7 +879,7 @@ Defined in node_modules/@types/node/base.d.ts:5465 *Overrides [SourceSource](sourcesource.md).[on](sourcesource.md#on)* -Defined in node_modules/@types/node/base.d.ts:5466 +Defined in node_modules/@types/node/stream.d.ts:64 **Parameters:** @@ -811,21 +897,17 @@ Name | Type | **Returns:** *this* -___ +▸ **on**(`event`: string | symbol, `listener`: function): *this* -### once - -▸ **once**(`event`: string, `listener`: function): *this* - -*Inherited from [SparseFilterStream](sparsefilterstream.md).[once](sparsefilterstream.md#once)* +*Inherited from [SparseFilterStream](sparsefilterstream.md).[on](sparsefilterstream.md#on)* -*Overrides [SourceSource](sourcesource.md).[once](sourcesource.md#once)* +*Overrides [SourceSource](sourcesource.md).[on](sourcesource.md#on)* -Defined in node_modules/@types/node/base.d.ts:5468 +Defined in node_modules/@types/node/stream.d.ts:65 **Parameters:** -▪ **event**: *string* +▪ **event**: *string | symbol* ▪ **listener**: *function* @@ -839,13 +921,17 @@ Name | Type | **Returns:** *this* +___ + +### once + ▸ **once**(`event`: "close", `listener`: function): *this* *Inherited from [SparseFilterStream](sparsefilterstream.md).[once](sparsefilterstream.md#once)* *Overrides [SourceSource](sourcesource.md).[once](sourcesource.md#once)* -Defined in node_modules/@types/node/base.d.ts:5469 +Defined in node_modules/@types/node/stream.d.ts:67 **Parameters:** @@ -863,7 +949,7 @@ Defined in node_modules/@types/node/base.d.ts:5469 *Overrides [SourceSource](sourcesource.md).[once](sourcesource.md#once)* -Defined in node_modules/@types/node/base.d.ts:5470 +Defined in node_modules/@types/node/stream.d.ts:68 **Parameters:** @@ -871,13 +957,13 @@ Defined in node_modules/@types/node/base.d.ts:5470 ▪ **listener**: *function* -▸ (`chunk`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string): *void* +▸ (`chunk`: any): *void* **Parameters:** Name | Type | ------ | ------ | -`chunk` | [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string | +`chunk` | any | **Returns:** *this* @@ -887,7 +973,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[once](sourcesource.md#once)* -Defined in node_modules/@types/node/base.d.ts:5471 +Defined in node_modules/@types/node/stream.d.ts:69 **Parameters:** @@ -905,7 +991,7 @@ Defined in node_modules/@types/node/base.d.ts:5471 *Overrides [SourceSource](sourcesource.md).[once](sourcesource.md#once)* -Defined in node_modules/@types/node/base.d.ts:5472 +Defined in node_modules/@types/node/stream.d.ts:70 **Parameters:** @@ -923,7 +1009,7 @@ Defined in node_modules/@types/node/base.d.ts:5472 *Overrides [SourceSource](sourcesource.md).[once](sourcesource.md#once)* -Defined in node_modules/@types/node/base.d.ts:5473 +Defined in node_modules/@types/node/stream.d.ts:71 **Parameters:** @@ -941,6 +1027,30 @@ Name | Type | **Returns:** *this* +▸ **once**(`event`: string | symbol, `listener`: function): *this* + +*Inherited from [SparseFilterStream](sparsefilterstream.md).[once](sparsefilterstream.md#once)* + +*Overrides [SourceSource](sourcesource.md).[once](sourcesource.md#once)* + +Defined in node_modules/@types/node/stream.d.ts:72 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* + +**Parameters:** + +Name | Type | +------ | ------ | +`...args` | any[] | + +**Returns:** *this* + ___ ### pause @@ -949,7 +1059,7 @@ ___ *Inherited from [SparseFilterStream](sparsefilterstream.md).[pause](sparsefilterstream.md#pause)* -Defined in node_modules/@types/node/base.d.ts:5428 +Defined in node_modules/@types/node/stream.d.ts:27 **Returns:** *this* @@ -961,7 +1071,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[pipe](countingwritable.md#pipe)* -Defined in node_modules/@types/node/base.d.ts:5407 +Defined in node_modules/@types/node/stream.d.ts:5 **Type parameters:** @@ -980,37 +1090,13 @@ ___ ### prependListener -▸ **prependListener**(`event`: string, `listener`: function): *this* - -*Inherited from [SparseFilterStream](sparsefilterstream.md).[prependListener](sparsefilterstream.md#prependlistener)* - -*Overrides [SourceSource](sourcesource.md).[prependListener](sourcesource.md#prependlistener)* - -Defined in node_modules/@types/node/base.d.ts:5475 - -**Parameters:** - -▪ **event**: *string* - -▪ **listener**: *function* - -▸ (...`args`: any[]): *void* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | any[] | - -**Returns:** *this* - ▸ **prependListener**(`event`: "close", `listener`: function): *this* *Inherited from [SparseFilterStream](sparsefilterstream.md).[prependListener](sparsefilterstream.md#prependlistener)* *Overrides [SourceSource](sourcesource.md).[prependListener](sourcesource.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:5476 +Defined in node_modules/@types/node/stream.d.ts:74 **Parameters:** @@ -1028,7 +1114,7 @@ Defined in node_modules/@types/node/base.d.ts:5476 *Overrides [SourceSource](sourcesource.md).[prependListener](sourcesource.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:5477 +Defined in node_modules/@types/node/stream.d.ts:75 **Parameters:** @@ -1036,13 +1122,13 @@ Defined in node_modules/@types/node/base.d.ts:5477 ▪ **listener**: *function* -▸ (`chunk`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string): *void* +▸ (`chunk`: any): *void* **Parameters:** Name | Type | ------ | ------ | -`chunk` | [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string | +`chunk` | any | **Returns:** *this* @@ -1052,7 +1138,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[prependListener](sourcesource.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:5478 +Defined in node_modules/@types/node/stream.d.ts:76 **Parameters:** @@ -1070,7 +1156,7 @@ Defined in node_modules/@types/node/base.d.ts:5478 *Overrides [SourceSource](sourcesource.md).[prependListener](sourcesource.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:5479 +Defined in node_modules/@types/node/stream.d.ts:77 **Parameters:** @@ -1088,7 +1174,7 @@ Defined in node_modules/@types/node/base.d.ts:5479 *Overrides [SourceSource](sourcesource.md).[prependListener](sourcesource.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:5480 +Defined in node_modules/@types/node/stream.d.ts:78 **Parameters:** @@ -1106,21 +1192,17 @@ Name | Type | **Returns:** *this* -___ +▸ **prependListener**(`event`: string | symbol, `listener`: function): *this* -### prependOnceListener - -▸ **prependOnceListener**(`event`: string, `listener`: function): *this* - -*Inherited from [SparseFilterStream](sparsefilterstream.md).[prependOnceListener](sparsefilterstream.md#prependoncelistener)* +*Inherited from [SparseFilterStream](sparsefilterstream.md).[prependListener](sparsefilterstream.md#prependlistener)* -*Overrides [SourceSource](sourcesource.md).[prependOnceListener](sourcesource.md#prependoncelistener)* +*Overrides [SourceSource](sourcesource.md).[prependListener](sourcesource.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:5482 +Defined in node_modules/@types/node/stream.d.ts:79 **Parameters:** -▪ **event**: *string* +▪ **event**: *string | symbol* ▪ **listener**: *function* @@ -1134,13 +1216,17 @@ Name | Type | **Returns:** *this* +___ + +### prependOnceListener + ▸ **prependOnceListener**(`event`: "close", `listener`: function): *this* *Inherited from [SparseFilterStream](sparsefilterstream.md).[prependOnceListener](sparsefilterstream.md#prependoncelistener)* *Overrides [SourceSource](sourcesource.md).[prependOnceListener](sourcesource.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:5483 +Defined in node_modules/@types/node/stream.d.ts:81 **Parameters:** @@ -1158,7 +1244,7 @@ Defined in node_modules/@types/node/base.d.ts:5483 *Overrides [SourceSource](sourcesource.md).[prependOnceListener](sourcesource.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:5484 +Defined in node_modules/@types/node/stream.d.ts:82 **Parameters:** @@ -1166,13 +1252,13 @@ Defined in node_modules/@types/node/base.d.ts:5484 ▪ **listener**: *function* -▸ (`chunk`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string): *void* +▸ (`chunk`: any): *void* **Parameters:** Name | Type | ------ | ------ | -`chunk` | [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string | +`chunk` | any | **Returns:** *this* @@ -1182,7 +1268,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[prependOnceListener](sourcesource.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:5485 +Defined in node_modules/@types/node/stream.d.ts:83 **Parameters:** @@ -1200,7 +1286,7 @@ Defined in node_modules/@types/node/base.d.ts:5485 *Overrides [SourceSource](sourcesource.md).[prependOnceListener](sourcesource.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:5486 +Defined in node_modules/@types/node/stream.d.ts:84 **Parameters:** @@ -1218,7 +1304,7 @@ Defined in node_modules/@types/node/base.d.ts:5486 *Overrides [SourceSource](sourcesource.md).[prependOnceListener](sourcesource.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:5487 +Defined in node_modules/@types/node/stream.d.ts:85 **Parameters:** @@ -1236,6 +1322,30 @@ Name | Type | **Returns:** *this* +▸ **prependOnceListener**(`event`: string | symbol, `listener`: function): *this* + +*Inherited from [SparseFilterStream](sparsefilterstream.md).[prependOnceListener](sparsefilterstream.md#prependoncelistener)* + +*Overrides [SourceSource](sourcesource.md).[prependOnceListener](sourcesource.md#prependoncelistener)* + +Defined in node_modules/@types/node/stream.d.ts:86 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* + +**Parameters:** + +Name | Type | +------ | ------ | +`...args` | any[] | + +**Returns:** *this* + ___ ### push @@ -1244,7 +1354,7 @@ ___ *Inherited from [SparseFilterStream](sparsefilterstream.md).[push](sparsefilterstream.md#push)* -Defined in node_modules/@types/node/base.d.ts:5434 +Defined in node_modules/@types/node/stream.d.ts:33 **Parameters:** @@ -1257,13 +1367,31 @@ Name | Type | ___ +### rawListeners + +▸ **rawListeners**(`event`: string | symbol): *Function[]* + +*Inherited from [CountingWritable](countingwritable.md).[rawListeners](countingwritable.md#rawlisteners)* + +Defined in node_modules/@types/node/events.d.ts:31 + +**Parameters:** + +Name | Type | +------ | ------ | +`event` | string | symbol | + +**Returns:** *Function[]* + +___ + ### read ▸ **read**(`size?`: undefined | number): *any* *Inherited from [SparseFilterStream](sparsefilterstream.md).[read](sparsefilterstream.md#read)* -Defined in node_modules/@types/node/base.d.ts:5426 +Defined in node_modules/@types/node/stream.d.ts:25 **Parameters:** @@ -1281,7 +1409,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[removeAllListeners](countingwritable.md#removealllisteners)* -Defined in node_modules/@types/node/base.d.ts:904 +Defined in node_modules/@types/node/events.d.ts:27 **Parameters:** @@ -1295,37 +1423,13 @@ ___ ### removeListener -▸ **removeListener**(`event`: string, `listener`: function): *this* - -*Inherited from [SparseFilterStream](sparsefilterstream.md).[removeListener](sparsefilterstream.md#removelistener)* - -*Overrides [SourceSource](sourcesource.md).[removeListener](sourcesource.md#removelistener)* - -Defined in node_modules/@types/node/base.d.ts:5489 - -**Parameters:** - -▪ **event**: *string* - -▪ **listener**: *function* - -▸ (...`args`: any[]): *void* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | any[] | - -**Returns:** *this* - ▸ **removeListener**(`event`: "close", `listener`: function): *this* *Inherited from [SparseFilterStream](sparsefilterstream.md).[removeListener](sparsefilterstream.md#removelistener)* *Overrides [SourceSource](sourcesource.md).[removeListener](sourcesource.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:5490 +Defined in node_modules/@types/node/stream.d.ts:88 **Parameters:** @@ -1343,7 +1447,7 @@ Defined in node_modules/@types/node/base.d.ts:5490 *Overrides [SourceSource](sourcesource.md).[removeListener](sourcesource.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:5491 +Defined in node_modules/@types/node/stream.d.ts:89 **Parameters:** @@ -1351,13 +1455,13 @@ Defined in node_modules/@types/node/base.d.ts:5491 ▪ **listener**: *function* -▸ (`chunk`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string): *void* +▸ (`chunk`: any): *void* **Parameters:** Name | Type | ------ | ------ | -`chunk` | [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string | +`chunk` | any | **Returns:** *this* @@ -1367,7 +1471,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[removeListener](sourcesource.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:5492 +Defined in node_modules/@types/node/stream.d.ts:90 **Parameters:** @@ -1385,7 +1489,7 @@ Defined in node_modules/@types/node/base.d.ts:5492 *Overrides [SourceSource](sourcesource.md).[removeListener](sourcesource.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:5493 +Defined in node_modules/@types/node/stream.d.ts:91 **Parameters:** @@ -1403,7 +1507,7 @@ Defined in node_modules/@types/node/base.d.ts:5493 *Overrides [SourceSource](sourcesource.md).[removeListener](sourcesource.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:5494 +Defined in node_modules/@types/node/stream.d.ts:92 **Parameters:** @@ -1421,6 +1525,30 @@ Name | Type | **Returns:** *this* +▸ **removeListener**(`event`: string | symbol, `listener`: function): *this* + +*Inherited from [SparseFilterStream](sparsefilterstream.md).[removeListener](sparsefilterstream.md#removelistener)* + +*Overrides [SourceSource](sourcesource.md).[removeListener](sourcesource.md#removelistener)* + +Defined in node_modules/@types/node/stream.d.ts:93 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* + +**Parameters:** + +Name | Type | +------ | ------ | +`...args` | any[] | + +**Returns:** *this* + ___ ### resume @@ -1429,7 +1557,7 @@ ___ *Inherited from [SparseFilterStream](sparsefilterstream.md).[resume](sparsefilterstream.md#resume)* -Defined in node_modules/@types/node/base.d.ts:5429 +Defined in node_modules/@types/node/stream.d.ts:28 **Returns:** *this* @@ -1441,7 +1569,7 @@ ___ *Inherited from [SparseFilterStream](sparsefilterstream.md).[setDefaultEncoding](sparsefilterstream.md#setdefaultencoding)* -Defined in node_modules/@types/node/base.d.ts:5609 +Defined in node_modules/@types/node/stream.d.ts:219 **Parameters:** @@ -1459,7 +1587,7 @@ ___ *Inherited from [SparseFilterStream](sparsefilterstream.md).[setEncoding](sparsefilterstream.md#setencoding)* -Defined in node_modules/@types/node/base.d.ts:5427 +Defined in node_modules/@types/node/stream.d.ts:26 **Parameters:** @@ -1477,7 +1605,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[setMaxListeners](countingwritable.md#setmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:905 +Defined in node_modules/@types/node/events.d.ts:28 **Parameters:** @@ -1495,7 +1623,7 @@ ___ *Inherited from [SparseFilterStream](sparsefilterstream.md).[uncork](sparsefilterstream.md#uncork)* -Defined in node_modules/@types/node/base.d.ts:5614 +Defined in node_modules/@types/node/stream.d.ts:224 **Returns:** *void* @@ -1503,21 +1631,17 @@ ___ ### unpipe -▸ **unpipe**<**T**>(`destination?`: T): *this* +▸ **unpipe**(`destination?`: NodeJS.WritableStream): *this* *Inherited from [SparseFilterStream](sparsefilterstream.md).[unpipe](sparsefilterstream.md#unpipe)* -Defined in node_modules/@types/node/base.d.ts:5431 - -**Type parameters:** - -▪ **T**: *WritableStream* +Defined in node_modules/@types/node/stream.d.ts:30 **Parameters:** Name | Type | ------ | ------ | -`destination?` | T | +`destination?` | NodeJS.WritableStream | **Returns:** *this* @@ -1529,7 +1653,7 @@ ___ *Inherited from [SparseFilterStream](sparsefilterstream.md).[unshift](sparsefilterstream.md#unshift)* -Defined in node_modules/@types/node/base.d.ts:5432 +Defined in node_modules/@types/node/stream.d.ts:31 **Parameters:** @@ -1547,7 +1671,7 @@ ___ *Inherited from [SparseFilterStream](sparsefilterstream.md).[wrap](sparsefilterstream.md#wrap)* -Defined in node_modules/@types/node/base.d.ts:5433 +Defined in node_modules/@types/node/stream.d.ts:32 **Parameters:** @@ -1561,26 +1685,26 @@ ___ ### write -▸ **write**(`chunk`: any, `cb?`: Function): *boolean* +▸ **write**(`chunk`: any, `cb?`: undefined | function): *boolean* *Inherited from [SparseFilterStream](sparsefilterstream.md).[write](sparsefilterstream.md#write)* -Defined in node_modules/@types/node/base.d.ts:5607 +Defined in node_modules/@types/node/stream.d.ts:217 **Parameters:** Name | Type | ------ | ------ | `chunk` | any | -`cb?` | Function | +`cb?` | undefined | function | **Returns:** *boolean* -▸ **write**(`chunk`: any, `encoding?`: undefined | string, `cb?`: Function): *boolean* +▸ **write**(`chunk`: any, `encoding?`: undefined | string, `cb?`: undefined | function): *boolean* *Inherited from [SparseFilterStream](sparsefilterstream.md).[write](sparsefilterstream.md#write)* -Defined in node_modules/@types/node/base.d.ts:5608 +Defined in node_modules/@types/node/stream.d.ts:218 **Parameters:** @@ -1588,7 +1712,7 @@ Name | Type | ------ | ------ | `chunk` | any | `encoding?` | undefined | string | -`cb?` | Function | +`cb?` | undefined | function | **Returns:** *boolean* @@ -1600,7 +1724,9 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[listenerCount](countingwritable.md#static-listenercount)* -Defined in node_modules/@types/node/base.d.ts:895 +Defined in node_modules/@types/node/events.d.ts:17 + +**`deprecated`** since v4.0.0 **Parameters:** diff --git a/doc/classes/countingwritable.md b/doc/classes/countingwritable.md index 0e59c20f..479e11f1 100644 --- a/doc/classes/countingwritable.md +++ b/doc/classes/countingwritable.md @@ -24,6 +24,7 @@ * [position](countingwritable.md#position) * [writable](countingwritable.md#writable) * [writableHighWaterMark](countingwritable.md#writablehighwatermark) +* [writableLength](countingwritable.md#writablelength) * [defaultMaxListeners](countingwritable.md#static-defaultmaxlisteners) ### Methods @@ -41,11 +42,13 @@ * [getMaxListeners](countingwritable.md#getmaxlisteners) * [listenerCount](countingwritable.md#listenercount) * [listeners](countingwritable.md#listeners) +* [off](countingwritable.md#off) * [on](countingwritable.md#on) * [once](countingwritable.md#once) * [pipe](countingwritable.md#pipe) * [prependListener](countingwritable.md#prependlistener) * [prependOnceListener](countingwritable.md#prependoncelistener) +* [rawListeners](countingwritable.md#rawlisteners) * [removeAllListeners](countingwritable.md#removealllisteners) * [removeListener](countingwritable.md#removelistener) * [setDefaultEncoding](countingwritable.md#setdefaultencoding) @@ -62,7 +65,7 @@ *Inherited from [CountingWritable](countingwritable.md).[constructor](countingwritable.md#constructor)* -Defined in node_modules/@types/node/base.d.ts:5509 +Defined in node_modules/@types/node/stream.d.ts:111 **Parameters:** @@ -78,7 +81,7 @@ Name | Type | • **bytesWritten**: *number* = 0 -*Defined in [lib/source-destination/progress.ts:92](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/progress.ts#L92)* +*Defined in [lib/source-destination/progress.ts:92](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/progress.ts#L92)* ___ @@ -86,7 +89,7 @@ ___ • **position**: *number | undefined* -*Defined in [lib/source-destination/progress.ts:93](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/progress.ts#L93)* +*Defined in [lib/source-destination/progress.ts:93](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/progress.ts#L93)* ___ @@ -96,7 +99,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[writable](countingwritable.md#writable)* -Defined in node_modules/@types/node/base.d.ts:5508 +Defined in node_modules/@types/node/stream.d.ts:109 ___ @@ -106,7 +109,17 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[writableHighWaterMark](countingwritable.md#writablehighwatermark)* -Defined in node_modules/@types/node/base.d.ts:5509 +Defined in node_modules/@types/node/stream.d.ts:110 + +___ + +### writableLength + +• **writableLength**: *number* + +*Inherited from [CountingWritable](countingwritable.md).[writableLength](countingwritable.md#writablelength)* + +Defined in node_modules/@types/node/stream.d.ts:111 ___ @@ -116,7 +129,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[defaultMaxListeners](countingwritable.md#static-defaultmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:896 +Defined in node_modules/@types/node/events.d.ts:18 ## Methods @@ -126,7 +139,7 @@ Defined in node_modules/@types/node/base.d.ts:896 *Inherited from [CountingWritable](countingwritable.md).[_destroy](countingwritable.md#_destroy)* -Defined in node_modules/@types/node/base.d.ts:5513 +Defined in node_modules/@types/node/stream.d.ts:115 **Parameters:** @@ -134,13 +147,13 @@ Defined in node_modules/@types/node/base.d.ts:5513 ▪ **callback**: *function* -▸ (`error?`: [Error](notcapable.md#static-error)): *void* +▸ (`error`: [Error](notcapable.md#static-error) | null): *void* **Parameters:** Name | Type | ------ | ------ | -`error?` | [Error](notcapable.md#static-error) | +`error` | [Error](notcapable.md#static-error) | null | **Returns:** *void* @@ -148,17 +161,23 @@ ___ ### _final -▸ **_final**(`callback`: Function): *void* +▸ **_final**(`callback`: function): *void* *Inherited from [CountingWritable](countingwritable.md).[_final](countingwritable.md#_final)* -Defined in node_modules/@types/node/base.d.ts:5514 +Defined in node_modules/@types/node/stream.d.ts:116 + +**Parameters:** + +▪ **callback**: *function* + +▸ (`error?`: [Error](notcapable.md#static-error) | null): *void* **Parameters:** Name | Type | ------ | ------ | -`callback` | Function | +`error?` | [Error](notcapable.md#static-error) | null | **Returns:** *void* @@ -170,7 +189,7 @@ ___ *Overrides void* -*Defined in [lib/source-destination/progress.ts:95](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/progress.ts#L95)* +*Defined in [lib/source-destination/progress.ts:95](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/progress.ts#L95)* **Parameters:** @@ -198,7 +217,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[_writev](countingwritable.md#optional-_writev)* -Defined in node_modules/@types/node/base.d.ts:5512 +Defined in node_modules/@types/node/stream.d.ts:114 **Parameters:** @@ -206,13 +225,13 @@ Defined in node_modules/@types/node/base.d.ts:5512 ▪ **callback**: *function* -▸ (`err?`: [Error](notcapable.md#static-error)): *void* +▸ (`error?`: [Error](notcapable.md#static-error) | null): *void* **Parameters:** Name | Type | ------ | ------ | -`err?` | [Error](notcapable.md#static-error) | +`error?` | [Error](notcapable.md#static-error) | null | **Returns:** *void* @@ -220,13 +239,13 @@ ___ ### addListener -▸ **addListener**(`event`: string, `listener`: function): *this* +▸ **addListener**(`event`: "close", `listener`: function): *this* *Inherited from [CountingWritable](countingwritable.md).[addListener](countingwritable.md#addlistener)* *Overrides [SourceSource](sourcesource.md).[addListener](sourcesource.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:5535 +Defined in node_modules/@types/node/stream.d.ts:137 Event emitter The defined events on documents including: @@ -239,30 +258,6 @@ The defined events on documents including: **Parameters:** -▪ **event**: *string* - -▪ **listener**: *function* - -▸ (...`args`: any[]): *void* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | any[] | - -**Returns:** *this* - -▸ **addListener**(`event`: "close", `listener`: function): *this* - -*Inherited from [CountingWritable](countingwritable.md).[addListener](countingwritable.md#addlistener)* - -*Overrides [SourceSource](sourcesource.md).[addListener](sourcesource.md#addlistener)* - -Defined in node_modules/@types/node/base.d.ts:5536 - -**Parameters:** - ▪ **event**: *"close"* ▪ **listener**: *function* @@ -277,7 +272,7 @@ Defined in node_modules/@types/node/base.d.ts:5536 *Overrides [SourceSource](sourcesource.md).[addListener](sourcesource.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:5537 +Defined in node_modules/@types/node/stream.d.ts:138 **Parameters:** @@ -295,7 +290,7 @@ Defined in node_modules/@types/node/base.d.ts:5537 *Overrides [SourceSource](sourcesource.md).[addListener](sourcesource.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:5538 +Defined in node_modules/@types/node/stream.d.ts:139 **Parameters:** @@ -319,7 +314,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[addListener](sourcesource.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:5539 +Defined in node_modules/@types/node/stream.d.ts:140 **Parameters:** @@ -337,7 +332,7 @@ Defined in node_modules/@types/node/base.d.ts:5539 *Overrides [SourceSource](sourcesource.md).[addListener](sourcesource.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:5540 +Defined in node_modules/@types/node/stream.d.ts:141 **Parameters:** @@ -361,7 +356,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[addListener](sourcesource.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:5541 +Defined in node_modules/@types/node/stream.d.ts:142 **Parameters:** @@ -379,6 +374,30 @@ Name | Type | **Returns:** *this* +▸ **addListener**(`event`: string | symbol, `listener`: function): *this* + +*Inherited from [CountingWritable](countingwritable.md).[addListener](countingwritable.md#addlistener)* + +*Overrides [SourceSource](sourcesource.md).[addListener](sourcesource.md#addlistener)* + +Defined in node_modules/@types/node/stream.d.ts:143 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* + +**Parameters:** + +Name | Type | +------ | ------ | +`...args` | any[] | + +**Returns:** *this* + ___ ### cork @@ -387,7 +406,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[cork](countingwritable.md#cork)* -Defined in node_modules/@types/node/base.d.ts:5521 +Defined in node_modules/@types/node/stream.d.ts:123 **Returns:** *void* @@ -399,7 +418,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[destroy](countingwritable.md#destroy)* -Defined in node_modules/@types/node/base.d.ts:5523 +Defined in node_modules/@types/node/stream.d.ts:125 **Parameters:** @@ -413,30 +432,13 @@ ___ ### emit -▸ **emit**(`event`: string | symbol, ...`args`: any[]): *boolean* - -*Inherited from [CountingWritable](countingwritable.md).[emit](countingwritable.md#emit)* - -*Overrides [SourceSource](sourcesource.md).[emit](sourcesource.md#emit)* - -Defined in node_modules/@types/node/base.d.ts:5543 - -**Parameters:** - -Name | Type | ------- | ------ | -`event` | string | symbol | -`...args` | any[] | - -**Returns:** *boolean* - ▸ **emit**(`event`: "close"): *boolean* *Inherited from [CountingWritable](countingwritable.md).[emit](countingwritable.md#emit)* *Overrides [SourceSource](sourcesource.md).[emit](sourcesource.md#emit)* -Defined in node_modules/@types/node/base.d.ts:5544 +Defined in node_modules/@types/node/stream.d.ts:145 **Parameters:** @@ -446,20 +448,19 @@ Name | Type | **Returns:** *boolean* -▸ **emit**(`event`: "drain", `chunk`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string): *boolean* +▸ **emit**(`event`: "drain"): *boolean* *Inherited from [CountingWritable](countingwritable.md).[emit](countingwritable.md#emit)* *Overrides [SourceSource](sourcesource.md).[emit](sourcesource.md#emit)* -Defined in node_modules/@types/node/base.d.ts:5545 +Defined in node_modules/@types/node/stream.d.ts:146 **Parameters:** Name | Type | ------ | ------ | `event` | "drain" | -`chunk` | [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string | **Returns:** *boolean* @@ -469,7 +470,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[emit](sourcesource.md#emit)* -Defined in node_modules/@types/node/base.d.ts:5546 +Defined in node_modules/@types/node/stream.d.ts:147 **Parameters:** @@ -486,7 +487,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[emit](sourcesource.md#emit)* -Defined in node_modules/@types/node/base.d.ts:5547 +Defined in node_modules/@types/node/stream.d.ts:148 **Parameters:** @@ -502,7 +503,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[emit](sourcesource.md#emit)* -Defined in node_modules/@types/node/base.d.ts:5548 +Defined in node_modules/@types/node/stream.d.ts:149 **Parameters:** @@ -519,7 +520,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[emit](sourcesource.md#emit)* -Defined in node_modules/@types/node/base.d.ts:5549 +Defined in node_modules/@types/node/stream.d.ts:150 **Parameters:** @@ -530,44 +531,61 @@ Name | Type | **Returns:** *boolean* +▸ **emit**(`event`: string | symbol, ...`args`: any[]): *boolean* + +*Inherited from [CountingWritable](countingwritable.md).[emit](countingwritable.md#emit)* + +*Overrides [SourceSource](sourcesource.md).[emit](sourcesource.md#emit)* + +Defined in node_modules/@types/node/stream.d.ts:151 + +**Parameters:** + +Name | Type | +------ | ------ | +`event` | string | symbol | +`...args` | any[] | + +**Returns:** *boolean* + ___ ### end -▸ **end**(`cb?`: Function): *void* +▸ **end**(`cb?`: undefined | function): *void* *Inherited from [CountingWritable](countingwritable.md).[end](countingwritable.md#end)* -Defined in node_modules/@types/node/base.d.ts:5518 +Defined in node_modules/@types/node/stream.d.ts:120 **Parameters:** Name | Type | ------ | ------ | -`cb?` | Function | +`cb?` | undefined | function | **Returns:** *void* -▸ **end**(`chunk`: any, `cb?`: Function): *void* +▸ **end**(`chunk`: any, `cb?`: undefined | function): *void* *Inherited from [CountingWritable](countingwritable.md).[end](countingwritable.md#end)* -Defined in node_modules/@types/node/base.d.ts:5519 +Defined in node_modules/@types/node/stream.d.ts:121 **Parameters:** Name | Type | ------ | ------ | `chunk` | any | -`cb?` | Function | +`cb?` | undefined | function | **Returns:** *void* -▸ **end**(`chunk`: any, `encoding?`: undefined | string, `cb?`: Function): *void* +▸ **end**(`chunk`: any, `encoding?`: undefined | string, `cb?`: undefined | function): *void* *Inherited from [CountingWritable](countingwritable.md).[end](countingwritable.md#end)* -Defined in node_modules/@types/node/base.d.ts:5520 +Defined in node_modules/@types/node/stream.d.ts:122 **Parameters:** @@ -575,7 +593,7 @@ Name | Type | ------ | ------ | `chunk` | any | `encoding?` | undefined | string | -`cb?` | Function | +`cb?` | undefined | function | **Returns:** *void* @@ -587,7 +605,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[eventNames](countingwritable.md#eventnames)* -Defined in node_modules/@types/node/base.d.ts:909 +Defined in node_modules/@types/node/events.d.ts:33 **Returns:** *Array‹string | symbol›* @@ -599,7 +617,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[getMaxListeners](countingwritable.md#getmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:906 +Defined in node_modules/@types/node/events.d.ts:29 **Returns:** *number* @@ -611,7 +629,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[listenerCount](countingwritable.md#static-listenercount)* -Defined in node_modules/@types/node/base.d.ts:910 +Defined in node_modules/@types/node/events.d.ts:34 **Parameters:** @@ -629,7 +647,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[listeners](countingwritable.md#listeners)* -Defined in node_modules/@types/node/base.d.ts:907 +Defined in node_modules/@types/node/events.d.ts:30 **Parameters:** @@ -641,19 +659,17 @@ Name | Type | ___ -### on - -▸ **on**(`event`: string, `listener`: function): *this* +### off -*Inherited from [CountingWritable](countingwritable.md).[on](countingwritable.md#on)* +▸ **off**(`event`: string | symbol, `listener`: function): *this* -*Overrides [SourceSource](sourcesource.md).[on](sourcesource.md#on)* +*Inherited from [CountingWritable](countingwritable.md).[off](countingwritable.md#off)* -Defined in node_modules/@types/node/base.d.ts:5551 +Defined in node_modules/@types/node/events.d.ts:26 **Parameters:** -▪ **event**: *string* +▪ **event**: *string | symbol* ▪ **listener**: *function* @@ -667,13 +683,17 @@ Name | Type | **Returns:** *this* +___ + +### on + ▸ **on**(`event`: "close", `listener`: function): *this* *Inherited from [CountingWritable](countingwritable.md).[on](countingwritable.md#on)* *Overrides [SourceSource](sourcesource.md).[on](sourcesource.md#on)* -Defined in node_modules/@types/node/base.d.ts:5552 +Defined in node_modules/@types/node/stream.d.ts:153 **Parameters:** @@ -691,7 +711,7 @@ Defined in node_modules/@types/node/base.d.ts:5552 *Overrides [SourceSource](sourcesource.md).[on](sourcesource.md#on)* -Defined in node_modules/@types/node/base.d.ts:5553 +Defined in node_modules/@types/node/stream.d.ts:154 **Parameters:** @@ -709,7 +729,7 @@ Defined in node_modules/@types/node/base.d.ts:5553 *Overrides [SourceSource](sourcesource.md).[on](sourcesource.md#on)* -Defined in node_modules/@types/node/base.d.ts:5554 +Defined in node_modules/@types/node/stream.d.ts:155 **Parameters:** @@ -733,7 +753,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[on](sourcesource.md#on)* -Defined in node_modules/@types/node/base.d.ts:5555 +Defined in node_modules/@types/node/stream.d.ts:156 **Parameters:** @@ -751,7 +771,7 @@ Defined in node_modules/@types/node/base.d.ts:5555 *Overrides [SourceSource](sourcesource.md).[on](sourcesource.md#on)* -Defined in node_modules/@types/node/base.d.ts:5556 +Defined in node_modules/@types/node/stream.d.ts:157 **Parameters:** @@ -775,7 +795,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[on](sourcesource.md#on)* -Defined in node_modules/@types/node/base.d.ts:5557 +Defined in node_modules/@types/node/stream.d.ts:158 **Parameters:** @@ -793,21 +813,17 @@ Name | Type | **Returns:** *this* -___ +▸ **on**(`event`: string | symbol, `listener`: function): *this* -### once - -▸ **once**(`event`: string, `listener`: function): *this* - -*Inherited from [CountingWritable](countingwritable.md).[once](countingwritable.md#once)* +*Inherited from [CountingWritable](countingwritable.md).[on](countingwritable.md#on)* -*Overrides [SourceSource](sourcesource.md).[once](sourcesource.md#once)* +*Overrides [SourceSource](sourcesource.md).[on](sourcesource.md#on)* -Defined in node_modules/@types/node/base.d.ts:5559 +Defined in node_modules/@types/node/stream.d.ts:159 **Parameters:** -▪ **event**: *string* +▪ **event**: *string | symbol* ▪ **listener**: *function* @@ -821,13 +837,17 @@ Name | Type | **Returns:** *this* +___ + +### once + ▸ **once**(`event`: "close", `listener`: function): *this* *Inherited from [CountingWritable](countingwritable.md).[once](countingwritable.md#once)* *Overrides [SourceSource](sourcesource.md).[once](sourcesource.md#once)* -Defined in node_modules/@types/node/base.d.ts:5560 +Defined in node_modules/@types/node/stream.d.ts:161 **Parameters:** @@ -845,7 +865,7 @@ Defined in node_modules/@types/node/base.d.ts:5560 *Overrides [SourceSource](sourcesource.md).[once](sourcesource.md#once)* -Defined in node_modules/@types/node/base.d.ts:5561 +Defined in node_modules/@types/node/stream.d.ts:162 **Parameters:** @@ -863,7 +883,7 @@ Defined in node_modules/@types/node/base.d.ts:5561 *Overrides [SourceSource](sourcesource.md).[once](sourcesource.md#once)* -Defined in node_modules/@types/node/base.d.ts:5562 +Defined in node_modules/@types/node/stream.d.ts:163 **Parameters:** @@ -887,7 +907,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[once](sourcesource.md#once)* -Defined in node_modules/@types/node/base.d.ts:5563 +Defined in node_modules/@types/node/stream.d.ts:164 **Parameters:** @@ -905,7 +925,7 @@ Defined in node_modules/@types/node/base.d.ts:5563 *Overrides [SourceSource](sourcesource.md).[once](sourcesource.md#once)* -Defined in node_modules/@types/node/base.d.ts:5564 +Defined in node_modules/@types/node/stream.d.ts:165 **Parameters:** @@ -929,7 +949,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[once](sourcesource.md#once)* -Defined in node_modules/@types/node/base.d.ts:5565 +Defined in node_modules/@types/node/stream.d.ts:166 **Parameters:** @@ -947,56 +967,56 @@ Name | Type | **Returns:** *this* -___ +▸ **once**(`event`: string | symbol, `listener`: function): *this* -### pipe +*Inherited from [CountingWritable](countingwritable.md).[once](countingwritable.md#once)* -▸ **pipe**<**T**>(`destination`: T, `options?`: undefined | object): *T* +*Overrides [SourceSource](sourcesource.md).[once](sourcesource.md#once)* -*Inherited from [CountingWritable](countingwritable.md).[pipe](countingwritable.md#pipe)* +Defined in node_modules/@types/node/stream.d.ts:167 -Defined in node_modules/@types/node/base.d.ts:5407 +**Parameters:** -**Type parameters:** +▪ **event**: *string | symbol* -▪ **T**: *WritableStream* +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`destination` | T | -`options?` | undefined | object | +`...args` | any[] | -**Returns:** *T* +**Returns:** *this* ___ -### prependListener - -▸ **prependListener**(`event`: string, `listener`: function): *this* - -*Inherited from [CountingWritable](countingwritable.md).[prependListener](countingwritable.md#prependlistener)* - -*Overrides [SourceSource](sourcesource.md).[prependListener](sourcesource.md#prependlistener)* +### pipe -Defined in node_modules/@types/node/base.d.ts:5567 +▸ **pipe**<**T**>(`destination`: T, `options?`: undefined | object): *T* -**Parameters:** +*Inherited from [CountingWritable](countingwritable.md).[pipe](countingwritable.md#pipe)* -▪ **event**: *string* +Defined in node_modules/@types/node/stream.d.ts:5 -▪ **listener**: *function* +**Type parameters:** -▸ (...`args`: any[]): *void* +▪ **T**: *WritableStream* **Parameters:** Name | Type | ------ | ------ | -`...args` | any[] | +`destination` | T | +`options?` | undefined | object | -**Returns:** *this* +**Returns:** *T* + +___ + +### prependListener ▸ **prependListener**(`event`: "close", `listener`: function): *this* @@ -1004,7 +1024,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[prependListener](sourcesource.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:5568 +Defined in node_modules/@types/node/stream.d.ts:169 **Parameters:** @@ -1022,7 +1042,7 @@ Defined in node_modules/@types/node/base.d.ts:5568 *Overrides [SourceSource](sourcesource.md).[prependListener](sourcesource.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:5569 +Defined in node_modules/@types/node/stream.d.ts:170 **Parameters:** @@ -1040,7 +1060,7 @@ Defined in node_modules/@types/node/base.d.ts:5569 *Overrides [SourceSource](sourcesource.md).[prependListener](sourcesource.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:5570 +Defined in node_modules/@types/node/stream.d.ts:171 **Parameters:** @@ -1064,7 +1084,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[prependListener](sourcesource.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:5571 +Defined in node_modules/@types/node/stream.d.ts:172 **Parameters:** @@ -1082,7 +1102,7 @@ Defined in node_modules/@types/node/base.d.ts:5571 *Overrides [SourceSource](sourcesource.md).[prependListener](sourcesource.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:5572 +Defined in node_modules/@types/node/stream.d.ts:173 **Parameters:** @@ -1106,7 +1126,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[prependListener](sourcesource.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:5573 +Defined in node_modules/@types/node/stream.d.ts:174 **Parameters:** @@ -1124,21 +1144,17 @@ Name | Type | **Returns:** *this* -___ - -### prependOnceListener - -▸ **prependOnceListener**(`event`: string, `listener`: function): *this* +▸ **prependListener**(`event`: string | symbol, `listener`: function): *this* -*Inherited from [CountingWritable](countingwritable.md).[prependOnceListener](countingwritable.md#prependoncelistener)* +*Inherited from [CountingWritable](countingwritable.md).[prependListener](countingwritable.md#prependlistener)* -*Overrides [SourceSource](sourcesource.md).[prependOnceListener](sourcesource.md#prependoncelistener)* +*Overrides [SourceSource](sourcesource.md).[prependListener](sourcesource.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:5575 +Defined in node_modules/@types/node/stream.d.ts:175 **Parameters:** -▪ **event**: *string* +▪ **event**: *string | symbol* ▪ **listener**: *function* @@ -1152,13 +1168,17 @@ Name | Type | **Returns:** *this* +___ + +### prependOnceListener + ▸ **prependOnceListener**(`event`: "close", `listener`: function): *this* *Inherited from [CountingWritable](countingwritable.md).[prependOnceListener](countingwritable.md#prependoncelistener)* *Overrides [SourceSource](sourcesource.md).[prependOnceListener](sourcesource.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:5576 +Defined in node_modules/@types/node/stream.d.ts:177 **Parameters:** @@ -1176,7 +1196,7 @@ Defined in node_modules/@types/node/base.d.ts:5576 *Overrides [SourceSource](sourcesource.md).[prependOnceListener](sourcesource.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:5577 +Defined in node_modules/@types/node/stream.d.ts:178 **Parameters:** @@ -1194,7 +1214,7 @@ Defined in node_modules/@types/node/base.d.ts:5577 *Overrides [SourceSource](sourcesource.md).[prependOnceListener](sourcesource.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:5578 +Defined in node_modules/@types/node/stream.d.ts:179 **Parameters:** @@ -1218,7 +1238,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[prependOnceListener](sourcesource.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:5579 +Defined in node_modules/@types/node/stream.d.ts:180 **Parameters:** @@ -1236,7 +1256,7 @@ Defined in node_modules/@types/node/base.d.ts:5579 *Overrides [SourceSource](sourcesource.md).[prependOnceListener](sourcesource.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:5580 +Defined in node_modules/@types/node/stream.d.ts:181 **Parameters:** @@ -1260,7 +1280,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[prependOnceListener](sourcesource.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:5581 +Defined in node_modules/@types/node/stream.d.ts:182 **Parameters:** @@ -1278,59 +1298,77 @@ Name | Type | **Returns:** *this* -___ +▸ **prependOnceListener**(`event`: string | symbol, `listener`: function): *this* -### removeAllListeners +*Inherited from [CountingWritable](countingwritable.md).[prependOnceListener](countingwritable.md#prependoncelistener)* -▸ **removeAllListeners**(`event?`: string | symbol): *this* +*Overrides [SourceSource](sourcesource.md).[prependOnceListener](sourcesource.md#prependoncelistener)* -*Inherited from [CountingWritable](countingwritable.md).[removeAllListeners](countingwritable.md#removealllisteners)* +Defined in node_modules/@types/node/stream.d.ts:183 + +**Parameters:** + +▪ **event**: *string | symbol* -Defined in node_modules/@types/node/base.d.ts:904 +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event?` | string | symbol | +`...args` | any[] | **Returns:** *this* ___ -### removeListener +### rawListeners -▸ **removeListener**(`event`: string, `listener`: function): *this* +▸ **rawListeners**(`event`: string | symbol): *Function[]* -*Inherited from [CountingWritable](countingwritable.md).[removeListener](countingwritable.md#removelistener)* +*Inherited from [CountingWritable](countingwritable.md).[rawListeners](countingwritable.md#rawlisteners)* -*Overrides [SourceSource](sourcesource.md).[removeListener](sourcesource.md#removelistener)* - -Defined in node_modules/@types/node/base.d.ts:5583 +Defined in node_modules/@types/node/events.d.ts:31 **Parameters:** -▪ **event**: *string* +Name | Type | +------ | ------ | +`event` | string | symbol | + +**Returns:** *Function[]* -▪ **listener**: *function* +___ -▸ (...`args`: any[]): *void* +### removeAllListeners + +▸ **removeAllListeners**(`event?`: string | symbol): *this* + +*Inherited from [CountingWritable](countingwritable.md).[removeAllListeners](countingwritable.md#removealllisteners)* + +Defined in node_modules/@types/node/events.d.ts:27 **Parameters:** Name | Type | ------ | ------ | -`...args` | any[] | +`event?` | string | symbol | **Returns:** *this* +___ + +### removeListener + ▸ **removeListener**(`event`: "close", `listener`: function): *this* *Inherited from [CountingWritable](countingwritable.md).[removeListener](countingwritable.md#removelistener)* *Overrides [SourceSource](sourcesource.md).[removeListener](sourcesource.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:5584 +Defined in node_modules/@types/node/stream.d.ts:185 **Parameters:** @@ -1348,7 +1386,7 @@ Defined in node_modules/@types/node/base.d.ts:5584 *Overrides [SourceSource](sourcesource.md).[removeListener](sourcesource.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:5585 +Defined in node_modules/@types/node/stream.d.ts:186 **Parameters:** @@ -1366,7 +1404,7 @@ Defined in node_modules/@types/node/base.d.ts:5585 *Overrides [SourceSource](sourcesource.md).[removeListener](sourcesource.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:5586 +Defined in node_modules/@types/node/stream.d.ts:187 **Parameters:** @@ -1390,7 +1428,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[removeListener](sourcesource.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:5587 +Defined in node_modules/@types/node/stream.d.ts:188 **Parameters:** @@ -1408,7 +1446,7 @@ Defined in node_modules/@types/node/base.d.ts:5587 *Overrides [SourceSource](sourcesource.md).[removeListener](sourcesource.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:5588 +Defined in node_modules/@types/node/stream.d.ts:189 **Parameters:** @@ -1432,7 +1470,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[removeListener](sourcesource.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:5589 +Defined in node_modules/@types/node/stream.d.ts:190 **Parameters:** @@ -1450,6 +1488,30 @@ Name | Type | **Returns:** *this* +▸ **removeListener**(`event`: string | symbol, `listener`: function): *this* + +*Inherited from [CountingWritable](countingwritable.md).[removeListener](countingwritable.md#removelistener)* + +*Overrides [SourceSource](sourcesource.md).[removeListener](sourcesource.md#removelistener)* + +Defined in node_modules/@types/node/stream.d.ts:191 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* + +**Parameters:** + +Name | Type | +------ | ------ | +`...args` | any[] | + +**Returns:** *this* + ___ ### setDefaultEncoding @@ -1458,7 +1520,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[setDefaultEncoding](countingwritable.md#setdefaultencoding)* -Defined in node_modules/@types/node/base.d.ts:5517 +Defined in node_modules/@types/node/stream.d.ts:119 **Parameters:** @@ -1476,7 +1538,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[setMaxListeners](countingwritable.md#setmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:905 +Defined in node_modules/@types/node/events.d.ts:28 **Parameters:** @@ -1494,7 +1556,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[uncork](countingwritable.md#uncork)* -Defined in node_modules/@types/node/base.d.ts:5522 +Defined in node_modules/@types/node/stream.d.ts:124 **Returns:** *void* @@ -1502,26 +1564,26 @@ ___ ### write -▸ **write**(`chunk`: any, `cb?`: Function): *boolean* +▸ **write**(`chunk`: any, `cb?`: undefined | function): *boolean* *Inherited from [CountingWritable](countingwritable.md).[write](countingwritable.md#write)* -Defined in node_modules/@types/node/base.d.ts:5515 +Defined in node_modules/@types/node/stream.d.ts:117 **Parameters:** Name | Type | ------ | ------ | `chunk` | any | -`cb?` | Function | +`cb?` | undefined | function | **Returns:** *boolean* -▸ **write**(`chunk`: any, `encoding?`: undefined | string, `cb?`: Function): *boolean* +▸ **write**(`chunk`: any, `encoding?`: undefined | string, `cb?`: undefined | function): *boolean* *Inherited from [CountingWritable](countingwritable.md).[write](countingwritable.md#write)* -Defined in node_modules/@types/node/base.d.ts:5516 +Defined in node_modules/@types/node/stream.d.ts:118 **Parameters:** @@ -1529,7 +1591,7 @@ Name | Type | ------ | ------ | `chunk` | any | `encoding?` | undefined | string | -`cb?` | Function | +`cb?` | undefined | function | **Returns:** *boolean* @@ -1541,7 +1603,9 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[listenerCount](countingwritable.md#static-listenercount)* -Defined in node_modules/@types/node/base.d.ts:895 +Defined in node_modules/@types/node/events.d.ts:17 + +**`deprecated`** since v4.0.0 **Parameters:** diff --git a/doc/classes/crc32hasher.md b/doc/classes/crc32hasher.md index e840c5d7..d1042a2e 100644 --- a/doc/classes/crc32hasher.md +++ b/doc/classes/crc32hasher.md @@ -24,7 +24,7 @@ • **crc32**: *crc32* = getCrc().crc32 -*Defined in [lib/sparse-stream/shared.ts:64](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/sparse-stream/shared.ts#L64)* +*Defined in [lib/sparse-stream/shared.ts:64](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/sparse-stream/shared.ts#L64)* ___ @@ -32,7 +32,7 @@ ___ • **value**: *number* -*Defined in [lib/sparse-stream/shared.ts:63](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/sparse-stream/shared.ts#L63)* +*Defined in [lib/sparse-stream/shared.ts:63](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/sparse-stream/shared.ts#L63)* ## Methods @@ -40,7 +40,7 @@ ___ ▸ **digest**(`_encoding`: "hex"): *string* -*Defined in [lib/sparse-stream/shared.ts:70](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/sparse-stream/shared.ts#L70)* +*Defined in [lib/sparse-stream/shared.ts:70](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/sparse-stream/shared.ts#L70)* **Parameters:** @@ -56,7 +56,7 @@ ___ ▸ **update**(`data`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer)): *void* -*Defined in [lib/sparse-stream/shared.ts:66](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/sparse-stream/shared.ts#L66)* +*Defined in [lib/sparse-stream/shared.ts:66](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/sparse-stream/shared.ts#L66)* **Parameters:** diff --git a/doc/classes/dmgsource.md b/doc/classes/dmgsource.md index 6d41351d..49722069 100644 --- a/doc/classes/dmgsource.md +++ b/doc/classes/dmgsource.md @@ -52,11 +52,13 @@ * [getPartitionTable](dmgsource.md#getpartitiontable) * [listenerCount](dmgsource.md#listenercount) * [listeners](dmgsource.md#listeners) +* [off](dmgsource.md#off) * [on](dmgsource.md#on) * [once](dmgsource.md#once) * [open](dmgsource.md#open) * [prependListener](dmgsource.md#prependlistener) * [prependOnceListener](dmgsource.md#prependoncelistener) +* [rawListeners](dmgsource.md#rawlisteners) * [read](dmgsource.md#read) * [removeAllListeners](dmgsource.md#removealllisteners) * [removeListener](dmgsource.md#removelistener) @@ -73,7 +75,7 @@ *Overrides [SourceSource](sourcesource.md).[constructor](sourcesource.md#constructor)* -*Defined in [lib/source-destination/dmg.ts:52](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/dmg.ts#L52)* +*Defined in [lib/source-destination/dmg.ts:52](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/dmg.ts#L52)* **Parameters:** @@ -89,7 +91,7 @@ Name | Type | • **image**: *UDIFImage* -*Defined in [lib/source-destination/dmg.ts:52](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/dmg.ts#L52)* +*Defined in [lib/source-destination/dmg.ts:52](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/dmg.ts#L52)* ___ @@ -99,7 +101,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[source](sourcesource.md#protected-source)* -*Defined in [lib/source-destination/source-source.ts:22](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-source.ts#L22)* +*Defined in [lib/source-destination/source-source.ts:22](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-source.ts#L22)* ___ @@ -109,7 +111,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[defaultMaxListeners](countingwritable.md#static-defaultmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:896 +Defined in node_modules/@types/node/events.d.ts:18 ___ @@ -130,7 +132,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[imageExtensions](sourcesource.md#static-imageextensions)* -*Defined in [lib/source-destination/source-destination.ts:252](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L252)* +*Defined in [lib/source-destination/source-destination.ts:275](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L275)* ___ @@ -144,7 +146,7 @@ ___ BLOCK.LZFSE, ] -*Defined in [lib/source-destination/dmg.ts:43](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/dmg.ts#L43)* +*Defined in [lib/source-destination/dmg.ts:43](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/dmg.ts#L43)* ___ @@ -154,7 +156,7 @@ ___ *Overrides [SourceSource](sourcesource.md).[mimetype](sourcesource.md#static-optional-mimetype)* -*Defined in [lib/source-destination/dmg.ts:51](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/dmg.ts#L51)* +*Defined in [lib/source-destination/dmg.ts:51](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/dmg.ts#L51)* ___ @@ -164,7 +166,7 @@ ___ *Overrides [SourceSource](sourcesource.md).[requiresRandomReadableSource](sourcesource.md#static-requiresrandomreadablesource)* -*Defined in [lib/source-destination/dmg.ts:50](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/dmg.ts#L50)* +*Defined in [lib/source-destination/dmg.ts:50](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/dmg.ts#L50)* ## Methods @@ -174,7 +176,7 @@ ___ *Overrides [SourceSource](sourcesource.md).[_close](sourcesource.md#protected-_close)* -*Defined in [lib/source-destination/dmg.ts:159](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/dmg.ts#L159)* +*Defined in [lib/source-destination/dmg.ts:160](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/dmg.ts#L160)* **Returns:** *Promise‹void›* @@ -186,7 +188,7 @@ ___ *Overrides [SourceSource](sourcesource.md).[_getMetadata](sourcesource.md#protected-_getmetadata)* -*Defined in [lib/source-destination/dmg.ts:146](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/dmg.ts#L146)* +*Defined in [lib/source-destination/dmg.ts:147](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/dmg.ts#L147)* **Returns:** *Promise‹[Metadata](../interfaces/metadata.md)›* @@ -198,7 +200,7 @@ ___ *Overrides [SourceSource](sourcesource.md).[_open](sourcesource.md#protected-_open)* -*Defined in [lib/source-destination/dmg.ts:154](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/dmg.ts#L154)* +*Defined in [lib/source-destination/dmg.ts:155](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/dmg.ts#L155)* **Returns:** *Promise‹void›* @@ -212,7 +214,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[addListener](../interfaces/sparsereadable.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:898 +Defined in node_modules/@types/node/events.d.ts:20 **Parameters:** @@ -238,7 +240,7 @@ ___ *Overrides [SourceSource](sourcesource.md).[canCreateReadStream](sourcesource.md#cancreatereadstream)* -*Defined in [lib/source-destination/dmg.ts:59](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/dmg.ts#L59)* +*Defined in [lib/source-destination/dmg.ts:59](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/dmg.ts#L59)* **Returns:** *Promise‹boolean›* @@ -250,7 +252,7 @@ ___ *Overrides [SourceSource](sourcesource.md).[canCreateSparseReadStream](sourcesource.md#cancreatesparsereadstream)* -*Defined in [lib/source-destination/dmg.ts:63](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/dmg.ts#L63)* +*Defined in [lib/source-destination/dmg.ts:63](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/dmg.ts#L63)* **Returns:** *Promise‹boolean›* @@ -262,7 +264,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[canCreateSparseWriteStream](sourcesource.md#cancreatesparsewritestream)* -*Defined in [lib/source-destination/source-destination.ts:300](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L300)* +*Defined in [lib/source-destination/source-destination.ts:323](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L323)* **Returns:** *Promise‹boolean›* @@ -274,7 +276,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[canCreateWriteStream](sourcesource.md#cancreatewritestream)* -*Defined in [lib/source-destination/source-destination.ts:296](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L296)* +*Defined in [lib/source-destination/source-destination.ts:319](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L319)* **Returns:** *Promise‹boolean›* @@ -286,7 +288,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[canRead](sourcesource.md#canread)* -*Defined in [lib/source-destination/source-destination.ts:280](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L280)* +*Defined in [lib/source-destination/source-destination.ts:303](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L303)* **Returns:** *Promise‹boolean›* @@ -298,7 +300,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[canWrite](sourcesource.md#canwrite)* -*Defined in [lib/source-destination/source-destination.ts:284](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L284)* +*Defined in [lib/source-destination/source-destination.ts:307](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L307)* **Returns:** *Promise‹boolean›* @@ -310,7 +312,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[close](sourcesource.md#close)* -*Defined in [lib/source-destination/source-destination.ts:368](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L368)* +*Defined in [lib/source-destination/source-destination.ts:391](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L391)* **Returns:** *Promise‹void›* @@ -322,7 +324,7 @@ ___ *Overrides [SourceSource](sourcesource.md).[createReadStream](sourcesource.md#createreadstream)* -*Defined in [lib/source-destination/dmg.ts:67](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/dmg.ts#L67)* +*Defined in [lib/source-destination/dmg.ts:67](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/dmg.ts#L67)* **Parameters:** @@ -345,7 +347,7 @@ ___ *Overrides [SourceSource](sourcesource.md).[createSparseReadStream](sourcesource.md#createsparsereadstream)* -*Defined in [lib/source-destination/dmg.ts:84](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/dmg.ts#L84)* +*Defined in [lib/source-destination/dmg.ts:84](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/dmg.ts#L84)* **Parameters:** @@ -366,7 +368,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[createSparseWriteStream](sourcesource.md#createsparsewritestream)* -*Defined in [lib/source-destination/source-destination.ts:355](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L355)* +*Defined in [lib/source-destination/source-destination.ts:378](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L378)* **Parameters:** @@ -386,7 +388,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[createVerifier](sourcesource.md#createverifier)* -*Defined in [lib/source-destination/source-destination.ts:383](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L383)* +*Defined in [lib/source-destination/source-destination.ts:406](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L406)* **Parameters:** @@ -405,7 +407,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[createWriteStream](sourcesource.md#createwritestream)* -*Defined in [lib/source-destination/source-destination.ts:349](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L349)* +*Defined in [lib/source-destination/source-destination.ts:372](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L372)* **Parameters:** @@ -427,7 +429,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[emit](../interfaces/sparsereadable.md#emit)* -Defined in node_modules/@types/node/base.d.ts:908 +Defined in node_modules/@types/node/events.d.ts:32 **Parameters:** @@ -448,7 +450,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[eventNames](../interfaces/sparsereadable.md#eventnames)* -Defined in node_modules/@types/node/base.d.ts:909 +Defined in node_modules/@types/node/events.d.ts:33 **Returns:** *Array‹string | symbol›* @@ -460,7 +462,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[getAlignment](sourcesource.md#getalignment)* -*Defined in [lib/source-destination/source-destination.ts:276](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L276)* +*Defined in [lib/source-destination/source-destination.ts:299](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L299)* **Returns:** *number | undefined* @@ -472,7 +474,7 @@ ___ *Overrides [SourceSource](sourcesource.md).[getBlocks](sourcesource.md#getblocks)* -*Defined in [lib/source-destination/dmg.ts:106](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/dmg.ts#L106)* +*Defined in [lib/source-destination/dmg.ts:107](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/dmg.ts#L107)* **Returns:** *Promise‹[BlocksWithChecksum](../interfaces/blockswithchecksum.md)[]›* @@ -484,7 +486,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[getInnerSource](sourcesource.md#getinnersource)* -*Defined in [lib/source-destination/source-destination.ts:452](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L452)* +*Defined in [lib/source-destination/source-destination.ts:475](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L475)* **Returns:** *Promise‹[SourceDestination](sourcedestination.md)›* @@ -498,7 +500,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[getMaxListeners](../interfaces/sparsereadable.md#getmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:906 +Defined in node_modules/@types/node/events.d.ts:29 **Returns:** *number* @@ -510,7 +512,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[getMetadata](sourcesource.md#getmetadata)* -*Defined in [lib/source-destination/source-destination.ts:304](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L304)* +*Defined in [lib/source-destination/source-destination.ts:327](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L327)* **Returns:** *Promise‹[Metadata](../interfaces/metadata.md)›* @@ -522,7 +524,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[getPartitionTable](sourcesource.md#getpartitiontable)* -*Defined in [lib/source-destination/source-destination.ts:473](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L473)* +*Defined in [lib/source-destination/source-destination.ts:496](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L496)* **Returns:** *Promise‹GetPartitionsResult | undefined›* @@ -536,7 +538,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[listenerCount](../interfaces/sparsereadable.md#listenercount)* -Defined in node_modules/@types/node/base.d.ts:910 +Defined in node_modules/@types/node/events.d.ts:34 **Parameters:** @@ -556,7 +558,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[listeners](../interfaces/sparsereadable.md#listeners)* -Defined in node_modules/@types/node/base.d.ts:907 +Defined in node_modules/@types/node/events.d.ts:30 **Parameters:** @@ -568,6 +570,34 @@ Name | Type | ___ +### off + +▸ **off**(`event`: string | symbol, `listener`: function): *this* + +*Inherited from [CountingWritable](countingwritable.md).[off](countingwritable.md#off)* + +*Overrides [SparseReadable](../interfaces/sparsereadable.md).[off](../interfaces/sparsereadable.md#off)* + +Defined in node_modules/@types/node/events.d.ts:26 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* + +**Parameters:** + +Name | Type | +------ | ------ | +`...args` | any[] | + +**Returns:** *this* + +___ + ### on ▸ **on**(`event`: string | symbol, `listener`: function): *this* @@ -576,7 +606,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[on](../interfaces/sparsereadable.md#on)* -Defined in node_modules/@types/node/base.d.ts:899 +Defined in node_modules/@types/node/events.d.ts:21 **Parameters:** @@ -604,7 +634,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[once](../interfaces/sparsereadable.md#once)* -Defined in node_modules/@types/node/base.d.ts:900 +Defined in node_modules/@types/node/events.d.ts:22 **Parameters:** @@ -630,7 +660,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[open](sourcesource.md#open)* -*Defined in [lib/source-destination/source-destination.ts:361](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L361)* +*Defined in [lib/source-destination/source-destination.ts:384](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L384)* **Returns:** *Promise‹void›* @@ -644,7 +674,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[prependListener](../interfaces/sparsereadable.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:901 +Defined in node_modules/@types/node/events.d.ts:23 **Parameters:** @@ -672,7 +702,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[prependOnceListener](../interfaces/sparsereadable.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:902 +Defined in node_modules/@types/node/events.d.ts:24 **Parameters:** @@ -692,13 +722,33 @@ Name | Type | ___ +### rawListeners + +▸ **rawListeners**(`event`: string | symbol): *Function[]* + +*Inherited from [CountingWritable](countingwritable.md).[rawListeners](countingwritable.md#rawlisteners)* + +*Overrides [SparseReadable](../interfaces/sparsereadable.md).[rawListeners](../interfaces/sparsereadable.md#rawlisteners)* + +Defined in node_modules/@types/node/events.d.ts:31 + +**Parameters:** + +Name | Type | +------ | ------ | +`event` | string | symbol | + +**Returns:** *Function[]* + +___ + ### read ▸ **read**(`_buffer`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer), `_bufferOffset`: number, `_length`: number, `_sourceOffset`: number): *Promise‹ReadResult›* *Inherited from [SourceSource](sourcesource.md).[read](sourcesource.md#read)* -*Defined in [lib/source-destination/source-destination.ts:315](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L315)* +*Defined in [lib/source-destination/source-destination.ts:338](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L338)* **Parameters:** @@ -721,7 +771,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[removeAllListeners](../interfaces/sparsereadable.md#removealllisteners)* -Defined in node_modules/@types/node/base.d.ts:904 +Defined in node_modules/@types/node/events.d.ts:27 **Parameters:** @@ -741,7 +791,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[removeListener](../interfaces/sparsereadable.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:903 +Defined in node_modules/@types/node/events.d.ts:25 **Parameters:** @@ -769,7 +819,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[setMaxListeners](../interfaces/sparsereadable.md#setmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:905 +Defined in node_modules/@types/node/events.d.ts:28 **Parameters:** @@ -787,7 +837,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[write](sourcesource.md#write)* -*Defined in [lib/source-destination/source-destination.ts:324](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L324)* +*Defined in [lib/source-destination/source-destination.ts:347](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L347)* **Parameters:** @@ -808,7 +858,9 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[listenerCount](countingwritable.md#static-listenercount)* -Defined in node_modules/@types/node/base.d.ts:895 +Defined in node_modules/@types/node/events.d.ts:17 + +**`deprecated`** since v4.0.0 **Parameters:** @@ -827,7 +879,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[register](sourcesource.md#static-register)* -*Defined in [lib/source-destination/source-destination.ts:270](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L270)* +*Defined in [lib/source-destination/source-destination.ts:293](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L293)* **Parameters:** diff --git a/doc/classes/driverlessdevice.md b/doc/classes/driverlessdevice.md index 89f84939..e9b76cdc 100644 --- a/doc/classes/driverlessdevice.md +++ b/doc/classes/driverlessdevice.md @@ -62,11 +62,13 @@ * [getPartitionTable](driverlessdevice.md#getpartitiontable) * [listenerCount](driverlessdevice.md#listenercount) * [listeners](driverlessdevice.md#listeners) +* [off](driverlessdevice.md#off) * [on](driverlessdevice.md#on) * [once](driverlessdevice.md#once) * [open](driverlessdevice.md#open) * [prependListener](driverlessdevice.md#prependlistener) * [prependOnceListener](driverlessdevice.md#prependoncelistener) +* [rawListeners](driverlessdevice.md#rawlisteners) * [read](driverlessdevice.md#read) * [removeAllListeners](driverlessdevice.md#removealllisteners) * [removeListener](driverlessdevice.md#removelistener) @@ -81,7 +83,7 @@ \+ **new DriverlessDevice**(`driverlessDevice`: WinUsbDriverlessDevice): *[DriverlessDevice](driverlessdevice.md)* -*Defined in [lib/source-destination/driverless.ts:33](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/driverless.ts#L33)* +*Defined in [lib/source-destination/driverless.ts:33](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/driverless.ts#L33)* **Parameters:** @@ -97,7 +99,7 @@ Name | Type | • **accessible**: *boolean* = false -*Defined in [lib/source-destination/driverless.ts:24](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/driverless.ts#L24)* +*Defined in [lib/source-destination/driverless.ts:24](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/driverless.ts#L24)* ___ @@ -107,7 +109,7 @@ ___ *Implementation of [AdapterSourceDestination](../interfaces/adaptersourcedestination.md).[description](../interfaces/adaptersourcedestination.md#description)* -*Defined in [lib/source-destination/driverless.ts:33](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/driverless.ts#L33)* +*Defined in [lib/source-destination/driverless.ts:33](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/driverless.ts#L33)* ___ @@ -117,7 +119,7 @@ ___ *Implementation of [AdapterSourceDestination](../interfaces/adaptersourcedestination.md).[device](../interfaces/adaptersourcedestination.md#device)* -*Defined in [lib/source-destination/driverless.ts:26](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/driverless.ts#L26)* +*Defined in [lib/source-destination/driverless.ts:26](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/driverless.ts#L26)* ___ @@ -125,7 +127,7 @@ ___ • **deviceDescriptor**: *object* -*Defined in [lib/source-destination/driverless.ts:32](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/driverless.ts#L32)* +*Defined in [lib/source-destination/driverless.ts:32](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/driverless.ts#L32)* #### Type declaration: @@ -141,7 +143,7 @@ ___ *Implementation of [AdapterSourceDestination](../interfaces/adaptersourcedestination.md).[devicePath](../interfaces/adaptersourcedestination.md#devicepath)* -*Defined in [lib/source-destination/driverless.ts:27](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/driverless.ts#L27)* +*Defined in [lib/source-destination/driverless.ts:27](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/driverless.ts#L27)* ___ @@ -151,7 +153,7 @@ ___ *Implementation of [AdapterSourceDestination](../interfaces/adaptersourcedestination.md).[emitsProgress](../interfaces/adaptersourcedestination.md#emitsprogress)* -*Defined in [lib/source-destination/driverless.ts:31](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/driverless.ts#L31)* +*Defined in [lib/source-destination/driverless.ts:31](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/driverless.ts#L31)* ___ @@ -161,7 +163,7 @@ ___ *Implementation of [AdapterSourceDestination](../interfaces/adaptersourcedestination.md).[isSystem](../interfaces/adaptersourcedestination.md#issystem)* -*Defined in [lib/source-destination/driverless.ts:28](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/driverless.ts#L28)* +*Defined in [lib/source-destination/driverless.ts:28](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/driverless.ts#L28)* ___ @@ -171,7 +173,7 @@ ___ *Implementation of [AdapterSourceDestination](../interfaces/adaptersourcedestination.md).[mountpoints](../interfaces/adaptersourcedestination.md#mountpoints)* -*Defined in [lib/source-destination/driverless.ts:29](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/driverless.ts#L29)* +*Defined in [lib/source-destination/driverless.ts:29](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/driverless.ts#L29)* ___ @@ -181,7 +183,7 @@ ___ *Implementation of [AdapterSourceDestination](../interfaces/adaptersourcedestination.md).[raw](../interfaces/adaptersourcedestination.md#raw)* -*Defined in [lib/source-destination/driverless.ts:25](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/driverless.ts#L25)* +*Defined in [lib/source-destination/driverless.ts:25](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/driverless.ts#L25)* ___ @@ -191,7 +193,7 @@ ___ *Implementation of [AdapterSourceDestination](../interfaces/adaptersourcedestination.md).[size](../interfaces/adaptersourcedestination.md#size)* -*Defined in [lib/source-destination/driverless.ts:30](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/driverless.ts#L30)* +*Defined in [lib/source-destination/driverless.ts:30](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/driverless.ts#L30)* ___ @@ -203,7 +205,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[defaultMaxListeners](countingwritable.md#static-defaultmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:896 +Defined in node_modules/@types/node/events.d.ts:18 ___ @@ -226,7 +228,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[imageExtensions](sourcesource.md#static-imageextensions)* -*Defined in [lib/source-destination/source-destination.ts:252](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L252)* +*Defined in [lib/source-destination/source-destination.ts:275](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L275)* ___ @@ -238,7 +240,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[mimetype](sourcesource.md#static-optional-mimetype)* -*Defined in [lib/source-destination/source-destination.ts:264](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L264)* +*Defined in [lib/source-destination/source-destination.ts:287](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L287)* ## Methods @@ -250,7 +252,7 @@ ___ *Inherited from [SourceDestination](sourcedestination.md).[_close](sourcedestination.md#protected-_close)* -*Defined in [lib/source-destination/source-destination.ts:379](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L379)* +*Defined in [lib/source-destination/source-destination.ts:402](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L402)* **Returns:** *Promise‹void›* @@ -264,7 +266,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[_getMetadata](sourcesource.md#protected-_getmetadata)* -*Defined in [lib/source-destination/source-destination.ts:311](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L311)* +*Defined in [lib/source-destination/source-destination.ts:334](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L334)* **Returns:** *Promise‹[Metadata](../interfaces/metadata.md)›* @@ -278,7 +280,7 @@ ___ *Inherited from [SourceDestination](sourcedestination.md).[_open](sourcedestination.md#protected-_open)* -*Defined in [lib/source-destination/source-destination.ts:375](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L375)* +*Defined in [lib/source-destination/source-destination.ts:398](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L398)* **Returns:** *Promise‹void›* @@ -292,7 +294,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[addListener](../interfaces/sparsereadable.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:898 +Defined in node_modules/@types/node/events.d.ts:20 **Parameters:** @@ -320,7 +322,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[canCreateReadStream](sourcesource.md#cancreatereadstream)* -*Defined in [lib/source-destination/source-destination.ts:288](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L288)* +*Defined in [lib/source-destination/source-destination.ts:311](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L311)* **Returns:** *Promise‹boolean›* @@ -334,7 +336,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[canCreateSparseReadStream](sourcesource.md#cancreatesparsereadstream)* -*Defined in [lib/source-destination/source-destination.ts:292](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L292)* +*Defined in [lib/source-destination/source-destination.ts:315](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L315)* **Returns:** *Promise‹boolean›* @@ -348,7 +350,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[canCreateSparseWriteStream](sourcesource.md#cancreatesparsewritestream)* -*Defined in [lib/source-destination/source-destination.ts:300](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L300)* +*Defined in [lib/source-destination/source-destination.ts:323](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L323)* **Returns:** *Promise‹boolean›* @@ -362,7 +364,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[canCreateWriteStream](sourcesource.md#cancreatewritestream)* -*Defined in [lib/source-destination/source-destination.ts:296](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L296)* +*Defined in [lib/source-destination/source-destination.ts:319](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L319)* **Returns:** *Promise‹boolean›* @@ -376,7 +378,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[canRead](sourcesource.md#canread)* -*Defined in [lib/source-destination/source-destination.ts:280](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L280)* +*Defined in [lib/source-destination/source-destination.ts:303](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L303)* **Returns:** *Promise‹boolean›* @@ -390,7 +392,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[canWrite](sourcesource.md#canwrite)* -*Defined in [lib/source-destination/source-destination.ts:284](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L284)* +*Defined in [lib/source-destination/source-destination.ts:307](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L307)* **Returns:** *Promise‹boolean›* @@ -404,7 +406,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[close](sourcesource.md#close)* -*Defined in [lib/source-destination/source-destination.ts:368](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L368)* +*Defined in [lib/source-destination/source-destination.ts:391](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L391)* **Returns:** *Promise‹void›* @@ -418,7 +420,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[createReadStream](sourcesource.md#createreadstream)* -*Defined in [lib/source-destination/source-destination.ts:333](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L333)* +*Defined in [lib/source-destination/source-destination.ts:356](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L356)* **Parameters:** @@ -438,7 +440,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[createSparseReadStream](sourcesource.md#createsparsereadstream)* -*Defined in [lib/source-destination/source-destination.ts:339](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L339)* +*Defined in [lib/source-destination/source-destination.ts:362](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L362)* **Parameters:** @@ -456,7 +458,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[createSparseWriteStream](sourcesource.md#createsparsewritestream)* -*Defined in [lib/source-destination/source-destination.ts:355](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L355)* +*Defined in [lib/source-destination/source-destination.ts:378](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L378)* **Parameters:** @@ -478,7 +480,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[createVerifier](sourcesource.md#createverifier)* -*Defined in [lib/source-destination/source-destination.ts:383](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L383)* +*Defined in [lib/source-destination/source-destination.ts:406](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L406)* **Parameters:** @@ -497,7 +499,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[createWriteStream](sourcesource.md#createwritestream)* -*Defined in [lib/source-destination/source-destination.ts:349](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L349)* +*Defined in [lib/source-destination/source-destination.ts:372](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L372)* **Parameters:** @@ -521,7 +523,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[emit](../interfaces/sparsereadable.md#emit)* -Defined in node_modules/@types/node/base.d.ts:908 +Defined in node_modules/@types/node/events.d.ts:32 **Parameters:** @@ -544,7 +546,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[eventNames](../interfaces/sparsereadable.md#eventnames)* -Defined in node_modules/@types/node/base.d.ts:909 +Defined in node_modules/@types/node/events.d.ts:33 **Returns:** *Array‹string | symbol›* @@ -558,7 +560,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[getAlignment](sourcesource.md#getalignment)* -*Defined in [lib/source-destination/source-destination.ts:276](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L276)* +*Defined in [lib/source-destination/source-destination.ts:299](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L299)* **Returns:** *number | undefined* @@ -572,7 +574,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[getBlocks](sourcesource.md#getblocks)* -*Defined in [lib/source-destination/source-destination.ts:345](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L345)* +*Defined in [lib/source-destination/source-destination.ts:368](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L368)* **Returns:** *Promise‹[BlocksWithChecksum](../interfaces/blockswithchecksum.md)[]›* @@ -586,7 +588,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[getInnerSource](sourcesource.md#getinnersource)* -*Defined in [lib/source-destination/source-destination.ts:452](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L452)* +*Defined in [lib/source-destination/source-destination.ts:475](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L475)* **Returns:** *Promise‹[SourceDestination](sourcedestination.md)›* @@ -602,7 +604,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[getMaxListeners](../interfaces/sparsereadable.md#getmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:906 +Defined in node_modules/@types/node/events.d.ts:29 **Returns:** *number* @@ -616,7 +618,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[getMetadata](sourcesource.md#getmetadata)* -*Defined in [lib/source-destination/source-destination.ts:304](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L304)* +*Defined in [lib/source-destination/source-destination.ts:327](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L327)* **Returns:** *Promise‹[Metadata](../interfaces/metadata.md)›* @@ -630,7 +632,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[getPartitionTable](sourcesource.md#getpartitiontable)* -*Defined in [lib/source-destination/source-destination.ts:473](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L473)* +*Defined in [lib/source-destination/source-destination.ts:496](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L496)* **Returns:** *Promise‹GetPartitionsResult | undefined›* @@ -646,7 +648,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[listenerCount](../interfaces/sparsereadable.md#listenercount)* -Defined in node_modules/@types/node/base.d.ts:910 +Defined in node_modules/@types/node/events.d.ts:34 **Parameters:** @@ -668,7 +670,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[listeners](../interfaces/sparsereadable.md#listeners)* -Defined in node_modules/@types/node/base.d.ts:907 +Defined in node_modules/@types/node/events.d.ts:30 **Parameters:** @@ -680,6 +682,34 @@ Name | Type | ___ +### off + +▸ **off**(`event`: string | symbol, `listener`: function): *this* + +*Inherited from [CountingWritable](countingwritable.md).[off](countingwritable.md#off)* + +*Overrides [SparseReadable](../interfaces/sparsereadable.md).[off](../interfaces/sparsereadable.md#off)* + +Defined in node_modules/@types/node/events.d.ts:26 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* + +**Parameters:** + +Name | Type | +------ | ------ | +`...args` | any[] | + +**Returns:** *this* + +___ + ### on ▸ **on**(`event`: string | symbol, `listener`: function): *this* @@ -688,7 +718,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[on](../interfaces/sparsereadable.md#on)* -Defined in node_modules/@types/node/base.d.ts:899 +Defined in node_modules/@types/node/events.d.ts:21 **Parameters:** @@ -716,7 +746,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[once](../interfaces/sparsereadable.md#once)* -Defined in node_modules/@types/node/base.d.ts:900 +Defined in node_modules/@types/node/events.d.ts:22 **Parameters:** @@ -744,7 +774,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[open](sourcesource.md#open)* -*Defined in [lib/source-destination/source-destination.ts:361](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L361)* +*Defined in [lib/source-destination/source-destination.ts:384](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L384)* **Returns:** *Promise‹void›* @@ -758,7 +788,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[prependListener](../interfaces/sparsereadable.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:901 +Defined in node_modules/@types/node/events.d.ts:23 **Parameters:** @@ -786,7 +816,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[prependOnceListener](../interfaces/sparsereadable.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:902 +Defined in node_modules/@types/node/events.d.ts:24 **Parameters:** @@ -806,6 +836,28 @@ Name | Type | ___ +### rawListeners + +▸ **rawListeners**(`event`: string | symbol): *Function[]* + +*Implementation of [AdapterSourceDestination](../interfaces/adaptersourcedestination.md)* + +*Inherited from [CountingWritable](countingwritable.md).[rawListeners](countingwritable.md#rawlisteners)* + +*Overrides [SparseReadable](../interfaces/sparsereadable.md).[rawListeners](../interfaces/sparsereadable.md#rawlisteners)* + +Defined in node_modules/@types/node/events.d.ts:31 + +**Parameters:** + +Name | Type | +------ | ------ | +`event` | string | symbol | + +**Returns:** *Function[]* + +___ + ### read ▸ **read**(`_buffer`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer), `_bufferOffset`: number, `_length`: number, `_sourceOffset`: number): *Promise‹ReadResult›* @@ -814,7 +866,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[read](sourcesource.md#read)* -*Defined in [lib/source-destination/source-destination.ts:315](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L315)* +*Defined in [lib/source-destination/source-destination.ts:338](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L338)* **Parameters:** @@ -839,7 +891,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[removeAllListeners](../interfaces/sparsereadable.md#removealllisteners)* -Defined in node_modules/@types/node/base.d.ts:904 +Defined in node_modules/@types/node/events.d.ts:27 **Parameters:** @@ -859,7 +911,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[removeListener](../interfaces/sparsereadable.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:903 +Defined in node_modules/@types/node/events.d.ts:25 **Parameters:** @@ -889,7 +941,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[setMaxListeners](../interfaces/sparsereadable.md#setmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:905 +Defined in node_modules/@types/node/events.d.ts:28 **Parameters:** @@ -909,7 +961,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[write](sourcesource.md#write)* -*Defined in [lib/source-destination/source-destination.ts:324](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L324)* +*Defined in [lib/source-destination/source-destination.ts:347](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L347)* **Parameters:** @@ -932,7 +984,9 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[listenerCount](countingwritable.md#static-listenercount)* -Defined in node_modules/@types/node/base.d.ts:895 +Defined in node_modules/@types/node/events.d.ts:17 + +**`deprecated`** since v4.0.0 **Parameters:** @@ -953,7 +1007,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[register](sourcesource.md#static-register)* -*Defined in [lib/source-destination/source-destination.ts:270](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L270)* +*Defined in [lib/source-destination/source-destination.ts:293](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L293)* **Parameters:** diff --git a/doc/classes/driverlessdeviceadapter_.md b/doc/classes/driverlessdeviceadapter_.md index ccd7d4b0..f6e3bed9 100644 --- a/doc/classes/driverlessdeviceadapter_.md +++ b/doc/classes/driverlessdeviceadapter_.md @@ -27,10 +27,12 @@ * [listDrives](driverlessdeviceadapter_.md#private-listdrives) * [listenerCount](driverlessdeviceadapter_.md#listenercount) * [listeners](driverlessdeviceadapter_.md#listeners) +* [off](driverlessdeviceadapter_.md#off) * [on](driverlessdeviceadapter_.md#on) * [once](driverlessdeviceadapter_.md#once) * [prependListener](driverlessdeviceadapter_.md#prependlistener) * [prependOnceListener](driverlessdeviceadapter_.md#prependoncelistener) +* [rawListeners](driverlessdeviceadapter_.md#rawlisteners) * [removeAllListeners](driverlessdeviceadapter_.md#removealllisteners) * [removeListener](driverlessdeviceadapter_.md#removelistener) * [scan](driverlessdeviceadapter_.md#private-scan) @@ -46,7 +48,7 @@ • **drives**: *Map‹string, [DriverlessDevice](driverlessdevice.md)›* = new Map() -*Defined in [lib/scanner/adapters/driverless.ts:30](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/scanner/adapters/driverless.ts#L30)* +*Defined in [lib/scanner/adapters/driverless.ts:30](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/scanner/adapters/driverless.ts#L30)* ___ @@ -54,7 +56,7 @@ ___ • **listDriverlessDevices**: *any* -*Defined in [lib/scanner/adapters/driverless.ts:33](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/scanner/adapters/driverless.ts#L33)* +*Defined in [lib/scanner/adapters/driverless.ts:33](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/scanner/adapters/driverless.ts#L33)* ___ @@ -62,7 +64,7 @@ ___ • **ready**: *boolean* = false -*Defined in [lib/scanner/adapters/driverless.ts:32](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/scanner/adapters/driverless.ts#L32)* +*Defined in [lib/scanner/adapters/driverless.ts:32](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/scanner/adapters/driverless.ts#L32)* ___ @@ -70,7 +72,7 @@ ___ • **running**: *boolean* = false -*Defined in [lib/scanner/adapters/driverless.ts:31](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/scanner/adapters/driverless.ts#L31)* +*Defined in [lib/scanner/adapters/driverless.ts:31](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/scanner/adapters/driverless.ts#L31)* ___ @@ -80,7 +82,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[defaultMaxListeners](countingwritable.md#static-defaultmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:896 +Defined in node_modules/@types/node/events.d.ts:18 ## Methods @@ -92,7 +94,7 @@ Defined in node_modules/@types/node/base.d.ts:896 *Overrides [SparseReadable](../interfaces/sparsereadable.md).[addListener](../interfaces/sparsereadable.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:898 +Defined in node_modules/@types/node/events.d.ts:20 **Parameters:** @@ -120,7 +122,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[emit](../interfaces/sparsereadable.md#emit)* -Defined in node_modules/@types/node/base.d.ts:908 +Defined in node_modules/@types/node/events.d.ts:32 **Parameters:** @@ -141,7 +143,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[eventNames](../interfaces/sparsereadable.md#eventnames)* -Defined in node_modules/@types/node/base.d.ts:909 +Defined in node_modules/@types/node/events.d.ts:33 **Returns:** *Array‹string | symbol›* @@ -155,7 +157,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[getMaxListeners](../interfaces/sparsereadable.md#getmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:906 +Defined in node_modules/@types/node/events.d.ts:29 **Returns:** *number* @@ -165,7 +167,7 @@ ___ ▸ **listDrives**(): *Map‹string, WinUsbDriverlessDevice›* -*Defined in [lib/scanner/adapters/driverless.ts:88](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/scanner/adapters/driverless.ts#L88)* +*Defined in [lib/scanner/adapters/driverless.ts:88](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/scanner/adapters/driverless.ts#L88)* **Returns:** *Map‹string, WinUsbDriverlessDevice›* @@ -179,7 +181,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[listenerCount](../interfaces/sparsereadable.md#listenercount)* -Defined in node_modules/@types/node/base.d.ts:910 +Defined in node_modules/@types/node/events.d.ts:34 **Parameters:** @@ -199,7 +201,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[listeners](../interfaces/sparsereadable.md#listeners)* -Defined in node_modules/@types/node/base.d.ts:907 +Defined in node_modules/@types/node/events.d.ts:30 **Parameters:** @@ -211,6 +213,34 @@ Name | Type | ___ +### off + +▸ **off**(`event`: string | symbol, `listener`: function): *this* + +*Inherited from [CountingWritable](countingwritable.md).[off](countingwritable.md#off)* + +*Overrides [SparseReadable](../interfaces/sparsereadable.md).[off](../interfaces/sparsereadable.md#off)* + +Defined in node_modules/@types/node/events.d.ts:26 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* + +**Parameters:** + +Name | Type | +------ | ------ | +`...args` | any[] | + +**Returns:** *this* + +___ + ### on ▸ **on**(`event`: string | symbol, `listener`: function): *this* @@ -219,7 +249,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[on](../interfaces/sparsereadable.md#on)* -Defined in node_modules/@types/node/base.d.ts:899 +Defined in node_modules/@types/node/events.d.ts:21 **Parameters:** @@ -247,7 +277,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[once](../interfaces/sparsereadable.md#once)* -Defined in node_modules/@types/node/base.d.ts:900 +Defined in node_modules/@types/node/events.d.ts:22 **Parameters:** @@ -275,7 +305,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[prependListener](../interfaces/sparsereadable.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:901 +Defined in node_modules/@types/node/events.d.ts:23 **Parameters:** @@ -303,7 +333,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[prependOnceListener](../interfaces/sparsereadable.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:902 +Defined in node_modules/@types/node/events.d.ts:24 **Parameters:** @@ -323,6 +353,26 @@ Name | Type | ___ +### rawListeners + +▸ **rawListeners**(`event`: string | symbol): *Function[]* + +*Inherited from [CountingWritable](countingwritable.md).[rawListeners](countingwritable.md#rawlisteners)* + +*Overrides [SparseReadable](../interfaces/sparsereadable.md).[rawListeners](../interfaces/sparsereadable.md#rawlisteners)* + +Defined in node_modules/@types/node/events.d.ts:31 + +**Parameters:** + +Name | Type | +------ | ------ | +`event` | string | symbol | + +**Returns:** *Function[]* + +___ + ### removeAllListeners ▸ **removeAllListeners**(`event?`: string | symbol): *this* @@ -331,7 +381,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[removeAllListeners](../interfaces/sparsereadable.md#removealllisteners)* -Defined in node_modules/@types/node/base.d.ts:904 +Defined in node_modules/@types/node/events.d.ts:27 **Parameters:** @@ -351,7 +401,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[removeListener](../interfaces/sparsereadable.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:903 +Defined in node_modules/@types/node/events.d.ts:25 **Parameters:** @@ -375,7 +425,7 @@ ___ ▸ **scan**(): *void* -*Defined in [lib/scanner/adapters/driverless.ts:63](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/scanner/adapters/driverless.ts#L63)* +*Defined in [lib/scanner/adapters/driverless.ts:63](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/scanner/adapters/driverless.ts#L63)* **Returns:** *void* @@ -385,7 +435,7 @@ ___ ▸ **scanLoop**(): *Promise‹void›* -*Defined in [lib/scanner/adapters/driverless.ts:46](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/scanner/adapters/driverless.ts#L46)* +*Defined in [lib/scanner/adapters/driverless.ts:46](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/scanner/adapters/driverless.ts#L46)* **Returns:** *Promise‹void›* @@ -399,7 +449,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[setMaxListeners](../interfaces/sparsereadable.md#setmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:905 +Defined in node_modules/@types/node/events.d.ts:28 **Parameters:** @@ -417,7 +467,7 @@ ___ *Overrides [Adapter](adapter.md).[start](adapter.md#abstract-start)* -*Defined in [lib/scanner/adapters/driverless.ts:35](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/scanner/adapters/driverless.ts#L35)* +*Defined in [lib/scanner/adapters/driverless.ts:35](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/scanner/adapters/driverless.ts#L35)* **Returns:** *void* @@ -429,7 +479,7 @@ ___ *Overrides [Adapter](adapter.md).[stop](adapter.md#abstract-stop)* -*Defined in [lib/scanner/adapters/driverless.ts:40](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/scanner/adapters/driverless.ts#L40)* +*Defined in [lib/scanner/adapters/driverless.ts:40](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/scanner/adapters/driverless.ts#L40)* **Returns:** *void* @@ -441,7 +491,9 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[listenerCount](countingwritable.md#static-listenercount)* -Defined in node_modules/@types/node/base.d.ts:895 +Defined in node_modules/@types/node/events.d.ts:17 + +**`deprecated`** since v4.0.0 **Parameters:** diff --git a/doc/classes/file.md b/doc/classes/file.md index 5d829809..50b19579 100644 --- a/doc/classes/file.md +++ b/doc/classes/file.md @@ -18,7 +18,7 @@ ### Properties -* [fd](file.md#protected-fd) +* [fileHandle](file.md#protected-filehandle) * [oWrite](file.md#owrite) * [path](file.md#path) * [defaultMaxListeners](file.md#static-defaultmaxlisteners) @@ -54,11 +54,13 @@ * [getPartitionTable](file.md#getpartitiontable) * [listenerCount](file.md#listenercount) * [listeners](file.md#listeners) +* [off](file.md#off) * [on](file.md#on) * [once](file.md#once) * [open](file.md#open) * [prependListener](file.md#prependlistener) * [prependOnceListener](file.md#prependoncelistener) +* [rawListeners](file.md#rawlisteners) * [read](file.md#read) * [removeAllListeners](file.md#removealllisteners) * [removeListener](file.md#removelistener) @@ -72,26 +74,28 @@ ### constructor -\+ **new File**(`path`: string, `oWrite`: boolean): *[File](file.md)* +\+ **new File**(`__namedParameters`: object): *[File](file.md)* -*Defined in [lib/source-destination/file.ts:51](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/file.ts#L51)* +*Defined in [lib/source-destination/file.ts:54](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/file.ts#L54)* **Parameters:** +▪ **__namedParameters**: *object* + Name | Type | Default | ------ | ------ | ------ | `path` | string | - | -`oWrite` | boolean | false | +`write` | boolean | false | **Returns:** *[File](file.md)* ## Properties -### `Protected` fd +### `Protected` fileHandle -• **fd**: *number* +• **fileHandle**: *fs.FileHandle* -*Defined in [lib/source-destination/file.ts:51](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/file.ts#L51)* +*Defined in [lib/source-destination/file.ts:54](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/file.ts#L54)* ___ @@ -99,7 +103,7 @@ ___ • **oWrite**: *boolean* -*Defined in [lib/source-destination/file.ts:53](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/file.ts#L53)* +*Defined in [lib/source-destination/file.ts:53](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/file.ts#L53)* ___ @@ -107,7 +111,7 @@ ___ • **path**: *string* -*Defined in [lib/source-destination/file.ts:53](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/file.ts#L53)* +*Defined in [lib/source-destination/file.ts:52](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/file.ts#L52)* ___ @@ -117,7 +121,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[defaultMaxListeners](countingwritable.md#static-defaultmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:896 +Defined in node_modules/@types/node/events.d.ts:18 ___ @@ -138,7 +142,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[imageExtensions](sourcesource.md#static-imageextensions)* -*Defined in [lib/source-destination/source-destination.ts:252](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L252)* +*Defined in [lib/source-destination/source-destination.ts:275](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L275)* ___ @@ -148,7 +152,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[mimetype](sourcesource.md#static-optional-mimetype)* -*Defined in [lib/source-destination/source-destination.ts:264](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L264)* +*Defined in [lib/source-destination/source-destination.ts:287](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L287)* ## Methods @@ -158,7 +162,7 @@ ___ *Overrides [SourceDestination](sourcedestination.md).[_close](sourcedestination.md#protected-_close)* -*Defined in [lib/source-destination/file.ts:184](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/file.ts#L184)* +*Defined in [lib/source-destination/file.ts:234](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/file.ts#L234)* **Returns:** *Promise‹void›* @@ -170,7 +174,7 @@ ___ *Overrides [SourceSource](sourcesource.md).[_getMetadata](sourcesource.md#protected-_getmetadata)* -*Defined in [lib/source-destination/file.ts:81](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/file.ts#L81)* +*Defined in [lib/source-destination/file.ts:86](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/file.ts#L86)* **Returns:** *Promise‹[Metadata](../interfaces/metadata.md)›* @@ -182,7 +186,7 @@ ___ *Overrides [SourceDestination](sourcedestination.md).[_open](sourcedestination.md#protected-_open)* -*Defined in [lib/source-destination/file.ts:180](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/file.ts#L180)* +*Defined in [lib/source-destination/file.ts:230](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/file.ts#L230)* **Returns:** *Promise‹void›* @@ -196,7 +200,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[addListener](../interfaces/sparsereadable.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:898 +Defined in node_modules/@types/node/events.d.ts:20 **Parameters:** @@ -222,7 +226,7 @@ ___ *Overrides [SourceSource](sourcesource.md).[canCreateReadStream](sourcesource.md#cancreatereadstream)* -*Defined in [lib/source-destination/file.ts:69](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/file.ts#L69)* +*Defined in [lib/source-destination/file.ts:74](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/file.ts#L74)* **Returns:** *Promise‹boolean›* @@ -234,7 +238,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[canCreateSparseReadStream](sourcesource.md#cancreatesparsereadstream)* -*Defined in [lib/source-destination/source-destination.ts:292](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L292)* +*Defined in [lib/source-destination/source-destination.ts:315](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L315)* **Returns:** *Promise‹boolean›* @@ -246,7 +250,7 @@ ___ *Overrides [SourceSource](sourcesource.md).[canCreateSparseWriteStream](sourcesource.md#cancreatesparsewritestream)* -*Defined in [lib/source-destination/file.ts:77](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/file.ts#L77)* +*Defined in [lib/source-destination/file.ts:82](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/file.ts#L82)* **Returns:** *Promise‹boolean›* @@ -258,7 +262,7 @@ ___ *Overrides [SourceSource](sourcesource.md).[canCreateWriteStream](sourcesource.md#cancreatewritestream)* -*Defined in [lib/source-destination/file.ts:73](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/file.ts#L73)* +*Defined in [lib/source-destination/file.ts:78](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/file.ts#L78)* **Returns:** *Promise‹boolean›* @@ -270,7 +274,7 @@ ___ *Overrides [SourceSource](sourcesource.md).[canRead](sourcesource.md#canread)* -*Defined in [lib/source-destination/file.ts:61](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/file.ts#L61)* +*Defined in [lib/source-destination/file.ts:66](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/file.ts#L66)* **Returns:** *Promise‹boolean›* @@ -282,7 +286,7 @@ ___ *Overrides [SourceSource](sourcesource.md).[canWrite](sourcesource.md#canwrite)* -*Defined in [lib/source-destination/file.ts:65](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/file.ts#L65)* +*Defined in [lib/source-destination/file.ts:70](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/file.ts#L70)* **Returns:** *Promise‹boolean›* @@ -294,7 +298,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[close](sourcesource.md#close)* -*Defined in [lib/source-destination/source-destination.ts:368](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L368)* +*Defined in [lib/source-destination/source-destination.ts:391](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L391)* **Returns:** *Promise‹void›* @@ -306,7 +310,7 @@ ___ *Overrides [SourceSource](sourcesource.md).[createReadStream](sourcesource.md#createreadstream)* -*Defined in [lib/source-destination/file.ts:117](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/file.ts#L117)* +*Defined in [lib/source-destination/file.ts:167](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/file.ts#L167)* **Parameters:** @@ -330,7 +334,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[createSparseReadStream](sourcesource.md#createsparsereadstream)* -*Defined in [lib/source-destination/source-destination.ts:339](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L339)* +*Defined in [lib/source-destination/source-destination.ts:362](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L362)* **Parameters:** @@ -348,7 +352,7 @@ ___ *Overrides [SourceSource](sourcesource.md).[createSparseWriteStream](sourcesource.md#createsparsewritestream)* -*Defined in [lib/source-destination/file.ts:169](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/file.ts#L169)* +*Defined in [lib/source-destination/file.ts:219](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/file.ts#L219)* **Parameters:** @@ -368,7 +372,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[createVerifier](sourcesource.md#createverifier)* -*Defined in [lib/source-destination/source-destination.ts:383](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L383)* +*Defined in [lib/source-destination/source-destination.ts:406](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L406)* **Parameters:** @@ -387,7 +391,7 @@ ___ *Overrides [SourceSource](sourcesource.md).[createWriteStream](sourcesource.md#createwritestream)* -*Defined in [lib/source-destination/file.ts:155](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/file.ts#L155)* +*Defined in [lib/source-destination/file.ts:205](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/file.ts#L205)* **Parameters:** @@ -409,7 +413,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[emit](../interfaces/sparsereadable.md#emit)* -Defined in node_modules/@types/node/base.d.ts:908 +Defined in node_modules/@types/node/events.d.ts:32 **Parameters:** @@ -430,7 +434,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[eventNames](../interfaces/sparsereadable.md#eventnames)* -Defined in node_modules/@types/node/base.d.ts:909 +Defined in node_modules/@types/node/events.d.ts:33 **Returns:** *Array‹string | symbol›* @@ -442,7 +446,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[getAlignment](sourcesource.md#getalignment)* -*Defined in [lib/source-destination/source-destination.ts:276](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L276)* +*Defined in [lib/source-destination/source-destination.ts:299](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L299)* **Returns:** *number | undefined* @@ -454,7 +458,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[getBlocks](sourcesource.md#getblocks)* -*Defined in [lib/source-destination/source-destination.ts:345](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L345)* +*Defined in [lib/source-destination/source-destination.ts:368](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L368)* **Returns:** *Promise‹[BlocksWithChecksum](../interfaces/blockswithchecksum.md)[]›* @@ -466,7 +470,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[getInnerSource](sourcesource.md#getinnersource)* -*Defined in [lib/source-destination/source-destination.ts:452](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L452)* +*Defined in [lib/source-destination/source-destination.ts:475](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L475)* **Returns:** *Promise‹[SourceDestination](sourcedestination.md)›* @@ -480,7 +484,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[getMaxListeners](../interfaces/sparsereadable.md#getmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:906 +Defined in node_modules/@types/node/events.d.ts:29 **Returns:** *number* @@ -492,7 +496,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[getMetadata](sourcesource.md#getmetadata)* -*Defined in [lib/source-destination/source-destination.ts:304](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L304)* +*Defined in [lib/source-destination/source-destination.ts:327](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L327)* **Returns:** *Promise‹[Metadata](../interfaces/metadata.md)›* @@ -502,7 +506,7 @@ ___ ▸ **getOpenFlags**(): *number* -*Defined in [lib/source-destination/file.ts:57](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/file.ts#L57)* +*Defined in [lib/source-destination/file.ts:62](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/file.ts#L62)* **Returns:** *number* @@ -514,7 +518,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[getPartitionTable](sourcesource.md#getpartitiontable)* -*Defined in [lib/source-destination/source-destination.ts:473](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L473)* +*Defined in [lib/source-destination/source-destination.ts:496](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L496)* **Returns:** *Promise‹GetPartitionsResult | undefined›* @@ -528,7 +532,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[listenerCount](../interfaces/sparsereadable.md#listenercount)* -Defined in node_modules/@types/node/base.d.ts:910 +Defined in node_modules/@types/node/events.d.ts:34 **Parameters:** @@ -548,7 +552,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[listeners](../interfaces/sparsereadable.md#listeners)* -Defined in node_modules/@types/node/base.d.ts:907 +Defined in node_modules/@types/node/events.d.ts:30 **Parameters:** @@ -560,6 +564,34 @@ Name | Type | ___ +### off + +▸ **off**(`event`: string | symbol, `listener`: function): *this* + +*Inherited from [CountingWritable](countingwritable.md).[off](countingwritable.md#off)* + +*Overrides [SparseReadable](../interfaces/sparsereadable.md).[off](../interfaces/sparsereadable.md#off)* + +Defined in node_modules/@types/node/events.d.ts:26 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* + +**Parameters:** + +Name | Type | +------ | ------ | +`...args` | any[] | + +**Returns:** *this* + +___ + ### on ▸ **on**(`event`: string | symbol, `listener`: function): *this* @@ -568,7 +600,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[on](../interfaces/sparsereadable.md#on)* -Defined in node_modules/@types/node/base.d.ts:899 +Defined in node_modules/@types/node/events.d.ts:21 **Parameters:** @@ -596,7 +628,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[once](../interfaces/sparsereadable.md#once)* -Defined in node_modules/@types/node/base.d.ts:900 +Defined in node_modules/@types/node/events.d.ts:22 **Parameters:** @@ -622,7 +654,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[open](sourcesource.md#open)* -*Defined in [lib/source-destination/source-destination.ts:361](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L361)* +*Defined in [lib/source-destination/source-destination.ts:384](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L384)* **Returns:** *Promise‹void›* @@ -636,7 +668,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[prependListener](../interfaces/sparsereadable.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:901 +Defined in node_modules/@types/node/events.d.ts:23 **Parameters:** @@ -664,7 +696,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[prependOnceListener](../interfaces/sparsereadable.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:902 +Defined in node_modules/@types/node/events.d.ts:24 **Parameters:** @@ -684,13 +716,33 @@ Name | Type | ___ +### rawListeners + +▸ **rawListeners**(`event`: string | symbol): *Function[]* + +*Inherited from [CountingWritable](countingwritable.md).[rawListeners](countingwritable.md#rawlisteners)* + +*Overrides [SparseReadable](../interfaces/sparsereadable.md).[rawListeners](../interfaces/sparsereadable.md#rawlisteners)* + +Defined in node_modules/@types/node/events.d.ts:31 + +**Parameters:** + +Name | Type | +------ | ------ | +`event` | string | symbol | + +**Returns:** *Function[]* + +___ + ### read ▸ **read**(`buffer`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer), `bufferOffset`: number, `length`: number, `sourceOffset`: number): *Promise‹ReadResult›* *Overrides [SourceSource](sourcesource.md).[read](sourcesource.md#read)* -*Defined in [lib/source-destination/file.ts:88](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/file.ts#L88)* +*Defined in [lib/source-destination/file.ts:93](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/file.ts#L93)* **Parameters:** @@ -713,7 +765,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[removeAllListeners](../interfaces/sparsereadable.md#removealllisteners)* -Defined in node_modules/@types/node/base.d.ts:904 +Defined in node_modules/@types/node/events.d.ts:27 **Parameters:** @@ -733,7 +785,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[removeListener](../interfaces/sparsereadable.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:903 +Defined in node_modules/@types/node/events.d.ts:25 **Parameters:** @@ -761,7 +813,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[setMaxListeners](../interfaces/sparsereadable.md#setmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:905 +Defined in node_modules/@types/node/events.d.ts:28 **Parameters:** @@ -777,7 +829,7 @@ ___ ▸ **streamOptions**(`start?`: undefined | number, `end?`: undefined | number): *object* -*Defined in [lib/source-destination/file.ts:106](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/file.ts#L106)* +*Defined in [lib/source-destination/file.ts:156](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/file.ts#L156)* **Parameters:** @@ -792,7 +844,7 @@ Name | Type | * **end**: *undefined | number* -* **fd**: *number* = this.fd +* **fd**: *number* = this.fileHandle.fd * **highWaterMark**: *number* = CHUNK_SIZE @@ -806,7 +858,7 @@ ___ *Overrides [SourceSource](sourcesource.md).[write](sourcesource.md#write)* -*Defined in [lib/source-destination/file.ts:97](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/file.ts#L97)* +*Defined in [lib/source-destination/file.ts:142](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/file.ts#L142)* **Parameters:** @@ -827,7 +879,9 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[listenerCount](countingwritable.md#static-listenercount)* -Defined in node_modules/@types/node/base.d.ts:895 +Defined in node_modules/@types/node/events.d.ts:17 + +**`deprecated`** since v4.0.0 **Parameters:** @@ -846,7 +900,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[register](sourcesource.md#static-register)* -*Defined in [lib/source-destination/source-destination.ts:270](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L270)* +*Defined in [lib/source-destination/source-destination.ts:293](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L293)* **Parameters:** diff --git a/doc/classes/gzipsource.md b/doc/classes/gzipsource.md index e06efd38..c6364598 100644 --- a/doc/classes/gzipsource.md +++ b/doc/classes/gzipsource.md @@ -53,11 +53,13 @@ * [getSize](gzipsource.md#protected-getsize) * [listenerCount](gzipsource.md#listenercount) * [listeners](gzipsource.md#listeners) +* [off](gzipsource.md#off) * [on](gzipsource.md#on) * [once](gzipsource.md#once) * [open](gzipsource.md#open) * [prependListener](gzipsource.md#prependlistener) * [prependOnceListener](gzipsource.md#prependoncelistener) +* [rawListeners](gzipsource.md#rawlisteners) * [read](gzipsource.md#read) * [removeAllListeners](gzipsource.md#removealllisteners) * [removeListener](gzipsource.md#removelistener) @@ -74,7 +76,7 @@ *Inherited from [SourceSource](sourcesource.md).[constructor](sourcesource.md#constructor)* -*Defined in [lib/source-destination/source-source.ts:20](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-source.ts#L20)* +*Defined in [lib/source-destination/source-source.ts:20](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-source.ts#L20)* **Parameters:** @@ -92,7 +94,7 @@ Name | Type | *Overrides [CompressedSource](compressedsource.md).[isSizeEstimated](compressedsource.md#protected-issizeestimated)* -*Defined in [lib/source-destination/gzip.ts:27](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/gzip.ts#L27)* +*Defined in [lib/source-destination/gzip.ts:27](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/gzip.ts#L27)* ___ @@ -102,7 +104,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[source](sourcesource.md#protected-source)* -*Defined in [lib/source-destination/source-source.ts:22](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-source.ts#L22)* +*Defined in [lib/source-destination/source-source.ts:22](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-source.ts#L22)* ___ @@ -112,7 +114,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[defaultMaxListeners](countingwritable.md#static-defaultmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:896 +Defined in node_modules/@types/node/events.d.ts:18 ___ @@ -133,7 +135,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[imageExtensions](sourcesource.md#static-imageextensions)* -*Defined in [lib/source-destination/source-destination.ts:252](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L252)* +*Defined in [lib/source-destination/source-destination.ts:275](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L275)* ___ @@ -143,7 +145,7 @@ ___ *Overrides [SourceSource](sourcesource.md).[mimetype](sourcesource.md#static-optional-mimetype)* -*Defined in [lib/source-destination/gzip.ts:26](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/gzip.ts#L26)* +*Defined in [lib/source-destination/gzip.ts:26](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/gzip.ts#L26)* ___ @@ -153,7 +155,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[requiresRandomReadableSource](sourcesource.md#static-requiresrandomreadablesource)* -*Defined in [lib/source-destination/source-source.ts:20](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-source.ts#L20)* +*Defined in [lib/source-destination/source-source.ts:20](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-source.ts#L20)* ## Methods @@ -165,7 +167,7 @@ ___ *Overrides [SourceDestination](sourcedestination.md).[_close](sourcedestination.md#protected-_close)* -*Defined in [lib/source-destination/source-source.ts:30](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-source.ts#L30)* +*Defined in [lib/source-destination/source-source.ts:30](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-source.ts#L30)* **Returns:** *Promise‹void›* @@ -179,7 +181,7 @@ ___ *Overrides [SourceSource](sourcesource.md).[_getMetadata](sourcesource.md#protected-_getmetadata)* -*Defined in [lib/source-destination/compressed-source.ts:85](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/compressed-source.ts#L85)* +*Defined in [lib/source-destination/compressed-source.ts:85](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/compressed-source.ts#L85)* **Returns:** *Promise‹[Metadata](../interfaces/metadata.md)›* @@ -193,7 +195,7 @@ ___ *Overrides [SourceDestination](sourcedestination.md).[_open](sourcedestination.md#protected-_open)* -*Defined in [lib/source-destination/source-source.ts:26](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-source.ts#L26)* +*Defined in [lib/source-destination/source-source.ts:26](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-source.ts#L26)* **Returns:** *Promise‹void›* @@ -207,7 +209,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[addListener](../interfaces/sparsereadable.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:898 +Defined in node_modules/@types/node/events.d.ts:20 **Parameters:** @@ -235,7 +237,7 @@ ___ *Overrides [SourceSource](sourcesource.md).[canCreateReadStream](sourcesource.md#cancreatereadstream)* -*Defined in [lib/source-destination/compressed-source.ts:51](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/compressed-source.ts#L51)* +*Defined in [lib/source-destination/compressed-source.ts:51](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/compressed-source.ts#L51)* **Returns:** *Promise‹boolean›* @@ -247,7 +249,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[canCreateSparseReadStream](sourcesource.md#cancreatesparsereadstream)* -*Defined in [lib/source-destination/source-destination.ts:292](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L292)* +*Defined in [lib/source-destination/source-destination.ts:315](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L315)* **Returns:** *Promise‹boolean›* @@ -259,7 +261,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[canCreateSparseWriteStream](sourcesource.md#cancreatesparsewritestream)* -*Defined in [lib/source-destination/source-destination.ts:300](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L300)* +*Defined in [lib/source-destination/source-destination.ts:323](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L323)* **Returns:** *Promise‹boolean›* @@ -271,7 +273,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[canCreateWriteStream](sourcesource.md#cancreatewritestream)* -*Defined in [lib/source-destination/source-destination.ts:296](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L296)* +*Defined in [lib/source-destination/source-destination.ts:319](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L319)* **Returns:** *Promise‹boolean›* @@ -283,7 +285,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[canRead](sourcesource.md#canread)* -*Defined in [lib/source-destination/source-destination.ts:280](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L280)* +*Defined in [lib/source-destination/source-destination.ts:303](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L303)* **Returns:** *Promise‹boolean›* @@ -295,7 +297,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[canWrite](sourcesource.md#canwrite)* -*Defined in [lib/source-destination/source-destination.ts:284](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L284)* +*Defined in [lib/source-destination/source-destination.ts:307](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L307)* **Returns:** *Promise‹boolean›* @@ -307,7 +309,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[close](sourcesource.md#close)* -*Defined in [lib/source-destination/source-destination.ts:368](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L368)* +*Defined in [lib/source-destination/source-destination.ts:391](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L391)* **Returns:** *Promise‹void›* @@ -321,7 +323,7 @@ ___ *Overrides [SourceSource](sourcesource.md).[createReadStream](sourcesource.md#createreadstream)* -*Defined in [lib/source-destination/compressed-source.ts:55](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/compressed-source.ts#L55)* +*Defined in [lib/source-destination/compressed-source.ts:55](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/compressed-source.ts#L55)* **Parameters:** @@ -343,7 +345,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[createSparseReadStream](sourcesource.md#createsparsereadstream)* -*Defined in [lib/source-destination/source-destination.ts:339](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L339)* +*Defined in [lib/source-destination/source-destination.ts:362](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L362)* **Parameters:** @@ -361,7 +363,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[createSparseWriteStream](sourcesource.md#createsparsewritestream)* -*Defined in [lib/source-destination/source-destination.ts:355](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L355)* +*Defined in [lib/source-destination/source-destination.ts:378](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L378)* **Parameters:** @@ -381,7 +383,7 @@ ___ *Overrides [CompressedSource](compressedsource.md).[createTransform](compressedsource.md#protected-abstract-createtransform)* -*Defined in [lib/source-destination/gzip.ts:29](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/gzip.ts#L29)* +*Defined in [lib/source-destination/gzip.ts:29](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/gzip.ts#L29)* **Returns:** *Transform* @@ -393,7 +395,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[createVerifier](sourcesource.md#createverifier)* -*Defined in [lib/source-destination/source-destination.ts:383](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L383)* +*Defined in [lib/source-destination/source-destination.ts:406](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L406)* **Parameters:** @@ -412,7 +414,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[createWriteStream](sourcesource.md#createwritestream)* -*Defined in [lib/source-destination/source-destination.ts:349](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L349)* +*Defined in [lib/source-destination/source-destination.ts:372](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L372)* **Parameters:** @@ -434,7 +436,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[emit](../interfaces/sparsereadable.md#emit)* -Defined in node_modules/@types/node/base.d.ts:908 +Defined in node_modules/@types/node/events.d.ts:32 **Parameters:** @@ -455,7 +457,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[eventNames](../interfaces/sparsereadable.md#eventnames)* -Defined in node_modules/@types/node/base.d.ts:909 +Defined in node_modules/@types/node/events.d.ts:33 **Returns:** *Array‹string | symbol›* @@ -467,7 +469,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[getAlignment](sourcesource.md#getalignment)* -*Defined in [lib/source-destination/source-destination.ts:276](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L276)* +*Defined in [lib/source-destination/source-destination.ts:299](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L299)* **Returns:** *number | undefined* @@ -479,7 +481,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[getBlocks](sourcesource.md#getblocks)* -*Defined in [lib/source-destination/source-destination.ts:345](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L345)* +*Defined in [lib/source-destination/source-destination.ts:368](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L368)* **Returns:** *Promise‹[BlocksWithChecksum](../interfaces/blockswithchecksum.md)[]›* @@ -491,7 +493,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[getInnerSource](sourcesource.md#getinnersource)* -*Defined in [lib/source-destination/source-destination.ts:452](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L452)* +*Defined in [lib/source-destination/source-destination.ts:475](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L475)* **Returns:** *Promise‹[SourceDestination](sourcedestination.md)›* @@ -505,7 +507,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[getMaxListeners](../interfaces/sparsereadable.md#getmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:906 +Defined in node_modules/@types/node/events.d.ts:29 **Returns:** *number* @@ -517,7 +519,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[getMetadata](sourcesource.md#getmetadata)* -*Defined in [lib/source-destination/source-destination.ts:304](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L304)* +*Defined in [lib/source-destination/source-destination.ts:327](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L327)* **Returns:** *Promise‹[Metadata](../interfaces/metadata.md)›* @@ -529,7 +531,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[getPartitionTable](sourcesource.md#getpartitiontable)* -*Defined in [lib/source-destination/source-destination.ts:473](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L473)* +*Defined in [lib/source-destination/source-destination.ts:496](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L496)* **Returns:** *Promise‹GetPartitionsResult | undefined›* @@ -541,7 +543,7 @@ ___ *Overrides [CompressedSource](compressedsource.md).[getSize](compressedsource.md#protected-getsize)* -*Defined in [lib/source-destination/gzip.ts:33](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/gzip.ts#L33)* +*Defined in [lib/source-destination/gzip.ts:33](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/gzip.ts#L33)* **Returns:** *Promise‹number | undefined›* @@ -555,7 +557,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[listenerCount](../interfaces/sparsereadable.md#listenercount)* -Defined in node_modules/@types/node/base.d.ts:910 +Defined in node_modules/@types/node/events.d.ts:34 **Parameters:** @@ -575,7 +577,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[listeners](../interfaces/sparsereadable.md#listeners)* -Defined in node_modules/@types/node/base.d.ts:907 +Defined in node_modules/@types/node/events.d.ts:30 **Parameters:** @@ -587,6 +589,34 @@ Name | Type | ___ +### off + +▸ **off**(`event`: string | symbol, `listener`: function): *this* + +*Inherited from [CountingWritable](countingwritable.md).[off](countingwritable.md#off)* + +*Overrides [SparseReadable](../interfaces/sparsereadable.md).[off](../interfaces/sparsereadable.md#off)* + +Defined in node_modules/@types/node/events.d.ts:26 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* + +**Parameters:** + +Name | Type | +------ | ------ | +`...args` | any[] | + +**Returns:** *this* + +___ + ### on ▸ **on**(`event`: string | symbol, `listener`: function): *this* @@ -595,7 +625,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[on](../interfaces/sparsereadable.md#on)* -Defined in node_modules/@types/node/base.d.ts:899 +Defined in node_modules/@types/node/events.d.ts:21 **Parameters:** @@ -623,7 +653,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[once](../interfaces/sparsereadable.md#once)* -Defined in node_modules/@types/node/base.d.ts:900 +Defined in node_modules/@types/node/events.d.ts:22 **Parameters:** @@ -649,7 +679,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[open](sourcesource.md#open)* -*Defined in [lib/source-destination/source-destination.ts:361](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L361)* +*Defined in [lib/source-destination/source-destination.ts:384](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L384)* **Returns:** *Promise‹void›* @@ -663,7 +693,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[prependListener](../interfaces/sparsereadable.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:901 +Defined in node_modules/@types/node/events.d.ts:23 **Parameters:** @@ -691,7 +721,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[prependOnceListener](../interfaces/sparsereadable.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:902 +Defined in node_modules/@types/node/events.d.ts:24 **Parameters:** @@ -711,13 +741,33 @@ Name | Type | ___ +### rawListeners + +▸ **rawListeners**(`event`: string | symbol): *Function[]* + +*Inherited from [CountingWritable](countingwritable.md).[rawListeners](countingwritable.md#rawlisteners)* + +*Overrides [SparseReadable](../interfaces/sparsereadable.md).[rawListeners](../interfaces/sparsereadable.md#rawlisteners)* + +Defined in node_modules/@types/node/events.d.ts:31 + +**Parameters:** + +Name | Type | +------ | ------ | +`event` | string | symbol | + +**Returns:** *Function[]* + +___ + ### read ▸ **read**(`_buffer`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer), `_bufferOffset`: number, `_length`: number, `_sourceOffset`: number): *Promise‹ReadResult›* *Inherited from [SourceSource](sourcesource.md).[read](sourcesource.md#read)* -*Defined in [lib/source-destination/source-destination.ts:315](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L315)* +*Defined in [lib/source-destination/source-destination.ts:338](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L338)* **Parameters:** @@ -740,7 +790,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[removeAllListeners](../interfaces/sparsereadable.md#removealllisteners)* -Defined in node_modules/@types/node/base.d.ts:904 +Defined in node_modules/@types/node/events.d.ts:27 **Parameters:** @@ -760,7 +810,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[removeListener](../interfaces/sparsereadable.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:903 +Defined in node_modules/@types/node/events.d.ts:25 **Parameters:** @@ -788,7 +838,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[setMaxListeners](../interfaces/sparsereadable.md#setmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:905 +Defined in node_modules/@types/node/events.d.ts:28 **Parameters:** @@ -806,7 +856,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[write](sourcesource.md#write)* -*Defined in [lib/source-destination/source-destination.ts:324](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L324)* +*Defined in [lib/source-destination/source-destination.ts:347](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L347)* **Parameters:** @@ -827,7 +877,9 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[listenerCount](countingwritable.md#static-listenercount)* -Defined in node_modules/@types/node/base.d.ts:895 +Defined in node_modules/@types/node/events.d.ts:17 + +**`deprecated`** since v4.0.0 **Parameters:** @@ -846,7 +898,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[register](sourcesource.md#static-register)* -*Defined in [lib/source-destination/source-destination.ts:270](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L270)* +*Defined in [lib/source-destination/source-destination.ts:293](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L293)* **Parameters:** diff --git a/doc/classes/http.md b/doc/classes/http.md index ed614d98..d100ee06 100644 --- a/doc/classes/http.md +++ b/doc/classes/http.md @@ -55,11 +55,13 @@ * [getRange](http.md#private-getrange) * [listenerCount](http.md#listenercount) * [listeners](http.md#listeners) +* [off](http.md#off) * [on](http.md#on) * [once](http.md#once) * [open](http.md#open) * [prependListener](http.md#prependlistener) * [prependOnceListener](http.md#prependoncelistener) +* [rawListeners](http.md#rawlisteners) * [read](http.md#read) * [removeAllListeners](http.md#removealllisteners) * [removeListener](http.md#removelistener) @@ -74,7 +76,7 @@ \+ **new Http**(`url`: string): *[Http](http.md)* -*Defined in [lib/source-destination/http.ts:39](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/http.ts#L39)* +*Defined in [lib/source-destination/http.ts:39](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/http.ts#L39)* **Parameters:** @@ -90,7 +92,7 @@ Name | Type | • **acceptsRange**: *boolean* -*Defined in [lib/source-destination/http.ts:37](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/http.ts#L37)* +*Defined in [lib/source-destination/http.ts:37](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/http.ts#L37)* ___ @@ -98,7 +100,7 @@ ___ • **error**: *[Error](notcapable.md#static-error)* -*Defined in [lib/source-destination/http.ts:39](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/http.ts#L39)* +*Defined in [lib/source-destination/http.ts:39](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/http.ts#L39)* ___ @@ -106,7 +108,7 @@ ___ • **ready**: *Promise‹void›* -*Defined in [lib/source-destination/http.ts:38](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/http.ts#L38)* +*Defined in [lib/source-destination/http.ts:38](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/http.ts#L38)* ___ @@ -114,7 +116,7 @@ ___ • **size**: *number* -*Defined in [lib/source-destination/http.ts:36](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/http.ts#L36)* +*Defined in [lib/source-destination/http.ts:36](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/http.ts#L36)* ___ @@ -122,7 +124,7 @@ ___ • **url**: *string* -*Defined in [lib/source-destination/http.ts:41](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/http.ts#L41)* +*Defined in [lib/source-destination/http.ts:41](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/http.ts#L41)* ___ @@ -132,7 +134,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[defaultMaxListeners](countingwritable.md#static-defaultmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:896 +Defined in node_modules/@types/node/events.d.ts:18 ___ @@ -153,7 +155,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[imageExtensions](sourcesource.md#static-imageextensions)* -*Defined in [lib/source-destination/source-destination.ts:252](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L252)* +*Defined in [lib/source-destination/source-destination.ts:275](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L275)* ___ @@ -163,7 +165,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[mimetype](sourcesource.md#static-optional-mimetype)* -*Defined in [lib/source-destination/source-destination.ts:264](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L264)* +*Defined in [lib/source-destination/source-destination.ts:287](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L287)* ## Methods @@ -173,7 +175,7 @@ ___ *Inherited from [SourceDestination](sourcedestination.md).[_close](sourcedestination.md#protected-_close)* -*Defined in [lib/source-destination/source-destination.ts:379](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L379)* +*Defined in [lib/source-destination/source-destination.ts:402](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L402)* **Returns:** *Promise‹void›* @@ -185,7 +187,7 @@ ___ *Overrides [SourceSource](sourcesource.md).[_getMetadata](sourcesource.md#protected-_getmetadata)* -*Defined in [lib/source-destination/http.ts:68](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/http.ts#L68)* +*Defined in [lib/source-destination/http.ts:68](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/http.ts#L68)* **Returns:** *Promise‹[Metadata](../interfaces/metadata.md)›* @@ -197,7 +199,7 @@ ___ *Inherited from [SourceDestination](sourcedestination.md).[_open](sourcedestination.md#protected-_open)* -*Defined in [lib/source-destination/source-destination.ts:375](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L375)* +*Defined in [lib/source-destination/source-destination.ts:398](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L398)* **Returns:** *Promise‹void›* @@ -211,7 +213,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[addListener](../interfaces/sparsereadable.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:898 +Defined in node_modules/@types/node/events.d.ts:20 **Parameters:** @@ -237,7 +239,7 @@ ___ *Overrides [SourceSource](sourcesource.md).[canCreateReadStream](sourcesource.md#cancreatereadstream)* -*Defined in [lib/source-destination/http.ts:64](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/http.ts#L64)* +*Defined in [lib/source-destination/http.ts:64](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/http.ts#L64)* **Returns:** *Promise‹boolean›* @@ -249,7 +251,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[canCreateSparseReadStream](sourcesource.md#cancreatesparsereadstream)* -*Defined in [lib/source-destination/source-destination.ts:292](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L292)* +*Defined in [lib/source-destination/source-destination.ts:315](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L315)* **Returns:** *Promise‹boolean›* @@ -261,7 +263,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[canCreateSparseWriteStream](sourcesource.md#cancreatesparsewritestream)* -*Defined in [lib/source-destination/source-destination.ts:300](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L300)* +*Defined in [lib/source-destination/source-destination.ts:323](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L323)* **Returns:** *Promise‹boolean›* @@ -273,7 +275,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[canCreateWriteStream](sourcesource.md#cancreatewritestream)* -*Defined in [lib/source-destination/source-destination.ts:296](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L296)* +*Defined in [lib/source-destination/source-destination.ts:319](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L319)* **Returns:** *Promise‹boolean›* @@ -285,7 +287,7 @@ ___ *Overrides [SourceSource](sourcesource.md).[canRead](sourcesource.md#canread)* -*Defined in [lib/source-destination/http.ts:56](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/http.ts#L56)* +*Defined in [lib/source-destination/http.ts:56](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/http.ts#L56)* **Returns:** *Promise‹boolean›* @@ -297,7 +299,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[canWrite](sourcesource.md#canwrite)* -*Defined in [lib/source-destination/source-destination.ts:284](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L284)* +*Defined in [lib/source-destination/source-destination.ts:307](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L307)* **Returns:** *Promise‹boolean›* @@ -309,7 +311,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[close](sourcesource.md#close)* -*Defined in [lib/source-destination/source-destination.ts:368](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L368)* +*Defined in [lib/source-destination/source-destination.ts:391](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L391)* **Returns:** *Promise‹void›* @@ -321,7 +323,7 @@ ___ *Overrides [SourceSource](sourcesource.md).[createReadStream](sourcesource.md#createreadstream)* -*Defined in [lib/source-destination/http.ts:113](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/http.ts#L113)* +*Defined in [lib/source-destination/http.ts:113](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/http.ts#L113)* **Parameters:** @@ -343,7 +345,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[createSparseReadStream](sourcesource.md#createsparsereadstream)* -*Defined in [lib/source-destination/source-destination.ts:339](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L339)* +*Defined in [lib/source-destination/source-destination.ts:362](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L362)* **Parameters:** @@ -361,7 +363,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[createSparseWriteStream](sourcesource.md#createsparsewritestream)* -*Defined in [lib/source-destination/source-destination.ts:355](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L355)* +*Defined in [lib/source-destination/source-destination.ts:378](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L378)* **Parameters:** @@ -381,7 +383,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[createVerifier](sourcesource.md#createverifier)* -*Defined in [lib/source-destination/source-destination.ts:383](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L383)* +*Defined in [lib/source-destination/source-destination.ts:406](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L406)* **Parameters:** @@ -400,7 +402,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[createWriteStream](sourcesource.md#createwritestream)* -*Defined in [lib/source-destination/source-destination.ts:349](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L349)* +*Defined in [lib/source-destination/source-destination.ts:372](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L372)* **Parameters:** @@ -422,7 +424,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[emit](../interfaces/sparsereadable.md#emit)* -Defined in node_modules/@types/node/base.d.ts:908 +Defined in node_modules/@types/node/events.d.ts:32 **Parameters:** @@ -443,7 +445,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[eventNames](../interfaces/sparsereadable.md#eventnames)* -Defined in node_modules/@types/node/base.d.ts:909 +Defined in node_modules/@types/node/events.d.ts:33 **Returns:** *Array‹string | symbol›* @@ -455,7 +457,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[getAlignment](sourcesource.md#getalignment)* -*Defined in [lib/source-destination/source-destination.ts:276](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L276)* +*Defined in [lib/source-destination/source-destination.ts:299](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L299)* **Returns:** *number | undefined* @@ -467,7 +469,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[getBlocks](sourcesource.md#getblocks)* -*Defined in [lib/source-destination/source-destination.ts:345](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L345)* +*Defined in [lib/source-destination/source-destination.ts:368](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L368)* **Returns:** *Promise‹[BlocksWithChecksum](../interfaces/blockswithchecksum.md)[]›* @@ -477,7 +479,7 @@ ___ ▸ **getInfo**(): *Promise‹void›* -*Defined in [lib/source-destination/http.ts:46](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/http.ts#L46)* +*Defined in [lib/source-destination/http.ts:46](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/http.ts#L46)* **Returns:** *Promise‹void›* @@ -489,7 +491,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[getInnerSource](sourcesource.md#getinnersource)* -*Defined in [lib/source-destination/source-destination.ts:452](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L452)* +*Defined in [lib/source-destination/source-destination.ts:475](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L475)* **Returns:** *Promise‹[SourceDestination](sourcedestination.md)›* @@ -503,7 +505,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[getMaxListeners](../interfaces/sparsereadable.md#getmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:906 +Defined in node_modules/@types/node/events.d.ts:29 **Returns:** *number* @@ -515,7 +517,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[getMetadata](sourcesource.md#getmetadata)* -*Defined in [lib/source-destination/source-destination.ts:304](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L304)* +*Defined in [lib/source-destination/source-destination.ts:327](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L327)* **Returns:** *Promise‹[Metadata](../interfaces/metadata.md)›* @@ -527,7 +529,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[getPartitionTable](sourcesource.md#getpartitiontable)* -*Defined in [lib/source-destination/source-destination.ts:473](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L473)* +*Defined in [lib/source-destination/source-destination.ts:496](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L496)* **Returns:** *Promise‹GetPartitionsResult | undefined›* @@ -537,7 +539,7 @@ ___ ▸ **getRange**(`start`: number, `end?`: undefined | number): *string* -*Defined in [lib/source-destination/http.ts:84](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/http.ts#L84)* +*Defined in [lib/source-destination/http.ts:84](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/http.ts#L84)* **Parameters:** @@ -558,7 +560,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[listenerCount](../interfaces/sparsereadable.md#listenercount)* -Defined in node_modules/@types/node/base.d.ts:910 +Defined in node_modules/@types/node/events.d.ts:34 **Parameters:** @@ -578,7 +580,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[listeners](../interfaces/sparsereadable.md#listeners)* -Defined in node_modules/@types/node/base.d.ts:907 +Defined in node_modules/@types/node/events.d.ts:30 **Parameters:** @@ -590,6 +592,34 @@ Name | Type | ___ +### off + +▸ **off**(`event`: string | symbol, `listener`: function): *this* + +*Inherited from [CountingWritable](countingwritable.md).[off](countingwritable.md#off)* + +*Overrides [SparseReadable](../interfaces/sparsereadable.md).[off](../interfaces/sparsereadable.md#off)* + +Defined in node_modules/@types/node/events.d.ts:26 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* + +**Parameters:** + +Name | Type | +------ | ------ | +`...args` | any[] | + +**Returns:** *this* + +___ + ### on ▸ **on**(`event`: string | symbol, `listener`: function): *this* @@ -598,7 +628,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[on](../interfaces/sparsereadable.md#on)* -Defined in node_modules/@types/node/base.d.ts:899 +Defined in node_modules/@types/node/events.d.ts:21 **Parameters:** @@ -626,7 +656,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[once](../interfaces/sparsereadable.md#once)* -Defined in node_modules/@types/node/base.d.ts:900 +Defined in node_modules/@types/node/events.d.ts:22 **Parameters:** @@ -652,7 +682,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[open](sourcesource.md#open)* -*Defined in [lib/source-destination/source-destination.ts:361](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L361)* +*Defined in [lib/source-destination/source-destination.ts:384](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L384)* **Returns:** *Promise‹void›* @@ -666,7 +696,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[prependListener](../interfaces/sparsereadable.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:901 +Defined in node_modules/@types/node/events.d.ts:23 **Parameters:** @@ -694,7 +724,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[prependOnceListener](../interfaces/sparsereadable.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:902 +Defined in node_modules/@types/node/events.d.ts:24 **Parameters:** @@ -714,13 +744,33 @@ Name | Type | ___ +### rawListeners + +▸ **rawListeners**(`event`: string | symbol): *Function[]* + +*Inherited from [CountingWritable](countingwritable.md).[rawListeners](countingwritable.md#rawlisteners)* + +*Overrides [SparseReadable](../interfaces/sparsereadable.md).[rawListeners](../interfaces/sparsereadable.md#rawlisteners)* + +Defined in node_modules/@types/node/events.d.ts:31 + +**Parameters:** + +Name | Type | +------ | ------ | +`event` | string | symbol | + +**Returns:** *Function[]* + +___ + ### read ▸ **read**(`buffer`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer), `bufferOffset`: number, `length`: number, `sourceOffset`: number): *Promise‹ReadResult›* *Overrides [SourceSource](sourcesource.md).[read](sourcesource.md#read)* -*Defined in [lib/source-destination/http.ts:93](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/http.ts#L93)* +*Defined in [lib/source-destination/http.ts:93](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/http.ts#L93)* **Parameters:** @@ -743,7 +793,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[removeAllListeners](../interfaces/sparsereadable.md#removealllisteners)* -Defined in node_modules/@types/node/base.d.ts:904 +Defined in node_modules/@types/node/events.d.ts:27 **Parameters:** @@ -763,7 +813,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[removeListener](../interfaces/sparsereadable.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:903 +Defined in node_modules/@types/node/events.d.ts:25 **Parameters:** @@ -791,7 +841,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[setMaxListeners](../interfaces/sparsereadable.md#setmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:905 +Defined in node_modules/@types/node/events.d.ts:28 **Parameters:** @@ -809,7 +859,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[write](sourcesource.md#write)* -*Defined in [lib/source-destination/source-destination.ts:324](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L324)* +*Defined in [lib/source-destination/source-destination.ts:347](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L347)* **Parameters:** @@ -830,7 +880,9 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[listenerCount](countingwritable.md#static-listenercount)* -Defined in node_modules/@types/node/base.d.ts:895 +Defined in node_modules/@types/node/events.d.ts:17 + +**`deprecated`** since v4.0.0 **Parameters:** @@ -849,7 +901,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[register](sourcesource.md#static-register)* -*Defined in [lib/source-destination/source-destination.ts:270](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L270)* +*Defined in [lib/source-destination/source-destination.ts:293](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L293)* **Parameters:** diff --git a/doc/classes/multidestination.md b/doc/classes/multidestination.md index 06fc480d..ad6f44c6 100644 --- a/doc/classes/multidestination.md +++ b/doc/classes/multidestination.md @@ -57,11 +57,13 @@ * [getPartitionTable](multidestination.md#getpartitiontable) * [listenerCount](multidestination.md#listenercount) * [listeners](multidestination.md#listeners) +* [off](multidestination.md#off) * [on](multidestination.md#on) * [once](multidestination.md#once) * [open](multidestination.md#open) * [prependListener](multidestination.md#prependlistener) * [prependOnceListener](multidestination.md#prependoncelistener) +* [rawListeners](multidestination.md#rawlisteners) * [read](multidestination.md#read) * [removeAllListeners](multidestination.md#removealllisteners) * [removeListener](multidestination.md#removelistener) @@ -76,7 +78,7 @@ \+ **new MultiDestination**(`destinations`: [SourceDestination](sourcedestination.md)[]): *[MultiDestination](multidestination.md)* -*Defined in [lib/source-destination/multi-destination.ts:110](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/multi-destination.ts#L110)* +*Defined in [lib/source-destination/multi-destination.ts:110](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/multi-destination.ts#L110)* **Parameters:** @@ -92,7 +94,7 @@ Name | Type | • **destinations**: *Set‹[SourceDestination](sourcedestination.md)›* = new Set() -*Defined in [lib/source-destination/multi-destination.ts:109](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/multi-destination.ts#L109)* +*Defined in [lib/source-destination/multi-destination.ts:109](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/multi-destination.ts#L109)* ___ @@ -100,7 +102,7 @@ ___ • **erroredDestinations**: *Set‹[SourceDestination](sourcedestination.md)›* = new Set() -*Defined in [lib/source-destination/multi-destination.ts:110](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/multi-destination.ts#L110)* +*Defined in [lib/source-destination/multi-destination.ts:110](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/multi-destination.ts#L110)* ___ @@ -110,7 +112,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[defaultMaxListeners](countingwritable.md#static-defaultmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:896 +Defined in node_modules/@types/node/events.d.ts:18 ___ @@ -131,7 +133,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[imageExtensions](sourcesource.md#static-imageextensions)* -*Defined in [lib/source-destination/source-destination.ts:252](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L252)* +*Defined in [lib/source-destination/source-destination.ts:275](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L275)* ___ @@ -141,7 +143,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[mimetype](sourcesource.md#static-optional-mimetype)* -*Defined in [lib/source-destination/source-destination.ts:264](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L264)* +*Defined in [lib/source-destination/source-destination.ts:287](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L287)* ## Accessors @@ -149,7 +151,7 @@ ___ • **get activeDestinations**(): *Set‹[SourceDestination](sourcedestination.md)›* -*Defined in [lib/source-destination/multi-destination.ts:153](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/multi-destination.ts#L153)* +*Defined in [lib/source-destination/multi-destination.ts:154](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/multi-destination.ts#L154)* **Returns:** *Set‹[SourceDestination](sourcedestination.md)›* @@ -161,7 +163,7 @@ ___ *Overrides [SourceDestination](sourcedestination.md).[_close](sourcedestination.md#protected-_close)* -*Defined in [lib/source-destination/multi-destination.ts:354](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/multi-destination.ts#L354)* +*Defined in [lib/source-destination/multi-destination.ts:367](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/multi-destination.ts#L367)* **Returns:** *Promise‹void›* @@ -173,7 +175,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[_getMetadata](sourcesource.md#protected-_getmetadata)* -*Defined in [lib/source-destination/source-destination.ts:311](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L311)* +*Defined in [lib/source-destination/source-destination.ts:334](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L334)* **Returns:** *Promise‹[Metadata](../interfaces/metadata.md)›* @@ -185,7 +187,7 @@ ___ *Overrides [SourceDestination](sourcedestination.md).[_open](sourcedestination.md#protected-_open)* -*Defined in [lib/source-destination/multi-destination.ts:344](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/multi-destination.ts#L344)* +*Defined in [lib/source-destination/multi-destination.ts:357](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/multi-destination.ts#L357)* **Returns:** *Promise‹void›* @@ -199,7 +201,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[addListener](../interfaces/sparsereadable.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:898 +Defined in node_modules/@types/node/events.d.ts:20 **Parameters:** @@ -223,7 +225,7 @@ ___ ▸ **can**(`methodName`: "canRead" | "canWrite" | "canCreateReadStream" | "canCreateSparseReadStream" | "canCreateWriteStream" | "canCreateSparseWriteStream"): *Promise‹boolean›* -*Defined in [lib/source-destination/multi-destination.ts:157](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/multi-destination.ts#L157)* +*Defined in [lib/source-destination/multi-destination.ts:158](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/multi-destination.ts#L158)* **Parameters:** @@ -241,7 +243,7 @@ ___ *Overrides [SourceSource](sourcesource.md).[canCreateReadStream](sourcesource.md#cancreatereadstream)* -*Defined in [lib/source-destination/multi-destination.ts:184](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/multi-destination.ts#L184)* +*Defined in [lib/source-destination/multi-destination.ts:185](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/multi-destination.ts#L185)* **Returns:** *Promise‹boolean›* @@ -253,7 +255,7 @@ ___ *Overrides [SourceSource](sourcesource.md).[canCreateSparseReadStream](sourcesource.md#cancreatesparsereadstream)* -*Defined in [lib/source-destination/multi-destination.ts:188](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/multi-destination.ts#L188)* +*Defined in [lib/source-destination/multi-destination.ts:189](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/multi-destination.ts#L189)* **Returns:** *Promise‹boolean›* @@ -265,7 +267,7 @@ ___ *Overrides [SourceSource](sourcesource.md).[canCreateSparseWriteStream](sourcesource.md#cancreatesparsewritestream)* -*Defined in [lib/source-destination/multi-destination.ts:196](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/multi-destination.ts#L196)* +*Defined in [lib/source-destination/multi-destination.ts:197](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/multi-destination.ts#L197)* **Returns:** *Promise‹boolean›* @@ -277,7 +279,7 @@ ___ *Overrides [SourceSource](sourcesource.md).[canCreateWriteStream](sourcesource.md#cancreatewritestream)* -*Defined in [lib/source-destination/multi-destination.ts:192](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/multi-destination.ts#L192)* +*Defined in [lib/source-destination/multi-destination.ts:193](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/multi-destination.ts#L193)* **Returns:** *Promise‹boolean›* @@ -289,7 +291,7 @@ ___ *Overrides [SourceSource](sourcesource.md).[canRead](sourcesource.md#canread)* -*Defined in [lib/source-destination/multi-destination.ts:176](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/multi-destination.ts#L176)* +*Defined in [lib/source-destination/multi-destination.ts:177](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/multi-destination.ts#L177)* **Returns:** *Promise‹boolean›* @@ -301,7 +303,7 @@ ___ *Overrides [SourceSource](sourcesource.md).[canWrite](sourcesource.md#canwrite)* -*Defined in [lib/source-destination/multi-destination.ts:180](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/multi-destination.ts#L180)* +*Defined in [lib/source-destination/multi-destination.ts:181](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/multi-destination.ts#L181)* **Returns:** *Promise‹boolean›* @@ -313,7 +315,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[close](sourcesource.md#close)* -*Defined in [lib/source-destination/source-destination.ts:368](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L368)* +*Defined in [lib/source-destination/source-destination.ts:391](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L391)* **Returns:** *Promise‹void›* @@ -325,7 +327,7 @@ ___ *Overrides [SourceSource](sourcesource.md).[createReadStream](sourcesource.md#createreadstream)* -*Defined in [lib/source-destination/multi-destination.ts:237](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/multi-destination.ts#L237)* +*Defined in [lib/source-destination/multi-destination.ts:238](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/multi-destination.ts#L238)* **Parameters:** @@ -343,7 +345,7 @@ ___ *Overrides [SourceSource](sourcesource.md).[createSparseReadStream](sourcesource.md#createsparsereadstream)* -*Defined in [lib/source-destination/multi-destination.ts:246](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/multi-destination.ts#L246)* +*Defined in [lib/source-destination/multi-destination.ts:247](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/multi-destination.ts#L247)* **Parameters:** @@ -357,17 +359,17 @@ ___ ### createSparseWriteStream -▸ **createSparseWriteStream**(...`args`: any[]): *Promise‹[SparseWritable](../interfaces/sparsewritable.md)›* +▸ **createSparseWriteStream**(...`args`: Parameters‹SourceDestination["createSparseWriteStream"]›): *Promise‹[SparseWritable](../interfaces/sparsewritable.md)›* *Overrides [SourceSource](sourcesource.md).[createSparseWriteStream](sourcesource.md#createsparsewritestream)* -*Defined in [lib/source-destination/multi-destination.ts:331](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/multi-destination.ts#L331)* +*Defined in [lib/source-destination/multi-destination.ts:344](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/multi-destination.ts#L344)* **Parameters:** Name | Type | ------ | ------ | -`...args` | any[] | +`...args` | Parameters‹SourceDestination["createSparseWriteStream"]› | **Returns:** *Promise‹[SparseWritable](../interfaces/sparsewritable.md)›* @@ -375,18 +377,31 @@ ___ ### `Private` createStream -▸ **createStream**(`methodName`: "createWriteStream" | "createSparseWriteStream", ...`args`: any[]): *Promise‹PassThrough‹››* +▸ **createStream**(`methodName`: "createWriteStream", ...`args`: Parameters‹SourceDestination["createWriteStream"]›): *Promise‹WritableStream›* -*Defined in [lib/source-destination/multi-destination.ts:255](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/multi-destination.ts#L255)* +*Defined in [lib/source-destination/multi-destination.ts:256](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/multi-destination.ts#L256)* **Parameters:** Name | Type | ------ | ------ | -`methodName` | "createWriteStream" | "createSparseWriteStream" | -`...args` | any[] | +`methodName` | "createWriteStream" | +`...args` | Parameters‹SourceDestination["createWriteStream"]› | + +**Returns:** *Promise‹WritableStream›* -**Returns:** *Promise‹PassThrough‹››* +▸ **createStream**(`methodName`: "createSparseWriteStream", ...`args`: Parameters‹SourceDestination["createSparseWriteStream"]›): *Promise‹[SparseWritable](../interfaces/sparsewritable.md)›* + +*Defined in [lib/source-destination/multi-destination.ts:261](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/multi-destination.ts#L261)* + +**Parameters:** + +Name | Type | +------ | ------ | +`methodName` | "createSparseWriteStream" | +`...args` | Parameters‹SourceDestination["createSparseWriteStream"]› | + +**Returns:** *Promise‹[SparseWritable](../interfaces/sparsewritable.md)›* ___ @@ -396,7 +411,7 @@ ___ *Overrides [SourceSource](sourcesource.md).[createVerifier](sourcesource.md#createverifier)* -*Defined in [lib/source-destination/multi-destination.ts:337](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/multi-destination.ts#L337)* +*Defined in [lib/source-destination/multi-destination.ts:350](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/multi-destination.ts#L350)* **Parameters:** @@ -411,17 +426,17 @@ ___ ### createWriteStream -▸ **createWriteStream**(...`args`: any[]): *Promise‹WritableStream›* +▸ **createWriteStream**(...`args`: Parameters‹SourceDestination["createWriteStream"]›): *Promise‹WritableStream›* *Overrides [SourceSource](sourcesource.md).[createWriteStream](sourcesource.md#createwritestream)* -*Defined in [lib/source-destination/multi-destination.ts:325](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/multi-destination.ts#L325)* +*Defined in [lib/source-destination/multi-destination.ts:338](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/multi-destination.ts#L338)* **Parameters:** Name | Type | ------ | ------ | -`...args` | any[] | +`...args` | Parameters‹SourceDestination["createWriteStream"]› | **Returns:** *Promise‹WritableStream›* @@ -431,7 +446,7 @@ ___ ▸ **destinationError**(`destination`: [SourceDestination](sourcedestination.md), `error`: [Error](notcapable.md#static-error), `stream?`: EventEmitter): *void* -*Defined in [lib/source-destination/multi-destination.ts:134](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/multi-destination.ts#L134)* +*Defined in [lib/source-destination/multi-destination.ts:135](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/multi-destination.ts#L135)* **Parameters:** @@ -453,7 +468,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[emit](../interfaces/sparsereadable.md#emit)* -Defined in node_modules/@types/node/base.d.ts:908 +Defined in node_modules/@types/node/events.d.ts:32 **Parameters:** @@ -474,7 +489,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[eventNames](../interfaces/sparsereadable.md#eventnames)* -Defined in node_modules/@types/node/base.d.ts:909 +Defined in node_modules/@types/node/events.d.ts:33 **Returns:** *Array‹string | symbol›* @@ -486,7 +501,7 @@ ___ *Overrides [SourceSource](sourcesource.md).[getAlignment](sourcesource.md#getalignment)* -*Defined in [lib/source-destination/multi-destination.ts:122](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/multi-destination.ts#L122)* +*Defined in [lib/source-destination/multi-destination.ts:122](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/multi-destination.ts#L122)* **Returns:** *number | undefined* @@ -498,7 +513,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[getBlocks](sourcesource.md#getblocks)* -*Defined in [lib/source-destination/source-destination.ts:345](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L345)* +*Defined in [lib/source-destination/source-destination.ts:368](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L368)* **Returns:** *Promise‹[BlocksWithChecksum](../interfaces/blockswithchecksum.md)[]›* @@ -510,7 +525,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[getInnerSource](sourcesource.md#getinnersource)* -*Defined in [lib/source-destination/source-destination.ts:452](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L452)* +*Defined in [lib/source-destination/source-destination.ts:475](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L475)* **Returns:** *Promise‹[SourceDestination](sourcedestination.md)›* @@ -524,7 +539,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[getMaxListeners](../interfaces/sparsereadable.md#getmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:906 +Defined in node_modules/@types/node/events.d.ts:29 **Returns:** *number* @@ -536,7 +551,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[getMetadata](sourcesource.md#getmetadata)* -*Defined in [lib/source-destination/source-destination.ts:304](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L304)* +*Defined in [lib/source-destination/source-destination.ts:327](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L327)* **Returns:** *Promise‹[Metadata](../interfaces/metadata.md)›* @@ -548,7 +563,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[getPartitionTable](sourcesource.md#getpartitiontable)* -*Defined in [lib/source-destination/source-destination.ts:473](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L473)* +*Defined in [lib/source-destination/source-destination.ts:496](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L496)* **Returns:** *Promise‹GetPartitionsResult | undefined›* @@ -562,7 +577,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[listenerCount](../interfaces/sparsereadable.md#listenercount)* -Defined in node_modules/@types/node/base.d.ts:910 +Defined in node_modules/@types/node/events.d.ts:34 **Parameters:** @@ -582,7 +597,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[listeners](../interfaces/sparsereadable.md#listeners)* -Defined in node_modules/@types/node/base.d.ts:907 +Defined in node_modules/@types/node/events.d.ts:30 **Parameters:** @@ -594,6 +609,34 @@ Name | Type | ___ +### off + +▸ **off**(`event`: string | symbol, `listener`: function): *this* + +*Inherited from [CountingWritable](countingwritable.md).[off](countingwritable.md#off)* + +*Overrides [SparseReadable](../interfaces/sparsereadable.md).[off](../interfaces/sparsereadable.md#off)* + +Defined in node_modules/@types/node/events.d.ts:26 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* + +**Parameters:** + +Name | Type | +------ | ------ | +`...args` | any[] | + +**Returns:** *this* + +___ + ### on ▸ **on**(`event`: string | symbol, `listener`: function): *this* @@ -602,7 +645,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[on](../interfaces/sparsereadable.md#on)* -Defined in node_modules/@types/node/base.d.ts:899 +Defined in node_modules/@types/node/events.d.ts:21 **Parameters:** @@ -630,7 +673,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[once](../interfaces/sparsereadable.md#once)* -Defined in node_modules/@types/node/base.d.ts:900 +Defined in node_modules/@types/node/events.d.ts:22 **Parameters:** @@ -656,7 +699,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[open](sourcesource.md#open)* -*Defined in [lib/source-destination/source-destination.ts:361](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L361)* +*Defined in [lib/source-destination/source-destination.ts:384](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L384)* **Returns:** *Promise‹void›* @@ -670,7 +713,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[prependListener](../interfaces/sparsereadable.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:901 +Defined in node_modules/@types/node/events.d.ts:23 **Parameters:** @@ -698,7 +741,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[prependOnceListener](../interfaces/sparsereadable.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:902 +Defined in node_modules/@types/node/events.d.ts:24 **Parameters:** @@ -718,13 +761,33 @@ Name | Type | ___ +### rawListeners + +▸ **rawListeners**(`event`: string | symbol): *Function[]* + +*Inherited from [CountingWritable](countingwritable.md).[rawListeners](countingwritable.md#rawlisteners)* + +*Overrides [SparseReadable](../interfaces/sparsereadable.md).[rawListeners](../interfaces/sparsereadable.md#rawlisteners)* + +Defined in node_modules/@types/node/events.d.ts:31 + +**Parameters:** + +Name | Type | +------ | ------ | +`event` | string | symbol | + +**Returns:** *Function[]* + +___ + ### read ▸ **read**(`buffer`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer), `bufferOffset`: number, `length`: number, `sourceOffset`: number): *Promise‹ReadResult›* *Overrides [SourceSource](sourcesource.md).[read](sourcesource.md#read)* -*Defined in [lib/source-destination/multi-destination.ts:200](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/multi-destination.ts#L200)* +*Defined in [lib/source-destination/multi-destination.ts:201](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/multi-destination.ts#L201)* **Parameters:** @@ -747,7 +810,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[removeAllListeners](../interfaces/sparsereadable.md#removealllisteners)* -Defined in node_modules/@types/node/base.d.ts:904 +Defined in node_modules/@types/node/events.d.ts:27 **Parameters:** @@ -767,7 +830,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[removeListener](../interfaces/sparsereadable.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:903 +Defined in node_modules/@types/node/events.d.ts:25 **Parameters:** @@ -795,7 +858,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[setMaxListeners](../interfaces/sparsereadable.md#setmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:905 +Defined in node_modules/@types/node/events.d.ts:28 **Parameters:** @@ -813,7 +876,7 @@ ___ *Overrides [SourceSource](sourcesource.md).[write](sourcesource.md#write)* -*Defined in [lib/source-destination/multi-destination.ts:215](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/multi-destination.ts#L215)* +*Defined in [lib/source-destination/multi-destination.ts:216](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/multi-destination.ts#L216)* **Parameters:** @@ -834,7 +897,9 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[listenerCount](countingwritable.md#static-listenercount)* -Defined in node_modules/@types/node/base.d.ts:895 +Defined in node_modules/@types/node/events.d.ts:17 + +**`deprecated`** since v4.0.0 **Parameters:** @@ -853,7 +918,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[register](sourcesource.md#static-register)* -*Defined in [lib/source-destination/source-destination.ts:270](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L270)* +*Defined in [lib/source-destination/source-destination.ts:293](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L293)* **Parameters:** diff --git a/doc/classes/multidestinationerror.md b/doc/classes/multidestinationerror.md index 68cab0f3..685a18c9 100644 --- a/doc/classes/multidestinationerror.md +++ b/doc/classes/multidestinationerror.md @@ -29,7 +29,7 @@ \+ **new MultiDestinationError**(`error`: [Error](notcapable.md#static-error), `destination`: [SourceDestination](sourcedestination.md)): *[MultiDestinationError](multidestinationerror.md)* -*Defined in [lib/source-destination/multi-destination.ts:41](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/multi-destination.ts#L41)* +*Defined in [lib/source-destination/multi-destination.ts:41](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/multi-destination.ts#L41)* **Parameters:** @@ -46,7 +46,7 @@ Name | Type | • **destination**: *[SourceDestination](sourcedestination.md)* -*Defined in [lib/source-destination/multi-destination.ts:42](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/multi-destination.ts#L42)* +*Defined in [lib/source-destination/multi-destination.ts:42](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/multi-destination.ts#L42)* ___ @@ -54,7 +54,7 @@ ___ • **error**: *[Error](notcapable.md#static-error)* -*Defined in [lib/source-destination/multi-destination.ts:42](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/multi-destination.ts#L42)* +*Defined in [lib/source-destination/multi-destination.ts:42](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/multi-destination.ts#L42)* ___ diff --git a/doc/classes/multidestinationverifier.md b/doc/classes/multidestinationverifier.md index 116bee9c..71ae54aa 100644 --- a/doc/classes/multidestinationverifier.md +++ b/doc/classes/multidestinationverifier.md @@ -30,11 +30,13 @@ * [handleEventsAndPipe](multidestinationverifier.md#protected-handleeventsandpipe) * [listenerCount](multidestinationverifier.md#listenercount) * [listeners](multidestinationverifier.md#listeners) +* [off](multidestinationverifier.md#off) * [on](multidestinationverifier.md#on) * [once](multidestinationverifier.md#once) * [oneVerifierFinished](multidestinationverifier.md#private-oneverifierfinished) * [prependListener](multidestinationverifier.md#prependlistener) * [prependOnceListener](multidestinationverifier.md#prependoncelistener) +* [rawListeners](multidestinationverifier.md#rawlisteners) * [removeAllListeners](multidestinationverifier.md#removealllisteners) * [removeListener](multidestinationverifier.md#removelistener) * [run](multidestinationverifier.md#run) @@ -51,7 +53,7 @@ \+ **new MultiDestinationVerifier**(`source`: [MultiDestination](multidestination.md), `checksumOrBlocks`: string | [BlocksWithChecksum](../interfaces/blockswithchecksum.md)[], `size?`: undefined | number): *[MultiDestinationVerifier](multidestinationverifier.md)* -*Defined in [lib/source-destination/multi-destination.ts:49](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/multi-destination.ts#L49)* +*Defined in [lib/source-destination/multi-destination.ts:49](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/multi-destination.ts#L49)* **Parameters:** @@ -69,7 +71,7 @@ Name | Type | • **timer**: *Timer* -*Defined in [lib/source-destination/multi-destination.ts:49](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/multi-destination.ts#L49)* +*Defined in [lib/source-destination/multi-destination.ts:49](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/multi-destination.ts#L49)* ___ @@ -77,7 +79,7 @@ ___ • **verifiers**: *Set‹[Verifier](verifier.md)›* = new Set() -*Defined in [lib/source-destination/multi-destination.ts:48](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/multi-destination.ts#L48)* +*Defined in [lib/source-destination/multi-destination.ts:48](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/multi-destination.ts#L48)* ___ @@ -87,7 +89,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[defaultMaxListeners](countingwritable.md#static-defaultmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:896 +Defined in node_modules/@types/node/events.d.ts:18 ## Methods @@ -99,7 +101,7 @@ Defined in node_modules/@types/node/base.d.ts:896 *Overrides [SparseReadable](../interfaces/sparsereadable.md).[addListener](../interfaces/sparsereadable.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:898 +Defined in node_modules/@types/node/events.d.ts:20 **Parameters:** @@ -127,7 +129,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[emit](../interfaces/sparsereadable.md#emit)* -Defined in node_modules/@types/node/base.d.ts:908 +Defined in node_modules/@types/node/events.d.ts:32 **Parameters:** @@ -144,7 +146,7 @@ ___ ▸ **emitProgress**(): *void* -*Defined in [lib/source-destination/multi-destination.ts:82](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/multi-destination.ts#L82)* +*Defined in [lib/source-destination/multi-destination.ts:82](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/multi-destination.ts#L82)* **Returns:** *void* @@ -158,7 +160,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[eventNames](../interfaces/sparsereadable.md#eventnames)* -Defined in node_modules/@types/node/base.d.ts:909 +Defined in node_modules/@types/node/events.d.ts:33 **Returns:** *Array‹string | symbol›* @@ -172,7 +174,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[getMaxListeners](../interfaces/sparsereadable.md#getmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:906 +Defined in node_modules/@types/node/events.d.ts:29 **Returns:** *number* @@ -184,7 +186,7 @@ ___ *Inherited from [Verifier](verifier.md).[handleEventsAndPipe](verifier.md#protected-handleeventsandpipe)* -*Defined in [lib/source-destination/source-destination.ts:134](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L134)* +*Defined in [lib/source-destination/source-destination.ts:157](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L157)* **Parameters:** @@ -205,7 +207,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[listenerCount](../interfaces/sparsereadable.md#listenercount)* -Defined in node_modules/@types/node/base.d.ts:910 +Defined in node_modules/@types/node/events.d.ts:34 **Parameters:** @@ -225,7 +227,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[listeners](../interfaces/sparsereadable.md#listeners)* -Defined in node_modules/@types/node/base.d.ts:907 +Defined in node_modules/@types/node/events.d.ts:30 **Parameters:** @@ -237,6 +239,34 @@ Name | Type | ___ +### off + +▸ **off**(`event`: string | symbol, `listener`: function): *this* + +*Inherited from [CountingWritable](countingwritable.md).[off](countingwritable.md#off)* + +*Overrides [SparseReadable](../interfaces/sparsereadable.md).[off](../interfaces/sparsereadable.md#off)* + +Defined in node_modules/@types/node/events.d.ts:26 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* + +**Parameters:** + +Name | Type | +------ | ------ | +`...args` | any[] | + +**Returns:** *this* + +___ + ### on ▸ **on**(`event`: string | symbol, `listener`: function): *this* @@ -245,7 +275,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[on](../interfaces/sparsereadable.md#on)* -Defined in node_modules/@types/node/base.d.ts:899 +Defined in node_modules/@types/node/events.d.ts:21 **Parameters:** @@ -273,7 +303,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[once](../interfaces/sparsereadable.md#once)* -Defined in node_modules/@types/node/base.d.ts:900 +Defined in node_modules/@types/node/events.d.ts:22 **Parameters:** @@ -297,7 +327,7 @@ ___ ▸ **oneVerifierFinished**(`verifier`: [Verifier](verifier.md)): *void* -*Defined in [lib/source-destination/multi-destination.ts:70](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/multi-destination.ts#L70)* +*Defined in [lib/source-destination/multi-destination.ts:70](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/multi-destination.ts#L70)* **Parameters:** @@ -317,7 +347,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[prependListener](../interfaces/sparsereadable.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:901 +Defined in node_modules/@types/node/events.d.ts:23 **Parameters:** @@ -345,7 +375,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[prependOnceListener](../interfaces/sparsereadable.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:902 +Defined in node_modules/@types/node/events.d.ts:24 **Parameters:** @@ -365,6 +395,26 @@ Name | Type | ___ +### rawListeners + +▸ **rawListeners**(`event`: string | symbol): *Function[]* + +*Inherited from [CountingWritable](countingwritable.md).[rawListeners](countingwritable.md#rawlisteners)* + +*Overrides [SparseReadable](../interfaces/sparsereadable.md).[rawListeners](../interfaces/sparsereadable.md#rawlisteners)* + +Defined in node_modules/@types/node/events.d.ts:31 + +**Parameters:** + +Name | Type | +------ | ------ | +`event` | string | symbol | + +**Returns:** *Function[]* + +___ + ### removeAllListeners ▸ **removeAllListeners**(`event?`: string | symbol): *this* @@ -373,7 +423,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[removeAllListeners](../interfaces/sparsereadable.md#removealllisteners)* -Defined in node_modules/@types/node/base.d.ts:904 +Defined in node_modules/@types/node/events.d.ts:27 **Parameters:** @@ -393,7 +443,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[removeListener](../interfaces/sparsereadable.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:903 +Defined in node_modules/@types/node/events.d.ts:25 **Parameters:** @@ -419,7 +469,7 @@ ___ *Overrides [Verifier](verifier.md).[run](verifier.md#abstract-run)* -*Defined in [lib/source-destination/multi-destination.ts:92](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/multi-destination.ts#L92)* +*Defined in [lib/source-destination/multi-destination.ts:92](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/multi-destination.ts#L92)* **Returns:** *Promise‹void›* @@ -433,7 +483,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[setMaxListeners](../interfaces/sparsereadable.md#setmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:905 +Defined in node_modules/@types/node/events.d.ts:28 **Parameters:** @@ -451,7 +501,9 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[listenerCount](countingwritable.md#static-listenercount)* -Defined in node_modules/@types/node/base.d.ts:895 +Defined in node_modules/@types/node/events.d.ts:17 + +**`deprecated`** since v4.0.0 **Parameters:** @@ -470,22 +522,22 @@ Name | Type | *Inherited from [Verifier](verifier.md).[progress](verifier.md#progress)* -*Defined in [lib/source-destination/source-destination.ts:130](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L130)* +*Defined in [lib/source-destination/source-destination.ts:153](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L153)* ### bytes • **bytes**: *number* = 0 -*Defined in [lib/source-destination/source-destination.ts:130](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L130)* +*Defined in [lib/source-destination/source-destination.ts:153](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L153)* ### position • **position**: *number* = 0 -*Defined in [lib/source-destination/source-destination.ts:130](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L130)* +*Defined in [lib/source-destination/source-destination.ts:153](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L153)* ### speed • **speed**: *number* = 0 -*Defined in [lib/source-destination/source-destination.ts:130](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L130)* +*Defined in [lib/source-destination/source-destination.ts:153](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L153)* diff --git a/doc/classes/randomaccesszipsource.md b/doc/classes/randomaccesszipsource.md index eca42d82..824e18c3 100644 --- a/doc/classes/randomaccesszipsource.md +++ b/doc/classes/randomaccesszipsource.md @@ -62,11 +62,13 @@ * [init](randomaccesszipsource.md#private-init) * [listenerCount](randomaccesszipsource.md#listenercount) * [listeners](randomaccesszipsource.md#listeners) +* [off](randomaccesszipsource.md#off) * [on](randomaccesszipsource.md#on) * [once](randomaccesszipsource.md#once) * [open](randomaccesszipsource.md#open) * [prependListener](randomaccesszipsource.md#prependlistener) * [prependOnceListener](randomaccesszipsource.md#prependoncelistener) +* [rawListeners](randomaccesszipsource.md#rawlisteners) * [read](randomaccesszipsource.md#read) * [removeAllListeners](randomaccesszipsource.md#removealllisteners) * [removeListener](randomaccesszipsource.md#removelistener) @@ -83,7 +85,7 @@ *Overrides [SourceSource](sourcesource.md).[constructor](sourcesource.md#constructor)* -*Defined in [lib/source-destination/zip.ts:166](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/zip.ts#L166)* +*Defined in [lib/source-destination/zip.ts:166](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/zip.ts#L166)* **Parameters:** @@ -107,7 +109,7 @@ Name | Type | • **entries**: *Entry[]* = [] -*Defined in [lib/source-destination/zip.ts:166](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/zip.ts#L166)* +*Defined in [lib/source-destination/zip.ts:166](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/zip.ts#L166)* ___ @@ -115,7 +117,7 @@ ___ • **match**: *function* -*Defined in [lib/source-destination/zip.ts:170](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/zip.ts#L170)* +*Defined in [lib/source-destination/zip.ts:170](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/zip.ts#L170)* #### Type declaration: @@ -133,7 +135,7 @@ ___ • **ready**: *Promise‹void›* -*Defined in [lib/source-destination/zip.ts:165](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/zip.ts#L165)* +*Defined in [lib/source-destination/zip.ts:165](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/zip.ts#L165)* ___ @@ -143,7 +145,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[source](sourcesource.md#protected-source)* -*Defined in [lib/source-destination/source-source.ts:22](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-source.ts#L22)* +*Defined in [lib/source-destination/source-source.ts:22](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-source.ts#L22)* ___ @@ -151,7 +153,7 @@ ___ • **zip**: *ZipFile* -*Defined in [lib/source-destination/zip.ts:164](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/zip.ts#L164)* +*Defined in [lib/source-destination/zip.ts:164](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/zip.ts#L164)* ___ @@ -161,7 +163,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[defaultMaxListeners](countingwritable.md#static-defaultmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:896 +Defined in node_modules/@types/node/events.d.ts:18 ___ @@ -182,7 +184,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[imageExtensions](sourcesource.md#static-imageextensions)* -*Defined in [lib/source-destination/source-destination.ts:252](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L252)* +*Defined in [lib/source-destination/source-destination.ts:275](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L275)* ___ @@ -199,7 +201,7 @@ ___ 'version', ] -*Defined in [lib/source-destination/zip.ts:154](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/zip.ts#L154)* +*Defined in [lib/source-destination/zip.ts:154](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/zip.ts#L154)* ___ @@ -209,7 +211,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[mimetype](sourcesource.md#static-optional-mimetype)* -*Defined in [lib/source-destination/source-destination.ts:264](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L264)* +*Defined in [lib/source-destination/source-destination.ts:287](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L287)* ___ @@ -219,7 +221,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[requiresRandomReadableSource](sourcesource.md#static-requiresrandomreadablesource)* -*Defined in [lib/source-destination/source-source.ts:20](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-source.ts#L20)* +*Defined in [lib/source-destination/source-source.ts:20](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-source.ts#L20)* ## Methods @@ -231,7 +233,7 @@ ___ *Overrides [SourceDestination](sourcedestination.md).[_close](sourcedestination.md#protected-_close)* -*Defined in [lib/source-destination/source-source.ts:30](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-source.ts#L30)* +*Defined in [lib/source-destination/source-source.ts:30](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-source.ts#L30)* **Returns:** *Promise‹void›* @@ -243,7 +245,7 @@ ___ *Overrides [SourceSource](sourcesource.md).[_getMetadata](sourcesource.md#protected-_getmetadata)* -*Defined in [lib/source-destination/zip.ts:324](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/zip.ts#L324)* +*Defined in [lib/source-destination/zip.ts:324](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/zip.ts#L324)* **Returns:** *Promise‹[Metadata](../interfaces/metadata.md)›* @@ -255,7 +257,7 @@ ___ *Overrides [SourceSource](sourcesource.md).[_open](sourcesource.md#protected-_open)* -*Defined in [lib/source-destination/zip.ts:231](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/zip.ts#L231)* +*Defined in [lib/source-destination/zip.ts:231](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/zip.ts#L231)* **Returns:** *Promise‹void›* @@ -269,7 +271,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[addListener](../interfaces/sparsereadable.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:898 +Defined in node_modules/@types/node/events.d.ts:20 **Parameters:** @@ -295,7 +297,7 @@ ___ *Overrides [SourceSource](sourcesource.md).[canCreateReadStream](sourcesource.md#cancreatereadstream)* -*Defined in [lib/source-destination/zip.ts:202](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/zip.ts#L202)* +*Defined in [lib/source-destination/zip.ts:202](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/zip.ts#L202)* **Returns:** *Promise‹boolean›* @@ -307,7 +309,7 @@ ___ *Overrides [SourceSource](sourcesource.md).[canCreateSparseReadStream](sourcesource.md#cancreatesparsereadstream)* -*Defined in [lib/source-destination/zip.ts:206](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/zip.ts#L206)* +*Defined in [lib/source-destination/zip.ts:206](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/zip.ts#L206)* **Returns:** *Promise‹boolean›* @@ -319,7 +321,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[canCreateSparseWriteStream](sourcesource.md#cancreatesparsewritestream)* -*Defined in [lib/source-destination/source-destination.ts:300](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L300)* +*Defined in [lib/source-destination/source-destination.ts:323](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L323)* **Returns:** *Promise‹boolean›* @@ -331,7 +333,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[canCreateWriteStream](sourcesource.md#cancreatewritestream)* -*Defined in [lib/source-destination/source-destination.ts:296](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L296)* +*Defined in [lib/source-destination/source-destination.ts:319](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L319)* **Returns:** *Promise‹boolean›* @@ -343,7 +345,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[canRead](sourcesource.md#canread)* -*Defined in [lib/source-destination/source-destination.ts:280](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L280)* +*Defined in [lib/source-destination/source-destination.ts:303](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L303)* **Returns:** *Promise‹boolean›* @@ -355,7 +357,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[canWrite](sourcesource.md#canwrite)* -*Defined in [lib/source-destination/source-destination.ts:284](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L284)* +*Defined in [lib/source-destination/source-destination.ts:307](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L307)* **Returns:** *Promise‹boolean›* @@ -367,7 +369,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[close](sourcesource.md#close)* -*Defined in [lib/source-destination/source-destination.ts:368](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L368)* +*Defined in [lib/source-destination/source-destination.ts:391](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L391)* **Returns:** *Promise‹void›* @@ -379,7 +381,7 @@ ___ *Overrides [SourceSource](sourcesource.md).[createReadStream](sourcesource.md#createreadstream)* -*Defined in [lib/source-destination/zip.ts:275](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/zip.ts#L275)* +*Defined in [lib/source-destination/zip.ts:275](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/zip.ts#L275)* **Parameters:** @@ -402,7 +404,7 @@ ___ *Overrides [SourceSource](sourcesource.md).[createSparseReadStream](sourcesource.md#createsparsereadstream)* -*Defined in [lib/source-destination/zip.ts:301](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/zip.ts#L301)* +*Defined in [lib/source-destination/zip.ts:301](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/zip.ts#L301)* **Parameters:** @@ -424,7 +426,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[createSparseWriteStream](sourcesource.md#createsparsewritestream)* -*Defined in [lib/source-destination/source-destination.ts:355](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L355)* +*Defined in [lib/source-destination/source-destination.ts:378](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L378)* **Parameters:** @@ -444,7 +446,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[createVerifier](sourcesource.md#createverifier)* -*Defined in [lib/source-destination/source-destination.ts:383](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L383)* +*Defined in [lib/source-destination/source-destination.ts:406](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L406)* **Parameters:** @@ -463,7 +465,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[createWriteStream](sourcesource.md#createwritestream)* -*Defined in [lib/source-destination/source-destination.ts:349](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L349)* +*Defined in [lib/source-destination/source-destination.ts:372](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L372)* **Parameters:** @@ -485,7 +487,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[emit](../interfaces/sparsereadable.md#emit)* -Defined in node_modules/@types/node/base.d.ts:908 +Defined in node_modules/@types/node/events.d.ts:32 **Parameters:** @@ -506,7 +508,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[eventNames](../interfaces/sparsereadable.md#eventnames)* -Defined in node_modules/@types/node/base.d.ts:909 +Defined in node_modules/@types/node/events.d.ts:33 **Returns:** *Array‹string | symbol›* @@ -518,7 +520,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[getAlignment](sourcesource.md#getalignment)* -*Defined in [lib/source-destination/source-destination.ts:276](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L276)* +*Defined in [lib/source-destination/source-destination.ts:299](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L299)* **Returns:** *number | undefined* @@ -530,7 +532,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[getBlocks](sourcesource.md#getblocks)* -*Defined in [lib/source-destination/source-destination.ts:345](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L345)* +*Defined in [lib/source-destination/source-destination.ts:368](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L368)* **Returns:** *Promise‹[BlocksWithChecksum](../interfaces/blockswithchecksum.md)[]›* @@ -540,7 +542,7 @@ ___ ▸ **getEntries**(): *Promise‹Entry[]›* -*Defined in [lib/source-destination/zip.ts:211](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/zip.ts#L211)* +*Defined in [lib/source-destination/zip.ts:211](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/zip.ts#L211)* **Returns:** *Promise‹Entry[]›* @@ -550,7 +552,7 @@ ___ ▸ **getEntryByName**(`name`: string): *Promise‹Entry | undefined›* -*Defined in [lib/source-destination/zip.ts:237](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/zip.ts#L237)* +*Defined in [lib/source-destination/zip.ts:237](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/zip.ts#L237)* **Parameters:** @@ -566,7 +568,7 @@ ___ ▸ **getImageEntry**(): *Promise‹Entry›* -*Defined in [lib/source-destination/zip.ts:216](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/zip.ts#L216)* +*Defined in [lib/source-destination/zip.ts:216](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/zip.ts#L216)* **Returns:** *Promise‹Entry›* @@ -578,7 +580,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[getInnerSource](sourcesource.md#getinnersource)* -*Defined in [lib/source-destination/source-destination.ts:452](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L452)* +*Defined in [lib/source-destination/source-destination.ts:475](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L475)* **Returns:** *Promise‹[SourceDestination](sourcedestination.md)›* @@ -588,7 +590,7 @@ ___ ▸ **getJson**(`name`: string): *Promise‹any›* -*Defined in [lib/source-destination/zip.ts:268](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/zip.ts#L268)* +*Defined in [lib/source-destination/zip.ts:268](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/zip.ts#L268)* **Parameters:** @@ -608,7 +610,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[getMaxListeners](../interfaces/sparsereadable.md#getmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:906 +Defined in node_modules/@types/node/events.d.ts:29 **Returns:** *number* @@ -620,7 +622,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[getMetadata](sourcesource.md#getmetadata)* -*Defined in [lib/source-destination/source-destination.ts:304](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L304)* +*Defined in [lib/source-destination/source-destination.ts:327](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L327)* **Returns:** *Promise‹[Metadata](../interfaces/metadata.md)›* @@ -632,7 +634,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[getPartitionTable](sourcesource.md#getpartitiontable)* -*Defined in [lib/source-destination/source-destination.ts:473](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L473)* +*Defined in [lib/source-destination/source-destination.ts:496](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L496)* **Returns:** *Promise‹GetPartitionsResult | undefined›* @@ -642,7 +644,7 @@ ___ ▸ **getStream**(`name`: string): *Promise‹ReadableStream | undefined›* -*Defined in [lib/source-destination/zip.ts:246](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/zip.ts#L246)* +*Defined in [lib/source-destination/zip.ts:246](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/zip.ts#L246)* **Parameters:** @@ -658,7 +660,7 @@ ___ ▸ **getString**(`name`: string): *Promise‹string | undefined›* -*Defined in [lib/source-destination/zip.ts:260](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/zip.ts#L260)* +*Defined in [lib/source-destination/zip.ts:260](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/zip.ts#L260)* **Parameters:** @@ -674,7 +676,7 @@ ___ ▸ **init**(): *Promise‹void›* -*Defined in [lib/source-destination/zip.ts:176](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/zip.ts#L176)* +*Defined in [lib/source-destination/zip.ts:176](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/zip.ts#L176)* **Returns:** *Promise‹void›* @@ -688,7 +690,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[listenerCount](../interfaces/sparsereadable.md#listenercount)* -Defined in node_modules/@types/node/base.d.ts:910 +Defined in node_modules/@types/node/events.d.ts:34 **Parameters:** @@ -708,7 +710,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[listeners](../interfaces/sparsereadable.md#listeners)* -Defined in node_modules/@types/node/base.d.ts:907 +Defined in node_modules/@types/node/events.d.ts:30 **Parameters:** @@ -720,6 +722,34 @@ Name | Type | ___ +### off + +▸ **off**(`event`: string | symbol, `listener`: function): *this* + +*Inherited from [CountingWritable](countingwritable.md).[off](countingwritable.md#off)* + +*Overrides [SparseReadable](../interfaces/sparsereadable.md).[off](../interfaces/sparsereadable.md#off)* + +Defined in node_modules/@types/node/events.d.ts:26 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* + +**Parameters:** + +Name | Type | +------ | ------ | +`...args` | any[] | + +**Returns:** *this* + +___ + ### on ▸ **on**(`event`: string | symbol, `listener`: function): *this* @@ -728,7 +758,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[on](../interfaces/sparsereadable.md#on)* -Defined in node_modules/@types/node/base.d.ts:899 +Defined in node_modules/@types/node/events.d.ts:21 **Parameters:** @@ -756,7 +786,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[once](../interfaces/sparsereadable.md#once)* -Defined in node_modules/@types/node/base.d.ts:900 +Defined in node_modules/@types/node/events.d.ts:22 **Parameters:** @@ -782,7 +812,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[open](sourcesource.md#open)* -*Defined in [lib/source-destination/source-destination.ts:361](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L361)* +*Defined in [lib/source-destination/source-destination.ts:384](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L384)* **Returns:** *Promise‹void›* @@ -796,7 +826,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[prependListener](../interfaces/sparsereadable.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:901 +Defined in node_modules/@types/node/events.d.ts:23 **Parameters:** @@ -824,7 +854,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[prependOnceListener](../interfaces/sparsereadable.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:902 +Defined in node_modules/@types/node/events.d.ts:24 **Parameters:** @@ -844,13 +874,33 @@ Name | Type | ___ +### rawListeners + +▸ **rawListeners**(`event`: string | symbol): *Function[]* + +*Inherited from [CountingWritable](countingwritable.md).[rawListeners](countingwritable.md#rawlisteners)* + +*Overrides [SparseReadable](../interfaces/sparsereadable.md).[rawListeners](../interfaces/sparsereadable.md#rawlisteners)* + +Defined in node_modules/@types/node/events.d.ts:31 + +**Parameters:** + +Name | Type | +------ | ------ | +`event` | string | symbol | + +**Returns:** *Function[]* + +___ + ### read ▸ **read**(`_buffer`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer), `_bufferOffset`: number, `_length`: number, `_sourceOffset`: number): *Promise‹ReadResult›* *Inherited from [SourceSource](sourcesource.md).[read](sourcesource.md#read)* -*Defined in [lib/source-destination/source-destination.ts:315](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L315)* +*Defined in [lib/source-destination/source-destination.ts:338](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L338)* **Parameters:** @@ -873,7 +923,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[removeAllListeners](../interfaces/sparsereadable.md#removealllisteners)* -Defined in node_modules/@types/node/base.d.ts:904 +Defined in node_modules/@types/node/events.d.ts:27 **Parameters:** @@ -893,7 +943,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[removeListener](../interfaces/sparsereadable.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:903 +Defined in node_modules/@types/node/events.d.ts:25 **Parameters:** @@ -921,7 +971,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[setMaxListeners](../interfaces/sparsereadable.md#setmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:905 +Defined in node_modules/@types/node/events.d.ts:28 **Parameters:** @@ -939,7 +989,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[write](sourcesource.md#write)* -*Defined in [lib/source-destination/source-destination.ts:324](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L324)* +*Defined in [lib/source-destination/source-destination.ts:347](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L347)* **Parameters:** @@ -960,7 +1010,9 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[listenerCount](countingwritable.md#static-listenercount)* -Defined in node_modules/@types/node/base.d.ts:895 +Defined in node_modules/@types/node/events.d.ts:17 + +**`deprecated`** since v4.0.0 **Parameters:** @@ -979,7 +1031,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[register](sourcesource.md#static-register)* -*Defined in [lib/source-destination/source-destination.ts:270](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L270)* +*Defined in [lib/source-destination/source-destination.ts:293](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L293)* **Parameters:** diff --git a/doc/classes/scanner.md b/doc/classes/scanner.md index a120bdd2..84973bd5 100644 --- a/doc/classes/scanner.md +++ b/doc/classes/scanner.md @@ -29,12 +29,14 @@ * [getMaxListeners](scanner.md#getmaxlisteners) * [listenerCount](scanner.md#listenercount) * [listeners](scanner.md#listeners) +* [off](scanner.md#off) * [on](scanner.md#on) * [onAttach](scanner.md#private-onattach) * [onDetach](scanner.md#private-ondetach) * [once](scanner.md#once) * [prependListener](scanner.md#prependlistener) * [prependOnceListener](scanner.md#prependoncelistener) +* [rawListeners](scanner.md#rawlisteners) * [removeAllListeners](scanner.md#removealllisteners) * [removeListener](scanner.md#removelistener) * [setMaxListeners](scanner.md#setmaxlisteners) @@ -48,7 +50,7 @@ \+ **new Scanner**(`adapters`: [Adapter](adapter.md)[]): *[Scanner](scanner.md)* -*Defined in [lib/scanner/scanner.ts:25](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/scanner/scanner.ts#L25)* +*Defined in [lib/scanner/scanner.ts:25](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/scanner/scanner.ts#L25)* **Parameters:** @@ -64,7 +66,7 @@ Name | Type | • **adapters**: *[Adapter](adapter.md)[]* -*Defined in [lib/scanner/scanner.ts:27](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/scanner/scanner.ts#L27)* +*Defined in [lib/scanner/scanner.ts:27](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/scanner/scanner.ts#L27)* ___ @@ -72,7 +74,7 @@ ___ • **drives**: *Set‹[AdapterSourceDestination](../interfaces/adaptersourcedestination.md)›* = new Set() -*Defined in [lib/scanner/scanner.ts:25](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/scanner/scanner.ts#L25)* +*Defined in [lib/scanner/scanner.ts:25](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/scanner/scanner.ts#L25)* ___ @@ -82,7 +84,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[defaultMaxListeners](countingwritable.md#static-defaultmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:896 +Defined in node_modules/@types/node/events.d.ts:18 ## Methods @@ -94,7 +96,7 @@ Defined in node_modules/@types/node/base.d.ts:896 *Overrides [SparseReadable](../interfaces/sparsereadable.md).[addListener](../interfaces/sparsereadable.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:898 +Defined in node_modules/@types/node/events.d.ts:20 **Parameters:** @@ -122,7 +124,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[emit](../interfaces/sparsereadable.md#emit)* -Defined in node_modules/@types/node/base.d.ts:908 +Defined in node_modules/@types/node/events.d.ts:32 **Parameters:** @@ -143,7 +145,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[eventNames](../interfaces/sparsereadable.md#eventnames)* -Defined in node_modules/@types/node/base.d.ts:909 +Defined in node_modules/@types/node/events.d.ts:33 **Returns:** *Array‹string | symbol›* @@ -153,7 +155,7 @@ ___ ▸ **getBy**(`field`: "raw" | "device" | "devicePath", `value`: string): *[AdapterSourceDestination](../interfaces/adaptersourcedestination.md) | undefined* -*Defined in [lib/scanner/scanner.ts:46](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/scanner/scanner.ts#L46)* +*Defined in [lib/scanner/scanner.ts:46](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/scanner/scanner.ts#L46)* **Parameters:** @@ -174,7 +176,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[getMaxListeners](../interfaces/sparsereadable.md#getmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:906 +Defined in node_modules/@types/node/events.d.ts:29 **Returns:** *number* @@ -188,7 +190,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[listenerCount](../interfaces/sparsereadable.md#listenercount)* -Defined in node_modules/@types/node/base.d.ts:910 +Defined in node_modules/@types/node/events.d.ts:34 **Parameters:** @@ -208,7 +210,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[listeners](../interfaces/sparsereadable.md#listeners)* -Defined in node_modules/@types/node/base.d.ts:907 +Defined in node_modules/@types/node/events.d.ts:30 **Parameters:** @@ -220,6 +222,34 @@ Name | Type | ___ +### off + +▸ **off**(`event`: string | symbol, `listener`: function): *this* + +*Inherited from [CountingWritable](countingwritable.md).[off](countingwritable.md#off)* + +*Overrides [SparseReadable](../interfaces/sparsereadable.md).[off](../interfaces/sparsereadable.md#off)* + +Defined in node_modules/@types/node/events.d.ts:26 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* + +**Parameters:** + +Name | Type | +------ | ------ | +`...args` | any[] | + +**Returns:** *this* + +___ + ### on ▸ **on**(`event`: string | symbol, `listener`: function): *this* @@ -228,7 +258,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[on](../interfaces/sparsereadable.md#on)* -Defined in node_modules/@types/node/base.d.ts:899 +Defined in node_modules/@types/node/events.d.ts:21 **Parameters:** @@ -252,7 +282,7 @@ ___ ▸ **onAttach**(`drive`: [AdapterSourceDestination](../interfaces/adaptersourcedestination.md)): *void* -*Defined in [lib/scanner/scanner.ts:36](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/scanner/scanner.ts#L36)* +*Defined in [lib/scanner/scanner.ts:36](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/scanner/scanner.ts#L36)* **Parameters:** @@ -268,7 +298,7 @@ ___ ▸ **onDetach**(`drive`: [AdapterSourceDestination](../interfaces/adaptersourcedestination.md)): *void* -*Defined in [lib/scanner/scanner.ts:41](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/scanner/scanner.ts#L41)* +*Defined in [lib/scanner/scanner.ts:41](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/scanner/scanner.ts#L41)* **Parameters:** @@ -288,7 +318,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[once](../interfaces/sparsereadable.md#once)* -Defined in node_modules/@types/node/base.d.ts:900 +Defined in node_modules/@types/node/events.d.ts:22 **Parameters:** @@ -316,7 +346,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[prependListener](../interfaces/sparsereadable.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:901 +Defined in node_modules/@types/node/events.d.ts:23 **Parameters:** @@ -344,7 +374,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[prependOnceListener](../interfaces/sparsereadable.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:902 +Defined in node_modules/@types/node/events.d.ts:24 **Parameters:** @@ -364,6 +394,26 @@ Name | Type | ___ +### rawListeners + +▸ **rawListeners**(`event`: string | symbol): *Function[]* + +*Inherited from [CountingWritable](countingwritable.md).[rawListeners](countingwritable.md#rawlisteners)* + +*Overrides [SparseReadable](../interfaces/sparsereadable.md).[rawListeners](../interfaces/sparsereadable.md#rawlisteners)* + +Defined in node_modules/@types/node/events.d.ts:31 + +**Parameters:** + +Name | Type | +------ | ------ | +`event` | string | symbol | + +**Returns:** *Function[]* + +___ + ### removeAllListeners ▸ **removeAllListeners**(`event?`: string | symbol): *this* @@ -372,7 +422,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[removeAllListeners](../interfaces/sparsereadable.md#removealllisteners)* -Defined in node_modules/@types/node/base.d.ts:904 +Defined in node_modules/@types/node/events.d.ts:27 **Parameters:** @@ -392,7 +442,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[removeListener](../interfaces/sparsereadable.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:903 +Defined in node_modules/@types/node/events.d.ts:25 **Parameters:** @@ -420,7 +470,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[setMaxListeners](../interfaces/sparsereadable.md#setmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:905 +Defined in node_modules/@types/node/events.d.ts:28 **Parameters:** @@ -436,7 +486,7 @@ ___ ▸ **start**(): *Promise‹void›* -*Defined in [lib/scanner/scanner.ts:57](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/scanner/scanner.ts#L57)* +*Defined in [lib/scanner/scanner.ts:57](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/scanner/scanner.ts#L57)* **Returns:** *Promise‹void›* @@ -446,7 +496,7 @@ ___ ▸ **stop**(): *void* -*Defined in [lib/scanner/scanner.ts:74](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/scanner/scanner.ts#L74)* +*Defined in [lib/scanner/scanner.ts:74](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/scanner/scanner.ts#L74)* **Returns:** *void* @@ -458,7 +508,9 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[listenerCount](countingwritable.md#static-listenercount)* -Defined in node_modules/@types/node/base.d.ts:895 +Defined in node_modules/@types/node/events.d.ts:17 + +**`deprecated`** since v4.0.0 **Parameters:** diff --git a/doc/classes/singleusestreamsource.md b/doc/classes/singleusestreamsource.md index 80720efe..8bbfe1b0 100644 --- a/doc/classes/singleusestreamsource.md +++ b/doc/classes/singleusestreamsource.md @@ -50,11 +50,13 @@ * [getPartitionTable](singleusestreamsource.md#getpartitiontable) * [listenerCount](singleusestreamsource.md#listenercount) * [listeners](singleusestreamsource.md#listeners) +* [off](singleusestreamsource.md#off) * [on](singleusestreamsource.md#on) * [once](singleusestreamsource.md#once) * [open](singleusestreamsource.md#open) * [prependListener](singleusestreamsource.md#prependlistener) * [prependOnceListener](singleusestreamsource.md#prependoncelistener) +* [rawListeners](singleusestreamsource.md#rawlisteners) * [read](singleusestreamsource.md#read) * [removeAllListeners](singleusestreamsource.md#removealllisteners) * [removeListener](singleusestreamsource.md#removelistener) @@ -69,7 +71,7 @@ \+ **new SingleUseStreamSource**(`stream`: ReadableStream): *[SingleUseStreamSource](singleusestreamsource.md)* -*Defined in [lib/source-destination/single-use-stream-source.ts:26](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/single-use-stream-source.ts#L26)* +*Defined in [lib/source-destination/single-use-stream-source.ts:26](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/single-use-stream-source.ts#L26)* **Parameters:** @@ -85,7 +87,7 @@ Name | Type | • **stream**: *ReadableStream* -*Defined in [lib/source-destination/single-use-stream-source.ts:28](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/single-use-stream-source.ts#L28)* +*Defined in [lib/source-destination/single-use-stream-source.ts:28](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/single-use-stream-source.ts#L28)* ___ @@ -93,7 +95,7 @@ ___ • **used**: *boolean* = false -*Defined in [lib/source-destination/single-use-stream-source.ts:26](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/single-use-stream-source.ts#L26)* +*Defined in [lib/source-destination/single-use-stream-source.ts:26](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/single-use-stream-source.ts#L26)* ___ @@ -103,7 +105,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[defaultMaxListeners](countingwritable.md#static-defaultmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:896 +Defined in node_modules/@types/node/events.d.ts:18 ___ @@ -124,7 +126,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[imageExtensions](sourcesource.md#static-imageextensions)* -*Defined in [lib/source-destination/source-destination.ts:252](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L252)* +*Defined in [lib/source-destination/source-destination.ts:275](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L275)* ___ @@ -134,7 +136,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[mimetype](sourcesource.md#static-optional-mimetype)* -*Defined in [lib/source-destination/source-destination.ts:264](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L264)* +*Defined in [lib/source-destination/source-destination.ts:287](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L287)* ## Methods @@ -144,7 +146,7 @@ ___ *Inherited from [SourceDestination](sourcedestination.md).[_close](sourcedestination.md#protected-_close)* -*Defined in [lib/source-destination/source-destination.ts:379](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L379)* +*Defined in [lib/source-destination/source-destination.ts:402](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L402)* **Returns:** *Promise‹void›* @@ -156,7 +158,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[_getMetadata](sourcesource.md#protected-_getmetadata)* -*Defined in [lib/source-destination/source-destination.ts:311](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L311)* +*Defined in [lib/source-destination/source-destination.ts:334](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L334)* **Returns:** *Promise‹[Metadata](../interfaces/metadata.md)›* @@ -168,7 +170,7 @@ ___ *Inherited from [SourceDestination](sourcedestination.md).[_open](sourcedestination.md#protected-_open)* -*Defined in [lib/source-destination/source-destination.ts:375](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L375)* +*Defined in [lib/source-destination/source-destination.ts:398](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L398)* **Returns:** *Promise‹void›* @@ -182,7 +184,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[addListener](../interfaces/sparsereadable.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:898 +Defined in node_modules/@types/node/events.d.ts:20 **Parameters:** @@ -208,7 +210,7 @@ ___ *Overrides [SourceSource](sourcesource.md).[canCreateReadStream](sourcesource.md#cancreatereadstream)* -*Defined in [lib/source-destination/single-use-stream-source.ts:32](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/single-use-stream-source.ts#L32)* +*Defined in [lib/source-destination/single-use-stream-source.ts:32](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/single-use-stream-source.ts#L32)* **Returns:** *Promise‹boolean›* @@ -220,7 +222,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[canCreateSparseReadStream](sourcesource.md#cancreatesparsereadstream)* -*Defined in [lib/source-destination/source-destination.ts:292](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L292)* +*Defined in [lib/source-destination/source-destination.ts:315](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L315)* **Returns:** *Promise‹boolean›* @@ -232,7 +234,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[canCreateSparseWriteStream](sourcesource.md#cancreatesparsewritestream)* -*Defined in [lib/source-destination/source-destination.ts:300](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L300)* +*Defined in [lib/source-destination/source-destination.ts:323](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L323)* **Returns:** *Promise‹boolean›* @@ -244,7 +246,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[canCreateWriteStream](sourcesource.md#cancreatewritestream)* -*Defined in [lib/source-destination/source-destination.ts:296](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L296)* +*Defined in [lib/source-destination/source-destination.ts:319](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L319)* **Returns:** *Promise‹boolean›* @@ -256,7 +258,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[canRead](sourcesource.md#canread)* -*Defined in [lib/source-destination/source-destination.ts:280](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L280)* +*Defined in [lib/source-destination/source-destination.ts:303](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L303)* **Returns:** *Promise‹boolean›* @@ -268,7 +270,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[canWrite](sourcesource.md#canwrite)* -*Defined in [lib/source-destination/source-destination.ts:284](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L284)* +*Defined in [lib/source-destination/source-destination.ts:307](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L307)* **Returns:** *Promise‹boolean›* @@ -280,7 +282,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[close](sourcesource.md#close)* -*Defined in [lib/source-destination/source-destination.ts:368](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L368)* +*Defined in [lib/source-destination/source-destination.ts:391](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L391)* **Returns:** *Promise‹void›* @@ -292,7 +294,7 @@ ___ *Overrides [SourceSource](sourcesource.md).[createReadStream](sourcesource.md#createreadstream)* -*Defined in [lib/source-destination/single-use-stream-source.ts:36](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/single-use-stream-source.ts#L36)* +*Defined in [lib/source-destination/single-use-stream-source.ts:36](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/single-use-stream-source.ts#L36)* **Parameters:** @@ -313,7 +315,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[createSparseReadStream](sourcesource.md#createsparsereadstream)* -*Defined in [lib/source-destination/source-destination.ts:339](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L339)* +*Defined in [lib/source-destination/source-destination.ts:362](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L362)* **Parameters:** @@ -331,7 +333,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[createSparseWriteStream](sourcesource.md#createsparsewritestream)* -*Defined in [lib/source-destination/source-destination.ts:355](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L355)* +*Defined in [lib/source-destination/source-destination.ts:378](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L378)* **Parameters:** @@ -351,7 +353,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[createVerifier](sourcesource.md#createverifier)* -*Defined in [lib/source-destination/source-destination.ts:383](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L383)* +*Defined in [lib/source-destination/source-destination.ts:406](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L406)* **Parameters:** @@ -370,7 +372,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[createWriteStream](sourcesource.md#createwritestream)* -*Defined in [lib/source-destination/source-destination.ts:349](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L349)* +*Defined in [lib/source-destination/source-destination.ts:372](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L372)* **Parameters:** @@ -392,7 +394,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[emit](../interfaces/sparsereadable.md#emit)* -Defined in node_modules/@types/node/base.d.ts:908 +Defined in node_modules/@types/node/events.d.ts:32 **Parameters:** @@ -413,7 +415,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[eventNames](../interfaces/sparsereadable.md#eventnames)* -Defined in node_modules/@types/node/base.d.ts:909 +Defined in node_modules/@types/node/events.d.ts:33 **Returns:** *Array‹string | symbol›* @@ -425,7 +427,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[getAlignment](sourcesource.md#getalignment)* -*Defined in [lib/source-destination/source-destination.ts:276](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L276)* +*Defined in [lib/source-destination/source-destination.ts:299](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L299)* **Returns:** *number | undefined* @@ -437,7 +439,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[getBlocks](sourcesource.md#getblocks)* -*Defined in [lib/source-destination/source-destination.ts:345](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L345)* +*Defined in [lib/source-destination/source-destination.ts:368](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L368)* **Returns:** *Promise‹[BlocksWithChecksum](../interfaces/blockswithchecksum.md)[]›* @@ -449,7 +451,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[getInnerSource](sourcesource.md#getinnersource)* -*Defined in [lib/source-destination/source-destination.ts:452](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L452)* +*Defined in [lib/source-destination/source-destination.ts:475](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L475)* **Returns:** *Promise‹[SourceDestination](sourcedestination.md)›* @@ -463,7 +465,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[getMaxListeners](../interfaces/sparsereadable.md#getmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:906 +Defined in node_modules/@types/node/events.d.ts:29 **Returns:** *number* @@ -475,7 +477,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[getMetadata](sourcesource.md#getmetadata)* -*Defined in [lib/source-destination/source-destination.ts:304](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L304)* +*Defined in [lib/source-destination/source-destination.ts:327](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L327)* **Returns:** *Promise‹[Metadata](../interfaces/metadata.md)›* @@ -487,7 +489,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[getPartitionTable](sourcesource.md#getpartitiontable)* -*Defined in [lib/source-destination/source-destination.ts:473](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L473)* +*Defined in [lib/source-destination/source-destination.ts:496](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L496)* **Returns:** *Promise‹GetPartitionsResult | undefined›* @@ -501,7 +503,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[listenerCount](../interfaces/sparsereadable.md#listenercount)* -Defined in node_modules/@types/node/base.d.ts:910 +Defined in node_modules/@types/node/events.d.ts:34 **Parameters:** @@ -521,7 +523,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[listeners](../interfaces/sparsereadable.md#listeners)* -Defined in node_modules/@types/node/base.d.ts:907 +Defined in node_modules/@types/node/events.d.ts:30 **Parameters:** @@ -533,6 +535,34 @@ Name | Type | ___ +### off + +▸ **off**(`event`: string | symbol, `listener`: function): *this* + +*Inherited from [CountingWritable](countingwritable.md).[off](countingwritable.md#off)* + +*Overrides [SparseReadable](../interfaces/sparsereadable.md).[off](../interfaces/sparsereadable.md#off)* + +Defined in node_modules/@types/node/events.d.ts:26 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* + +**Parameters:** + +Name | Type | +------ | ------ | +`...args` | any[] | + +**Returns:** *this* + +___ + ### on ▸ **on**(`event`: string | symbol, `listener`: function): *this* @@ -541,7 +571,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[on](../interfaces/sparsereadable.md#on)* -Defined in node_modules/@types/node/base.d.ts:899 +Defined in node_modules/@types/node/events.d.ts:21 **Parameters:** @@ -569,7 +599,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[once](../interfaces/sparsereadable.md#once)* -Defined in node_modules/@types/node/base.d.ts:900 +Defined in node_modules/@types/node/events.d.ts:22 **Parameters:** @@ -595,7 +625,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[open](sourcesource.md#open)* -*Defined in [lib/source-destination/source-destination.ts:361](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L361)* +*Defined in [lib/source-destination/source-destination.ts:384](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L384)* **Returns:** *Promise‹void›* @@ -609,7 +639,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[prependListener](../interfaces/sparsereadable.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:901 +Defined in node_modules/@types/node/events.d.ts:23 **Parameters:** @@ -637,7 +667,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[prependOnceListener](../interfaces/sparsereadable.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:902 +Defined in node_modules/@types/node/events.d.ts:24 **Parameters:** @@ -657,13 +687,33 @@ Name | Type | ___ +### rawListeners + +▸ **rawListeners**(`event`: string | symbol): *Function[]* + +*Inherited from [CountingWritable](countingwritable.md).[rawListeners](countingwritable.md#rawlisteners)* + +*Overrides [SparseReadable](../interfaces/sparsereadable.md).[rawListeners](../interfaces/sparsereadable.md#rawlisteners)* + +Defined in node_modules/@types/node/events.d.ts:31 + +**Parameters:** + +Name | Type | +------ | ------ | +`event` | string | symbol | + +**Returns:** *Function[]* + +___ + ### read ▸ **read**(`_buffer`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer), `_bufferOffset`: number, `_length`: number, `_sourceOffset`: number): *Promise‹ReadResult›* *Inherited from [SourceSource](sourcesource.md).[read](sourcesource.md#read)* -*Defined in [lib/source-destination/source-destination.ts:315](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L315)* +*Defined in [lib/source-destination/source-destination.ts:338](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L338)* **Parameters:** @@ -686,7 +736,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[removeAllListeners](../interfaces/sparsereadable.md#removealllisteners)* -Defined in node_modules/@types/node/base.d.ts:904 +Defined in node_modules/@types/node/events.d.ts:27 **Parameters:** @@ -706,7 +756,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[removeListener](../interfaces/sparsereadable.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:903 +Defined in node_modules/@types/node/events.d.ts:25 **Parameters:** @@ -734,7 +784,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[setMaxListeners](../interfaces/sparsereadable.md#setmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:905 +Defined in node_modules/@types/node/events.d.ts:28 **Parameters:** @@ -752,7 +802,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[write](sourcesource.md#write)* -*Defined in [lib/source-destination/source-destination.ts:324](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L324)* +*Defined in [lib/source-destination/source-destination.ts:347](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L347)* **Parameters:** @@ -773,7 +823,9 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[listenerCount](countingwritable.md#static-listenercount)* -Defined in node_modules/@types/node/base.d.ts:895 +Defined in node_modules/@types/node/events.d.ts:17 + +**`deprecated`** since v4.0.0 **Parameters:** @@ -792,7 +844,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[register](sourcesource.md#static-register)* -*Defined in [lib/source-destination/source-destination.ts:270](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L270)* +*Defined in [lib/source-destination/source-destination.ts:293](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L293)* **Parameters:** diff --git a/doc/classes/sourcedestination.md b/doc/classes/sourcedestination.md index bc6edf90..8cb4a0da 100644 --- a/doc/classes/sourcedestination.md +++ b/doc/classes/sourcedestination.md @@ -68,11 +68,13 @@ * [getPartitionTable](sourcedestination.md#getpartitiontable) * [listenerCount](sourcedestination.md#listenercount) * [listeners](sourcedestination.md#listeners) +* [off](sourcedestination.md#off) * [on](sourcedestination.md#on) * [once](sourcedestination.md#once) * [open](sourcedestination.md#open) * [prependListener](sourcedestination.md#prependlistener) * [prependOnceListener](sourcedestination.md#prependoncelistener) +* [rawListeners](sourcedestination.md#rawlisteners) * [read](sourcedestination.md#read) * [removeAllListeners](sourcedestination.md#removealllisteners) * [removeListener](sourcedestination.md#removelistener) @@ -87,7 +89,7 @@ • **isOpen**: *boolean* = false -*Defined in [lib/source-destination/source-destination.ts:268](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L268)* +*Defined in [lib/source-destination/source-destination.ts:291](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L291)* ___ @@ -95,7 +97,7 @@ ___ • **metadata**: *[Metadata](../interfaces/metadata.md)* -*Defined in [lib/source-destination/source-destination.ts:267](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L267)* +*Defined in [lib/source-destination/source-destination.ts:290](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L290)* ___ @@ -105,7 +107,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[defaultMaxListeners](countingwritable.md#static-defaultmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:896 +Defined in node_modules/@types/node/events.d.ts:18 ___ @@ -124,7 +126,7 @@ ___ 'wic', ] -*Defined in [lib/source-destination/source-destination.ts:252](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L252)* +*Defined in [lib/source-destination/source-destination.ts:275](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L275)* ___ @@ -132,7 +134,7 @@ ___ ▪ **mimetype**? : *undefined | string* -*Defined in [lib/source-destination/source-destination.ts:264](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L264)* +*Defined in [lib/source-destination/source-destination.ts:287](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L287)* ___ @@ -140,7 +142,7 @@ ___ ▪ **mimetypes**: *Map‹string, [SourceSource](sourcesource.md)›* = new Map() -*Defined in [lib/source-destination/source-destination.ts:265](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L265)* +*Defined in [lib/source-destination/source-destination.ts:288](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L288)* ## Methods @@ -148,7 +150,7 @@ ___ ▸ **_close**(): *Promise‹void›* -*Defined in [lib/source-destination/source-destination.ts:379](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L379)* +*Defined in [lib/source-destination/source-destination.ts:402](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L402)* **Returns:** *Promise‹void›* @@ -158,7 +160,7 @@ ___ ▸ **_getMetadata**(): *Promise‹[Metadata](../interfaces/metadata.md)›* -*Defined in [lib/source-destination/source-destination.ts:311](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L311)* +*Defined in [lib/source-destination/source-destination.ts:334](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L334)* **Returns:** *Promise‹[Metadata](../interfaces/metadata.md)›* @@ -168,7 +170,7 @@ ___ ▸ **_open**(): *Promise‹void›* -*Defined in [lib/source-destination/source-destination.ts:375](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L375)* +*Defined in [lib/source-destination/source-destination.ts:398](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L398)* **Returns:** *Promise‹void›* @@ -182,7 +184,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[addListener](../interfaces/sparsereadable.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:898 +Defined in node_modules/@types/node/events.d.ts:20 **Parameters:** @@ -206,7 +208,7 @@ ___ ▸ **canCreateReadStream**(): *Promise‹boolean›* -*Defined in [lib/source-destination/source-destination.ts:288](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L288)* +*Defined in [lib/source-destination/source-destination.ts:311](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L311)* **Returns:** *Promise‹boolean›* @@ -216,7 +218,7 @@ ___ ▸ **canCreateSparseReadStream**(): *Promise‹boolean›* -*Defined in [lib/source-destination/source-destination.ts:292](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L292)* +*Defined in [lib/source-destination/source-destination.ts:315](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L315)* **Returns:** *Promise‹boolean›* @@ -226,7 +228,7 @@ ___ ▸ **canCreateSparseWriteStream**(): *Promise‹boolean›* -*Defined in [lib/source-destination/source-destination.ts:300](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L300)* +*Defined in [lib/source-destination/source-destination.ts:323](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L323)* **Returns:** *Promise‹boolean›* @@ -236,7 +238,7 @@ ___ ▸ **canCreateWriteStream**(): *Promise‹boolean›* -*Defined in [lib/source-destination/source-destination.ts:296](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L296)* +*Defined in [lib/source-destination/source-destination.ts:319](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L319)* **Returns:** *Promise‹boolean›* @@ -246,7 +248,7 @@ ___ ▸ **canRead**(): *Promise‹boolean›* -*Defined in [lib/source-destination/source-destination.ts:280](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L280)* +*Defined in [lib/source-destination/source-destination.ts:303](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L303)* **Returns:** *Promise‹boolean›* @@ -256,7 +258,7 @@ ___ ▸ **canWrite**(): *Promise‹boolean›* -*Defined in [lib/source-destination/source-destination.ts:284](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L284)* +*Defined in [lib/source-destination/source-destination.ts:307](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L307)* **Returns:** *Promise‹boolean›* @@ -266,7 +268,7 @@ ___ ▸ **close**(): *Promise‹void›* -*Defined in [lib/source-destination/source-destination.ts:368](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L368)* +*Defined in [lib/source-destination/source-destination.ts:391](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L391)* **Returns:** *Promise‹void›* @@ -276,7 +278,7 @@ ___ ▸ **createReadStream**(`_options`: [CreateReadStreamOptions](../interfaces/createreadstreamoptions.md)): *Promise‹ReadableStream›* -*Defined in [lib/source-destination/source-destination.ts:333](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L333)* +*Defined in [lib/source-destination/source-destination.ts:356](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L356)* **Parameters:** @@ -292,7 +294,7 @@ ___ ▸ **createSparseReadStream**(`_options`: [CreateSparseReadStreamOptions](../interfaces/createsparsereadstreamoptions.md)): *Promise‹[SparseReadable](../interfaces/sparsereadable.md)›* -*Defined in [lib/source-destination/source-destination.ts:339](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L339)* +*Defined in [lib/source-destination/source-destination.ts:362](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L362)* **Parameters:** @@ -308,7 +310,7 @@ ___ ▸ **createSparseWriteStream**(`_options`: object): *Promise‹[SparseWritable](../interfaces/sparsewritable.md)›* -*Defined in [lib/source-destination/source-destination.ts:355](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L355)* +*Defined in [lib/source-destination/source-destination.ts:378](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L378)* **Parameters:** @@ -326,7 +328,7 @@ ___ ▸ **createVerifier**(`checksumOrBlocks`: string | [BlocksWithChecksum](../interfaces/blockswithchecksum.md)[], `size?`: undefined | number): *[Verifier](verifier.md)* -*Defined in [lib/source-destination/source-destination.ts:383](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L383)* +*Defined in [lib/source-destination/source-destination.ts:406](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L406)* **Parameters:** @@ -343,7 +345,7 @@ ___ ▸ **createWriteStream**(`_options`: object): *Promise‹WritableStream›* -*Defined in [lib/source-destination/source-destination.ts:349](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L349)* +*Defined in [lib/source-destination/source-destination.ts:372](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L372)* **Parameters:** @@ -365,7 +367,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[emit](../interfaces/sparsereadable.md#emit)* -Defined in node_modules/@types/node/base.d.ts:908 +Defined in node_modules/@types/node/events.d.ts:32 **Parameters:** @@ -386,7 +388,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[eventNames](../interfaces/sparsereadable.md#eventnames)* -Defined in node_modules/@types/node/base.d.ts:909 +Defined in node_modules/@types/node/events.d.ts:33 **Returns:** *Array‹string | symbol›* @@ -396,7 +398,7 @@ ___ ▸ **getAlignment**(): *number | undefined* -*Defined in [lib/source-destination/source-destination.ts:276](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L276)* +*Defined in [lib/source-destination/source-destination.ts:299](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L299)* **Returns:** *number | undefined* @@ -406,7 +408,7 @@ ___ ▸ **getBlocks**(): *Promise‹[BlocksWithChecksum](../interfaces/blockswithchecksum.md)[]›* -*Defined in [lib/source-destination/source-destination.ts:345](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L345)* +*Defined in [lib/source-destination/source-destination.ts:368](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L368)* **Returns:** *Promise‹[BlocksWithChecksum](../interfaces/blockswithchecksum.md)[]›* @@ -416,7 +418,7 @@ ___ ▸ **getInnerSource**(): *Promise‹[SourceDestination](sourcedestination.md)›* -*Defined in [lib/source-destination/source-destination.ts:452](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L452)* +*Defined in [lib/source-destination/source-destination.ts:475](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L475)* **Returns:** *Promise‹[SourceDestination](sourcedestination.md)›* @@ -426,7 +428,7 @@ ___ ▸ **getInnerSourceHelper**(`mimetype?`: undefined | string): *Promise‹[SourceDestination](sourcedestination.md)‹››* -*Defined in [lib/source-destination/source-destination.ts:435](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L435)* +*Defined in [lib/source-destination/source-destination.ts:458](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L458)* **Parameters:** @@ -446,7 +448,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[getMaxListeners](../interfaces/sparsereadable.md#getmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:906 +Defined in node_modules/@types/node/events.d.ts:29 **Returns:** *number* @@ -456,7 +458,7 @@ ___ ▸ **getMetadata**(): *Promise‹[Metadata](../interfaces/metadata.md)›* -*Defined in [lib/source-destination/source-destination.ts:304](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L304)* +*Defined in [lib/source-destination/source-destination.ts:327](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L327)* **Returns:** *Promise‹[Metadata](../interfaces/metadata.md)›* @@ -466,7 +468,7 @@ ___ ▸ **getMimeTypeFromContent**(): *Promise‹string | undefined›* -*Defined in [lib/source-destination/source-destination.ts:417](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L417)* +*Defined in [lib/source-destination/source-destination.ts:440](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L440)* **Returns:** *Promise‹string | undefined›* @@ -476,7 +478,7 @@ ___ ▸ **getMimeTypeFromName**(): *Promise‹string | undefined›* -*Defined in [lib/source-destination/source-destination.ts:406](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L406)* +*Defined in [lib/source-destination/source-destination.ts:429](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L429)* **Returns:** *Promise‹string | undefined›* @@ -486,7 +488,7 @@ ___ ▸ **getPartitionTable**(): *Promise‹GetPartitionsResult | undefined›* -*Defined in [lib/source-destination/source-destination.ts:473](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L473)* +*Defined in [lib/source-destination/source-destination.ts:496](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L496)* **Returns:** *Promise‹GetPartitionsResult | undefined›* @@ -500,7 +502,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[listenerCount](../interfaces/sparsereadable.md#listenercount)* -Defined in node_modules/@types/node/base.d.ts:910 +Defined in node_modules/@types/node/events.d.ts:34 **Parameters:** @@ -520,7 +522,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[listeners](../interfaces/sparsereadable.md#listeners)* -Defined in node_modules/@types/node/base.d.ts:907 +Defined in node_modules/@types/node/events.d.ts:30 **Parameters:** @@ -532,6 +534,34 @@ Name | Type | ___ +### off + +▸ **off**(`event`: string | symbol, `listener`: function): *this* + +*Inherited from [CountingWritable](countingwritable.md).[off](countingwritable.md#off)* + +*Overrides [SparseReadable](../interfaces/sparsereadable.md).[off](../interfaces/sparsereadable.md#off)* + +Defined in node_modules/@types/node/events.d.ts:26 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* + +**Parameters:** + +Name | Type | +------ | ------ | +`...args` | any[] | + +**Returns:** *this* + +___ + ### on ▸ **on**(`event`: string | symbol, `listener`: function): *this* @@ -540,7 +570,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[on](../interfaces/sparsereadable.md#on)* -Defined in node_modules/@types/node/base.d.ts:899 +Defined in node_modules/@types/node/events.d.ts:21 **Parameters:** @@ -568,7 +598,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[once](../interfaces/sparsereadable.md#once)* -Defined in node_modules/@types/node/base.d.ts:900 +Defined in node_modules/@types/node/events.d.ts:22 **Parameters:** @@ -592,7 +622,7 @@ ___ ▸ **open**(): *Promise‹void›* -*Defined in [lib/source-destination/source-destination.ts:361](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L361)* +*Defined in [lib/source-destination/source-destination.ts:384](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L384)* **Returns:** *Promise‹void›* @@ -606,7 +636,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[prependListener](../interfaces/sparsereadable.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:901 +Defined in node_modules/@types/node/events.d.ts:23 **Parameters:** @@ -634,7 +664,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[prependOnceListener](../interfaces/sparsereadable.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:902 +Defined in node_modules/@types/node/events.d.ts:24 **Parameters:** @@ -654,11 +684,31 @@ Name | Type | ___ +### rawListeners + +▸ **rawListeners**(`event`: string | symbol): *Function[]* + +*Inherited from [CountingWritable](countingwritable.md).[rawListeners](countingwritable.md#rawlisteners)* + +*Overrides [SparseReadable](../interfaces/sparsereadable.md).[rawListeners](../interfaces/sparsereadable.md#rawlisteners)* + +Defined in node_modules/@types/node/events.d.ts:31 + +**Parameters:** + +Name | Type | +------ | ------ | +`event` | string | symbol | + +**Returns:** *Function[]* + +___ + ### read ▸ **read**(`_buffer`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer), `_bufferOffset`: number, `_length`: number, `_sourceOffset`: number): *Promise‹ReadResult›* -*Defined in [lib/source-destination/source-destination.ts:315](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L315)* +*Defined in [lib/source-destination/source-destination.ts:338](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L338)* **Parameters:** @@ -681,7 +731,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[removeAllListeners](../interfaces/sparsereadable.md#removealllisteners)* -Defined in node_modules/@types/node/base.d.ts:904 +Defined in node_modules/@types/node/events.d.ts:27 **Parameters:** @@ -701,7 +751,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[removeListener](../interfaces/sparsereadable.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:903 +Defined in node_modules/@types/node/events.d.ts:25 **Parameters:** @@ -729,7 +779,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[setMaxListeners](../interfaces/sparsereadable.md#setmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:905 +Defined in node_modules/@types/node/events.d.ts:28 **Parameters:** @@ -745,7 +795,7 @@ ___ ▸ **write**(`_buffer`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer), `_bufferOffset`: number, `_length`: number, `_fileOffset`: number): *Promise‹WriteResult›* -*Defined in [lib/source-destination/source-destination.ts:324](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L324)* +*Defined in [lib/source-destination/source-destination.ts:347](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L347)* **Parameters:** @@ -766,7 +816,9 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[listenerCount](countingwritable.md#static-listenercount)* -Defined in node_modules/@types/node/base.d.ts:895 +Defined in node_modules/@types/node/events.d.ts:17 + +**`deprecated`** since v4.0.0 **Parameters:** @@ -783,7 +835,7 @@ ___ ▸ **register**(`Cls`: typeof SourceSource): *void* -*Defined in [lib/source-destination/source-destination.ts:270](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L270)* +*Defined in [lib/source-destination/source-destination.ts:293](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L293)* **Parameters:** diff --git a/doc/classes/sourcedestinationfs.md b/doc/classes/sourcedestinationfs.md index 10e69d7a..ec9bcda1 100644 --- a/doc/classes/sourcedestinationfs.md +++ b/doc/classes/sourcedestinationfs.md @@ -29,7 +29,7 @@ \+ **new SourceDestinationFs**(`source`: [SourceDestination](sourcedestination.md)): *[SourceDestinationFs](sourcedestinationfs.md)* -*Defined in [lib/source-destination/source-destination.ts:74](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L74)* +*Defined in [lib/source-destination/source-destination.ts:97](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L97)* **Parameters:** @@ -45,7 +45,7 @@ Name | Type | • **source**: *[SourceDestination](sourcedestination.md)* -*Defined in [lib/source-destination/source-destination.ts:76](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L76)* +*Defined in [lib/source-destination/source-destination.ts:99](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L99)* ## Methods @@ -53,7 +53,7 @@ Name | Type | ▸ **close**(`_fd`: number, `callback`: function): *void* -*Defined in [lib/source-destination/source-destination.ts:86](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L86)* +*Defined in [lib/source-destination/source-destination.ts:109](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L109)* **Parameters:** @@ -77,7 +77,7 @@ ___ ▸ **fstat**(`_fd`: number, `callback`: function): *void* -*Defined in [lib/source-destination/source-destination.ts:90](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L90)* +*Defined in [lib/source-destination/source-destination.ts:113](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L113)* **Parameters:** @@ -102,7 +102,7 @@ ___ ▸ **open**(`_path`: string, `_options`: any, `callback`: function): *void* -*Defined in [lib/source-destination/source-destination.ts:78](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L78)* +*Defined in [lib/source-destination/source-destination.ts:101](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L101)* **Parameters:** @@ -129,7 +129,7 @@ ___ ▸ **read**(`_fd`: number, `buffer`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer), `bufferOffset`: number, `length`: number, `sourceOffset`: number, `callback`: function): *void* -*Defined in [lib/source-destination/source-destination.ts:106](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L106)* +*Defined in [lib/source-destination/source-destination.ts:129](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L129)* **Parameters:** diff --git a/doc/classes/sourcedisk.md b/doc/classes/sourcedisk.md index e402dd48..175611c0 100644 --- a/doc/classes/sourcedisk.md +++ b/doc/classes/sourcedisk.md @@ -48,7 +48,7 @@ *Overrides void* -*Defined in [lib/source-destination/configured-source/configured-source.ts:47](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/configured-source/configured-source.ts#L47)* +*Defined in [lib/source-destination/configured-source/configured-source.ts:47](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/configured-source/configured-source.ts#L47)* **Parameters:** @@ -124,7 +124,7 @@ ___ • **source**: *[SourceDestination](sourcedestination.md)* -*Defined in [lib/source-destination/configured-source/configured-source.ts:48](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/configured-source/configured-source.ts#L48)* +*Defined in [lib/source-destination/configured-source/configured-source.ts:48](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/configured-source/configured-source.ts#L48)* ## Methods @@ -134,7 +134,7 @@ ___ *Overrides void* -*Defined in [lib/source-destination/configured-source/configured-source.ts:84](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/configured-source/configured-source.ts#L84)* +*Defined in [lib/source-destination/configured-source/configured-source.ts:84](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/configured-source/configured-source.ts#L84)* **Returns:** *Promise‹void›* @@ -146,7 +146,7 @@ ___ *Overrides void* -*Defined in [lib/source-destination/configured-source/configured-source.ts:57](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/configured-source/configured-source.ts#L57)* +*Defined in [lib/source-destination/configured-source/configured-source.ts:57](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/configured-source/configured-source.ts#L57)* **Returns:** *Promise‹number›* @@ -158,7 +158,7 @@ ___ *Overrides void* -*Defined in [lib/source-destination/configured-source/configured-source.ts:66](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/configured-source/configured-source.ts#L66)* +*Defined in [lib/source-destination/configured-source/configured-source.ts:66](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/configured-source/configured-source.ts#L66)* **Parameters:** @@ -179,7 +179,7 @@ ___ *Overrides void* -*Defined in [lib/source-destination/configured-source/configured-source.ts:75](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/configured-source/configured-source.ts#L75)* +*Defined in [lib/source-destination/configured-source/configured-source.ts:75](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/configured-source/configured-source.ts#L75)* **Parameters:** diff --git a/doc/classes/sourcerandomaccessreader.md b/doc/classes/sourcerandomaccessreader.md index 4941b23f..1b368efa 100644 --- a/doc/classes/sourcerandomaccessreader.md +++ b/doc/classes/sourcerandomaccessreader.md @@ -30,10 +30,12 @@ * [getMaxListeners](sourcerandomaccessreader.md#getmaxlisteners) * [listenerCount](sourcerandomaccessreader.md#listenercount) * [listeners](sourcerandomaccessreader.md#listeners) +* [off](sourcerandomaccessreader.md#off) * [on](sourcerandomaccessreader.md#on) * [once](sourcerandomaccessreader.md#once) * [prependListener](sourcerandomaccessreader.md#prependlistener) * [prependOnceListener](sourcerandomaccessreader.md#prependoncelistener) +* [rawListeners](sourcerandomaccessreader.md#rawlisteners) * [read](sourcerandomaccessreader.md#read) * [removeAllListeners](sourcerandomaccessreader.md#removealllisteners) * [removeListener](sourcerandomaccessreader.md#removelistener) @@ -46,7 +48,7 @@ \+ **new SourceRandomAccessReader**(`source`: [SourceDestination](sourcedestination.md)): *[SourceRandomAccessReader](sourcerandomaccessreader.md)* -*Defined in [lib/source-destination/zip.ts:132](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/zip.ts#L132)* +*Defined in [lib/source-destination/zip.ts:132](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/zip.ts#L132)* **Parameters:** @@ -62,7 +64,7 @@ Name | Type | • **source**: *[SourceDestination](sourcedestination.md)* -*Defined in [lib/source-destination/zip.ts:133](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/zip.ts#L133)* +*Defined in [lib/source-destination/zip.ts:133](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/zip.ts#L133)* ___ @@ -72,7 +74,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[defaultMaxListeners](countingwritable.md#static-defaultmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:896 +Defined in node_modules/@types/node/events.d.ts:18 ## Methods @@ -82,7 +84,7 @@ Defined in node_modules/@types/node/base.d.ts:896 *Overrides void* -*Defined in [lib/source-destination/zip.ts:137](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/zip.ts#L137)* +*Defined in [lib/source-destination/zip.ts:137](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/zip.ts#L137)* **Parameters:** @@ -103,7 +105,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[addListener](../interfaces/sparsereadable.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:898 +Defined in node_modules/@types/node/events.d.ts:20 **Parameters:** @@ -176,7 +178,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[emit](../interfaces/sparsereadable.md#emit)* -Defined in node_modules/@types/node/base.d.ts:908 +Defined in node_modules/@types/node/events.d.ts:32 **Parameters:** @@ -197,7 +199,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[eventNames](../interfaces/sparsereadable.md#eventnames)* -Defined in node_modules/@types/node/base.d.ts:909 +Defined in node_modules/@types/node/events.d.ts:33 **Returns:** *Array‹string | symbol›* @@ -211,7 +213,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[getMaxListeners](../interfaces/sparsereadable.md#getmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:906 +Defined in node_modules/@types/node/events.d.ts:29 **Returns:** *number* @@ -225,7 +227,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[listenerCount](../interfaces/sparsereadable.md#listenercount)* -Defined in node_modules/@types/node/base.d.ts:910 +Defined in node_modules/@types/node/events.d.ts:34 **Parameters:** @@ -245,7 +247,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[listeners](../interfaces/sparsereadable.md#listeners)* -Defined in node_modules/@types/node/base.d.ts:907 +Defined in node_modules/@types/node/events.d.ts:30 **Parameters:** @@ -257,6 +259,34 @@ Name | Type | ___ +### off + +▸ **off**(`event`: string | symbol, `listener`: function): *this* + +*Inherited from [CountingWritable](countingwritable.md).[off](countingwritable.md#off)* + +*Overrides [SparseReadable](../interfaces/sparsereadable.md).[off](../interfaces/sparsereadable.md#off)* + +Defined in node_modules/@types/node/events.d.ts:26 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* + +**Parameters:** + +Name | Type | +------ | ------ | +`...args` | any[] | + +**Returns:** *this* + +___ + ### on ▸ **on**(`event`: string | symbol, `listener`: function): *this* @@ -265,7 +295,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[on](../interfaces/sparsereadable.md#on)* -Defined in node_modules/@types/node/base.d.ts:899 +Defined in node_modules/@types/node/events.d.ts:21 **Parameters:** @@ -293,7 +323,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[once](../interfaces/sparsereadable.md#once)* -Defined in node_modules/@types/node/base.d.ts:900 +Defined in node_modules/@types/node/events.d.ts:22 **Parameters:** @@ -321,7 +351,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[prependListener](../interfaces/sparsereadable.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:901 +Defined in node_modules/@types/node/events.d.ts:23 **Parameters:** @@ -349,7 +379,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[prependOnceListener](../interfaces/sparsereadable.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:902 +Defined in node_modules/@types/node/events.d.ts:24 **Parameters:** @@ -369,6 +399,26 @@ Name | Type | ___ +### rawListeners + +▸ **rawListeners**(`event`: string | symbol): *Function[]* + +*Inherited from [CountingWritable](countingwritable.md).[rawListeners](countingwritable.md#rawlisteners)* + +*Overrides [SparseReadable](../interfaces/sparsereadable.md).[rawListeners](../interfaces/sparsereadable.md#rawlisteners)* + +Defined in node_modules/@types/node/events.d.ts:31 + +**Parameters:** + +Name | Type | +------ | ------ | +`event` | string | symbol | + +**Returns:** *Function[]* + +___ + ### read ▸ **read**(`buffer`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer), `offset`: number, `length`: number, `position`: number, `callback`: function): *void* @@ -409,7 +459,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[removeAllListeners](../interfaces/sparsereadable.md#removealllisteners)* -Defined in node_modules/@types/node/base.d.ts:904 +Defined in node_modules/@types/node/events.d.ts:27 **Parameters:** @@ -429,7 +479,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[removeListener](../interfaces/sparsereadable.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:903 +Defined in node_modules/@types/node/events.d.ts:25 **Parameters:** @@ -457,7 +507,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[setMaxListeners](../interfaces/sparsereadable.md#setmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:905 +Defined in node_modules/@types/node/events.d.ts:28 **Parameters:** @@ -475,7 +525,9 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[listenerCount](countingwritable.md#static-listenercount)* -Defined in node_modules/@types/node/base.d.ts:895 +Defined in node_modules/@types/node/events.d.ts:17 + +**`deprecated`** since v4.0.0 **Parameters:** diff --git a/doc/classes/sourcesource.md b/doc/classes/sourcesource.md index 5cee8a0e..54d0a590 100644 --- a/doc/classes/sourcesource.md +++ b/doc/classes/sourcesource.md @@ -62,11 +62,13 @@ * [getPartitionTable](sourcesource.md#getpartitiontable) * [listenerCount](sourcesource.md#listenercount) * [listeners](sourcesource.md#listeners) +* [off](sourcesource.md#off) * [on](sourcesource.md#on) * [once](sourcesource.md#once) * [open](sourcesource.md#open) * [prependListener](sourcesource.md#prependlistener) * [prependOnceListener](sourcesource.md#prependoncelistener) +* [rawListeners](sourcesource.md#rawlisteners) * [read](sourcesource.md#read) * [removeAllListeners](sourcesource.md#removealllisteners) * [removeListener](sourcesource.md#removelistener) @@ -81,7 +83,7 @@ \+ **new SourceSource**(`source`: [SourceDestination](sourcedestination.md)): *[SourceSource](sourcesource.md)* -*Defined in [lib/source-destination/source-source.ts:20](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-source.ts#L20)* +*Defined in [lib/source-destination/source-source.ts:20](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-source.ts#L20)* **Parameters:** @@ -97,7 +99,7 @@ Name | Type | • **source**: *[SourceDestination](sourcedestination.md)* -*Defined in [lib/source-destination/source-source.ts:22](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-source.ts#L22)* +*Defined in [lib/source-destination/source-source.ts:22](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-source.ts#L22)* ___ @@ -107,7 +109,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[defaultMaxListeners](countingwritable.md#static-defaultmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:896 +Defined in node_modules/@types/node/events.d.ts:18 ___ @@ -128,7 +130,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[imageExtensions](sourcesource.md#static-imageextensions)* -*Defined in [lib/source-destination/source-destination.ts:252](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L252)* +*Defined in [lib/source-destination/source-destination.ts:275](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L275)* ___ @@ -138,7 +140,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[mimetype](sourcesource.md#static-optional-mimetype)* -*Defined in [lib/source-destination/source-destination.ts:264](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L264)* +*Defined in [lib/source-destination/source-destination.ts:287](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L287)* ___ @@ -146,7 +148,7 @@ ___ ▪ **requiresRandomReadableSource**: *boolean* = false -*Defined in [lib/source-destination/source-source.ts:20](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-source.ts#L20)* +*Defined in [lib/source-destination/source-source.ts:20](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-source.ts#L20)* ## Methods @@ -156,7 +158,7 @@ ___ *Overrides [SourceDestination](sourcedestination.md).[_close](sourcedestination.md#protected-_close)* -*Defined in [lib/source-destination/source-source.ts:30](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-source.ts#L30)* +*Defined in [lib/source-destination/source-source.ts:30](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-source.ts#L30)* **Returns:** *Promise‹void›* @@ -168,7 +170,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[_getMetadata](sourcesource.md#protected-_getmetadata)* -*Defined in [lib/source-destination/source-destination.ts:311](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L311)* +*Defined in [lib/source-destination/source-destination.ts:334](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L334)* **Returns:** *Promise‹[Metadata](../interfaces/metadata.md)›* @@ -180,7 +182,7 @@ ___ *Overrides [SourceDestination](sourcedestination.md).[_open](sourcedestination.md#protected-_open)* -*Defined in [lib/source-destination/source-source.ts:26](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-source.ts#L26)* +*Defined in [lib/source-destination/source-source.ts:26](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-source.ts#L26)* **Returns:** *Promise‹void›* @@ -194,7 +196,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[addListener](../interfaces/sparsereadable.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:898 +Defined in node_modules/@types/node/events.d.ts:20 **Parameters:** @@ -220,7 +222,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[canCreateReadStream](sourcesource.md#cancreatereadstream)* -*Defined in [lib/source-destination/source-destination.ts:288](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L288)* +*Defined in [lib/source-destination/source-destination.ts:311](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L311)* **Returns:** *Promise‹boolean›* @@ -232,7 +234,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[canCreateSparseReadStream](sourcesource.md#cancreatesparsereadstream)* -*Defined in [lib/source-destination/source-destination.ts:292](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L292)* +*Defined in [lib/source-destination/source-destination.ts:315](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L315)* **Returns:** *Promise‹boolean›* @@ -244,7 +246,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[canCreateSparseWriteStream](sourcesource.md#cancreatesparsewritestream)* -*Defined in [lib/source-destination/source-destination.ts:300](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L300)* +*Defined in [lib/source-destination/source-destination.ts:323](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L323)* **Returns:** *Promise‹boolean›* @@ -256,7 +258,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[canCreateWriteStream](sourcesource.md#cancreatewritestream)* -*Defined in [lib/source-destination/source-destination.ts:296](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L296)* +*Defined in [lib/source-destination/source-destination.ts:319](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L319)* **Returns:** *Promise‹boolean›* @@ -268,7 +270,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[canRead](sourcesource.md#canread)* -*Defined in [lib/source-destination/source-destination.ts:280](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L280)* +*Defined in [lib/source-destination/source-destination.ts:303](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L303)* **Returns:** *Promise‹boolean›* @@ -280,7 +282,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[canWrite](sourcesource.md#canwrite)* -*Defined in [lib/source-destination/source-destination.ts:284](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L284)* +*Defined in [lib/source-destination/source-destination.ts:307](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L307)* **Returns:** *Promise‹boolean›* @@ -292,7 +294,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[close](sourcesource.md#close)* -*Defined in [lib/source-destination/source-destination.ts:368](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L368)* +*Defined in [lib/source-destination/source-destination.ts:391](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L391)* **Returns:** *Promise‹void›* @@ -304,7 +306,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[createReadStream](sourcesource.md#createreadstream)* -*Defined in [lib/source-destination/source-destination.ts:333](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L333)* +*Defined in [lib/source-destination/source-destination.ts:356](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L356)* **Parameters:** @@ -322,7 +324,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[createSparseReadStream](sourcesource.md#createsparsereadstream)* -*Defined in [lib/source-destination/source-destination.ts:339](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L339)* +*Defined in [lib/source-destination/source-destination.ts:362](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L362)* **Parameters:** @@ -340,7 +342,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[createSparseWriteStream](sourcesource.md#createsparsewritestream)* -*Defined in [lib/source-destination/source-destination.ts:355](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L355)* +*Defined in [lib/source-destination/source-destination.ts:378](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L378)* **Parameters:** @@ -360,7 +362,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[createVerifier](sourcesource.md#createverifier)* -*Defined in [lib/source-destination/source-destination.ts:383](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L383)* +*Defined in [lib/source-destination/source-destination.ts:406](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L406)* **Parameters:** @@ -379,7 +381,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[createWriteStream](sourcesource.md#createwritestream)* -*Defined in [lib/source-destination/source-destination.ts:349](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L349)* +*Defined in [lib/source-destination/source-destination.ts:372](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L372)* **Parameters:** @@ -401,7 +403,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[emit](../interfaces/sparsereadable.md#emit)* -Defined in node_modules/@types/node/base.d.ts:908 +Defined in node_modules/@types/node/events.d.ts:32 **Parameters:** @@ -422,7 +424,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[eventNames](../interfaces/sparsereadable.md#eventnames)* -Defined in node_modules/@types/node/base.d.ts:909 +Defined in node_modules/@types/node/events.d.ts:33 **Returns:** *Array‹string | symbol›* @@ -434,7 +436,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[getAlignment](sourcesource.md#getalignment)* -*Defined in [lib/source-destination/source-destination.ts:276](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L276)* +*Defined in [lib/source-destination/source-destination.ts:299](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L299)* **Returns:** *number | undefined* @@ -446,7 +448,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[getBlocks](sourcesource.md#getblocks)* -*Defined in [lib/source-destination/source-destination.ts:345](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L345)* +*Defined in [lib/source-destination/source-destination.ts:368](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L368)* **Returns:** *Promise‹[BlocksWithChecksum](../interfaces/blockswithchecksum.md)[]›* @@ -458,7 +460,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[getInnerSource](sourcesource.md#getinnersource)* -*Defined in [lib/source-destination/source-destination.ts:452](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L452)* +*Defined in [lib/source-destination/source-destination.ts:475](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L475)* **Returns:** *Promise‹[SourceDestination](sourcedestination.md)›* @@ -472,7 +474,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[getMaxListeners](../interfaces/sparsereadable.md#getmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:906 +Defined in node_modules/@types/node/events.d.ts:29 **Returns:** *number* @@ -484,7 +486,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[getMetadata](sourcesource.md#getmetadata)* -*Defined in [lib/source-destination/source-destination.ts:304](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L304)* +*Defined in [lib/source-destination/source-destination.ts:327](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L327)* **Returns:** *Promise‹[Metadata](../interfaces/metadata.md)›* @@ -496,7 +498,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[getPartitionTable](sourcesource.md#getpartitiontable)* -*Defined in [lib/source-destination/source-destination.ts:473](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L473)* +*Defined in [lib/source-destination/source-destination.ts:496](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L496)* **Returns:** *Promise‹GetPartitionsResult | undefined›* @@ -510,7 +512,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[listenerCount](../interfaces/sparsereadable.md#listenercount)* -Defined in node_modules/@types/node/base.d.ts:910 +Defined in node_modules/@types/node/events.d.ts:34 **Parameters:** @@ -530,7 +532,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[listeners](../interfaces/sparsereadable.md#listeners)* -Defined in node_modules/@types/node/base.d.ts:907 +Defined in node_modules/@types/node/events.d.ts:30 **Parameters:** @@ -542,6 +544,34 @@ Name | Type | ___ +### off + +▸ **off**(`event`: string | symbol, `listener`: function): *this* + +*Inherited from [CountingWritable](countingwritable.md).[off](countingwritable.md#off)* + +*Overrides [SparseReadable](../interfaces/sparsereadable.md).[off](../interfaces/sparsereadable.md#off)* + +Defined in node_modules/@types/node/events.d.ts:26 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* + +**Parameters:** + +Name | Type | +------ | ------ | +`...args` | any[] | + +**Returns:** *this* + +___ + ### on ▸ **on**(`event`: string | symbol, `listener`: function): *this* @@ -550,7 +580,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[on](../interfaces/sparsereadable.md#on)* -Defined in node_modules/@types/node/base.d.ts:899 +Defined in node_modules/@types/node/events.d.ts:21 **Parameters:** @@ -578,7 +608,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[once](../interfaces/sparsereadable.md#once)* -Defined in node_modules/@types/node/base.d.ts:900 +Defined in node_modules/@types/node/events.d.ts:22 **Parameters:** @@ -604,7 +634,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[open](sourcesource.md#open)* -*Defined in [lib/source-destination/source-destination.ts:361](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L361)* +*Defined in [lib/source-destination/source-destination.ts:384](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L384)* **Returns:** *Promise‹void›* @@ -618,7 +648,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[prependListener](../interfaces/sparsereadable.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:901 +Defined in node_modules/@types/node/events.d.ts:23 **Parameters:** @@ -646,7 +676,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[prependOnceListener](../interfaces/sparsereadable.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:902 +Defined in node_modules/@types/node/events.d.ts:24 **Parameters:** @@ -666,13 +696,33 @@ Name | Type | ___ +### rawListeners + +▸ **rawListeners**(`event`: string | symbol): *Function[]* + +*Inherited from [CountingWritable](countingwritable.md).[rawListeners](countingwritable.md#rawlisteners)* + +*Overrides [SparseReadable](../interfaces/sparsereadable.md).[rawListeners](../interfaces/sparsereadable.md#rawlisteners)* + +Defined in node_modules/@types/node/events.d.ts:31 + +**Parameters:** + +Name | Type | +------ | ------ | +`event` | string | symbol | + +**Returns:** *Function[]* + +___ + ### read ▸ **read**(`_buffer`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer), `_bufferOffset`: number, `_length`: number, `_sourceOffset`: number): *Promise‹ReadResult›* *Inherited from [SourceSource](sourcesource.md).[read](sourcesource.md#read)* -*Defined in [lib/source-destination/source-destination.ts:315](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L315)* +*Defined in [lib/source-destination/source-destination.ts:338](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L338)* **Parameters:** @@ -695,7 +745,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[removeAllListeners](../interfaces/sparsereadable.md#removealllisteners)* -Defined in node_modules/@types/node/base.d.ts:904 +Defined in node_modules/@types/node/events.d.ts:27 **Parameters:** @@ -715,7 +765,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[removeListener](../interfaces/sparsereadable.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:903 +Defined in node_modules/@types/node/events.d.ts:25 **Parameters:** @@ -743,7 +793,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[setMaxListeners](../interfaces/sparsereadable.md#setmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:905 +Defined in node_modules/@types/node/events.d.ts:28 **Parameters:** @@ -761,7 +811,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[write](sourcesource.md#write)* -*Defined in [lib/source-destination/source-destination.ts:324](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L324)* +*Defined in [lib/source-destination/source-destination.ts:347](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L347)* **Parameters:** @@ -782,7 +832,9 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[listenerCount](countingwritable.md#static-listenercount)* -Defined in node_modules/@types/node/base.d.ts:895 +Defined in node_modules/@types/node/events.d.ts:17 + +**`deprecated`** since v4.0.0 **Parameters:** @@ -801,7 +853,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[register](sourcesource.md#static-register)* -*Defined in [lib/source-destination/source-destination.ts:270](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L270)* +*Defined in [lib/source-destination/source-destination.ts:293](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L293)* **Parameters:** diff --git a/doc/classes/sparsefilterstream.md b/doc/classes/sparsefilterstream.md index 98f365bb..c4f1d1e2 100644 --- a/doc/classes/sparsefilterstream.md +++ b/doc/classes/sparsefilterstream.md @@ -26,17 +26,21 @@ * [position](sparsefilterstream.md#private-position) * [readable](sparsefilterstream.md#readable) * [readableHighWaterMark](sparsefilterstream.md#readablehighwatermark) +* [readableLength](sparsefilterstream.md#readablelength) * [state](sparsefilterstream.md#private-optional-state) * [stateIterator](sparsefilterstream.md#private-stateiterator) * [writable](sparsefilterstream.md#writable) * [writableHighWaterMark](sparsefilterstream.md#writablehighwatermark) +* [writableLength](sparsefilterstream.md#writablelength) * [defaultMaxListeners](sparsefilterstream.md#static-defaultmaxlisteners) ### Methods +* [[Symbol.asyncIterator]](sparsefilterstream.md#[symbol.asynciterator]) * [__transform](sparsefilterstream.md#private-__transform) * [_destroy](sparsefilterstream.md#_destroy) * [_final](sparsefilterstream.md#_final) +* [_flush](sparsefilterstream.md#_flush) * [_read](sparsefilterstream.md#_read) * [_transform](sparsefilterstream.md#_transform) * [_write](sparsefilterstream.md#_write) @@ -52,6 +56,7 @@ * [listenerCount](sparsefilterstream.md#listenercount) * [listeners](sparsefilterstream.md#listeners) * [nextBlock](sparsefilterstream.md#private-nextblock) +* [off](sparsefilterstream.md#off) * [on](sparsefilterstream.md#on) * [once](sparsefilterstream.md#once) * [pause](sparsefilterstream.md#pause) @@ -59,6 +64,7 @@ * [prependListener](sparsefilterstream.md#prependlistener) * [prependOnceListener](sparsefilterstream.md#prependoncelistener) * [push](sparsefilterstream.md#push) +* [rawListeners](sparsefilterstream.md#rawlisteners) * [read](sparsefilterstream.md#read) * [removeAllListeners](sparsefilterstream.md#removealllisteners) * [removeListener](sparsefilterstream.md#removelistener) @@ -81,7 +87,7 @@ *Overrides [SourceTransform](../interfaces/sourcetransform.md).[constructor](../interfaces/sourcetransform.md#constructor)* -*Defined in [lib/sparse-stream/sparse-filter-stream.ts:30](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/sparse-stream/sparse-filter-stream.ts#L30)* +*Defined in [lib/sparse-stream/sparse-filter-stream.ts:30](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/sparse-stream/sparse-filter-stream.ts#L30)* **Parameters:** @@ -103,7 +109,7 @@ Name | Type | *Implementation of [SparseReadable](../interfaces/sparsereadable.md).[blocks](../interfaces/sparsereadable.md#blocks)* -*Defined in [lib/sparse-stream/sparse-filter-stream.ts:27](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/sparse-stream/sparse-filter-stream.ts#L27)* +*Defined in [lib/sparse-stream/sparse-filter-stream.ts:27](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/sparse-stream/sparse-filter-stream.ts#L27)* ___ @@ -111,7 +117,7 @@ ___ • **position**: *number* = 0 -*Defined in [lib/sparse-stream/sparse-filter-stream.ts:30](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/sparse-stream/sparse-filter-stream.ts#L30)* +*Defined in [lib/sparse-stream/sparse-filter-stream.ts:30](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/sparse-stream/sparse-filter-stream.ts#L30)* ___ @@ -123,7 +129,7 @@ ___ *Inherited from [SparseFilterStream](sparsefilterstream.md).[readable](sparsefilterstream.md#readable)* -Defined in node_modules/@types/node/base.d.ts:5422 +Defined in node_modules/@types/node/stream.d.ts:20 ___ @@ -133,7 +139,17 @@ ___ *Inherited from [SparseFilterStream](sparsefilterstream.md).[readableHighWaterMark](sparsefilterstream.md#readablehighwatermark)* -Defined in node_modules/@types/node/base.d.ts:5423 +Defined in node_modules/@types/node/stream.d.ts:21 + +___ + +### readableLength + +• **readableLength**: *number* + +*Inherited from [SparseFilterStream](sparsefilterstream.md).[readableLength](sparsefilterstream.md#readablelength)* + +Defined in node_modules/@types/node/stream.d.ts:22 ___ @@ -141,7 +157,7 @@ ___ • **state**? : *[SparseReaderState](../interfaces/sparsereaderstate.md)* -*Defined in [lib/sparse-stream/sparse-filter-stream.ts:29](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/sparse-stream/sparse-filter-stream.ts#L29)* +*Defined in [lib/sparse-stream/sparse-filter-stream.ts:29](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/sparse-stream/sparse-filter-stream.ts#L29)* ___ @@ -149,7 +165,7 @@ ___ • **stateIterator**: *Iterator‹[SparseReaderState](../interfaces/sparsereaderstate.md)›* -*Defined in [lib/sparse-stream/sparse-filter-stream.ts:28](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/sparse-stream/sparse-filter-stream.ts#L28)* +*Defined in [lib/sparse-stream/sparse-filter-stream.ts:28](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/sparse-stream/sparse-filter-stream.ts#L28)* ___ @@ -159,7 +175,7 @@ ___ *Inherited from [SparseFilterStream](sparsefilterstream.md).[writable](sparsefilterstream.md#writable)* -Defined in node_modules/@types/node/base.d.ts:5600 +Defined in node_modules/@types/node/stream.d.ts:209 ___ @@ -169,7 +185,17 @@ ___ *Inherited from [SparseFilterStream](sparsefilterstream.md).[writableHighWaterMark](sparsefilterstream.md#writablehighwatermark)* -Defined in node_modules/@types/node/base.d.ts:5601 +Defined in node_modules/@types/node/stream.d.ts:210 + +___ + +### writableLength + +• **writableLength**: *number* + +*Inherited from [SparseFilterStream](sparsefilterstream.md).[writableLength](sparsefilterstream.md#writablelength)* + +Defined in node_modules/@types/node/stream.d.ts:211 ___ @@ -179,15 +205,29 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[defaultMaxListeners](countingwritable.md#static-defaultmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:896 +Defined in node_modules/@types/node/events.d.ts:18 ## Methods +### [Symbol.asyncIterator] + +▸ **[Symbol.asyncIterator]**(): *AsyncIterableIterator‹any›* + +*Implementation of [SparseReadable](../interfaces/sparsereadable.md)* + +*Inherited from [SparseFilterStream](sparsefilterstream.md).[[Symbol.asyncIterator]](sparsefilterstream.md#[symbol.asynciterator])* + +Defined in node_modules/@types/node/stream.d.ts:95 + +**Returns:** *AsyncIterableIterator‹any›* + +___ + ### `Private` __transform ▸ **__transform**(`buffer`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer)): *void* -*Defined in [lib/sparse-stream/sparse-filter-stream.ts:69](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/sparse-stream/sparse-filter-stream.ts#L69)* +*Defined in [lib/sparse-stream/sparse-filter-stream.ts:69](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/sparse-stream/sparse-filter-stream.ts#L69)* **Parameters:** @@ -207,7 +247,7 @@ ___ *Overrides [SparseReadStream](sparsereadstream.md).[_destroy](sparsereadstream.md#_destroy)* -Defined in node_modules/@types/node/base.d.ts:5605 +Defined in node_modules/@types/node/stream.d.ts:215 **Parameters:** @@ -215,13 +255,13 @@ Defined in node_modules/@types/node/base.d.ts:5605 ▪ **callback**: *function* -▸ (`error?`: [Error](notcapable.md#static-error)): *void* +▸ (`error`: [Error](notcapable.md#static-error) | null): *void* **Parameters:** Name | Type | ------ | ------ | -`error?` | [Error](notcapable.md#static-error) | +`error` | [Error](notcapable.md#static-error) | null | **Returns:** *void* @@ -229,17 +269,41 @@ ___ ### _final -▸ **_final**(`callback`: Function): *void* +▸ **_final**(`callback`: function): *void* *Inherited from [SparseFilterStream](sparsefilterstream.md).[_final](sparsefilterstream.md#_final)* -Defined in node_modules/@types/node/base.d.ts:5606 +Defined in node_modules/@types/node/stream.d.ts:216 + +**Parameters:** + +▪ **callback**: *function* + +▸ (`error?`: [Error](notcapable.md#static-error) | null): *void* + +**Parameters:** + +Name | Type | +------ | ------ | +`error?` | [Error](notcapable.md#static-error) | null | + +**Returns:** *void* + +___ + +### _flush + +▸ **_flush**(`callback`: TransformCallback): *void* + +*Inherited from [SparseFilterStream](sparsefilterstream.md).[_flush](sparsefilterstream.md#_flush)* + +Defined in node_modules/@types/node/stream.d.ts:242 **Parameters:** Name | Type | ------ | ------ | -`callback` | Function | +`callback` | TransformCallback | **Returns:** *void* @@ -251,7 +315,7 @@ ___ *Inherited from [SparseFilterStream](sparsefilterstream.md).[_read](sparsefilterstream.md#_read)* -Defined in node_modules/@types/node/base.d.ts:5425 +Defined in node_modules/@types/node/stream.d.ts:24 **Parameters:** @@ -269,7 +333,7 @@ ___ *Overrides [SourceTransform](../interfaces/sourcetransform.md).[_transform](../interfaces/sourcetransform.md#_transform)* -*Defined in [lib/sparse-stream/sparse-filter-stream.ts:55](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/sparse-stream/sparse-filter-stream.ts#L55)* +*Defined in [lib/sparse-stream/sparse-filter-stream.ts:55](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/sparse-stream/sparse-filter-stream.ts#L55)* **Parameters:** @@ -279,13 +343,13 @@ ___ ▪ **callback**: *function* -▸ (`error`: [Error](notcapable.md#static-error) | null): *void* +▸ (`error?`: [Error](notcapable.md#static-error)): *void* **Parameters:** Name | Type | ------ | ------ | -`error` | [Error](notcapable.md#static-error) | null | +`error?` | [Error](notcapable.md#static-error) | **Returns:** *void* @@ -297,7 +361,7 @@ ___ *Inherited from [SparseFilterStream](sparsefilterstream.md).[_write](sparsefilterstream.md#_write)* -Defined in node_modules/@types/node/base.d.ts:5603 +Defined in node_modules/@types/node/stream.d.ts:213 **Parameters:** @@ -307,13 +371,13 @@ Defined in node_modules/@types/node/base.d.ts:5603 ▪ **callback**: *function* -▸ (`err?`: [Error](notcapable.md#static-error)): *void* +▸ (`error?`: [Error](notcapable.md#static-error) | null): *void* **Parameters:** Name | Type | ------ | ------ | -`err?` | [Error](notcapable.md#static-error) | +`error?` | [Error](notcapable.md#static-error) | null | **Returns:** *void* @@ -325,7 +389,7 @@ ___ *Inherited from [SparseFilterStream](sparsefilterstream.md).[_writev](sparsefilterstream.md#optional-_writev)* -Defined in node_modules/@types/node/base.d.ts:5604 +Defined in node_modules/@types/node/stream.d.ts:214 **Parameters:** @@ -333,13 +397,13 @@ Defined in node_modules/@types/node/base.d.ts:5604 ▪ **callback**: *function* -▸ (`err?`: [Error](notcapable.md#static-error)): *void* +▸ (`error?`: [Error](notcapable.md#static-error) | null): *void* **Parameters:** Name | Type | ------ | ------ | -`err?` | [Error](notcapable.md#static-error) | +`error?` | [Error](notcapable.md#static-error) | null | **Returns:** *void* @@ -347,13 +411,13 @@ ___ ### addListener -▸ **addListener**(`event`: string, `listener`: function): *this* +▸ **addListener**(`event`: "close", `listener`: function): *this* *Inherited from [SparseFilterStream](sparsefilterstream.md).[addListener](sparsefilterstream.md#addlistener)* *Overrides [SourceSource](sourcesource.md).[addListener](sourcesource.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:5447 +Defined in node_modules/@types/node/stream.d.ts:46 Event emitter The defined events on documents including: @@ -365,30 +429,6 @@ The defined events on documents including: **Parameters:** -▪ **event**: *string* - -▪ **listener**: *function* - -▸ (...`args`: any[]): *void* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | any[] | - -**Returns:** *this* - -▸ **addListener**(`event`: "close", `listener`: function): *this* - -*Inherited from [SparseFilterStream](sparsefilterstream.md).[addListener](sparsefilterstream.md#addlistener)* - -*Overrides [SourceSource](sourcesource.md).[addListener](sourcesource.md#addlistener)* - -Defined in node_modules/@types/node/base.d.ts:5448 - -**Parameters:** - ▪ **event**: *"close"* ▪ **listener**: *function* @@ -403,7 +443,7 @@ Defined in node_modules/@types/node/base.d.ts:5448 *Overrides [SourceSource](sourcesource.md).[addListener](sourcesource.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:5449 +Defined in node_modules/@types/node/stream.d.ts:47 **Parameters:** @@ -411,13 +451,13 @@ Defined in node_modules/@types/node/base.d.ts:5449 ▪ **listener**: *function* -▸ (`chunk`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string): *void* +▸ (`chunk`: any): *void* **Parameters:** Name | Type | ------ | ------ | -`chunk` | [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string | +`chunk` | any | **Returns:** *this* @@ -427,7 +467,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[addListener](sourcesource.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:5450 +Defined in node_modules/@types/node/stream.d.ts:48 **Parameters:** @@ -445,7 +485,7 @@ Defined in node_modules/@types/node/base.d.ts:5450 *Overrides [SourceSource](sourcesource.md).[addListener](sourcesource.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:5451 +Defined in node_modules/@types/node/stream.d.ts:49 **Parameters:** @@ -463,7 +503,7 @@ Defined in node_modules/@types/node/base.d.ts:5451 *Overrides [SourceSource](sourcesource.md).[addListener](sourcesource.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:5452 +Defined in node_modules/@types/node/stream.d.ts:50 **Parameters:** @@ -481,6 +521,30 @@ Name | Type | **Returns:** *this* +▸ **addListener**(`event`: string | symbol, `listener`: function): *this* + +*Inherited from [SparseFilterStream](sparsefilterstream.md).[addListener](sparsefilterstream.md#addlistener)* + +*Overrides [SourceSource](sourcesource.md).[addListener](sourcesource.md#addlistener)* + +Defined in node_modules/@types/node/stream.d.ts:51 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* + +**Parameters:** + +Name | Type | +------ | ------ | +`...args` | any[] | + +**Returns:** *this* + ___ ### cork @@ -489,7 +553,7 @@ ___ *Inherited from [SparseFilterStream](sparsefilterstream.md).[cork](sparsefilterstream.md#cork)* -Defined in node_modules/@types/node/base.d.ts:5613 +Defined in node_modules/@types/node/stream.d.ts:223 **Returns:** *void* @@ -501,9 +565,7 @@ ___ *Inherited from [SparseFilterStream](sparsefilterstream.md).[destroy](sparsefilterstream.md#destroy)* -*Overrides [SparseReadStream](sparsereadstream.md).[destroy](sparsereadstream.md#destroy)* - -Defined in node_modules/@types/node/base.d.ts:5625 +Defined in node_modules/@types/node/stream.d.ts:35 **Parameters:** @@ -517,104 +579,104 @@ ___ ### emit -▸ **emit**(`event`: string | symbol, ...`args`: any[]): *boolean* - -*Implementation of [SparseReadable](../interfaces/sparsereadable.md)* +▸ **emit**(`event`: "close"): *boolean* *Inherited from [SparseFilterStream](sparsefilterstream.md).[emit](sparsefilterstream.md#emit)* *Overrides [SourceSource](sourcesource.md).[emit](sourcesource.md#emit)* -Defined in node_modules/@types/node/base.d.ts:5454 +Defined in node_modules/@types/node/stream.d.ts:53 **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`...args` | any[] | +`event` | "close" | **Returns:** *boolean* -▸ **emit**(`event`: "close"): *boolean* +▸ **emit**(`event`: "data", `chunk`: any): *boolean* *Inherited from [SparseFilterStream](sparsefilterstream.md).[emit](sparsefilterstream.md#emit)* *Overrides [SourceSource](sourcesource.md).[emit](sourcesource.md#emit)* -Defined in node_modules/@types/node/base.d.ts:5455 +Defined in node_modules/@types/node/stream.d.ts:54 **Parameters:** Name | Type | ------ | ------ | -`event` | "close" | +`event` | "data" | +`chunk` | any | **Returns:** *boolean* -▸ **emit**(`event`: "data", `chunk`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string): *boolean* +▸ **emit**(`event`: "end"): *boolean* *Inherited from [SparseFilterStream](sparsefilterstream.md).[emit](sparsefilterstream.md#emit)* *Overrides [SourceSource](sourcesource.md).[emit](sourcesource.md#emit)* -Defined in node_modules/@types/node/base.d.ts:5456 +Defined in node_modules/@types/node/stream.d.ts:55 **Parameters:** Name | Type | ------ | ------ | -`event` | "data" | -`chunk` | [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string | +`event` | "end" | **Returns:** *boolean* -▸ **emit**(`event`: "end"): *boolean* +▸ **emit**(`event`: "readable"): *boolean* *Inherited from [SparseFilterStream](sparsefilterstream.md).[emit](sparsefilterstream.md#emit)* *Overrides [SourceSource](sourcesource.md).[emit](sourcesource.md#emit)* -Defined in node_modules/@types/node/base.d.ts:5457 +Defined in node_modules/@types/node/stream.d.ts:56 **Parameters:** Name | Type | ------ | ------ | -`event` | "end" | +`event` | "readable" | **Returns:** *boolean* -▸ **emit**(`event`: "readable"): *boolean* +▸ **emit**(`event`: "error", `err`: [Error](notcapable.md#static-error)): *boolean* *Inherited from [SparseFilterStream](sparsefilterstream.md).[emit](sparsefilterstream.md#emit)* *Overrides [SourceSource](sourcesource.md).[emit](sourcesource.md#emit)* -Defined in node_modules/@types/node/base.d.ts:5458 +Defined in node_modules/@types/node/stream.d.ts:57 **Parameters:** Name | Type | ------ | ------ | -`event` | "readable" | +`event` | "error" | +`err` | [Error](notcapable.md#static-error) | **Returns:** *boolean* -▸ **emit**(`event`: "error", `err`: [Error](notcapable.md#static-error)): *boolean* +▸ **emit**(`event`: string | symbol, ...`args`: any[]): *boolean* + +*Implementation of [SparseReadable](../interfaces/sparsereadable.md)* *Inherited from [SparseFilterStream](sparsefilterstream.md).[emit](sparsefilterstream.md#emit)* *Overrides [SourceSource](sourcesource.md).[emit](sourcesource.md#emit)* -Defined in node_modules/@types/node/base.d.ts:5459 +Defined in node_modules/@types/node/stream.d.ts:58 **Parameters:** Name | Type | ------ | ------ | -`event` | "error" | -`err` | [Error](notcapable.md#static-error) | +`event` | string | symbol | +`...args` | any[] | **Returns:** *boolean* @@ -622,40 +684,40 @@ ___ ### end -▸ **end**(`cb?`: Function): *void* +▸ **end**(`cb?`: undefined | function): *void* *Inherited from [SparseFilterStream](sparsefilterstream.md).[end](sparsefilterstream.md#end)* -Defined in node_modules/@types/node/base.d.ts:5610 +Defined in node_modules/@types/node/stream.d.ts:220 **Parameters:** Name | Type | ------ | ------ | -`cb?` | Function | +`cb?` | undefined | function | **Returns:** *void* -▸ **end**(`chunk`: any, `cb?`: Function): *void* +▸ **end**(`chunk`: any, `cb?`: undefined | function): *void* *Inherited from [SparseFilterStream](sparsefilterstream.md).[end](sparsefilterstream.md#end)* -Defined in node_modules/@types/node/base.d.ts:5611 +Defined in node_modules/@types/node/stream.d.ts:221 **Parameters:** Name | Type | ------ | ------ | `chunk` | any | -`cb?` | Function | +`cb?` | undefined | function | **Returns:** *void* -▸ **end**(`chunk`: any, `encoding?`: undefined | string, `cb?`: Function): *void* +▸ **end**(`chunk`: any, `encoding?`: undefined | string, `cb?`: undefined | function): *void* *Inherited from [SparseFilterStream](sparsefilterstream.md).[end](sparsefilterstream.md#end)* -Defined in node_modules/@types/node/base.d.ts:5612 +Defined in node_modules/@types/node/stream.d.ts:222 **Parameters:** @@ -663,7 +725,7 @@ Name | Type | ------ | ------ | `chunk` | any | `encoding?` | undefined | string | -`cb?` | Function | +`cb?` | undefined | function | **Returns:** *void* @@ -677,7 +739,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[eventNames](countingwritable.md#eventnames)* -Defined in node_modules/@types/node/base.d.ts:909 +Defined in node_modules/@types/node/events.d.ts:33 **Returns:** *Array‹string | symbol›* @@ -691,7 +753,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[getMaxListeners](countingwritable.md#getmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:906 +Defined in node_modules/@types/node/events.d.ts:29 **Returns:** *number* @@ -705,7 +767,7 @@ ___ *Inherited from [SparseFilterStream](sparsefilterstream.md).[isPaused](sparsefilterstream.md#ispaused)* -Defined in node_modules/@types/node/base.d.ts:5430 +Defined in node_modules/@types/node/stream.d.ts:29 **Returns:** *boolean* @@ -719,7 +781,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[listenerCount](countingwritable.md#static-listenercount)* -Defined in node_modules/@types/node/base.d.ts:910 +Defined in node_modules/@types/node/events.d.ts:34 **Parameters:** @@ -739,7 +801,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[listeners](countingwritable.md#listeners)* -Defined in node_modules/@types/node/base.d.ts:907 +Defined in node_modules/@types/node/events.d.ts:30 **Parameters:** @@ -755,25 +817,23 @@ ___ ▸ **nextBlock**(): *void* -*Defined in [lib/sparse-stream/sparse-filter-stream.ts:51](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/sparse-stream/sparse-filter-stream.ts#L51)* +*Defined in [lib/sparse-stream/sparse-filter-stream.ts:51](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/sparse-stream/sparse-filter-stream.ts#L51)* **Returns:** *void* ___ -### on - -▸ **on**(`event`: string, `listener`: function): *this* +### off -*Inherited from [SparseFilterStream](sparsefilterstream.md).[on](sparsefilterstream.md#on)* +▸ **off**(`event`: string | symbol, `listener`: function): *this* -*Overrides [SourceSource](sourcesource.md).[on](sourcesource.md#on)* +*Inherited from [CountingWritable](countingwritable.md).[off](countingwritable.md#off)* -Defined in node_modules/@types/node/base.d.ts:5461 +Defined in node_modules/@types/node/events.d.ts:26 **Parameters:** -▪ **event**: *string* +▪ **event**: *string | symbol* ▪ **listener**: *function* @@ -787,13 +847,17 @@ Name | Type | **Returns:** *this* +___ + +### on + ▸ **on**(`event`: "close", `listener`: function): *this* *Inherited from [SparseFilterStream](sparsefilterstream.md).[on](sparsefilterstream.md#on)* *Overrides [SourceSource](sourcesource.md).[on](sourcesource.md#on)* -Defined in node_modules/@types/node/base.d.ts:5462 +Defined in node_modules/@types/node/stream.d.ts:60 **Parameters:** @@ -811,7 +875,7 @@ Defined in node_modules/@types/node/base.d.ts:5462 *Overrides [SourceSource](sourcesource.md).[on](sourcesource.md#on)* -Defined in node_modules/@types/node/base.d.ts:5463 +Defined in node_modules/@types/node/stream.d.ts:61 **Parameters:** @@ -819,13 +883,13 @@ Defined in node_modules/@types/node/base.d.ts:5463 ▪ **listener**: *function* -▸ (`chunk`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string): *void* +▸ (`chunk`: any): *void* **Parameters:** Name | Type | ------ | ------ | -`chunk` | [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string | +`chunk` | any | **Returns:** *this* @@ -835,7 +899,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[on](sourcesource.md#on)* -Defined in node_modules/@types/node/base.d.ts:5464 +Defined in node_modules/@types/node/stream.d.ts:62 **Parameters:** @@ -853,7 +917,7 @@ Defined in node_modules/@types/node/base.d.ts:5464 *Overrides [SourceSource](sourcesource.md).[on](sourcesource.md#on)* -Defined in node_modules/@types/node/base.d.ts:5465 +Defined in node_modules/@types/node/stream.d.ts:63 **Parameters:** @@ -871,7 +935,7 @@ Defined in node_modules/@types/node/base.d.ts:5465 *Overrides [SourceSource](sourcesource.md).[on](sourcesource.md#on)* -Defined in node_modules/@types/node/base.d.ts:5466 +Defined in node_modules/@types/node/stream.d.ts:64 **Parameters:** @@ -889,21 +953,17 @@ Name | Type | **Returns:** *this* -___ - -### once - -▸ **once**(`event`: string, `listener`: function): *this* +▸ **on**(`event`: string | symbol, `listener`: function): *this* -*Inherited from [SparseFilterStream](sparsefilterstream.md).[once](sparsefilterstream.md#once)* +*Inherited from [SparseFilterStream](sparsefilterstream.md).[on](sparsefilterstream.md#on)* -*Overrides [SourceSource](sourcesource.md).[once](sourcesource.md#once)* +*Overrides [SourceSource](sourcesource.md).[on](sourcesource.md#on)* -Defined in node_modules/@types/node/base.d.ts:5468 +Defined in node_modules/@types/node/stream.d.ts:65 **Parameters:** -▪ **event**: *string* +▪ **event**: *string | symbol* ▪ **listener**: *function* @@ -917,13 +977,17 @@ Name | Type | **Returns:** *this* +___ + +### once + ▸ **once**(`event`: "close", `listener`: function): *this* *Inherited from [SparseFilterStream](sparsefilterstream.md).[once](sparsefilterstream.md#once)* *Overrides [SourceSource](sourcesource.md).[once](sourcesource.md#once)* -Defined in node_modules/@types/node/base.d.ts:5469 +Defined in node_modules/@types/node/stream.d.ts:67 **Parameters:** @@ -941,7 +1005,7 @@ Defined in node_modules/@types/node/base.d.ts:5469 *Overrides [SourceSource](sourcesource.md).[once](sourcesource.md#once)* -Defined in node_modules/@types/node/base.d.ts:5470 +Defined in node_modules/@types/node/stream.d.ts:68 **Parameters:** @@ -949,13 +1013,13 @@ Defined in node_modules/@types/node/base.d.ts:5470 ▪ **listener**: *function* -▸ (`chunk`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string): *void* +▸ (`chunk`: any): *void* **Parameters:** Name | Type | ------ | ------ | -`chunk` | [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string | +`chunk` | any | **Returns:** *this* @@ -965,7 +1029,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[once](sourcesource.md#once)* -Defined in node_modules/@types/node/base.d.ts:5471 +Defined in node_modules/@types/node/stream.d.ts:69 **Parameters:** @@ -983,7 +1047,7 @@ Defined in node_modules/@types/node/base.d.ts:5471 *Overrides [SourceSource](sourcesource.md).[once](sourcesource.md#once)* -Defined in node_modules/@types/node/base.d.ts:5472 +Defined in node_modules/@types/node/stream.d.ts:70 **Parameters:** @@ -1001,7 +1065,7 @@ Defined in node_modules/@types/node/base.d.ts:5472 *Overrides [SourceSource](sourcesource.md).[once](sourcesource.md#once)* -Defined in node_modules/@types/node/base.d.ts:5473 +Defined in node_modules/@types/node/stream.d.ts:71 **Parameters:** @@ -1019,6 +1083,30 @@ Name | Type | **Returns:** *this* +▸ **once**(`event`: string | symbol, `listener`: function): *this* + +*Inherited from [SparseFilterStream](sparsefilterstream.md).[once](sparsefilterstream.md#once)* + +*Overrides [SourceSource](sourcesource.md).[once](sourcesource.md#once)* + +Defined in node_modules/@types/node/stream.d.ts:72 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* + +**Parameters:** + +Name | Type | +------ | ------ | +`...args` | any[] | + +**Returns:** *this* + ___ ### pause @@ -1029,7 +1117,7 @@ ___ *Inherited from [SparseFilterStream](sparsefilterstream.md).[pause](sparsefilterstream.md#pause)* -Defined in node_modules/@types/node/base.d.ts:5428 +Defined in node_modules/@types/node/stream.d.ts:27 **Returns:** *this* @@ -1041,7 +1129,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[pipe](countingwritable.md#pipe)* -Defined in node_modules/@types/node/base.d.ts:5407 +Defined in node_modules/@types/node/stream.d.ts:5 **Type parameters:** @@ -1060,37 +1148,13 @@ ___ ### prependListener -▸ **prependListener**(`event`: string, `listener`: function): *this* - -*Inherited from [SparseFilterStream](sparsefilterstream.md).[prependListener](sparsefilterstream.md#prependlistener)* - -*Overrides [SourceSource](sourcesource.md).[prependListener](sourcesource.md#prependlistener)* - -Defined in node_modules/@types/node/base.d.ts:5475 - -**Parameters:** - -▪ **event**: *string* - -▪ **listener**: *function* - -▸ (...`args`: any[]): *void* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | any[] | - -**Returns:** *this* - ▸ **prependListener**(`event`: "close", `listener`: function): *this* *Inherited from [SparseFilterStream](sparsefilterstream.md).[prependListener](sparsefilterstream.md#prependlistener)* *Overrides [SourceSource](sourcesource.md).[prependListener](sourcesource.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:5476 +Defined in node_modules/@types/node/stream.d.ts:74 **Parameters:** @@ -1108,7 +1172,7 @@ Defined in node_modules/@types/node/base.d.ts:5476 *Overrides [SourceSource](sourcesource.md).[prependListener](sourcesource.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:5477 +Defined in node_modules/@types/node/stream.d.ts:75 **Parameters:** @@ -1116,13 +1180,13 @@ Defined in node_modules/@types/node/base.d.ts:5477 ▪ **listener**: *function* -▸ (`chunk`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string): *void* +▸ (`chunk`: any): *void* **Parameters:** Name | Type | ------ | ------ | -`chunk` | [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string | +`chunk` | any | **Returns:** *this* @@ -1132,7 +1196,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[prependListener](sourcesource.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:5478 +Defined in node_modules/@types/node/stream.d.ts:76 **Parameters:** @@ -1150,7 +1214,7 @@ Defined in node_modules/@types/node/base.d.ts:5478 *Overrides [SourceSource](sourcesource.md).[prependListener](sourcesource.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:5479 +Defined in node_modules/@types/node/stream.d.ts:77 **Parameters:** @@ -1168,7 +1232,7 @@ Defined in node_modules/@types/node/base.d.ts:5479 *Overrides [SourceSource](sourcesource.md).[prependListener](sourcesource.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:5480 +Defined in node_modules/@types/node/stream.d.ts:78 **Parameters:** @@ -1186,21 +1250,17 @@ Name | Type | **Returns:** *this* -___ - -### prependOnceListener +▸ **prependListener**(`event`: string | symbol, `listener`: function): *this* -▸ **prependOnceListener**(`event`: string, `listener`: function): *this* - -*Inherited from [SparseFilterStream](sparsefilterstream.md).[prependOnceListener](sparsefilterstream.md#prependoncelistener)* +*Inherited from [SparseFilterStream](sparsefilterstream.md).[prependListener](sparsefilterstream.md#prependlistener)* -*Overrides [SourceSource](sourcesource.md).[prependOnceListener](sourcesource.md#prependoncelistener)* +*Overrides [SourceSource](sourcesource.md).[prependListener](sourcesource.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:5482 +Defined in node_modules/@types/node/stream.d.ts:79 **Parameters:** -▪ **event**: *string* +▪ **event**: *string | symbol* ▪ **listener**: *function* @@ -1214,13 +1274,17 @@ Name | Type | **Returns:** *this* +___ + +### prependOnceListener + ▸ **prependOnceListener**(`event`: "close", `listener`: function): *this* *Inherited from [SparseFilterStream](sparsefilterstream.md).[prependOnceListener](sparsefilterstream.md#prependoncelistener)* *Overrides [SourceSource](sourcesource.md).[prependOnceListener](sourcesource.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:5483 +Defined in node_modules/@types/node/stream.d.ts:81 **Parameters:** @@ -1238,7 +1302,7 @@ Defined in node_modules/@types/node/base.d.ts:5483 *Overrides [SourceSource](sourcesource.md).[prependOnceListener](sourcesource.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:5484 +Defined in node_modules/@types/node/stream.d.ts:82 **Parameters:** @@ -1246,13 +1310,13 @@ Defined in node_modules/@types/node/base.d.ts:5484 ▪ **listener**: *function* -▸ (`chunk`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string): *void* +▸ (`chunk`: any): *void* **Parameters:** Name | Type | ------ | ------ | -`chunk` | [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string | +`chunk` | any | **Returns:** *this* @@ -1262,7 +1326,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[prependOnceListener](sourcesource.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:5485 +Defined in node_modules/@types/node/stream.d.ts:83 **Parameters:** @@ -1280,7 +1344,7 @@ Defined in node_modules/@types/node/base.d.ts:5485 *Overrides [SourceSource](sourcesource.md).[prependOnceListener](sourcesource.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:5486 +Defined in node_modules/@types/node/stream.d.ts:84 **Parameters:** @@ -1298,7 +1362,7 @@ Defined in node_modules/@types/node/base.d.ts:5486 *Overrides [SourceSource](sourcesource.md).[prependOnceListener](sourcesource.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:5487 +Defined in node_modules/@types/node/stream.d.ts:85 **Parameters:** @@ -1316,6 +1380,30 @@ Name | Type | **Returns:** *this* +▸ **prependOnceListener**(`event`: string | symbol, `listener`: function): *this* + +*Inherited from [SparseFilterStream](sparsefilterstream.md).[prependOnceListener](sparsefilterstream.md#prependoncelistener)* + +*Overrides [SourceSource](sourcesource.md).[prependOnceListener](sourcesource.md#prependoncelistener)* + +Defined in node_modules/@types/node/stream.d.ts:86 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* + +**Parameters:** + +Name | Type | +------ | ------ | +`...args` | any[] | + +**Returns:** *this* + ___ ### push @@ -1324,7 +1412,7 @@ ___ *Inherited from [SparseFilterStream](sparsefilterstream.md).[push](sparsefilterstream.md#push)* -Defined in node_modules/@types/node/base.d.ts:5434 +Defined in node_modules/@types/node/stream.d.ts:33 **Parameters:** @@ -1337,79 +1425,75 @@ Name | Type | ___ -### read +### rawListeners -▸ **read**(`size?`: undefined | number): *any* +▸ **rawListeners**(`event`: string | symbol): *Function[]* *Implementation of [SparseReadable](../interfaces/sparsereadable.md)* -*Inherited from [SparseFilterStream](sparsefilterstream.md).[read](sparsefilterstream.md#read)* +*Inherited from [CountingWritable](countingwritable.md).[rawListeners](countingwritable.md#rawlisteners)* -Defined in node_modules/@types/node/base.d.ts:5426 +Defined in node_modules/@types/node/events.d.ts:31 **Parameters:** Name | Type | ------ | ------ | -`size?` | undefined | number | +`event` | string | symbol | -**Returns:** *any* +**Returns:** *Function[]* ___ -### removeAllListeners +### read -▸ **removeAllListeners**(`event?`: string | symbol): *this* +▸ **read**(`size?`: undefined | number): *any* *Implementation of [SparseReadable](../interfaces/sparsereadable.md)* -*Inherited from [CountingWritable](countingwritable.md).[removeAllListeners](countingwritable.md#removealllisteners)* +*Inherited from [SparseFilterStream](sparsefilterstream.md).[read](sparsefilterstream.md#read)* -Defined in node_modules/@types/node/base.d.ts:904 +Defined in node_modules/@types/node/stream.d.ts:25 **Parameters:** Name | Type | ------ | ------ | -`event?` | string | symbol | +`size?` | undefined | number | -**Returns:** *this* +**Returns:** *any* ___ -### removeListener - -▸ **removeListener**(`event`: string, `listener`: function): *this* - -*Inherited from [SparseFilterStream](sparsefilterstream.md).[removeListener](sparsefilterstream.md#removelistener)* - -*Overrides [SourceSource](sourcesource.md).[removeListener](sourcesource.md#removelistener)* - -Defined in node_modules/@types/node/base.d.ts:5489 +### removeAllListeners -**Parameters:** +▸ **removeAllListeners**(`event?`: string | symbol): *this* -▪ **event**: *string* +*Implementation of [SparseReadable](../interfaces/sparsereadable.md)* -▪ **listener**: *function* +*Inherited from [CountingWritable](countingwritable.md).[removeAllListeners](countingwritable.md#removealllisteners)* -▸ (...`args`: any[]): *void* +Defined in node_modules/@types/node/events.d.ts:27 **Parameters:** Name | Type | ------ | ------ | -`...args` | any[] | +`event?` | string | symbol | **Returns:** *this* +___ + +### removeListener + ▸ **removeListener**(`event`: "close", `listener`: function): *this* *Inherited from [SparseFilterStream](sparsefilterstream.md).[removeListener](sparsefilterstream.md#removelistener)* *Overrides [SourceSource](sourcesource.md).[removeListener](sourcesource.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:5490 +Defined in node_modules/@types/node/stream.d.ts:88 **Parameters:** @@ -1427,7 +1511,7 @@ Defined in node_modules/@types/node/base.d.ts:5490 *Overrides [SourceSource](sourcesource.md).[removeListener](sourcesource.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:5491 +Defined in node_modules/@types/node/stream.d.ts:89 **Parameters:** @@ -1435,13 +1519,13 @@ Defined in node_modules/@types/node/base.d.ts:5491 ▪ **listener**: *function* -▸ (`chunk`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string): *void* +▸ (`chunk`: any): *void* **Parameters:** Name | Type | ------ | ------ | -`chunk` | [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string | +`chunk` | any | **Returns:** *this* @@ -1451,7 +1535,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[removeListener](sourcesource.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:5492 +Defined in node_modules/@types/node/stream.d.ts:90 **Parameters:** @@ -1469,7 +1553,7 @@ Defined in node_modules/@types/node/base.d.ts:5492 *Overrides [SourceSource](sourcesource.md).[removeListener](sourcesource.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:5493 +Defined in node_modules/@types/node/stream.d.ts:91 **Parameters:** @@ -1487,7 +1571,7 @@ Defined in node_modules/@types/node/base.d.ts:5493 *Overrides [SourceSource](sourcesource.md).[removeListener](sourcesource.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:5494 +Defined in node_modules/@types/node/stream.d.ts:92 **Parameters:** @@ -1505,6 +1589,30 @@ Name | Type | **Returns:** *this* +▸ **removeListener**(`event`: string | symbol, `listener`: function): *this* + +*Inherited from [SparseFilterStream](sparsefilterstream.md).[removeListener](sparsefilterstream.md#removelistener)* + +*Overrides [SourceSource](sourcesource.md).[removeListener](sourcesource.md#removelistener)* + +Defined in node_modules/@types/node/stream.d.ts:93 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* + +**Parameters:** + +Name | Type | +------ | ------ | +`...args` | any[] | + +**Returns:** *this* + ___ ### resume @@ -1515,7 +1623,7 @@ ___ *Inherited from [SparseFilterStream](sparsefilterstream.md).[resume](sparsefilterstream.md#resume)* -Defined in node_modules/@types/node/base.d.ts:5429 +Defined in node_modules/@types/node/stream.d.ts:28 **Returns:** *this* @@ -1527,7 +1635,7 @@ ___ *Inherited from [SparseFilterStream](sparsefilterstream.md).[setDefaultEncoding](sparsefilterstream.md#setdefaultencoding)* -Defined in node_modules/@types/node/base.d.ts:5609 +Defined in node_modules/@types/node/stream.d.ts:219 **Parameters:** @@ -1547,7 +1655,7 @@ ___ *Inherited from [SparseFilterStream](sparsefilterstream.md).[setEncoding](sparsefilterstream.md#setencoding)* -Defined in node_modules/@types/node/base.d.ts:5427 +Defined in node_modules/@types/node/stream.d.ts:26 **Parameters:** @@ -1567,7 +1675,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[setMaxListeners](countingwritable.md#setmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:905 +Defined in node_modules/@types/node/events.d.ts:28 **Parameters:** @@ -1585,7 +1693,7 @@ ___ *Inherited from [SparseFilterStream](sparsefilterstream.md).[uncork](sparsefilterstream.md#uncork)* -Defined in node_modules/@types/node/base.d.ts:5614 +Defined in node_modules/@types/node/stream.d.ts:224 **Returns:** *void* @@ -1593,23 +1701,19 @@ ___ ### unpipe -▸ **unpipe**<**T**>(`destination?`: T): *this* +▸ **unpipe**(`destination?`: NodeJS.WritableStream): *this* *Implementation of [SparseReadable](../interfaces/sparsereadable.md)* *Inherited from [SparseFilterStream](sparsefilterstream.md).[unpipe](sparsefilterstream.md#unpipe)* -Defined in node_modules/@types/node/base.d.ts:5431 - -**Type parameters:** - -▪ **T**: *WritableStream* +Defined in node_modules/@types/node/stream.d.ts:30 **Parameters:** Name | Type | ------ | ------ | -`destination?` | T | +`destination?` | NodeJS.WritableStream | **Returns:** *this* @@ -1621,7 +1725,7 @@ ___ *Inherited from [SparseFilterStream](sparsefilterstream.md).[unshift](sparsefilterstream.md#unshift)* -Defined in node_modules/@types/node/base.d.ts:5432 +Defined in node_modules/@types/node/stream.d.ts:31 **Parameters:** @@ -1641,7 +1745,7 @@ ___ *Inherited from [SparseFilterStream](sparsefilterstream.md).[wrap](sparsefilterstream.md#wrap)* -Defined in node_modules/@types/node/base.d.ts:5433 +Defined in node_modules/@types/node/stream.d.ts:32 **Parameters:** @@ -1655,26 +1759,26 @@ ___ ### write -▸ **write**(`chunk`: any, `cb?`: Function): *boolean* +▸ **write**(`chunk`: any, `cb?`: undefined | function): *boolean* *Inherited from [SparseFilterStream](sparsefilterstream.md).[write](sparsefilterstream.md#write)* -Defined in node_modules/@types/node/base.d.ts:5607 +Defined in node_modules/@types/node/stream.d.ts:217 **Parameters:** Name | Type | ------ | ------ | `chunk` | any | -`cb?` | Function | +`cb?` | undefined | function | **Returns:** *boolean* -▸ **write**(`chunk`: any, `encoding?`: undefined | string, `cb?`: Function): *boolean* +▸ **write**(`chunk`: any, `encoding?`: undefined | string, `cb?`: undefined | function): *boolean* *Inherited from [SparseFilterStream](sparsefilterstream.md).[write](sparsefilterstream.md#write)* -Defined in node_modules/@types/node/base.d.ts:5608 +Defined in node_modules/@types/node/stream.d.ts:218 **Parameters:** @@ -1682,7 +1786,7 @@ Name | Type | ------ | ------ | `chunk` | any | `encoding?` | undefined | string | -`cb?` | Function | +`cb?` | undefined | function | **Returns:** *boolean* @@ -1694,7 +1798,9 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[listenerCount](countingwritable.md#static-listenercount)* -Defined in node_modules/@types/node/base.d.ts:895 +Defined in node_modules/@types/node/events.d.ts:17 + +**`deprecated`** since v4.0.0 **Parameters:** diff --git a/doc/classes/sparsereadstream.md b/doc/classes/sparsereadstream.md index bb8ab46b..10db8d38 100644 --- a/doc/classes/sparsereadstream.md +++ b/doc/classes/sparsereadstream.md @@ -27,6 +27,7 @@ * [positionInBlock](sparsereadstream.md#private-positioninblock) * [readable](sparsereadstream.md#readable) * [readableHighWaterMark](sparsereadstream.md#readablehighwatermark) +* [readableLength](sparsereadstream.md#readablelength) * [source](sparsereadstream.md#private-source) * [state](sparsereadstream.md#private-optional-state) * [stateIterator](sparsereadstream.md#private-stateiterator) @@ -34,6 +35,7 @@ ### Methods +* [[Symbol.asyncIterator]](sparsereadstream.md#[symbol.asynciterator]) * [__read](sparsereadstream.md#private-__read) * [_destroy](sparsereadstream.md#_destroy) * [_read](sparsereadstream.md#_read) @@ -46,6 +48,7 @@ * [listenerCount](sparsereadstream.md#listenercount) * [listeners](sparsereadstream.md#listeners) * [nextBlock](sparsereadstream.md#private-nextblock) +* [off](sparsereadstream.md#off) * [on](sparsereadstream.md#on) * [once](sparsereadstream.md#once) * [pause](sparsereadstream.md#pause) @@ -53,6 +56,7 @@ * [prependListener](sparsereadstream.md#prependlistener) * [prependOnceListener](sparsereadstream.md#prependoncelistener) * [push](sparsereadstream.md#push) +* [rawListeners](sparsereadstream.md#rawlisteners) * [read](sparsereadstream.md#read) * [removeAllListeners](sparsereadstream.md#removealllisteners) * [removeListener](sparsereadstream.md#removelistener) @@ -72,7 +76,7 @@ *Overrides void* -*Defined in [lib/sparse-stream/sparse-read-stream.ts:40](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/sparse-stream/sparse-read-stream.ts#L40)* +*Defined in [lib/sparse-stream/sparse-read-stream.ts:39](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/sparse-stream/sparse-read-stream.ts#L39)* **Parameters:** @@ -96,7 +100,7 @@ Name | Type | Default | • **alignedReadableState**? : *[AlignedReadableState](alignedreadablestate.md)* -*Defined in [lib/sparse-stream/sparse-read-stream.ts:40](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/sparse-stream/sparse-read-stream.ts#L40)* +*Defined in [lib/sparse-stream/sparse-read-stream.ts:39](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/sparse-stream/sparse-read-stream.ts#L39)* ___ @@ -106,7 +110,7 @@ ___ *Implementation of [SparseReadable](../interfaces/sparsereadable.md).[blocks](../interfaces/sparsereadable.md#blocks)* -*Defined in [lib/sparse-stream/sparse-read-stream.ts:35](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/sparse-stream/sparse-read-stream.ts#L35)* +*Defined in [lib/sparse-stream/sparse-read-stream.ts:34](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/sparse-stream/sparse-read-stream.ts#L34)* ___ @@ -114,7 +118,7 @@ ___ • **chunkSize**: *number* -*Defined in [lib/sparse-stream/sparse-read-stream.ts:36](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/sparse-stream/sparse-read-stream.ts#L36)* +*Defined in [lib/sparse-stream/sparse-read-stream.ts:35](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/sparse-stream/sparse-read-stream.ts#L35)* ___ @@ -122,7 +126,7 @@ ___ • **positionInBlock**: *number* = 0 -*Defined in [lib/sparse-stream/sparse-read-stream.ts:39](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/sparse-stream/sparse-read-stream.ts#L39)* +*Defined in [lib/sparse-stream/sparse-read-stream.ts:38](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/sparse-stream/sparse-read-stream.ts#L38)* ___ @@ -134,7 +138,7 @@ ___ *Inherited from [SparseFilterStream](sparsefilterstream.md).[readable](sparsefilterstream.md#readable)* -Defined in node_modules/@types/node/base.d.ts:5422 +Defined in node_modules/@types/node/stream.d.ts:20 ___ @@ -144,7 +148,17 @@ ___ *Inherited from [SparseFilterStream](sparsefilterstream.md).[readableHighWaterMark](sparsefilterstream.md#readablehighwatermark)* -Defined in node_modules/@types/node/base.d.ts:5423 +Defined in node_modules/@types/node/stream.d.ts:21 + +___ + +### readableLength + +• **readableLength**: *number* + +*Inherited from [SparseFilterStream](sparsefilterstream.md).[readableLength](sparsefilterstream.md#readablelength)* + +Defined in node_modules/@types/node/stream.d.ts:22 ___ @@ -152,7 +166,7 @@ ___ • **source**: *[SourceDestination](sourcedestination.md)* -*Defined in [lib/sparse-stream/sparse-read-stream.ts:34](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/sparse-stream/sparse-read-stream.ts#L34)* +*Defined in [lib/sparse-stream/sparse-read-stream.ts:33](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/sparse-stream/sparse-read-stream.ts#L33)* ___ @@ -160,7 +174,7 @@ ___ • **state**? : *[SparseReaderState](../interfaces/sparsereaderstate.md)* -*Defined in [lib/sparse-stream/sparse-read-stream.ts:38](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/sparse-stream/sparse-read-stream.ts#L38)* +*Defined in [lib/sparse-stream/sparse-read-stream.ts:37](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/sparse-stream/sparse-read-stream.ts#L37)* ___ @@ -168,7 +182,7 @@ ___ • **stateIterator**: *Iterator‹[SparseReaderState](../interfaces/sparsereaderstate.md)›* -*Defined in [lib/sparse-stream/sparse-read-stream.ts:37](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/sparse-stream/sparse-read-stream.ts#L37)* +*Defined in [lib/sparse-stream/sparse-read-stream.ts:36](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/sparse-stream/sparse-read-stream.ts#L36)* ___ @@ -178,15 +192,29 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[defaultMaxListeners](countingwritable.md#static-defaultmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:896 +Defined in node_modules/@types/node/events.d.ts:18 ## Methods +### [Symbol.asyncIterator] + +▸ **[Symbol.asyncIterator]**(): *AsyncIterableIterator‹any›* + +*Implementation of [SparseReadable](../interfaces/sparsereadable.md)* + +*Inherited from [SparseFilterStream](sparsefilterstream.md).[[Symbol.asyncIterator]](sparsefilterstream.md#[symbol.asynciterator])* + +Defined in node_modules/@types/node/stream.d.ts:95 + +**Returns:** *AsyncIterableIterator‹any›* + +___ + ### `Private` __read ▸ **__read**(): *Promise‹[SparseStreamChunk](../interfaces/sparsestreamchunk.md) | null›* -*Defined in [lib/sparse-stream/sparse-read-stream.ts:92](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/sparse-stream/sparse-read-stream.ts#L92)* +*Defined in [lib/sparse-stream/sparse-read-stream.ts:91](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/sparse-stream/sparse-read-stream.ts#L91)* **Returns:** *Promise‹[SparseStreamChunk](../interfaces/sparsestreamchunk.md) | null›* @@ -198,7 +226,7 @@ ___ *Inherited from [SparseReadStream](sparsereadstream.md).[_destroy](sparsereadstream.md#_destroy)* -Defined in node_modules/@types/node/base.d.ts:5435 +Defined in node_modules/@types/node/stream.d.ts:34 **Parameters:** @@ -206,13 +234,13 @@ Defined in node_modules/@types/node/base.d.ts:5435 ▪ **callback**: *function* -▸ (`error?`: [Error](notcapable.md#static-error)): *void* +▸ (`error`: [Error](notcapable.md#static-error) | null): *void* **Parameters:** Name | Type | ------ | ------ | -`error?` | [Error](notcapable.md#static-error) | +`error` | [Error](notcapable.md#static-error) | null | **Returns:** *void* @@ -224,7 +252,7 @@ ___ *Overrides [SparseFilterStream](sparsefilterstream.md).[_read](sparsefilterstream.md#_read)* -*Defined in [lib/sparse-stream/sparse-read-stream.ts:78](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/sparse-stream/sparse-read-stream.ts#L78)* +*Defined in [lib/sparse-stream/sparse-read-stream.ts:77](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/sparse-stream/sparse-read-stream.ts#L77)* **Returns:** *Promise‹void›* @@ -232,13 +260,13 @@ ___ ### addListener -▸ **addListener**(`event`: string, `listener`: function): *this* +▸ **addListener**(`event`: "close", `listener`: function): *this* *Inherited from [SparseFilterStream](sparsefilterstream.md).[addListener](sparsefilterstream.md#addlistener)* *Overrides [SourceSource](sourcesource.md).[addListener](sourcesource.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:5447 +Defined in node_modules/@types/node/stream.d.ts:46 Event emitter The defined events on documents including: @@ -250,30 +278,6 @@ The defined events on documents including: **Parameters:** -▪ **event**: *string* - -▪ **listener**: *function* - -▸ (...`args`: any[]): *void* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | any[] | - -**Returns:** *this* - -▸ **addListener**(`event`: "close", `listener`: function): *this* - -*Inherited from [SparseFilterStream](sparsefilterstream.md).[addListener](sparsefilterstream.md#addlistener)* - -*Overrides [SourceSource](sourcesource.md).[addListener](sourcesource.md#addlistener)* - -Defined in node_modules/@types/node/base.d.ts:5448 - -**Parameters:** - ▪ **event**: *"close"* ▪ **listener**: *function* @@ -288,7 +292,7 @@ Defined in node_modules/@types/node/base.d.ts:5448 *Overrides [SourceSource](sourcesource.md).[addListener](sourcesource.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:5449 +Defined in node_modules/@types/node/stream.d.ts:47 **Parameters:** @@ -296,13 +300,13 @@ Defined in node_modules/@types/node/base.d.ts:5449 ▪ **listener**: *function* -▸ (`chunk`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string): *void* +▸ (`chunk`: any): *void* **Parameters:** Name | Type | ------ | ------ | -`chunk` | [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string | +`chunk` | any | **Returns:** *this* @@ -312,7 +316,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[addListener](sourcesource.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:5450 +Defined in node_modules/@types/node/stream.d.ts:48 **Parameters:** @@ -330,7 +334,7 @@ Defined in node_modules/@types/node/base.d.ts:5450 *Overrides [SourceSource](sourcesource.md).[addListener](sourcesource.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:5451 +Defined in node_modules/@types/node/stream.d.ts:49 **Parameters:** @@ -348,7 +352,7 @@ Defined in node_modules/@types/node/base.d.ts:5451 *Overrides [SourceSource](sourcesource.md).[addListener](sourcesource.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:5452 +Defined in node_modules/@types/node/stream.d.ts:50 **Parameters:** @@ -366,46 +370,51 @@ Name | Type | **Returns:** *this* -___ +▸ **addListener**(`event`: string | symbol, `listener`: function): *this* -### destroy +*Inherited from [SparseFilterStream](sparsefilterstream.md).[addListener](sparsefilterstream.md#addlistener)* -▸ **destroy**(`error?`: [Error](notcapable.md#static-error)): *void* +*Overrides [SourceSource](sourcesource.md).[addListener](sourcesource.md#addlistener)* + +Defined in node_modules/@types/node/stream.d.ts:51 + +**Parameters:** -*Inherited from [SparseReadStream](sparsereadstream.md).[destroy](sparsereadstream.md#destroy)* +▪ **event**: *string | symbol* -Defined in node_modules/@types/node/base.d.ts:5436 +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`error?` | [Error](notcapable.md#static-error) | +`...args` | any[] | -**Returns:** *void* +**Returns:** *this* ___ -### emit - -▸ **emit**(`event`: string | symbol, ...`args`: any[]): *boolean* - -*Implementation of [SparseReadable](../interfaces/sparsereadable.md)* +### destroy -*Inherited from [SparseFilterStream](sparsefilterstream.md).[emit](sparsefilterstream.md#emit)* +▸ **destroy**(`error?`: [Error](notcapable.md#static-error)): *void* -*Overrides [SourceSource](sourcesource.md).[emit](sourcesource.md#emit)* +*Inherited from [SparseFilterStream](sparsefilterstream.md).[destroy](sparsefilterstream.md#destroy)* -Defined in node_modules/@types/node/base.d.ts:5454 +Defined in node_modules/@types/node/stream.d.ts:35 **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`...args` | any[] | +`error?` | [Error](notcapable.md#static-error) | -**Returns:** *boolean* +**Returns:** *void* + +___ + +### emit ▸ **emit**(`event`: "close"): *boolean* @@ -413,7 +422,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[emit](sourcesource.md#emit)* -Defined in node_modules/@types/node/base.d.ts:5455 +Defined in node_modules/@types/node/stream.d.ts:53 **Parameters:** @@ -423,20 +432,20 @@ Name | Type | **Returns:** *boolean* -▸ **emit**(`event`: "data", `chunk`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string): *boolean* +▸ **emit**(`event`: "data", `chunk`: any): *boolean* *Inherited from [SparseFilterStream](sparsefilterstream.md).[emit](sparsefilterstream.md#emit)* *Overrides [SourceSource](sourcesource.md).[emit](sourcesource.md#emit)* -Defined in node_modules/@types/node/base.d.ts:5456 +Defined in node_modules/@types/node/stream.d.ts:54 **Parameters:** Name | Type | ------ | ------ | `event` | "data" | -`chunk` | [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string | +`chunk` | any | **Returns:** *boolean* @@ -446,7 +455,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[emit](sourcesource.md#emit)* -Defined in node_modules/@types/node/base.d.ts:5457 +Defined in node_modules/@types/node/stream.d.ts:55 **Parameters:** @@ -462,7 +471,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[emit](sourcesource.md#emit)* -Defined in node_modules/@types/node/base.d.ts:5458 +Defined in node_modules/@types/node/stream.d.ts:56 **Parameters:** @@ -478,7 +487,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[emit](sourcesource.md#emit)* -Defined in node_modules/@types/node/base.d.ts:5459 +Defined in node_modules/@types/node/stream.d.ts:57 **Parameters:** @@ -489,6 +498,25 @@ Name | Type | **Returns:** *boolean* +▸ **emit**(`event`: string | symbol, ...`args`: any[]): *boolean* + +*Implementation of [SparseReadable](../interfaces/sparsereadable.md)* + +*Inherited from [SparseFilterStream](sparsefilterstream.md).[emit](sparsefilterstream.md#emit)* + +*Overrides [SourceSource](sourcesource.md).[emit](sourcesource.md#emit)* + +Defined in node_modules/@types/node/stream.d.ts:58 + +**Parameters:** + +Name | Type | +------ | ------ | +`event` | string | symbol | +`...args` | any[] | + +**Returns:** *boolean* + ___ ### eventNames @@ -499,7 +527,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[eventNames](countingwritable.md#eventnames)* -Defined in node_modules/@types/node/base.d.ts:909 +Defined in node_modules/@types/node/events.d.ts:33 **Returns:** *Array‹string | symbol›* @@ -513,7 +541,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[getMaxListeners](countingwritable.md#getmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:906 +Defined in node_modules/@types/node/events.d.ts:29 **Returns:** *number* @@ -527,7 +555,7 @@ ___ *Inherited from [SparseFilterStream](sparsefilterstream.md).[isPaused](sparsefilterstream.md#ispaused)* -Defined in node_modules/@types/node/base.d.ts:5430 +Defined in node_modules/@types/node/stream.d.ts:29 **Returns:** *boolean* @@ -541,7 +569,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[listenerCount](countingwritable.md#static-listenercount)* -Defined in node_modules/@types/node/base.d.ts:910 +Defined in node_modules/@types/node/events.d.ts:34 **Parameters:** @@ -561,7 +589,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[listeners](countingwritable.md#listeners)* -Defined in node_modules/@types/node/base.d.ts:907 +Defined in node_modules/@types/node/events.d.ts:30 **Parameters:** @@ -577,25 +605,23 @@ ___ ▸ **nextBlock**(): *void* -*Defined in [lib/sparse-stream/sparse-read-stream.ts:87](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/sparse-stream/sparse-read-stream.ts#L87)* +*Defined in [lib/sparse-stream/sparse-read-stream.ts:86](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/sparse-stream/sparse-read-stream.ts#L86)* **Returns:** *void* ___ -### on - -▸ **on**(`event`: string, `listener`: function): *this* +### off -*Inherited from [SparseFilterStream](sparsefilterstream.md).[on](sparsefilterstream.md#on)* +▸ **off**(`event`: string | symbol, `listener`: function): *this* -*Overrides [SourceSource](sourcesource.md).[on](sourcesource.md#on)* +*Inherited from [CountingWritable](countingwritable.md).[off](countingwritable.md#off)* -Defined in node_modules/@types/node/base.d.ts:5461 +Defined in node_modules/@types/node/events.d.ts:26 **Parameters:** -▪ **event**: *string* +▪ **event**: *string | symbol* ▪ **listener**: *function* @@ -609,13 +635,17 @@ Name | Type | **Returns:** *this* +___ + +### on + ▸ **on**(`event`: "close", `listener`: function): *this* *Inherited from [SparseFilterStream](sparsefilterstream.md).[on](sparsefilterstream.md#on)* *Overrides [SourceSource](sourcesource.md).[on](sourcesource.md#on)* -Defined in node_modules/@types/node/base.d.ts:5462 +Defined in node_modules/@types/node/stream.d.ts:60 **Parameters:** @@ -633,7 +663,7 @@ Defined in node_modules/@types/node/base.d.ts:5462 *Overrides [SourceSource](sourcesource.md).[on](sourcesource.md#on)* -Defined in node_modules/@types/node/base.d.ts:5463 +Defined in node_modules/@types/node/stream.d.ts:61 **Parameters:** @@ -641,13 +671,13 @@ Defined in node_modules/@types/node/base.d.ts:5463 ▪ **listener**: *function* -▸ (`chunk`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string): *void* +▸ (`chunk`: any): *void* **Parameters:** Name | Type | ------ | ------ | -`chunk` | [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string | +`chunk` | any | **Returns:** *this* @@ -657,7 +687,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[on](sourcesource.md#on)* -Defined in node_modules/@types/node/base.d.ts:5464 +Defined in node_modules/@types/node/stream.d.ts:62 **Parameters:** @@ -675,7 +705,7 @@ Defined in node_modules/@types/node/base.d.ts:5464 *Overrides [SourceSource](sourcesource.md).[on](sourcesource.md#on)* -Defined in node_modules/@types/node/base.d.ts:5465 +Defined in node_modules/@types/node/stream.d.ts:63 **Parameters:** @@ -693,7 +723,7 @@ Defined in node_modules/@types/node/base.d.ts:5465 *Overrides [SourceSource](sourcesource.md).[on](sourcesource.md#on)* -Defined in node_modules/@types/node/base.d.ts:5466 +Defined in node_modules/@types/node/stream.d.ts:64 **Parameters:** @@ -711,21 +741,17 @@ Name | Type | **Returns:** *this* -___ - -### once - -▸ **once**(`event`: string, `listener`: function): *this* +▸ **on**(`event`: string | symbol, `listener`: function): *this* -*Inherited from [SparseFilterStream](sparsefilterstream.md).[once](sparsefilterstream.md#once)* +*Inherited from [SparseFilterStream](sparsefilterstream.md).[on](sparsefilterstream.md#on)* -*Overrides [SourceSource](sourcesource.md).[once](sourcesource.md#once)* +*Overrides [SourceSource](sourcesource.md).[on](sourcesource.md#on)* -Defined in node_modules/@types/node/base.d.ts:5468 +Defined in node_modules/@types/node/stream.d.ts:65 **Parameters:** -▪ **event**: *string* +▪ **event**: *string | symbol* ▪ **listener**: *function* @@ -739,13 +765,17 @@ Name | Type | **Returns:** *this* +___ + +### once + ▸ **once**(`event`: "close", `listener`: function): *this* *Inherited from [SparseFilterStream](sparsefilterstream.md).[once](sparsefilterstream.md#once)* *Overrides [SourceSource](sourcesource.md).[once](sourcesource.md#once)* -Defined in node_modules/@types/node/base.d.ts:5469 +Defined in node_modules/@types/node/stream.d.ts:67 **Parameters:** @@ -763,7 +793,7 @@ Defined in node_modules/@types/node/base.d.ts:5469 *Overrides [SourceSource](sourcesource.md).[once](sourcesource.md#once)* -Defined in node_modules/@types/node/base.d.ts:5470 +Defined in node_modules/@types/node/stream.d.ts:68 **Parameters:** @@ -771,13 +801,13 @@ Defined in node_modules/@types/node/base.d.ts:5470 ▪ **listener**: *function* -▸ (`chunk`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string): *void* +▸ (`chunk`: any): *void* **Parameters:** Name | Type | ------ | ------ | -`chunk` | [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string | +`chunk` | any | **Returns:** *this* @@ -787,7 +817,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[once](sourcesource.md#once)* -Defined in node_modules/@types/node/base.d.ts:5471 +Defined in node_modules/@types/node/stream.d.ts:69 **Parameters:** @@ -805,7 +835,7 @@ Defined in node_modules/@types/node/base.d.ts:5471 *Overrides [SourceSource](sourcesource.md).[once](sourcesource.md#once)* -Defined in node_modules/@types/node/base.d.ts:5472 +Defined in node_modules/@types/node/stream.d.ts:70 **Parameters:** @@ -823,7 +853,7 @@ Defined in node_modules/@types/node/base.d.ts:5472 *Overrides [SourceSource](sourcesource.md).[once](sourcesource.md#once)* -Defined in node_modules/@types/node/base.d.ts:5473 +Defined in node_modules/@types/node/stream.d.ts:71 **Parameters:** @@ -841,6 +871,30 @@ Name | Type | **Returns:** *this* +▸ **once**(`event`: string | symbol, `listener`: function): *this* + +*Inherited from [SparseFilterStream](sparsefilterstream.md).[once](sparsefilterstream.md#once)* + +*Overrides [SourceSource](sourcesource.md).[once](sourcesource.md#once)* + +Defined in node_modules/@types/node/stream.d.ts:72 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* + +**Parameters:** + +Name | Type | +------ | ------ | +`...args` | any[] | + +**Returns:** *this* + ___ ### pause @@ -851,7 +905,7 @@ ___ *Inherited from [SparseFilterStream](sparsefilterstream.md).[pause](sparsefilterstream.md#pause)* -Defined in node_modules/@types/node/base.d.ts:5428 +Defined in node_modules/@types/node/stream.d.ts:27 **Returns:** *this* @@ -863,7 +917,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[pipe](countingwritable.md#pipe)* -Defined in node_modules/@types/node/base.d.ts:5407 +Defined in node_modules/@types/node/stream.d.ts:5 **Type parameters:** @@ -882,37 +936,13 @@ ___ ### prependListener -▸ **prependListener**(`event`: string, `listener`: function): *this* - -*Inherited from [SparseFilterStream](sparsefilterstream.md).[prependListener](sparsefilterstream.md#prependlistener)* - -*Overrides [SourceSource](sourcesource.md).[prependListener](sourcesource.md#prependlistener)* - -Defined in node_modules/@types/node/base.d.ts:5475 - -**Parameters:** - -▪ **event**: *string* - -▪ **listener**: *function* - -▸ (...`args`: any[]): *void* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | any[] | - -**Returns:** *this* - ▸ **prependListener**(`event`: "close", `listener`: function): *this* *Inherited from [SparseFilterStream](sparsefilterstream.md).[prependListener](sparsefilterstream.md#prependlistener)* *Overrides [SourceSource](sourcesource.md).[prependListener](sourcesource.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:5476 +Defined in node_modules/@types/node/stream.d.ts:74 **Parameters:** @@ -930,7 +960,7 @@ Defined in node_modules/@types/node/base.d.ts:5476 *Overrides [SourceSource](sourcesource.md).[prependListener](sourcesource.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:5477 +Defined in node_modules/@types/node/stream.d.ts:75 **Parameters:** @@ -938,13 +968,13 @@ Defined in node_modules/@types/node/base.d.ts:5477 ▪ **listener**: *function* -▸ (`chunk`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string): *void* +▸ (`chunk`: any): *void* **Parameters:** Name | Type | ------ | ------ | -`chunk` | [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string | +`chunk` | any | **Returns:** *this* @@ -954,7 +984,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[prependListener](sourcesource.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:5478 +Defined in node_modules/@types/node/stream.d.ts:76 **Parameters:** @@ -972,7 +1002,7 @@ Defined in node_modules/@types/node/base.d.ts:5478 *Overrides [SourceSource](sourcesource.md).[prependListener](sourcesource.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:5479 +Defined in node_modules/@types/node/stream.d.ts:77 **Parameters:** @@ -990,7 +1020,7 @@ Defined in node_modules/@types/node/base.d.ts:5479 *Overrides [SourceSource](sourcesource.md).[prependListener](sourcesource.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:5480 +Defined in node_modules/@types/node/stream.d.ts:78 **Parameters:** @@ -1008,21 +1038,17 @@ Name | Type | **Returns:** *this* -___ - -### prependOnceListener - -▸ **prependOnceListener**(`event`: string, `listener`: function): *this* +▸ **prependListener**(`event`: string | symbol, `listener`: function): *this* -*Inherited from [SparseFilterStream](sparsefilterstream.md).[prependOnceListener](sparsefilterstream.md#prependoncelistener)* +*Inherited from [SparseFilterStream](sparsefilterstream.md).[prependListener](sparsefilterstream.md#prependlistener)* -*Overrides [SourceSource](sourcesource.md).[prependOnceListener](sourcesource.md#prependoncelistener)* +*Overrides [SourceSource](sourcesource.md).[prependListener](sourcesource.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:5482 +Defined in node_modules/@types/node/stream.d.ts:79 **Parameters:** -▪ **event**: *string* +▪ **event**: *string | symbol* ▪ **listener**: *function* @@ -1036,13 +1062,17 @@ Name | Type | **Returns:** *this* +___ + +### prependOnceListener + ▸ **prependOnceListener**(`event`: "close", `listener`: function): *this* *Inherited from [SparseFilterStream](sparsefilterstream.md).[prependOnceListener](sparsefilterstream.md#prependoncelistener)* *Overrides [SourceSource](sourcesource.md).[prependOnceListener](sourcesource.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:5483 +Defined in node_modules/@types/node/stream.d.ts:81 **Parameters:** @@ -1060,7 +1090,7 @@ Defined in node_modules/@types/node/base.d.ts:5483 *Overrides [SourceSource](sourcesource.md).[prependOnceListener](sourcesource.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:5484 +Defined in node_modules/@types/node/stream.d.ts:82 **Parameters:** @@ -1068,13 +1098,13 @@ Defined in node_modules/@types/node/base.d.ts:5484 ▪ **listener**: *function* -▸ (`chunk`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string): *void* +▸ (`chunk`: any): *void* **Parameters:** Name | Type | ------ | ------ | -`chunk` | [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string | +`chunk` | any | **Returns:** *this* @@ -1084,7 +1114,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[prependOnceListener](sourcesource.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:5485 +Defined in node_modules/@types/node/stream.d.ts:83 **Parameters:** @@ -1102,7 +1132,7 @@ Defined in node_modules/@types/node/base.d.ts:5485 *Overrides [SourceSource](sourcesource.md).[prependOnceListener](sourcesource.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:5486 +Defined in node_modules/@types/node/stream.d.ts:84 **Parameters:** @@ -1120,7 +1150,7 @@ Defined in node_modules/@types/node/base.d.ts:5486 *Overrides [SourceSource](sourcesource.md).[prependOnceListener](sourcesource.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:5487 +Defined in node_modules/@types/node/stream.d.ts:85 **Parameters:** @@ -1138,6 +1168,30 @@ Name | Type | **Returns:** *this* +▸ **prependOnceListener**(`event`: string | symbol, `listener`: function): *this* + +*Inherited from [SparseFilterStream](sparsefilterstream.md).[prependOnceListener](sparsefilterstream.md#prependoncelistener)* + +*Overrides [SourceSource](sourcesource.md).[prependOnceListener](sourcesource.md#prependoncelistener)* + +Defined in node_modules/@types/node/stream.d.ts:86 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* + +**Parameters:** + +Name | Type | +------ | ------ | +`...args` | any[] | + +**Returns:** *this* + ___ ### push @@ -1146,7 +1200,7 @@ ___ *Inherited from [SparseFilterStream](sparsefilterstream.md).[push](sparsefilterstream.md#push)* -Defined in node_modules/@types/node/base.d.ts:5434 +Defined in node_modules/@types/node/stream.d.ts:33 **Parameters:** @@ -1159,79 +1213,75 @@ Name | Type | ___ -### read +### rawListeners -▸ **read**(`size?`: undefined | number): *any* +▸ **rawListeners**(`event`: string | symbol): *Function[]* *Implementation of [SparseReadable](../interfaces/sparsereadable.md)* -*Inherited from [SparseFilterStream](sparsefilterstream.md).[read](sparsefilterstream.md#read)* +*Inherited from [CountingWritable](countingwritable.md).[rawListeners](countingwritable.md#rawlisteners)* -Defined in node_modules/@types/node/base.d.ts:5426 +Defined in node_modules/@types/node/events.d.ts:31 **Parameters:** Name | Type | ------ | ------ | -`size?` | undefined | number | +`event` | string | symbol | -**Returns:** *any* +**Returns:** *Function[]* ___ -### removeAllListeners +### read -▸ **removeAllListeners**(`event?`: string | symbol): *this* +▸ **read**(`size?`: undefined | number): *any* *Implementation of [SparseReadable](../interfaces/sparsereadable.md)* -*Inherited from [CountingWritable](countingwritable.md).[removeAllListeners](countingwritable.md#removealllisteners)* +*Inherited from [SparseFilterStream](sparsefilterstream.md).[read](sparsefilterstream.md#read)* -Defined in node_modules/@types/node/base.d.ts:904 +Defined in node_modules/@types/node/stream.d.ts:25 **Parameters:** Name | Type | ------ | ------ | -`event?` | string | symbol | +`size?` | undefined | number | -**Returns:** *this* +**Returns:** *any* ___ -### removeListener - -▸ **removeListener**(`event`: string, `listener`: function): *this* - -*Inherited from [SparseFilterStream](sparsefilterstream.md).[removeListener](sparsefilterstream.md#removelistener)* - -*Overrides [SourceSource](sourcesource.md).[removeListener](sourcesource.md#removelistener)* - -Defined in node_modules/@types/node/base.d.ts:5489 +### removeAllListeners -**Parameters:** +▸ **removeAllListeners**(`event?`: string | symbol): *this* -▪ **event**: *string* +*Implementation of [SparseReadable](../interfaces/sparsereadable.md)* -▪ **listener**: *function* +*Inherited from [CountingWritable](countingwritable.md).[removeAllListeners](countingwritable.md#removealllisteners)* -▸ (...`args`: any[]): *void* +Defined in node_modules/@types/node/events.d.ts:27 **Parameters:** Name | Type | ------ | ------ | -`...args` | any[] | +`event?` | string | symbol | **Returns:** *this* +___ + +### removeListener + ▸ **removeListener**(`event`: "close", `listener`: function): *this* *Inherited from [SparseFilterStream](sparsefilterstream.md).[removeListener](sparsefilterstream.md#removelistener)* *Overrides [SourceSource](sourcesource.md).[removeListener](sourcesource.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:5490 +Defined in node_modules/@types/node/stream.d.ts:88 **Parameters:** @@ -1249,7 +1299,7 @@ Defined in node_modules/@types/node/base.d.ts:5490 *Overrides [SourceSource](sourcesource.md).[removeListener](sourcesource.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:5491 +Defined in node_modules/@types/node/stream.d.ts:89 **Parameters:** @@ -1257,13 +1307,13 @@ Defined in node_modules/@types/node/base.d.ts:5491 ▪ **listener**: *function* -▸ (`chunk`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string): *void* +▸ (`chunk`: any): *void* **Parameters:** Name | Type | ------ | ------ | -`chunk` | [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string | +`chunk` | any | **Returns:** *this* @@ -1273,7 +1323,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[removeListener](sourcesource.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:5492 +Defined in node_modules/@types/node/stream.d.ts:90 **Parameters:** @@ -1291,7 +1341,7 @@ Defined in node_modules/@types/node/base.d.ts:5492 *Overrides [SourceSource](sourcesource.md).[removeListener](sourcesource.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:5493 +Defined in node_modules/@types/node/stream.d.ts:91 **Parameters:** @@ -1309,7 +1359,7 @@ Defined in node_modules/@types/node/base.d.ts:5493 *Overrides [SourceSource](sourcesource.md).[removeListener](sourcesource.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:5494 +Defined in node_modules/@types/node/stream.d.ts:92 **Parameters:** @@ -1327,6 +1377,30 @@ Name | Type | **Returns:** *this* +▸ **removeListener**(`event`: string | symbol, `listener`: function): *this* + +*Inherited from [SparseFilterStream](sparsefilterstream.md).[removeListener](sparsefilterstream.md#removelistener)* + +*Overrides [SourceSource](sourcesource.md).[removeListener](sourcesource.md#removelistener)* + +Defined in node_modules/@types/node/stream.d.ts:93 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* + +**Parameters:** + +Name | Type | +------ | ------ | +`...args` | any[] | + +**Returns:** *this* + ___ ### resume @@ -1337,7 +1411,7 @@ ___ *Inherited from [SparseFilterStream](sparsefilterstream.md).[resume](sparsefilterstream.md#resume)* -Defined in node_modules/@types/node/base.d.ts:5429 +Defined in node_modules/@types/node/stream.d.ts:28 **Returns:** *this* @@ -1351,7 +1425,7 @@ ___ *Inherited from [SparseFilterStream](sparsefilterstream.md).[setEncoding](sparsefilterstream.md#setencoding)* -Defined in node_modules/@types/node/base.d.ts:5427 +Defined in node_modules/@types/node/stream.d.ts:26 **Parameters:** @@ -1371,7 +1445,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[setMaxListeners](countingwritable.md#setmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:905 +Defined in node_modules/@types/node/events.d.ts:28 **Parameters:** @@ -1385,23 +1459,19 @@ ___ ### unpipe -▸ **unpipe**<**T**>(`destination?`: T): *this* +▸ **unpipe**(`destination?`: NodeJS.WritableStream): *this* *Implementation of [SparseReadable](../interfaces/sparsereadable.md)* *Inherited from [SparseFilterStream](sparsefilterstream.md).[unpipe](sparsefilterstream.md#unpipe)* -Defined in node_modules/@types/node/base.d.ts:5431 - -**Type parameters:** - -▪ **T**: *WritableStream* +Defined in node_modules/@types/node/stream.d.ts:30 **Parameters:** Name | Type | ------ | ------ | -`destination?` | T | +`destination?` | NodeJS.WritableStream | **Returns:** *this* @@ -1413,7 +1483,7 @@ ___ *Inherited from [SparseFilterStream](sparsefilterstream.md).[unshift](sparsefilterstream.md#unshift)* -Defined in node_modules/@types/node/base.d.ts:5432 +Defined in node_modules/@types/node/stream.d.ts:31 **Parameters:** @@ -1433,7 +1503,7 @@ ___ *Inherited from [SparseFilterStream](sparsefilterstream.md).[wrap](sparsefilterstream.md#wrap)* -Defined in node_modules/@types/node/base.d.ts:5433 +Defined in node_modules/@types/node/stream.d.ts:32 **Parameters:** @@ -1451,7 +1521,9 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[listenerCount](countingwritable.md#static-listenercount)* -Defined in node_modules/@types/node/base.d.ts:895 +Defined in node_modules/@types/node/events.d.ts:17 + +**`deprecated`** since v4.0.0 **Parameters:** diff --git a/doc/classes/sparsestreamverifier.md b/doc/classes/sparsestreamverifier.md index 7291375b..3c77826d 100644 --- a/doc/classes/sparsestreamverifier.md +++ b/doc/classes/sparsestreamverifier.md @@ -29,10 +29,12 @@ * [handleEventsAndPipe](sparsestreamverifier.md#protected-handleeventsandpipe) * [listenerCount](sparsestreamverifier.md#listenercount) * [listeners](sparsestreamverifier.md#listeners) +* [off](sparsestreamverifier.md#off) * [on](sparsestreamverifier.md#on) * [once](sparsestreamverifier.md#once) * [prependListener](sparsestreamverifier.md#prependlistener) * [prependOnceListener](sparsestreamverifier.md#prependoncelistener) +* [rawListeners](sparsestreamverifier.md#rawlisteners) * [removeAllListeners](sparsestreamverifier.md#removealllisteners) * [removeListener](sparsestreamverifier.md#removelistener) * [run](sparsestreamverifier.md#run) @@ -49,7 +51,7 @@ \+ **new SparseStreamVerifier**(`source`: [SourceDestination](sourcedestination.md), `blocks`: [BlocksWithChecksum](../interfaces/blockswithchecksum.md)[]): *[SparseStreamVerifier](sparsestreamverifier.md)* -*Defined in [lib/source-destination/source-destination.ts:185](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L185)* +*Defined in [lib/source-destination/source-destination.ts:208](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L208)* **Parameters:** @@ -66,7 +68,7 @@ Name | Type | • **blocks**: *[BlocksWithChecksum](../interfaces/blockswithchecksum.md)[]* -*Defined in [lib/source-destination/source-destination.ts:188](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L188)* +*Defined in [lib/source-destination/source-destination.ts:211](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L211)* ___ @@ -74,7 +76,7 @@ ___ • **source**: *[SourceDestination](sourcedestination.md)* -*Defined in [lib/source-destination/source-destination.ts:187](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L187)* +*Defined in [lib/source-destination/source-destination.ts:210](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L210)* ___ @@ -84,7 +86,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[defaultMaxListeners](countingwritable.md#static-defaultmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:896 +Defined in node_modules/@types/node/events.d.ts:18 ## Methods @@ -96,7 +98,7 @@ Defined in node_modules/@types/node/base.d.ts:896 *Overrides [SparseReadable](../interfaces/sparsereadable.md).[addListener](../interfaces/sparsereadable.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:898 +Defined in node_modules/@types/node/events.d.ts:20 **Parameters:** @@ -124,7 +126,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[emit](../interfaces/sparsereadable.md#emit)* -Defined in node_modules/@types/node/base.d.ts:908 +Defined in node_modules/@types/node/events.d.ts:32 **Parameters:** @@ -145,7 +147,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[eventNames](../interfaces/sparsereadable.md#eventnames)* -Defined in node_modules/@types/node/base.d.ts:909 +Defined in node_modules/@types/node/events.d.ts:33 **Returns:** *Array‹string | symbol›* @@ -159,7 +161,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[getMaxListeners](../interfaces/sparsereadable.md#getmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:906 +Defined in node_modules/@types/node/events.d.ts:29 **Returns:** *number* @@ -171,7 +173,7 @@ ___ *Inherited from [Verifier](verifier.md).[handleEventsAndPipe](verifier.md#protected-handleeventsandpipe)* -*Defined in [lib/source-destination/source-destination.ts:134](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L134)* +*Defined in [lib/source-destination/source-destination.ts:157](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L157)* **Parameters:** @@ -192,7 +194,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[listenerCount](../interfaces/sparsereadable.md#listenercount)* -Defined in node_modules/@types/node/base.d.ts:910 +Defined in node_modules/@types/node/events.d.ts:34 **Parameters:** @@ -212,7 +214,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[listeners](../interfaces/sparsereadable.md#listeners)* -Defined in node_modules/@types/node/base.d.ts:907 +Defined in node_modules/@types/node/events.d.ts:30 **Parameters:** @@ -224,6 +226,34 @@ Name | Type | ___ +### off + +▸ **off**(`event`: string | symbol, `listener`: function): *this* + +*Inherited from [CountingWritable](countingwritable.md).[off](countingwritable.md#off)* + +*Overrides [SparseReadable](../interfaces/sparsereadable.md).[off](../interfaces/sparsereadable.md#off)* + +Defined in node_modules/@types/node/events.d.ts:26 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* + +**Parameters:** + +Name | Type | +------ | ------ | +`...args` | any[] | + +**Returns:** *this* + +___ + ### on ▸ **on**(`event`: string | symbol, `listener`: function): *this* @@ -232,7 +262,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[on](../interfaces/sparsereadable.md#on)* -Defined in node_modules/@types/node/base.d.ts:899 +Defined in node_modules/@types/node/events.d.ts:21 **Parameters:** @@ -260,7 +290,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[once](../interfaces/sparsereadable.md#once)* -Defined in node_modules/@types/node/base.d.ts:900 +Defined in node_modules/@types/node/events.d.ts:22 **Parameters:** @@ -288,7 +318,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[prependListener](../interfaces/sparsereadable.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:901 +Defined in node_modules/@types/node/events.d.ts:23 **Parameters:** @@ -316,7 +346,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[prependOnceListener](../interfaces/sparsereadable.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:902 +Defined in node_modules/@types/node/events.d.ts:24 **Parameters:** @@ -336,6 +366,26 @@ Name | Type | ___ +### rawListeners + +▸ **rawListeners**(`event`: string | symbol): *Function[]* + +*Inherited from [CountingWritable](countingwritable.md).[rawListeners](countingwritable.md#rawlisteners)* + +*Overrides [SparseReadable](../interfaces/sparsereadable.md).[rawListeners](../interfaces/sparsereadable.md#rawlisteners)* + +Defined in node_modules/@types/node/events.d.ts:31 + +**Parameters:** + +Name | Type | +------ | ------ | +`event` | string | symbol | + +**Returns:** *Function[]* + +___ + ### removeAllListeners ▸ **removeAllListeners**(`event?`: string | symbol): *this* @@ -344,7 +394,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[removeAllListeners](../interfaces/sparsereadable.md#removealllisteners)* -Defined in node_modules/@types/node/base.d.ts:904 +Defined in node_modules/@types/node/events.d.ts:27 **Parameters:** @@ -364,7 +414,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[removeListener](../interfaces/sparsereadable.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:903 +Defined in node_modules/@types/node/events.d.ts:25 **Parameters:** @@ -390,7 +440,7 @@ ___ *Overrides [Verifier](verifier.md).[run](verifier.md#abstract-run)* -*Defined in [lib/source-destination/source-destination.ts:193](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L193)* +*Defined in [lib/source-destination/source-destination.ts:216](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L216)* **Returns:** *Promise‹void›* @@ -404,7 +454,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[setMaxListeners](../interfaces/sparsereadable.md#setmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:905 +Defined in node_modules/@types/node/events.d.ts:28 **Parameters:** @@ -422,7 +472,9 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[listenerCount](countingwritable.md#static-listenercount)* -Defined in node_modules/@types/node/base.d.ts:895 +Defined in node_modules/@types/node/events.d.ts:17 + +**`deprecated`** since v4.0.0 **Parameters:** @@ -441,22 +493,22 @@ Name | Type | *Inherited from [Verifier](verifier.md).[progress](verifier.md#progress)* -*Defined in [lib/source-destination/source-destination.ts:130](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L130)* +*Defined in [lib/source-destination/source-destination.ts:153](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L153)* ### bytes • **bytes**: *number* = 0 -*Defined in [lib/source-destination/source-destination.ts:130](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L130)* +*Defined in [lib/source-destination/source-destination.ts:153](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L153)* ### position • **position**: *number* = 0 -*Defined in [lib/source-destination/source-destination.ts:130](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L130)* +*Defined in [lib/source-destination/source-destination.ts:153](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L153)* ### speed • **speed**: *number* = 0 -*Defined in [lib/source-destination/source-destination.ts:130](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L130)* +*Defined in [lib/source-destination/source-destination.ts:153](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L153)* diff --git a/doc/classes/sparsetransformstream.md b/doc/classes/sparsetransformstream.md index e0276273..62eff7bf 100644 --- a/doc/classes/sparsetransformstream.md +++ b/doc/classes/sparsetransformstream.md @@ -29,14 +29,19 @@ * [position](sparsetransformstream.md#position) * [readable](sparsetransformstream.md#readable) * [readableHighWaterMark](sparsetransformstream.md#readablehighwatermark) +* [readableLength](sparsetransformstream.md#readablelength) * [writable](sparsetransformstream.md#writable) * [writableHighWaterMark](sparsetransformstream.md#writablehighwatermark) +* [writableLength](sparsetransformstream.md#writablelength) * [defaultMaxListeners](sparsetransformstream.md#static-defaultmaxlisteners) ### Methods +* [[Symbol.asyncIterator]](sparsetransformstream.md#[symbol.asynciterator]) +* [__transform](sparsetransformstream.md#private-__transform) * [_destroy](sparsetransformstream.md#_destroy) * [_final](sparsetransformstream.md#_final) +* [_flush](sparsetransformstream.md#_flush) * [_read](sparsetransformstream.md#_read) * [_transform](sparsetransformstream.md#_transform) * [_write](sparsetransformstream.md#_write) @@ -51,6 +56,7 @@ * [isPaused](sparsetransformstream.md#ispaused) * [listenerCount](sparsetransformstream.md#listenercount) * [listeners](sparsetransformstream.md#listeners) +* [off](sparsetransformstream.md#off) * [on](sparsetransformstream.md#on) * [once](sparsetransformstream.md#once) * [pause](sparsetransformstream.md#pause) @@ -58,6 +64,7 @@ * [prependListener](sparsetransformstream.md#prependlistener) * [prependOnceListener](sparsetransformstream.md#prependoncelistener) * [push](sparsetransformstream.md#push) +* [rawListeners](sparsetransformstream.md#rawlisteners) * [read](sparsetransformstream.md#read) * [removeAllListeners](sparsetransformstream.md#removealllisteners) * [removeListener](sparsetransformstream.md#removelistener) @@ -80,7 +87,7 @@ *Overrides [SourceTransform](../interfaces/sourcetransform.md).[constructor](../interfaces/sourcetransform.md#constructor)* -*Defined in [lib/sparse-stream/sparse-transform-stream.ts:35](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/sparse-stream/sparse-transform-stream.ts#L35)* +*Defined in [lib/sparse-stream/sparse-transform-stream.ts:36](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/sparse-stream/sparse-transform-stream.ts#L36)* **Parameters:** @@ -101,7 +108,7 @@ Name | Type | Default | • **alignedReadableState**: *[AlignedReadableState](alignedreadablestate.md)* -*Defined in [lib/sparse-stream/sparse-transform-stream.ts:35](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/sparse-stream/sparse-transform-stream.ts#L35)* +*Defined in [lib/sparse-stream/sparse-transform-stream.ts:36](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/sparse-stream/sparse-transform-stream.ts#L36)* ___ @@ -111,7 +118,7 @@ ___ *Implementation of [SparseReadable](../interfaces/sparsereadable.md).[blocks](../interfaces/sparsereadable.md#blocks)* -*Defined in [lib/sparse-stream/sparse-transform-stream.ts:32](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/sparse-stream/sparse-transform-stream.ts#L32)* +*Defined in [lib/sparse-stream/sparse-transform-stream.ts:33](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/sparse-stream/sparse-transform-stream.ts#L33)* ___ @@ -119,7 +126,7 @@ ___ • **bytesWritten**: *number* = 0 -*Defined in [lib/sparse-stream/sparse-transform-stream.ts:34](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/sparse-stream/sparse-transform-stream.ts#L34)* +*Defined in [lib/sparse-stream/sparse-transform-stream.ts:35](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/sparse-stream/sparse-transform-stream.ts#L35)* ___ @@ -127,7 +134,7 @@ ___ • **position**: *number* = 0 -*Defined in [lib/sparse-stream/sparse-transform-stream.ts:33](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/sparse-stream/sparse-transform-stream.ts#L33)* +*Defined in [lib/sparse-stream/sparse-transform-stream.ts:34](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/sparse-stream/sparse-transform-stream.ts#L34)* ___ @@ -139,7 +146,7 @@ ___ *Inherited from [SparseFilterStream](sparsefilterstream.md).[readable](sparsefilterstream.md#readable)* -Defined in node_modules/@types/node/base.d.ts:5422 +Defined in node_modules/@types/node/stream.d.ts:20 ___ @@ -149,7 +156,17 @@ ___ *Inherited from [SparseFilterStream](sparsefilterstream.md).[readableHighWaterMark](sparsefilterstream.md#readablehighwatermark)* -Defined in node_modules/@types/node/base.d.ts:5423 +Defined in node_modules/@types/node/stream.d.ts:21 + +___ + +### readableLength + +• **readableLength**: *number* + +*Inherited from [SparseFilterStream](sparsefilterstream.md).[readableLength](sparsefilterstream.md#readablelength)* + +Defined in node_modules/@types/node/stream.d.ts:22 ___ @@ -161,7 +178,7 @@ ___ *Inherited from [SparseFilterStream](sparsefilterstream.md).[writable](sparsefilterstream.md#writable)* -Defined in node_modules/@types/node/base.d.ts:5600 +Defined in node_modules/@types/node/stream.d.ts:209 ___ @@ -171,7 +188,17 @@ ___ *Inherited from [SparseFilterStream](sparsefilterstream.md).[writableHighWaterMark](sparsefilterstream.md#writablehighwatermark)* -Defined in node_modules/@types/node/base.d.ts:5601 +Defined in node_modules/@types/node/stream.d.ts:210 + +___ + +### writableLength + +• **writableLength**: *number* + +*Inherited from [SparseFilterStream](sparsefilterstream.md).[writableLength](sparsefilterstream.md#writablelength)* + +Defined in node_modules/@types/node/stream.d.ts:211 ___ @@ -181,10 +208,40 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[defaultMaxListeners](countingwritable.md#static-defaultmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:896 +Defined in node_modules/@types/node/events.d.ts:18 ## Methods +### [Symbol.asyncIterator] + +▸ **[Symbol.asyncIterator]**(): *AsyncIterableIterator‹any›* + +*Implementation of [SparseReadable](../interfaces/sparsereadable.md)* + +*Inherited from [SparseFilterStream](sparsefilterstream.md).[[Symbol.asyncIterator]](sparsefilterstream.md#[symbol.asynciterator])* + +Defined in node_modules/@types/node/stream.d.ts:95 + +**Returns:** *AsyncIterableIterator‹any›* + +___ + +### `Private` __transform + +▸ **__transform**(`chunk`: [SparseStreamChunk](../interfaces/sparsestreamchunk.md)): *Promise‹void›* + +*Defined in [lib/sparse-stream/sparse-transform-stream.ts:58](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/sparse-stream/sparse-transform-stream.ts#L58)* + +**Parameters:** + +Name | Type | +------ | ------ | +`chunk` | [SparseStreamChunk](../interfaces/sparsestreamchunk.md) | + +**Returns:** *Promise‹void›* + +___ + ### _destroy ▸ **_destroy**(`error`: [Error](notcapable.md#static-error) | null, `callback`: function): *void* @@ -193,7 +250,7 @@ Defined in node_modules/@types/node/base.d.ts:896 *Overrides [SparseReadStream](sparsereadstream.md).[_destroy](sparsereadstream.md#_destroy)* -Defined in node_modules/@types/node/base.d.ts:5605 +Defined in node_modules/@types/node/stream.d.ts:215 **Parameters:** @@ -201,13 +258,13 @@ Defined in node_modules/@types/node/base.d.ts:5605 ▪ **callback**: *function* -▸ (`error?`: [Error](notcapable.md#static-error)): *void* +▸ (`error`: [Error](notcapable.md#static-error) | null): *void* **Parameters:** Name | Type | ------ | ------ | -`error?` | [Error](notcapable.md#static-error) | +`error` | [Error](notcapable.md#static-error) | null | **Returns:** *void* @@ -215,17 +272,41 @@ ___ ### _final -▸ **_final**(`callback`: Function): *void* +▸ **_final**(`callback`: function): *void* *Inherited from [SparseFilterStream](sparsefilterstream.md).[_final](sparsefilterstream.md#_final)* -Defined in node_modules/@types/node/base.d.ts:5606 +Defined in node_modules/@types/node/stream.d.ts:216 + +**Parameters:** + +▪ **callback**: *function* + +▸ (`error?`: [Error](notcapable.md#static-error) | null): *void* **Parameters:** Name | Type | ------ | ------ | -`callback` | Function | +`error?` | [Error](notcapable.md#static-error) | null | + +**Returns:** *void* + +___ + +### _flush + +▸ **_flush**(`callback`: TransformCallback): *void* + +*Inherited from [SparseFilterStream](sparsefilterstream.md).[_flush](sparsefilterstream.md#_flush)* + +Defined in node_modules/@types/node/stream.d.ts:242 + +**Parameters:** + +Name | Type | +------ | ------ | +`callback` | TransformCallback | **Returns:** *void* @@ -237,7 +318,7 @@ ___ *Inherited from [SparseFilterStream](sparsefilterstream.md).[_read](sparsefilterstream.md#_read)* -Defined in node_modules/@types/node/base.d.ts:5425 +Defined in node_modules/@types/node/stream.d.ts:24 **Parameters:** @@ -251,11 +332,11 @@ ___ ### _transform -▸ **_transform**(`chunk`: [SparseStreamChunk](../interfaces/sparsestreamchunk.md), `_encoding`: string, `callback`: function): *Promise‹void›* +▸ **_transform**(`chunk`: [SparseStreamChunk](../interfaces/sparsestreamchunk.md), `_encoding`: string, `callback`: function): *void* *Overrides [SourceTransform](../interfaces/sourcetransform.md).[_transform](../interfaces/sourcetransform.md#_transform)* -*Defined in [lib/sparse-stream/sparse-transform-stream.ts:57](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/sparse-stream/sparse-transform-stream.ts#L57)* +*Defined in [lib/sparse-stream/sparse-transform-stream.ts:76](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/sparse-stream/sparse-transform-stream.ts#L76)* **Parameters:** @@ -273,7 +354,7 @@ Name | Type | ------ | ------ | `error?` | [Error](notcapable.md#static-error) | -**Returns:** *Promise‹void›* +**Returns:** *void* ___ @@ -283,7 +364,7 @@ ___ *Inherited from [SparseFilterStream](sparsefilterstream.md).[_write](sparsefilterstream.md#_write)* -Defined in node_modules/@types/node/base.d.ts:5603 +Defined in node_modules/@types/node/stream.d.ts:213 **Parameters:** @@ -293,13 +374,13 @@ Defined in node_modules/@types/node/base.d.ts:5603 ▪ **callback**: *function* -▸ (`err?`: [Error](notcapable.md#static-error)): *void* +▸ (`error?`: [Error](notcapable.md#static-error) | null): *void* **Parameters:** Name | Type | ------ | ------ | -`err?` | [Error](notcapable.md#static-error) | +`error?` | [Error](notcapable.md#static-error) | null | **Returns:** *void* @@ -311,7 +392,7 @@ ___ *Inherited from [SparseFilterStream](sparsefilterstream.md).[_writev](sparsefilterstream.md#optional-_writev)* -Defined in node_modules/@types/node/base.d.ts:5604 +Defined in node_modules/@types/node/stream.d.ts:214 **Parameters:** @@ -319,13 +400,13 @@ Defined in node_modules/@types/node/base.d.ts:5604 ▪ **callback**: *function* -▸ (`err?`: [Error](notcapable.md#static-error)): *void* +▸ (`error?`: [Error](notcapable.md#static-error) | null): *void* **Parameters:** Name | Type | ------ | ------ | -`err?` | [Error](notcapable.md#static-error) | +`error?` | [Error](notcapable.md#static-error) | null | **Returns:** *void* @@ -333,13 +414,13 @@ ___ ### addListener -▸ **addListener**(`event`: string, `listener`: function): *this* +▸ **addListener**(`event`: "close", `listener`: function): *this* *Inherited from [SparseFilterStream](sparsefilterstream.md).[addListener](sparsefilterstream.md#addlistener)* *Overrides [SourceSource](sourcesource.md).[addListener](sourcesource.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:5447 +Defined in node_modules/@types/node/stream.d.ts:46 Event emitter The defined events on documents including: @@ -351,30 +432,6 @@ The defined events on documents including: **Parameters:** -▪ **event**: *string* - -▪ **listener**: *function* - -▸ (...`args`: any[]): *void* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | any[] | - -**Returns:** *this* - -▸ **addListener**(`event`: "close", `listener`: function): *this* - -*Inherited from [SparseFilterStream](sparsefilterstream.md).[addListener](sparsefilterstream.md#addlistener)* - -*Overrides [SourceSource](sourcesource.md).[addListener](sourcesource.md#addlistener)* - -Defined in node_modules/@types/node/base.d.ts:5448 - -**Parameters:** - ▪ **event**: *"close"* ▪ **listener**: *function* @@ -389,7 +446,7 @@ Defined in node_modules/@types/node/base.d.ts:5448 *Overrides [SourceSource](sourcesource.md).[addListener](sourcesource.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:5449 +Defined in node_modules/@types/node/stream.d.ts:47 **Parameters:** @@ -397,13 +454,13 @@ Defined in node_modules/@types/node/base.d.ts:5449 ▪ **listener**: *function* -▸ (`chunk`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string): *void* +▸ (`chunk`: any): *void* **Parameters:** Name | Type | ------ | ------ | -`chunk` | [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string | +`chunk` | any | **Returns:** *this* @@ -413,7 +470,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[addListener](sourcesource.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:5450 +Defined in node_modules/@types/node/stream.d.ts:48 **Parameters:** @@ -431,7 +488,7 @@ Defined in node_modules/@types/node/base.d.ts:5450 *Overrides [SourceSource](sourcesource.md).[addListener](sourcesource.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:5451 +Defined in node_modules/@types/node/stream.d.ts:49 **Parameters:** @@ -449,7 +506,7 @@ Defined in node_modules/@types/node/base.d.ts:5451 *Overrides [SourceSource](sourcesource.md).[addListener](sourcesource.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:5452 +Defined in node_modules/@types/node/stream.d.ts:50 **Parameters:** @@ -467,6 +524,30 @@ Name | Type | **Returns:** *this* +▸ **addListener**(`event`: string | symbol, `listener`: function): *this* + +*Inherited from [SparseFilterStream](sparsefilterstream.md).[addListener](sparsefilterstream.md#addlistener)* + +*Overrides [SourceSource](sourcesource.md).[addListener](sourcesource.md#addlistener)* + +Defined in node_modules/@types/node/stream.d.ts:51 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* + +**Parameters:** + +Name | Type | +------ | ------ | +`...args` | any[] | + +**Returns:** *this* + ___ ### cork @@ -475,7 +556,7 @@ ___ *Inherited from [SparseFilterStream](sparsefilterstream.md).[cork](sparsefilterstream.md#cork)* -Defined in node_modules/@types/node/base.d.ts:5613 +Defined in node_modules/@types/node/stream.d.ts:223 **Returns:** *void* @@ -487,9 +568,7 @@ ___ *Inherited from [SparseFilterStream](sparsefilterstream.md).[destroy](sparsefilterstream.md#destroy)* -*Overrides [SparseReadStream](sparsereadstream.md).[destroy](sparsereadstream.md#destroy)* - -Defined in node_modules/@types/node/base.d.ts:5625 +Defined in node_modules/@types/node/stream.d.ts:35 **Parameters:** @@ -503,104 +582,104 @@ ___ ### emit -▸ **emit**(`event`: string | symbol, ...`args`: any[]): *boolean* - -*Implementation of [SparseReadable](../interfaces/sparsereadable.md)* +▸ **emit**(`event`: "close"): *boolean* *Inherited from [SparseFilterStream](sparsefilterstream.md).[emit](sparsefilterstream.md#emit)* *Overrides [SourceSource](sourcesource.md).[emit](sourcesource.md#emit)* -Defined in node_modules/@types/node/base.d.ts:5454 +Defined in node_modules/@types/node/stream.d.ts:53 **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`...args` | any[] | +`event` | "close" | **Returns:** *boolean* -▸ **emit**(`event`: "close"): *boolean* +▸ **emit**(`event`: "data", `chunk`: any): *boolean* *Inherited from [SparseFilterStream](sparsefilterstream.md).[emit](sparsefilterstream.md#emit)* *Overrides [SourceSource](sourcesource.md).[emit](sourcesource.md#emit)* -Defined in node_modules/@types/node/base.d.ts:5455 +Defined in node_modules/@types/node/stream.d.ts:54 **Parameters:** Name | Type | ------ | ------ | -`event` | "close" | +`event` | "data" | +`chunk` | any | **Returns:** *boolean* -▸ **emit**(`event`: "data", `chunk`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string): *boolean* +▸ **emit**(`event`: "end"): *boolean* *Inherited from [SparseFilterStream](sparsefilterstream.md).[emit](sparsefilterstream.md#emit)* *Overrides [SourceSource](sourcesource.md).[emit](sourcesource.md#emit)* -Defined in node_modules/@types/node/base.d.ts:5456 +Defined in node_modules/@types/node/stream.d.ts:55 **Parameters:** Name | Type | ------ | ------ | -`event` | "data" | -`chunk` | [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string | +`event` | "end" | **Returns:** *boolean* -▸ **emit**(`event`: "end"): *boolean* +▸ **emit**(`event`: "readable"): *boolean* *Inherited from [SparseFilterStream](sparsefilterstream.md).[emit](sparsefilterstream.md#emit)* *Overrides [SourceSource](sourcesource.md).[emit](sourcesource.md#emit)* -Defined in node_modules/@types/node/base.d.ts:5457 +Defined in node_modules/@types/node/stream.d.ts:56 **Parameters:** Name | Type | ------ | ------ | -`event` | "end" | +`event` | "readable" | **Returns:** *boolean* -▸ **emit**(`event`: "readable"): *boolean* +▸ **emit**(`event`: "error", `err`: [Error](notcapable.md#static-error)): *boolean* *Inherited from [SparseFilterStream](sparsefilterstream.md).[emit](sparsefilterstream.md#emit)* *Overrides [SourceSource](sourcesource.md).[emit](sourcesource.md#emit)* -Defined in node_modules/@types/node/base.d.ts:5458 +Defined in node_modules/@types/node/stream.d.ts:57 **Parameters:** Name | Type | ------ | ------ | -`event` | "readable" | +`event` | "error" | +`err` | [Error](notcapable.md#static-error) | **Returns:** *boolean* -▸ **emit**(`event`: "error", `err`: [Error](notcapable.md#static-error)): *boolean* +▸ **emit**(`event`: string | symbol, ...`args`: any[]): *boolean* + +*Implementation of [SparseReadable](../interfaces/sparsereadable.md)* *Inherited from [SparseFilterStream](sparsefilterstream.md).[emit](sparsefilterstream.md#emit)* *Overrides [SourceSource](sourcesource.md).[emit](sourcesource.md#emit)* -Defined in node_modules/@types/node/base.d.ts:5459 +Defined in node_modules/@types/node/stream.d.ts:58 **Parameters:** Name | Type | ------ | ------ | -`event` | "error" | -`err` | [Error](notcapable.md#static-error) | +`event` | string | symbol | +`...args` | any[] | **Returns:** *boolean* @@ -608,42 +687,40 @@ ___ ### end -▸ **end**(`cb?`: Function): *void* - -*Implementation of [SparseWritable](../interfaces/sparsewritable.md)* +▸ **end**(`cb?`: undefined | function): *void* *Inherited from [SparseFilterStream](sparsefilterstream.md).[end](sparsefilterstream.md#end)* -Defined in node_modules/@types/node/base.d.ts:5610 +Defined in node_modules/@types/node/stream.d.ts:220 **Parameters:** Name | Type | ------ | ------ | -`cb?` | Function | +`cb?` | undefined | function | **Returns:** *void* -▸ **end**(`chunk`: any, `cb?`: Function): *void* +▸ **end**(`chunk`: any, `cb?`: undefined | function): *void* *Inherited from [SparseFilterStream](sparsefilterstream.md).[end](sparsefilterstream.md#end)* -Defined in node_modules/@types/node/base.d.ts:5611 +Defined in node_modules/@types/node/stream.d.ts:221 **Parameters:** Name | Type | ------ | ------ | `chunk` | any | -`cb?` | Function | +`cb?` | undefined | function | **Returns:** *void* -▸ **end**(`chunk`: any, `encoding?`: undefined | string, `cb?`: Function): *void* +▸ **end**(`chunk`: any, `encoding?`: undefined | string, `cb?`: undefined | function): *void* *Inherited from [SparseFilterStream](sparsefilterstream.md).[end](sparsefilterstream.md#end)* -Defined in node_modules/@types/node/base.d.ts:5612 +Defined in node_modules/@types/node/stream.d.ts:222 **Parameters:** @@ -651,7 +728,7 @@ Name | Type | ------ | ------ | `chunk` | any | `encoding?` | undefined | string | -`cb?` | Function | +`cb?` | undefined | function | **Returns:** *void* @@ -665,7 +742,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[eventNames](countingwritable.md#eventnames)* -Defined in node_modules/@types/node/base.d.ts:909 +Defined in node_modules/@types/node/events.d.ts:33 **Returns:** *Array‹string | symbol›* @@ -679,7 +756,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[getMaxListeners](countingwritable.md#getmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:906 +Defined in node_modules/@types/node/events.d.ts:29 **Returns:** *number* @@ -693,7 +770,7 @@ ___ *Inherited from [SparseFilterStream](sparsefilterstream.md).[isPaused](sparsefilterstream.md#ispaused)* -Defined in node_modules/@types/node/base.d.ts:5430 +Defined in node_modules/@types/node/stream.d.ts:29 **Returns:** *boolean* @@ -707,7 +784,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[listenerCount](countingwritable.md#static-listenercount)* -Defined in node_modules/@types/node/base.d.ts:910 +Defined in node_modules/@types/node/events.d.ts:34 **Parameters:** @@ -727,7 +804,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[listeners](countingwritable.md#listeners)* -Defined in node_modules/@types/node/base.d.ts:907 +Defined in node_modules/@types/node/events.d.ts:30 **Parameters:** @@ -739,19 +816,17 @@ Name | Type | ___ -### on +### off -▸ **on**(`event`: string, `listener`: function): *this* +▸ **off**(`event`: string | symbol, `listener`: function): *this* -*Inherited from [SparseFilterStream](sparsefilterstream.md).[on](sparsefilterstream.md#on)* +*Inherited from [CountingWritable](countingwritable.md).[off](countingwritable.md#off)* -*Overrides [SourceSource](sourcesource.md).[on](sourcesource.md#on)* - -Defined in node_modules/@types/node/base.d.ts:5461 +Defined in node_modules/@types/node/events.d.ts:26 **Parameters:** -▪ **event**: *string* +▪ **event**: *string | symbol* ▪ **listener**: *function* @@ -765,13 +840,17 @@ Name | Type | **Returns:** *this* +___ + +### on + ▸ **on**(`event`: "close", `listener`: function): *this* *Inherited from [SparseFilterStream](sparsefilterstream.md).[on](sparsefilterstream.md#on)* *Overrides [SourceSource](sourcesource.md).[on](sourcesource.md#on)* -Defined in node_modules/@types/node/base.d.ts:5462 +Defined in node_modules/@types/node/stream.d.ts:60 **Parameters:** @@ -789,7 +868,7 @@ Defined in node_modules/@types/node/base.d.ts:5462 *Overrides [SourceSource](sourcesource.md).[on](sourcesource.md#on)* -Defined in node_modules/@types/node/base.d.ts:5463 +Defined in node_modules/@types/node/stream.d.ts:61 **Parameters:** @@ -797,13 +876,13 @@ Defined in node_modules/@types/node/base.d.ts:5463 ▪ **listener**: *function* -▸ (`chunk`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string): *void* +▸ (`chunk`: any): *void* **Parameters:** Name | Type | ------ | ------ | -`chunk` | [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string | +`chunk` | any | **Returns:** *this* @@ -813,7 +892,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[on](sourcesource.md#on)* -Defined in node_modules/@types/node/base.d.ts:5464 +Defined in node_modules/@types/node/stream.d.ts:62 **Parameters:** @@ -831,7 +910,7 @@ Defined in node_modules/@types/node/base.d.ts:5464 *Overrides [SourceSource](sourcesource.md).[on](sourcesource.md#on)* -Defined in node_modules/@types/node/base.d.ts:5465 +Defined in node_modules/@types/node/stream.d.ts:63 **Parameters:** @@ -849,7 +928,7 @@ Defined in node_modules/@types/node/base.d.ts:5465 *Overrides [SourceSource](sourcesource.md).[on](sourcesource.md#on)* -Defined in node_modules/@types/node/base.d.ts:5466 +Defined in node_modules/@types/node/stream.d.ts:64 **Parameters:** @@ -867,21 +946,17 @@ Name | Type | **Returns:** *this* -___ +▸ **on**(`event`: string | symbol, `listener`: function): *this* -### once - -▸ **once**(`event`: string, `listener`: function): *this* - -*Inherited from [SparseFilterStream](sparsefilterstream.md).[once](sparsefilterstream.md#once)* +*Inherited from [SparseFilterStream](sparsefilterstream.md).[on](sparsefilterstream.md#on)* -*Overrides [SourceSource](sourcesource.md).[once](sourcesource.md#once)* +*Overrides [SourceSource](sourcesource.md).[on](sourcesource.md#on)* -Defined in node_modules/@types/node/base.d.ts:5468 +Defined in node_modules/@types/node/stream.d.ts:65 **Parameters:** -▪ **event**: *string* +▪ **event**: *string | symbol* ▪ **listener**: *function* @@ -895,13 +970,17 @@ Name | Type | **Returns:** *this* +___ + +### once + ▸ **once**(`event`: "close", `listener`: function): *this* *Inherited from [SparseFilterStream](sparsefilterstream.md).[once](sparsefilterstream.md#once)* *Overrides [SourceSource](sourcesource.md).[once](sourcesource.md#once)* -Defined in node_modules/@types/node/base.d.ts:5469 +Defined in node_modules/@types/node/stream.d.ts:67 **Parameters:** @@ -919,7 +998,7 @@ Defined in node_modules/@types/node/base.d.ts:5469 *Overrides [SourceSource](sourcesource.md).[once](sourcesource.md#once)* -Defined in node_modules/@types/node/base.d.ts:5470 +Defined in node_modules/@types/node/stream.d.ts:68 **Parameters:** @@ -927,13 +1006,13 @@ Defined in node_modules/@types/node/base.d.ts:5470 ▪ **listener**: *function* -▸ (`chunk`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string): *void* +▸ (`chunk`: any): *void* **Parameters:** Name | Type | ------ | ------ | -`chunk` | [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string | +`chunk` | any | **Returns:** *this* @@ -943,7 +1022,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[once](sourcesource.md#once)* -Defined in node_modules/@types/node/base.d.ts:5471 +Defined in node_modules/@types/node/stream.d.ts:69 **Parameters:** @@ -961,7 +1040,7 @@ Defined in node_modules/@types/node/base.d.ts:5471 *Overrides [SourceSource](sourcesource.md).[once](sourcesource.md#once)* -Defined in node_modules/@types/node/base.d.ts:5472 +Defined in node_modules/@types/node/stream.d.ts:70 **Parameters:** @@ -979,7 +1058,7 @@ Defined in node_modules/@types/node/base.d.ts:5472 *Overrides [SourceSource](sourcesource.md).[once](sourcesource.md#once)* -Defined in node_modules/@types/node/base.d.ts:5473 +Defined in node_modules/@types/node/stream.d.ts:71 **Parameters:** @@ -997,6 +1076,30 @@ Name | Type | **Returns:** *this* +▸ **once**(`event`: string | symbol, `listener`: function): *this* + +*Inherited from [SparseFilterStream](sparsefilterstream.md).[once](sparsefilterstream.md#once)* + +*Overrides [SourceSource](sourcesource.md).[once](sourcesource.md#once)* + +Defined in node_modules/@types/node/stream.d.ts:72 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* + +**Parameters:** + +Name | Type | +------ | ------ | +`...args` | any[] | + +**Returns:** *this* + ___ ### pause @@ -1007,7 +1110,7 @@ ___ *Inherited from [SparseFilterStream](sparsefilterstream.md).[pause](sparsefilterstream.md#pause)* -Defined in node_modules/@types/node/base.d.ts:5428 +Defined in node_modules/@types/node/stream.d.ts:27 **Returns:** *this* @@ -1019,7 +1122,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[pipe](countingwritable.md#pipe)* -Defined in node_modules/@types/node/base.d.ts:5407 +Defined in node_modules/@types/node/stream.d.ts:5 **Type parameters:** @@ -1038,37 +1141,13 @@ ___ ### prependListener -▸ **prependListener**(`event`: string, `listener`: function): *this* - -*Inherited from [SparseFilterStream](sparsefilterstream.md).[prependListener](sparsefilterstream.md#prependlistener)* - -*Overrides [SourceSource](sourcesource.md).[prependListener](sourcesource.md#prependlistener)* - -Defined in node_modules/@types/node/base.d.ts:5475 - -**Parameters:** - -▪ **event**: *string* - -▪ **listener**: *function* - -▸ (...`args`: any[]): *void* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | any[] | - -**Returns:** *this* - ▸ **prependListener**(`event`: "close", `listener`: function): *this* *Inherited from [SparseFilterStream](sparsefilterstream.md).[prependListener](sparsefilterstream.md#prependlistener)* *Overrides [SourceSource](sourcesource.md).[prependListener](sourcesource.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:5476 +Defined in node_modules/@types/node/stream.d.ts:74 **Parameters:** @@ -1086,7 +1165,7 @@ Defined in node_modules/@types/node/base.d.ts:5476 *Overrides [SourceSource](sourcesource.md).[prependListener](sourcesource.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:5477 +Defined in node_modules/@types/node/stream.d.ts:75 **Parameters:** @@ -1094,13 +1173,13 @@ Defined in node_modules/@types/node/base.d.ts:5477 ▪ **listener**: *function* -▸ (`chunk`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string): *void* +▸ (`chunk`: any): *void* **Parameters:** Name | Type | ------ | ------ | -`chunk` | [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string | +`chunk` | any | **Returns:** *this* @@ -1110,7 +1189,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[prependListener](sourcesource.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:5478 +Defined in node_modules/@types/node/stream.d.ts:76 **Parameters:** @@ -1128,7 +1207,7 @@ Defined in node_modules/@types/node/base.d.ts:5478 *Overrides [SourceSource](sourcesource.md).[prependListener](sourcesource.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:5479 +Defined in node_modules/@types/node/stream.d.ts:77 **Parameters:** @@ -1146,7 +1225,7 @@ Defined in node_modules/@types/node/base.d.ts:5479 *Overrides [SourceSource](sourcesource.md).[prependListener](sourcesource.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:5480 +Defined in node_modules/@types/node/stream.d.ts:78 **Parameters:** @@ -1164,21 +1243,17 @@ Name | Type | **Returns:** *this* -___ +▸ **prependListener**(`event`: string | symbol, `listener`: function): *this* -### prependOnceListener - -▸ **prependOnceListener**(`event`: string, `listener`: function): *this* - -*Inherited from [SparseFilterStream](sparsefilterstream.md).[prependOnceListener](sparsefilterstream.md#prependoncelistener)* +*Inherited from [SparseFilterStream](sparsefilterstream.md).[prependListener](sparsefilterstream.md#prependlistener)* -*Overrides [SourceSource](sourcesource.md).[prependOnceListener](sourcesource.md#prependoncelistener)* +*Overrides [SourceSource](sourcesource.md).[prependListener](sourcesource.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:5482 +Defined in node_modules/@types/node/stream.d.ts:79 **Parameters:** -▪ **event**: *string* +▪ **event**: *string | symbol* ▪ **listener**: *function* @@ -1192,13 +1267,17 @@ Name | Type | **Returns:** *this* +___ + +### prependOnceListener + ▸ **prependOnceListener**(`event`: "close", `listener`: function): *this* *Inherited from [SparseFilterStream](sparsefilterstream.md).[prependOnceListener](sparsefilterstream.md#prependoncelistener)* *Overrides [SourceSource](sourcesource.md).[prependOnceListener](sourcesource.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:5483 +Defined in node_modules/@types/node/stream.d.ts:81 **Parameters:** @@ -1216,7 +1295,7 @@ Defined in node_modules/@types/node/base.d.ts:5483 *Overrides [SourceSource](sourcesource.md).[prependOnceListener](sourcesource.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:5484 +Defined in node_modules/@types/node/stream.d.ts:82 **Parameters:** @@ -1224,13 +1303,13 @@ Defined in node_modules/@types/node/base.d.ts:5484 ▪ **listener**: *function* -▸ (`chunk`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string): *void* +▸ (`chunk`: any): *void* **Parameters:** Name | Type | ------ | ------ | -`chunk` | [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string | +`chunk` | any | **Returns:** *this* @@ -1240,7 +1319,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[prependOnceListener](sourcesource.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:5485 +Defined in node_modules/@types/node/stream.d.ts:83 **Parameters:** @@ -1258,7 +1337,7 @@ Defined in node_modules/@types/node/base.d.ts:5485 *Overrides [SourceSource](sourcesource.md).[prependOnceListener](sourcesource.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:5486 +Defined in node_modules/@types/node/stream.d.ts:84 **Parameters:** @@ -1276,7 +1355,7 @@ Defined in node_modules/@types/node/base.d.ts:5486 *Overrides [SourceSource](sourcesource.md).[prependOnceListener](sourcesource.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:5487 +Defined in node_modules/@types/node/stream.d.ts:85 **Parameters:** @@ -1294,6 +1373,30 @@ Name | Type | **Returns:** *this* +▸ **prependOnceListener**(`event`: string | symbol, `listener`: function): *this* + +*Inherited from [SparseFilterStream](sparsefilterstream.md).[prependOnceListener](sparsefilterstream.md#prependoncelistener)* + +*Overrides [SourceSource](sourcesource.md).[prependOnceListener](sourcesource.md#prependoncelistener)* + +Defined in node_modules/@types/node/stream.d.ts:86 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* + +**Parameters:** + +Name | Type | +------ | ------ | +`...args` | any[] | + +**Returns:** *this* + ___ ### push @@ -1302,7 +1405,7 @@ ___ *Inherited from [SparseFilterStream](sparsefilterstream.md).[push](sparsefilterstream.md#push)* -Defined in node_modules/@types/node/base.d.ts:5434 +Defined in node_modules/@types/node/stream.d.ts:33 **Parameters:** @@ -1315,79 +1418,75 @@ Name | Type | ___ -### read +### rawListeners -▸ **read**(`size?`: undefined | number): *any* +▸ **rawListeners**(`event`: string | symbol): *Function[]* *Implementation of [SparseReadable](../interfaces/sparsereadable.md)* -*Inherited from [SparseFilterStream](sparsefilterstream.md).[read](sparsefilterstream.md#read)* +*Inherited from [CountingWritable](countingwritable.md).[rawListeners](countingwritable.md#rawlisteners)* -Defined in node_modules/@types/node/base.d.ts:5426 +Defined in node_modules/@types/node/events.d.ts:31 **Parameters:** Name | Type | ------ | ------ | -`size?` | undefined | number | +`event` | string | symbol | -**Returns:** *any* +**Returns:** *Function[]* ___ -### removeAllListeners +### read -▸ **removeAllListeners**(`event?`: string | symbol): *this* +▸ **read**(`size?`: undefined | number): *any* *Implementation of [SparseReadable](../interfaces/sparsereadable.md)* -*Inherited from [CountingWritable](countingwritable.md).[removeAllListeners](countingwritable.md#removealllisteners)* +*Inherited from [SparseFilterStream](sparsefilterstream.md).[read](sparsefilterstream.md#read)* -Defined in node_modules/@types/node/base.d.ts:904 +Defined in node_modules/@types/node/stream.d.ts:25 **Parameters:** Name | Type | ------ | ------ | -`event?` | string | symbol | +`size?` | undefined | number | -**Returns:** *this* +**Returns:** *any* ___ -### removeListener - -▸ **removeListener**(`event`: string, `listener`: function): *this* - -*Inherited from [SparseFilterStream](sparsefilterstream.md).[removeListener](sparsefilterstream.md#removelistener)* - -*Overrides [SourceSource](sourcesource.md).[removeListener](sourcesource.md#removelistener)* - -Defined in node_modules/@types/node/base.d.ts:5489 +### removeAllListeners -**Parameters:** +▸ **removeAllListeners**(`event?`: string | symbol): *this* -▪ **event**: *string* +*Implementation of [SparseReadable](../interfaces/sparsereadable.md)* -▪ **listener**: *function* +*Inherited from [CountingWritable](countingwritable.md).[removeAllListeners](countingwritable.md#removealllisteners)* -▸ (...`args`: any[]): *void* +Defined in node_modules/@types/node/events.d.ts:27 **Parameters:** Name | Type | ------ | ------ | -`...args` | any[] | +`event?` | string | symbol | **Returns:** *this* +___ + +### removeListener + ▸ **removeListener**(`event`: "close", `listener`: function): *this* *Inherited from [SparseFilterStream](sparsefilterstream.md).[removeListener](sparsefilterstream.md#removelistener)* *Overrides [SourceSource](sourcesource.md).[removeListener](sourcesource.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:5490 +Defined in node_modules/@types/node/stream.d.ts:88 **Parameters:** @@ -1405,7 +1504,7 @@ Defined in node_modules/@types/node/base.d.ts:5490 *Overrides [SourceSource](sourcesource.md).[removeListener](sourcesource.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:5491 +Defined in node_modules/@types/node/stream.d.ts:89 **Parameters:** @@ -1413,13 +1512,13 @@ Defined in node_modules/@types/node/base.d.ts:5491 ▪ **listener**: *function* -▸ (`chunk`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string): *void* +▸ (`chunk`: any): *void* **Parameters:** Name | Type | ------ | ------ | -`chunk` | [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string | +`chunk` | any | **Returns:** *this* @@ -1429,7 +1528,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[removeListener](sourcesource.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:5492 +Defined in node_modules/@types/node/stream.d.ts:90 **Parameters:** @@ -1447,7 +1546,7 @@ Defined in node_modules/@types/node/base.d.ts:5492 *Overrides [SourceSource](sourcesource.md).[removeListener](sourcesource.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:5493 +Defined in node_modules/@types/node/stream.d.ts:91 **Parameters:** @@ -1465,7 +1564,7 @@ Defined in node_modules/@types/node/base.d.ts:5493 *Overrides [SourceSource](sourcesource.md).[removeListener](sourcesource.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:5494 +Defined in node_modules/@types/node/stream.d.ts:92 **Parameters:** @@ -1483,6 +1582,30 @@ Name | Type | **Returns:** *this* +▸ **removeListener**(`event`: string | symbol, `listener`: function): *this* + +*Inherited from [SparseFilterStream](sparsefilterstream.md).[removeListener](sparsefilterstream.md#removelistener)* + +*Overrides [SourceSource](sourcesource.md).[removeListener](sourcesource.md#removelistener)* + +Defined in node_modules/@types/node/stream.d.ts:93 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* + +**Parameters:** + +Name | Type | +------ | ------ | +`...args` | any[] | + +**Returns:** *this* + ___ ### resume @@ -1493,7 +1616,7 @@ ___ *Inherited from [SparseFilterStream](sparsefilterstream.md).[resume](sparsefilterstream.md#resume)* -Defined in node_modules/@types/node/base.d.ts:5429 +Defined in node_modules/@types/node/stream.d.ts:28 **Returns:** *this* @@ -1505,7 +1628,7 @@ ___ *Inherited from [SparseFilterStream](sparsefilterstream.md).[setDefaultEncoding](sparsefilterstream.md#setdefaultencoding)* -Defined in node_modules/@types/node/base.d.ts:5609 +Defined in node_modules/@types/node/stream.d.ts:219 **Parameters:** @@ -1525,7 +1648,7 @@ ___ *Inherited from [SparseFilterStream](sparsefilterstream.md).[setEncoding](sparsefilterstream.md#setencoding)* -Defined in node_modules/@types/node/base.d.ts:5427 +Defined in node_modules/@types/node/stream.d.ts:26 **Parameters:** @@ -1545,7 +1668,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[setMaxListeners](countingwritable.md#setmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:905 +Defined in node_modules/@types/node/events.d.ts:28 **Parameters:** @@ -1563,7 +1686,7 @@ ___ *Inherited from [SparseFilterStream](sparsefilterstream.md).[uncork](sparsefilterstream.md#uncork)* -Defined in node_modules/@types/node/base.d.ts:5614 +Defined in node_modules/@types/node/stream.d.ts:224 **Returns:** *void* @@ -1571,23 +1694,19 @@ ___ ### unpipe -▸ **unpipe**<**T**>(`destination?`: T): *this* +▸ **unpipe**(`destination?`: NodeJS.WritableStream): *this* *Implementation of [SparseReadable](../interfaces/sparsereadable.md)* *Inherited from [SparseFilterStream](sparsefilterstream.md).[unpipe](sparsefilterstream.md#unpipe)* -Defined in node_modules/@types/node/base.d.ts:5431 - -**Type parameters:** - -▪ **T**: *WritableStream* +Defined in node_modules/@types/node/stream.d.ts:30 **Parameters:** Name | Type | ------ | ------ | -`destination?` | T | +`destination?` | NodeJS.WritableStream | **Returns:** *this* @@ -1599,7 +1718,7 @@ ___ *Inherited from [SparseFilterStream](sparsefilterstream.md).[unshift](sparsefilterstream.md#unshift)* -Defined in node_modules/@types/node/base.d.ts:5432 +Defined in node_modules/@types/node/stream.d.ts:31 **Parameters:** @@ -1619,7 +1738,7 @@ ___ *Inherited from [SparseFilterStream](sparsefilterstream.md).[wrap](sparsefilterstream.md#wrap)* -Defined in node_modules/@types/node/base.d.ts:5433 +Defined in node_modules/@types/node/stream.d.ts:32 **Parameters:** @@ -1633,26 +1752,26 @@ ___ ### write -▸ **write**(`chunk`: any, `cb?`: Function): *boolean* +▸ **write**(`chunk`: any, `cb?`: undefined | function): *boolean* *Inherited from [SparseFilterStream](sparsefilterstream.md).[write](sparsefilterstream.md#write)* -Defined in node_modules/@types/node/base.d.ts:5607 +Defined in node_modules/@types/node/stream.d.ts:217 **Parameters:** Name | Type | ------ | ------ | `chunk` | any | -`cb?` | Function | +`cb?` | undefined | function | **Returns:** *boolean* -▸ **write**(`chunk`: any, `encoding?`: undefined | string, `cb?`: Function): *boolean* +▸ **write**(`chunk`: any, `encoding?`: undefined | string, `cb?`: undefined | function): *boolean* *Inherited from [SparseFilterStream](sparsefilterstream.md).[write](sparsefilterstream.md#write)* -Defined in node_modules/@types/node/base.d.ts:5608 +Defined in node_modules/@types/node/stream.d.ts:218 **Parameters:** @@ -1660,7 +1779,7 @@ Name | Type | ------ | ------ | `chunk` | any | `encoding?` | undefined | string | -`cb?` | Function | +`cb?` | undefined | function | **Returns:** *boolean* @@ -1672,7 +1791,9 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[listenerCount](countingwritable.md#static-listenercount)* -Defined in node_modules/@types/node/base.d.ts:895 +Defined in node_modules/@types/node/events.d.ts:17 + +**`deprecated`** since v4.0.0 **Parameters:** diff --git a/doc/classes/sparsewritestream.md b/doc/classes/sparsewritestream.md index fb4a9c21..346d5eae 100644 --- a/doc/classes/sparsewritestream.md +++ b/doc/classes/sparsewritestream.md @@ -29,6 +29,7 @@ * [position](sparsewritestream.md#position) * [writable](sparsewritestream.md#writable) * [writableHighWaterMark](sparsewritestream.md#writablehighwatermark) +* [writableLength](sparsewritestream.md#writablelength) * [defaultMaxListeners](sparsewritestream.md#static-defaultmaxlisteners) ### Methods @@ -49,11 +50,13 @@ * [getMaxListeners](sparsewritestream.md#getmaxlisteners) * [listenerCount](sparsewritestream.md#listenercount) * [listeners](sparsewritestream.md#listeners) +* [off](sparsewritestream.md#off) * [on](sparsewritestream.md#on) * [once](sparsewritestream.md#once) * [pipe](sparsewritestream.md#pipe) * [prependListener](sparsewritestream.md#prependlistener) * [prependOnceListener](sparsewritestream.md#prependoncelistener) +* [rawListeners](sparsewritestream.md#rawlisteners) * [removeAllListeners](sparsewritestream.md#removealllisteners) * [removeListener](sparsewritestream.md#removelistener) * [setDefaultEncoding](sparsewritestream.md#setdefaultencoding) @@ -71,7 +74,7 @@ *Overrides [CountingWritable](countingwritable.md).[constructor](countingwritable.md#constructor)* -*Defined in [lib/sparse-stream/sparse-write-stream.ts:19](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/sparse-stream/sparse-write-stream.ts#L19)* +*Defined in [lib/sparse-stream/sparse-write-stream.ts:19](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/sparse-stream/sparse-write-stream.ts#L19)* **Parameters:** @@ -92,7 +95,7 @@ Name | Type | Default | • **_firstChunks**: *[SparseStreamChunk](../interfaces/sparsestreamchunk.md)[]* = [] -*Defined in [lib/sparse-stream/sparse-write-stream.ts:19](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/sparse-stream/sparse-write-stream.ts#L19)* +*Defined in [lib/sparse-stream/sparse-write-stream.ts:19](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/sparse-stream/sparse-write-stream.ts#L19)* ___ @@ -100,7 +103,7 @@ ___ • **bytesWritten**: *number* = 0 -*Defined in [lib/sparse-stream/sparse-write-stream.ts:18](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/sparse-stream/sparse-write-stream.ts#L18)* +*Defined in [lib/sparse-stream/sparse-write-stream.ts:18](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/sparse-stream/sparse-write-stream.ts#L18)* ___ @@ -108,7 +111,7 @@ ___ • **destination**: *[SourceDestination](sourcedestination.md)* -*Defined in [lib/sparse-stream/sparse-write-stream.ts:14](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/sparse-stream/sparse-write-stream.ts#L14)* +*Defined in [lib/sparse-stream/sparse-write-stream.ts:14](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/sparse-stream/sparse-write-stream.ts#L14)* ___ @@ -116,7 +119,7 @@ ___ • **firstBytesToKeep**: *number* -*Defined in [lib/sparse-stream/sparse-write-stream.ts:15](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/sparse-stream/sparse-write-stream.ts#L15)* +*Defined in [lib/sparse-stream/sparse-write-stream.ts:15](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/sparse-stream/sparse-write-stream.ts#L15)* ___ @@ -124,7 +127,7 @@ ___ • **maxRetries**: *number* -*Defined in [lib/sparse-stream/sparse-write-stream.ts:16](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/sparse-stream/sparse-write-stream.ts#L16)* +*Defined in [lib/sparse-stream/sparse-write-stream.ts:16](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/sparse-stream/sparse-write-stream.ts#L16)* ___ @@ -132,7 +135,7 @@ ___ • **position**: *number* -*Defined in [lib/sparse-stream/sparse-write-stream.ts:17](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/sparse-stream/sparse-write-stream.ts#L17)* +*Defined in [lib/sparse-stream/sparse-write-stream.ts:17](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/sparse-stream/sparse-write-stream.ts#L17)* ___ @@ -144,7 +147,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[writable](countingwritable.md#writable)* -Defined in node_modules/@types/node/base.d.ts:5508 +Defined in node_modules/@types/node/stream.d.ts:109 ___ @@ -154,7 +157,17 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[writableHighWaterMark](countingwritable.md#writablehighwatermark)* -Defined in node_modules/@types/node/base.d.ts:5509 +Defined in node_modules/@types/node/stream.d.ts:110 + +___ + +### writableLength + +• **writableLength**: *number* + +*Inherited from [CountingWritable](countingwritable.md).[writableLength](countingwritable.md#writablelength)* + +Defined in node_modules/@types/node/stream.d.ts:111 ___ @@ -164,7 +177,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[defaultMaxListeners](countingwritable.md#static-defaultmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:896 +Defined in node_modules/@types/node/events.d.ts:18 ## Methods @@ -172,7 +185,7 @@ Defined in node_modules/@types/node/base.d.ts:896 ▸ **__final**(): *Promise‹void›* -*Defined in [lib/sparse-stream/sparse-write-stream.ts:129](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/sparse-stream/sparse-write-stream.ts#L129)* +*Defined in [lib/sparse-stream/sparse-write-stream.ts:129](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/sparse-stream/sparse-write-stream.ts#L129)* **Returns:** *Promise‹void›* @@ -182,7 +195,7 @@ ___ ▸ **__write**(`chunk`: [SparseStreamChunk](../interfaces/sparsestreamchunk.md)): *Promise‹void›* -*Defined in [lib/sparse-stream/sparse-write-stream.ts:84](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/sparse-stream/sparse-write-stream.ts#L84)* +*Defined in [lib/sparse-stream/sparse-write-stream.ts:84](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/sparse-stream/sparse-write-stream.ts#L84)* **Parameters:** @@ -200,7 +213,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[_destroy](countingwritable.md#_destroy)* -Defined in node_modules/@types/node/base.d.ts:5513 +Defined in node_modules/@types/node/stream.d.ts:115 **Parameters:** @@ -208,13 +221,13 @@ Defined in node_modules/@types/node/base.d.ts:5513 ▪ **callback**: *function* -▸ (`error?`: [Error](notcapable.md#static-error)): *void* +▸ (`error`: [Error](notcapable.md#static-error) | null): *void* **Parameters:** Name | Type | ------ | ------ | -`error?` | [Error](notcapable.md#static-error) | +`error` | [Error](notcapable.md#static-error) | null | **Returns:** *void* @@ -226,7 +239,7 @@ ___ *Overrides [CountingWritable](countingwritable.md).[_final](countingwritable.md#_final)* -*Defined in [lib/sparse-stream/sparse-write-stream.ts:143](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/sparse-stream/sparse-write-stream.ts#L143)* +*Defined in [lib/sparse-stream/sparse-write-stream.ts:143](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/sparse-stream/sparse-write-stream.ts#L143)* **`summary`** Write buffered data before a stream ends, called by stream internals @@ -234,13 +247,13 @@ ___ ▪ **callback**: *function* -▸ (`error?`: [Error](notcapable.md#static-error) | void): *void* +▸ (`error?`: [Error](notcapable.md#static-error) | null): *void* **Parameters:** Name | Type | ------ | ------ | -`error?` | [Error](notcapable.md#static-error) | void | +`error?` | [Error](notcapable.md#static-error) | null | **Returns:** *void* @@ -252,7 +265,7 @@ ___ *Overrides void* -*Defined in [lib/sparse-stream/sparse-write-stream.ts:121](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/sparse-stream/sparse-write-stream.ts#L121)* +*Defined in [lib/sparse-stream/sparse-write-stream.ts:121](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/sparse-stream/sparse-write-stream.ts#L121)* **Parameters:** @@ -262,13 +275,13 @@ ___ ▪ **callback**: *function* -▸ (`error`: [Error](notcapable.md#static-error) | undefined): *void* +▸ (`error`: [Error](notcapable.md#static-error) | null): *void* **Parameters:** Name | Type | ------ | ------ | -`error` | [Error](notcapable.md#static-error) | undefined | +`error` | [Error](notcapable.md#static-error) | null | **Returns:** *void* @@ -280,7 +293,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[_writev](countingwritable.md#optional-_writev)* -Defined in node_modules/@types/node/base.d.ts:5512 +Defined in node_modules/@types/node/stream.d.ts:114 **Parameters:** @@ -288,13 +301,13 @@ Defined in node_modules/@types/node/base.d.ts:5512 ▪ **callback**: *function* -▸ (`err?`: [Error](notcapable.md#static-error)): *void* +▸ (`error?`: [Error](notcapable.md#static-error) | null): *void* **Parameters:** Name | Type | ------ | ------ | -`err?` | [Error](notcapable.md#static-error) | +`error?` | [Error](notcapable.md#static-error) | null | **Returns:** *void* @@ -302,13 +315,13 @@ ___ ### addListener -▸ **addListener**(`event`: string, `listener`: function): *this* +▸ **addListener**(`event`: "close", `listener`: function): *this* *Inherited from [CountingWritable](countingwritable.md).[addListener](countingwritable.md#addlistener)* *Overrides [SourceSource](sourcesource.md).[addListener](sourcesource.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:5535 +Defined in node_modules/@types/node/stream.d.ts:137 Event emitter The defined events on documents including: @@ -321,30 +334,6 @@ The defined events on documents including: **Parameters:** -▪ **event**: *string* - -▪ **listener**: *function* - -▸ (...`args`: any[]): *void* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | any[] | - -**Returns:** *this* - -▸ **addListener**(`event`: "close", `listener`: function): *this* - -*Inherited from [CountingWritable](countingwritable.md).[addListener](countingwritable.md#addlistener)* - -*Overrides [SourceSource](sourcesource.md).[addListener](sourcesource.md#addlistener)* - -Defined in node_modules/@types/node/base.d.ts:5536 - -**Parameters:** - ▪ **event**: *"close"* ▪ **listener**: *function* @@ -359,7 +348,7 @@ Defined in node_modules/@types/node/base.d.ts:5536 *Overrides [SourceSource](sourcesource.md).[addListener](sourcesource.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:5537 +Defined in node_modules/@types/node/stream.d.ts:138 **Parameters:** @@ -377,7 +366,7 @@ Defined in node_modules/@types/node/base.d.ts:5537 *Overrides [SourceSource](sourcesource.md).[addListener](sourcesource.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:5538 +Defined in node_modules/@types/node/stream.d.ts:139 **Parameters:** @@ -401,7 +390,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[addListener](sourcesource.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:5539 +Defined in node_modules/@types/node/stream.d.ts:140 **Parameters:** @@ -419,7 +408,7 @@ Defined in node_modules/@types/node/base.d.ts:5539 *Overrides [SourceSource](sourcesource.md).[addListener](sourcesource.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:5540 +Defined in node_modules/@types/node/stream.d.ts:141 **Parameters:** @@ -443,7 +432,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[addListener](sourcesource.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:5541 +Defined in node_modules/@types/node/stream.d.ts:142 **Parameters:** @@ -461,13 +450,37 @@ Name | Type | **Returns:** *this* +▸ **addListener**(`event`: string | symbol, `listener`: function): *this* + +*Inherited from [CountingWritable](countingwritable.md).[addListener](countingwritable.md#addlistener)* + +*Overrides [SourceSource](sourcesource.md).[addListener](sourcesource.md#addlistener)* + +Defined in node_modules/@types/node/stream.d.ts:143 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* + +**Parameters:** + +Name | Type | +------ | ------ | +`...args` | any[] | + +**Returns:** *this* + ___ ### `Private` copyChunk ▸ **copyChunk**(`chunk`: [SparseStreamChunk](../interfaces/sparsestreamchunk.md)): *[SparseStreamChunk](../interfaces/sparsestreamchunk.md)* -*Defined in [lib/sparse-stream/sparse-write-stream.ts:71](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/sparse-stream/sparse-write-stream.ts#L71)* +*Defined in [lib/sparse-stream/sparse-write-stream.ts:71](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/sparse-stream/sparse-write-stream.ts#L71)* **Parameters:** @@ -485,7 +498,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[cork](countingwritable.md#cork)* -Defined in node_modules/@types/node/base.d.ts:5521 +Defined in node_modules/@types/node/stream.d.ts:123 **Returns:** *void* @@ -497,7 +510,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[destroy](countingwritable.md#destroy)* -Defined in node_modules/@types/node/base.d.ts:5523 +Defined in node_modules/@types/node/stream.d.ts:125 **Parameters:** @@ -511,32 +524,13 @@ ___ ### emit -▸ **emit**(`event`: string | symbol, ...`args`: any[]): *boolean* - -*Implementation of [SparseWritable](../interfaces/sparsewritable.md)* - -*Inherited from [CountingWritable](countingwritable.md).[emit](countingwritable.md#emit)* - -*Overrides [SourceSource](sourcesource.md).[emit](sourcesource.md#emit)* - -Defined in node_modules/@types/node/base.d.ts:5543 - -**Parameters:** - -Name | Type | ------- | ------ | -`event` | string | symbol | -`...args` | any[] | - -**Returns:** *boolean* - ▸ **emit**(`event`: "close"): *boolean* *Inherited from [CountingWritable](countingwritable.md).[emit](countingwritable.md#emit)* *Overrides [SourceSource](sourcesource.md).[emit](sourcesource.md#emit)* -Defined in node_modules/@types/node/base.d.ts:5544 +Defined in node_modules/@types/node/stream.d.ts:145 **Parameters:** @@ -546,20 +540,19 @@ Name | Type | **Returns:** *boolean* -▸ **emit**(`event`: "drain", `chunk`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string): *boolean* +▸ **emit**(`event`: "drain"): *boolean* *Inherited from [CountingWritable](countingwritable.md).[emit](countingwritable.md#emit)* *Overrides [SourceSource](sourcesource.md).[emit](sourcesource.md#emit)* -Defined in node_modules/@types/node/base.d.ts:5545 +Defined in node_modules/@types/node/stream.d.ts:146 **Parameters:** Name | Type | ------ | ------ | `event` | "drain" | -`chunk` | [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string | **Returns:** *boolean* @@ -569,7 +562,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[emit](sourcesource.md#emit)* -Defined in node_modules/@types/node/base.d.ts:5546 +Defined in node_modules/@types/node/stream.d.ts:147 **Parameters:** @@ -586,7 +579,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[emit](sourcesource.md#emit)* -Defined in node_modules/@types/node/base.d.ts:5547 +Defined in node_modules/@types/node/stream.d.ts:148 **Parameters:** @@ -602,7 +595,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[emit](sourcesource.md#emit)* -Defined in node_modules/@types/node/base.d.ts:5548 +Defined in node_modules/@types/node/stream.d.ts:149 **Parameters:** @@ -619,7 +612,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[emit](sourcesource.md#emit)* -Defined in node_modules/@types/node/base.d.ts:5549 +Defined in node_modules/@types/node/stream.d.ts:150 **Parameters:** @@ -630,46 +623,63 @@ Name | Type | **Returns:** *boolean* +▸ **emit**(`event`: string | symbol, ...`args`: any[]): *boolean* + +*Implementation of [SparseWritable](../interfaces/sparsewritable.md)* + +*Inherited from [CountingWritable](countingwritable.md).[emit](countingwritable.md#emit)* + +*Overrides [SourceSource](sourcesource.md).[emit](sourcesource.md#emit)* + +Defined in node_modules/@types/node/stream.d.ts:151 + +**Parameters:** + +Name | Type | +------ | ------ | +`event` | string | symbol | +`...args` | any[] | + +**Returns:** *boolean* + ___ ### end -▸ **end**(`cb?`: Function): *void* - -*Implementation of [SparseWritable](../interfaces/sparsewritable.md)* +▸ **end**(`cb?`: undefined | function): *void* *Inherited from [CountingWritable](countingwritable.md).[end](countingwritable.md#end)* -Defined in node_modules/@types/node/base.d.ts:5518 +Defined in node_modules/@types/node/stream.d.ts:120 **Parameters:** Name | Type | ------ | ------ | -`cb?` | Function | +`cb?` | undefined | function | **Returns:** *void* -▸ **end**(`chunk`: any, `cb?`: Function): *void* +▸ **end**(`chunk`: any, `cb?`: undefined | function): *void* *Inherited from [CountingWritable](countingwritable.md).[end](countingwritable.md#end)* -Defined in node_modules/@types/node/base.d.ts:5519 +Defined in node_modules/@types/node/stream.d.ts:121 **Parameters:** Name | Type | ------ | ------ | `chunk` | any | -`cb?` | Function | +`cb?` | undefined | function | **Returns:** *void* -▸ **end**(`chunk`: any, `encoding?`: undefined | string, `cb?`: Function): *void* +▸ **end**(`chunk`: any, `encoding?`: undefined | string, `cb?`: undefined | function): *void* *Inherited from [CountingWritable](countingwritable.md).[end](countingwritable.md#end)* -Defined in node_modules/@types/node/base.d.ts:5520 +Defined in node_modules/@types/node/stream.d.ts:122 **Parameters:** @@ -677,7 +687,7 @@ Name | Type | ------ | ------ | `chunk` | any | `encoding?` | undefined | string | -`cb?` | Function | +`cb?` | undefined | function | **Returns:** *void* @@ -691,7 +701,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[eventNames](countingwritable.md#eventnames)* -Defined in node_modules/@types/node/base.d.ts:909 +Defined in node_modules/@types/node/events.d.ts:33 **Returns:** *Array‹string | symbol›* @@ -705,7 +715,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[getMaxListeners](countingwritable.md#getmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:906 +Defined in node_modules/@types/node/events.d.ts:29 **Returns:** *number* @@ -719,7 +729,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[listenerCount](countingwritable.md#static-listenercount)* -Defined in node_modules/@types/node/base.d.ts:910 +Defined in node_modules/@types/node/events.d.ts:34 **Parameters:** @@ -739,7 +749,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[listeners](countingwritable.md#listeners)* -Defined in node_modules/@types/node/base.d.ts:907 +Defined in node_modules/@types/node/events.d.ts:30 **Parameters:** @@ -751,19 +761,17 @@ Name | Type | ___ -### on - -▸ **on**(`event`: string, `listener`: function): *this* +### off -*Inherited from [CountingWritable](countingwritable.md).[on](countingwritable.md#on)* +▸ **off**(`event`: string | symbol, `listener`: function): *this* -*Overrides [SourceSource](sourcesource.md).[on](sourcesource.md#on)* +*Inherited from [CountingWritable](countingwritable.md).[off](countingwritable.md#off)* -Defined in node_modules/@types/node/base.d.ts:5551 +Defined in node_modules/@types/node/events.d.ts:26 **Parameters:** -▪ **event**: *string* +▪ **event**: *string | symbol* ▪ **listener**: *function* @@ -777,13 +785,17 @@ Name | Type | **Returns:** *this* +___ + +### on + ▸ **on**(`event`: "close", `listener`: function): *this* *Inherited from [CountingWritable](countingwritable.md).[on](countingwritable.md#on)* *Overrides [SourceSource](sourcesource.md).[on](sourcesource.md#on)* -Defined in node_modules/@types/node/base.d.ts:5552 +Defined in node_modules/@types/node/stream.d.ts:153 **Parameters:** @@ -801,7 +813,7 @@ Defined in node_modules/@types/node/base.d.ts:5552 *Overrides [SourceSource](sourcesource.md).[on](sourcesource.md#on)* -Defined in node_modules/@types/node/base.d.ts:5553 +Defined in node_modules/@types/node/stream.d.ts:154 **Parameters:** @@ -819,7 +831,7 @@ Defined in node_modules/@types/node/base.d.ts:5553 *Overrides [SourceSource](sourcesource.md).[on](sourcesource.md#on)* -Defined in node_modules/@types/node/base.d.ts:5554 +Defined in node_modules/@types/node/stream.d.ts:155 **Parameters:** @@ -843,7 +855,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[on](sourcesource.md#on)* -Defined in node_modules/@types/node/base.d.ts:5555 +Defined in node_modules/@types/node/stream.d.ts:156 **Parameters:** @@ -861,7 +873,7 @@ Defined in node_modules/@types/node/base.d.ts:5555 *Overrides [SourceSource](sourcesource.md).[on](sourcesource.md#on)* -Defined in node_modules/@types/node/base.d.ts:5556 +Defined in node_modules/@types/node/stream.d.ts:157 **Parameters:** @@ -885,7 +897,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[on](sourcesource.md#on)* -Defined in node_modules/@types/node/base.d.ts:5557 +Defined in node_modules/@types/node/stream.d.ts:158 **Parameters:** @@ -903,21 +915,17 @@ Name | Type | **Returns:** *this* -___ - -### once - -▸ **once**(`event`: string, `listener`: function): *this* +▸ **on**(`event`: string | symbol, `listener`: function): *this* -*Inherited from [CountingWritable](countingwritable.md).[once](countingwritable.md#once)* +*Inherited from [CountingWritable](countingwritable.md).[on](countingwritable.md#on)* -*Overrides [SourceSource](sourcesource.md).[once](sourcesource.md#once)* +*Overrides [SourceSource](sourcesource.md).[on](sourcesource.md#on)* -Defined in node_modules/@types/node/base.d.ts:5559 +Defined in node_modules/@types/node/stream.d.ts:159 **Parameters:** -▪ **event**: *string* +▪ **event**: *string | symbol* ▪ **listener**: *function* @@ -931,13 +939,17 @@ Name | Type | **Returns:** *this* +___ + +### once + ▸ **once**(`event`: "close", `listener`: function): *this* *Inherited from [CountingWritable](countingwritable.md).[once](countingwritable.md#once)* *Overrides [SourceSource](sourcesource.md).[once](sourcesource.md#once)* -Defined in node_modules/@types/node/base.d.ts:5560 +Defined in node_modules/@types/node/stream.d.ts:161 **Parameters:** @@ -955,7 +967,7 @@ Defined in node_modules/@types/node/base.d.ts:5560 *Overrides [SourceSource](sourcesource.md).[once](sourcesource.md#once)* -Defined in node_modules/@types/node/base.d.ts:5561 +Defined in node_modules/@types/node/stream.d.ts:162 **Parameters:** @@ -973,7 +985,7 @@ Defined in node_modules/@types/node/base.d.ts:5561 *Overrides [SourceSource](sourcesource.md).[once](sourcesource.md#once)* -Defined in node_modules/@types/node/base.d.ts:5562 +Defined in node_modules/@types/node/stream.d.ts:163 **Parameters:** @@ -997,7 +1009,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[once](sourcesource.md#once)* -Defined in node_modules/@types/node/base.d.ts:5563 +Defined in node_modules/@types/node/stream.d.ts:164 **Parameters:** @@ -1015,7 +1027,7 @@ Defined in node_modules/@types/node/base.d.ts:5563 *Overrides [SourceSource](sourcesource.md).[once](sourcesource.md#once)* -Defined in node_modules/@types/node/base.d.ts:5564 +Defined in node_modules/@types/node/stream.d.ts:165 **Parameters:** @@ -1039,7 +1051,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[once](sourcesource.md#once)* -Defined in node_modules/@types/node/base.d.ts:5565 +Defined in node_modules/@types/node/stream.d.ts:166 **Parameters:** @@ -1057,56 +1069,56 @@ Name | Type | **Returns:** *this* -___ +▸ **once**(`event`: string | symbol, `listener`: function): *this* -### pipe +*Inherited from [CountingWritable](countingwritable.md).[once](countingwritable.md#once)* -▸ **pipe**<**T**>(`destination`: T, `options?`: undefined | object): *T* +*Overrides [SourceSource](sourcesource.md).[once](sourcesource.md#once)* -*Inherited from [CountingWritable](countingwritable.md).[pipe](countingwritable.md#pipe)* +Defined in node_modules/@types/node/stream.d.ts:167 -Defined in node_modules/@types/node/base.d.ts:5407 +**Parameters:** -**Type parameters:** +▪ **event**: *string | symbol* -▪ **T**: *WritableStream* +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`destination` | T | -`options?` | undefined | object | +`...args` | any[] | -**Returns:** *T* +**Returns:** *this* ___ -### prependListener - -▸ **prependListener**(`event`: string, `listener`: function): *this* - -*Inherited from [CountingWritable](countingwritable.md).[prependListener](countingwritable.md#prependlistener)* - -*Overrides [SourceSource](sourcesource.md).[prependListener](sourcesource.md#prependlistener)* +### pipe -Defined in node_modules/@types/node/base.d.ts:5567 +▸ **pipe**<**T**>(`destination`: T, `options?`: undefined | object): *T* -**Parameters:** +*Inherited from [CountingWritable](countingwritable.md).[pipe](countingwritable.md#pipe)* -▪ **event**: *string* +Defined in node_modules/@types/node/stream.d.ts:5 -▪ **listener**: *function* +**Type parameters:** -▸ (...`args`: any[]): *void* +▪ **T**: *WritableStream* **Parameters:** Name | Type | ------ | ------ | -`...args` | any[] | +`destination` | T | +`options?` | undefined | object | -**Returns:** *this* +**Returns:** *T* + +___ + +### prependListener ▸ **prependListener**(`event`: "close", `listener`: function): *this* @@ -1114,7 +1126,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[prependListener](sourcesource.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:5568 +Defined in node_modules/@types/node/stream.d.ts:169 **Parameters:** @@ -1132,7 +1144,7 @@ Defined in node_modules/@types/node/base.d.ts:5568 *Overrides [SourceSource](sourcesource.md).[prependListener](sourcesource.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:5569 +Defined in node_modules/@types/node/stream.d.ts:170 **Parameters:** @@ -1150,7 +1162,7 @@ Defined in node_modules/@types/node/base.d.ts:5569 *Overrides [SourceSource](sourcesource.md).[prependListener](sourcesource.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:5570 +Defined in node_modules/@types/node/stream.d.ts:171 **Parameters:** @@ -1174,7 +1186,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[prependListener](sourcesource.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:5571 +Defined in node_modules/@types/node/stream.d.ts:172 **Parameters:** @@ -1192,7 +1204,7 @@ Defined in node_modules/@types/node/base.d.ts:5571 *Overrides [SourceSource](sourcesource.md).[prependListener](sourcesource.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:5572 +Defined in node_modules/@types/node/stream.d.ts:173 **Parameters:** @@ -1216,7 +1228,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[prependListener](sourcesource.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:5573 +Defined in node_modules/@types/node/stream.d.ts:174 **Parameters:** @@ -1234,21 +1246,17 @@ Name | Type | **Returns:** *this* -___ +▸ **prependListener**(`event`: string | symbol, `listener`: function): *this* -### prependOnceListener - -▸ **prependOnceListener**(`event`: string, `listener`: function): *this* - -*Inherited from [CountingWritable](countingwritable.md).[prependOnceListener](countingwritable.md#prependoncelistener)* +*Inherited from [CountingWritable](countingwritable.md).[prependListener](countingwritable.md#prependlistener)* -*Overrides [SourceSource](sourcesource.md).[prependOnceListener](sourcesource.md#prependoncelistener)* +*Overrides [SourceSource](sourcesource.md).[prependListener](sourcesource.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:5575 +Defined in node_modules/@types/node/stream.d.ts:175 **Parameters:** -▪ **event**: *string* +▪ **event**: *string | symbol* ▪ **listener**: *function* @@ -1262,13 +1270,17 @@ Name | Type | **Returns:** *this* +___ + +### prependOnceListener + ▸ **prependOnceListener**(`event`: "close", `listener`: function): *this* *Inherited from [CountingWritable](countingwritable.md).[prependOnceListener](countingwritable.md#prependoncelistener)* *Overrides [SourceSource](sourcesource.md).[prependOnceListener](sourcesource.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:5576 +Defined in node_modules/@types/node/stream.d.ts:177 **Parameters:** @@ -1286,7 +1298,7 @@ Defined in node_modules/@types/node/base.d.ts:5576 *Overrides [SourceSource](sourcesource.md).[prependOnceListener](sourcesource.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:5577 +Defined in node_modules/@types/node/stream.d.ts:178 **Parameters:** @@ -1304,7 +1316,7 @@ Defined in node_modules/@types/node/base.d.ts:5577 *Overrides [SourceSource](sourcesource.md).[prependOnceListener](sourcesource.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:5578 +Defined in node_modules/@types/node/stream.d.ts:179 **Parameters:** @@ -1328,7 +1340,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[prependOnceListener](sourcesource.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:5579 +Defined in node_modules/@types/node/stream.d.ts:180 **Parameters:** @@ -1346,7 +1358,7 @@ Defined in node_modules/@types/node/base.d.ts:5579 *Overrides [SourceSource](sourcesource.md).[prependOnceListener](sourcesource.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:5580 +Defined in node_modules/@types/node/stream.d.ts:181 **Parameters:** @@ -1370,7 +1382,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[prependOnceListener](sourcesource.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:5581 +Defined in node_modules/@types/node/stream.d.ts:182 **Parameters:** @@ -1388,61 +1400,81 @@ Name | Type | **Returns:** *this* -___ +▸ **prependOnceListener**(`event`: string | symbol, `listener`: function): *this* -### removeAllListeners +*Inherited from [CountingWritable](countingwritable.md).[prependOnceListener](countingwritable.md#prependoncelistener)* -▸ **removeAllListeners**(`event?`: string | symbol): *this* +*Overrides [SourceSource](sourcesource.md).[prependOnceListener](sourcesource.md#prependoncelistener)* -*Implementation of [SparseWritable](../interfaces/sparsewritable.md)* +Defined in node_modules/@types/node/stream.d.ts:183 -*Inherited from [CountingWritable](countingwritable.md).[removeAllListeners](countingwritable.md#removealllisteners)* +**Parameters:** + +▪ **event**: *string | symbol* -Defined in node_modules/@types/node/base.d.ts:904 +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* **Parameters:** Name | Type | ------ | ------ | -`event?` | string | symbol | +`...args` | any[] | **Returns:** *this* ___ -### removeListener +### rawListeners -▸ **removeListener**(`event`: string, `listener`: function): *this* +▸ **rawListeners**(`event`: string | symbol): *Function[]* -*Inherited from [CountingWritable](countingwritable.md).[removeListener](countingwritable.md#removelistener)* +*Implementation of [SparseWritable](../interfaces/sparsewritable.md)* -*Overrides [SourceSource](sourcesource.md).[removeListener](sourcesource.md#removelistener)* +*Inherited from [CountingWritable](countingwritable.md).[rawListeners](countingwritable.md#rawlisteners)* -Defined in node_modules/@types/node/base.d.ts:5583 +Defined in node_modules/@types/node/events.d.ts:31 **Parameters:** -▪ **event**: *string* +Name | Type | +------ | ------ | +`event` | string | symbol | + +**Returns:** *Function[]* -▪ **listener**: *function* +___ -▸ (...`args`: any[]): *void* +### removeAllListeners + +▸ **removeAllListeners**(`event?`: string | symbol): *this* + +*Implementation of [SparseWritable](../interfaces/sparsewritable.md)* + +*Inherited from [CountingWritable](countingwritable.md).[removeAllListeners](countingwritable.md#removealllisteners)* + +Defined in node_modules/@types/node/events.d.ts:27 **Parameters:** Name | Type | ------ | ------ | -`...args` | any[] | +`event?` | string | symbol | **Returns:** *this* +___ + +### removeListener + ▸ **removeListener**(`event`: "close", `listener`: function): *this* *Inherited from [CountingWritable](countingwritable.md).[removeListener](countingwritable.md#removelistener)* *Overrides [SourceSource](sourcesource.md).[removeListener](sourcesource.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:5584 +Defined in node_modules/@types/node/stream.d.ts:185 **Parameters:** @@ -1460,7 +1492,7 @@ Defined in node_modules/@types/node/base.d.ts:5584 *Overrides [SourceSource](sourcesource.md).[removeListener](sourcesource.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:5585 +Defined in node_modules/@types/node/stream.d.ts:186 **Parameters:** @@ -1478,7 +1510,7 @@ Defined in node_modules/@types/node/base.d.ts:5585 *Overrides [SourceSource](sourcesource.md).[removeListener](sourcesource.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:5586 +Defined in node_modules/@types/node/stream.d.ts:187 **Parameters:** @@ -1502,7 +1534,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[removeListener](sourcesource.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:5587 +Defined in node_modules/@types/node/stream.d.ts:188 **Parameters:** @@ -1520,7 +1552,7 @@ Defined in node_modules/@types/node/base.d.ts:5587 *Overrides [SourceSource](sourcesource.md).[removeListener](sourcesource.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:5588 +Defined in node_modules/@types/node/stream.d.ts:189 **Parameters:** @@ -1544,7 +1576,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[removeListener](sourcesource.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:5589 +Defined in node_modules/@types/node/stream.d.ts:190 **Parameters:** @@ -1562,6 +1594,30 @@ Name | Type | **Returns:** *this* +▸ **removeListener**(`event`: string | symbol, `listener`: function): *this* + +*Inherited from [CountingWritable](countingwritable.md).[removeListener](countingwritable.md#removelistener)* + +*Overrides [SourceSource](sourcesource.md).[removeListener](sourcesource.md#removelistener)* + +Defined in node_modules/@types/node/stream.d.ts:191 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* + +**Parameters:** + +Name | Type | +------ | ------ | +`...args` | any[] | + +**Returns:** *this* + ___ ### setDefaultEncoding @@ -1570,7 +1626,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[setDefaultEncoding](countingwritable.md#setdefaultencoding)* -Defined in node_modules/@types/node/base.d.ts:5517 +Defined in node_modules/@types/node/stream.d.ts:119 **Parameters:** @@ -1590,7 +1646,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[setMaxListeners](countingwritable.md#setmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:905 +Defined in node_modules/@types/node/events.d.ts:28 **Parameters:** @@ -1608,7 +1664,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[uncork](countingwritable.md#uncork)* -Defined in node_modules/@types/node/base.d.ts:5522 +Defined in node_modules/@types/node/stream.d.ts:124 **Returns:** *void* @@ -1616,26 +1672,26 @@ ___ ### write -▸ **write**(`chunk`: any, `cb?`: Function): *boolean* +▸ **write**(`chunk`: any, `cb?`: undefined | function): *boolean* *Inherited from [CountingWritable](countingwritable.md).[write](countingwritable.md#write)* -Defined in node_modules/@types/node/base.d.ts:5515 +Defined in node_modules/@types/node/stream.d.ts:117 **Parameters:** Name | Type | ------ | ------ | `chunk` | any | -`cb?` | Function | +`cb?` | undefined | function | **Returns:** *boolean* -▸ **write**(`chunk`: any, `encoding?`: undefined | string, `cb?`: Function): *boolean* +▸ **write**(`chunk`: any, `encoding?`: undefined | string, `cb?`: undefined | function): *boolean* *Inherited from [CountingWritable](countingwritable.md).[write](countingwritable.md#write)* -Defined in node_modules/@types/node/base.d.ts:5516 +Defined in node_modules/@types/node/stream.d.ts:118 **Parameters:** @@ -1643,7 +1699,7 @@ Name | Type | ------ | ------ | `chunk` | any | `encoding?` | undefined | string | -`cb?` | Function | +`cb?` | undefined | function | **Returns:** *boolean* @@ -1653,7 +1709,7 @@ ___ ▸ **writeChunk**(`chunk`: [SparseStreamChunk](../interfaces/sparsestreamchunk.md), `flushing`: boolean): *Promise‹void›* -*Defined in [lib/sparse-stream/sparse-write-stream.ts:38](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/sparse-stream/sparse-write-stream.ts#L38)* +*Defined in [lib/sparse-stream/sparse-write-stream.ts:38](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/sparse-stream/sparse-write-stream.ts#L38)* **Parameters:** @@ -1672,7 +1728,9 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[listenerCount](countingwritable.md#static-listenercount)* -Defined in node_modules/@types/node/base.d.ts:895 +Defined in node_modules/@types/node/events.d.ts:17 + +**`deprecated`** since v4.0.0 **Parameters:** diff --git a/doc/classes/streamlimiter.md b/doc/classes/streamlimiter.md index c1c05cad..c4c54267 100644 --- a/doc/classes/streamlimiter.md +++ b/doc/classes/streamlimiter.md @@ -24,15 +24,19 @@ * [maxBytes](streamlimiter.md#private-maxbytes) * [readable](streamlimiter.md#readable) * [readableHighWaterMark](streamlimiter.md#readablehighwatermark) +* [readableLength](streamlimiter.md#readablelength) * [stream](streamlimiter.md#private-stream) * [writable](streamlimiter.md#writable) * [writableHighWaterMark](streamlimiter.md#writablehighwatermark) +* [writableLength](streamlimiter.md#writablelength) * [defaultMaxListeners](streamlimiter.md#static-defaultmaxlisteners) ### Methods +* [[Symbol.asyncIterator]](streamlimiter.md#[symbol.asynciterator]) * [_destroy](streamlimiter.md#_destroy) * [_final](streamlimiter.md#_final) +* [_flush](streamlimiter.md#_flush) * [_read](streamlimiter.md#_read) * [_transform](streamlimiter.md#_transform) * [_write](streamlimiter.md#_write) @@ -47,6 +51,7 @@ * [isPaused](streamlimiter.md#ispaused) * [listenerCount](streamlimiter.md#listenercount) * [listeners](streamlimiter.md#listeners) +* [off](streamlimiter.md#off) * [on](streamlimiter.md#on) * [once](streamlimiter.md#once) * [pause](streamlimiter.md#pause) @@ -54,6 +59,7 @@ * [prependListener](streamlimiter.md#prependlistener) * [prependOnceListener](streamlimiter.md#prependoncelistener) * [push](streamlimiter.md#push) +* [rawListeners](streamlimiter.md#rawlisteners) * [read](streamlimiter.md#read) * [removeAllListeners](streamlimiter.md#removealllisteners) * [removeListener](streamlimiter.md#removelistener) @@ -76,7 +82,7 @@ *Overrides [SourceTransform](../interfaces/sourcetransform.md).[constructor](../interfaces/sourcetransform.md#constructor)* -*Defined in [lib/stream-limiter.ts:22](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/stream-limiter.ts#L22)* +*Defined in [lib/stream-limiter.ts:22](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/stream-limiter.ts#L22)* **Parameters:** @@ -93,7 +99,7 @@ Name | Type | • **maxBytes**: *number* -*Defined in [lib/stream-limiter.ts:23](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/stream-limiter.ts#L23)* +*Defined in [lib/stream-limiter.ts:23](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/stream-limiter.ts#L23)* ___ @@ -103,7 +109,7 @@ ___ *Inherited from [SparseFilterStream](sparsefilterstream.md).[readable](sparsefilterstream.md#readable)* -Defined in node_modules/@types/node/base.d.ts:5422 +Defined in node_modules/@types/node/stream.d.ts:20 ___ @@ -113,7 +119,17 @@ ___ *Inherited from [SparseFilterStream](sparsefilterstream.md).[readableHighWaterMark](sparsefilterstream.md#readablehighwatermark)* -Defined in node_modules/@types/node/base.d.ts:5423 +Defined in node_modules/@types/node/stream.d.ts:21 + +___ + +### readableLength + +• **readableLength**: *number* + +*Inherited from [SparseFilterStream](sparsefilterstream.md).[readableLength](sparsefilterstream.md#readablelength)* + +Defined in node_modules/@types/node/stream.d.ts:22 ___ @@ -121,7 +137,7 @@ ___ • **stream**: *ReadableStream* -*Defined in [lib/stream-limiter.ts:23](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/stream-limiter.ts#L23)* +*Defined in [lib/stream-limiter.ts:23](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/stream-limiter.ts#L23)* ___ @@ -131,7 +147,7 @@ ___ *Inherited from [SparseFilterStream](sparsefilterstream.md).[writable](sparsefilterstream.md#writable)* -Defined in node_modules/@types/node/base.d.ts:5600 +Defined in node_modules/@types/node/stream.d.ts:209 ___ @@ -141,7 +157,17 @@ ___ *Inherited from [SparseFilterStream](sparsefilterstream.md).[writableHighWaterMark](sparsefilterstream.md#writablehighwatermark)* -Defined in node_modules/@types/node/base.d.ts:5601 +Defined in node_modules/@types/node/stream.d.ts:210 + +___ + +### writableLength + +• **writableLength**: *number* + +*Inherited from [SparseFilterStream](sparsefilterstream.md).[writableLength](sparsefilterstream.md#writablelength)* + +Defined in node_modules/@types/node/stream.d.ts:211 ___ @@ -151,10 +177,22 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[defaultMaxListeners](countingwritable.md#static-defaultmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:896 +Defined in node_modules/@types/node/events.d.ts:18 ## Methods +### [Symbol.asyncIterator] + +▸ **[Symbol.asyncIterator]**(): *AsyncIterableIterator‹any›* + +*Inherited from [SparseFilterStream](sparsefilterstream.md).[[Symbol.asyncIterator]](sparsefilterstream.md#[symbol.asynciterator])* + +Defined in node_modules/@types/node/stream.d.ts:95 + +**Returns:** *AsyncIterableIterator‹any›* + +___ + ### _destroy ▸ **_destroy**(`error`: [Error](notcapable.md#static-error) | null, `callback`: function): *void* @@ -163,7 +201,7 @@ Defined in node_modules/@types/node/base.d.ts:896 *Overrides [SparseReadStream](sparsereadstream.md).[_destroy](sparsereadstream.md#_destroy)* -Defined in node_modules/@types/node/base.d.ts:5605 +Defined in node_modules/@types/node/stream.d.ts:215 **Parameters:** @@ -171,13 +209,13 @@ Defined in node_modules/@types/node/base.d.ts:5605 ▪ **callback**: *function* -▸ (`error?`: [Error](notcapable.md#static-error)): *void* +▸ (`error`: [Error](notcapable.md#static-error) | null): *void* **Parameters:** Name | Type | ------ | ------ | -`error?` | [Error](notcapable.md#static-error) | +`error` | [Error](notcapable.md#static-error) | null | **Returns:** *void* @@ -185,17 +223,41 @@ ___ ### _final -▸ **_final**(`callback`: Function): *void* +▸ **_final**(`callback`: function): *void* *Inherited from [SparseFilterStream](sparsefilterstream.md).[_final](sparsefilterstream.md#_final)* -Defined in node_modules/@types/node/base.d.ts:5606 +Defined in node_modules/@types/node/stream.d.ts:216 + +**Parameters:** + +▪ **callback**: *function* + +▸ (`error?`: [Error](notcapable.md#static-error) | null): *void* + +**Parameters:** + +Name | Type | +------ | ------ | +`error?` | [Error](notcapable.md#static-error) | null | + +**Returns:** *void* + +___ + +### _flush + +▸ **_flush**(`callback`: TransformCallback): *void* + +*Inherited from [SparseFilterStream](sparsefilterstream.md).[_flush](sparsefilterstream.md#_flush)* + +Defined in node_modules/@types/node/stream.d.ts:242 **Parameters:** Name | Type | ------ | ------ | -`callback` | Function | +`callback` | TransformCallback | **Returns:** *void* @@ -207,7 +269,7 @@ ___ *Inherited from [SparseFilterStream](sparsefilterstream.md).[_read](sparsefilterstream.md#_read)* -Defined in node_modules/@types/node/base.d.ts:5425 +Defined in node_modules/@types/node/stream.d.ts:24 **Parameters:** @@ -225,7 +287,7 @@ ___ *Overrides [SourceTransform](../interfaces/sourcetransform.md).[_transform](../interfaces/sourcetransform.md#_transform)* -*Defined in [lib/stream-limiter.ts:29](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/stream-limiter.ts#L29)* +*Defined in [lib/stream-limiter.ts:29](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/stream-limiter.ts#L29)* **Parameters:** @@ -235,13 +297,13 @@ ___ ▪ **callback**: *function* -▸ (`error?`: [Error](notcapable.md#static-error) | null, `data?`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer)): *void* +▸ (`error?`: [Error](notcapable.md#static-error), `data?`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer)): *void* **Parameters:** Name | Type | ------ | ------ | -`error?` | [Error](notcapable.md#static-error) | null | +`error?` | [Error](notcapable.md#static-error) | `data?` | [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | **Returns:** *void* @@ -254,7 +316,7 @@ ___ *Inherited from [SparseFilterStream](sparsefilterstream.md).[_write](sparsefilterstream.md#_write)* -Defined in node_modules/@types/node/base.d.ts:5603 +Defined in node_modules/@types/node/stream.d.ts:213 **Parameters:** @@ -264,13 +326,13 @@ Defined in node_modules/@types/node/base.d.ts:5603 ▪ **callback**: *function* -▸ (`err?`: [Error](notcapable.md#static-error)): *void* +▸ (`error?`: [Error](notcapable.md#static-error) | null): *void* **Parameters:** Name | Type | ------ | ------ | -`err?` | [Error](notcapable.md#static-error) | +`error?` | [Error](notcapable.md#static-error) | null | **Returns:** *void* @@ -282,7 +344,7 @@ ___ *Inherited from [SparseFilterStream](sparsefilterstream.md).[_writev](sparsefilterstream.md#optional-_writev)* -Defined in node_modules/@types/node/base.d.ts:5604 +Defined in node_modules/@types/node/stream.d.ts:214 **Parameters:** @@ -290,13 +352,13 @@ Defined in node_modules/@types/node/base.d.ts:5604 ▪ **callback**: *function* -▸ (`err?`: [Error](notcapable.md#static-error)): *void* +▸ (`error?`: [Error](notcapable.md#static-error) | null): *void* **Parameters:** Name | Type | ------ | ------ | -`err?` | [Error](notcapable.md#static-error) | +`error?` | [Error](notcapable.md#static-error) | null | **Returns:** *void* @@ -304,13 +366,13 @@ ___ ### addListener -▸ **addListener**(`event`: string, `listener`: function): *this* +▸ **addListener**(`event`: "close", `listener`: function): *this* *Inherited from [SparseFilterStream](sparsefilterstream.md).[addListener](sparsefilterstream.md#addlistener)* *Overrides [SourceSource](sourcesource.md).[addListener](sourcesource.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:5447 +Defined in node_modules/@types/node/stream.d.ts:46 Event emitter The defined events on documents including: @@ -322,30 +384,6 @@ The defined events on documents including: **Parameters:** -▪ **event**: *string* - -▪ **listener**: *function* - -▸ (...`args`: any[]): *void* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | any[] | - -**Returns:** *this* - -▸ **addListener**(`event`: "close", `listener`: function): *this* - -*Inherited from [SparseFilterStream](sparsefilterstream.md).[addListener](sparsefilterstream.md#addlistener)* - -*Overrides [SourceSource](sourcesource.md).[addListener](sourcesource.md#addlistener)* - -Defined in node_modules/@types/node/base.d.ts:5448 - -**Parameters:** - ▪ **event**: *"close"* ▪ **listener**: *function* @@ -360,7 +398,7 @@ Defined in node_modules/@types/node/base.d.ts:5448 *Overrides [SourceSource](sourcesource.md).[addListener](sourcesource.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:5449 +Defined in node_modules/@types/node/stream.d.ts:47 **Parameters:** @@ -368,13 +406,13 @@ Defined in node_modules/@types/node/base.d.ts:5449 ▪ **listener**: *function* -▸ (`chunk`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string): *void* +▸ (`chunk`: any): *void* **Parameters:** Name | Type | ------ | ------ | -`chunk` | [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string | +`chunk` | any | **Returns:** *this* @@ -384,7 +422,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[addListener](sourcesource.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:5450 +Defined in node_modules/@types/node/stream.d.ts:48 **Parameters:** @@ -402,7 +440,7 @@ Defined in node_modules/@types/node/base.d.ts:5450 *Overrides [SourceSource](sourcesource.md).[addListener](sourcesource.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:5451 +Defined in node_modules/@types/node/stream.d.ts:49 **Parameters:** @@ -420,7 +458,7 @@ Defined in node_modules/@types/node/base.d.ts:5451 *Overrides [SourceSource](sourcesource.md).[addListener](sourcesource.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:5452 +Defined in node_modules/@types/node/stream.d.ts:50 **Parameters:** @@ -438,6 +476,30 @@ Name | Type | **Returns:** *this* +▸ **addListener**(`event`: string | symbol, `listener`: function): *this* + +*Inherited from [SparseFilterStream](sparsefilterstream.md).[addListener](sparsefilterstream.md#addlistener)* + +*Overrides [SourceSource](sourcesource.md).[addListener](sourcesource.md#addlistener)* + +Defined in node_modules/@types/node/stream.d.ts:51 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* + +**Parameters:** + +Name | Type | +------ | ------ | +`...args` | any[] | + +**Returns:** *this* + ___ ### cork @@ -446,7 +508,7 @@ ___ *Inherited from [SparseFilterStream](sparsefilterstream.md).[cork](sparsefilterstream.md#cork)* -Defined in node_modules/@types/node/base.d.ts:5613 +Defined in node_modules/@types/node/stream.d.ts:223 **Returns:** *void* @@ -458,9 +520,7 @@ ___ *Inherited from [SparseFilterStream](sparsefilterstream.md).[destroy](sparsefilterstream.md#destroy)* -*Overrides [SparseReadStream](sparsereadstream.md).[destroy](sparsereadstream.md#destroy)* - -Defined in node_modules/@types/node/base.d.ts:5625 +Defined in node_modules/@types/node/stream.d.ts:35 **Parameters:** @@ -474,102 +534,102 @@ ___ ### emit -▸ **emit**(`event`: string | symbol, ...`args`: any[]): *boolean* +▸ **emit**(`event`: "close"): *boolean* *Inherited from [SparseFilterStream](sparsefilterstream.md).[emit](sparsefilterstream.md#emit)* *Overrides [SourceSource](sourcesource.md).[emit](sourcesource.md#emit)* -Defined in node_modules/@types/node/base.d.ts:5454 +Defined in node_modules/@types/node/stream.d.ts:53 **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`...args` | any[] | +`event` | "close" | **Returns:** *boolean* -▸ **emit**(`event`: "close"): *boolean* +▸ **emit**(`event`: "data", `chunk`: any): *boolean* *Inherited from [SparseFilterStream](sparsefilterstream.md).[emit](sparsefilterstream.md#emit)* *Overrides [SourceSource](sourcesource.md).[emit](sourcesource.md#emit)* -Defined in node_modules/@types/node/base.d.ts:5455 +Defined in node_modules/@types/node/stream.d.ts:54 **Parameters:** Name | Type | ------ | ------ | -`event` | "close" | +`event` | "data" | +`chunk` | any | **Returns:** *boolean* -▸ **emit**(`event`: "data", `chunk`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string): *boolean* +▸ **emit**(`event`: "end"): *boolean* *Inherited from [SparseFilterStream](sparsefilterstream.md).[emit](sparsefilterstream.md#emit)* *Overrides [SourceSource](sourcesource.md).[emit](sourcesource.md#emit)* -Defined in node_modules/@types/node/base.d.ts:5456 +Defined in node_modules/@types/node/stream.d.ts:55 **Parameters:** Name | Type | ------ | ------ | -`event` | "data" | -`chunk` | [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string | +`event` | "end" | **Returns:** *boolean* -▸ **emit**(`event`: "end"): *boolean* +▸ **emit**(`event`: "readable"): *boolean* *Inherited from [SparseFilterStream](sparsefilterstream.md).[emit](sparsefilterstream.md#emit)* *Overrides [SourceSource](sourcesource.md).[emit](sourcesource.md#emit)* -Defined in node_modules/@types/node/base.d.ts:5457 +Defined in node_modules/@types/node/stream.d.ts:56 **Parameters:** Name | Type | ------ | ------ | -`event` | "end" | +`event` | "readable" | **Returns:** *boolean* -▸ **emit**(`event`: "readable"): *boolean* +▸ **emit**(`event`: "error", `err`: [Error](notcapable.md#static-error)): *boolean* *Inherited from [SparseFilterStream](sparsefilterstream.md).[emit](sparsefilterstream.md#emit)* *Overrides [SourceSource](sourcesource.md).[emit](sourcesource.md#emit)* -Defined in node_modules/@types/node/base.d.ts:5458 +Defined in node_modules/@types/node/stream.d.ts:57 **Parameters:** Name | Type | ------ | ------ | -`event` | "readable" | +`event` | "error" | +`err` | [Error](notcapable.md#static-error) | **Returns:** *boolean* -▸ **emit**(`event`: "error", `err`: [Error](notcapable.md#static-error)): *boolean* +▸ **emit**(`event`: string | symbol, ...`args`: any[]): *boolean* *Inherited from [SparseFilterStream](sparsefilterstream.md).[emit](sparsefilterstream.md#emit)* *Overrides [SourceSource](sourcesource.md).[emit](sourcesource.md#emit)* -Defined in node_modules/@types/node/base.d.ts:5459 +Defined in node_modules/@types/node/stream.d.ts:58 **Parameters:** Name | Type | ------ | ------ | -`event` | "error" | -`err` | [Error](notcapable.md#static-error) | +`event` | string | symbol | +`...args` | any[] | **Returns:** *boolean* @@ -577,40 +637,40 @@ ___ ### end -▸ **end**(`cb?`: Function): *void* +▸ **end**(`cb?`: undefined | function): *void* *Inherited from [SparseFilterStream](sparsefilterstream.md).[end](sparsefilterstream.md#end)* -Defined in node_modules/@types/node/base.d.ts:5610 +Defined in node_modules/@types/node/stream.d.ts:220 **Parameters:** Name | Type | ------ | ------ | -`cb?` | Function | +`cb?` | undefined | function | **Returns:** *void* -▸ **end**(`chunk`: any, `cb?`: Function): *void* +▸ **end**(`chunk`: any, `cb?`: undefined | function): *void* *Inherited from [SparseFilterStream](sparsefilterstream.md).[end](sparsefilterstream.md#end)* -Defined in node_modules/@types/node/base.d.ts:5611 +Defined in node_modules/@types/node/stream.d.ts:221 **Parameters:** Name | Type | ------ | ------ | `chunk` | any | -`cb?` | Function | +`cb?` | undefined | function | **Returns:** *void* -▸ **end**(`chunk`: any, `encoding?`: undefined | string, `cb?`: Function): *void* +▸ **end**(`chunk`: any, `encoding?`: undefined | string, `cb?`: undefined | function): *void* *Inherited from [SparseFilterStream](sparsefilterstream.md).[end](sparsefilterstream.md#end)* -Defined in node_modules/@types/node/base.d.ts:5612 +Defined in node_modules/@types/node/stream.d.ts:222 **Parameters:** @@ -618,7 +678,7 @@ Name | Type | ------ | ------ | `chunk` | any | `encoding?` | undefined | string | -`cb?` | Function | +`cb?` | undefined | function | **Returns:** *void* @@ -630,7 +690,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[eventNames](countingwritable.md#eventnames)* -Defined in node_modules/@types/node/base.d.ts:909 +Defined in node_modules/@types/node/events.d.ts:33 **Returns:** *Array‹string | symbol›* @@ -642,7 +702,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[getMaxListeners](countingwritable.md#getmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:906 +Defined in node_modules/@types/node/events.d.ts:29 **Returns:** *number* @@ -654,7 +714,7 @@ ___ *Inherited from [SparseFilterStream](sparsefilterstream.md).[isPaused](sparsefilterstream.md#ispaused)* -Defined in node_modules/@types/node/base.d.ts:5430 +Defined in node_modules/@types/node/stream.d.ts:29 **Returns:** *boolean* @@ -666,7 +726,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[listenerCount](countingwritable.md#static-listenercount)* -Defined in node_modules/@types/node/base.d.ts:910 +Defined in node_modules/@types/node/events.d.ts:34 **Parameters:** @@ -684,7 +744,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[listeners](countingwritable.md#listeners)* -Defined in node_modules/@types/node/base.d.ts:907 +Defined in node_modules/@types/node/events.d.ts:30 **Parameters:** @@ -696,19 +756,17 @@ Name | Type | ___ -### on - -▸ **on**(`event`: string, `listener`: function): *this* +### off -*Inherited from [SparseFilterStream](sparsefilterstream.md).[on](sparsefilterstream.md#on)* +▸ **off**(`event`: string | symbol, `listener`: function): *this* -*Overrides [SourceSource](sourcesource.md).[on](sourcesource.md#on)* +*Inherited from [CountingWritable](countingwritable.md).[off](countingwritable.md#off)* -Defined in node_modules/@types/node/base.d.ts:5461 +Defined in node_modules/@types/node/events.d.ts:26 **Parameters:** -▪ **event**: *string* +▪ **event**: *string | symbol* ▪ **listener**: *function* @@ -722,13 +780,17 @@ Name | Type | **Returns:** *this* +___ + +### on + ▸ **on**(`event`: "close", `listener`: function): *this* *Inherited from [SparseFilterStream](sparsefilterstream.md).[on](sparsefilterstream.md#on)* *Overrides [SourceSource](sourcesource.md).[on](sourcesource.md#on)* -Defined in node_modules/@types/node/base.d.ts:5462 +Defined in node_modules/@types/node/stream.d.ts:60 **Parameters:** @@ -746,7 +808,7 @@ Defined in node_modules/@types/node/base.d.ts:5462 *Overrides [SourceSource](sourcesource.md).[on](sourcesource.md#on)* -Defined in node_modules/@types/node/base.d.ts:5463 +Defined in node_modules/@types/node/stream.d.ts:61 **Parameters:** @@ -754,13 +816,13 @@ Defined in node_modules/@types/node/base.d.ts:5463 ▪ **listener**: *function* -▸ (`chunk`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string): *void* +▸ (`chunk`: any): *void* **Parameters:** Name | Type | ------ | ------ | -`chunk` | [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string | +`chunk` | any | **Returns:** *this* @@ -770,7 +832,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[on](sourcesource.md#on)* -Defined in node_modules/@types/node/base.d.ts:5464 +Defined in node_modules/@types/node/stream.d.ts:62 **Parameters:** @@ -788,7 +850,7 @@ Defined in node_modules/@types/node/base.d.ts:5464 *Overrides [SourceSource](sourcesource.md).[on](sourcesource.md#on)* -Defined in node_modules/@types/node/base.d.ts:5465 +Defined in node_modules/@types/node/stream.d.ts:63 **Parameters:** @@ -806,7 +868,7 @@ Defined in node_modules/@types/node/base.d.ts:5465 *Overrides [SourceSource](sourcesource.md).[on](sourcesource.md#on)* -Defined in node_modules/@types/node/base.d.ts:5466 +Defined in node_modules/@types/node/stream.d.ts:64 **Parameters:** @@ -824,21 +886,17 @@ Name | Type | **Returns:** *this* -___ +▸ **on**(`event`: string | symbol, `listener`: function): *this* -### once - -▸ **once**(`event`: string, `listener`: function): *this* - -*Inherited from [SparseFilterStream](sparsefilterstream.md).[once](sparsefilterstream.md#once)* +*Inherited from [SparseFilterStream](sparsefilterstream.md).[on](sparsefilterstream.md#on)* -*Overrides [SourceSource](sourcesource.md).[once](sourcesource.md#once)* +*Overrides [SourceSource](sourcesource.md).[on](sourcesource.md#on)* -Defined in node_modules/@types/node/base.d.ts:5468 +Defined in node_modules/@types/node/stream.d.ts:65 **Parameters:** -▪ **event**: *string* +▪ **event**: *string | symbol* ▪ **listener**: *function* @@ -852,13 +910,17 @@ Name | Type | **Returns:** *this* +___ + +### once + ▸ **once**(`event`: "close", `listener`: function): *this* *Inherited from [SparseFilterStream](sparsefilterstream.md).[once](sparsefilterstream.md#once)* *Overrides [SourceSource](sourcesource.md).[once](sourcesource.md#once)* -Defined in node_modules/@types/node/base.d.ts:5469 +Defined in node_modules/@types/node/stream.d.ts:67 **Parameters:** @@ -876,7 +938,7 @@ Defined in node_modules/@types/node/base.d.ts:5469 *Overrides [SourceSource](sourcesource.md).[once](sourcesource.md#once)* -Defined in node_modules/@types/node/base.d.ts:5470 +Defined in node_modules/@types/node/stream.d.ts:68 **Parameters:** @@ -884,13 +946,13 @@ Defined in node_modules/@types/node/base.d.ts:5470 ▪ **listener**: *function* -▸ (`chunk`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string): *void* +▸ (`chunk`: any): *void* **Parameters:** Name | Type | ------ | ------ | -`chunk` | [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string | +`chunk` | any | **Returns:** *this* @@ -900,7 +962,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[once](sourcesource.md#once)* -Defined in node_modules/@types/node/base.d.ts:5471 +Defined in node_modules/@types/node/stream.d.ts:69 **Parameters:** @@ -918,7 +980,7 @@ Defined in node_modules/@types/node/base.d.ts:5471 *Overrides [SourceSource](sourcesource.md).[once](sourcesource.md#once)* -Defined in node_modules/@types/node/base.d.ts:5472 +Defined in node_modules/@types/node/stream.d.ts:70 **Parameters:** @@ -936,7 +998,7 @@ Defined in node_modules/@types/node/base.d.ts:5472 *Overrides [SourceSource](sourcesource.md).[once](sourcesource.md#once)* -Defined in node_modules/@types/node/base.d.ts:5473 +Defined in node_modules/@types/node/stream.d.ts:71 **Parameters:** @@ -954,6 +1016,30 @@ Name | Type | **Returns:** *this* +▸ **once**(`event`: string | symbol, `listener`: function): *this* + +*Inherited from [SparseFilterStream](sparsefilterstream.md).[once](sparsefilterstream.md#once)* + +*Overrides [SourceSource](sourcesource.md).[once](sourcesource.md#once)* + +Defined in node_modules/@types/node/stream.d.ts:72 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* + +**Parameters:** + +Name | Type | +------ | ------ | +`...args` | any[] | + +**Returns:** *this* + ___ ### pause @@ -962,7 +1048,7 @@ ___ *Inherited from [SparseFilterStream](sparsefilterstream.md).[pause](sparsefilterstream.md#pause)* -Defined in node_modules/@types/node/base.d.ts:5428 +Defined in node_modules/@types/node/stream.d.ts:27 **Returns:** *this* @@ -974,7 +1060,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[pipe](countingwritable.md#pipe)* -Defined in node_modules/@types/node/base.d.ts:5407 +Defined in node_modules/@types/node/stream.d.ts:5 **Type parameters:** @@ -993,37 +1079,13 @@ ___ ### prependListener -▸ **prependListener**(`event`: string, `listener`: function): *this* - -*Inherited from [SparseFilterStream](sparsefilterstream.md).[prependListener](sparsefilterstream.md#prependlistener)* - -*Overrides [SourceSource](sourcesource.md).[prependListener](sourcesource.md#prependlistener)* - -Defined in node_modules/@types/node/base.d.ts:5475 - -**Parameters:** - -▪ **event**: *string* - -▪ **listener**: *function* - -▸ (...`args`: any[]): *void* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | any[] | - -**Returns:** *this* - ▸ **prependListener**(`event`: "close", `listener`: function): *this* *Inherited from [SparseFilterStream](sparsefilterstream.md).[prependListener](sparsefilterstream.md#prependlistener)* *Overrides [SourceSource](sourcesource.md).[prependListener](sourcesource.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:5476 +Defined in node_modules/@types/node/stream.d.ts:74 **Parameters:** @@ -1041,7 +1103,7 @@ Defined in node_modules/@types/node/base.d.ts:5476 *Overrides [SourceSource](sourcesource.md).[prependListener](sourcesource.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:5477 +Defined in node_modules/@types/node/stream.d.ts:75 **Parameters:** @@ -1049,13 +1111,13 @@ Defined in node_modules/@types/node/base.d.ts:5477 ▪ **listener**: *function* -▸ (`chunk`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string): *void* +▸ (`chunk`: any): *void* **Parameters:** Name | Type | ------ | ------ | -`chunk` | [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string | +`chunk` | any | **Returns:** *this* @@ -1065,7 +1127,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[prependListener](sourcesource.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:5478 +Defined in node_modules/@types/node/stream.d.ts:76 **Parameters:** @@ -1083,7 +1145,7 @@ Defined in node_modules/@types/node/base.d.ts:5478 *Overrides [SourceSource](sourcesource.md).[prependListener](sourcesource.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:5479 +Defined in node_modules/@types/node/stream.d.ts:77 **Parameters:** @@ -1101,7 +1163,7 @@ Defined in node_modules/@types/node/base.d.ts:5479 *Overrides [SourceSource](sourcesource.md).[prependListener](sourcesource.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:5480 +Defined in node_modules/@types/node/stream.d.ts:78 **Parameters:** @@ -1119,21 +1181,17 @@ Name | Type | **Returns:** *this* -___ +▸ **prependListener**(`event`: string | symbol, `listener`: function): *this* -### prependOnceListener - -▸ **prependOnceListener**(`event`: string, `listener`: function): *this* - -*Inherited from [SparseFilterStream](sparsefilterstream.md).[prependOnceListener](sparsefilterstream.md#prependoncelistener)* +*Inherited from [SparseFilterStream](sparsefilterstream.md).[prependListener](sparsefilterstream.md#prependlistener)* -*Overrides [SourceSource](sourcesource.md).[prependOnceListener](sourcesource.md#prependoncelistener)* +*Overrides [SourceSource](sourcesource.md).[prependListener](sourcesource.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:5482 +Defined in node_modules/@types/node/stream.d.ts:79 **Parameters:** -▪ **event**: *string* +▪ **event**: *string | symbol* ▪ **listener**: *function* @@ -1147,13 +1205,17 @@ Name | Type | **Returns:** *this* +___ + +### prependOnceListener + ▸ **prependOnceListener**(`event`: "close", `listener`: function): *this* *Inherited from [SparseFilterStream](sparsefilterstream.md).[prependOnceListener](sparsefilterstream.md#prependoncelistener)* *Overrides [SourceSource](sourcesource.md).[prependOnceListener](sourcesource.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:5483 +Defined in node_modules/@types/node/stream.d.ts:81 **Parameters:** @@ -1171,7 +1233,7 @@ Defined in node_modules/@types/node/base.d.ts:5483 *Overrides [SourceSource](sourcesource.md).[prependOnceListener](sourcesource.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:5484 +Defined in node_modules/@types/node/stream.d.ts:82 **Parameters:** @@ -1179,13 +1241,13 @@ Defined in node_modules/@types/node/base.d.ts:5484 ▪ **listener**: *function* -▸ (`chunk`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string): *void* +▸ (`chunk`: any): *void* **Parameters:** Name | Type | ------ | ------ | -`chunk` | [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string | +`chunk` | any | **Returns:** *this* @@ -1195,7 +1257,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[prependOnceListener](sourcesource.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:5485 +Defined in node_modules/@types/node/stream.d.ts:83 **Parameters:** @@ -1213,7 +1275,7 @@ Defined in node_modules/@types/node/base.d.ts:5485 *Overrides [SourceSource](sourcesource.md).[prependOnceListener](sourcesource.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:5486 +Defined in node_modules/@types/node/stream.d.ts:84 **Parameters:** @@ -1231,7 +1293,7 @@ Defined in node_modules/@types/node/base.d.ts:5486 *Overrides [SourceSource](sourcesource.md).[prependOnceListener](sourcesource.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:5487 +Defined in node_modules/@types/node/stream.d.ts:85 **Parameters:** @@ -1249,6 +1311,30 @@ Name | Type | **Returns:** *this* +▸ **prependOnceListener**(`event`: string | symbol, `listener`: function): *this* + +*Inherited from [SparseFilterStream](sparsefilterstream.md).[prependOnceListener](sparsefilterstream.md#prependoncelistener)* + +*Overrides [SourceSource](sourcesource.md).[prependOnceListener](sourcesource.md#prependoncelistener)* + +Defined in node_modules/@types/node/stream.d.ts:86 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* + +**Parameters:** + +Name | Type | +------ | ------ | +`...args` | any[] | + +**Returns:** *this* + ___ ### push @@ -1257,7 +1343,7 @@ ___ *Inherited from [SparseFilterStream](sparsefilterstream.md).[push](sparsefilterstream.md#push)* -Defined in node_modules/@types/node/base.d.ts:5434 +Defined in node_modules/@types/node/stream.d.ts:33 **Parameters:** @@ -1270,13 +1356,31 @@ Name | Type | ___ +### rawListeners + +▸ **rawListeners**(`event`: string | symbol): *Function[]* + +*Inherited from [CountingWritable](countingwritable.md).[rawListeners](countingwritable.md#rawlisteners)* + +Defined in node_modules/@types/node/events.d.ts:31 + +**Parameters:** + +Name | Type | +------ | ------ | +`event` | string | symbol | + +**Returns:** *Function[]* + +___ + ### read ▸ **read**(`size?`: undefined | number): *any* *Inherited from [SparseFilterStream](sparsefilterstream.md).[read](sparsefilterstream.md#read)* -Defined in node_modules/@types/node/base.d.ts:5426 +Defined in node_modules/@types/node/stream.d.ts:25 **Parameters:** @@ -1294,7 +1398,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[removeAllListeners](countingwritable.md#removealllisteners)* -Defined in node_modules/@types/node/base.d.ts:904 +Defined in node_modules/@types/node/events.d.ts:27 **Parameters:** @@ -1308,37 +1412,13 @@ ___ ### removeListener -▸ **removeListener**(`event`: string, `listener`: function): *this* - -*Inherited from [SparseFilterStream](sparsefilterstream.md).[removeListener](sparsefilterstream.md#removelistener)* - -*Overrides [SourceSource](sourcesource.md).[removeListener](sourcesource.md#removelistener)* - -Defined in node_modules/@types/node/base.d.ts:5489 - -**Parameters:** - -▪ **event**: *string* - -▪ **listener**: *function* - -▸ (...`args`: any[]): *void* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | any[] | - -**Returns:** *this* - ▸ **removeListener**(`event`: "close", `listener`: function): *this* *Inherited from [SparseFilterStream](sparsefilterstream.md).[removeListener](sparsefilterstream.md#removelistener)* *Overrides [SourceSource](sourcesource.md).[removeListener](sourcesource.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:5490 +Defined in node_modules/@types/node/stream.d.ts:88 **Parameters:** @@ -1356,7 +1436,7 @@ Defined in node_modules/@types/node/base.d.ts:5490 *Overrides [SourceSource](sourcesource.md).[removeListener](sourcesource.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:5491 +Defined in node_modules/@types/node/stream.d.ts:89 **Parameters:** @@ -1364,13 +1444,13 @@ Defined in node_modules/@types/node/base.d.ts:5491 ▪ **listener**: *function* -▸ (`chunk`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string): *void* +▸ (`chunk`: any): *void* **Parameters:** Name | Type | ------ | ------ | -`chunk` | [Buffer](../interfaces/alignedlockablebuffer.md#buffer) | string | +`chunk` | any | **Returns:** *this* @@ -1380,7 +1460,7 @@ Name | Type | *Overrides [SourceSource](sourcesource.md).[removeListener](sourcesource.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:5492 +Defined in node_modules/@types/node/stream.d.ts:90 **Parameters:** @@ -1398,7 +1478,7 @@ Defined in node_modules/@types/node/base.d.ts:5492 *Overrides [SourceSource](sourcesource.md).[removeListener](sourcesource.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:5493 +Defined in node_modules/@types/node/stream.d.ts:91 **Parameters:** @@ -1416,7 +1496,7 @@ Defined in node_modules/@types/node/base.d.ts:5493 *Overrides [SourceSource](sourcesource.md).[removeListener](sourcesource.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:5494 +Defined in node_modules/@types/node/stream.d.ts:92 **Parameters:** @@ -1434,6 +1514,30 @@ Name | Type | **Returns:** *this* +▸ **removeListener**(`event`: string | symbol, `listener`: function): *this* + +*Inherited from [SparseFilterStream](sparsefilterstream.md).[removeListener](sparsefilterstream.md#removelistener)* + +*Overrides [SourceSource](sourcesource.md).[removeListener](sourcesource.md#removelistener)* + +Defined in node_modules/@types/node/stream.d.ts:93 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* + +**Parameters:** + +Name | Type | +------ | ------ | +`...args` | any[] | + +**Returns:** *this* + ___ ### resume @@ -1442,7 +1546,7 @@ ___ *Inherited from [SparseFilterStream](sparsefilterstream.md).[resume](sparsefilterstream.md#resume)* -Defined in node_modules/@types/node/base.d.ts:5429 +Defined in node_modules/@types/node/stream.d.ts:28 **Returns:** *this* @@ -1454,7 +1558,7 @@ ___ *Inherited from [SparseFilterStream](sparsefilterstream.md).[setDefaultEncoding](sparsefilterstream.md#setdefaultencoding)* -Defined in node_modules/@types/node/base.d.ts:5609 +Defined in node_modules/@types/node/stream.d.ts:219 **Parameters:** @@ -1472,7 +1576,7 @@ ___ *Inherited from [SparseFilterStream](sparsefilterstream.md).[setEncoding](sparsefilterstream.md#setencoding)* -Defined in node_modules/@types/node/base.d.ts:5427 +Defined in node_modules/@types/node/stream.d.ts:26 **Parameters:** @@ -1490,7 +1594,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[setMaxListeners](countingwritable.md#setmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:905 +Defined in node_modules/@types/node/events.d.ts:28 **Parameters:** @@ -1508,7 +1612,7 @@ ___ *Inherited from [SparseFilterStream](sparsefilterstream.md).[uncork](sparsefilterstream.md#uncork)* -Defined in node_modules/@types/node/base.d.ts:5614 +Defined in node_modules/@types/node/stream.d.ts:224 **Returns:** *void* @@ -1516,21 +1620,17 @@ ___ ### unpipe -▸ **unpipe**<**T**>(`destination?`: T): *this* +▸ **unpipe**(`destination?`: NodeJS.WritableStream): *this* *Inherited from [SparseFilterStream](sparsefilterstream.md).[unpipe](sparsefilterstream.md#unpipe)* -Defined in node_modules/@types/node/base.d.ts:5431 - -**Type parameters:** - -▪ **T**: *WritableStream* +Defined in node_modules/@types/node/stream.d.ts:30 **Parameters:** Name | Type | ------ | ------ | -`destination?` | T | +`destination?` | NodeJS.WritableStream | **Returns:** *this* @@ -1542,7 +1642,7 @@ ___ *Inherited from [SparseFilterStream](sparsefilterstream.md).[unshift](sparsefilterstream.md#unshift)* -Defined in node_modules/@types/node/base.d.ts:5432 +Defined in node_modules/@types/node/stream.d.ts:31 **Parameters:** @@ -1560,7 +1660,7 @@ ___ *Inherited from [SparseFilterStream](sparsefilterstream.md).[wrap](sparsefilterstream.md#wrap)* -Defined in node_modules/@types/node/base.d.ts:5433 +Defined in node_modules/@types/node/stream.d.ts:32 **Parameters:** @@ -1574,26 +1674,26 @@ ___ ### write -▸ **write**(`chunk`: any, `cb?`: Function): *boolean* +▸ **write**(`chunk`: any, `cb?`: undefined | function): *boolean* *Inherited from [SparseFilterStream](sparsefilterstream.md).[write](sparsefilterstream.md#write)* -Defined in node_modules/@types/node/base.d.ts:5607 +Defined in node_modules/@types/node/stream.d.ts:217 **Parameters:** Name | Type | ------ | ------ | `chunk` | any | -`cb?` | Function | +`cb?` | undefined | function | **Returns:** *boolean* -▸ **write**(`chunk`: any, `encoding?`: undefined | string, `cb?`: Function): *boolean* +▸ **write**(`chunk`: any, `encoding?`: undefined | string, `cb?`: undefined | function): *boolean* *Inherited from [SparseFilterStream](sparsefilterstream.md).[write](sparsefilterstream.md#write)* -Defined in node_modules/@types/node/base.d.ts:5608 +Defined in node_modules/@types/node/stream.d.ts:218 **Parameters:** @@ -1601,7 +1701,7 @@ Name | Type | ------ | ------ | `chunk` | any | `encoding?` | undefined | string | -`cb?` | Function | +`cb?` | undefined | function | **Returns:** *boolean* @@ -1613,7 +1713,9 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[listenerCount](countingwritable.md#static-listenercount)* -Defined in node_modules/@types/node/base.d.ts:895 +Defined in node_modules/@types/node/events.d.ts:17 + +**`deprecated`** since v4.0.0 **Parameters:** diff --git a/doc/classes/streamverifier.md b/doc/classes/streamverifier.md index 1893e6d4..aeb9dae7 100644 --- a/doc/classes/streamverifier.md +++ b/doc/classes/streamverifier.md @@ -30,10 +30,12 @@ * [handleEventsAndPipe](streamverifier.md#protected-handleeventsandpipe) * [listenerCount](streamverifier.md#listenercount) * [listeners](streamverifier.md#listeners) +* [off](streamverifier.md#off) * [on](streamverifier.md#on) * [once](streamverifier.md#once) * [prependListener](streamverifier.md#prependlistener) * [prependOnceListener](streamverifier.md#prependoncelistener) +* [rawListeners](streamverifier.md#rawlisteners) * [removeAllListeners](streamverifier.md#removealllisteners) * [removeListener](streamverifier.md#removelistener) * [run](streamverifier.md#run) @@ -50,7 +52,7 @@ \+ **new StreamVerifier**(`source`: [SourceDestination](sourcedestination.md), `checksum`: string, `size`: number): *[StreamVerifier](streamverifier.md)* -*Defined in [lib/source-destination/source-destination.ts:152](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L152)* +*Defined in [lib/source-destination/source-destination.ts:175](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L175)* **Parameters:** @@ -68,7 +70,7 @@ Name | Type | • **checksum**: *string* -*Defined in [lib/source-destination/source-destination.ts:155](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L155)* +*Defined in [lib/source-destination/source-destination.ts:178](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L178)* ___ @@ -76,7 +78,7 @@ ___ • **size**: *number* -*Defined in [lib/source-destination/source-destination.ts:156](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L156)* +*Defined in [lib/source-destination/source-destination.ts:179](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L179)* ___ @@ -84,7 +86,7 @@ ___ • **source**: *[SourceDestination](sourcedestination.md)* -*Defined in [lib/source-destination/source-destination.ts:154](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L154)* +*Defined in [lib/source-destination/source-destination.ts:177](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L177)* ___ @@ -94,7 +96,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[defaultMaxListeners](countingwritable.md#static-defaultmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:896 +Defined in node_modules/@types/node/events.d.ts:18 ## Methods @@ -106,7 +108,7 @@ Defined in node_modules/@types/node/base.d.ts:896 *Overrides [SparseReadable](../interfaces/sparsereadable.md).[addListener](../interfaces/sparsereadable.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:898 +Defined in node_modules/@types/node/events.d.ts:20 **Parameters:** @@ -134,7 +136,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[emit](../interfaces/sparsereadable.md#emit)* -Defined in node_modules/@types/node/base.d.ts:908 +Defined in node_modules/@types/node/events.d.ts:32 **Parameters:** @@ -155,7 +157,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[eventNames](../interfaces/sparsereadable.md#eventnames)* -Defined in node_modules/@types/node/base.d.ts:909 +Defined in node_modules/@types/node/events.d.ts:33 **Returns:** *Array‹string | symbol›* @@ -169,7 +171,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[getMaxListeners](../interfaces/sparsereadable.md#getmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:906 +Defined in node_modules/@types/node/events.d.ts:29 **Returns:** *number* @@ -181,7 +183,7 @@ ___ *Inherited from [Verifier](verifier.md).[handleEventsAndPipe](verifier.md#protected-handleeventsandpipe)* -*Defined in [lib/source-destination/source-destination.ts:134](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L134)* +*Defined in [lib/source-destination/source-destination.ts:157](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L157)* **Parameters:** @@ -202,7 +204,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[listenerCount](../interfaces/sparsereadable.md#listenercount)* -Defined in node_modules/@types/node/base.d.ts:910 +Defined in node_modules/@types/node/events.d.ts:34 **Parameters:** @@ -222,7 +224,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[listeners](../interfaces/sparsereadable.md#listeners)* -Defined in node_modules/@types/node/base.d.ts:907 +Defined in node_modules/@types/node/events.d.ts:30 **Parameters:** @@ -234,6 +236,34 @@ Name | Type | ___ +### off + +▸ **off**(`event`: string | symbol, `listener`: function): *this* + +*Inherited from [CountingWritable](countingwritable.md).[off](countingwritable.md#off)* + +*Overrides [SparseReadable](../interfaces/sparsereadable.md).[off](../interfaces/sparsereadable.md#off)* + +Defined in node_modules/@types/node/events.d.ts:26 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* + +**Parameters:** + +Name | Type | +------ | ------ | +`...args` | any[] | + +**Returns:** *this* + +___ + ### on ▸ **on**(`event`: string | symbol, `listener`: function): *this* @@ -242,7 +272,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[on](../interfaces/sparsereadable.md#on)* -Defined in node_modules/@types/node/base.d.ts:899 +Defined in node_modules/@types/node/events.d.ts:21 **Parameters:** @@ -270,7 +300,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[once](../interfaces/sparsereadable.md#once)* -Defined in node_modules/@types/node/base.d.ts:900 +Defined in node_modules/@types/node/events.d.ts:22 **Parameters:** @@ -298,7 +328,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[prependListener](../interfaces/sparsereadable.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:901 +Defined in node_modules/@types/node/events.d.ts:23 **Parameters:** @@ -326,7 +356,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[prependOnceListener](../interfaces/sparsereadable.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:902 +Defined in node_modules/@types/node/events.d.ts:24 **Parameters:** @@ -346,6 +376,26 @@ Name | Type | ___ +### rawListeners + +▸ **rawListeners**(`event`: string | symbol): *Function[]* + +*Inherited from [CountingWritable](countingwritable.md).[rawListeners](countingwritable.md#rawlisteners)* + +*Overrides [SparseReadable](../interfaces/sparsereadable.md).[rawListeners](../interfaces/sparsereadable.md#rawlisteners)* + +Defined in node_modules/@types/node/events.d.ts:31 + +**Parameters:** + +Name | Type | +------ | ------ | +`event` | string | symbol | + +**Returns:** *Function[]* + +___ + ### removeAllListeners ▸ **removeAllListeners**(`event?`: string | symbol): *this* @@ -354,7 +404,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[removeAllListeners](../interfaces/sparsereadable.md#removealllisteners)* -Defined in node_modules/@types/node/base.d.ts:904 +Defined in node_modules/@types/node/events.d.ts:27 **Parameters:** @@ -374,7 +424,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[removeListener](../interfaces/sparsereadable.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:903 +Defined in node_modules/@types/node/events.d.ts:25 **Parameters:** @@ -400,7 +450,7 @@ ___ *Overrides [Verifier](verifier.md).[run](verifier.md#abstract-run)* -*Defined in [lib/source-destination/source-destination.ts:161](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L161)* +*Defined in [lib/source-destination/source-destination.ts:184](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L184)* **Returns:** *Promise‹void›* @@ -414,7 +464,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[setMaxListeners](../interfaces/sparsereadable.md#setmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:905 +Defined in node_modules/@types/node/events.d.ts:28 **Parameters:** @@ -432,7 +482,9 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[listenerCount](countingwritable.md#static-listenercount)* -Defined in node_modules/@types/node/base.d.ts:895 +Defined in node_modules/@types/node/events.d.ts:17 + +**`deprecated`** since v4.0.0 **Parameters:** @@ -451,22 +503,22 @@ Name | Type | *Inherited from [Verifier](verifier.md).[progress](verifier.md#progress)* -*Defined in [lib/source-destination/source-destination.ts:130](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L130)* +*Defined in [lib/source-destination/source-destination.ts:153](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L153)* ### bytes • **bytes**: *number* = 0 -*Defined in [lib/source-destination/source-destination.ts:130](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L130)* +*Defined in [lib/source-destination/source-destination.ts:153](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L153)* ### position • **position**: *number* = 0 -*Defined in [lib/source-destination/source-destination.ts:130](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L130)* +*Defined in [lib/source-destination/source-destination.ts:153](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L153)* ### speed • **speed**: *number* = 0 -*Defined in [lib/source-destination/source-destination.ts:130](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L130)* +*Defined in [lib/source-destination/source-destination.ts:153](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L153)* diff --git a/doc/classes/streamzipsource.md b/doc/classes/streamzipsource.md index 316bc2a7..13c898b5 100644 --- a/doc/classes/streamzipsource.md +++ b/doc/classes/streamzipsource.md @@ -53,11 +53,13 @@ * [getPartitionTable](streamzipsource.md#getpartitiontable) * [listenerCount](streamzipsource.md#listenercount) * [listeners](streamzipsource.md#listeners) +* [off](streamzipsource.md#off) * [on](streamzipsource.md#on) * [once](streamzipsource.md#once) * [open](streamzipsource.md#open) * [prependListener](streamzipsource.md#prependlistener) * [prependOnceListener](streamzipsource.md#prependoncelistener) +* [rawListeners](streamzipsource.md#rawlisteners) * [read](streamzipsource.md#read) * [removeAllListeners](streamzipsource.md#removealllisteners) * [removeListener](streamzipsource.md#removelistener) @@ -74,7 +76,7 @@ *Overrides [SourceSource](sourcesource.md).[constructor](sourcesource.md#constructor)* -*Defined in [lib/source-destination/zip.ts:75](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/zip.ts#L75)* +*Defined in [lib/source-destination/zip.ts:75](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/zip.ts#L75)* **Parameters:** @@ -98,7 +100,7 @@ Name | Type | • **entry**? : *ZipStreamEntry* -*Defined in [lib/source-destination/zip.ts:75](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/zip.ts#L75)* +*Defined in [lib/source-destination/zip.ts:75](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/zip.ts#L75)* ___ @@ -106,7 +108,7 @@ ___ • **match**: *function* -*Defined in [lib/source-destination/zip.ts:79](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/zip.ts#L79)* +*Defined in [lib/source-destination/zip.ts:79](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/zip.ts#L79)* #### Type declaration: @@ -126,7 +128,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[source](sourcesource.md#protected-source)* -*Defined in [lib/source-destination/source-source.ts:22](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-source.ts#L22)* +*Defined in [lib/source-destination/source-source.ts:22](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-source.ts#L22)* ___ @@ -136,7 +138,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[defaultMaxListeners](countingwritable.md#static-defaultmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:896 +Defined in node_modules/@types/node/events.d.ts:18 ___ @@ -157,7 +159,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[imageExtensions](sourcesource.md#static-imageextensions)* -*Defined in [lib/source-destination/source-destination.ts:252](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L252)* +*Defined in [lib/source-destination/source-destination.ts:275](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L275)* ___ @@ -167,7 +169,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[mimetype](sourcesource.md#static-optional-mimetype)* -*Defined in [lib/source-destination/source-destination.ts:264](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L264)* +*Defined in [lib/source-destination/source-destination.ts:287](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L287)* ___ @@ -177,7 +179,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[requiresRandomReadableSource](sourcesource.md#static-requiresrandomreadablesource)* -*Defined in [lib/source-destination/source-source.ts:20](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-source.ts#L20)* +*Defined in [lib/source-destination/source-source.ts:20](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-source.ts#L20)* ## Methods @@ -189,7 +191,7 @@ ___ *Overrides [SourceDestination](sourcedestination.md).[_close](sourcedestination.md#protected-_close)* -*Defined in [lib/source-destination/source-source.ts:30](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-source.ts#L30)* +*Defined in [lib/source-destination/source-source.ts:30](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-source.ts#L30)* **Returns:** *Promise‹void›* @@ -201,7 +203,7 @@ ___ *Overrides [SourceSource](sourcesource.md).[_getMetadata](sourcesource.md#protected-_getmetadata)* -*Defined in [lib/source-destination/zip.ts:122](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/zip.ts#L122)* +*Defined in [lib/source-destination/zip.ts:122](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/zip.ts#L122)* **Returns:** *Promise‹[Metadata](../interfaces/metadata.md)›* @@ -215,7 +217,7 @@ ___ *Overrides [SourceDestination](sourcedestination.md).[_open](sourcedestination.md#protected-_open)* -*Defined in [lib/source-destination/source-source.ts:26](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-source.ts#L26)* +*Defined in [lib/source-destination/source-source.ts:26](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-source.ts#L26)* **Returns:** *Promise‹void›* @@ -229,7 +231,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[addListener](../interfaces/sparsereadable.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:898 +Defined in node_modules/@types/node/events.d.ts:20 **Parameters:** @@ -255,7 +257,7 @@ ___ *Overrides [SourceSource](sourcesource.md).[canCreateReadStream](sourcesource.md#cancreatereadstream)* -*Defined in [lib/source-destination/zip.ts:84](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/zip.ts#L84)* +*Defined in [lib/source-destination/zip.ts:84](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/zip.ts#L84)* **Returns:** *Promise‹boolean›* @@ -267,7 +269,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[canCreateSparseReadStream](sourcesource.md#cancreatesparsereadstream)* -*Defined in [lib/source-destination/source-destination.ts:292](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L292)* +*Defined in [lib/source-destination/source-destination.ts:315](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L315)* **Returns:** *Promise‹boolean›* @@ -279,7 +281,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[canCreateSparseWriteStream](sourcesource.md#cancreatesparsewritestream)* -*Defined in [lib/source-destination/source-destination.ts:300](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L300)* +*Defined in [lib/source-destination/source-destination.ts:323](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L323)* **Returns:** *Promise‹boolean›* @@ -291,7 +293,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[canCreateWriteStream](sourcesource.md#cancreatewritestream)* -*Defined in [lib/source-destination/source-destination.ts:296](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L296)* +*Defined in [lib/source-destination/source-destination.ts:319](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L319)* **Returns:** *Promise‹boolean›* @@ -303,7 +305,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[canRead](sourcesource.md#canread)* -*Defined in [lib/source-destination/source-destination.ts:280](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L280)* +*Defined in [lib/source-destination/source-destination.ts:303](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L303)* **Returns:** *Promise‹boolean›* @@ -315,7 +317,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[canWrite](sourcesource.md#canwrite)* -*Defined in [lib/source-destination/source-destination.ts:284](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L284)* +*Defined in [lib/source-destination/source-destination.ts:307](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L307)* **Returns:** *Promise‹boolean›* @@ -327,7 +329,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[close](sourcesource.md#close)* -*Defined in [lib/source-destination/source-destination.ts:368](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L368)* +*Defined in [lib/source-destination/source-destination.ts:391](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L391)* **Returns:** *Promise‹void›* @@ -339,7 +341,7 @@ ___ *Overrides [SourceSource](sourcesource.md).[createReadStream](sourcesource.md#createreadstream)* -*Defined in [lib/source-destination/zip.ts:106](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/zip.ts#L106)* +*Defined in [lib/source-destination/zip.ts:106](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/zip.ts#L106)* **Parameters:** @@ -360,7 +362,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[createSparseReadStream](sourcesource.md#createsparsereadstream)* -*Defined in [lib/source-destination/source-destination.ts:339](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L339)* +*Defined in [lib/source-destination/source-destination.ts:362](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L362)* **Parameters:** @@ -378,7 +380,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[createSparseWriteStream](sourcesource.md#createsparsewritestream)* -*Defined in [lib/source-destination/source-destination.ts:355](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L355)* +*Defined in [lib/source-destination/source-destination.ts:378](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L378)* **Parameters:** @@ -398,7 +400,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[createVerifier](sourcesource.md#createverifier)* -*Defined in [lib/source-destination/source-destination.ts:383](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L383)* +*Defined in [lib/source-destination/source-destination.ts:406](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L406)* **Parameters:** @@ -417,7 +419,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[createWriteStream](sourcesource.md#createwritestream)* -*Defined in [lib/source-destination/source-destination.ts:349](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L349)* +*Defined in [lib/source-destination/source-destination.ts:372](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L372)* **Parameters:** @@ -439,7 +441,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[emit](../interfaces/sparsereadable.md#emit)* -Defined in node_modules/@types/node/base.d.ts:908 +Defined in node_modules/@types/node/events.d.ts:32 **Parameters:** @@ -460,7 +462,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[eventNames](../interfaces/sparsereadable.md#eventnames)* -Defined in node_modules/@types/node/base.d.ts:909 +Defined in node_modules/@types/node/events.d.ts:33 **Returns:** *Array‹string | symbol›* @@ -472,7 +474,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[getAlignment](sourcesource.md#getalignment)* -*Defined in [lib/source-destination/source-destination.ts:276](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L276)* +*Defined in [lib/source-destination/source-destination.ts:299](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L299)* **Returns:** *number | undefined* @@ -484,7 +486,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[getBlocks](sourcesource.md#getblocks)* -*Defined in [lib/source-destination/source-destination.ts:345](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L345)* +*Defined in [lib/source-destination/source-destination.ts:368](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L368)* **Returns:** *Promise‹[BlocksWithChecksum](../interfaces/blockswithchecksum.md)[]›* @@ -494,7 +496,7 @@ ___ ▸ **getEntry**(): *Promise‹ZipStreamEntry›* -*Defined in [lib/source-destination/zip.ts:88](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/zip.ts#L88)* +*Defined in [lib/source-destination/zip.ts:88](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/zip.ts#L88)* **Returns:** *Promise‹ZipStreamEntry›* @@ -506,7 +508,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[getInnerSource](sourcesource.md#getinnersource)* -*Defined in [lib/source-destination/source-destination.ts:452](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L452)* +*Defined in [lib/source-destination/source-destination.ts:475](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L475)* **Returns:** *Promise‹[SourceDestination](sourcedestination.md)›* @@ -520,7 +522,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[getMaxListeners](../interfaces/sparsereadable.md#getmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:906 +Defined in node_modules/@types/node/events.d.ts:29 **Returns:** *number* @@ -532,7 +534,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[getMetadata](sourcesource.md#getmetadata)* -*Defined in [lib/source-destination/source-destination.ts:304](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L304)* +*Defined in [lib/source-destination/source-destination.ts:327](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L327)* **Returns:** *Promise‹[Metadata](../interfaces/metadata.md)›* @@ -544,7 +546,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[getPartitionTable](sourcesource.md#getpartitiontable)* -*Defined in [lib/source-destination/source-destination.ts:473](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L473)* +*Defined in [lib/source-destination/source-destination.ts:496](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L496)* **Returns:** *Promise‹GetPartitionsResult | undefined›* @@ -558,7 +560,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[listenerCount](../interfaces/sparsereadable.md#listenercount)* -Defined in node_modules/@types/node/base.d.ts:910 +Defined in node_modules/@types/node/events.d.ts:34 **Parameters:** @@ -578,7 +580,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[listeners](../interfaces/sparsereadable.md#listeners)* -Defined in node_modules/@types/node/base.d.ts:907 +Defined in node_modules/@types/node/events.d.ts:30 **Parameters:** @@ -590,6 +592,34 @@ Name | Type | ___ +### off + +▸ **off**(`event`: string | symbol, `listener`: function): *this* + +*Inherited from [CountingWritable](countingwritable.md).[off](countingwritable.md#off)* + +*Overrides [SparseReadable](../interfaces/sparsereadable.md).[off](../interfaces/sparsereadable.md#off)* + +Defined in node_modules/@types/node/events.d.ts:26 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* + +**Parameters:** + +Name | Type | +------ | ------ | +`...args` | any[] | + +**Returns:** *this* + +___ + ### on ▸ **on**(`event`: string | symbol, `listener`: function): *this* @@ -598,7 +628,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[on](../interfaces/sparsereadable.md#on)* -Defined in node_modules/@types/node/base.d.ts:899 +Defined in node_modules/@types/node/events.d.ts:21 **Parameters:** @@ -626,7 +656,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[once](../interfaces/sparsereadable.md#once)* -Defined in node_modules/@types/node/base.d.ts:900 +Defined in node_modules/@types/node/events.d.ts:22 **Parameters:** @@ -652,7 +682,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[open](sourcesource.md#open)* -*Defined in [lib/source-destination/source-destination.ts:361](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L361)* +*Defined in [lib/source-destination/source-destination.ts:384](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L384)* **Returns:** *Promise‹void›* @@ -666,7 +696,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[prependListener](../interfaces/sparsereadable.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:901 +Defined in node_modules/@types/node/events.d.ts:23 **Parameters:** @@ -694,7 +724,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[prependOnceListener](../interfaces/sparsereadable.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:902 +Defined in node_modules/@types/node/events.d.ts:24 **Parameters:** @@ -714,13 +744,33 @@ Name | Type | ___ +### rawListeners + +▸ **rawListeners**(`event`: string | symbol): *Function[]* + +*Inherited from [CountingWritable](countingwritable.md).[rawListeners](countingwritable.md#rawlisteners)* + +*Overrides [SparseReadable](../interfaces/sparsereadable.md).[rawListeners](../interfaces/sparsereadable.md#rawlisteners)* + +Defined in node_modules/@types/node/events.d.ts:31 + +**Parameters:** + +Name | Type | +------ | ------ | +`event` | string | symbol | + +**Returns:** *Function[]* + +___ + ### read ▸ **read**(`_buffer`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer), `_bufferOffset`: number, `_length`: number, `_sourceOffset`: number): *Promise‹ReadResult›* *Inherited from [SourceSource](sourcesource.md).[read](sourcesource.md#read)* -*Defined in [lib/source-destination/source-destination.ts:315](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L315)* +*Defined in [lib/source-destination/source-destination.ts:338](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L338)* **Parameters:** @@ -743,7 +793,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[removeAllListeners](../interfaces/sparsereadable.md#removealllisteners)* -Defined in node_modules/@types/node/base.d.ts:904 +Defined in node_modules/@types/node/events.d.ts:27 **Parameters:** @@ -763,7 +813,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[removeListener](../interfaces/sparsereadable.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:903 +Defined in node_modules/@types/node/events.d.ts:25 **Parameters:** @@ -791,7 +841,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[setMaxListeners](../interfaces/sparsereadable.md#setmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:905 +Defined in node_modules/@types/node/events.d.ts:28 **Parameters:** @@ -809,7 +859,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[write](sourcesource.md#write)* -*Defined in [lib/source-destination/source-destination.ts:324](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L324)* +*Defined in [lib/source-destination/source-destination.ts:347](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L347)* **Parameters:** @@ -830,7 +880,9 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[listenerCount](countingwritable.md#static-listenercount)* -Defined in node_modules/@types/node/base.d.ts:895 +Defined in node_modules/@types/node/events.d.ts:17 + +**`deprecated`** since v4.0.0 **Parameters:** @@ -849,7 +901,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[register](sourcesource.md#static-register)* -*Defined in [lib/source-destination/source-destination.ts:270](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L270)* +*Defined in [lib/source-destination/source-destination.ts:293](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L293)* **Parameters:** diff --git a/doc/classes/usbbootdeviceadapter.md b/doc/classes/usbbootdeviceadapter.md index 8d9eef13..2645a33f 100644 --- a/doc/classes/usbbootdeviceadapter.md +++ b/doc/classes/usbbootdeviceadapter.md @@ -28,12 +28,14 @@ * [getMaxListeners](usbbootdeviceadapter.md#getmaxlisteners) * [listenerCount](usbbootdeviceadapter.md#listenercount) * [listeners](usbbootdeviceadapter.md#listeners) +* [off](usbbootdeviceadapter.md#off) * [on](usbbootdeviceadapter.md#on) * [onAttach](usbbootdeviceadapter.md#private-onattach) * [onDetach](usbbootdeviceadapter.md#private-ondetach) * [once](usbbootdeviceadapter.md#once) * [prependListener](usbbootdeviceadapter.md#prependlistener) * [prependOnceListener](usbbootdeviceadapter.md#prependoncelistener) +* [rawListeners](usbbootdeviceadapter.md#rawlisteners) * [removeAllListeners](usbbootdeviceadapter.md#removealllisteners) * [removeListener](usbbootdeviceadapter.md#removelistener) * [setMaxListeners](usbbootdeviceadapter.md#setmaxlisteners) @@ -47,7 +49,7 @@ \+ **new UsbbootDeviceAdapter**(): *[UsbbootDeviceAdapter](usbbootdeviceadapter.md)* -*Defined in [lib/scanner/adapters/usbboot.ts:28](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/scanner/adapters/usbboot.ts#L28)* +*Defined in [lib/scanner/adapters/usbboot.ts:28](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/scanner/adapters/usbboot.ts#L28)* **Returns:** *[UsbbootDeviceAdapter](usbbootdeviceadapter.md)* @@ -57,7 +59,7 @@ • **drives**: *Map‹UsbbootDevice, [UsbbootDrive](usbbootdrive.md)›* = new Map() -*Defined in [lib/scanner/adapters/usbboot.ts:27](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/scanner/adapters/usbboot.ts#L27)* +*Defined in [lib/scanner/adapters/usbboot.ts:27](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/scanner/adapters/usbboot.ts#L27)* ___ @@ -65,7 +67,7 @@ ___ • **scanner**: *UsbbootScannerType* -*Defined in [lib/scanner/adapters/usbboot.ts:28](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/scanner/adapters/usbboot.ts#L28)* +*Defined in [lib/scanner/adapters/usbboot.ts:28](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/scanner/adapters/usbboot.ts#L28)* ___ @@ -75,7 +77,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[defaultMaxListeners](countingwritable.md#static-defaultmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:896 +Defined in node_modules/@types/node/events.d.ts:18 ## Methods @@ -87,7 +89,7 @@ Defined in node_modules/@types/node/base.d.ts:896 *Overrides [SparseReadable](../interfaces/sparsereadable.md).[addListener](../interfaces/sparsereadable.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:898 +Defined in node_modules/@types/node/events.d.ts:20 **Parameters:** @@ -115,7 +117,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[emit](../interfaces/sparsereadable.md#emit)* -Defined in node_modules/@types/node/base.d.ts:908 +Defined in node_modules/@types/node/events.d.ts:32 **Parameters:** @@ -136,7 +138,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[eventNames](../interfaces/sparsereadable.md#eventnames)* -Defined in node_modules/@types/node/base.d.ts:909 +Defined in node_modules/@types/node/events.d.ts:33 **Returns:** *Array‹string | symbol›* @@ -150,7 +152,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[getMaxListeners](../interfaces/sparsereadable.md#getmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:906 +Defined in node_modules/@types/node/events.d.ts:29 **Returns:** *number* @@ -164,7 +166,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[listenerCount](../interfaces/sparsereadable.md#listenercount)* -Defined in node_modules/@types/node/base.d.ts:910 +Defined in node_modules/@types/node/events.d.ts:34 **Parameters:** @@ -184,7 +186,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[listeners](../interfaces/sparsereadable.md#listeners)* -Defined in node_modules/@types/node/base.d.ts:907 +Defined in node_modules/@types/node/events.d.ts:30 **Parameters:** @@ -196,6 +198,34 @@ Name | Type | ___ +### off + +▸ **off**(`event`: string | symbol, `listener`: function): *this* + +*Inherited from [CountingWritable](countingwritable.md).[off](countingwritable.md#off)* + +*Overrides [SparseReadable](../interfaces/sparsereadable.md).[off](../interfaces/sparsereadable.md#off)* + +Defined in node_modules/@types/node/events.d.ts:26 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* + +**Parameters:** + +Name | Type | +------ | ------ | +`...args` | any[] | + +**Returns:** *this* + +___ + ### on ▸ **on**(`event`: string | symbol, `listener`: function): *this* @@ -204,7 +234,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[on](../interfaces/sparsereadable.md#on)* -Defined in node_modules/@types/node/base.d.ts:899 +Defined in node_modules/@types/node/events.d.ts:21 **Parameters:** @@ -228,7 +258,7 @@ ___ ▸ **onAttach**(`device`: UsbbootDevice): *void* -*Defined in [lib/scanner/adapters/usbboot.ts:53](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/scanner/adapters/usbboot.ts#L53)* +*Defined in [lib/scanner/adapters/usbboot.ts:53](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/scanner/adapters/usbboot.ts#L53)* **Parameters:** @@ -244,7 +274,7 @@ ___ ▸ **onDetach**(`device`: UsbbootDevice): *void* -*Defined in [lib/scanner/adapters/usbboot.ts:62](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/scanner/adapters/usbboot.ts#L62)* +*Defined in [lib/scanner/adapters/usbboot.ts:62](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/scanner/adapters/usbboot.ts#L62)* **Parameters:** @@ -264,7 +294,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[once](../interfaces/sparsereadable.md#once)* -Defined in node_modules/@types/node/base.d.ts:900 +Defined in node_modules/@types/node/events.d.ts:22 **Parameters:** @@ -292,7 +322,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[prependListener](../interfaces/sparsereadable.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:901 +Defined in node_modules/@types/node/events.d.ts:23 **Parameters:** @@ -320,7 +350,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[prependOnceListener](../interfaces/sparsereadable.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:902 +Defined in node_modules/@types/node/events.d.ts:24 **Parameters:** @@ -340,6 +370,26 @@ Name | Type | ___ +### rawListeners + +▸ **rawListeners**(`event`: string | symbol): *Function[]* + +*Inherited from [CountingWritable](countingwritable.md).[rawListeners](countingwritable.md#rawlisteners)* + +*Overrides [SparseReadable](../interfaces/sparsereadable.md).[rawListeners](../interfaces/sparsereadable.md#rawlisteners)* + +Defined in node_modules/@types/node/events.d.ts:31 + +**Parameters:** + +Name | Type | +------ | ------ | +`event` | string | symbol | + +**Returns:** *Function[]* + +___ + ### removeAllListeners ▸ **removeAllListeners**(`event?`: string | symbol): *this* @@ -348,7 +398,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[removeAllListeners](../interfaces/sparsereadable.md#removealllisteners)* -Defined in node_modules/@types/node/base.d.ts:904 +Defined in node_modules/@types/node/events.d.ts:27 **Parameters:** @@ -368,7 +418,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[removeListener](../interfaces/sparsereadable.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:903 +Defined in node_modules/@types/node/events.d.ts:25 **Parameters:** @@ -396,7 +446,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[setMaxListeners](../interfaces/sparsereadable.md#setmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:905 +Defined in node_modules/@types/node/events.d.ts:28 **Parameters:** @@ -414,7 +464,7 @@ ___ *Overrides [Adapter](adapter.md).[start](adapter.md#abstract-start)* -*Defined in [lib/scanner/adapters/usbboot.ts:45](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/scanner/adapters/usbboot.ts#L45)* +*Defined in [lib/scanner/adapters/usbboot.ts:45](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/scanner/adapters/usbboot.ts#L45)* **Returns:** *void* @@ -426,7 +476,7 @@ ___ *Overrides [Adapter](adapter.md).[stop](adapter.md#abstract-stop)* -*Defined in [lib/scanner/adapters/usbboot.ts:49](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/scanner/adapters/usbboot.ts#L49)* +*Defined in [lib/scanner/adapters/usbboot.ts:49](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/scanner/adapters/usbboot.ts#L49)* **Returns:** *void* @@ -438,7 +488,9 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[listenerCount](countingwritable.md#static-listenercount)* -Defined in node_modules/@types/node/base.d.ts:895 +Defined in node_modules/@types/node/events.d.ts:17 + +**`deprecated`** since v4.0.0 **Parameters:** diff --git a/doc/classes/usbbootdrive.md b/doc/classes/usbbootdrive.md index a36a2d49..2001595d 100644 --- a/doc/classes/usbbootdrive.md +++ b/doc/classes/usbbootdrive.md @@ -65,11 +65,13 @@ * [getPartitionTable](usbbootdrive.md#getpartitiontable) * [listenerCount](usbbootdrive.md#listenercount) * [listeners](usbbootdrive.md#listeners) +* [off](usbbootdrive.md#off) * [on](usbbootdrive.md#on) * [once](usbbootdrive.md#once) * [open](usbbootdrive.md#open) * [prependListener](usbbootdrive.md#prependlistener) * [prependOnceListener](usbbootdrive.md#prependoncelistener) +* [rawListeners](usbbootdrive.md#rawlisteners) * [read](usbbootdrive.md#read) * [removeAllListeners](usbbootdrive.md#removealllisteners) * [removeListener](usbbootdrive.md#removelistener) @@ -84,7 +86,7 @@ \+ **new UsbbootDrive**(`usbDevice`: UsbbootDevice): *[UsbbootDrive](usbbootdrive.md)* -*Defined in [lib/source-destination/usbboot.ts:35](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/usbboot.ts#L35)* +*Defined in [lib/source-destination/usbboot.ts:35](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/usbboot.ts#L35)* **Parameters:** @@ -102,7 +104,7 @@ Name | Type | *Implementation of [AdapterSourceDestination](../interfaces/adaptersourcedestination.md).[description](../interfaces/adaptersourcedestination.md#description)* -*Defined in [lib/source-destination/usbboot.ts:30](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/usbboot.ts#L30)* +*Defined in [lib/source-destination/usbboot.ts:30](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/usbboot.ts#L30)* ___ @@ -112,7 +114,7 @@ ___ *Implementation of [AdapterSourceDestination](../interfaces/adaptersourcedestination.md).[device](../interfaces/adaptersourcedestination.md#device)* -*Defined in [lib/source-destination/usbboot.ts:26](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/usbboot.ts#L26)* +*Defined in [lib/source-destination/usbboot.ts:26](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/usbboot.ts#L26)* ___ @@ -122,7 +124,7 @@ ___ *Implementation of [AdapterSourceDestination](../interfaces/adaptersourcedestination.md).[devicePath](../interfaces/adaptersourcedestination.md#devicepath)* -*Defined in [lib/source-destination/usbboot.ts:27](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/usbboot.ts#L27)* +*Defined in [lib/source-destination/usbboot.ts:27](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/usbboot.ts#L27)* ___ @@ -130,7 +132,7 @@ ___ • **disabled**: *boolean* = true -*Defined in [lib/source-destination/usbboot.ts:33](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/usbboot.ts#L33)* +*Defined in [lib/source-destination/usbboot.ts:33](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/usbboot.ts#L33)* ___ @@ -138,7 +140,7 @@ ___ • **displayName**: *string* = "Initializing device" -*Defined in [lib/source-destination/usbboot.ts:25](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/usbboot.ts#L25)* +*Defined in [lib/source-destination/usbboot.ts:25](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/usbboot.ts#L25)* ___ @@ -148,7 +150,7 @@ ___ *Implementation of [AdapterSourceDestination](../interfaces/adaptersourcedestination.md).[emitsProgress](../interfaces/adaptersourcedestination.md#emitsprogress)* -*Defined in [lib/source-destination/usbboot.ts:35](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/usbboot.ts#L35)* +*Defined in [lib/source-destination/usbboot.ts:35](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/usbboot.ts#L35)* ___ @@ -156,7 +158,7 @@ ___ • **icon**: *string* = "loading" -*Defined in [lib/source-destination/usbboot.ts:28](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/usbboot.ts#L28)* +*Defined in [lib/source-destination/usbboot.ts:28](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/usbboot.ts#L28)* ___ @@ -164,7 +166,7 @@ ___ • **isReadOnly**: *boolean* = false -*Defined in [lib/source-destination/usbboot.ts:32](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/usbboot.ts#L32)* +*Defined in [lib/source-destination/usbboot.ts:32](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/usbboot.ts#L32)* ___ @@ -174,7 +176,7 @@ ___ *Implementation of [AdapterSourceDestination](../interfaces/adaptersourcedestination.md).[isSystem](../interfaces/adaptersourcedestination.md#issystem)* -*Defined in [lib/source-destination/usbboot.ts:29](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/usbboot.ts#L29)* +*Defined in [lib/source-destination/usbboot.ts:29](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/usbboot.ts#L29)* ___ @@ -184,7 +186,7 @@ ___ *Implementation of [AdapterSourceDestination](../interfaces/adaptersourcedestination.md).[mountpoints](../interfaces/adaptersourcedestination.md#mountpoints)* -*Defined in [lib/source-destination/usbboot.ts:31](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/usbboot.ts#L31)* +*Defined in [lib/source-destination/usbboot.ts:31](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/usbboot.ts#L31)* ___ @@ -194,7 +196,7 @@ ___ *Implementation of [AdapterSourceDestination](../interfaces/adaptersourcedestination.md).[raw](../interfaces/adaptersourcedestination.md#raw)* -*Defined in [lib/source-destination/usbboot.ts:24](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/usbboot.ts#L24)* +*Defined in [lib/source-destination/usbboot.ts:24](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/usbboot.ts#L24)* ___ @@ -204,7 +206,7 @@ ___ *Implementation of [AdapterSourceDestination](../interfaces/adaptersourcedestination.md).[size](../interfaces/adaptersourcedestination.md#size)* -*Defined in [lib/source-destination/usbboot.ts:34](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/usbboot.ts#L34)* +*Defined in [lib/source-destination/usbboot.ts:34](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/usbboot.ts#L34)* ___ @@ -212,7 +214,7 @@ ___ • **usbDevice**: *UsbbootDevice* -*Defined in [lib/source-destination/usbboot.ts:37](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/usbboot.ts#L37)* +*Defined in [lib/source-destination/usbboot.ts:37](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/usbboot.ts#L37)* ___ @@ -224,7 +226,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[defaultMaxListeners](countingwritable.md#static-defaultmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:896 +Defined in node_modules/@types/node/events.d.ts:18 ___ @@ -247,7 +249,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[imageExtensions](sourcesource.md#static-imageextensions)* -*Defined in [lib/source-destination/source-destination.ts:252](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L252)* +*Defined in [lib/source-destination/source-destination.ts:275](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L275)* ___ @@ -259,7 +261,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[mimetype](sourcesource.md#static-optional-mimetype)* -*Defined in [lib/source-destination/source-destination.ts:264](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L264)* +*Defined in [lib/source-destination/source-destination.ts:287](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L287)* ## Methods @@ -271,7 +273,7 @@ ___ *Inherited from [SourceDestination](sourcedestination.md).[_close](sourcedestination.md#protected-_close)* -*Defined in [lib/source-destination/source-destination.ts:379](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L379)* +*Defined in [lib/source-destination/source-destination.ts:402](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L402)* **Returns:** *Promise‹void›* @@ -285,7 +287,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[_getMetadata](sourcesource.md#protected-_getmetadata)* -*Defined in [lib/source-destination/source-destination.ts:311](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L311)* +*Defined in [lib/source-destination/source-destination.ts:334](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L334)* **Returns:** *Promise‹[Metadata](../interfaces/metadata.md)›* @@ -299,7 +301,7 @@ ___ *Inherited from [SourceDestination](sourcedestination.md).[_open](sourcedestination.md#protected-_open)* -*Defined in [lib/source-destination/source-destination.ts:375](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L375)* +*Defined in [lib/source-destination/source-destination.ts:398](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L398)* **Returns:** *Promise‹void›* @@ -313,7 +315,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[addListener](../interfaces/sparsereadable.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:898 +Defined in node_modules/@types/node/events.d.ts:20 **Parameters:** @@ -341,7 +343,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[canCreateReadStream](sourcesource.md#cancreatereadstream)* -*Defined in [lib/source-destination/source-destination.ts:288](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L288)* +*Defined in [lib/source-destination/source-destination.ts:311](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L311)* **Returns:** *Promise‹boolean›* @@ -355,7 +357,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[canCreateSparseReadStream](sourcesource.md#cancreatesparsereadstream)* -*Defined in [lib/source-destination/source-destination.ts:292](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L292)* +*Defined in [lib/source-destination/source-destination.ts:315](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L315)* **Returns:** *Promise‹boolean›* @@ -369,7 +371,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[canCreateSparseWriteStream](sourcesource.md#cancreatesparsewritestream)* -*Defined in [lib/source-destination/source-destination.ts:300](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L300)* +*Defined in [lib/source-destination/source-destination.ts:323](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L323)* **Returns:** *Promise‹boolean›* @@ -383,7 +385,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[canCreateWriteStream](sourcesource.md#cancreatewritestream)* -*Defined in [lib/source-destination/source-destination.ts:296](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L296)* +*Defined in [lib/source-destination/source-destination.ts:319](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L319)* **Returns:** *Promise‹boolean›* @@ -397,7 +399,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[canRead](sourcesource.md#canread)* -*Defined in [lib/source-destination/source-destination.ts:280](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L280)* +*Defined in [lib/source-destination/source-destination.ts:303](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L303)* **Returns:** *Promise‹boolean›* @@ -411,7 +413,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[canWrite](sourcesource.md#canwrite)* -*Defined in [lib/source-destination/source-destination.ts:284](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L284)* +*Defined in [lib/source-destination/source-destination.ts:307](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L307)* **Returns:** *Promise‹boolean›* @@ -425,7 +427,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[close](sourcesource.md#close)* -*Defined in [lib/source-destination/source-destination.ts:368](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L368)* +*Defined in [lib/source-destination/source-destination.ts:391](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L391)* **Returns:** *Promise‹void›* @@ -439,7 +441,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[createReadStream](sourcesource.md#createreadstream)* -*Defined in [lib/source-destination/source-destination.ts:333](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L333)* +*Defined in [lib/source-destination/source-destination.ts:356](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L356)* **Parameters:** @@ -459,7 +461,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[createSparseReadStream](sourcesource.md#createsparsereadstream)* -*Defined in [lib/source-destination/source-destination.ts:339](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L339)* +*Defined in [lib/source-destination/source-destination.ts:362](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L362)* **Parameters:** @@ -477,7 +479,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[createSparseWriteStream](sourcesource.md#createsparsewritestream)* -*Defined in [lib/source-destination/source-destination.ts:355](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L355)* +*Defined in [lib/source-destination/source-destination.ts:378](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L378)* **Parameters:** @@ -499,7 +501,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[createVerifier](sourcesource.md#createverifier)* -*Defined in [lib/source-destination/source-destination.ts:383](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L383)* +*Defined in [lib/source-destination/source-destination.ts:406](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L406)* **Parameters:** @@ -518,7 +520,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[createWriteStream](sourcesource.md#createwritestream)* -*Defined in [lib/source-destination/source-destination.ts:349](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L349)* +*Defined in [lib/source-destination/source-destination.ts:372](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L372)* **Parameters:** @@ -542,7 +544,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[emit](../interfaces/sparsereadable.md#emit)* -Defined in node_modules/@types/node/base.d.ts:908 +Defined in node_modules/@types/node/events.d.ts:32 **Parameters:** @@ -565,7 +567,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[eventNames](../interfaces/sparsereadable.md#eventnames)* -Defined in node_modules/@types/node/base.d.ts:909 +Defined in node_modules/@types/node/events.d.ts:33 **Returns:** *Array‹string | symbol›* @@ -579,7 +581,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[getAlignment](sourcesource.md#getalignment)* -*Defined in [lib/source-destination/source-destination.ts:276](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L276)* +*Defined in [lib/source-destination/source-destination.ts:299](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L299)* **Returns:** *number | undefined* @@ -593,7 +595,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[getBlocks](sourcesource.md#getblocks)* -*Defined in [lib/source-destination/source-destination.ts:345](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L345)* +*Defined in [lib/source-destination/source-destination.ts:368](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L368)* **Returns:** *Promise‹[BlocksWithChecksum](../interfaces/blockswithchecksum.md)[]›* @@ -607,7 +609,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[getInnerSource](sourcesource.md#getinnersource)* -*Defined in [lib/source-destination/source-destination.ts:452](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L452)* +*Defined in [lib/source-destination/source-destination.ts:475](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L475)* **Returns:** *Promise‹[SourceDestination](sourcedestination.md)›* @@ -623,7 +625,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[getMaxListeners](../interfaces/sparsereadable.md#getmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:906 +Defined in node_modules/@types/node/events.d.ts:29 **Returns:** *number* @@ -637,7 +639,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[getMetadata](sourcesource.md#getmetadata)* -*Defined in [lib/source-destination/source-destination.ts:304](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L304)* +*Defined in [lib/source-destination/source-destination.ts:327](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L327)* **Returns:** *Promise‹[Metadata](../interfaces/metadata.md)›* @@ -651,7 +653,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[getPartitionTable](sourcesource.md#getpartitiontable)* -*Defined in [lib/source-destination/source-destination.ts:473](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L473)* +*Defined in [lib/source-destination/source-destination.ts:496](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L496)* **Returns:** *Promise‹GetPartitionsResult | undefined›* @@ -667,7 +669,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[listenerCount](../interfaces/sparsereadable.md#listenercount)* -Defined in node_modules/@types/node/base.d.ts:910 +Defined in node_modules/@types/node/events.d.ts:34 **Parameters:** @@ -689,7 +691,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[listeners](../interfaces/sparsereadable.md#listeners)* -Defined in node_modules/@types/node/base.d.ts:907 +Defined in node_modules/@types/node/events.d.ts:30 **Parameters:** @@ -701,6 +703,34 @@ Name | Type | ___ +### off + +▸ **off**(`event`: string | symbol, `listener`: function): *this* + +*Inherited from [CountingWritable](countingwritable.md).[off](countingwritable.md#off)* + +*Overrides [SparseReadable](../interfaces/sparsereadable.md).[off](../interfaces/sparsereadable.md#off)* + +Defined in node_modules/@types/node/events.d.ts:26 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* + +**Parameters:** + +Name | Type | +------ | ------ | +`...args` | any[] | + +**Returns:** *this* + +___ + ### on ▸ **on**(`event`: string | symbol, `listener`: function): *this* @@ -709,7 +739,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[on](../interfaces/sparsereadable.md#on)* -Defined in node_modules/@types/node/base.d.ts:899 +Defined in node_modules/@types/node/events.d.ts:21 **Parameters:** @@ -737,7 +767,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[once](../interfaces/sparsereadable.md#once)* -Defined in node_modules/@types/node/base.d.ts:900 +Defined in node_modules/@types/node/events.d.ts:22 **Parameters:** @@ -765,7 +795,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[open](sourcesource.md#open)* -*Defined in [lib/source-destination/source-destination.ts:361](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L361)* +*Defined in [lib/source-destination/source-destination.ts:384](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L384)* **Returns:** *Promise‹void›* @@ -779,7 +809,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[prependListener](../interfaces/sparsereadable.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:901 +Defined in node_modules/@types/node/events.d.ts:23 **Parameters:** @@ -807,7 +837,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[prependOnceListener](../interfaces/sparsereadable.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:902 +Defined in node_modules/@types/node/events.d.ts:24 **Parameters:** @@ -827,6 +857,28 @@ Name | Type | ___ +### rawListeners + +▸ **rawListeners**(`event`: string | symbol): *Function[]* + +*Implementation of [AdapterSourceDestination](../interfaces/adaptersourcedestination.md)* + +*Inherited from [CountingWritable](countingwritable.md).[rawListeners](countingwritable.md#rawlisteners)* + +*Overrides [SparseReadable](../interfaces/sparsereadable.md).[rawListeners](../interfaces/sparsereadable.md#rawlisteners)* + +Defined in node_modules/@types/node/events.d.ts:31 + +**Parameters:** + +Name | Type | +------ | ------ | +`event` | string | symbol | + +**Returns:** *Function[]* + +___ + ### read ▸ **read**(`_buffer`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer), `_bufferOffset`: number, `_length`: number, `_sourceOffset`: number): *Promise‹ReadResult›* @@ -835,7 +887,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[read](sourcesource.md#read)* -*Defined in [lib/source-destination/source-destination.ts:315](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L315)* +*Defined in [lib/source-destination/source-destination.ts:338](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L338)* **Parameters:** @@ -860,7 +912,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[removeAllListeners](../interfaces/sparsereadable.md#removealllisteners)* -Defined in node_modules/@types/node/base.d.ts:904 +Defined in node_modules/@types/node/events.d.ts:27 **Parameters:** @@ -880,7 +932,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[removeListener](../interfaces/sparsereadable.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:903 +Defined in node_modules/@types/node/events.d.ts:25 **Parameters:** @@ -910,7 +962,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[setMaxListeners](../interfaces/sparsereadable.md#setmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:905 +Defined in node_modules/@types/node/events.d.ts:28 **Parameters:** @@ -930,7 +982,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[write](sourcesource.md#write)* -*Defined in [lib/source-destination/source-destination.ts:324](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L324)* +*Defined in [lib/source-destination/source-destination.ts:347](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L347)* **Parameters:** @@ -953,7 +1005,9 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[listenerCount](countingwritable.md#static-listenercount)* -Defined in node_modules/@types/node/base.d.ts:895 +Defined in node_modules/@types/node/events.d.ts:17 + +**`deprecated`** since v4.0.0 **Parameters:** @@ -974,7 +1028,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[register](sourcesource.md#static-register)* -*Defined in [lib/source-destination/source-destination.ts:270](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L270)* +*Defined in [lib/source-destination/source-destination.ts:293](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L293)* **Parameters:** diff --git a/doc/classes/verificationerror.md b/doc/classes/verificationerror.md index a57fdebd..9f745286 100644 --- a/doc/classes/verificationerror.md +++ b/doc/classes/verificationerror.md @@ -28,7 +28,7 @@ • **code**: *string* = "EVALIDATION" -*Defined in [lib/errors.ts:24](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/errors.ts#L24)* +*Defined in [lib/errors.ts:24](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/errors.ts#L24)* ___ diff --git a/doc/classes/verifier.md b/doc/classes/verifier.md index dddb197f..5d423c31 100644 --- a/doc/classes/verifier.md +++ b/doc/classes/verifier.md @@ -29,10 +29,12 @@ * [handleEventsAndPipe](verifier.md#protected-handleeventsandpipe) * [listenerCount](verifier.md#listenercount) * [listeners](verifier.md#listeners) +* [off](verifier.md#off) * [on](verifier.md#on) * [once](verifier.md#once) * [prependListener](verifier.md#prependlistener) * [prependOnceListener](verifier.md#prependoncelistener) +* [rawListeners](verifier.md#rawlisteners) * [removeAllListeners](verifier.md#removealllisteners) * [removeListener](verifier.md#removelistener) * [run](verifier.md#abstract-run) @@ -51,7 +53,7 @@ *Inherited from [CountingWritable](countingwritable.md).[defaultMaxListeners](countingwritable.md#static-defaultmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:896 +Defined in node_modules/@types/node/events.d.ts:18 ## Methods @@ -63,7 +65,7 @@ Defined in node_modules/@types/node/base.d.ts:896 *Overrides [SparseReadable](../interfaces/sparsereadable.md).[addListener](../interfaces/sparsereadable.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:898 +Defined in node_modules/@types/node/events.d.ts:20 **Parameters:** @@ -91,7 +93,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[emit](../interfaces/sparsereadable.md#emit)* -Defined in node_modules/@types/node/base.d.ts:908 +Defined in node_modules/@types/node/events.d.ts:32 **Parameters:** @@ -112,7 +114,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[eventNames](../interfaces/sparsereadable.md#eventnames)* -Defined in node_modules/@types/node/base.d.ts:909 +Defined in node_modules/@types/node/events.d.ts:33 **Returns:** *Array‹string | symbol›* @@ -126,7 +128,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[getMaxListeners](../interfaces/sparsereadable.md#getmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:906 +Defined in node_modules/@types/node/events.d.ts:29 **Returns:** *number* @@ -136,7 +138,7 @@ ___ ▸ **handleEventsAndPipe**(`stream`: ReadableStream, `meter`: WritableStream): *void* -*Defined in [lib/source-destination/source-destination.ts:134](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L134)* +*Defined in [lib/source-destination/source-destination.ts:157](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L157)* **Parameters:** @@ -157,7 +159,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[listenerCount](../interfaces/sparsereadable.md#listenercount)* -Defined in node_modules/@types/node/base.d.ts:910 +Defined in node_modules/@types/node/events.d.ts:34 **Parameters:** @@ -177,7 +179,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[listeners](../interfaces/sparsereadable.md#listeners)* -Defined in node_modules/@types/node/base.d.ts:907 +Defined in node_modules/@types/node/events.d.ts:30 **Parameters:** @@ -189,6 +191,34 @@ Name | Type | ___ +### off + +▸ **off**(`event`: string | symbol, `listener`: function): *this* + +*Inherited from [CountingWritable](countingwritable.md).[off](countingwritable.md#off)* + +*Overrides [SparseReadable](../interfaces/sparsereadable.md).[off](../interfaces/sparsereadable.md#off)* + +Defined in node_modules/@types/node/events.d.ts:26 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* + +**Parameters:** + +Name | Type | +------ | ------ | +`...args` | any[] | + +**Returns:** *this* + +___ + ### on ▸ **on**(`event`: string | symbol, `listener`: function): *this* @@ -197,7 +227,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[on](../interfaces/sparsereadable.md#on)* -Defined in node_modules/@types/node/base.d.ts:899 +Defined in node_modules/@types/node/events.d.ts:21 **Parameters:** @@ -225,7 +255,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[once](../interfaces/sparsereadable.md#once)* -Defined in node_modules/@types/node/base.d.ts:900 +Defined in node_modules/@types/node/events.d.ts:22 **Parameters:** @@ -253,7 +283,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[prependListener](../interfaces/sparsereadable.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:901 +Defined in node_modules/@types/node/events.d.ts:23 **Parameters:** @@ -281,7 +311,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[prependOnceListener](../interfaces/sparsereadable.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:902 +Defined in node_modules/@types/node/events.d.ts:24 **Parameters:** @@ -301,6 +331,26 @@ Name | Type | ___ +### rawListeners + +▸ **rawListeners**(`event`: string | symbol): *Function[]* + +*Inherited from [CountingWritable](countingwritable.md).[rawListeners](countingwritable.md#rawlisteners)* + +*Overrides [SparseReadable](../interfaces/sparsereadable.md).[rawListeners](../interfaces/sparsereadable.md#rawlisteners)* + +Defined in node_modules/@types/node/events.d.ts:31 + +**Parameters:** + +Name | Type | +------ | ------ | +`event` | string | symbol | + +**Returns:** *Function[]* + +___ + ### removeAllListeners ▸ **removeAllListeners**(`event?`: string | symbol): *this* @@ -309,7 +359,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[removeAllListeners](../interfaces/sparsereadable.md#removealllisteners)* -Defined in node_modules/@types/node/base.d.ts:904 +Defined in node_modules/@types/node/events.d.ts:27 **Parameters:** @@ -329,7 +379,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[removeListener](../interfaces/sparsereadable.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:903 +Defined in node_modules/@types/node/events.d.ts:25 **Parameters:** @@ -353,7 +403,7 @@ ___ ▸ **run**(): *Promise‹void›* -*Defined in [lib/source-destination/source-destination.ts:132](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L132)* +*Defined in [lib/source-destination/source-destination.ts:155](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L155)* **Returns:** *Promise‹void›* @@ -367,7 +417,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[setMaxListeners](../interfaces/sparsereadable.md#setmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:905 +Defined in node_modules/@types/node/events.d.ts:28 **Parameters:** @@ -385,7 +435,9 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[listenerCount](countingwritable.md#static-listenercount)* -Defined in node_modules/@types/node/base.d.ts:895 +Defined in node_modules/@types/node/events.d.ts:17 + +**`deprecated`** since v4.0.0 **Parameters:** @@ -402,22 +454,22 @@ Name | Type | ### ▪ **progress**: *object* -*Defined in [lib/source-destination/source-destination.ts:130](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L130)* +*Defined in [lib/source-destination/source-destination.ts:153](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L153)* ### bytes • **bytes**: *number* = 0 -*Defined in [lib/source-destination/source-destination.ts:130](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L130)* +*Defined in [lib/source-destination/source-destination.ts:153](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L153)* ### position • **position**: *number* = 0 -*Defined in [lib/source-destination/source-destination.ts:130](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L130)* +*Defined in [lib/source-destination/source-destination.ts:153](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L153)* ### speed • **speed**: *number* = 0 -*Defined in [lib/source-destination/source-destination.ts:130](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L130)* +*Defined in [lib/source-destination/source-destination.ts:153](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L153)* diff --git a/doc/classes/xzsource.md b/doc/classes/xzsource.md index 366d01c1..a0219698 100644 --- a/doc/classes/xzsource.md +++ b/doc/classes/xzsource.md @@ -53,11 +53,13 @@ * [getSize](xzsource.md#protected-getsize) * [listenerCount](xzsource.md#listenercount) * [listeners](xzsource.md#listeners) +* [off](xzsource.md#off) * [on](xzsource.md#on) * [once](xzsource.md#once) * [open](xzsource.md#open) * [prependListener](xzsource.md#prependlistener) * [prependOnceListener](xzsource.md#prependoncelistener) +* [rawListeners](xzsource.md#rawlisteners) * [read](xzsource.md#read) * [removeAllListeners](xzsource.md#removealllisteners) * [removeListener](xzsource.md#removelistener) @@ -74,7 +76,7 @@ *Inherited from [SourceSource](sourcesource.md).[constructor](sourcesource.md#constructor)* -*Defined in [lib/source-destination/source-source.ts:20](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-source.ts#L20)* +*Defined in [lib/source-destination/source-source.ts:20](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-source.ts#L20)* **Parameters:** @@ -92,7 +94,7 @@ Name | Type | *Inherited from [CompressedSource](compressedsource.md).[isSizeEstimated](compressedsource.md#protected-issizeestimated)* -*Defined in [lib/source-destination/compressed-source.ts:45](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/compressed-source.ts#L45)* +*Defined in [lib/source-destination/compressed-source.ts:45](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/compressed-source.ts#L45)* ___ @@ -102,7 +104,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[source](sourcesource.md#protected-source)* -*Defined in [lib/source-destination/source-source.ts:22](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-source.ts#L22)* +*Defined in [lib/source-destination/source-source.ts:22](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-source.ts#L22)* ___ @@ -112,7 +114,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[defaultMaxListeners](countingwritable.md#static-defaultmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:896 +Defined in node_modules/@types/node/events.d.ts:18 ___ @@ -133,7 +135,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[imageExtensions](sourcesource.md#static-imageextensions)* -*Defined in [lib/source-destination/source-destination.ts:252](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L252)* +*Defined in [lib/source-destination/source-destination.ts:275](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L275)* ___ @@ -143,7 +145,7 @@ ___ *Overrides [SourceSource](sourcesource.md).[mimetype](sourcesource.md#static-optional-mimetype)* -*Defined in [lib/source-destination/xz.ts:27](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/xz.ts#L27)* +*Defined in [lib/source-destination/xz.ts:27](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/xz.ts#L27)* ___ @@ -153,7 +155,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[requiresRandomReadableSource](sourcesource.md#static-requiresrandomreadablesource)* -*Defined in [lib/source-destination/source-source.ts:20](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-source.ts#L20)* +*Defined in [lib/source-destination/source-source.ts:20](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-source.ts#L20)* ## Methods @@ -165,7 +167,7 @@ ___ *Overrides [SourceDestination](sourcedestination.md).[_close](sourcedestination.md#protected-_close)* -*Defined in [lib/source-destination/source-source.ts:30](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-source.ts#L30)* +*Defined in [lib/source-destination/source-source.ts:30](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-source.ts#L30)* **Returns:** *Promise‹void›* @@ -179,7 +181,7 @@ ___ *Overrides [SourceSource](sourcesource.md).[_getMetadata](sourcesource.md#protected-_getmetadata)* -*Defined in [lib/source-destination/compressed-source.ts:85](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/compressed-source.ts#L85)* +*Defined in [lib/source-destination/compressed-source.ts:85](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/compressed-source.ts#L85)* **Returns:** *Promise‹[Metadata](../interfaces/metadata.md)›* @@ -193,7 +195,7 @@ ___ *Overrides [SourceDestination](sourcedestination.md).[_open](sourcedestination.md#protected-_open)* -*Defined in [lib/source-destination/source-source.ts:26](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-source.ts#L26)* +*Defined in [lib/source-destination/source-source.ts:26](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-source.ts#L26)* **Returns:** *Promise‹void›* @@ -207,7 +209,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[addListener](../interfaces/sparsereadable.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:898 +Defined in node_modules/@types/node/events.d.ts:20 **Parameters:** @@ -235,7 +237,7 @@ ___ *Overrides [SourceSource](sourcesource.md).[canCreateReadStream](sourcesource.md#cancreatereadstream)* -*Defined in [lib/source-destination/compressed-source.ts:51](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/compressed-source.ts#L51)* +*Defined in [lib/source-destination/compressed-source.ts:51](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/compressed-source.ts#L51)* **Returns:** *Promise‹boolean›* @@ -247,7 +249,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[canCreateSparseReadStream](sourcesource.md#cancreatesparsereadstream)* -*Defined in [lib/source-destination/source-destination.ts:292](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L292)* +*Defined in [lib/source-destination/source-destination.ts:315](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L315)* **Returns:** *Promise‹boolean›* @@ -259,7 +261,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[canCreateSparseWriteStream](sourcesource.md#cancreatesparsewritestream)* -*Defined in [lib/source-destination/source-destination.ts:300](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L300)* +*Defined in [lib/source-destination/source-destination.ts:323](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L323)* **Returns:** *Promise‹boolean›* @@ -271,7 +273,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[canCreateWriteStream](sourcesource.md#cancreatewritestream)* -*Defined in [lib/source-destination/source-destination.ts:296](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L296)* +*Defined in [lib/source-destination/source-destination.ts:319](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L319)* **Returns:** *Promise‹boolean›* @@ -283,7 +285,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[canRead](sourcesource.md#canread)* -*Defined in [lib/source-destination/source-destination.ts:280](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L280)* +*Defined in [lib/source-destination/source-destination.ts:303](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L303)* **Returns:** *Promise‹boolean›* @@ -295,7 +297,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[canWrite](sourcesource.md#canwrite)* -*Defined in [lib/source-destination/source-destination.ts:284](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L284)* +*Defined in [lib/source-destination/source-destination.ts:307](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L307)* **Returns:** *Promise‹boolean›* @@ -307,7 +309,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[close](sourcesource.md#close)* -*Defined in [lib/source-destination/source-destination.ts:368](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L368)* +*Defined in [lib/source-destination/source-destination.ts:391](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L391)* **Returns:** *Promise‹void›* @@ -321,7 +323,7 @@ ___ *Overrides [SourceSource](sourcesource.md).[createReadStream](sourcesource.md#createreadstream)* -*Defined in [lib/source-destination/compressed-source.ts:55](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/compressed-source.ts#L55)* +*Defined in [lib/source-destination/compressed-source.ts:55](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/compressed-source.ts#L55)* **Parameters:** @@ -343,7 +345,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[createSparseReadStream](sourcesource.md#createsparsereadstream)* -*Defined in [lib/source-destination/source-destination.ts:339](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L339)* +*Defined in [lib/source-destination/source-destination.ts:362](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L362)* **Parameters:** @@ -361,7 +363,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[createSparseWriteStream](sourcesource.md#createsparsewritestream)* -*Defined in [lib/source-destination/source-destination.ts:355](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L355)* +*Defined in [lib/source-destination/source-destination.ts:378](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L378)* **Parameters:** @@ -381,7 +383,7 @@ ___ *Overrides [CompressedSource](compressedsource.md).[createTransform](compressedsource.md#protected-abstract-createtransform)* -*Defined in [lib/source-destination/xz.ts:29](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/xz.ts#L29)* +*Defined in [lib/source-destination/xz.ts:29](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/xz.ts#L29)* **Returns:** *Transform* @@ -393,7 +395,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[createVerifier](sourcesource.md#createverifier)* -*Defined in [lib/source-destination/source-destination.ts:383](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L383)* +*Defined in [lib/source-destination/source-destination.ts:406](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L406)* **Parameters:** @@ -412,7 +414,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[createWriteStream](sourcesource.md#createwritestream)* -*Defined in [lib/source-destination/source-destination.ts:349](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L349)* +*Defined in [lib/source-destination/source-destination.ts:372](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L372)* **Parameters:** @@ -434,7 +436,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[emit](../interfaces/sparsereadable.md#emit)* -Defined in node_modules/@types/node/base.d.ts:908 +Defined in node_modules/@types/node/events.d.ts:32 **Parameters:** @@ -455,7 +457,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[eventNames](../interfaces/sparsereadable.md#eventnames)* -Defined in node_modules/@types/node/base.d.ts:909 +Defined in node_modules/@types/node/events.d.ts:33 **Returns:** *Array‹string | symbol›* @@ -467,7 +469,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[getAlignment](sourcesource.md#getalignment)* -*Defined in [lib/source-destination/source-destination.ts:276](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L276)* +*Defined in [lib/source-destination/source-destination.ts:299](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L299)* **Returns:** *number | undefined* @@ -479,7 +481,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[getBlocks](sourcesource.md#getblocks)* -*Defined in [lib/source-destination/source-destination.ts:345](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L345)* +*Defined in [lib/source-destination/source-destination.ts:368](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L368)* **Returns:** *Promise‹[BlocksWithChecksum](../interfaces/blockswithchecksum.md)[]›* @@ -491,7 +493,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[getInnerSource](sourcesource.md#getinnersource)* -*Defined in [lib/source-destination/source-destination.ts:452](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L452)* +*Defined in [lib/source-destination/source-destination.ts:475](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L475)* **Returns:** *Promise‹[SourceDestination](sourcedestination.md)›* @@ -505,7 +507,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[getMaxListeners](../interfaces/sparsereadable.md#getmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:906 +Defined in node_modules/@types/node/events.d.ts:29 **Returns:** *number* @@ -517,7 +519,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[getMetadata](sourcesource.md#getmetadata)* -*Defined in [lib/source-destination/source-destination.ts:304](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L304)* +*Defined in [lib/source-destination/source-destination.ts:327](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L327)* **Returns:** *Promise‹[Metadata](../interfaces/metadata.md)›* @@ -529,7 +531,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[getPartitionTable](sourcesource.md#getpartitiontable)* -*Defined in [lib/source-destination/source-destination.ts:473](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L473)* +*Defined in [lib/source-destination/source-destination.ts:496](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L496)* **Returns:** *Promise‹GetPartitionsResult | undefined›* @@ -541,7 +543,7 @@ ___ *Overrides [CompressedSource](compressedsource.md).[getSize](compressedsource.md#protected-getsize)* -*Defined in [lib/source-destination/xz.ts:33](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/xz.ts#L33)* +*Defined in [lib/source-destination/xz.ts:33](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/xz.ts#L33)* **Returns:** *Promise‹number | undefined›* @@ -555,7 +557,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[listenerCount](../interfaces/sparsereadable.md#listenercount)* -Defined in node_modules/@types/node/base.d.ts:910 +Defined in node_modules/@types/node/events.d.ts:34 **Parameters:** @@ -575,7 +577,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[listeners](../interfaces/sparsereadable.md#listeners)* -Defined in node_modules/@types/node/base.d.ts:907 +Defined in node_modules/@types/node/events.d.ts:30 **Parameters:** @@ -587,6 +589,34 @@ Name | Type | ___ +### off + +▸ **off**(`event`: string | symbol, `listener`: function): *this* + +*Inherited from [CountingWritable](countingwritable.md).[off](countingwritable.md#off)* + +*Overrides [SparseReadable](../interfaces/sparsereadable.md).[off](../interfaces/sparsereadable.md#off)* + +Defined in node_modules/@types/node/events.d.ts:26 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* + +**Parameters:** + +Name | Type | +------ | ------ | +`...args` | any[] | + +**Returns:** *this* + +___ + ### on ▸ **on**(`event`: string | symbol, `listener`: function): *this* @@ -595,7 +625,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[on](../interfaces/sparsereadable.md#on)* -Defined in node_modules/@types/node/base.d.ts:899 +Defined in node_modules/@types/node/events.d.ts:21 **Parameters:** @@ -623,7 +653,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[once](../interfaces/sparsereadable.md#once)* -Defined in node_modules/@types/node/base.d.ts:900 +Defined in node_modules/@types/node/events.d.ts:22 **Parameters:** @@ -649,7 +679,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[open](sourcesource.md#open)* -*Defined in [lib/source-destination/source-destination.ts:361](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L361)* +*Defined in [lib/source-destination/source-destination.ts:384](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L384)* **Returns:** *Promise‹void›* @@ -663,7 +693,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[prependListener](../interfaces/sparsereadable.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:901 +Defined in node_modules/@types/node/events.d.ts:23 **Parameters:** @@ -691,7 +721,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[prependOnceListener](../interfaces/sparsereadable.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:902 +Defined in node_modules/@types/node/events.d.ts:24 **Parameters:** @@ -711,13 +741,33 @@ Name | Type | ___ +### rawListeners + +▸ **rawListeners**(`event`: string | symbol): *Function[]* + +*Inherited from [CountingWritable](countingwritable.md).[rawListeners](countingwritable.md#rawlisteners)* + +*Overrides [SparseReadable](../interfaces/sparsereadable.md).[rawListeners](../interfaces/sparsereadable.md#rawlisteners)* + +Defined in node_modules/@types/node/events.d.ts:31 + +**Parameters:** + +Name | Type | +------ | ------ | +`event` | string | symbol | + +**Returns:** *Function[]* + +___ + ### read ▸ **read**(`_buffer`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer), `_bufferOffset`: number, `_length`: number, `_sourceOffset`: number): *Promise‹ReadResult›* *Inherited from [SourceSource](sourcesource.md).[read](sourcesource.md#read)* -*Defined in [lib/source-destination/source-destination.ts:315](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L315)* +*Defined in [lib/source-destination/source-destination.ts:338](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L338)* **Parameters:** @@ -740,7 +790,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[removeAllListeners](../interfaces/sparsereadable.md#removealllisteners)* -Defined in node_modules/@types/node/base.d.ts:904 +Defined in node_modules/@types/node/events.d.ts:27 **Parameters:** @@ -760,7 +810,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[removeListener](../interfaces/sparsereadable.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:903 +Defined in node_modules/@types/node/events.d.ts:25 **Parameters:** @@ -788,7 +838,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[setMaxListeners](../interfaces/sparsereadable.md#setmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:905 +Defined in node_modules/@types/node/events.d.ts:28 **Parameters:** @@ -806,7 +856,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[write](sourcesource.md#write)* -*Defined in [lib/source-destination/source-destination.ts:324](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L324)* +*Defined in [lib/source-destination/source-destination.ts:347](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L347)* **Parameters:** @@ -827,7 +877,9 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[listenerCount](countingwritable.md#static-listenercount)* -Defined in node_modules/@types/node/base.d.ts:895 +Defined in node_modules/@types/node/events.d.ts:17 + +**`deprecated`** since v4.0.0 **Parameters:** @@ -846,7 +898,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[register](sourcesource.md#static-register)* -*Defined in [lib/source-destination/source-destination.ts:270](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L270)* +*Defined in [lib/source-destination/source-destination.ts:293](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L293)* **Parameters:** diff --git a/doc/classes/zipsource.md b/doc/classes/zipsource.md index e9015b3d..fe7dfad5 100644 --- a/doc/classes/zipsource.md +++ b/doc/classes/zipsource.md @@ -54,12 +54,14 @@ * [getPartitionTable](zipsource.md#getpartitiontable) * [listenerCount](zipsource.md#listenercount) * [listeners](zipsource.md#listeners) +* [off](zipsource.md#off) * [on](zipsource.md#on) * [once](zipsource.md#once) * [open](zipsource.md#open) * [prepare](zipsource.md#private-prepare) * [prependListener](zipsource.md#prependlistener) * [prependOnceListener](zipsource.md#prependoncelistener) +* [rawListeners](zipsource.md#rawlisteners) * [read](zipsource.md#read) * [removeAllListeners](zipsource.md#removealllisteners) * [removeListener](zipsource.md#removelistener) @@ -76,7 +78,7 @@ *Overrides [SourceSource](sourcesource.md).[constructor](sourcesource.md#constructor)* -*Defined in [lib/source-destination/zip.ts:365](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/zip.ts#L365)* +*Defined in [lib/source-destination/zip.ts:365](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/zip.ts#L365)* **Parameters:** @@ -102,7 +104,7 @@ Name | Type | • **implementation**: *[RandomAccessZipSource](randomaccesszipsource.md) | [StreamZipSource](streamzipsource.md)* -*Defined in [lib/source-destination/zip.ts:365](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/zip.ts#L365)* +*Defined in [lib/source-destination/zip.ts:365](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/zip.ts#L365)* ___ @@ -110,7 +112,7 @@ ___ • **match**: *function* -*Defined in [lib/source-destination/zip.ts:370](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/zip.ts#L370)* +*Defined in [lib/source-destination/zip.ts:370](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/zip.ts#L370)* #### Type declaration: @@ -128,7 +130,7 @@ ___ • **preferStreamSource**: *boolean* -*Defined in [lib/source-destination/zip.ts:369](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/zip.ts#L369)* +*Defined in [lib/source-destination/zip.ts:369](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/zip.ts#L369)* ___ @@ -136,7 +138,7 @@ ___ • **ready**: *Promise‹void›* -*Defined in [lib/source-destination/zip.ts:364](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/zip.ts#L364)* +*Defined in [lib/source-destination/zip.ts:364](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/zip.ts#L364)* ___ @@ -146,7 +148,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[source](sourcesource.md#protected-source)* -*Defined in [lib/source-destination/source-source.ts:22](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-source.ts#L22)* +*Defined in [lib/source-destination/source-source.ts:22](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-source.ts#L22)* ___ @@ -156,7 +158,7 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[defaultMaxListeners](countingwritable.md#static-defaultmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:896 +Defined in node_modules/@types/node/events.d.ts:18 ___ @@ -177,7 +179,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[imageExtensions](sourcesource.md#static-imageextensions)* -*Defined in [lib/source-destination/source-destination.ts:252](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L252)* +*Defined in [lib/source-destination/source-destination.ts:275](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L275)* ___ @@ -187,7 +189,7 @@ ___ *Overrides [SourceSource](sourcesource.md).[mimetype](sourcesource.md#static-optional-mimetype)* -*Defined in [lib/source-destination/zip.ts:363](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/zip.ts#L363)* +*Defined in [lib/source-destination/zip.ts:363](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/zip.ts#L363)* ___ @@ -197,7 +199,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[requiresRandomReadableSource](sourcesource.md#static-requiresrandomreadablesource)* -*Defined in [lib/source-destination/source-source.ts:20](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-source.ts#L20)* +*Defined in [lib/source-destination/source-source.ts:20](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-source.ts#L20)* ## Methods @@ -209,7 +211,7 @@ ___ *Overrides [SourceDestination](sourcedestination.md).[_close](sourcedestination.md#protected-_close)* -*Defined in [lib/source-destination/source-source.ts:30](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-source.ts#L30)* +*Defined in [lib/source-destination/source-source.ts:30](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-source.ts#L30)* **Returns:** *Promise‹void›* @@ -221,7 +223,7 @@ ___ *Overrides [SourceSource](sourcesource.md).[_getMetadata](sourcesource.md#protected-_getmetadata)* -*Defined in [lib/source-destination/zip.ts:428](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/zip.ts#L428)* +*Defined in [lib/source-destination/zip.ts:428](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/zip.ts#L428)* **Returns:** *Promise‹[Metadata](../interfaces/metadata.md)›* @@ -235,7 +237,7 @@ ___ *Overrides [SourceDestination](sourcedestination.md).[_open](sourcedestination.md#protected-_open)* -*Defined in [lib/source-destination/source-source.ts:26](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-source.ts#L26)* +*Defined in [lib/source-destination/source-source.ts:26](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-source.ts#L26)* **Returns:** *Promise‹void›* @@ -249,7 +251,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[addListener](../interfaces/sparsereadable.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:898 +Defined in node_modules/@types/node/events.d.ts:20 **Parameters:** @@ -275,7 +277,7 @@ ___ *Overrides [SourceSource](sourcesource.md).[canCreateReadStream](sourcesource.md#cancreatereadstream)* -*Defined in [lib/source-destination/zip.ts:384](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/zip.ts#L384)* +*Defined in [lib/source-destination/zip.ts:384](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/zip.ts#L384)* **Returns:** *Promise‹boolean›* @@ -287,7 +289,7 @@ ___ *Overrides [SourceSource](sourcesource.md).[canCreateSparseReadStream](sourcesource.md#cancreatesparsereadstream)* -*Defined in [lib/source-destination/zip.ts:394](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/zip.ts#L394)* +*Defined in [lib/source-destination/zip.ts:394](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/zip.ts#L394)* **Returns:** *Promise‹boolean›* @@ -299,7 +301,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[canCreateSparseWriteStream](sourcesource.md#cancreatesparsewritestream)* -*Defined in [lib/source-destination/source-destination.ts:300](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L300)* +*Defined in [lib/source-destination/source-destination.ts:323](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L323)* **Returns:** *Promise‹boolean›* @@ -311,7 +313,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[canCreateWriteStream](sourcesource.md#cancreatewritestream)* -*Defined in [lib/source-destination/source-destination.ts:296](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L296)* +*Defined in [lib/source-destination/source-destination.ts:319](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L319)* **Returns:** *Promise‹boolean›* @@ -323,7 +325,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[canRead](sourcesource.md#canread)* -*Defined in [lib/source-destination/source-destination.ts:280](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L280)* +*Defined in [lib/source-destination/source-destination.ts:303](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L303)* **Returns:** *Promise‹boolean›* @@ -335,7 +337,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[canWrite](sourcesource.md#canwrite)* -*Defined in [lib/source-destination/source-destination.ts:284](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L284)* +*Defined in [lib/source-destination/source-destination.ts:307](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L307)* **Returns:** *Promise‹boolean›* @@ -347,7 +349,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[close](sourcesource.md#close)* -*Defined in [lib/source-destination/source-destination.ts:368](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L368)* +*Defined in [lib/source-destination/source-destination.ts:391](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L391)* **Returns:** *Promise‹void›* @@ -359,7 +361,7 @@ ___ *Overrides [SourceSource](sourcesource.md).[createReadStream](sourcesource.md#createreadstream)* -*Defined in [lib/source-destination/zip.ts:399](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/zip.ts#L399)* +*Defined in [lib/source-destination/zip.ts:399](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/zip.ts#L399)* **Parameters:** @@ -383,7 +385,7 @@ ___ *Overrides [SourceSource](sourcesource.md).[createSparseReadStream](sourcesource.md#createsparsereadstream)* -*Defined in [lib/source-destination/zip.ts:415](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/zip.ts#L415)* +*Defined in [lib/source-destination/zip.ts:415](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/zip.ts#L415)* **Parameters:** @@ -405,7 +407,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[createSparseWriteStream](sourcesource.md#createsparsewritestream)* -*Defined in [lib/source-destination/source-destination.ts:355](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L355)* +*Defined in [lib/source-destination/source-destination.ts:378](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L378)* **Parameters:** @@ -425,7 +427,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[createVerifier](sourcesource.md#createverifier)* -*Defined in [lib/source-destination/source-destination.ts:383](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L383)* +*Defined in [lib/source-destination/source-destination.ts:406](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L406)* **Parameters:** @@ -444,7 +446,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[createWriteStream](sourcesource.md#createwritestream)* -*Defined in [lib/source-destination/source-destination.ts:349](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L349)* +*Defined in [lib/source-destination/source-destination.ts:372](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L372)* **Parameters:** @@ -466,7 +468,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[emit](../interfaces/sparsereadable.md#emit)* -Defined in node_modules/@types/node/base.d.ts:908 +Defined in node_modules/@types/node/events.d.ts:32 **Parameters:** @@ -487,7 +489,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[eventNames](../interfaces/sparsereadable.md#eventnames)* -Defined in node_modules/@types/node/base.d.ts:909 +Defined in node_modules/@types/node/events.d.ts:33 **Returns:** *Array‹string | symbol›* @@ -499,7 +501,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[getAlignment](sourcesource.md#getalignment)* -*Defined in [lib/source-destination/source-destination.ts:276](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L276)* +*Defined in [lib/source-destination/source-destination.ts:299](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L299)* **Returns:** *number | undefined* @@ -511,7 +513,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[getBlocks](sourcesource.md#getblocks)* -*Defined in [lib/source-destination/source-destination.ts:345](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L345)* +*Defined in [lib/source-destination/source-destination.ts:368](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L368)* **Returns:** *Promise‹[BlocksWithChecksum](../interfaces/blockswithchecksum.md)[]›* @@ -523,7 +525,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[getInnerSource](sourcesource.md#getinnersource)* -*Defined in [lib/source-destination/source-destination.ts:452](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L452)* +*Defined in [lib/source-destination/source-destination.ts:475](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L475)* **Returns:** *Promise‹[SourceDestination](sourcedestination.md)›* @@ -537,7 +539,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[getMaxListeners](../interfaces/sparsereadable.md#getmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:906 +Defined in node_modules/@types/node/events.d.ts:29 **Returns:** *number* @@ -549,7 +551,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[getMetadata](sourcesource.md#getmetadata)* -*Defined in [lib/source-destination/source-destination.ts:304](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L304)* +*Defined in [lib/source-destination/source-destination.ts:327](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L327)* **Returns:** *Promise‹[Metadata](../interfaces/metadata.md)›* @@ -561,7 +563,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[getPartitionTable](sourcesource.md#getpartitiontable)* -*Defined in [lib/source-destination/source-destination.ts:473](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L473)* +*Defined in [lib/source-destination/source-destination.ts:496](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L496)* **Returns:** *Promise‹GetPartitionsResult | undefined›* @@ -575,7 +577,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[listenerCount](../interfaces/sparsereadable.md#listenercount)* -Defined in node_modules/@types/node/base.d.ts:910 +Defined in node_modules/@types/node/events.d.ts:34 **Parameters:** @@ -595,7 +597,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[listeners](../interfaces/sparsereadable.md#listeners)* -Defined in node_modules/@types/node/base.d.ts:907 +Defined in node_modules/@types/node/events.d.ts:30 **Parameters:** @@ -607,6 +609,34 @@ Name | Type | ___ +### off + +▸ **off**(`event`: string | symbol, `listener`: function): *this* + +*Inherited from [CountingWritable](countingwritable.md).[off](countingwritable.md#off)* + +*Overrides [SparseReadable](../interfaces/sparsereadable.md).[off](../interfaces/sparsereadable.md#off)* + +Defined in node_modules/@types/node/events.d.ts:26 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* + +**Parameters:** + +Name | Type | +------ | ------ | +`...args` | any[] | + +**Returns:** *this* + +___ + ### on ▸ **on**(`event`: string | symbol, `listener`: function): *this* @@ -615,7 +645,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[on](../interfaces/sparsereadable.md#on)* -Defined in node_modules/@types/node/base.d.ts:899 +Defined in node_modules/@types/node/events.d.ts:21 **Parameters:** @@ -643,7 +673,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[once](../interfaces/sparsereadable.md#once)* -Defined in node_modules/@types/node/base.d.ts:900 +Defined in node_modules/@types/node/events.d.ts:22 **Parameters:** @@ -669,7 +699,7 @@ ___ *Overrides [SourceSource](sourcesource.md).[open](sourcesource.md#open)* -*Defined in [lib/source-destination/zip.ts:389](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/zip.ts#L389)* +*Defined in [lib/source-destination/zip.ts:389](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/zip.ts#L389)* **Returns:** *Promise‹void›* @@ -679,7 +709,7 @@ ___ ▸ **prepare**(): *Promise‹void›* -*Defined in [lib/source-destination/zip.ts:376](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/zip.ts#L376)* +*Defined in [lib/source-destination/zip.ts:376](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/zip.ts#L376)* **Returns:** *Promise‹void›* @@ -693,7 +723,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[prependListener](../interfaces/sparsereadable.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:901 +Defined in node_modules/@types/node/events.d.ts:23 **Parameters:** @@ -721,7 +751,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[prependOnceListener](../interfaces/sparsereadable.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:902 +Defined in node_modules/@types/node/events.d.ts:24 **Parameters:** @@ -741,13 +771,33 @@ Name | Type | ___ +### rawListeners + +▸ **rawListeners**(`event`: string | symbol): *Function[]* + +*Inherited from [CountingWritable](countingwritable.md).[rawListeners](countingwritable.md#rawlisteners)* + +*Overrides [SparseReadable](../interfaces/sparsereadable.md).[rawListeners](../interfaces/sparsereadable.md#rawlisteners)* + +Defined in node_modules/@types/node/events.d.ts:31 + +**Parameters:** + +Name | Type | +------ | ------ | +`event` | string | symbol | + +**Returns:** *Function[]* + +___ + ### read ▸ **read**(`_buffer`: [Buffer](../interfaces/alignedlockablebuffer.md#buffer), `_bufferOffset`: number, `_length`: number, `_sourceOffset`: number): *Promise‹ReadResult›* *Inherited from [SourceSource](sourcesource.md).[read](sourcesource.md#read)* -*Defined in [lib/source-destination/source-destination.ts:315](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L315)* +*Defined in [lib/source-destination/source-destination.ts:338](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L338)* **Parameters:** @@ -770,7 +820,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[removeAllListeners](../interfaces/sparsereadable.md#removealllisteners)* -Defined in node_modules/@types/node/base.d.ts:904 +Defined in node_modules/@types/node/events.d.ts:27 **Parameters:** @@ -790,7 +840,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[removeListener](../interfaces/sparsereadable.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:903 +Defined in node_modules/@types/node/events.d.ts:25 **Parameters:** @@ -818,7 +868,7 @@ ___ *Overrides [SparseReadable](../interfaces/sparsereadable.md).[setMaxListeners](../interfaces/sparsereadable.md#setmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:905 +Defined in node_modules/@types/node/events.d.ts:28 **Parameters:** @@ -836,7 +886,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[write](sourcesource.md#write)* -*Defined in [lib/source-destination/source-destination.ts:324](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L324)* +*Defined in [lib/source-destination/source-destination.ts:347](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L347)* **Parameters:** @@ -857,7 +907,9 @@ ___ *Inherited from [CountingWritable](countingwritable.md).[listenerCount](countingwritable.md#static-listenercount)* -Defined in node_modules/@types/node/base.d.ts:895 +Defined in node_modules/@types/node/events.d.ts:17 + +**`deprecated`** since v4.0.0 **Parameters:** @@ -876,7 +928,7 @@ ___ *Inherited from [SourceSource](sourcesource.md).[register](sourcesource.md#static-register)* -*Defined in [lib/source-destination/source-destination.ts:270](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L270)* +*Defined in [lib/source-destination/source-destination.ts:293](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L293)* **Parameters:** diff --git a/doc/interfaces/adaptersourcedestination.md b/doc/interfaces/adaptersourcedestination.md index 6207eda5..309d2605 100644 --- a/doc/interfaces/adaptersourcedestination.md +++ b/doc/interfaces/adaptersourcedestination.md @@ -58,11 +58,13 @@ * [getPartitionTable](adaptersourcedestination.md#getpartitiontable) * [listenerCount](adaptersourcedestination.md#listenercount) * [listeners](adaptersourcedestination.md#listeners) +* [off](adaptersourcedestination.md#off) * [on](adaptersourcedestination.md#on) * [once](adaptersourcedestination.md#once) * [open](adaptersourcedestination.md#open) * [prependListener](adaptersourcedestination.md#prependlistener) * [prependOnceListener](adaptersourcedestination.md#prependoncelistener) +* [rawListeners](adaptersourcedestination.md#rawlisteners) * [read](adaptersourcedestination.md#read) * [removeAllListeners](adaptersourcedestination.md#removealllisteners) * [removeListener](adaptersourcedestination.md#removelistener) @@ -77,7 +79,7 @@ • **description**: *string* -*Defined in [lib/scanner/adapters/adapter.ts:27](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/scanner/adapters/adapter.ts#L27)* +*Defined in [lib/scanner/adapters/adapter.ts:27](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/scanner/adapters/adapter.ts#L27)* ___ @@ -85,7 +87,7 @@ ___ • **device**: *string | null* -*Defined in [lib/scanner/adapters/adapter.ts:24](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/scanner/adapters/adapter.ts#L24)* +*Defined in [lib/scanner/adapters/adapter.ts:24](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/scanner/adapters/adapter.ts#L24)* ___ @@ -93,7 +95,7 @@ ___ • **devicePath**: *string | null* -*Defined in [lib/scanner/adapters/adapter.ts:25](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/scanner/adapters/adapter.ts#L25)* +*Defined in [lib/scanner/adapters/adapter.ts:25](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/scanner/adapters/adapter.ts#L25)* ___ @@ -101,7 +103,7 @@ ___ • **emitsProgress**: *boolean* -*Defined in [lib/scanner/adapters/adapter.ts:30](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/scanner/adapters/adapter.ts#L30)* +*Defined in [lib/scanner/adapters/adapter.ts:30](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/scanner/adapters/adapter.ts#L30)* ___ @@ -109,7 +111,7 @@ ___ • **isSystem**: *boolean* -*Defined in [lib/scanner/adapters/adapter.ts:26](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/scanner/adapters/adapter.ts#L26)* +*Defined in [lib/scanner/adapters/adapter.ts:26](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/scanner/adapters/adapter.ts#L26)* ___ @@ -117,7 +119,7 @@ ___ • **mountpoints**: *Array‹object›* -*Defined in [lib/scanner/adapters/adapter.ts:28](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/scanner/adapters/adapter.ts#L28)* +*Defined in [lib/scanner/adapters/adapter.ts:28](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/scanner/adapters/adapter.ts#L28)* ___ @@ -125,7 +127,7 @@ ___ • **raw**: *string | null* -*Defined in [lib/scanner/adapters/adapter.ts:23](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/scanner/adapters/adapter.ts#L23)* +*Defined in [lib/scanner/adapters/adapter.ts:23](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/scanner/adapters/adapter.ts#L23)* ___ @@ -133,7 +135,7 @@ ___ • **size**: *number | null* -*Defined in [lib/scanner/adapters/adapter.ts:29](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/scanner/adapters/adapter.ts#L29)* +*Defined in [lib/scanner/adapters/adapter.ts:29](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/scanner/adapters/adapter.ts#L29)* ___ @@ -143,7 +145,7 @@ ___ *Inherited from [CountingWritable](../classes/countingwritable.md).[defaultMaxListeners](../classes/countingwritable.md#static-defaultmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:896 +Defined in node_modules/@types/node/events.d.ts:18 ___ @@ -164,7 +166,7 @@ ___ *Inherited from [SourceSource](../classes/sourcesource.md).[imageExtensions](../classes/sourcesource.md#static-imageextensions)* -*Defined in [lib/source-destination/source-destination.ts:252](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L252)* +*Defined in [lib/source-destination/source-destination.ts:275](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L275)* ___ @@ -174,7 +176,7 @@ ___ *Inherited from [SourceSource](../classes/sourcesource.md).[mimetype](../classes/sourcesource.md#static-optional-mimetype)* -*Defined in [lib/source-destination/source-destination.ts:264](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L264)* +*Defined in [lib/source-destination/source-destination.ts:287](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L287)* ## Methods @@ -184,7 +186,7 @@ ___ *Inherited from [SourceDestination](../classes/sourcedestination.md).[_close](../classes/sourcedestination.md#protected-_close)* -*Defined in [lib/source-destination/source-destination.ts:379](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L379)* +*Defined in [lib/source-destination/source-destination.ts:402](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L402)* **Returns:** *Promise‹void›* @@ -196,7 +198,7 @@ ___ *Inherited from [SourceSource](../classes/sourcesource.md).[_getMetadata](../classes/sourcesource.md#protected-_getmetadata)* -*Defined in [lib/source-destination/source-destination.ts:311](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L311)* +*Defined in [lib/source-destination/source-destination.ts:334](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L334)* **Returns:** *Promise‹[Metadata](metadata.md)›* @@ -208,7 +210,7 @@ ___ *Inherited from [SourceDestination](../classes/sourcedestination.md).[_open](../classes/sourcedestination.md#protected-_open)* -*Defined in [lib/source-destination/source-destination.ts:375](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L375)* +*Defined in [lib/source-destination/source-destination.ts:398](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L398)* **Returns:** *Promise‹void›* @@ -222,7 +224,7 @@ ___ *Overrides [SparseReadable](sparsereadable.md).[addListener](sparsereadable.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:898 +Defined in node_modules/@types/node/events.d.ts:20 **Parameters:** @@ -248,7 +250,7 @@ ___ *Inherited from [SourceSource](../classes/sourcesource.md).[canCreateReadStream](../classes/sourcesource.md#cancreatereadstream)* -*Defined in [lib/source-destination/source-destination.ts:288](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L288)* +*Defined in [lib/source-destination/source-destination.ts:311](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L311)* **Returns:** *Promise‹boolean›* @@ -260,7 +262,7 @@ ___ *Inherited from [SourceSource](../classes/sourcesource.md).[canCreateSparseReadStream](../classes/sourcesource.md#cancreatesparsereadstream)* -*Defined in [lib/source-destination/source-destination.ts:292](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L292)* +*Defined in [lib/source-destination/source-destination.ts:315](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L315)* **Returns:** *Promise‹boolean›* @@ -272,7 +274,7 @@ ___ *Inherited from [SourceSource](../classes/sourcesource.md).[canCreateSparseWriteStream](../classes/sourcesource.md#cancreatesparsewritestream)* -*Defined in [lib/source-destination/source-destination.ts:300](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L300)* +*Defined in [lib/source-destination/source-destination.ts:323](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L323)* **Returns:** *Promise‹boolean›* @@ -284,7 +286,7 @@ ___ *Inherited from [SourceSource](../classes/sourcesource.md).[canCreateWriteStream](../classes/sourcesource.md#cancreatewritestream)* -*Defined in [lib/source-destination/source-destination.ts:296](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L296)* +*Defined in [lib/source-destination/source-destination.ts:319](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L319)* **Returns:** *Promise‹boolean›* @@ -296,7 +298,7 @@ ___ *Inherited from [SourceSource](../classes/sourcesource.md).[canRead](../classes/sourcesource.md#canread)* -*Defined in [lib/source-destination/source-destination.ts:280](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L280)* +*Defined in [lib/source-destination/source-destination.ts:303](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L303)* **Returns:** *Promise‹boolean›* @@ -308,7 +310,7 @@ ___ *Inherited from [SourceSource](../classes/sourcesource.md).[canWrite](../classes/sourcesource.md#canwrite)* -*Defined in [lib/source-destination/source-destination.ts:284](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L284)* +*Defined in [lib/source-destination/source-destination.ts:307](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L307)* **Returns:** *Promise‹boolean›* @@ -320,7 +322,7 @@ ___ *Inherited from [SourceSource](../classes/sourcesource.md).[close](../classes/sourcesource.md#close)* -*Defined in [lib/source-destination/source-destination.ts:368](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L368)* +*Defined in [lib/source-destination/source-destination.ts:391](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L391)* **Returns:** *Promise‹void›* @@ -332,7 +334,7 @@ ___ *Inherited from [SourceSource](../classes/sourcesource.md).[createReadStream](../classes/sourcesource.md#createreadstream)* -*Defined in [lib/source-destination/source-destination.ts:333](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L333)* +*Defined in [lib/source-destination/source-destination.ts:356](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L356)* **Parameters:** @@ -350,7 +352,7 @@ ___ *Inherited from [SourceSource](../classes/sourcesource.md).[createSparseReadStream](../classes/sourcesource.md#createsparsereadstream)* -*Defined in [lib/source-destination/source-destination.ts:339](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L339)* +*Defined in [lib/source-destination/source-destination.ts:362](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L362)* **Parameters:** @@ -368,7 +370,7 @@ ___ *Inherited from [SourceSource](../classes/sourcesource.md).[createSparseWriteStream](../classes/sourcesource.md#createsparsewritestream)* -*Defined in [lib/source-destination/source-destination.ts:355](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L355)* +*Defined in [lib/source-destination/source-destination.ts:378](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L378)* **Parameters:** @@ -388,7 +390,7 @@ ___ *Inherited from [SourceSource](../classes/sourcesource.md).[createVerifier](../classes/sourcesource.md#createverifier)* -*Defined in [lib/source-destination/source-destination.ts:383](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L383)* +*Defined in [lib/source-destination/source-destination.ts:406](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L406)* **Parameters:** @@ -407,7 +409,7 @@ ___ *Inherited from [SourceSource](../classes/sourcesource.md).[createWriteStream](../classes/sourcesource.md#createwritestream)* -*Defined in [lib/source-destination/source-destination.ts:349](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L349)* +*Defined in [lib/source-destination/source-destination.ts:372](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L372)* **Parameters:** @@ -429,7 +431,7 @@ ___ *Overrides [SparseReadable](sparsereadable.md).[emit](sparsereadable.md#emit)* -Defined in node_modules/@types/node/base.d.ts:908 +Defined in node_modules/@types/node/events.d.ts:32 **Parameters:** @@ -450,7 +452,7 @@ ___ *Overrides [SparseReadable](sparsereadable.md).[eventNames](sparsereadable.md#eventnames)* -Defined in node_modules/@types/node/base.d.ts:909 +Defined in node_modules/@types/node/events.d.ts:33 **Returns:** *Array‹string | symbol›* @@ -462,7 +464,7 @@ ___ *Inherited from [SourceSource](../classes/sourcesource.md).[getAlignment](../classes/sourcesource.md#getalignment)* -*Defined in [lib/source-destination/source-destination.ts:276](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L276)* +*Defined in [lib/source-destination/source-destination.ts:299](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L299)* **Returns:** *number | undefined* @@ -474,7 +476,7 @@ ___ *Inherited from [SourceSource](../classes/sourcesource.md).[getBlocks](../classes/sourcesource.md#getblocks)* -*Defined in [lib/source-destination/source-destination.ts:345](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L345)* +*Defined in [lib/source-destination/source-destination.ts:368](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L368)* **Returns:** *Promise‹[BlocksWithChecksum](blockswithchecksum.md)[]›* @@ -486,7 +488,7 @@ ___ *Inherited from [SourceSource](../classes/sourcesource.md).[getInnerSource](../classes/sourcesource.md#getinnersource)* -*Defined in [lib/source-destination/source-destination.ts:452](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L452)* +*Defined in [lib/source-destination/source-destination.ts:475](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L475)* **Returns:** *Promise‹[SourceDestination](../classes/sourcedestination.md)›* @@ -500,7 +502,7 @@ ___ *Overrides [SparseReadable](sparsereadable.md).[getMaxListeners](sparsereadable.md#getmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:906 +Defined in node_modules/@types/node/events.d.ts:29 **Returns:** *number* @@ -512,7 +514,7 @@ ___ *Inherited from [SourceSource](../classes/sourcesource.md).[getMetadata](../classes/sourcesource.md#getmetadata)* -*Defined in [lib/source-destination/source-destination.ts:304](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L304)* +*Defined in [lib/source-destination/source-destination.ts:327](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L327)* **Returns:** *Promise‹[Metadata](metadata.md)›* @@ -524,7 +526,7 @@ ___ *Inherited from [SourceSource](../classes/sourcesource.md).[getPartitionTable](../classes/sourcesource.md#getpartitiontable)* -*Defined in [lib/source-destination/source-destination.ts:473](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L473)* +*Defined in [lib/source-destination/source-destination.ts:496](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L496)* **Returns:** *Promise‹GetPartitionsResult | undefined›* @@ -538,7 +540,7 @@ ___ *Overrides [SparseReadable](sparsereadable.md).[listenerCount](sparsereadable.md#listenercount)* -Defined in node_modules/@types/node/base.d.ts:910 +Defined in node_modules/@types/node/events.d.ts:34 **Parameters:** @@ -558,7 +560,7 @@ ___ *Overrides [SparseReadable](sparsereadable.md).[listeners](sparsereadable.md#listeners)* -Defined in node_modules/@types/node/base.d.ts:907 +Defined in node_modules/@types/node/events.d.ts:30 **Parameters:** @@ -570,6 +572,34 @@ Name | Type | ___ +### off + +▸ **off**(`event`: string | symbol, `listener`: function): *this* + +*Inherited from [CountingWritable](../classes/countingwritable.md).[off](../classes/countingwritable.md#off)* + +*Overrides [SparseReadable](sparsereadable.md).[off](sparsereadable.md#off)* + +Defined in node_modules/@types/node/events.d.ts:26 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* + +**Parameters:** + +Name | Type | +------ | ------ | +`...args` | any[] | + +**Returns:** *this* + +___ + ### on ▸ **on**(`event`: string | symbol, `listener`: function): *this* @@ -578,7 +608,7 @@ ___ *Overrides [SparseReadable](sparsereadable.md).[on](sparsereadable.md#on)* -Defined in node_modules/@types/node/base.d.ts:899 +Defined in node_modules/@types/node/events.d.ts:21 **Parameters:** @@ -606,7 +636,7 @@ ___ *Overrides [SparseReadable](sparsereadable.md).[once](sparsereadable.md#once)* -Defined in node_modules/@types/node/base.d.ts:900 +Defined in node_modules/@types/node/events.d.ts:22 **Parameters:** @@ -632,7 +662,7 @@ ___ *Inherited from [SourceSource](../classes/sourcesource.md).[open](../classes/sourcesource.md#open)* -*Defined in [lib/source-destination/source-destination.ts:361](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L361)* +*Defined in [lib/source-destination/source-destination.ts:384](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L384)* **Returns:** *Promise‹void›* @@ -646,7 +676,7 @@ ___ *Overrides [SparseReadable](sparsereadable.md).[prependListener](sparsereadable.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:901 +Defined in node_modules/@types/node/events.d.ts:23 **Parameters:** @@ -674,7 +704,7 @@ ___ *Overrides [SparseReadable](sparsereadable.md).[prependOnceListener](sparsereadable.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:902 +Defined in node_modules/@types/node/events.d.ts:24 **Parameters:** @@ -694,13 +724,33 @@ Name | Type | ___ +### rawListeners + +▸ **rawListeners**(`event`: string | symbol): *Function[]* + +*Inherited from [CountingWritable](../classes/countingwritable.md).[rawListeners](../classes/countingwritable.md#rawlisteners)* + +*Overrides [SparseReadable](sparsereadable.md).[rawListeners](sparsereadable.md#rawlisteners)* + +Defined in node_modules/@types/node/events.d.ts:31 + +**Parameters:** + +Name | Type | +------ | ------ | +`event` | string | symbol | + +**Returns:** *Function[]* + +___ + ### read ▸ **read**(`_buffer`: [Buffer](alignedlockablebuffer.md#buffer), `_bufferOffset`: number, `_length`: number, `_sourceOffset`: number): *Promise‹ReadResult›* *Inherited from [SourceSource](../classes/sourcesource.md).[read](../classes/sourcesource.md#read)* -*Defined in [lib/source-destination/source-destination.ts:315](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L315)* +*Defined in [lib/source-destination/source-destination.ts:338](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L338)* **Parameters:** @@ -723,7 +773,7 @@ ___ *Overrides [SparseReadable](sparsereadable.md).[removeAllListeners](sparsereadable.md#removealllisteners)* -Defined in node_modules/@types/node/base.d.ts:904 +Defined in node_modules/@types/node/events.d.ts:27 **Parameters:** @@ -743,7 +793,7 @@ ___ *Overrides [SparseReadable](sparsereadable.md).[removeListener](sparsereadable.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:903 +Defined in node_modules/@types/node/events.d.ts:25 **Parameters:** @@ -771,7 +821,7 @@ ___ *Overrides [SparseReadable](sparsereadable.md).[setMaxListeners](sparsereadable.md#setmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:905 +Defined in node_modules/@types/node/events.d.ts:28 **Parameters:** @@ -789,7 +839,7 @@ ___ *Inherited from [SourceSource](../classes/sourcesource.md).[write](../classes/sourcesource.md#write)* -*Defined in [lib/source-destination/source-destination.ts:324](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L324)* +*Defined in [lib/source-destination/source-destination.ts:347](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L347)* **Parameters:** @@ -810,7 +860,9 @@ ___ *Inherited from [CountingWritable](../classes/countingwritable.md).[listenerCount](../classes/countingwritable.md#static-listenercount)* -Defined in node_modules/@types/node/base.d.ts:895 +Defined in node_modules/@types/node/events.d.ts:17 + +**`deprecated`** since v4.0.0 **Parameters:** @@ -829,7 +881,7 @@ ___ *Inherited from [SourceSource](../classes/sourcesource.md).[register](../classes/sourcesource.md#static-register)* -*Defined in [lib/source-destination/source-destination.ts:270](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L270)* +*Defined in [lib/source-destination/source-destination.ts:293](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L293)* **Parameters:** diff --git a/doc/interfaces/alignedlockablebuffer.md b/doc/interfaces/alignedlockablebuffer.md index 417f7da7..6140e02b 100644 --- a/doc/interfaces/alignedlockablebuffer.md +++ b/doc/interfaces/alignedlockablebuffer.md @@ -22,6 +22,7 @@ * [buffer](alignedlockablebuffer.md#buffer) * [byteLength](alignedlockablebuffer.md#bytelength) * [byteOffset](alignedlockablebuffer.md#byteoffset) +* [constructor](alignedlockablebuffer.md#constructor) * [length](alignedlockablebuffer.md#length) * [lock](alignedlockablebuffer.md#lock) * [rlock](alignedlockablebuffer.md#rlock) @@ -116,7 +117,7 @@ ___ • **Buffer**: *object* -Defined in node_modules/@types/node/base.d.ts:153 +Defined in node_modules/@types/node/globals.d.ts:291 Raw data is stored in instances of the Buffer class. A Buffer is similar to an array of integers but corresponds to a raw memory allocation outside the V8 heap. A Buffer cannot be resized. @@ -130,7 +131,7 @@ Valid string encodings: 'ascii'|'utf8'|'utf16le'|'ucs2'(alias of 'utf16le')|'bas * **new __type**(`array`: Uint8Array): *[Buffer](alignedlockablebuffer.md#buffer)* -* **new __type**(`arrayBuffer`: ArrayBuffer): *[Buffer](alignedlockablebuffer.md#buffer)* +* **new __type**(`arrayBuffer`: ArrayBuffer | SharedArrayBuffer): *[Buffer](alignedlockablebuffer.md#buffer)* * **new __type**(`array`: any[]): *[Buffer](alignedlockablebuffer.md#buffer)* @@ -146,21 +147,27 @@ Valid string encodings: 'ascii'|'utf8'|'utf16le'|'ucs2'(alias of 'utf16le')|'bas * **allocUnsafeSlow**(`size`: number): *[Buffer](alignedlockablebuffer.md#buffer)* -* **byteLength**(`string`: string | [Buffer](alignedlockablebuffer.md#buffer) | DataView | ArrayBuffer, `encoding?`: undefined | string): *number* +* **byteLength**(`string`: string | NodeJS.TypedArray | DataView | ArrayBuffer | SharedArrayBuffer, `encoding?`: undefined | string): *number* -* **compare**(`buf1`: [Buffer](alignedlockablebuffer.md#buffer), `buf2`: [Buffer](alignedlockablebuffer.md#buffer)): *number* +* **compare**(`buf1`: Uint8Array, `buf2`: Uint8Array): *number* -* **concat**(`list`: [Buffer](alignedlockablebuffer.md#buffer)[], `totalLength?`: undefined | number): *[Buffer](alignedlockablebuffer.md#buffer)* +* **concat**(`list`: Uint8Array[], `totalLength?`: undefined | number): *[Buffer](alignedlockablebuffer.md#buffer)* -* **from**(`arrayBuffer`: ArrayBuffer, `byteOffset?`: undefined | number, `length?`: undefined | number): *[Buffer](alignedlockablebuffer.md#buffer)* +* **from**(`arrayBuffer`: ArrayBuffer | SharedArrayBuffer, `byteOffset?`: undefined | number, `length?`: undefined | number): *[Buffer](alignedlockablebuffer.md#buffer)* -* **from**(`data`: any[] | string | [Buffer](alignedlockablebuffer.md#buffer) | ArrayBuffer): *[Buffer](alignedlockablebuffer.md#buffer)* +* **from**(`data`: any[]): *[Buffer](alignedlockablebuffer.md#buffer)* + +* **from**(`data`: Uint8Array): *[Buffer](alignedlockablebuffer.md#buffer)* + +* **from**(`obj`: object | object, `byteOffset?`: undefined | number, `length?`: undefined | number): *[Buffer](alignedlockablebuffer.md#buffer)* * **from**(`str`: string, `encoding?`: undefined | string): *[Buffer](alignedlockablebuffer.md#buffer)* * **isBuffer**(`obj`: any): *obj is Buffer* -* **isEncoding**(`encoding`: string): *boolean* +* **isEncoding**(`encoding`: string): *boolean | undefined* + +* **of**(...`items`: number[]): *[Buffer](alignedlockablebuffer.md#buffer)* ___ @@ -168,7 +175,7 @@ ___ • **alignment**: *number* -*Defined in [lib/aligned-lockable-buffer.ts:5](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/aligned-lockable-buffer.ts#L5)* +*Defined in [lib/aligned-lockable-buffer.ts:5](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/aligned-lockable-buffer.ts#L5)* ___ @@ -208,6 +215,16 @@ The offset in bytes of the array. ___ +### constructor + +• **constructor**: *typeof Buffer* + +*Inherited from [AlignedLockableBuffer](alignedlockablebuffer.md).[constructor](alignedlockablebuffer.md#constructor)* + +Defined in node_modules/@types/node/globals.d.ts:230 + +___ + ### length • **length**: *number* @@ -224,7 +241,7 @@ ___ • **lock**: *function* -*Defined in [lib/aligned-lockable-buffer.ts:6](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/aligned-lockable-buffer.ts#L6)* +*Defined in [lib/aligned-lockable-buffer.ts:6](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/aligned-lockable-buffer.ts#L6)* #### Type declaration: @@ -236,7 +253,7 @@ ___ • **rlock**: *function* -*Defined in [lib/aligned-lockable-buffer.ts:7](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/aligned-lockable-buffer.ts#L7)* +*Defined in [lib/aligned-lockable-buffer.ts:7](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/aligned-lockable-buffer.ts#L7)* #### Type declaration: @@ -250,7 +267,7 @@ ___ *Overrides void* -*Defined in [lib/aligned-lockable-buffer.ts:8](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/aligned-lockable-buffer.ts#L8)* +*Defined in [lib/aligned-lockable-buffer.ts:8](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/aligned-lockable-buffer.ts#L8)* #### Type declaration: @@ -267,17 +284,17 @@ Name | Type | ### compare -▸ **compare**(`otherBuffer`: [Buffer](alignedlockablebuffer.md#buffer), `targetStart?`: undefined | number, `targetEnd?`: undefined | number, `sourceStart?`: undefined | number, `sourceEnd?`: undefined | number): *number* +▸ **compare**(`otherBuffer`: Uint8Array, `targetStart?`: undefined | number, `targetEnd?`: undefined | number, `sourceStart?`: undefined | number, `sourceEnd?`: undefined | number): *number* *Inherited from [AlignedLockableBuffer](alignedlockablebuffer.md).[compare](alignedlockablebuffer.md#compare)* -Defined in node_modules/@types/node/base.d.ts:806 +Defined in node_modules/@types/node/globals.d.ts:235 **Parameters:** Name | Type | ------ | ------ | -`otherBuffer` | [Buffer](alignedlockablebuffer.md#buffer) | +`otherBuffer` | Uint8Array | `targetStart?` | undefined | number | `targetEnd?` | undefined | number | `sourceStart?` | undefined | number | @@ -289,17 +306,17 @@ ___ ### copy -▸ **copy**(`targetBuffer`: [Buffer](alignedlockablebuffer.md#buffer), `targetStart?`: undefined | number, `sourceStart?`: undefined | number, `sourceEnd?`: undefined | number): *number* +▸ **copy**(`targetBuffer`: Uint8Array, `targetStart?`: undefined | number, `sourceStart?`: undefined | number, `sourceEnd?`: undefined | number): *number* *Inherited from [AlignedLockableBuffer](alignedlockablebuffer.md).[copy](alignedlockablebuffer.md#copy)* -Defined in node_modules/@types/node/base.d.ts:807 +Defined in node_modules/@types/node/globals.d.ts:236 **Parameters:** Name | Type | ------ | ------ | -`targetBuffer` | [Buffer](alignedlockablebuffer.md#buffer) | +`targetBuffer` | Uint8Array | `targetStart?` | undefined | number | `sourceStart?` | undefined | number | `sourceEnd?` | undefined | number | @@ -337,7 +354,7 @@ ___ *Inherited from [AlignedLockableBuffer](alignedlockablebuffer.md).[entries](alignedlockablebuffer.md#entries)* -Defined in node_modules/@types/node/base.d.ts:851 +Defined in node_modules/@types/node/globals.d.ts:280 **Returns:** *IterableIterator‹[number, number]›* @@ -345,17 +362,17 @@ ___ ### equals -▸ **equals**(`otherBuffer`: [Buffer](alignedlockablebuffer.md#buffer)): *boolean* +▸ **equals**(`otherBuffer`: Uint8Array): *boolean* *Inherited from [AlignedLockableBuffer](alignedlockablebuffer.md).[equals](alignedlockablebuffer.md#equals)* -Defined in node_modules/@types/node/base.d.ts:805 +Defined in node_modules/@types/node/globals.d.ts:234 **Parameters:** Name | Type | ------ | ------ | -`otherBuffer` | [Buffer](alignedlockablebuffer.md#buffer) | +`otherBuffer` | Uint8Array | **Returns:** *boolean* @@ -406,7 +423,7 @@ ___ *Overrides void* -Defined in node_modules/@types/node/base.d.ts:848 +Defined in node_modules/@types/node/globals.d.ts:277 **Parameters:** @@ -574,7 +591,7 @@ ___ *Inherited from [AlignedLockableBuffer](alignedlockablebuffer.md).[includes](alignedlockablebuffer.md#includes)* -Defined in node_modules/@types/node/base.d.ts:852 +Defined in node_modules/@types/node/globals.d.ts:281 **Parameters:** @@ -590,19 +607,19 @@ ___ ### indexOf -▸ **indexOf**(`value`: string | number | [Buffer](alignedlockablebuffer.md#buffer), `byteOffset?`: undefined | number, `encoding?`: undefined | string): *number* +▸ **indexOf**(`value`: string | number | Uint8Array, `byteOffset?`: undefined | number, `encoding?`: undefined | string): *number* *Inherited from [AlignedLockableBuffer](alignedlockablebuffer.md).[indexOf](alignedlockablebuffer.md#indexof)* *Overrides void* -Defined in node_modules/@types/node/base.d.ts:849 +Defined in node_modules/@types/node/globals.d.ts:278 **Parameters:** Name | Type | ------ | ------ | -`value` | string | number | [Buffer](alignedlockablebuffer.md#buffer) | +`value` | string | number | Uint8Array | `byteOffset?` | undefined | number | `encoding?` | undefined | string | @@ -636,7 +653,7 @@ ___ *Inherited from [AlignedLockableBuffer](alignedlockablebuffer.md).[keys](alignedlockablebuffer.md#keys)* -Defined in node_modules/@types/node/base.d.ts:853 +Defined in node_modules/@types/node/globals.d.ts:282 **Returns:** *IterableIterator‹number›* @@ -644,19 +661,19 @@ ___ ### lastIndexOf -▸ **lastIndexOf**(`value`: string | number | [Buffer](alignedlockablebuffer.md#buffer), `byteOffset?`: undefined | number, `encoding?`: undefined | string): *number* +▸ **lastIndexOf**(`value`: string | number | Uint8Array, `byteOffset?`: undefined | number, `encoding?`: undefined | string): *number* *Inherited from [AlignedLockableBuffer](alignedlockablebuffer.md).[lastIndexOf](alignedlockablebuffer.md#lastindexof)* *Overrides void* -Defined in node_modules/@types/node/base.d.ts:850 +Defined in node_modules/@types/node/globals.d.ts:279 **Parameters:** Name | Type | ------ | ------ | -`value` | string | number | [Buffer](alignedlockablebuffer.md#buffer) | +`value` | string | number | Uint8Array | `byteOffset?` | undefined | number | `encoding?` | undefined | string | @@ -707,7 +724,7 @@ ___ *Inherited from [AlignedLockableBuffer](alignedlockablebuffer.md).[readDoubleBE](alignedlockablebuffer.md#readdoublebe)* -Defined in node_modules/@types/node/base.d.ts:830 +Defined in node_modules/@types/node/globals.d.ts:259 **Parameters:** @@ -726,7 +743,7 @@ ___ *Inherited from [AlignedLockableBuffer](alignedlockablebuffer.md).[readDoubleLE](alignedlockablebuffer.md#readdoublele)* -Defined in node_modules/@types/node/base.d.ts:829 +Defined in node_modules/@types/node/globals.d.ts:258 **Parameters:** @@ -745,7 +762,7 @@ ___ *Inherited from [AlignedLockableBuffer](alignedlockablebuffer.md).[readFloatBE](alignedlockablebuffer.md#readfloatbe)* -Defined in node_modules/@types/node/base.d.ts:828 +Defined in node_modules/@types/node/globals.d.ts:257 **Parameters:** @@ -764,7 +781,7 @@ ___ *Inherited from [AlignedLockableBuffer](alignedlockablebuffer.md).[readFloatLE](alignedlockablebuffer.md#readfloatle)* -Defined in node_modules/@types/node/base.d.ts:827 +Defined in node_modules/@types/node/globals.d.ts:256 **Parameters:** @@ -783,7 +800,7 @@ ___ *Inherited from [AlignedLockableBuffer](alignedlockablebuffer.md).[readInt16BE](alignedlockablebuffer.md#readint16be)* -Defined in node_modules/@types/node/base.d.ts:824 +Defined in node_modules/@types/node/globals.d.ts:253 **Parameters:** @@ -802,7 +819,7 @@ ___ *Inherited from [AlignedLockableBuffer](alignedlockablebuffer.md).[readInt16LE](alignedlockablebuffer.md#readint16le)* -Defined in node_modules/@types/node/base.d.ts:823 +Defined in node_modules/@types/node/globals.d.ts:252 **Parameters:** @@ -821,7 +838,7 @@ ___ *Inherited from [AlignedLockableBuffer](alignedlockablebuffer.md).[readInt32BE](alignedlockablebuffer.md#readint32be)* -Defined in node_modules/@types/node/base.d.ts:826 +Defined in node_modules/@types/node/globals.d.ts:255 **Parameters:** @@ -840,7 +857,7 @@ ___ *Inherited from [AlignedLockableBuffer](alignedlockablebuffer.md).[readInt32LE](alignedlockablebuffer.md#readint32le)* -Defined in node_modules/@types/node/base.d.ts:825 +Defined in node_modules/@types/node/globals.d.ts:254 **Parameters:** @@ -859,7 +876,7 @@ ___ *Inherited from [AlignedLockableBuffer](alignedlockablebuffer.md).[readInt8](alignedlockablebuffer.md#readint8)* -Defined in node_modules/@types/node/base.d.ts:822 +Defined in node_modules/@types/node/globals.d.ts:251 **Parameters:** @@ -878,7 +895,7 @@ ___ *Inherited from [AlignedLockableBuffer](alignedlockablebuffer.md).[readIntBE](alignedlockablebuffer.md#readintbe)* -Defined in node_modules/@types/node/base.d.ts:816 +Defined in node_modules/@types/node/globals.d.ts:245 **Parameters:** @@ -898,7 +915,7 @@ ___ *Inherited from [AlignedLockableBuffer](alignedlockablebuffer.md).[readIntLE](alignedlockablebuffer.md#readintle)* -Defined in node_modules/@types/node/base.d.ts:815 +Defined in node_modules/@types/node/globals.d.ts:244 **Parameters:** @@ -918,7 +935,7 @@ ___ *Inherited from [AlignedLockableBuffer](alignedlockablebuffer.md).[readUInt16BE](alignedlockablebuffer.md#readuint16be)* -Defined in node_modules/@types/node/base.d.ts:819 +Defined in node_modules/@types/node/globals.d.ts:248 **Parameters:** @@ -937,7 +954,7 @@ ___ *Inherited from [AlignedLockableBuffer](alignedlockablebuffer.md).[readUInt16LE](alignedlockablebuffer.md#readuint16le)* -Defined in node_modules/@types/node/base.d.ts:818 +Defined in node_modules/@types/node/globals.d.ts:247 **Parameters:** @@ -956,7 +973,7 @@ ___ *Inherited from [AlignedLockableBuffer](alignedlockablebuffer.md).[readUInt32BE](alignedlockablebuffer.md#readuint32be)* -Defined in node_modules/@types/node/base.d.ts:821 +Defined in node_modules/@types/node/globals.d.ts:250 **Parameters:** @@ -975,7 +992,7 @@ ___ *Inherited from [AlignedLockableBuffer](alignedlockablebuffer.md).[readUInt32LE](alignedlockablebuffer.md#readuint32le)* -Defined in node_modules/@types/node/base.d.ts:820 +Defined in node_modules/@types/node/globals.d.ts:249 **Parameters:** @@ -994,7 +1011,7 @@ ___ *Inherited from [AlignedLockableBuffer](alignedlockablebuffer.md).[readUInt8](alignedlockablebuffer.md#readuint8)* -Defined in node_modules/@types/node/base.d.ts:817 +Defined in node_modules/@types/node/globals.d.ts:246 **Parameters:** @@ -1013,7 +1030,7 @@ ___ *Inherited from [AlignedLockableBuffer](alignedlockablebuffer.md).[readUIntBE](alignedlockablebuffer.md#readuintbe)* -Defined in node_modules/@types/node/base.d.ts:814 +Defined in node_modules/@types/node/globals.d.ts:243 **Parameters:** @@ -1033,7 +1050,7 @@ ___ *Inherited from [AlignedLockableBuffer](alignedlockablebuffer.md).[readUIntLE](alignedlockablebuffer.md#readuintle)* -Defined in node_modules/@types/node/base.d.ts:813 +Defined in node_modules/@types/node/globals.d.ts:242 **Parameters:** @@ -1365,7 +1382,7 @@ ___ *Inherited from [AlignedLockableBuffer](alignedlockablebuffer.md).[swap16](alignedlockablebuffer.md#swap16)* -Defined in node_modules/@types/node/base.d.ts:831 +Defined in node_modules/@types/node/globals.d.ts:260 **Returns:** *[Buffer](alignedlockablebuffer.md#buffer)* @@ -1377,7 +1394,7 @@ ___ *Inherited from [AlignedLockableBuffer](alignedlockablebuffer.md).[swap32](alignedlockablebuffer.md#swap32)* -Defined in node_modules/@types/node/base.d.ts:832 +Defined in node_modules/@types/node/globals.d.ts:261 **Returns:** *[Buffer](alignedlockablebuffer.md#buffer)* @@ -1389,7 +1406,7 @@ ___ *Inherited from [AlignedLockableBuffer](alignedlockablebuffer.md).[swap64](alignedlockablebuffer.md#swap64)* -Defined in node_modules/@types/node/base.d.ts:833 +Defined in node_modules/@types/node/globals.d.ts:262 **Returns:** *[Buffer](alignedlockablebuffer.md#buffer)* @@ -1401,7 +1418,7 @@ ___ *Inherited from [AlignedLockableBuffer](alignedlockablebuffer.md).[toJSON](alignedlockablebuffer.md#tojson)* -Defined in node_modules/@types/node/base.d.ts:804 +Defined in node_modules/@types/node/globals.d.ts:233 **Returns:** *object* @@ -1433,7 +1450,7 @@ ___ *Overrides void* -Defined in node_modules/@types/node/base.d.ts:803 +Defined in node_modules/@types/node/globals.d.ts:232 **Parameters:** @@ -1453,7 +1470,7 @@ ___ *Inherited from [AlignedLockableBuffer](alignedlockablebuffer.md).[values](alignedlockablebuffer.md#values)* -Defined in node_modules/@types/node/base.d.ts:854 +Defined in node_modules/@types/node/globals.d.ts:283 **Returns:** *IterableIterator‹number›* @@ -1465,7 +1482,7 @@ ___ *Inherited from [AlignedLockableBuffer](alignedlockablebuffer.md).[write](alignedlockablebuffer.md#write)* -Defined in node_modules/@types/node/base.d.ts:802 +Defined in node_modules/@types/node/globals.d.ts:231 **Parameters:** @@ -1486,7 +1503,7 @@ ___ *Inherited from [AlignedLockableBuffer](alignedlockablebuffer.md).[writeDoubleBE](alignedlockablebuffer.md#writedoublebe)* -Defined in node_modules/@types/node/base.d.ts:847 +Defined in node_modules/@types/node/globals.d.ts:276 **Parameters:** @@ -1506,7 +1523,7 @@ ___ *Inherited from [AlignedLockableBuffer](alignedlockablebuffer.md).[writeDoubleLE](alignedlockablebuffer.md#writedoublele)* -Defined in node_modules/@types/node/base.d.ts:846 +Defined in node_modules/@types/node/globals.d.ts:275 **Parameters:** @@ -1526,7 +1543,7 @@ ___ *Inherited from [AlignedLockableBuffer](alignedlockablebuffer.md).[writeFloatBE](alignedlockablebuffer.md#writefloatbe)* -Defined in node_modules/@types/node/base.d.ts:845 +Defined in node_modules/@types/node/globals.d.ts:274 **Parameters:** @@ -1546,7 +1563,7 @@ ___ *Inherited from [AlignedLockableBuffer](alignedlockablebuffer.md).[writeFloatLE](alignedlockablebuffer.md#writefloatle)* -Defined in node_modules/@types/node/base.d.ts:844 +Defined in node_modules/@types/node/globals.d.ts:273 **Parameters:** @@ -1566,7 +1583,7 @@ ___ *Inherited from [AlignedLockableBuffer](alignedlockablebuffer.md).[writeInt16BE](alignedlockablebuffer.md#writeint16be)* -Defined in node_modules/@types/node/base.d.ts:841 +Defined in node_modules/@types/node/globals.d.ts:270 **Parameters:** @@ -1586,7 +1603,7 @@ ___ *Inherited from [AlignedLockableBuffer](alignedlockablebuffer.md).[writeInt16LE](alignedlockablebuffer.md#writeint16le)* -Defined in node_modules/@types/node/base.d.ts:840 +Defined in node_modules/@types/node/globals.d.ts:269 **Parameters:** @@ -1606,7 +1623,7 @@ ___ *Inherited from [AlignedLockableBuffer](alignedlockablebuffer.md).[writeInt32BE](alignedlockablebuffer.md#writeint32be)* -Defined in node_modules/@types/node/base.d.ts:843 +Defined in node_modules/@types/node/globals.d.ts:272 **Parameters:** @@ -1626,7 +1643,7 @@ ___ *Inherited from [AlignedLockableBuffer](alignedlockablebuffer.md).[writeInt32LE](alignedlockablebuffer.md#writeint32le)* -Defined in node_modules/@types/node/base.d.ts:842 +Defined in node_modules/@types/node/globals.d.ts:271 **Parameters:** @@ -1646,7 +1663,7 @@ ___ *Inherited from [AlignedLockableBuffer](alignedlockablebuffer.md).[writeInt8](alignedlockablebuffer.md#writeint8)* -Defined in node_modules/@types/node/base.d.ts:839 +Defined in node_modules/@types/node/globals.d.ts:268 **Parameters:** @@ -1666,7 +1683,7 @@ ___ *Inherited from [AlignedLockableBuffer](alignedlockablebuffer.md).[writeIntBE](alignedlockablebuffer.md#writeintbe)* -Defined in node_modules/@types/node/base.d.ts:812 +Defined in node_modules/@types/node/globals.d.ts:241 **Parameters:** @@ -1687,7 +1704,7 @@ ___ *Inherited from [AlignedLockableBuffer](alignedlockablebuffer.md).[writeIntLE](alignedlockablebuffer.md#writeintle)* -Defined in node_modules/@types/node/base.d.ts:811 +Defined in node_modules/@types/node/globals.d.ts:240 **Parameters:** @@ -1708,7 +1725,7 @@ ___ *Inherited from [AlignedLockableBuffer](alignedlockablebuffer.md).[writeUInt16BE](alignedlockablebuffer.md#writeuint16be)* -Defined in node_modules/@types/node/base.d.ts:836 +Defined in node_modules/@types/node/globals.d.ts:265 **Parameters:** @@ -1728,7 +1745,7 @@ ___ *Inherited from [AlignedLockableBuffer](alignedlockablebuffer.md).[writeUInt16LE](alignedlockablebuffer.md#writeuint16le)* -Defined in node_modules/@types/node/base.d.ts:835 +Defined in node_modules/@types/node/globals.d.ts:264 **Parameters:** @@ -1748,7 +1765,7 @@ ___ *Inherited from [AlignedLockableBuffer](alignedlockablebuffer.md).[writeUInt32BE](alignedlockablebuffer.md#writeuint32be)* -Defined in node_modules/@types/node/base.d.ts:838 +Defined in node_modules/@types/node/globals.d.ts:267 **Parameters:** @@ -1768,7 +1785,7 @@ ___ *Inherited from [AlignedLockableBuffer](alignedlockablebuffer.md).[writeUInt32LE](alignedlockablebuffer.md#writeuint32le)* -Defined in node_modules/@types/node/base.d.ts:837 +Defined in node_modules/@types/node/globals.d.ts:266 **Parameters:** @@ -1788,7 +1805,7 @@ ___ *Inherited from [AlignedLockableBuffer](alignedlockablebuffer.md).[writeUInt8](alignedlockablebuffer.md#writeuint8)* -Defined in node_modules/@types/node/base.d.ts:834 +Defined in node_modules/@types/node/globals.d.ts:263 **Parameters:** @@ -1808,7 +1825,7 @@ ___ *Inherited from [AlignedLockableBuffer](alignedlockablebuffer.md).[writeUIntBE](alignedlockablebuffer.md#writeuintbe)* -Defined in node_modules/@types/node/base.d.ts:810 +Defined in node_modules/@types/node/globals.d.ts:239 **Parameters:** @@ -1829,7 +1846,7 @@ ___ *Inherited from [AlignedLockableBuffer](alignedlockablebuffer.md).[writeUIntLE](alignedlockablebuffer.md#writeuintle)* -Defined in node_modules/@types/node/base.d.ts:809 +Defined in node_modules/@types/node/globals.d.ts:238 **Parameters:** diff --git a/doc/interfaces/block.md b/doc/interfaces/block.md index 7b5d3d60..0998c518 100644 --- a/doc/interfaces/block.md +++ b/doc/interfaces/block.md @@ -19,7 +19,7 @@ • **length**: *number* -*Defined in [lib/sparse-stream/shared.ts:35](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/sparse-stream/shared.ts#L35)* +*Defined in [lib/sparse-stream/shared.ts:35](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/sparse-stream/shared.ts#L35)* ___ @@ -27,4 +27,4 @@ ___ • **offset**: *number* -*Defined in [lib/sparse-stream/shared.ts:34](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/sparse-stream/shared.ts#L34)* +*Defined in [lib/sparse-stream/shared.ts:34](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/sparse-stream/shared.ts#L34)* diff --git a/doc/interfaces/blockswithchecksum.md b/doc/interfaces/blockswithchecksum.md index 34f6d25c..adb24a9c 100644 --- a/doc/interfaces/blockswithchecksum.md +++ b/doc/interfaces/blockswithchecksum.md @@ -20,7 +20,7 @@ • **blocks**: *[Block](block.md)[]* -*Defined in [lib/sparse-stream/shared.ts:41](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/sparse-stream/shared.ts#L41)* +*Defined in [lib/sparse-stream/shared.ts:41](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/sparse-stream/shared.ts#L41)* ___ @@ -28,7 +28,7 @@ ___ • **checksum**? : *undefined | string* -*Defined in [lib/sparse-stream/shared.ts:40](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/sparse-stream/shared.ts#L40)* +*Defined in [lib/sparse-stream/shared.ts:40](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/sparse-stream/shared.ts#L40)* ___ @@ -36,4 +36,4 @@ ___ • **checksumType**? : *[ChecksumType](../README.md#checksumtype)* -*Defined in [lib/sparse-stream/shared.ts:39](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/sparse-stream/shared.ts#L39)* +*Defined in [lib/sparse-stream/shared.ts:39](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/sparse-stream/shared.ts#L39)* diff --git a/doc/interfaces/createreadstreamoptions.md b/doc/interfaces/createreadstreamoptions.md index fcb77a96..1ad80693 100644 --- a/doc/interfaces/createreadstreamoptions.md +++ b/doc/interfaces/createreadstreamoptions.md @@ -22,7 +22,7 @@ • **alignment**? : *undefined | number* -*Defined in [lib/source-destination/source-destination.ts:241](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L241)* +*Defined in [lib/source-destination/source-destination.ts:264](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L264)* ___ @@ -30,7 +30,7 @@ ___ • **emitProgress**? : *undefined | false | true* -*Defined in [lib/source-destination/source-destination.ts:238](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L238)* +*Defined in [lib/source-destination/source-destination.ts:261](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L261)* ___ @@ -38,7 +38,7 @@ ___ • **end**? : *undefined | number* -*Defined in [lib/source-destination/source-destination.ts:240](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L240)* +*Defined in [lib/source-destination/source-destination.ts:263](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L263)* ___ @@ -46,7 +46,7 @@ ___ • **numBuffers**? : *undefined | number* -*Defined in [lib/source-destination/source-destination.ts:242](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L242)* +*Defined in [lib/source-destination/source-destination.ts:265](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L265)* ___ @@ -54,4 +54,4 @@ ___ • **start**? : *undefined | number* -*Defined in [lib/source-destination/source-destination.ts:239](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L239)* +*Defined in [lib/source-destination/source-destination.ts:262](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L262)* diff --git a/doc/interfaces/createsparsereadstreamoptions.md b/doc/interfaces/createsparsereadstreamoptions.md index 52c5650c..42a466bf 100644 --- a/doc/interfaces/createsparsereadstreamoptions.md +++ b/doc/interfaces/createsparsereadstreamoptions.md @@ -20,7 +20,7 @@ • **alignment**? : *undefined | number* -*Defined in [lib/source-destination/source-destination.ts:247](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L247)* +*Defined in [lib/source-destination/source-destination.ts:270](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L270)* ___ @@ -28,7 +28,7 @@ ___ • **generateChecksums**? : *undefined | false | true* -*Defined in [lib/source-destination/source-destination.ts:246](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L246)* +*Defined in [lib/source-destination/source-destination.ts:269](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L269)* ___ @@ -36,4 +36,4 @@ ___ • **numBuffers**? : *undefined | number* -*Defined in [lib/source-destination/source-destination.ts:248](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/source-destination.ts#L248)* +*Defined in [lib/source-destination/source-destination.ts:271](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/source-destination.ts#L271)* diff --git a/doc/interfaces/drivelistdrive.md b/doc/interfaces/drivelistdrive.md index abfca584..da89222f 100644 --- a/doc/interfaces/drivelistdrive.md +++ b/doc/interfaces/drivelistdrive.md @@ -101,7 +101,7 @@ ___ • **displayName**: *string* -*Defined in [lib/scanner/adapters/block-device.ts:52](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/scanner/adapters/block-device.ts#L52)* +*Defined in [lib/scanner/adapters/block-device.ts:52](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/scanner/adapters/block-device.ts#L52)* ___ @@ -129,7 +129,7 @@ ___ • **icon**? : *undefined | string* -*Defined in [lib/scanner/adapters/block-device.ts:53](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/scanner/adapters/block-device.ts#L53)* +*Defined in [lib/scanner/adapters/block-device.ts:53](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/scanner/adapters/block-device.ts#L53)* ___ diff --git a/doc/interfaces/execresult.md b/doc/interfaces/execresult.md index 640b4dae..a3b6ccc5 100644 --- a/doc/interfaces/execresult.md +++ b/doc/interfaces/execresult.md @@ -19,7 +19,7 @@ • **stderr**: *string* -*Defined in [lib/diskpart.ts:33](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/diskpart.ts#L33)* +*Defined in [lib/diskpart.ts:33](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/diskpart.ts#L33)* ___ @@ -27,4 +27,4 @@ ___ • **stdout**: *string* -*Defined in [lib/diskpart.ts:32](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/diskpart.ts#L32)* +*Defined in [lib/diskpart.ts:32](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/diskpart.ts#L32)* diff --git a/doc/interfaces/metadata.md b/doc/interfaces/metadata.md index 4b273275..3d348a1b 100644 --- a/doc/interfaces/metadata.md +++ b/doc/interfaces/metadata.md @@ -35,7 +35,7 @@ • **blockMap**? : *BlockMap* -*Defined in [lib/source-destination/metadata.ts:27](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/metadata.ts#L27)* +*Defined in [lib/source-destination/metadata.ts:27](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/metadata.ts#L27)* ___ @@ -43,7 +43,7 @@ ___ • **blockmappedSize**? : *undefined | number* -*Defined in [lib/source-destination/metadata.ts:25](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/metadata.ts#L25)* +*Defined in [lib/source-destination/metadata.ts:25](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/metadata.ts#L25)* ___ @@ -51,7 +51,7 @@ ___ • **blocks**? : *[BlocksWithChecksum](blockswithchecksum.md)[]* -*Defined in [lib/source-destination/metadata.ts:28](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/metadata.ts#L28)* +*Defined in [lib/source-destination/metadata.ts:28](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/metadata.ts#L28)* ___ @@ -59,7 +59,7 @@ ___ • **bytesToZeroOutFromTheBeginning**? : *undefined | number* -*Defined in [lib/source-destination/metadata.ts:31](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/metadata.ts#L31)* +*Defined in [lib/source-destination/metadata.ts:31](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/metadata.ts#L31)* ___ @@ -67,7 +67,7 @@ ___ • **checksum**? : *undefined | string* -*Defined in [lib/source-destination/metadata.ts:32](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/metadata.ts#L32)* +*Defined in [lib/source-destination/metadata.ts:32](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/metadata.ts#L32)* ___ @@ -75,7 +75,7 @@ ___ • **checksumType**? : *undefined | string* -*Defined in [lib/source-destination/metadata.ts:33](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/metadata.ts#L33)* +*Defined in [lib/source-destination/metadata.ts:33](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/metadata.ts#L33)* ___ @@ -83,7 +83,7 @@ ___ • **compressedSize**? : *undefined | number* -*Defined in [lib/source-destination/metadata.ts:24](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/metadata.ts#L24)* +*Defined in [lib/source-destination/metadata.ts:24](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/metadata.ts#L24)* ___ @@ -91,7 +91,7 @@ ___ • **instructions**? : *undefined | string* -*Defined in [lib/source-destination/metadata.ts:29](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/metadata.ts#L29)* +*Defined in [lib/source-destination/metadata.ts:29](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/metadata.ts#L29)* ___ @@ -99,7 +99,7 @@ ___ • **isEtch**? : *undefined | false | true* -*Defined in [lib/source-destination/metadata.ts:39](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/metadata.ts#L39)* +*Defined in [lib/source-destination/metadata.ts:39](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/metadata.ts#L39)* ___ @@ -107,7 +107,7 @@ ___ • **isSizeEstimated**? : *undefined | false | true* -*Defined in [lib/source-destination/metadata.ts:23](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/metadata.ts#L23)* +*Defined in [lib/source-destination/metadata.ts:23](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/metadata.ts#L23)* ___ @@ -115,7 +115,7 @@ ___ • **logo**? : *undefined | string* -*Defined in [lib/source-destination/metadata.ts:30](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/metadata.ts#L30)* +*Defined in [lib/source-destination/metadata.ts:30](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/metadata.ts#L30)* ___ @@ -123,7 +123,7 @@ ___ • **name**? : *undefined | string* -*Defined in [lib/source-destination/metadata.ts:26](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/metadata.ts#L26)* +*Defined in [lib/source-destination/metadata.ts:26](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/metadata.ts#L26)* ___ @@ -131,7 +131,7 @@ ___ • **recommendedDriveSize**? : *undefined | number* -*Defined in [lib/source-destination/metadata.ts:34](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/metadata.ts#L34)* +*Defined in [lib/source-destination/metadata.ts:34](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/metadata.ts#L34)* ___ @@ -139,7 +139,7 @@ ___ • **releaseNotesUrl**? : *undefined | string* -*Defined in [lib/source-destination/metadata.ts:35](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/metadata.ts#L35)* +*Defined in [lib/source-destination/metadata.ts:35](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/metadata.ts#L35)* ___ @@ -147,7 +147,7 @@ ___ • **size**? : *undefined | number* -*Defined in [lib/source-destination/metadata.ts:22](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/metadata.ts#L22)* +*Defined in [lib/source-destination/metadata.ts:22](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/metadata.ts#L22)* ___ @@ -155,7 +155,7 @@ ___ • **supportUrl**? : *undefined | string* -*Defined in [lib/source-destination/metadata.ts:36](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/metadata.ts#L36)* +*Defined in [lib/source-destination/metadata.ts:36](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/metadata.ts#L36)* ___ @@ -163,7 +163,7 @@ ___ • **url**? : *undefined | string* -*Defined in [lib/source-destination/metadata.ts:37](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/metadata.ts#L37)* +*Defined in [lib/source-destination/metadata.ts:37](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/metadata.ts#L37)* ___ @@ -171,4 +171,4 @@ ___ • **version**? : *undefined | string* -*Defined in [lib/source-destination/metadata.ts:38](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/metadata.ts#L38)* +*Defined in [lib/source-destination/metadata.ts:38](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/metadata.ts#L38)* diff --git a/doc/interfaces/multidestinationprogress.md b/doc/interfaces/multidestinationprogress.md index 847a5ff8..1458be5b 100644 --- a/doc/interfaces/multidestinationprogress.md +++ b/doc/interfaces/multidestinationprogress.md @@ -39,7 +39,7 @@ *Inherited from [MultiDestinationState](multidestinationstate.md).[active](multidestinationstate.md#active)* -*Defined in [lib/multi-write.ts:37](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/multi-write.ts#L37)* +*Defined in [lib/multi-write.ts:37](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/multi-write.ts#L37)* ___ @@ -49,7 +49,7 @@ ___ *Inherited from [MultiDestinationState](multidestinationstate.md).[blockmappedSize](multidestinationstate.md#optional-blockmappedsize)* -*Defined in [lib/multi-write.ts:45](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/multi-write.ts#L45)* +*Defined in [lib/multi-write.ts:45](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/multi-write.ts#L45)* ___ @@ -57,7 +57,7 @@ ___ • **bytes**: *number* -*Defined in [lib/multi-write.ts:52](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/multi-write.ts#L52)* +*Defined in [lib/multi-write.ts:52](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/multi-write.ts#L52)* ___ @@ -67,7 +67,7 @@ ___ *Inherited from [MultiDestinationState](multidestinationstate.md).[compressedSize](multidestinationstate.md#optional-compressedsize)* -*Defined in [lib/multi-write.ts:44](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/multi-write.ts#L44)* +*Defined in [lib/multi-write.ts:44](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/multi-write.ts#L44)* ___ @@ -75,7 +75,7 @@ ___ • **eta**? : *undefined | number* -*Defined in [lib/multi-write.ts:57](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/multi-write.ts#L57)* +*Defined in [lib/multi-write.ts:57](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/multi-write.ts#L57)* ___ @@ -85,7 +85,7 @@ ___ *Inherited from [MultiDestinationState](multidestinationstate.md).[failed](multidestinationstate.md#failed)* -*Defined in [lib/multi-write.ts:40](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/multi-write.ts#L40)* +*Defined in [lib/multi-write.ts:40](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/multi-write.ts#L40)* ___ @@ -95,7 +95,7 @@ ___ *Inherited from [MultiDestinationState](multidestinationstate.md).[flashing](multidestinationstate.md#flashing)* -*Defined in [lib/multi-write.ts:38](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/multi-write.ts#L38)* +*Defined in [lib/multi-write.ts:38](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/multi-write.ts#L38)* ___ @@ -103,7 +103,7 @@ ___ • **percentage**? : *undefined | number* -*Defined in [lib/multi-write.ts:56](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/multi-write.ts#L56)* +*Defined in [lib/multi-write.ts:56](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/multi-write.ts#L56)* ___ @@ -111,7 +111,7 @@ ___ • **position**: *number* -*Defined in [lib/multi-write.ts:53](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/multi-write.ts#L53)* +*Defined in [lib/multi-write.ts:53](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/multi-write.ts#L53)* ___ @@ -121,7 +121,7 @@ ___ *Inherited from [MultiDestinationState](multidestinationstate.md).[rootStreamPosition](multidestinationstate.md#optional-rootstreamposition)* -*Defined in [lib/multi-write.ts:47](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/multi-write.ts#L47)* +*Defined in [lib/multi-write.ts:47](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/multi-write.ts#L47)* ___ @@ -131,7 +131,7 @@ ___ *Inherited from [MultiDestinationState](multidestinationstate.md).[rootStreamSpeed](multidestinationstate.md#optional-rootstreamspeed)* -*Defined in [lib/multi-write.ts:48](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/multi-write.ts#L48)* +*Defined in [lib/multi-write.ts:48](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/multi-write.ts#L48)* ___ @@ -141,7 +141,7 @@ ___ *Inherited from [MultiDestinationState](multidestinationstate.md).[size](multidestinationstate.md#optional-size)* -*Defined in [lib/multi-write.ts:43](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/multi-write.ts#L43)* +*Defined in [lib/multi-write.ts:43](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/multi-write.ts#L43)* ___ @@ -151,7 +151,7 @@ ___ *Inherited from [MultiDestinationState](multidestinationstate.md).[sparse](multidestinationstate.md#optional-sparse)* -*Defined in [lib/multi-write.ts:46](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/multi-write.ts#L46)* +*Defined in [lib/multi-write.ts:46](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/multi-write.ts#L46)* ___ @@ -159,7 +159,7 @@ ___ • **speed**: *number* -*Defined in [lib/multi-write.ts:54](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/multi-write.ts#L54)* +*Defined in [lib/multi-write.ts:54](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/multi-write.ts#L54)* ___ @@ -169,7 +169,7 @@ ___ *Inherited from [MultiDestinationState](multidestinationstate.md).[successful](multidestinationstate.md#successful)* -*Defined in [lib/multi-write.ts:41](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/multi-write.ts#L41)* +*Defined in [lib/multi-write.ts:41](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/multi-write.ts#L41)* ___ @@ -177,7 +177,7 @@ ___ • **totalSpeed**: *number* -*Defined in [lib/multi-write.ts:55](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/multi-write.ts#L55)* +*Defined in [lib/multi-write.ts:55](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/multi-write.ts#L55)* ___ @@ -187,7 +187,7 @@ ___ *Inherited from [MultiDestinationState](multidestinationstate.md).[type](multidestinationstate.md#type)* -*Defined in [lib/multi-write.ts:42](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/multi-write.ts#L42)* +*Defined in [lib/multi-write.ts:42](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/multi-write.ts#L42)* ___ @@ -197,4 +197,4 @@ ___ *Inherited from [MultiDestinationState](multidestinationstate.md).[verifying](multidestinationstate.md#verifying)* -*Defined in [lib/multi-write.ts:39](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/multi-write.ts#L39)* +*Defined in [lib/multi-write.ts:39](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/multi-write.ts#L39)* diff --git a/doc/interfaces/multidestinationstate.md b/doc/interfaces/multidestinationstate.md index 6f7d7c2d..c49b69e4 100644 --- a/doc/interfaces/multidestinationstate.md +++ b/doc/interfaces/multidestinationstate.md @@ -31,7 +31,7 @@ • **active**: *number* -*Defined in [lib/multi-write.ts:37](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/multi-write.ts#L37)* +*Defined in [lib/multi-write.ts:37](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/multi-write.ts#L37)* ___ @@ -39,7 +39,7 @@ ___ • **blockmappedSize**? : *undefined | number* -*Defined in [lib/multi-write.ts:45](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/multi-write.ts#L45)* +*Defined in [lib/multi-write.ts:45](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/multi-write.ts#L45)* ___ @@ -47,7 +47,7 @@ ___ • **compressedSize**? : *undefined | number* -*Defined in [lib/multi-write.ts:44](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/multi-write.ts#L44)* +*Defined in [lib/multi-write.ts:44](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/multi-write.ts#L44)* ___ @@ -55,7 +55,7 @@ ___ • **failed**: *number* -*Defined in [lib/multi-write.ts:40](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/multi-write.ts#L40)* +*Defined in [lib/multi-write.ts:40](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/multi-write.ts#L40)* ___ @@ -63,7 +63,7 @@ ___ • **flashing**: *number* -*Defined in [lib/multi-write.ts:38](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/multi-write.ts#L38)* +*Defined in [lib/multi-write.ts:38](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/multi-write.ts#L38)* ___ @@ -71,7 +71,7 @@ ___ • **rootStreamPosition**? : *undefined | number* -*Defined in [lib/multi-write.ts:47](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/multi-write.ts#L47)* +*Defined in [lib/multi-write.ts:47](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/multi-write.ts#L47)* ___ @@ -79,7 +79,7 @@ ___ • **rootStreamSpeed**? : *undefined | number* -*Defined in [lib/multi-write.ts:48](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/multi-write.ts#L48)* +*Defined in [lib/multi-write.ts:48](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/multi-write.ts#L48)* ___ @@ -87,7 +87,7 @@ ___ • **size**? : *undefined | number* -*Defined in [lib/multi-write.ts:43](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/multi-write.ts#L43)* +*Defined in [lib/multi-write.ts:43](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/multi-write.ts#L43)* ___ @@ -95,7 +95,7 @@ ___ • **sparse**? : *undefined | false | true* -*Defined in [lib/multi-write.ts:46](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/multi-write.ts#L46)* +*Defined in [lib/multi-write.ts:46](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/multi-write.ts#L46)* ___ @@ -103,7 +103,7 @@ ___ • **successful**: *number* -*Defined in [lib/multi-write.ts:41](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/multi-write.ts#L41)* +*Defined in [lib/multi-write.ts:41](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/multi-write.ts#L41)* ___ @@ -111,7 +111,7 @@ ___ • **type**: *[WriteStep](../README.md#writestep)* -*Defined in [lib/multi-write.ts:42](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/multi-write.ts#L42)* +*Defined in [lib/multi-write.ts:42](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/multi-write.ts#L42)* ___ @@ -119,4 +119,4 @@ ___ • **verifying**: *number* -*Defined in [lib/multi-write.ts:39](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/multi-write.ts#L39)* +*Defined in [lib/multi-write.ts:39](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/multi-write.ts#L39)* diff --git a/doc/interfaces/operation.md b/doc/interfaces/operation.md index 300a9e5f..90a8466b 100644 --- a/doc/interfaces/operation.md +++ b/doc/interfaces/operation.md @@ -19,7 +19,7 @@ • **command**: *[OperationCommand](../README.md#operationcommand)* -*Defined in [lib/source-destination/configured-source/configure.ts:31](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/configured-source/configure.ts#L31)* +*Defined in [lib/source-destination/configured-source/configure.ts:31](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/configured-source/configure.ts#L31)* ___ @@ -27,4 +27,4 @@ ___ • **when**: *any* -*Defined in [lib/source-destination/configured-source/configure.ts:32](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/configured-source/configure.ts#L32)* +*Defined in [lib/source-destination/configured-source/configure.ts:32](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/configured-source/configure.ts#L32)* diff --git a/doc/interfaces/pipesourcetodestinationsresult.md b/doc/interfaces/pipesourcetodestinationsresult.md index dbf38e5e..35ad602e 100644 --- a/doc/interfaces/pipesourcetodestinationsresult.md +++ b/doc/interfaces/pipesourcetodestinationsresult.md @@ -19,7 +19,7 @@ • **bytesWritten**: *number* -*Defined in [lib/multi-write.ts:69](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/multi-write.ts#L69)* +*Defined in [lib/multi-write.ts:69](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/multi-write.ts#L69)* ___ @@ -27,4 +27,4 @@ ___ • **failures**: *Map‹[SourceDestination](../classes/sourcedestination.md), [Error](../classes/notcapable.md#static-error)›* -*Defined in [lib/multi-write.ts:68](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/multi-write.ts#L68)* +*Defined in [lib/multi-write.ts:68](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/multi-write.ts#L68)* diff --git a/doc/interfaces/progressevent.md b/doc/interfaces/progressevent.md index 1520dcd7..c3d2d7ab 100644 --- a/doc/interfaces/progressevent.md +++ b/doc/interfaces/progressevent.md @@ -20,7 +20,7 @@ • **bytes**: *number* -*Defined in [lib/source-destination/progress.ts:29](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/progress.ts#L29)* +*Defined in [lib/source-destination/progress.ts:29](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/progress.ts#L29)* ___ @@ -28,7 +28,7 @@ ___ • **position**: *number* -*Defined in [lib/source-destination/progress.ts:28](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/progress.ts#L28)* +*Defined in [lib/source-destination/progress.ts:28](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/progress.ts#L28)* ___ @@ -36,4 +36,4 @@ ___ • **speed**: *number* -*Defined in [lib/source-destination/progress.ts:30](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/progress.ts#L30)* +*Defined in [lib/source-destination/progress.ts:30](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/progress.ts#L30)* diff --git a/doc/interfaces/sourcetransform.md b/doc/interfaces/sourcetransform.md index a9b374a2..a29b3de1 100644 --- a/doc/interfaces/sourcetransform.md +++ b/doc/interfaces/sourcetransform.md @@ -23,15 +23,19 @@ * [readable](sourcetransform.md#readable) * [readableHighWaterMark](sourcetransform.md#readablehighwatermark) +* [readableLength](sourcetransform.md#readablelength) * [sourceStream](sourcetransform.md#sourcestream) * [writable](sourcetransform.md#writable) * [writableHighWaterMark](sourcetransform.md#writablehighwatermark) +* [writableLength](sourcetransform.md#writablelength) * [defaultMaxListeners](sourcetransform.md#static-defaultmaxlisteners) ### Methods +* [[Symbol.asyncIterator]](sourcetransform.md#[symbol.asynciterator]) * [_destroy](sourcetransform.md#_destroy) * [_final](sourcetransform.md#_final) +* [_flush](sourcetransform.md#_flush) * [_read](sourcetransform.md#_read) * [_transform](sourcetransform.md#_transform) * [_write](sourcetransform.md#_write) @@ -46,6 +50,7 @@ * [isPaused](sourcetransform.md#ispaused) * [listenerCount](sourcetransform.md#listenercount) * [listeners](sourcetransform.md#listeners) +* [off](sourcetransform.md#off) * [on](sourcetransform.md#on) * [once](sourcetransform.md#once) * [pause](sourcetransform.md#pause) @@ -53,6 +58,7 @@ * [prependListener](sourcetransform.md#prependlistener) * [prependOnceListener](sourcetransform.md#prependoncelistener) * [push](sourcetransform.md#push) +* [rawListeners](sourcetransform.md#rawlisteners) * [read](sourcetransform.md#read) * [removeAllListeners](sourcetransform.md#removealllisteners) * [removeListener](sourcetransform.md#removelistener) @@ -77,7 +83,7 @@ *Overrides void* -Defined in node_modules/@types/node/base.d.ts:5622 +Defined in node_modules/@types/node/stream.d.ts:239 **Parameters:** @@ -95,7 +101,7 @@ Name | Type | *Inherited from [SparseFilterStream](../classes/sparsefilterstream.md).[readable](../classes/sparsefilterstream.md#readable)* -Defined in node_modules/@types/node/base.d.ts:5422 +Defined in node_modules/@types/node/stream.d.ts:20 ___ @@ -105,7 +111,17 @@ ___ *Inherited from [SparseFilterStream](../classes/sparsefilterstream.md).[readableHighWaterMark](../classes/sparsefilterstream.md#readablehighwatermark)* -Defined in node_modules/@types/node/base.d.ts:5423 +Defined in node_modules/@types/node/stream.d.ts:21 + +___ + +### readableLength + +• **readableLength**: *number* + +*Inherited from [SparseFilterStream](../classes/sparsefilterstream.md).[readableLength](../classes/sparsefilterstream.md#readablelength)* + +Defined in node_modules/@types/node/stream.d.ts:22 ___ @@ -113,7 +129,7 @@ ___ • **sourceStream**: *ReadableStream* -*Defined in [lib/source-destination/compressed-source.ts:27](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/compressed-source.ts#L27)* +*Defined in [lib/source-destination/compressed-source.ts:27](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/compressed-source.ts#L27)* ___ @@ -123,7 +139,7 @@ ___ *Inherited from [SparseFilterStream](../classes/sparsefilterstream.md).[writable](../classes/sparsefilterstream.md#writable)* -Defined in node_modules/@types/node/base.d.ts:5600 +Defined in node_modules/@types/node/stream.d.ts:209 ___ @@ -133,7 +149,17 @@ ___ *Inherited from [SparseFilterStream](../classes/sparsefilterstream.md).[writableHighWaterMark](../classes/sparsefilterstream.md#writablehighwatermark)* -Defined in node_modules/@types/node/base.d.ts:5601 +Defined in node_modules/@types/node/stream.d.ts:210 + +___ + +### writableLength + +• **writableLength**: *number* + +*Inherited from [SparseFilterStream](../classes/sparsefilterstream.md).[writableLength](../classes/sparsefilterstream.md#writablelength)* + +Defined in node_modules/@types/node/stream.d.ts:211 ___ @@ -143,10 +169,22 @@ ___ *Inherited from [CountingWritable](../classes/countingwritable.md).[defaultMaxListeners](../classes/countingwritable.md#static-defaultmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:896 +Defined in node_modules/@types/node/events.d.ts:18 ## Methods +### [Symbol.asyncIterator] + +▸ **[Symbol.asyncIterator]**(): *AsyncIterableIterator‹any›* + +*Inherited from [SparseFilterStream](../classes/sparsefilterstream.md).[[Symbol.asyncIterator]](../classes/sparsefilterstream.md#[symbol.asynciterator])* + +Defined in node_modules/@types/node/stream.d.ts:95 + +**Returns:** *AsyncIterableIterator‹any›* + +___ + ### _destroy ▸ **_destroy**(`error`: [Error](../classes/notcapable.md#static-error) | null, `callback`: function): *void* @@ -155,7 +193,7 @@ Defined in node_modules/@types/node/base.d.ts:896 *Overrides [SparseReadStream](../classes/sparsereadstream.md).[_destroy](../classes/sparsereadstream.md#_destroy)* -Defined in node_modules/@types/node/base.d.ts:5605 +Defined in node_modules/@types/node/stream.d.ts:215 **Parameters:** @@ -163,13 +201,13 @@ Defined in node_modules/@types/node/base.d.ts:5605 ▪ **callback**: *function* -▸ (`error?`: [Error](../classes/notcapable.md#static-error)): *void* +▸ (`error`: [Error](../classes/notcapable.md#static-error) | null): *void* **Parameters:** Name | Type | ------ | ------ | -`error?` | [Error](../classes/notcapable.md#static-error) | +`error` | [Error](../classes/notcapable.md#static-error) | null | **Returns:** *void* @@ -177,17 +215,41 @@ ___ ### _final -▸ **_final**(`callback`: Function): *void* +▸ **_final**(`callback`: function): *void* *Inherited from [SparseFilterStream](../classes/sparsefilterstream.md).[_final](../classes/sparsefilterstream.md#_final)* -Defined in node_modules/@types/node/base.d.ts:5606 +Defined in node_modules/@types/node/stream.d.ts:216 + +**Parameters:** + +▪ **callback**: *function* + +▸ (`error?`: [Error](../classes/notcapable.md#static-error) | null): *void* + +**Parameters:** + +Name | Type | +------ | ------ | +`error?` | [Error](../classes/notcapable.md#static-error) | null | + +**Returns:** *void* + +___ + +### _flush + +▸ **_flush**(`callback`: TransformCallback): *void* + +*Inherited from [SparseFilterStream](../classes/sparsefilterstream.md).[_flush](../classes/sparsefilterstream.md#_flush)* + +Defined in node_modules/@types/node/stream.d.ts:242 **Parameters:** Name | Type | ------ | ------ | -`callback` | Function | +`callback` | TransformCallback | **Returns:** *void* @@ -199,7 +261,7 @@ ___ *Inherited from [SparseFilterStream](../classes/sparsefilterstream.md).[_read](../classes/sparsefilterstream.md#_read)* -Defined in node_modules/@types/node/base.d.ts:5425 +Defined in node_modules/@types/node/stream.d.ts:24 **Parameters:** @@ -213,11 +275,11 @@ ___ ### _transform -▸ **_transform**(`chunk`: any, `encoding`: string, `callback`: Function): *void* +▸ **_transform**(`chunk`: any, `encoding`: string, `callback`: TransformCallback): *void* *Inherited from [SourceTransform](sourcetransform.md).[_transform](sourcetransform.md#_transform)* -Defined in node_modules/@types/node/base.d.ts:5624 +Defined in node_modules/@types/node/stream.d.ts:241 **Parameters:** @@ -225,7 +287,7 @@ Name | Type | ------ | ------ | `chunk` | any | `encoding` | string | -`callback` | Function | +`callback` | TransformCallback | **Returns:** *void* @@ -237,7 +299,7 @@ ___ *Inherited from [SparseFilterStream](../classes/sparsefilterstream.md).[_write](../classes/sparsefilterstream.md#_write)* -Defined in node_modules/@types/node/base.d.ts:5603 +Defined in node_modules/@types/node/stream.d.ts:213 **Parameters:** @@ -247,13 +309,13 @@ Defined in node_modules/@types/node/base.d.ts:5603 ▪ **callback**: *function* -▸ (`err?`: [Error](../classes/notcapable.md#static-error)): *void* +▸ (`error?`: [Error](../classes/notcapable.md#static-error) | null): *void* **Parameters:** Name | Type | ------ | ------ | -`err?` | [Error](../classes/notcapable.md#static-error) | +`error?` | [Error](../classes/notcapable.md#static-error) | null | **Returns:** *void* @@ -265,7 +327,7 @@ ___ *Inherited from [SparseFilterStream](../classes/sparsefilterstream.md).[_writev](../classes/sparsefilterstream.md#optional-_writev)* -Defined in node_modules/@types/node/base.d.ts:5604 +Defined in node_modules/@types/node/stream.d.ts:214 **Parameters:** @@ -273,13 +335,13 @@ Defined in node_modules/@types/node/base.d.ts:5604 ▪ **callback**: *function* -▸ (`err?`: [Error](../classes/notcapable.md#static-error)): *void* +▸ (`error?`: [Error](../classes/notcapable.md#static-error) | null): *void* **Parameters:** Name | Type | ------ | ------ | -`err?` | [Error](../classes/notcapable.md#static-error) | +`error?` | [Error](../classes/notcapable.md#static-error) | null | **Returns:** *void* @@ -287,13 +349,13 @@ ___ ### addListener -▸ **addListener**(`event`: string, `listener`: function): *this* +▸ **addListener**(`event`: "close", `listener`: function): *this* *Inherited from [SparseFilterStream](../classes/sparsefilterstream.md).[addListener](../classes/sparsefilterstream.md#addlistener)* *Overrides [SourceSource](../classes/sourcesource.md).[addListener](../classes/sourcesource.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:5447 +Defined in node_modules/@types/node/stream.d.ts:46 Event emitter The defined events on documents including: @@ -305,30 +367,6 @@ The defined events on documents including: **Parameters:** -▪ **event**: *string* - -▪ **listener**: *function* - -▸ (...`args`: any[]): *void* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | any[] | - -**Returns:** *this* - -▸ **addListener**(`event`: "close", `listener`: function): *this* - -*Inherited from [SparseFilterStream](../classes/sparsefilterstream.md).[addListener](../classes/sparsefilterstream.md#addlistener)* - -*Overrides [SourceSource](../classes/sourcesource.md).[addListener](../classes/sourcesource.md#addlistener)* - -Defined in node_modules/@types/node/base.d.ts:5448 - -**Parameters:** - ▪ **event**: *"close"* ▪ **listener**: *function* @@ -343,7 +381,7 @@ Defined in node_modules/@types/node/base.d.ts:5448 *Overrides [SourceSource](../classes/sourcesource.md).[addListener](../classes/sourcesource.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:5449 +Defined in node_modules/@types/node/stream.d.ts:47 **Parameters:** @@ -351,13 +389,13 @@ Defined in node_modules/@types/node/base.d.ts:5449 ▪ **listener**: *function* -▸ (`chunk`: [Buffer](alignedlockablebuffer.md#buffer) | string): *void* +▸ (`chunk`: any): *void* **Parameters:** Name | Type | ------ | ------ | -`chunk` | [Buffer](alignedlockablebuffer.md#buffer) | string | +`chunk` | any | **Returns:** *this* @@ -367,7 +405,7 @@ Name | Type | *Overrides [SourceSource](../classes/sourcesource.md).[addListener](../classes/sourcesource.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:5450 +Defined in node_modules/@types/node/stream.d.ts:48 **Parameters:** @@ -385,7 +423,7 @@ Defined in node_modules/@types/node/base.d.ts:5450 *Overrides [SourceSource](../classes/sourcesource.md).[addListener](../classes/sourcesource.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:5451 +Defined in node_modules/@types/node/stream.d.ts:49 **Parameters:** @@ -403,7 +441,7 @@ Defined in node_modules/@types/node/base.d.ts:5451 *Overrides [SourceSource](../classes/sourcesource.md).[addListener](../classes/sourcesource.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:5452 +Defined in node_modules/@types/node/stream.d.ts:50 **Parameters:** @@ -421,6 +459,30 @@ Name | Type | **Returns:** *this* +▸ **addListener**(`event`: string | symbol, `listener`: function): *this* + +*Inherited from [SparseFilterStream](../classes/sparsefilterstream.md).[addListener](../classes/sparsefilterstream.md#addlistener)* + +*Overrides [SourceSource](../classes/sourcesource.md).[addListener](../classes/sourcesource.md#addlistener)* + +Defined in node_modules/@types/node/stream.d.ts:51 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* + +**Parameters:** + +Name | Type | +------ | ------ | +`...args` | any[] | + +**Returns:** *this* + ___ ### cork @@ -429,7 +491,7 @@ ___ *Inherited from [SparseFilterStream](../classes/sparsefilterstream.md).[cork](../classes/sparsefilterstream.md#cork)* -Defined in node_modules/@types/node/base.d.ts:5613 +Defined in node_modules/@types/node/stream.d.ts:223 **Returns:** *void* @@ -441,9 +503,7 @@ ___ *Inherited from [SparseFilterStream](../classes/sparsefilterstream.md).[destroy](../classes/sparsefilterstream.md#destroy)* -*Overrides [SparseReadStream](../classes/sparsereadstream.md).[destroy](../classes/sparsereadstream.md#destroy)* - -Defined in node_modules/@types/node/base.d.ts:5625 +Defined in node_modules/@types/node/stream.d.ts:35 **Parameters:** @@ -457,102 +517,102 @@ ___ ### emit -▸ **emit**(`event`: string | symbol, ...`args`: any[]): *boolean* +▸ **emit**(`event`: "close"): *boolean* *Inherited from [SparseFilterStream](../classes/sparsefilterstream.md).[emit](../classes/sparsefilterstream.md#emit)* *Overrides [SourceSource](../classes/sourcesource.md).[emit](../classes/sourcesource.md#emit)* -Defined in node_modules/@types/node/base.d.ts:5454 +Defined in node_modules/@types/node/stream.d.ts:53 **Parameters:** Name | Type | ------ | ------ | -`event` | string | symbol | -`...args` | any[] | +`event` | "close" | **Returns:** *boolean* -▸ **emit**(`event`: "close"): *boolean* +▸ **emit**(`event`: "data", `chunk`: any): *boolean* *Inherited from [SparseFilterStream](../classes/sparsefilterstream.md).[emit](../classes/sparsefilterstream.md#emit)* *Overrides [SourceSource](../classes/sourcesource.md).[emit](../classes/sourcesource.md#emit)* -Defined in node_modules/@types/node/base.d.ts:5455 +Defined in node_modules/@types/node/stream.d.ts:54 **Parameters:** Name | Type | ------ | ------ | -`event` | "close" | +`event` | "data" | +`chunk` | any | **Returns:** *boolean* -▸ **emit**(`event`: "data", `chunk`: [Buffer](alignedlockablebuffer.md#buffer) | string): *boolean* +▸ **emit**(`event`: "end"): *boolean* *Inherited from [SparseFilterStream](../classes/sparsefilterstream.md).[emit](../classes/sparsefilterstream.md#emit)* *Overrides [SourceSource](../classes/sourcesource.md).[emit](../classes/sourcesource.md#emit)* -Defined in node_modules/@types/node/base.d.ts:5456 +Defined in node_modules/@types/node/stream.d.ts:55 **Parameters:** Name | Type | ------ | ------ | -`event` | "data" | -`chunk` | [Buffer](alignedlockablebuffer.md#buffer) | string | +`event` | "end" | **Returns:** *boolean* -▸ **emit**(`event`: "end"): *boolean* +▸ **emit**(`event`: "readable"): *boolean* *Inherited from [SparseFilterStream](../classes/sparsefilterstream.md).[emit](../classes/sparsefilterstream.md#emit)* *Overrides [SourceSource](../classes/sourcesource.md).[emit](../classes/sourcesource.md#emit)* -Defined in node_modules/@types/node/base.d.ts:5457 +Defined in node_modules/@types/node/stream.d.ts:56 **Parameters:** Name | Type | ------ | ------ | -`event` | "end" | +`event` | "readable" | **Returns:** *boolean* -▸ **emit**(`event`: "readable"): *boolean* +▸ **emit**(`event`: "error", `err`: [Error](../classes/notcapable.md#static-error)): *boolean* *Inherited from [SparseFilterStream](../classes/sparsefilterstream.md).[emit](../classes/sparsefilterstream.md#emit)* *Overrides [SourceSource](../classes/sourcesource.md).[emit](../classes/sourcesource.md#emit)* -Defined in node_modules/@types/node/base.d.ts:5458 +Defined in node_modules/@types/node/stream.d.ts:57 **Parameters:** Name | Type | ------ | ------ | -`event` | "readable" | +`event` | "error" | +`err` | [Error](../classes/notcapable.md#static-error) | **Returns:** *boolean* -▸ **emit**(`event`: "error", `err`: [Error](../classes/notcapable.md#static-error)): *boolean* +▸ **emit**(`event`: string | symbol, ...`args`: any[]): *boolean* *Inherited from [SparseFilterStream](../classes/sparsefilterstream.md).[emit](../classes/sparsefilterstream.md#emit)* *Overrides [SourceSource](../classes/sourcesource.md).[emit](../classes/sourcesource.md#emit)* -Defined in node_modules/@types/node/base.d.ts:5459 +Defined in node_modules/@types/node/stream.d.ts:58 **Parameters:** Name | Type | ------ | ------ | -`event` | "error" | -`err` | [Error](../classes/notcapable.md#static-error) | +`event` | string | symbol | +`...args` | any[] | **Returns:** *boolean* @@ -560,40 +620,40 @@ ___ ### end -▸ **end**(`cb?`: Function): *void* +▸ **end**(`cb?`: undefined | function): *void* *Inherited from [SparseFilterStream](../classes/sparsefilterstream.md).[end](../classes/sparsefilterstream.md#end)* -Defined in node_modules/@types/node/base.d.ts:5610 +Defined in node_modules/@types/node/stream.d.ts:220 **Parameters:** Name | Type | ------ | ------ | -`cb?` | Function | +`cb?` | undefined | function | **Returns:** *void* -▸ **end**(`chunk`: any, `cb?`: Function): *void* +▸ **end**(`chunk`: any, `cb?`: undefined | function): *void* *Inherited from [SparseFilterStream](../classes/sparsefilterstream.md).[end](../classes/sparsefilterstream.md#end)* -Defined in node_modules/@types/node/base.d.ts:5611 +Defined in node_modules/@types/node/stream.d.ts:221 **Parameters:** Name | Type | ------ | ------ | `chunk` | any | -`cb?` | Function | +`cb?` | undefined | function | **Returns:** *void* -▸ **end**(`chunk`: any, `encoding?`: undefined | string, `cb?`: Function): *void* +▸ **end**(`chunk`: any, `encoding?`: undefined | string, `cb?`: undefined | function): *void* *Inherited from [SparseFilterStream](../classes/sparsefilterstream.md).[end](../classes/sparsefilterstream.md#end)* -Defined in node_modules/@types/node/base.d.ts:5612 +Defined in node_modules/@types/node/stream.d.ts:222 **Parameters:** @@ -601,7 +661,7 @@ Name | Type | ------ | ------ | `chunk` | any | `encoding?` | undefined | string | -`cb?` | Function | +`cb?` | undefined | function | **Returns:** *void* @@ -613,7 +673,7 @@ ___ *Inherited from [CountingWritable](../classes/countingwritable.md).[eventNames](../classes/countingwritable.md#eventnames)* -Defined in node_modules/@types/node/base.d.ts:909 +Defined in node_modules/@types/node/events.d.ts:33 **Returns:** *Array‹string | symbol›* @@ -625,7 +685,7 @@ ___ *Inherited from [CountingWritable](../classes/countingwritable.md).[getMaxListeners](../classes/countingwritable.md#getmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:906 +Defined in node_modules/@types/node/events.d.ts:29 **Returns:** *number* @@ -637,7 +697,7 @@ ___ *Inherited from [SparseFilterStream](../classes/sparsefilterstream.md).[isPaused](../classes/sparsefilterstream.md#ispaused)* -Defined in node_modules/@types/node/base.d.ts:5430 +Defined in node_modules/@types/node/stream.d.ts:29 **Returns:** *boolean* @@ -649,7 +709,7 @@ ___ *Inherited from [CountingWritable](../classes/countingwritable.md).[listenerCount](../classes/countingwritable.md#static-listenercount)* -Defined in node_modules/@types/node/base.d.ts:910 +Defined in node_modules/@types/node/events.d.ts:34 **Parameters:** @@ -667,7 +727,7 @@ ___ *Inherited from [CountingWritable](../classes/countingwritable.md).[listeners](../classes/countingwritable.md#listeners)* -Defined in node_modules/@types/node/base.d.ts:907 +Defined in node_modules/@types/node/events.d.ts:30 **Parameters:** @@ -679,19 +739,17 @@ Name | Type | ___ -### on - -▸ **on**(`event`: string, `listener`: function): *this* +### off -*Inherited from [SparseFilterStream](../classes/sparsefilterstream.md).[on](../classes/sparsefilterstream.md#on)* +▸ **off**(`event`: string | symbol, `listener`: function): *this* -*Overrides [SourceSource](../classes/sourcesource.md).[on](../classes/sourcesource.md#on)* +*Inherited from [CountingWritable](../classes/countingwritable.md).[off](../classes/countingwritable.md#off)* -Defined in node_modules/@types/node/base.d.ts:5461 +Defined in node_modules/@types/node/events.d.ts:26 **Parameters:** -▪ **event**: *string* +▪ **event**: *string | symbol* ▪ **listener**: *function* @@ -705,13 +763,17 @@ Name | Type | **Returns:** *this* +___ + +### on + ▸ **on**(`event`: "close", `listener`: function): *this* *Inherited from [SparseFilterStream](../classes/sparsefilterstream.md).[on](../classes/sparsefilterstream.md#on)* *Overrides [SourceSource](../classes/sourcesource.md).[on](../classes/sourcesource.md#on)* -Defined in node_modules/@types/node/base.d.ts:5462 +Defined in node_modules/@types/node/stream.d.ts:60 **Parameters:** @@ -729,7 +791,7 @@ Defined in node_modules/@types/node/base.d.ts:5462 *Overrides [SourceSource](../classes/sourcesource.md).[on](../classes/sourcesource.md#on)* -Defined in node_modules/@types/node/base.d.ts:5463 +Defined in node_modules/@types/node/stream.d.ts:61 **Parameters:** @@ -737,13 +799,13 @@ Defined in node_modules/@types/node/base.d.ts:5463 ▪ **listener**: *function* -▸ (`chunk`: [Buffer](alignedlockablebuffer.md#buffer) | string): *void* +▸ (`chunk`: any): *void* **Parameters:** Name | Type | ------ | ------ | -`chunk` | [Buffer](alignedlockablebuffer.md#buffer) | string | +`chunk` | any | **Returns:** *this* @@ -753,7 +815,7 @@ Name | Type | *Overrides [SourceSource](../classes/sourcesource.md).[on](../classes/sourcesource.md#on)* -Defined in node_modules/@types/node/base.d.ts:5464 +Defined in node_modules/@types/node/stream.d.ts:62 **Parameters:** @@ -771,7 +833,7 @@ Defined in node_modules/@types/node/base.d.ts:5464 *Overrides [SourceSource](../classes/sourcesource.md).[on](../classes/sourcesource.md#on)* -Defined in node_modules/@types/node/base.d.ts:5465 +Defined in node_modules/@types/node/stream.d.ts:63 **Parameters:** @@ -789,7 +851,7 @@ Defined in node_modules/@types/node/base.d.ts:5465 *Overrides [SourceSource](../classes/sourcesource.md).[on](../classes/sourcesource.md#on)* -Defined in node_modules/@types/node/base.d.ts:5466 +Defined in node_modules/@types/node/stream.d.ts:64 **Parameters:** @@ -807,21 +869,17 @@ Name | Type | **Returns:** *this* -___ - -### once - -▸ **once**(`event`: string, `listener`: function): *this* +▸ **on**(`event`: string | symbol, `listener`: function): *this* -*Inherited from [SparseFilterStream](../classes/sparsefilterstream.md).[once](../classes/sparsefilterstream.md#once)* +*Inherited from [SparseFilterStream](../classes/sparsefilterstream.md).[on](../classes/sparsefilterstream.md#on)* -*Overrides [SourceSource](../classes/sourcesource.md).[once](../classes/sourcesource.md#once)* +*Overrides [SourceSource](../classes/sourcesource.md).[on](../classes/sourcesource.md#on)* -Defined in node_modules/@types/node/base.d.ts:5468 +Defined in node_modules/@types/node/stream.d.ts:65 **Parameters:** -▪ **event**: *string* +▪ **event**: *string | symbol* ▪ **listener**: *function* @@ -835,13 +893,17 @@ Name | Type | **Returns:** *this* +___ + +### once + ▸ **once**(`event`: "close", `listener`: function): *this* *Inherited from [SparseFilterStream](../classes/sparsefilterstream.md).[once](../classes/sparsefilterstream.md#once)* *Overrides [SourceSource](../classes/sourcesource.md).[once](../classes/sourcesource.md#once)* -Defined in node_modules/@types/node/base.d.ts:5469 +Defined in node_modules/@types/node/stream.d.ts:67 **Parameters:** @@ -859,7 +921,7 @@ Defined in node_modules/@types/node/base.d.ts:5469 *Overrides [SourceSource](../classes/sourcesource.md).[once](../classes/sourcesource.md#once)* -Defined in node_modules/@types/node/base.d.ts:5470 +Defined in node_modules/@types/node/stream.d.ts:68 **Parameters:** @@ -867,13 +929,13 @@ Defined in node_modules/@types/node/base.d.ts:5470 ▪ **listener**: *function* -▸ (`chunk`: [Buffer](alignedlockablebuffer.md#buffer) | string): *void* +▸ (`chunk`: any): *void* **Parameters:** Name | Type | ------ | ------ | -`chunk` | [Buffer](alignedlockablebuffer.md#buffer) | string | +`chunk` | any | **Returns:** *this* @@ -883,7 +945,7 @@ Name | Type | *Overrides [SourceSource](../classes/sourcesource.md).[once](../classes/sourcesource.md#once)* -Defined in node_modules/@types/node/base.d.ts:5471 +Defined in node_modules/@types/node/stream.d.ts:69 **Parameters:** @@ -901,7 +963,7 @@ Defined in node_modules/@types/node/base.d.ts:5471 *Overrides [SourceSource](../classes/sourcesource.md).[once](../classes/sourcesource.md#once)* -Defined in node_modules/@types/node/base.d.ts:5472 +Defined in node_modules/@types/node/stream.d.ts:70 **Parameters:** @@ -919,7 +981,7 @@ Defined in node_modules/@types/node/base.d.ts:5472 *Overrides [SourceSource](../classes/sourcesource.md).[once](../classes/sourcesource.md#once)* -Defined in node_modules/@types/node/base.d.ts:5473 +Defined in node_modules/@types/node/stream.d.ts:71 **Parameters:** @@ -937,6 +999,30 @@ Name | Type | **Returns:** *this* +▸ **once**(`event`: string | symbol, `listener`: function): *this* + +*Inherited from [SparseFilterStream](../classes/sparsefilterstream.md).[once](../classes/sparsefilterstream.md#once)* + +*Overrides [SourceSource](../classes/sourcesource.md).[once](../classes/sourcesource.md#once)* + +Defined in node_modules/@types/node/stream.d.ts:72 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* + +**Parameters:** + +Name | Type | +------ | ------ | +`...args` | any[] | + +**Returns:** *this* + ___ ### pause @@ -945,7 +1031,7 @@ ___ *Inherited from [SparseFilterStream](../classes/sparsefilterstream.md).[pause](../classes/sparsefilterstream.md#pause)* -Defined in node_modules/@types/node/base.d.ts:5428 +Defined in node_modules/@types/node/stream.d.ts:27 **Returns:** *this* @@ -957,7 +1043,7 @@ ___ *Inherited from [CountingWritable](../classes/countingwritable.md).[pipe](../classes/countingwritable.md#pipe)* -Defined in node_modules/@types/node/base.d.ts:5407 +Defined in node_modules/@types/node/stream.d.ts:5 **Type parameters:** @@ -976,37 +1062,13 @@ ___ ### prependListener -▸ **prependListener**(`event`: string, `listener`: function): *this* - -*Inherited from [SparseFilterStream](../classes/sparsefilterstream.md).[prependListener](../classes/sparsefilterstream.md#prependlistener)* - -*Overrides [SourceSource](../classes/sourcesource.md).[prependListener](../classes/sourcesource.md#prependlistener)* - -Defined in node_modules/@types/node/base.d.ts:5475 - -**Parameters:** - -▪ **event**: *string* - -▪ **listener**: *function* - -▸ (...`args`: any[]): *void* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | any[] | - -**Returns:** *this* - ▸ **prependListener**(`event`: "close", `listener`: function): *this* *Inherited from [SparseFilterStream](../classes/sparsefilterstream.md).[prependListener](../classes/sparsefilterstream.md#prependlistener)* *Overrides [SourceSource](../classes/sourcesource.md).[prependListener](../classes/sourcesource.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:5476 +Defined in node_modules/@types/node/stream.d.ts:74 **Parameters:** @@ -1024,7 +1086,7 @@ Defined in node_modules/@types/node/base.d.ts:5476 *Overrides [SourceSource](../classes/sourcesource.md).[prependListener](../classes/sourcesource.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:5477 +Defined in node_modules/@types/node/stream.d.ts:75 **Parameters:** @@ -1032,13 +1094,13 @@ Defined in node_modules/@types/node/base.d.ts:5477 ▪ **listener**: *function* -▸ (`chunk`: [Buffer](alignedlockablebuffer.md#buffer) | string): *void* +▸ (`chunk`: any): *void* **Parameters:** Name | Type | ------ | ------ | -`chunk` | [Buffer](alignedlockablebuffer.md#buffer) | string | +`chunk` | any | **Returns:** *this* @@ -1048,7 +1110,7 @@ Name | Type | *Overrides [SourceSource](../classes/sourcesource.md).[prependListener](../classes/sourcesource.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:5478 +Defined in node_modules/@types/node/stream.d.ts:76 **Parameters:** @@ -1066,7 +1128,7 @@ Defined in node_modules/@types/node/base.d.ts:5478 *Overrides [SourceSource](../classes/sourcesource.md).[prependListener](../classes/sourcesource.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:5479 +Defined in node_modules/@types/node/stream.d.ts:77 **Parameters:** @@ -1084,7 +1146,7 @@ Defined in node_modules/@types/node/base.d.ts:5479 *Overrides [SourceSource](../classes/sourcesource.md).[prependListener](../classes/sourcesource.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:5480 +Defined in node_modules/@types/node/stream.d.ts:78 **Parameters:** @@ -1102,21 +1164,17 @@ Name | Type | **Returns:** *this* -___ - -### prependOnceListener +▸ **prependListener**(`event`: string | symbol, `listener`: function): *this* -▸ **prependOnceListener**(`event`: string, `listener`: function): *this* - -*Inherited from [SparseFilterStream](../classes/sparsefilterstream.md).[prependOnceListener](../classes/sparsefilterstream.md#prependoncelistener)* +*Inherited from [SparseFilterStream](../classes/sparsefilterstream.md).[prependListener](../classes/sparsefilterstream.md#prependlistener)* -*Overrides [SourceSource](../classes/sourcesource.md).[prependOnceListener](../classes/sourcesource.md#prependoncelistener)* +*Overrides [SourceSource](../classes/sourcesource.md).[prependListener](../classes/sourcesource.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:5482 +Defined in node_modules/@types/node/stream.d.ts:79 **Parameters:** -▪ **event**: *string* +▪ **event**: *string | symbol* ▪ **listener**: *function* @@ -1130,13 +1188,17 @@ Name | Type | **Returns:** *this* +___ + +### prependOnceListener + ▸ **prependOnceListener**(`event`: "close", `listener`: function): *this* *Inherited from [SparseFilterStream](../classes/sparsefilterstream.md).[prependOnceListener](../classes/sparsefilterstream.md#prependoncelistener)* *Overrides [SourceSource](../classes/sourcesource.md).[prependOnceListener](../classes/sourcesource.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:5483 +Defined in node_modules/@types/node/stream.d.ts:81 **Parameters:** @@ -1154,7 +1216,7 @@ Defined in node_modules/@types/node/base.d.ts:5483 *Overrides [SourceSource](../classes/sourcesource.md).[prependOnceListener](../classes/sourcesource.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:5484 +Defined in node_modules/@types/node/stream.d.ts:82 **Parameters:** @@ -1162,13 +1224,13 @@ Defined in node_modules/@types/node/base.d.ts:5484 ▪ **listener**: *function* -▸ (`chunk`: [Buffer](alignedlockablebuffer.md#buffer) | string): *void* +▸ (`chunk`: any): *void* **Parameters:** Name | Type | ------ | ------ | -`chunk` | [Buffer](alignedlockablebuffer.md#buffer) | string | +`chunk` | any | **Returns:** *this* @@ -1178,7 +1240,7 @@ Name | Type | *Overrides [SourceSource](../classes/sourcesource.md).[prependOnceListener](../classes/sourcesource.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:5485 +Defined in node_modules/@types/node/stream.d.ts:83 **Parameters:** @@ -1196,7 +1258,7 @@ Defined in node_modules/@types/node/base.d.ts:5485 *Overrides [SourceSource](../classes/sourcesource.md).[prependOnceListener](../classes/sourcesource.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:5486 +Defined in node_modules/@types/node/stream.d.ts:84 **Parameters:** @@ -1214,7 +1276,7 @@ Defined in node_modules/@types/node/base.d.ts:5486 *Overrides [SourceSource](../classes/sourcesource.md).[prependOnceListener](../classes/sourcesource.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:5487 +Defined in node_modules/@types/node/stream.d.ts:85 **Parameters:** @@ -1232,6 +1294,30 @@ Name | Type | **Returns:** *this* +▸ **prependOnceListener**(`event`: string | symbol, `listener`: function): *this* + +*Inherited from [SparseFilterStream](../classes/sparsefilterstream.md).[prependOnceListener](../classes/sparsefilterstream.md#prependoncelistener)* + +*Overrides [SourceSource](../classes/sourcesource.md).[prependOnceListener](../classes/sourcesource.md#prependoncelistener)* + +Defined in node_modules/@types/node/stream.d.ts:86 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* + +**Parameters:** + +Name | Type | +------ | ------ | +`...args` | any[] | + +**Returns:** *this* + ___ ### push @@ -1240,7 +1326,7 @@ ___ *Inherited from [SparseFilterStream](../classes/sparsefilterstream.md).[push](../classes/sparsefilterstream.md#push)* -Defined in node_modules/@types/node/base.d.ts:5434 +Defined in node_modules/@types/node/stream.d.ts:33 **Parameters:** @@ -1253,13 +1339,31 @@ Name | Type | ___ +### rawListeners + +▸ **rawListeners**(`event`: string | symbol): *Function[]* + +*Inherited from [CountingWritable](../classes/countingwritable.md).[rawListeners](../classes/countingwritable.md#rawlisteners)* + +Defined in node_modules/@types/node/events.d.ts:31 + +**Parameters:** + +Name | Type | +------ | ------ | +`event` | string | symbol | + +**Returns:** *Function[]* + +___ + ### read ▸ **read**(`size?`: undefined | number): *any* *Inherited from [SparseFilterStream](../classes/sparsefilterstream.md).[read](../classes/sparsefilterstream.md#read)* -Defined in node_modules/@types/node/base.d.ts:5426 +Defined in node_modules/@types/node/stream.d.ts:25 **Parameters:** @@ -1277,7 +1381,7 @@ ___ *Inherited from [CountingWritable](../classes/countingwritable.md).[removeAllListeners](../classes/countingwritable.md#removealllisteners)* -Defined in node_modules/@types/node/base.d.ts:904 +Defined in node_modules/@types/node/events.d.ts:27 **Parameters:** @@ -1291,37 +1395,13 @@ ___ ### removeListener -▸ **removeListener**(`event`: string, `listener`: function): *this* - -*Inherited from [SparseFilterStream](../classes/sparsefilterstream.md).[removeListener](../classes/sparsefilterstream.md#removelistener)* - -*Overrides [SourceSource](../classes/sourcesource.md).[removeListener](../classes/sourcesource.md#removelistener)* - -Defined in node_modules/@types/node/base.d.ts:5489 - -**Parameters:** - -▪ **event**: *string* - -▪ **listener**: *function* - -▸ (...`args`: any[]): *void* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | any[] | - -**Returns:** *this* - ▸ **removeListener**(`event`: "close", `listener`: function): *this* *Inherited from [SparseFilterStream](../classes/sparsefilterstream.md).[removeListener](../classes/sparsefilterstream.md#removelistener)* *Overrides [SourceSource](../classes/sourcesource.md).[removeListener](../classes/sourcesource.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:5490 +Defined in node_modules/@types/node/stream.d.ts:88 **Parameters:** @@ -1339,7 +1419,7 @@ Defined in node_modules/@types/node/base.d.ts:5490 *Overrides [SourceSource](../classes/sourcesource.md).[removeListener](../classes/sourcesource.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:5491 +Defined in node_modules/@types/node/stream.d.ts:89 **Parameters:** @@ -1347,13 +1427,13 @@ Defined in node_modules/@types/node/base.d.ts:5491 ▪ **listener**: *function* -▸ (`chunk`: [Buffer](alignedlockablebuffer.md#buffer) | string): *void* +▸ (`chunk`: any): *void* **Parameters:** Name | Type | ------ | ------ | -`chunk` | [Buffer](alignedlockablebuffer.md#buffer) | string | +`chunk` | any | **Returns:** *this* @@ -1363,7 +1443,7 @@ Name | Type | *Overrides [SourceSource](../classes/sourcesource.md).[removeListener](../classes/sourcesource.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:5492 +Defined in node_modules/@types/node/stream.d.ts:90 **Parameters:** @@ -1381,7 +1461,7 @@ Defined in node_modules/@types/node/base.d.ts:5492 *Overrides [SourceSource](../classes/sourcesource.md).[removeListener](../classes/sourcesource.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:5493 +Defined in node_modules/@types/node/stream.d.ts:91 **Parameters:** @@ -1399,7 +1479,7 @@ Defined in node_modules/@types/node/base.d.ts:5493 *Overrides [SourceSource](../classes/sourcesource.md).[removeListener](../classes/sourcesource.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:5494 +Defined in node_modules/@types/node/stream.d.ts:92 **Parameters:** @@ -1417,6 +1497,30 @@ Name | Type | **Returns:** *this* +▸ **removeListener**(`event`: string | symbol, `listener`: function): *this* + +*Inherited from [SparseFilterStream](../classes/sparsefilterstream.md).[removeListener](../classes/sparsefilterstream.md#removelistener)* + +*Overrides [SourceSource](../classes/sourcesource.md).[removeListener](../classes/sourcesource.md#removelistener)* + +Defined in node_modules/@types/node/stream.d.ts:93 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* + +**Parameters:** + +Name | Type | +------ | ------ | +`...args` | any[] | + +**Returns:** *this* + ___ ### resume @@ -1425,7 +1529,7 @@ ___ *Inherited from [SparseFilterStream](../classes/sparsefilterstream.md).[resume](../classes/sparsefilterstream.md#resume)* -Defined in node_modules/@types/node/base.d.ts:5429 +Defined in node_modules/@types/node/stream.d.ts:28 **Returns:** *this* @@ -1437,7 +1541,7 @@ ___ *Inherited from [SparseFilterStream](../classes/sparsefilterstream.md).[setDefaultEncoding](../classes/sparsefilterstream.md#setdefaultencoding)* -Defined in node_modules/@types/node/base.d.ts:5609 +Defined in node_modules/@types/node/stream.d.ts:219 **Parameters:** @@ -1455,7 +1559,7 @@ ___ *Inherited from [SparseFilterStream](../classes/sparsefilterstream.md).[setEncoding](../classes/sparsefilterstream.md#setencoding)* -Defined in node_modules/@types/node/base.d.ts:5427 +Defined in node_modules/@types/node/stream.d.ts:26 **Parameters:** @@ -1473,7 +1577,7 @@ ___ *Inherited from [CountingWritable](../classes/countingwritable.md).[setMaxListeners](../classes/countingwritable.md#setmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:905 +Defined in node_modules/@types/node/events.d.ts:28 **Parameters:** @@ -1491,7 +1595,7 @@ ___ *Inherited from [SparseFilterStream](../classes/sparsefilterstream.md).[uncork](../classes/sparsefilterstream.md#uncork)* -Defined in node_modules/@types/node/base.d.ts:5614 +Defined in node_modules/@types/node/stream.d.ts:224 **Returns:** *void* @@ -1499,21 +1603,17 @@ ___ ### unpipe -▸ **unpipe**<**T**>(`destination?`: T): *this* +▸ **unpipe**(`destination?`: NodeJS.WritableStream): *this* *Inherited from [SparseFilterStream](../classes/sparsefilterstream.md).[unpipe](../classes/sparsefilterstream.md#unpipe)* -Defined in node_modules/@types/node/base.d.ts:5431 - -**Type parameters:** - -▪ **T**: *WritableStream* +Defined in node_modules/@types/node/stream.d.ts:30 **Parameters:** Name | Type | ------ | ------ | -`destination?` | T | +`destination?` | NodeJS.WritableStream | **Returns:** *this* @@ -1525,7 +1625,7 @@ ___ *Inherited from [SparseFilterStream](../classes/sparsefilterstream.md).[unshift](../classes/sparsefilterstream.md#unshift)* -Defined in node_modules/@types/node/base.d.ts:5432 +Defined in node_modules/@types/node/stream.d.ts:31 **Parameters:** @@ -1543,7 +1643,7 @@ ___ *Inherited from [SparseFilterStream](../classes/sparsefilterstream.md).[wrap](../classes/sparsefilterstream.md#wrap)* -Defined in node_modules/@types/node/base.d.ts:5433 +Defined in node_modules/@types/node/stream.d.ts:32 **Parameters:** @@ -1557,26 +1657,26 @@ ___ ### write -▸ **write**(`chunk`: any, `cb?`: Function): *boolean* +▸ **write**(`chunk`: any, `cb?`: undefined | function): *boolean* *Inherited from [SparseFilterStream](../classes/sparsefilterstream.md).[write](../classes/sparsefilterstream.md#write)* -Defined in node_modules/@types/node/base.d.ts:5607 +Defined in node_modules/@types/node/stream.d.ts:217 **Parameters:** Name | Type | ------ | ------ | `chunk` | any | -`cb?` | Function | +`cb?` | undefined | function | **Returns:** *boolean* -▸ **write**(`chunk`: any, `encoding?`: undefined | string, `cb?`: Function): *boolean* +▸ **write**(`chunk`: any, `encoding?`: undefined | string, `cb?`: undefined | function): *boolean* *Inherited from [SparseFilterStream](../classes/sparsefilterstream.md).[write](../classes/sparsefilterstream.md#write)* -Defined in node_modules/@types/node/base.d.ts:5608 +Defined in node_modules/@types/node/stream.d.ts:218 **Parameters:** @@ -1584,7 +1684,7 @@ Name | Type | ------ | ------ | `chunk` | any | `encoding?` | undefined | string | -`cb?` | Function | +`cb?` | undefined | function | **Returns:** *boolean* @@ -1596,7 +1696,9 @@ ___ *Inherited from [CountingWritable](../classes/countingwritable.md).[listenerCount](../classes/countingwritable.md#static-listenercount)* -Defined in node_modules/@types/node/base.d.ts:895 +Defined in node_modules/@types/node/events.d.ts:17 + +**`deprecated`** since v4.0.0 **Parameters:** diff --git a/doc/interfaces/sparsereadable.md b/doc/interfaces/sparsereadable.md index a4931158..b2bbbfd7 100644 --- a/doc/interfaces/sparsereadable.md +++ b/doc/interfaces/sparsereadable.md @@ -23,6 +23,7 @@ ### Methods +* [[Symbol.asyncIterator]](sparsereadable.md#[symbol.asynciterator]) * [addListener](sparsereadable.md#addlistener) * [emit](sparsereadable.md#emit) * [eventNames](sparsereadable.md#eventnames) @@ -30,6 +31,7 @@ * [isPaused](sparsereadable.md#ispaused) * [listenerCount](sparsereadable.md#listenercount) * [listeners](sparsereadable.md#listeners) +* [off](sparsereadable.md#off) * [on](sparsereadable.md#on) * [once](sparsereadable.md#once) * [pause](sparsereadable.md#pause) @@ -37,6 +39,7 @@ * [prependListener](sparsereadable.md#prependlistener) * [prependOnceListener](sparsereadable.md#prependoncelistener) * [push](sparsereadable.md#push) +* [rawListeners](sparsereadable.md#rawlisteners) * [read](sparsereadable.md#read) * [removeAllListeners](sparsereadable.md#removealllisteners) * [removeListener](sparsereadable.md#removelistener) @@ -53,7 +56,7 @@ • **blocks**: *[BlocksWithChecksum](blockswithchecksum.md)[]* -*Defined in [lib/sparse-stream/shared.ts:50](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/sparse-stream/shared.ts#L50)* +*Defined in [lib/sparse-stream/shared.ts:50](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/sparse-stream/shared.ts#L50)* ___ @@ -63,17 +66,29 @@ ___ *Inherited from [SparseReadable](sparsereadable.md).[readable](sparsereadable.md#readable)* -Defined in node_modules/@types/node/base.d.ts:401 +Defined in node_modules/@types/node/globals.d.ts:569 ## Methods +### [Symbol.asyncIterator] + +▸ **[Symbol.asyncIterator]**(): *AsyncIterableIterator‹string | [Buffer](alignedlockablebuffer.md#buffer)›* + +*Inherited from [SparseReadable](sparsereadable.md).[[Symbol.asyncIterator]](sparsereadable.md#[symbol.asynciterator])* + +Defined in node_modules/@types/node/globals.d.ts:580 + +**Returns:** *AsyncIterableIterator‹string | [Buffer](alignedlockablebuffer.md#buffer)›* + +___ + ### addListener ▸ **addListener**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SparseReadable](sparsereadable.md).[addListener](sparsereadable.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:384 +Defined in node_modules/@types/node/globals.d.ts:550 **Parameters:** @@ -99,7 +114,7 @@ ___ *Inherited from [SparseReadable](sparsereadable.md).[emit](sparsereadable.md#emit)* -Defined in node_modules/@types/node/base.d.ts:392 +Defined in node_modules/@types/node/globals.d.ts:560 **Parameters:** @@ -118,7 +133,7 @@ ___ *Inherited from [SparseReadable](sparsereadable.md).[eventNames](sparsereadable.md#eventnames)* -Defined in node_modules/@types/node/base.d.ts:397 +Defined in node_modules/@types/node/globals.d.ts:565 **Returns:** *Array‹string | symbol›* @@ -130,7 +145,7 @@ ___ *Inherited from [SparseReadable](sparsereadable.md).[getMaxListeners](sparsereadable.md#getmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:390 +Defined in node_modules/@types/node/globals.d.ts:557 **Returns:** *number* @@ -142,7 +157,7 @@ ___ *Inherited from [SparseReadable](sparsereadable.md).[isPaused](sparsereadable.md#ispaused)* -Defined in node_modules/@types/node/base.d.ts:406 +Defined in node_modules/@types/node/globals.d.ts:574 **Returns:** *boolean* @@ -154,7 +169,7 @@ ___ *Inherited from [SparseReadable](sparsereadable.md).[listenerCount](sparsereadable.md#listenercount)* -Defined in node_modules/@types/node/base.d.ts:393 +Defined in node_modules/@types/node/globals.d.ts:561 **Parameters:** @@ -172,7 +187,7 @@ ___ *Inherited from [SparseReadable](sparsereadable.md).[listeners](sparsereadable.md#listeners)* -Defined in node_modules/@types/node/base.d.ts:391 +Defined in node_modules/@types/node/globals.d.ts:558 **Parameters:** @@ -184,13 +199,39 @@ Name | Type | ___ +### off + +▸ **off**(`event`: string | symbol, `listener`: function): *this* + +*Inherited from [SparseReadable](sparsereadable.md).[off](sparsereadable.md#off)* + +Defined in node_modules/@types/node/globals.d.ts:554 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* + +**Parameters:** + +Name | Type | +------ | ------ | +`...args` | any[] | + +**Returns:** *this* + +___ + ### on ▸ **on**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SparseReadable](sparsereadable.md).[on](sparsereadable.md#on)* -Defined in node_modules/@types/node/base.d.ts:385 +Defined in node_modules/@types/node/globals.d.ts:551 **Parameters:** @@ -216,7 +257,7 @@ ___ *Inherited from [SparseReadable](sparsereadable.md).[once](sparsereadable.md#once)* -Defined in node_modules/@types/node/base.d.ts:386 +Defined in node_modules/@types/node/globals.d.ts:552 **Parameters:** @@ -242,7 +283,7 @@ ___ *Inherited from [SparseReadable](sparsereadable.md).[pause](sparsereadable.md#pause)* -Defined in node_modules/@types/node/base.d.ts:404 +Defined in node_modules/@types/node/globals.d.ts:572 **Returns:** *this* @@ -254,7 +295,7 @@ ___ *Inherited from [SparseReadable](sparsereadable.md).[pipe](sparsereadable.md#pipe)* -Defined in node_modules/@types/node/base.d.ts:407 +Defined in node_modules/@types/node/globals.d.ts:575 **Type parameters:** @@ -277,7 +318,7 @@ ___ *Inherited from [SparseReadable](sparsereadable.md).[prependListener](sparsereadable.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:395 +Defined in node_modules/@types/node/globals.d.ts:563 **Parameters:** @@ -303,7 +344,7 @@ ___ *Inherited from [SparseReadable](sparsereadable.md).[prependOnceListener](sparsereadable.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:396 +Defined in node_modules/@types/node/globals.d.ts:564 **Parameters:** @@ -327,7 +368,7 @@ ___ ▸ **push**(`chunk`: [SparseStreamChunk](sparsestreamchunk.md)): *boolean* -*Defined in [lib/sparse-stream/shared.ts:51](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/sparse-stream/shared.ts#L51)* +*Defined in [lib/sparse-stream/shared.ts:51](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/sparse-stream/shared.ts#L51)* **Parameters:** @@ -339,13 +380,31 @@ Name | Type | ___ +### rawListeners + +▸ **rawListeners**(`event`: string | symbol): *Function[]* + +*Inherited from [SparseReadable](sparsereadable.md).[rawListeners](sparsereadable.md#rawlisteners)* + +Defined in node_modules/@types/node/globals.d.ts:559 + +**Parameters:** + +Name | Type | +------ | ------ | +`event` | string | symbol | + +**Returns:** *Function[]* + +___ + ### read ▸ **read**(`size?`: undefined | number): *string | [Buffer](alignedlockablebuffer.md#buffer)* *Inherited from [SparseReadable](sparsereadable.md).[read](sparsereadable.md#read)* -Defined in node_modules/@types/node/base.d.ts:402 +Defined in node_modules/@types/node/globals.d.ts:570 **Parameters:** @@ -363,7 +422,7 @@ ___ *Inherited from [SparseReadable](sparsereadable.md).[removeAllListeners](sparsereadable.md#removealllisteners)* -Defined in node_modules/@types/node/base.d.ts:388 +Defined in node_modules/@types/node/globals.d.ts:555 **Parameters:** @@ -381,7 +440,7 @@ ___ *Inherited from [SparseReadable](sparsereadable.md).[removeListener](sparsereadable.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:387 +Defined in node_modules/@types/node/globals.d.ts:553 **Parameters:** @@ -407,7 +466,7 @@ ___ *Inherited from [SparseReadable](sparsereadable.md).[resume](sparsereadable.md#resume)* -Defined in node_modules/@types/node/base.d.ts:405 +Defined in node_modules/@types/node/globals.d.ts:573 **Returns:** *this* @@ -419,7 +478,7 @@ ___ *Inherited from [SparseReadable](sparsereadable.md).[setEncoding](sparsereadable.md#setencoding)* -Defined in node_modules/@types/node/base.d.ts:403 +Defined in node_modules/@types/node/globals.d.ts:571 **Parameters:** @@ -437,7 +496,7 @@ ___ *Inherited from [SparseReadable](sparsereadable.md).[setMaxListeners](sparsereadable.md#setmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:389 +Defined in node_modules/@types/node/globals.d.ts:556 **Parameters:** @@ -451,21 +510,17 @@ ___ ### unpipe -▸ **unpipe**<**T**>(`destination?`: T): *this* +▸ **unpipe**(`destination?`: WritableStream): *this* *Inherited from [SparseReadable](sparsereadable.md).[unpipe](sparsereadable.md#unpipe)* -Defined in node_modules/@types/node/base.d.ts:408 - -**Type parameters:** - -▪ **T**: *WritableStream* +Defined in node_modules/@types/node/globals.d.ts:576 **Parameters:** Name | Type | ------ | ------ | -`destination?` | T | +`destination?` | WritableStream | **Returns:** *this* @@ -477,7 +532,7 @@ ___ *Inherited from [SparseReadable](sparsereadable.md).[unshift](sparsereadable.md#unshift)* -Defined in node_modules/@types/node/base.d.ts:409 +Defined in node_modules/@types/node/globals.d.ts:577 **Parameters:** @@ -491,7 +546,7 @@ Name | Type | *Inherited from [SparseReadable](sparsereadable.md).[unshift](sparsereadable.md#unshift)* -Defined in node_modules/@types/node/base.d.ts:410 +Defined in node_modules/@types/node/globals.d.ts:578 **Parameters:** @@ -509,7 +564,7 @@ ___ *Inherited from [SparseReadable](sparsereadable.md).[wrap](sparsereadable.md#wrap)* -Defined in node_modules/@types/node/base.d.ts:411 +Defined in node_modules/@types/node/globals.d.ts:579 **Parameters:** diff --git a/doc/interfaces/sparsereaderstate.md b/doc/interfaces/sparsereaderstate.md index b554d01c..d93bfdec 100644 --- a/doc/interfaces/sparsereaderstate.md +++ b/doc/interfaces/sparsereaderstate.md @@ -20,7 +20,7 @@ • **block**: *[BlocksWithChecksum](blockswithchecksum.md)* -*Defined in [lib/sparse-stream/shared.ts:92](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/sparse-stream/shared.ts#L92)* +*Defined in [lib/sparse-stream/shared.ts:92](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/sparse-stream/shared.ts#L92)* ___ @@ -28,7 +28,7 @@ ___ • **hasher**? : *[AnyHasher](../README.md#anyhasher)* -*Defined in [lib/sparse-stream/shared.ts:94](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/sparse-stream/shared.ts#L94)* +*Defined in [lib/sparse-stream/shared.ts:94](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/sparse-stream/shared.ts#L94)* ___ @@ -36,4 +36,4 @@ ___ • **subBlock**: *[Block](block.md)* -*Defined in [lib/sparse-stream/shared.ts:93](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/sparse-stream/shared.ts#L93)* +*Defined in [lib/sparse-stream/shared.ts:93](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/sparse-stream/shared.ts#L93)* diff --git a/doc/interfaces/sparsestreamchunk.md b/doc/interfaces/sparsestreamchunk.md index 672ca47a..6cc30fa8 100644 --- a/doc/interfaces/sparsestreamchunk.md +++ b/doc/interfaces/sparsestreamchunk.md @@ -19,7 +19,7 @@ • **buffer**: *[Buffer](alignedlockablebuffer.md#buffer) | [AlignedLockableBuffer](alignedlockablebuffer.md)* -*Defined in [lib/sparse-stream/shared.ts:45](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/sparse-stream/shared.ts#L45)* +*Defined in [lib/sparse-stream/shared.ts:45](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/sparse-stream/shared.ts#L45)* ___ @@ -27,4 +27,4 @@ ___ • **position**: *number* -*Defined in [lib/sparse-stream/shared.ts:46](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/sparse-stream/shared.ts#L46)* +*Defined in [lib/sparse-stream/shared.ts:46](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/sparse-stream/shared.ts#L46)* diff --git a/doc/interfaces/sparsewritable.md b/doc/interfaces/sparsewritable.md index 5fab226d..6c60f59f 100644 --- a/doc/interfaces/sparsewritable.md +++ b/doc/interfaces/sparsewritable.md @@ -29,10 +29,12 @@ * [getMaxListeners](sparsewritable.md#getmaxlisteners) * [listenerCount](sparsewritable.md#listenercount) * [listeners](sparsewritable.md#listeners) +* [off](sparsewritable.md#off) * [on](sparsewritable.md#on) * [once](sparsewritable.md#once) * [prependListener](sparsewritable.md#prependlistener) * [prependOnceListener](sparsewritable.md#prependoncelistener) +* [rawListeners](sparsewritable.md#rawlisteners) * [removeAllListeners](sparsewritable.md#removealllisteners) * [removeListener](sparsewritable.md#removelistener) * [setMaxListeners](sparsewritable.md#setmaxlisteners) @@ -46,7 +48,7 @@ *Inherited from [SparseWritable](sparsewritable.md).[writable](sparsewritable.md#writable)* -Defined in node_modules/@types/node/base.d.ts:415 +Defined in node_modules/@types/node/globals.d.ts:584 ## Methods @@ -54,7 +56,7 @@ Defined in node_modules/@types/node/base.d.ts:415 ▸ **_write**(`chunk`: [SparseStreamChunk](sparsestreamchunk.md), `encoding`: string, `callback`: function): *void* -*Defined in [lib/sparse-stream/shared.ts:55](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/sparse-stream/shared.ts#L55)* +*Defined in [lib/sparse-stream/shared.ts:55](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/sparse-stream/shared.ts#L55)* **Parameters:** @@ -64,13 +66,13 @@ Defined in node_modules/@types/node/base.d.ts:415 ▪ **callback**: *function* -▸ (`err?`: [Error](../classes/notcapable.md#static-error) | void): *void* +▸ (`err?`: [Error](../classes/notcapable.md#static-error) | null): *void* **Parameters:** Name | Type | ------ | ------ | -`err?` | [Error](../classes/notcapable.md#static-error) | void | +`err?` | [Error](../classes/notcapable.md#static-error) | null | **Returns:** *void* @@ -82,7 +84,7 @@ ___ *Inherited from [SparseReadable](sparsereadable.md).[addListener](sparsereadable.md#addlistener)* -Defined in node_modules/@types/node/base.d.ts:384 +Defined in node_modules/@types/node/globals.d.ts:550 **Parameters:** @@ -108,7 +110,7 @@ ___ *Inherited from [SparseReadable](sparsereadable.md).[emit](sparsereadable.md#emit)* -Defined in node_modules/@types/node/base.d.ts:392 +Defined in node_modules/@types/node/globals.d.ts:560 **Parameters:** @@ -127,7 +129,7 @@ ___ *Inherited from [SparseWritable](sparsewritable.md).[end](sparsewritable.md#end)* -Defined in node_modules/@types/node/base.d.ts:418 +Defined in node_modules/@types/node/globals.d.ts:587 **Parameters:** @@ -141,7 +143,7 @@ Name | Type | *Inherited from [SparseWritable](sparsewritable.md).[end](sparsewritable.md#end)* -Defined in node_modules/@types/node/base.d.ts:419 +Defined in node_modules/@types/node/globals.d.ts:588 **Parameters:** @@ -156,7 +158,7 @@ Name | Type | *Inherited from [SparseWritable](sparsewritable.md).[end](sparsewritable.md#end)* -Defined in node_modules/@types/node/base.d.ts:420 +Defined in node_modules/@types/node/globals.d.ts:589 **Parameters:** @@ -171,7 +173,7 @@ Name | Type | *Inherited from [SparseWritable](sparsewritable.md).[end](sparsewritable.md#end)* -Defined in node_modules/@types/node/base.d.ts:421 +Defined in node_modules/@types/node/globals.d.ts:590 **Parameters:** @@ -191,7 +193,7 @@ ___ *Inherited from [SparseReadable](sparsereadable.md).[eventNames](sparsereadable.md#eventnames)* -Defined in node_modules/@types/node/base.d.ts:397 +Defined in node_modules/@types/node/globals.d.ts:565 **Returns:** *Array‹string | symbol›* @@ -203,7 +205,7 @@ ___ *Inherited from [SparseReadable](sparsereadable.md).[getMaxListeners](sparsereadable.md#getmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:390 +Defined in node_modules/@types/node/globals.d.ts:557 **Returns:** *number* @@ -215,7 +217,7 @@ ___ *Inherited from [SparseReadable](sparsereadable.md).[listenerCount](sparsereadable.md#listenercount)* -Defined in node_modules/@types/node/base.d.ts:393 +Defined in node_modules/@types/node/globals.d.ts:561 **Parameters:** @@ -233,7 +235,7 @@ ___ *Inherited from [SparseReadable](sparsereadable.md).[listeners](sparsereadable.md#listeners)* -Defined in node_modules/@types/node/base.d.ts:391 +Defined in node_modules/@types/node/globals.d.ts:558 **Parameters:** @@ -245,13 +247,39 @@ Name | Type | ___ +### off + +▸ **off**(`event`: string | symbol, `listener`: function): *this* + +*Inherited from [SparseReadable](sparsereadable.md).[off](sparsereadable.md#off)* + +Defined in node_modules/@types/node/globals.d.ts:554 + +**Parameters:** + +▪ **event**: *string | symbol* + +▪ **listener**: *function* + +▸ (...`args`: any[]): *void* + +**Parameters:** + +Name | Type | +------ | ------ | +`...args` | any[] | + +**Returns:** *this* + +___ + ### on ▸ **on**(`event`: string | symbol, `listener`: function): *this* *Inherited from [SparseReadable](sparsereadable.md).[on](sparsereadable.md#on)* -Defined in node_modules/@types/node/base.d.ts:385 +Defined in node_modules/@types/node/globals.d.ts:551 **Parameters:** @@ -277,7 +305,7 @@ ___ *Inherited from [SparseReadable](sparsereadable.md).[once](sparsereadable.md#once)* -Defined in node_modules/@types/node/base.d.ts:386 +Defined in node_modules/@types/node/globals.d.ts:552 **Parameters:** @@ -303,7 +331,7 @@ ___ *Inherited from [SparseReadable](sparsereadable.md).[prependListener](sparsereadable.md#prependlistener)* -Defined in node_modules/@types/node/base.d.ts:395 +Defined in node_modules/@types/node/globals.d.ts:563 **Parameters:** @@ -329,7 +357,7 @@ ___ *Inherited from [SparseReadable](sparsereadable.md).[prependOnceListener](sparsereadable.md#prependoncelistener)* -Defined in node_modules/@types/node/base.d.ts:396 +Defined in node_modules/@types/node/globals.d.ts:564 **Parameters:** @@ -349,13 +377,31 @@ Name | Type | ___ +### rawListeners + +▸ **rawListeners**(`event`: string | symbol): *Function[]* + +*Inherited from [SparseReadable](sparsereadable.md).[rawListeners](sparsereadable.md#rawlisteners)* + +Defined in node_modules/@types/node/globals.d.ts:559 + +**Parameters:** + +Name | Type | +------ | ------ | +`event` | string | symbol | + +**Returns:** *Function[]* + +___ + ### removeAllListeners ▸ **removeAllListeners**(`event?`: string | symbol): *this* *Inherited from [SparseReadable](sparsereadable.md).[removeAllListeners](sparsereadable.md#removealllisteners)* -Defined in node_modules/@types/node/base.d.ts:388 +Defined in node_modules/@types/node/globals.d.ts:555 **Parameters:** @@ -373,7 +419,7 @@ ___ *Inherited from [SparseReadable](sparsereadable.md).[removeListener](sparsereadable.md#removelistener)* -Defined in node_modules/@types/node/base.d.ts:387 +Defined in node_modules/@types/node/globals.d.ts:553 **Parameters:** @@ -399,7 +445,7 @@ ___ *Inherited from [SparseReadable](sparsereadable.md).[setMaxListeners](sparsereadable.md#setmaxlisteners)* -Defined in node_modules/@types/node/base.d.ts:389 +Defined in node_modules/@types/node/globals.d.ts:556 **Parameters:** @@ -417,7 +463,7 @@ ___ *Inherited from [SparseWritable](sparsewritable.md).[write](sparsewritable.md#write)* -Defined in node_modules/@types/node/base.d.ts:416 +Defined in node_modules/@types/node/globals.d.ts:585 **Parameters:** @@ -432,7 +478,7 @@ Name | Type | *Inherited from [SparseWritable](sparsewritable.md).[write](sparsewritable.md#write)* -Defined in node_modules/@types/node/base.d.ts:417 +Defined in node_modules/@types/node/globals.d.ts:586 **Parameters:** diff --git a/doc/interfaces/tmpfileresult.md b/doc/interfaces/tmpfileresult.md index 482880b5..38f39937 100644 --- a/doc/interfaces/tmpfileresult.md +++ b/doc/interfaces/tmpfileresult.md @@ -10,16 +10,16 @@ ### Properties -* [fd](tmpfileresult.md#optional-fd) +* [fileHandle](tmpfileresult.md#optional-filehandle) * [path](tmpfileresult.md#path) ## Properties -### `Optional` fd +### `Optional` fileHandle -• **fd**? : *undefined | number* +• **fileHandle**? : *fs.FileHandle* -*Defined in [lib/tmp.ts:34](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/tmp.ts#L34)* +*Defined in [lib/tmp.ts:33](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/tmp.ts#L33)* ___ @@ -27,4 +27,4 @@ ___ • **path**: *string* -*Defined in [lib/tmp.ts:33](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/tmp.ts#L33)* +*Defined in [lib/tmp.ts:32](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/tmp.ts#L32)* diff --git a/doc/interfaces/wificonfig.md b/doc/interfaces/wificonfig.md index 93ede8c1..d4f0778c 100644 --- a/doc/interfaces/wificonfig.md +++ b/doc/interfaces/wificonfig.md @@ -23,7 +23,7 @@ • **gateway**? : *undefined | string* -*Defined in [lib/source-destination/configured-source/operations/configure.ts:38](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/configured-source/operations/configure.ts#L38)* +*Defined in [lib/source-destination/configured-source/operations/configure.ts:38](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/configured-source/operations/configure.ts#L38)* ___ @@ -31,7 +31,7 @@ ___ • **ip**? : *undefined | string* -*Defined in [lib/source-destination/configured-source/operations/configure.ts:36](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/configured-source/operations/configure.ts#L36)* +*Defined in [lib/source-destination/configured-source/operations/configure.ts:36](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/configured-source/operations/configure.ts#L36)* ___ @@ -39,7 +39,7 @@ ___ • **netmask**? : *undefined | string* -*Defined in [lib/source-destination/configured-source/operations/configure.ts:37](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/configured-source/operations/configure.ts#L37)* +*Defined in [lib/source-destination/configured-source/operations/configure.ts:37](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/configured-source/operations/configure.ts#L37)* ___ @@ -47,7 +47,7 @@ ___ • **routeMetric**? : *number | string* -*Defined in [lib/source-destination/configured-source/operations/configure.ts:35](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/configured-source/operations/configure.ts#L35)* +*Defined in [lib/source-destination/configured-source/operations/configure.ts:35](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/configured-source/operations/configure.ts#L35)* ___ @@ -55,7 +55,7 @@ ___ • **wifiKey**? : *undefined | string* -*Defined in [lib/source-destination/configured-source/operations/configure.ts:34](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/configured-source/operations/configure.ts#L34)* +*Defined in [lib/source-destination/configured-source/operations/configure.ts:34](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/configured-source/operations/configure.ts#L34)* ___ @@ -63,4 +63,4 @@ ___ • **wifiSsid**: *string* -*Defined in [lib/source-destination/configured-source/operations/configure.ts:33](https://github.com/balena-io-modules/etcher-sdk/blob/1a7a17c/lib/source-destination/configured-source/operations/configure.ts#L33)* +*Defined in [lib/source-destination/configured-source/operations/configure.ts:33](https://github.com/balena-io-modules/etcher-sdk/blob/e5355bd/lib/source-destination/configured-source/operations/configure.ts#L33)*