Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[OPTIC-RELEASE-AUTOMATION] release/v2.2.0 #970

Merged
merged 1 commit into from
Nov 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 17 additions & 6 deletions docs/api/md/-internal-/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
- ["/home/runner/work/comapeo-core/comapeo-core/src/schema/project"](namespaces/home_runner_work_comapeo-core_comapeo-core_src_schema_project/README.md)
- ["/home/runner/work/comapeo-core/comapeo-core/src/sync/core-sync-state"](namespaces/home_runner_work_comapeo-core_comapeo-core_src_sync_core-sync-state/README.md)
- ["/home/runner/work/comapeo-core/comapeo-core/src/sync/namespace-sync-state"](namespaces/home_runner_work_comapeo-core_comapeo-core_src_sync_namespace-sync-state/README.md)
- ["hyperdrive"](namespaces/hyperdrive/README.md)
- [Hyperbee](namespaces/Hyperbee/README.md)
- [Hyperblobs](namespaces/Hyperblobs/README.md)
- [Hyperdrive](namespaces/Hyperdrive/README-1.md)
- [Hyperdrive](namespaces/Hyperdrive/README.md)

### Classes

Expand All @@ -38,8 +38,13 @@
- [default](classes/default.md)
- [default](classes/default.md)
- [DenseIndex](classes/DenseIndex.md)
- [Downloader](classes/Downloader.md)
- [EntryWatcher](classes/EntryWatcher.md)
- [Hyperbee](classes/Hyperbee.md)
- [HyperbeeBatch](classes/HyperbeeBatch.md)
- [Hyperblobs](classes/Hyperblobs.md)
- [Hyperdrive](classes/Hyperdrive.md)
- [HyperdriveIndexImpl](classes/HyperdriveIndexImpl.md)
- [IconApi](classes/IconApi.md)
- [Index](classes/Index.md)
- [IndexWriter](classes/IndexWriter.md)
Expand All @@ -62,9 +67,8 @@

### Interfaces

- [AbstractEncoding](interfaces/AbstractEncoding.md)
- [BitmapOpts](interfaces/BitmapOpts.md)
- [BlobDownloadEvents](interfaces/BlobDownloadEvents.md)
- [BlobDownloadState](interfaces/BlobDownloadState.md)
- [Channel](interfaces/Channel.md)
- [CorestoreEvents](interfaces/CorestoreEvents.md)
- [DataTypeEvents](interfaces/DataTypeEvents.md)
Expand Down Expand Up @@ -92,10 +96,10 @@
### Type Aliases

- [BitField](type-aliases/BitField.md)
- [BlobDownloadStateError](type-aliases/BlobDownloadStateError.md)
- [BlobFilter](type-aliases/BlobFilter.md)
- [BlobId](type-aliases/BlobId.md)
- [BlobIdBase](type-aliases/BlobIdBase.md)
- [BlobStoreEntriesStream](type-aliases/BlobStoreEntriesStream.md)
- [BlobType](type-aliases/BlobType.md)
- [BlobVariant](type-aliases/BlobVariant.md)
- [Chunk](type-aliases/Chunk.md)
Expand All @@ -108,14 +112,15 @@
- [DeviceInfoParam](type-aliases/DeviceInfoParam.md)
- [EditableProjectSettings](type-aliases/EditableProjectSettings.md)
- [ElementOf](type-aliases/ElementOf.md)
- [Encoding](type-aliases/Encoding.md)
- [GenericBlobFilter](type-aliases/GenericBlobFilter.md)
- [GenericBlobFilter](type-aliases/GenericBlobFilter.md)
- [GetMapeoDocTables](type-aliases/GetMapeoDocTables.md)
- [HypercorePeer](type-aliases/HypercorePeer.md)
- [HypercoreRemoteBitfield](type-aliases/HypercoreRemoteBitfield.md)
- [HypercoreRemoteBitfieldPage](type-aliases/HypercoreRemoteBitfieldPage.md)
- [IconVariant](type-aliases/IconVariant.md)
- [IndexedDocIds](type-aliases/IndexedDocIds.md)
- [InternalDriveEmitter](type-aliases/InternalDriveEmitter.md)
- [InviteInternal](type-aliases/InviteInternal.md)
- [Keypair](type-aliases/Keypair.md)
- [KeyPair](type-aliases/KeyPair-1.md)
Expand Down Expand Up @@ -163,6 +168,12 @@ Re-exports [BlobId](namespaces/Hyperblobs/interfaces/BlobId.md)

***

### HyperbeeEntry

Re-exports [HyperbeeEntry](namespaces/Hyperbee/interfaces/HyperbeeEntry.md)

***

### HyperdriveEntry

Re-exports [HyperdriveEntry](namespaces/Hyperdrive/interfaces/HyperdriveEntry.md)
Expand Down
2 changes: 1 addition & 1 deletion docs/api/md/-internal-/classes/BlobApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ Write blobs for provided variants of a file

##### type

> **type**: `"photo"` \| `"audio"` \| `"video"`
> **type**: `"photo"` \| `"video"` \| `"audio"`

***

Expand Down
108 changes: 72 additions & 36 deletions docs/api/md/-internal-/classes/BlobStore.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@

# Class: BlobStore

## Extends

- `TypedEmitter`

## Constructors

### new BlobStore()
Expand All @@ -18,10 +22,18 @@

• **options.coreManager**: [`CoreManager`](CoreManager.md)

• **options.downloadFilter**: `null` \| [`BlobFilter`](../type-aliases/BlobFilter.md)

Filter blob types and/or variants to download. Set to `null` to download all blobs.

#### Returns

[`BlobStore`](BlobStore.md)

#### Overrides

`TypedEmitter.constructor`

## Accessors

### writerDriveId
Expand Down Expand Up @@ -54,32 +66,38 @@ Enable to return an object with a `block` property with number of bytes removed

***

### createEntryReadStream()
### close()

> **createEntryReadStream**(`driveId`, `entry`, `options`?): `Promise`\<[`Readable`](../type-aliases/Readable.md)\>
> **close**(): `void`

Optimization for creating the blobs read stream when you have
previously read the entry from Hyperdrive using `drive.entry`
#### Returns

#### Parameters
`void`

• **driveId**: `string`
***

Hyperdrive drive discovery id
### createEntriesReadStream()

**entry**: [`HyperdriveEntry`](../namespaces/Hyperdrive/interfaces/HyperdriveEntry.md)
> **createEntriesReadStream**(`opts`): [`BlobStoreEntriesStream`](../type-aliases/BlobStoreEntriesStream.md)

Hyperdrive entry
This is a low-level method to create a stream of entries from all drives.
It includes entries for unknown blob types and variants.

• **options?** = `...`
#### Parameters

• **options.wait?**: `undefined` \| `boolean`
• **opts** = `{}`

Set to `true` to wait for a blob to download, otherwise will throw if blob is not available locally
• **opts.filter**: `undefined` \| `null` \| [`GenericBlobFilter`](../type-aliases/GenericBlobFilter.md)

Filter blob types and/or variants in returned entries. Filter is { [BlobType]: BlobVariants[] }.

• **opts.live**: `undefined` \| `boolean` = `false`

Set to `true` to get a live stream of entries

#### Returns

`Promise`\<[`Readable`](../type-aliases/Readable.md)\>
[`BlobStoreEntriesStream`](../type-aliases/BlobStoreEntriesStream.md)

***

Expand Down Expand Up @@ -107,52 +125,52 @@ Set to `true` to wait for a blob to download, otherwise will throw if blob is no

***

### createWriteStream()
### createReadStreamFromEntry()

> **createWriteStream**(`blobId`, `options`?): `Writable`\<`any`, `any`, `any`, `false`, `true`, `WritableEvents`\<`any`\>\> & `object`
> **createReadStreamFromEntry**(`driveId`, `entry`, `options`?): `Promise`\<[`Readable`](../type-aliases/Readable.md)\>

Optimization for creating the blobs read stream when you have
previously read the entry from Hyperdrive using `drive.entry`

#### Parameters

• **blobId**: `Omit`\<[`BlobId`](../type-aliases/BlobId.md), `"driveId"`\>
• **driveId**: `string`

• **options?**
Hyperdrive drive discovery id

• **options.metadata?**: `undefined` \| `JsonObject`
• **entry**: [`HyperdriveEntry`](../namespaces/Hyperdrive/interfaces/HyperdriveEntry.md)

Metadata to store with the blob
Hyperdrive entry

#### Returns
• **options?** = `...`

`Writable`\<`any`, `any`, `any`, `false`, `true`, `WritableEvents`\<`any`\>\> & `object`
• **options.wait?**: `undefined` \| `boolean`

***
Set to `true` to wait for a blob to download, otherwise will throw if blob is not available locally

#### Returns

### download()
`Promise`\<[`Readable`](../type-aliases/Readable.md)\>

> **download**(`filter`?, `options`?): `TypedEmitter`\<[`BlobDownloadEvents`](../interfaces/BlobDownloadEvents.md)\>
***

Download blobs from all drives, optionally filtering particular blob types
or blob variants. Download will be 'live' and will continue downloading new
data as it becomes available from any replicating drive.
### createWriteStream()

If no filter is specified, all blobs will be downloaded. If a filter is
specified, then _only_ blobs that match the filter will be downloaded.
> **createWriteStream**(`blobId`, `options`?): `Writable`\<`any`, `any`, `any`, `false`, `true`, `WritableEvents`\<`any`\>\> & `object`

#### Parameters

• **filter?**: [`BlobFilter`](../type-aliases/BlobFilter.md)

Filter blob types and/or variants to download. Filter is { [BlobType]: BlobVariants[] }. At least one blob variant must be specified for each blob type.
• **blobId**: `Omit`\<[`BlobId`](../type-aliases/BlobId.md), `"driveId"`\>

• **options?** = `{}`
• **options?**

• **options.signal?**: `undefined` \| `AbortSignal`
• **options.metadata?**: `undefined` \| `JsonObject`

Optional AbortSignal to cancel in-progress download
Metadata to store with the blob

#### Returns

`TypedEmitter`\<[`BlobDownloadEvents`](../interfaces/BlobDownloadEvents.md)\>
`Writable`\<`any`, `any`, `any`, `false`, `true`, `WritableEvents`\<`any`\>\> & `object`

***

Expand Down Expand Up @@ -253,3 +271,21 @@ Metadata to store with the blob
`Promise`\<`string`\>

discovery key as hex string of hyperdrive where blob is stored

***

### setDownloadFilter()

> **setDownloadFilter**(`filter`): `void`

Set the filter for downloading blobs.

#### Parameters

• **filter**: `null` \| [`BlobFilter`](../type-aliases/BlobFilter.md)

Filter blob types and/or variants to download. Filter is { [BlobType]: BlobVariants[] }. At least one blob variant must be specified for each blob type.

#### Returns

`void`
6 changes: 3 additions & 3 deletions docs/api/md/-internal-/classes/CoreIndex.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ Hypercore instance

Buffer containing public key of this core

• **options.namespace**: `"blob"` \| `"auth"` \| `"config"` \| `"data"` \| `"blobIndex"`
• **options.namespace**: `"auth"` \| `"config"` \| `"data"` \| `"blobIndex"` \| `"blob"`

• **options.writer**: `undefined` \| `boolean` = `false`

Expand Down Expand Up @@ -101,7 +101,7 @@ Get all known cores in a namespace

#### Parameters

• **namespace**: `"blob"` \| `"auth"` \| `"config"` \| `"data"` \| `"blobIndex"`
• **namespace**: `"auth"` \| `"config"` \| `"data"` \| `"blobIndex"` \| `"blob"`

#### Returns

Expand All @@ -117,7 +117,7 @@ Get the write core for the given namespace

#### Parameters

• **namespace**: `"blob"` \| `"auth"` \| `"config"` \| `"data"` \| `"blobIndex"`
• **namespace**: `"auth"` \| `"config"` \| `"data"` \| `"blobIndex"` \| `"blob"`

#### Returns

Expand Down
10 changes: 5 additions & 5 deletions docs/api/md/-internal-/classes/CoreManager.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Immediately start downloading cores - should only be set to false for tests

Drizzle better-sqlite3 database instance

• **options.encryptionKeys**: `undefined` \| `Partial`\<`Record`\<`"blob"` \| `"auth"` \| `"config"` \| `"data"` \| `"blobIndex"`, `Buffer`\>\> = `{}`
• **options.encryptionKeys**: `undefined` \| `Partial`\<`Record`\<`"auth"` \| `"config"` \| `"data"` \| `"blobIndex"` \| `"blob"`, `Buffer`\>\> = `{}`

Encryption keys for each namespace

Expand Down Expand Up @@ -132,7 +132,7 @@ Add a core to the manager (will be persisted across restarts)

32-byte public key of core to add

• **namespace**: `"blob"` \| `"auth"` \| `"config"` \| `"data"` \| `"blobIndex"`
• **namespace**: `"auth"` \| `"config"` \| `"data"` \| `"blobIndex"` \| `"blob"`

#### Returns

Expand All @@ -159,7 +159,7 @@ TODO: gracefully close replication streams

#### Parameters

• **namespace**: `"blob"` \| `"config"` \| `"data"` \| `"blobIndex"`
• **namespace**: `"config"` \| `"data"` \| `"blobIndex"` \| `"blob"`

#### Returns

Expand Down Expand Up @@ -207,7 +207,7 @@ Get an array of all cores in the given namespace

#### Parameters

• **namespace**: `"blob"` \| `"auth"` \| `"config"` \| `"data"` \| `"blobIndex"`
• **namespace**: `"auth"` \| `"config"` \| `"data"` \| `"blobIndex"` \| `"blob"`

#### Returns

Expand All @@ -223,7 +223,7 @@ Get the writer core for the given namespace

#### Parameters

• **namespace**: `"blob"` \| `"auth"` \| `"config"` \| `"data"` \| `"blobIndex"`
• **namespace**: `"auth"` \| `"config"` \| `"data"` \| `"blobIndex"` \| `"blob"`

#### Returns

Expand Down
6 changes: 3 additions & 3 deletions docs/api/md/-internal-/classes/CoreOwnership.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@

• **opts**

• **opts.coreKeypairs**: `Record`\<`"blob"` \| `"auth"` \| `"config"` \| `"data"` \| `"blobIndex"`, [`KeyPair`](../type-aliases/KeyPair-1.md)\>
• **opts.coreKeypairs**: `Record`\<`"auth"` \| `"config"` \| `"data"` \| `"blobIndex"` \| `"blob"`, [`KeyPair`](../type-aliases/KeyPair-1.md)\>

• **opts.dataType**: [`DataType`](DataType.md)\<[`DataStore`](DataStore.md)\<`"auth"`, `"coreOwnership"` \| `"role"`\>, `SQLiteTableWithColumns`\<`object`\>, `"coreOwnership"`, `object`, `object`\>
• **opts.dataType**: [`DataType`](DataType.md)\<[`DataStore`](DataStore.md)\<`"auth"`, `"role"` \| `"coreOwnership"`\>, `SQLiteTableWithColumns`\<`object`\>, `"coreOwnership"`, `object`, `object`\>

• **opts.identityKeypair**: [`KeyPair`](../type-aliases/KeyPair-1.md)

Expand Down Expand Up @@ -70,7 +70,7 @@ Get capabilities for a given deviceId

• **deviceId**: `string`

• **namespace**: `"blob"` \| `"auth"` \| `"config"` \| `"data"` \| `"blobIndex"`
• **namespace**: `"auth"` \| `"config"` \| `"data"` \| `"blobIndex"` \| `"blob"`

#### Returns

Expand Down
Loading
Loading