@earth-app/collegedb 1.0.7 → 1.1.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 +453 -117
- package/dist/durable.d.ts +9 -4
- package/dist/durable.d.ts.map +1 -1
- package/dist/index.d.ts +3 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +8 -7
- package/dist/index.js.map +9 -8
- package/dist/kvmap.d.ts +69 -7
- package/dist/kvmap.d.ts.map +1 -1
- package/dist/migrations.d.ts +18 -15
- package/dist/migrations.d.ts.map +1 -1
- package/dist/providers.d.ts +207 -0
- package/dist/providers.d.ts.map +1 -0
- package/dist/router.d.ts +25 -10
- package/dist/router.d.ts.map +1 -1
- package/dist/types.d.ts +147 -11
- package/dist/types.d.ts.map +1 -1
- package/package.json +39 -14
package/dist/types.d.ts
CHANGED
|
@@ -2,8 +2,9 @@
|
|
|
2
2
|
* @fileoverview TypeScript type definitions for CollegeDB
|
|
3
3
|
*
|
|
4
4
|
* This module contains all the TypeScript interfaces and types used throughout
|
|
5
|
-
* the CollegeDB library. These types provide compile-time safety
|
|
6
|
-
* better developer experience with IDE
|
|
5
|
+
* the CollegeDB library. These types provide compile-time safety, provider-
|
|
6
|
+
* agnostic storage abstractions, and a better developer experience with IDE
|
|
7
|
+
* autocompletion and error checking.
|
|
7
8
|
*
|
|
8
9
|
* The types are organized into several categories:
|
|
9
10
|
* - Environment and configuration types
|
|
@@ -25,7 +26,104 @@
|
|
|
25
26
|
* @author Gregory Mitchell
|
|
26
27
|
* @since 1.0.0
|
|
27
28
|
*/
|
|
28
|
-
import type {
|
|
29
|
+
import type { DurableObjectNamespace } from '@cloudflare/workers-types';
|
|
30
|
+
/**
|
|
31
|
+
* Result item returned by a key-value store list operation.
|
|
32
|
+
*/
|
|
33
|
+
export interface KVListKey {
|
|
34
|
+
/** Full key name */
|
|
35
|
+
name: string;
|
|
36
|
+
/** Optional absolute expiration timestamp */
|
|
37
|
+
expiration?: number;
|
|
38
|
+
/** Optional backend-specific metadata */
|
|
39
|
+
metadata?: unknown;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Result payload returned by key-value store list operations.
|
|
43
|
+
*/
|
|
44
|
+
export interface KVListResult {
|
|
45
|
+
/** The keys that matched the provided list filter */
|
|
46
|
+
keys: KVListKey[];
|
|
47
|
+
/** Cursor for paginated list operations (backend-specific) */
|
|
48
|
+
cursor?: string;
|
|
49
|
+
/** Whether the list is complete (backend-specific) */
|
|
50
|
+
list_complete?: boolean;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Provider-agnostic key-value storage contract.
|
|
54
|
+
*
|
|
55
|
+
* This interface is implemented by Cloudflare KV, Redis/Valkey adapters,
|
|
56
|
+
* and any custom KV backend supported by CollegeDB.
|
|
57
|
+
*/
|
|
58
|
+
export interface KVStorage {
|
|
59
|
+
/**
|
|
60
|
+
* Retrieves a value by key. When `type` is `json`, the value should be parsed.
|
|
61
|
+
*/
|
|
62
|
+
get<T = unknown>(key: string, type: 'json'): Promise<T | null>;
|
|
63
|
+
get(key: string, type?: 'text'): Promise<string | null>;
|
|
64
|
+
/**
|
|
65
|
+
* Stores a value by key.
|
|
66
|
+
*/
|
|
67
|
+
put(key: string, value: string): Promise<void>;
|
|
68
|
+
/**
|
|
69
|
+
* Deletes a key.
|
|
70
|
+
*/
|
|
71
|
+
delete(key: string): Promise<void>;
|
|
72
|
+
/**
|
|
73
|
+
* Lists keys, optionally filtered by prefix.
|
|
74
|
+
*/
|
|
75
|
+
list(options?: {
|
|
76
|
+
prefix?: string;
|
|
77
|
+
cursor?: string;
|
|
78
|
+
limit?: number;
|
|
79
|
+
}): Promise<KVListResult>;
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Metadata for SQL query execution results.
|
|
83
|
+
*/
|
|
84
|
+
export interface QueryResultMeta {
|
|
85
|
+
/** Query duration in milliseconds */
|
|
86
|
+
duration: number;
|
|
87
|
+
/** Number of changed rows (when available) */
|
|
88
|
+
changes?: number;
|
|
89
|
+
/** Last inserted row id (when available) */
|
|
90
|
+
last_row_id?: number | string;
|
|
91
|
+
/** Additional provider-specific metadata */
|
|
92
|
+
[key: string]: unknown;
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* Provider-agnostic query result payload.
|
|
96
|
+
*/
|
|
97
|
+
export interface QueryResult<T = Record<string, unknown>> {
|
|
98
|
+
/** Whether the statement executed successfully */
|
|
99
|
+
success: boolean;
|
|
100
|
+
/** Returned rows for the statement */
|
|
101
|
+
results: T[];
|
|
102
|
+
/** Execution metadata */
|
|
103
|
+
meta: QueryResultMeta;
|
|
104
|
+
/** Optional backend-specific error detail */
|
|
105
|
+
error?: string;
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Provider-agnostic prepared statement contract.
|
|
109
|
+
*/
|
|
110
|
+
export interface PreparedStatement {
|
|
111
|
+
/** Binds positional parameters */
|
|
112
|
+
bind(...bindings: any[]): PreparedStatement;
|
|
113
|
+
/** Executes a write-oriented statement */
|
|
114
|
+
run<T = Record<string, unknown>>(): Promise<QueryResult<T>>;
|
|
115
|
+
/** Executes a query and returns all matching rows */
|
|
116
|
+
all<T = Record<string, unknown>>(): Promise<QueryResult<T>>;
|
|
117
|
+
/** Executes a query and returns the first row */
|
|
118
|
+
first<T = Record<string, unknown>>(): Promise<T | null>;
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* Provider-agnostic SQL database contract.
|
|
122
|
+
*/
|
|
123
|
+
export interface SQLDatabase {
|
|
124
|
+
/** Creates a prepared statement */
|
|
125
|
+
prepare(sql: string): PreparedStatement;
|
|
126
|
+
}
|
|
29
127
|
/**
|
|
30
128
|
* Available Cloudflare D1 regions for geographic optimization
|
|
31
129
|
*/
|
|
@@ -66,29 +164,34 @@ export type OperationType = 'read' | 'write';
|
|
|
66
164
|
* Environment bindings for the Cloudflare Worker
|
|
67
165
|
*/
|
|
68
166
|
export interface Env {
|
|
69
|
-
/**
|
|
70
|
-
KV:
|
|
167
|
+
/** Key-value namespace for storing primary key to shard mappings */
|
|
168
|
+
KV: KVStorage;
|
|
71
169
|
/** Durable Object binding for shard coordination */
|
|
72
170
|
ShardCoordinator: DurableObjectNamespace;
|
|
73
|
-
/**
|
|
171
|
+
/** Optional Hyperdrive binding for external SQL connectivity */
|
|
172
|
+
HYPERDRIVE?: {
|
|
173
|
+
connectionString: string;
|
|
174
|
+
localConnectionString?: string;
|
|
175
|
+
};
|
|
176
|
+
/** D1 database bindings - dynamic based on Wrangler configuration */
|
|
74
177
|
[key: string]: any;
|
|
75
178
|
}
|
|
76
179
|
/**
|
|
77
180
|
* Configuration for the collegedb sharded database
|
|
78
181
|
*/
|
|
79
182
|
export interface CollegeDBConfig {
|
|
80
|
-
/**
|
|
81
|
-
kv:
|
|
183
|
+
/** Key-value provider for storing shard mappings */
|
|
184
|
+
kv: KVStorage;
|
|
82
185
|
/** Shard coordinator Durable Object */
|
|
83
186
|
coordinator?: DurableObjectNamespace;
|
|
84
|
-
/** Available
|
|
85
|
-
shards: Record<string,
|
|
187
|
+
/** Available SQL shard providers */
|
|
188
|
+
shards: Record<string, SQLDatabase>;
|
|
86
189
|
/** Default shard allocation strategy (can be single strategy or mixed strategy object) */
|
|
87
190
|
strategy?: ShardingStrategy | MixedShardingStrategy;
|
|
88
191
|
/** Target region for location-based sharding */
|
|
89
192
|
targetRegion?: D1Region;
|
|
90
193
|
/** Geographic locations of each shard (required for location strategy) */
|
|
91
|
-
shardLocations?: Record<string, ShardLocation>;
|
|
194
|
+
shardLocations?: Record<string, ShardLocation | D1Region>;
|
|
92
195
|
/**
|
|
93
196
|
* Disable automatic migration detection and background migration (useful for testing)
|
|
94
197
|
* @since 1.0.2
|
|
@@ -108,6 +211,39 @@ export interface CollegeDBConfig {
|
|
|
108
211
|
* @since 1.0.6
|
|
109
212
|
*/
|
|
110
213
|
debug?: boolean;
|
|
214
|
+
/**
|
|
215
|
+
* Maximum database size in bytes. When set, shards that exceed this size are
|
|
216
|
+
* excluded from new allocations (existing mappings remain intact).
|
|
217
|
+
*
|
|
218
|
+
* When omitted, size-based filtering is disabled to avoid extra sizing queries.
|
|
219
|
+
* This significantly reduces routing latency for write-heavy workloads.
|
|
220
|
+
* @since 1.0.8
|
|
221
|
+
*/
|
|
222
|
+
maxDatabaseSize?: number;
|
|
223
|
+
/**
|
|
224
|
+
* In-memory TTL for primary key to shard mapping cache.
|
|
225
|
+
* @default 30000
|
|
226
|
+
* @since 1.1.0
|
|
227
|
+
*/
|
|
228
|
+
mappingCacheTtlMs?: number;
|
|
229
|
+
/**
|
|
230
|
+
* In-memory TTL for known shard list cache.
|
|
231
|
+
* @default 10000
|
|
232
|
+
* @since 1.1.0
|
|
233
|
+
*/
|
|
234
|
+
knownShardsCacheTtlMs?: number;
|
|
235
|
+
/**
|
|
236
|
+
* In-memory TTL for shard size checks when `maxDatabaseSize` is enabled.
|
|
237
|
+
* @default 30000
|
|
238
|
+
* @since 1.1.0
|
|
239
|
+
*/
|
|
240
|
+
sizeCacheTtlMs?: number;
|
|
241
|
+
/**
|
|
242
|
+
* Concurrency limit for migration mapping operations.
|
|
243
|
+
* @default 25
|
|
244
|
+
* @since 1.1.0
|
|
245
|
+
*/
|
|
246
|
+
migrationConcurrency?: number;
|
|
111
247
|
}
|
|
112
248
|
/**
|
|
113
249
|
* Shard statistics for monitoring and load balancing
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AAExE;;GAEG;AACH,MAAM,WAAW,SAAS;IACzB,oBAAoB;IACpB,IAAI,E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OG;IACH,QAAQ,EAAE,gBAAgB,GAAG,qBAAqB,CAAC;IACnD,yCAAyC;IACzC,eAAe,EAAE,MAAM,CAAC;IACxB,kDAAkD;IAClD,YAAY,CAAC,EAAE,QAAQ,CAAC;IACxB,yCAAyC;IACzC,cAAc,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;CAC/C"}
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"type": "module",
|
|
7
|
-
"version": "1.0
|
|
7
|
+
"version": "1.1.0",
|
|
8
8
|
"files": [
|
|
9
9
|
"dist/**/*",
|
|
10
10
|
"README.md",
|
|
@@ -21,30 +21,55 @@
|
|
|
21
21
|
"test": "vitest run",
|
|
22
22
|
"test:watch": "vitest",
|
|
23
23
|
"test:coverage": "vitest run --coverage",
|
|
24
|
+
"test:sandbox": "bun scripts/sandbox/run.ts --db=all --kv=all --include-cloudflare",
|
|
25
|
+
"test:sandbox:all": "bun scripts/sandbox/run.ts --db=all --kv=all",
|
|
26
|
+
"test:sandbox:cloudflare": "bun scripts/sandbox/run.ts --cloudflare-only",
|
|
27
|
+
"test:sandbox:postgres": "bun scripts/sandbox/run.ts --db=postgres --kv=all",
|
|
28
|
+
"test:sandbox:postgresql": "bun scripts/sandbox/run.ts --db=postgres --kv=all",
|
|
29
|
+
"test:sandbox:mysql": "bun scripts/sandbox/run.ts --db=mysql --kv=all",
|
|
30
|
+
"test:sandbox:mariadb": "bun scripts/sandbox/run.ts --db=mariadb --kv=all",
|
|
31
|
+
"test:sandbox:sqlite": "bun scripts/sandbox/run.ts --db=sqlite --kv=all",
|
|
32
|
+
"test:sandbox:redis": "bun scripts/sandbox/run.ts --db=all --kv=redis",
|
|
33
|
+
"test:sandbox:valkey": "bun scripts/sandbox/run.ts --db=all --kv=valkey",
|
|
34
|
+
"test:sandbox:postgres+redis": "bun scripts/sandbox/run.ts --db=postgres --kv=redis",
|
|
35
|
+
"test:sandbox:postgres+valkey": "bun scripts/sandbox/run.ts --db=postgres --kv=valkey",
|
|
36
|
+
"test:sandbox:postgresql+redis": "bun scripts/sandbox/run.ts --db=postgres --kv=redis",
|
|
37
|
+
"test:sandbox:postgresql+valkey": "bun scripts/sandbox/run.ts --db=postgres --kv=valkey",
|
|
38
|
+
"test:sandbox:mysql+redis": "bun scripts/sandbox/run.ts --db=mysql --kv=redis",
|
|
39
|
+
"test:sandbox:mysql+valkey": "bun scripts/sandbox/run.ts --db=mysql --kv=valkey",
|
|
40
|
+
"test:sandbox:mariadb+redis": "bun scripts/sandbox/run.ts --db=mariadb --kv=redis",
|
|
41
|
+
"test:sandbox:mariadb+valkey": "bun scripts/sandbox/run.ts --db=mariadb --kv=valkey",
|
|
42
|
+
"test:sandbox:sqlite+redis": "bun scripts/sandbox/run.ts --db=sqlite --kv=redis",
|
|
43
|
+
"test:sandbox:sqlite+valkey": "bun scripts/sandbox/run.ts --db=sqlite --kv=valkey",
|
|
24
44
|
"prepare": "husky install"
|
|
25
45
|
},
|
|
26
46
|
"dependencies": {
|
|
27
|
-
"@cloudflare/workers-types": "^4.
|
|
47
|
+
"@cloudflare/workers-types": "^4.20260415.1"
|
|
28
48
|
},
|
|
29
49
|
"devDependencies": {
|
|
30
|
-
"@babel/cli": "^7.28.
|
|
31
|
-
"@babel/core": "^7.
|
|
32
|
-
"@babel/preset-env": "^7.
|
|
33
|
-
"@babel/preset-typescript": "^7.
|
|
50
|
+
"@babel/cli": "^7.28.6",
|
|
51
|
+
"@babel/core": "^7.29.0",
|
|
52
|
+
"@babel/preset-env": "^7.29.2",
|
|
53
|
+
"@babel/preset-typescript": "^7.28.5",
|
|
54
|
+
"@types/pg": "^8.15.6",
|
|
34
55
|
"@types/bun": "latest",
|
|
35
|
-
"@vitest/coverage-v8": "^
|
|
56
|
+
"@vitest/coverage-v8": "^4.1.4",
|
|
36
57
|
"husky": "^9.1.7",
|
|
37
58
|
"jsdoc-babel": "^0.5.0",
|
|
38
|
-
"lint-staged": "^16.
|
|
39
|
-
"
|
|
40
|
-
"
|
|
41
|
-
"
|
|
42
|
-
"
|
|
59
|
+
"lint-staged": "^16.4.0",
|
|
60
|
+
"mysql2": "^3.15.3",
|
|
61
|
+
"pg": "^8.16.3",
|
|
62
|
+
"prettier": "^3.8.3",
|
|
63
|
+
"prettier-plugin-organize-imports": "4.3.0",
|
|
64
|
+
"redis": "^5.8.2",
|
|
65
|
+
"typedoc": "^0.28.19",
|
|
66
|
+
"vitest": "^4.1.4",
|
|
67
|
+
"wrangler": "^4.64.0"
|
|
43
68
|
},
|
|
44
69
|
"peerDependencies": {
|
|
45
|
-
"typescript": "^5"
|
|
70
|
+
"typescript": "^5.8.3"
|
|
46
71
|
},
|
|
47
72
|
"lint-staged": {
|
|
48
|
-
"*.{js,ts,css,md}": "prettier --write"
|
|
73
|
+
"*.{js,ts,css,md,json,yml,jsonc}": "prettier --write"
|
|
49
74
|
}
|
|
50
75
|
}
|