@aztec/stdlib 3.0.0-nightly.20251111 → 3.0.0-nightly.20251112

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.
@@ -839,6 +839,69 @@ export declare const AvmProvingRequestSchema: z.ZodObject<{
839
839
  selector?: any;
840
840
  address?: any;
841
841
  }>, "many">;
842
+ contractDBCreateCheckpointHints: z.ZodArray<z.ZodEffects<z.ZodObject<{
843
+ actionCounter: z.ZodNumber;
844
+ oldCheckpointId: z.ZodNumber;
845
+ newCheckpointId: z.ZodNumber;
846
+ }, "strip", z.ZodTypeAny, {
847
+ actionCounter: number;
848
+ oldCheckpointId: number;
849
+ newCheckpointId: number;
850
+ }, {
851
+ actionCounter: number;
852
+ oldCheckpointId: number;
853
+ newCheckpointId: number;
854
+ }>, {
855
+ readonly actionCounter: number;
856
+ readonly oldCheckpointId: number;
857
+ readonly newCheckpointId: number;
858
+ }, {
859
+ actionCounter: number;
860
+ oldCheckpointId: number;
861
+ newCheckpointId: number;
862
+ }>, "many">;
863
+ contractDBCommitCheckpointHints: z.ZodArray<z.ZodEffects<z.ZodObject<{
864
+ actionCounter: z.ZodNumber;
865
+ oldCheckpointId: z.ZodNumber;
866
+ newCheckpointId: z.ZodNumber;
867
+ }, "strip", z.ZodTypeAny, {
868
+ actionCounter: number;
869
+ oldCheckpointId: number;
870
+ newCheckpointId: number;
871
+ }, {
872
+ actionCounter: number;
873
+ oldCheckpointId: number;
874
+ newCheckpointId: number;
875
+ }>, {
876
+ readonly actionCounter: number;
877
+ readonly oldCheckpointId: number;
878
+ readonly newCheckpointId: number;
879
+ }, {
880
+ actionCounter: number;
881
+ oldCheckpointId: number;
882
+ newCheckpointId: number;
883
+ }>, "many">;
884
+ contractDBRevertCheckpointHints: z.ZodArray<z.ZodEffects<z.ZodObject<{
885
+ actionCounter: z.ZodNumber;
886
+ oldCheckpointId: z.ZodNumber;
887
+ newCheckpointId: z.ZodNumber;
888
+ }, "strip", z.ZodTypeAny, {
889
+ actionCounter: number;
890
+ oldCheckpointId: number;
891
+ newCheckpointId: number;
892
+ }, {
893
+ actionCounter: number;
894
+ oldCheckpointId: number;
895
+ newCheckpointId: number;
896
+ }>, {
897
+ readonly actionCounter: number;
898
+ readonly oldCheckpointId: number;
899
+ readonly newCheckpointId: number;
900
+ }, {
901
+ actionCounter: number;
902
+ oldCheckpointId: number;
903
+ newCheckpointId: number;
904
+ }>, "many">;
842
905
  startingTreeRoots: z.ZodEffects<z.ZodObject<{
843
906
  l1ToL2MessageTree: z.ZodEffects<z.ZodObject<{
844
907
  root: z.ZodUnion<[z.ZodType<import("@aztec/foundation/schemas").Fr, any, string>, z.ZodType<never, any, string>]>;
@@ -2317,12 +2380,15 @@ export declare const AvmProvingRequestSchema: z.ZodObject<{
2317
2380
  };
2318
2381
  }>;
2319
2382
  }, "strip", z.ZodTypeAny, {
2320
- stateAfter: import("../tx/tree_snapshots.js").TreeSnapshots;
2321
2383
  actionCounter: number;
2322
2384
  oldCheckpointId: number;
2323
2385
  newCheckpointId: number;
2386
+ stateAfter: import("../tx/tree_snapshots.js").TreeSnapshots;
2324
2387
  stateBefore: import("../tx/tree_snapshots.js").TreeSnapshots;
2325
2388
  }, {
2389
+ actionCounter: number;
2390
+ oldCheckpointId: number;
2391
+ newCheckpointId: number;
2326
2392
  stateAfter: {
2327
2393
  noteHashTree: {
2328
2394
  root: string;
@@ -2341,9 +2407,6 @@ export declare const AvmProvingRequestSchema: z.ZodObject<{
2341
2407
  nextAvailableLeafIndex: string | number | bigint;
2342
2408
  };
2343
2409
  };
2344
- actionCounter: number;
2345
- oldCheckpointId: number;
2346
- newCheckpointId: number;
2347
2410
  stateBefore: {
2348
2411
  noteHashTree: {
2349
2412
  root: string;
@@ -2363,6 +2426,9 @@ export declare const AvmProvingRequestSchema: z.ZodObject<{
2363
2426
  };
2364
2427
  };
2365
2428
  }>, import("./avm.js").AvmRevertCheckpointHint, {
2429
+ actionCounter: number;
2430
+ oldCheckpointId: number;
2431
+ newCheckpointId: number;
2366
2432
  stateAfter: {
2367
2433
  noteHashTree: {
2368
2434
  root: string;
@@ -2381,9 +2447,6 @@ export declare const AvmProvingRequestSchema: z.ZodObject<{
2381
2447
  nextAvailableLeafIndex: string | number | bigint;
2382
2448
  };
2383
2449
  };
2384
- actionCounter: number;
2385
- oldCheckpointId: number;
2386
- newCheckpointId: number;
2387
2450
  stateBefore: {
2388
2451
  noteHashTree: {
2389
2452
  root: string;
@@ -2403,77 +2466,29 @@ export declare const AvmProvingRequestSchema: z.ZodObject<{
2403
2466
  };
2404
2467
  };
2405
2468
  }>, "many">;
2406
- contractDBCreateCheckpointHints: z.ZodArray<z.ZodEffects<z.ZodObject<{
2407
- actionCounter: z.ZodNumber;
2408
- oldCheckpointId: z.ZodNumber;
2409
- newCheckpointId: z.ZodNumber;
2410
- }, "strip", z.ZodTypeAny, {
2411
- actionCounter: number;
2412
- oldCheckpointId: number;
2413
- newCheckpointId: number;
2414
- }, {
2415
- actionCounter: number;
2416
- oldCheckpointId: number;
2417
- newCheckpointId: number;
2418
- }>, {
2469
+ }, "strip", z.ZodTypeAny, {
2470
+ globalVariables: import("../tx/global_variables.js").GlobalVariables;
2471
+ protocolContracts: import("../tx/protocol_contracts.js").ProtocolContracts;
2472
+ tx: import("./avm.js").AvmTxHint;
2473
+ contractInstances: import("./avm.js").AvmContractInstanceHint[];
2474
+ contractClasses: import("./avm.js").AvmContractClassHint[];
2475
+ bytecodeCommitments: import("./avm.js").AvmBytecodeCommitmentHint[];
2476
+ debugFunctionNames: import("./avm.js").AvmDebugFunctionNameHint[];
2477
+ contractDBCreateCheckpointHints: {
2419
2478
  readonly actionCounter: number;
2420
2479
  readonly oldCheckpointId: number;
2421
2480
  readonly newCheckpointId: number;
2422
- }, {
2423
- actionCounter: number;
2424
- oldCheckpointId: number;
2425
- newCheckpointId: number;
2426
- }>, "many">;
2427
- contractDBCommitCheckpointHints: z.ZodArray<z.ZodEffects<z.ZodObject<{
2428
- actionCounter: z.ZodNumber;
2429
- oldCheckpointId: z.ZodNumber;
2430
- newCheckpointId: z.ZodNumber;
2431
- }, "strip", z.ZodTypeAny, {
2432
- actionCounter: number;
2433
- oldCheckpointId: number;
2434
- newCheckpointId: number;
2435
- }, {
2436
- actionCounter: number;
2437
- oldCheckpointId: number;
2438
- newCheckpointId: number;
2439
- }>, {
2481
+ }[];
2482
+ contractDBCommitCheckpointHints: {
2440
2483
  readonly actionCounter: number;
2441
2484
  readonly oldCheckpointId: number;
2442
2485
  readonly newCheckpointId: number;
2443
- }, {
2444
- actionCounter: number;
2445
- oldCheckpointId: number;
2446
- newCheckpointId: number;
2447
- }>, "many">;
2448
- contractDBRevertCheckpointHints: z.ZodArray<z.ZodEffects<z.ZodObject<{
2449
- actionCounter: z.ZodNumber;
2450
- oldCheckpointId: z.ZodNumber;
2451
- newCheckpointId: z.ZodNumber;
2452
- }, "strip", z.ZodTypeAny, {
2453
- actionCounter: number;
2454
- oldCheckpointId: number;
2455
- newCheckpointId: number;
2456
- }, {
2457
- actionCounter: number;
2458
- oldCheckpointId: number;
2459
- newCheckpointId: number;
2460
- }>, {
2486
+ }[];
2487
+ contractDBRevertCheckpointHints: {
2461
2488
  readonly actionCounter: number;
2462
2489
  readonly oldCheckpointId: number;
2463
2490
  readonly newCheckpointId: number;
2464
- }, {
2465
- actionCounter: number;
2466
- oldCheckpointId: number;
2467
- newCheckpointId: number;
2468
- }>, "many">;
2469
- }, "strip", z.ZodTypeAny, {
2470
- globalVariables: import("../tx/global_variables.js").GlobalVariables;
2471
- protocolContracts: import("../tx/protocol_contracts.js").ProtocolContracts;
2472
- tx: import("./avm.js").AvmTxHint;
2473
- contractInstances: import("./avm.js").AvmContractInstanceHint[];
2474
- contractClasses: import("./avm.js").AvmContractClassHint[];
2475
- bytecodeCommitments: import("./avm.js").AvmBytecodeCommitmentHint[];
2476
- debugFunctionNames: import("./avm.js").AvmDebugFunctionNameHint[];
2491
+ }[];
2477
2492
  startingTreeRoots: import("../tx/tree_snapshots.js").TreeSnapshots;
2478
2493
  getSiblingPathHints: import("./avm.js").AvmGetSiblingPathHint[];
2479
2494
  getPreviousValueIndexHints: import("./avm.js").AvmGetPreviousValueIndexHint[];
@@ -2532,21 +2547,6 @@ export declare const AvmProvingRequestSchema: z.ZodObject<{
2532
2547
  readonly newCheckpointId: number;
2533
2548
  }[];
2534
2549
  revertCheckpointHints: import("./avm.js").AvmRevertCheckpointHint[];
2535
- contractDBCreateCheckpointHints: {
2536
- readonly actionCounter: number;
2537
- readonly oldCheckpointId: number;
2538
- readonly newCheckpointId: number;
2539
- }[];
2540
- contractDBCommitCheckpointHints: {
2541
- readonly actionCounter: number;
2542
- readonly oldCheckpointId: number;
2543
- readonly newCheckpointId: number;
2544
- }[];
2545
- contractDBRevertCheckpointHints: {
2546
- readonly actionCounter: number;
2547
- readonly oldCheckpointId: number;
2548
- readonly newCheckpointId: number;
2549
- }[];
2550
2550
  }, {
2551
2551
  globalVariables: {
2552
2552
  blockNumber: string | number | bigint;
@@ -2689,6 +2689,21 @@ export declare const AvmProvingRequestSchema: z.ZodObject<{
2689
2689
  selector?: any;
2690
2690
  address?: any;
2691
2691
  }[];
2692
+ contractDBCreateCheckpointHints: {
2693
+ actionCounter: number;
2694
+ oldCheckpointId: number;
2695
+ newCheckpointId: number;
2696
+ }[];
2697
+ contractDBCommitCheckpointHints: {
2698
+ actionCounter: number;
2699
+ oldCheckpointId: number;
2700
+ newCheckpointId: number;
2701
+ }[];
2702
+ contractDBRevertCheckpointHints: {
2703
+ actionCounter: number;
2704
+ oldCheckpointId: number;
2705
+ newCheckpointId: number;
2706
+ }[];
2692
2707
  startingTreeRoots: {
2693
2708
  noteHashTree: {
2694
2709
  root: string;
@@ -2906,6 +2921,9 @@ export declare const AvmProvingRequestSchema: z.ZodObject<{
2906
2921
  newCheckpointId: number;
2907
2922
  }[];
2908
2923
  revertCheckpointHints: {
2924
+ actionCounter: number;
2925
+ oldCheckpointId: number;
2926
+ newCheckpointId: number;
2909
2927
  stateAfter: {
2910
2928
  noteHashTree: {
2911
2929
  root: string;
@@ -2924,9 +2942,6 @@ export declare const AvmProvingRequestSchema: z.ZodObject<{
2924
2942
  nextAvailableLeafIndex: string | number | bigint;
2925
2943
  };
2926
2944
  };
2927
- actionCounter: number;
2928
- oldCheckpointId: number;
2929
- newCheckpointId: number;
2930
2945
  stateBefore: {
2931
2946
  noteHashTree: {
2932
2947
  root: string;
@@ -2946,21 +2961,6 @@ export declare const AvmProvingRequestSchema: z.ZodObject<{
2946
2961
  };
2947
2962
  };
2948
2963
  }[];
2949
- contractDBCreateCheckpointHints: {
2950
- actionCounter: number;
2951
- oldCheckpointId: number;
2952
- newCheckpointId: number;
2953
- }[];
2954
- contractDBCommitCheckpointHints: {
2955
- actionCounter: number;
2956
- oldCheckpointId: number;
2957
- newCheckpointId: number;
2958
- }[];
2959
- contractDBRevertCheckpointHints: {
2960
- actionCounter: number;
2961
- oldCheckpointId: number;
2962
- newCheckpointId: number;
2963
- }[];
2964
2964
  }>, import("./avm.js").AvmExecutionHints, {
2965
2965
  globalVariables: {
2966
2966
  blockNumber: string | number | bigint;
@@ -3103,6 +3103,21 @@ export declare const AvmProvingRequestSchema: z.ZodObject<{
3103
3103
  selector?: any;
3104
3104
  address?: any;
3105
3105
  }[];
3106
+ contractDBCreateCheckpointHints: {
3107
+ actionCounter: number;
3108
+ oldCheckpointId: number;
3109
+ newCheckpointId: number;
3110
+ }[];
3111
+ contractDBCommitCheckpointHints: {
3112
+ actionCounter: number;
3113
+ oldCheckpointId: number;
3114
+ newCheckpointId: number;
3115
+ }[];
3116
+ contractDBRevertCheckpointHints: {
3117
+ actionCounter: number;
3118
+ oldCheckpointId: number;
3119
+ newCheckpointId: number;
3120
+ }[];
3106
3121
  startingTreeRoots: {
3107
3122
  noteHashTree: {
3108
3123
  root: string;
@@ -3320,6 +3335,9 @@ export declare const AvmProvingRequestSchema: z.ZodObject<{
3320
3335
  newCheckpointId: number;
3321
3336
  }[];
3322
3337
  revertCheckpointHints: {
3338
+ actionCounter: number;
3339
+ oldCheckpointId: number;
3340
+ newCheckpointId: number;
3323
3341
  stateAfter: {
3324
3342
  noteHashTree: {
3325
3343
  root: string;
@@ -3338,9 +3356,6 @@ export declare const AvmProvingRequestSchema: z.ZodObject<{
3338
3356
  nextAvailableLeafIndex: string | number | bigint;
3339
3357
  };
3340
3358
  };
3341
- actionCounter: number;
3342
- oldCheckpointId: number;
3343
- newCheckpointId: number;
3344
3359
  stateBefore: {
3345
3360
  noteHashTree: {
3346
3361
  root: string;
@@ -3360,21 +3375,6 @@ export declare const AvmProvingRequestSchema: z.ZodObject<{
3360
3375
  };
3361
3376
  };
3362
3377
  }[];
3363
- contractDBCreateCheckpointHints: {
3364
- actionCounter: number;
3365
- oldCheckpointId: number;
3366
- newCheckpointId: number;
3367
- }[];
3368
- contractDBCommitCheckpointHints: {
3369
- actionCounter: number;
3370
- oldCheckpointId: number;
3371
- newCheckpointId: number;
3372
- }[];
3373
- contractDBRevertCheckpointHints: {
3374
- actionCounter: number;
3375
- oldCheckpointId: number;
3376
- newCheckpointId: number;
3377
- }[];
3378
3378
  }>;
3379
3379
  publicInputs: z.ZodEffects<z.ZodObject<{
3380
3380
  globalVariables: z.ZodEffects<z.ZodObject<{
@@ -4764,6 +4764,21 @@ export declare const AvmProvingRequestSchema: z.ZodObject<{
4764
4764
  selector?: any;
4765
4765
  address?: any;
4766
4766
  }[];
4767
+ contractDBCreateCheckpointHints: {
4768
+ actionCounter: number;
4769
+ oldCheckpointId: number;
4770
+ newCheckpointId: number;
4771
+ }[];
4772
+ contractDBCommitCheckpointHints: {
4773
+ actionCounter: number;
4774
+ oldCheckpointId: number;
4775
+ newCheckpointId: number;
4776
+ }[];
4777
+ contractDBRevertCheckpointHints: {
4778
+ actionCounter: number;
4779
+ oldCheckpointId: number;
4780
+ newCheckpointId: number;
4781
+ }[];
4767
4782
  startingTreeRoots: {
4768
4783
  noteHashTree: {
4769
4784
  root: string;
@@ -4981,6 +4996,9 @@ export declare const AvmProvingRequestSchema: z.ZodObject<{
4981
4996
  newCheckpointId: number;
4982
4997
  }[];
4983
4998
  revertCheckpointHints: {
4999
+ actionCounter: number;
5000
+ oldCheckpointId: number;
5001
+ newCheckpointId: number;
4984
5002
  stateAfter: {
4985
5003
  noteHashTree: {
4986
5004
  root: string;
@@ -4999,9 +5017,6 @@ export declare const AvmProvingRequestSchema: z.ZodObject<{
4999
5017
  nextAvailableLeafIndex: string | number | bigint;
5000
5018
  };
5001
5019
  };
5002
- actionCounter: number;
5003
- oldCheckpointId: number;
5004
- newCheckpointId: number;
5005
5020
  stateBefore: {
5006
5021
  noteHashTree: {
5007
5022
  root: string;
@@ -5021,21 +5036,6 @@ export declare const AvmProvingRequestSchema: z.ZodObject<{
5021
5036
  };
5022
5037
  };
5023
5038
  }[];
5024
- contractDBCreateCheckpointHints: {
5025
- actionCounter: number;
5026
- oldCheckpointId: number;
5027
- newCheckpointId: number;
5028
- }[];
5029
- contractDBCommitCheckpointHints: {
5030
- actionCounter: number;
5031
- oldCheckpointId: number;
5032
- newCheckpointId: number;
5033
- }[];
5034
- contractDBRevertCheckpointHints: {
5035
- actionCounter: number;
5036
- oldCheckpointId: number;
5037
- newCheckpointId: number;
5038
- }[];
5039
5039
  };
5040
5040
  }>, AvmCircuitInputs, {
5041
5041
  publicInputs: {
@@ -5345,6 +5345,21 @@ export declare const AvmProvingRequestSchema: z.ZodObject<{
5345
5345
  selector?: any;
5346
5346
  address?: any;
5347
5347
  }[];
5348
+ contractDBCreateCheckpointHints: {
5349
+ actionCounter: number;
5350
+ oldCheckpointId: number;
5351
+ newCheckpointId: number;
5352
+ }[];
5353
+ contractDBCommitCheckpointHints: {
5354
+ actionCounter: number;
5355
+ oldCheckpointId: number;
5356
+ newCheckpointId: number;
5357
+ }[];
5358
+ contractDBRevertCheckpointHints: {
5359
+ actionCounter: number;
5360
+ oldCheckpointId: number;
5361
+ newCheckpointId: number;
5362
+ }[];
5348
5363
  startingTreeRoots: {
5349
5364
  noteHashTree: {
5350
5365
  root: string;
@@ -5562,6 +5577,9 @@ export declare const AvmProvingRequestSchema: z.ZodObject<{
5562
5577
  newCheckpointId: number;
5563
5578
  }[];
5564
5579
  revertCheckpointHints: {
5580
+ actionCounter: number;
5581
+ oldCheckpointId: number;
5582
+ newCheckpointId: number;
5565
5583
  stateAfter: {
5566
5584
  noteHashTree: {
5567
5585
  root: string;
@@ -5580,9 +5598,6 @@ export declare const AvmProvingRequestSchema: z.ZodObject<{
5580
5598
  nextAvailableLeafIndex: string | number | bigint;
5581
5599
  };
5582
5600
  };
5583
- actionCounter: number;
5584
- oldCheckpointId: number;
5585
- newCheckpointId: number;
5586
5601
  stateBefore: {
5587
5602
  noteHashTree: {
5588
5603
  root: string;
@@ -5602,21 +5617,6 @@ export declare const AvmProvingRequestSchema: z.ZodObject<{
5602
5617
  };
5603
5618
  };
5604
5619
  }[];
5605
- contractDBCreateCheckpointHints: {
5606
- actionCounter: number;
5607
- oldCheckpointId: number;
5608
- newCheckpointId: number;
5609
- }[];
5610
- contractDBCommitCheckpointHints: {
5611
- actionCounter: number;
5612
- oldCheckpointId: number;
5613
- newCheckpointId: number;
5614
- }[];
5615
- contractDBRevertCheckpointHints: {
5616
- actionCounter: number;
5617
- oldCheckpointId: number;
5618
- newCheckpointId: number;
5619
- }[];
5620
5620
  };
5621
5621
  }>;
5622
5622
  }, "strip", z.ZodTypeAny, {
@@ -5932,6 +5932,21 @@ export declare const AvmProvingRequestSchema: z.ZodObject<{
5932
5932
  selector?: any;
5933
5933
  address?: any;
5934
5934
  }[];
5935
+ contractDBCreateCheckpointHints: {
5936
+ actionCounter: number;
5937
+ oldCheckpointId: number;
5938
+ newCheckpointId: number;
5939
+ }[];
5940
+ contractDBCommitCheckpointHints: {
5941
+ actionCounter: number;
5942
+ oldCheckpointId: number;
5943
+ newCheckpointId: number;
5944
+ }[];
5945
+ contractDBRevertCheckpointHints: {
5946
+ actionCounter: number;
5947
+ oldCheckpointId: number;
5948
+ newCheckpointId: number;
5949
+ }[];
5935
5950
  startingTreeRoots: {
5936
5951
  noteHashTree: {
5937
5952
  root: string;
@@ -6149,6 +6164,9 @@ export declare const AvmProvingRequestSchema: z.ZodObject<{
6149
6164
  newCheckpointId: number;
6150
6165
  }[];
6151
6166
  revertCheckpointHints: {
6167
+ actionCounter: number;
6168
+ oldCheckpointId: number;
6169
+ newCheckpointId: number;
6152
6170
  stateAfter: {
6153
6171
  noteHashTree: {
6154
6172
  root: string;
@@ -6167,9 +6185,6 @@ export declare const AvmProvingRequestSchema: z.ZodObject<{
6167
6185
  nextAvailableLeafIndex: string | number | bigint;
6168
6186
  };
6169
6187
  };
6170
- actionCounter: number;
6171
- oldCheckpointId: number;
6172
- newCheckpointId: number;
6173
6188
  stateBefore: {
6174
6189
  noteHashTree: {
6175
6190
  root: string;
@@ -6189,21 +6204,6 @@ export declare const AvmProvingRequestSchema: z.ZodObject<{
6189
6204
  };
6190
6205
  };
6191
6206
  }[];
6192
- contractDBCreateCheckpointHints: {
6193
- actionCounter: number;
6194
- oldCheckpointId: number;
6195
- newCheckpointId: number;
6196
- }[];
6197
- contractDBCommitCheckpointHints: {
6198
- actionCounter: number;
6199
- oldCheckpointId: number;
6200
- newCheckpointId: number;
6201
- }[];
6202
- contractDBRevertCheckpointHints: {
6203
- actionCounter: number;
6204
- oldCheckpointId: number;
6205
- newCheckpointId: number;
6206
- }[];
6207
6207
  };
6208
6208
  };
6209
6209
  }>;
@@ -1 +1 @@
1
- {"version":3,"file":"http.d.ts","sourceRoot":"","sources":["../../src/file-store/http.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,MAAM,EAAgB,MAAM,uBAAuB,CAAC;AAUlE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAExD,qBAAa,aAAc,YAAW,iBAAiB;IAKnD,OAAO,CAAC,QAAQ,CAAC,OAAO;IACxB,OAAO,CAAC,QAAQ,CAAC,GAAG;IALtB,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAgB;IAC9C,OAAO,CAAC,QAAQ,CAAC,KAAK,CAA+D;gBAGlE,OAAO,EAAE,MAAM,EACf,GAAG,GAAE,MAA+C;IAc1D,IAAI,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAUxC,QAAQ,CAAC,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAW5D,MAAM,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAUxD,OAAO,CAAC,MAAM;CAGf"}
1
+ {"version":3,"file":"http.d.ts","sourceRoot":"","sources":["../../src/file-store/http.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,MAAM,EAAgB,MAAM,uBAAuB,CAAC;AAUlE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAExD,qBAAa,aAAc,YAAW,iBAAiB;IAKnD,OAAO,CAAC,QAAQ,CAAC,OAAO;IACxB,OAAO,CAAC,QAAQ,CAAC,GAAG;IALtB,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAgB;IAC9C,OAAO,CAAC,QAAQ,CAAC,KAAK,CAA+D;gBAGlE,OAAO,EAAE,MAAM,EACf,GAAG,GAAE,MAA+C;IAc1D,IAAI,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAUxC,QAAQ,CAAC,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAc5D,MAAM,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAUxD,OAAO,CAAC,MAAM;CAGf"}
@@ -4,7 +4,7 @@ import axios from 'axios';
4
4
  import { createWriteStream } from 'fs';
5
5
  import { mkdir } from 'fs/promises';
6
6
  import { dirname } from 'path';
7
- import { finished } from 'stream/promises';
7
+ import { pipeline } from 'stream/promises';
8
8
  export class HttpFileStore {
9
9
  baseUrl;
10
10
  log;
@@ -38,17 +38,22 @@ export class HttpFileStore {
38
38
  async download(pathOrUrl, destPath) {
39
39
  const url = this.getUrl(pathOrUrl);
40
40
  try {
41
+ this.log.debug(`Downloading file from ${url} to ${destPath}`);
41
42
  const response = await this.fetch({
42
43
  url,
43
44
  method: 'GET',
44
45
  responseType: 'stream'
45
46
  });
47
+ this.log.debug(`Response ${response.status} (${response.statusText}) from ${url}, writing to ${destPath}`);
46
48
  await mkdir(dirname(destPath), {
47
49
  recursive: true
48
50
  });
49
- await finished(response.data.pipe(createWriteStream(destPath)));
51
+ await pipeline(response.data, createWriteStream(destPath));
52
+ this.log.debug(`Download of ${url} to ${destPath} complete`);
50
53
  } catch (error) {
51
- throw new Error(`Error fetching file from ${url}: ${error instanceof Error ? error.message : String(error)}`);
54
+ throw new Error(`Error fetching file from ${url}`, {
55
+ cause: error
56
+ });
52
57
  }
53
58
  }
54
59
  async exists(pathOrUrl) {
@@ -1 +1 @@
1
- {"version":3,"file":"s3.d.ts","sourceRoot":"","sources":["../../src/file-store/s3.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,MAAM,EAAgB,MAAM,uBAAuB,CAAC;AAiBlE,OAAO,KAAK,EAAE,SAAS,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAMtE,qBAAa,WAAY,YAAW,SAAS;IAOzC,OAAO,CAAC,QAAQ,CAAC,UAAU;IAC3B,OAAO,CAAC,QAAQ,CAAC,QAAQ;IAEzB,OAAO,CAAC,QAAQ,CAAC,GAAG;IATtB,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAW;IAC9B,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAS;IAChC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAS;IACnC,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAS;gBAGrB,UAAU,EAAE,MAAM,EAClB,QAAQ,EAAE,MAAM,EACjC,IAAI,EAAE;QAAE,QAAQ,CAAC,EAAE,MAAM,CAAC;QAAC,aAAa,CAAC,EAAE,MAAM,CAAA;KAAE,EAClC,GAAG,GAAE,MAA6C;IAiBxD,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,GAAE,oBAAyB,GAAG,OAAO,CAAC,MAAM,CAAC;IAoBlF,MAAM,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,GAAE,oBAAyB,GAAG,OAAO,CAAC,MAAM,CAAC;IA6D3F,IAAI,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAW3C,QAAQ,CAAC,YAAY,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAQ/D,MAAM,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAe3D,OAAO,CAAC,mBAAmB;IAQ3B,OAAO,CAAC,iBAAiB;IAsBzB,OAAO,CAAC,gBAAgB;IA0BxB,OAAO,CAAC,eAAe;IA2BvB,OAAO,CAAC,WAAW;CAKpB"}
1
+ {"version":3,"file":"s3.d.ts","sourceRoot":"","sources":["../../src/file-store/s3.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,MAAM,EAAgB,MAAM,uBAAuB,CAAC;AAiBlE,OAAO,KAAK,EAAE,SAAS,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAMtE,qBAAa,WAAY,YAAW,SAAS;IAOzC,OAAO,CAAC,QAAQ,CAAC,UAAU;IAC3B,OAAO,CAAC,QAAQ,CAAC,QAAQ;IAEzB,OAAO,CAAC,QAAQ,CAAC,GAAG;IATtB,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAW;IAC9B,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAS;IAChC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAS;IACnC,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAS;gBAGrB,UAAU,EAAE,MAAM,EAClB,QAAQ,EAAE,MAAM,EACjC,IAAI,EAAE;QAAE,QAAQ,CAAC,EAAE,MAAM,CAAC;QAAC,aAAa,CAAC,EAAE,MAAM,CAAA;KAAE,EAClC,GAAG,GAAE,MAA6C;IAiBxD,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,GAAE,oBAAyB,GAAG,OAAO,CAAC,MAAM,CAAC;IAoBlF,MAAM,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,GAAE,oBAAyB,GAAG,OAAO,CAAC,MAAM,CAAC;IA0D3F,IAAI,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAW3C,QAAQ,CAAC,YAAY,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAO/D,MAAM,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAe3D,OAAO,CAAC,mBAAmB;IAQ3B,OAAO,CAAC,iBAAiB;IAsBzB,OAAO,CAAC,gBAAgB;IA0BxB,OAAO,CAAC,eAAe;IA2BvB,OAAO,CAAC,WAAW;CAKpB"}
@@ -4,7 +4,7 @@ import { createReadStream, createWriteStream } from 'fs';
4
4
  import { mkdir, mkdtemp, stat, unlink } from 'fs/promises';
5
5
  import { tmpdir } from 'os';
6
6
  import { basename, dirname, join } from 'path';
7
- import { finished } from 'stream/promises';
7
+ import { pipeline } from 'stream/promises';
8
8
  import { createGzip } from 'zlib';
9
9
  function normalizeBasePath(path) {
10
10
  return path?.replace(/^\/+|\/+$/g, '') ?? '';
@@ -72,11 +72,8 @@ export class S3FileStore {
72
72
  // Pre-gzip to a temp file so we know the exact length for R2/S3 headers
73
73
  const tmpDir = await mkdtemp(join(tmpdir(), 's3-upload-'));
74
74
  const gzPath = join(tmpDir, `${basename(srcPath)}.gz`);
75
- const source = createReadStream(srcPath);
76
- const gz = createGzip();
77
- const out = createWriteStream(gzPath);
78
75
  try {
79
- await finished(source.pipe(gz).pipe(out));
76
+ await pipeline(createReadStream(srcPath), createGzip(), createWriteStream(gzPath));
80
77
  const st = await stat(gzPath);
81
78
  contentLength = st.size;
82
79
  bodyPath = gzPath;
@@ -133,8 +130,7 @@ export class S3FileStore {
133
130
  await mkdir(dirname(destPath), {
134
131
  recursive: true
135
132
  });
136
- const write = createWriteStream(destPath);
137
- await finished(out.Body.pipe(write));
133
+ await pipeline(out.Body, createWriteStream(destPath));
138
134
  }
139
135
  async exists(pathOrUrlStr) {
140
136
  try {