@rivetkit/engine-envoy-protocol 0.0.0-pr.4673.028a93e → 0.0.0-pr.4673.39f8e28
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 +256 -2
- package/dist/index.js +716 -67
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -366,6 +366,440 @@ function writeKvResponseData(bc, x) {
|
|
|
366
366
|
}
|
|
367
367
|
}
|
|
368
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
|
+
}
|
|
381
|
+
function readSqlitePgno(bc) {
|
|
382
|
+
return bare.readU32(bc);
|
|
383
|
+
}
|
|
384
|
+
function writeSqlitePgno(bc, x) {
|
|
385
|
+
bare.writeU32(bc, x);
|
|
386
|
+
}
|
|
387
|
+
function readSqliteStageId(bc) {
|
|
388
|
+
return bare.readU64(bc);
|
|
389
|
+
}
|
|
390
|
+
function writeSqliteStageId(bc, x) {
|
|
391
|
+
bare.writeU64(bc, x);
|
|
392
|
+
}
|
|
393
|
+
function readSqlitePageBytes(bc) {
|
|
394
|
+
return bare.readData(bc);
|
|
395
|
+
}
|
|
396
|
+
function writeSqlitePageBytes(bc, x) {
|
|
397
|
+
bare.writeData(bc, x);
|
|
398
|
+
}
|
|
399
|
+
function readSqliteMeta(bc) {
|
|
400
|
+
return {
|
|
401
|
+
schemaVersion: bare.readU32(bc),
|
|
402
|
+
generation: readSqliteGeneration(bc),
|
|
403
|
+
headTxid: readSqliteTxid(bc),
|
|
404
|
+
materializedTxid: readSqliteTxid(bc),
|
|
405
|
+
dbSizePages: bare.readU32(bc),
|
|
406
|
+
pageSize: bare.readU32(bc),
|
|
407
|
+
creationTsMs: bare.readI64(bc),
|
|
408
|
+
maxDeltaBytes: bare.readU64(bc)
|
|
409
|
+
};
|
|
410
|
+
}
|
|
411
|
+
function writeSqliteMeta(bc, x) {
|
|
412
|
+
bare.writeU32(bc, x.schemaVersion);
|
|
413
|
+
writeSqliteGeneration(bc, x.generation);
|
|
414
|
+
writeSqliteTxid(bc, x.headTxid);
|
|
415
|
+
writeSqliteTxid(bc, x.materializedTxid);
|
|
416
|
+
bare.writeU32(bc, x.dbSizePages);
|
|
417
|
+
bare.writeU32(bc, x.pageSize);
|
|
418
|
+
bare.writeI64(bc, x.creationTsMs);
|
|
419
|
+
bare.writeU64(bc, x.maxDeltaBytes);
|
|
420
|
+
}
|
|
421
|
+
function readSqliteFenceMismatch(bc) {
|
|
422
|
+
return {
|
|
423
|
+
actualMeta: readSqliteMeta(bc),
|
|
424
|
+
reason: bare.readString(bc)
|
|
425
|
+
};
|
|
426
|
+
}
|
|
427
|
+
function writeSqliteFenceMismatch(bc, x) {
|
|
428
|
+
writeSqliteMeta(bc, x.actualMeta);
|
|
429
|
+
bare.writeString(bc, x.reason);
|
|
430
|
+
}
|
|
431
|
+
function readSqliteDirtyPage(bc) {
|
|
432
|
+
return {
|
|
433
|
+
pgno: readSqlitePgno(bc),
|
|
434
|
+
bytes: readSqlitePageBytes(bc)
|
|
435
|
+
};
|
|
436
|
+
}
|
|
437
|
+
function writeSqliteDirtyPage(bc, x) {
|
|
438
|
+
writeSqlitePgno(bc, x.pgno);
|
|
439
|
+
writeSqlitePageBytes(bc, x.bytes);
|
|
440
|
+
}
|
|
441
|
+
function read5(bc) {
|
|
442
|
+
return bare.readBool(bc) ? readSqlitePageBytes(bc) : null;
|
|
443
|
+
}
|
|
444
|
+
function write5(bc, x) {
|
|
445
|
+
bare.writeBool(bc, x != null);
|
|
446
|
+
if (x != null) {
|
|
447
|
+
writeSqlitePageBytes(bc, x);
|
|
448
|
+
}
|
|
449
|
+
}
|
|
450
|
+
function readSqliteFetchedPage(bc) {
|
|
451
|
+
return {
|
|
452
|
+
pgno: readSqlitePgno(bc),
|
|
453
|
+
bytes: read5(bc)
|
|
454
|
+
};
|
|
455
|
+
}
|
|
456
|
+
function writeSqliteFetchedPage(bc, x) {
|
|
457
|
+
writeSqlitePgno(bc, x.pgno);
|
|
458
|
+
write5(bc, x.bytes);
|
|
459
|
+
}
|
|
460
|
+
function read6(bc) {
|
|
461
|
+
const len = bare.readUintSafe(bc);
|
|
462
|
+
if (len === 0) {
|
|
463
|
+
return [];
|
|
464
|
+
}
|
|
465
|
+
const result = [readSqlitePgno(bc)];
|
|
466
|
+
for (let i = 1; i < len; i++) {
|
|
467
|
+
result[i] = readSqlitePgno(bc);
|
|
468
|
+
}
|
|
469
|
+
return result;
|
|
470
|
+
}
|
|
471
|
+
function write6(bc, x) {
|
|
472
|
+
bare.writeUintSafe(bc, x.length);
|
|
473
|
+
for (let i = 0; i < x.length; i++) {
|
|
474
|
+
writeSqlitePgno(bc, x[i]);
|
|
475
|
+
}
|
|
476
|
+
}
|
|
477
|
+
function readSqliteGetPagesRequest(bc) {
|
|
478
|
+
return {
|
|
479
|
+
actorId: readId(bc),
|
|
480
|
+
generation: readSqliteGeneration(bc),
|
|
481
|
+
pgnos: read6(bc)
|
|
482
|
+
};
|
|
483
|
+
}
|
|
484
|
+
function writeSqliteGetPagesRequest(bc, x) {
|
|
485
|
+
writeId(bc, x.actorId);
|
|
486
|
+
writeSqliteGeneration(bc, x.generation);
|
|
487
|
+
write6(bc, x.pgnos);
|
|
488
|
+
}
|
|
489
|
+
function read7(bc) {
|
|
490
|
+
const len = bare.readUintSafe(bc);
|
|
491
|
+
if (len === 0) {
|
|
492
|
+
return [];
|
|
493
|
+
}
|
|
494
|
+
const result = [readSqliteFetchedPage(bc)];
|
|
495
|
+
for (let i = 1; i < len; i++) {
|
|
496
|
+
result[i] = readSqliteFetchedPage(bc);
|
|
497
|
+
}
|
|
498
|
+
return result;
|
|
499
|
+
}
|
|
500
|
+
function write7(bc, x) {
|
|
501
|
+
bare.writeUintSafe(bc, x.length);
|
|
502
|
+
for (let i = 0; i < x.length; i++) {
|
|
503
|
+
writeSqliteFetchedPage(bc, x[i]);
|
|
504
|
+
}
|
|
505
|
+
}
|
|
506
|
+
function readSqliteGetPagesOk(bc) {
|
|
507
|
+
return {
|
|
508
|
+
pages: read7(bc),
|
|
509
|
+
meta: readSqliteMeta(bc)
|
|
510
|
+
};
|
|
511
|
+
}
|
|
512
|
+
function writeSqliteGetPagesOk(bc, x) {
|
|
513
|
+
write7(bc, x.pages);
|
|
514
|
+
writeSqliteMeta(bc, x.meta);
|
|
515
|
+
}
|
|
516
|
+
function readSqliteErrorResponse(bc) {
|
|
517
|
+
return {
|
|
518
|
+
message: bare.readString(bc)
|
|
519
|
+
};
|
|
520
|
+
}
|
|
521
|
+
function writeSqliteErrorResponse(bc, x) {
|
|
522
|
+
bare.writeString(bc, x.message);
|
|
523
|
+
}
|
|
524
|
+
function readSqliteGetPagesResponse(bc) {
|
|
525
|
+
const offset = bc.offset;
|
|
526
|
+
const tag = bare.readU8(bc);
|
|
527
|
+
switch (tag) {
|
|
528
|
+
case 0:
|
|
529
|
+
return { tag: "SqliteGetPagesOk", val: readSqliteGetPagesOk(bc) };
|
|
530
|
+
case 1:
|
|
531
|
+
return { tag: "SqliteFenceMismatch", val: readSqliteFenceMismatch(bc) };
|
|
532
|
+
case 2:
|
|
533
|
+
return { tag: "SqliteErrorResponse", val: readSqliteErrorResponse(bc) };
|
|
534
|
+
default: {
|
|
535
|
+
bc.offset = offset;
|
|
536
|
+
throw new bare.BareError(offset, "invalid tag");
|
|
537
|
+
}
|
|
538
|
+
}
|
|
539
|
+
}
|
|
540
|
+
function writeSqliteGetPagesResponse(bc, x) {
|
|
541
|
+
switch (x.tag) {
|
|
542
|
+
case "SqliteGetPagesOk": {
|
|
543
|
+
bare.writeU8(bc, 0);
|
|
544
|
+
writeSqliteGetPagesOk(bc, x.val);
|
|
545
|
+
break;
|
|
546
|
+
}
|
|
547
|
+
case "SqliteFenceMismatch": {
|
|
548
|
+
bare.writeU8(bc, 1);
|
|
549
|
+
writeSqliteFenceMismatch(bc, x.val);
|
|
550
|
+
break;
|
|
551
|
+
}
|
|
552
|
+
case "SqliteErrorResponse": {
|
|
553
|
+
bare.writeU8(bc, 2);
|
|
554
|
+
writeSqliteErrorResponse(bc, x.val);
|
|
555
|
+
break;
|
|
556
|
+
}
|
|
557
|
+
}
|
|
558
|
+
}
|
|
559
|
+
function read8(bc) {
|
|
560
|
+
const len = bare.readUintSafe(bc);
|
|
561
|
+
if (len === 0) {
|
|
562
|
+
return [];
|
|
563
|
+
}
|
|
564
|
+
const result = [readSqliteDirtyPage(bc)];
|
|
565
|
+
for (let i = 1; i < len; i++) {
|
|
566
|
+
result[i] = readSqliteDirtyPage(bc);
|
|
567
|
+
}
|
|
568
|
+
return result;
|
|
569
|
+
}
|
|
570
|
+
function write8(bc, x) {
|
|
571
|
+
bare.writeUintSafe(bc, x.length);
|
|
572
|
+
for (let i = 0; i < x.length; i++) {
|
|
573
|
+
writeSqliteDirtyPage(bc, x[i]);
|
|
574
|
+
}
|
|
575
|
+
}
|
|
576
|
+
function readSqliteCommitRequest(bc) {
|
|
577
|
+
return {
|
|
578
|
+
actorId: readId(bc),
|
|
579
|
+
generation: readSqliteGeneration(bc),
|
|
580
|
+
expectedHeadTxid: readSqliteTxid(bc),
|
|
581
|
+
dirtyPages: read8(bc),
|
|
582
|
+
newDbSizePages: bare.readU32(bc)
|
|
583
|
+
};
|
|
584
|
+
}
|
|
585
|
+
function writeSqliteCommitRequest(bc, x) {
|
|
586
|
+
writeId(bc, x.actorId);
|
|
587
|
+
writeSqliteGeneration(bc, x.generation);
|
|
588
|
+
writeSqliteTxid(bc, x.expectedHeadTxid);
|
|
589
|
+
write8(bc, x.dirtyPages);
|
|
590
|
+
bare.writeU32(bc, x.newDbSizePages);
|
|
591
|
+
}
|
|
592
|
+
function readSqliteCommitOk(bc) {
|
|
593
|
+
return {
|
|
594
|
+
newHeadTxid: readSqliteTxid(bc),
|
|
595
|
+
meta: readSqliteMeta(bc)
|
|
596
|
+
};
|
|
597
|
+
}
|
|
598
|
+
function writeSqliteCommitOk(bc, x) {
|
|
599
|
+
writeSqliteTxid(bc, x.newHeadTxid);
|
|
600
|
+
writeSqliteMeta(bc, x.meta);
|
|
601
|
+
}
|
|
602
|
+
function readSqliteCommitTooLarge(bc) {
|
|
603
|
+
return {
|
|
604
|
+
actualSizeBytes: bare.readU64(bc),
|
|
605
|
+
maxSizeBytes: bare.readU64(bc)
|
|
606
|
+
};
|
|
607
|
+
}
|
|
608
|
+
function writeSqliteCommitTooLarge(bc, x) {
|
|
609
|
+
bare.writeU64(bc, x.actualSizeBytes);
|
|
610
|
+
bare.writeU64(bc, x.maxSizeBytes);
|
|
611
|
+
}
|
|
612
|
+
function readSqliteCommitResponse(bc) {
|
|
613
|
+
const offset = bc.offset;
|
|
614
|
+
const tag = bare.readU8(bc);
|
|
615
|
+
switch (tag) {
|
|
616
|
+
case 0:
|
|
617
|
+
return { tag: "SqliteCommitOk", val: readSqliteCommitOk(bc) };
|
|
618
|
+
case 1:
|
|
619
|
+
return { tag: "SqliteFenceMismatch", val: readSqliteFenceMismatch(bc) };
|
|
620
|
+
case 2:
|
|
621
|
+
return { tag: "SqliteCommitTooLarge", val: readSqliteCommitTooLarge(bc) };
|
|
622
|
+
case 3:
|
|
623
|
+
return { tag: "SqliteErrorResponse", val: readSqliteErrorResponse(bc) };
|
|
624
|
+
default: {
|
|
625
|
+
bc.offset = offset;
|
|
626
|
+
throw new bare.BareError(offset, "invalid tag");
|
|
627
|
+
}
|
|
628
|
+
}
|
|
629
|
+
}
|
|
630
|
+
function writeSqliteCommitResponse(bc, x) {
|
|
631
|
+
switch (x.tag) {
|
|
632
|
+
case "SqliteCommitOk": {
|
|
633
|
+
bare.writeU8(bc, 0);
|
|
634
|
+
writeSqliteCommitOk(bc, x.val);
|
|
635
|
+
break;
|
|
636
|
+
}
|
|
637
|
+
case "SqliteFenceMismatch": {
|
|
638
|
+
bare.writeU8(bc, 1);
|
|
639
|
+
writeSqliteFenceMismatch(bc, x.val);
|
|
640
|
+
break;
|
|
641
|
+
}
|
|
642
|
+
case "SqliteCommitTooLarge": {
|
|
643
|
+
bare.writeU8(bc, 2);
|
|
644
|
+
writeSqliteCommitTooLarge(bc, x.val);
|
|
645
|
+
break;
|
|
646
|
+
}
|
|
647
|
+
case "SqliteErrorResponse": {
|
|
648
|
+
bare.writeU8(bc, 3);
|
|
649
|
+
writeSqliteErrorResponse(bc, x.val);
|
|
650
|
+
break;
|
|
651
|
+
}
|
|
652
|
+
}
|
|
653
|
+
}
|
|
654
|
+
function readSqliteCommitStageRequest(bc) {
|
|
655
|
+
return {
|
|
656
|
+
actorId: readId(bc),
|
|
657
|
+
generation: readSqliteGeneration(bc),
|
|
658
|
+
stageId: readSqliteStageId(bc),
|
|
659
|
+
chunkIdx: bare.readU16(bc),
|
|
660
|
+
dirtyPages: read8(bc),
|
|
661
|
+
isLast: bare.readBool(bc)
|
|
662
|
+
};
|
|
663
|
+
}
|
|
664
|
+
function writeSqliteCommitStageRequest(bc, x) {
|
|
665
|
+
writeId(bc, x.actorId);
|
|
666
|
+
writeSqliteGeneration(bc, x.generation);
|
|
667
|
+
writeSqliteStageId(bc, x.stageId);
|
|
668
|
+
bare.writeU16(bc, x.chunkIdx);
|
|
669
|
+
write8(bc, x.dirtyPages);
|
|
670
|
+
bare.writeBool(bc, x.isLast);
|
|
671
|
+
}
|
|
672
|
+
function readSqliteCommitStageOk(bc) {
|
|
673
|
+
return {
|
|
674
|
+
chunkIdxCommitted: bare.readU16(bc)
|
|
675
|
+
};
|
|
676
|
+
}
|
|
677
|
+
function writeSqliteCommitStageOk(bc, x) {
|
|
678
|
+
bare.writeU16(bc, x.chunkIdxCommitted);
|
|
679
|
+
}
|
|
680
|
+
function readSqliteCommitStageResponse(bc) {
|
|
681
|
+
const offset = bc.offset;
|
|
682
|
+
const tag = bare.readU8(bc);
|
|
683
|
+
switch (tag) {
|
|
684
|
+
case 0:
|
|
685
|
+
return { tag: "SqliteCommitStageOk", val: readSqliteCommitStageOk(bc) };
|
|
686
|
+
case 1:
|
|
687
|
+
return { tag: "SqliteFenceMismatch", val: readSqliteFenceMismatch(bc) };
|
|
688
|
+
case 2:
|
|
689
|
+
return { tag: "SqliteErrorResponse", val: readSqliteErrorResponse(bc) };
|
|
690
|
+
default: {
|
|
691
|
+
bc.offset = offset;
|
|
692
|
+
throw new bare.BareError(offset, "invalid tag");
|
|
693
|
+
}
|
|
694
|
+
}
|
|
695
|
+
}
|
|
696
|
+
function writeSqliteCommitStageResponse(bc, x) {
|
|
697
|
+
switch (x.tag) {
|
|
698
|
+
case "SqliteCommitStageOk": {
|
|
699
|
+
bare.writeU8(bc, 0);
|
|
700
|
+
writeSqliteCommitStageOk(bc, x.val);
|
|
701
|
+
break;
|
|
702
|
+
}
|
|
703
|
+
case "SqliteFenceMismatch": {
|
|
704
|
+
bare.writeU8(bc, 1);
|
|
705
|
+
writeSqliteFenceMismatch(bc, x.val);
|
|
706
|
+
break;
|
|
707
|
+
}
|
|
708
|
+
case "SqliteErrorResponse": {
|
|
709
|
+
bare.writeU8(bc, 2);
|
|
710
|
+
writeSqliteErrorResponse(bc, x.val);
|
|
711
|
+
break;
|
|
712
|
+
}
|
|
713
|
+
}
|
|
714
|
+
}
|
|
715
|
+
function readSqliteCommitFinalizeRequest(bc) {
|
|
716
|
+
return {
|
|
717
|
+
actorId: readId(bc),
|
|
718
|
+
generation: readSqliteGeneration(bc),
|
|
719
|
+
expectedHeadTxid: readSqliteTxid(bc),
|
|
720
|
+
stageId: readSqliteStageId(bc),
|
|
721
|
+
newDbSizePages: bare.readU32(bc)
|
|
722
|
+
};
|
|
723
|
+
}
|
|
724
|
+
function writeSqliteCommitFinalizeRequest(bc, x) {
|
|
725
|
+
writeId(bc, x.actorId);
|
|
726
|
+
writeSqliteGeneration(bc, x.generation);
|
|
727
|
+
writeSqliteTxid(bc, x.expectedHeadTxid);
|
|
728
|
+
writeSqliteStageId(bc, x.stageId);
|
|
729
|
+
bare.writeU32(bc, x.newDbSizePages);
|
|
730
|
+
}
|
|
731
|
+
function readSqliteCommitFinalizeOk(bc) {
|
|
732
|
+
return {
|
|
733
|
+
newHeadTxid: readSqliteTxid(bc),
|
|
734
|
+
meta: readSqliteMeta(bc)
|
|
735
|
+
};
|
|
736
|
+
}
|
|
737
|
+
function writeSqliteCommitFinalizeOk(bc, x) {
|
|
738
|
+
writeSqliteTxid(bc, x.newHeadTxid);
|
|
739
|
+
writeSqliteMeta(bc, x.meta);
|
|
740
|
+
}
|
|
741
|
+
function readSqliteStageNotFound(bc) {
|
|
742
|
+
return {
|
|
743
|
+
stageId: readSqliteStageId(bc)
|
|
744
|
+
};
|
|
745
|
+
}
|
|
746
|
+
function writeSqliteStageNotFound(bc, x) {
|
|
747
|
+
writeSqliteStageId(bc, x.stageId);
|
|
748
|
+
}
|
|
749
|
+
function readSqliteCommitFinalizeResponse(bc) {
|
|
750
|
+
const offset = bc.offset;
|
|
751
|
+
const tag = bare.readU8(bc);
|
|
752
|
+
switch (tag) {
|
|
753
|
+
case 0:
|
|
754
|
+
return { tag: "SqliteCommitFinalizeOk", val: readSqliteCommitFinalizeOk(bc) };
|
|
755
|
+
case 1:
|
|
756
|
+
return { tag: "SqliteFenceMismatch", val: readSqliteFenceMismatch(bc) };
|
|
757
|
+
case 2:
|
|
758
|
+
return { tag: "SqliteStageNotFound", val: readSqliteStageNotFound(bc) };
|
|
759
|
+
case 3:
|
|
760
|
+
return { tag: "SqliteErrorResponse", val: readSqliteErrorResponse(bc) };
|
|
761
|
+
default: {
|
|
762
|
+
bc.offset = offset;
|
|
763
|
+
throw new bare.BareError(offset, "invalid tag");
|
|
764
|
+
}
|
|
765
|
+
}
|
|
766
|
+
}
|
|
767
|
+
function writeSqliteCommitFinalizeResponse(bc, x) {
|
|
768
|
+
switch (x.tag) {
|
|
769
|
+
case "SqliteCommitFinalizeOk": {
|
|
770
|
+
bare.writeU8(bc, 0);
|
|
771
|
+
writeSqliteCommitFinalizeOk(bc, x.val);
|
|
772
|
+
break;
|
|
773
|
+
}
|
|
774
|
+
case "SqliteFenceMismatch": {
|
|
775
|
+
bare.writeU8(bc, 1);
|
|
776
|
+
writeSqliteFenceMismatch(bc, x.val);
|
|
777
|
+
break;
|
|
778
|
+
}
|
|
779
|
+
case "SqliteStageNotFound": {
|
|
780
|
+
bare.writeU8(bc, 2);
|
|
781
|
+
writeSqliteStageNotFound(bc, x.val);
|
|
782
|
+
break;
|
|
783
|
+
}
|
|
784
|
+
case "SqliteErrorResponse": {
|
|
785
|
+
bare.writeU8(bc, 3);
|
|
786
|
+
writeSqliteErrorResponse(bc, x.val);
|
|
787
|
+
break;
|
|
788
|
+
}
|
|
789
|
+
}
|
|
790
|
+
}
|
|
791
|
+
function readSqliteStartupData(bc) {
|
|
792
|
+
return {
|
|
793
|
+
generation: readSqliteGeneration(bc),
|
|
794
|
+
meta: readSqliteMeta(bc),
|
|
795
|
+
preloadedPages: read7(bc)
|
|
796
|
+
};
|
|
797
|
+
}
|
|
798
|
+
function writeSqliteStartupData(bc, x) {
|
|
799
|
+
writeSqliteGeneration(bc, x.generation);
|
|
800
|
+
writeSqliteMeta(bc, x.meta);
|
|
801
|
+
write7(bc, x.preloadedPages);
|
|
802
|
+
}
|
|
369
803
|
var StopCode = /* @__PURE__ */ ((StopCode2) => {
|
|
370
804
|
StopCode2["Ok"] = "Ok";
|
|
371
805
|
StopCode2["Error"] = "Error";
|
|
@@ -405,19 +839,19 @@ function readActorName(bc) {
|
|
|
405
839
|
function writeActorName(bc, x) {
|
|
406
840
|
writeJson(bc, x.metadata);
|
|
407
841
|
}
|
|
408
|
-
function
|
|
842
|
+
function read9(bc) {
|
|
409
843
|
return bare.readBool(bc) ? bare.readString(bc) : null;
|
|
410
844
|
}
|
|
411
|
-
function
|
|
845
|
+
function write9(bc, x) {
|
|
412
846
|
bare.writeBool(bc, x != null);
|
|
413
847
|
if (x != null) {
|
|
414
848
|
bare.writeString(bc, x);
|
|
415
849
|
}
|
|
416
850
|
}
|
|
417
|
-
function
|
|
851
|
+
function read10(bc) {
|
|
418
852
|
return bare.readBool(bc) ? bare.readData(bc) : null;
|
|
419
853
|
}
|
|
420
|
-
function
|
|
854
|
+
function write10(bc, x) {
|
|
421
855
|
bare.writeBool(bc, x != null);
|
|
422
856
|
if (x != null) {
|
|
423
857
|
bare.writeData(bc, x);
|
|
@@ -426,16 +860,16 @@ function write6(bc, x) {
|
|
|
426
860
|
function readActorConfig(bc) {
|
|
427
861
|
return {
|
|
428
862
|
name: bare.readString(bc),
|
|
429
|
-
key:
|
|
863
|
+
key: read9(bc),
|
|
430
864
|
createTs: bare.readI64(bc),
|
|
431
|
-
input:
|
|
865
|
+
input: read10(bc)
|
|
432
866
|
};
|
|
433
867
|
}
|
|
434
868
|
function writeActorConfig(bc, x) {
|
|
435
869
|
bare.writeString(bc, x.name);
|
|
436
|
-
|
|
870
|
+
write9(bc, x.key);
|
|
437
871
|
bare.writeI64(bc, x.createTs);
|
|
438
|
-
|
|
872
|
+
write10(bc, x.input);
|
|
439
873
|
}
|
|
440
874
|
function readActorCheckpoint(bc) {
|
|
441
875
|
return {
|
|
@@ -478,12 +912,12 @@ function writeActorIntent(bc, x) {
|
|
|
478
912
|
function readActorStateStopped(bc) {
|
|
479
913
|
return {
|
|
480
914
|
code: readStopCode(bc),
|
|
481
|
-
message:
|
|
915
|
+
message: read9(bc)
|
|
482
916
|
};
|
|
483
917
|
}
|
|
484
918
|
function writeActorStateStopped(bc, x) {
|
|
485
919
|
writeStopCode(bc, x.code);
|
|
486
|
-
|
|
920
|
+
write9(bc, x.message);
|
|
487
921
|
}
|
|
488
922
|
function readActorState(bc) {
|
|
489
923
|
const offset = bc.offset;
|
|
@@ -528,10 +962,10 @@ function readEventActorStateUpdate(bc) {
|
|
|
528
962
|
function writeEventActorStateUpdate(bc, x) {
|
|
529
963
|
writeActorState(bc, x.state);
|
|
530
964
|
}
|
|
531
|
-
function
|
|
965
|
+
function read11(bc) {
|
|
532
966
|
return bare.readBool(bc) ? bare.readI64(bc) : null;
|
|
533
967
|
}
|
|
534
|
-
function
|
|
968
|
+
function write11(bc, x) {
|
|
535
969
|
bare.writeBool(bc, x != null);
|
|
536
970
|
if (x != null) {
|
|
537
971
|
bare.writeI64(bc, x);
|
|
@@ -539,11 +973,11 @@ function write7(bc, x) {
|
|
|
539
973
|
}
|
|
540
974
|
function readEventActorSetAlarm(bc) {
|
|
541
975
|
return {
|
|
542
|
-
alarmTs:
|
|
976
|
+
alarmTs: read11(bc)
|
|
543
977
|
};
|
|
544
978
|
}
|
|
545
979
|
function writeEventActorSetAlarm(bc, x) {
|
|
546
|
-
|
|
980
|
+
write11(bc, x.alarmTs);
|
|
547
981
|
}
|
|
548
982
|
function readEvent(bc) {
|
|
549
983
|
const offset = bc.offset;
|
|
@@ -602,7 +1036,7 @@ function writePreloadedKvEntry(bc, x) {
|
|
|
602
1036
|
writeKvValue(bc, x.value);
|
|
603
1037
|
writeKvMetadata(bc, x.metadata);
|
|
604
1038
|
}
|
|
605
|
-
function
|
|
1039
|
+
function read12(bc) {
|
|
606
1040
|
const len = bare.readUintSafe(bc);
|
|
607
1041
|
if (len === 0) {
|
|
608
1042
|
return [];
|
|
@@ -613,7 +1047,7 @@ function read8(bc) {
|
|
|
613
1047
|
}
|
|
614
1048
|
return result;
|
|
615
1049
|
}
|
|
616
|
-
function
|
|
1050
|
+
function write12(bc, x) {
|
|
617
1051
|
bare.writeUintSafe(bc, x.length);
|
|
618
1052
|
for (let i = 0; i < x.length; i++) {
|
|
619
1053
|
writePreloadedKvEntry(bc, x[i]);
|
|
@@ -621,13 +1055,13 @@ function write8(bc, x) {
|
|
|
621
1055
|
}
|
|
622
1056
|
function readPreloadedKv(bc) {
|
|
623
1057
|
return {
|
|
624
|
-
entries:
|
|
1058
|
+
entries: read12(bc),
|
|
625
1059
|
requestedGetKeys: read0(bc),
|
|
626
1060
|
requestedPrefixes: read0(bc)
|
|
627
1061
|
};
|
|
628
1062
|
}
|
|
629
1063
|
function writePreloadedKv(bc, x) {
|
|
630
|
-
|
|
1064
|
+
write12(bc, x.entries);
|
|
631
1065
|
write0(bc, x.requestedGetKeys);
|
|
632
1066
|
write0(bc, x.requestedPrefixes);
|
|
633
1067
|
}
|
|
@@ -641,7 +1075,7 @@ function writeHibernatingRequest(bc, x) {
|
|
|
641
1075
|
writeGatewayId(bc, x.gatewayId);
|
|
642
1076
|
writeRequestId(bc, x.requestId);
|
|
643
1077
|
}
|
|
644
|
-
function
|
|
1078
|
+
function read13(bc) {
|
|
645
1079
|
const len = bare.readUintSafe(bc);
|
|
646
1080
|
if (len === 0) {
|
|
647
1081
|
return [];
|
|
@@ -652,32 +1086,45 @@ function read9(bc) {
|
|
|
652
1086
|
}
|
|
653
1087
|
return result;
|
|
654
1088
|
}
|
|
655
|
-
function
|
|
1089
|
+
function write13(bc, x) {
|
|
656
1090
|
bare.writeUintSafe(bc, x.length);
|
|
657
1091
|
for (let i = 0; i < x.length; i++) {
|
|
658
1092
|
writeHibernatingRequest(bc, x[i]);
|
|
659
1093
|
}
|
|
660
1094
|
}
|
|
661
|
-
function
|
|
1095
|
+
function read14(bc) {
|
|
662
1096
|
return bare.readBool(bc) ? readPreloadedKv(bc) : null;
|
|
663
1097
|
}
|
|
664
|
-
function
|
|
1098
|
+
function write14(bc, x) {
|
|
665
1099
|
bare.writeBool(bc, x != null);
|
|
666
1100
|
if (x != null) {
|
|
667
1101
|
writePreloadedKv(bc, x);
|
|
668
1102
|
}
|
|
669
1103
|
}
|
|
1104
|
+
function read15(bc) {
|
|
1105
|
+
return bare.readBool(bc) ? readSqliteStartupData(bc) : null;
|
|
1106
|
+
}
|
|
1107
|
+
function write15(bc, x) {
|
|
1108
|
+
bare.writeBool(bc, x != null);
|
|
1109
|
+
if (x != null) {
|
|
1110
|
+
writeSqliteStartupData(bc, x);
|
|
1111
|
+
}
|
|
1112
|
+
}
|
|
670
1113
|
function readCommandStartActor(bc) {
|
|
671
1114
|
return {
|
|
672
1115
|
config: readActorConfig(bc),
|
|
673
|
-
hibernatingRequests:
|
|
674
|
-
preloadedKv:
|
|
1116
|
+
hibernatingRequests: read13(bc),
|
|
1117
|
+
preloadedKv: read14(bc),
|
|
1118
|
+
sqliteSchemaVersion: bare.readU32(bc),
|
|
1119
|
+
sqliteStartupData: read15(bc)
|
|
675
1120
|
};
|
|
676
1121
|
}
|
|
677
1122
|
function writeCommandStartActor(bc, x) {
|
|
678
1123
|
writeActorConfig(bc, x.config);
|
|
679
|
-
|
|
680
|
-
|
|
1124
|
+
write13(bc, x.hibernatingRequests);
|
|
1125
|
+
write14(bc, x.preloadedKv);
|
|
1126
|
+
bare.writeU32(bc, x.sqliteSchemaVersion);
|
|
1127
|
+
write15(bc, x.sqliteStartupData);
|
|
681
1128
|
}
|
|
682
1129
|
var StopActorReason = /* @__PURE__ */ ((StopActorReason2) => {
|
|
683
1130
|
StopActorReason2["SleepIntent"] = "SleepIntent";
|
|
@@ -834,7 +1281,7 @@ function writeMessageId(bc, x) {
|
|
|
834
1281
|
writeRequestId(bc, x.requestId);
|
|
835
1282
|
writeMessageIndex(bc, x.messageIndex);
|
|
836
1283
|
}
|
|
837
|
-
function
|
|
1284
|
+
function read16(bc) {
|
|
838
1285
|
const len = bare.readUintSafe(bc);
|
|
839
1286
|
const result = /* @__PURE__ */ new Map();
|
|
840
1287
|
for (let i = 0; i < len; i++) {
|
|
@@ -848,7 +1295,7 @@ function read11(bc) {
|
|
|
848
1295
|
}
|
|
849
1296
|
return result;
|
|
850
1297
|
}
|
|
851
|
-
function
|
|
1298
|
+
function write16(bc, x) {
|
|
852
1299
|
bare.writeUintSafe(bc, x.size);
|
|
853
1300
|
for (const kv of x) {
|
|
854
1301
|
bare.writeString(bc, kv[0]);
|
|
@@ -860,8 +1307,8 @@ function readToEnvoyRequestStart(bc) {
|
|
|
860
1307
|
actorId: readId(bc),
|
|
861
1308
|
method: bare.readString(bc),
|
|
862
1309
|
path: bare.readString(bc),
|
|
863
|
-
headers:
|
|
864
|
-
body:
|
|
1310
|
+
headers: read16(bc),
|
|
1311
|
+
body: read10(bc),
|
|
865
1312
|
stream: bare.readBool(bc)
|
|
866
1313
|
};
|
|
867
1314
|
}
|
|
@@ -869,8 +1316,8 @@ function writeToEnvoyRequestStart(bc, x) {
|
|
|
869
1316
|
writeId(bc, x.actorId);
|
|
870
1317
|
bare.writeString(bc, x.method);
|
|
871
1318
|
bare.writeString(bc, x.path);
|
|
872
|
-
|
|
873
|
-
|
|
1319
|
+
write16(bc, x.headers);
|
|
1320
|
+
write10(bc, x.body);
|
|
874
1321
|
bare.writeBool(bc, x.stream);
|
|
875
1322
|
}
|
|
876
1323
|
function readToEnvoyRequestChunk(bc) {
|
|
@@ -886,15 +1333,15 @@ function writeToEnvoyRequestChunk(bc, x) {
|
|
|
886
1333
|
function readToRivetResponseStart(bc) {
|
|
887
1334
|
return {
|
|
888
1335
|
status: bare.readU16(bc),
|
|
889
|
-
headers:
|
|
890
|
-
body:
|
|
1336
|
+
headers: read16(bc),
|
|
1337
|
+
body: read10(bc),
|
|
891
1338
|
stream: bare.readBool(bc)
|
|
892
1339
|
};
|
|
893
1340
|
}
|
|
894
1341
|
function writeToRivetResponseStart(bc, x) {
|
|
895
1342
|
bare.writeU16(bc, x.status);
|
|
896
|
-
|
|
897
|
-
|
|
1343
|
+
write16(bc, x.headers);
|
|
1344
|
+
write10(bc, x.body);
|
|
898
1345
|
bare.writeBool(bc, x.stream);
|
|
899
1346
|
}
|
|
900
1347
|
function readToRivetResponseChunk(bc) {
|
|
@@ -911,13 +1358,13 @@ function readToEnvoyWebSocketOpen(bc) {
|
|
|
911
1358
|
return {
|
|
912
1359
|
actorId: readId(bc),
|
|
913
1360
|
path: bare.readString(bc),
|
|
914
|
-
headers:
|
|
1361
|
+
headers: read16(bc)
|
|
915
1362
|
};
|
|
916
1363
|
}
|
|
917
1364
|
function writeToEnvoyWebSocketOpen(bc, x) {
|
|
918
1365
|
writeId(bc, x.actorId);
|
|
919
1366
|
bare.writeString(bc, x.path);
|
|
920
|
-
|
|
1367
|
+
write16(bc, x.headers);
|
|
921
1368
|
}
|
|
922
1369
|
function readToEnvoyWebSocketMessage(bc) {
|
|
923
1370
|
return {
|
|
@@ -929,10 +1376,10 @@ function writeToEnvoyWebSocketMessage(bc, x) {
|
|
|
929
1376
|
bare.writeData(bc, x.data);
|
|
930
1377
|
bare.writeBool(bc, x.binary);
|
|
931
1378
|
}
|
|
932
|
-
function
|
|
1379
|
+
function read17(bc) {
|
|
933
1380
|
return bare.readBool(bc) ? bare.readU16(bc) : null;
|
|
934
1381
|
}
|
|
935
|
-
function
|
|
1382
|
+
function write17(bc, x) {
|
|
936
1383
|
bare.writeBool(bc, x != null);
|
|
937
1384
|
if (x != null) {
|
|
938
1385
|
bare.writeU16(bc, x);
|
|
@@ -940,13 +1387,13 @@ function write12(bc, x) {
|
|
|
940
1387
|
}
|
|
941
1388
|
function readToEnvoyWebSocketClose(bc) {
|
|
942
1389
|
return {
|
|
943
|
-
code:
|
|
944
|
-
reason:
|
|
1390
|
+
code: read17(bc),
|
|
1391
|
+
reason: read9(bc)
|
|
945
1392
|
};
|
|
946
1393
|
}
|
|
947
1394
|
function writeToEnvoyWebSocketClose(bc, x) {
|
|
948
|
-
|
|
949
|
-
|
|
1395
|
+
write17(bc, x.code);
|
|
1396
|
+
write9(bc, x.reason);
|
|
950
1397
|
}
|
|
951
1398
|
function readToRivetWebSocketOpen(bc) {
|
|
952
1399
|
return {
|
|
@@ -976,14 +1423,14 @@ function writeToRivetWebSocketMessageAck(bc, x) {
|
|
|
976
1423
|
}
|
|
977
1424
|
function readToRivetWebSocketClose(bc) {
|
|
978
1425
|
return {
|
|
979
|
-
code:
|
|
980
|
-
reason:
|
|
1426
|
+
code: read17(bc),
|
|
1427
|
+
reason: read9(bc),
|
|
981
1428
|
hibernate: bare.readBool(bc)
|
|
982
1429
|
};
|
|
983
1430
|
}
|
|
984
1431
|
function writeToRivetWebSocketClose(bc, x) {
|
|
985
|
-
|
|
986
|
-
|
|
1432
|
+
write17(bc, x.code);
|
|
1433
|
+
write9(bc, x.reason);
|
|
987
1434
|
bare.writeBool(bc, x.hibernate);
|
|
988
1435
|
}
|
|
989
1436
|
function readToRivetTunnelMessageKind(bc) {
|
|
@@ -1131,7 +1578,7 @@ function readToEnvoyPing(bc) {
|
|
|
1131
1578
|
function writeToEnvoyPing(bc, x) {
|
|
1132
1579
|
bare.writeI64(bc, x.ts);
|
|
1133
1580
|
}
|
|
1134
|
-
function
|
|
1581
|
+
function read18(bc) {
|
|
1135
1582
|
const len = bare.readUintSafe(bc);
|
|
1136
1583
|
const result = /* @__PURE__ */ new Map();
|
|
1137
1584
|
for (let i = 0; i < len; i++) {
|
|
@@ -1145,26 +1592,26 @@ function read13(bc) {
|
|
|
1145
1592
|
}
|
|
1146
1593
|
return result;
|
|
1147
1594
|
}
|
|
1148
|
-
function
|
|
1595
|
+
function write18(bc, x) {
|
|
1149
1596
|
bare.writeUintSafe(bc, x.size);
|
|
1150
1597
|
for (const kv of x) {
|
|
1151
1598
|
bare.writeString(bc, kv[0]);
|
|
1152
1599
|
writeActorName(bc, kv[1]);
|
|
1153
1600
|
}
|
|
1154
1601
|
}
|
|
1155
|
-
function
|
|
1156
|
-
return bare.readBool(bc) ?
|
|
1602
|
+
function read19(bc) {
|
|
1603
|
+
return bare.readBool(bc) ? read18(bc) : null;
|
|
1157
1604
|
}
|
|
1158
|
-
function
|
|
1605
|
+
function write19(bc, x) {
|
|
1159
1606
|
bare.writeBool(bc, x != null);
|
|
1160
1607
|
if (x != null) {
|
|
1161
|
-
|
|
1608
|
+
write18(bc, x);
|
|
1162
1609
|
}
|
|
1163
1610
|
}
|
|
1164
|
-
function
|
|
1611
|
+
function read20(bc) {
|
|
1165
1612
|
return bare.readBool(bc) ? readJson(bc) : null;
|
|
1166
1613
|
}
|
|
1167
|
-
function
|
|
1614
|
+
function write20(bc, x) {
|
|
1168
1615
|
bare.writeBool(bc, x != null);
|
|
1169
1616
|
if (x != null) {
|
|
1170
1617
|
writeJson(bc, x);
|
|
@@ -1172,13 +1619,13 @@ function write15(bc, x) {
|
|
|
1172
1619
|
}
|
|
1173
1620
|
function readToRivetMetadata(bc) {
|
|
1174
1621
|
return {
|
|
1175
|
-
prepopulateActorNames:
|
|
1176
|
-
metadata:
|
|
1622
|
+
prepopulateActorNames: read19(bc),
|
|
1623
|
+
metadata: read20(bc)
|
|
1177
1624
|
};
|
|
1178
1625
|
}
|
|
1179
1626
|
function writeToRivetMetadata(bc, x) {
|
|
1180
|
-
|
|
1181
|
-
|
|
1627
|
+
write19(bc, x.prepopulateActorNames);
|
|
1628
|
+
write20(bc, x.metadata);
|
|
1182
1629
|
}
|
|
1183
1630
|
function readToRivetEvents(bc) {
|
|
1184
1631
|
const len = bare.readUintSafe(bc);
|
|
@@ -1197,7 +1644,7 @@ function writeToRivetEvents(bc, x) {
|
|
|
1197
1644
|
writeEventWrapper(bc, x[i]);
|
|
1198
1645
|
}
|
|
1199
1646
|
}
|
|
1200
|
-
function
|
|
1647
|
+
function read21(bc) {
|
|
1201
1648
|
const len = bare.readUintSafe(bc);
|
|
1202
1649
|
if (len === 0) {
|
|
1203
1650
|
return [];
|
|
@@ -1208,7 +1655,7 @@ function read16(bc) {
|
|
|
1208
1655
|
}
|
|
1209
1656
|
return result;
|
|
1210
1657
|
}
|
|
1211
|
-
function
|
|
1658
|
+
function write21(bc, x) {
|
|
1212
1659
|
bare.writeUintSafe(bc, x.length);
|
|
1213
1660
|
for (let i = 0; i < x.length; i++) {
|
|
1214
1661
|
writeActorCheckpoint(bc, x[i]);
|
|
@@ -1216,11 +1663,11 @@ function write16(bc, x) {
|
|
|
1216
1663
|
}
|
|
1217
1664
|
function readToRivetAckCommands(bc) {
|
|
1218
1665
|
return {
|
|
1219
|
-
lastCommandCheckpoints:
|
|
1666
|
+
lastCommandCheckpoints: read21(bc)
|
|
1220
1667
|
};
|
|
1221
1668
|
}
|
|
1222
1669
|
function writeToRivetAckCommands(bc, x) {
|
|
1223
|
-
|
|
1670
|
+
write21(bc, x.lastCommandCheckpoints);
|
|
1224
1671
|
}
|
|
1225
1672
|
function readToRivetPong(bc) {
|
|
1226
1673
|
return {
|
|
@@ -1242,6 +1689,46 @@ function writeToRivetKvRequest(bc, x) {
|
|
|
1242
1689
|
bare.writeU32(bc, x.requestId);
|
|
1243
1690
|
writeKvRequestData(bc, x.data);
|
|
1244
1691
|
}
|
|
1692
|
+
function readToRivetSqliteGetPagesRequest(bc) {
|
|
1693
|
+
return {
|
|
1694
|
+
requestId: bare.readU32(bc),
|
|
1695
|
+
data: readSqliteGetPagesRequest(bc)
|
|
1696
|
+
};
|
|
1697
|
+
}
|
|
1698
|
+
function writeToRivetSqliteGetPagesRequest(bc, x) {
|
|
1699
|
+
bare.writeU32(bc, x.requestId);
|
|
1700
|
+
writeSqliteGetPagesRequest(bc, x.data);
|
|
1701
|
+
}
|
|
1702
|
+
function readToRivetSqliteCommitRequest(bc) {
|
|
1703
|
+
return {
|
|
1704
|
+
requestId: bare.readU32(bc),
|
|
1705
|
+
data: readSqliteCommitRequest(bc)
|
|
1706
|
+
};
|
|
1707
|
+
}
|
|
1708
|
+
function writeToRivetSqliteCommitRequest(bc, x) {
|
|
1709
|
+
bare.writeU32(bc, x.requestId);
|
|
1710
|
+
writeSqliteCommitRequest(bc, x.data);
|
|
1711
|
+
}
|
|
1712
|
+
function readToRivetSqliteCommitStageRequest(bc) {
|
|
1713
|
+
return {
|
|
1714
|
+
requestId: bare.readU32(bc),
|
|
1715
|
+
data: readSqliteCommitStageRequest(bc)
|
|
1716
|
+
};
|
|
1717
|
+
}
|
|
1718
|
+
function writeToRivetSqliteCommitStageRequest(bc, x) {
|
|
1719
|
+
bare.writeU32(bc, x.requestId);
|
|
1720
|
+
writeSqliteCommitStageRequest(bc, x.data);
|
|
1721
|
+
}
|
|
1722
|
+
function readToRivetSqliteCommitFinalizeRequest(bc) {
|
|
1723
|
+
return {
|
|
1724
|
+
requestId: bare.readU32(bc),
|
|
1725
|
+
data: readSqliteCommitFinalizeRequest(bc)
|
|
1726
|
+
};
|
|
1727
|
+
}
|
|
1728
|
+
function writeToRivetSqliteCommitFinalizeRequest(bc, x) {
|
|
1729
|
+
bare.writeU32(bc, x.requestId);
|
|
1730
|
+
writeSqliteCommitFinalizeRequest(bc, x.data);
|
|
1731
|
+
}
|
|
1245
1732
|
function readToRivet(bc) {
|
|
1246
1733
|
const offset = bc.offset;
|
|
1247
1734
|
const tag = bare.readU8(bc);
|
|
@@ -1260,6 +1747,14 @@ function readToRivet(bc) {
|
|
|
1260
1747
|
return { tag: "ToRivetKvRequest", val: readToRivetKvRequest(bc) };
|
|
1261
1748
|
case 6:
|
|
1262
1749
|
return { tag: "ToRivetTunnelMessage", val: readToRivetTunnelMessage(bc) };
|
|
1750
|
+
case 7:
|
|
1751
|
+
return { tag: "ToRivetSqliteGetPagesRequest", val: readToRivetSqliteGetPagesRequest(bc) };
|
|
1752
|
+
case 8:
|
|
1753
|
+
return { tag: "ToRivetSqliteCommitRequest", val: readToRivetSqliteCommitRequest(bc) };
|
|
1754
|
+
case 9:
|
|
1755
|
+
return { tag: "ToRivetSqliteCommitStageRequest", val: readToRivetSqliteCommitStageRequest(bc) };
|
|
1756
|
+
case 10:
|
|
1757
|
+
return { tag: "ToRivetSqliteCommitFinalizeRequest", val: readToRivetSqliteCommitFinalizeRequest(bc) };
|
|
1263
1758
|
default: {
|
|
1264
1759
|
bc.offset = offset;
|
|
1265
1760
|
throw new bare.BareError(offset, "invalid tag");
|
|
@@ -1302,6 +1797,26 @@ function writeToRivet(bc, x) {
|
|
|
1302
1797
|
writeToRivetTunnelMessage(bc, x.val);
|
|
1303
1798
|
break;
|
|
1304
1799
|
}
|
|
1800
|
+
case "ToRivetSqliteGetPagesRequest": {
|
|
1801
|
+
bare.writeU8(bc, 7);
|
|
1802
|
+
writeToRivetSqliteGetPagesRequest(bc, x.val);
|
|
1803
|
+
break;
|
|
1804
|
+
}
|
|
1805
|
+
case "ToRivetSqliteCommitRequest": {
|
|
1806
|
+
bare.writeU8(bc, 8);
|
|
1807
|
+
writeToRivetSqliteCommitRequest(bc, x.val);
|
|
1808
|
+
break;
|
|
1809
|
+
}
|
|
1810
|
+
case "ToRivetSqliteCommitStageRequest": {
|
|
1811
|
+
bare.writeU8(bc, 9);
|
|
1812
|
+
writeToRivetSqliteCommitStageRequest(bc, x.val);
|
|
1813
|
+
break;
|
|
1814
|
+
}
|
|
1815
|
+
case "ToRivetSqliteCommitFinalizeRequest": {
|
|
1816
|
+
bare.writeU8(bc, 10);
|
|
1817
|
+
writeToRivetSqliteCommitFinalizeRequest(bc, x.val);
|
|
1818
|
+
break;
|
|
1819
|
+
}
|
|
1305
1820
|
}
|
|
1306
1821
|
}
|
|
1307
1822
|
function encodeToRivet(x, config) {
|
|
@@ -1360,11 +1875,11 @@ function writeToEnvoyCommands(bc, x) {
|
|
|
1360
1875
|
}
|
|
1361
1876
|
function readToEnvoyAckEvents(bc) {
|
|
1362
1877
|
return {
|
|
1363
|
-
lastEventCheckpoints:
|
|
1878
|
+
lastEventCheckpoints: read21(bc)
|
|
1364
1879
|
};
|
|
1365
1880
|
}
|
|
1366
1881
|
function writeToEnvoyAckEvents(bc, x) {
|
|
1367
|
-
|
|
1882
|
+
write21(bc, x.lastEventCheckpoints);
|
|
1368
1883
|
}
|
|
1369
1884
|
function readToEnvoyKvResponse(bc) {
|
|
1370
1885
|
return {
|
|
@@ -1376,6 +1891,46 @@ function writeToEnvoyKvResponse(bc, x) {
|
|
|
1376
1891
|
bare.writeU32(bc, x.requestId);
|
|
1377
1892
|
writeKvResponseData(bc, x.data);
|
|
1378
1893
|
}
|
|
1894
|
+
function readToEnvoySqliteGetPagesResponse(bc) {
|
|
1895
|
+
return {
|
|
1896
|
+
requestId: bare.readU32(bc),
|
|
1897
|
+
data: readSqliteGetPagesResponse(bc)
|
|
1898
|
+
};
|
|
1899
|
+
}
|
|
1900
|
+
function writeToEnvoySqliteGetPagesResponse(bc, x) {
|
|
1901
|
+
bare.writeU32(bc, x.requestId);
|
|
1902
|
+
writeSqliteGetPagesResponse(bc, x.data);
|
|
1903
|
+
}
|
|
1904
|
+
function readToEnvoySqliteCommitResponse(bc) {
|
|
1905
|
+
return {
|
|
1906
|
+
requestId: bare.readU32(bc),
|
|
1907
|
+
data: readSqliteCommitResponse(bc)
|
|
1908
|
+
};
|
|
1909
|
+
}
|
|
1910
|
+
function writeToEnvoySqliteCommitResponse(bc, x) {
|
|
1911
|
+
bare.writeU32(bc, x.requestId);
|
|
1912
|
+
writeSqliteCommitResponse(bc, x.data);
|
|
1913
|
+
}
|
|
1914
|
+
function readToEnvoySqliteCommitStageResponse(bc) {
|
|
1915
|
+
return {
|
|
1916
|
+
requestId: bare.readU32(bc),
|
|
1917
|
+
data: readSqliteCommitStageResponse(bc)
|
|
1918
|
+
};
|
|
1919
|
+
}
|
|
1920
|
+
function writeToEnvoySqliteCommitStageResponse(bc, x) {
|
|
1921
|
+
bare.writeU32(bc, x.requestId);
|
|
1922
|
+
writeSqliteCommitStageResponse(bc, x.data);
|
|
1923
|
+
}
|
|
1924
|
+
function readToEnvoySqliteCommitFinalizeResponse(bc) {
|
|
1925
|
+
return {
|
|
1926
|
+
requestId: bare.readU32(bc),
|
|
1927
|
+
data: readSqliteCommitFinalizeResponse(bc)
|
|
1928
|
+
};
|
|
1929
|
+
}
|
|
1930
|
+
function writeToEnvoySqliteCommitFinalizeResponse(bc, x) {
|
|
1931
|
+
bare.writeU32(bc, x.requestId);
|
|
1932
|
+
writeSqliteCommitFinalizeResponse(bc, x.data);
|
|
1933
|
+
}
|
|
1379
1934
|
function readToEnvoy(bc) {
|
|
1380
1935
|
const offset = bc.offset;
|
|
1381
1936
|
const tag = bare.readU8(bc);
|
|
@@ -1392,6 +1947,14 @@ function readToEnvoy(bc) {
|
|
|
1392
1947
|
return { tag: "ToEnvoyTunnelMessage", val: readToEnvoyTunnelMessage(bc) };
|
|
1393
1948
|
case 5:
|
|
1394
1949
|
return { tag: "ToEnvoyPing", val: readToEnvoyPing(bc) };
|
|
1950
|
+
case 6:
|
|
1951
|
+
return { tag: "ToEnvoySqliteGetPagesResponse", val: readToEnvoySqliteGetPagesResponse(bc) };
|
|
1952
|
+
case 7:
|
|
1953
|
+
return { tag: "ToEnvoySqliteCommitResponse", val: readToEnvoySqliteCommitResponse(bc) };
|
|
1954
|
+
case 8:
|
|
1955
|
+
return { tag: "ToEnvoySqliteCommitStageResponse", val: readToEnvoySqliteCommitStageResponse(bc) };
|
|
1956
|
+
case 9:
|
|
1957
|
+
return { tag: "ToEnvoySqliteCommitFinalizeResponse", val: readToEnvoySqliteCommitFinalizeResponse(bc) };
|
|
1395
1958
|
default: {
|
|
1396
1959
|
bc.offset = offset;
|
|
1397
1960
|
throw new bare.BareError(offset, "invalid tag");
|
|
@@ -1430,6 +1993,26 @@ function writeToEnvoy(bc, x) {
|
|
|
1430
1993
|
writeToEnvoyPing(bc, x.val);
|
|
1431
1994
|
break;
|
|
1432
1995
|
}
|
|
1996
|
+
case "ToEnvoySqliteGetPagesResponse": {
|
|
1997
|
+
bare.writeU8(bc, 6);
|
|
1998
|
+
writeToEnvoySqliteGetPagesResponse(bc, x.val);
|
|
1999
|
+
break;
|
|
2000
|
+
}
|
|
2001
|
+
case "ToEnvoySqliteCommitResponse": {
|
|
2002
|
+
bare.writeU8(bc, 7);
|
|
2003
|
+
writeToEnvoySqliteCommitResponse(bc, x.val);
|
|
2004
|
+
break;
|
|
2005
|
+
}
|
|
2006
|
+
case "ToEnvoySqliteCommitStageResponse": {
|
|
2007
|
+
bare.writeU8(bc, 8);
|
|
2008
|
+
writeToEnvoySqliteCommitStageResponse(bc, x.val);
|
|
2009
|
+
break;
|
|
2010
|
+
}
|
|
2011
|
+
case "ToEnvoySqliteCommitFinalizeResponse": {
|
|
2012
|
+
bare.writeU8(bc, 9);
|
|
2013
|
+
writeToEnvoySqliteCommitFinalizeResponse(bc, x.val);
|
|
2014
|
+
break;
|
|
2015
|
+
}
|
|
1433
2016
|
}
|
|
1434
2017
|
}
|
|
1435
2018
|
function encodeToEnvoy(x, config) {
|
|
@@ -1636,7 +2219,7 @@ function decodeToOutbound(bytes) {
|
|
|
1636
2219
|
function assert(condition, message) {
|
|
1637
2220
|
if (!condition) throw new Error(message ?? "Assertion failed");
|
|
1638
2221
|
}
|
|
1639
|
-
var VERSION =
|
|
2222
|
+
var VERSION = 2;
|
|
1640
2223
|
export {
|
|
1641
2224
|
StopActorReason,
|
|
1642
2225
|
StopCode,
|
|
@@ -1695,6 +2278,31 @@ export {
|
|
|
1695
2278
|
readPreloadedKvEntry,
|
|
1696
2279
|
readProtocolMetadata,
|
|
1697
2280
|
readRequestId,
|
|
2281
|
+
readSqliteCommitFinalizeOk,
|
|
2282
|
+
readSqliteCommitFinalizeRequest,
|
|
2283
|
+
readSqliteCommitFinalizeResponse,
|
|
2284
|
+
readSqliteCommitOk,
|
|
2285
|
+
readSqliteCommitRequest,
|
|
2286
|
+
readSqliteCommitResponse,
|
|
2287
|
+
readSqliteCommitStageOk,
|
|
2288
|
+
readSqliteCommitStageRequest,
|
|
2289
|
+
readSqliteCommitStageResponse,
|
|
2290
|
+
readSqliteCommitTooLarge,
|
|
2291
|
+
readSqliteDirtyPage,
|
|
2292
|
+
readSqliteErrorResponse,
|
|
2293
|
+
readSqliteFenceMismatch,
|
|
2294
|
+
readSqliteFetchedPage,
|
|
2295
|
+
readSqliteGeneration,
|
|
2296
|
+
readSqliteGetPagesOk,
|
|
2297
|
+
readSqliteGetPagesRequest,
|
|
2298
|
+
readSqliteGetPagesResponse,
|
|
2299
|
+
readSqliteMeta,
|
|
2300
|
+
readSqlitePageBytes,
|
|
2301
|
+
readSqlitePgno,
|
|
2302
|
+
readSqliteStageId,
|
|
2303
|
+
readSqliteStageNotFound,
|
|
2304
|
+
readSqliteStartupData,
|
|
2305
|
+
readSqliteTxid,
|
|
1698
2306
|
readStopActorReason,
|
|
1699
2307
|
readStopCode,
|
|
1700
2308
|
readToEnvoy,
|
|
@@ -1707,6 +2315,10 @@ export {
|
|
|
1707
2315
|
readToEnvoyPing,
|
|
1708
2316
|
readToEnvoyRequestChunk,
|
|
1709
2317
|
readToEnvoyRequestStart,
|
|
2318
|
+
readToEnvoySqliteCommitFinalizeResponse,
|
|
2319
|
+
readToEnvoySqliteCommitResponse,
|
|
2320
|
+
readToEnvoySqliteCommitStageResponse,
|
|
2321
|
+
readToEnvoySqliteGetPagesResponse,
|
|
1710
2322
|
readToEnvoyTunnelMessage,
|
|
1711
2323
|
readToEnvoyTunnelMessageKind,
|
|
1712
2324
|
readToEnvoyWebSocketClose,
|
|
@@ -1724,6 +2336,10 @@ export {
|
|
|
1724
2336
|
readToRivetPong,
|
|
1725
2337
|
readToRivetResponseChunk,
|
|
1726
2338
|
readToRivetResponseStart,
|
|
2339
|
+
readToRivetSqliteCommitFinalizeRequest,
|
|
2340
|
+
readToRivetSqliteCommitRequest,
|
|
2341
|
+
readToRivetSqliteCommitStageRequest,
|
|
2342
|
+
readToRivetSqliteGetPagesRequest,
|
|
1727
2343
|
readToRivetTunnelMessage,
|
|
1728
2344
|
readToRivetTunnelMessageKind,
|
|
1729
2345
|
readToRivetWebSocketClose,
|
|
@@ -1772,6 +2388,31 @@ export {
|
|
|
1772
2388
|
writePreloadedKvEntry,
|
|
1773
2389
|
writeProtocolMetadata,
|
|
1774
2390
|
writeRequestId,
|
|
2391
|
+
writeSqliteCommitFinalizeOk,
|
|
2392
|
+
writeSqliteCommitFinalizeRequest,
|
|
2393
|
+
writeSqliteCommitFinalizeResponse,
|
|
2394
|
+
writeSqliteCommitOk,
|
|
2395
|
+
writeSqliteCommitRequest,
|
|
2396
|
+
writeSqliteCommitResponse,
|
|
2397
|
+
writeSqliteCommitStageOk,
|
|
2398
|
+
writeSqliteCommitStageRequest,
|
|
2399
|
+
writeSqliteCommitStageResponse,
|
|
2400
|
+
writeSqliteCommitTooLarge,
|
|
2401
|
+
writeSqliteDirtyPage,
|
|
2402
|
+
writeSqliteErrorResponse,
|
|
2403
|
+
writeSqliteFenceMismatch,
|
|
2404
|
+
writeSqliteFetchedPage,
|
|
2405
|
+
writeSqliteGeneration,
|
|
2406
|
+
writeSqliteGetPagesOk,
|
|
2407
|
+
writeSqliteGetPagesRequest,
|
|
2408
|
+
writeSqliteGetPagesResponse,
|
|
2409
|
+
writeSqliteMeta,
|
|
2410
|
+
writeSqlitePageBytes,
|
|
2411
|
+
writeSqlitePgno,
|
|
2412
|
+
writeSqliteStageId,
|
|
2413
|
+
writeSqliteStageNotFound,
|
|
2414
|
+
writeSqliteStartupData,
|
|
2415
|
+
writeSqliteTxid,
|
|
1775
2416
|
writeStopActorReason,
|
|
1776
2417
|
writeStopCode,
|
|
1777
2418
|
writeToEnvoy,
|
|
@@ -1784,6 +2425,10 @@ export {
|
|
|
1784
2425
|
writeToEnvoyPing,
|
|
1785
2426
|
writeToEnvoyRequestChunk,
|
|
1786
2427
|
writeToEnvoyRequestStart,
|
|
2428
|
+
writeToEnvoySqliteCommitFinalizeResponse,
|
|
2429
|
+
writeToEnvoySqliteCommitResponse,
|
|
2430
|
+
writeToEnvoySqliteCommitStageResponse,
|
|
2431
|
+
writeToEnvoySqliteGetPagesResponse,
|
|
1787
2432
|
writeToEnvoyTunnelMessage,
|
|
1788
2433
|
writeToEnvoyTunnelMessageKind,
|
|
1789
2434
|
writeToEnvoyWebSocketClose,
|
|
@@ -1801,6 +2446,10 @@ export {
|
|
|
1801
2446
|
writeToRivetPong,
|
|
1802
2447
|
writeToRivetResponseChunk,
|
|
1803
2448
|
writeToRivetResponseStart,
|
|
2449
|
+
writeToRivetSqliteCommitFinalizeRequest,
|
|
2450
|
+
writeToRivetSqliteCommitRequest,
|
|
2451
|
+
writeToRivetSqliteCommitStageRequest,
|
|
2452
|
+
writeToRivetSqliteGetPagesRequest,
|
|
1804
2453
|
writeToRivetTunnelMessage,
|
|
1805
2454
|
writeToRivetTunnelMessageKind,
|
|
1806
2455
|
writeToRivetWebSocketClose,
|