@rivetkit/engine-envoy-protocol 0.0.0-pr.4856.c68d9cb → 0.0.0-pr.4857.3a10f72
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/index.d.ts +296 -8
- package/dist/index.js +783 -95
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
// src/index.ts
|
|
2
2
|
import * as bare from "@rivetkit/bare-ts";
|
|
3
|
+
var DEFAULT_CONFIG = /* @__PURE__ */ bare.Config({});
|
|
3
4
|
function readId(bc) {
|
|
4
5
|
return bare.readString(bc);
|
|
5
6
|
}
|
|
@@ -365,18 +366,66 @@ function writeKvResponseData(bc, x) {
|
|
|
365
366
|
}
|
|
366
367
|
}
|
|
367
368
|
}
|
|
369
|
+
function readSqliteGeneration(bc) {
|
|
370
|
+
return bare.readU64(bc);
|
|
371
|
+
}
|
|
372
|
+
function writeSqliteGeneration(bc, x) {
|
|
373
|
+
bare.writeU64(bc, x);
|
|
374
|
+
}
|
|
375
|
+
function readSqliteTxid(bc) {
|
|
376
|
+
return bare.readU64(bc);
|
|
377
|
+
}
|
|
378
|
+
function writeSqliteTxid(bc, x) {
|
|
379
|
+
bare.writeU64(bc, x);
|
|
380
|
+
}
|
|
368
381
|
function readSqlitePgno(bc) {
|
|
369
382
|
return bare.readU32(bc);
|
|
370
383
|
}
|
|
371
384
|
function writeSqlitePgno(bc, x) {
|
|
372
385
|
bare.writeU32(bc, x);
|
|
373
386
|
}
|
|
387
|
+
function readSqliteStageId(bc) {
|
|
388
|
+
return bare.readU64(bc);
|
|
389
|
+
}
|
|
390
|
+
function writeSqliteStageId(bc, x) {
|
|
391
|
+
bare.writeU64(bc, x);
|
|
392
|
+
}
|
|
374
393
|
function readSqlitePageBytes(bc) {
|
|
375
394
|
return bare.readData(bc);
|
|
376
395
|
}
|
|
377
396
|
function writeSqlitePageBytes(bc, x) {
|
|
378
397
|
bare.writeData(bc, x);
|
|
379
398
|
}
|
|
399
|
+
function readSqliteMeta(bc) {
|
|
400
|
+
return {
|
|
401
|
+
generation: readSqliteGeneration(bc),
|
|
402
|
+
headTxid: readSqliteTxid(bc),
|
|
403
|
+
materializedTxid: readSqliteTxid(bc),
|
|
404
|
+
dbSizePages: bare.readU32(bc),
|
|
405
|
+
pageSize: bare.readU32(bc),
|
|
406
|
+
creationTsMs: bare.readI64(bc),
|
|
407
|
+
maxDeltaBytes: bare.readU64(bc)
|
|
408
|
+
};
|
|
409
|
+
}
|
|
410
|
+
function writeSqliteMeta(bc, x) {
|
|
411
|
+
writeSqliteGeneration(bc, x.generation);
|
|
412
|
+
writeSqliteTxid(bc, x.headTxid);
|
|
413
|
+
writeSqliteTxid(bc, x.materializedTxid);
|
|
414
|
+
bare.writeU32(bc, x.dbSizePages);
|
|
415
|
+
bare.writeU32(bc, x.pageSize);
|
|
416
|
+
bare.writeI64(bc, x.creationTsMs);
|
|
417
|
+
bare.writeU64(bc, x.maxDeltaBytes);
|
|
418
|
+
}
|
|
419
|
+
function readSqliteFenceMismatch(bc) {
|
|
420
|
+
return {
|
|
421
|
+
actualMeta: readSqliteMeta(bc),
|
|
422
|
+
reason: bare.readString(bc)
|
|
423
|
+
};
|
|
424
|
+
}
|
|
425
|
+
function writeSqliteFenceMismatch(bc, x) {
|
|
426
|
+
writeSqliteMeta(bc, x.actualMeta);
|
|
427
|
+
bare.writeString(bc, x.reason);
|
|
428
|
+
}
|
|
380
429
|
function readSqliteDirtyPage(bc) {
|
|
381
430
|
return {
|
|
382
431
|
pgno: readSqlitePgno(bc),
|
|
@@ -426,16 +475,30 @@ function write6(bc, x) {
|
|
|
426
475
|
function readSqliteGetPagesRequest(bc) {
|
|
427
476
|
return {
|
|
428
477
|
actorId: readId(bc),
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
expectedHeadTxid: read2(bc)
|
|
478
|
+
generation: readSqliteGeneration(bc),
|
|
479
|
+
pgnos: read6(bc)
|
|
432
480
|
};
|
|
433
481
|
}
|
|
434
482
|
function writeSqliteGetPagesRequest(bc, x) {
|
|
435
483
|
writeId(bc, x.actorId);
|
|
484
|
+
writeSqliteGeneration(bc, x.generation);
|
|
436
485
|
write6(bc, x.pgnos);
|
|
437
|
-
|
|
438
|
-
|
|
486
|
+
}
|
|
487
|
+
function readSqliteGetPageRangeRequest(bc) {
|
|
488
|
+
return {
|
|
489
|
+
actorId: readId(bc),
|
|
490
|
+
generation: readSqliteGeneration(bc),
|
|
491
|
+
startPgno: readSqlitePgno(bc),
|
|
492
|
+
maxPages: bare.readU32(bc),
|
|
493
|
+
maxBytes: bare.readU64(bc)
|
|
494
|
+
};
|
|
495
|
+
}
|
|
496
|
+
function writeSqliteGetPageRangeRequest(bc, x) {
|
|
497
|
+
writeId(bc, x.actorId);
|
|
498
|
+
writeSqliteGeneration(bc, x.generation);
|
|
499
|
+
writeSqlitePgno(bc, x.startPgno);
|
|
500
|
+
bare.writeU32(bc, x.maxPages);
|
|
501
|
+
bare.writeU64(bc, x.maxBytes);
|
|
439
502
|
}
|
|
440
503
|
function read7(bc) {
|
|
441
504
|
const len = bare.readUintSafe(bc);
|
|
@@ -456,11 +519,25 @@ function write7(bc, x) {
|
|
|
456
519
|
}
|
|
457
520
|
function readSqliteGetPagesOk(bc) {
|
|
458
521
|
return {
|
|
459
|
-
pages: read7(bc)
|
|
522
|
+
pages: read7(bc),
|
|
523
|
+
meta: readSqliteMeta(bc)
|
|
460
524
|
};
|
|
461
525
|
}
|
|
462
526
|
function writeSqliteGetPagesOk(bc, x) {
|
|
463
527
|
write7(bc, x.pages);
|
|
528
|
+
writeSqliteMeta(bc, x.meta);
|
|
529
|
+
}
|
|
530
|
+
function readSqliteGetPageRangeOk(bc) {
|
|
531
|
+
return {
|
|
532
|
+
startPgno: readSqlitePgno(bc),
|
|
533
|
+
pages: read7(bc),
|
|
534
|
+
meta: readSqliteMeta(bc)
|
|
535
|
+
};
|
|
536
|
+
}
|
|
537
|
+
function writeSqliteGetPageRangeOk(bc, x) {
|
|
538
|
+
writeSqlitePgno(bc, x.startPgno);
|
|
539
|
+
write7(bc, x.pages);
|
|
540
|
+
writeSqliteMeta(bc, x.meta);
|
|
464
541
|
}
|
|
465
542
|
function readSqliteErrorResponse(bc) {
|
|
466
543
|
return {
|
|
@@ -477,6 +554,8 @@ function readSqliteGetPagesResponse(bc) {
|
|
|
477
554
|
case 0:
|
|
478
555
|
return { tag: "SqliteGetPagesOk", val: readSqliteGetPagesOk(bc) };
|
|
479
556
|
case 1:
|
|
557
|
+
return { tag: "SqliteFenceMismatch", val: readSqliteFenceMismatch(bc) };
|
|
558
|
+
case 2:
|
|
480
559
|
return { tag: "SqliteErrorResponse", val: readSqliteErrorResponse(bc) };
|
|
481
560
|
default: {
|
|
482
561
|
bc.offset = offset;
|
|
@@ -491,8 +570,48 @@ function writeSqliteGetPagesResponse(bc, x) {
|
|
|
491
570
|
writeSqliteGetPagesOk(bc, x.val);
|
|
492
571
|
break;
|
|
493
572
|
}
|
|
573
|
+
case "SqliteFenceMismatch": {
|
|
574
|
+
bare.writeU8(bc, 1);
|
|
575
|
+
writeSqliteFenceMismatch(bc, x.val);
|
|
576
|
+
break;
|
|
577
|
+
}
|
|
494
578
|
case "SqliteErrorResponse": {
|
|
579
|
+
bare.writeU8(bc, 2);
|
|
580
|
+
writeSqliteErrorResponse(bc, x.val);
|
|
581
|
+
break;
|
|
582
|
+
}
|
|
583
|
+
}
|
|
584
|
+
}
|
|
585
|
+
function readSqliteGetPageRangeResponse(bc) {
|
|
586
|
+
const offset = bc.offset;
|
|
587
|
+
const tag = bare.readU8(bc);
|
|
588
|
+
switch (tag) {
|
|
589
|
+
case 0:
|
|
590
|
+
return { tag: "SqliteGetPageRangeOk", val: readSqliteGetPageRangeOk(bc) };
|
|
591
|
+
case 1:
|
|
592
|
+
return { tag: "SqliteFenceMismatch", val: readSqliteFenceMismatch(bc) };
|
|
593
|
+
case 2:
|
|
594
|
+
return { tag: "SqliteErrorResponse", val: readSqliteErrorResponse(bc) };
|
|
595
|
+
default: {
|
|
596
|
+
bc.offset = offset;
|
|
597
|
+
throw new bare.BareError(offset, "invalid tag");
|
|
598
|
+
}
|
|
599
|
+
}
|
|
600
|
+
}
|
|
601
|
+
function writeSqliteGetPageRangeResponse(bc, x) {
|
|
602
|
+
switch (x.tag) {
|
|
603
|
+
case "SqliteGetPageRangeOk": {
|
|
604
|
+
bare.writeU8(bc, 0);
|
|
605
|
+
writeSqliteGetPageRangeOk(bc, x.val);
|
|
606
|
+
break;
|
|
607
|
+
}
|
|
608
|
+
case "SqliteFenceMismatch": {
|
|
495
609
|
bare.writeU8(bc, 1);
|
|
610
|
+
writeSqliteFenceMismatch(bc, x.val);
|
|
611
|
+
break;
|
|
612
|
+
}
|
|
613
|
+
case "SqliteErrorResponse": {
|
|
614
|
+
bare.writeU8(bc, 2);
|
|
496
615
|
writeSqliteErrorResponse(bc, x.val);
|
|
497
616
|
break;
|
|
498
617
|
}
|
|
@@ -518,28 +637,50 @@ function write8(bc, x) {
|
|
|
518
637
|
function readSqliteCommitRequest(bc) {
|
|
519
638
|
return {
|
|
520
639
|
actorId: readId(bc),
|
|
640
|
+
generation: readSqliteGeneration(bc),
|
|
641
|
+
expectedHeadTxid: readSqliteTxid(bc),
|
|
521
642
|
dirtyPages: read8(bc),
|
|
522
|
-
|
|
523
|
-
nowMs: bare.readI64(bc),
|
|
524
|
-
expectedGeneration: read2(bc),
|
|
525
|
-
expectedHeadTxid: read2(bc)
|
|
643
|
+
newDbSizePages: bare.readU32(bc)
|
|
526
644
|
};
|
|
527
645
|
}
|
|
528
646
|
function writeSqliteCommitRequest(bc, x) {
|
|
529
647
|
writeId(bc, x.actorId);
|
|
648
|
+
writeSqliteGeneration(bc, x.generation);
|
|
649
|
+
writeSqliteTxid(bc, x.expectedHeadTxid);
|
|
530
650
|
write8(bc, x.dirtyPages);
|
|
531
|
-
bare.writeU32(bc, x.
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
651
|
+
bare.writeU32(bc, x.newDbSizePages);
|
|
652
|
+
}
|
|
653
|
+
function readSqliteCommitOk(bc) {
|
|
654
|
+
return {
|
|
655
|
+
newHeadTxid: readSqliteTxid(bc),
|
|
656
|
+
meta: readSqliteMeta(bc)
|
|
657
|
+
};
|
|
658
|
+
}
|
|
659
|
+
function writeSqliteCommitOk(bc, x) {
|
|
660
|
+
writeSqliteTxid(bc, x.newHeadTxid);
|
|
661
|
+
writeSqliteMeta(bc, x.meta);
|
|
662
|
+
}
|
|
663
|
+
function readSqliteCommitTooLarge(bc) {
|
|
664
|
+
return {
|
|
665
|
+
actualSizeBytes: bare.readU64(bc),
|
|
666
|
+
maxSizeBytes: bare.readU64(bc)
|
|
667
|
+
};
|
|
668
|
+
}
|
|
669
|
+
function writeSqliteCommitTooLarge(bc, x) {
|
|
670
|
+
bare.writeU64(bc, x.actualSizeBytes);
|
|
671
|
+
bare.writeU64(bc, x.maxSizeBytes);
|
|
535
672
|
}
|
|
536
673
|
function readSqliteCommitResponse(bc) {
|
|
537
674
|
const offset = bc.offset;
|
|
538
675
|
const tag = bare.readU8(bc);
|
|
539
676
|
switch (tag) {
|
|
540
677
|
case 0:
|
|
541
|
-
return { tag: "SqliteCommitOk", val:
|
|
678
|
+
return { tag: "SqliteCommitOk", val: readSqliteCommitOk(bc) };
|
|
542
679
|
case 1:
|
|
680
|
+
return { tag: "SqliteFenceMismatch", val: readSqliteFenceMismatch(bc) };
|
|
681
|
+
case 2:
|
|
682
|
+
return { tag: "SqliteCommitTooLarge", val: readSqliteCommitTooLarge(bc) };
|
|
683
|
+
case 3:
|
|
543
684
|
return { tag: "SqliteErrorResponse", val: readSqliteErrorResponse(bc) };
|
|
544
685
|
default: {
|
|
545
686
|
bc.offset = offset;
|
|
@@ -551,15 +692,311 @@ function writeSqliteCommitResponse(bc, x) {
|
|
|
551
692
|
switch (x.tag) {
|
|
552
693
|
case "SqliteCommitOk": {
|
|
553
694
|
bare.writeU8(bc, 0);
|
|
695
|
+
writeSqliteCommitOk(bc, x.val);
|
|
696
|
+
break;
|
|
697
|
+
}
|
|
698
|
+
case "SqliteFenceMismatch": {
|
|
699
|
+
bare.writeU8(bc, 1);
|
|
700
|
+
writeSqliteFenceMismatch(bc, x.val);
|
|
701
|
+
break;
|
|
702
|
+
}
|
|
703
|
+
case "SqliteCommitTooLarge": {
|
|
704
|
+
bare.writeU8(bc, 2);
|
|
705
|
+
writeSqliteCommitTooLarge(bc, x.val);
|
|
554
706
|
break;
|
|
555
707
|
}
|
|
556
708
|
case "SqliteErrorResponse": {
|
|
709
|
+
bare.writeU8(bc, 3);
|
|
710
|
+
writeSqliteErrorResponse(bc, x.val);
|
|
711
|
+
break;
|
|
712
|
+
}
|
|
713
|
+
}
|
|
714
|
+
}
|
|
715
|
+
function readSqliteCommitStageBeginRequest(bc) {
|
|
716
|
+
return {
|
|
717
|
+
actorId: readId(bc),
|
|
718
|
+
generation: readSqliteGeneration(bc)
|
|
719
|
+
};
|
|
720
|
+
}
|
|
721
|
+
function writeSqliteCommitStageBeginRequest(bc, x) {
|
|
722
|
+
writeId(bc, x.actorId);
|
|
723
|
+
writeSqliteGeneration(bc, x.generation);
|
|
724
|
+
}
|
|
725
|
+
function readSqliteCommitStageBeginOk(bc) {
|
|
726
|
+
return {
|
|
727
|
+
txid: readSqliteTxid(bc)
|
|
728
|
+
};
|
|
729
|
+
}
|
|
730
|
+
function writeSqliteCommitStageBeginOk(bc, x) {
|
|
731
|
+
writeSqliteTxid(bc, x.txid);
|
|
732
|
+
}
|
|
733
|
+
function readSqliteCommitStageBeginResponse(bc) {
|
|
734
|
+
const offset = bc.offset;
|
|
735
|
+
const tag = bare.readU8(bc);
|
|
736
|
+
switch (tag) {
|
|
737
|
+
case 0:
|
|
738
|
+
return { tag: "SqliteCommitStageBeginOk", val: readSqliteCommitStageBeginOk(bc) };
|
|
739
|
+
case 1:
|
|
740
|
+
return { tag: "SqliteFenceMismatch", val: readSqliteFenceMismatch(bc) };
|
|
741
|
+
case 2:
|
|
742
|
+
return { tag: "SqliteErrorResponse", val: readSqliteErrorResponse(bc) };
|
|
743
|
+
default: {
|
|
744
|
+
bc.offset = offset;
|
|
745
|
+
throw new bare.BareError(offset, "invalid tag");
|
|
746
|
+
}
|
|
747
|
+
}
|
|
748
|
+
}
|
|
749
|
+
function writeSqliteCommitStageBeginResponse(bc, x) {
|
|
750
|
+
switch (x.tag) {
|
|
751
|
+
case "SqliteCommitStageBeginOk": {
|
|
752
|
+
bare.writeU8(bc, 0);
|
|
753
|
+
writeSqliteCommitStageBeginOk(bc, x.val);
|
|
754
|
+
break;
|
|
755
|
+
}
|
|
756
|
+
case "SqliteFenceMismatch": {
|
|
757
|
+
bare.writeU8(bc, 1);
|
|
758
|
+
writeSqliteFenceMismatch(bc, x.val);
|
|
759
|
+
break;
|
|
760
|
+
}
|
|
761
|
+
case "SqliteErrorResponse": {
|
|
762
|
+
bare.writeU8(bc, 2);
|
|
763
|
+
writeSqliteErrorResponse(bc, x.val);
|
|
764
|
+
break;
|
|
765
|
+
}
|
|
766
|
+
}
|
|
767
|
+
}
|
|
768
|
+
function readSqliteCommitStageRequest(bc) {
|
|
769
|
+
return {
|
|
770
|
+
actorId: readId(bc),
|
|
771
|
+
generation: readSqliteGeneration(bc),
|
|
772
|
+
txid: readSqliteTxid(bc),
|
|
773
|
+
chunkIdx: bare.readU32(bc),
|
|
774
|
+
bytes: bare.readData(bc),
|
|
775
|
+
isLast: bare.readBool(bc)
|
|
776
|
+
};
|
|
777
|
+
}
|
|
778
|
+
function writeSqliteCommitStageRequest(bc, x) {
|
|
779
|
+
writeId(bc, x.actorId);
|
|
780
|
+
writeSqliteGeneration(bc, x.generation);
|
|
781
|
+
writeSqliteTxid(bc, x.txid);
|
|
782
|
+
bare.writeU32(bc, x.chunkIdx);
|
|
783
|
+
bare.writeData(bc, x.bytes);
|
|
784
|
+
bare.writeBool(bc, x.isLast);
|
|
785
|
+
}
|
|
786
|
+
function readSqliteCommitStageOk(bc) {
|
|
787
|
+
return {
|
|
788
|
+
chunkIdxCommitted: bare.readU32(bc)
|
|
789
|
+
};
|
|
790
|
+
}
|
|
791
|
+
function writeSqliteCommitStageOk(bc, x) {
|
|
792
|
+
bare.writeU32(bc, x.chunkIdxCommitted);
|
|
793
|
+
}
|
|
794
|
+
function readSqliteCommitStageResponse(bc) {
|
|
795
|
+
const offset = bc.offset;
|
|
796
|
+
const tag = bare.readU8(bc);
|
|
797
|
+
switch (tag) {
|
|
798
|
+
case 0:
|
|
799
|
+
return { tag: "SqliteCommitStageOk", val: readSqliteCommitStageOk(bc) };
|
|
800
|
+
case 1:
|
|
801
|
+
return { tag: "SqliteFenceMismatch", val: readSqliteFenceMismatch(bc) };
|
|
802
|
+
case 2:
|
|
803
|
+
return { tag: "SqliteErrorResponse", val: readSqliteErrorResponse(bc) };
|
|
804
|
+
default: {
|
|
805
|
+
bc.offset = offset;
|
|
806
|
+
throw new bare.BareError(offset, "invalid tag");
|
|
807
|
+
}
|
|
808
|
+
}
|
|
809
|
+
}
|
|
810
|
+
function writeSqliteCommitStageResponse(bc, x) {
|
|
811
|
+
switch (x.tag) {
|
|
812
|
+
case "SqliteCommitStageOk": {
|
|
813
|
+
bare.writeU8(bc, 0);
|
|
814
|
+
writeSqliteCommitStageOk(bc, x.val);
|
|
815
|
+
break;
|
|
816
|
+
}
|
|
817
|
+
case "SqliteFenceMismatch": {
|
|
818
|
+
bare.writeU8(bc, 1);
|
|
819
|
+
writeSqliteFenceMismatch(bc, x.val);
|
|
820
|
+
break;
|
|
821
|
+
}
|
|
822
|
+
case "SqliteErrorResponse": {
|
|
823
|
+
bare.writeU8(bc, 2);
|
|
824
|
+
writeSqliteErrorResponse(bc, x.val);
|
|
825
|
+
break;
|
|
826
|
+
}
|
|
827
|
+
}
|
|
828
|
+
}
|
|
829
|
+
function readSqliteCommitFinalizeRequest(bc) {
|
|
830
|
+
return {
|
|
831
|
+
actorId: readId(bc),
|
|
832
|
+
generation: readSqliteGeneration(bc),
|
|
833
|
+
expectedHeadTxid: readSqliteTxid(bc),
|
|
834
|
+
txid: readSqliteTxid(bc),
|
|
835
|
+
newDbSizePages: bare.readU32(bc)
|
|
836
|
+
};
|
|
837
|
+
}
|
|
838
|
+
function writeSqliteCommitFinalizeRequest(bc, x) {
|
|
839
|
+
writeId(bc, x.actorId);
|
|
840
|
+
writeSqliteGeneration(bc, x.generation);
|
|
841
|
+
writeSqliteTxid(bc, x.expectedHeadTxid);
|
|
842
|
+
writeSqliteTxid(bc, x.txid);
|
|
843
|
+
bare.writeU32(bc, x.newDbSizePages);
|
|
844
|
+
}
|
|
845
|
+
function readSqliteCommitFinalizeOk(bc) {
|
|
846
|
+
return {
|
|
847
|
+
newHeadTxid: readSqliteTxid(bc),
|
|
848
|
+
meta: readSqliteMeta(bc)
|
|
849
|
+
};
|
|
850
|
+
}
|
|
851
|
+
function writeSqliteCommitFinalizeOk(bc, x) {
|
|
852
|
+
writeSqliteTxid(bc, x.newHeadTxid);
|
|
853
|
+
writeSqliteMeta(bc, x.meta);
|
|
854
|
+
}
|
|
855
|
+
function readSqliteStageNotFound(bc) {
|
|
856
|
+
return {
|
|
857
|
+
stageId: readSqliteStageId(bc)
|
|
858
|
+
};
|
|
859
|
+
}
|
|
860
|
+
function writeSqliteStageNotFound(bc, x) {
|
|
861
|
+
writeSqliteStageId(bc, x.stageId);
|
|
862
|
+
}
|
|
863
|
+
function readSqliteCommitFinalizeResponse(bc) {
|
|
864
|
+
const offset = bc.offset;
|
|
865
|
+
const tag = bare.readU8(bc);
|
|
866
|
+
switch (tag) {
|
|
867
|
+
case 0:
|
|
868
|
+
return { tag: "SqliteCommitFinalizeOk", val: readSqliteCommitFinalizeOk(bc) };
|
|
869
|
+
case 1:
|
|
870
|
+
return { tag: "SqliteFenceMismatch", val: readSqliteFenceMismatch(bc) };
|
|
871
|
+
case 2:
|
|
872
|
+
return { tag: "SqliteStageNotFound", val: readSqliteStageNotFound(bc) };
|
|
873
|
+
case 3:
|
|
874
|
+
return { tag: "SqliteErrorResponse", val: readSqliteErrorResponse(bc) };
|
|
875
|
+
default: {
|
|
876
|
+
bc.offset = offset;
|
|
877
|
+
throw new bare.BareError(offset, "invalid tag");
|
|
878
|
+
}
|
|
879
|
+
}
|
|
880
|
+
}
|
|
881
|
+
function writeSqliteCommitFinalizeResponse(bc, x) {
|
|
882
|
+
switch (x.tag) {
|
|
883
|
+
case "SqliteCommitFinalizeOk": {
|
|
884
|
+
bare.writeU8(bc, 0);
|
|
885
|
+
writeSqliteCommitFinalizeOk(bc, x.val);
|
|
886
|
+
break;
|
|
887
|
+
}
|
|
888
|
+
case "SqliteFenceMismatch": {
|
|
889
|
+
bare.writeU8(bc, 1);
|
|
890
|
+
writeSqliteFenceMismatch(bc, x.val);
|
|
891
|
+
break;
|
|
892
|
+
}
|
|
893
|
+
case "SqliteStageNotFound": {
|
|
894
|
+
bare.writeU8(bc, 2);
|
|
895
|
+
writeSqliteStageNotFound(bc, x.val);
|
|
896
|
+
break;
|
|
897
|
+
}
|
|
898
|
+
case "SqliteErrorResponse": {
|
|
899
|
+
bare.writeU8(bc, 3);
|
|
900
|
+
writeSqliteErrorResponse(bc, x.val);
|
|
901
|
+
break;
|
|
902
|
+
}
|
|
903
|
+
}
|
|
904
|
+
}
|
|
905
|
+
function readSqlitePreloadHintRange(bc) {
|
|
906
|
+
return {
|
|
907
|
+
startPgno: readSqlitePgno(bc),
|
|
908
|
+
pageCount: bare.readU32(bc)
|
|
909
|
+
};
|
|
910
|
+
}
|
|
911
|
+
function writeSqlitePreloadHintRange(bc, x) {
|
|
912
|
+
writeSqlitePgno(bc, x.startPgno);
|
|
913
|
+
bare.writeU32(bc, x.pageCount);
|
|
914
|
+
}
|
|
915
|
+
function read9(bc) {
|
|
916
|
+
const len = bare.readUintSafe(bc);
|
|
917
|
+
if (len === 0) {
|
|
918
|
+
return [];
|
|
919
|
+
}
|
|
920
|
+
const result = [readSqlitePreloadHintRange(bc)];
|
|
921
|
+
for (let i = 1; i < len; i++) {
|
|
922
|
+
result[i] = readSqlitePreloadHintRange(bc);
|
|
923
|
+
}
|
|
924
|
+
return result;
|
|
925
|
+
}
|
|
926
|
+
function write9(bc, x) {
|
|
927
|
+
bare.writeUintSafe(bc, x.length);
|
|
928
|
+
for (let i = 0; i < x.length; i++) {
|
|
929
|
+
writeSqlitePreloadHintRange(bc, x[i]);
|
|
930
|
+
}
|
|
931
|
+
}
|
|
932
|
+
function readSqlitePreloadHints(bc) {
|
|
933
|
+
return {
|
|
934
|
+
pgnos: read6(bc),
|
|
935
|
+
ranges: read9(bc)
|
|
936
|
+
};
|
|
937
|
+
}
|
|
938
|
+
function writeSqlitePreloadHints(bc, x) {
|
|
939
|
+
write6(bc, x.pgnos);
|
|
940
|
+
write9(bc, x.ranges);
|
|
941
|
+
}
|
|
942
|
+
function readSqlitePersistPreloadHintsRequest(bc) {
|
|
943
|
+
return {
|
|
944
|
+
actorId: readId(bc),
|
|
945
|
+
generation: readSqliteGeneration(bc),
|
|
946
|
+
hints: readSqlitePreloadHints(bc)
|
|
947
|
+
};
|
|
948
|
+
}
|
|
949
|
+
function writeSqlitePersistPreloadHintsRequest(bc, x) {
|
|
950
|
+
writeId(bc, x.actorId);
|
|
951
|
+
writeSqliteGeneration(bc, x.generation);
|
|
952
|
+
writeSqlitePreloadHints(bc, x.hints);
|
|
953
|
+
}
|
|
954
|
+
function readSqlitePersistPreloadHintsResponse(bc) {
|
|
955
|
+
const offset = bc.offset;
|
|
956
|
+
const tag = bare.readU8(bc);
|
|
957
|
+
switch (tag) {
|
|
958
|
+
case 0:
|
|
959
|
+
return { tag: "SqlitePersistPreloadHintsOk", val: null };
|
|
960
|
+
case 1:
|
|
961
|
+
return { tag: "SqliteFenceMismatch", val: readSqliteFenceMismatch(bc) };
|
|
962
|
+
case 2:
|
|
963
|
+
return { tag: "SqliteErrorResponse", val: readSqliteErrorResponse(bc) };
|
|
964
|
+
default: {
|
|
965
|
+
bc.offset = offset;
|
|
966
|
+
throw new bare.BareError(offset, "invalid tag");
|
|
967
|
+
}
|
|
968
|
+
}
|
|
969
|
+
}
|
|
970
|
+
function writeSqlitePersistPreloadHintsResponse(bc, x) {
|
|
971
|
+
switch (x.tag) {
|
|
972
|
+
case "SqlitePersistPreloadHintsOk": {
|
|
973
|
+
bare.writeU8(bc, 0);
|
|
974
|
+
break;
|
|
975
|
+
}
|
|
976
|
+
case "SqliteFenceMismatch": {
|
|
557
977
|
bare.writeU8(bc, 1);
|
|
978
|
+
writeSqliteFenceMismatch(bc, x.val);
|
|
979
|
+
break;
|
|
980
|
+
}
|
|
981
|
+
case "SqliteErrorResponse": {
|
|
982
|
+
bare.writeU8(bc, 2);
|
|
558
983
|
writeSqliteErrorResponse(bc, x.val);
|
|
559
984
|
break;
|
|
560
985
|
}
|
|
561
986
|
}
|
|
562
987
|
}
|
|
988
|
+
function readSqliteStartupData(bc) {
|
|
989
|
+
return {
|
|
990
|
+
generation: readSqliteGeneration(bc),
|
|
991
|
+
meta: readSqliteMeta(bc),
|
|
992
|
+
preloadedPages: read7(bc)
|
|
993
|
+
};
|
|
994
|
+
}
|
|
995
|
+
function writeSqliteStartupData(bc, x) {
|
|
996
|
+
writeSqliteGeneration(bc, x.generation);
|
|
997
|
+
writeSqliteMeta(bc, x.meta);
|
|
998
|
+
write7(bc, x.preloadedPages);
|
|
999
|
+
}
|
|
563
1000
|
var StopCode = /* @__PURE__ */ ((StopCode2) => {
|
|
564
1001
|
StopCode2["Ok"] = "Ok";
|
|
565
1002
|
StopCode2["Error"] = "Error";
|
|
@@ -599,19 +1036,19 @@ function readActorName(bc) {
|
|
|
599
1036
|
function writeActorName(bc, x) {
|
|
600
1037
|
writeJson(bc, x.metadata);
|
|
601
1038
|
}
|
|
602
|
-
function
|
|
1039
|
+
function read10(bc) {
|
|
603
1040
|
return bare.readBool(bc) ? bare.readString(bc) : null;
|
|
604
1041
|
}
|
|
605
|
-
function
|
|
1042
|
+
function write10(bc, x) {
|
|
606
1043
|
bare.writeBool(bc, x != null);
|
|
607
1044
|
if (x != null) {
|
|
608
1045
|
bare.writeString(bc, x);
|
|
609
1046
|
}
|
|
610
1047
|
}
|
|
611
|
-
function
|
|
1048
|
+
function read11(bc) {
|
|
612
1049
|
return bare.readBool(bc) ? bare.readData(bc) : null;
|
|
613
1050
|
}
|
|
614
|
-
function
|
|
1051
|
+
function write11(bc, x) {
|
|
615
1052
|
bare.writeBool(bc, x != null);
|
|
616
1053
|
if (x != null) {
|
|
617
1054
|
bare.writeData(bc, x);
|
|
@@ -620,16 +1057,16 @@ function write10(bc, x) {
|
|
|
620
1057
|
function readActorConfig(bc) {
|
|
621
1058
|
return {
|
|
622
1059
|
name: bare.readString(bc),
|
|
623
|
-
key:
|
|
1060
|
+
key: read10(bc),
|
|
624
1061
|
createTs: bare.readI64(bc),
|
|
625
|
-
input:
|
|
1062
|
+
input: read11(bc)
|
|
626
1063
|
};
|
|
627
1064
|
}
|
|
628
1065
|
function writeActorConfig(bc, x) {
|
|
629
1066
|
bare.writeString(bc, x.name);
|
|
630
|
-
|
|
1067
|
+
write10(bc, x.key);
|
|
631
1068
|
bare.writeI64(bc, x.createTs);
|
|
632
|
-
|
|
1069
|
+
write11(bc, x.input);
|
|
633
1070
|
}
|
|
634
1071
|
function readActorCheckpoint(bc) {
|
|
635
1072
|
return {
|
|
@@ -672,12 +1109,12 @@ function writeActorIntent(bc, x) {
|
|
|
672
1109
|
function readActorStateStopped(bc) {
|
|
673
1110
|
return {
|
|
674
1111
|
code: readStopCode(bc),
|
|
675
|
-
message:
|
|
1112
|
+
message: read10(bc)
|
|
676
1113
|
};
|
|
677
1114
|
}
|
|
678
1115
|
function writeActorStateStopped(bc, x) {
|
|
679
1116
|
writeStopCode(bc, x.code);
|
|
680
|
-
|
|
1117
|
+
write10(bc, x.message);
|
|
681
1118
|
}
|
|
682
1119
|
function readActorState(bc) {
|
|
683
1120
|
const offset = bc.offset;
|
|
@@ -722,10 +1159,10 @@ function readEventActorStateUpdate(bc) {
|
|
|
722
1159
|
function writeEventActorStateUpdate(bc, x) {
|
|
723
1160
|
writeActorState(bc, x.state);
|
|
724
1161
|
}
|
|
725
|
-
function
|
|
1162
|
+
function read12(bc) {
|
|
726
1163
|
return bare.readBool(bc) ? bare.readI64(bc) : null;
|
|
727
1164
|
}
|
|
728
|
-
function
|
|
1165
|
+
function write12(bc, x) {
|
|
729
1166
|
bare.writeBool(bc, x != null);
|
|
730
1167
|
if (x != null) {
|
|
731
1168
|
bare.writeI64(bc, x);
|
|
@@ -733,11 +1170,11 @@ function write11(bc, x) {
|
|
|
733
1170
|
}
|
|
734
1171
|
function readEventActorSetAlarm(bc) {
|
|
735
1172
|
return {
|
|
736
|
-
alarmTs:
|
|
1173
|
+
alarmTs: read12(bc)
|
|
737
1174
|
};
|
|
738
1175
|
}
|
|
739
1176
|
function writeEventActorSetAlarm(bc, x) {
|
|
740
|
-
|
|
1177
|
+
write12(bc, x.alarmTs);
|
|
741
1178
|
}
|
|
742
1179
|
function readEvent(bc) {
|
|
743
1180
|
const offset = bc.offset;
|
|
@@ -796,7 +1233,7 @@ function writePreloadedKvEntry(bc, x) {
|
|
|
796
1233
|
writeKvValue(bc, x.value);
|
|
797
1234
|
writeKvMetadata(bc, x.metadata);
|
|
798
1235
|
}
|
|
799
|
-
function
|
|
1236
|
+
function read13(bc) {
|
|
800
1237
|
const len = bare.readUintSafe(bc);
|
|
801
1238
|
if (len === 0) {
|
|
802
1239
|
return [];
|
|
@@ -807,7 +1244,7 @@ function read12(bc) {
|
|
|
807
1244
|
}
|
|
808
1245
|
return result;
|
|
809
1246
|
}
|
|
810
|
-
function
|
|
1247
|
+
function write13(bc, x) {
|
|
811
1248
|
bare.writeUintSafe(bc, x.length);
|
|
812
1249
|
for (let i = 0; i < x.length; i++) {
|
|
813
1250
|
writePreloadedKvEntry(bc, x[i]);
|
|
@@ -815,13 +1252,13 @@ function write12(bc, x) {
|
|
|
815
1252
|
}
|
|
816
1253
|
function readPreloadedKv(bc) {
|
|
817
1254
|
return {
|
|
818
|
-
entries:
|
|
1255
|
+
entries: read13(bc),
|
|
819
1256
|
requestedGetKeys: read0(bc),
|
|
820
1257
|
requestedPrefixes: read0(bc)
|
|
821
1258
|
};
|
|
822
1259
|
}
|
|
823
1260
|
function writePreloadedKv(bc, x) {
|
|
824
|
-
|
|
1261
|
+
write13(bc, x.entries);
|
|
825
1262
|
write0(bc, x.requestedGetKeys);
|
|
826
1263
|
write0(bc, x.requestedPrefixes);
|
|
827
1264
|
}
|
|
@@ -835,7 +1272,7 @@ function writeHibernatingRequest(bc, x) {
|
|
|
835
1272
|
writeGatewayId(bc, x.gatewayId);
|
|
836
1273
|
writeRequestId(bc, x.requestId);
|
|
837
1274
|
}
|
|
838
|
-
function
|
|
1275
|
+
function read14(bc) {
|
|
839
1276
|
const len = bare.readUintSafe(bc);
|
|
840
1277
|
if (len === 0) {
|
|
841
1278
|
return [];
|
|
@@ -846,32 +1283,43 @@ function read13(bc) {
|
|
|
846
1283
|
}
|
|
847
1284
|
return result;
|
|
848
1285
|
}
|
|
849
|
-
function
|
|
1286
|
+
function write14(bc, x) {
|
|
850
1287
|
bare.writeUintSafe(bc, x.length);
|
|
851
1288
|
for (let i = 0; i < x.length; i++) {
|
|
852
1289
|
writeHibernatingRequest(bc, x[i]);
|
|
853
1290
|
}
|
|
854
1291
|
}
|
|
855
|
-
function
|
|
1292
|
+
function read15(bc) {
|
|
856
1293
|
return bare.readBool(bc) ? readPreloadedKv(bc) : null;
|
|
857
1294
|
}
|
|
858
|
-
function
|
|
1295
|
+
function write15(bc, x) {
|
|
859
1296
|
bare.writeBool(bc, x != null);
|
|
860
1297
|
if (x != null) {
|
|
861
1298
|
writePreloadedKv(bc, x);
|
|
862
1299
|
}
|
|
863
1300
|
}
|
|
1301
|
+
function read16(bc) {
|
|
1302
|
+
return bare.readBool(bc) ? readSqliteStartupData(bc) : null;
|
|
1303
|
+
}
|
|
1304
|
+
function write16(bc, x) {
|
|
1305
|
+
bare.writeBool(bc, x != null);
|
|
1306
|
+
if (x != null) {
|
|
1307
|
+
writeSqliteStartupData(bc, x);
|
|
1308
|
+
}
|
|
1309
|
+
}
|
|
864
1310
|
function readCommandStartActor(bc) {
|
|
865
1311
|
return {
|
|
866
1312
|
config: readActorConfig(bc),
|
|
867
|
-
hibernatingRequests:
|
|
868
|
-
preloadedKv:
|
|
1313
|
+
hibernatingRequests: read14(bc),
|
|
1314
|
+
preloadedKv: read15(bc),
|
|
1315
|
+
sqliteStartupData: read16(bc)
|
|
869
1316
|
};
|
|
870
1317
|
}
|
|
871
1318
|
function writeCommandStartActor(bc, x) {
|
|
872
1319
|
writeActorConfig(bc, x.config);
|
|
873
|
-
|
|
874
|
-
|
|
1320
|
+
write14(bc, x.hibernatingRequests);
|
|
1321
|
+
write15(bc, x.preloadedKv);
|
|
1322
|
+
write16(bc, x.sqliteStartupData);
|
|
875
1323
|
}
|
|
876
1324
|
var StopActorReason = /* @__PURE__ */ ((StopActorReason2) => {
|
|
877
1325
|
StopActorReason2["SleepIntent"] = "SleepIntent";
|
|
@@ -1000,7 +1448,7 @@ function writeActorCommandKeyData(bc, x) {
|
|
|
1000
1448
|
}
|
|
1001
1449
|
}
|
|
1002
1450
|
function encodeActorCommandKeyData(x, config) {
|
|
1003
|
-
const fullConfig = config != null ? bare.Config(config) :
|
|
1451
|
+
const fullConfig = config != null ? bare.Config(config) : DEFAULT_CONFIG;
|
|
1004
1452
|
const bc = new bare.ByteCursor(
|
|
1005
1453
|
new Uint8Array(fullConfig.initialBufferLength),
|
|
1006
1454
|
fullConfig
|
|
@@ -1009,7 +1457,7 @@ function encodeActorCommandKeyData(x, config) {
|
|
|
1009
1457
|
return new Uint8Array(bc.view.buffer, bc.view.byteOffset, bc.offset);
|
|
1010
1458
|
}
|
|
1011
1459
|
function decodeActorCommandKeyData(bytes) {
|
|
1012
|
-
const bc = new bare.ByteCursor(bytes,
|
|
1460
|
+
const bc = new bare.ByteCursor(bytes, DEFAULT_CONFIG);
|
|
1013
1461
|
const result = readActorCommandKeyData(bc);
|
|
1014
1462
|
if (bc.offset < bc.view.byteLength) {
|
|
1015
1463
|
throw new bare.BareError(bc.offset, "remaining bytes");
|
|
@@ -1028,7 +1476,7 @@ function writeMessageId(bc, x) {
|
|
|
1028
1476
|
writeRequestId(bc, x.requestId);
|
|
1029
1477
|
writeMessageIndex(bc, x.messageIndex);
|
|
1030
1478
|
}
|
|
1031
|
-
function
|
|
1479
|
+
function read17(bc) {
|
|
1032
1480
|
const len = bare.readUintSafe(bc);
|
|
1033
1481
|
const result = /* @__PURE__ */ new Map();
|
|
1034
1482
|
for (let i = 0; i < len; i++) {
|
|
@@ -1042,7 +1490,7 @@ function read15(bc) {
|
|
|
1042
1490
|
}
|
|
1043
1491
|
return result;
|
|
1044
1492
|
}
|
|
1045
|
-
function
|
|
1493
|
+
function write17(bc, x) {
|
|
1046
1494
|
bare.writeUintSafe(bc, x.size);
|
|
1047
1495
|
for (const kv of x) {
|
|
1048
1496
|
bare.writeString(bc, kv[0]);
|
|
@@ -1054,8 +1502,8 @@ function readToEnvoyRequestStart(bc) {
|
|
|
1054
1502
|
actorId: readId(bc),
|
|
1055
1503
|
method: bare.readString(bc),
|
|
1056
1504
|
path: bare.readString(bc),
|
|
1057
|
-
headers:
|
|
1058
|
-
body:
|
|
1505
|
+
headers: read17(bc),
|
|
1506
|
+
body: read11(bc),
|
|
1059
1507
|
stream: bare.readBool(bc)
|
|
1060
1508
|
};
|
|
1061
1509
|
}
|
|
@@ -1063,8 +1511,8 @@ function writeToEnvoyRequestStart(bc, x) {
|
|
|
1063
1511
|
writeId(bc, x.actorId);
|
|
1064
1512
|
bare.writeString(bc, x.method);
|
|
1065
1513
|
bare.writeString(bc, x.path);
|
|
1066
|
-
|
|
1067
|
-
|
|
1514
|
+
write17(bc, x.headers);
|
|
1515
|
+
write11(bc, x.body);
|
|
1068
1516
|
bare.writeBool(bc, x.stream);
|
|
1069
1517
|
}
|
|
1070
1518
|
function readToEnvoyRequestChunk(bc) {
|
|
@@ -1080,15 +1528,15 @@ function writeToEnvoyRequestChunk(bc, x) {
|
|
|
1080
1528
|
function readToRivetResponseStart(bc) {
|
|
1081
1529
|
return {
|
|
1082
1530
|
status: bare.readU16(bc),
|
|
1083
|
-
headers:
|
|
1084
|
-
body:
|
|
1531
|
+
headers: read17(bc),
|
|
1532
|
+
body: read11(bc),
|
|
1085
1533
|
stream: bare.readBool(bc)
|
|
1086
1534
|
};
|
|
1087
1535
|
}
|
|
1088
1536
|
function writeToRivetResponseStart(bc, x) {
|
|
1089
1537
|
bare.writeU16(bc, x.status);
|
|
1090
|
-
|
|
1091
|
-
|
|
1538
|
+
write17(bc, x.headers);
|
|
1539
|
+
write11(bc, x.body);
|
|
1092
1540
|
bare.writeBool(bc, x.stream);
|
|
1093
1541
|
}
|
|
1094
1542
|
function readToRivetResponseChunk(bc) {
|
|
@@ -1105,13 +1553,13 @@ function readToEnvoyWebSocketOpen(bc) {
|
|
|
1105
1553
|
return {
|
|
1106
1554
|
actorId: readId(bc),
|
|
1107
1555
|
path: bare.readString(bc),
|
|
1108
|
-
headers:
|
|
1556
|
+
headers: read17(bc)
|
|
1109
1557
|
};
|
|
1110
1558
|
}
|
|
1111
1559
|
function writeToEnvoyWebSocketOpen(bc, x) {
|
|
1112
1560
|
writeId(bc, x.actorId);
|
|
1113
1561
|
bare.writeString(bc, x.path);
|
|
1114
|
-
|
|
1562
|
+
write17(bc, x.headers);
|
|
1115
1563
|
}
|
|
1116
1564
|
function readToEnvoyWebSocketMessage(bc) {
|
|
1117
1565
|
return {
|
|
@@ -1123,10 +1571,10 @@ function writeToEnvoyWebSocketMessage(bc, x) {
|
|
|
1123
1571
|
bare.writeData(bc, x.data);
|
|
1124
1572
|
bare.writeBool(bc, x.binary);
|
|
1125
1573
|
}
|
|
1126
|
-
function
|
|
1574
|
+
function read18(bc) {
|
|
1127
1575
|
return bare.readBool(bc) ? bare.readU16(bc) : null;
|
|
1128
1576
|
}
|
|
1129
|
-
function
|
|
1577
|
+
function write18(bc, x) {
|
|
1130
1578
|
bare.writeBool(bc, x != null);
|
|
1131
1579
|
if (x != null) {
|
|
1132
1580
|
bare.writeU16(bc, x);
|
|
@@ -1134,13 +1582,13 @@ function write16(bc, x) {
|
|
|
1134
1582
|
}
|
|
1135
1583
|
function readToEnvoyWebSocketClose(bc) {
|
|
1136
1584
|
return {
|
|
1137
|
-
code:
|
|
1138
|
-
reason:
|
|
1585
|
+
code: read18(bc),
|
|
1586
|
+
reason: read10(bc)
|
|
1139
1587
|
};
|
|
1140
1588
|
}
|
|
1141
1589
|
function writeToEnvoyWebSocketClose(bc, x) {
|
|
1142
|
-
|
|
1143
|
-
|
|
1590
|
+
write18(bc, x.code);
|
|
1591
|
+
write10(bc, x.reason);
|
|
1144
1592
|
}
|
|
1145
1593
|
function readToRivetWebSocketOpen(bc) {
|
|
1146
1594
|
return {
|
|
@@ -1170,14 +1618,14 @@ function writeToRivetWebSocketMessageAck(bc, x) {
|
|
|
1170
1618
|
}
|
|
1171
1619
|
function readToRivetWebSocketClose(bc) {
|
|
1172
1620
|
return {
|
|
1173
|
-
code:
|
|
1174
|
-
reason:
|
|
1621
|
+
code: read18(bc),
|
|
1622
|
+
reason: read10(bc),
|
|
1175
1623
|
hibernate: bare.readBool(bc)
|
|
1176
1624
|
};
|
|
1177
1625
|
}
|
|
1178
1626
|
function writeToRivetWebSocketClose(bc, x) {
|
|
1179
|
-
|
|
1180
|
-
|
|
1627
|
+
write18(bc, x.code);
|
|
1628
|
+
write10(bc, x.reason);
|
|
1181
1629
|
bare.writeBool(bc, x.hibernate);
|
|
1182
1630
|
}
|
|
1183
1631
|
function readToRivetTunnelMessageKind(bc) {
|
|
@@ -1325,7 +1773,7 @@ function readToEnvoyPing(bc) {
|
|
|
1325
1773
|
function writeToEnvoyPing(bc, x) {
|
|
1326
1774
|
bare.writeI64(bc, x.ts);
|
|
1327
1775
|
}
|
|
1328
|
-
function
|
|
1776
|
+
function read19(bc) {
|
|
1329
1777
|
const len = bare.readUintSafe(bc);
|
|
1330
1778
|
const result = /* @__PURE__ */ new Map();
|
|
1331
1779
|
for (let i = 0; i < len; i++) {
|
|
@@ -1339,26 +1787,26 @@ function read17(bc) {
|
|
|
1339
1787
|
}
|
|
1340
1788
|
return result;
|
|
1341
1789
|
}
|
|
1342
|
-
function
|
|
1790
|
+
function write19(bc, x) {
|
|
1343
1791
|
bare.writeUintSafe(bc, x.size);
|
|
1344
1792
|
for (const kv of x) {
|
|
1345
1793
|
bare.writeString(bc, kv[0]);
|
|
1346
1794
|
writeActorName(bc, kv[1]);
|
|
1347
1795
|
}
|
|
1348
1796
|
}
|
|
1349
|
-
function
|
|
1350
|
-
return bare.readBool(bc) ?
|
|
1797
|
+
function read20(bc) {
|
|
1798
|
+
return bare.readBool(bc) ? read19(bc) : null;
|
|
1351
1799
|
}
|
|
1352
|
-
function
|
|
1800
|
+
function write20(bc, x) {
|
|
1353
1801
|
bare.writeBool(bc, x != null);
|
|
1354
1802
|
if (x != null) {
|
|
1355
|
-
|
|
1803
|
+
write19(bc, x);
|
|
1356
1804
|
}
|
|
1357
1805
|
}
|
|
1358
|
-
function
|
|
1806
|
+
function read21(bc) {
|
|
1359
1807
|
return bare.readBool(bc) ? readJson(bc) : null;
|
|
1360
1808
|
}
|
|
1361
|
-
function
|
|
1809
|
+
function write21(bc, x) {
|
|
1362
1810
|
bare.writeBool(bc, x != null);
|
|
1363
1811
|
if (x != null) {
|
|
1364
1812
|
writeJson(bc, x);
|
|
@@ -1366,13 +1814,13 @@ function write19(bc, x) {
|
|
|
1366
1814
|
}
|
|
1367
1815
|
function readToRivetMetadata(bc) {
|
|
1368
1816
|
return {
|
|
1369
|
-
prepopulateActorNames:
|
|
1370
|
-
metadata:
|
|
1817
|
+
prepopulateActorNames: read20(bc),
|
|
1818
|
+
metadata: read21(bc)
|
|
1371
1819
|
};
|
|
1372
1820
|
}
|
|
1373
1821
|
function writeToRivetMetadata(bc, x) {
|
|
1374
|
-
|
|
1375
|
-
|
|
1822
|
+
write20(bc, x.prepopulateActorNames);
|
|
1823
|
+
write21(bc, x.metadata);
|
|
1376
1824
|
}
|
|
1377
1825
|
function readToRivetEvents(bc) {
|
|
1378
1826
|
const len = bare.readUintSafe(bc);
|
|
@@ -1391,7 +1839,7 @@ function writeToRivetEvents(bc, x) {
|
|
|
1391
1839
|
writeEventWrapper(bc, x[i]);
|
|
1392
1840
|
}
|
|
1393
1841
|
}
|
|
1394
|
-
function
|
|
1842
|
+
function read22(bc) {
|
|
1395
1843
|
const len = bare.readUintSafe(bc);
|
|
1396
1844
|
if (len === 0) {
|
|
1397
1845
|
return [];
|
|
@@ -1402,7 +1850,7 @@ function read20(bc) {
|
|
|
1402
1850
|
}
|
|
1403
1851
|
return result;
|
|
1404
1852
|
}
|
|
1405
|
-
function
|
|
1853
|
+
function write22(bc, x) {
|
|
1406
1854
|
bare.writeUintSafe(bc, x.length);
|
|
1407
1855
|
for (let i = 0; i < x.length; i++) {
|
|
1408
1856
|
writeActorCheckpoint(bc, x[i]);
|
|
@@ -1410,11 +1858,11 @@ function write20(bc, x) {
|
|
|
1410
1858
|
}
|
|
1411
1859
|
function readToRivetAckCommands(bc) {
|
|
1412
1860
|
return {
|
|
1413
|
-
lastCommandCheckpoints:
|
|
1861
|
+
lastCommandCheckpoints: read22(bc)
|
|
1414
1862
|
};
|
|
1415
1863
|
}
|
|
1416
1864
|
function writeToRivetAckCommands(bc, x) {
|
|
1417
|
-
|
|
1865
|
+
write22(bc, x.lastCommandCheckpoints);
|
|
1418
1866
|
}
|
|
1419
1867
|
function readToRivetPong(bc) {
|
|
1420
1868
|
return {
|
|
@@ -1446,6 +1894,16 @@ function writeToRivetSqliteGetPagesRequest(bc, x) {
|
|
|
1446
1894
|
bare.writeU32(bc, x.requestId);
|
|
1447
1895
|
writeSqliteGetPagesRequest(bc, x.data);
|
|
1448
1896
|
}
|
|
1897
|
+
function readToRivetSqliteGetPageRangeRequest(bc) {
|
|
1898
|
+
return {
|
|
1899
|
+
requestId: bare.readU32(bc),
|
|
1900
|
+
data: readSqliteGetPageRangeRequest(bc)
|
|
1901
|
+
};
|
|
1902
|
+
}
|
|
1903
|
+
function writeToRivetSqliteGetPageRangeRequest(bc, x) {
|
|
1904
|
+
bare.writeU32(bc, x.requestId);
|
|
1905
|
+
writeSqliteGetPageRangeRequest(bc, x.data);
|
|
1906
|
+
}
|
|
1449
1907
|
function readToRivetSqliteCommitRequest(bc) {
|
|
1450
1908
|
return {
|
|
1451
1909
|
requestId: bare.readU32(bc),
|
|
@@ -1456,6 +1914,46 @@ function writeToRivetSqliteCommitRequest(bc, x) {
|
|
|
1456
1914
|
bare.writeU32(bc, x.requestId);
|
|
1457
1915
|
writeSqliteCommitRequest(bc, x.data);
|
|
1458
1916
|
}
|
|
1917
|
+
function readToRivetSqliteCommitStageBeginRequest(bc) {
|
|
1918
|
+
return {
|
|
1919
|
+
requestId: bare.readU32(bc),
|
|
1920
|
+
data: readSqliteCommitStageBeginRequest(bc)
|
|
1921
|
+
};
|
|
1922
|
+
}
|
|
1923
|
+
function writeToRivetSqliteCommitStageBeginRequest(bc, x) {
|
|
1924
|
+
bare.writeU32(bc, x.requestId);
|
|
1925
|
+
writeSqliteCommitStageBeginRequest(bc, x.data);
|
|
1926
|
+
}
|
|
1927
|
+
function readToRivetSqliteCommitStageRequest(bc) {
|
|
1928
|
+
return {
|
|
1929
|
+
requestId: bare.readU32(bc),
|
|
1930
|
+
data: readSqliteCommitStageRequest(bc)
|
|
1931
|
+
};
|
|
1932
|
+
}
|
|
1933
|
+
function writeToRivetSqliteCommitStageRequest(bc, x) {
|
|
1934
|
+
bare.writeU32(bc, x.requestId);
|
|
1935
|
+
writeSqliteCommitStageRequest(bc, x.data);
|
|
1936
|
+
}
|
|
1937
|
+
function readToRivetSqliteCommitFinalizeRequest(bc) {
|
|
1938
|
+
return {
|
|
1939
|
+
requestId: bare.readU32(bc),
|
|
1940
|
+
data: readSqliteCommitFinalizeRequest(bc)
|
|
1941
|
+
};
|
|
1942
|
+
}
|
|
1943
|
+
function writeToRivetSqliteCommitFinalizeRequest(bc, x) {
|
|
1944
|
+
bare.writeU32(bc, x.requestId);
|
|
1945
|
+
writeSqliteCommitFinalizeRequest(bc, x.data);
|
|
1946
|
+
}
|
|
1947
|
+
function readToRivetSqlitePersistPreloadHintsRequest(bc) {
|
|
1948
|
+
return {
|
|
1949
|
+
requestId: bare.readU32(bc),
|
|
1950
|
+
data: readSqlitePersistPreloadHintsRequest(bc)
|
|
1951
|
+
};
|
|
1952
|
+
}
|
|
1953
|
+
function writeToRivetSqlitePersistPreloadHintsRequest(bc, x) {
|
|
1954
|
+
bare.writeU32(bc, x.requestId);
|
|
1955
|
+
writeSqlitePersistPreloadHintsRequest(bc, x.data);
|
|
1956
|
+
}
|
|
1459
1957
|
function readToRivet(bc) {
|
|
1460
1958
|
const offset = bc.offset;
|
|
1461
1959
|
const tag = bare.readU8(bc);
|
|
@@ -1477,7 +1975,17 @@ function readToRivet(bc) {
|
|
|
1477
1975
|
case 7:
|
|
1478
1976
|
return { tag: "ToRivetSqliteGetPagesRequest", val: readToRivetSqliteGetPagesRequest(bc) };
|
|
1479
1977
|
case 8:
|
|
1978
|
+
return { tag: "ToRivetSqliteGetPageRangeRequest", val: readToRivetSqliteGetPageRangeRequest(bc) };
|
|
1979
|
+
case 9:
|
|
1480
1980
|
return { tag: "ToRivetSqliteCommitRequest", val: readToRivetSqliteCommitRequest(bc) };
|
|
1981
|
+
case 10:
|
|
1982
|
+
return { tag: "ToRivetSqliteCommitStageBeginRequest", val: readToRivetSqliteCommitStageBeginRequest(bc) };
|
|
1983
|
+
case 11:
|
|
1984
|
+
return { tag: "ToRivetSqliteCommitStageRequest", val: readToRivetSqliteCommitStageRequest(bc) };
|
|
1985
|
+
case 12:
|
|
1986
|
+
return { tag: "ToRivetSqliteCommitFinalizeRequest", val: readToRivetSqliteCommitFinalizeRequest(bc) };
|
|
1987
|
+
case 13:
|
|
1988
|
+
return { tag: "ToRivetSqlitePersistPreloadHintsRequest", val: readToRivetSqlitePersistPreloadHintsRequest(bc) };
|
|
1481
1989
|
default: {
|
|
1482
1990
|
bc.offset = offset;
|
|
1483
1991
|
throw new bare.BareError(offset, "invalid tag");
|
|
@@ -1525,15 +2033,40 @@ function writeToRivet(bc, x) {
|
|
|
1525
2033
|
writeToRivetSqliteGetPagesRequest(bc, x.val);
|
|
1526
2034
|
break;
|
|
1527
2035
|
}
|
|
1528
|
-
case "
|
|
2036
|
+
case "ToRivetSqliteGetPageRangeRequest": {
|
|
1529
2037
|
bare.writeU8(bc, 8);
|
|
2038
|
+
writeToRivetSqliteGetPageRangeRequest(bc, x.val);
|
|
2039
|
+
break;
|
|
2040
|
+
}
|
|
2041
|
+
case "ToRivetSqliteCommitRequest": {
|
|
2042
|
+
bare.writeU8(bc, 9);
|
|
1530
2043
|
writeToRivetSqliteCommitRequest(bc, x.val);
|
|
1531
2044
|
break;
|
|
1532
2045
|
}
|
|
2046
|
+
case "ToRivetSqliteCommitStageBeginRequest": {
|
|
2047
|
+
bare.writeU8(bc, 10);
|
|
2048
|
+
writeToRivetSqliteCommitStageBeginRequest(bc, x.val);
|
|
2049
|
+
break;
|
|
2050
|
+
}
|
|
2051
|
+
case "ToRivetSqliteCommitStageRequest": {
|
|
2052
|
+
bare.writeU8(bc, 11);
|
|
2053
|
+
writeToRivetSqliteCommitStageRequest(bc, x.val);
|
|
2054
|
+
break;
|
|
2055
|
+
}
|
|
2056
|
+
case "ToRivetSqliteCommitFinalizeRequest": {
|
|
2057
|
+
bare.writeU8(bc, 12);
|
|
2058
|
+
writeToRivetSqliteCommitFinalizeRequest(bc, x.val);
|
|
2059
|
+
break;
|
|
2060
|
+
}
|
|
2061
|
+
case "ToRivetSqlitePersistPreloadHintsRequest": {
|
|
2062
|
+
bare.writeU8(bc, 13);
|
|
2063
|
+
writeToRivetSqlitePersistPreloadHintsRequest(bc, x.val);
|
|
2064
|
+
break;
|
|
2065
|
+
}
|
|
1533
2066
|
}
|
|
1534
2067
|
}
|
|
1535
2068
|
function encodeToRivet(x, config) {
|
|
1536
|
-
const fullConfig = config != null ? bare.Config(config) :
|
|
2069
|
+
const fullConfig = config != null ? bare.Config(config) : DEFAULT_CONFIG;
|
|
1537
2070
|
const bc = new bare.ByteCursor(
|
|
1538
2071
|
new Uint8Array(fullConfig.initialBufferLength),
|
|
1539
2072
|
fullConfig
|
|
@@ -1542,7 +2075,7 @@ function encodeToRivet(x, config) {
|
|
|
1542
2075
|
return new Uint8Array(bc.view.buffer, bc.view.byteOffset, bc.offset);
|
|
1543
2076
|
}
|
|
1544
2077
|
function decodeToRivet(bytes) {
|
|
1545
|
-
const bc = new bare.ByteCursor(bytes,
|
|
2078
|
+
const bc = new bare.ByteCursor(bytes, DEFAULT_CONFIG);
|
|
1546
2079
|
const result = readToRivet(bc);
|
|
1547
2080
|
if (bc.offset < bc.view.byteLength) {
|
|
1548
2081
|
throw new bare.BareError(bc.offset, "remaining bytes");
|
|
@@ -1588,11 +2121,11 @@ function writeToEnvoyCommands(bc, x) {
|
|
|
1588
2121
|
}
|
|
1589
2122
|
function readToEnvoyAckEvents(bc) {
|
|
1590
2123
|
return {
|
|
1591
|
-
lastEventCheckpoints:
|
|
2124
|
+
lastEventCheckpoints: read22(bc)
|
|
1592
2125
|
};
|
|
1593
2126
|
}
|
|
1594
2127
|
function writeToEnvoyAckEvents(bc, x) {
|
|
1595
|
-
|
|
2128
|
+
write22(bc, x.lastEventCheckpoints);
|
|
1596
2129
|
}
|
|
1597
2130
|
function readToEnvoyKvResponse(bc) {
|
|
1598
2131
|
return {
|
|
@@ -1614,6 +2147,16 @@ function writeToEnvoySqliteGetPagesResponse(bc, x) {
|
|
|
1614
2147
|
bare.writeU32(bc, x.requestId);
|
|
1615
2148
|
writeSqliteGetPagesResponse(bc, x.data);
|
|
1616
2149
|
}
|
|
2150
|
+
function readToEnvoySqliteGetPageRangeResponse(bc) {
|
|
2151
|
+
return {
|
|
2152
|
+
requestId: bare.readU32(bc),
|
|
2153
|
+
data: readSqliteGetPageRangeResponse(bc)
|
|
2154
|
+
};
|
|
2155
|
+
}
|
|
2156
|
+
function writeToEnvoySqliteGetPageRangeResponse(bc, x) {
|
|
2157
|
+
bare.writeU32(bc, x.requestId);
|
|
2158
|
+
writeSqliteGetPageRangeResponse(bc, x.data);
|
|
2159
|
+
}
|
|
1617
2160
|
function readToEnvoySqliteCommitResponse(bc) {
|
|
1618
2161
|
return {
|
|
1619
2162
|
requestId: bare.readU32(bc),
|
|
@@ -1624,6 +2167,46 @@ function writeToEnvoySqliteCommitResponse(bc, x) {
|
|
|
1624
2167
|
bare.writeU32(bc, x.requestId);
|
|
1625
2168
|
writeSqliteCommitResponse(bc, x.data);
|
|
1626
2169
|
}
|
|
2170
|
+
function readToEnvoySqliteCommitStageBeginResponse(bc) {
|
|
2171
|
+
return {
|
|
2172
|
+
requestId: bare.readU32(bc),
|
|
2173
|
+
data: readSqliteCommitStageBeginResponse(bc)
|
|
2174
|
+
};
|
|
2175
|
+
}
|
|
2176
|
+
function writeToEnvoySqliteCommitStageBeginResponse(bc, x) {
|
|
2177
|
+
bare.writeU32(bc, x.requestId);
|
|
2178
|
+
writeSqliteCommitStageBeginResponse(bc, x.data);
|
|
2179
|
+
}
|
|
2180
|
+
function readToEnvoySqliteCommitStageResponse(bc) {
|
|
2181
|
+
return {
|
|
2182
|
+
requestId: bare.readU32(bc),
|
|
2183
|
+
data: readSqliteCommitStageResponse(bc)
|
|
2184
|
+
};
|
|
2185
|
+
}
|
|
2186
|
+
function writeToEnvoySqliteCommitStageResponse(bc, x) {
|
|
2187
|
+
bare.writeU32(bc, x.requestId);
|
|
2188
|
+
writeSqliteCommitStageResponse(bc, x.data);
|
|
2189
|
+
}
|
|
2190
|
+
function readToEnvoySqliteCommitFinalizeResponse(bc) {
|
|
2191
|
+
return {
|
|
2192
|
+
requestId: bare.readU32(bc),
|
|
2193
|
+
data: readSqliteCommitFinalizeResponse(bc)
|
|
2194
|
+
};
|
|
2195
|
+
}
|
|
2196
|
+
function writeToEnvoySqliteCommitFinalizeResponse(bc, x) {
|
|
2197
|
+
bare.writeU32(bc, x.requestId);
|
|
2198
|
+
writeSqliteCommitFinalizeResponse(bc, x.data);
|
|
2199
|
+
}
|
|
2200
|
+
function readToEnvoySqlitePersistPreloadHintsResponse(bc) {
|
|
2201
|
+
return {
|
|
2202
|
+
requestId: bare.readU32(bc),
|
|
2203
|
+
data: readSqlitePersistPreloadHintsResponse(bc)
|
|
2204
|
+
};
|
|
2205
|
+
}
|
|
2206
|
+
function writeToEnvoySqlitePersistPreloadHintsResponse(bc, x) {
|
|
2207
|
+
bare.writeU32(bc, x.requestId);
|
|
2208
|
+
writeSqlitePersistPreloadHintsResponse(bc, x.data);
|
|
2209
|
+
}
|
|
1627
2210
|
function readToEnvoy(bc) {
|
|
1628
2211
|
const offset = bc.offset;
|
|
1629
2212
|
const tag = bare.readU8(bc);
|
|
@@ -1643,7 +2226,17 @@ function readToEnvoy(bc) {
|
|
|
1643
2226
|
case 6:
|
|
1644
2227
|
return { tag: "ToEnvoySqliteGetPagesResponse", val: readToEnvoySqliteGetPagesResponse(bc) };
|
|
1645
2228
|
case 7:
|
|
2229
|
+
return { tag: "ToEnvoySqliteGetPageRangeResponse", val: readToEnvoySqliteGetPageRangeResponse(bc) };
|
|
2230
|
+
case 8:
|
|
1646
2231
|
return { tag: "ToEnvoySqliteCommitResponse", val: readToEnvoySqliteCommitResponse(bc) };
|
|
2232
|
+
case 9:
|
|
2233
|
+
return { tag: "ToEnvoySqliteCommitStageBeginResponse", val: readToEnvoySqliteCommitStageBeginResponse(bc) };
|
|
2234
|
+
case 10:
|
|
2235
|
+
return { tag: "ToEnvoySqliteCommitStageResponse", val: readToEnvoySqliteCommitStageResponse(bc) };
|
|
2236
|
+
case 11:
|
|
2237
|
+
return { tag: "ToEnvoySqliteCommitFinalizeResponse", val: readToEnvoySqliteCommitFinalizeResponse(bc) };
|
|
2238
|
+
case 12:
|
|
2239
|
+
return { tag: "ToEnvoySqlitePersistPreloadHintsResponse", val: readToEnvoySqlitePersistPreloadHintsResponse(bc) };
|
|
1647
2240
|
default: {
|
|
1648
2241
|
bc.offset = offset;
|
|
1649
2242
|
throw new bare.BareError(offset, "invalid tag");
|
|
@@ -1687,15 +2280,40 @@ function writeToEnvoy(bc, x) {
|
|
|
1687
2280
|
writeToEnvoySqliteGetPagesResponse(bc, x.val);
|
|
1688
2281
|
break;
|
|
1689
2282
|
}
|
|
1690
|
-
case "
|
|
2283
|
+
case "ToEnvoySqliteGetPageRangeResponse": {
|
|
1691
2284
|
bare.writeU8(bc, 7);
|
|
2285
|
+
writeToEnvoySqliteGetPageRangeResponse(bc, x.val);
|
|
2286
|
+
break;
|
|
2287
|
+
}
|
|
2288
|
+
case "ToEnvoySqliteCommitResponse": {
|
|
2289
|
+
bare.writeU8(bc, 8);
|
|
1692
2290
|
writeToEnvoySqliteCommitResponse(bc, x.val);
|
|
1693
2291
|
break;
|
|
1694
2292
|
}
|
|
2293
|
+
case "ToEnvoySqliteCommitStageBeginResponse": {
|
|
2294
|
+
bare.writeU8(bc, 9);
|
|
2295
|
+
writeToEnvoySqliteCommitStageBeginResponse(bc, x.val);
|
|
2296
|
+
break;
|
|
2297
|
+
}
|
|
2298
|
+
case "ToEnvoySqliteCommitStageResponse": {
|
|
2299
|
+
bare.writeU8(bc, 10);
|
|
2300
|
+
writeToEnvoySqliteCommitStageResponse(bc, x.val);
|
|
2301
|
+
break;
|
|
2302
|
+
}
|
|
2303
|
+
case "ToEnvoySqliteCommitFinalizeResponse": {
|
|
2304
|
+
bare.writeU8(bc, 11);
|
|
2305
|
+
writeToEnvoySqliteCommitFinalizeResponse(bc, x.val);
|
|
2306
|
+
break;
|
|
2307
|
+
}
|
|
2308
|
+
case "ToEnvoySqlitePersistPreloadHintsResponse": {
|
|
2309
|
+
bare.writeU8(bc, 12);
|
|
2310
|
+
writeToEnvoySqlitePersistPreloadHintsResponse(bc, x.val);
|
|
2311
|
+
break;
|
|
2312
|
+
}
|
|
1695
2313
|
}
|
|
1696
2314
|
}
|
|
1697
2315
|
function encodeToEnvoy(x, config) {
|
|
1698
|
-
const fullConfig = config != null ? bare.Config(config) :
|
|
2316
|
+
const fullConfig = config != null ? bare.Config(config) : DEFAULT_CONFIG;
|
|
1699
2317
|
const bc = new bare.ByteCursor(
|
|
1700
2318
|
new Uint8Array(fullConfig.initialBufferLength),
|
|
1701
2319
|
fullConfig
|
|
@@ -1704,7 +2322,7 @@ function encodeToEnvoy(x, config) {
|
|
|
1704
2322
|
return new Uint8Array(bc.view.buffer, bc.view.byteOffset, bc.offset);
|
|
1705
2323
|
}
|
|
1706
2324
|
function decodeToEnvoy(bytes) {
|
|
1707
|
-
const bc = new bare.ByteCursor(bytes,
|
|
2325
|
+
const bc = new bare.ByteCursor(bytes, DEFAULT_CONFIG);
|
|
1708
2326
|
const result = readToEnvoy(bc);
|
|
1709
2327
|
if (bc.offset < bc.view.byteLength) {
|
|
1710
2328
|
throw new bare.BareError(bc.offset, "remaining bytes");
|
|
@@ -1772,7 +2390,7 @@ function writeToEnvoyConn(bc, x) {
|
|
|
1772
2390
|
}
|
|
1773
2391
|
}
|
|
1774
2392
|
function encodeToEnvoyConn(x, config) {
|
|
1775
|
-
const fullConfig = config != null ? bare.Config(config) :
|
|
2393
|
+
const fullConfig = config != null ? bare.Config(config) : DEFAULT_CONFIG;
|
|
1776
2394
|
const bc = new bare.ByteCursor(
|
|
1777
2395
|
new Uint8Array(fullConfig.initialBufferLength),
|
|
1778
2396
|
fullConfig
|
|
@@ -1781,7 +2399,7 @@ function encodeToEnvoyConn(x, config) {
|
|
|
1781
2399
|
return new Uint8Array(bc.view.buffer, bc.view.byteOffset, bc.offset);
|
|
1782
2400
|
}
|
|
1783
2401
|
function decodeToEnvoyConn(bytes) {
|
|
1784
|
-
const bc = new bare.ByteCursor(bytes,
|
|
2402
|
+
const bc = new bare.ByteCursor(bytes, DEFAULT_CONFIG);
|
|
1785
2403
|
const result = readToEnvoyConn(bc);
|
|
1786
2404
|
if (bc.offset < bc.view.byteLength) {
|
|
1787
2405
|
throw new bare.BareError(bc.offset, "remaining bytes");
|
|
@@ -1827,7 +2445,7 @@ function writeToGateway(bc, x) {
|
|
|
1827
2445
|
}
|
|
1828
2446
|
}
|
|
1829
2447
|
function encodeToGateway(x, config) {
|
|
1830
|
-
const fullConfig = config != null ? bare.Config(config) :
|
|
2448
|
+
const fullConfig = config != null ? bare.Config(config) : DEFAULT_CONFIG;
|
|
1831
2449
|
const bc = new bare.ByteCursor(
|
|
1832
2450
|
new Uint8Array(fullConfig.initialBufferLength),
|
|
1833
2451
|
fullConfig
|
|
@@ -1836,7 +2454,7 @@ function encodeToGateway(x, config) {
|
|
|
1836
2454
|
return new Uint8Array(bc.view.buffer, bc.view.byteOffset, bc.offset);
|
|
1837
2455
|
}
|
|
1838
2456
|
function decodeToGateway(bytes) {
|
|
1839
|
-
const bc = new bare.ByteCursor(bytes,
|
|
2457
|
+
const bc = new bare.ByteCursor(bytes, DEFAULT_CONFIG);
|
|
1840
2458
|
const result = readToGateway(bc);
|
|
1841
2459
|
if (bc.offset < bc.view.byteLength) {
|
|
1842
2460
|
throw new bare.BareError(bc.offset, "remaining bytes");
|
|
@@ -1879,7 +2497,7 @@ function writeToOutbound(bc, x) {
|
|
|
1879
2497
|
}
|
|
1880
2498
|
}
|
|
1881
2499
|
function encodeToOutbound(x, config) {
|
|
1882
|
-
const fullConfig = config != null ? bare.Config(config) :
|
|
2500
|
+
const fullConfig = config != null ? bare.Config(config) : DEFAULT_CONFIG;
|
|
1883
2501
|
const bc = new bare.ByteCursor(
|
|
1884
2502
|
new Uint8Array(fullConfig.initialBufferLength),
|
|
1885
2503
|
fullConfig
|
|
@@ -1888,7 +2506,7 @@ function encodeToOutbound(x, config) {
|
|
|
1888
2506
|
return new Uint8Array(bc.view.buffer, bc.view.byteOffset, bc.offset);
|
|
1889
2507
|
}
|
|
1890
2508
|
function decodeToOutbound(bytes) {
|
|
1891
|
-
const bc = new bare.ByteCursor(bytes,
|
|
2509
|
+
const bc = new bare.ByteCursor(bytes, DEFAULT_CONFIG);
|
|
1892
2510
|
const result = readToOutbound(bc);
|
|
1893
2511
|
if (bc.offset < bc.view.byteLength) {
|
|
1894
2512
|
throw new bare.BareError(bc.offset, "remaining bytes");
|
|
@@ -1957,16 +2575,41 @@ export {
|
|
|
1957
2575
|
readPreloadedKvEntry,
|
|
1958
2576
|
readProtocolMetadata,
|
|
1959
2577
|
readRequestId,
|
|
2578
|
+
readSqliteCommitFinalizeOk,
|
|
2579
|
+
readSqliteCommitFinalizeRequest,
|
|
2580
|
+
readSqliteCommitFinalizeResponse,
|
|
2581
|
+
readSqliteCommitOk,
|
|
1960
2582
|
readSqliteCommitRequest,
|
|
1961
2583
|
readSqliteCommitResponse,
|
|
2584
|
+
readSqliteCommitStageBeginOk,
|
|
2585
|
+
readSqliteCommitStageBeginRequest,
|
|
2586
|
+
readSqliteCommitStageBeginResponse,
|
|
2587
|
+
readSqliteCommitStageOk,
|
|
2588
|
+
readSqliteCommitStageRequest,
|
|
2589
|
+
readSqliteCommitStageResponse,
|
|
2590
|
+
readSqliteCommitTooLarge,
|
|
1962
2591
|
readSqliteDirtyPage,
|
|
1963
2592
|
readSqliteErrorResponse,
|
|
2593
|
+
readSqliteFenceMismatch,
|
|
1964
2594
|
readSqliteFetchedPage,
|
|
2595
|
+
readSqliteGeneration,
|
|
2596
|
+
readSqliteGetPageRangeOk,
|
|
2597
|
+
readSqliteGetPageRangeRequest,
|
|
2598
|
+
readSqliteGetPageRangeResponse,
|
|
1965
2599
|
readSqliteGetPagesOk,
|
|
1966
2600
|
readSqliteGetPagesRequest,
|
|
1967
2601
|
readSqliteGetPagesResponse,
|
|
2602
|
+
readSqliteMeta,
|
|
1968
2603
|
readSqlitePageBytes,
|
|
2604
|
+
readSqlitePersistPreloadHintsRequest,
|
|
2605
|
+
readSqlitePersistPreloadHintsResponse,
|
|
1969
2606
|
readSqlitePgno,
|
|
2607
|
+
readSqlitePreloadHintRange,
|
|
2608
|
+
readSqlitePreloadHints,
|
|
2609
|
+
readSqliteStageId,
|
|
2610
|
+
readSqliteStageNotFound,
|
|
2611
|
+
readSqliteStartupData,
|
|
2612
|
+
readSqliteTxid,
|
|
1970
2613
|
readStopActorReason,
|
|
1971
2614
|
readStopCode,
|
|
1972
2615
|
readToEnvoy,
|
|
@@ -1979,8 +2622,13 @@ export {
|
|
|
1979
2622
|
readToEnvoyPing,
|
|
1980
2623
|
readToEnvoyRequestChunk,
|
|
1981
2624
|
readToEnvoyRequestStart,
|
|
2625
|
+
readToEnvoySqliteCommitFinalizeResponse,
|
|
1982
2626
|
readToEnvoySqliteCommitResponse,
|
|
2627
|
+
readToEnvoySqliteCommitStageBeginResponse,
|
|
2628
|
+
readToEnvoySqliteCommitStageResponse,
|
|
2629
|
+
readToEnvoySqliteGetPageRangeResponse,
|
|
1983
2630
|
readToEnvoySqliteGetPagesResponse,
|
|
2631
|
+
readToEnvoySqlitePersistPreloadHintsResponse,
|
|
1984
2632
|
readToEnvoyTunnelMessage,
|
|
1985
2633
|
readToEnvoyTunnelMessageKind,
|
|
1986
2634
|
readToEnvoyWebSocketClose,
|
|
@@ -1998,8 +2646,13 @@ export {
|
|
|
1998
2646
|
readToRivetPong,
|
|
1999
2647
|
readToRivetResponseChunk,
|
|
2000
2648
|
readToRivetResponseStart,
|
|
2649
|
+
readToRivetSqliteCommitFinalizeRequest,
|
|
2001
2650
|
readToRivetSqliteCommitRequest,
|
|
2651
|
+
readToRivetSqliteCommitStageBeginRequest,
|
|
2652
|
+
readToRivetSqliteCommitStageRequest,
|
|
2653
|
+
readToRivetSqliteGetPageRangeRequest,
|
|
2002
2654
|
readToRivetSqliteGetPagesRequest,
|
|
2655
|
+
readToRivetSqlitePersistPreloadHintsRequest,
|
|
2003
2656
|
readToRivetTunnelMessage,
|
|
2004
2657
|
readToRivetTunnelMessageKind,
|
|
2005
2658
|
readToRivetWebSocketClose,
|
|
@@ -2048,16 +2701,41 @@ export {
|
|
|
2048
2701
|
writePreloadedKvEntry,
|
|
2049
2702
|
writeProtocolMetadata,
|
|
2050
2703
|
writeRequestId,
|
|
2704
|
+
writeSqliteCommitFinalizeOk,
|
|
2705
|
+
writeSqliteCommitFinalizeRequest,
|
|
2706
|
+
writeSqliteCommitFinalizeResponse,
|
|
2707
|
+
writeSqliteCommitOk,
|
|
2051
2708
|
writeSqliteCommitRequest,
|
|
2052
2709
|
writeSqliteCommitResponse,
|
|
2710
|
+
writeSqliteCommitStageBeginOk,
|
|
2711
|
+
writeSqliteCommitStageBeginRequest,
|
|
2712
|
+
writeSqliteCommitStageBeginResponse,
|
|
2713
|
+
writeSqliteCommitStageOk,
|
|
2714
|
+
writeSqliteCommitStageRequest,
|
|
2715
|
+
writeSqliteCommitStageResponse,
|
|
2716
|
+
writeSqliteCommitTooLarge,
|
|
2053
2717
|
writeSqliteDirtyPage,
|
|
2054
2718
|
writeSqliteErrorResponse,
|
|
2719
|
+
writeSqliteFenceMismatch,
|
|
2055
2720
|
writeSqliteFetchedPage,
|
|
2721
|
+
writeSqliteGeneration,
|
|
2722
|
+
writeSqliteGetPageRangeOk,
|
|
2723
|
+
writeSqliteGetPageRangeRequest,
|
|
2724
|
+
writeSqliteGetPageRangeResponse,
|
|
2056
2725
|
writeSqliteGetPagesOk,
|
|
2057
2726
|
writeSqliteGetPagesRequest,
|
|
2058
2727
|
writeSqliteGetPagesResponse,
|
|
2728
|
+
writeSqliteMeta,
|
|
2059
2729
|
writeSqlitePageBytes,
|
|
2730
|
+
writeSqlitePersistPreloadHintsRequest,
|
|
2731
|
+
writeSqlitePersistPreloadHintsResponse,
|
|
2060
2732
|
writeSqlitePgno,
|
|
2733
|
+
writeSqlitePreloadHintRange,
|
|
2734
|
+
writeSqlitePreloadHints,
|
|
2735
|
+
writeSqliteStageId,
|
|
2736
|
+
writeSqliteStageNotFound,
|
|
2737
|
+
writeSqliteStartupData,
|
|
2738
|
+
writeSqliteTxid,
|
|
2061
2739
|
writeStopActorReason,
|
|
2062
2740
|
writeStopCode,
|
|
2063
2741
|
writeToEnvoy,
|
|
@@ -2070,8 +2748,13 @@ export {
|
|
|
2070
2748
|
writeToEnvoyPing,
|
|
2071
2749
|
writeToEnvoyRequestChunk,
|
|
2072
2750
|
writeToEnvoyRequestStart,
|
|
2751
|
+
writeToEnvoySqliteCommitFinalizeResponse,
|
|
2073
2752
|
writeToEnvoySqliteCommitResponse,
|
|
2753
|
+
writeToEnvoySqliteCommitStageBeginResponse,
|
|
2754
|
+
writeToEnvoySqliteCommitStageResponse,
|
|
2755
|
+
writeToEnvoySqliteGetPageRangeResponse,
|
|
2074
2756
|
writeToEnvoySqliteGetPagesResponse,
|
|
2757
|
+
writeToEnvoySqlitePersistPreloadHintsResponse,
|
|
2075
2758
|
writeToEnvoyTunnelMessage,
|
|
2076
2759
|
writeToEnvoyTunnelMessageKind,
|
|
2077
2760
|
writeToEnvoyWebSocketClose,
|
|
@@ -2089,8 +2772,13 @@ export {
|
|
|
2089
2772
|
writeToRivetPong,
|
|
2090
2773
|
writeToRivetResponseChunk,
|
|
2091
2774
|
writeToRivetResponseStart,
|
|
2775
|
+
writeToRivetSqliteCommitFinalizeRequest,
|
|
2092
2776
|
writeToRivetSqliteCommitRequest,
|
|
2777
|
+
writeToRivetSqliteCommitStageBeginRequest,
|
|
2778
|
+
writeToRivetSqliteCommitStageRequest,
|
|
2779
|
+
writeToRivetSqliteGetPageRangeRequest,
|
|
2093
2780
|
writeToRivetSqliteGetPagesRequest,
|
|
2781
|
+
writeToRivetSqlitePersistPreloadHintsRequest,
|
|
2094
2782
|
writeToRivetTunnelMessage,
|
|
2095
2783
|
writeToRivetTunnelMessageKind,
|
|
2096
2784
|
writeToRivetWebSocketClose,
|