Skip to content

Commit

Permalink
Add new ResumptionDelayInfo and SyncClientTimeouts to binding
Browse files Browse the repository at this point in the history
  • Loading branch information
kneth committed Mar 22, 2024
1 parent 8e76dbe commit 6fdd99d
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 1 deletion.
17 changes: 17 additions & 0 deletions packages/realm/bindgen/js_opt_in_spec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -120,13 +120,30 @@ records:
- before_notify
- schema_did_change

ResumptionDelayInfo:
fields:
- max_resumption_delay_interval
- resumption_delay_interval
- resumption_delay_backoff_multiplier
- delay_jitter_divisor

SyncClientTimeouts:
fields:
- connect_timeout
- connection_linger_time
- ping_keepalive_period
- pong_keepalive_timeout
- fast_reconnect_limit
- reconnect_backoff_info

SyncClientConfig:
fields:
- base_file_path
- metadata_mode
- custom_encryption_key
- user_agent_binding_info
- multiplex_sessions
- timeouts

SyncError:
fields:
Expand Down
3 changes: 3 additions & 0 deletions packages/realm/bindgen/src/templates/node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,9 @@ function convertPrimFromNode(addon: NodeAddon, type: string, expr: string): stri
case "uint64_t":
return `extractUint64FromNode(${expr})`;

case "std::chrono::milliseconds":
return `std::chrono::milliseconds(extractUint64FromNode(${expr}))`;

case "std::string":
return `(${expr}).As<Napi::String>().Utf8Value()`;

Expand Down
2 changes: 1 addition & 1 deletion packages/realm/bindgen/vendor/realm-core
Submodule realm-core updated 1 files
+1 −0 bindgen/spec.yml

0 comments on commit 6fdd99d

Please sign in to comment.