@rivetkit/engine-envoy-protocol 0.0.0-main.a904d4f → 0.0.0-main.b2d3b94
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 +262 -165
- package/dist/index.js +687 -379
- package/package.json +9 -2
package/dist/index.js
CHANGED
|
@@ -366,28 +366,16 @@ 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
369
|
function readSqlitePgno(bc) {
|
|
382
370
|
return bare.readU32(bc);
|
|
383
371
|
}
|
|
384
372
|
function writeSqlitePgno(bc, x) {
|
|
385
373
|
bare.writeU32(bc, x);
|
|
386
374
|
}
|
|
387
|
-
function
|
|
375
|
+
function readSqliteGeneration(bc) {
|
|
388
376
|
return bare.readU64(bc);
|
|
389
377
|
}
|
|
390
|
-
function
|
|
378
|
+
function writeSqliteGeneration(bc, x) {
|
|
391
379
|
bare.writeU64(bc, x);
|
|
392
380
|
}
|
|
393
381
|
function readSqlitePageBytes(bc) {
|
|
@@ -396,36 +384,6 @@ function readSqlitePageBytes(bc) {
|
|
|
396
384
|
function writeSqlitePageBytes(bc, x) {
|
|
397
385
|
bare.writeData(bc, x);
|
|
398
386
|
}
|
|
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
|
-
}
|
|
429
387
|
function readSqliteDirtyPage(bc) {
|
|
430
388
|
return {
|
|
431
389
|
pgno: readSqlitePgno(bc),
|
|
@@ -475,14 +433,16 @@ function write6(bc, x) {
|
|
|
475
433
|
function readSqliteGetPagesRequest(bc) {
|
|
476
434
|
return {
|
|
477
435
|
actorId: readId(bc),
|
|
478
|
-
|
|
479
|
-
|
|
436
|
+
pgnos: read6(bc),
|
|
437
|
+
expectedGeneration: read2(bc),
|
|
438
|
+
expectedHeadTxid: read2(bc)
|
|
480
439
|
};
|
|
481
440
|
}
|
|
482
441
|
function writeSqliteGetPagesRequest(bc, x) {
|
|
483
442
|
writeId(bc, x.actorId);
|
|
484
|
-
writeSqliteGeneration(bc, x.generation);
|
|
485
443
|
write6(bc, x.pgnos);
|
|
444
|
+
write2(bc, x.expectedGeneration);
|
|
445
|
+
write2(bc, x.expectedHeadTxid);
|
|
486
446
|
}
|
|
487
447
|
function read7(bc) {
|
|
488
448
|
const len = bare.readUintSafe(bc);
|
|
@@ -504,19 +464,23 @@ function write7(bc, x) {
|
|
|
504
464
|
function readSqliteGetPagesOk(bc) {
|
|
505
465
|
return {
|
|
506
466
|
pages: read7(bc),
|
|
507
|
-
|
|
467
|
+
headTxid: read2(bc)
|
|
508
468
|
};
|
|
509
469
|
}
|
|
510
470
|
function writeSqliteGetPagesOk(bc, x) {
|
|
511
471
|
write7(bc, x.pages);
|
|
512
|
-
|
|
472
|
+
write2(bc, x.headTxid);
|
|
513
473
|
}
|
|
514
474
|
function readSqliteErrorResponse(bc) {
|
|
515
475
|
return {
|
|
476
|
+
group: bare.readString(bc),
|
|
477
|
+
code: bare.readString(bc),
|
|
516
478
|
message: bare.readString(bc)
|
|
517
479
|
};
|
|
518
480
|
}
|
|
519
481
|
function writeSqliteErrorResponse(bc, x) {
|
|
482
|
+
bare.writeString(bc, x.group);
|
|
483
|
+
bare.writeString(bc, x.code);
|
|
520
484
|
bare.writeString(bc, x.message);
|
|
521
485
|
}
|
|
522
486
|
function readSqliteGetPagesResponse(bc) {
|
|
@@ -526,8 +490,6 @@ function readSqliteGetPagesResponse(bc) {
|
|
|
526
490
|
case 0:
|
|
527
491
|
return { tag: "SqliteGetPagesOk", val: readSqliteGetPagesOk(bc) };
|
|
528
492
|
case 1:
|
|
529
|
-
return { tag: "SqliteFenceMismatch", val: readSqliteFenceMismatch(bc) };
|
|
530
|
-
case 2:
|
|
531
493
|
return { tag: "SqliteErrorResponse", val: readSqliteErrorResponse(bc) };
|
|
532
494
|
default: {
|
|
533
495
|
bc.offset = offset;
|
|
@@ -542,13 +504,8 @@ function writeSqliteGetPagesResponse(bc, x) {
|
|
|
542
504
|
writeSqliteGetPagesOk(bc, x.val);
|
|
543
505
|
break;
|
|
544
506
|
}
|
|
545
|
-
case "SqliteFenceMismatch": {
|
|
546
|
-
bare.writeU8(bc, 1);
|
|
547
|
-
writeSqliteFenceMismatch(bc, x.val);
|
|
548
|
-
break;
|
|
549
|
-
}
|
|
550
507
|
case "SqliteErrorResponse": {
|
|
551
|
-
bare.writeU8(bc,
|
|
508
|
+
bare.writeU8(bc, 1);
|
|
552
509
|
writeSqliteErrorResponse(bc, x.val);
|
|
553
510
|
break;
|
|
554
511
|
}
|
|
@@ -574,38 +531,28 @@ function write8(bc, x) {
|
|
|
574
531
|
function readSqliteCommitRequest(bc) {
|
|
575
532
|
return {
|
|
576
533
|
actorId: readId(bc),
|
|
577
|
-
generation: readSqliteGeneration(bc),
|
|
578
|
-
expectedHeadTxid: readSqliteTxid(bc),
|
|
579
534
|
dirtyPages: read8(bc),
|
|
580
|
-
|
|
535
|
+
dbSizePages: bare.readU32(bc),
|
|
536
|
+
nowMs: bare.readI64(bc),
|
|
537
|
+
expectedGeneration: read2(bc),
|
|
538
|
+
expectedHeadTxid: read2(bc)
|
|
581
539
|
};
|
|
582
540
|
}
|
|
583
541
|
function writeSqliteCommitRequest(bc, x) {
|
|
584
542
|
writeId(bc, x.actorId);
|
|
585
|
-
writeSqliteGeneration(bc, x.generation);
|
|
586
|
-
writeSqliteTxid(bc, x.expectedHeadTxid);
|
|
587
543
|
write8(bc, x.dirtyPages);
|
|
588
|
-
bare.writeU32(bc, x.
|
|
544
|
+
bare.writeU32(bc, x.dbSizePages);
|
|
545
|
+
bare.writeI64(bc, x.nowMs);
|
|
546
|
+
write2(bc, x.expectedGeneration);
|
|
547
|
+
write2(bc, x.expectedHeadTxid);
|
|
589
548
|
}
|
|
590
549
|
function readSqliteCommitOk(bc) {
|
|
591
550
|
return {
|
|
592
|
-
|
|
593
|
-
meta: readSqliteMeta(bc)
|
|
551
|
+
headTxid: read2(bc)
|
|
594
552
|
};
|
|
595
553
|
}
|
|
596
554
|
function writeSqliteCommitOk(bc, x) {
|
|
597
|
-
|
|
598
|
-
writeSqliteMeta(bc, x.meta);
|
|
599
|
-
}
|
|
600
|
-
function readSqliteCommitTooLarge(bc) {
|
|
601
|
-
return {
|
|
602
|
-
actualSizeBytes: bare.readU64(bc),
|
|
603
|
-
maxSizeBytes: bare.readU64(bc)
|
|
604
|
-
};
|
|
605
|
-
}
|
|
606
|
-
function writeSqliteCommitTooLarge(bc, x) {
|
|
607
|
-
bare.writeU64(bc, x.actualSizeBytes);
|
|
608
|
-
bare.writeU64(bc, x.maxSizeBytes);
|
|
555
|
+
write2(bc, x.headTxid);
|
|
609
556
|
}
|
|
610
557
|
function readSqliteCommitResponse(bc) {
|
|
611
558
|
const offset = bc.offset;
|
|
@@ -614,10 +561,6 @@ function readSqliteCommitResponse(bc) {
|
|
|
614
561
|
case 0:
|
|
615
562
|
return { tag: "SqliteCommitOk", val: readSqliteCommitOk(bc) };
|
|
616
563
|
case 1:
|
|
617
|
-
return { tag: "SqliteFenceMismatch", val: readSqliteFenceMismatch(bc) };
|
|
618
|
-
case 2:
|
|
619
|
-
return { tag: "SqliteCommitTooLarge", val: readSqliteCommitTooLarge(bc) };
|
|
620
|
-
case 3:
|
|
621
564
|
return { tag: "SqliteErrorResponse", val: readSqliteErrorResponse(bc) };
|
|
622
565
|
default: {
|
|
623
566
|
bc.offset = offset;
|
|
@@ -632,182 +575,373 @@ function writeSqliteCommitResponse(bc, x) {
|
|
|
632
575
|
writeSqliteCommitOk(bc, x.val);
|
|
633
576
|
break;
|
|
634
577
|
}
|
|
635
|
-
case "SqliteFenceMismatch": {
|
|
636
|
-
bare.writeU8(bc, 1);
|
|
637
|
-
writeSqliteFenceMismatch(bc, x.val);
|
|
638
|
-
break;
|
|
639
|
-
}
|
|
640
|
-
case "SqliteCommitTooLarge": {
|
|
641
|
-
bare.writeU8(bc, 2);
|
|
642
|
-
writeSqliteCommitTooLarge(bc, x.val);
|
|
643
|
-
break;
|
|
644
|
-
}
|
|
645
578
|
case "SqliteErrorResponse": {
|
|
646
|
-
bare.writeU8(bc,
|
|
579
|
+
bare.writeU8(bc, 1);
|
|
647
580
|
writeSqliteErrorResponse(bc, x.val);
|
|
648
581
|
break;
|
|
649
582
|
}
|
|
650
583
|
}
|
|
651
584
|
}
|
|
652
|
-
function
|
|
585
|
+
function readSqliteValueInteger(bc) {
|
|
653
586
|
return {
|
|
654
|
-
|
|
655
|
-
generation: readSqliteGeneration(bc)
|
|
587
|
+
value: bare.readI64(bc)
|
|
656
588
|
};
|
|
657
589
|
}
|
|
658
|
-
function
|
|
659
|
-
|
|
660
|
-
|
|
590
|
+
function writeSqliteValueInteger(bc, x) {
|
|
591
|
+
bare.writeI64(bc, x.value);
|
|
592
|
+
}
|
|
593
|
+
function readSqliteValueFloat(bc) {
|
|
594
|
+
return {
|
|
595
|
+
value: bare.readFixedData(bc, 8)
|
|
596
|
+
};
|
|
597
|
+
}
|
|
598
|
+
function writeSqliteValueFloat(bc, x) {
|
|
599
|
+
{
|
|
600
|
+
assert(x.value.byteLength === 8);
|
|
601
|
+
bare.writeFixedData(bc, x.value);
|
|
602
|
+
}
|
|
603
|
+
}
|
|
604
|
+
function readSqliteValueText(bc) {
|
|
605
|
+
return {
|
|
606
|
+
value: bare.readString(bc)
|
|
607
|
+
};
|
|
661
608
|
}
|
|
662
|
-
function
|
|
609
|
+
function writeSqliteValueText(bc, x) {
|
|
610
|
+
bare.writeString(bc, x.value);
|
|
611
|
+
}
|
|
612
|
+
function readSqliteValueBlob(bc) {
|
|
663
613
|
return {
|
|
664
|
-
|
|
614
|
+
value: bare.readData(bc)
|
|
665
615
|
};
|
|
666
616
|
}
|
|
667
|
-
function
|
|
668
|
-
|
|
617
|
+
function writeSqliteValueBlob(bc, x) {
|
|
618
|
+
bare.writeData(bc, x.value);
|
|
669
619
|
}
|
|
670
|
-
function
|
|
620
|
+
function readSqliteBindParam(bc) {
|
|
671
621
|
const offset = bc.offset;
|
|
672
622
|
const tag = bare.readU8(bc);
|
|
673
623
|
switch (tag) {
|
|
674
624
|
case 0:
|
|
675
|
-
return { tag: "
|
|
625
|
+
return { tag: "SqliteValueNull", val: null };
|
|
676
626
|
case 1:
|
|
677
|
-
return { tag: "
|
|
627
|
+
return { tag: "SqliteValueInteger", val: readSqliteValueInteger(bc) };
|
|
678
628
|
case 2:
|
|
679
|
-
return { tag: "
|
|
629
|
+
return { tag: "SqliteValueFloat", val: readSqliteValueFloat(bc) };
|
|
630
|
+
case 3:
|
|
631
|
+
return { tag: "SqliteValueText", val: readSqliteValueText(bc) };
|
|
632
|
+
case 4:
|
|
633
|
+
return { tag: "SqliteValueBlob", val: readSqliteValueBlob(bc) };
|
|
680
634
|
default: {
|
|
681
635
|
bc.offset = offset;
|
|
682
636
|
throw new bare.BareError(offset, "invalid tag");
|
|
683
637
|
}
|
|
684
638
|
}
|
|
685
639
|
}
|
|
686
|
-
function
|
|
640
|
+
function writeSqliteBindParam(bc, x) {
|
|
687
641
|
switch (x.tag) {
|
|
688
|
-
case "
|
|
642
|
+
case "SqliteValueNull": {
|
|
689
643
|
bare.writeU8(bc, 0);
|
|
690
|
-
writeSqliteCommitStageBeginOk(bc, x.val);
|
|
691
644
|
break;
|
|
692
645
|
}
|
|
693
|
-
case "
|
|
646
|
+
case "SqliteValueInteger": {
|
|
694
647
|
bare.writeU8(bc, 1);
|
|
695
|
-
|
|
648
|
+
writeSqliteValueInteger(bc, x.val);
|
|
696
649
|
break;
|
|
697
650
|
}
|
|
698
|
-
case "
|
|
651
|
+
case "SqliteValueFloat": {
|
|
699
652
|
bare.writeU8(bc, 2);
|
|
700
|
-
|
|
653
|
+
writeSqliteValueFloat(bc, x.val);
|
|
654
|
+
break;
|
|
655
|
+
}
|
|
656
|
+
case "SqliteValueText": {
|
|
657
|
+
bare.writeU8(bc, 3);
|
|
658
|
+
writeSqliteValueText(bc, x.val);
|
|
659
|
+
break;
|
|
660
|
+
}
|
|
661
|
+
case "SqliteValueBlob": {
|
|
662
|
+
bare.writeU8(bc, 4);
|
|
663
|
+
writeSqliteValueBlob(bc, x.val);
|
|
701
664
|
break;
|
|
702
665
|
}
|
|
703
666
|
}
|
|
704
667
|
}
|
|
705
|
-
function
|
|
706
|
-
return {
|
|
707
|
-
actorId: readId(bc),
|
|
708
|
-
generation: readSqliteGeneration(bc),
|
|
709
|
-
txid: readSqliteTxid(bc),
|
|
710
|
-
chunkIdx: bare.readU32(bc),
|
|
711
|
-
bytes: bare.readData(bc),
|
|
712
|
-
isLast: bare.readBool(bc)
|
|
713
|
-
};
|
|
714
|
-
}
|
|
715
|
-
function writeSqliteCommitStageRequest(bc, x) {
|
|
716
|
-
writeId(bc, x.actorId);
|
|
717
|
-
writeSqliteGeneration(bc, x.generation);
|
|
718
|
-
writeSqliteTxid(bc, x.txid);
|
|
719
|
-
bare.writeU32(bc, x.chunkIdx);
|
|
720
|
-
bare.writeData(bc, x.bytes);
|
|
721
|
-
bare.writeBool(bc, x.isLast);
|
|
722
|
-
}
|
|
723
|
-
function readSqliteCommitStageOk(bc) {
|
|
724
|
-
return {
|
|
725
|
-
chunkIdxCommitted: bare.readU32(bc)
|
|
726
|
-
};
|
|
727
|
-
}
|
|
728
|
-
function writeSqliteCommitStageOk(bc, x) {
|
|
729
|
-
bare.writeU32(bc, x.chunkIdxCommitted);
|
|
730
|
-
}
|
|
731
|
-
function readSqliteCommitStageResponse(bc) {
|
|
668
|
+
function readSqliteColumnValue(bc) {
|
|
732
669
|
const offset = bc.offset;
|
|
733
670
|
const tag = bare.readU8(bc);
|
|
734
671
|
switch (tag) {
|
|
735
672
|
case 0:
|
|
736
|
-
return { tag: "
|
|
673
|
+
return { tag: "SqliteValueNull", val: null };
|
|
737
674
|
case 1:
|
|
738
|
-
return { tag: "
|
|
675
|
+
return { tag: "SqliteValueInteger", val: readSqliteValueInteger(bc) };
|
|
739
676
|
case 2:
|
|
740
|
-
return { tag: "
|
|
677
|
+
return { tag: "SqliteValueFloat", val: readSqliteValueFloat(bc) };
|
|
678
|
+
case 3:
|
|
679
|
+
return { tag: "SqliteValueText", val: readSqliteValueText(bc) };
|
|
680
|
+
case 4:
|
|
681
|
+
return { tag: "SqliteValueBlob", val: readSqliteValueBlob(bc) };
|
|
741
682
|
default: {
|
|
742
683
|
bc.offset = offset;
|
|
743
684
|
throw new bare.BareError(offset, "invalid tag");
|
|
744
685
|
}
|
|
745
686
|
}
|
|
746
687
|
}
|
|
747
|
-
function
|
|
688
|
+
function writeSqliteColumnValue(bc, x) {
|
|
748
689
|
switch (x.tag) {
|
|
749
|
-
case "
|
|
690
|
+
case "SqliteValueNull": {
|
|
750
691
|
bare.writeU8(bc, 0);
|
|
751
|
-
writeSqliteCommitStageOk(bc, x.val);
|
|
752
692
|
break;
|
|
753
693
|
}
|
|
754
|
-
case "
|
|
694
|
+
case "SqliteValueInteger": {
|
|
755
695
|
bare.writeU8(bc, 1);
|
|
756
|
-
|
|
696
|
+
writeSqliteValueInteger(bc, x.val);
|
|
757
697
|
break;
|
|
758
698
|
}
|
|
759
|
-
case "
|
|
699
|
+
case "SqliteValueFloat": {
|
|
760
700
|
bare.writeU8(bc, 2);
|
|
761
|
-
|
|
701
|
+
writeSqliteValueFloat(bc, x.val);
|
|
702
|
+
break;
|
|
703
|
+
}
|
|
704
|
+
case "SqliteValueText": {
|
|
705
|
+
bare.writeU8(bc, 3);
|
|
706
|
+
writeSqliteValueText(bc, x.val);
|
|
707
|
+
break;
|
|
708
|
+
}
|
|
709
|
+
case "SqliteValueBlob": {
|
|
710
|
+
bare.writeU8(bc, 4);
|
|
711
|
+
writeSqliteValueBlob(bc, x.val);
|
|
762
712
|
break;
|
|
763
713
|
}
|
|
764
714
|
}
|
|
765
715
|
}
|
|
766
|
-
function
|
|
716
|
+
function read9(bc) {
|
|
717
|
+
const len = bare.readUintSafe(bc);
|
|
718
|
+
if (len === 0) {
|
|
719
|
+
return [];
|
|
720
|
+
}
|
|
721
|
+
const result = [bare.readString(bc)];
|
|
722
|
+
for (let i = 1; i < len; i++) {
|
|
723
|
+
result[i] = bare.readString(bc);
|
|
724
|
+
}
|
|
725
|
+
return result;
|
|
726
|
+
}
|
|
727
|
+
function write9(bc, x) {
|
|
728
|
+
bare.writeUintSafe(bc, x.length);
|
|
729
|
+
for (let i = 0; i < x.length; i++) {
|
|
730
|
+
bare.writeString(bc, x[i]);
|
|
731
|
+
}
|
|
732
|
+
}
|
|
733
|
+
function read10(bc) {
|
|
734
|
+
const len = bare.readUintSafe(bc);
|
|
735
|
+
if (len === 0) {
|
|
736
|
+
return [];
|
|
737
|
+
}
|
|
738
|
+
const result = [readSqliteColumnValue(bc)];
|
|
739
|
+
for (let i = 1; i < len; i++) {
|
|
740
|
+
result[i] = readSqliteColumnValue(bc);
|
|
741
|
+
}
|
|
742
|
+
return result;
|
|
743
|
+
}
|
|
744
|
+
function write10(bc, x) {
|
|
745
|
+
bare.writeUintSafe(bc, x.length);
|
|
746
|
+
for (let i = 0; i < x.length; i++) {
|
|
747
|
+
writeSqliteColumnValue(bc, x[i]);
|
|
748
|
+
}
|
|
749
|
+
}
|
|
750
|
+
function read11(bc) {
|
|
751
|
+
const len = bare.readUintSafe(bc);
|
|
752
|
+
if (len === 0) {
|
|
753
|
+
return [];
|
|
754
|
+
}
|
|
755
|
+
const result = [read10(bc)];
|
|
756
|
+
for (let i = 1; i < len; i++) {
|
|
757
|
+
result[i] = read10(bc);
|
|
758
|
+
}
|
|
759
|
+
return result;
|
|
760
|
+
}
|
|
761
|
+
function write11(bc, x) {
|
|
762
|
+
bare.writeUintSafe(bc, x.length);
|
|
763
|
+
for (let i = 0; i < x.length; i++) {
|
|
764
|
+
write10(bc, x[i]);
|
|
765
|
+
}
|
|
766
|
+
}
|
|
767
|
+
function readSqliteQueryResult(bc) {
|
|
767
768
|
return {
|
|
769
|
+
columns: read9(bc),
|
|
770
|
+
rows: read11(bc)
|
|
771
|
+
};
|
|
772
|
+
}
|
|
773
|
+
function writeSqliteQueryResult(bc, x) {
|
|
774
|
+
write9(bc, x.columns);
|
|
775
|
+
write11(bc, x.rows);
|
|
776
|
+
}
|
|
777
|
+
function read12(bc) {
|
|
778
|
+
return bare.readBool(bc) ? bare.readI64(bc) : null;
|
|
779
|
+
}
|
|
780
|
+
function write12(bc, x) {
|
|
781
|
+
bare.writeBool(bc, x != null);
|
|
782
|
+
if (x != null) {
|
|
783
|
+
bare.writeI64(bc, x);
|
|
784
|
+
}
|
|
785
|
+
}
|
|
786
|
+
function readSqliteExecuteResult(bc) {
|
|
787
|
+
return {
|
|
788
|
+
columns: read9(bc),
|
|
789
|
+
rows: read11(bc),
|
|
790
|
+
changes: bare.readI64(bc),
|
|
791
|
+
lastInsertRowId: read12(bc)
|
|
792
|
+
};
|
|
793
|
+
}
|
|
794
|
+
function writeSqliteExecuteResult(bc, x) {
|
|
795
|
+
write9(bc, x.columns);
|
|
796
|
+
write11(bc, x.rows);
|
|
797
|
+
bare.writeI64(bc, x.changes);
|
|
798
|
+
write12(bc, x.lastInsertRowId);
|
|
799
|
+
}
|
|
800
|
+
function readSqliteExecRequest(bc) {
|
|
801
|
+
return {
|
|
802
|
+
namespaceId: readId(bc),
|
|
768
803
|
actorId: readId(bc),
|
|
769
804
|
generation: readSqliteGeneration(bc),
|
|
770
|
-
|
|
771
|
-
txid: readSqliteTxid(bc),
|
|
772
|
-
newDbSizePages: bare.readU32(bc)
|
|
805
|
+
sql: bare.readString(bc)
|
|
773
806
|
};
|
|
774
807
|
}
|
|
775
|
-
function
|
|
808
|
+
function writeSqliteExecRequest(bc, x) {
|
|
809
|
+
writeId(bc, x.namespaceId);
|
|
776
810
|
writeId(bc, x.actorId);
|
|
777
811
|
writeSqliteGeneration(bc, x.generation);
|
|
778
|
-
|
|
779
|
-
writeSqliteTxid(bc, x.txid);
|
|
780
|
-
bare.writeU32(bc, x.newDbSizePages);
|
|
812
|
+
bare.writeString(bc, x.sql);
|
|
781
813
|
}
|
|
782
|
-
function
|
|
814
|
+
function read13(bc) {
|
|
815
|
+
const len = bare.readUintSafe(bc);
|
|
816
|
+
if (len === 0) {
|
|
817
|
+
return [];
|
|
818
|
+
}
|
|
819
|
+
const result = [readSqliteBindParam(bc)];
|
|
820
|
+
for (let i = 1; i < len; i++) {
|
|
821
|
+
result[i] = readSqliteBindParam(bc);
|
|
822
|
+
}
|
|
823
|
+
return result;
|
|
824
|
+
}
|
|
825
|
+
function write13(bc, x) {
|
|
826
|
+
bare.writeUintSafe(bc, x.length);
|
|
827
|
+
for (let i = 0; i < x.length; i++) {
|
|
828
|
+
writeSqliteBindParam(bc, x[i]);
|
|
829
|
+
}
|
|
830
|
+
}
|
|
831
|
+
function read14(bc) {
|
|
832
|
+
return bare.readBool(bc) ? read13(bc) : null;
|
|
833
|
+
}
|
|
834
|
+
function write14(bc, x) {
|
|
835
|
+
bare.writeBool(bc, x != null);
|
|
836
|
+
if (x != null) {
|
|
837
|
+
write13(bc, x);
|
|
838
|
+
}
|
|
839
|
+
}
|
|
840
|
+
function readSqliteExecuteRequest(bc) {
|
|
783
841
|
return {
|
|
784
|
-
|
|
785
|
-
|
|
842
|
+
namespaceId: readId(bc),
|
|
843
|
+
actorId: readId(bc),
|
|
844
|
+
generation: readSqliteGeneration(bc),
|
|
845
|
+
sql: bare.readString(bc),
|
|
846
|
+
params: read14(bc)
|
|
786
847
|
};
|
|
787
848
|
}
|
|
788
|
-
function
|
|
789
|
-
|
|
790
|
-
|
|
849
|
+
function writeSqliteExecuteRequest(bc, x) {
|
|
850
|
+
writeId(bc, x.namespaceId);
|
|
851
|
+
writeId(bc, x.actorId);
|
|
852
|
+
writeSqliteGeneration(bc, x.generation);
|
|
853
|
+
bare.writeString(bc, x.sql);
|
|
854
|
+
write14(bc, x.params);
|
|
791
855
|
}
|
|
792
|
-
function
|
|
856
|
+
function readSqliteBatchStatement(bc) {
|
|
793
857
|
return {
|
|
794
|
-
|
|
858
|
+
sql: bare.readString(bc),
|
|
859
|
+
params: read14(bc)
|
|
795
860
|
};
|
|
796
861
|
}
|
|
797
|
-
function
|
|
798
|
-
|
|
862
|
+
function writeSqliteBatchStatement(bc, x) {
|
|
863
|
+
bare.writeString(bc, x.sql);
|
|
864
|
+
write14(bc, x.params);
|
|
865
|
+
}
|
|
866
|
+
function read15(bc) {
|
|
867
|
+
const len = bare.readUintSafe(bc);
|
|
868
|
+
if (len === 0) {
|
|
869
|
+
return [];
|
|
870
|
+
}
|
|
871
|
+
const result = [readSqliteBatchStatement(bc)];
|
|
872
|
+
for (let i = 1; i < len; i++) {
|
|
873
|
+
result[i] = readSqliteBatchStatement(bc);
|
|
874
|
+
}
|
|
875
|
+
return result;
|
|
876
|
+
}
|
|
877
|
+
function write15(bc, x) {
|
|
878
|
+
bare.writeUintSafe(bc, x.length);
|
|
879
|
+
for (let i = 0; i < x.length; i++) {
|
|
880
|
+
writeSqliteBatchStatement(bc, x[i]);
|
|
881
|
+
}
|
|
882
|
+
}
|
|
883
|
+
function readSqliteExecuteBatchRequest(bc) {
|
|
884
|
+
return {
|
|
885
|
+
namespaceId: readId(bc),
|
|
886
|
+
actorId: readId(bc),
|
|
887
|
+
generation: readSqliteGeneration(bc),
|
|
888
|
+
statements: read15(bc)
|
|
889
|
+
};
|
|
890
|
+
}
|
|
891
|
+
function writeSqliteExecuteBatchRequest(bc, x) {
|
|
892
|
+
writeId(bc, x.namespaceId);
|
|
893
|
+
writeId(bc, x.actorId);
|
|
894
|
+
writeSqliteGeneration(bc, x.generation);
|
|
895
|
+
write15(bc, x.statements);
|
|
896
|
+
}
|
|
897
|
+
function readSqliteExecOk(bc) {
|
|
898
|
+
return {
|
|
899
|
+
result: readSqliteQueryResult(bc)
|
|
900
|
+
};
|
|
901
|
+
}
|
|
902
|
+
function writeSqliteExecOk(bc, x) {
|
|
903
|
+
writeSqliteQueryResult(bc, x.result);
|
|
904
|
+
}
|
|
905
|
+
function readSqliteExecuteOk(bc) {
|
|
906
|
+
return {
|
|
907
|
+
result: readSqliteExecuteResult(bc)
|
|
908
|
+
};
|
|
799
909
|
}
|
|
800
|
-
function
|
|
910
|
+
function writeSqliteExecuteOk(bc, x) {
|
|
911
|
+
writeSqliteExecuteResult(bc, x.result);
|
|
912
|
+
}
|
|
913
|
+
function read16(bc) {
|
|
914
|
+
const len = bare.readUintSafe(bc);
|
|
915
|
+
if (len === 0) {
|
|
916
|
+
return [];
|
|
917
|
+
}
|
|
918
|
+
const result = [readSqliteExecuteResult(bc)];
|
|
919
|
+
for (let i = 1; i < len; i++) {
|
|
920
|
+
result[i] = readSqliteExecuteResult(bc);
|
|
921
|
+
}
|
|
922
|
+
return result;
|
|
923
|
+
}
|
|
924
|
+
function write16(bc, x) {
|
|
925
|
+
bare.writeUintSafe(bc, x.length);
|
|
926
|
+
for (let i = 0; i < x.length; i++) {
|
|
927
|
+
writeSqliteExecuteResult(bc, x[i]);
|
|
928
|
+
}
|
|
929
|
+
}
|
|
930
|
+
function readSqliteExecuteBatchOk(bc) {
|
|
931
|
+
return {
|
|
932
|
+
results: read16(bc)
|
|
933
|
+
};
|
|
934
|
+
}
|
|
935
|
+
function writeSqliteExecuteBatchOk(bc, x) {
|
|
936
|
+
write16(bc, x.results);
|
|
937
|
+
}
|
|
938
|
+
function readSqliteExecResponse(bc) {
|
|
801
939
|
const offset = bc.offset;
|
|
802
940
|
const tag = bare.readU8(bc);
|
|
803
941
|
switch (tag) {
|
|
804
942
|
case 0:
|
|
805
|
-
return { tag: "
|
|
943
|
+
return { tag: "SqliteExecOk", val: readSqliteExecOk(bc) };
|
|
806
944
|
case 1:
|
|
807
|
-
return { tag: "SqliteFenceMismatch", val: readSqliteFenceMismatch(bc) };
|
|
808
|
-
case 2:
|
|
809
|
-
return { tag: "SqliteStageNotFound", val: readSqliteStageNotFound(bc) };
|
|
810
|
-
case 3:
|
|
811
945
|
return { tag: "SqliteErrorResponse", val: readSqliteErrorResponse(bc) };
|
|
812
946
|
default: {
|
|
813
947
|
bc.offset = offset;
|
|
@@ -815,41 +949,75 @@ function readSqliteCommitFinalizeResponse(bc) {
|
|
|
815
949
|
}
|
|
816
950
|
}
|
|
817
951
|
}
|
|
818
|
-
function
|
|
952
|
+
function writeSqliteExecResponse(bc, x) {
|
|
819
953
|
switch (x.tag) {
|
|
820
|
-
case "
|
|
954
|
+
case "SqliteExecOk": {
|
|
821
955
|
bare.writeU8(bc, 0);
|
|
822
|
-
|
|
956
|
+
writeSqliteExecOk(bc, x.val);
|
|
823
957
|
break;
|
|
824
958
|
}
|
|
825
|
-
case "
|
|
959
|
+
case "SqliteErrorResponse": {
|
|
826
960
|
bare.writeU8(bc, 1);
|
|
827
|
-
|
|
961
|
+
writeSqliteErrorResponse(bc, x.val);
|
|
828
962
|
break;
|
|
829
963
|
}
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
964
|
+
}
|
|
965
|
+
}
|
|
966
|
+
function readSqliteExecuteResponse(bc) {
|
|
967
|
+
const offset = bc.offset;
|
|
968
|
+
const tag = bare.readU8(bc);
|
|
969
|
+
switch (tag) {
|
|
970
|
+
case 0:
|
|
971
|
+
return { tag: "SqliteExecuteOk", val: readSqliteExecuteOk(bc) };
|
|
972
|
+
case 1:
|
|
973
|
+
return { tag: "SqliteErrorResponse", val: readSqliteErrorResponse(bc) };
|
|
974
|
+
default: {
|
|
975
|
+
bc.offset = offset;
|
|
976
|
+
throw new bare.BareError(offset, "invalid tag");
|
|
977
|
+
}
|
|
978
|
+
}
|
|
979
|
+
}
|
|
980
|
+
function writeSqliteExecuteResponse(bc, x) {
|
|
981
|
+
switch (x.tag) {
|
|
982
|
+
case "SqliteExecuteOk": {
|
|
983
|
+
bare.writeU8(bc, 0);
|
|
984
|
+
writeSqliteExecuteOk(bc, x.val);
|
|
833
985
|
break;
|
|
834
986
|
}
|
|
835
987
|
case "SqliteErrorResponse": {
|
|
836
|
-
bare.writeU8(bc,
|
|
988
|
+
bare.writeU8(bc, 1);
|
|
837
989
|
writeSqliteErrorResponse(bc, x.val);
|
|
838
990
|
break;
|
|
839
991
|
}
|
|
840
992
|
}
|
|
841
993
|
}
|
|
842
|
-
function
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
994
|
+
function readSqliteExecuteBatchResponse(bc) {
|
|
995
|
+
const offset = bc.offset;
|
|
996
|
+
const tag = bare.readU8(bc);
|
|
997
|
+
switch (tag) {
|
|
998
|
+
case 0:
|
|
999
|
+
return { tag: "SqliteExecuteBatchOk", val: readSqliteExecuteBatchOk(bc) };
|
|
1000
|
+
case 1:
|
|
1001
|
+
return { tag: "SqliteErrorResponse", val: readSqliteErrorResponse(bc) };
|
|
1002
|
+
default: {
|
|
1003
|
+
bc.offset = offset;
|
|
1004
|
+
throw new bare.BareError(offset, "invalid tag");
|
|
1005
|
+
}
|
|
1006
|
+
}
|
|
848
1007
|
}
|
|
849
|
-
function
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
1008
|
+
function writeSqliteExecuteBatchResponse(bc, x) {
|
|
1009
|
+
switch (x.tag) {
|
|
1010
|
+
case "SqliteExecuteBatchOk": {
|
|
1011
|
+
bare.writeU8(bc, 0);
|
|
1012
|
+
writeSqliteExecuteBatchOk(bc, x.val);
|
|
1013
|
+
break;
|
|
1014
|
+
}
|
|
1015
|
+
case "SqliteErrorResponse": {
|
|
1016
|
+
bare.writeU8(bc, 1);
|
|
1017
|
+
writeSqliteErrorResponse(bc, x.val);
|
|
1018
|
+
break;
|
|
1019
|
+
}
|
|
1020
|
+
}
|
|
853
1021
|
}
|
|
854
1022
|
var StopCode = /* @__PURE__ */ ((StopCode2) => {
|
|
855
1023
|
StopCode2["Ok"] = "Ok";
|
|
@@ -890,19 +1058,19 @@ function readActorName(bc) {
|
|
|
890
1058
|
function writeActorName(bc, x) {
|
|
891
1059
|
writeJson(bc, x.metadata);
|
|
892
1060
|
}
|
|
893
|
-
function
|
|
1061
|
+
function read17(bc) {
|
|
894
1062
|
return bare.readBool(bc) ? bare.readString(bc) : null;
|
|
895
1063
|
}
|
|
896
|
-
function
|
|
1064
|
+
function write17(bc, x) {
|
|
897
1065
|
bare.writeBool(bc, x != null);
|
|
898
1066
|
if (x != null) {
|
|
899
1067
|
bare.writeString(bc, x);
|
|
900
1068
|
}
|
|
901
1069
|
}
|
|
902
|
-
function
|
|
1070
|
+
function read18(bc) {
|
|
903
1071
|
return bare.readBool(bc) ? bare.readData(bc) : null;
|
|
904
1072
|
}
|
|
905
|
-
function
|
|
1073
|
+
function write18(bc, x) {
|
|
906
1074
|
bare.writeBool(bc, x != null);
|
|
907
1075
|
if (x != null) {
|
|
908
1076
|
bare.writeData(bc, x);
|
|
@@ -911,16 +1079,16 @@ function write10(bc, x) {
|
|
|
911
1079
|
function readActorConfig(bc) {
|
|
912
1080
|
return {
|
|
913
1081
|
name: bare.readString(bc),
|
|
914
|
-
key:
|
|
1082
|
+
key: read17(bc),
|
|
915
1083
|
createTs: bare.readI64(bc),
|
|
916
|
-
input:
|
|
1084
|
+
input: read18(bc)
|
|
917
1085
|
};
|
|
918
1086
|
}
|
|
919
1087
|
function writeActorConfig(bc, x) {
|
|
920
1088
|
bare.writeString(bc, x.name);
|
|
921
|
-
|
|
1089
|
+
write17(bc, x.key);
|
|
922
1090
|
bare.writeI64(bc, x.createTs);
|
|
923
|
-
|
|
1091
|
+
write18(bc, x.input);
|
|
924
1092
|
}
|
|
925
1093
|
function readActorCheckpoint(bc) {
|
|
926
1094
|
return {
|
|
@@ -963,12 +1131,12 @@ function writeActorIntent(bc, x) {
|
|
|
963
1131
|
function readActorStateStopped(bc) {
|
|
964
1132
|
return {
|
|
965
1133
|
code: readStopCode(bc),
|
|
966
|
-
message:
|
|
1134
|
+
message: read17(bc)
|
|
967
1135
|
};
|
|
968
1136
|
}
|
|
969
1137
|
function writeActorStateStopped(bc, x) {
|
|
970
1138
|
writeStopCode(bc, x.code);
|
|
971
|
-
|
|
1139
|
+
write17(bc, x.message);
|
|
972
1140
|
}
|
|
973
1141
|
function readActorState(bc) {
|
|
974
1142
|
const offset = bc.offset;
|
|
@@ -1013,22 +1181,13 @@ function readEventActorStateUpdate(bc) {
|
|
|
1013
1181
|
function writeEventActorStateUpdate(bc, x) {
|
|
1014
1182
|
writeActorState(bc, x.state);
|
|
1015
1183
|
}
|
|
1016
|
-
function read11(bc) {
|
|
1017
|
-
return bare.readBool(bc) ? bare.readI64(bc) : null;
|
|
1018
|
-
}
|
|
1019
|
-
function write11(bc, x) {
|
|
1020
|
-
bare.writeBool(bc, x != null);
|
|
1021
|
-
if (x != null) {
|
|
1022
|
-
bare.writeI64(bc, x);
|
|
1023
|
-
}
|
|
1024
|
-
}
|
|
1025
1184
|
function readEventActorSetAlarm(bc) {
|
|
1026
1185
|
return {
|
|
1027
|
-
alarmTs:
|
|
1186
|
+
alarmTs: read12(bc)
|
|
1028
1187
|
};
|
|
1029
1188
|
}
|
|
1030
1189
|
function writeEventActorSetAlarm(bc, x) {
|
|
1031
|
-
|
|
1190
|
+
write12(bc, x.alarmTs);
|
|
1032
1191
|
}
|
|
1033
1192
|
function readEvent(bc) {
|
|
1034
1193
|
const offset = bc.offset;
|
|
@@ -1087,7 +1246,7 @@ function writePreloadedKvEntry(bc, x) {
|
|
|
1087
1246
|
writeKvValue(bc, x.value);
|
|
1088
1247
|
writeKvMetadata(bc, x.metadata);
|
|
1089
1248
|
}
|
|
1090
|
-
function
|
|
1249
|
+
function read19(bc) {
|
|
1091
1250
|
const len = bare.readUintSafe(bc);
|
|
1092
1251
|
if (len === 0) {
|
|
1093
1252
|
return [];
|
|
@@ -1098,7 +1257,7 @@ function read12(bc) {
|
|
|
1098
1257
|
}
|
|
1099
1258
|
return result;
|
|
1100
1259
|
}
|
|
1101
|
-
function
|
|
1260
|
+
function write19(bc, x) {
|
|
1102
1261
|
bare.writeUintSafe(bc, x.length);
|
|
1103
1262
|
for (let i = 0; i < x.length; i++) {
|
|
1104
1263
|
writePreloadedKvEntry(bc, x[i]);
|
|
@@ -1106,13 +1265,13 @@ function write12(bc, x) {
|
|
|
1106
1265
|
}
|
|
1107
1266
|
function readPreloadedKv(bc) {
|
|
1108
1267
|
return {
|
|
1109
|
-
entries:
|
|
1268
|
+
entries: read19(bc),
|
|
1110
1269
|
requestedGetKeys: read0(bc),
|
|
1111
1270
|
requestedPrefixes: read0(bc)
|
|
1112
1271
|
};
|
|
1113
1272
|
}
|
|
1114
1273
|
function writePreloadedKv(bc, x) {
|
|
1115
|
-
|
|
1274
|
+
write19(bc, x.entries);
|
|
1116
1275
|
write0(bc, x.requestedGetKeys);
|
|
1117
1276
|
write0(bc, x.requestedPrefixes);
|
|
1118
1277
|
}
|
|
@@ -1126,7 +1285,7 @@ function writeHibernatingRequest(bc, x) {
|
|
|
1126
1285
|
writeGatewayId(bc, x.gatewayId);
|
|
1127
1286
|
writeRequestId(bc, x.requestId);
|
|
1128
1287
|
}
|
|
1129
|
-
function
|
|
1288
|
+
function read20(bc) {
|
|
1130
1289
|
const len = bare.readUintSafe(bc);
|
|
1131
1290
|
if (len === 0) {
|
|
1132
1291
|
return [];
|
|
@@ -1137,43 +1296,32 @@ function read13(bc) {
|
|
|
1137
1296
|
}
|
|
1138
1297
|
return result;
|
|
1139
1298
|
}
|
|
1140
|
-
function
|
|
1299
|
+
function write20(bc, x) {
|
|
1141
1300
|
bare.writeUintSafe(bc, x.length);
|
|
1142
1301
|
for (let i = 0; i < x.length; i++) {
|
|
1143
1302
|
writeHibernatingRequest(bc, x[i]);
|
|
1144
1303
|
}
|
|
1145
1304
|
}
|
|
1146
|
-
function
|
|
1305
|
+
function read21(bc) {
|
|
1147
1306
|
return bare.readBool(bc) ? readPreloadedKv(bc) : null;
|
|
1148
1307
|
}
|
|
1149
|
-
function
|
|
1308
|
+
function write21(bc, x) {
|
|
1150
1309
|
bare.writeBool(bc, x != null);
|
|
1151
1310
|
if (x != null) {
|
|
1152
1311
|
writePreloadedKv(bc, x);
|
|
1153
1312
|
}
|
|
1154
1313
|
}
|
|
1155
|
-
function read15(bc) {
|
|
1156
|
-
return bare.readBool(bc) ? readSqliteStartupData(bc) : null;
|
|
1157
|
-
}
|
|
1158
|
-
function write15(bc, x) {
|
|
1159
|
-
bare.writeBool(bc, x != null);
|
|
1160
|
-
if (x != null) {
|
|
1161
|
-
writeSqliteStartupData(bc, x);
|
|
1162
|
-
}
|
|
1163
|
-
}
|
|
1164
1314
|
function readCommandStartActor(bc) {
|
|
1165
1315
|
return {
|
|
1166
1316
|
config: readActorConfig(bc),
|
|
1167
|
-
hibernatingRequests:
|
|
1168
|
-
preloadedKv:
|
|
1169
|
-
sqliteStartupData: read15(bc)
|
|
1317
|
+
hibernatingRequests: read20(bc),
|
|
1318
|
+
preloadedKv: read21(bc)
|
|
1170
1319
|
};
|
|
1171
1320
|
}
|
|
1172
1321
|
function writeCommandStartActor(bc, x) {
|
|
1173
1322
|
writeActorConfig(bc, x.config);
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
write15(bc, x.sqliteStartupData);
|
|
1323
|
+
write20(bc, x.hibernatingRequests);
|
|
1324
|
+
write21(bc, x.preloadedKv);
|
|
1177
1325
|
}
|
|
1178
1326
|
var StopActorReason = /* @__PURE__ */ ((StopActorReason2) => {
|
|
1179
1327
|
StopActorReason2["SleepIntent"] = "SleepIntent";
|
|
@@ -1330,7 +1478,16 @@ function writeMessageId(bc, x) {
|
|
|
1330
1478
|
writeRequestId(bc, x.requestId);
|
|
1331
1479
|
writeMessageIndex(bc, x.messageIndex);
|
|
1332
1480
|
}
|
|
1333
|
-
function
|
|
1481
|
+
function read22(bc) {
|
|
1482
|
+
return bare.readBool(bc) ? bare.readU32(bc) : null;
|
|
1483
|
+
}
|
|
1484
|
+
function write22(bc, x) {
|
|
1485
|
+
bare.writeBool(bc, x != null);
|
|
1486
|
+
if (x != null) {
|
|
1487
|
+
bare.writeU32(bc, x);
|
|
1488
|
+
}
|
|
1489
|
+
}
|
|
1490
|
+
function read23(bc) {
|
|
1334
1491
|
const len = bare.readUintSafe(bc);
|
|
1335
1492
|
const result = /* @__PURE__ */ new Map();
|
|
1336
1493
|
for (let i = 0; i < len; i++) {
|
|
@@ -1344,7 +1501,7 @@ function read16(bc) {
|
|
|
1344
1501
|
}
|
|
1345
1502
|
return result;
|
|
1346
1503
|
}
|
|
1347
|
-
function
|
|
1504
|
+
function write23(bc, x) {
|
|
1348
1505
|
bare.writeUintSafe(bc, x.size);
|
|
1349
1506
|
for (const kv of x) {
|
|
1350
1507
|
bare.writeString(bc, kv[0]);
|
|
@@ -1354,20 +1511,24 @@ function write16(bc, x) {
|
|
|
1354
1511
|
function readToEnvoyRequestStart(bc) {
|
|
1355
1512
|
return {
|
|
1356
1513
|
actorId: readId(bc),
|
|
1514
|
+
actorGeneration: read22(bc),
|
|
1357
1515
|
method: bare.readString(bc),
|
|
1358
1516
|
path: bare.readString(bc),
|
|
1359
|
-
headers:
|
|
1360
|
-
body:
|
|
1361
|
-
stream: bare.readBool(bc)
|
|
1517
|
+
headers: read23(bc),
|
|
1518
|
+
body: read18(bc),
|
|
1519
|
+
stream: bare.readBool(bc),
|
|
1520
|
+
responseStream: bare.readBool(bc)
|
|
1362
1521
|
};
|
|
1363
1522
|
}
|
|
1364
1523
|
function writeToEnvoyRequestStart(bc, x) {
|
|
1365
1524
|
writeId(bc, x.actorId);
|
|
1525
|
+
write22(bc, x.actorGeneration);
|
|
1366
1526
|
bare.writeString(bc, x.method);
|
|
1367
1527
|
bare.writeString(bc, x.path);
|
|
1368
|
-
|
|
1369
|
-
|
|
1528
|
+
write23(bc, x.headers);
|
|
1529
|
+
write18(bc, x.body);
|
|
1370
1530
|
bare.writeBool(bc, x.stream);
|
|
1531
|
+
bare.writeBool(bc, x.responseStream);
|
|
1371
1532
|
}
|
|
1372
1533
|
function readToEnvoyRequestChunk(bc) {
|
|
1373
1534
|
return {
|
|
@@ -1379,18 +1540,102 @@ function writeToEnvoyRequestChunk(bc, x) {
|
|
|
1379
1540
|
bare.writeData(bc, x.body);
|
|
1380
1541
|
bare.writeBool(bc, x.finish);
|
|
1381
1542
|
}
|
|
1543
|
+
function readToRivetRequestBodyWindowUpdate(bc) {
|
|
1544
|
+
return {
|
|
1545
|
+
consumedBytes: bare.readU64(bc)
|
|
1546
|
+
};
|
|
1547
|
+
}
|
|
1548
|
+
function writeToRivetRequestBodyWindowUpdate(bc, x) {
|
|
1549
|
+
bare.writeU64(bc, x.consumedBytes);
|
|
1550
|
+
}
|
|
1551
|
+
var HttpStreamAbortReasonKind = /* @__PURE__ */ ((HttpStreamAbortReasonKind2) => {
|
|
1552
|
+
HttpStreamAbortReasonKind2["Unknown"] = "Unknown";
|
|
1553
|
+
HttpStreamAbortReasonKind2["Cancelled"] = "Cancelled";
|
|
1554
|
+
HttpStreamAbortReasonKind2["HandlerError"] = "HandlerError";
|
|
1555
|
+
HttpStreamAbortReasonKind2["InternalError"] = "InternalError";
|
|
1556
|
+
return HttpStreamAbortReasonKind2;
|
|
1557
|
+
})(HttpStreamAbortReasonKind || {});
|
|
1558
|
+
function readHttpStreamAbortReasonKind(bc) {
|
|
1559
|
+
const offset = bc.offset;
|
|
1560
|
+
const tag = bare.readU8(bc);
|
|
1561
|
+
switch (tag) {
|
|
1562
|
+
case 0:
|
|
1563
|
+
return "Unknown" /* Unknown */;
|
|
1564
|
+
case 1:
|
|
1565
|
+
return "Cancelled" /* Cancelled */;
|
|
1566
|
+
case 2:
|
|
1567
|
+
return "HandlerError" /* HandlerError */;
|
|
1568
|
+
case 3:
|
|
1569
|
+
return "InternalError" /* InternalError */;
|
|
1570
|
+
default: {
|
|
1571
|
+
bc.offset = offset;
|
|
1572
|
+
throw new bare.BareError(offset, "invalid tag");
|
|
1573
|
+
}
|
|
1574
|
+
}
|
|
1575
|
+
}
|
|
1576
|
+
function writeHttpStreamAbortReasonKind(bc, x) {
|
|
1577
|
+
switch (x) {
|
|
1578
|
+
case "Unknown" /* Unknown */: {
|
|
1579
|
+
bare.writeU8(bc, 0);
|
|
1580
|
+
break;
|
|
1581
|
+
}
|
|
1582
|
+
case "Cancelled" /* Cancelled */: {
|
|
1583
|
+
bare.writeU8(bc, 1);
|
|
1584
|
+
break;
|
|
1585
|
+
}
|
|
1586
|
+
case "HandlerError" /* HandlerError */: {
|
|
1587
|
+
bare.writeU8(bc, 2);
|
|
1588
|
+
break;
|
|
1589
|
+
}
|
|
1590
|
+
case "InternalError" /* InternalError */: {
|
|
1591
|
+
bare.writeU8(bc, 3);
|
|
1592
|
+
break;
|
|
1593
|
+
}
|
|
1594
|
+
}
|
|
1595
|
+
}
|
|
1596
|
+
function readHttpStreamAbortReason(bc) {
|
|
1597
|
+
return {
|
|
1598
|
+
kind: readHttpStreamAbortReasonKind(bc),
|
|
1599
|
+
detail: read17(bc)
|
|
1600
|
+
};
|
|
1601
|
+
}
|
|
1602
|
+
function writeHttpStreamAbortReason(bc, x) {
|
|
1603
|
+
writeHttpStreamAbortReasonKind(bc, x.kind);
|
|
1604
|
+
write17(bc, x.detail);
|
|
1605
|
+
}
|
|
1606
|
+
function read24(bc) {
|
|
1607
|
+
return bare.readBool(bc) ? readId(bc) : null;
|
|
1608
|
+
}
|
|
1609
|
+
function write24(bc, x) {
|
|
1610
|
+
bare.writeBool(bc, x != null);
|
|
1611
|
+
if (x != null) {
|
|
1612
|
+
writeId(bc, x);
|
|
1613
|
+
}
|
|
1614
|
+
}
|
|
1615
|
+
function readToEnvoyRequestAbort(bc) {
|
|
1616
|
+
return {
|
|
1617
|
+
actorId: read24(bc),
|
|
1618
|
+
actorGeneration: read22(bc),
|
|
1619
|
+
reason: readHttpStreamAbortReason(bc)
|
|
1620
|
+
};
|
|
1621
|
+
}
|
|
1622
|
+
function writeToEnvoyRequestAbort(bc, x) {
|
|
1623
|
+
write24(bc, x.actorId);
|
|
1624
|
+
write22(bc, x.actorGeneration);
|
|
1625
|
+
writeHttpStreamAbortReason(bc, x.reason);
|
|
1626
|
+
}
|
|
1382
1627
|
function readToRivetResponseStart(bc) {
|
|
1383
1628
|
return {
|
|
1384
1629
|
status: bare.readU16(bc),
|
|
1385
|
-
headers:
|
|
1386
|
-
body:
|
|
1630
|
+
headers: read23(bc),
|
|
1631
|
+
body: read18(bc),
|
|
1387
1632
|
stream: bare.readBool(bc)
|
|
1388
1633
|
};
|
|
1389
1634
|
}
|
|
1390
1635
|
function writeToRivetResponseStart(bc, x) {
|
|
1391
1636
|
bare.writeU16(bc, x.status);
|
|
1392
|
-
|
|
1393
|
-
|
|
1637
|
+
write23(bc, x.headers);
|
|
1638
|
+
write18(bc, x.body);
|
|
1394
1639
|
bare.writeBool(bc, x.stream);
|
|
1395
1640
|
}
|
|
1396
1641
|
function readToRivetResponseChunk(bc) {
|
|
@@ -1403,17 +1648,35 @@ function writeToRivetResponseChunk(bc, x) {
|
|
|
1403
1648
|
bare.writeData(bc, x.body);
|
|
1404
1649
|
bare.writeBool(bc, x.finish);
|
|
1405
1650
|
}
|
|
1651
|
+
function readToEnvoyResponseBodyWindowUpdate(bc) {
|
|
1652
|
+
return {
|
|
1653
|
+
consumedBytes: bare.readU64(bc)
|
|
1654
|
+
};
|
|
1655
|
+
}
|
|
1656
|
+
function writeToEnvoyResponseBodyWindowUpdate(bc, x) {
|
|
1657
|
+
bare.writeU64(bc, x.consumedBytes);
|
|
1658
|
+
}
|
|
1659
|
+
function readToRivetResponseAbort(bc) {
|
|
1660
|
+
return {
|
|
1661
|
+
reason: readHttpStreamAbortReason(bc)
|
|
1662
|
+
};
|
|
1663
|
+
}
|
|
1664
|
+
function writeToRivetResponseAbort(bc, x) {
|
|
1665
|
+
writeHttpStreamAbortReason(bc, x.reason);
|
|
1666
|
+
}
|
|
1406
1667
|
function readToEnvoyWebSocketOpen(bc) {
|
|
1407
1668
|
return {
|
|
1408
1669
|
actorId: readId(bc),
|
|
1670
|
+
actorGeneration: read22(bc),
|
|
1409
1671
|
path: bare.readString(bc),
|
|
1410
|
-
headers:
|
|
1672
|
+
headers: read23(bc)
|
|
1411
1673
|
};
|
|
1412
1674
|
}
|
|
1413
1675
|
function writeToEnvoyWebSocketOpen(bc, x) {
|
|
1414
1676
|
writeId(bc, x.actorId);
|
|
1677
|
+
write22(bc, x.actorGeneration);
|
|
1415
1678
|
bare.writeString(bc, x.path);
|
|
1416
|
-
|
|
1679
|
+
write23(bc, x.headers);
|
|
1417
1680
|
}
|
|
1418
1681
|
function readToEnvoyWebSocketMessage(bc) {
|
|
1419
1682
|
return {
|
|
@@ -1425,10 +1688,10 @@ function writeToEnvoyWebSocketMessage(bc, x) {
|
|
|
1425
1688
|
bare.writeData(bc, x.data);
|
|
1426
1689
|
bare.writeBool(bc, x.binary);
|
|
1427
1690
|
}
|
|
1428
|
-
function
|
|
1691
|
+
function read25(bc) {
|
|
1429
1692
|
return bare.readBool(bc) ? bare.readU16(bc) : null;
|
|
1430
1693
|
}
|
|
1431
|
-
function
|
|
1694
|
+
function write25(bc, x) {
|
|
1432
1695
|
bare.writeBool(bc, x != null);
|
|
1433
1696
|
if (x != null) {
|
|
1434
1697
|
bare.writeU16(bc, x);
|
|
@@ -1436,13 +1699,13 @@ function write17(bc, x) {
|
|
|
1436
1699
|
}
|
|
1437
1700
|
function readToEnvoyWebSocketClose(bc) {
|
|
1438
1701
|
return {
|
|
1439
|
-
code:
|
|
1440
|
-
reason:
|
|
1702
|
+
code: read25(bc),
|
|
1703
|
+
reason: read17(bc)
|
|
1441
1704
|
};
|
|
1442
1705
|
}
|
|
1443
1706
|
function writeToEnvoyWebSocketClose(bc, x) {
|
|
1444
|
-
|
|
1445
|
-
|
|
1707
|
+
write25(bc, x.code);
|
|
1708
|
+
write17(bc, x.reason);
|
|
1446
1709
|
}
|
|
1447
1710
|
function readToRivetWebSocketOpen(bc) {
|
|
1448
1711
|
return {
|
|
@@ -1472,14 +1735,14 @@ function writeToRivetWebSocketMessageAck(bc, x) {
|
|
|
1472
1735
|
}
|
|
1473
1736
|
function readToRivetWebSocketClose(bc) {
|
|
1474
1737
|
return {
|
|
1475
|
-
code:
|
|
1476
|
-
reason:
|
|
1738
|
+
code: read25(bc),
|
|
1739
|
+
reason: read17(bc),
|
|
1477
1740
|
hibernate: bare.readBool(bc)
|
|
1478
1741
|
};
|
|
1479
1742
|
}
|
|
1480
1743
|
function writeToRivetWebSocketClose(bc, x) {
|
|
1481
|
-
|
|
1482
|
-
|
|
1744
|
+
write25(bc, x.code);
|
|
1745
|
+
write17(bc, x.reason);
|
|
1483
1746
|
bare.writeBool(bc, x.hibernate);
|
|
1484
1747
|
}
|
|
1485
1748
|
function readToRivetTunnelMessageKind(bc) {
|
|
@@ -1491,14 +1754,18 @@ function readToRivetTunnelMessageKind(bc) {
|
|
|
1491
1754
|
case 1:
|
|
1492
1755
|
return { tag: "ToRivetResponseChunk", val: readToRivetResponseChunk(bc) };
|
|
1493
1756
|
case 2:
|
|
1494
|
-
return { tag: "ToRivetResponseAbort", val:
|
|
1757
|
+
return { tag: "ToRivetResponseAbort", val: readToRivetResponseAbort(bc) };
|
|
1495
1758
|
case 3:
|
|
1496
|
-
return { tag: "
|
|
1759
|
+
return { tag: "ToRivetRequestBodyWindowUpdate", val: readToRivetRequestBodyWindowUpdate(bc) };
|
|
1497
1760
|
case 4:
|
|
1498
|
-
return { tag: "
|
|
1761
|
+
return { tag: "ToRivetRequestBodyCancel", val: null };
|
|
1499
1762
|
case 5:
|
|
1500
|
-
return { tag: "
|
|
1763
|
+
return { tag: "ToRivetWebSocketOpen", val: readToRivetWebSocketOpen(bc) };
|
|
1501
1764
|
case 6:
|
|
1765
|
+
return { tag: "ToRivetWebSocketMessage", val: readToRivetWebSocketMessage(bc) };
|
|
1766
|
+
case 7:
|
|
1767
|
+
return { tag: "ToRivetWebSocketMessageAck", val: readToRivetWebSocketMessageAck(bc) };
|
|
1768
|
+
case 8:
|
|
1502
1769
|
return { tag: "ToRivetWebSocketClose", val: readToRivetWebSocketClose(bc) };
|
|
1503
1770
|
default: {
|
|
1504
1771
|
bc.offset = offset;
|
|
@@ -1520,25 +1787,35 @@ function writeToRivetTunnelMessageKind(bc, x) {
|
|
|
1520
1787
|
}
|
|
1521
1788
|
case "ToRivetResponseAbort": {
|
|
1522
1789
|
bare.writeU8(bc, 2);
|
|
1790
|
+
writeToRivetResponseAbort(bc, x.val);
|
|
1523
1791
|
break;
|
|
1524
1792
|
}
|
|
1525
|
-
case "
|
|
1793
|
+
case "ToRivetRequestBodyWindowUpdate": {
|
|
1526
1794
|
bare.writeU8(bc, 3);
|
|
1795
|
+
writeToRivetRequestBodyWindowUpdate(bc, x.val);
|
|
1796
|
+
break;
|
|
1797
|
+
}
|
|
1798
|
+
case "ToRivetRequestBodyCancel": {
|
|
1799
|
+
bare.writeU8(bc, 4);
|
|
1800
|
+
break;
|
|
1801
|
+
}
|
|
1802
|
+
case "ToRivetWebSocketOpen": {
|
|
1803
|
+
bare.writeU8(bc, 5);
|
|
1527
1804
|
writeToRivetWebSocketOpen(bc, x.val);
|
|
1528
1805
|
break;
|
|
1529
1806
|
}
|
|
1530
1807
|
case "ToRivetWebSocketMessage": {
|
|
1531
|
-
bare.writeU8(bc,
|
|
1808
|
+
bare.writeU8(bc, 6);
|
|
1532
1809
|
writeToRivetWebSocketMessage(bc, x.val);
|
|
1533
1810
|
break;
|
|
1534
1811
|
}
|
|
1535
1812
|
case "ToRivetWebSocketMessageAck": {
|
|
1536
|
-
bare.writeU8(bc,
|
|
1813
|
+
bare.writeU8(bc, 7);
|
|
1537
1814
|
writeToRivetWebSocketMessageAck(bc, x.val);
|
|
1538
1815
|
break;
|
|
1539
1816
|
}
|
|
1540
1817
|
case "ToRivetWebSocketClose": {
|
|
1541
|
-
bare.writeU8(bc,
|
|
1818
|
+
bare.writeU8(bc, 8);
|
|
1542
1819
|
writeToRivetWebSocketClose(bc, x.val);
|
|
1543
1820
|
break;
|
|
1544
1821
|
}
|
|
@@ -1563,12 +1840,16 @@ function readToEnvoyTunnelMessageKind(bc) {
|
|
|
1563
1840
|
case 1:
|
|
1564
1841
|
return { tag: "ToEnvoyRequestChunk", val: readToEnvoyRequestChunk(bc) };
|
|
1565
1842
|
case 2:
|
|
1566
|
-
return { tag: "ToEnvoyRequestAbort", val:
|
|
1843
|
+
return { tag: "ToEnvoyRequestAbort", val: readToEnvoyRequestAbort(bc) };
|
|
1567
1844
|
case 3:
|
|
1568
|
-
return { tag: "
|
|
1845
|
+
return { tag: "ToEnvoyRequestBodyCancel", val: null };
|
|
1569
1846
|
case 4:
|
|
1570
|
-
return { tag: "
|
|
1847
|
+
return { tag: "ToEnvoyResponseBodyWindowUpdate", val: readToEnvoyResponseBodyWindowUpdate(bc) };
|
|
1571
1848
|
case 5:
|
|
1849
|
+
return { tag: "ToEnvoyWebSocketOpen", val: readToEnvoyWebSocketOpen(bc) };
|
|
1850
|
+
case 6:
|
|
1851
|
+
return { tag: "ToEnvoyWebSocketMessage", val: readToEnvoyWebSocketMessage(bc) };
|
|
1852
|
+
case 7:
|
|
1572
1853
|
return { tag: "ToEnvoyWebSocketClose", val: readToEnvoyWebSocketClose(bc) };
|
|
1573
1854
|
default: {
|
|
1574
1855
|
bc.offset = offset;
|
|
@@ -1590,20 +1871,30 @@ function writeToEnvoyTunnelMessageKind(bc, x) {
|
|
|
1590
1871
|
}
|
|
1591
1872
|
case "ToEnvoyRequestAbort": {
|
|
1592
1873
|
bare.writeU8(bc, 2);
|
|
1874
|
+
writeToEnvoyRequestAbort(bc, x.val);
|
|
1593
1875
|
break;
|
|
1594
1876
|
}
|
|
1595
|
-
case "
|
|
1877
|
+
case "ToEnvoyRequestBodyCancel": {
|
|
1596
1878
|
bare.writeU8(bc, 3);
|
|
1879
|
+
break;
|
|
1880
|
+
}
|
|
1881
|
+
case "ToEnvoyResponseBodyWindowUpdate": {
|
|
1882
|
+
bare.writeU8(bc, 4);
|
|
1883
|
+
writeToEnvoyResponseBodyWindowUpdate(bc, x.val);
|
|
1884
|
+
break;
|
|
1885
|
+
}
|
|
1886
|
+
case "ToEnvoyWebSocketOpen": {
|
|
1887
|
+
bare.writeU8(bc, 5);
|
|
1597
1888
|
writeToEnvoyWebSocketOpen(bc, x.val);
|
|
1598
1889
|
break;
|
|
1599
1890
|
}
|
|
1600
1891
|
case "ToEnvoyWebSocketMessage": {
|
|
1601
|
-
bare.writeU8(bc,
|
|
1892
|
+
bare.writeU8(bc, 6);
|
|
1602
1893
|
writeToEnvoyWebSocketMessage(bc, x.val);
|
|
1603
1894
|
break;
|
|
1604
1895
|
}
|
|
1605
1896
|
case "ToEnvoyWebSocketClose": {
|
|
1606
|
-
bare.writeU8(bc,
|
|
1897
|
+
bare.writeU8(bc, 7);
|
|
1607
1898
|
writeToEnvoyWebSocketClose(bc, x.val);
|
|
1608
1899
|
break;
|
|
1609
1900
|
}
|
|
@@ -1627,7 +1918,7 @@ function readToEnvoyPing(bc) {
|
|
|
1627
1918
|
function writeToEnvoyPing(bc, x) {
|
|
1628
1919
|
bare.writeI64(bc, x.ts);
|
|
1629
1920
|
}
|
|
1630
|
-
function
|
|
1921
|
+
function read26(bc) {
|
|
1631
1922
|
const len = bare.readUintSafe(bc);
|
|
1632
1923
|
const result = /* @__PURE__ */ new Map();
|
|
1633
1924
|
for (let i = 0; i < len; i++) {
|
|
@@ -1641,26 +1932,26 @@ function read18(bc) {
|
|
|
1641
1932
|
}
|
|
1642
1933
|
return result;
|
|
1643
1934
|
}
|
|
1644
|
-
function
|
|
1935
|
+
function write26(bc, x) {
|
|
1645
1936
|
bare.writeUintSafe(bc, x.size);
|
|
1646
1937
|
for (const kv of x) {
|
|
1647
1938
|
bare.writeString(bc, kv[0]);
|
|
1648
1939
|
writeActorName(bc, kv[1]);
|
|
1649
1940
|
}
|
|
1650
1941
|
}
|
|
1651
|
-
function
|
|
1652
|
-
return bare.readBool(bc) ?
|
|
1942
|
+
function read27(bc) {
|
|
1943
|
+
return bare.readBool(bc) ? read26(bc) : null;
|
|
1653
1944
|
}
|
|
1654
|
-
function
|
|
1945
|
+
function write27(bc, x) {
|
|
1655
1946
|
bare.writeBool(bc, x != null);
|
|
1656
1947
|
if (x != null) {
|
|
1657
|
-
|
|
1948
|
+
write26(bc, x);
|
|
1658
1949
|
}
|
|
1659
1950
|
}
|
|
1660
|
-
function
|
|
1951
|
+
function read28(bc) {
|
|
1661
1952
|
return bare.readBool(bc) ? readJson(bc) : null;
|
|
1662
1953
|
}
|
|
1663
|
-
function
|
|
1954
|
+
function write28(bc, x) {
|
|
1664
1955
|
bare.writeBool(bc, x != null);
|
|
1665
1956
|
if (x != null) {
|
|
1666
1957
|
writeJson(bc, x);
|
|
@@ -1668,13 +1959,13 @@ function write20(bc, x) {
|
|
|
1668
1959
|
}
|
|
1669
1960
|
function readToRivetMetadata(bc) {
|
|
1670
1961
|
return {
|
|
1671
|
-
prepopulateActorNames:
|
|
1672
|
-
metadata:
|
|
1962
|
+
prepopulateActorNames: read27(bc),
|
|
1963
|
+
metadata: read28(bc)
|
|
1673
1964
|
};
|
|
1674
1965
|
}
|
|
1675
1966
|
function writeToRivetMetadata(bc, x) {
|
|
1676
|
-
|
|
1677
|
-
|
|
1967
|
+
write27(bc, x.prepopulateActorNames);
|
|
1968
|
+
write28(bc, x.metadata);
|
|
1678
1969
|
}
|
|
1679
1970
|
function readToRivetEvents(bc) {
|
|
1680
1971
|
const len = bare.readUintSafe(bc);
|
|
@@ -1693,7 +1984,7 @@ function writeToRivetEvents(bc, x) {
|
|
|
1693
1984
|
writeEventWrapper(bc, x[i]);
|
|
1694
1985
|
}
|
|
1695
1986
|
}
|
|
1696
|
-
function
|
|
1987
|
+
function read29(bc) {
|
|
1697
1988
|
const len = bare.readUintSafe(bc);
|
|
1698
1989
|
if (len === 0) {
|
|
1699
1990
|
return [];
|
|
@@ -1704,7 +1995,7 @@ function read21(bc) {
|
|
|
1704
1995
|
}
|
|
1705
1996
|
return result;
|
|
1706
1997
|
}
|
|
1707
|
-
function
|
|
1998
|
+
function write29(bc, x) {
|
|
1708
1999
|
bare.writeUintSafe(bc, x.length);
|
|
1709
2000
|
for (let i = 0; i < x.length; i++) {
|
|
1710
2001
|
writeActorCheckpoint(bc, x[i]);
|
|
@@ -1712,11 +2003,11 @@ function write21(bc, x) {
|
|
|
1712
2003
|
}
|
|
1713
2004
|
function readToRivetAckCommands(bc) {
|
|
1714
2005
|
return {
|
|
1715
|
-
lastCommandCheckpoints:
|
|
2006
|
+
lastCommandCheckpoints: read29(bc)
|
|
1716
2007
|
};
|
|
1717
2008
|
}
|
|
1718
2009
|
function writeToRivetAckCommands(bc, x) {
|
|
1719
|
-
|
|
2010
|
+
write29(bc, x.lastCommandCheckpoints);
|
|
1720
2011
|
}
|
|
1721
2012
|
function readToRivetPong(bc) {
|
|
1722
2013
|
return {
|
|
@@ -1758,35 +2049,35 @@ function writeToRivetSqliteCommitRequest(bc, x) {
|
|
|
1758
2049
|
bare.writeU32(bc, x.requestId);
|
|
1759
2050
|
writeSqliteCommitRequest(bc, x.data);
|
|
1760
2051
|
}
|
|
1761
|
-
function
|
|
2052
|
+
function readToRivetSqliteExecRequest(bc) {
|
|
1762
2053
|
return {
|
|
1763
2054
|
requestId: bare.readU32(bc),
|
|
1764
|
-
data:
|
|
2055
|
+
data: readSqliteExecRequest(bc)
|
|
1765
2056
|
};
|
|
1766
2057
|
}
|
|
1767
|
-
function
|
|
2058
|
+
function writeToRivetSqliteExecRequest(bc, x) {
|
|
1768
2059
|
bare.writeU32(bc, x.requestId);
|
|
1769
|
-
|
|
2060
|
+
writeSqliteExecRequest(bc, x.data);
|
|
1770
2061
|
}
|
|
1771
|
-
function
|
|
2062
|
+
function readToRivetSqliteExecuteRequest(bc) {
|
|
1772
2063
|
return {
|
|
1773
2064
|
requestId: bare.readU32(bc),
|
|
1774
|
-
data:
|
|
2065
|
+
data: readSqliteExecuteRequest(bc)
|
|
1775
2066
|
};
|
|
1776
2067
|
}
|
|
1777
|
-
function
|
|
2068
|
+
function writeToRivetSqliteExecuteRequest(bc, x) {
|
|
1778
2069
|
bare.writeU32(bc, x.requestId);
|
|
1779
|
-
|
|
2070
|
+
writeSqliteExecuteRequest(bc, x.data);
|
|
1780
2071
|
}
|
|
1781
|
-
function
|
|
2072
|
+
function readToRivetSqliteExecuteBatchRequest(bc) {
|
|
1782
2073
|
return {
|
|
1783
2074
|
requestId: bare.readU32(bc),
|
|
1784
|
-
data:
|
|
2075
|
+
data: readSqliteExecuteBatchRequest(bc)
|
|
1785
2076
|
};
|
|
1786
2077
|
}
|
|
1787
|
-
function
|
|
2078
|
+
function writeToRivetSqliteExecuteBatchRequest(bc, x) {
|
|
1788
2079
|
bare.writeU32(bc, x.requestId);
|
|
1789
|
-
|
|
2080
|
+
writeSqliteExecuteBatchRequest(bc, x.data);
|
|
1790
2081
|
}
|
|
1791
2082
|
function readToRivet(bc) {
|
|
1792
2083
|
const offset = bc.offset;
|
|
@@ -1811,11 +2102,11 @@ function readToRivet(bc) {
|
|
|
1811
2102
|
case 8:
|
|
1812
2103
|
return { tag: "ToRivetSqliteCommitRequest", val: readToRivetSqliteCommitRequest(bc) };
|
|
1813
2104
|
case 9:
|
|
1814
|
-
return { tag: "
|
|
2105
|
+
return { tag: "ToRivetSqliteExecRequest", val: readToRivetSqliteExecRequest(bc) };
|
|
1815
2106
|
case 10:
|
|
1816
|
-
return { tag: "
|
|
2107
|
+
return { tag: "ToRivetSqliteExecuteRequest", val: readToRivetSqliteExecuteRequest(bc) };
|
|
1817
2108
|
case 11:
|
|
1818
|
-
return { tag: "
|
|
2109
|
+
return { tag: "ToRivetSqliteExecuteBatchRequest", val: readToRivetSqliteExecuteBatchRequest(bc) };
|
|
1819
2110
|
default: {
|
|
1820
2111
|
bc.offset = offset;
|
|
1821
2112
|
throw new bare.BareError(offset, "invalid tag");
|
|
@@ -1868,19 +2159,19 @@ function writeToRivet(bc, x) {
|
|
|
1868
2159
|
writeToRivetSqliteCommitRequest(bc, x.val);
|
|
1869
2160
|
break;
|
|
1870
2161
|
}
|
|
1871
|
-
case "
|
|
2162
|
+
case "ToRivetSqliteExecRequest": {
|
|
1872
2163
|
bare.writeU8(bc, 9);
|
|
1873
|
-
|
|
2164
|
+
writeToRivetSqliteExecRequest(bc, x.val);
|
|
1874
2165
|
break;
|
|
1875
2166
|
}
|
|
1876
|
-
case "
|
|
2167
|
+
case "ToRivetSqliteExecuteRequest": {
|
|
1877
2168
|
bare.writeU8(bc, 10);
|
|
1878
|
-
|
|
2169
|
+
writeToRivetSqliteExecuteRequest(bc, x.val);
|
|
1879
2170
|
break;
|
|
1880
2171
|
}
|
|
1881
|
-
case "
|
|
2172
|
+
case "ToRivetSqliteExecuteBatchRequest": {
|
|
1882
2173
|
bare.writeU8(bc, 11);
|
|
1883
|
-
|
|
2174
|
+
writeToRivetSqliteExecuteBatchRequest(bc, x.val);
|
|
1884
2175
|
break;
|
|
1885
2176
|
}
|
|
1886
2177
|
}
|
|
@@ -1941,11 +2232,11 @@ function writeToEnvoyCommands(bc, x) {
|
|
|
1941
2232
|
}
|
|
1942
2233
|
function readToEnvoyAckEvents(bc) {
|
|
1943
2234
|
return {
|
|
1944
|
-
lastEventCheckpoints:
|
|
2235
|
+
lastEventCheckpoints: read29(bc)
|
|
1945
2236
|
};
|
|
1946
2237
|
}
|
|
1947
2238
|
function writeToEnvoyAckEvents(bc, x) {
|
|
1948
|
-
|
|
2239
|
+
write29(bc, x.lastEventCheckpoints);
|
|
1949
2240
|
}
|
|
1950
2241
|
function readToEnvoyKvResponse(bc) {
|
|
1951
2242
|
return {
|
|
@@ -1977,35 +2268,35 @@ function writeToEnvoySqliteCommitResponse(bc, x) {
|
|
|
1977
2268
|
bare.writeU32(bc, x.requestId);
|
|
1978
2269
|
writeSqliteCommitResponse(bc, x.data);
|
|
1979
2270
|
}
|
|
1980
|
-
function
|
|
2271
|
+
function readToEnvoySqliteExecResponse(bc) {
|
|
1981
2272
|
return {
|
|
1982
2273
|
requestId: bare.readU32(bc),
|
|
1983
|
-
data:
|
|
2274
|
+
data: readSqliteExecResponse(bc)
|
|
1984
2275
|
};
|
|
1985
2276
|
}
|
|
1986
|
-
function
|
|
2277
|
+
function writeToEnvoySqliteExecResponse(bc, x) {
|
|
1987
2278
|
bare.writeU32(bc, x.requestId);
|
|
1988
|
-
|
|
2279
|
+
writeSqliteExecResponse(bc, x.data);
|
|
1989
2280
|
}
|
|
1990
|
-
function
|
|
2281
|
+
function readToEnvoySqliteExecuteResponse(bc) {
|
|
1991
2282
|
return {
|
|
1992
2283
|
requestId: bare.readU32(bc),
|
|
1993
|
-
data:
|
|
2284
|
+
data: readSqliteExecuteResponse(bc)
|
|
1994
2285
|
};
|
|
1995
2286
|
}
|
|
1996
|
-
function
|
|
2287
|
+
function writeToEnvoySqliteExecuteResponse(bc, x) {
|
|
1997
2288
|
bare.writeU32(bc, x.requestId);
|
|
1998
|
-
|
|
2289
|
+
writeSqliteExecuteResponse(bc, x.data);
|
|
1999
2290
|
}
|
|
2000
|
-
function
|
|
2291
|
+
function readToEnvoySqliteExecuteBatchResponse(bc) {
|
|
2001
2292
|
return {
|
|
2002
2293
|
requestId: bare.readU32(bc),
|
|
2003
|
-
data:
|
|
2294
|
+
data: readSqliteExecuteBatchResponse(bc)
|
|
2004
2295
|
};
|
|
2005
2296
|
}
|
|
2006
|
-
function
|
|
2297
|
+
function writeToEnvoySqliteExecuteBatchResponse(bc, x) {
|
|
2007
2298
|
bare.writeU32(bc, x.requestId);
|
|
2008
|
-
|
|
2299
|
+
writeSqliteExecuteBatchResponse(bc, x.data);
|
|
2009
2300
|
}
|
|
2010
2301
|
function readToEnvoy(bc) {
|
|
2011
2302
|
const offset = bc.offset;
|
|
@@ -2028,11 +2319,11 @@ function readToEnvoy(bc) {
|
|
|
2028
2319
|
case 7:
|
|
2029
2320
|
return { tag: "ToEnvoySqliteCommitResponse", val: readToEnvoySqliteCommitResponse(bc) };
|
|
2030
2321
|
case 8:
|
|
2031
|
-
return { tag: "
|
|
2322
|
+
return { tag: "ToEnvoySqliteExecResponse", val: readToEnvoySqliteExecResponse(bc) };
|
|
2032
2323
|
case 9:
|
|
2033
|
-
return { tag: "
|
|
2324
|
+
return { tag: "ToEnvoySqliteExecuteResponse", val: readToEnvoySqliteExecuteResponse(bc) };
|
|
2034
2325
|
case 10:
|
|
2035
|
-
return { tag: "
|
|
2326
|
+
return { tag: "ToEnvoySqliteExecuteBatchResponse", val: readToEnvoySqliteExecuteBatchResponse(bc) };
|
|
2036
2327
|
default: {
|
|
2037
2328
|
bc.offset = offset;
|
|
2038
2329
|
throw new bare.BareError(offset, "invalid tag");
|
|
@@ -2081,19 +2372,19 @@ function writeToEnvoy(bc, x) {
|
|
|
2081
2372
|
writeToEnvoySqliteCommitResponse(bc, x.val);
|
|
2082
2373
|
break;
|
|
2083
2374
|
}
|
|
2084
|
-
case "
|
|
2375
|
+
case "ToEnvoySqliteExecResponse": {
|
|
2085
2376
|
bare.writeU8(bc, 8);
|
|
2086
|
-
|
|
2377
|
+
writeToEnvoySqliteExecResponse(bc, x.val);
|
|
2087
2378
|
break;
|
|
2088
2379
|
}
|
|
2089
|
-
case "
|
|
2380
|
+
case "ToEnvoySqliteExecuteResponse": {
|
|
2090
2381
|
bare.writeU8(bc, 9);
|
|
2091
|
-
|
|
2382
|
+
writeToEnvoySqliteExecuteResponse(bc, x.val);
|
|
2092
2383
|
break;
|
|
2093
2384
|
}
|
|
2094
|
-
case "
|
|
2385
|
+
case "ToEnvoySqliteExecuteBatchResponse": {
|
|
2095
2386
|
bare.writeU8(bc, 10);
|
|
2096
|
-
|
|
2387
|
+
writeToEnvoySqliteExecuteBatchResponse(bc, x.val);
|
|
2097
2388
|
break;
|
|
2098
2389
|
}
|
|
2099
2390
|
}
|
|
@@ -2302,8 +2593,9 @@ function decodeToOutbound(bytes) {
|
|
|
2302
2593
|
function assert(condition, message) {
|
|
2303
2594
|
if (!condition) throw new Error(message ?? "Assertion failed");
|
|
2304
2595
|
}
|
|
2305
|
-
var VERSION =
|
|
2596
|
+
var VERSION = 7;
|
|
2306
2597
|
export {
|
|
2598
|
+
HttpStreamAbortReasonKind,
|
|
2307
2599
|
StopActorReason,
|
|
2308
2600
|
StopCode,
|
|
2309
2601
|
VERSION,
|
|
@@ -2337,6 +2629,8 @@ export {
|
|
|
2337
2629
|
readEventWrapper,
|
|
2338
2630
|
readGatewayId,
|
|
2339
2631
|
readHibernatingRequest,
|
|
2632
|
+
readHttpStreamAbortReason,
|
|
2633
|
+
readHttpStreamAbortReasonKind,
|
|
2340
2634
|
readId,
|
|
2341
2635
|
readJson,
|
|
2342
2636
|
readKvDeleteRangeRequest,
|
|
@@ -2361,34 +2655,36 @@ export {
|
|
|
2361
2655
|
readPreloadedKvEntry,
|
|
2362
2656
|
readProtocolMetadata,
|
|
2363
2657
|
readRequestId,
|
|
2364
|
-
|
|
2365
|
-
|
|
2366
|
-
|
|
2658
|
+
readSqliteBatchStatement,
|
|
2659
|
+
readSqliteBindParam,
|
|
2660
|
+
readSqliteColumnValue,
|
|
2367
2661
|
readSqliteCommitOk,
|
|
2368
2662
|
readSqliteCommitRequest,
|
|
2369
2663
|
readSqliteCommitResponse,
|
|
2370
|
-
readSqliteCommitStageBeginOk,
|
|
2371
|
-
readSqliteCommitStageBeginRequest,
|
|
2372
|
-
readSqliteCommitStageBeginResponse,
|
|
2373
|
-
readSqliteCommitStageOk,
|
|
2374
|
-
readSqliteCommitStageRequest,
|
|
2375
|
-
readSqliteCommitStageResponse,
|
|
2376
|
-
readSqliteCommitTooLarge,
|
|
2377
2664
|
readSqliteDirtyPage,
|
|
2378
2665
|
readSqliteErrorResponse,
|
|
2379
|
-
|
|
2666
|
+
readSqliteExecOk,
|
|
2667
|
+
readSqliteExecRequest,
|
|
2668
|
+
readSqliteExecResponse,
|
|
2669
|
+
readSqliteExecuteBatchOk,
|
|
2670
|
+
readSqliteExecuteBatchRequest,
|
|
2671
|
+
readSqliteExecuteBatchResponse,
|
|
2672
|
+
readSqliteExecuteOk,
|
|
2673
|
+
readSqliteExecuteRequest,
|
|
2674
|
+
readSqliteExecuteResponse,
|
|
2675
|
+
readSqliteExecuteResult,
|
|
2380
2676
|
readSqliteFetchedPage,
|
|
2381
2677
|
readSqliteGeneration,
|
|
2382
2678
|
readSqliteGetPagesOk,
|
|
2383
2679
|
readSqliteGetPagesRequest,
|
|
2384
2680
|
readSqliteGetPagesResponse,
|
|
2385
|
-
readSqliteMeta,
|
|
2386
2681
|
readSqlitePageBytes,
|
|
2387
2682
|
readSqlitePgno,
|
|
2388
|
-
|
|
2389
|
-
|
|
2390
|
-
|
|
2391
|
-
|
|
2683
|
+
readSqliteQueryResult,
|
|
2684
|
+
readSqliteValueBlob,
|
|
2685
|
+
readSqliteValueFloat,
|
|
2686
|
+
readSqliteValueInteger,
|
|
2687
|
+
readSqliteValueText,
|
|
2392
2688
|
readStopActorReason,
|
|
2393
2689
|
readStopCode,
|
|
2394
2690
|
readToEnvoy,
|
|
@@ -2399,12 +2695,14 @@ export {
|
|
|
2399
2695
|
readToEnvoyInit,
|
|
2400
2696
|
readToEnvoyKvResponse,
|
|
2401
2697
|
readToEnvoyPing,
|
|
2698
|
+
readToEnvoyRequestAbort,
|
|
2402
2699
|
readToEnvoyRequestChunk,
|
|
2403
2700
|
readToEnvoyRequestStart,
|
|
2404
|
-
|
|
2701
|
+
readToEnvoyResponseBodyWindowUpdate,
|
|
2405
2702
|
readToEnvoySqliteCommitResponse,
|
|
2406
|
-
|
|
2407
|
-
|
|
2703
|
+
readToEnvoySqliteExecResponse,
|
|
2704
|
+
readToEnvoySqliteExecuteBatchResponse,
|
|
2705
|
+
readToEnvoySqliteExecuteResponse,
|
|
2408
2706
|
readToEnvoySqliteGetPagesResponse,
|
|
2409
2707
|
readToEnvoyTunnelMessage,
|
|
2410
2708
|
readToEnvoyTunnelMessageKind,
|
|
@@ -2421,12 +2719,14 @@ export {
|
|
|
2421
2719
|
readToRivetKvRequest,
|
|
2422
2720
|
readToRivetMetadata,
|
|
2423
2721
|
readToRivetPong,
|
|
2722
|
+
readToRivetRequestBodyWindowUpdate,
|
|
2723
|
+
readToRivetResponseAbort,
|
|
2424
2724
|
readToRivetResponseChunk,
|
|
2425
2725
|
readToRivetResponseStart,
|
|
2426
|
-
readToRivetSqliteCommitFinalizeRequest,
|
|
2427
2726
|
readToRivetSqliteCommitRequest,
|
|
2428
|
-
|
|
2429
|
-
|
|
2727
|
+
readToRivetSqliteExecRequest,
|
|
2728
|
+
readToRivetSqliteExecuteBatchRequest,
|
|
2729
|
+
readToRivetSqliteExecuteRequest,
|
|
2430
2730
|
readToRivetSqliteGetPagesRequest,
|
|
2431
2731
|
readToRivetTunnelMessage,
|
|
2432
2732
|
readToRivetTunnelMessageKind,
|
|
@@ -2452,6 +2752,8 @@ export {
|
|
|
2452
2752
|
writeEventWrapper,
|
|
2453
2753
|
writeGatewayId,
|
|
2454
2754
|
writeHibernatingRequest,
|
|
2755
|
+
writeHttpStreamAbortReason,
|
|
2756
|
+
writeHttpStreamAbortReasonKind,
|
|
2455
2757
|
writeId,
|
|
2456
2758
|
writeJson,
|
|
2457
2759
|
writeKvDeleteRangeRequest,
|
|
@@ -2476,34 +2778,36 @@ export {
|
|
|
2476
2778
|
writePreloadedKvEntry,
|
|
2477
2779
|
writeProtocolMetadata,
|
|
2478
2780
|
writeRequestId,
|
|
2479
|
-
|
|
2480
|
-
|
|
2481
|
-
|
|
2781
|
+
writeSqliteBatchStatement,
|
|
2782
|
+
writeSqliteBindParam,
|
|
2783
|
+
writeSqliteColumnValue,
|
|
2482
2784
|
writeSqliteCommitOk,
|
|
2483
2785
|
writeSqliteCommitRequest,
|
|
2484
2786
|
writeSqliteCommitResponse,
|
|
2485
|
-
writeSqliteCommitStageBeginOk,
|
|
2486
|
-
writeSqliteCommitStageBeginRequest,
|
|
2487
|
-
writeSqliteCommitStageBeginResponse,
|
|
2488
|
-
writeSqliteCommitStageOk,
|
|
2489
|
-
writeSqliteCommitStageRequest,
|
|
2490
|
-
writeSqliteCommitStageResponse,
|
|
2491
|
-
writeSqliteCommitTooLarge,
|
|
2492
2787
|
writeSqliteDirtyPage,
|
|
2493
2788
|
writeSqliteErrorResponse,
|
|
2494
|
-
|
|
2789
|
+
writeSqliteExecOk,
|
|
2790
|
+
writeSqliteExecRequest,
|
|
2791
|
+
writeSqliteExecResponse,
|
|
2792
|
+
writeSqliteExecuteBatchOk,
|
|
2793
|
+
writeSqliteExecuteBatchRequest,
|
|
2794
|
+
writeSqliteExecuteBatchResponse,
|
|
2795
|
+
writeSqliteExecuteOk,
|
|
2796
|
+
writeSqliteExecuteRequest,
|
|
2797
|
+
writeSqliteExecuteResponse,
|
|
2798
|
+
writeSqliteExecuteResult,
|
|
2495
2799
|
writeSqliteFetchedPage,
|
|
2496
2800
|
writeSqliteGeneration,
|
|
2497
2801
|
writeSqliteGetPagesOk,
|
|
2498
2802
|
writeSqliteGetPagesRequest,
|
|
2499
2803
|
writeSqliteGetPagesResponse,
|
|
2500
|
-
writeSqliteMeta,
|
|
2501
2804
|
writeSqlitePageBytes,
|
|
2502
2805
|
writeSqlitePgno,
|
|
2503
|
-
|
|
2504
|
-
|
|
2505
|
-
|
|
2506
|
-
|
|
2806
|
+
writeSqliteQueryResult,
|
|
2807
|
+
writeSqliteValueBlob,
|
|
2808
|
+
writeSqliteValueFloat,
|
|
2809
|
+
writeSqliteValueInteger,
|
|
2810
|
+
writeSqliteValueText,
|
|
2507
2811
|
writeStopActorReason,
|
|
2508
2812
|
writeStopCode,
|
|
2509
2813
|
writeToEnvoy,
|
|
@@ -2514,12 +2818,14 @@ export {
|
|
|
2514
2818
|
writeToEnvoyInit,
|
|
2515
2819
|
writeToEnvoyKvResponse,
|
|
2516
2820
|
writeToEnvoyPing,
|
|
2821
|
+
writeToEnvoyRequestAbort,
|
|
2517
2822
|
writeToEnvoyRequestChunk,
|
|
2518
2823
|
writeToEnvoyRequestStart,
|
|
2519
|
-
|
|
2824
|
+
writeToEnvoyResponseBodyWindowUpdate,
|
|
2520
2825
|
writeToEnvoySqliteCommitResponse,
|
|
2521
|
-
|
|
2522
|
-
|
|
2826
|
+
writeToEnvoySqliteExecResponse,
|
|
2827
|
+
writeToEnvoySqliteExecuteBatchResponse,
|
|
2828
|
+
writeToEnvoySqliteExecuteResponse,
|
|
2523
2829
|
writeToEnvoySqliteGetPagesResponse,
|
|
2524
2830
|
writeToEnvoyTunnelMessage,
|
|
2525
2831
|
writeToEnvoyTunnelMessageKind,
|
|
@@ -2536,12 +2842,14 @@ export {
|
|
|
2536
2842
|
writeToRivetKvRequest,
|
|
2537
2843
|
writeToRivetMetadata,
|
|
2538
2844
|
writeToRivetPong,
|
|
2845
|
+
writeToRivetRequestBodyWindowUpdate,
|
|
2846
|
+
writeToRivetResponseAbort,
|
|
2539
2847
|
writeToRivetResponseChunk,
|
|
2540
2848
|
writeToRivetResponseStart,
|
|
2541
|
-
writeToRivetSqliteCommitFinalizeRequest,
|
|
2542
2849
|
writeToRivetSqliteCommitRequest,
|
|
2543
|
-
|
|
2544
|
-
|
|
2850
|
+
writeToRivetSqliteExecRequest,
|
|
2851
|
+
writeToRivetSqliteExecuteBatchRequest,
|
|
2852
|
+
writeToRivetSqliteExecuteRequest,
|
|
2545
2853
|
writeToRivetSqliteGetPagesRequest,
|
|
2546
2854
|
writeToRivetTunnelMessage,
|
|
2547
2855
|
writeToRivetTunnelMessageKind,
|