rac-delta 1.0.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 +1 -0
- package/dist/core/adapters/index.d.ts +2 -0
- package/dist/core/adapters/index.d.ts.map +1 -0
- package/dist/core/adapters/index.js +17 -0
- package/dist/core/adapters/storage-adapter.d.ts +125 -0
- package/dist/core/adapters/storage-adapter.d.ts.map +1 -0
- package/dist/core/adapters/storage-adapter.js +14 -0
- package/dist/core/config/index.d.ts +2 -0
- package/dist/core/config/index.d.ts.map +1 -0
- package/dist/core/config/index.js +17 -0
- package/dist/core/config/rac-delta-config.d.ts +132 -0
- package/dist/core/config/rac-delta-config.d.ts.map +1 -0
- package/dist/core/config/rac-delta-config.js +2 -0
- package/dist/core/exceptions.d.ts +25 -0
- package/dist/core/exceptions.d.ts.map +1 -0
- package/dist/core/exceptions.js +51 -0
- package/dist/core/models/chunk.d.ts +12 -0
- package/dist/core/models/chunk.d.ts.map +1 -0
- package/dist/core/models/chunk.js +2 -0
- package/dist/core/models/delta-plan.d.ts +12 -0
- package/dist/core/models/delta-plan.d.ts.map +1 -0
- package/dist/core/models/delta-plan.js +2 -0
- package/dist/core/models/file-entry.d.ts +9 -0
- package/dist/core/models/file-entry.d.ts.map +1 -0
- package/dist/core/models/file-entry.js +2 -0
- package/dist/core/models/index.d.ts +5 -0
- package/dist/core/models/index.d.ts.map +1 -0
- package/dist/core/models/index.js +20 -0
- package/dist/core/models/rd-index.d.ts +8 -0
- package/dist/core/models/rd-index.d.ts.map +1 -0
- package/dist/core/models/rd-index.js +2 -0
- package/dist/core/pipelines/download-pipeline.d.ts +142 -0
- package/dist/core/pipelines/download-pipeline.d.ts.map +1 -0
- package/dist/core/pipelines/download-pipeline.js +64 -0
- package/dist/core/pipelines/index.d.ts +3 -0
- package/dist/core/pipelines/index.d.ts.map +1 -0
- package/dist/core/pipelines/index.js +18 -0
- package/dist/core/pipelines/upload-pipeline.d.ts +60 -0
- package/dist/core/pipelines/upload-pipeline.d.ts.map +1 -0
- package/dist/core/pipelines/upload-pipeline.js +34 -0
- package/dist/core/services/delta-service.d.ts +76 -0
- package/dist/core/services/delta-service.d.ts.map +1 -0
- package/dist/core/services/delta-service.js +2 -0
- package/dist/core/services/hasher-service.d.ts +47 -0
- package/dist/core/services/hasher-service.d.ts.map +1 -0
- package/dist/core/services/hasher-service.js +2 -0
- package/dist/core/services/index.d.ts +5 -0
- package/dist/core/services/index.d.ts.map +1 -0
- package/dist/core/services/index.js +20 -0
- package/dist/core/services/reconstruction-service.d.ts +99 -0
- package/dist/core/services/reconstruction-service.d.ts.map +1 -0
- package/dist/core/services/reconstruction-service.js +4 -0
- package/dist/core/services/validation-service.d.ts +18 -0
- package/dist/core/services/validation-service.d.ts.map +1 -0
- package/dist/core/services/validation-service.js +2 -0
- package/dist/core/types/index.d.ts +2 -0
- package/dist/core/types/index.d.ts.map +1 -0
- package/dist/core/types/index.js +17 -0
- package/dist/core/types/types.d.ts +3 -0
- package/dist/core/types/types.d.ts.map +1 -0
- package/dist/core/types/types.js +2 -0
- package/dist/core/utils/index.d.ts +3 -0
- package/dist/core/utils/index.d.ts.map +1 -0
- package/dist/core/utils/index.js +18 -0
- package/dist/core/utils/invariant.d.ts +2 -0
- package/dist/core/utils/invariant.d.ts.map +1 -0
- package/dist/core/utils/invariant.js +11 -0
- package/dist/core/utils/stream-to-buffer.d.ts +3 -0
- package/dist/core/utils/stream-to-buffer.d.ts.map +1 -0
- package/dist/core/utils/stream-to-buffer.js +10 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +29 -0
- package/dist/infrastructure/adapters/azure-blob-storage-adapter.d.ts +24 -0
- package/dist/infrastructure/adapters/azure-blob-storage-adapter.d.ts.map +1 -0
- package/dist/infrastructure/adapters/azure-blob-storage-adapter.js +149 -0
- package/dist/infrastructure/adapters/gcs-storage-adapter.d.ts +20 -0
- package/dist/infrastructure/adapters/gcs-storage-adapter.d.ts.map +1 -0
- package/dist/infrastructure/adapters/gcs-storage-adapter.js +101 -0
- package/dist/infrastructure/adapters/http-storage-adapter.d.ts +23 -0
- package/dist/infrastructure/adapters/http-storage-adapter.d.ts.map +1 -0
- package/dist/infrastructure/adapters/http-storage-adapter.js +154 -0
- package/dist/infrastructure/adapters/local-storage-adapter.d.ts +23 -0
- package/dist/infrastructure/adapters/local-storage-adapter.d.ts.map +1 -0
- package/dist/infrastructure/adapters/local-storage-adapter.js +124 -0
- package/dist/infrastructure/adapters/s3-storage-adapter.d.ts +24 -0
- package/dist/infrastructure/adapters/s3-storage-adapter.d.ts.map +1 -0
- package/dist/infrastructure/adapters/s3-storage-adapter.js +139 -0
- package/dist/infrastructure/adapters/ssh-storage-adapter.d.ts +28 -0
- package/dist/infrastructure/adapters/ssh-storage-adapter.d.ts.map +1 -0
- package/dist/infrastructure/adapters/ssh-storage-adapter.js +237 -0
- package/dist/infrastructure/adapters/url-storage-adapter.d.ts +14 -0
- package/dist/infrastructure/adapters/url-storage-adapter.d.ts.map +1 -0
- package/dist/infrastructure/adapters/url-storage-adapter.js +92 -0
- package/dist/infrastructure/chunk-sources/disk-chunk-source.d.ts +12 -0
- package/dist/infrastructure/chunk-sources/disk-chunk-source.d.ts.map +1 -0
- package/dist/infrastructure/chunk-sources/disk-chunk-source.js +61 -0
- package/dist/infrastructure/chunk-sources/index.d.ts +4 -0
- package/dist/infrastructure/chunk-sources/index.d.ts.map +1 -0
- package/dist/infrastructure/chunk-sources/index.js +19 -0
- package/dist/infrastructure/chunk-sources/memory-chunk-source.d.ts +9 -0
- package/dist/infrastructure/chunk-sources/memory-chunk-source.d.ts.map +1 -0
- package/dist/infrastructure/chunk-sources/memory-chunk-source.js +29 -0
- package/dist/infrastructure/chunk-sources/storage-chunk-source.d.ts +21 -0
- package/dist/infrastructure/chunk-sources/storage-chunk-source.d.ts.map +1 -0
- package/dist/infrastructure/chunk-sources/storage-chunk-source.js +150 -0
- package/dist/infrastructure/client.d.ts +45 -0
- package/dist/infrastructure/client.d.ts.map +1 -0
- package/dist/infrastructure/client.js +52 -0
- package/dist/infrastructure/factories/pipeline-factory.d.ts +15 -0
- package/dist/infrastructure/factories/pipeline-factory.d.ts.map +1 -0
- package/dist/infrastructure/factories/pipeline-factory.js +26 -0
- package/dist/infrastructure/factories/service-factory.d.ts +11 -0
- package/dist/infrastructure/factories/service-factory.d.ts.map +1 -0
- package/dist/infrastructure/factories/service-factory.js +17 -0
- package/dist/infrastructure/factories/storage-adpater-factory.d.ts +41 -0
- package/dist/infrastructure/factories/storage-adpater-factory.d.ts.map +1 -0
- package/dist/infrastructure/factories/storage-adpater-factory.js +33 -0
- package/dist/infrastructure/pipelines/default-hash-download-pipeline.d.ts +27 -0
- package/dist/infrastructure/pipelines/default-hash-download-pipeline.d.ts.map +1 -0
- package/dist/infrastructure/pipelines/default-hash-download-pipeline.js +211 -0
- package/dist/infrastructure/pipelines/default-hash-upload-pipeline.d.ts +19 -0
- package/dist/infrastructure/pipelines/default-hash-upload-pipeline.d.ts.map +1 -0
- package/dist/infrastructure/pipelines/default-hash-upload-pipeline.js +170 -0
- package/dist/infrastructure/pipelines/default-url-download-pipeline.d.ts +30 -0
- package/dist/infrastructure/pipelines/default-url-download-pipeline.d.ts.map +1 -0
- package/dist/infrastructure/pipelines/default-url-download-pipeline.js +198 -0
- package/dist/infrastructure/pipelines/default-url-upload-pipeline.d.ts +20 -0
- package/dist/infrastructure/pipelines/default-url-upload-pipeline.d.ts.map +1 -0
- package/dist/infrastructure/pipelines/default-url-upload-pipeline.js +126 -0
- package/dist/infrastructure/services/hash-wasm-hasher-service.d.ts +13 -0
- package/dist/infrastructure/services/hash-wasm-hasher-service.d.ts.map +1 -0
- package/dist/infrastructure/services/hash-wasm-hasher-service.js +113 -0
- package/dist/infrastructure/services/memory-delta-service.d.ts +17 -0
- package/dist/infrastructure/services/memory-delta-service.d.ts.map +1 -0
- package/dist/infrastructure/services/memory-delta-service.js +198 -0
- package/dist/infrastructure/services/memory-reconstruction-service.d.ts +25 -0
- package/dist/infrastructure/services/memory-reconstruction-service.d.ts.map +1 -0
- package/dist/infrastructure/services/memory-reconstruction-service.js +329 -0
- package/dist/infrastructure/services/memory-validation-service.d.ts +9 -0
- package/dist/infrastructure/services/memory-validation-service.d.ts.map +1 -0
- package/dist/infrastructure/services/memory-validation-service.js +33 -0
- package/package.json +43 -0
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Readable } from 'stream';
|
|
2
|
+
import { BlobInfo, HashStorageAdapter } from '../../core/adapters';
|
|
3
|
+
import { LocalStorageConfig } from '../../core/config';
|
|
4
|
+
import { RDIndex } from '../../core/models';
|
|
5
|
+
import { Nullish } from '../../core/types';
|
|
6
|
+
export declare class LocalStorageAdapter extends HashStorageAdapter {
|
|
7
|
+
private readonly config;
|
|
8
|
+
constructor(config: LocalStorageConfig);
|
|
9
|
+
dispose(): Promise<void>;
|
|
10
|
+
private resolveChunkPath;
|
|
11
|
+
private resolveIndexPath;
|
|
12
|
+
getChunk(hash: string): Promise<Readable | null>;
|
|
13
|
+
putChunk(hash: string, data: Readable, opts?: Nullish<{
|
|
14
|
+
overwrite?: Nullish<boolean>;
|
|
15
|
+
}>): Promise<void>;
|
|
16
|
+
chunkExists(hash: string): Promise<boolean>;
|
|
17
|
+
deleteChunk(hash: string): Promise<void>;
|
|
18
|
+
listChunks(): Promise<string[]>;
|
|
19
|
+
getChunkInfo(hash: string): Promise<BlobInfo | null>;
|
|
20
|
+
getRemoteIndex(): Promise<RDIndex | null>;
|
|
21
|
+
putRemoteIndex(index: RDIndex): Promise<void>;
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=local-storage-adapter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"local-storage-adapter.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/adapters/local-storage-adapter.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAIlC,OAAO,EAAE,QAAQ,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AACnE,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAE3C,qBAAa,mBAAoB,SAAQ,kBAAkB;IAC7C,OAAO,CAAC,QAAQ,CAAC,MAAM;gBAAN,MAAM,EAAE,kBAAkB;IAIjD,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;IAI9B,OAAO,CAAC,gBAAgB;IAKxB,OAAO,CAAC,gBAAgB;IAKlB,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,GAAG,IAAI,CAAC;IAWhD,QAAQ,CACZ,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,QAAQ,EACd,IAAI,CAAC,EAAE,OAAO,CAAC;QAAE,SAAS,CAAC,EAAE,OAAO,CAAC,OAAO,CAAC,CAAA;KAAE,CAAC,GAC/C,OAAO,CAAC,IAAI,CAAC;IA4BV,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAW3C,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAKxC,UAAU,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;IAoB/B,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,GAAG,IAAI,CAAC;IAepD,cAAc,IAAI,OAAO,CAAC,OAAO,GAAG,IAAI,CAAC;IAgBzC,cAAc,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC;CAKpD"}
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LocalStorageAdapter = void 0;
|
|
4
|
+
const promises_1 = require("fs/promises");
|
|
5
|
+
const fs_1 = require("fs");
|
|
6
|
+
const path_1 = require("path");
|
|
7
|
+
const exceptions_1 = require("../../core/exceptions");
|
|
8
|
+
const adapters_1 = require("../../core/adapters");
|
|
9
|
+
class LocalStorageAdapter extends adapters_1.HashStorageAdapter {
|
|
10
|
+
config;
|
|
11
|
+
constructor(config) {
|
|
12
|
+
super();
|
|
13
|
+
this.config = config;
|
|
14
|
+
}
|
|
15
|
+
async dispose() {
|
|
16
|
+
return;
|
|
17
|
+
}
|
|
18
|
+
resolveChunkPath(hash) {
|
|
19
|
+
const prefix = this.config.pathPrefix ?? '';
|
|
20
|
+
return (0, path_1.join)(this.config.basePath, prefix, 'chunks', hash);
|
|
21
|
+
}
|
|
22
|
+
resolveIndexPath() {
|
|
23
|
+
const prefix = this.config.pathPrefix ?? '';
|
|
24
|
+
return (0, path_1.join)(this.config.basePath, prefix, 'rd-index.json');
|
|
25
|
+
}
|
|
26
|
+
async getChunk(hash) {
|
|
27
|
+
const path = this.resolveChunkPath(hash);
|
|
28
|
+
try {
|
|
29
|
+
await (0, promises_1.access)(path);
|
|
30
|
+
return (0, fs_1.createReadStream)(path);
|
|
31
|
+
}
|
|
32
|
+
catch {
|
|
33
|
+
return null;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
async putChunk(hash, data, opts) {
|
|
37
|
+
const path = this.resolveChunkPath(hash);
|
|
38
|
+
await (0, promises_1.mkdir)((0, path_1.dirname)(path), { recursive: true });
|
|
39
|
+
if (!opts?.overwrite) {
|
|
40
|
+
try {
|
|
41
|
+
await (0, promises_1.access)(path);
|
|
42
|
+
throw new exceptions_1.ChunkAlreadyExistsException(`${hash}`);
|
|
43
|
+
}
|
|
44
|
+
catch (error) {
|
|
45
|
+
const nodeError = error;
|
|
46
|
+
if (nodeError.code !== 'ENOENT') {
|
|
47
|
+
throw error;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
await new Promise((resolve, reject) => {
|
|
52
|
+
const writeStream = (0, fs_1.createWriteStream)(path);
|
|
53
|
+
data.pipe(writeStream);
|
|
54
|
+
writeStream.on('finish', () => resolve());
|
|
55
|
+
writeStream.on('error', (err) => reject(err));
|
|
56
|
+
data.on('error', (err) => reject(err));
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
async chunkExists(hash) {
|
|
60
|
+
const path = this.resolveChunkPath(hash);
|
|
61
|
+
try {
|
|
62
|
+
await (0, promises_1.access)(path);
|
|
63
|
+
return true;
|
|
64
|
+
}
|
|
65
|
+
catch {
|
|
66
|
+
return false;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
async deleteChunk(hash) {
|
|
70
|
+
const path = this.resolveChunkPath(hash);
|
|
71
|
+
await (0, promises_1.rm)(path, { force: true });
|
|
72
|
+
}
|
|
73
|
+
async listChunks() {
|
|
74
|
+
const prefix = this.config.pathPrefix ?? '';
|
|
75
|
+
const chunksDir = (0, path_1.join)(this.config.basePath, prefix, 'chunks');
|
|
76
|
+
const hashes = [];
|
|
77
|
+
try {
|
|
78
|
+
const entries = await (0, promises_1.readdir)(chunksDir, { withFileTypes: true });
|
|
79
|
+
for (const entry of entries) {
|
|
80
|
+
if (entry.isFile()) {
|
|
81
|
+
hashes.push(entry.name);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
catch {
|
|
86
|
+
// if no /chunks directory return empty
|
|
87
|
+
}
|
|
88
|
+
return hashes;
|
|
89
|
+
}
|
|
90
|
+
async getChunkInfo(hash) {
|
|
91
|
+
const path = this.resolveChunkPath(hash);
|
|
92
|
+
try {
|
|
93
|
+
const stats = await (0, promises_1.stat)(path);
|
|
94
|
+
return {
|
|
95
|
+
hash,
|
|
96
|
+
size: stats.size,
|
|
97
|
+
modified: stats.mtime,
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
catch {
|
|
101
|
+
return null;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
async getRemoteIndex() {
|
|
105
|
+
const indexPath = this.resolveIndexPath();
|
|
106
|
+
try {
|
|
107
|
+
const data = await (0, promises_1.readFile)(indexPath, 'utf-8');
|
|
108
|
+
return JSON.parse(data);
|
|
109
|
+
}
|
|
110
|
+
catch (error) {
|
|
111
|
+
const nodeError = error;
|
|
112
|
+
if (nodeError.code === 'ENOENT') {
|
|
113
|
+
return null;
|
|
114
|
+
}
|
|
115
|
+
throw error;
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
async putRemoteIndex(index) {
|
|
119
|
+
const indexPath = this.resolveIndexPath();
|
|
120
|
+
await (0, promises_1.mkdir)((0, path_1.dirname)(indexPath), { recursive: true });
|
|
121
|
+
await (0, promises_1.writeFile)(indexPath, JSON.stringify(index, null, 2), 'utf-8');
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
exports.LocalStorageAdapter = LocalStorageAdapter;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Readable } from 'stream';
|
|
2
|
+
import { BlobInfo, HashStorageAdapter } from '../../core/adapters';
|
|
3
|
+
import { S3StorageConfig } from '../../core/config';
|
|
4
|
+
import { RDIndex } from '../../core/models';
|
|
5
|
+
import { Nullish } from '../../core/types';
|
|
6
|
+
export declare class S3StorageAdapter extends HashStorageAdapter {
|
|
7
|
+
private readonly config;
|
|
8
|
+
private readonly s3;
|
|
9
|
+
constructor(config: S3StorageConfig);
|
|
10
|
+
dispose(): Promise<void>;
|
|
11
|
+
private resolveKey;
|
|
12
|
+
getChunk(hash: string): Promise<Readable | null>;
|
|
13
|
+
putChunk(hash: string, data: Readable, opts?: {
|
|
14
|
+
overwrite?: Nullish<boolean>;
|
|
15
|
+
size?: Nullish<number>;
|
|
16
|
+
}): Promise<void>;
|
|
17
|
+
chunkExists(hash: string): Promise<boolean>;
|
|
18
|
+
deleteChunk(hash: string): Promise<void>;
|
|
19
|
+
listChunks(): Promise<string[]>;
|
|
20
|
+
getChunkInfo(hash: string): Promise<BlobInfo | null>;
|
|
21
|
+
putRemoteIndex(index: RDIndex): Promise<void>;
|
|
22
|
+
getRemoteIndex(): Promise<RDIndex | null>;
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=s3-storage-adapter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"s3-storage-adapter.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/adapters/s3-storage-adapter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAWlC,OAAO,EAAE,QAAQ,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AACnE,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAE3C,qBAAa,gBAAiB,SAAQ,kBAAkB;IAG1C,OAAO,CAAC,QAAQ,CAAC,MAAM;IAFnC,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAW;gBAED,MAAM,EAAE,eAAe;IAU9C,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;IAI9B,OAAO,CAAC,UAAU;IAIZ,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,GAAG,IAAI,CAAC;IAiBhD,QAAQ,CACZ,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,QAAQ,EACd,IAAI,CAAC,EAAE;QAAE,SAAS,CAAC,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC;QAAC,IAAI,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,CAAA;KAAE,GAC9D,OAAO,CAAC,IAAI,CAAC;IAoBV,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAY3C,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAKxC,UAAU,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;IA8B/B,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,GAAG,IAAI,CAAC;IAqBpD,cAAc,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC;IAe7C,cAAc,IAAI,OAAO,CAAC,OAAO,GAAG,IAAI,CAAC;CA6BhD"}
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.S3StorageAdapter = void 0;
|
|
4
|
+
const client_s3_1 = require("@aws-sdk/client-s3");
|
|
5
|
+
const adapters_1 = require("../../core/adapters");
|
|
6
|
+
class S3StorageAdapter extends adapters_1.HashStorageAdapter {
|
|
7
|
+
config;
|
|
8
|
+
s3;
|
|
9
|
+
constructor(config) {
|
|
10
|
+
super();
|
|
11
|
+
this.config = config;
|
|
12
|
+
this.s3 = new client_s3_1.S3Client({
|
|
13
|
+
region: config.region,
|
|
14
|
+
endpoint: config.endpoint,
|
|
15
|
+
credentials: config.credentials,
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
async dispose() {
|
|
19
|
+
this.s3.destroy();
|
|
20
|
+
}
|
|
21
|
+
resolveKey(hash) {
|
|
22
|
+
return this.config.pathPrefix ? `${this.config.pathPrefix}/chunks/${hash}` : hash;
|
|
23
|
+
}
|
|
24
|
+
async getChunk(hash) {
|
|
25
|
+
try {
|
|
26
|
+
const key = this.resolveKey(hash);
|
|
27
|
+
const res = await this.s3.send(new client_s3_1.GetObjectCommand({ Bucket: this.config.bucket, Key: key }));
|
|
28
|
+
return res.Body;
|
|
29
|
+
}
|
|
30
|
+
catch (error) {
|
|
31
|
+
if (error instanceof client_s3_1.NoSuchKey) {
|
|
32
|
+
return null;
|
|
33
|
+
}
|
|
34
|
+
throw error;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
async putChunk(hash, data, opts) {
|
|
38
|
+
const key = this.resolveKey(hash);
|
|
39
|
+
if (!opts?.overwrite) {
|
|
40
|
+
const exists = await this.chunkExists(hash);
|
|
41
|
+
if (exists) {
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
await this.s3.send(new client_s3_1.PutObjectCommand({
|
|
46
|
+
Bucket: this.config.bucket,
|
|
47
|
+
Key: key,
|
|
48
|
+
Body: data,
|
|
49
|
+
ContentLength: opts?.size,
|
|
50
|
+
}));
|
|
51
|
+
}
|
|
52
|
+
async chunkExists(hash) {
|
|
53
|
+
try {
|
|
54
|
+
const key = this.resolveKey(hash);
|
|
55
|
+
await this.s3.send(new client_s3_1.HeadObjectCommand({ Bucket: this.config.bucket, Key: key }));
|
|
56
|
+
return true;
|
|
57
|
+
}
|
|
58
|
+
catch (error) {
|
|
59
|
+
return false;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
async deleteChunk(hash) {
|
|
63
|
+
const key = this.resolveKey(hash);
|
|
64
|
+
await this.s3.send(new client_s3_1.DeleteObjectCommand({ Bucket: this.config.bucket, Key: key }));
|
|
65
|
+
}
|
|
66
|
+
async listChunks() {
|
|
67
|
+
const chunks = [];
|
|
68
|
+
let continuationToken;
|
|
69
|
+
const prefix = this.config.pathPrefix ? `${this.config.pathPrefix}/chunks` : undefined;
|
|
70
|
+
do {
|
|
71
|
+
const res = await this.s3.send(new client_s3_1.ListObjectsV2Command({
|
|
72
|
+
Bucket: this.config.bucket,
|
|
73
|
+
Prefix: prefix,
|
|
74
|
+
ContinuationToken: continuationToken,
|
|
75
|
+
}));
|
|
76
|
+
const keys = res.Contents?.map((obj) => this.config.pathPrefix
|
|
77
|
+
? obj.Key.replace(`${this.config.pathPrefix}/chunks/`, '')
|
|
78
|
+
: obj.Key);
|
|
79
|
+
if (keys) {
|
|
80
|
+
chunks.push(...keys);
|
|
81
|
+
}
|
|
82
|
+
continuationToken = res.NextContinuationToken;
|
|
83
|
+
} while (continuationToken);
|
|
84
|
+
return chunks;
|
|
85
|
+
}
|
|
86
|
+
async getChunkInfo(hash) {
|
|
87
|
+
try {
|
|
88
|
+
const key = this.resolveKey(hash);
|
|
89
|
+
const res = await this.s3.send(new client_s3_1.HeadObjectCommand({ Bucket: this.config.bucket, Key: key }));
|
|
90
|
+
return {
|
|
91
|
+
hash,
|
|
92
|
+
size: res.ContentLength ?? 0,
|
|
93
|
+
modified: res.LastModified,
|
|
94
|
+
metadata: res.Metadata,
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
catch (error) {
|
|
98
|
+
if (error instanceof client_s3_1.NoSuchKey) {
|
|
99
|
+
return null;
|
|
100
|
+
}
|
|
101
|
+
throw error;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
async putRemoteIndex(index) {
|
|
105
|
+
const key = this.config.pathPrefix
|
|
106
|
+
? `${this.config.pathPrefix}/rd-index.json`
|
|
107
|
+
: 'rd-index.json';
|
|
108
|
+
await this.s3.send(new client_s3_1.PutObjectCommand({
|
|
109
|
+
Bucket: this.config.bucket,
|
|
110
|
+
Key: key,
|
|
111
|
+
Body: JSON.stringify(index),
|
|
112
|
+
ContentType: 'application/json',
|
|
113
|
+
}));
|
|
114
|
+
}
|
|
115
|
+
async getRemoteIndex() {
|
|
116
|
+
const key = this.config.pathPrefix
|
|
117
|
+
? `${this.config.pathPrefix}/rd-index.json`
|
|
118
|
+
: 'rd-index.json';
|
|
119
|
+
try {
|
|
120
|
+
const result = await this.s3.send(new client_s3_1.GetObjectCommand({
|
|
121
|
+
Bucket: this.config.bucket,
|
|
122
|
+
Key: key,
|
|
123
|
+
}));
|
|
124
|
+
if (!result.Body) {
|
|
125
|
+
return null;
|
|
126
|
+
}
|
|
127
|
+
const buffer = Buffer.from(await result.Body.transformToByteArray());
|
|
128
|
+
const data = buffer.toString('utf-8');
|
|
129
|
+
return JSON.parse(data);
|
|
130
|
+
}
|
|
131
|
+
catch (error) {
|
|
132
|
+
if (error instanceof client_s3_1.NoSuchKey) {
|
|
133
|
+
return null;
|
|
134
|
+
}
|
|
135
|
+
throw error;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
exports.S3StorageAdapter = S3StorageAdapter;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Readable } from 'stream';
|
|
2
|
+
import { BlobInfo, HashStorageAdapter } from '../../core/adapters';
|
|
3
|
+
import { SSHStorageConfig } from '../../core/config';
|
|
4
|
+
import { RDIndex } from '../../core/models';
|
|
5
|
+
export declare class SSHStorageAdapter extends HashStorageAdapter {
|
|
6
|
+
private readonly config;
|
|
7
|
+
private sftp;
|
|
8
|
+
private client;
|
|
9
|
+
constructor(config: SSHStorageConfig);
|
|
10
|
+
private connecting;
|
|
11
|
+
private connect;
|
|
12
|
+
private resolveChunkPath;
|
|
13
|
+
private resolveIndexPath;
|
|
14
|
+
getChunk(hash: string): Promise<Readable | null>;
|
|
15
|
+
putChunk(hash: string, data: Readable): Promise<void>;
|
|
16
|
+
chunkExists(hash: string): Promise<boolean>;
|
|
17
|
+
deleteChunk(hash: string): Promise<void>;
|
|
18
|
+
listChunks(): Promise<string[]>;
|
|
19
|
+
getChunkInfo(hash: string): Promise<BlobInfo | null>;
|
|
20
|
+
getRemoteIndex(): Promise<RDIndex | null>;
|
|
21
|
+
private readStream;
|
|
22
|
+
putRemoteIndex(index: RDIndex): Promise<void>;
|
|
23
|
+
dispose(): Promise<void>;
|
|
24
|
+
private createDirIfNotFound;
|
|
25
|
+
private promisifyStat;
|
|
26
|
+
private promisifyMkdir;
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=ssh-storage-adapter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ssh-storage-adapter.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/adapters/ssh-storage-adapter.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAGlC,OAAO,EAAE,QAAQ,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAEnE,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAI5C,qBAAa,iBAAkB,SAAQ,kBAAkB;IAI3C,OAAO,CAAC,QAAQ,CAAC,MAAM;IAHnC,OAAO,CAAC,IAAI,CAA4B;IACxC,OAAO,CAAC,MAAM,CAAuB;gBAER,MAAM,EAAE,gBAAgB;IAIrD,OAAO,CAAC,UAAU,CAAqC;YAEzC,OAAO;IA0CrB,OAAO,CAAC,gBAAgB;IAKxB,OAAO,CAAC,gBAAgB;IAKlB,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,GAAG,IAAI,CAAC;IAwBhD,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC;IAgBrD,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAS3C,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAexC,UAAU,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;IAe/B,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,GAAG,IAAI,CAAC;IAuBpD,cAAc,IAAI,OAAO,CAAC,OAAO,GAAG,IAAI,CAAC;IAkC/C,OAAO,CAAC,UAAU;IAaZ,cAAc,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC;IAgB7C,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;YAehB,mBAAmB;IAgBjC,OAAO,CAAC,aAAa;IAMrB,OAAO,CAAC,cAAc;CAKvB"}
|
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SSHStorageAdapter = void 0;
|
|
4
|
+
const ssh2_1 = require("ssh2");
|
|
5
|
+
const stream_1 = require("stream");
|
|
6
|
+
const path_1 = require("path");
|
|
7
|
+
const adapters_1 = require("../../core/adapters");
|
|
8
|
+
class SSHStorageAdapter extends adapters_1.HashStorageAdapter {
|
|
9
|
+
config;
|
|
10
|
+
sftp = null;
|
|
11
|
+
client = null;
|
|
12
|
+
constructor(config) {
|
|
13
|
+
super();
|
|
14
|
+
this.config = config;
|
|
15
|
+
}
|
|
16
|
+
connecting = null;
|
|
17
|
+
async connect() {
|
|
18
|
+
if (this.sftp) {
|
|
19
|
+
return this.sftp;
|
|
20
|
+
}
|
|
21
|
+
if (this.connecting) {
|
|
22
|
+
return this.connecting;
|
|
23
|
+
}
|
|
24
|
+
this.connecting = new Promise((resolve, reject) => {
|
|
25
|
+
const client = new ssh2_1.Client();
|
|
26
|
+
client
|
|
27
|
+
.on('ready', () => {
|
|
28
|
+
client.sftp((err, sftp) => {
|
|
29
|
+
if (err) {
|
|
30
|
+
client.end();
|
|
31
|
+
this.connecting = null;
|
|
32
|
+
return reject(err);
|
|
33
|
+
}
|
|
34
|
+
this.client = client;
|
|
35
|
+
this.sftp = sftp;
|
|
36
|
+
this.connecting = null;
|
|
37
|
+
resolve(sftp);
|
|
38
|
+
});
|
|
39
|
+
})
|
|
40
|
+
.on('error', (err) => {
|
|
41
|
+
this.connecting = null;
|
|
42
|
+
reject(err);
|
|
43
|
+
})
|
|
44
|
+
.connect({
|
|
45
|
+
host: this.config.host,
|
|
46
|
+
port: this.config.port ?? 22,
|
|
47
|
+
username: this.config.credentials.username,
|
|
48
|
+
password: this.config.credentials.password,
|
|
49
|
+
privateKey: this.config.credentials.privateKey,
|
|
50
|
+
});
|
|
51
|
+
});
|
|
52
|
+
return this.connecting;
|
|
53
|
+
}
|
|
54
|
+
resolveChunkPath(hash) {
|
|
55
|
+
const prefix = this.config.pathPrefix ?? '';
|
|
56
|
+
return (0, path_1.join)(prefix, 'chunks', hash);
|
|
57
|
+
}
|
|
58
|
+
resolveIndexPath() {
|
|
59
|
+
const prefix = this.config.pathPrefix ?? '';
|
|
60
|
+
return (0, path_1.join)(prefix, 'rd-index.json');
|
|
61
|
+
}
|
|
62
|
+
async getChunk(hash) {
|
|
63
|
+
const sftp = await this.connect();
|
|
64
|
+
const remotePath = this.resolveChunkPath(hash);
|
|
65
|
+
return new Promise((resolve, reject) => {
|
|
66
|
+
sftp.stat(remotePath, (error) => {
|
|
67
|
+
if (error) {
|
|
68
|
+
if (error?.code === 2) {
|
|
69
|
+
return resolve(null); // ENOENT
|
|
70
|
+
}
|
|
71
|
+
return reject(error);
|
|
72
|
+
}
|
|
73
|
+
try {
|
|
74
|
+
const stream = sftp.createReadStream(remotePath);
|
|
75
|
+
resolve(stream);
|
|
76
|
+
}
|
|
77
|
+
catch (err) {
|
|
78
|
+
reject(err);
|
|
79
|
+
}
|
|
80
|
+
});
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
async putChunk(hash, data) {
|
|
84
|
+
const sftp = await this.connect();
|
|
85
|
+
const remotePath = this.resolveChunkPath(hash);
|
|
86
|
+
const dir = remotePath.substring(0, remotePath.lastIndexOf('/'));
|
|
87
|
+
await this.createDirIfNotFound(sftp, dir);
|
|
88
|
+
return new Promise((resolve, reject) => {
|
|
89
|
+
const writeStream = sftp.createWriteStream(remotePath);
|
|
90
|
+
data.pipe(writeStream);
|
|
91
|
+
writeStream.on('close', resolve);
|
|
92
|
+
writeStream.on('error', reject);
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
async chunkExists(hash) {
|
|
96
|
+
const sftp = await this.connect();
|
|
97
|
+
const remotePath = this.resolveChunkPath(hash);
|
|
98
|
+
return new Promise((resolve) => {
|
|
99
|
+
sftp.stat(remotePath, (error) => resolve(error ? false : true));
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
async deleteChunk(hash) {
|
|
103
|
+
const sftp = await this.connect();
|
|
104
|
+
const remotePath = this.resolveChunkPath(hash);
|
|
105
|
+
return new Promise((resolve, reject) => {
|
|
106
|
+
sftp.unlink(remotePath, (error) => {
|
|
107
|
+
if (error && error?.code !== 2) {
|
|
108
|
+
return reject(error);
|
|
109
|
+
}
|
|
110
|
+
resolve();
|
|
111
|
+
});
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
async listChunks() {
|
|
115
|
+
const sftp = await this.connect();
|
|
116
|
+
const prefix = (0, path_1.join)(this.config.pathPrefix ?? '', 'chunks');
|
|
117
|
+
return new Promise((resolve, reject) => {
|
|
118
|
+
sftp.readdir(prefix, (error, list) => {
|
|
119
|
+
if (error) {
|
|
120
|
+
return reject(error);
|
|
121
|
+
}
|
|
122
|
+
resolve(list.map((file) => file.filename));
|
|
123
|
+
});
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
async getChunkInfo(hash) {
|
|
127
|
+
const sftp = await this.connect();
|
|
128
|
+
const remotePath = this.resolveChunkPath(hash);
|
|
129
|
+
return new Promise((resolve, reject) => {
|
|
130
|
+
sftp.stat(remotePath, (error, stats) => {
|
|
131
|
+
if (error) {
|
|
132
|
+
if (error.code === 2) {
|
|
133
|
+
return resolve(null);
|
|
134
|
+
}
|
|
135
|
+
return reject(error);
|
|
136
|
+
}
|
|
137
|
+
resolve({
|
|
138
|
+
hash,
|
|
139
|
+
size: stats.size,
|
|
140
|
+
modified: stats.mtime ? new Date(stats.mtime * 1000) : undefined,
|
|
141
|
+
});
|
|
142
|
+
});
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
async getRemoteIndex() {
|
|
146
|
+
const sftp = await this.connect();
|
|
147
|
+
const remotePath = this.resolveIndexPath();
|
|
148
|
+
return new Promise((resolve, reject) => {
|
|
149
|
+
sftp.stat(remotePath, (error) => {
|
|
150
|
+
if (error) {
|
|
151
|
+
if (error.code === 2) {
|
|
152
|
+
return resolve(null);
|
|
153
|
+
}
|
|
154
|
+
return reject(error);
|
|
155
|
+
}
|
|
156
|
+
try {
|
|
157
|
+
const stream = sftp.createReadStream(remotePath);
|
|
158
|
+
this.readStream(stream)
|
|
159
|
+
.then((data) => {
|
|
160
|
+
try {
|
|
161
|
+
const index = JSON.parse(data);
|
|
162
|
+
resolve(index);
|
|
163
|
+
}
|
|
164
|
+
catch (err) {
|
|
165
|
+
reject(err);
|
|
166
|
+
}
|
|
167
|
+
})
|
|
168
|
+
.catch(reject);
|
|
169
|
+
}
|
|
170
|
+
catch (err) {
|
|
171
|
+
reject(err);
|
|
172
|
+
}
|
|
173
|
+
});
|
|
174
|
+
});
|
|
175
|
+
}
|
|
176
|
+
readStream(stream) {
|
|
177
|
+
return new Promise((resolve, reject) => {
|
|
178
|
+
let data = '';
|
|
179
|
+
stream.on('data', (chunk) => {
|
|
180
|
+
data += chunk.toString();
|
|
181
|
+
});
|
|
182
|
+
stream.on('end', () => resolve(data));
|
|
183
|
+
stream.on('error', reject);
|
|
184
|
+
});
|
|
185
|
+
}
|
|
186
|
+
async putRemoteIndex(index) {
|
|
187
|
+
const sftp = await this.connect();
|
|
188
|
+
const remotePath = this.resolveIndexPath();
|
|
189
|
+
const json = JSON.stringify(index, null, 2);
|
|
190
|
+
return new Promise((resolve, reject) => {
|
|
191
|
+
const writeStream = sftp.createWriteStream(remotePath, { flags: 'w' });
|
|
192
|
+
const readable = stream_1.Readable.from([json]);
|
|
193
|
+
writeStream.on('close', resolve);
|
|
194
|
+
writeStream.on('error', reject);
|
|
195
|
+
readable.pipe(writeStream);
|
|
196
|
+
});
|
|
197
|
+
}
|
|
198
|
+
async dispose() {
|
|
199
|
+
if (this.sftp && typeof this.sftp.end === 'function') {
|
|
200
|
+
this.sftp.end();
|
|
201
|
+
}
|
|
202
|
+
this.sftp = null;
|
|
203
|
+
if (this.client !== null) {
|
|
204
|
+
await new Promise((resolve) => {
|
|
205
|
+
this.client?.once('close', resolve);
|
|
206
|
+
this.client?.end();
|
|
207
|
+
});
|
|
208
|
+
this.client = null;
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
async createDirIfNotFound(sftp, dir) {
|
|
212
|
+
const parts = dir.split('/').filter(Boolean);
|
|
213
|
+
let current = '';
|
|
214
|
+
for (const part of parts) {
|
|
215
|
+
current += '/' + part;
|
|
216
|
+
try {
|
|
217
|
+
await this.promisifyStat(sftp, current);
|
|
218
|
+
}
|
|
219
|
+
catch (error) {
|
|
220
|
+
if (error?.code === 2) {
|
|
221
|
+
await this.promisifyMkdir(sftp, current);
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
promisifyStat(sftp, path) {
|
|
227
|
+
return new Promise((resolve, reject) => {
|
|
228
|
+
sftp.stat(path, (err, stats) => (err ? reject(err) : resolve(stats)));
|
|
229
|
+
});
|
|
230
|
+
}
|
|
231
|
+
promisifyMkdir(sftp, path) {
|
|
232
|
+
return new Promise((resolve, reject) => {
|
|
233
|
+
sftp.mkdir(path, (err) => (err ? reject(err) : resolve()));
|
|
234
|
+
});
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
exports.SSHStorageAdapter = SSHStorageAdapter;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Readable } from 'stream';
|
|
2
|
+
import { BlobInfo, UrlStorageAdapter } from '../../core/adapters';
|
|
3
|
+
import { RDIndex } from '../../core/models';
|
|
4
|
+
export declare class DefaultUrlStorageAdapter extends UrlStorageAdapter {
|
|
5
|
+
dispose(): Promise<void>;
|
|
6
|
+
getChunkByUrl(url: string): Promise<Readable | null>;
|
|
7
|
+
putChunkByUrl(url: string, data: Readable): Promise<void>;
|
|
8
|
+
chunkExistsByUrl(url: string): Promise<boolean>;
|
|
9
|
+
deleteChunkByUrl(url: string): Promise<void>;
|
|
10
|
+
getChunkInfoByUrl(hash: string, url: string): Promise<BlobInfo | null>;
|
|
11
|
+
getRemoteIndexByUrl(url: string): Promise<RDIndex | null>;
|
|
12
|
+
putRemoteIndexByUrl(url: string, index: RDIndex): Promise<void>;
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=url-storage-adapter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"url-storage-adapter.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/adapters/url-storage-adapter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAElC,OAAO,EAAE,QAAQ,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAUlE,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAE5C,qBAAa,wBAAyB,SAAQ,iBAAiB;IACvD,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;IAIxB,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,GAAG,IAAI,CAAC;IAcpD,aAAa,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC;IAYzD,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAc/C,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAY5C,iBAAiB,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,GAAG,IAAI,CAAC;IAyBtE,mBAAmB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,GAAG,IAAI,CAAC;IAczD,mBAAmB,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC;CAatE"}
|