Skip to content

basalt / drives/src / DrivesOptions

Interface: DrivesOptions ​

Defined in: drives/src/drives.ts:101

Properties ​

allowPrivateHosts? ​

> optional allowPrivateHosts?: boolean

Defined in: drives/src/drives.ts:131

Escape hatch for a self-hosted provider on a private network. Off by default.


deadlineMs? ​

> optional deadlineMs?: number

Defined in: drives/src/drives.ts:127

Wall-clock bound on one whole provider exchange, body included. Off by default, because a large download on a slow link is legitimate; set it when a worker must never be pinned by a slow-but-steady response.


hooks? ​

> optional hooks?: HookBus

Defined in: drives/src/drives.ts:113


keys ​

> keys: readonly DriveEncryptionKey[]

Defined in: drives/src/drives.ts:108

Encryption key ring for credentials at rest. The first key seals new secrets; the rest stay readable so rotation is a rolling change.


ledger? ​

> optional ledger?: DriveImportLedger

Defined in: drives/src/drives.ts:112


lookup? ​

> optional lookup?: (host) => Promise<object[]>

Defined in: drives/src/drives.ts:133

Injected DNS resolver (tests).

Parameters ​

host ​

string

Returns ​

Promise<object[]>


maxBytes? ​

> optional maxBytes?: number

Defined in: drives/src/drives.ts:115

Default byte cap for a single downloaded file. Default 100 MiB (see DEFAULT_MAX_BYTES).


now? ​

> optional now?: () => number

Defined in: drives/src/drives.ts:136

Returns ​

number


providers ​

> providers: readonly DriveProvider[]

Defined in: drives/src/drives.ts:103

Adapters the app has installed.


retry? ​

> optional retry?: DriveRetryPolicy

Defined in: drives/src/drives.ts:129

Retry policy for transient provider failures.


secret ​

> secret: string

Defined in: drives/src/drives.ts:110

Signs the OAuth state. Typically the app secret (env.APP_SECRET).


store? ​

> optional store?: DriveConnectionStore

Defined in: drives/src/drives.ts:111


timeoutMs? ​

> optional timeoutMs?: number

Defined in: drives/src/drives.ts:121

Socket inactivity timeout for one provider call, which also bounds each hop's wait for response headers. Default 30 s. It does not bound a body that keeps trickling — see deadlineMs.


transport? ​

> optional transport?: Transport

Defined in: drives/src/drives.ts:135

Injected transport (tests).

Released under the MIT License.