From 834de413d97fd71475c66c9c190a77faebd889d0 Mon Sep 17 00:00:00 2001 From: jangko Date: Thu, 4 Jan 2024 11:40:22 +0700 Subject: [PATCH] Rename jrpc_sys module back to jsonmarshal --- json_rpc/client.nim | 4 ++-- json_rpc/{private/jrpc_conv.nim => jsonmarshal.nim} | 0 json_rpc/private/client_handler_wrapper.nim | 3 ++- json_rpc/private/server_handler_wrapper.nim | 8 ++++---- json_rpc/private/shared_wrapper.nim | 2 +- json_rpc/router.nim | 5 +++-- json_rpc/server.nim | 4 ++-- tests/private/ethhexstrings.nim | 2 +- tests/private/stintjson.nim | 2 +- 9 files changed, 16 insertions(+), 14 deletions(-) rename json_rpc/{private/jrpc_conv.nim => jsonmarshal.nim} (100%) diff --git a/json_rpc/client.nim b/json_rpc/client.nim index e1cff0a..abdae37 100644 --- a/json_rpc/client.nim +++ b/json_rpc/client.nim @@ -11,7 +11,7 @@ import std/[json, tables, macros], chronos, results, - ./private/jrpc_conv, + ./jsonmarshal, ./private/jrpc_sys, ./private/client_handler_wrapper, ./private/shared_wrapper, @@ -22,7 +22,7 @@ from strutils import replace export chronos, tables, - jrpc_conv, + jsonmarshal, RequestParamsTx, results diff --git a/json_rpc/private/jrpc_conv.nim b/json_rpc/jsonmarshal.nim similarity index 100% rename from json_rpc/private/jrpc_conv.nim rename to json_rpc/jsonmarshal.nim diff --git a/json_rpc/private/client_handler_wrapper.nim b/json_rpc/private/client_handler_wrapper.nim index f856c9b..69e8f19 100644 --- a/json_rpc/private/client_handler_wrapper.nim +++ b/json_rpc/private/client_handler_wrapper.nim @@ -9,7 +9,8 @@ import macros, - ./shared_wrapper + ./shared_wrapper, + ./jrpc_sys {.push gcsafe, raises: [].} diff --git a/json_rpc/private/server_handler_wrapper.nim b/json_rpc/private/server_handler_wrapper.nim index 660984e..8a773d2 100644 --- a/json_rpc/private/server_handler_wrapper.nim +++ b/json_rpc/private/server_handler_wrapper.nim @@ -13,12 +13,12 @@ import json_serialization, json_serialization/std/[options], ./errors, - ./jrpc_sys, - ./jrpc_conv, - ./shared_wrapper + ./jrpc_sys, + ./shared_wrapper, + ../jsonmarshal export - jrpc_conv + jsonmarshal {.push gcsafe, raises: [].} diff --git a/json_rpc/private/shared_wrapper.nim b/json_rpc/private/shared_wrapper.nim index cf07049..be3339c 100644 --- a/json_rpc/private/shared_wrapper.nim +++ b/json_rpc/private/shared_wrapper.nim @@ -10,7 +10,7 @@ import std/[json, macros], ./jrpc_sys, - ./jrpc_conv + ../jsonmarshal iterator paramsIter*(params: NimNode): tuple[name, ntype: NimNode] = ## Forward iterator of handler parameters diff --git a/json_rpc/router.nim b/json_rpc/router.nim index caed7b6..071d552 100644 --- a/json_rpc/router.nim +++ b/json_rpc/router.nim @@ -13,11 +13,12 @@ import chronos, ./private/server_handler_wrapper, ./private/errors, - ./private/jrpc_sys + ./private/jrpc_sys, + ./jsonmarshal export chronos, - jrpc_conv, + jsonmarshal, json type diff --git a/json_rpc/server.nim b/json_rpc/server.nim index a204051..8c0b5ed 100644 --- a/json_rpc/server.nim +++ b/json_rpc/server.nim @@ -11,14 +11,14 @@ import std/json, chronos, ./router, - ./private/jrpc_conv, + ./jsonmarshal, ./private/jrpc_sys, ./private/shared_wrapper, ./private/errors export chronos, - jrpc_conv, + jsonmarshal, router type diff --git a/tests/private/ethhexstrings.nim b/tests/private/ethhexstrings.nim index 9d6a15f..ccad4a0 100644 --- a/tests/private/ethhexstrings.nim +++ b/tests/private/ethhexstrings.nim @@ -66,7 +66,7 @@ template hexQuantityStr*(value: string): HexQuantityStr = value.HexQuantityStr # Converters import json -import ../../json_rpc/private/jrpc_conv +import ../../json_rpc/jsonmarshal proc `%`*(value: HexDataStr): JsonNode {.gcsafe, raises: [JsonRpcError].} = if not value.validate: diff --git a/tests/private/stintjson.nim b/tests/private/stintjson.nim index 06832ae..441ce38 100644 --- a/tests/private/stintjson.nim +++ b/tests/private/stintjson.nim @@ -1,7 +1,7 @@ import std/json, stint, - ../../json_rpc/private/jrpc_conv + ../../json_rpc/jsonmarshal {.push gcsafe, raises: [].}