swarm-mail 0.2.1 → 0.3.2
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/dist/{beads → hive}/adapter.d.ts +10 -10
- package/dist/hive/adapter.d.ts.map +1 -0
- package/dist/{beads → hive}/blocked-cache.d.ts +1 -1
- package/dist/hive/blocked-cache.d.ts.map +1 -0
- package/dist/{beads → hive}/comments.d.ts +3 -3
- package/dist/hive/comments.d.ts.map +1 -0
- package/dist/{beads → hive}/dependencies.d.ts +6 -6
- package/dist/hive/dependencies.d.ts.map +1 -0
- package/dist/hive/events.d.ts +163 -0
- package/dist/hive/events.d.ts.map +1 -0
- package/dist/{beads → hive}/flush-manager.d.ts +3 -3
- package/dist/hive/flush-manager.d.ts.map +1 -0
- package/dist/hive/index.d.ts +26 -0
- package/dist/hive/index.d.ts.map +1 -0
- package/dist/{beads → hive}/jsonl.d.ts +14 -14
- package/dist/hive/jsonl.d.ts.map +1 -0
- package/dist/{beads → hive}/labels.d.ts +2 -2
- package/dist/hive/labels.d.ts.map +1 -0
- package/dist/{beads → hive}/merge.d.ts +5 -5
- package/dist/hive/merge.d.ts.map +1 -0
- package/dist/{beads → hive}/migrations.d.ts +14 -1
- package/dist/hive/migrations.d.ts.map +1 -0
- package/dist/hive/operations.d.ts +56 -0
- package/dist/hive/operations.d.ts.map +1 -0
- package/dist/{beads → hive}/projections.d.ts +19 -19
- package/dist/hive/projections.d.ts.map +1 -0
- package/dist/{beads → hive}/queries.d.ts +10 -10
- package/dist/hive/queries.d.ts.map +1 -0
- package/dist/{beads → hive}/store.d.ts +9 -9
- package/dist/hive/store.d.ts.map +1 -0
- package/dist/{beads → hive}/validation.d.ts +7 -7
- package/dist/hive/validation.d.ts.map +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +517 -393
- package/dist/pglite.d.ts.map +1 -1
- package/dist/types/{beads-adapter.d.ts → hive-adapter.d.ts} +155 -103
- package/dist/types/hive-adapter.d.ts.map +1 -0
- package/package.json +1 -1
- package/dist/beads/adapter.d.ts.map +0 -1
- package/dist/beads/blocked-cache.d.ts.map +0 -1
- package/dist/beads/comments.d.ts.map +0 -1
- package/dist/beads/dependencies.d.ts.map +0 -1
- package/dist/beads/events.d.ts +0 -163
- package/dist/beads/events.d.ts.map +0 -1
- package/dist/beads/flush-manager.d.ts.map +0 -1
- package/dist/beads/index.d.ts +0 -25
- package/dist/beads/index.d.ts.map +0 -1
- package/dist/beads/jsonl.d.ts.map +0 -1
- package/dist/beads/labels.d.ts.map +0 -1
- package/dist/beads/merge.d.ts.map +0 -1
- package/dist/beads/migrations.d.ts.map +0 -1
- package/dist/beads/operations.d.ts +0 -56
- package/dist/beads/operations.d.ts.map +0 -1
- package/dist/beads/projections.d.ts.map +0 -1
- package/dist/beads/queries.d.ts.map +0 -1
- package/dist/beads/store.d.ts.map +0 -1
- package/dist/beads/validation.d.ts.map +0 -1
- package/dist/types/beads-adapter.d.ts.map +0 -1
|
@@ -21,11 +21,11 @@
|
|
|
21
21
|
* @module beads/projections
|
|
22
22
|
*/
|
|
23
23
|
import type { DatabaseAdapter } from "../types/database.js";
|
|
24
|
-
import type {
|
|
25
|
-
type
|
|
24
|
+
import type { Cell, CellComment, CellDependency, QueryCellsOptions } from "../types/hive-adapter.js";
|
|
25
|
+
type CellEvent = {
|
|
26
26
|
type: string;
|
|
27
27
|
project_key: string;
|
|
28
|
-
|
|
28
|
+
cell_id: string;
|
|
29
29
|
timestamp: number;
|
|
30
30
|
[key: string]: unknown;
|
|
31
31
|
};
|
|
@@ -35,66 +35,66 @@ type BeadEvent = {
|
|
|
35
35
|
* This is called by the event store after appending an event.
|
|
36
36
|
* Routes to specific handlers based on event type.
|
|
37
37
|
*/
|
|
38
|
-
export declare function updateProjections(db: DatabaseAdapter, event:
|
|
38
|
+
export declare function updateProjections(db: DatabaseAdapter, event: CellEvent): Promise<void>;
|
|
39
39
|
/**
|
|
40
40
|
* Get a bead by ID
|
|
41
41
|
*/
|
|
42
|
-
export declare function
|
|
42
|
+
export declare function getCell(db: DatabaseAdapter, projectKey: string, cellId: string): Promise<Cell | null>;
|
|
43
43
|
/**
|
|
44
44
|
* Query beads with filters
|
|
45
45
|
*/
|
|
46
|
-
export declare function
|
|
46
|
+
export declare function queryCells(db: DatabaseAdapter, projectKey: string, options?: QueryCellsOptions): Promise<Cell[]>;
|
|
47
47
|
/**
|
|
48
48
|
* Get dependencies for a bead
|
|
49
49
|
*/
|
|
50
|
-
export declare function getDependencies(db: DatabaseAdapter, projectKey: string,
|
|
50
|
+
export declare function getDependencies(db: DatabaseAdapter, projectKey: string, cellId: string): Promise<CellDependency[]>;
|
|
51
51
|
/**
|
|
52
52
|
* Get beads that depend on this bead
|
|
53
53
|
*/
|
|
54
|
-
export declare function getDependents(db: DatabaseAdapter, projectKey: string,
|
|
54
|
+
export declare function getDependents(db: DatabaseAdapter, projectKey: string, cellId: string): Promise<CellDependency[]>;
|
|
55
55
|
/**
|
|
56
56
|
* Check if bead is blocked
|
|
57
57
|
*/
|
|
58
|
-
export declare function isBlocked(db: DatabaseAdapter, projectKey: string,
|
|
58
|
+
export declare function isBlocked(db: DatabaseAdapter, projectKey: string, cellId: string): Promise<boolean>;
|
|
59
59
|
/**
|
|
60
60
|
* Get blockers for a bead
|
|
61
61
|
*/
|
|
62
|
-
export declare function getBlockers(db: DatabaseAdapter, projectKey: string,
|
|
62
|
+
export declare function getBlockers(db: DatabaseAdapter, projectKey: string, cellId: string): Promise<string[]>;
|
|
63
63
|
/**
|
|
64
64
|
* Get labels for a bead
|
|
65
65
|
*/
|
|
66
|
-
export declare function getLabels(db: DatabaseAdapter, projectKey: string,
|
|
66
|
+
export declare function getLabels(db: DatabaseAdapter, projectKey: string, cellId: string): Promise<string[]>;
|
|
67
67
|
/**
|
|
68
68
|
* Get comments for a bead
|
|
69
69
|
*/
|
|
70
|
-
export declare function getComments(db: DatabaseAdapter, projectKey: string,
|
|
70
|
+
export declare function getComments(db: DatabaseAdapter, projectKey: string, cellId: string): Promise<CellComment[]>;
|
|
71
71
|
/**
|
|
72
72
|
* Get next ready bead (unblocked, highest priority)
|
|
73
73
|
*/
|
|
74
|
-
export declare function
|
|
74
|
+
export declare function getNextReadyCell(db: DatabaseAdapter, projectKey: string): Promise<Cell | null>;
|
|
75
75
|
/**
|
|
76
76
|
* Get all in-progress beads
|
|
77
77
|
*/
|
|
78
|
-
export declare function
|
|
78
|
+
export declare function getInProgressCells(db: DatabaseAdapter, projectKey: string): Promise<Cell[]>;
|
|
79
79
|
/**
|
|
80
80
|
* Get all blocked beads with their blockers
|
|
81
81
|
*/
|
|
82
|
-
export declare function
|
|
83
|
-
|
|
82
|
+
export declare function getBlockedCells(db: DatabaseAdapter, projectKey: string): Promise<Array<{
|
|
83
|
+
cell: Cell;
|
|
84
84
|
blockers: string[];
|
|
85
85
|
}>>;
|
|
86
86
|
/**
|
|
87
87
|
* Mark bead as dirty for JSONL export
|
|
88
88
|
*/
|
|
89
|
-
export declare function markBeadDirty(db: DatabaseAdapter, projectKey: string,
|
|
89
|
+
export declare function markBeadDirty(db: DatabaseAdapter, projectKey: string, cellId: string): Promise<void>;
|
|
90
90
|
/**
|
|
91
91
|
* Get all dirty beads
|
|
92
92
|
*/
|
|
93
|
-
export declare function
|
|
93
|
+
export declare function getDirtyCells(db: DatabaseAdapter, projectKey: string): Promise<string[]>;
|
|
94
94
|
/**
|
|
95
95
|
* Clear dirty flag after export
|
|
96
96
|
*/
|
|
97
|
-
export declare function clearDirtyBead(db: DatabaseAdapter, projectKey: string,
|
|
97
|
+
export declare function clearDirtyBead(db: DatabaseAdapter, projectKey: string, cellId: string): Promise<void>;
|
|
98
98
|
/**
|
|
99
99
|
* Clear all dirty flags
|
|
100
100
|
*/
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"projections.d.ts","sourceRoot":"","sources":["../../src/hive/projections.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;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AClB,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,IAAI,CAAC,CAKf;AAED;;GAEG;AACH,wBAAsB,kBAAkB,CACtC,EAAE,EAAE,eAAe,EACnB,UAAU,EAAE,MAAM,GACjB,OAAO,CAAC,IAAI,CAAC,CAOf"}
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
*
|
|
13
13
|
* @module beads/queries
|
|
14
14
|
*/
|
|
15
|
-
import type {
|
|
15
|
+
import type { Cell, CellStatus, HiveAdapter } from "../types/hive-adapter.js";
|
|
16
16
|
/**
|
|
17
17
|
* Sort policy for ready work queries
|
|
18
18
|
*
|
|
@@ -28,8 +28,8 @@ export interface ReadyWorkOptions {
|
|
|
28
28
|
labels?: string[];
|
|
29
29
|
sortPolicy?: SortPolicy;
|
|
30
30
|
}
|
|
31
|
-
export interface
|
|
32
|
-
|
|
31
|
+
export interface BlockedCell {
|
|
32
|
+
cell: Cell;
|
|
33
33
|
blockers: string[];
|
|
34
34
|
}
|
|
35
35
|
export interface EpicStatus {
|
|
@@ -39,11 +39,11 @@ export interface EpicStatus {
|
|
|
39
39
|
closed_children: number;
|
|
40
40
|
}
|
|
41
41
|
export interface StaleOptions {
|
|
42
|
-
status?:
|
|
42
|
+
status?: CellStatus;
|
|
43
43
|
limit?: number;
|
|
44
44
|
}
|
|
45
45
|
export interface Statistics {
|
|
46
|
-
|
|
46
|
+
total_cells: number;
|
|
47
47
|
open: number;
|
|
48
48
|
in_progress: number;
|
|
49
49
|
closed: number;
|
|
@@ -57,21 +57,21 @@ export interface Statistics {
|
|
|
57
57
|
* By default returns both 'open' and 'in_progress' beads so epics/tasks
|
|
58
58
|
* ready to close are visible (matching steveyegge/beads behavior).
|
|
59
59
|
*/
|
|
60
|
-
export declare function getReadyWork(adapter:
|
|
60
|
+
export declare function getReadyWork(adapter: HiveAdapter, projectKey: string, options?: ReadyWorkOptions): Promise<Cell[]>;
|
|
61
61
|
/**
|
|
62
62
|
* Get all blocked beads with their blockers
|
|
63
63
|
*/
|
|
64
|
-
export declare function getBlockedIssues(adapter:
|
|
64
|
+
export declare function getBlockedIssues(adapter: HiveAdapter, projectKey: string): Promise<BlockedCell[]>;
|
|
65
65
|
/**
|
|
66
66
|
* Get epics eligible for closure (all children closed)
|
|
67
67
|
*/
|
|
68
|
-
export declare function getEpicsEligibleForClosure(adapter:
|
|
68
|
+
export declare function getEpicsEligibleForClosure(adapter: HiveAdapter, projectKey: string): Promise<EpicStatus[]>;
|
|
69
69
|
/**
|
|
70
70
|
* Get stale issues (not updated in N days)
|
|
71
71
|
*/
|
|
72
|
-
export declare function getStaleIssues(adapter:
|
|
72
|
+
export declare function getStaleIssues(adapter: HiveAdapter, projectKey: string, days: number, options?: StaleOptions): Promise<Cell[]>;
|
|
73
73
|
/**
|
|
74
74
|
* Get aggregate statistics
|
|
75
75
|
*/
|
|
76
|
-
export declare function getStatistics(adapter:
|
|
76
|
+
export declare function getStatistics(adapter: HiveAdapter, projectKey: string): Promise<Statistics>;
|
|
77
77
|
//# sourceMappingURL=queries.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"queries.d.ts","sourceRoot":"","sources":["../../src/hive/queries.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAGH,OAAO,KAAK,EAAE,IAAI,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAE9E;;;;;;GAMG;AACH,MAAM,MAAM,UAAU,GAAG,QAAQ,GAAG,UAAU,GAAG,QAAQ,CAAC;AAE1D,MAAM,WAAW,gBAAgB;IAC/B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,UAAU,CAAC,EAAE,UAAU,CAAC;CACzB;AAED,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,IAAI,CAAC;IACX,QAAQ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U,CAAC,CA4ErB"}
|
|
@@ -12,24 +12,24 @@
|
|
|
12
12
|
* - Event log provides audit trail and debugging for swarm coordination
|
|
13
13
|
*
|
|
14
14
|
* ## Event Flow
|
|
15
|
-
* 1.
|
|
15
|
+
* 1. appendCellEvent() -> INSERT INTO events
|
|
16
16
|
* 2. updateProjections() -> UPDATE materialized views (beads, dependencies, labels, etc.)
|
|
17
17
|
* 3. Query operations read from projections (fast)
|
|
18
18
|
*
|
|
19
19
|
* @module beads/store
|
|
20
20
|
*/
|
|
21
21
|
import type { DatabaseAdapter } from "../types/database.js";
|
|
22
|
-
import type {
|
|
22
|
+
import type { CellEvent } from "./events.js";
|
|
23
23
|
/**
|
|
24
24
|
* Options for reading bead events
|
|
25
25
|
*/
|
|
26
|
-
export interface
|
|
26
|
+
export interface ReadCellEventsOptions {
|
|
27
27
|
/** Filter by project key */
|
|
28
28
|
projectKey?: string;
|
|
29
29
|
/** Filter by bead ID */
|
|
30
|
-
|
|
30
|
+
cellId?: string;
|
|
31
31
|
/** Filter by event types */
|
|
32
|
-
types?:
|
|
32
|
+
types?: CellEvent["type"][];
|
|
33
33
|
/** Events after this timestamp */
|
|
34
34
|
since?: number;
|
|
35
35
|
/** Events before this timestamp */
|
|
@@ -52,21 +52,21 @@ export interface ReadBeadEventsOptions {
|
|
|
52
52
|
* @param dbOverride - Optional database adapter for dependency injection
|
|
53
53
|
* @returns Event with id and sequence number
|
|
54
54
|
*/
|
|
55
|
-
export declare function
|
|
55
|
+
export declare function appendCellEvent(event: CellEvent, projectPath?: string, dbOverride?: DatabaseAdapter): Promise<CellEvent & {
|
|
56
56
|
id: number;
|
|
57
57
|
sequence: number;
|
|
58
58
|
}>;
|
|
59
59
|
/**
|
|
60
60
|
* Read bead events with optional filters
|
|
61
61
|
*
|
|
62
|
-
* Queries the shared events table for bead events (type starts with "
|
|
62
|
+
* Queries the shared events table for bead events (type starts with "cell_").
|
|
63
63
|
*
|
|
64
64
|
* @param options - Filter options
|
|
65
65
|
* @param projectPath - Optional project path for database location
|
|
66
66
|
* @param dbOverride - Optional database adapter for dependency injection
|
|
67
67
|
* @returns Array of bead events with id and sequence
|
|
68
68
|
*/
|
|
69
|
-
export declare function
|
|
69
|
+
export declare function readCellEvents(options?: ReadCellEventsOptions, projectPath?: string, dbOverride?: DatabaseAdapter): Promise<Array<CellEvent & {
|
|
70
70
|
id: number;
|
|
71
71
|
sequence: number;
|
|
72
72
|
}>>;
|
|
@@ -87,7 +87,7 @@ export declare function readBeadEvents(options?: ReadBeadEventsOptions, projectP
|
|
|
87
87
|
* @param dbOverride - Optional database adapter for dependency injection
|
|
88
88
|
* @returns Stats about replay operation
|
|
89
89
|
*/
|
|
90
|
-
export declare function
|
|
90
|
+
export declare function replayCellEvents(options?: {
|
|
91
91
|
projectKey?: string;
|
|
92
92
|
fromSequence?: number;
|
|
93
93
|
clearViews?: boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../../src/hive/store.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAGH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAE5D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AA+B7C;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC,4BAA4B;IAC5B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,wBAAwB;IACxB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,4BAA4B;IAC5B,KAAK,CAAC,EAAE,SAAS,CAAC,MAAM,CAAC,EAAE,CAAC;IAC5B,kCAAkC;IAClC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,mCAAmC;IACnC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,wCAAwC;IACxC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,yCAAyC;IACzC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,yCAAyC;IACzC,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;;;;;;;;GAUG;AACH,wBAAsB,eAAe,CACnC,KAAK,EAAE,SAAS,EAChB,WAAW,CAAC,EAAE,MAAM,EACpB,UAAU,CAAC,EAAE,eAAe,GAC3B,OAAO,CAAC,SAAS,GAAG;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,CAAC,CA2BvD;AAED;;;;;;;;;GASG;AACH,wBAAsB,cAAc,CAClC,OAAO,GAAE,qBAA0B,EACnC,WAAW,CAAC,EAAE,MAAM,EACpB,UAAU,CAAC,EAAE,eAAe,GAC3B,OAAO,CAAC,KAAK,CAAC,SAAS,GAAG;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,CAAC,CAAC,CAoF9D;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAsB,gBAAgB,CACpC,OAAO,GAAE;IACP,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,UAAU,CAAC,EAAE,OAAO,CAAC;CACjB,EACN,WAAW,CAAC,EAAE,MAAM,EACpB,UAAU,CAAC,EAAE,eAAe,GAC3B,OAAO,CAAC;IAAE,cAAc,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,CAAC,CAyEvD"}
|
|
@@ -21,21 +21,21 @@
|
|
|
21
21
|
*
|
|
22
22
|
* Direct transitions to tombstone are prohibited - use delete operation instead.
|
|
23
23
|
*/
|
|
24
|
-
import type {
|
|
24
|
+
import type { CellStatus, CellType } from "../types/hive-adapter.js";
|
|
25
25
|
export interface ValidationResult {
|
|
26
26
|
valid: boolean;
|
|
27
27
|
errors: string[];
|
|
28
28
|
}
|
|
29
|
-
export interface
|
|
29
|
+
export interface CreateCellOptions {
|
|
30
30
|
title: string;
|
|
31
|
-
type:
|
|
31
|
+
type: CellType;
|
|
32
32
|
priority?: number;
|
|
33
33
|
description?: string;
|
|
34
34
|
parent_id?: string;
|
|
35
35
|
assignee?: string;
|
|
36
36
|
created_by?: string;
|
|
37
37
|
}
|
|
38
|
-
export interface
|
|
38
|
+
export interface UpdateCellOptions {
|
|
39
39
|
title?: string;
|
|
40
40
|
description?: string;
|
|
41
41
|
priority?: number;
|
|
@@ -47,14 +47,14 @@ export interface UpdateBeadOptions {
|
|
|
47
47
|
* @param options - Bead creation options
|
|
48
48
|
* @returns Validation result with errors if invalid
|
|
49
49
|
*/
|
|
50
|
-
export declare function validateCreateBead(options:
|
|
50
|
+
export declare function validateCreateBead(options: CreateCellOptions): ValidationResult;
|
|
51
51
|
/**
|
|
52
52
|
* Validate bead update options
|
|
53
53
|
*
|
|
54
54
|
* @param options - Bead update options
|
|
55
55
|
* @returns Validation result with errors if invalid
|
|
56
56
|
*/
|
|
57
|
-
export declare function validateUpdateBead(options:
|
|
57
|
+
export declare function validateUpdateBead(options: UpdateCellOptions): ValidationResult;
|
|
58
58
|
/**
|
|
59
59
|
* Validate status transition
|
|
60
60
|
*
|
|
@@ -71,5 +71,5 @@ export declare function validateUpdateBead(options: UpdateBeadOptions): Validati
|
|
|
71
71
|
* @param newStatus - Target status
|
|
72
72
|
* @returns Validation result with errors if invalid
|
|
73
73
|
*/
|
|
74
|
-
export declare function validateStatusTransition(currentStatus:
|
|
74
|
+
export declare function validateStatusTransition(currentStatus: CellStatus, newStatus: CellStatus): ValidationResult;
|
|
75
75
|
//# sourceMappingURL=validation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validation.d.ts","sourceRoot":"","sources":["../../src/hive/validation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAErE,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,OAAO,CAAC;IACf,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB;AAED,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,QAAQ,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,iBAAiB;IAChC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAChC,OAAO,EAAE,iBAAiB,GACzB,gBAAgB,CAmClB;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAChC,OAAO,EAAE,iBAAiB,GACzB,gBAAgB,CAyBlB;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,wBAAwB,CACtC,aAAa,EAAE,UAAU,EACzB,SAAS,EAAE,UAAU,GACpB,gBAAgB,CA+ClB"}
|
package/dist/index.d.ts
CHANGED
|
@@ -21,7 +21,7 @@ export { getSwarmMail, getSwarmMailSocket, createInMemorySwarmMail, closeSwarmMa
|
|
|
21
21
|
export { wrapPostgres, createSocketAdapter, } from "./socket-adapter";
|
|
22
22
|
export type { SocketAdapterOptions } from "./socket-adapter";
|
|
23
23
|
export * from "./streams";
|
|
24
|
-
export * from "./
|
|
24
|
+
export * from "./hive";
|
|
25
25
|
export { startDaemon, stopDaemon, isDaemonRunning, healthCheck, getPidFilePath, } from "./daemon";
|
|
26
26
|
export type { DaemonOptions, DaemonInfo } from "./daemon";
|
|
27
27
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,eAAO,MAAM,kBAAkB,UAAU,CAAC;AAM1C,OAAO,EAAE,sBAAsB,EAAE,MAAM,WAAW,CAAC;AACnD,YAAY,EACV,eAAe,EACf,gBAAgB,EAChB,iBAAiB,EACjB,YAAY,EACZ,gBAAgB,EAChB,kBAAkB,EAClB,aAAa,EACb,iBAAiB,EACjB,YAAY,EACZ,OAAO,EACP,WAAW,EACX,QAAQ,GACT,MAAM,SAAS,CAAC;AAMjB,OAAO,EACL,YAAY,EACZ,kBAAkB,EAClB,uBAAuB,EACvB,cAAc,EACd,iBAAiB,EACjB,eAAe,EACf,qBAAqB,EACrB,eAAe,EACf,MAAM,GACP,MAAM,UAAU,CAAC;AAMlB,OAAO,EACL,YAAY,EACZ,mBAAmB,GACpB,MAAM,kBAAkB,CAAC;AAC1B,YAAY,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAM7D,cAAc,WAAW,CAAC;AAM1B,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,eAAO,MAAM,kBAAkB,UAAU,CAAC;AAM1C,OAAO,EAAE,sBAAsB,EAAE,MAAM,WAAW,CAAC;AACnD,YAAY,EACV,eAAe,EACf,gBAAgB,EAChB,iBAAiB,EACjB,YAAY,EACZ,gBAAgB,EAChB,kBAAkB,EAClB,aAAa,EACb,iBAAiB,EACjB,YAAY,EACZ,OAAO,EACP,WAAW,EACX,QAAQ,GACT,MAAM,SAAS,CAAC;AAMjB,OAAO,EACL,YAAY,EACZ,kBAAkB,EAClB,uBAAuB,EACvB,cAAc,EACd,iBAAiB,EACjB,eAAe,EACf,qBAAqB,EACrB,eAAe,EACf,MAAM,GACP,MAAM,UAAU,CAAC;AAMlB,OAAO,EACL,YAAY,EACZ,mB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