diff --git a/modules/sqlite-sync b/modules/sqlite-sync index 46eccee..13dce37 160000 --- a/modules/sqlite-sync +++ b/modules/sqlite-sync @@ -1 +1 @@ -Subproject commit 46eccee64272c97d54ca5a011fc62bc33639d58c +Subproject commit 13dce373418f6c46e0d12cc4d781f0d9e3a85d9e diff --git a/wasm.c b/wasm.c index 278a132..69833af 100644 --- a/wasm.c +++ b/wasm.c @@ -19,9 +19,12 @@ #include "modules/sqlite-sync/src/network.c" #include "modules/sqlite-sync/src/dbutils.c" #include "modules/sqlite-sync/src/cloudsync.c" -#include "modules/sqlite-sync/src/vtab.c" #include "modules/sqlite-sync/src/pk.c" #include "modules/sqlite-sync/src/lz4.c" +#include "modules/sqlite-sync/src/sqlite/cloudsync_changes_sqlite.c" +#include "modules/sqlite-sync/src/sqlite/cloudsync_sqlite.c" +#include "modules/sqlite-sync/src/sqlite/database_sqlite.c" +#include "modules/sqlite-sync/src/sqlite/sql_sqlite.c" // sqlite-vector extension #include "modules/sqlite-vector/src/sqlite-vector.c" @@ -32,6 +35,8 @@ // MARK: - WASM - +#define AUTH_HEADER_MAXSIZE 4096 + char *substr(const char *start, const char *end) { size_t len = end - start; char *out = (char *)malloc(len + 1); @@ -78,7 +83,7 @@ NETWORK_RESULT network_receive_buffer (network_data *data, const char *endpoint, } // Authorization - char auth_header[256]; + char auth_header[AUTH_HEADER_MAXSIZE]; if (authentication) { snprintf(auth_header, sizeof(auth_header), "Bearer %s", authentication); headers[h++] = "Authorization"; @@ -159,7 +164,7 @@ bool network_send_buffer(network_data *data, const char *endpoint, const char *a int h = 0; headers[h++] = "Accept"; headers[h++] = "text/plain"; - char auth_header[256]; + char auth_header[AUTH_HEADER_MAXSIZE]; if (authentication) { snprintf(auth_header, sizeof(auth_header), "Bearer %s", authentication); headers[h++] = "Authorization";