@rivetkit/engine-envoy-protocol 0.0.0-pr.4669.591a8c9 → 0.0.0-pr.4669.ed3f4dd
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 +258 -2
- package/dist/index.js +811 -74
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -366,6 +366,550 @@ function writeKvResponseData(bc, x) {
|
|
|
366
366
|
}
|
|
367
367
|
}
|
|
368
368
|
}
|
|
369
|
+
function readSqlitePgno(bc) {
|
|
370
|
+
return bare.readU32(bc);
|
|
371
|
+
}
|
|
372
|
+
function writeSqlitePgno(bc, x) {
|
|
373
|
+
bare.writeU32(bc, x);
|
|
374
|
+
}
|
|
375
|
+
function readSqliteGeneration(bc) {
|
|
376
|
+
return bare.readU64(bc);
|
|
377
|
+
}
|
|
378
|
+
function writeSqliteGeneration(bc, x) {
|
|
379
|
+
bare.writeU64(bc, x);
|
|
380
|
+
}
|
|
381
|
+
function readSqlitePageBytes(bc) {
|
|
382
|
+
return bare.readData(bc);
|
|
383
|
+
}
|
|
384
|
+
function writeSqlitePageBytes(bc, x) {
|
|
385
|
+
bare.writeData(bc, x);
|
|
386
|
+
}
|
|
387
|
+
function readSqliteDirtyPage(bc) {
|
|
388
|
+
return {
|
|
389
|
+
pgno: readSqlitePgno(bc),
|
|
390
|
+
bytes: readSqlitePageBytes(bc)
|
|
391
|
+
};
|
|
392
|
+
}
|
|
393
|
+
function writeSqliteDirtyPage(bc, x) {
|
|
394
|
+
writeSqlitePgno(bc, x.pgno);
|
|
395
|
+
writeSqlitePageBytes(bc, x.bytes);
|
|
396
|
+
}
|
|
397
|
+
function read5(bc) {
|
|
398
|
+
return bare.readBool(bc) ? readSqlitePageBytes(bc) : null;
|
|
399
|
+
}
|
|
400
|
+
function write5(bc, x) {
|
|
401
|
+
bare.writeBool(bc, x != null);
|
|
402
|
+
if (x != null) {
|
|
403
|
+
writeSqlitePageBytes(bc, x);
|
|
404
|
+
}
|
|
405
|
+
}
|
|
406
|
+
function readSqliteFetchedPage(bc) {
|
|
407
|
+
return {
|
|
408
|
+
pgno: readSqlitePgno(bc),
|
|
409
|
+
bytes: read5(bc)
|
|
410
|
+
};
|
|
411
|
+
}
|
|
412
|
+
function writeSqliteFetchedPage(bc, x) {
|
|
413
|
+
writeSqlitePgno(bc, x.pgno);
|
|
414
|
+
write5(bc, x.bytes);
|
|
415
|
+
}
|
|
416
|
+
function read6(bc) {
|
|
417
|
+
const len = bare.readUintSafe(bc);
|
|
418
|
+
if (len === 0) {
|
|
419
|
+
return [];
|
|
420
|
+
}
|
|
421
|
+
const result = [readSqlitePgno(bc)];
|
|
422
|
+
for (let i = 1; i < len; i++) {
|
|
423
|
+
result[i] = readSqlitePgno(bc);
|
|
424
|
+
}
|
|
425
|
+
return result;
|
|
426
|
+
}
|
|
427
|
+
function write6(bc, x) {
|
|
428
|
+
bare.writeUintSafe(bc, x.length);
|
|
429
|
+
for (let i = 0; i < x.length; i++) {
|
|
430
|
+
writeSqlitePgno(bc, x[i]);
|
|
431
|
+
}
|
|
432
|
+
}
|
|
433
|
+
function readSqliteGetPagesRequest(bc) {
|
|
434
|
+
return {
|
|
435
|
+
actorId: readId(bc),
|
|
436
|
+
pgnos: read6(bc),
|
|
437
|
+
expectedGeneration: read2(bc),
|
|
438
|
+
expectedHeadTxid: read2(bc)
|
|
439
|
+
};
|
|
440
|
+
}
|
|
441
|
+
function writeSqliteGetPagesRequest(bc, x) {
|
|
442
|
+
writeId(bc, x.actorId);
|
|
443
|
+
write6(bc, x.pgnos);
|
|
444
|
+
write2(bc, x.expectedGeneration);
|
|
445
|
+
write2(bc, x.expectedHeadTxid);
|
|
446
|
+
}
|
|
447
|
+
function read7(bc) {
|
|
448
|
+
const len = bare.readUintSafe(bc);
|
|
449
|
+
if (len === 0) {
|
|
450
|
+
return [];
|
|
451
|
+
}
|
|
452
|
+
const result = [readSqliteFetchedPage(bc)];
|
|
453
|
+
for (let i = 1; i < len; i++) {
|
|
454
|
+
result[i] = readSqliteFetchedPage(bc);
|
|
455
|
+
}
|
|
456
|
+
return result;
|
|
457
|
+
}
|
|
458
|
+
function write7(bc, x) {
|
|
459
|
+
bare.writeUintSafe(bc, x.length);
|
|
460
|
+
for (let i = 0; i < x.length; i++) {
|
|
461
|
+
writeSqliteFetchedPage(bc, x[i]);
|
|
462
|
+
}
|
|
463
|
+
}
|
|
464
|
+
function readSqliteGetPagesOk(bc) {
|
|
465
|
+
return {
|
|
466
|
+
pages: read7(bc)
|
|
467
|
+
};
|
|
468
|
+
}
|
|
469
|
+
function writeSqliteGetPagesOk(bc, x) {
|
|
470
|
+
write7(bc, x.pages);
|
|
471
|
+
}
|
|
472
|
+
function readSqliteErrorResponse(bc) {
|
|
473
|
+
return {
|
|
474
|
+
message: bare.readString(bc)
|
|
475
|
+
};
|
|
476
|
+
}
|
|
477
|
+
function writeSqliteErrorResponse(bc, x) {
|
|
478
|
+
bare.writeString(bc, x.message);
|
|
479
|
+
}
|
|
480
|
+
function readSqliteGetPagesResponse(bc) {
|
|
481
|
+
const offset = bc.offset;
|
|
482
|
+
const tag = bare.readU8(bc);
|
|
483
|
+
switch (tag) {
|
|
484
|
+
case 0:
|
|
485
|
+
return { tag: "SqliteGetPagesOk", val: readSqliteGetPagesOk(bc) };
|
|
486
|
+
case 1:
|
|
487
|
+
return { tag: "SqliteErrorResponse", val: readSqliteErrorResponse(bc) };
|
|
488
|
+
default: {
|
|
489
|
+
bc.offset = offset;
|
|
490
|
+
throw new bare.BareError(offset, "invalid tag");
|
|
491
|
+
}
|
|
492
|
+
}
|
|
493
|
+
}
|
|
494
|
+
function writeSqliteGetPagesResponse(bc, x) {
|
|
495
|
+
switch (x.tag) {
|
|
496
|
+
case "SqliteGetPagesOk": {
|
|
497
|
+
bare.writeU8(bc, 0);
|
|
498
|
+
writeSqliteGetPagesOk(bc, x.val);
|
|
499
|
+
break;
|
|
500
|
+
}
|
|
501
|
+
case "SqliteErrorResponse": {
|
|
502
|
+
bare.writeU8(bc, 1);
|
|
503
|
+
writeSqliteErrorResponse(bc, x.val);
|
|
504
|
+
break;
|
|
505
|
+
}
|
|
506
|
+
}
|
|
507
|
+
}
|
|
508
|
+
function read8(bc) {
|
|
509
|
+
const len = bare.readUintSafe(bc);
|
|
510
|
+
if (len === 0) {
|
|
511
|
+
return [];
|
|
512
|
+
}
|
|
513
|
+
const result = [readSqliteDirtyPage(bc)];
|
|
514
|
+
for (let i = 1; i < len; i++) {
|
|
515
|
+
result[i] = readSqliteDirtyPage(bc);
|
|
516
|
+
}
|
|
517
|
+
return result;
|
|
518
|
+
}
|
|
519
|
+
function write8(bc, x) {
|
|
520
|
+
bare.writeUintSafe(bc, x.length);
|
|
521
|
+
for (let i = 0; i < x.length; i++) {
|
|
522
|
+
writeSqliteDirtyPage(bc, x[i]);
|
|
523
|
+
}
|
|
524
|
+
}
|
|
525
|
+
function readSqliteCommitRequest(bc) {
|
|
526
|
+
return {
|
|
527
|
+
actorId: readId(bc),
|
|
528
|
+
dirtyPages: read8(bc),
|
|
529
|
+
dbSizePages: bare.readU32(bc),
|
|
530
|
+
nowMs: bare.readI64(bc),
|
|
531
|
+
expectedGeneration: read2(bc),
|
|
532
|
+
expectedHeadTxid: read2(bc)
|
|
533
|
+
};
|
|
534
|
+
}
|
|
535
|
+
function writeSqliteCommitRequest(bc, x) {
|
|
536
|
+
writeId(bc, x.actorId);
|
|
537
|
+
write8(bc, x.dirtyPages);
|
|
538
|
+
bare.writeU32(bc, x.dbSizePages);
|
|
539
|
+
bare.writeI64(bc, x.nowMs);
|
|
540
|
+
write2(bc, x.expectedGeneration);
|
|
541
|
+
write2(bc, x.expectedHeadTxid);
|
|
542
|
+
}
|
|
543
|
+
function readSqliteCommitResponse(bc) {
|
|
544
|
+
const offset = bc.offset;
|
|
545
|
+
const tag = bare.readU8(bc);
|
|
546
|
+
switch (tag) {
|
|
547
|
+
case 0:
|
|
548
|
+
return { tag: "SqliteCommitOk", val: null };
|
|
549
|
+
case 1:
|
|
550
|
+
return { tag: "SqliteErrorResponse", val: readSqliteErrorResponse(bc) };
|
|
551
|
+
default: {
|
|
552
|
+
bc.offset = offset;
|
|
553
|
+
throw new bare.BareError(offset, "invalid tag");
|
|
554
|
+
}
|
|
555
|
+
}
|
|
556
|
+
}
|
|
557
|
+
function writeSqliteCommitResponse(bc, x) {
|
|
558
|
+
switch (x.tag) {
|
|
559
|
+
case "SqliteCommitOk": {
|
|
560
|
+
bare.writeU8(bc, 0);
|
|
561
|
+
break;
|
|
562
|
+
}
|
|
563
|
+
case "SqliteErrorResponse": {
|
|
564
|
+
bare.writeU8(bc, 1);
|
|
565
|
+
writeSqliteErrorResponse(bc, x.val);
|
|
566
|
+
break;
|
|
567
|
+
}
|
|
568
|
+
}
|
|
569
|
+
}
|
|
570
|
+
function readSqliteValueInteger(bc) {
|
|
571
|
+
return {
|
|
572
|
+
value: bare.readI64(bc)
|
|
573
|
+
};
|
|
574
|
+
}
|
|
575
|
+
function writeSqliteValueInteger(bc, x) {
|
|
576
|
+
bare.writeI64(bc, x.value);
|
|
577
|
+
}
|
|
578
|
+
function readSqliteValueFloat(bc) {
|
|
579
|
+
return {
|
|
580
|
+
value: bare.readFixedData(bc, 8)
|
|
581
|
+
};
|
|
582
|
+
}
|
|
583
|
+
function writeSqliteValueFloat(bc, x) {
|
|
584
|
+
{
|
|
585
|
+
assert(x.value.byteLength === 8);
|
|
586
|
+
bare.writeFixedData(bc, x.value);
|
|
587
|
+
}
|
|
588
|
+
}
|
|
589
|
+
function readSqliteValueText(bc) {
|
|
590
|
+
return {
|
|
591
|
+
value: bare.readString(bc)
|
|
592
|
+
};
|
|
593
|
+
}
|
|
594
|
+
function writeSqliteValueText(bc, x) {
|
|
595
|
+
bare.writeString(bc, x.value);
|
|
596
|
+
}
|
|
597
|
+
function readSqliteValueBlob(bc) {
|
|
598
|
+
return {
|
|
599
|
+
value: bare.readData(bc)
|
|
600
|
+
};
|
|
601
|
+
}
|
|
602
|
+
function writeSqliteValueBlob(bc, x) {
|
|
603
|
+
bare.writeData(bc, x.value);
|
|
604
|
+
}
|
|
605
|
+
function readSqliteBindParam(bc) {
|
|
606
|
+
const offset = bc.offset;
|
|
607
|
+
const tag = bare.readU8(bc);
|
|
608
|
+
switch (tag) {
|
|
609
|
+
case 0:
|
|
610
|
+
return { tag: "SqliteValueNull", val: null };
|
|
611
|
+
case 1:
|
|
612
|
+
return { tag: "SqliteValueInteger", val: readSqliteValueInteger(bc) };
|
|
613
|
+
case 2:
|
|
614
|
+
return { tag: "SqliteValueFloat", val: readSqliteValueFloat(bc) };
|
|
615
|
+
case 3:
|
|
616
|
+
return { tag: "SqliteValueText", val: readSqliteValueText(bc) };
|
|
617
|
+
case 4:
|
|
618
|
+
return { tag: "SqliteValueBlob", val: readSqliteValueBlob(bc) };
|
|
619
|
+
default: {
|
|
620
|
+
bc.offset = offset;
|
|
621
|
+
throw new bare.BareError(offset, "invalid tag");
|
|
622
|
+
}
|
|
623
|
+
}
|
|
624
|
+
}
|
|
625
|
+
function writeSqliteBindParam(bc, x) {
|
|
626
|
+
switch (x.tag) {
|
|
627
|
+
case "SqliteValueNull": {
|
|
628
|
+
bare.writeU8(bc, 0);
|
|
629
|
+
break;
|
|
630
|
+
}
|
|
631
|
+
case "SqliteValueInteger": {
|
|
632
|
+
bare.writeU8(bc, 1);
|
|
633
|
+
writeSqliteValueInteger(bc, x.val);
|
|
634
|
+
break;
|
|
635
|
+
}
|
|
636
|
+
case "SqliteValueFloat": {
|
|
637
|
+
bare.writeU8(bc, 2);
|
|
638
|
+
writeSqliteValueFloat(bc, x.val);
|
|
639
|
+
break;
|
|
640
|
+
}
|
|
641
|
+
case "SqliteValueText": {
|
|
642
|
+
bare.writeU8(bc, 3);
|
|
643
|
+
writeSqliteValueText(bc, x.val);
|
|
644
|
+
break;
|
|
645
|
+
}
|
|
646
|
+
case "SqliteValueBlob": {
|
|
647
|
+
bare.writeU8(bc, 4);
|
|
648
|
+
writeSqliteValueBlob(bc, x.val);
|
|
649
|
+
break;
|
|
650
|
+
}
|
|
651
|
+
}
|
|
652
|
+
}
|
|
653
|
+
function readSqliteColumnValue(bc) {
|
|
654
|
+
const offset = bc.offset;
|
|
655
|
+
const tag = bare.readU8(bc);
|
|
656
|
+
switch (tag) {
|
|
657
|
+
case 0:
|
|
658
|
+
return { tag: "SqliteValueNull", val: null };
|
|
659
|
+
case 1:
|
|
660
|
+
return { tag: "SqliteValueInteger", val: readSqliteValueInteger(bc) };
|
|
661
|
+
case 2:
|
|
662
|
+
return { tag: "SqliteValueFloat", val: readSqliteValueFloat(bc) };
|
|
663
|
+
case 3:
|
|
664
|
+
return { tag: "SqliteValueText", val: readSqliteValueText(bc) };
|
|
665
|
+
case 4:
|
|
666
|
+
return { tag: "SqliteValueBlob", val: readSqliteValueBlob(bc) };
|
|
667
|
+
default: {
|
|
668
|
+
bc.offset = offset;
|
|
669
|
+
throw new bare.BareError(offset, "invalid tag");
|
|
670
|
+
}
|
|
671
|
+
}
|
|
672
|
+
}
|
|
673
|
+
function writeSqliteColumnValue(bc, x) {
|
|
674
|
+
switch (x.tag) {
|
|
675
|
+
case "SqliteValueNull": {
|
|
676
|
+
bare.writeU8(bc, 0);
|
|
677
|
+
break;
|
|
678
|
+
}
|
|
679
|
+
case "SqliteValueInteger": {
|
|
680
|
+
bare.writeU8(bc, 1);
|
|
681
|
+
writeSqliteValueInteger(bc, x.val);
|
|
682
|
+
break;
|
|
683
|
+
}
|
|
684
|
+
case "SqliteValueFloat": {
|
|
685
|
+
bare.writeU8(bc, 2);
|
|
686
|
+
writeSqliteValueFloat(bc, x.val);
|
|
687
|
+
break;
|
|
688
|
+
}
|
|
689
|
+
case "SqliteValueText": {
|
|
690
|
+
bare.writeU8(bc, 3);
|
|
691
|
+
writeSqliteValueText(bc, x.val);
|
|
692
|
+
break;
|
|
693
|
+
}
|
|
694
|
+
case "SqliteValueBlob": {
|
|
695
|
+
bare.writeU8(bc, 4);
|
|
696
|
+
writeSqliteValueBlob(bc, x.val);
|
|
697
|
+
break;
|
|
698
|
+
}
|
|
699
|
+
}
|
|
700
|
+
}
|
|
701
|
+
function read9(bc) {
|
|
702
|
+
const len = bare.readUintSafe(bc);
|
|
703
|
+
if (len === 0) {
|
|
704
|
+
return [];
|
|
705
|
+
}
|
|
706
|
+
const result = [bare.readString(bc)];
|
|
707
|
+
for (let i = 1; i < len; i++) {
|
|
708
|
+
result[i] = bare.readString(bc);
|
|
709
|
+
}
|
|
710
|
+
return result;
|
|
711
|
+
}
|
|
712
|
+
function write9(bc, x) {
|
|
713
|
+
bare.writeUintSafe(bc, x.length);
|
|
714
|
+
for (let i = 0; i < x.length; i++) {
|
|
715
|
+
bare.writeString(bc, x[i]);
|
|
716
|
+
}
|
|
717
|
+
}
|
|
718
|
+
function read10(bc) {
|
|
719
|
+
const len = bare.readUintSafe(bc);
|
|
720
|
+
if (len === 0) {
|
|
721
|
+
return [];
|
|
722
|
+
}
|
|
723
|
+
const result = [readSqliteColumnValue(bc)];
|
|
724
|
+
for (let i = 1; i < len; i++) {
|
|
725
|
+
result[i] = readSqliteColumnValue(bc);
|
|
726
|
+
}
|
|
727
|
+
return result;
|
|
728
|
+
}
|
|
729
|
+
function write10(bc, x) {
|
|
730
|
+
bare.writeUintSafe(bc, x.length);
|
|
731
|
+
for (let i = 0; i < x.length; i++) {
|
|
732
|
+
writeSqliteColumnValue(bc, x[i]);
|
|
733
|
+
}
|
|
734
|
+
}
|
|
735
|
+
function read11(bc) {
|
|
736
|
+
const len = bare.readUintSafe(bc);
|
|
737
|
+
if (len === 0) {
|
|
738
|
+
return [];
|
|
739
|
+
}
|
|
740
|
+
const result = [read10(bc)];
|
|
741
|
+
for (let i = 1; i < len; i++) {
|
|
742
|
+
result[i] = read10(bc);
|
|
743
|
+
}
|
|
744
|
+
return result;
|
|
745
|
+
}
|
|
746
|
+
function write11(bc, x) {
|
|
747
|
+
bare.writeUintSafe(bc, x.length);
|
|
748
|
+
for (let i = 0; i < x.length; i++) {
|
|
749
|
+
write10(bc, x[i]);
|
|
750
|
+
}
|
|
751
|
+
}
|
|
752
|
+
function readSqliteQueryResult(bc) {
|
|
753
|
+
return {
|
|
754
|
+
columns: read9(bc),
|
|
755
|
+
rows: read11(bc)
|
|
756
|
+
};
|
|
757
|
+
}
|
|
758
|
+
function writeSqliteQueryResult(bc, x) {
|
|
759
|
+
write9(bc, x.columns);
|
|
760
|
+
write11(bc, x.rows);
|
|
761
|
+
}
|
|
762
|
+
function read12(bc) {
|
|
763
|
+
return bare.readBool(bc) ? bare.readI64(bc) : null;
|
|
764
|
+
}
|
|
765
|
+
function write12(bc, x) {
|
|
766
|
+
bare.writeBool(bc, x != null);
|
|
767
|
+
if (x != null) {
|
|
768
|
+
bare.writeI64(bc, x);
|
|
769
|
+
}
|
|
770
|
+
}
|
|
771
|
+
function readSqliteExecuteResult(bc) {
|
|
772
|
+
return {
|
|
773
|
+
columns: read9(bc),
|
|
774
|
+
rows: read11(bc),
|
|
775
|
+
changes: bare.readI64(bc),
|
|
776
|
+
lastInsertRowId: read12(bc)
|
|
777
|
+
};
|
|
778
|
+
}
|
|
779
|
+
function writeSqliteExecuteResult(bc, x) {
|
|
780
|
+
write9(bc, x.columns);
|
|
781
|
+
write11(bc, x.rows);
|
|
782
|
+
bare.writeI64(bc, x.changes);
|
|
783
|
+
write12(bc, x.lastInsertRowId);
|
|
784
|
+
}
|
|
785
|
+
function readSqliteExecRequest(bc) {
|
|
786
|
+
return {
|
|
787
|
+
namespaceId: readId(bc),
|
|
788
|
+
actorId: readId(bc),
|
|
789
|
+
generation: readSqliteGeneration(bc),
|
|
790
|
+
sql: bare.readString(bc)
|
|
791
|
+
};
|
|
792
|
+
}
|
|
793
|
+
function writeSqliteExecRequest(bc, x) {
|
|
794
|
+
writeId(bc, x.namespaceId);
|
|
795
|
+
writeId(bc, x.actorId);
|
|
796
|
+
writeSqliteGeneration(bc, x.generation);
|
|
797
|
+
bare.writeString(bc, x.sql);
|
|
798
|
+
}
|
|
799
|
+
function read13(bc) {
|
|
800
|
+
const len = bare.readUintSafe(bc);
|
|
801
|
+
if (len === 0) {
|
|
802
|
+
return [];
|
|
803
|
+
}
|
|
804
|
+
const result = [readSqliteBindParam(bc)];
|
|
805
|
+
for (let i = 1; i < len; i++) {
|
|
806
|
+
result[i] = readSqliteBindParam(bc);
|
|
807
|
+
}
|
|
808
|
+
return result;
|
|
809
|
+
}
|
|
810
|
+
function write13(bc, x) {
|
|
811
|
+
bare.writeUintSafe(bc, x.length);
|
|
812
|
+
for (let i = 0; i < x.length; i++) {
|
|
813
|
+
writeSqliteBindParam(bc, x[i]);
|
|
814
|
+
}
|
|
815
|
+
}
|
|
816
|
+
function read14(bc) {
|
|
817
|
+
return bare.readBool(bc) ? read13(bc) : null;
|
|
818
|
+
}
|
|
819
|
+
function write14(bc, x) {
|
|
820
|
+
bare.writeBool(bc, x != null);
|
|
821
|
+
if (x != null) {
|
|
822
|
+
write13(bc, x);
|
|
823
|
+
}
|
|
824
|
+
}
|
|
825
|
+
function readSqliteExecuteRequest(bc) {
|
|
826
|
+
return {
|
|
827
|
+
namespaceId: readId(bc),
|
|
828
|
+
actorId: readId(bc),
|
|
829
|
+
generation: readSqliteGeneration(bc),
|
|
830
|
+
sql: bare.readString(bc),
|
|
831
|
+
params: read14(bc)
|
|
832
|
+
};
|
|
833
|
+
}
|
|
834
|
+
function writeSqliteExecuteRequest(bc, x) {
|
|
835
|
+
writeId(bc, x.namespaceId);
|
|
836
|
+
writeId(bc, x.actorId);
|
|
837
|
+
writeSqliteGeneration(bc, x.generation);
|
|
838
|
+
bare.writeString(bc, x.sql);
|
|
839
|
+
write14(bc, x.params);
|
|
840
|
+
}
|
|
841
|
+
function readSqliteExecOk(bc) {
|
|
842
|
+
return {
|
|
843
|
+
result: readSqliteQueryResult(bc)
|
|
844
|
+
};
|
|
845
|
+
}
|
|
846
|
+
function writeSqliteExecOk(bc, x) {
|
|
847
|
+
writeSqliteQueryResult(bc, x.result);
|
|
848
|
+
}
|
|
849
|
+
function readSqliteExecuteOk(bc) {
|
|
850
|
+
return {
|
|
851
|
+
result: readSqliteExecuteResult(bc)
|
|
852
|
+
};
|
|
853
|
+
}
|
|
854
|
+
function writeSqliteExecuteOk(bc, x) {
|
|
855
|
+
writeSqliteExecuteResult(bc, x.result);
|
|
856
|
+
}
|
|
857
|
+
function readSqliteExecResponse(bc) {
|
|
858
|
+
const offset = bc.offset;
|
|
859
|
+
const tag = bare.readU8(bc);
|
|
860
|
+
switch (tag) {
|
|
861
|
+
case 0:
|
|
862
|
+
return { tag: "SqliteExecOk", val: readSqliteExecOk(bc) };
|
|
863
|
+
case 1:
|
|
864
|
+
return { tag: "SqliteErrorResponse", val: readSqliteErrorResponse(bc) };
|
|
865
|
+
default: {
|
|
866
|
+
bc.offset = offset;
|
|
867
|
+
throw new bare.BareError(offset, "invalid tag");
|
|
868
|
+
}
|
|
869
|
+
}
|
|
870
|
+
}
|
|
871
|
+
function writeSqliteExecResponse(bc, x) {
|
|
872
|
+
switch (x.tag) {
|
|
873
|
+
case "SqliteExecOk": {
|
|
874
|
+
bare.writeU8(bc, 0);
|
|
875
|
+
writeSqliteExecOk(bc, x.val);
|
|
876
|
+
break;
|
|
877
|
+
}
|
|
878
|
+
case "SqliteErrorResponse": {
|
|
879
|
+
bare.writeU8(bc, 1);
|
|
880
|
+
writeSqliteErrorResponse(bc, x.val);
|
|
881
|
+
break;
|
|
882
|
+
}
|
|
883
|
+
}
|
|
884
|
+
}
|
|
885
|
+
function readSqliteExecuteResponse(bc) {
|
|
886
|
+
const offset = bc.offset;
|
|
887
|
+
const tag = bare.readU8(bc);
|
|
888
|
+
switch (tag) {
|
|
889
|
+
case 0:
|
|
890
|
+
return { tag: "SqliteExecuteOk", val: readSqliteExecuteOk(bc) };
|
|
891
|
+
case 1:
|
|
892
|
+
return { tag: "SqliteErrorResponse", val: readSqliteErrorResponse(bc) };
|
|
893
|
+
default: {
|
|
894
|
+
bc.offset = offset;
|
|
895
|
+
throw new bare.BareError(offset, "invalid tag");
|
|
896
|
+
}
|
|
897
|
+
}
|
|
898
|
+
}
|
|
899
|
+
function writeSqliteExecuteResponse(bc, x) {
|
|
900
|
+
switch (x.tag) {
|
|
901
|
+
case "SqliteExecuteOk": {
|
|
902
|
+
bare.writeU8(bc, 0);
|
|
903
|
+
writeSqliteExecuteOk(bc, x.val);
|
|
904
|
+
break;
|
|
905
|
+
}
|
|
906
|
+
case "SqliteErrorResponse": {
|
|
907
|
+
bare.writeU8(bc, 1);
|
|
908
|
+
writeSqliteErrorResponse(bc, x.val);
|
|
909
|
+
break;
|
|
910
|
+
}
|
|
911
|
+
}
|
|
912
|
+
}
|
|
369
913
|
var StopCode = /* @__PURE__ */ ((StopCode2) => {
|
|
370
914
|
StopCode2["Ok"] = "Ok";
|
|
371
915
|
StopCode2["Error"] = "Error";
|
|
@@ -405,19 +949,19 @@ function readActorName(bc) {
|
|
|
405
949
|
function writeActorName(bc, x) {
|
|
406
950
|
writeJson(bc, x.metadata);
|
|
407
951
|
}
|
|
408
|
-
function
|
|
952
|
+
function read15(bc) {
|
|
409
953
|
return bare.readBool(bc) ? bare.readString(bc) : null;
|
|
410
954
|
}
|
|
411
|
-
function
|
|
955
|
+
function write15(bc, x) {
|
|
412
956
|
bare.writeBool(bc, x != null);
|
|
413
957
|
if (x != null) {
|
|
414
958
|
bare.writeString(bc, x);
|
|
415
959
|
}
|
|
416
960
|
}
|
|
417
|
-
function
|
|
961
|
+
function read16(bc) {
|
|
418
962
|
return bare.readBool(bc) ? bare.readData(bc) : null;
|
|
419
963
|
}
|
|
420
|
-
function
|
|
964
|
+
function write16(bc, x) {
|
|
421
965
|
bare.writeBool(bc, x != null);
|
|
422
966
|
if (x != null) {
|
|
423
967
|
bare.writeData(bc, x);
|
|
@@ -426,16 +970,16 @@ function write6(bc, x) {
|
|
|
426
970
|
function readActorConfig(bc) {
|
|
427
971
|
return {
|
|
428
972
|
name: bare.readString(bc),
|
|
429
|
-
key:
|
|
973
|
+
key: read15(bc),
|
|
430
974
|
createTs: bare.readI64(bc),
|
|
431
|
-
input:
|
|
975
|
+
input: read16(bc)
|
|
432
976
|
};
|
|
433
977
|
}
|
|
434
978
|
function writeActorConfig(bc, x) {
|
|
435
979
|
bare.writeString(bc, x.name);
|
|
436
|
-
|
|
980
|
+
write15(bc, x.key);
|
|
437
981
|
bare.writeI64(bc, x.createTs);
|
|
438
|
-
|
|
982
|
+
write16(bc, x.input);
|
|
439
983
|
}
|
|
440
984
|
function readActorCheckpoint(bc) {
|
|
441
985
|
return {
|
|
@@ -478,12 +1022,12 @@ function writeActorIntent(bc, x) {
|
|
|
478
1022
|
function readActorStateStopped(bc) {
|
|
479
1023
|
return {
|
|
480
1024
|
code: readStopCode(bc),
|
|
481
|
-
message:
|
|
1025
|
+
message: read15(bc)
|
|
482
1026
|
};
|
|
483
1027
|
}
|
|
484
1028
|
function writeActorStateStopped(bc, x) {
|
|
485
1029
|
writeStopCode(bc, x.code);
|
|
486
|
-
|
|
1030
|
+
write15(bc, x.message);
|
|
487
1031
|
}
|
|
488
1032
|
function readActorState(bc) {
|
|
489
1033
|
const offset = bc.offset;
|
|
@@ -528,22 +1072,13 @@ function readEventActorStateUpdate(bc) {
|
|
|
528
1072
|
function writeEventActorStateUpdate(bc, x) {
|
|
529
1073
|
writeActorState(bc, x.state);
|
|
530
1074
|
}
|
|
531
|
-
function read7(bc) {
|
|
532
|
-
return bare.readBool(bc) ? bare.readI64(bc) : null;
|
|
533
|
-
}
|
|
534
|
-
function write7(bc, x) {
|
|
535
|
-
bare.writeBool(bc, x != null);
|
|
536
|
-
if (x != null) {
|
|
537
|
-
bare.writeI64(bc, x);
|
|
538
|
-
}
|
|
539
|
-
}
|
|
540
1075
|
function readEventActorSetAlarm(bc) {
|
|
541
1076
|
return {
|
|
542
|
-
alarmTs:
|
|
1077
|
+
alarmTs: read12(bc)
|
|
543
1078
|
};
|
|
544
1079
|
}
|
|
545
1080
|
function writeEventActorSetAlarm(bc, x) {
|
|
546
|
-
|
|
1081
|
+
write12(bc, x.alarmTs);
|
|
547
1082
|
}
|
|
548
1083
|
function readEvent(bc) {
|
|
549
1084
|
const offset = bc.offset;
|
|
@@ -602,7 +1137,7 @@ function writePreloadedKvEntry(bc, x) {
|
|
|
602
1137
|
writeKvValue(bc, x.value);
|
|
603
1138
|
writeKvMetadata(bc, x.metadata);
|
|
604
1139
|
}
|
|
605
|
-
function
|
|
1140
|
+
function read17(bc) {
|
|
606
1141
|
const len = bare.readUintSafe(bc);
|
|
607
1142
|
if (len === 0) {
|
|
608
1143
|
return [];
|
|
@@ -613,7 +1148,7 @@ function read8(bc) {
|
|
|
613
1148
|
}
|
|
614
1149
|
return result;
|
|
615
1150
|
}
|
|
616
|
-
function
|
|
1151
|
+
function write17(bc, x) {
|
|
617
1152
|
bare.writeUintSafe(bc, x.length);
|
|
618
1153
|
for (let i = 0; i < x.length; i++) {
|
|
619
1154
|
writePreloadedKvEntry(bc, x[i]);
|
|
@@ -621,13 +1156,13 @@ function write8(bc, x) {
|
|
|
621
1156
|
}
|
|
622
1157
|
function readPreloadedKv(bc) {
|
|
623
1158
|
return {
|
|
624
|
-
entries:
|
|
1159
|
+
entries: read17(bc),
|
|
625
1160
|
requestedGetKeys: read0(bc),
|
|
626
1161
|
requestedPrefixes: read0(bc)
|
|
627
1162
|
};
|
|
628
1163
|
}
|
|
629
1164
|
function writePreloadedKv(bc, x) {
|
|
630
|
-
|
|
1165
|
+
write17(bc, x.entries);
|
|
631
1166
|
write0(bc, x.requestedGetKeys);
|
|
632
1167
|
write0(bc, x.requestedPrefixes);
|
|
633
1168
|
}
|
|
@@ -641,7 +1176,7 @@ function writeHibernatingRequest(bc, x) {
|
|
|
641
1176
|
writeGatewayId(bc, x.gatewayId);
|
|
642
1177
|
writeRequestId(bc, x.requestId);
|
|
643
1178
|
}
|
|
644
|
-
function
|
|
1179
|
+
function read18(bc) {
|
|
645
1180
|
const len = bare.readUintSafe(bc);
|
|
646
1181
|
if (len === 0) {
|
|
647
1182
|
return [];
|
|
@@ -652,16 +1187,16 @@ function read9(bc) {
|
|
|
652
1187
|
}
|
|
653
1188
|
return result;
|
|
654
1189
|
}
|
|
655
|
-
function
|
|
1190
|
+
function write18(bc, x) {
|
|
656
1191
|
bare.writeUintSafe(bc, x.length);
|
|
657
1192
|
for (let i = 0; i < x.length; i++) {
|
|
658
1193
|
writeHibernatingRequest(bc, x[i]);
|
|
659
1194
|
}
|
|
660
1195
|
}
|
|
661
|
-
function
|
|
1196
|
+
function read19(bc) {
|
|
662
1197
|
return bare.readBool(bc) ? readPreloadedKv(bc) : null;
|
|
663
1198
|
}
|
|
664
|
-
function
|
|
1199
|
+
function write19(bc, x) {
|
|
665
1200
|
bare.writeBool(bc, x != null);
|
|
666
1201
|
if (x != null) {
|
|
667
1202
|
writePreloadedKv(bc, x);
|
|
@@ -670,14 +1205,14 @@ function write10(bc, x) {
|
|
|
670
1205
|
function readCommandStartActor(bc) {
|
|
671
1206
|
return {
|
|
672
1207
|
config: readActorConfig(bc),
|
|
673
|
-
hibernatingRequests:
|
|
674
|
-
preloadedKv:
|
|
1208
|
+
hibernatingRequests: read18(bc),
|
|
1209
|
+
preloadedKv: read19(bc)
|
|
675
1210
|
};
|
|
676
1211
|
}
|
|
677
1212
|
function writeCommandStartActor(bc, x) {
|
|
678
1213
|
writeActorConfig(bc, x.config);
|
|
679
|
-
|
|
680
|
-
|
|
1214
|
+
write18(bc, x.hibernatingRequests);
|
|
1215
|
+
write19(bc, x.preloadedKv);
|
|
681
1216
|
}
|
|
682
1217
|
var StopActorReason = /* @__PURE__ */ ((StopActorReason2) => {
|
|
683
1218
|
StopActorReason2["SleepIntent"] = "SleepIntent";
|
|
@@ -834,7 +1369,7 @@ function writeMessageId(bc, x) {
|
|
|
834
1369
|
writeRequestId(bc, x.requestId);
|
|
835
1370
|
writeMessageIndex(bc, x.messageIndex);
|
|
836
1371
|
}
|
|
837
|
-
function
|
|
1372
|
+
function read20(bc) {
|
|
838
1373
|
const len = bare.readUintSafe(bc);
|
|
839
1374
|
const result = /* @__PURE__ */ new Map();
|
|
840
1375
|
for (let i = 0; i < len; i++) {
|
|
@@ -848,7 +1383,7 @@ function read11(bc) {
|
|
|
848
1383
|
}
|
|
849
1384
|
return result;
|
|
850
1385
|
}
|
|
851
|
-
function
|
|
1386
|
+
function write20(bc, x) {
|
|
852
1387
|
bare.writeUintSafe(bc, x.size);
|
|
853
1388
|
for (const kv of x) {
|
|
854
1389
|
bare.writeString(bc, kv[0]);
|
|
@@ -860,8 +1395,8 @@ function readToEnvoyRequestStart(bc) {
|
|
|
860
1395
|
actorId: readId(bc),
|
|
861
1396
|
method: bare.readString(bc),
|
|
862
1397
|
path: bare.readString(bc),
|
|
863
|
-
headers:
|
|
864
|
-
body:
|
|
1398
|
+
headers: read20(bc),
|
|
1399
|
+
body: read16(bc),
|
|
865
1400
|
stream: bare.readBool(bc)
|
|
866
1401
|
};
|
|
867
1402
|
}
|
|
@@ -869,8 +1404,8 @@ function writeToEnvoyRequestStart(bc, x) {
|
|
|
869
1404
|
writeId(bc, x.actorId);
|
|
870
1405
|
bare.writeString(bc, x.method);
|
|
871
1406
|
bare.writeString(bc, x.path);
|
|
872
|
-
|
|
873
|
-
|
|
1407
|
+
write20(bc, x.headers);
|
|
1408
|
+
write16(bc, x.body);
|
|
874
1409
|
bare.writeBool(bc, x.stream);
|
|
875
1410
|
}
|
|
876
1411
|
function readToEnvoyRequestChunk(bc) {
|
|
@@ -886,15 +1421,15 @@ function writeToEnvoyRequestChunk(bc, x) {
|
|
|
886
1421
|
function readToRivetResponseStart(bc) {
|
|
887
1422
|
return {
|
|
888
1423
|
status: bare.readU16(bc),
|
|
889
|
-
headers:
|
|
890
|
-
body:
|
|
1424
|
+
headers: read20(bc),
|
|
1425
|
+
body: read16(bc),
|
|
891
1426
|
stream: bare.readBool(bc)
|
|
892
1427
|
};
|
|
893
1428
|
}
|
|
894
1429
|
function writeToRivetResponseStart(bc, x) {
|
|
895
1430
|
bare.writeU16(bc, x.status);
|
|
896
|
-
|
|
897
|
-
|
|
1431
|
+
write20(bc, x.headers);
|
|
1432
|
+
write16(bc, x.body);
|
|
898
1433
|
bare.writeBool(bc, x.stream);
|
|
899
1434
|
}
|
|
900
1435
|
function readToRivetResponseChunk(bc) {
|
|
@@ -911,13 +1446,13 @@ function readToEnvoyWebSocketOpen(bc) {
|
|
|
911
1446
|
return {
|
|
912
1447
|
actorId: readId(bc),
|
|
913
1448
|
path: bare.readString(bc),
|
|
914
|
-
headers:
|
|
1449
|
+
headers: read20(bc)
|
|
915
1450
|
};
|
|
916
1451
|
}
|
|
917
1452
|
function writeToEnvoyWebSocketOpen(bc, x) {
|
|
918
1453
|
writeId(bc, x.actorId);
|
|
919
1454
|
bare.writeString(bc, x.path);
|
|
920
|
-
|
|
1455
|
+
write20(bc, x.headers);
|
|
921
1456
|
}
|
|
922
1457
|
function readToEnvoyWebSocketMessage(bc) {
|
|
923
1458
|
return {
|
|
@@ -929,10 +1464,10 @@ function writeToEnvoyWebSocketMessage(bc, x) {
|
|
|
929
1464
|
bare.writeData(bc, x.data);
|
|
930
1465
|
bare.writeBool(bc, x.binary);
|
|
931
1466
|
}
|
|
932
|
-
function
|
|
1467
|
+
function read21(bc) {
|
|
933
1468
|
return bare.readBool(bc) ? bare.readU16(bc) : null;
|
|
934
1469
|
}
|
|
935
|
-
function
|
|
1470
|
+
function write21(bc, x) {
|
|
936
1471
|
bare.writeBool(bc, x != null);
|
|
937
1472
|
if (x != null) {
|
|
938
1473
|
bare.writeU16(bc, x);
|
|
@@ -940,13 +1475,13 @@ function write12(bc, x) {
|
|
|
940
1475
|
}
|
|
941
1476
|
function readToEnvoyWebSocketClose(bc) {
|
|
942
1477
|
return {
|
|
943
|
-
code:
|
|
944
|
-
reason:
|
|
1478
|
+
code: read21(bc),
|
|
1479
|
+
reason: read15(bc)
|
|
945
1480
|
};
|
|
946
1481
|
}
|
|
947
1482
|
function writeToEnvoyWebSocketClose(bc, x) {
|
|
948
|
-
|
|
949
|
-
|
|
1483
|
+
write21(bc, x.code);
|
|
1484
|
+
write15(bc, x.reason);
|
|
950
1485
|
}
|
|
951
1486
|
function readToRivetWebSocketOpen(bc) {
|
|
952
1487
|
return {
|
|
@@ -976,14 +1511,14 @@ function writeToRivetWebSocketMessageAck(bc, x) {
|
|
|
976
1511
|
}
|
|
977
1512
|
function readToRivetWebSocketClose(bc) {
|
|
978
1513
|
return {
|
|
979
|
-
code:
|
|
980
|
-
reason:
|
|
1514
|
+
code: read21(bc),
|
|
1515
|
+
reason: read15(bc),
|
|
981
1516
|
hibernate: bare.readBool(bc)
|
|
982
1517
|
};
|
|
983
1518
|
}
|
|
984
1519
|
function writeToRivetWebSocketClose(bc, x) {
|
|
985
|
-
|
|
986
|
-
|
|
1520
|
+
write21(bc, x.code);
|
|
1521
|
+
write15(bc, x.reason);
|
|
987
1522
|
bare.writeBool(bc, x.hibernate);
|
|
988
1523
|
}
|
|
989
1524
|
function readToRivetTunnelMessageKind(bc) {
|
|
@@ -1131,7 +1666,7 @@ function readToEnvoyPing(bc) {
|
|
|
1131
1666
|
function writeToEnvoyPing(bc, x) {
|
|
1132
1667
|
bare.writeI64(bc, x.ts);
|
|
1133
1668
|
}
|
|
1134
|
-
function
|
|
1669
|
+
function read22(bc) {
|
|
1135
1670
|
const len = bare.readUintSafe(bc);
|
|
1136
1671
|
const result = /* @__PURE__ */ new Map();
|
|
1137
1672
|
for (let i = 0; i < len; i++) {
|
|
@@ -1145,26 +1680,26 @@ function read13(bc) {
|
|
|
1145
1680
|
}
|
|
1146
1681
|
return result;
|
|
1147
1682
|
}
|
|
1148
|
-
function
|
|
1683
|
+
function write22(bc, x) {
|
|
1149
1684
|
bare.writeUintSafe(bc, x.size);
|
|
1150
1685
|
for (const kv of x) {
|
|
1151
1686
|
bare.writeString(bc, kv[0]);
|
|
1152
1687
|
writeActorName(bc, kv[1]);
|
|
1153
1688
|
}
|
|
1154
1689
|
}
|
|
1155
|
-
function
|
|
1156
|
-
return bare.readBool(bc) ?
|
|
1690
|
+
function read23(bc) {
|
|
1691
|
+
return bare.readBool(bc) ? read22(bc) : null;
|
|
1157
1692
|
}
|
|
1158
|
-
function
|
|
1693
|
+
function write23(bc, x) {
|
|
1159
1694
|
bare.writeBool(bc, x != null);
|
|
1160
1695
|
if (x != null) {
|
|
1161
|
-
|
|
1696
|
+
write22(bc, x);
|
|
1162
1697
|
}
|
|
1163
1698
|
}
|
|
1164
|
-
function
|
|
1699
|
+
function read24(bc) {
|
|
1165
1700
|
return bare.readBool(bc) ? readJson(bc) : null;
|
|
1166
1701
|
}
|
|
1167
|
-
function
|
|
1702
|
+
function write24(bc, x) {
|
|
1168
1703
|
bare.writeBool(bc, x != null);
|
|
1169
1704
|
if (x != null) {
|
|
1170
1705
|
writeJson(bc, x);
|
|
@@ -1172,13 +1707,13 @@ function write15(bc, x) {
|
|
|
1172
1707
|
}
|
|
1173
1708
|
function readToRivetMetadata(bc) {
|
|
1174
1709
|
return {
|
|
1175
|
-
prepopulateActorNames:
|
|
1176
|
-
metadata:
|
|
1710
|
+
prepopulateActorNames: read23(bc),
|
|
1711
|
+
metadata: read24(bc)
|
|
1177
1712
|
};
|
|
1178
1713
|
}
|
|
1179
1714
|
function writeToRivetMetadata(bc, x) {
|
|
1180
|
-
|
|
1181
|
-
|
|
1715
|
+
write23(bc, x.prepopulateActorNames);
|
|
1716
|
+
write24(bc, x.metadata);
|
|
1182
1717
|
}
|
|
1183
1718
|
function readToRivetEvents(bc) {
|
|
1184
1719
|
const len = bare.readUintSafe(bc);
|
|
@@ -1197,7 +1732,7 @@ function writeToRivetEvents(bc, x) {
|
|
|
1197
1732
|
writeEventWrapper(bc, x[i]);
|
|
1198
1733
|
}
|
|
1199
1734
|
}
|
|
1200
|
-
function
|
|
1735
|
+
function read25(bc) {
|
|
1201
1736
|
const len = bare.readUintSafe(bc);
|
|
1202
1737
|
if (len === 0) {
|
|
1203
1738
|
return [];
|
|
@@ -1208,7 +1743,7 @@ function read16(bc) {
|
|
|
1208
1743
|
}
|
|
1209
1744
|
return result;
|
|
1210
1745
|
}
|
|
1211
|
-
function
|
|
1746
|
+
function write25(bc, x) {
|
|
1212
1747
|
bare.writeUintSafe(bc, x.length);
|
|
1213
1748
|
for (let i = 0; i < x.length; i++) {
|
|
1214
1749
|
writeActorCheckpoint(bc, x[i]);
|
|
@@ -1216,11 +1751,11 @@ function write16(bc, x) {
|
|
|
1216
1751
|
}
|
|
1217
1752
|
function readToRivetAckCommands(bc) {
|
|
1218
1753
|
return {
|
|
1219
|
-
lastCommandCheckpoints:
|
|
1754
|
+
lastCommandCheckpoints: read25(bc)
|
|
1220
1755
|
};
|
|
1221
1756
|
}
|
|
1222
1757
|
function writeToRivetAckCommands(bc, x) {
|
|
1223
|
-
|
|
1758
|
+
write25(bc, x.lastCommandCheckpoints);
|
|
1224
1759
|
}
|
|
1225
1760
|
function readToRivetPong(bc) {
|
|
1226
1761
|
return {
|
|
@@ -1242,6 +1777,46 @@ function writeToRivetKvRequest(bc, x) {
|
|
|
1242
1777
|
bare.writeU32(bc, x.requestId);
|
|
1243
1778
|
writeKvRequestData(bc, x.data);
|
|
1244
1779
|
}
|
|
1780
|
+
function readToRivetSqliteGetPagesRequest(bc) {
|
|
1781
|
+
return {
|
|
1782
|
+
requestId: bare.readU32(bc),
|
|
1783
|
+
data: readSqliteGetPagesRequest(bc)
|
|
1784
|
+
};
|
|
1785
|
+
}
|
|
1786
|
+
function writeToRivetSqliteGetPagesRequest(bc, x) {
|
|
1787
|
+
bare.writeU32(bc, x.requestId);
|
|
1788
|
+
writeSqliteGetPagesRequest(bc, x.data);
|
|
1789
|
+
}
|
|
1790
|
+
function readToRivetSqliteCommitRequest(bc) {
|
|
1791
|
+
return {
|
|
1792
|
+
requestId: bare.readU32(bc),
|
|
1793
|
+
data: readSqliteCommitRequest(bc)
|
|
1794
|
+
};
|
|
1795
|
+
}
|
|
1796
|
+
function writeToRivetSqliteCommitRequest(bc, x) {
|
|
1797
|
+
bare.writeU32(bc, x.requestId);
|
|
1798
|
+
writeSqliteCommitRequest(bc, x.data);
|
|
1799
|
+
}
|
|
1800
|
+
function readToRivetSqliteExecRequest(bc) {
|
|
1801
|
+
return {
|
|
1802
|
+
requestId: bare.readU32(bc),
|
|
1803
|
+
data: readSqliteExecRequest(bc)
|
|
1804
|
+
};
|
|
1805
|
+
}
|
|
1806
|
+
function writeToRivetSqliteExecRequest(bc, x) {
|
|
1807
|
+
bare.writeU32(bc, x.requestId);
|
|
1808
|
+
writeSqliteExecRequest(bc, x.data);
|
|
1809
|
+
}
|
|
1810
|
+
function readToRivetSqliteExecuteRequest(bc) {
|
|
1811
|
+
return {
|
|
1812
|
+
requestId: bare.readU32(bc),
|
|
1813
|
+
data: readSqliteExecuteRequest(bc)
|
|
1814
|
+
};
|
|
1815
|
+
}
|
|
1816
|
+
function writeToRivetSqliteExecuteRequest(bc, x) {
|
|
1817
|
+
bare.writeU32(bc, x.requestId);
|
|
1818
|
+
writeSqliteExecuteRequest(bc, x.data);
|
|
1819
|
+
}
|
|
1245
1820
|
function readToRivet(bc) {
|
|
1246
1821
|
const offset = bc.offset;
|
|
1247
1822
|
const tag = bare.readU8(bc);
|
|
@@ -1260,6 +1835,14 @@ function readToRivet(bc) {
|
|
|
1260
1835
|
return { tag: "ToRivetKvRequest", val: readToRivetKvRequest(bc) };
|
|
1261
1836
|
case 6:
|
|
1262
1837
|
return { tag: "ToRivetTunnelMessage", val: readToRivetTunnelMessage(bc) };
|
|
1838
|
+
case 7:
|
|
1839
|
+
return { tag: "ToRivetSqliteGetPagesRequest", val: readToRivetSqliteGetPagesRequest(bc) };
|
|
1840
|
+
case 8:
|
|
1841
|
+
return { tag: "ToRivetSqliteCommitRequest", val: readToRivetSqliteCommitRequest(bc) };
|
|
1842
|
+
case 9:
|
|
1843
|
+
return { tag: "ToRivetSqliteExecRequest", val: readToRivetSqliteExecRequest(bc) };
|
|
1844
|
+
case 10:
|
|
1845
|
+
return { tag: "ToRivetSqliteExecuteRequest", val: readToRivetSqliteExecuteRequest(bc) };
|
|
1263
1846
|
default: {
|
|
1264
1847
|
bc.offset = offset;
|
|
1265
1848
|
throw new bare.BareError(offset, "invalid tag");
|
|
@@ -1302,6 +1885,26 @@ function writeToRivet(bc, x) {
|
|
|
1302
1885
|
writeToRivetTunnelMessage(bc, x.val);
|
|
1303
1886
|
break;
|
|
1304
1887
|
}
|
|
1888
|
+
case "ToRivetSqliteGetPagesRequest": {
|
|
1889
|
+
bare.writeU8(bc, 7);
|
|
1890
|
+
writeToRivetSqliteGetPagesRequest(bc, x.val);
|
|
1891
|
+
break;
|
|
1892
|
+
}
|
|
1893
|
+
case "ToRivetSqliteCommitRequest": {
|
|
1894
|
+
bare.writeU8(bc, 8);
|
|
1895
|
+
writeToRivetSqliteCommitRequest(bc, x.val);
|
|
1896
|
+
break;
|
|
1897
|
+
}
|
|
1898
|
+
case "ToRivetSqliteExecRequest": {
|
|
1899
|
+
bare.writeU8(bc, 9);
|
|
1900
|
+
writeToRivetSqliteExecRequest(bc, x.val);
|
|
1901
|
+
break;
|
|
1902
|
+
}
|
|
1903
|
+
case "ToRivetSqliteExecuteRequest": {
|
|
1904
|
+
bare.writeU8(bc, 10);
|
|
1905
|
+
writeToRivetSqliteExecuteRequest(bc, x.val);
|
|
1906
|
+
break;
|
|
1907
|
+
}
|
|
1305
1908
|
}
|
|
1306
1909
|
}
|
|
1307
1910
|
function encodeToRivet(x, config) {
|
|
@@ -1360,11 +1963,11 @@ function writeToEnvoyCommands(bc, x) {
|
|
|
1360
1963
|
}
|
|
1361
1964
|
function readToEnvoyAckEvents(bc) {
|
|
1362
1965
|
return {
|
|
1363
|
-
lastEventCheckpoints:
|
|
1966
|
+
lastEventCheckpoints: read25(bc)
|
|
1364
1967
|
};
|
|
1365
1968
|
}
|
|
1366
1969
|
function writeToEnvoyAckEvents(bc, x) {
|
|
1367
|
-
|
|
1970
|
+
write25(bc, x.lastEventCheckpoints);
|
|
1368
1971
|
}
|
|
1369
1972
|
function readToEnvoyKvResponse(bc) {
|
|
1370
1973
|
return {
|
|
@@ -1376,6 +1979,46 @@ function writeToEnvoyKvResponse(bc, x) {
|
|
|
1376
1979
|
bare.writeU32(bc, x.requestId);
|
|
1377
1980
|
writeKvResponseData(bc, x.data);
|
|
1378
1981
|
}
|
|
1982
|
+
function readToEnvoySqliteGetPagesResponse(bc) {
|
|
1983
|
+
return {
|
|
1984
|
+
requestId: bare.readU32(bc),
|
|
1985
|
+
data: readSqliteGetPagesResponse(bc)
|
|
1986
|
+
};
|
|
1987
|
+
}
|
|
1988
|
+
function writeToEnvoySqliteGetPagesResponse(bc, x) {
|
|
1989
|
+
bare.writeU32(bc, x.requestId);
|
|
1990
|
+
writeSqliteGetPagesResponse(bc, x.data);
|
|
1991
|
+
}
|
|
1992
|
+
function readToEnvoySqliteCommitResponse(bc) {
|
|
1993
|
+
return {
|
|
1994
|
+
requestId: bare.readU32(bc),
|
|
1995
|
+
data: readSqliteCommitResponse(bc)
|
|
1996
|
+
};
|
|
1997
|
+
}
|
|
1998
|
+
function writeToEnvoySqliteCommitResponse(bc, x) {
|
|
1999
|
+
bare.writeU32(bc, x.requestId);
|
|
2000
|
+
writeSqliteCommitResponse(bc, x.data);
|
|
2001
|
+
}
|
|
2002
|
+
function readToEnvoySqliteExecResponse(bc) {
|
|
2003
|
+
return {
|
|
2004
|
+
requestId: bare.readU32(bc),
|
|
2005
|
+
data: readSqliteExecResponse(bc)
|
|
2006
|
+
};
|
|
2007
|
+
}
|
|
2008
|
+
function writeToEnvoySqliteExecResponse(bc, x) {
|
|
2009
|
+
bare.writeU32(bc, x.requestId);
|
|
2010
|
+
writeSqliteExecResponse(bc, x.data);
|
|
2011
|
+
}
|
|
2012
|
+
function readToEnvoySqliteExecuteResponse(bc) {
|
|
2013
|
+
return {
|
|
2014
|
+
requestId: bare.readU32(bc),
|
|
2015
|
+
data: readSqliteExecuteResponse(bc)
|
|
2016
|
+
};
|
|
2017
|
+
}
|
|
2018
|
+
function writeToEnvoySqliteExecuteResponse(bc, x) {
|
|
2019
|
+
bare.writeU32(bc, x.requestId);
|
|
2020
|
+
writeSqliteExecuteResponse(bc, x.data);
|
|
2021
|
+
}
|
|
1379
2022
|
function readToEnvoy(bc) {
|
|
1380
2023
|
const offset = bc.offset;
|
|
1381
2024
|
const tag = bare.readU8(bc);
|
|
@@ -1392,6 +2035,14 @@ function readToEnvoy(bc) {
|
|
|
1392
2035
|
return { tag: "ToEnvoyTunnelMessage", val: readToEnvoyTunnelMessage(bc) };
|
|
1393
2036
|
case 5:
|
|
1394
2037
|
return { tag: "ToEnvoyPing", val: readToEnvoyPing(bc) };
|
|
2038
|
+
case 6:
|
|
2039
|
+
return { tag: "ToEnvoySqliteGetPagesResponse", val: readToEnvoySqliteGetPagesResponse(bc) };
|
|
2040
|
+
case 7:
|
|
2041
|
+
return { tag: "ToEnvoySqliteCommitResponse", val: readToEnvoySqliteCommitResponse(bc) };
|
|
2042
|
+
case 8:
|
|
2043
|
+
return { tag: "ToEnvoySqliteExecResponse", val: readToEnvoySqliteExecResponse(bc) };
|
|
2044
|
+
case 9:
|
|
2045
|
+
return { tag: "ToEnvoySqliteExecuteResponse", val: readToEnvoySqliteExecuteResponse(bc) };
|
|
1395
2046
|
default: {
|
|
1396
2047
|
bc.offset = offset;
|
|
1397
2048
|
throw new bare.BareError(offset, "invalid tag");
|
|
@@ -1430,6 +2081,26 @@ function writeToEnvoy(bc, x) {
|
|
|
1430
2081
|
writeToEnvoyPing(bc, x.val);
|
|
1431
2082
|
break;
|
|
1432
2083
|
}
|
|
2084
|
+
case "ToEnvoySqliteGetPagesResponse": {
|
|
2085
|
+
bare.writeU8(bc, 6);
|
|
2086
|
+
writeToEnvoySqliteGetPagesResponse(bc, x.val);
|
|
2087
|
+
break;
|
|
2088
|
+
}
|
|
2089
|
+
case "ToEnvoySqliteCommitResponse": {
|
|
2090
|
+
bare.writeU8(bc, 7);
|
|
2091
|
+
writeToEnvoySqliteCommitResponse(bc, x.val);
|
|
2092
|
+
break;
|
|
2093
|
+
}
|
|
2094
|
+
case "ToEnvoySqliteExecResponse": {
|
|
2095
|
+
bare.writeU8(bc, 8);
|
|
2096
|
+
writeToEnvoySqliteExecResponse(bc, x.val);
|
|
2097
|
+
break;
|
|
2098
|
+
}
|
|
2099
|
+
case "ToEnvoySqliteExecuteResponse": {
|
|
2100
|
+
bare.writeU8(bc, 9);
|
|
2101
|
+
writeToEnvoySqliteExecuteResponse(bc, x.val);
|
|
2102
|
+
break;
|
|
2103
|
+
}
|
|
1433
2104
|
}
|
|
1434
2105
|
}
|
|
1435
2106
|
function encodeToEnvoy(x, config) {
|
|
@@ -1636,7 +2307,7 @@ function decodeToOutbound(bytes) {
|
|
|
1636
2307
|
function assert(condition, message) {
|
|
1637
2308
|
if (!condition) throw new Error(message ?? "Assertion failed");
|
|
1638
2309
|
}
|
|
1639
|
-
var VERSION =
|
|
2310
|
+
var VERSION = 4;
|
|
1640
2311
|
export {
|
|
1641
2312
|
StopActorReason,
|
|
1642
2313
|
StopCode,
|
|
@@ -1695,6 +2366,31 @@ export {
|
|
|
1695
2366
|
readPreloadedKvEntry,
|
|
1696
2367
|
readProtocolMetadata,
|
|
1697
2368
|
readRequestId,
|
|
2369
|
+
readSqliteBindParam,
|
|
2370
|
+
readSqliteColumnValue,
|
|
2371
|
+
readSqliteCommitRequest,
|
|
2372
|
+
readSqliteCommitResponse,
|
|
2373
|
+
readSqliteDirtyPage,
|
|
2374
|
+
readSqliteErrorResponse,
|
|
2375
|
+
readSqliteExecOk,
|
|
2376
|
+
readSqliteExecRequest,
|
|
2377
|
+
readSqliteExecResponse,
|
|
2378
|
+
readSqliteExecuteOk,
|
|
2379
|
+
readSqliteExecuteRequest,
|
|
2380
|
+
readSqliteExecuteResponse,
|
|
2381
|
+
readSqliteExecuteResult,
|
|
2382
|
+
readSqliteFetchedPage,
|
|
2383
|
+
readSqliteGeneration,
|
|
2384
|
+
readSqliteGetPagesOk,
|
|
2385
|
+
readSqliteGetPagesRequest,
|
|
2386
|
+
readSqliteGetPagesResponse,
|
|
2387
|
+
readSqlitePageBytes,
|
|
2388
|
+
readSqlitePgno,
|
|
2389
|
+
readSqliteQueryResult,
|
|
2390
|
+
readSqliteValueBlob,
|
|
2391
|
+
readSqliteValueFloat,
|
|
2392
|
+
readSqliteValueInteger,
|
|
2393
|
+
readSqliteValueText,
|
|
1698
2394
|
readStopActorReason,
|
|
1699
2395
|
readStopCode,
|
|
1700
2396
|
readToEnvoy,
|
|
@@ -1707,6 +2403,10 @@ export {
|
|
|
1707
2403
|
readToEnvoyPing,
|
|
1708
2404
|
readToEnvoyRequestChunk,
|
|
1709
2405
|
readToEnvoyRequestStart,
|
|
2406
|
+
readToEnvoySqliteCommitResponse,
|
|
2407
|
+
readToEnvoySqliteExecResponse,
|
|
2408
|
+
readToEnvoySqliteExecuteResponse,
|
|
2409
|
+
readToEnvoySqliteGetPagesResponse,
|
|
1710
2410
|
readToEnvoyTunnelMessage,
|
|
1711
2411
|
readToEnvoyTunnelMessageKind,
|
|
1712
2412
|
readToEnvoyWebSocketClose,
|
|
@@ -1724,6 +2424,10 @@ export {
|
|
|
1724
2424
|
readToRivetPong,
|
|
1725
2425
|
readToRivetResponseChunk,
|
|
1726
2426
|
readToRivetResponseStart,
|
|
2427
|
+
readToRivetSqliteCommitRequest,
|
|
2428
|
+
readToRivetSqliteExecRequest,
|
|
2429
|
+
readToRivetSqliteExecuteRequest,
|
|
2430
|
+
readToRivetSqliteGetPagesRequest,
|
|
1727
2431
|
readToRivetTunnelMessage,
|
|
1728
2432
|
readToRivetTunnelMessageKind,
|
|
1729
2433
|
readToRivetWebSocketClose,
|
|
@@ -1772,6 +2476,31 @@ export {
|
|
|
1772
2476
|
writePreloadedKvEntry,
|
|
1773
2477
|
writeProtocolMetadata,
|
|
1774
2478
|
writeRequestId,
|
|
2479
|
+
writeSqliteBindParam,
|
|
2480
|
+
writeSqliteColumnValue,
|
|
2481
|
+
writeSqliteCommitRequest,
|
|
2482
|
+
writeSqliteCommitResponse,
|
|
2483
|
+
writeSqliteDirtyPage,
|
|
2484
|
+
writeSqliteErrorResponse,
|
|
2485
|
+
writeSqliteExecOk,
|
|
2486
|
+
writeSqliteExecRequest,
|
|
2487
|
+
writeSqliteExecResponse,
|
|
2488
|
+
writeSqliteExecuteOk,
|
|
2489
|
+
writeSqliteExecuteRequest,
|
|
2490
|
+
writeSqliteExecuteResponse,
|
|
2491
|
+
writeSqliteExecuteResult,
|
|
2492
|
+
writeSqliteFetchedPage,
|
|
2493
|
+
writeSqliteGeneration,
|
|
2494
|
+
writeSqliteGetPagesOk,
|
|
2495
|
+
writeSqliteGetPagesRequest,
|
|
2496
|
+
writeSqliteGetPagesResponse,
|
|
2497
|
+
writeSqlitePageBytes,
|
|
2498
|
+
writeSqlitePgno,
|
|
2499
|
+
writeSqliteQueryResult,
|
|
2500
|
+
writeSqliteValueBlob,
|
|
2501
|
+
writeSqliteValueFloat,
|
|
2502
|
+
writeSqliteValueInteger,
|
|
2503
|
+
writeSqliteValueText,
|
|
1775
2504
|
writeStopActorReason,
|
|
1776
2505
|
writeStopCode,
|
|
1777
2506
|
writeToEnvoy,
|
|
@@ -1784,6 +2513,10 @@ export {
|
|
|
1784
2513
|
writeToEnvoyPing,
|
|
1785
2514
|
writeToEnvoyRequestChunk,
|
|
1786
2515
|
writeToEnvoyRequestStart,
|
|
2516
|
+
writeToEnvoySqliteCommitResponse,
|
|
2517
|
+
writeToEnvoySqliteExecResponse,
|
|
2518
|
+
writeToEnvoySqliteExecuteResponse,
|
|
2519
|
+
writeToEnvoySqliteGetPagesResponse,
|
|
1787
2520
|
writeToEnvoyTunnelMessage,
|
|
1788
2521
|
writeToEnvoyTunnelMessageKind,
|
|
1789
2522
|
writeToEnvoyWebSocketClose,
|
|
@@ -1801,6 +2534,10 @@ export {
|
|
|
1801
2534
|
writeToRivetPong,
|
|
1802
2535
|
writeToRivetResponseChunk,
|
|
1803
2536
|
writeToRivetResponseStart,
|
|
2537
|
+
writeToRivetSqliteCommitRequest,
|
|
2538
|
+
writeToRivetSqliteExecRequest,
|
|
2539
|
+
writeToRivetSqliteExecuteRequest,
|
|
2540
|
+
writeToRivetSqliteGetPagesRequest,
|
|
1804
2541
|
writeToRivetTunnelMessage,
|
|
1805
2542
|
writeToRivetTunnelMessageKind,
|
|
1806
2543
|
writeToRivetWebSocketClose,
|