Skip to content

Commit

Permalink
Merge pull request #132 from balena-io-modules/lazy-load
Browse files Browse the repository at this point in the history
Lazy load external modules
  • Loading branch information
Page- authored Mar 9, 2020
2 parents 2ba16aa + c6cc511 commit c3bef9e
Show file tree
Hide file tree
Showing 70 changed files with 1,157 additions and 1,099 deletions.
296 changes: 153 additions & 143 deletions doc/README.md

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions doc/classes/adapter.md
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ ___

**start**(): *void*

*Defined in [lib/scanner/adapters/adapter.ts:34](https://github.com/balena-io-modules/etcher-sdk/blob/2f08b24/lib/scanner/adapters/adapter.ts#L34)*
*Defined in [lib/scanner/adapters/adapter.ts:34](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/scanner/adapters/adapter.ts#L34)*

**Returns:** *void*

Expand All @@ -320,7 +320,7 @@ ___

**stop**(): *void*

*Defined in [lib/scanner/adapters/adapter.ts:35](https://github.com/balena-io-modules/etcher-sdk/blob/2f08b24/lib/scanner/adapters/adapter.ts#L35)*
*Defined in [lib/scanner/adapters/adapter.ts:35](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/scanner/adapters/adapter.ts#L35)*

**Returns:** *void*

Expand Down
76 changes: 38 additions & 38 deletions doc/classes/balenas3source.md

Large diffs are not rendered by default.

88 changes: 44 additions & 44 deletions doc/classes/blockdevice.md

Large diffs are not rendered by default.

20 changes: 10 additions & 10 deletions doc/classes/blockdeviceadapter.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@

\+ **new BlockDeviceAdapter**(`includeSystemDrives`: function): *[BlockDeviceAdapter](blockdeviceadapter.md)*

*Defined in [lib/scanner/adapters/block-device.ts:60](https://github.com/balena-io-modules/etcher-sdk/blob/2f08b24/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/d5cf67e/lib/scanner/adapters/block-device.ts#L60)*

**Parameters:**

Expand All @@ -66,15 +66,15 @@

**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/2f08b24/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/d5cf67e/lib/scanner/adapters/block-device.ts#L58)*

___

### includeSystemDrives

**includeSystemDrives**: *function*

*Defined in [lib/scanner/adapters/block-device.ts:62](https://github.com/balena-io-modules/etcher-sdk/blob/2f08b24/lib/scanner/adapters/block-device.ts#L62)*
*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)*

#### Type declaration:

Expand All @@ -86,15 +86,15 @@ ___

**ready**: *boolean* = false

*Defined in [lib/scanner/adapters/block-device.ts:60](https://github.com/balena-io-modules/etcher-sdk/blob/2f08b24/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/d5cf67e/lib/scanner/adapters/block-device.ts#L60)*

___

### `Private` running

**running**: *boolean* = false

*Defined in [lib/scanner/adapters/block-device.ts:59](https://github.com/balena-io-modules/etcher-sdk/blob/2f08b24/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/d5cf67e/lib/scanner/adapters/block-device.ts#L59)*

___

Expand Down Expand Up @@ -182,7 +182,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/2f08b24/lib/scanner/adapters/block-device.ts#L107)*
*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)*

**Returns:** *Promise‹Map‹string, [DrivelistDrive](../interfaces/drivelistdrive.md)››*

Expand Down Expand Up @@ -357,7 +357,7 @@ ___

**scan**(): *Promise‹void›*

*Defined in [lib/scanner/adapters/block-device.ts:88](https://github.com/balena-io-modules/etcher-sdk/blob/2f08b24/lib/scanner/adapters/block-device.ts#L88)*
*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)*

**Returns:** *Promise‹void›*

Expand All @@ -367,7 +367,7 @@ ___

**scanLoop**(): *Promise‹void›*

*Defined in [lib/scanner/adapters/block-device.ts:77](https://github.com/balena-io-modules/etcher-sdk/blob/2f08b24/lib/scanner/adapters/block-device.ts#L77)*
*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)*

**Returns:** *Promise‹void›*

Expand Down Expand Up @@ -399,7 +399,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/2f08b24/lib/scanner/adapters/block-device.ts#L66)*
*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)*

**Returns:** *void*

Expand All @@ -411,7 +411,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/2f08b24/lib/scanner/adapters/block-device.ts#L71)*
*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)*

**Returns:** *void*

Expand Down
18 changes: 9 additions & 9 deletions doc/classes/blockreadstream.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@

*Overrides void*

*Defined in [lib/block-read-stream.ts:31](https://github.com/balena-io-modules/etcher-sdk/blob/2f08b24/lib/block-read-stream.ts#L31)*
*Defined in [lib/block-read-stream.ts:31](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/block-read-stream.ts#L31)*

**Parameters:**

Expand All @@ -86,31 +86,31 @@ Name | Type | Default |

**bytesRead**: *number*

*Defined in [lib/block-read-stream.ts:35](https://github.com/balena-io-modules/etcher-sdk/blob/2f08b24/lib/block-read-stream.ts#L35)*
*Defined in [lib/block-read-stream.ts:35](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/block-read-stream.ts#L35)*

___

### `Private` chunkSize

**chunkSize**: *number*

*Defined in [lib/block-read-stream.ts:31](https://github.com/balena-io-modules/etcher-sdk/blob/2f08b24/lib/block-read-stream.ts#L31)*
*Defined in [lib/block-read-stream.ts:31](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/block-read-stream.ts#L31)*

___

### `Private` end

**end**: *number*

*Defined in [lib/block-read-stream.ts:36](https://github.com/balena-io-modules/etcher-sdk/blob/2f08b24/lib/block-read-stream.ts#L36)*
*Defined in [lib/block-read-stream.ts:36](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/block-read-stream.ts#L36)*

___

### `Private` maxRetries

**maxRetries**: *number*

*Defined in [lib/block-read-stream.ts:38](https://github.com/balena-io-modules/etcher-sdk/blob/2f08b24/lib/block-read-stream.ts#L38)*
*Defined in [lib/block-read-stream.ts:38](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/block-read-stream.ts#L38)*

___

Expand All @@ -128,7 +128,7 @@ ___

**source**: *[File](file.md)*

*Defined in [lib/block-read-stream.ts:34](https://github.com/balena-io-modules/etcher-sdk/blob/2f08b24/lib/block-read-stream.ts#L34)*
*Defined in [lib/block-read-stream.ts:34](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/block-read-stream.ts#L34)*

___

Expand All @@ -146,7 +146,7 @@ Defined in node_modules/@types/node/base.d.ts:681

**__read**(): *Promise‹void›*

*Defined in [lib/block-read-stream.ts:68](https://github.com/balena-io-modules/etcher-sdk/blob/2f08b24/lib/block-read-stream.ts#L68)*
*Defined in [lib/block-read-stream.ts:68](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/block-read-stream.ts#L68)*

**Returns:** *Promise‹void›*

Expand All @@ -158,7 +158,7 @@ ___

*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/2f08b24/lib/block-read-stream.ts#L93)*
*Defined in [lib/block-read-stream.ts:93](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/block-read-stream.ts#L93)*

**Returns:** *void*

Expand Down Expand Up @@ -1229,7 +1229,7 @@ ___

**tryRead**(`buffer`: Buffer): *Promise‹ReadResult›*

*Defined in [lib/block-read-stream.ts:47](https://github.com/balena-io-modules/etcher-sdk/blob/2f08b24/lib/block-read-stream.ts#L47)*
*Defined in [lib/block-read-stream.ts:47](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/block-read-stream.ts#L47)*

**Parameters:**

Expand Down
8 changes: 4 additions & 4 deletions doc/classes/blocksverificationerror.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/2f08b24/lib/errors.ts#L48)*
*Defined in [lib/errors.ts:48](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/errors.ts#L48)*

**Parameters:**

Expand All @@ -46,15 +46,15 @@ Name | Type |

**blocks**: *[BlocksWithChecksum](../interfaces/blockswithchecksum.md)*

*Defined in [lib/errors.ts:50](https://github.com/balena-io-modules/etcher-sdk/blob/2f08b24/lib/errors.ts#L50)*
*Defined in [lib/errors.ts:50](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/errors.ts#L50)*

___

### checksum

**checksum**: *string*

*Defined in [lib/errors.ts:51](https://github.com/balena-io-modules/etcher-sdk/blob/2f08b24/lib/errors.ts#L51)*
*Defined in [lib/errors.ts:51](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/errors.ts#L51)*

___

Expand All @@ -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/2f08b24/lib/errors.ts#L24)*
*Defined in [lib/errors.ts:24](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/errors.ts#L24)*

___

Expand Down
18 changes: 9 additions & 9 deletions doc/classes/blocktransformstream.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@

*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/2f08b24/lib/block-transform-stream.ts#L23)*
*Defined in [lib/block-transform-stream.ts:23](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/block-transform-stream.ts#L23)*

**Parameters:**

Expand All @@ -89,39 +89,39 @@ Name | Type |

**_buffers**: *Buffer[]* = []

*Defined in [lib/block-transform-stream.ts:22](https://github.com/balena-io-modules/etcher-sdk/blob/2f08b24/lib/block-transform-stream.ts#L22)*
*Defined in [lib/block-transform-stream.ts:22](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/block-transform-stream.ts#L22)*

___

### `Private` _bytes

**_bytes**: *number* = 0

*Defined in [lib/block-transform-stream.ts:23](https://github.com/balena-io-modules/etcher-sdk/blob/2f08b24/lib/block-transform-stream.ts#L23)*
*Defined in [lib/block-transform-stream.ts:23](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/block-transform-stream.ts#L23)*

___

### bytesRead

**bytesRead**: *number* = 0

*Defined in [lib/block-transform-stream.ts:20](https://github.com/balena-io-modules/etcher-sdk/blob/2f08b24/lib/block-transform-stream.ts#L20)*
*Defined in [lib/block-transform-stream.ts:20](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/block-transform-stream.ts#L20)*

___

### bytesWritten

**bytesWritten**: *number* = 0

*Defined in [lib/block-transform-stream.ts:21](https://github.com/balena-io-modules/etcher-sdk/blob/2f08b24/lib/block-transform-stream.ts#L21)*
*Defined in [lib/block-transform-stream.ts:21](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/block-transform-stream.ts#L21)*

___

### `Private` chunkSize

**chunkSize**: *number*

*Defined in [lib/block-transform-stream.ts:25](https://github.com/balena-io-modules/etcher-sdk/blob/2f08b24/lib/block-transform-stream.ts#L25)*
*Defined in [lib/block-transform-stream.ts:25](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/block-transform-stream.ts#L25)*

___

Expand Down Expand Up @@ -159,7 +159,7 @@ Defined in node_modules/@types/node/base.d.ts:681

**_flush**(`callback`: function): *void*

*Defined in [lib/block-transform-stream.ts:71](https://github.com/balena-io-modules/etcher-sdk/blob/2f08b24/lib/block-transform-stream.ts#L71)*
*Defined in [lib/block-transform-stream.ts:71](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/block-transform-stream.ts#L71)*

**Parameters:**

Expand Down Expand Up @@ -201,7 +201,7 @@ ___

*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/2f08b24/lib/block-transform-stream.ts#L50)*
*Defined in [lib/block-transform-stream.ts:50](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/block-transform-stream.ts#L50)*

**Parameters:**

Expand Down Expand Up @@ -1468,7 +1468,7 @@ ___

**writeBuffers**(`flush`: boolean): *void*

*Defined in [lib/block-transform-stream.ts:29](https://github.com/balena-io-modules/etcher-sdk/blob/2f08b24/lib/block-transform-stream.ts#L29)*
*Defined in [lib/block-transform-stream.ts:29](https://github.com/balena-io-modules/etcher-sdk/blob/d5cf67e/lib/block-transform-stream.ts#L29)*

**Parameters:**

Expand Down
Loading

0 comments on commit c3bef9e

Please sign in to comment.