@xyo-network/xl1-protocol-sdk 2.1.7 → 2.1.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/neutral/CreatableProvider/AbstractCreatableProvider.d.ts +26 -5
- package/dist/neutral/CreatableProvider/AbstractCreatableProvider.d.ts.map +1 -1
- package/dist/neutral/config/Actor.d.ts +156 -30
- package/dist/neutral/config/Actor.d.ts.map +1 -1
- package/dist/neutral/config/Actors.d.ts +26 -5
- package/dist/neutral/config/Actors.d.ts.map +1 -1
- package/dist/neutral/config/Base.d.ts +26 -5
- package/dist/neutral/config/Base.d.ts.map +1 -1
- package/dist/neutral/config/Config.d.ts +104 -20
- package/dist/neutral/config/Config.d.ts.map +1 -1
- package/dist/neutral/config/HostActor.d.ts +156 -30
- package/dist/neutral/config/HostActor.d.ts.map +1 -1
- package/dist/neutral/config/index.d.ts +2 -1
- package/dist/neutral/config/index.d.ts.map +1 -1
- package/dist/neutral/config/storage/Storage.d.ts +26 -5
- package/dist/neutral/config/storage/Storage.d.ts.map +1 -1
- package/dist/neutral/config/storage/driver/S3.d.ts +77 -0
- package/dist/neutral/config/storage/driver/S3.d.ts.map +1 -0
- package/dist/neutral/config/storage/driver/index.d.ts +1 -1
- package/dist/neutral/context/Actor.d.ts +156 -30
- package/dist/neutral/context/Actor.d.ts.map +1 -1
- package/dist/neutral/context/HostActor.d.ts +156 -30
- package/dist/neutral/context/HostActor.d.ts.map +1 -1
- package/dist/neutral/getFileConfig.d.ts +52 -10
- package/dist/neutral/getFileConfig.d.ts.map +1 -1
- package/dist/neutral/getFileConfig.mjs +36 -56
- package/dist/neutral/getFileConfig.mjs.map +4 -4
- package/dist/neutral/index.mjs +71 -74
- package/dist/neutral/index.mjs.map +4 -4
- package/dist/neutral/model/CreatableProviderContext.zod.d.ts +156 -30
- package/dist/neutral/model/CreatableProviderContext.zod.d.ts.map +1 -1
- package/dist/neutral/test/index.mjs +40 -60
- package/dist/neutral/test/index.mjs.map +4 -4
- package/package.json +14 -14
- package/dist/neutral/config/storage/driver/R2.d.ts +0 -27
- package/dist/neutral/config/storage/driver/R2.d.ts.map +0 -1
|
@@ -53,16 +53,37 @@ export declare const HostActorConfigZod: z.ZodMiniObject<{
|
|
|
53
53
|
password: import("zod").ZodOptional<import("zod").ZodString>;
|
|
54
54
|
username: import("zod").ZodOptional<import("zod").ZodString>;
|
|
55
55
|
}, z.core.$strip>>;
|
|
56
|
-
|
|
56
|
+
root: import("zod").ZodOptional<import("zod").ZodString>;
|
|
57
|
+
s3: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
57
58
|
accessKeyId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
58
59
|
accountId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
60
|
+
chainState: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
61
|
+
accessKeyId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
62
|
+
accountId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
63
|
+
bucket: import("zod").ZodOptional<import("zod").ZodString>;
|
|
64
|
+
prefix: import("zod").ZodOptional<import("zod").ZodString>;
|
|
65
|
+
readUrl: import("zod").ZodOptional<import("zod").ZodString>;
|
|
66
|
+
secretAccessKey: import("zod").ZodOptional<import("zod").ZodString>;
|
|
67
|
+
}, z.core.$strip>>;
|
|
68
|
+
finalized: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
69
|
+
accessKeyId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
70
|
+
accountId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
71
|
+
bucket: import("zod").ZodOptional<import("zod").ZodString>;
|
|
72
|
+
prefix: import("zod").ZodOptional<import("zod").ZodString>;
|
|
73
|
+
readUrl: import("zod").ZodOptional<import("zod").ZodString>;
|
|
74
|
+
secretAccessKey: import("zod").ZodOptional<import("zod").ZodString>;
|
|
75
|
+
}, z.core.$strip>>;
|
|
76
|
+
index: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
77
|
+
accessKeyId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
78
|
+
accountId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
79
|
+
bucket: import("zod").ZodOptional<import("zod").ZodString>;
|
|
80
|
+
prefix: import("zod").ZodOptional<import("zod").ZodString>;
|
|
81
|
+
readUrl: import("zod").ZodOptional<import("zod").ZodString>;
|
|
82
|
+
secretAccessKey: import("zod").ZodOptional<import("zod").ZodString>;
|
|
83
|
+
}, z.core.$strip>>;
|
|
62
84
|
prefix: import("zod").ZodOptional<import("zod").ZodString>;
|
|
63
85
|
secretAccessKey: import("zod").ZodOptional<import("zod").ZodString>;
|
|
64
86
|
}, z.core.$strip>>;
|
|
65
|
-
root: import("zod").ZodOptional<import("zod").ZodString>;
|
|
66
87
|
}, z.core.$strip>>;
|
|
67
88
|
telemetry: z.ZodMiniDefault<import("zod").ZodObject<{
|
|
68
89
|
metrics: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
@@ -143,16 +164,37 @@ export declare const isHostActorConfig: <T>(value: T) => value is T & {
|
|
|
143
164
|
password?: string | undefined;
|
|
144
165
|
username?: string | undefined;
|
|
145
166
|
} | undefined;
|
|
146
|
-
|
|
167
|
+
root?: string | undefined;
|
|
168
|
+
s3?: {
|
|
147
169
|
accessKeyId?: string | undefined;
|
|
148
170
|
accountId?: string | undefined;
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
171
|
+
chainState?: {
|
|
172
|
+
accessKeyId?: string | undefined;
|
|
173
|
+
accountId?: string | undefined;
|
|
174
|
+
bucket?: string | undefined;
|
|
175
|
+
prefix?: string | undefined;
|
|
176
|
+
readUrl?: string | undefined;
|
|
177
|
+
secretAccessKey?: string | undefined;
|
|
178
|
+
} | undefined;
|
|
179
|
+
finalized?: {
|
|
180
|
+
accessKeyId?: string | undefined;
|
|
181
|
+
accountId?: string | undefined;
|
|
182
|
+
bucket?: string | undefined;
|
|
183
|
+
prefix?: string | undefined;
|
|
184
|
+
readUrl?: string | undefined;
|
|
185
|
+
secretAccessKey?: string | undefined;
|
|
186
|
+
} | undefined;
|
|
187
|
+
index?: {
|
|
188
|
+
accessKeyId?: string | undefined;
|
|
189
|
+
accountId?: string | undefined;
|
|
190
|
+
bucket?: string | undefined;
|
|
191
|
+
prefix?: string | undefined;
|
|
192
|
+
readUrl?: string | undefined;
|
|
193
|
+
secretAccessKey?: string | undefined;
|
|
194
|
+
} | undefined;
|
|
152
195
|
prefix?: string | undefined;
|
|
153
196
|
secretAccessKey?: string | undefined;
|
|
154
197
|
} | undefined;
|
|
155
|
-
root?: string | undefined;
|
|
156
198
|
};
|
|
157
199
|
telemetry: {
|
|
158
200
|
metrics?: {
|
|
@@ -233,16 +275,37 @@ export declare const asHostActorConfig: {
|
|
|
233
275
|
password?: string | undefined;
|
|
234
276
|
username?: string | undefined;
|
|
235
277
|
} | undefined;
|
|
236
|
-
|
|
278
|
+
root?: string | undefined;
|
|
279
|
+
s3?: {
|
|
237
280
|
accessKeyId?: string | undefined;
|
|
238
281
|
accountId?: string | undefined;
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
282
|
+
chainState?: {
|
|
283
|
+
accessKeyId?: string | undefined;
|
|
284
|
+
accountId?: string | undefined;
|
|
285
|
+
bucket?: string | undefined;
|
|
286
|
+
prefix?: string | undefined;
|
|
287
|
+
readUrl?: string | undefined;
|
|
288
|
+
secretAccessKey?: string | undefined;
|
|
289
|
+
} | undefined;
|
|
290
|
+
finalized?: {
|
|
291
|
+
accessKeyId?: string | undefined;
|
|
292
|
+
accountId?: string | undefined;
|
|
293
|
+
bucket?: string | undefined;
|
|
294
|
+
prefix?: string | undefined;
|
|
295
|
+
readUrl?: string | undefined;
|
|
296
|
+
secretAccessKey?: string | undefined;
|
|
297
|
+
} | undefined;
|
|
298
|
+
index?: {
|
|
299
|
+
accessKeyId?: string | undefined;
|
|
300
|
+
accountId?: string | undefined;
|
|
301
|
+
bucket?: string | undefined;
|
|
302
|
+
prefix?: string | undefined;
|
|
303
|
+
readUrl?: string | undefined;
|
|
304
|
+
secretAccessKey?: string | undefined;
|
|
305
|
+
} | undefined;
|
|
242
306
|
prefix?: string | undefined;
|
|
243
307
|
secretAccessKey?: string | undefined;
|
|
244
308
|
} | undefined;
|
|
245
|
-
root?: string | undefined;
|
|
246
309
|
};
|
|
247
310
|
telemetry: {
|
|
248
311
|
metrics?: {
|
|
@@ -321,16 +384,37 @@ export declare const asHostActorConfig: {
|
|
|
321
384
|
password?: string | undefined;
|
|
322
385
|
username?: string | undefined;
|
|
323
386
|
} | undefined;
|
|
324
|
-
|
|
387
|
+
root?: string | undefined;
|
|
388
|
+
s3?: {
|
|
325
389
|
accessKeyId?: string | undefined;
|
|
326
390
|
accountId?: string | undefined;
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
391
|
+
chainState?: {
|
|
392
|
+
accessKeyId?: string | undefined;
|
|
393
|
+
accountId?: string | undefined;
|
|
394
|
+
bucket?: string | undefined;
|
|
395
|
+
prefix?: string | undefined;
|
|
396
|
+
readUrl?: string | undefined;
|
|
397
|
+
secretAccessKey?: string | undefined;
|
|
398
|
+
} | undefined;
|
|
399
|
+
finalized?: {
|
|
400
|
+
accessKeyId?: string | undefined;
|
|
401
|
+
accountId?: string | undefined;
|
|
402
|
+
bucket?: string | undefined;
|
|
403
|
+
prefix?: string | undefined;
|
|
404
|
+
readUrl?: string | undefined;
|
|
405
|
+
secretAccessKey?: string | undefined;
|
|
406
|
+
} | undefined;
|
|
407
|
+
index?: {
|
|
408
|
+
accessKeyId?: string | undefined;
|
|
409
|
+
accountId?: string | undefined;
|
|
410
|
+
bucket?: string | undefined;
|
|
411
|
+
prefix?: string | undefined;
|
|
412
|
+
readUrl?: string | undefined;
|
|
413
|
+
secretAccessKey?: string | undefined;
|
|
414
|
+
} | undefined;
|
|
330
415
|
prefix?: string | undefined;
|
|
331
416
|
secretAccessKey?: string | undefined;
|
|
332
417
|
} | undefined;
|
|
333
|
-
root?: string | undefined;
|
|
334
418
|
};
|
|
335
419
|
telemetry: {
|
|
336
420
|
metrics?: {
|
|
@@ -412,16 +496,37 @@ export declare const toHostActorConfig: {
|
|
|
412
496
|
password?: string | undefined;
|
|
413
497
|
username?: string | undefined;
|
|
414
498
|
} | undefined;
|
|
415
|
-
|
|
499
|
+
root?: string | undefined;
|
|
500
|
+
s3?: {
|
|
416
501
|
accessKeyId?: string | undefined;
|
|
417
502
|
accountId?: string | undefined;
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
503
|
+
chainState?: {
|
|
504
|
+
accessKeyId?: string | undefined;
|
|
505
|
+
accountId?: string | undefined;
|
|
506
|
+
bucket?: string | undefined;
|
|
507
|
+
prefix?: string | undefined;
|
|
508
|
+
readUrl?: string | undefined;
|
|
509
|
+
secretAccessKey?: string | undefined;
|
|
510
|
+
} | undefined;
|
|
511
|
+
finalized?: {
|
|
512
|
+
accessKeyId?: string | undefined;
|
|
513
|
+
accountId?: string | undefined;
|
|
514
|
+
bucket?: string | undefined;
|
|
515
|
+
prefix?: string | undefined;
|
|
516
|
+
readUrl?: string | undefined;
|
|
517
|
+
secretAccessKey?: string | undefined;
|
|
518
|
+
} | undefined;
|
|
519
|
+
index?: {
|
|
520
|
+
accessKeyId?: string | undefined;
|
|
521
|
+
accountId?: string | undefined;
|
|
522
|
+
bucket?: string | undefined;
|
|
523
|
+
prefix?: string | undefined;
|
|
524
|
+
readUrl?: string | undefined;
|
|
525
|
+
secretAccessKey?: string | undefined;
|
|
526
|
+
} | undefined;
|
|
421
527
|
prefix?: string | undefined;
|
|
422
528
|
secretAccessKey?: string | undefined;
|
|
423
529
|
} | undefined;
|
|
424
|
-
root?: string | undefined;
|
|
425
530
|
};
|
|
426
531
|
telemetry: {
|
|
427
532
|
metrics?: {
|
|
@@ -500,16 +605,37 @@ export declare const toHostActorConfig: {
|
|
|
500
605
|
password?: string | undefined;
|
|
501
606
|
username?: string | undefined;
|
|
502
607
|
} | undefined;
|
|
503
|
-
|
|
608
|
+
root?: string | undefined;
|
|
609
|
+
s3?: {
|
|
504
610
|
accessKeyId?: string | undefined;
|
|
505
611
|
accountId?: string | undefined;
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
612
|
+
chainState?: {
|
|
613
|
+
accessKeyId?: string | undefined;
|
|
614
|
+
accountId?: string | undefined;
|
|
615
|
+
bucket?: string | undefined;
|
|
616
|
+
prefix?: string | undefined;
|
|
617
|
+
readUrl?: string | undefined;
|
|
618
|
+
secretAccessKey?: string | undefined;
|
|
619
|
+
} | undefined;
|
|
620
|
+
finalized?: {
|
|
621
|
+
accessKeyId?: string | undefined;
|
|
622
|
+
accountId?: string | undefined;
|
|
623
|
+
bucket?: string | undefined;
|
|
624
|
+
prefix?: string | undefined;
|
|
625
|
+
readUrl?: string | undefined;
|
|
626
|
+
secretAccessKey?: string | undefined;
|
|
627
|
+
} | undefined;
|
|
628
|
+
index?: {
|
|
629
|
+
accessKeyId?: string | undefined;
|
|
630
|
+
accountId?: string | undefined;
|
|
631
|
+
bucket?: string | undefined;
|
|
632
|
+
prefix?: string | undefined;
|
|
633
|
+
readUrl?: string | undefined;
|
|
634
|
+
secretAccessKey?: string | undefined;
|
|
635
|
+
} | undefined;
|
|
509
636
|
prefix?: string | undefined;
|
|
510
637
|
secretAccessKey?: string | undefined;
|
|
511
638
|
} | undefined;
|
|
512
|
-
root?: string | undefined;
|
|
513
639
|
};
|
|
514
640
|
telemetry: {
|
|
515
641
|
metrics?: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HostActor.d.ts","sourceRoot":"","sources":["../../../src/config/HostActor.ts"],"names":[],"mappings":"AAGA,OAAO,EAAkB,CAAC,EAAE,MAAM,UAAU,CAAA;AAI5C,mCAAmC;AACnC,eAAO,MAAM,kBAAkB
|
|
1
|
+
{"version":3,"file":"HostActor.d.ts","sourceRoot":"","sources":["../../../src/config/HostActor.ts"],"names":[],"mappings":"AAGA,OAAO,EAAkB,CAAC,EAAE,MAAM,UAAU,CAAA;AAI5C,mCAAmC;AACnC,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAa7B,CAAA;AAEF,4BAA4B;AAC5B,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAA;AAEhE,oEAAoE;AACpE,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAAmC,CAAA;AACjE,gEAAgE;AAChE,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAAwD,CAAA;AACtF,kCAAkC;AAClC,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAAwD,CAAA"}
|
|
@@ -7,7 +7,8 @@ export * from './HostActor.ts';
|
|
|
7
7
|
export * from './Provider.ts';
|
|
8
8
|
export * from './Providers.ts';
|
|
9
9
|
export * from './Remote.ts';
|
|
10
|
-
export {
|
|
10
|
+
export type { ResolvedS3Bucket, S3BucketConfig, S3BucketName, S3Config, } from './storage/index.ts';
|
|
11
|
+
export { hasMongoConfig, hasS3Config, resolveS3Bucket, } from './storage/index.ts';
|
|
11
12
|
export { DefaultMetricsScrapePorts } from './Telemetry.ts';
|
|
12
13
|
export * from './UsageMeta.ts';
|
|
13
14
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/config/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAA;AAC1B,cAAc,aAAa,CAAA;AAC3B,cAAc,WAAW,CAAA;AACzB,cAAc,aAAa,CAAA;AAC3B,cAAc,qBAAqB,CAAA;AACnC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,eAAe,CAAA;AAC7B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,aAAa,CAAA;AAC3B,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/config/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAA;AAC1B,cAAc,aAAa,CAAA;AAC3B,cAAc,WAAW,CAAA;AACzB,cAAc,aAAa,CAAA;AAC3B,cAAc,qBAAqB,CAAA;AACnC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,eAAe,CAAA;AAC7B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,aAAa,CAAA;AAC3B,YAAY,EACV,gBAAgB,EAAE,cAAc,EAAE,YAAY,EAAE,QAAQ,GACzD,MAAM,oBAAoB,CAAA;AAC3B,OAAO,EACL,cAAc,EAAE,WAAW,EAAE,eAAe,GAC7C,MAAM,oBAAoB,CAAA;AAC3B,OAAO,EAAE,yBAAyB,EAAE,MAAM,gBAAgB,CAAA;AAC1D,cAAc,gBAAgB,CAAA"}
|
|
@@ -8,16 +8,37 @@ export declare const StorageConfigZod: z.ZodObject<{
|
|
|
8
8
|
password: z.ZodOptional<z.ZodString>;
|
|
9
9
|
username: z.ZodOptional<z.ZodString>;
|
|
10
10
|
}, z.core.$strip>>;
|
|
11
|
-
|
|
11
|
+
root: z.ZodOptional<z.ZodString>;
|
|
12
|
+
s3: z.ZodOptional<z.ZodObject<{
|
|
12
13
|
accessKeyId: z.ZodOptional<z.ZodString>;
|
|
13
14
|
accountId: z.ZodOptional<z.ZodString>;
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
chainState: z.ZodOptional<z.ZodObject<{
|
|
16
|
+
accessKeyId: z.ZodOptional<z.ZodString>;
|
|
17
|
+
accountId: z.ZodOptional<z.ZodString>;
|
|
18
|
+
bucket: z.ZodOptional<z.ZodString>;
|
|
19
|
+
prefix: z.ZodOptional<z.ZodString>;
|
|
20
|
+
readUrl: z.ZodOptional<z.ZodString>;
|
|
21
|
+
secretAccessKey: z.ZodOptional<z.ZodString>;
|
|
22
|
+
}, z.core.$strip>>;
|
|
23
|
+
finalized: z.ZodOptional<z.ZodObject<{
|
|
24
|
+
accessKeyId: z.ZodOptional<z.ZodString>;
|
|
25
|
+
accountId: z.ZodOptional<z.ZodString>;
|
|
26
|
+
bucket: z.ZodOptional<z.ZodString>;
|
|
27
|
+
prefix: z.ZodOptional<z.ZodString>;
|
|
28
|
+
readUrl: z.ZodOptional<z.ZodString>;
|
|
29
|
+
secretAccessKey: z.ZodOptional<z.ZodString>;
|
|
30
|
+
}, z.core.$strip>>;
|
|
31
|
+
index: z.ZodOptional<z.ZodObject<{
|
|
32
|
+
accessKeyId: z.ZodOptional<z.ZodString>;
|
|
33
|
+
accountId: z.ZodOptional<z.ZodString>;
|
|
34
|
+
bucket: z.ZodOptional<z.ZodString>;
|
|
35
|
+
prefix: z.ZodOptional<z.ZodString>;
|
|
36
|
+
readUrl: z.ZodOptional<z.ZodString>;
|
|
37
|
+
secretAccessKey: z.ZodOptional<z.ZodString>;
|
|
38
|
+
}, z.core.$strip>>;
|
|
17
39
|
prefix: z.ZodOptional<z.ZodString>;
|
|
18
40
|
secretAccessKey: z.ZodOptional<z.ZodString>;
|
|
19
41
|
}, z.core.$strip>>;
|
|
20
|
-
root: z.ZodOptional<z.ZodString>;
|
|
21
42
|
}, z.core.$strip>;
|
|
22
43
|
/** StorageConfig type. */
|
|
23
44
|
export type StorageConfig = z.infer<typeof StorageConfigZod>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Storage.d.ts","sourceRoot":"","sources":["../../../../src/config/storage/Storage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,CAAC,EAAE,MAAM,KAAK,CAAA;AAIvC,iCAAiC;AACjC,eAAO,MAAM,gBAAgB
|
|
1
|
+
{"version":3,"file":"Storage.d.ts","sourceRoot":"","sources":["../../../../src/config/storage/Storage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,CAAC,EAAE,MAAM,KAAK,CAAA;AAIvC,iCAAiC;AACjC,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAQe,CAAA;AAE5C,0BAA0B;AAC1B,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAA"}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* Per-bucket S3 configuration: the bucket name, an optional public read URL (CDN), and optional
|
|
4
|
+
* credential/prefix overrides. Any omitted credential or prefix falls back to the shared top-level
|
|
5
|
+
* S3 config; an omitted bucket name falls back to the finalized bucket.
|
|
6
|
+
*
|
|
7
|
+
* "S3" is the S3-compatible object-storage protocol; Cloudflare R2 is one such implementation.
|
|
8
|
+
*/
|
|
9
|
+
export declare const S3BucketConfigZod: z.ZodObject<{
|
|
10
|
+
accessKeyId: z.ZodOptional<z.ZodString>;
|
|
11
|
+
accountId: z.ZodOptional<z.ZodString>;
|
|
12
|
+
bucket: z.ZodOptional<z.ZodString>;
|
|
13
|
+
prefix: z.ZodOptional<z.ZodString>;
|
|
14
|
+
readUrl: z.ZodOptional<z.ZodString>;
|
|
15
|
+
secretAccessKey: z.ZodOptional<z.ZodString>;
|
|
16
|
+
}, z.core.$strip>;
|
|
17
|
+
/** S3BucketConfig type. */
|
|
18
|
+
export type S3BucketConfig = z.infer<typeof S3BucketConfigZod>;
|
|
19
|
+
/**
|
|
20
|
+
* S3-compatible object-storage configuration (e.g. Cloudflare R2). Credentials and prefix set at the
|
|
21
|
+
* top level are shared defaults; each bucket — finalized (blocks/payloads/manifest), chain state (the
|
|
22
|
+
* head pointer), and the chain index (the step-summary families) — may override them and set its own
|
|
23
|
+
* name and public read URL. `chainState` and `index` default their bucket name to `finalized.bucket`.
|
|
24
|
+
*/
|
|
25
|
+
export declare const S3ConfigZod: z.ZodObject<{
|
|
26
|
+
accessKeyId: z.ZodOptional<z.ZodString>;
|
|
27
|
+
accountId: z.ZodOptional<z.ZodString>;
|
|
28
|
+
chainState: z.ZodOptional<z.ZodObject<{
|
|
29
|
+
accessKeyId: z.ZodOptional<z.ZodString>;
|
|
30
|
+
accountId: z.ZodOptional<z.ZodString>;
|
|
31
|
+
bucket: z.ZodOptional<z.ZodString>;
|
|
32
|
+
prefix: z.ZodOptional<z.ZodString>;
|
|
33
|
+
readUrl: z.ZodOptional<z.ZodString>;
|
|
34
|
+
secretAccessKey: z.ZodOptional<z.ZodString>;
|
|
35
|
+
}, z.core.$strip>>;
|
|
36
|
+
finalized: z.ZodOptional<z.ZodObject<{
|
|
37
|
+
accessKeyId: z.ZodOptional<z.ZodString>;
|
|
38
|
+
accountId: z.ZodOptional<z.ZodString>;
|
|
39
|
+
bucket: z.ZodOptional<z.ZodString>;
|
|
40
|
+
prefix: z.ZodOptional<z.ZodString>;
|
|
41
|
+
readUrl: z.ZodOptional<z.ZodString>;
|
|
42
|
+
secretAccessKey: z.ZodOptional<z.ZodString>;
|
|
43
|
+
}, z.core.$strip>>;
|
|
44
|
+
index: z.ZodOptional<z.ZodObject<{
|
|
45
|
+
accessKeyId: z.ZodOptional<z.ZodString>;
|
|
46
|
+
accountId: z.ZodOptional<z.ZodString>;
|
|
47
|
+
bucket: z.ZodOptional<z.ZodString>;
|
|
48
|
+
prefix: z.ZodOptional<z.ZodString>;
|
|
49
|
+
readUrl: z.ZodOptional<z.ZodString>;
|
|
50
|
+
secretAccessKey: z.ZodOptional<z.ZodString>;
|
|
51
|
+
}, z.core.$strip>>;
|
|
52
|
+
prefix: z.ZodOptional<z.ZodString>;
|
|
53
|
+
secretAccessKey: z.ZodOptional<z.ZodString>;
|
|
54
|
+
}, z.core.$strip>;
|
|
55
|
+
/** S3Config type. */
|
|
56
|
+
export type S3Config = z.infer<typeof S3ConfigZod>;
|
|
57
|
+
/** The named buckets in the S3 layout. */
|
|
58
|
+
export type S3BucketName = 'chainState' | 'finalized' | 'index';
|
|
59
|
+
/** A fully-resolved S3 bucket target: name and credentials, plus an optional prefix and read URL. */
|
|
60
|
+
export interface ResolvedS3Bucket {
|
|
61
|
+
accessKeyId: string;
|
|
62
|
+
accountId: string;
|
|
63
|
+
bucket: string;
|
|
64
|
+
prefix?: string;
|
|
65
|
+
readUrl?: string;
|
|
66
|
+
secretAccessKey: string;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Resolves a bucket's effective target: credentials and prefix fall back from the per-bucket entry
|
|
70
|
+
* to the shared top-level defaults; the bucket name falls back to the finalized bucket; the read URL
|
|
71
|
+
* comes from the per-bucket entry. Returns undefined when credentials or the bucket name cannot be
|
|
72
|
+
* fully resolved (i.e. that bucket is not configured).
|
|
73
|
+
*/
|
|
74
|
+
export declare function resolveS3Bucket(config: S3Config | undefined, which: S3BucketName): ResolvedS3Bucket | undefined;
|
|
75
|
+
/** True when the given bucket (default `finalized`) is fully configured — credentials and name resolvable. */
|
|
76
|
+
export declare function hasS3Config(config?: S3Config, which?: S3BucketName): boolean;
|
|
77
|
+
//# sourceMappingURL=S3.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"S3.d.ts","sourceRoot":"","sources":["../../../../../src/config/storage/driver/S3.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB;;;;;;;iBAO5B,CAAA;AAEF,2BAA2B;AAC3B,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAA;AAE9D;;;;;GAKG;AACH,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAQtB,CAAA;AAEF,qBAAqB;AACrB,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAA;AAElD,0CAA0C;AAC1C,MAAM,MAAM,YAAY,GAAG,YAAY,GAAG,WAAW,GAAG,OAAO,CAAA;AAE/D,qGAAqG;AACrG,MAAM,WAAW,gBAAgB;IAC/B,WAAW,EAAE,MAAM,CAAA;IACnB,SAAS,EAAE,MAAM,CAAA;IACjB,MAAM,EAAE,MAAM,CAAA;IACd,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,eAAe,EAAE,MAAM,CAAA;CACxB;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,QAAQ,GAAG,SAAS,EAAE,KAAK,EAAE,YAAY,GAAG,gBAAgB,GAAG,SAAS,CAW/G;AAED,8GAA8G;AAC9G,wBAAgB,WAAW,CAAC,MAAM,CAAC,EAAE,QAAQ,EAAE,KAAK,GAAE,YAA0B,GAAG,OAAO,CAEzF"}
|