@hold-baby/bucket-db 0.3.1 → 0.5.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/LICENSE +21 -0
- package/README.md +331 -62
- package/dist/bucket-db.d.ts +25 -0
- package/dist/bucket-db.js +36 -0
- package/dist/cli.d.ts +2 -0
- package/dist/cli.js +133 -0
- package/dist/collection.d.ts +78 -0
- package/dist/collection.js +321 -0
- package/dist/doctor.d.ts +7 -0
- package/dist/doctor.js +100 -0
- package/dist/errors.d.ts +59 -0
- package/dist/errors.js +57 -0
- package/dist/index.d.ts +13 -9
- package/dist/index.js +6 -10
- package/dist/keys.d.ts +12 -0
- package/dist/keys.js +31 -0
- package/dist/query.d.ts +16 -0
- package/dist/query.js +133 -0
- package/dist/snapshot.d.ts +16 -0
- package/dist/snapshot.js +40 -0
- package/dist/storage/adapter.d.ts +75 -0
- package/dist/storage/adapter.js +27 -0
- package/dist/storage/fs.d.ts +28 -0
- package/dist/storage/fs.js +175 -0
- package/dist/storage/memory.d.ts +18 -0
- package/dist/storage/memory.js +49 -0
- package/dist/storage/s3/adapters.d.ts +38 -0
- package/dist/storage/s3/adapters.js +65 -0
- package/dist/storage/s3/client.d.ts +52 -0
- package/dist/storage/s3/client.js +231 -0
- package/dist/storage/s3/credentials.d.ts +17 -0
- package/dist/storage/s3/credentials.js +42 -0
- package/dist/storage/s3/sigv4.d.ts +32 -0
- package/dist/storage/s3/sigv4.js +75 -0
- package/dist/types.d.ts +55 -0
- package/dist/types.js +1 -0
- package/dist/url.d.ts +16 -0
- package/dist/url.js +66 -0
- package/llms.txt +116 -20
- package/package.json +7 -5
- package/dist/cache/lru-cache.d.ts +0 -47
- package/dist/cache/lru-cache.d.ts.map +0 -1
- package/dist/cache/lru-cache.js +0 -110
- package/dist/cache/lru-cache.js.map +0 -1
- package/dist/core/bucket-db.d.ts +0 -20
- package/dist/core/bucket-db.d.ts.map +0 -1
- package/dist/core/bucket-db.js +0 -32
- package/dist/core/bucket-db.js.map +0 -1
- package/dist/core/collection.d.ts +0 -26
- package/dist/core/collection.d.ts.map +0 -1
- package/dist/core/collection.js +0 -213
- package/dist/core/collection.js.map +0 -1
- package/dist/core/wal.d.ts +0 -45
- package/dist/core/wal.d.ts.map +0 -1
- package/dist/core/wal.js +0 -80
- package/dist/core/wal.js.map +0 -1
- package/dist/index/shard-manager.d.ts +0 -36
- package/dist/index/shard-manager.d.ts.map +0 -1
- package/dist/index/shard-manager.js +0 -177
- package/dist/index/shard-manager.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/query/evaluator.d.ts +0 -10
- package/dist/query/evaluator.d.ts.map +0 -1
- package/dist/query/evaluator.js +0 -127
- package/dist/query/evaluator.js.map +0 -1
- package/dist/storage/fs-adapter.d.ts +0 -24
- package/dist/storage/fs-adapter.d.ts.map +0 -1
- package/dist/storage/fs-adapter.js +0 -208
- package/dist/storage/fs-adapter.js.map +0 -1
- package/dist/storage/memory-adapter.d.ts +0 -22
- package/dist/storage/memory-adapter.d.ts.map +0 -1
- package/dist/storage/memory-adapter.js +0 -78
- package/dist/storage/memory-adapter.js.map +0 -1
- package/dist/storage/oss-adapter.d.ts +0 -26
- package/dist/storage/oss-adapter.d.ts.map +0 -1
- package/dist/storage/oss-adapter.js +0 -145
- package/dist/storage/oss-adapter.js.map +0 -1
- package/dist/storage/s3-adapter.d.ts +0 -26
- package/dist/storage/s3-adapter.d.ts.map +0 -1
- package/dist/storage/s3-adapter.js +0 -170
- package/dist/storage/s3-adapter.js.map +0 -1
- package/dist/types/collection.d.ts +0 -40
- package/dist/types/collection.d.ts.map +0 -1
- package/dist/types/collection.js +0 -2
- package/dist/types/collection.js.map +0 -1
- package/dist/types/document.d.ts +0 -18
- package/dist/types/document.d.ts.map +0 -1
- package/dist/types/document.js +0 -2
- package/dist/types/document.js.map +0 -1
- package/dist/types/errors.d.ts +0 -32
- package/dist/types/errors.d.ts.map +0 -1
- package/dist/types/errors.js +0 -48
- package/dist/types/errors.js.map +0 -1
- package/dist/types/index.d.ts +0 -6
- package/dist/types/index.d.ts.map +0 -1
- package/dist/types/index.js +0 -3
- package/dist/types/index.js.map +0 -1
- package/dist/types/query.d.ts +0 -37
- package/dist/types/query.d.ts.map +0 -1
- package/dist/types/query.js +0 -2
- package/dist/types/query.js.map +0 -1
- package/dist/types/storage.d.ts +0 -45
- package/dist/types/storage.d.ts.map +0 -1
- package/dist/types/storage.js +0 -2
- package/dist/types/storage.js.map +0 -1
- package/dist/utils/hash.d.ts +0 -13
- package/dist/utils/hash.d.ts.map +0 -1
- package/dist/utils/hash.js +0 -23
- package/dist/utils/hash.js.map +0 -1
- package/dist/utils/path-validator.d.ts +0 -46
- package/dist/utils/path-validator.d.ts.map +0 -1
- package/dist/utils/path-validator.js +0 -99
- package/dist/utils/path-validator.js.map +0 -1
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
import { StorageError } from '../types/index.js';
|
|
2
|
-
/**
|
|
3
|
-
* In-memory storage adapter for testing
|
|
4
|
-
*/
|
|
5
|
-
export class MemoryStorageAdapter {
|
|
6
|
-
storage = new Map();
|
|
7
|
-
etagCounter = 0;
|
|
8
|
-
generateETag() {
|
|
9
|
-
return `etag-${++this.etagCounter}-${Date.now()}`;
|
|
10
|
-
}
|
|
11
|
-
async get(key) {
|
|
12
|
-
const entry = this.storage.get(key);
|
|
13
|
-
if (!entry) {
|
|
14
|
-
throw new StorageError(`Object not found: ${key}`);
|
|
15
|
-
}
|
|
16
|
-
return {
|
|
17
|
-
data: JSON.parse(JSON.stringify(entry.data)), // Deep clone
|
|
18
|
-
etag: entry.etag,
|
|
19
|
-
lastModified: entry.lastModified,
|
|
20
|
-
};
|
|
21
|
-
}
|
|
22
|
-
async put(key, data, options) {
|
|
23
|
-
const existing = this.storage.get(key);
|
|
24
|
-
// Check ifMatch condition
|
|
25
|
-
if (options?.ifMatch) {
|
|
26
|
-
if (!existing || existing.etag !== options.ifMatch) {
|
|
27
|
-
throw new StorageError('PreconditionFailed: ETag mismatch');
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
// Check ifNoneMatch condition
|
|
31
|
-
if (options?.ifNoneMatch && existing) {
|
|
32
|
-
throw new StorageError('PreconditionFailed: Object already exists');
|
|
33
|
-
}
|
|
34
|
-
const etag = this.generateETag();
|
|
35
|
-
this.storage.set(key, {
|
|
36
|
-
data: JSON.parse(JSON.stringify(data)), // Deep clone
|
|
37
|
-
etag,
|
|
38
|
-
lastModified: new Date(),
|
|
39
|
-
});
|
|
40
|
-
return { etag };
|
|
41
|
-
}
|
|
42
|
-
async delete(key) {
|
|
43
|
-
this.storage.delete(key);
|
|
44
|
-
}
|
|
45
|
-
async exists(key) {
|
|
46
|
-
return this.storage.has(key);
|
|
47
|
-
}
|
|
48
|
-
async listKeys(prefix) {
|
|
49
|
-
const keys = [];
|
|
50
|
-
for (const key of this.storage.keys()) {
|
|
51
|
-
if (key.startsWith(prefix)) {
|
|
52
|
-
keys.push(key);
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
return keys.sort();
|
|
56
|
-
}
|
|
57
|
-
async batchGet(keys) {
|
|
58
|
-
const results = new Map();
|
|
59
|
-
for (const key of keys) {
|
|
60
|
-
const entry = this.storage.get(key);
|
|
61
|
-
if (entry) {
|
|
62
|
-
results.set(key, {
|
|
63
|
-
data: JSON.parse(JSON.stringify(entry.data)),
|
|
64
|
-
etag: entry.etag,
|
|
65
|
-
lastModified: entry.lastModified,
|
|
66
|
-
});
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
return results;
|
|
70
|
-
}
|
|
71
|
-
/**
|
|
72
|
-
* Clear all data (for testing)
|
|
73
|
-
*/
|
|
74
|
-
clear() {
|
|
75
|
-
this.storage.clear();
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
//# sourceMappingURL=memory-adapter.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"memory-adapter.js","s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I,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;oBAC5C,IAAI,EAAE,KAAK,CAAC,IAAI;oBAChB,YAAY,EAAE,KAAK,CAAC,YAAY;iBACjC,CAAC,CAAC;YACL,CAAC;QACH,CAAC;QACD,OAAO,OAAO,CAAC;IACjB,CAAC;IAED;;OAEG;IACH,KAAK;QACH,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC;IACvB,CAAC;CACF"}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import type { StorageAdapter, StorageObject, PutOptions, StorageAdapterConfig } from '../types/index.js';
|
|
2
|
-
/**
|
|
3
|
-
* Alibaba Cloud OSS storage adapter with retry logic and timeout configuration
|
|
4
|
-
*/
|
|
5
|
-
export declare class OSSAdapter implements StorageAdapter {
|
|
6
|
-
private client;
|
|
7
|
-
private bucket;
|
|
8
|
-
constructor(config: StorageAdapterConfig);
|
|
9
|
-
/**
|
|
10
|
-
* Check if an error is retryable (temporary network issue or rate limit)
|
|
11
|
-
*/
|
|
12
|
-
private isRetryableError;
|
|
13
|
-
/**
|
|
14
|
-
* Retry wrapper with exponential backoff
|
|
15
|
-
*/
|
|
16
|
-
private withRetry;
|
|
17
|
-
get(key: string): Promise<StorageObject>;
|
|
18
|
-
put(key: string, data: any, options?: PutOptions): Promise<{
|
|
19
|
-
etag: string;
|
|
20
|
-
}>;
|
|
21
|
-
delete(key: string): Promise<void>;
|
|
22
|
-
exists(key: string): Promise<boolean>;
|
|
23
|
-
listKeys(prefix: string): Promise<string[]>;
|
|
24
|
-
batchGet(keys: string[]): Promise<Map<string, StorageObject>>;
|
|
25
|
-
}
|
|
26
|
-
//# sourceMappingURL=oss-adapter.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"oss-adapter.d.ts","sourceRoot":"","sources":["../../src/storage/oss-adapter.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,cAAc,EACd,aAAa,EACb,UAAU,EACV,oBAAoB,EACrB,MAAM,mBAAmB,CAAC;AAG3B;;GAEG;AACH,qBAAa,UAAW,YAAW,cAAc;IAC/C,OAAO,CAAC,MAAM,CAAM;IACpB,OAAO,CAAC,MAAM,CAAS;gBAEX,MAAM,EAAE,oBAAoB;IAWxC;;OAEG;IACH,OAAO,CAAC,gBAAgB;IAaxB;;OAEG;YACW,SAAS;IAmBjB,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC;IAmBxC,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,EAAE,OAAO,CAAC,EAAE,UAAU,GAAG,OAAO,CAAC;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC;IA4B5E,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAQlC,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAYrC,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;IAS3C,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;CAsBpE"}
|
|
@@ -1,145 +0,0 @@
|
|
|
1
|
-
import OSS from 'ali-oss';
|
|
2
|
-
import { StorageError } from '../types/index.js';
|
|
3
|
-
/**
|
|
4
|
-
* Alibaba Cloud OSS storage adapter with retry logic and timeout configuration
|
|
5
|
-
*/
|
|
6
|
-
export class OSSAdapter {
|
|
7
|
-
client;
|
|
8
|
-
bucket;
|
|
9
|
-
constructor(config) {
|
|
10
|
-
this.bucket = config.bucket;
|
|
11
|
-
this.client = new OSS({
|
|
12
|
-
region: config.region,
|
|
13
|
-
accessKeyId: config.credentials.accessKeyId,
|
|
14
|
-
accessKeySecret: config.credentials.secretAccessKey,
|
|
15
|
-
bucket: config.bucket,
|
|
16
|
-
endpoint: config.endpoint,
|
|
17
|
-
});
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* Check if an error is retryable (temporary network issue or rate limit)
|
|
21
|
-
*/
|
|
22
|
-
isRetryableError(error) {
|
|
23
|
-
// OSS error codes for retryable errors
|
|
24
|
-
const retryableCodes = ['RequestTimeout', 'ServiceUnavailable', 'Throttling', 'RequestTimeTooSkewed'];
|
|
25
|
-
const retryableStatusCodes = [429, 500, 502, 503, 504];
|
|
26
|
-
return (retryableCodes.includes(error.code) ||
|
|
27
|
-
retryableStatusCodes.includes(error.status) ||
|
|
28
|
-
error.code === 'ETIMEDOUT' ||
|
|
29
|
-
error.code === 'ECONNRESET');
|
|
30
|
-
}
|
|
31
|
-
/**
|
|
32
|
-
* Retry wrapper with exponential backoff
|
|
33
|
-
*/
|
|
34
|
-
async withRetry(fn) {
|
|
35
|
-
const maxRetries = 3;
|
|
36
|
-
for (let attempt = 0; attempt < maxRetries; attempt++) {
|
|
37
|
-
try {
|
|
38
|
-
return await fn();
|
|
39
|
-
}
|
|
40
|
-
catch (error) {
|
|
41
|
-
if (this.isRetryableError(error) && attempt < maxRetries - 1) {
|
|
42
|
-
// Exponential backoff with jitter: 100ms * 2^attempt + random(0-50ms)
|
|
43
|
-
const baseDelay = 100 * Math.pow(2, attempt);
|
|
44
|
-
const jitter = Math.random() * 50;
|
|
45
|
-
await new Promise(resolve => setTimeout(resolve, baseDelay + jitter));
|
|
46
|
-
continue;
|
|
47
|
-
}
|
|
48
|
-
throw error;
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
throw new Error('Unreachable');
|
|
52
|
-
}
|
|
53
|
-
async get(key) {
|
|
54
|
-
return this.withRetry(async () => {
|
|
55
|
-
try {
|
|
56
|
-
const result = await this.client.get(key);
|
|
57
|
-
return {
|
|
58
|
-
data: JSON.parse(result.content.toString()),
|
|
59
|
-
etag: result.res.headers.etag?.replace(/"/g, '') || '',
|
|
60
|
-
lastModified: new Date(result.res.headers['last-modified']),
|
|
61
|
-
};
|
|
62
|
-
}
|
|
63
|
-
catch (error) {
|
|
64
|
-
if (error.code === 'NoSuchKey') {
|
|
65
|
-
throw new StorageError(`Object not found: ${key}`);
|
|
66
|
-
}
|
|
67
|
-
throw new StorageError(`Failed to get object: ${error.message}`, error);
|
|
68
|
-
}
|
|
69
|
-
});
|
|
70
|
-
}
|
|
71
|
-
async put(key, data, options) {
|
|
72
|
-
return this.withRetry(async () => {
|
|
73
|
-
try {
|
|
74
|
-
const headers = {};
|
|
75
|
-
if (options?.ifMatch) {
|
|
76
|
-
headers['If-Match'] = options.ifMatch;
|
|
77
|
-
}
|
|
78
|
-
if (options?.ifNoneMatch) {
|
|
79
|
-
headers['If-None-Match'] = options.ifNoneMatch;
|
|
80
|
-
}
|
|
81
|
-
const result = await this.client.put(key, Buffer.from(JSON.stringify(data)), {
|
|
82
|
-
headers,
|
|
83
|
-
});
|
|
84
|
-
return {
|
|
85
|
-
etag: result.res.headers.etag?.replace(/"/g, '') || '',
|
|
86
|
-
};
|
|
87
|
-
}
|
|
88
|
-
catch (error) {
|
|
89
|
-
if (error.code === 'PreconditionFailed') {
|
|
90
|
-
throw new StorageError('PreconditionFailed: ETag mismatch');
|
|
91
|
-
}
|
|
92
|
-
throw new StorageError(`Failed to put object: ${error.message}`, error);
|
|
93
|
-
}
|
|
94
|
-
});
|
|
95
|
-
}
|
|
96
|
-
async delete(key) {
|
|
97
|
-
try {
|
|
98
|
-
await this.client.delete(key);
|
|
99
|
-
}
|
|
100
|
-
catch (error) {
|
|
101
|
-
throw new StorageError(`Failed to delete object: ${error.message}`, error);
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
async exists(key) {
|
|
105
|
-
try {
|
|
106
|
-
await this.client.head(key);
|
|
107
|
-
return true;
|
|
108
|
-
}
|
|
109
|
-
catch (error) {
|
|
110
|
-
if (error.code === 'NoSuchKey') {
|
|
111
|
-
return false;
|
|
112
|
-
}
|
|
113
|
-
throw new StorageError(`Failed to check existence: ${error.message}`, error);
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
async listKeys(prefix) {
|
|
117
|
-
try {
|
|
118
|
-
const result = await this.client.list({ prefix });
|
|
119
|
-
return (result.objects || []).map(obj => obj.name);
|
|
120
|
-
}
|
|
121
|
-
catch (error) {
|
|
122
|
-
throw new StorageError(`Failed to list keys: ${error.message}`, error);
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
async batchGet(keys) {
|
|
126
|
-
const results = new Map();
|
|
127
|
-
const promises = keys.map(async (key) => {
|
|
128
|
-
try {
|
|
129
|
-
const obj = await this.get(key);
|
|
130
|
-
return { key, obj };
|
|
131
|
-
}
|
|
132
|
-
catch (error) {
|
|
133
|
-
return null;
|
|
134
|
-
}
|
|
135
|
-
});
|
|
136
|
-
const settled = await Promise.all(promises);
|
|
137
|
-
for (const result of settled) {
|
|
138
|
-
if (result) {
|
|
139
|
-
results.set(result.key, result.obj);
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
return results;
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
//# sourceMappingURL=oss-adapter.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"oss-adapter.js","sourceRoot":"","sources":["../../src/storage/oss-adapter.ts"],"names":[],"mappings":"AAAA,OAAO,GAAG,MAAM,SAAS,CAAC;AAO1B,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEjD;;GAEG;AACH,MAAM,OAAO,UAAU;IACb,MAAM,CAAM;IACZ,MAAM,CAAS;IAEvB,YAAY,MAA4B;QACtC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;QAC5B,IAAI,CAAC,MAAM,GAAG,IAAI,GAAG,CAAC;YACpB,MAAM,EAAE,MAAM,CAAC,MAAM;YACrB,WAAW,EAAE,MAAM,CAAC,WAAW,CAAC,WAAW;YAC3C,eAAe,EAAE,MAAM,CAAC,WAAW,CAAC,eAAe;YACnD,MAAM,EAAE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C;YACtC,CAAC;QACH,CAAC;QAED,OAAO,OAAO,CAAC;IACjB,CAAC;CACF"}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import type { StorageAdapter, StorageObject, PutOptions, StorageAdapterConfig } from '../types/index.js';
|
|
2
|
-
/**
|
|
3
|
-
* S3 storage adapter with retry logic and timeout configuration
|
|
4
|
-
*/
|
|
5
|
-
export declare class S3Adapter implements StorageAdapter {
|
|
6
|
-
private client;
|
|
7
|
-
private bucket;
|
|
8
|
-
constructor(config: StorageAdapterConfig);
|
|
9
|
-
/**
|
|
10
|
-
* Check if an error is retryable (temporary network issue or rate limit)
|
|
11
|
-
*/
|
|
12
|
-
private isRetryableError;
|
|
13
|
-
/**
|
|
14
|
-
* Retry wrapper with exponential backoff
|
|
15
|
-
*/
|
|
16
|
-
private withRetry;
|
|
17
|
-
get(key: string): Promise<StorageObject>;
|
|
18
|
-
put(key: string, data: any, options?: PutOptions): Promise<{
|
|
19
|
-
etag: string;
|
|
20
|
-
}>;
|
|
21
|
-
delete(key: string): Promise<void>;
|
|
22
|
-
exists(key: string): Promise<boolean>;
|
|
23
|
-
listKeys(prefix: string): Promise<string[]>;
|
|
24
|
-
batchGet(keys: string[]): Promise<Map<string, StorageObject>>;
|
|
25
|
-
}
|
|
26
|
-
//# sourceMappingURL=s3-adapter.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"s3-adapter.d.ts","sourceRoot":"","sources":["../../src/storage/s3-adapter.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EACV,cAAc,EACd,aAAa,EACb,UAAU,EACV,oBAAoB,EACrB,MAAM,mBAAmB,CAAC;AAG3B;;GAEG;AACH,qBAAa,SAAU,YAAW,cAAc;IAC9C,OAAO,CAAC,MAAM,CAAW;IACzB,OAAO,CAAC,MAAM,CAAS;gBAEX,MAAM,EAAE,oBAAoB;IAcxC;;OAEG;IACH,OAAO,CAAC,gBAAgB;IAaxB;;OAEG;YACW,SAAS;IAmBjB,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC;IA6BxC,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,EAAE,OAAO,CAAC,EAAE,UAAU,GAAG,OAAO,CAAC;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC;IA0B5E,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAalC,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAiBrC,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;IAgB3C,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;CAuBpE"}
|
|
@@ -1,170 +0,0 @@
|
|
|
1
|
-
import { S3Client, GetObjectCommand, PutObjectCommand, DeleteObjectCommand, HeadObjectCommand, ListObjectsV2Command, } from '@aws-sdk/client-s3';
|
|
2
|
-
import { StorageError } from '../types/index.js';
|
|
3
|
-
/**
|
|
4
|
-
* S3 storage adapter with retry logic and timeout configuration
|
|
5
|
-
*/
|
|
6
|
-
export class S3Adapter {
|
|
7
|
-
client;
|
|
8
|
-
bucket;
|
|
9
|
-
constructor(config) {
|
|
10
|
-
this.bucket = config.bucket;
|
|
11
|
-
this.client = new S3Client({
|
|
12
|
-
region: config.region,
|
|
13
|
-
credentials: config.credentials,
|
|
14
|
-
endpoint: config.endpoint,
|
|
15
|
-
maxAttempts: 1, // Disable SDK's built-in retry, use our custom retry logic
|
|
16
|
-
requestHandler: {
|
|
17
|
-
connectionTimeout: 3000,
|
|
18
|
-
requestTimeout: 3000,
|
|
19
|
-
},
|
|
20
|
-
});
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
* Check if an error is retryable (temporary network issue or rate limit)
|
|
24
|
-
*/
|
|
25
|
-
isRetryableError(error) {
|
|
26
|
-
// AWS SDK error codes for retryable errors
|
|
27
|
-
const retryableCodes = ['RequestTimeout', 'ServiceUnavailable', 'ThrottlingException', 'RequestThrottled'];
|
|
28
|
-
const retryableStatusCodes = [429, 500, 502, 503, 504];
|
|
29
|
-
return (retryableCodes.includes(error.name) ||
|
|
30
|
-
retryableStatusCodes.includes(error.$metadata?.httpStatusCode) ||
|
|
31
|
-
error.code === 'ETIMEDOUT' ||
|
|
32
|
-
error.code === 'ECONNRESET');
|
|
33
|
-
}
|
|
34
|
-
/**
|
|
35
|
-
* Retry wrapper with exponential backoff
|
|
36
|
-
*/
|
|
37
|
-
async withRetry(fn) {
|
|
38
|
-
const maxRetries = 3;
|
|
39
|
-
for (let attempt = 0; attempt < maxRetries; attempt++) {
|
|
40
|
-
try {
|
|
41
|
-
return await fn();
|
|
42
|
-
}
|
|
43
|
-
catch (error) {
|
|
44
|
-
if (this.isRetryableError(error) && attempt < maxRetries - 1) {
|
|
45
|
-
// Exponential backoff with jitter: 100ms * 2^attempt + random(0-50ms)
|
|
46
|
-
const baseDelay = 100 * Math.pow(2, attempt);
|
|
47
|
-
const jitter = Math.random() * 50;
|
|
48
|
-
await new Promise(resolve => setTimeout(resolve, baseDelay + jitter));
|
|
49
|
-
continue;
|
|
50
|
-
}
|
|
51
|
-
throw error;
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
throw new Error('Unreachable');
|
|
55
|
-
}
|
|
56
|
-
async get(key) {
|
|
57
|
-
return this.withRetry(async () => {
|
|
58
|
-
try {
|
|
59
|
-
const command = new GetObjectCommand({
|
|
60
|
-
Bucket: this.bucket,
|
|
61
|
-
Key: key,
|
|
62
|
-
});
|
|
63
|
-
const response = await this.client.send(command);
|
|
64
|
-
const body = await response.Body?.transformToString();
|
|
65
|
-
if (!body) {
|
|
66
|
-
throw new StorageError(`Empty response for key: ${key}`);
|
|
67
|
-
}
|
|
68
|
-
return {
|
|
69
|
-
data: JSON.parse(body),
|
|
70
|
-
etag: response.ETag?.replace(/"/g, '') || '',
|
|
71
|
-
lastModified: response.LastModified || new Date(),
|
|
72
|
-
};
|
|
73
|
-
}
|
|
74
|
-
catch (error) {
|
|
75
|
-
if (error.name === 'NoSuchKey') {
|
|
76
|
-
throw new StorageError(`Object not found: ${key}`);
|
|
77
|
-
}
|
|
78
|
-
throw new StorageError(`Failed to get object: ${error.message}`, error);
|
|
79
|
-
}
|
|
80
|
-
});
|
|
81
|
-
}
|
|
82
|
-
async put(key, data, options) {
|
|
83
|
-
return this.withRetry(async () => {
|
|
84
|
-
try {
|
|
85
|
-
const command = new PutObjectCommand({
|
|
86
|
-
Bucket: this.bucket,
|
|
87
|
-
Key: key,
|
|
88
|
-
Body: JSON.stringify(data),
|
|
89
|
-
ContentType: 'application/json',
|
|
90
|
-
IfMatch: options?.ifMatch,
|
|
91
|
-
IfNoneMatch: options?.ifNoneMatch,
|
|
92
|
-
});
|
|
93
|
-
const response = await this.client.send(command);
|
|
94
|
-
return {
|
|
95
|
-
etag: response.ETag?.replace(/"/g, '') || '',
|
|
96
|
-
};
|
|
97
|
-
}
|
|
98
|
-
catch (error) {
|
|
99
|
-
if (error.name === 'PreconditionFailed') {
|
|
100
|
-
throw new StorageError('PreconditionFailed: ETag mismatch');
|
|
101
|
-
}
|
|
102
|
-
throw new StorageError(`Failed to put object: ${error.message}`, error);
|
|
103
|
-
}
|
|
104
|
-
});
|
|
105
|
-
}
|
|
106
|
-
async delete(key) {
|
|
107
|
-
try {
|
|
108
|
-
const command = new DeleteObjectCommand({
|
|
109
|
-
Bucket: this.bucket,
|
|
110
|
-
Key: key,
|
|
111
|
-
});
|
|
112
|
-
await this.client.send(command);
|
|
113
|
-
}
|
|
114
|
-
catch (error) {
|
|
115
|
-
throw new StorageError(`Failed to delete object: ${error.message}`, error);
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
async exists(key) {
|
|
119
|
-
try {
|
|
120
|
-
const command = new HeadObjectCommand({
|
|
121
|
-
Bucket: this.bucket,
|
|
122
|
-
Key: key,
|
|
123
|
-
});
|
|
124
|
-
await this.client.send(command);
|
|
125
|
-
return true;
|
|
126
|
-
}
|
|
127
|
-
catch (error) {
|
|
128
|
-
if (error.name === 'NotFound' || error.name === 'NoSuchKey') {
|
|
129
|
-
return false;
|
|
130
|
-
}
|
|
131
|
-
throw new StorageError(`Failed to check existence: ${error.message}`, error);
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
async listKeys(prefix) {
|
|
135
|
-
return this.withRetry(async () => {
|
|
136
|
-
try {
|
|
137
|
-
const command = new ListObjectsV2Command({
|
|
138
|
-
Bucket: this.bucket,
|
|
139
|
-
Prefix: prefix,
|
|
140
|
-
});
|
|
141
|
-
const response = await this.client.send(command);
|
|
142
|
-
return (response.Contents || []).map(obj => obj.Key).filter(Boolean);
|
|
143
|
-
}
|
|
144
|
-
catch (error) {
|
|
145
|
-
throw new StorageError(`Failed to list keys: ${error.message}`, error);
|
|
146
|
-
}
|
|
147
|
-
});
|
|
148
|
-
}
|
|
149
|
-
async batchGet(keys) {
|
|
150
|
-
const results = new Map();
|
|
151
|
-
// Fetch in parallel
|
|
152
|
-
const promises = keys.map(async (key) => {
|
|
153
|
-
try {
|
|
154
|
-
const obj = await this.get(key);
|
|
155
|
-
return { key, obj };
|
|
156
|
-
}
|
|
157
|
-
catch (error) {
|
|
158
|
-
return null;
|
|
159
|
-
}
|
|
160
|
-
});
|
|
161
|
-
const settled = await Promise.all(promises);
|
|
162
|
-
for (const result of settled) {
|
|
163
|
-
if (result) {
|
|
164
|
-
results.set(result.key, result.obj);
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
return results;
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
//# sourceMappingURL=s3-adapter.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"s3-adapter.js","sourceRoot":"","sources":["../../src/storage/s3-adapter.ts"],"names":[],"mappings":"AAAA,OAAO,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AAO,OAAO,CAAC;IACjB,CAAC;CACF"}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import type { Document, InsertDocument, UpdateDocument } from './document.js';
|
|
2
|
-
import type { QueryFilter, QueryOptions, UpdateOptions } from './query.js';
|
|
3
|
-
/**
|
|
4
|
-
* Collection interface for type-safe CRUD operations
|
|
5
|
-
*/
|
|
6
|
-
export interface ICollection<T extends Document> {
|
|
7
|
-
insert(data: InsertDocument<T>): Promise<T>;
|
|
8
|
-
findById(id: string): Promise<T | null>;
|
|
9
|
-
find(filter: QueryFilter<T>, options?: QueryOptions): Promise<T[]>;
|
|
10
|
-
update(id: string, data: UpdateDocument<T>, options?: UpdateOptions): Promise<T>;
|
|
11
|
-
delete(id: string): Promise<void>;
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* Collection metadata
|
|
15
|
-
*/
|
|
16
|
-
export interface CollectionMeta {
|
|
17
|
-
name: string;
|
|
18
|
-
version: number;
|
|
19
|
-
indexShardCount: number;
|
|
20
|
-
indexedFields: string[];
|
|
21
|
-
createdAt: string;
|
|
22
|
-
documentCount: number;
|
|
23
|
-
lastUpdated: string;
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* Index shard structure
|
|
27
|
-
*/
|
|
28
|
-
export interface IndexShard {
|
|
29
|
-
shardId: string;
|
|
30
|
-
documents: Record<string, any>;
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* Shard metadata for performance optimization
|
|
34
|
-
*/
|
|
35
|
-
export interface ShardMetadata {
|
|
36
|
-
shardId: string;
|
|
37
|
-
docCount: number;
|
|
38
|
-
lastUpdated: string;
|
|
39
|
-
}
|
|
40
|
-
//# sourceMappingURL=collection.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"collection.d.ts","sourceRoot":"","sources":["../../src/types/collection.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,cAAc,EAAE,cAAc,EAA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ELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"collection.js","sourceRoot":"","sources":["../../src/types/collection.ts"],"names":[],"mappings":""}
|
package/dist/types/document.d.ts
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Base document type with system fields
|
|
3
|
-
*/
|
|
4
|
-
export interface Document {
|
|
5
|
-
id: string;
|
|
6
|
-
_etag?: string;
|
|
7
|
-
_createdAt?: string;
|
|
8
|
-
_updatedAt?: string;
|
|
9
|
-
}
|
|
10
|
-
/**
|
|
11
|
-
* Type for inserting new documents (omits system fields)
|
|
12
|
-
*/
|
|
13
|
-
export type InsertDocument<T extends Document> = Omit<T, 'id' | '_etag' | '_createdAt' | '_updatedAt'>;
|
|
14
|
-
/**
|
|
15
|
-
* Type for updating documents (partial update without id)
|
|
16
|
-
*/
|
|
17
|
-
export type UpdateDocument<T extends Document> = Partial<Omit<T, 'id'>>;
|
|
18
|
-
//# sourceMappingURL=document.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"document.d.ts","sourceRoot":"","sources":["../../src/types/document.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,QAAQ;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;GAEG;AACH,MAAM,MAAM,cAAc,CAAC,CAAC,SAAS,QAAQ,IAAI,IAAI,CACnD,CAAC,EACD,IAAI,GAAG,OAAO,GAAG,YAAY,GAAG,YAAY,CAC7C,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,cAAc,CAAC,CAAC,SAAS,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC"}
|
package/dist/types/document.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"document.js","sourceRoot":"","sources":["../../src/types/document.ts"],"names":[],"mappings":""}
|
package/dist/types/errors.d.ts
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Base error class for BucketDB
|
|
3
|
-
*/
|
|
4
|
-
export declare class BucketDBError extends Error {
|
|
5
|
-
constructor(message: string);
|
|
6
|
-
}
|
|
7
|
-
/**
|
|
8
|
-
* Document not found error
|
|
9
|
-
*/
|
|
10
|
-
export declare class DocumentNotFoundError extends BucketDBError {
|
|
11
|
-
constructor(id: string);
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* Concurrent update conflict error
|
|
15
|
-
*/
|
|
16
|
-
export declare class ConcurrentUpdateError extends BucketDBError {
|
|
17
|
-
constructor(message?: string);
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* Validation error
|
|
21
|
-
*/
|
|
22
|
-
export declare class ValidationError extends BucketDBError {
|
|
23
|
-
constructor(message: string);
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* Storage error
|
|
27
|
-
*/
|
|
28
|
-
export declare class StorageError extends BucketDBError {
|
|
29
|
-
readonly cause?: Error | undefined;
|
|
30
|
-
constructor(message: string, cause?: Error | undefined);
|
|
31
|
-
}
|
|
32
|
-
//# sourceMappingURL=errors.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/types/errors.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,qBAAa,aAAc,SAAQ,KAAK;gBAC1B,OAAO,EAAE,MAAM;CAI5B;AAED;;GAEG;AACH,qBAAa,qBAAsB,SAAQ,aAAa;gBAC1C,EAAE,EAAE,MAAM;CAIvB;AAED;;GAEG;AACH,qBAAa,qBAAsB,SAAQ,aAAa;gBAC1C,OAAO,GAAE,MAAmD;CAIzE;AAED;;GAEG;AACH,qBAAa,eAAgB,SAAQ,aAAa;gBACpC,OAAO,EAAE,MAAM;CAI5B;AAED;;GAEG;AACH,qBAAa,YAAa,SAAQ,aAAa;aACA,KAAK,CAAC,EAAE,KAAK;gBAA9C,OAAO,EAAE,MAAM,EAAkB,KAAK,CAAC,EAAE,KAAK,YAAA;CAI3D"}
|
package/dist/types/errors.js
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Base error class for BucketDB
|
|
3
|
-
*/
|
|
4
|
-
export class BucketDBError extends Error {
|
|
5
|
-
constructor(message) {
|
|
6
|
-
super(message);
|
|
7
|
-
this.name = 'BucketDBError';
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
/**
|
|
11
|
-
* Document not found error
|
|
12
|
-
*/
|
|
13
|
-
export class DocumentNotFoundError extends BucketDBError {
|
|
14
|
-
constructor(id) {
|
|
15
|
-
super(`Document not found: ${id}`);
|
|
16
|
-
this.name = 'DocumentNotFoundError';
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* Concurrent update conflict error
|
|
21
|
-
*/
|
|
22
|
-
export class ConcurrentUpdateError extends BucketDBError {
|
|
23
|
-
constructor(message = 'Concurrent update conflict, please retry') {
|
|
24
|
-
super(message);
|
|
25
|
-
this.name = 'ConcurrentUpdateError';
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
/**
|
|
29
|
-
* Validation error
|
|
30
|
-
*/
|
|
31
|
-
export class ValidationError extends BucketDBError {
|
|
32
|
-
constructor(message) {
|
|
33
|
-
super(message);
|
|
34
|
-
this.name = 'ValidationError';
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
/**
|
|
38
|
-
* Storage error
|
|
39
|
-
*/
|
|
40
|
-
export class StorageError extends BucketDBError {
|
|
41
|
-
cause;
|
|
42
|
-
constructor(message, cause) {
|
|
43
|
-
super(message);
|
|
44
|
-
this.cause = cause;
|
|
45
|
-
this.name = 'StorageError';
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
//# sourceMappingURL=errors.js.map
|
package/dist/types/errors.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../src/types/errors.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,OAAO,aAAc,SAAQ,KAAK;IACtC,YAAY,OAAe;QACzB,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,eAAe,CAAC;IAC9B,CAAC;CACF;AAED;;GAEG;AACH,MAAM,OAAO,qBAAsB,SAAQ,aAAa;IACtD,YAAY,EAAU;QACpB,KAAK,CAAC,uBAAuB,EAAE,EAAE,CAAC,CAAC;QACnC,IAAI,CAAC,IAAI,GAAG,uBAAuB,CAAC;IACtC,CAAC;CACF;AAED;;GAEG;AACH,MAAM,OAAO,qBAAsB,SAAQ,aAAa;IACtD,YAAY,UAAkB,0CAA0C;QACtE,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,uBAAuB,CAAC;IACtC,CAAC;CACF;AAED;;GAEG;AACH,MAAM,OAAO,eAAgB,SAAQ,aAAa;IAChD,YAAY,OAAe;QACzB,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,iBAAiB,CAAC;IAChC,CAAC;CACF;AAED;;GAEG;AACH,MAAM,OAAO,YAAa,SAAQ,aAAa;IACA;IAA7C,YAAY,OAAe,EAAkB,KAAa;QACxD,KAAK,CAAC,OAAO,CAAC,CAAC;QAD4B,UAAK,GAAL,KAAK,CAAQ;QAExD,IAAI,CAAC,IAAI,GAAG,cAAc,CAAC;IAC7B,CAAC;CACF"}
|