@remit/storage-service 0.0.1

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/src/storage.ts ADDED
@@ -0,0 +1,589 @@
1
+ import { createHash } from "node:crypto";
2
+ import { Readable } from "node:stream";
3
+ import { ContentEncoding, StorageType } from "@remit/domain-enums";
4
+
5
+ export type StorageTypeValue = (typeof StorageType)[keyof typeof StorageType];
6
+ export type ContentEncodingValue =
7
+ (typeof ContentEncoding)[keyof typeof ContentEncoding];
8
+
9
+ export interface StorageReference {
10
+ uri: string;
11
+ storageType: StorageTypeValue;
12
+ storageLocation: string;
13
+ storageKey: string;
14
+ sizeBytes: number;
15
+ /**
16
+ * SHA-256 (hex) of the logical, pre-compression content.
17
+ * Identifies the content regardless of how it is stored on the backend,
18
+ * and is used by `buildDeduplicatedKey` for content-addressable storage.
19
+ * Note: this is NOT the checksum S3 validates against the received bytes —
20
+ * S3's own transport-level checksum is handled by the SDK on PUT.
21
+ */
22
+ checksumSha256: string;
23
+ contentEncoding: ContentEncodingValue;
24
+ }
25
+
26
+ /** Parameters for storing a message body (raw RFC822 content) */
27
+ export interface StoreMessageBodyParams {
28
+ accountConfigId: string;
29
+ accountId: string;
30
+ messageId: string;
31
+ content: Buffer;
32
+ }
33
+
34
+ /** Parameters for streaming a message body (raw RFC822 content) to storage */
35
+ export interface StoreMessageBodyStreamParams {
36
+ accountConfigId: string;
37
+ accountId: string;
38
+ messageId: string;
39
+ /** Readable stream of the raw message bytes; streamed to storage, never buffered whole. */
40
+ content: Readable;
41
+ }
42
+
43
+ /** Parameters for storing a body part (attachment, inline content) */
44
+ export interface StoreBodyPartParams {
45
+ accountConfigId: string;
46
+ accountId: string;
47
+ messageId: string;
48
+ partPath: string;
49
+ content: Buffer;
50
+ contentType?: string;
51
+ }
52
+
53
+ /** Parameters for storing deduplicated content (attachments shared across messages) */
54
+ export interface StoreDeduplicatedParams {
55
+ accountConfigId: string;
56
+ accountId: string;
57
+ content: Buffer;
58
+ contentType?: string;
59
+ }
60
+
61
+ /** Metadata for a single attachment in a parsed message body. No binary content. */
62
+ export interface ParsedAttachmentMeta {
63
+ filename: string | null;
64
+ contentType: string;
65
+ contentDisposition: string | null;
66
+ contentId: string | null;
67
+ size: number;
68
+ }
69
+
70
+ /** Pre-parsed message body cached as parsed.json.gz to skip mailparser on warm reads */
71
+ export interface ParsedBody {
72
+ text: string | null;
73
+ html: string | null;
74
+ attachments: ParsedAttachmentMeta[];
75
+ }
76
+
77
+ /** Parameters for storing a pre-parsed message body */
78
+ export interface StoreParsedBodyParams {
79
+ accountConfigId: string;
80
+ accountId: string;
81
+ messageId: string;
82
+ parsed: ParsedBody;
83
+ }
84
+
85
+ /** Parameters for storing extracted attachment text (attachment-scan worker, #450) */
86
+ export interface StoreExtractedTextParams {
87
+ accountConfigId: string;
88
+ accountId: string;
89
+ messageId: string;
90
+ partPath: string;
91
+ text: string;
92
+ }
93
+
94
+ /**
95
+ * Marker written in place of extracted text when extraction is skipped or
96
+ * fails, so the idempotency check terminates retries on a poison or
97
+ * unsupported attachment instead of re-running extraction on every
98
+ * redelivery.
99
+ */
100
+ export interface ExtractedTextMarker {
101
+ status: "skipped" | "failed";
102
+ reason: string;
103
+ }
104
+
105
+ /** Parameters for storing an extraction skip/failure marker */
106
+ export interface StoreExtractedSkippedParams {
107
+ accountConfigId: string;
108
+ accountId: string;
109
+ messageId: string;
110
+ partPath: string;
111
+ marker: ExtractedTextMarker;
112
+ }
113
+
114
+ /** One extracted-text artifact found under a message's `extracted/` prefix */
115
+ export interface ExtractedTextListItem {
116
+ partPath: string;
117
+ key: string;
118
+ }
119
+
120
+ export interface StorageService {
121
+ /** Store a message body (raw RFC822 content) */
122
+ storeMessageBody(params: StoreMessageBodyParams): Promise<StorageReference>;
123
+
124
+ /**
125
+ * Store a message body from a readable stream, never buffering the whole
126
+ * body. Use this on the sync hot path so a ranged FETCH streams straight to
127
+ * storage.
128
+ */
129
+ storeMessageBodyStream(
130
+ params: StoreMessageBodyStreamParams,
131
+ ): Promise<StorageReference>;
132
+
133
+ /** Store a body part (attachment, inline content) */
134
+ storeBodyPart(params: StoreBodyPartParams): Promise<StorageReference>;
135
+
136
+ /**
137
+ * Check whether a body-part object already exists, keyed exactly as
138
+ * `storeBodyPart` writes it. Used by the lazy per-part generation path to
139
+ * skip leaves already materialized on a prior read, so regeneration is
140
+ * idempotent and re-reads stay cheap.
141
+ */
142
+ bodyPartExists(
143
+ accountConfigId: string,
144
+ accountId: string,
145
+ messageId: string,
146
+ partPath: string,
147
+ ): Promise<boolean>;
148
+
149
+ /**
150
+ * Retrieve a body-part's content (attachment or inline leaf) by
151
+ * account/message id and IMAP section path; returns null on NoSuchKey.
152
+ */
153
+ retrieveBodyPart(
154
+ accountConfigId: string,
155
+ accountId: string,
156
+ messageId: string,
157
+ partPath: string,
158
+ ): Promise<Buffer | null>;
159
+
160
+ /** Store deduplicated content (content-addressable, for attachments) */
161
+ storeDeduplicated(params: StoreDeduplicatedParams): Promise<StorageReference>;
162
+
163
+ /** Store a pre-parsed message body as gzipped JSON (parsed-body cache) */
164
+ storeParsedBody(params: StoreParsedBodyParams): Promise<StorageReference>;
165
+
166
+ /** Retrieve a pre-parsed message body by account/message id; returns null on NoSuchKey */
167
+ retrieveParsedBody(
168
+ accountConfigId: string,
169
+ accountId: string,
170
+ messageId: string,
171
+ ): Promise<ParsedBody | null>;
172
+
173
+ /** Store extracted attachment text (attachment-scan worker, #450) */
174
+ storeExtractedText(
175
+ params: StoreExtractedTextParams,
176
+ ): Promise<StorageReference>;
177
+
178
+ /** Store a skip/failure marker in place of extracted text */
179
+ storeExtractedSkipped(
180
+ params: StoreExtractedSkippedParams,
181
+ ): Promise<StorageReference>;
182
+
183
+ /**
184
+ * Whether an extraction result — either the text artifact or the
185
+ * skip/failure marker — already exists for this part. Makes extraction
186
+ * idempotent: a redelivered SQS message short-circuits instead of
187
+ * re-running extraction (#450).
188
+ */
189
+ extractedResultExists(
190
+ accountConfigId: string,
191
+ accountId: string,
192
+ messageId: string,
193
+ partPath: string,
194
+ ): Promise<boolean>;
195
+
196
+ /** Retrieve previously extracted text; returns null on NoSuchKey */
197
+ retrieveExtractedText(
198
+ accountConfigId: string,
199
+ accountId: string,
200
+ messageId: string,
201
+ partPath: string,
202
+ ): Promise<string | null>;
203
+
204
+ /**
205
+ * List every extracted-text artifact stored for a message — the
206
+ * `.skipped.json` markers are excluded. Used by the search-index worker
207
+ * (#452) to fold attachment text into a message's vectors.
208
+ */
209
+ listExtractedTexts(
210
+ accountConfigId: string,
211
+ accountId: string,
212
+ messageId: string,
213
+ ): Promise<ExtractedTextListItem[]>;
214
+
215
+ /** Retrieve a raw message body (RFC822 .eml) by account/message id; returns null on NoSuchKey */
216
+ retrieveMessageBody(
217
+ accountConfigId: string,
218
+ accountId: string,
219
+ messageId: string,
220
+ ): Promise<Buffer | null>;
221
+
222
+ /**
223
+ * Retrieve a raw message body as a readable stream of decompressed .eml
224
+ * bytes; returns null on NoSuchKey. Use on the export path so a whole
225
+ * mailbox is never buffered in memory.
226
+ */
227
+ retrieveMessageBodyStream(
228
+ accountConfigId: string,
229
+ accountId: string,
230
+ messageId: string,
231
+ ): Promise<Readable | null>;
232
+
233
+ /** Retrieve content by URI */
234
+ retrieve(uri: string): Promise<Buffer>;
235
+
236
+ /** Check if content exists */
237
+ exists(uri: string): Promise<boolean>;
238
+
239
+ /** Delete content by URI */
240
+ delete(uri: string): Promise<void>;
241
+
242
+ /**
243
+ * Stream a finished export archive (already-compressed ZIP) to the export
244
+ * key for the given config + request, uncompressed at rest. The body is
245
+ * streamed via a multipart upload and never buffered whole. Returns the raw
246
+ * storage key, which `getPresignedDownloadUrl` can then sign.
247
+ */
248
+ storeExportArchiveStream(
249
+ accountConfigId: string,
250
+ exportRequestId: string,
251
+ body: Readable,
252
+ ): Promise<string>;
253
+
254
+ /**
255
+ * Generate a presigned URL that grants temporary GET access to a raw S3 key.
256
+ * Use for export archives — the key must already exist in the bucket.
257
+ * Not supported on filesystem backends; throws if called there.
258
+ */
259
+ getPresignedDownloadUrl(
260
+ key: string,
261
+ expiresInSeconds: number,
262
+ ): Promise<string>;
263
+ }
264
+
265
+ // Path builders - centralized path formatting per RFC 011 + #224.
266
+ // The outer segment is `accountConfigId` (Cognito-derived tenant scope) so
267
+ // the Lambda@Edge can verify cross-tenant isolation at the URL prefix without
268
+ // loading any DynamoDB record. The inner `accountId` distinguishes between
269
+ // multiple IMAP-account records owned by the same tenant.
270
+ export const buildMessageBodyKey = (
271
+ accountConfigId: string,
272
+ accountId: string,
273
+ messageId: string,
274
+ ): string =>
275
+ `accounts/${accountConfigId}/${accountId}/messages/${messageId}/body.eml`;
276
+
277
+ export const buildParsedBodyKey = (
278
+ accountConfigId: string,
279
+ accountId: string,
280
+ messageId: string,
281
+ ): string =>
282
+ `accounts/${accountConfigId}/${accountId}/messages/${messageId}/parsed.json.gz`;
283
+
284
+ export const buildBodyPartKey = (
285
+ accountConfigId: string,
286
+ accountId: string,
287
+ messageId: string,
288
+ partPath: string,
289
+ ): string =>
290
+ `accounts/${accountConfigId}/${accountId}/messages/${messageId}/parts/${partPath}`;
291
+
292
+ export const buildExtractedTextKey = (
293
+ accountConfigId: string,
294
+ accountId: string,
295
+ messageId: string,
296
+ partPath: string,
297
+ ): string =>
298
+ `${buildExtractedPrefix(accountConfigId, accountId, messageId)}${partPath}.txt.gz`;
299
+
300
+ export const buildExtractedSkippedKey = (
301
+ accountConfigId: string,
302
+ accountId: string,
303
+ messageId: string,
304
+ partPath: string,
305
+ ): string =>
306
+ `${buildExtractedPrefix(accountConfigId, accountId, messageId)}${partPath}.skipped.json`;
307
+
308
+ export const buildExtractedPrefix = (
309
+ accountConfigId: string,
310
+ accountId: string,
311
+ messageId: string,
312
+ ): string =>
313
+ `accounts/${accountConfigId}/${accountId}/messages/${messageId}/extracted/`;
314
+
315
+ export const buildDeduplicatedKey = (
316
+ accountConfigId: string,
317
+ accountId: string,
318
+ checksumSha256: string,
319
+ ): string =>
320
+ `accounts/${accountConfigId}/${accountId}/dedup/${checksumSha256.slice(0, 2)}/${checksumSha256}`;
321
+
322
+ export interface ParsedContentStorageKey {
323
+ accountConfigId: string;
324
+ accountId: string;
325
+ messageId: string;
326
+ }
327
+
328
+ /**
329
+ * Parse the account/message ids out of a `/content/*` storage key such as
330
+ * `accounts/{accountConfigId}/{accountId}/messages/{messageId}/parts/1.2`
331
+ * (the inverse of `buildMessageBodyKey`/`buildParsedBodyKey`/`buildBodyPartKey`
332
+ * above). Returns null when the shape doesn't match.
333
+ */
334
+ export const parseContentStorageKey = (
335
+ storageKey: string,
336
+ ): ParsedContentStorageKey | null => {
337
+ const match = storageKey.match(
338
+ /^accounts\/([^/]+)\/([^/]+)\/messages\/([^/]+)\//,
339
+ );
340
+ if (!match) return null;
341
+ return {
342
+ accountConfigId: match[1],
343
+ accountId: match[2],
344
+ messageId: match[3],
345
+ };
346
+ };
347
+
348
+ export const computeChecksum = (content: Buffer): string =>
349
+ createHash("sha256").update(content).digest("hex");
350
+
351
+ export const buildExportArchiveKey = (
352
+ accountConfigId: string,
353
+ exportRequestId: string,
354
+ ): string => `exports/${accountConfigId}/${exportRequestId}/export.zip`;
355
+
356
+ export const isStorageNotFoundError = (error: unknown): boolean => {
357
+ if (typeof error !== "object" || error === null) return false;
358
+ const obj = error as Record<string, unknown>;
359
+ if (obj.name === "NoSuchKey") return true;
360
+ if (obj.Code === "NoSuchKey") return true;
361
+ if (obj.code === "ENOENT") return true;
362
+ return false;
363
+ };
364
+
365
+ export const createMockStorageService = (): StorageService => {
366
+ const storage = new Map<string, Buffer>();
367
+
368
+ const storeInternal = (key: string, content: Buffer): StorageReference => {
369
+ const checksumSha256 = computeChecksum(content);
370
+ const uri = `mock://${key}`;
371
+ storage.set(uri, content);
372
+ return {
373
+ uri,
374
+ storageType: StorageType.Filesystem,
375
+ storageLocation: "mock",
376
+ storageKey: key,
377
+ sizeBytes: content.length,
378
+ checksumSha256,
379
+ contentEncoding: ContentEncoding.None,
380
+ };
381
+ };
382
+
383
+ const storeMessageBody: StorageService["storeMessageBody"] = async (
384
+ params,
385
+ ) => {
386
+ const { accountConfigId, accountId, messageId, content } = params;
387
+ return storeInternal(
388
+ buildMessageBodyKey(accountConfigId, accountId, messageId),
389
+ content,
390
+ );
391
+ };
392
+
393
+ const storeMessageBodyStream: StorageService["storeMessageBodyStream"] =
394
+ async (params) => {
395
+ const { accountConfigId, accountId, messageId, content } = params;
396
+ const chunks: Buffer[] = [];
397
+ for await (const chunk of content) {
398
+ chunks.push(Buffer.isBuffer(chunk) ? chunk : Buffer.from(chunk));
399
+ }
400
+ return storeInternal(
401
+ buildMessageBodyKey(accountConfigId, accountId, messageId),
402
+ Buffer.concat(chunks),
403
+ );
404
+ };
405
+
406
+ const storeBodyPart: StorageService["storeBodyPart"] = async (params) => {
407
+ const { accountConfigId, accountId, messageId, partPath, content } = params;
408
+ return storeInternal(
409
+ buildBodyPartKey(accountConfigId, accountId, messageId, partPath),
410
+ content,
411
+ );
412
+ };
413
+
414
+ const storeDeduplicated: StorageService["storeDeduplicated"] = async (
415
+ params,
416
+ ) => {
417
+ const { accountConfigId, accountId, content } = params;
418
+ const checksumSha256 = computeChecksum(content);
419
+ return storeInternal(
420
+ buildDeduplicatedKey(accountConfigId, accountId, checksumSha256),
421
+ content,
422
+ );
423
+ };
424
+
425
+ const storeParsedBody: StorageService["storeParsedBody"] = async (params) => {
426
+ const { accountConfigId, accountId, messageId, parsed } = params;
427
+ const content = Buffer.from(JSON.stringify(parsed), "utf8");
428
+ return storeInternal(
429
+ buildParsedBodyKey(accountConfigId, accountId, messageId),
430
+ content,
431
+ );
432
+ };
433
+
434
+ const retrieveParsedBody: StorageService["retrieveParsedBody"] = async (
435
+ accountConfigId,
436
+ accountId,
437
+ messageId,
438
+ ) => {
439
+ const uri = `mock://${buildParsedBodyKey(accountConfigId, accountId, messageId)}`;
440
+ const content = storage.get(uri);
441
+ if (!content) return null;
442
+ return JSON.parse(content.toString("utf8")) as ParsedBody;
443
+ };
444
+
445
+ const retrieveBodyPart: StorageService["retrieveBodyPart"] = async (
446
+ accountConfigId,
447
+ accountId,
448
+ messageId,
449
+ partPath,
450
+ ) => {
451
+ const uri = `mock://${buildBodyPartKey(accountConfigId, accountId, messageId, partPath)}`;
452
+ return storage.get(uri) ?? null;
453
+ };
454
+
455
+ const storeExtractedText: StorageService["storeExtractedText"] = async (
456
+ params,
457
+ ) => {
458
+ const { accountConfigId, accountId, messageId, partPath, text } = params;
459
+ return storeInternal(
460
+ buildExtractedTextKey(accountConfigId, accountId, messageId, partPath),
461
+ Buffer.from(text, "utf8"),
462
+ );
463
+ };
464
+
465
+ const storeExtractedSkipped: StorageService["storeExtractedSkipped"] = async (
466
+ params,
467
+ ) => {
468
+ const { accountConfigId, accountId, messageId, partPath, marker } = params;
469
+ return storeInternal(
470
+ buildExtractedSkippedKey(accountConfigId, accountId, messageId, partPath),
471
+ Buffer.from(JSON.stringify(marker), "utf8"),
472
+ );
473
+ };
474
+
475
+ const extractedResultExists: StorageService["extractedResultExists"] = async (
476
+ accountConfigId,
477
+ accountId,
478
+ messageId,
479
+ partPath,
480
+ ) => {
481
+ const textUri = `mock://${buildExtractedTextKey(accountConfigId, accountId, messageId, partPath)}`;
482
+ const skippedUri = `mock://${buildExtractedSkippedKey(accountConfigId, accountId, messageId, partPath)}`;
483
+ return storage.has(textUri) || storage.has(skippedUri);
484
+ };
485
+
486
+ const retrieveExtractedText: StorageService["retrieveExtractedText"] = async (
487
+ accountConfigId,
488
+ accountId,
489
+ messageId,
490
+ partPath,
491
+ ) => {
492
+ const uri = `mock://${buildExtractedTextKey(accountConfigId, accountId, messageId, partPath)}`;
493
+ const content = storage.get(uri);
494
+ if (!content) return null;
495
+ return content.toString("utf8");
496
+ };
497
+
498
+ const listExtractedTexts: StorageService["listExtractedTexts"] = async (
499
+ accountConfigId,
500
+ accountId,
501
+ messageId,
502
+ ) => {
503
+ const prefix = `mock://${buildExtractedPrefix(accountConfigId, accountId, messageId)}`;
504
+ const suffix = ".txt.gz";
505
+ const items: ExtractedTextListItem[] = [];
506
+ for (const uri of storage.keys()) {
507
+ if (!uri.startsWith(prefix) || !uri.endsWith(suffix)) continue;
508
+ const key = uri.slice("mock://".length);
509
+ items.push({
510
+ partPath: uri.slice(prefix.length, -suffix.length),
511
+ key,
512
+ });
513
+ }
514
+ return items;
515
+ };
516
+
517
+ const retrieveMessageBody: StorageService["retrieveMessageBody"] = async (
518
+ accountConfigId,
519
+ accountId,
520
+ messageId,
521
+ ) => {
522
+ const uri = `mock://${buildMessageBodyKey(accountConfigId, accountId, messageId)}`;
523
+ return storage.get(uri) ?? null;
524
+ };
525
+
526
+ const retrieveMessageBodyStream: StorageService["retrieveMessageBodyStream"] =
527
+ async (accountConfigId, accountId, messageId) => {
528
+ const uri = `mock://${buildMessageBodyKey(accountConfigId, accountId, messageId)}`;
529
+ const content = storage.get(uri);
530
+ if (!content) return null;
531
+ return Readable.from(content);
532
+ };
533
+
534
+ const bodyPartExists: StorageService["bodyPartExists"] = async (
535
+ accountConfigId,
536
+ accountId,
537
+ messageId,
538
+ partPath,
539
+ ) => {
540
+ const uri = `mock://${buildBodyPartKey(accountConfigId, accountId, messageId, partPath)}`;
541
+ return storage.has(uri);
542
+ };
543
+
544
+ return {
545
+ storeMessageBody,
546
+ storeMessageBodyStream,
547
+ storeBodyPart,
548
+ bodyPartExists,
549
+ retrieveBodyPart,
550
+ storeDeduplicated,
551
+ storeParsedBody,
552
+ retrieveParsedBody,
553
+ storeExtractedText,
554
+ storeExtractedSkipped,
555
+ extractedResultExists,
556
+ retrieveExtractedText,
557
+ listExtractedTexts,
558
+ retrieveMessageBody,
559
+ retrieveMessageBodyStream,
560
+ retrieve: async (uri) => {
561
+ const content = storage.get(uri);
562
+ if (!content) {
563
+ throw Object.assign(new Error(`Not found: ${uri}`), {
564
+ name: "NoSuchKey",
565
+ });
566
+ }
567
+ return content;
568
+ },
569
+ exists: async (uri) => storage.has(uri),
570
+ delete: async (uri) => {
571
+ storage.delete(uri);
572
+ },
573
+ storeExportArchiveStream: async (
574
+ accountConfigId,
575
+ exportRequestId,
576
+ body,
577
+ ) => {
578
+ const key = buildExportArchiveKey(accountConfigId, exportRequestId);
579
+ const chunks: Buffer[] = [];
580
+ for await (const chunk of body) {
581
+ chunks.push(Buffer.isBuffer(chunk) ? chunk : Buffer.from(chunk));
582
+ }
583
+ storage.set(`mock://${key}`, Buffer.concat(chunks));
584
+ return key;
585
+ },
586
+ getPresignedDownloadUrl: async (key: string, _expiresInSeconds: number) =>
587
+ `mock://presigned/${key}`,
588
+ };
589
+ };
package/src/uri.ts ADDED
@@ -0,0 +1,47 @@
1
+ import { StorageType } from "@remit/domain-enums";
2
+
3
+ export type StorageTypeValue = (typeof StorageType)[keyof typeof StorageType];
4
+
5
+ export interface ParsedStorageUri {
6
+ storageType: StorageTypeValue;
7
+ storageLocation: string;
8
+ storageKey: string;
9
+ }
10
+
11
+ export const parseStorageUri = (uri: string): ParsedStorageUri => {
12
+ const url = new URL(uri);
13
+
14
+ if (url.protocol === "s3:") {
15
+ return {
16
+ storageType: StorageType.S3,
17
+ storageLocation: url.hostname,
18
+ storageKey: url.pathname.slice(1),
19
+ };
20
+ }
21
+
22
+ if (url.protocol === "file:") {
23
+ return {
24
+ storageType: StorageType.Filesystem,
25
+ storageLocation: "",
26
+ storageKey: url.pathname,
27
+ };
28
+ }
29
+
30
+ throw new Error(`Unsupported storage URI scheme: ${url.protocol}`);
31
+ };
32
+
33
+ export const buildStorageUri = (
34
+ storageType: StorageTypeValue,
35
+ storageLocation: string,
36
+ storageKey: string,
37
+ ): string => {
38
+ if (storageType === StorageType.S3) {
39
+ return `s3://${storageLocation}/${storageKey}`;
40
+ }
41
+
42
+ if (storageType === StorageType.Filesystem) {
43
+ return `file://${storageLocation}/${storageKey}`;
44
+ }
45
+
46
+ throw new Error(`Unsupported storage type: ${storageType}`);
47
+ };
package/tsconfig.json ADDED
@@ -0,0 +1,8 @@
1
+ {
2
+ "extends": "../../tsconfig.json",
3
+ "compilerOptions": {
4
+ "outDir": "dist",
5
+ "rootDir": "src"
6
+ },
7
+ "include": ["src/**/*.ts"]
8
+ }