fix flutter/dart wasm

This commit is contained in:
Christien Rioux 2024-03-17 10:54:37 -04:00
parent 6a8c0830d2
commit 3970b6f294
11 changed files with 195 additions and 107 deletions

View File

@ -156,10 +156,12 @@ impl RPCOperationInspectValueA {
// Ensure seqs returned does not exceeed subkeys requested
#[allow(clippy::unnecessary_cast)]
if self.seqs.len() > inspect_value_context.subkeys.len() as usize {
return Err(RPCError::protocol(
"InspectValue seqs length is greater than subkeys requested",
));
if self.seqs.len() as u64 > inspect_value_context.subkeys.len() as u64 {
return Err(RPCError::protocol(format!(
"InspectValue seqs length is greater than subkeys requested: {} > {}",
self.seqs.len(),
inspect_value_context.subkeys.len()
)));
}
// Validate descriptor

View File

@ -156,7 +156,7 @@ impl StorageManager {
// Get number of subkeys from schema and ensure we are getting the
// right number of sequence numbers betwen that and what we asked for
#[allow(clippy::unnecessary_cast)]
if answer.seqs.len() != descriptor_info.subkeys.len() as usize {
if answer.seqs.len() as u64 != descriptor_info.subkeys.len() as u64 {
// Not the right number of sequence numbers
// Move to the next node
return Ok(NetworkResult::invalid_message(format!(

View File

@ -771,7 +771,7 @@ impl StorageManager {
#[allow(clippy::unnecessary_cast)]
{
assert!(
local_inspect_result.subkeys.len() as usize == local_inspect_result.seqs.len(),
local_inspect_result.subkeys.len() as u64 == local_inspect_result.seqs.len() as u64,
"mismatch between local subkeys returned and sequence number list returned"
);
}
@ -824,8 +824,8 @@ impl StorageManager {
#[allow(clippy::unnecessary_cast)]
{
assert_eq!(
result.inspect_result.subkeys.len() as usize,
result.fanout_results.len(),
result.inspect_result.subkeys.len() as u64,
result.fanout_results.len() as u64,
"mismatch between subkeys returned and fanout results returned"
);
}

View File

@ -76,6 +76,7 @@ class DefaultFixture {
_veilidUpdateSubscription = us.listen((update) {
if (update is VeilidLog) {
// print(update.message);
} else if (update is VeilidUpdateAttachment) {
} else if (update is VeilidUpdateConfig) {
} else if (update is VeilidUpdateNetwork) {

View File

@ -16,7 +16,7 @@ Future<void> testOpenDeleteTableDb() async {
final tdb = await Veilid.instance.openTableDB(testDb, 1);
try {
expect(() async => await Veilid.instance.deleteTableDB(testDb),
await expectLater(() async => await Veilid.instance.deleteTableDB(testDb),
throwsA(isA<VeilidAPIException>()));
} finally {
tdb.close();

View File

@ -0,0 +1,3 @@
import 'package:integration_test/integration_test_driver.dart';
Future<void> main() => integrationDriver();

View File

@ -144,12 +144,12 @@ sealed class VeilidUpdate with _$VeilidUpdate {
String? backtrace,
}) = VeilidLog;
const factory VeilidUpdate.appMessage({
@Uint8ListJsonConverter() required Uint8List message,
@Uint8ListJsonConverter.jsIsArray() required Uint8List message,
TypedKey? sender,
String? routeId,
}) = VeilidAppMessage;
const factory VeilidUpdate.appCall({
@Uint8ListJsonConverter() required Uint8List message,
@Uint8ListJsonConverter.jsIsArray() required Uint8List message,
required String callId,
TypedKey? sender,
String? routeId,

View File

@ -1338,11 +1338,16 @@ mixin _$VeilidUpdate {
required TResult Function(
VeilidLogLevel logLevel, String message, String? backtrace)
log,
required TResult Function(@Uint8ListJsonConverter() Uint8List message,
Typed<FixedEncodedString43>? sender, String? routeId)
required TResult Function(
@Uint8ListJsonConverter.jsIsArray() Uint8List message,
Typed<FixedEncodedString43>? sender,
String? routeId)
appMessage,
required TResult Function(@Uint8ListJsonConverter() Uint8List message,
String callId, Typed<FixedEncodedString43>? sender, String? routeId)
required TResult Function(
@Uint8ListJsonConverter.jsIsArray() Uint8List message,
String callId,
Typed<FixedEncodedString43>? sender,
String? routeId)
appCall,
required TResult Function(AttachmentState state, bool publicInternetReady,
bool localNetworkReady)
@ -1364,11 +1369,11 @@ mixin _$VeilidUpdate {
TResult? Function(
VeilidLogLevel logLevel, String message, String? backtrace)?
log,
TResult? Function(@Uint8ListJsonConverter() Uint8List message,
TResult? Function(@Uint8ListJsonConverter.jsIsArray() Uint8List message,
Typed<FixedEncodedString43>? sender, String? routeId)?
appMessage,
TResult? Function(
@Uint8ListJsonConverter() Uint8List message,
@Uint8ListJsonConverter.jsIsArray() Uint8List message,
String callId,
Typed<FixedEncodedString43>? sender,
String? routeId)?
@ -1392,11 +1397,14 @@ mixin _$VeilidUpdate {
TResult Function(
VeilidLogLevel logLevel, String message, String? backtrace)?
log,
TResult Function(@Uint8ListJsonConverter() Uint8List message,
TResult Function(@Uint8ListJsonConverter.jsIsArray() Uint8List message,
Typed<FixedEncodedString43>? sender, String? routeId)?
appMessage,
TResult Function(@Uint8ListJsonConverter() Uint8List message, String callId,
Typed<FixedEncodedString43>? sender, String? routeId)?
TResult Function(
@Uint8ListJsonConverter.jsIsArray() Uint8List message,
String callId,
Typed<FixedEncodedString43>? sender,
String? routeId)?
appCall,
TResult Function(AttachmentState state, bool publicInternetReady,
bool localNetworkReady)?
@ -1568,11 +1576,16 @@ class _$VeilidLogImpl implements VeilidLog {
required TResult Function(
VeilidLogLevel logLevel, String message, String? backtrace)
log,
required TResult Function(@Uint8ListJsonConverter() Uint8List message,
Typed<FixedEncodedString43>? sender, String? routeId)
required TResult Function(
@Uint8ListJsonConverter.jsIsArray() Uint8List message,
Typed<FixedEncodedString43>? sender,
String? routeId)
appMessage,
required TResult Function(@Uint8ListJsonConverter() Uint8List message,
String callId, Typed<FixedEncodedString43>? sender, String? routeId)
required TResult Function(
@Uint8ListJsonConverter.jsIsArray() Uint8List message,
String callId,
Typed<FixedEncodedString43>? sender,
String? routeId)
appCall,
required TResult Function(AttachmentState state, bool publicInternetReady,
bool localNetworkReady)
@ -1597,11 +1610,11 @@ class _$VeilidLogImpl implements VeilidLog {
TResult? Function(
VeilidLogLevel logLevel, String message, String? backtrace)?
log,
TResult? Function(@Uint8ListJsonConverter() Uint8List message,
TResult? Function(@Uint8ListJsonConverter.jsIsArray() Uint8List message,
Typed<FixedEncodedString43>? sender, String? routeId)?
appMessage,
TResult? Function(
@Uint8ListJsonConverter() Uint8List message,
@Uint8ListJsonConverter.jsIsArray() Uint8List message,
String callId,
Typed<FixedEncodedString43>? sender,
String? routeId)?
@ -1628,11 +1641,14 @@ class _$VeilidLogImpl implements VeilidLog {
TResult Function(
VeilidLogLevel logLevel, String message, String? backtrace)?
log,
TResult Function(@Uint8ListJsonConverter() Uint8List message,
TResult Function(@Uint8ListJsonConverter.jsIsArray() Uint8List message,
Typed<FixedEncodedString43>? sender, String? routeId)?
appMessage,
TResult Function(@Uint8ListJsonConverter() Uint8List message, String callId,
Typed<FixedEncodedString43>? sender, String? routeId)?
TResult Function(
@Uint8ListJsonConverter.jsIsArray() Uint8List message,
String callId,
Typed<FixedEncodedString43>? sender,
String? routeId)?
appCall,
TResult Function(AttachmentState state, bool publicInternetReady,
bool localNetworkReady)?
@ -1735,7 +1751,7 @@ abstract class _$$VeilidAppMessageImplCopyWith<$Res> {
__$$VeilidAppMessageImplCopyWithImpl<$Res>;
@useResult
$Res call(
{@Uint8ListJsonConverter() Uint8List message,
{@Uint8ListJsonConverter.jsIsArray() Uint8List message,
Typed<FixedEncodedString43>? sender,
String? routeId});
}
@ -1776,7 +1792,7 @@ class __$$VeilidAppMessageImplCopyWithImpl<$Res>
@JsonSerializable()
class _$VeilidAppMessageImpl implements VeilidAppMessage {
const _$VeilidAppMessageImpl(
{@Uint8ListJsonConverter() required this.message,
{@Uint8ListJsonConverter.jsIsArray() required this.message,
this.sender,
this.routeId,
final String? $type})
@ -1786,7 +1802,7 @@ class _$VeilidAppMessageImpl implements VeilidAppMessage {
_$$VeilidAppMessageImplFromJson(json);
@override
@Uint8ListJsonConverter()
@Uint8ListJsonConverter.jsIsArray()
final Uint8List message;
@override
final Typed<FixedEncodedString43>? sender;
@ -1829,11 +1845,16 @@ class _$VeilidAppMessageImpl implements VeilidAppMessage {
required TResult Function(
VeilidLogLevel logLevel, String message, String? backtrace)
log,
required TResult Function(@Uint8ListJsonConverter() Uint8List message,
Typed<FixedEncodedString43>? sender, String? routeId)
required TResult Function(
@Uint8ListJsonConverter.jsIsArray() Uint8List message,
Typed<FixedEncodedString43>? sender,
String? routeId)
appMessage,
required TResult Function(@Uint8ListJsonConverter() Uint8List message,
String callId, Typed<FixedEncodedString43>? sender, String? routeId)
required TResult Function(
@Uint8ListJsonConverter.jsIsArray() Uint8List message,
String callId,
Typed<FixedEncodedString43>? sender,
String? routeId)
appCall,
required TResult Function(AttachmentState state, bool publicInternetReady,
bool localNetworkReady)
@ -1858,11 +1879,11 @@ class _$VeilidAppMessageImpl implements VeilidAppMessage {
TResult? Function(
VeilidLogLevel logLevel, String message, String? backtrace)?
log,
TResult? Function(@Uint8ListJsonConverter() Uint8List message,
TResult? Function(@Uint8ListJsonConverter.jsIsArray() Uint8List message,
Typed<FixedEncodedString43>? sender, String? routeId)?
appMessage,
TResult? Function(
@Uint8ListJsonConverter() Uint8List message,
@Uint8ListJsonConverter.jsIsArray() Uint8List message,
String callId,
Typed<FixedEncodedString43>? sender,
String? routeId)?
@ -1889,11 +1910,14 @@ class _$VeilidAppMessageImpl implements VeilidAppMessage {
TResult Function(
VeilidLogLevel logLevel, String message, String? backtrace)?
log,
TResult Function(@Uint8ListJsonConverter() Uint8List message,
TResult Function(@Uint8ListJsonConverter.jsIsArray() Uint8List message,
Typed<FixedEncodedString43>? sender, String? routeId)?
appMessage,
TResult Function(@Uint8ListJsonConverter() Uint8List message, String callId,
Typed<FixedEncodedString43>? sender, String? routeId)?
TResult Function(
@Uint8ListJsonConverter.jsIsArray() Uint8List message,
String callId,
Typed<FixedEncodedString43>? sender,
String? routeId)?
appCall,
TResult Function(AttachmentState state, bool publicInternetReady,
bool localNetworkReady)?
@ -1974,14 +1998,14 @@ class _$VeilidAppMessageImpl implements VeilidAppMessage {
abstract class VeilidAppMessage implements VeilidUpdate {
const factory VeilidAppMessage(
{@Uint8ListJsonConverter() required final Uint8List message,
{@Uint8ListJsonConverter.jsIsArray() required final Uint8List message,
final Typed<FixedEncodedString43>? sender,
final String? routeId}) = _$VeilidAppMessageImpl;
factory VeilidAppMessage.fromJson(Map<String, dynamic> json) =
_$VeilidAppMessageImpl.fromJson;
@Uint8ListJsonConverter()
@Uint8ListJsonConverter.jsIsArray()
Uint8List get message;
Typed<FixedEncodedString43>? get sender;
String? get routeId;
@ -1997,7 +2021,7 @@ abstract class _$$VeilidAppCallImplCopyWith<$Res> {
__$$VeilidAppCallImplCopyWithImpl<$Res>;
@useResult
$Res call(
{@Uint8ListJsonConverter() Uint8List message,
{@Uint8ListJsonConverter.jsIsArray() Uint8List message,
String callId,
Typed<FixedEncodedString43>? sender,
String? routeId});
@ -2044,7 +2068,7 @@ class __$$VeilidAppCallImplCopyWithImpl<$Res>
@JsonSerializable()
class _$VeilidAppCallImpl implements VeilidAppCall {
const _$VeilidAppCallImpl(
{@Uint8ListJsonConverter() required this.message,
{@Uint8ListJsonConverter.jsIsArray() required this.message,
required this.callId,
this.sender,
this.routeId,
@ -2055,7 +2079,7 @@ class _$VeilidAppCallImpl implements VeilidAppCall {
_$$VeilidAppCallImplFromJson(json);
@override
@Uint8ListJsonConverter()
@Uint8ListJsonConverter.jsIsArray()
final Uint8List message;
@override
final String callId;
@ -2100,11 +2124,16 @@ class _$VeilidAppCallImpl implements VeilidAppCall {
required TResult Function(
VeilidLogLevel logLevel, String message, String? backtrace)
log,
required TResult Function(@Uint8ListJsonConverter() Uint8List message,
Typed<FixedEncodedString43>? sender, String? routeId)
required TResult Function(
@Uint8ListJsonConverter.jsIsArray() Uint8List message,
Typed<FixedEncodedString43>? sender,
String? routeId)
appMessage,
required TResult Function(@Uint8ListJsonConverter() Uint8List message,
String callId, Typed<FixedEncodedString43>? sender, String? routeId)
required TResult Function(
@Uint8ListJsonConverter.jsIsArray() Uint8List message,
String callId,
Typed<FixedEncodedString43>? sender,
String? routeId)
appCall,
required TResult Function(AttachmentState state, bool publicInternetReady,
bool localNetworkReady)
@ -2129,11 +2158,11 @@ class _$VeilidAppCallImpl implements VeilidAppCall {
TResult? Function(
VeilidLogLevel logLevel, String message, String? backtrace)?
log,
TResult? Function(@Uint8ListJsonConverter() Uint8List message,
TResult? Function(@Uint8ListJsonConverter.jsIsArray() Uint8List message,
Typed<FixedEncodedString43>? sender, String? routeId)?
appMessage,
TResult? Function(
@Uint8ListJsonConverter() Uint8List message,
@Uint8ListJsonConverter.jsIsArray() Uint8List message,
String callId,
Typed<FixedEncodedString43>? sender,
String? routeId)?
@ -2160,11 +2189,14 @@ class _$VeilidAppCallImpl implements VeilidAppCall {
TResult Function(
VeilidLogLevel logLevel, String message, String? backtrace)?
log,
TResult Function(@Uint8ListJsonConverter() Uint8List message,
TResult Function(@Uint8ListJsonConverter.jsIsArray() Uint8List message,
Typed<FixedEncodedString43>? sender, String? routeId)?
appMessage,
TResult Function(@Uint8ListJsonConverter() Uint8List message, String callId,
Typed<FixedEncodedString43>? sender, String? routeId)?
TResult Function(
@Uint8ListJsonConverter.jsIsArray() Uint8List message,
String callId,
Typed<FixedEncodedString43>? sender,
String? routeId)?
appCall,
TResult Function(AttachmentState state, bool publicInternetReady,
bool localNetworkReady)?
@ -2245,7 +2277,7 @@ class _$VeilidAppCallImpl implements VeilidAppCall {
abstract class VeilidAppCall implements VeilidUpdate {
const factory VeilidAppCall(
{@Uint8ListJsonConverter() required final Uint8List message,
{@Uint8ListJsonConverter.jsIsArray() required final Uint8List message,
required final String callId,
final Typed<FixedEncodedString43>? sender,
final String? routeId}) = _$VeilidAppCallImpl;
@ -2253,7 +2285,7 @@ abstract class VeilidAppCall implements VeilidUpdate {
factory VeilidAppCall.fromJson(Map<String, dynamic> json) =
_$VeilidAppCallImpl.fromJson;
@Uint8ListJsonConverter()
@Uint8ListJsonConverter.jsIsArray()
Uint8List get message;
String get callId;
Typed<FixedEncodedString43>? get sender;
@ -2367,11 +2399,16 @@ class _$VeilidUpdateAttachmentImpl implements VeilidUpdateAttachment {
required TResult Function(
VeilidLogLevel logLevel, String message, String? backtrace)
log,
required TResult Function(@Uint8ListJsonConverter() Uint8List message,
Typed<FixedEncodedString43>? sender, String? routeId)
required TResult Function(
@Uint8ListJsonConverter.jsIsArray() Uint8List message,
Typed<FixedEncodedString43>? sender,
String? routeId)
appMessage,
required TResult Function(@Uint8ListJsonConverter() Uint8List message,
String callId, Typed<FixedEncodedString43>? sender, String? routeId)
required TResult Function(
@Uint8ListJsonConverter.jsIsArray() Uint8List message,
String callId,
Typed<FixedEncodedString43>? sender,
String? routeId)
appCall,
required TResult Function(AttachmentState state, bool publicInternetReady,
bool localNetworkReady)
@ -2396,11 +2433,11 @@ class _$VeilidUpdateAttachmentImpl implements VeilidUpdateAttachment {
TResult? Function(
VeilidLogLevel logLevel, String message, String? backtrace)?
log,
TResult? Function(@Uint8ListJsonConverter() Uint8List message,
TResult? Function(@Uint8ListJsonConverter.jsIsArray() Uint8List message,
Typed<FixedEncodedString43>? sender, String? routeId)?
appMessage,
TResult? Function(
@Uint8ListJsonConverter() Uint8List message,
@Uint8ListJsonConverter.jsIsArray() Uint8List message,
String callId,
Typed<FixedEncodedString43>? sender,
String? routeId)?
@ -2427,11 +2464,14 @@ class _$VeilidUpdateAttachmentImpl implements VeilidUpdateAttachment {
TResult Function(
VeilidLogLevel logLevel, String message, String? backtrace)?
log,
TResult Function(@Uint8ListJsonConverter() Uint8List message,
TResult Function(@Uint8ListJsonConverter.jsIsArray() Uint8List message,
Typed<FixedEncodedString43>? sender, String? routeId)?
appMessage,
TResult Function(@Uint8ListJsonConverter() Uint8List message, String callId,
Typed<FixedEncodedString43>? sender, String? routeId)?
TResult Function(
@Uint8ListJsonConverter.jsIsArray() Uint8List message,
String callId,
Typed<FixedEncodedString43>? sender,
String? routeId)?
appCall,
TResult Function(AttachmentState state, bool publicInternetReady,
bool localNetworkReady)?
@ -2640,11 +2680,16 @@ class _$VeilidUpdateNetworkImpl implements VeilidUpdateNetwork {
required TResult Function(
VeilidLogLevel logLevel, String message, String? backtrace)
log,
required TResult Function(@Uint8ListJsonConverter() Uint8List message,
Typed<FixedEncodedString43>? sender, String? routeId)
required TResult Function(
@Uint8ListJsonConverter.jsIsArray() Uint8List message,
Typed<FixedEncodedString43>? sender,
String? routeId)
appMessage,
required TResult Function(@Uint8ListJsonConverter() Uint8List message,
String callId, Typed<FixedEncodedString43>? sender, String? routeId)
required TResult Function(
@Uint8ListJsonConverter.jsIsArray() Uint8List message,
String callId,
Typed<FixedEncodedString43>? sender,
String? routeId)
appCall,
required TResult Function(AttachmentState state, bool publicInternetReady,
bool localNetworkReady)
@ -2669,11 +2714,11 @@ class _$VeilidUpdateNetworkImpl implements VeilidUpdateNetwork {
TResult? Function(
VeilidLogLevel logLevel, String message, String? backtrace)?
log,
TResult? Function(@Uint8ListJsonConverter() Uint8List message,
TResult? Function(@Uint8ListJsonConverter.jsIsArray() Uint8List message,
Typed<FixedEncodedString43>? sender, String? routeId)?
appMessage,
TResult? Function(
@Uint8ListJsonConverter() Uint8List message,
@Uint8ListJsonConverter.jsIsArray() Uint8List message,
String callId,
Typed<FixedEncodedString43>? sender,
String? routeId)?
@ -2700,11 +2745,14 @@ class _$VeilidUpdateNetworkImpl implements VeilidUpdateNetwork {
TResult Function(
VeilidLogLevel logLevel, String message, String? backtrace)?
log,
TResult Function(@Uint8ListJsonConverter() Uint8List message,
TResult Function(@Uint8ListJsonConverter.jsIsArray() Uint8List message,
Typed<FixedEncodedString43>? sender, String? routeId)?
appMessage,
TResult Function(@Uint8ListJsonConverter() Uint8List message, String callId,
Typed<FixedEncodedString43>? sender, String? routeId)?
TResult Function(
@Uint8ListJsonConverter.jsIsArray() Uint8List message,
String callId,
Typed<FixedEncodedString43>? sender,
String? routeId)?
appCall,
TResult Function(AttachmentState state, bool publicInternetReady,
bool localNetworkReady)?
@ -2888,11 +2936,16 @@ class _$VeilidUpdateConfigImpl implements VeilidUpdateConfig {
required TResult Function(
VeilidLogLevel logLevel, String message, String? backtrace)
log,
required TResult Function(@Uint8ListJsonConverter() Uint8List message,
Typed<FixedEncodedString43>? sender, String? routeId)
required TResult Function(
@Uint8ListJsonConverter.jsIsArray() Uint8List message,
Typed<FixedEncodedString43>? sender,
String? routeId)
appMessage,
required TResult Function(@Uint8ListJsonConverter() Uint8List message,
String callId, Typed<FixedEncodedString43>? sender, String? routeId)
required TResult Function(
@Uint8ListJsonConverter.jsIsArray() Uint8List message,
String callId,
Typed<FixedEncodedString43>? sender,
String? routeId)
appCall,
required TResult Function(AttachmentState state, bool publicInternetReady,
bool localNetworkReady)
@ -2917,11 +2970,11 @@ class _$VeilidUpdateConfigImpl implements VeilidUpdateConfig {
TResult? Function(
VeilidLogLevel logLevel, String message, String? backtrace)?
log,
TResult? Function(@Uint8ListJsonConverter() Uint8List message,
TResult? Function(@Uint8ListJsonConverter.jsIsArray() Uint8List message,
Typed<FixedEncodedString43>? sender, String? routeId)?
appMessage,
TResult? Function(
@Uint8ListJsonConverter() Uint8List message,
@Uint8ListJsonConverter.jsIsArray() Uint8List message,
String callId,
Typed<FixedEncodedString43>? sender,
String? routeId)?
@ -2948,11 +3001,14 @@ class _$VeilidUpdateConfigImpl implements VeilidUpdateConfig {
TResult Function(
VeilidLogLevel logLevel, String message, String? backtrace)?
log,
TResult Function(@Uint8ListJsonConverter() Uint8List message,
TResult Function(@Uint8ListJsonConverter.jsIsArray() Uint8List message,
Typed<FixedEncodedString43>? sender, String? routeId)?
appMessage,
TResult Function(@Uint8ListJsonConverter() Uint8List message, String callId,
Typed<FixedEncodedString43>? sender, String? routeId)?
TResult Function(
@Uint8ListJsonConverter.jsIsArray() Uint8List message,
String callId,
Typed<FixedEncodedString43>? sender,
String? routeId)?
appCall,
TResult Function(AttachmentState state, bool publicInternetReady,
bool localNetworkReady)?
@ -3152,11 +3208,16 @@ class _$VeilidUpdateRouteChangeImpl implements VeilidUpdateRouteChange {
required TResult Function(
VeilidLogLevel logLevel, String message, String? backtrace)
log,
required TResult Function(@Uint8ListJsonConverter() Uint8List message,
Typed<FixedEncodedString43>? sender, String? routeId)
required TResult Function(
@Uint8ListJsonConverter.jsIsArray() Uint8List message,
Typed<FixedEncodedString43>? sender,
String? routeId)
appMessage,
required TResult Function(@Uint8ListJsonConverter() Uint8List message,
String callId, Typed<FixedEncodedString43>? sender, String? routeId)
required TResult Function(
@Uint8ListJsonConverter.jsIsArray() Uint8List message,
String callId,
Typed<FixedEncodedString43>? sender,
String? routeId)
appCall,
required TResult Function(AttachmentState state, bool publicInternetReady,
bool localNetworkReady)
@ -3181,11 +3242,11 @@ class _$VeilidUpdateRouteChangeImpl implements VeilidUpdateRouteChange {
TResult? Function(
VeilidLogLevel logLevel, String message, String? backtrace)?
log,
TResult? Function(@Uint8ListJsonConverter() Uint8List message,
TResult? Function(@Uint8ListJsonConverter.jsIsArray() Uint8List message,
Typed<FixedEncodedString43>? sender, String? routeId)?
appMessage,
TResult? Function(
@Uint8ListJsonConverter() Uint8List message,
@Uint8ListJsonConverter.jsIsArray() Uint8List message,
String callId,
Typed<FixedEncodedString43>? sender,
String? routeId)?
@ -3212,11 +3273,14 @@ class _$VeilidUpdateRouteChangeImpl implements VeilidUpdateRouteChange {
TResult Function(
VeilidLogLevel logLevel, String message, String? backtrace)?
log,
TResult Function(@Uint8ListJsonConverter() Uint8List message,
TResult Function(@Uint8ListJsonConverter.jsIsArray() Uint8List message,
Typed<FixedEncodedString43>? sender, String? routeId)?
appMessage,
TResult Function(@Uint8ListJsonConverter() Uint8List message, String callId,
Typed<FixedEncodedString43>? sender, String? routeId)?
TResult Function(
@Uint8ListJsonConverter.jsIsArray() Uint8List message,
String callId,
Typed<FixedEncodedString43>? sender,
String? routeId)?
appCall,
TResult Function(AttachmentState state, bool publicInternetReady,
bool localNetworkReady)?
@ -3440,11 +3504,16 @@ class _$VeilidUpdateValueChangeImpl implements VeilidUpdateValueChange {
required TResult Function(
VeilidLogLevel logLevel, String message, String? backtrace)
log,
required TResult Function(@Uint8ListJsonConverter() Uint8List message,
Typed<FixedEncodedString43>? sender, String? routeId)
required TResult Function(
@Uint8ListJsonConverter.jsIsArray() Uint8List message,
Typed<FixedEncodedString43>? sender,
String? routeId)
appMessage,
required TResult Function(@Uint8ListJsonConverter() Uint8List message,
String callId, Typed<FixedEncodedString43>? sender, String? routeId)
required TResult Function(
@Uint8ListJsonConverter.jsIsArray() Uint8List message,
String callId,
Typed<FixedEncodedString43>? sender,
String? routeId)
appCall,
required TResult Function(AttachmentState state, bool publicInternetReady,
bool localNetworkReady)
@ -3469,11 +3538,11 @@ class _$VeilidUpdateValueChangeImpl implements VeilidUpdateValueChange {
TResult? Function(
VeilidLogLevel logLevel, String message, String? backtrace)?
log,
TResult? Function(@Uint8ListJsonConverter() Uint8List message,
TResult? Function(@Uint8ListJsonConverter.jsIsArray() Uint8List message,
Typed<FixedEncodedString43>? sender, String? routeId)?
appMessage,
TResult? Function(
@Uint8ListJsonConverter() Uint8List message,
@Uint8ListJsonConverter.jsIsArray() Uint8List message,
String callId,
Typed<FixedEncodedString43>? sender,
String? routeId)?
@ -3500,11 +3569,14 @@ class _$VeilidUpdateValueChangeImpl implements VeilidUpdateValueChange {
TResult Function(
VeilidLogLevel logLevel, String message, String? backtrace)?
log,
TResult Function(@Uint8ListJsonConverter() Uint8List message,
TResult Function(@Uint8ListJsonConverter.jsIsArray() Uint8List message,
Typed<FixedEncodedString43>? sender, String? routeId)?
appMessage,
TResult Function(@Uint8ListJsonConverter() Uint8List message, String callId,
Typed<FixedEncodedString43>? sender, String? routeId)?
TResult Function(
@Uint8ListJsonConverter.jsIsArray() Uint8List message,
String callId,
Typed<FixedEncodedString43>? sender,
String? routeId)?
appCall,
TResult Function(AttachmentState state, bool publicInternetReady,
bool localNetworkReady)?

View File

@ -133,7 +133,8 @@ Map<String, dynamic> _$$VeilidLogImplToJson(_$VeilidLogImpl instance) =>
_$VeilidAppMessageImpl _$$VeilidAppMessageImplFromJson(
Map<String, dynamic> json) =>
_$VeilidAppMessageImpl(
message: const Uint8ListJsonConverter().fromJson(json['message']),
message:
const Uint8ListJsonConverter.jsIsArray().fromJson(json['message']),
sender: json['sender'] == null
? null
: Typed<FixedEncodedString43>.fromJson(json['sender']),
@ -144,7 +145,8 @@ _$VeilidAppMessageImpl _$$VeilidAppMessageImplFromJson(
Map<String, dynamic> _$$VeilidAppMessageImplToJson(
_$VeilidAppMessageImpl instance) =>
<String, dynamic>{
'message': const Uint8ListJsonConverter().toJson(instance.message),
'message':
const Uint8ListJsonConverter.jsIsArray().toJson(instance.message),
'sender': instance.sender?.toJson(),
'route_id': instance.routeId,
'kind': instance.$type,
@ -152,7 +154,8 @@ Map<String, dynamic> _$$VeilidAppMessageImplToJson(
_$VeilidAppCallImpl _$$VeilidAppCallImplFromJson(Map<String, dynamic> json) =>
_$VeilidAppCallImpl(
message: const Uint8ListJsonConverter().fromJson(json['message']),
message:
const Uint8ListJsonConverter.jsIsArray().fromJson(json['message']),
callId: json['call_id'] as String,
sender: json['sender'] == null
? null
@ -163,7 +166,8 @@ _$VeilidAppCallImpl _$$VeilidAppCallImplFromJson(Map<String, dynamic> json) =>
Map<String, dynamic> _$$VeilidAppCallImplToJson(_$VeilidAppCallImpl instance) =>
<String, dynamic>{
'message': const Uint8ListJsonConverter().toJson(instance.message),
'message':
const Uint8ListJsonConverter.jsIsArray().toJson(instance.message),
'call_id': instance.callId,
'sender': instance.sender?.toJson(),
'route_id': instance.routeId,

View File

@ -0,0 +1,5 @@
#!/bin/bash
echo Ensure chromedriver is running on port 4444 and you have compiled veilid-wasm with wasm_build.sh
pushd example 2>/dev/null
flutter drive --driver=test_driver/integration_test.dart --target=integration_test/app_test.dart -d chrome $@
popd 2>/dev/null

View File

@ -644,6 +644,7 @@ pub fn routing_context_inspect_dht_record(
let res = routing_context
.inspect_dht_record(key, subkeys, scope)
.await?;
APIResult::Ok(res)
})
}
@ -695,7 +696,7 @@ pub fn import_remote_private_route(blob: String) -> Promise {
#[wasm_bindgen()]
pub fn release_private_route(route_id: String) -> Promise {
let route_id: veilid_core::RouteId = veilid_core::deserialize_json(&route_id).unwrap();
let route_id: veilid_core::RouteId = veilid_core::RouteId::try_decode(&route_id).unwrap();
wrap_api_future_void(async move {
let veilid_api = get_veilid_api()?;
veilid_api.release_private_route(route_id)?;