@cloudbitmaps/core 0.20.0 → 0.21.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +85 -0
- package/dist/{chunk-YSC7NJWV.js → chunk-IGLIZBR7.js} +740 -137
- package/dist/chunk-IGLIZBR7.js.map +7 -0
- package/dist/core/absent-operands.d.ts +8 -0
- package/dist/core/audit.d.ts +12 -2
- package/dist/core/bit-route.d.ts +2 -1
- package/dist/core/blob.d.ts +12 -1
- package/dist/core/bulk-load.d.ts +148 -0
- package/dist/core/cas-retry.d.ts +27 -0
- package/dist/core/check.d.ts +22 -0
- package/dist/core/chunk-checks.d.ts +6 -1
- package/dist/core/chunk-window.d.ts +11 -4
- package/dist/core/combine-expr.d.ts +1 -3
- package/dist/core/combine-feed.d.ts +2 -16
- package/dist/core/combine-many.d.ts +12 -9
- package/dist/core/concurrency.d.ts +8 -0
- package/dist/core/consistency.d.ts +69 -17
- package/dist/core/crbm/fingerprint.d.ts +5 -0
- package/dist/core/crbm/format.d.ts +0 -1
- package/dist/core/crbm/plan-reads.d.ts +9 -3
- package/dist/core/crbm/reader.d.ts +52 -6
- package/dist/core/crbm/varint.d.ts +2 -1
- package/dist/core/crbm/writer.d.ts +5 -1
- package/dist/core/crbm-open.d.ts +154 -0
- package/dist/core/crbm-storage-source.d.ts +65 -452
- package/dist/core/crbm-write.d.ts +75 -0
- package/dist/core/crypto.d.ts +6 -1
- package/dist/core/engine.d.ts +222 -33
- package/dist/core/erase-id.d.ts +42 -7
- package/dist/core/erasure.d.ts +4 -3
- package/dist/core/errors.d.ts +8 -2
- package/dist/core/generation-gc.d.ts +129 -15
- package/dist/core/generation-list.d.ts +11 -0
- package/dist/core/id-window.d.ts +46 -0
- package/dist/core/invalidation-scope.d.ts +77 -0
- package/dist/core/known-generations-shape.d.ts +13 -0
- package/dist/core/known-generations.d.ts +147 -0
- package/dist/core/leases.d.ts +4 -3
- package/dist/core/ledger-seed.d.ts +17 -0
- package/dist/core/load.d.ts +17 -38
- package/dist/core/lru.d.ts +2 -15
- package/dist/core/metrics.d.ts +4 -2
- package/dist/core/order.d.ts +2 -0
- package/dist/core/pinned-storage-source.d.ts +4 -4
- package/dist/core/ports.d.ts +89 -16
- package/dist/core/publish.d.ts +207 -0
- package/dist/core/registry-scan.d.ts +0 -2
- package/dist/core/retention-sweep.d.ts +69 -65
- package/dist/core/retention.d.ts +1 -1
- package/dist/core/retry.d.ts +12 -19
- package/dist/core/rollback.d.ts +60 -31
- package/dist/core/summary.d.ts +50 -18
- package/dist/core/token.d.ts +2 -2
- package/dist/core/validate.d.ts +2 -0
- package/dist/driver-kit.d.ts +4 -0
- package/dist/driver-kit.js +80 -7
- package/dist/driver-kit.js.map +3 -3
- package/dist/drivers/_shared/bytes.d.ts +6 -0
- package/dist/drivers/_shared/faults.d.ts +15 -0
- package/dist/drivers/_shared/object-keys.d.ts +18 -0
- package/dist/drivers/_shared/object-registry-keys.d.ts +0 -2
- package/dist/drivers/_shared/object-registry.d.ts +2 -0
- package/dist/drivers/_shared/options.d.ts +19 -0
- package/dist/drivers/_shared/registry.d.ts +13 -10
- package/dist/drivers/localfs/exact-case.d.ts +0 -3
- package/dist/drivers/localfs/fs-util.d.ts +22 -0
- package/dist/drivers/localfs/registry.d.ts +10 -4
- package/dist/drivers/localfs/storage.d.ts +9 -2
- package/dist/drivers/memory.d.ts +7 -4
- package/dist/index.d.ts +1 -1
- package/dist/index.js +3647 -2410
- package/dist/index.js.map +4 -4
- package/package.json +1 -1
- package/dist/chunk-YSC7NJWV.js.map +0 -7
- package/dist/core/kept-generations.d.ts +0 -40
|
@@ -1,9 +1,16 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type BlobSink } from '../../core/blob.js';
|
|
2
2
|
import type { StorageCaps, GenKey, IStorageDriver, SegmentRef, StorageDeleteOptions, TailRead } from '../../core/ports.js';
|
|
3
3
|
export declare class LocalFsStorageDriver implements IStorageDriver {
|
|
4
4
|
private readonly root;
|
|
5
|
+
private readonly options;
|
|
5
6
|
private readonly exactCase;
|
|
6
|
-
|
|
7
|
+
/**
|
|
8
|
+
* `options.privateRoot` is the directory this one lives under, from which down directories are created private; it
|
|
9
|
+
* defaults to `root`.
|
|
10
|
+
*/
|
|
11
|
+
constructor(root: string, options?: {
|
|
12
|
+
readonly privateRoot?: string;
|
|
13
|
+
});
|
|
7
14
|
capabilities(): StorageCaps;
|
|
8
15
|
putImmutable(key: GenKey, write: (sink: BlobSink) => Promise<void>): Promise<{
|
|
9
16
|
size: number;
|
package/dist/drivers/memory.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { BlobSink } from '../core/blob.js';
|
|
2
2
|
import type { Entropy } from '../core/determinism.js';
|
|
3
|
-
import type { StorageCaps, StorageDeleteOptions, TailRead, GenKey, IStorageDriver, IRegistryDriver, NewRegistryRecord, RegCaps, RegistryPatch, RegistryRecord, SegmentRef, Token } from '../core/ports.js';
|
|
4
|
-
|
|
3
|
+
import type { StorageCaps, StorageDeleteOptions, TailRead, GenKey, IStorageDriver, IRegistryDriver, NewRegistryRecord, RegCaps, RegistryPatch, RegistryRecord, RegistryWriteOptions, SegmentRef, Token } from '../core/ports.js';
|
|
4
|
+
interface MemoryRegistryDriverOptions {
|
|
5
5
|
/** Injected clock for `createdAt`/`updatedAt`; defaults to `Date.now` (drivers may use ambient time). */
|
|
6
6
|
readonly now?: () => number;
|
|
7
7
|
/** Draws every token's random parts; defaults to Web Crypto. Inject one only to make a test replayable. */
|
|
@@ -22,15 +22,17 @@ export declare class MemoryRegistryDriver implements IRegistryDriver {
|
|
|
22
22
|
private nextToken;
|
|
23
23
|
/** `conditionalDelete`: a delete checks the token and removes the row in one step, with no await between. */
|
|
24
24
|
capabilities(): RegCaps;
|
|
25
|
+
/** Every write reports its token to `onToken` before it is applied. */
|
|
26
|
+
get reportsWriteTokens(): true;
|
|
25
27
|
get(ref: SegmentRef): Promise<RegistryRecord | null>;
|
|
26
|
-
create(ref: SegmentRef, record: NewRegistryRecord): Promise<{
|
|
28
|
+
create(ref: SegmentRef, record: NewRegistryRecord, options?: RegistryWriteOptions): Promise<{
|
|
27
29
|
token: Token;
|
|
28
30
|
}>;
|
|
29
31
|
/**
|
|
30
32
|
* A caller's `held` row (see `RegistryWriteOptions`) has no read to spare here: the token is compared with the stored row in the same step
|
|
31
33
|
* as the write, in memory, so a stale one fails exactly as a lost race does.
|
|
32
34
|
*/
|
|
33
|
-
compareAndSwap(ref: SegmentRef, expected: Token, patch: RegistryPatch): Promise<{
|
|
35
|
+
compareAndSwap(ref: SegmentRef, expected: Token, patch: RegistryPatch, options?: RegistryWriteOptions): Promise<{
|
|
34
36
|
token: Token;
|
|
35
37
|
}>;
|
|
36
38
|
list(namespace?: string): AsyncIterable<RegistryRecord>;
|
|
@@ -59,3 +61,4 @@ export declare class MemoryStorageDriver implements IStorageDriver {
|
|
|
59
61
|
list(ref: SegmentRef): AsyncIterable<GenKey>;
|
|
60
62
|
private require;
|
|
61
63
|
}
|
|
64
|
+
export {};
|
package/dist/index.d.ts
CHANGED
|
@@ -49,7 +49,7 @@ export { eraseIdFromSegment } from './core/erase-id.js';
|
|
|
49
49
|
export type { EraseIdDeps, EraseIdResult } from './core/erase-id.js';
|
|
50
50
|
export type { CodecInterface, CodecBitmap, EncodedChunk } from './core/codec.js';
|
|
51
51
|
export type { Clock, Entropy, Rng } from './core/determinism.js';
|
|
52
|
-
export type { StorageChunkSource, IStorageDriver, StorageCaps, StorageDeleteOptions, TailRead, ChunkRef, ChunkRead, ReadChunksOptions, SegmentRef, GenKey, IRegistryDriver, StorageBackend, RegistryRecord, NewRegistryRecord, RegistryPatch, RegistryStatus, RegistrySummary, RegistryWriteOptions, LeaseEntry, ClearRegistrySummary, SealedRegistrySummary, GenerationMetadata, GenerationSummary, RegCaps, GovernanceMeta, SegmentSize, } from './core/ports.js';
|
|
52
|
+
export type { StorageChunkSource, IStorageDriver, StorageCaps, StorageDeleteOptions, TailRead, ChunkRef, ChunkRead, ReadChunksOptions, SegmentRef, GenKey, IRegistryDriver, StorageBackend, RegistryRecord, NewRegistryRecord, RegistryPatch, RegistryStatus, RegistrySummary, RegistryWriteOptions, LeaseEntry, KnownGeneration, ClearRegistrySummary, SealedRegistrySummary, GenerationMetadata, GenerationSummary, RegCaps, GovernanceMeta, SegmentSize, } from './core/ports.js';
|
|
53
53
|
export { CloudRoaringError, ValidationError, WriteConflictError, IntegrityError, NotFoundError, UnsupportedError, CapabilityError, TransientError, KeyUnavailableError, BudgetExceededError, LeaseExpiredError, LeaseLimitError, StaleOperandError, isCloudRoaringError, isWriteConflictError, isTransientError, isNotFoundError, isIntegrityError, isValidationError, isLeaseExpiredError, isLeaseLimitError, isStaleOperandError, isUnsupportedError, isCapabilityError, isBudgetExceededError, isKeyUnavailableError, } from './core/errors.js';
|
|
54
54
|
export type { Aead, AeadSealed, IKeystore, WrappedDek, CrbmCrypto } from './core/crypto.js';
|
|
55
55
|
export { aadFor } from './core/crypto.js';
|